diff --git a/.env.example b/.env.example index 164ea9d..69888ec 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -# Docker Compose build arg for admin "view wheel" links. -# On production server, override with your real client domain before building admin: +# Bake this into the admin dist at local `pnpm build:release` time +# (no longer a Docker build arg — images only copy pre-built files). # VITE_CLIENT_PUBLIC_URL=https://wheel.example.com VITE_CLIENT_PUBLIC_URL=http://localhost:5174 diff --git a/.gitignore b/.gitignore index 8c6704d..78c0cec 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,18 @@ node_modules/ -dist/ +apps/api/dist/ +apps/api/coverage/ build/ .env .env.local *.log uploads/ -coverage/ .DS_Store Thumbs.db package-lock.json *.ps1 +*.tsbuildinfo + +# Release artifacts ARE committed for Dokploy copy-only deploys: +# apps/api/release/app.js + apps/api/release/vendor/ (Prisma) +# apps/admin/dist/ +# apps/client/dist/ diff --git a/apps/admin/.dockerignore b/apps/admin/.dockerignore new file mode 100644 index 0000000..4d50dc8 --- /dev/null +++ b/apps/admin/.dockerignore @@ -0,0 +1,5 @@ +* +!dist/ +!dist/** +!nginx.conf +!Dockerfile diff --git a/apps/admin/.gitignore b/apps/admin/.gitignore new file mode 100644 index 0000000..cd7d8e5 --- /dev/null +++ b/apps/admin/.gitignore @@ -0,0 +1,3 @@ +# Dist is committed for Dokploy copy-only images. +node_modules/ +*.tsbuildinfo diff --git a/apps/admin/Dockerfile b/apps/admin/Dockerfile index f4a6ba8..7813ae7 100644 --- a/apps/admin/Dockerfile +++ b/apps/admin/Dockerfile @@ -1,25 +1,7 @@ -FROM node:20-alpine AS builder +FROM docker.arvancloud.ir/nginx:latest -ENV PNPM_HOME="/pnpm" -ENV PATH="$PNPM_HOME:$PATH" -RUN corepack enable pnpm - -WORKDIR /app - -COPY . . - -ARG VITE_CLIENT_PUBLIC_URL= -ENV VITE_CLIENT_PUBLIC_URL=$VITE_CLIENT_PUBLIC_URL - -RUN pnpm install --frozen-lockfile -RUN pnpm --filter @lucky-wheel/api exec prisma generate -RUN pnpm run build:types -RUN pnpm --filter @lucky-wheel/admin build - -FROM nginx:alpine - -COPY --from=builder /app/apps/admin/dist /usr/share/nginx/html -COPY apps/admin/nginx.conf /etc/nginx/conf.d/default.conf +COPY nginx.conf /etc/nginx/conf.d/default.conf +COPY dist /usr/share/nginx/html EXPOSE 80 diff --git a/apps/admin/dist/assets/AuditLogView-BNOFR0wt.css b/apps/admin/dist/assets/AuditLogView-BNOFR0wt.css new file mode 100644 index 0000000..eb0337a --- /dev/null +++ b/apps/admin/dist/assets/AuditLogView-BNOFR0wt.css @@ -0,0 +1 @@ +.page-header-title[data-v-ec85b8e1]{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:12px}.page-header-title .title[data-v-ec85b8e1]{font-size:20px;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.3px}.page-header-title .subtitle[data-v-ec85b8e1]{font-size:13px;color:#64748b;margin:4px 0 0}.main-card[data-v-ec85b8e1]{border-radius:12px;box-shadow:0 1px 3px #0000000a;border:1px solid #f1f5f9}.table-header[data-v-ec85b8e1]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.filters[data-v-ec85b8e1]{display:flex;gap:12px}.admin-name[data-v-ec85b8e1]{font-weight:500;color:#1e293b}.code-badge[data-v-ec85b8e1]{background:#f8fafc;border:1px solid #e2e8f0;padding:2px 6px;border-radius:4px;font-family:monospace;font-size:11px;color:#64748b}.date-cell[data-v-ec85b8e1]{color:#334155;font-size:13px}.text-muted[data-v-ec85b8e1]{color:#94a3b8;font-size:12px}.action-more-btn[data-v-ec85b8e1]{color:#64748b;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;transition:all .2s ease}.action-more-btn[data-v-ec85b8e1]:hover{background-color:#eef2ff!important}.json-box[data-v-ec85b8e1]{background:#0f172a;color:#38bdf8;padding:14px;border-radius:8px;font-family:monospace;font-size:12px;max-height:240px;overflow-y:auto;direction:ltr;text-align:left;border:1px solid #1e293b} diff --git a/apps/admin/dist/assets/AuditLogView-Dx1yARgc.js b/apps/admin/dist/assets/AuditLogView-Dx1yARgc.js new file mode 100644 index 0000000..6c65979 --- /dev/null +++ b/apps/admin/dist/assets/AuditLogView-Dx1yARgc.js @@ -0,0 +1 @@ +import{t as x}from"./farsi-number-stB7JMN0.js";import{d as J,l as j,c as v,a as s,b as l,w as a,h as k,n as K,r as y,g as M,o as p,f as n,e as f,R as $,t as i,x as C,H as F,s as N,_ as H}from"./index-C4s_T2hP.js";const h={class:"audit-log-page"},q={class:"page-header-title"},G={class:"table-header"},Q={class:"filters"},W={key:0,class:"admin-name"},X={key:1,class:"text-muted"},Y={key:4,class:"code-badge"},Z={key:5,class:"date-cell"},ee={key:6,class:"date-cell"},te={key:0},ae={class:"json-box"},le={class:"json-box"},ne=J({__name:"AuditLogView",setup(ie){const w=k(!1),b=k([]),I=k(0),r=M({page:1,pageSize:10,action:void 0,entityType:void 0}),A=k(!1),u=k(null);async function T(){var o,e,c,g;w.value=!0;try{const m=await K.get("/admin/audit-logs",{params:{page:r.page,pageSize:r.pageSize,action:r.action||void 0,entityType:r.entityType||void 0}}),_=Array.isArray(m.data)?m.data:((o=m.data)==null?void 0:o.data)||[];b.value=_,I.value=((e=m.meta)==null?void 0:e.total)||((g=(c=m.data)==null?void 0:c.meta)==null?void 0:g.total)||_.length}finally{w.value=!1}}function D(o){u.value=o,A.value=!0}const S={Campaign:"کمپین",Prize:"جایزه",User:"کاربر",Chance:"شانس",UserPrize:"وضعیت برنده"},U=[{title:"مدیر انجام‌دهنده",dataIndex:["admin","name"],key:"adminName",width:150},{title:"ایمیل مدیر",dataIndex:["admin","email"],key:"adminEmail",width:180},{title:"نوع موجودیت",dataIndex:"entityType",key:"entityType",width:140},{title:"عملیات",dataIndex:"action",key:"action",width:160},{title:"شناسه موجودیت",dataIndex:"entityId",key:"entityId",ellipsis:!0},{title:"آی‌پی",dataIndex:"ipAddress",key:"ipAddress",width:130},{title:"زمان ثبت",dataIndex:"createdAt",key:"createdAt",width:160},{title:"عملیات",key:"details",width:70,align:"center"}];function E(o){return o.includes("CREATE")||o.includes("INSERT")?"green":o.includes("UPDATE")||o.includes("EDIT")||o.includes("ADJUST")?"blue":o.includes("DELETE")||o.includes("BLOCK")?"red":"default"}return j(()=>{T()}),(o,e)=>{const c=y("a-button"),g=y("a-select-option"),m=y("a-select"),_=y("a-tag"),O=y("a-tooltip"),P=y("a-table"),z=y("a-divider"),B=y("a-modal"),R=y("a-card");return p(),v("div",h,[s("div",q,[e[4]||(e[4]=s("div",null,[s("h1",{class:"title"},"لاگ بازرسی (Audit Log)"),s("p",{class:"subtitle"},"ثبت امن و تغییرناپذیر تمامی عملیات مدیران در سامانه")],-1)),l(c,{onClick:T,loading:w.value},{icon:a(()=>[l(f($))]),default:a(()=>[e[3]||(e[3]=n(" به‌روزرسانی ",-1))]),_:1},8,["loading"])]),l(R,{bordered:!1,class:"main-card"},{default:a(()=>[s("div",G,[s("div",Q,[l(m,{value:r.entityType,"onUpdate:value":e[0]||(e[0]=t=>r.entityType=t),placeholder:"فیلتر بخش (موجودیت)",allowClear:"",style:{width:"200px"},onChange:e[1]||(e[1]=()=>{r.page=1,T()})},{default:a(()=>[l(g,{value:"Campaign"},{default:a(()=>[...e[5]||(e[5]=[n("کمپین",-1)])]),_:1}),l(g,{value:"Prize"},{default:a(()=>[...e[6]||(e[6]=[n("جایزه",-1)])]),_:1}),l(g,{value:"User"},{default:a(()=>[...e[7]||(e[7]=[n("کاربر",-1)])]),_:1}),l(g,{value:"Chance"},{default:a(()=>[...e[8]||(e[8]=[n("شانس",-1)])]),_:1}),l(g,{value:"UserPrize"},{default:a(()=>[...e[9]||(e[9]=[n("وضعیت برنده",-1)])]),_:1})]),_:1},8,["value"])])]),l(P,{dataSource:b.value,columns:U,loading:w.value,rowKey:"id",size:"middle",pagination:{current:r.page,pageSize:r.pageSize,total:I.value,showTotal:t=>`مجموع: ${f(x)(t)} ردیف لاگ`,onChange:t=>{r.page=t,T()}}},{bodyCell:a(({column:t,record:d})=>{var V,L;return[t.key==="adminName"?(p(),v("span",W,i(((V=d.admin)==null?void 0:V.name)||"مدیر سیستم"),1)):t.key==="adminEmail"?(p(),v("span",X,i(((L=d.admin)==null?void 0:L.email)||"—"),1)):t.key==="entityType"?(p(),C(_,{key:2,color:"geekblue"},{default:a(()=>[n(i(S[d.entityType]||d.entityType),1)]),_:2},1024)):t.key==="action"?(p(),C(_,{key:3,color:E(d.action)},{default:a(()=>[n(i(d.action),1)]),_:2},1032,["color"])):t.key==="entityId"?(p(),v("code",Y,i(d.entityId),1)):t.key==="ipAddress"?(p(),v("span",Z,i(f(x)(d.ipAddress)),1)):t.key==="createdAt"?(p(),v("span",ee,i(f(x)(new Date(d.createdAt).toLocaleString("fa-IR"))),1)):t.key==="details"?(p(),C(O,{key:7,title:"مشاهده جزئیات تغییرات"},{default:a(()=>[l(c,{type:"text",shape:"circle",class:"action-more-btn",onClick:se=>D(d)},{default:a(()=>[l(f(F),{style:{"font-size":"16px",color:"#4f46e5"}})]),_:1},8,["onClick"])]),_:2},1024)):N("",!0)]}),_:1},8,["dataSource","loading","pagination"]),l(B,{open:A.value,"onUpdate:open":e[2]||(e[2]=t=>A.value=t),title:"جزئیات لاگ بازرسی (Audit Log)",footer:null,width:"700px"},{default:a(()=>{var t,d;return[u.value?(p(),v("div",te,[s("p",null,[e[10]||(e[10]=s("strong",null,"اقدام:",-1)),e[11]||(e[11]=n()),l(_,{color:E(u.value.action)},{default:a(()=>[n(i(u.value.action),1)]),_:1},8,["color"]),e[12]||(e[12]=n(" بر روی ",-1)),s("strong",null,i(S[u.value.entityType]||u.value.entityType),1),e[13]||(e[13]=n(" (شناسه: ",-1)),s("code",null,i(u.value.entityId),1),e[14]||(e[14]=n(")",-1))]),s("p",null,[e[15]||(e[15]=s("strong",null,"توسط:",-1)),n(" "+i((t=u.value.admin)==null?void 0:t.name)+" ("+i((d=u.value.admin)==null?void 0:d.email)+") | IP: "+i(f(x)(u.value.ipAddress)),1)]),l(z,null,{default:a(()=>[...e[16]||(e[16]=[n("مقادیر قبلی (Old Values)",-1)])]),_:1}),s("pre",ae,i(JSON.stringify(u.value.oldValues,null,2)||"ندارد"),1),l(z,null,{default:a(()=>[...e[17]||(e[17]=[n("مقادیر جدید (New Values)",-1)])]),_:1}),s("pre",le,i(JSON.stringify(u.value.newValues,null,2)||"ندارد"),1)])):N("",!0)]}),_:1},8,["open"])]),_:1})])}}}),ue=H(ne,[["__scopeId","data-v-ec85b8e1"]]);export{ue as default}; diff --git a/apps/admin/dist/assets/CampaignFormView-Bh82lCkH.css b/apps/admin/dist/assets/CampaignFormView-Bh82lCkH.css new file mode 100644 index 0000000..6f3efcd --- /dev/null +++ b/apps/admin/dist/assets/CampaignFormView-Bh82lCkH.css @@ -0,0 +1 @@ +.wheel-picker-grid[data-v-16f7d06b]{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px;margin-top:10px}.design-card[data-v-16f7d06b]{border:2px solid #e2e8f0;border-radius:12px;overflow:hidden;cursor:pointer;transition:all .25s ease;background:#fff;display:flex;flex-direction:column}.design-card[data-v-16f7d06b]:hover{border-color:#1677ff;transform:translateY(-3px);box-shadow:0 8px 20px #0000001a}.design-card.is-selected[data-v-16f7d06b]{border-color:#1677ff;box-shadow:0 0 0 2px #1677ff40}.preview-stage[data-v-16f7d06b]{height:140px;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;border-bottom:1px solid rgba(0,0,0,.08)}.theme-tag[data-v-16f7d06b]{position:absolute;top:10px;right:10px;z-index:10;margin:0;font-weight:600}.stage-tools[data-v-16f7d06b]{position:absolute;bottom:8px;left:8px;display:flex;gap:6px;z-index:10}.tool-btn[data-v-16f7d06b]{background:#ffffffd9;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);border:none;box-shadow:0 2px 6px #00000026}.tool-btn[data-v-16f7d06b]:hover{background:#fff;color:#1677ff}.wheel-wrapper[data-v-16f7d06b]{position:relative;width:96px;height:96px;display:flex;align-items:center;justify-content:center}.pointer-wrapper[data-v-16f7d06b]{position:absolute;top:-8px;left:50%;transform:translate(-50%);z-index:20;filter:drop-shadow(0 2px 4px rgba(0,0,0,.4))}.mini-wheel-svg[data-v-16f7d06b]{width:100%;height:100%;border-radius:50%;filter:drop-shadow(0 4px 10px rgba(0,0,0,.3))}.card-body[data-v-16f7d06b]{padding:14px 16px;flex:1;display:flex;flex-direction:column}.card-title-row[data-v-16f7d06b]{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.title-text[data-v-16f7d06b]{font-weight:700;font-size:13.5px;color:#1e293b}.selected-icon[data-v-16f7d06b]{color:#1677ff;font-size:18px}.card-desc[data-v-16f7d06b]{font-size:11.5px;color:#64748b;line-height:1.6;margin:0}.modal-preview-container[data-v-16f7d06b]{padding:30px 20px;border-radius:12px;display:flex;flex-direction:column;align-items:center}.modal-wheel-box[data-v-16f7d06b]{position:relative;width:240px;height:240px}.large-pointer[data-v-16f7d06b]{position:absolute;top:-12px;left:50%;transform:translate(-50%);z-index:20;filter:drop-shadow(0 3px 6px rgba(0,0,0,.5))}.large-wheel-svg[data-v-16f7d06b]{width:100%;height:100%;border-radius:50%;filter:drop-shadow(0 8px 24px rgba(0,0,0,.4))}.submit-btn[data-v-c11ffb22]{font-weight:600;border-radius:8px} diff --git a/apps/admin/dist/assets/CampaignFormView-DyefXmzg.js b/apps/admin/dist/assets/CampaignFormView-DyefXmzg.js new file mode 100644 index 0000000..90e10c4 --- /dev/null +++ b/apps/admin/dist/assets/CampaignFormView-DyefXmzg.js @@ -0,0 +1 @@ +import{d as j,o as _,c as v,F as B,y as N,b as l,w as a,G as Y,a as n,t as k,f as C,s as L,h as T,r as p,e as A,R as K,H as Q,x as G,K as J,N as ee,_ as H,g as te,l as le,O as z,Q as ae,n as O,V as oe,W as ne,i as se,z as I}from"./index-C4s_T2hP.js";import{W as h}from"./index-NN61KtzX.js";import{U as W}from"./UploadOutlined-BdWusN3O.js";const re={class:"wheel-picker-grid"},ie=["onClick"],de={class:"wheel-wrapper"},ce={class:"pointer-wrapper"},ue={width:"18",height:"22",viewBox:"0 0 18 22",fill:"none"},fe=["fill"],pe=["d","fill","stroke"],ge=["cx","cy"],be=["fill","stroke"],_e=["fill"],me={class:"stage-tools"},ve={class:"card-body"},he={class:"card-title-row"},Ce={class:"title-text"},xe={class:"card-desc"},ye={class:"modal-wheel-box"},we={class:"large-pointer"},ke={width:"28",height:"34",viewBox:"0 0 28 34",fill:"none"},Ae=["fill"],$e={class:"large-wheel-svg",viewBox:"0 0 260 260"},Me=["d","fill","stroke"],Te=["fill"],De={x:"130",y:"136","text-anchor":"middle",fill:"#fff","font-size":"14","font-weight":"bold"},Se={style:{"margin-top":"20px","text-align":"center"}},Ie=j({__name:"WheelDesignPicker",props:{modelValue:{}},emits:["update:modelValue"],setup(F,{emit:V}){const D=V,w=T(!1),g=T(null),$=T(null),S=T({}),e=[{id:h.CLASSIC_CASINO,title:"کلاسیک کازینویی (Classic Casino)",badge:"جشنواره‌ها و قرعه‌کشی",badgeColor:"gold",desc:"طرح سنتی و مجلل با حباب‌های نور طلایی چشمک‌زن، اسلایس‌های قرمز و مشکی و ستاره برنجی",bg:"radial-gradient(circle, #2d0a0a 0%, #150505 100%)",accent:"#fbbf24",border:"#d97706",slices:["#b91c1c","#1e293b","#b91c1c","#1e293b","#b91c1c","#1e293b"],pointerColor:"#f59e0b",centerColor:"#fbbf24",centerText:"★"},{id:h.NEON_CYBER,title:"نئون سایبری (Neon Cyber)",badge:"مدرن و گیمینگ",badgeColor:"cyan",desc:"تم سایبرپانک تیره با درخشش نور فیروزه‌ای و سرخابی، نشانگر لیزری و پالس نوری آینده‌نگرانه",bg:"radial-gradient(circle, #100e26 0%, #060512 100%)",accent:"#00f0ff",border:"#ec4899",slices:["#111827","#1e1b4b","#111827","#1e1b4b","#111827","#1e1b4b"],pointerColor:"#00f0ff",centerColor:"#00f0ff",centerText:"⚡"},{id:h.MINIMAL_FLAT,title:"مینیمال تخت (Minimal Flat)",badge:"فین‌تک و B2B",badgeColor:"blue",desc:"طراحی مدرن، بدون حاشیه سنگین، فوق‌العاده خوانا، شارپ و متناسب با برندهای رسمی",bg:"radial-gradient(circle, #1e293b 0%, #0f172a 100%)",accent:"#38bdf8",border:"#3b82f6",slices:["#3b82f6","#6366f1","#3b82f6","#6366f1","#3b82f6","#6366f1"],pointerColor:"#38bdf8",centerColor:"#ffffff",centerText:"●"},{id:h.LUXURY_GOLD,title:"لوکس سلطنتی (Luxury Gold)",badge:"VIP و پرمیوم",badgeColor:"orange",desc:"پس‌زمینه مشکی ابسیدین با شیب‌های طلای متالیک، حاشیه اشرافی و مدالیون کریستالی",bg:"radial-gradient(circle, #241c0e 0%, #0d0a06 100%)",accent:"#facc15",border:"#ca8a04",slices:["#1c1917","#0c0a09","#1c1917","#0c0a09","#1c1917","#0c0a09"],pointerColor:"#eab308",centerColor:"#facc15",centerText:"VIP"},{id:h.PLAYFUL_CARTOON,title:"کارتونی فانتزی (Playful Cartoon)",badge:"خانواده و بازی",badgeColor:"magenta",desc:"رنگ‌های شاداب آب‌نباتی، بردر ضخیم و نرم، نشانگر جهنده و حس پویای بازی‌های موبایلی",bg:"radial-gradient(circle, #fef3c7 0%, #fde68a 100%)",accent:"#f43f5e",border:"#f59e0b",slices:["#f43f5e","#8b5cf6","#06b6d4","#10b981","#f59e0b","#ec4899"],pointerColor:"#ef4444",centerColor:"#facc15",centerText:"✨"},{id:h.RUSTIC_WOOD,title:"چوبی روستایی (Rustic Wood)",badge:"طبیعی و گرم",badgeColor:"orange",desc:"بافت چوب طبیعی، پیچ‌های فلزی، رنگ‌های قهوه‌ای گرم و حس دست‌ساز سنتی",bg:"radial-gradient(circle, #5c3a1e 0%, #2a160c 100%)",accent:"#c9a36a",border:"#8d6e63",slices:["#8B5A2B","#A0522D","#6B4226","#C4A484","#8B5A2B","#5D4037"],pointerColor:"#8d6e63",centerColor:"#a1887f",centerText:"🪵"},{id:h.GALAXY_SPACE,title:"کهکشانی (Galaxy Space)",badge:"فضایی و مدرن",badgeColor:"purple",desc:"پس‌زمینه فضایی با ستاره‌ها، گرادیان بنفش-آبی و حلقه نورانی کهکشانی",bg:"radial-gradient(circle, #1e1b4b 0%, #050816 100%)",accent:"#a78bfa",border:"#6366f1",slices:["#1e1b4b","#312e81","#4c1d95","#0f172a","#1e3a8a","#581c87"],pointerColor:"#a78bfa",centerColor:"#818cf8",centerText:"🌌"},{id:h.CANDY_LAND,title:"آب‌نباتی (Candy Land)",badge:"شاد و کودکانه",badgeColor:"pink",desc:"رنگ‌های پاستل صورتی و زرد، حاشیه ابری و حس شیرین و بازیگوش",bg:"radial-gradient(circle, #ffe4e6 0%, #fbcfe8 100%)",accent:"#fb7185",border:"#f9a8d4",slices:["#fb7185","#fbbf24","#34d399","#60a5fa","#c084fc","#f472b6"],pointerColor:"#fb7185",centerColor:"#fef08a",centerText:"🍬"},{id:h.FIRE_FLAME,title:"آتشین (Fire Flame)",badge:"انرژی و هیجان",badgeColor:"volcano",desc:"قرمز و نارنجی درخشان، شعله‌های SVG روی حاشیه و مرکز اخگر",bg:"radial-gradient(circle, #7f1d1d 0%, #1a0505 100%)",accent:"#f97316",border:"#dc2626",slices:["#7f1d1d","#b91c1c","#ea580c","#c2410c","#9a3412","#450a0a"],pointerColor:"#f97316",centerColor:"#fdba74",centerText:"🔥"},{id:h.CRYSTAL_ICE,title:"یخی کریستالی (Crystal Ice)",badge:"خنک و لوکس",badgeColor:"blue",desc:"آبی یخی شفاف، کریستال‌های لبه و حس زمستانی و کریستالی",bg:"radial-gradient(circle, #0ea5e9 0%, #082f49 100%)",accent:"#7dd3fc",border:"#38bdf8",slices:["#0ea5e9","#38bdf8","#7dd3fc","#0284c7","#e0f2fe","#0369a1"],pointerColor:"#38bdf8",centerColor:"#e0f2fe",centerText:"❄️"}];function P(r){D("update:modelValue",r)}function E(r,d){d.stopPropagation();const u=S.value[r]||0;S.value[r]=u+1440+Math.floor(Math.random()*360),$.value=r,setTimeout(()=>{$.value===r&&($.value=null)},2500)}function U(r,d){d.stopPropagation(),g.value=r,w.value=!0}function x(r,d=6,u=46,i=50,s=50){const b=360/d,m=(r*b-90)*(Math.PI/180),y=((r+1)*b-90)*(Math.PI/180),o=i+u*Math.cos(m),f=s+u*Math.sin(m),M=i+u*Math.cos(y),R=s+u*Math.sin(y);return`M ${i} ${s} L ${o} ${f} A ${u} ${u} 0 0 1 ${M} ${R} Z`}function t(r,d=6,u=110,i=130,s=130){const b=360/d,m=(r*b-90)*(Math.PI/180),y=((r+1)*b-90)*(Math.PI/180),o=i+u*Math.cos(m),f=s+u*Math.sin(m),M=i+u*Math.cos(y),R=s+u*Math.sin(y);return`M ${i} ${s} L ${o} ${f} A ${u} ${u} 0 0 1 ${M} ${R} Z`}return(r,d)=>{var y;const u=p("a-tag"),i=p("a-button"),s=p("a-tooltip"),b=p("a-radio"),m=p("a-modal");return _(),v("div",re,[(_(),v(B,null,N(e,o=>n("div",{key:o.id,class:ee(["design-card",{"is-selected":F.modelValue===o.id}]),onClick:f=>P(o.id)},[n("div",{class:"preview-stage",style:Y({background:o.bg})},[l(u,{color:o.badgeColor,class:"theme-tag"},{default:a(()=>[C(k(o.badge),1)]),_:2},1032,["color"]),n("div",de,[n("div",ce,[(_(),v("svg",ue,[n("path",{d:"M9 22L2 6C0.5 3 2.5 0 6 0H12C15.5 0 17.5 3 16 6L9 22Z",fill:o.pointerColor,stroke:"#ffffff","stroke-width":"1.2"},null,8,fe)]))]),(_(),v("svg",{class:"mini-wheel-svg",viewBox:"0 0 100 100",style:Y({transform:`rotate(${S.value[o.id]||0}deg)`,transition:$.value===o.id?"transform 2.5s cubic-bezier(0.15, 0.9, 0.2, 1)":"none"})},[(_(!0),v(B,null,N(o.slices,(f,M)=>(_(),v("g",{key:M},[n("path",{d:x(M,o.slices.length),fill:f,stroke:o.accent,"stroke-width":"0.8"},null,8,pe)]))),128)),o.id===A(h).CLASSIC_CASINO?(_(),v(B,{key:0},N(12,f=>n("circle",{key:f,cx:50+46*Math.cos((f*30-90)*(Math.PI/180)),cy:50+46*Math.sin((f*30-90)*(Math.PI/180)),r:"1.8",fill:"#fef08a"},null,8,ge)),64)):L("",!0),n("circle",{cx:"50",cy:"50",r:"13",fill:o.centerColor,stroke:o.border,"stroke-width":"1"},null,8,be),d[2]||(d[2]=n("circle",{cx:"50",cy:"50",r:"8",fill:"#1e293b"},null,-1)),n("text",{x:"50",y:"53","text-anchor":"middle",fill:o.accent,"font-size":"6","font-weight":"bold"},k(o.centerText),9,_e)],4))]),n("div",me,[l(s,{title:"تست چرخش آزمایشی"},{default:a(()=>[l(i,{size:"small",shape:"circle",class:"tool-btn",onClick:f=>E(o.id,f)},{icon:a(()=>[l(A(K))]),_:1},8,["onClick"])]),_:2},1024),l(s,{title:"مشاهده پیش‌نمایش بزرگ"},{default:a(()=>[l(i,{size:"small",shape:"circle",class:"tool-btn",onClick:f=>U(o,f)},{icon:a(()=>[l(A(Q))]),_:1},8,["onClick"])]),_:2},1024)])],4),n("div",ve,[n("div",he,[l(b,{checked:F.modelValue===o.id},{default:a(()=>[n("span",Ce,k(o.title),1)]),_:2},1032,["checked"]),F.modelValue===o.id?(_(),G(A(J),{key:0,class:"selected-icon"})):L("",!0)]),n("p",xe,k(o.desc),1)])],10,ie)),64)),l(m,{open:w.value,"onUpdate:open":d[1]||(d[1]=o=>w.value=o),title:`پیش‌نمایش طرح: ${((y=g.value)==null?void 0:y.title)||""}`,footer:null,width:"420px",centered:""},{default:a(()=>[g.value?(_(),v("div",{key:0,class:"modal-preview-container",style:Y({background:g.value.bg})},[n("div",ye,[n("div",we,[(_(),v("svg",ke,[n("path",{d:"M14 34L4 10C2 5 6 1 11 1H17C22 1 26 5 24 10L14 34Z",fill:g.value.pointerColor,stroke:"#fff","stroke-width":"1.5"},null,8,Ae)]))]),(_(),v("svg",$e,[(_(!0),v(B,null,N(g.value.slices,(o,f)=>(_(),v("g",{key:f},[n("path",{d:t(f,g.value.slices.length),fill:o,stroke:g.value.accent,"stroke-width":"1.5"},null,8,Me)]))),128)),n("circle",{cx:"130",cy:"130",r:"30",fill:g.value.centerColor,stroke:"#fff","stroke-width":"2"},null,8,Te),d[3]||(d[3]=n("circle",{cx:"130",cy:"130",r:"18",fill:"#0f172a"},null,-1)),n("text",De,k(g.value.centerText),1)]))]),n("div",Se,[l(i,{type:"primary",size:"large",onClick:d[0]||(d[0]=o=>{P(g.value.id),w.value=!1})},{default:a(()=>[...d[4]||(d[4]=[C(" انتخاب این طرح برای کمپین ",-1)])]),_:1})])],4)):L("",!0)]),_:1},8,["open","title"])])}}}),Re=H(Ie,[["__scopeId","data-v-16f7d06b"]]),Le={style:{display:"flex","flex-direction":"column",gap:"8px"}},Fe={key:0,style:{position:"relative",width:"90px",height:"90px","border-radius":"12px",border:"1px solid #e2e8f0",overflow:"hidden",background:"#f8fafc",padding:"4px","box-shadow":"0 2px 6px rgba(0,0,0,0.05)"}},Ve=["src"],Pe={style:{display:"flex","flex-direction":"column",gap:"8px"}},Ue={key:0,style:{position:"relative",width:"160px",height:"90px","border-radius":"12px",border:"1px solid #e2e8f0",overflow:"hidden",background:"#f8fafc","box-shadow":"0 2px 6px rgba(0,0,0,0.05)"}},Be=["src"],Ne={style:{"margin-top":"24px",display:"flex",gap:"12px"}},ze=j({__name:"CampaignFormView",setup(F){const V=ae(),D=se(),w=T(!1),g=T(null),$=T(!1),S=T(!1),e=te({title:"",slug:"",description:"",banner:"",logo:"",dateRange:[],status:"DRAFT",defaultChances:3,rules:"",ctaText:"بچرخون و برنده شو!",wheelDesign:h.CLASSIC_CASINO,primaryColor:"#FFD700",secondaryColor:"#B22222"});async function P(){if(g.value){$.value=!0;try{const t=(await O.get(`/admin/campaigns/${g.value}`)).data;e.title=t.title,e.slug=t.slug,e.description=t.description||"",e.banner=t.banner||"",e.logo=t.logo||"",e.status=t.status,e.defaultChances=t.defaultChances,e.rules=t.rules||"",e.ctaText=t.ctaText||"بچرخون و برنده شو!",e.wheelDesign=t.wheelDesign,e.dateRange=[z(t.startAt),z(t.endAt)],t.settings&&(e.primaryColor=t.settings.primaryColor||"#FFD700",e.secondaryColor=t.settings.secondaryColor||"#B22222")}finally{$.value=!1}}}async function E(){var t,r,d,u,i;if(!e.title||!e.title.trim()){I.error("لطفاً عنوان کمپین را وارد کنید.");return}let x=(e.slug||"").trim().toLowerCase().replace(/\s+/g,"-");if(x||(x="campaign-"+Math.random().toString(36).substring(2,8)),e.slug=x,!/^[a-z0-9-]+$/.test(x)){I.error("شناسه URL (اسلاگ) باید فقط شامل حروف کوچک انگلیسی، اعداد و خط تیره (-) باشد.");return}if(!e.dateRange||e.dateRange.length<2){I.error("لطفاً بازه زمانی شروع و پایان کمپین را انتخاب کنید.");return}S.value=!0;try{const s={title:e.title.trim(),slug:e.slug.trim(),description:((t=e.description)==null?void 0:t.trim())||void 0,banner:e.banner?e.banner.trim():null,logo:e.logo?e.logo.trim():null,startAt:e.dateRange[0].toISOString(),endAt:e.dateRange[1].toISOString(),status:e.status,defaultChances:Number(e.defaultChances)||0,rules:((r=e.rules)==null?void 0:r.trim())||void 0,ctaText:e.ctaText||"بچرخون و برنده شو!",wheelDesign:e.wheelDesign,settings:{primaryColor:e.primaryColor,secondaryColor:e.secondaryColor}};if(w.value&&g.value)await O.patch(`/admin/campaigns/${g.value}`,s),I.success("کمپین با موفقیت به‌روزرسانی شد."),D.push("/campaigns");else{const b=await O.post("/admin/campaigns",s);I.success("کمپین با موفقیت ایجاد گردید.");const m=((d=b.data)==null?void 0:d.id)||b.id;m?D.push(`/campaigns/${m}/prizes`):D.push("/campaigns")}}catch(s){const b=((i=(u=s.response)==null?void 0:u.data)==null?void 0:i.message)||s.message||"خطایی در ثبت اطلاعات کمپین رخ داد.";I.error(Array.isArray(b)?b.join(" | "):b)}finally{S.value=!1}}async function U(x,t){const r=new FormData;r.append("file",x);try{const d=await O.post("/admin/uploads",r,{headers:{"Content-Type":"multipart/form-data"}});e[t]=d.data.url,I.success("تصویر با موفقیت آپلود شد.")}catch{}return!1}return le(()=>{V.params.id?(w.value=!0,g.value=V.params.id,P()):e.dateRange=[z(),z().add(1,"month")]}),(x,t)=>{const r=p("a-button"),d=p("a-space"),u=p("a-input"),i=p("a-form-item"),s=p("a-col"),b=p("a-range-picker"),m=p("a-select-option"),y=p("a-select"),o=p("a-input-number"),f=p("a-upload"),M=p("a-divider"),R=p("a-textarea"),q=p("a-row"),Z=p("a-form"),X=p("a-card");return _(),G(X,{bordered:!1,loading:$.value},{title:a(()=>[l(d,null,{default:a(()=>[l(r,{type:"text",onClick:t[0]||(t[0]=c=>A(D).push("/campaigns"))},{icon:a(()=>[l(A(ne))]),_:1}),n("span",null,k(w.value?"ویرایش اطلاعات کمپین":"تعریف کمپین جدید گردونه شانس"),1)]),_:1})]),default:a(()=>[l(Z,{model:e,layout:"vertical",onSubmit:oe(E,["prevent"])},{default:a(()=>[l(q,{gutter:24},{default:a(()=>[l(s,{xs:24,md:12},{default:a(()=>[l(i,{label:"عنوان کمپین",name:"title",required:"",rules:[{required:!0,message:"عنوان کمپین الزامی است"}]},{default:a(()=>[l(u,{value:e.title,"onUpdate:value":t[1]||(t[1]=c=>e.title=c),placeholder:"مثال: جشنواره عیدانه گردونه شانس"},null,8,["value"])]),_:1})]),_:1}),l(s,{xs:24,md:12},{default:a(()=>[l(i,{label:"شناسه URL (اسلاگ)",name:"slug",required:"",extra:"فقط حروف کوچک انگلیسی، اعداد و خط تیره (-) مانند: norooz-1405",rules:[{required:!0,message:"اسلاگ الزامی است"}]},{default:a(()=>[l(u,{value:e.slug,"onUpdate:value":t[2]||(t[2]=c=>e.slug=c),placeholder:"eid-1405"},null,8,["value"])]),_:1})]),_:1}),l(s,{xs:24,md:12},{default:a(()=>[l(i,{label:"بازه زمانی اعتبار (شروع و پایان)",name:"dateRange",required:""},{default:a(()=>[l(b,{value:e.dateRange,"onUpdate:value":t[3]||(t[3]=c=>e.dateRange=c),"show-time":"",format:"YYYY/MM/DD HH:mm",style:{width:"100%"}},null,8,["value"])]),_:1})]),_:1}),l(s,{xs:24,md:6},{default:a(()=>[l(i,{label:"وضعیت کمپین"},{default:a(()=>[l(y,{value:e.status,"onUpdate:value":t[4]||(t[4]=c=>e.status=c)},{default:a(()=>[l(m,{value:"DRAFT"},{default:a(()=>[...t[13]||(t[13]=[C("پیش‌نویس",-1)])]),_:1}),l(m,{value:"ACTIVE"},{default:a(()=>[...t[14]||(t[14]=[C("فعال",-1)])]),_:1}),l(m,{value:"PAUSED"},{default:a(()=>[...t[15]||(t[15]=[C("متوقف",-1)])]),_:1}),l(m,{value:"FINISHED"},{default:a(()=>[...t[16]||(t[16]=[C("پایان‌یافته",-1)])]),_:1})]),_:1},8,["value"])]),_:1})]),_:1}),l(s,{xs:24,md:6},{default:a(()=>[l(i,{label:"تعداد شانس پیش‌فرض کاربران"},{default:a(()=>[l(o,{value:e.defaultChances,"onUpdate:value":t[5]||(t[5]=c=>e.defaultChances=c),min:0,style:{width:"100%"}},null,8,["value"])]),_:1})]),_:1}),l(s,{xs:24,md:12},{default:a(()=>[l(i,{label:"متن دکمه چرخاندن (CTA)"},{default:a(()=>[l(u,{value:e.ctaText,"onUpdate:value":t[6]||(t[6]=c=>e.ctaText=c),placeholder:"بچرخون و برنده شو!"},null,8,["value"])]),_:1})]),_:1}),l(s,{xs:24,md:6},{default:a(()=>[l(i,{label:"لوگوی کمپین"},{default:a(()=>[n("div",Le,[e.logo?(_(),v("div",Fe,[n("img",{src:e.logo,alt:"لوگو",style:{width:"100%",height:"100%","object-fit":"contain"}},null,8,Ve),n("button",{type:"button",style:{position:"absolute",top:"4px",left:"4px",width:"20px",height:"20px","border-radius":"50%",background:"#ef4444",color:"#fff",border:"none","font-size":"11px",cursor:"pointer",display:"flex","justify-content":"center","line-height":"1"},title:"حذف لوگو",onClick:t[7]||(t[7]=c=>e.logo="")}," ✕ ")])):L("",!0),l(f,{"before-upload":c=>U(c,"logo"),"show-upload-list":!1},{default:a(()=>[l(r,null,{icon:a(()=>[l(A(W))]),default:a(()=>[C(" "+k(e.logo?"تغییر لوگو":"انتخاب فایل لوگو"),1)]),_:1})]),_:1},8,["before-upload"])])]),_:1})]),_:1}),l(s,{xs:24,md:6},{default:a(()=>[l(i,{label:"بنر کمپین"},{default:a(()=>[n("div",Pe,[e.banner?(_(),v("div",Ue,[n("img",{src:e.banner,alt:"بنر",style:{width:"100%",height:"100%","object-fit":"cover"}},null,8,Be),n("button",{type:"button",style:{position:"absolute",top:"4px",left:"4px",width:"20px",height:"20px","border-radius":"50%",background:"#ef4444",color:"#fff",border:"none","font-size":"11px",cursor:"pointer",display:"flex","justify-content":"center","line-height":"1"},title:"حذف بنر",onClick:t[8]||(t[8]=c=>e.banner="")}," ✕ ")])):L("",!0),l(f,{"before-upload":c=>U(c,"banner"),"show-upload-list":!1},{default:a(()=>[l(r,null,{icon:a(()=>[l(A(W))]),default:a(()=>[C(" "+k(e.banner?"تغییر بنر":"انتخاب فایل بنر"),1)]),_:1})]),_:1},8,["before-upload"])])]),_:1})]),_:1}),l(s,{xs:24},{default:a(()=>[l(M,null,{default:a(()=>[...t[17]||(t[17]=[C("طرح بصری گردونه شانس (انتخاب از بین ۵ طرح استاندار)",-1)])]),_:1}),l(i,null,{default:a(()=>[l(Re,{modelValue:e.wheelDesign,"onUpdate:modelValue":t[9]||(t[9]=c=>e.wheelDesign=c)},null,8,["modelValue"])]),_:1})]),_:1}),l(s,{xs:24,md:12},{default:a(()=>[l(i,{label:"توضیحات کوتاه کمپین"},{default:a(()=>[l(R,{value:e.description,"onUpdate:value":t[10]||(t[10]=c=>e.description=c),rows:3},null,8,["value"])]),_:1})]),_:1}),l(s,{xs:24,md:12},{default:a(()=>[l(i,{label:"قوانین و مقررات کمپین"},{default:a(()=>[l(R,{value:e.rules,"onUpdate:value":t[11]||(t[11]=c=>e.rules=c),rows:3},null,8,["value"])]),_:1})]),_:1})]),_:1}),n("div",Ne,[l(r,{type:"primary","html-type":"submit",size:"large",loading:S.value,class:"submit-btn"},{default:a(()=>[C(k(w.value?"ذخیره تغییرات":"ایجاد کمپین و ورود به تعریف جوایز"),1)]),_:1},8,["loading"]),l(r,{size:"large",onClick:t[12]||(t[12]=c=>A(D).push("/campaigns"))},{default:a(()=>[...t[18]||(t[18]=[C("انصراف",-1)])]),_:1})])]),_:1},8,["model"])]),_:1},8,["loading"])}}}),We=H(ze,[["__scopeId","data-v-c11ffb22"]]);export{We as default}; diff --git a/apps/admin/dist/assets/CampaignListView-BT2gPo_J.css b/apps/admin/dist/assets/CampaignListView-BT2gPo_J.css new file mode 100644 index 0000000..7f024ee --- /dev/null +++ b/apps/admin/dist/assets/CampaignListView-BT2gPo_J.css @@ -0,0 +1 @@ +.page-header-title[data-v-9de02d8a]{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:12px}.page-header-title .title[data-v-9de02d8a]{font-size:20px;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.3px}.page-header-title .subtitle[data-v-9de02d8a]{font-size:13px;color:#64748b;margin:4px 0 0}.create-btn[data-v-9de02d8a]{font-weight:600;border-radius:8px;box-shadow:0 2px 4px #4f46e533}.main-card[data-v-9de02d8a]{border-radius:12px;box-shadow:0 1px 3px #0000000a;border:1px solid #f1f5f9}.table-header[data-v-9de02d8a]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;flex-wrap:wrap;gap:12px}.filters[data-v-9de02d8a]{display:flex;gap:12px}.campaign-title[data-v-9de02d8a]{font-weight:600;color:#1e293b;cursor:pointer;transition:color .15s ease}.campaign-title[data-v-9de02d8a]:hover{color:#4f46e5}.slug-badge[data-v-9de02d8a]{background:#f8fafc;border:1px solid #e2e8f0;padding:2px 8px;border-radius:6px;color:#475569;font-size:12px;font-family:monospace}.date-cell[data-v-9de02d8a],.num-cell[data-v-9de02d8a]{color:#334155;font-size:13px}.status-tag[data-v-9de02d8a]{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border-radius:20px;font-weight:500}.status-dot[data-v-9de02d8a]{width:6px;height:6px;border-radius:50%;display:inline-block}.action-more-btn[data-v-9de02d8a]{color:#64748b;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;transition:all .2s ease}.action-more-btn[data-v-9de02d8a]:hover{color:#4f46e5!important;background-color:#eef2ff!important}.dropdown-action-item[data-v-9de02d8a]{display:flex;align-items:center;gap:8px;color:#334155;text-decoration:none;font-size:13px}.dropdown-item-icon[data-v-9de02d8a]{font-size:14px}.text-success[data-v-9de02d8a]{color:#10b981}.text-warning[data-v-9de02d8a]{color:#f59e0b} diff --git a/apps/admin/dist/assets/CampaignListView-CGptQkZU.js b/apps/admin/dist/assets/CampaignListView-CGptQkZU.js new file mode 100644 index 0000000..1a07925 --- /dev/null +++ b/apps/admin/dist/assets/CampaignListView-CGptQkZU.js @@ -0,0 +1 @@ +import{t as D,f as Y}from"./farsi-number-stB7JMN0.js";import{d as Q,l as tt,c,a as i,b as a,w as n,e as s,i as et,n as z,r as m,h as b,g as at,o as r,f as C,D as st,S as nt,t as _,x,G as ot,F as N,y as it,M as lt,H as rt,E as dt,C as ut,B as ct,s as O,J as pt,z as F,_ as mt}from"./index-C4s_T2hP.js";import{P as gt,g as _t,o as yt}from"./clientUrl-KVuNwfzw.js";import{G as Ct}from"./GiftOutlined-DgNzKaks.js";function ft(d){if(!d)return"—";try{const p=new Date(d);if(isNaN(p.getTime()))return"—";const w=p.toLocaleDateString("fa-IR",{year:"numeric",month:"2-digit",day:"2-digit"}),y=p.toLocaleTimeString("fa-IR",{hour:"2-digit",minute:"2-digit"});return D(`${w} - ${y}`)}catch{return"—"}}const kt={PHYSICAL:{text:"فیزیکی",color:"blue"},DISCOUNT_CODE:{text:"کد تخفیف",color:"green"},CREDIT:{text:"اعتبار",color:"purple"},WALLET_CREDIT:{text:"شارژ کیف پول",color:"purple"},CASH:{text:"نقدی",color:"gold"},NO_PRIZE:{text:"پوچ",color:"default"},OTHER:{text:"سایر",color:"cyan"}};function B(d){return kt[d]||{text:d,color:"blue"}}function At(d){switch(d){case"ACTIVE":return{color:"green",dotColor:"#10b981",text:"فعال"};case"PAUSED":return{color:"orange",dotColor:"#f59e0b",text:"متوقف"};case"FINISHED":return{color:"red",dotColor:"#ef4444",text:"پایان‌یافته"};case"DRAFT":return{color:"gold",dotColor:"#d97706",text:"پیش‌نویس"};default:return{color:"default",dotColor:"#94a3b8",text:d}}}function vt(d){var y,I,S,u;const p=Array.isArray(d.data)?d.data:((y=d.data)==null?void 0:y.data)||[],w=((I=d.meta)==null?void 0:I.total)||((u=(S=d.data)==null?void 0:S.meta)==null?void 0:u.total)||p.length;return{items:p,total:w}}const xt={class:"campaign-list-page"},wt={class:"page-header-title"},It={class:"table-header"},St={class:"filters"},ht=["onClick"],Tt={key:1,class:"slug-badge"},Dt={key:4,class:"date-cell"},Et={key:5,class:"date-cell"},Lt={key:0,class:"prize-tags-container"},zt={key:1,class:"text-muted",style:{color:"#94a3b8","font-size":"12px"}},bt={key:7,class:"num-cell"},Nt={key:8,class:"num-cell"},Ot={class:"dropdown-action-item"},Ft={class:"dropdown-action-item"},Rt={class:"dropdown-action-item"},Ut={class:"dropdown-action-item"},$t={class:"dropdown-action-item text-success"},Pt={class:"dropdown-action-item text-warning"},Vt=Q({__name:"CampaignListView",setup(d){const p=et();function w(l){const t=_t(l);console.log("CLICKED WHEEL LINK:",t),yt(l)}const y=b(!1),I=b([]),S=b(0),u=at({page:1,pageSize:10,status:void 0,search:""});async function A(){y.value=!0;try{const l=await z.get("/admin/campaigns",{params:{page:u.page,pageSize:u.pageSize,status:u.status,search:u.search||void 0}}),{items:t,total:f}=vt(l);I.value=t,S.value=f}finally{y.value=!1}}async function H(l){try{await z.post(`/admin/campaigns/${l}/duplicate`),F.success("کمپین و جوایز آن با موفقیت کپی شدند."),A()}catch{}}function G(l){pt.confirm({title:"کپی‌برداری از کمپین",content:`آیا از کپی کردن کمپین «${l.title}» و تمام جوایز آن اطمینان دارید؟`,okText:"بله، کپی کن",cancelText:"انصراف",onOk:()=>H(l.id)})}async function R(l,t){var f,T;try{await z.patch(`/admin/campaigns/${l}`,{status:t}),F.success(t==="ACTIVE"?"کمپین با موفقیت فعال و منتشر شد.":"وضعیت کمپین تغییر یافت."),A()}catch(k){const h=((T=(f=k.response)==null?void 0:f.data)==null?void 0:T.message)||k.message||"خطا در تغییر وضعیت کمپین.";F.error(Array.isArray(h)?h.join(" | "):h)}}const W={CLASSIC:"کلاسیک",CLASSIC_CASINO:"کلاسیک کازینو",NEON:"نئون دیجیتال",NEON_CYBER:"نئون سایبر",MINIMAL:"مینیمال مدرن",MINIMAL_FLAT:"مینیمال فلت",LUXURY:"لاکچری طلایی",LUXURY_GOLD:"لاکچری طلایی",FESTIVAL:"جشنواره‌ای شاد",PLAYFUL_CARTOON:"کارتونی شاد",RUSTIC_WOOD:"چوبی",GALAXY_SPACE:"کهکشانی",CANDY_LAND:"آب‌نباتی",FIRE_FLAME:"آتشین",CRYSTAL_ICE:"یخی"};function U(l){return Array.isArray(l.prizeTypes)&&l.prizeTypes.length?l.prizeTypes:Array.isArray(l.prizes)?Array.from(new Set(l.prizes.map(t=>t.type).filter(Boolean))):[]}const K=[{title:"عنوان کمپین",dataIndex:"title",key:"title"},{title:"اسلاگ (URL)",dataIndex:"slug",key:"slug"},{title:"طرح گردونه",dataIndex:"wheelDesign",key:"wheelDesign"},{title:"وضعیت",dataIndex:"status",key:"status"},{title:"تاریخ و ساعت شروع",dataIndex:"startAt",key:"startAt"},{title:"تاریخ و ساعت پایان",dataIndex:"endAt",key:"endAt"},{title:"نوع جوایز",key:"prizeTypes"},{title:"تعداد جوایز",key:"prizesCount",align:"center"},{title:"تعداد اسپین‌ها",key:"spinsCount",align:"center"},{title:"عملیات",key:"actions",width:70,align:"center"}],E=At,$=ft;return tt(()=>{A()}),(l,t)=>{const f=m("a-button"),T=m("a-input-search"),k=m("a-select-option"),h=m("a-select"),L=m("a-tag"),v=m("a-menu-item"),X=m("a-menu-divider"),q=m("a-menu"),J=m("a-dropdown"),j=m("a-table"),Z=m("a-card");return r(),c("div",xt,[i("div",wt,[t[4]||(t[4]=i("div",null,[i("h1",{class:"title"},"مدیریت کمپین‌ها"),i("p",{class:"subtitle"},"تعریف، پیکربندی و مدیریت رویدادهای گردونه شانس")],-1)),a(f,{type:"primary",size:"middle",class:"create-btn",onClick:t[0]||(t[0]=o=>s(p).push("/campaigns/create"))},{icon:n(()=>[a(s(st))]),default:n(()=>[t[3]||(t[3]=C(" ایجاد کمپین جدید ",-1))]),_:1})]),a(Z,{bordered:!1,class:"main-card"},{default:n(()=>[i("div",It,[i("div",St,[a(T,{value:u.search,"onUpdate:value":t[1]||(t[1]=o=>u.search=o),placeholder:"جستجوی عنوان یا اسلاگ...",style:{width:"270px"},allowClear:"",onSearch:A},{prefix:n(()=>[a(s(nt),{style:{color:"#94a3b8","margin-left":"4px"}})]),_:1},8,["value"]),a(h,{value:u.status,"onUpdate:value":t[2]||(t[2]=o=>u.status=o),placeholder:"فیلتر وضعیت",allowClear:"",style:{width:"150px"},onChange:A},{default:n(()=>[a(k,{value:"DRAFT"},{default:n(()=>[...t[5]||(t[5]=[C("پیش‌نویس",-1)])]),_:1}),a(k,{value:"ACTIVE"},{default:n(()=>[...t[6]||(t[6]=[C("فعال",-1)])]),_:1}),a(k,{value:"PAUSED"},{default:n(()=>[...t[7]||(t[7]=[C("متوقف",-1)])]),_:1}),a(k,{value:"FINISHED"},{default:n(()=>[...t[8]||(t[8]=[C("پایان‌یافته",-1)])]),_:1})]),_:1},8,["value"])])]),a(j,{dataSource:I.value,columns:K,loading:y.value,rowKey:"id",size:"middle",pagination:{current:u.page,pageSize:u.pageSize,total:S.value,showTotal:o=>`مجموع: ${s(D)(o)} کمپین`,onChange:o=>{u.page=o,A()}}},{bodyCell:n(({column:o,record:e})=>{var P,V,M;return[o.key==="title"?(r(),c("span",{key:0,class:"campaign-title",onClick:g=>s(p).push(`/campaigns/${e.id}/edit`)},_(e.title),9,ht)):o.key==="slug"?(r(),c("code",Tt,_(e.slug),1)):o.key==="wheelDesign"?(r(),x(L,{key:2,color:"purple",style:{"border-radius":"6px"}},{default:n(()=>[C(_(W[e.wheelDesign]||e.wheelDesign),1)]),_:2},1024)):o.key==="status"?(r(),x(L,{key:3,color:s(E)(e.status).color,class:"status-tag"},{default:n(()=>[i("span",{class:"status-dot",style:ot({backgroundColor:s(E)(e.status).dotColor})},null,4),C(" "+_(s(E)(e.status).text),1)]),_:2},1032,["color"])):o.key==="startAt"?(r(),c("span",Dt,_(e.startAtFormatted?s(D)(e.startAtFormatted):s($)(e.startAt)),1)):o.key==="endAt"?(r(),c("span",Et,_(e.endAtFormatted?s(D)(e.endAtFormatted):s($)(e.endAt)),1)):o.key==="prizeTypes"?(r(),c(N,{key:6},[U(e).length?(r(),c("div",Lt,[(r(!0),c(N,null,it(U(e),g=>(r(),x(L,{key:g,color:s(B)(g).color,style:{margin:"2px","border-radius":"4px","font-size":"11px"}},{default:n(()=>[C(_(s(B)(g).text),1)]),_:2},1032,["color"]))),128))])):(r(),c("span",zt,"تعریف‌نشده"))],64)):o.key==="prizesCount"?(r(),c("span",bt,_(s(Y)(((P=e._count)==null?void 0:P.prizes)??(((V=e.prizes)==null?void 0:V.length)||0))),1)):o.key==="spinsCount"?(r(),c("span",Nt,_(s(Y)(((M=e._count)==null?void 0:M.spins)??0)),1)):o.key==="actions"?(r(),x(J,{key:9,trigger:["click"],placement:"bottomLeft"},{overlay:n(()=>[a(q,{class:"action-dropdown-menu"},{default:n(()=>[a(v,{key:"view",onClick:g=>w(e.slug)},{default:n(()=>[i("div",Ot,[a(s(rt),{class:"dropdown-item-icon"}),t[9]||(t[9]=i("span",null,"مشاهده گردونه",-1))])]),_:1},8,["onClick"]),a(v,{key:"edit",onClick:g=>s(p).push(`/campaigns/${e.id}/edit`)},{default:n(()=>[i("div",Ft,[a(s(dt),{class:"dropdown-item-icon"}),t[10]||(t[10]=i("span",null,"ویرایش اطلاعات",-1))])]),_:1},8,["onClick"]),a(v,{key:"prizes",onClick:g=>s(p).push(`/campaigns/${e.id}/prizes`)},{default:n(()=>[i("div",Rt,[a(s(Ct),{class:"dropdown-item-icon"}),t[11]||(t[11]=i("span",null,"مدیریت جوایز",-1))])]),_:1},8,["onClick"]),a(v,{key:"duplicate",onClick:g=>G(e)},{default:n(()=>[i("div",Ut,[a(s(ut),{class:"dropdown-item-icon"}),t[12]||(t[12]=i("span",null,"کپی‌برداری",-1))])]),_:1},8,["onClick"]),e.status==="DRAFT"||e.status==="ACTIVE"||e.status==="PAUSED"?(r(),c(N,{key:0},[a(X),e.status==="DRAFT"||e.status==="PAUSED"?(r(),x(v,{key:"activate",onClick:g=>R(e.id,"ACTIVE")},{default:n(()=>[i("div",$t,[a(s(ct),{class:"dropdown-item-icon"}),t[13]||(t[13]=i("span",null,"فعال‌سازی و انتشار",-1))])]),_:1},8,["onClick"])):e.status==="ACTIVE"?(r(),x(v,{key:"pause",onClick:g=>R(e.id,"PAUSED")},{default:n(()=>[i("div",Pt,[a(s(gt),{class:"dropdown-item-icon"}),t[14]||(t[14]=i("span",null,"توقف موقت",-1))])]),_:1},8,["onClick"])):O("",!0)],64)):O("",!0)]),_:2},1024)]),default:n(()=>[a(f,{type:"text",shape:"circle",class:"action-more-btn",title:"عملیات"},{default:n(()=>[a(s(lt),{style:{"font-size":"18px"}})]),_:1})]),_:2},1024)):O("",!0)]}),_:1},8,["dataSource","loading","pagination"])]),_:1})])}}}),Gt=mt(Vt,[["__scopeId","data-v-9de02d8a"]]);export{Gt as default}; diff --git a/apps/admin/dist/assets/DashboardView-BSKs-P5X.js b/apps/admin/dist/assets/DashboardView-BSKs-P5X.js new file mode 100644 index 0000000..a8245fb --- /dev/null +++ b/apps/admin/dist/assets/DashboardView-BSKs-P5X.js @@ -0,0 +1,7 @@ +import{d as yt,l as gt,m as kt,c as m,a as s,k as xt,b as e,w as a,e as i,f as p,i as ht,h as N,n as wt,p as Ct,r as w,o as u,R as j,T as J,L as St,U as Q,t as c,P as tt,q as Dt,v as At,s as z,x as I,A as st,F as et,y as zt,C as Rt,z as Lt,B as Nt,E as Ot,_ as Et}from"./index-C4s_T2hP.js";import{t as g,f as b}from"./farsi-number-stB7JMN0.js";import{i as at,L as it,A as ot,P as It}from"./index-CbZGMCSS.js";import{T as Tt}from"./ThunderboltOutlined-DP1eBOSO.js";import{P as lt}from"./PlusCircleOutlined-DvvDmI1x.js";import{T as Ft}from"./TeamOutlined-Cc_Yyb--.js";import{G as nt}from"./GiftOutlined-DgNzKaks.js";const $t={class:"dashboard-page"},Pt={class:"page-header-title"},Ut={class:"header-actions"},Bt={class:"quick-actions-bar"},Wt={class:"quick-actions-label"},Vt={class:"quick-actions-list"},Gt={class:"kpi-card-inner"},Mt={class:"kpi-top"},Yt={class:"kpi-icon-box icon-indigo"},qt={class:"kpi-value"},Ht={class:"kpi-sub"},Xt={class:"growth-tag tag-green"},Kt={class:"kpi-card-inner"},Zt={class:"kpi-top"},jt={class:"kpi-icon-box icon-amber"},Jt={class:"kpi-value"},Qt={class:"kpi-sub"},ts={class:"growth-tag tag-amber"},ss={class:"kpi-card-inner"},es={class:"kpi-top"},as={class:"kpi-icon-box icon-emerald"},is={class:"kpi-value"},os={class:"kpi-card-inner"},ls={class:"kpi-top"},ns={class:"kpi-icon-box icon-violet"},ds={class:"kpi-value"},rs={class:"kpi-card-inner"},cs={class:"kpi-top"},ps={class:"kpi-icon-box icon-rose"},us={class:"kpi-value"},fs={class:"kpi-card-inner"},vs={class:"kpi-top"},_s={class:"kpi-icon-box icon-sky"},ms={class:"kpi-value"},bs={key:0,class:"empty-chart-wrap"},ys={class:"section-container",style:{"margin-top":"24px"}},gs={class:"section-header-row"},ks={class:"section-title-wrap"},xs={key:0,class:"badge-count"},hs={key:0},ws={class:"camp-top"},Cs=["title"],Ss={class:"camp-dates"},Ds={class:"date-row"},As={class:"date-val"},zs={class:"date-row"},Rs={class:"date-val"},Ls={class:"camp-metrics"},Ns={class:"metric-item"},Os={class:"metric-val"},Es={class:"metric-item"},Is={class:"metric-val"},Ts={class:"metric-item"},Fs={class:"metric-val"},$s={class:"camp-actions"},Ps={key:1,class:"empty-campaigns-card"},Us={class:"empty-inner"},Bs={class:"section-container",style:{"margin-top":"24px"}},Ws={class:"section-header-row"},Vs={class:"section-title-wrap"},Gs={key:0,class:"badge-count"},Ms={key:0,class:"user-cell"},Ys={class:"user-avatar"},qs={class:"user-info"},Hs={class:"user-mobile"},Xs={key:0,class:"user-name"},Ks={key:1,class:"campaign-cell-title"},Zs={key:2,class:"prize-cell"},js={class:"prize-title-text"},Js={key:0,class:"code-wrapper"},Qs={class:"code-badge"},te={key:1,class:"text-muted"},se={key:5,class:"date-cell"},ee=yt({__name:"DashboardView",setup(ae){const h=ht(),L=N(!0),r=N(null),O=N(null),E=N(null);let k=null,x=null;async function T(){L.value=!0;try{const y=await wt.get("/admin/reports/dashboard");r.value=y.data,await Ct(),dt()}catch(y){console.error("Failed to load dashboard data:",y)}finally{L.value=!1}}function dt(){rt(),ct()}function rt(){var f;if(!O.value||!((f=r.value)!=null&&f.spinsByDay))return;k&&k.dispose(),k=at(O.value);const y=r.value.spinsByDay.map(n=>g(n.date)),t=r.value.spinsByDay.map(n=>n.spins),_=r.value.spinsByDay.map(n=>n.winners);k.setOption({textStyle:{fontFamily:'IRANSans, "IRANSansWeb(FaNum)", Tahoma, sans-serif'},tooltip:{trigger:"axis",backgroundColor:"rgba(15, 23, 42, 0.92)",borderColor:"#334155",textStyle:{color:"#ffffff",fontFamily:"IRANSans"},valueFormatter:n=>b(n)+" مورد"},legend:{data:["تعداد چرخش‌ها","تعداد برندگان"],textStyle:{fontFamily:"IRANSans",color:"#475569"},top:6,left:"center"},grid:{left:"4%",right:"4%",bottom:"6%",top:"16%",containLabel:!0},xAxis:{type:"category",boundaryGap:!1,data:y,axisLabel:{fontFamily:"IRANSans",color:"#64748b",formatter:n=>g(n)},axisLine:{lineStyle:{color:"#cbd5e1"}}},yAxis:{type:"value",axisLabel:{fontFamily:"IRANSans",color:"#64748b",formatter:n=>b(n)},splitLine:{lineStyle:{color:"#f1f5f9",type:"dashed"}}},series:[{name:"تعداد چرخش‌ها",type:"line",smooth:!0,data:t,itemStyle:{color:"#4f46e5"},lineStyle:{width:3},areaStyle:{color:new it(0,0,0,1,[{offset:0,color:"rgba(79, 70, 229, 0.3)"},{offset:1,color:"rgba(79, 70, 229, 0.01)"}])}},{name:"تعداد برندگان",type:"line",smooth:!0,data:_,itemStyle:{color:"#10b981"},lineStyle:{width:3},areaStyle:{color:new it(0,0,0,1,[{offset:0,color:"rgba(16, 185, 129, 0.3)"},{offset:1,color:"rgba(16, 185, 129, 0.01)"}])}}]})}function ct(){var f;if(!E.value)return;x&&x.dispose();const y=((f=r.value)==null?void 0:f.prizeDistribution)||[];if(y.length===0)return;x=at(E.value);const t=["#4f46e5","#10b981","#f59e0b","#06b6d4","#ec4899","#8b5cf6","#3b82f6","#14b8a6","#f43f5e"],_=y.map(n=>({name:n.prizeTitle,value:n.count,percentage:n.percentage}));x.setOption({textStyle:{fontFamily:'IRANSans, "IRANSansWeb(FaNum)", Tahoma, sans-serif'},color:t,tooltip:{trigger:"item",backgroundColor:"rgba(15, 23, 42, 0.92)",borderColor:"#334155",textStyle:{color:"#ffffff",fontFamily:"IRANSans"},formatter:n=>{const R=b(n.value),C=g(n.percent);return` +
+
${n.name}
+
تعداد: ${R} (${C}٪)
+
+ `}},legend:{orient:"horizontal",bottom:0,textStyle:{fontFamily:"IRANSans",color:"#475569",fontSize:11},itemWidth:10,itemHeight:10},series:[{name:"توزیع جوایز",type:"pie",radius:["45%","72%"],center:["50%","45%"],avoidLabelOverlap:!0,itemStyle:{borderRadius:6,borderColor:"#fff",borderWidth:2},label:{show:!1,position:"center"},emphasis:{label:{show:!0,fontSize:14,fontWeight:"bold",fontFamily:"IRANSans",formatter:n=>`${g(n.percent)}٪ +${n.name}`},itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.15)"}},data:_}]})}function pt(y){y&&(navigator.clipboard.writeText(y),Lt.success("کد جایزه در حافظه کپی شد"))}const F={NEW:{text:"جدید",color:"blue"},PENDING:{text:"در انتظار",color:"warning"},CONTACTED:{text:"تماس گرفته‌شده",color:"cyan"},DELIVERED:{text:"تحویل داده شده",color:"success"},ACTIVE_CODE:{text:"کد فعال",color:"purple"},USED:{text:"استفاده شده",color:"green"},CANCELLED:{text:"لغو شده",color:"error"},EXPIRED:{text:"منقضی شده",color:"default"}},$={PHYSICAL:{text:"کالای فیزیکی",color:"blue"},DISCOUNT_CODE:{text:"کد تخفیف",color:"purple"},CREDIT:{text:"اعتبار",color:"cyan"},CASH:{text:"نقدی",color:"gold"},NO_PRIZE:{text:"پوچ",color:"default"},OTHER:{text:"سایر",color:"default"}},ut={CLASSIC_CASINO:"کازینویی کلاسیک",NEON_CYBER:"نئونی سایبر",MINIMAL_FLAT:"مینیمال فلت",LUXURY_GOLD:"طلایی لوکس",PLAYFUL_CARTOON:"کارتونی فانتزی",RUSTIC_WOOD:"چوبی",GALAXY_SPACE:"کهکشانی",CANDY_LAND:"آب‌نباتی",FIRE_FLAME:"آتشین",CRYSTAL_ICE:"یخی"},ft=[{title:"کاربر برنده",key:"user",width:"22%"},{title:"کمپین",dataIndex:["campaign","title"],key:"campaign",width:"18%"},{title:"جایزه برنده شده",key:"prize",width:"22%"},{title:"کد رهگیری / جایزه",key:"code",width:"15%"},{title:"وضعیت",dataIndex:"status",key:"status",width:"11%"},{title:"زمان برد",dataIndex:"wonAt",key:"wonAt",width:"12%"}];function P(){k==null||k.resize(),x==null||x.resize()}return gt(()=>{T(),window.addEventListener("resize",P)}),kt(()=>{window.removeEventListener("resize",P),k==null||k.dispose(),x==null||x.dispose()}),(y,t)=>{const _=w("a-button"),f=w("a-card"),n=w("a-col"),R=w("a-row"),C=w("a-tag"),vt=w("a-empty"),_t=w("a-tooltip"),mt=w("a-table"),bt=w("a-spin");return u(),m("div",$t,[s("div",Pt,[t[8]||(t[8]=xt('

داشبورد مدیریت و مانیتورینگ

سامانه فعال و آنلاین

نمای جامع فعالیت کاربران، ترافیک چرخش‌ها، وضعیت برندگان و کمپین‌های جاری

',1)),s("div",Ut,[e(_,{type:"primary",ghost:"",onClick:T,loading:L.value,class:"refresh-btn"},{icon:a(()=>[e(i(j))]),default:a(()=>[t[7]||(t[7]=p(" بروزرسانی داده‌ها ",-1))]),_:1},8,["loading"])])]),s("div",Bt,[s("div",Wt,[e(i(Tt),{style:{color:"#4f46e5","margin-left":"6px"}}),t[9]||(t[9]=p(" دسترسی‌های سریع: ",-1))]),s("div",Vt,[e(_,{type:"primary",class:"action-btn action-primary",onClick:t[0]||(t[0]=D=>i(h).push("/campaigns/create"))},{icon:a(()=>[e(i(lt))]),default:a(()=>[t[10]||(t[10]=p(" تعریف کمپین جدید ",-1))]),_:1}),e(_,{class:"action-btn",onClick:t[1]||(t[1]=D=>i(h).push("/users"))},{icon:a(()=>[e(i(Ft))]),default:a(()=>[t[11]||(t[11]=p(" مدیریت کاربران ",-1))]),_:1}),e(_,{class:"action-btn",onClick:t[2]||(t[2]=D=>i(h).push("/winners"))},{icon:a(()=>[e(i(J))]),default:a(()=>[t[12]||(t[12]=p(" مدیریت برندگان و هدایا ",-1))]),_:1}),e(_,{class:"action-btn",onClick:t[3]||(t[3]=D=>i(h).push("/reports"))},{icon:a(()=>[e(i(St))]),default:a(()=>[t[13]||(t[13]=p(" گزارش‌های تحلیلی و اکسل ",-1))]),_:1})])]),e(bt,{spinning:L.value},{default:a(()=>{var D,U,B,W,V,G;return[e(R,{gutter:[16,16],class:"kpi-row"},{default:a(()=>[e(n,{xs:24,sm:12,md:8,xl:4},{default:a(()=>[e(f,{bordered:!1,class:"kpi-card card-indigo"},{default:a(()=>{var o,l,d,v;return[s("div",Gt,[s("div",Mt,[t[14]||(t[14]=s("span",{class:"kpi-label"},"کل کاربران",-1)),s("div",Yt,[e(i(Q))])]),s("div",qt,c(i(b)(((l=(o=r.value)==null?void 0:o.stats)==null?void 0:l.totalUsers)||0)),1),s("div",Ht,[s("span",Xt,[e(i(ot),{style:{"font-size":"10px","margin-left":"2px"}}),p(" +"+c(i(b)(((v=(d=r.value)==null?void 0:d.stats)==null?void 0:v.todayUsers)||0)),1)]),t[15]||(t[15]=s("span",{class:"sub-text"},"امروز",-1))])])]}),_:1})]),_:1}),e(n,{xs:24,sm:12,md:8,xl:4},{default:a(()=>[e(f,{bordered:!1,class:"kpi-card card-amber"},{default:a(()=>{var o,l,d,v;return[s("div",Kt,[s("div",Zt,[t[16]||(t[16]=s("span",{class:"kpi-label"},"کل چرخش‌ها (Spins)",-1)),s("div",jt,[e(i(j))])]),s("div",Jt,c(i(b)(((l=(o=r.value)==null?void 0:o.stats)==null?void 0:l.totalSpins)||0)),1),s("div",Qt,[s("span",ts,[e(i(ot),{style:{"font-size":"10px","margin-left":"2px"}}),p(" +"+c(i(b)(((v=(d=r.value)==null?void 0:d.stats)==null?void 0:v.todaySpins)||0)),1)]),t[17]||(t[17]=s("span",{class:"sub-text"},"امروز",-1))])])]}),_:1})]),_:1}),e(n,{xs:24,sm:12,md:8,xl:4},{default:a(()=>[e(f,{bordered:!1,class:"kpi-card card-emerald"},{default:a(()=>{var o,l;return[s("div",ss,[s("div",es,[t[18]||(t[18]=s("span",{class:"kpi-label"},"کل برندگان",-1)),s("div",as,[e(i(J))])]),s("div",is,c(i(b)(((l=(o=r.value)==null?void 0:o.stats)==null?void 0:l.totalWinners)||0)),1),t[19]||(t[19]=s("div",{class:"kpi-sub"},[s("span",{class:"sub-text text-highlight"},"مجموع برندگان ثبت‌شده")],-1))])]}),_:1})]),_:1}),e(n,{xs:24,sm:12,md:8,xl:4},{default:a(()=>[e(f,{bordered:!1,class:"kpi-card card-violet"},{default:a(()=>{var o,l;return[s("div",os,[s("div",ls,[t[20]||(t[20]=s("span",{class:"kpi-label"},"نرخ برد گردونه",-1)),s("div",ns,[e(i(It))])]),s("div",ds,c(i(g)(((l=(o=r.value)==null?void 0:o.stats)==null?void 0:l.winRate)??0))+"٪",1),t[21]||(t[21]=s("div",{class:"kpi-sub"},[s("span",{class:"sub-text"},"نسبت جوایز به چرخش‌ها")],-1))])]}),_:1})]),_:1}),e(n,{xs:24,sm:12,md:8,xl:4},{default:a(()=>[e(f,{bordered:!1,class:"kpi-card card-rose"},{default:a(()=>{var o,l,d,v;return[s("div",rs,[s("div",cs,[t[22]||(t[22]=s("span",{class:"kpi-label"},"کمپین‌های فعال",-1)),s("div",ps,[e(i(tt))])]),s("div",us,c(i(b)(((l=(o=r.value)==null?void 0:o.stats)==null?void 0:l.activeCampaignsCount)??((v=(d=r.value)==null?void 0:d.activeCampaigns)==null?void 0:v.length)??0)),1),t[23]||(t[23]=s("div",{class:"kpi-sub"},[s("span",{class:"sub-text text-highlight"},"گردونه‌های در حال اجرا")],-1))])]}),_:1})]),_:1}),e(n,{xs:24,sm:12,md:8,xl:4},{default:a(()=>[e(f,{bordered:!1,class:"kpi-card card-sky"},{default:a(()=>{var o,l;return[s("div",fs,[s("div",vs,[t[24]||(t[24]=s("span",{class:"kpi-label"},"جوایز تحویل/مصرف",-1)),s("div",_s,[e(i(nt))])]),s("div",ms,c(i(b)(((l=(o=r.value)==null?void 0:o.stats)==null?void 0:l.totalDistributedPrizes)||0)),1),t[25]||(t[25]=s("div",{class:"kpi-sub"},[s("span",{class:"sub-text"},"فرآیند اهدا تکمیل‌شده")],-1))])]}),_:1})]),_:1})]),_:1}),e(R,{gutter:[16,16],class:"charts-row"},{default:a(()=>[e(n,{xs:24,lg:15},{default:a(()=>[e(f,{title:"روند چرخش‌ها و برندگان (۱۴ روز گذشته)",bordered:!1,class:"section-card"},{extra:a(()=>[...t[26]||(t[26]=[s("span",{class:"chart-legend-badge"},"تحلیل لحظه‌ای روزانه",-1)])]),default:a(()=>[s("div",{ref_key:"lineChartRef",ref:O,style:{height:"340px",width:"100%"}},null,512)]),_:1})]),_:1}),e(n,{xs:24,lg:9},{default:a(()=>[e(f,{title:"توزیع جوایز برنده شده",bordered:!1,class:"section-card"},{extra:a(()=>{var o,l;return[(l=(o=r.value)==null?void 0:o.prizeDistribution)!=null&&l.length?(u(),I(C,{key:0,color:"blue"},{default:a(()=>[p(c(i(g)(r.value.prizeDistribution.length))+" نوع جایزه ",1)]),_:1})):z("",!0)]}),default:a(()=>{var o,l,d,v,S;return[Dt(s("div",{ref_key:"donutChartRef",ref:E,style:{height:"340px",width:"100%"}},null,512),[[At,((l=(o=r.value)==null?void 0:o.prizeDistribution)==null?void 0:l.length)>0]]),!((d=r.value)!=null&&d.prizeDistribution)||((S=(v=r.value)==null?void 0:v.prizeDistribution)==null?void 0:S.length)===0?(u(),m("div",bs,[e(vt,{description:"هنوز جایزه‌ای توزیع نشده است"})])):z("",!0)]}),_:1})]),_:1})]),_:1}),s("div",ys,[s("div",gs,[s("div",ks,[t[27]||(t[27]=s("h2",{class:"section-title"},"کمپین‌های در حال برگزاری",-1)),(U=(D=r.value)==null?void 0:D.activeCampaigns)!=null&&U.length?(u(),m("span",xs,c(i(g)(r.value.activeCampaigns.length))+" فعال ",1)):z("",!0)]),e(_,{type:"link",onClick:t[4]||(t[4]=o=>i(h).push("/campaigns")),class:"view-all-link"},{default:a(()=>[t[28]||(t[28]=p(" مشاهده همه کمپین‌ها ",-1)),e(i(st))]),_:1})]),((W=(B=r.value)==null?void 0:B.activeCampaigns)==null?void 0:W.length)>0?(u(),m("div",hs,[e(R,{gutter:[16,16]},{default:a(()=>[(u(!0),m(et,null,zt(r.value.activeCampaigns,o=>(u(),I(n,{key:o.id,xs:24,sm:12,xl:6},{default:a(()=>[e(f,{bordered:!1,class:"campaign-card"},{default:a(()=>{var l,d,v;return[s("div",ws,[e(C,{color:"success",class:"status-tag"},{default:a(()=>[e(i(Nt)),t[29]||(t[29]=p(" فعال ",-1))]),_:1}),e(C,{color:"purple",class:"design-tag"},{default:a(()=>[p(c(ut[o.wheelDesign]||o.wheelDesign),1)]),_:2},1024)]),s("h3",{class:"camp-title",title:o.title},c(o.title),9,Cs),s("div",Ss,[s("div",Ds,[t[30]||(t[30]=s("span",{class:"date-label"},"شروع:",-1)),s("span",As,c(i(g)(new Date(o.startAt).toLocaleDateString("fa-IR"))),1)]),s("div",zs,[t[31]||(t[31]=s("span",{class:"date-label"},"پایان:",-1)),s("span",Rs,c(i(g)(new Date(o.endAt).toLocaleDateString("fa-IR"))),1)])]),s("div",Ls,[s("div",Ns,[s("span",Os,c(i(b)(((l=o._count)==null?void 0:l.spins)||0)),1),t[32]||(t[32]=s("span",{class:"metric-lbl"},"چرخش",-1))]),t[35]||(t[35]=s("div",{class:"metric-divider"},null,-1)),s("div",Es,[s("span",Is,c(i(b)(((d=o._count)==null?void 0:d.userPrizes)||0)),1),t[33]||(t[33]=s("span",{class:"metric-lbl"},"برنده",-1))]),t[36]||(t[36]=s("div",{class:"metric-divider"},null,-1)),s("div",Ts,[s("span",Fs,c(i(b)(((v=o._count)==null?void 0:v.prizes)||0)),1),t[34]||(t[34]=s("span",{class:"metric-lbl"},"جایزه",-1))])]),s("div",$s,[e(_,{type:"primary",ghost:"",size:"small",class:"camp-btn",onClick:S=>i(h).push(`/campaigns/${o.id}/edit`)},{icon:a(()=>[e(i(Ot))]),default:a(()=>[t[37]||(t[37]=p(" ویرایش ",-1))]),_:1},8,["onClick"]),e(_,{size:"small",class:"camp-btn",onClick:S=>i(h).push(`/campaigns/${o.id}/prizes`)},{icon:a(()=>[e(i(nt))]),default:a(()=>[t[38]||(t[38]=p(" جوایز ",-1))]),_:1},8,["onClick"])])]}),_:2},1024)]),_:2},1024))),128))]),_:1})])):(u(),m("div",Ps,[e(f,{bordered:!1,class:"section-card empty-card"},{default:a(()=>[s("div",Us,[e(i(tt),{style:{"font-size":"38px",color:"#94a3b8","margin-bottom":"12px"}}),t[40]||(t[40]=s("div",{class:"empty-text"},"در حال حاضر هیچ کمپین فعالی وجود ندارد.",-1)),e(_,{type:"primary",onClick:t[5]||(t[5]=o=>i(h).push("/campaigns/create")),style:{"margin-top":"14px"}},{icon:a(()=>[e(i(lt))]),default:a(()=>[t[39]||(t[39]=p(" ایجاد اولین کمپین ",-1))]),_:1})])]),_:1})]))]),s("div",Bs,[s("div",Ws,[s("div",Vs,[t[41]||(t[41]=s("h2",{class:"section-title"},"آخرین برندگان گردونه",-1)),(G=(V=r.value)==null?void 0:V.recentWinners)!=null&&G.length?(u(),m("span",Gs,c(i(g)(r.value.recentWinners.length))+" برنده اخیر ",1)):z("",!0)]),e(_,{type:"link",onClick:t[6]||(t[6]=o=>i(h).push("/winners")),class:"view-all-link"},{default:a(()=>[t[42]||(t[42]=p(" مشاهده تمام برندگان و هدایا ",-1)),e(i(st))]),_:1})]),e(f,{bordered:!1,class:"section-card table-card"},{default:a(()=>{var o;return[e(mt,{dataSource:((o=r.value)==null?void 0:o.recentWinners)||[],columns:ft,pagination:!1,rowKey:"id",size:"middle"},{bodyCell:a(({column:l,record:d})=>{var v,S,M,Y,q,H,X;return[l.key==="user"?(u(),m("div",Ms,[s("div",Ys,[e(i(Q))]),s("div",qs,[s("span",Hs,c(i(g)((v=d.user)==null?void 0:v.mobile)),1),(S=d.user)!=null&&S.name?(u(),m("span",Xs,c(d.user.name),1)):z("",!0)])])):l.key==="campaign"?(u(),m("span",Ks,c(((M=d.campaign)==null?void 0:M.title)||"—"),1)):l.key==="prize"?(u(),m("div",Zs,[e(C,{color:((q=$[(Y=d.prize)==null?void 0:Y.type])==null?void 0:q.color)||"default",size:"small",class:"prize-type-tag"},{default:a(()=>{var A,K,Z;return[p(c(((K=$[(A=d.prize)==null?void 0:A.type])==null?void 0:K.text)||((Z=d.prize)==null?void 0:Z.type)),1)]}),_:2},1032,["color"]),s("span",js,c((H=d.prize)==null?void 0:H.title),1)])):l.key==="code"?(u(),m(et,{key:3},[d.code?(u(),m("div",Js,[s("span",Qs,c(d.code),1),e(_t,{title:"کپی کد"},{default:a(()=>[e(_,{type:"text",size:"small",class:"copy-btn",onClick:A=>pt(d.code)},{default:a(()=>[e(i(Rt))]),_:1},8,["onClick"])]),_:2},1024)])):(u(),m("span",te,"—"))],64)):l.key==="status"?(u(),I(C,{key:4,color:((X=F[d.status])==null?void 0:X.color)||"default",class:"status-badge"},{default:a(()=>{var A;return[p(c(((A=F[d.status])==null?void 0:A.text)||d.status),1)]}),_:2},1032,["color"])):l.key==="wonAt"?(u(),m("span",se,c(i(g)(new Date(d.wonAt).toLocaleString("fa-IR",{dateStyle:"short",timeStyle:"short"}))),1)):z("",!0)]}),_:1},8,["dataSource"])]}),_:1})])]}),_:1},8,["spinning"])])}}}),pe=Et(ee,[["__scopeId","data-v-a3028098"]]);export{pe as default}; diff --git a/apps/admin/dist/assets/DashboardView-qYZpW8qt.css b/apps/admin/dist/assets/DashboardView-qYZpW8qt.css new file mode 100644 index 0000000..8df2810 --- /dev/null +++ b/apps/admin/dist/assets/DashboardView-qYZpW8qt.css @@ -0,0 +1 @@ +.dashboard-page[data-v-a3028098]{padding-bottom:24px}.page-header-title[data-v-a3028098]{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;flex-wrap:wrap;gap:12px}.title-row[data-v-a3028098]{display:flex;align-items:center;gap:12px}.page-header-title .title[data-v-a3028098]{font-size:22px;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.4px}.live-badge[data-v-a3028098]{display:inline-flex;align-items:center;gap:6px;background:#ecfdf5;color:#059669;border:1px solid #a7f3d0;padding:3px 10px;border-radius:20px;font-size:12px;font-weight:600}.pulse-dot[data-v-a3028098]{width:7px;height:7px;border-radius:50%;background:#10b981;box-shadow:0 0 #10b981b3;animation:pulse-animation-a3028098 1.8s infinite}@keyframes pulse-animation-a3028098{0%{box-shadow:0 0 #10b981b3}70%{box-shadow:0 0 0 6px #10b98100}to{box-shadow:0 0 #10b98100}}.page-header-title .subtitle[data-v-a3028098]{font-size:13px;color:#64748b;margin:6px 0 0}.refresh-btn[data-v-a3028098]{border-radius:8px;font-weight:500;height:38px}.quick-actions-bar[data-v-a3028098]{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:10px 16px;margin-bottom:20px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;box-shadow:0 1px 2px #00000005}.quick-actions-label[data-v-a3028098]{font-size:13px;font-weight:600;color:#334155;display:flex;align-items:center}.quick-actions-list[data-v-a3028098]{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.action-btn[data-v-a3028098]{border-radius:8px;font-size:13px;height:34px;display:inline-flex;align-items:center;transition:all .2s}.action-btn[data-v-a3028098]:hover{transform:translateY(-1px)}.action-primary[data-v-a3028098]{background:#4f46e5!important;border-color:#4f46e5!important;box-shadow:0 2px 6px #4f46e540}.kpi-row[data-v-a3028098]{margin-bottom:4px}.kpi-card[data-v-a3028098]{border-radius:12px;box-shadow:0 1px 3px #0000000a;transition:all .25s ease;border:1px solid #f1f5f9;height:100%}.kpi-card[data-v-a3028098] .ant-card-body{padding:18px 16px}.kpi-card[data-v-a3028098]:hover{transform:translateY(-2px);box-shadow:0 8px 20px #0000000f}.kpi-card-inner[data-v-a3028098]{display:flex;flex-direction:column}.kpi-top[data-v-a3028098]{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.kpi-label[data-v-a3028098]{font-size:12px;color:#64748b;font-weight:600}.kpi-icon-box[data-v-a3028098]{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0}.icon-indigo[data-v-a3028098]{background:#eef2ff;color:#4f46e5}.icon-amber[data-v-a3028098]{background:#fffbeb;color:#d97706}.icon-emerald[data-v-a3028098]{background:#ecfdf5;color:#059669}.icon-violet[data-v-a3028098]{background:#f5f3ff;color:#7c3aed}.icon-rose[data-v-a3028098]{background:#fff1f2;color:#e11d48}.icon-sky[data-v-a3028098]{background:#f0f9ff;color:#0284c7}.kpi-value[data-v-a3028098]{font-size:24px;font-weight:700;color:#0f172a;line-height:1.2;margin-bottom:8px;letter-spacing:-.5px}.kpi-sub[data-v-a3028098]{display:flex;align-items:center;gap:6px;font-size:12px}.growth-tag[data-v-a3028098]{display:inline-flex;align-items:center;padding:1px 6px;border-radius:4px;font-size:11px;font-weight:600}.tag-green[data-v-a3028098]{background:#dcfce7;color:#15803d}.tag-amber[data-v-a3028098]{background:#fef3c7;color:#b45309}.sub-text[data-v-a3028098]{color:#94a3b8;font-size:11px}.text-highlight[data-v-a3028098]{color:#475569}.charts-row[data-v-a3028098]{margin-top:16px}.section-card[data-v-a3028098]{border-radius:12px;box-shadow:0 1px 3px #0000000a;border:1px solid #f1f5f9;height:100%}.section-card[data-v-a3028098] .ant-card-head{border-bottom:1px solid #f1f5f9;padding:0 20px;min-height:52px}.section-card[data-v-a3028098] .ant-card-head-title{font-size:14px;font-weight:600;color:#1e293b}.chart-legend-badge[data-v-a3028098]{font-size:12px;color:#64748b;background:#f8fafc;padding:3px 8px;border-radius:6px;border:1px solid #e2e8f0}.empty-chart-wrap[data-v-a3028098]{height:340px;display:flex;align-items:center;justify-content:center}.section-container[data-v-a3028098]{margin-top:24px}.section-header-row[data-v-a3028098]{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.section-title-wrap[data-v-a3028098]{display:flex;align-items:center;gap:10px}.section-title[data-v-a3028098]{font-size:16px;font-weight:700;color:#1e293b;margin:0}.badge-count[data-v-a3028098]{background:#eef2ff;color:#4f46e5;font-size:11px;font-weight:600;padding:2px 8px;border-radius:12px;border:1px solid #c7d2fe}.view-all-link[data-v-a3028098]{font-size:13px;font-weight:500;display:inline-flex;align-items:center;gap:4px;padding:0}.campaign-card[data-v-a3028098]{border-radius:12px;border:1px solid #f1f5f9;box-shadow:0 1px 3px #0000000a;transition:all .2s ease;height:100%}.campaign-card[data-v-a3028098]:hover{transform:translateY(-2px);box-shadow:0 6px 16px #0000000f;border-color:#cbd5e1}.campaign-card[data-v-a3028098] .ant-card-body{padding:16px}.camp-top[data-v-a3028098]{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.status-tag[data-v-a3028098]{border-radius:6px;font-weight:500;font-size:11px;margin:0}.design-tag[data-v-a3028098]{border-radius:6px;font-size:11px;margin:0}.camp-title[data-v-a3028098]{font-size:15px;font-weight:700;color:#0f172a;margin:0 0 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.camp-dates[data-v-a3028098]{background:#f8fafc;border-radius:8px;padding:8px 10px;margin-bottom:12px;display:flex;flex-direction:column;gap:4px}.date-row[data-v-a3028098]{display:flex;justify-content:space-between;font-size:12px}.date-label[data-v-a3028098]{color:#64748b}.date-val[data-v-a3028098]{color:#334155;font-weight:500}.camp-metrics[data-v-a3028098]{display:flex;align-items:center;justify-content:space-around;border:1px solid #f1f5f9;border-radius:8px;padding:8px 4px;margin-bottom:14px}.metric-item[data-v-a3028098]{display:flex;flex-direction:column;align-items:center}.metric-val[data-v-a3028098]{font-size:14px;font-weight:700;color:#1e293b}.metric-lbl[data-v-a3028098]{font-size:11px;color:#94a3b8}.metric-divider[data-v-a3028098]{width:1px;height:24px;background:#f1f5f9}.camp-actions[data-v-a3028098]{display:flex;gap:8px}.camp-btn[data-v-a3028098]{flex:1;border-radius:6px}.empty-card[data-v-a3028098]{text-align:center;padding:32px 0}.empty-inner[data-v-a3028098]{display:flex;flex-direction:column;align-items:center}.empty-text[data-v-a3028098]{font-size:14px;color:#64748b}.table-card[data-v-a3028098]{border-radius:12px;overflow:hidden}.user-cell[data-v-a3028098]{display:flex;align-items:center;gap:10px}.user-avatar[data-v-a3028098]{width:32px;height:32px;border-radius:50%;background:#eef2ff;color:#4f46e5;display:flex;align-items:center;justify-content:center;font-size:14px;flex-shrink:0}.user-info[data-v-a3028098]{display:flex;flex-direction:column}.user-mobile[data-v-a3028098]{font-weight:600;color:#1e293b;font-size:13px}.user-name[data-v-a3028098]{font-size:11px;color:#64748b}.campaign-cell-title[data-v-a3028098]{color:#334155;font-weight:500;font-size:13px}.prize-cell[data-v-a3028098]{display:flex;align-items:center;gap:8px}.prize-type-tag[data-v-a3028098]{border-radius:4px;font-size:11px}.prize-title-text[data-v-a3028098]{font-weight:600;color:#0f172a;font-size:13px}.code-wrapper[data-v-a3028098]{display:inline-flex;align-items:center;gap:4px}.code-badge[data-v-a3028098]{background:#f1f5f9;padding:2px 8px;border-radius:4px;font-family:monospace;color:#334155;font-size:12px;font-weight:600;border:1px solid #e2e8f0}.copy-btn[data-v-a3028098]{color:#64748b;padding:0 4px}.copy-btn[data-v-a3028098]:hover{color:#4f46e5}.status-badge[data-v-a3028098]{border-radius:4px;font-size:12px;padding:1px 8px}.date-cell[data-v-a3028098]{color:#64748b;font-size:12px}.text-muted[data-v-a3028098]{color:#cbd5e1} diff --git a/apps/admin/dist/assets/GiftOutlined-DgNzKaks.js b/apps/admin/dist/assets/GiftOutlined-DgNzKaks.js new file mode 100644 index 0000000..c3887c7 --- /dev/null +++ b/apps/admin/dist/assets/GiftOutlined-DgNzKaks.js @@ -0,0 +1 @@ +import{b as f,I as u}from"./index-C4s_T2hP.js";var l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 310H732.4c13.6-21.4 21.6-46.8 21.6-74 0-76.1-61.9-138-138-138-41.4 0-78.7 18.4-104 47.4-25.3-29-62.6-47.4-104-47.4-76.1 0-138 61.9-138 138 0 27.2 7.9 52.6 21.6 74H144c-17.7 0-32 14.3-32 32v200c0 4.4 3.6 8 8 8h40v344c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V550h40c4.4 0 8-3.6 8-8V342c0-17.7-14.3-32-32-32zm-334-74c0-38.6 31.4-70 70-70s70 31.4 70 70-31.4 70-70 70h-70v-70zm-138-70c38.6 0 70 31.4 70 70v70h-70c-38.6 0-70-31.4-70-70s31.4-70 70-70zM180 482V378h298v104H180zm48 68h250v308H228V550zm568 308H546V550h250v308zm48-376H546V378h298v104z"}}]},name:"gift",theme:"outlined"};function c(r){for(var t=1;t{const _=l("a-input"),n=l("a-form-item"),f=l("a-input-password"),g=l("a-button"),v=l("a-form");return h(),y("div",M,[e[4]||(e[4]=a("div",{class:"login-bg-decorations"},[a("div",{class:"decor-circle circle-1"}),a("div",{class:"decor-circle circle-2"})],-1)),a("div",N,[e[3]||(e[3]=a("div",{class:"header"},[a("div",{class:"logo-wrapper"},[a("span",{class:"logo"},"🎡")]),a("h1",null,"ورود به پنل مدیریت"),a("p",null,"سامانه گردونه شانس و قرعه‌کشی")],-1)),o(v,{model:s,layout:"vertical",onFinish:m},{default:t(()=>[o(n,{label:"ایمیل مدیریت",name:"email",rules:[{required:!0,message:"لطفاً ایمیل را وارد کنید"},{type:"email",message:"فرمت ایمیل نامعتبر است"}]},{default:t(()=>[o(_,{value:s.email,"onUpdate:value":e[0]||(e[0]=i=>s.email=i),size:"large",placeholder:"admin@example.com"},{prefix:t(()=>[o(d(B),{style:{color:"#6366f1"}})]),_:1},8,["value"])]),_:1}),o(n,{label:"کلمه عبور",name:"password",rules:[{required:!0,message:"لطفاً کلمه عبور را وارد کنید"}]},{default:t(()=>[o(f,{value:s.password,"onUpdate:value":e[1]||(e[1]=i=>s.password=i),size:"large",placeholder:"••••••••"},{prefix:t(()=>[o(d(C),{style:{color:"#6366f1"}})]),_:1},8,["value"])]),_:1}),o(n,{style:{"margin-top":"28px"}},{default:t(()=>[o(g,{type:"primary","html-type":"submit",size:"large",block:"",loading:r.value,class:"login-submit-btn"},{default:t(()=>[...e[2]||(e[2]=[x(" ورود به پنل ",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"])])])}}}),j=z(q,[["__scopeId","data-v-6a1d5c0c"]]);export{j as default}; diff --git a/apps/admin/dist/assets/LoginView-DoINjLi5.css b/apps/admin/dist/assets/LoginView-DoINjLi5.css new file mode 100644 index 0000000..586bf6e --- /dev/null +++ b/apps/admin/dist/assets/LoginView-DoINjLi5.css @@ -0,0 +1 @@ +.login-container[data-v-6a1d5c0c]{min-height:100vh;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at 50% 20%,#1e1b4b,#0f172a 70%,#020617);padding:24px;position:relative;overflow:hidden}.login-bg-decorations[data-v-6a1d5c0c]{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;overflow:hidden}.decor-circle[data-v-6a1d5c0c]{position:absolute;border-radius:50%;filter:blur(80px);opacity:.15}.circle-1[data-v-6a1d5c0c]{width:400px;height:400px;background:#6366f1;top:10%;left:20%}.circle-2[data-v-6a1d5c0c]{width:350px;height:350px;background:#a855f7;bottom:10%;right:20%}.login-card[data-v-6a1d5c0c]{width:100%;max-width:420px;background:#fff;border-radius:16px;padding:40px 36px;box-shadow:0 25px 50px -12px #00000073,0 0 0 1px #ffffff1a;position:relative;z-index:1}.header[data-v-6a1d5c0c]{text-align:center;margin-bottom:32px}.logo-wrapper[data-v-6a1d5c0c]{width:68px;height:68px;margin:0 auto 16px;background:#eef2ff;border-radius:16px;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px #4f46e51f}.logo[data-v-6a1d5c0c]{font-size:34px;line-height:1}h1[data-v-6a1d5c0c]{font-size:20px;font-weight:700;margin:0;color:#0f172a;letter-spacing:-.3px}p[data-v-6a1d5c0c]{font-size:13px;color:#64748b;margin-top:6px;margin-bottom:0}.login-submit-btn[data-v-6a1d5c0c]{height:44px;font-size:15px;font-weight:600;border-radius:8px;background:#4f46e5;box-shadow:0 4px 14px #4f46e559;transition:all .2s ease}.login-submit-btn[data-v-6a1d5c0c]:hover{background:#4338ca!important;box-shadow:0 6px 18px #4f46e573} diff --git a/apps/admin/dist/assets/MAuditLogView-BySXTGGh.css b/apps/admin/dist/assets/MAuditLogView-BySXTGGh.css new file mode 100644 index 0000000..2b82c65 --- /dev/null +++ b/apps/admin/dist/assets/MAuditLogView-BySXTGGh.css @@ -0,0 +1 @@ +.m-page[data-v-c77a623e]{padding:12px 14px 24px}.m-filters[data-v-c77a623e]{display:flex;gap:8px;margin-bottom:12px}.m-filters[data-v-c77a623e] .ant-select-selector{border-radius:12px!important;min-height:42px!important}.m-icon-btn[data-v-c77a623e]{width:42px;height:42px;border:none;border-radius:12px;background:#fff;color:#4f46e5}.m-empty[data-v-c77a623e]{text-align:center;color:#94a3b8;padding:40px}.m-card[data-v-c77a623e]{background:#fff;border-radius:14px;padding:12px;margin-bottom:8px;border:1px solid #f1f5f9}.m-card__top[data-v-c77a623e]{display:flex;justify-content:space-between;gap:8px;margin-bottom:8px}.m-card__admin[data-v-c77a623e]{font-weight:800;font-size:13px;color:#0f172a}.m-card__entity[data-v-c77a623e]{font-size:11px;color:#94a3b8;margin-top:2px;direction:ltr;text-align:right}.m-card__meta[data-v-c77a623e]{display:flex;justify-content:space-between;font-size:11px;color:#94a3b8}.m-detail[data-v-c77a623e]{margin-top:10px;width:100%;border:1px solid #e2e8f0;background:#f8fafc;border-radius:10px;padding:10px;font-weight:700;font-size:12px;color:#334155;min-height:42px}.m-pager[data-v-c77a623e]{display:flex;justify-content:center;padding:12px 0}.detail__row[data-v-c77a623e]{display:flex;justify-content:space-between;margin-bottom:8px;font-size:13px;color:#64748b}.detail__row strong[data-v-c77a623e]{color:#0f172a}.detail h4[data-v-c77a623e]{margin:16px 0 8px;font-size:13px}.detail pre[data-v-c77a623e]{background:#0f172a;color:#e2e8f0;border-radius:12px;padding:12px;font-size:11px;overflow:auto;direction:ltr;text-align:left;max-height:180px} diff --git a/apps/admin/dist/assets/MAuditLogView-_cInDqas.js b/apps/admin/dist/assets/MAuditLogView-_cInDqas.js new file mode 100644 index 0000000..b5500ea --- /dev/null +++ b/apps/admin/dist/assets/MAuditLogView-_cInDqas.js @@ -0,0 +1 @@ +import{t as U}from"./farsi-number-stB7JMN0.js";import{d as L,l as x,c as _,a as t,b as a,w as o,e as S,R as I,h as g,g as R,n as M,r as c,o as m,f as p,s as D,F as P,y as B,t as s,H as F,_ as H}from"./index-C4s_T2hP.js";const J={class:"m-page"},G={class:"m-filters"},$={key:0,class:"m-empty"},j={class:"m-card__top"},q={class:"m-card__admin"},K={class:"m-card__entity"},Q={class:"m-card__meta"},W={dir:"ltr"},X=["onClick"],Y={key:1,class:"m-pager"},Z={key:0,class:"detail"},h={class:"detail__row"},ee={class:"detail__row"},te={class:"detail__row"},ne=L({__name:"MAuditLogView",setup(ae){const v=g(!1),T=g([]),w=g(0),A=g(!1),u=g(null),l=R({page:1,pageSize:10,entityType:void 0});async function f(){var i,e,d,y;v.value=!0;try{const r=await M.get("/admin/audit-logs",{params:{page:l.page,pageSize:l.pageSize,entityType:l.entityType||void 0}}),C=Array.isArray(r.data)?r.data:((i=r.data)==null?void 0:i.data)||[];T.value=C,w.value=((e=r.meta)==null?void 0:e.total)||((y=(d=r.data)==null?void 0:d.meta)==null?void 0:y.total)||C.length}finally{v.value=!1}}function k(i){u.value=i,A.value=!0}function V(i){const e=(i||"").toUpperCase();return e.includes("CREATE")||e.includes("ADD")?"green":e.includes("UPDATE")||e.includes("EDIT")||e.includes("PATCH")?"blue":e.includes("DELETE")||e.includes("REMOVE")?"red":e.includes("LOGIN")||e.includes("AUTH")?"purple":"default"}function b(i){return i?U(new Date(i).toLocaleDateString("fa-IR",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})):"—"}return x(f),(i,e)=>{const d=c("a-select-option"),y=c("a-select"),r=c("a-tag"),C=c("a-pagination"),N=c("a-spin"),O=c("a-drawer");return m(),_("div",J,[t("div",G,[a(y,{value:l.entityType,"onUpdate:value":e[0]||(e[0]=n=>l.entityType=n),"allow-clear":"",placeholder:"نوع موجودیت",style:{flex:"1"},onChange:e[1]||(e[1]=()=>{l.page=1,f()})},{default:o(()=>[a(d,{value:"Campaign"},{default:o(()=>[...e[4]||(e[4]=[p("کمپین",-1)])]),_:1}),a(d,{value:"Prize"},{default:o(()=>[...e[5]||(e[5]=[p("جایزه",-1)])]),_:1}),a(d,{value:"User"},{default:o(()=>[...e[6]||(e[6]=[p("کاربر",-1)])]),_:1}),a(d,{value:"Chance"},{default:o(()=>[...e[7]||(e[7]=[p("شانس",-1)])]),_:1}),a(d,{value:"UserPrize"},{default:o(()=>[...e[8]||(e[8]=[p("جایزه کاربر",-1)])]),_:1})]),_:1},8,["value"]),t("button",{type:"button",class:"m-icon-btn",onClick:f},[a(S(I),{spin:v.value},null,8,["spin"])])]),a(N,{spinning:v.value},{default:o(()=>[!T.value.length&&!v.value?(m(),_("div",$,"لاگی یافت نشد")):D("",!0),(m(!0),_(P,null,B(T.value,n=>{var E,z;return m(),_("div",{key:n.id,class:"m-card"},[t("div",j,[t("div",null,[t("div",q,s(((E=n.admin)==null?void 0:E.name)||((z=n.admin)==null?void 0:z.email)||"سیستم"),1),t("div",K,s(n.entityType)+" · "+s(n.entityId||"—"),1)]),a(r,{color:V(n.action)},{default:o(()=>[p(s(n.action),1)]),_:2},1032,["color"])]),t("div",Q,[t("span",W,s(n.ipAddress||"—"),1),t("span",null,s(b(n.createdAt)),1)]),t("button",{type:"button",class:"m-detail",onClick:se=>k(n)},[a(S(F)),e[9]||(e[9]=p(" جزئیات JSON ",-1))],8,X)])}),128)),w.value>l.pageSize?(m(),_("div",Y,[a(C,{current:l.page,"onUpdate:current":e[2]||(e[2]=n=>l.page=n),total:w.value,"page-size":l.pageSize,size:"small",onChange:f},null,8,["current","total","page-size"])])):D("",!0)]),_:1},8,["spinning"]),a(O,{open:A.value,"onUpdate:open":e[3]||(e[3]=n=>A.value=n),placement:"bottom",height:"70%",title:"جزئیات لاگ"},{default:o(()=>{var n;return[u.value?(m(),_("div",Z,[t("div",h,[e[10]||(e[10]=t("span",null,"ادمین",-1)),t("strong",null,s(((n=u.value.admin)==null?void 0:n.name)||"—"),1)]),t("div",ee,[e[11]||(e[11]=t("span",null,"اکشن",-1)),t("strong",null,s(u.value.action),1)]),t("div",te,[e[12]||(e[12]=t("span",null,"موجودیت",-1)),t("strong",null,s(u.value.entityType),1)]),e[13]||(e[13]=t("h4",null,"قبل",-1)),t("pre",null,s(JSON.stringify(u.value.oldValues||{},null,2)),1),e[14]||(e[14]=t("h4",null,"بعد",-1)),t("pre",null,s(JSON.stringify(u.value.newValues||{},null,2)),1)])):D("",!0)]}),_:1},8,["open"])])}}}),oe=H(ne,[["__scopeId","data-v-c77a623e"]]);export{oe as default}; diff --git a/apps/admin/dist/assets/MCampaignFormView-BK95YxT0.js b/apps/admin/dist/assets/MCampaignFormView-BK95YxT0.js new file mode 100644 index 0000000..e53254c --- /dev/null +++ b/apps/admin/dist/assets/MCampaignFormView-BK95YxT0.js @@ -0,0 +1 @@ +import{d as $,l as q,O as A,c as F,b as t,w as s,Q as P,h as b,g as W,n as k,r as i,o as w,a as u,N as S,q as T,v as U,f,F as j,y as G,x as I,s as X,t as N,i as Q,z as _,_ as H}from"./index-C4s_T2hP.js";import{W as r}from"./index-NN61KtzX.js";const J={class:"m-form-page"},K={class:"m-steps"},Z={class:"m-card"},ee={class:"m-card"},ae={class:"m-card"},te={class:"m-wheel-grid"},le=["onClick"],se={class:"m-form-actions"},ne=$({__name:"MCampaignFormView",setup(oe){const L=P(),z=Q(),R=b(!1),C=b(null),h=b(!1),D=b(!1),n=b(0),e=W({title:"",slug:"",description:"",banner:"",logo:"",dateRange:[],status:"DRAFT",defaultChances:3,rules:"",ctaText:"بچرخون و برنده شو!",wheelDesign:r.CLASSIC_CASINO,primaryColor:"#FFD700",secondaryColor:"#B22222"}),O=[{value:r.CLASSIC_CASINO,label:"کازینویی کلاسیک"},{value:r.NEON_CYBER,label:"نئونی سایبر"},{value:r.MINIMAL_FLAT,label:"مینیمال فلت"},{value:r.LUXURY_GOLD,label:"طلایی لوکس"},{value:r.PLAYFUL_CARTOON,label:"کارتونی"},{value:r.RUSTIC_WOOD,label:"چوبی"},{value:r.GALAXY_SPACE,label:"کهکشانی"},{value:r.CANDY_LAND,label:"آب‌نباتی"},{value:r.FIRE_FLAME,label:"آتشین"},{value:r.CRYSTAL_ICE,label:"یخی"}];async function E(){if(C.value){h.value=!0;try{const a=(await k.get(`/admin/campaigns/${C.value}`)).data;e.title=a.title,e.slug=a.slug,e.description=a.description||"",e.banner=a.banner||"",e.logo=a.logo||"",e.status=a.status,e.defaultChances=a.defaultChances,e.rules=a.rules||"",e.ctaText=a.ctaText||"بچرخون و برنده شو!",e.wheelDesign=a.wheelDesign,e.dateRange=[A(a.startAt),A(a.endAt)],a.settings&&(e.primaryColor=a.settings.primaryColor||"#FFD700",e.secondaryColor=a.settings.secondaryColor||"#B22222")}finally{h.value=!1}}}function M(){var d,a;if(n.value===0){if(!((d=e.title)!=null&&d.trim())){_.error("عنوان کمپین را وارد کنید");return}(a=e.slug)!=null&&a.trim()||(e.slug="campaign-"+Math.random().toString(36).substring(2,8))}if(n.value===1&&(!e.dateRange||e.dateRange.length<2)){_.error("بازه زمانی را انتخاب کنید");return}n.value+=1}async function B(){var a,v,o,y,m;let d=(e.slug||"").trim().toLowerCase().replace(/\s+/g,"-");if(d||(d="campaign-"+Math.random().toString(36).substring(2,8)),e.slug=d,!/^[a-z0-9-]+$/.test(d)){_.error("اسلاگ فقط حروف انگلیسی، عدد و -");return}D.value=!0;try{const c={title:e.title.trim(),slug:e.slug.trim(),description:((a=e.description)==null?void 0:a.trim())||void 0,banner:e.banner?e.banner.trim():null,logo:e.logo?e.logo.trim():null,startAt:e.dateRange[0].toISOString(),endAt:e.dateRange[1].toISOString(),status:e.status,defaultChances:Number(e.defaultChances)||0,rules:((v=e.rules)==null?void 0:v.trim())||void 0,ctaText:e.ctaText||"بچرخون و برنده شو!",wheelDesign:e.wheelDesign,settings:{primaryColor:e.primaryColor,secondaryColor:e.secondaryColor}};if(R.value&&C.value)await k.patch(`/admin/campaigns/${C.value}`,c),_.success("کمپین به‌روزرسانی شد"),z.push("/m/campaigns");else{const p=await k.post("/admin/campaigns",c);_.success("کمپین ایجاد شد");const g=(o=p.data)==null?void 0:o.id;z.push(g?`/m/campaigns/${g}/prizes`:"/m/campaigns")}}catch(c){const p=((m=(y=c.response)==null?void 0:y.data)==null?void 0:m.message)||"خطا در ذخیره";_.error(Array.isArray(p)?p.join(" | "):p)}finally{D.value=!1}}return q(()=>{L.params.id?(R.value=!0,C.value=L.params.id,E()):e.dateRange=[A(),A().add(1,"month")]}),(d,a)=>{const v=i("a-input"),o=i("a-form-item"),y=i("a-textarea"),m=i("a-select-option"),c=i("a-select"),p=i("a-input-number"),g=i("a-form"),V=i("a-range-picker"),x=i("a-button"),Y=i("a-spin");return w(),F("div",J,[t(Y,{spinning:h.value},{default:s(()=>[u("div",K,[u("div",{class:S(["m-step",{active:n.value===0,done:n.value>0}])},"۱. پایه",2),u("div",{class:S(["m-step",{active:n.value===1,done:n.value>1}])},"۲. زمان",2),u("div",{class:S(["m-step",{active:n.value===2}])},"۳. ظاهر",2)]),T(u("div",Z,[t(g,{layout:"vertical"},{default:s(()=>[t(o,{label:"عنوان کمپین",required:""},{default:s(()=>[t(v,{value:e.title,"onUpdate:value":a[0]||(a[0]=l=>e.title=l),size:"large",placeholder:"مثلاً جشنواره نوروز"},null,8,["value"])]),_:1}),t(o,{label:"اسلاگ (URL)"},{default:s(()=>[t(v,{value:e.slug,"onUpdate:value":a[1]||(a[1]=l=>e.slug=l),size:"large",placeholder:"nowruz-2026",dir:"ltr"},null,8,["value"])]),_:1}),t(o,{label:"توضیحات"},{default:s(()=>[t(y,{value:e.description,"onUpdate:value":a[2]||(a[2]=l=>e.description=l),rows:3},null,8,["value"])]),_:1}),t(o,{label:"وضعیت"},{default:s(()=>[t(c,{value:e.status,"onUpdate:value":a[3]||(a[3]=l=>e.status=l),size:"large",style:{width:"100%"}},{default:s(()=>[t(m,{value:"DRAFT"},{default:s(()=>[...a[11]||(a[11]=[f("پیش‌نویس",-1)])]),_:1}),t(m,{value:"ACTIVE"},{default:s(()=>[...a[12]||(a[12]=[f("فعال",-1)])]),_:1}),t(m,{value:"PAUSED"},{default:s(()=>[...a[13]||(a[13]=[f("متوقف",-1)])]),_:1})]),_:1},8,["value"])]),_:1}),t(o,{label:"شانس پیش‌فرض"},{default:s(()=>[t(p,{value:e.defaultChances,"onUpdate:value":a[4]||(a[4]=l=>e.defaultChances=l),min:0,size:"large",style:{width:"100%"}},null,8,["value"])]),_:1})]),_:1})],512),[[U,n.value===0]]),T(u("div",ee,[t(g,{layout:"vertical"},{default:s(()=>[t(o,{label:"بازه زمانی",required:""},{default:s(()=>[t(V,{value:e.dateRange,"onUpdate:value":a[5]||(a[5]=l=>e.dateRange=l),"show-time":"",size:"large",style:{width:"100%"}},null,8,["value"])]),_:1}),t(o,{label:"متن دکمه CTA"},{default:s(()=>[t(v,{value:e.ctaText,"onUpdate:value":a[6]||(a[6]=l=>e.ctaText=l),size:"large"},null,8,["value"])]),_:1}),t(o,{label:"قوانین"},{default:s(()=>[t(y,{value:e.rules,"onUpdate:value":a[7]||(a[7]=l=>e.rules=l),rows:4},null,8,["value"])]),_:1})]),_:1})],512),[[U,n.value===1]]),T(u("div",ae,[t(g,{layout:"vertical"},{default:s(()=>[t(o,{label:"طرح گردونه"},{default:s(()=>[u("div",te,[(w(),F(j,null,G(O,l=>u("button",{key:l.value,type:"button",class:S(["m-wheel-opt",{active:e.wheelDesign===l.value}]),onClick:re=>e.wheelDesign=l.value},N(l.label),11,le)),64))])]),_:1}),t(o,{label:"رنگ اصلی"},{default:s(()=>[t(v,{value:e.primaryColor,"onUpdate:value":a[8]||(a[8]=l=>e.primaryColor=l),type:"color",style:{width:"100%",height:"44px"}},null,8,["value"])]),_:1}),t(o,{label:"رنگ ثانویه"},{default:s(()=>[t(v,{value:e.secondaryColor,"onUpdate:value":a[9]||(a[9]=l=>e.secondaryColor=l),type:"color",style:{width:"100%",height:"44px"}},null,8,["value"])]),_:1})]),_:1})],512),[[U,n.value===2]]),u("div",se,[n.value>0?(w(),I(x,{key:0,size:"large",block:"",onClick:a[10]||(a[10]=l=>n.value-=1)},{default:s(()=>[...a[14]||(a[14]=[f("قبلی",-1)])]),_:1})):X("",!0),n.value<2?(w(),I(x,{key:1,type:"primary",size:"large",block:"",onClick:M},{default:s(()=>[...a[15]||(a[15]=[f(" بعدی ",-1)])]),_:1})):(w(),I(x,{key:2,type:"primary",size:"large",block:"",loading:D.value,onClick:B},{default:s(()=>[f(N(R.value?"ذخیره تغییرات":"ایجاد کمپین"),1)]),_:1},8,["loading"]))])]),_:1},8,["spinning"])])}}}),de=H(ne,[["__scopeId","data-v-c3ce5e92"]]);export{de as default}; diff --git a/apps/admin/dist/assets/MCampaignFormView-V2dAIrFM.css b/apps/admin/dist/assets/MCampaignFormView-V2dAIrFM.css new file mode 100644 index 0000000..d6a3595 --- /dev/null +++ b/apps/admin/dist/assets/MCampaignFormView-V2dAIrFM.css @@ -0,0 +1 @@ +.m-form-page[data-v-c3ce5e92]{padding:12px 14px 24px}.m-steps[data-v-c3ce5e92]{display:flex;gap:6px;margin-bottom:14px}.m-step[data-v-c3ce5e92]{flex:1;text-align:center;font-size:11px;font-weight:700;padding:8px 4px;border-radius:10px;background:#e2e8f0;color:#64748b}.m-step.active[data-v-c3ce5e92]{background:#4f46e5;color:#fff}.m-step.done[data-v-c3ce5e92]{background:#c7d2fe;color:#3730a3}.m-card[data-v-c3ce5e92]{background:#fff;border-radius:16px;padding:16px;border:1px solid #f1f5f9;margin-bottom:14px}.m-wheel-grid[data-v-c3ce5e92]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.m-wheel-opt[data-v-c3ce5e92]{border:1px solid #e2e8f0;background:#f8fafc;border-radius:12px;padding:12px 8px;font-size:12px;font-weight:700;color:#334155;min-height:48px}.m-wheel-opt.active[data-v-c3ce5e92]{border-color:#4f46e5;background:#eef2ff;color:#4f46e5}.m-form-actions[data-v-c3ce5e92]{display:flex;flex-direction:column;gap:8px}.m-form-actions[data-v-c3ce5e92] .ant-btn{height:48px;border-radius:14px;font-weight:700} diff --git a/apps/admin/dist/assets/MCampaignListView-DhD-QCtV.js b/apps/admin/dist/assets/MCampaignListView-DhD-QCtV.js new file mode 100644 index 0000000..ffc2bd8 --- /dev/null +++ b/apps/admin/dist/assets/MCampaignListView-DhD-QCtV.js @@ -0,0 +1 @@ +import{f as h,t as L}from"./farsi-number-stB7JMN0.js";import{d as R,l as G,c as C,a as n,b as e,w as l,e as o,D as H,i as j,h as E,g as q,n as D,r as p,o as f,S as J,f as r,s as b,F as K,y as Q,t as _,G as W,H as X,E as Y,M as Z,x as O,B as tt,C as at,J as et,z as w,_ as st}from"./index-C4s_T2hP.js";import{o as nt,P as ot}from"./clientUrl-KVuNwfzw.js";import{G as it}from"./GiftOutlined-DgNzKaks.js";const lt={class:"m-page"},rt={class:"m-search-bar"},ut={key:0,class:"m-empty"},ct={class:"m-camp-card__top"},dt={class:"m-camp-card__title"},pt={class:"m-camp-card__slug"},mt={class:"m-camp-card__meta"},ft={class:"m-camp-card__actions"},_t=["onClick"],gt=["onClick"],vt=["onClick"],Ct={type:"button",class:"m-action"},yt={key:1,class:"m-pager"},bt=R({__name:"MCampaignListView",setup(kt){const k=j(),y=E(!1),S=E([]),A=E(0),i=q({page:1,pageSize:10,status:void 0,search:""});async function g(){var s,t,m,u;y.value=!0;try{const d=await D.get("/admin/campaigns",{params:{page:i.page,pageSize:i.pageSize,status:i.status,search:i.search||void 0}}),c=Array.isArray(d.data)?d.data:((s=d.data)==null?void 0:s.data)||[];S.value=c,A.value=((t=d.meta)==null?void 0:t.total)||((u=(m=d.data)==null?void 0:m.meta)==null?void 0:u.total)||c.length}finally{y.value=!1}}async function F(s){await D.post(`/admin/campaigns/${s}/duplicate`),w.success("کمپین کپی شد"),g()}function M(s){et.confirm({title:"کپی کمپین",content:`کمپین «${s.title}» کپی شود؟`,okText:"بله",cancelText:"انصراف",onOk:()=>F(s.id)})}async function I(s,t){var m,u;try{await D.patch(`/admin/campaigns/${s}`,{status:t}),w.success(t==="ACTIVE"?"کمپین فعال شد":"کمپین متوقف شد"),g()}catch(d){const c=((u=(m=d.response)==null?void 0:m.data)==null?void 0:u.message)||"خطا در تغییر وضعیت";w.error(Array.isArray(c)?c.join(" | "):c)}}function x(s){switch(s){case"ACTIVE":return{color:"#10b981",text:"فعال",bg:"#ecfdf5"};case"PAUSED":return{color:"#f59e0b",text:"متوقف",bg:"#fffbeb"};case"FINISHED":return{color:"#ef4444",text:"پایان",bg:"#fef2f2"};case"DRAFT":return{color:"#d97706",text:"پیش‌نویس",bg:"#fffbeb"};default:return{color:"#94a3b8",text:s,bg:"#f8fafc"}}}function z(s){if(!s)return"—";try{return L(new Date(s).toLocaleDateString("fa-IR",{year:"numeric",month:"2-digit",day:"2-digit"}))}catch{return"—"}}function V(){i.page=1,g()}return G(g),(s,t)=>{const m=p("a-input"),u=p("a-select-option"),d=p("a-select"),c=p("a-menu-item"),N=p("a-menu"),P=p("a-dropdown"),U=p("a-pagination"),B=p("a-spin");return f(),C("div",lt,[n("div",rt,[e(m,{value:i.search,"onUpdate:value":t[0]||(t[0]=a=>i.search=a),"allow-clear":"",placeholder:"جستجوی کمپین...",onPressEnter:V},{prefix:l(()=>[e(o(J),{style:{color:"#94a3b8"}})]),_:1},8,["value"]),e(d,{value:i.status,"onUpdate:value":t[1]||(t[1]=a=>i.status=a),"allow-clear":"",placeholder:"وضعیت",style:{width:"110px"},onChange:V},{default:l(()=>[e(u,{value:"ACTIVE"},{default:l(()=>[...t[4]||(t[4]=[r("فعال",-1)])]),_:1}),e(u,{value:"PAUSED"},{default:l(()=>[...t[5]||(t[5]=[r("متوقف",-1)])]),_:1}),e(u,{value:"DRAFT"},{default:l(()=>[...t[6]||(t[6]=[r("پیش‌نویس",-1)])]),_:1}),e(u,{value:"FINISHED"},{default:l(()=>[...t[7]||(t[7]=[r("پایان",-1)])]),_:1})]),_:1},8,["value"])]),e(B,{spinning:y.value},{default:l(()=>[!S.value.length&&!y.value?(f(),C("div",ut,"کمپینی یافت نشد")):b("",!0),(f(!0),C(K,null,Q(S.value,a=>{var $,T;return f(),C("div",{key:a.id,class:"m-camp-card"},[n("div",ct,[n("div",null,[n("div",dt,_(a.title),1),n("div",pt,"/"+_(a.slug),1)]),n("span",{class:"m-status",style:W({color:x(a.status).color,background:x(a.status).bg})},_(x(a.status).text),5)]),n("div",mt,[n("span",null,_(z(a.startAt))+" → "+_(z(a.endAt)),1),n("span",null,_(o(h)((($=a._count)==null?void 0:$.prizes)||0))+" جایزه · "+_(o(h)(((T=a._count)==null?void 0:T.spins)||0))+" اسپین ",1)]),n("div",ft,[n("button",{type:"button",class:"m-action",onClick:v=>o(nt)(a.slug)},[e(o(X)),t[8]||(t[8]=r(" گردونه ",-1))],8,_t),n("button",{type:"button",class:"m-action",onClick:v=>o(k).push(`/m/campaigns/${a.id}/edit`)},[e(o(Y)),t[9]||(t[9]=r(" ویرایش ",-1))],8,gt),n("button",{type:"button",class:"m-action",onClick:v=>o(k).push(`/m/campaigns/${a.id}/prizes`)},[e(o(it)),t[10]||(t[10]=r(" جوایز ",-1))],8,vt),e(P,null,{overlay:l(()=>[e(N,null,{default:l(()=>[a.status!=="ACTIVE"?(f(),O(c,{key:0,onClick:v=>I(a.id,"ACTIVE")},{default:l(()=>[e(o(tt)),t[12]||(t[12]=r(" فعال‌سازی ",-1))]),_:1},8,["onClick"])):b("",!0),a.status==="ACTIVE"?(f(),O(c,{key:1,onClick:v=>I(a.id,"PAUSED")},{default:l(()=>[e(o(ot)),t[13]||(t[13]=r(" توقف ",-1))]),_:1},8,["onClick"])):b("",!0),e(c,{onClick:v=>M(a)},{default:l(()=>[e(o(at)),t[14]||(t[14]=r(" کپی ",-1))]),_:1},8,["onClick"])]),_:2},1024)]),default:l(()=>[n("button",Ct,[e(o(Z)),t[11]||(t[11]=r(" بیشتر ",-1))])]),_:2},1024)])])}),128)),A.value>i.pageSize?(f(),C("div",yt,[e(U,{current:i.page,"onUpdate:current":t[2]||(t[2]=a=>i.page=a),total:A.value,"page-size":i.pageSize,size:"small",onChange:g},null,8,["current","total","page-size"])])):b("",!0)]),_:1},8,["spinning"]),n("button",{type:"button",class:"m-fab",onClick:t[3]||(t[3]=a=>o(k).push("/m/campaigns/create"))},[e(o(H))])])}}}),Dt=st(bt,[["__scopeId","data-v-859536c8"]]);export{Dt as default}; diff --git a/apps/admin/dist/assets/MCampaignListView-Dj8e1wBm.css b/apps/admin/dist/assets/MCampaignListView-Dj8e1wBm.css new file mode 100644 index 0000000..eb69618 --- /dev/null +++ b/apps/admin/dist/assets/MCampaignListView-Dj8e1wBm.css @@ -0,0 +1 @@ +.m-page[data-v-859536c8]{padding:12px 14px 88px;position:relative}.m-search-bar[data-v-859536c8]{display:flex;gap:8px;margin-bottom:12px}.m-search-bar[data-v-859536c8] .ant-input-affix-wrapper,.m-search-bar[data-v-859536c8] .ant-select-selector{border-radius:12px!important;min-height:42px!important}.m-empty[data-v-859536c8]{text-align:center;color:#94a3b8;padding:48px 16px;font-size:13px}.m-camp-card[data-v-859536c8]{background:#fff;border-radius:16px;padding:14px;margin-bottom:10px;border:1px solid #f1f5f9;box-shadow:0 2px 10px #0f172a0a}.m-camp-card__top[data-v-859536c8]{display:flex;justify-content:space-between;gap:10px;margin-bottom:8px}.m-camp-card__title[data-v-859536c8]{font-size:15px;font-weight:800;color:#0f172a}.m-camp-card__slug[data-v-859536c8]{font-size:11px;color:#94a3b8;direction:ltr;text-align:right;margin-top:2px}.m-status[data-v-859536c8]{font-size:11px;font-weight:700;padding:4px 10px;border-radius:999px;white-space:nowrap;height:fit-content}.m-camp-card__meta[data-v-859536c8]{display:flex;flex-direction:column;gap:4px;font-size:11px;color:#64748b;margin-bottom:12px}.m-camp-card__actions[data-v-859536c8]{display:flex;gap:6px}.m-action[data-v-859536c8]{flex:1;border:1px solid #e2e8f0;background:#f8fafc;border-radius:10px;padding:10px 6px;font-size:11px;font-weight:700;color:#334155;display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:42px}.m-pager[data-v-859536c8]{display:flex;justify-content:center;padding:12px 0}.m-fab[data-v-859536c8]{position:fixed;left:18px;bottom:calc(80px + env(safe-area-inset-bottom,0px));width:56px;height:56px;border:none;border-radius:18px;background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;font-size:22px;box-shadow:0 10px 24px #4f46e566;z-index:90} diff --git a/apps/admin/dist/assets/MDashboardView-B3yDHSi-.css b/apps/admin/dist/assets/MDashboardView-B3yDHSi-.css new file mode 100644 index 0000000..31f5c29 --- /dev/null +++ b/apps/admin/dist/assets/MDashboardView-B3yDHSi-.css @@ -0,0 +1 @@ +.m-dash[data-v-f792aa47]{padding:12px 14px 24px}.m-dash__toolbar[data-v-f792aa47]{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.m-dash__live[data-v-f792aa47]{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:#059669;background:#ecfdf5;border-radius:999px;padding:4px 10px}.pulse[data-v-f792aa47]{width:7px;height:7px;border-radius:50%;background:#10b981;box-shadow:0 0 #10b98180;animation:pulse-f792aa47 1.6s infinite}@keyframes pulse-f792aa47{70%{box-shadow:0 0 0 8px #10b98100}to{box-shadow:0 0 #10b98100}}.m-dash__sub[data-v-f792aa47]{margin:8px 2px 0;color:#64748b;font-size:12px}.m-icon-btn[data-v-f792aa47]{width:42px;height:42px;border:none;border-radius:12px;background:#fff;color:#4f46e5;box-shadow:0 2px 10px #0f172a0f;font-size:16px}.m-kpi-grid[data-v-f792aa47]{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}.m-kpi[data-v-f792aa47]{background:#fff;border-radius:16px;padding:14px;box-shadow:0 2px 12px #0f172a0a;border:1px solid #f1f5f9}.m-kpi__head[data-v-f792aa47]{display:flex;justify-content:space-between;align-items:center;color:#64748b;font-size:12px;font-weight:600;margin-bottom:8px}.m-kpi__val[data-v-f792aa47]{font-size:22px;font-weight:800;color:#0f172a;margin-bottom:4px}.m-kpi__sub[data-v-f792aa47]{font-size:11px;color:#94a3b8;display:flex;align-items:center;gap:4px}.m-kpi.indigo .m-kpi__head[data-v-f792aa47]{color:#4f46e5}.m-kpi.amber .m-kpi__head[data-v-f792aa47]{color:#d97706}.m-kpi.emerald .m-kpi__head[data-v-f792aa47]{color:#059669}.m-kpi.violet .m-kpi__head[data-v-f792aa47]{color:#7c3aed}.m-quick[data-v-f792aa47]{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}.m-quick__btn[data-v-f792aa47]{border:1px solid #e2e8f0;background:#fff;border-radius:14px;padding:12px 10px;font-size:12px;font-weight:700;color:#334155;display:flex;align-items:center;justify-content:center;gap:6px;min-height:48px}.m-quick__btn.primary[data-v-f792aa47]{background:linear-gradient(135deg,#4f46e5,#7c3aed);border-color:transparent;color:#fff}.m-card[data-v-f792aa47]{background:#fff;border-radius:16px;padding:14px;margin-bottom:12px;border:1px solid #f1f5f9;box-shadow:0 2px 12px #0f172a0a}.m-card__title[data-v-f792aa47]{font-size:14px;font-weight:800;color:#0f172a;margin-bottom:10px}.m-chart[data-v-f792aa47]{height:200px;width:100%}.m-winner-row[data-v-f792aa47]{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid #f1f5f9}.m-winner-row[data-v-f792aa47]:last-child{border-bottom:none;padding-bottom:0}.m-winner-row__name[data-v-f792aa47]{font-size:13px;font-weight:700;color:#0f172a}.m-winner-row__meta[data-v-f792aa47]{font-size:11px;color:#94a3b8;margin-top:2px}.m-winner-row__side[data-v-f792aa47]{display:flex;flex-direction:column;align-items:flex-end;gap:4px}.m-tag[data-v-f792aa47]{margin:0!important;font-size:10px!important;line-height:18px!important}.m-code[data-v-f792aa47]{border:none;background:#f8fafc;color:#4f46e5;font-size:10px;font-family:monospace;border-radius:8px;padding:2px 6px;direction:ltr} diff --git a/apps/admin/dist/assets/MDashboardView-BOwauKcj.js b/apps/admin/dist/assets/MDashboardView-BOwauKcj.js new file mode 100644 index 0000000..d553b70 --- /dev/null +++ b/apps/admin/dist/assets/MDashboardView-BOwauKcj.js @@ -0,0 +1 @@ +import{t as y,f as u}from"./farsi-number-stB7JMN0.js";import{i as Y,L as Z,A as W,P as ss}from"./index-CbZGMCSS.js";import{d as ts,l as es,m as is,c as m,a as s,f as d,b as o,e,R as I,w as G,h as k,n as os,p as as,r as X,o as p,U as ns,t as n,T as j,P as ls,F as rs,y as ds,s as H,i as us,z as _s,_ as cs}from"./index-C4s_T2hP.js";import{P as ms}from"./PlusCircleOutlined-DvvDmI1x.js";import{T as ps}from"./TeamOutlined-Cc_Yyb--.js";const vs={class:"m-dash"},fs={class:"m-dash__toolbar"},bs=["disabled"],ys={class:"m-kpi-grid"},ks={class:"m-kpi indigo"},gs={class:"m-kpi__head"},hs={class:"m-kpi__val"},Cs={class:"m-kpi__sub"},xs={class:"m-kpi amber"},Ss={class:"m-kpi__head"},ws={class:"m-kpi__val"},Ds={class:"m-kpi__sub"},Es={class:"m-kpi emerald"},Os={class:"m-kpi__head"},Rs={class:"m-kpi__val"},Ts={class:"m-kpi violet"},Ls={class:"m-kpi__head"},Ns={class:"m-kpi__val"},As={class:"m-kpi__sub"},Vs={class:"m-quick"},zs={class:"m-card"},Ps={key:0,class:"m-card"},Us={class:"m-winner-row__main"},Fs={class:"m-winner-row__name"},qs={class:"m-winner-row__meta"},Bs={class:"m-winner-row__side"},$s=["onClick"],Ms=ts({__name:"MDashboardView",setup(Ws){const v=us(),_=k(!0),a=k(null),f=k(null);let l=null;const g={NEW:{text:"جدید",color:"blue"},CONTACTED:{text:"تماس",color:"cyan"},DELIVERED:{text:"تحویل",color:"success"},ACTIVE_CODE:{text:"کد فعال",color:"purple"},USED:{text:"مصرف",color:"green"},EXPIRED:{text:"منقضی",color:"default"}};async function h(){_.value=!0;try{const r=await os.get("/admin/reports/dashboard");a.value=r.data,await as(),J()}catch(r){console.error(r)}finally{_.value=!1}}function J(){var t;if(!f.value||!((t=a.value)!=null&&t.spinsByDay))return;l&&l.dispose(),l=Y(f.value);const r=a.value.spinsByDay;l.setOption({grid:{top:16,right:8,bottom:28,left:36},tooltip:{trigger:"axis"},xAxis:{type:"category",data:r.map(c=>y(String(c.date).slice(5))),axisLabel:{fontSize:10,color:"#94a3b8",fontFamily:"IRANSans"},axisLine:{lineStyle:{color:"#e2e8f0"}}},yAxis:{type:"value",axisLabel:{fontSize:10,color:"#94a3b8",fontFamily:"IRANSans"},splitLine:{lineStyle:{color:"#f1f5f9"}}},series:[{name:"اسپین",type:"line",smooth:!0,symbol:"circle",symbolSize:6,data:r.map(c=>c.spins),lineStyle:{width:3,color:"#4f46e5"},itemStyle:{color:"#4f46e5"},areaStyle:{color:new Z(0,0,0,1,[{offset:0,color:"rgba(79,70,229,0.28)"},{offset:1,color:"rgba(79,70,229,0.02)"}])}}]})}function K(r){r&&(navigator.clipboard.writeText(r),_s.success("کد کپی شد"))}return es(()=>{h(),window.addEventListener("resize",()=>l==null?void 0:l.resize())}),is(()=>{l==null||l.dispose()}),(r,t)=>{const c=X("a-tag"),Q=X("a-spin");return p(),m("div",vs,[s("div",fs,[t[4]||(t[4]=s("div",null,[s("div",{class:"m-dash__live"},[s("span",{class:"pulse"}),d(" آنلاین ")]),s("p",{class:"m-dash__sub"},"خلاصه عملکرد سامانه")],-1)),s("button",{type:"button",class:"m-icon-btn",disabled:_.value,onClick:h},[o(e(I),{spin:_.value},null,8,["spin"])],8,bs)]),o(Q,{spinning:_.value},{default:G(()=>{var C,x,S,w,D,E,O,R,T,L,N,A,V,z,P,U;return[s("div",ys,[s("div",ks,[s("div",gs,[t[5]||(t[5]=s("span",null,"کاربران",-1)),o(e(ns))]),s("div",hs,n(e(u)(((x=(C=a.value)==null?void 0:C.stats)==null?void 0:x.totalUsers)||0)),1),s("div",Cs,[o(e(W)),d(" +"+n(e(u)(((w=(S=a.value)==null?void 0:S.stats)==null?void 0:w.todayUsers)||0))+" امروز ",1)])]),s("div",xs,[s("div",Ss,[t[6]||(t[6]=s("span",null,"اسپین‌ها",-1)),o(e(I))]),s("div",ws,n(e(u)(((E=(D=a.value)==null?void 0:D.stats)==null?void 0:E.totalSpins)||0)),1),s("div",Ds,[o(e(W)),d(" +"+n(e(u)(((R=(O=a.value)==null?void 0:O.stats)==null?void 0:R.todaySpins)||0))+" امروز ",1)])]),s("div",Es,[s("div",Os,[t[7]||(t[7]=s("span",null,"برندگان",-1)),o(e(j))]),s("div",Rs,n(e(u)(((L=(T=a.value)==null?void 0:T.stats)==null?void 0:L.totalWinners)||0)),1),t[8]||(t[8]=s("div",{class:"m-kpi__sub"},"کل برندگان ثبت‌شده",-1))]),s("div",Ts,[s("div",Ls,[t[9]||(t[9]=s("span",null,"نرخ برد",-1)),o(e(ss))]),s("div",Ns,n(e(y)(String(((A=(N=a.value)==null?void 0:N.stats)==null?void 0:A.winRate)??0)))+"٪",1),s("div",As,n(e(u)(((z=(V=a.value)==null?void 0:V.stats)==null?void 0:z.activeCampaignsCount)||0))+" کمپین فعال ",1)])]),s("div",Vs,[s("button",{type:"button",class:"m-quick__btn primary",onClick:t[0]||(t[0]=i=>e(v).push("/m/campaigns/create"))},[o(e(ms)),t[10]||(t[10]=d(" کمپین جدید ",-1))]),s("button",{type:"button",class:"m-quick__btn",onClick:t[1]||(t[1]=i=>e(v).push("/m/users"))},[o(e(ps)),t[11]||(t[11]=d(" کاربران ",-1))]),s("button",{type:"button",class:"m-quick__btn",onClick:t[2]||(t[2]=i=>e(v).push("/m/winners"))},[o(e(j)),t[12]||(t[12]=d(" برندگان ",-1))]),s("button",{type:"button",class:"m-quick__btn",onClick:t[3]||(t[3]=i=>e(v).push("/m/reports"))},[o(e(ls)),t[13]||(t[13]=d(" گزارش ",-1))])]),s("div",zs,[t[14]||(t[14]=s("div",{class:"m-card__title"},"روند اسپین روزانه",-1)),s("div",{ref_key:"chartRef",ref:f,class:"m-chart"},null,512)]),(U=(P=a.value)==null?void 0:P.recentWinners)!=null&&U.length?(p(),m("div",Ps,[t[15]||(t[15]=s("div",{class:"m-card__title"},"آخرین برندگان",-1)),(p(!0),m(rs,null,ds(a.value.recentWinners.slice(0,8),i=>{var F,q,B,$,M;return p(),m("div",{key:i.id,class:"m-winner-row"},[s("div",Us,[s("div",Fs,n(((F=i.user)==null?void 0:F.name)||e(y)(((q=i.user)==null?void 0:q.mobile)||"—")),1),s("div",qs,n(((B=i.prize)==null?void 0:B.title)||"—")+" · "+n((($=i.campaign)==null?void 0:$.title)||"—"),1)]),s("div",Bs,[o(c,{color:((M=g[i.status])==null?void 0:M.color)||"default",class:"m-tag"},{default:G(()=>{var b;return[d(n(((b=g[i.status])==null?void 0:b.text)||i.status),1)]}),_:2},1032,["color"]),i.code?(p(),m("button",{key:0,type:"button",class:"m-code",onClick:b=>K(i.code)},n(i.code),9,$s)):H("",!0)])])}),128))])):H("",!0)]}),_:1},8,["spinning"])])}}}),Js=cs(Ms,[["__scopeId","data-v-f792aa47"]]);export{Js as default}; diff --git a/apps/admin/dist/assets/MLoginView-Dn7zttO0.css b/apps/admin/dist/assets/MLoginView-Dn7zttO0.css new file mode 100644 index 0000000..487b603 --- /dev/null +++ b/apps/admin/dist/assets/MLoginView-Dn7zttO0.css @@ -0,0 +1 @@ +.m-login[data-v-e344c244]{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;background:#0f172a}.m-login__hero[data-v-e344c244]{position:relative;flex:0 0 auto;padding:calc(env(safe-area-inset-top,0px) + 48px) 24px 56px;overflow:hidden;background:linear-gradient(160deg,#312e81,#4f46e5 45%,#7c3aed)}.m-login__blob[data-v-e344c244]{position:absolute;border-radius:50%;filter:blur(40px);opacity:.35}.blob-1[data-v-e344c244]{width:180px;height:180px;background:#a78bfa;top:-40px;left:-30px}.blob-2[data-v-e344c244]{width:140px;height:140px;background:#38bdf8;bottom:20px;right:-20px}.m-login__brand[data-v-e344c244]{position:relative;z-index:1;text-align:center;color:#fff}.m-login__logo[data-v-e344c244]{width:72px;height:72px;margin:0 auto 14px;border-radius:20px;background:#ffffff2e;display:flex;align-items:center;justify-content:center;font-size:36px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.m-login__brand h1[data-v-e344c244]{margin:0 0 6px;font-size:24px;font-weight:800}.m-login__brand p[data-v-e344c244]{margin:0;opacity:.85;font-size:13px}.m-login__sheet[data-v-e344c244]{flex:1;margin-top:-28px;background:#fff;border-radius:28px 28px 0 0;padding:28px 20px calc(24px + env(safe-area-inset-bottom,0px));position:relative;z-index:2}.m-login__sheet h2[data-v-e344c244]{margin:0 0 4px;font-size:20px;font-weight:800;color:#0f172a}.m-login__hint[data-v-e344c244]{margin:0 0 22px;color:#64748b;font-size:13px}.m-login__btn[data-v-e344c244]{height:48px!important;border-radius:14px!important;font-weight:700!important;margin-top:8px;background:linear-gradient(135deg,#4f46e5,#7c3aed)!important;border:none!important}[data-v-e344c244] .ant-input-affix-wrapper,[data-v-e344c244] .ant-input{border-radius:12px!important} diff --git a/apps/admin/dist/assets/MLoginView-DrgmodqC.js b/apps/admin/dist/assets/MLoginView-DrgmodqC.js new file mode 100644 index 0000000..0dfdca6 --- /dev/null +++ b/apps/admin/dist/assets/MLoginView-DrgmodqC.js @@ -0,0 +1 @@ +import{d as g,u as b,c as w,k as y,a as n,b as a,w as s,r as t,o as h,e as d,f as x,g as k,h as V,i as S,_ as L}from"./index-C4s_T2hP.js";import{M}from"./MailOutlined-DMDnYu7e.js";import{L as N}from"./LockOutlined-C2VUSHin.js";const z={class:"m-login"},B={class:"m-login__sheet"},C=g({__name:"MLoginView",setup(q){const m=S(),u=b(),o=k({email:"admin@luckywheel.local",password:"Admin@SecurePass2026"}),l=V(!1);async function p(){l.value=!0;try{await u.login({email:o.email,password:o.password}),m.push("/m/dashboard")}catch{}finally{l.value=!1}}return(A,e)=>{const _=t("a-input"),r=t("a-form-item"),c=t("a-input-password"),v=t("a-button"),f=t("a-form");return h(),w("div",z,[e[5]||(e[5]=y('
',1)),n("div",B,[e[3]||(e[3]=n("h2",null,"ورود به حساب",-1)),e[4]||(e[4]=n("p",{class:"m-login__hint"},"با حساب ادمین وارد شوید",-1)),a(f,{model:o,layout:"vertical",onFinish:p},{default:s(()=>[a(r,{label:"ایمیل",name:"email",rules:[{required:!0,message:"ایمیل را وارد کنید"},{type:"email",message:"فرمت ایمیل نامعتبر است"}]},{default:s(()=>[a(_,{value:o.email,"onUpdate:value":e[0]||(e[0]=i=>o.email=i),size:"large",placeholder:"admin@example.com"},{prefix:s(()=>[a(d(M),{style:{color:"#6366f1"}})]),_:1},8,["value"])]),_:1}),a(r,{label:"کلمه عبور",name:"password",rules:[{required:!0,message:"کلمه عبور را وارد کنید"}]},{default:s(()=>[a(c,{value:o.password,"onUpdate:value":e[1]||(e[1]=i=>o.password=i),size:"large",placeholder:"••••••••"},{prefix:s(()=>[a(d(N),{style:{color:"#6366f1"}})]),_:1},8,["value"])]),_:1}),a(v,{type:"primary","html-type":"submit",size:"large",block:"",loading:l.value,class:"m-login__btn"},{default:s(()=>[...e[2]||(e[2]=[x(" ورود ",-1)])]),_:1},8,["loading"])]),_:1},8,["model"])])])}}}),F=L(C,[["__scopeId","data-v-e344c244"]]);export{F as default}; diff --git a/apps/admin/dist/assets/MPrizeListView-BJ9r9FLG.css b/apps/admin/dist/assets/MPrizeListView-BJ9r9FLG.css new file mode 100644 index 0000000..e397b9d --- /dev/null +++ b/apps/admin/dist/assets/MPrizeListView-BJ9r9FLG.css @@ -0,0 +1 @@ +.m-page[data-v-14adecb4]{padding:12px 14px 88px}.m-banner[data-v-14adecb4]{display:flex;justify-content:space-between;align-items:center;background:#fff;border-radius:16px;padding:14px;margin-bottom:12px;border:1px solid #f1f5f9}.m-banner__title[data-v-14adecb4]{font-weight:800;font-size:15px;color:#0f172a}.m-banner__sub[data-v-14adecb4]{font-size:11px;color:#94a3b8;margin-top:2px}.m-icon-btn[data-v-14adecb4]{width:40px;height:40px;border:none;border-radius:12px;background:#eef2ff;color:#4f46e5;font-size:15px}.m-empty[data-v-14adecb4]{text-align:center;color:#94a3b8;padding:40px 12px}.m-prize-card[data-v-14adecb4]{display:flex;gap:0;background:#fff;border-radius:16px;overflow:hidden;margin-bottom:10px;border:1px solid #f1f5f9}.m-prize-card__color[data-v-14adecb4]{width:8px;flex-shrink:0}.m-prize-card__body[data-v-14adecb4]{flex:1;padding:12px}.m-prize-card__top[data-v-14adecb4]{display:flex;justify-content:space-between;gap:8px;margin-bottom:6px}.m-prize-card__title[data-v-14adecb4]{font-weight:800;font-size:14px;color:#0f172a}.m-prize-card__meta[data-v-14adecb4]{font-size:11px;color:#64748b;margin-bottom:4px}.m-prize-card__actions[data-v-14adecb4]{display:flex;gap:6px;margin-top:10px}.m-action[data-v-14adecb4]{flex:1;border:1px solid #e2e8f0;background:#f8fafc;border-radius:10px;padding:10px;font-size:11px;font-weight:700;color:#334155;min-height:42px}.m-action.danger[data-v-14adecb4]{color:#ef4444;flex:0 0 48px}.m-fab[data-v-14adecb4]{position:fixed;left:18px;bottom:calc(80px + env(safe-area-inset-bottom,0px));width:56px;height:56px;border:none;border-radius:18px;background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;font-size:22px;box-shadow:0 10px 24px #4f46e566;z-index:90} diff --git a/apps/admin/dist/assets/MPrizeListView-C8piSCMK.js b/apps/admin/dist/assets/MPrizeListView-C8piSCMK.js new file mode 100644 index 0000000..4e9ed97 --- /dev/null +++ b/apps/admin/dist/assets/MPrizeListView-C8piSCMK.js @@ -0,0 +1 @@ +import{f as L,p as E,t as K}from"./farsi-number-stB7JMN0.js";import{d as tt,h as v,l as et,c as k,a as s,t as m,b as l,e as g,R as at,s as w,w as i,D as lt,Q as nt,n as I,r as c,g as B,o as f,F as it,y as st,f as r,x as H,z as _,G as ot,E as ut,X as rt,J as dt,Z as pt,_ as ct}from"./index-C4s_T2hP.js";const mt={class:"m-page"},vt={key:0,class:"m-banner"},gt={class:"m-banner__title"},ft={key:0,class:"m-empty"},_t={class:"m-prize-card__body"},yt={class:"m-prize-card__top"},kt={class:"m-prize-card__title"},It={class:"m-prize-card__meta"},Ct={class:"m-prize-card__meta"},Tt={class:"m-prize-card__actions"},bt=["onClick"],St=["onClick"],zt=["onClick"],Et=tt({__name:"MPrizeListView",setup(wt){const Z=nt(),C=v(Z.params.campaignId||""),V=v(null),T=v(!1),b=v([]),S=v(!1),D=v(!1),y=v(!1),O=v(null),e=B({title:"",description:"",type:"DISCOUNT_CODE",stockType:"LIMITED",initialStock:100,remainingStock:100,weight:10,segmentColor:"#FF6B6B",sortOrder:1,status:"ACTIVE"}),o=B({prizeId:"",prizeTitle:"",currentStock:0,change:0,reason:""}),P=pt(()=>b.value.reduce((n,t)=>n+(t.status==="ACTIVE"||t.isActive?t.weight:0),0));async function h(){if(!C.value)return;const n=await I.get(`/admin/campaigns/${C.value}`);V.value=n.data}async function z(){var n;if(C.value){T.value=!0;try{const t=await I.get(`/admin/campaigns/${C.value}/prizes`);b.value=Array.isArray(t.data)?t.data:((n=t.data)==null?void 0:n.data)||[]}finally{T.value=!1}}}function j(){O.value=null,Object.assign(e,{title:"",description:"",type:"DISCOUNT_CODE",stockType:"LIMITED",initialStock:100,remainingStock:100,weight:10,segmentColor:"#3880ff",sortOrder:b.value.length+1,status:"ACTIVE"}),S.value=!0}function Y(n){O.value=n.id,e.title=n.title,e.description=n.description||"",e.type=n.type||"DISCOUNT_CODE",e.stockType=n.stockType||"LIMITED",e.initialStock=n.initialStock??100,e.remainingStock=n.remainingStock??100,e.weight=n.weight??10,e.segmentColor=n.segmentColor||n.color||"#3880ff",e.sortOrder=n.sortOrder??1,e.status=n.status||"ACTIVE",S.value=!0}function q(n){o.prizeId=n.id,o.prizeTitle=n.title,o.currentStock=n.remainingStock,o.change=0,o.reason="",D.value=!0}async function G(){var n,t,U,A;if(!((n=e.title)!=null&&n.trim())){_.error("عنوان جایزه الزامی است");return}y.value=!0;try{e.type==="NO_PRIZE"&&(e.stockType="UNLIMITED");const d={title:e.title.trim(),description:((t=e.description)==null?void 0:t.trim())||void 0,type:e.type,stockType:e.stockType,weight:E(e.weight,1)||1,segmentColor:e.segmentColor,sortOrder:E(e.sortOrder,1)||1,status:e.status};e.stockType==="LIMITED"&&(d.initialStock=E(e.initialStock,1),d.remainingStock=E(e.remainingStock,d.initialStock)),O.value?(await I.patch(`/admin/prizes/${O.value}`,d),_.success("جایزه به‌روزرسانی شد")):(await I.post(`/admin/campaigns/${C.value}/prizes`,d),_.success("جایزه ایجاد شد")),S.value=!1,z()}catch(d){const u=((A=(U=d.response)==null?void 0:U.data)==null?void 0:A.message)||"خطا در ثبت جایزه";_.error(Array.isArray(u)?u.join(" | "):u)}finally{y.value=!1}}async function J(){const n=E(o.change,0);if(!n){_.warning("میزان تغییر نباید صفر باشد");return}y.value=!0;try{await I.patch(`/admin/prizes/${o.prizeId}/stock`,{change:n,reason:o.reason||void 0}),_.success("موجودی تغییر کرد"),D.value=!1,z()}finally{y.value=!1}}function Q(n){dt.confirm({title:"حذف جایزه",content:`جایزه «${n.title}» حذف شود؟`,okText:"حذف",okType:"danger",cancelText:"انصراف",onOk:async()=>{await I.delete(`/admin/prizes/${n.id}`),_.success("حذف شد"),z()}})}function W(n){return{PHYSICAL:"فیزیکی",DISCOUNT_CODE:"کد تخفیف",CREDIT:"اعتبار",CASH:"نقدی",NO_PRIZE:"پوچ",OTHER:"سایر"}[n]||n}function X(n){return P.value?K((n.weight/P.value*100).toFixed(1)):"۰"}return et(()=>{h(),z()}),(n,t)=>{const U=c("a-tag"),A=c("a-spin"),d=c("a-input"),u=c("a-form-item"),p=c("a-select-option"),M=c("a-select"),N=c("a-input-number"),x=c("a-button"),F=c("a-form"),R=c("a-drawer");return f(),k("div",mt,[V.value?(f(),k("div",vt,[s("div",null,[s("div",gt,m(V.value.title),1),t[12]||(t[12]=s("div",{class:"m-banner__sub"},"مدیریت جوایز کمپین",-1))]),s("button",{type:"button",class:"m-icon-btn",onClick:z},[l(g(at),{spin:T.value},null,8,["spin"])])])):w("",!0),l(A,{spinning:T.value},{default:i(()=>[!b.value.length&&!T.value?(f(),k("div",ft,"هنوز جایزه‌ای تعریف نشده")):w("",!0),(f(!0),k(it,null,st(b.value,a=>(f(),k("div",{key:a.id,class:"m-prize-card"},[s("div",{class:"m-prize-card__color",style:ot({background:a.segmentColor||a.color||"#4f46e5"})},null,4),s("div",_t,[s("div",yt,[s("div",kt,m(a.title),1),l(U,{color:a.status==="ACTIVE"||a.isActive?"green":"default"},{default:i(()=>[r(m(a.status==="ACTIVE"||a.isActive?"فعال":"غیرفعال"),1)]),_:2},1032,["color"])]),s("div",It,m(W(a.type))+" · وزن "+m(g(L)(a.weight))+" ("+m(X(a))+"٪) ",1),s("div",Ct," موجودی: "+m(a.stockType==="UNLIMITED"?"نامحدود":g(L)(a.remainingStock??0)+" / "+g(L)(a.initialStock??0)),1),s("div",Tt,[s("button",{type:"button",class:"m-action",onClick:$=>Y(a)},[l(g(ut)),t[13]||(t[13]=r(" ویرایش",-1))],8,bt),a.stockType!=="UNLIMITED"?(f(),k("button",{key:0,type:"button",class:"m-action",onClick:$=>q(a)}," موجودی ",8,St)):w("",!0),s("button",{type:"button",class:"m-action danger",onClick:$=>Q(a)},[l(g(rt))],8,zt)])])]))),128))]),_:1},8,["spinning"]),s("button",{type:"button",class:"m-fab",onClick:j},[l(g(lt))]),l(R,{open:S.value,"onUpdate:open":t[8]||(t[8]=a=>S.value=a),placement:"bottom",height:"85%",title:"جایزه",closable:!0},{default:i(()=>[l(F,{layout:"vertical"},{default:i(()=>[l(u,{label:"عنوان",required:""},{default:i(()=>[l(d,{value:e.title,"onUpdate:value":t[0]||(t[0]=a=>e.title=a),size:"large"},null,8,["value"])]),_:1}),l(u,{label:"نوع"},{default:i(()=>[l(M,{value:e.type,"onUpdate:value":t[1]||(t[1]=a=>e.type=a),size:"large",style:{width:"100%"}},{default:i(()=>[l(p,{value:"DISCOUNT_CODE"},{default:i(()=>[...t[14]||(t[14]=[r("کد تخفیف",-1)])]),_:1}),l(p,{value:"PHYSICAL"},{default:i(()=>[...t[15]||(t[15]=[r("فیزیکی",-1)])]),_:1}),l(p,{value:"CREDIT"},{default:i(()=>[...t[16]||(t[16]=[r("اعتبار",-1)])]),_:1}),l(p,{value:"CASH"},{default:i(()=>[...t[17]||(t[17]=[r("نقدی",-1)])]),_:1}),l(p,{value:"NO_PRIZE"},{default:i(()=>[...t[18]||(t[18]=[r("پوچ",-1)])]),_:1}),l(p,{value:"OTHER"},{default:i(()=>[...t[19]||(t[19]=[r("سایر",-1)])]),_:1})]),_:1},8,["value"])]),_:1}),l(u,{label:"نوع موجودی"},{default:i(()=>[l(M,{value:e.stockType,"onUpdate:value":t[2]||(t[2]=a=>e.stockType=a),size:"large",style:{width:"100%"}},{default:i(()=>[l(p,{value:"LIMITED"},{default:i(()=>[...t[20]||(t[20]=[r("محدود",-1)])]),_:1}),l(p,{value:"UNLIMITED"},{default:i(()=>[...t[21]||(t[21]=[r("نامحدود",-1)])]),_:1})]),_:1},8,["value"])]),_:1}),e.stockType==="LIMITED"?(f(),H(u,{key:0,label:"موجودی اولیه"},{default:i(()=>[l(N,{value:e.initialStock,"onUpdate:value":t[3]||(t[3]=a=>e.initialStock=a),min:0,size:"large",style:{width:"100%"}},null,8,["value"])]),_:1})):w("",!0),e.stockType==="LIMITED"?(f(),H(u,{key:1,label:"موجودی مانده"},{default:i(()=>[l(N,{value:e.remainingStock,"onUpdate:value":t[4]||(t[4]=a=>e.remainingStock=a),min:0,size:"large",style:{width:"100%"}},null,8,["value"])]),_:1})):w("",!0),l(u,{label:"وزن"},{default:i(()=>[l(N,{value:e.weight,"onUpdate:value":t[5]||(t[5]=a=>e.weight=a),min:1,size:"large",style:{width:"100%"}},null,8,["value"])]),_:1}),l(u,{label:"رنگ سگمنت"},{default:i(()=>[l(d,{value:e.segmentColor,"onUpdate:value":t[6]||(t[6]=a=>e.segmentColor=a),type:"color",style:{width:"100%",height:"44px"}},null,8,["value"])]),_:1}),l(u,{label:"وضعیت"},{default:i(()=>[l(M,{value:e.status,"onUpdate:value":t[7]||(t[7]=a=>e.status=a),size:"large",style:{width:"100%"}},{default:i(()=>[l(p,{value:"ACTIVE"},{default:i(()=>[...t[22]||(t[22]=[r("فعال",-1)])]),_:1}),l(p,{value:"INACTIVE"},{default:i(()=>[...t[23]||(t[23]=[r("غیرفعال",-1)])]),_:1})]),_:1},8,["value"])]),_:1}),l(x,{type:"primary",block:"",size:"large",loading:y.value,onClick:G},{default:i(()=>[...t[24]||(t[24]=[r(" ذخیره ",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["open"]),l(R,{open:D.value,"onUpdate:open":t[11]||(t[11]=a=>D.value=a),placement:"bottom",height:360,title:"تغییر موجودی"},{default:i(()=>[s("p",null,m(o.prizeTitle)+" — فعلی: "+m(g(L)(o.currentStock)),1),l(F,{layout:"vertical"},{default:i(()=>[l(u,{label:"میزان تغییر (+/-)"},{default:i(()=>[l(N,{value:o.change,"onUpdate:value":t[9]||(t[9]=a=>o.change=a),size:"large",style:{width:"100%"}},null,8,["value"])]),_:1}),l(u,{label:"دلیل"},{default:i(()=>[l(d,{value:o.reason,"onUpdate:value":t[10]||(t[10]=a=>o.reason=a),size:"large"},null,8,["value"])]),_:1}),l(x,{type:"primary",block:"",size:"large",loading:y.value,onClick:J},{default:i(()=>[...t[25]||(t[25]=[r(" اعمال ",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["open"])])}}}),Ut=ct(Et,[["__scopeId","data-v-14adecb4"]]);export{Ut as default}; diff --git a/apps/admin/dist/assets/MReportView-DTKquLxx.css b/apps/admin/dist/assets/MReportView-DTKquLxx.css new file mode 100644 index 0000000..1c23253 --- /dev/null +++ b/apps/admin/dist/assets/MReportView-DTKquLxx.css @@ -0,0 +1 @@ +.m-page[data-v-4a903d28]{padding:12px 14px 24px}.m-filters[data-v-4a903d28]{display:flex;gap:8px;margin-bottom:12px}.m-filters[data-v-4a903d28] .ant-select-selector{border-radius:12px!important;min-height:42px!important}.m-icon-btn[data-v-4a903d28]{width:42px;height:42px;border:none;border-radius:12px;background:#fff;color:#4f46e5}.m-kpi-grid[data-v-4a903d28]{display:grid;grid-template-columns:1fr 1fr;gap:10px}.m-kpi[data-v-4a903d28]{background:#fff;border-radius:16px;padding:16px 12px;text-align:center;border:1px solid #f1f5f9;box-shadow:0 2px 10px #0f172a0a}.m-kpi.wide[data-v-4a903d28]{grid-column:1 / -1}.ico[data-v-4a903d28]{font-size:18px;margin-bottom:8px}.ico.indigo[data-v-4a903d28]{color:#4f46e5}.ico.amber[data-v-4a903d28]{color:#d97706}.ico.emerald[data-v-4a903d28]{color:#059669}.ico.violet[data-v-4a903d28]{color:#7c3aed}.ico.blue[data-v-4a903d28]{color:#2563eb}.ico.slate[data-v-4a903d28]{color:#64748b}.val[data-v-4a903d28]{font-size:22px;font-weight:800;color:#0f172a}.lbl[data-v-4a903d28]{font-size:11px;color:#64748b;margin-top:4px;font-weight:600} diff --git a/apps/admin/dist/assets/MReportView-Q03nS5y6.js b/apps/admin/dist/assets/MReportView-Q03nS5y6.js new file mode 100644 index 0000000..acdd799 --- /dev/null +++ b/apps/admin/dist/assets/MReportView-Q03nS5y6.js @@ -0,0 +1 @@ +import{f as n}from"./farsi-number-stB7JMN0.js";import{d as B,l as N,c as w,a as s,b as e,w as v,e as t,R as S,h as m,g as A,n as x,r as u,o as _,F,y as M,U as T,t as o,T as z,x as G,f as D,_ as E}from"./index-C4s_T2hP.js";import{T as U}from"./ThunderboltOutlined-DP1eBOSO.js";import{G as L}from"./GiftOutlined-DgNzKaks.js";import{T as j}from"./TeamOutlined-Cc_Yyb--.js";const q={class:"m-page"},H={class:"m-filters"},J={class:"m-kpi-grid"},K={class:"m-kpi"},P={class:"val"},Q={class:"m-kpi"},W={class:"val"},X={class:"m-kpi"},Y={class:"val"},Z={class:"m-kpi"},$={class:"val"},ss={class:"m-kpi"},as={class:"val"},ts={class:"m-kpi"},es={class:"val"},is={class:"m-kpi wide"},ls={class:"val"},os=B({__name:"MReportView",setup(ns){const c=m(!1),i=m(null),f=m([]),r=A({campaignId:void 0});async function I(){var a;const d=await x.get("/admin/campaigns",{params:{pageSize:100}});f.value=Array.isArray(d.data)?d.data:((a=d.data)==null?void 0:a.data)||[]}async function p(){c.value=!0;try{const d=await x.get("/admin/reports/participation",{params:{campaignId:r.campaignId||void 0}});i.value=d.data}finally{c.value=!1}}return N(()=>{I(),p()}),(d,a)=>{const O=u("a-select-option"),R=u("a-select"),V=u("a-spin");return _(),w("div",q,[s("div",H,[e(R,{value:r.campaignId,"onUpdate:value":a[0]||(a[0]=l=>r.campaignId=l),"allow-clear":"",placeholder:"همه کمپین‌ها",style:{flex:"1"},onChange:p},{default:v(()=>[(_(!0),w(F,null,M(f.value,l=>(_(),G(O,{key:l.id,value:l.id},{default:v(()=>[D(o(l.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"]),s("button",{type:"button",class:"m-icon-btn",onClick:p},[e(t(S),{spin:c.value},null,8,["spin"])])]),e(V,{spinning:c.value},{default:v(()=>{var l,g,b,k,y,h,C;return[s("div",J,[s("div",K,[e(t(T),{class:"ico indigo"}),s("div",P,o(t(n)(((l=i.value)==null?void 0:l.totalUsers)||0)),1),a[1]||(a[1]=s("div",{class:"lbl"},"کل کاربران",-1))]),s("div",Q,[e(t(U),{class:"ico amber"}),s("div",W,o(t(n)(((g=i.value)==null?void 0:g.totalSpins)||0)),1),a[2]||(a[2]=s("div",{class:"lbl"},"کل اسپین",-1))]),s("div",X,[e(t(z),{class:"ico emerald"}),s("div",Y,o(t(n)(((b=i.value)==null?void 0:b.winnersCount)||0)),1),a[3]||(a[3]=s("div",{class:"lbl"},"برندگان",-1))]),s("div",Z,[e(t(L),{class:"ico violet"}),s("div",$,o(t(n)(((k=i.value)==null?void 0:k.totalChancesAllocated)||0)),1),a[4]||(a[4]=s("div",{class:"lbl"},"شانس تخصیص",-1))]),s("div",ss,[e(t(j),{class:"ico blue"}),s("div",as,o(t(n)(((y=i.value)==null?void 0:y.totalChancesUsed)||0)),1),a[5]||(a[5]=s("div",{class:"lbl"},"شانس مصرف",-1))]),s("div",ts,[e(t(T),{class:"ico slate"}),s("div",es,o(t(n)(((h=i.value)==null?void 0:h.zeroSpinUsers)||0)),1),a[6]||(a[6]=s("div",{class:"lbl"},"بدون اسپین",-1))]),s("div",is,[e(t(U),{class:"ico indigo"}),s("div",ls,o(t(n)(((C=i.value)==null?void 0:C.remainingChanceUsers)||0)),1),a[7]||(a[7]=s("div",{class:"lbl"},"کاربران با شانس باقی‌مانده",-1))])])]}),_:1},8,["spinning"])])}}}),ms=E(os,[["__scopeId","data-v-4a903d28"]]);export{ms as default}; diff --git a/apps/admin/dist/assets/MSmsLogView-DCYQGMw5.js b/apps/admin/dist/assets/MSmsLogView-DCYQGMw5.js new file mode 100644 index 0000000..34f8c8f --- /dev/null +++ b/apps/admin/dist/assets/MSmsLogView-DCYQGMw5.js @@ -0,0 +1 @@ +import{t as k}from"./farsi-number-stB7JMN0.js";import{b as o,I as P,d as V,l as j,c as p,a as u,w as f,e as x,R as B,h as O,g as R,n as I,r as v,o as m,f as y,s as w,F as T,y as $,t as g,z as Q,_ as q}from"./index-C4s_T2hP.js";var G={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"}}]},name:"send",theme:"outlined"};function M(l){for(var a=1;a{const S=v("a-input"),_=v("a-select-option"),d=v("a-select"),h=v("a-tag"),U=v("a-pagination"),F=v("a-spin");return m(),p("div",J,[u("div",W,[o(S,{value:n.mobile,"onUpdate:value":t[0]||(t[0]=e=>n.mobile=e),"allow-clear":"",placeholder:"شماره موبایل...",onPressEnter:L},null,8,["value"]),u("div",X,[o(d,{value:n.status,"onUpdate:value":t[1]||(t[1]=e=>n.status=e),"allow-clear":"",placeholder:"وضعیت",style:{flex:"1"},onChange:L},{default:f(()=>[o(_,{value:"SENT"},{default:f(()=>[...t[3]||(t[3]=[y("ارسال شد",-1)])]),_:1}),o(_,{value:"QUEUED"},{default:f(()=>[...t[4]||(t[4]=[y("صف",-1)])]),_:1}),o(_,{value:"FAILED"},{default:f(()=>[...t[5]||(t[5]=[y("ناموفق",-1)])]),_:1})]),_:1},8,["value"]),u("button",{type:"button",class:"m-icon-btn",onClick:b},[o(x(B),{spin:a.value},null,8,["spin"])])])]),o(F,{spinning:a.value},{default:f(()=>[!s.value.length&&!a.value?(m(),p("div",Y,"لاگی یافت نشد")):w("",!0),(m(!0),p(T,null,$(s.value,e=>{var C;return m(),p("div",{key:e.id,class:"m-card"},[u("div",Z,[u("span",K,g(x(k)(e.mobile)),1),o(h,{color:((C=D[e.status])==null?void 0:C.color)||"default"},{default:f(()=>{var E;return[y(g(((E=D[e.status])==null?void 0:E.text)||e.status),1)]}),_:2},1032,["color"])]),u("div",ee,g(e.message),1),u("div",te,[u("span",null,g(e.provider||"—"),1),u("span",null,g(N(e.createdAt)),1)]),e.errorMessage?(m(),p("div",ae,g(e.errorMessage),1)):w("",!0),e.status==="FAILED"?(m(),p("button",{key:1,type:"button",class:"m-resend",disabled:c.value===e.id,onClick:E=>A(e.id)},[o(x(z)),t[6]||(t[6]=y(" ارسال مجدد ",-1))],8,se)):w("",!0)])}),128)),r.value>n.pageSize?(m(),p("div",ne,[o(U,{current:n.page,"onUpdate:current":t[2]||(t[2]=e=>n.page=e),total:r.value,"page-size":n.pageSize,size:"small",onChange:b},null,8,["current","total","page-size"])])):w("",!0)]),_:1},8,["spinning"])])}}}),ie=q(oe,[["__scopeId","data-v-fe6c23bf"]]);export{ie as default}; diff --git a/apps/admin/dist/assets/MSmsLogView-Duj12zla.css b/apps/admin/dist/assets/MSmsLogView-Duj12zla.css new file mode 100644 index 0000000..beda7d1 --- /dev/null +++ b/apps/admin/dist/assets/MSmsLogView-Duj12zla.css @@ -0,0 +1 @@ +.m-page[data-v-fe6c23bf]{padding:12px 14px 24px}.m-filters[data-v-fe6c23bf]{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}.m-filters__row[data-v-fe6c23bf]{display:flex;gap:8px}.m-filters[data-v-fe6c23bf] .ant-input,.m-filters[data-v-fe6c23bf] .ant-select-selector{border-radius:12px!important;min-height:42px!important}.m-icon-btn[data-v-fe6c23bf]{width:42px;height:42px;border:none;border-radius:12px;background:#fff;color:#4f46e5}.m-empty[data-v-fe6c23bf]{text-align:center;color:#94a3b8;padding:40px}.m-card[data-v-fe6c23bf]{background:#fff;border-radius:14px;padding:12px;margin-bottom:8px;border:1px solid #f1f5f9}.m-card__top[data-v-fe6c23bf]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.mobile[data-v-fe6c23bf]{font-weight:800;color:#0f172a;font-size:13px}.m-card__msg[data-v-fe6c23bf]{font-size:12px;color:#334155;line-height:1.6;margin-bottom:8px}.m-card__meta[data-v-fe6c23bf]{display:flex;justify-content:space-between;font-size:11px;color:#94a3b8}.m-card__err[data-v-fe6c23bf]{margin-top:8px;font-size:11px;color:#ef4444;background:#fef2f2;padding:8px;border-radius:8px}.m-resend[data-v-fe6c23bf]{margin-top:10px;width:100%;border:none;background:#eef2ff;color:#4f46e5;border-radius:10px;padding:10px;font-weight:700;font-size:12px;min-height:42px}.m-pager[data-v-fe6c23bf]{display:flex;justify-content:center;padding:12px 0} diff --git a/apps/admin/dist/assets/MSpinListView-CaxIdVKC.css b/apps/admin/dist/assets/MSpinListView-CaxIdVKC.css new file mode 100644 index 0000000..0a67356 --- /dev/null +++ b/apps/admin/dist/assets/MSpinListView-CaxIdVKC.css @@ -0,0 +1 @@ +.m-page[data-v-bff371ec]{padding:12px 14px 24px}.m-filters[data-v-bff371ec]{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}.m-filters__row[data-v-bff371ec]{display:flex;gap:8px}.m-filters[data-v-bff371ec] .ant-input-affix-wrapper,.m-filters[data-v-bff371ec] .ant-select-selector{border-radius:12px!important;min-height:42px!important}.m-icon-btn[data-v-bff371ec]{width:42px;height:42px;border:none;border-radius:12px;background:#fff;color:#4f46e5;box-shadow:0 2px 8px #0f172a0f}.m-empty[data-v-bff371ec]{text-align:center;color:#94a3b8;padding:40px}.m-card[data-v-bff371ec]{background:#fff;border-radius:14px;padding:12px;margin-bottom:8px;border:1px solid #f1f5f9}.m-card__top[data-v-bff371ec]{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.m-card__user[data-v-bff371ec]{border:none;background:transparent;padding:0;font-weight:800;color:#4f46e5;font-size:13px}.m-pill[data-v-bff371ec]{font-size:10px;font-weight:700;padding:3px 8px;border-radius:999px}.m-pill.win[data-v-bff371ec]{background:#ecfdf5;color:#059669}.m-pill.lose[data-v-bff371ec]{background:#f1f5f9;color:#64748b}.m-card__line[data-v-bff371ec]{font-size:12px;color:#334155;margin-bottom:2px}.m-card__meta[data-v-bff371ec]{display:flex;justify-content:space-between;margin-top:8px;font-size:11px;color:#94a3b8}.m-pager[data-v-bff371ec]{display:flex;justify-content:center;padding:12px 0} diff --git a/apps/admin/dist/assets/MSpinListView-D8QgZHY1.js b/apps/admin/dist/assets/MSpinListView-D8QgZHY1.js new file mode 100644 index 0000000..ceb2889 --- /dev/null +++ b/apps/admin/dist/assets/MSpinListView-D8QgZHY1.js @@ -0,0 +1 @@ +import{t as A}from"./farsi-number-stB7JMN0.js";import{d as U,l as E,c as r,a as s,b as c,w as v,e as f,R as O,h,g as W,n as V,r as p,o,S as $,F as D,y as N,s as B,i as P,x as T,f as j,t as l,N as q,_ as G}from"./index-C4s_T2hP.js";const H={class:"m-page"},J={class:"m-filters"},K={class:"m-filters__row"},Q={key:0,class:"m-empty"},X={class:"m-card__top"},Y=["onClick"],Z={class:"m-card__line"},aa={class:"m-card__line"},ea={class:"m-card__meta"},ta={dir:"ltr"},sa={key:1,class:"m-pager"},na=U({__name:"MSpinListView",setup(ia){const L=P(),d=h(!1),y=h([]),S=h(0),C=h([]),e=W({page:1,pageSize:10,campaignId:void 0,search:""});async function R(){var t;const n=await V.get("/admin/campaigns",{params:{pageSize:100}});C.value=Array.isArray(n.data)?n.data:((t=n.data)==null?void 0:t.data)||[]}async function u(){var n,t,_,m;d.value=!0;try{const i=await V.get("/admin/spins",{params:{page:e.page,pageSize:e.pageSize,campaignId:e.campaignId||void 0,search:e.search||void 0}}),g=Array.isArray(i.data)?i.data:((n=i.data)==null?void 0:n.data)||[];y.value=g,S.value=((t=i.meta)==null?void 0:t.total)||((m=(_=i.data)==null?void 0:_.meta)==null?void 0:m.total)||g.length}finally{d.value=!1}}function w(){e.page=1,u()}function F(n){return n?A(new Date(n).toLocaleDateString("fa-IR",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})):"—"}return E(()=>{R(),u()}),(n,t)=>{const _=p("a-input"),m=p("a-select-option"),i=p("a-select"),g=p("a-pagination"),M=p("a-spin");return o(),r("div",H,[s("div",J,[c(_,{value:e.search,"onUpdate:value":t[0]||(t[0]=a=>e.search=a),"allow-clear":"",placeholder:"موبایل کاربر...",onPressEnter:w},{prefix:v(()=>[c(f($),{style:{color:"#94a3b8"}})]),_:1},8,["value"]),s("div",K,[c(i,{value:e.campaignId,"onUpdate:value":t[1]||(t[1]=a=>e.campaignId=a),"allow-clear":"",placeholder:"کمپین",style:{flex:"1"},onChange:w},{default:v(()=>[(o(!0),r(D,null,N(C.value,a=>(o(),T(m,{key:a.id,value:a.id},{default:v(()=>[j(l(a.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"]),s("button",{type:"button",class:"m-icon-btn",onClick:u},[c(f(O),{spin:d.value},null,8,["spin"])])])]),c(M,{spinning:d.value},{default:v(()=>[!y.value.length&&!d.value?(o(),r("div",Q,"اسپینی یافت نشد")):B("",!0),(o(!0),r(D,null,N(y.value,a=>{var z,k,b,x;return o(),r("div",{key:a.id,class:"m-card"},[s("div",X,[s("button",{type:"button",class:"m-card__user",onClick:oa=>{var I;return((I=a.user)==null?void 0:I.id)&&f(L).push(`/m/users/${a.user.id}`)}},l(((z=a.user)==null?void 0:z.name)||f(A)(((k=a.user)==null?void 0:k.mobile)||"—")),9,Y),s("span",{class:q(["m-pill",a.isWin?"win":"lose"])},l(a.isWin?"برد":"باخت"),3)]),s("div",Z,l(((b=a.campaign)==null?void 0:b.title)||"—"),1),s("div",aa,"جایزه: "+l(((x=a.prize)==null?void 0:x.title)||"—"),1),s("div",ea,[s("span",ta,l(a.ipAddress||"—"),1),s("span",null,l(F(a.createdAt)),1)])])}),128)),S.value>e.pageSize?(o(),r("div",sa,[c(g,{current:e.page,"onUpdate:current":t[2]||(t[2]=a=>e.page=a),total:S.value,"page-size":e.pageSize,size:"small",onChange:u},null,8,["current","total","page-size"])])):B("",!0)]),_:1},8,["spinning"])])}}}),ca=G(na,[["__scopeId","data-v-bff371ec"]]);export{ca as default}; diff --git a/apps/admin/dist/assets/MUserDetailView-BLWa_4fj.js b/apps/admin/dist/assets/MUserDetailView-BLWa_4fj.js new file mode 100644 index 0000000..fc16930 --- /dev/null +++ b/apps/admin/dist/assets/MUserDetailView-BLWa_4fj.js @@ -0,0 +1 @@ +import{t as T,f as L}from"./farsi-number-stB7JMN0.js";import{d as te,h as d,l as ae,c as o,b as u,w as v,Q as se,n as O,r as m,o as l,a as t,t as s,e as f,N as I,R as ne,f as D,s as p,F as A,y as B,z as W,x as le,_ as oe}from"./index-C4s_T2hP.js";import{P as ie}from"./PlusCircleOutlined-DvvDmI1x.js";const ue={class:"m-page"},re={key:0,class:"m-profile"},de={class:"m-profile__avatar"},ce={class:"m-profile__name"},ve={class:"m-profile__mobile"},me={class:"m-profile__meta"},_e={class:"m-profile__actions"},pe={class:"m-tabs"},ge={key:1},fe={class:"m-card__title"},ye={class:"m-card__row"},be={class:"m-card__row"},Ce=["onClick"],ke={key:0,class:"m-empty"},we={key:2},he={class:"m-card__title"},ze={class:"m-card__row"},Ie={dir:"ltr"},De={class:"m-card__row"},Ae={class:"m-card__row"},Be={key:0,class:"m-empty"},Ue={key:3},Ve={class:"m-card__title"},xe={class:"m-card__row"},Ne={class:"m-card__row"},$e={dir:"ltr"},Re={class:"m-card__row"},Fe={key:0,class:"m-empty"},Le=te({__name:"MUserDetailView",setup(Oe){const q=se(),U=d(q.params.id||""),V=d(!1),n=d(null),c=d("chances"),x=d([]),b=d(!1),N=d(!1),y=d(""),C=d(1),k=d("");async function G(){var e;const r=await O.get("/admin/campaigns",{params:{pageSize:100}});x.value=Array.isArray(r.data)?r.data:((e=r.data)==null?void 0:e.data)||[]}async function $(){if(U.value){V.value=!0;try{const r=await O.get(`/admin/users/${U.value}`);n.value=r.data}finally{V.value=!1}}}function S(r){var e,w,h,z,g;y.value=r||((h=(w=(e=n.value)==null?void 0:e.userCampaigns)==null?void 0:w[0])==null?void 0:h.campaignId)||((g=(z=x.value)==null?void 0:z[0])==null?void 0:g.id)||"",C.value=1,k.value="اهدای شانس تشویقی توسط مدیر",b.value=!0}async function H(){if(!y.value){W.error("انتخاب کمپین الزامی است");return}N.value=!0;try{await O.post("/admin/chances/adjust",{userId:U.value,campaignId:y.value,amount:C.value,reason:k.value}),W.success("شانس تغییر کرد"),b.value=!1,$()}finally{N.value=!1}}function R(r){return r?T(new Date(r).toLocaleDateString("fa-IR",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})):"—"}return ae(()=>{$(),G()}),(r,e)=>{const w=m("a-spin"),h=m("a-select-option"),z=m("a-select"),g=m("a-form-item"),J=m("a-input-number"),X=m("a-input"),Y=m("a-button"),Z=m("a-form"),ee=m("a-drawer");return l(),o("div",ue,[u(w,{spinning:V.value},{default:v(()=>{var i,E,M,P,K,j;return[n.value?(l(),o("div",re,[t("div",de,s((n.value.name||n.value.mobile||"؟").charAt(0)),1),t("div",ce,s(n.value.name||"بدون نام"),1),t("div",ve,s(f(T)(n.value.mobile)),1),t("div",me,[t("span",{class:I(n.value.status==="BLOCKED"||n.value.isBlocked?"bad":"ok")},s(n.value.status==="BLOCKED"||n.value.isBlocked?"مسدود":"فعال"),3),t("span",null,"عضویت "+s(R(n.value.createdAt)),1)]),t("div",_e,[t("button",{type:"button",class:"m-btn ghost",onClick:$},[u(f(ne)),e[8]||(e[8]=D(" بروزرسانی",-1))]),t("button",{type:"button",class:"m-btn primary",onClick:e[0]||(e[0]=a=>S())},[u(f(ie)),e[9]||(e[9]=D(" افزودن شانس ",-1))])])])):p("",!0),t("div",pe,[t("button",{type:"button",class:I({active:c.value==="chances"}),onClick:e[1]||(e[1]=a=>c.value="chances")},"شانس‌ها",2),t("button",{type:"button",class:I({active:c.value==="prizes"}),onClick:e[2]||(e[2]=a=>c.value="prizes")},"جوایز",2),t("button",{type:"button",class:I({active:c.value==="spins"}),onClick:e[3]||(e[3]=a=>c.value="spins")},"اسپین‌ها",2)]),c.value==="chances"?(l(),o("div",ge,[(l(!0),o(A,null,B(((i=n.value)==null?void 0:i.userCampaigns)||[],a=>{var _;return l(),o("div",{key:a.id||a.campaignId,class:"m-card"},[t("div",fe,s(((_=a.campaign)==null?void 0:_.title)||"کمپین"),1),t("div",ye,[e[10]||(e[10]=t("span",null,"باقی‌مانده",-1)),t("strong",null,s(f(L)(a.remainingChances||0)),1)]),t("div",be,[e[11]||(e[11]=t("span",null,"کل / مصرف",-1)),t("strong",null,s(f(L)(a.totalChances||0))+" / "+s(f(L)(a.usedChances||0)),1)]),t("button",{type:"button",class:"m-link",onClick:F=>{var Q;return S(a.campaignId||((Q=a.campaign)==null?void 0:Q.id))}}," تنظیم شانس ",8,Ce)])}),128)),(((E=n.value)==null?void 0:E.userCampaigns)||[]).length?p("",!0):(l(),o("div",ke,"شانسی ثبت نشده"))])):p("",!0),c.value==="prizes"?(l(),o("div",we,[(l(!0),o(A,null,B(((M=n.value)==null?void 0:M.prizes)||[],a=>{var _;return l(),o("div",{key:a.id,class:"m-card"},[t("div",he,s(((_=a.prize)==null?void 0:_.title)||"—"),1),t("div",ze,[e[12]||(e[12]=t("span",null,"کد",-1)),t("strong",Ie,s(a.code||"—"),1)]),t("div",De,[e[13]||(e[13]=t("span",null,"وضعیت",-1)),t("strong",null,s(a.status),1)]),t("div",Ae,[e[14]||(e[14]=t("span",null,"تاریخ",-1)),t("strong",null,s(R(a.createdAt)),1)])])}),128)),(((P=n.value)==null?void 0:P.prizes)||[]).length?p("",!0):(l(),o("div",Be,"جایزه‌ای نیست"))])):p("",!0),c.value==="spins"?(l(),o("div",Ue,[(l(!0),o(A,null,B(((K=n.value)==null?void 0:K.spins)||[],a=>{var _,F;return l(),o("div",{key:a.id,class:"m-card"},[t("div",Ve,s(((_=a.campaign)==null?void 0:_.title)||"—"),1),t("div",xe,[e[15]||(e[15]=t("span",null,"نتیجه",-1)),t("strong",null,s(a.isWin?"برد":"باخت")+" · "+s(((F=a.prize)==null?void 0:F.title)||"—"),1)]),t("div",Ne,[e[16]||(e[16]=t("span",null,"IP",-1)),t("strong",$e,s(a.ipAddress||"—"),1)]),t("div",Re,[e[17]||(e[17]=t("span",null,"زمان",-1)),t("strong",null,s(R(a.createdAt)),1)])])}),128)),(((j=n.value)==null?void 0:j.spins)||[]).length?p("",!0):(l(),o("div",Fe,"اسپینی نیست"))])):p("",!0)]}),_:1},8,["spinning"]),u(ee,{open:b.value,"onUpdate:open":e[7]||(e[7]=i=>b.value=i),placement:"bottom",height:420,title:"تنظیم شانس"},{default:v(()=>[u(Z,{layout:"vertical"},{default:v(()=>[u(g,{label:"کمپین"},{default:v(()=>[u(z,{value:y.value,"onUpdate:value":e[4]||(e[4]=i=>y.value=i),size:"large",style:{width:"100%"}},{default:v(()=>[(l(!0),o(A,null,B(x.value,i=>(l(),le(h,{key:i.id,value:i.id},{default:v(()=>[D(s(i.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),u(g,{label:"مقدار"},{default:v(()=>[u(J,{value:C.value,"onUpdate:value":e[5]||(e[5]=i=>C.value=i),size:"large",style:{width:"100%"}},null,8,["value"])]),_:1}),u(g,{label:"دلیل"},{default:v(()=>[u(X,{value:k.value,"onUpdate:value":e[6]||(e[6]=i=>k.value=i),size:"large"},null,8,["value"])]),_:1}),u(Y,{type:"primary",block:"",size:"large",loading:N.value,onClick:H},{default:v(()=>[...e[18]||(e[18]=[D(" اعمال ",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["open"])])}}}),Pe=oe(Le,[["__scopeId","data-v-a4d5a217"]]);export{Pe as default}; diff --git a/apps/admin/dist/assets/MUserDetailView-py6fm5vE.css b/apps/admin/dist/assets/MUserDetailView-py6fm5vE.css new file mode 100644 index 0000000..8ae2e56 --- /dev/null +++ b/apps/admin/dist/assets/MUserDetailView-py6fm5vE.css @@ -0,0 +1 @@ +.m-page[data-v-a4d5a217]{padding:12px 14px 24px}.m-profile[data-v-a4d5a217]{background:#fff;border-radius:18px;padding:20px 16px;text-align:center;border:1px solid #f1f5f9;margin-bottom:12px}.m-profile__avatar[data-v-a4d5a217]{width:64px;height:64px;margin:0 auto 10px;border-radius:20px;background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:800}.m-profile__name[data-v-a4d5a217]{font-size:17px;font-weight:800;color:#0f172a}.m-profile__mobile[data-v-a4d5a217]{font-size:13px;color:#64748b;direction:ltr;margin-top:4px}.m-profile__meta[data-v-a4d5a217]{display:flex;justify-content:center;gap:10px;margin-top:10px;font-size:11px;color:#94a3b8}.m-profile__meta .ok[data-v-a4d5a217]{color:#059669;font-weight:700}.m-profile__meta .bad[data-v-a4d5a217]{color:#ef4444;font-weight:700}.m-profile__actions[data-v-a4d5a217]{display:flex;gap:8px;margin-top:14px}.m-btn[data-v-a4d5a217]{flex:1;border:none;border-radius:12px;min-height:44px;font-weight:700;font-size:12px;display:inline-flex;align-items:center;justify-content:center;gap:6px}.m-btn.ghost[data-v-a4d5a217]{background:#f1f5f9;color:#334155}.m-btn.primary[data-v-a4d5a217]{background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff}.m-tabs[data-v-a4d5a217]{display:flex;background:#fff;border-radius:14px;padding:4px;margin-bottom:12px;gap:4px}.m-tabs button[data-v-a4d5a217]{flex:1;border:none;background:transparent;border-radius:10px;padding:10px;font-size:12px;font-weight:700;color:#64748b;min-height:40px}.m-tabs button.active[data-v-a4d5a217]{background:#eef2ff;color:#4f46e5}.m-card[data-v-a4d5a217]{background:#fff;border-radius:14px;padding:14px;margin-bottom:8px;border:1px solid #f1f5f9}.m-card__title[data-v-a4d5a217]{font-weight:800;font-size:14px;margin-bottom:8px;color:#0f172a}.m-card__row[data-v-a4d5a217]{display:flex;justify-content:space-between;font-size:12px;color:#64748b;margin-bottom:4px}.m-card__row strong[data-v-a4d5a217]{color:#0f172a}.m-link[data-v-a4d5a217]{margin-top:8px;border:none;background:#eef2ff;color:#4f46e5;border-radius:10px;width:100%;padding:10px;font-weight:700;font-size:12px}.m-empty[data-v-a4d5a217]{text-align:center;color:#94a3b8;padding:28px;font-size:13px} diff --git a/apps/admin/dist/assets/MUserListView-Bh6XqVjX.css b/apps/admin/dist/assets/MUserListView-Bh6XqVjX.css new file mode 100644 index 0000000..4b9af30 --- /dev/null +++ b/apps/admin/dist/assets/MUserListView-Bh6XqVjX.css @@ -0,0 +1 @@ +.m-page[data-v-f3a13232]{padding:12px 14px 24px}.m-search-bar[data-v-f3a13232]{display:flex;gap:8px;margin-bottom:12px}.m-search-bar[data-v-f3a13232] .ant-input-affix-wrapper,.m-search-bar[data-v-f3a13232] .ant-select-selector{border-radius:12px!important;min-height:42px!important}.m-empty[data-v-f3a13232]{text-align:center;color:#94a3b8;padding:48px 12px}.m-user-card[data-v-f3a13232]{display:flex;gap:12px;background:#fff;border-radius:16px;padding:14px;margin-bottom:10px;border:1px solid #f1f5f9}.m-user-card__avatar[data-v-f3a13232]{width:44px;height:44px;border-radius:14px;flex-shrink:0;background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800}.m-user-card__body[data-v-f3a13232]{flex:1;min-width:0}.m-user-card__top[data-v-f3a13232]{display:flex;justify-content:space-between;gap:8px}.m-user-card__name[data-v-f3a13232]{font-weight:800;font-size:14px;color:#0f172a}.m-user-card__mobile[data-v-f3a13232]{font-size:12px;color:#64748b;direction:ltr;text-align:right}.m-badge[data-v-f3a13232]{font-size:10px;font-weight:700;padding:3px 8px;border-radius:999px;height:fit-content}.m-badge.active[data-v-f3a13232]{background:#ecfdf5;color:#059669}.m-badge.blocked[data-v-f3a13232]{background:#fef2f2;color:#ef4444}.m-user-card__meta[data-v-f3a13232]{font-size:11px;color:#94a3b8;margin:8px 0}.m-user-card__actions[data-v-f3a13232]{display:flex;gap:6px}.m-action[data-v-f3a13232]{flex:1;border:1px solid #e2e8f0;background:#f8fafc;border-radius:10px;padding:10px 4px;font-size:11px;font-weight:700;color:#334155;display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:42px}.m-pager[data-v-f3a13232]{display:flex;justify-content:center;padding:12px 0}.m-drawer-hint[data-v-f3a13232]{color:#64748b;margin-bottom:12px} diff --git a/apps/admin/dist/assets/MUserListView-DgLEnBWI.js b/apps/admin/dist/assets/MUserListView-DgLEnBWI.js new file mode 100644 index 0000000..556dbd2 --- /dev/null +++ b/apps/admin/dist/assets/MUserListView-DgLEnBWI.js @@ -0,0 +1 @@ +import{t as h,f as M}from"./farsi-number-stB7JMN0.js";import{d as Y,l as Z,c as _,a as o,b as t,w as i,h as v,g as $,n as w,r,o as c,e as u,S as aa,f,s as N,F as T,y as F,t as d,z as L,i as ea,N as ta,H as sa,x as O,J as na,_ as oa}from"./index-C4s_T2hP.js";import{P as la}from"./PlusCircleOutlined-DvvDmI1x.js";import{L as ia}from"./LockOutlined-C2VUSHin.js";import{U as ra}from"./UnlockOutlined-bEPE7jAH.js";const ua={class:"m-page"},ca={class:"m-search-bar"},da={key:0,class:"m-empty"},ma={class:"m-user-card__avatar"},pa={class:"m-user-card__body"},_a={class:"m-user-card__top"},va={class:"m-user-card__name"},fa={class:"m-user-card__mobile"},ga={class:"m-user-card__meta"},ba={class:"m-user-card__actions"},ya=["onClick"],ka=["onClick"],Ca=["onClick"],ha={key:1,class:"m-pager"},wa={class:"m-drawer-hint"},za=Y({__name:"MUserListView",setup(Ia){const K=ea(),b=v(!1),z=v([]),I=v(0),S=v([]),y=v(!1),U=v(!1),l=$({page:1,pageSize:10,search:"",status:void 0}),s=$({userId:"",userMobile:"",campaignId:"",amount:1,reason:""});async function P(){var a;const n=await w.get("/admin/campaigns",{params:{pageSize:100}});S.value=Array.isArray(n.data)?n.data:((a=n.data)==null?void 0:a.data)||[]}async function k(){var n,a,g,p;b.value=!0;try{const m=await w.get("/admin/users",{params:{page:l.page,pageSize:l.pageSize,search:l.search||void 0,status:l.status||void 0}}),C=Array.isArray(m.data)?m.data:((n=m.data)==null?void 0:n.data)||[];z.value=C,I.value=((a=m.meta)==null?void 0:a.total)||((p=(g=m.data)==null?void 0:g.meta)==null?void 0:p.total)||C.length}finally{b.value=!1}}function R(n){const a=n.status==="BLOCKED";na.confirm({title:a?"رفع مسدودی":"مسدودسازی",content:`${h(n.mobile)} را ${a?"رفع مسدودی":"مسدود"} می‌کنید؟`,okText:"تأیید",okType:a?"primary":"danger",cancelText:"انصراف",onOk:async()=>{await w.patch(`/admin/users/${n.id}/block`,{blocked:!a,reason:a?"رفع مسدودی توسط مدیر":"مسدودسازی توسط مدیر"}),L.success(a?"مسدودی رفع شد":"کاربر مسدود شد"),k()}})}function j(n){var a;s.userId=n.id,s.userMobile=n.mobile,s.campaignId=((a=S.value[0])==null?void 0:a.id)||"",s.amount=1,s.reason="اهدای شانس توسط مدیر",y.value=!0}async function H(){if(!s.campaignId){L.error("کمپین را انتخاب کنید");return}U.value=!0;try{await w.post("/admin/chances/adjust",{userId:s.userId,campaignId:s.campaignId,amount:s.amount,reason:s.reason}),L.success("شانس تنظیم شد"),y.value=!1}finally{U.value=!1}}function x(){l.page=1,k()}function J(n){return n?h(new Date(n).toLocaleDateString("fa-IR")):"—"}return Z(()=>{k(),P()}),(n,a)=>{const g=r("a-input"),p=r("a-select-option"),m=r("a-select"),C=r("a-pagination"),q=r("a-spin"),B=r("a-form-item"),G=r("a-input-number"),Q=r("a-button"),W=r("a-form"),X=r("a-drawer");return c(),_("div",ua,[o("div",ca,[t(g,{value:l.search,"onUpdate:value":a[0]||(a[0]=e=>l.search=e),"allow-clear":"",placeholder:"موبایل یا نام...",onPressEnter:x},{prefix:i(()=>[t(u(aa),{style:{color:"#94a3b8"}})]),_:1},8,["value"]),t(m,{value:l.status,"onUpdate:value":a[1]||(a[1]=e=>l.status=e),"allow-clear":"",placeholder:"وضعیت",style:{width:"110px"},onChange:x},{default:i(()=>[t(p,{value:"ACTIVE"},{default:i(()=>[...a[7]||(a[7]=[f("فعال",-1)])]),_:1}),t(p,{value:"BLOCKED"},{default:i(()=>[...a[8]||(a[8]=[f("مسدود",-1)])]),_:1})]),_:1},8,["value"])]),t(q,{spinning:b.value},{default:i(()=>[!z.value.length&&!b.value?(c(),_("div",da,"کاربری یافت نشد")):N("",!0),(c(!0),_(T,null,F(z.value,e=>{var D,E,V;return c(),_("div",{key:e.id,class:"m-user-card"},[o("div",ma,d((e.name||e.mobile||"؟").charAt(0)),1),o("div",pa,[o("div",_a,[o("div",null,[o("div",va,d(e.name||"بدون نام"),1),o("div",fa,d(u(h)(e.mobile)),1)]),o("span",{class:ta(["m-badge",e.status==="BLOCKED"?"blocked":"active"])},d(e.status==="BLOCKED"?"مسدود":"فعال"),3)]),o("div",ga,d(u(M)(((D=e._count)==null?void 0:D.spins)||0))+" اسپین · "+d(u(M)(((E=e._count)==null?void 0:E.userPrizes)||((V=e._count)==null?void 0:V.prizes)||0))+" جایزه · عضویت "+d(J(e.createdAt)),1),o("div",ba,[o("button",{type:"button",class:"m-action",onClick:A=>u(K).push(`/m/users/${e.id}`)},[t(u(sa)),a[9]||(a[9]=f(" پروفایل ",-1))],8,ya),o("button",{type:"button",class:"m-action",onClick:A=>j(e)},[t(u(la)),a[10]||(a[10]=f(" شانس ",-1))],8,ka),o("button",{type:"button",class:"m-action",onClick:A=>R(e)},[e.status!=="BLOCKED"?(c(),O(u(ia),{key:0})):(c(),O(u(ra),{key:1}))],8,Ca)])])])}),128)),I.value>l.pageSize?(c(),_("div",ha,[t(C,{current:l.page,"onUpdate:current":a[2]||(a[2]=e=>l.page=e),total:I.value,"page-size":l.pageSize,size:"small",onChange:k},null,8,["current","total","page-size"])])):N("",!0)]),_:1},8,["spinning"]),t(X,{open:y.value,"onUpdate:open":a[6]||(a[6]=e=>y.value=e),placement:"bottom",height:420,title:"تنظیم شانس"},{default:i(()=>[o("p",wa,"کاربر: "+d(u(h)(s.userMobile)),1),t(W,{layout:"vertical"},{default:i(()=>[t(B,{label:"کمپین"},{default:i(()=>[t(m,{value:s.campaignId,"onUpdate:value":a[3]||(a[3]=e=>s.campaignId=e),size:"large",style:{width:"100%"}},{default:i(()=>[(c(!0),_(T,null,F(S.value,e=>(c(),O(p,{key:e.id,value:e.id},{default:i(()=>[f(d(e.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),t(B,{label:"مقدار (+/-)"},{default:i(()=>[t(G,{value:s.amount,"onUpdate:value":a[4]||(a[4]=e=>s.amount=e),size:"large",style:{width:"100%"}},null,8,["value"])]),_:1}),t(B,{label:"دلیل"},{default:i(()=>[t(g,{value:s.reason,"onUpdate:value":a[5]||(a[5]=e=>s.reason=e),size:"large"},null,8,["value"])]),_:1}),t(Q,{type:"primary",block:"",size:"large",loading:U.value,onClick:H},{default:i(()=>[...a[11]||(a[11]=[f(" اعمال ",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["open"])])}}}),xa=oa(za,[["__scopeId","data-v-f3a13232"]]);export{xa as default}; diff --git a/apps/admin/dist/assets/MWinnerListView-CCZkNU_c.js b/apps/admin/dist/assets/MWinnerListView-CCZkNU_c.js new file mode 100644 index 0000000..6355f71 --- /dev/null +++ b/apps/admin/dist/assets/MWinnerListView-CCZkNU_c.js @@ -0,0 +1 @@ +import{t as V}from"./farsi-number-stB7JMN0.js";import{d as et,l as at,c,a as d,b as s,w as l,e as v,R as st,h as y,g as B,n as w,r as i,o as u,S as nt,F as E,y as S,s as F,t as r,f as g,z as W,i as ot,x as lt,C as it,E as ut,_ as rt}from"./index-C4s_T2hP.js";const ct={class:"m-page"},dt={class:"m-filters"},pt={class:"m-filters__row"},_t={key:0,class:"m-empty"},mt={class:"m-card__top"},vt=["onClick"],gt={class:"m-card__line"},ft={class:"m-card__meta"},yt=["onClick"],bt={key:1},Ct=["onClick"],ht={key:1,class:"m-pager"},xt={class:"hint"},zt=et({__name:"MWinnerListView",setup(kt){const P=ot(),b=y(!1),D=y([]),T=y(0),N=y([]),x=y(!1),A=y(!1),n=B({page:1,pageSize:10,campaignId:void 0,status:void 0,search:""}),o=B({id:"",winnerMobile:"",prizeTitle:"",status:"CONTACTED",note:""}),z={NEW:{text:"جدید",color:"blue"},CONTACTED:{text:"تماس",color:"cyan"},DELIVERED:{text:"تحویل",color:"success"},ACTIVE_CODE:{text:"کد فعال",color:"purple"},USED:{text:"مصرف",color:"green"},EXPIRED:{text:"منقضی",color:"default"}};async function X(){var e;const a=await w.get("/admin/campaigns",{params:{pageSize:100}});N.value=Array.isArray(a.data)?a.data:((e=a.data)==null?void 0:e.data)||[]}async function C(){var a,e,m,f;b.value=!0;try{const p=await w.get("/admin/user-prizes",{params:{page:n.page,pageSize:n.pageSize,campaignId:n.campaignId||void 0,status:n.status||void 0,search:n.search||void 0}}),k=Array.isArray(p.data)?p.data:((a=p.data)==null?void 0:a.data)||[];D.value=k,T.value=((e=p.meta)==null?void 0:e.total)||((f=(m=p.data)==null?void 0:m.meta)==null?void 0:f.total)||k.length}finally{b.value=!1}}function j(a){var e,m;o.id=a.id,o.winnerMobile=((e=a.user)==null?void 0:e.mobile)||"",o.prizeTitle=((m=a.prize)==null?void 0:m.title)||"",o.status=a.status||"CONTACTED",o.note=a.note||"",x.value=!0}async function q(){A.value=!0;try{await w.patch(`/admin/user-prizes/${o.id}/status`,{status:o.status,note:o.note||void 0}),W.success("وضعیت به‌روزرسانی شد"),x.value=!1,C()}finally{A.value=!1}}function G(a){a&&(navigator.clipboard.writeText(a),W.success("کد کپی شد"))}function I(){n.page=1,C()}function H(a){return a?V(new Date(a).toLocaleDateString("fa-IR",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})):"—"}return at(()=>{X(),C()}),(a,e)=>{const m=i("a-input"),f=i("a-select-option"),p=i("a-select"),k=i("a-tag"),J=i("a-pagination"),K=i("a-spin"),O=i("a-form-item"),Q=i("a-textarea"),Y=i("a-button"),Z=i("a-form"),tt=i("a-drawer");return u(),c("div",ct,[d("div",dt,[s(m,{value:n.search,"onUpdate:value":e[0]||(e[0]=t=>n.search=t),"allow-clear":"",placeholder:"جستجو...",onPressEnter:I},{prefix:l(()=>[s(v(nt),{style:{color:"#94a3b8"}})]),_:1},8,["value"]),d("div",pt,[s(p,{value:n.campaignId,"onUpdate:value":e[1]||(e[1]=t=>n.campaignId=t),"allow-clear":"",placeholder:"کمپین",style:{flex:"1"},onChange:I},{default:l(()=>[(u(!0),c(E,null,S(N.value,t=>(u(),lt(f,{key:t.id,value:t.id},{default:l(()=>[g(r(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"]),s(p,{value:n.status,"onUpdate:value":e[2]||(e[2]=t=>n.status=t),"allow-clear":"",placeholder:"وضعیت",style:{width:"110px"},onChange:I},{default:l(()=>[(u(),c(E,null,S(z,(t,_)=>s(f,{key:_,value:_},{default:l(()=>[g(r(t.text),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"]),d("button",{type:"button",class:"m-icon-btn",onClick:C},[s(v(st),{spin:b.value},null,8,["spin"])])])]),s(K,{spinning:b.value},{default:l(()=>[!D.value.length&&!b.value?(u(),c("div",_t,"برنده‌ای یافت نشد")):F("",!0),(u(!0),c(E,null,S(D.value,t=>{var _,U,M,R,L;return u(),c("div",{key:t.id,class:"m-card"},[d("div",mt,[d("button",{type:"button",class:"m-card__user",onClick:h=>{var $;return(($=t.user)==null?void 0:$.id)&&v(P).push(`/m/users/${t.user.id}`)}},r(((_=t.user)==null?void 0:_.name)||v(V)(((U=t.user)==null?void 0:U.mobile)||"—")),9,vt),s(k,{color:((M=z[t.status])==null?void 0:M.color)||"default"},{default:l(()=>{var h;return[g(r(((h=z[t.status])==null?void 0:h.text)||t.status),1)]}),_:2},1032,["color"])]),d("div",gt,r(((R=t.prize)==null?void 0:R.title)||"—")+" · "+r(((L=t.campaign)==null?void 0:L.title)||"—"),1),d("div",ft,[t.code?(u(),c("button",{key:0,type:"button",class:"m-code",onClick:h=>G(t.code)},[s(v(it)),g(" "+r(t.code),1)],8,yt)):(u(),c("span",bt,"—")),d("span",null,r(H(t.wonAt||t.createdAt)),1)]),d("button",{type:"button",class:"m-edit",onClick:h=>j(t)},[s(v(ut)),e[7]||(e[7]=g(" تغییر وضعیت",-1))],8,Ct)])}),128)),T.value>n.pageSize?(u(),c("div",ht,[s(J,{current:n.page,"onUpdate:current":e[3]||(e[3]=t=>n.page=t),total:T.value,"page-size":n.pageSize,size:"small",onChange:C},null,8,["current","total","page-size"])])):F("",!0)]),_:1},8,["spinning"]),s(tt,{open:x.value,"onUpdate:open":e[6]||(e[6]=t=>x.value=t),placement:"bottom",height:420,title:"وضعیت برنده"},{default:l(()=>[d("p",xt,r(v(V)(o.winnerMobile))+" — "+r(o.prizeTitle),1),s(Z,{layout:"vertical"},{default:l(()=>[s(O,{label:"وضعیت"},{default:l(()=>[s(p,{value:o.status,"onUpdate:value":e[4]||(e[4]=t=>o.status=t),size:"large",style:{width:"100%"}},{default:l(()=>[(u(),c(E,null,S(z,(t,_)=>s(f,{key:_,value:_},{default:l(()=>[g(r(t.text),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),_:1}),s(O,{label:"یادداشت"},{default:l(()=>[s(Q,{value:o.note,"onUpdate:value":e[5]||(e[5]=t=>o.note=t),rows:3},null,8,["value"])]),_:1}),s(Y,{type:"primary",block:"",size:"large",loading:A.value,onClick:q},{default:l(()=>[...e[8]||(e[8]=[g("ذخیره",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["open"])])}}}),Dt=rt(zt,[["__scopeId","data-v-19b853da"]]);export{Dt as default}; diff --git a/apps/admin/dist/assets/MWinnerListView-TakuyaAb.css b/apps/admin/dist/assets/MWinnerListView-TakuyaAb.css new file mode 100644 index 0000000..ff734a6 --- /dev/null +++ b/apps/admin/dist/assets/MWinnerListView-TakuyaAb.css @@ -0,0 +1 @@ +.m-page[data-v-19b853da]{padding:12px 14px 24px}.m-filters[data-v-19b853da]{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}.m-filters__row[data-v-19b853da]{display:flex;gap:6px}.m-filters[data-v-19b853da] .ant-input-affix-wrapper,.m-filters[data-v-19b853da] .ant-select-selector{border-radius:12px!important;min-height:42px!important}.m-icon-btn[data-v-19b853da]{width:42px;height:42px;border:none;border-radius:12px;background:#fff;color:#4f46e5}.m-empty[data-v-19b853da]{text-align:center;color:#94a3b8;padding:40px}.m-card[data-v-19b853da]{background:#fff;border-radius:14px;padding:12px;margin-bottom:8px;border:1px solid #f1f5f9}.m-card__top[data-v-19b853da]{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.m-card__user[data-v-19b853da]{border:none;background:transparent;padding:0;font-weight:800;color:#4f46e5;font-size:13px}.m-card__line[data-v-19b853da]{font-size:12px;color:#334155}.m-card__meta[data-v-19b853da]{display:flex;justify-content:space-between;align-items:center;margin-top:8px;font-size:11px;color:#94a3b8}.m-code[data-v-19b853da]{border:none;background:#f8fafc;color:#4f46e5;border-radius:8px;padding:4px 8px;font-size:11px;direction:ltr}.m-edit[data-v-19b853da]{margin-top:10px;width:100%;border:1px solid #e2e8f0;background:#f8fafc;border-radius:10px;padding:10px;font-weight:700;font-size:12px;color:#334155;min-height:42px}.m-pager[data-v-19b853da]{display:flex;justify-content:center;padding:12px 0}.hint[data-v-19b853da]{color:#64748b;margin-bottom:12px;font-size:12px} diff --git a/apps/admin/dist/assets/MailOutlined-DMDnYu7e.js b/apps/admin/dist/assets/MailOutlined-DMDnYu7e.js new file mode 100644 index 0000000..bf51c6b --- /dev/null +++ b/apps/admin/dist/assets/MailOutlined-DMDnYu7e.js @@ -0,0 +1 @@ +import{b as c,I as u}from"./index-C4s_T2hP.js";var o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"};function l(r){for(var t=1;t{const l=$(a.weight,1),p=L.value.reduce((y,T)=>V.value&&T.id===V.value?y:y+((T.status==="ACTIVE"||T.isActive)&&T.weight||0),0)+l;if(p<=0)return"۰";const r=(l/p*100).toFixed(1);return R(r)});function fe(l){l==="NO_PRIZE"&&(a.stockType="UNLIMITED",(!a.title||a.title.trim()==="")&&(a.title="پوچ (دفعه بعد)"))}const k=pe({prizeId:"",prizeTitle:"",currentStock:0,change:0,reason:""}),K=ce(()=>L.value.reduce((l,e)=>l+(e.status==="ACTIVE"||e.isActive?e.weight:0),0));async function G(){if(f.value)try{const l=await h.get(`/admin/campaigns/${f.value}`);m.value=l.data}catch{}}const N=O(!1);async function ye(){var l,e;if(f.value){if(L.value.length<1){_.warning("برای فعال‌سازی کمپین، حداقل یک جایزه فعال تعریف کنید.");return}N.value=!0;try{await h.patch(`/admin/campaigns/${f.value}`,{status:"ACTIVE"}),_.success("کمپین با موفقیت فعال و منتشر شد! هم‌اکنون برای کاربران در دسترس است."),await G()}catch(p){const r=((e=(l=p.response)==null?void 0:l.data)==null?void 0:e.message)||p.message||"خطا در فعال‌سازی کمپین.";_.error(Array.isArray(r)?r.join(" | "):r)}finally{N.value=!1}}}async function ve(){var l,e;if(f.value){N.value=!0;try{await h.patch(`/admin/campaigns/${f.value}`,{status:"PAUSED"}),_.info("کمپین متوقف شد."),await G()}catch(p){const r=((e=(l=p.response)==null?void 0:l.data)==null?void 0:e.message)||p.message||"خطا در توقف کمپین.";_.error(Array.isArray(r)?r.join(" | "):r)}finally{N.value=!1}}}async function H(){var l;if(f.value){W.value=!0;try{const e=await h.get(`/admin/campaigns/${f.value}/prizes`);L.value=Array.isArray(e.data)?e.data:((l=e.data)==null?void 0:l.data)||[]}finally{W.value=!1}}}function ee(){V.value=null,a.title="",a.description="",a.type="DISCOUNT_CODE",a.stockType="LIMITED",a.initialStock=100,a.remainingStock=100,a.weight=10,a.segmentColor="#3880ff",a.image="",a.sortOrder=L.value.length+1,a.status="ACTIVE",a.smsTemplate="",F.value=!0}function ke(l){V.value=l.id;const e=l.type||l.prizeType||"DISCOUNT_CODE";a.title=l.title,a.description=l.description||l.subtitle||"",a.type=e,a.stockType=l.stockType||(e==="NO_PRIZE"?"UNLIMITED":"LIMITED"),a.initialStock=l.initialStock??100,a.remainingStock=l.remainingStock??l.initialStock??100,a.weight=l.weight??10,a.segmentColor=l.segmentColor||l.color||"#3880ff",a.image=l.image||l.iconUrl||"",a.sortOrder=l.sortOrder??1,a.status=l.status||(l.isActive===!1?"INACTIVE":"ACTIVE"),a.smsTemplate=l.smsTemplate||"",F.value=!0}function _e(l){k.prizeId=l.id,k.prizeTitle=l.title,k.currentStock=l.remainingStock,k.change=0,k.reason="",Z.value=!0}async function Te(){var l,e,p,r;if(!a.title||!a.title.trim()){_.error("عنوان جایزه الزامی است.");return}M.value=!0;try{a.type==="NO_PRIZE"&&(a.stockType="UNLIMITED");const y=$(a.weight,1),T=$(a.initialStock,1),j=$(a.remainingStock,T),Y=$(a.sortOrder,1),D={title:a.title.trim(),description:((l=a.description)==null?void 0:l.trim())||void 0,type:a.type,stockType:a.stockType,weight:y>0?y:1,segmentColor:a.segmentColor||"#3880ff",image:a.image||void 0,sortOrder:Y>0?Y:1,status:a.status,smsTemplate:((e=a.smsTemplate)==null?void 0:e.trim())||void 0};a.stockType==="LIMITED"&&(D.initialStock=T,D.remainingStock=j),V.value?(await h.patch(`/admin/prizes/${V.value}`,D),_.success("جایزه با موفقیت به‌روزرسانی شد.")):(await h.post(`/admin/campaigns/${f.value}/prizes`,D),_.success("جایزه با موفقیت ایجاد شد.")),F.value=!1,H()}catch(y){const T=((r=(p=y.response)==null?void 0:p.data)==null?void 0:r.message)||y.message||"خطا در ثبت جایزه.";_.error(Array.isArray(T)?T.join(" | "):T)}finally{M.value=!1}}async function xe(){const l=$(k.change,0);if(l===0){_.warning("میزان تغییر باید غیر صفر باشد.");return}M.value=!0;try{await h.patch(`/admin/prizes/${k.prizeId}/stock`,{change:l,reason:k.reason||void 0}),_.success("موجودی جایزه با موفقیت تغییر یافت."),Z.value=!1,H()}finally{M.value=!1}}async function be(l){try{await h.delete(`/admin/prizes/${l}`),_.success("جایزه با موفقیت حذف شد."),H()}catch{}}function Ie(l){Ze.confirm({title:"حذف جایزه",content:`آیا از حذف جایزه «${l.title}» اطمینان دارید؟ (در صورت ثبت چرخش روی این جایزه، امکان حذف وجود ندارد)`,okText:"بله، حذف کن",okType:"danger",cancelText:"انصراف",onOk:()=>be(l.id)})}async function we({file:l,onSuccess:e,onError:p}){const r=new FormData;r.append("file",l);try{const y=await h.post("/admin/uploads",r,{headers:{"Content-Type":"multipart/form-data"}});a.image=y.data.url,e(y.data),_.success("تصویر با موفقیت بارگذاری شد.")}catch(y){p(y),_.error("خطا در بارگذاری تصویر")}}const Ce=[{title:"ترتیب",dataIndex:"sortOrder",key:"sortOrder",width:70,align:"center"},{title:"رنگ",key:"color",width:70,align:"center"},{title:"عنوان جایزه",dataIndex:"title",key:"title"},{title:"نوع جایزه",key:"type",width:140},{title:"نوع موجودی",dataIndex:"stockType",key:"stockType"},{title:"موجودی اولیه",dataIndex:"initialStock",key:"initialStock"},{title:"موجودی مانده",key:"remainingStock"},{title:"وزن / شانس",key:"weight"},{title:"وضعیت",key:"status",width:90},{title:"عملیات",key:"actions",width:70,align:"center"}];function te(l){switch(l){case"PHYSICAL":return{text:"کالای فیزیکی",color:"blue"};case"DISCOUNT_CODE":return{text:"کد تخفیف",color:"green"};case"CREDIT":case"WALLET_CREDIT":return{text:"شارژ کیف پول",color:"purple"};case"CASH":return{text:"جایزه نقدی",color:"gold"};case"NO_PRIZE":return{text:"پوچ / بدون جایزه",color:"error"};case"OTHER":case"CHANCE":return{text:"شانس مجدد / سایر",color:"orange"};default:return{text:l||"—",color:"default"}}}return Ve(()=>{G(),H()}),(l,e)=>{var oe,ie,se,re;const p=d("a-tag"),r=d("a-button"),y=d("a-space"),T=d("a-page-header"),j=d("a-alert"),Y=d("a-empty"),D=d("a-menu-item"),Se=d("a-menu-divider"),Ee=d("a-menu"),Oe=d("a-dropdown"),he=d("a-table"),De=d("a-card"),P=d("a-input"),x=d("a-form-item"),E=d("a-col"),q=d("a-input-number"),X=d("a-row"),A=d("a-select-option"),ae=d("a-select"),Ae=d("a-upload"),ze=d("a-switch"),ne=d("a-form"),le=d("a-modal");return s(),w("div",null,[t(T,{style:{background:"#fff","margin-bottom":"20px","border-radius":"12px",border:"1px solid #f1f5f9","box-shadow":"0 1px 3px rgba(0, 0, 0, 0.04)"},title:`مدیریت جوایز کمپین: ${((oe=m.value)==null?void 0:oe.title)||"در حال بارگذاری..."}`,"sub-title":`طرح گردونه: ${((ie=m.value)==null?void 0:ie.wheelDesign)||"-"}`,onBack:e[1]||(e[1]=o=>c(I).push("/campaigns"))},{tags:n(()=>{var o,i,z;return[((o=m.value)==null?void 0:o.status)==="DRAFT"?(s(),v(p,{key:0,color:"orange"},{default:n(()=>[...e[19]||(e[19]=[u("پیش‌نویس (DRAFT)",-1)])]),_:1})):((i=m.value)==null?void 0:i.status)==="ACTIVE"?(s(),v(p,{key:1,color:"green"},{default:n(()=>[...e[20]||(e[20]=[u("فعال و در دسترس (ACTIVE)",-1)])]),_:1})):((z=m.value)==null?void 0:z.status)==="PAUSED"?(s(),v(p,{key:2,color:"red"},{default:n(()=>[...e[21]||(e[21]=[u("متوقف (PAUSED)",-1)])]),_:1})):(s(),v(p,{key:3},{default:n(()=>{var J;return[u(C((J=m.value)==null?void 0:J.status),1)]}),_:1}))]}),extra:n(()=>[t(y,null,{default:n(()=>{var o,i,z;return[(o=m.value)!=null&&o.slug?(s(),v(r,{key:0,onClick:e[0]||(e[0]=J=>c(Xe)(m.value.slug))},{icon:n(()=>[t(c(Pe))]),default:n(()=>[e[22]||(e[22]=u(" مشاهده گردونه کاربر ↗ ",-1))]),_:1})):U("",!0),((i=m.value)==null?void 0:i.status)==="DRAFT"?(s(),v(r,{key:1,type:"primary",style:{background:"#52c41a","border-color":"#52c41a"},loading:N.value,onClick:ye},{icon:n(()=>[t(c(Re))]),default:n(()=>[e[23]||(e[23]=u(" 🚀 فعال‌سازی و انتشار کمپین ",-1))]),_:1},8,["loading"])):((z=m.value)==null?void 0:z.status)==="ACTIVE"?(s(),v(r,{key:2,danger:"",loading:N.value,onClick:ve},{icon:n(()=>[t(c(Ge))]),default:n(()=>[e[24]||(e[24]=u(" توقف موقت کمپین ",-1))]),_:1},8,["loading"])):U("",!0),t(r,{onClick:H},{icon:n(()=>[t(c($e))]),default:n(()=>[e[25]||(e[25]=u(" به‌روزرسانی ",-1))]),_:1}),t(r,{type:"primary",onClick:ee},{icon:n(()=>[t(c(Fe))]),default:n(()=>[e[26]||(e[26]=u(" افزودن جایزه جدید ",-1))]),_:1})]}),_:1})]),_:1},8,["title","sub-title"]),((se=m.value)==null?void 0:se.status)==="DRAFT"?(s(),v(j,{key:0,message:"کمپین در وضعیت پیش‌نویس (DRAFT) قرار دارد",description:"جوایز خود را در جدول زیر تعریف یا ویرایش کنید. پس از پایان تنظیمات جوایز، برای فعال‌سازی و در دسترس قرار گرفتن گردونه برای کاربران، بر روی دکمه سبز رنگ «🚀 فعال‌سازی و انتشار کمپین» در بالا کلیک نمایید.",type:"warning","show-icon":"",style:{"margin-bottom":"20px"}})):((re=m.value)==null?void 0:re.status)==="ACTIVE"?(s(),v(j,{key:1,message:"این کمپین فعال و منتشر شده است",description:"کاربران می‌توانند با مراجعه به صفحه گردونه، شانس خود را امتحان کنند.",type:"success","show-icon":"",style:{"margin-bottom":"20px"}})):U("",!0),t(De,{bordered:!1},{default:n(()=>[L.value.length===0&&!W.value?(s(),w("div",et,[t(Y,{description:"هنوز جایزه‌ای برای این کمپین تعریف نشده است."},{default:n(()=>[t(r,{type:"primary",onClick:ee},{default:n(()=>[...e[27]||(e[27]=[u("ایجاد اولین جایزه",-1)])]),_:1})]),_:1})])):(s(),v(he,{key:1,dataSource:L.value,columns:Ce,loading:W.value,rowKey:"id",pagination:!1},{bodyCell:n(({column:o,record:i})=>[o.key==="color"?(s(),w("div",{key:0,style:ue({backgroundColor:i.segmentColor||i.color||"#ddd",color:"#fff",width:"40px",height:"24px",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"11px",fontWeight:"bold",border:"1px solid rgba(0,0,0,0.1)",textShadow:"0 1px 2px rgba(0,0,0,0.6)"})},C(c(R)(i.sortOrder)),5)):o.key==="type"?(s(),v(p,{key:1,color:te(i.type||i.prizeType).color},{default:n(()=>[u(C(te(i.type||i.prizeType).text),1)]),_:2},1032,["color"])):o.key==="stockType"?(s(),v(p,{key:2,color:i.stockType==="LIMITED"?"cyan":"blue"},{default:n(()=>[u(C(i.stockType==="LIMITED"?"محدود":"نامحدود"),1)]),_:2},1032,["color"])):o.key==="initialStock"?(s(),w("span",tt,C(c(R)(i.initialStock)),1)):o.key==="remainingStock"?(s(),w(de,{key:4},[i.stockType==="UNLIMITED"?(s(),w("span",at,"∞")):(s(),w("span",{key:1,style:ue({color:i.remainingStock===0?"red":i.remainingStock<10?"orange":"inherit",fontWeight:i.remainingStock<10?700:"normal"})},C(c(R)(i.remainingStock)),5))],64)):o.key==="weight"?(s(),w("span",nt,[u(C(c(R)(i.weight))+" ",1),K.value>0?(s(),w("span",lt," ("+C(c(R)((i.weight/K.value*100).toFixed(1)))+"٪) ",1)):U("",!0)])):o.key==="status"?(s(),v(p,{key:6,color:i.status==="ACTIVE"||i.isActive?"green":"default"},{default:n(()=>[u(C(i.status==="ACTIVE"||i.isActive?"فعال":"غیرفعال"),1)]),_:2},1032,["color"])):o.key==="actions"?(s(),v(Oe,{key:7,trigger:["click"],placement:"bottomLeft"},{overlay:n(()=>[t(Ee,{class:"action-dropdown-menu"},{default:n(()=>[t(D,{key:"edit",onClick:z=>ke(i)},{default:n(()=>[g("div",ot,[t(c(je),{class:"dropdown-item-icon"}),e[28]||(e[28]=g("span",null,"ویرایش جایزه",-1))])]),_:1},8,["onClick"]),i.stockType==="LIMITED"?(s(),v(D,{key:"stock",onClick:z=>_e(i)},{default:n(()=>[g("div",it,[t(c(Q),{class:"dropdown-item-icon"}),e[29]||(e[29]=g("span",null,"تنظیم سریع موجودی",-1))])]),_:1},8,["onClick"])):U("",!0),t(Se),t(D,{key:"delete",onClick:z=>Ie(i)},{default:n(()=>[g("div",st,[t(c(qe),{class:"dropdown-item-icon"}),e[30]||(e[30]=g("span",null,"حذف جایزه",-1))])]),_:1},8,["onClick"])]),_:2},1024)]),default:n(()=>[t(r,{type:"text",shape:"circle",class:"action-more-btn",title:"عملیات"},{default:n(()=>[t(c(He),{style:{"font-size":"18px"}})]),_:1})]),_:2},1024)):U("",!0)]),_:1},8,["dataSource","loading"]))]),_:1}),t(le,{open:F.value,"onUpdate:open":e[15]||(e[15]=o=>F.value=o),title:V.value?"ویرایش جایزه":"افزودن جایزه جدید",confirmLoading:M.value,okText:"ذخیره",cancelText:"انصراف",width:"680px",style:{top:"24px"},"body-style":{maxHeight:"calc(100vh - 160px)",overflowY:"auto",overflowX:"hidden"},onOk:Te},{default:n(()=>[t(ne,{layout:"vertical",class:"prize-modal-form"},{default:n(()=>[t(X,{gutter:16},{default:n(()=>[t(E,{span:16},{default:n(()=>[t(x,{label:"عنوان جایزه",required:""},{default:n(()=>[t(P,{value:a.title,"onUpdate:value":e[2]||(e[2]=o=>a.title=o),placeholder:"مثال: آیفون ۱۵ یا کد تخفیف ۵۰٪"},null,8,["value"])]),_:1})]),_:1}),t(E,{span:8},{default:n(()=>[t(x,{label:"ترتیب در گردونه (۱ به بعد)",required:"",tooltip:"شماره موقعیت این اسلایس روی گردونه"},{default:n(()=>[t(q,{value:a.sortOrder,"onUpdate:value":e[3]||(e[3]=o=>a.sortOrder=o),min:1,parser:o=>c(B)(o).replace(/[^0-9]/g,""),style:{width:"100%"}},null,8,["value","parser"])]),_:1})]),_:1})]),_:1}),t(x,{label:"توضیحات جایزه"},{default:n(()=>[t(P,{value:a.description,"onUpdate:value":e[4]||(e[4]=o=>a.description=o),placeholder:"مثال: خریدهای بالای ۵۰۰ هزار تومان یا تحویل حضوری"},null,8,["value"])]),_:1}),t(X,{gutter:16},{default:n(()=>[t(E,{span:12},{default:n(()=>[t(x,{label:"نوع جایزه",required:""},{default:n(()=>[t(ae,{value:a.type,"onUpdate:value":e[5]||(e[5]=o=>a.type=o),onChange:fe},{default:n(()=>[t(A,{value:"DISCOUNT_CODE"},{default:n(()=>[...e[31]||(e[31]=[u("کد تخفیف",-1)])]),_:1}),t(A,{value:"PHYSICAL"},{default:n(()=>[...e[32]||(e[32]=[u("کالای فیزیکی",-1)])]),_:1}),t(A,{value:"CREDIT"},{default:n(()=>[...e[33]||(e[33]=[u("شارژ کیف پول (اعتبار)",-1)])]),_:1}),t(A,{value:"CASH"},{default:n(()=>[...e[34]||(e[34]=[u("جایزه نقدی",-1)])]),_:1}),t(A,{value:"NO_PRIZE"},{default:n(()=>[...e[35]||(e[35]=[u("پوچ (بدون جایزه)",-1)])]),_:1}),t(A,{value:"OTHER"},{default:n(()=>[...e[36]||(e[36]=[u("سایر / شانس مجدد",-1)])]),_:1})]),_:1},8,["value"])]),_:1})]),_:1}),t(E,{span:12},{default:n(()=>[t(x,{label:"وزن شانس (ضریب احتمالات)",required:"",tooltip:"هرچه وزن نسبت به سایر جوایز بالاتر باشد احتمال اصابت بیشتر خواهد بود"},{default:n(()=>[t(q,{value:a.weight,"onUpdate:value":e[6]||(e[6]=o=>a.weight=o),min:1,parser:o=>c(B)(o).replace(/[^0-9]/g,""),style:{width:"100%"}},null,8,["value","parser"]),g("div",rt,[e[37]||(e[37]=g("span",{style:{color:"#64748b"}},"تخمین احتمال اصابت:",-1)),t(p,{color:"processing",style:{"font-weight":"600",margin:"0"}},{default:n(()=>[u(C(ge.value)+"٪ از کل شانس‌ها ",1)]),_:1})])]),_:1})]),_:1})]),_:1}),g("div",ut,[e[40]||(e[40]=g("div",{style:{"font-weight":"600","font-size":"13px",color:"#334155","margin-bottom":"10px"}}," 📦 تنظیمات موجودی و انبار ",-1)),t(X,{gutter:16},{default:n(()=>[t(E,{span:a.stockType==="LIMITED"?8:24},{default:n(()=>[t(x,{label:"نوع موجودی",required:"",style:{"margin-bottom":"0"}},{default:n(()=>[t(ae,{value:a.stockType,"onUpdate:value":e[7]||(e[7]=o=>a.stockType=o),disabled:a.type==="NO_PRIZE"},{default:n(()=>[t(A,{value:"LIMITED"},{default:n(()=>[...e[38]||(e[38]=[u("محدود (شمارش‌دار)",-1)])]),_:1}),t(A,{value:"UNLIMITED"},{default:n(()=>[...e[39]||(e[39]=[u("نامحدود",-1)])]),_:1})]),_:1},8,["value","disabled"])]),_:1})]),_:1},8,["span"]),a.stockType==="LIMITED"?(s(),w(de,{key:0},[t(E,{span:8},{default:n(()=>[t(x,{label:"موجودی اولیه",style:{"margin-bottom":"0"}},{default:n(()=>[t(q,{value:a.initialStock,"onUpdate:value":e[8]||(e[8]=o=>a.initialStock=o),min:1,parser:o=>c(B)(o).replace(/[^0-9]/g,""),style:{width:"100%"}},null,8,["value","parser"])]),_:1})]),_:1}),t(E,{span:8},{default:n(()=>[t(x,{label:"موجودی باقی‌مانده",tooltip:"موجودی قابل استفاده فعلی در انبار",style:{"margin-bottom":"0"}},{default:n(()=>[t(q,{value:a.remainingStock,"onUpdate:value":e[9]||(e[9]=o=>a.remainingStock=o),min:0,parser:o=>c(B)(o).replace(/[^0-9]/g,""),style:{width:"100%"}},null,8,["value","parser"])]),_:1})]),_:1})],64)):U("",!0)]),_:1})]),t(X,{gutter:16},{default:n(()=>[t(E,{span:12},{default:n(()=>[t(x,{label:"رنگ پس‌زمینه اسلایس (Hex)",required:""},{default:n(()=>[g("div",dt,[Be(g("input",{"onUpdate:modelValue":e[10]||(e[10]=o=>a.segmentColor=o),type:"color",style:{width:"40px",height:"32px",border:"none",cursor:"pointer","border-radius":"4px"}},null,512),[[We,a.segmentColor]]),t(P,{value:a.segmentColor,"onUpdate:value":e[11]||(e[11]=o=>a.segmentColor=o),placeholder:"#3880ff",style:{flex:"1"}},null,8,["value"])])]),_:1})]),_:1}),t(E,{span:12},{default:n(()=>[t(x,{label:"قالب پیامک برنده (اختیاری)",tooltip:"متغیرها: {prize} و {code}"},{default:n(()=>[t(P,{value:a.smsTemplate,"onUpdate:value":e[12]||(e[12]=o=>a.smsTemplate=o),placeholder:"تبریک! برنده {prize} شدید. کد: {code}"},null,8,["value"])]),_:1})]),_:1})]),_:1}),t(x,{label:"آیکون یا تصویر جایزه"},{default:n(()=>[g("div",pt,[t(Ae,{customRequest:we,showUploadList:!1,accept:"image/*"},{default:n(()=>[t(r,null,{icon:n(()=>[t(c(Je))]),default:n(()=>[e[41]||(e[41]=u(" بارگذاری تصویر ",-1))]),_:1})]),_:1}),t(P,{value:a.image,"onUpdate:value":e[13]||(e[13]=o=>a.image=o),placeholder:"آدرس تصویر (URL)",style:{flex:"1"}},null,8,["value"])]),a.image?(s(),w("div",ct,[g("img",{src:a.image,alt:"icon preview",style:{"max-height":"48px","border-radius":"4px"}},null,8,mt)])):U("",!0)]),_:1}),g("div",gt,[e[42]||(e[42]=g("span",{style:{"font-size":"14px","font-weight":"500",color:"#1e293b"}},"وضعیت:",-1)),t(ze,{checked:a.status==="ACTIVE","checked-children":"فعال","un-checked-children":"غیرفعال",onChange:e[14]||(e[14]=o=>a.status=o?"ACTIVE":"INACTIVE")},null,8,["checked"])])]),_:1})]),_:1},8,["open","title","confirmLoading"]),t(le,{open:Z.value,"onUpdate:open":e[18]||(e[18]=o=>Z.value=o),title:"تنظیم سریع موجودی جایزه",confirmLoading:M.value,okText:"اعمال تغییرات",cancelText:"انصراف",onOk:xe},{default:n(()=>[t(ne,{layout:"vertical"},{default:n(()=>[t(j,{message:`جایزه: ${k.prizeTitle}`,description:`موجودی فعلی باقی‌مانده: ${k.currentStock} عدد`,type:"info","show-icon":"",style:{"margin-bottom":"16px"}},null,8,["message","description"]),t(x,{label:"تغییر موجودی (+ برای افزایش، - برای کاهش)",required:"",tooltip:"مثال: برای اضافه کردن ۵۰ عدد مقدار 50+ و برای کاهش مقدار 20- وارد کنید"},{default:n(()=>[t(q,{value:k.change,"onUpdate:value":e[16]||(e[16]=o=>k.change=o),parser:o=>c(B)(o).replace(/[^0-9.-]/g,""),style:{width:"100%"}},null,8,["value","parser"])]),_:1}),t(x,{label:"دلیل تغییر (جهت ثبت در لاگ بازرسی)"},{default:n(()=>[t(P,{value:k.reason,"onUpdate:value":e[17]||(e[17]=o=>k.reason=o),placeholder:"مثال: ورود محموله جدید به انبار"},null,8,["value"])]),_:1})]),_:1})]),_:1},8,["open","confirmLoading"])])}}}),Tt=Ye(ft,[["__scopeId","data-v-dc4d27c1"]]);export{Tt as default}; diff --git a/apps/admin/dist/assets/ReportView-B9vUeUVV.css b/apps/admin/dist/assets/ReportView-B9vUeUVV.css new file mode 100644 index 0000000..0d0226d --- /dev/null +++ b/apps/admin/dist/assets/ReportView-B9vUeUVV.css @@ -0,0 +1 @@ +.page-header-title[data-v-ee1ef293]{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:12px}.page-header-title .title[data-v-ee1ef293]{font-size:20px;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.3px}.page-header-title .subtitle[data-v-ee1ef293]{font-size:13px;color:#64748b;margin:4px 0 0}.main-card[data-v-ee1ef293]{border-radius:12px;box-shadow:0 1px 3px #0000000a;border:1px solid #f1f5f9}.kpi-card[data-v-ee1ef293]{border-radius:12px;box-shadow:0 1px 3px #0000000a;border:1px solid #f1f5f9;transition:all .25s ease}.kpi-card[data-v-ee1ef293]:hover{transform:translateY(-2px);box-shadow:0 6px 16px #00000012}.kpi-flex[data-v-ee1ef293]{display:flex;align-items:center;gap:16px}.kpi-icon-box[data-v-ee1ef293]{width:52px;height:52px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:24px;flex-shrink:0}.icon-indigo[data-v-ee1ef293]{background:#eef2ff;color:#4f46e5}.icon-sky[data-v-ee1ef293]{background:#f0f9ff;color:#0284c7}.icon-emerald[data-v-ee1ef293]{background:#ecfdf5;color:#059669}.icon-purple[data-v-ee1ef293]{background:#faf5ff;color:#9333ea}.icon-amber[data-v-ee1ef293]{background:#fffbeb;color:#d97706}.icon-rose[data-v-ee1ef293]{background:#fff1f2;color:#e11d48}.icon-teal[data-v-ee1ef293]{background:#f0fdfa;color:#0d9488}.kpi-details[data-v-ee1ef293]{display:flex;flex-direction:column}.kpi-label[data-v-ee1ef293]{font-size:13px;color:#64748b;font-weight:500}.kpi-value[data-v-ee1ef293]{font-size:22px;font-weight:700;color:#0f172a;line-height:1.2;margin:2px 0 0}.filters-header[data-v-ee1ef293]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px}.filters[data-v-ee1ef293]{display:flex;gap:12px} diff --git a/apps/admin/dist/assets/ReportView-DAkvN1UA.js b/apps/admin/dist/assets/ReportView-DAkvN1UA.js new file mode 100644 index 0000000..a49bdba --- /dev/null +++ b/apps/admin/dist/assets/ReportView-DAkvN1UA.js @@ -0,0 +1 @@ +import{f as b}from"./farsi-number-stB7JMN0.js";import{b as e,I as N,d as D,l as E,c as I,a as s,w as o,h,n as x,r as f,g as A,o as y,f as w,e as i,R as B,$ as F,F as $,y as G,t as m,T as M,z as V,x as H,_ as Z}from"./index-C4s_T2hP.js";import{T as O}from"./TeamOutlined-Cc_Yyb--.js";import{G as q}from"./GiftOutlined-DgNzKaks.js";var J={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"};function R(c){for(var n=1;n{S(),g()}),(p,t)=>{const u=f("a-button"),z=f("a-space"),j=f("a-select-option"),P=f("a-select"),_=f("a-card"),k=f("a-col"),T=f("a-row"),L=f("a-spin");return y(),I("div",W,[s("div",X,[t[3]||(t[3]=s("div",null,[s("h1",{class:"title"},"گزارش‌ها و شاخص‌های کلیدی (KPI)"),s("p",{class:"subtitle"},"تحلیل مشارکت کاربران، شانس‌های تخصیصی، نرخ مصرف و خروجی آماری")],-1)),e(z,null,{default:o(()=>[e(u,{onClick:g,loading:n.value},{icon:o(()=>[e(i(B))]),default:o(()=>[t[1]||(t[1]=w(" به‌روزرسانی ",-1))]),_:1},8,["loading"]),e(u,{type:"primary",loading:d.value,onClick:U},{icon:o(()=>[e(i(F))]),default:o(()=>[t[2]||(t[2]=w(" خروجی اکسل گزارش ",-1))]),_:1},8,["loading"])]),_:1})]),e(_,{bordered:!1,class:"main-card",style:{"margin-bottom":"20px"}},{default:o(()=>[s("div",Y,[s("div",K,[e(P,{value:r.campaignId,"onUpdate:value":t[0]||(t[0]=a=>r.campaignId=a),placeholder:"انتخاب کمپین (اختیاری)",allowClear:"",style:{width:"260px"},onChange:g},{default:o(()=>[(y(!0),I($,null,G(v.value,a=>(y(),H(j,{key:a.id,value:a.id},{default:o(()=>[w(m(a.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])])])]),_:1}),e(L,{spinning:n.value},{default:o(()=>[e(T,{gutter:[16,16]},{default:o(()=>[e(k,{xs:24,sm:12,md:8},{default:o(()=>[e(_,{bordered:!1,class:"kpi-card"},{default:o(()=>{var a;return[s("div",ss,[s("div",es,[e(i(O))]),s("div",as,[t[4]||(t[4]=s("span",{class:"kpi-label"},"تعداد کل کاربران ثبت‌نامی",-1)),s("span",ts,m(i(b)(((a=l.value)==null?void 0:a.totalUsers)||0)),1)])])]}),_:1})]),_:1}),e(k,{xs:24,sm:12,md:8},{default:o(()=>[e(_,{bordered:!1,class:"kpi-card"},{default:o(()=>{var a;return[s("div",os,[s("div",is,[e(i(B))]),s("div",ns,[t[5]||(t[5]=s("span",{class:"kpi-label"},"تعداد کل چرخش‌ها (Spins)",-1)),s("span",ls,m(i(b)(((a=l.value)==null?void 0:a.totalSpins)||0)),1)])])]}),_:1})]),_:1}),e(k,{xs:24,sm:12,md:8},{default:o(()=>[e(_,{bordered:!1,class:"kpi-card"},{default:o(()=>{var a;return[s("div",ds,[s("div",cs,[e(i(M))]),s("div",rs,[t[6]||(t[6]=s("span",{class:"kpi-label"},"تعداد کل جوایز برنده شده",-1)),s("span",ps,m(i(b)(((a=l.value)==null?void 0:a.winnersCount)||0)),1)])])]}),_:1})]),_:1}),e(k,{xs:24,sm:12,md:8},{default:o(()=>[e(_,{bordered:!1,class:"kpi-card"},{default:o(()=>{var a;return[s("div",us,[s("div",_s,[e(i(q))]),s("div",fs,[t[7]||(t[7]=s("span",{class:"kpi-label"},"کل شانس‌های تخصیص‌یافته",-1)),s("span",ms,m(i(b)(((a=l.value)==null?void 0:a.totalChancesAllocated)||0)),1)])])]}),_:1})]),_:1}),e(k,{xs:24,sm:12,md:8},{default:o(()=>[e(_,{bordered:!1,class:"kpi-card"},{default:o(()=>{var a;return[s("div",vs,[s("div",ks,[e(i(C))]),s("div",bs,[t[8]||(t[8]=s("span",{class:"kpi-label"},"کل شانس‌های مصرف‌شده",-1)),s("span",hs,m(i(b)(((a=l.value)==null?void 0:a.totalChancesUsed)||0)),1)])])]}),_:1})]),_:1}),e(k,{xs:24,sm:12,md:8},{default:o(()=>[e(_,{bordered:!1,class:"kpi-card"},{default:o(()=>{var a;return[s("div",gs,[s("div",xs,[e(i(O))]),s("div",ys,[t[9]||(t[9]=s("span",{class:"kpi-label"},"کاربران بدون چرخش (Zero Spin)",-1)),s("span",ws,m(i(b)(((a=l.value)==null?void 0:a.zeroSpinUsers)||0)),1)])])]}),_:1})]),_:1}),e(k,{xs:24,sm:12,md:8},{default:o(()=>[e(_,{bordered:!1,class:"kpi-card"},{default:o(()=>{var a;return[s("div",Os,[s("div",Cs,[e(i(O))]),s("div",Is,[t[10]||(t[10]=s("span",{class:"kpi-label"},"کاربران دارای شانس باقی‌مانده",-1)),s("span",Bs,m(i(b)(((a=l.value)==null?void 0:a.remainingChanceUsers)||0)),1)])])]}),_:1})]),_:1})]),_:1})]),_:1},8,["spinning"])])}}}),js=Z(Vs,[["__scopeId","data-v-ee1ef293"]]);export{js as default}; diff --git a/apps/admin/dist/assets/SmsLogListView-Cp_2i0gj.js b/apps/admin/dist/assets/SmsLogListView-Cp_2i0gj.js new file mode 100644 index 0000000..6eafb8c --- /dev/null +++ b/apps/admin/dist/assets/SmsLogListView-Cp_2i0gj.js @@ -0,0 +1 @@ +import{t as C}from"./farsi-number-stB7JMN0.js";import{b as l,I as P,d as T,l as U,c as d,a as _,w as i,h as S,n as M,r as m,g as V,o,f as b,e as y,R as B,S as j,t as k,F as I,x as E,G as $,s as Q,z as G,_ as q}from"./index-C4s_T2hP.js";var H={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z"}}]},name:"redo",theme:"outlined"};function z(c){for(var a=1;a{f()}),(g,e)=>{const v=m("a-button"),x=m("a-input-search"),u=m("a-select-option"),h=m("a-select"),D=m("a-tag"),N=m("a-tooltip"),R=m("a-table"),F=m("a-card");return o(),d("div",W,[_("div",X,[e[5]||(e[5]=_("div",null,[_("h1",{class:"title"},"لاگ‌های پیامک"),_("p",{class:"subtitle"},"تاریخچه ارسال پیامک‌های رمز یکبار مصرف (OTP) و اطلاع‌رسانی جوایز")],-1)),l(v,{onClick:f,loading:a.value},{icon:i(()=>[l(y(B))]),default:i(()=>[e[4]||(e[4]=b(" به‌روزرسانی ",-1))]),_:1},8,["loading"])]),l(F,{bordered:!1,class:"main-card"},{default:i(()=>[_("div",Y,[_("div",Z,[l(x,{value:t.mobile,"onUpdate:value":e[0]||(e[0]=s=>t.mobile=s),placeholder:"جستجوی شماره همراه...",style:{width:"240px"},allowClear:"",onSearch:e[1]||(e[1]=()=>{t.page=1,f()})},{prefix:i(()=>[l(y(j),{style:{color:"#94a3b8","margin-left":"4px"}})]),_:1},8,["value"]),l(h,{value:t.status,"onUpdate:value":e[2]||(e[2]=s=>t.status=s),placeholder:"فیلتر وضعیت",allowClear:"",style:{width:"150px"},onChange:e[3]||(e[3]=()=>{t.page=1,f()})},{default:i(()=>[l(u,{value:"SENT"},{default:i(()=>[...e[6]||(e[6]=[b("ارسال شد",-1)])]),_:1}),l(u,{value:"QUEUED"},{default:i(()=>[...e[7]||(e[7]=[b("در صف ارسال",-1)])]),_:1}),l(u,{value:"FAILED"},{default:i(()=>[...e[8]||(e[8]=[b("خطا در ارسال",-1)])]),_:1})]),_:1},8,["value"])])]),l(R,{dataSource:n.value,columns:L,loading:a.value,rowKey:"id",size:"middle",pagination:{current:t.page,pageSize:t.pageSize,total:p.value,showTotal:s=>`مجموع: ${y(C)(s)} پیامک`,onChange:s=>{t.page=s,f()}}},{bodyCell:i(({column:s,record:r})=>[s.key==="mobile"?(o(),d("span",K,k(y(C)(r.mobile)),1)):s.key==="providerMessageId"?(o(),d(I,{key:1},[r.providerMessageId?(o(),d("code",ee,k(r.providerMessageId),1)):(o(),d("span",te,"—"))],64)):s.key==="status"?(o(),E(D,{key:2,color:w(r.status).color,class:"status-tag"},{default:i(()=>[_("span",{class:"status-dot",style:$({backgroundColor:w(r.status).dotColor})},null,4),b(" "+k(w(r.status).text),1)]),_:2},1032,["color"])):s.key==="errorMessage"?(o(),d(I,{key:3},[r.errorMessage?(o(),d("span",ae,k(r.errorMessage),1)):(o(),d("span",se,"—"))],64)):s.key==="createdAt"?(o(),d("span",oe,k(y(C)(new Date(r.createdAt).toLocaleString("fa-IR"))),1)):s.key==="actions"?(o(),d(I,{key:5},[r.status==="FAILED"?(o(),E(N,{key:0,title:"ارسال مجدد پیامک"},{default:i(()=>[l(v,{type:"text",shape:"circle",class:"action-more-btn",onClick:ie=>A(r.id)},{default:i(()=>[l(y(O),{style:{"font-size":"15px",color:"#4f46e5"}})]),_:1},8,["onClick"])]),_:2},1024)):(o(),d("span",le,"—"))],64)):Q("",!0)]),_:1},8,["dataSource","loading","pagination"])]),_:1})])}}}),ce=q(ne,[["__scopeId","data-v-1ae7a208"]]);export{ce as default}; diff --git a/apps/admin/dist/assets/SmsLogListView-DxBDhwbh.css b/apps/admin/dist/assets/SmsLogListView-DxBDhwbh.css new file mode 100644 index 0000000..b4918ab --- /dev/null +++ b/apps/admin/dist/assets/SmsLogListView-DxBDhwbh.css @@ -0,0 +1 @@ +.page-header-title[data-v-1ae7a208]{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:12px}.page-header-title .title[data-v-1ae7a208]{font-size:20px;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.3px}.page-header-title .subtitle[data-v-1ae7a208]{font-size:13px;color:#64748b;margin:4px 0 0}.main-card[data-v-1ae7a208]{border-radius:12px;box-shadow:0 1px 3px #0000000a;border:1px solid #f1f5f9}.table-header[data-v-1ae7a208]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.filters[data-v-1ae7a208]{display:flex;gap:12px}.code-badge[data-v-1ae7a208]{background:#f8fafc;border:1px solid #e2e8f0;padding:2px 6px;border-radius:4px;font-family:monospace;font-size:11px;color:#64748b}.num-cell[data-v-1ae7a208],.date-cell[data-v-1ae7a208]{color:#334155;font-size:13px}.text-danger[data-v-1ae7a208]{color:#ef4444;font-size:12px}.text-muted[data-v-1ae7a208]{color:#94a3b8}.status-tag[data-v-1ae7a208]{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border-radius:20px;font-weight:500}.status-dot[data-v-1ae7a208]{width:6px;height:6px;border-radius:50%;display:inline-block}.action-more-btn[data-v-1ae7a208]{color:#64748b;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;transition:all .2s ease}.action-more-btn[data-v-1ae7a208]:hover{background-color:#eef2ff!important} diff --git a/apps/admin/dist/assets/SpinListView-DC-obFwu.css b/apps/admin/dist/assets/SpinListView-DC-obFwu.css new file mode 100644 index 0000000..c3af3cf --- /dev/null +++ b/apps/admin/dist/assets/SpinListView-DC-obFwu.css @@ -0,0 +1 @@ +.page-header-title[data-v-e3a0055c]{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:12px}.page-header-title .title[data-v-e3a0055c]{font-size:20px;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.3px}.page-header-title .subtitle[data-v-e3a0055c]{font-size:13px;color:#64748b;margin:4px 0 0}.main-card[data-v-e3a0055c]{border-radius:12px;box-shadow:0 1px 3px #0000000a;border:1px solid #f1f5f9}.table-header[data-v-e3a0055c]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;flex-wrap:wrap;gap:12px}.filters[data-v-e3a0055c]{display:flex;gap:12px}.mobile-cell[data-v-e3a0055c]{font-weight:600;color:#1e293b}.user-mobile-link[data-v-e3a0055c]{cursor:pointer;transition:color .15s ease}.user-mobile-link[data-v-e3a0055c]:hover{color:#4f46e5}.user-name[data-v-e3a0055c],.prize-text[data-v-e3a0055c]{font-weight:500;color:#1e293b}.code-badge[data-v-e3a0055c]{background:#f8fafc;border:1px solid #e2e8f0;padding:2px 6px;border-radius:4px;font-family:monospace;font-size:11px;color:#64748b}.num-cell[data-v-e3a0055c],.date-cell[data-v-e3a0055c]{color:#334155;font-size:13px}.text-muted[data-v-e3a0055c]{color:#94a3b8}.status-tag[data-v-e3a0055c]{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border-radius:20px;font-weight:500}.status-dot[data-v-e3a0055c]{width:6px;height:6px;border-radius:50%;display:inline-block} diff --git a/apps/admin/dist/assets/SpinListView-DM6_RMTR.js b/apps/admin/dist/assets/SpinListView-DM6_RMTR.js new file mode 100644 index 0000000..1436a7b --- /dev/null +++ b/apps/admin/dist/assets/SpinListView-DM6_RMTR.js @@ -0,0 +1 @@ +import{t as f}from"./farsi-number-stB7JMN0.js";import{d as j,l as G,c as r,a as m,b as d,w as l,n as I,r as p,h as k,g as J,o,f as x,e as u,R as Y,$ as Z,S as q,F as O,y as Q,t as c,x as S,G as X,s as ee,i as te,z as U,_ as ae}from"./index-C4s_T2hP.js";const se={class:"spin-list-page"},ne={class:"page-header-title"},ie={class:"table-header"},oe={class:"filters"},le=["onClick"],re={key:1,class:"user-name"},de={key:0,class:"prize-text"},ce={key:1,class:"text-muted"},pe={key:5,class:"code-badge"},ue={key:6,class:"date-cell"},ye={key:7,class:"date-cell"},me=j({__name:"SpinListView",setup(ge){const W=te(),v=k(!1),h=k(!1),z=k([]),T=k(0),w=k([]),n=J({page:1,pageSize:10,campaignId:void 0,search:""});async function $(){var s;try{const e=await I.get("/admin/campaigns",{params:{pageSize:100}});w.value=Array.isArray(e.data)?e.data:((s=e.data)==null?void 0:s.data)||[]}catch{}}async function _(){var s,e,i,g;v.value=!0;try{const y=await I.get("/admin/spins",{params:{page:n.page,pageSize:n.pageSize,campaignId:n.campaignId||void 0,search:n.search||void 0}}),b=Array.isArray(y.data)?y.data:((s=y.data)==null?void 0:s.data)||[];z.value=b,T.value=((e=y.meta)==null?void 0:e.total)||((g=(i=y.data)==null?void 0:i.meta)==null?void 0:g.total)||b.length}finally{v.value=!1}}async function F(){h.value=!0;try{const s=await I.get("/admin/spins/export",{params:{campaignId:n.campaignId||void 0,search:n.search||void 0},responseType:"blob"}),e=window.URL.createObjectURL(new Blob([s.data])),i=document.createElement("a");i.href=e,i.setAttribute("download",`spins-${Date.now()}.xlsx`),document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(e),U.success("فایل اکسل با موفقیت دانلود شد.")}catch{U.error("خطا در دریافت فایل اکسل")}finally{h.value=!1}}const V={PHYSICAL:{text:"کالای فیزیکی",color:"blue"},DISCOUNT_CODE:{text:"کد تخفیف",color:"green"},DISCOUNT:{text:"کد تخفیف",color:"green"},CREDIT:{text:"شارژ کیف پول",color:"purple"},WALLET_CREDIT:{text:"شارژ کیف پول",color:"purple"},CASH:{text:"جایزه نقدی",color:"gold"},NO_PRIZE:{text:"پوچ",color:"default"},OTHER:{text:"شانس مجدد",color:"cyan"},FREE_CHANCE:{text:"شانس مجدد",color:"cyan"},DIGITAL_CODE:{text:"کد دیجیتال",color:"green"}};function A(s){return s?V[s]||{text:s,color:"blue"}:{text:"—",color:"default"}}function B(s){if(!s)return"—";try{const e=new Date(s);if(isNaN(e.getTime()))return"—";const i=e.toLocaleDateString("fa-IR",{year:"numeric",month:"2-digit",day:"2-digit"}),g=e.toLocaleTimeString("fa-IR",{hour:"2-digit",minute:"2-digit"});return f(`${i} - ${g}`)}catch{return"—"}}const K=[{title:"شماره همراه",dataIndex:["user","mobile"],key:"userMobile"},{title:"نام کاربر",dataIndex:["user","name"],key:"userName"},{title:"کمپین",dataIndex:["campaign","title"],key:"campaignTitle"},{title:"جایزه / نتیجه",dataIndex:["prize","title"],key:"prizeTitle"},{title:"نوع جایزه",key:"prizeType"},{title:"نتیجه",dataIndex:"isWin",key:"isWin",align:"center"},{title:"کلید تکرارناپذیری (Idempotency)",dataIndex:"idempotencyKey",key:"idempotencyKey",ellipsis:!0},{title:"آی‌پی کاربر",dataIndex:"ipAddress",key:"ipAddress"},{title:"تاریخ و ساعت چرخش",key:"createdAt"}];return G(()=>{$(),_()}),(s,e)=>{const i=p("a-button"),g=p("a-space"),y=p("a-input-search"),b=p("a-select-option"),H=p("a-select"),D=p("a-tag"),M=p("a-table"),P=p("a-card");return o(),r("div",se,[m("div",ne,[e[6]||(e[6]=m("div",null,[m("h1",{class:"title"},"تاریخچه چرخش‌ها (Spins)"),m("p",{class:"subtitle"},"گزارش لحظه‌ای تمام تلاش‌ها، برندگان، کدها و آی‌پی‌های ثبت‌شده")],-1)),d(g,null,{default:l(()=>[d(i,{onClick:_,loading:v.value},{icon:l(()=>[d(u(Y))]),default:l(()=>[e[4]||(e[4]=x(" به‌روزرسانی ",-1))]),_:1},8,["loading"]),d(i,{type:"primary",loading:h.value,onClick:F},{icon:l(()=>[d(u(Z))]),default:l(()=>[e[5]||(e[5]=x(" خروجی اکسل ",-1))]),_:1},8,["loading"])]),_:1})]),d(P,{bordered:!1,class:"main-card"},{default:l(()=>[m("div",ie,[m("div",oe,[d(y,{value:n.search,"onUpdate:value":e[0]||(e[0]=t=>n.search=t),placeholder:"جستجوی شماره همراه یا نام...",style:{width:"260px"},allowClear:"",onSearch:e[1]||(e[1]=()=>{n.page=1,_()})},{prefix:l(()=>[d(u(q),{style:{color:"#94a3b8","margin-left":"4px"}})]),_:1},8,["value"]),d(H,{value:n.campaignId,"onUpdate:value":e[2]||(e[2]=t=>n.campaignId=t),placeholder:"فیلتر کمپین",allowClear:"",style:{width:"200px"},onChange:e[3]||(e[3]=()=>{n.page=1,_()})},{default:l(()=>[(o(!0),r(O,null,Q(w.value,t=>(o(),S(b,{key:t.id,value:t.id},{default:l(()=>[x(c(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])])]),d(M,{dataSource:z.value,columns:K,loading:v.value,rowKey:"id",size:"middle",pagination:{current:n.page,pageSize:n.pageSize,total:T.value,showTotal:t=>`مجموع: ${u(f)(t)} چرخش`,onChange:t=>{n.page=t,_()}}},{bodyCell:l(({column:t,record:a})=>{var R,E,L,N;return[t.key==="userMobile"?(o(),r("span",{key:0,class:"mobile-cell user-mobile-link",onClick:C=>a.userId?u(W).push(`/users/${a.userId}`):null},c(u(f)((R=a.user)==null?void 0:R.mobile)),9,le)):t.key==="userName"?(o(),r("span",re,c(((E=a.user)==null?void 0:E.name)||"—"),1)):t.key==="prizeTitle"?(o(),r(O,{key:2},[(L=a.prize)!=null&&L.title?(o(),r("span",de,c(a.prize.title),1)):(o(),r("span",ce,"بدون جایزه (پوچ)"))],64)):t.key==="prizeType"?(o(),S(D,{key:3,color:A(((N=a.prize)==null?void 0:N.type)||a.prizeType).color,style:{"border-radius":"4px"}},{default:l(()=>{var C;return[x(c(A(((C=a.prize)==null?void 0:C.type)||a.prizeType).text),1)]}),_:2},1032,["color"])):t.key==="isWin"?(o(),S(D,{key:4,color:a.isWin?"green":"default",class:"status-tag"},{default:l(()=>[m("span",{class:"status-dot",style:X({backgroundColor:a.isWin?"#10b981":"#94a3b8"})},null,4),x(" "+c(a.isWin?"برنده":"پوچ"),1)]),_:2},1032,["color"])):t.key==="idempotencyKey"?(o(),r("code",pe,c(a.idempotencyKey),1)):t.key==="ipAddress"?(o(),r("span",ue,c(u(f)(a.ipAddress)),1)):t.key==="createdAt"?(o(),r("span",ye,c(a.createdAtFormatted?u(f)(a.createdAtFormatted):B(a.createdAt)),1)):ee("",!0)]}),_:1},8,["dataSource","loading","pagination"])]),_:1})])}}}),ke=ae(me,[["__scopeId","data-v-e3a0055c"]]);export{ke as default}; diff --git a/apps/admin/dist/assets/TeamOutlined-Cc_Yyb--.js b/apps/admin/dist/assets/TeamOutlined-Cc_Yyb--.js new file mode 100644 index 0000000..ff7cd91 --- /dev/null +++ b/apps/admin/dist/assets/TeamOutlined-Cc_Yyb--.js @@ -0,0 +1 @@ +import{b as u,I as l}from"./index-C4s_T2hP.js";var o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"};function c(r){for(var e=1;e{T(),Y()}),(m,n)=>{var W,$;const v=l("a-button"),D=l("a-space"),w=l("a-page-header"),y=l("a-descriptions-item"),x=l("a-tag"),ne=l("a-descriptions"),M=l("a-card"),se=l("a-col"),le=l("a-row"),R=l("a-table"),P=l("a-tab-pane"),oe=l("a-tabs"),ie=l("a-select-option"),de=l("a-select"),N=l("a-form-item"),ue=l("a-input-number"),ce=l("a-input"),re=l("a-form"),pe=l("a-modal");return d(),_("div",Ce,[t(w,{class:"detail-header",title:`پروفایل کاربر: ${(W=o.value)!=null&&W.mobile?c(z)(o.value.mobile):"در حال بارگذاری..."}`,"sub-title":(($=o.value)==null?void 0:$.name)||"بدون نام",onBack:n[1]||(n[1]=a=>c(X).push("/users"))},{extra:e(()=>[t(D,null,{default:e(()=>[t(v,{onClick:T,loading:f.value},{icon:e(()=>[t(c(ve))]),default:e(()=>[n[6]||(n[6]=r(" به‌روزرسانی ",-1))]),_:1},8,["loading"]),t(v,{type:"primary",onClick:n[0]||(n[0]=()=>K())},{icon:e(()=>[t(c(G))]),default:e(()=>[n[7]||(n[7]=r(" افزودن شانس ",-1))]),_:1})]),_:1})]),_:1},8,["title","sub-title"]),t(le,{gutter:16},{default:e(()=>[t(se,{span:24},{default:e(()=>[t(M,{title:"اطلاعات هویتی و حساب",bordered:!1,class:"section-card",style:{"margin-bottom":"20px"}},{default:e(()=>[t(ne,{bordered:"",size:"small",column:{xs:1,sm:2,md:4}},{default:e(()=>[t(y,{label:"شماره موبایل"},{default:e(()=>{var a;return[H("span",be,u(c(z)((a=o.value)==null?void 0:a.mobile)),1)]}),_:1}),t(y,{label:"نام و نام خانوادگی"},{default:e(()=>{var a;return[r(u(((a=o.value)==null?void 0:a.name)||"—"),1)]}),_:1}),t(y,{label:"وضعیت حساب"},{default:e(()=>{var a,i;return[t(x,{color:((a=o.value)==null?void 0:a.status)==="BLOCKED"||(i=o.value)!=null&&i.isBlocked?"red":"green"},{default:e(()=>{var s,g;return[r(u(((s=o.value)==null?void 0:s.status)==="BLOCKED"||(g=o.value)!=null&&g.isBlocked?"مسدود شده":"فعال"),1)]}),_:1},8,["color"])]}),_:1}),t(y,{label:"تاریخ ثبت‌نام"},{default:e(()=>{var a;return[H("span",xe,u((a=o.value)!=null&&a.createdAt?c(z)(new Date(o.value.createdAt).toLocaleDateString("fa-IR")):"—"),1)]}),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),t(M,{title:"موجودی شانس در کمپین‌ها",bordered:!1,class:"section-card",style:{"margin-bottom":"20px"}},{default:e(()=>{var a;return[t(R,{dataSource:((a=o.value)==null?void 0:a.userCampaigns)||[],columns:ee,loading:f.value,rowKey:"id",size:"middle",pagination:!1},{bodyCell:e(({column:i,record:s})=>[i.key==="remainingChances"?(d(),k(x,{key:0,color:"success",style:{"font-size":"13px","font-weight":"600"}},{default:e(()=>[r(u(c(U)(s.remainingChances)),1)]),_:2},1024)):i.key==="totalChances"?(d(),_("span",Ie,u(c(U)(s.totalChances)),1)):i.key==="usedChances"?(d(),_("span",ze,u(c(U)(s.usedChances)),1)):i.key==="actions"?(d(),k(v,{key:3,type:"text",size:"small",class:"action-text-btn",onClick:g=>K(s.campaignId)},{icon:e(()=>[t(c(G),{style:{color:"#4f46e5"}})]),default:e(()=>[n[8]||(n[8]=r(" تغییر شانس ",-1))]),_:1},8,["onClick"])):O("",!0)]),_:1},8,["dataSource","loading"])]}),_:1}),t(oe,{defaultActiveKey:"prizes",type:"card",class:"detail-tabs"},{default:e(()=>[t(P,{key:"prizes",tab:"جوایز دریافت‌شده"},{default:e(()=>{var a;return[t(R,{dataSource:((a=o.value)==null?void 0:a.prizes)||[],columns:ae,loading:f.value,rowKey:"id",size:"middle",pagination:{pageSize:5}},{bodyCell:e(({column:i,record:s})=>{var g;return[i.key==="prizeType"?(d(),k(x,{key:0},{default:e(()=>{var I,q;return[r(u(Z[(I=s.prize)==null?void 0:I.prizeType]||((q=s.prize)==null?void 0:q.prizeType)||"—"),1)]}),_:2},1024)):i.key==="code"?(d(),_(j,{key:1},[s.code?(d(),_("code",he,u(s.code),1)):(d(),_("span",Ae,"—"))],64)):i.key==="status"?(d(),k(x,{key:2,color:((g=F[s.status])==null?void 0:g.color)||"blue"},{default:e(()=>{var I;return[r(u(((I=F[s.status])==null?void 0:I.text)||s.status),1)]}),_:2},1032,["color"])):i.key==="createdAt"?(d(),_("span",De,u(c(z)(new Date(s.createdAt).toLocaleDateString("fa-IR"))),1)):O("",!0)]}),_:1},8,["dataSource","loading"])]}),_:1}),t(P,{key:"spins",tab:"تاریخچه اسپین‌ها"},{default:e(()=>{var a;return[t(R,{dataSource:((a=o.value)==null?void 0:a.spins)||[],columns:te,loading:f.value,rowKey:"id",size:"middle",pagination:{pageSize:5}},{bodyCell:e(({column:i,record:s})=>[i.key==="isWin"?(d(),k(x,{key:0,color:s.isWin?"green":"default"},{default:e(()=>[r(u(s.isWin?"برنده":"پوچ"),1)]),_:2},1032,["color"])):i.key==="createdAt"?(d(),_("span",we,u(c(z)(new Date(s.createdAt).toLocaleString("fa-IR"))),1)):O("",!0)]),_:1},8,["dataSource","loading"])]}),_:1})]),_:1}),t(pe,{open:h.value,"onUpdate:open":n[5]||(n[5]=a=>h.value=a),title:"تنظیم شانس کاربر در کمپین",confirmLoading:E.value,okText:"ثبت تغییرات",cancelText:"انصراف",onOk:J},{default:e(()=>[t(re,{layout:"vertical"},{default:e(()=>[t(N,{label:"کمپین مورد نظر",required:""},{default:e(()=>[t(de,{value:C.value,"onUpdate:value":n[2]||(n[2]=a=>C.value=a),placeholder:"انتخاب کمپین",style:{width:"100%"}},{default:e(()=>[(d(!0),_(j,null,ge(L.value,a=>(d(),k(ie,{key:a.id,value:a.id},{default:e(()=>[r(u(a.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),t(N,{label:"تغییر شانس (+ برای افزایش، - برای کسر)",required:""},{default:e(()=>[t(ue,{value:b.value,"onUpdate:value":n[3]||(n[3]=a=>b.value=a),style:{width:"100%"}},null,8,["value"])]),_:1}),t(N,{label:"دلیل / بابت",required:""},{default:e(()=>[t(ce,{value:A.value,"onUpdate:value":n[4]||(n[4]=a=>A.value=a),placeholder:"مثال: خرید مجدد مشتری"},null,8,["value"])]),_:1})]),_:1})]),_:1},8,["open","confirmLoading"])])}}}),Ne=ke(Se,[["__scopeId","data-v-8d59632b"]]);export{Ne as default}; diff --git a/apps/admin/dist/assets/UserDetailView-DMrkKe44.css b/apps/admin/dist/assets/UserDetailView-DMrkKe44.css new file mode 100644 index 0000000..8824dbb --- /dev/null +++ b/apps/admin/dist/assets/UserDetailView-DMrkKe44.css @@ -0,0 +1 @@ +.detail-header[data-v-8d59632b]{background:#fff;margin-bottom:20px;border-radius:12px;border:1px solid #f1f5f9;box-shadow:0 1px 3px #0000000a}.section-card[data-v-8d59632b]{border-radius:12px;border:1px solid #f1f5f9;box-shadow:0 1px 3px #0000000a}.detail-tabs[data-v-8d59632b]{background:#fff;padding:16px;border-radius:12px;border:1px solid #f1f5f9;box-shadow:0 1px 3px #0000000a}.code-badge[data-v-8d59632b]{background:#f1f5f9;padding:2px 6px;border-radius:4px;font-family:monospace;font-size:12px;color:#334155}.num-cell[data-v-8d59632b],.date-cell[data-v-8d59632b]{color:#334155;font-size:13px}.action-text-btn[data-v-8d59632b]{color:#4f46e5!important;font-size:12px;font-weight:500;border-radius:6px;transition:all .2s ease}.action-text-btn[data-v-8d59632b]:hover{background-color:#eef2ff!important}.text-muted[data-v-8d59632b]{color:#cbd5e1} diff --git a/apps/admin/dist/assets/UserListView-CTSE4Pmv.js b/apps/admin/dist/assets/UserListView-CTSE4Pmv.js new file mode 100644 index 0000000..95eaf26 --- /dev/null +++ b/apps/admin/dist/assets/UserListView-CTSE4Pmv.js @@ -0,0 +1 @@ +import{t as y,f as M}from"./farsi-number-stB7JMN0.js";import{d as ne,l as se,c as p,a as d,b as a,w as n,n as x,r as l,h as v,g as V,o as c,e as u,S as oe,f as h,t as g,x as z,G as le,M as ie,H as ue,s as re,F as de,y as ce,i as pe,J as me,z as b,_ as _e}from"./index-C4s_T2hP.js";import{P as ge}from"./PlusCircleOutlined-DvvDmI1x.js";import{U as fe}from"./UnlockOutlined-bEPE7jAH.js";import{L as ye}from"./LockOutlined-C2VUSHin.js";const ke={class:"user-list-page"},ve={class:"table-header"},be={class:"filters"},Ce=["onClick"],we={key:1,class:"user-name"},xe={key:2,class:"date-cell"},he={key:3,class:"date-cell"},Le={key:4,class:"num-cell"},Ie={key:5,class:"num-cell"},Be={class:"dropdown-action-item"},Se={class:"dropdown-action-item"},Ae={key:0,class:"dropdown-action-item text-success"},Oe={key:1,class:"dropdown-action-item text-danger"},ze=ne({__name:"UserListView",setup(De){const D=pe(),L=v(!1),U=v([]),$=v(0),r=V({page:1,pageSize:10,search:"",status:void 0}),C=v(!1),I=v(!1),B=v([]),s=V({userId:"",userMobile:"",campaignId:"",amount:1,reason:""});async function F(){var o;try{const e=await x.get("/admin/campaigns",{params:{pageSize:100}});B.value=Array.isArray(e.data)?e.data:((o=e.data)==null?void 0:o.data)||[]}catch{}}async function k(){var o,e,m,f;L.value=!0;try{const _=await x.get("/admin/users",{params:{page:r.page,pageSize:r.pageSize,search:r.search||void 0,status:r.status||void 0}}),w=Array.isArray(_.data)?_.data:((o=_.data)==null?void 0:o.data)||[];U.value=w,$.value=((e=_.meta)==null?void 0:e.total)||((f=(m=_.data)==null?void 0:m.meta)==null?void 0:f.total)||w.length}finally{L.value=!1}}async function N(o){const m=!(o.status==="BLOCKED");try{await x.patch(`/admin/users/${o.id}/block`,{blocked:m,reason:m?"مسدودسازی توسط مدیر":"رفع مسدودی توسط مدیر"}),b.success(m?"کاربر با موفقیت مسدود شد.":"مسدودی کاربر رفع شد."),k()}catch{}}function j(o){const e=o.status==="BLOCKED";me.confirm({title:e?"رفع مسدودی کاربر":"مسدودسازی کاربر",content:e?`آیا از رفع مسدودی کاربر ${y(o.mobile)} اطمینان دارید؟`:`آیا از مسدود کردن کاربر ${y(o.mobile)} اطمینان دارید؟ دسترسی کاربر به چرخش گردونه قطع خواهد شد.`,okText:e?"تأیید رفع مسدودی":"مسدود کن",okType:e?"primary":"danger",cancelText:"انصراف",onOk:()=>N(o)})}function q(o){var e;s.userId=o.id,s.userMobile=o.mobile,s.campaignId=((e=B.value[0])==null?void 0:e.id)||"",s.amount=1,s.reason="اهدای شانس تشویقی توسط مدیر",C.value=!0}async function P(){if(!s.campaignId){b.error("لطفاً کمپین مورد نظر را انتخاب کنید.");return}if(!s.amount||s.amount===0){b.error("مقدار شانس باید غیر صفر باشد.");return}if(!s.reason){b.error("دلیل تغییر شانس الزامی است.");return}I.value=!0;try{await x.post("/admin/chances/adjust",{userId:s.userId,campaignId:s.campaignId,amount:s.amount,reason:s.reason}),b.success("شانس کاربر با موفقیت تغییر یافت."),C.value=!1,k()}finally{I.value=!1}}const R=[{title:"شماره موبایل",dataIndex:"mobile",key:"mobile"},{title:"نام کاربر",dataIndex:"name",key:"name"},{title:"تاریخ ثبت‌نام",dataIndex:"createdAt",key:"createdAt"},{title:"آخرین ورود",dataIndex:"lastLoginAt",key:"lastLoginAt"},{title:"تعداد اسپین",dataIndex:["_count","spins"],key:"spinsCount",align:"center"},{title:"تعداد جوایز برنده",key:"prizesCount",align:"center"},{title:"وضعیت حساب",dataIndex:"status",key:"status",align:"center"},{title:"عملیات",key:"actions",width:70,align:"center"}];return se(()=>{F(),k()}),(o,e)=>{const m=l("a-input-search"),f=l("a-select-option"),_=l("a-select"),w=l("a-tag"),G=l("a-button"),S=l("a-menu-item"),H=l("a-menu-divider"),J=l("a-menu"),Q=l("a-dropdown"),W=l("a-table"),X=l("a-alert"),A=l("a-form-item"),Y=l("a-input-number"),Z=l("a-input"),ee=l("a-form"),te=l("a-modal"),ae=l("a-card");return c(),p("div",ke,[e[14]||(e[14]=d("div",{class:"page-header-title"},[d("div",null,[d("h1",{class:"title"},"مدیریت کاربران"),d("p",{class:"subtitle"},"مشاهده لیست کاربران، وضعیت حساب و تنظیم دستی شانس‌ها")])],-1)),a(ae,{bordered:!1,class:"main-card"},{default:n(()=>[d("div",ve,[d("div",be,[a(m,{value:r.search,"onUpdate:value":e[0]||(e[0]=t=>r.search=t),placeholder:"جستجوی موبایل یا نام...",style:{width:"270px"},allowClear:"",onSearch:e[1]||(e[1]=()=>{r.page=1,k()})},{prefix:n(()=>[a(u(oe),{style:{color:"#94a3b8","margin-left":"4px"}})]),_:1},8,["value"]),a(_,{value:r.status,"onUpdate:value":e[2]||(e[2]=t=>r.status=t),placeholder:"وضعیت حساب",allowClear:"",style:{width:"150px"},onChange:e[3]||(e[3]=()=>{r.page=1,k()})},{default:n(()=>[a(f,{value:"ACTIVE"},{default:n(()=>[...e[8]||(e[8]=[h("فعال",-1)])]),_:1}),a(f,{value:"BLOCKED"},{default:n(()=>[...e[9]||(e[9]=[h("مسدود",-1)])]),_:1})]),_:1},8,["value"])])]),a(W,{dataSource:U.value,columns:R,loading:L.value,rowKey:"id",size:"middle",pagination:{current:r.page,pageSize:r.pageSize,total:$.value,showTotal:t=>`مجموع: ${u(y)(t)} کاربر`,onChange:t=>{r.page=t,k()}}},{bodyCell:n(({column:t,record:i})=>{var E,T,K;return[t.key==="mobile"?(c(),p("span",{key:0,class:"user-mobile-link",onClick:O=>u(D).push(`/users/${i.id}`)},g(u(y)(i.mobile)),9,Ce)):t.key==="name"?(c(),p("span",we,g(i.name||"—"),1)):t.key==="createdAt"?(c(),p("span",xe,g(u(y)(new Date(i.createdAt).toLocaleDateString("fa-IR"))),1)):t.key==="lastLoginAt"?(c(),p("span",he,g(i.lastLoginAt?u(y)(new Date(i.lastLoginAt).toLocaleDateString("fa-IR")):"—"),1)):t.key==="spinsCount"?(c(),p("span",Le,g(u(M)(((E=i._count)==null?void 0:E.spins)??0)),1)):t.key==="prizesCount"?(c(),p("span",Ie,g(u(M)(((T=i._count)==null?void 0:T.userPrizes)??((K=i._count)==null?void 0:K.prizes)??0)),1)):t.key==="status"?(c(),z(w,{key:6,color:i.status==="BLOCKED"?"red":"green",class:"status-tag"},{default:n(()=>[d("span",{class:"status-dot",style:le({backgroundColor:i.status==="BLOCKED"?"#ef4444":"#10b981"})},null,4),h(" "+g(i.status==="BLOCKED"?"مسدود":"فعال"),1)]),_:2},1032,["color"])):t.key==="actions"?(c(),z(Q,{key:7,trigger:["click"],placement:"bottomLeft"},{overlay:n(()=>[a(J,{class:"action-dropdown-menu"},{default:n(()=>[a(S,{key:"profile",onClick:O=>u(D).push(`/users/${i.id}`)},{default:n(()=>[d("div",Be,[a(u(ue),{class:"dropdown-item-icon"}),e[10]||(e[10]=d("span",null,"مشاهده پروفایل و جزییات",-1))])]),_:1},8,["onClick"]),a(S,{key:"chance",onClick:O=>q(i)},{default:n(()=>[d("div",Se,[a(u(ge),{class:"dropdown-item-icon"}),e[11]||(e[11]=d("span",null,"تنظیم دستی شانس",-1))])]),_:1},8,["onClick"]),a(H),a(S,{key:"block",onClick:O=>j(i)},{default:n(()=>[i.status==="BLOCKED"?(c(),p("div",Ae,[a(u(fe),{class:"dropdown-item-icon"}),e[12]||(e[12]=d("span",null,"رفع مسدودی حساب",-1))])):(c(),p("div",Oe,[a(u(ye),{class:"dropdown-item-icon"}),e[13]||(e[13]=d("span",null,"مسدودسازی کاربر",-1))]))]),_:2},1032,["onClick"])]),_:2},1024)]),default:n(()=>[a(G,{type:"text",shape:"circle",class:"action-more-btn",title:"عملیات"},{default:n(()=>[a(u(ie),{style:{"font-size":"18px"}})]),_:1})]),_:2},1024)):re("",!0)]}),_:1},8,["dataSource","loading","pagination"]),a(te,{open:C.value,"onUpdate:open":e[7]||(e[7]=t=>C.value=t),title:"افزایش / کاهش شانس کاربر",confirmLoading:I.value,okText:"ثبت تغییر شانس",cancelText:"انصراف",onOk:P},{default:n(()=>[a(ee,{layout:"vertical"},{default:n(()=>[a(X,{message:`کاربر: ${u(y)(s.userMobile)}`,description:"تغییر شانس مستقیماً در دفترکل تراکنش‌های شانس (Ledger) و اسنپ‌شات کاربر با لاگ بازرسی ثبت می‌گردد.",type:"info","show-icon":"",style:{"margin-bottom":"16px","border-radius":"8px"}},null,8,["message"]),a(A,{label:"کمپین مورد نظر",required:""},{default:n(()=>[a(_,{value:s.campaignId,"onUpdate:value":e[4]||(e[4]=t=>s.campaignId=t),placeholder:"انتخاب کمپین"},{default:n(()=>[(c(!0),p(de,null,ce(B.value,t=>(c(),z(f,{key:t.id,value:t.id},{default:n(()=>[h(g(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),a(A,{label:"مقدار تغییر (+ برای افزایش، - برای کسر)",required:"",tooltip:"مثال: ۱ برای اهدای یک شانس، ۲- برای کسر دو شانس"},{default:n(()=>[a(Y,{value:s.amount,"onUpdate:value":e[5]||(e[5]=t=>s.amount=t),style:{width:"100%"}},null,8,["value"])]),_:1}),a(A,{label:"دلیل / بابت",required:""},{default:n(()=>[a(Z,{value:s.reason,"onUpdate:value":e[6]||(e[6]=t=>s.reason=t),placeholder:"مثال: خرید از فروشگاه / هدیه پشتیبانی"},null,8,["value"])]),_:1})]),_:1})]),_:1},8,["open","confirmLoading"])]),_:1})])}}}),Me=_e(ze,[["__scopeId","data-v-fd1c9633"]]);export{Me as default}; diff --git a/apps/admin/dist/assets/UserListView-CulU6O7K.css b/apps/admin/dist/assets/UserListView-CulU6O7K.css new file mode 100644 index 0000000..abc0518 --- /dev/null +++ b/apps/admin/dist/assets/UserListView-CulU6O7K.css @@ -0,0 +1 @@ +.page-header-title[data-v-fd1c9633]{margin-bottom:20px}.page-header-title .title[data-v-fd1c9633]{font-size:20px;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.3px}.page-header-title .subtitle[data-v-fd1c9633]{font-size:13px;color:#64748b;margin:4px 0 0}.main-card[data-v-fd1c9633]{border-radius:12px;box-shadow:0 1px 3px #0000000a;border:1px solid #f1f5f9}.table-header[data-v-fd1c9633]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.filters[data-v-fd1c9633]{display:flex;gap:12px}.user-mobile-link[data-v-fd1c9633]{font-weight:600;color:#1e293b;cursor:pointer;transition:color .15s ease}.user-mobile-link[data-v-fd1c9633]:hover{color:#4f46e5}.user-name[data-v-fd1c9633]{font-weight:500;color:#334155}.num-cell[data-v-fd1c9633],.date-cell[data-v-fd1c9633]{color:#334155;font-size:13px}.status-tag[data-v-fd1c9633]{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border-radius:20px;font-weight:500}.status-dot[data-v-fd1c9633]{width:6px;height:6px;border-radius:50%;display:inline-block}.action-more-btn[data-v-fd1c9633]{color:#64748b;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;transition:all .2s ease}.action-more-btn[data-v-fd1c9633]:hover{color:#4f46e5!important;background-color:#eef2ff!important}.dropdown-action-item[data-v-fd1c9633]{display:flex;align-items:center;gap:8px;color:#334155;text-decoration:none;font-size:13px}.dropdown-item-icon[data-v-fd1c9633]{font-size:14px}.text-success[data-v-fd1c9633]{color:#10b981}.text-danger[data-v-fd1c9633]{color:#ef4444} diff --git a/apps/admin/dist/assets/WinnerListView-COe78qJf.css b/apps/admin/dist/assets/WinnerListView-COe78qJf.css new file mode 100644 index 0000000..d1aacd7 --- /dev/null +++ b/apps/admin/dist/assets/WinnerListView-COe78qJf.css @@ -0,0 +1 @@ +.page-header-title[data-v-4e0bbbf1]{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:12px}.page-header-title .title[data-v-4e0bbbf1]{font-size:20px;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.3px}.page-header-title .subtitle[data-v-4e0bbbf1]{font-size:13px;color:#64748b;margin:4px 0 0}.main-card[data-v-4e0bbbf1]{border-radius:12px;box-shadow:0 1px 3px #0000000a;border:1px solid #f1f5f9}.table-header[data-v-4e0bbbf1]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;flex-wrap:wrap;gap:12px}.filters[data-v-4e0bbbf1]{display:flex;gap:12px}.mobile-cell[data-v-4e0bbbf1]{font-weight:600;color:#1e293b}.user-link[data-v-4e0bbbf1]{cursor:pointer;transition:color .15s ease}.user-link[data-v-4e0bbbf1]:hover{color:#4f46e5}.user-name[data-v-4e0bbbf1]{font-weight:500;color:#334155}.campaign-cell[data-v-4e0bbbf1]{color:#475569}.prize-text[data-v-4e0bbbf1]{font-weight:600;color:#1e293b}.code-badge[data-v-4e0bbbf1]{background:#f8fafc;border:1px solid #e2e8f0;padding:2px 6px;border-radius:4px;font-family:monospace;font-size:12px;color:#475569}.clickable-code[data-v-4e0bbbf1]{cursor:pointer;transition:all .15s ease}.clickable-code[data-v-4e0bbbf1]:hover{background:#eef2ff;border-color:#c7d2fe;color:#4f46e5}.date-cell[data-v-4e0bbbf1]{color:#334155;font-size:13px}.text-muted[data-v-4e0bbbf1]{color:#94a3b8}.status-tag[data-v-4e0bbbf1]{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border-radius:20px;font-weight:500}.status-dot[data-v-4e0bbbf1]{width:6px;height:6px;border-radius:50%;display:inline-block}.action-more-btn[data-v-4e0bbbf1]{color:#64748b;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;transition:all .2s ease}.action-more-btn[data-v-4e0bbbf1]:hover{color:#4f46e5!important;background-color:#eef2ff!important}.dropdown-action-item[data-v-4e0bbbf1]{display:flex;align-items:center;gap:8px;color:#334155;text-decoration:none;font-size:13px}.dropdown-item-icon[data-v-4e0bbbf1]{font-size:14px} diff --git a/apps/admin/dist/assets/WinnerListView-DwOoquHF.js b/apps/admin/dist/assets/WinnerListView-DwOoquHF.js new file mode 100644 index 0000000..c46a722 --- /dev/null +++ b/apps/admin/dist/assets/WinnerListView-DwOoquHF.js @@ -0,0 +1 @@ +import{t as T}from"./farsi-number-stB7JMN0.js";import{d as ct,l as mt,c as y,a as m,b as e,w as a,n as I,r as d,h as k,g as J,o as p,f as r,e as f,R as ft,$ as yt,S as gt,F as K,y as _t,t as g,x as b,G as vt,M as Ct,E as kt,U as xt,s as L,C as bt,i as wt,z as D,_ as Et}from"./index-C4s_T2hP.js";const Tt={class:"winner-list-page"},It={class:"page-header-title"},Dt={class:"table-header"},zt={class:"filters"},St=["onClick"],At={key:1,class:"user-name"},Ot={key:2,class:"campaign-cell"},Rt={key:3,class:"prize-text"},Lt=["onClick"],Nt={key:1,class:"text-muted"},Ut={key:7,class:"date-cell"},$t={class:"dropdown-action-item"},Vt={class:"dropdown-action-item"},Mt={class:"dropdown-action-item"},Ft=ct({__name:"WinnerListView",setup(Wt){const N=wt(),w=k(!1),z=k(!1),U=k([]),$=k(0),V=k([]),l=J({page:1,pageSize:10,campaignId:void 0,status:void 0,search:""}),E=k(!1),S=k(!1),c=J({id:"",winnerMobile:"",prizeTitle:"",status:"CONTACTED",note:""});async function Y(){var n;try{const t=await I.get("/admin/campaigns",{params:{pageSize:100}});V.value=Array.isArray(t.data)?t.data:((n=t.data)==null?void 0:n.data)||[]}catch{}}async function _(){var n,t,i,x;w.value=!0;try{const v=await I.get("/admin/user-prizes",{params:{page:l.page,pageSize:l.pageSize,campaignId:l.campaignId||void 0,status:l.status||void 0,search:l.search||void 0}}),u=Array.isArray(v.data)?v.data:((n=v.data)==null?void 0:n.data)||[];U.value=u,$.value=((t=v.meta)==null?void 0:t.total)||((x=(i=v.data)==null?void 0:i.meta)==null?void 0:x.total)||u.length}finally{w.value=!1}}function Z(n){var t,i;c.id=n.id,c.winnerMobile=((t=n.user)==null?void 0:t.mobile)||"",c.prizeTitle=((i=n.prize)==null?void 0:i.title)||"",c.status=n.status||"CONTACTED",c.note=n.note||"",E.value=!0}async function Q(){S.value=!0;try{await I.patch(`/admin/user-prizes/${c.id}/status`,{status:c.status,note:c.note||void 0}),D.success("وضعیت جایزه برنده با موفقیت به‌روزرسانی شد."),E.value=!1,_()}catch{}finally{S.value=!1}}async function tt(){z.value=!0;try{const n=await I.get("/admin/user-prizes/export",{params:{campaignId:l.campaignId||void 0,status:l.status||void 0,search:l.search||void 0},responseType:"blob"}),t=window.URL.createObjectURL(new Blob([n.data])),i=document.createElement("a");i.href=t,i.setAttribute("download",`winners-${Date.now()}.xlsx`),document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(t),D.success("فایل اکسل برندگان با موفقیت دانلود شد.")}catch{D.error("خطا در دریافت فایل اکسل برندگان")}finally{z.value=!1}}function M(n,t){navigator.clipboard.writeText(n),D.success(`${t} با موفقیت کپی شد.`)}const et={PHYSICAL:{text:"کالای فیزیکی",color:"blue"},DISCOUNT_CODE:{text:"کد تخفیف",color:"green"},DISCOUNT:{text:"کد تخفیف",color:"green"},CREDIT:{text:"شارژ کیف پول",color:"purple"},WALLET_CREDIT:{text:"شارژ کیف پول",color:"purple"},CASH:{text:"جایزه نقدی",color:"gold"},NO_PRIZE:{text:"پوچ",color:"default"},OTHER:{text:"شانس مجدد",color:"cyan"},FREE_CHANCE:{text:"شانس مجدد",color:"cyan"},DIGITAL_CODE:{text:"کد دیجیتال",color:"green"}};function F(n){return n?et[n]||{text:n,color:"blue"}:{text:"—",color:"default"}}function at(n){if(!n)return"—";try{const t=new Date(n);if(isNaN(t.getTime()))return"—";const i=t.toLocaleDateString("fa-IR",{year:"numeric",month:"2-digit",day:"2-digit"}),x=t.toLocaleTimeString("fa-IR",{hour:"2-digit",minute:"2-digit"});return T(`${i} - ${x}`)}catch{return"—"}}const ot=[{title:"شماره همراه",dataIndex:["user","mobile"],key:"mobile"},{title:"نام کاربر",dataIndex:["user","name"],key:"name"},{title:"کمپین",dataIndex:["campaign","title"],key:"campaign"},{title:"عنوان جایزه",dataIndex:["prize","title"],key:"prizeTitle"},{title:"نوع جایزه",key:"prizeType"},{title:"کد دیجیتال / پیگیری",dataIndex:"code",key:"code"},{title:"وضعیت پیگیری",dataIndex:"status",key:"status"},{title:"تاریخ و ساعت برد",key:"wonAt"},{title:"عملیات",key:"actions",width:70,align:"center"}];function A(n){switch(n){case"NEW":return{text:"جدید",color:"blue",dotColor:"#3b82f6"};case"CONTACTED":return{text:"تماس گرفته شده",color:"orange",dotColor:"#f59e0b"};case"DELIVERED":return{text:"تحویل داده شده",color:"green",dotColor:"#10b981"};case"ACTIVE_CODE":return{text:"کد فعال",color:"cyan",dotColor:"#06b6d4"};case"USED":return{text:"مصرف شده",color:"purple",dotColor:"#8b5cf6"};case"EXPIRED":return{text:"منقضی شده",color:"red",dotColor:"#ef4444"};default:return{text:n,color:"default",dotColor:"#94a3b8"}}}return mt(()=>{Y(),_()}),(n,t)=>{const i=d("a-button"),x=d("a-space"),v=d("a-input-search"),u=d("a-select-option"),O=d("a-select"),W=d("a-tag"),R=d("a-menu-item"),nt=d("a-menu"),st=d("a-dropdown"),lt=d("a-table"),it=d("a-alert"),P=d("a-form-item"),rt=d("a-textarea"),ut=d("a-form"),dt=d("a-modal"),pt=d("a-card");return p(),y("div",Tt,[m("div",It,[t[11]||(t[11]=m("div",null,[m("h1",{class:"title"},"مدیریت برندگان"),m("p",{class:"subtitle"},"پیگیری، تأیید و تغییر وضعیت اهدای جوایز به برندگان")],-1)),e(x,null,{default:a(()=>[e(i,{onClick:_,loading:w.value},{icon:a(()=>[e(f(ft))]),default:a(()=>[t[9]||(t[9]=r(" به‌روزرسانی ",-1))]),_:1},8,["loading"]),e(i,{type:"primary",loading:z.value,onClick:tt},{icon:a(()=>[e(f(yt))]),default:a(()=>[t[10]||(t[10]=r(" خروجی اکسل برندگان ",-1))]),_:1},8,["loading"])]),_:1})]),e(pt,{bordered:!1,class:"main-card"},{default:a(()=>[m("div",Dt,[m("div",zt,[e(v,{value:l.search,"onUpdate:value":t[0]||(t[0]=o=>l.search=o),placeholder:"جستجوی موبایل یا نام...",style:{width:"240px"},allowClear:"",onSearch:t[1]||(t[1]=()=>{l.page=1,_()})},{prefix:a(()=>[e(f(gt),{style:{color:"#94a3b8","margin-left":"4px"}})]),_:1},8,["value"]),e(O,{value:l.campaignId,"onUpdate:value":t[2]||(t[2]=o=>l.campaignId=o),placeholder:"فیلتر کمپین",allowClear:"",style:{width:"180px"},onChange:t[3]||(t[3]=()=>{l.page=1,_()})},{default:a(()=>[(p(!0),y(K,null,_t(V.value,o=>(p(),b(u,{key:o.id,value:o.id},{default:a(()=>[r(g(o.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"]),e(O,{value:l.status,"onUpdate:value":t[4]||(t[4]=o=>l.status=o),placeholder:"فیلتر وضعیت",allowClear:"",style:{width:"160px"},onChange:t[5]||(t[5]=()=>{l.page=1,_()})},{default:a(()=>[e(u,{value:"NEW"},{default:a(()=>[...t[12]||(t[12]=[r("جدید",-1)])]),_:1}),e(u,{value:"CONTACTED"},{default:a(()=>[...t[13]||(t[13]=[r("تماس گرفته شده",-1)])]),_:1}),e(u,{value:"DELIVERED"},{default:a(()=>[...t[14]||(t[14]=[r("تحویل شده",-1)])]),_:1}),e(u,{value:"ACTIVE_CODE"},{default:a(()=>[...t[15]||(t[15]=[r("کد فعال",-1)])]),_:1}),e(u,{value:"USED"},{default:a(()=>[...t[16]||(t[16]=[r("مصرف شده",-1)])]),_:1}),e(u,{value:"EXPIRED"},{default:a(()=>[...t[17]||(t[17]=[r("منقضی شده",-1)])]),_:1})]),_:1},8,["value"])])]),e(lt,{dataSource:U.value,columns:ot,loading:w.value,rowKey:"id",size:"middle",pagination:{current:l.page,pageSize:l.pageSize,total:$.value,showTotal:o=>`مجموع: ${f(T)(o)} برنده`,onChange:o=>{l.page=o,_()}}},{bodyCell:a(({column:o,record:s})=>{var h,B,H,X,j;return[o.key==="mobile"?(p(),y("span",{key:0,class:"mobile-cell user-link",onClick:C=>s.userId?f(N).push(`/users/${s.userId}`):null},g(f(T)((h=s.user)==null?void 0:h.mobile)),9,St)):o.key==="name"?(p(),y("span",At,g(((B=s.user)==null?void 0:B.name)||"—"),1)):o.key==="campaign"?(p(),y("span",Ot,g(((H=s.campaign)==null?void 0:H.title)||"—"),1)):o.key==="prizeTitle"?(p(),y("span",Rt,g((X=s.prize)==null?void 0:X.title),1)):o.key==="prizeType"?(p(),b(W,{key:4,color:F(((j=s.prize)==null?void 0:j.type)||s.prizeType).color,style:{"border-radius":"4px"}},{default:a(()=>{var C;return[r(g(F(((C=s.prize)==null?void 0:C.type)||s.prizeType).text),1)]}),_:2},1032,["color"])):o.key==="code"?(p(),y(K,{key:5},[s.code?(p(),y("code",{key:0,class:"code-badge clickable-code",title:"برای کپی کلیک کنید",onClick:C=>M(s.code,"کد جایزه")},g(s.code),9,Lt)):(p(),y("span",Nt,"—"))],64)):o.key==="status"?(p(),b(W,{key:6,color:A(s.status).color,class:"status-tag"},{default:a(()=>[m("span",{class:"status-dot",style:vt({backgroundColor:A(s.status).dotColor})},null,4),r(" "+g(A(s.status).text),1)]),_:2},1032,["color"])):o.key==="wonAt"||o.key==="createdAt"?(p(),y("span",Ut,g(s.wonAtFormatted?f(T)(s.wonAtFormatted):at(s.wonAt||s.createdAt)),1)):o.key==="actions"?(p(),b(st,{key:8,trigger:["click"],placement:"bottomLeft"},{overlay:a(()=>[e(nt,{class:"action-dropdown-menu"},{default:a(()=>{var C;return[e(R,{key:"status",onClick:G=>Z(s)},{default:a(()=>[m("div",$t,[e(f(kt),{class:"dropdown-item-icon"}),t[18]||(t[18]=m("span",null,"تغییر وضعیت پیگیری",-1))])]),_:1},8,["onClick"]),s.userId||(C=s.user)!=null&&C.id?(p(),b(R,{key:"user",onClick:G=>{var q;return f(N).push(`/users/${s.userId||((q=s.user)==null?void 0:q.id)}`)}},{default:a(()=>[m("div",Vt,[e(f(xt),{class:"dropdown-item-icon"}),t[19]||(t[19]=m("span",null,"پروفایل کاربر",-1))])]),_:1},8,["onClick"])):L("",!0),s.code?(p(),b(R,{key:"copy",onClick:G=>M(s.code,"کد جایزه")},{default:a(()=>[m("div",Mt,[e(f(bt),{class:"dropdown-item-icon"}),t[20]||(t[20]=m("span",null,"کپی کد دیجیتال",-1))])]),_:1},8,["onClick"])):L("",!0)]}),_:2},1024)]),default:a(()=>[e(i,{type:"text",shape:"circle",class:"action-more-btn",title:"عملیات"},{default:a(()=>[e(f(Ct),{style:{"font-size":"18px"}})]),_:1})]),_:2},1024)):L("",!0)]}),_:1},8,["dataSource","loading","pagination"]),e(dt,{open:E.value,"onUpdate:open":t[8]||(t[8]=o=>E.value=o),title:"تغییر وضعیت پیگیری جایزه برنده",confirmLoading:S.value,okText:"ثبت تغییر وضعیت",cancelText:"انصراف",onOk:Q},{default:a(()=>[e(ut,{layout:"vertical"},{default:a(()=>[e(it,{message:`برنده: ${c.winnerMobile} | جایزه: ${c.prizeTitle}`,type:"info","show-icon":"",style:{"margin-bottom":"16px"}},null,8,["message"]),e(P,{label:"وضعیت جدید",required:""},{default:a(()=>[e(O,{value:c.status,"onUpdate:value":t[6]||(t[6]=o=>c.status=o)},{default:a(()=>[e(u,{value:"NEW"},{default:a(()=>[...t[21]||(t[21]=[r("جدید",-1)])]),_:1}),e(u,{value:"CONTACTED"},{default:a(()=>[...t[22]||(t[22]=[r("تماس گرفته شده (هماهنگی آدرس)",-1)])]),_:1}),e(u,{value:"DELIVERED"},{default:a(()=>[...t[23]||(t[23]=[r("ارسال و تحویل شد",-1)])]),_:1}),e(u,{value:"ACTIVE_CODE"},{default:a(()=>[...t[24]||(t[24]=[r("کد دیجیتال فعال",-1)])]),_:1}),e(u,{value:"USED"},{default:a(()=>[...t[25]||(t[25]=[r("کد مصرف شد",-1)])]),_:1}),e(u,{value:"EXPIRED"},{default:a(()=>[...t[26]||(t[26]=[r("منقضی شد",-1)])]),_:1})]),_:1},8,["value"])]),_:1}),e(P,{label:"یادداشت و توضیحات پیگیری"},{default:a(()=>[e(rt,{value:c.note,"onUpdate:value":t[7]||(t[7]=o=>c.note=o),rows:"3",placeholder:"مثال: کد رهگیری پست: 123456789 یا هماهنگی با کاربر"},null,8,["value"])]),_:1})]),_:1})]),_:1},8,["open","confirmLoading"])]),_:1})])}}}),Bt=Et(Ft,[["__scopeId","data-v-4e0bbbf1"]]);export{Bt as default}; diff --git a/apps/admin/dist/assets/clientUrl-KVuNwfzw.js b/apps/admin/dist/assets/clientUrl-KVuNwfzw.js new file mode 100644 index 0000000..25df0e7 --- /dev/null +++ b/apps/admin/dist/assets/clientUrl-KVuNwfzw.js @@ -0,0 +1 @@ +import{b as c,I as s}from"./index-C4s_T2hP.js";var u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm-88-532h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zm224 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z"}}]},name:"pause-circle",theme:"outlined"};function i(e){for(var t=1;t"u")return!1;const e=String(window.location.href||""),t=String(window.location.hostname||""),n=String(window.location.port||"");return!!(e.includes("localhost")||e.includes("127.0.0.1")||e.includes("[::1]")||t==="localhost"||t==="127.0.0.1"||t==="[::1]"||n==="5173"||n==="5174"||n==="8080")}function d(e){const t=String(e||"").trim().replace(/^\/+/,"");if(!t)return"";if(/^https?:\/\//i.test(t)||t.includes("wheel.montest.ir"))try{const r=(/^https?:\/\//i.test(t)?new URL(t):new URL(`https://${t}`)).pathname.split("/").filter(Boolean);return r[r.length-1]||""}catch{const n=t.split("/").filter(Boolean);return n[n.length-1]||t}return t}function h(e){const t=d(e);return p()?t?`${l}/${t}`:`${l}/`:t?`/${t}`:"/"}function m(e){if(typeof window>"u")return;const t=h(e);console.log("CLICKED WHEEL LINK:",t),window.open(t,"_blank","noopener,noreferrer")}export{a as P,h as g,m as o}; diff --git a/apps/admin/dist/assets/farsi-number-stB7JMN0.js b/apps/admin/dist/assets/farsi-number-stB7JMN0.js new file mode 100644 index 0000000..3aed940 --- /dev/null +++ b/apps/admin/dist/assets/farsi-number-stB7JMN0.js @@ -0,0 +1 @@ +const i=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"];function o(r){return r==null||typeof r=="object"&&r!==null&&"value"in r&&(r=r.value,r==null)||typeof r=="object"?"":String(r).replace(/[0-9]/g,t=>i[+t]).replace(/[٠-٩]/g,t=>i[t.charCodeAt(0)-1632])}function f(r){if(r==null||r===""||typeof r=="object"&&r!==null&&"value"in r&&(r=r.value,r==null||r==="")||typeof r=="object")return"";const t=typeof r=="string"?parseFloat(u(r)):r;if(isNaN(t))return o(r);const e=new Intl.NumberFormat("fa-IR").format(t);return o(e)}function u(r){return r==null?"":String(r).replace(/[۰-۹]/g,t=>String(t.charCodeAt(0)-1776)).replace(/[٠-٩]/g,t=>String(t.charCodeAt(0)-1632))}function s(r,t=0){if(r==null||r==="")return t;if(typeof r=="number")return isNaN(r)?t:r;const e=u(r).replace(/[^0-9.-]/g,""),n=Number(e);return isNaN(n)?t:n}export{u as a,f,s as p,o as t}; diff --git a/apps/admin/dist/assets/index-C4s_T2hP.js b/apps/admin/dist/assets/index-C4s_T2hP.js new file mode 100644 index 0000000..ae413cf --- /dev/null +++ b/apps/admin/dist/assets/index-C4s_T2hP.js @@ -0,0 +1,515 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginView-CnoEJDts.js","assets/MailOutlined-DMDnYu7e.js","assets/LockOutlined-C2VUSHin.js","assets/LoginView-DoINjLi5.css","assets/MLoginView-DrgmodqC.js","assets/MLoginView-Dn7zttO0.css","assets/DashboardView-BSKs-P5X.js","assets/farsi-number-stB7JMN0.js","assets/index-CbZGMCSS.js","assets/ThunderboltOutlined-DP1eBOSO.js","assets/PlusCircleOutlined-DvvDmI1x.js","assets/TeamOutlined-Cc_Yyb--.js","assets/GiftOutlined-DgNzKaks.js","assets/DashboardView-qYZpW8qt.css","assets/CampaignListView-CGptQkZU.js","assets/clientUrl-KVuNwfzw.js","assets/CampaignListView-BT2gPo_J.css","assets/CampaignFormView-DyefXmzg.js","assets/index-NN61KtzX.js","assets/UploadOutlined-BdWusN3O.js","assets/CampaignFormView-Bh82lCkH.css","assets/PrizeListView-Y0tRTqdG.js","assets/PrizeListView-D79FcOxs.css","assets/UserListView-CTSE4Pmv.js","assets/UnlockOutlined-bEPE7jAH.js","assets/UserListView-CulU6O7K.css","assets/UserDetailView-BifrFoXz.js","assets/UserDetailView-DMrkKe44.css","assets/SpinListView-DM6_RMTR.js","assets/SpinListView-DC-obFwu.css","assets/WinnerListView-DwOoquHF.js","assets/WinnerListView-COe78qJf.css","assets/SmsLogListView-Cp_2i0gj.js","assets/SmsLogListView-DxBDhwbh.css","assets/ReportView-DAkvN1UA.js","assets/ReportView-B9vUeUVV.css","assets/AuditLogView-Dx1yARgc.js","assets/AuditLogView-BNOFR0wt.css","assets/MDashboardView-BOwauKcj.js","assets/MDashboardView-B3yDHSi-.css","assets/MCampaignListView-DhD-QCtV.js","assets/MCampaignListView-Dj8e1wBm.css","assets/MCampaignFormView-BK95YxT0.js","assets/MCampaignFormView-V2dAIrFM.css","assets/MPrizeListView-C8piSCMK.js","assets/MPrizeListView-BJ9r9FLG.css","assets/MUserListView-DgLEnBWI.js","assets/MUserListView-Bh6XqVjX.css","assets/MUserDetailView-BLWa_4fj.js","assets/MUserDetailView-py6fm5vE.css","assets/MSpinListView-D8QgZHY1.js","assets/MSpinListView-CaxIdVKC.css","assets/MWinnerListView-CCZkNU_c.js","assets/MWinnerListView-TakuyaAb.css","assets/MSmsLogView-DCYQGMw5.js","assets/MSmsLogView-Duj12zla.css","assets/MReportView-Q03nS5y6.js","assets/MReportView-DTKquLxx.css","assets/MAuditLogView-_cInDqas.js","assets/MAuditLogView-BySXTGGh.css"])))=>i.map(i=>d[i]); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&o(l)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();function Mc(e){"@babel/helpers - typeof";return Mc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mc(e)}function _A(e,t){if(Mc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t);if(Mc(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MA(e){var t=_A(e,"string");return Mc(t)=="symbol"?t:t+""}function AA(e,t,n){return(t=MA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function D(e){for(var t=1;tn in t}const Rt={},Fa=[],_r=()=>{},LO=()=>!1,Fp=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),zp=e=>e.startsWith("onUpdate:"),pn=Object.assign,$b=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},RA=Object.prototype.hasOwnProperty,_t=(e,t)=>RA.call(e,t),at=Array.isArray,Vi=e=>uu(e)==="[object Map]",wf=e=>uu(e)==="[object Set]",b$=e=>uu(e)==="[object Date]",dt=e=>typeof e=="function",Ht=e=>typeof e=="string",To=e=>typeof e=="symbol",Tt=e=>e!==null&&typeof e=="object",kO=e=>(Tt(e)||dt(e))&&dt(e.then)&&dt(e.catch),FO=Object.prototype.toString,uu=e=>FO.call(e),DA=e=>uu(e).slice(8,-1),zO=e=>uu(e)==="[object Object]",Hp=e=>Ht(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,lc=Sb(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),jp=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},NA=/-\w/g,no=jp(e=>e.replace(NA,t=>t.slice(1).toUpperCase())),BA=/\B([A-Z])/g,na=jp(e=>e.replace(BA,"-$1").toLowerCase()),Vp=jp(e=>e.charAt(0).toUpperCase()+e.slice(1)),Lg=jp(e=>e?`on${Vp(e)}`:""),Tr=(e,t)=>!Object.is(e,t),Ad=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},Cb=e=>{const t=parseFloat(e);return isNaN(t)?e:t},LA=e=>{const t=Ht(e)?Number(e):NaN;return isNaN(t)?e:t};let y$;const Wp=()=>y$||(y$=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function xb(e){if(at(e)){const t={};for(let n=0;n{if(n){const o=n.split(FA);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Mr(e){let t="";if(Ht(e))t=e;else if(at(e))for(let n=0;n!!(e&&e.__v_isRef===!0),Zn=e=>Ht(e)?e:e==null?"":at(e)||Tt(e)&&(e.toString===FO||!dt(e.toString))?VO(e)?Zn(e.value):JSON.stringify(e,WO,2):String(e),WO=(e,t)=>VO(t)?WO(e,t.value):Vi(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r],i)=>(n[kg(o,i)+" =>"]=r,n),{})}:wf(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>kg(n))}:To(t)?kg(t):Tt(t)&&!at(t)&&!zO(t)?String(t):t,kg=(e,t="")=>{var n;return To(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.42 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let mn;class KO{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&mn&&(mn.active?(this.parent=mn,this.index=(mn.scopes||(mn.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const o=this.scopes.slice();for(t=0,n=o.length;t0&&--this._on===0){if(mn===this)mn=this.prevScope;else{let t=mn;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n0)return;if(sc){let t=sc;for(sc=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ac;){let t=ac;for(ac=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function ZO(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function JO(e){let t,n=e.depsTail,o=n;for(;o;){const r=o.prevDep;o.version===-1?(o===n&&(n=r),Ib(o),KA(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=r}e.deps=t,e.depsTail=n}function wv(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(QO(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function QO(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ac)||(e.globalVersion=Ac,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!wv(e))))return;e.flags|=2;const t=e.dep,n=Ft,o=ir;Ft=e,ir=!0;try{ZO(e);const r=e.fn(e._value);(t.version===0||Tr(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Ft=n,ir=o,JO(e),e.flags&=-3}}function Ib(e,t=!1){const{dep:n,prevSub:o,nextSub:r}=e;if(o&&(o.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Ib(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function KA(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let ir=!0;const eP=[];function si(){eP.push(ir),ir=!1}function ci(){const e=eP.pop();ir=e===void 0?!0:e}function $$(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ft;Ft=void 0;try{t()}finally{Ft=n}}}let Ac=0,UA=class{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}};class Tb{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Ft||!ir||Ft===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ft)n=this.activeLink=new UA(Ft,this),Ft.deps?(n.prevDep=Ft.depsTail,Ft.depsTail.nextDep=n,Ft.depsTail=n):Ft.deps=Ft.depsTail=n,tP(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=Ft.depsTail,n.nextDep=void 0,Ft.depsTail.nextDep=n,Ft.depsTail=n,Ft.deps===n&&(Ft.deps=o)}return n}trigger(t){this.version++,Ac++,this.notify(t)}notify(t){Ob();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Pb()}}}function tP(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)tP(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Of=new WeakMap,Al=Symbol(""),Ov=Symbol(""),Rc=Symbol("");function Bn(e,t,n){if(ir&&Ft){let o=Of.get(e);o||Of.set(e,o=new Map);let r=o.get(n);r||(o.set(n,r=new Tb),r.map=o,r.key=n),r.track()}}function Zr(e,t,n,o,r,i){const l=Of.get(e);if(!l){Ac++;return}const a=s=>{s&&s.trigger()};if(Ob(),t==="clear")l.forEach(a);else{const s=at(e),c=s&&Hp(n);if(s&&n==="length"){const u=Number(o);l.forEach((d,f)=>{(f==="length"||f===Rc||!To(f)&&f>=u)&&a(d)})}else switch((n!==void 0||l.has(void 0))&&a(l.get(n)),c&&a(l.get(Rc)),t){case"add":s?c&&a(l.get("length")):(a(l.get(Al)),Vi(e)&&a(l.get(Ov)));break;case"delete":s||(a(l.get(Al)),Vi(e)&&a(l.get(Ov)));break;case"set":Vi(e)&&a(l.get(Al));break}}Pb()}function GA(e,t){const n=Of.get(e);return n&&n.get(t)}function ma(e){const t=nt(e);return t===e?t:(Bn(t,"iterate",Rc),Po(e)?t:t.map(cr))}function Up(e){return Bn(e=nt(e),"iterate",Rc),e}function Pr(e,t){return ui(e)?os(ii(e)?cr(t):t):cr(t)}const XA={__proto__:null,[Symbol.iterator](){return zg(this,Symbol.iterator,e=>Pr(this,e))},concat(...e){return ma(this).concat(...e.map(t=>at(t)?ma(t):t))},entries(){return zg(this,"entries",e=>(e[1]=Pr(this,e[1]),e))},every(e,t){return zr(this,"every",e,t,void 0,arguments)},filter(e,t){return zr(this,"filter",e,t,n=>n.map(o=>Pr(this,o)),arguments)},find(e,t){return zr(this,"find",e,t,n=>Pr(this,n),arguments)},findIndex(e,t){return zr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return zr(this,"findLast",e,t,n=>Pr(this,n),arguments)},findLastIndex(e,t){return zr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return zr(this,"forEach",e,t,void 0,arguments)},includes(...e){return Hg(this,"includes",e)},indexOf(...e){return Hg(this,"indexOf",e)},join(e){return ma(this).join(e)},lastIndexOf(...e){return Hg(this,"lastIndexOf",e)},map(e,t){return zr(this,"map",e,t,void 0,arguments)},pop(){return Ls(this,"pop")},push(...e){return Ls(this,"push",e)},reduce(e,...t){return C$(this,"reduce",e,t)},reduceRight(e,...t){return C$(this,"reduceRight",e,t)},shift(){return Ls(this,"shift")},some(e,t){return zr(this,"some",e,t,void 0,arguments)},splice(...e){return Ls(this,"splice",e)},toReversed(){return ma(this).toReversed()},toSorted(e){return ma(this).toSorted(e)},toSpliced(...e){return ma(this).toSpliced(...e)},unshift(...e){return Ls(this,"unshift",e)},values(){return zg(this,"values",e=>Pr(this,e))}};function zg(e,t,n){const o=Up(e),r=o[t]();return o!==e&&!Po(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const YA=Array.prototype;function zr(e,t,n,o,r,i){const l=Up(e),a=l!==e&&!Po(e),s=l[t];if(s!==YA[t]){const d=s.apply(e,i);return a?cr(d):d}let c=n;l!==e&&(a?c=function(d,f){return n.call(this,Pr(e,d),f,e)}:n.length>2&&(c=function(d,f){return n.call(this,d,f,e)}));const u=s.call(l,c,o);return a&&r?r(u):u}function C$(e,t,n,o){const r=Up(e),i=r!==e&&!Po(e);let l=n,a=!1;r!==e&&(i?(a=o.length===0,l=function(c,u,d){return a&&(a=!1,c=Pr(e,c)),n.call(this,c,Pr(e,u),d,e)}):n.length>3&&(l=function(c,u,d){return n.call(this,c,u,d,e)}));const s=r[t](l,...o);return a?Pr(e,s):s}function Hg(e,t,n){const o=nt(e);Bn(o,"iterate",Rc);const r=o[t](...n);return(r===-1||r===!1)&&Gp(n[0])?(n[0]=nt(n[0]),o[t](...n)):r}function Ls(e,t,n=[]){si(),Ob();const o=nt(e)[t].apply(e,n);return Pb(),ci(),o}const qA=Sb("__proto__,__v_isRef,__isVue"),nP=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(To));function ZA(e){To(e)||(e=String(e));const t=nt(this);return Bn(t,"has",e),t.hasOwnProperty(e)}class oP{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(r?i?a7:aP:i?lP:iP).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const l=at(t);if(!r){let s;if(l&&(s=XA[n]))return s;if(n==="hasOwnProperty")return ZA}const a=Reflect.get(t,n,jt(t)?t:o);if((To(n)?nP.has(n):qA(n))||(r||Bn(t,"get",n),i))return a;if(jt(a)){const s=l&&Hp(n)?a:a.value;return r&&Tt(s)?Iv(s):s}return Tt(a)?r?Iv(a):ft(a):a}}class rP extends oP{constructor(t=!1){super(!1,t)}set(t,n,o,r){let i=t[n];const l=at(t)&&Hp(n);if(!this._isShallow){const c=ui(i);if(!Po(o)&&!ui(o)&&(i=nt(i),o=nt(o)),!l&&jt(i)&&!jt(o))return c||(i.value=o),!0}const a=l?Number(n)e,Wu=e=>Reflect.getPrototypeOf(e);function n7(e,t,n){return function(...o){const r=this.__v_raw,i=nt(r),l=Vi(i),a=e==="entries"||e===Symbol.iterator&&l,s=e==="keys"&&l,c=r[e](...o),u=n?Pv:t?os:cr;return!t&&Bn(i,"iterate",s?Ov:Al),pn(Object.create(c),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:a?[u(d[0]),u(d[1])]:u(d),done:f}}})}}function Ku(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function o7(e,t){const n={get(r){const i=this.__v_raw,l=nt(i),a=nt(r);e||(Tr(r,a)&&Bn(l,"get",r),Bn(l,"get",a));const{has:s}=Wu(l),c=t?Pv:e?os:cr;if(s.call(l,r))return c(i.get(r));if(s.call(l,a))return c(i.get(a));i!==l&&i.get(r)},get size(){const r=this.__v_raw;return!e&&Bn(nt(r),"iterate",Al),r.size},has(r){const i=this.__v_raw,l=nt(i),a=nt(r);return e||(Tr(r,a)&&Bn(l,"has",r),Bn(l,"has",a)),r===a?i.has(r):i.has(r)||i.has(a)},forEach(r,i){const l=this,a=l.__v_raw,s=nt(a),c=t?Pv:e?os:cr;return!e&&Bn(s,"iterate",Al),a.forEach((u,d)=>r.call(i,c(u),c(d),l))}};return pn(n,e?{add:Ku("add"),set:Ku("set"),delete:Ku("delete"),clear:Ku("clear")}:{add(r){const i=nt(this),l=Wu(i),a=nt(r),s=!t&&!Po(r)&&!ui(r)?a:r;return l.has.call(i,s)||Tr(r,s)&&l.has.call(i,r)||Tr(a,s)&&l.has.call(i,a)||(i.add(s),Zr(i,"add",s,s)),this},set(r,i){!t&&!Po(i)&&!ui(i)&&(i=nt(i));const l=nt(this),{has:a,get:s}=Wu(l);let c=a.call(l,r);c||(r=nt(r),c=a.call(l,r));const u=s.call(l,r);return l.set(r,i),c?Tr(i,u)&&Zr(l,"set",r,i):Zr(l,"add",r,i),this},delete(r){const i=nt(this),{has:l,get:a}=Wu(i);let s=l.call(i,r);s||(r=nt(r),s=l.call(i,r)),a&&a.call(i,r);const c=i.delete(r);return s&&Zr(i,"delete",r,void 0),c},clear(){const r=nt(this),i=r.size!==0,l=r.clear();return i&&Zr(r,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=n7(r,e,t)}),n}function Eb(e,t){const n=o7(e,t);return(o,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?o:Reflect.get(_t(n,r)&&r in o?n:o,r,i)}const r7={get:Eb(!1,!1)},i7={get:Eb(!1,!0)},l7={get:Eb(!0,!1)};const iP=new WeakMap,lP=new WeakMap,aP=new WeakMap,a7=new WeakMap;function s7(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ft(e){return ui(e)?e:_b(e,!1,QA,r7,iP)}function sP(e){return _b(e,!1,t7,i7,lP)}function Iv(e){return _b(e,!0,e7,l7,aP)}function _b(e,t,n,o,r){if(!Tt(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=r.get(e);if(i)return i;const l=s7(DA(e));if(l===0)return e;const a=new Proxy(e,l===2?o:n);return r.set(e,a),a}function ii(e){return ui(e)?ii(e.__v_raw):!!(e&&e.__v_isReactive)}function ui(e){return!!(e&&e.__v_isReadonly)}function Po(e){return!!(e&&e.__v_isShallow)}function Gp(e){return e?!!e.__v_raw:!1}function nt(e){const t=e&&e.__v_raw;return t?nt(t):e}function Mb(e){return!_t(e,"__v_skip")&&Object.isExtensible(e)&&HO(e,"__v_skip",!0),e}const cr=e=>Tt(e)?ft(e):e,os=e=>Tt(e)?Iv(e):e;function jt(e){return e?e.__v_isRef===!0:!1}function ie(e){return cP(e,!1)}function oe(e){return cP(e,!0)}function cP(e,t){return jt(e)?e:new c7(e,t)}class c7{constructor(t,n){this.dep=new Tb,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:nt(t),this._value=n?t:cr(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||Po(t)||ui(t);t=o?t:nt(t),Tr(t,n)&&(this._rawValue=t,this._value=o?t:cr(t),this.dep.trigger())}}function uP(e){e.dep&&e.dep.trigger()}function ct(e){return jt(e)?e.value:e}const u7={get:(e,t,n)=>t==="__v_raw"?e:ct(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return jt(r)&&!jt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function dP(e){return ii(e)?e:new Proxy(e,u7)}function lr(e){const t=at(e)?new Array(e.length):{};for(const n in e)t[n]=fP(e,n);return t}class d7{constructor(t,n,o){this._object=t,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._key=To(n)?n:String(n),this._raw=nt(t);let r=!0,i=t;if(!at(t)||To(this._key)||!Hp(this._key))do r=!Gp(i)||Po(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=ct(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&jt(this._raw[this._key])){const n=this._object[this._key];if(jt(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return GA(this._raw,this._key)}}class f7{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function We(e,t,n){return jt(e)?e:dt(e)?new f7(e):Tt(e)&&arguments.length>1?fP(e,t,n):ie(e)}function fP(e,t,n){return new d7(e,t,n)}class p7{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Tb(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ac-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&Ft!==this)return qO(this,!0),!0}get value(){const t=this.dep.track();return QO(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function h7(e,t,n=!1){let o,r;return dt(e)?o=e:(o=e.get,r=e.set),new p7(o,r,n)}const Uu={},Pf=new WeakMap;let vl;function g7(e,t=!1,n=vl){if(n){let o=Pf.get(n);o||Pf.set(n,o=[]),o.push(e)}}function m7(e,t,n=Rt){const{immediate:o,deep:r,once:i,scheduler:l,augmentJob:a,call:s}=n,c=x=>r?x:Po(x)||r===!1||r===0?Jr(x,1):Jr(x);let u,d,f,h,m=!1,g=!1;if(jt(e)?(d=()=>e.value,m=Po(e)):ii(e)?(d=()=>c(e),m=!0):at(e)?(g=!0,m=e.some(x=>ii(x)||Po(x)),d=()=>e.map(x=>{if(jt(x))return x.value;if(ii(x))return c(x);if(dt(x))return s?s(x,2):x()})):dt(e)?t?d=s?()=>s(e,2):e:d=()=>{if(f){si();try{f()}finally{ci()}}const x=vl;vl=u;try{return s?s(e,3,[h]):e(h)}finally{vl=x}}:d=_r,t&&r){const x=d,C=r===!0?1/0:r;d=()=>Jr(x(),C)}const y=wb(),b=()=>{u.stop(),y&&y.active&&$b(y.effects,u)};if(i&&t){const x=t;t=(...C)=>{const O=x(...C);return b(),O}}let S=g?new Array(e.length).fill(Uu):Uu;const $=x=>{if(!(!(u.flags&1)||!u.dirty&&!x))if(t){const C=u.run();if(x||r||m||(g?C.some((O,w)=>Tr(O,S[w])):Tr(C,S))){f&&f();const O=vl;vl=u;try{const w=[C,S===Uu?void 0:g&&S[0]===Uu?[]:S,h];S=C,s?s(t,3,w):t(...w)}finally{vl=O}}}else u.run()};return a&&a($),u=new XO(d),u.scheduler=l?()=>l($,!1):$,h=x=>g7(x,!1,u),f=u.onStop=()=>{const x=Pf.get(u);if(x){if(s)s(x,4);else for(const C of x)C();Pf.delete(u)}},t?o?$(!0):S=u.run():l?l($.bind(null,!0),!0):u.run(),b.pause=u.pause.bind(u),b.resume=u.resume.bind(u),b.stop=b,b}function Jr(e,t=1/0,n){if(t<=0||!Tt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,jt(e))Jr(e.value,t,n);else if(at(e))for(let o=0;o{Jr(o,t,n)});else if(zO(e)){for(const o in e)Jr(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Jr(e[o],t,n)}return e}/** +* @vue/runtime-core v3.5.42 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function du(e,t,n,o){try{return o?e(...o):e()}catch(r){Xp(r,t,n)}}function Uo(e,t,n,o){if(dt(e)){const r=du(e,t,n,o);return r&&kO(r)&&r.catch(i=>{Xp(i,t,n)}),r}if(at(e)){const r=[];for(let i=0;i>>1,r=Qn[o],i=Dc(r);i=Dc(n)?Qn.push(e):Qn.splice(b7(t),0,e),e.flags|=1,hP()}}function hP(){If||(If=pP.then(mP))}function y7(e){if(!at(e))Ai&&e.id===-1?Ai.splice(Pa+1,0,e):e.flags&1||(za.push(e),e.flags|=1);else for(let t=0;tDc(n)-Dc(o));if(za.length=0,Ai){for(let n=0;ne.id==null?e.flags&2?-1:1/0:e.id;function mP(e){try{for(xr=0;xr{o._d&&Rf(-1);const i=Tf(t),l=li.length;let a;try{a=e(...r)}finally{for(let s=li.length;s>l;s--)Hb();Tf(i),o._d&&Rf(1)}return a};return o._n=!0,o._c=!0,o._d=!0,o}function _n(e,t){if(In===null)return e;const n=nh(In),o=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&dt(t)?t.call(o&&o.proxy):t}}function S7(){return!!($n()||Rl)}const $7=Symbol.for("v-scx"),C7=()=>Ke($7);function je(e,t){return Rb(e,null,t)}function Se(e,t,n){return Rb(e,t,n)}function Rb(e,t,n=Rt){const{immediate:o,deep:r,flush:i,once:l}=n,a=pn({},n),s=t&&o||!t&&i!=="post";let c;if(kc){if(i==="sync"){const h=C7();c=h.__watcherHandles||(h.__watcherHandles=[])}else if(!s){const h=()=>{};return h.stop=_r,h.resume=_r,h.pause=_r,h}}const u=kn;a.call=(h,m,g)=>Uo(h,u,m,g);let d=!1;i==="post"?a.scheduler=h=>{Xn(h,u&&u.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(h,m)=>{m?h():Ab(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,u&&(h.id=u.uid,h.i=u))};const f=m7(e,t,a);return kc&&(c?c.push(f):s&&f()),f}function x7(e,t,n){const o=this.proxy,r=Ht(e)?e.includes(".")?bP(o,e):()=>o[e]:e.bind(o,o);let i;dt(t)?i=t:(i=t.handler,n=t);const l=fu(this),a=Rb(r,i.bind(o),n);return l(),a}function bP(e,t){const n=t.split(".");return()=>{let o=e;for(let r=0;re.__isTeleport,yl=e=>e&&(e.disabled||e.disabled===""),w7=e=>e&&(e.defer||e.defer===""),w$=e=>typeof SVGElement<"u"&&e instanceof SVGElement,O$=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Tv=(e,t)=>{const n=e&&e.to;return Ht(n)?t?t(n):null:n},O7={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,i,l,a,s,c){const{mc:u,pc:d,pbc:f,o:{insert:h,querySelector:m,createText:g,createComment:y,parentNode:b}}=c,S=yl(t.props);let{dynamicChildren:$}=t;const x=(w,P,T)=>{w.shapeFlag&16&&u(w.children,P,T,r,i,l,a,s)},C=(w=t)=>{const P=yl(w.props),T=w.target=Tv(w.props,m),M=Ev(T,w,g,h);T&&(l!=="svg"&&w$(T)?l="svg":l!=="mathml"&&O$(T)&&(l="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(T),P||(x(w,T,M),Js(w,!1)))},O=w=>{const P=()=>{if(Ti.get(w)===P){if(Ti.delete(w),yl(w.props)){const T=b(w.el)||n;x(w,T,w.anchor),Js(w,!0)}C(w)}};Ti.set(w,P),Xn(P,i)};if(e==null){const w=t.el=g(""),P=t.anchor=g("");if(h(w,n,o),h(P,n,o),w7(t.props)||i&&i.pendingBranch){O(t);return}S&&(x(t,n,P),Js(t,!0)),C()}else{t.el=e.el;const w=t.anchor=e.anchor,P=Ti.get(e);if(P){P.flags|=8,Ti.delete(e),O(t);return}t.targetStart=e.targetStart;const T=t.target=e.target,M=t.targetAnchor=e.targetAnchor,E=yl(e.props),A=E?n:T,R=E?w:M;if(l==="svg"||w$(T)?l="svg":(l==="mathml"||O$(T))&&(l="mathml"),$?(f(e.dynamicChildren,$,A,r,i,l,a),zb(e,t,!0)):s||d(e,t,A,R,r,i,l,a,!1),S)E?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Gu(t,n,w,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const F=Tv(t.props,m);F&&(t.target=F,Gu(t,F,null,c,0))}else E&&Gu(t,T,M,c,1);Js(t,S)}},remove(e,t,n,{um:o,o:{remove:r}},i){const{shapeFlag:l,children:a,anchor:s,targetStart:c,targetAnchor:u,target:d,props:f}=e,h=yl(f),m=i||!h,g=Ti.get(e);if(g&&(g.flags|=8,Ti.delete(e)),d&&(r(c),r(u)),i&&r(s),!g&&(h||d)&&l&16)for(let y=0;y{e.isMounted=!0}),tt(()=>{e.isUnmounting=!0}),e}const Bo=[Function,Array],$P={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Bo,onEnter:Bo,onAfterEnter:Bo,onEnterCancelled:Bo,onBeforeLeave:Bo,onLeave:Bo,onAfterLeave:Bo,onLeaveCancelled:Bo,onBeforeAppear:Bo,onAppear:Bo,onAfterAppear:Bo,onAppearCancelled:Bo},CP=e=>{const t=e.subTree;return t.component?CP(t.component):t},I7={name:"BaseTransition",props:$P,setup(e,{slots:t}){const n=$n(),o=SP();return()=>{const r=t.default&&Nb(t.default(),!0),i=r&&r.length?xP(r):n.subTree?Yn():void 0;if(!i)return;const l=nt(e),{mode:a}=l;if(o.isLeaving)return jg(i);const s=Ef(i);if(!s)return jg(i);let c=Nc(s,l,o,n,d=>c=d);s.type!==xn&&Vl(s,c);let u=n.subTree&&Ef(n.subTree);if(u&&u.type!==xn&&!Sl(u,s)&&CP(n).type!==xn){let d=Nc(u,l,o,n);if(Vl(u,d),a==="out-in"&&s.type!==xn)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},jg(i);a==="in-out"&&s.type!==xn?d.delayLeave=(f,h,m)=>{const g=wP(o,u);g[String(u.key)]=u,f[Ho]=()=>{h(),f[Ho]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{m(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function xP(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==xn){t=n;break}}return t}const T7=I7;function wP(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function Nc(e,t,n,o,r){const{appear:i,mode:l,persisted:a=!1,onBeforeEnter:s,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:m,onLeaveCancelled:g,onBeforeAppear:y,onAppear:b,onAfterAppear:S,onAppearCancelled:$}=t,x=String(e.key),C=wP(n,e),O=(T,M)=>{T&&Uo(T,o,9,M)},w=(T,M)=>{const E=M[1];O(T,M),at(T)?T.every(A=>A.length<=1)&&E():T.length<=1&&E()},P={mode:l,persisted:a,beforeEnter(T){let M=s;if(!n.isMounted)if(i)M=y||s;else return;T[Ho]&&T[Ho](!0);const E=C[x];E&&Sl(e,E)&&E.el[Ho]&&E.el[Ho](),O(M,[T])},enter(T){if(C[x]===e)return;let M=c,E=u,A=d;if(!n.isMounted)if(i)M=b||c,E=S||u,A=$||d;else return;let R=!1;T[ks]=_=>{R||(R=!0,_?O(A,[T]):O(E,[T]),P.delayedLeave&&P.delayedLeave(),T[ks]=void 0)};const F=T[ks].bind(null,!1);M?w(M,[T,F]):F()},leave(T,M){const E=String(e.key);if(T[ks]&&T[ks](!0),n.isUnmounting)return M();O(f,[T]);let A=!1;T[Ho]=F=>{A||(A=!0,M(),F?O(g,[T]):O(m,[T]),T[Ho]=void 0,C[E]===e&&delete C[E])};const R=T[Ho].bind(null,!1);C[E]=e,h?w(h,[T,R]):R()},clone(T){const M=Nc(T,t,n,o,r);return r&&r(M),M}};return P}function jg(e){if(qp(e))return e=bn(e),e.children=null,e}function Ef(e){if(!qp(e))return Yp(e.type)&&e.children?xP(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&dt(n.default))return n.default()}}function Vl(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;Vl(Yp(n.type)&&Ef(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Nb(e,t=!1,n){let o=[],r=0;for(let i=0;i1)for(let i=0;icc(g,t&&(at(t)?t[y]:t),n,o,r));return}if(Ha(o)&&!r){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&cc(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?nh(o.component):o.el,l=r?null:i,{i:a,r:s}=e,c=t&&t.r,u=a.refs===Rt?a.refs={}:a.refs,d=a.setupState,f=nt(d),h=d===Rt?LO:g=>P$(u,g)?!1:_t(f,g),m=(g,y)=>!(y&&P$(u,y));if(c!=null&&c!==s){if(I$(t),Ht(c))u[c]=null,h(c)&&(d[c]=null);else if(jt(c)){const g=t;m(c,g.k)&&(c.value=null),g.k&&(u[g.k]=null)}}if(dt(s))du(s,a,12,[l,u]);else{const g=Ht(s),y=jt(s);if(g||y){const b=()=>{if(e.f){const S=g?h(s)?d[s]:u[s]:m()||!e.k?s.value:u[e.k];if(r)at(S)&&$b(S,i);else if(at(S))S.includes(i)||S.push(i);else if(g)u[s]=[i],h(s)&&(d[s]=u[s]);else{const $=[i];m(s,e.k)&&(s.value=$),e.k&&(u[e.k]=$)}}else g?(u[s]=l,h(s)&&(d[s]=l)):y&&(m(s,e.k)&&(s.value=l),e.k&&(u[e.k]=l))};if(l){const S=()=>{b(),_f.delete(e)};S.id=-1,_f.set(e,S),Xn(S,n)}else I$(e),b()}}}function I$(e){const t=_f.get(e);t&&(t.flags|=8,_f.delete(e))}Wp().requestIdleCallback;Wp().cancelIdleCallback;const Ha=e=>!!e.type.__asyncLoader,qp=e=>e.type.__isKeepAlive;function Zp(e,t){IP(e,"a",t)}function PP(e,t){IP(e,"da",t)}function IP(e,t,n=kn){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Jp(t,o,n),n){let r=n.parent;for(;r&&r.parent;)qp(r.parent.vnode)&&E7(o,t,n,r),r=r.parent}}function E7(e,t,n,o){const r=Jp(t,e,o,!0);Wn(()=>{$b(o[t],r)},n)}function Jp(e,t,n=kn,o=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...l)=>{si();const a=fu(n),s=Uo(t,n,e,l);return a(),ci(),s});return o?r.unshift(i):r.push(i),i}}const gi=e=>(t,n=kn)=>{(!kc||e==="sp")&&Jp(e,(...o)=>t(...o),n)},Qp=gi("bm"),Ue=gi("m"),eh=gi("bu"),Vn=gi("u"),tt=gi("bum"),Wn=gi("um"),_7=gi("sp"),M7=gi("rtg"),A7=gi("rtc");function R7(e,t=kn){Jp("ec",e,t)}const Bb="components",D7="directives";function Vt(e,t){return Lb(Bb,e,!0,t)||e}const TP=Symbol.for("v-ndc");function ja(e){return Ht(e)?Lb(Bb,e,!1)||e:e||TP}function N7(e){return Lb(D7,e)}function Lb(e,t,n=!0,o=!1){const r=In||kn;if(r){const i=r.type;if(e===Bb){const a=yR(i,!1);if(a&&(a===t||a===no(t)||a===Vp(no(t))))return i}const l=T$(r[e]||i[e],t)||T$(r.appContext[e],t);return!l&&o?i:l}}function T$(e,t){return e&&(e[t]||e[no(t)]||e[Vp(no(t))])}function Mf(e,t,n,o){let r;const i=n,l=at(e);if(l||Ht(e)){const a=l&&ii(e);let s=!1,c=!1;a&&(s=!Po(e),c=ui(e),e=Up(e)),r=new Array(e.length);for(let u=0,d=e.length;ut(a,s,void 0,i));else{const a=Object.keys(e);r=new Array(a.length);for(let s=0,c=a.length;s0;return t!=="default"&&(c.name=t),yt(),Nn(He,null,[p("slot",c,o)],u?-2:64)}let l=e[t];l&&l._c&&(l._d=!1);const a=li.length;yt();let s;try{const c=l&&EP(l(n)),u=n.key||i||c&&c.key;s=Nn(He,{key:(u&&!To(u)?u:`_${t}`)+(!c&&o?"_fb":"")},c||(o?o():[]),c&&e._===1?64:-2)}catch(c){for(let u=li.length;u>a;u--)Hb();throw c}finally{l&&l._c&&(l._d=!0)}return s}function EP(e){return e.some(t=>Yt(t)?!(t.type===xn||t.type===He&&!EP(t.children)):!0)?e:null}const Mv=e=>e?XP(e)?nh(e):Mv(e.parent):null,uc=pn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Mv(e.parent),$root:e=>Mv(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>MP(e),$forceUpdate:e=>e.f||(e.f=()=>{Ab(e.update)}),$nextTick:e=>e.n||(e.n=lt.bind(e.proxy)),$watch:e=>x7.bind(e)}),Vg=(e,t)=>e!==Rt&&!e.__isScriptSetup&&_t(e,t),B7={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:r,props:i,accessCache:l,type:a,appContext:s}=e;if(t[0]!=="$"){const f=l[t];if(f!==void 0)switch(f){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(Vg(o,t))return l[t]=1,o[t];if(r!==Rt&&_t(r,t))return l[t]=2,r[t];if(_t(i,t))return l[t]=3,i[t];if(n!==Rt&&_t(n,t))return l[t]=4,n[t];Av&&(l[t]=0)}}const c=uc[t];let u,d;if(c)return t==="$attrs"&&Bn(e.attrs,"get",""),c(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(n!==Rt&&_t(n,t))return l[t]=4,n[t];if(d=s.config.globalProperties,_t(d,t))return d[t]},set({_:e},t,n){const{data:o,setupState:r,ctx:i}=e;return Vg(r,t)?(r[t]=n,!0):o!==Rt&&_t(o,t)?(o[t]=n,!0):_t(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,props:i,type:l}},a){let s;return!!(n[a]||e!==Rt&&a[0]!=="$"&&_t(e,a)||Vg(t,a)||_t(i,a)||_t(o,a)||_t(uc,a)||_t(r.config.globalProperties,a)||(s=l.__cssModules)&&s[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:_t(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function L7(){return k7().attrs}function k7(e){const t=$n();return t.setupContext||(t.setupContext=qP(t))}function E$(e){return at(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Av=!0;function F7(e){const t=MP(e),n=e.proxy,o=e.ctx;Av=!1,t.beforeCreate&&_$(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:l,watch:a,provide:s,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:h,updated:m,activated:g,deactivated:y,beforeDestroy:b,beforeUnmount:S,destroyed:$,unmounted:x,render:C,renderTracked:O,renderTriggered:w,errorCaptured:P,serverPrefetch:T,expose:M,inheritAttrs:E,components:A,directives:R,filters:F}=t;if(c&&z7(c,o,null),l)for(const B in l){const L=l[B];dt(L)&&(o[B]=L.bind(n))}if(r){const B=r.call(n,n);Tt(B)&&(e.data=ft(B))}if(Av=!0,i)for(const B in i){const L=i[B],k=dt(L)?L.bind(n,n):dt(L.get)?L.get.bind(n,n):_r,z=!dt(L)&&dt(L.set)?L.set.bind(n):_r,H=I({get:k,set:z});Object.defineProperty(o,B,{enumerable:!0,configurable:!0,get:()=>H.value,set:j=>H.value=j})}if(a)for(const B in a)_P(a[B],o,n,B);if(s){const B=dt(s)?s.call(n):s;Reflect.ownKeys(B).forEach(L=>{qe(L,B[L])})}u&&_$(u,e,"c");function N(B,L){at(L)?L.forEach(k=>B(k.bind(n))):L&&B(L.bind(n))}if(N(Qp,d),N(Ue,f),N(eh,h),N(Vn,m),N(Zp,g),N(PP,y),N(R7,P),N(A7,O),N(M7,w),N(tt,S),N(Wn,x),N(_7,T),at(M))if(M.length){const B=e.exposed||(e.exposed={});M.forEach(L=>{Object.defineProperty(B,L,{get:()=>n[L],set:k=>n[L]=k,enumerable:!0})})}else e.exposed||(e.exposed={});C&&e.render===_r&&(e.render=C),E!=null&&(e.inheritAttrs=E),A&&(e.components=A),R&&(e.directives=R),T&&OP(e)}function z7(e,t,n=_r){at(e)&&(e=Rv(e));for(const o in e){const r=e[o];let i;Tt(r)?"default"in r?i=Ke(r.from||o,r.default,!0):i=Ke(r.from||o):i=Ke(r),jt(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[o]=i}}function _$(e,t,n){Uo(at(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function _P(e,t,n,o){let r=o.includes(".")?bP(n,o):()=>n[o];if(Ht(e)){const i=t[e];dt(i)&&Se(r,i)}else if(dt(e))Se(r,e.bind(n));else if(Tt(e))if(at(e))e.forEach(i=>_P(i,t,n,o));else{const i=dt(e.handler)?e.handler.bind(n):t[e.handler];dt(i)&&Se(r,i,e)}}function MP(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:l}}=e.appContext,a=i.get(t);let s;return a?s=a:!r.length&&!n&&!o?s=t:(s={},r.length&&r.forEach(c=>Af(s,c,l,!0)),Af(s,t,l)),Tt(t)&&i.set(t,s),s}function Af(e,t,n,o=!1){const{mixins:r,extends:i}=t;i&&Af(e,i,n,!0),r&&r.forEach(l=>Af(e,l,n,!0));for(const l in t)if(!(o&&l==="expose")){const a=H7[l]||n&&n[l];e[l]=a?a(e[l],t[l]):t[l]}return e}const H7={data:M$,props:A$,emits:A$,methods:Qs,computed:Qs,beforeCreate:Gn,created:Gn,beforeMount:Gn,mounted:Gn,beforeUpdate:Gn,updated:Gn,beforeDestroy:Gn,beforeUnmount:Gn,destroyed:Gn,unmounted:Gn,activated:Gn,deactivated:Gn,errorCaptured:Gn,serverPrefetch:Gn,components:Qs,directives:Qs,watch:V7,provide:M$,inject:j7};function M$(e,t){return t?e?function(){return pn(dt(e)?e.call(this,this):e,dt(t)?t.call(this,this):t)}:t:e}function j7(e,t){return Qs(Rv(e),Rv(t))}function Rv(e){if(at(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${no(t)}Modifiers`]||e[`${na(t)}Modifiers`];function G7(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||Rt;let r=n;const i=t.startsWith("update:"),l=i&&U7(o,t.slice(7));l&&(l.trim&&(r=n.map(u=>Ht(u)?u.trim():u)),l.number&&(r=r.map(Cb)));let a,s=o[a=Lg(t)]||o[a=Lg(no(t))];!s&&i&&(s=o[a=Lg(na(t))]),s&&Uo(s,e,6,r);const c=o[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Uo(c,e,6,r)}}const X7=new WeakMap;function RP(e,t,n=!1){const o=n?X7:t.emitsCache,r=o.get(e);if(r!==void 0)return r;const i=e.emits;let l={},a=!1;if(!dt(e)){const s=c=>{const u=RP(c,t,!0);u&&(a=!0,pn(l,u))};!n&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return!i&&!a?(Tt(e)&&o.set(e,null),null):(at(i)?i.forEach(s=>l[s]=null):pn(l,i),Tt(e)&&o.set(e,l),l)}function th(e,t){return!e||!Fp(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),_t(e,t[0].toLowerCase()+t.slice(1))||_t(e,na(t))||_t(e,t))}function R$(e){const{type:t,vnode:n,proxy:o,withProxy:r,propsOptions:[i],slots:l,attrs:a,emit:s,render:c,renderCache:u,props:d,data:f,setupState:h,ctx:m,inheritAttrs:g}=e,y=Tf(e);let b,S;try{if(n.shapeFlag&4){const x=r||o,C=x;b=Ir(c.call(C,x,u,d,h,f,m)),S=a}else{const x=t;b=Ir(x.length>1?x(d,{attrs:a,slots:l,emit:s}):x(d,null)),S=t.props?a:Y7(a)}}catch(x){li.length=0,Xp(x,e,1),b=p(xn)}let $=b;if(S&&g!==!1){const x=Object.keys(S),{shapeFlag:C}=$;x.length&&C&7&&(i&&x.some(zp)&&(S=q7(S,i)),$=bn($,S,!1,!0))}if(n.dirs&&($=bn($,null,!1,!0),$.dirs=$.dirs?$.dirs.concat(n.dirs):n.dirs),n.transition){const x=Yp($.type)&&Ef($)||$;Vl(x,n.transition)}return b=$,Tf(y),b}const Y7=e=>{let t;for(const n in e)(n==="class"||n==="style"||Fp(n))&&((t||(t={}))[n]=e[n]);return t},q7=(e,t)=>{const n={};for(const o in e)(!zp(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Z7(e,t,n){const{props:o,children:r,component:i}=e,{props:l,children:a,patchFlag:s}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&s>=0){if(s&1024)return!0;if(s&16)return o?D$(o,l,c):!!l;if(s&8){const u=t.dynamicProps;for(let d=0;dObject.create(NP),LP=e=>Object.getPrototypeOf(e)===NP;function Q7(e,t,n,o=!1){const r={},i=BP();e.propsDefaults=Object.create(null),kP(e,t,r,i);for(const l in e.propsOptions[0])l in r||(r[l]=void 0);n?e.props=o?r:sP(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function eR(e,t,n,o){const{props:r,attrs:i,vnode:{patchFlag:l}}=e,a=nt(r),[s]=e.propsOptions;let c=!1;if((o||l>0)&&!(l&16)){if(l&8){const u=e.vnode.dynamicProps;for(let d=0;d{s=!0;const[f,h]=FP(d,t,!0);pn(l,f),h&&a.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!s)return Tt(e)&&o.set(e,Fa),Fa;if(at(i))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",Fb=e=>at(e)?e.map(Ir):[Ir(e)],nR=(e,t,n)=>{if(t._n)return t;const o=Ot((...r)=>Fb(t(...r)),n);return o._c=!1,o},zP=(e,t,n)=>{const o=e._ctx;for(const r in e){if(kb(r))continue;const i=e[r];if(dt(i))t[r]=nR(r,i,o);else if(i!=null){const l=Fb(i);t[r]=()=>l}}},HP=(e,t)=>{const n=Fb(t);e.slots.default=()=>n},jP=(e,t,n)=>{for(const o in t)(n||!kb(o))&&(e[o]=t[o])},oR=(e,t,n)=>{const o=e.slots=BP();if(e.vnode.shapeFlag&32){const r=t._;r?(jP(o,t,n),n&&HO(o,"_",r,!0)):zP(t,o)}else t&&HP(e,t)},rR=(e,t,n)=>{const{vnode:o,slots:r}=e;let i=!0,l=Rt;if(o.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:jP(r,t,n):(i=!t.$stable,zP(t,r)),l=t}else t&&(HP(e,t),l={default:1});if(i)for(const a in r)!kb(a)&&l[a]==null&&delete r[a]},Xn=cR;function iR(e){return lR(e)}function lR(e,t){const n=Wp();n.__VUE__=!0;const{insert:o,remove:r,patchProp:i,createElement:l,createText:a,createComment:s,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:h=_r,insertStaticContent:m}=e,g=(V,K,ee,ue=null,ae=null,le=null,ne=void 0,se=null,pe=!!K.dynamicChildren)=>{if(V===K)return;V&&!Sl(V,K)&&(ue=U(V),j(V,ae,le,!0),V=null),K.patchFlag===-2&&(pe=!1,K.dynamicChildren=null);const{type:he,ref:ge,shapeFlag:be}=K;switch(he){case Ji:y(V,K,ee,ue);break;case xn:b(V,K,ee,ue);break;case Rd:V==null&&S(K,ee,ue,ne);break;case He:A(V,K,ee,ue,ae,le,ne,se,pe);break;default:be&1?C(V,K,ee,ue,ae,le,ne,se,pe):be&6?R(V,K,ee,ue,ae,le,ne,se,pe):(be&64||be&128)&&he.process(V,K,ee,ue,ae,le,ne,se,pe,X)}ge!=null&&ae?cc(ge,V&&V.ref,le,K||V,!K):ge==null&&V&&V.ref!=null&&cc(V.ref,null,le,V,!0)},y=(V,K,ee,ue)=>{if(V==null)o(K.el=a(K.children),ee,ue);else{const ae=K.el=V.el;K.children!==V.children&&c(ae,K.children)}},b=(V,K,ee,ue)=>{V==null?o(K.el=s(K.children||""),ee,ue):K.el=V.el},S=(V,K,ee,ue)=>{[V.el,V.anchor]=m(V.children,K,ee,ue,V.el,V.anchor)},$=({el:V,anchor:K},ee,ue)=>{let ae;for(;V&&V!==K;)ae=f(V),o(V,ee,ue),V=ae;o(K,ee,ue)},x=({el:V,anchor:K})=>{let ee;for(;V&&V!==K;)ee=f(V),r(V),V=ee;r(K)},C=(V,K,ee,ue,ae,le,ne,se,pe)=>{if(K.type==="svg"?ne="svg":K.type==="math"&&(ne="mathml"),V==null)O(K,ee,ue,ae,le,ne,se,pe);else{const he=V.el&&V.el._isVueCE?V.el:null;try{he&&he._beginPatch(),T(V,K,ae,le,ne,se,pe)}finally{he&&he._endPatch()}}},O=(V,K,ee,ue,ae,le,ne,se)=>{let pe,he;const{props:ge,shapeFlag:be,transition:xe,dirs:fe}=V;if(pe=V.el=l(V.type,le,ge&&ge.is,ge),be&8?u(pe,V.children):be&16&&P(V.children,pe,null,ue,ae,Wg(V,le),ne,se),fe&&sl(V,null,ue,"created"),w(pe,V,V.scopeId,ne,ue),ge){for(const ye in ge)ye!=="value"&&!lc(ye)&&i(pe,ye,null,ge[ye],le,ue);"value"in ge&&i(pe,"value",null,ge.value,le),(he=ge.onVnodeBeforeMount)&&yr(he,ue,V)}fe&&sl(V,null,ue,"beforeMount");const de=aR(ae,xe);de&&xe.beforeEnter(pe),o(pe,K,ee),((he=ge&&ge.onVnodeMounted)||de||fe)&&Xn(()=>{try{he&&yr(he,ue,V),de&&xe.enter(pe),fe&&sl(V,null,ue,"mounted")}finally{}},ae)},w=(V,K,ee,ue,ae)=>{if(ee&&h(V,ee),ue)for(let le=0;le{for(let he=pe;he{const se=K.el=V.el;let{patchFlag:pe,dynamicChildren:he,dirs:ge}=K;pe|=V.patchFlag&16;const be=V.props||Rt,xe=K.props||Rt;let fe;if(ee&&cl(ee,!1),(fe=xe.onVnodeBeforeUpdate)&&yr(fe,ee,K,V),ge&&sl(K,V,ee,"beforeUpdate"),ee&&cl(ee,!0),he&&(!V.dynamicChildren||V.dynamicChildren.length!==he.length)&&(pe=0,ne=!1,he=null),(be.innerHTML&&xe.innerHTML==null||be.textContent&&xe.textContent==null)&&u(se,""),he?M(V.dynamicChildren,he,se,ee,ue,Wg(K,ae),le):ne||L(V,K,se,null,ee,ue,Wg(K,ae),le,!1),pe>0){if(pe&16)E(se,be,xe,ee,ae);else if(pe&2&&be.class!==xe.class&&i(se,"class",null,xe.class,ae),pe&4&&i(se,"style",be.style,xe.style,ae),pe&8){const de=K.dynamicProps;for(let ye=0;ye{fe&&yr(fe,ee,K,V),ge&&sl(K,V,ee,"updated")},ue)},M=(V,K,ee,ue,ae,le,ne)=>{for(let se=0;se{if(K!==ee){if(K!==Rt)for(const le in K)!lc(le)&&!(le in ee)&&i(V,le,K[le],null,ae,ue);for(const le in ee){if(lc(le))continue;const ne=ee[le],se=K[le];ne!==se&&le!=="value"&&i(V,le,se,ne,ae,ue)}"value"in ee&&i(V,"value",K.value,ee.value,ae)}},A=(V,K,ee,ue,ae,le,ne,se,pe)=>{const he=K.el=V?V.el:a(""),ge=K.anchor=V?V.anchor:a("");let{patchFlag:be,dynamicChildren:xe,slotScopeIds:fe}=K;fe&&(se=se?se.concat(fe):fe),V==null?(o(he,ee,ue),o(ge,ee,ue),P(K.children||[],ee,ge,ae,le,ne,se,pe)):be>0&&be&64&&xe&&V.dynamicChildren&&V.dynamicChildren.length===xe.length?(M(V.dynamicChildren,xe,ee,ae,le,ne,se),(K.key!=null||ae&&K===ae.subTree)&&zb(V,K,!0)):L(V,K,ee,ge,ae,le,ne,se,pe)},R=(V,K,ee,ue,ae,le,ne,se,pe)=>{K.slotScopeIds=se,V==null?K.shapeFlag&512?ae.ctx.activate(K,ee,ue,ne,pe):F(K,ee,ue,ae,le,ne,pe):_(V,K,pe)},F=(V,K,ee,ue,ae,le,ne)=>{const se=V.component=gR(V,ue,ae);if(qp(V)&&(se.ctx.renderer=X),mR(se,!1,ne),se.asyncDep){if(ae&&ae.registerDep(se,N,ne),!V.el){const pe=se.subTree=p(xn);b(null,pe,K,ee),V.placeholder=pe.el}}else N(se,V,K,ee,ae,le,ne)},_=(V,K,ee)=>{const ue=K.component=V.component;if(Z7(V,K,ee))if(ue.asyncDep&&!ue.asyncResolved){B(ue,K,ee);return}else ue.next=K,ue.update();else K.el=V.el,ue.vnode=K},N=(V,K,ee,ue,ae,le,ne)=>{const se=()=>{if(V.isMounted){let{next:be,bu:xe,u:fe,parent:de,vnode:ye}=V;{const we=VP(V);if(we){be&&(be.el=ye.el,B(V,be,ne)),we.asyncDep.then(()=>{Xn(()=>{V.isUnmounted||he()},ae)});return}}let Oe=be,Te;cl(V,!1),be?(be.el=ye.el,B(V,be,ne)):be=ye,xe&&Ad(xe),(Te=be.props&&be.props.onVnodeBeforeUpdate)&&yr(Te,de,be,ye),cl(V,!0);const Re=R$(V),$e=V.subTree;V.subTree=Re,g($e,Re,d($e.el),U($e),V,ae,le),be.el=Re.el,Oe===null&&J7(V,Re.el),fe&&Xn(fe,ae),(Te=be.props&&be.props.onVnodeUpdated)&&Xn(()=>yr(Te,de,be,ye),ae)}else{let be;const{el:xe,props:fe}=K,{bm:de,m:ye,parent:Oe,root:Te,type:Re}=V,$e=Ha(K);cl(V,!1),de&&Ad(de),!$e&&(be=fe&&fe.onVnodeBeforeMount)&&yr(be,Oe,K),cl(V,!0);{Te.ce&&Te.ce._hasShadowRoot()&&Te.ce._injectChildStyle(Re,V.parent?V.parent.type:void 0);const we=V.subTree=R$(V);g(null,we,ee,ue,V,ae,le),K.el=we.el}if(ye&&Xn(ye,ae),!$e&&(be=fe&&fe.onVnodeMounted)){const we=K;Xn(()=>yr(be,Oe,we),ae)}(K.shapeFlag&256||Oe&&Ha(Oe.vnode)&&Oe.vnode.shapeFlag&256)&&V.a&&Xn(V.a,ae),V.isMounted=!0,K=ee=ue=null}};V.scope.on();const pe=V.effect=new XO(se);V.scope.off();const he=V.update=pe.run.bind(pe),ge=V.job=pe.runIfDirty.bind(pe);ge.i=V,ge.id=V.uid,pe.scheduler=()=>Ab(ge),cl(V,!0),he()},B=(V,K,ee)=>{K.component=V;const ue=V.vnode.props;V.vnode=K,V.next=null,eR(V,K.props,ue,ee),rR(V,K.children,ee),si(),x$(V),ci()},L=(V,K,ee,ue,ae,le,ne,se,pe=!1)=>{const he=V&&V.children,ge=V?V.shapeFlag:0,be=K.children,{patchFlag:xe,shapeFlag:fe}=K;if(xe>0){if(xe&128){z(he,be,ee,ue,ae,le,ne,se,pe);return}else if(xe&256){k(he,be,ee,ue,ae,le,ne,se,pe);return}}fe&8?(ge&16&&te(he,ae,le),be!==he&&u(ee,be)):ge&16?fe&16?z(he,be,ee,ue,ae,le,ne,se,pe):te(he,ae,le,!0):(ge&8&&u(ee,""),fe&16&&P(be,ee,ue,ae,le,ne,se,pe))},k=(V,K,ee,ue,ae,le,ne,se,pe)=>{V=V||Fa,K=K||Fa;const he=V.length,ge=K.length,be=Math.min(he,ge);let xe;for(xe=0;xege?te(V,ae,le,!0,!1,be):P(K,ee,ue,ae,le,ne,se,pe,be)},z=(V,K,ee,ue,ae,le,ne,se,pe)=>{let he=0;const ge=K.length;let be=V.length-1,xe=ge-1;for(;he<=be&&he<=xe;){const fe=V[he],de=K[he]=pe?qr(K[he]):Ir(K[he]);if(Sl(fe,de))g(fe,de,ee,null,ae,le,ne,se,pe);else break;he++}for(;he<=be&&he<=xe;){const fe=V[be],de=K[xe]=pe?qr(K[xe]):Ir(K[xe]);if(Sl(fe,de))g(fe,de,ee,null,ae,le,ne,se,pe);else break;be--,xe--}if(he>be){if(he<=xe){const fe=xe+1,de=fexe)for(;he<=be;)j(V[he],ae,le,!0),he++;else{const fe=he,de=he,ye=new Map;for(he=de;he<=xe;he++){const De=K[he]=pe?qr(K[he]):Ir(K[he]);De.key!=null&&ye.set(De.key,he)}let Oe,Te=0;const Re=xe-de+1;let $e=!1,we=0;const Pe=new Array(Re);for(he=0;he=Re){j(De,ae,le,!0);continue}let Ae;if(De.key!=null)Ae=ye.get(De.key);else for(Oe=de;Oe<=xe;Oe++)if(Pe[Oe-de]===0&&Sl(De,K[Oe])){Ae=Oe;break}Ae===void 0?j(De,ae,le,!0):(Pe[Ae-de]=he+1,Ae>=we?we=Ae:$e=!0,g(De,K[Ae],ee,null,ae,le,ne,se,pe),Te++)}const Me=$e?sR(Pe):Fa;for(Oe=Me.length-1,he=Re-1;he>=0;he--){const De=de+he,Ae=K[De],ke=K[De+1],ot=De+1{const{el:le,type:ne,transition:se,children:pe,shapeFlag:he}=V;if(he&6){H(V.component.subTree,K,ee,ue);return}if(he&128){V.suspense.move(K,ee,ue);return}if(he&64){ne.move(V,K,ee,X);return}if(ne===He){o(le,K,ee);for(let be=0;bese.enter(le),ae));else{const{leave:be,delayLeave:xe,afterLeave:fe}=se,de=()=>{V.ctx.isUnmounted?r(le):o(le,K,ee)},ye=()=>{const Oe=le._isLeaving||!!le[Ho];le._isLeaving&&le[Ho](!0),se.persisted&&!Oe?de():be(le,()=>{de(),fe&&fe()})};xe?xe(le,de,ye):ye()}else o(le,K,ee)},j=(V,K,ee,ue=!1,ae=!1)=>{const{type:le,props:ne,ref:se,children:pe,dynamicChildren:he,shapeFlag:ge,patchFlag:be,dirs:xe,cacheIndex:fe,memo:de}=V;if(be===-2&&(ae=!1),se!=null&&(si(),cc(se,null,ee,V,!0),ci()),fe!=null&&(K.renderCache[fe]=void 0),ge&256){K.ctx.deactivate(V);return}const ye=ge&1&&xe,Oe=!Ha(V);let Te;if(Oe&&(Te=ne&&ne.onVnodeBeforeUnmount)&&yr(Te,K,V),ge&6)G(V.component,ee,ue);else{if(ge&128){V.suspense.unmount(ee,ue);return}ye&&sl(V,null,K,"beforeUnmount"),ge&64?V.type.remove(V,K,ee,X,ue):he&&!he.hasOnce&&(le!==He||be>0&&be&64)?te(he,K,ee,!1,!0):(le===He&&be&384||!ae&&ge&16)&&te(pe,K,ee),ue&&Y(V)}const Re=de!=null&&fe==null;(Oe&&(Te=ne&&ne.onVnodeUnmounted)||ye||Re)&&Xn(()=>{Te&&yr(Te,K,V),ye&&sl(V,null,K,"unmounted"),Re&&(V.el=null)},ee)},Y=V=>{const{type:K,el:ee,anchor:ue,transition:ae}=V;if(K===He){Z(ee,ue);return}if(K===Rd){x(V);return}const le=()=>{r(ee),ae&&!ae.persisted&&ae.afterLeave&&ae.afterLeave()};if(V.shapeFlag&1&&ae&&!ae.persisted){const{leave:ne,delayLeave:se}=ae,pe=()=>ne(ee,le);se?se(V.el,le,pe):pe()}else le()},Z=(V,K)=>{let ee;for(;V!==K;)ee=f(V),r(V),V=ee;r(K)},G=(V,K,ee)=>{const{bum:ue,scope:ae,job:le,subTree:ne,um:se,m:pe,a:he}=V;B$(pe),B$(he),ue&&Ad(ue),ae.stop(),le&&(le.flags|=8,j(ne,V,K,ee)),se&&Xn(se,K),Xn(()=>{V.isUnmounted=!0},K)},te=(V,K,ee,ue=!1,ae=!1,le=0)=>{for(let ne=le;ne{if(V.shapeFlag&6)return U(V.component.subTree);if(V.shapeFlag&128)return V.suspense.next();const K=f(V.anchor||V.el),ee=K&&K[yP];return ee?f(ee):K};let Q=!1;const J=(V,K,ee)=>{let ue;V==null?K._vnode&&(j(K._vnode,null,null,!0),ue=K._vnode.component):g(K._vnode||null,V,K,null,null,null,ee),K._vnode=V,Q||(Q=!0,x$(ue),gP(),Q=!1)},X={p:g,um:j,m:H,r:Y,mt:F,mc:P,pc:L,pbc:M,n:U,o:e};return{render:J,hydrate:void 0,createApp:K7(J)}}function Wg({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function cl({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function aR(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function zb(e,t,n=!1){const o=e.children,r=t.children;if(at(o)&&at(r))for(let i=0;i>1,e[n[a]]0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,l=n[i-1];i-- >0;)n[i]=l,l=t[l];return n}function VP(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:VP(t)}function B$(e){if(e)for(let t=0;te.__isSuspense;function cR(e,t){t&&t.pendingBranch?at(e)?t.effects.push(...e):t.effects.push(e):y7(e)}const He=Symbol.for("v-fgt"),Ji=Symbol.for("v-txt"),xn=Symbol.for("v-cmt"),Rd=Symbol.for("v-stc"),li=[];let wo=null;function yt(e=!1){li.push(wo=e?null:[])}function Hb(){li.pop(),wo=li[li.length-1]||null}let Bc=1;function Rf(e,t=!1){Bc+=e,e<0&&wo&&t&&(wo.hasOnce=!0)}function UP(e){return e.dynamicChildren=Bc>0?wo||Fa:null,Hb(),Bc>0&&wo&&wo.push(e),e}function tn(e,t,n,o,r,i){return UP(Ge(e,t,n,o,r,i,!0))}function Nn(e,t,n,o,r){return UP(p(e,t,n,o,r,!0))}function Yt(e){return e?e.__v_isVNode===!0:!1}function Sl(e,t){return e.type===t.type&&e.key===t.key}const GP=({key:e})=>e??null,Dd=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ht(e)||jt(e)||dt(e)?{i:In,r:e,k:t,f:!!n}:e:null);function Ge(e,t=null,n=null,o=0,r=null,i=e===He?0:1,l=!1,a=!1){const s={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&GP(t),ref:t&&Dd(t),scopeId:vP,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:In};return a?(Df(s,n),i&128&&e.normalize(s)):n&&(s.shapeFlag|=Ht(n)?8:16),Bc>0&&!l&&wo&&(s.patchFlag>0||i&6)&&s.patchFlag!==32&&wo.push(s),s}const p=uR;function uR(e,t=null,n=null,o=0,r=null,i=!1){if((!e||e===TP)&&(e=xn),Yt(e)){const a=bn(e,t,!0);return n&&Df(a,n),Bc>0&&!i&&wo&&(a.shapeFlag&6?wo[wo.indexOf(e)]=a:wo.push(a)),a.patchFlag=-2,a}if(SR(e)&&(e=e.__vccOpts),t){t=dR(t);let{class:a,style:s}=t;a&&!Ht(a)&&(t.class=Mr(a)),Tt(s)&&(Gp(s)&&!at(s)&&(s=pn({},s)),t.style=xb(s))}const l=Ht(e)?1:KP(e)?128:Yp(e)?64:Tt(e)?4:dt(e)?2:0;return Ge(e,t,n,o,r,l,i,!0)}function dR(e){return e?Gp(e)||LP(e)?pn({},e):e:null}function bn(e,t,n=!1,o=!1){const{props:r,ref:i,patchFlag:l,children:a,transition:s}=e,c=t?fR(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&GP(c),ref:t&&t.ref?n&&i?at(i)?i.concat(Dd(t)):[i,Dd(t)]:Dd(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==He?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:s,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&bn(e.ssContent),ssFallback:e.ssFallback&&bn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return s&&o&&Vl(u,s.clone(u)),u}function vn(e=" ",t=0){return p(Ji,null,e,t)}function N0e(e,t){const n=p(Rd,null,e);return n.staticCount=t,n}function Yn(e="",t=!1){return t?(yt(),Nn(xn,null,e)):p(xn,null,e)}function Ir(e){return e==null||typeof e=="boolean"?p(xn):at(e)?p(He,null,e.slice()):Yt(e)?qr(e):p(Ji,null,String(e))}function qr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:bn(e)}function Df(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(at(t))n=16;else if(typeof t=="object")if(o&65){const r=t.default;r&&(r._c&&(r._d=!1),Df(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!LP(t)?t._ctx=In:r===3&&In&&(In.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(dt(t)){if(o&65){Df(e,{default:t});return}t={default:t,_ctx:In},n=32}else t=String(t),o&64?(n=16,t=[vn(t)]):n=8;e.children=t,e.shapeFlag|=n}function fR(...e){const t={};for(let n=0;nkn||In;let Nf,Lc;{const e=Wp(),t=(n,o)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(o),i=>{r.length>1?r.forEach(l=>l(i)):r[0](i)}};Nf=t("__VUE_INSTANCE_SETTERS__",n=>kn=n),Lc=t("__VUE_SSR_SETTERS__",n=>kc=n)}const fu=e=>{const t=kn;return Nf(e),e.scope.on(),()=>{e.scope.off(),Nf(t)}},L$=()=>{kn&&kn.scope.off(),Nf(null)};function XP(e){return e.vnode.shapeFlag&4}let kc=!1;function mR(e,t=!1,n=!1){t&&Lc(t);const{props:o,children:r}=e.vnode,i=XP(e);Q7(e,o,i,t),oR(e,r,n||t);const l=i?vR(e,t):void 0;return t&&Lc(!1),l}function vR(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,B7);const{setup:o}=n;if(o){si();const r=e.setupContext=o.length>1?qP(e):null,i=fu(e),l=du(o,e,0,[e.props,r]),a=kO(l);if(ci(),i(),(a||e.sp)&&!Ha(e)&&OP(e),a){if(l.then(L$,L$),t)return l.then(s=>{Lc(!0);try{k$(e,s,t)}finally{Lc(!1)}}).catch(s=>{Xp(s,e,0)});e.asyncDep=l}else k$(e,l)}else YP(e)}function k$(e,t,n){dt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Tt(t)&&(e.setupState=dP(t)),YP(e)}function YP(e,t,n){const o=e.type;e.render||(e.render=o.render||_r);{const r=fu(e);si();try{F7(e)}finally{ci(),r()}}}const bR={get(e,t){return Bn(e,"get",""),e[t]}};function qP(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,bR),slots:e.slots,emit:e.emit,expose:t}}function nh(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(dP(Mb(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in uc)return uc[n](e)},has(t,n){return n in t||n in uc}})):e.proxy}function yR(e,t=!0){return dt(e)?e.displayName||e.name:e.name||t&&e.__name}function SR(e){return dt(e)&&"__vccOpts"in e}const I=(e,t)=>h7(e,t,kc);function di(e,t,n){try{Rf(-1);const o=arguments.length;return o===2?Tt(t)&&!at(t)?Yt(t)?p(e,null,[t]):p(e,t):p(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Yt(n)&&(n=[n]),p(e,t,n))}finally{Rf(1)}}const $R="3.5.42";/** +* @vue/runtime-dom v3.5.42 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Nv;const F$=typeof window<"u"&&window.trustedTypes;if(F$)try{Nv=F$.createPolicy("vue",{createHTML:e=>e})}catch{}const ZP=Nv?e=>Nv.createHTML(e):e=>e,CR="http://www.w3.org/2000/svg",xR="http://www.w3.org/1998/Math/MathML",Gr=typeof document<"u"?document:null,z$=Gr&&Gr.createElement("template"),wR={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t==="svg"?Gr.createElementNS(CR,e):t==="mathml"?Gr.createElementNS(xR,e):n?Gr.createElement(e,{is:n}):Gr.createElement(e);return e==="select"&&o&&o.multiple!=null&&r.setAttribute("multiple",o.multiple),r},createText:e=>Gr.createTextNode(e),createComment:e=>Gr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Gr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,i){const l=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{z$.innerHTML=ZP(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const a=z$.content;if(o==="svg"||o==="mathml"){const s=a.firstChild;for(;s.firstChild;)a.appendChild(s.firstChild);a.removeChild(s)}t.insertBefore(a,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Oi="transition",Fs="animation",rs=Symbol("_vtc"),JP={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},QP=pn({},$P,JP),OR=e=>(e.displayName="Transition",e.props=QP,e),rn=OR((e,{slots:t})=>di(T7,e6(e),t)),ul=(e,t=[])=>{at(e)?e.forEach(n=>n(...t)):e&&e(...t)},H$=e=>e?at(e)?e.some(t=>t.length>1):e.length>1:!1;function e6(e){const t={};for(const A in e)A in JP||(t[A]=e[A]);if(e.css===!1)return t;const{name:n="v",type:o,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:s=i,appearActiveClass:c=l,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,m=PR(r),g=m&&m[0],y=m&&m[1],{onBeforeEnter:b,onEnter:S,onEnterCancelled:$,onLeave:x,onLeaveCancelled:C,onBeforeAppear:O=b,onAppear:w=S,onAppearCancelled:P=$}=t,T=(A,R,F,_)=>{A._enterCancelled=_,Ei(A,R?u:a),Ei(A,R?c:l),F&&F()},M=(A,R)=>{A._isLeaving=!1,Ei(A,d),Ei(A,h),Ei(A,f),R&&R()},E=A=>(R,F)=>{const _=A?w:S,N=()=>T(R,A,F);ul(_,[R,N]),j$(()=>{Ei(R,A?s:i),Sr(R,A?u:a),H$(_)||V$(R,o,g,N)})};return pn(t,{onBeforeEnter(A){ul(b,[A]),Sr(A,i),Sr(A,l)},onBeforeAppear(A){ul(O,[A]),Sr(A,s),Sr(A,c)},onEnter:E(!1),onAppear:E(!0),onLeave(A,R){A._isLeaving=!0;const F=()=>M(A,R);Sr(A,d),A._enterCancelled?(Sr(A,f),Bv(A)):(Bv(A),Sr(A,f)),j$(()=>{A._isLeaving&&(Ei(A,d),Sr(A,h),H$(x)||V$(A,o,y,F))}),ul(x,[A,F])},onEnterCancelled(A){T(A,!1,void 0,!0),ul($,[A])},onAppearCancelled(A){T(A,!0,void 0,!0),ul(P,[A])},onLeaveCancelled(A){M(A),ul(C,[A])}})}function PR(e){if(e==null)return null;if(Tt(e))return[Kg(e.enter),Kg(e.leave)];{const t=Kg(e);return[t,t]}}function Kg(e){return LA(e)}function Sr(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[rs]||(e[rs]=new Set)).add(t)}function Ei(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[rs];n&&(n.delete(t),n.size||(e[rs]=void 0))}function j$(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let IR=0;function V$(e,t,n,o){const r=e._endId=++IR,i=()=>{r===e._endId&&o()};if(n!=null)return setTimeout(i,n);const{type:l,timeout:a,propCount:s}=t6(e,t);if(!l)return o();const c=l+"end";let u=0;const d=()=>{e.removeEventListener(c,f),i()},f=h=>{h.target===e&&++u>=s&&d()};setTimeout(()=>{u(n[m]||"").split(", "),r=o(`${Oi}Delay`),i=o(`${Oi}Duration`),l=W$(r,i),a=o(`${Fs}Delay`),s=o(`${Fs}Duration`),c=W$(a,s);let u=null,d=0,f=0;t===Oi?l>0&&(u=Oi,d=l,f=i.length):t===Fs?c>0&&(u=Fs,d=c,f=s.length):(d=Math.max(l,c),u=d>0?l>c?Oi:Fs:null,f=u?u===Oi?i.length:s.length:0);const h=u===Oi&&/\b(?:transform|all)(?:,|$)/.test(o(`${Oi}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:h}}function W$(e,t){for(;e.lengthK$(n)+K$(e[o])))}function K$(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Bv(e){return(e?e.ownerDocument:document).body.offsetHeight}function TR(e,t,n){const o=e[rs];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Bf=Symbol("_vod"),jb=Symbol("_vsh"),oo={name:"show",beforeMount(e,{value:t},{transition:n}){e[Bf]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):zs(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),zs(e,!0),o.enter(e)):o.leave(e,()=>{zs(e,!1)}):zs(e,t))},beforeUnmount(e,{value:t}){zs(e,t)}};function zs(e,t){e.style.display=t?e[Bf]:"none",e[jb]=!t}const ER=Symbol(""),_R=/(?:^|;)\s*display\s*:/;function MR(e,t,n){const o=e.style,r=Ht(n);let i=!1;if(n&&!r){if(t)if(Ht(t))for(const l of t.split(";")){const a=l.slice(0,l.indexOf(":")).trim();n[a]==null&&ec(o,a,"")}else for(const l in t)n[l]==null&&ec(o,l,"");for(const l in n){l==="display"&&(i=!0);const a=n[l];a!=null?RR(e,l,!Ht(t)&&t?t[l]:void 0,a)||ec(o,l,a):ec(o,l,"")}}else if(r){if(t!==n){const l=o[ER];l&&(n+=";"+l),o.cssText=n,i=_R.test(n)}}else t&&e.removeAttribute("style");Bf in e&&(e[Bf]=i?o.display:"",e[jb]&&(o.display="none"))}const Xu=/\s*!important$/;function ec(e,t,n){if(at(n))n.forEach(o=>ec(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))Xu.test(n)?e.setProperty(t,n.replace(Xu,""),"important"):e.setProperty(t,n);else{const o=AR(e,t);Xu.test(n)?e.setProperty(na(o),n.replace(Xu,""),"important"):e[o]=n}}const U$=["Webkit","Moz","ms"],Ug={};function AR(e,t){const n=Ug[t];if(n)return n;let o=no(t);if(o!=="filter"&&o in e)return Ug[t]=o;o=Vp(o);for(let r=0;rGg||(FR.then(()=>Gg=0),Gg=Date.now());function HR(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;const r=n.value;if(at(r)){const i=o.stopImmediatePropagation;o.stopImmediatePropagation=()=>{i.call(o),o._stopped=!0};const l=r.slice(),a=[o];for(let s=0;se.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,jR=(e,t,n,o,r,i)=>{const l=r==="svg";t==="class"?TR(e,o,l):t==="style"?MR(e,n,o):Fp(t)?zp(t)||NR(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):VR(e,t,o,l))?(Y$(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&X$(e,t,o,l,i,t!=="value")):e._isVueCE&&(WR(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ht(o)))?Y$(e,no(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),X$(e,t,o,l))};function VR(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&Z$(t)&&dt(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Z$(t)&&Ht(n)?!1:t in e}function WR(e,t){const n=e._def.props;if(!n)return!1;const o=no(t);return Array.isArray(n)?n.some(r=>no(r)===o):Object.keys(n).some(r=>no(r)===o)}const n6=new WeakMap,o6=new WeakMap,Lf=Symbol("_moveCb"),J$=Symbol("_enterCb"),KR=e=>(delete e.props.mode,e),UR=KR({name:"TransitionGroup",props:pn({},QP,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=$n(),o=SP();let r,i;return Vn(()=>{if(!r.length)return;const l=e.moveClass||`${e.name||"v"}-move`;if(!qR(r[0].el,n.vnode.el,l)){r=[];return}r.forEach(GR),r.forEach(XR);const a=r.filter(YR);Bv(n.vnode.el),a.forEach(s=>{const c=s.el,u=c.style;Sr(c,l),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[Lf]=f=>{f&&f.target!==c||(!f||f.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[Lf]=null,Ei(c,l))};c.addEventListener("transitionend",d)}),r=[]}),()=>{const l=nt(e),a=e6(l);let s=l.tag||He;if(r=[],i)for(let c=0;c{a.split(/\s+/).forEach(s=>s&&o.classList.remove(s))}),n.split(/\s+/).forEach(a=>a&&o.classList.add(a)),o.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(o);const{hasTransform:l}=t6(o);return i.removeChild(o),l}const Q$=e=>{const t=e.props["onUpdate:modelValue"]||!1;return at(t)?n=>Ad(t,n):t};function ZR(e){e.target.composing=!0}function eC(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Yu=Symbol("_assign"),qu=Symbol("_initialValue");function Xg(e,t,n){return t&&(e=e.trim()),n&&(e=Cb(e)),e}const JR={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e.parentNode&&(e.type==="text"?e[qu]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[qu]=e.defaultValue.replace(/\r\n?/g,` +`))),e[Yu]=Q$(r);const i=o||r.props&&r.props.type==="number";Ia(e,t?"change":"input",l=>{l.target.composing||e[Yu](Xg(e.value,n,i))}),(n||i)&&Ia(e,"change",()=>{e.value=Xg(e.value,n,i)}),t||(Ia(e,"compositionstart",ZR),Ia(e,"compositionend",eC),Ia(e,"change",eC))},mounted(e,{value:t,modifiers:{trim:n,number:o}}){const r=t??"",i=e[qu];delete e[qu],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[Yu](Xg(e.value,n,o)):e.value=r},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:r,number:i}},l){if(e[Yu]=Q$(l),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Cb(e.value):e.value,s=t??"";if(a===s)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(o&&t===n||r&&e.value.trim()===s)||(e.value=s)}},QR=["ctrl","shift","alt","meta"],eD={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>QR.some(n=>e[`${n}Key`]&&!t.includes(n))},tC=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(r,...i)=>{for(let l=0;l{i6().render(...e)},l6=(...e)=>{const t=i6().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=oD(o);if(!r)return;const i=t._component;!dt(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const l=n(r,!1,nD(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},t};function nD(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function oD(e){return Ht(e)?document.querySelector(e):e}const Lv=e=>typeof e=="function",rD=Array.isArray,iD=e=>typeof e=="string",lD=e=>e!==null&&typeof e=="object",aD=/^on[^a-z]/,sD=e=>aD.test(e),Vb=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},cD=/-(\w)/g,vs=Vb(e=>e.replace(cD,(t,n)=>n?n.toUpperCase():"")),uD=/\B([A-Z])/g,dD=Vb(e=>e.replace(uD,"-$1").toLowerCase()),fD=Vb(e=>e.charAt(0).toUpperCase()+e.slice(1)),pD=Object.prototype.hasOwnProperty,oC=(e,t)=>pD.call(e,t);function hD(e,t,n,o){const r=e[n];if(r!=null){const i=oC(r,"default");if(i&&o===void 0){const l=r.default;o=r.type!==Function&&Lv(l)?l():l}r.type===Boolean&&(!oC(t,n)&&!i?o=!1:o===""&&(o=!0))}return o}function gD(e){return Object.keys(e).reduce((t,n)=>((n.startsWith("data-")||n.startsWith("aria-"))&&(t[n]=e[n]),t),{})}function $l(e){return typeof e=="number"?`${e}px`:e}function Ra(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return typeof e=="function"?e(t):e??n}function mD(e){let t;const n=new Promise(r=>{t=e(()=>{r(!0)})}),o=()=>{t==null||t()};return o.then=(r,i)=>n.then(r,i),o.promise=n,o}function ce(){const e=[];for(let t=0;t0},e.prototype.connect_=function(){!kv||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),CD?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!kv||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,o=n===void 0?"":n,r=$D.some(function(i){return!!~o.indexOf(i)});r&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),s6=function(e,t){for(var n=0,o=Object.keys(t);n"u"||!(Element instanceof Object))){if(!(t instanceof is(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new MD(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof is(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(o){return new AD(o.target,o.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),u6=typeof WeakMap<"u"?new WeakMap:new a6,d6=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=xD.getInstance(),o=new RD(t,n,this);u6.set(this,o)}return e}();["observe","unobserve","disconnect"].forEach(function(e){d6.prototype[e]=function(){var t;return(t=u6.get(this))[e].apply(t,arguments)}});var Wb=function(){return typeof kf.ResizeObserver<"u"?kf.ResizeObserver:d6}();const Fv=e=>e!=null&&e!=="",et=(e,t)=>{const n=v({},e);return Object.keys(t).forEach(o=>{const r=n[o];if(r)r.type||r.default?r.default=t[o]:r.def?r.def(t[o]):n[o]={type:r,default:t[o]};else throw new Error(`not have ${o} prop`)}),n},Kb=e=>{const t=Object.keys(e),n={},o={},r={};for(let i=0,l=t.length;i0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n={},o=/;(?![^(]*\))/g,r=/:(.+)/;return typeof e=="object"?e:(e.split(o).forEach(function(i){if(i){const l=i.split(r);if(l.length>1){const a=t?vs(l[0].trim()):l[0].trim();n[a]=l[1].trim()}}}),n)},Qr=(e,t)=>e[t]!==void 0,f6=Symbol("skipFlatten"),xt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=Array.isArray(e)?e:[e],o=[];return n.forEach(r=>{Array.isArray(r)?o.push(...xt(r,t)):r&&r.type===He?r.key===f6?o.push(r):o.push(...xt(r.children,t)):r&&Yt(r)?t&&!pu(r)?o.push(r):t||o.push(r):Fv(r)&&o.push(r)}),o},ih=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(Yt(e))return e.type===He?t==="default"?xt(e.children):[]:e.children&&e.children[t]?xt(e.children[t](n)):[];{const o=e.$slots[t]&&e.$slots[t](n);return xt(o)}},to=e=>{var t;let n=((t=e==null?void 0:e.vnode)===null||t===void 0?void 0:t.el)||e&&(e.$el||e);for(;n&&!n.tagName;)n=n.nextSibling;return n},p6=e=>{const t={};if(e.$&&e.$.vnode){const n=e.$.vnode.props||{};Object.keys(e.$props).forEach(o=>{const r=e.$props[o],i=dD(o);(r!==void 0||i in n)&&(t[o]=r)})}else if(Yt(e)&&typeof e.type=="object"){const n=e.props||{},o={};Object.keys(n).forEach(i=>{o[vs(i)]=n[i]});const r=e.type.props||{};Object.keys(r).forEach(i=>{const l=hD(r,o,i,o[i]);(l!==void 0||i in o)&&(t[i]=l)})}return t},h6=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,r;if(e.$){const i=e[t];if(i!==void 0)return typeof i=="function"&&o?i(n):i;r=e.$slots[t],r=o&&r?r(n):r}else if(Yt(e)){const i=e.props&&e.props[t];if(i!==void 0&&e.props!==null)return typeof i=="function"&&o?i(n):i;e.type===He?r=e.children:e.children&&e.children[t]&&(r=e.children[t],r=o&&r?r(n):r)}return Array.isArray(r)&&(r=xt(r),r=r.length===1?r[0]:r,r=r.length===0?void 0:r),r};function iC(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n={};return e.$?n=v(v({},n),e.$attrs):n=v(v({},n),e.props),Kb(n)[t?"onEvents":"events"]}function ND(e){const n=((Yt(e)?e.props:e.$attrs)||{}).class||{};let o={};return typeof n=="string"?n.split(" ").forEach(r=>{o[r.trim()]=!0}):Array.isArray(n)?ce(n).split(" ").forEach(r=>{o[r.trim()]=!0}):o=v(v({},o),n),o}function g6(e,t){let o=((Yt(e)?e.props:e.$attrs)||{}).style||{};return typeof o=="string"&&(o=DD(o,t)),o}function BD(e){return e.length===1&&e[0].type===He}function LD(e){return e==null||e===""||Array.isArray(e)&&e.length===0}function pu(e){return e&&(e.type===xn||e.type===He&&e.children.length===0||e.type===Ji&&e.children.trim()==="")}function kD(e){return e&&e.type===Ji}function Nt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const t=[];return e.forEach(n=>{Array.isArray(n)?t.push(...n):(n==null?void 0:n.type)===He?t.push(...Nt(n.children)):t.push(n)}),t.filter(n=>!pu(n))}function Hs(e){if(e){const t=Nt(e);return t.length?t:void 0}else return e}function qt(e){return Array.isArray(e)&&e.length===1&&(e=e[0]),e&&e.__v_isVNode&&typeof e.type!="symbol"}function on(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"default";var o,r;return(o=t[n])!==null&&o!==void 0?o:(r=e[n])===null||r===void 0?void 0:r.call(e)}const Go=re({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup(e,t){let{slots:n}=t;const o=ft({width:0,height:0,offsetHeight:0,offsetWidth:0});let r=null,i=null;const l=()=>{i&&(i.disconnect(),i=null)},a=u=>{const{onResize:d}=e,f=u[0].target,{width:h,height:m}=f.getBoundingClientRect(),{offsetWidth:g,offsetHeight:y}=f,b=Math.floor(h),S=Math.floor(m);if(o.width!==b||o.height!==S||o.offsetWidth!==g||o.offsetHeight!==y){const $={width:b,height:S,offsetWidth:g,offsetHeight:y};v(o,$),d&&Promise.resolve().then(()=>{d(v(v({},$),{offsetWidth:g,offsetHeight:y}),f)})}},s=$n(),c=()=>{const{disabled:u}=e;if(u){l();return}const d=to(s);d!==r&&(l(),r=d),!i&&d&&(i=new Wb(a),i.observe(d))};return Ue(()=>{c()}),Vn(()=>{c()}),Wn(()=>{l()}),Se(()=>e.disabled,()=>{c()},{flush:"post"}),()=>{var u;return(u=n.default)===null||u===void 0?void 0:u.call(n)[0]}}});let m6=e=>setTimeout(e,16),v6=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(m6=e=>window.requestAnimationFrame(e),v6=e=>window.cancelAnimationFrame(e));let lC=0;const Ub=new Map;function b6(e){Ub.delete(e)}function Qe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;lC+=1;const n=lC;function o(r){if(r===0)b6(n),e();else{const i=m6(()=>{o(r-1)});Ub.set(n,i)}}return o(t),n}Qe.cancel=e=>{const t=Ub.get(e);return b6(t),v6(t)};function zv(e){let t;const n=r=>()=>{t=null,e(...r)},o=function(){if(t==null){for(var r=arguments.length,i=new Array(r),l=0;l{Qe.cancel(t),t=null},o}const Mn=function(){for(var e=arguments.length,t=new Array(e),n=0;n{const t=e;return t.install=function(n){n.component(t.displayName||t.name,e)},e};function Wl(){return{type:[Function,Array]}}function Ne(e){return{type:Object,default:e}}function Ce(e){return{type:Boolean,default:e}}function ve(e){return{type:Function,default:e}}function wt(e,t){return{validator:()=>!0,default:e}}function Ln(){return{validator:()=>!0}}function ut(e){return{type:Array,default:e}}function Be(e){return{type:String,default:e}}function ze(e,t){return e?{type:e,default:t}:wt(t)}let nn=!1;try{const e=Object.defineProperty({},"passive",{get(){nn=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch{}function Dt(e,t,n,o){if(e&&e.addEventListener){let r=o;r===void 0&&nn&&(t==="touchstart"||t==="touchmove"||t==="wheel")&&(r={passive:!1}),e.addEventListener(t,n,r)}return{remove:()=>{e&&e.removeEventListener&&e.removeEventListener(t,n)}}}function Zu(e){return e!==window?e.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function aC(e,t,n){if(n!==void 0&&t.top>e.top-n)return`${n+t.top}px`}function sC(e,t,n){if(n!==void 0&&t.bottomo.target===e);n?n.affixList.push(t):(n={target:e,affixList:[t],eventHandlers:{}},dc.push(n),y6.forEach(o=>{n.eventHandlers[o]=Dt(e,o,()=>{n.affixList.forEach(r=>{const{lazyUpdatePosition:i}=r.exposed;i()},(o==="touchstart"||o==="touchmove")&&nn?{passive:!0}:!1)})}))}function uC(e){const t=dc.find(n=>{const o=n.affixList.some(r=>r===e);return o&&(n.affixList=n.affixList.filter(r=>r!==e)),o});t&&t.affixList.length===0&&(dc=dc.filter(n=>n!==t),y6.forEach(n=>{const o=t.eventHandlers[n];o&&o.remove&&o.remove()}))}const Gb="anticon",S6=Symbol("GlobalFormContextKey"),zD=e=>{qe(S6,e)},HD=()=>Ke(S6,{validateMessages:I(()=>{})}),jD=()=>({iconPrefixCls:String,getTargetContainer:{type:Function},getPopupContainer:{type:Function},prefixCls:String,getPrefixCls:{type:Function},renderEmpty:{type:Function},transformCellText:{type:Function},csp:Ne(),input:Ne(),autoInsertSpaceInButton:{type:Boolean,default:void 0},locale:Ne(),pageHeader:Ne(),componentSize:{type:String},componentDisabled:{type:Boolean,default:void 0},direction:{type:String,default:"ltr"},space:Ne(),virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},form:Ne(),pagination:Ne(),theme:Ne(),select:Ne(),wave:Ne()}),Xb=Symbol("configProvider"),$6={getPrefixCls:(e,t)=>t||(e?`ant-${e}`:"ant"),iconPrefixCls:I(()=>Gb),getPopupContainer:I(()=>()=>document.body),direction:I(()=>"ltr")},lh=()=>Ke(Xb,$6),VD=e=>qe(Xb,e),C6=Symbol("DisabledContextKey"),mo=()=>Ke(C6,ie(void 0)),x6=e=>{const t=mo();return qe(C6,I(()=>{var n;return(n=e.value)!==null&&n!==void 0?n:t.value})),e},w6={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages"},WD={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},O6={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},Fc={lang:v({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},WD),timePickerLocale:v({},O6)},bo="${label} is not a valid ${type}",ro={locale:"en",Pagination:w6,DatePicker:Fc,TimePicker:O6,Calendar:Fc,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:bo,method:bo,array:bo,object:bo,number:bo,date:bo,boolean:bo,integer:bo,float:bo,regexp:bo,email:bo,url:bo,hex:bo},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"}},oa=re({compatConfig:{MODE:3},name:"LocaleReceiver",props:{componentName:String,defaultLocale:{type:[Object,Function]},children:{type:Function}},setup(e,t){let{slots:n}=t;const o=Ke("localeData",{}),r=I(()=>{const{componentName:l="global",defaultLocale:a}=e,s=a||ro[l||"global"],{antLocale:c}=o,u=l&&c?c[l]:{};return v(v({},typeof s=="function"?s():s),u||{})}),i=I(()=>{const{antLocale:l}=o,a=l&&l.locale;return l&&l.exist&&!a?ro.locale:a});return()=>{const l=e.children||n.default,{antLocale:a}=o;return l==null?void 0:l(r.value,i.value,a)}}});function Zo(e,t,n){const o=Ke("localeData",{});return[I(()=>{const{antLocale:i}=o,l=ct(t)||ro[e||"global"],a=e&&i?i[e]:{};return v(v(v({},typeof l=="function"?l():l),a||{}),ct(n)||{})})]}function Yb(e){for(var t=0,n,o=0,r=e.length;r>=4;++o,r-=4)n=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}const dC="%";class KD{constructor(t){this.cache=new Map,this.instanceId=t}get(t){return this.cache.get(Array.isArray(t)?t.join(dC):t)||null}update(t,n){const o=Array.isArray(t)?t.join(dC):t,r=this.cache.get(o),i=n(r);i===null?this.cache.delete(o):this.cache.set(o,i)}}const P6="data-token-hash",Dl="data-css-hash",Da="__cssinjs_instance__";function zc(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${Dl}]`)||[],{firstChild:n}=document.head;Array.from(t).forEach(r=>{r[Da]=r[Da]||e,r[Da]===e&&document.head.insertBefore(r,n)});const o={};Array.from(document.querySelectorAll(`style[${Dl}]`)).forEach(r=>{var i;const l=r.getAttribute(Dl);o[l]?r[Da]===e&&((i=r.parentNode)===null||i===void 0||i.removeChild(r)):o[l]=!0})}return new KD(e)}const I6=Symbol("StyleContextKey"),UD=()=>{var e,t,n;const o=$n();let r;if(o&&o.appContext){const i=(n=(t=(e=o.appContext)===null||e===void 0?void 0:e.config)===null||t===void 0?void 0:t.globalProperties)===null||n===void 0?void 0:n.__ANTDV_CSSINJS_CACHE__;i?r=i:(r=zc(),o.appContext.config.globalProperties&&(o.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=r))}else r=zc();return r},T6={cache:zc(),defaultCache:!0,hashPriority:"low"},ah=()=>{const e=UD();return Ke(I6,oe(v(v({},T6),{cache:e})))},GD=e=>{const t=ah(),n=oe(v(v({},T6),{cache:zc()}));return Se([()=>ct(e),t],()=>{const o=v({},t.value),r=ct(e);Object.keys(r).forEach(l=>{const a=r[l];r[l]!==void 0&&(o[l]=a)});const{cache:i}=r;o.cache=o.cache||zc(),o.defaultCache=!i&&t.value.defaultCache,n.value=o},{immediate:!0}),qe(I6,n),n},XD=()=>({autoClear:Ce(),mock:Be(),cache:Ne(),defaultCache:Ce(),hashPriority:Be(),container:ze(),ssrInline:Ce(),transformers:ut(),linters:ut()}),YD=At(re({name:"AStyleProvider",inheritAttrs:!1,props:XD(),setup(e,t){let{slots:n}=t;return GD(e),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}));function E6(e,t,n,o){const r=ah(),i=oe(""),l=oe();je(()=>{i.value=[e,...t.value].join("%")});const a=s=>{r.value.cache.update(s,c=>{const[u=0,d]=c||[];return u-1===0?(o==null||o(d,!1),null):[u-1,d]})};return Se(i,(s,c)=>{c&&a(c),r.value.cache.update(s,u=>{const[d=0,f]=u||[],m=f||n();return[d+1,m]}),l.value=r.value.cache.get(i.value)[1]},{immediate:!0}),tt(()=>{a(i.value)}),l}function Hn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Ni(e,t){return e&&e.contains?e.contains(t):!1}const fC="data-vc-order",qD="vc-util-key",Hv=new Map;function _6(){let{mark:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e?e.startsWith("data-")?e:`data-${e}`:qD}function sh(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function ZD(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function M6(e){return Array.from((Hv.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function A6(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Hn())return null;const{csp:n,prepend:o}=t,r=document.createElement("style");r.setAttribute(fC,ZD(o)),n!=null&&n.nonce&&(r.nonce=n==null?void 0:n.nonce),r.innerHTML=e;const i=sh(t),{firstChild:l}=i;if(o){if(o==="queue"){const a=M6(i).filter(s=>["prepend","prependQueue"].includes(s.getAttribute(fC)));if(a.length)return i.insertBefore(r,a[a.length-1].nextSibling),r}i.insertBefore(r,l)}else i.appendChild(r);return r}function R6(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=sh(t);return M6(n).find(o=>o.getAttribute(_6(t))===e)}function zf(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=R6(e,t);n&&sh(t).removeChild(n)}function JD(e,t){const n=Hv.get(e);if(!n||!Ni(document,n)){const o=A6("",t),{parentNode:r}=o;Hv.set(e,r),e.removeChild(o)}}function Hc(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var o,r,i;const l=sh(n);JD(l,n);const a=R6(t,n);if(a)return!((o=n.csp)===null||o===void 0)&&o.nonce&&a.nonce!==((r=n.csp)===null||r===void 0?void 0:r.nonce)&&(a.nonce=(i=n.csp)===null||i===void 0?void 0:i.nonce),a.innerHTML!==e&&(a.innerHTML=e),a;const s=A6(e,n);return s.setAttribute(_6(n),t),s}function QD(e,t){if(e.length!==t.length)return!1;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!1,o={map:this.cache};return t.forEach(r=>{var i;o?o=(i=o==null?void 0:o.map)===null||i===void 0?void 0:i.get(r):o=void 0}),o!=null&&o.value&&n&&(o.value[1]=this.cacheCallTimes++),o==null?void 0:o.value}get(t){var n;return(n=this.internalGet(t,!0))===null||n===void 0?void 0:n[0]}has(t){return!!this.internalGet(t)}set(t,n){if(!this.has(t)){if(this.size()+1>ls.MAX_CACHE_SIZE+ls.MAX_CACHE_OFFSET){const[r]=this.keys.reduce((i,l)=>{const[,a]=i;return this.internalGet(l)[1]{if(i===t.length-1)o.set(r,{value:[n,this.cacheCallTimes++]});else{const l=o.get(r);l?l.map||(l.map=new Map):o.set(r,{map:new Map}),o=o.get(r).map}})}deleteByPath(t,n){var o;const r=t.get(n[0]);if(n.length===1)return r.map?t.set(n[0],{map:r.map}):t.delete(n[0]),(o=r.value)===null||o===void 0?void 0:o[0];const i=this.deleteByPath(r.map,n.slice(1));return(!r.map||r.map.size===0)&&!r.value&&t.delete(n[0]),i}delete(t){if(this.has(t))return this.keys=this.keys.filter(n=>!QD(n,t)),this.deleteByPath(this.cache,t)}}ls.MAX_CACHE_SIZE=20;ls.MAX_CACHE_OFFSET=5;let pC={};function e9(e,t){}function t9(e,t){}function D6(e,t,n){!t&&!pC[n]&&(e(!1,n),pC[n]=!0)}function qb(e,t){D6(e9,e,t)}function n9(e,t){D6(t9,e,t)}function o9(){}let Eo=o9,hC=0;class N6{constructor(t){this.derivatives=Array.isArray(t)?t:[t],this.id=hC,t.length===0&&Eo(t.length>0),hC+=1}getDerivativeToken(t){return this.derivatives.reduce((n,o)=>o(t,n),void 0)}}const Yg=new ls;function B6(e){const t=Array.isArray(e)?e:[e];return Yg.has(t)||Yg.set(t,new N6(t)),Yg.get(t)}const gC=new WeakMap;function Hf(e){let t=gC.get(e)||"";return t||(Object.keys(e).forEach(n=>{const o=e[n];t+=n,o instanceof N6?t+=o.id:o&&typeof o=="object"?t+=Hf(o):t+=o}),gC.set(e,t)),t}function r9(e,t){return Yb(`${t}_${Hf(e)}`)}const fc=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),L6="_bAmBoO_";function i9(e,t,n){var o,r;if(Hn()){Hc(e,fc);const i=document.createElement("div");i.style.position="fixed",i.style.left="0",i.style.top="0",t==null||t(i),document.body.appendChild(i);const l=n?n(i):(o=getComputedStyle(i).content)===null||o===void 0?void 0:o.includes(L6);return(r=i.parentNode)===null||r===void 0||r.removeChild(i),zf(fc),l}return!1}let qg;function l9(){return qg===void 0&&(qg=i9(`@layer ${fc} { .${fc} { content: "${L6}"!important; } }`,e=>{e.className=fc})),qg}const mC={},a9="css",Cl=new Map;function s9(e){Cl.set(e,(Cl.get(e)||0)+1)}function c9(e,t){typeof document<"u"&&document.querySelectorAll(`style[${P6}="${e}"]`).forEach(o=>{var r;o[Da]===t&&((r=o.parentNode)===null||r===void 0||r.removeChild(o))})}const u9=0;function d9(e,t){Cl.set(e,(Cl.get(e)||0)-1);const n=Array.from(Cl.keys()),o=n.filter(r=>(Cl.get(r)||0)<=0);n.length-o.length>u9&&o.forEach(r=>{c9(r,t),Cl.delete(r)})}const f9=(e,t,n,o)=>{const r=n.getDerivativeToken(e);let i=v(v({},r),t);return o&&(i=o(i)),i};function p9(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ie({});const o=ah(),r=I(()=>v({},...t.value)),i=I(()=>Hf(r.value)),l=I(()=>Hf(n.value.override||mC));return E6("token",I(()=>[n.value.salt||"",e.value.id,i.value,l.value]),()=>{const{salt:s="",override:c=mC,formatToken:u,getComputedToken:d}=n.value,f=d?d(r.value,c,e.value):f9(r.value,c,e.value,u),h=r9(f,s);f._tokenKey=h,s9(h);const m=`${a9}-${Yb(h)}`;return f._hashId=m,[f,m]},s=>{var c;d9(s[0]._tokenKey,(c=o.value)===null||c===void 0?void 0:c.cache.instanceId)})}var h9={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},k6="comm",F6="rule",z6="decl",g9="@import",m9="@namespace",v9="@keyframes",b9="@layer",y9=Math.abs,pc=String.fromCharCode;function H6(e){return e.trim()}function jv(e,t,n){return e.replace(t,n)}function Va(e,t){return e.charCodeAt(t)|0}function as(e,t,n){return e.slice(t,n)}function Or(e){return e.length}function S9(e){return e.length}function Ju(e,t){return t.push(e),e}var ch=1,ss=1,j6=0,Xo=0,dn=0,bs="";function Zb(e,t,n,o,r,i,l,a){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:ch,column:ss,length:l,return:"",siblings:a}}function $9(){return dn}function C9(){return dn=Xo>0?Va(bs,--Xo):0,ss--,dn===10&&(ss=1,ch--),dn}function ar(){return dn=Xo2||jc(dn)>3?"":" "}function P9(e,t){for(;--t&&ar()&&!(dn<48||dn>102||dn>57&&dn<65||dn>70&&dn<97););return uh(e,Nd()+(t<6&&ki()==32&&ar()==32))}function Vv(e){for(;ar();)switch(dn){case e:return Xo;case 34:case 39:e!==34&&e!==39&&Vv(dn);break;case 40:e===41&&Vv(e);break;case 92:ar();break}return Xo}function I9(e,t){for(;ar()&&e+dn!==57;)if(e+dn===84&&ki()===47)break;return"/*"+uh(t,Xo-1)+"*"+pc(e===47?e:ar())}function T9(e){for(;!jc(ki());)ar();return uh(e,Xo)}function E9(e){return w9(Bd("",null,null,null,[""],e=x9(e),0,[0],e))}function Bd(e,t,n,o,r,i,l,a,s){for(var c=0,u=0,d=l,f=0,h=0,m=0,g=1,y=1,b=1,S=0,$=0,x="",C=r,O=i,w=o,P=x;y;)switch(m=$,$=ar()){case 40:m!=108&&Va(P,d-1)==58?(S++,P+="("):P+=Zg($);break;case 41:S--,P+=")";break;case 34:case 39:case 91:P+=Zg($);break;case 9:case 10:case 13:case 32:if(S>0){P+=pc($);break}P+=O9(m);break;case 92:P+=P9(Nd()-1,7);continue;case 47:switch(ki()){case 42:case 47:Ju(_9(I9(ar(),Nd()),t,n,s),s),(jc(m||1)==5||jc(ki()||1)==5)&&Or(P)&&as(P,-1,void 0)!==" "&&(P+=" ");break;default:P+="/"}break;case 123*g:a[c++]=Or(P)*b;case 125*g:case 59:case 0:if(S>0&&$){P+=pc($);break}switch($){case 0:case 125:y=0;case 59+u:b==-1&&(P=jv(P,/\f/g,"")),h>0&&(Or(P)-d||g===0)&&Ju(h>32?bC(P+";",o,n,d-1,s):bC(jv(P," ","")+";",o,n,d-2,s),s);break;case 59:P+=";";default:if(Ju(w=vC(P,t,n,c,u,r,a,x,C=[],O=[],d,i),i),$===123)if(u===0)Bd(P,t,w,w,C,i,d,a,O);else{switch(f){case 99:if(Va(P,3)===110)break;case 108:if(Va(P,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Bd(e,w,w,o&&Ju(vC(e,w,w,0,0,r,a,x,r,C=[],d,O),O),r,O,d,a,o?C:O):Bd(P,w,w,w,[""],O,0,a,O)}}c=u=h=0,g=b=1,x=P="",d=l;break;case 58:d=1+Or(P),h=m;default:if(g<1){if($==123)--g;else if($==125&&g++==0&&C9()==125)continue}switch(P+=pc($),$*g){case 38:b=u>0?1:(P+="\f",-1);break;case 44:if(S>0)break;a[c++]=(Or(P)-1)*b,b=1;break;case 64:ki()===45&&(P+=Zg(ar())),f=ki(),u=d=Or(x=P+=T9(Nd())),$++;break;case 45:m===45&&Or(P)==2&&(g=0)}}return i}function vC(e,t,n,o,r,i,l,a,s,c,u,d){for(var f=r-1,h=r===0?i:[""],m=S9(h),g=0,y=0,b=0;g0?h[S]+" "+$:jv($,/&\f/g,h[S])))&&(s[b++]=x);return Zb(e,t,n,r===0?F6:a,s,c,u,d)}function _9(e,t,n,o){return Zb(e,t,n,k6,pc($9()),as(e,2,-2),0,o)}function bC(e,t,n,o,r){return Zb(e,t,n,z6,as(e,0,o),as(e,o+1,-1),o,r)}function Wv(e,t){for(var n="",o=0;o{const[i,l]=r.split(":");Nl[i]=l});const o=document.querySelector(`style[${yC}]`);o&&(V6=!1,(e=o.parentNode)===null||e===void 0||e.removeChild(o)),document.body.removeChild(t)}}function D9(e){return R9(),!!Nl[e]}function N9(e){const t=Nl[e];let n=null;if(t&&Hn())if(V6)n=A9;else{const o=document.querySelector(`style[${Dl}="${Nl[e]}"]`);o?n=o.innerHTML:delete Nl[e]}return[n,t]}const SC=Hn(),B9="_skip_check_",W6="_multi_value_";function $C(e){return Wv(E9(e),M9).replace(/\{%%%\:[^;];}/g,";")}function L9(e){return typeof e=="object"&&e&&(B9 in e||W6 in e)}function k9(e,t,n){if(!t)return e;const o=`.${t}`,r=n==="low"?`:where(${o})`:o;return e.split(",").map(l=>{var a;const s=l.trim().split(/\s+/);let c=s[0]||"";const u=((a=c.match(/^\w+/))===null||a===void 0?void 0:a[0])||"";return c=`${u}${r}${c.slice(u.length)}`,[c,...s.slice(1)].join(" ")}).join(",")}const CC=new Set,Kv=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{root:n,injectHash:o,parentSelectors:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]};const{hashId:i,layer:l,path:a,hashPriority:s,transformers:c=[],linters:u=[]}=t;let d="",f={};function h(y){const b=y.getName(i);if(!f[b]){const[S]=Kv(y.style,t,{root:!1,parentSelectors:r});f[b]=`@keyframes ${y.getName(i)}${S}`}}function m(y){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return y.forEach(S=>{Array.isArray(S)?m(S,b):S&&b.push(S)}),b}if(m(Array.isArray(e)?e:[e]).forEach(y=>{const b=typeof y=="string"&&!n?{}:y;if(typeof b=="string")d+=`${b} +`;else if(b._keyframe)h(b);else{const S=c.reduce(($,x)=>{var C;return((C=x==null?void 0:x.visit)===null||C===void 0?void 0:C.call(x,$))||$},b);Object.keys(S).forEach($=>{var x;const C=S[$];if(typeof C=="object"&&C&&($!=="animationName"||!C._keyframe)&&!L9(C)){let O=!1,w=$.trim(),P=!1;(n||o)&&i?w.startsWith("@")?O=!0:w=k9($,i,s):n&&!i&&(w==="&"||w==="")&&(w="",P=!0);const[T,M]=Kv(C,t,{root:P,injectHash:O,parentSelectors:[...r,w]});f=v(v({},f),M),d+=`${w}${T}`}else{let O=function(P,T){const M=P.replace(/[A-Z]/g,A=>`-${A.toLowerCase()}`);let E=T;!h9[P]&&typeof E=="number"&&E!==0&&(E=`${E}px`),P==="animationName"&&(T!=null&&T._keyframe)&&(h(T),E=T.getName(i)),d+=`${M}:${E};`};const w=(x=C==null?void 0:C.value)!==null&&x!==void 0?x:C;typeof C=="object"&&(C!=null&&C[W6])&&Array.isArray(w)?w.forEach(P=>{O($,P)}):O($,w)}})}}),!n)d=`{${d}}`;else if(l&&l9()){const y=l.split(",");d=`@layer ${y[y.length-1].trim()} {${d}}`,y.length>1&&(d=`@layer ${l}{%%%:%}${d}`)}return[d,f]};function F9(e,t){return Yb(`${e.join("%")}${t}`)}function Uv(e,t){const n=ah(),o=I(()=>e.value.token._tokenKey),r=I(()=>[o.value,...e.value.path]);let i=SC;return E6("style",r,()=>{const{path:l,hashId:a,layer:s,nonce:c,clientOnly:u,order:d=0}=e.value,f=r.value.join("|");if(D9(f)){const[w,P]=N9(f);if(w)return[w,o.value,P,{},u,d]}const h=t(),{hashPriority:m,container:g,transformers:y,linters:b,cache:S}=n.value,[$,x]=Kv(h,{hashId:a,hashPriority:m,layer:s,path:l.join("-"),transformers:y,linters:b}),C=$C($),O=F9(r.value,C);if(i){const w={mark:Dl,prepend:"queue",attachTo:g,priority:d},P=typeof c=="function"?c():c;P&&(w.csp={nonce:P});const T=Hc(C,O,w);T[Da]=S.instanceId,T.setAttribute(P6,o.value),Object.keys(x).forEach(M=>{CC.has(M)||(CC.add(M),Hc($C(x[M]),`_effect-${M}`,{mark:Dl,prepend:"queue",attachTo:g}))})}return[C,o.value,O,x,u,d]},(l,a)=>{let[,,s]=l;(a||n.value.autoClear)&&SC&&zf(s,{mark:Dl})}),l=>l}class it{constructor(t,n){this._keyframe=!0,this.name=t,this.style=n}getName(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t?`${t}-${this.name}`:this.name}}const z9={StyleProvider:YD},K6="4.2.6",Vc=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function En(e,t){H9(e)&&(e="100%");var n=j9(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Qu(e){return Math.min(1,Math.max(0,e))}function H9(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function j9(e){return typeof e=="string"&&e.indexOf("%")!==-1}function U6(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ed(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Il(e){return e.length===1?"0"+e:String(e)}function V9(e,t,n){return{r:En(e,255)*255,g:En(t,255)*255,b:En(n,255)*255}}function xC(e,t,n){e=En(e,255),t=En(t,255),n=En(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i=0,l=0,a=(o+r)/2;if(o===r)l=0,i=0;else{var s=o-r;switch(l=a>.5?s/(2-o-r):s/(o+r),o){case e:i=(t-n)/s+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function W9(e,t,n){var o,r,i;if(e=En(e,360),t=En(t,100),n=En(n,100),t===0)r=n,i=n,o=n;else{var l=n<.5?n*(1+t):n+t-n*t,a=2*n-l;o=Jg(a,l,e+1/3),r=Jg(a,l,e),i=Jg(a,l,e-1/3)}return{r:o*255,g:r*255,b:i*255}}function Gv(e,t,n){e=En(e,255),t=En(t,255),n=En(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i=0,l=o,a=o-r,s=o===0?0:a/o;if(o===r)i=0;else{switch(o){case e:i=(t-n)/a+(t>16,g:(e&65280)>>8,b:e&255}}var Yv={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Ta(e){var t={r:0,g:0,b:0},n=1,o=null,r=null,i=null,l=!1,a=!1;return typeof e=="string"&&(e=Z9(e)),typeof e=="object"&&(Hr(e.r)&&Hr(e.g)&&Hr(e.b)?(t=V9(e.r,e.g,e.b),l=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Hr(e.h)&&Hr(e.s)&&Hr(e.v)?(o=ed(e.s),r=ed(e.v),t=K9(e.h,o,r),l=!0,a="hsv"):Hr(e.h)&&Hr(e.s)&&Hr(e.l)&&(o=ed(e.s),i=ed(e.l),t=W9(e.h,o,i),l=!0,a="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=U6(n),{ok:l,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Y9="[-\\+]?\\d+%?",q9="[-\\+]?\\d*\\.\\d+%?",Fi="(?:".concat(q9,")|(?:").concat(Y9,")"),Qg="[\\s|\\(]+(".concat(Fi,")[,|\\s]+(").concat(Fi,")[,|\\s]+(").concat(Fi,")\\s*\\)?"),em="[\\s|\\(]+(".concat(Fi,")[,|\\s]+(").concat(Fi,")[,|\\s]+(").concat(Fi,")[,|\\s]+(").concat(Fi,")\\s*\\)?"),or={CSS_UNIT:new RegExp(Fi),rgb:new RegExp("rgb"+Qg),rgba:new RegExp("rgba"+em),hsl:new RegExp("hsl"+Qg),hsla:new RegExp("hsla"+em),hsv:new RegExp("hsv"+Qg),hsva:new RegExp("hsva"+em),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Z9(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Yv[e])e=Yv[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=or.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=or.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=or.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=or.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=or.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=or.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=or.hex8.exec(e),n?{r:Co(n[1]),g:Co(n[2]),b:Co(n[3]),a:wC(n[4]),format:t?"name":"hex8"}:(n=or.hex6.exec(e),n?{r:Co(n[1]),g:Co(n[2]),b:Co(n[3]),format:t?"name":"hex"}:(n=or.hex4.exec(e),n?{r:Co(n[1]+n[1]),g:Co(n[2]+n[2]),b:Co(n[3]+n[3]),a:wC(n[4]+n[4]),format:t?"name":"hex8"}:(n=or.hex3.exec(e),n?{r:Co(n[1]+n[1]),g:Co(n[2]+n[2]),b:Co(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Hr(e){return!!or.CSS_UNIT.exec(String(e))}var vt=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var o;if(t instanceof e)return t;typeof t=="number"&&(t=X9(t)),this.originalInput=t;var r=Ta(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(o=n.format)!==null&&o!==void 0?o:r.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,o,r,i=t.r/255,l=t.g/255,a=t.b/255;return i<=.03928?n=i/12.92:n=Math.pow((i+.055)/1.055,2.4),l<=.03928?o=l/12.92:o=Math.pow((l+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*o+.0722*r},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=U6(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Gv(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Gv(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(o,"%, ").concat(r,"%)"):"hsva(".concat(n,", ").concat(o,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=xC(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=xC(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(o,"%, ").concat(r,"%)"):"hsla(".concat(n,", ").concat(o,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Xv(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),U9(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),o=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(o,")"):"rgba(".concat(t,", ").concat(n,", ").concat(o,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(En(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(En(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+Xv(this.r,this.g,this.b,!1),n=0,o=Object.entries(Yv);n=0,i=!n&&r&&(t.startsWith("hex")||t==="name");return i?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(o=this.toRgbString()),t==="prgb"&&(o=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(o=this.toHexString()),t==="hex3"&&(o=this.toHexString(!0)),t==="hex4"&&(o=this.toHex8String(!0)),t==="hex8"&&(o=this.toHex8String()),t==="name"&&(o=this.toName()),t==="hsl"&&(o=this.toHslString()),t==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Qu(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Qu(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Qu(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Qu(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var o=this.toRgb(),r=new e(t).toRgb(),i=n/100,l={r:(r.r-o.r)*i+o.r,g:(r.g-o.g)*i+o.g,b:(r.b-o.b)*i+o.b,a:(r.a-o.a)*i+o.a};return new e(l)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var o=this.toHsl(),r=360/n,i=[this];for(o.h=(o.h-(r*t>>1)+720)%360;--t;)o.h=(o.h+r)%360,i.push(new e(o));return i},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),o=n.h,r=n.s,i=n.v,l=[],a=1/t;t--;)l.push(new e({h:o,s:r,v:i})),i=(i+a)%1;return l},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),o=new e(t).toRgb(),r=n.a+o.a*(1-n.a);return new e({r:(n.r*n.a+o.r*o.a*(1-n.a))/r,g:(n.g*n.a+o.g*o.a*(1-n.a))/r,b:(n.b*n.a+o.b*o.a*(1-n.a))/r,a:r})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),o=n.h,r=[this],i=360/t,l=1;l=60&&Math.round(e.h)<=240?o=n?Math.round(e.h)-td*t:Math.round(e.h)+td*t:o=n?Math.round(e.h)+td*t:Math.round(e.h)-td*t,o<0?o+=360:o>=360&&(o-=360),o}function TC(e,t,n){if(e.h===0&&e.s===0)return e.s;var o;return n?o=e.s-OC*t:t===X6?o=e.s+OC:o=e.s+J9*t,o>1&&(o=1),n&&t===G6&&o>.1&&(o=.1),o<.06&&(o=.06),Number(o.toFixed(2))}function EC(e,t,n){var o;return n?o=e.v+Q9*t:o=e.v-eN*t,o>1&&(o=1),Number(o.toFixed(2))}function Kl(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],o=Ta(e),r=G6;r>0;r-=1){var i=PC(o),l=nd(Ta({h:IC(i,r,!0),s:TC(i,r,!0),v:EC(i,r,!0)}));n.push(l)}n.push(nd(o));for(var a=1;a<=X6;a+=1){var s=PC(o),c=nd(Ta({h:IC(s,a),s:TC(s,a),v:EC(s,a)}));n.push(c)}return t.theme==="dark"?tN.map(function(u){var d=u.index,f=u.opacity,h=nd(nN(Ta(t.backgroundColor||"#141414"),Ta(n[d]),f*100));return h}):n}var Wa={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},hc={},tm={};Object.keys(Wa).forEach(function(e){hc[e]=Kl(Wa[e]),hc[e].primary=hc[e][5],tm[e]=Kl(Wa[e],{theme:"dark",backgroundColor:"#141414"}),tm[e].primary=tm[e][5]});var oN=hc.gold,rN=hc.blue;const iN=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function lN(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const Y6={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},dh=v(v({},Y6),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, +'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', +'Noto Color Emoji'`,fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1});function aN(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:o}=t;const{colorSuccess:r,colorWarning:i,colorError:l,colorInfo:a,colorPrimary:s,colorBgBase:c,colorTextBase:u}=e,d=n(s),f=n(r),h=n(i),m=n(l),g=n(a),y=o(c,u);return v(v({},y),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:m[1],colorErrorBgHover:m[2],colorErrorBorder:m[3],colorErrorBorderHover:m[4],colorErrorHover:m[5],colorError:m[6],colorErrorActive:m[7],colorErrorTextHover:m[8],colorErrorText:m[9],colorErrorTextActive:m[10],colorWarningBg:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[10],colorInfoBg:g[1],colorInfoBgHover:g[2],colorInfoBorder:g[3],colorInfoBorderHover:g[4],colorInfoHover:g[4],colorInfo:g[6],colorInfoActive:g[7],colorInfoTextHover:g[8],colorInfoText:g[9],colorInfoTextActive:g[10],colorBgMask:new vt("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const sN=e=>{let t=e,n=e,o=e,r=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?o=1:e>=6&&(o=2),e>4&&e<8?r=4:e>=8&&(r=6),{borderRadius:e>16?16:e,borderRadiusXS:o,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:r}};function cN(e){const{motionUnit:t,motionBase:n,borderRadius:o,lineWidth:r}=e;return v({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:r+1},sN(o))}const jr=(e,t)=>new vt(e).setAlpha(t).toRgbString(),js=(e,t)=>new vt(e).darken(t).toHexString(),uN=e=>{const t=Kl(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},dN=(e,t)=>{const n=e||"#fff",o=t||"#000";return{colorBgBase:n,colorTextBase:o,colorText:jr(o,.88),colorTextSecondary:jr(o,.65),colorTextTertiary:jr(o,.45),colorTextQuaternary:jr(o,.25),colorFill:jr(o,.15),colorFillSecondary:jr(o,.06),colorFillTertiary:jr(o,.04),colorFillQuaternary:jr(o,.02),colorBgLayout:js(n,4),colorBgContainer:js(n,0),colorBgElevated:js(n,0),colorBgSpotlight:jr(o,.85),colorBorder:js(n,15),colorBorderSecondary:js(n,6)}};function fN(e){const t=new Array(10).fill(null).map((n,o)=>{const r=o-1,i=e*Math.pow(2.71828,r/5),l=o>1?Math.floor(i):Math.ceil(i);return Math.floor(l/2)*2});return t[1]=e,t.map(n=>{const o=n+8;return{size:n,lineHeight:o/n}})}const pN=e=>{const t=fN(e),n=t.map(r=>r.size),o=t.map(r=>r.lineHeight);return{fontSizeSM:n[0],fontSize:n[1],fontSizeLG:n[2],fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:o[1],lineHeightLG:o[2],lineHeightSM:o[0],lineHeightHeading1:o[6],lineHeightHeading2:o[5],lineHeightHeading3:o[4],lineHeightHeading4:o[3],lineHeightHeading5:o[2]}};function hN(e){const t=Object.keys(Y6).map(n=>{const o=Kl(e[n]);return new Array(10).fill(1).reduce((r,i,l)=>(r[`${n}-${l+1}`]=o[l],r),{})}).reduce((n,o)=>(n=v(v({},n),o),n),{});return v(v(v(v(v(v(v({},e),t),aN(e,{generateColorPalettes:uN,generateNeutralColorPalettes:dN})),pN(e.fontSize)),lN(e)),iN(e)),cN(e))}function nm(e){return e>=0&&e<=255}function od(e,t){const{r:n,g:o,b:r,a:i}=new vt(e).toRgb();if(i<1)return e;const{r:l,g:a,b:s}=new vt(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-l*(1-c))/c),d=Math.round((o-a*(1-c))/c),f=Math.round((r-s*(1-c))/c);if(nm(u)&&nm(d)&&nm(f))return new vt({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new vt({r:n,g:o,b:r,a:1}).toRgbString()}var gN=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{delete o[h]});const r=v(v({},n),o),i=480,l=576,a=768,s=992,c=1200,u=1600,d=2e3;return v(v(v({},r),{colorLink:r.colorInfoText,colorLinkHover:r.colorInfoHover,colorLinkActive:r.colorInfoActive,colorFillContent:r.colorFillSecondary,colorFillContentHover:r.colorFill,colorFillAlter:r.colorFillQuaternary,colorBgContainerDisabled:r.colorFillTertiary,colorBorderBg:r.colorBgContainer,colorSplit:od(r.colorBorderSecondary,r.colorBgContainer),colorTextPlaceholder:r.colorTextQuaternary,colorTextDisabled:r.colorTextQuaternary,colorTextHeading:r.colorText,colorTextLabel:r.colorTextSecondary,colorTextDescription:r.colorTextTertiary,colorTextLightSolid:r.colorWhite,colorHighlight:r.colorError,colorBgTextHover:r.colorFillSecondary,colorBgTextActive:r.colorFill,colorIcon:r.colorTextTertiary,colorIconHover:r.colorText,colorErrorOutline:od(r.colorErrorBg,r.colorBgContainer),colorWarningOutline:od(r.colorWarningBg,r.colorBgContainer),fontSizeIcon:r.fontSizeSM,lineWidth:r.lineWidth,controlOutlineWidth:r.lineWidth*2,controlInteractiveSize:r.controlHeight/2,controlItemBgHover:r.colorFillTertiary,controlItemBgActive:r.colorPrimaryBg,controlItemBgActiveHover:r.colorPrimaryBgHover,controlItemBgActiveDisabled:r.colorFill,controlTmpOutline:r.colorFillQuaternary,controlOutline:od(r.colorPrimaryBg,r.colorBgContainer),lineType:r.lineType,borderRadius:r.borderRadius,borderRadiusXS:r.borderRadiusXS,borderRadiusSM:r.borderRadiusSM,borderRadiusLG:r.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:r.sizeXXS,paddingXS:r.sizeXS,paddingSM:r.sizeSM,padding:r.size,paddingMD:r.sizeMD,paddingLG:r.sizeLG,paddingXL:r.sizeXL,paddingContentHorizontalLG:r.sizeLG,paddingContentVerticalLG:r.sizeMS,paddingContentHorizontal:r.sizeMS,paddingContentVertical:r.sizeSM,paddingContentHorizontalSM:r.size,paddingContentVerticalSM:r.sizeXS,marginXXS:r.sizeXXS,marginXS:r.sizeXS,marginSM:r.sizeSM,margin:r.size,marginMD:r.sizeMD,marginLG:r.sizeLG,marginXL:r.sizeXL,marginXXL:r.sizeXXL,boxShadow:` + 0 1px 2px 0 rgba(0, 0, 0, 0.03), + 0 1px 6px -1px rgba(0, 0, 0, 0.02), + 0 2px 4px 0 rgba(0, 0, 0, 0.02) + `,boxShadowSecondary:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowTertiary:` + 0 1px 2px 0 rgba(0, 0, 0, 0.03), + 0 1px 6px -1px rgba(0, 0, 0, 0.02), + 0 2px 4px 0 rgba(0, 0, 0, 0.02) + `,screenXS:i,screenXSMin:i,screenXSMax:l-1,screenSM:l,screenSMMin:l,screenSMMax:a-1,screenMD:a,screenMDMin:a,screenMDMax:s-1,screenLG:s,screenLGMin:s,screenLGMax:c-1,screenXL:c,screenXLMin:c,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,screenXXLMax:d-1,screenXXXL:d,screenXXXLMin:d,boxShadowPopoverArrow:"3px 3px 7px rgba(0, 0, 0, 0.1)",boxShadowCard:` + 0 1px 2px -2px ${new vt("rgba(0, 0, 0, 0.16)").toRgbString()}, + 0 3px 6px 0 ${new vt("rgba(0, 0, 0, 0.12)").toRgbString()}, + 0 5px 12px 4px ${new vt("rgba(0, 0, 0, 0.09)").toRgbString()} + `,boxShadowDrawerRight:` + -6px 0 16px 0 rgba(0, 0, 0, 0.08), + -3px 0 6px -4px rgba(0, 0, 0, 0.12), + -9px 0 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerLeft:` + 6px 0 16px 0 rgba(0, 0, 0, 0.08), + 3px 0 6px -4px rgba(0, 0, 0, 0.12), + 9px 0 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerUp:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerDown:` + 0 -6px 16px 0 rgba(0, 0, 0, 0.08), + 0 -3px 6px -4px rgba(0, 0, 0, 0.12), + 0 -9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),o)}const fh=e=>({color:e.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"&:focus, &:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive}}),Jb=(e,t,n,o,r)=>{const i=e/2,l=0,a=i,s=n*1/Math.sqrt(2),c=i-n*(1-1/Math.sqrt(2)),u=i-t*(1/Math.sqrt(2)),d=n*(Math.sqrt(2)-1)+t*(1/Math.sqrt(2)),f=2*i-u,h=d,m=2*i-s,g=c,y=2*i-l,b=a,S=i*Math.sqrt(2)+n*(Math.sqrt(2)-2),$=n*(Math.sqrt(2)-1);return{pointerEvents:"none",width:e,height:e,overflow:"hidden","&::after":{content:'""',position:"absolute",width:S,height:S,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${t}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:r,zIndex:0,background:"transparent"},"&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:e,height:e/2,background:o,clipPath:{_multi_value_:!0,value:[`polygon(${$}px 100%, 50% ${$}px, ${2*i-$}px 100%, ${$}px 100%)`,`path('M ${l} ${a} A ${n} ${n} 0 0 0 ${s} ${c} L ${u} ${d} A ${t} ${t} 0 0 1 ${f} ${h} L ${m} ${g} A ${n} ${n} 0 0 0 ${y} ${b} Z')`]},content:'""'}}};function jf(e,t){return Vc.reduce((n,o)=>{const r=e[`${o}-1`],i=e[`${o}-3`],l=e[`${o}-6`],a=e[`${o}-7`];return v(v({},n),t(o,{lightColor:r,lightBorderColor:i,darkColor:l,textColor:a}))},{})}const Zt={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Ze=e=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:e.fontFamily}),ra=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),ur=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),vN=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active,\n &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),bN=(e,t)=>{const{fontFamily:n,fontSize:o}=e,r=`[class^="${t}"], [class*=" ${t}"]`;return{[r]:{fontFamily:n,fontSize:o,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[r]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},fi=e=>({outline:`${e.lineWidthBold}px solid ${e.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),pi=e=>({"&:focus-visible":v({},fi(e))});function Xe(e,t,n){return o=>{const r=I(()=>o==null?void 0:o.value),[i,l,a]=mi(),{getPrefixCls:s,iconPrefixCls:c}=lh(),u=I(()=>s()),d=I(()=>({theme:i.value,token:l.value,hashId:a.value,path:["Shared",u.value]}));Uv(d,()=>[{"&":vN(l.value)}]);const f=I(()=>({theme:i.value,token:l.value,hashId:a.value,path:[e,r.value,c.value]}));return[Uv(f,()=>{const{token:h,flush:m}=SN(l.value),g=typeof n=="function"?n(h):n,y=v(v({},g),l.value[e]),b=`.${r.value}`,S=Fe(h,{componentCls:b,prefixCls:r.value,iconCls:`.${c.value}`,antCls:`.${u.value}`},y),$=t(S,{hashId:a.value,prefixCls:r.value,rootPrefixCls:u.value,iconPrefixCls:c.value,overrideComponentToken:l.value[e]});return m(e,y),[bN(l.value,r.value),$]}),a]}}const q6=typeof CSSINJS_STATISTIC<"u";let qv=!0;function Fe(){for(var e=arguments.length,t=new Array(e),n=0;n{Object.keys(r).forEach(l=>{Object.defineProperty(o,l,{configurable:!0,enumerable:!0,get:()=>r[l]})})}),qv=!0,o}function yN(){}function SN(e){let t,n=e,o=yN;return q6&&(t=new Set,n=new Proxy(e,{get(r,i){return qv&&t.add(i),r[i]}}),o=(r,i)=>{Array.from(t)}),{token:n,keys:t,flush:o}}const $N=B6(hN),Z6={token:dh,hashed:!0},J6=Symbol("DesignTokenContext"),Zv=oe(),CN=e=>{qe(J6,e),Se(e,()=>{Zv.value=ct(e),uP(Zv)},{immediate:!0,deep:!0})},xN=re({props:{value:Ne()},setup(e,t){let{slots:n}=t;return CN(I(()=>e.value)),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});function mi(){const e=Ke(J6,I(()=>Zv.value||Z6)),t=I(()=>`${K6}-${e.value.hashed||""}`),n=I(()=>e.value.theme||$N),o=p9(n,I(()=>[dh,e.value.token]),I(()=>({salt:t.value,override:v({override:e.value.token},e.value.components),formatToken:mN})));return[n,I(()=>o.value[0]),I(()=>e.value.hashed?o.value[1]:"")]}const Qb=re({compatConfig:{MODE:3},setup(){const[,e]=mi(),t=I(()=>new vt(e.value.colorBgBase).toHsl().l<.5?{opacity:.65}:{});return()=>p("svg",{style:t.value,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},[p("g",{fill:"none","fill-rule":"evenodd"},[p("g",{transform:"translate(24 31.67)"},[p("ellipse",{"fill-opacity":".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"},null),p("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"},null),p("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"},null),p("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"},null),p("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"},null)]),p("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"},null),p("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},[p("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"},null),p("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"},null)])])])}});Qb.PRESENTED_IMAGE_DEFAULT=!0;const Q6=re({compatConfig:{MODE:3},setup(){const[,e]=mi(),t=I(()=>{const{colorFill:n,colorFillTertiary:o,colorFillQuaternary:r,colorBgContainer:i}=e.value;return{borderColor:new vt(n).onBackground(i).toHexString(),shadowColor:new vt(o).onBackground(i).toHexString(),contentColor:new vt(r).onBackground(i).toHexString()}});return()=>p("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},[p("g",{transform:"translate(0 1)",fill:"none","fill-rule":"evenodd"},[p("ellipse",{fill:t.value.shadowColor,cx:"32",cy:"33",rx:"32",ry:"7"},null),p("g",{"fill-rule":"nonzero",stroke:t.value.borderColor},[p("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"},null),p("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:t.value.contentColor},null)])])])}});Q6.PRESENTED_IMAGE_SIMPLE=!0;const wN=e=>{const{componentCls:t,margin:n,marginXS:o,marginXL:r,fontSize:i,lineHeight:l}=e;return{[t]:{marginInline:o,fontSize:i,lineHeight:l,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:o,opacity:e.opacityImage,img:{height:"100%"},svg:{height:"100%",margin:"auto"}},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:r,color:e.colorTextDisabled,[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:o,color:e.colorTextDisabled,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},ON=Xe("Empty",e=>{const{componentCls:t,controlHeightLG:n}=e,o=Fe(e,{emptyImgCls:`${t}-img`,emptyImgHeight:n*2.5,emptyImgHeightMD:n,emptyImgHeightSM:n*.875});return[wN(o)]});var PN=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,imageStyle:Ne(),image:wt(),description:wt()}),ey=re({name:"AEmpty",compatConfig:{MODE:3},inheritAttrs:!1,props:IN(),setup(e,t){let{slots:n={},attrs:o}=t;const{direction:r,prefixCls:i}=Ee("empty",e),[l,a]=ON(i);return()=>{var s,c;const u=i.value,d=v(v({},e),o),{image:f=((s=n.image)===null||s===void 0?void 0:s.call(n))||di(Qb),description:h=((c=n.description)===null||c===void 0?void 0:c.call(n))||void 0,imageStyle:m,class:g=""}=d,y=PN(d,["image","description","imageStyle","class"]),b=typeof f=="function"?f():f,S=typeof b=="object"&&"type"in b&&b.type.PRESENTED_IMAGE_SIMPLE;return l(p(oa,{componentName:"Empty",children:$=>{const x=typeof h<"u"?h:$.description,C=typeof x=="string"?x:"empty";let O=null;return typeof b=="string"?O=p("img",{alt:C,src:b},null):O=b,p("div",D({class:ce(u,g,a.value,{[`${u}-normal`]:S,[`${u}-rtl`]:r.value==="rtl"})},y),[p("div",{class:`${u}-image`,style:m},[O]),x&&p("p",{class:`${u}-description`},[x]),n.default&&p("div",{class:`${u}-footer`},[Nt(n.default())])])}},null))}}});ey.PRESENTED_IMAGE_DEFAULT=()=>di(Qb);ey.PRESENTED_IMAGE_SIMPLE=()=>di(Q6);const Bi=At(ey),ty=e=>{const{prefixCls:t}=Ee("empty",e);return(o=>{switch(o){case"Table":case"List":return p(Bi,{image:Bi.PRESENTED_IMAGE_SIMPLE},null);case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return p(Bi,{image:Bi.PRESENTED_IMAGE_SIMPLE,class:`${t.value}-small`},null);default:return p(Bi,null,null)}})(e.componentName)};function TN(e){return p(ty,{componentName:e},null)}const e8=Symbol("SizeContextKey"),t8=()=>Ke(e8,ie(void 0)),n8=e=>{const t=t8();return qe(e8,I(()=>e.value||t.value)),e},Ee=(e,t)=>{const n=t8(),o=mo(),r=Ke(Xb,v(v({},$6),{renderEmpty:w=>di(ty,{componentName:w})})),i=I(()=>r.getPrefixCls(e,t.prefixCls)),l=I(()=>{var w,P;return(w=t.direction)!==null&&w!==void 0?w:(P=r.direction)===null||P===void 0?void 0:P.value}),a=I(()=>{var w;return(w=t.iconPrefixCls)!==null&&w!==void 0?w:r.iconPrefixCls.value}),s=I(()=>r.getPrefixCls()),c=I(()=>{var w;return(w=r.autoInsertSpaceInButton)===null||w===void 0?void 0:w.value}),u=r.renderEmpty,d=r.space,f=r.pageHeader,h=r.form,m=I(()=>{var w,P;return(w=t.getTargetContainer)!==null&&w!==void 0?w:(P=r.getTargetContainer)===null||P===void 0?void 0:P.value}),g=I(()=>{var w,P,T;return(P=(w=t.getContainer)!==null&&w!==void 0?w:t.getPopupContainer)!==null&&P!==void 0?P:(T=r.getPopupContainer)===null||T===void 0?void 0:T.value}),y=I(()=>{var w,P;return(w=t.dropdownMatchSelectWidth)!==null&&w!==void 0?w:(P=r.dropdownMatchSelectWidth)===null||P===void 0?void 0:P.value}),b=I(()=>{var w;return(t.virtual===void 0?((w=r.virtual)===null||w===void 0?void 0:w.value)!==!1:t.virtual!==!1)&&y.value!==!1}),S=I(()=>t.size||n.value),$=I(()=>{var w,P,T;return(w=t.autocomplete)!==null&&w!==void 0?w:(T=(P=r.input)===null||P===void 0?void 0:P.value)===null||T===void 0?void 0:T.autocomplete}),x=I(()=>{var w;return(w=t.disabled)!==null&&w!==void 0?w:o.value}),C=I(()=>{var w;return(w=t.csp)!==null&&w!==void 0?w:r.csp}),O=I(()=>{var w,P;return(w=t.wave)!==null&&w!==void 0?w:(P=r.wave)===null||P===void 0?void 0:P.value});return{configProvider:r,prefixCls:i,direction:l,size:S,getTargetContainer:m,getPopupContainer:g,space:d,pageHeader:f,form:h,autoInsertSpaceInButton:c,renderEmpty:u,virtual:b,dropdownMatchSelectWidth:y,rootPrefixCls:s,getPrefixCls:r.getPrefixCls,autocomplete:$,csp:C,iconPrefixCls:a,disabled:x,select:r.select,wave:O}};function rt(e,t){const n=v({},e);for(let o=0;o{const{componentCls:t}=e;return{[t]:{position:"fixed",zIndex:e.zIndexPopup}}},_N=Xe("Affix",e=>{const t=Fe(e,{zIndexPopup:e.zIndexBase+10});return[EN(t)]});function MN(){return typeof window<"u"?window:null}var Na;(function(e){e[e.None=0]="None",e[e.Prepare=1]="Prepare"})(Na||(Na={}));const AN=()=>({offsetTop:Number,offsetBottom:Number,target:{type:Function,default:MN},prefixCls:String,onChange:Function,onTestUpdatePosition:Function}),RN=re({compatConfig:{MODE:3},name:"AAffix",inheritAttrs:!1,props:AN(),setup(e,t){let{slots:n,emit:o,expose:r,attrs:i}=t;const l=oe(),a=oe(),s=ft({affixStyle:void 0,placeholderStyle:void 0,status:Na.None,lastAffix:!1,prevTarget:null,timeout:null}),c=$n(),u=I(()=>e.offsetBottom===void 0&&e.offsetTop===void 0?0:e.offsetTop),d=I(()=>e.offsetBottom),f=()=>{const{status:$,lastAffix:x}=s,{target:C}=e;if($!==Na.Prepare||!a.value||!l.value||!C)return;const O=C();if(!O)return;const w={status:Na.None},P=Zu(l.value);if(P.top===0&&P.left===0&&P.width===0&&P.height===0)return;const T=Zu(O),M=aC(P,T,u.value),E=sC(P,T,d.value);if(!(P.top===0&&P.left===0&&P.width===0&&P.height===0)){if(M!==void 0){const A=`${P.width}px`,R=`${P.height}px`;w.affixStyle={position:"fixed",top:M,width:A,height:R},w.placeholderStyle={width:A,height:R}}else if(E!==void 0){const A=`${P.width}px`,R=`${P.height}px`;w.affixStyle={position:"fixed",bottom:E,width:A,height:R},w.placeholderStyle={width:A,height:R}}w.lastAffix=!!w.affixStyle,x!==w.lastAffix&&o("change",w.lastAffix),v(s,w)}},h=()=>{v(s,{status:Na.Prepare,affixStyle:void 0,placeholderStyle:void 0})},m=zv(()=>{h()}),g=zv(()=>{const{target:$}=e,{affixStyle:x}=s;if($&&x){const C=$();if(C&&l.value){const O=Zu(C),w=Zu(l.value),P=aC(w,O,u.value),T=sC(w,O,d.value);if(P!==void 0&&x.top===P||T!==void 0&&x.bottom===T)return}}h()});r({updatePosition:m,lazyUpdatePosition:g}),Se(()=>e.target,$=>{const x=($==null?void 0:$())||null;s.prevTarget!==x&&(uC(c),x&&(cC(x,c),m()),s.prevTarget=x)}),Se(()=>[e.offsetTop,e.offsetBottom],m),Ue(()=>{const{target:$}=e;$&&(s.timeout=setTimeout(()=>{cC($(),c),m()}))}),Vn(()=>{f()}),Wn(()=>{clearTimeout(s.timeout),uC(c),m.cancel(),g.cancel()});const{prefixCls:y}=Ee("affix",e),[b,S]=_N(y);return()=>{var $;const{affixStyle:x,placeholderStyle:C,status:O}=s,w=ce({[y.value]:x,[S.value]:!0}),P=rt(e,["prefixCls","offsetTop","offsetBottom","target","onChange","onTestUpdatePosition"]);return b(p(Go,{onResize:m},{default:()=>[p("div",D(D(D({},P),i),{},{ref:l,"data-measure-status":O}),[x&&p("div",{style:C,"aria-hidden":"true"},null),p("div",{class:w,ref:a,style:x},[($=n.default)===null||$===void 0?void 0:$.call(n)])])]}))}}}),o8=At(RN);function _C(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function MC(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function om(e,t){if(e.clientHeightt||i>e&&l=t&&a>=n?i-e-o:l>t&&an?l-t+r:0}var AC=function(e,t){var n=window,o=t.scrollMode,r=t.block,i=t.inline,l=t.boundary,a=t.skipOverflowHiddenElements,s=typeof l=="function"?l:function(ee){return ee!==l};if(!_C(e))throw new TypeError("Invalid target");for(var c,u,d=document.scrollingElement||document.documentElement,f=[],h=e;_C(h)&&s(h);){if((h=(u=(c=h).parentElement)==null?c.getRootNode().host||null:u)===d){f.push(h);break}h!=null&&h===document.body&&om(h)&&!om(document.documentElement)||h!=null&&om(h,a)&&f.push(h)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,y=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,S=e.getBoundingClientRect(),$=S.height,x=S.width,C=S.top,O=S.right,w=S.bottom,P=S.left,T=r==="start"||r==="nearest"?C:r==="end"?w:C+$/2,M=i==="center"?P+x/2:i==="end"?O:P,E=[],A=0;A=0&&P>=0&&w<=g&&O<=m&&C>=B&&w<=k&&P>=z&&O<=L)return E;var H=getComputedStyle(R),j=parseInt(H.borderLeftWidth,10),Y=parseInt(H.borderTopWidth,10),Z=parseInt(H.borderRightWidth,10),G=parseInt(H.borderBottomWidth,10),te=0,U=0,Q="offsetWidth"in R?R.offsetWidth-R.clientWidth-j-Z:0,J="offsetHeight"in R?R.offsetHeight-R.clientHeight-Y-G:0,X="offsetWidth"in R?R.offsetWidth===0?0:N/R.offsetWidth:0,q="offsetHeight"in R?R.offsetHeight===0?0:_/R.offsetHeight:0;if(d===R)te=r==="start"?T:r==="end"?T-g:r==="nearest"?rd(b,b+g,g,Y,G,b+T,b+T+$,$):T-g/2,U=i==="start"?M:i==="center"?M-m/2:i==="end"?M-m:rd(y,y+m,m,j,Z,y+M,y+M+x,x),te=Math.max(0,te+b),U=Math.max(0,U+y);else{te=r==="start"?T-B-Y:r==="end"?T-k+G+J:r==="nearest"?rd(B,k,_,Y,G+J,T,T+$,$):T-(B+_/2)+J/2,U=i==="start"?M-z-j:i==="center"?M-(z+N/2)+Q/2:i==="end"?M-L+Z+Q:rd(z,L,N,j,Z+Q,M,M+x,x);var V=R.scrollLeft,K=R.scrollTop;T+=K-(te=Math.max(0,Math.min(K+te/q,R.scrollHeight-_/q+J))),M+=V-(U=Math.max(0,Math.min(V+U/X,R.scrollWidth-N/X+Q)))}E.push({el:R,top:te,left:U})}return E};function r8(e){return e===Object(e)&&Object.keys(e).length!==0}function DN(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(o){var r=o.el,i=o.top,l=o.left;r.scroll&&n?r.scroll({top:i,left:l,behavior:t}):(r.scrollTop=i,r.scrollLeft=l)})}function NN(e){return e===!1?{block:"end",inline:"nearest"}:r8(e)?e:{block:"start",inline:"nearest"}}function i8(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(r8(t)&&typeof t.behavior=="function")return t.behavior(n?AC(e,t):[]);if(n){var o=NN(t);return DN(AC(e,o),o.behavior)}}function BN(e,t,n,o){const r=n-t;return e/=o/2,e<1?r/2*e*e*e+t:r/2*((e-=2)*e*e+2)+t}function Jv(e){return e!=null&&e===e.window}function ny(e,t){var n,o;if(typeof window>"u")return 0;const r="scrollTop";let i=0;return Jv(e)?i=e.scrollY:e instanceof Document?i=e.documentElement[r]:(e instanceof HTMLElement||e)&&(i=e[r]),e&&!Jv(e)&&typeof i!="number"&&(i=(o=((n=e.ownerDocument)!==null&&n!==void 0?n:e).documentElement)===null||o===void 0?void 0:o[r]),i}function oy(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:n=()=>window,callback:o,duration:r=450}=t,i=n(),l=ny(i),a=Date.now(),s=()=>{const u=Date.now()-a,d=BN(u>r?r:u,l,e,r);Jv(i)?i.scrollTo(window.scrollX,d):i instanceof Document?i.documentElement.scrollTop=d:i.scrollTop=d,u{qe(l8,e)},kN=()=>Ke(l8,{registerLink:id,unregisterLink:id,scrollTo:id,activeLink:I(()=>""),handleClick:id,direction:I(()=>"vertical")}),FN=e=>{const{componentCls:t,holderOffsetBlock:n,motionDurationSlow:o,lineWidthBold:r,colorPrimary:i,lineType:l,colorSplit:a}=e;return{[`${t}-wrapper`]:{marginBlockStart:-n,paddingBlockStart:n,backgroundColor:"transparent",[t]:v(v({},Ze(e)),{position:"relative",paddingInlineStart:r,[`${t}-link`]:{paddingBlock:e.anchorPaddingBlock,paddingInline:`${e.anchorPaddingInline}px 0`,"&-title":v(v({},Zt),{position:"relative",display:"block",marginBlockEnd:e.anchorTitleBlock,color:e.colorText,transition:`all ${e.motionDurationSlow}`,"&:only-child":{marginBlockEnd:0}}),[`&-active > ${t}-link-title`]:{color:e.colorPrimary},[`${t}-link`]:{paddingBlock:e.anchorPaddingBlockSecondary}}}),[`&:not(${t}-wrapper-horizontal)`]:{[t]:{"&::before":{position:"absolute",left:{_skip_check_:!0,value:0},top:0,height:"100%",borderInlineStart:`${r}px ${l} ${a}`,content:'" "'},[`${t}-ink`]:{position:"absolute",left:{_skip_check_:!0,value:0},display:"none",transform:"translateY(-50%)",transition:`top ${o} ease-in-out`,width:r,backgroundColor:i,[`&${t}-ink-visible`]:{display:"inline-block"}}}},[`${t}-fixed ${t}-ink ${t}-ink`]:{display:"none"}}}},zN=e=>{const{componentCls:t,motionDurationSlow:n,lineWidthBold:o,colorPrimary:r}=e;return{[`${t}-wrapper-horizontal`]:{position:"relative","&::before":{position:"absolute",left:{_skip_check_:!0,value:0},right:{_skip_check_:!0,value:0},bottom:0,borderBottom:`1px ${e.lineType} ${e.colorSplit}`,content:'" "'},[t]:{overflowX:"scroll",position:"relative",display:"flex",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},[`${t}-link:first-of-type`]:{paddingInline:0},[`${t}-ink`]:{position:"absolute",bottom:0,transition:`left ${n} ease-in-out, width ${n} ease-in-out`,height:o,backgroundColor:r}}}}},HN=Xe("Anchor",e=>{const{fontSize:t,fontSizeLG:n,padding:o,paddingXXS:r}=e,i=Fe(e,{holderOffsetBlock:r,anchorPaddingBlock:r,anchorPaddingBlockSecondary:r/2,anchorPaddingInline:o,anchorTitleBlock:t/14*3,anchorBallSize:n/2});return[FN(i),zN(i)]}),jN=()=>({prefixCls:String,href:String,title:wt(),target:String,customTitleProps:Ne()}),ry=re({compatConfig:{MODE:3},name:"AAnchorLink",inheritAttrs:!1,props:et(jN(),{href:"#"}),slots:Object,setup(e,t){let{slots:n,attrs:o}=t,r=null;const{handleClick:i,scrollTo:l,unregisterLink:a,registerLink:s,activeLink:c}=kN(),{prefixCls:u}=Ee("anchor",e),d=f=>{const{href:h}=e;i(f,{title:r,href:h}),l(h)};return Se(()=>e.href,(f,h)=>{lt(()=>{a(h),s(f)})}),Ue(()=>{s(e.href)}),tt(()=>{a(e.href)}),()=>{var f;const{href:h,target:m,title:g=n.title,customTitleProps:y={}}=e,b=u.value;r=typeof g=="function"?g(y):g;const S=c.value===h,$=ce(`${b}-link`,{[`${b}-link-active`]:S},o.class),x=ce(`${b}-link-title`,{[`${b}-link-title-active`]:S});return p("div",D(D({},o),{},{class:$}),[p("a",{class:x,href:h,title:typeof r=="string"?r:"",target:m,onClick:d},[n.customTitle?n.customTitle(y):r]),(f=n.default)===null||f===void 0?void 0:f.call(n)])}}});function VN(e,t){for(var n=0;n=0||(r[n]=e[n]);return r}function RC(e){return((t=e)!=null&&typeof t=="object"&&Array.isArray(t)===!1)==1&&Object.prototype.toString.call(e)==="[object Object]";var t}var u8=Object.prototype,d8=u8.toString,WN=u8.hasOwnProperty,f8=/^\s*function (\w+)/;function DC(e){var t,n=(t=e==null?void 0:e.type)!==null&&t!==void 0?t:e;if(n){var o=n.toString().match(f8);return o?o[1]:""}return""}var Ul=function(e){var t,n;return RC(e)!==!1&&typeof(t=e.constructor)=="function"&&RC(n=t.prototype)!==!1&&n.hasOwnProperty("isPrototypeOf")!==!1},KN=function(e){return e},Io=KN,Wc=function(e,t){return WN.call(e,t)},UN=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},cs=Array.isArray||function(e){return d8.call(e)==="[object Array]"},us=function(e){return d8.call(e)==="[object Function]"},Vf=function(e){return Ul(e)&&Wc(e,"_vueTypes_name")},p8=function(e){return Ul(e)&&(Wc(e,"type")||["_vueTypes_name","validator","default","required"].some(function(t){return Wc(e,t)}))};function iy(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function ia(e,t,n){var o,r=!0,i="";o=Ul(e)?e:{type:e};var l=Vf(o)?o._vueTypes_name+" - ":"";if(p8(o)&&o.type!==null){if(o.type===void 0||o.type===!0||!o.required&&t===void 0)return r;cs(o.type)?(r=o.type.some(function(d){return ia(d,t)===!0}),i=o.type.map(function(d){return DC(d)}).join(" or ")):r=(i=DC(o))==="Array"?cs(t):i==="Object"?Ul(t):i==="String"||i==="Number"||i==="Boolean"||i==="Function"?function(d){if(d==null)return"";var f=d.constructor.toString().match(f8);return f?f[1]:""}(t)===i:t instanceof o.type}if(!r){var a=l+'value "'+t+'" should be of type "'+i+'"';return a}if(Wc(o,"validator")&&us(o.validator)){var s=Io,c=[];if(Io=function(d){c.push(d)},r=o.validator(t),Io=s,!r){var u=(c.length>1?"* ":"")+c.join(` +* `);return c.length=0,u}}return r}function _o(e,t){var n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get:function(){return this.required=!0,this}},def:{value:function(r){return r!==void 0||this.default?us(r)||ia(this,r)===!0?(this.default=cs(r)?function(){return[].concat(r)}:Ul(r)?function(){return Object.assign({},r)}:r,this):(Io(this._vueTypes_name+' - invalid default value: "'+r+'"'),this):this}}}),o=n.validator;return us(o)&&(n.validator=iy(o,n)),n}function Nr(e,t){var n=_o(e,t);return Object.defineProperty(n,"validate",{value:function(o){return us(this.validator)&&Io(this._vueTypes_name+` - calling .validate() will overwrite the current custom validator function. Validator info: +`+JSON.stringify(this)),this.validator=iy(o,this),this}})}function NC(e,t,n){var o,r,i=(o=t,r={},Object.getOwnPropertyNames(o).forEach(function(d){r[d]=Object.getOwnPropertyDescriptor(o,d)}),Object.defineProperties({},r));if(i._vueTypes_name=e,!Ul(n))return i;var l,a,s=n.validator,c=c8(n,["validator"]);if(us(s)){var u=i.validator;u&&(u=(a=(l=u).__original)!==null&&a!==void 0?a:l),i.validator=iy(u?function(d){return u.call(this,d)&&s.call(this,d)}:s,i)}return Object.assign(i,c)}function ph(e){return e.replace(/^(?!\s*$)/gm," ")}var GN=function(){return Nr("any",{})},XN=function(){return Nr("function",{type:Function})},YN=function(){return Nr("boolean",{type:Boolean})},qN=function(){return Nr("string",{type:String})},ZN=function(){return Nr("number",{type:Number})},JN=function(){return Nr("array",{type:Array})},QN=function(){return Nr("object",{type:Object})},eB=function(){return _o("integer",{type:Number,validator:function(e){return UN(e)}})},tB=function(){return _o("symbol",{validator:function(e){return typeof e=="symbol"}})};function nB(e,t){if(t===void 0&&(t="custom validation failed"),typeof e!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return _o(e.name||"<>",{validator:function(n){var o=e(n);return o||Io(this._vueTypes_name+" - "+t),o}})}function oB(e){if(!cs(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");var t='oneOf - value should be one of "'+e.join('", "')+'".',n=e.reduce(function(o,r){if(r!=null){var i=r.constructor;o.indexOf(i)===-1&&o.push(i)}return o},[]);return _o("oneOf",{type:n.length>0?n:void 0,validator:function(o){var r=e.indexOf(o)!==-1;return r||Io(t),r}})}function rB(e){if(!cs(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");for(var t=!1,n=[],o=0;o0&&n.some(function(s){return l.indexOf(s)===-1})){var a=n.filter(function(s){return l.indexOf(s)===-1});return Io(a.length===1?'shape - required property "'+a[0]+'" is not defined.':'shape - required properties "'+a.join('", "')+'" are not defined.'),!1}return l.every(function(s){if(t.indexOf(s)===-1)return i._vueTypes_isLoose===!0||(Io('shape - shape definition does not include a "'+s+'" property. Allowed keys: "'+t.join('", "')+'".'),!1);var c=ia(e[s],r[s]);return typeof c=="string"&&Io('shape - "'+s+`" property validation error: + `+ph(c)),c===!0})}});return Object.defineProperty(o,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(o,"loose",{get:function(){return this._vueTypes_isLoose=!0,this}}),o}var $r=function(){function e(){}return e.extend=function(t){var n=this;if(cs(t))return t.forEach(function(d){return n.extend(d)}),this;var o=t.name,r=t.validate,i=r!==void 0&&r,l=t.getter,a=l!==void 0&&l,s=c8(t,["name","validate","getter"]);if(Wc(this,o))throw new TypeError('[VueTypes error]: Type "'+o+'" already defined');var c,u=s.type;return Vf(u)?(delete s.type,Object.defineProperty(this,o,a?{get:function(){return NC(o,u,s)}}:{value:function(){var d,f=NC(o,u,s);return f.validator&&(f.validator=(d=f.validator).bind.apply(d,[f].concat([].slice.call(arguments)))),f}})):(c=a?{get:function(){var d=Object.assign({},s);return i?Nr(o,d):_o(o,d)},enumerable:!0}:{value:function(){var d,f,h=Object.assign({},s);return d=i?Nr(o,h):_o(o,h),h.validator&&(d.validator=(f=h.validator).bind.apply(f,[d].concat([].slice.call(arguments)))),d},enumerable:!0},Object.defineProperty(this,o,c))},a8(e,null,[{key:"any",get:function(){return GN()}},{key:"func",get:function(){return XN().def(this.defaults.func)}},{key:"bool",get:function(){return YN().def(this.defaults.bool)}},{key:"string",get:function(){return qN().def(this.defaults.string)}},{key:"number",get:function(){return ZN().def(this.defaults.number)}},{key:"array",get:function(){return JN().def(this.defaults.array)}},{key:"object",get:function(){return QN().def(this.defaults.object)}},{key:"integer",get:function(){return eB().def(this.defaults.integer)}},{key:"symbol",get:function(){return tB()}}]),e}();function h8(e){var t;return e===void 0&&(e={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),(t=function(n){function o(){return n.apply(this,arguments)||this}return s8(o,n),a8(o,null,[{key:"sensibleDefaults",get:function(){return Ld({},this.defaults)},set:function(r){this.defaults=r!==!1?Ld({},r!==!0?r:e):{}}}]),o}($r)).defaults=Ld({},e),t}$r.defaults={},$r.custom=nB,$r.oneOf=oB,$r.instanceOf=lB,$r.oneOfType=rB,$r.arrayOf=iB,$r.objectOf=aB,$r.shape=sB,$r.utils={validate:function(e,t){return ia(t,e)===!0},toType:function(e,t,n){return n===void 0&&(n=!1),n?Nr(e,t):_o(e,t)}};(function(e){function t(){return e.apply(this,arguments)||this}return s8(t,e),t})(h8());const W=h8({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});W.extend([{name:"looseBool",getter:!0,type:Boolean,default:void 0},{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VueNode",getter:!0,type:null}]);function g8(e){return e.default=void 0,e}const It=(e,t,n)=>{qb(e,`[ant-design-vue: ${t}] ${n}`)};function cB(){return window}function BC(e,t){if(!e.getClientRects().length)return 0;const n=e.getBoundingClientRect();return n.width||n.height?t===window?(t=e.ownerDocument.documentElement,n.top-t.clientTop):n.top-t.getBoundingClientRect().top:n.top}const LC=/#([\S ]+)$/,uB=()=>({prefixCls:String,offsetTop:Number,bounds:Number,affix:{type:Boolean,default:!0},showInkInFixed:{type:Boolean,default:!1},getContainer:Function,wrapperClass:String,wrapperStyle:{type:Object,default:void 0},getCurrentAnchor:Function,targetOffset:Number,items:ut(),direction:W.oneOf(["vertical","horizontal"]).def("vertical"),onChange:Function,onClick:Function}),xl=re({compatConfig:{MODE:3},name:"AAnchor",inheritAttrs:!1,props:uB(),setup(e,t){let{emit:n,attrs:o,slots:r,expose:i}=t;const{prefixCls:l,getTargetContainer:a,direction:s}=Ee("anchor",e),c=I(()=>{var w;return(w=e.direction)!==null&&w!==void 0?w:"vertical"}),u=ie(null),d=ie(),f=ft({links:[],scrollContainer:null,scrollEvent:null,animating:!1}),h=ie(null),m=I(()=>{const{getContainer:w}=e;return w||(a==null?void 0:a.value)||cB}),g=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5;const T=[],M=m.value();return f.links.forEach(E=>{const A=LC.exec(E.toString());if(!A)return;const R=document.getElementById(A[1]);if(R){const F=BC(R,M);FR.top>A.top?R:A).link:""},y=w=>{const{getCurrentAnchor:P}=e;h.value!==w&&(h.value=typeof P=="function"?P(w):w,n("change",w))},b=w=>{const{offsetTop:P,targetOffset:T}=e;y(w);const M=LC.exec(w);if(!M)return;const E=document.getElementById(M[1]);if(!E)return;const A=m.value(),R=ny(A),F=BC(E,A);let _=R+F;_-=T!==void 0?T:P||0,f.animating=!0,oy(_,{callback:()=>{f.animating=!1},getContainer:m.value})};i({scrollTo:b});const S=()=>{if(f.animating)return;const{offsetTop:w,bounds:P,targetOffset:T}=e,M=g(T!==void 0?T:w||0,P);y(M)},$=()=>{const w=d.value.querySelector(`.${l.value}-link-title-active`);if(w&&u.value){const P=c.value==="horizontal";u.value.style.top=P?"":`${w.offsetTop+w.clientHeight/2}px`,u.value.style.height=P?"":`${w.clientHeight}px`,u.value.style.left=P?`${w.offsetLeft}px`:"",u.value.style.width=P?`${w.clientWidth}px`:"",P&&i8(w,{scrollMode:"if-needed",block:"nearest"})}};LN({registerLink:w=>{f.links.includes(w)||f.links.push(w)},unregisterLink:w=>{const P=f.links.indexOf(w);P!==-1&&f.links.splice(P,1)},activeLink:h,scrollTo:b,handleClick:(w,P)=>{n("click",w,P)},direction:c}),Ue(()=>{lt(()=>{const w=m.value();f.scrollContainer=w,f.scrollEvent=Dt(f.scrollContainer,"scroll",S),S()})}),tt(()=>{f.scrollEvent&&f.scrollEvent.remove()}),Vn(()=>{if(f.scrollEvent){const w=m.value();f.scrollContainer!==w&&(f.scrollContainer=w,f.scrollEvent.remove(),f.scrollEvent=Dt(f.scrollContainer,"scroll",S),S())}$()});const x=w=>Array.isArray(w)?w.map(P=>{const{children:T,key:M,href:E,target:A,class:R,style:F,title:_}=P;return p(ry,{key:M,href:E,target:A,class:R,style:F,title:_,customTitleProps:P},{default:()=>[c.value==="vertical"?x(T):null],customTitle:r.customTitle})}):null,[C,O]=HN(l);return()=>{var w;const{offsetTop:P,affix:T,showInkInFixed:M}=e,E=l.value,A=ce(`${E}-ink`,{[`${E}-ink-visible`]:h.value}),R=ce(O.value,e.wrapperClass,`${E}-wrapper`,{[`${E}-wrapper-horizontal`]:c.value==="horizontal",[`${E}-rtl`]:s.value==="rtl"}),F=ce(E,{[`${E}-fixed`]:!T&&!M}),_=v({maxHeight:P?`calc(100vh - ${P}px)`:"100vh"},e.wrapperStyle),N=p("div",{class:R,style:_,ref:d},[p("div",{class:F},[p("span",{class:A,ref:u},null),Array.isArray(e.items)?x(e.items):(w=r.default)===null||w===void 0?void 0:w.call(r)])]);return C(T?p(o8,D(D({},o),{},{offsetTop:P,target:m.value}),{default:()=>[N]}):N)}}});xl.Link=ry;xl.install=function(e){return e.component(xl.name,xl),e.component(xl.Link.name,xl.Link),e};function kC(e,t){const{key:n}=e;let o;return"value"in e&&({value:o}=e),n??(o!==void 0?o:`rc-index-key-${t}`)}function m8(e,t){const{label:n,value:o,options:r}=e||{};return{label:n||(t?"children":"label"),value:o||"value",options:r||"options"}}function dB(e){let{fieldNames:t,childrenAsData:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=[],{label:r,value:i,options:l}=m8(t,!1);function a(s,c){s.forEach(u=>{const d=u[r];if(c||!(l in u)){const f=u[i];o.push({key:kC(u,o.length),groupOption:c,data:u,label:d,value:f})}else{let f=d;f===void 0&&n&&(f=u.label),o.push({key:kC(u,o.length),group:!0,data:u,label:f}),a(u[l],!0)}})}return a(e,!1),o}function Qv(e){const t=v({},e);return"props"in t||Object.defineProperty(t,"props",{get(){return t}}),t}function fB(e,t){if(!t||!t.length)return null;let n=!1;function o(i,l){let[a,...s]=l;if(!a)return[i];const c=i.split(a);return n=n||c.length>1,c.reduce((u,d)=>[...u,...o(d,s)],[]).filter(u=>u)}const r=o(e,t);return n?r:null}function pB(){return""}function hB(e){return e?e.ownerDocument:window.document}function v8(){}const b8=()=>({action:W.oneOfType([W.string,W.arrayOf(W.string)]).def([]),showAction:W.any.def([]),hideAction:W.any.def([]),getPopupClassNameFromAlign:W.any.def(pB),onPopupVisibleChange:Function,afterPopupVisibleChange:W.func.def(v8),popup:W.any,arrow:W.bool.def(!0),popupStyle:{type:Object,default:void 0},prefixCls:W.string.def("rc-trigger-popup"),popupClassName:W.string.def(""),popupPlacement:String,builtinPlacements:W.object,popupTransitionName:String,popupAnimation:W.any,mouseEnterDelay:W.number.def(0),mouseLeaveDelay:W.number.def(.1),zIndex:Number,focusDelay:W.number.def(0),blurDelay:W.number.def(.15),getPopupContainer:Function,getDocument:W.func.def(hB),forceRender:{type:Boolean,default:void 0},destroyPopupOnHide:{type:Boolean,default:!1},mask:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},popupAlign:W.object.def(()=>({})),popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},maskTransitionName:String,maskAnimation:String,stretch:String,alignPoint:{type:Boolean,default:void 0},autoDestroy:{type:Boolean,default:!1},mobile:Object,getTriggerDOMNode:Function}),ly={visible:Boolean,prefixCls:String,zIndex:Number,destroyPopupOnHide:Boolean,forceRender:Boolean,arrow:{type:Boolean,default:!0},animation:[String,Object],transitionName:String,stretch:{type:String},align:{type:Object},point:{type:Object},getRootDomNode:{type:Function},getClassNameFromAlign:{type:Function},onAlign:{type:Function},onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function},onTouchstart:{type:Function}},gB=v(v({},ly),{mobile:{type:Object}}),mB=v(v({},ly),{mask:Boolean,mobile:{type:Object},maskAnimation:String,maskTransitionName:String});function ay(e){let{prefixCls:t,animation:n,transitionName:o}=e;return n?{name:`${t}-${n}`}:o?{name:o}:{}}function y8(e){const{prefixCls:t,visible:n,zIndex:o,mask:r,maskAnimation:i,maskTransitionName:l}=e;if(!r)return null;let a={};return(l||i)&&(a=ay({prefixCls:t,transitionName:l,animation:i})),p(rn,D({appear:!0},a),{default:()=>[_n(p("div",{style:{zIndex:o},class:`${t}-mask`},null),[[N7("if"),n]])]})}y8.displayName="Mask";const vB=re({compatConfig:{MODE:3},name:"MobilePopupInner",inheritAttrs:!1,props:gB,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup(e,t){let{expose:n,slots:o}=t;const r=ie();return n({forceAlign:()=>{},getElement:()=>r.value}),()=>{var i;const{zIndex:l,visible:a,prefixCls:s,mobile:{popupClassName:c,popupStyle:u,popupMotion:d={},popupRender:f}={}}=e,h=v({zIndex:l},u);let m=xt((i=o.default)===null||i===void 0?void 0:i.call(o));m.length>1&&(m=p("div",{class:`${s}-content`},[m])),f&&(m=f(m));const g=ce(s,c);return p(rn,D({ref:r},d),{default:()=>[a?p("div",{class:g,style:h},[m]):null]})}}});var bB=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(l){l(i)})}return new(n||(n=Promise))(function(i,l){function a(u){try{c(o.next(u))}catch(d){l(d)}}function s(u){try{c(o.throw(u))}catch(d){l(d)}}function c(u){u.done?i(u.value):r(u.value).then(a,s)}c((o=o.apply(e,t||[])).next())})};const FC=["measure","align",null,"motion"],yB=(e,t)=>{const n=oe(null),o=oe(),r=oe(!1);function i(s){r.value||(n.value=s)}function l(){Qe.cancel(o.value)}function a(s){l(),o.value=Qe(()=>{let c=n.value;switch(n.value){case"align":c="motion";break;case"motion":c="stable";break}i(c),s==null||s()})}return Se(e,()=>{i("measure")},{immediate:!0,flush:"post"}),Ue(()=>{Se(n,()=>{switch(n.value){case"measure":t();break}n.value&&(o.value=Qe(()=>bB(void 0,void 0,void 0,function*(){const s=FC.indexOf(n.value),c=FC[s+1];c&&s!==-1&&i(c)})))},{immediate:!0,flush:"post"})}),tt(()=>{r.value=!0,l()}),[n,a]},SB=e=>{const t=oe({width:0,height:0});function n(r){t.value={width:r.offsetWidth,height:r.offsetHeight}}return[I(()=>{const r={};if(e.value){const{width:i,height:l}=t.value;e.value.indexOf("height")!==-1&&l?r.height=`${l}px`:e.value.indexOf("minHeight")!==-1&&l&&(r.minHeight=`${l}px`),e.value.indexOf("width")!==-1&&i?r.width=`${i}px`:e.value.indexOf("minWidth")!==-1&&i&&(r.minWidth=`${i}px`)}return r}),n]};function zC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function HC(e){for(var t=1;t=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function VB(e,t,n,o){var r=pt.clone(e),i={width:t.width,height:t.height};return o.adjustX&&r.left=n.left&&r.left+i.width>n.right&&(i.width-=r.left+i.width-n.right),o.adjustX&&r.left+i.width>n.right&&(r.left=Math.max(n.right-i.width,n.left)),o.adjustY&&r.top=n.top&&r.top+i.height>n.bottom&&(i.height-=r.top+i.height-n.bottom),o.adjustY&&r.top+i.height>n.bottom&&(r.top=Math.max(n.bottom-i.height,n.top)),pt.mix(r,i)}function dy(e){var t,n,o;if(!pt.isWindow(e)&&e.nodeType!==9)t=pt.offset(e),n=pt.outerWidth(e),o=pt.outerHeight(e);else{var r=pt.getWindow(e);t={left:pt.getWindowScrollLeft(r),top:pt.getWindowScrollTop(r)},n=pt.viewportWidth(r),o=pt.viewportHeight(r)}return t.width=n,t.height=o,t}function YC(e,t){var n=t.charAt(0),o=t.charAt(1),r=e.width,i=e.height,l=e.left,a=e.top;return n==="c"?a+=i/2:n==="b"&&(a+=i),o==="c"?l+=r/2:o==="r"&&(l+=r),{left:l,top:a}}function ad(e,t,n,o,r){var i=YC(t,n[1]),l=YC(e,n[0]),a=[l.left-i.left,l.top-i.top];return{left:Math.round(e.left-a[0]+o[0]-r[0]),top:Math.round(e.top-a[1]+o[1]-r[1])}}function qC(e,t,n){return e.leftn.right}function ZC(e,t,n){return e.topn.bottom}function WB(e,t,n){return e.left>n.right||e.left+t.widthn.bottom||e.top+t.height=n.right||o.top>=n.bottom}function fy(e,t,n){var o=n.target||t,r=dy(o),i=!UB(o,n.overflow&&n.overflow.alwaysByViewport);return I8(e,r,n,i)}fy.__getOffsetParent=o0;fy.__getVisibleRectForElement=uy;function GB(e,t,n){var o,r,i=pt.getDocument(e),l=i.defaultView||i.parentWindow,a=pt.getWindowScrollLeft(l),s=pt.getWindowScrollTop(l),c=pt.viewportWidth(l),u=pt.viewportHeight(l);"pageX"in t?o=t.pageX:o=a+t.clientX,"pageY"in t?r=t.pageY:r=s+t.clientY;var d={left:o,top:r,width:0,height:0},f=o>=0&&o<=a+c&&r>=0&&r<=s+u,h=[n.points[0],"cc"];return I8(e,d,HC(HC({},n),{},{points:h}),f)}function ht(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,r=e;if(Array.isArray(e)&&(r=Nt(e)[0]),!r)return null;const i=bn(r,t,o);return i.props=n?v(v({},i.props),t):i.props,Eo(typeof i.props.class!="object"),i}function XB(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e.map(o=>ht(o,t,n))}function gc(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Array.isArray(e))return e.map(r=>gc(r,t,n,o));{if(!Yt(e))return e;const r=ht(e,t,n,o);return Array.isArray(r.children)&&(r.children=gc(r.children)),r}}function YB(e,t,n){Xi(bn(e,v({},t)),n)}const T8=e=>(e||[]).some(t=>Yt(t)?!(t.type===xn||t.type===He&&!T8(t.children)):!0)?e:null;function gh(e,t,n,o){var r;const i=(r=e[t])===null||r===void 0?void 0:r.call(e,n);return T8(i)?i:o==null?void 0:o()}const mh=e=>{if(!e)return!1;if(e.offsetParent)return!0;if(e.getBBox){const t=e.getBBox();if(t.width||t.height)return!0}if(e.getBoundingClientRect){const t=e.getBoundingClientRect();if(t.width||t.height)return!0}return!1};function qB(e,t){return e===t?!0:!e||!t?!1:"pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t?e.clientX===t.clientX&&e.clientY===t.clientY:!1}function ZB(e,t){e!==document.activeElement&&Ni(t,e)&&typeof e.focus=="function"&&e.focus()}function ex(e,t){let n=null,o=null;function r(l){let[{target:a}]=l;if(!document.documentElement.contains(a))return;const{width:s,height:c}=a.getBoundingClientRect(),u=Math.floor(s),d=Math.floor(c);(n!==u||o!==d)&&Promise.resolve().then(()=>{t({width:u,height:d})}),n=u,o=d}const i=new Wb(r);return e&&i.observe(e),()=>{i.disconnect()}}const JB=(e,t)=>{let n=!1,o=null;function r(){clearTimeout(o)}function i(l){if(!n||l===!0){if(e()===!1)return;n=!0,r(),o=setTimeout(()=>{n=!1},t.value)}else r(),o=setTimeout(()=>{n=!1,i()},t.value)}return[i,()=>{n=!1,r()}]};function QB(){this.__data__=[],this.size=0}function py(e,t){return e===t||e!==e&&t!==t}function vh(e,t){for(var n=e.length;n--;)if(py(e[n][0],t))return n;return-1}var eL=Array.prototype,tL=eL.splice;function nL(e){var t=this.__data__,n=vh(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():tL.call(t,n,1),--this.size,!0}function oL(e){var t=this.__data__,n=vh(t,e);return n<0?void 0:t[n][1]}function rL(e){return vh(this.__data__,e)>-1}function iL(e,t){var n=this.__data__,o=vh(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}function vi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ta))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,h=n&ik?new ds:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=Rk}var Dk="[object Arguments]",Nk="[object Array]",Bk="[object Boolean]",Lk="[object Date]",kk="[object Error]",Fk="[object Function]",zk="[object Map]",Hk="[object Number]",jk="[object Object]",Vk="[object RegExp]",Wk="[object Set]",Kk="[object String]",Uk="[object WeakMap]",Gk="[object ArrayBuffer]",Xk="[object DataView]",Yk="[object Float32Array]",qk="[object Float64Array]",Zk="[object Int8Array]",Jk="[object Int16Array]",Qk="[object Int32Array]",eF="[object Uint8Array]",tF="[object Uint8ClampedArray]",nF="[object Uint16Array]",oF="[object Uint32Array]",zt={};zt[Yk]=zt[qk]=zt[Zk]=zt[Jk]=zt[Qk]=zt[eF]=zt[tF]=zt[nF]=zt[oF]=!0;zt[Dk]=zt[Nk]=zt[Gk]=zt[Bk]=zt[Xk]=zt[Lk]=zt[kk]=zt[Fk]=zt[zk]=zt[Hk]=zt[jk]=zt[Vk]=zt[Wk]=zt[Kk]=zt[Uk]=!1;function rF(e){return fr(e)&&by(e.length)&&!!zt[Qi(e)]}function yy(e){return function(t){return e(t)}}var L8=typeof exports=="object"&&exports&&!exports.nodeType&&exports,mc=L8&&typeof module=="object"&&module&&!module.nodeType&&module,iF=mc&&mc.exports===L8,um=iF&&E8.process,fs=function(){try{var e=mc&&mc.require&&mc.require("util").types;return e||um&&um.binding&&um.binding("util")}catch{}}(),sx=fs&&fs.isTypedArray,Sy=sx?yy(sx):rF,lF=Object.prototype,aF=lF.hasOwnProperty;function k8(e,t){var n=Mo(e),o=!n&&yh(e),r=!n&&!o&&Xc(e),i=!n&&!o&&!r&&Sy(e),l=n||o||r||i,a=l?wk(e.length,String):[],s=a.length;for(var c in e)(t||aF.call(e,c))&&!(l&&(c=="length"||r&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||vy(c,s)))&&a.push(c);return a}var sF=Object.prototype;function Sh(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||sF;return e===n}function F8(e,t){return function(n){return e(t(n))}}var cF=F8(Object.keys,Object),uF=Object.prototype,dF=uF.hasOwnProperty;function z8(e){if(!Sh(e))return cF(e);var t=[];for(var n in Object(e))dF.call(e,n)&&n!="constructor"&&t.push(n);return t}function ys(e){return e!=null&&by(e.length)&&!M8(e)}function Ss(e){return ys(e)?k8(e):z8(e)}function r0(e){return R8(e,Ss,my)}var fF=1,pF=Object.prototype,hF=pF.hasOwnProperty;function gF(e,t,n,o,r,i){var l=n&fF,a=r0(e),s=a.length,c=r0(t),u=c.length;if(s!=u&&!l)return!1;for(var d=s;d--;){var f=a[d];if(!(l?f in t:hF.call(t,f)))return!1}var h=i.get(e),m=i.get(t);if(h&&m)return h==t&&m==e;var g=!0;i.set(e,t),i.set(t,e);for(var y=l;++d{const{disabled:f,target:h,align:m,onAlign:g}=e;if(!f&&h&&i.value){const y=i.value;let b;const S=vx(h),$=bx(h);r.value.element=S,r.value.point=$,r.value.align=m;const{activeElement:x}=document;return S&&mh(S)?b=fy(y,S,m):$&&(b=GB(y,$,m)),ZB(x,y),g&&b&&g(y,b),!0}return!1},I(()=>e.monitorBufferTime)),s=ie({cancel:()=>{}}),c=ie({cancel:()=>{}}),u=()=>{const f=e.target,h=vx(f),m=bx(f);i.value!==c.value.element&&(c.value.cancel(),c.value.element=i.value,c.value.cancel=ex(i.value,l)),(r.value.element!==h||!qB(r.value.point,m)||!$y(r.value.align,e.align))&&(l(),s.value.element!==h&&(s.value.cancel(),s.value.element=h,s.value.cancel=ex(h,l)))};Ue(()=>{lt(()=>{u()})}),Vn(()=>{lt(()=>{u()})}),Se(()=>e.disabled,f=>{f?a():l()},{immediate:!0,flush:"post"});const d=ie(null);return Se(()=>e.monitorWindowResize,f=>{f?d.value||(d.value=Dt(window,"resize",l)):d.value&&(d.value.remove(),d.value=null)},{flush:"post"}),Wn(()=>{s.value.cancel(),c.value.cancel(),d.value&&d.value.remove(),a()}),n({forceAlign:()=>l(!0)}),()=>{const f=o==null?void 0:o.default();return f?ht(f[0],{ref:i},!0,!0):null}}});Mn("bottomLeft","bottomRight","topLeft","topRight");const Cy=e=>e!==void 0&&(e==="topLeft"||e==="topRight")?"slide-down":"slide-up",qo=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return v(e?{name:e,appear:!0,enterFromClass:`${e}-enter ${e}-enter-prepare ${e}-enter-start`,enterActiveClass:`${e}-enter ${e}-enter-prepare`,enterToClass:`${e}-enter ${e}-enter-active`,leaveFromClass:` ${e}-leave`,leaveActiveClass:`${e}-leave ${e}-leave-active`,leaveToClass:`${e}-leave ${e}-leave-active`}:{css:!1},t)},Ch=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return v(e?{name:e,appear:!0,appearActiveClass:`${e}`,appearToClass:`${e}-appear ${e}-appear-active`,enterFromClass:`${e}-appear ${e}-enter ${e}-appear-prepare ${e}-enter-prepare`,enterActiveClass:`${e}`,enterToClass:`${e}-enter ${e}-appear ${e}-appear-active ${e}-enter-active`,leaveActiveClass:`${e} ${e}-leave`,leaveToClass:`${e}-leave-active`}:{css:!1},t)},jn=(e,t,n)=>n!==void 0?n:`${e}-${t}`,IF=re({compatConfig:{MODE:3},name:"PopupInner",inheritAttrs:!1,props:ly,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup(e,t){let{expose:n,attrs:o,slots:r}=t;const i=oe(),l=oe(),a=oe(),[s,c]=SB(We(e,"stretch")),u=()=>{e.stretch&&c(e.getRootDomNode())},d=oe(!1);let f;Se(()=>e.visible,O=>{clearTimeout(f),O?f=setTimeout(()=>{d.value=e.visible}):d.value=!1},{immediate:!0});const[h,m]=yB(d,u),g=oe(),y=()=>e.point?e.point:e.getRootDomNode,b=()=>{var O;(O=i.value)===null||O===void 0||O.forceAlign()},S=(O,w)=>{var P;const T=e.getClassNameFromAlign(w),M=a.value;a.value!==T&&(a.value=T),h.value==="align"&&(M!==T?Promise.resolve().then(()=>{b()}):m(()=>{var E;(E=g.value)===null||E===void 0||E.call(g)}),(P=e.onAlign)===null||P===void 0||P.call(e,O,w))},$=I(()=>{const O=typeof e.animation=="object"?e.animation:ay(e);return["onAfterEnter","onAfterLeave"].forEach(w=>{const P=O[w];O[w]=T=>{m(),h.value="stable",P==null||P(T)}}),O}),x=()=>new Promise(O=>{g.value=O});Se([$,h],()=>{!$.value&&h.value==="motion"&&m()},{immediate:!0}),n({forceAlign:b,getElement:()=>l.value.$el||l.value});const C=I(()=>{var O;return!(!((O=e.align)===null||O===void 0)&&O.points&&(h.value==="align"||h.value==="stable"))});return()=>{var O;const{zIndex:w,align:P,prefixCls:T,destroyPopupOnHide:M,onMouseenter:E,onMouseleave:A,onTouchstart:R=()=>{},onMousedown:F}=e,_=h.value,N=[v(v({},s.value),{zIndex:w,opacity:_==="motion"||_==="stable"||!d.value?null:0,pointerEvents:!d.value&&_!=="stable"?"none":null}),o.style];let B=xt((O=r.default)===null||O===void 0?void 0:O.call(r,{visible:e.visible}));B.length>1&&(B=p("div",{class:`${T}-content`},[B]));const L=ce(T,o.class,a.value,!e.arrow&&`${T}-arrow-hidden`),z=d.value||!e.visible?qo($.value.name,$.value):{};return p(rn,D(D({ref:l},z),{},{onBeforeEnter:x}),{default:()=>!M||e.visible?_n(p(PF,{target:y(),key:"popup",ref:i,monitorWindowResize:!0,disabled:C.value,align:P,onAlign:S},{default:()=>p("div",{class:L,onMouseenter:E,onMouseleave:A,onMousedown:tC(F,["capture"]),[nn?"onTouchstartPassive":"onTouchstart"]:tC(R,["capture"]),style:N},[B])}),[[oo,d.value]]):null})}}}),TF=re({compatConfig:{MODE:3},name:"Popup",inheritAttrs:!1,props:mB,setup(e,t){let{attrs:n,slots:o,expose:r}=t;const i=oe(!1),l=oe(!1),a=oe(),s=oe();return Se([()=>e.visible,()=>e.mobile],()=>{i.value=e.visible,e.visible&&e.mobile&&(l.value=!0)},{immediate:!0,flush:"post"}),r({forceAlign:()=>{var c;(c=a.value)===null||c===void 0||c.forceAlign()},getElement:()=>{var c;return(c=a.value)===null||c===void 0?void 0:c.getElement()}}),()=>{const c=v(v(v({},e),n),{visible:i.value}),u=l.value?p(vB,D(D({},c),{},{mobile:e.mobile,ref:a}),{default:o.default}):p(IF,D(D({},c),{},{ref:a}),{default:o.default});return p("div",{ref:s},[p(y8,c,null),u])}}});function EF(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function yx(e,t,n){const o=e[t]||{};return v(v({},o),n)}function _F(e,t,n,o){const{points:r}=n,i=Object.keys(e);for(let l=0;l0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=typeof e=="function"?e(this.$data,this.$props):e;if(this.getDerivedStateFromProps){const o=this.getDerivedStateFromProps(p6(this),v(v({},this.$data),n));if(o===null)return;n=v(v({},n),o||{})}v(this.$data,n),this._.isMounted&&this.$forceUpdate(),lt(()=>{t&&t()})},__emit(){const e=[].slice.call(arguments,0);let t=e[0];t=`on${t[0].toUpperCase()}${t.substring(1)}`;const n=this.$props[t]||this.$attrs[t];if(e.length&&n)if(Array.isArray(n))for(let o=0,r=n.length;o1&&arguments[1]!==void 0?arguments[1]:{inTriggerContext:!0};qe(H8,{inTriggerContext:t.inTriggerContext,shouldRender:I(()=>{const{sPopupVisible:n,popupRef:o,forceRender:r,autoDestroy:i}=e||{};let l=!1;return(n||o||r)&&(l=!0),!n&&i&&(l=!1),l})})},MF=()=>{xy({},{inTriggerContext:!1});const e=Ke(H8,{shouldRender:I(()=>!1),inTriggerContext:!1});return{shouldRender:I(()=>e.shouldRender.value||e.inTriggerContext===!1)}},j8=re({compatConfig:{MODE:3},name:"Portal",inheritAttrs:!1,props:{getContainer:W.func.isRequired,didUpdate:Function},setup(e,t){let{slots:n}=t,o=!0,r;const{shouldRender:i}=MF();function l(){i.value&&(r=e.getContainer())}Qp(()=>{o=!1,l()}),Ue(()=>{r||l()});const a=Se(i,()=>{i.value&&!r&&(r=e.getContainer()),r&&a()});return Vn(()=>{lt(()=>{var s;i.value&&((s=e.didUpdate)===null||s===void 0||s.call(e,e))})}),()=>{var s;return i.value?o?(s=n.default)===null||s===void 0?void 0:s.call(n):r?p(Db,{to:r},n):null:null}}});let dm;function Gf(e){if(typeof document>"u")return 0;if(dm===void 0){const t=document.createElement("div");t.style.width="100%",t.style.height="200px";const n=document.createElement("div"),o=n.style;o.position="absolute",o.top="0",o.left="0",o.pointerEvents="none",o.visibility="hidden",o.width="200px",o.height="150px",o.overflow="hidden",n.appendChild(t),document.body.appendChild(n);const r=t.offsetWidth;n.style.overflow="scroll";let i=t.offsetWidth;r===i&&(i=n.clientWidth),document.body.removeChild(n),dm=r-i}return dm}function Sx(e){const t=e.match(/^(.*)px$/),n=Number(t==null?void 0:t[1]);return Number.isNaN(n)?Gf():n}function AF(e){if(typeof document>"u"||!e||!(e instanceof Element))return{width:0,height:0};const{width:t,height:n}=getComputedStyle(e,"::-webkit-scrollbar");return{width:Sx(t),height:Sx(n)}}const RF=`vc-util-locker-${Date.now()}`;let $x=0;function DF(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}function NF(e){const t=I(()=>!!e&&!!e.value);$x+=1;const n=`${RF}_${$x}`;je(o=>{if(Hn()){if(t.value){const r=Gf(),i=DF();Hc(` +html body { + overflow-y: hidden; + ${i?`width: calc(100% - ${r}px);`:""} +}`,n)}else zf(n);o(()=>{zf(n)})}},{flush:"post"})}let fl=0;const kd=Hn(),Cx=e=>{if(!kd)return null;if(e){if(typeof e=="string")return document.querySelectorAll(e)[0];if(typeof e=="function")return e();if(typeof e=="object"&&e instanceof window.HTMLElement)return e}return document.body},gu=re({compatConfig:{MODE:3},name:"PortalWrapper",inheritAttrs:!1,props:{wrapperClassName:String,forceRender:{type:Boolean,default:void 0},getContainer:W.any,visible:{type:Boolean,default:void 0},autoLock:Ce(),didUpdate:Function},setup(e,t){let{slots:n}=t;const o=oe(),r=oe(),i=oe(),l=oe(1),a=Hn()&&document.createElement("div"),s=()=>{var h,m;o.value===a&&((m=(h=o.value)===null||h===void 0?void 0:h.parentNode)===null||m===void 0||m.removeChild(o.value)),o.value=null};let c=null;const u=function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)||o.value&&!o.value.parentNode?(c=Cx(e.getContainer),c?(c.appendChild(o.value),!0):!1):!0},d=()=>kd?(o.value||(o.value=a,u(!0)),f(),o.value):null,f=()=>{const{wrapperClassName:h}=e;o.value&&h&&h!==o.value.className&&(o.value.className=h)};return Vn(()=>{f(),u()}),NF(I(()=>e.autoLock&&e.visible&&Hn()&&(o.value===document.body||o.value===a))),Ue(()=>{let h=!1;Se([()=>e.visible,()=>e.getContainer],(m,g)=>{let[y,b]=m,[S,$]=g;kd&&(c=Cx(e.getContainer),c===document.body&&(y&&!S?fl+=1:h&&(fl-=1))),h&&(typeof b=="function"&&typeof $=="function"?b.toString()!==$.toString():b!==$)&&s(),h=!0},{immediate:!0,flush:"post"}),lt(()=>{u()||(i.value=Qe(()=>{l.value+=1}))})}),tt(()=>{const{visible:h}=e;kd&&c===document.body&&(fl=h&&fl?fl-1:fl),s(),Qe.cancel(i.value)}),()=>{const{forceRender:h,visible:m}=e;let g=null;const y={getOpenCount:()=>fl,getContainer:d};return l.value&&(h||m||r.value)&&(g=p(j8,{getContainer:d,ref:r,didUpdate:e.didUpdate},{default:()=>{var b;return(b=n.default)===null||b===void 0?void 0:b.call(n,y)}})),g}}}),BF=["onClick","onMousedown","onTouchstart","onMouseenter","onMouseleave","onFocus","onBlur","onContextmenu"],ca=re({compatConfig:{MODE:3},name:"Trigger",mixins:[sa],inheritAttrs:!1,props:b8(),setup(e){const t=I(()=>{const{popupPlacement:r,popupAlign:i,builtinPlacements:l}=e;return r&&l?yx(l,r,i):i}),n=oe(null),o=r=>{n.value=r};return{vcTriggerContext:Ke("vcTriggerContext",{}),popupRef:n,setPopupRef:o,triggerRef:oe(null),align:t,focusTime:null,clickOutsideHandler:null,contextmenuOutsideHandler1:null,contextmenuOutsideHandler2:null,touchOutsideHandler:null,attachId:null,delayTimer:null,hasPopupMouseDown:!1,preClickTime:null,preTouchTime:null,mouseDownTimeout:null,childOriginEvents:{}}},data(){const e=this.$props;let t;return this.popupVisible!==void 0?t=!!e.popupVisible:t=!!e.defaultPopupVisible,BF.forEach(n=>{this[`fire${n}`]=o=>{this.fireEvents(n,o)}}),{prevPopupVisible:t,sPopupVisible:t,point:null}},watch:{popupVisible(e){e!==void 0&&(this.prevPopupVisible=this.sPopupVisible,this.sPopupVisible=e)}},created(){qe("vcTriggerContext",{onPopupMouseDown:this.onPopupMouseDown,onPopupMouseenter:this.onPopupMouseenter,onPopupMouseleave:this.onPopupMouseleave}),xy(this)},deactivated(){this.setPopupVisible(!1)},mounted(){this.$nextTick(()=>{this.updatedCal()})},updated(){this.$nextTick(()=>{this.updatedCal()})},beforeUnmount(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Qe.cancel(this.attachId)},methods:{updatedCal(){const e=this.$props;if(this.$data.sPopupVisible){let n;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextmenuToShow())&&(n=e.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Dt(n,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(n=n||e.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Dt(n,"touchstart",this.onDocumentClick,nn?{passive:!1}:!1)),!this.contextmenuOutsideHandler1&&this.isContextmenuToShow()&&(n=n||e.getDocument(this.getRootDomNode()),this.contextmenuOutsideHandler1=Dt(n,"scroll",this.onContextmenuClose)),!this.contextmenuOutsideHandler2&&this.isContextmenuToShow()&&(this.contextmenuOutsideHandler2=Dt(window,"blur",this.onContextmenuClose))}else this.clearOutsideHandler()},onMouseenter(e){const{mouseEnterDelay:t}=this.$props;this.fireEvents("onMouseenter",e),this.delaySetPopupVisible(!0,t,t?null:e)},onMouseMove(e){this.fireEvents("onMousemove",e),this.setPoint(e)},onMouseleave(e){this.fireEvents("onMouseleave",e),this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay)},onPopupMouseenter(){const{vcTriggerContext:e={}}=this;e.onPopupMouseenter&&e.onPopupMouseenter(),this.clearDelayTimer()},onPopupMouseleave(e){var t;if(e&&e.relatedTarget&&!e.relatedTarget.setTimeout&&Ni((t=this.popupRef)===null||t===void 0?void 0:t.getElement(),e.relatedTarget))return;this.isMouseLeaveToHide()&&this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay);const{vcTriggerContext:n={}}=this;n.onPopupMouseleave&&n.onPopupMouseleave(e)},onFocus(e){this.fireEvents("onFocus",e),this.clearDelayTimer(),this.isFocusToShow()&&(this.focusTime=Date.now(),this.delaySetPopupVisible(!0,this.$props.focusDelay))},onMousedown(e){this.fireEvents("onMousedown",e),this.preClickTime=Date.now()},onTouchstart(e){this.fireEvents("onTouchstart",e),this.preTouchTime=Date.now()},onBlur(e){Ni(e.target,e.relatedTarget||document.activeElement)||(this.fireEvents("onBlur",e),this.clearDelayTimer(),this.isBlurToHide()&&this.delaySetPopupVisible(!1,this.$props.blurDelay))},onContextmenu(e){e.preventDefault(),this.fireEvents("onContextmenu",e),this.setPopupVisible(!0,e)},onContextmenuClose(){this.isContextmenuToShow()&&this.close()},onClick(e){if(this.fireEvents("onClick",e),this.focusTime){let n;if(this.preClickTime&&this.preTouchTime?n=Math.min(this.preClickTime,this.preTouchTime):this.preClickTime?n=this.preClickTime:this.preTouchTime&&(n=this.preTouchTime),Math.abs(n-this.focusTime)<20)return;this.focusTime=0}this.preClickTime=0,this.preTouchTime=0,this.isClickToShow()&&(this.isClickToHide()||this.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault(),e&&e.domEvent&&e.domEvent.preventDefault();const t=!this.$data.sPopupVisible;(this.isClickToHide()&&!t||t&&this.isClickToShow())&&this.setPopupVisible(!this.$data.sPopupVisible,e)},onPopupMouseDown(){const{vcTriggerContext:e={}}=this;this.hasPopupMouseDown=!0,clearTimeout(this.mouseDownTimeout),this.mouseDownTimeout=setTimeout(()=>{this.hasPopupMouseDown=!1},0),e.onPopupMouseDown&&e.onPopupMouseDown(...arguments)},onDocumentClick(e){if(this.$props.mask&&!this.$props.maskClosable)return;const t=e.target,n=this.getRootDomNode(),o=this.getPopupDomNode();(!Ni(n,t)||this.isContextMenuOnly())&&!Ni(o,t)&&!this.hasPopupMouseDown&&this.delaySetPopupVisible(!1,.1)},getPopupDomNode(){var e;return((e=this.popupRef)===null||e===void 0?void 0:e.getElement())||null},getRootDomNode(){var e,t,n,o;const{getTriggerDOMNode:r}=this.$props;if(r){const i=((t=(e=this.triggerRef)===null||e===void 0?void 0:e.$el)===null||t===void 0?void 0:t.nodeName)==="#comment"?null:to(this.triggerRef);return to(r(i))}try{const i=((o=(n=this.triggerRef)===null||n===void 0?void 0:n.$el)===null||o===void 0?void 0:o.nodeName)==="#comment"?null:to(this.triggerRef);if(i)return i}catch{}return to(this)},handleGetPopupClassFromAlign(e){const t=[],n=this.$props,{popupPlacement:o,builtinPlacements:r,prefixCls:i,alignPoint:l,getPopupClassNameFromAlign:a}=n;return o&&r&&t.push(_F(r,i,e,l)),a&&t.push(a(e)),t.join(" ")},getPopupAlign(){const e=this.$props,{popupPlacement:t,popupAlign:n,builtinPlacements:o}=e;return t&&o?yx(o,t,n):n},getComponent(){const e={};this.isMouseEnterToShow()&&(e.onMouseenter=this.onPopupMouseenter),this.isMouseLeaveToHide()&&(e.onMouseleave=this.onPopupMouseleave),e.onMousedown=this.onPopupMouseDown,e[nn?"onTouchstartPassive":"onTouchstart"]=this.onPopupMouseDown;const{handleGetPopupClassFromAlign:t,getRootDomNode:n,$attrs:o}=this,{prefixCls:r,destroyPopupOnHide:i,popupClassName:l,popupAnimation:a,popupTransitionName:s,popupStyle:c,mask:u,maskAnimation:d,maskTransitionName:f,zIndex:h,stretch:m,alignPoint:g,mobile:y,arrow:b,forceRender:S}=this.$props,{sPopupVisible:$,point:x}=this.$data,C=v(v({prefixCls:r,arrow:b,destroyPopupOnHide:i,visible:$,point:g?x:null,align:this.align,animation:a,getClassNameFromAlign:t,stretch:m,getRootDomNode:n,mask:u,zIndex:h,transitionName:s,maskAnimation:d,maskTransitionName:f,class:l,style:c,onAlign:o.onPopupAlign||v8},e),{ref:this.setPopupRef,mobile:y,forceRender:S});return p(TF,C,{default:this.$slots.popup||(()=>h6(this,"popup"))})},attachParent(e){Qe.cancel(this.attachId);const{getPopupContainer:t,getDocument:n}=this.$props,o=this.getRootDomNode();let r;t?(o||t.length===0)&&(r=t(o)):r=n(this.getRootDomNode()).body,r?r.appendChild(e):this.attachId=Qe(()=>{this.attachParent(e)})},getContainer(){const{$props:e}=this,{getDocument:t}=e,n=t(this.getRootDomNode()).createElement("div");return n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%",this.attachParent(n),n},setPopupVisible(e,t){const{alignPoint:n,sPopupVisible:o,onPopupVisibleChange:r}=this;this.clearDelayTimer(),o!==e&&(Qr(this,"popupVisible")||this.setState({sPopupVisible:e,prevPopupVisible:o}),r&&r(e)),n&&t&&e&&this.setPoint(t)},setPoint(e){const{alignPoint:t}=this.$props;!t||!e||this.setState({point:{pageX:e.pageX,pageY:e.pageY}})},handlePortalUpdate(){this.prevPopupVisible!==this.sPopupVisible&&this.afterPopupVisibleChange(this.sPopupVisible)},delaySetPopupVisible(e,t,n){const o=t*1e3;if(this.clearDelayTimer(),o){const r=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=setTimeout(()=>{this.setPopupVisible(e,r),this.clearDelayTimer()},o)}else this.setPopupVisible(e,n)},clearDelayTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)},clearOutsideHandler(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextmenuOutsideHandler1&&(this.contextmenuOutsideHandler1.remove(),this.contextmenuOutsideHandler1=null),this.contextmenuOutsideHandler2&&(this.contextmenuOutsideHandler2.remove(),this.contextmenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)},createTwoChains(e){let t=()=>{};const n=iC(this);return this.childOriginEvents[e]&&n[e]?this[`fire${e}`]:(t=this.childOriginEvents[e]||n[e]||t,t)},isClickToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("click")!==-1||t.indexOf("click")!==-1},isContextMenuOnly(){const{action:e}=this.$props;return e==="contextmenu"||e.length===1&&e[0]==="contextmenu"},isContextmenuToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("contextmenu")!==-1||t.indexOf("contextmenu")!==-1},isClickToHide(){const{action:e,hideAction:t}=this.$props;return e.indexOf("click")!==-1||t.indexOf("click")!==-1},isMouseEnterToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("hover")!==-1||t.indexOf("mouseenter")!==-1},isMouseLeaveToHide(){const{action:e,hideAction:t}=this.$props;return e.indexOf("hover")!==-1||t.indexOf("mouseleave")!==-1},isFocusToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("focus")!==-1||t.indexOf("focus")!==-1},isBlurToHide(){const{action:e,hideAction:t}=this.$props;return e.indexOf("focus")!==-1||t.indexOf("blur")!==-1},forcePopupAlign(){var e;this.$data.sPopupVisible&&((e=this.popupRef)===null||e===void 0||e.forceAlign())},fireEvents(e,t){this.childOriginEvents[e]&&this.childOriginEvents[e](t);const n=this.$props[e]||this.$attrs[e];n&&n(t)},close(){this.setPopupVisible(!1)}},render(){const{$attrs:e}=this,t=Nt(ih(this)),{alignPoint:n,getPopupContainer:o}=this.$props,r=t[0];this.childOriginEvents=iC(r);const i={key:"trigger"};this.isContextmenuToShow()?i.onContextmenu=this.onContextmenu:i.onContextmenu=this.createTwoChains("onContextmenu"),this.isClickToHide()||this.isClickToShow()?(i.onClick=this.onClick,i.onMousedown=this.onMousedown,i[nn?"onTouchstartPassive":"onTouchstart"]=this.onTouchstart):(i.onClick=this.createTwoChains("onClick"),i.onMousedown=this.createTwoChains("onMousedown"),i[nn?"onTouchstartPassive":"onTouchstart"]=this.createTwoChains("onTouchstart")),this.isMouseEnterToShow()?(i.onMouseenter=this.onMouseenter,n&&(i.onMousemove=this.onMouseMove)):i.onMouseenter=this.createTwoChains("onMouseenter"),this.isMouseLeaveToHide()?i.onMouseleave=this.onMouseleave:i.onMouseleave=this.createTwoChains("onMouseleave"),this.isFocusToShow()||this.isBlurToHide()?(i.onFocus=this.onFocus,i.onBlur=this.onBlur):(i.onFocus=this.createTwoChains("onFocus"),i.onBlur=c=>{c&&(!c.relatedTarget||!Ni(c.target,c.relatedTarget))&&this.createTwoChains("onBlur")(c)});const l=ce(r&&r.props&&r.props.class,e.class);l&&(i.class=l);const a=ht(r,v(v({},i),{ref:"triggerRef"}),!0,!0),s=p(gu,{key:"portal",getContainer:o&&(()=>o(this.getRootDomNode())),didUpdate:this.handlePortalUpdate,visible:this.$data.sPopupVisible},{default:this.getComponent});return p(He,null,[a,s])}});var LF=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}},FF=re({name:"SelectTrigger",inheritAttrs:!1,props:{dropdownAlign:Object,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},dropdownClassName:String,dropdownStyle:W.object,placement:String,empty:{type:Boolean,default:void 0},prefixCls:String,popupClassName:String,animation:String,transitionName:String,getPopupContainer:Function,dropdownRender:Function,containerWidth:Number,dropdownMatchSelectWidth:W.oneOfType([Number,Boolean]).def(!0),popupElement:W.any,direction:String,getTriggerDOMNode:Function,onPopupVisibleChange:Function,onPopupMouseEnter:Function,onPopupFocusin:Function,onPopupFocusout:Function},setup(e,t){let{slots:n,attrs:o,expose:r}=t;const i=I(()=>{const{dropdownMatchSelectWidth:a}=e;return kF(a)}),l=ie();return r({getPopupElement:()=>l.value}),()=>{const a=v(v({},e),o),{empty:s=!1}=a,c=LF(a,["empty"]),{visible:u,dropdownAlign:d,prefixCls:f,popupElement:h,dropdownClassName:m,dropdownStyle:g,direction:y="ltr",placement:b,dropdownMatchSelectWidth:S,containerWidth:$,dropdownRender:x,animation:C,transitionName:O,getPopupContainer:w,getTriggerDOMNode:P,onPopupVisibleChange:T,onPopupMouseEnter:M,onPopupFocusin:E,onPopupFocusout:A}=c,R=`${f}-dropdown`;let F=h;x&&(F=x({menuNode:h,props:e}));const _=C?`${R}-${C}`:O,N=v({minWidth:`${$}px`},g);return typeof S=="number"?N.width=`${S}px`:S&&(N.width=`${$}px`),p(ca,D(D({},e),{},{showAction:T?["click"]:[],hideAction:T?["click"]:[],popupPlacement:b||(y==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:i.value,prefixCls:R,popupTransitionName:_,popupAlign:d,popupVisible:u,getPopupContainer:w,popupClassName:ce(m,{[`${R}-empty`]:s}),popupStyle:N,getTriggerDOMNode:P,onPopupVisibleChange:T}),{default:n.default,popup:()=>p("div",{ref:l,onMouseenter:M,onFocusin:E,onFocusout:A},[F])})}}}),Ie={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},Xl=(e,t)=>{let{slots:n}=t;var o;const{class:r,customizeIcon:i,customizeIconProps:l,onMousedown:a,onClick:s}=e;let c;return typeof i=="function"?c=i(l):c=Yt(i)?bn(i):i,p("span",{class:r,onMousedown:u=>{u.preventDefault(),a&&a(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},[c!==void 0?c:p("span",{class:r.split(/\s+/).map(u=>`${u}-icon`)},[(o=n.default)===null||o===void 0?void 0:o.call(n)])])};Xl.inheritAttrs=!1;Xl.displayName="TransBtn";Xl.props={class:String,customizeIcon:W.any,customizeIconProps:W.any,onMousedown:Function,onClick:Function};var zF=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{o.value&&o.value.focus()},blur:()=>{o.value&&o.value.blur()},input:o,setSelectionRange:(s,c,u)=>{var d;(d=o.value)===null||d===void 0||d.setSelectionRange(s,c,u)},select:()=>{var s;(s=o.value)===null||s===void 0||s.select()},getSelectionStart:()=>{var s;return(s=o.value)===null||s===void 0?void 0:s.selectionStart},getSelectionEnd:()=>{var s;return(s=o.value)===null||s===void 0?void 0:s.selectionEnd},getScrollTop:()=>{var s;return(s=o.value)===null||s===void 0?void 0:s.scrollTop}}),()=>{const{tag:s,value:c}=e,u=zF(e,["tag","value"]);return p(s,D(D({},u),{},{ref:o,value:c}),null)}}});function jF(){const e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function Xf(e){const t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.scrollX||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.scrollY||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}function VF(e){return Array.prototype.slice.apply(e).map(n=>`${n}: ${e.getPropertyValue(n)};`).join("")}function WF(e){return Object.keys(e).reduce((t,n)=>{const o=e[n];return typeof o>"u"||o===null||(t+=`${n}: ${e[n]};`),t},"")}var KF=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.value,a],()=>{a.value||(l.value=e.value)},{immediate:!0});const s=w=>{n("change",w)},c=w=>{a.value=!0,w.target.composing=!0,n("compositionstart",w)},u=w=>{a.value=!1,w.target.composing=!1,n("compositionend",w);const P=document.createEvent("HTMLEvents");P.initEvent("input",!0,!0),w.target.dispatchEvent(P),s(w)},d=w=>{if(a.value&&e.lazy){l.value=w.target.value;return}n("input",w)},f=w=>{n("blur",w)},h=w=>{n("focus",w)},m=()=>{i.value&&i.value.focus()},g=()=>{i.value&&i.value.blur()},y=w=>{n("keydown",w)},b=w=>{n("keyup",w)},S=(w,P,T)=>{var M;(M=i.value)===null||M===void 0||M.setSelectionRange(w,P,T)},$=()=>{var w;(w=i.value)===null||w===void 0||w.select()};r({focus:m,blur:g,input:I(()=>{var w;return(w=i.value)===null||w===void 0?void 0:w.input}),setSelectionRange:S,select:$,getSelectionStart:()=>{var w;return(w=i.value)===null||w===void 0?void 0:w.getSelectionStart()},getSelectionEnd:()=>{var w;return(w=i.value)===null||w===void 0?void 0:w.getSelectionEnd()},getScrollTop:()=>{var w;return(w=i.value)===null||w===void 0?void 0:w.getScrollTop()}});const x=w=>{n("mousedown",w)},C=w=>{n("paste",w)},O=I(()=>e.style&&typeof e.style!="string"?WF(e.style):e.style);return()=>{const{style:w,lazy:P}=e,T=KF(e,["style","lazy"]);return p(HF,D(D(D({},T),o),{},{style:O.value,onInput:d,onChange:s,onBlur:f,onFocus:h,ref:i,value:l.value,onCompositionstart:c,onCompositionend:u,onKeyup:b,onKeydown:y,onPaste:C,onMousedown:x}),null)}}}),UF={inputRef:W.any,prefixCls:String,id:String,inputElement:W.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:W.oneOfType([W.number,W.string]),attrs:W.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},V8=re({compatConfig:{MODE:3},name:"SelectInput",inheritAttrs:!1,props:UF,setup(e){let t=null;const n=Ke("VCSelectContainerEvent");return()=>{var o;const{prefixCls:r,id:i,inputElement:l,disabled:a,tabindex:s,autofocus:c,autocomplete:u,editable:d,activeDescendantId:f,value:h,onKeydown:m,onMousedown:g,onChange:y,onPaste:b,onCompositionstart:S,onCompositionend:$,onFocus:x,onBlur:C,open:O,inputRef:w,attrs:P}=e;let T=l||p($s,null,null);const M=T.props||{},{onKeydown:E,onInput:A,onFocus:R,onBlur:F,onMousedown:_,onCompositionstart:N,onCompositionend:B,style:L}=M;return T=ht(T,v(v(v(v(v({type:"search"},M),{id:i,ref:w,disabled:a,tabindex:s,lazy:!1,autocomplete:u||"off",autofocus:c,class:ce(`${r}-selection-search-input`,(o=T==null?void 0:T.props)===null||o===void 0?void 0:o.class),role:"combobox","aria-expanded":O,"aria-haspopup":"listbox","aria-owns":`${i}_list`,"aria-autocomplete":"list","aria-controls":`${i}_list`,"aria-activedescendant":f}),P),{value:d?h:"",readonly:!d,unselectable:d?null:"on",style:v(v({},L),{opacity:d?null:0}),onKeydown:k=>{m(k),E&&E(k)},onMousedown:k=>{g(k),_&&_(k)},onInput:k=>{y(k),A&&A(k)},onCompositionstart(k){S(k),N&&N(k)},onCompositionend(k){$(k),B&&B(k)},onPaste:b,onFocus:function(){clearTimeout(t),R&&R(arguments.length<=0?void 0:arguments[0]),x&&x(arguments.length<=0?void 0:arguments[0]),n==null||n.focus(arguments.length<=0?void 0:arguments[0])},onBlur:function(){for(var k=arguments.length,z=new Array(k),H=0;H{F&&F(z[0]),C&&C(z[0]),n==null||n.blur(z[0])},100)}}),T.type==="textarea"?{}:{type:"search"}),!0,!0),T}}}),GF=`accept acceptcharset accesskey action allowfullscreen allowtransparency +alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge +charset checked classid classname colspan cols content contenteditable contextmenu +controls coords crossorigin data datetime default defer dir disabled download draggable +enctype form formaction formenctype formmethod formnovalidate formtarget frameborder +headers height hidden high href hreflang htmlfor for httpequiv icon id inputmode integrity +is keyparams keytype kind label lang list loop low manifest marginheight marginwidth max maxlength media +mediagroup method min minlength multiple muted name novalidate nonce open +optimum pattern placeholder poster preload radiogroup readonly rel required +reversed role rowspan rows sandbox scope scoped scrolling seamless selected +shape size sizes span spellcheck src srcdoc srclang srcset start step style +summary tabindex target title type usemap value width wmode wrap`,XF=`onCopy onCut onPaste onCompositionend onCompositionstart onCompositionupdate onKeydown + onKeypress onKeyup onFocus onBlur onChange onInput onSubmit onClick onContextmenu onDoubleclick onDblclick + onDrag onDragend onDragenter onDragexit onDragleave onDragover onDragstart onDrop onMousedown + onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel + onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough + onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata + onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`,xx=`${GF} ${XF}`.split(/[\s\n]+/),YF="aria-",qF="data-";function wx(e,t){return e.indexOf(t)===0}function el(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n=v({},t);const o={};return Object.keys(e).forEach(r=>{(n.aria&&(r==="role"||wx(r,YF))||n.data&&wx(r,qF)||n.attr&&(xx.includes(r)||xx.includes(r.toLowerCase())))&&(o[r]=e[r])}),o}const W8=Symbol("OverflowContextProviderKey"),s0=re({compatConfig:{MODE:3},name:"OverflowContextProvider",inheritAttrs:!1,props:{value:{type:Object}},setup(e,t){let{slots:n}=t;return qe(W8,I(()=>e.value)),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),ZF=()=>Ke(W8,I(()=>null));var JF=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.responsive&&!e.display),i=ie();o({itemNodeRef:i});function l(a){e.registerSize(e.itemKey,a)}return Wn(()=>{l(null)}),()=>{var a;const{prefixCls:s,invalidate:c,item:u,renderItem:d,responsive:f,registerSize:h,itemKey:m,display:g,order:y,component:b="div"}=e,S=JF(e,["prefixCls","invalidate","item","renderItem","responsive","registerSize","itemKey","display","order","component"]),$=(a=n.default)===null||a===void 0?void 0:a.call(n),x=d&&u!==va?d(u):$;let C;c||(C={opacity:r.value?0:1,height:r.value?0:va,overflowY:r.value?"hidden":va,order:f?y:va,pointerEvents:r.value?"none":va,position:r.value?"absolute":va});const O={};return r.value&&(O["aria-hidden"]=!0),p(Go,{disabled:!f,onResize:w=>{let{offsetWidth:P}=w;l(P)}},{default:()=>p(b,D(D(D({class:ce(!c&&s),style:C},O),S),{},{ref:i}),{default:()=>[x]})})}}});var fm=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var i;if(!r.value){const{component:d="div"}=e,f=fm(e,["component"]);return p(d,D(D({},f),o),{default:()=>[(i=n.default)===null||i===void 0?void 0:i.call(n)]})}const l=r.value,{className:a}=l,s=fm(l,["className"]),{class:c}=o,u=fm(o,["class"]);return p(s0,{value:null},{default:()=>[p(Fd,D(D(D({class:ce(a,c)},s),u),e),n)]})}}});var ez=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({id:String,prefixCls:String,data:Array,itemKey:[String,Number,Function],itemWidth:{type:Number,default:10},renderItem:Function,renderRawItem:Function,maxCount:[Number,String],renderRest:Function,renderRawRest:Function,suffix:W.any,component:String,itemComponent:W.any,onVisibleChange:Function,ssr:String,onMousedown:Function,role:String}),ai=re({name:"Overflow",inheritAttrs:!1,props:nz(),emits:["visibleChange"],setup(e,t){let{attrs:n,emit:o,slots:r}=t;const i=I(()=>e.ssr==="full"),l=oe(null),a=I(()=>l.value||0),s=oe(new Map),c=oe(0),u=oe(0),d=oe(0),f=oe(null),h=oe(null),m=I(()=>h.value===null&&i.value?Number.MAX_SAFE_INTEGER:h.value||0),g=oe(!1),y=I(()=>`${e.prefixCls}-item`),b=I(()=>Math.max(c.value,u.value)),S=I(()=>!!(e.data.length&&e.maxCount===K8)),$=I(()=>e.maxCount===U8),x=I(()=>S.value||typeof e.maxCount=="number"&&e.data.length>e.maxCount),C=I(()=>{let _=e.data;return S.value?l.value===null&&i.value?_=e.data:_=e.data.slice(0,Math.min(e.data.length,a.value/e.itemWidth)):typeof e.maxCount=="number"&&(_=e.data.slice(0,e.maxCount)),_}),O=I(()=>S.value?e.data.slice(m.value+1):e.data.slice(C.value.length)),w=(_,N)=>{var B;return typeof e.itemKey=="function"?e.itemKey(_):(B=e.itemKey&&(_==null?void 0:_[e.itemKey]))!==null&&B!==void 0?B:N},P=I(()=>e.renderItem||(_=>_)),T=(_,N)=>{h.value=_,N||(g.value=_{l.value=N.clientWidth},E=(_,N)=>{const B=new Map(s.value);N===null?B.delete(_):B.set(_,N),s.value=B},A=(_,N)=>{c.value=u.value,u.value=N},R=(_,N)=>{d.value=N},F=_=>s.value.get(w(C.value[_],_));return Se([a,s,u,d,()=>e.itemKey,C],()=>{if(a.value&&b.value&&C.value){let _=d.value;const N=C.value.length,B=N-1;if(!N){T(0),f.value=null;return}for(let L=0;La.value){T(L-1),f.value=_-k-d.value+u.value;break}}e.suffix&&F(0)+d.value>a.value&&(f.value=null)}}),()=>{const _=g.value&&!!O.value.length,{itemComponent:N,renderRawItem:B,renderRawRest:L,renderRest:k,prefixCls:z="rc-overflow",suffix:H,component:j="div",id:Y,onMousedown:Z}=e,{class:G,style:te}=n,U=ez(n,["class","style"]);let Q={};f.value!==null&&S.value&&(Q={position:"absolute",left:`${f.value}px`,top:0});const J={prefixCls:y.value,responsive:S.value,component:N,invalidate:$.value},X=B?(ee,ue)=>{const ae=w(ee,ue);return p(s0,{key:ae,value:v(v({},J),{order:ue,item:ee,itemKey:ae,registerSize:E,display:ue<=m.value})},{default:()=>[B(ee,ue)]})}:(ee,ue)=>{const ae=w(ee,ue);return p(Fd,D(D({},J),{},{order:ue,key:ae,item:ee,renderItem:P.value,itemKey:ae,registerSize:E,display:ue<=m.value}),null)};let q=()=>null;const V={order:_?m.value:Number.MAX_SAFE_INTEGER,className:`${y.value} ${y.value}-rest`,registerSize:A,display:_};if(L)L&&(q=()=>p(s0,{value:v(v({},J),V)},{default:()=>[L(O.value)]}));else{const ee=k||tz;q=()=>p(Fd,D(D({},J),V),{default:()=>typeof ee=="function"?ee(O.value):ee})}const K=()=>{var ee;return p(j,D({id:Y,class:ce(!$.value&&z,G),style:te,onMousedown:Z,role:e.role},U),{default:()=>[C.value.map(X),x.value?q():null,H&&p(Fd,D(D({},J),{},{order:m.value,class:`${y.value}-suffix`,registerSize:R,display:!0,style:Q}),{default:()=>H}),(ee=r.default)===null||ee===void 0?void 0:ee.call(r)]})};return p(Go,{disabled:!S.value,onResize:M},{default:K})}}});ai.Item=QF;ai.RESPONSIVE=K8;ai.INVALIDATE=U8;const G8=Symbol("TreeSelectLegacyContextPropsKey");function oz(e){return qe(G8,e)}function xh(){return Ke(G8,{})}const rz={id:String,prefixCls:String,values:W.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:W.any,placeholder:W.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:W.oneOfType([W.number,W.string]),compositionStatus:Boolean,removeIcon:W.any,choiceTransitionName:String,maxTagCount:W.oneOfType([W.number,W.string]),maxTagTextLength:Number,maxTagPlaceholder:W.any.def(()=>e=>`+ ${e.length} ...`),tagRender:Function,onToggleOpen:{type:Function},onRemove:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},Ox=e=>{e.preventDefault(),e.stopPropagation()},iz=re({name:"MultipleSelectSelector",inheritAttrs:!1,props:rz,setup(e){const t=oe(),n=oe(0),o=oe(!1),r=xh(),i=I(()=>`${e.prefixCls}-selection`),l=I(()=>e.open||e.mode==="tags"?e.searchValue:""),a=I(()=>e.mode==="tags"||e.showSearch&&(e.open||o.value)),s=ie("");je(()=>{s.value=l.value}),Ue(()=>{Se(s,()=>{n.value=t.value.scrollWidth},{flush:"post",immediate:!0})});function c(m,g,y,b,S){return p("span",{class:ce(`${i.value}-item`,{[`${i.value}-item-disabled`]:y}),title:typeof m=="string"||typeof m=="number"?m.toString():void 0},[p("span",{class:`${i.value}-item-content`},[g]),b&&p(Xl,{class:`${i.value}-item-remove`,onMousedown:Ox,onClick:S,customizeIcon:e.removeIcon},{default:()=>[vn("×")]})])}function u(m,g,y,b,S,$){var x;const C=w=>{Ox(w),e.onToggleOpen(!open)};let O=$;return r.keyEntities&&(O=((x=r.keyEntities[m])===null||x===void 0?void 0:x.node)||{}),p("span",{key:m,onMousedown:C},[e.tagRender({label:g,value:m,disabled:y,closable:b,onClose:S,option:O})])}function d(m){const{disabled:g,label:y,value:b,option:S}=m,$=!e.disabled&&!g;let x=y;if(typeof e.maxTagTextLength=="number"&&(typeof y=="string"||typeof y=="number")){const O=String(x);O.length>e.maxTagTextLength&&(x=`${O.slice(0,e.maxTagTextLength)}...`)}const C=O=>{var w;O&&O.stopPropagation(),(w=e.onRemove)===null||w===void 0||w.call(e,m)};return typeof e.tagRender=="function"?u(b,x,g,$,C,S):c(y,x,g,$,C)}function f(m){const{maxTagPlaceholder:g=b=>`+ ${b.length} ...`}=e,y=typeof g=="function"?g(m):g;return c(y,y,!1)}const h=m=>{const g=m.target.composing;s.value=m.target.value,g||e.onInputChange(m)};return()=>{const{id:m,prefixCls:g,values:y,open:b,inputRef:S,placeholder:$,disabled:x,autofocus:C,autocomplete:O,activeDescendantId:w,tabindex:P,compositionStatus:T,onInputPaste:M,onInputKeyDown:E,onInputMouseDown:A,onInputCompositionStart:R,onInputCompositionEnd:F}=e,_=p("div",{class:`${i.value}-search`,style:{width:n.value+"px"},key:"input"},[p(V8,{inputRef:S,open:b,prefixCls:g,id:m,inputElement:null,disabled:x,autofocus:C,autocomplete:O,editable:a.value,activeDescendantId:w,value:s.value,onKeydown:E,onMousedown:A,onChange:h,onPaste:M,onCompositionstart:R,onCompositionend:F,tabindex:P,attrs:el(e,!0),onFocus:()=>o.value=!0,onBlur:()=>o.value=!1},null),p("span",{ref:t,class:`${i.value}-search-mirror`,"aria-hidden":!0},[s.value,vn(" ")])]),N=p(ai,{prefixCls:`${i.value}-overflow`,data:y,renderItem:d,renderRest:f,suffix:_,itemKey:"key",maxCount:e.maxTagCount,key:"overflow"},null);return p(He,null,[N,!y.length&&!l.value&&!T&&p("span",{class:`${i.value}-placeholder`},[$])])}}}),lz={inputElement:W.any,id:String,prefixCls:String,values:W.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:W.any,placeholder:W.any,compositionStatus:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:W.oneOfType([W.number,W.string]),activeValue:String,backfill:{type:Boolean,default:void 0},optionLabelRender:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},wy=re({name:"SingleSelector",setup(e){const t=oe(!1),n=I(()=>e.mode==="combobox"),o=I(()=>n.value||e.showSearch),r=I(()=>{let u=e.searchValue||"";return n.value&&e.activeValue&&!t.value&&(u=e.activeValue),u}),i=xh();Se([n,()=>e.activeValue],()=>{n.value&&(t.value=!1)},{immediate:!0});const l=I(()=>e.mode!=="combobox"&&!e.open&&!e.showSearch?!1:!!r.value||e.compositionStatus),a=I(()=>{const u=e.values[0];return u&&(typeof u.label=="string"||typeof u.label=="number")?u.label.toString():void 0}),s=()=>{if(e.values[0])return null;const u=l.value?{visibility:"hidden"}:void 0;return p("span",{class:`${e.prefixCls}-selection-placeholder`,style:u},[e.placeholder])},c=u=>{u.target.composing||(t.value=!0,e.onInputChange(u))};return()=>{var u,d,f,h;const{inputElement:m,prefixCls:g,id:y,values:b,inputRef:S,disabled:$,autofocus:x,autocomplete:C,activeDescendantId:O,open:w,tabindex:P,optionLabelRender:T,onInputKeyDown:M,onInputMouseDown:E,onInputPaste:A,onInputCompositionStart:R,onInputCompositionEnd:F}=e,_=b[0];let N=null;if(_&&i.customSlots){const B=(u=_.key)!==null&&u!==void 0?u:_.value,L=((d=i.keyEntities[B])===null||d===void 0?void 0:d.node)||{};N=i.customSlots[(f=L.slots)===null||f===void 0?void 0:f.title]||i.customSlots.title||_.label,typeof N=="function"&&(N=N(L))}else N=T&&_?T(_.option):_==null?void 0:_.label;return p(He,null,[p("span",{class:`${g}-selection-search`},[p(V8,{inputRef:S,prefixCls:g,id:y,open:w,inputElement:m,disabled:$,autofocus:x,autocomplete:C,editable:o.value,activeDescendantId:O,value:r.value,onKeydown:M,onMousedown:E,onChange:c,onPaste:A,onCompositionstart:R,onCompositionend:F,tabindex:P,attrs:el(e,!0)},null)]),!n.value&&_&&!l.value&&p("span",{class:`${g}-selection-item`,title:a.value},[p(He,{key:(h=_.key)!==null&&h!==void 0?h:_.value},[N])]),s()])}}});wy.props=lz;wy.inheritAttrs=!1;function az(e){return![Ie.ESC,Ie.SHIFT,Ie.BACKSPACE,Ie.TAB,Ie.WIN_KEY,Ie.ALT,Ie.META,Ie.WIN_KEY_RIGHT,Ie.CTRL,Ie.SEMICOLON,Ie.EQUALS,Ie.CAPS_LOCK,Ie.CONTEXT_MENU,Ie.F1,Ie.F2,Ie.F3,Ie.F4,Ie.F5,Ie.F6,Ie.F7,Ie.F8,Ie.F9,Ie.F10,Ie.F11,Ie.F12].includes(e)}function X8(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=null,n;tt(()=>{clearTimeout(n)});function o(r){(r||t===null)&&(t=r),clearTimeout(n),n=setTimeout(()=>{t=null},e)}return[()=>t,o]}function Yc(){const e=t=>{e.current=t};return e}const sz=re({name:"Selector",inheritAttrs:!1,props:{id:String,prefixCls:String,showSearch:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},values:W.array,multiple:{type:Boolean,default:void 0},mode:String,searchValue:String,activeValue:String,inputElement:W.any,autofocus:{type:Boolean,default:void 0},activeDescendantId:String,tabindex:W.oneOfType([W.number,W.string]),disabled:{type:Boolean,default:void 0},placeholder:W.any,removeIcon:W.any,maxTagCount:W.oneOfType([W.number,W.string]),maxTagTextLength:Number,maxTagPlaceholder:W.any,tagRender:Function,optionLabelRender:Function,tokenWithEnter:{type:Boolean,default:void 0},choiceTransitionName:String,onToggleOpen:{type:Function},onSearch:Function,onSearchSubmit:Function,onRemove:Function,onInputKeyDown:{type:Function},domRef:Function},setup(e,t){let{expose:n}=t;const o=Yc(),r=ie(!1),[i,l]=X8(0),a=b=>{const{which:S}=b;(S===Ie.UP||S===Ie.DOWN)&&b.preventDefault(),e.onInputKeyDown&&e.onInputKeyDown(b),S===Ie.ENTER&&e.mode==="tags"&&!r.value&&!e.open&&e.onSearchSubmit(b.target.value),az(S)&&e.onToggleOpen(!0)},s=()=>{l(!0)};let c=null;const u=b=>{e.onSearch(b,!0,r.value)!==!1&&e.onToggleOpen(!0)},d=()=>{r.value=!0},f=b=>{r.value=!1,e.mode!=="combobox"&&u(b.target.value)},h=b=>{let{target:{value:S}}=b;if(e.tokenWithEnter&&c&&/[\r\n]/.test(c)){const $=c.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");S=S.replace($,c)}c=null,u(S)},m=b=>{const{clipboardData:S}=b;c=S.getData("text")},g=b=>{let{target:S}=b;S!==o.current&&(document.body.style.msTouchAction!==void 0?setTimeout(()=>{o.current.focus()}):o.current.focus())},y=b=>{const S=i();b.target!==o.current&&!S&&b.preventDefault(),(e.mode!=="combobox"&&(!e.showSearch||!S)||!e.open)&&(e.open&&e.onSearch("",!0,!1),e.onToggleOpen())};return n({focus:()=>{o.current.focus()},blur:()=>{o.current.blur()}}),()=>{const{prefixCls:b,domRef:S,mode:$}=e,x={inputRef:o,onInputKeyDown:a,onInputMouseDown:s,onInputChange:h,onInputPaste:m,compositionStatus:r.value,onInputCompositionStart:d,onInputCompositionEnd:f},C=$==="multiple"||$==="tags"?p(iz,D(D({},e),x),null):p(wy,D(D({},e),x),null);return p("div",{ref:S,class:`${b}-selector`,onClick:g,onMousedown:y},[C])}}});function cz(e,t,n){function o(r){var i,l,a;let s=r.target;s.shadowRoot&&r.composed&&(s=r.composedPath()[0]||s);const c=[(i=e[0])===null||i===void 0?void 0:i.value,(a=(l=e[1])===null||l===void 0?void 0:l.value)===null||a===void 0?void 0:a.getPopupElement()];t.value&&c.every(u=>u&&!u.contains(s)&&u!==s)&&n(!1)}Ue(()=>{window.addEventListener("mousedown",o)}),tt(()=>{window.removeEventListener("mousedown",o)})}function uz(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;const t=oe(!1);let n;const o=()=>{clearTimeout(n)};return Ue(()=>{o()}),[t,(i,l)=>{o(),n=setTimeout(()=>{t.value=i,l&&l()},e)},o]}const Y8=Symbol("BaseSelectContextKey");function dz(e){return qe(Y8,e)}function mu(){return Ke(Y8,{})}const Oy=()=>{if(typeof navigator>"u"||typeof window>"u")return!1;const e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e==null?void 0:e.substring(0,4))};function Yf(e){if(!jt(e))return ft(e);const t=new Proxy({},{get(n,o,r){return Reflect.get(e.value,o,r)},set(n,o,r){return e.value[o]=r,!0},deleteProperty(n,o){return Reflect.deleteProperty(e.value,o)},has(n,o){return Reflect.has(e.value,o)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return ft(t)}var fz=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,id:String,omitDomProps:Array,displayValues:Array,onDisplayValuesChange:Function,activeValue:String,activeDescendantId:String,onActiveValueChange:Function,searchValue:String,onSearch:Function,onSearchSplit:Function,maxLength:Number,OptionList:W.any,emptyOptions:Boolean}),wh=()=>({showSearch:{type:Boolean,default:void 0},tagRender:{type:Function},optionLabelRender:{type:Function},direction:{type:String},tabindex:Number,autofocus:Boolean,notFoundContent:W.any,placeholder:W.any,onClear:Function,choiceTransitionName:String,mode:String,disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{type:Function},getInputElement:{type:Function},getRawInputElement:{type:Function},maxTagTextLength:Number,maxTagCount:{type:[String,Number]},maxTagPlaceholder:W.any,tokenSeparators:{type:Array},allowClear:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},inputIcon:W.any,clearIcon:W.any,removeIcon:W.any,animation:String,transitionName:String,dropdownStyle:{type:Object},dropdownClassName:String,dropdownMatchSelectWidth:{type:[Boolean,Number],default:void 0},dropdownRender:{type:Function},dropdownAlign:Object,placement:{type:String},getPopupContainer:{type:Function},showAction:{type:Array},onBlur:{type:Function},onFocus:{type:Function},onKeyup:Function,onKeydown:Function,onMousedown:Function,onPopupScroll:Function,onInputKeyDown:Function,onMouseenter:Function,onMouseleave:Function,onClick:Function}),gz=()=>v(v({},hz()),wh());function q8(e){return e==="tags"||e==="multiple"}const Py=re({compatConfig:{MODE:3},name:"BaseSelect",inheritAttrs:!1,props:et(gz(),{showAction:[],notFoundContent:"Not Found"}),setup(e,t){let{attrs:n,expose:o,slots:r}=t;const i=I(()=>q8(e.mode)),l=I(()=>e.showSearch!==void 0?e.showSearch:i.value||e.mode==="combobox"),a=oe(!1);Ue(()=>{a.value=Oy()});const s=xh(),c=oe(null),u=Yc(),d=oe(null),f=oe(null),h=oe(null),m=ie(!1),[g,y,b]=uz();o({focus:()=>{var X;(X=f.value)===null||X===void 0||X.focus()},blur:()=>{var X;(X=f.value)===null||X===void 0||X.blur()},scrollTo:X=>{var q;return(q=h.value)===null||q===void 0?void 0:q.scrollTo(X)}});const x=I(()=>{var X;if(e.mode!=="combobox")return e.searchValue;const q=(X=e.displayValues[0])===null||X===void 0?void 0:X.value;return typeof q=="string"||typeof q=="number"?String(q):""}),C=e.open!==void 0?e.open:e.defaultOpen,O=oe(C),w=oe(C),P=X=>{O.value=e.open!==void 0?e.open:X,w.value=O.value};Se(()=>e.open,()=>{P(e.open)});const T=I(()=>!e.notFoundContent&&e.emptyOptions);je(()=>{w.value=O.value,(e.disabled||T.value&&w.value&&e.mode==="combobox")&&(w.value=!1)});const M=I(()=>T.value?!1:w.value),E=X=>{const q=X!==void 0?X:!w.value;w.value!==q&&!e.disabled&&(P(q),e.onDropdownVisibleChange&&e.onDropdownVisibleChange(q),!q&&j.value&&(j.value=!1,y(!1,()=>{z.value=!1,m.value=!1})))},A=I(()=>(e.tokenSeparators||[]).some(X=>[` +`,`\r +`].includes(X))),R=(X,q,V)=>{var K,ee;let ue=!0,ae=X;(K=e.onActiveValueChange)===null||K===void 0||K.call(e,null);const le=V?null:fB(X,e.tokenSeparators);return e.mode!=="combobox"&&le&&(ae="",(ee=e.onSearchSplit)===null||ee===void 0||ee.call(e,le),E(!1),ue=!1),e.onSearch&&x.value!==ae&&e.onSearch(ae,{source:q?"typing":"effect"}),ue},F=X=>{var q;!X||!X.trim()||(q=e.onSearch)===null||q===void 0||q.call(e,X,{source:"submit"})};Se(w,()=>{!w.value&&!i.value&&e.mode!=="combobox"&&R("",!1,!1)},{immediate:!0,flush:"post"}),Se(()=>e.disabled,()=>{O.value&&e.disabled&&P(!1),e.disabled&&!m.value&&y(!1)},{immediate:!0});const[_,N]=X8(),B=function(X){var q;const V=_(),{which:K}=X;if(K===Ie.ENTER&&(e.mode!=="combobox"&&X.preventDefault(),w.value||E(!0)),N(!!x.value),K===Ie.BACKSPACE&&!V&&i.value&&!x.value&&e.displayValues.length){const le=[...e.displayValues];let ne=null;for(let se=le.length-1;se>=0;se-=1){const pe=le[se];if(!pe.disabled){le.splice(se,1),ne=pe;break}}ne&&e.onDisplayValuesChange(le,{type:"remove",values:[ne]})}for(var ee=arguments.length,ue=new Array(ee>1?ee-1:0),ae=1;ae1?q-1:0),K=1;K{const q=e.displayValues.filter(V=>V!==X);e.onDisplayValuesChange(q,{type:"remove",values:[X]})},z=oe(!1),H=function(){y(!0),e.disabled||(e.onFocus&&!z.value&&e.onFocus(...arguments),e.showAction&&e.showAction.includes("focus")&&E(!0)),z.value=!0},j=ie(!1),Y=function(){if(j.value||(m.value=!0,y(!1,()=>{z.value=!1,m.value=!1,E(!1)}),e.disabled))return;const X=x.value;X&&(e.mode==="tags"?e.onSearch(X,{source:"submit"}):e.mode==="multiple"&&e.onSearch("",{source:"blur"})),e.onBlur&&e.onBlur(...arguments)},Z=()=>{j.value=!0},G=()=>{j.value=!1};qe("VCSelectContainerEvent",{focus:H,blur:Y});const te=[];Ue(()=>{te.forEach(X=>clearTimeout(X)),te.splice(0,te.length)}),tt(()=>{te.forEach(X=>clearTimeout(X)),te.splice(0,te.length)});const U=function(X){var q,V;const{target:K}=X,ee=(q=d.value)===null||q===void 0?void 0:q.getPopupElement();if(ee&&ee.contains(K)){const ne=setTimeout(()=>{var se;const pe=te.indexOf(ne);pe!==-1&&te.splice(pe,1),b(),!a.value&&!ee.contains(document.activeElement)&&((se=f.value)===null||se===void 0||se.focus())});te.push(ne)}for(var ue=arguments.length,ae=new Array(ue>1?ue-1:0),le=1;le{};return Ue(()=>{Se(M,()=>{var X;if(M.value){const q=Math.ceil((X=c.value)===null||X===void 0?void 0:X.offsetWidth);Q.value!==q&&!Number.isNaN(q)&&(Q.value=q)}},{immediate:!0,flush:"post"})}),cz([c,d],M,E),dz(Yf(v(v({},lr(e)),{open:w,triggerOpen:M,showSearch:l,multiple:i,toggleOpen:E}))),()=>{const X=v(v({},e),n),{prefixCls:q,id:V,open:K,defaultOpen:ee,mode:ue,showSearch:ae,searchValue:le,onSearch:ne,allowClear:se,clearIcon:pe,showArrow:he,inputIcon:ge,disabled:be,loading:xe,getInputElement:fe,getPopupContainer:de,placement:ye,animation:Oe,transitionName:Te,dropdownStyle:Re,dropdownClassName:$e,dropdownMatchSelectWidth:we,dropdownRender:Pe,dropdownAlign:Me,showAction:De,direction:Ae,tokenSeparators:ke,tagRender:ot,optionLabelRender:gt,onPopupScroll:st,onDropdownVisibleChange:mt,onFocus:bt,onBlur:en,onKeyup:an,onKeydown:hn,onMousedown:Kt,onClear:An,omitDomProps:lo,getRawInputElement:Ro,displayValues:Qo,onDisplayValuesChange:ao,emptyOptions:al,activeDescendantId:_e,activeValue:Je,OptionList:Ye}=X,Pt=fz(X,["prefixCls","id","open","defaultOpen","mode","showSearch","searchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","disabled","loading","getInputElement","getPopupContainer","placement","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","optionLabelRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyup","onKeydown","onMousedown","onClear","omitDomProps","getRawInputElement","displayValues","onDisplayValuesChange","emptyOptions","activeDescendantId","activeValue","OptionList"]),sn=ue==="combobox"&&fe&&fe()||null,Ut=typeof Ro=="function"&&Ro(),so=v({},Pt);let On;Ut&&(On=tr=>{E(tr)}),pz.forEach(tr=>{delete so[tr]}),lo==null||lo.forEach(tr=>{delete so[tr]});const br=he!==void 0?he:xe||!i.value&&ue!=="combobox";let vo;br&&(vo=p(Xl,{class:ce(`${q}-arrow`,{[`${q}-arrow-loading`]:xe}),customizeIcon:ge,customizeIconProps:{loading:xe,searchValue:x.value,open:w.value,focused:g.value,showSearch:l.value}},null));let Do;const Bt=()=>{An==null||An(),ao([],{type:"clear",values:Qo}),R("",!1,!1)};!be&&se&&(Qo.length||x.value)&&(Do=p(Xl,{class:`${q}-clear`,onMousedown:Bt,customizeIcon:pe},{default:()=>[vn("×")]}));const er=p(Ye,{ref:h},v(v({},s.customSlots),{option:r.option})),No=ce(q,n.class,{[`${q}-focused`]:g.value,[`${q}-multiple`]:i.value,[`${q}-single`]:!i.value,[`${q}-allow-clear`]:se,[`${q}-show-arrow`]:br,[`${q}-disabled`]:be,[`${q}-loading`]:xe,[`${q}-open`]:w.value,[`${q}-customize-input`]:sn,[`${q}-show-search`]:l.value}),$i=p(FF,{ref:d,disabled:be,prefixCls:q,visible:M.value,popupElement:er,containerWidth:Q.value,animation:Oe,transitionName:Te,dropdownStyle:Re,dropdownClassName:$e,direction:Ae,dropdownMatchSelectWidth:we,dropdownRender:Pe,dropdownAlign:Me,placement:ye,getPopupContainer:de,empty:al,getTriggerDOMNode:()=>u.current,onPopupVisibleChange:On,onPopupMouseEnter:J,onPopupFocusin:Z,onPopupFocusout:G},{default:()=>Ut?qt(Ut)&&ht(Ut,{ref:u},!1,!0):p(sz,D(D({},e),{},{domRef:u,prefixCls:q,inputElement:sn,ref:f,id:V,showSearch:l.value,mode:ue,activeDescendantId:_e,tagRender:ot,optionLabelRender:gt,values:Qo,open:w.value,onToggleOpen:E,activeValue:Je,searchValue:x.value,onSearch:R,onSearchSubmit:F,onRemove:k,tokenWithEnter:A.value}),null)});let Ci;return Ut?Ci=$i:Ci=p("div",D(D({},so),{},{class:No,ref:c,onMousedown:U,onKeydown:B,onKeyup:L}),[g.value&&!w.value&&p("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},[`${Qo.map(tr=>{let{label:ga,value:nr}=tr;return["number","string"].includes(typeof ga)?ga:nr}).join(", ")}`]),$i,vo,Do]),Ci}}}),Oh=(e,t)=>{let{height:n,offset:o,prefixCls:r,onInnerResize:i}=e,{slots:l}=t;var a;let s={},c={display:"flex",flexDirection:"column"};return o!==void 0&&(s={height:`${n}px`,position:"relative",overflow:"hidden"},c=v(v({},c),{transform:`translateY(${o}px)`,position:"absolute",left:0,right:0,top:0})),p("div",{style:s},[p(Go,{onResize:u=>{let{offsetHeight:d}=u;d&&i&&i()}},{default:()=>[p("div",{style:c,class:ce({[`${r}-holder-inner`]:r})},[(a=l.default)===null||a===void 0?void 0:a.call(l)])]})])};Oh.displayName="Filter";Oh.inheritAttrs=!1;Oh.props={prefixCls:String,height:Number,offset:Number,onInnerResize:Function};const Z8=(e,t)=>{let{setRef:n}=e,{slots:o}=t;var r;const i=xt((r=o.default)===null||r===void 0?void 0:r.call(o));return i&&i.length?bn(i[0],{ref:n}):i};Z8.props={setRef:{type:Function,default:()=>{}}};const mz=20;function Px(e){return"touches"in e?e.touches[0].pageY:e.pageY}const vz=re({compatConfig:{MODE:3},name:"ScrollBar",inheritAttrs:!1,props:{prefixCls:String,scrollTop:Number,scrollHeight:Number,height:Number,count:Number,onScroll:{type:Function},onStartMove:{type:Function},onStopMove:{type:Function}},setup(){return{moveRaf:null,scrollbarRef:Yc(),thumbRef:Yc(),visibleTimeout:null,state:ft({dragging:!1,pageY:null,startTop:null,visible:!1})}},watch:{scrollTop:{handler(){this.delayHidden()},flush:"post"}},mounted(){var e,t;(e=this.scrollbarRef.current)===null||e===void 0||e.addEventListener("touchstart",this.onScrollbarTouchStart,nn?{passive:!1}:!1),(t=this.thumbRef.current)===null||t===void 0||t.addEventListener("touchstart",this.onMouseDown,nn?{passive:!1}:!1)},beforeUnmount(){this.removeEvents(),clearTimeout(this.visibleTimeout)},methods:{delayHidden(){clearTimeout(this.visibleTimeout),this.state.visible=!0,this.visibleTimeout=setTimeout(()=>{this.state.visible=!1},2e3)},onScrollbarTouchStart(e){e.preventDefault()},onContainerMouseDown(e){e.stopPropagation(),e.preventDefault()},patchEvents(){window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),this.thumbRef.current.addEventListener("touchmove",this.onMouseMove,nn?{passive:!1}:!1),this.thumbRef.current.addEventListener("touchend",this.onMouseUp)},removeEvents(){window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),this.scrollbarRef.current.removeEventListener("touchstart",this.onScrollbarTouchStart,nn?{passive:!1}:!1),this.thumbRef.current&&(this.thumbRef.current.removeEventListener("touchstart",this.onMouseDown,nn?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchmove",this.onMouseMove,nn?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchend",this.onMouseUp)),Qe.cancel(this.moveRaf)},onMouseDown(e){const{onStartMove:t}=this.$props;v(this.state,{dragging:!0,pageY:Px(e),startTop:this.getTop()}),t(),this.patchEvents(),e.stopPropagation(),e.preventDefault()},onMouseMove(e){const{dragging:t,pageY:n,startTop:o}=this.state,{onScroll:r}=this.$props;if(Qe.cancel(this.moveRaf),t){const i=Px(e)-n,l=o+i,a=this.getEnableScrollRange(),s=this.getEnableHeightRange(),c=s?l/s:0,u=Math.ceil(c*a);this.moveRaf=Qe(()=>{r(u)})}},onMouseUp(){const{onStopMove:e}=this.$props;this.state.dragging=!1,e(),this.removeEvents()},getSpinHeight(){const{height:e,scrollHeight:t}=this.$props;let n=e/t*100;return n=Math.max(n,mz),n=Math.min(n,e/2),Math.floor(n)},getEnableScrollRange(){const{scrollHeight:e,height:t}=this.$props;return e-t||0},getEnableHeightRange(){const{height:e}=this.$props,t=this.getSpinHeight();return e-t||0},getTop(){const{scrollTop:e}=this.$props,t=this.getEnableScrollRange(),n=this.getEnableHeightRange();return e===0||t===0?0:e/t*n},showScroll(){const{height:e,scrollHeight:t}=this.$props;return t>e}},render(){const{dragging:e,visible:t}=this.state,{prefixCls:n}=this.$props,o=this.getSpinHeight()+"px",r=this.getTop()+"px",i=this.showScroll(),l=i&&t;return p("div",{ref:this.scrollbarRef,class:ce(`${n}-scrollbar`,{[`${n}-scrollbar-show`]:i}),style:{width:"8px",top:0,bottom:0,right:0,position:"absolute",display:l?void 0:"none"},onMousedown:this.onContainerMouseDown,onMousemove:this.delayHidden},[p("div",{ref:this.thumbRef,class:ce(`${n}-scrollbar-thumb`,{[`${n}-scrollbar-thumb-moving`]:e}),style:{width:"100%",height:o,top:r,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:"99px",cursor:"pointer",userSelect:"none"},onMousedown:this.onMouseDown},null)])}});function bz(e,t,n,o){const r=new Map,i=new Map,l=ie(Symbol("update"));Se(e,()=>{l.value=Symbol("update")});let a;function s(){Qe.cancel(a)}function c(){s(),a=Qe(()=>{r.forEach((d,f)=>{if(d&&d.offsetParent){const{offsetHeight:h}=d;i.get(f)!==h&&(l.value=Symbol("update"),i.set(f,d.offsetHeight))}})})}function u(d,f){const h=t(d);r.get(h),f?(r.set(h,f.$el||f),c()):r.delete(h)}return Wn(()=>{s()}),[u,c,i,l]}function yz(e,t,n,o,r,i,l,a){let s;return c=>{if(c==null){a();return}Qe.cancel(s);const u=t.value,d=o.itemHeight;if(typeof c=="number")l(c);else if(c&&typeof c=="object"){let f;const{align:h}=c;"index"in c?{index:f}=c:f=u.findIndex(y=>r(y)===c.key);const{offset:m=0}=c,g=(y,b)=>{if(y<0||!e.value)return;const S=e.value.clientHeight;let $=!1,x=b;if(S){const C=b||h;let O=0,w=0,P=0;const T=Math.min(u.length,f);for(let A=0;A<=T;A+=1){const R=r(u[A]);w=O;const F=n.get(R);P=w+(F===void 0?d:F),O=P,A===f&&F===void 0&&($=!0)}const M=e.value.scrollTop;let E=null;switch(C){case"top":E=w-m;break;case"bottom":E=P-S+m;break;default:{const A=M+S;wA&&(x="bottom")}}E!==null&&E!==M&&l(E)}s=Qe(()=>{$&&i(),g(y-1,x)},2)};g(5)}}}const Sz=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),J8=(e,t)=>{let n=!1,o=null;function r(){clearTimeout(o),n=!0,o=setTimeout(()=>{n=!1},50)}return function(i){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const a=i<0&&e.value||i>0&&t.value;return l&&a?(clearTimeout(o),n=!1):(!a||n)&&r(),!n&&a}};function $z(e,t,n,o){let r=0,i=null,l=null,a=!1;const s=J8(t,n);function c(d){if(!e.value)return;Qe.cancel(i);const{deltaY:f}=d;r+=f,l=f,!s(f)&&(Sz||d.preventDefault(),i=Qe(()=>{o(r*(a?10:1)),r=0}))}function u(d){e.value&&(a=d.detail===l)}return[c,u]}const Cz=14/15;function xz(e,t,n){let o=!1,r=0,i=null,l=null;const a=()=>{i&&(i.removeEventListener("touchmove",s),i.removeEventListener("touchend",c))},s=f=>{if(o){const h=Math.ceil(f.touches[0].pageY);let m=r-h;r=h,n(m)&&f.preventDefault(),clearInterval(l),l=setInterval(()=>{m*=Cz,(!n(m,!0)||Math.abs(m)<=.1)&&clearInterval(l)},16)}},c=()=>{o=!1,a()},u=f=>{a(),f.touches.length===1&&!o&&(o=!0,r=Math.ceil(f.touches[0].pageY),i=f.target,i.addEventListener("touchmove",s,{passive:!1}),i.addEventListener("touchend",c))},d=()=>{};Ue(()=>{document.addEventListener("touchmove",d,{passive:!1}),Se(e,f=>{t.value.removeEventListener("touchstart",u),a(),clearInterval(l),f&&t.value.addEventListener("touchstart",u,{passive:!1})},{immediate:!0})}),tt(()=>{document.removeEventListener("touchmove",d)})}var wz=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const c=t+s,u=r(a,c,{}),d=l(a);return p(Z8,{key:d,setRef:f=>o(a,f)},{default:()=>[u]})})}const Q8=re({compatConfig:{MODE:3},name:"List",inheritAttrs:!1,props:{prefixCls:String,data:W.array,height:Number,itemHeight:Number,fullHeight:{type:Boolean,default:void 0},itemKey:{type:[String,Number,Function],required:!0},component:{type:[String,Object]},virtual:{type:Boolean,default:void 0},children:Function,onScroll:Function,onMousedown:Function,onMouseenter:Function,onVisibleChange:Function},setup(e,t){let{expose:n}=t;const o=I(()=>{const{height:k,itemHeight:z,virtual:H}=e;return!!(H!==!1&&k&&z)}),r=I(()=>{const{height:k,itemHeight:z,data:H}=e;return o.value&&H&&z*H.length>k}),i=ft({scrollTop:0,scrollMoving:!1}),l=I(()=>e.data||Oz),a=oe([]);Se(l,()=>{a.value=nt(l.value).slice()},{immediate:!0});const s=oe(k=>{});Se(()=>e.itemKey,k=>{typeof k=="function"?s.value=k:s.value=z=>z==null?void 0:z[k]},{immediate:!0});const c=oe(),u=oe(),d=oe(),f=k=>s.value(k),h={getKey:f};function m(k){let z;typeof k=="function"?z=k(i.scrollTop):z=k;const H=O(z);c.value&&(c.value.scrollTop=H),i.scrollTop=H}const[g,y,b,S]=bz(a,f),$=ft({scrollHeight:void 0,start:0,end:0,offset:void 0}),x=oe(0);Ue(()=>{lt(()=>{var k;x.value=((k=u.value)===null||k===void 0?void 0:k.offsetHeight)||0})}),Vn(()=>{lt(()=>{var k;x.value=((k=u.value)===null||k===void 0?void 0:k.offsetHeight)||0})}),Se([o,a],()=>{o.value||v($,{scrollHeight:void 0,start:0,end:a.value.length-1,offset:void 0})},{immediate:!0}),Se([o,a,x,r],()=>{o.value&&!r.value&&v($,{scrollHeight:x.value,start:0,end:a.value.length-1,offset:void 0}),c.value&&(i.scrollTop=c.value.scrollTop)},{immediate:!0}),Se([r,o,()=>i.scrollTop,a,S,()=>e.height,x],()=>{if(!o.value||!r.value)return;let k=0,z,H,j;const Y=a.value.length,Z=a.value,G=i.scrollTop,{itemHeight:te,height:U}=e,Q=G+U;for(let J=0;J=G&&(z=J,H=k),j===void 0&&K>Q&&(j=J),k=K}z===void 0&&(z=0,H=0,j=Math.ceil(U/te)),j===void 0&&(j=Y-1),j=Math.min(j+1,Y),v($,{scrollHeight:k,start:z,end:j,offset:H})},{immediate:!0});const C=I(()=>$.scrollHeight-e.height);function O(k){let z=k;return Number.isNaN(C.value)||(z=Math.min(z,C.value)),z=Math.max(z,0),z}const w=I(()=>i.scrollTop<=0),P=I(()=>i.scrollTop>=C.value),T=J8(w,P);function M(k){m(k)}function E(k){var z;const{scrollTop:H}=k.currentTarget;H!==i.scrollTop&&m(H),(z=e.onScroll)===null||z===void 0||z.call(e,k)}const[A,R]=$z(o,w,P,k=>{m(z=>z+k)});xz(o,c,(k,z)=>T(k,z)?!1:(A({preventDefault(){},deltaY:k}),!0));function F(k){o.value&&k.preventDefault()}const _=()=>{c.value&&(c.value.removeEventListener("wheel",A,nn?{passive:!1}:!1),c.value.removeEventListener("DOMMouseScroll",R),c.value.removeEventListener("MozMousePixelScroll",F))};je(()=>{lt(()=>{c.value&&(_(),c.value.addEventListener("wheel",A,nn?{passive:!1}:!1),c.value.addEventListener("DOMMouseScroll",R),c.value.addEventListener("MozMousePixelScroll",F))})}),tt(()=>{_()});const N=yz(c,a,b,e,f,y,m,()=>{var k;(k=d.value)===null||k===void 0||k.delayHidden()});n({scrollTo:N});const B=I(()=>{let k=null;return e.height&&(k=v({[e.fullHeight?"height":"maxHeight"]:e.height+"px"},Pz),o.value&&(k.overflowY="hidden",i.scrollMoving&&(k.pointerEvents="none"))),k});return Se([()=>$.start,()=>$.end,a],()=>{if(e.onVisibleChange){const k=a.value.slice($.start,$.end+1);e.onVisibleChange(k,a.value)}},{flush:"post"}),{state:i,mergedData:a,componentStyle:B,onFallbackScroll:E,onScrollBar:M,componentRef:c,useVirtual:o,calRes:$,collectHeight:y,setInstance:g,sharedConfig:h,scrollBarRef:d,fillerInnerRef:u,delayHideScrollBar:()=>{var k;(k=d.value)===null||k===void 0||k.delayHidden()}}},render(){const e=v(v({},this.$props),this.$attrs),{prefixCls:t="rc-virtual-list",height:n,itemHeight:o,fullHeight:r,data:i,itemKey:l,virtual:a,component:s="div",onScroll:c,children:u=this.$slots.default,style:d,class:f}=e,h=wz(e,["prefixCls","height","itemHeight","fullHeight","data","itemKey","virtual","component","onScroll","children","style","class"]),m=ce(t,f),{scrollTop:g}=this.state,{scrollHeight:y,offset:b,start:S,end:$}=this.calRes,{componentStyle:x,onFallbackScroll:C,onScrollBar:O,useVirtual:w,collectHeight:P,sharedConfig:T,setInstance:M,mergedData:E,delayHideScrollBar:A}=this;return p("div",D({style:v(v({},d),{position:"relative"}),class:m},h),[p(s,{class:`${t}-holder`,style:x,ref:"componentRef",onScroll:C,onMouseenter:A},{default:()=>[p(Oh,{prefixCls:t,height:y,offset:b,onInnerResize:P,ref:"fillerInnerRef"},{default:()=>Iz(E,S,$,M,u,T)})]}),w&&p(vz,{ref:"scrollBarRef",prefixCls:t,scrollTop:g,height:n,scrollHeight:y,count:E.length,onScroll:O,onStartMove:()=>{this.state.scrollMoving=!0},onStopMove:()=>{this.state.scrollMoving=!1}},null)])}});function Iy(e,t,n){const o=ie(e());return Se(t,(r,i)=>{n?n(r,i)&&(o.value=e()):o.value=e()}),o}function Tz(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}const eI=Symbol("SelectContextKey");function Ez(e){return qe(eI,e)}function _z(){return Ke(eI,{})}var Mz=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r`${r.prefixCls}-item`),a=Iy(()=>i.flattenOptions,[()=>r.open,()=>i.flattenOptions],C=>C[0]),s=Yc(),c=C=>{C.preventDefault()},u=C=>{s.current&&s.current.scrollTo(typeof C=="number"?{index:C}:C)},d=function(C){let O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const w=a.value.length;for(let P=0;P1&&arguments[1]!==void 0?arguments[1]:!1;f.activeIndex=C;const w={source:O?"keyboard":"mouse"},P=a.value[C];if(!P){i.onActiveValue(null,-1,w);return}i.onActiveValue(P.value,C,w)};Se([()=>a.value.length,()=>r.searchValue],()=>{h(i.defaultActiveFirstOption!==!1?d(0):-1)},{immediate:!0});const m=C=>i.rawValues.has(C)&&r.mode!=="combobox";Se([()=>r.open,()=>r.searchValue],()=>{if(!r.multiple&&r.open&&i.rawValues.size===1){const C=Array.from(i.rawValues)[0],O=nt(a.value).findIndex(w=>{let{data:P}=w;return P[i.fieldNames.value]===C});O!==-1&&(h(O),lt(()=>{u(O)}))}r.open&<(()=>{var C;(C=s.current)===null||C===void 0||C.scrollTo(void 0)})},{immediate:!0,flush:"post"});const g=C=>{C!==void 0&&i.onSelect(C,{selected:!i.rawValues.has(C)}),r.multiple||r.toggleOpen(!1)},y=C=>typeof C.label=="function"?C.label():C.label;function b(C){const O=a.value[C];if(!O)return null;const w=O.data||{},{value:P}=w,{group:T}=O,M=el(w,!0),E=y(O);return O?p("div",D(D({"aria-label":typeof E=="string"&&!T?E:null},M),{},{key:C,role:T?"presentation":"option",id:`${r.id}_list_${C}`,"aria-selected":m(P)}),[P]):null}return n({onKeydown:C=>{const{which:O,ctrlKey:w}=C;switch(O){case Ie.N:case Ie.P:case Ie.UP:case Ie.DOWN:{let P=0;if(O===Ie.UP?P=-1:O===Ie.DOWN?P=1:Tz()&&w&&(O===Ie.N?P=1:O===Ie.P&&(P=-1)),P!==0){const T=d(f.activeIndex+P,P);u(T),h(T,!0)}break}case Ie.ENTER:{const P=a.value[f.activeIndex];P&&!P.data.disabled?g(P.value):g(void 0),r.open&&C.preventDefault();break}case Ie.ESC:r.toggleOpen(!1),r.open&&C.stopPropagation()}},onKeyup:()=>{},scrollTo:C=>{u(C)}}),()=>{const{id:C,notFoundContent:O,onPopupScroll:w}=r,{menuItemSelectedIcon:P,fieldNames:T,virtual:M,listHeight:E,listItemHeight:A}=i,R=o.option,{activeIndex:F}=f,_=Object.keys(T).map(N=>T[N]);return a.value.length===0?p("div",{role:"listbox",id:`${C}_list`,class:`${l.value}-empty`,onMousedown:c},[O]):p(He,null,[p("div",{role:"listbox",id:`${C}_list`,style:{height:0,width:0,overflow:"hidden"}},[b(F-1),b(F),b(F+1)]),p(Q8,{itemKey:"key",ref:s,data:a.value,height:E,itemHeight:A,fullHeight:!1,onMousedown:c,onScroll:w,virtual:M},{default:(N,B)=>{var L;const{group:k,groupOption:z,data:H,value:j}=N,{key:Y}=H,Z=typeof N.label=="function"?N.label():N.label;if(k){const pe=(L=H.title)!==null&&L!==void 0?L:Ix(Z)&&Z;return p("div",{class:ce(l.value,`${l.value}-group`),title:pe},[R?R(H):Z!==void 0?Z:Y])}const{disabled:G,title:te,children:U,style:Q,class:J,className:X}=H,q=Mz(H,["disabled","title","children","style","class","className"]),V=rt(q,_),K=m(j),ee=`${l.value}-option`,ue=ce(l.value,ee,J,X,{[`${ee}-grouped`]:z,[`${ee}-active`]:F===B&&!G,[`${ee}-disabled`]:G,[`${ee}-selected`]:K}),ae=y(N),le=!P||typeof P=="function"||K,ne=typeof ae=="number"?ae:ae||j;let se=Ix(ne)?ne.toString():void 0;return te!==void 0&&(se=te),p("div",D(D({},V),{},{"aria-selected":K,class:ue,title:se,onMousemove:pe=>{q.onMousemove&&q.onMousemove(pe),!(F===B||G)&&h(B)},onClick:pe=>{G||g(j),q.onClick&&q.onClick(pe)},style:Q}),[p("div",{class:`${ee}-content`},[R?R(H):ne]),qt(P)||K,le&&p(Xl,{class:`${l.value}-option-state`,customizeIcon:P,customizeIconProps:{isSelected:K}},{default:()=>[K?"✓":null]})])}})])}}});var Rz=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r1&&arguments[1]!==void 0?arguments[1]:!1;return xt(e).map((o,r)=>{var i;if(!qt(o)||!o.type)return null;const{type:{isSelectOptGroup:l},key:a,children:s,props:c}=o;if(t||!l)return Dz(o);const u=s&&s.default?s.default():void 0,d=(c==null?void 0:c.label)||((i=s.label)===null||i===void 0?void 0:i.call(s))||a;return v(v({key:`__RC_SELECT_GRP__${a===null?r:String(a)}__`},c),{label:d,options:tI(u||[])})}).filter(o=>o)}function Nz(e,t,n){const o=oe(),r=oe(),i=oe(),l=oe([]);return Se([e,t],()=>{e.value?l.value=nt(e.value).slice():l.value=tI(t.value)},{immediate:!0,deep:!0}),je(()=>{const a=l.value,s=new Map,c=new Map,u=n.value;function d(f){let h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(let m=0;m0&&arguments[0]!==void 0?arguments[0]:ie("");const t=`rc_select_${Lz()}`;return e.value||t}function nI(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function pm(e,t){return nI(e).join("").toUpperCase().includes(t)}const kz=(e,t,n,o,r)=>I(()=>{const i=n.value,l=r==null?void 0:r.value,a=o==null?void 0:o.value;if(!i||a===!1)return e.value;const{options:s,label:c,value:u}=t.value,d=[],f=typeof a=="function",h=i.toUpperCase(),m=f?a:(y,b)=>l?pm(b[l],h):b[s]?pm(b[c!=="children"?c:"label"],h):pm(b[u],h),g=f?y=>Qv(y):y=>y;return e.value.forEach(y=>{if(y[s]){if(m(i,g(y)))d.push(y);else{const S=y[s].filter($=>m(i,g($)));S.length&&d.push(v(v({},y),{[s]:S}))}return}m(i,g(y))&&d.push(y)}),d}),Fz=(e,t)=>{const n=oe({values:new Map,options:new Map});return[I(()=>{const{values:i,options:l}=n.value,a=e.value.map(u=>{var d;return u.label===void 0?v(v({},u),{label:(d=i.get(u.value))===null||d===void 0?void 0:d.label}):u}),s=new Map,c=new Map;return a.forEach(u=>{s.set(u.value,u),c.set(u.value,t.value.get(u.value)||l.get(u.value))}),n.value.values=s,n.value.options=c,a}),i=>t.value.get(i)||n.value.options.get(i)]};function Mt(e,t){const{defaultValue:n,value:o=ie()}=t||{};let r=typeof e=="function"?e():e;o.value!==void 0&&(r=ct(o)),n!==void 0&&(r=typeof n=="function"?n():n);const i=ie(r),l=ie(r);je(()=>{let s=o.value!==void 0?o.value:i.value;t.postState&&(s=t.postState(s)),l.value=s});function a(s){const c=l.value;i.value=s,nt(l.value)!==s&&t.onChange&&t.onChange(s,c)}return Se(o,()=>{i.value=o.value}),[l,a]}function St(e){const t=typeof e=="function"?e():e,n=ie(t);function o(r){n.value=r}return[n,o]}const zz=["inputValue"];function oI(){return v(v({},wh()),{prefixCls:String,id:String,backfill:{type:Boolean,default:void 0},fieldNames:Object,inputValue:String,searchValue:String,onSearch:Function,autoClearSearchValue:{type:Boolean,default:void 0},onSelect:Function,onDeselect:Function,filterOption:{type:[Boolean,Function],default:void 0},filterSort:Function,optionFilterProp:String,optionLabelProp:String,options:Array,defaultActiveFirstOption:{type:Boolean,default:void 0},virtual:{type:Boolean,default:void 0},listHeight:Number,listItemHeight:Number,menuItemSelectedIcon:W.any,mode:String,labelInValue:{type:Boolean,default:void 0},value:W.any,defaultValue:W.any,onChange:Function,children:Array})}function Hz(e){return!e||typeof e!="object"}const jz=re({compatConfig:{MODE:3},name:"VcSelect",inheritAttrs:!1,props:et(oI(),{prefixCls:"vc-select",autoClearSearchValue:!0,listHeight:200,listItemHeight:20,dropdownMatchSelectWidth:!0}),setup(e,t){let{expose:n,attrs:o,slots:r}=t;const i=Ty(We(e,"id")),l=I(()=>q8(e.mode)),a=I(()=>!!(!e.options&&e.children)),s=I(()=>e.filterOption===void 0&&e.mode==="combobox"?!1:e.filterOption),c=I(()=>m8(e.fieldNames,a.value)),[u,d]=Mt("",{value:I(()=>e.searchValue!==void 0?e.searchValue:e.inputValue),postState:J=>J||""}),f=Nz(We(e,"options"),We(e,"children"),c),{valueOptions:h,labelOptions:m,options:g}=f,y=J=>nI(J).map(q=>{var V,K;let ee,ue,ae,le;Hz(q)?ee=q:(ae=q.key,ue=q.label,ee=(V=q.value)!==null&&V!==void 0?V:ae);const ne=h.value.get(ee);return ne&&(ue===void 0&&(ue=ne==null?void 0:ne[e.optionLabelProp||c.value.label]),ae===void 0&&(ae=(K=ne==null?void 0:ne.key)!==null&&K!==void 0?K:ee),le=ne==null?void 0:ne.disabled),{label:ue,value:ee,key:ae,disabled:le,option:ne}}),[b,S]=Mt(e.defaultValue,{value:We(e,"value")}),$=I(()=>{var J;const X=y(b.value);return e.mode==="combobox"&&!(!((J=X[0])===null||J===void 0)&&J.value)?[]:X}),[x,C]=Fz($,h),O=I(()=>{if(!e.mode&&x.value.length===1){const J=x.value[0];if(J.value===null&&(J.label===null||J.label===void 0))return[]}return x.value.map(J=>{var X;return v(v({},J),{label:(X=typeof J.label=="function"?J.label():J.label)!==null&&X!==void 0?X:J.value})})}),w=I(()=>new Set(x.value.map(J=>J.value)));je(()=>{var J;if(e.mode==="combobox"){const X=(J=x.value[0])===null||J===void 0?void 0:J.value;X!=null&&d(String(X))}},{flush:"post"});const P=(J,X)=>{const q=X??J;return{[c.value.value]:J,[c.value.label]:q}},T=oe();je(()=>{if(e.mode!=="tags"){T.value=g.value;return}const J=g.value.slice(),X=q=>h.value.has(q);[...x.value].sort((q,V)=>q.value{const V=q.value;X(V)||J.push(P(V,q.label))}),T.value=J});const M=kz(T,c,u,s,We(e,"optionFilterProp")),E=I(()=>e.mode!=="tags"||!u.value||M.value.some(J=>J[e.optionFilterProp||"value"]===u.value)?M.value:[P(u.value),...M.value]),A=I(()=>e.filterSort?[...E.value].sort((J,X)=>e.filterSort(J,X)):E.value),R=I(()=>dB(A.value,{fieldNames:c.value,childrenAsData:a.value})),F=J=>{const X=y(J);if(S(X),e.onChange&&(X.length!==x.value.length||X.some((q,V)=>{var K;return((K=x.value[V])===null||K===void 0?void 0:K.value)!==(q==null?void 0:q.value)}))){const q=e.labelInValue?X.map(K=>v(v({},K),{originLabel:K.label,label:typeof K.label=="function"?K.label():K.label})):X.map(K=>K.value),V=X.map(K=>Qv(C(K.value)));e.onChange(l.value?q:q[0],l.value?V:V[0])}},[_,N]=St(null),[B,L]=St(0),k=I(()=>e.defaultActiveFirstOption!==void 0?e.defaultActiveFirstOption:e.mode!=="combobox"),z=function(J,X){let{source:q="keyboard"}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};L(X),e.backfill&&e.mode==="combobox"&&J!==null&&q==="keyboard"&&N(String(J))},H=(J,X)=>{const q=()=>{var V;const K=C(J),ee=K==null?void 0:K[c.value.label];return[e.labelInValue?{label:typeof ee=="function"?ee():ee,originLabel:ee,value:J,key:(V=K==null?void 0:K.key)!==null&&V!==void 0?V:J}:J,Qv(K)]};if(X&&e.onSelect){const[V,K]=q();e.onSelect(V,K)}else if(!X&&e.onDeselect){const[V,K]=q();e.onDeselect(V,K)}},j=(J,X)=>{let q;const V=l.value?X.selected:!0;V?q=l.value?[...x.value,J]:[J]:q=x.value.filter(K=>K.value!==J),F(q),H(J,V),e.mode==="combobox"?N(""):(!l.value||e.autoClearSearchValue)&&(d(""),N(""))},Y=(J,X)=>{F(J),(X.type==="remove"||X.type==="clear")&&X.values.forEach(q=>{H(q.value,!1)})},Z=(J,X)=>{var q;if(d(J),N(null),X.source==="submit"){const V=(J||"").trim();if(V){const K=Array.from(new Set([...w.value,V]));F(K),H(V,!0),d("")}return}X.source!=="blur"&&(e.mode==="combobox"&&F(J),(q=e.onSearch)===null||q===void 0||q.call(e,J))},G=J=>{let X=J;e.mode!=="tags"&&(X=J.map(V=>{const K=m.value.get(V);return K==null?void 0:K.value}).filter(V=>V!==void 0));const q=Array.from(new Set([...w.value,...X]));F(q),q.forEach(V=>{H(V,!0)})},te=I(()=>e.virtual!==!1&&e.dropdownMatchSelectWidth!==!1);Ez(Yf(v(v({},f),{flattenOptions:R,onActiveValue:z,defaultActiveFirstOption:k,onSelect:j,menuItemSelectedIcon:We(e,"menuItemSelectedIcon"),rawValues:w,fieldNames:c,virtual:te,listHeight:We(e,"listHeight"),listItemHeight:We(e,"listItemHeight"),childrenAsData:a})));const U=ie();n({focus(){var J;(J=U.value)===null||J===void 0||J.focus()},blur(){var J;(J=U.value)===null||J===void 0||J.blur()},scrollTo(J){var X;(X=U.value)===null||X===void 0||X.scrollTo(J)}});const Q=I(()=>rt(e,["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"]));return()=>p(Py,D(D(D({},Q.value),o),{},{id:i,prefixCls:e.prefixCls,ref:U,omitDomProps:zz,mode:e.mode,displayValues:O.value,onDisplayValuesChange:Y,searchValue:u.value,onSearch:Z,onSearchSplit:G,dropdownMatchSelectWidth:e.dropdownMatchSelectWidth,OptionList:Az,emptyOptions:!R.value.length,activeValue:_.value,activeDescendantId:`${i}_list_${B.value}`}),r)}}),Ey=()=>null;Ey.isSelectOption=!0;Ey.displayName="ASelectOption";const _y=()=>null;_y.isSelectOptGroup=!0;_y.displayName="ASelectOptGroup";var Vz={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},Wz=Symbol("iconContext"),rI=function(){return Ke(Wz,{prefixCls:ie("anticon"),rootClassName:ie(""),csp:ie()})};function My(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Kz(e,t){return e&&e.contains?e.contains(t):!1}var Ex="data-vc-order",Uz="vc-icon-key",c0=new Map;function iI(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):Uz}function Ay(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function Gz(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function lI(e){return Array.from((c0.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function aI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!My())return null;var n=t.csp,o=t.prepend,r=document.createElement("style");r.setAttribute(Ex,Gz(o)),n&&n.nonce&&(r.nonce=n.nonce),r.innerHTML=e;var i=Ay(t),l=i.firstChild;if(o){if(o==="queue"){var a=lI(i).filter(function(s){return["prepend","prependQueue"].includes(s.getAttribute(Ex))});if(a.length)return i.insertBefore(r,a[a.length-1].nextSibling),r}i.insertBefore(r,l)}else i.appendChild(r);return r}function Xz(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Ay(t);return lI(n).find(function(o){return o.getAttribute(iI(t))===e})}function Yz(e,t){var n=c0.get(e);if(!n||!Kz(document,n)){var o=aI("",t),r=o.parentNode;c0.set(e,r),e.removeChild(o)}}function qz(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=Ay(n);Yz(o,n);var r=Xz(t,n);if(r)return n.csp&&n.csp.nonce&&r.nonce!==n.csp.nonce&&(r.nonce=n.csp.nonce),r.innerHTML!==e&&(r.innerHTML=e),r;var i=aI(e,n);return i.setAttribute(iI(n),t),i}function _x(e){for(var t=1;t * { + line-height: 1; +} + +.anticon svg { + display: inline-block; +} + +.anticon::before { + display: none; +} + +.anticon .anticon-icon { + display: block; +} + +.anticon[tabindex] { + cursor: pointer; +} + +.anticon-spin::before, +.anticon-spin { + display: inline-block; + -webkit-animation: loadingCircle 1s infinite linear; + animation: loadingCircle 1s infinite linear; +} + +@-webkit-keyframes loadingCircle { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes loadingCircle { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +`;function uI(e){return e&&e.getRootNode&&e.getRootNode()}function Qz(e){return My()?uI(e)instanceof ShadowRoot:!1}function eH(e){return Qz(e)?uI(e):null}var tH=function(){var t=rI(),n=t.prefixCls,o=t.csp,r=$n(),i=Jz;n&&(i=i.replace(/anticon/g,n.value)),lt(function(){if(My()){var l=r.vnode.el,a=eH(l);qz(i,"@ant-design-vue-icons",{prepend:!0,csp:o.value,attachTo:a})}})},nH=["icon","primaryColor","secondaryColor"];function oH(e,t){if(e==null)return{};var n=rH(e,t),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function rH(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,i;for(i=0;i=0)&&(n[r]=e[r]);return n}function zd(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=new Array(t);ne.length)&&(t=e.length);for(var n=0,o=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function CH(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,i;for(i=0;i=0)&&(n[r]=e[r]);return n}dI(rN.primary);var Ve=function(t,n){var o,r=Dx({},t,n.attrs),i=r.class,l=r.icon,a=r.spin,s=r.rotate,c=r.tabindex,u=r.twoToneColor,d=r.onClick,f=$H(r,gH),h=rI(),m=h.prefixCls,g=h.rootClassName,y=(o={},nc(o,g.value,!!g.value),nc(o,m.value,!0),nc(o,"".concat(m.value,"-").concat(l.name),!!l.name),nc(o,"".concat(m.value,"-spin"),!!a||l.name==="loading"),o),b=c;b===void 0&&d&&(b=-1);var S=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,$=cI(u),x=mH($,2),C=x[0],O=x[1];return p("span",Dx({role:"img","aria-label":l.name},f,{onClick:d,class:[y,i],tabindex:b}),[p(tl,{icon:l,primaryColor:C,secondaryColor:O,style:S},null),p(hH,null,null)])};Ve.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:[String,Array]};Ve.displayName="AntdIcon";Ve.inheritAttrs=!1;Ve.getTwoToneColor=pH;Ve.setTwoToneColor=dI;function Nx(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};const{loading:n,multiple:o,prefixCls:r,hasFeedback:i,feedbackIcon:l,showArrow:a}=e,s=e.suffixIcon||t.suffixIcon&&t.suffixIcon(),c=e.clearIcon||t.clearIcon&&t.clearIcon(),u=e.menuItemSelectedIcon||t.menuItemSelectedIcon&&t.menuItemSelectedIcon(),d=e.removeIcon||t.removeIcon&&t.removeIcon(),f=c??p(Un,null,null),h=b=>p(He,null,[a!==!1&&b,i&&l]);let m=null;if(s!==void 0)m=h(s);else if(n)m=h(p(io,{spin:!0},null));else{const b=`${r}-suffix`;m=S=>{let{open:$,showSearch:x}=S;return h($&&x?p(ua,{class:b},null):p(nl,{class:b},null))}}let g=null;u!==void 0?g=u:o?g=p(Cs,null,null):g=null;let y=null;return d!==void 0?y=d:y=p(Kn,null,null),{clearIcon:f,suffixIcon:m,itemIcon:g,removeIcon:y}}function Dy(e){const t=Symbol("contextKey");return{useProvide:(r,i)=>{const l=ft({});return qe(t,l),je(()=>{v(l,r,i||{})}),l},useInject:()=>Ke(t,e)||{}}}const qf=Symbol("ContextProps"),Zf=Symbol("InternalContextProps"),DH=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I(()=>!0);const n=ie(new Map),o=(i,l)=>{n.value.set(i,l),n.value=new Map(n.value)},r=i=>{n.value.delete(i),n.value=new Map(n.value)};Se([t,n],()=>{}),qe(qf,e),qe(Zf,{addFormItemField:o,removeFormItemField:r})},d0={id:I(()=>{}),onFieldBlur:()=>{},onFieldChange:()=>{},clearValidate:()=>{}},f0={addFormItemField:()=>{},removeFormItemField:()=>{}},ln=()=>{const e=Ke(Zf,f0),t=Symbol("FormItemFieldKey"),n=$n();return e.addFormItemField(t,n.type),tt(()=>{e.removeFormItemField(t)}),qe(Zf,f0),qe(qf,d0),Ke(qf,d0)},Jf=re({compatConfig:{MODE:3},name:"AFormItemRest",setup(e,t){let{slots:n}=t;return qe(Zf,f0),qe(qf,d0),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),yn=Dy({}),Qf=re({name:"NoFormStatus",setup(e,t){let{slots:n}=t;return yn.useProvide({}),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});function Fn(e,t,n){return ce({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n})}const gr=(e,t)=>t||e,NH=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},BH=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item`]:{"&:empty":{display:"none"}}}}},fI=Xe("Space",e=>[BH(e),NH(e)]);var LH="[object Symbol]";function Ph(e){return typeof e=="symbol"||fr(e)&&Qi(e)==LH}function Ny(e,t){for(var n=-1,o=e==null?0:e.length,r=Array(o);++n0){if(++t>=QH)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function oj(e){return function(){return e}}var ep=function(){try{var e=aa(Object,"defineProperty");return e({},"",{}),e}catch{}}(),rj=ep?function(e,t){return ep(e,"toString",{configurable:!0,enumerable:!1,value:oj(t),writable:!0})}:By,hI=nj(rj);function ij(e,t){for(var n=-1,o=e==null?0:e.length;++n-1}function Ly(e,t,n){t=="__proto__"&&ep?ep(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var cj=Object.prototype,uj=cj.hasOwnProperty;function ky(e,t,n){var o=e[t];(!(uj.call(e,t)&&py(o,n))||n===void 0&&!(t in e))&&Ly(e,t,n)}function vu(e,t,n,o){var r=!n;n||(n={});for(var i=-1,l=t.length;++ir?0:r+t),n=n>r?r:n,n<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(r);++o=t||w<0||d&&P>=i}function b(){var O=hm();if(y(O))return S(O);a=setTimeout(b,g(O))}function S(O){return a=void 0,f&&o?h(O):(o=r=void 0,l)}function $(){a!==void 0&&clearTimeout(a),c=0,o=s=r=a=void 0}function x(){return a===void 0?l:S(hm())}function C(){var O=hm(),w=y(O);if(o=arguments,r=this,s=O,w){if(a===void 0)return m(s);if(d)return clearTimeout(a),a=setTimeout(b,t),h(s)}return a===void 0&&(a=setTimeout(b,t)),l}return C.cancel=$,C.flush=x,C}function $W(e){return fr(e)&&ys(e)}function CW(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function xW(e){return function(t,n,o){var r=Object(t);if(!ys(t)){var i=Ky(n);t=Ss(t),n=function(a){return i(r[a],a,r)}}var l=e(t,n,o);return l>-1?r[i?t[l]:l]:void 0}}var wW=Math.max;function OW(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var r=n==null?0:XH(n);return r<0&&(r=wW(o+r,0)),gI(e,Ky(t),r)}var PW=xW(OW);function IW(e){for(var t=-1,n=e==null?0:e.length,o={};++t=120&&u.length>=120?new ds(l&&u):void 0}u=e[0];var d=-1,f=a[0];e:for(;++d1),i}),vu(e,CI(e),n),o&&(n=bc(n,VW|WW|KW,jW));for(var r=t.length;r--;)HW(n,t[r]);return n});function GW(e,t,n,o){if(!dr(e))return e;t=xs(t,e);for(var r=-1,i=t.length,l=i-1,a=e;a!=null&&++r=QW){var c=JW(e);if(c)return hy(c);l=!1,r=Kf,s=new ds}else s=a;e:for(;++o({compactSize:String,compactDirection:W.oneOf(Mn("horizontal","vertical")).def("horizontal"),isFirstItem:Ce(),isLastItem:Ce()}),Th=Dy(null),ol=(e,t)=>{const n=Th.useInject(),o=I(()=>{if(!n||EI(n))return"";const{compactDirection:r,isFirstItem:i,isLastItem:l}=n,a=r==="vertical"?"-vertical-":"-";return ce({[`${e.value}-compact${a}item`]:!0,[`${e.value}-compact${a}first-item`]:i,[`${e.value}-compact${a}last-item`]:l,[`${e.value}-compact${a}item-rtl`]:t.value==="rtl"})});return{compactSize:I(()=>n==null?void 0:n.compactSize),compactDirection:I(()=>n==null?void 0:n.compactDirection),compactItemClassnames:o}},qc=re({name:"NoCompactStyle",setup(e,t){let{slots:n}=t;return Th.useProvide(null),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),nK=()=>({prefixCls:String,size:{type:String},direction:W.oneOf(Mn("horizontal","vertical")).def("horizontal"),align:W.oneOf(Mn("start","end","center","baseline")),block:{type:Boolean,default:void 0}}),oK=re({name:"CompactItem",props:tK(),setup(e,t){let{slots:n}=t;return Th.useProvide(e),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),tp=re({name:"ASpaceCompact",inheritAttrs:!1,props:nK(),setup(e,t){let{attrs:n,slots:o}=t;const{prefixCls:r,direction:i}=Ee("space-compact",e),l=Th.useInject(),[a,s]=fI(r),c=I(()=>ce(r.value,s.value,{[`${r.value}-rtl`]:i.value==="rtl",[`${r.value}-block`]:e.block,[`${r.value}-vertical`]:e.direction==="vertical"}));return()=>{var u;const d=xt(((u=o.default)===null||u===void 0?void 0:u.call(o))||[]);return d.length===0?null:a(p("div",D(D({},n),{},{class:[c.value,n.class]}),[d.map((f,h)=>{var m;const g=f&&f.key||`${r.value}-item-${h}`,y=!l||EI(l);return p(oK,{key:g,compactSize:(m=e.size)!==null&&m!==void 0?m:"middle",compactDirection:e.direction,isFirstItem:h===0&&(y||(l==null?void 0:l.isFirstItem)),isLastItem:h===d.length-1&&(y||(l==null?void 0:l.isLastItem))},{default:()=>[f]})})]))}}}),rK=e=>({animationDuration:e,animationFillMode:"both"}),iK=e=>({animationDuration:e,animationFillMode:"both"}),bu=function(e,t,n,o){const i=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[` + ${i}${e}-enter, + ${i}${e}-appear + `]:v(v({},rK(o)),{animationPlayState:"paused"}),[`${i}${e}-leave`]:v(v({},iK(o)),{animationPlayState:"paused"}),[` + ${i}${e}-enter${e}-enter-active, + ${i}${e}-appear${e}-appear-active + `]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},lK=new it("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),aK=new it("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),Gy=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:n}=e,o=`${n}-fade`,r=t?"&":"";return[bu(o,lK,aK,e.motionDurationMid,t),{[` + ${r}${o}-enter, + ${r}${o}-appear + `]:{opacity:0,animationTimingFunction:"linear"},[`${r}${o}-leave`]:{animationTimingFunction:"linear"}}]},sK=new it("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),cK=new it("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),uK=new it("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),dK=new it("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),fK=new it("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),pK=new it("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),hK=new it("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),gK=new it("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),mK={"move-up":{inKeyframes:hK,outKeyframes:gK},"move-down":{inKeyframes:sK,outKeyframes:cK},"move-left":{inKeyframes:uK,outKeyframes:dK},"move-right":{inKeyframes:fK,outKeyframes:pK}},ps=(e,t)=>{const{antCls:n}=e,o=`${n}-${t}`,{inKeyframes:r,outKeyframes:i}=mK[t];return[bu(o,r,i,e.motionDurationMid),{[` + ${o}-enter, + ${o}-appear + `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${o}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Eh=new it("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),_h=new it("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Mh=new it("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Ah=new it("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),vK=new it("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),bK=new it("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),yK=new it("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),SK=new it("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),$K={"slide-up":{inKeyframes:Eh,outKeyframes:_h},"slide-down":{inKeyframes:Mh,outKeyframes:Ah},"slide-left":{inKeyframes:vK,outKeyframes:bK},"slide-right":{inKeyframes:yK,outKeyframes:SK}},Br=(e,t)=>{const{antCls:n}=e,o=`${n}-${t}`,{inKeyframes:r,outKeyframes:i}=$K[t];return[bu(o,r,i,e.motionDurationMid),{[` + ${o}-enter, + ${o}-appear + `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint},[`${o}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},Xy=new it("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),CK=new it("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),tw=new it("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),nw=new it("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),xK=new it("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),wK=new it("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),OK=new it("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),PK=new it("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),IK=new it("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),TK=new it("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),EK=new it("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),_K=new it("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),MK={zoom:{inKeyframes:Xy,outKeyframes:CK},"zoom-big":{inKeyframes:tw,outKeyframes:nw},"zoom-big-fast":{inKeyframes:tw,outKeyframes:nw},"zoom-left":{inKeyframes:OK,outKeyframes:PK},"zoom-right":{inKeyframes:IK,outKeyframes:TK},"zoom-up":{inKeyframes:xK,outKeyframes:wK},"zoom-down":{inKeyframes:EK,outKeyframes:_K}},ws=(e,t)=>{const{antCls:n}=e,o=`${n}-${t}`,{inKeyframes:r,outKeyframes:i}=MK[t];return[bu(o,r,i,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[` + ${o}-enter, + ${o}-appear + `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${o}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},yu=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, + opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, + opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),ow=e=>{const{controlPaddingHorizontal:t}=e;return{position:"relative",display:"block",minHeight:e.controlHeight,padding:`${(e.controlHeight-e.fontSize*e.lineHeight)/2}px ${t}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,boxSizing:"border-box"}},AK=e=>{const{antCls:t,componentCls:n}=e,o=`${n}-item`;return[{[`${n}-dropdown`]:v(v({},Ze(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[` + &${t}-slide-up-enter${t}-slide-up-enter-active${n}-dropdown-placement-bottomLeft, + &${t}-slide-up-appear${t}-slide-up-appear-active${n}-dropdown-placement-bottomLeft + `]:{animationName:Eh},[` + &${t}-slide-up-enter${t}-slide-up-enter-active${n}-dropdown-placement-topLeft, + &${t}-slide-up-appear${t}-slide-up-appear-active${n}-dropdown-placement-topLeft + `]:{animationName:Mh},[`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-bottomLeft`]:{animationName:_h},[`&${t}-slide-up-leave${t}-slide-up-leave-active${n}-dropdown-placement-topLeft`]:{animationName:Ah},"&-hidden":{display:"none"},"&-empty":{color:e.colorTextDisabled},[`${o}-empty`]:v(v({},ow(e)),{color:e.colorTextDisabled}),[`${o}`]:v(v({},ow(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":v({flex:"auto"},Zt),"&-state":{flex:"none"},[`&-active:not(${o}-option-disabled)`]:{backgroundColor:e.controlItemBgHover},[`&-selected:not(${o}-option-disabled)`]:{color:e.colorText,fontWeight:e.fontWeightStrong,backgroundColor:e.controlItemBgActive,[`${o}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${o}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},Br(e,"slide-up"),Br(e,"slide-down"),ps(e,"move-up"),ps(e,"move-down")]},ba=2;function MI(e){let{controlHeightSM:t,controlHeight:n,lineWidth:o}=e;const r=(n-t)/2-o,i=Math.ceil(r/2);return[r,i]}function mm(e,t){const{componentCls:n,iconCls:o}=e,r=`${n}-selection-overflow`,i=e.controlHeightSM,[l]=MI(e),a=t?`${n}-${t}`:"";return{[`${n}-multiple${a}`]:{fontSize:e.fontSize,[r]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${n}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${l-ba}px ${ba*2}px`,borderRadius:e.borderRadius,[`${n}-show-search&`]:{cursor:"text"},[`${n}-disabled&`]:{background:e.colorBgContainerDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${ba}px 0`,lineHeight:`${i}px`,content:'"\\a0"'}},[` + &${n}-show-arrow ${n}-selector, + &${n}-allow-clear ${n}-selector + `]:{paddingInlineEnd:e.fontSizeIcon+e.controlPaddingHorizontal},[`${n}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:i,marginTop:ba,marginBottom:ba,lineHeight:`${i-e.lineWidth*2}px`,background:e.colorFillSecondary,border:`${e.lineWidth}px solid ${e.colorSplit}`,borderRadius:e.borderRadiusSM,cursor:"default",transition:`font-size ${e.motionDurationSlow}, line-height ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,userSelect:"none",marginInlineEnd:ba*2,paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS/2,[`${n}-disabled&`]:{color:e.colorTextDisabled,borderColor:e.colorBorder,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":v(v({},ra()),{display:"inline-block",color:e.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${o}`]:{verticalAlign:"-0.2em"},"&:hover":{color:e.colorIconHover}})},[`${r}-item + ${r}-item`]:{[`${n}-selection-search`]:{marginInlineStart:0}},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.inputPaddingHorizontalBase-l,"\n &-input,\n &-mirror\n ":{height:i,fontFamily:e.fontFamily,lineHeight:`${i}px`,transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}}}}function RK(e){const{componentCls:t}=e,n=Fe(e,{controlHeight:e.controlHeightSM,controlHeightSM:e.controlHeightXS,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),[,o]=MI(e);return[mm(e),mm(n,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInlineStart:e.controlPaddingHorizontalSM-e.lineWidth,insetInlineEnd:"auto"},[`${t}-selection-search`]:{marginInlineStart:o}}},mm(Fe(e,{fontSize:e.fontSizeLG,controlHeight:e.controlHeightLG,controlHeightSM:e.controlHeight,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius}),"lg")]}function vm(e,t){const{componentCls:n,inputPaddingHorizontalBase:o,borderRadius:r}=e,i=e.controlHeight-e.lineWidth*2,l=Math.ceil(e.fontSize*1.25),a=t?`${n}-${t}`:"";return{[`${n}-single${a}`]:{fontSize:e.fontSize,[`${n}-selector`]:v(v({},Ze(e)),{display:"flex",borderRadius:r,[`${n}-selection-search`]:{position:"absolute",top:0,insetInlineStart:o,insetInlineEnd:o,bottom:0,"&-input":{width:"100%"}},[` + ${n}-selection-item, + ${n}-selection-placeholder + `]:{padding:0,lineHeight:`${i}px`,transition:`all ${e.motionDurationSlow}`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${i}px`}},[`${n}-selection-item`]:{position:"relative",userSelect:"none"},[`${n}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${n}-selection-item:after`,`${n}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[` + &${n}-show-arrow ${n}-selection-item, + &${n}-show-arrow ${n}-selection-placeholder + `]:{paddingInlineEnd:l},[`&${n}-open ${n}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:e.controlHeight,padding:`0 ${o}px`,[`${n}-selection-search-input`]:{height:i},"&:after":{lineHeight:`${i}px`}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${o}px`,"&:after":{display:"none"}}}}}}}function DK(e){const{componentCls:t}=e,n=e.controlPaddingHorizontalSM-e.lineWidth;return[vm(e),vm(Fe(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selection-search`]:{insetInlineStart:n,insetInlineEnd:n},[`${t}-selector`]:{padding:`0 ${n}px`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:n+e.fontSize*1.5},[` + &${t}-show-arrow ${t}-selection-item, + &${t}-show-arrow ${t}-selection-placeholder + `]:{paddingInlineEnd:e.fontSize*1.5}}}},vm(Fe(e,{controlHeight:e.controlHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}function NK(e,t,n){const{focusElCls:o,focus:r,borderElCls:i}=n,l=i?"> *":"",a=["hover",r?"focus":null,"active"].filter(Boolean).map(s=>`&:${s} ${l}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:-e.lineWidth},"&-item":v(v({[a]:{zIndex:2}},o?{[`&${o}`]:{zIndex:2}}:{}),{[`&[disabled] ${l}`]:{zIndex:0}})}}function BK(e,t,n){const{borderElCls:o}=n,r=o?`> ${o}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${r}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${r}, &${e}-sm ${r}, &${e}-lg ${r}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${r}, &${e}-sm ${r}, &${e}-lg ${r}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Os(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:n}=e,o=`${n}-compact`;return{[o]:v(v({},NK(e,o,t)),BK(n,o,t))}}const LK=e=>{const{componentCls:t}=e;return{position:"relative",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${t}-disabled&`]:{color:e.colorTextDisabled,background:e.colorBgContainerDisabled,cursor:"not-allowed",[`${t}-multiple&`]:{background:e.colorBgContainerDisabled},input:{cursor:"not-allowed"}}}},bm=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:o,borderHoverColor:r,outlineColor:i,antCls:l}=t,a=n?{[`${o}-selector`]:{borderColor:r}}:{};return{[e]:{[`&:not(${o}-disabled):not(${o}-customize-input):not(${l}-pagination-size-changer)`]:v(v({},a),{[`${o}-focused& ${o}-selector`]:{borderColor:r,boxShadow:`0 0 0 ${t.controlOutlineWidth}px ${i}`,borderInlineEndWidth:`${t.controlLineWidth}px !important`,outline:0},[`&:hover ${o}-selector`]:{borderColor:r,borderInlineEndWidth:`${t.controlLineWidth}px !important`}})}}},kK=e=>{const{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},FK=e=>{const{componentCls:t,inputPaddingHorizontalBase:n,iconCls:o}=e;return{[t]:v(v({},Ze(e)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${t}-customize-input) ${t}-selector`]:v(v({},LK(e)),kK(e)),[`${t}-selection-item`]:v({flex:1,fontWeight:"normal"},Zt),[`${t}-selection-placeholder`]:v(v({},Zt),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${t}-arrow`]:v(v({},ra()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,height:e.fontSizeIcon,marginTop:-e.fontSizeIcon/2,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[o]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${t}-suffix)`]:{pointerEvents:"auto"}},[`${t}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${t}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:-e.fontSizeIcon/2,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:e.colorBgContainer,cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorTextTertiary}},"&:hover":{[`${t}-clear`]:{opacity:1}}}),[`${t}-has-feedback`]:{[`${t}-clear`]:{insetInlineEnd:n+e.fontSize+e.paddingXXS}}}},zK=e=>{const{componentCls:t}=e;return[{[t]:{[`&-borderless ${t}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${t}-in-form-item`]:{width:"100%"}}},FK(e),DK(e),RK(e),AK(e),{[`${t}-rtl`]:{direction:"rtl"}},bm(t,Fe(e,{borderHoverColor:e.colorPrimaryHover,outlineColor:e.controlOutline})),bm(`${t}-status-error`,Fe(e,{borderHoverColor:e.colorErrorHover,outlineColor:e.colorErrorOutline}),!0),bm(`${t}-status-warning`,Fe(e,{borderHoverColor:e.colorWarningHover,outlineColor:e.colorWarningOutline}),!0),Os(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},Yy=Xe("Select",(e,t)=>{let{rootPrefixCls:n}=t;const o=Fe(e,{rootPrefixCls:n,inputPaddingHorizontalBase:e.paddingSM-1});return[zK(o)]},e=>({zIndexPopup:e.zIndexPopupBase+50})),Rh=()=>v(v({},rt(oI(),["inputIcon","mode","getInputElement","getRawInputElement","backfill"])),{value:ze([Array,Object,String,Number]),defaultValue:ze([Array,Object,String,Number]),notFoundContent:W.any,suffixIcon:W.any,itemIcon:W.any,size:Be(),mode:Be(),bordered:Ce(!0),transitionName:String,choiceTransitionName:Be(""),popupClassName:String,dropdownClassName:String,placement:Be(),status:Be(),"onUpdate:value":ve()}),rw="SECRET_COMBOBOX_MODE_DO_NOT_USE",Cn=re({compatConfig:{MODE:3},name:"ASelect",Option:Ey,OptGroup:_y,inheritAttrs:!1,props:et(Rh(),{listHeight:256,listItemHeight:24}),SECRET_COMBOBOX_MODE_DO_NOT_USE:rw,slots:Object,setup(e,t){let{attrs:n,emit:o,slots:r,expose:i}=t;const l=ie(),a=ln(),s=yn.useInject(),c=I(()=>gr(s.status,e.status)),u=()=>{var H;(H=l.value)===null||H===void 0||H.focus()},d=()=>{var H;(H=l.value)===null||H===void 0||H.blur()},f=H=>{var j;(j=l.value)===null||j===void 0||j.scrollTo(H)},h=I(()=>{const{mode:H}=e;if(H!=="combobox")return H===rw?"combobox":H}),{prefixCls:m,direction:g,renderEmpty:y,size:b,getPrefixCls:S,getPopupContainer:$,disabled:x,select:C}=Ee("select",e),{compactSize:O,compactItemClassnames:w}=ol(m,g),P=I(()=>O.value||b.value),T=mo(),M=I(()=>{var H;return(H=x.value)!==null&&H!==void 0?H:T.value}),[E,A]=Yy(m),R=I(()=>S()),F=I(()=>e.placement!==void 0?e.placement:g.value==="rtl"?"bottomRight":"bottomLeft"),_=I(()=>jn(R.value,Cy(F.value),e.transitionName)),N=I(()=>ce({[`${m.value}-lg`]:P.value==="large",[`${m.value}-sm`]:P.value==="small",[`${m.value}-rtl`]:g.value==="rtl",[`${m.value}-borderless`]:!e.bordered,[`${m.value}-in-form-item`]:s.isFormItemInput},Fn(m.value,c.value,s.hasFeedback),w.value,A.value)),B=function(){for(var H=arguments.length,j=new Array(H),Y=0;Y{o("blur",H),a.onFieldBlur()};i({blur:d,focus:u,scrollTo:f});const k=I(()=>h.value==="multiple"||h.value==="tags"),z=I(()=>e.showArrow!==void 0?e.showArrow:e.loading||!(k.value||h.value==="combobox"));return()=>{var H,j,Y,Z;const{notFoundContent:G,listHeight:te=256,listItemHeight:U=24,popupClassName:Q,dropdownClassName:J,virtual:X,dropdownMatchSelectWidth:q,id:V=a.id.value,placeholder:K=(H=r.placeholder)===null||H===void 0?void 0:H.call(r),showArrow:ee}=e,{hasFeedback:ue,feedbackIcon:ae}=s;let le;G!==void 0?le=G:r.notFoundContent?le=r.notFoundContent():h.value==="combobox"?le=null:le=(y==null?void 0:y("Select"))||p(ty,{componentName:"Select"},null);const{suffixIcon:ne,itemIcon:se,removeIcon:pe,clearIcon:he}=Ry(v(v({},e),{multiple:k.value,prefixCls:m.value,hasFeedback:ue,feedbackIcon:ae,showArrow:z.value}),r),ge=rt(e,["prefixCls","suffixIcon","itemIcon","removeIcon","clearIcon","size","bordered","status"]),be=ce(Q||J,{[`${m.value}-dropdown-${g.value}`]:g.value==="rtl"},A.value);return E(p(jz,D(D(D({ref:l,virtual:X,dropdownMatchSelectWidth:q},ge),n),{},{showSearch:(j=e.showSearch)!==null&&j!==void 0?j:(Y=C==null?void 0:C.value)===null||Y===void 0?void 0:Y.showSearch,placeholder:K,listHeight:te,listItemHeight:U,mode:h.value,prefixCls:m.value,direction:g.value,inputIcon:ne,menuItemSelectedIcon:se,removeIcon:pe,clearIcon:he,notFoundContent:le,class:[N.value,n.class],getPopupContainer:$==null?void 0:$.value,dropdownClassName:be,onChange:B,onBlur:L,id:V,dropdownRender:ge.dropdownRender||r.dropdownRender,transitionName:_.value,children:(Z=r.default)===null||Z===void 0?void 0:Z.call(r),tagRender:e.tagRender||r.tagRender,optionLabelRender:r.optionLabel,maxTagPlaceholder:e.maxTagPlaceholder||r.maxTagPlaceholder,showArrow:ue||ee,disabled:M.value}),{option:r.option}))}}});Cn.install=function(e){return e.component(Cn.name,Cn),e.component(Cn.Option.displayName,Cn.Option),e.component(Cn.OptGroup.displayName,Cn.OptGroup),e};const HK=Cn.Option,jK=Cn.OptGroup,Wi=()=>null;Wi.isSelectOption=!0;Wi.displayName="AAutoCompleteOption";const Ga=()=>null;Ga.isSelectOptGroup=!0;Ga.displayName="AAutoCompleteOptGroup";function VK(e){var t,n;return((t=e==null?void 0:e.type)===null||t===void 0?void 0:t.isSelectOption)||((n=e==null?void 0:e.type)===null||n===void 0?void 0:n.isSelectOptGroup)}const WK=()=>v(v({},rt(Rh(),["loading","mode","optionLabelProp","labelInValue"])),{dataSource:Array,dropdownMenuStyle:{type:Object,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},prefixCls:String,showSearch:{type:Boolean,default:void 0},transitionName:String,choiceTransitionName:{type:String,default:"zoom"},autofocus:{type:Boolean,default:void 0},backfill:{type:Boolean,default:void 0},filterOption:{type:[Boolean,Function],default:!1},defaultActiveFirstOption:{type:Boolean,default:!0},status:String}),KK=Wi,UK=Ga,ym=re({compatConfig:{MODE:3},name:"AAutoComplete",inheritAttrs:!1,props:WK(),slots:Object,setup(e,t){let{slots:n,attrs:o,expose:r}=t;Eo(!e.dropdownClassName);const i=ie(),l=()=>{var u;const d=xt((u=n.default)===null||u===void 0?void 0:u.call(n));return d.length?d[0]:void 0};r({focus:()=>{var u;(u=i.value)===null||u===void 0||u.focus()},blur:()=>{var u;(u=i.value)===null||u===void 0||u.blur()}});const{prefixCls:c}=Ee("select",e);return()=>{var u,d,f;const{size:h,dataSource:m,notFoundContent:g=(u=n.notFoundContent)===null||u===void 0?void 0:u.call(n)}=e;let y;const{class:b}=o,S={[b]:!!b,[`${c.value}-lg`]:h==="large",[`${c.value}-sm`]:h==="small",[`${c.value}-show-search`]:!0,[`${c.value}-auto-complete`]:!0};if(e.options===void 0){const x=((d=n.dataSource)===null||d===void 0?void 0:d.call(n))||((f=n.options)===null||f===void 0?void 0:f.call(n))||[];x.length&&VK(x[0])?y=x:y=m?m.map(C=>{if(qt(C))return C;switch(typeof C){case"string":return p(Wi,{key:C,value:C},{default:()=>[C]});case"object":return p(Wi,{key:C.value,value:C.value},{default:()=>[C.text]});default:throw new Error("AutoComplete[dataSource] only supports type `string[] | Object[]`.")}}):[]}const $=rt(v(v(v({},e),o),{mode:Cn.SECRET_COMBOBOX_MODE_DO_NOT_USE,getInputElement:l,notFoundContent:g,class:S,popupClassName:e.popupClassName||e.dropdownClassName,ref:i}),["dataSource","loading"]);return p(Cn,$,D({default:()=>[y]},rt(n,["default","dataSource","options"])))}}}),GK=v(ym,{Option:Wi,OptGroup:Ga,install(e){return e.component(ym.name,ym),e.component(Wi.displayName,Wi),e.component(Ga.displayName,Ga),e}});var XK={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};function iw(e){for(var t=1;t({backgroundColor:e,border:`${o.lineWidth}px ${o.lineType} ${t}`,[`${r}-icon`]:{color:n}}),sU=e=>{const{componentCls:t,motionDurationSlow:n,marginXS:o,marginSM:r,fontSize:i,fontSizeLG:l,lineHeight:a,borderRadiusLG:s,motionEaseInOutCirc:c,alertIconSizeLG:u,colorText:d,paddingContentVerticalSM:f,alertPaddingHorizontal:h,paddingMD:m,paddingContentHorizontalLG:g}=e;return{[t]:v(v({},Ze(e)),{position:"relative",display:"flex",alignItems:"center",padding:`${f}px ${h}px`,wordWrap:"break-word",borderRadius:s,[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:o,lineHeight:0},"&-description":{display:"none",fontSize:i,lineHeight:a},"&-message":{color:d},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c}, + padding-top ${n} ${c}, padding-bottom ${n} ${c}, + margin-bottom ${n} ${c}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:"flex-start",paddingInline:g,paddingBlock:m,[`${t}-icon`]:{marginInlineEnd:r,fontSize:u,lineHeight:0},[`${t}-message`]:{display:"block",marginBottom:o,color:d,fontSize:l},[`${t}-description`]:{display:"block"}},[`${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},cU=e=>{const{componentCls:t,colorSuccess:n,colorSuccessBorder:o,colorSuccessBg:r,colorWarning:i,colorWarningBorder:l,colorWarningBg:a,colorError:s,colorErrorBorder:c,colorErrorBg:u,colorInfo:d,colorInfoBorder:f,colorInfoBg:h}=e;return{[t]:{"&-success":dd(r,o,n,e,t),"&-info":dd(h,f,d,e,t),"&-warning":dd(a,l,i,e,t),"&-error":v(v({},dd(u,c,s,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}},uU=e=>{const{componentCls:t,iconCls:n,motionDurationMid:o,marginXS:r,fontSizeIcon:i,colorIcon:l,colorIconHover:a}=e;return{[t]:{"&-action":{marginInlineStart:r},[`${t}-close-icon`]:{marginInlineStart:r,padding:0,overflow:"hidden",fontSize:i,lineHeight:`${i}px`,backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:l,transition:`color ${o}`,"&:hover":{color:a}}},"&-close-text":{color:l,transition:`color ${o}`,"&:hover":{color:a}}}}},dU=e=>[sU(e),cU(e),uU(e)],fU=Xe("Alert",e=>{const{fontSizeHeading3:t}=e,n=Fe(e,{alertIconSizeLG:t,alertPaddingHorizontal:12});return[dU(n)]}),pU={success:mr,info:rl,error:Un,warning:vr},hU={success:Dh,info:Nh,error:$u,warning:Su},gU=Mn("success","info","warning","error"),mU=()=>({type:W.oneOf(gU),closable:{type:Boolean,default:void 0},closeText:W.any,message:W.any,description:W.any,afterClose:Function,showIcon:{type:Boolean,default:void 0},prefixCls:String,banner:{type:Boolean,default:void 0},icon:W.any,closeIcon:W.any,onClose:Function}),vU=re({compatConfig:{MODE:3},name:"AAlert",inheritAttrs:!1,props:mU(),setup(e,t){let{slots:n,emit:o,attrs:r,expose:i}=t;const{prefixCls:l,direction:a}=Ee("alert",e),[s,c]=fU(l),u=oe(!1),d=oe(!1),f=oe(),h=b=>{b.preventDefault();const S=f.value;S.style.height=`${S.offsetHeight}px`,S.style.height=`${S.offsetHeight}px`,u.value=!0,o("close",b)},m=()=>{var b;u.value=!1,d.value=!0,(b=e.afterClose)===null||b===void 0||b.call(e)},g=I(()=>{const{type:b}=e;return b!==void 0?b:e.banner?"warning":"info"});i({animationEnd:m});const y=oe({});return()=>{var b,S,$,x,C,O,w,P,T,M;const{banner:E,closeIcon:A=(b=n.closeIcon)===null||b===void 0?void 0:b.call(n)}=e;let{closable:R,showIcon:F}=e;const _=(S=e.closeText)!==null&&S!==void 0?S:($=n.closeText)===null||$===void 0?void 0:$.call(n),N=(x=e.description)!==null&&x!==void 0?x:(C=n.description)===null||C===void 0?void 0:C.call(n),B=(O=e.message)!==null&&O!==void 0?O:(w=n.message)===null||w===void 0?void 0:w.call(n),L=(P=e.icon)!==null&&P!==void 0?P:(T=n.icon)===null||T===void 0?void 0:T.call(n),k=(M=n.action)===null||M===void 0?void 0:M.call(n);F=E&&F===void 0?!0:F;const z=(N?hU:pU)[g.value]||null;_&&(R=!0);const H=l.value,j=ce(H,{[`${H}-${g.value}`]:!0,[`${H}-closing`]:u.value,[`${H}-with-description`]:!!N,[`${H}-no-icon`]:!F,[`${H}-banner`]:!!E,[`${H}-closable`]:R,[`${H}-rtl`]:a.value==="rtl",[c.value]:!0}),Y=R?p("button",{type:"button",onClick:h,class:`${H}-close-icon`,tabindex:0},[_?p("span",{class:`${H}-close-text`},[_]):A===void 0?p(Kn,null,null):A]):null,Z=L&&(qt(L)?ht(L,{class:`${H}-icon`}):p("span",{class:`${H}-icon`},[L]))||p(z,{class:`${H}-icon`},null),G=qo(`${H}-motion`,{appear:!1,css:!0,onAfterLeave:m,onBeforeLeave:te=>{te.style.maxHeight=`${te.offsetHeight}px`},onLeave:te=>{te.style.maxHeight="0px"}});return s(d.value?null:p(rn,G,{default:()=>[_n(p("div",D(D({role:"alert"},r),{},{style:[r.style,y.value],class:[r.class,j],"data-show":!u.value,ref:f}),[F?Z:null,p("div",{class:`${H}-content`},[B?p("div",{class:`${H}-message`},[B]):null,N?p("div",{class:`${H}-description`},[N]):null]),k?p("div",{class:`${H}-action`},[k]):null,Y]),[[oo,!u.value]])]}))}}}),bU=At(vU),ti=["xxxl","xxl","xl","lg","md","sm","xs"],yU=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`{min-width: ${e.screenXXXL}px}`});function qy(){const[,e]=mi();return I(()=>{const t=yU(e.value),n=new Map;let o=-1,r={};return{matchHandlers:{},dispatch(i){return r=i,n.forEach(l=>l(r)),n.size>=1},subscribe(i){return n.size||this.register(),o+=1,n.set(o,i),i(r),o},unsubscribe(i){n.delete(i),n.size||this.unregister()},unregister(){Object.keys(t).forEach(i=>{const l=t[i],a=this.matchHandlers[l];a==null||a.mql.removeListener(a==null?void 0:a.listener)}),n.clear()},register(){Object.keys(t).forEach(i=>{const l=t[i],a=c=>{let{matches:u}=c;this.dispatch(v(v({},r),{[i]:u}))},s=window.matchMedia(l);s.addListener(a),this.matchHandlers[l]={mql:s,listener:a},a(s)})},responsiveMap:t}})}function Ps(){const e=oe({});let t=null;const n=qy();return Ue(()=>{t=n.value.subscribe(o=>{e.value=o})}),Wn(()=>{n.value.unsubscribe(t)}),e}function xo(e){const t=oe();return je(()=>{t.value=e()},{flush:"sync"}),t}const SU=e=>{const{antCls:t,componentCls:n,iconCls:o,avatarBg:r,avatarColor:i,containerSize:l,containerSizeLG:a,containerSizeSM:s,textFontSize:c,textFontSizeLG:u,textFontSizeSM:d,borderRadius:f,borderRadiusLG:h,borderRadiusSM:m,lineWidth:g,lineType:y}=e,b=(S,$,x)=>({width:S,height:S,lineHeight:`${S-g*2}px`,borderRadius:"50%",[`&${n}-square`]:{borderRadius:x},[`${n}-string`]:{position:"absolute",left:{_skip_check_:!0,value:"50%"},transformOrigin:"0 center"},[`&${n}-icon`]:{fontSize:$,[`> ${o}`]:{margin:0}}});return{[n]:v(v(v(v({},Ze(e)),{position:"relative",display:"inline-block",overflow:"hidden",color:i,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:r,border:`${g}px ${y} transparent`,"&-image":{background:"transparent"},[`${t}-image-img`]:{display:"block"}}),b(l,c,f)),{"&-lg":v({},b(a,u,h)),"&-sm":v({},b(s,d,m)),"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}},$U=e=>{const{componentCls:t,groupBorderColor:n,groupOverlapping:o,groupSpace:r}=e;return{[`${t}-group`]:{display:"inline-flex",[`${t}`]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:o}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:r}}}},AI=Xe("Avatar",e=>{const{colorTextLightSolid:t,colorTextPlaceholder:n}=e,o=Fe(e,{avatarBg:n,avatarColor:t});return[SU(o),$U(o)]},e=>{const{controlHeight:t,controlHeightLG:n,controlHeightSM:o,fontSize:r,fontSizeLG:i,fontSizeXL:l,fontSizeHeading3:a,marginXS:s,marginXXS:c,colorBorderBg:u}=e;return{containerSize:t,containerSizeLG:n,containerSizeSM:o,textFontSize:Math.round((i+l)/2),textFontSizeLG:a,textFontSizeSM:r,groupSpace:c,groupOverlapping:-s,groupBorderColor:u}}),RI=Symbol("AvatarContextKey"),CU=()=>Ke(RI,{}),xU=e=>qe(RI,e),wU=()=>({prefixCls:String,shape:{type:String,default:"circle"},size:{type:[Number,String,Object],default:()=>"default"},src:String,srcset:String,icon:W.any,alt:String,gap:Number,draggable:{type:Boolean,default:void 0},crossOrigin:String,loadError:{type:Function}}),Bl=re({compatConfig:{MODE:3},name:"AAvatar",inheritAttrs:!1,props:wU(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const r=oe(!0),i=oe(!1),l=oe(1),a=oe(null),s=oe(null),{prefixCls:c}=Ee("avatar",e),[u,d]=AI(c),f=CU(),h=I(()=>e.size==="default"?f.size:e.size),m=Ps(),g=xo(()=>{if(typeof e.size!="object")return;const $=ti.find(C=>m.value[C]);return e.size[$]}),y=$=>g.value?{width:`${g.value}px`,height:`${g.value}px`,lineHeight:`${g.value}px`,fontSize:`${$?g.value/2:18}px`}:{},b=()=>{if(!a.value||!s.value)return;const $=a.value.offsetWidth,x=s.value.offsetWidth;if($!==0&&x!==0){const{gap:C=4}=e;C*2{const{loadError:$}=e;($==null?void 0:$())!==!1&&(r.value=!1)};return Se(()=>e.src,()=>{lt(()=>{r.value=!0,l.value=1})}),Se(()=>e.gap,()=>{lt(()=>{b()})}),Ue(()=>{lt(()=>{b(),i.value=!0})}),()=>{var $,x;const{shape:C,src:O,alt:w,srcset:P,draggable:T,crossOrigin:M}=e,E=($=f.shape)!==null&&$!==void 0?$:C,A=on(n,e,"icon"),R=c.value,F={[`${o.class}`]:!!o.class,[R]:!0,[`${R}-lg`]:h.value==="large",[`${R}-sm`]:h.value==="small",[`${R}-${E}`]:!0,[`${R}-image`]:O&&r.value,[`${R}-icon`]:A,[d.value]:!0},_=typeof h.value=="number"?{width:`${h.value}px`,height:`${h.value}px`,lineHeight:`${h.value}px`,fontSize:A?`${h.value/2}px`:"18px"}:{},N=(x=n.default)===null||x===void 0?void 0:x.call(n);let B;if(O&&r.value)B=p("img",{draggable:T,src:O,srcset:P,onError:S,alt:w,crossorigin:M},null);else if(A)B=A;else if(i.value||l.value!==1){const L=`scale(${l.value}) translateX(-50%)`,k={msTransform:L,WebkitTransform:L,transform:L},z=typeof h.value=="number"?{lineHeight:`${h.value}px`}:{};B=p(Go,{onResize:b},{default:()=>[p("span",{class:`${R}-string`,ref:a,style:v(v({},z),k)},[N])]})}else B=p("span",{class:`${R}-string`,ref:a,style:{opacity:0}},[N]);return u(p("span",D(D({},o),{},{ref:s,class:F,style:[_,y(!!A),o.style]}),[B]))}}}),Lo={adjustX:1,adjustY:1},ko=[0,0],DI={left:{points:["cr","cl"],overflow:Lo,offset:[-4,0],targetOffset:ko},right:{points:["cl","cr"],overflow:Lo,offset:[4,0],targetOffset:ko},top:{points:["bc","tc"],overflow:Lo,offset:[0,-4],targetOffset:ko},bottom:{points:["tc","bc"],overflow:Lo,offset:[0,4],targetOffset:ko},topLeft:{points:["bl","tl"],overflow:Lo,offset:[0,-4],targetOffset:ko},leftTop:{points:["tr","tl"],overflow:Lo,offset:[-4,0],targetOffset:ko},topRight:{points:["br","tr"],overflow:Lo,offset:[0,-4],targetOffset:ko},rightTop:{points:["tl","tr"],overflow:Lo,offset:[4,0],targetOffset:ko},bottomRight:{points:["tr","br"],overflow:Lo,offset:[0,4],targetOffset:ko},rightBottom:{points:["bl","br"],overflow:Lo,offset:[4,0],targetOffset:ko},bottomLeft:{points:["tl","bl"],overflow:Lo,offset:[0,4],targetOffset:ko},leftBottom:{points:["br","bl"],overflow:Lo,offset:[-4,0],targetOffset:ko}},OU={prefixCls:String,id:String,overlayInnerStyle:W.any},PU=re({compatConfig:{MODE:3},name:"TooltipContent",props:OU,setup(e,t){let{slots:n}=t;return()=>{var o;return p("div",{class:`${e.prefixCls}-inner`,id:e.id,role:"tooltip",style:e.overlayInnerStyle},[(o=n.overlay)===null||o===void 0?void 0:o.call(n)])}}});var IU=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{}),overlayStyle:{type:Object,default:void 0},overlayClassName:String,prefixCls:W.string.def("rc-tooltip"),mouseEnterDelay:W.number.def(.1),mouseLeaveDelay:W.number.def(.1),getPopupContainer:Function,destroyTooltipOnHide:{type:Boolean,default:!1},align:W.object.def(()=>({})),arrowContent:W.any.def(null),tipId:String,builtinPlacements:W.object,overlayInnerStyle:{type:Object,default:void 0},popupVisible:{type:Boolean,default:void 0},onVisibleChange:Function,onPopupAlign:Function,arrow:{type:Boolean,default:!0}},setup(e,t){let{slots:n,attrs:o,expose:r}=t;const i=oe(),l=()=>{const{prefixCls:u,tipId:d,overlayInnerStyle:f}=e;return[e.arrow?p("div",{class:`${u}-arrow`,key:"arrow"},[on(n,e,"arrowContent")]):null,p(PU,{key:"content",prefixCls:u,id:d,overlayInnerStyle:f},{overlay:n.overlay})]};r({getPopupDomNode:()=>i.value.getPopupDomNode(),triggerDOM:i,forcePopupAlign:()=>{var u;return(u=i.value)===null||u===void 0?void 0:u.forcePopupAlign()}});const s=oe(!1),c=oe(!1);return je(()=>{const{destroyTooltipOnHide:u}=e;if(typeof u=="boolean")s.value=u;else if(u&&typeof u=="object"){const{keepParent:d}=u;s.value=d===!0,c.value=d===!1}}),()=>{const{overlayClassName:u,trigger:d,mouseEnterDelay:f,mouseLeaveDelay:h,overlayStyle:m,prefixCls:g,afterVisibleChange:y,transitionName:b,animation:S,placement:$,align:x,destroyTooltipOnHide:C,defaultVisible:O}=e,w=IU(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible"]),P=v({},w);e.visible!==void 0&&(P.popupVisible=e.visible);const T=v(v(v({popupClassName:u,prefixCls:g,action:d,builtinPlacements:DI,popupPlacement:$,popupAlign:x,afterPopupVisibleChange:y,popupTransitionName:b,popupAnimation:S,defaultPopupVisible:O,destroyPopupOnHide:s.value,autoDestroy:c.value,mouseLeaveDelay:h,popupStyle:m,mouseEnterDelay:f},P),o),{onPopupVisibleChange:e.onVisibleChange||fw,onPopupAlign:e.onPopupAlign||fw,ref:i,arrow:!!e.arrow,popup:l()});return p(ca,T,{default:n.default})}}}),Zy=()=>({trigger:[String,Array],open:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},placement:String,color:String,transitionName:String,overlayStyle:Ne(),overlayInnerStyle:Ne(),overlayClassName:String,openClassName:String,prefixCls:String,mouseEnterDelay:Number,mouseLeaveDelay:Number,getPopupContainer:Function,arrowPointAtCenter:{type:Boolean,default:void 0},arrow:{type:[Boolean,Object],default:!0},autoAdjustOverflow:{type:[Boolean,Object],default:void 0},destroyTooltipOnHide:{type:Boolean,default:void 0},align:Ne(),builtinPlacements:Ne(),children:Array,onVisibleChange:Function,"onUpdate:visible":Function,onOpenChange:Function,"onUpdate:open":Function}),EU={adjustX:1,adjustY:1},pw={adjustX:0,adjustY:0},_U=[0,0];function hw(e){return typeof e=="boolean"?e?EU:pw:v(v({},pw),e)}function Jy(e){const{arrowWidth:t=4,horizontalArrowShift:n=16,verticalArrowShift:o=8,autoAdjustOverflow:r,arrowPointAtCenter:i}=e,l={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(n+t),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(o+t)]},topRight:{points:["br","tc"],offset:[n+t,-4]},rightTop:{points:["tl","cr"],offset:[4,-(o+t)]},bottomRight:{points:["tr","bc"],offset:[n+t,4]},rightBottom:{points:["bl","cr"],offset:[4,o+t]},bottomLeft:{points:["tl","bc"],offset:[-(n+t),4]},leftBottom:{points:["br","cl"],offset:[-4,o+t]}};return Object.keys(l).forEach(a=>{l[a]=i?v(v({},l[a]),{overflow:hw(r),targetOffset:_U}):v(v({},DI[a]),{overflow:hw(r)}),l[a].ignoreShake=!0}),l}function np(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];for(let t=0,n=e.length;t`${e}-inverse`),AU=["success","processing","error","default","warning"];function Bh(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[...MU,...Vc].includes(e):Vc.includes(e)}function RU(e){return AU.includes(e)}function DU(e,t){const n=Bh(t),o=ce({[`${e}-${t}`]:t&&n}),r={},i={};return t&&!n&&(r.background=t,i["--antd-arrow-background-color"]=t),{className:o,overlayStyle:r,arrowStyle:i}}function fd(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return e.map(n=>`${t}${n}`).join(",")}const Qy=8;function NI(e){const t=Qy,{sizePopupArrow:n,contentRadius:o,borderRadiusOuter:r,limitVerticalRadius:i}=e,l=n/2-Math.ceil(r*(Math.sqrt(2)-1)),a=(o>12?o+2:12)-l,s=i?t-l:a;return{dropdownArrowOffset:a,dropdownArrowOffsetVertical:s}}function e1(e,t){const{componentCls:n,sizePopupArrow:o,marginXXS:r,borderRadiusXS:i,borderRadiusOuter:l,boxShadowPopoverArrow:a}=e,{colorBg:s,showArrowCls:c,contentRadius:u=e.borderRadiusLG,limitVerticalRadius:d}=t,{dropdownArrowOffsetVertical:f,dropdownArrowOffset:h}=NI({sizePopupArrow:o,contentRadius:u,borderRadiusOuter:l,limitVerticalRadius:d}),m=o/2+r;return{[n]:{[`${n}-arrow`]:[v(v({position:"absolute",zIndex:1,display:"block"},Jb(o,i,l,s,a)),{"&:before":{background:s}})],[[`&-placement-top ${n}-arrow`,`&-placement-topLeft ${n}-arrow`,`&-placement-topRight ${n}-arrow`].join(",")]:{bottom:0,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${n}-arrow`]:{left:{_skip_check_:!0,value:h}},[`&-placement-topRight ${n}-arrow`]:{right:{_skip_check_:!0,value:h}},[[`&-placement-bottom ${n}-arrow`,`&-placement-bottomLeft ${n}-arrow`,`&-placement-bottomRight ${n}-arrow`].join(",")]:{top:0,transform:"translateY(-100%)"},[`&-placement-bottom ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${n}-arrow`]:{left:{_skip_check_:!0,value:h}},[`&-placement-bottomRight ${n}-arrow`]:{right:{_skip_check_:!0,value:h}},[[`&-placement-left ${n}-arrow`,`&-placement-leftTop ${n}-arrow`,`&-placement-leftBottom ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:0},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${n}-arrow`]:{top:f},[`&-placement-leftBottom ${n}-arrow`]:{bottom:f},[[`&-placement-right ${n}-arrow`,`&-placement-rightTop ${n}-arrow`,`&-placement-rightBottom ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:0},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${n}-arrow`]:{top:f},[`&-placement-rightBottom ${n}-arrow`]:{bottom:f},[fd(["&-placement-topLeft","&-placement-top","&-placement-topRight"].map(g=>g+=":not(&-arrow-hidden)"),c)]:{paddingBottom:m},[fd(["&-placement-bottomLeft","&-placement-bottom","&-placement-bottomRight"].map(g=>g+=":not(&-arrow-hidden)"),c)]:{paddingTop:m},[fd(["&-placement-leftTop","&-placement-left","&-placement-leftBottom"].map(g=>g+=":not(&-arrow-hidden)"),c)]:{paddingRight:{_skip_check_:!0,value:m}},[fd(["&-placement-rightTop","&-placement-right","&-placement-rightBottom"].map(g=>g+=":not(&-arrow-hidden)"),c)]:{paddingLeft:{_skip_check_:!0,value:m}}}}}const NU=e=>{const{componentCls:t,tooltipMaxWidth:n,tooltipColor:o,tooltipBg:r,tooltipBorderRadius:i,zIndexPopup:l,controlHeight:a,boxShadowSecondary:s,paddingSM:c,paddingXS:u,tooltipRadiusOuter:d}=e;return[{[t]:v(v(v(v({},Ze(e)),{position:"absolute",zIndex:l,display:"block","&":[{width:"max-content"},{width:"intrinsic"}],maxWidth:n,visibility:"visible","&-hidden":{display:"none"},"--antd-arrow-background-color":r,[`${t}-inner`]:{minWidth:a,minHeight:a,padding:`${c/2}px ${u}px`,color:o,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:r,borderRadius:i,boxShadow:s},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:Math.min(i,Qy)}},[`${t}-content`]:{position:"relative"}}),jf(e,(f,h)=>{let{darkColor:m}=h;return{[`&${t}-${f}`]:{[`${t}-inner`]:{backgroundColor:m},[`${t}-arrow`]:{"--antd-arrow-background-color":m}}}})),{"&-rtl":{direction:"rtl"}})},e1(Fe(e,{borderRadiusOuter:d}),{colorBg:"var(--antd-arrow-background-color)",showArrowCls:"",contentRadius:i,limitVerticalRadius:!0}),{[`${t}-pure`]:{position:"relative",maxWidth:"none"}}]},BU=(e,t)=>Xe("Tooltip",o=>{if((t==null?void 0:t.value)===!1)return[];const{borderRadius:r,colorTextLightSolid:i,colorBgDefault:l,borderRadiusOuter:a}=o,s=Fe(o,{tooltipMaxWidth:250,tooltipColor:i,tooltipBorderRadius:r,tooltipBg:l,tooltipRadiusOuter:a>4?4:a});return[NU(s),ws(o,"zoom-big-fast")]},o=>{let{zIndexPopupBase:r,colorBgSpotlight:i}=o;return{zIndexPopup:r+70,colorBgDefault:i}})(e),LU=(e,t)=>{const n={},o=v({},e);return t.forEach(r=>{e&&r in e&&(n[r]=e[r],delete o[r])}),{picked:n,omitted:o}},BI=()=>v(v({},Zy()),{title:W.any}),LI=()=>({trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),kU=re({compatConfig:{MODE:3},name:"ATooltip",inheritAttrs:!1,props:et(BI(),{trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r,expose:i}=t;const{prefixCls:l,getPopupContainer:a,direction:s,rootPrefixCls:c}=Ee("tooltip",e),u=I(()=>{var M;return(M=e.open)!==null&&M!==void 0?M:e.visible}),d=ie(np([e.open,e.visible])),f=ie();let h;Se(u,M=>{Qe.cancel(h),h=Qe(()=>{d.value=!!M})});const m=()=>{var M;const E=(M=e.title)!==null&&M!==void 0?M:n.title;return!E&&E!==0},g=M=>{const E=m();u.value===void 0&&(d.value=E?!1:M),E||(o("update:visible",M),o("visibleChange",M),o("update:open",M),o("openChange",M))};i({getPopupDomNode:()=>f.value.getPopupDomNode(),open:d,forcePopupAlign:()=>{var M;return(M=f.value)===null||M===void 0?void 0:M.forcePopupAlign()}});const b=I(()=>{var M;const{builtinPlacements:E,autoAdjustOverflow:A,arrow:R,arrowPointAtCenter:F}=e;let _=F;return typeof R=="object"&&(_=(M=R.pointAtCenter)!==null&&M!==void 0?M:F),E||Jy({arrowPointAtCenter:_,autoAdjustOverflow:A})}),S=M=>M||M==="",$=M=>{const E=M.type;if(typeof E=="object"&&M.props&&((E.__ANT_BUTTON===!0||E==="button")&&S(M.props.disabled)||E.__ANT_SWITCH===!0&&(S(M.props.disabled)||S(M.props.loading))||E.__ANT_RADIO===!0&&S(M.props.disabled))){const{picked:A,omitted:R}=LU(g6(M),["position","left","right","top","bottom","float","display","zIndex"]),F=v(v({display:"inline-block"},A),{cursor:"not-allowed",lineHeight:1,width:M.props&&M.props.block?"100%":void 0}),_=v(v({},R),{pointerEvents:"none"}),N=ht(M,{style:_},!0);return p("span",{style:F,class:`${l.value}-disabled-compatible-wrapper`},[N])}return M},x=()=>{var M,E;return(M=e.title)!==null&&M!==void 0?M:(E=n.title)===null||E===void 0?void 0:E.call(n)},C=(M,E)=>{const A=b.value,R=Object.keys(A).find(F=>{var _,N;return A[F].points[0]===((_=E.points)===null||_===void 0?void 0:_[0])&&A[F].points[1]===((N=E.points)===null||N===void 0?void 0:N[1])});if(R){const F=M.getBoundingClientRect(),_={top:"50%",left:"50%"};R.indexOf("top")>=0||R.indexOf("Bottom")>=0?_.top=`${F.height-E.offset[1]}px`:(R.indexOf("Top")>=0||R.indexOf("bottom")>=0)&&(_.top=`${-E.offset[1]}px`),R.indexOf("left")>=0||R.indexOf("Right")>=0?_.left=`${F.width-E.offset[0]}px`:(R.indexOf("right")>=0||R.indexOf("Left")>=0)&&(_.left=`${-E.offset[0]}px`),M.style.transformOrigin=`${_.left} ${_.top}`}},O=I(()=>DU(l.value,e.color)),w=I(()=>r["data-popover-inject"]),[P,T]=BU(l,I(()=>!w.value));return()=>{var M,E;const{openClassName:A,overlayClassName:R,overlayStyle:F,overlayInnerStyle:_}=e;let N=(E=Nt((M=n.default)===null||M===void 0?void 0:M.call(n)))!==null&&E!==void 0?E:null;N=N.length===1?N[0]:N;let B=d.value;if(u.value===void 0&&m()&&(B=!1),!N)return null;const L=$(qt(N)&&!BD(N)?N:p("span",null,[N])),k=ce({[A||`${l.value}-open`]:!0,[L.props&&L.props.class]:L.props&&L.props.class}),z=ce(R,{[`${l.value}-rtl`]:s.value==="rtl"},O.value.className,T.value),H=v(v({},O.value.overlayStyle),_),j=O.value.arrowStyle,Y=v(v(v({},r),e),{prefixCls:l.value,arrow:!!e.arrow,getPopupContainer:a==null?void 0:a.value,builtinPlacements:b.value,visible:B,ref:f,overlayClassName:z,overlayStyle:v(v({},j),F),overlayInnerStyle:H,onVisibleChange:g,onPopupAlign:C,transitionName:jn(c.value,"zoom-big-fast",e.transitionName)});return P(p(TU,Y,{default:()=>[d.value?ht(L,{class:k}):L],arrowContent:()=>p("span",{class:`${l.value}-arrow-content`},null),overlay:x}))}}}),ho=At(kU),FU=e=>{const{componentCls:t,popoverBg:n,popoverColor:o,width:r,fontWeightStrong:i,popoverPadding:l,boxShadowSecondary:a,colorTextHeading:s,borderRadiusLG:c,zIndexPopup:u,marginXS:d,colorBgElevated:f}=e;return[{[t]:v(v({},Ze(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:u,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--antd-arrow-background-color":f,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:n,backgroundClip:"padding-box",borderRadius:c,boxShadow:a,padding:l},[`${t}-title`]:{minWidth:r,marginBottom:d,color:s,fontWeight:i},[`${t}-inner-content`]:{color:o}})},e1(e,{colorBg:"var(--antd-arrow-background-color)"}),{[`${t}-pure`]:{position:"relative",maxWidth:"none",[`${t}-content`]:{display:"inline-block"}}}]},zU=e=>{const{componentCls:t}=e;return{[t]:Vc.map(n=>{const o=e[`${n}-6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":o,[`${t}-inner`]:{backgroundColor:o},[`${t}-arrow`]:{background:"transparent"}}}})}},HU=e=>{const{componentCls:t,lineWidth:n,lineType:o,colorSplit:r,paddingSM:i,controlHeight:l,fontSize:a,lineHeight:s,padding:c}=e,u=l-Math.round(a*s),d=u/2,f=u/2-n,h=c;return{[t]:{[`${t}-inner`]:{padding:0},[`${t}-title`]:{margin:0,padding:`${d}px ${h}px ${f}px`,borderBottom:`${n}px ${o} ${r}`},[`${t}-inner-content`]:{padding:`${i}px ${h}px`}}}},jU=Xe("Popover",e=>{const{colorBgElevated:t,colorText:n,wireframe:o}=e,r=Fe(e,{popoverBg:t,popoverColor:n,popoverPadding:12});return[FU(r),zU(r),o&&HU(r),ws(r,"zoom-big")]},e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+30,width:177}}),VU=()=>v(v({},Zy()),{content:wt(),title:wt()}),WU=re({compatConfig:{MODE:3},name:"APopover",inheritAttrs:!1,props:et(VU(),v(v({},LI()),{trigger:"hover",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1})),setup(e,t){let{expose:n,slots:o,attrs:r}=t;const i=ie();Eo(e.visible===void 0),n({getPopupDomNode:()=>{var f,h;return(h=(f=i.value)===null||f===void 0?void 0:f.getPopupDomNode)===null||h===void 0?void 0:h.call(f)}});const{prefixCls:l,configProvider:a}=Ee("popover",e),[s,c]=jU(l),u=I(()=>a.getPrefixCls()),d=()=>{var f,h;const{title:m=Nt((f=o.title)===null||f===void 0?void 0:f.call(o)),content:g=Nt((h=o.content)===null||h===void 0?void 0:h.call(o))}=e,y=!!(Array.isArray(m)?m.length:m),b=!!(Array.isArray(g)?g.length:m);return!y&&!b?null:p(He,null,[y&&p("div",{class:`${l.value}-title`},[m]),p("div",{class:`${l.value}-inner-content`},[g])])};return()=>{const f=ce(e.overlayClassName,c.value);return s(p(ho,D(D(D({},rt(e,["title","content"])),r),{},{prefixCls:l.value,ref:i,overlayClassName:f,transitionName:jn(u.value,"zoom-big",e.transitionName),"data-popover-inject":!0}),{title:d,default:o.default}))}}}),t1=At(WU),KU=()=>({prefixCls:String,maxCount:Number,maxStyle:{type:Object,default:void 0},maxPopoverPlacement:{type:String,default:"top"},maxPopoverTrigger:String,size:{type:[Number,String,Object],default:"default"},shape:{type:String,default:"circle"}}),op=re({compatConfig:{MODE:3},name:"AAvatarGroup",inheritAttrs:!1,props:KU(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ee("avatar",e),l=I(()=>`${r.value}-group`),[a,s]=AI(r);return je(()=>{const c={size:e.size,shape:e.shape};xU(c)}),()=>{const{maxPopoverPlacement:c="top",maxCount:u,maxStyle:d,maxPopoverTrigger:f="hover",shape:h}=e,m={[l.value]:!0,[`${l.value}-rtl`]:i.value==="rtl",[`${o.class}`]:!!o.class,[s.value]:!0},g=on(n,e),y=xt(g).map((S,$)=>ht(S,{key:`avatar-key-${$}`})),b=y.length;if(u&&u[p(Bl,{style:d,shape:h},{default:()=>[`+${b-u}`]})]})),a(p("div",D(D({},o),{},{class:m,style:o.style}),[S]))}return a(p("div",D(D({},o),{},{class:m,style:o.style}),[y]))}}});Bl.Group=op;Bl.install=function(e){return e.component(Bl.name,Bl),e.component(op.name,op),e};function gw(e){let{prefixCls:t,value:n,current:o,offset:r=0}=e,i;return r&&(i={position:"absolute",top:`${r}00%`,left:0}),p("p",{style:i,class:ce(`${t}-only-unit`,{current:o})},[n])}function UU(e,t,n){let o=e,r=0;for(;(o+10)%10!==t;)o+=n,r+=n;return r}const GU=re({compatConfig:{MODE:3},name:"SingleNumber",props:{prefixCls:String,value:String,count:Number},setup(e){const t=I(()=>Number(e.value)),n=I(()=>Math.abs(e.count)),o=ft({prevValue:t.value,prevCount:n.value}),r=()=>{o.prevValue=t.value,o.prevCount=n.value},i=ie();return Se(t,()=>{clearTimeout(i.value),i.value=setTimeout(()=>{r()},1e3)},{flush:"post"}),Wn(()=>{clearTimeout(i.value)}),()=>{let l,a={};const s=t.value;if(o.prevValue===s||Number.isNaN(s)||Number.isNaN(o.prevValue))l=[gw(v(v({},e),{current:!0}))],a={transition:"none"};else{l=[];const c=s+10,u=[];for(let h=s;h<=c;h+=1)u.push(h);const d=u.findIndex(h=>h%10===o.prevValue);l=u.map((h,m)=>{const g=h%10;return gw(v(v({},e),{value:g,offset:m-d,current:m===d}))});const f=o.prevCountr()},[l])}}});var XU=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var i;const l=v(v({},e),n),{prefixCls:a,count:s,title:c,show:u,component:d="sup",class:f,style:h}=l,m=XU(l,["prefixCls","count","title","show","component","class","style"]),g=v(v({},m),{style:h,"data-show":e.show,class:ce(r.value,f),title:c});let y=s;if(s&&Number(s)%1===0){const S=String(s).split("");y=S.map(($,x)=>p(GU,{prefixCls:r.value,count:Number(s),value:$,key:S.length-x},null))}h&&h.borderColor&&(g.style=v(v({},h),{boxShadow:`0 0 0 1px ${h.borderColor} inset`}));const b=Nt((i=o.default)===null||i===void 0?void 0:i.call(o));return b&&b.length?ht(b,{class:ce(`${r.value}-custom-component`)},!1):p(d,g,{default:()=>[y]})}}}),ZU=new it("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),JU=new it("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),QU=new it("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),eG=new it("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),tG=new it("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),nG=new it("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),oG=e=>{const{componentCls:t,iconCls:n,antCls:o,badgeFontHeight:r,badgeShadowSize:i,badgeHeightSm:l,motionDurationSlow:a,badgeStatusSize:s,marginXS:c,badgeRibbonOffset:u}=e,d=`${o}-scroll-number`,f=`${o}-ribbon`,h=`${o}-ribbon-wrapper`,m=jf(e,(y,b)=>{let{darkColor:S}=b;return{[`&${t} ${t}-color-${y}`]:{background:S,[`&:not(${t}-count)`]:{color:S}}}}),g=jf(e,(y,b)=>{let{darkColor:S}=b;return{[`&${f}-color-${y}`]:{background:S,color:S}}});return{[t]:v(v(v(v({},Ze(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{zIndex:e.badgeZIndex,minWidth:e.badgeHeight,height:e.badgeHeight,color:e.badgeTextColor,fontWeight:e.badgeFontWeight,fontSize:e.badgeFontSize,lineHeight:`${e.badgeHeight}px`,whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:e.badgeHeight/2,boxShadow:`0 0 0 ${i}px ${e.badgeShadowColor}`,transition:`background ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:l,height:l,fontSize:e.badgeFontSizeSm,lineHeight:`${l}px`,borderRadius:l/2},[`${t}-multiple-words`]:{padding:`0 ${e.paddingXS}px`},[`${t}-dot`]:{zIndex:e.badgeZIndex,width:e.badgeDotSize,minWidth:e.badgeDotSize,height:e.badgeDotSize,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${i}px ${e.badgeShadowColor}`},[`${t}-dot${d}`]:{transition:`background ${a}`},[`${t}-count, ${t}-dot, ${d}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${n}-spin`]:{animationName:nG,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorPrimary,backgroundColor:e.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:i,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:ZU,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:c,color:e.colorText,fontSize:e.fontSize}}}),m),{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:JU,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:QU,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:eG,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:tG,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${d}-custom-component, ${t}-count`]:{transform:"none"},[`${d}-custom-component, ${d}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[`${d}`]:{overflow:"hidden",[`${d}-only`]:{position:"relative",display:"inline-block",height:e.badgeHeight,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${d}-only-unit`]:{height:e.badgeHeight,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${d}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${d}-custom-component`]:{transform:"translate(-50%, -50%)"}}}),[`${h}`]:{position:"relative"},[`${f}`]:v(v(v(v({},Ze(e)),{position:"absolute",top:c,padding:`0 ${e.paddingXS}px`,color:e.colorPrimary,lineHeight:`${r}px`,whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${f}-text`]:{color:e.colorTextLightSolid},[`${f}-corner`]:{position:"absolute",top:"100%",width:u,height:u,color:"currentcolor",border:`${u/2}px solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),g),{[`&${f}-placement-end`]:{insetInlineEnd:-u,borderEndEndRadius:0,[`${f}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${f}-placement-start`]:{insetInlineStart:-u,borderEndStartRadius:0,[`${f}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},kI=Xe("Badge",e=>{const{fontSize:t,lineHeight:n,fontSizeSM:o,lineWidth:r,marginXS:i,colorBorderBg:l}=e,a=Math.round(t*n),s=r,c="auto",u=a-2*s,d=e.colorBgContainer,f="normal",h=o,m=e.colorError,g=e.colorErrorHover,y=t,b=o/2,S=o,$=o/2,x=Fe(e,{badgeFontHeight:a,badgeShadowSize:s,badgeZIndex:c,badgeHeight:u,badgeTextColor:d,badgeFontWeight:f,badgeFontSize:h,badgeColor:m,badgeColorHover:g,badgeShadowColor:l,badgeHeightSm:y,badgeDotSize:b,badgeFontSizeSm:S,badgeStatusSize:$,badgeProcessingDuration:"1.2s",badgeRibbonOffset:i,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"});return[oG(x)]});var rG=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefix:String,color:{type:String},text:W.any,placement:{type:String,default:"end"}}),rp=re({compatConfig:{MODE:3},name:"ABadgeRibbon",inheritAttrs:!1,props:iG(),slots:Object,setup(e,t){let{attrs:n,slots:o}=t;const{prefixCls:r,direction:i}=Ee("ribbon",e),[l,a]=kI(r),s=I(()=>Bh(e.color,!1)),c=I(()=>[r.value,`${r.value}-placement-${e.placement}`,{[`${r.value}-rtl`]:i.value==="rtl",[`${r.value}-color-${e.color}`]:s.value}]);return()=>{var u,d;const{class:f,style:h}=n,m=rG(n,["class","style"]),g={},y={};return e.color&&!s.value&&(g.background=e.color,y.color=e.color),l(p("div",D({class:`${r.value}-wrapper ${a.value}`},m),[(u=o.default)===null||u===void 0?void 0:u.call(o),p("div",{class:[c.value,f,a.value],style:v(v({},g),h)},[p("span",{class:`${r.value}-text`},[e.text||((d=o.text)===null||d===void 0?void 0:d.call(o))]),p("div",{class:`${r.value}-corner`,style:y},null)])]))}}}),ip=e=>!isNaN(parseFloat(e))&&isFinite(e),lG=()=>({count:W.any.def(null),showZero:{type:Boolean,default:void 0},overflowCount:{type:Number,default:99},dot:{type:Boolean,default:void 0},prefixCls:String,scrollNumberPrefixCls:String,status:{type:String},size:{type:String,default:"default"},color:String,text:W.any,offset:Array,numberStyle:{type:Object,default:void 0},title:String}),yc=re({compatConfig:{MODE:3},name:"ABadge",Ribbon:rp,inheritAttrs:!1,props:lG(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ee("badge",e),[l,a]=kI(r),s=I(()=>e.count>e.overflowCount?`${e.overflowCount}+`:e.count),c=I(()=>s.value==="0"||s.value===0),u=I(()=>e.count===null||c.value&&!e.showZero),d=I(()=>(e.status!==null&&e.status!==void 0||e.color!==null&&e.color!==void 0)&&u.value),f=I(()=>e.dot&&!c.value),h=I(()=>f.value?"":s.value),m=I(()=>(h.value===null||h.value===void 0||h.value===""||c.value&&!e.showZero)&&!f.value),g=ie(e.count),y=ie(h.value),b=ie(f.value);Se([()=>e.count,h,f],()=>{m.value||(g.value=e.count,y.value=h.value,b.value=f.value)},{immediate:!0});const S=I(()=>Bh(e.color,!1)),$=I(()=>({[`${r.value}-status-dot`]:d.value,[`${r.value}-status-${e.status}`]:!!e.status,[`${r.value}-color-${e.color}`]:S.value})),x=I(()=>e.color&&!S.value?{background:e.color,color:e.color}:{}),C=I(()=>({[`${r.value}-dot`]:b.value,[`${r.value}-count`]:!b.value,[`${r.value}-count-sm`]:e.size==="small",[`${r.value}-multiple-words`]:!b.value&&y.value&&y.value.toString().length>1,[`${r.value}-status-${e.status}`]:!!e.status,[`${r.value}-color-${e.color}`]:S.value}));return()=>{var O,w;const{offset:P,title:T,color:M}=e,E=o.style,A=on(n,e,"text"),R=r.value,F=g.value;let _=xt((O=n.default)===null||O===void 0?void 0:O.call(n));_=_.length?_:null;const N=!!(!m.value||n.count),B=(()=>{if(!P)return v({},E);const Z={marginTop:ip(P[1])?`${P[1]}px`:P[1]};return i.value==="rtl"?Z.left=`${parseInt(P[0],10)}px`:Z.right=`${-parseInt(P[0],10)}px`,v(v({},Z),E)})(),L=T??(typeof F=="string"||typeof F=="number"?F:void 0),k=N||!A?null:p("span",{class:`${R}-status-text`},[A]),z=typeof F=="object"||F===void 0&&n.count?ht(F??((w=n.count)===null||w===void 0?void 0:w.call(n)),{style:B},!1):null,H=ce(R,{[`${R}-status`]:d.value,[`${R}-not-a-wrapper`]:!_,[`${R}-rtl`]:i.value==="rtl"},o.class,a.value);if(!_&&d.value){const Z=B.color;return l(p("span",D(D({},o),{},{class:H,style:B}),[p("span",{class:$.value,style:x.value},null),p("span",{style:{color:Z},class:`${R}-status-text`},[A])]))}const j=qo(_?`${R}-zoom`:"",{appear:!1});let Y=v(v({},B),e.numberStyle);return M&&!S.value&&(Y=Y||{},Y.background=M),l(p("span",D(D({},o),{},{class:H}),[_,p(rn,j,{default:()=>[_n(p(qU,{prefixCls:e.scrollNumberPrefixCls,show:N,class:C.value,count:y.value,title:L,style:Y,key:"scrollNumber"},{default:()=>[z]}),[[oo,N]])]}),k]))}}});yc.install=function(e){return e.component(yc.name,yc),e.component(rp.name,rp),e};const ya={adjustX:1,adjustY:1},Sa=[0,0],aG={topLeft:{points:["bl","tl"],overflow:ya,offset:[0,-4],targetOffset:Sa},topCenter:{points:["bc","tc"],overflow:ya,offset:[0,-4],targetOffset:Sa},topRight:{points:["br","tr"],overflow:ya,offset:[0,-4],targetOffset:Sa},bottomLeft:{points:["tl","bl"],overflow:ya,offset:[0,4],targetOffset:Sa},bottomCenter:{points:["tc","bc"],overflow:ya,offset:[0,4],targetOffset:Sa},bottomRight:{points:["tr","br"],overflow:ya,offset:[0,4],targetOffset:Sa}};var sG=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.visible,h=>{h!==void 0&&(i.value=h)});const l=ie();r({triggerRef:l});const a=h=>{e.visible===void 0&&(i.value=!1),o("overlayClick",h)},s=h=>{e.visible===void 0&&(i.value=h),o("visibleChange",h)},c=()=>{var h;const m=(h=n.overlay)===null||h===void 0?void 0:h.call(n),g={prefixCls:`${e.prefixCls}-menu`,onClick:a};return p(He,{key:f6},[e.arrow&&p("div",{class:`${e.prefixCls}-arrow`},null),ht(m,g,!1)])},u=I(()=>{const{minOverlayWidthMatchTrigger:h=!e.alignPoint}=e;return h}),d=()=>{var h;const m=(h=n.default)===null||h===void 0?void 0:h.call(n);return i.value&&m?ht(m[0],{class:e.openClassName||`${e.prefixCls}-open`},!1):m},f=I(()=>!e.hideAction&&e.trigger.indexOf("contextmenu")!==-1?["click"]:e.hideAction);return()=>{const{prefixCls:h,arrow:m,showAction:g,overlayStyle:y,trigger:b,placement:S,align:$,getPopupContainer:x,transitionName:C,animation:O,overlayClassName:w}=e,P=sG(e,["prefixCls","arrow","showAction","overlayStyle","trigger","placement","align","getPopupContainer","transitionName","animation","overlayClassName"]);return p(ca,D(D({},P),{},{prefixCls:h,ref:l,popupClassName:ce(w,{[`${h}-show-arrow`]:m}),popupStyle:y,builtinPlacements:aG,action:b,showAction:g,hideAction:f.value||[],popupPlacement:S,popupAlign:$,popupTransitionName:C,popupAnimation:O,popupVisible:i.value,stretch:u.value?"minWidth":"",onPopupVisibleChange:s,getPopupContainer:x}),{popup:c,default:d})}}}),cG=e=>{const{componentCls:t,colorPrimary:n}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0}}}}},uG=Xe("Wave",e=>[cG(e)]);function dG(e){const t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return t&&t[1]&&t[2]&&t[3]?!(t[1]===t[2]&&t[2]===t[3]):!0}function Sm(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&dG(e)&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"}function fG(e){const{borderTopColor:t,borderColor:n,backgroundColor:o}=getComputedStyle(e);return Sm(t)?t:Sm(n)?n:Sm(o)?o:null}function $m(e){return Number.isNaN(e)?0:e}const pG=re({props:{target:Ne(),className:String},setup(e){const t=oe(null),[n,o]=St(null),[r,i]=St([]),[l,a]=St(0),[s,c]=St(0),[u,d]=St(0),[f,h]=St(0),[m,g]=St(!1);function y(){const{target:w}=e,P=getComputedStyle(w);o(fG(w));const T=P.position==="static",{borderLeftWidth:M,borderTopWidth:E}=P;a(T?w.offsetLeft:$m(-parseFloat(M))),c(T?w.offsetTop:$m(-parseFloat(E))),d(w.offsetWidth),h(w.offsetHeight);const{borderTopLeftRadius:A,borderTopRightRadius:R,borderBottomLeftRadius:F,borderBottomRightRadius:_}=P;i([A,R,_,F].map(N=>$m(parseFloat(N))))}let b,S,$;const x=()=>{clearTimeout($),Qe.cancel(S),b==null||b.disconnect()},C=()=>{var w;const P=(w=t.value)===null||w===void 0?void 0:w.parentElement;P&&(Xi(null,P),P.parentElement&&P.parentElement.removeChild(P))};Ue(()=>{x(),$=setTimeout(()=>{C()},5e3);const{target:w}=e;w&&(S=Qe(()=>{y(),g(!0)}),typeof ResizeObserver<"u"&&(b=new ResizeObserver(y),b.observe(w)))}),tt(()=>{x()});const O=w=>{w.propertyName==="opacity"&&C()};return()=>{if(!m.value)return null;const w={left:`${l.value}px`,top:`${s.value}px`,width:`${u.value}px`,height:`${f.value}px`,borderRadius:r.value.map(P=>`${P}px`).join(" ")};return n&&(w["--wave-color"]=n.value),p(rn,{appear:!0,name:"wave-motion",appearFromClass:"wave-motion-appear",appearActiveClass:"wave-motion-appear",appearToClass:"wave-motion-appear wave-motion-appear-active"},{default:()=>[p("div",{ref:t,class:e.className,style:w,onTransitionend:O},null)]})}}});function hG(e,t){const n=document.createElement("div");return n.style.position="absolute",n.style.left="0px",n.style.top="0px",e==null||e.insertBefore(n,e==null?void 0:e.firstChild),Xi(p(pG,{target:e,className:t},null),n),()=>{Xi(null,n),n.parentElement&&n.parentElement.removeChild(n)}}function gG(e,t){const n=$n();let o;function r(){var i;const l=to(n);o==null||o(),!(!((i=t==null?void 0:t.value)===null||i===void 0)&&i.disabled||!l)&&(o=hG(l,e.value))}return tt(()=>{o==null||o()}),r}const n1=re({compatConfig:{MODE:3},name:"Wave",props:{disabled:Boolean},setup(e,t){let{slots:n}=t;const o=$n(),{prefixCls:r,wave:i}=Ee("wave",e),[,l]=uG(r),a=gG(I(()=>ce(r.value,l.value)),i);let s;const c=()=>{to(o).removeEventListener("click",s,!0)};return Ue(()=>{Se(()=>e.disabled,()=>{c(),lt(()=>{const u=to(o);u==null||u.removeEventListener("click",s,!0),!(!u||u.nodeType!==1||e.disabled)&&(s=d=>{d.target.tagName==="INPUT"||!mh(d.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")||u.className.includes("-leave")||a()},u.addEventListener("click",s,!0))})},{immediate:!0,flush:"post"})}),tt(()=>{c()}),()=>{var u;return(u=n.default)===null||u===void 0?void 0:u.call(n)[0]}}});function lp(e){return e==="danger"?{danger:!0}:{type:e}}const zI=()=>({prefixCls:String,type:String,htmlType:{type:String,default:"button"},shape:{type:String},size:{type:String},loading:{type:[Boolean,Object],default:()=>!1},disabled:{type:Boolean,default:void 0},ghost:{type:Boolean,default:void 0},block:{type:Boolean,default:void 0},danger:{type:Boolean,default:void 0},icon:W.any,href:String,target:String,title:String,onClick:Wl(),onMousedown:Wl()}),mw=e=>{e&&(e.style.width="0px",e.style.opacity="0",e.style.transform="scale(0)")},vw=e=>{lt(()=>{e&&(e.style.width=`${e.scrollWidth}px`,e.style.opacity="1",e.style.transform="scale(1)")})},bw=e=>{e&&e.style&&(e.style.width=null,e.style.opacity=null,e.style.transform=null)},mG=re({compatConfig:{MODE:3},name:"LoadingIcon",props:{prefixCls:String,loading:[Boolean,Object],existIcon:Boolean},setup(e){return()=>{const{existIcon:t,prefixCls:n,loading:o}=e;if(t)return p("span",{class:`${n}-loading-icon`},[p(io,null,null)]);const r=!!o;return p(rn,{name:`${n}-loading-icon-motion`,onBeforeEnter:mw,onEnter:vw,onAfterEnter:bw,onBeforeLeave:vw,onLeave:i=>{setTimeout(()=>{mw(i)})},onAfterLeave:bw},{default:()=>[r?p("span",{class:`${n}-loading-icon`},[p(io,null,null)]):null]})}}}),yw=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),vG=e=>{const{componentCls:t,fontSize:n,lineWidth:o,colorPrimaryHover:r,colorErrorHover:i}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:-o,[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},yw(`${t}-primary`,r),yw(`${t}-danger`,i)]}};function bG(e,t){return{[`&-item:not(${t}-last-item)`]:{marginBottom:-e.lineWidth},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function yG(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function SG(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:v(v({},bG(e,t)),yG(e.componentCls,t))}}const $G=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{outline:"none",position:"relative",display:"inline-block",fontWeight:400,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",lineHeight:e.lineHeight,color:e.colorText,"> span":{display:"inline-block"},[`> ${n} + span, > span + ${n}`]:{marginInlineStart:e.marginXS},"> a":{color:"currentColor"},"&:not(:disabled)":v({},pi(e)),[`&-icon-only${t}-compact-item`]:{flex:"none"},[`&-compact-item${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-e.lineWidth,insetInlineStart:-e.lineWidth,display:"inline-block",width:e.lineWidth,height:`calc(100% + ${e.lineWidth*2}px)`,backgroundColor:e.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-vertical-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-e.lineWidth,insetInlineStart:-e.lineWidth,display:"inline-block",width:`calc(100% + ${e.lineWidth*2}px)`,height:e.lineWidth,backgroundColor:e.colorPrimaryHover,content:'""'}}}}}}},hi=(e,t)=>({"&:not(:disabled)":{"&:hover":e,"&:active":t}}),CG=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),xG=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.controlHeight/2,paddingInlineEnd:e.controlHeight/2}),h0=e=>({cursor:"not-allowed",borderColor:e.colorBorder,color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,boxShadow:"none"}),ap=(e,t,n,o,r,i,l)=>({[`&${e}-background-ghost`]:v(v({color:t||void 0,backgroundColor:"transparent",borderColor:n||void 0,boxShadow:"none"},hi(v({backgroundColor:"transparent"},i),v({backgroundColor:"transparent"},l))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:r||void 0}})}),o1=e=>({"&:disabled":v({},h0(e))}),HI=e=>v({},o1(e)),sp=e=>({"&:disabled":{cursor:"not-allowed",color:e.colorTextDisabled}}),jI=e=>v(v(v(v(v({},HI(e)),{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`}),hi({color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),ap(e.componentCls,e.colorBgContainer,e.colorBgContainer,e.colorTextDisabled,e.colorBorder)),{[`&${e.componentCls}-dangerous`]:v(v(v({color:e.colorError,borderColor:e.colorError},hi({color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),ap(e.componentCls,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder)),o1(e))}),wG=e=>v(v(v(v(v({},HI(e)),{color:e.colorTextLightSolid,backgroundColor:e.colorPrimary,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`}),hi({color:e.colorTextLightSolid,backgroundColor:e.colorPrimaryHover},{color:e.colorTextLightSolid,backgroundColor:e.colorPrimaryActive})),ap(e.componentCls,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),{[`&${e.componentCls}-dangerous`]:v(v(v({backgroundColor:e.colorError,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`},hi({backgroundColor:e.colorErrorHover},{backgroundColor:e.colorErrorActive})),ap(e.componentCls,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),o1(e))}),OG=e=>v(v({},jI(e)),{borderStyle:"dashed"}),PG=e=>v(v(v({color:e.colorLink},hi({color:e.colorLinkHover},{color:e.colorLinkActive})),sp(e)),{[`&${e.componentCls}-dangerous`]:v(v({color:e.colorError},hi({color:e.colorErrorHover},{color:e.colorErrorActive})),sp(e))}),IG=e=>v(v(v({},hi({color:e.colorText,backgroundColor:e.colorBgTextHover},{color:e.colorText,backgroundColor:e.colorBgTextActive})),sp(e)),{[`&${e.componentCls}-dangerous`]:v(v({color:e.colorError},sp(e)),hi({color:e.colorErrorHover,backgroundColor:e.colorErrorBg},{color:e.colorErrorHover,backgroundColor:e.colorErrorBg}))}),TG=e=>v(v({},h0(e)),{[`&${e.componentCls}:hover`]:v({},h0(e))}),EG=e=>{const{componentCls:t}=e;return{[`${t}-default`]:jI(e),[`${t}-primary`]:wG(e),[`${t}-dashed`]:OG(e),[`${t}-link`]:PG(e),[`${t}-text`]:IG(e),[`${t}-disabled`]:TG(e)}},r1=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:n,iconCls:o,controlHeight:r,fontSize:i,lineHeight:l,lineWidth:a,borderRadius:s,buttonPaddingHorizontal:c}=e,u=Math.max(0,(r-i*l)/2-a),d=c-a,f=`${n}-icon-only`;return[{[`${n}${t}`]:{fontSize:i,height:r,padding:`${u}px ${d}px`,borderRadius:s,[`&${f}`]:{width:r,paddingInlineStart:0,paddingInlineEnd:0,[`&${n}-round`]:{width:"auto"},"> span":{transform:"scale(1.143)"}},[`&${n}-loading`]:{opacity:e.opacityLoading,cursor:"default"},[`${n}-loading-icon`]:{transition:`width ${e.motionDurationSlow} ${e.motionEaseInOut}, opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`&:not(${f}) ${n}-loading-icon > ${o}`]:{marginInlineEnd:e.marginXS}}},{[`${n}${n}-circle${t}`]:CG(e)},{[`${n}${n}-round${t}`]:xG(e)}]},_G=e=>r1(e),MG=e=>{const t=Fe(e,{controlHeight:e.controlHeightSM,padding:e.paddingXS,buttonPaddingHorizontal:8,borderRadius:e.borderRadiusSM});return r1(t,`${e.componentCls}-sm`)},AG=e=>{const t=Fe(e,{controlHeight:e.controlHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG});return r1(t,`${e.componentCls}-lg`)},RG=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},DG=Xe("Button",e=>{const{controlTmpOutline:t,paddingContentHorizontal:n}=e,o=Fe(e,{colorOutlineDefault:t,buttonPaddingHorizontal:n});return[$G(o),MG(o),_G(o),AG(o),RG(o),EG(o),vG(o),Os(e,{focus:!1}),SG(e)]}),NG=()=>({prefixCls:String,size:{type:String}}),VI=Dy(),cp=re({compatConfig:{MODE:3},name:"AButtonGroup",props:NG(),setup(e,t){let{slots:n}=t;const{prefixCls:o,direction:r}=Ee("btn-group",e),[,,i]=mi();VI.useProvide(ft({size:I(()=>e.size)}));const l=I(()=>{const{size:a}=e;let s="";switch(a){case"large":s="lg";break;case"small":s="sm";break;case"middle":case void 0:break;default:It(!a,"Button.Group","Invalid prop `size`.")}return{[`${o.value}`]:!0,[`${o.value}-${s}`]:s,[`${o.value}-rtl`]:r.value==="rtl",[i.value]:!0}});return()=>{var a;return p("div",{class:l.value},[xt((a=n.default)===null||a===void 0?void 0:a.call(n))])}}}),Sw=/^[\u4e00-\u9fa5]{2}$/,$w=Sw.test.bind(Sw);function pd(e){return e==="text"||e==="link"}const Wt=re({compatConfig:{MODE:3},name:"AButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:et(zI(),{type:"default"}),slots:Object,setup(e,t){let{slots:n,attrs:o,emit:r,expose:i}=t;const{prefixCls:l,autoInsertSpaceInButton:a,direction:s,size:c}=Ee("btn",e),[u,d]=DG(l),f=VI.useInject(),h=mo(),m=I(()=>{var _;return(_=e.disabled)!==null&&_!==void 0?_:h.value}),g=oe(null),y=oe(void 0);let b=!1;const S=oe(!1),$=oe(!1),x=I(()=>a.value!==!1),{compactSize:C,compactItemClassnames:O}=ol(l,s),w=I(()=>typeof e.loading=="object"&&e.loading.delay?e.loading.delay||!0:!!e.loading);Se(w,_=>{clearTimeout(y.value),typeof w.value=="number"?y.value=setTimeout(()=>{S.value=_},w.value):S.value=_},{immediate:!0});const P=I(()=>{const{type:_,shape:N="default",ghost:B,block:L,danger:k}=e,z=l.value,H={large:"lg",small:"sm",middle:void 0},j=C.value||(f==null?void 0:f.size)||c.value,Y=j&&H[j]||"";return[O.value,{[d.value]:!0,[`${z}`]:!0,[`${z}-${N}`]:N!=="default"&&N,[`${z}-${_}`]:_,[`${z}-${Y}`]:Y,[`${z}-loading`]:S.value,[`${z}-background-ghost`]:B&&!pd(_),[`${z}-two-chinese-chars`]:$.value&&x.value,[`${z}-block`]:L,[`${z}-dangerous`]:!!k,[`${z}-rtl`]:s.value==="rtl"}]}),T=()=>{const _=g.value;if(!_||a.value===!1)return;const N=_.textContent;b&&$w(N)?$.value||($.value=!0):$.value&&($.value=!1)},M=_=>{if(S.value||m.value){_.preventDefault();return}r("click",_)},E=_=>{r("mousedown",_)},A=(_,N)=>{const B=N?" ":"";if(_.type===Ji){let L=_.children.trim();return $w(L)&&(L=L.split("").join(B)),p("span",null,[L])}return _};return je(()=>{It(!(e.ghost&&pd(e.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),Ue(T),Vn(T),tt(()=>{y.value&&clearTimeout(y.value)}),i({focus:()=>{var _;(_=g.value)===null||_===void 0||_.focus()},blur:()=>{var _;(_=g.value)===null||_===void 0||_.blur()}}),()=>{var _,N;const{icon:B=(_=n.icon)===null||_===void 0?void 0:_.call(n)}=e,L=xt((N=n.default)===null||N===void 0?void 0:N.call(n));b=L.length===1&&!B&&!pd(e.type);const{type:k,htmlType:z,href:H,title:j,target:Y}=e,Z=S.value?"loading":B,G=v(v({},o),{title:j,disabled:m.value,class:[P.value,o.class,{[`${l.value}-icon-only`]:L.length===0&&!!Z}],onClick:M,onMousedown:E});m.value||delete G.disabled;const te=B&&!S.value?B:p(mG,{existIcon:!!B,prefixCls:l.value,loading:!!S.value},null),U=L.map(J=>A(J,b&&x.value));if(H!==void 0)return u(p("a",D(D({},G),{},{href:H,target:Y,ref:g}),[te,U]));let Q=p("button",D(D({},G),{},{ref:g,type:z}),[te,U]);if(!pd(k)){const J=function(){return Q}();Q=p(n1,{ref:"wave",disabled:!!S.value},{default:()=>[J]})}return u(Q)}}});Wt.Group=cp;Wt.install=function(e){return e.component(Wt.name,Wt),e.component(cp.name,cp),e};const WI=()=>({arrow:ze([Boolean,Object]),trigger:{type:[Array,String]},menu:Ne(),overlay:W.any,visible:Ce(),open:Ce(),disabled:Ce(),danger:Ce(),autofocus:Ce(),align:Ne(),getPopupContainer:Function,prefixCls:String,transitionName:String,placement:String,overlayClassName:String,overlayStyle:Ne(),forceRender:Ce(),mouseEnterDelay:Number,mouseLeaveDelay:Number,openClassName:String,minOverlayWidthMatchTrigger:Ce(),destroyPopupOnHide:Ce(),onVisibleChange:{type:Function},"onUpdate:visible":{type:Function},onOpenChange:{type:Function},"onUpdate:open":{type:Function}}),Cm=zI(),BG=()=>v(v({},WI()),{type:Cm.type,size:String,htmlType:Cm.htmlType,href:String,disabled:Ce(),prefixCls:String,icon:W.any,title:String,loading:Cm.loading,onClick:Wl()});var LG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};function Cw(e){for(var t=1;t{const{componentCls:t,antCls:n,paddingXS:o,opacityLoading:r}=e;return{[`${t}-button`]:{whiteSpace:"nowrap",[`&${n}-btn-group > ${n}-btn`]:{[`&-loading, &-loading + ${n}-btn`]:{cursor:"default",pointerEvents:"none",opacity:r},[`&:last-child:not(:first-child):not(${n}-btn-icon-only)`]:{paddingInline:o}}}}},zG=e=>{const{componentCls:t,menuCls:n,colorError:o,colorTextLightSolid:r}=e,i=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:o,"&:hover":{color:r,backgroundColor:o}}}}}},HG=e=>{const{componentCls:t,menuCls:n,zIndexPopup:o,dropdownArrowDistance:r,dropdownArrowOffset:i,sizePopupArrow:l,antCls:a,iconCls:s,motionDurationMid:c,dropdownPaddingVertical:u,fontSize:d,dropdownEdgeChildPadding:f,colorTextDisabled:h,fontSizeIcon:m,controlPaddingHorizontal:g,colorBgElevated:y,boxShadowPopoverArrow:b}=e;return[{[t]:v(v({},Ze(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:o,display:"block","&::before":{position:"absolute",insetBlock:-r+l/2,zIndex:-9999,opacity:1e-4,content:'""'},[`${t}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:m},[`${s}-down::before`]:{transition:`transform ${c}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[` + &-show-arrow${t}-placement-topLeft, + &-show-arrow${t}-placement-top, + &-show-arrow${t}-placement-topRight + `]:{paddingBottom:r},[` + &-show-arrow${t}-placement-bottomLeft, + &-show-arrow${t}-placement-bottom, + &-show-arrow${t}-placement-bottomRight + `]:{paddingTop:r},[`${t}-arrow`]:v({position:"absolute",zIndex:1,display:"block"},Jb(l,e.borderRadiusXS,e.borderRadiusOuter,y,b)),[` + &-placement-top > ${t}-arrow, + &-placement-topLeft > ${t}-arrow, + &-placement-topRight > ${t}-arrow + `]:{bottom:r,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${t}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft > ${t}-arrow`]:{left:{_skip_check_:!0,value:i}},[`&-placement-topRight > ${t}-arrow`]:{right:{_skip_check_:!0,value:i}},[` + &-placement-bottom > ${t}-arrow, + &-placement-bottomLeft > ${t}-arrow, + &-placement-bottomRight > ${t}-arrow + `]:{top:r,transform:"translateY(-100%)"},[`&-placement-bottom > ${t}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateY(-100%) translateX(-50%)"},[`&-placement-bottomLeft > ${t}-arrow`]:{left:{_skip_check_:!0,value:i}},[`&-placement-bottomRight > ${t}-arrow`]:{right:{_skip_check_:!0,value:i}},[`&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomLeft, + &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomLeft, + &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottom, + &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottom, + &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomRight, + &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:Eh},[`&${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topLeft, + &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topLeft, + &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-top, + &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-top, + &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topRight, + &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Mh},[`&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomLeft, + &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottom, + &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:_h},[`&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topLeft, + &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-top, + &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Ah}})},{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:o,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul,li":{listStyle:"none"},ul:{marginInline:"0.3em"}},[`${t}, ${t}-menu-submenu`]:{[n]:v(v({padding:f,listStyleType:"none",backgroundColor:y,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},pi(e)),{[`${n}-item-group-title`]:{padding:`${u}px ${g}px`,color:e.colorTextDescription,transition:`all ${c}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center",borderRadius:e.borderRadiusSM},[`${n}-item-icon`]:{minWidth:d,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${c}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${n}-item, ${n}-submenu-title`]:v(v({clear:"both",margin:0,padding:`${u}px ${g}px`,color:e.colorText,fontWeight:"normal",fontSize:d,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${c}`,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},pi(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:h,cursor:"not-allowed","&:hover":{color:h,backgroundColor:y,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${e.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorTextDescription,fontSize:m,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${e.marginXS}px`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:g+e.fontSizeSM},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:h,backgroundColor:y,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})}},[Br(e,"slide-up"),Br(e,"slide-down"),ps(e,"move-up"),ps(e,"move-down"),ws(e,"zoom-big")]]},KI=Xe("Dropdown",(e,t)=>{let{rootPrefixCls:n}=t;const{marginXXS:o,sizePopupArrow:r,controlHeight:i,fontSize:l,lineHeight:a,paddingXXS:s,componentCls:c,borderRadiusOuter:u,borderRadiusLG:d}=e,f=(i-l*a)/2,{dropdownArrowOffset:h}=NI({sizePopupArrow:r,contentRadius:d,borderRadiusOuter:u}),m=Fe(e,{menuCls:`${c}-menu`,rootPrefixCls:n,dropdownArrowDistance:r/2+o,dropdownArrowOffset:h,dropdownPaddingVertical:f,dropdownEdgeChildPadding:s});return[HG(m),FG(m),zG(m)]},e=>({zIndexPopup:e.zIndexPopupBase+50}));var jG=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{r("update:visible",f),r("visibleChange",f),r("update:open",f),r("openChange",f)},{prefixCls:l,direction:a,getPopupContainer:s}=Ee("dropdown",e),c=I(()=>`${l.value}-button`),[u,d]=KI(l);return()=>{var f,h;const m=v(v({},e),o),{type:g="default",disabled:y,danger:b,loading:S,htmlType:$,class:x="",overlay:C=(f=n.overlay)===null||f===void 0?void 0:f.call(n),trigger:O,align:w,open:P,visible:T,onVisibleChange:M,placement:E=a.value==="rtl"?"bottomLeft":"bottomRight",href:A,title:R,icon:F=((h=n.icon)===null||h===void 0?void 0:h.call(n))||p(Cu,null,null),mouseEnterDelay:_,mouseLeaveDelay:N,overlayClassName:B,overlayStyle:L,destroyPopupOnHide:k,onClick:z,"onUpdate:open":H}=m,j=jG(m,["type","disabled","danger","loading","htmlType","class","overlay","trigger","align","open","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:open"]),Y={align:w,disabled:y,trigger:y?[]:O,placement:E,getPopupContainer:s==null?void 0:s.value,onOpenChange:i,mouseEnterDelay:_,mouseLeaveDelay:N,open:P??T,overlayClassName:B,overlayStyle:L,destroyPopupOnHide:k},Z=p(Wt,{danger:b,type:g,disabled:y,loading:S,onClick:z,htmlType:$,href:A,title:R},{default:n.default}),G=p(Wt,{danger:b,type:g,icon:F},null);return u(p(VG,D(D({},j),{},{class:ce(c.value,x,d.value)}),{default:()=>[n.leftButton?n.leftButton({button:Z}):Z,p(sr,Y,{default:()=>[n.rightButton?n.rightButton({button:G}):G],overlay:()=>C})]}))}}});var WG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};function xw(e){for(var t=1;tKe(UI,void 0),i1=e=>{var t,n,o;const{prefixCls:r,mode:i,selectable:l,validator:a,onClick:s,expandIcon:c}=GI()||{};qe(UI,{prefixCls:I(()=>{var u,d;return(d=(u=e.prefixCls)===null||u===void 0?void 0:u.value)!==null&&d!==void 0?d:r==null?void 0:r.value}),mode:I(()=>{var u,d;return(d=(u=e.mode)===null||u===void 0?void 0:u.value)!==null&&d!==void 0?d:i==null?void 0:i.value}),selectable:I(()=>{var u,d;return(d=(u=e.selectable)===null||u===void 0?void 0:u.value)!==null&&d!==void 0?d:l==null?void 0:l.value}),validator:(t=e.validator)!==null&&t!==void 0?t:a,onClick:(n=e.onClick)!==null&&n!==void 0?n:s,expandIcon:(o=e.expandIcon)!==null&&o!==void 0?o:c==null?void 0:c.value})},sr=re({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:et(WI(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:Object,setup(e,t){let{slots:n,attrs:o,emit:r}=t;const{prefixCls:i,rootPrefixCls:l,direction:a,getPopupContainer:s}=Ee("dropdown",e),[c,u]=KI(i),d=I(()=>{const{placement:y="",transitionName:b}=e;return b!==void 0?b:y.includes("top")?`${l.value}-slide-down`:`${l.value}-slide-up`});i1({prefixCls:I(()=>`${i.value}-menu`),expandIcon:I(()=>p("span",{class:`${i.value}-menu-submenu-arrow`},[p(Ao,{class:`${i.value}-menu-submenu-arrow-icon`},null)])),mode:I(()=>"vertical"),selectable:I(()=>!1),onClick:()=>{},validator:y=>{let{mode:b}=y}});const f=()=>{var y,b,S;const $=e.overlay||((y=n.overlay)===null||y===void 0?void 0:y.call(n)),x=Array.isArray($)?$[0]:$;if(!x)return null;const C=x.props||{};It(!C.mode||C.mode==="vertical","Dropdown",`mode="${C.mode}" is not supported for Dropdown's Menu.`);const{selectable:O=!1,expandIcon:w=(S=(b=x.children)===null||b===void 0?void 0:b.expandIcon)===null||S===void 0?void 0:S.call(b)}=C,P=typeof w<"u"&&qt(w)?w:p("span",{class:`${i.value}-menu-submenu-arrow`},[p(Ao,{class:`${i.value}-menu-submenu-arrow-icon`},null)]);return qt(x)?ht(x,{mode:"vertical",selectable:O,expandIcon:()=>P}):x},h=I(()=>{const y=e.placement;if(!y)return a.value==="rtl"?"bottomRight":"bottomLeft";if(y.includes("Center")){const b=y.slice(0,y.indexOf("Center"));return It(!y.includes("Center"),"Dropdown",`You are using '${y}' placement in Dropdown, which is deprecated. Try to use '${b}' instead.`),b}return y}),m=I(()=>typeof e.visible=="boolean"?e.visible:e.open),g=y=>{r("update:visible",y),r("visibleChange",y),r("update:open",y),r("openChange",y)};return()=>{var y,b;const{arrow:S,trigger:$,disabled:x,overlayClassName:C}=e,O=(y=n.default)===null||y===void 0?void 0:y.call(n)[0],w=ht(O,v({class:ce((b=O==null?void 0:O.props)===null||b===void 0?void 0:b.class,{[`${i.value}-rtl`]:a.value==="rtl"},`${i.value}-trigger`)},x?{disabled:x}:{})),P=ce(C,u.value,{[`${i.value}-rtl`]:a.value==="rtl"}),T=x?[]:$;let M;T&&T.includes("contextmenu")&&(M=!0);const E=Jy({arrowPointAtCenter:typeof S=="object"&&S.pointAtCenter,autoAdjustOverflow:!0}),A=rt(v(v(v({},e),o),{visible:m.value,builtinPlacements:E,overlayClassName:P,arrow:!!S,alignPoint:M,prefixCls:i.value,getPopupContainer:s==null?void 0:s.value,transitionName:d.value,trigger:T,onVisibleChange:g,placement:h.value}),["overlay","onUpdate:visible"]);return c(p(FI,A,{default:()=>[w],overlay:f}))}}});sr.Button=Zc;var UG=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,href:String,separator:W.any,dropdownProps:Ne(),overlay:W.any,onClick:Wl()}),Jc=re({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:GG(),slots:Object,setup(e,t){let{slots:n,attrs:o,emit:r}=t;const{prefixCls:i}=Ee("breadcrumb",e),l=(s,c)=>{const u=on(n,e,"overlay");return u?p(sr,D(D({},e.dropdownProps),{},{overlay:u,placement:"bottom"}),{default:()=>[p("span",{class:`${c}-overlay-link`},[s,p(nl,null,null)])]}):s},a=s=>{r("click",s)};return()=>{var s;const c=(s=on(n,e,"separator"))!==null&&s!==void 0?s:"/",u=on(n,e),{class:d,style:f}=o,h=UG(o,["class","style"]);let m;return e.href!==void 0?m=p("a",D({class:`${i.value}-link`,onClick:a},h),[u]):m=p("span",D({class:`${i.value}-link`,onClick:a},h),[u]),m=l(m,i.value),u!=null?p("li",{class:d,style:f},[m,c&&p("span",{class:`${i.value}-separator`},[c])]):null}}});function XG(e,t,n,o){let r;if(r!==void 0)return!!r;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const i=Object.keys(e),l=Object.keys(t);if(i.length!==l.length)return!1;const a=Object.prototype.hasOwnProperty.bind(t);for(let s=0;s{qe(XI,e)},yi=()=>Ke(XI),qI=Symbol("ForceRenderKey"),YG=e=>{qe(qI,e)},ZI=()=>Ke(qI,!1),JI=Symbol("menuFirstLevelContextKey"),QI=e=>{qe(JI,e)},qG=()=>Ke(JI,!0),up=re({compatConfig:{MODE:3},name:"MenuContextProvider",inheritAttrs:!1,props:{mode:{type:String,default:void 0},overflowDisabled:{type:Boolean,default:void 0}},setup(e,t){let{slots:n}=t;const o=yi(),r=v({},o);return e.mode!==void 0&&(r.mode=We(e,"mode")),e.overflowDisabled!==void 0&&(r.overflowDisabled=We(e,"overflowDisabled")),YI(r),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),eT=Symbol("siderCollapsed"),tT=Symbol("siderHookProvider"),hd="$$__vc-menu-more__key",nT=Symbol("KeyPathContext"),l1=()=>Ke(nT,{parentEventKeys:I(()=>[]),parentKeys:I(()=>[]),parentInfo:{}}),ZG=(e,t,n)=>{const{parentEventKeys:o,parentKeys:r}=l1(),i=I(()=>[...o.value,e]),l=I(()=>[...r.value,t]);return qe(nT,{parentEventKeys:i,parentKeys:l,parentInfo:n}),l},oT=Symbol("measure"),ww=re({compatConfig:{MODE:3},setup(e,t){let{slots:n}=t;return qe(oT,!0),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),a1=()=>Ke(oT,!1);function rT(e){const{mode:t,rtl:n,inlineIndent:o}=yi();return I(()=>t.value!=="inline"?null:n.value?{paddingRight:`${e.value*o.value}px`}:{paddingLeft:`${e.value*o.value}px`})}let JG=0;const QG=()=>({id:String,role:String,disabled:Boolean,danger:Boolean,title:{type:[String,Boolean],default:void 0},icon:W.any,onMouseenter:Function,onMouseleave:Function,onClick:Function,onKeydown:Function,onFocus:Function,originItemValue:Ne()}),Rr=re({compatConfig:{MODE:3},name:"AMenuItem",inheritAttrs:!1,props:QG(),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r}=t;const i=$n(),l=a1(),a=typeof i.vnode.key=="symbol"?String(i.vnode.key):i.vnode.key;It(typeof i.vnode.key!="symbol","MenuItem",`MenuItem \`:key="${String(a)}"\` not support Symbol type`);const s=`menu_item_${++JG}_$$_${a}`,{parentEventKeys:c,parentKeys:u}=l1(),{prefixCls:d,activeKeys:f,disabled:h,changeActiveKeys:m,rtl:g,inlineCollapsed:y,siderCollapsed:b,onItemClick:S,selectedKeys:$,registerMenuInfo:x,unRegisterMenuInfo:C}=yi(),O=qG(),w=oe(!1),P=I(()=>[...u.value,a]);x(s,{eventKey:s,key:a,parentEventKeys:c,parentKeys:u,isLeaf:!0}),tt(()=>{C(s)}),Se(f,()=>{w.value=!!f.value.find(H=>H===a)},{immediate:!0});const M=I(()=>h.value||e.disabled),E=I(()=>$.value.includes(a)),A=I(()=>{const H=`${d.value}-item`;return{[`${H}`]:!0,[`${H}-danger`]:e.danger,[`${H}-active`]:w.value,[`${H}-selected`]:E.value,[`${H}-disabled`]:M.value}}),R=H=>({key:a,eventKey:s,keyPath:P.value,eventKeyPath:[...c.value,s],domEvent:H,item:v(v({},e),r)}),F=H=>{if(M.value)return;const j=R(H);o("click",H),S(j)},_=H=>{M.value||(m(P.value),o("mouseenter",H))},N=H=>{M.value||(m([]),o("mouseleave",H))},B=H=>{if(o("keydown",H),H.which===Ie.ENTER){const j=R(H);o("click",H),S(j)}},L=H=>{m(P.value),o("focus",H)},k=(H,j)=>{const Y=p("span",{class:`${d.value}-title-content`},[j]);return(!H||qt(j)&&j.type==="span")&&j&&y.value&&O&&typeof j=="string"?p("div",{class:`${d.value}-inline-collapsed-noicon`},[j.charAt(0)]):Y},z=rT(I(()=>P.value.length));return()=>{var H,j,Y,Z,G;if(l)return null;const te=(H=e.title)!==null&&H!==void 0?H:(j=n.title)===null||j===void 0?void 0:j.call(n),U=xt((Y=n.default)===null||Y===void 0?void 0:Y.call(n)),Q=U.length;let J=te;typeof te>"u"?J=O&&Q?U:"":te===!1&&(J="");const X={title:J};!b.value&&!y.value&&(X.title=null,X.open=!1);const q={};e.role==="option"&&(q["aria-selected"]=E.value);const V=(Z=e.icon)!==null&&Z!==void 0?Z:(G=n.icon)===null||G===void 0?void 0:G.call(n,e);return p(ho,D(D({},X),{},{placement:g.value?"left":"right",overlayClassName:`${d.value}-inline-collapsed-tooltip`}),{default:()=>[p(ai.Item,D(D(D({component:"li"},r),{},{id:e.id,style:v(v({},r.style||{}),z.value),class:[A.value,{[`${r.class}`]:!!r.class,[`${d.value}-item-only-child`]:(V?Q+1:Q)===1}],role:e.role||"menuitem",tabindex:e.disabled?null:-1,"data-menu-id":a,"aria-disabled":e.disabled},q),{},{onMouseenter:_,onMouseleave:N,onClick:F,onKeydown:B,onFocus:L,title:typeof te=="string"?te:void 0}),{default:()=>[ht(typeof V=="function"?V(e.originItemValue):V,{class:`${d.value}-item-icon`},!1),k(V,U)]})]})}}}),zi={adjustX:1,adjustY:1},eX={topLeft:{points:["bl","tl"],overflow:zi,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:zi,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:zi,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:zi,offset:[4,0]}},tX={topLeft:{points:["bl","tl"],overflow:zi,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:zi,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:zi,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:zi,offset:[4,0]}},nX={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Ow=re({compatConfig:{MODE:3},name:"PopupTrigger",inheritAttrs:!1,props:{prefixCls:String,mode:String,visible:Boolean,popupClassName:String,popupOffset:Array,disabled:Boolean,onVisibleChange:Function},slots:Object,emits:["visibleChange"],setup(e,t){let{slots:n,emit:o}=t;const r=oe(!1),{getPopupContainer:i,rtl:l,subMenuOpenDelay:a,subMenuCloseDelay:s,builtinPlacements:c,triggerSubMenuAction:u,forceSubMenuRender:d,motion:f,defaultMotions:h,rootClassName:m}=yi(),g=ZI(),y=I(()=>l.value?v(v({},tX),c.value):v(v({},eX),c.value)),b=I(()=>nX[e.mode]),S=oe();Se(()=>e.visible,C=>{Qe.cancel(S.value),S.value=Qe(()=>{r.value=C})},{immediate:!0}),tt(()=>{Qe.cancel(S.value)});const $=C=>{o("visibleChange",C)},x=I(()=>{var C,O;const w=f.value||((C=h.value)===null||C===void 0?void 0:C[e.mode])||((O=h.value)===null||O===void 0?void 0:O.other),P=typeof w=="function"?w():w;return P?qo(P.name,{css:!0}):void 0});return()=>{const{prefixCls:C,popupClassName:O,mode:w,popupOffset:P,disabled:T}=e;return p(ca,{prefixCls:C,popupClassName:ce(`${C}-popup`,{[`${C}-rtl`]:l.value},O,m.value),stretch:w==="horizontal"?"minWidth":null,getPopupContainer:i.value,builtinPlacements:y.value,popupPlacement:b.value,popupVisible:r.value,popupAlign:P&&{offset:P},action:T?[]:[u.value],mouseEnterDelay:a.value,mouseLeaveDelay:s.value,onPopupVisibleChange:$,forceRender:g||d.value,popupAnimation:x.value},{popup:n.popup,default:n.default})}}}),s1=(e,t)=>{let{slots:n,attrs:o}=t;var r;const{prefixCls:i,mode:l}=yi();return p("ul",D(D({},o),{},{class:ce(i.value,`${i.value}-sub`,`${i.value}-${l.value==="inline"?"inline":"vertical"}`),"data-menu-list":!0}),[(r=n.default)===null||r===void 0?void 0:r.call(n)])};s1.displayName="SubMenuList";const oX=re({compatConfig:{MODE:3},name:"InlineSubMenuList",inheritAttrs:!1,props:{id:String,open:Boolean,keyPath:Array},setup(e,t){let{slots:n}=t;const o=I(()=>"inline"),{motion:r,mode:i,defaultMotions:l}=yi(),a=I(()=>i.value===o.value),s=ie(!a.value),c=I(()=>a.value?e.open:!1);Se(i,()=>{a.value&&(s.value=!1)},{flush:"post"});const u=I(()=>{var d,f;const h=r.value||((d=l.value)===null||d===void 0?void 0:d[o.value])||((f=l.value)===null||f===void 0?void 0:f.other),m=typeof h=="function"?h():h;return v(v({},m),{appear:e.keyPath.length<=1})});return()=>{var d;return s.value?null:p(up,{mode:o.value},{default:()=>[p(rn,u.value,{default:()=>[_n(p(s1,{id:e.id},{default:()=>[(d=n.default)===null||d===void 0?void 0:d.call(n)]}),[[oo,c.value]])]})]})}}});let Pw=0;const rX=()=>({icon:W.any,title:W.any,disabled:Boolean,level:Number,popupClassName:String,popupOffset:Array,internalPopupClose:Boolean,eventKey:String,expandIcon:Function,theme:String,onMouseenter:Function,onMouseleave:Function,onTitleClick:Function,originItemValue:Ne()}),ql=re({compatConfig:{MODE:3},name:"ASubMenu",inheritAttrs:!1,props:rX(),slots:Object,setup(e,t){let{slots:n,attrs:o,emit:r}=t;var i,l;QI(!1);const a=a1(),s=$n(),c=typeof s.vnode.key=="symbol"?String(s.vnode.key):s.vnode.key;It(typeof s.vnode.key!="symbol","SubMenu",`SubMenu \`:key="${String(c)}"\` not support Symbol type`);const u=Fv(c)?c:`sub_menu_${++Pw}_$$_not_set_key`,d=(i=e.eventKey)!==null&&i!==void 0?i:Fv(c)?`sub_menu_${++Pw}_$$_${c}`:u,{parentEventKeys:f,parentInfo:h,parentKeys:m}=l1(),g=I(()=>[...m.value,u]),b={eventKey:d,key:u,parentEventKeys:f,childrenEventKeys:oe([]),parentKeys:m};(l=h.childrenEventKeys)===null||l===void 0||l.value.push(d),tt(()=>{var se;h.childrenEventKeys&&(h.childrenEventKeys.value=(se=h.childrenEventKeys)===null||se===void 0?void 0:se.value.filter(pe=>pe!=d))}),ZG(d,u,b);const{prefixCls:S,activeKeys:$,disabled:x,changeActiveKeys:C,mode:O,inlineCollapsed:w,openKeys:P,overflowDisabled:T,onOpenChange:M,registerMenuInfo:E,unRegisterMenuInfo:A,selectedSubMenuKeys:R,expandIcon:F,theme:_}=yi(),N=c!=null,B=!a&&(ZI()||!N);YG(B),(a&&N||!a&&!N||B)&&(E(d,b),tt(()=>{A(d)}));const L=I(()=>`${S.value}-submenu`),k=I(()=>x.value||e.disabled),z=oe(),H=oe(),j=I(()=>P.value.includes(u)),Y=I(()=>!T.value&&j.value),Z=I(()=>R.value.includes(u)),G=oe(!1);Se($,()=>{G.value=!!$.value.find(se=>se===u)},{immediate:!0});const te=se=>{k.value||(r("titleClick",se,u),O.value==="inline"&&M(u,!j.value))},U=se=>{k.value||(C(g.value),r("mouseenter",se))},Q=se=>{k.value||(C([]),r("mouseleave",se))},J=rT(I(()=>g.value.length)),X=se=>{O.value!=="inline"&&M(u,se)},q=()=>{C(g.value)},V=d&&`${d}-popup`,K=I(()=>ce(S.value,`${S.value}-${e.theme||_.value}`,e.popupClassName)),ee=(se,pe)=>{if(!pe)return w.value&&!m.value.length&&se&&typeof se=="string"?p("div",{class:`${S.value}-inline-collapsed-noicon`},[se.charAt(0)]):p("span",{class:`${S.value}-title-content`},[se]);const he=qt(se)&&se.type==="span";return p(He,null,[ht(typeof pe=="function"?pe(e.originItemValue):pe,{class:`${S.value}-item-icon`},!1),he?se:p("span",{class:`${S.value}-title-content`},[se])])},ue=I(()=>O.value!=="inline"&&g.value.length>1?"vertical":O.value),ae=I(()=>O.value==="horizontal"?"vertical":O.value),le=I(()=>ue.value==="horizontal"?"vertical":ue.value),ne=()=>{var se,pe;const he=L.value,ge=(se=e.icon)!==null&&se!==void 0?se:(pe=n.icon)===null||pe===void 0?void 0:pe.call(n,e),be=e.expandIcon||n.expandIcon||F.value,xe=ee(on(n,e,"title"),ge);return p("div",{style:J.value,class:`${he}-title`,tabindex:k.value?null:-1,ref:z,title:typeof xe=="string"?xe:null,"data-menu-id":u,"aria-expanded":Y.value,"aria-haspopup":!0,"aria-controls":V,"aria-disabled":k.value,onClick:te,onFocus:q},[xe,O.value!=="horizontal"&&be?be(v(v({},e),{isOpen:Y.value})):p("i",{class:`${he}-arrow`},null)])};return()=>{var se;if(a)return N?(se=n.default)===null||se===void 0?void 0:se.call(n):null;const pe=L.value;let he=()=>null;if(!T.value&&O.value!=="inline"){const ge=O.value==="horizontal"?[0,8]:[10,0];he=()=>p(Ow,{mode:ue.value,prefixCls:pe,visible:!e.internalPopupClose&&Y.value,popupClassName:K.value,popupOffset:e.popupOffset||ge,disabled:k.value,onVisibleChange:X},{default:()=>[ne()],popup:()=>p(up,{mode:le.value},{default:()=>[p(s1,{id:V,ref:H},{default:n.default})]})})}else he=()=>p(Ow,null,{default:ne});return p(up,{mode:ae.value},{default:()=>[p(ai.Item,D(D({component:"li"},o),{},{role:"none",class:ce(pe,`${pe}-${O.value}`,o.class,{[`${pe}-open`]:Y.value,[`${pe}-active`]:G.value,[`${pe}-selected`]:Z.value,[`${pe}-disabled`]:k.value}),onMouseenter:U,onMouseleave:Q,"data-submenu-id":u}),{default:()=>p(He,null,[he(),!T.value&&p(oX,{id:V,open:Y.value,keyPath:g.value},{default:n.default})])})]})}}});function iT(e,t){return e.classList?e.classList.contains(t):` ${e.className} `.indexOf(` ${t} `)>-1}function dp(e,t){e.classList?e.classList.add(t):iT(e,t)||(e.className=`${e.className} ${t}`)}function fp(e,t){if(e.classList)e.classList.remove(t);else if(iT(e,t)){const n=e.className;e.className=` ${n} `.replace(` ${t} `," ")}}const xu=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"ant-motion-collapse",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return{name:e,appear:t,css:!0,onBeforeEnter:n=>{n.style.height="0px",n.style.opacity="0",dp(n,e)},onEnter:n=>{lt(()=>{n.style.height=`${n.scrollHeight}px`,n.style.opacity="1"})},onAfterEnter:n=>{n&&(fp(n,e),n.style.height=null,n.style.opacity=null)},onBeforeLeave:n=>{dp(n,e),n.style.height=`${n.offsetHeight}px`,n.style.opacity=null},onLeave:n=>{setTimeout(()=>{n.style.height="0px",n.style.opacity="0"})},onAfterLeave:n=>{n&&(fp(n,e),n.style&&(n.style.height=null,n.style.opacity=null))}}},iX=()=>({title:W.any,originItemValue:Ne()}),Qc=re({compatConfig:{MODE:3},name:"AMenuItemGroup",inheritAttrs:!1,props:iX(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r}=yi(),i=I(()=>`${r.value}-item-group`),l=a1();return()=>{var a,s;return l?(a=n.default)===null||a===void 0?void 0:a.call(n):p("li",D(D({},o),{},{onClick:c=>c.stopPropagation(),class:i.value}),[p("div",{title:typeof e.title=="string"?e.title:void 0,class:`${i.value}-title`},[on(n,e,"title")]),p("ul",{class:`${i.value}-list`},[(s=n.default)===null||s===void 0?void 0:s.call(n)])])}}}),lX=()=>({prefixCls:String,dashed:Boolean}),eu=re({compatConfig:{MODE:3},name:"AMenuDivider",props:lX(),setup(e){const{prefixCls:t}=yi(),n=I(()=>({[`${t.value}-item-divider`]:!0,[`${t.value}-item-divider-dashed`]:!!e.dashed}));return()=>p("li",{class:n.value},null)}});var aX=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{if(o&&typeof o=="object"){const i=o,{label:l,children:a,key:s,type:c}=i,u=aX(i,["label","children","key","type"]),d=s??`tmp-${r}`,f=n?n.parentKeys.slice():[],h=[],m={eventKey:d,key:d,parentEventKeys:ie(f),parentKeys:ie(f),childrenEventKeys:ie(h),isLeaf:!1};if(a||c==="group"){if(c==="group"){const y=g0(a,t,n);return p(Qc,D(D({key:d},u),{},{title:l,originItemValue:o}),{default:()=>[y]})}t.set(d,m),n&&n.childrenEventKeys.push(d);const g=g0(a,t,{childrenEventKeys:h,parentKeys:[].concat(f,d)});return p(ql,D(D({key:d},u),{},{title:l,originItemValue:o}),{default:()=>[g]})}return c==="divider"?p(eu,D({key:d},u),null):(m.isLeaf=!0,t.set(d,m),p(Rr,D(D({key:d},u),{},{originItemValue:o}),{default:()=>[l]}))}return null}).filter(o=>o)}function sX(e){const t=oe([]),n=oe(!1),o=oe(new Map);return Se(()=>e.items,()=>{const r=new Map;n.value=!1,e.items?(n.value=!0,t.value=g0(e.items,r)):t.value=void 0,o.value=r},{immediate:!0,deep:!0}),{itemsNodes:t,store:o,hasItmes:n}}const cX=e=>{const{componentCls:t,motionDurationSlow:n,menuHorizontalHeight:o,colorSplit:r,lineWidth:i,lineType:l,menuItemPaddingInline:a}=e;return{[`${t}-horizontal`]:{lineHeight:`${o}px`,border:0,borderBottom:`${i}px ${l} ${r}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:a},[`> ${t}-item:hover, + > ${t}-item-active, + > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},uX=e=>{let{componentCls:t,menuArrowOffset:n}=e;return{[`${t}-rtl`]:{direction:"rtl"},[`${t}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${t}-rtl${t}-vertical, + ${t}-submenu-rtl ${t}-vertical`]:{[`${t}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${n})`},"&::after":{transform:`rotate(45deg) translateY(${n})`}}}}},Iw=e=>v({},fi(e)),Tw=(e,t)=>{const{componentCls:n,colorItemText:o,colorItemTextSelected:r,colorGroupTitle:i,colorItemBg:l,colorSubItemBg:a,colorItemBgSelected:s,colorActiveBarHeight:c,colorActiveBarWidth:u,colorActiveBarBorderSize:d,motionDurationSlow:f,motionEaseInOut:h,motionEaseOut:m,menuItemPaddingInline:g,motionDurationMid:y,colorItemTextHover:b,lineType:S,colorSplit:$,colorItemTextDisabled:x,colorDangerItemText:C,colorDangerItemTextHover:O,colorDangerItemTextSelected:w,colorDangerItemBgActive:P,colorDangerItemBgSelected:T,colorItemBgHover:M,menuSubMenuBg:E,colorItemTextSelectedHorizontal:A,colorItemBgSelectedHorizontal:R}=e;return{[`${n}-${t}`]:{color:o,background:l,[`&${n}-root:focus-visible`]:v({},Iw(e)),[`${n}-item-group-title`]:{color:i},[`${n}-submenu-selected`]:{[`> ${n}-submenu-title`]:{color:r}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${x} !important`},[`${n}-item:hover, ${n}-submenu-title:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:b}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:M},"&:active":{backgroundColor:s}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:M},"&:active":{backgroundColor:s}}},[`${n}-item-danger`]:{color:C,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:O}},[`&${n}-item:active`]:{background:P}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:r,[`&${n}-item-danger`]:{color:w},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:s,[`&${n}-item-danger`]:{backgroundColor:T}},[`${n}-item, ${n}-submenu-title`]:{[`&:not(${n}-item-disabled):focus-visible`]:v({},Iw(e))},[`&${n}-submenu > ${n}`]:{backgroundColor:E},[`&${n}-popup > ${n}`]:{backgroundColor:l},[`&${n}-horizontal`]:v(v({},t==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:d,marginTop:-d,marginBottom:0,borderRadius:0,"&::after":{position:"absolute",insetInline:g,bottom:0,borderBottom:`${c}px solid transparent`,transition:`border-color ${f} ${h}`,content:'""'},"&:hover, &-active, &-open":{"&::after":{borderBottomWidth:c,borderBottomColor:A}},"&-selected":{color:A,backgroundColor:R,"&::after":{borderBottomWidth:c,borderBottomColor:A}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${d}px ${S} ${$}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:a},[`${n}-item, ${n}-submenu-title`]:d&&u?{width:`calc(100% + ${d}px)`}:{},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${u}px solid ${r}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${y} ${m}`,`opacity ${y} ${m}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:w}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${y} ${h}`,`opacity ${y} ${h}`].join(",")}}}}}},Ew=e=>{const{componentCls:t,menuItemHeight:n,itemMarginInline:o,padding:r,menuArrowSize:i,marginXS:l,marginXXS:a}=e,s=r+i+l;return{[`${t}-item`]:{position:"relative"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:`${n}px`,paddingInline:r,overflow:"hidden",textOverflow:"ellipsis",marginInline:o,marginBlock:a,width:`calc(100% - ${o*2}px)`},[`${t}-submenu`]:{paddingBottom:.02},[`> ${t}-item, + > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:`${n}px`},[`${t}-item-group-list ${t}-submenu-title, + ${t}-submenu-title`]:{paddingInlineEnd:s}}},dX=e=>{const{componentCls:t,iconCls:n,menuItemHeight:o,colorTextLightSolid:r,dropdownWidth:i,controlHeightLG:l,motionDurationMid:a,motionEaseOut:s,paddingXL:c,fontSizeSM:u,fontSizeLG:d,motionDurationSlow:f,paddingXS:h,boxShadowSecondary:m}=e,g={height:o,lineHeight:`${o}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":v({[`&${t}-root`]:{boxShadow:"none"}},Ew(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:v(v({},Ew(e)),{boxShadow:m})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${l*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${f}`,`background ${f}`,`padding ${a} ${s}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:g,[`& ${t}-item-group-title`]:{paddingInlineStart:c}},[`${t}-item`]:g}},{[`${t}-inline-collapsed`]:{width:o*2,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:d,textAlign:"center"}}},[`> ${t}-item, + > ${t}-item-group > ${t}-item-group-list > ${t}-item, + > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title, + > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${u}px)`,textOverflow:"clip",[` + ${t}-submenu-arrow, + ${t}-submenu-expand-icon + `]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:d,lineHeight:`${o}px`,"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:r}},[`${t}-item-group-title`]:v(v({},Zt),{paddingInline:h})}}]},_w=e=>{const{componentCls:t,fontSize:n,motionDurationSlow:o,motionDurationMid:r,motionEaseInOut:i,motionEaseOut:l,iconCls:a,controlHeightSM:s}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${o}`,`background ${o}`,`padding ${o} ${i}`].join(","),[`${t}-item-icon, ${a}`]:{minWidth:n,fontSize:n,transition:[`font-size ${r} ${l}`,`margin ${o} ${i}`,`color ${o}`].join(","),"+ span":{marginInlineStart:s-n,opacity:1,transition:[`opacity ${o} ${i}`,`margin ${o}`,`color ${o}`].join(",")}},[`${t}-item-icon`]:v({},ra()),[`&${t}-item-only-child`]:{[`> ${a}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Mw=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:o,borderRadius:r,menuArrowSize:i,menuArrowOffset:l}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${o}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:i*.6,height:i*.15,backgroundColor:"currentcolor",borderRadius:r,transition:[`background ${n} ${o}`,`transform ${n} ${o}`,`top ${n} ${o}`,`color ${n} ${o}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${l})`},"&::after":{transform:`rotate(-45deg) translateY(${l})`}}}}},fX=e=>{const{antCls:t,componentCls:n,fontSize:o,motionDurationSlow:r,motionDurationMid:i,motionEaseInOut:l,lineHeight:a,paddingXS:s,padding:c,colorSplit:u,lineWidth:d,zIndexPopup:f,borderRadiusLG:h,radiusSubMenuItem:m,menuArrowSize:g,menuArrowOffset:y,lineType:b,menuPanelMaskInset:S}=e;return[{"":{[`${n}`]:v(v({},ur()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:v(v(v(v(v(v(v({},Ze(e)),ur()),{marginBottom:0,paddingInlineStart:0,fontSize:o,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${r} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.radiusItem},[`${n}-item-group-title`]:{padding:`${s}px ${c}px`,fontSize:o,lineHeight:a,transition:`all ${r}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${r} ${l}`,`background ${r} ${l}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${r} ${l}`,`background ${r} ${l}`,`padding ${i} ${l}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${r} ${l}`,`padding ${r} ${l}`].join(",")},[`${n}-title-content`]:{transition:`color ${r}`},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:u,borderStyle:b,borderWidth:0,borderTopWidth:d,marginBlock:d,padding:0,"&-dashed":{borderStyle:"dashed"}}}),_w(e)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${o*2}px ${c}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:f,background:"transparent",borderRadius:h,boxShadow:"none",transformOrigin:"0 0","&::before":{position:"absolute",inset:`${S}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:S},[`> ${n}`]:v(v(v({borderRadius:h},_w(e)),Mw(e)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:m},[`${n}-submenu-title::after`]:{transition:`transform ${r} ${l}`}})}}),Mw(e)),{[`&-inline-collapsed ${n}-submenu-arrow, + &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${y})`},"&::after":{transform:`rotate(45deg) translateX(-${y})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(-${g*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${y})`},"&::before":{transform:`rotate(45deg) translateX(${y})`}}})},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},pX=(e,t)=>Xe("Menu",(o,r)=>{let{overrideComponentToken:i}=r;if((t==null?void 0:t.value)===!1)return[];const{colorBgElevated:l,colorPrimary:a,colorError:s,colorErrorHover:c,colorTextLightSolid:u}=o,{controlHeightLG:d,fontSize:f}=o,h=f/7*5,m=Fe(o,{menuItemHeight:d,menuItemPaddingInline:o.margin,menuArrowSize:h,menuHorizontalHeight:d*1.15,menuArrowOffset:`${h*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:l}),g=new vt(u).setAlpha(.65).toRgbString(),y=Fe(m,{colorItemText:g,colorItemTextHover:u,colorGroupTitle:g,colorItemTextSelected:u,colorItemBg:"#001529",colorSubItemBg:"#000c17",colorItemBgActive:"transparent",colorItemBgSelected:a,colorActiveBarWidth:0,colorActiveBarHeight:0,colorActiveBarBorderSize:0,colorItemTextDisabled:new vt(u).setAlpha(.25).toRgbString(),colorDangerItemText:s,colorDangerItemTextHover:c,colorDangerItemTextSelected:u,colorDangerItemBgActive:s,colorDangerItemBgSelected:s,menuSubMenuBg:"#001529",colorItemTextSelectedHorizontal:u,colorItemBgSelectedHorizontal:a},v({},i));return[fX(m),cX(m),dX(m),Tw(m,"light"),Tw(y,"dark"),uX(m),yu(m),Br(m,"slide-up"),Br(m,"slide-down"),ws(m,"zoom-big")]},o=>{const{colorPrimary:r,colorError:i,colorTextDisabled:l,colorErrorBg:a,colorText:s,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:f,lineWidth:h,lineWidthBold:m,controlItemBgActive:g,colorBgTextHover:y}=o;return{dropdownWidth:160,zIndexPopup:o.zIndexPopupBase+50,radiusItem:o.borderRadiusLG,radiusSubMenuItem:o.borderRadiusSM,colorItemText:s,colorItemTextHover:s,colorItemTextHoverHorizontal:r,colorGroupTitle:c,colorItemTextSelected:r,colorItemTextSelectedHorizontal:r,colorItemBg:u,colorItemBgHover:y,colorItemBgActive:f,colorSubItemBg:d,colorItemBgSelected:g,colorItemBgSelectedHorizontal:"transparent",colorActiveBarWidth:0,colorActiveBarHeight:m,colorActiveBarBorderSize:h,colorItemTextDisabled:l,colorDangerItemText:i,colorDangerItemTextHover:i,colorDangerItemTextSelected:i,colorDangerItemBgActive:a,colorDangerItemBgSelected:a,itemMarginInline:o.marginXXS}})(e),hX=()=>({id:String,prefixCls:String,items:Array,disabled:Boolean,inlineCollapsed:Boolean,disabledOverflow:Boolean,forceSubMenuRender:Boolean,openKeys:Array,selectedKeys:Array,activeKey:String,selectable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},tabindex:{type:[Number,String]},motion:Object,role:String,theme:{type:String,default:"light"},mode:{type:String,default:"vertical"},inlineIndent:{type:Number,default:24},subMenuOpenDelay:{type:Number,default:0},subMenuCloseDelay:{type:Number,default:.1},builtinPlacements:{type:Object},triggerSubMenuAction:{type:String,default:"hover"},getPopupContainer:Function,expandIcon:Function,onOpenChange:Function,onSelect:Function,onDeselect:Function,onClick:[Function,Array],onFocus:Function,onBlur:Function,onMousedown:Function,"onUpdate:openKeys":Function,"onUpdate:selectedKeys":Function,"onUpdate:activeKey":Function}),Aw=[],Xt=re({compatConfig:{MODE:3},name:"AMenu",inheritAttrs:!1,props:hX(),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r}=t;const{direction:i,getPrefixCls:l}=Ee("menu",e),a=GI(),s=I(()=>{var U;return l("menu",e.prefixCls||((U=a==null?void 0:a.prefixCls)===null||U===void 0?void 0:U.value))}),[c,u]=pX(s,I(()=>!a)),d=oe(new Map),f=Ke(eT,ie(void 0)),h=I(()=>f.value!==void 0?f.value:e.inlineCollapsed),{itemsNodes:m}=sX(e),g=oe(!1);Ue(()=>{g.value=!0}),je(()=>{It(!(e.inlineCollapsed===!0&&e.mode!=="inline"),"Menu","`inlineCollapsed` should only be used when `mode` is inline."),It(!(f.value!==void 0&&e.inlineCollapsed===!0),"Menu","`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.")});const y=ie([]),b=ie([]),S=ie({});Se(d,()=>{const U={};for(const Q of d.value.values())U[Q.key]=Q;S.value=U},{flush:"post"}),je(()=>{if(e.activeKey!==void 0){let U=[];const Q=e.activeKey?S.value[e.activeKey]:void 0;Q&&e.activeKey!==void 0?U=gm([].concat(ct(Q.parentKeys),e.activeKey)):U=[],Ea(y.value,U)||(y.value=U)}}),Se(()=>e.selectedKeys,U=>{U&&(b.value=U.slice())},{immediate:!0,deep:!0});const $=ie([]);Se([S,b],()=>{let U=[];b.value.forEach(Q=>{const J=S.value[Q];J&&(U=U.concat(ct(J.parentKeys)))}),U=gm(U),Ea($.value,U)||($.value=U)},{immediate:!0});const x=U=>{if(e.selectable){const{key:Q}=U,J=b.value.includes(Q);let X;e.multiple?J?X=b.value.filter(V=>V!==Q):X=[...b.value,Q]:X=[Q];const q=v(v({},U),{selectedKeys:X});Ea(X,b.value)||(e.selectedKeys===void 0&&(b.value=X),o("update:selectedKeys",X),J&&e.multiple?o("deselect",q):o("select",q))}M.value!=="inline"&&!e.multiple&&C.value.length&&R(Aw)},C=ie([]);Se(()=>e.openKeys,function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:C.value;Ea(C.value,U)||(C.value=U.slice())},{immediate:!0,deep:!0});let O;const w=U=>{clearTimeout(O),O=setTimeout(()=>{e.activeKey===void 0&&(y.value=U),o("update:activeKey",U[U.length-1])})},P=I(()=>!!e.disabled),T=I(()=>i.value==="rtl"),M=ie("vertical"),E=oe(!1);je(()=>{var U;(e.mode==="inline"||e.mode==="vertical")&&h.value?(M.value="vertical",E.value=h.value):(M.value=e.mode,E.value=!1),!((U=a==null?void 0:a.mode)===null||U===void 0)&&U.value&&(M.value=a.mode.value)});const A=I(()=>M.value==="inline"),R=U=>{C.value=U,o("update:openKeys",U),o("openChange",U)},F=ie(C.value),_=oe(!1);Se(C,()=>{A.value&&(F.value=C.value)},{immediate:!0}),Se(A,()=>{if(!_.value){_.value=!0;return}A.value?C.value=F.value:R(Aw)},{immediate:!0});const N=I(()=>({[`${s.value}`]:!0,[`${s.value}-root`]:!0,[`${s.value}-${M.value}`]:!0,[`${s.value}-inline-collapsed`]:E.value,[`${s.value}-rtl`]:T.value,[`${s.value}-${e.theme}`]:!0})),B=I(()=>l()),L=I(()=>({horizontal:{name:`${B.value}-slide-up`},inline:xu(`${B.value}-motion-collapse`),other:{name:`${B.value}-zoom-big`}}));QI(!0);const k=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const Q=[],J=d.value;return U.forEach(X=>{const{key:q,childrenEventKeys:V}=J.get(X);Q.push(q,...k(ct(V)))}),Q},z=U=>{var Q;o("click",U),x(U),(Q=a==null?void 0:a.onClick)===null||Q===void 0||Q.call(a)},H=(U,Q)=>{var J;const X=((J=S.value[U])===null||J===void 0?void 0:J.childrenEventKeys)||[];let q=C.value.filter(V=>V!==U);if(Q)q.push(U);else if(M.value!=="inline"){const V=k(ct(X));q=gm(q.filter(K=>!V.includes(K)))}Ea(C,q)||R(q)},j=(U,Q)=>{d.value.set(U,Q),d.value=new Map(d.value)},Y=U=>{d.value.delete(U),d.value=new Map(d.value)},Z=ie(0),G=I(()=>{var U;return e.expandIcon||n.expandIcon||!((U=a==null?void 0:a.expandIcon)===null||U===void 0)&&U.value?Q=>{let J=e.expandIcon||n.expandIcon;return J=typeof J=="function"?J(Q):J,ht(J,{class:`${s.value}-submenu-expand-icon`},!1)}:null});YI({prefixCls:s,activeKeys:y,openKeys:C,selectedKeys:b,changeActiveKeys:w,disabled:P,rtl:T,mode:M,inlineIndent:I(()=>e.inlineIndent),subMenuCloseDelay:I(()=>e.subMenuCloseDelay),subMenuOpenDelay:I(()=>e.subMenuOpenDelay),builtinPlacements:I(()=>e.builtinPlacements),triggerSubMenuAction:I(()=>e.triggerSubMenuAction),getPopupContainer:I(()=>e.getPopupContainer),inlineCollapsed:E,theme:I(()=>e.theme),siderCollapsed:f,defaultMotions:I(()=>g.value?L.value:null),motion:I(()=>g.value?e.motion:null),overflowDisabled:oe(void 0),onOpenChange:H,onItemClick:z,registerMenuInfo:j,unRegisterMenuInfo:Y,selectedSubMenuKeys:$,expandIcon:G,forceSubMenuRender:I(()=>e.forceSubMenuRender),rootClassName:u});const te=()=>{var U;return m.value||xt((U=n.default)===null||U===void 0?void 0:U.call(n))};return()=>{var U;const Q=te(),J=Z.value>=Q.length-1||M.value!=="horizontal"||e.disabledOverflow,X=V=>M.value!=="horizontal"||e.disabledOverflow?V:V.map((K,ee)=>p(up,{key:K.key,overflowDisabled:ee>Z.value},{default:()=>K})),q=((U=n.overflowedIndicator)===null||U===void 0?void 0:U.call(n))||p(Cu,null,null);return c(p(ai,D(D({},r),{},{onMousedown:e.onMousedown,prefixCls:`${s.value}-overflow`,component:"ul",itemComponent:Rr,class:[N.value,r.class,u.value],role:"menu",id:e.id,data:X(Q),renderRawItem:V=>V,renderRawRest:V=>{const K=V.length,ee=K?Q.slice(-K):null;return p(He,null,[p(ql,{eventKey:hd,key:hd,title:q,disabled:J,internalPopupClose:K===0},{default:()=>ee}),p(ww,null,{default:()=>[p(ql,{eventKey:hd,key:hd,title:q,disabled:J,internalPopupClose:K===0},{default:()=>ee})]})])},maxCount:M.value!=="horizontal"||e.disabledOverflow?ai.INVALIDATE:ai.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:V=>{Z.value=V}}),{default:()=>[p(Db,{to:"body"},{default:()=>[p("div",{style:{display:"none"},"aria-hidden":!0},[p(ww,null,{default:()=>[X(te())]})])]})]}))}}});Xt.install=function(e){return e.component(Xt.name,Xt),e.component(Rr.name,Rr),e.component(ql.name,ql),e.component(eu.name,eu),e.component(Qc.name,Qc),e};Xt.Item=Rr;Xt.Divider=eu;Xt.SubMenu=ql;Xt.ItemGroup=Qc;const gX=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:v(v({},Ze(e)),{color:e.breadcrumbBaseColor,fontSize:e.breadcrumbFontSize,[n]:{fontSize:e.breadcrumbIconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:v({color:e.breadcrumbLinkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${e.paddingXXS}px`,borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",marginInline:-e.marginXXS,"&:hover":{color:e.breadcrumbLinkColorHover,backgroundColor:e.colorBgTextHover}},pi(e)),"li:last-child":{color:e.breadcrumbLastItemColor,[`& > ${t}-separator`]:{display:"none"}},[`${t}-separator`]:{marginInline:e.breadcrumbSeparatorMargin,color:e.breadcrumbSeparatorColor},[`${t}-link`]:{[` + > ${n} + span, + > ${n} + a + `]:{marginInlineStart:e.marginXXS}},[`${t}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",padding:`0 ${e.paddingXXS}px`,marginInline:-e.marginXXS,[`> ${n}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.breadcrumbLinkColorHover,backgroundColor:e.colorBgTextHover,a:{color:e.breadcrumbLinkColorHover}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}},mX=Xe("Breadcrumb",e=>{const t=Fe(e,{breadcrumbBaseColor:e.colorTextDescription,breadcrumbFontSize:e.fontSize,breadcrumbIconFontSize:e.fontSize,breadcrumbLinkColor:e.colorTextDescription,breadcrumbLinkColorHover:e.colorText,breadcrumbLastItemColor:e.colorText,breadcrumbSeparatorMargin:e.marginXS,breadcrumbSeparatorColor:e.colorTextDescription});return[gX(t)]}),vX=()=>({prefixCls:String,routes:{type:Array},params:W.any,separator:W.any,itemRender:{type:Function}});function bX(e,t){if(!e.breadcrumbName)return null;const n=Object.keys(t).join("|");return e.breadcrumbName.replace(new RegExp(`:(${n})`,"g"),(r,i)=>t[i]||r)}function Rw(e){const{route:t,params:n,routes:o,paths:r}=e,i=o.indexOf(t)===o.length-1,l=bX(t,n);return i?p("span",null,[l]):p("a",{href:`#/${r.join("/")}`},[l])}const Ll=re({compatConfig:{MODE:3},name:"ABreadcrumb",inheritAttrs:!1,props:vX(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ee("breadcrumb",e),[l,a]=mX(r),s=(d,f)=>(d=(d||"").replace(/^\//,""),Object.keys(f).forEach(h=>{d=d.replace(`:${h}`,f[h])}),d),c=(d,f,h)=>{const m=[...d],g=s(f||"",h);return g&&m.push(g),m},u=d=>{let{routes:f=[],params:h={},separator:m,itemRender:g=Rw}=d;const y=[];return f.map(b=>{const S=s(b.path,h);S&&y.push(S);const $=[...y];let x=null;b.children&&b.children.length&&(x=p(Xt,{items:b.children.map(O=>({key:O.path||O.breadcrumbName,label:g({route:O,params:h,routes:f,paths:c($,O.path,h)})}))},null));const C={separator:m};return x&&(C.overlay=x),p(Jc,D(D({},C),{},{key:S||b.breadcrumbName}),{default:()=>[g({route:b,params:h,routes:f,paths:$})]})})};return()=>{var d;let f;const{routes:h,params:m={}}=e,g=xt(on(n,e)),y=(d=on(n,e,"separator"))!==null&&d!==void 0?d:"/",b=e.itemRender||n.itemRender||Rw;h&&h.length>0?f=u({routes:h,params:m,separator:y,itemRender:b}):g.length&&(f=g.map(($,x)=>(Eo(typeof $.type=="object"&&($.type.__ANT_BREADCRUMB_ITEM||$.type.__ANT_BREADCRUMB_SEPARATOR)),bn($,{separator:y,key:x}))));const S={[r.value]:!0,[`${r.value}-rtl`]:i.value==="rtl",[`${o.class}`]:!!o.class,[a.value]:!0};return l(p("nav",D(D({},o),{},{class:S}),[p("ol",null,[f])]))}}});var yX=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String}),pp=re({compatConfig:{MODE:3},name:"ABreadcrumbSeparator",__ANT_BREADCRUMB_SEPARATOR:!0,inheritAttrs:!1,props:SX(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r}=Ee("breadcrumb",e);return()=>{var i;const{separator:l,class:a}=o,s=yX(o,["separator","class"]),c=xt((i=n.default)===null||i===void 0?void 0:i.call(n));return p("span",D({class:[`${r.value}-separator`,a]},s),[c.length>0?c:"/"])}}});Ll.Item=Jc;Ll.Separator=pp;Ll.install=function(e){return e.component(Ll.name,Ll),e.component(Jc.name,Jc),e.component(pp.name,pp),e};var Si=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function il(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lT={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Si,function(){var n=1e3,o=6e4,r=36e5,i="millisecond",l="second",a="minute",s="hour",c="day",u="week",d="month",f="quarter",h="year",m="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var _=["th","st","nd","rd"],N=F%100;return"["+F+(_[(N-20)%10]||_[N]||_[0])+"]"}},$=function(F,_,N){var B=String(F);return!B||B.length>=_?F:""+Array(_+1-B.length).join(N)+F},x={s:$,z:function(F){var _=-F.utcOffset(),N=Math.abs(_),B=Math.floor(N/60),L=N%60;return(_<=0?"+":"-")+$(B,2,"0")+":"+$(L,2,"0")},m:function F(_,N){if(_.date()1)return F(z[0])}else{var H=_.name;O[H]=_,L=H}return!B&&L&&(C=L),L||!B&&C},M=function(F,_){if(P(F))return F.clone();var N=typeof _=="object"?_:{};return N.date=F,N.args=arguments,new A(N)},E=x;E.l=T,E.i=P,E.w=function(F,_){return M(F,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var A=function(){function F(N){this.$L=T(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[w]=!0}var _=F.prototype;return _.parse=function(N){this.$d=function(B){var L=B.date,k=B.utc;if(L===null)return new Date(NaN);if(E.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var z=L.match(y);if(z){var H=z[2]-1||0,j=(z[7]||"0").substring(0,3);return k?new Date(Date.UTC(z[1],H,z[3]||1,z[4]||0,z[5]||0,z[6]||0,j)):new Date(z[1],H,z[3]||1,z[4]||0,z[5]||0,z[6]||0,j)}}return new Date(L)}(N),this.init()},_.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},_.$utils=function(){return E},_.isValid=function(){return this.$d.toString()!==g},_.isSame=function(N,B){var L=M(N);return this.startOf(B)<=L&&L<=this.endOf(B)},_.isAfter=function(N,B){return M(N)25){var u=l(this).startOf(o).add(1,o).date(c),d=l(this).endOf(n);if(u.isBefore(d))return 1}var f=l(this).startOf(o).date(c).startOf(n).subtract(1,"millisecond"),h=this.diff(f,n,!0);return h<0?l(this).startOf("week").week():Math.ceil(h)},a.weeks=function(s){return s===void 0&&(s=null),this.week(s)}}})})(uT);var OX=uT.exports;const PX=il(OX);var dT={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Si,function(){return function(n,o){o.prototype.weekYear=function(){var r=this.month(),i=this.week(),l=this.year();return i===1&&r===11?l+1:r===0&&i>=52?l-1:l}}})})(dT);var IX=dT.exports;const TX=il(IX);var fT={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Si,function(){var n="month",o="quarter";return function(r,i){var l=i.prototype;l.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var a=l.add;l.add=function(c,u){return c=Number(c),this.$utils().p(u)===o?this.add(3*c,n):a.bind(this)(c,u)};var s=l.startOf;l.startOf=function(c,u){var d=this.$utils(),f=!!d.u(u)||u;if(d.p(c)===o){var h=this.quarter()-1;return f?this.month(3*h).startOf(n).startOf("day"):this.month(3*h+2).endOf(n).endOf("day")}return s.bind(this)(c,u)}}})})(fT);var EX=fT.exports;const _X=il(EX);var pT={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Si,function(){return function(n,o){var r=o.prototype,i=r.format;r.format=function(l){var a=this,s=this.$locale();if(!this.isValid())return i.bind(this)(l);var c=this.$utils(),u=(l||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return s.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return s.ordinal(a.week(),"W");case"w":case"ww":return c.s(a.week(),d==="w"?1:2,"0");case"W":case"WW":return c.s(a.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return c.s(String(a.$H===0?24:a.$H),d==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return d}});return i.bind(this)(u)}}})})(pT);var MX=pT.exports;const AX=il(MX);var hT={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Si,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,i=/\d\d/,l=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,s={},c=function(y){return(y=+y)+(y>68?1900:2e3)},u=function(y){return function(b){this[y]=+b}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var S=b.match(/([+-]|\d\d)/g),$=60*S[1]+(+S[2]||0);return $===0?0:S[0]==="+"?-$:$}(y)}],f=function(y){var b=s[y];return b&&(b.indexOf?b:b.s.concat(b.f))},h=function(y,b){var S,$=s.meridiem;if($){for(var x=1;x<=24;x+=1)if(y.indexOf($(x,0,b))>-1){S=x>12;break}}else S=y===(b?"pm":"PM");return S},m={A:[a,function(y){this.afternoon=h(y,!1)}],a:[a,function(y){this.afternoon=h(y,!0)}],Q:[r,function(y){this.month=3*(y-1)+1}],S:[r,function(y){this.milliseconds=100*+y}],SS:[i,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[l,u("seconds")],ss:[l,u("seconds")],m:[l,u("minutes")],mm:[l,u("minutes")],H:[l,u("hours")],h:[l,u("hours")],HH:[l,u("hours")],hh:[l,u("hours")],D:[l,u("day")],DD:[i,u("day")],Do:[a,function(y){var b=s.ordinal,S=y.match(/\d+/);if(this.day=S[0],b)for(var $=1;$<=31;$+=1)b($).replace(/\[|\]/g,"")===y&&(this.day=$)}],w:[l,u("week")],ww:[i,u("week")],M:[l,u("month")],MM:[i,u("month")],MMM:[a,function(y){var b=f("months"),S=(f("monthsShort")||b.map(function($){return $.slice(0,3)})).indexOf(y)+1;if(S<1)throw new Error;this.month=S%12||S}],MMMM:[a,function(y){var b=f("months").indexOf(y)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,u("year")],YY:[i,function(y){this.year=c(y)}],YYYY:[/\d{4}/,u("year")],Z:d,ZZ:d};function g(y){var b,S;b=y,S=s&&s.formats;for(var $=(y=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(M,E,A){var R=A&&A.toUpperCase();return E||S[A]||n[A]||S[R].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,_,N){return _||N.slice(1)})})).match(o),x=$.length,C=0;C-1)return new Date((L==="X"?1e3:1)*B);var H=g(L)(B),j=H.year,Y=H.month,Z=H.day,G=H.hours,te=H.minutes,U=H.seconds,Q=H.milliseconds,J=H.zone,X=H.week,q=new Date,V=Z||(j||Y?1:q.getDate()),K=j||q.getFullYear(),ee=0;j&&!Y||(ee=Y>0?Y-1:q.getMonth());var ue,ae=G||0,le=te||0,ne=U||0,se=Q||0;return J?new Date(Date.UTC(K,ee,V,ae,le,ne,se+60*J.offset*1e3)):k?new Date(Date.UTC(K,ee,V,ae,le,ne,se)):(ue=new Date(K,ee,V,ae,le,ne,se),X&&(ue=z(ue).week(X).toDate()),ue)}catch{return new Date("")}}(O,T,w,S),this.init(),R&&R!==!0&&(this.$L=this.locale(R).$L),A&&O!=this.format(T)&&(this.$d=new Date("")),s={}}else if(T instanceof Array)for(var F=T.length,_=1;_<=F;_+=1){P[1]=T[_-1];var N=S.apply(this,P);if(N.isValid()){this.$d=N.$d,this.$L=N.$L,this.init();break}_===F&&(this.$d=new Date(""))}else x.call(this,C)}}})})(hT);var RX=hT.exports;const DX=il(RX);un.extend(DX);un.extend(AX);un.extend(CX);un.extend(wX);un.extend(PX);un.extend(TX);un.extend(_X);un.extend((e,t)=>{const n=t.prototype,o=n.format;n.format=function(i){const l=(i||"").replace("Wo","wo");return o.bind(this)(l)}});const NX={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},pl=e=>NX[e]||e.split("_")[0],Dw=()=>{n9(!1,"Not match any format. Please help to fire a issue about this.")},BX=/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|k{1,2}|S/g;function Nw(e,t,n){const o=[...new Set(e.split(n))];let r=0;for(let i=0;it)return l;r+=n.length}}const Bw=(e,t)=>{if(!e)return null;if(un.isDayjs(e))return e;const n=t.matchAll(BX);let o=un(e,t);if(n===null)return o;for(const r of n){const i=r[0],l=r.index;if(i==="Q"){const a=e.slice(l-1,l),s=Nw(e,l,a).match(/\d+/)[0];o=o.quarter(parseInt(s))}if(i.toLowerCase()==="wo"){const a=e.slice(l-1,l),s=Nw(e,l,a).match(/\d+/)[0];o=o.week(parseInt(s))}i.toLowerCase()==="ww"&&(o=o.week(parseInt(e.slice(l,l+i.length)))),i.toLowerCase()==="w"&&(o=o.week(parseInt(e.slice(l,l+i.length+1))))}return o},c1={getNow:()=>un(),getFixedDate:e=>un(e,["YYYY-M-DD","YYYY-MM-DD"]),getEndDate:e=>e.endOf("month"),getWeekDay:e=>{const t=e.locale("en");return t.weekday()+t.localeData().firstDayOfWeek()},getYear:e=>e.year(),getMonth:e=>e.month(),getDate:e=>e.date(),getHour:e=>e.hour(),getMinute:e=>e.minute(),getSecond:e=>e.second(),addYear:(e,t)=>e.add(t,"year"),addMonth:(e,t)=>e.add(t,"month"),addDate:(e,t)=>e.add(t,"day"),setYear:(e,t)=>e.year(t),setMonth:(e,t)=>e.month(t),setDate:(e,t)=>e.date(t),setHour:(e,t)=>e.hour(t),setMinute:(e,t)=>e.minute(t),setSecond:(e,t)=>e.second(t),isAfter:(e,t)=>e.isAfter(t),isValidate:e=>e.isValid(),locale:{getWeekFirstDay:e=>un().locale(pl(e)).localeData().firstDayOfWeek(),getWeekFirstDate:(e,t)=>t.locale(pl(e)).weekday(0),getWeek:(e,t)=>t.locale(pl(e)).week(),getShortWeekDays:e=>un().locale(pl(e)).localeData().weekdaysMin(),getShortMonths:e=>un().locale(pl(e)).localeData().monthsShort(),format:(e,t,n)=>t.locale(pl(e)).format(n),parse:(e,t,n)=>{const o=pl(e);for(let r=0;rArray.isArray(e)?e.map(n=>Bw(n,t)):Bw(e,t),toString:(e,t)=>Array.isArray(e)?e.map(n=>un.isDayjs(n)?n.format(t):n):un.isDayjs(e)?e.format(t):e};function Qt(e){const t=L7();return v(v({},e),t)}const gT=Symbol("PanelContextProps"),u1=e=>{qe(gT,e)},kr=()=>Ke(gT,{}),gd={visibility:"hidden"};function ll(e,t){let{slots:n}=t;var o;const r=Qt(e),{prefixCls:i,prevIcon:l="‹",nextIcon:a="›",superPrevIcon:s="«",superNextIcon:c="»",onSuperPrev:u,onSuperNext:d,onPrev:f,onNext:h}=r,{hideNextBtn:m,hidePrevBtn:g}=kr();return p("div",{class:i},[u&&p("button",{type:"button",onClick:u,tabindex:-1,class:`${i}-super-prev-btn`,style:g.value?gd:{}},[s]),f&&p("button",{type:"button",onClick:f,tabindex:-1,class:`${i}-prev-btn`,style:g.value?gd:{}},[l]),p("div",{class:`${i}-view`},[(o=n.default)===null||o===void 0?void 0:o.call(n)]),h&&p("button",{type:"button",onClick:h,tabindex:-1,class:`${i}-next-btn`,style:m.value?gd:{}},[a]),d&&p("button",{type:"button",onClick:d,tabindex:-1,class:`${i}-super-next-btn`,style:m.value?gd:{}},[c])])}ll.displayName="Header";ll.inheritAttrs=!1;function d1(e){const t=Qt(e),{prefixCls:n,generateConfig:o,viewDate:r,onPrevDecades:i,onNextDecades:l}=t,{hideHeader:a}=kr();if(a)return null;const s=`${n}-header`,c=o.getYear(r),u=Math.floor(c/ni)*ni,d=u+ni-1;return p(ll,D(D({},t),{},{prefixCls:s,onSuperPrev:i,onSuperNext:l}),{default:()=>[u,vn("-"),d]})}d1.displayName="DecadeHeader";d1.inheritAttrs=!1;function mT(e,t,n,o,r){let i=e.setHour(t,n);return i=e.setMinute(i,o),i=e.setSecond(i,r),i}function jd(e,t,n){if(!n)return t;let o=t;return o=e.setHour(o,e.getHour(n)),o=e.setMinute(o,e.getMinute(n)),o=e.setSecond(o,e.getSecond(n)),o}function LX(e,t,n,o,r,i){const l=Math.floor(e/o)*o;if(l{F.stopPropagation(),A||o(E)},onMouseenter:()=>{!A&&b&&b(E)},onMouseleave:()=>{!A&&S&&S(E)}},[f?f(E):p("div",{class:`${x}-inner`},[d(E)])]))}C.push(p("tr",{key:O,class:s&&s(P)},[w]))}return p("div",{class:`${t}-body`},[p("table",{class:`${t}-content`},[y&&p("thead",null,[p("tr",null,[y])]),p("tbody",null,[C])])])}da.displayName="PanelBody";da.inheritAttrs=!1;const m0=3,Lw=4;function f1(e){const t=Qt(e),n=rr-1,{prefixCls:o,viewDate:r,generateConfig:i}=t,l=`${o}-cell`,a=i.getYear(r),s=Math.floor(a/rr)*rr,c=Math.floor(a/ni)*ni,u=c+ni-1,d=i.setYear(r,c-Math.ceil((m0*Lw*rr-ni)/2)),f=h=>{const m=i.getYear(h),g=m+n;return{[`${l}-in-view`]:c<=m&&g<=u,[`${l}-selected`]:m===s}};return p(da,D(D({},t),{},{rowNum:Lw,colNum:m0,baseDate:d,getCellText:h=>{const m=i.getYear(h);return`${m}-${m+n}`},getCellClassName:f,getCellDate:(h,m)=>i.addYear(h,m*rr)}),null)}f1.displayName="DecadeBody";f1.inheritAttrs=!1;const md=new Map;function FX(e,t){let n;function o(){mh(e)?t():n=Qe(()=>{o()})}return o(),()=>{Qe.cancel(n)}}function v0(e,t,n){if(md.get(e)&&Qe.cancel(md.get(e)),n<=0){md.set(e,Qe(()=>{e.scrollTop=t}));return}const r=(t-e.scrollTop)/n*10;md.set(e,Qe(()=>{e.scrollTop+=r,e.scrollTop!==t&&v0(e,t,n-10)}))}function Is(e,t){let{onLeftRight:n,onCtrlLeftRight:o,onUpDown:r,onPageUpDown:i,onEnter:l}=t;const{which:a,ctrlKey:s,metaKey:c}=e;switch(a){case Ie.LEFT:if(s||c){if(o)return o(-1),!0}else if(n)return n(-1),!0;break;case Ie.RIGHT:if(s||c){if(o)return o(1),!0}else if(n)return n(1),!0;break;case Ie.UP:if(r)return r(-1),!0;break;case Ie.DOWN:if(r)return r(1),!0;break;case Ie.PAGE_UP:if(i)return i(-1),!0;break;case Ie.PAGE_DOWN:if(i)return i(1),!0;break;case Ie.ENTER:if(l)return l(),!0;break}return!1}function vT(e,t,n,o){let r=e;if(!r)switch(t){case"time":r=o?"hh:mm:ss a":"HH:mm:ss";break;case"week":r="gggg-wo";break;case"month":r="YYYY-MM";break;case"quarter":r="YYYY-[Q]Q";break;case"year":r="YYYY";break;default:r=n?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"}return r}function bT(e,t,n){const o=e==="time"?8:10,r=typeof t=="function"?t(n.getNow()).length:t.length;return Math.max(o,r)+2}let Ks=null;const vd=new Set;function zX(e){return!Ks&&typeof window<"u"&&window.addEventListener&&(Ks=t=>{[...vd].forEach(n=>{n(t)})},window.addEventListener("mousedown",Ks)),vd.add(e),()=>{vd.delete(e),vd.size===0&&(window.removeEventListener("mousedown",Ks),Ks=null)}}function HX(e){var t;const n=e.target;return e.composed&&n.shadowRoot&&((t=e.composedPath)===null||t===void 0?void 0:t.call(e)[0])||n}const jX=e=>e==="month"||e==="date"?"year":e,VX=e=>e==="date"?"month":e,WX=e=>e==="month"||e==="date"?"quarter":e,KX=e=>e==="date"?"week":e,UX={year:jX,month:VX,quarter:WX,week:KX,time:null,date:null};function yT(e,t){return e.some(n=>n&&n.contains(t))}const rr=10,ni=rr*10;function p1(e){const t=Qt(e),{prefixCls:n,onViewDateChange:o,generateConfig:r,viewDate:i,operationRef:l,onSelect:a,onPanelChange:s}=t,c=`${n}-decade-panel`;l.value={onKeydown:f=>Is(f,{onLeftRight:h=>{a(r.addYear(i,h*rr),"key")},onCtrlLeftRight:h=>{a(r.addYear(i,h*ni),"key")},onUpDown:h=>{a(r.addYear(i,h*rr*m0),"key")},onEnter:()=>{s("year",i)}})};const u=f=>{const h=r.addYear(i,f*ni);o(h),s(null,h)},d=f=>{a(f,"mouse"),s("year",f)};return p("div",{class:c},[p(d1,D(D({},t),{},{prefixCls:n,onPrevDecades:()=>{u(-1)},onNextDecades:()=>{u(1)}}),null),p(f1,D(D({},t),{},{prefixCls:n,onSelect:d}),null)])}p1.displayName="DecadePanel";p1.inheritAttrs=!1;const Vd=7;function fa(e,t){if(!e&&!t)return!0;if(!e||!t)return!1}function GX(e,t,n){const o=fa(t,n);if(typeof o=="boolean")return o;const r=Math.floor(e.getYear(t)/10),i=Math.floor(e.getYear(n)/10);return r===i}function Lh(e,t,n){const o=fa(t,n);return typeof o=="boolean"?o:e.getYear(t)===e.getYear(n)}function b0(e,t){return Math.floor(e.getMonth(t)/3)+1}function ST(e,t,n){const o=fa(t,n);return typeof o=="boolean"?o:Lh(e,t,n)&&b0(e,t)===b0(e,n)}function h1(e,t,n){const o=fa(t,n);return typeof o=="boolean"?o:Lh(e,t,n)&&e.getMonth(t)===e.getMonth(n)}function oi(e,t,n){const o=fa(t,n);return typeof o=="boolean"?o:e.getYear(t)===e.getYear(n)&&e.getMonth(t)===e.getMonth(n)&&e.getDate(t)===e.getDate(n)}function XX(e,t,n){const o=fa(t,n);return typeof o=="boolean"?o:e.getHour(t)===e.getHour(n)&&e.getMinute(t)===e.getMinute(n)&&e.getSecond(t)===e.getSecond(n)}function $T(e,t,n,o){const r=fa(n,o);return typeof r=="boolean"?r:e.locale.getWeek(t,n)===e.locale.getWeek(t,o)}function Xa(e,t,n){return oi(e,t,n)&&XX(e,t,n)}function bd(e,t,n,o){return!t||!n||!o?!1:!oi(e,t,o)&&!oi(e,n,o)&&e.isAfter(o,t)&&e.isAfter(n,o)}function YX(e,t,n){const o=t.locale.getWeekFirstDay(e),r=t.setDate(n,1),i=t.getWeekDay(r);let l=t.addDate(r,o-i);return t.getMonth(l)===t.getMonth(n)&&t.getDate(l)>1&&(l=t.addDate(l,-7)),l}function Sc(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;switch(t){case"year":return n.addYear(e,o*10);case"quarter":case"month":return n.addYear(e,o);default:return n.addMonth(e,o)}}function Tn(e,t){let{generateConfig:n,locale:o,format:r}=t;return typeof r=="function"?r(e):n.locale.format(o.locale,e,r)}function CT(e,t){let{generateConfig:n,locale:o,formatList:r}=t;return!e||typeof r[0]=="function"?null:n.locale.parse(o.locale,e,r)}function y0(e){let{cellDate:t,mode:n,disabledDate:o,generateConfig:r}=e;if(!o)return!1;const i=(l,a,s)=>{let c=a;for(;c<=s;){let u;switch(l){case"date":{if(u=r.setDate(t,c),!o(u))return!1;break}case"month":{if(u=r.setMonth(t,c),!y0({cellDate:u,mode:"month",generateConfig:r,disabledDate:o}))return!1;break}case"year":{if(u=r.setYear(t,c),!y0({cellDate:u,mode:"year",generateConfig:r,disabledDate:o}))return!1;break}}c+=1}return!0};switch(n){case"date":case"week":return o(t);case"month":{const a=r.getDate(r.getEndDate(t));return i("date",1,a)}case"quarter":{const l=Math.floor(r.getMonth(t)/3)*3,a=l+2;return i("month",l,a)}case"year":return i("month",0,11);case"decade":{const l=r.getYear(t),a=Math.floor(l/rr)*rr,s=a+rr-1;return i("year",a,s)}}}function g1(e){const t=Qt(e),{hideHeader:n}=kr();if(n.value)return null;const{prefixCls:o,generateConfig:r,locale:i,value:l,format:a}=t,s=`${o}-header`;return p(ll,{prefixCls:s},{default:()=>[l?Tn(l,{locale:i,format:a,generateConfig:r}):" "]})}g1.displayName="TimeHeader";g1.inheritAttrs=!1;const yd=re({name:"TimeUnitColumn",props:["prefixCls","units","onSelect","value","active","hideDisabledOptions"],setup(e){const{open:t}=kr(),n=oe(null),o=ie(new Map),r=ie();return Se(()=>e.value,()=>{const i=o.value.get(e.value);i&&t.value!==!1&&v0(n.value,i.offsetTop,120)}),tt(()=>{var i;(i=r.value)===null||i===void 0||i.call(r)}),Se(t,()=>{var i;(i=r.value)===null||i===void 0||i.call(r),lt(()=>{if(t.value){const l=o.value.get(e.value);l&&(r.value=FX(l,()=>{v0(n.value,l.offsetTop,0)}))}})},{immediate:!0,flush:"post"}),()=>{const{prefixCls:i,units:l,onSelect:a,value:s,active:c,hideDisabledOptions:u}=e,d=`${i}-cell`;return p("ul",{class:ce(`${i}-column`,{[`${i}-column-active`]:c}),ref:n,style:{position:"relative"}},[l.map(f=>u&&f.disabled?null:p("li",{key:f.value,ref:h=>{o.value.set(f.value,h)},class:ce(d,{[`${d}-disabled`]:f.disabled,[`${d}-selected`]:s===f.value}),onClick:()=>{f.disabled||a(f.value)}},[p("div",{class:`${d}-inner`},[f.label])]))])}}});function xT(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0",o=String(e);for(;o.length{(n.startsWith("data-")||n.startsWith("aria-")||n==="role"||n==="name")&&!n.startsWith("data-__")&&(t[n]=e[n])}),t}function $t(e,t){return e?e[t]:null}function zo(e,t,n){const o=[$t(e,0),$t(e,1)];return o[n]=typeof t=="function"?t(o[n]):t,!o[0]&&!o[1]?null:o}function xm(e,t,n,o){const r=[];for(let i=e;i<=t;i+=n)r.push({label:xT(i,2),value:i,disabled:(o||[]).includes(i)});return r}const ZX=re({compatConfig:{MODE:3},name:"TimeBody",inheritAttrs:!1,props:["generateConfig","prefixCls","operationRef","activeColumnIndex","value","showHour","showMinute","showSecond","use12Hours","hourStep","minuteStep","secondStep","disabledHours","disabledMinutes","disabledSeconds","disabledTime","hideDisabledOptions","onSelect"],setup(e){const t=I(()=>e.value?e.generateConfig.getHour(e.value):-1),n=I(()=>e.use12Hours?t.value>=12:!1),o=I(()=>e.use12Hours?t.value%12:t.value),r=I(()=>e.value?e.generateConfig.getMinute(e.value):-1),i=I(()=>e.value?e.generateConfig.getSecond(e.value):-1),l=ie(e.generateConfig.getNow()),a=ie(),s=ie(),c=ie();eh(()=>{l.value=e.generateConfig.getNow()}),je(()=>{if(e.disabledTime){const y=e.disabledTime(l);[a.value,s.value,c.value]=[y.disabledHours,y.disabledMinutes,y.disabledSeconds]}else[a.value,s.value,c.value]=[e.disabledHours,e.disabledMinutes,e.disabledSeconds]});const u=(y,b,S,$)=>{let x=e.value||e.generateConfig.getNow();const C=Math.max(0,b),O=Math.max(0,S),w=Math.max(0,$);return x=mT(e.generateConfig,x,!e.use12Hours||!y?C:C+12,O,w),x},d=I(()=>{var y;return xm(0,23,(y=e.hourStep)!==null&&y!==void 0?y:1,a.value&&a.value())}),f=I(()=>{if(!e.use12Hours)return[!1,!1];const y=[!0,!0];return d.value.forEach(b=>{let{disabled:S,value:$}=b;S||($>=12?y[1]=!1:y[0]=!1)}),y}),h=I(()=>e.use12Hours?d.value.filter(n.value?y=>y.value>=12:y=>y.value<12).map(y=>{const b=y.value%12,S=b===0?"12":xT(b,2);return v(v({},y),{label:S,value:b})}):d.value),m=I(()=>{var y;return xm(0,59,(y=e.minuteStep)!==null&&y!==void 0?y:1,s.value&&s.value(t.value))}),g=I(()=>{var y;return xm(0,59,(y=e.secondStep)!==null&&y!==void 0?y:1,c.value&&c.value(t.value,r.value))});return()=>{const{prefixCls:y,operationRef:b,activeColumnIndex:S,showHour:$,showMinute:x,showSecond:C,use12Hours:O,hideDisabledOptions:w,onSelect:P}=e,T=[],M=`${y}-content`,E=`${y}-time-panel`;b.value={onUpDown:F=>{const _=T[S];if(_){const N=_.units.findIndex(L=>L.value===_.value),B=_.units.length;for(let L=1;L{P(u(n.value,F,r.value,i.value),"mouse")}),A(x,p(yd,{key:"minute"},null),r.value,m.value,F=>{P(u(n.value,o.value,F,i.value),"mouse")}),A(C,p(yd,{key:"second"},null),i.value,g.value,F=>{P(u(n.value,o.value,r.value,F),"mouse")});let R=-1;return typeof n.value=="boolean"&&(R=n.value?1:0),A(O===!0,p(yd,{key:"12hours"},null),R,[{label:"AM",value:0,disabled:f.value[0]},{label:"PM",value:1,disabled:f.value[1]}],F=>{P(u(!!F,o.value,r.value,i.value),"mouse")}),p("div",{class:M},[T.map(F=>{let{node:_}=F;return _})])}}}),JX=e=>e.filter(t=>t!==!1).length;function kh(e){const t=Qt(e),{generateConfig:n,format:o="HH:mm:ss",prefixCls:r,active:i,operationRef:l,showHour:a,showMinute:s,showSecond:c,use12Hours:u=!1,onSelect:d,value:f}=t,h=`${r}-time-panel`,m=ie(),g=ie(-1),y=JX([a,s,c,u]);return l.value={onKeydown:b=>Is(b,{onLeftRight:S=>{g.value=(g.value+S+y)%y},onUpDown:S=>{g.value===-1?g.value=0:m.value&&m.value.onUpDown(S)},onEnter:()=>{d(f||n.getNow(),"key"),g.value=-1}}),onBlur:()=>{g.value=-1}},p("div",{class:ce(h,{[`${h}-active`]:i})},[p(g1,D(D({},t),{},{format:o,prefixCls:r}),null),p(ZX,D(D({},t),{},{prefixCls:r,activeColumnIndex:g.value,operationRef:m}),null)])}kh.displayName="TimePanel";kh.inheritAttrs=!1;function Fh(e){let{cellPrefixCls:t,generateConfig:n,rangedValue:o,hoverRangedValue:r,isInView:i,isSameCell:l,offsetCell:a,today:s,value:c}=e;function u(d){const f=a(d,-1),h=a(d,1),m=$t(o,0),g=$t(o,1),y=$t(r,0),b=$t(r,1),S=bd(n,y,b,d);function $(T){return l(m,T)}function x(T){return l(g,T)}const C=l(y,d),O=l(b,d),w=(S||O)&&(!i(f)||x(f)),P=(S||C)&&(!i(h)||$(h));return{[`${t}-in-view`]:i(d),[`${t}-in-range`]:bd(n,m,g,d),[`${t}-range-start`]:$(d),[`${t}-range-end`]:x(d),[`${t}-range-start-single`]:$(d)&&!g,[`${t}-range-end-single`]:x(d)&&!m,[`${t}-range-start-near-hover`]:$(d)&&(l(f,y)||bd(n,y,b,f)),[`${t}-range-end-near-hover`]:x(d)&&(l(h,b)||bd(n,y,b,h)),[`${t}-range-hover`]:S,[`${t}-range-hover-start`]:C,[`${t}-range-hover-end`]:O,[`${t}-range-hover-edge-start`]:w,[`${t}-range-hover-edge-end`]:P,[`${t}-range-hover-edge-start-near-range`]:w&&l(f,g),[`${t}-range-hover-edge-end-near-range`]:P&&l(h,m),[`${t}-today`]:l(s,d),[`${t}-selected`]:l(c,d)}}return u}const PT=Symbol("RangeContextProps"),QX=e=>{qe(PT,e)},wu=()=>Ke(PT,{rangedValue:ie(),hoverRangedValue:ie(),inRange:ie(),panelPosition:ie()}),eY=re({compatConfig:{MODE:3},name:"PanelContextProvider",inheritAttrs:!1,props:{value:{type:Object,default:()=>({})}},setup(e,t){let{slots:n}=t;const o={rangedValue:ie(e.value.rangedValue),hoverRangedValue:ie(e.value.hoverRangedValue),inRange:ie(e.value.inRange),panelPosition:ie(e.value.panelPosition)};return QX(o),Se(()=>e.value,()=>{Object.keys(e.value).forEach(r=>{o[r]&&(o[r].value=e.value[r])})}),()=>{var r;return(r=n.default)===null||r===void 0?void 0:r.call(n)}}});function zh(e){const t=Qt(e),{prefixCls:n,generateConfig:o,prefixColumn:r,locale:i,rowCount:l,viewDate:a,value:s,dateRender:c}=t,{rangedValue:u,hoverRangedValue:d}=wu(),f=YX(i.locale,o,a),h=`${n}-cell`,m=o.locale.getWeekFirstDay(i.locale),g=o.getNow(),y=[],b=i.shortWeekDays||(o.locale.getShortWeekDays?o.locale.getShortWeekDays(i.locale):[]);r&&y.push(p("th",{key:"empty","aria-label":"empty cell"},null));for(let x=0;xoi(o,x,C),isInView:x=>h1(o,x,a),offsetCell:(x,C)=>o.addDate(x,C)}),$=c?x=>c({current:x,today:g}):void 0;return p(da,D(D({},t),{},{rowNum:l,colNum:Vd,baseDate:f,getCellNode:$,getCellText:o.getDate,getCellClassName:S,getCellDate:o.addDate,titleCell:x=>Tn(x,{locale:i,format:"YYYY-MM-DD",generateConfig:o}),headerCells:y}),null)}zh.displayName="DateBody";zh.inheritAttrs=!1;zh.props=["prefixCls","generateConfig","value?","viewDate","locale","rowCount","onSelect","dateRender?","disabledDate?","prefixColumn?","rowClassName?"];function m1(e){const t=Qt(e),{prefixCls:n,generateConfig:o,locale:r,viewDate:i,onNextMonth:l,onPrevMonth:a,onNextYear:s,onPrevYear:c,onYearClick:u,onMonthClick:d}=t,{hideHeader:f}=kr();if(f.value)return null;const h=`${n}-header`,m=r.shortMonths||(o.locale.getShortMonths?o.locale.getShortMonths(r.locale):[]),g=o.getMonth(i),y=p("button",{type:"button",key:"year",onClick:u,tabindex:-1,class:`${n}-year-btn`},[Tn(i,{locale:r,format:r.yearFormat,generateConfig:o})]),b=p("button",{type:"button",key:"month",onClick:d,tabindex:-1,class:`${n}-month-btn`},[r.monthFormat?Tn(i,{locale:r,format:r.monthFormat,generateConfig:o}):m[g]]),S=r.monthBeforeYear?[b,y]:[y,b];return p(ll,D(D({},t),{},{prefixCls:h,onSuperPrev:c,onPrev:a,onNext:l,onSuperNext:s}),{default:()=>[S]})}m1.displayName="DateHeader";m1.inheritAttrs=!1;const tY=6;function Ou(e){const t=Qt(e),{prefixCls:n,panelName:o="date",keyboardConfig:r,active:i,operationRef:l,generateConfig:a,value:s,viewDate:c,onViewDateChange:u,onPanelChange:d,onSelect:f}=t,h=`${n}-${o}-panel`;l.value={onKeydown:y=>Is(y,v({onLeftRight:b=>{f(a.addDate(s||c,b),"key")},onCtrlLeftRight:b=>{f(a.addYear(s||c,b),"key")},onUpDown:b=>{f(a.addDate(s||c,b*Vd),"key")},onPageUpDown:b=>{f(a.addMonth(s||c,b),"key")}},r))};const m=y=>{const b=a.addYear(c,y);u(b),d(null,b)},g=y=>{const b=a.addMonth(c,y);u(b),d(null,b)};return p("div",{class:ce(h,{[`${h}-active`]:i})},[p(m1,D(D({},t),{},{prefixCls:n,value:s,viewDate:c,onPrevYear:()=>{m(-1)},onNextYear:()=>{m(1)},onPrevMonth:()=>{g(-1)},onNextMonth:()=>{g(1)},onMonthClick:()=>{d("month",c)},onYearClick:()=>{d("year",c)}}),null),p(zh,D(D({},t),{},{onSelect:y=>f(y,"mouse"),prefixCls:n,value:s,viewDate:c,rowCount:tY}),null)])}Ou.displayName="DatePanel";Ou.inheritAttrs=!1;const kw=qX("date","time");function v1(e){const t=Qt(e),{prefixCls:n,operationRef:o,generateConfig:r,value:i,defaultValue:l,disabledTime:a,showTime:s,onSelect:c}=t,u=`${n}-datetime-panel`,d=ie(null),f=ie({}),h=ie({}),m=typeof s=="object"?v({},s):{};function g($){const x=kw.indexOf(d.value)+$;return kw[x]||null}const y=$=>{h.value.onBlur&&h.value.onBlur($),d.value=null};o.value={onKeydown:$=>{if($.which===Ie.TAB){const x=g($.shiftKey?-1:1);return d.value=x,x&&$.preventDefault(),!0}if(d.value){const x=d.value==="date"?f:h;return x.value&&x.value.onKeydown&&x.value.onKeydown($),!0}return[Ie.LEFT,Ie.RIGHT,Ie.UP,Ie.DOWN].includes($.which)?(d.value="date",!0):!1},onBlur:y,onClose:y};const b=($,x)=>{let C=$;x==="date"&&!i&&m.defaultValue?(C=r.setHour(C,r.getHour(m.defaultValue)),C=r.setMinute(C,r.getMinute(m.defaultValue)),C=r.setSecond(C,r.getSecond(m.defaultValue))):x==="time"&&!i&&l&&(C=r.setYear(C,r.getYear(l)),C=r.setMonth(C,r.getMonth(l)),C=r.setDate(C,r.getDate(l))),c&&c(C,"mouse")},S=a?a(i||null):{};return p("div",{class:ce(u,{[`${u}-active`]:d.value})},[p(Ou,D(D({},t),{},{operationRef:f,active:d.value==="date",onSelect:$=>{b(jd(r,$,!i&&typeof s=="object"?s.defaultValue:null),"date")}}),null),p(kh,D(D(D(D({},t),{},{format:void 0},m),S),{},{disabledTime:null,defaultValue:void 0,operationRef:h,active:d.value==="time",onSelect:$=>{b($,"time")}}),null)])}v1.displayName="DatetimePanel";v1.inheritAttrs=!1;function b1(e){const t=Qt(e),{prefixCls:n,generateConfig:o,locale:r,value:i}=t,l=`${n}-cell`,a=u=>p("td",{key:"week",class:ce(l,`${l}-week`)},[o.locale.getWeek(r.locale,u)]),s=`${n}-week-panel-row`,c=u=>ce(s,{[`${s}-selected`]:$T(o,r.locale,i,u)});return p(Ou,D(D({},t),{},{panelName:"week",prefixColumn:a,rowClassName:c,keyboardConfig:{onLeftRight:null}}),null)}b1.displayName="WeekPanel";b1.inheritAttrs=!1;function y1(e){const t=Qt(e),{prefixCls:n,generateConfig:o,locale:r,viewDate:i,onNextYear:l,onPrevYear:a,onYearClick:s}=t,{hideHeader:c}=kr();if(c.value)return null;const u=`${n}-header`;return p(ll,D(D({},t),{},{prefixCls:u,onSuperPrev:a,onSuperNext:l}),{default:()=>[p("button",{type:"button",onClick:s,class:`${n}-year-btn`},[Tn(i,{locale:r,format:r.yearFormat,generateConfig:o})])]})}y1.displayName="MonthHeader";y1.inheritAttrs=!1;const IT=3,nY=4;function S1(e){const t=Qt(e),{prefixCls:n,locale:o,value:r,viewDate:i,generateConfig:l,monthCellRender:a}=t,{rangedValue:s,hoverRangedValue:c}=wu(),u=`${n}-cell`,d=Fh({cellPrefixCls:u,value:r,generateConfig:l,rangedValue:s.value,hoverRangedValue:c.value,isSameCell:(g,y)=>h1(l,g,y),isInView:()=>!0,offsetCell:(g,y)=>l.addMonth(g,y)}),f=o.shortMonths||(l.locale.getShortMonths?l.locale.getShortMonths(o.locale):[]),h=l.setMonth(i,0),m=a?g=>a({current:g,locale:o}):void 0;return p(da,D(D({},t),{},{rowNum:nY,colNum:IT,baseDate:h,getCellNode:m,getCellText:g=>o.monthFormat?Tn(g,{locale:o,format:o.monthFormat,generateConfig:l}):f[l.getMonth(g)],getCellClassName:d,getCellDate:l.addMonth,titleCell:g=>Tn(g,{locale:o,format:"YYYY-MM",generateConfig:l})}),null)}S1.displayName="MonthBody";S1.inheritAttrs=!1;function $1(e){const t=Qt(e),{prefixCls:n,operationRef:o,onViewDateChange:r,generateConfig:i,value:l,viewDate:a,onPanelChange:s,onSelect:c}=t,u=`${n}-month-panel`;o.value={onKeydown:f=>Is(f,{onLeftRight:h=>{c(i.addMonth(l||a,h),"key")},onCtrlLeftRight:h=>{c(i.addYear(l||a,h),"key")},onUpDown:h=>{c(i.addMonth(l||a,h*IT),"key")},onEnter:()=>{s("date",l||a)}})};const d=f=>{const h=i.addYear(a,f);r(h),s(null,h)};return p("div",{class:u},[p(y1,D(D({},t),{},{prefixCls:n,onPrevYear:()=>{d(-1)},onNextYear:()=>{d(1)},onYearClick:()=>{s("year",a)}}),null),p(S1,D(D({},t),{},{prefixCls:n,onSelect:f=>{c(f,"mouse"),s("date",f)}}),null)])}$1.displayName="MonthPanel";$1.inheritAttrs=!1;function C1(e){const t=Qt(e),{prefixCls:n,generateConfig:o,locale:r,viewDate:i,onNextYear:l,onPrevYear:a,onYearClick:s}=t,{hideHeader:c}=kr();if(c.value)return null;const u=`${n}-header`;return p(ll,D(D({},t),{},{prefixCls:u,onSuperPrev:a,onSuperNext:l}),{default:()=>[p("button",{type:"button",onClick:s,class:`${n}-year-btn`},[Tn(i,{locale:r,format:r.yearFormat,generateConfig:o})])]})}C1.displayName="QuarterHeader";C1.inheritAttrs=!1;const oY=4,rY=1;function x1(e){const t=Qt(e),{prefixCls:n,locale:o,value:r,viewDate:i,generateConfig:l}=t,{rangedValue:a,hoverRangedValue:s}=wu(),c=`${n}-cell`,u=Fh({cellPrefixCls:c,value:r,generateConfig:l,rangedValue:a.value,hoverRangedValue:s.value,isSameCell:(f,h)=>ST(l,f,h),isInView:()=>!0,offsetCell:(f,h)=>l.addMonth(f,h*3)}),d=l.setDate(l.setMonth(i,0),1);return p(da,D(D({},t),{},{rowNum:rY,colNum:oY,baseDate:d,getCellText:f=>Tn(f,{locale:o,format:o.quarterFormat||"[Q]Q",generateConfig:l}),getCellClassName:u,getCellDate:(f,h)=>l.addMonth(f,h*3),titleCell:f=>Tn(f,{locale:o,format:"YYYY-[Q]Q",generateConfig:l})}),null)}x1.displayName="QuarterBody";x1.inheritAttrs=!1;function w1(e){const t=Qt(e),{prefixCls:n,operationRef:o,onViewDateChange:r,generateConfig:i,value:l,viewDate:a,onPanelChange:s,onSelect:c}=t,u=`${n}-quarter-panel`;o.value={onKeydown:f=>Is(f,{onLeftRight:h=>{c(i.addMonth(l||a,h*3),"key")},onCtrlLeftRight:h=>{c(i.addYear(l||a,h),"key")},onUpDown:h=>{c(i.addYear(l||a,h),"key")}})};const d=f=>{const h=i.addYear(a,f);r(h),s(null,h)};return p("div",{class:u},[p(C1,D(D({},t),{},{prefixCls:n,onPrevYear:()=>{d(-1)},onNextYear:()=>{d(1)},onYearClick:()=>{s("year",a)}}),null),p(x1,D(D({},t),{},{prefixCls:n,onSelect:f=>{c(f,"mouse")}}),null)])}w1.displayName="QuarterPanel";w1.inheritAttrs=!1;function O1(e){const t=Qt(e),{prefixCls:n,generateConfig:o,viewDate:r,onPrevDecade:i,onNextDecade:l,onDecadeClick:a}=t,{hideHeader:s}=kr();if(s.value)return null;const c=`${n}-header`,u=o.getYear(r),d=Math.floor(u/Hi)*Hi,f=d+Hi-1;return p(ll,D(D({},t),{},{prefixCls:c,onSuperPrev:i,onSuperNext:l}),{default:()=>[p("button",{type:"button",onClick:a,class:`${n}-decade-btn`},[d,vn("-"),f])]})}O1.displayName="YearHeader";O1.inheritAttrs=!1;const S0=3,Fw=4;function P1(e){const t=Qt(e),{prefixCls:n,value:o,viewDate:r,locale:i,generateConfig:l}=t,{rangedValue:a,hoverRangedValue:s}=wu(),c=`${n}-cell`,u=l.getYear(r),d=Math.floor(u/Hi)*Hi,f=d+Hi-1,h=l.setYear(r,d-Math.ceil((S0*Fw-Hi)/2)),m=y=>{const b=l.getYear(y);return d<=b&&b<=f},g=Fh({cellPrefixCls:c,value:o,generateConfig:l,rangedValue:a.value,hoverRangedValue:s.value,isSameCell:(y,b)=>Lh(l,y,b),isInView:m,offsetCell:(y,b)=>l.addYear(y,b)});return p(da,D(D({},t),{},{rowNum:Fw,colNum:S0,baseDate:h,getCellText:l.getYear,getCellClassName:g,getCellDate:l.addYear,titleCell:y=>Tn(y,{locale:i,format:"YYYY",generateConfig:l})}),null)}P1.displayName="YearBody";P1.inheritAttrs=!1;const Hi=10;function I1(e){const t=Qt(e),{prefixCls:n,operationRef:o,onViewDateChange:r,generateConfig:i,value:l,viewDate:a,sourceMode:s,onSelect:c,onPanelChange:u}=t,d=`${n}-year-panel`;o.value={onKeydown:h=>Is(h,{onLeftRight:m=>{c(i.addYear(l||a,m),"key")},onCtrlLeftRight:m=>{c(i.addYear(l||a,m*Hi),"key")},onUpDown:m=>{c(i.addYear(l||a,m*S0),"key")},onEnter:()=>{u(s==="date"?"date":"month",l||a)}})};const f=h=>{const m=i.addYear(a,h*10);r(m),u(null,m)};return p("div",{class:d},[p(O1,D(D({},t),{},{prefixCls:n,onPrevDecade:()=>{f(-1)},onNextDecade:()=>{f(1)},onDecadeClick:()=>{u("decade",a)}}),null),p(P1,D(D({},t),{},{prefixCls:n,onSelect:h=>{u(s==="date"?"date":"month",h),c(h,"mouse")}}),null)])}I1.displayName="YearPanel";I1.inheritAttrs=!1;function TT(e,t,n){return n?p("div",{class:`${e}-footer-extra`},[n(t)]):null}function ET(e){let{prefixCls:t,components:n={},needConfirmButton:o,onNow:r,onOk:i,okDisabled:l,showNow:a,locale:s}=e,c,u;if(o){const d=n.button||"button";r&&a!==!1&&(c=p("li",{class:`${t}-now`},[p("a",{class:`${t}-now-btn`,onClick:r},[s.now])])),u=o&&p("li",{class:`${t}-ok`},[p(d,{disabled:l,onClick:f=>{f.stopPropagation(),i&&i()}},{default:()=>[s.ok]})])}return!c&&!u?null:p("ul",{class:`${t}-ranges`},[c,u])}function iY(){return re({name:"PickerPanel",inheritAttrs:!1,props:{prefixCls:String,locale:Object,generateConfig:Object,value:Object,defaultValue:Object,pickerValue:Object,defaultPickerValue:Object,disabledDate:Function,mode:String,picker:{type:String,default:"date"},tabindex:{type:[Number,String],default:0},showNow:{type:Boolean,default:void 0},showTime:[Boolean,Object],showToday:Boolean,renderExtraFooter:Function,dateRender:Function,hideHeader:{type:Boolean,default:void 0},onSelect:Function,onChange:Function,onPanelChange:Function,onMousedown:Function,onPickerValueChange:Function,onOk:Function,components:Object,direction:String,hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1}},setup(e,t){let{attrs:n}=t;const o=I(()=>e.picker==="date"&&!!e.showTime||e.picker==="time"),r=I(()=>24%e.hourStep===0),i=I(()=>60%e.minuteStep===0),l=I(()=>60%e.secondStep===0),a=kr(),{operationRef:s,onSelect:c,hideRanges:u,defaultOpenValue:d}=a,{inRange:f,panelPosition:h,rangedValue:m,hoverRangedValue:g}=wu(),y=ie({}),[b,S]=Mt(null,{value:We(e,"value"),defaultValue:e.defaultValue,postState:B=>!B&&(d!=null&&d.value)&&e.picker==="time"?d.value:B}),[$,x]=Mt(null,{value:We(e,"pickerValue"),defaultValue:e.defaultPickerValue||b.value,postState:B=>{const{generateConfig:L,showTime:k,defaultValue:z}=e,H=L.getNow();return B?!b.value&&e.showTime?typeof k=="object"?jd(L,Array.isArray(B)?B[0]:B,k.defaultValue||H):z?jd(L,Array.isArray(B)?B[0]:B,z):jd(L,Array.isArray(B)?B[0]:B,H):B:H}}),C=B=>{x(B),e.onPickerValueChange&&e.onPickerValueChange(B)},O=B=>{const L=UX[e.picker];return L?L(B):B},[w,P]=Mt(()=>e.picker==="time"?"time":O("date"),{value:We(e,"mode")});Se(()=>e.picker,()=>{P(e.picker)});const T=ie(w.value),M=B=>{T.value=B},E=(B,L)=>{const{onPanelChange:k,generateConfig:z}=e,H=O(B||w.value);M(w.value),P(H),k&&(w.value!==H||Xa(z,$.value,$.value))&&k(L,H)},A=function(B,L){let k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{picker:z,generateConfig:H,onSelect:j,onChange:Y,disabledDate:Z}=e;(w.value===z||k)&&(S(B),j&&j(B),c&&c(B,L),Y&&!Xa(H,B,b.value)&&!(Z!=null&&Z(B))&&Y(B))},R=B=>y.value&&y.value.onKeydown?([Ie.LEFT,Ie.RIGHT,Ie.UP,Ie.DOWN,Ie.PAGE_UP,Ie.PAGE_DOWN,Ie.ENTER].includes(B.which)&&B.preventDefault(),y.value.onKeydown(B)):!1,F=B=>{y.value&&y.value.onBlur&&y.value.onBlur(B)},_=()=>{const{generateConfig:B,hourStep:L,minuteStep:k,secondStep:z}=e,H=B.getNow(),j=LX(B.getHour(H),B.getMinute(H),B.getSecond(H),r.value?L:1,i.value?k:1,l.value?z:1),Y=mT(B,H,j[0],j[1],j[2]);A(Y,"submit")},N=I(()=>{const{prefixCls:B,direction:L}=e;return ce(`${B}-panel`,{[`${B}-panel-has-range`]:m&&m.value&&m.value[0]&&m.value[1],[`${B}-panel-has-range-hover`]:g&&g.value&&g.value[0]&&g.value[1],[`${B}-panel-rtl`]:L==="rtl"})});return u1(v(v({},a),{mode:w,hideHeader:I(()=>{var B;return e.hideHeader!==void 0?e.hideHeader:(B=a.hideHeader)===null||B===void 0?void 0:B.value}),hidePrevBtn:I(()=>f.value&&h.value==="right"),hideNextBtn:I(()=>f.value&&h.value==="left")})),Se(()=>e.value,()=>{e.value&&x(e.value)}),()=>{const{prefixCls:B="ant-picker",locale:L,generateConfig:k,disabledDate:z,picker:H="date",tabindex:j=0,showNow:Y,showTime:Z,showToday:G,renderExtraFooter:te,onMousedown:U,onOk:Q,components:J}=e;s&&h.value!=="right"&&(s.value={onKeydown:R,onClose:()=>{y.value&&y.value.onClose&&y.value.onClose()}});let X;const q=v(v(v({},n),e),{operationRef:y,prefixCls:B,viewDate:$.value,value:b.value,onViewDateChange:C,sourceMode:T.value,onPanelChange:E,disabledDate:z});switch(delete q.onChange,delete q.onSelect,w.value){case"decade":X=p(p1,D(D({},q),{},{onSelect:(ue,ae)=>{C(ue),A(ue,ae)}}),null);break;case"year":X=p(I1,D(D({},q),{},{onSelect:(ue,ae)=>{C(ue),A(ue,ae)}}),null);break;case"month":X=p($1,D(D({},q),{},{onSelect:(ue,ae)=>{C(ue),A(ue,ae)}}),null);break;case"quarter":X=p(w1,D(D({},q),{},{onSelect:(ue,ae)=>{C(ue),A(ue,ae)}}),null);break;case"week":X=p(b1,D(D({},q),{},{onSelect:(ue,ae)=>{C(ue),A(ue,ae)}}),null);break;case"time":delete q.showTime,X=p(kh,D(D(D({},q),typeof Z=="object"?Z:null),{},{onSelect:(ue,ae)=>{C(ue),A(ue,ae)}}),null);break;default:Z?X=p(v1,D(D({},q),{},{onSelect:(ue,ae)=>{C(ue),A(ue,ae)}}),null):X=p(Ou,D(D({},q),{},{onSelect:(ue,ae)=>{C(ue),A(ue,ae)}}),null)}let V,K;u!=null&&u.value||(V=TT(B,w.value,te),K=ET({prefixCls:B,components:J,needConfirmButton:o.value,okDisabled:!b.value||z&&z(b.value),locale:L,showNow:Y,onNow:o.value&&_,onOk:()=>{b.value&&(A(b.value,"submit",!0),Q&&Q(b.value))}}));let ee;if(G&&w.value==="date"&&H==="date"&&!Z){const ue=k.getNow(),ae=`${B}-today-btn`,le=z&&z(ue);ee=p("a",{class:ce(ae,le&&`${ae}-disabled`),"aria-disabled":le,onClick:()=>{le||A(ue,"mouse",!0)}},[L.today])}return p("div",{tabindex:j,class:ce(N.value,n.class),style:n.style,onKeydown:R,onBlur:F,onMousedown:U},[X,V||K||ee?p("div",{class:`${B}-footer`},[V,K,ee]):null])}}})}const lY=iY(),T1=e=>p(lY,e),aY={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};function _T(e,t){let{slots:n}=t;const{prefixCls:o,popupStyle:r,visible:i,dropdownClassName:l,dropdownAlign:a,transitionName:s,getPopupContainer:c,range:u,popupPlacement:d,direction:f}=Qt(e),h=`${o}-dropdown`;return p(ca,{showAction:[],hideAction:[],popupPlacement:d!==void 0?d:f==="rtl"?"bottomRight":"bottomLeft",builtinPlacements:aY,prefixCls:h,popupTransitionName:s,popupAlign:a,popupVisible:i,popupClassName:ce(l,{[`${h}-range`]:u,[`${h}-rtl`]:f==="rtl"}),popupStyle:r,getPopupContainer:c},{default:n.default,popup:n.popupElement})}const MT=re({name:"PresetPanel",props:{prefixCls:String,presets:{type:Array,default:()=>[]},onClick:Function,onHover:Function},setup(e){return()=>e.presets.length?p("div",{class:`${e.prefixCls}-presets`},[p("ul",null,[e.presets.map((t,n)=>{let{label:o,value:r}=t;return p("li",{key:n,onClick:i=>{i.stopPropagation(),e.onClick(r)},onMouseenter:()=>{var i;(i=e.onHover)===null||i===void 0||i.call(e,r)},onMouseleave:()=>{var i;(i=e.onHover)===null||i===void 0||i.call(e,null)}},[o])})])]):null}});function $0(e){let{open:t,value:n,isClickOutside:o,triggerOpen:r,forwardKeydown:i,onKeydown:l,blurToCancel:a,onSubmit:s,onCancel:c,onFocus:u,onBlur:d}=e;const f=oe(!1),h=oe(!1),m=oe(!1),g=oe(!1),y=oe(!1),b=I(()=>({onMousedown:()=>{f.value=!0,r(!0)},onKeydown:$=>{if(l($,()=>{y.value=!0}),!y.value){switch($.which){case Ie.ENTER:{t.value?s()!==!1&&(f.value=!0):r(!0),$.preventDefault();return}case Ie.TAB:{f.value&&t.value&&!$.shiftKey?(f.value=!1,$.preventDefault()):!f.value&&t.value&&!i($)&&$.shiftKey&&(f.value=!0,$.preventDefault());return}case Ie.ESC:{f.value=!0,c();return}}!t.value&&![Ie.SHIFT].includes($.which)?r(!0):f.value||i($)}},onFocus:$=>{f.value=!0,h.value=!0,u&&u($)},onBlur:$=>{if(m.value||!o(document.activeElement)){m.value=!1;return}a.value?setTimeout(()=>{let{activeElement:x}=document;for(;x&&x.shadowRoot;)x=x.shadowRoot.activeElement;o(x)&&c()},0):t.value&&(r(!1),g.value&&s()),h.value=!1,d&&d($)}}));Se(t,()=>{g.value=!1}),Se(n,()=>{g.value=!0});const S=oe();return Ue(()=>{S.value=zX($=>{const x=HX($);if(t.value){const C=o(x);C?(!h.value||C)&&r(!1):(m.value=!0,Qe(()=>{m.value=!1}))}})}),tt(()=>{S.value&&S.value()}),[b,{focused:h,typing:f}]}function C0(e){let{valueTexts:t,onTextChange:n}=e;const o=ie("");function r(l){o.value=l,n(l)}function i(){o.value=t.value[0]}return Se(()=>[...t.value],function(l){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];l.join("||")!==a.join("||")&&t.value.every(s=>s!==o.value)&&i()},{immediate:!0}),[o,r,i]}function hp(e,t){let{formatList:n,generateConfig:o,locale:r}=t;const i=Iy(()=>{if(!e.value)return[[""],""];let s="";const c=[];for(let u=0;uc[0]!==s[0]||!Ea(c[1],s[1])),l=I(()=>i.value[0]),a=I(()=>i.value[1]);return[l,a]}function x0(e,t){let{formatList:n,generateConfig:o,locale:r}=t;const i=ie(null);let l;function a(d){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Qe.cancel(l),f){i.value=d;return}l=Qe(()=>{i.value=d})}const[,s]=hp(i,{formatList:n,generateConfig:o,locale:r});function c(d){a(d)}function u(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;a(null,d)}return Se(e,()=>{u(!0)}),tt(()=>{Qe.cancel(l)}),[s,c,u]}function AT(e,t){return I(()=>e!=null&&e.value?e.value:t!=null&&t.value?(qb(!1,"`ranges` is deprecated. Please use `presets` instead."),Object.keys(t.value).map(o=>{const r=t.value[o],i=typeof r=="function"?r():r;return{label:o,value:i}})):[])}function sY(){return re({name:"Picker",inheritAttrs:!1,props:["prefixCls","id","tabindex","dropdownClassName","dropdownAlign","popupStyle","transitionName","generateConfig","locale","inputReadOnly","allowClear","autofocus","showTime","showNow","showHour","showMinute","showSecond","picker","format","use12Hours","value","defaultValue","open","defaultOpen","defaultOpenValue","suffixIcon","presets","clearIcon","disabled","disabledDate","placeholder","getPopupContainer","panelRender","inputRender","onChange","onOpenChange","onPanelChange","onFocus","onBlur","onMousedown","onMouseup","onMouseenter","onMouseleave","onContextmenu","onClick","onKeydown","onSelect","direction","autocomplete","showToday","renderExtraFooter","dateRender","minuteStep","hourStep","secondStep","hideDisabledOptions"],setup(e,t){let{attrs:n,expose:o}=t;const r=ie(null),i=I(()=>e.presets),l=AT(i),a=I(()=>{var z;return(z=e.picker)!==null&&z!==void 0?z:"date"}),s=I(()=>a.value==="date"&&!!e.showTime||a.value==="time"),c=I(()=>wT(vT(e.format,a.value,e.showTime,e.use12Hours))),u=ie(null),d=ie(null),f=ie(null),[h,m]=Mt(null,{value:We(e,"value"),defaultValue:e.defaultValue}),g=ie(h.value),y=z=>{g.value=z},b=ie(null),[S,$]=Mt(!1,{value:We(e,"open"),defaultValue:e.defaultOpen,postState:z=>e.disabled?!1:z,onChange:z=>{e.onOpenChange&&e.onOpenChange(z),!z&&b.value&&b.value.onClose&&b.value.onClose()}}),[x,C]=hp(g,{formatList:c,generateConfig:We(e,"generateConfig"),locale:We(e,"locale")}),[O,w,P]=C0({valueTexts:x,onTextChange:z=>{const H=CT(z,{locale:e.locale,formatList:c.value,generateConfig:e.generateConfig});H&&(!e.disabledDate||!e.disabledDate(H))&&y(H)}}),T=z=>{const{onChange:H,generateConfig:j,locale:Y}=e;y(z),m(z),H&&!Xa(j,h.value,z)&&H(z,z?Tn(z,{generateConfig:j,locale:Y,format:c.value[0]}):"")},M=z=>{e.disabled&&z||$(z)},E=z=>S.value&&b.value&&b.value.onKeydown?b.value.onKeydown(z):!1,A=function(){e.onMouseup&&e.onMouseup(...arguments),r.value&&(r.value.focus(),M(!0))},[R,{focused:F,typing:_}]=$0({blurToCancel:s,open:S,value:O,triggerOpen:M,forwardKeydown:E,isClickOutside:z=>!yT([u.value,d.value,f.value],z),onSubmit:()=>!g.value||e.disabledDate&&e.disabledDate(g.value)?!1:(T(g.value),M(!1),P(),!0),onCancel:()=>{M(!1),y(h.value),P()},onKeydown:(z,H)=>{var j;(j=e.onKeydown)===null||j===void 0||j.call(e,z,H)},onFocus:z=>{var H;(H=e.onFocus)===null||H===void 0||H.call(e,z)},onBlur:z=>{var H;(H=e.onBlur)===null||H===void 0||H.call(e,z)}});Se([S,x],()=>{S.value||(y(h.value),!x.value.length||x.value[0]===""?w(""):C.value!==O.value&&P())}),Se(a,()=>{S.value||P()}),Se(h,()=>{y(h.value)});const[N,B,L]=x0(O,{formatList:c,generateConfig:We(e,"generateConfig"),locale:We(e,"locale")}),k=(z,H)=>{(H==="submit"||H!=="key"&&!s.value)&&(T(z),M(!1))};return u1({operationRef:b,hideHeader:I(()=>a.value==="time"),onSelect:k,open:S,defaultOpenValue:We(e,"defaultOpenValue"),onDateMouseenter:B,onDateMouseleave:L}),o({focus:()=>{r.value&&r.value.focus()},blur:()=>{r.value&&r.value.blur()}}),()=>{const{prefixCls:z="rc-picker",id:H,tabindex:j,dropdownClassName:Y,dropdownAlign:Z,popupStyle:G,transitionName:te,generateConfig:U,locale:Q,inputReadOnly:J,allowClear:X,autofocus:q,picker:V="date",defaultOpenValue:K,suffixIcon:ee,clearIcon:ue,disabled:ae,placeholder:le,getPopupContainer:ne,panelRender:se,onMousedown:pe,onMouseenter:he,onMouseleave:ge,onContextmenu:be,onClick:xe,onSelect:fe,direction:de,autocomplete:ye="off"}=e,Oe=v(v(v({},e),n),{class:ce({[`${z}-panel-focused`]:!_.value}),style:void 0,pickerValue:void 0,onPickerValueChange:void 0,onChange:null});let Te=p("div",{class:`${z}-panel-layout`},[p(MT,{prefixCls:z,presets:l.value,onClick:Ae=>{T(Ae),M(!1)}},null),p(T1,D(D({},Oe),{},{generateConfig:U,value:g.value,locale:Q,tabindex:-1,onSelect:Ae=>{fe==null||fe(Ae),y(Ae)},direction:de,onPanelChange:(Ae,ke)=>{const{onPanelChange:ot}=e;L(!0),ot==null||ot(Ae,ke)}}),null)]);se&&(Te=se(Te));const Re=p("div",{class:`${z}-panel-container`,ref:u,onMousedown:Ae=>{Ae.preventDefault()}},[Te]);let $e;ee&&($e=p("span",{class:`${z}-suffix`},[ee]));let we;X&&h.value&&!ae&&(we=p("span",{onMousedown:Ae=>{Ae.preventDefault(),Ae.stopPropagation()},onMouseup:Ae=>{Ae.preventDefault(),Ae.stopPropagation(),T(null),M(!1)},class:`${z}-clear`,role:"button"},[ue||p("span",{class:`${z}-clear-btn`},null)]));const Pe=v(v(v(v({id:H,tabindex:j,disabled:ae,readonly:J||typeof c.value[0]=="function"||!_.value,value:N.value||O.value,onInput:Ae=>{w(Ae.target.value)},autofocus:q,placeholder:le,ref:r,title:O.value},R.value),{size:bT(V,c.value[0],U)}),OT(e)),{autocomplete:ye}),Me=e.inputRender?e.inputRender(Pe):p("input",Pe,null),De=de==="rtl"?"bottomRight":"bottomLeft";return p("div",{ref:f,class:ce(z,n.class,{[`${z}-disabled`]:ae,[`${z}-focused`]:F.value,[`${z}-rtl`]:de==="rtl"}),style:n.style,onMousedown:pe,onMouseup:A,onMouseenter:he,onMouseleave:ge,onContextmenu:be,onClick:xe},[p("div",{class:ce(`${z}-input`,{[`${z}-input-placeholder`]:!!N.value}),ref:d},[Me,$e,we]),p(_T,{visible:S.value,popupStyle:G,prefixCls:z,dropdownClassName:Y,dropdownAlign:Z,getPopupContainer:ne,transitionName:te,popupPlacement:De,direction:de},{default:()=>[p("div",{style:{pointerEvents:"none",position:"absolute",top:0,bottom:0,left:0,right:0}},null)],popupElement:()=>Re})])}}})}const cY=sY();function uY(e,t){let{picker:n,locale:o,selectedValue:r,disabledDate:i,disabled:l,generateConfig:a}=e;const s=I(()=>$t(r.value,0)),c=I(()=>$t(r.value,1));function u(g){return a.value.locale.getWeekFirstDate(o.value.locale,g)}function d(g){const y=a.value.getYear(g),b=a.value.getMonth(g);return y*100+b}function f(g){const y=a.value.getYear(g),b=b0(a.value,g);return y*10+b}return[g=>{var y;if(i&&(!((y=i==null?void 0:i.value)===null||y===void 0)&&y.call(i,g)))return!0;if(l[1]&&c)return!oi(a.value,g,c.value)&&a.value.isAfter(g,c.value);if(t.value[1]&&c.value)switch(n.value){case"quarter":return f(g)>f(c.value);case"month":return d(g)>d(c.value);case"week":return u(g)>u(c.value);default:return!oi(a.value,g,c.value)&&a.value.isAfter(g,c.value)}return!1},g=>{var y;if(!((y=i.value)===null||y===void 0)&&y.call(i,g))return!0;if(l[0]&&s)return!oi(a.value,g,c.value)&&a.value.isAfter(s.value,g);if(t.value[0]&&s.value)switch(n.value){case"quarter":return f(g)GX(o,l,a));case"quarter":case"month":return i((l,a)=>Lh(o,l,a));default:return i((l,a)=>h1(o,l,a))}}function fY(e,t,n,o){const r=$t(e,0),i=$t(e,1);if(t===0)return r;if(r&&i)switch(dY(r,i,n,o)){case"same":return r;case"closing":return r;default:return Sc(i,n,o,-1)}return r}function pY(e){let{values:t,picker:n,defaultDates:o,generateConfig:r}=e;const i=ie([$t(o,0),$t(o,1)]),l=ie(null),a=I(()=>$t(t.value,0)),s=I(()=>$t(t.value,1)),c=h=>i.value[h]?i.value[h]:$t(l.value,h)||fY(t.value,h,n.value,r.value)||a.value||s.value||r.value.getNow(),u=ie(null),d=ie(null);je(()=>{u.value=c(0),d.value=c(1)});function f(h,m){if(h){let g=zo(l.value,h,m);i.value=zo(i.value,null,m)||[null,null];const y=(m+1)%2;$t(t.value,y)||(g=zo(g,h,y)),l.value=g}else(a.value||s.value)&&(l.value=null)}return[u,d,f]}function RT(e){return wb()?(GO(e),!0):!1}function hY(e){return typeof e=="function"?e():ct(e)}function E1(e){var t;const n=hY(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function gY(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;$n()?Ue(e):t?e():lt(e)}function DT(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=oe(),o=()=>n.value=!!e();return o(),gY(o,t),n}var wm;const NT=typeof window<"u";NT&&(!((wm=window==null?void 0:window.navigator)===null||wm===void 0)&&wm.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);const BT=NT?window:void 0;var mY=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r2&&arguments[2]!==void 0?arguments[2]:{};const{window:o=BT}=n,r=mY(n,["window"]);let i;const l=DT(()=>o&&"ResizeObserver"in o),a=()=>{i&&(i.disconnect(),i=void 0)},s=Se(()=>E1(e),u=>{a(),l.value&&o&&u&&(i=new ResizeObserver(t),i.observe(u,r))},{immediate:!0,flush:"post"}),c=()=>{a(),s()};return RT(c),{isSupported:l,stop:c}}function Us(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{width:0,height:0},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{box:o="content-box"}=n,r=oe(t.width),i=oe(t.height);return vY(e,l=>{let[a]=l;const s=o==="border-box"?a.borderBoxSize:o==="content-box"?a.contentBoxSize:a.devicePixelContentBoxSize;s?(r.value=s.reduce((c,u)=>{let{inlineSize:d}=u;return c+d},0),i.value=s.reduce((c,u)=>{let{blockSize:d}=u;return c+d},0)):(r.value=a.contentRect.width,i.value=a.contentRect.height)},n),Se(()=>E1(e),l=>{r.value=l?t.width:0,i.value=l?t.height:0}),{width:r,height:i}}function zw(e,t){return e&&e[0]&&e[1]&&t.isAfter(e[0],e[1])?[e[1],e[0]]:e}function Hw(e,t,n,o){return!!(e||o&&o[t]||n[(t+1)%2])}function bY(){return re({name:"RangerPicker",inheritAttrs:!1,props:["prefixCls","id","popupStyle","dropdownClassName","transitionName","dropdownAlign","getPopupContainer","generateConfig","locale","placeholder","autofocus","disabled","format","picker","showTime","showNow","showHour","showMinute","showSecond","use12Hours","separator","value","defaultValue","defaultPickerValue","open","defaultOpen","disabledDate","disabledTime","dateRender","panelRender","ranges","allowEmpty","allowClear","suffixIcon","clearIcon","pickerRef","inputReadOnly","mode","renderExtraFooter","onChange","onOpenChange","onPanelChange","onCalendarChange","onFocus","onBlur","onMousedown","onMouseup","onMouseenter","onMouseleave","onClick","onOk","onKeydown","components","order","direction","activePickerIndex","autocomplete","minuteStep","hourStep","secondStep","hideDisabledOptions","disabledMinutes","presets","prevIcon","nextIcon","superPrevIcon","superNextIcon"],setup(e,t){let{attrs:n,expose:o}=t;const r=I(()=>e.picker==="date"&&!!e.showTime||e.picker==="time"),i=I(()=>e.presets),l=I(()=>e.ranges),a=AT(i,l),s=ie({}),c=ie(null),u=ie(null),d=ie(null),f=ie(null),h=ie(null),m=ie(null),g=ie(null),y=ie(null),b=I(()=>wT(vT(e.format,e.picker,e.showTime,e.use12Hours))),[S,$]=Mt(0,{value:We(e,"activePickerIndex")}),x=ie(null),C=I(()=>{const{disabled:_e}=e;return Array.isArray(_e)?_e:[_e||!1,_e||!1]}),[O,w]=Mt(null,{value:We(e,"value"),defaultValue:e.defaultValue,postState:_e=>e.picker==="time"&&!e.order?_e:zw(_e,e.generateConfig)}),[P,T,M]=pY({values:O,picker:We(e,"picker"),defaultDates:e.defaultPickerValue,generateConfig:We(e,"generateConfig")}),[E,A]=Mt(O.value,{postState:_e=>{let Je=_e;if(C.value[0]&&C.value[1])return Je;for(let Ye=0;Ye<2;Ye+=1)C.value[Ye]&&!$t(Je,Ye)&&!$t(e.allowEmpty,Ye)&&(Je=zo(Je,e.generateConfig.getNow(),Ye));return Je}}),[R,F]=Mt([e.picker,e.picker],{value:We(e,"mode")});Se(()=>e.picker,()=>{F([e.picker,e.picker])});const _=(_e,Je)=>{var Ye;F(_e),(Ye=e.onPanelChange)===null||Ye===void 0||Ye.call(e,Je,_e)},[N,B]=uY({picker:We(e,"picker"),selectedValue:E,locale:We(e,"locale"),disabled:C,disabledDate:We(e,"disabledDate"),generateConfig:We(e,"generateConfig")},s),[L,k]=Mt(!1,{value:We(e,"open"),defaultValue:e.defaultOpen,postState:_e=>C.value[S.value]?!1:_e,onChange:_e=>{var Je;(Je=e.onOpenChange)===null||Je===void 0||Je.call(e,_e),!_e&&x.value&&x.value.onClose&&x.value.onClose()}}),z=I(()=>L.value&&S.value===0),H=I(()=>L.value&&S.value===1),j=ie(0),Y=ie(0),Z=ie(0),{width:G}=Us(c);Se([L,G],()=>{!L.value&&c.value&&(Z.value=G.value)});const{width:te}=Us(u),{width:U}=Us(y),{width:Q}=Us(d),{width:J}=Us(h);Se([S,L,te,U,Q,J,()=>e.direction],()=>{Y.value=0,S.value?d.value&&h.value&&(Y.value=Q.value+J.value,te.value&&U.value&&Y.value>te.value-U.value-(e.direction==="rtl"||y.value.offsetLeft>Y.value?0:y.value.offsetLeft)&&(j.value=Y.value)):S.value===0&&(j.value=0)},{immediate:!0});const X=ie();function q(_e,Je){if(_e)clearTimeout(X.value),s.value[Je]=!0,$(Je),k(_e),L.value||M(null,Je);else if(S.value===Je){k(_e);const Ye=s.value;X.value=setTimeout(()=>{Ye===s.value&&(s.value={})})}}function V(_e){q(!0,_e),setTimeout(()=>{const Je=[m,g][_e];Je.value&&Je.value.focus()},0)}function K(_e,Je){let Ye=_e,Pt=$t(Ye,0),sn=$t(Ye,1);const{generateConfig:Ut,locale:so,picker:On,order:br,onCalendarChange:vo,allowEmpty:Do,onChange:Bt,showTime:er}=e;Pt&&sn&&Ut.isAfter(Pt,sn)&&(On==="week"&&!$T(Ut,so.locale,Pt,sn)||On==="quarter"&&!ST(Ut,Pt,sn)||On!=="week"&&On!=="quarter"&&On!=="time"&&!(er?Xa(Ut,Pt,sn):oi(Ut,Pt,sn))?(Je===0?(Ye=[Pt,null],sn=null):(Pt=null,Ye=[null,sn]),s.value={[Je]:!0}):(On!=="time"||br!==!1)&&(Ye=zw(Ye,Ut))),A(Ye);const No=Ye&&Ye[0]?Tn(Ye[0],{generateConfig:Ut,locale:so,format:b.value[0]}):"",$i=Ye&&Ye[1]?Tn(Ye[1],{generateConfig:Ut,locale:so,format:b.value[0]}):"";vo&&vo(Ye,[No,$i],{range:Je===0?"start":"end"});const Ci=Hw(Pt,0,C.value,Do),tr=Hw(sn,1,C.value,Do);(Ye===null||Ci&&tr)&&(w(Ye),Bt&&(!Xa(Ut,$t(O.value,0),Pt)||!Xa(Ut,$t(O.value,1),sn))&&Bt(Ye,[No,$i]));let nr=null;Je===0&&!C.value[1]?nr=1:Je===1&&!C.value[0]&&(nr=0),nr!==null&&nr!==S.value&&(!s.value[nr]||!$t(Ye,nr))&&$t(Ye,Je)?V(nr):q(!1,Je)}const ee=_e=>L&&x.value&&x.value.onKeydown?x.value.onKeydown(_e):!1,ue={formatList:b,generateConfig:We(e,"generateConfig"),locale:We(e,"locale")},[ae,le]=hp(I(()=>$t(E.value,0)),ue),[ne,se]=hp(I(()=>$t(E.value,1)),ue),pe=(_e,Je)=>{const Ye=CT(_e,{locale:e.locale,formatList:b.value,generateConfig:e.generateConfig});Ye&&!(Je===0?N:B)(Ye)&&(A(zo(E.value,Ye,Je)),M(Ye,Je))},[he,ge,be]=C0({valueTexts:ae,onTextChange:_e=>pe(_e,0)}),[xe,fe,de]=C0({valueTexts:ne,onTextChange:_e=>pe(_e,1)}),[ye,Oe]=St(null),[Te,Re]=St(null),[$e,we,Pe]=x0(he,ue),[Me,De,Ae]=x0(xe,ue),ke=_e=>{Re(zo(E.value,_e,S.value)),S.value===0?we(_e):De(_e)},ot=()=>{Re(zo(E.value,null,S.value)),S.value===0?Pe():Ae()},gt=(_e,Je)=>({forwardKeydown:ee,onBlur:Ye=>{var Pt;(Pt=e.onBlur)===null||Pt===void 0||Pt.call(e,Ye)},isClickOutside:Ye=>!yT([u.value,d.value,f.value,c.value],Ye),onFocus:Ye=>{var Pt;$(_e),(Pt=e.onFocus)===null||Pt===void 0||Pt.call(e,Ye)},triggerOpen:Ye=>{q(Ye,_e)},onSubmit:()=>{if(!E.value||e.disabledDate&&e.disabledDate(E.value[_e]))return!1;K(E.value,_e),Je()},onCancel:()=>{q(!1,_e),A(O.value),Je()}}),[st,{focused:mt,typing:bt}]=$0(v(v({},gt(0,be)),{blurToCancel:r,open:z,value:he,onKeydown:(_e,Je)=>{var Ye;(Ye=e.onKeydown)===null||Ye===void 0||Ye.call(e,_e,Je)}})),[en,{focused:an,typing:hn}]=$0(v(v({},gt(1,de)),{blurToCancel:r,open:H,value:xe,onKeydown:(_e,Je)=>{var Ye;(Ye=e.onKeydown)===null||Ye===void 0||Ye.call(e,_e,Je)}})),Kt=_e=>{var Je;(Je=e.onClick)===null||Je===void 0||Je.call(e,_e),!L.value&&!m.value.contains(_e.target)&&!g.value.contains(_e.target)&&(C.value[0]?C.value[1]||V(1):V(0))},An=_e=>{var Je;(Je=e.onMousedown)===null||Je===void 0||Je.call(e,_e),L.value&&(mt.value||an.value)&&!m.value.contains(_e.target)&&!g.value.contains(_e.target)&&_e.preventDefault()},lo=I(()=>{var _e;return!((_e=O.value)===null||_e===void 0)&&_e[0]?Tn(O.value[0],{locale:e.locale,format:"YYYYMMDDHHmmss",generateConfig:e.generateConfig}):""}),Ro=I(()=>{var _e;return!((_e=O.value)===null||_e===void 0)&&_e[1]?Tn(O.value[1],{locale:e.locale,format:"YYYYMMDDHHmmss",generateConfig:e.generateConfig}):""});Se([L,ae,ne],()=>{L.value||(A(O.value),!ae.value.length||ae.value[0]===""?ge(""):le.value!==he.value&&be(),!ne.value.length||ne.value[0]===""?fe(""):se.value!==xe.value&&de())}),Se([lo,Ro],()=>{A(O.value)}),o({focus:()=>{m.value&&m.value.focus()},blur:()=>{m.value&&m.value.blur(),g.value&&g.value.blur()}});const Qo=I(()=>L.value&&Te.value&&Te.value[0]&&Te.value[1]&&e.generateConfig.isAfter(Te.value[1],Te.value[0])?Te.value:null);function ao(){let _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{generateConfig:Ye,showTime:Pt,dateRender:sn,direction:Ut,disabledTime:so,prefixCls:On,locale:br}=e;let vo=Pt;if(Pt&&typeof Pt=="object"&&Pt.defaultValue){const Bt=Pt.defaultValue;vo=v(v({},Pt),{defaultValue:$t(Bt,S.value)||void 0})}let Do=null;return sn&&(Do=Bt=>{let{current:er,today:No}=Bt;return sn({current:er,today:No,info:{range:S.value?"end":"start"}})}),p(eY,{value:{inRange:!0,panelPosition:_e,rangedValue:ye.value||E.value,hoverRangedValue:Qo.value}},{default:()=>[p(T1,D(D(D({},e),Je),{},{dateRender:Do,showTime:vo,mode:R.value[S.value],generateConfig:Ye,style:void 0,direction:Ut,disabledDate:S.value===0?N:B,disabledTime:Bt=>so?so(Bt,S.value===0?"start":"end"):!1,class:ce({[`${On}-panel-focused`]:S.value===0?!bt.value:!hn.value}),value:$t(E.value,S.value),locale:br,tabIndex:-1,onPanelChange:(Bt,er)=>{S.value===0&&Pe(!0),S.value===1&&Ae(!0),_(zo(R.value,er,S.value),zo(E.value,Bt,S.value));let No=Bt;_e==="right"&&R.value[S.value]===er&&(No=Sc(No,er,Ye,-1)),M(No,S.value)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:S.value===0?$t(E.value,1):$t(E.value,0)}),null)]})}const al=(_e,Je)=>{const Ye=zo(E.value,_e,S.value);Je==="submit"||Je!=="key"&&!r.value?(K(Ye,S.value),S.value===0?Pe():Ae()):A(Ye)};return u1({operationRef:x,hideHeader:I(()=>e.picker==="time"),onDateMouseenter:ke,onDateMouseleave:ot,hideRanges:I(()=>!0),onSelect:al,open:L}),()=>{const{prefixCls:_e="rc-picker",id:Je,popupStyle:Ye,dropdownClassName:Pt,transitionName:sn,dropdownAlign:Ut,getPopupContainer:so,generateConfig:On,locale:br,placeholder:vo,autofocus:Do,picker:Bt="date",showTime:er,separator:No="~",disabledDate:$i,panelRender:Ci,allowClear:tr,suffixIcon:ga,clearIcon:nr,inputReadOnly:Mg,renderExtraFooter:SA,onMouseenter:$A,onMouseleave:CA,onMouseup:xA,onOk:c$,components:wA,direction:Bs,autocomplete:u$="off"}=e,OA=Bs==="rtl"?{right:`${Y.value}px`}:{left:`${Y.value}px`};function PA(){let co;const xi=TT(_e,R.value[S.value],SA),h$=ET({prefixCls:_e,components:wA,needConfirmButton:r.value,okDisabled:!$t(E.value,S.value)||$i&&$i(E.value[S.value]),locale:br,onOk:()=>{$t(E.value,S.value)&&(K(E.value,S.value),c$&&c$(E.value))}});if(Bt!=="time"&&!er){const wi=S.value===0?P.value:T.value,EA=Sc(wi,Bt,On),Ng=R.value[S.value]===Bt,g$=ao(Ng?"left":!1,{pickerValue:wi,onPickerValueChange:Bg=>{M(Bg,S.value)}}),m$=ao("right",{pickerValue:EA,onPickerValueChange:Bg=>{M(Sc(Bg,Bt,On,-1),S.value)}});Bs==="rtl"?co=p(He,null,[m$,Ng&&g$]):co=p(He,null,[g$,Ng&&m$])}else co=ao();let Dg=p("div",{class:`${_e}-panel-layout`},[p(MT,{prefixCls:_e,presets:a.value,onClick:wi=>{K(wi,null),q(!1,S.value)},onHover:wi=>{Oe(wi)}},null),p("div",null,[p("div",{class:`${_e}-panels`},[co]),(xi||h$)&&p("div",{class:`${_e}-footer`},[xi,h$])])]);return Ci&&(Dg=Ci(Dg)),p("div",{class:`${_e}-panel-container`,style:{marginLeft:`${j.value}px`},ref:u,onMousedown:wi=>{wi.preventDefault()}},[Dg])}const IA=p("div",{class:ce(`${_e}-range-wrapper`,`${_e}-${Bt}-range-wrapper`),style:{minWidth:`${Z.value}px`}},[p("div",{ref:y,class:`${_e}-range-arrow`,style:OA},null),PA()]);let d$;ga&&(d$=p("span",{class:`${_e}-suffix`},[ga]));let f$;tr&&($t(O.value,0)&&!C.value[0]||$t(O.value,1)&&!C.value[1])&&(f$=p("span",{onMousedown:co=>{co.preventDefault(),co.stopPropagation()},onMouseup:co=>{co.preventDefault(),co.stopPropagation();let xi=O.value;C.value[0]||(xi=zo(xi,null,0)),C.value[1]||(xi=zo(xi,null,1)),K(xi,null),q(!1,S.value)},class:`${_e}-clear`},[nr||p("span",{class:`${_e}-clear-btn`},null)]));const p$={size:bT(Bt,b.value[0],On)};let Ag=0,Rg=0;d.value&&f.value&&h.value&&(S.value===0?Rg=d.value.offsetWidth:(Ag=Y.value,Rg=f.value.offsetWidth));const TA=Bs==="rtl"?{right:`${Ag}px`}:{left:`${Ag}px`};return p("div",D({ref:c,class:ce(_e,`${_e}-range`,n.class,{[`${_e}-disabled`]:C.value[0]&&C.value[1],[`${_e}-focused`]:S.value===0?mt.value:an.value,[`${_e}-rtl`]:Bs==="rtl"}),style:n.style,onClick:Kt,onMouseenter:$A,onMouseleave:CA,onMousedown:An,onMouseup:xA},OT(e)),[p("div",{class:ce(`${_e}-input`,{[`${_e}-input-active`]:S.value===0,[`${_e}-input-placeholder`]:!!$e.value}),ref:d},[p("input",D(D(D({id:Je,disabled:C.value[0],readonly:Mg||typeof b.value[0]=="function"||!bt.value,value:$e.value||he.value,onInput:co=>{ge(co.target.value)},autofocus:Do,placeholder:$t(vo,0)||"",ref:m},st.value),p$),{},{autocomplete:u$}),null)]),p("div",{class:`${_e}-range-separator`,ref:h},[No]),p("div",{class:ce(`${_e}-input`,{[`${_e}-input-active`]:S.value===1,[`${_e}-input-placeholder`]:!!Me.value}),ref:f},[p("input",D(D(D({disabled:C.value[1],readonly:Mg||typeof b.value[0]=="function"||!hn.value,value:Me.value||xe.value,onInput:co=>{fe(co.target.value)},placeholder:$t(vo,1)||"",ref:g},en.value),p$),{},{autocomplete:u$}),null)]),p("div",{class:`${_e}-active-bar`,style:v(v({},TA),{width:`${Rg}px`,position:"absolute"})},null),d$,f$,p(_T,{visible:L.value,popupStyle:Ye,prefixCls:_e,dropdownClassName:Pt,dropdownAlign:Ut,getPopupContainer:so,transitionName:sn,range:!0,direction:Bs},{default:()=>[p("div",{style:{pointerEvents:"none",position:"absolute",top:0,bottom:0,left:0,right:0}},null)],popupElement:()=>IA})])}}})}const yY=bY();var SY=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.checked,()=>{i.value=e.checked}),r({focus(){var u;(u=l.value)===null||u===void 0||u.focus()},blur(){var u;(u=l.value)===null||u===void 0||u.blur()}});const a=ie(),s=u=>{if(e.disabled)return;e.checked===void 0&&(i.value=u.target.checked),u.shiftKey=a.value;const d={target:v(v({},e),{checked:u.target.checked}),stopPropagation(){u.stopPropagation()},preventDefault(){u.preventDefault()},nativeEvent:u};e.checked!==void 0&&(l.value.checked=!!e.checked),o("change",d),a.value=!1},c=u=>{o("click",u),a.value=u.shiftKey};return()=>{const{prefixCls:u,name:d,id:f,type:h,disabled:m,readonly:g,tabindex:y,autofocus:b,value:S,required:$}=e,x=SY(e,["prefixCls","name","id","type","disabled","readonly","tabindex","autofocus","value","required"]),{class:C,onFocus:O,onBlur:w,onKeydown:P,onKeypress:T,onKeyup:M}=n,E=v(v({},x),n),A=Object.keys(E).reduce((_,N)=>((N.startsWith("data-")||N.startsWith("aria-")||N==="role")&&(_[N]=E[N]),_),{}),R=ce(u,C,{[`${u}-checked`]:i.value,[`${u}-disabled`]:m}),F=v(v({name:d,id:f,type:h,readonly:g,disabled:m,tabindex:y,class:`${u}-input`,checked:!!i.value,autofocus:b,value:S},A),{onChange:s,onClick:c,onFocus:O,onBlur:w,onKeydown:P,onKeypress:T,onKeyup:M,required:$});return p("span",{class:R},[p("input",D({ref:l},F),null),p("span",{class:`${u}-inner`},null)])}}}),kT=Symbol("radioGroupContextKey"),CY=e=>{qe(kT,e)},xY=()=>Ke(kT,void 0),FT=Symbol("radioOptionTypeContextKey"),wY=e=>{qe(FT,e)},OY=()=>Ke(FT,void 0),PY=new it("antRadioEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),IY=e=>{const{componentCls:t,antCls:n}=e,o=`${t}-group`;return{[o]:v(v({},Ze(e)),{display:"inline-block",fontSize:0,[`&${o}-rtl`]:{direction:"rtl"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},TY=e=>{const{componentCls:t,radioWrapperMarginRight:n,radioCheckedColor:o,radioSize:r,motionDurationSlow:i,motionDurationMid:l,motionEaseInOut:a,motionEaseInOutCirc:s,radioButtonBg:c,colorBorder:u,lineWidth:d,radioDotSize:f,colorBgContainerDisabled:h,colorTextDisabled:m,paddingXS:g,radioDotDisabledColor:y,lineType:b,radioDotDisabledSize:S,wireframe:$,colorWhite:x}=e,C=`${t}-inner`;return{[`${t}-wrapper`]:v(v({},Ze(e)),{position:"relative",display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer",[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${d}px ${b} ${o}`,borderRadius:"50%",visibility:"hidden",animationName:PY,animationDuration:i,animationTimingFunction:a,animationFillMode:"both",content:'""'},[t]:v(v({},Ze(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center"}),[`${t}-wrapper:hover &, + &:hover ${C}`]:{borderColor:o},[`${t}-input:focus-visible + ${C}`]:v({},fi(e)),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:r,height:r,marginBlockStart:r/-2,marginInlineStart:r/-2,backgroundColor:$?o:x,borderBlockStart:0,borderInlineStart:0,borderRadius:r,transform:"scale(0)",opacity:0,transition:`all ${i} ${s}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:r,height:r,backgroundColor:c,borderColor:u,borderStyle:"solid",borderWidth:d,borderRadius:"50%",transition:`all ${l}`},[`${t}-input`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,insetBlockEnd:0,insetInlineStart:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[C]:{borderColor:o,backgroundColor:$?c:o,"&::after":{transform:`scale(${f/r})`,opacity:1,transition:`all ${i} ${s}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[C]:{backgroundColor:h,borderColor:u,cursor:"not-allowed","&::after":{backgroundColor:y}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:m,cursor:"not-allowed"},[`&${t}-checked`]:{[C]:{"&::after":{transform:`scale(${S/r})`}}}},[`span${t} + *`]:{paddingInlineStart:g,paddingInlineEnd:g}})}},EY=e=>{const{radioButtonColor:t,controlHeight:n,componentCls:o,lineWidth:r,lineType:i,colorBorder:l,motionDurationSlow:a,motionDurationMid:s,radioButtonPaddingHorizontal:c,fontSize:u,radioButtonBg:d,fontSizeLG:f,controlHeightLG:h,controlHeightSM:m,paddingXS:g,borderRadius:y,borderRadiusSM:b,borderRadiusLG:S,radioCheckedColor:$,radioButtonCheckedBg:x,radioButtonHoverColor:C,radioButtonActiveColor:O,radioSolidCheckedColor:w,colorTextDisabled:P,colorBgContainerDisabled:T,radioDisabledButtonCheckedColor:M,radioDisabledButtonCheckedBg:E}=e;return{[`${o}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:u,lineHeight:`${n-r*2}px`,background:d,border:`${r}px ${i} ${l}`,borderBlockStartWidth:r+.02,borderInlineStartWidth:0,borderInlineEndWidth:r,cursor:"pointer",transition:[`color ${s}`,`background ${s}`,`border-color ${s}`,`box-shadow ${s}`].join(","),a:{color:t},[`> ${o}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-r,insetInlineStart:-r,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:r,paddingInline:0,backgroundColor:l,transition:`background-color ${a}`,content:'""'}},"&:first-child":{borderInlineStart:`${r}px ${i} ${l}`,borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y},"&:first-child:last-child":{borderRadius:y},[`${o}-group-large &`]:{height:h,fontSize:f,lineHeight:`${h-r*2}px`,"&:first-child":{borderStartStartRadius:S,borderEndStartRadius:S},"&:last-child":{borderStartEndRadius:S,borderEndEndRadius:S}},[`${o}-group-small &`]:{height:m,paddingInline:g-r,paddingBlock:0,lineHeight:`${m-r*2}px`,"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},"&:hover":{position:"relative",color:$},"&:has(:focus-visible)":v({},fi(e)),[`${o}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${o}-button-wrapper-disabled)`]:{zIndex:1,color:$,background:x,borderColor:$,"&::before":{backgroundColor:$},"&:first-child":{borderColor:$},"&:hover":{color:C,borderColor:C,"&::before":{backgroundColor:C}},"&:active":{color:O,borderColor:O,"&::before":{backgroundColor:O}}},[`${o}-group-solid &-checked:not(${o}-button-wrapper-disabled)`]:{color:w,background:$,borderColor:$,"&:hover":{color:w,background:C,borderColor:C},"&:active":{color:w,background:O,borderColor:O}},"&-disabled":{color:P,backgroundColor:T,borderColor:l,cursor:"not-allowed","&:first-child, &:hover":{color:P,backgroundColor:T,borderColor:l}},[`&-disabled${o}-button-wrapper-checked`]:{color:M,backgroundColor:E,borderColor:l,boxShadow:"none"}}}},zT=Xe("Radio",e=>{const{padding:t,lineWidth:n,controlItemBgActiveDisabled:o,colorTextDisabled:r,colorBgContainer:i,fontSizeLG:l,controlOutline:a,colorPrimaryHover:s,colorPrimaryActive:c,colorText:u,colorPrimary:d,marginXS:f,controlOutlineWidth:h,colorTextLightSolid:m,wireframe:g}=e,y=`0 0 0 ${h}px ${a}`,b=y,S=l,$=4,x=S-$*2,C=g?x:S-($+n)*2,O=d,w=u,P=s,T=c,M=t-n,R=Fe(e,{radioFocusShadow:y,radioButtonFocusShadow:b,radioSize:S,radioDotSize:C,radioDotDisabledSize:x,radioCheckedColor:O,radioDotDisabledColor:r,radioSolidCheckedColor:m,radioButtonBg:i,radioButtonCheckedBg:i,radioButtonColor:w,radioButtonHoverColor:P,radioButtonActiveColor:T,radioButtonPaddingHorizontal:M,radioDisabledButtonCheckedBg:o,radioDisabledButtonCheckedColor:r,radioWrapperMarginRight:f});return[IY(R),TY(R),EY(R)]});var _Y=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,checked:Ce(),disabled:Ce(),isGroup:Ce(),value:W.any,name:String,id:String,autofocus:Ce(),onChange:ve(),onFocus:ve(),onBlur:ve(),onClick:ve(),"onUpdate:checked":ve(),"onUpdate:value":ve()}),Jn=re({compatConfig:{MODE:3},name:"ARadio",inheritAttrs:!1,props:HT(),setup(e,t){let{emit:n,expose:o,slots:r,attrs:i}=t;const l=ln(),a=yn.useInject(),s=OY(),c=xY(),u=mo(),d=I(()=>{var P;return(P=g.value)!==null&&P!==void 0?P:u.value}),f=ie(),{prefixCls:h,direction:m,disabled:g}=Ee("radio",e),y=I(()=>(c==null?void 0:c.optionType.value)==="button"||s==="button"?`${h.value}-button`:h.value),b=mo(),[S,$]=zT(h);o({focus:()=>{f.value.focus()},blur:()=>{f.value.blur()}});const O=P=>{const T=P.target.checked;n("update:checked",T),n("update:value",T),n("change",P),l.onFieldChange()},w=P=>{n("change",P),c&&c.onChange&&c.onChange(P)};return()=>{var P;const T=c,{prefixCls:M,id:E=l.id.value}=e,A=_Y(e,["prefixCls","id"]),R=v(v({prefixCls:y.value,id:E},rt(A,["onUpdate:checked","onUpdate:value"])),{disabled:(P=g.value)!==null&&P!==void 0?P:b.value});T?(R.name=T.name.value,R.onChange=w,R.checked=e.value===T.value.value,R.disabled=d.value||T.disabled.value):R.onChange=O;const F=ce({[`${y.value}-wrapper`]:!0,[`${y.value}-wrapper-checked`]:R.checked,[`${y.value}-wrapper-disabled`]:R.disabled,[`${y.value}-wrapper-rtl`]:m.value==="rtl",[`${y.value}-wrapper-in-form-item`]:a.isFormItemInput},i.class,$.value);return S(p("label",D(D({},i),{},{class:F}),[p(LT,D(D({},R),{},{type:"radio",ref:f}),null),r.default&&p("span",null,[r.default()])]))}}}),MY=()=>({prefixCls:String,value:W.any,size:Be(),options:ut(),disabled:Ce(),name:String,buttonStyle:Be("outline"),id:String,optionType:Be("default"),onChange:ve(),"onUpdate:value":ve()}),_1=re({compatConfig:{MODE:3},name:"ARadioGroup",inheritAttrs:!1,props:MY(),setup(e,t){let{slots:n,emit:o,attrs:r}=t;const i=ln(),{prefixCls:l,direction:a,size:s}=Ee("radio",e),[c,u]=zT(l),d=ie(e.value),f=ie(!1);return Se(()=>e.value,m=>{d.value=m,f.value=!1}),CY({onChange:m=>{const g=d.value,{value:y}=m.target;"value"in e||(d.value=y),!f.value&&y!==g&&(f.value=!0,o("update:value",y),o("change",m),i.onFieldChange()),lt(()=>{f.value=!1})},value:d,disabled:I(()=>e.disabled),name:I(()=>e.name),optionType:I(()=>e.optionType)}),()=>{var m;const{options:g,buttonStyle:y,id:b=i.id.value}=e,S=`${l.value}-group`,$=ce(S,`${S}-${y}`,{[`${S}-${s.value}`]:s.value,[`${S}-rtl`]:a.value==="rtl"},r.class,u.value);let x=null;return g&&g.length>0?x=g.map(C=>{if(typeof C=="string"||typeof C=="number")return p(Jn,{key:C,prefixCls:l.value,disabled:e.disabled,value:C,checked:d.value===C},{default:()=>[C]});const{value:O,disabled:w,label:P}=C;return p(Jn,{key:`radio-group-value-options-${O}`,prefixCls:l.value,disabled:w||e.disabled,value:O,checked:d.value===O},{default:()=>[P]})}):x=(m=n.default)===null||m===void 0?void 0:m.call(n),c(p("div",D(D({},r),{},{class:$,id:b}),[x]))}}}),gp=re({compatConfig:{MODE:3},name:"ARadioButton",inheritAttrs:!1,props:HT(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r}=Ee("radio",e);return wY("button"),()=>{var i;return p(Jn,D(D(D({},o),e),{},{prefixCls:r.value}),{default:()=>[(i=n.default)===null||i===void 0?void 0:i.call(n)]})}}});Jn.Group=_1;Jn.Button=gp;Jn.install=function(e){return e.component(Jn.name,Jn),e.component(Jn.Group.name,Jn.Group),e.component(Jn.Button.name,Jn.Button),e};const AY=10,RY=20;function jT(e){const{fullscreen:t,validRange:n,generateConfig:o,locale:r,prefixCls:i,value:l,onChange:a,divRef:s}=e,c=o.getYear(l||o.getNow());let u=c-AY,d=u+RY;n&&(u=o.getYear(n[0]),d=o.getYear(n[1])+1);const f=r&&r.year==="年"?"年":"",h=[];for(let m=u;m{let g=o.setYear(l,m);if(n){const[y,b]=n,S=o.getYear(g),$=o.getMonth(g);S===o.getYear(b)&&$>o.getMonth(b)&&(g=o.setMonth(g,o.getMonth(b))),S===o.getYear(y)&&$s.value},null)}jT.inheritAttrs=!1;function VT(e){const{prefixCls:t,fullscreen:n,validRange:o,value:r,generateConfig:i,locale:l,onChange:a,divRef:s}=e,c=i.getMonth(r||i.getNow());let u=0,d=11;if(o){const[m,g]=o,y=i.getYear(r);i.getYear(g)===y&&(d=i.getMonth(g)),i.getYear(m)===y&&(u=i.getMonth(m))}const f=l.shortMonths||i.locale.getShortMonths(l.locale),h=[];for(let m=u;m<=d;m+=1)h.push({label:f[m],value:m});return p(Cn,{size:n?void 0:"small",class:`${t}-month-select`,value:c,options:h,onChange:m=>{a(i.setMonth(r,m))},getPopupContainer:()=>s.value},null)}VT.inheritAttrs=!1;function WT(e){const{prefixCls:t,locale:n,mode:o,fullscreen:r,onModeChange:i}=e;return p(_1,{onChange:l=>{let{target:{value:a}}=l;i(a)},value:o,size:r?void 0:"small",class:`${t}-mode-switch`},{default:()=>[p(gp,{value:"month"},{default:()=>[n.month]}),p(gp,{value:"year"},{default:()=>[n.year]})]})}WT.inheritAttrs=!1;const DY=re({name:"CalendarHeader",inheritAttrs:!1,props:["mode","prefixCls","value","validRange","generateConfig","locale","mode","fullscreen"],setup(e,t){let{attrs:n}=t;const o=ie(null),r=yn.useInject();return yn.useProvide(r,{isFormItemInput:!1}),()=>{const i=v(v({},e),n),{prefixCls:l,fullscreen:a,mode:s,onChange:c,onModeChange:u}=i,d=v(v({},i),{fullscreen:a,divRef:o});return p("div",{class:`${l}-header`,ref:o},[p(jT,D(D({},d),{},{onChange:f=>{c(f,"year")}}),null),s==="month"&&p(VT,D(D({},d),{},{onChange:f=>{c(f,"month")}}),null),p(WT,D(D({},d),{},{onModeChange:u}),null)])}}}),M1=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Ts=e=>({borderColor:e.inputBorderHoverColor,borderInlineEndWidth:e.lineWidth}),Yi=e=>({borderColor:e.inputBorderHoverColor,boxShadow:`0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`,borderInlineEndWidth:e.lineWidth,outline:0}),A1=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":v({},Ts(Fe(e,{inputBorderHoverColor:e.colorBorder})))}),KT=e=>{const{inputPaddingVerticalLG:t,fontSizeLG:n,lineHeightLG:o,borderRadiusLG:r,inputPaddingHorizontalLG:i}=e;return{padding:`${t}px ${i}px`,fontSize:n,lineHeight:o,borderRadius:r}},R1=e=>({padding:`${e.inputPaddingVerticalSM}px ${e.controlPaddingHorizontalSM-1}px`,borderRadius:e.borderRadiusSM}),Pu=(e,t)=>{const{componentCls:n,colorError:o,colorWarning:r,colorErrorOutline:i,colorWarningOutline:l,colorErrorBorderHover:a,colorWarningBorderHover:s}=e;return{[`&-status-error:not(${t}-disabled):not(${t}-borderless)${t}`]:{borderColor:o,"&:hover":{borderColor:a},"&:focus, &-focused":v({},Yi(Fe(e,{inputBorderActiveColor:o,inputBorderHoverColor:o,controlOutline:i}))),[`${n}-prefix`]:{color:o}},[`&-status-warning:not(${t}-disabled):not(${t}-borderless)${t}`]:{borderColor:r,"&:hover":{borderColor:s},"&:focus, &-focused":v({},Yi(Fe(e,{inputBorderActiveColor:r,inputBorderHoverColor:r,controlOutline:l}))),[`${n}-prefix`]:{color:r}}}},pa=e=>v(v({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${e.inputPaddingVertical}px ${e.inputPaddingHorizontal}px`,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,backgroundColor:e.colorBgContainer,backgroundImage:"none",borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:e.colorBorder,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},M1(e.colorTextPlaceholder)),{"&:hover":v({},Ts(e)),"&:focus, &-focused":v({},Yi(e)),"&-disabled, &[disabled]":v({},A1(e)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":v({},KT(e)),"&-sm":v({},R1(e)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),UT=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:v({},KT(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:v({},R1(e)),[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${e.inputPaddingHorizontal}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,textAlign:"center",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`-${e.inputPaddingVertical+1}px -${e.inputPaddingHorizontal}px`,[`&${n}-select-single:not(${n}-select-customize-input)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${e.lineWidth}px ${e.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${n}-select-selector`]:{color:e.colorPrimary}}},[`${n}-cascader-picker`]:{margin:`-9px -${e.inputPaddingHorizontal}px`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${t}`]:{float:"inline-start",width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:v(v({display:"block"},ur()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`& > ${t}-affix-wrapper`]:{display:"inline-flex"},[`& > ${n}-picker-range`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-e.lineWidth,borderInlineEndWidth:e.lineWidth},[`${t}`]:{float:"none"},[`& > ${n}-select > ${n}-select-selector, + & > ${n}-select-auto-complete ${t}, + & > ${n}-cascader-picker ${t}, + & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child, + & > ${n}-select:first-child > ${n}-select-selector, + & > ${n}-select-auto-complete:first-child ${t}, + & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child, + & > ${n}-select:last-child > ${n}-select-selector, + & > ${n}-cascader-picker:last-child ${t}, + & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:-e.lineWidth,[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}}),[`&&-sm ${n}-btn`]:{fontSize:e.fontSizeSM,height:e.controlHeightSM,lineHeight:"normal"},[`&&-lg ${n}-btn`]:{fontSize:e.fontSizeLG,height:e.controlHeightLG,lineHeight:"normal"},[`&&-lg ${n}-select-single ${n}-select-selector`]:{height:`${e.controlHeightLG}px`,[`${n}-select-selection-item, ${n}-select-selection-placeholder`]:{lineHeight:`${e.controlHeightLG-2}px`},[`${n}-select-selection-search-input`]:{height:`${e.controlHeightLG}px`}},[`&&-sm ${n}-select-single ${n}-select-selector`]:{height:`${e.controlHeightSM}px`,[`${n}-select-selection-item, ${n}-select-selection-placeholder`]:{lineHeight:`${e.controlHeightSM-2}px`},[`${n}-select-selection-search-input`]:{height:`${e.controlHeightSM}px`}}}},NY=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:o}=e,i=(n-o*2-16)/2;return{[t]:v(v(v(v({},Ze(e)),pa(e)),Pu(e,t)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:i,paddingBottom:i}}})}},BY=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextTertiary},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${e.inputAffixPadding}px`}},"&-textarea-with-clear-btn":{padding:"0 !important",border:"0 !important",[`${t}-clear-icon`]:{position:"absolute",insetBlockStart:e.paddingXS,insetInlineEnd:e.paddingXS,zIndex:1}}}},LY=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:o,motionDurationSlow:r,colorIcon:i,colorIconHover:l,iconCls:a}=e;return{[`${t}-affix-wrapper`]:v(v(v(v(v({},pa(e)),{display:"inline-flex",[`&:not(${t}-affix-wrapper-disabled):hover`]:v(v({},Ts(e)),{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${t}[disabled]`]:{background:"transparent"}},[`> input${t}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&:focus":{boxShadow:"none !important"}},"&::before":{width:0,visibility:"hidden",content:'"\\a0"'},[`${t}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:o},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),BY(e)),{[`${a}${t}-password-icon`]:{color:i,cursor:"pointer",transition:`all ${r}`,"&:hover":{color:l}}}),Pu(e,`${t}-affix-wrapper`))}},kY=e=>{const{componentCls:t,colorError:n,colorSuccess:o,borderRadiusLG:r,borderRadiusSM:i}=e;return{[`${t}-group`]:v(v(v({},Ze(e)),UT(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:r}},"&-sm":{[`${t}-group-addon`]:{borderRadius:i}},"&-status-error":{[`${t}-group-addon`]:{color:n,borderColor:n}},"&-status-warning":{[`${t}-group-addon:last-child`]:{color:o,borderColor:o}}}})}},FY=e=>{const{componentCls:t,antCls:n}=e,o=`${t}-search`;return{[o]:{[`${t}`]:{"&:hover, &:focus":{borderColor:e.colorPrimaryHover,[`+ ${t}-group-addon ${o}-button:not(${n}-btn-primary)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{borderRadius:0},[`${t}-lg`]:{lineHeight:e.lineHeightLG-2e-4},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${o}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius,borderEndStartRadius:0},[`${o}-button:not(${n}-btn-primary)`]:{color:e.colorTextDescription,"&:hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${n}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${o}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${o}-button`]:{height:e.controlHeightLG},[`&-small ${o}-button`]:{height:e.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:-e.lineWidth,borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button, + > ${t}, + ${t}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}};function ha(e){return Fe(e,{inputAffixPadding:e.paddingXXS,inputPaddingVertical:Math.max(Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2*10)/10-e.lineWidth,3),inputPaddingVerticalLG:Math.ceil((e.controlHeightLG-e.fontSizeLG*e.lineHeightLG)/2*10)/10-e.lineWidth,inputPaddingVerticalSM:Math.max(Math.round((e.controlHeightSM-e.fontSize*e.lineHeight)/2*10)/10-e.lineWidth,0),inputPaddingHorizontal:e.paddingSM-e.lineWidth,inputPaddingHorizontalSM:e.paddingXS-e.lineWidth,inputPaddingHorizontalLG:e.controlPaddingHorizontal-e.lineWidth,inputBorderHoverColor:e.colorPrimaryHover,inputBorderActiveColor:e.colorPrimaryHover})}const zY=e=>{const{componentCls:t,inputPaddingHorizontal:n,paddingLG:o}=e,r=`${t}-textarea`;return{[r]:{position:"relative",[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:n,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto"},"&-status-error,\n &-status-warning,\n &-status-success,\n &-status-validating":{[`&${r}-has-feedback`]:{[`${t}`]:{paddingInlineEnd:o}}},"&-show-count":{[`> ${t}`]:{height:"100%"},"&::after":{color:e.colorTextDescription,whiteSpace:"nowrap",content:"attr(data-count)",pointerEvents:"none",float:"right"}},"&-rtl":{"&::after":{float:"left"}}}}},D1=Xe("Input",e=>{const t=ha(e);return[NY(t),zY(t),LY(t),kY(t),FY(t),Os(t)]}),Om=(e,t,n,o)=>{const{lineHeight:r}=e,i=Math.floor(n*r)+2,l=Math.max((t-i)/2,0),a=Math.max(t-i-l,0);return{padding:`${l}px ${o}px ${a}px`}},HY=e=>{const{componentCls:t,pickerCellCls:n,pickerCellInnerCls:o,pickerPanelCellHeight:r,motionDurationSlow:i,borderRadiusSM:l,motionDurationMid:a,controlItemBgHover:s,lineWidth:c,lineType:u,colorPrimary:d,controlItemBgActive:f,colorTextLightSolid:h,controlHeightSM:m,pickerDateHoverRangeBorderColor:g,pickerCellBorderGap:y,pickerBasicCellHoverWithRangeColor:b,pickerPanelCellWidth:S,colorTextDisabled:$,colorBgContainerDisabled:x}=e;return{"&::before":{position:"absolute",top:"50%",insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:r,transform:"translateY(-50%)",transition:`all ${i}`,content:'""'},[o]:{position:"relative",zIndex:2,display:"inline-block",minWidth:r,height:r,lineHeight:`${r}px`,borderRadius:l,transition:`background ${a}, border ${a}`},[`&:hover:not(${n}-in-view), + &:hover:not(${n}-selected):not(${n}-range-start):not(${n}-range-end):not(${n}-range-hover-start):not(${n}-range-hover-end)`]:{[o]:{background:s}},[`&-in-view${n}-today ${o}`]:{"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:`${c}px ${u} ${d}`,borderRadius:l,content:'""'}},[`&-in-view${n}-in-range`]:{position:"relative","&::before":{background:f}},[`&-in-view${n}-selected ${o}, + &-in-view${n}-range-start ${o}, + &-in-view${n}-range-end ${o}`]:{color:h,background:d},[`&-in-view${n}-range-start:not(${n}-range-start-single), + &-in-view${n}-range-end:not(${n}-range-end-single)`]:{"&::before":{background:f}},[`&-in-view${n}-range-start::before`]:{insetInlineStart:"50%"},[`&-in-view${n}-range-end::before`]:{insetInlineEnd:"50%"},[`&-in-view${n}-range-hover-start:not(${n}-in-range):not(${n}-range-start):not(${n}-range-end), + &-in-view${n}-range-hover-end:not(${n}-in-range):not(${n}-range-start):not(${n}-range-end), + &-in-view${n}-range-hover-start${n}-range-start-single, + &-in-view${n}-range-hover-start${n}-range-start${n}-range-end${n}-range-end-near-hover, + &-in-view${n}-range-hover-end${n}-range-start${n}-range-end${n}-range-start-near-hover, + &-in-view${n}-range-hover-end${n}-range-end-single, + &-in-view${n}-range-hover:not(${n}-in-range)`]:{"&::after":{position:"absolute",top:"50%",zIndex:0,height:m,borderTop:`${c}px dashed ${g}`,borderBottom:`${c}px dashed ${g}`,transform:"translateY(-50%)",transition:`all ${i}`,content:'""'}},"&-range-hover-start::after,\n &-range-hover-end::after,\n &-range-hover::after":{insetInlineEnd:0,insetInlineStart:y},[`&-in-view${n}-in-range${n}-range-hover::before, + &-in-view${n}-range-start${n}-range-hover::before, + &-in-view${n}-range-end${n}-range-hover::before, + &-in-view${n}-range-start:not(${n}-range-start-single)${n}-range-hover-start::before, + &-in-view${n}-range-end:not(${n}-range-end-single)${n}-range-hover-end::before, + ${t}-panel + > :not(${t}-date-panel) + &-in-view${n}-in-range${n}-range-hover-start::before, + ${t}-panel + > :not(${t}-date-panel) + &-in-view${n}-in-range${n}-range-hover-end::before`]:{background:b},[`&-in-view${n}-range-start:not(${n}-range-start-single):not(${n}-range-end) ${o}`]:{borderStartStartRadius:l,borderEndStartRadius:l,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${n}-range-end:not(${n}-range-end-single):not(${n}-range-start) ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:l,borderEndEndRadius:l},[`&-range-hover${n}-range-end::after`]:{insetInlineStart:"50%"},[`tr > &-in-view${n}-range-hover:first-child::after, + tr > &-in-view${n}-range-hover-end:first-child::after, + &-in-view${n}-start${n}-range-hover-edge-start${n}-range-hover-edge-start-near-range::after, + &-in-view${n}-range-hover-edge-start:not(${n}-range-hover-edge-start-near-range)::after, + &-in-view${n}-range-hover-start::after`]:{insetInlineStart:(S-r)/2,borderInlineStart:`${c}px dashed ${g}`,borderStartStartRadius:c,borderEndStartRadius:c},[`tr > &-in-view${n}-range-hover:last-child::after, + tr > &-in-view${n}-range-hover-start:last-child::after, + &-in-view${n}-end${n}-range-hover-edge-end${n}-range-hover-edge-end-near-range::after, + &-in-view${n}-range-hover-edge-end:not(${n}-range-hover-edge-end-near-range)::after, + &-in-view${n}-range-hover-end::after`]:{insetInlineEnd:(S-r)/2,borderInlineEnd:`${c}px dashed ${g}`,borderStartEndRadius:c,borderEndEndRadius:c},"&-disabled":{color:$,pointerEvents:"none",[o]:{background:"transparent"},"&::before":{background:x}},[`&-disabled${n}-today ${o}::before`]:{borderColor:$}}},GT=e=>{const{componentCls:t,pickerCellInnerCls:n,pickerYearMonthCellWidth:o,pickerControlIconSize:r,pickerPanelCellWidth:i,paddingSM:l,paddingXS:a,paddingXXS:s,colorBgContainer:c,lineWidth:u,lineType:d,borderRadiusLG:f,colorPrimary:h,colorTextHeading:m,colorSplit:g,pickerControlIconBorderWidth:y,colorIcon:b,pickerTextHeight:S,motionDurationMid:$,colorIconHover:x,fontWeightStrong:C,pickerPanelCellHeight:O,pickerCellPaddingVertical:w,colorTextDisabled:P,colorText:T,fontSize:M,pickerBasicCellHoverWithRangeColor:E,motionDurationSlow:A,pickerPanelWithoutTimeCellHeight:R,pickerQuarterPanelContentHeight:F,colorLink:_,colorLinkActive:N,colorLinkHover:B,pickerDateHoverRangeBorderColor:L,borderRadiusSM:k,colorTextLightSolid:z,borderRadius:H,controlItemBgHover:j,pickerTimePanelColumnHeight:Y,pickerTimePanelColumnWidth:Z,pickerTimePanelCellHeight:G,controlItemBgActive:te,marginXXS:U}=e,Q=i*7+l*2+4,J=(Q-a*2)/3-o-l;return{[t]:{"&-panel":{display:"inline-flex",flexDirection:"column",textAlign:"center",background:c,border:`${u}px ${d} ${g}`,borderRadius:f,outline:"none","&-focused":{borderColor:h},"&-rtl":{direction:"rtl",[`${t}-prev-icon, + ${t}-super-prev-icon`]:{transform:"rotate(45deg)"},[`${t}-next-icon, + ${t}-super-next-icon`]:{transform:"rotate(-135deg)"}}},"&-decade-panel,\n &-year-panel,\n &-quarter-panel,\n &-month-panel,\n &-week-panel,\n &-date-panel,\n &-time-panel":{display:"flex",flexDirection:"column",width:Q},"&-header":{display:"flex",padding:`0 ${a}px`,color:m,borderBottom:`${u}px ${d} ${g}`,"> *":{flex:"none"},button:{padding:0,color:b,lineHeight:`${S}px`,background:"transparent",border:0,cursor:"pointer",transition:`color ${$}`},"> button":{minWidth:"1.6em",fontSize:M,"&:hover":{color:x}},"&-view":{flex:"auto",fontWeight:C,lineHeight:`${S}px`,button:{color:"inherit",fontWeight:"inherit",verticalAlign:"top","&:not(:first-child)":{marginInlineStart:a},"&:hover":{color:h}}}},"&-prev-icon,\n &-next-icon,\n &-super-prev-icon,\n &-super-next-icon":{position:"relative",display:"inline-block",width:r,height:r,"&::before":{position:"absolute",top:0,insetInlineStart:0,display:"inline-block",width:r,height:r,border:"0 solid currentcolor",borderBlockStartWidth:y,borderBlockEndWidth:0,borderInlineStartWidth:y,borderInlineEndWidth:0,content:'""'}},"&-super-prev-icon,\n &-super-next-icon":{"&::after":{position:"absolute",top:Math.ceil(r/2),insetInlineStart:Math.ceil(r/2),display:"inline-block",width:r,height:r,border:"0 solid currentcolor",borderBlockStartWidth:y,borderBlockEndWidth:0,borderInlineStartWidth:y,borderInlineEndWidth:0,content:'""'}},"&-prev-icon,\n &-super-prev-icon":{transform:"rotate(-45deg)"},"&-next-icon,\n &-super-next-icon":{transform:"rotate(135deg)"},"&-content":{width:"100%",tableLayout:"fixed",borderCollapse:"collapse","th, td":{position:"relative",minWidth:O,fontWeight:"normal"},th:{height:O+w*2,color:T,verticalAlign:"middle"}},"&-cell":v({padding:`${w}px 0`,color:P,cursor:"pointer","&-in-view":{color:T}},HY(e)),[`&-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-start ${n}, + &-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-end ${n}`]:{"&::after":{position:"absolute",top:0,bottom:0,zIndex:-1,background:E,transition:`all ${A}`,content:'""'}},[`&-date-panel + ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-start + ${n}::after`]:{insetInlineEnd:-(i-O)/2,insetInlineStart:0},[`&-date-panel ${t}-cell-in-view${t}-cell-in-range${t}-cell-range-hover-end ${n}::after`]:{insetInlineEnd:0,insetInlineStart:-(i-O)/2},[`&-range-hover${t}-range-start::after`]:{insetInlineEnd:"50%"},"&-decade-panel,\n &-year-panel,\n &-quarter-panel,\n &-month-panel":{[`${t}-content`]:{height:R*4},[n]:{padding:`0 ${a}px`}},"&-quarter-panel":{[`${t}-content`]:{height:F}},[`&-panel ${t}-footer`]:{borderTop:`${u}px ${d} ${g}`},"&-footer":{width:"min-content",minWidth:"100%",lineHeight:`${S-2*u}px`,textAlign:"center","&-extra":{padding:`0 ${l}`,lineHeight:`${S-2*u}px`,textAlign:"start","&:not(:last-child)":{borderBottom:`${u}px ${d} ${g}`}}},"&-now":{textAlign:"start"},"&-today-btn":{color:_,"&:hover":{color:B},"&:active":{color:N},[`&${t}-today-btn-disabled`]:{color:P,cursor:"not-allowed"}},"&-decade-panel":{[n]:{padding:`0 ${a/2}px`},[`${t}-cell::before`]:{display:"none"}},"&-year-panel,\n &-quarter-panel,\n &-month-panel":{[`${t}-body`]:{padding:`0 ${a}px`},[n]:{width:o},[`${t}-cell-range-hover-start::after`]:{insetInlineStart:J,borderInlineStart:`${u}px dashed ${L}`,borderStartStartRadius:k,borderBottomStartRadius:k,borderStartEndRadius:0,borderBottomEndRadius:0,[`${t}-panel-rtl &`]:{insetInlineEnd:J,borderInlineEnd:`${u}px dashed ${L}`,borderStartStartRadius:0,borderBottomStartRadius:0,borderStartEndRadius:k,borderBottomEndRadius:k}},[`${t}-cell-range-hover-end::after`]:{insetInlineEnd:J,borderInlineEnd:`${u}px dashed ${L}`,borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:H,borderEndEndRadius:H,[`${t}-panel-rtl &`]:{insetInlineStart:J,borderInlineStart:`${u}px dashed ${L}`,borderStartStartRadius:H,borderEndStartRadius:H,borderStartEndRadius:0,borderEndEndRadius:0}}},"&-week-panel":{[`${t}-body`]:{padding:`${a}px ${l}px`},[`${t}-cell`]:{[`&:hover ${n}, + &-selected ${n}, + ${n}`]:{background:"transparent !important"}},"&-row":{td:{transition:`background ${$}`,"&:first-child":{borderStartStartRadius:k,borderEndStartRadius:k},"&:last-child":{borderStartEndRadius:k,borderEndEndRadius:k}},"&:hover td":{background:j},"&-selected td,\n &-selected:hover td":{background:h,[`&${t}-cell-week`]:{color:new vt(z).setAlpha(.5).toHexString()},[`&${t}-cell-today ${n}::before`]:{borderColor:z},[n]:{color:z}}}},"&-date-panel":{[`${t}-body`]:{padding:`${a}px ${l}px`},[`${t}-content`]:{width:i*7,th:{width:i}}},"&-datetime-panel":{display:"flex",[`${t}-time-panel`]:{borderInlineStart:`${u}px ${d} ${g}`},[`${t}-date-panel, + ${t}-time-panel`]:{transition:`opacity ${A}`},"&-active":{[`${t}-date-panel, + ${t}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:"auto",minWidth:"auto",direction:"ltr",[`${t}-content`]:{display:"flex",flex:"auto",height:Y},"&-column":{flex:"1 0 auto",width:Z,margin:`${s}px 0`,padding:0,overflowY:"hidden",textAlign:"start",listStyle:"none",transition:`background ${$}`,overflowX:"hidden","&::after":{display:"block",height:Y-G,content:'""'},"&:not(:first-child)":{borderInlineStart:`${u}px ${d} ${g}`},"&-active":{background:new vt(te).setAlpha(.2).toHexString()},"&:hover":{overflowY:"auto"},"> li":{margin:0,padding:0,[`&${t}-time-panel-cell`]:{marginInline:U,[`${t}-time-panel-cell-inner`]:{display:"block",width:Z-2*U,height:G,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:(Z-G)/2,color:T,lineHeight:`${G}px`,borderRadius:k,cursor:"pointer",transition:`background ${$}`,"&:hover":{background:j}},"&-selected":{[`${t}-time-panel-cell-inner`]:{background:te}},"&-disabled":{[`${t}-time-panel-cell-inner`]:{color:P,background:"transparent",cursor:"not-allowed"}}}}}},[`&-datetime-panel ${t}-time-panel-column:after`]:{height:Y-G+s*2}}}},jY=e=>{const{componentCls:t,colorBgContainer:n,colorError:o,colorErrorOutline:r,colorWarning:i,colorWarningOutline:l}=e;return{[t]:{[`&-status-error${t}`]:{"&, &:not([disabled]):hover":{backgroundColor:n,borderColor:o},"&-focused, &:focus":v({},Yi(Fe(e,{inputBorderActiveColor:o,inputBorderHoverColor:o,controlOutline:r}))),[`${t}-active-bar`]:{background:o}},[`&-status-warning${t}`]:{"&, &:not([disabled]):hover":{backgroundColor:n,borderColor:i},"&-focused, &:focus":v({},Yi(Fe(e,{inputBorderActiveColor:i,inputBorderHoverColor:i,controlOutline:l}))),[`${t}-active-bar`]:{background:i}}}}},VY=e=>{const{componentCls:t,antCls:n,boxShadowPopoverArrow:o,controlHeight:r,fontSize:i,inputPaddingHorizontal:l,colorBgContainer:a,lineWidth:s,lineType:c,colorBorder:u,borderRadius:d,motionDurationMid:f,colorBgContainerDisabled:h,colorTextDisabled:m,colorTextPlaceholder:g,controlHeightLG:y,fontSizeLG:b,controlHeightSM:S,inputPaddingHorizontalSM:$,paddingXS:x,marginXS:C,colorTextDescription:O,lineWidthBold:w,lineHeight:P,colorPrimary:T,motionDurationSlow:M,zIndexPopup:E,paddingXXS:A,paddingSM:R,pickerTextHeight:F,controlItemBgActive:_,colorPrimaryBorder:N,sizePopupArrow:B,borderRadiusXS:L,borderRadiusOuter:k,colorBgElevated:z,borderRadiusLG:H,boxShadowSecondary:j,borderRadiusSM:Y,colorSplit:Z,controlItemBgHover:G,presetsWidth:te,presetsMaxWidth:U}=e;return[{[t]:v(v(v({},Ze(e)),Om(e,r,i,l)),{position:"relative",display:"inline-flex",alignItems:"center",background:a,lineHeight:1,border:`${s}px ${c} ${u}`,borderRadius:d,transition:`border ${f}, box-shadow ${f}`,"&:hover, &-focused":v({},Ts(e)),"&-focused":v({},Yi(e)),[`&${t}-disabled`]:{background:h,borderColor:u,cursor:"not-allowed",[`${t}-suffix`]:{color:m}},[`&${t}-borderless`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`${t}-input`]:{position:"relative",display:"inline-flex",alignItems:"center",width:"100%","> input":v(v({},pa(e)),{flex:"auto",minWidth:1,height:"auto",padding:0,background:"transparent",border:0,"&:focus":{boxShadow:"none"},"&[disabled]":{background:"transparent"}}),"&:hover":{[`${t}-clear`]:{opacity:1}},"&-placeholder":{"> input":{color:g}}},"&-large":v(v({},Om(e,y,b,l)),{[`${t}-input > input`]:{fontSize:b}}),"&-small":v({},Om(e,S,i,$)),[`${t}-suffix`]:{display:"flex",flex:"none",alignSelf:"center",marginInlineStart:x/2,color:m,lineHeight:1,pointerEvents:"none","> *":{verticalAlign:"top","&:not(:last-child)":{marginInlineEnd:C}}},[`${t}-clear`]:{position:"absolute",top:"50%",insetInlineEnd:0,color:m,lineHeight:1,background:a,transform:"translateY(-50%)",cursor:"pointer",opacity:0,transition:`opacity ${f}, color ${f}`,"> *":{verticalAlign:"top"},"&:hover":{color:O}},[`${t}-separator`]:{position:"relative",display:"inline-block",width:"1em",height:b,color:m,fontSize:b,verticalAlign:"top",cursor:"default",[`${t}-focused &`]:{color:O},[`${t}-range-separator &`]:{[`${t}-disabled &`]:{cursor:"not-allowed"}}},"&-range":{position:"relative",display:"inline-flex",[`${t}-clear`]:{insetInlineEnd:l},"&:hover":{[`${t}-clear`]:{opacity:1}},[`${t}-active-bar`]:{bottom:-s,height:w,marginInlineStart:l,background:T,opacity:0,transition:`all ${M} ease-out`,pointerEvents:"none"},[`&${t}-focused`]:{[`${t}-active-bar`]:{opacity:1}},[`${t}-range-separator`]:{alignItems:"center",padding:`0 ${x}px`,lineHeight:1},[`&${t}-small`]:{[`${t}-clear`]:{insetInlineEnd:$},[`${t}-active-bar`]:{marginInlineStart:$}}},"&-dropdown":v(v(v({},Ze(e)),GT(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:E,[`&${t}-dropdown-hidden`]:{display:"none"},[`&${t}-dropdown-placement-bottomLeft`]:{[`${t}-range-arrow`]:{top:0,display:"block",transform:"translateY(-100%)"}},[`&${t}-dropdown-placement-topLeft`]:{[`${t}-range-arrow`]:{bottom:0,display:"block",transform:"translateY(100%) rotate(180deg)"}},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topLeft, + &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topRight, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topLeft, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topRight`]:{animationName:Mh},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomLeft, + &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomRight, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomLeft, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomRight`]:{animationName:Eh},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topLeft, + &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topRight`]:{animationName:Ah},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomLeft, + &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomRight`]:{animationName:_h},[`${t}-panel > ${t}-time-panel`]:{paddingTop:A},[`${t}-ranges`]:{marginBottom:0,padding:`${A}px ${R}px`,overflow:"hidden",lineHeight:`${F-2*s-x/2}px`,textAlign:"start",listStyle:"none",display:"flex",justifyContent:"space-between","> li":{display:"inline-block"},[`${t}-preset > ${n}-tag-blue`]:{color:T,background:_,borderColor:N,cursor:"pointer"},[`${t}-ok`]:{marginInlineStart:"auto"}},[`${t}-range-wrapper`]:{display:"flex",position:"relative"},[`${t}-range-arrow`]:v({position:"absolute",zIndex:1,display:"none",marginInlineStart:l*1.5,transition:`left ${M} ease-out`},Jb(B,L,k,z,o)),[`${t}-panel-container`]:{overflow:"hidden",verticalAlign:"top",background:z,borderRadius:H,boxShadow:j,transition:`margin ${M}`,[`${t}-panel-layout`]:{display:"flex",flexWrap:"nowrap",alignItems:"stretch"},[`${t}-presets`]:{display:"flex",flexDirection:"column",minWidth:te,maxWidth:U,ul:{height:0,flex:"auto",listStyle:"none",overflow:"auto",margin:0,padding:x,borderInlineEnd:`${s}px ${c} ${Z}`,li:v(v({},Zt),{borderRadius:Y,paddingInline:x,paddingBlock:(S-Math.round(i*P))/2,cursor:"pointer",transition:`all ${M}`,"+ li":{marginTop:C},"&:hover":{background:G}})}},[`${t}-panels`]:{display:"inline-flex",flexWrap:"nowrap",direction:"ltr",[`${t}-panel`]:{borderWidth:`0 0 ${s}px`},"&:last-child":{[`${t}-panel`]:{borderWidth:0}}},[`${t}-panel`]:{verticalAlign:"top",background:"transparent",borderRadius:0,borderWidth:0,[`${t}-content, + table`]:{textAlign:"center"},"&-focused":{borderColor:u}}}}),"&-dropdown-range":{padding:`${B*2/3}px 0`,"&-hidden":{display:"none"}},"&-rtl":{direction:"rtl",[`${t}-separator`]:{transform:"rotate(180deg)"},[`${t}-footer`]:{"&-extra":{direction:"rtl"}}}})},Br(e,"slide-up"),Br(e,"slide-down"),ps(e,"move-up"),ps(e,"move-down")]},XT=e=>{const{componentCls:n,controlHeightLG:o,controlHeightSM:r,colorPrimary:i,paddingXXS:l}=e;return{pickerCellCls:`${n}-cell`,pickerCellInnerCls:`${n}-cell-inner`,pickerTextHeight:o,pickerPanelCellWidth:r*1.5,pickerPanelCellHeight:r,pickerDateHoverRangeBorderColor:new vt(i).lighten(20).toHexString(),pickerBasicCellHoverWithRangeColor:new vt(i).lighten(35).toHexString(),pickerPanelWithoutTimeCellHeight:o*1.65,pickerYearMonthCellWidth:o*1.5,pickerTimePanelColumnHeight:28*8,pickerTimePanelColumnWidth:o*1.4,pickerTimePanelCellHeight:28,pickerQuarterPanelContentHeight:o*1.4,pickerCellPaddingVertical:l,pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconBorderWidth:1.5}},YT=Xe("DatePicker",e=>{const t=Fe(ha(e),XT(e));return[VY(t),jY(t),Os(e,{focusElCls:`${e.componentCls}-focused`})]},e=>({presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50})),WY=e=>{const{calendarCls:t,componentCls:n,calendarFullBg:o,calendarFullPanelBg:r,calendarItemActiveBg:i}=e;return{[t]:v(v(v({},GT(e)),Ze(e)),{background:o,"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",justifyContent:"flex-end",padding:`${e.paddingSM}px 0`,[`${t}-year-select`]:{minWidth:e.yearControlWidth},[`${t}-month-select`]:{minWidth:e.monthControlWidth,marginInlineStart:e.marginXS},[`${t}-mode-switch`]:{marginInlineStart:e.marginXS}}}),[`${t} ${n}-panel`]:{background:r,border:0,borderTop:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,borderRadius:0,[`${n}-month-panel, ${n}-date-panel`]:{width:"auto"},[`${n}-body`]:{padding:`${e.paddingXS}px 0`},[`${n}-content`]:{width:"100%"}},[`${t}-mini`]:{borderRadius:e.borderRadiusLG,[`${t}-header`]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS},[`${n}-panel`]:{borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},[`${n}-content`]:{height:e.miniContentHeight,th:{height:"auto",padding:0,lineHeight:`${e.weekHeight}px`}},[`${n}-cell::before`]:{pointerEvents:"none"}},[`${t}${t}-full`]:{[`${n}-panel`]:{display:"block",width:"100%",textAlign:"end",background:o,border:0,[`${n}-body`]:{"th, td":{padding:0},th:{height:"auto",paddingInlineEnd:e.paddingSM,paddingBottom:e.paddingXXS,lineHeight:`${e.weekHeight}px`}}},[`${n}-cell`]:{"&::before":{display:"none"},"&:hover":{[`${t}-date`]:{background:e.controlItemBgHover}},[`${t}-date-today::before`]:{display:"none"},[`&-in-view${n}-cell-selected`]:{[`${t}-date, ${t}-date-today`]:{background:i}},"&-selected, &-selected:hover":{[`${t}-date, ${t}-date-today`]:{[`${t}-date-value`]:{color:e.colorPrimary}}}},[`${t}-date`]:{display:"block",width:"auto",height:"auto",margin:`0 ${e.marginXS/2}px`,padding:`${e.paddingXS/2}px ${e.paddingXS}px 0`,border:0,borderTop:`${e.lineWidthBold}px ${e.lineType} ${e.colorSplit}`,borderRadius:0,transition:`background ${e.motionDurationSlow}`,"&-value":{lineHeight:`${e.dateValueHeight}px`,transition:`color ${e.motionDurationSlow}`},"&-content":{position:"static",width:"auto",height:e.dateContentHeight,overflowY:"auto",color:e.colorText,lineHeight:e.lineHeight,textAlign:"start"},"&-today":{borderColor:e.colorPrimary,[`${t}-date-value`]:{color:e.colorText}}}},[`@media only screen and (max-width: ${e.screenXS}px) `]:{[`${t}`]:{[`${t}-header`]:{display:"block",[`${t}-year-select`]:{width:"50%"},[`${t}-month-select`]:{width:`calc(50% - ${e.paddingXS}px)`},[`${t}-mode-switch`]:{width:"100%",marginTop:e.marginXS,marginInlineStart:0,"> label":{width:"50%",textAlign:"center"}}}}}}},KY=Xe("Calendar",e=>{const t=`${e.componentCls}-calendar`,n=Fe(ha(e),XT(e),{calendarCls:t,pickerCellInnerCls:`${e.componentCls}-cell-inner`,calendarFullBg:e.colorBgContainer,calendarFullPanelBg:e.colorBgContainer,calendarItemActiveBg:e.controlItemBgActive,dateValueHeight:e.controlHeightSM,weekHeight:e.controlHeightSM*.75,dateContentHeight:(e.fontSizeSM*e.lineHeightSM+e.marginXS)*3+e.lineWidth*2});return[WY(n)]},{yearControlWidth:80,monthControlWidth:70,miniContentHeight:256});function UY(e){function t(i,l){return i&&l&&e.getYear(i)===e.getYear(l)}function n(i,l){return t(i,l)&&e.getMonth(i)===e.getMonth(l)}function o(i,l){return n(i,l)&&e.getDate(i)===e.getDate(l)}const r=re({name:"ACalendar",inheritAttrs:!1,props:{prefixCls:String,locale:{type:Object,default:void 0},validRange:{type:Array,default:void 0},disabledDate:{type:Function,default:void 0},dateFullCellRender:{type:Function,default:void 0},dateCellRender:{type:Function,default:void 0},monthFullCellRender:{type:Function,default:void 0},monthCellRender:{type:Function,default:void 0},headerRender:{type:Function,default:void 0},value:{type:[Object,String],default:void 0},defaultValue:{type:[Object,String],default:void 0},mode:{type:String,default:void 0},fullscreen:{type:Boolean,default:void 0},onChange:{type:Function,default:void 0},"onUpdate:value":{type:Function,default:void 0},onPanelChange:{type:Function,default:void 0},onSelect:{type:Function,default:void 0},valueFormat:{type:String,default:void 0}},slots:Object,setup(i,l){let{emit:a,slots:s,attrs:c}=l;const u=i,{prefixCls:d,direction:f}=Ee("picker",u),[h,m]=KY(d),g=I(()=>`${d.value}-calendar`),y=_=>u.valueFormat?e.toString(_,u.valueFormat):_,b=I(()=>u.value?u.valueFormat?e.toDate(u.value,u.valueFormat):u.value:u.value===""?void 0:u.value),S=I(()=>u.defaultValue?u.valueFormat?e.toDate(u.defaultValue,u.valueFormat):u.defaultValue:u.defaultValue===""?void 0:u.defaultValue),[$,x]=Mt(()=>b.value||e.getNow(),{defaultValue:S.value,value:b}),[C,O]=Mt("month",{value:We(u,"mode")}),w=I(()=>C.value==="year"?"month":"date"),P=I(()=>_=>{var N;return(u.validRange?e.isAfter(u.validRange[0],_)||e.isAfter(_,u.validRange[1]):!1)||!!(!((N=u.disabledDate)===null||N===void 0)&&N.call(u,_))}),T=(_,N)=>{a("panelChange",y(_),N)},M=_=>{if(x(_),!o(_,$.value)){(w.value==="date"&&!n(_,$.value)||w.value==="month"&&!t(_,$.value))&&T(_,C.value);const N=y(_);a("update:value",N),a("change",N)}},E=_=>{O(_),T($.value,_)},A=(_,N)=>{M(_),a("select",y(_),{source:N})},R=I(()=>{const{locale:_}=u,N=v(v({},Fc),_);return N.lang=v(v({},N.lang),(_||{}).lang),N}),[F]=Zo("Calendar",R);return()=>{const _=e.getNow(),{dateFullCellRender:N=s==null?void 0:s.dateFullCellRender,dateCellRender:B=s==null?void 0:s.dateCellRender,monthFullCellRender:L=s==null?void 0:s.monthFullCellRender,monthCellRender:k=s==null?void 0:s.monthCellRender,headerRender:z=s==null?void 0:s.headerRender,fullscreen:H=!0,validRange:j}=u,Y=G=>{let{current:te}=G;return N?N({current:te}):p("div",{class:ce(`${d.value}-cell-inner`,`${g.value}-date`,{[`${g.value}-date-today`]:o(_,te)})},[p("div",{class:`${g.value}-date-value`},[String(e.getDate(te)).padStart(2,"0")]),p("div",{class:`${g.value}-date-content`},[B&&B({current:te})])])},Z=(G,te)=>{let{current:U}=G;if(L)return L({current:U});const Q=te.shortMonths||e.locale.getShortMonths(te.locale);return p("div",{class:ce(`${d.value}-cell-inner`,`${g.value}-date`,{[`${g.value}-date-today`]:n(_,U)})},[p("div",{class:`${g.value}-date-value`},[Q[e.getMonth(U)]]),p("div",{class:`${g.value}-date-content`},[k&&k({current:U})])])};return h(p("div",D(D({},c),{},{class:ce(g.value,{[`${g.value}-full`]:H,[`${g.value}-mini`]:!H,[`${g.value}-rtl`]:f.value==="rtl"},c.class,m.value)}),[z?z({value:$.value,type:C.value,onChange:G=>{A(G,"customize")},onTypeChange:E}):p(DY,{prefixCls:g.value,value:$.value,generateConfig:e,mode:C.value,fullscreen:H,locale:F.value.lang,validRange:j,onChange:A,onModeChange:E},null),p(T1,{value:$.value,prefixCls:d.value,locale:F.value.lang,generateConfig:e,dateRender:Y,monthCellRender:G=>Z(G,F.value.lang),onSelect:G=>{A(G,w.value)},mode:w.value,picker:w.value,disabledDate:P.value,hideHeader:!0},null)]))}}});return r.install=function(i){return i.component(r.name,r),i},r}const GY=UY(c1),XY=At(GY);function YY(e){const t=oe(),n=oe(!1);function o(){for(var r=arguments.length,i=new Array(r),l=0;l{e(...i)}))}return tt(()=>{n.value=!0,Qe.cancel(t.value)}),o}function qY(e){const t=oe([]),n=oe(typeof e=="function"?e():e),o=YY(()=>{let i=n.value;t.value.forEach(l=>{i=l(i)}),t.value=[],n.value=i});function r(i){t.value.push(i),o()}return[n,r]}const ZY=re({compatConfig:{MODE:3},name:"TabNode",props:{id:{type:String},prefixCls:{type:String},tab:{type:Object},active:{type:Boolean},closable:{type:Boolean},editable:{type:Object},onClick:{type:Function},onResize:{type:Function},renderWrapper:{type:Function},removeAriaLabel:{type:String},onFocus:{type:Function}},emits:["click","resize","remove","focus"],setup(e,t){let{expose:n,attrs:o}=t;const r=ie();function i(s){var c;!((c=e.tab)===null||c===void 0)&&c.disabled||e.onClick(s)}n({domRef:r});function l(s){var c;s.preventDefault(),s.stopPropagation(),e.editable.onEdit("remove",{key:(c=e.tab)===null||c===void 0?void 0:c.key,event:s})}const a=I(()=>{var s;return e.editable&&e.closable!==!1&&!(!((s=e.tab)===null||s===void 0)&&s.disabled)});return()=>{var s;const{prefixCls:c,id:u,active:d,tab:{key:f,tab:h,disabled:m,closeIcon:g},renderWrapper:y,removeAriaLabel:b,editable:S,onFocus:$}=e,x=`${c}-tab`,C=p("div",{key:f,ref:r,class:ce(x,{[`${x}-with-remove`]:a.value,[`${x}-active`]:d,[`${x}-disabled`]:m}),style:o.style,onClick:i},[p("div",{role:"tab","aria-selected":d,id:u&&`${u}-tab-${f}`,class:`${x}-btn`,"aria-controls":u&&`${u}-panel-${f}`,"aria-disabled":m,tabindex:m?null:0,onClick:O=>{O.stopPropagation(),i(O)},onKeydown:O=>{[Ie.SPACE,Ie.ENTER].includes(O.which)&&(O.preventDefault(),i(O))},onFocus:$},[typeof h=="function"?h():h]),a.value&&p("button",{type:"button","aria-label":b||"remove",tabindex:0,class:`${x}-remove`,onClick:O=>{O.stopPropagation(),l(O)}},[(g==null?void 0:g())||((s=S.removeIcon)===null||s===void 0?void 0:s.call(S))||"×"])]);return y?y(C):C}}}),jw={width:0,height:0,left:0,top:0};function JY(e,t){const n=ie(new Map);return je(()=>{var o,r;const i=new Map,l=e.value,a=t.value.get((o=l[0])===null||o===void 0?void 0:o.key)||jw,s=a.left+a.width;for(let c=0;c{const{prefixCls:i,editable:l,locale:a}=e;return!l||l.showAdd===!1?null:p("button",{ref:r,type:"button",class:`${i}-nav-add`,style:o.style,"aria-label":(a==null?void 0:a.addAriaLabel)||"Add tab",onClick:s=>{l.onEdit("add",{event:s})}},[l.addIcon?l.addIcon():"+"])}}}),QY={prefixCls:{type:String},id:{type:String},tabs:{type:Object},rtl:{type:Boolean},tabBarGutter:{type:Number},activeKey:{type:[String,Number]},mobile:{type:Boolean},moreIcon:W.any,moreTransitionName:{type:String},editable:{type:Object},locale:{type:Object,default:void 0},removeAriaLabel:String,onTabClick:{type:Function},popupClassName:String,getPopupContainer:ve()},eq=re({compatConfig:{MODE:3},name:"OperationNode",inheritAttrs:!1,props:QY,emits:["tabClick"],slots:Object,setup(e,t){let{attrs:n,slots:o}=t;const[r,i]=St(!1),[l,a]=St(null),s=h=>{const m=e.tabs.filter(b=>!b.disabled);let g=m.findIndex(b=>b.key===l.value)||0;const y=m.length;for(let b=0;b{const{which:m}=h;if(!r.value){[Ie.DOWN,Ie.SPACE,Ie.ENTER].includes(m)&&(i(!0),h.preventDefault());return}switch(m){case Ie.UP:s(-1),h.preventDefault();break;case Ie.DOWN:s(1),h.preventDefault();break;case Ie.ESC:i(!1);break;case Ie.SPACE:case Ie.ENTER:l.value!==null&&e.onTabClick(l.value,h);break}},u=I(()=>`${e.id}-more-popup`),d=I(()=>l.value!==null?`${u.value}-${l.value}`:null),f=(h,m)=>{h.preventDefault(),h.stopPropagation(),e.editable.onEdit("remove",{key:m,event:h})};return Ue(()=>{Se(l,()=>{const h=document.getElementById(d.value);h&&h.scrollIntoView&&h.scrollIntoView(!1)},{flush:"post",immediate:!0})}),Se(r,()=>{r.value||a(null)}),i1({}),()=>{var h;const{prefixCls:m,id:g,tabs:y,locale:b,mobile:S,moreIcon:$=((h=o.moreIcon)===null||h===void 0?void 0:h.call(o))||p(Cu,null,null),moreTransitionName:x,editable:C,tabBarGutter:O,rtl:w,onTabClick:P,popupClassName:T}=e;if(!y.length)return null;const M=`${m}-dropdown`,E=b==null?void 0:b.dropdownAriaLabel,A={[w?"marginRight":"marginLeft"]:O};y.length||(A.visibility="hidden",A.order=1);const R=ce({[`${M}-rtl`]:w,[`${T}`]:!0}),F=S?null:p(FI,{prefixCls:M,trigger:["hover"],visible:r.value,transitionName:x,onVisibleChange:i,overlayClassName:R,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:e.getPopupContainer},{overlay:()=>p(Xt,{onClick:_=>{let{key:N,domEvent:B}=_;P(N,B),i(!1)},id:u.value,tabindex:-1,role:"listbox","aria-activedescendant":d.value,selectedKeys:[l.value],"aria-label":E!==void 0?E:"expanded dropdown"},{default:()=>[y.map(_=>{var N,B;const L=C&&_.closable!==!1&&!_.disabled;return p(Rr,{key:_.key,id:`${u.value}-${_.key}`,role:"option","aria-controls":g&&`${g}-panel-${_.key}`,disabled:_.disabled},{default:()=>[p("span",null,[typeof _.tab=="function"?_.tab():_.tab]),L&&p("button",{type:"button","aria-label":e.removeAriaLabel||"remove",tabindex:0,class:`${M}-menu-item-remove`,onClick:k=>{k.stopPropagation(),f(k,_.key)}},[((N=_.closeIcon)===null||N===void 0?void 0:N.call(_))||((B=C.removeIcon)===null||B===void 0?void 0:B.call(C))||"×"])]})})]}),default:()=>p("button",{type:"button",class:`${m}-nav-more`,style:A,tabindex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":u.value,id:`${g}-more`,"aria-expanded":r.value,onKeydown:c},[$])});return p("div",{class:ce(`${m}-nav-operations`,n.class),style:n.style},[F,p(qT,{prefixCls:m,locale:b,editable:C},null)])}}}),ZT=Symbol("tabsContextKey"),tq=e=>{qe(ZT,e)},JT=()=>Ke(ZT,{tabs:ie([]),prefixCls:ie()}),nq=.1,Vw=.01,Wd=20,Ww=Math.pow(.995,Wd);function oq(e,t){const[n,o]=St(),[r,i]=St(0),[l,a]=St(0),[s,c]=St(),u=ie();function d(C){const{screenX:O,screenY:w}=C.touches[0];o({x:O,y:w}),clearInterval(u.value)}function f(C){if(!n.value)return;C.preventDefault();const{screenX:O,screenY:w}=C.touches[0],P=O-n.value.x,T=w-n.value.y;t(P,T),o({x:O,y:w});const M=Date.now();a(M-r.value),i(M),c({x:P,y:T})}function h(){if(!n.value)return;const C=s.value;if(o(null),c(null),C){const O=C.x/l.value,w=C.y/l.value,P=Math.abs(O),T=Math.abs(w);if(Math.max(P,T){if(Math.abs(M)M?(P=O,m.value="x"):(P=w,m.value="y"),t(-P,-P)&&C.preventDefault()}const y=ie({onTouchStart:d,onTouchMove:f,onTouchEnd:h,onWheel:g});function b(C){y.value.onTouchStart(C)}function S(C){y.value.onTouchMove(C)}function $(C){y.value.onTouchEnd(C)}function x(C){y.value.onWheel(C)}Ue(()=>{var C,O;document.addEventListener("touchmove",S,{passive:!1}),document.addEventListener("touchend",$,{passive:!1}),(C=e.value)===null||C===void 0||C.addEventListener("touchstart",b,{passive:!1}),(O=e.value)===null||O===void 0||O.addEventListener("wheel",x,{passive:!1})}),tt(()=>{document.removeEventListener("touchmove",S),document.removeEventListener("touchend",$)})}function Kw(e,t){const n=ie(e);function o(r){const i=typeof r=="function"?r(n.value):r;i!==n.value&&t(i,n.value),n.value=i}return[n,o]}const N1=()=>{const e=ie(new Map),t=n=>o=>{e.value.set(n,o)};return eh(()=>{e.value=new Map}),[t,e]},Uw={width:0,height:0,left:0,top:0,right:0},rq=()=>({id:{type:String},tabPosition:{type:String},activeKey:{type:[String,Number]},rtl:{type:Boolean},animated:Ne(),editable:Ne(),moreIcon:W.any,moreTransitionName:{type:String},mobile:{type:Boolean},tabBarGutter:{type:Number},renderTabBar:{type:Function},locale:Ne(),popupClassName:String,getPopupContainer:ve(),onTabClick:{type:Function},onTabScroll:{type:Function}}),iq=(e,t)=>{const{offsetWidth:n,offsetHeight:o,offsetTop:r,offsetLeft:i}=e,{width:l,height:a,x:s,y:c}=e.getBoundingClientRect();return Math.abs(l-n)<1?[l,a,s-t.x,c-t.y]:[n,o,i,r]},Gw=re({compatConfig:{MODE:3},name:"TabNavList",inheritAttrs:!1,props:rq(),slots:Object,emits:["tabClick","tabScroll"],setup(e,t){let{attrs:n,slots:o}=t;const{tabs:r,prefixCls:i}=JT(),l=oe(),a=oe(),s=oe(),c=oe(),[u,d]=N1(),f=I(()=>e.tabPosition==="top"||e.tabPosition==="bottom"),[h,m]=Kw(0,(ne,se)=>{f.value&&e.onTabScroll&&e.onTabScroll({direction:ne>se?"left":"right"})}),[g,y]=Kw(0,(ne,se)=>{!f.value&&e.onTabScroll&&e.onTabScroll({direction:ne>se?"top":"bottom"})}),[b,S]=St(0),[$,x]=St(0),[C,O]=St(null),[w,P]=St(null),[T,M]=St(0),[E,A]=St(0),[R,F]=qY(new Map),_=JY(r,R),N=I(()=>`${i.value}-nav-operations-hidden`),B=oe(0),L=oe(0);je(()=>{f.value?e.rtl?(B.value=0,L.value=Math.max(0,b.value-C.value)):(B.value=Math.min(0,C.value-b.value),L.value=0):(B.value=Math.min(0,w.value-$.value),L.value=0)});const k=ne=>neL.value?L.value:ne,z=oe(),[H,j]=St(),Y=()=>{j(Date.now())},Z=()=>{clearTimeout(z.value)},G=(ne,se)=>{ne(pe=>k(pe+se))};oq(l,(ne,se)=>{if(f.value){if(C.value>=b.value)return!1;G(m,ne)}else{if(w.value>=$.value)return!1;G(y,se)}return Z(),Y(),!0}),Se(H,()=>{Z(),H.value&&(z.value=setTimeout(()=>{j(0)},100))});const te=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activeKey;const se=_.value.get(ne)||{width:0,height:0,left:0,right:0,top:0};if(f.value){let pe=h.value;e.rtl?se.righth.value+C.value&&(pe=se.right+se.width-C.value):se.left<-h.value?pe=-se.left:se.left+se.width>-h.value+C.value&&(pe=-(se.left+se.width-C.value)),y(0),m(k(pe))}else{let pe=g.value;se.top<-g.value?pe=-se.top:se.top+se.height>-g.value+w.value&&(pe=-(se.top+se.height-w.value)),m(0),y(k(pe))}},U=oe(0),Q=oe(0);je(()=>{let ne,se,pe,he,ge,be;const xe=_.value;["top","bottom"].includes(e.tabPosition)?(ne="width",he=C.value,ge=b.value,be=T.value,se=e.rtl?"right":"left",pe=Math.abs(h.value)):(ne="height",he=w.value,ge=b.value,be=E.value,se="top",pe=-g.value);let fe=he;ge+be>he&&gepe+fe){Oe=Re-1;break}}let Te=0;for(let Re=ye-1;Re>=0;Re-=1)if((xe.get(de[Re].key)||Uw)[se]{F(()=>{var ne;const se=new Map,pe=(ne=a.value)===null||ne===void 0?void 0:ne.getBoundingClientRect();return r.value.forEach(he=>{let{key:ge}=he;const be=d.value.get(ge),xe=(be==null?void 0:be.$el)||be;if(xe){const[fe,de,ye,Oe]=iq(xe,pe);se.set(ge,{width:fe,height:de,left:ye,top:Oe})}}),se})};Se(()=>r.value.map(ne=>ne.key).join("%%"),()=>{J()},{flush:"post"});const X=()=>{var ne,se,pe,he,ge;const be=((ne=l.value)===null||ne===void 0?void 0:ne.offsetWidth)||0,xe=((se=l.value)===null||se===void 0?void 0:se.offsetHeight)||0,fe=((pe=c.value)===null||pe===void 0?void 0:pe.$el)||{},de=fe.offsetWidth||0,ye=fe.offsetHeight||0;O(be),P(xe),M(de),A(ye);const Oe=(((he=a.value)===null||he===void 0?void 0:he.offsetWidth)||0)-de,Te=(((ge=a.value)===null||ge===void 0?void 0:ge.offsetHeight)||0)-ye;S(Oe),x(Te),J()},q=I(()=>[...r.value.slice(0,U.value),...r.value.slice(Q.value+1)]),[V,K]=St(),ee=I(()=>_.value.get(e.activeKey)),ue=oe(),ae=()=>{Qe.cancel(ue.value)};Se([ee,f,()=>e.rtl],()=>{const ne={};ee.value&&(f.value?(e.rtl?ne.right=$l(ee.value.right):ne.left=$l(ee.value.left),ne.width=$l(ee.value.width)):(ne.top=$l(ee.value.top),ne.height=$l(ee.value.height))),ae(),ue.value=Qe(()=>{K(ne)})}),Se([()=>e.activeKey,ee,_,f],()=>{te()},{flush:"post"}),Se([()=>e.rtl,()=>e.tabBarGutter,()=>e.activeKey,()=>r.value],()=>{X()},{flush:"post"});const le=ne=>{let{position:se,prefixCls:pe,extra:he}=ne;if(!he)return null;const ge=he==null?void 0:he({position:se});return ge?p("div",{class:`${pe}-extra-content`},[ge]):null};return tt(()=>{Z(),ae()}),()=>{const{id:ne,animated:se,activeKey:pe,rtl:he,editable:ge,locale:be,tabPosition:xe,tabBarGutter:fe,onTabClick:de}=e,{class:ye,style:Oe}=n,Te=i.value,Re=!!q.value.length,$e=`${Te}-nav-wrap`;let we,Pe,Me,De;f.value?he?(Pe=h.value>0,we=h.value+C.value{const{key:st}=ot;return p(ZY,{id:ne,prefixCls:Te,key:st,tab:ot,style:gt===0?void 0:Ae,closable:ot.closable,editable:ge,active:st===pe,removeAriaLabel:be==null?void 0:be.removeAriaLabel,ref:u(st),onClick:mt=>{de(st,mt)},onFocus:()=>{te(st),Y(),l.value&&(he||(l.value.scrollLeft=0),l.value.scrollTop=0)}},o)});return p("div",{role:"tablist",class:ce(`${Te}-nav`,ye),style:Oe,onKeydown:()=>{Y()}},[p(le,{position:"left",prefixCls:Te,extra:o.leftExtra},null),p(Go,{onResize:X},{default:()=>[p("div",{class:ce($e,{[`${$e}-ping-left`]:we,[`${$e}-ping-right`]:Pe,[`${$e}-ping-top`]:Me,[`${$e}-ping-bottom`]:De}),ref:l},[p(Go,{onResize:X},{default:()=>[p("div",{ref:a,class:`${Te}-nav-list`,style:{transform:`translate(${h.value}px, ${g.value}px)`,transition:H.value?"none":void 0}},[ke,p(qT,{ref:c,prefixCls:Te,locale:be,editable:ge,style:v(v({},ke.length===0?void 0:Ae),{visibility:Re?"hidden":null})},null),p("div",{class:ce(`${Te}-ink-bar`,{[`${Te}-ink-bar-animated`]:se.inkBar}),style:V.value},null)])]})])]}),p(eq,D(D({},e),{},{removeAriaLabel:be==null?void 0:be.removeAriaLabel,ref:s,prefixCls:Te,tabs:q.value,class:!Re&&N.value}),_I(o,["moreIcon"])),p(le,{position:"right",prefixCls:Te,extra:o.rightExtra},null),p(le,{position:"right",prefixCls:Te,extra:o.tabBarExtraContent},null)])}}}),lq=re({compatConfig:{MODE:3},name:"TabPanelList",inheritAttrs:!1,props:{activeKey:{type:[String,Number]},id:{type:String},rtl:{type:Boolean},animated:{type:Object,default:void 0},tabPosition:{type:String},destroyInactiveTabPane:{type:Boolean}},setup(e){const{tabs:t,prefixCls:n}=JT();return()=>{const{id:o,activeKey:r,animated:i,tabPosition:l,rtl:a,destroyInactiveTabPane:s}=e,c=i.tabPane,u=n.value,d=t.value.findIndex(f=>f.key===r);return p("div",{class:`${u}-content-holder`},[p("div",{class:[`${u}-content`,`${u}-content-${l}`,{[`${u}-content-animated`]:c}],style:d&&c?{[a?"marginRight":"marginLeft"]:`-${d}00%`}:null},[t.value.map(f=>ht(f.node,{key:f.key,prefixCls:u,tabKey:f.key,id:o,animated:c,active:f.key===r,destroyInactiveTabPane:s}))])])}}});var aq={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};function Xw(e){for(var t=1;t{const{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[Br(e,"slide-up"),Br(e,"slide-down")]]},uq=e=>{const{componentCls:t,tabsCardHorizontalPadding:n,tabsCardHeadBackground:o,tabsCardGutter:r,colorSplit:i}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:o,border:`${e.lineWidth}px ${e.lineType} ${i}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:e.colorPrimary,background:e.colorBgContainer},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:`${r}px`}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:`${r}px`}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${e.borderRadiusLG}px 0 0 ${e.borderRadiusLG}px`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},dq=e=>{const{componentCls:t,tabsHoverColor:n,dropdownEdgeChildVerticalPadding:o}=e;return{[`${t}-dropdown`]:v(v({},Ze(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${o}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":v(v({},Zt),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${e.paddingXXS}px ${e.paddingSM}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},fq=e=>{const{componentCls:t,margin:n,colorSplit:o}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:`0 0 ${n}px 0`,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${e.lineWidth}px ${e.lineType} ${o}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow}, + right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav, + > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:`${n}px`,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:e.controlHeight*1.25,[`${t}-tab`]:{padding:`${e.paddingXS}px ${e.paddingLG}px`,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:`${e.margin}px 0 0 0`},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${e.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-e.lineWidth},borderRight:{_skip_check_:!0,value:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},pq=e=>{const{componentCls:t,padding:n}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXS}px 0`,fontSize:e.fontSize}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${n}px 0`,fontSize:e.fontSizeLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXXS*1.5}px ${n}px`}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${e.borderRadius}px ${e.borderRadius}px`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${e.borderRadius}px ${e.borderRadius}px 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${e.borderRadius}px ${e.borderRadius}px 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${e.borderRadius}px 0 0 ${e.borderRadius}px`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXS}px ${n}px ${e.paddingXXS*1.5}px`}}}}}},hq=e=>{const{componentCls:t,tabsActiveColor:n,tabsHoverColor:o,iconCls:r,tabsHorizontalGutter:i}=e,l=`${t}-tab`;return{[l]:{position:"relative",display:"inline-flex",alignItems:"center",padding:`${e.paddingSM}px 0`,fontSize:`${e.fontSize}px`,background:"transparent",border:0,outline:"none",cursor:"pointer","&-btn, &-remove":v({"&:focus:not(:focus-visible), &:active":{color:n}},pi(e)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-e.marginXXS},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},"&:hover":{color:o},[`&${l}-active ${l}-btn`]:{color:e.colorPrimary,textShadow:e.tabsActiveTextShadow},[`&${l}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${l}-disabled ${l}-btn, &${l}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${l}-remove ${r}`]:{margin:0},[r]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${l} + ${l}`]:{margin:{_skip_check_:!0,value:`0 0 0 ${i}px`}}}},gq=e=>{const{componentCls:t,tabsHorizontalGutter:n,iconCls:o,tabsCardGutter:r}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:`0 0 0 ${n}px`},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[o]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${e.marginSM}px`}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${e.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${e.marginXXS}px`},[o]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:`${r}px`},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},mq=e=>{const{componentCls:t,tabsCardHorizontalPadding:n,tabsCardHeight:o,tabsCardGutter:r,tabsHoverColor:i,tabsActiveColor:l,colorSplit:a}=e;return{[t]:v(v(v(v({},Ze(e)),{display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:v({minWidth:`${o}px`,marginLeft:{_skip_check_:!0,value:`${r}px`},padding:`0 ${e.paddingXS}px`,background:"transparent",border:`${e.lineWidth}px ${e.lineType} ${a}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:i},"&:active, &:focus:not(:focus-visible)":{color:l}},pi(e))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.colorPrimary,pointerEvents:"none"}}),hq(e)),{[`${t}-content`]:{position:"relative",display:"flex",width:"100%","&-animated":{transition:"margin 0.3s"}},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:{outline:"none",flex:"none",width:"100%"}}),[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}},vq=Xe("Tabs",e=>{const t=e.controlHeightLG,n=Fe(e,{tabsHoverColor:e.colorPrimaryHover,tabsActiveColor:e.colorPrimaryActive,tabsCardHorizontalPadding:`${(t-Math.round(e.fontSize*e.lineHeight))/2-e.lineWidth}px ${e.padding}px`,tabsCardHeight:t,tabsCardGutter:e.marginXXS/2,tabsHorizontalGutter:32,tabsCardHeadBackground:e.colorFillAlter,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120});return[pq(n),gq(n),fq(n),dq(n),uq(n),mq(n),cq(n)]},e=>({zIndexPopup:e.zIndexPopupBase+50}));let Yw=0;const QT=()=>({prefixCls:{type:String},id:{type:String},popupClassName:String,getPopupContainer:ve(),activeKey:{type:[String,Number]},defaultActiveKey:{type:[String,Number]},direction:Be(),animated:ze([Boolean,Object]),renderTabBar:ve(),tabBarGutter:{type:Number},tabBarStyle:Ne(),tabPosition:Be(),destroyInactiveTabPane:Ce(),hideAdd:Boolean,type:Be(),size:Be(),centered:Boolean,onEdit:ve(),onChange:ve(),onTabClick:ve(),onTabScroll:ve(),"onUpdate:activeKey":ve(),locale:Ne(),onPrevClick:ve(),onNextClick:ve(),tabBarExtraContent:W.any});function bq(e){return e.map(t=>{if(qt(t)){const n=v({},t.props||{});for(const[f,h]of Object.entries(n))delete n[f],n[vs(f)]=h;const o=t.children||{},r=t.key!==void 0?t.key:void 0,{tab:i=o.tab,disabled:l,forceRender:a,closable:s,animated:c,active:u,destroyInactiveTabPane:d}=n;return v(v({key:r},n),{node:t,closeIcon:o.closeIcon,tab:i,disabled:l===""||l,forceRender:a===""||a,closable:s===""||s,animated:c===""||c,active:u===""||u,destroyInactiveTabPane:d===""||d})}return null}).filter(t=>t)}const yq=re({compatConfig:{MODE:3},name:"InternalTabs",inheritAttrs:!1,props:v(v({},et(QT(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}})),{tabs:ut()}),slots:Object,setup(e,t){let{attrs:n,slots:o}=t;It(e.onPrevClick===void 0&&e.onNextClick===void 0,"Tabs","`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."),It(e.tabBarExtraContent===void 0,"Tabs","`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."),It(o.tabBarExtraContent===void 0,"Tabs","`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");const{prefixCls:r,direction:i,size:l,rootPrefixCls:a,getPopupContainer:s}=Ee("tabs",e),[c,u]=vq(r),d=I(()=>i.value==="rtl"),f=I(()=>{const{animated:w,tabPosition:P}=e;return w===!1||["left","right"].includes(P)?{inkBar:!1,tabPane:!1}:w===!0?{inkBar:!0,tabPane:!0}:v({inkBar:!0,tabPane:!1},typeof w=="object"?w:{})}),[h,m]=St(!1);Ue(()=>{m(Oy())});const[g,y]=Mt(()=>{var w;return(w=e.tabs[0])===null||w===void 0?void 0:w.key},{value:I(()=>e.activeKey),defaultValue:e.defaultActiveKey}),[b,S]=St(()=>e.tabs.findIndex(w=>w.key===g.value));je(()=>{var w;let P=e.tabs.findIndex(T=>T.key===g.value);P===-1&&(P=Math.max(0,Math.min(b.value,e.tabs.length-1)),y((w=e.tabs[P])===null||w===void 0?void 0:w.key)),S(P)});const[$,x]=Mt(null,{value:I(()=>e.id)}),C=I(()=>h.value&&!["left","right"].includes(e.tabPosition)?"top":e.tabPosition);Ue(()=>{e.id||(x(`rc-tabs-${Yw}`),Yw+=1)});const O=(w,P)=>{var T,M;(T=e.onTabClick)===null||T===void 0||T.call(e,w,P);const E=w!==g.value;y(w),E&&((M=e.onChange)===null||M===void 0||M.call(e,w))};return tq({tabs:I(()=>e.tabs),prefixCls:r}),()=>{const{id:w,type:P,tabBarGutter:T,tabBarStyle:M,locale:E,destroyInactiveTabPane:A,renderTabBar:R=o.renderTabBar,onTabScroll:F,hideAdd:_,centered:N}=e,B={id:$.value,activeKey:g.value,animated:f.value,tabPosition:C.value,rtl:d.value,mobile:h.value};let L;P==="editable-card"&&(L={onEdit:(j,Y)=>{let{key:Z,event:G}=Y;var te;(te=e.onEdit)===null||te===void 0||te.call(e,j==="add"?G:Z,j)},removeIcon:()=>p(Kn,null,null),addIcon:o.addIcon?o.addIcon:()=>p(B1,null,null),showAdd:_!==!0});let k;const z=v(v({},B),{moreTransitionName:`${a.value}-slide-up`,editable:L,locale:E,tabBarGutter:T,onTabClick:O,onTabScroll:F,style:M,getPopupContainer:s.value,popupClassName:ce(e.popupClassName,u.value)});R?k=R(v(v({},z),{DefaultTabBar:Gw})):k=p(Gw,z,_I(o,["moreIcon","leftExtra","rightExtra","tabBarExtraContent"]));const H=r.value;return c(p("div",D(D({},n),{},{id:w,class:ce(H,`${H}-${C.value}`,{[u.value]:!0,[`${H}-${l.value}`]:l.value,[`${H}-card`]:["card","editable-card"].includes(P),[`${H}-editable-card`]:P==="editable-card",[`${H}-centered`]:N,[`${H}-mobile`]:h.value,[`${H}-editable`]:P==="editable-card",[`${H}-rtl`]:d.value},n.class)}),[k,p(lq,D(D({destroyInactiveTabPane:A},B),{},{animated:f.value}),null)]))}}}),kl=re({compatConfig:{MODE:3},name:"ATabs",inheritAttrs:!1,props:et(QT(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r}=t;const i=l=>{r("update:activeKey",l),r("change",l)};return()=>{var l;const a=bq(xt((l=o.default)===null||l===void 0?void 0:l.call(o)));return p(yq,D(D(D({},rt(e,["onUpdate:activeKey"])),n),{},{onChange:i,tabs:a}),o)}}}),Sq=()=>({tab:W.any,disabled:{type:Boolean},forceRender:{type:Boolean},closable:{type:Boolean},animated:{type:Boolean},active:{type:Boolean},destroyInactiveTabPane:{type:Boolean},prefixCls:{type:String},tabKey:{type:[String,Number]},id:{type:String}}),mp=re({compatConfig:{MODE:3},name:"ATabPane",inheritAttrs:!1,__ANT_TAB_PANE:!0,props:Sq(),slots:Object,setup(e,t){let{attrs:n,slots:o}=t;const r=ie(e.forceRender);Se([()=>e.active,()=>e.destroyInactiveTabPane],()=>{e.active?r.value=!0:e.destroyInactiveTabPane&&(r.value=!1)},{immediate:!0});const i=I(()=>e.active?{}:e.animated?{visibility:"hidden",height:0,overflowY:"hidden"}:{display:"none"});return()=>{var l;const{prefixCls:a,forceRender:s,id:c,active:u,tabKey:d}=e;return p("div",{id:c&&`${c}-panel-${d}`,role:"tabpanel",tabindex:u?0:-1,"aria-labelledby":c&&`${c}-tab-${d}`,"aria-hidden":!u,style:[i.value,n.style],class:[`${a}-tabpane`,u&&`${a}-tabpane-active`,n.class]},[(u||r.value||s)&&((l=o.default)===null||l===void 0?void 0:l.call(o))])}}});kl.TabPane=mp;kl.install=function(e){return e.component(kl.name,kl),e.component(mp.name,mp),e};const $q=e=>{const{antCls:t,componentCls:n,cardHeadHeight:o,cardPaddingBase:r,cardHeadTabsMarginBottom:i}=e;return v(v({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:o,marginBottom:-1,padding:`0 ${r}px`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,background:"transparent",borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},ur()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":v(v({display:"inline-block",flex:1},Zt),{[` + > ${n}-typography, + > ${n}-typography-edit-content + `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:i,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`}}})},Cq=e=>{const{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:o,lineWidth:r}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` + ${r}px 0 0 0 ${n}, + 0 ${r}px 0 0 ${n}, + ${r}px ${r}px 0 0 ${n}, + ${r}px 0 0 0 ${n} inset, + 0 ${r}px 0 0 ${n} inset; + `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:o}}},xq=e=>{const{componentCls:t,iconCls:n,cardActionsLiMargin:o,cardActionsIconSize:r,colorBorderSecondary:i}=e;return v(v({margin:0,padding:0,listStyle:"none",background:e.colorBgContainer,borderTop:`${e.lineWidth}px ${e.lineType} ${i}`,display:"flex",borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px `},ur()),{"& > li":{margin:o,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.cardActionsIconSize*2,fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorTextDescription,lineHeight:`${e.fontSize*e.lineHeight}px`,transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:r,lineHeight:`${r*e.lineHeight}px`}},"&:not(:last-child)":{borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${i}`}}})},wq=e=>v(v({margin:`-${e.marginXXS}px 0`,display:"flex"},ur()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":v({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},Zt),"&-description":{color:e.colorTextDescription}}),Oq=e=>{const{componentCls:t,cardPaddingBase:n,colorFillAlter:o}=e;return{[`${t}-head`]:{padding:`0 ${n}px`,background:o,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${e.padding}px ${n}px`}}},Pq=e=>{const{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}},Iq=e=>{const{componentCls:t,cardShadow:n,cardHeadPadding:o,colorBorderSecondary:r,boxShadow:i,cardPaddingBase:l}=e;return{[t]:v(v({},Ze(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:i},[`${t}-head`]:$q(e),[`${t}-extra`]:{marginInlineStart:"auto",color:"",fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:v({padding:l,borderRadius:` 0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},ur()),[`${t}-grid`]:Cq(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%"},img:{borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`}},[`${t}-actions`]:xq(e),[`${t}-meta`]:wq(e)}),[`${t}-bordered`]:{border:`${e.lineWidth}px ${e.lineType} ${r}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:-e.lineWidth,marginInlineStart:-e.lineWidth,padding:0}},[`${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:o}}},[`${t}-type-inner`]:Oq(e),[`${t}-loading`]:Pq(e),[`${t}-rtl`]:{direction:"rtl"}}},Tq=e=>{const{componentCls:t,cardPaddingSM:n,cardHeadHeightSM:o}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:o,padding:`0 ${n}px`,fontSize:e.fontSize,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{minHeight:o,paddingTop:0,display:"flex",alignItems:"center"}}}}},Eq=Xe("Card",e=>{const t=Fe(e,{cardShadow:e.boxShadowCard,cardHeadHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,cardHeadHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardHeadTabsMarginBottom:-e.padding-e.lineWidth,cardActionsLiMargin:`${e.paddingSM}px 0`,cardActionsIconSize:e.fontSize,cardPaddingSM:12});return[Iq(t),Tq(t)]}),_q=()=>({prefixCls:String,width:{type:[Number,String]}}),Hh=re({compatConfig:{MODE:3},name:"SkeletonTitle",props:_q(),setup(e){return()=>{const{prefixCls:t,width:n}=e,o=typeof n=="number"?`${n}px`:n;return p("h3",{class:t,style:{width:o}},null)}}}),Mq=()=>({prefixCls:String,width:{type:[Number,String,Array]},rows:Number}),Aq=re({compatConfig:{MODE:3},name:"SkeletonParagraph",props:Mq(),setup(e){const t=n=>{const{width:o,rows:r=2}=e;if(Array.isArray(o))return o[n];if(r-1===n)return o};return()=>{const{prefixCls:n,rows:o}=e,r=[...Array(o)].map((i,l)=>{const a=t(l);return p("li",{key:l,style:{width:typeof a=="number"?`${a}px`:a}},null)});return p("ul",{class:n},[r])}}}),jh=()=>({prefixCls:String,size:[String,Number],shape:String,active:{type:Boolean,default:void 0}}),Iu=e=>{const{prefixCls:t,size:n,shape:o}=e,r=ce({[`${t}-lg`]:n==="large",[`${t}-sm`]:n==="small"}),i=ce({[`${t}-circle`]:o==="circle",[`${t}-square`]:o==="square",[`${t}-round`]:o==="round"}),l=typeof n=="number"?{width:`${n}px`,height:`${n}px`,lineHeight:`${n}px`}:{};return p("span",{class:ce(t,r,i),style:l},null)};Iu.displayName="SkeletonElement";const Rq=new it("ant-skeleton-loading",{"0%":{transform:"translateX(-37.5%)"},"100%":{transform:"translateX(37.5%)"}}),Vh=e=>({height:e,lineHeight:`${e}px`}),Ya=e=>v({width:e},Vh(e)),Dq=e=>({position:"relative",zIndex:0,overflow:"hidden",background:"transparent","&::after":{position:"absolute",top:0,insetInlineEnd:"-150%",bottom:0,insetInlineStart:"-150%",background:e.skeletonLoadingBackground,animationName:Rq,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite",content:'""'}}),Pm=e=>v({width:e*5,minWidth:e*5},Vh(e)),Nq=e=>{const{skeletonAvatarCls:t,color:n,controlHeight:o,controlHeightLG:r,controlHeightSM:i}=e;return{[`${t}`]:v({display:"inline-block",verticalAlign:"top",background:n},Ya(o)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:v({},Ya(r)),[`${t}${t}-sm`]:v({},Ya(i))}},Bq=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:o,controlHeightLG:r,controlHeightSM:i,color:l}=e;return{[`${o}`]:v({display:"inline-block",verticalAlign:"top",background:l,borderRadius:n},Pm(t)),[`${o}-lg`]:v({},Pm(r)),[`${o}-sm`]:v({},Pm(i))}},qw=e=>v({width:e},Vh(e)),Lq=e=>{const{skeletonImageCls:t,imageSizeBase:n,color:o,borderRadiusSM:r}=e;return{[`${t}`]:v(v({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:o,borderRadius:r},qw(n*2)),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:v(v({},qw(n)),{maxWidth:n*4,maxHeight:n*4}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},Im=(e,t,n)=>{const{skeletonButtonCls:o}=e;return{[`${n}${o}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${o}-round`]:{borderRadius:t}}},Tm=e=>v({width:e*2,minWidth:e*2},Vh(e)),kq=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:o,controlHeightLG:r,controlHeightSM:i,color:l}=e;return v(v(v(v(v({[`${n}`]:v({display:"inline-block",verticalAlign:"top",background:l,borderRadius:t,width:o*2,minWidth:o*2},Tm(o))},Im(e,o,n)),{[`${n}-lg`]:v({},Tm(r))}),Im(e,r,`${n}-lg`)),{[`${n}-sm`]:v({},Tm(i))}),Im(e,i,`${n}-sm`))},Fq=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:o,skeletonParagraphCls:r,skeletonButtonCls:i,skeletonInputCls:l,skeletonImageCls:a,controlHeight:s,controlHeightLG:c,controlHeightSM:u,color:d,padding:f,marginSM:h,borderRadius:m,skeletonTitleHeight:g,skeletonBlockRadius:y,skeletonParagraphLineHeight:b,controlHeightXS:S,skeletonParagraphMarginTop:$}=e;return{[`${t}`]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",[`${n}`]:v({display:"inline-block",verticalAlign:"top",background:d},Ya(s)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:v({},Ya(c)),[`${n}-sm`]:v({},Ya(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${o}`]:{width:"100%",height:g,background:d,borderRadius:y,[`+ ${r}`]:{marginBlockStart:u}},[`${r}`]:{padding:0,"> li":{width:"100%",height:b,listStyle:"none",background:d,borderRadius:y,"+ li":{marginBlockStart:S}}},[`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${o}, ${r} > li`]:{borderRadius:m}}},[`${t}-with-avatar ${t}-content`]:{[`${o}`]:{marginBlockStart:h,[`+ ${r}`]:{marginBlockStart:$}}},[`${t}${t}-element`]:v(v(v(v({display:"inline-block",width:"auto"},kq(e)),Nq(e)),Bq(e)),Lq(e)),[`${t}${t}-block`]:{width:"100%",[`${i}`]:{width:"100%"},[`${l}`]:{width:"100%"}},[`${t}${t}-active`]:{[` + ${o}, + ${r} > li, + ${n}, + ${i}, + ${l}, + ${a} + `]:v({},Dq(e))}}},Tu=Xe("Skeleton",e=>{const{componentCls:t}=e,n=Fe(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:e.controlHeight*1.5,skeletonTitleHeight:e.controlHeight/2,skeletonBlockRadius:e.borderRadiusSM,skeletonParagraphLineHeight:e.controlHeight/2,skeletonParagraphMarginTop:e.marginLG+e.marginXXS,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.color} 25%, ${e.colorGradientEnd} 37%, ${e.color} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Fq(n)]},e=>{const{colorFillContent:t,colorFill:n}=e;return{color:t,colorGradientEnd:n}}),zq=()=>({active:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},prefixCls:String,avatar:{type:[Boolean,Object],default:void 0},title:{type:[Boolean,Object],default:void 0},paragraph:{type:[Boolean,Object],default:void 0},round:{type:Boolean,default:void 0}});function Em(e){return e&&typeof e=="object"?e:{}}function Hq(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function jq(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function Vq(e,t){const n={};return(!e||!t)&&(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}const Dn=re({compatConfig:{MODE:3},name:"ASkeleton",props:et(zq(),{avatar:!1,title:!0,paragraph:!0}),setup(e,t){let{slots:n}=t;const{prefixCls:o,direction:r}=Ee("skeleton",e),[i,l]=Tu(o);return()=>{var a;const{loading:s,avatar:c,title:u,paragraph:d,active:f,round:h}=e,m=o.value;if(s||e.loading===void 0){const g=!!c||c==="",y=!!u||u==="",b=!!d||d==="";let S;if(g){const C=v(v({prefixCls:`${m}-avatar`},Hq(y,b)),Em(c));S=p("div",{class:`${m}-header`},[p(Iu,C,null)])}let $;if(y||b){let C;if(y){const w=v(v({prefixCls:`${m}-title`},jq(g,b)),Em(u));C=p(Hh,w,null)}let O;if(b){const w=v(v({prefixCls:`${m}-paragraph`},Vq(g,y)),Em(d));O=p(Aq,w,null)}$=p("div",{class:`${m}-content`},[C,O])}const x=ce(m,{[`${m}-with-avatar`]:g,[`${m}-active`]:f,[`${m}-rtl`]:r.value==="rtl",[`${m}-round`]:h,[l.value]:!0});return i(p("div",{class:x},[S,$]))}return(a=n.default)===null||a===void 0?void 0:a.call(n)}}}),Wq=()=>v(v({},jh()),{size:String,block:Boolean}),L1=re({compatConfig:{MODE:3},name:"ASkeletonButton",props:et(Wq(),{size:"default"}),setup(e){const{prefixCls:t}=Ee("skeleton",e),[n,o]=Tu(t),r=I(()=>ce(t.value,`${t.value}-element`,{[`${t.value}-active`]:e.active,[`${t.value}-block`]:e.block},o.value));return()=>n(p("div",{class:r.value},[p(Iu,D(D({},e),{},{prefixCls:`${t.value}-button`}),null)]))}}),k1=re({compatConfig:{MODE:3},name:"ASkeletonInput",props:v(v({},rt(jh(),["shape"])),{size:String,block:Boolean}),setup(e){const{prefixCls:t}=Ee("skeleton",e),[n,o]=Tu(t),r=I(()=>ce(t.value,`${t.value}-element`,{[`${t.value}-active`]:e.active,[`${t.value}-block`]:e.block},o.value));return()=>n(p("div",{class:r.value},[p(Iu,D(D({},e),{},{prefixCls:`${t.value}-input`}),null)]))}}),Kq="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",F1=re({compatConfig:{MODE:3},name:"ASkeletonImage",props:rt(jh(),["size","shape","active"]),setup(e){const{prefixCls:t}=Ee("skeleton",e),[n,o]=Tu(t),r=I(()=>ce(t.value,`${t.value}-element`,o.value));return()=>n(p("div",{class:r.value},[p("div",{class:`${t.value}-image`},[p("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",class:`${t.value}-image-svg`},[p("path",{d:Kq,class:`${t.value}-image-path`},null)])])]))}}),Uq=()=>v(v({},jh()),{shape:String}),z1=re({compatConfig:{MODE:3},name:"ASkeletonAvatar",props:et(Uq(),{size:"default",shape:"circle"}),setup(e){const{prefixCls:t}=Ee("skeleton",e),[n,o]=Tu(t),r=I(()=>ce(t.value,`${t.value}-element`,{[`${t.value}-active`]:e.active},o.value));return()=>n(p("div",{class:r.value},[p(Iu,D(D({},e),{},{prefixCls:`${t.value}-avatar`}),null)]))}});Dn.Button=L1;Dn.Avatar=z1;Dn.Input=k1;Dn.Image=F1;Dn.Title=Hh;Dn.install=function(e){return e.component(Dn.name,Dn),e.component(Dn.Button.name,L1),e.component(Dn.Avatar.name,z1),e.component(Dn.Input.name,k1),e.component(Dn.Image.name,F1),e.component(Dn.Title.name,Hh),e};const{TabPane:Gq}=kl,Xq=()=>({prefixCls:String,title:W.any,extra:W.any,bordered:{type:Boolean,default:!0},bodyStyle:{type:Object,default:void 0},headStyle:{type:Object,default:void 0},loading:{type:Boolean,default:!1},hoverable:{type:Boolean,default:!1},type:{type:String},size:{type:String},actions:W.any,tabList:{type:Array},tabBarExtraContent:W.any,activeTabKey:String,defaultActiveTabKey:String,cover:W.any,onTabChange:{type:Function}}),qa=re({compatConfig:{MODE:3},name:"ACard",inheritAttrs:!1,props:Xq(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i,size:l}=Ee("card",e),[a,s]=Eq(r),c=f=>f.map((m,g)=>Yt(m)&&!pu(m)||!Yt(m)?p("li",{style:{width:`${100/f.length}%`},key:`action-${g}`},[p("span",null,[m])]):null),u=f=>{var h;(h=e.onTabChange)===null||h===void 0||h.call(e,f)},d=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h;return f.forEach(m=>{m&&Vy(m.type)&&m.type.__ANT_CARD_GRID&&(h=!0)}),h};return()=>{var f,h,m,g,y,b;const{headStyle:S={},bodyStyle:$={},loading:x,bordered:C=!0,type:O,tabList:w,hoverable:P,activeTabKey:T,defaultActiveTabKey:M,tabBarExtraContent:E=Hs((f=n.tabBarExtraContent)===null||f===void 0?void 0:f.call(n)),title:A=Hs((h=n.title)===null||h===void 0?void 0:h.call(n)),extra:R=Hs((m=n.extra)===null||m===void 0?void 0:m.call(n)),actions:F=Hs((g=n.actions)===null||g===void 0?void 0:g.call(n)),cover:_=Hs((y=n.cover)===null||y===void 0?void 0:y.call(n))}=e,N=xt((b=n.default)===null||b===void 0?void 0:b.call(n)),B=r.value,L={[`${B}`]:!0,[s.value]:!0,[`${B}-loading`]:x,[`${B}-bordered`]:C,[`${B}-hoverable`]:!!P,[`${B}-contain-grid`]:d(N),[`${B}-contain-tabs`]:w&&w.length,[`${B}-${l.value}`]:l.value,[`${B}-type-${O}`]:!!O,[`${B}-rtl`]:i.value==="rtl"},k=p(Dn,{loading:!0,active:!0,paragraph:{rows:4},title:!1},{default:()=>[N]}),z=T!==void 0,H={size:"large",[z?"activeKey":"defaultActiveKey"]:z?T:M,onChange:u,class:`${B}-head-tabs`};let j;const Y=w&&w.length?p(kl,H,{default:()=>[w.map(U=>{const{tab:Q,slots:J}=U,X=J==null?void 0:J.tab;It(!J,"Card","tabList slots is deprecated, Please use `customTab` instead.");let q=Q!==void 0?Q:n[X]?n[X](U):null;return q=gh(n,"customTab",U,()=>[q]),p(Gq,{tab:q,key:U.key,disabled:U.disabled},null)})],rightExtra:E?()=>E:null}):null;(A||R||Y)&&(j=p("div",{class:`${B}-head`,style:S},[p("div",{class:`${B}-head-wrapper`},[A&&p("div",{class:`${B}-head-title`},[A]),R&&p("div",{class:`${B}-extra`},[R])]),Y]));const Z=_?p("div",{class:`${B}-cover`},[_]):null,G=p("div",{class:`${B}-body`,style:$},[x?k:N]),te=F&&F.length?p("ul",{class:`${B}-actions`},[c(F)]):null;return a(p("div",D(D({ref:"cardContainerRef"},o),{},{class:[L,o.class]}),[j,Z,N&&N.length?G:null,te]))}}}),Yq=()=>({prefixCls:String,title:Ln(),description:Ln(),avatar:Ln()}),vp=re({compatConfig:{MODE:3},name:"ACardMeta",props:Yq(),slots:Object,setup(e,t){let{slots:n}=t;const{prefixCls:o}=Ee("card",e);return()=>{const r={[`${o.value}-meta`]:!0},i=on(n,e,"avatar"),l=on(n,e,"title"),a=on(n,e,"description"),s=i?p("div",{class:`${o.value}-meta-avatar`},[i]):null,c=l?p("div",{class:`${o.value}-meta-title`},[l]):null,u=a?p("div",{class:`${o.value}-meta-description`},[a]):null,d=c||u?p("div",{class:`${o.value}-meta-detail`},[c,u]):null;return p("div",{class:r},[s,d])}}}),qq=()=>({prefixCls:String,hoverable:{type:Boolean,default:!0}}),bp=re({compatConfig:{MODE:3},name:"ACardGrid",__ANT_CARD_GRID:!0,props:qq(),setup(e,t){let{slots:n}=t;const{prefixCls:o}=Ee("card",e),r=I(()=>({[`${o.value}-grid`]:!0,[`${o.value}-grid-hoverable`]:e.hoverable}));return()=>{var i;return p("div",{class:r.value},[(i=n.default)===null||i===void 0?void 0:i.call(n)])}}});qa.Meta=vp;qa.Grid=bp;qa.install=function(e){return e.component(qa.name,qa),e.component(vp.name,vp),e.component(bp.name,bp),e};const Zq=()=>({prefixCls:String,activeKey:ze([Array,Number,String]),defaultActiveKey:ze([Array,Number,String]),accordion:Ce(),destroyInactivePanel:Ce(),bordered:Ce(),expandIcon:ve(),openAnimation:W.object,expandIconPosition:Be(),collapsible:Be(),ghost:Ce(),onChange:ve(),"onUpdate:activeKey":ve()}),e5=()=>({openAnimation:W.object,prefixCls:String,header:W.any,headerClass:String,showArrow:Ce(),isActive:Ce(),destroyInactivePanel:Ce(),disabled:Ce(),accordion:Ce(),forceRender:Ce(),expandIcon:ve(),extra:W.any,panelKey:ze(),collapsible:Be(),role:String,onItemClick:ve()}),Jq=e=>{const{componentCls:t,collapseContentBg:n,padding:o,collapseContentPaddingHorizontal:r,collapseHeaderBg:i,collapseHeaderPadding:l,collapsePanelBorderRadius:a,lineWidth:s,lineType:c,colorBorder:u,colorText:d,colorTextHeading:f,colorTextDisabled:h,fontSize:m,lineHeight:g,marginSM:y,paddingSM:b,motionDurationSlow:S,fontSizeIcon:$}=e,x=`${s}px ${c} ${u}`;return{[t]:v(v({},Ze(e)),{backgroundColor:i,border:x,borderBottom:0,borderRadius:`${a}px`,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:x,"&:last-child":{[` + &, + & > ${t}-header`]:{borderRadius:`0 0 ${a}px ${a}px`}},[`> ${t}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:l,color:f,lineHeight:g,cursor:"pointer",transition:`all ${S}, visibility 0s`,[`> ${t}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${t}-expand-icon`]:{height:m*g,display:"flex",alignItems:"center",paddingInlineEnd:y},[`${t}-arrow`]:v(v({},ra()),{fontSize:$,svg:{transition:`transform ${S}`}}),[`${t}-header-text`]:{marginInlineEnd:"auto"}},[`${t}-header-collapsible-only`]:{cursor:"default",[`${t}-header-text`]:{flex:"none",cursor:"pointer"},[`${t}-expand-icon`]:{cursor:"pointer"}},[`${t}-icon-collapsible-only`]:{cursor:"default",[`${t}-expand-icon`]:{cursor:"pointer"}},[`&${t}-no-arrow`]:{[`> ${t}-header`]:{paddingInlineStart:b}}},[`${t}-content`]:{color:d,backgroundColor:n,borderTop:x,[`& > ${t}-content-box`]:{padding:`${o}px ${r}px`},"&-hidden":{display:"none"}},[`${t}-item:last-child`]:{[`> ${t}-content`]:{borderRadius:`0 0 ${a}px ${a}px`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:h,cursor:"not-allowed"}},[`&${t}-icon-position-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:y}}}}})}},Qq=e=>{const{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow svg`;return{[`${t}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},eZ=e=>{const{componentCls:t,collapseHeaderBg:n,paddingXXS:o,colorBorder:r}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${r}`},[` + > ${t}-item:last-child, + > ${t}-item:last-child ${t}-header + `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${t}-item > ${t}-content > ${t}-content-box`]:{paddingTop:o}}}},tZ=e=>{const{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-content`]:{backgroundColor:"transparent",border:0,[`> ${t}-content-box`]:{paddingBlock:n}}}}}},nZ=Xe("Collapse",e=>{const t=Fe(e,{collapseContentBg:e.colorBgContainer,collapseHeaderBg:e.colorFillAlter,collapseHeaderPadding:`${e.paddingSM}px ${e.padding}px`,collapsePanelBorderRadius:e.borderRadiusLG,collapseContentPaddingHorizontal:16});return[Jq(t),eZ(t),tZ(t),Qq(t),yu(t)]});function Zw(e){let t=e;if(!Array.isArray(t)){const n=typeof t;t=n==="number"||n==="string"?[t]:[]}return t.map(n=>String(n))}const $c=re({compatConfig:{MODE:3},name:"ACollapse",inheritAttrs:!1,props:et(Zq(),{accordion:!1,destroyInactivePanel:!1,bordered:!0,expandIconPosition:"start"}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r}=t;const i=ie(Zw(np([e.activeKey,e.defaultActiveKey])));Se(()=>e.activeKey,()=>{i.value=Zw(e.activeKey)},{deep:!0});const{prefixCls:l,direction:a,rootPrefixCls:s}=Ee("collapse",e),[c,u]=nZ(l),d=I(()=>{const{expandIconPosition:b}=e;return b!==void 0?b:a.value==="rtl"?"end":"start"}),f=b=>{const{expandIcon:S=o.expandIcon}=e,$=S?S(b):p(Ao,{rotate:b.isActive?90:void 0},null);return p("div",{class:[`${l.value}-expand-icon`,u.value],onClick:()=>["header","icon"].includes(e.collapsible)&&m(b.panelKey)},[qt(Array.isArray(S)?$[0]:$)?ht($,{class:`${l.value}-arrow`},!1):$])},h=b=>{e.activeKey===void 0&&(i.value=b);const S=e.accordion?b[0]:b;r("update:activeKey",S),r("change",S)},m=b=>{let S=i.value;if(e.accordion)S=S[0]===b?[]:[b];else{S=[...S];const $=S.indexOf(b);$>-1?S.splice($,1):S.push(b)}h(S)},g=(b,S)=>{var $,x,C;if(pu(b))return;const O=i.value,{accordion:w,destroyInactivePanel:P,collapsible:T,openAnimation:M}=e,E=M||xu(`${s.value}-motion-collapse`),A=String(($=b.key)!==null&&$!==void 0?$:S),{header:R=(C=(x=b.children)===null||x===void 0?void 0:x.header)===null||C===void 0?void 0:C.call(x),headerClass:F,collapsible:_,disabled:N}=b.props||{};let B=!1;w?B=O[0]===A:B=O.indexOf(A)>-1;let L=_??T;(N||N==="")&&(L="disabled");const k={key:A,panelKey:A,header:R,headerClass:F,isActive:B,prefixCls:l.value,destroyInactivePanel:P,openAnimation:E,accordion:w,onItemClick:L==="disabled"?null:m,expandIcon:f,collapsible:L};return ht(b,k)},y=()=>{var b;return xt((b=o.default)===null||b===void 0?void 0:b.call(o)).map(g)};return()=>{const{accordion:b,bordered:S,ghost:$}=e,x=ce(l.value,{[`${l.value}-borderless`]:!S,[`${l.value}-icon-position-${d.value}`]:!0,[`${l.value}-rtl`]:a.value==="rtl",[`${l.value}-ghost`]:!!$,[n.class]:!!n.class},u.value);return c(p("div",D(D({class:x},gD(n)),{},{style:n.style,role:b?"tablist":null}),[y()]))}}}),oZ=re({compatConfig:{MODE:3},name:"PanelContent",props:e5(),setup(e,t){let{slots:n}=t;const o=oe(!1);return je(()=>{(e.isActive||e.forceRender)&&(o.value=!0)}),()=>{var r;if(!o.value)return null;const{prefixCls:i,isActive:l,role:a}=e;return p("div",{class:ce(`${i}-content`,{[`${i}-content-active`]:l,[`${i}-content-inactive`]:!l}),role:a},[p("div",{class:`${i}-content-box`},[(r=n.default)===null||r===void 0?void 0:r.call(n)])])}}}),yp=re({compatConfig:{MODE:3},name:"ACollapsePanel",inheritAttrs:!1,props:et(e5(),{showArrow:!0,isActive:!1,onItemClick(){},headerClass:"",forceRender:!1}),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r}=t;It(e.disabled===void 0,"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');const{prefixCls:i}=Ee("collapse",e),l=()=>{o("itemClick",e.panelKey)},a=s=>{(s.key==="Enter"||s.keyCode===13||s.which===13)&&l()};return()=>{var s,c;const{header:u=(s=n.header)===null||s===void 0?void 0:s.call(n),headerClass:d,isActive:f,showArrow:h,destroyInactivePanel:m,accordion:g,forceRender:y,openAnimation:b,expandIcon:S=n.expandIcon,extra:$=(c=n.extra)===null||c===void 0?void 0:c.call(n),collapsible:x}=e,C=x==="disabled",O=i.value,w=ce(`${O}-header`,{[d]:d,[`${O}-header-collapsible-only`]:x==="header",[`${O}-icon-collapsible-only`]:x==="icon"}),P=ce({[`${O}-item`]:!0,[`${O}-item-active`]:f,[`${O}-item-disabled`]:C,[`${O}-no-arrow`]:!h,[`${r.class}`]:!!r.class});let T=p("i",{class:"arrow"},null);h&&typeof S=="function"&&(T=S(e));const M=_n(p(oZ,{prefixCls:O,isActive:f,forceRender:y,role:g?"tabpanel":null},{default:n.default}),[[oo,f]]),E=v({appear:!1,css:!1},b);return p("div",D(D({},r),{},{class:P}),[p("div",{class:w,onClick:()=>!["header","icon"].includes(x)&&l(),role:g?"tab":"button",tabindex:C?-1:0,"aria-expanded":f,onKeypress:a},[h&&T,p("span",{onClick:()=>x==="header"&&l(),class:`${O}-header-text`},[u]),$&&p("div",{class:`${O}-extra`},[$])]),p(rn,E,{default:()=>[!m||f?M:null]})])}}});$c.Panel=yp;$c.install=function(e){return e.component($c.name,$c),e.component(yp.name,yp),e};const rZ=function(e){return e.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()}).toLowerCase()},iZ=function(e){return/[height|width]$/.test(e)},Jw=function(e){let t="";const n=Object.keys(e);return n.forEach(function(o,r){let i=e[o];o=rZ(o),iZ(o)&&typeof i=="number"&&(i=i+"px"),i===!0?t+=o:i===!1?t+="not "+o:t+="("+o+": "+i+")",r{["touchstart","touchmove","wheel"].includes(e.type)||e.preventDefault()},Sp=e=>{const t=[],n=n5(e),o=o5(e);for(let r=n;re.currentSlide-aZ(e),o5=e=>e.currentSlide+sZ(e),aZ=e=>e.centerMode?Math.floor(e.slidesToShow/2)+(parseInt(e.centerPadding)>0?1:0):0,sZ=e=>e.centerMode?Math.floor((e.slidesToShow-1)/2)+1+(parseInt(e.centerPadding)>0?1:0):e.slidesToShow,O0=e=>e&&e.offsetWidth||0,H1=e=>e&&e.offsetHeight||0,r5=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;const o=e.startX-e.curX,r=e.startY-e.curY,i=Math.atan2(r,o);return n=Math.round(i*180/Math.PI),n<0&&(n=360-Math.abs(n)),n<=45&&n>=0||n<=360&&n>=315?"left":n>=135&&n<=225?"right":t===!0?n>=35&&n<=135?"up":"down":"vertical"},Wh=e=>{let t=!0;return e.infinite||(e.centerMode&&e.currentSlide>=e.slideCount-1||e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(t=!1),t},Mm=(e,t)=>{const n={};return t.forEach(o=>n[o]=e[o]),n},cZ=e=>{const t=e.children.length,n=e.listRef,o=Math.ceil(O0(n)),r=e.trackRef,i=Math.ceil(O0(r));let l;if(e.vertical)l=o;else{let h=e.centerMode&&parseInt(e.centerPadding)*2;typeof e.centerPadding=="string"&&e.centerPadding.slice(-1)==="%"&&(h*=o/100),l=Math.ceil((o-h)/e.slidesToShow)}const a=n&&H1(n.querySelector('[data-index="0"]')),s=a*e.slidesToShow;let c=e.currentSlide===void 0?e.initialSlide:e.currentSlide;e.rtl&&e.currentSlide===void 0&&(c=t-1-e.initialSlide);let u=e.lazyLoadedList||[];const d=Sp(v(v({},e),{currentSlide:c,lazyLoadedList:u}));u=u.concat(d);const f={slideCount:t,slideWidth:l,listWidth:o,trackWidth:i,currentSlide:c,slideHeight:a,listHeight:s,lazyLoadedList:u};return e.autoplaying===null&&e.autoplay&&(f.autoplaying="playing"),f},uZ=e=>{const{waitForAnimate:t,animating:n,fade:o,infinite:r,index:i,slideCount:l,lazyLoad:a,currentSlide:s,centerMode:c,slidesToScroll:u,slidesToShow:d,useCSS:f}=e;let{lazyLoadedList:h}=e;if(t&&n)return{};let m=i,g,y,b,S={},$={};const x=r?i:w0(i,0,l-1);if(o){if(!r&&(i<0||i>=l))return{};i<0?m=i+l:i>=l&&(m=i-l),a&&h.indexOf(m)<0&&(h=h.concat(m)),S={animating:!0,currentSlide:m,lazyLoadedList:h,targetSlide:m},$={animating:!1,targetSlide:m}}else g=m,m<0?(g=m+l,r?l%u!==0&&(g=l-l%u):g=0):!Wh(e)&&m>s?m=g=s:c&&m>=l?(m=r?l:l-1,g=r?0:l-1):m>=l&&(g=m-l,r?l%u!==0&&(g=0):g=l-d),!r&&m+d>=l&&(g=l-d),y=nu(v(v({},e),{slideIndex:m})),b=nu(v(v({},e),{slideIndex:g})),r||(y===b&&(m=g),y=b),a&&(h=h.concat(Sp(v(v({},e),{currentSlide:m})))),f?(S={animating:!0,currentSlide:g,trackStyle:i5(v(v({},e),{left:y})),lazyLoadedList:h,targetSlide:x},$={animating:!1,currentSlide:g,trackStyle:tu(v(v({},e),{left:b})),swipeLeft:null,targetSlide:x}):S={currentSlide:g,trackStyle:tu(v(v({},e),{left:b})),lazyLoadedList:h,targetSlide:x};return{state:S,nextState:$}},dZ=(e,t)=>{let n,o,r;const{slidesToScroll:i,slidesToShow:l,slideCount:a,currentSlide:s,targetSlide:c,lazyLoad:u,infinite:d}=e,h=a%i!==0?0:(a-s)%i;if(t.message==="previous")o=h===0?i:l-h,r=s-o,u&&!d&&(n=s-o,r=n===-1?a-1:n),d||(r=c-i);else if(t.message==="next")o=h===0?i:h,r=s+o,u&&!d&&(r=(s+i)%a+h),d||(r=c+i);else if(t.message==="dots")r=t.index*t.slidesToScroll;else if(t.message==="children"){if(r=t.index,d){const m=bZ(v(v({},e),{targetSlide:r}));r>t.currentSlide&&m==="left"?r=r-a:re.target.tagName.match("TEXTAREA|INPUT|SELECT")||!t?"":e.keyCode===37?n?"next":"previous":e.keyCode===39?n?"previous":"next":"",pZ=(e,t,n)=>(e.target.tagName==="IMG"&&Za(e),!t||!n&&e.type.indexOf("mouse")!==-1?"":{dragging:!0,touchObject:{startX:e.touches?e.touches[0].pageX:e.clientX,startY:e.touches?e.touches[0].pageY:e.clientY,curX:e.touches?e.touches[0].pageX:e.clientX,curY:e.touches?e.touches[0].pageY:e.clientY}}),hZ=(e,t)=>{const{scrolling:n,animating:o,vertical:r,swipeToSlide:i,verticalSwiping:l,rtl:a,currentSlide:s,edgeFriction:c,edgeDragged:u,onEdge:d,swiped:f,swiping:h,slideCount:m,slidesToScroll:g,infinite:y,touchObject:b,swipeEvent:S,listHeight:$,listWidth:x}=t;if(n)return;if(o)return Za(e);r&&i&&l&&Za(e);let C,O={};const w=nu(t);b.curX=e.touches?e.touches[0].pageX:e.clientX,b.curY=e.touches?e.touches[0].pageY:e.clientY,b.swipeLength=Math.round(Math.sqrt(Math.pow(b.curX-b.startX,2)));const P=Math.round(Math.sqrt(Math.pow(b.curY-b.startY,2)));if(!l&&!h&&P>10)return{scrolling:!0};l&&(b.swipeLength=P);let T=(a?-1:1)*(b.curX>b.startX?1:-1);l&&(T=b.curY>b.startY?1:-1);const M=Math.ceil(m/g),E=r5(t.touchObject,l);let A=b.swipeLength;return y||(s===0&&(E==="right"||E==="down")||s+1>=M&&(E==="left"||E==="up")||!Wh(t)&&(E==="left"||E==="up"))&&(A=b.swipeLength*c,u===!1&&d&&(d(E),O.edgeDragged=!0)),!f&&S&&(S(E),O.swiped=!0),r?C=w+A*($/x)*T:a?C=w-A*T:C=w+A*T,l&&(C=w+A*T),O=v(v({},O),{touchObject:b,swipeLeft:C,trackStyle:tu(v(v({},t),{left:C}))}),Math.abs(b.curX-b.startX)10&&(O.swiping=!0,Za(e)),O},gZ=(e,t)=>{const{dragging:n,swipe:o,touchObject:r,listWidth:i,touchThreshold:l,verticalSwiping:a,listHeight:s,swipeToSlide:c,scrolling:u,onSwipe:d,targetSlide:f,currentSlide:h,infinite:m}=t;if(!n)return o&&Za(e),{};const g=a?s/l:i/l,y=r5(r,a),b={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(u||!r.swipeLength)return b;if(r.swipeLength>g){Za(e),d&&d(y);let S,$;const x=m?h:f;switch(y){case"left":case"up":$=x+e2(t),S=c?Qw(t,$):$,b.currentDirection=0;break;case"right":case"down":$=x-e2(t),S=c?Qw(t,$):$,b.currentDirection=1;break;default:S=x}b.triggerSlideHandler=S}else{const S=nu(t);b.trackStyle=i5(v(v({},t),{left:S}))}return b},mZ=e=>{const t=e.infinite?e.slideCount*2:e.slideCount;let n=e.infinite?e.slidesToShow*-1:0,o=e.infinite?e.slidesToShow*-1:0;const r=[];for(;n{const n=mZ(e);let o=0;if(t>n[n.length-1])t=n[n.length-1];else for(const r in n){if(t{const t=e.centerMode?e.slideWidth*Math.floor(e.slidesToShow/2):0;if(e.swipeToSlide){let n;const o=e.listRef,r=o.querySelectorAll&&o.querySelectorAll(".slick-slide")||[];if(Array.from(r).every(a=>{if(e.vertical){if(a.offsetTop+H1(a)/2>e.swipeLeft*-1)return n=a,!1}else if(a.offsetLeft-t+O0(a)/2>e.swipeLeft*-1)return n=a,!1;return!0}),!n)return 0;const i=e.rtl===!0?e.slideCount-e.currentSlide:e.currentSlide;return Math.abs(n.dataset.index-i)||1}else return e.slidesToScroll},j1=(e,t)=>t.reduce((n,o)=>n&&e.hasOwnProperty(o),!0)?null:console.error("Keys Missing:",e),tu=e=>{j1(e,["left","variableWidth","slideCount","slidesToShow","slideWidth"]);let t,n;const o=e.slideCount+2*e.slidesToShow;e.vertical?n=o*e.slideHeight:t=vZ(e)*e.slideWidth;let r={opacity:1,transition:"",WebkitTransition:""};if(e.useTransform){const i=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",l=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",a=e.vertical?"translateY("+e.left+"px)":"translateX("+e.left+"px)";r=v(v({},r),{WebkitTransform:i,transform:l,msTransform:a})}else e.vertical?r.top=e.left:r.left=e.left;return e.fade&&(r={opacity:1}),t&&(r.width=t+"px"),n&&(r.height=n+"px"),window&&!window.addEventListener&&window.attachEvent&&(e.vertical?r.marginTop=e.left+"px":r.marginLeft=e.left+"px"),r},i5=e=>{j1(e,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);const t=tu(e);return e.useTransform?(t.WebkitTransition="-webkit-transform "+e.speed+"ms "+e.cssEase,t.transition="transform "+e.speed+"ms "+e.cssEase):e.vertical?t.transition="top "+e.speed+"ms "+e.cssEase:t.transition="left "+e.speed+"ms "+e.cssEase,t},nu=e=>{if(e.unslick)return 0;j1(e,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);const{slideIndex:t,trackRef:n,infinite:o,centerMode:r,slideCount:i,slidesToShow:l,slidesToScroll:a,slideWidth:s,listWidth:c,variableWidth:u,slideHeight:d,fade:f,vertical:h}=e;let m=0,g,y,b=0;if(f||e.slideCount===1)return 0;let S=0;if(o?(S=-ri(e),i%a!==0&&t+a>i&&(S=-(t>i?l-(t-i):i%a)),r&&(S+=parseInt(l/2))):(i%a!==0&&t+a>i&&(S=l-i%a),r&&(S=parseInt(l/2))),m=S*s,b=S*d,h?g=t*d*-1+b:g=t*s*-1+m,u===!0){let $;const x=n;if($=t+ri(e),y=x&&x.childNodes[$],g=y?y.offsetLeft*-1:0,r===!0){$=o?t+ri(e):t,y=x&&x.children[$],g=0;for(let C=0;C<$;C++)g-=x&&x.children[C]&&x.children[C].offsetWidth;g-=parseInt(e.centerPadding),g+=y&&(c-y.offsetWidth)/2}}return g},ri=e=>e.unslick||!e.infinite?0:e.variableWidth?e.slideCount:e.slidesToShow+(e.centerMode?1:0),Kd=e=>e.unslick||!e.infinite?0:e.slideCount,vZ=e=>e.slideCount===1?1:ri(e)+e.slideCount+Kd(e),bZ=e=>e.targetSlide>e.currentSlide?e.targetSlide>e.currentSlide+yZ(e)?"left":"right":e.targetSlide{let{slidesToShow:t,centerMode:n,rtl:o,centerPadding:r}=e;if(n){let i=(t-1)/2+1;return parseInt(r)>0&&(i+=1),o&&t%2===0&&(i+=1),i}return o?0:t-1},SZ=e=>{let{slidesToShow:t,centerMode:n,rtl:o,centerPadding:r}=e;if(n){let i=(t-1)/2+1;return parseInt(r)>0&&(i+=1),!o&&t%2===0&&(i+=1),i}return o?t-1:0},t2=()=>!!(typeof window<"u"&&window.document&&window.document.createElement),Am=e=>{let t,n,o,r;e.rtl?r=e.slideCount-1-e.index:r=e.index;const i=r<0||r>=e.slideCount;e.centerMode?(o=Math.floor(e.slidesToShow/2),n=(r-e.currentSlide)%e.slideCount===0,r>e.currentSlide-o-1&&r<=e.currentSlide+o&&(t=!0)):t=e.currentSlide<=r&&r=e.slideCount?l=e.targetSlide-e.slideCount:l=e.targetSlide,{"slick-slide":!0,"slick-active":t,"slick-center":n,"slick-cloned":i,"slick-current":r===l}},$Z=function(e){const t={};return(e.variableWidth===void 0||e.variableWidth===!1)&&(t.width=e.slideWidth+(typeof e.slideWidth=="number"?"px":"")),e.fade&&(t.position="relative",e.vertical?t.top=-e.index*parseInt(e.slideHeight)+"px":t.left=-e.index*parseInt(e.slideWidth)+"px",t.opacity=e.currentSlide===e.index?1:0,e.useCSS&&(t.transition="opacity "+e.speed+"ms "+e.cssEase+", visibility "+e.speed+"ms "+e.cssEase)),t},Rm=(e,t)=>e.key+"-"+t,CZ=function(e,t){let n;const o=[],r=[],i=[],l=t.length,a=n5(e),s=o5(e);return t.forEach((c,u)=>{let d;const f={message:"children",index:u,slidesToScroll:e.slidesToScroll,currentSlide:e.currentSlide};!e.lazyLoad||e.lazyLoad&&e.lazyLoadedList.indexOf(u)>=0?d=c:d=p("div");const h=$Z(v(v({},e),{index:u})),m=d.props.class||"";let g=Am(v(v({},e),{index:u}));if(o.push(gc(d,{key:"original"+Rm(d,u),tabindex:"-1","data-index":u,"aria-hidden":!g["slick-active"],class:ce(g,m),style:v(v({outline:"none"},d.props.style||{}),h),onClick:()=>{e.focusOnSelect&&e.focusOnSelect(f)}})),e.infinite&&e.fade===!1){const y=l-u;y<=ri(e)&&l!==e.slidesToShow&&(n=-y,n>=a&&(d=c),g=Am(v(v({},e),{index:n})),r.push(gc(d,{key:"precloned"+Rm(d,n),class:ce(g,m),tabindex:"-1","data-index":n,"aria-hidden":!g["slick-active"],style:v(v({},d.props.style||{}),h),onClick:()=>{e.focusOnSelect&&e.focusOnSelect(f)}}))),l!==e.slidesToShow&&(n=l+u,n{e.focusOnSelect&&e.focusOnSelect(f)}})))}}),e.rtl?r.concat(o,i).reverse():r.concat(o,i)},l5=(e,t)=>{let{attrs:n,slots:o}=t;const r=CZ(n,xt(o==null?void 0:o.default())),{onMouseenter:i,onMouseover:l,onMouseleave:a}=n,s={onMouseenter:i,onMouseover:l,onMouseleave:a},c=v({class:"slick-track",style:n.trackStyle},s);return p("div",c,[r])};l5.inheritAttrs=!1;const xZ=function(e){let t;return e.infinite?t=Math.ceil(e.slideCount/e.slidesToScroll):t=Math.ceil((e.slideCount-e.slidesToShow)/e.slidesToScroll)+1,t},a5=(e,t)=>{let{attrs:n}=t;const{slideCount:o,slidesToScroll:r,slidesToShow:i,infinite:l,currentSlide:a,appendDots:s,customPaging:c,clickHandler:u,dotsClass:d,onMouseenter:f,onMouseover:h,onMouseleave:m}=n,g=xZ({slideCount:o,slidesToScroll:r,slidesToShow:i,infinite:l}),y={onMouseenter:f,onMouseover:h,onMouseleave:m};let b=[];for(let S=0;S=O&&a<=x:a===O}),P={message:"dots",index:S,slidesToScroll:r,currentSlide:a};b=b.concat(p("li",{key:S,class:w},[ht(c({i:S}),{onClick:T})]))}return ht(s({dots:b}),v({class:d},y))};a5.inheritAttrs=!1;function s5(){}function c5(e,t,n){n&&n.preventDefault(),t(e,n)}const u5=(e,t)=>{let{attrs:n}=t;const{clickHandler:o,infinite:r,currentSlide:i,slideCount:l,slidesToShow:a}=n,s={"slick-arrow":!0,"slick-prev":!0};let c=function(h){c5({message:"previous"},o,h)};!r&&(i===0||l<=a)&&(s["slick-disabled"]=!0,c=s5);const u={key:"0","data-role":"none",class:s,style:{display:"block"},onClick:c},d={currentSlide:i,slideCount:l};let f;return n.prevArrow?f=ht(n.prevArrow(v(v({},u),d)),{key:"0",class:s,style:{display:"block"},onClick:c},!1):f=p("button",D({key:"0",type:"button"},u),[" ",vn("Previous")]),f};u5.inheritAttrs=!1;const d5=(e,t)=>{let{attrs:n}=t;const{clickHandler:o,currentSlide:r,slideCount:i}=n,l={"slick-arrow":!0,"slick-next":!0};let a=function(d){c5({message:"next"},o,d)};Wh(n)||(l["slick-disabled"]=!0,a=s5);const s={key:"1","data-role":"none",class:ce(l),style:{display:"block"},onClick:a},c={currentSlide:r,slideCount:i};let u;return n.nextArrow?u=ht(n.nextArrow(v(v({},s),c)),{key:"1",class:ce(l),style:{display:"block"},onClick:a},!1):u=p("button",D({key:"1",type:"button"},s),[" ",vn("Next")]),u};d5.inheritAttrs=!1;var wZ=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{this.currentSlide>=e.children.length&&this.changeSlide({message:"index",index:e.children.length-e.slidesToShow,currentSlide:this.currentSlide}),!this.preProps.autoplay&&e.autoplay?this.handleAutoPlay("playing"):e.autoplay?this.handleAutoPlay("update"):this.pause("paused")}),this.preProps=v({},e)}},mounted(){if(this.__emit("init"),this.lazyLoad){const e=Sp(v(v({},this.$props),this.$data));e.length>0&&(this.setState(t=>({lazyLoadedList:t.lazyLoadedList.concat(e)})),this.__emit("lazyLoad",e))}this.$nextTick(()=>{const e=v({listRef:this.list,trackRef:this.track,children:this.children},this.$props);this.updateState(e,!0,()=>{this.adaptHeight(),this.autoplay&&this.handleAutoPlay("playing")}),this.lazyLoad==="progressive"&&(this.lazyLoadTimer=setInterval(this.progressiveLazyLoad,1e3)),this.ro=new Wb(()=>{this.animating?(this.onWindowResized(!1),this.callbackTimers.push(setTimeout(()=>this.onWindowResized(),this.speed))):this.onWindowResized()}),this.ro.observe(this.list),document.querySelectorAll&&Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"),t=>{t.onfocus=this.$props.pauseOnFocus?this.onSlideFocus:null,t.onblur=this.$props.pauseOnFocus?this.onSlideBlur:null}),window.addEventListener?window.addEventListener("resize",this.onWindowResized):window.attachEvent("onresize",this.onWindowResized)})},beforeUnmount(){var e;this.animationEndCallback&&clearTimeout(this.animationEndCallback),this.lazyLoadTimer&&clearInterval(this.lazyLoadTimer),this.callbackTimers.length&&(this.callbackTimers.forEach(t=>clearTimeout(t)),this.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",this.onWindowResized):window.detachEvent("onresize",this.onWindowResized),this.autoplayTimer&&clearInterval(this.autoplayTimer),(e=this.ro)===null||e===void 0||e.disconnect()},updated(){if(this.checkImagesLoad(),this.__emit("reInit"),this.lazyLoad){const e=Sp(v(v({},this.$props),this.$data));e.length>0&&(this.setState(t=>({lazyLoadedList:t.lazyLoadedList.concat(e)})),this.__emit("lazyLoad"))}this.adaptHeight()},methods:{listRefHandler(e){this.list=e},trackRefHandler(e){this.track=e},adaptHeight(){if(this.adaptiveHeight&&this.list){const e=this.list.querySelector(`[data-index="${this.currentSlide}"]`);this.list.style.height=H1(e)+"px"}},onWindowResized(e){this.debouncedResize&&this.debouncedResize.cancel(),this.debouncedResize=Uy(()=>this.resizeWindow(e),50),this.debouncedResize()},resizeWindow(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(!!!this.track)return;const n=v(v({listRef:this.list,trackRef:this.track,children:this.children},this.$props),this.$data);this.updateState(n,e,()=>{this.autoplay?this.handleAutoPlay("update"):this.pause("paused")}),this.setState({animating:!1}),clearTimeout(this.animationEndCallback),delete this.animationEndCallback},updateState(e,t,n){const o=cZ(e);e=v(v(v({},e),o),{slideIndex:o.currentSlide});const r=nu(e);e=v(v({},e),{left:r});const i=tu(e);(t||this.children.length!==e.children.length)&&(o.trackStyle=i),this.setState(o,n)},ssrInit(){const e=this.children;if(this.variableWidth){let s=0,c=0;const u=[],d=ri(v(v(v({},this.$props),this.$data),{slideCount:e.length})),f=Kd(v(v(v({},this.$props),this.$data),{slideCount:e.length}));e.forEach(m=>{var g,y;const b=((y=(g=m.props.style)===null||g===void 0?void 0:g.width)===null||y===void 0?void 0:y.split("px")[0])||0;u.push(b),s+=b});for(let m=0;m{const r=()=>++n&&n>=t&&this.onWindowResized();if(!o.onclick)o.onclick=()=>o.parentNode.focus();else{const i=o.onclick;o.onclick=()=>{i(),o.parentNode.focus()}}o.onload||(this.$props.lazyLoad?o.onload=()=>{this.adaptHeight(),this.callbackTimers.push(setTimeout(this.onWindowResized,this.speed))}:(o.onload=r,o.onerror=()=>{r(),this.__emit("lazyLoadError")}))})},progressiveLazyLoad(){const e=[],t=v(v({},this.$props),this.$data);for(let n=this.currentSlide;n=-ri(t);n--)if(this.lazyLoadedList.indexOf(n)<0){e.push(n);break}e.length>0?(this.setState(n=>({lazyLoadedList:n.lazyLoadedList.concat(e)})),this.__emit("lazyLoad",e)):this.lazyLoadTimer&&(clearInterval(this.lazyLoadTimer),delete this.lazyLoadTimer)},slideHandler(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{asNavFor:n,beforeChange:o,speed:r,afterChange:i}=this.$props,{state:l,nextState:a}=uZ(v(v(v({index:e},this.$props),this.$data),{trackRef:this.track,useCSS:this.useCSS&&!t}));if(!l)return;o&&o(this.currentSlide,l.currentSlide);const s=l.lazyLoadedList.filter(c=>this.lazyLoadedList.indexOf(c)<0);this.$attrs.onLazyLoad&&s.length>0&&this.__emit("lazyLoad",s),!this.$props.waitForAnimate&&this.animationEndCallback&&(clearTimeout(this.animationEndCallback),i&&i(this.currentSlide),delete this.animationEndCallback),this.setState(l,()=>{n&&this.asNavForIndex!==e&&(this.asNavForIndex=e,n.innerSlider.slideHandler(e)),a&&(this.animationEndCallback=setTimeout(()=>{const{animating:c}=a,u=wZ(a,["animating"]);this.setState(u,()=>{this.callbackTimers.push(setTimeout(()=>this.setState({animating:c}),10)),i&&i(l.currentSlide),delete this.animationEndCallback})},r))})},changeSlide(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=v(v({},this.$props),this.$data),o=dZ(n,e);if(!(o!==0&&!o)&&(t===!0?this.slideHandler(o,t):this.slideHandler(o),this.$props.autoplay&&this.handleAutoPlay("update"),this.$props.focusOnSelect)){const r=this.list.querySelectorAll(".slick-current");r[0]&&r[0].focus()}},clickHandler(e){this.clickable===!1&&(e.stopPropagation(),e.preventDefault()),this.clickable=!0},keyHandler(e){const t=fZ(e,this.accessibility,this.rtl);t!==""&&this.changeSlide({message:t})},selectHandler(e){this.changeSlide(e)},disableBodyScroll(){const e=t=>{t=t||window.event,t.preventDefault&&t.preventDefault(),t.returnValue=!1};window.ontouchmove=e},enableBodyScroll(){window.ontouchmove=null},swipeStart(e){this.verticalSwiping&&this.disableBodyScroll();const t=pZ(e,this.swipe,this.draggable);t!==""&&this.setState(t)},swipeMove(e){const t=hZ(e,v(v(v({},this.$props),this.$data),{trackRef:this.track,listRef:this.list,slideIndex:this.currentSlide}));t&&(t.swiping&&(this.clickable=!1),this.setState(t))},swipeEnd(e){const t=gZ(e,v(v(v({},this.$props),this.$data),{trackRef:this.track,listRef:this.list,slideIndex:this.currentSlide}));if(!t)return;const n=t.triggerSlideHandler;delete t.triggerSlideHandler,this.setState(t),n!==void 0&&(this.slideHandler(n),this.$props.verticalSwiping&&this.enableBodyScroll())},touchEnd(e){this.swipeEnd(e),this.clickable=!0},slickPrev(){this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"previous"}),0))},slickNext(){this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"next"}),0))},slickGoTo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e=Number(e),isNaN(e))return"";this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"index",index:e,currentSlide:this.currentSlide},t),0))},play(){let e;if(this.rtl)e=this.currentSlide-this.slidesToScroll;else if(Wh(v(v({},this.$props),this.$data)))e=this.currentSlide+this.slidesToScroll;else return!1;this.slideHandler(e)},handleAutoPlay(e){this.autoplayTimer&&clearInterval(this.autoplayTimer);const t=this.autoplaying;if(e==="update"){if(t==="hovered"||t==="focused"||t==="paused")return}else if(e==="leave"){if(t==="paused"||t==="focused")return}else if(e==="blur"&&(t==="paused"||t==="hovered"))return;this.autoplayTimer=setInterval(this.play,this.autoplaySpeed+50),this.setState({autoplaying:"playing"})},pause(e){this.autoplayTimer&&(clearInterval(this.autoplayTimer),this.autoplayTimer=null);const t=this.autoplaying;e==="paused"?this.setState({autoplaying:"paused"}):e==="focused"?(t==="hovered"||t==="playing")&&this.setState({autoplaying:"focused"}):t==="playing"&&this.setState({autoplaying:"hovered"})},onDotsOver(){this.autoplay&&this.pause("hovered")},onDotsLeave(){this.autoplay&&this.autoplaying==="hovered"&&this.handleAutoPlay("leave")},onTrackOver(){this.autoplay&&this.pause("hovered")},onTrackLeave(){this.autoplay&&this.autoplaying==="hovered"&&this.handleAutoPlay("leave")},onSlideFocus(){this.autoplay&&this.pause("focused")},onSlideBlur(){this.autoplay&&this.autoplaying==="focused"&&this.handleAutoPlay("blur")},customPaging(e){let{i:t}=e;return p("button",null,[t+1])},appendDots(e){let{dots:t}=e;return p("ul",{style:{display:"block"}},[t])}},render(){const e=ce("slick-slider",this.$attrs.class,{"slick-vertical":this.vertical,"slick-initialized":!0}),t=v(v({},this.$props),this.$data);let n=Mm(t,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding","targetSlide","useCSS"]);const{pauseOnHover:o}=this.$props;n=v(v({},n),{focusOnSelect:this.focusOnSelect&&this.clickable?this.selectHandler:null,ref:this.trackRefHandler,onMouseleave:o?this.onTrackLeave:yo,onMouseover:o?this.onTrackOver:yo});let r;if(this.dots===!0&&this.slideCount>=this.slidesToShow){let y=Mm(t,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","infinite","appendDots"]);y.customPaging=this.customPaging,y.appendDots=this.appendDots;const{customPaging:b,appendDots:S}=this.$slots;b&&(y.customPaging=b),S&&(y.appendDots=S);const{pauseOnDotsHover:$}=this.$props;y=v(v({},y),{clickHandler:this.changeSlide,onMouseover:$?this.onDotsOver:yo,onMouseleave:$?this.onDotsLeave:yo}),r=p(a5,y,null)}let i,l;const a=Mm(t,["infinite","centerMode","currentSlide","slideCount","slidesToShow"]);a.clickHandler=this.changeSlide;const{prevArrow:s,nextArrow:c}=this.$slots;s&&(a.prevArrow=s),c&&(a.nextArrow=c),this.arrows&&(i=p(u5,a,null),l=p(d5,a,null));let u=null;this.vertical&&(u={height:typeof this.listHeight=="number"?`${this.listHeight}px`:this.listHeight});let d=null;this.vertical===!1?this.centerMode===!0&&(d={padding:"0px "+this.centerPadding}):this.centerMode===!0&&(d={padding:this.centerPadding+" 0px"});const f=v(v({},u),d),h=this.touchMove;let m={ref:this.listRefHandler,class:"slick-list",style:f,onClick:this.clickHandler,onMousedown:h?this.swipeStart:yo,onMousemove:this.dragging&&h?this.swipeMove:yo,onMouseup:h?this.swipeEnd:yo,onMouseleave:this.dragging&&h?this.swipeEnd:yo,[nn?"onTouchstartPassive":"onTouchstart"]:h?this.swipeStart:yo,[nn?"onTouchmovePassive":"onTouchmove"]:this.dragging&&h?this.swipeMove:yo,onTouchend:h?this.touchEnd:yo,onTouchcancel:this.dragging&&h?this.swipeEnd:yo,onKeydown:this.accessibility?this.keyHandler:yo},g={class:e,dir:"ltr",style:this.$attrs.style};return this.unslick&&(m={class:"slick-list",ref:this.listRefHandler},g={class:e}),p("div",g,[this.unslick?"":i,p("div",m,[p(l5,n,{default:()=>[this.children]})]),this.unslick?"":l,this.unslick?"":r])}},PZ=re({name:"Slider",mixins:[sa],inheritAttrs:!1,props:v({},t5),data(){return this._responsiveMediaHandlers=[],{breakpoint:null}},mounted(){if(this.responsive){const e=this.responsive.map(n=>n.breakpoint);e.sort((n,o)=>n-o),e.forEach((n,o)=>{let r;o===0?r=_m({minWidth:0,maxWidth:n}):r=_m({minWidth:e[o-1]+1,maxWidth:n}),t2()&&this.media(r,()=>{this.setState({breakpoint:n})})});const t=_m({minWidth:e.slice(-1)[0]});t2()&&this.media(t,()=>{this.setState({breakpoint:null})})}},beforeUnmount(){this._responsiveMediaHandlers.forEach(function(e){e.mql.removeListener(e.listener)})},methods:{innerSliderRefHandler(e){this.innerSlider=e},media(e,t){const n=window.matchMedia(e),o=r=>{let{matches:i}=r;i&&t()};n.addListener(o),o(n),this._responsiveMediaHandlers.push({mql:n,query:e,listener:o})},slickPrev(){var e;(e=this.innerSlider)===null||e===void 0||e.slickPrev()},slickNext(){var e;(e=this.innerSlider)===null||e===void 0||e.slickNext()},slickGoTo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var n;(n=this.innerSlider)===null||n===void 0||n.slickGoTo(e,t)},slickPause(){var e;(e=this.innerSlider)===null||e===void 0||e.pause("paused")},slickPlay(){var e;(e=this.innerSlider)===null||e===void 0||e.handleAutoPlay("play")}},render(){var e;let t,n;this.breakpoint?(n=this.responsive.filter(a=>a.breakpoint===this.breakpoint),t=n[0].settings==="unslick"?"unslick":v(v({},this.$props),n[0].settings)):t=v({},this.$props),t.centerMode&&(t.slidesToScroll>1,t.slidesToScroll=1),t.fade&&(t.slidesToShow>1,t.slidesToScroll>1,t.slidesToShow=1,t.slidesToScroll=1);let o=ih(this)||[];o=o.filter(a=>typeof a=="string"?!!a.trim():!!a),t.variableWidth&&(t.rows>1||t.slidesPerRow>1)&&(console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"),t.variableWidth=!1);const r=[];let i=null;for(let a=0;a=o.length));d+=1)u.push(ht(o[d],{key:100*a+10*c+d,tabindex:-1,style:{width:`${100/t.slidesPerRow}%`,display:"inline-block"}}));s.push(p("div",{key:10*a+c},[u]))}t.variableWidth?r.push(p("div",{key:a,style:{width:i}},[s])):r.push(p("div",{key:a},[s]))}if(t==="unslick"){const a="regular slider "+(this.className||"");return p("div",{class:a},[o])}else r.length<=t.slidesToShow&&(t.unslick=!0);const l=v(v(v({},this.$attrs),t),{children:r,ref:this.innerSliderRefHandler});return p(OZ,D(D({},l),{},{__propsSymbol__:[]}),this.$slots)}}),IZ=e=>{const{componentCls:t,antCls:n,carouselArrowSize:o,carouselDotOffset:r,marginXXS:i}=e,l=-o*1.25,a=i;return{[t]:v(v({},Ze(e)),{".slick-slider":{position:"relative",display:"block",boxSizing:"border-box",touchAction:"pan-y",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",".slick-track, .slick-list":{transform:"translate3d(0, 0, 0)",touchAction:"pan-y"}},".slick-list":{position:"relative",display:"block",margin:0,padding:0,overflow:"hidden","&:focus":{outline:"none"},"&.dragging":{cursor:"pointer"},".slick-slide":{pointerEvents:"none",[`input${n}-radio-input, input${n}-checkbox-input`]:{visibility:"hidden"},"&.slick-active":{pointerEvents:"auto",[`input${n}-radio-input, input${n}-checkbox-input`]:{visibility:"visible"}},"> div > div":{verticalAlign:"bottom"}}},".slick-track":{position:"relative",top:0,insetInlineStart:0,display:"block","&::before, &::after":{display:"table",content:'""'},"&::after":{clear:"both"}},".slick-slide":{display:"none",float:"left",height:"100%",minHeight:1,img:{display:"block"},"&.dragging img":{pointerEvents:"none"}},".slick-initialized .slick-slide":{display:"block"},".slick-vertical .slick-slide":{display:"block",height:"auto"},".slick-arrow.slick-hidden":{display:"none"},".slick-prev, .slick-next":{position:"absolute",top:"50%",display:"block",width:o,height:o,marginTop:-o/2,padding:0,color:"transparent",fontSize:0,lineHeight:0,background:"transparent",border:0,outline:"none",cursor:"pointer","&:hover, &:focus":{color:"transparent",background:"transparent",outline:"none","&::before":{opacity:1}},"&.slick-disabled::before":{opacity:.25}},".slick-prev":{insetInlineStart:l,"&::before":{content:'"←"'}},".slick-next":{insetInlineEnd:l,"&::before":{content:'"→"'}},".slick-dots":{position:"absolute",insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:15,display:"flex !important",justifyContent:"center",paddingInlineStart:0,listStyle:"none","&-bottom":{bottom:r},"&-top":{top:r,bottom:"auto"},li:{position:"relative",display:"inline-block",flex:"0 1 auto",boxSizing:"content-box",width:e.dotWidth,height:e.dotHeight,marginInline:a,padding:0,textAlign:"center",textIndent:-999,verticalAlign:"top",transition:`all ${e.motionDurationSlow}`,button:{position:"relative",display:"block",width:"100%",height:e.dotHeight,padding:0,color:"transparent",fontSize:0,background:e.colorBgContainer,border:0,borderRadius:1,outline:"none",cursor:"pointer",opacity:.3,transition:`all ${e.motionDurationSlow}`,"&: hover, &:focus":{opacity:.75},"&::after":{position:"absolute",inset:-a,content:'""'}},"&.slick-active":{width:e.dotWidthActive,"& button":{background:e.colorBgContainer,opacity:1},"&: hover, &:focus":{opacity:1}}}}})}},TZ=e=>{const{componentCls:t,carouselDotOffset:n,marginXXS:o}=e,r={width:e.dotHeight,height:e.dotWidth};return{[`${t}-vertical`]:{".slick-dots":{top:"50%",bottom:"auto",flexDirection:"column",width:e.dotHeight,height:"auto",margin:0,transform:"translateY(-50%)","&-left":{insetInlineEnd:"auto",insetInlineStart:n},"&-right":{insetInlineEnd:n,insetInlineStart:"auto"},li:v(v({},r),{margin:`${o}px 0`,verticalAlign:"baseline",button:r,"&.slick-active":v(v({},r),{button:r})})}}}},EZ=e=>{const{componentCls:t}=e;return[{[`${t}-rtl`]:{direction:"rtl",".slick-dots":{[`${t}-rtl&`]:{flexDirection:"row-reverse"}}}},{[`${t}-vertical`]:{".slick-dots":{[`${t}-rtl&`]:{flexDirection:"column"}}}}]},_Z=Xe("Carousel",e=>{const{controlHeightLG:t,controlHeightSM:n}=e,o=Fe(e,{carouselArrowSize:t/2,carouselDotOffset:n/2});return[IZ(o),TZ(o),EZ(o)]},{dotWidth:16,dotHeight:3,dotWidthActive:24});var MZ=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({effect:Be(),dots:Ce(!0),vertical:Ce(),autoplay:Ce(),easing:String,beforeChange:ve(),afterChange:ve(),prefixCls:String,accessibility:Ce(),nextArrow:W.any,prevArrow:W.any,pauseOnHover:Ce(),adaptiveHeight:Ce(),arrows:Ce(!1),autoplaySpeed:Number,centerMode:Ce(),centerPadding:String,cssEase:String,dotsClass:String,draggable:Ce(!1),fade:Ce(),focusOnSelect:Ce(),infinite:Ce(),initialSlide:Number,lazyLoad:Be(),rtl:Ce(),slide:String,slidesToShow:Number,slidesToScroll:Number,speed:Number,swipe:Ce(),swipeToSlide:Ce(),swipeEvent:ve(),touchMove:Ce(),touchThreshold:Number,variableWidth:Ce(),useCSS:Ce(),slickGoTo:Number,responsive:Array,dotPosition:Be(),verticalSwiping:Ce(!1)}),RZ=re({compatConfig:{MODE:3},name:"ACarousel",inheritAttrs:!1,props:AZ(),setup(e,t){let{slots:n,attrs:o,expose:r}=t;const i=ie();r({goTo:function(m){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var y;(y=i.value)===null||y===void 0||y.slickGoTo(m,g)},autoplay:m=>{var g,y;(y=(g=i.value)===null||g===void 0?void 0:g.innerSlider)===null||y===void 0||y.handleAutoPlay(m)},prev:()=>{var m;(m=i.value)===null||m===void 0||m.slickPrev()},next:()=>{var m;(m=i.value)===null||m===void 0||m.slickNext()},innerSlider:I(()=>{var m;return(m=i.value)===null||m===void 0?void 0:m.innerSlider})}),je(()=>{Eo(e.vertical===void 0)});const{prefixCls:a,direction:s}=Ee("carousel",e),[c,u]=_Z(a),d=I(()=>e.dotPosition?e.dotPosition:e.vertical!==void 0&&e.vertical?"right":"bottom"),f=I(()=>d.value==="left"||d.value==="right"),h=I(()=>{const m="slick-dots";return ce({[m]:!0,[`${m}-${d.value}`]:!0,[`${e.dotsClass}`]:!!e.dotsClass})});return()=>{const{dots:m,arrows:g,draggable:y,effect:b}=e,{class:S,style:$}=o,x=MZ(o,["class","style"]),C=b==="fade"?!0:e.fade,O=ce(a.value,{[`${a.value}-rtl`]:s.value==="rtl",[`${a.value}-vertical`]:f.value,[`${S}`]:!!S},u.value);return c(p("div",{class:O,style:$},[p(PZ,D(D(D({ref:i},e),x),{},{dots:!!m,dotsClass:h.value,arrows:g,draggable:y,fade:C,vertical:f.value}),n)]))}}}),DZ=At(RZ),V1="__RC_CASCADER_SPLIT__",f5="SHOW_PARENT",p5="SHOW_CHILD";function Ki(e){return e.join(V1)}function Ba(e){return e.map(Ki)}function NZ(e){return e.split(V1)}function BZ(e){const{label:t,value:n,children:o}=e||{},r=n||"value";return{label:t||"label",value:r,key:r,children:o||"children"}}function oc(e,t){var n,o;return(n=e.isLeaf)!==null&&n!==void 0?n:!(!((o=e[t.children])===null||o===void 0)&&o.length)}function LZ(e){const t=e.parentElement;if(!t)return;const n=e.offsetTop-t.offsetTop;n-t.scrollTop<0?t.scrollTo({top:n}):n+e.offsetHeight-t.scrollTop>t.offsetHeight&&t.scrollTo({top:n+e.offsetHeight-t.offsetHeight})}const h5=Symbol("TreeContextKey"),kZ=re({compatConfig:{MODE:3},name:"TreeContext",props:{value:{type:Object}},setup(e,t){let{slots:n}=t;return qe(h5,I(()=>e.value)),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),W1=()=>Ke(h5,I(()=>({}))),g5=Symbol("KeysStateKey"),FZ=e=>{qe(g5,e)},m5=()=>Ke(g5,{expandedKeys:oe([]),selectedKeys:oe([]),loadedKeys:oe([]),loadingKeys:oe([]),checkedKeys:oe([]),halfCheckedKeys:oe([]),expandedKeysSet:I(()=>new Set),selectedKeysSet:I(()=>new Set),loadedKeysSet:I(()=>new Set),loadingKeysSet:I(()=>new Set),checkedKeysSet:I(()=>new Set),halfCheckedKeysSet:I(()=>new Set),flattenNodes:oe([])}),zZ=e=>{let{prefixCls:t,level:n,isStart:o,isEnd:r}=e;const i=`${t}-indent-unit`,l=[];for(let a=0;a({prefixCls:String,focusable:{type:Boolean,default:void 0},activeKey:[Number,String],tabindex:Number,children:W.any,treeData:{type:Array},fieldNames:{type:Object},showLine:{type:[Boolean,Object],default:void 0},showIcon:{type:Boolean,default:void 0},icon:W.any,selectable:{type:Boolean,default:void 0},expandAction:[String,Boolean],disabled:{type:Boolean,default:void 0},multiple:{type:Boolean,default:void 0},checkable:{type:Boolean,default:void 0},checkStrictly:{type:Boolean,default:void 0},draggable:{type:[Function,Boolean]},defaultExpandParent:{type:Boolean,default:void 0},autoExpandParent:{type:Boolean,default:void 0},defaultExpandAll:{type:Boolean,default:void 0},defaultExpandedKeys:{type:Array},expandedKeys:{type:Array},defaultCheckedKeys:{type:Array},checkedKeys:{type:[Object,Array]},defaultSelectedKeys:{type:Array},selectedKeys:{type:Array},allowDrop:{type:Function},dropIndicatorRender:{type:Function},onFocus:{type:Function},onBlur:{type:Function},onKeydown:{type:Function},onContextmenu:{type:Function},onClick:{type:Function},onDblclick:{type:Function},onScroll:{type:Function},onExpand:{type:Function},onCheck:{type:Function},onSelect:{type:Function},onLoad:{type:Function},loadData:{type:Function},loadedKeys:{type:Array},onMouseenter:{type:Function},onMouseleave:{type:Function},onRightClick:{type:Function},onDragstart:{type:Function},onDragenter:{type:Function},onDragover:{type:Function},onDragleave:{type:Function},onDragend:{type:Function},onDrop:{type:Function},onActiveChange:{type:Function},filterTreeNode:{type:Function},motion:W.any,switcherIcon:W.any,height:Number,itemHeight:Number,virtual:{type:Boolean,default:void 0},direction:{type:String},rootClassName:String,rootStyle:Object});var jZ=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r"`v-slot:"+fe+"` ")}`;const i=oe(!1),l=W1(),{expandedKeysSet:a,selectedKeysSet:s,loadedKeysSet:c,loadingKeysSet:u,checkedKeysSet:d,halfCheckedKeysSet:f}=m5(),{dragOverNodeKey:h,dropPosition:m,keyEntities:g}=l.value,y=I(()=>Ud(e.eventKey,{expandedKeysSet:a.value,selectedKeysSet:s.value,loadedKeysSet:c.value,loadingKeysSet:u.value,checkedKeysSet:d.value,halfCheckedKeysSet:f.value,dragOverNodeKey:h,dropPosition:m,keyEntities:g})),b=xo(()=>y.value.expanded),S=xo(()=>y.value.selected),$=xo(()=>y.value.checked),x=xo(()=>y.value.loaded),C=xo(()=>y.value.loading),O=xo(()=>y.value.halfChecked),w=xo(()=>y.value.dragOver),P=xo(()=>y.value.dragOverGapTop),T=xo(()=>y.value.dragOverGapBottom),M=xo(()=>y.value.pos),E=oe(),A=I(()=>{const{eventKey:fe}=e,{keyEntities:de}=l.value,{children:ye}=de[fe]||{};return!!(ye||[]).length}),R=I(()=>{const{isLeaf:fe}=e,{loadData:de}=l.value,ye=A.value;return fe===!1?!1:fe||!de&&!ye||de&&x.value&&!ye}),F=I(()=>R.value?null:b.value?n2:o2),_=I(()=>{const{disabled:fe}=e,{disabled:de}=l.value;return!!(de||fe)}),N=I(()=>{const{checkable:fe}=e,{checkable:de}=l.value;return!de||fe===!1?!1:de}),B=I(()=>{const{selectable:fe}=e,{selectable:de}=l.value;return typeof fe=="boolean"?fe:de}),L=I(()=>{const{data:fe,active:de,checkable:ye,disableCheckbox:Oe,disabled:Te,selectable:Re}=e;return v(v({active:de,checkable:ye,disableCheckbox:Oe,disabled:Te,selectable:Re},fe),{dataRef:fe,data:fe,isLeaf:R.value,checked:$.value,expanded:b.value,loading:C.value,selected:S.value,halfChecked:O.value})}),k=$n(),z=I(()=>{const{eventKey:fe}=e,{keyEntities:de}=l.value,{parent:ye}=de[fe]||{};return v(v({},Gd(v({},e,y.value))),{parent:ye})}),H=ft({eventData:z,eventKey:I(()=>e.eventKey),selectHandle:E,pos:M,key:k.vnode.key});r(H);const j=fe=>{const{onNodeDoubleClick:de}=l.value;de(fe,z.value)},Y=fe=>{if(_.value)return;const{onNodeSelect:de}=l.value;fe.preventDefault(),de(fe,z.value)},Z=fe=>{if(_.value)return;const{disableCheckbox:de}=e,{onNodeCheck:ye}=l.value;if(!N.value||de)return;fe.preventDefault();const Oe=!$.value;ye(fe,z.value,Oe)},G=fe=>{const{onNodeClick:de}=l.value;de(fe,z.value),B.value?Y(fe):Z(fe)},te=fe=>{const{onNodeMouseEnter:de}=l.value;de(fe,z.value)},U=fe=>{const{onNodeMouseLeave:de}=l.value;de(fe,z.value)},Q=fe=>{const{onNodeContextMenu:de}=l.value;de(fe,z.value)},J=fe=>{const{onNodeDragStart:de}=l.value;fe.stopPropagation(),i.value=!0,de(fe,H);try{fe.dataTransfer.setData("text/plain","")}catch{}},X=fe=>{const{onNodeDragEnter:de}=l.value;fe.preventDefault(),fe.stopPropagation(),de(fe,H)},q=fe=>{const{onNodeDragOver:de}=l.value;fe.preventDefault(),fe.stopPropagation(),de(fe,H)},V=fe=>{const{onNodeDragLeave:de}=l.value;fe.stopPropagation(),de(fe,H)},K=fe=>{const{onNodeDragEnd:de}=l.value;fe.stopPropagation(),i.value=!1,de(fe,H)},ee=fe=>{const{onNodeDrop:de}=l.value;fe.preventDefault(),fe.stopPropagation(),i.value=!1,de(fe,H)},ue=fe=>{const{onNodeExpand:de}=l.value;C.value||de(fe,z.value)},ae=()=>{const{data:fe}=e,{draggable:de}=l.value;return!!(de&&(!de.nodeDraggable||de.nodeDraggable(fe)))},le=()=>{const{draggable:fe,prefixCls:de}=l.value;return fe&&(fe!=null&&fe.icon)?p("span",{class:`${de}-draggable-icon`},[fe.icon]):null},ne=()=>{var fe,de,ye;const{switcherIcon:Oe=o.switcherIcon||((fe=l.value.slots)===null||fe===void 0?void 0:fe[(ye=(de=e.data)===null||de===void 0?void 0:de.slots)===null||ye===void 0?void 0:ye.switcherIcon])}=e,{switcherIcon:Te}=l.value,Re=Oe||Te;return typeof Re=="function"?Re(L.value):Re},se=()=>{const{loadData:fe,onNodeLoad:de}=l.value;C.value||fe&&b.value&&!R.value&&!A.value&&!x.value&&de(z.value)};Ue(()=>{se()}),Vn(()=>{se()});const pe=()=>{const{prefixCls:fe}=l.value,de=ne();if(R.value)return de!==!1?p("span",{class:ce(`${fe}-switcher`,`${fe}-switcher-noop`)},[de]):null;const ye=ce(`${fe}-switcher`,`${fe}-switcher_${b.value?n2:o2}`);return de!==!1?p("span",{onClick:ue,class:ye},[de]):null},he=()=>{var fe,de;const{disableCheckbox:ye}=e,{prefixCls:Oe}=l.value,Te=_.value;return N.value?p("span",{class:ce(`${Oe}-checkbox`,$.value&&`${Oe}-checkbox-checked`,!$.value&&O.value&&`${Oe}-checkbox-indeterminate`,(Te||ye)&&`${Oe}-checkbox-disabled`),onClick:Z},[(de=(fe=l.value).customCheckable)===null||de===void 0?void 0:de.call(fe)]):null},ge=()=>{const{prefixCls:fe}=l.value;return p("span",{class:ce(`${fe}-iconEle`,`${fe}-icon__${F.value||"docu"}`,C.value&&`${fe}-icon_loading`)},null)},be=()=>{const{disabled:fe,eventKey:de}=e,{draggable:ye,dropLevelOffset:Oe,dropPosition:Te,prefixCls:Re,indent:$e,dropIndicatorRender:we,dragOverNodeKey:Pe,direction:Me}=l.value;return!fe&&ye!==!1&&Pe===de?we({dropPosition:Te,dropLevelOffset:Oe,indent:$e,prefixCls:Re,direction:Me}):null},xe=()=>{var fe,de,ye,Oe,Te,Re;const{icon:$e=o.icon,data:we}=e,Pe=o.title||((fe=l.value.slots)===null||fe===void 0?void 0:fe[(ye=(de=e.data)===null||de===void 0?void 0:de.slots)===null||ye===void 0?void 0:ye.title])||((Oe=l.value.slots)===null||Oe===void 0?void 0:Oe.title)||e.title,{prefixCls:Me,showIcon:De,icon:Ae,loadData:ke}=l.value,ot=_.value,gt=`${Me}-node-content-wrapper`;let st;if(De){const en=$e||((Te=l.value.slots)===null||Te===void 0?void 0:Te[(Re=we==null?void 0:we.slots)===null||Re===void 0?void 0:Re.icon])||Ae;st=en?p("span",{class:ce(`${Me}-iconEle`,`${Me}-icon__customize`)},[typeof en=="function"?en(L.value):en]):ge()}else ke&&C.value&&(st=ge());let mt;typeof Pe=="function"?mt=Pe(L.value):mt=Pe,mt=mt===void 0?VZ:mt;const bt=p("span",{class:`${Me}-title`},[mt]);return p("span",{ref:E,title:typeof Pe=="string"?Pe:"",class:ce(`${gt}`,`${gt}-${F.value||"normal"}`,!ot&&(S.value||i.value)&&`${Me}-node-selected`),onMouseenter:te,onMouseleave:U,onContextmenu:Q,onClick:G,onDblclick:j},[st,bt,be()])};return()=>{const fe=v(v({},e),n),{eventKey:de,isLeaf:ye,isStart:Oe,isEnd:Te,domRef:Re,active:$e,data:we,onMousemove:Pe,selectable:Me}=fe,De=jZ(fe,["eventKey","isLeaf","isStart","isEnd","domRef","active","data","onMousemove","selectable"]),{prefixCls:Ae,filterTreeNode:ke,keyEntities:ot,dropContainerKey:gt,dropTargetKey:st,draggingNodeKey:mt}=l.value,bt=_.value,en=el(De,{aria:!0,data:!0}),{level:an}=ot[de]||{},hn=Te[Te.length-1],Kt=ae(),An=!bt&&Kt,lo=mt===de,Ro=Me!==void 0?{"aria-selected":!!Me}:void 0;return p("div",D(D({ref:Re,class:ce(n.class,`${Ae}-treenode`,{[`${Ae}-treenode-disabled`]:bt,[`${Ae}-treenode-switcher-${b.value?"open":"close"}`]:!ye,[`${Ae}-treenode-checkbox-checked`]:$.value,[`${Ae}-treenode-checkbox-indeterminate`]:O.value,[`${Ae}-treenode-selected`]:S.value,[`${Ae}-treenode-loading`]:C.value,[`${Ae}-treenode-active`]:$e,[`${Ae}-treenode-leaf-last`]:hn,[`${Ae}-treenode-draggable`]:An,dragging:lo,"drop-target":st===de,"drop-container":gt===de,"drag-over":!bt&&w.value,"drag-over-gap-top":!bt&&P.value,"drag-over-gap-bottom":!bt&&T.value,"filter-node":ke&&ke(z.value)}),style:n.style,draggable:An,"aria-grabbed":lo,onDragstart:An?J:void 0,onDragenter:Kt?X:void 0,onDragover:Kt?q:void 0,onDragleave:Kt?V:void 0,onDrop:Kt?ee:void 0,onDragend:Kt?K:void 0,onMousemove:Pe},Ro),en),[p(zZ,{prefixCls:Ae,level:an,isStart:Oe,isEnd:Te},null),le(),pe(),he(),xe()])}}});function Cr(e,t){if(!e)return[];const n=e.slice(),o=n.indexOf(t);return o>=0&&n.splice(o,1),n}function Kr(e,t){const n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function K1(e){return e.split("-")}function y5(e,t){return`${e}-${t}`}function WZ(e){return e&&e.type&&e.type.isTreeNode}function KZ(e,t){const n=[],o=t[e];function r(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).forEach(l=>{let{key:a,children:s}=l;n.push(a),r(s)})}return r(o.children),n}function UZ(e){if(e.parent){const t=K1(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function GZ(e){const t=K1(e.pos);return Number(t[t.length-1])===0}function r2(e,t,n,o,r,i,l,a,s,c){var u;const{clientX:d,clientY:f}=e,{top:h,height:m}=e.target.getBoundingClientRect(),y=((c==="rtl"?-1:1)*(((r==null?void 0:r.x)||0)-d)-12)/o;let b=a[n.eventKey];if(fR.key===b.key),E=M<=0?0:M-1,A=l[E].key;b=a[A]}const S=b.key,$=b,x=b.key;let C=0,O=0;if(!s.has(S))for(let M=0;M-1.5?i({dragNode:w,dropNode:P,dropPosition:1})?C=1:T=!1:i({dragNode:w,dropNode:P,dropPosition:0})?C=0:i({dragNode:w,dropNode:P,dropPosition:1})?C=1:T=!1:i({dragNode:w,dropNode:P,dropPosition:1})?C=1:T=!1,{dropPosition:C,dropLevelOffset:O,dropTargetKey:b.key,dropTargetPos:b.pos,dragOverNodeKey:x,dropContainerKey:C===0?null:((u=b.parent)===null||u===void 0?void 0:u.key)||null,dropAllowed:T}}function i2(e,t){if(!e)return;const{multiple:n}=t;return n?e.slice():e.length?[e[0]]:e}function Dm(e){if(!e)return null;let t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(typeof e=="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return null;return t}function I0(e,t){const n=new Set;function o(r){if(n.has(r))return;const i=t[r];if(!i)return;n.add(r);const{parent:l,node:a}=i;a.disabled||l&&o(l.key)}return(e||[]).forEach(r=>{o(r)}),[...n]}var XZ=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r0&&arguments[0]!==void 0?arguments[0]:[];return Nt(n).map(r=>{var i,l,a,s;if(!WZ(r))return null;const c=r.children||{},u=r.key,d={};for(const[M,E]of Object.entries(r.props))d[vs(M)]=E;const{isLeaf:f,checkable:h,selectable:m,disabled:g,disableCheckbox:y}=d,b={isLeaf:f||f===""||void 0,checkable:h||h===""||void 0,selectable:m||m===""||void 0,disabled:g||g===""||void 0,disableCheckbox:y||y===""||void 0},S=v(v({},d),b),{title:$=(i=c.title)===null||i===void 0?void 0:i.call(c,S),icon:x=(l=c.icon)===null||l===void 0?void 0:l.call(c,S),switcherIcon:C=(a=c.switcherIcon)===null||a===void 0?void 0:a.call(c,S)}=d,O=XZ(d,["title","icon","switcherIcon"]),w=(s=c.default)===null||s===void 0?void 0:s.call(c),P=v(v(v({},O),{title:$,icon:x,switcherIcon:C,key:u,isLeaf:f}),b),T=t(w);return T.length&&(P.children=T),P})}return t(e)}function YZ(e,t,n){const{_title:o,key:r,children:i}=Kh(n),l=new Set(t===!0?[]:t),a=[];function s(c){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return c.map((d,f)=>{const h=y5(u?u.pos:"0",f),m=Eu(d[r],h);let g;for(let b=0;bf[i]:typeof i=="function"&&(u=f=>i(f)):u=(f,h)=>Eu(f[a],h);function d(f,h,m,g){const y=f?f[c]:e,b=f?y5(m.pos,h):"0",S=f?[...g,f]:[];if(f){const $=u(f,b),x={node:f,index:h,pos:b,key:$,parentPos:m.node?m.pos:null,level:m.level+1,nodes:S};t(x)}y&&y.forEach(($,x)=>{d($,x,{node:f,pos:b,level:m?m.level+1:-1},S)})}d(null)}function _u(e){let{initWrapper:t,processEntity:n,onProcessFinished:o,externalGetKey:r,childrenPropName:i,fieldNames:l}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;const s=r||a,c={},u={};let d={posEntities:c,keyEntities:u};return t&&(d=t(d)||d),qZ(e,f=>{const{node:h,index:m,pos:g,key:y,parentPos:b,level:S,nodes:$}=f,x={node:h,nodes:$,index:m,key:y,pos:g,level:S},C=Eu(y,g);c[g]=x,u[C]=x,x.parent=c[b],x.parent&&(x.parent.children=x.parent.children||[],x.parent.children.push(x)),n&&n(x,d)},{externalGetKey:s,childrenPropName:i,fieldNames:l}),o&&o(d),d}function Ud(e,t){let{expandedKeysSet:n,selectedKeysSet:o,loadedKeysSet:r,loadingKeysSet:i,checkedKeysSet:l,halfCheckedKeysSet:a,dragOverNodeKey:s,dropPosition:c,keyEntities:u}=t;const d=u[e];return{eventKey:e,expanded:n.has(e),selected:o.has(e),loaded:r.has(e),loading:i.has(e),checked:l.has(e),halfChecked:a.has(e),pos:String(d?d.pos:""),parent:d.parent,dragOver:s===e&&c===0,dragOverGapTop:s===e&&c===-1,dragOverGapBottom:s===e&&c===1}}function Gd(e){const{data:t,expanded:n,selected:o,checked:r,loaded:i,loading:l,halfChecked:a,dragOver:s,dragOverGapTop:c,dragOverGapBottom:u,pos:d,active:f,eventKey:h}=e,m=v(v({dataRef:t},t),{expanded:n,selected:o,checked:r,loaded:i,loading:l,halfChecked:a,dragOver:s,dragOverGapTop:c,dragOverGapBottom:u,pos:d,active:f,eventKey:h,key:h});return"props"in m||Object.defineProperty(m,"props",{get(){return e}}),m}const ZZ=(e,t)=>I(()=>_u(e.value,{fieldNames:t.value,initWrapper:o=>v(v({},o),{pathKeyEntities:{}}),processEntity:(o,r)=>{const i=o.nodes.map(l=>l[t.value.value]).join(V1);r.pathKeyEntities[i]=o,o.key=i}}).pathKeyEntities);function JZ(e){const t=oe(!1),n=ie({});return je(()=>{if(!e.value){t.value=!1,n.value={};return}let o={matchInputWidth:!0,limit:50};e.value&&typeof e.value=="object"&&(o=v(v({},o),e.value)),o.limit<=0&&delete o.limit,t.value=!0,n.value=o}),{showSearch:t,searchConfig:n}}const Cc="__rc_cascader_search_mark__",QZ=(e,t,n)=>{let{label:o}=n;return t.some(r=>String(r[o]).toLowerCase().includes(e.toLowerCase()))},eJ=e=>{let{path:t,fieldNames:n}=e;return t.map(o=>o[n.label]).join(" / ")},tJ=(e,t,n,o,r,i)=>I(()=>{const{filter:l=QZ,render:a=eJ,limit:s=50,sort:c}=r.value,u=[];if(!e.value)return[];function d(f,h){f.forEach(m=>{if(!c&&s>0&&u.length>=s)return;const g=[...h,m],y=m[n.value.children];(!y||y.length===0||i.value)&&l(e.value,g,{label:n.value.label})&&u.push(v(v({},m),{[n.value.label]:a({inputValue:e.value,path:g,prefixCls:o.value,fieldNames:n.value}),[Cc]:g})),y&&d(m[n.value.children],g)})}return d(t.value,[]),c&&u.sort((f,h)=>c(f[Cc],h[Cc],e.value,n.value)),s>0?u.slice(0,s):u});function l2(e,t,n){const o=new Set(e);return e.filter(r=>{const i=t[r],l=i?i.parent:null,a=i?i.children:null;return n===p5?!(a&&a.some(s=>s.key&&o.has(s.key))):!(l&&!l.node.disabled&&o.has(l.key))})}function ou(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;var r;let i=t;const l=[];for(let a=0;a{const f=d[n.value];return o?String(f)===String(s):f===s}),u=c!==-1?i==null?void 0:i[c]:null;l.push({value:(r=u==null?void 0:u[n.value])!==null&&r!==void 0?r:s,index:c,option:u}),i=u==null?void 0:u[n.children]}return l}const nJ=(e,t,n)=>I(()=>{const o=[],r=[];return n.value.forEach(i=>{ou(i,e.value,t.value).every(a=>a.option)?r.push(i):o.push(i)}),[r,o]});function S5(e,t){const n=new Set;return e.forEach(o=>{t.has(o)||n.add(o)}),n}function oJ(e){const{disabled:t,disableCheckbox:n,checkable:o}=e||{};return!!(t||n)||o===!1}function rJ(e,t,n,o){const r=new Set(e),i=new Set;for(let a=0;a<=n;a+=1)(t.get(a)||new Set).forEach(c=>{const{key:u,node:d,children:f=[]}=c;r.has(u)&&!o(d)&&f.filter(h=>!o(h.node)).forEach(h=>{r.add(h.key)})});const l=new Set;for(let a=n;a>=0;a-=1)(t.get(a)||new Set).forEach(c=>{const{parent:u,node:d}=c;if(o(d)||!c.parent||l.has(c.parent.key))return;if(o(c.parent.node)){l.add(u.key);return}let f=!0,h=!1;(u.children||[]).filter(m=>!o(m.node)).forEach(m=>{let{key:g}=m;const y=r.has(g);f&&!y&&(f=!1),!h&&(y||i.has(g))&&(h=!0)}),f&&r.add(u.key),h&&i.add(u.key),l.add(u.key)});return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(S5(i,r))}}function iJ(e,t,n,o,r){const i=new Set(e);let l=new Set(t);for(let s=0;s<=o;s+=1)(n.get(s)||new Set).forEach(u=>{const{key:d,node:f,children:h=[]}=u;!i.has(d)&&!l.has(d)&&!r(f)&&h.filter(m=>!r(m.node)).forEach(m=>{i.delete(m.key)})});l=new Set;const a=new Set;for(let s=o;s>=0;s-=1)(n.get(s)||new Set).forEach(u=>{const{parent:d,node:f}=u;if(r(f)||!u.parent||a.has(u.parent.key))return;if(r(u.parent.node)){a.add(d.key);return}let h=!0,m=!1;(d.children||[]).filter(g=>!r(g.node)).forEach(g=>{let{key:y}=g;const b=i.has(y);h&&!b&&(h=!1),!m&&(b||l.has(y))&&(m=!0)}),h||i.delete(d.key),m&&l.add(d.key),a.add(d.key)});return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(S5(l,i))}}function Wo(e,t,n,o,r,i){let l;i?l=i:l=oJ;const a=new Set(e.filter(c=>!!n[c]));let s;return t===!0?s=rJ(a,r,o,l):s=iJ(a,t.halfCheckedKeys,r,o,l),s}const lJ=(e,t,n,o,r)=>I(()=>{const i=r.value||(l=>{let{labels:a}=l;const s=o.value?a.slice(-1):a,c=" / ";return s.every(u=>["string","number"].includes(typeof u))?s.join(c):s.reduce((u,d,f)=>{const h=qt(d)?ht(d,{key:f}):d;return f===0?[h]:[...u,c,h]},[])});return e.value.map(l=>{const a=ou(l,t.value,n.value),s=i({labels:a.map(u=>{let{option:d,value:f}=u;var h;return(h=d==null?void 0:d[n.value.label])!==null&&h!==void 0?h:f}),selectedOptions:a.map(u=>{let{option:d}=u;return d})}),c=Ki(l);return{label:s,value:c,key:c,valueCells:l}})}),$5=Symbol("CascaderContextKey"),aJ=e=>{qe($5,e)},Uh=()=>Ke($5),sJ=()=>{const e=mu(),{values:t}=Uh(),[n,o]=St([]);return Se(()=>e.open,()=>{if(e.open&&!e.multiple){const r=t.value[0];o(r||[])}},{immediate:!0}),[n,o]},cJ=(e,t,n,o,r,i)=>{const l=mu(),a=I(()=>l.direction==="rtl"),[s,c,u]=[ie([]),ie(),ie([])];je(()=>{let g=-1,y=t.value;const b=[],S=[],$=o.value.length;for(let C=0;C<$&&y;C+=1){const O=y.findIndex(w=>w[n.value.value]===o.value[C]);if(O===-1)break;g=O,b.push(g),S.push(o.value[C]),y=y[g][n.value.children]}let x=t.value;for(let C=0;C{r(g)},f=g=>{const y=u.value.length;let b=c.value;b===-1&&g<0&&(b=y);for(let S=0;S{if(s.value.length>1){const g=s.value.slice(0,-1);d(g)}else l.toggleOpen(!1)},m=()=>{var g;const b=(((g=u.value[c.value])===null||g===void 0?void 0:g[n.value.children])||[]).find(S=>!S.disabled);if(b){const S=[...s.value,b[n.value.value]];d(S)}};e.expose({onKeydown:g=>{const{which:y}=g;switch(y){case Ie.UP:case Ie.DOWN:{let b=0;y===Ie.UP?b=-1:y===Ie.DOWN&&(b=1),b!==0&&f(b);break}case Ie.LEFT:{a.value?m():h();break}case Ie.RIGHT:{a.value?h():m();break}case Ie.BACKSPACE:{l.searchValue||h();break}case Ie.ENTER:{if(s.value.length){const b=u.value[c.value],S=(b==null?void 0:b[Cc])||[];S.length?i(S.map($=>$[n.value.value]),S[S.length-1]):i(s.value,b)}break}case Ie.ESC:l.toggleOpen(!1),open&&g.stopPropagation()}},onKeyup:()=>{}})};function Gh(e){let{prefixCls:t,checked:n,halfChecked:o,disabled:r,onClick:i}=e;const{customSlots:l,checkable:a}=Uh(),s=a.value!==!1?l.value.checkable:a.value,c=typeof s=="function"?s():typeof s=="boolean"?null:s;return p("span",{class:{[t]:!0,[`${t}-checked`]:n,[`${t}-indeterminate`]:!n&&o,[`${t}-disabled`]:r},onClick:i},[c])}Gh.props=["prefixCls","checked","halfChecked","disabled","onClick"];Gh.displayName="Checkbox";Gh.inheritAttrs=!1;const C5="__cascader_fix_label__";function Xh(e){let{prefixCls:t,multiple:n,options:o,activeValue:r,prevValuePath:i,onToggleOpen:l,onSelect:a,onActive:s,checkedSet:c,halfCheckedSet:u,loadingKeys:d,isSelectable:f}=e;var h,m,g,y,b,S;const $=`${t}-menu`,x=`${t}-menu-item`,{fieldNames:C,changeOnSelect:O,expandTrigger:w,expandIcon:P,loadingIcon:T,dropdownMenuColumnStyle:M,customSlots:E}=Uh(),A=(h=P.value)!==null&&h!==void 0?h:(g=(m=E.value).expandIcon)===null||g===void 0?void 0:g.call(m),R=(y=T.value)!==null&&y!==void 0?y:(S=(b=E.value).loadingIcon)===null||S===void 0?void 0:S.call(b),F=w.value==="hover";return p("ul",{class:$,role:"menu"},[o.map(_=>{var N;const{disabled:B}=_,L=_[Cc],k=(N=_[C5])!==null&&N!==void 0?N:_[C.value.label],z=_[C.value.value],H=oc(_,C.value),j=L?L.map(X=>X[C.value.value]):[...i,z],Y=Ki(j),Z=d.includes(Y),G=c.has(Y),te=u.has(Y),U=()=>{!B&&(!F||!H)&&s(j)},Q=()=>{f(_)&&a(j,H)};let J;return typeof _.title=="string"?J=_.title:typeof k=="string"&&(J=k),p("li",{key:Y,class:[x,{[`${x}-expand`]:!H,[`${x}-active`]:r===z,[`${x}-disabled`]:B,[`${x}-loading`]:Z}],style:M.value,role:"menuitemcheckbox",title:J,"aria-checked":G,"data-path-key":Y,onClick:()=>{U(),(!n||H)&&Q()},onDblclick:()=>{O.value&&l(!1)},onMouseenter:()=>{F&&U()},onMousedown:X=>{X.preventDefault()}},[n&&p(Gh,{prefixCls:`${t}-checkbox`,checked:G,halfChecked:te,disabled:B,onClick:X=>{X.stopPropagation(),Q()}},null),p("div",{class:`${x}-content`},[k]),!Z&&A&&!H&&p("div",{class:`${x}-expand-icon`},[ht(A)]),Z&&R&&p("div",{class:`${x}-loading-icon`},[ht(R)])])})])}Xh.props=["prefixCls","multiple","options","activeValue","prevValuePath","onToggleOpen","onSelect","onActive","checkedSet","halfCheckedSet","loadingKeys","isSelectable"];Xh.displayName="Column";Xh.inheritAttrs=!1;const uJ=re({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,setup(e,t){const{attrs:n,slots:o}=t,r=mu(),i=ie(),l=I(()=>r.direction==="rtl"),{options:a,values:s,halfValues:c,fieldNames:u,changeOnSelect:d,onSelect:f,searchOptions:h,dropdownPrefixCls:m,loadData:g,expandTrigger:y,customSlots:b}=Uh(),S=I(()=>m.value||r.prefixCls),$=oe([]),x=N=>{if(!g.value||r.searchValue)return;const L=ou(N,a.value,u.value).map(z=>{let{option:H}=z;return H}),k=L[L.length-1];if(k&&!oc(k,u.value)){const z=Ki(N);$.value=[...$.value,z],g.value(L)}};je(()=>{$.value.length&&$.value.forEach(N=>{const B=NZ(N),L=ou(B,a.value,u.value,!0).map(z=>{let{option:H}=z;return H}),k=L[L.length-1];(!k||k[u.value.children]||oc(k,u.value))&&($.value=$.value.filter(z=>z!==N))})});const C=I(()=>new Set(Ba(s.value))),O=I(()=>new Set(Ba(c.value))),[w,P]=sJ(),T=N=>{P(N),x(N)},M=N=>{const{disabled:B}=N,L=oc(N,u.value);return!B&&(L||d.value||r.multiple)},E=function(N,B){let L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;f(N),!r.multiple&&(B||d.value&&(y.value==="hover"||L))&&r.toggleOpen(!1)},A=I(()=>r.searchValue?h.value:a.value),R=I(()=>{const N=[{options:A.value}];let B=A.value;for(let L=0;Lj[u.value.value]===k),H=z==null?void 0:z[u.value.children];if(!(H!=null&&H.length))break;B=H,N.push({options:H})}return N});cJ(t,A,u,w,T,(N,B)=>{M(B)&&E(N,oc(B,u.value),!0)});const _=N=>{N.preventDefault()};return Ue(()=>{Se(w,N=>{var B;for(let L=0;L{var N,B,L,k,z;const{notFoundContent:H=((N=o.notFoundContent)===null||N===void 0?void 0:N.call(o))||((L=(B=b.value).notFoundContent)===null||L===void 0?void 0:L.call(B)),multiple:j,toggleOpen:Y}=r,Z=!(!((z=(k=R.value[0])===null||k===void 0?void 0:k.options)===null||z===void 0)&&z.length),G=[{[u.value.value]:"__EMPTY__",[C5]:H,disabled:!0}],te=v(v({},n),{multiple:!Z&&j,onSelect:E,onActive:T,onToggleOpen:Y,checkedSet:C.value,halfCheckedSet:O.value,loadingKeys:$.value,isSelectable:M}),Q=(Z?[{options:G}]:R.value).map((J,X)=>{const q=w.value.slice(0,X),V=w.value[X];return p(Xh,D(D({key:X},te),{},{prefixCls:S.value,options:J.options,prevValuePath:q,activeValue:V}),null)});return p("div",{class:[`${S.value}-menus`,{[`${S.value}-menu-empty`]:Z,[`${S.value}-rtl`]:l.value}],onMousedown:_,ref:i},[Q])}}});function Yh(e){const t=ie(0),n=oe();return je(()=>{const o=new Map;let r=0;const i=e.value||{};for(const l in i)if(Object.prototype.hasOwnProperty.call(i,l)){const a=i[l],{level:s}=a;let c=o.get(s);c||(c=new Set,o.set(s,c)),c.add(a),r=Math.max(r,s)}t.value=r,n.value=o}),{maxLevel:t,levelEntities:n}}function dJ(){return v(v({},rt(wh(),["tokenSeparators","mode","showSearch"])),{id:String,prefixCls:String,fieldNames:Ne(),children:Array,value:{type:[String,Number,Array]},defaultValue:{type:[String,Number,Array]},changeOnSelect:{type:Boolean,default:void 0},displayRender:Function,checkable:{type:Boolean,default:void 0},showCheckedStrategy:{type:String,default:f5},showSearch:{type:[Boolean,Object],default:void 0},searchValue:String,onSearch:Function,expandTrigger:String,options:Array,dropdownPrefixCls:String,loadData:Function,popupVisible:{type:Boolean,default:void 0},dropdownClassName:String,dropdownMenuColumnStyle:{type:Object,default:void 0},popupStyle:{type:Object,default:void 0},dropdownStyle:{type:Object,default:void 0},popupPlacement:String,placement:String,onPopupVisibleChange:Function,onDropdownVisibleChange:Function,expandIcon:W.any,loadingIcon:W.any})}function x5(){return v(v({},dJ()),{onChange:Function,customSlots:Object})}function fJ(e){return Array.isArray(e)&&Array.isArray(e[0])}function a2(e){return e?fJ(e)?e:(e.length===0?[]:[e]).map(t=>Array.isArray(t)?t:[t]):[]}const pJ=re({compatConfig:{MODE:3},name:"Cascader",inheritAttrs:!1,props:et(x5(),{}),setup(e,t){let{attrs:n,expose:o,slots:r}=t;const i=Ty(We(e,"id")),l=I(()=>!!e.checkable),[a,s]=Mt(e.defaultValue,{value:I(()=>e.value),postState:a2}),c=I(()=>BZ(e.fieldNames)),u=I(()=>e.options||[]),d=ZZ(u,c),f=X=>{const q=d.value;return X.map(V=>{const{nodes:K}=q[V];return K.map(ee=>ee[c.value.value])})},[h,m]=Mt("",{value:I(()=>e.searchValue),postState:X=>X||""}),g=(X,q)=>{m(X),q.source!=="blur"&&e.onSearch&&e.onSearch(X)},{showSearch:y,searchConfig:b}=JZ(We(e,"showSearch")),S=tJ(h,u,c,I(()=>e.dropdownPrefixCls||e.prefixCls),b,We(e,"changeOnSelect")),$=nJ(u,c,a),[x,C,O]=[ie([]),ie([]),ie([])],{maxLevel:w,levelEntities:P}=Yh(d);je(()=>{const[X,q]=$.value;if(!l.value||!a.value.length){[x.value,C.value,O.value]=[X,[],q];return}const V=Ba(X),K=d.value,{checkedKeys:ee,halfCheckedKeys:ue}=Wo(V,!0,K,w.value,P.value);[x.value,C.value,O.value]=[f(ee),f(ue),q]});const T=I(()=>{const X=Ba(x.value),q=l2(X,d.value,e.showCheckedStrategy);return[...O.value,...f(q)]}),M=lJ(T,u,c,l,We(e,"displayRender")),E=X=>{if(s(X),e.onChange){const q=a2(X),V=q.map(ue=>ou(ue,u.value,c.value).map(ae=>ae.option)),K=l.value?q:q[0],ee=l.value?V:V[0];e.onChange(K,ee)}},A=X=>{if(m(""),!l.value)E(X);else{const q=Ki(X),V=Ba(x.value),K=Ba(C.value),ee=V.includes(q),ue=O.value.some(ne=>Ki(ne)===q);let ae=x.value,le=O.value;if(ue&&!ee)le=O.value.filter(ne=>Ki(ne)!==q);else{const ne=ee?V.filter(he=>he!==q):[...V,q];let se;ee?{checkedKeys:se}=Wo(ne,{halfCheckedKeys:K},d.value,w.value,P.value):{checkedKeys:se}=Wo(ne,!0,d.value,w.value,P.value);const pe=l2(se,d.value,e.showCheckedStrategy);ae=f(pe)}E([...le,...ae])}},R=(X,q)=>{if(q.type==="clear"){E([]);return}const{valueCells:V}=q.values[0];A(V)},F=I(()=>e.open!==void 0?e.open:e.popupVisible),_=I(()=>e.dropdownStyle||e.popupStyle||{}),N=I(()=>e.placement||e.popupPlacement),B=X=>{var q,V;(q=e.onDropdownVisibleChange)===null||q===void 0||q.call(e,X),(V=e.onPopupVisibleChange)===null||V===void 0||V.call(e,X)},{changeOnSelect:L,checkable:k,dropdownPrefixCls:z,loadData:H,expandTrigger:j,expandIcon:Y,loadingIcon:Z,dropdownMenuColumnStyle:G,customSlots:te,dropdownClassName:U}=lr(e);aJ({options:u,fieldNames:c,values:x,halfValues:C,changeOnSelect:L,onSelect:A,checkable:k,searchOptions:S,dropdownPrefixCls:z,loadData:H,expandTrigger:j,expandIcon:Y,loadingIcon:Z,dropdownMenuColumnStyle:G,customSlots:te});const Q=ie();o({focus(){var X;(X=Q.value)===null||X===void 0||X.focus()},blur(){var X;(X=Q.value)===null||X===void 0||X.blur()},scrollTo(X){var q;(q=Q.value)===null||q===void 0||q.scrollTo(X)}});const J=I(()=>rt(e,["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","dropdownClassName","dropdownMenuColumnStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","customSlots","showCheckedStrategy","children"]));return()=>{const X=!(h.value?S.value:u.value).length,{dropdownMatchSelectWidth:q=!1}=e,V=h.value&&b.value.matchInputWidth||X?{}:{minWidth:"auto"};return p(Py,D(D(D({},J.value),n),{},{ref:Q,id:i,prefixCls:e.prefixCls,dropdownMatchSelectWidth:q,dropdownStyle:v(v({},_.value),V),displayValues:M.value,onDisplayValuesChange:R,mode:l.value?"multiple":void 0,searchValue:h.value,onSearch:g,showSearch:y.value,OptionList:uJ,emptyOptions:X,open:F.value,dropdownClassName:U.value,placement:N.value,onDropdownVisibleChange:B,getRawInputElement:()=>{var K;return(K=r.default)===null||K===void 0?void 0:K.call(r)}}),r)}}});var hJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};function s2(e){for(var t=1;tHn()&&window.document.documentElement,O5=e=>{if(Hn()&&window.document.documentElement){const t=Array.isArray(e)?e:[e],{documentElement:n}=window.document;return t.some(o=>o in n.style)}return!1},mJ=(e,t)=>{if(!O5(e))return!1;const n=document.createElement("div"),o=n.style[e];return n.style[e]=t,n.style[e]!==o};function U1(e,t){return!Array.isArray(e)&&t!==void 0?mJ(e,t):O5(e)}let Sd;const vJ=()=>{if(!w5())return!1;if(Sd!==void 0)return Sd;const e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),Sd=e.scrollHeight===1,document.body.removeChild(e),Sd},P5=()=>{const e=oe(!1);return Ue(()=>{e.value=vJ()}),e},I5=Symbol("rowContextKey"),bJ=e=>{qe(I5,e)},yJ=()=>Ke(I5,{gutter:I(()=>{}),wrap:I(()=>{}),supportFlexGap:I(()=>{})}),SJ=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around ":{justifyContent:"space-around"},"&-space-evenly ":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},$J=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},CJ=(e,t)=>{const{componentCls:n,gridColumns:o}=e,r={};for(let i=o;i>=0;i--)i===0?(r[`${n}${t}-${i}`]={display:"none"},r[`${n}-push-${i}`]={insetInlineStart:"auto"},r[`${n}-pull-${i}`]={insetInlineEnd:"auto"},r[`${n}${t}-push-${i}`]={insetInlineStart:"auto"},r[`${n}${t}-pull-${i}`]={insetInlineEnd:"auto"},r[`${n}${t}-offset-${i}`]={marginInlineEnd:0},r[`${n}${t}-order-${i}`]={order:0}):(r[`${n}${t}-${i}`]={display:"block",flex:`0 0 ${i/o*100}%`,maxWidth:`${i/o*100}%`},r[`${n}${t}-push-${i}`]={insetInlineStart:`${i/o*100}%`},r[`${n}${t}-pull-${i}`]={insetInlineEnd:`${i/o*100}%`},r[`${n}${t}-offset-${i}`]={marginInlineStart:`${i/o*100}%`},r[`${n}${t}-order-${i}`]={order:i});return r},E0=(e,t)=>CJ(e,t),xJ=(e,t,n)=>({[`@media (min-width: ${t}px)`]:v({},E0(e,n))}),wJ=Xe("Grid",e=>[SJ(e)]),OJ=Xe("Grid",e=>{const t=Fe(e,{gridColumns:24}),n={"-sm":t.screenSMMin,"-md":t.screenMDMin,"-lg":t.screenLGMin,"-xl":t.screenXLMin,"-xxl":t.screenXXLMin};return[$J(t),E0(t,""),E0(t,"-xs"),Object.keys(n).map(o=>xJ(t,n[o],o)).reduce((o,r)=>v(v({},o),r),{})]}),PJ=()=>({align:ze([String,Object]),justify:ze([String,Object]),prefixCls:String,gutter:ze([Number,Array,Object],0),wrap:{type:Boolean,default:void 0}}),G1=re({compatConfig:{MODE:3},name:"ARow",inheritAttrs:!1,props:PJ(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ee("row",e),[l,a]=wJ(r);let s;const c=qy(),u=ie({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),d=ie({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),f=$=>I(()=>{if(typeof e[$]=="string")return e[$];if(typeof e[$]!="object")return"";for(let x=0;x{s=c.value.subscribe($=>{d.value=$;const x=e.gutter||0;(!Array.isArray(x)&&typeof x=="object"||Array.isArray(x)&&(typeof x[0]=="object"||typeof x[1]=="object"))&&(u.value=$)})}),tt(()=>{c.value.unsubscribe(s)});const y=I(()=>{const $=[void 0,void 0],{gutter:x=0}=e;return(Array.isArray(x)?x:[x,void 0]).forEach((O,w)=>{if(typeof O=="object")for(let P=0;Pe.wrap)});const b=I(()=>ce(r.value,{[`${r.value}-no-wrap`]:e.wrap===!1,[`${r.value}-${m.value}`]:m.value,[`${r.value}-${h.value}`]:h.value,[`${r.value}-rtl`]:i.value==="rtl"},o.class,a.value)),S=I(()=>{const $=y.value,x={},C=$[0]!=null&&$[0]>0?`${$[0]/-2}px`:void 0,O=$[1]!=null&&$[1]>0?`${$[1]/-2}px`:void 0;return C&&(x.marginLeft=C,x.marginRight=C),g.value?x.rowGap=`${$[1]}px`:O&&(x.marginTop=O,x.marginBottom=O),x});return()=>{var $;return l(p("div",D(D({},o),{},{class:b.value,style:v(v({},S.value),o.style)}),[($=n.default)===null||$===void 0?void 0:$.call(n)]))}}});function Tl(){return Tl=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xd(e,t,n){return TJ()?Xd=Reflect.construct.bind():Xd=function(r,i,l){var a=[null];a.push.apply(a,i);var s=Function.bind.apply(r,a),c=new s;return l&&ru(c,l.prototype),c},Xd.apply(null,arguments)}function EJ(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function M0(e){var t=typeof Map=="function"?new Map:void 0;return M0=function(o){if(o===null||!EJ(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(o))return t.get(o);t.set(o,r)}function r(){return Xd(o,arguments,_0(this).constructor)}return r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),ru(r,o)},M0(e)}var _J=/%[sdj%]/g,MJ=function(){};function A0(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var o=n.field;t[o]=t[o]||[],t[o].push(n)}),t}function Oo(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o=i)return a;switch(a){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}break;default:return a}});return l}return e}function AJ(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Sn(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||AJ(t)&&typeof e=="string"&&!e)}function RJ(e,t,n){var o=[],r=0,i=e.length;function l(a){o.push.apply(o,a||[]),r++,r===i&&n(o)}e.forEach(function(a){t(a,l)})}function c2(e,t,n){var o=0,r=e.length;function i(l){if(l&&l.length){n(l);return}var a=o;o=o+1,a()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},rc={integer:function(t){return rc.number(t)&&parseInt(t,10)===t},float:function(t){return rc.number(t)&&!rc.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!rc.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(p2.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(FJ())},hex:function(t){return typeof t=="string"&&!!t.match(p2.hex)}},zJ=function(t,n,o,r,i){if(t.required&&n===void 0){T5(t,n,o,r,i);return}var l=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=t.type;l.indexOf(a)>-1?rc[a](n)||r.push(Oo(i.messages.types[a],t.fullField,t.type)):a&&typeof n!==t.type&&r.push(Oo(i.messages.types[a],t.fullField,t.type))},HJ=function(t,n,o,r,i){var l=typeof t.len=="number",a=typeof t.min=="number",s=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,f=typeof n=="number",h=typeof n=="string",m=Array.isArray(n);if(f?d="number":h?d="string":m&&(d="array"),!d)return!1;m&&(u=n.length),h&&(u=n.replace(c,"_").length),l?u!==t.len&&r.push(Oo(i.messages[d].len,t.fullField,t.len)):a&&!s&&ut.max?r.push(Oo(i.messages[d].max,t.fullField,t.max)):a&&s&&(ut.max)&&r.push(Oo(i.messages[d].range,t.fullField,t.min,t.max))},$a="enum",jJ=function(t,n,o,r,i){t[$a]=Array.isArray(t[$a])?t[$a]:[],t[$a].indexOf(n)===-1&&r.push(Oo(i.messages[$a],t.fullField,t[$a].join(", ")))},VJ=function(t,n,o,r,i){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||r.push(Oo(i.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var l=new RegExp(t.pattern);l.test(n)||r.push(Oo(i.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},Ct={required:T5,whitespace:kJ,type:zJ,range:HJ,enum:jJ,pattern:VJ},WJ=function(t,n,o,r,i){var l=[],a=t.required||!t.required&&r.hasOwnProperty(t.field);if(a){if(Sn(n,"string")&&!t.required)return o();Ct.required(t,n,r,l,i,"string"),Sn(n,"string")||(Ct.type(t,n,r,l,i),Ct.range(t,n,r,l,i),Ct.pattern(t,n,r,l,i),t.whitespace===!0&&Ct.whitespace(t,n,r,l,i))}o(l)},KJ=function(t,n,o,r,i){var l=[],a=t.required||!t.required&&r.hasOwnProperty(t.field);if(a){if(Sn(n)&&!t.required)return o();Ct.required(t,n,r,l,i),n!==void 0&&Ct.type(t,n,r,l,i)}o(l)},UJ=function(t,n,o,r,i){var l=[],a=t.required||!t.required&&r.hasOwnProperty(t.field);if(a){if(n===""&&(n=void 0),Sn(n)&&!t.required)return o();Ct.required(t,n,r,l,i),n!==void 0&&(Ct.type(t,n,r,l,i),Ct.range(t,n,r,l,i))}o(l)},GJ=function(t,n,o,r,i){var l=[],a=t.required||!t.required&&r.hasOwnProperty(t.field);if(a){if(Sn(n)&&!t.required)return o();Ct.required(t,n,r,l,i),n!==void 0&&Ct.type(t,n,r,l,i)}o(l)},XJ=function(t,n,o,r,i){var l=[],a=t.required||!t.required&&r.hasOwnProperty(t.field);if(a){if(Sn(n)&&!t.required)return o();Ct.required(t,n,r,l,i),Sn(n)||Ct.type(t,n,r,l,i)}o(l)},YJ=function(t,n,o,r,i){var l=[],a=t.required||!t.required&&r.hasOwnProperty(t.field);if(a){if(Sn(n)&&!t.required)return o();Ct.required(t,n,r,l,i),n!==void 0&&(Ct.type(t,n,r,l,i),Ct.range(t,n,r,l,i))}o(l)},qJ=function(t,n,o,r,i){var l=[],a=t.required||!t.required&&r.hasOwnProperty(t.field);if(a){if(Sn(n)&&!t.required)return o();Ct.required(t,n,r,l,i),n!==void 0&&(Ct.type(t,n,r,l,i),Ct.range(t,n,r,l,i))}o(l)},ZJ=function(t,n,o,r,i){var l=[],a=t.required||!t.required&&r.hasOwnProperty(t.field);if(a){if(n==null&&!t.required)return o();Ct.required(t,n,r,l,i,"array"),n!=null&&(Ct.type(t,n,r,l,i),Ct.range(t,n,r,l,i))}o(l)},JJ=function(t,n,o,r,i){var l=[],a=t.required||!t.required&&r.hasOwnProperty(t.field);if(a){if(Sn(n)&&!t.required)return o();Ct.required(t,n,r,l,i),n!==void 0&&Ct.type(t,n,r,l,i)}o(l)},QJ="enum",eQ=function(t,n,o,r,i){var l=[],a=t.required||!t.required&&r.hasOwnProperty(t.field);if(a){if(Sn(n)&&!t.required)return o();Ct.required(t,n,r,l,i),n!==void 0&&Ct[QJ](t,n,r,l,i)}o(l)},tQ=function(t,n,o,r,i){var l=[],a=t.required||!t.required&&r.hasOwnProperty(t.field);if(a){if(Sn(n,"string")&&!t.required)return o();Ct.required(t,n,r,l,i),Sn(n,"string")||Ct.pattern(t,n,r,l,i)}o(l)},nQ=function(t,n,o,r,i){var l=[],a=t.required||!t.required&&r.hasOwnProperty(t.field);if(a){if(Sn(n,"date")&&!t.required)return o();if(Ct.required(t,n,r,l,i),!Sn(n,"date")){var s;n instanceof Date?s=n:s=new Date(n),Ct.type(t,s,r,l,i),s&&Ct.range(t,s.getTime(),r,l,i)}}o(l)},oQ=function(t,n,o,r,i){var l=[],a=Array.isArray(n)?"array":typeof n;Ct.required(t,n,r,l,i,a),o(l)},Nm=function(t,n,o,r,i){var l=t.type,a=[],s=t.required||!t.required&&r.hasOwnProperty(t.field);if(s){if(Sn(n,l)&&!t.required)return o();Ct.required(t,n,r,a,i,l),Sn(n,l)||Ct.type(t,n,r,a,i)}o(a)},rQ=function(t,n,o,r,i){var l=[],a=t.required||!t.required&&r.hasOwnProperty(t.field);if(a){if(Sn(n)&&!t.required)return o();Ct.required(t,n,r,l,i)}o(l)},xc={string:WJ,method:KJ,number:UJ,boolean:GJ,regexp:XJ,integer:YJ,float:qJ,array:ZJ,object:JJ,enum:eQ,pattern:tQ,date:nQ,url:Nm,hex:Nm,email:Nm,required:oQ,any:rQ};function R0(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var D0=R0(),Mu=function(){function e(n){this.rules=null,this._messages=D0,this.define(n)}var t=e.prototype;return t.define=function(o){var r=this;if(!o)throw new Error("Cannot configure a schema with no rules");if(typeof o!="object"||Array.isArray(o))throw new Error("Rules must be an object");this.rules={},Object.keys(o).forEach(function(i){var l=o[i];r.rules[i]=Array.isArray(l)?l:[l]})},t.messages=function(o){return o&&(this._messages=f2(R0(),o)),this._messages},t.validate=function(o,r,i){var l=this;r===void 0&&(r={}),i===void 0&&(i=function(){});var a=o,s=r,c=i;if(typeof s=="function"&&(c=s,s={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,a),Promise.resolve(a);function u(g){var y=[],b={};function S(x){if(Array.isArray(x)){var C;y=(C=y).concat.apply(C,x)}else y.push(x)}for(var $=0;$3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&o&&n===void 0&&!E5(e,t.slice(0,-1))?e:_5(e,t,n,o)}function N0(e){return Ui(e)}function lQ(e,t){return E5(e,t)}function aQ(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return iQ(e,t,n,o)}function sQ(e,t){return e&&e.some(n=>uQ(n,t))}function h2(e){return typeof e=="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function M5(e,t){const n=Array.isArray(e)?[...e]:v({},e);return t&&Object.keys(t).forEach(o=>{const r=n[o],i=t[o],l=h2(r)&&h2(i);n[o]=l?M5(r,i||{}):i}),n}function cQ(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;oM5(r,i),e)}function g2(e,t){let n={};return t.forEach(o=>{const r=lQ(e,o);n=aQ(n,o,r)}),n}function uQ(e,t){return!e||!t||e.length!==t.length?!1:e.every((n,o)=>t[o]===n)}const So="'${name}' is not a valid ${type}",qh={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:So,method:So,array:So,object:So,number:So,date:So,boolean:So,integer:So,float:So,regexp:So,email:So,url:So,hex:So},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}};var Zh=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(l){l(i)})}return new(n||(n=Promise))(function(i,l){function a(u){try{c(o.next(u))}catch(d){l(d)}}function s(u){try{c(o.throw(u))}catch(d){l(d)}}function c(u){u.done?i(u.value):r(u.value).then(a,s)}c((o=o.apply(e,t||[])).next())})};const dQ=Mu;function fQ(e,t){return e.replace(/\$\{\w+\}/g,n=>{const o=n.slice(2,-1);return t[o]})}function B0(e,t,n,o,r){return Zh(this,void 0,void 0,function*(){const i=v({},n);delete i.ruleIndex,delete i.trigger;let l=null;i&&i.type==="array"&&i.defaultField&&(l=i.defaultField,delete i.defaultField);const a=new dQ({[e]:[i]}),s=cQ({},qh,o.validateMessages);a.messages(s);let c=[];try{yield Promise.resolve(a.validate({[e]:t},v({},o)))}catch(f){f.errors?c=f.errors.map((h,m)=>{let{message:g}=h;return qt(g)?bn(g,{key:`error_${m}`}):g}):(console.error(f),c=[s.default()])}if(!c.length&&l)return(yield Promise.all(t.map((h,m)=>B0(`${e}.${m}`,h,l,o,r)))).reduce((h,m)=>[...h,...m],[]);const u=v(v(v({},n),{name:e,enum:(n.enum||[]).join(", ")}),r);return c.map(f=>typeof f=="string"?fQ(f,u):f)})}function A5(e,t,n,o,r,i){const l=e.join("."),a=n.map((c,u)=>{const d=c.validator,f=v(v({},c),{ruleIndex:u});return d&&(f.validator=(h,m,g)=>{let y=!1;const S=d(h,m,function(){for(var $=arguments.length,x=new Array($),C=0;C<$;C++)x[C]=arguments[C];Promise.resolve().then(()=>{y||g(...x)})});y=S&&typeof S.then=="function"&&typeof S.catch=="function",y&&S.then(()=>{g()}).catch($=>{g($||" ")})}),f}).sort((c,u)=>{let{warningOnly:d,ruleIndex:f}=c,{warningOnly:h,ruleIndex:m}=u;return!!d==!!h?f-m:d?1:-1});let s;if(r===!0)s=new Promise((c,u)=>Zh(this,void 0,void 0,function*(){for(let d=0;dB0(l,t,u,o,i).then(d=>({errors:d,rule:u})));s=(r?hQ(c):pQ(c)).then(u=>Promise.reject(u))}return s.catch(c=>c),s}function pQ(e){return Zh(this,void 0,void 0,function*(){return Promise.all(e).then(t=>[].concat(...t))})}function hQ(e){return Zh(this,void 0,void 0,function*(){let t=0;return new Promise(n=>{e.forEach(o=>{o.then(r=>{r.errors.length&&n([r]),t+=1,t===e.length&&n([])})})})})}const R5=Symbol("formContextKey"),D5=e=>{qe(R5,e)},X1=()=>Ke(R5,{name:I(()=>{}),labelAlign:I(()=>"right"),vertical:I(()=>!1),addField:(e,t)=>{},removeField:e=>{},model:I(()=>{}),rules:I(()=>{}),colon:I(()=>{}),labelWrap:I(()=>{}),labelCol:I(()=>{}),requiredMark:I(()=>!1),validateTrigger:I(()=>{}),onValidate:()=>{},validateMessages:I(()=>qh)}),N5=Symbol("formItemPrefixContextKey"),gQ=e=>{qe(N5,e)},mQ=()=>Ke(N5,{prefixCls:I(()=>"")});function vQ(e){return typeof e=="number"?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}const bQ=()=>({span:[String,Number],order:[String,Number],offset:[String,Number],push:[String,Number],pull:[String,Number],xs:{type:[String,Number,Object],default:void 0},sm:{type:[String,Number,Object],default:void 0},md:{type:[String,Number,Object],default:void 0},lg:{type:[String,Number,Object],default:void 0},xl:{type:[String,Number,Object],default:void 0},xxl:{type:[String,Number,Object],default:void 0},prefixCls:String,flex:[String,Number]}),yQ=["xs","sm","md","lg","xl","xxl"],Jh=re({compatConfig:{MODE:3},name:"ACol",inheritAttrs:!1,props:bQ(),setup(e,t){let{slots:n,attrs:o}=t;const{gutter:r,supportFlexGap:i,wrap:l}=yJ(),{prefixCls:a,direction:s}=Ee("col",e),[c,u]=OJ(a),d=I(()=>{const{span:h,order:m,offset:g,push:y,pull:b}=e,S=a.value;let $={};return yQ.forEach(x=>{let C={};const O=e[x];typeof O=="number"?C.span=O:typeof O=="object"&&(C=O||{}),$=v(v({},$),{[`${S}-${x}-${C.span}`]:C.span!==void 0,[`${S}-${x}-order-${C.order}`]:C.order||C.order===0,[`${S}-${x}-offset-${C.offset}`]:C.offset||C.offset===0,[`${S}-${x}-push-${C.push}`]:C.push||C.push===0,[`${S}-${x}-pull-${C.pull}`]:C.pull||C.pull===0,[`${S}-rtl`]:s.value==="rtl"})}),ce(S,{[`${S}-${h}`]:h!==void 0,[`${S}-order-${m}`]:m,[`${S}-offset-${g}`]:g,[`${S}-push-${y}`]:y,[`${S}-pull-${b}`]:b},$,o.class,u.value)}),f=I(()=>{const{flex:h}=e,m=r.value,g={};if(m&&m[0]>0){const y=`${m[0]/2}px`;g.paddingLeft=y,g.paddingRight=y}if(m&&m[1]>0&&!i.value){const y=`${m[1]/2}px`;g.paddingTop=y,g.paddingBottom=y}return h&&(g.flex=vQ(h),l.value===!1&&!g.minWidth&&(g.minWidth=0)),g});return()=>{var h;return c(p("div",D(D({},o),{},{class:d.value,style:[f.value,o.style]}),[(h=n.default)===null||h===void 0?void 0:h.call(n)]))}}});var SQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};function m2(e){for(var t=1;t{let{slots:n,emit:o,attrs:r}=t;var i,l,a,s,c;const{prefixCls:u,htmlFor:d,labelCol:f,labelAlign:h,colon:m,required:g,requiredMark:y}=v(v({},e),r),[b]=Zo("Form"),S=(i=e.label)!==null&&i!==void 0?i:(l=n.label)===null||l===void 0?void 0:l.call(n);if(!S)return null;const{vertical:$,labelAlign:x,labelCol:C,labelWrap:O,colon:w}=X1(),P=f||(C==null?void 0:C.value)||{},T=h||(x==null?void 0:x.value),M=`${u}-item-label`,E=ce(M,T==="left"&&`${M}-left`,P.class,{[`${M}-wrap`]:!!O.value});let A=S;const R=m===!0||(w==null?void 0:w.value)!==!1&&m!==!1;if(R&&!$.value&&typeof S=="string"&&S.trim()!==""&&(A=S.replace(/[:|:]\s*$/,"")),e.tooltip||n.tooltip){const N=p("span",{class:`${u}-item-tooltip`},[p(ho,{title:e.tooltip},{default:()=>[p(Y1,null,null)]})]);A=p(He,null,[A,n.tooltip?(a=n.tooltip)===null||a===void 0?void 0:a.call(n,{class:`${u}-item-tooltip`}):N])}y==="optional"&&!g&&(A=p(He,null,[A,p("span",{class:`${u}-item-optional`},[((s=b.value)===null||s===void 0?void 0:s.optional)||((c=ro.Form)===null||c===void 0?void 0:c.optional)])]));const _=ce({[`${u}-item-required`]:g,[`${u}-item-required-mark-optional`]:y==="optional",[`${u}-item-no-colon`]:!R});return p(Jh,D(D({},P),{},{class:E}),{default:()=>[p("label",{for:d,class:_,title:typeof S=="string"?S:"",onClick:N=>o("click",N)},[A])]})};q1.displayName="FormItemLabel";q1.inheritAttrs=!1;const CQ=e=>{const{componentCls:t}=e,n=`${t}-show-help`,o=`${t}-show-help-item`;return{[n]:{transition:`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[o]:{overflow:"hidden",transition:`height ${e.motionDurationSlow} ${e.motionEaseInOut}, + opacity ${e.motionDurationSlow} ${e.motionEaseInOut}, + transform ${e.motionDurationSlow} ${e.motionEaseInOut} !important`,[`&${o}-appear, &${o}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${o}-leave-active`]:{transform:"translateY(-5px)"}}}}},xQ=e=>({legend:{display:"block",width:"100%",marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},label:{fontSize:e.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`},output:{display:"block",paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),v2=(e,t)=>{const{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},wQ=e=>{const{componentCls:t}=e;return{[e.componentCls]:v(v(v({},Ze(e)),xQ(e)),{[`${t}-text`]:{display:"inline-block",paddingInlineEnd:e.paddingSM},"&-small":v({},v2(e,e.controlHeightSM)),"&-large":v({},v2(e,e.controlHeightLG))})}},OQ=e=>{const{formItemCls:t,iconCls:n,componentCls:o,rootPrefixCls:r}=e;return{[t]:v(v({},Ze(e)),{marginBottom:e.marginLG,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden, + &-hidden.${r}-row`]:{display:"none"},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{display:"inline-block",flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${e.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:e.controlHeight,color:e.colorTextHeading,fontSize:e.fontSize,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:"top"},[`&${t}-required:not(${t}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:e.marginXXS,color:e.colorError,fontSize:e.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${o}-hide-required-mark &`]:{display:"none"}},[`${t}-optional`]:{display:"inline-block",marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`${o}-hide-required-mark &`]:{display:"none"}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:e.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:e.marginXXS/2,marginInlineEnd:e.marginXS},[`&${t}-no-colon::after`]:{content:'" "'}}},[`${t}-control`]:{display:"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:e.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[t]:{"&-explain, &-extra":{clear:"both",color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:"auto",opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:"center",visibility:"visible",animationName:Xy,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:"none","&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},PQ=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:o}=e;return{[`${t}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:"1 1 0",minWidth:0},[`${n}-label.${o}-col-24 + ${n}-control`]:{minWidth:"unset"}}}},IQ=e=>{const{componentCls:t,formItemCls:n}=e;return{[`${t}-inline`]:{display:"flex",flexWrap:"wrap",[n]:{flex:"none",flexWrap:"nowrap",marginInlineEnd:e.margin,marginBottom:0,"&-with-help":{marginBottom:e.marginLG},[`> ${n}-label, + > ${n}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${n}-label`]:{flex:"none"},[`${t}-text`]:{display:"inline-block"},[`${n}-has-feedback`]:{display:"inline-block"}}}}},_a=e=>({margin:0,padding:`0 0 ${e.paddingXS}px`,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{display:"none"}}}),TQ=e=>{const{componentCls:t,formItemCls:n}=e;return{[`${n} ${n}-label`]:_a(e),[t]:{[n]:{flexWrap:"wrap",[`${n}-label, + ${n}-control`]:{flex:"0 0 100%",maxWidth:"100%"}}}}},EQ=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:o}=e;return{[`${t}-vertical`]:{[n]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${t}-item-control`]:{width:"100%"}}},[`${t}-vertical ${n}-label, + .${o}-col-24${n}-label, + .${o}-col-xl-24${n}-label`]:_a(e),[`@media (max-width: ${e.screenXSMax}px)`]:[TQ(e),{[t]:{[`.${o}-col-xs-24${n}-label`]:_a(e)}}],[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{[`.${o}-col-sm-24${n}-label`]:_a(e)}},[`@media (max-width: ${e.screenMDMax}px)`]:{[t]:{[`.${o}-col-md-24${n}-label`]:_a(e)}},[`@media (max-width: ${e.screenLGMax}px)`]:{[t]:{[`.${o}-col-lg-24${n}-label`]:_a(e)}}}},Z1=Xe("Form",(e,t)=>{let{rootPrefixCls:n}=t;const o=Fe(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:n});return[wQ(o),OQ(o),CQ(o),PQ(o),IQ(o),EQ(o),yu(o),Xy]}),_Q=re({compatConfig:{MODE:3},name:"ErrorList",inheritAttrs:!1,props:["errors","help","onErrorVisibleChanged","helpStatus","warnings"],setup(e,t){let{attrs:n}=t;const{prefixCls:o,status:r}=mQ(),i=I(()=>`${o.value}-item-explain`),l=I(()=>!!(e.errors&&e.errors.length)),a=ie(r.value),[,s]=Z1(o);return Se([l,r],()=>{l.value&&(a.value=r.value)}),()=>{var c,u;const d=xu(`${o.value}-show-help-item`),f=Ch(`${o.value}-show-help-item`,d);return f.role="alert",f.class=[s.value,i.value,n.class,`${o.value}-show-help`],p(rn,D(D({},qo(`${o.value}-show-help`)),{},{onAfterEnter:()=>e.onErrorVisibleChanged(!0),onAfterLeave:()=>e.onErrorVisibleChanged(!1)}),{default:()=>[_n(p(oh,D(D({},f),{},{tag:"div"}),{default:()=>[(u=e.errors)===null||u===void 0?void 0:u.map((h,m)=>p("div",{key:m,class:a.value?`${i.value}-${a.value}`:""},[h]))]}),[[oo,!!(!((c=e.errors)===null||c===void 0)&&c.length)]])]})}}}),MQ=re({compatConfig:{MODE:3},slots:Object,inheritAttrs:!1,props:["prefixCls","errors","hasFeedback","onDomErrorVisibleChange","wrapperCol","help","extra","status","marginBottom","onErrorVisibleChanged"],setup(e,t){let{slots:n}=t;const o=X1(),{wrapperCol:r}=o,i=v({},o);return delete i.labelCol,delete i.wrapperCol,D5(i),gQ({prefixCls:I(()=>e.prefixCls),status:I(()=>e.status)}),()=>{var l,a,s;const{prefixCls:c,wrapperCol:u,marginBottom:d,onErrorVisibleChanged:f,help:h=(l=n.help)===null||l===void 0?void 0:l.call(n),errors:m=Nt((a=n.errors)===null||a===void 0?void 0:a.call(n)),extra:g=(s=n.extra)===null||s===void 0?void 0:s.call(n)}=e,y=`${c}-item`,b=u||(r==null?void 0:r.value)||{},S=ce(`${y}-control`,b.class);return p(Jh,D(D({},b),{},{class:S}),{default:()=>{var $;return p(He,null,[p("div",{class:`${y}-control-input`},[p("div",{class:`${y}-control-input-content`},[($=n.default)===null||$===void 0?void 0:$.call(n)])]),d!==null||m.length?p("div",{style:{display:"flex",flexWrap:"nowrap"}},[p(_Q,{errors:m,help:h,class:`${y}-explain-connected`,onErrorVisibleChanged:f},null),!!d&&p("div",{style:{width:0,height:`${d}px`}},null)]):null,g?p("div",{class:`${y}-extra`},[g]):null])}})}}});function AQ(e){const t=oe(e.value.slice());let n=null;return je(()=>{clearTimeout(n),n=setTimeout(()=>{t.value=e.value},e.value.length?0:10)}),t}Mn("success","warning","error","validating","");const RQ={success:mr,warning:vr,error:Un,validating:io};function Bm(e,t,n){let o=e;const r=t;let i=0;try{for(let l=r.length;i({htmlFor:String,prefixCls:String,label:W.any,help:W.any,extra:W.any,labelCol:{type:Object},wrapperCol:{type:Object},hasFeedback:{type:Boolean,default:!1},colon:{type:Boolean,default:void 0},labelAlign:String,prop:{type:[String,Number,Array]},name:{type:[String,Number,Array]},rules:[Array,Object],autoLink:{type:Boolean,default:!0},required:{type:Boolean,default:void 0},validateFirst:{type:Boolean,default:void 0},validateStatus:W.oneOf(Mn("","success","warning","error","validating")),validateTrigger:{type:[String,Array]},messageVariables:{type:Object},hidden:Boolean,noStyle:Boolean,tooltip:String});let NQ=0;const BQ="form_item",B5=re({compatConfig:{MODE:3},name:"AFormItem",inheritAttrs:!1,__ANT_NEW_FORM_ITEM:!0,props:DQ(),slots:Object,setup(e,t){let{slots:n,attrs:o,expose:r}=t;e.prop;const i=`form-item-${++NQ}`,{prefixCls:l}=Ee("form",e),[a,s]=Z1(l),c=oe(),u=X1(),d=I(()=>e.name||e.prop),f=oe([]),h=oe(!1),m=oe(),g=I(()=>{const G=d.value;return N0(G)}),y=I(()=>{if(g.value.length){const G=u.name.value,te=g.value.join("_");return G?`${G}_${te}`:`${BQ}_${te}`}else return}),b=()=>{const G=u.model.value;if(!(!G||!d.value))return Bm(G,g.value,!0).v},S=I(()=>b()),$=oe(Hd(S.value)),x=I(()=>{let G=e.validateTrigger!==void 0?e.validateTrigger:u.validateTrigger.value;return G=G===void 0?"change":G,Ui(G)}),C=I(()=>{let G=u.rules.value;const te=e.rules,U=e.required!==void 0?{required:!!e.required,trigger:x.value}:[],Q=Bm(G,g.value);G=G?Q.o[Q.k]||Q.v:[];const J=[].concat(te||G||[]);return PW(J,X=>X.required)?J:J.concat(U)}),O=I(()=>{const G=C.value;let te=!1;return G&&G.length&&G.every(U=>U.required?(te=!0,!1):!0),te||e.required}),w=oe();je(()=>{w.value=e.validateStatus});const P=I(()=>{let G={};return typeof e.label=="string"?G.label=e.label:e.name&&(G.label=String(e.name)),e.messageVariables&&(G=v(v({},G),e.messageVariables)),G}),T=G=>{if(g.value.length===0)return;const{validateFirst:te=!1}=e,{triggerName:U}=G||{};let Q=C.value;if(U&&(Q=Q.filter(X=>{const{trigger:q}=X;return!q&&!x.value.length?!0:Ui(q||x.value).includes(U)})),!Q.length)return Promise.resolve();const J=A5(g.value,S.value,Q,v({validateMessages:u.validateMessages.value},G),te,P.value);return w.value="validating",f.value=[],J.catch(X=>X).then(function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(w.value==="validating"){const q=X.filter(V=>V&&V.errors.length);w.value=q.length?"error":"success",f.value=q.map(V=>V.errors),u.onValidate(d.value,!f.value.length,f.value.length?nt(f.value[0]):null)}}),J},M=()=>{T({triggerName:"blur"})},E=()=>{if(h.value){h.value=!1;return}T({triggerName:"change"})},A=()=>{w.value=e.validateStatus,h.value=!1,f.value=[]},R=()=>{var G;w.value=e.validateStatus,h.value=!0,f.value=[];const te=u.model.value||{},U=S.value,Q=Bm(te,g.value,!0);Array.isArray(U)?Q.o[Q.k]=[].concat((G=$.value)!==null&&G!==void 0?G:[]):Q.o[Q.k]=$.value,lt(()=>{h.value=!1})},F=I(()=>e.htmlFor===void 0?y.value:e.htmlFor),_=()=>{const G=F.value;if(!G||!m.value)return;const te=m.value.$el.querySelector(`[id="${G}"]`);te&&te.focus&&te.focus()};r({onFieldBlur:M,onFieldChange:E,clearValidate:A,resetField:R}),DH({id:y,onFieldBlur:()=>{e.autoLink&&M()},onFieldChange:()=>{e.autoLink&&E()},clearValidate:A},I(()=>!!(e.autoLink&&u.model.value&&d.value)));let N=!1;Se(d,G=>{G?N||(N=!0,u.addField(i,{fieldValue:S,fieldId:y,fieldName:d,resetField:R,clearValidate:A,namePath:g,validateRules:T,rules:C})):(N=!1,u.removeField(i))},{immediate:!0}),tt(()=>{u.removeField(i)});const B=AQ(f),L=I(()=>e.validateStatus!==void 0?e.validateStatus:B.value.length?"error":w.value),k=I(()=>({[`${l.value}-item`]:!0,[s.value]:!0,[`${l.value}-item-has-feedback`]:L.value&&e.hasFeedback,[`${l.value}-item-has-success`]:L.value==="success",[`${l.value}-item-has-warning`]:L.value==="warning",[`${l.value}-item-has-error`]:L.value==="error",[`${l.value}-item-is-validating`]:L.value==="validating",[`${l.value}-item-hidden`]:e.hidden})),z=ft({});yn.useProvide(z),je(()=>{let G;if(e.hasFeedback){const te=L.value&&RQ[L.value];G=te?p("span",{class:ce(`${l.value}-item-feedback-icon`,`${l.value}-item-feedback-icon-${L.value}`)},[p(te,null,null)]):null}v(z,{status:L.value,hasFeedback:e.hasFeedback,feedbackIcon:G,isFormItemInput:!0})});const H=oe(null),j=oe(!1),Y=()=>{if(c.value){const G=getComputedStyle(c.value);H.value=parseInt(G.marginBottom,10)}};Ue(()=>{Se(j,()=>{j.value&&Y()},{flush:"post",immediate:!0})});const Z=G=>{G||(H.value=null)};return()=>{var G,te;if(e.noStyle)return(G=n.default)===null||G===void 0?void 0:G.call(n);const U=(te=e.help)!==null&&te!==void 0?te:n.help?Nt(n.help()):null,Q=!!(U!=null&&Array.isArray(U)&&U.length||B.value.length);return j.value=Q,a(p("div",{class:[k.value,Q?`${l.value}-item-with-help`:"",o.class],ref:c},[p(G1,D(D({},o),{},{class:`${l.value}-item-row`,key:"row"}),{default:()=>{var J,X;return p(He,null,[p(q1,D(D({},e),{},{htmlFor:F.value,required:O.value,requiredMark:u.requiredMark.value,prefixCls:l.value,onClick:_,label:e.label}),{label:n.label,tooltip:n.tooltip}),p(MQ,D(D({},e),{},{errors:U!=null?Ui(U):B.value,marginBottom:H.value,prefixCls:l.value,status:L.value,ref:m,help:U,extra:(J=e.extra)!==null&&J!==void 0?J:(X=n.extra)===null||X===void 0?void 0:X.call(n),onErrorVisibleChanged:Z}),{default:n.default})])}}),!!H.value&&p("div",{class:`${l.value}-margin-offset`,style:{marginBottom:`-${H.value}px`}},null)]))}}});function L5(e){let t=!1,n=e.length;const o=[];return e.length?new Promise((r,i)=>{e.forEach((l,a)=>{l.catch(s=>(t=!0,s)).then(s=>{n-=1,o[a]=s,!(n>0)&&(t&&i(o),r(o))})})}):Promise.resolve([])}function b2(e){let t=!1;return e&&e.length&&e.every(n=>n.required?(t=!0,!1):!0),t}function y2(e){return e==null?[]:Array.isArray(e)?e:[e]}function Lm(e,t,n){let o=e;t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,"");const r=t.split(".");let i=0;for(let l=r.length;i1&&arguments[1]!==void 0?arguments[1]:ie({}),n=arguments.length>2?arguments[2]:void 0;const o=Hd(ct(e)),r=ft({}),i=oe([]),l=$=>{v(ct(e),v(v({},Hd(o)),$)),lt(()=>{Object.keys(r).forEach(x=>{r[x]={autoLink:!1,required:b2(ct(t)[x])}})})},a=function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],x=arguments.length>1?arguments[1]:void 0;return x.length?$.filter(C=>{const O=y2(C.trigger||"change");return MW(O,x).length}):$};let s=null;const c=function($){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=arguments.length>2?arguments[2]:void 0;const O=[],w={};for(let M=0;M<$.length;M++){const E=$[M],A=Lm(ct(e),E,C);if(!A.isValid)continue;w[E]=A.v;const R=a(ct(t)[E],y2(x&&x.trigger));R.length&&O.push(u(E,A.v,R,x||{}).then(()=>({name:E,errors:[],warnings:[]})).catch(F=>{const _=[],N=[];return F.forEach(B=>{let{rule:{warningOnly:L},errors:k}=B;L?N.push(...k):_.push(...k)}),_.length?Promise.reject({name:E,errors:_,warnings:N}):{name:E,errors:_,warnings:N}}))}const P=L5(O);s=P;const T=P.then(()=>s===P?Promise.resolve(w):Promise.reject([])).catch(M=>{const E=M.filter(A=>A&&A.errors.length);return E.length?Promise.reject({values:w,errorFields:E,outOfDate:s!==P}):Promise.resolve(w)});return T.catch(M=>M),T},u=function($,x,C){let O=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const w=A5([$],x,C,v({validateMessages:qh},O),!!O.validateFirst);return r[$]?(r[$].validateStatus="validating",w.catch(P=>P).then(function(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];var T;if(r[$].validateStatus==="validating"){const M=P.filter(E=>E&&E.errors.length);r[$].validateStatus=M.length?"error":"success",r[$].help=M.length?M.map(E=>E.errors):null,(T=n==null?void 0:n.onValidate)===null||T===void 0||T.call(n,$,!M.length,M.length?nt(r[$].help[0]):null)}}),w):w.catch(P=>P)},d=($,x)=>{let C=[],O=!0;$?Array.isArray($)?C=$:C=[$]:(O=!1,C=i.value);const w=c(C,x||{},O);return w.catch(P=>P),w},f=$=>{let x=[];$?Array.isArray($)?x=$:x=[$]:x=i.value,x.forEach(C=>{r[C]&&v(r[C],{validateStatus:"",help:null})})},h=$=>{const x={autoLink:!1},C=[],O=Array.isArray($)?$:[$];for(let w=0;w{const x=[];i.value.forEach(C=>{const O=Lm($,C,!1),w=Lm(m,C,!1);(g&&(n==null?void 0:n.immediate)&&O.isValid||!$y(O.v,w.v))&&x.push(C)}),d(x,{trigger:"change"}),g=!1,m=Hd(nt($))},b=n==null?void 0:n.debounce;let S=!0;return Se(t,()=>{i.value=t?Object.keys(ct(t)):[],!S&&n&&n.validateOnRuleChange&&d(),S=!1},{deep:!0,immediate:!0}),Se(i,()=>{const $={};i.value.forEach(x=>{$[x]=v({},r[x],{autoLink:!1,required:b2(ct(t)[x])}),delete r[x]});for(const x in r)Object.prototype.hasOwnProperty.call(r,x)&&delete r[x];v(r,$)},{immediate:!0}),Se(e,b&&b.wait?Uy(y,b.wait,UW(b,["wait"])):y,{immediate:n&&!!n.immediate,deep:!0}),{modelRef:e,rulesRef:t,initialModel:o,validateInfos:r,resetFields:l,validate:d,validateField:u,mergeValidateInfo:h,clearValidate:f}}const kQ=()=>({layout:W.oneOf(Mn("horizontal","inline","vertical")),labelCol:Ne(),wrapperCol:Ne(),colon:Ce(),labelAlign:Be(),labelWrap:Ce(),prefixCls:String,requiredMark:ze([String,Boolean]),hideRequiredMark:Ce(),model:W.object,rules:Ne(),validateMessages:Ne(),validateOnRuleChange:Ce(),scrollToFirstError:wt(),onSubmit:ve(),name:String,validateTrigger:ze([String,Array]),size:Be(),disabled:Ce(),onValuesChange:ve(),onFieldsChange:ve(),onFinish:ve(),onFinishFailed:ve(),onValidate:ve()});function FQ(e,t){return $y(Ui(e),Ui(t))}const Li=re({compatConfig:{MODE:3},name:"AForm",inheritAttrs:!1,props:et(kQ(),{layout:"horizontal",hideRequiredMark:!1,colon:!0}),Item:B5,useForm:LQ,setup(e,t){let{emit:n,slots:o,expose:r,attrs:i}=t;const{prefixCls:l,direction:a,form:s,size:c,disabled:u}=Ee("form",e),d=I(()=>e.requiredMark===""||e.requiredMark),f=I(()=>{var B;return d.value!==void 0?d.value:s&&((B=s.value)===null||B===void 0?void 0:B.requiredMark)!==void 0?s.value.requiredMark:!e.hideRequiredMark});n8(c),x6(u);const h=I(()=>{var B,L;return(B=e.colon)!==null&&B!==void 0?B:(L=s.value)===null||L===void 0?void 0:L.colon}),{validateMessages:m}=HD(),g=I(()=>v(v(v({},qh),m.value),e.validateMessages)),[y,b]=Z1(l),S=I(()=>ce(l.value,{[`${l.value}-${e.layout}`]:!0,[`${l.value}-hide-required-mark`]:f.value===!1,[`${l.value}-rtl`]:a.value==="rtl",[`${l.value}-${c.value}`]:c.value},b.value)),$=ie(),x={},C=(B,L)=>{x[B]=L},O=B=>{delete x[B]},w=B=>{const L=!!B,k=L?Ui(B).map(N0):[];return L?Object.values(x).filter(z=>k.findIndex(H=>FQ(H,z.fieldName.value))>-1):Object.values(x)},P=B=>{e.model&&w(B).forEach(L=>{L.resetField()})},T=B=>{w(B).forEach(L=>{L.clearValidate()})},M=B=>{const{scrollToFirstError:L}=e;if(n("finishFailed",B),L&&B.errorFields.length){let k={};typeof L=="object"&&(k=L),A(B.errorFields[0].name,k)}},E=function(){return _(...arguments)},A=function(B){let L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const k=w(B?[B]:void 0);if(k.length){const z=k[0].fieldId.value,H=z?document.getElementById(z):null;H&&i8(H,v({scrollMode:"if-needed",block:"nearest"},L))}},R=function(){let B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(B===!0){const L=[];return Object.values(x).forEach(k=>{let{namePath:z}=k;L.push(z.value)}),g2(e.model,L)}else return g2(e.model,B)},F=(B,L)=>{if(!e.model)return Promise.reject("Form `model` is required for validateFields to work.");const k=!!B,z=k?Ui(B).map(N0):[],H=[];Object.values(x).forEach(Z=>{var G;if(k||z.push(Z.namePath.value),!(!((G=Z.rules)===null||G===void 0)&&G.value.length))return;const te=Z.namePath.value;if(!k||sQ(z,te)){const U=Z.validateRules(v({validateMessages:g.value},L));H.push(U.then(()=>({name:te,errors:[],warnings:[]})).catch(Q=>{const J=[],X=[];return Q.forEach(q=>{let{rule:{warningOnly:V},errors:K}=q;V?X.push(...K):J.push(...K)}),J.length?Promise.reject({name:te,errors:J,warnings:X}):{name:te,errors:J,warnings:X}}))}});const j=L5(H);$.value=j;const Y=j.then(()=>$.value===j?Promise.resolve(R(z)):Promise.reject([])).catch(Z=>{const G=Z.filter(te=>te&&te.errors.length);return Promise.reject({values:R(z),errorFields:G,outOfDate:$.value!==j})});return Y.catch(Z=>Z),Y},_=function(){return F(...arguments)},N=B=>{B.preventDefault(),B.stopPropagation(),n("submit",B),e.model&&F().then(k=>{n("finish",k)}).catch(k=>{M(k)})};return r({resetFields:P,clearValidate:T,validateFields:F,getFieldsValue:R,validate:E,scrollToField:A}),D5({model:I(()=>e.model),name:I(()=>e.name),labelAlign:I(()=>e.labelAlign),labelCol:I(()=>e.labelCol),labelWrap:I(()=>e.labelWrap),wrapperCol:I(()=>e.wrapperCol),vertical:I(()=>e.layout==="vertical"),colon:h,requiredMark:f,validateTrigger:I(()=>e.validateTrigger),rules:I(()=>e.rules),addField:C,removeField:O,onValidate:(B,L,k)=>{n("validate",B,L,k)},validateMessages:g}),Se(()=>e.rules,()=>{e.validateOnRuleChange&&F()}),()=>{var B;return y(p("form",D(D({},i),{},{onSubmit:N,class:[S.value,i.class]}),[(B=o.default)===null||B===void 0?void 0:B.call(o)]))}}});Li.useInjectFormItemContext=ln;Li.ItemRest=Jf;Li.install=function(e){return e.component(Li.name,Li),e.component(Li.Item.name,Li.Item),e.component(Jf.name,Jf),e};const zQ=new it("antCheckboxEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),HQ=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return[{[`${t}-group`]:v(v({},Ze(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:v(v({},Ze(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:v(v({},Ze(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:v({},fi(e))},[`${t}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.checkboxSize/14*5,height:e.checkboxSize/14*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[t]:{"&-indeterminate":{[`${t}-inner`]:{"&:after":{top:"50%",insetInlineStart:"50%",width:e.fontSizeLG/2,height:e.fontSizeLG/2,backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${n}:hover ${t}:after`]:{visibility:"visible"},[` + ${n}:not(${n}-disabled), + ${t}:not(${t}-disabled) + `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}},"&:after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderRadius:e.borderRadiusSM,visibility:"hidden",border:`${e.lineWidthBold}px solid ${e.colorPrimary}`,animationName:zQ,animationDuration:e.motionDurationSlow,animationTimingFunction:"ease-in-out",animationFillMode:"backwards",content:'""',transition:`all ${e.motionDurationSlow}`}},[` + ${n}-checked:not(${n}-disabled), + ${t}-checked:not(${t}-disabled) + `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}:after`]:{borderColor:e.colorPrimaryHover}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function Qh(e,t){const n=Fe(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return[HQ(n)]}const k5=Xe("Checkbox",(e,t)=>{let{prefixCls:n}=t;return[Qh(n,e)]}),jQ=e=>{const{prefixCls:t,componentCls:n,antCls:o}=e,r=`${n}-menu-item`,i=` + &${r}-expand ${r}-expand-icon, + ${r}-loading-icon + `,l=Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2);return[{[n]:{width:e.controlWidth}},{[`${n}-dropdown`]:[Qh(`${t}-checkbox`,e),{[`&${o}-select-dropdown`]:{padding:0}},{[n]:{"&-checkbox":{top:0,marginInlineEnd:e.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${n}-menu-empty`]:{[`${n}-menu`]:{width:"100%",height:"auto",[r]:{color:e.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:e.controlItemWidth,height:e.dropdownHeight,margin:0,padding:e.paddingXXS,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},"&-item":v(v({},Zt),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:`${l}px ${e.paddingSM}px`,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationMid}`,borderRadius:e.borderRadiusSM,"&:hover":{background:e.controlItemBgHover},"&-disabled":{color:e.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[i]:{color:e.colorTextDisabled}},[`&-active:not(${r}-disabled)`]:{"&, &:hover":{fontWeight:e.fontWeightStrong,backgroundColor:e.controlItemBgActive}},"&-content":{flex:"auto"},[i]:{marginInlineStart:e.paddingXXS,color:e.colorTextDescription,fontSize:e.fontSizeIcon},"&-keyword":{color:e.colorHighlight}})}}}]},{[`${n}-dropdown-rtl`]:{direction:"rtl"}},Os(e)]},VQ=Xe("Cascader",e=>[jQ(e)],{controlWidth:184,controlItemWidth:111,dropdownHeight:180});var WQ=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rs===0?[a]:[...l,t,a],[]),r=[];let i=0;return o.forEach((l,a)=>{const s=i+l.length;let c=e.slice(i,s);i=s,a%2===1&&(c=p("span",{class:`${n}-menu-item-keyword`,key:"seperator"},[c])),r.push(c)}),r}const UQ=e=>{let{inputValue:t,path:n,prefixCls:o,fieldNames:r}=e;const i=[],l=t.toLowerCase();return n.forEach((a,s)=>{s!==0&&i.push(" / ");let c=a[r.label];const u=typeof c;(u==="string"||u==="number")&&(c=KQ(String(c),l,o)),i.push(c)}),i};function GQ(){return v(v({},rt(x5(),["customSlots","checkable","options"])),{multiple:{type:Boolean,default:void 0},size:String,bordered:{type:Boolean,default:void 0},placement:{type:String},suffixIcon:W.any,status:String,options:Array,popupClassName:String,dropdownClassName:String,"onUpdate:value":Function})}const XQ=re({compatConfig:{MODE:3},name:"ACascader",inheritAttrs:!1,props:et(GQ(),{bordered:!0,choiceTransitionName:"",allowClear:!0}),setup(e,t){let{attrs:n,expose:o,slots:r,emit:i}=t;const l=ln(),a=yn.useInject(),s=I(()=>gr(a.status,e.status)),{prefixCls:c,rootPrefixCls:u,getPrefixCls:d,direction:f,getPopupContainer:h,renderEmpty:m,size:g,disabled:y}=Ee("cascader",e),b=I(()=>d("select",e.prefixCls)),{compactSize:S,compactItemClassnames:$}=ol(b,f),x=I(()=>S.value||g.value),C=mo(),O=I(()=>{var L;return(L=y.value)!==null&&L!==void 0?L:C.value}),[w,P]=Yy(b),[T]=VQ(c),M=I(()=>f.value==="rtl"),E=I(()=>{if(!e.showSearch)return e.showSearch;let L={render:UQ};return typeof e.showSearch=="object"&&(L=v(v({},L),e.showSearch)),L}),A=I(()=>ce(e.popupClassName||e.dropdownClassName,`${c.value}-dropdown`,{[`${c.value}-dropdown-rtl`]:M.value},P.value)),R=ie();o({focus(){var L;(L=R.value)===null||L===void 0||L.focus()},blur(){var L;(L=R.value)===null||L===void 0||L.blur()}});const F=function(){for(var L=arguments.length,k=new Array(L),z=0;ze.showArrow!==void 0?e.showArrow:e.loading||!e.multiple),B=I(()=>e.placement!==void 0?e.placement:f.value==="rtl"?"bottomRight":"bottomLeft");return()=>{var L,k;const{notFoundContent:z=(L=r.notFoundContent)===null||L===void 0?void 0:L.call(r),expandIcon:H=(k=r.expandIcon)===null||k===void 0?void 0:k.call(r),multiple:j,bordered:Y,allowClear:Z,choiceTransitionName:G,transitionName:te,id:U=l.id.value}=e,Q=WQ(e,["notFoundContent","expandIcon","multiple","bordered","allowClear","choiceTransitionName","transitionName","id"]),J=z||m("Cascader");let X=H;H||(X=M.value?p(Lr,null,null):p(Ao,null,null));const q=p("span",{class:`${b.value}-menu-item-loading-icon`},[p(io,{spin:!0},null)]),{suffixIcon:V,removeIcon:K,clearIcon:ee}=Ry(v(v({},e),{hasFeedback:a.hasFeedback,feedbackIcon:a.feedbackIcon,multiple:j,prefixCls:b.value,showArrow:N.value}),r);return T(w(p(pJ,D(D(D({},Q),n),{},{id:U,prefixCls:b.value,class:[c.value,{[`${b.value}-lg`]:x.value==="large",[`${b.value}-sm`]:x.value==="small",[`${b.value}-rtl`]:M.value,[`${b.value}-borderless`]:!Y,[`${b.value}-in-form-item`]:a.isFormItemInput},Fn(b.value,s.value,a.hasFeedback),$.value,n.class,P.value],disabled:O.value,direction:f.value,placement:B.value,notFoundContent:J,allowClear:Z,showSearch:E.value,expandIcon:X,inputIcon:V,removeIcon:K,clearIcon:ee,loadingIcon:q,checkable:!!j,dropdownClassName:A.value,dropdownPrefixCls:c.value,choiceTransitionName:jn(u.value,"",G),transitionName:jn(u.value,Cy(B.value),te),getPopupContainer:h==null?void 0:h.value,customSlots:v(v({},r),{checkable:()=>p("span",{class:`${c.value}-checkbox-inner`},null)}),tagRender:e.tagRender||r.tagRender,displayRender:e.displayRender||r.displayRender,maxTagPlaceholder:e.maxTagPlaceholder||r.maxTagPlaceholder,showArrow:a.hasFeedback||e.showArrow,onChange:F,onBlur:_,ref:R}),r)))}}}),YQ=At(v(XQ,{SHOW_CHILD:p5,SHOW_PARENT:f5})),qQ=()=>({name:String,prefixCls:String,options:ut([]),disabled:Boolean,id:String}),ZQ=()=>v(v({},qQ()),{defaultValue:ut(),value:ut(),onChange:ve(),"onUpdate:value":ve()}),JQ=()=>({prefixCls:String,defaultChecked:Ce(),checked:Ce(),disabled:Ce(),isGroup:Ce(),value:W.any,name:String,id:String,indeterminate:Ce(),type:Be("checkbox"),autofocus:Ce(),onChange:ve(),"onUpdate:checked":ve(),onClick:ve(),skipGroup:Ce(!1)}),QQ=()=>v(v({},JQ()),{indeterminate:Ce(!1)}),F5=Symbol("CheckboxGroupContext");var S2=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r(m==null?void 0:m.disabled.value)||u.value);je(()=>{!e.skipGroup&&m&&m.registerValue(g,e.value)}),tt(()=>{m&&m.cancelValue(g)}),Ue(()=>{Eo(!!(e.checked!==void 0||m||e.value===void 0))});const b=C=>{const O=C.target.checked;n("update:checked",O),n("change",C),l.onFieldChange()},S=ie();return i({focus:()=>{var C;(C=S.value)===null||C===void 0||C.focus()},blur:()=>{var C;(C=S.value)===null||C===void 0||C.blur()}}),()=>{var C;const O=xt((C=r.default)===null||C===void 0?void 0:C.call(r)),{indeterminate:w,skipGroup:P,id:T=l.id.value}=e,M=S2(e,["indeterminate","skipGroup","id"]),{onMouseenter:E,onMouseleave:A,onInput:R,class:F,style:_}=o,N=S2(o,["onMouseenter","onMouseleave","onInput","class","style"]),B=v(v(v(v({},M),{id:T,prefixCls:s.value}),N),{disabled:y.value});m&&!P?(B.onChange=function(){for(var H=arguments.length,j=new Array(H),Y=0;Y`${a.value}-group`),[u,d]=k5(c),f=ie((e.value===void 0?e.defaultValue:e.value)||[]);Se(()=>e.value,()=>{f.value=e.value||[]});const h=I(()=>e.options.map(x=>typeof x=="string"||typeof x=="number"?{label:x,value:x}:x)),m=ie(Symbol()),g=ie(new Map),y=x=>{g.value.delete(x),m.value=Symbol()},b=(x,C)=>{g.value.set(x,C),m.value=Symbol()},S=ie(new Map);return Se(m,()=>{const x=new Map;for(const C of g.value.values())x.set(C,!0);S.value=x}),qe(F5,{cancelValue:y,registerValue:b,toggleOption:x=>{const C=f.value.indexOf(x.value),O=[...f.value];C===-1?O.push(x.value):O.splice(C,1),e.value===void 0&&(f.value=O);const w=O.filter(P=>S.value.has(P)).sort((P,T)=>{const M=h.value.findIndex(A=>A.value===P),E=h.value.findIndex(A=>A.value===T);return M-E});r("update:value",w),r("change",w),l.onFieldChange()},mergedValue:f,name:I(()=>e.name),disabled:I(()=>e.disabled)}),i({mergedValue:f}),()=>{var x;const{id:C=l.id.value}=e;let O=null;return h.value&&h.value.length>0&&(O=h.value.map(w=>{var P;return p(Ko,{prefixCls:a.value,key:w.value.toString(),disabled:"disabled"in w?w.disabled:e.disabled,indeterminate:w.indeterminate,value:w.value,checked:f.value.indexOf(w.value)!==-1,onChange:w.onChange,class:`${c.value}-item`},{default:()=>[n.label!==void 0?(P=n.label)===null||P===void 0?void 0:P.call(n,w):w.label]})})),u(p("div",D(D({},o),{},{class:[c.value,{[`${c.value}-rtl`]:s.value==="rtl"},o.class,d.value],id:C}),[O||((x=n.default)===null||x===void 0?void 0:x.call(n))]))}}});Ko.Group=$p;Ko.install=function(e){return e.component(Ko.name,Ko),e.component($p.name,$p),e};const eee={useBreakpoint:Ps},tee=At(Jh),nee=e=>{const{componentCls:t,commentBg:n,commentPaddingBase:o,commentNestIndent:r,commentFontSizeBase:i,commentFontSizeSm:l,commentAuthorNameColor:a,commentAuthorTimeColor:s,commentActionColor:c,commentActionHoverColor:u,commentActionsMarginBottom:d,commentActionsMarginTop:f,commentContentDetailPMarginBottom:h}=e;return{[t]:{position:"relative",backgroundColor:n,[`${t}-inner`]:{display:"flex",padding:o},[`${t}-avatar`]:{position:"relative",flexShrink:0,marginRight:e.marginSM,cursor:"pointer",img:{width:"32px",height:"32px",borderRadius:"50%"}},[`${t}-content`]:{position:"relative",flex:"1 1 auto",minWidth:"1px",fontSize:i,wordWrap:"break-word","&-author":{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginBottom:e.marginXXS,fontSize:i,"& > a,& > span":{paddingRight:e.paddingXS,fontSize:l,lineHeight:"18px"},"&-name":{color:a,fontSize:i,transition:`color ${e.motionDurationSlow}`,"> *":{color:a,"&:hover":{color:a}}},"&-time":{color:s,whiteSpace:"nowrap",cursor:"auto"}},"&-detail p":{marginBottom:h,whiteSpace:"pre-wrap"}},[`${t}-actions`]:{marginTop:f,marginBottom:d,paddingLeft:0,"> li":{display:"inline-block",color:c,"> span":{marginRight:"10px",color:c,fontSize:l,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,userSelect:"none","&:hover":{color:u}}}},[`${t}-nested`]:{marginLeft:r},"&-rtl":{direction:"rtl"}}}},oee=Xe("Comment",e=>{const t=Fe(e,{commentBg:"inherit",commentPaddingBase:`${e.paddingMD}px 0`,commentNestIndent:"44px",commentFontSizeBase:e.fontSize,commentFontSizeSm:e.fontSizeSM,commentAuthorNameColor:e.colorTextTertiary,commentAuthorTimeColor:e.colorTextPlaceholder,commentActionColor:e.colorTextTertiary,commentActionHoverColor:e.colorTextSecondary,commentActionsMarginBottom:"inherit",commentActionsMarginTop:e.marginSM,commentContentDetailPMarginBottom:"inherit"});return[nee(t)]}),ree=()=>({actions:Array,author:W.any,avatar:W.any,content:W.any,prefixCls:String,datetime:W.any}),iee=re({compatConfig:{MODE:3},name:"AComment",inheritAttrs:!1,props:ree(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ee("comment",e),[l,a]=oee(r),s=(u,d)=>p("div",{class:`${u}-nested`},[d]),c=u=>!u||!u.length?null:u.map((f,h)=>p("li",{key:`action-${h}`},[f]));return()=>{var u,d,f,h,m,g,y,b,S,$,x;const C=r.value,O=(u=e.actions)!==null&&u!==void 0?u:(d=n.actions)===null||d===void 0?void 0:d.call(n),w=(f=e.author)!==null&&f!==void 0?f:(h=n.author)===null||h===void 0?void 0:h.call(n),P=(m=e.avatar)!==null&&m!==void 0?m:(g=n.avatar)===null||g===void 0?void 0:g.call(n),T=(y=e.content)!==null&&y!==void 0?y:(b=n.content)===null||b===void 0?void 0:b.call(n),M=(S=e.datetime)!==null&&S!==void 0?S:($=n.datetime)===null||$===void 0?void 0:$.call(n),E=p("div",{class:`${C}-avatar`},[typeof P=="string"?p("img",{src:P,alt:"comment-avatar"},null):P]),A=O?p("ul",{class:`${C}-actions`},[c(Array.isArray(O)?O:[O])]):null,R=p("div",{class:`${C}-content-author`},[w&&p("span",{class:`${C}-content-author-name`},[w]),M&&p("span",{class:`${C}-content-author-time`},[M])]),F=p("div",{class:`${C}-content`},[R,p("div",{class:`${C}-content-detail`},[T]),A]),_=p("div",{class:`${C}-inner`},[E,F]),N=xt((x=n.default)===null||x===void 0?void 0:x.call(n));return l(p("div",D(D({},o),{},{class:[C,{[`${C}-rtl`]:i.value==="rtl"},o.class,a.value]}),[_,N&&N.length?s(C,N):null]))}}}),lee=At(iee);let Yd=v({},ro.Modal);function aee(e){e?Yd=v(v({},Yd),e):Yd=v({},ro.Modal)}function see(){return Yd}const L0="internalMark",qd=re({compatConfig:{MODE:3},name:"ALocaleProvider",props:{locale:{type:Object},ANT_MARK__:String},setup(e,t){let{slots:n}=t;Eo(e.ANT_MARK__===L0);const o=ft({antLocale:v(v({},e.locale),{exist:!0}),ANT_MARK__:L0});return qe("localeData",o),Se(()=>e.locale,r=>{aee(r&&r.Modal),o.antLocale=v(v({},r),{exist:!0})},{immediate:!0}),()=>{var r;return(r=n.default)===null||r===void 0?void 0:r.call(n)}}});qd.install=function(e){return e.component(qd.name,qd),e};const z5=At(qd),H5=re({name:"Notice",inheritAttrs:!1,props:["prefixCls","duration","updateMark","noticeKey","closeIcon","closable","props","onClick","onClose","holder","visible"],setup(e,t){let{attrs:n,slots:o}=t,r,i=!1;const l=I(()=>e.duration===void 0?4.5:e.duration),a=()=>{l.value&&!i&&(r=setTimeout(()=>{c()},l.value*1e3))},s=()=>{r&&(clearTimeout(r),r=null)},c=d=>{d&&d.stopPropagation(),s();const{onClose:f,noticeKey:h}=e;f&&f(h)},u=()=>{s(),a()};return Ue(()=>{a()}),Wn(()=>{i=!0,s()}),Se([l,()=>e.updateMark,()=>e.visible],(d,f)=>{let[h,m,g]=d,[y,b,S]=f;(h!==y||m!==b||g!==S&&S)&&u()},{flush:"post"}),()=>{var d,f;const{prefixCls:h,closable:m,closeIcon:g=(d=o.closeIcon)===null||d===void 0?void 0:d.call(o),onClick:y,holder:b}=e,{class:S,style:$}=n,x=`${h}-notice`,C=Object.keys(n).reduce((w,P)=>((P.startsWith("data-")||P.startsWith("aria-")||P==="role")&&(w[P]=n[P]),w),{}),O=p("div",D({class:ce(x,S,{[`${x}-closable`]:m}),style:$,onMouseenter:s,onMouseleave:a,onClick:y},C),[p("div",{class:`${x}-content`},[(f=o.default)===null||f===void 0?void 0:f.call(o)]),m?p("a",{tabindex:0,onClick:c,class:`${x}-close`},[g||p("span",{class:`${x}-close-x`},null)]):null]);return b?p(Db,{to:b},{default:()=>O}):O}}});var cee=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{prefixCls:u,animation:d="fade"}=e;let f=e.transitionName;return!f&&d&&(f=`${u}-${d}`),Ch(f)}),s=(u,d)=>{const f=u.key||C2(),h=v(v({},u),{key:f}),{maxCount:m}=e,g=l.value.map(b=>b.notice.key).indexOf(f),y=l.value.concat();g!==-1?y.splice(g,1,{notice:h,holderCallback:d}):(m&&l.value.length>=m&&(h.key=y[0].notice.key,h.updateMark=C2(),h.userPassKey=f,y.shift()),y.push({notice:h,holderCallback:d})),l.value=y},c=u=>{l.value=nt(l.value).filter(d=>{let{notice:{key:f,userPassKey:h}}=d;return(h||f)!==u})};return o({add:s,remove:c,notices:l}),()=>{var u;const{prefixCls:d,closeIcon:f=(u=r.closeIcon)===null||u===void 0?void 0:u.call(r,{prefixCls:d})}=e,h=l.value.map((g,y)=>{let{notice:b,holderCallback:S}=g;const $=y===l.value.length-1?b.updateMark:void 0,{key:x,userPassKey:C}=b,{content:O}=b,w=v(v(v({prefixCls:d,closeIcon:typeof f=="function"?f({prefixCls:d}):f},b),b.props),{key:x,noticeKey:C||x,updateMark:$,onClose:P=>{var T;c(P),(T=b.onClose)===null||T===void 0||T.call(b)},onClick:b.onClick});return S?p("div",{key:x,class:`${d}-hook-holder`,ref:P=>{typeof x>"u"||(P?(i.set(x,P),S(P,w)):i.delete(x))}},null):p(H5,D(D({},w),{},{class:ce(w.class,e.hashId)}),{default:()=>[typeof O=="function"?O({prefixCls:d}):O]})}),m={[d]:1,[n.class]:!!n.class,[e.hashId]:!0};return p("div",{class:m,style:n.style||{top:"65px",left:"50%"}},[p(oh,D({tag:"div"},a.value),{default:()=>[h]})])}}});Cp.newInstance=function(t,n){const o=t||{},{name:r="notification",getContainer:i,appContext:l,prefixCls:a,rootPrefixCls:s,transitionName:c,hasTransitionName:u,useStyle:d}=o,f=cee(o,["name","getContainer","appContext","prefixCls","rootPrefixCls","transitionName","hasTransitionName","useStyle"]),h=document.createElement("div");i?i().appendChild(h):document.body.appendChild(h);const g=p(re({compatConfig:{MODE:3},name:"NotificationWrapper",setup(y,b){let{attrs:S}=b;const $=oe(),x=I(()=>Pn.getPrefixCls(r,a)),[,C]=d(x);return Ue(()=>{n({notice(O){var w;(w=$.value)===null||w===void 0||w.add(O)},removeNotice(O){var w;(w=$.value)===null||w===void 0||w.remove(O)},destroy(){Xi(null,h),h.parentNode&&h.parentNode.removeChild(h)},component:$})}),()=>{const O=Pn,w=O.getRootPrefixCls(s,x.value),P=u?c:`${x.value}-${c}`;return p(Fl,D(D({},O),{},{prefixCls:w}),{default:()=>[p(Cp,D(D({ref:$},S),{},{prefixCls:x.value,transitionName:P,hashId:C.value}),null)]})}}}),f);g.appContext=l||g.appContext,Xi(g,h)};let x2=0;const dee=Date.now();function w2(){const e=x2;return x2+=1,`rcNotification_${dee}_${e}`}const fee=re({name:"HookNotification",inheritAttrs:!1,props:["prefixCls","transitionName","animation","maxCount","closeIcon","hashId","remove","notices","getStyles","getClassName","onAllRemoved","getContainer"],setup(e,t){let{attrs:n,slots:o}=t;const r=new Map,i=I(()=>e.notices),l=I(()=>{let u=e.transitionName;if(!u&&e.animation)switch(typeof e.animation){case"string":u=e.animation;break;case"function":u=e.animation().name;break;case"object":u=e.animation.name;break;default:u=`${e.prefixCls}-fade`;break}return Ch(u)}),a=u=>e.remove(u),s=ie({});Se(i,()=>{const u={};Object.keys(s.value).forEach(d=>{u[d]=[]}),e.notices.forEach(d=>{const{placement:f="topRight"}=d.notice;f&&(u[f]=u[f]||[],u[f].push(d))}),s.value=u});const c=I(()=>Object.keys(s.value));return()=>{var u;const{prefixCls:d,closeIcon:f=(u=o.closeIcon)===null||u===void 0?void 0:u.call(o,{prefixCls:d})}=e,h=c.value.map(m=>{var g,y;const b=s.value[m],S=(g=e.getClassName)===null||g===void 0?void 0:g.call(e,m),$=(y=e.getStyles)===null||y===void 0?void 0:y.call(e,m),x=b.map((w,P)=>{let{notice:T,holderCallback:M}=w;const E=P===i.value.length-1?T.updateMark:void 0,{key:A,userPassKey:R}=T,{content:F}=T,_=v(v(v({prefixCls:d,closeIcon:typeof f=="function"?f({prefixCls:d}):f},T),T.props),{key:A,noticeKey:R||A,updateMark:E,onClose:N=>{var B;a(N),(B=T.onClose)===null||B===void 0||B.call(T)},onClick:T.onClick});return M?p("div",{key:A,class:`${d}-hook-holder`,ref:N=>{typeof A>"u"||(N?(r.set(A,N),M(N,_)):r.delete(A))}},null):p(H5,D(D({},_),{},{class:ce(_.class,e.hashId)}),{default:()=>[typeof F=="function"?F({prefixCls:d}):F]})}),C={[d]:1,[`${d}-${m}`]:1,[n.class]:!!n.class,[e.hashId]:!0,[S]:!!S};function O(){var w;b.length>0||(Reflect.deleteProperty(s.value,m),(w=e.onAllRemoved)===null||w===void 0||w.call(e))}return p("div",{key:m,class:C,style:n.style||$||{top:"65px",left:"50%"}},[p(oh,D(D({tag:"div"},l.value),{},{onAfterLeave:O}),{default:()=>[x]})])});return p(j8,{getContainer:e.getContainer},{default:()=>[h]})}}});var pee=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rdocument.body;let O2=0;function gee(){const e={};for(var t=arguments.length,n=new Array(t),o=0;o{r&&Object.keys(r).forEach(i=>{const l=r[i];l!==void 0&&(e[i]=l)})}),e}function j5(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{getContainer:t=hee,motion:n,prefixCls:o,maxCount:r,getClassName:i,getStyles:l,onAllRemoved:a}=e,s=pee(e,["getContainer","motion","prefixCls","maxCount","getClassName","getStyles","onAllRemoved"]),c=oe([]),u=oe(),d=(b,S)=>{const $=b.key||w2(),x=v(v({},b),{key:$}),C=c.value.map(w=>w.notice.key).indexOf($),O=c.value.concat();C!==-1?O.splice(C,1,{notice:x,holderCallback:S}):(r&&c.value.length>=r&&(x.key=O[0].notice.key,x.updateMark=w2(),x.userPassKey=$,O.shift()),O.push({notice:x,holderCallback:S})),c.value=O},f=b=>{c.value=c.value.filter(S=>{let{notice:{key:$,userPassKey:x}}=S;return(x||$)!==b})},h=()=>{c.value=[]},m=()=>p(fee,{ref:u,prefixCls:o,maxCount:r,notices:c.value,remove:f,getClassName:i,getStyles:l,animation:n,hashId:e.hashId,onAllRemoved:a,getContainer:t},null),g=oe([]),y={open:b=>{const S=gee(s,b);(S.key===null||S.key===void 0)&&(S.key=`vc-notification-${O2}`,O2+=1),g.value=[...g.value,{type:"open",config:S}]},close:b=>{g.value=[...g.value,{type:"close",key:b}]},destroy:()=>{g.value=[...g.value,{type:"destroy"}]}};return Se(g,()=>{g.value.length&&(g.value.forEach(b=>{switch(b.type){case"open":d(b.config);break;case"close":f(b.key);break;case"destroy":h();break}}),g.value=[])}),[y,m]}const mee=e=>{const{componentCls:t,iconCls:n,boxShadowSecondary:o,colorBgElevated:r,colorSuccess:i,colorError:l,colorWarning:a,colorInfo:s,fontSizeLG:c,motionEaseInOutCirc:u,motionDurationSlow:d,marginXS:f,paddingXS:h,borderRadiusLG:m,zIndexPopup:g,messageNoticeContentPadding:y}=e,b=new it("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:h,transform:"translateY(0)",opacity:1}}),S=new it("MessageMoveOut",{"0%":{maxHeight:e.height,padding:h,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}});return[{[t]:v(v({},Ze(e)),{position:"fixed",top:f,left:"50%",transform:"translateX(-50%)",width:"100%",pointerEvents:"none",zIndex:g,[`${t}-move-up`]:{animationFillMode:"forwards"},[` + ${t}-move-up-appear, + ${t}-move-up-enter + `]:{animationName:b,animationDuration:d,animationPlayState:"paused",animationTimingFunction:u},[` + ${t}-move-up-appear${t}-move-up-appear-active, + ${t}-move-up-enter${t}-move-up-enter-active + `]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:S,animationDuration:d,animationPlayState:"paused",animationTimingFunction:u},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[`${t}-notice`]:{padding:h,textAlign:"center",[n]:{verticalAlign:"text-bottom",marginInlineEnd:f,fontSize:c},[`${t}-notice-content`]:{display:"inline-block",padding:y,background:r,borderRadius:m,boxShadow:o,pointerEvents:"all"},[`${t}-success ${n}`]:{color:i},[`${t}-error ${n}`]:{color:l},[`${t}-warning ${n}`]:{color:a},[` + ${t}-info ${n}, + ${t}-loading ${n}`]:{color:s}}},{[`${t}-notice-pure-panel`]:{padding:0,textAlign:"start"}}]},V5=Xe("Message",e=>{const t=Fe(e,{messageNoticeContentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`});return[mee(t)]},e=>({height:150,zIndexPopup:e.zIndexPopupBase+10})),vee={info:p(rl,null,null),success:p(mr,null,null),error:p(Un,null,null),warning:p(vr,null,null),loading:p(io,null,null)},bee=re({name:"PureContent",inheritAttrs:!1,props:["prefixCls","type","icon"],setup(e,t){let{slots:n}=t;return()=>{var o;return p("div",{class:ce(`${e.prefixCls}-custom-content`,`${e.prefixCls}-${e.type}`)},[e.icon||vee[e.type],p("span",null,[(o=n.default)===null||o===void 0?void 0:o.call(n)])])}}});var yee=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);ri("message",e.prefixCls)),[,s]=V5(a),c=()=>{var g;const y=(g=e.top)!==null&&g!==void 0?g:See;return{left:"50%",transform:"translateX(-50%)",top:typeof y=="number"?`${y}px`:y}},u=()=>ce(s.value,e.rtl?`${a.value}-rtl`:""),d=()=>{var g;return ay({prefixCls:a.value,animation:(g=e.animation)!==null&&g!==void 0?g:"move-up",transitionName:e.transitionName})},f=p("span",{class:`${a.value}-close-x`},[p(Kn,{class:`${a.value}-close-icon`},null)]),[h,m]=j5({getStyles:c,prefixCls:a.value,getClassName:u,motion:d,closable:!1,closeIcon:f,duration:(o=e.duration)!==null&&o!==void 0?o:$ee,getContainer:(r=e.staticGetContainer)!==null&&r!==void 0?r:l.value,maxCount:e.maxCount,onAllRemoved:e.onAllRemoved});return n(v(v({},h),{prefixCls:a,hashId:s})),m}});let P2=0;function xee(e){const t=oe(null),n=Symbol("messageHolderKey"),o=s=>{var c;(c=t.value)===null||c===void 0||c.close(s)},r=s=>{if(!t.value){const C=()=>{};return C.then=()=>{},C}const{open:c,prefixCls:u,hashId:d}=t.value,f=`${u}-notice`,{content:h,icon:m,type:g,key:y,class:b,onClose:S}=s,$=yee(s,["content","icon","type","key","class","onClose"]);let x=y;return x==null&&(P2+=1,x=`antd-message-${P2}`),mD(C=>(c(v(v({},$),{key:x,content:()=>p(bee,{prefixCls:u,type:g,icon:typeof m=="function"?m():m},{default:()=>[typeof h=="function"?h():h]}),placement:"top",class:ce(g&&`${f}-${g}`,d,b),onClose:()=>{S==null||S(),C()}})),()=>{o(x)}))},l={open:r,destroy:s=>{var c;s!==void 0?o(s):(c=t.value)===null||c===void 0||c.destroy()}};return["info","success","warning","error","loading"].forEach(s=>{const c=(u,d,f)=>{let h;u&&typeof u=="object"&&"content"in u?h=u:h={content:u};let m,g;typeof d=="function"?g=d:(m=d,g=f);const y=v(v({onClose:g,duration:m},h),{type:s});return r(y)};l[s]=c}),[l,()=>p(Cee,D(D({key:n},e),{},{ref:t}),null)]}function W5(e){return xee(e)}let K5=3,U5,eo,wee=1,G5="",X5="move-up",Y5=!1,q5=()=>document.body,Z5,J5=!1;function Oee(){return wee++}function Pee(e){e.top!==void 0&&(U5=e.top,eo=null),e.duration!==void 0&&(K5=e.duration),e.prefixCls!==void 0&&(G5=e.prefixCls),e.getContainer!==void 0&&(q5=e.getContainer,eo=null),e.transitionName!==void 0&&(X5=e.transitionName,eo=null,Y5=!0),e.maxCount!==void 0&&(Z5=e.maxCount,eo=null),e.rtl!==void 0&&(J5=e.rtl)}function Iee(e,t){if(eo){t(eo);return}Cp.newInstance({appContext:e.appContext,prefixCls:e.prefixCls||G5,rootPrefixCls:e.rootPrefixCls,transitionName:X5,hasTransitionName:Y5,style:{top:U5},getContainer:q5||e.getPopupContainer,maxCount:Z5,name:"message",useStyle:V5},n=>{if(eo){t(eo);return}eo=n,t(n)})}const Q5={info:rl,success:mr,error:Un,warning:vr,loading:io},Tee=Object.keys(Q5);function Eee(e){const t=e.duration!==void 0?e.duration:K5,n=e.key||Oee(),o=new Promise(i=>{const l=()=>(typeof e.onClose=="function"&&e.onClose(),i(!0));Iee(e,a=>{a.notice({key:n,duration:t,style:e.style||{},class:e.class,content:s=>{let{prefixCls:c}=s;const u=Q5[e.type],d=u?p(u,null,null):"",f=ce(`${c}-custom-content`,{[`${c}-${e.type}`]:e.type,[`${c}-rtl`]:J5===!0});return p("div",{class:f},[typeof e.icon=="function"?e.icon():e.icon||d,p("span",null,[typeof e.content=="function"?e.content():e.content])])},onClose:l,onClick:e.onClick})})}),r=()=>{eo&&eo.removeNotice(n)};return r.then=(i,l)=>o.then(i,l),r.promise=o,r}function _ee(e){return Object.prototype.toString.call(e)==="[object Object]"&&!!e.content}const po={open:Eee,config:Pee,destroy(e){if(eo)if(e){const{removeNotice:t}=eo;t(e)}else{const{destroy:t}=eo;t(),eo=null}}};function Mee(e,t){e[t]=(n,o,r)=>_ee(n)?e.open(v(v({},n),{type:t})):(typeof o=="function"&&(r=o,o=void 0),e.open({content:n,duration:o,type:t,onClose:r}))}Tee.forEach(e=>Mee(po,e));po.warn=po.warning;po.useMessage=W5;const Aee=e=>{const{componentCls:t,width:n,notificationMarginEdge:o}=e,r=new it("antNotificationTopFadeIn",{"0%":{marginTop:"-100%",opacity:0},"100%":{marginTop:0,opacity:1}}),i=new it("antNotificationBottomFadeIn",{"0%":{marginBottom:"-100%",opacity:0},"100%":{marginBottom:0,opacity:1}}),l=new it("antNotificationLeftFadeIn",{"0%":{right:{_skip_check_:!0,value:n},opacity:0},"100%":{right:{_skip_check_:!0,value:0},opacity:1}});return{[`&${t}-top, &${t}-bottom`]:{marginInline:0},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:r}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:i}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginInlineEnd:0,marginInlineStart:o,[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:l}}}},Ree=e=>{const{iconCls:t,componentCls:n,boxShadowSecondary:o,fontSizeLG:r,notificationMarginBottom:i,borderRadiusLG:l,colorSuccess:a,colorInfo:s,colorWarning:c,colorError:u,colorTextHeading:d,notificationBg:f,notificationPadding:h,notificationMarginEdge:m,motionDurationMid:g,motionEaseInOut:y,fontSize:b,lineHeight:S,width:$,notificationIconSize:x}=e,C=`${n}-notice`,O=new it("antNotificationFadeIn",{"0%":{left:{_skip_check_:!0,value:$},opacity:0},"100%":{left:{_skip_check_:!0,value:0},opacity:1}}),w=new it("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:i,opacity:1},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[n]:v(v(v(v({},Ze(e)),{position:"fixed",zIndex:e.zIndexPopup,marginInlineEnd:m,[`${n}-hook-holder`]:{position:"relative"},[`&${n}-top, &${n}-bottom`]:{[`${n}-notice`]:{marginInline:"auto auto"}},[`&${n}-topLeft, &${n}-bottomLeft`]:{[`${n}-notice`]:{marginInlineEnd:"auto",marginInlineStart:0}},[`${n}-fade-enter, ${n}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:y,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${n}-fade-leave`]:{animationTimingFunction:y,animationFillMode:"both",animationDuration:g,animationPlayState:"paused"},[`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]:{animationName:O,animationPlayState:"running"},[`${n}-fade-leave${n}-fade-leave-active`]:{animationName:w,animationPlayState:"running"}}),Aee(e)),{"&-rtl":{direction:"rtl",[`${n}-notice-btn`]:{float:"left"}}})},{[C]:{position:"relative",width:$,maxWidth:`calc(100vw - ${m*2}px)`,marginBottom:i,marginInlineStart:"auto",padding:h,overflow:"hidden",lineHeight:S,wordWrap:"break-word",background:f,borderRadius:l,boxShadow:o,[`${n}-close-icon`]:{fontSize:b,cursor:"pointer"},[`${C}-message`]:{marginBottom:e.marginXS,color:d,fontSize:r,lineHeight:e.lineHeightLG},[`${C}-description`]:{fontSize:b},[`&${C}-closable ${C}-message`]:{paddingInlineEnd:e.paddingLG},[`${C}-with-icon ${C}-message`]:{marginBottom:e.marginXS,marginInlineStart:e.marginSM+x,fontSize:r},[`${C}-with-icon ${C}-description`]:{marginInlineStart:e.marginSM+x,fontSize:b},[`${C}-icon`]:{position:"absolute",fontSize:x,lineHeight:0,[`&-success${t}`]:{color:a},[`&-info${t}`]:{color:s},[`&-warning${t}`]:{color:c},[`&-error${t}`]:{color:u}},[`${C}-close`]:{position:"absolute",top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:"none",width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?"transparent":e.colorFillContent}},[`${C}-btn`]:{float:"right",marginTop:e.marginSM}}},{[`${C}-pure-panel`]:{margin:0}}]},eE=Xe("Notification",e=>{const t=e.paddingMD,n=e.paddingLG,o=Fe(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`,notificationMarginBottom:e.margin,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationIconSize:e.fontSizeLG*e.lineHeightLG,notificationCloseButtonSize:e.controlHeightLG*.55});return[Ree(o)]},e=>({zIndexPopup:e.zIndexPopupBase+50,width:384}));function Dee(e,t){return t||p("span",{class:`${e}-close-x`},[p(Kn,{class:`${e}-close-icon`},null)])}p(rl,null,null),p(mr,null,null),p(Un,null,null),p(vr,null,null),p(io,null,null);const Nee={success:mr,info:rl,error:Un,warning:vr};function Bee(e){let{prefixCls:t,icon:n,type:o,message:r,description:i,btn:l}=e,a=null;if(n)a=p("span",{class:`${t}-icon`},[Ra(n)]);else if(o){const s=Nee[o];a=p(s,{class:`${t}-icon ${t}-icon-${o}`},null)}return p("div",{class:ce({[`${t}-with-icon`]:a}),role:"alert"},[a,p("div",{class:`${t}-message`},[r]),p("div",{class:`${t}-description`},[i]),l&&p("div",{class:`${t}-btn`},[l])])}function tE(e,t,n){let o;switch(t=typeof t=="number"?`${t}px`:t,n=typeof n=="number"?`${n}px`:n,e){case"top":o={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":o={left:0,top:t,bottom:"auto"};break;case"topRight":o={right:0,top:t,bottom:"auto"};break;case"bottom":o={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":o={left:0,top:"auto",bottom:n};break;default:o={right:0,top:"auto",bottom:n};break}return o}function Lee(e){return{name:`${e}-fade`}}var kee=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.prefixCls||o("notification")),l=f=>{var h,m;return tE(f,(h=e.top)!==null&&h!==void 0?h:I2,(m=e.bottom)!==null&&m!==void 0?m:I2)},[,a]=eE(i),s=()=>ce(a.value,{[`${i.value}-rtl`]:e.rtl}),c=()=>Lee(i.value),[u,d]=j5({prefixCls:i.value,getStyles:l,getClassName:s,motion:c,closable:!0,closeIcon:Dee(i.value),duration:Fee,getContainer:()=>{var f,h;return((f=e.getPopupContainer)===null||f===void 0?void 0:f.call(e))||((h=r.value)===null||h===void 0?void 0:h.call(r))||document.body},maxCount:e.maxCount,hashId:a.value,onAllRemoved:e.onAllRemoved});return n(v(v({},u),{prefixCls:i.value,hashId:a})),d}});function Hee(e){const t=oe(null),n=Symbol("notificationHolderKey"),o=a=>{if(!t.value)return;const{open:s,prefixCls:c,hashId:u}=t.value,d=`${c}-notice`,{message:f,description:h,icon:m,type:g,btn:y,class:b}=a,S=kee(a,["message","description","icon","type","btn","class"]);return s(v(v({placement:"topRight"},S),{content:()=>p(Bee,{prefixCls:d,icon:typeof m=="function"?m():m,type:g,message:typeof f=="function"?f():f,description:typeof h=="function"?h():h,btn:typeof y=="function"?y():y},null),class:ce(g&&`${d}-${g}`,u,b)}))},i={open:o,destroy:a=>{var s,c;a!==void 0?(s=t.value)===null||s===void 0||s.close(a):(c=t.value)===null||c===void 0||c.destroy()}};return["success","info","warning","error"].forEach(a=>{i[a]=s=>o(v(v({},s),{type:a}))}),[i,()=>p(zee,D(D({key:n},e),{},{ref:t}),null)]}function nE(e){return Hee(e)}const wl={};let oE=4.5,rE="24px",iE="24px",k0="",lE="topRight",aE=()=>document.body,sE=null,F0=!1,cE;function jee(e){const{duration:t,placement:n,bottom:o,top:r,getContainer:i,closeIcon:l,prefixCls:a}=e;a!==void 0&&(k0=a),t!==void 0&&(oE=t),n!==void 0&&(lE=n),o!==void 0&&(iE=typeof o=="number"?`${o}px`:o),r!==void 0&&(rE=typeof r=="number"?`${r}px`:r),i!==void 0&&(aE=i),l!==void 0&&(sE=l),e.rtl!==void 0&&(F0=e.rtl),e.maxCount!==void 0&&(cE=e.maxCount)}function Vee(e,t){let{prefixCls:n,placement:o=lE,getContainer:r=aE,top:i,bottom:l,closeIcon:a=sE,appContext:s}=e;const{getPrefixCls:c}=tte(),u=c("notification",n||k0),d=`${u}-${o}-${F0}`,f=wl[d];if(f){Promise.resolve(f).then(m=>{t(m)});return}const h=ce(`${u}-${o}`,{[`${u}-rtl`]:F0===!0});Cp.newInstance({name:"notification",prefixCls:n||k0,useStyle:eE,class:h,style:tE(o,i??rE,l??iE),appContext:s,getContainer:r,closeIcon:m=>{let{prefixCls:g}=m;return p("span",{class:`${g}-close-x`},[Ra(a,{},p(Kn,{class:`${g}-close-icon`},null))])},maxCount:cE,hasTransitionName:!0},m=>{wl[d]=m,t(m)})}const Wee={success:Dh,info:Nh,error:$u,warning:Su};function Kee(e){const{icon:t,type:n,description:o,message:r,btn:i}=e,l=e.duration===void 0?oE:e.duration;Vee(e,a=>{a.notice({content:s=>{let{prefixCls:c}=s;const u=`${c}-notice`;let d=null;if(t)d=()=>p("span",{class:`${u}-icon`},[Ra(t)]);else if(n){const f=Wee[n];d=()=>p(f,{class:`${u}-icon ${u}-icon-${n}`},null)}return p("div",{class:d?`${u}-with-icon`:""},[d&&d(),p("div",{class:`${u}-message`},[!o&&d?p("span",{class:`${u}-message-single-line-auto-margin`},null):null,Ra(r)]),p("div",{class:`${u}-description`},[Ra(o)]),i?p("span",{class:`${u}-btn`},[Ra(i)]):null])},duration:l,closable:!0,onClose:e.onClose,onClick:e.onClick,key:e.key,style:e.style||{},class:e.class})})}const qi={open:Kee,close(e){Object.keys(wl).forEach(t=>Promise.resolve(wl[t]).then(n=>{n.removeNotice(e)}))},config:jee,destroy(){Object.keys(wl).forEach(e=>{Promise.resolve(wl[e]).then(t=>{t.destroy()}),delete wl[e]})}},Uee=["success","info","warning","error"];Uee.forEach(e=>{qi[e]=t=>qi.open(v(v({},t),{type:e}))});qi.warn=qi.warning;qi.useNotification=nE;const Gee=`-ant-${Date.now()}-${Math.random()}`;function Xee(e,t){const n={},o=(l,a)=>{let s=l.clone();return s=(a==null?void 0:a(s))||s,s.toRgbString()},r=(l,a)=>{const s=new vt(l),c=Kl(s.toRgbString());n[`${a}-color`]=o(s),n[`${a}-color-disabled`]=c[1],n[`${a}-color-hover`]=c[4],n[`${a}-color-active`]=c[6],n[`${a}-color-outline`]=s.clone().setAlpha(.2).toRgbString(),n[`${a}-color-deprecated-bg`]=c[0],n[`${a}-color-deprecated-border`]=c[2]};if(t.primaryColor){r(t.primaryColor,"primary");const l=new vt(t.primaryColor),a=Kl(l.toRgbString());a.forEach((c,u)=>{n[`primary-${u+1}`]=c}),n["primary-color-deprecated-l-35"]=o(l,c=>c.lighten(35)),n["primary-color-deprecated-l-20"]=o(l,c=>c.lighten(20)),n["primary-color-deprecated-t-20"]=o(l,c=>c.tint(20)),n["primary-color-deprecated-t-50"]=o(l,c=>c.tint(50)),n["primary-color-deprecated-f-12"]=o(l,c=>c.setAlpha(c.getAlpha()*.12));const s=new vt(a[0]);n["primary-color-active-deprecated-f-30"]=o(s,c=>c.setAlpha(c.getAlpha()*.3)),n["primary-color-active-deprecated-d-02"]=o(s,c=>c.darken(2))}return t.successColor&&r(t.successColor,"success"),t.warningColor&&r(t.warningColor,"warning"),t.errorColor&&r(t.errorColor,"error"),t.infoColor&&r(t.infoColor,"info"),` + :root { + ${Object.keys(n).map(l=>`--${e}-${l}: ${n[l]};`).join(` +`)} + } + `.trim()}function Yee(e,t){const n=Xee(e,t);Hn()&&Hc(n,`${Gee}-dynamic-theme`)}const qee=e=>{const[t,n]=mi();return Uv(I(()=>({theme:t.value,token:n.value,hashId:"",path:["ant-design-icons",e.value]})),()=>[{[`.${e.value}`]:v(v({},ra()),{[`.${e.value} .${e.value}-icon`]:{display:"block"}})}])};function Zee(e,t){const n=I(()=>(e==null?void 0:e.value)||{}),o=I(()=>n.value.inherit===!1||!(t!=null&&t.value)?Z6:t.value);return I(()=>{if(!(e!=null&&e.value))return t==null?void 0:t.value;const i=v({},o.value.components);return Object.keys(e.value.components||{}).forEach(l=>{i[l]=v(v({},i[l]),e.value.components[l])}),v(v(v({},o.value),n.value),{token:v(v({},o.value.token),n.value.token),components:i})})}var Jee=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{v(Pn,J1),Pn.prefixCls=Ja(),Pn.iconPrefixCls=uE(),Pn.getPrefixCls=(e,t)=>t||(e?`${Pn.prefixCls}-${e}`:Pn.prefixCls),Pn.getRootPrefixCls=()=>Pn.prefixCls?Pn.prefixCls:Ja()});let km;const ete=e=>{km&&km(),km=je(()=>{v(J1,ft(e)),v(Pn,ft(e))}),e.theme&&Yee(Ja(),e.theme)},tte=()=>({getPrefixCls:(e,t)=>t||(e?`${Ja()}-${e}`:Ja()),getIconPrefixCls:uE,getRootPrefixCls:()=>Pn.prefixCls?Pn.prefixCls:Ja()}),Fl=re({compatConfig:{MODE:3},name:"AConfigProvider",inheritAttrs:!1,props:jD(),setup(e,t){let{slots:n}=t;const o=lh(),r=(_,N)=>{const{prefixCls:B="ant"}=e;if(N)return N;const L=B||o.getPrefixCls("");return _?`${L}-${_}`:L},i=I(()=>e.iconPrefixCls||o.iconPrefixCls.value||Gb),l=I(()=>i.value!==o.iconPrefixCls.value),a=I(()=>{var _;return e.csp||((_=o.csp)===null||_===void 0?void 0:_.value)}),s=qee(i),c=Zee(I(()=>e.theme),I(()=>{var _;return(_=o.theme)===null||_===void 0?void 0:_.value})),u=_=>(e.renderEmpty||n.renderEmpty||o.renderEmpty||TN)(_),d=I(()=>{var _,N;return(_=e.autoInsertSpaceInButton)!==null&&_!==void 0?_:(N=o.autoInsertSpaceInButton)===null||N===void 0?void 0:N.value}),f=I(()=>{var _;return e.locale||((_=o.locale)===null||_===void 0?void 0:_.value)});Se(f,()=>{J1.locale=f.value},{immediate:!0});const h=I(()=>{var _;return e.direction||((_=o.direction)===null||_===void 0?void 0:_.value)}),m=I(()=>{var _,N;return(_=e.space)!==null&&_!==void 0?_:(N=o.space)===null||N===void 0?void 0:N.value}),g=I(()=>{var _,N;return(_=e.virtual)!==null&&_!==void 0?_:(N=o.virtual)===null||N===void 0?void 0:N.value}),y=I(()=>{var _,N;return(_=e.dropdownMatchSelectWidth)!==null&&_!==void 0?_:(N=o.dropdownMatchSelectWidth)===null||N===void 0?void 0:N.value}),b=I(()=>{var _;return e.getTargetContainer!==void 0?e.getTargetContainer:(_=o.getTargetContainer)===null||_===void 0?void 0:_.value}),S=I(()=>{var _;return e.getPopupContainer!==void 0?e.getPopupContainer:(_=o.getPopupContainer)===null||_===void 0?void 0:_.value}),$=I(()=>{var _;return e.pageHeader!==void 0?e.pageHeader:(_=o.pageHeader)===null||_===void 0?void 0:_.value}),x=I(()=>{var _;return e.input!==void 0?e.input:(_=o.input)===null||_===void 0?void 0:_.value}),C=I(()=>{var _;return e.pagination!==void 0?e.pagination:(_=o.pagination)===null||_===void 0?void 0:_.value}),O=I(()=>{var _;return e.form!==void 0?e.form:(_=o.form)===null||_===void 0?void 0:_.value}),w=I(()=>{var _;return e.select!==void 0?e.select:(_=o.select)===null||_===void 0?void 0:_.value}),P=I(()=>e.componentSize),T=I(()=>e.componentDisabled),M=I(()=>{var _,N;return(_=e.wave)!==null&&_!==void 0?_:(N=o.wave)===null||N===void 0?void 0:N.value}),E={csp:a,autoInsertSpaceInButton:d,locale:f,direction:h,space:m,virtual:g,dropdownMatchSelectWidth:y,getPrefixCls:r,iconPrefixCls:i,theme:I(()=>{var _,N;return(_=c.value)!==null&&_!==void 0?_:(N=o.theme)===null||N===void 0?void 0:N.value}),renderEmpty:u,getTargetContainer:b,getPopupContainer:S,pageHeader:$,input:x,pagination:C,form:O,select:w,componentSize:P,componentDisabled:T,transformCellText:I(()=>e.transformCellText),wave:M},A=I(()=>{const _=c.value||{},{algorithm:N,token:B}=_,L=Jee(_,["algorithm","token"]),k=N&&(!Array.isArray(N)||N.length>0)?B6(N):void 0;return v(v({},L),{theme:k,token:v(v({},dh),B)})}),R=I(()=>{var _,N;let B={};return f.value&&(B=((_=f.value.Form)===null||_===void 0?void 0:_.defaultValidateMessages)||((N=ro.Form)===null||N===void 0?void 0:N.defaultValidateMessages)||{}),e.form&&e.form.validateMessages&&(B=v(v({},B),e.form.validateMessages)),B});VD(E),zD({validateMessages:R}),n8(P),x6(T);const F=_=>{var N,B;let L=l.value?s((N=n.default)===null||N===void 0?void 0:N.call(n)):(B=n.default)===null||B===void 0?void 0:B.call(n);if(e.theme){const k=function(){return L}();L=p(xN,{value:A.value},{default:()=>[k]})}return p(z5,{locale:f.value||_,ANT_MARK__:L0},{default:()=>[L]})};return je(()=>{h.value&&(po.config({rtl:h.value==="rtl"}),qi.config({rtl:h.value==="rtl"}))}),()=>p(oa,{children:(_,N,B)=>F(B)},null)}});Fl.config=ete;Fl.install=function(e){e.component(Fl.name,Fl)};const nte=(e,t)=>{let{attrs:n,slots:o}=t;return p(Wt,D(D({size:"small",type:"primary"},e),n),o)},Cd=(e,t,n)=>{const o=fD(n);return{[`${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${o}Bg`],borderColor:e[`color${o}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},ote=e=>jf(e,(t,n)=>{let{textColor:o,lightBorderColor:r,lightColor:i,darkColor:l}=n;return{[`${e.componentCls}-${t}`]:{color:o,background:i,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:l,borderColor:l},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}}),rte=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:o,componentCls:r}=e,i=o-n,l=t-n;return{[r]:v(v({},Ze(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:`${e.tagLineHeight}px`,whiteSpace:"nowrap",background:e.tagDefaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",[`&${r}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.tagDefaultColor},[`${r}-close-icon`]:{marginInlineStart:l,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${r}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${r}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:i}}),[`${r}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},dE=Xe("Tag",e=>{const{fontSize:t,lineHeight:n,lineWidth:o,fontSizeIcon:r}=e,i=Math.round(t*n),l=e.fontSizeSM,a=i-o*2,s=e.colorFillAlter,c=e.colorText,u=Fe(e,{tagFontSize:l,tagLineHeight:a,tagDefaultBg:s,tagDefaultColor:c,tagIconSize:r-2*o,tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary});return[rte(u),ote(u),Cd(u,"success","Success"),Cd(u,"processing","Info"),Cd(u,"error","Error"),Cd(u,"warning","Warning")]}),ite=()=>({prefixCls:String,checked:{type:Boolean,default:void 0},onChange:{type:Function},onClick:{type:Function},"onUpdate:checked":Function}),xp=re({compatConfig:{MODE:3},name:"ACheckableTag",inheritAttrs:!1,props:ite(),setup(e,t){let{slots:n,emit:o,attrs:r}=t;const{prefixCls:i}=Ee("tag",e),[l,a]=dE(i),s=u=>{const{checked:d}=e;o("update:checked",!d),o("change",!d),o("click",u)},c=I(()=>ce(i.value,a.value,{[`${i.value}-checkable`]:!0,[`${i.value}-checkable-checked`]:e.checked}));return()=>{var u;return l(p("span",D(D({},r),{},{class:[c.value,r.class],onClick:s}),[(u=n.default)===null||u===void 0?void 0:u.call(n)]))}}}),lte=()=>({prefixCls:String,color:{type:String},closable:{type:Boolean,default:!1},closeIcon:W.any,visible:{type:Boolean,default:void 0},onClose:{type:Function},onClick:Wl(),"onUpdate:visible":Function,icon:W.any,bordered:{type:Boolean,default:!0}}),Qa=re({compatConfig:{MODE:3},name:"ATag",inheritAttrs:!1,props:lte(),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r}=t;const{prefixCls:i,direction:l}=Ee("tag",e),[a,s]=dE(i),c=oe(!0);je(()=>{e.visible!==void 0&&(c.value=e.visible)});const u=m=>{m.stopPropagation(),o("update:visible",!1),o("close",m),!m.defaultPrevented&&e.visible===void 0&&(c.value=!1)},d=I(()=>Bh(e.color)||RU(e.color)),f=I(()=>ce(i.value,s.value,{[`${i.value}-${e.color}`]:d.value,[`${i.value}-has-color`]:e.color&&!d.value,[`${i.value}-hidden`]:!c.value,[`${i.value}-rtl`]:l.value==="rtl",[`${i.value}-borderless`]:!e.bordered})),h=m=>{o("click",m)};return()=>{var m,g,y;const{icon:b=(m=n.icon)===null||m===void 0?void 0:m.call(n),color:S,closeIcon:$=(g=n.closeIcon)===null||g===void 0?void 0:g.call(n),closable:x=!1}=e,C=()=>x?$?p("span",{class:`${i.value}-close-icon`,onClick:u},[$]):p(Kn,{class:`${i.value}-close-icon`,onClick:u},null):null,O={backgroundColor:S&&!d.value?S:void 0},w=b||null,P=(y=n.default)===null||y===void 0?void 0:y.call(n),T=w?p(He,null,[w,p("span",null,[P])]):P,M=e.onClick!==void 0,E=p("span",D(D({},r),{},{onClick:h,class:[f.value,r.class],style:[O,r.style]}),[T,C()]);return a(M?p(n1,null,{default:()=>[E]}):E)}}});Qa.CheckableTag=xp;Qa.install=function(e){return e.component(Qa.name,Qa),e.component(xp.name,xp),e};function ate(e,t){let{slots:n,attrs:o}=t;return p(Qa,D(D({color:"blue"},e),o),n)}var ste={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};function T2(e){for(var t=1;tE.value||P.value),[F,_]=YT(C),N=ie();g({focus:()=>{var Q;(Q=N.value)===null||Q===void 0||Q.focus()},blur:()=>{var Q;(Q=N.value)===null||Q===void 0||Q.blur()}});const B=Q=>S.valueFormat?e.toString(Q,S.valueFormat):Q,L=(Q,J)=>{const X=B(Q);b("update:value",X),b("change",X,J),$.onFieldChange()},k=Q=>{b("update:open",Q),b("openChange",Q)},z=Q=>{b("focus",Q)},H=Q=>{b("blur",Q),$.onFieldBlur()},j=(Q,J)=>{const X=B(Q);b("panelChange",X,J)},Y=Q=>{const J=B(Q);b("ok",J)},[Z]=Zo("DatePicker",Fc),G=I(()=>S.value?S.valueFormat?e.toDate(S.value,S.valueFormat):S.value:S.value===""?void 0:S.value),te=I(()=>S.defaultValue?S.valueFormat?e.toDate(S.defaultValue,S.valueFormat):S.defaultValue:S.defaultValue===""?void 0:S.defaultValue),U=I(()=>S.defaultPickerValue?S.valueFormat?e.toDate(S.defaultPickerValue,S.valueFormat):S.defaultPickerValue:S.defaultPickerValue===""?void 0:S.defaultPickerValue);return()=>{var Q,J,X,q,V,K;const ee=v(v({},Z.value),S.locale),ue=v(v({},S),y),{bordered:ae=!0,placeholder:le,suffixIcon:ne=(Q=m.suffixIcon)===null||Q===void 0?void 0:Q.call(m),showToday:se=!0,transitionName:pe,allowClear:he=!0,dateRender:ge=m.dateRender,renderExtraFooter:be=m.renderExtraFooter,monthCellRender:xe=m.monthCellRender||S.monthCellContentRender||m.monthCellContentRender,clearIcon:fe=(J=m.clearIcon)===null||J===void 0?void 0:J.call(m),id:de=$.id.value}=ue,ye=hte(ue,["bordered","placeholder","suffixIcon","showToday","transitionName","allowClear","dateRender","renderExtraFooter","monthCellRender","clearIcon","id"]),Oe=ue.showTime===""?!0:ue.showTime,{format:Te}=ue;let Re={};c&&(Re.picker=c);const $e=c||ue.picker||"date";Re=v(v(v({},Re),Oe?Op(v({format:Te,picker:$e},typeof Oe=="object"?Oe:{})):{}),$e==="time"?Op(v(v({format:Te},ye),{picker:$e})):{});const we=C.value,Pe=p(He,null,[ne||p(c==="time"?tg:eg,null,null),x.hasFeedback&&x.feedbackIcon]);return F(p(cY,D(D(D({monthCellRender:xe,dateRender:ge,renderExtraFooter:be,ref:N,placeholder:fte(ee,$e,le),suffixIcon:Pe,dropdownAlign:fE(O.value,S.placement),clearIcon:fe||p(Un,null,null),allowClear:he,transitionName:pe||`${T.value}-slide-up`},ye),Re),{},{id:de,picker:$e,value:G.value,defaultValue:te.value,defaultPickerValue:U.value,showToday:se,locale:ee.lang,class:ce({[`${we}-${R.value}`]:R.value,[`${we}-borderless`]:!ae},Fn(we,gr(x.status,S.status),x.hasFeedback),y.class,_.value,A.value),disabled:M.value,prefixCls:we,getPopupContainer:y.getCalendarContainer||w.value,generateConfig:e,prevIcon:((X=m.prevIcon)===null||X===void 0?void 0:X.call(m))||p("span",{class:`${we}-prev-icon`},null),nextIcon:((q=m.nextIcon)===null||q===void 0?void 0:q.call(m))||p("span",{class:`${we}-next-icon`},null),superPrevIcon:((V=m.superPrevIcon)===null||V===void 0?void 0:V.call(m))||p("span",{class:`${we}-super-prev-icon`},null),superNextIcon:((K=m.superNextIcon)===null||K===void 0?void 0:K.call(m))||p("span",{class:`${we}-super-next-icon`},null),components:gE,direction:O.value,dropdownClassName:ce(_.value,S.popupClassName,S.dropdownClassName),onChange:L,onOpenChange:k,onFocus:z,onBlur:H,onPanelChange:j,onOk:Y}),null))}}})}const o=n(void 0,"ADatePicker"),r=n("week","AWeekPicker"),i=n("month","AMonthPicker"),l=n("year","AYearPicker"),a=n("time","TimePicker"),s=n("quarter","AQuarterPicker");return{DatePicker:o,WeekPicker:r,MonthPicker:i,YearPicker:l,TimePicker:a,QuarterPicker:s}}var mte={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z"}}]},name:"swap-right",theme:"outlined"};function _2(e){for(var t=1;tS.value||g.value),[C,O]=YT(f),w=ie();i({focus:()=>{var z;(z=w.value)===null||z===void 0||z.focus()},blur:()=>{var z;(z=w.value)===null||z===void 0||z.blur()}});const P=z=>c.valueFormat?e.toString(z,c.valueFormat):z,T=(z,H)=>{const j=P(z);s("update:value",j),s("change",j,H),u.onFieldChange()},M=z=>{s("update:open",z),s("openChange",z)},E=z=>{s("focus",z)},A=z=>{s("blur",z),u.onFieldBlur()},R=(z,H)=>{const j=P(z);s("panelChange",j,H)},F=z=>{const H=P(z);s("ok",H)},_=(z,H,j)=>{const Y=P(z);s("calendarChange",Y,H,j)},[N]=Zo("DatePicker",Fc),B=I(()=>c.value&&c.valueFormat?e.toDate(c.value,c.valueFormat):c.value),L=I(()=>c.defaultValue&&c.valueFormat?e.toDate(c.defaultValue,c.valueFormat):c.defaultValue),k=I(()=>c.defaultPickerValue&&c.valueFormat?e.toDate(c.defaultPickerValue,c.valueFormat):c.defaultPickerValue);return()=>{var z,H,j,Y,Z,G,te;const U=v(v({},N.value),c.locale),Q=v(v({},c),a),{prefixCls:J,bordered:X=!0,placeholder:q,suffixIcon:V=(z=l.suffixIcon)===null||z===void 0?void 0:z.call(l),picker:K="date",transitionName:ee,allowClear:ue=!0,dateRender:ae=l.dateRender,renderExtraFooter:le=l.renderExtraFooter,separator:ne=(H=l.separator)===null||H===void 0?void 0:H.call(l),clearIcon:se=(j=l.clearIcon)===null||j===void 0?void 0:j.call(l),id:pe=u.id.value}=Q,he=bte(Q,["prefixCls","bordered","placeholder","suffixIcon","picker","transitionName","allowClear","dateRender","renderExtraFooter","separator","clearIcon","id"]);delete he["onUpdate:value"],delete he["onUpdate:open"];const{format:ge,showTime:be}=Q;let xe={};xe=v(v(v({},xe),be?Op(v({format:ge,picker:K},be)):{}),K==="time"?Op(v(v({format:ge},rt(he,["disabledTime"])),{picker:K})):{});const fe=f.value,de=p(He,null,[V||p(K==="time"?tg:eg,null,null),d.hasFeedback&&d.feedbackIcon]);return C(p(yY,D(D(D({dateRender:ae,renderExtraFooter:le,separator:ne||p("span",{"aria-label":"to",class:`${fe}-separator`},[p(Q1,null,null)]),ref:w,dropdownAlign:fE(h.value,c.placement),placeholder:pte(U,K,q),suffixIcon:de,clearIcon:se||p(Un,null,null),allowClear:ue,transitionName:ee||`${y.value}-slide-up`},he),xe),{},{disabled:b.value,id:pe,value:B.value,defaultValue:L.value,defaultPickerValue:k.value,picker:K,class:ce({[`${fe}-${x.value}`]:x.value,[`${fe}-borderless`]:!X},Fn(fe,gr(d.status,c.status),d.hasFeedback),a.class,O.value,$.value),locale:U.lang,prefixCls:fe,getPopupContainer:a.getCalendarContainer||m.value,generateConfig:e,prevIcon:((Y=l.prevIcon)===null||Y===void 0?void 0:Y.call(l))||p("span",{class:`${fe}-prev-icon`},null),nextIcon:((Z=l.nextIcon)===null||Z===void 0?void 0:Z.call(l))||p("span",{class:`${fe}-next-icon`},null),superPrevIcon:((G=l.superPrevIcon)===null||G===void 0?void 0:G.call(l))||p("span",{class:`${fe}-super-prev-icon`},null),superNextIcon:((te=l.superNextIcon)===null||te===void 0?void 0:te.call(l))||p("span",{class:`${fe}-super-next-icon`},null),components:gE,direction:h.value,dropdownClassName:ce(O.value,c.popupClassName,c.dropdownClassName),onChange:T,onOpenChange:M,onFocus:E,onBlur:A,onPanelChange:R,onOk:F,onCalendarChange:_}),null))}}})}const gE={button:nte,rangeItem:ate};function Ste(e){return e?Array.isArray(e)?e:[e]:[]}function Op(e){const{format:t,picker:n,showHour:o,showMinute:r,showSecond:i,use12Hours:l}=e,a=Ste(t)[0],s=v({},e);return a&&typeof a=="string"&&(!a.includes("s")&&i===void 0&&(s.showSecond=!1),!a.includes("m")&&r===void 0&&(s.showMinute=!1),!a.includes("H")&&!a.includes("h")&&o===void 0&&(s.showHour=!1),(a.includes("a")||a.includes("A"))&&l===void 0&&(s.use12Hours=!0)),n==="time"?s:(typeof a=="function"&&delete s.format,{showTime:s})}function mE(e,t){const{DatePicker:n,WeekPicker:o,MonthPicker:r,YearPicker:i,TimePicker:l,QuarterPicker:a}=gte(e,t),s=yte(e,t);return{DatePicker:n,WeekPicker:o,MonthPicker:r,YearPicker:i,TimePicker:l,QuarterPicker:a,RangePicker:s}}const{DatePicker:Fm,WeekPicker:Zd,MonthPicker:Jd,YearPicker:$te,TimePicker:Cte,QuarterPicker:Qd,RangePicker:ef}=mE(c1),xte=v(Fm,{WeekPicker:Zd,MonthPicker:Jd,YearPicker:$te,RangePicker:ef,TimePicker:Cte,QuarterPicker:Qd,install:e=>(e.component(Fm.name,Fm),e.component(ef.name,ef),e.component(Jd.name,Jd),e.component(Zd.name,Zd),e.component(Qd.name,Qd),e)});function xd(e){return e!=null}const zm=e=>{const{itemPrefixCls:t,component:n,span:o,labelStyle:r,contentStyle:i,bordered:l,label:a,content:s,colon:c}=e,u=n;return l?p(u,{class:[{[`${t}-item-label`]:xd(a),[`${t}-item-content`]:xd(s)}],colSpan:o},{default:()=>[xd(a)&&p("span",{style:r},[a]),xd(s)&&p("span",{style:i},[s])]}):p(u,{class:[`${t}-item`],colSpan:o},{default:()=>[p("div",{class:`${t}-item-container`},[(a||a===0)&&p("span",{class:[`${t}-item-label`,{[`${t}-item-no-colon`]:!c}],style:r},[a]),(s||s===0)&&p("span",{class:`${t}-item-content`,style:i},[s])])]})},wte=e=>{const t=(c,u,d)=>{let{colon:f,prefixCls:h,bordered:m}=u,{component:g,type:y,showLabel:b,showContent:S,labelStyle:$,contentStyle:x}=d;return c.map((C,O)=>{var w,P;const T=C.props||{},{prefixCls:M=h,span:E=1,labelStyle:A=T["label-style"],contentStyle:R=T["content-style"],label:F=(P=(w=C.children)===null||w===void 0?void 0:w.label)===null||P===void 0?void 0:P.call(w)}=T,_=ih(C),N=ND(C),B=g6(C),{key:L}=C;return typeof g=="string"?p(zm,{key:`${y}-${String(L)||O}`,class:N,style:B,labelStyle:v(v({},$),A),contentStyle:v(v({},x),R),span:E,colon:f,component:g,itemPrefixCls:M,bordered:m,label:b?F:null,content:S?_:null},null):[p(zm,{key:`label-${String(L)||O}`,class:N,style:v(v(v({},$),B),A),span:1,colon:f,component:g[0],itemPrefixCls:M,bordered:m,label:F},null),p(zm,{key:`content-${String(L)||O}`,class:N,style:v(v(v({},x),B),R),span:E*2-1,component:g[1],itemPrefixCls:M,bordered:m,content:_},null)]})},{prefixCls:n,vertical:o,row:r,index:i,bordered:l}=e,{labelStyle:a,contentStyle:s}=Ke(yE,{labelStyle:ie({}),contentStyle:ie({})});return o?p(He,null,[p("tr",{key:`label-${i}`,class:`${n}-row`},[t(r,e,{component:"th",type:"label",showLabel:!0,labelStyle:a.value,contentStyle:s.value})]),p("tr",{key:`content-${i}`,class:`${n}-row`},[t(r,e,{component:"td",type:"content",showContent:!0,labelStyle:a.value,contentStyle:s.value})])]):p("tr",{key:i,class:`${n}-row`},[t(r,e,{component:l?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0,labelStyle:a.value,contentStyle:s.value})])},Ote=e=>{const{componentCls:t,descriptionsSmallPadding:n,descriptionsDefaultPadding:o,descriptionsMiddlePadding:r,descriptionsBg:i}=e;return{[`&${t}-bordered`]:{[`${t}-view`]:{border:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto",borderCollapse:"collapse"}},[`${t}-item-label, ${t}-item-content`]:{padding:o,borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`${t}-item-label`]:{backgroundColor:i,"&::after":{display:"none"}},[`${t}-row`]:{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBottom:"none"}},[`&${t}-middle`]:{[`${t}-item-label, ${t}-item-content`]:{padding:r}},[`&${t}-small`]:{[`${t}-item-label, ${t}-item-content`]:{padding:n}}}}},Pte=e=>{const{componentCls:t,descriptionsExtraColor:n,descriptionItemPaddingBottom:o,descriptionsItemLabelColonMarginRight:r,descriptionsItemLabelColonMarginLeft:i,descriptionsTitleMarginBottom:l}=e;return{[t]:v(v(v({},Ze(e)),Ote(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:l},[`${t}-title`]:v(v({},Zt),{flex:"auto",color:e.colorText,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:n,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed"}},[`${t}-row`]:{"> th, > td":{paddingBottom:o},"&:last-child":{borderBottom:"none"}},[`${t}-item-label`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${i}px ${r}px`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}},Ite=Xe("Descriptions",e=>{const t=e.colorFillAlter,n=e.fontSizeSM*e.lineHeightSM,o=e.colorText,r=`${e.paddingXS}px ${e.padding}px`,i=`${e.padding}px ${e.paddingLG}px`,l=`${e.paddingSM}px ${e.paddingLG}px`,a=e.padding,s=e.marginXS,c=e.marginXXS/2,u=Fe(e,{descriptionsBg:t,descriptionsTitleMarginBottom:n,descriptionsExtraColor:o,descriptionItemPaddingBottom:a,descriptionsSmallPadding:r,descriptionsDefaultPadding:i,descriptionsMiddlePadding:l,descriptionsItemLabelColonMarginRight:s,descriptionsItemLabelColonMarginLeft:c});return[Pte(u)]});W.any;const Tte=()=>({prefixCls:String,label:W.any,labelStyle:{type:Object,default:void 0},contentStyle:{type:Object,default:void 0},span:{type:Number,default:1}}),vE=re({compatConfig:{MODE:3},name:"ADescriptionsItem",props:Tte(),setup(e,t){let{slots:n}=t;return()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}),bE={xxxl:3,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1};function Ete(e,t){if(typeof e=="number")return e;if(typeof e=="object")for(let n=0;nt)&&(o=ht(e,{span:t})),o}function _te(e,t){const n=xt(e),o=[];let r=[],i=t;return n.forEach((l,a)=>{var s;const c=(s=l.props)===null||s===void 0?void 0:s.span,u=c||1;if(a===n.length-1){r.push(M2(l,i,c)),o.push(r);return}u({prefixCls:String,bordered:{type:Boolean,default:void 0},size:{type:String,default:"default"},title:W.any,extra:W.any,column:{type:[Number,Object],default:()=>bE},layout:String,colon:{type:Boolean,default:void 0},labelStyle:{type:Object,default:void 0},contentStyle:{type:Object,default:void 0}}),yE=Symbol("descriptionsContext"),Ma=re({compatConfig:{MODE:3},name:"ADescriptions",inheritAttrs:!1,props:Mte(),slots:Object,Item:vE,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ee("descriptions",e);let l;const a=ie({}),[s,c]=Ite(r),u=qy();Qp(()=>{l=u.value.subscribe(f=>{typeof e.column=="object"&&(a.value=f)})}),tt(()=>{u.value.unsubscribe(l)}),qe(yE,{labelStyle:We(e,"labelStyle"),contentStyle:We(e,"contentStyle")});const d=I(()=>Ete(e.column,a.value));return()=>{var f,h,m;const{size:g,bordered:y=!1,layout:b="horizontal",colon:S=!0,title:$=(f=n.title)===null||f===void 0?void 0:f.call(n),extra:x=(h=n.extra)===null||h===void 0?void 0:h.call(n)}=e,C=(m=n.default)===null||m===void 0?void 0:m.call(n),O=_te(C,d.value);return s(p("div",D(D({},o),{},{class:[r.value,{[`${r.value}-${g}`]:g!=="default",[`${r.value}-bordered`]:!!y,[`${r.value}-rtl`]:i.value==="rtl"},o.class,c.value]}),[($||x)&&p("div",{class:`${r.value}-header`},[$&&p("div",{class:`${r.value}-title`},[$]),x&&p("div",{class:`${r.value}-extra`},[x])]),p("div",{class:`${r.value}-view`},[p("table",null,[p("tbody",null,[O.map((w,P)=>p(wte,{key:P,index:P,colon:S,prefixCls:r.value,vertical:b==="vertical",bordered:y,row:w},null))])])])]))}}});Ma.install=function(e){return e.component(Ma.name,Ma),e.component(Ma.Item.name,Ma.Item),e};const Ate=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:o,lineWidth:r}=e;return{[t]:v(v({},Ze(e)),{borderBlockStart:`${r}px solid ${o}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",margin:`0 ${e.dividerVerticalGutterMargin}px`,verticalAlign:"middle",borderTop:0,borderInlineStart:`${r}px solid ${o}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${e.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${e.dividerHorizontalWithTextGutterMargin}px 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${o}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${r}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-left`]:{"&::before":{width:"5%"},"&::after":{width:"95%"}},[`&-horizontal${t}-with-text-right`]:{"&::before":{width:"95%"},"&::after":{width:"5%"}},[`${t}-inner-text`]:{display:"inline-block",padding:"0 1em"},"&-dashed":{background:"none",borderColor:o,borderStyle:"dashed",borderWidth:`${r}px 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:r,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-left${t}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-right${t}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}},Rte=Xe("Divider",e=>{const t=Fe(e,{dividerVerticalGutterMargin:e.marginXS,dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG});return[Ate(t)]},{sizePaddingEdgeHorizontal:0}),Dte=()=>({prefixCls:String,type:{type:String,default:"horizontal"},dashed:{type:Boolean,default:!1},orientation:{type:String,default:"center"},plain:{type:Boolean,default:!1},orientationMargin:[String,Number]}),Nte=re({name:"ADivider",inheritAttrs:!1,compatConfig:{MODE:3},props:Dte(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ee("divider",e),[l,a]=Rte(r),s=I(()=>e.orientation==="left"&&e.orientationMargin!=null),c=I(()=>e.orientation==="right"&&e.orientationMargin!=null),u=I(()=>{const{type:h,dashed:m,plain:g}=e,y=r.value;return{[y]:!0,[a.value]:!!a.value,[`${y}-${h}`]:!0,[`${y}-dashed`]:!!m,[`${y}-plain`]:!!g,[`${y}-rtl`]:i.value==="rtl",[`${y}-no-default-orientation-margin-left`]:s.value,[`${y}-no-default-orientation-margin-right`]:c.value}}),d=I(()=>{const h=typeof e.orientationMargin=="number"?`${e.orientationMargin}px`:e.orientationMargin;return v(v({},s.value&&{marginLeft:h}),c.value&&{marginRight:h})}),f=I(()=>e.orientation.length>0?"-"+e.orientation:e.orientation);return()=>{var h;const m=xt((h=n.default)===null||h===void 0?void 0:h.call(n));return l(p("div",D(D({},o),{},{class:[u.value,m.length?`${r.value}-with-text ${r.value}-with-text${f.value}`:"",o.class],role:"separator"}),[m.length?p("span",{class:`${r.value}-inner-text`,style:d.value},[m]):null]))}}}),Bte=At(Nte);sr.Button=Zc;sr.install=function(e){return e.component(sr.name,sr),e.component(Zc.name,Zc),e};const SE=()=>({prefixCls:String,width:W.oneOfType([W.string,W.number]),height:W.oneOfType([W.string,W.number]),style:{type:Object,default:void 0},class:String,rootClassName:String,rootStyle:Ne(),placement:{type:String},wrapperClassName:String,level:{type:[String,Array]},levelMove:{type:[Number,Function,Array]},duration:String,ease:String,showMask:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},maskStyle:{type:Object,default:void 0},afterVisibleChange:Function,keyboard:{type:Boolean,default:void 0},contentWrapperStyle:ut(),autofocus:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},motion:ve(),maskMotion:Ne()}),Lte=()=>v(v({},SE()),{forceRender:{type:Boolean,default:void 0},getContainer:W.oneOfType([W.string,W.func,W.object,W.looseBool])}),kte=()=>v(v({},SE()),{getContainer:Function,getOpenCount:Function,scrollLocker:W.any,inline:Boolean});function Fte(e){return Array.isArray(e)?e:[e]}const zte={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"};Object.keys(zte).filter(e=>{if(typeof document>"u")return!1;const t=document.getElementsByTagName("html")[0];return e in(t?t.style:{})})[0];const Hte=!(typeof window<"u"&&window.document&&window.document.createElement);var jte=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{lt(()=>{var b;const{open:S,getContainer:$,showMask:x,autofocus:C}=e,O=$==null?void 0:$();m(e),S&&(O&&(O.parentNode,document.body),lt(()=>{C&&u()}),x&&((b=e.scrollLocker)===null||b===void 0||b.lock()))})}),Se(()=>e.level,()=>{m(e)},{flush:"post"}),Se(()=>e.open,()=>{const{open:b,getContainer:S,scrollLocker:$,showMask:x,autofocus:C}=e,O=S==null?void 0:S();O&&(O.parentNode,document.body),b?(C&&u(),x&&($==null||$.lock())):$==null||$.unLock()},{flush:"post"}),Wn(()=>{var b;const{open:S}=e;S&&(document.body.style.touchAction=""),(b=e.scrollLocker)===null||b===void 0||b.unLock()}),Se(()=>e.placement,b=>{b&&(s.value=null)});const u=()=>{var b,S;(S=(b=i.value)===null||b===void 0?void 0:b.focus)===null||S===void 0||S.call(b)},d=b=>{n("close",b)},f=b=>{b.keyCode===Ie.ESC&&(b.stopPropagation(),d(b))},h=()=>{const{open:b,afterVisibleChange:S}=e;S&&S(!!b)},m=b=>{let{level:S,getContainer:$}=b;if(Hte)return;const x=$==null?void 0:$(),C=x?x.parentNode:null;c=[],S==="all"?(C?Array.prototype.slice.call(C.children):[]).forEach(w=>{w.nodeName!=="SCRIPT"&&w.nodeName!=="STYLE"&&w.nodeName!=="LINK"&&w!==x&&c.push(w)}):S&&Fte(S).forEach(O=>{document.querySelectorAll(O).forEach(w=>{c.push(w)})})},g=b=>{n("handleClick",b)},y=oe(!1);return Se(i,()=>{lt(()=>{y.value=!0})}),()=>{var b,S;const{width:$,height:x,open:C,prefixCls:O,placement:w,level:P,levelMove:T,ease:M,duration:E,getContainer:A,onChange:R,afterVisibleChange:F,showMask:_,maskClosable:N,maskStyle:B,keyboard:L,getOpenCount:k,scrollLocker:z,contentWrapperStyle:H,style:j,class:Y,rootClassName:Z,rootStyle:G,maskMotion:te,motion:U,inline:Q}=e,J=jte(e,["width","height","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","keyboard","getOpenCount","scrollLocker","contentWrapperStyle","style","class","rootClassName","rootStyle","maskMotion","motion","inline"]),X=C&&y.value,q=ce(O,{[`${O}-${w}`]:!0,[`${O}-open`]:X,[`${O}-inline`]:Q,"no-mask":!_,[Z]:!0}),V=typeof U=="function"?U(w):U;return p("div",D(D({},rt(J,["autofocus"])),{},{tabindex:-1,class:q,style:G,ref:i,onKeydown:X&&L?f:void 0}),[p(rn,te,{default:()=>[_&&_n(p("div",{class:`${O}-mask`,onClick:N?d:void 0,style:B,ref:l},null),[[oo,X]])]}),p(rn,D(D({},V),{},{onAfterEnter:h,onAfterLeave:h}),{default:()=>[_n(p("div",{class:`${O}-content-wrapper`,style:[H],ref:r},[p("div",{class:[`${O}-content`,Y],style:j,ref:s},[(b=o.default)===null||b===void 0?void 0:b.call(o)]),o.handler?p("div",{onClick:g,ref:a},[(S=o.handler)===null||S===void 0?void 0:S.call(o)]):null]),[[oo,X]])]})])}}});var R2=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{},showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",keyboard:!0,forceRender:!1,autofocus:!0}),emits:["handleClick","close"],setup(e,t){let{emit:n,slots:o}=t;const r=ie(null),i=a=>{n("handleClick",a)},l=a=>{n("close",a)};return()=>{const{getContainer:a,wrapperClassName:s,rootClassName:c,rootStyle:u,forceRender:d}=e,f=R2(e,["getContainer","wrapperClassName","rootClassName","rootStyle","forceRender"]);let h=null;if(!a)return p(A2,D(D({},f),{},{rootClassName:c,rootStyle:u,open:e.open,onClose:l,onHandleClick:i,inline:!0}),o);const m=!!o.handler||d;return(m||e.open||r.value)&&(h=p(gu,{autoLock:!0,visible:e.open,forceRender:m,getContainer:a,wrapperClassName:s},{default:g=>{var{visible:y,afterClose:b}=g,S=R2(g,["visible","afterClose"]);return p(A2,D(D(D({ref:r},f),S),{},{rootClassName:c,rootStyle:u,open:y!==void 0?y:e.open,afterVisibleChange:b!==void 0?b:e.afterVisibleChange,onClose:l,onHandleClick:i}),o)}})),h}}}),Wte=e=>{const{componentCls:t,motionDurationSlow:n}=e,o={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${n}`}}};return{[t]:{[`${t}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${n}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${t}-panel-motion`]:{"&-left":[o,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[o,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[o,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[o,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}},Kte=e=>{const{componentCls:t,zIndexPopup:n,colorBgMask:o,colorBgElevated:r,motionDurationSlow:i,motionDurationMid:l,padding:a,paddingLG:s,fontSizeLG:c,lineHeightLG:u,lineWidth:d,lineType:f,colorSplit:h,marginSM:m,colorIcon:g,colorIconHover:y,colorText:b,fontWeightStrong:S,drawerFooterPaddingVertical:$,drawerFooterPaddingHorizontal:x}=e,C=`${t}-content-wrapper`;return{[t]:{position:"fixed",inset:0,zIndex:n,pointerEvents:"none","&-pure":{position:"relative",background:r,[`&${t}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${t}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${t}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${t}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${t}-mask`]:{position:"absolute",inset:0,zIndex:n,background:o,pointerEvents:"auto"},[C]:{position:"absolute",zIndex:n,transition:`all ${i}`,"&-hidden":{display:"none"}},[`&-left > ${C}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${C}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${C}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${C}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${t}-content`]:{width:"100%",height:"100%",overflow:"auto",background:r,pointerEvents:"auto"},[`${t}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${t}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${a}px ${s}px`,fontSize:c,lineHeight:u,borderBottom:`${d}px ${f} ${h}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${t}-extra`]:{flex:"none"},[`${t}-close`]:{display:"inline-block",marginInlineEnd:m,color:g,fontWeight:S,fontSize:c,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${l}`,textRendering:"auto","&:focus, &:hover":{color:y,textDecoration:"none"}},[`${t}-title`]:{flex:1,margin:0,color:b,fontWeight:e.fontWeightStrong,fontSize:c,lineHeight:u},[`${t}-body`]:{flex:1,minWidth:0,minHeight:0,padding:s,overflow:"auto"},[`${t}-footer`]:{flexShrink:0,padding:`${$}px ${x}px`,borderTop:`${d}px ${f} ${h}`},"&-rtl":{direction:"rtl"}}}},Ute=Xe("Drawer",e=>{const t=Fe(e,{drawerFooterPaddingVertical:e.paddingXS,drawerFooterPaddingHorizontal:e.padding});return[Kte(t),Wte(t)]},e=>({zIndexPopup:e.zIndexPopupBase}));var Gte=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({autofocus:{type:Boolean,default:void 0},closable:{type:Boolean,default:void 0},closeIcon:W.any,destroyOnClose:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},getContainer:{type:[String,Function,Boolean,Object],default:void 0},maskClosable:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},maskStyle:Ne(),rootClassName:String,rootStyle:Ne(),size:{type:String},drawerStyle:Ne(),headerStyle:Ne(),bodyStyle:Ne(),contentWrapperStyle:{type:Object,default:void 0},title:W.any,visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},width:W.oneOfType([W.string,W.number]),height:W.oneOfType([W.string,W.number]),zIndex:Number,prefixCls:String,push:W.oneOfType([W.looseBool,{type:Object}]),placement:W.oneOf(Xte),keyboard:{type:Boolean,default:void 0},extra:W.any,footer:W.any,footerStyle:Ne(),level:W.any,levelMove:{type:[Number,Array,Function]},handle:W.any,afterVisibleChange:Function,onAfterVisibleChange:Function,onAfterOpenChange:Function,"onUpdate:visible":Function,"onUpdate:open":Function,onClose:Function}),qte=re({compatConfig:{MODE:3},name:"ADrawer",inheritAttrs:!1,props:et(Yte(),{closable:!0,placement:"right",maskClosable:!0,mask:!0,level:null,keyboard:!0,push:D2}),slots:Object,setup(e,t){let{emit:n,slots:o,attrs:r}=t;const i=oe(!1),l=oe(!1),a=oe(null),s=oe(!1),c=oe(!1),u=I(()=>{var k;return(k=e.open)!==null&&k!==void 0?k:e.visible});Se(u,()=>{u.value?s.value=!0:c.value=!1},{immediate:!0}),Se([u,s],()=>{u.value&&s.value&&(c.value=!0)},{immediate:!0});const d=Ke("parentDrawerOpts",null),{prefixCls:f,getPopupContainer:h,direction:m}=Ee("drawer",e),[g,y]=Ute(f),b=I(()=>e.getContainer===void 0&&(h!=null&&h.value)?()=>h.value(document.body):e.getContainer);It(!e.afterVisibleChange,"Drawer","`afterVisibleChange` prop is deprecated, please use `@afterVisibleChange` event instead"),qe("parentDrawerOpts",{setPush:()=>{i.value=!0},setPull:()=>{i.value=!1,lt(()=>{x()})}}),Ue(()=>{u.value&&d&&d.setPush()}),Wn(()=>{d&&d.setPull()}),Se(c,()=>{d&&(c.value?d.setPush():d.setPull())},{flush:"post"});const x=()=>{var k,z;(z=(k=a.value)===null||k===void 0?void 0:k.domFocus)===null||z===void 0||z.call(k)},C=k=>{n("update:visible",!1),n("update:open",!1),n("close",k)},O=k=>{var z;k||(l.value===!1&&(l.value=!0),e.destroyOnClose&&(s.value=!1)),(z=e.afterVisibleChange)===null||z===void 0||z.call(e,k),n("afterVisibleChange",k),n("afterOpenChange",k)},w=I(()=>{const{push:k,placement:z}=e;let H;return typeof k=="boolean"?H=k?D2.distance:0:H=k.distance,H=parseFloat(String(H||0)),z==="left"||z==="right"?`translateX(${z==="left"?H:-H}px)`:z==="top"||z==="bottom"?`translateY(${z==="top"?H:-H}px)`:null}),P=I(()=>{var k;return(k=e.width)!==null&&k!==void 0?k:e.size==="large"?736:378}),T=I(()=>{var k;return(k=e.height)!==null&&k!==void 0?k:e.size==="large"?736:378}),M=I(()=>{const{mask:k,placement:z}=e;if(!c.value&&!k)return{};const H={};return z==="left"||z==="right"?H.width=ip(P.value)?`${P.value}px`:P.value:H.height=ip(T.value)?`${T.value}px`:T.value,H}),E=I(()=>{const{zIndex:k,contentWrapperStyle:z}=e,H=M.value;return[{zIndex:k,transform:i.value?w.value:void 0},v({},z),H]}),A=k=>{const{closable:z,headerStyle:H}=e,j=on(o,e,"extra"),Y=on(o,e,"title");return!Y&&!z?null:p("div",{class:ce(`${k}-header`,{[`${k}-header-close-only`]:z&&!Y&&!j}),style:H},[p("div",{class:`${k}-header-title`},[R(k),Y&&p("div",{class:`${k}-title`},[Y])]),j&&p("div",{class:`${k}-extra`},[j])])},R=k=>{var z;const{closable:H}=e,j=o.closeIcon?(z=o.closeIcon)===null||z===void 0?void 0:z.call(o):e.closeIcon;return H&&p("button",{key:"closer",onClick:C,"aria-label":"Close",class:`${k}-close`},[j===void 0?p(Kn,null,null):j])},F=k=>{var z;if(l.value&&!e.forceRender&&!s.value)return null;const{bodyStyle:H,drawerStyle:j}=e;return p("div",{class:`${k}-wrapper-body`,style:j},[A(k),p("div",{key:"body",class:`${k}-body`,style:H},[(z=o.default)===null||z===void 0?void 0:z.call(o)]),_(k)])},_=k=>{const z=on(o,e,"footer");if(!z)return null;const H=`${k}-footer`;return p("div",{class:H,style:e.footerStyle},[z])},N=I(()=>ce({"no-mask":!e.mask,[`${f.value}-rtl`]:m.value==="rtl"},e.rootClassName,y.value)),B=I(()=>qo(jn(f.value,"mask-motion"))),L=k=>qo(jn(f.value,`panel-motion-${k}`));return()=>{const{width:k,height:z,placement:H,mask:j,forceRender:Y}=e,Z=Gte(e,["width","height","placement","mask","forceRender"]),G=v(v(v({},r),rt(Z,["size","closeIcon","closable","destroyOnClose","drawerStyle","headerStyle","bodyStyle","title","push","onAfterVisibleChange","onClose","onUpdate:visible","onUpdate:open","visible"])),{forceRender:Y,onClose:C,afterVisibleChange:O,handler:!1,prefixCls:f.value,open:c.value,showMask:j,placement:H,ref:a});return g(p(qc,null,{default:()=>[p(Vte,D(D({},G),{},{maskMotion:B.value,motion:L,width:P.value,height:T.value,getContainer:b.value,rootClassName:N.value,rootStyle:e.rootStyle,contentWrapperStyle:E.value}),{handler:e.handle?()=>e.handle:o.handle,default:()=>F(f.value)})]}))}}}),Zte=At(qte);var Jte={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"};function N2(e){for(var t=1;t({prefixCls:String,description:W.any,type:Be("default"),shape:Be("circle"),tooltip:W.any,href:String,target:String,badge:Ne(),onClick:ve()}),ene=()=>({prefixCls:Be()}),tne=()=>v(v({},eS()),{trigger:Be(),open:Ce(),onOpenChange:ve(),"onUpdate:open":ve()}),nne=()=>v(v({},eS()),{prefixCls:String,duration:Number,target:ve(),visibilityHeight:Number,onClick:ve()}),one=re({compatConfig:{MODE:3},name:"AFloatButtonContent",inheritAttrs:!1,props:ene(),setup(e,t){let{attrs:n,slots:o}=t;return()=>{var r;const{prefixCls:i}=e,l=Nt((r=o.description)===null||r===void 0?void 0:r.call(o));return p("div",D(D({},n),{},{class:[n.class,`${i}-content`]}),[o.icon||l.length?p(He,null,[o.icon&&p("div",{class:`${i}-icon`},[o.icon()]),l.length?p("div",{class:`${i}-description`},[l]):null]):p("div",{class:`${i}-icon`},[p(ng,null,null)])])}}}),$E=Symbol("floatButtonGroupContext"),rne=e=>(qe($E,e),e),CE=()=>Ke($E,{shape:ie()}),B2=e=>e===0?0:e-Math.sqrt(Math.pow(e,2)/2),ine=e=>{const{componentCls:t,floatButtonSize:n,motionDurationSlow:o,motionEaseInOutCirc:r}=e,i=`${t}-group`,l=new it("antFloatButtonMoveDownIn",{"0%":{transform:`translate3d(0, ${n}px, 0)`,transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),a=new it("antFloatButtonMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:`translate3d(0, ${n}px, 0)`,transformOrigin:"0 0",opacity:0}});return[{[`${i}-wrap`]:v({},bu(`${i}-wrap`,l,a,o,!0))},{[`${i}-wrap`]:{[` + &${i}-wrap-enter, + &${i}-wrap-appear + `]:{opacity:0,animationTimingFunction:r},[`&${i}-wrap-leave`]:{animationTimingFunction:r}}}]},lne=e=>{const{antCls:t,componentCls:n,floatButtonSize:o,margin:r,borderRadiusLG:i,borderRadiusSM:l,badgeOffset:a,floatButtonBodyPadding:s}=e,c=`${n}-group`;return{[c]:v(v({},Ze(e)),{zIndex:99,display:"block",border:"none",position:"fixed",width:o,height:"auto",boxShadow:"none",minHeight:o,insetInlineEnd:e.floatButtonInsetInlineEnd,insetBlockEnd:e.floatButtonInsetBlockEnd,borderRadius:i,[`${c}-wrap`]:{zIndex:-1,display:"block",position:"relative",marginBottom:r},[`&${c}-rtl`]:{direction:"rtl"},[n]:{position:"static"}}),[`${c}-circle`]:{[`${n}-circle:not(:last-child)`]:{marginBottom:e.margin,[`${n}-body`]:{width:o,height:o,borderRadius:"50%"}}},[`${c}-square`]:{[`${n}-square`]:{borderRadius:0,padding:0,"&:first-child":{borderStartStartRadius:i,borderStartEndRadius:i},"&:last-child":{borderEndStartRadius:i,borderEndEndRadius:i},"&:not(:last-child)":{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${t}-badge`]:{[`${t}-badge-count`]:{top:-(s+a),insetInlineEnd:-(s+a)}}},[`${c}-wrap`]:{display:"block",borderRadius:i,boxShadow:e.boxShadowSecondary,[`${n}-square`]:{boxShadow:"none",marginTop:0,borderRadius:0,padding:s,"&:first-child":{borderStartStartRadius:i,borderStartEndRadius:i},"&:last-child":{borderEndStartRadius:i,borderEndEndRadius:i},"&:not(:last-child)":{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${n}-body`]:{width:e.floatButtonBodySize,height:e.floatButtonBodySize}}}},[`${c}-circle-shadow`]:{boxShadow:"none"},[`${c}-square-shadow`]:{boxShadow:e.boxShadowSecondary,[`${n}-square`]:{boxShadow:"none",padding:s,[`${n}-body`]:{width:e.floatButtonBodySize,height:e.floatButtonBodySize,borderRadius:l}}}}},ane=e=>{const{antCls:t,componentCls:n,floatButtonBodyPadding:o,floatButtonIconSize:r,floatButtonSize:i,borderRadiusLG:l,badgeOffset:a,dotOffsetInSquare:s,dotOffsetInCircle:c}=e;return{[n]:v(v({},Ze(e)),{border:"none",position:"fixed",cursor:"pointer",zIndex:99,display:"block",justifyContent:"center",alignItems:"center",width:i,height:i,insetInlineEnd:e.floatButtonInsetInlineEnd,insetBlockEnd:e.floatButtonInsetBlockEnd,boxShadow:e.boxShadowSecondary,"&-pure":{position:"relative",inset:"auto"},"&:empty":{display:"none"},[`${t}-badge`]:{width:"100%",height:"100%",[`${t}-badge-count`]:{transform:"translate(0, 0)",transformOrigin:"center",top:-a,insetInlineEnd:-a}},[`${n}-body`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",transition:`all ${e.motionDurationMid}`,[`${n}-content`]:{overflow:"hidden",textAlign:"center",minHeight:i,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:`${o/2}px ${o}px`,[`${n}-icon`]:{textAlign:"center",margin:"auto",width:r,fontSize:r,lineHeight:1}}}}),[`${n}-rtl`]:{direction:"rtl"},[`${n}-circle`]:{height:i,borderRadius:"50%",[`${t}-badge`]:{[`${t}-badge-dot`]:{top:c,insetInlineEnd:c}},[`${n}-body`]:{borderRadius:"50%"}},[`${n}-square`]:{height:"auto",minHeight:i,borderRadius:l,[`${t}-badge`]:{[`${t}-badge-dot`]:{top:s,insetInlineEnd:s}},[`${n}-body`]:{height:"auto",borderRadius:l}},[`${n}-default`]:{backgroundColor:e.floatButtonBackgroundColor,transition:`background-color ${e.motionDurationMid}`,[`${n}-body`]:{backgroundColor:e.floatButtonBackgroundColor,transition:`background-color ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.colorFillContent},[`${n}-content`]:{[`${n}-icon`]:{color:e.colorText},[`${n}-description`]:{display:"flex",alignItems:"center",lineHeight:`${e.fontSizeLG}px`,color:e.colorText,fontSize:e.fontSizeSM}}}},[`${n}-primary`]:{backgroundColor:e.colorPrimary,[`${n}-body`]:{backgroundColor:e.colorPrimary,transition:`background-color ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.colorPrimaryHover},[`${n}-content`]:{[`${n}-icon`]:{color:e.colorTextLightSolid},[`${n}-description`]:{display:"flex",alignItems:"center",lineHeight:`${e.fontSizeLG}px`,color:e.colorTextLightSolid,fontSize:e.fontSizeSM}}}}}},tS=Xe("FloatButton",e=>{const{colorTextLightSolid:t,colorBgElevated:n,controlHeightLG:o,marginXXL:r,marginLG:i,fontSize:l,fontSizeIcon:a,controlItemBgHover:s,paddingXXS:c,borderRadiusLG:u}=e,d=Fe(e,{floatButtonBackgroundColor:n,floatButtonColor:t,floatButtonHoverBackgroundColor:s,floatButtonFontSize:l,floatButtonIconSize:a*1.5,floatButtonSize:o,floatButtonInsetBlockEnd:r,floatButtonInsetInlineEnd:i,floatButtonBodySize:o-c*2,floatButtonBodyPadding:c,badgeOffset:c*1.5,dotOffsetInCircle:B2(o/2),dotOffsetInSquare:B2(u)});return[lne(d),ane(d),Gy(e),ine(d)]});var sne=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r(s==null?void 0:s.value)||e.shape);return()=>{var d;const{prefixCls:f,type:h="default",shape:m="circle",description:g=(d=o.description)===null||d===void 0?void 0:d.call(o),tooltip:y,badge:b={}}=e,S=sne(e,["prefixCls","type","shape","description","tooltip","badge"]),$=ce(r.value,`${r.value}-${h}`,`${r.value}-${u.value}`,{[`${r.value}-rtl`]:i.value==="rtl"},n.class,a.value),x=p(ho,{placement:"left"},{title:o.tooltip||y?()=>o.tooltip&&o.tooltip()||y:void 0,default:()=>p(yc,b,{default:()=>[p("div",{class:`${r.value}-body`},[p(one,{prefixCls:r.value},{icon:o.icon,description:()=>g})])]})});return l(e.href?p("a",D(D(D({ref:c},n),S),{},{class:$}),[x]):p("button",D(D(D({ref:c},n),S),{},{class:$,type:"button"}),[x]))}}}),Pp=re({compatConfig:{MODE:3},name:"AFloatButtonGroup",inheritAttrs:!1,props:et(tne(),{type:"default",shape:"circle"}),setup(e,t){let{attrs:n,slots:o,emit:r}=t;const{prefixCls:i,direction:l}=Ee(nS,e),[a,s]=tS(i),[c,u]=Mt(!1,{value:I(()=>e.open)}),d=ie(null),f=ie(null);rne({shape:I(()=>e.shape)});const h={onMouseenter(){var b;u(!0),r("update:open",!0),(b=e.onOpenChange)===null||b===void 0||b.call(e,!0)},onMouseleave(){var b;u(!1),r("update:open",!1),(b=e.onOpenChange)===null||b===void 0||b.call(e,!1)}},m=I(()=>e.trigger==="hover"?h:{}),g=()=>{var b;const S=!c.value;r("update:open",S),(b=e.onOpenChange)===null||b===void 0||b.call(e,S),u(S)},y=b=>{var S,$,x;if(!((S=d.value)===null||S===void 0)&&S.contains(b.target)){!(($=to(f.value))===null||$===void 0)&&$.contains(b.target)&&g();return}u(!1),r("update:open",!1),(x=e.onOpenChange)===null||x===void 0||x.call(e,!1)};return Se(I(()=>e.trigger),b=>{Hn()&&(document.removeEventListener("click",y),b==="click"&&document.addEventListener("click",y))},{immediate:!0}),tt(()=>{document.removeEventListener("click",y)}),()=>{var b;const{shape:S="circle",type:$="default",tooltip:x,description:C,trigger:O}=e,w=`${i.value}-group`,P=ce(w,s.value,n.class,{[`${w}-rtl`]:l.value==="rtl",[`${w}-${S}`]:S,[`${w}-${S}-shadow`]:!O}),T=ce(s.value,`${w}-wrap`),M=qo(`${w}-wrap`);return a(p("div",D(D({ref:d},n),{},{class:P},m.value),[O&&["click","hover"].includes(O)?p(He,null,[p(rn,M,{default:()=>[_n(p("div",{class:T},[o.default&&o.default()]),[[oo,c.value]])]}),p(Gi,{ref:f,type:$,shape:S,tooltip:x,description:C},{icon:()=>{var E,A;return c.value?((E=o.closeIcon)===null||E===void 0?void 0:E.call(o))||p(Kn,null,null):((A=o.icon)===null||A===void 0?void 0:A.call(o))||p(ng,null,null)},tooltip:o.tooltip,description:o.description})]):(b=o.default)===null||b===void 0?void 0:b.call(o)]))}}});var cne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 168H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM518.3 355a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V848c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V509.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 355z"}}]},name:"vertical-align-top",theme:"outlined"};function L2(e){for(var t=1;twindow,duration:450,type:"default",shape:"circle"}),setup(e,t){let{slots:n,attrs:o,emit:r}=t;const{prefixCls:i,direction:l}=Ee(nS,e),[a]=tS(i),s=ie(),c=ft({visible:e.visibilityHeight===0,scrollEvent:null}),u=()=>s.value&&s.value.ownerDocument?s.value.ownerDocument:window,d=y=>{const{target:b=u,duration:S}=e;oy(0,{getContainer:b,duration:S}),r("click",y)},f=zv(y=>{const{visibilityHeight:b}=e,S=ny(y.target);c.visible=S>=b}),h=()=>{const{target:y}=e,S=(y||u)();f({target:S}),S==null||S.addEventListener("scroll",f)},m=()=>{const{target:y}=e,S=(y||u)();f.cancel(),S==null||S.removeEventListener("scroll",f)};Se(()=>e.target,()=>{m(),lt(()=>{h()})}),Ue(()=>{lt(()=>{h()})}),Zp(()=>{lt(()=>{h()})}),PP(()=>{m()}),tt(()=>{m()});const g=CE();return()=>{const{description:y,type:b,shape:S,tooltip:$,badge:x}=e,C=v(v({},o),{shape:(g==null?void 0:g.shape.value)||S,onClick:d,class:{[`${i.value}`]:!0,[`${o.class}`]:o.class,[`${i.value}-rtl`]:l.value==="rtl"},description:y,type:b,tooltip:$,badge:x}),O=qo("fade");return a(p(rn,O,{default:()=>[_n(p(Gi,D(D({},C),{},{ref:s}),{icon:()=>{var w;return((w=n.icon)===null||w===void 0?void 0:w.call(n))||p(oS,null,null)}}),[[oo,c.visible]])]}))}}});Gi.Group=Pp;Gi.BackTop=Ip;Gi.install=function(e){return e.component(Gi.name,Gi),e.component(Pp.name,Pp),e.component(Ip.name,Ip),e};const wc=e=>e!=null&&(Array.isArray(e)?Nt(e).length:!0);function rS(e){return wc(e.prefix)||wc(e.suffix)||wc(e.allowClear)}function tf(e){return wc(e.addonBefore)||wc(e.addonAfter)}function z0(e){return typeof e>"u"||e===null?"":String(e)}function Oc(e,t,n,o){if(!n)return;const r=t;if(t.type==="click"){Object.defineProperty(r,"target",{writable:!0}),Object.defineProperty(r,"currentTarget",{writable:!0});const i=e.cloneNode(!0);r.target=i,r.currentTarget=i,i.value="",n(r);return}if(o!==void 0){Object.defineProperty(r,"target",{writable:!0}),Object.defineProperty(r,"currentTarget",{writable:!0}),r.target=e,r.currentTarget=e,e.value=o,n(r);return}n(r)}function xE(e,t){if(!e)return;e.focus(t);const{cursor:n}=t||{};if(n){const o=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(o,o);break;default:e.setSelectionRange(0,o)}}}const dne=()=>({addonBefore:W.any,addonAfter:W.any,prefix:W.any,suffix:W.any,clearIcon:W.any,affixWrapperClassName:String,groupClassName:String,wrapperClassName:String,inputClassName:String,allowClear:{type:Boolean,default:void 0}}),wE=()=>v(v({},dne()),{value:{type:[String,Number,Symbol],default:void 0},defaultValue:{type:[String,Number,Symbol],default:void 0},inputElement:W.any,prefixCls:String,disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},triggerFocus:Function,readonly:{type:Boolean,default:void 0},handleReset:Function,hidden:{type:Boolean,default:void 0}}),OE=()=>v(v({},wE()),{id:String,placeholder:{type:[String,Number]},autocomplete:String,type:Be("text"),name:String,size:{type:String},autofocus:{type:Boolean,default:void 0},lazy:{type:Boolean,default:!0},maxlength:Number,loading:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},showCount:{type:[Boolean,Object]},htmlSize:Number,onPressEnter:Function,onKeydown:Function,onKeyup:Function,onFocus:Function,onBlur:Function,onChange:Function,onInput:Function,"onUpdate:value":Function,onCompositionstart:Function,onCompositionend:Function,valueModifiers:Object,hidden:{type:Boolean,default:void 0},status:String}),fne=re({name:"BaseInput",inheritAttrs:!1,props:wE(),setup(e,t){let{slots:n,attrs:o}=t;const r=ie(),i=a=>{var s;if(!((s=r.value)===null||s===void 0)&&s.contains(a.target)){const{triggerFocus:c}=e;c==null||c()}},l=()=>{var a;const{allowClear:s,value:c,disabled:u,readonly:d,handleReset:f,suffix:h=n.suffix,prefixCls:m}=e;if(!s)return null;const g=!u&&!d&&c,y=`${m}-clear-icon`,b=((a=n.clearIcon)===null||a===void 0?void 0:a.call(n))||"*";return p("span",{onClick:f,onMousedown:S=>S.preventDefault(),class:ce({[`${y}-hidden`]:!g,[`${y}-has-suffix`]:!!h},y),role:"button",tabindex:-1},[b])};return()=>{var a,s;const{focused:c,value:u,disabled:d,allowClear:f,readonly:h,hidden:m,prefixCls:g,prefix:y=(a=n.prefix)===null||a===void 0?void 0:a.call(n),suffix:b=(s=n.suffix)===null||s===void 0?void 0:s.call(n),addonAfter:S=n.addonAfter,addonBefore:$=n.addonBefore,inputElement:x,affixWrapperClassName:C,wrapperClassName:O,groupClassName:w}=e;let P=ht(x,{value:u,hidden:m});if(rS({prefix:y,suffix:b,allowClear:f})){const T=`${g}-affix-wrapper`,M=ce(T,{[`${T}-disabled`]:d,[`${T}-focused`]:c,[`${T}-readonly`]:h,[`${T}-input-with-clear-btn`]:b&&f&&u},!tf({addonAfter:S,addonBefore:$})&&o.class,C),E=(b||f)&&p("span",{class:`${g}-suffix`},[l(),b]);P=p("span",{class:M,style:o.style,hidden:!tf({addonAfter:S,addonBefore:$})&&m,onMousedown:i,ref:r},[y&&p("span",{class:`${g}-prefix`},[y]),ht(x,{style:null,value:u,hidden:null}),E])}if(tf({addonAfter:S,addonBefore:$})){const T=`${g}-group`,M=`${T}-addon`,E=ce(`${g}-wrapper`,T,O),A=ce(`${g}-group-wrapper`,o.class,w);return p("span",{class:A,style:o.style,hidden:m},[p("span",{class:E},[$&&p("span",{class:M},[$]),ht(P,{style:null,hidden:null}),S&&p("span",{class:M},[S])])])}return P}}});var pne=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.value,()=>{l.value=e.value}),Se(()=>e.disabled,()=>{e.disabled&&(a.value=!1)});const u=w=>{s.value&&xE(s.value.input,w)},d=()=>{var w;(w=s.value.input)===null||w===void 0||w.blur()},f=(w,P,T)=>{var M;(M=s.value.input)===null||M===void 0||M.setSelectionRange(w,P,T)},h=()=>{var w;(w=s.value.input)===null||w===void 0||w.select()};r({focus:u,blur:d,input:I(()=>{var w;return(w=s.value.input)===null||w===void 0?void 0:w.input}),stateValue:l,setSelectionRange:f,select:h});const m=w=>{i("change",w)},g=(w,P)=>{l.value!==w&&(e.value===void 0?l.value=w:lt(()=>{var T;s.value.input.value!==l.value&&((T=c.value)===null||T===void 0||T.$forceUpdate())}),lt(()=>{P&&P()}))},y=w=>{const{value:P}=w.target;if(l.value===P)return;const T=w.target.value;Oc(s.value.input,w,m),g(T)},b=w=>{w.keyCode===13&&i("pressEnter",w),i("keydown",w)},S=w=>{a.value=!0,i("focus",w)},$=w=>{a.value=!1,i("blur",w)},x=w=>{Oc(s.value.input,w,m),g("",()=>{u()})},C=()=>{var w,P;const{addonBefore:T=n.addonBefore,addonAfter:M=n.addonAfter,disabled:E,valueModifiers:A={},htmlSize:R,autocomplete:F,prefixCls:_,inputClassName:N,prefix:B=(w=n.prefix)===null||w===void 0?void 0:w.call(n),suffix:L=(P=n.suffix)===null||P===void 0?void 0:P.call(n),allowClear:k,type:z="text"}=e,H=rt(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","bordered","htmlSize","lazy","showCount","valueModifiers","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName"]),j=v(v(v({},H),o),{autocomplete:F,onChange:y,onInput:y,onFocus:S,onBlur:$,onKeydown:b,class:ce(_,{[`${_}-disabled`]:E},N,!tf({addonAfter:M,addonBefore:T})&&!rS({prefix:B,suffix:L,allowClear:k})&&o.class),ref:s,key:"ant-input",size:R,type:z,lazy:e.lazy});return A.lazy&&delete j.onInput,j.autofocus||delete j.autofocus,p($s,rt(j,["size"]),null)},O=()=>{var w;const{maxlength:P,suffix:T=(w=n.suffix)===null||w===void 0?void 0:w.call(n),showCount:M,prefixCls:E}=e,A=Number(P)>0;if(T||M){const R=[...z0(l.value)].length,F=typeof M=="object"?M.formatter({count:R,maxlength:P}):`${R}${A?` / ${P}`:""}`;return p(He,null,[!!M&&p("span",{class:ce(`${E}-show-count-suffix`,{[`${E}-show-count-has-suffix`]:!!T})},[F]),T])}return null};return Ue(()=>{}),()=>{const{prefixCls:w,disabled:P}=e,T=pne(e,["prefixCls","disabled"]);return p(fne,D(D(D({},T),o),{},{ref:c,prefixCls:w,inputElement:C(),handleReset:x,value:z0(l.value),focused:a.value,triggerFocus:u,suffix:O(),disabled:P}),n)}}}),og=()=>rt(OE(),["wrapperClassName","groupClassName","inputClassName","affixWrapperClassName"]),PE=()=>v(v({},rt(og(),["prefix","addonBefore","addonAfter","suffix"])),{rows:Number,autosize:{type:[Boolean,Object],default:void 0},autoSize:{type:[Boolean,Object],default:void 0},onResize:{type:Function},onCompositionstart:Wl(),onCompositionend:Wl(),valueModifiers:Object});var gne=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rgr(s.status,e.status)),{direction:u,prefixCls:d,size:f,autocomplete:h}=Ee("input",e),{compactSize:m,compactItemClassnames:g}=ol(d,u),y=I(()=>m.value||f.value),[b,S]=D1(d),$=mo();r({focus:R=>{var F;(F=l.value)===null||F===void 0||F.focus(R)},blur:()=>{var R;(R=l.value)===null||R===void 0||R.blur()},input:l,setSelectionRange:(R,F,_)=>{var N;(N=l.value)===null||N===void 0||N.setSelectionRange(R,F,_)},select:()=>{var R;(R=l.value)===null||R===void 0||R.select()}});const P=ie([]),T=()=>{P.value.push(setTimeout(()=>{var R,F,_,N;!((R=l.value)===null||R===void 0)&&R.input&&((F=l.value)===null||F===void 0?void 0:F.input.getAttribute("type"))==="password"&&(!((_=l.value)===null||_===void 0)&&_.input.hasAttribute("value"))&&((N=l.value)===null||N===void 0||N.input.removeAttribute("value"))}))};Ue(()=>{T()}),eh(()=>{P.value.forEach(R=>clearTimeout(R))}),tt(()=>{P.value.forEach(R=>clearTimeout(R))});const M=R=>{T(),i("blur",R),a.onFieldBlur()},E=R=>{T(),i("focus",R)},A=R=>{i("update:value",R.target.value),i("change",R),i("input",R),a.onFieldChange()};return()=>{var R,F,_,N,B,L;const{hasFeedback:k,feedbackIcon:z}=s,{allowClear:H,bordered:j=!0,prefix:Y=(R=n.prefix)===null||R===void 0?void 0:R.call(n),suffix:Z=(F=n.suffix)===null||F===void 0?void 0:F.call(n),addonAfter:G=(_=n.addonAfter)===null||_===void 0?void 0:_.call(n),addonBefore:te=(N=n.addonBefore)===null||N===void 0?void 0:N.call(n),id:U=(B=a.id)===null||B===void 0?void 0:B.value}=e,Q=gne(e,["allowClear","bordered","prefix","suffix","addonAfter","addonBefore","id"]),J=(k||Z)&&p(He,null,[Z,k&&z]),X=d.value,q=rS({prefix:Y,suffix:Z})||!!k,V=n.clearIcon||(()=>p(Un,null,null));return b(p(hne,D(D(D({},o),rt(Q,["onUpdate:value","onChange","onInput"])),{},{onChange:A,id:U,disabled:(L=e.disabled)!==null&&L!==void 0?L:$.value,ref:l,prefixCls:X,autocomplete:h.value,onBlur:M,onFocus:E,prefix:Y,suffix:J,allowClear:H,addonAfter:G&&p(qc,null,{default:()=>[p(Qf,null,{default:()=>[G]})]}),addonBefore:te&&p(qc,null,{default:()=>[p(Qf,null,{default:()=>[te]})]}),class:[o.class,g.value],inputClassName:ce({[`${X}-sm`]:y.value==="small",[`${X}-lg`]:y.value==="large",[`${X}-rtl`]:u.value==="rtl",[`${X}-borderless`]:!j},!q&&Fn(X,c.value),S.value),affixWrapperClassName:ce({[`${X}-affix-wrapper-sm`]:y.value==="small",[`${X}-affix-wrapper-lg`]:y.value==="large",[`${X}-affix-wrapper-rtl`]:u.value==="rtl",[`${X}-affix-wrapper-borderless`]:!j},Fn(`${X}-affix-wrapper`,c.value,k),S.value),wrapperClassName:ce({[`${X}-group-rtl`]:u.value==="rtl"},S.value),groupClassName:ce({[`${X}-group-wrapper-sm`]:y.value==="small",[`${X}-group-wrapper-lg`]:y.value==="large",[`${X}-group-wrapper-rtl`]:u.value==="rtl"},Fn(`${X}-group-wrapper`,c.value,k),S.value)}),v(v({},n),{clearIcon:V})))}}}),IE=re({compatConfig:{MODE:3},name:"AInputGroup",inheritAttrs:!1,props:{prefixCls:String,size:{type:String},compact:{type:Boolean,default:void 0}},setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i,getPrefixCls:l}=Ee("input-group",e),a=yn.useInject();yn.useProvide(a,{isFormItemInput:!1});const s=I(()=>l("input")),[c,u]=D1(s),d=I(()=>{const f=r.value;return{[`${f}`]:!0,[u.value]:!0,[`${f}-lg`]:e.size==="large",[`${f}-sm`]:e.size==="small",[`${f}-compact`]:e.compact,[`${f}-rtl`]:i.value==="rtl"}});return()=>{var f;return c(p("span",D(D({},o),{},{class:ce(d.value,o.class)}),[(f=n.default)===null||f===void 0?void 0:f.call(n)]))}}});var mne=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var C;(C=l.value)===null||C===void 0||C.focus()},blur:()=>{var C;(C=l.value)===null||C===void 0||C.blur()}});const u=C=>{i("update:value",C.target.value),C&&C.target&&C.type==="click"&&i("search",C.target.value,C),i("change",C)},d=C=>{var O;document.activeElement===((O=l.value)===null||O===void 0?void 0:O.input)&&C.preventDefault()},f=C=>{var O,w;i("search",(w=(O=l.value)===null||O===void 0?void 0:O.input)===null||w===void 0?void 0:w.stateValue,C)},h=C=>{a.value||e.loading||f(C)},m=C=>{a.value=!0,i("compositionstart",C)},g=C=>{a.value=!1,i("compositionend",C)},{prefixCls:y,getPrefixCls:b,direction:S,size:$}=Ee("input-search",e),x=I(()=>b("input",e.inputPrefixCls));return()=>{var C,O,w,P;const{disabled:T,loading:M,addonAfter:E=(C=n.addonAfter)===null||C===void 0?void 0:C.call(n),suffix:A=(O=n.suffix)===null||O===void 0?void 0:O.call(n)}=e,R=mne(e,["disabled","loading","addonAfter","suffix"]);let{enterButton:F=(P=(w=n.enterButton)===null||w===void 0?void 0:w.call(n))!==null&&P!==void 0?P:!1}=e;F=F||F==="";const _=typeof F=="boolean"?p(ua,null,null):null,N=`${y.value}-button`,B=Array.isArray(F)?F[0]:F;let L;const k=B.type&&Vy(B.type)&&B.type.__ANT_BUTTON;if(k||B.tagName==="button")L=ht(B,v({onMousedown:d,onClick:f,key:"enterButton"},k?{class:N,size:$.value}:{}),!1);else{const H=_&&!F;L=p(Wt,{class:N,type:F?"primary":void 0,size:$.value,disabled:T,key:"enterButton",onMousedown:d,onClick:f,loading:M,icon:H?_:null},{default:()=>[H?null:_||F]})}E&&(L=[L,E]);const z=ce(y.value,{[`${y.value}-rtl`]:S.value==="rtl",[`${y.value}-${$.value}`]:!!$.value,[`${y.value}-with-button`]:!!F},o.class);return p(cn,D(D(D({ref:l},rt(R,["onUpdate:value","onSearch","enterButton"])),o),{},{onPressEnter:h,onCompositionstart:m,onCompositionend:g,size:$.value,prefixCls:x.value,addonAfter:L,suffix:A,onChange:u,class:z,disabled:T}),n)}}}),k2=e=>e!=null&&(Array.isArray(e)?Nt(e).length:!0);function vne(e){return k2(e.addonBefore)||k2(e.addonAfter)}const bne=["text","input"],yne=re({compatConfig:{MODE:3},name:"ClearableLabeledInput",inheritAttrs:!1,props:{prefixCls:String,inputType:W.oneOf(Mn("text","input")),value:wt(),defaultValue:wt(),allowClear:{type:Boolean,default:void 0},element:wt(),handleReset:Function,disabled:{type:Boolean,default:void 0},direction:{type:String},size:{type:String},suffix:wt(),prefix:wt(),addonBefore:wt(),addonAfter:wt(),readonly:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},bordered:{type:Boolean,default:!0},triggerFocus:{type:Function},hidden:Boolean,status:String,hashId:String},setup(e,t){let{slots:n,attrs:o}=t;const r=yn.useInject(),i=a=>{const{value:s,disabled:c,readonly:u,handleReset:d,suffix:f=n.suffix}=e,h=!c&&!u&&s,m=`${a}-clear-icon`;return p(Un,{onClick:d,onMousedown:g=>g.preventDefault(),class:ce({[`${m}-hidden`]:!h,[`${m}-has-suffix`]:!!f},m),role:"button"},null)},l=(a,s)=>{const{value:c,allowClear:u,direction:d,bordered:f,hidden:h,status:m,addonAfter:g=n.addonAfter,addonBefore:y=n.addonBefore,hashId:b}=e,{status:S,hasFeedback:$}=r;if(!u)return ht(s,{value:c,disabled:e.disabled});const x=ce(`${a}-affix-wrapper`,`${a}-affix-wrapper-textarea-with-clear-btn`,Fn(`${a}-affix-wrapper`,gr(S,m),$),{[`${a}-affix-wrapper-rtl`]:d==="rtl",[`${a}-affix-wrapper-borderless`]:!f,[`${o.class}`]:!vne({addonAfter:g,addonBefore:y})&&o.class},b);return p("span",{class:x,style:o.style,hidden:h},[ht(s,{style:null,value:c,disabled:e.disabled}),i(a)])};return()=>{var a;const{prefixCls:s,inputType:c,element:u=(a=n.element)===null||a===void 0?void 0:a.call(n)}=e;return c===bne[0]?l(s,u):null}}}),Sne=` + min-height:0 !important; + max-height:none !important; + height:0 !important; + visibility:hidden !important; + overflow:hidden !important; + position:absolute !important; + z-index:-1000 !important; + top:0 !important; + right:0 !important; + pointer-events: none !important; +`,$ne=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Hm={};let Fo;function Cne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&Hm[n])return Hm[n];const o=window.getComputedStyle(e),r=o.getPropertyValue("box-sizing")||o.getPropertyValue("-moz-box-sizing")||o.getPropertyValue("-webkit-box-sizing"),i=parseFloat(o.getPropertyValue("padding-bottom"))+parseFloat(o.getPropertyValue("padding-top")),l=parseFloat(o.getPropertyValue("border-bottom-width"))+parseFloat(o.getPropertyValue("border-top-width")),s={sizingStyle:$ne.map(c=>`${c}:${o.getPropertyValue(c)}`).join(";"),paddingSize:i,borderSize:l,boxSizing:r};return t&&n&&(Hm[n]=s),s}function xne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Fo||(Fo=document.createElement("textarea"),Fo.setAttribute("tab-index","-1"),Fo.setAttribute("aria-hidden","true"),document.body.appendChild(Fo)),e.getAttribute("wrap")?Fo.setAttribute("wrap",e.getAttribute("wrap")):Fo.removeAttribute("wrap");const{paddingSize:r,borderSize:i,boxSizing:l,sizingStyle:a}=Cne(e,t);Fo.setAttribute("style",`${a};${Sne}`),Fo.value=e.value||e.placeholder||"";let s,c,u,d=Fo.scrollHeight;if(l==="border-box"?d+=i:l==="content-box"&&(d-=r),n!==null||o!==null){Fo.value=" ";const h=Fo.scrollHeight-r;n!==null&&(s=h*n,l==="border-box"&&(s=s+r+i),d=Math.max(s,d)),o!==null&&(c=h*o,l==="border-box"&&(c=c+r+i),u=d>c?"":"hidden",d=Math.min(c,d))}const f={height:`${d}px`,overflowY:u,resize:"none"};return s&&(f.minHeight=`${s}px`),c&&(f.maxHeight=`${c}px`),f}const jm=0,Vm=1,Wm=2,wne=re({compatConfig:{MODE:3},name:"ResizableTextArea",inheritAttrs:!1,props:PE(),setup(e,t){let{attrs:n,emit:o,expose:r}=t,i,l;const a=ie(),s=ie({}),c=ie(Wm);tt(()=>{Qe.cancel(i),Qe.cancel(l)});const u=()=>{try{if(a.value&&document.activeElement===a.value.input){const O=a.value.getSelectionStart(),w=a.value.getSelectionEnd(),P=a.value.getScrollTop();a.value.setSelectionRange(O,w),a.value.setScrollTop(P)}}catch{}},d=ie(),f=ie();je(()=>{const O=e.autoSize||e.autosize;O?(d.value=O.minRows,f.value=O.maxRows):(d.value=void 0,f.value=void 0)});const h=I(()=>!!(e.autoSize||e.autosize)),m=()=>{c.value=jm};Se([()=>e.value,d,f,h],()=>{h.value&&m()},{immediate:!0});const g=ie();Se([c,a],()=>{if(a.value)if(c.value===jm)c.value=Vm;else if(c.value===Vm){const O=xne(a.value.input,!1,d.value,f.value);c.value=Wm,g.value=O}else u()},{immediate:!0,flush:"post"});const y=$n(),b=ie(),S=()=>{Qe.cancel(b.value)},$=O=>{c.value===Wm&&(o("resize",O),h.value&&(S(),b.value=Qe(()=>{m()})))};tt(()=>{S()}),r({resizeTextarea:()=>{m()},textArea:I(()=>{var O;return(O=a.value)===null||O===void 0?void 0:O.input}),instance:y}),Eo(e.autosize===void 0);const C=()=>{const{prefixCls:O,disabled:w}=e,P=rt(e,["prefixCls","onPressEnter","autoSize","autosize","defaultValue","allowClear","type","maxlength","valueModifiers"]),T=ce(O,n.class,{[`${O}-disabled`]:w}),M=h.value?g.value:null,E=[n.style,s.value,M],A=v(v(v({},P),n),{style:E,class:T});return(c.value===jm||c.value===Vm)&&E.push({overflowX:"hidden",overflowY:"hidden"}),A.autofocus||delete A.autofocus,A.rows===0&&delete A.rows,p(Go,{onResize:$,disabled:!h.value},{default:()=>[p($s,D(D({},A),{},{ref:a,tag:"textarea"}),null)]})};return()=>C()}});function EE(e,t){return[...e||""].slice(0,t).join("")}function F2(e,t,n,o){let r=n;return e?r=EE(n,o):[...t||""].lengtho&&(r=t),r}const iS=re({compatConfig:{MODE:3},name:"ATextarea",inheritAttrs:!1,props:PE(),setup(e,t){let{attrs:n,expose:o,emit:r}=t;var i;const l=ln(),a=yn.useInject(),s=I(()=>gr(a.status,e.status)),c=oe((i=e.value)!==null&&i!==void 0?i:e.defaultValue),u=oe(),d=oe(""),{prefixCls:f,size:h,direction:m}=Ee("input",e),[g,y]=D1(f),b=mo(),S=I(()=>e.showCount===""||e.showCount||!1),$=I(()=>Number(e.maxlength)>0),x=oe(!1),C=oe(),O=oe(0),w=k=>{x.value=!0,C.value=d.value,O.value=k.currentTarget.selectionStart,r("compositionstart",k)},P=k=>{var z;x.value=!1;let H=k.currentTarget.value;if($.value){const j=O.value>=e.maxlength+1||O.value===((z=C.value)===null||z===void 0?void 0:z.length);H=F2(j,C.value,H,e.maxlength)}H!==d.value&&(A(H),Oc(k.currentTarget,k,_,H)),r("compositionend",k)},T=$n();Se(()=>e.value,()=>{var k;"value"in T.vnode.props,c.value=(k=e.value)!==null&&k!==void 0?k:""});const M=k=>{var z;xE((z=u.value)===null||z===void 0?void 0:z.textArea,k)},E=()=>{var k,z;(z=(k=u.value)===null||k===void 0?void 0:k.textArea)===null||z===void 0||z.blur()},A=(k,z)=>{c.value!==k&&(e.value===void 0?c.value=k:lt(()=>{var H,j,Y;u.value.textArea.value!==d.value&&((Y=(H=u.value)===null||H===void 0?void 0:(j=H.instance).update)===null||Y===void 0||Y.call(j))}),lt(()=>{z&&z()}))},R=k=>{k.keyCode===13&&r("pressEnter",k),r("keydown",k)},F=k=>{const{onBlur:z}=e;z==null||z(k),l.onFieldBlur()},_=k=>{r("update:value",k.target.value),r("change",k),r("input",k),l.onFieldChange()},N=k=>{Oc(u.value.textArea,k,_),A("",()=>{M()})},B=k=>{let z=k.target.value;if(c.value!==z){if($.value){const H=k.target,j=H.selectionStart>=e.maxlength+1||H.selectionStart===z.length||!H.selectionStart;z=F2(j,d.value,z,e.maxlength)}Oc(k.currentTarget,k,_,z),A(z)}},L=()=>{var k,z;const{class:H}=n,{bordered:j=!0}=e,Y=v(v(v({},rt(e,["allowClear"])),n),{class:[{[`${f.value}-borderless`]:!j,[`${H}`]:H&&!S.value,[`${f.value}-sm`]:h.value==="small",[`${f.value}-lg`]:h.value==="large"},Fn(f.value,s.value),y.value],disabled:b.value,showCount:null,prefixCls:f.value,onInput:B,onChange:B,onBlur:F,onKeydown:R,onCompositionstart:w,onCompositionend:P});return!((k=e.valueModifiers)===null||k===void 0)&&k.lazy&&delete Y.onInput,p(wne,D(D({},Y),{},{id:(z=Y==null?void 0:Y.id)!==null&&z!==void 0?z:l.id.value,ref:u,maxlength:e.maxlength,lazy:e.lazy}),null)};return o({focus:M,blur:E,resizableTextArea:u}),je(()=>{let k=z0(c.value);!x.value&&$.value&&(e.value===null||e.value===void 0)&&(k=EE(k,e.maxlength)),d.value=k}),()=>{var k;const{maxlength:z,bordered:H=!0,hidden:j}=e,{style:Y,class:Z}=n,G=v(v(v({},e),n),{prefixCls:f.value,inputType:"text",handleReset:N,direction:m.value,bordered:H,style:S.value?void 0:Y,hashId:y.value,disabled:(k=e.disabled)!==null&&k!==void 0?k:b.value});let te=p(yne,D(D({},G),{},{value:d.value,status:e.status}),{element:L});if(S.value||a.hasFeedback){const U=[...d.value].length;let Q="";typeof S.value=="object"?Q=S.value.formatter({value:d.value,count:U,maxlength:z}):Q=`${U}${$.value?` / ${z}`:""}`,te=p("div",{hidden:j,class:ce(`${f.value}-textarea`,{[`${f.value}-textarea-rtl`]:m.value==="rtl",[`${f.value}-textarea-show-count`]:S.value,[`${f.value}-textarea-in-form-item`]:a.isFormItemInput},`${f.value}-textarea-show-count`,Z,y.value),style:Y,"data-count":typeof Q!="object"?Q:void 0},[te,a.hasFeedback&&p("span",{class:`${f.value}-textarea-suffix`},[a.feedbackIcon])])}return g(te)}}});var One={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function z2(e){for(var t=1;tp(e?Au:lS,null,null),_E=re({compatConfig:{MODE:3},name:"AInputPassword",inheritAttrs:!1,props:v(v({},og()),{prefixCls:String,inputPrefixCls:String,action:{type:String,default:"click"},visibilityToggle:{type:Boolean,default:!0},visible:{type:Boolean,default:void 0},"onUpdate:visible":Function,iconRender:Function}),setup(e,t){let{slots:n,attrs:o,expose:r,emit:i}=t;const l=oe(!1),a=()=>{const{disabled:y}=e;y||(l.value=!l.value,i("update:visible",l.value))};je(()=>{e.visible!==void 0&&(l.value=!!e.visible)});const s=oe();r({focus:()=>{var y;(y=s.value)===null||y===void 0||y.focus()},blur:()=>{var y;(y=s.value)===null||y===void 0||y.blur()}});const d=y=>{const{action:b,iconRender:S=n.iconRender||Mne}=e,$=_ne[b]||"",x=S(l.value),C={[$]:a,class:`${y}-icon`,key:"passwordIcon",onMousedown:O=>{O.preventDefault()},onMouseup:O=>{O.preventDefault()}};return ht(qt(x)?x:p("span",null,[x]),C)},{prefixCls:f,getPrefixCls:h}=Ee("input-password",e),m=I(()=>h("input",e.inputPrefixCls)),g=()=>{const{size:y,visibilityToggle:b}=e,S=Ene(e,["size","visibilityToggle"]),$=b&&d(f.value),x=ce(f.value,o.class,{[`${f.value}-${y}`]:!!y}),C=v(v(v({},rt(S,["suffix","iconRender","action"])),o),{type:l.value?"text":"password",class:x,prefixCls:m.value,suffix:$});return y&&(C.size=y),p(cn,D({ref:s},C),n)};return()=>g()}});cn.Group=IE;cn.Search=TE;cn.TextArea=iS;cn.Password=_E;cn.install=function(e){return e.component(cn.name,cn),e.component(cn.Group.name,cn.Group),e.component(cn.Search.name,cn.Search),e.component(cn.TextArea.name,cn.TextArea),e.component(cn.Password.name,cn.Password),e};function rg(){return{keyboard:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},afterClose:Function,closable:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},destroyOnClose:{type:Boolean,default:void 0},mousePosition:W.shape({x:Number,y:Number}).loose,title:W.any,footer:W.any,transitionName:String,maskTransitionName:String,animation:W.any,maskAnimation:W.any,wrapStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},maskStyle:{type:Object,default:void 0},prefixCls:String,wrapClassName:String,rootClassName:String,width:[String,Number],height:[String,Number],zIndex:Number,bodyProps:W.any,maskProps:W.any,wrapProps:W.any,getContainer:W.any,dialogStyle:{type:Object,default:void 0},dialogClass:String,closeIcon:W.any,forceRender:{type:Boolean,default:void 0},getOpenCount:Function,focusTriggerAfterClose:{type:Boolean,default:void 0},onClose:Function,modalRender:Function}}function j2(e,t,n){let o=t;return!o&&n&&(o=`${e}-${n}`),o}let V2=-1;function Ane(){return V2+=1,V2}function W2(e,t){let n=e[`page${t?"Y":"X"}Offset`];const o=`scroll${t?"Top":"Left"}`;if(typeof n!="number"){const r=e.document;n=r.documentElement[o],typeof n!="number"&&(n=r.body[o])}return n}function Rne(e){const t=e.getBoundingClientRect(),n={left:t.left,top:t.top},o=e.ownerDocument,r=o.defaultView||o.parentWindow;return n.left+=W2(r),n.top+=W2(r,!0),n}const Dne={width:0,height:0,overflow:"hidden",outline:"none"},Nne={outline:"none"},Bne=re({compatConfig:{MODE:3},name:"DialogContent",inheritAttrs:!1,props:v(v({},rg()),{motionName:String,ariaId:String,onVisibleChanged:Function,onMousedown:Function,onMouseup:Function}),setup(e,t){let{expose:n,slots:o,attrs:r}=t;const i=ie(),l=ie(),a=ie();n({focus:()=>{var f;(f=i.value)===null||f===void 0||f.focus({preventScroll:!0})},changeActive:f=>{const{activeElement:h}=document;f&&h===l.value?i.value.focus({preventScroll:!0}):!f&&h===i.value&&l.value.focus({preventScroll:!0})}});const s=ie(),c=I(()=>{const{width:f,height:h}=e,m={};return f!==void 0&&(m.width=typeof f=="number"?`${f}px`:f),h!==void 0&&(m.height=typeof h=="number"?`${h}px`:h),s.value&&(m.transformOrigin=s.value),m}),u=()=>{lt(()=>{if(a.value){const f=Rne(a.value);s.value=e.mousePosition?`${e.mousePosition.x-f.left}px ${e.mousePosition.y-f.top}px`:""}})},d=f=>{e.onVisibleChanged(f)};return()=>{var f,h,m,g;const{prefixCls:y,footer:b=(f=o.footer)===null||f===void 0?void 0:f.call(o),title:S=(h=o.title)===null||h===void 0?void 0:h.call(o),ariaId:$,closable:x,closeIcon:C=(m=o.closeIcon)===null||m===void 0?void 0:m.call(o),onClose:O,bodyStyle:w,bodyProps:P,onMousedown:T,onMouseup:M,visible:E,modalRender:A=o.modalRender,destroyOnClose:R,motionName:F}=e;let _;b&&(_=p("div",{class:`${y}-footer`},[b]));let N;S&&(N=p("div",{class:`${y}-header`},[p("div",{class:`${y}-title`,id:$},[S])]));let B;x&&(B=p("button",{type:"button",onClick:O,"aria-label":"Close",class:`${y}-close`},[C||p("span",{class:`${y}-close-x`},null)]));const L=p("div",{class:`${y}-content`},[B,N,p("div",D({class:`${y}-body`,style:w},P),[(g=o.default)===null||g===void 0?void 0:g.call(o)]),_]),k=qo(F);return p(rn,D(D({},k),{},{onBeforeEnter:u,onAfterEnter:()=>d(!0),onAfterLeave:()=>d(!1)}),{default:()=>[E||!R?_n(p("div",D(D({},r),{},{ref:a,key:"dialog-element",role:"document",style:[c.value,r.style],class:[y,r.class],onMousedown:T,onMouseup:M}),[p("div",{tabindex:0,ref:i,style:Nne},[A?A({originVNode:L}):L]),p("div",{tabindex:0,ref:l,style:Dne},null)]),[[oo,E]]):null]})}}}),Lne=re({compatConfig:{MODE:3},name:"DialogMask",props:{prefixCls:String,visible:Boolean,motionName:String,maskProps:Object},setup(e,t){return()=>{const{prefixCls:n,visible:o,maskProps:r,motionName:i}=e,l=qo(i);return p(rn,l,{default:()=>[_n(p("div",D({class:`${n}-mask`},r),null),[[oo,o]])]})}}}),K2=re({compatConfig:{MODE:3},name:"VcDialog",inheritAttrs:!1,props:et(v(v({},rg()),{getOpenCount:Function,scrollLocker:Object}),{mask:!0,visible:!1,keyboard:!0,closable:!0,maskClosable:!0,destroyOnClose:!1,prefixCls:"rc-dialog",getOpenCount:()=>null,focusTriggerAfterClose:!0}),setup(e,t){let{attrs:n,slots:o}=t;const r=oe(),i=oe(),l=oe(),a=oe(e.visible),s=oe(`vcDialogTitle${Ane()}`),c=b=>{var S,$;if(b)Ni(i.value,document.activeElement)||(r.value=document.activeElement,(S=l.value)===null||S===void 0||S.focus());else{const x=a.value;if(a.value=!1,e.mask&&r.value&&e.focusTriggerAfterClose){try{r.value.focus({preventScroll:!0})}catch{}r.value=null}x&&(($=e.afterClose)===null||$===void 0||$.call(e))}},u=b=>{var S;(S=e.onClose)===null||S===void 0||S.call(e,b)},d=oe(!1),f=oe(),h=()=>{clearTimeout(f.value),d.value=!0},m=()=>{f.value=setTimeout(()=>{d.value=!1})},g=b=>{if(!e.maskClosable)return null;d.value?d.value=!1:i.value===b.target&&u(b)},y=b=>{if(e.keyboard&&b.keyCode===Ie.ESC){b.stopPropagation(),u(b);return}e.visible&&b.keyCode===Ie.TAB&&l.value.changeActive(!b.shiftKey)};return Se(()=>e.visible,()=>{e.visible&&(a.value=!0)},{flush:"post"}),tt(()=>{var b;clearTimeout(f.value),(b=e.scrollLocker)===null||b===void 0||b.unLock()}),je(()=>{var b,S;(b=e.scrollLocker)===null||b===void 0||b.unLock(),a.value&&((S=e.scrollLocker)===null||S===void 0||S.lock())}),()=>{const{prefixCls:b,mask:S,visible:$,maskTransitionName:x,maskAnimation:C,zIndex:O,wrapClassName:w,rootClassName:P,wrapStyle:T,closable:M,maskProps:E,maskStyle:A,transitionName:R,animation:F,wrapProps:_,title:N=o.title}=e,{style:B,class:L}=n;return p("div",D({class:[`${b}-root`,P]},el(e,{data:!0})),[p(Lne,{prefixCls:b,visible:S&&$,motionName:j2(b,x,C),style:v({zIndex:O},A),maskProps:E},null),p("div",D({tabIndex:-1,onKeydown:y,class:ce(`${b}-wrap`,w),ref:i,onClick:g,role:"dialog","aria-labelledby":N?s.value:null,style:v(v({zIndex:O},T),{display:a.value?null:"none"})},_),[p(Bne,D(D({},rt(e,["scrollLocker"])),{},{style:B,class:L,onMousedown:h,onMouseup:m,ref:l,closable:M,ariaId:s.value,prefixCls:b,visible:$,onClose:u,onVisibleChanged:c,motionName:j2(b,R,F)}),o)])])}}}),kne=rg(),ME=re({compatConfig:{MODE:3},name:"DialogWrap",inheritAttrs:!1,props:et(kne,{visible:!1}),setup(e,t){let{attrs:n,slots:o}=t;const r=ie(e.visible);return xy({},{inTriggerContext:!1}),Se(()=>e.visible,()=>{e.visible&&(r.value=!0)},{flush:"post"}),()=>{const{visible:i,getContainer:l,forceRender:a,destroyOnClose:s=!1,afterClose:c}=e;let u=v(v(v({},e),n),{ref:"_component",key:"dialog"});return l===!1?p(K2,D(D({},u),{},{getOpenCount:()=>2}),o):!a&&s&&!r.value?null:p(gu,{autoLock:!0,visible:i,forceRender:a,getContainer:l},{default:d=>(u=v(v(v({},u),d),{afterClose:()=>{c==null||c(),r.value=!1}}),p(K2,u,o))})}}});function Fne(e){const t=ie(null),n=ft(v({},e)),o=ie([]),r=i=>{t.value===null&&(o.value=[],t.value=Qe(()=>{let l;o.value.forEach(a=>{l=v(v({},l),a)}),v(n,l),t.value=null})),o.value.push(i)};return Ue(()=>{t.value&&Qe.cancel(t.value)}),[n,r]}function U2(e,t,n,o){const r=t+n,i=(n-o)/2;if(n>o){if(t>0)return{[e]:i};if(t<0&&ro)return{[e]:t<0?i:-i};return{}}function zne(e,t,n,o){const{width:r,height:i}=jF();let l=null;return e<=r&&t<=i?l={x:0,y:0}:(e>r||t>i)&&(l=v(v({},U2("x",n,e,r)),U2("y",o,t,i))),l}var Hne=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{qe(G2,e)},inject:()=>Ke(G2,{isPreviewGroup:oe(!1),previewUrls:I(()=>new Map),setPreviewUrls:()=>{},current:ie(null),setCurrent:()=>{},setShowPreview:()=>{},setMousePosition:()=>{},registerImage:null,rootClassName:""})},jne=()=>({previewPrefixCls:String,preview:{type:[Boolean,Object],default:!0},icons:{type:Object,default:()=>({})}}),AE=re({compatConfig:{MODE:3},name:"PreviewGroup",inheritAttrs:!1,props:jne(),setup(e,t){let{slots:n}=t;const o=I(()=>{const C={visible:void 0,onVisibleChange:()=>{},getContainer:void 0,current:0};return typeof e.preview=="object"?NE(e.preview,C):C}),r=ft(new Map),i=ie(),l=I(()=>o.value.visible),a=I(()=>o.value.getContainer),s=(C,O)=>{var w,P;(P=(w=o.value).onVisibleChange)===null||P===void 0||P.call(w,C,O)},[c,u]=Mt(!!l.value,{value:l,onChange:s}),d=ie(null),f=I(()=>l.value!==void 0),h=I(()=>Array.from(r.keys())),m=I(()=>h.value[o.value.current]),g=I(()=>new Map(Array.from(r).filter(C=>{let[,{canPreview:O}]=C;return!!O}).map(C=>{let[O,{url:w}]=C;return[O,w]}))),y=function(C,O){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;r.set(C,{url:O,canPreview:w})},b=C=>{i.value=C},S=C=>{d.value=C},$=function(C,O){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const P=()=>{r.delete(C)};return r.set(C,{url:O,canPreview:w}),P},x=C=>{C==null||C.stopPropagation(),u(!1),S(null)};return Se(m,C=>{b(C)},{immediate:!0,flush:"post"}),je(()=>{c.value&&f.value&&b(m.value)},{flush:"post"}),aS.provide({isPreviewGroup:oe(!0),previewUrls:g,setPreviewUrls:y,current:i,setCurrent:b,setShowPreview:u,setMousePosition:S,registerImage:$}),()=>{const C=Hne(o.value,[]);return p(He,null,[n.default&&n.default(),p(RE,D(D({},C),{},{"ria-hidden":!c.value,visible:c.value,prefixCls:e.previewPrefixCls,onClose:x,mousePosition:d.value,src:g.value.get(i.value),icons:e.icons,getContainer:a.value}),null)])}}}),hl={x:0,y:0},Vne=v(v({},rg()),{src:String,alt:String,rootClassName:String,icons:{type:Object,default:()=>({})}}),RE=re({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:Vne,emits:["close","afterClose"],setup(e,t){let{emit:n,attrs:o}=t;const{rotateLeft:r,rotateRight:i,zoomIn:l,zoomOut:a,close:s,left:c,right:u,flipX:d,flipY:f}=ft(e.icons),h=oe(1),m=oe(0),g=ft({x:1,y:1}),[y,b]=Fne(hl),S=()=>n("close"),$=oe(),x=ft({originX:0,originY:0,deltaX:0,deltaY:0}),C=oe(!1),O=aS.inject(),{previewUrls:w,current:P,isPreviewGroup:T,setCurrent:M}=O,E=I(()=>w.value.size),A=I(()=>Array.from(w.value.keys())),R=I(()=>A.value.indexOf(P.value)),F=I(()=>T.value?w.value.get(P.value):e.src),_=I(()=>T.value&&E.value>1),N=oe({wheelDirection:0}),B=()=>{h.value=1,m.value=0,g.x=1,g.y=1,b(hl),n("afterClose")},L=le=>{le?h.value+=.5:h.value++,b(hl)},k=le=>{h.value>1&&(le?h.value-=.5:h.value--),b(hl)},z=()=>{m.value+=90},H=()=>{m.value-=90},j=()=>{g.x=-g.x},Y=()=>{g.y=-g.y},Z=le=>{le.preventDefault(),le.stopPropagation(),R.value>0&&M(A.value[R.value-1])},G=le=>{le.preventDefault(),le.stopPropagation(),R.valueL(),type:"zoomIn"},{icon:a,onClick:()=>k(),type:"zoomOut",disabled:I(()=>h.value===1)},{icon:i,onClick:z,type:"rotateRight"},{icon:r,onClick:H,type:"rotateLeft"},{icon:d,onClick:j,type:"flipX"},{icon:f,onClick:Y,type:"flipY"}],X=()=>{if(e.visible&&C.value){const le=$.value.offsetWidth*h.value,ne=$.value.offsetHeight*h.value,{left:se,top:pe}=Xf($.value),he=m.value%180!==0;C.value=!1;const ge=zne(he?ne:le,he?le:ne,se,pe);ge&&b(v({},ge))}},q=le=>{le.button===0&&(le.preventDefault(),le.stopPropagation(),x.deltaX=le.pageX-y.x,x.deltaY=le.pageY-y.y,x.originX=y.x,x.originY=y.y,C.value=!0)},V=le=>{e.visible&&C.value&&b({x:le.pageX-x.deltaX,y:le.pageY-x.deltaY})},K=le=>{if(!e.visible)return;le.preventDefault();const ne=le.deltaY;N.value={wheelDirection:ne}},ee=le=>{!e.visible||!_.value||(le.preventDefault(),le.keyCode===Ie.LEFT?R.value>0&&M(A.value[R.value-1]):le.keyCode===Ie.RIGHT&&R.value{e.visible&&(h.value!==1&&(h.value=1),(y.x!==hl.x||y.y!==hl.y)&&b(hl))};let ae=()=>{};return Ue(()=>{Se([()=>e.visible,C],()=>{ae();let le,ne;const se=Dt(window,"mouseup",X,!1),pe=Dt(window,"mousemove",V,!1),he=Dt(window,"wheel",K,{passive:!1}),ge=Dt(window,"keydown",ee,!1);try{window.top!==window.self&&(le=Dt(window.top,"mouseup",X,!1),ne=Dt(window.top,"mousemove",V,!1))}catch{}ae=()=>{se.remove(),pe.remove(),he.remove(),ge.remove(),le&&le.remove(),ne&&ne.remove()}},{flush:"post",immediate:!0}),Se([N],()=>{const{wheelDirection:le}=N.value;le>0?k(!0):le<0&&L(!0)})}),Wn(()=>{ae()}),()=>{const{visible:le,prefixCls:ne,rootClassName:se}=e;return p(ME,D(D({},o),{},{transitionName:e.transitionName,maskTransitionName:e.maskTransitionName,closable:!1,keyboard:!0,prefixCls:ne,onClose:S,afterClose:B,visible:le,wrapClassName:te,rootClassName:se,getContainer:e.getContainer}),{default:()=>[p("div",{class:[`${e.prefixCls}-operations-wrapper`,se]},[p("ul",{class:`${e.prefixCls}-operations`},[J.map(pe=>{let{icon:he,onClick:ge,type:be,disabled:xe}=pe;return p("li",{class:ce(U,{[`${e.prefixCls}-operations-operation-disabled`]:xe&&(xe==null?void 0:xe.value)}),onClick:ge,key:be},[bn(he,{class:Q})])})])]),p("div",{class:`${e.prefixCls}-img-wrapper`,style:{transform:`translate3d(${y.x}px, ${y.y}px, 0)`}},[p("img",{onMousedown:q,onDblclick:ue,ref:$,class:`${e.prefixCls}-img`,src:F.value,alt:e.alt,style:{transform:`scale3d(${g.x*h.value}, ${g.y*h.value}, 1) rotate(${m.value}deg)`}},null)]),_.value&&p("div",{class:ce(`${e.prefixCls}-switch-left`,{[`${e.prefixCls}-switch-left-disabled`]:R.value<=0}),onClick:Z},[c]),_.value&&p("div",{class:ce(`${e.prefixCls}-switch-right`,{[`${e.prefixCls}-switch-right-disabled`]:R.value>=E.value-1}),onClick:G},[u])]})}}});var Wne=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({src:String,wrapperClassName:String,wrapperStyle:{type:Object,default:void 0},rootClassName:String,prefixCls:String,previewPrefixCls:String,width:[Number,String],height:[Number,String],previewMask:{type:[Boolean,Function],default:void 0},placeholder:W.any,fallback:String,preview:{type:[Boolean,Object],default:!0},onClick:{type:Function},onError:{type:Function}}),NE=(e,t)=>{const n=v({},e);return Object.keys(t).forEach(o=>{e[o]===void 0&&(n[o]=t[o])}),n};let Kne=0;const BE=re({compatConfig:{MODE:3},name:"VcImage",inheritAttrs:!1,props:DE(),emits:["click","error"],setup(e,t){let{attrs:n,slots:o,emit:r}=t;const i=I(()=>e.prefixCls),l=I(()=>`${i.value}-preview`),a=I(()=>{const L={visible:void 0,onVisibleChange:()=>{},getContainer:void 0};return typeof e.preview=="object"?NE(e.preview,L):L}),s=I(()=>{var L;return(L=a.value.src)!==null&&L!==void 0?L:e.src}),c=I(()=>e.placeholder&&e.placeholder!==!0||o.placeholder),u=I(()=>a.value.visible),d=I(()=>a.value.getContainer),f=I(()=>u.value!==void 0),h=(L,k)=>{var z,H;(H=(z=a.value).onVisibleChange)===null||H===void 0||H.call(z,L,k)},[m,g]=Mt(!!u.value,{value:u,onChange:h}),y=ie(c.value?"loading":"normal");Se(()=>e.src,()=>{y.value=c.value?"loading":"normal"});const b=ie(null),S=I(()=>y.value==="error"),$=aS.inject(),{isPreviewGroup:x,setCurrent:C,setShowPreview:O,setMousePosition:w,registerImage:P}=$,T=ie(Kne++),M=I(()=>e.preview&&!S.value),E=()=>{y.value="normal"},A=L=>{y.value="error",r("error",L)},R=L=>{if(!f.value){const{left:k,top:z}=Xf(L.target);x.value?(C(T.value),w({x:k,y:z})):b.value={x:k,y:z}}x.value?O(!0):g(!0),r("click",L)},F=()=>{g(!1),f.value||(b.value=null)},_=ie(null);Se(()=>_,()=>{y.value==="loading"&&_.value.complete&&(_.value.naturalWidth||_.value.naturalHeight)&&E()});let N=()=>{};Ue(()=>{Se([s,M],()=>{if(N(),!x.value)return()=>{};N=P(T.value,s.value,M.value),M.value||N()},{flush:"post",immediate:!0})}),Wn(()=>{N()});const B=L=>kW(L)?L+"px":L;return()=>{const{prefixCls:L,wrapperClassName:k,fallback:z,src:H,placeholder:j,wrapperStyle:Y,rootClassName:Z,width:G,height:te,crossorigin:U,decoding:Q,alt:J,sizes:X,srcset:q,usemap:V,class:K,style:ee}=v(v({},e),n),ue=a.value,{icons:ae,maskClassName:le}=ue,ne=Wne(ue,["icons","maskClassName"]),se=ce(L,k,Z,{[`${L}-error`]:S.value}),pe=S.value&&z?z:s.value,he={crossorigin:U,decoding:Q,alt:J,sizes:X,srcset:q,usemap:V,width:G,height:te,class:ce(`${L}-img`,{[`${L}-img-placeholder`]:j===!0},K),style:v({height:B(te)},ee)};return p(He,null,[p("div",{class:se,onClick:M.value?R:ge=>{r("click",ge)},style:v({width:B(G),height:B(te)},Y)},[p("img",D(D(D({},he),S.value&&z?{src:z}:{onLoad:E,onError:A,src:H}),{},{ref:_}),null),y.value==="loading"&&p("div",{"aria-hidden":"true",class:`${L}-placeholder`},[j||o.placeholder&&o.placeholder()]),o.previewMask&&M.value&&p("div",{class:[`${L}-mask`,le]},[o.previewMask()])]),!x.value&&M.value&&p(RE,D(D({},ne),{},{"aria-hidden":!m.value,visible:m.value,prefixCls:l.value,onClose:F,mousePosition:b.value,src:pe,alt:J,getContainer:d.value,icons:ae,rootClassName:Z}),null)])}}});BE.PreviewGroup=AE;var Une={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"};function X2(e){for(var t=1;t{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}${e.antCls}-zoom-enter, ${t}${e.antCls}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${e.antCls}-zoom-leave ${t}-content`]:{pointerEvents:"none"},[`${t}-mask`]:v(v({},Q2("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:v(v({},Q2("fixed")),{overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${t}-root`]:Gy(e)}]},noe=e=>{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap`]:{zIndex:e.zIndexPopupBase,position:"fixed",inset:0,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"},[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax})`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${e.marginXS} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:v(v({},Ze(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${e.margin*2}px)`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.modalHeadingColor,fontWeight:e.fontWeightStrong,fontSize:e.modalHeaderTitleFontSize,lineHeight:e.modalHeaderTitleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.modalContentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadowSecondary,pointerEvents:"auto",padding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`},[`${t}-close`]:v({position:"absolute",top:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,insetInlineEnd:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,zIndex:e.zIndexPopupBase+10,padding:0,color:e.modalCloseColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalConfirmIconSize,height:e.modalConfirmIconSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"block",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:`${e.modalCloseBtnSize}px`,textAlign:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:e.modalIconHoverColor,backgroundColor:e.wireframe?"transparent":e.colorFillContent,textDecoration:"none"},"&:active":{backgroundColor:e.wireframe?"transparent":e.colorFillContentHover}},pi(e)),[`${t}-header`]:{color:e.colorText,background:e.modalHeaderBg,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,marginBottom:e.marginXS},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word"},[`${t}-footer`]:{textAlign:"end",background:e.modalFooterBg,marginTop:e.marginSM,[`${e.antCls}-btn + ${e.antCls}-btn:not(${e.antCls}-dropdown-trigger)`]:{marginBottom:0,marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}})},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-content, + ${t}-body, + ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},ooe=e=>{const{componentCls:t}=e,n=`${t}-confirm`;return{[n]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${n}-body-wrapper`]:v({},ur()),[`${n}-body`]:{display:"flex",flexWrap:"wrap",alignItems:"center",[`${n}-title`]:{flex:"0 0 100%",display:"block",overflow:"hidden",color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.modalHeaderTitleFontSize,lineHeight:e.modalHeaderTitleLineHeight,[`+ ${n}-content`]:{marginBlockStart:e.marginXS,flexBasis:"100%",maxWidth:`calc(100% - ${e.modalConfirmIconSize+e.marginSM}px)`}},[`${n}-content`]:{color:e.colorText,fontSize:e.fontSize},[`> ${e.iconCls}`]:{flex:"none",marginInlineEnd:e.marginSM,fontSize:e.modalConfirmIconSize,[`+ ${n}-title`]:{flex:1},[`+ ${n}-title + ${n}-content`]:{marginInlineStart:e.modalConfirmIconSize+e.marginSM}}},[`${n}-btns`]:{textAlign:"end",marginTop:e.marginSM,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${n}-error ${n}-body > ${e.iconCls}`]:{color:e.colorError},[`${n}-warning ${n}-body > ${e.iconCls}, + ${n}-confirm ${n}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${n}-info ${n}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${n}-success ${n}-body > ${e.iconCls}`]:{color:e.colorSuccess},[`${t}-zoom-leave ${t}-btns`]:{pointerEvents:"none"}}},roe=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},ioe=e=>{const{componentCls:t,antCls:n}=e,o=`${t}-confirm`;return{[t]:{[`${t}-content`]:{padding:0},[`${t}-header`]:{padding:e.modalHeaderPadding,borderBottom:`${e.modalHeaderBorderWidth}px ${e.modalHeaderBorderStyle} ${e.modalHeaderBorderColorSplit}`,marginBottom:0},[`${t}-body`]:{padding:e.modalBodyPadding},[`${t}-footer`]:{padding:`${e.modalFooterPaddingVertical}px ${e.modalFooterPaddingHorizontal}px`,borderTop:`${e.modalFooterBorderWidth}px ${e.modalFooterBorderStyle} ${e.modalFooterBorderColorSplit}`,borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`,marginTop:0}},[o]:{[`${n}-modal-body`]:{padding:`${e.padding*2}px ${e.padding*2}px ${e.paddingLG}px`},[`${o}-body`]:{[`> ${e.iconCls}`]:{marginInlineEnd:e.margin,[`+ ${o}-title + ${o}-content`]:{marginInlineStart:e.modalConfirmIconSize+e.margin}}},[`${o}-btns`]:{marginTop:e.marginLG}}}},loe=Xe("Modal",e=>{const t=e.padding,n=e.fontSizeHeading5,o=e.lineHeightHeading5,r=Fe(e,{modalBodyPadding:e.paddingLG,modalHeaderBg:e.colorBgElevated,modalHeaderPadding:`${t}px ${e.paddingLG}px`,modalHeaderBorderWidth:e.lineWidth,modalHeaderBorderStyle:e.lineType,modalHeaderTitleLineHeight:o,modalHeaderTitleFontSize:n,modalHeaderBorderColorSplit:e.colorSplit,modalHeaderCloseSize:o*n+t*2,modalContentBg:e.colorBgElevated,modalHeadingColor:e.colorTextHeading,modalCloseColor:e.colorTextDescription,modalFooterBg:"transparent",modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterPaddingVertical:e.paddingXS,modalFooterPaddingHorizontal:e.padding,modalFooterBorderWidth:e.lineWidth,modalConfirmTitleFontSize:e.fontSizeLG,modalIconHoverColor:e.colorIconHover,modalConfirmIconSize:e.fontSize*e.lineHeight,modalCloseBtnSize:e.controlHeightLG*.55});return[noe(r),ooe(r),roe(r),LE(r),e.wireframe&&ioe(r),ws(r,"zoom")]}),H0=e=>({position:e||"absolute",inset:0}),aoe=e=>{const{iconCls:t,motionDurationSlow:n,paddingXXS:o,marginXXS:r,prefixCls:i}=e;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",background:new vt("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${n}`,[`.${i}-mask-info`]:v(v({},Zt),{padding:`0 ${o}px`,[t]:{marginInlineEnd:r,svg:{verticalAlign:"baseline"}}})}},soe=e=>{const{previewCls:t,modalMaskBg:n,paddingSM:o,previewOperationColorDisabled:r,motionDurationSlow:i}=e,l=new vt(n).setAlpha(.1),a=l.clone().setAlpha(.2);return{[`${t}-operations`]:v(v({},Ze(e)),{display:"flex",flexDirection:"row-reverse",alignItems:"center",color:e.previewOperationColor,listStyle:"none",background:l.toRgbString(),pointerEvents:"auto","&-operation":{marginInlineStart:o,padding:o,cursor:"pointer",transition:`all ${i}`,userSelect:"none","&:hover":{background:a.toRgbString()},"&-disabled":{color:r,pointerEvents:"none"},"&:last-of-type":{marginInlineStart:0}},"&-progress":{position:"absolute",left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%)"},"&-icon":{fontSize:e.previewOperationSize}})}},coe=e=>{const{modalMaskBg:t,iconCls:n,previewOperationColorDisabled:o,previewCls:r,zIndexPopup:i,motionDurationSlow:l}=e,a=new vt(t).setAlpha(.1),s=a.clone().setAlpha(.2);return{[`${r}-switch-left, ${r}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:i+1,display:"flex",alignItems:"center",justifyContent:"center",width:e.imagePreviewSwitchSize,height:e.imagePreviewSwitchSize,marginTop:-e.imagePreviewSwitchSize/2,color:e.previewOperationColor,background:a.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${l}`,pointerEvents:"auto",userSelect:"none","&:hover":{background:s.toRgbString()},"&-disabled":{"&, &:hover":{color:o,background:"transparent",cursor:"not-allowed",[`> ${n}`]:{cursor:"not-allowed"}}},[`> ${n}`]:{fontSize:e.previewOperationSize}},[`${r}-switch-left`]:{insetInlineStart:e.marginSM},[`${r}-switch-right`]:{insetInlineEnd:e.marginSM}}},uoe=e=>{const{motionEaseOut:t,previewCls:n,motionDurationSlow:o,componentCls:r}=e;return[{[`${r}-preview-root`]:{[n]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${n}-body`]:v(v({},H0()),{overflow:"hidden"}),[`${n}-img`]:{maxWidth:"100%",maxHeight:"100%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${o} ${t} 0s`,userSelect:"none",pointerEvents:"auto","&-wrapper":v(v({},H0()),{transition:`transform ${o} ${t} 0s`,display:"flex",justifyContent:"center",alignItems:"center","&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${n}-moving`]:{[`${n}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${r}-preview-root`]:{[`${n}-wrap`]:{zIndex:e.zIndexPopup}}},{[`${r}-preview-operations-wrapper`]:{position:"fixed",insetBlockStart:0,insetInlineEnd:0,zIndex:e.zIndexPopup+1,width:"100%"},"&":[soe(e),coe(e)]}]},doe=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",display:"inline-block",[`${t}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${t}-mask`]:v({},aoe(e)),[`${t}-mask:hover`]:{opacity:1},[`${t}-placeholder`]:v({},H0())}}},foe=e=>{const{previewCls:t}=e;return{[`${t}-root`]:ws(e,"zoom"),"&":Gy(e,!0)}},kE=Xe("Image",e=>{const t=`${e.componentCls}-preview`,n=Fe(e,{previewCls:t,modalMaskBg:new vt("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[doe(n),uoe(n),LE(Fe(n,{componentCls:t})),foe(n)]},e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new vt(e.colorTextLightSolid).toRgbString(),previewOperationColorDisabled:new vt(e.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5})),FE={rotateLeft:p(sS,null,null),rotateRight:p(cS,null,null),zoomIn:p(uS,null,null),zoomOut:p(dS,null,null),close:p(Kn,null,null),left:p(Lr,null,null),right:p(Ao,null,null),flipX:p(Tp,null,null),flipY:p(Tp,{rotate:90},null)},poe=()=>({previewPrefixCls:String,preview:wt()}),zE=re({compatConfig:{MODE:3},name:"AImagePreviewGroup",inheritAttrs:!1,props:poe(),setup(e,t){let{attrs:n,slots:o}=t;const{prefixCls:r,rootPrefixCls:i}=Ee("image",e),l=I(()=>`${r.value}-preview`),[a,s]=kE(r),c=I(()=>{const{preview:u}=e;if(u===!1)return u;const d=typeof u=="object"?u:{};return v(v({},d),{rootClassName:s.value,transitionName:jn(i.value,"zoom",d.transitionName),maskTransitionName:jn(i.value,"fade",d.maskTransitionName)})});return()=>a(p(AE,D(D({},v(v({},n),e)),{},{preview:c.value,icons:FE,previewPrefixCls:l.value}),o))}}),Ol=re({name:"AImage",inheritAttrs:!1,props:DE(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,rootPrefixCls:i,configProvider:l}=Ee("image",e),[a,s]=kE(r),c=I(()=>{const{preview:u}=e;if(u===!1)return u;const d=typeof u=="object"?u:{};return v(v({icons:FE},d),{transitionName:jn(i.value,"zoom",d.transitionName),maskTransitionName:jn(i.value,"fade",d.maskTransitionName)})});return()=>{var u,d;const f=((d=(u=l.locale)===null||u===void 0?void 0:u.value)===null||d===void 0?void 0:d.Image)||ro.Image,h=()=>p("div",{class:`${r.value}-mask-info`},[p(Au,null,null),f==null?void 0:f.preview]),{previewMask:m=n.previewMask||h}=e;return a(p(BE,D(D({},v(v(v({},o),e),{prefixCls:r.value})),{},{preview:c.value,rootClassName:ce(e.rootClassName,s.value)}),v(v({},n),{previewMask:typeof m=="function"?m:null})))}}});Ol.PreviewGroup=zE;Ol.install=function(e){return e.component(Ol.name,Ol),e.component(Ol.PreviewGroup.name,Ol.PreviewGroup),e};var hoe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};function e4(e){for(var t=1;tNumber.MAX_SAFE_INTEGER)return String(j0()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(eNumber.MAX_SAFE_INTEGER)return new Pl(Number.MAX_SAFE_INTEGER);if(o0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":hS(this.number):this.origin}}class La{constructor(t){if(this.origin="",HE(t)){this.empty=!0;return}if(this.origin=String(t),t==="-"||Number.isNaN(t)){this.nan=!0;return}let n=t;if(pS(n)&&(n=Number(n)),n=typeof n=="string"?n:hS(n),gS(n)){const o=Pc(n);this.negative=o.negative;const r=o.trimStr.split(".");this.integer=BigInt(r[0]);const i=r[1]||"0";this.decimal=BigInt(i),this.decimalLen=i.length}else this.nan=!0}getMark(){return this.negative?"-":""}getIntegerStr(){return this.integer.toString()}getDecimalStr(){return this.decimal.toString().padStart(this.decimalLen,"0")}alignDecimal(t){const n=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(t,"0")}`;return BigInt(n)}negate(){const t=new La(this.toString());return t.negative=!t.negative,t}add(t){if(this.isInvalidate())return new La(t);const n=new La(t);if(n.isInvalidate())return this;const o=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),r=this.alignDecimal(o),i=n.alignDecimal(o),l=(r+i).toString(),{negativeStr:a,trimStr:s}=Pc(l),c=`${a}${s.padStart(o+1,"0")}`;return new La(`${c.slice(0,-o)}.${c.slice(-o)}`)}isEmpty(){return this.empty}isNaN(){return this.nan}isInvalidate(){return this.isEmpty()||this.isNaN()}equals(t){return this.toString()===(t==null?void 0:t.toString())}lessEquals(t){return this.add(t.negate().toString()).toNumber()<=0}toNumber(){return this.isNaN()?NaN:Number(this.toString())}toString(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":Pc(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}function wr(e){return j0()?new La(e):new Pl(e)}function V0(e,t,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";const{negativeStr:r,integerStr:i,decimalStr:l}=Pc(e),a=`${t}${l}`,s=`${r}${i}`;if(n>=0){const c=Number(l[n]);if(c>=5&&!o){const u=wr(e).add(`${r}0.${"0".repeat(n)}${10-c}`);return V0(u.toString(),t,n,o)}return n===0?s:`${s}${t}${l.padEnd(n,"0").slice(0,n)}`}return a===".0"?s:`${s}${a}`}const moe=200,voe=600,boe=re({compatConfig:{MODE:3},name:"StepHandler",inheritAttrs:!1,props:{prefixCls:String,upDisabled:Boolean,downDisabled:Boolean,onStep:ve()},slots:Object,setup(e,t){let{slots:n,emit:o}=t;const r=ie(),i=(a,s)=>{a.preventDefault(),o("step",s);function c(){o("step",s),r.value=setTimeout(c,moe)}r.value=setTimeout(c,voe)},l=()=>{clearTimeout(r.value)};return tt(()=>{l()}),()=>{if(Oy())return null;const{prefixCls:a,upDisabled:s,downDisabled:c}=e,u=`${a}-handler`,d=ce(u,`${u}-up`,{[`${u}-up-disabled`]:s}),f=ce(u,`${u}-down`,{[`${u}-down-disabled`]:c}),h={unselectable:"on",role:"button",onMouseup:l,onMouseleave:l},{upNode:m,downNode:g}=n;return p("div",{class:`${u}-wrap`},[p("span",D(D({},h),{},{onMousedown:y=>{i(y,!0)},"aria-label":"Increase Value","aria-disabled":s,class:d}),[(m==null?void 0:m())||p("span",{unselectable:"on",class:`${a}-handler-up-inner`},null)]),p("span",D(D({},h),{},{onMousedown:y=>{i(y,!1)},"aria-label":"Decrease Value","aria-disabled":c,class:f}),[(g==null?void 0:g())||p("span",{unselectable:"on",class:`${a}-handler-down-inner`},null)])])}}});function yoe(e,t){const n=ie(null);function o(){try{const{selectionStart:i,selectionEnd:l,value:a}=e.value,s=a.substring(0,i),c=a.substring(l);n.value={start:i,end:l,value:a,beforeTxt:s,afterTxt:c}}catch{}}function r(){if(e.value&&n.value&&t.value)try{const{value:i}=e.value,{beforeTxt:l,afterTxt:a,start:s}=n.value;let c=i.length;if(i.endsWith(a))c=i.length-n.value.afterTxt.length;else if(i.startsWith(l))c=l.length;else{const u=l[s-1],d=i.indexOf(u,s-1);d!==-1&&(c=d+1)}e.value.setSelectionRange(c,c)}catch(i){`${i.message}`}}return[o,r]}const Soe=()=>{const e=oe(0),t=()=>{Qe.cancel(e.value)};return tt(()=>{t()}),n=>{t(),e.value=Qe(()=>{n()})}};var $oe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re||t.isEmpty()?t.toString():t.toNumber(),n4=e=>{const t=wr(e);return t.isInvalidate()?null:t},jE=()=>({stringMode:Ce(),defaultValue:ze([String,Number]),value:ze([String,Number]),prefixCls:Be(),min:ze([String,Number]),max:ze([String,Number]),step:ze([String,Number],1),tabindex:Number,controls:Ce(!0),readonly:Ce(),disabled:Ce(),autofocus:Ce(),keyboard:Ce(!0),parser:ve(),formatter:ve(),precision:Number,decimalSeparator:String,onInput:ve(),onChange:ve(),onPressEnter:ve(),onStep:ve(),onBlur:ve(),onFocus:ve()}),Coe=re({compatConfig:{MODE:3},name:"InnerInputNumber",inheritAttrs:!1,props:v(v({},jE()),{lazy:Boolean}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r,expose:i}=t;const l=oe(),a=oe(!1),s=oe(!1),c=oe(!1),u=oe(wr(e.value));function d(j){e.value===void 0&&(u.value=j)}const f=(j,Y)=>{if(!Y)return e.precision>=0?e.precision:Math.max(iu(j),iu(e.step))},h=j=>{const Y=String(j);if(e.parser)return e.parser(Y);let Z=Y;return e.decimalSeparator&&(Z=Z.replace(e.decimalSeparator,".")),Z.replace(/[^\w.-]+/g,"")},m=oe(""),g=(j,Y)=>{if(e.formatter)return e.formatter(j,{userTyping:Y,input:String(m.value)});let Z=typeof j=="number"?hS(j):j;if(!Y){const G=f(Z,Y);if(gS(Z)&&(e.decimalSeparator||G>=0)){const te=e.decimalSeparator||".";Z=V0(Z,te,G)}}return Z},y=(()=>{const j=e.value;return u.value.isInvalidate()&&["string","number"].includes(typeof j)?Number.isNaN(j)?"":j:g(u.value.toString(),!1)})();m.value=y;function b(j,Y){m.value=g(j.isInvalidate()?j.toString(!1):j.toString(!Y),Y)}const S=I(()=>n4(e.max)),$=I(()=>n4(e.min)),x=I(()=>!S.value||!u.value||u.value.isInvalidate()?!1:S.value.lessEquals(u.value)),C=I(()=>!$.value||!u.value||u.value.isInvalidate()?!1:u.value.lessEquals($.value)),[O,w]=yoe(l,a),P=j=>S.value&&!j.lessEquals(S.value)?S.value:$.value&&!$.value.lessEquals(j)?$.value:null,T=j=>!P(j),M=(j,Y)=>{var Z;let G=j,te=T(G)||G.isEmpty();if(!G.isEmpty()&&!Y&&(G=P(G)||G,te=!0),!e.readonly&&!e.disabled&&te){const U=G.toString(),Q=f(U,Y);return Q>=0&&(G=wr(V0(U,".",Q))),G.equals(u.value)||(d(G),(Z=e.onChange)===null||Z===void 0||Z.call(e,G.isEmpty()?null:t4(e.stringMode,G)),e.value===void 0&&b(G,Y)),G}return u.value},E=Soe(),A=j=>{var Y;if(O(),m.value=j,!c.value){const Z=h(j),G=wr(Z);G.isNaN()||M(G,!0)}(Y=e.onInput)===null||Y===void 0||Y.call(e,j),E(()=>{let Z=j;e.parser||(Z=j.replace(/。/g,".")),Z!==j&&A(Z)})},R=()=>{c.value=!0},F=()=>{c.value=!1,A(l.value.value)},_=j=>{A(j.target.value)},N=j=>{var Y,Z;if(j&&x.value||!j&&C.value)return;s.value=!1;let G=wr(e.step);j||(G=G.negate());const te=(u.value||wr(0)).add(G.toString()),U=M(te,!1);(Y=e.onStep)===null||Y===void 0||Y.call(e,t4(e.stringMode,U),{offset:e.step,type:j?"up":"down"}),(Z=l.value)===null||Z===void 0||Z.focus()},B=j=>{const Y=wr(h(m.value));let Z=Y;Y.isNaN()?Z=u.value:Z=M(Y,j),e.value!==void 0?b(u.value,!1):Z.isNaN()||b(Z,!1)},L=()=>{s.value=!0},k=j=>{var Y;const{which:Z}=j;s.value=!0,Z===Ie.ENTER&&(c.value||(s.value=!1),B(!1),(Y=e.onPressEnter)===null||Y===void 0||Y.call(e,j)),e.keyboard!==!1&&!c.value&&[Ie.UP,Ie.DOWN].includes(Z)&&(N(Ie.UP===Z),j.preventDefault())},z=()=>{s.value=!1},H=j=>{B(!1),a.value=!1,s.value=!1,r("blur",j)};return Se(()=>e.precision,()=>{u.value.isInvalidate()||b(u.value,!1)},{flush:"post"}),Se(()=>e.value,()=>{const j=wr(e.value);u.value=j;const Y=wr(h(m.value));(!j.equals(Y)||!s.value||e.formatter)&&b(j,s.value)},{flush:"post"}),Se(m,()=>{e.formatter&&w()},{flush:"post"}),Se(()=>e.disabled,j=>{j&&(a.value=!1)}),i({focus:()=>{var j;(j=l.value)===null||j===void 0||j.focus()},blur:()=>{var j;(j=l.value)===null||j===void 0||j.blur()}}),()=>{const j=v(v({},n),e),{prefixCls:Y="rc-input-number",min:Z,max:G,step:te=1,defaultValue:U,value:Q,disabled:J,readonly:X,keyboard:q,controls:V=!0,autofocus:K,stringMode:ee,parser:ue,formatter:ae,precision:le,decimalSeparator:ne,onChange:se,onInput:pe,onPressEnter:he,onStep:ge,lazy:be,class:xe,style:fe}=j,de=$oe(j,["prefixCls","min","max","step","defaultValue","value","disabled","readonly","keyboard","controls","autofocus","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","lazy","class","style"]),{upHandler:ye,downHandler:Oe}=o,Te=`${Y}-input`,Re={};return be?Re.onChange=_:Re.onInput=_,p("div",{class:ce(Y,xe,{[`${Y}-focused`]:a.value,[`${Y}-disabled`]:J,[`${Y}-readonly`]:X,[`${Y}-not-a-number`]:u.value.isNaN(),[`${Y}-out-of-range`]:!u.value.isInvalidate()&&!T(u.value)}),style:fe,onKeydown:k,onKeyup:z},[V&&p(boe,{prefixCls:Y,upDisabled:x.value,downDisabled:C.value,onStep:N},{upNode:ye,downNode:Oe}),p("div",{class:`${Te}-wrap`},[p("input",D(D(D({autofocus:K,autocomplete:"off",role:"spinbutton","aria-valuemin":Z,"aria-valuemax":G,"aria-valuenow":u.value.isInvalidate()?null:u.value.toString(),step:te},de),{},{ref:l,class:Te,value:m.value,disabled:J,readonly:X,onFocus:$e=>{a.value=!0,r("focus",$e)}},Re),{},{onBlur:H,onCompositionstart:R,onCompositionend:F,onBeforeinput:L}),null)])])}}});function Km(e){return e!=null}const xoe=e=>{const{componentCls:t,lineWidth:n,lineType:o,colorBorder:r,borderRadius:i,fontSizeLG:l,controlHeightLG:a,controlHeightSM:s,colorError:c,inputPaddingHorizontalSM:u,colorTextDescription:d,motionDurationMid:f,colorPrimary:h,controlHeight:m,inputPaddingHorizontal:g,colorBgContainer:y,colorTextDisabled:b,borderRadiusSM:S,borderRadiusLG:$,controlWidth:x,handleVisible:C}=e;return[{[t]:v(v(v(v({},Ze(e)),pa(e)),Pu(e,t)),{display:"inline-block",width:x,margin:0,padding:0,border:`${n}px ${o} ${r}`,borderRadius:i,"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:l,borderRadius:$,[`input${t}-input`]:{height:a-2*n}},"&-sm":{padding:0,borderRadius:S,[`input${t}-input`]:{height:s-2*n,padding:`0 ${u}px`}},"&:hover":v({},Ts(e)),"&-focused":v({},Yi(e)),"&-disabled":v(v({},A1(e)),{[`${t}-input`]:{cursor:"not-allowed"}}),"&-out-of-range":{input:{color:c}},"&-group":v(v(v({},Ze(e)),UT(e)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:$}},"&-sm":{[`${t}-group-addon`]:{borderRadius:S}}}}),[t]:{"&-input":v(v({width:"100%",height:m-2*n,padding:`0 ${g}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:i,outline:0,transition:`all ${f} linear`,appearance:"textfield",color:e.colorText,fontSize:"inherit",verticalAlign:"top"},M1(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[t]:{[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{opacity:1},[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleWidth,height:"100%",background:y,borderStartStartRadius:0,borderStartEndRadius:i,borderEndEndRadius:i,borderEndStartRadius:0,opacity:C===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${f} linear ${f}`,[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[` + ${t}-handler-up-inner, + ${t}-handler-down-inner + `]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},[`${t}-handler`]:{height:"50%",overflow:"hidden",color:d,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${n}px ${o} ${r}`,transition:`all ${f} linear`,"&:active":{background:e.colorFillAlter},"&:hover":{height:"60%",[` + ${t}-handler-up-inner, + ${t}-handler-down-inner + `]:{color:h}},"&-up-inner, &-down-inner":v(v({},ra()),{color:d,transition:`all ${f} linear`,userSelect:"none"})},[`${t}-handler-up`]:{borderStartEndRadius:i},[`${t}-handler-down`]:{borderBlockStart:`${n}px ${o} ${r}`,borderEndEndRadius:i},"&-disabled, &-readonly":{[`${t}-handler-wrap`]:{display:"none"},[`${t}-input`]:{color:"inherit"}},[` + ${t}-handler-up-disabled, + ${t}-handler-down-disabled + `]:{cursor:"not-allowed"},[` + ${t}-handler-up-disabled:hover &-handler-up-inner, + ${t}-handler-down-disabled:hover &-handler-down-inner + `]:{color:b}}},{[`${t}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${t}-handler-down`]:{borderBlockStartWidth:0}}}]},woe=e=>{const{componentCls:t,inputPaddingHorizontal:n,inputAffixPadding:o,controlWidth:r,borderRadiusLG:i,borderRadiusSM:l}=e;return{[`${t}-affix-wrapper`]:v(v(v({},pa(e)),Pu(e,`${t}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:r,padding:0,paddingInlineStart:n,"&-lg":{borderRadius:i},"&-sm":{borderRadius:l},[`&:not(${t}-affix-wrapper-disabled):hover`]:v(v({},Ts(e)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${t}[disabled]`]:{background:"transparent"}},[`> div${t}`]:{width:"100%",border:"none",outline:"none",[`&${t}-focused`]:{boxShadow:"none !important"}},[`input${t}-input`]:{padding:0},"&::before":{width:0,visibility:"hidden",content:'"\\a0"'},[`${t}-handler-wrap`]:{zIndex:2},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:o},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:n,marginInlineStart:o}}})}},Ooe=Xe("InputNumber",e=>{const t=ha(e);return[xoe(t),woe(t),Os(t)]},e=>({controlWidth:90,handleWidth:e.controlHeightSM-e.lineWidth*2,handleFontSize:e.fontSize/2,handleVisible:"auto"}));var Poe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rv(v({},o4),{size:Be(),bordered:Ce(!0),placeholder:String,name:String,id:String,type:String,addonBefore:W.any,addonAfter:W.any,prefix:W.any,"onUpdate:value":o4.onChange,valueModifiers:Object,status:Be()}),Um=re({compatConfig:{MODE:3},name:"AInputNumber",inheritAttrs:!1,props:Ioe(),slots:Object,setup(e,t){let{emit:n,expose:o,attrs:r,slots:i}=t;var l;const a=ln(),s=yn.useInject(),c=I(()=>gr(s.status,e.status)),{prefixCls:u,size:d,direction:f,disabled:h}=Ee("input-number",e),{compactSize:m,compactItemClassnames:g}=ol(u,f),y=mo(),b=I(()=>{var R;return(R=h.value)!==null&&R!==void 0?R:y.value}),[S,$]=Ooe(u),x=I(()=>m.value||d.value),C=oe((l=e.value)!==null&&l!==void 0?l:e.defaultValue),O=oe(!1);Se(()=>e.value,()=>{C.value=e.value});const w=oe(null),P=()=>{var R;(R=w.value)===null||R===void 0||R.focus()};o({focus:P,blur:()=>{var R;(R=w.value)===null||R===void 0||R.blur()}});const M=R=>{e.value===void 0&&(C.value=R),n("update:value",R),n("change",R),a.onFieldChange()},E=R=>{O.value=!1,n("blur",R),a.onFieldBlur()},A=R=>{O.value=!0,n("focus",R)};return()=>{var R,F,_,N;const{hasFeedback:B,isFormItemInput:L,feedbackIcon:k}=s,z=(R=e.id)!==null&&R!==void 0?R:a.id.value,H=v(v(v({},r),e),{id:z,disabled:b.value}),{class:j,bordered:Y,readonly:Z,style:G,addonBefore:te=(F=i.addonBefore)===null||F===void 0?void 0:F.call(i),addonAfter:U=(_=i.addonAfter)===null||_===void 0?void 0:_.call(i),prefix:Q=(N=i.prefix)===null||N===void 0?void 0:N.call(i),valueModifiers:J={}}=H,X=Poe(H,["class","bordered","readonly","style","addonBefore","addonAfter","prefix","valueModifiers"]),q=u.value,V=ce({[`${q}-lg`]:x.value==="large",[`${q}-sm`]:x.value==="small",[`${q}-rtl`]:f.value==="rtl",[`${q}-readonly`]:Z,[`${q}-borderless`]:!Y,[`${q}-in-form-item`]:L},Fn(q,c.value),j,g.value,$.value);let K=p(Coe,D(D({},rt(X,["size","defaultValue"])),{},{ref:w,lazy:!!J.lazy,value:C.value,class:V,prefixCls:q,readonly:Z,onChange:M,onBlur:E,onFocus:A}),{upHandler:i.upIcon?()=>p("span",{class:`${q}-handler-up-inner`},[i.upIcon()]):()=>p(fS,{class:`${q}-handler-up-inner`},null),downHandler:i.downIcon?()=>p("span",{class:`${q}-handler-down-inner`},[i.downIcon()]):()=>p(nl,{class:`${q}-handler-down-inner`},null)});const ee=Km(te)||Km(U),ue=Km(Q);if(ue||B){const ae=ce(`${q}-affix-wrapper`,Fn(`${q}-affix-wrapper`,c.value,B),{[`${q}-affix-wrapper-focused`]:O.value,[`${q}-affix-wrapper-disabled`]:b.value,[`${q}-affix-wrapper-sm`]:x.value==="small",[`${q}-affix-wrapper-lg`]:x.value==="large",[`${q}-affix-wrapper-rtl`]:f.value==="rtl",[`${q}-affix-wrapper-readonly`]:Z,[`${q}-affix-wrapper-borderless`]:!Y,[`${j}`]:!ee&&j},$.value);K=p("div",{class:ae,style:G,onClick:P},[ue&&p("span",{class:`${q}-prefix`},[Q]),K,B&&p("span",{class:`${q}-suffix`},[k])])}if(ee){const ae=`${q}-group`,le=`${ae}-addon`,ne=te?p("div",{class:le},[te]):null,se=U?p("div",{class:le},[U]):null,pe=ce(`${q}-wrapper`,ae,{[`${ae}-rtl`]:f.value==="rtl"},$.value),he=ce(`${q}-group-wrapper`,{[`${q}-group-wrapper-sm`]:x.value==="small",[`${q}-group-wrapper-lg`]:x.value==="large",[`${q}-group-wrapper-rtl`]:f.value==="rtl"},Fn(`${u}-group-wrapper`,c.value,B),j,$.value);K=p("div",{class:he,style:G},[p("div",{class:pe},[ne&&p(qc,null,{default:()=>[p(Qf,null,{default:()=>[ne]})]}),K,se&&p(qc,null,{default:()=>[p(Qf,null,{default:()=>[se]})]})])])}return S(ht(K,{style:G}))}}}),Toe=v(Um,{install:e=>(e.component(Um.name,Um),e)}),Eoe=e=>{const{componentCls:t,colorBgContainer:n,colorBgBody:o,colorText:r}=e;return{[`${t}-sider-light`]:{background:n,[`${t}-sider-trigger`]:{color:r,background:n},[`${t}-sider-zero-width-trigger`]:{color:r,background:n,border:`1px solid ${o}`,borderInlineStart:0}}}},_oe=e=>{const{antCls:t,componentCls:n,colorText:o,colorTextLightSolid:r,colorBgHeader:i,colorBgBody:l,colorBgTrigger:a,layoutHeaderHeight:s,layoutHeaderPaddingInline:c,layoutHeaderColor:u,layoutFooterPadding:d,layoutTriggerHeight:f,layoutZeroTriggerSize:h,motionDurationMid:m,motionDurationSlow:g,fontSize:y,borderRadius:b}=e;return{[n]:v(v({display:"flex",flex:"auto",flexDirection:"column",color:o,minHeight:0,background:l,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},[`${n}-header`]:{height:s,paddingInline:c,color:u,lineHeight:`${s}px`,background:i,[`${t}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:d,color:o,fontSize:y,background:l},[`${n}-content`]:{flex:"auto",minHeight:0},[`${n}-sider`]:{position:"relative",minWidth:0,background:i,transition:`all ${m}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${t}-menu${t}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:f},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:f,color:r,lineHeight:`${f}px`,textAlign:"center",background:a,cursor:"pointer",transition:`all ${m}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:s,insetInlineEnd:-h,zIndex:1,width:h,height:h,color:r,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:i,borderStartStartRadius:0,borderStartEndRadius:b,borderEndEndRadius:b,borderEndStartRadius:0,cursor:"pointer",transition:`background ${g} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${g}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-h,borderStartStartRadius:b,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:b}}}}},Eoe(e)),{"&-rtl":{direction:"rtl"}})}},Moe=Xe("Layout",e=>{const{colorText:t,controlHeightSM:n,controlHeight:o,controlHeightLG:r,marginXXS:i}=e,l=r*1.25,a=Fe(e,{layoutHeaderHeight:o*2,layoutHeaderPaddingInline:l,layoutHeaderColor:t,layoutFooterPadding:`${n}px ${l}px`,layoutTriggerHeight:r+i*2,layoutZeroTriggerSize:r});return[_oe(a)]},e=>{const{colorBgLayout:t}=e;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140"}}),mS=()=>({prefixCls:String,hasSider:{type:Boolean,default:void 0},tagName:String});function ig(e){let{suffixCls:t,tagName:n,name:o}=e;return r=>re({compatConfig:{MODE:3},name:o,props:mS(),setup(l,a){let{slots:s}=a;const{prefixCls:c}=Ee(t,l);return()=>{const u=v(v({},l),{prefixCls:c.value,tagName:n});return p(r,u,s)}}})}const vS=re({compatConfig:{MODE:3},props:mS(),setup(e,t){let{slots:n}=t;return()=>p(e.tagName,{class:e.prefixCls},n)}}),Aoe=re({compatConfig:{MODE:3},inheritAttrs:!1,props:mS(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ee("",e),[l,a]=Moe(r),s=ie([]);qe(tT,{addSider:d=>{s.value=[...s.value,d]},removeSider:d=>{s.value=s.value.filter(f=>f!==d)}});const u=I(()=>{const{prefixCls:d,hasSider:f}=e;return{[a.value]:!0,[`${d}`]:!0,[`${d}-has-sider`]:typeof f=="boolean"?f:s.value.length>0,[`${d}-rtl`]:i.value==="rtl"}});return()=>{const{tagName:d}=e;return l(p(d,v(v({},o),{class:[u.value,o.class]}),n))}}}),Gm=ig({suffixCls:"layout",tagName:"section",name:"ALayout"})(Aoe),nf=ig({suffixCls:"layout-header",tagName:"header",name:"ALayoutHeader"})(vS),of=ig({suffixCls:"layout-footer",tagName:"footer",name:"ALayoutFooter"})(vS),rf=ig({suffixCls:"layout-content",tagName:"main",name:"ALayoutContent"})(vS);var Roe={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"};function r4(e){for(var t=1;t({prefixCls:String,collapsible:{type:Boolean,default:void 0},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean,default:void 0},reverseArrow:{type:Boolean,default:void 0},zeroWidthTriggerStyle:{type:Object,default:void 0},trigger:W.any,width:W.oneOfType([W.number,W.string]),collapsedWidth:W.oneOfType([W.number,W.string]),breakpoint:W.oneOf(Mn("xs","sm","md","lg","xl","xxl","xxxl")),theme:W.oneOf(Mn("light","dark")).def("dark"),onBreakpoint:Function,onCollapse:Function}),Boe=(()=>{let e=0;return function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e+=1,`${t}${e}`}})(),lf=re({compatConfig:{MODE:3},name:"ALayoutSider",inheritAttrs:!1,props:et(Noe(),{collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80}),emits:["breakpoint","update:collapsed","collapse"],setup(e,t){let{emit:n,attrs:o,slots:r}=t;const{prefixCls:i}=Ee("layout-sider",e),l=Ke(tT,void 0),a=oe(!!(e.collapsed!==void 0?e.collapsed:e.defaultCollapsed)),s=oe(!1);Se(()=>e.collapsed,()=>{a.value=!!e.collapsed}),qe(eT,a);const c=(g,y)=>{e.collapsed===void 0&&(a.value=g),n("update:collapsed",g),n("collapse",g,y)},u=oe(g=>{s.value=g.matches,n("breakpoint",g.matches),a.value!==g.matches&&c(g.matches,"responsive")});let d;function f(g){return u.value(g)}const h=Boe("ant-sider-");l&&l.addSider(h),Ue(()=>{Se(()=>e.breakpoint,()=>{try{d==null||d.removeEventListener("change",f)}catch{d==null||d.removeListener(f)}if(typeof window<"u"){const{matchMedia:g}=window;if(g&&e.breakpoint&&e.breakpoint in i4){d=g(`(max-width: ${i4[e.breakpoint]})`);try{d.addEventListener("change",f)}catch{d.addListener(f)}f(d)}}},{immediate:!0})}),tt(()=>{try{d==null||d.removeEventListener("change",f)}catch{d==null||d.removeListener(f)}l&&l.removeSider(h)});const m=()=>{c(!a.value,"clickTrigger")};return()=>{var g,y;const b=i.value,{collapsedWidth:S,width:$,reverseArrow:x,zeroWidthTriggerStyle:C,trigger:O=(g=r.trigger)===null||g===void 0?void 0:g.call(r),collapsible:w,theme:P}=e,T=a.value?S:$,M=ip(T)?`${T}px`:String(T),E=parseFloat(String(S||0))===0?p("span",{onClick:m,class:ce(`${b}-zero-width-trigger`,`${b}-zero-width-trigger-${x?"right":"left"}`),style:C},[O||p(bS,null,null)]):null,A={expanded:p(x?Ao:Lr,null,null),collapsed:p(x?Lr:Ao,null,null)},R=a.value?"collapsed":"expanded",F=A[R],_=O!==null?E||p("div",{class:`${b}-trigger`,onClick:m,style:{width:M}},[O||F]):null,N=[o.style,{flex:`0 0 ${M}`,maxWidth:M,minWidth:M,width:M}],B=ce(b,`${b}-${P}`,{[`${b}-collapsed`]:!!a.value,[`${b}-has-trigger`]:w&&O!==null&&!E,[`${b}-below`]:!!s.value,[`${b}-zero-width`]:parseFloat(M)===0},o.class);return p("aside",D(D({},o),{},{class:B,style:N}),[p("div",{class:`${b}-children`},[(y=r.default)===null||y===void 0?void 0:y.call(r)]),w||s.value&&E?_:null])}}}),Loe=nf,koe=of,Foe=lf,zoe=rf,Hoe=v(Gm,{Header:nf,Footer:of,Content:rf,Sider:lf,install:e=>(e.component(Gm.name,Gm),e.component(nf.name,nf),e.component(of.name,of),e.component(lf.name,lf),e.component(rf.name,rf),e)});function joe(e,t,n){var o=n||{},r=o.noTrailing,i=r===void 0?!1:r,l=o.noLeading,a=l===void 0?!1:l,s=o.debounceMode,c=s===void 0?void 0:s,u,d=!1,f=0;function h(){u&&clearTimeout(u)}function m(y){var b=y||{},S=b.upcomingOnly,$=S===void 0?!1:S;h(),d=!$}function g(){for(var y=arguments.length,b=new Array(y),S=0;Se?a?(f=Date.now(),i||(u=setTimeout(c?O:C,e))):C():i!==!0&&(u=setTimeout(c?O:C,c===void 0?e-x:e))}return g.cancel=m,g}function Voe(e,t,n){var o={},r=o.atBegin,i=r===void 0?!1:r;return joe(e,t,{debounceMode:i!==!1})}const Woe=new it("antSpinMove",{to:{opacity:1}}),Koe=new it("antRotate",{to:{transform:"rotate(405deg)"}}),Uoe=e=>({[`${e.componentCls}`]:v(v({},Ze(e)),{position:"absolute",display:"none",color:e.colorPrimary,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"static",display:"inline-block",opacity:1},"&-nested-loading":{position:"relative",[`> div > ${e.componentCls}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${e.componentCls}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:-e.spinDotSize/2},[`${e.componentCls}-text`]:{position:"absolute",top:"50%",width:"100%",paddingTop:(e.spinDotSize-e.fontSize)/2+2,textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.spinDotSize/2)-10},"&-sm":{[`${e.componentCls}-dot`]:{margin:-e.spinDotSizeSM/2},[`${e.componentCls}-text`]:{paddingTop:(e.spinDotSizeSM-e.fontSize)/2+2},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.spinDotSizeSM/2)-10}},"&-lg":{[`${e.componentCls}-dot`]:{margin:-(e.spinDotSizeLG/2)},[`${e.componentCls}-text`]:{paddingTop:(e.spinDotSizeLG-e.fontSize)/2+2},[`&${e.componentCls}-show-text ${e.componentCls}-dot`]:{marginTop:-(e.spinDotSizeLG/2)-10}}},[`${e.componentCls}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${e.componentCls}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${e.componentCls}-dot`]:{position:"relative",display:"inline-block",fontSize:e.spinDotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:(e.spinDotSize-e.marginXXS/2)/2,height:(e.spinDotSize-e.marginXXS/2)/2,backgroundColor:e.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:Woe,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:Koe,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&-sm ${e.componentCls}-dot`]:{fontSize:e.spinDotSizeSM,i:{width:(e.spinDotSizeSM-e.marginXXS/2)/2,height:(e.spinDotSizeSM-e.marginXXS/2)/2}},[`&-lg ${e.componentCls}-dot`]:{fontSize:e.spinDotSizeLG,i:{width:(e.spinDotSizeLG-e.marginXXS)/2,height:(e.spinDotSizeLG-e.marginXXS)/2}},[`&${e.componentCls}-show-text ${e.componentCls}-text`]:{display:"block"}})}),Goe=Xe("Spin",e=>{const t=Fe(e,{spinDotDefault:e.colorTextDescription,spinDotSize:e.controlHeightLG/2,spinDotSizeSM:e.controlHeightLG*.35,spinDotSizeLG:e.controlHeight});return[Uoe(t)]},{contentHeight:400});var Xoe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:W.any,delay:Number,indicator:W.any});let af=null;function qoe(e,t){return!!e&&!!t&&!isNaN(Number(t))}function Zoe(e){const t=e.indicator;af=typeof t=="function"?t:()=>p(t,null,null)}const Dr=re({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:et(Yoe(),{size:"default",spinning:!0,wrapperClassName:""}),setup(e,t){let{attrs:n,slots:o}=t;const{prefixCls:r,size:i,direction:l}=Ee("spin",e),[a,s]=Goe(r),c=oe(e.spinning&&!qoe(e.spinning,e.delay));let u;return Se([()=>e.spinning,()=>e.delay],()=>{u==null||u.cancel(),u=Voe(e.delay,()=>{c.value=e.spinning}),u==null||u()},{immediate:!0,flush:"post"}),tt(()=>{u==null||u.cancel()}),()=>{var d,f;const{class:h}=n,m=Xoe(n,["class"]),{tip:g=(d=o.tip)===null||d===void 0?void 0:d.call(o)}=e,y=(f=o.default)===null||f===void 0?void 0:f.call(o),b={[s.value]:!0,[r.value]:!0,[`${r.value}-sm`]:i.value==="small",[`${r.value}-lg`]:i.value==="large",[`${r.value}-spinning`]:c.value,[`${r.value}-show-text`]:!!g,[`${r.value}-rtl`]:l.value==="rtl",[h]:!!h};function S(x){const C=`${x}-dot`;let O=on(o,e,"indicator");return O===null?null:(Array.isArray(O)&&(O=O.length===1?O[0]:O),Yt(O)?bn(O,{class:C}):af&&Yt(af())?bn(af(),{class:C}):p("span",{class:`${C} ${x}-dot-spin`},[p("i",{class:`${x}-dot-item`},null),p("i",{class:`${x}-dot-item`},null),p("i",{class:`${x}-dot-item`},null),p("i",{class:`${x}-dot-item`},null)]))}const $=p("div",D(D({},m),{},{class:b,"aria-live":"polite","aria-busy":c.value}),[S(r.value),g?p("div",{class:`${r.value}-text`},[g]):null]);if(y&&Nt(y).length){const x={[`${r.value}-container`]:!0,[`${r.value}-blur`]:c.value};return a(p("div",{class:[`${r.value}-nested-loading`,e.wrapperClassName,s.value]},[c.value&&p("div",{key:"loading"},[$]),p("div",{class:x,key:"container"},[y])]))}return a($)}}});Dr.setDefaultIndicator=Zoe;Dr.install=function(e){return e.component(Dr.name,Dr),e};var Joe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};function l4(e){for(var t=1;t{const r=v(v(v({},e),{size:"small"}),n);return p(Cn,r,o)}}}),ore=re({name:"MiddleSelect",inheritAttrs:!1,props:Rh(),Option:Cn.Option,setup(e,t){let{attrs:n,slots:o}=t;return()=>{const r=v(v(v({},e),{size:"middle"}),n);return p(Cn,r,o)}}}),gl=re({compatConfig:{MODE:3},name:"Pager",inheritAttrs:!1,props:{rootPrefixCls:String,page:Number,active:{type:Boolean,default:void 0},last:{type:Boolean,default:void 0},locale:W.object,showTitle:{type:Boolean,default:void 0},itemRender:{type:Function,default:()=>{}},onClick:{type:Function},onKeypress:{type:Function}},eimt:["click","keypress"],setup(e,t){let{emit:n,attrs:o}=t;const r=()=>{n("click",e.page)},i=l=>{n("keypress",l,r,e.page)};return()=>{const{showTitle:l,page:a,itemRender:s}=e,{class:c,style:u}=o,d=`${e.rootPrefixCls}-item`,f=ce(d,`${d}-${e.page}`,{[`${d}-active`]:e.active,[`${d}-disabled`]:!e.page},c);return p("li",{onClick:r,onKeypress:i,title:l?String(a):null,tabindex:"0",class:f,style:u},[s({page:a,type:"page",originalElement:p("a",{rel:"nofollow"},[a])})])}}}),bl={ENTER:13,ARROW_UP:38,ARROW_DOWN:40},rre=re({compatConfig:{MODE:3},props:{disabled:{type:Boolean,default:void 0},changeSize:Function,quickGo:Function,selectComponentClass:W.any,current:Number,pageSizeOptions:W.array.def(["10","20","50","100"]),pageSize:Number,buildOptionText:Function,locale:W.object,rootPrefixCls:String,selectPrefixCls:String,goButton:W.any},setup(e){const t=ie(""),n=I(()=>!t.value||isNaN(t.value)?void 0:Number(t.value)),o=s=>`${s.value} ${e.locale.items_per_page}`,r=s=>{const{value:c}=s.target;t.value!==c&&(t.value=c)},i=s=>{const{goButton:c,quickGo:u,rootPrefixCls:d}=e;if(!(c||t.value===""))if(s.relatedTarget&&(s.relatedTarget.className.indexOf(`${d}-item-link`)>=0||s.relatedTarget.className.indexOf(`${d}-item`)>=0)){t.value="";return}else u(n.value),t.value=""},l=s=>{t.value!==""&&(s.keyCode===bl.ENTER||s.type==="click")&&(e.quickGo(n.value),t.value="")},a=I(()=>{const{pageSize:s,pageSizeOptions:c}=e;return c.some(u=>u.toString()===s.toString())?c:c.concat([s.toString()]).sort((u,d)=>{const f=isNaN(Number(u))?0:Number(u),h=isNaN(Number(d))?0:Number(d);return f-h})});return()=>{const{rootPrefixCls:s,locale:c,changeSize:u,quickGo:d,goButton:f,selectComponentClass:h,selectPrefixCls:m,pageSize:g,disabled:y}=e,b=`${s}-options`;let S=null,$=null,x=null;if(!u&&!d)return null;if(u&&h){const C=e.buildOptionText||o,O=a.value.map((w,P)=>p(h.Option,{key:P,value:w},{default:()=>[C({value:w})]}));S=p(h,{disabled:y,prefixCls:m,showSearch:!1,class:`${b}-size-changer`,optionLabelProp:"children",value:(g||a.value[0]).toString(),onChange:w=>u(Number(w)),getPopupContainer:w=>w.parentNode},{default:()=>[O]})}return d&&(f&&(x=typeof f=="boolean"?p("button",{type:"button",onClick:l,onKeyup:l,disabled:y,class:`${b}-quick-jumper-button`},[c.jump_to_confirm]):p("span",{onClick:l,onKeyup:l},[f])),$=p("div",{class:`${b}-quick-jumper`},[c.jump_to,p($s,{disabled:y,type:"text",value:t.value,onInput:r,onChange:r,onKeyup:l,onBlur:i},null),c.page,x])),p("li",{class:`${b}`},[S,$])}}}),ire={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页"};var lre=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r"u"?t.statePageSize:e;return Math.floor((n.total-1)/o)+1}const cre=re({compatConfig:{MODE:3},name:"Pagination",mixins:[sa],inheritAttrs:!1,props:{disabled:{type:Boolean,default:void 0},prefixCls:W.string.def("rc-pagination"),selectPrefixCls:W.string.def("rc-select"),current:Number,defaultCurrent:W.number.def(1),total:W.number.def(0),pageSize:Number,defaultPageSize:W.number.def(10),hideOnSinglePage:{type:Boolean,default:!1},showSizeChanger:{type:Boolean,default:void 0},showLessItems:{type:Boolean,default:!1},selectComponentClass:W.any,showPrevNextJumpers:{type:Boolean,default:!0},showQuickJumper:W.oneOfType([W.looseBool,W.object]).def(!1),showTitle:{type:Boolean,default:!0},pageSizeOptions:W.arrayOf(W.oneOfType([W.number,W.string])),buildOptionText:Function,showTotal:Function,simple:{type:Boolean,default:void 0},locale:W.object.def(ire),itemRender:W.func.def(sre),prevIcon:W.any,nextIcon:W.any,jumpPrevIcon:W.any,jumpNextIcon:W.any,totalBoundaryShowSizeChanger:W.number.def(50)},data(){const e=this.$props;let t=np([this.current,this.defaultCurrent]);const n=np([this.pageSize,this.defaultPageSize]);return t=Math.min(t,Vr(n,void 0,e)),{stateCurrent:t,stateCurrentInputValue:t,statePageSize:n}},watch:{current(e){this.setState({stateCurrent:e,stateCurrentInputValue:e})},pageSize(e){const t={};let n=this.stateCurrent;const o=Vr(e,this.$data,this.$props);n=n>o?o:n,Qr(this,"current")||(t.stateCurrent=n,t.stateCurrentInputValue=n),t.statePageSize=e,this.setState(t)},stateCurrent(e,t){this.$nextTick(()=>{if(this.$refs.paginationNode){const n=this.$refs.paginationNode.querySelector(`.${this.prefixCls}-item-${t}`);n&&document.activeElement===n&&n.blur()}})},total(){const e={},t=Vr(this.pageSize,this.$data,this.$props);if(Qr(this,"current")){const n=Math.min(this.current,t);e.stateCurrent=n,e.stateCurrentInputValue=n}else{let n=this.stateCurrent;n===0&&t>0?n=1:n=Math.min(this.stateCurrent,t),e.stateCurrent=n}this.setState(e)}},methods:{getJumpPrevPage(){return Math.max(1,this.stateCurrent-(this.showLessItems?3:5))},getJumpNextPage(){return Math.min(Vr(void 0,this.$data,this.$props),this.stateCurrent+(this.showLessItems?3:5))},getItemIcon(e,t){const{prefixCls:n}=this.$props;return h6(this,e,this.$props)||p("button",{type:"button","aria-label":t,class:`${n}-item-link`},null)},getValidValue(e){const t=e.target.value,n=Vr(void 0,this.$data,this.$props),{stateCurrentInputValue:o}=this.$data;let r;return t===""?r=t:isNaN(Number(t))?r=o:t>=n?r=n:r=Number(t),r},isValid(e){return are(e)&&e!==this.stateCurrent},shouldDisplayQuickJumper(){const{showQuickJumper:e,pageSize:t,total:n}=this.$props;return n<=t?!1:e},handleKeyDown(e){(e.keyCode===bl.ARROW_UP||e.keyCode===bl.ARROW_DOWN)&&e.preventDefault()},handleKeyUp(e){const t=this.getValidValue(e),n=this.stateCurrentInputValue;t!==n&&this.setState({stateCurrentInputValue:t}),e.keyCode===bl.ENTER?this.handleChange(t):e.keyCode===bl.ARROW_UP?this.handleChange(t-1):e.keyCode===bl.ARROW_DOWN&&this.handleChange(t+1)},changePageSize(e){let t=this.stateCurrent;const n=t,o=Vr(e,this.$data,this.$props);t=t>o?o:t,o===0&&(t=this.stateCurrent),typeof e=="number"&&(Qr(this,"pageSize")||this.setState({statePageSize:e}),Qr(this,"current")||this.setState({stateCurrent:t,stateCurrentInputValue:t})),this.__emit("update:pageSize",e),t!==n&&this.__emit("update:current",t),this.__emit("showSizeChange",t,e),this.__emit("change",t,e)},handleChange(e){const{disabled:t}=this.$props;let n=e;if(this.isValid(n)&&!t){const o=Vr(void 0,this.$data,this.$props);return n>o?n=o:n<1&&(n=1),Qr(this,"current")||this.setState({stateCurrent:n,stateCurrentInputValue:n}),this.__emit("update:current",n),this.__emit("change",n,this.statePageSize),n}return this.stateCurrent},prev(){this.hasPrev()&&this.handleChange(this.stateCurrent-1)},next(){this.hasNext()&&this.handleChange(this.stateCurrent+1)},jumpPrev(){this.handleChange(this.getJumpPrevPage())},jumpNext(){this.handleChange(this.getJumpNextPage())},hasPrev(){return this.stateCurrent>1},hasNext(){return this.stateCurrentn},runIfEnter(e,t){if(e.key==="Enter"||e.charCode===13){e.preventDefault();for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r0?b-1:0,N=b+1=F*2&&b!==3&&(w[0]=p(gl,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:G,page:G,class:`${e}-item-after-jump-prev`,active:!1,showTitle:this.showTitle,itemRender:u},null),w.unshift(P)),O-b>=F*2&&b!==O-2&&(w[w.length-1]=p(gl,{locale:r,rootPrefixCls:e,onClick:this.handleChange,onKeypress:this.runIfEnter,key:te,page:te,class:`${e}-item-before-jump-next`,active:!1,showTitle:this.showTitle,itemRender:u},null),w.push(T)),G!==1&&w.unshift(M),te!==O&&w.push(E)}let k=null;s&&(k=p("li",{class:`${e}-total-text`},[s(o,[o===0?0:(b-1)*S+1,b*S>o?o:b*S])]));const z=!B||!O,H=!L||!O,j=this.buildOptionText||this.$slots.buildOptionText;return p("ul",D(D({unselectable:"on",ref:"paginationNode"},C),{},{class:ce({[`${e}`]:!0,[`${e}-disabled`]:t},x)}),[k,p("li",{title:a?r.prev_page:null,onClick:this.prev,tabindex:z?null:0,onKeypress:this.runIfEnterPrev,class:ce(`${e}-prev`,{[`${e}-disabled`]:z}),"aria-disabled":z},[this.renderPrev(_)]),w,p("li",{title:a?r.next_page:null,onClick:this.next,tabindex:H?null:0,onKeypress:this.runIfEnterNext,class:ce(`${e}-next`,{[`${e}-disabled`]:H}),"aria-disabled":H},[this.renderNext(N)]),p(rre,{disabled:t,locale:r,rootPrefixCls:e,selectComponentClass:m,selectPrefixCls:g,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:b,pageSize:S,pageSizeOptions:y,buildOptionText:j||null,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:R},null)])}}),ure=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`&${t}-mini`]:{[` + &:hover ${t}-item:not(${t}-item-active), + &:active ${t}-item:not(${t}-item-active), + &:hover ${t}-item-link, + &:active ${t}-item-link + `]:{backgroundColor:"transparent"}},[`${t}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.paginationItemDisabledBgActive,"&:hover, &:active":{backgroundColor:e.paginationItemDisabledBgActive},a:{color:e.paginationItemDisabledColorActive}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}},[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{[`&${t}-disabled ${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},dre=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.paginationItemSizeSM,lineHeight:`${e.paginationItemSizeSM}px`},[`&${t}-mini ${t}-item`]:{minWidth:e.paginationItemSizeSM,height:e.paginationItemSizeSM,margin:0,lineHeight:`${e.paginationItemSizeSM-2}px`},[`&${t}-mini ${t}-item:not(${t}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.paginationItemSizeSM,height:e.paginationItemSizeSM,margin:0,lineHeight:`${e.paginationItemSizeSM}px`,[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}},[` + &${t}-mini ${t}-prev ${t}-item-link, + &${t}-mini ${t}-next ${t}-item-link + `]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.paginationItemSizeSM,lineHeight:`${e.paginationItemSizeSM}px`}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.paginationItemSizeSM,marginInlineEnd:0,lineHeight:`${e.paginationItemSizeSM}px`},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.paginationMiniOptionsSizeChangerTop},"&-quick-jumper":{height:e.paginationItemSizeSM,lineHeight:`${e.paginationItemSizeSM}px`,input:v(v({},R1(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},fre=e=>{const{componentCls:t}=e;return{[` + &${t}-simple ${t}-prev, + &${t}-simple ${t}-next + `]:{height:e.paginationItemSizeSM,lineHeight:`${e.paginationItemSizeSM}px`,verticalAlign:"top",[`${t}-item-link`]:{height:e.paginationItemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.paginationItemSizeSM,lineHeight:`${e.paginationItemSizeSM}px`}}},[`&${t}-simple ${t}-simple-pager`]:{display:"inline-block",height:e.paginationItemSizeSM,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:e.marginXS,padding:`0 ${e.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:e.paginationItemInputBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${e.inputOutlineOffset}px 0 ${e.controlOutlineWidth}px ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}}}},pre=e=>{const{componentCls:t}=e;return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}},"&:focus-visible":v({[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}},fi(e))},[` + ${t}-prev, + ${t}-jump-prev, + ${t}-jump-next + `]:{marginInlineEnd:e.marginXS},[` + ${t}-prev, + ${t}-next, + ${t}-jump-prev, + ${t}-jump-next + `]:{display:"inline-block",minWidth:e.paginationItemSize,height:e.paginationItemSize,color:e.colorText,fontFamily:e.paginationFontFamily,lineHeight:`${e.paginationItemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:focus-visible ${t}-item-link`]:v({},fi(e)),[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:`${e.controlHeight}px`,verticalAlign:"top",input:v(v({},pa(e)),{width:e.controlHeightLG*1.25,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},hre=e=>{const{componentCls:t}=e;return{[`${t}-item`]:v(v({display:"inline-block",minWidth:e.paginationItemSize,height:e.paginationItemSize,marginInlineEnd:e.marginXS,fontFamily:e.paginationFontFamily,lineHeight:`${e.paginationItemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${e.paginationItemPaddingInline}px`,color:e.colorText,transition:"none","&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}}},pi(e)),{"&-active":{fontWeight:e.paginationFontWeightActive,backgroundColor:e.paginationItemBgActive,borderColor:e.colorPrimary,a:{color:e.colorPrimary},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.colorPrimaryHover}}})}},gre=e=>{const{componentCls:t}=e;return{[t]:v(v(v(v(v(v(v(v({},Ze(e)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.paginationItemSize,marginInlineEnd:e.marginXS,lineHeight:`${e.paginationItemSize-2}px`,verticalAlign:"middle"}}),hre(e)),pre(e)),fre(e)),dre(e)),ure(e)),{[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}}),[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},mre=e=>{const{componentCls:t}=e;return{[`${t}${t}-disabled`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.paginationItemDisabledBgActive}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[t]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.paginationItemBg},[`${t}-item-link`]:{backgroundColor:e.paginationItemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.paginationItemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.paginationItemBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.paginationItemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},vre=Xe("Pagination",e=>{const t=Fe(e,{paginationItemSize:e.controlHeight,paginationFontFamily:e.fontFamily,paginationItemBg:e.colorBgContainer,paginationItemBgActive:e.colorBgContainer,paginationFontWeightActive:e.fontWeightStrong,paginationItemSizeSM:e.controlHeightSM,paginationItemInputBg:e.colorBgContainer,paginationMiniOptionsSizeChangerTop:0,paginationItemDisabledBgActive:e.controlItemBgActiveDisabled,paginationItemDisabledColorActive:e.colorTextDisabled,paginationItemLinkBg:e.colorBgContainer,inputOutlineOffset:"0 0",paginationMiniOptionsMarginInlineStart:e.marginXXS/2,paginationMiniQuickJumperInputWidth:e.controlHeightLG*1.1,paginationItemPaddingInline:e.marginXXS*1.5,paginationEllipsisLetterSpacing:e.marginXXS/2,paginationSlashMarginInlineStart:e.marginXXS,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},ha(e));return[gre(t),e.wireframe&&mre(t)]});var bre=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({total:Number,defaultCurrent:Number,disabled:Ce(),current:Number,defaultPageSize:Number,pageSize:Number,hideOnSinglePage:Ce(),showSizeChanger:Ce(),pageSizeOptions:ut(),buildOptionText:ve(),showQuickJumper:ze([Boolean,Object]),showTotal:ve(),size:Be(),simple:Ce(),locale:Object,prefixCls:String,selectPrefixCls:String,totalBoundaryShowSizeChanger:Number,selectComponentClass:String,itemRender:ve(),role:String,responsive:Boolean,showLessItems:Ce(),onChange:ve(),onShowSizeChange:ve(),"onUpdate:current":ve(),"onUpdate:pageSize":ve()}),Sre=re({compatConfig:{MODE:3},name:"APagination",inheritAttrs:!1,props:yre(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,configProvider:i,direction:l,size:a}=Ee("pagination",e),[s,c]=vre(r),u=I(()=>i.getPrefixCls("select",e.selectPrefixCls)),d=Ps(),[f]=Zo("Pagination",w6,We(e,"locale")),h=m=>{const g=p("span",{class:`${m}-item-ellipsis`},[vn("•••")]),y=p("button",{class:`${m}-item-link`,type:"button",tabindex:-1},[l.value==="rtl"?p(Ao,null,null):p(Lr,null,null)]),b=p("button",{class:`${m}-item-link`,type:"button",tabindex:-1},[l.value==="rtl"?p(Lr,null,null):p(Ao,null,null)]),S=p("a",{rel:"nofollow",class:`${m}-item-link`},[p("div",{class:`${m}-item-container`},[l.value==="rtl"?p(_p,{class:`${m}-item-link-icon`},null):p(Ep,{class:`${m}-item-link-icon`},null),g])]),$=p("a",{rel:"nofollow",class:`${m}-item-link`},[p("div",{class:`${m}-item-container`},[l.value==="rtl"?p(Ep,{class:`${m}-item-link-icon`},null):p(_p,{class:`${m}-item-link-icon`},null),g])]);return{prevIcon:y,nextIcon:b,jumpPrevIcon:S,jumpNextIcon:$}};return()=>{var m;const{itemRender:g=n.itemRender,buildOptionText:y=n.buildOptionText,selectComponentClass:b,responsive:S}=e,$=bre(e,["itemRender","buildOptionText","selectComponentClass","responsive"]),x=a.value==="small"||!!(!((m=d.value)===null||m===void 0)&&m.xs&&!a.value&&S),C=v(v(v(v(v({},$),h(r.value)),{prefixCls:r.value,selectPrefixCls:u.value,selectComponentClass:b||(x?nre:ore),locale:f.value,buildOptionText:y}),o),{class:ce({[`${r.value}-mini`]:x,[`${r.value}-rtl`]:l.value==="rtl"},o.class,c.value),itemRender:g});return s(p(cre,C,null))}}}),lg=At(Sre),$re=()=>({avatar:W.any,description:W.any,prefixCls:String,title:W.any}),VE=re({compatConfig:{MODE:3},name:"AListItemMeta",props:$re(),displayName:"AListItemMeta",__ANT_LIST_ITEM_META:!0,slots:Object,setup(e,t){let{slots:n}=t;const{prefixCls:o}=Ee("list",e);return()=>{var r,i,l,a,s,c;const u=`${o.value}-item-meta`,d=(r=e.title)!==null&&r!==void 0?r:(i=n.title)===null||i===void 0?void 0:i.call(n),f=(l=e.description)!==null&&l!==void 0?l:(a=n.description)===null||a===void 0?void 0:a.call(n),h=(s=e.avatar)!==null&&s!==void 0?s:(c=n.avatar)===null||c===void 0?void 0:c.call(n),m=p("div",{class:`${o.value}-item-meta-content`},[d&&p("h4",{class:`${o.value}-item-meta-title`},[d]),f&&p("div",{class:`${o.value}-item-meta-description`},[f])]);return p("div",{class:u},[h&&p("div",{class:`${o.value}-item-meta-avatar`},[h]),(d||f)&&m])}}}),WE=Symbol("ListContextKey");var Cre=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,extra:W.any,actions:W.array,grid:Object,colStyle:{type:Object,default:void 0}}),KE=re({compatConfig:{MODE:3},name:"AListItem",inheritAttrs:!1,Meta:VE,props:xre(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{itemLayout:r,grid:i}=Ke(WE,{grid:ie(),itemLayout:ie()}),{prefixCls:l}=Ee("list",e),a=()=>{var c;const u=((c=n.default)===null||c===void 0?void 0:c.call(n))||[];let d;return u.forEach(f=>{kD(f)&&!pu(f)&&(d=!0)}),d&&u.length>1},s=()=>{var c,u;const d=(c=e.extra)!==null&&c!==void 0?c:(u=n.extra)===null||u===void 0?void 0:u.call(n);return r.value==="vertical"?!!d:!a()};return()=>{var c,u,d,f,h;const{class:m}=o,g=Cre(o,["class"]),y=l.value,b=(c=e.extra)!==null&&c!==void 0?c:(u=n.extra)===null||u===void 0?void 0:u.call(n),S=(d=n.default)===null||d===void 0?void 0:d.call(n);let $=(f=e.actions)!==null&&f!==void 0?f:xt((h=n.actions)===null||h===void 0?void 0:h.call(n));$=$&&!Array.isArray($)?[$]:$;const x=$&&$.length>0&&p("ul",{class:`${y}-item-action`,key:"actions"},[$.map((w,P)=>p("li",{key:`${y}-item-action-${P}`},[w,P!==$.length-1&&p("em",{class:`${y}-item-action-split`},null)]))]),C=i.value?"div":"li",O=p(C,D(D({},g),{},{class:ce(`${y}-item`,{[`${y}-item-no-flex`]:!s()},m)}),{default:()=>[r.value==="vertical"&&b?[p("div",{class:`${y}-item-main`,key:"content"},[S,x]),p("div",{class:`${y}-item-extra`,key:"extra"},[b])]:[S,x,ht(b,{key:"extra"})]]});return i.value?p(Jh,{flex:1,style:e.colStyle},{default:()=>[O]}):O}}}),wre=e=>{const{listBorderedCls:t,componentCls:n,paddingLG:o,margin:r,padding:i,listItemPaddingSM:l,marginLG:a,borderRadiusLG:s}=e;return{[`${t}`]:{border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:s,[`${n}-header,${n}-footer,${n}-item`]:{paddingInline:o},[`${n}-pagination`]:{margin:`${r}px ${a}px`}},[`${t}${n}-sm`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:l}},[`${t}${n}-lg`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:`${i}px ${o}px`}}}},Ore=e=>{const{componentCls:t,screenSM:n,screenMD:o,marginLG:r,marginSM:i,margin:l}=e;return{[`@media screen and (max-width:${o})`]:{[`${t}`]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:r}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:r}}}},[`@media screen and (max-width: ${n})`]:{[`${t}`]:{[`${t}-item`]:{flexWrap:"wrap",[`${t}-action`]:{marginInlineStart:i}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:"wrap-reverse",[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${l}px`}}}}}},Pre=e=>{const{componentCls:t,antCls:n,controlHeight:o,minHeight:r,paddingSM:i,marginLG:l,padding:a,listItemPadding:s,colorPrimary:c,listItemPaddingSM:u,listItemPaddingLG:d,paddingXS:f,margin:h,colorText:m,colorTextDescription:g,motionDurationSlow:y,lineWidth:b}=e;return{[`${t}`]:v(v({},Ze(e)),{position:"relative","*":{outline:"none"},[`${t}-header, ${t}-footer`]:{background:"transparent",paddingBlock:i},[`${t}-pagination`]:{marginBlockStart:l,textAlign:"end",[`${n}-pagination-options`]:{textAlign:"start"}},[`${t}-spin`]:{minHeight:r,textAlign:"center"},[`${t}-items`]:{margin:0,padding:0,listStyle:"none"},[`${t}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:s,color:m,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:a},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:m},[`${t}-item-meta-title`]:{marginBottom:e.marginXXS,color:m,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:m,transition:`all ${y}`,"&:hover":{color:c}}},[`${t}-item-meta-description`]:{color:g,fontSize:e.fontSize,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${f}px`,color:g,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:b,height:Math.ceil(e.fontSize*e.lineHeight)-e.marginXXS*2,transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${a}px 0`,color:g,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:a,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},[`${t}-item-no-flex`]:{display:"block"}}),[`${t}-grid ${n}-col > ${t}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:h,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:l},[`${t}-item-meta`]:{marginBlockEnd:a,[`${t}-item-meta-title`]:{marginBlockEnd:i,color:m,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:a,marginInlineStart:"auto","> li":{padding:`0 ${a}px`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:o},[`${t}-split${t}-something-after-last-item ${n}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:d},[`${t}-sm ${t}-item`]:{padding:u},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}},Ire=Xe("List",e=>{const t=Fe(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG,listItemPadding:`${e.paddingContentVertical}px ${e.paddingContentHorizontalLG}px`,listItemPaddingSM:`${e.paddingContentVerticalSM}px ${e.paddingContentHorizontal}px`,listItemPaddingLG:`${e.paddingContentVerticalLG}px ${e.paddingContentHorizontalLG}px`});return[Pre(t),wre(t),Ore(t)]},{contentWidth:220}),Tre=()=>({bordered:Ce(),dataSource:ut(),extra:Ln(),grid:Ne(),itemLayout:String,loading:ze([Boolean,Object]),loadMore:Ln(),pagination:ze([Boolean,Object]),prefixCls:String,rowKey:ze([String,Number,Function]),renderItem:ve(),size:String,split:Ce(),header:Ln(),footer:Ln(),locale:Ne()}),_i=re({compatConfig:{MODE:3},name:"AList",inheritAttrs:!1,Item:KE,props:et(Tre(),{dataSource:[],bordered:!1,split:!0,loading:!1,pagination:!1}),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;var r,i;qe(WE,{grid:We(e,"grid"),itemLayout:We(e,"itemLayout")});const l={current:1,total:0},{prefixCls:a,direction:s,renderEmpty:c}=Ee("list",e),[u,d]=Ire(a),f=I(()=>e.pagination&&typeof e.pagination=="object"?e.pagination:{}),h=ie((r=f.value.defaultCurrent)!==null&&r!==void 0?r:1),m=ie((i=f.value.defaultPageSize)!==null&&i!==void 0?i:10);Se(f,()=>{"current"in f.value&&(h.value=f.value.current),"pageSize"in f.value&&(m.value=f.value.pageSize)});const g=[],y=R=>(F,_)=>{h.value=F,m.value=_,f.value[R]&&f.value[R](F,_)},b=y("onChange"),S=y("onShowSizeChange"),$=I(()=>typeof e.loading=="boolean"?{spinning:e.loading}:e.loading),x=I(()=>$.value&&$.value.spinning),C=I(()=>{let R="";switch(e.size){case"large":R="lg";break;case"small":R="sm";break}return R}),O=I(()=>({[`${a.value}`]:!0,[`${a.value}-vertical`]:e.itemLayout==="vertical",[`${a.value}-${C.value}`]:C.value,[`${a.value}-split`]:e.split,[`${a.value}-bordered`]:e.bordered,[`${a.value}-loading`]:x.value,[`${a.value}-grid`]:!!e.grid,[`${a.value}-rtl`]:s.value==="rtl"})),w=I(()=>{const R=v(v(v({},l),{total:e.dataSource.length,current:h.value,pageSize:m.value}),e.pagination||{}),F=Math.ceil(R.total/R.pageSize);return R.current>F&&(R.current=F),R}),P=I(()=>{let R=[...e.dataSource];return e.pagination&&e.dataSource.length>(w.value.current-1)*w.value.pageSize&&(R=[...e.dataSource].splice((w.value.current-1)*w.value.pageSize,w.value.pageSize)),R}),T=Ps(),M=xo(()=>{for(let R=0;R{if(!e.grid)return;const R=M.value&&e.grid[M.value]?e.grid[M.value]:e.grid.column;if(R)return{width:`${100/R}%`,maxWidth:`${100/R}%`}}),A=(R,F)=>{var _;const N=(_=e.renderItem)!==null&&_!==void 0?_:n.renderItem;if(!N)return null;let B;const L=typeof e.rowKey;return L==="function"?B=e.rowKey(R):L==="string"||L==="number"?B=R[e.rowKey]:B=R.key,B||(B=`list-item-${F}`),g[F]=B,N({item:R,index:F})};return()=>{var R,F,_,N,B,L,k,z;const H=(R=e.loadMore)!==null&&R!==void 0?R:(F=n.loadMore)===null||F===void 0?void 0:F.call(n),j=(_=e.footer)!==null&&_!==void 0?_:(N=n.footer)===null||N===void 0?void 0:N.call(n),Y=(B=e.header)!==null&&B!==void 0?B:(L=n.header)===null||L===void 0?void 0:L.call(n),Z=xt((k=n.default)===null||k===void 0?void 0:k.call(n)),G=!!(H||e.pagination||j),te=ce(v(v({},O.value),{[`${a.value}-something-after-last-item`]:G}),o.class,d.value),U=e.pagination?p("div",{class:`${a.value}-pagination`},[p(lg,D(D({},w.value),{},{onChange:b,onShowSizeChange:S}),null)]):null;let Q=x.value&&p("div",{style:{minHeight:"53px"}},null);if(P.value.length>0){g.length=0;const X=P.value.map((V,K)=>A(V,K)),q=X.map((V,K)=>p("div",{key:g[K],style:E.value},[V]));Q=e.grid?p(G1,{gutter:e.grid.gutter},{default:()=>[q]}):p("ul",{class:`${a.value}-items`},[X])}else!Z.length&&!x.value&&(Q=p("div",{class:`${a.value}-empty-text`},[((z=e.locale)===null||z===void 0?void 0:z.emptyText)||c("List")]));const J=w.value.position||"bottom";return u(p("div",D(D({},o),{},{class:te}),[(J==="top"||J==="both")&&U,Y&&p("div",{class:`${a.value}-header`},[Y]),p(Dr,$.value,{default:()=>[Q,Z]}),j&&p("div",{class:`${a.value}-footer`},[j]),H||(J==="bottom"||J==="both")&&U]))}}});_i.install=function(e){return e.component(_i.name,_i),e.component(_i.Item.name,_i.Item),e.component(_i.Item.Meta.name,_i.Item.Meta),e};function Ere(e){const{selectionStart:t}=e;return e.value.slice(0,t)}function _re(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(Array.isArray(t)?t:[t]).reduce((o,r)=>{const i=e.lastIndexOf(r);return i>o.location?{location:i,prefix:r}:o},{location:-1,prefix:""})}function s4(e){return(e||"").toLowerCase()}function Mre(e,t,n){const o=e[0];if(!o||o===n)return e;let r=e;const i=t.length;for(let l=0;l[]}},setup(e,t){let{slots:n}=t;const{activeIndex:o,setActiveIndex:r,selectOption:i,onFocus:l=Bre,loading:a}=Ke(UE,{activeIndex:oe(),loading:oe(!1)});let s;const c=u=>{clearTimeout(s),s=setTimeout(()=>{l(u)})};return tt(()=>{clearTimeout(s)}),()=>{var u;const{prefixCls:d,options:f}=e,h=f[o.value]||{};return p(Xt,{prefixCls:`${d}-menu`,activeKey:h.value,onSelect:m=>{let{key:g}=m;const y=f.find(b=>{let{value:S}=b;return S===g});i(y)},onMousedown:c},{default:()=>[!a.value&&f.map((m,g)=>{var y,b;const{value:S,disabled:$,label:x=m.value,class:C,style:O}=m;return p(Rr,{key:S,disabled:$,onMouseenter:()=>{r(g)},class:C,style:O},{default:()=>[(b=(y=n.option)===null||y===void 0?void 0:y.call(n,m))!==null&&b!==void 0?b:typeof x=="function"?x(m):x]})}),!a.value&&f.length===0?p(Rr,{key:"notFoundContent",disabled:!0},{default:()=>[(u=n.notFoundContent)===null||u===void 0?void 0:u.call(n)]}):null,a.value&&p(Rr,{key:"loading",disabled:!0},{default:()=>[p(Dr,{size:"small"},null)]})]})}}}),kre={bottomRight:{points:["tl","br"],offset:[0,4],overflow:{adjustX:0,adjustY:1}},bottomLeft:{points:["tr","bl"],offset:[0,4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["bl","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topLeft:{points:["br","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}},Fre=re({compatConfig:{MODE:3},name:"KeywordTrigger",props:{loading:{type:Boolean,default:void 0},options:{type:Array,default:()=>[]},prefixCls:String,placement:String,visible:{type:Boolean,default:void 0},transitionName:String,getPopupContainer:Function,direction:String,dropdownClassName:String},setup(e,t){let{slots:n}=t;const o=()=>`${e.prefixCls}-dropdown`,r=()=>{const{options:l}=e;return p(Lre,{prefixCls:o(),options:l},{notFoundContent:n.notFoundContent,option:n.option})},i=I(()=>{const{placement:l,direction:a}=e;let s="topRight";return a==="rtl"?s=l==="top"?"topLeft":"bottomLeft":s=l==="top"?"topRight":"bottomRight",s});return()=>{const{visible:l,transitionName:a,getPopupContainer:s}=e;return p(ca,{prefixCls:o(),popupVisible:l,popup:r(),popupClassName:e.dropdownClassName,popupPlacement:i.value,popupTransitionName:a,builtinPlacements:kre,getPopupContainer:s},{default:n.default})}}}),zre=Mn("top","bottom"),GE={autofocus:{type:Boolean,default:void 0},prefix:W.oneOfType([W.string,W.arrayOf(W.string)]),prefixCls:String,value:String,disabled:{type:Boolean,default:void 0},split:String,transitionName:String,placement:W.oneOf(zre),character:W.any,characterRender:Function,filterOption:{type:[Boolean,Function]},validateSearch:Function,getPopupContainer:{type:Function},options:ut(),loading:{type:Boolean,default:void 0},rows:[Number,String],direction:{type:String}},XE=v(v({},GE),{dropdownClassName:String}),YE={prefix:"@",split:" ",rows:1,validateSearch:Dre,filterOption:()=>Nre};et(XE,YE);var c4=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{c.value=e.value});const u=E=>{n("change",E)},d=E=>{let{target:{value:A}}=E;u(A)},f=(E,A,R)=>{v(c,{measuring:!0,measureText:E,measurePrefix:A,measureLocation:R,activeIndex:0})},h=E=>{v(c,{measuring:!1,measureLocation:0,measureText:null}),E==null||E()},m=E=>{const{which:A}=E;if(c.measuring){if(A===Ie.UP||A===Ie.DOWN){const R=P.value.length,F=A===Ie.UP?-1:1,_=(c.activeIndex+F+R)%R;c.activeIndex=_,E.preventDefault()}else if(A===Ie.ESC)h();else if(A===Ie.ENTER){if(E.preventDefault(),!P.value.length){h();return}const R=P.value[c.activeIndex];C(R)}}},g=E=>{const{key:A,which:R}=E,{measureText:F,measuring:_}=c,{prefix:N,validateSearch:B}=e,L=E.target;if(L.composing)return;const k=Ere(L),{location:z,prefix:H}=_re(k,N);if([Ie.ESC,Ie.UP,Ie.DOWN,Ie.ENTER].indexOf(R)===-1)if(z!==-1){const j=k.slice(z+H.length),Y=B(j,e),Z=!!w(j).length;Y?(A===H||A==="Shift"||_||j!==F&&Z)&&f(j,H,z):_&&h(),Y&&n("search",j,H)}else _&&h()},y=E=>{c.measuring||n("pressenter",E)},b=E=>{$(E)},S=E=>{x(E)},$=E=>{clearTimeout(s.value);const{isFocus:A}=c;!A&&E&&n("focus",E),c.isFocus=!0},x=E=>{s.value=setTimeout(()=>{c.isFocus=!1,h(),n("blur",E)},100)},C=E=>{const{split:A}=e,{value:R=""}=E,{text:F,selectionLocation:_}=Are(c.value,{measureLocation:c.measureLocation,targetText:R,prefix:c.measurePrefix,selectionStart:a.value.getSelectionStart(),split:A});u(F),h(()=>{Rre(a.value.input,_)}),n("select",E,c.measurePrefix)},O=E=>{c.activeIndex=E},w=E=>{const A=E||c.measureText||"",{filterOption:R}=e;return e.options.filter(_=>R?R(A,_):!0)},P=I(()=>w());return r({blur:()=>{a.value.blur()},focus:()=>{a.value.focus()}}),qe(UE,{activeIndex:We(c,"activeIndex"),setActiveIndex:O,selectOption:C,onFocus:$,onBlur:x,loading:We(e,"loading")}),Vn(()=>{lt(()=>{c.measuring&&(l.value.scrollTop=a.value.getScrollTop())})}),()=>{const{measureLocation:E,measurePrefix:A,measuring:R}=c,{prefixCls:F,placement:_,transitionName:N,getPopupContainer:B,direction:L}=e,k=c4(e,["prefixCls","placement","transitionName","getPopupContainer","direction"]),{class:z,style:H}=o,j=c4(o,["class","style"]),Y=rt(k,["value","prefix","split","validateSearch","filterOption","options","loading"]),Z=v(v(v({},Y),j),{onChange:u4,onSelect:u4,value:c.value,onInput:d,onBlur:S,onKeydown:m,onKeyup:g,onFocus:b,onPressenter:y});return p("div",{class:ce(F,z),style:H},[p($s,D(D({},Z),{},{ref:a,tag:"textarea"}),null),R&&p("div",{ref:l,class:`${F}-measure`},[c.value.slice(0,E),p(Fre,{prefixCls:F,transitionName:N,dropdownClassName:e.dropdownClassName,placement:_,options:R?P.value:[],visible:!0,direction:L,getPopupContainer:B},{default:()=>[p("span",null,[A])],notFoundContent:i.notFoundContent,option:i.option}),c.value.slice(E+A.length)])])}}}),jre={value:String,disabled:Boolean,payload:Ne()},qE=v(v({},jre),{label:wt([])}),ZE={name:"Option",props:qE,render(e,t){let{slots:n}=t;var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}};v({compatConfig:{MODE:3}},ZE);const Vre=e=>{const{componentCls:t,colorTextDisabled:n,controlItemBgHover:o,controlPaddingHorizontal:r,colorText:i,motionDurationSlow:l,lineHeight:a,controlHeight:s,inputPaddingHorizontal:c,inputPaddingVertical:u,fontSize:d,colorBgElevated:f,borderRadiusLG:h,boxShadowSecondary:m}=e,g=Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2);return{[t]:v(v(v(v(v({},Ze(e)),pa(e)),{position:"relative",display:"inline-block",height:"auto",padding:0,overflow:"hidden",lineHeight:a,whiteSpace:"pre-wrap",verticalAlign:"bottom"}),Pu(e,t)),{"&-disabled":{"> textarea":v({},A1(e))},"&-focused":v({},Yi(e)),[`&-affix-wrapper ${t}-suffix`]:{position:"absolute",top:0,insetInlineEnd:c,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto"},[`> textarea, ${t}-measure`]:{color:i,boxSizing:"border-box",minHeight:s-2,margin:0,padding:`${u}px ${c}px`,overflow:"inherit",overflowX:"hidden",overflowY:"auto",fontWeight:"inherit",fontSize:"inherit",fontFamily:"inherit",fontStyle:"inherit",fontVariant:"inherit",fontSizeAdjust:"inherit",fontStretch:"inherit",lineHeight:"inherit",direction:"inherit",letterSpacing:"inherit",whiteSpace:"inherit",textAlign:"inherit",verticalAlign:"top",wordWrap:"break-word",wordBreak:"inherit",tabSize:"inherit"},"> textarea":v({width:"100%",border:"none",outline:"none",resize:"none",backgroundColor:"inherit"},M1(e.colorTextPlaceholder)),[`${t}-measure`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:-1,color:"transparent",pointerEvents:"none","> span":{display:"inline-block",minHeight:"1em"}},"&-dropdown":v(v({},Ze(e)),{position:"absolute",top:-9999,insetInlineStart:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",fontSize:d,fontVariant:"initial",backgroundColor:f,borderRadius:h,outline:"none",boxShadow:m,"&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.dropdownHeight,marginBottom:0,paddingInlineStart:0,overflow:"auto",listStyle:"none",outline:"none","&-item":v(v({},Zt),{position:"relative",display:"block",minWidth:e.controlItemWidth,padding:`${g}px ${r}px`,color:i,fontWeight:"normal",lineHeight:a,cursor:"pointer",transition:`background ${l} ease`,"&:hover":{backgroundColor:o},"&:first-child":{borderStartStartRadius:h,borderStartEndRadius:h,borderEndStartRadius:0,borderEndEndRadius:0},"&:last-child":{borderStartStartRadius:0,borderStartEndRadius:0,borderEndStartRadius:h,borderEndEndRadius:h},"&-disabled":{color:n,cursor:"not-allowed","&:hover":{color:n,backgroundColor:o,cursor:"not-allowed"}},"&-selected":{color:i,fontWeight:e.fontWeightStrong,backgroundColor:o},"&-active":{backgroundColor:o}})}})})}},Wre=Xe("Mentions",e=>{const t=ha(e);return[Vre(t)]},e=>({dropdownHeight:250,controlItemWidth:100,zIndexPopup:e.zIndexPopupBase+50}));var d4=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{prefix:n="@",split:o=" "}=t,r=Array.isArray(n)?n:[n];return e.split(o).map(function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",l=null;return r.some(a=>i.slice(0,a.length)===a?(l=a,!0):!1),l!==null?{prefix:l,value:i.slice(l.length)}:null}).filter(i=>!!i&&!!i.value)},Gre=()=>v(v({},GE),{loading:{type:Boolean,default:void 0},onFocus:{type:Function},onBlur:{type:Function},onSelect:{type:Function},onChange:{type:Function},onPressenter:{type:Function},"onUpdate:value":{type:Function},notFoundContent:W.any,defaultValue:String,id:String,status:String}),Xm=re({compatConfig:{MODE:3},name:"AMentions",inheritAttrs:!1,props:Gre(),slots:Object,setup(e,t){let{slots:n,emit:o,attrs:r,expose:i}=t;var l,a;const{prefixCls:s,renderEmpty:c,direction:u}=Ee("mentions",e),[d,f]=Wre(s),h=oe(!1),m=oe(null),g=oe((a=(l=e.value)!==null&&l!==void 0?l:e.defaultValue)!==null&&a!==void 0?a:""),y=ln(),b=yn.useInject(),S=I(()=>gr(b.status,e.status));i1({prefixCls:I(()=>`${s.value}-menu`),mode:I(()=>"vertical"),selectable:I(()=>!1),onClick:()=>{},validator:A=>{let{mode:R}=A}}),Se(()=>e.value,A=>{g.value=A});const $=A=>{h.value=!0,o("focus",A)},x=A=>{h.value=!1,o("blur",A),y.onFieldBlur()},C=function(){for(var A=arguments.length,R=new Array(A),F=0;F{e.value===void 0&&(g.value=A),o("update:value",A),o("change",A),y.onFieldChange()},w=()=>{const A=e.notFoundContent;return A!==void 0?A:n.notFoundContent?n.notFoundContent():c("Select")},P=()=>{var A;return xt(((A=n.default)===null||A===void 0?void 0:A.call(n))||[]).map(R=>{var F,_;return v(v({},p6(R)),{label:(_=(F=R.children)===null||F===void 0?void 0:F.default)===null||_===void 0?void 0:_.call(F)})})};i({focus:()=>{m.value.focus()},blur:()=>{m.value.blur()}});const E=I(()=>e.loading?Kre:e.filterOption);return()=>{const{disabled:A,getPopupContainer:R,rows:F=1,id:_=y.id.value}=e,N=d4(e,["disabled","getPopupContainer","rows","id"]),{hasFeedback:B,feedbackIcon:L}=b,{class:k}=r,z=d4(r,["class"]),H=rt(N,["defaultValue","onUpdate:value","prefixCls"]),j=ce({[`${s.value}-disabled`]:A,[`${s.value}-focused`]:h.value,[`${s.value}-rtl`]:u.value==="rtl"},Fn(s.value,S.value),!B&&k,f.value),Y=v(v(v(v({prefixCls:s.value},H),{disabled:A,direction:u.value,filterOption:E.value,getPopupContainer:R,options:e.loading?[{value:"ANTDV_SEARCHING",disabled:!0,label:p(Dr,{size:"small"},null)}]:e.options||P(),class:j}),z),{rows:F,onChange:O,onSelect:C,onFocus:$,onBlur:x,ref:m,value:g.value,id:_}),Z=p(Hre,D(D({},Y),{},{dropdownClassName:f.value}),{notFoundContent:w,option:n.option});return d(B?p("div",{class:ce(`${s.value}-affix-wrapper`,Fn(`${s.value}-affix-wrapper`,S.value,B),k,f.value)},[Z,p("span",{class:`${s.value}-suffix`},[L])]):Z)}}}),sf=re(v(v({compatConfig:{MODE:3}},ZE),{name:"AMentionsOption",props:qE})),Xre=v(Xm,{Option:sf,getMentions:Ure,install:e=>(e.component(Xm.name,Xm),e.component(sf.name,sf),e)});var Yre=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{W0={x:e.pageX,y:e.pageY},setTimeout(()=>W0=null,100)};w5()&&Dt(document.documentElement,"click",qre,!0);const Zre=()=>({prefixCls:String,visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},confirmLoading:{type:Boolean,default:void 0},title:W.any,closable:{type:Boolean,default:void 0},closeIcon:W.any,onOk:Function,onCancel:Function,"onUpdate:visible":Function,"onUpdate:open":Function,onChange:Function,afterClose:Function,centered:{type:Boolean,default:void 0},width:[String,Number],footer:W.any,okText:W.any,okType:String,cancelText:W.any,icon:W.any,maskClosable:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},okButtonProps:Ne(),cancelButtonProps:Ne(),destroyOnClose:{type:Boolean,default:void 0},wrapClassName:String,maskTransitionName:String,transitionName:String,getContainer:{type:[String,Function,Boolean,Object],default:void 0},zIndex:Number,bodyStyle:Ne(),maskStyle:Ne(),mask:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},wrapProps:Object,focusTriggerAfterClose:{type:Boolean,default:void 0},modalRender:Function,mousePosition:Ne()}),fn=re({compatConfig:{MODE:3},name:"AModal",inheritAttrs:!1,props:et(Zre(),{width:520,confirmLoading:!1,okType:"primary"}),setup(e,t){let{emit:n,slots:o,attrs:r}=t;const[i]=Zo("Modal"),{prefixCls:l,rootPrefixCls:a,direction:s,getPopupContainer:c}=Ee("modal",e),[u,d]=loe(l);Eo(e.visible===void 0);const f=g=>{n("update:visible",!1),n("update:open",!1),n("cancel",g),n("change",!1)},h=g=>{n("ok",g)},m=()=>{var g,y;const{okText:b=(g=o.okText)===null||g===void 0?void 0:g.call(o),okType:S,cancelText:$=(y=o.cancelText)===null||y===void 0?void 0:y.call(o),confirmLoading:x}=e;return p(He,null,[p(Wt,D({onClick:f},e.cancelButtonProps),{default:()=>[$||i.value.cancelText]}),p(Wt,D(D({},lp(S)),{},{loading:x,onClick:h},e.okButtonProps),{default:()=>[b||i.value.okText]})])};return()=>{var g,y;const{prefixCls:b,visible:S,open:$,wrapClassName:x,centered:C,getContainer:O,closeIcon:w=(g=o.closeIcon)===null||g===void 0?void 0:g.call(o),focusTriggerAfterClose:P=!0}=e,T=Yre(e,["prefixCls","visible","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose"]),M=ce(x,{[`${l.value}-centered`]:!!C,[`${l.value}-wrap-rtl`]:s.value==="rtl"});return u(p(ME,D(D(D({},T),r),{},{rootClassName:d.value,class:ce(d.value,r.class),getContainer:O||(c==null?void 0:c.value),prefixCls:l.value,wrapClassName:M,visible:$??S,onClose:f,focusTriggerAfterClose:P,transitionName:jn(a.value,"zoom",e.transitionName),maskTransitionName:jn(a.value,"fade",e.maskTransitionName),mousePosition:(y=T.mousePosition)!==null&&y!==void 0?y:W0}),v(v({},o),{footer:o.footer||m,closeIcon:()=>p("span",{class:`${l.value}-close-x`},[w||p(Kn,{class:`${l.value}-close-icon`},null)])})))}}}),JE=()=>{const e=oe(!1);return tt(()=>{e.value=!0}),e},Jre={type:{type:String},actionFn:Function,close:Function,autofocus:Boolean,prefixCls:String,buttonProps:Ne(),emitEvent:Boolean,quitOnNullishReturnValue:Boolean};function f4(e){return!!(e&&e.then)}const K0=re({compatConfig:{MODE:3},name:"ActionButton",props:Jre,setup(e,t){let{slots:n}=t;const o=oe(!1),r=oe(),i=oe(!1);let l;const a=JE();Ue(()=>{e.autofocus&&(l=setTimeout(()=>{var d,f;return(f=(d=to(r.value))===null||d===void 0?void 0:d.focus)===null||f===void 0?void 0:f.call(d)}))}),tt(()=>{clearTimeout(l)});const s=function(){for(var d,f=arguments.length,h=new Array(f),m=0;m{f4(d)&&(i.value=!0,d.then(function(){a.value||(i.value=!1),s(...arguments),o.value=!1},f=>(a.value||(i.value=!1),o.value=!1,Promise.reject(f))))},u=d=>{const{actionFn:f}=e;if(o.value)return;if(o.value=!0,!f){s();return}let h;if(e.emitEvent){if(h=f(d),e.quitOnNullishReturnValue&&!f4(h)){o.value=!1,s(d);return}}else if(f.length)h=f(e.close),o.value=!1;else if(h=f(),!h){s();return}c(h)};return()=>{const{type:d,prefixCls:f,buttonProps:h}=e;return p(Wt,D(D(D({},lp(d)),{},{onClick:u,loading:i.value,prefixCls:f},h),{},{ref:r}),n)}}});function Ca(e){return typeof e=="function"?e():e}const QE=re({name:"ConfirmDialog",inheritAttrs:!1,props:["icon","onCancel","onOk","close","closable","zIndex","afterClose","visible","open","keyboard","centered","getContainer","maskStyle","okButtonProps","cancelButtonProps","okType","prefixCls","okCancel","width","mask","maskClosable","okText","cancelText","autoFocusButton","transitionName","maskTransitionName","type","title","content","direction","rootPrefixCls","bodyStyle","closeIcon","modalRender","focusTriggerAfterClose","wrapClassName","confirmPrefixCls","footer"],setup(e,t){let{attrs:n}=t;const[o]=Zo("Modal");return()=>{const{icon:r,onCancel:i,onOk:l,close:a,okText:s,closable:c=!1,zIndex:u,afterClose:d,keyboard:f,centered:h,getContainer:m,maskStyle:g,okButtonProps:y,cancelButtonProps:b,okCancel:S,width:$=416,mask:x=!0,maskClosable:C=!1,type:O,open:w,title:P,content:T,direction:M,closeIcon:E,modalRender:A,focusTriggerAfterClose:R,rootPrefixCls:F,bodyStyle:_,wrapClassName:N,footer:B}=e;let L=r;if(!r&&r!==null)switch(O){case"info":L=p(rl,null,null);break;case"success":L=p(mr,null,null);break;case"error":L=p(Un,null,null);break;default:L=p(vr,null,null)}const k=e.okType||"primary",z=e.prefixCls||"ant-modal",H=`${z}-confirm`,j=n.style||{},Y=S??O==="confirm",Z=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",G=`${z}-confirm`,te=ce(G,`${G}-${e.type}`,{[`${G}-rtl`]:M==="rtl"},n.class),U=o.value,Q=Y&&p(K0,{actionFn:i,close:a,autofocus:Z==="cancel",buttonProps:b,prefixCls:`${F}-btn`},{default:()=>[Ca(e.cancelText)||U.cancelText]});return p(fn,{prefixCls:z,class:te,wrapClassName:ce({[`${G}-centered`]:!!h},N),onCancel:J=>a==null?void 0:a({triggerCancel:!0},J),open:w,title:"",footer:"",transitionName:jn(F,"zoom",e.transitionName),maskTransitionName:jn(F,"fade",e.maskTransitionName),mask:x,maskClosable:C,maskStyle:g,style:j,bodyStyle:_,width:$,zIndex:u,afterClose:d,keyboard:f,centered:h,getContainer:m,closable:c,closeIcon:E,modalRender:A,focusTriggerAfterClose:R},{default:()=>[p("div",{class:`${H}-body-wrapper`},[p("div",{class:`${H}-body`},[Ca(L),P===void 0?null:p("span",{class:`${H}-title`},[Ca(P)]),p("div",{class:`${H}-content`},[Ca(T)])]),B!==void 0?Ca(B):p("div",{class:`${H}-btns`},[Q,p(K0,{type:k,actionFn:l,close:a,autofocus:Z==="ok",buttonProps:y,prefixCls:`${F}-btn`},{default:()=>[Ca(s)||(Y?U.okText:U.justOkText)]})])])]})}}}),El=[],Ru=e=>{const t=document.createDocumentFragment();let n=v(v({},rt(e,["parentContext","appContext"])),{close:i,open:!0}),o=null;function r(){o&&(Xi(null,t),o=null);for(var c=arguments.length,u=new Array(c),d=0;dh&&h.triggerCancel);e.onCancel&&f&&e.onCancel(()=>{},...u.slice(1));for(let h=0;h{typeof e.afterClose=="function"&&e.afterClose(),r.apply(this,u)}}),n.visible&&delete n.visible,l(n)}function l(c){typeof c=="function"?n=c(n):n=v(v({},n),c),o&&YB(o,n,t)}const a=c=>{const u=Pn,d=u.prefixCls,f=c.prefixCls||`${d}-modal`,h=u.iconPrefixCls,m=see();return p(Fl,D(D({},u),{},{prefixCls:d}),{default:()=>[p(QE,D(D({},c),{},{rootPrefixCls:d,prefixCls:f,iconPrefixCls:h,locale:m,cancelText:c.cancelText||m.cancelText}),null)]})};function s(c){const u=p(a,v({},c));return u.appContext=e.parentContext||e.appContext||u.appContext,Xi(u,t),u}return o=s(n),El.push(i),{destroy:i,update:l}};function e_(e){return v(v({},e),{type:"warning"})}function t_(e){return v(v({},e),{type:"info"})}function n_(e){return v(v({},e),{type:"success"})}function o_(e){return v(v({},e),{type:"error"})}function r_(e){return v(v({},e),{type:"confirm"})}const Qre=()=>({config:Object,afterClose:Function,destroyAction:Function,open:Boolean}),eie=re({name:"HookModal",inheritAttrs:!1,props:et(Qre(),{config:{width:520,okType:"primary"}}),setup(e,t){let{expose:n}=t;var o;const r=I(()=>e.open),i=I(()=>e.config),{direction:l,getPrefixCls:a}=lh(),s=a("modal"),c=a(),u=()=>{var m,g;e==null||e.afterClose(),(g=(m=i.value).afterClose)===null||g===void 0||g.call(m)},d=function(){e.destroyAction(...arguments)};n({destroy:d});const f=(o=i.value.okCancel)!==null&&o!==void 0?o:i.value.type==="confirm",[h]=Zo("Modal",ro.Modal);return()=>p(QE,D(D({prefixCls:s,rootPrefixCls:c},i.value),{},{close:d,open:r.value,afterClose:u,okText:i.value.okText||(f?h==null?void 0:h.value.okText:h==null?void 0:h.value.justOkText),direction:i.value.direction||l.value,cancelText:i.value.cancelText||(h==null?void 0:h.value.cancelText)}),null)}});let p4=0;const tie=re({name:"ElementsHolder",inheritAttrs:!1,setup(e,t){let{expose:n}=t;const o=oe([]);return n({addModal:i=>(o.value.push(i),o.value=o.value.slice(),()=>{o.value=o.value.filter(l=>l!==i)})}),()=>o.value.map(i=>i())}});function i_(){const e=oe(null),t=oe([]);Se(t,()=>{t.value.length&&([...t.value].forEach(l=>{l()}),t.value=[])},{immediate:!0});const n=i=>function(a){var s;p4+=1;const c=oe(!0),u=oe(null),d=oe(ct(a)),f=oe({});Se(()=>a,$=>{y(v(v({},jt($)?$.value:$),f.value))});const h=function(){c.value=!1;for(var $=arguments.length,x=new Array($),C=0;C<$;C++)x[C]=arguments[C];const O=x.some(w=>w&&w.triggerCancel);d.value.onCancel&&O&&d.value.onCancel(()=>{},...x.slice(1))};let m;const g=()=>p(eie,{key:`modal-${p4}`,config:i(d.value),ref:u,open:c.value,destroyAction:h,afterClose:()=>{m==null||m()}},null);m=(s=e.value)===null||s===void 0?void 0:s.addModal(g),m&&El.push(m);const y=$=>{d.value=v(v({},d.value),$)};return{destroy:()=>{u.value?h():t.value=[...t.value,h]},update:$=>{f.value=$,u.value?y($):t.value=[...t.value,()=>y($)]}}},o=I(()=>({info:n(t_),success:n(n_),error:n(o_),warning:n(e_),confirm:n(r_)})),r=Symbol("modalHolderKey");return[o.value,()=>p(tie,{key:r,ref:e},null)]}function l_(e){return Ru(e_(e))}fn.useModal=i_;fn.info=function(t){return Ru(t_(t))};fn.success=function(t){return Ru(n_(t))};fn.error=function(t){return Ru(o_(t))};fn.warning=l_;fn.warn=l_;fn.confirm=function(t){return Ru(r_(t))};fn.destroyAll=function(){for(;El.length;){const t=El.pop();t&&t()}};fn.install=function(e){return e.component(fn.name,fn),e};const a_=e=>{const{value:t,formatter:n,precision:o,decimalSeparator:r,groupSeparator:i="",prefixCls:l}=e;let a;if(typeof n=="function")a=n({value:t});else{const s=String(t),c=s.match(/^(-?)(\d*)(\.(\d+))?$/);if(!c)a=s;else{const u=c[1];let d=c[2]||"0",f=c[4]||"";d=d.replace(/\B(?=(\d{3})+(?!\d))/g,i),typeof o=="number"&&(f=f.padEnd(o,"0").slice(0,o>0?o:0)),f&&(f=`${r}${f}`),a=[p("span",{key:"int",class:`${l}-content-value-int`},[u,d]),f&&p("span",{key:"decimal",class:`${l}-content-value-decimal`},[f])]}}return p("span",{class:`${l}-content-value`},[a])};a_.displayName="StatisticNumber";const nie=e=>{const{componentCls:t,marginXXS:n,padding:o,colorTextDescription:r,statisticTitleFontSize:i,colorTextHeading:l,statisticContentFontSize:a,statisticFontFamily:s}=e;return{[`${t}`]:v(v({},Ze(e)),{[`${t}-title`]:{marginBottom:n,color:r,fontSize:i},[`${t}-skeleton`]:{paddingTop:o},[`${t}-content`]:{color:l,fontSize:a,fontFamily:s,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:n},[`${t}-content-suffix`]:{marginInlineStart:n}}})}},oie=Xe("Statistic",e=>{const{fontSizeHeading3:t,fontSize:n,fontFamily:o}=e,r=Fe(e,{statisticTitleFontSize:n,statisticContentFontSize:t,statisticFontFamily:o});return[nie(r)]}),s_=()=>({prefixCls:String,decimalSeparator:String,groupSeparator:String,format:String,value:ze([Number,String,Object]),valueStyle:{type:Object,default:void 0},valueRender:ve(),formatter:wt(),precision:Number,prefix:Ln(),suffix:Ln(),title:Ln(),loading:Ce()}),ei=re({compatConfig:{MODE:3},name:"AStatistic",inheritAttrs:!1,props:et(s_(),{decimalSeparator:".",groupSeparator:",",loading:!1}),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ee("statistic",e),[l,a]=oie(r);return()=>{var s,c,u,d,f,h,m;const{value:g=0,valueStyle:y,valueRender:b}=e,S=r.value,$=(s=e.title)!==null&&s!==void 0?s:(c=n.title)===null||c===void 0?void 0:c.call(n),x=(u=e.prefix)!==null&&u!==void 0?u:(d=n.prefix)===null||d===void 0?void 0:d.call(n),C=(f=e.suffix)!==null&&f!==void 0?f:(h=n.suffix)===null||h===void 0?void 0:h.call(n),O=(m=e.formatter)!==null&&m!==void 0?m:n.formatter;let w=p(a_,D({"data-for-update":Date.now()},v(v({},e),{prefixCls:S,value:g,formatter:O})),null);return b&&(w=b(w)),l(p("div",D(D({},o),{},{class:[S,{[`${S}-rtl`]:i.value==="rtl"},o.class,a.value]}),[$&&p("div",{class:`${S}-title`},[$]),p(Dn,{paragraph:!1,loading:e.loading},{default:()=>[p("div",{style:y,class:`${S}-content`},[x&&p("span",{class:`${S}-content-prefix`},[x]),w,C&&p("span",{class:`${S}-content-suffix`},[C])])]})]))}}}),rie=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function iie(e,t){let n=e;const o=/\[[^\]]*]/g,r=(t.match(o)||[]).map(s=>s.slice(1,-1)),i=t.replace(o,"[]"),l=rie.reduce((s,c)=>{let[u,d]=c;if(s.includes(u)){const f=Math.floor(n/d);return n-=f*d,s.replace(new RegExp(`${u}+`,"g"),h=>{const m=h.length;return f.toString().padStart(m,"0")})}return s},i);let a=0;return l.replace(o,()=>{const s=r[a];return a+=1,s})}function lie(e,t){const{format:n=""}=t,o=new Date(e).getTime(),r=Date.now(),i=Math.max(o-r,0);return iie(i,n)}const aie=1e3/30;function Ym(e){return new Date(e).getTime()}const sie=()=>v(v({},s_()),{value:ze([Number,String,Object]),format:String,onFinish:Function,onChange:Function}),cie=re({compatConfig:{MODE:3},name:"AStatisticCountdown",props:et(sie(),{format:"HH:mm:ss"}),setup(e,t){let{emit:n,slots:o}=t;const r=ie(),i=ie(),l=()=>{const{value:d}=e;Ym(d)>=Date.now()?a():s()},a=()=>{if(r.value)return;const d=Ym(e.value);r.value=setInterval(()=>{i.value.$forceUpdate(),d>Date.now()&&n("change",d-Date.now()),l()},aie)},s=()=>{const{value:d}=e;r.value&&(clearInterval(r.value),r.value=void 0,Ym(d){let{value:f,config:h}=d;const{format:m}=e;return lie(f,v(v({},h),{format:m}))},u=d=>d;return Ue(()=>{l()}),Vn(()=>{l()}),tt(()=>{s()}),()=>{const d=e.value;return p(ei,D({ref:i},v(v({},rt(e,["onFinish","onChange"])),{value:d,valueRender:u,formatter:c})),o)}}});ei.Countdown=cie;ei.install=function(e){return e.component(ei.name,ei),e.component(ei.Countdown.name,ei.Countdown),e};const uie=ei.Countdown;var die={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};function h4(e){for(var t=1;t{const{keyCode:h}=f;h===Ie.ENTER&&f.preventDefault()},s=f=>{const{keyCode:h}=f;h===Ie.ENTER&&o("click",f)},c=f=>{o("click",f)},u=()=>{l.value&&l.value.focus()},d=()=>{l.value&&l.value.blur()};return Ue(()=>{e.autofocus&&u()}),i({focus:u,blur:d}),()=>{var f;const{noStyle:h,disabled:m}=e,g=gie(e,["noStyle","disabled"]);let y={};return h||(y=v({},mie)),m&&(y.pointerEvents="none"),p("div",D(D(D({role:"button",tabindex:0,ref:l},g),r),{},{onClick:c,onKeydown:a,onKeyup:s,style:v(v({},y),r.style||{})}),[(f=n.default)===null||f===void 0?void 0:f.call(n)])}}}),vie={small:8,middle:16,large:24},bie=()=>({prefixCls:String,size:{type:[String,Number,Array]},direction:W.oneOf(Mn("horizontal","vertical")).def("horizontal"),align:W.oneOf(Mn("start","end","center","baseline")),wrap:Ce()});function yie(e){return typeof e=="string"?vie[e]:e||0}const es=re({compatConfig:{MODE:3},name:"ASpace",inheritAttrs:!1,props:bie(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,space:i,direction:l}=Ee("space",e),[a,s]=fI(r),c=P5(),u=I(()=>{var b,S,$;return($=(b=e.size)!==null&&b!==void 0?b:(S=i==null?void 0:i.value)===null||S===void 0?void 0:S.size)!==null&&$!==void 0?$:"small"}),d=ie(),f=ie();Se(u,()=>{[d.value,f.value]=(Array.isArray(u.value)?u.value:[u.value,u.value]).map(b=>yie(b))},{immediate:!0});const h=I(()=>e.align===void 0&&e.direction==="horizontal"?"center":e.align),m=I(()=>ce(r.value,s.value,`${r.value}-${e.direction}`,{[`${r.value}-rtl`]:l.value==="rtl",[`${r.value}-align-${h.value}`]:h.value})),g=I(()=>l.value==="rtl"?"marginLeft":"marginRight"),y=I(()=>{const b={};return c.value&&(b.columnGap=`${d.value}px`,b.rowGap=`${f.value}px`),v(v({},b),e.wrap&&{flexWrap:"wrap",marginBottom:`${-f.value}px`})});return()=>{var b,S;const{wrap:$,direction:x="horizontal"}=e,C=(b=n.default)===null||b===void 0?void 0:b.call(n),O=Nt(C),w=O.length;if(w===0)return null;const P=(S=n.split)===null||S===void 0?void 0:S.call(n),T=`${r.value}-item`,M=d.value,E=w-1;return p("div",D(D({},o),{},{class:[m.value,o.class],style:[y.value,o.style]}),[O.map((A,R)=>{let F=C.indexOf(A);F===-1&&(F=`$$space-${R}`);let _={};return c.value||(x==="vertical"?R{const{componentCls:t,antCls:n}=e;return{[t]:v(v({},Ze(e)),{position:"relative",padding:`${e.pageHeaderPaddingVertical}px ${e.pageHeaderPadding}px`,backgroundColor:e.colorBgContainer,[`&${t}-ghost`]:{backgroundColor:e.pageHeaderGhostBg},"&.has-footer":{paddingBottom:0},[`${t}-back`]:{marginRight:e.marginMD,fontSize:e.fontSizeLG,lineHeight:1,"&-button":v(v({},fh(e)),{color:e.pageHeaderBackColor,cursor:"pointer"})},[`${n}-divider-vertical`]:{height:"14px",margin:`0 ${e.marginSM}`,verticalAlign:"middle"},[`${n}-breadcrumb + &-heading`]:{marginTop:e.marginXS},[`${t}-heading`]:{display:"flex",justifyContent:"space-between","&-left":{display:"flex",alignItems:"center",margin:`${e.marginXS/2}px 0`,overflow:"hidden"},"&-title":v({marginRight:e.marginSM,marginBottom:0,color:e.colorTextHeading,fontWeight:600,fontSize:e.pageHeaderHeadingTitle,lineHeight:`${e.controlHeight}px`},Zt),[`${n}-avatar`]:{marginRight:e.marginSM},"&-sub-title":v({marginRight:e.marginSM,color:e.colorTextDescription,fontSize:e.pageHeaderHeadingSubTitle,lineHeight:e.lineHeight},Zt),"&-extra":{margin:`${e.marginXS/2}px 0`,whiteSpace:"nowrap","> *":{marginLeft:e.marginSM,whiteSpace:"unset"},"> *:first-child":{marginLeft:0}}},[`${t}-content`]:{paddingTop:e.pageHeaderContentPaddingVertical},[`${t}-footer`]:{marginTop:e.marginMD,[`${n}-tabs`]:{[`> ${n}-tabs-nav`]:{margin:0,"&::before":{border:"none"}},[`${n}-tabs-tab`]:{paddingTop:e.paddingXS,paddingBottom:e.paddingXS,fontSize:e.pageHeaderTabFontSize}}},[`${t}-compact ${t}-heading`]:{flexWrap:"wrap"},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}},$ie=Xe("PageHeader",e=>{const t=Fe(e,{pageHeaderPadding:e.paddingLG,pageHeaderPaddingVertical:e.paddingMD,pageHeaderPaddingBreadcrumb:e.paddingSM,pageHeaderContentPaddingVertical:e.paddingSM,pageHeaderBackColor:e.colorTextBase,pageHeaderGhostBg:"transparent",pageHeaderHeadingTitle:e.fontSizeHeading4,pageHeaderHeadingSubTitle:e.fontSize,pageHeaderTabFontSize:e.fontSizeLG});return[Sie(t)]}),Cie=()=>({backIcon:Ln(),prefixCls:String,title:Ln(),subTitle:Ln(),breadcrumb:W.object,tags:Ln(),footer:Ln(),extra:Ln(),avatar:Ne(),ghost:{type:Boolean,default:void 0},onBack:Function}),xie=re({compatConfig:{MODE:3},name:"APageHeader",inheritAttrs:!1,props:Cie(),slots:Object,setup(e,t){let{emit:n,slots:o,attrs:r}=t;const{prefixCls:i,direction:l,pageHeader:a}=Ee("page-header",e),[s,c]=$ie(i),u=oe(!1),d=JE(),f=x=>{let{width:C}=x;d.value||(u.value=C<768)},h=I(()=>{var x,C,O;return(O=(x=e.ghost)!==null&&x!==void 0?x:(C=a==null?void 0:a.value)===null||C===void 0?void 0:C.ghost)!==null&&O!==void 0?O:!0}),m=()=>{var x,C,O;return(O=(x=e.backIcon)!==null&&x!==void 0?x:(C=o.backIcon)===null||C===void 0?void 0:C.call(o))!==null&&O!==void 0?O:l.value==="rtl"?p(ag,null,null):p(yS,null,null)},g=x=>!x||!e.onBack?null:p(oa,{componentName:"PageHeader",children:C=>{let{back:O}=C;return p("div",{class:`${i.value}-back`},[p(Mp,{onClick:w=>{n("back",w)},class:`${i.value}-back-button`,"aria-label":O},{default:()=>[x]})])}},null),y=()=>{var x;return e.breadcrumb?p(Ll,e.breadcrumb,null):(x=o.breadcrumb)===null||x===void 0?void 0:x.call(o)},b=()=>{var x,C,O,w,P,T,M,E,A;const{avatar:R}=e,F=(x=e.title)!==null&&x!==void 0?x:(C=o.title)===null||C===void 0?void 0:C.call(o),_=(O=e.subTitle)!==null&&O!==void 0?O:(w=o.subTitle)===null||w===void 0?void 0:w.call(o),N=(P=e.tags)!==null&&P!==void 0?P:(T=o.tags)===null||T===void 0?void 0:T.call(o),B=(M=e.extra)!==null&&M!==void 0?M:(E=o.extra)===null||E===void 0?void 0:E.call(o),L=`${i.value}-heading`,k=F||_||N||B;if(!k)return null;const z=m(),H=g(z);return p("div",{class:L},[(H||R||k)&&p("div",{class:`${L}-left`},[H,R?p(Bl,R,null):(A=o.avatar)===null||A===void 0?void 0:A.call(o),F&&p("span",{class:`${L}-title`,title:typeof F=="string"?F:void 0},[F]),_&&p("span",{class:`${L}-sub-title`,title:typeof _=="string"?_:void 0},[_]),N&&p("span",{class:`${L}-tags`},[N])]),B&&p("span",{class:`${L}-extra`},[p(es,null,{default:()=>[B]})])])},S=()=>{var x,C;const O=(x=e.footer)!==null&&x!==void 0?x:Nt((C=o.footer)===null||C===void 0?void 0:C.call(o));return LD(O)?null:p("div",{class:`${i.value}-footer`},[O])},$=x=>p("div",{class:`${i.value}-content`},[x]);return()=>{var x,C;const O=((x=e.breadcrumb)===null||x===void 0?void 0:x.routes)||o.breadcrumb,w=e.footer||o.footer,P=xt((C=o.default)===null||C===void 0?void 0:C.call(o)),T=ce(i.value,{"has-breadcrumb":O,"has-footer":w,[`${i.value}-ghost`]:h.value,[`${i.value}-rtl`]:l.value==="rtl",[`${i.value}-compact`]:u.value},r.class,c.value);return s(p(Go,{onResize:f},{default:()=>[p("div",D(D({},r),{},{class:T}),[y(),b(),P.length?$(P):null,S()])]}))}}}),wie=At(xie),Oie=e=>{const{componentCls:t,iconCls:n,zIndexPopup:o,colorText:r,colorWarning:i,marginXS:l,fontSize:a,fontWeightStrong:s,lineHeight:c}=e;return{[t]:{zIndex:o,[`${t}-inner-content`]:{color:r},[`${t}-message`]:{position:"relative",marginBottom:l,color:r,fontSize:a,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${n}`]:{color:i,fontSize:a,flex:"none",lineHeight:1,paddingTop:(Math.round(a*c)-a)/2},"&-title":{flex:"auto",marginInlineStart:l},"&-title-only":{fontWeight:s}},[`${t}-description`]:{position:"relative",marginInlineStart:a+l,marginBottom:l,color:r,fontSize:a},[`${t}-buttons`]:{textAlign:"end",button:{marginInlineStart:l}}}}},Pie=Xe("Popconfirm",e=>Oie(e),e=>{const{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}});var Iie=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rv(v({},Zy()),{prefixCls:String,content:wt(),title:wt(),description:wt(),okType:Be("primary"),disabled:{type:Boolean,default:!1},okText:wt(),cancelText:wt(),icon:wt(),okButtonProps:Ne(),cancelButtonProps:Ne(),showCancel:{type:Boolean,default:!0},onConfirm:Function,onCancel:Function}),Eie=re({compatConfig:{MODE:3},name:"APopconfirm",inheritAttrs:!1,props:et(Tie(),v(v({},LI()),{trigger:"click",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0,okType:"primary",disabled:!1})),slots:Object,setup(e,t){let{slots:n,emit:o,expose:r,attrs:i}=t;const l=ie();Eo(e.visible===void 0),r({getPopupDomNode:()=>{var O,w;return(w=(O=l.value)===null||O===void 0?void 0:O.getPopupDomNode)===null||w===void 0?void 0:w.call(O)}});const[a,s]=Mt(!1,{value:We(e,"open")}),c=(O,w)=>{e.open===void 0&&s(O),o("update:open",O),o("openChange",O,w)},u=O=>{c(!1,O)},d=O=>{var w;return(w=e.onConfirm)===null||w===void 0?void 0:w.call(e,O)},f=O=>{var w;c(!1,O),(w=e.onCancel)===null||w===void 0||w.call(e,O)},h=O=>{O.keyCode===Ie.ESC&&a&&c(!1,O)},m=O=>{const{disabled:w}=e;w||c(O)},{prefixCls:g,getPrefixCls:y}=Ee("popconfirm",e),b=I(()=>y()),S=I(()=>y("btn")),[$]=Pie(g),[x]=Zo("Popconfirm",ro.Popconfirm),C=()=>{var O,w,P,T,M;const{okButtonProps:E,cancelButtonProps:A,title:R=(O=n.title)===null||O===void 0?void 0:O.call(n),description:F=(w=n.description)===null||w===void 0?void 0:w.call(n),cancelText:_=(P=n.cancel)===null||P===void 0?void 0:P.call(n),okText:N=(T=n.okText)===null||T===void 0?void 0:T.call(n),okType:B,icon:L=((M=n.icon)===null||M===void 0?void 0:M.call(n))||p(vr,null,null),showCancel:k=!0}=e,{cancelButton:z,okButton:H}=n,j=v({onClick:f,size:"small"},A),Y=v(v(v({onClick:d},lp(B)),{size:"small"}),E);return p("div",{class:`${g.value}-inner-content`},[p("div",{class:`${g.value}-message`},[L&&p("span",{class:`${g.value}-message-icon`},[L]),p("div",{class:[`${g.value}-message-title`,{[`${g.value}-message-title-only`]:!!F}]},[R])]),F&&p("div",{class:`${g.value}-description`},[F]),p("div",{class:`${g.value}-buttons`},[k?z?z(j):p(Wt,j,{default:()=>[_||x.value.cancelText]}):null,H?H(Y):p(K0,{buttonProps:v(v({size:"small"},lp(B)),E),actionFn:d,close:u,prefixCls:S.value,quitOnNullishReturnValue:!0,emitEvent:!0},{default:()=>[N||x.value.okText]})])])};return()=>{var O;const{placement:w,overlayClassName:P,trigger:T="click"}=e,M=Iie(e,["placement","overlayClassName","trigger"]),E=rt(M,["title","content","cancelText","okText","onUpdate:open","onConfirm","onCancel","prefixCls"]),A=ce(g.value,P);return $(p(t1,D(D(D({},E),i),{},{trigger:T,placement:w,onOpenChange:m,open:a.value,overlayClassName:A,transitionName:jn(b.value,"zoom-big",e.transitionName),ref:l,"data-popover-inject":!0}),{default:()=>[XB(((O=n.default)===null||O===void 0?void 0:O.call(n))||[],{onKeydown:R=>{h(R)}},!1)],content:C}))}}}),_ie=At(Eie),Mie=["normal","exception","active","success"],sg=()=>({prefixCls:String,type:Be(),percent:Number,format:ve(),status:Be(),showInfo:Ce(),strokeWidth:Number,strokeLinecap:Be(),strokeColor:wt(),trailColor:String,width:Number,success:Ne(),gapDegree:Number,gapPosition:Be(),size:ze([String,Number,Array]),steps:Number,successPercent:Number,title:String,progressStatus:Be()});function zl(e){return!e||e<0?0:e>100?100:e}function Ap(e){let{success:t,successPercent:n}=e,o=n;return t&&"progress"in t&&(It(!1,"Progress","`success.progress` is deprecated. Please use `success.percent` instead."),o=t.progress),t&&"percent"in t&&(o=t.percent),o}function Aie(e){let{percent:t,success:n,successPercent:o}=e;const r=zl(Ap({success:n,successPercent:o}));return[r,zl(zl(t)-r)]}function Rie(e){let{success:t={},strokeColor:n}=e;const{strokeColor:o}=t;return[o||Wa.green,n||null]}const cg=(e,t,n)=>{var o,r,i,l;let a=-1,s=-1;if(t==="step"){const c=n.steps,u=n.strokeWidth;typeof e=="string"||typeof e>"u"?(a=e==="small"?2:14,s=u??8):typeof e=="number"?[a,s]=[e,e]:[a=14,s=8]=e,a*=c}else if(t==="line"){const c=n==null?void 0:n.strokeWidth;typeof e=="string"||typeof e>"u"?s=c||(e==="small"?6:8):typeof e=="number"?[a,s]=[e,e]:[a=-1,s=8]=e}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[a,s]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[a,s]=[e,e]:(a=(r=(o=e[0])!==null&&o!==void 0?o:e[1])!==null&&r!==void 0?r:120,s=(l=(i=e[0])!==null&&i!==void 0?i:e[1])!==null&&l!==void 0?l:120));return{width:a,height:s}};var Die=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rv(v({},sg()),{strokeColor:wt(),direction:Be()}),Bie=e=>{let t=[];return Object.keys(e).forEach(n=>{const o=parseFloat(n.replace(/%/g,""));isNaN(o)||t.push({key:o,value:e[n]})}),t=t.sort((n,o)=>n.key-o.key),t.map(n=>{let{key:o,value:r}=n;return`${r} ${o}%`}).join(", ")},Lie=(e,t)=>{const{from:n=Wa.blue,to:o=Wa.blue,direction:r=t==="rtl"?"to left":"to right"}=e,i=Die(e,["from","to","direction"]);if(Object.keys(i).length!==0){const l=Bie(i);return{backgroundImage:`linear-gradient(${r}, ${l})`}}return{backgroundImage:`linear-gradient(${r}, ${n}, ${o})`}},kie=re({compatConfig:{MODE:3},name:"ProgressLine",inheritAttrs:!1,props:Nie(),setup(e,t){let{slots:n,attrs:o}=t;const r=I(()=>{const{strokeColor:h,direction:m}=e;return h&&typeof h!="string"?Lie(h,m):{backgroundColor:h}}),i=I(()=>e.strokeLinecap==="square"||e.strokeLinecap==="butt"?0:void 0),l=I(()=>e.trailColor?{backgroundColor:e.trailColor}:void 0),a=I(()=>{var h;return(h=e.size)!==null&&h!==void 0?h:[-1,e.strokeWidth||(e.size==="small"?6:8)]}),s=I(()=>cg(a.value,"line",{strokeWidth:e.strokeWidth})),c=I(()=>{const{percent:h}=e;return v({width:`${zl(h)}%`,height:`${s.value.height}px`,borderRadius:i.value},r.value)}),u=I(()=>Ap(e)),d=I(()=>{const{success:h}=e;return{width:`${zl(u.value)}%`,height:`${s.value.height}px`,borderRadius:i.value,backgroundColor:h==null?void 0:h.strokeColor}}),f={width:s.value.width<0?"100%":s.value.width,height:`${s.value.height}px`};return()=>{var h;return p(He,null,[p("div",D(D({},o),{},{class:[`${e.prefixCls}-outer`,o.class],style:[o.style,f]}),[p("div",{class:`${e.prefixCls}-inner`,style:l.value},[p("div",{class:`${e.prefixCls}-bg`,style:c.value},null),u.value!==void 0?p("div",{class:`${e.prefixCls}-success-bg`,style:d.value},null):null])]),(h=n.default)===null||h===void 0?void 0:h.call(n)])}}}),Fie={percent:0,prefixCls:"vc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1},zie=e=>{const t=ie(null);return Vn(()=>{const n=Date.now();let o=!1;e.value.forEach(r=>{const i=(r==null?void 0:r.$el)||r;if(!i)return;o=!0;const l=i.style;l.transitionDuration=".3s, .3s, .3s, .06s",t.value&&n-t.value<100&&(l.transitionDuration="0s, 0s")}),o&&(t.value=Date.now())}),e},Hie={gapDegree:Number,gapPosition:{type:String},percent:{type:[Array,Number]},prefixCls:String,strokeColor:{type:[Object,String,Array]},strokeLinecap:{type:String},strokeWidth:Number,trailColor:String,trailWidth:Number,transition:String};var jie=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r4&&arguments[4]!==void 0?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0;const l=50-o/2;let a=0,s=-l,c=0,u=-2*l;switch(i){case"left":a=-l,s=0,c=2*l,u=0;break;case"right":a=l,s=0,c=-2*l,u=0;break;case"bottom":s=l,u=2*l;break}const d=`M 50,50 m ${a},${s} + a ${l},${l} 0 1 1 ${c},${-u} + a ${l},${l} 0 1 1 ${-c},${u}`,f=Math.PI*2*l,h={stroke:n,strokeDasharray:`${t/100*(f-r)}px ${f}px`,strokeDashoffset:`-${r/2+e/100*(f-r)}px`,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s"};return{pathString:d,pathStyle:h}}const Vie=re({compatConfig:{MODE:3},name:"VCCircle",props:et(Hie,Fie),setup(e){m4+=1;const t=ie(m4),n=I(()=>b4(e.percent)),o=I(()=>b4(e.strokeColor)),[r,i]=N1();zie(i);const l=()=>{const{prefixCls:a,strokeWidth:s,strokeLinecap:c,gapDegree:u,gapPosition:d}=e;let f=0;return n.value.map((h,m)=>{const g=o.value[m]||o.value[o.value.length-1],y=Object.prototype.toString.call(g)==="[object Object]"?`url(#${a}-gradient-${t.value})`:"",{pathString:b,pathStyle:S}=y4(f,h,g,s,u,d);f+=h;const $={key:m,d:b,stroke:y,"stroke-linecap":c,"stroke-width":s,opacity:h===0?0:1,"fill-opacity":"0",class:`${a}-circle-path`,style:S};return p("path",D({ref:r(m)},$),null)})};return()=>{const{prefixCls:a,strokeWidth:s,trailWidth:c,gapDegree:u,gapPosition:d,trailColor:f,strokeLinecap:h,strokeColor:m}=e,g=jie(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","strokeColor"]),{pathString:y,pathStyle:b}=y4(0,100,f,s,u,d);delete g.percent;const S=o.value.find(x=>Object.prototype.toString.call(x)==="[object Object]"),$={d:y,stroke:f,"stroke-linecap":h,"stroke-width":c||s,"fill-opacity":"0",class:`${a}-circle-trail`,style:b};return p("svg",D({class:`${a}-circle`,viewBox:"0 0 100 100"},g),[S&&p("defs",null,[p("linearGradient",{id:`${a}-gradient-${t.value}`,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[Object.keys(S).sort((x,C)=>v4(x)-v4(C)).map((x,C)=>p("stop",{key:C,offset:x,"stop-color":S[x]},null))])]),p("path",$,null),l().reverse()])}}}),Wie=()=>v(v({},sg()),{strokeColor:wt()}),Kie=3,Uie=e=>Kie/e*100,Gie=re({compatConfig:{MODE:3},name:"ProgressCircle",inheritAttrs:!1,props:et(Wie(),{trailColor:null}),setup(e,t){let{slots:n,attrs:o}=t;const r=I(()=>{var g;return(g=e.width)!==null&&g!==void 0?g:120}),i=I(()=>{var g;return(g=e.size)!==null&&g!==void 0?g:[r.value,r.value]}),l=I(()=>cg(i.value,"circle")),a=I(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type==="dashboard")return 75}),s=I(()=>({width:`${l.value.width}px`,height:`${l.value.height}px`,fontSize:`${l.value.width*.15+6}px`})),c=I(()=>{var g;return(g=e.strokeWidth)!==null&&g!==void 0?g:Math.max(Uie(l.value.width),6)}),u=I(()=>e.gapPosition||e.type==="dashboard"&&"bottom"||void 0),d=I(()=>Aie(e)),f=I(()=>Object.prototype.toString.call(e.strokeColor)==="[object Object]"),h=I(()=>Rie({success:e.success,strokeColor:e.strokeColor})),m=I(()=>({[`${e.prefixCls}-inner`]:!0,[`${e.prefixCls}-circle-gradient`]:f.value}));return()=>{var g;const y=p(Vie,{percent:d.value,strokeWidth:c.value,trailWidth:c.value,strokeColor:h.value,strokeLinecap:e.strokeLinecap,trailColor:e.trailColor,prefixCls:e.prefixCls,gapDegree:a.value,gapPosition:u.value},null);return p("div",D(D({},o),{},{class:[m.value,o.class],style:[o.style,s.value]}),[l.value.width<=20?p(ho,null,{default:()=>[p("span",null,[y])],title:n.default}):p(He,null,[y,(g=n.default)===null||g===void 0?void 0:g.call(n)])])}}}),Xie=()=>v(v({},sg()),{steps:Number,strokeColor:ze(),trailColor:String}),Yie=re({compatConfig:{MODE:3},name:"Steps",props:Xie(),setup(e,t){let{slots:n}=t;const o=I(()=>Math.round(e.steps*((e.percent||0)/100))),r=I(()=>{var a;return(a=e.size)!==null&&a!==void 0?a:[e.size==="small"?2:14,e.strokeWidth||8]}),i=I(()=>cg(r.value,"step",{steps:e.steps,strokeWidth:e.strokeWidth||8})),l=I(()=>{const{steps:a,strokeColor:s,trailColor:c,prefixCls:u}=e,d=[];for(let f=0;f{var a;return p("div",{class:`${e.prefixCls}-steps-outer`},[l.value,(a=n.default)===null||a===void 0?void 0:a.call(n)])}}}),qie=new it("antProgressActive",{"0%":{transform:"translateX(-100%) scaleX(0)",opacity:.1},"20%":{transform:"translateX(-100%) scaleX(0)",opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}}),Zie=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:v(v({},Ze(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize,marginInlineEnd:e.marginXS,marginBottom:e.marginXS},[`${t}-outer`]:{display:"inline-block",width:"100%"},[`&${t}-show-info`]:{[`${t}-outer`]:{marginInlineEnd:`calc(-2em - ${e.marginXS}px)`,paddingInlineEnd:`calc(2em + ${e.paddingXS}px)`}},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:e.progressRemainingColor,borderRadius:e.progressLineRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorInfo}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",backgroundColor:e.colorInfo,borderRadius:e.progressLineRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",width:"2em",marginInlineStart:e.marginXS,color:e.progressInfoTextColor,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[n]:{fontSize:e.fontSize}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.progressLineRadius,opacity:0,animationName:qie,animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},Jie=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.progressRemainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.colorText,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[n]:{fontSize:`${e.fontSize/e.fontSizeSM}em`}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},Qie=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.progressRemainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.colorInfo}}}}}},ele=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${n}`]:{fontSize:e.fontSizeSM}}}},tle=Xe("Progress",e=>{const t=e.marginXXS/2,n=Fe(e,{progressLineRadius:100,progressInfoTextColor:e.colorText,progressDefaultColor:e.colorInfo,progressRemainingColor:e.colorFillSecondary,progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Zie(n),Jie(n),Qie(n),ele(n)]});var nle=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rArray.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor),c=I(()=>{const{percent:m=0}=e,g=Ap(e);return parseInt(g!==void 0?g.toString():m.toString(),10)}),u=I(()=>{const{status:m}=e;return!Mie.includes(m)&&c.value>=100?"success":m||"normal"}),d=I(()=>{const{type:m,showInfo:g,size:y}=e,b=r.value;return{[b]:!0,[`${b}-inline-circle`]:m==="circle"&&cg(y,"circle").width<=20,[`${b}-${m==="dashboard"&&"circle"||m}`]:!0,[`${b}-status-${u.value}`]:!0,[`${b}-show-info`]:g,[`${b}-${y}`]:y,[`${b}-rtl`]:i.value==="rtl",[a.value]:!0}}),f=I(()=>typeof e.strokeColor=="string"||Array.isArray(e.strokeColor)?e.strokeColor:void 0),h=()=>{const{showInfo:m,format:g,type:y,percent:b,title:S}=e,$=Ap(e);if(!m)return null;let x;const C=g||(n==null?void 0:n.format)||(w=>`${w}%`),O=y==="line";return g||n!=null&&n.format||u.value!=="exception"&&u.value!=="success"?x=C(zl(b),zl($)):u.value==="exception"?x=p(O?Un:Kn,null,null):u.value==="success"&&(x=p(O?mr:Cs,null,null)),p("span",{class:`${r.value}-text`,title:S===void 0&&typeof x=="string"?x:void 0},[x])};return()=>{const{type:m,steps:g,title:y}=e,{class:b}=o,S=nle(o,["class"]),$=h();let x;return m==="line"?x=g?p(Yie,D(D({},e),{},{strokeColor:f.value,prefixCls:r.value,steps:g}),{default:()=>[$]}):p(kie,D(D({},e),{},{strokeColor:s.value,prefixCls:r.value,direction:i.value}),{default:()=>[$]}):(m==="circle"||m==="dashboard")&&(x=p(Gie,D(D({},e),{},{prefixCls:r.value,strokeColor:s.value,progressStatus:u.value}),{default:()=>[$]})),l(p("div",D(D({role:"progressbar"},S),{},{class:[d.value,b],title:y}),[x]))}}}),SS=At(ole);function rle(e){let t=e.scrollX;const n="scrollLeft";if(typeof t!="number"){const o=e.document;t=o.documentElement[n],typeof t!="number"&&(t=o.body[n])}return t}function ile(e){let t,n;const o=e.ownerDocument,{body:r}=o,i=o&&o.documentElement,l=e.getBoundingClientRect();return t=l.left,n=l.top,t-=i.clientLeft||r.clientLeft||0,n-=i.clientTop||r.clientTop||0,{left:t,top:n}}function lle(e){const t=ile(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=rle(o),t.left}var ale={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"};function S4(e){for(var t=1;t{const{index:s}=e;n("hover",a,s)},r=a=>{const{index:s}=e;n("click",a,s)},i=a=>{const{index:s}=e;a.keyCode===13&&n("click",a,s)},l=I(()=>{const{prefixCls:a,index:s,value:c,allowHalf:u,focused:d}=e,f=s+1;let h=a;return c===0&&s===0&&d?h+=` ${a}-focused`:u&&c+.5>=f&&c{const{disabled:a,prefixCls:s,characterRender:c,character:u,index:d,count:f,value:h}=e,m=typeof u=="function"?u({disabled:a,prefixCls:s,index:d,count:f,value:h}):u;let g=p("li",{class:l.value},[p("div",{onClick:a?null:r,onKeydown:a?null:i,onMousemove:a?null:o,role:"radio","aria-checked":h>d?"true":"false","aria-posinset":d+1,"aria-setsize":f,tabindex:a?-1:0},[p("div",{class:`${s}-first`},[m]),p("div",{class:`${s}-second`},[m])])]);return c&&(g=c(g,e)),g}}}),dle=e=>{const{componentCls:t}=e;return{[`${t}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:e.marginXS},"> div":{transition:`all ${e.motionDurationMid}, outline 0s`,"&:hover":{transform:e.rateStarHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${e.lineWidth}px dashed ${e.rateStarColor}`,transform:e.rateStarHoverScale}},"&-first, &-second":{color:e.defaultColor,transition:`all ${e.motionDurationMid}`,userSelect:"none",[e.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${t}-star-first, &-half ${t}-star-second`]:{opacity:1},[`&-half ${t}-star-first, &-full ${t}-star-second`]:{color:"inherit"}}}},fle=e=>({[`&-rtl${e.componentCls}`]:{direction:"rtl"}}),ple=e=>{const{componentCls:t}=e;return{[t]:v(v(v(v(v({},Ze(e)),{display:"inline-block",margin:0,padding:0,color:e.rateStarColor,fontSize:e.rateStarSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${t} ${t}-star`]:{cursor:"default","&:hover":{transform:"scale(1)"}}}),dle(e)),{[`+ ${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,fontSize:e.fontSize}}),fle(e))}},hle=Xe("Rate",e=>{const{colorFillContent:t}=e,n=Fe(e,{rateStarColor:e["yellow-6"],rateStarSize:e.controlHeightLG*.5,rateStarHoverScale:"scale(1.1)",defaultColor:t});return[ple(n)]}),gle=()=>({prefixCls:String,count:Number,value:Number,allowHalf:{type:Boolean,default:void 0},allowClear:{type:Boolean,default:void 0},tooltips:Array,disabled:{type:Boolean,default:void 0},character:W.any,autofocus:{type:Boolean,default:void 0},tabindex:W.oneOfType([W.number,W.string]),direction:String,id:String,onChange:Function,onHoverChange:Function,"onUpdate:value":Function,onFocus:Function,onBlur:Function,onKeydown:Function}),mle=re({compatConfig:{MODE:3},name:"ARate",inheritAttrs:!1,props:et(gle(),{value:0,count:5,allowHalf:!1,allowClear:!0,tabindex:0,direction:"ltr"}),setup(e,t){let{slots:n,attrs:o,emit:r,expose:i}=t;const{prefixCls:l,direction:a}=Ee("rate",e),[s,c]=hle(l),u=ln(),d=ie(),[f,h]=N1(),m=ft({value:e.value,focused:!1,cleanedValue:null,hoverValue:void 0});Se(()=>e.value,()=>{m.value=e.value});const g=E=>to(h.value.get(E)),y=(E,A)=>{const R=a.value==="rtl";let F=E+1;if(e.allowHalf){const _=g(E),N=lle(_),B=_.clientWidth;(R&&A-N>B/2||!R&&A-N{e.value===void 0&&(m.value=E),r("update:value",E),r("change",E),u.onFieldChange()},S=(E,A)=>{const R=y(A,E.pageX);R!==m.cleanedValue&&(m.hoverValue=R,m.cleanedValue=null),r("hoverChange",R)},$=()=>{m.hoverValue=void 0,m.cleanedValue=null,r("hoverChange",void 0)},x=(E,A)=>{const{allowClear:R}=e,F=y(A,E.pageX);let _=!1;R&&(_=F===m.value),$(),b(_?0:F),m.cleanedValue=_?F:null},C=E=>{m.focused=!0,r("focus",E)},O=E=>{m.focused=!1,r("blur",E),u.onFieldBlur()},w=E=>{const{keyCode:A}=E,{count:R,allowHalf:F}=e,_=a.value==="rtl";A===Ie.RIGHT&&m.value0&&!_||A===Ie.RIGHT&&m.value>0&&_?(F?m.value-=.5:m.value-=1,b(m.value),E.preventDefault()):A===Ie.LEFT&&m.value{e.disabled||d.value.focus()};i({focus:P,blur:()=>{e.disabled||d.value.blur()}}),Ue(()=>{const{autofocus:E,disabled:A}=e;E&&!A&&P()});const M=(E,A)=>{let{index:R}=A;const{tooltips:F}=e;return F?p(ho,{title:F[R]},{default:()=>[E]}):E};return()=>{const{count:E,allowHalf:A,disabled:R,tabindex:F,id:_=u.id.value}=e,{class:N,style:B}=o,L=[],k=R?`${l.value}-disabled`:"",z=e.character||n.character||(()=>p($S,null,null));for(let j=0;jp("svg",{width:"252",height:"294"},[p("defs",null,[p("path",{d:"M0 .387h251.772v251.772H0z"},null)]),p("g",{fill:"none","fill-rule":"evenodd"},[p("g",{transform:"translate(0 .012)"},[p("mask",{fill:"#fff"},null),p("path",{d:"M0 127.32v-2.095C0 56.279 55.892.387 124.838.387h2.096c68.946 0 124.838 55.892 124.838 124.838v2.096c0 68.946-55.892 124.838-124.838 124.838h-2.096C55.892 252.16 0 196.267 0 127.321",fill:"#E4EBF7",mask:"url(#b)"},null)]),p("path",{d:"M39.755 130.84a8.276 8.276 0 1 1-16.468-1.66 8.276 8.276 0 0 1 16.468 1.66",fill:"#FFF"},null),p("path",{d:"M36.975 134.297l10.482 5.943M48.373 146.508l-12.648 10.788",stroke:"#FFF","stroke-width":"2"},null),p("path",{d:"M39.875 159.352a5.667 5.667 0 1 1-11.277-1.136 5.667 5.667 0 0 1 11.277 1.136M57.588 143.247a5.708 5.708 0 1 1-11.358-1.145 5.708 5.708 0 0 1 11.358 1.145M99.018 26.875l29.82-.014a4.587 4.587 0 1 0-.003-9.175l-29.82.013a4.587 4.587 0 1 0 .003 9.176M110.424 45.211l29.82-.013a4.588 4.588 0 0 0-.004-9.175l-29.82.013a4.587 4.587 0 1 0 .004 9.175",fill:"#FFF"},null),p("path",{d:"M112.798 26.861v-.002l15.784-.006a4.588 4.588 0 1 0 .003 9.175l-15.783.007v-.002a4.586 4.586 0 0 0-.004-9.172M184.523 135.668c-.553 5.485-5.447 9.483-10.931 8.93-5.485-.553-9.483-5.448-8.93-10.932.552-5.485 5.447-9.483 10.932-8.93 5.485.553 9.483 5.447 8.93 10.932",fill:"#FFF"},null),p("path",{d:"M179.26 141.75l12.64 7.167M193.006 156.477l-15.255 13.011",stroke:"#FFF","stroke-width":"2"},null),p("path",{d:"M184.668 170.057a6.835 6.835 0 1 1-13.6-1.372 6.835 6.835 0 0 1 13.6 1.372M203.34 153.325a6.885 6.885 0 1 1-13.7-1.382 6.885 6.885 0 0 1 13.7 1.382",fill:"#FFF"},null),p("path",{d:"M151.931 192.324a2.222 2.222 0 1 1-4.444 0 2.222 2.222 0 0 1 4.444 0zM225.27 116.056a2.222 2.222 0 1 1-4.445 0 2.222 2.222 0 0 1 4.444 0zM216.38 151.08a2.223 2.223 0 1 1-4.446-.001 2.223 2.223 0 0 1 4.446 0zM176.917 107.636a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM195.291 92.165a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM202.058 180.711a2.223 2.223 0 1 1-4.446 0 2.223 2.223 0 0 1 4.446 0z",stroke:"#FFF","stroke-width":"2"},null),p("path",{stroke:"#FFF","stroke-width":"2",d:"M214.404 153.302l-1.912 20.184-10.928 5.99M173.661 174.792l-6.356 9.814h-11.36l-4.508 6.484M174.941 125.168v-15.804M220.824 117.25l-12.84 7.901-15.31-7.902V94.39"},null),p("path",{d:"M166.588 65.936h-3.951a4.756 4.756 0 0 1-4.743-4.742 4.756 4.756 0 0 1 4.743-4.743h3.951a4.756 4.756 0 0 1 4.743 4.743 4.756 4.756 0 0 1-4.743 4.742",fill:"#FFF"},null),p("path",{d:"M174.823 30.03c0-16.281 13.198-29.48 29.48-29.48 16.28 0 29.48 13.199 29.48 29.48 0 16.28-13.2 29.48-29.48 29.48-16.282 0-29.48-13.2-29.48-29.48",fill:"#1890FF"},null),p("path",{d:"M205.952 38.387c.5.5.785 1.142.785 1.928s-.286 1.465-.785 1.964c-.572.5-1.214.75-2 .75-.785 0-1.429-.285-1.929-.785-.572-.5-.82-1.143-.82-1.929s.248-1.428.82-1.928c.5-.5 1.144-.75 1.93-.75.785 0 1.462.25 1.999.75m4.285-19.463c1.428 1.249 2.143 2.963 2.143 5.142 0 1.712-.427 3.13-1.219 4.25-.067.096-.137.18-.218.265-.416.429-1.41 1.346-2.956 2.699a5.07 5.07 0 0 0-1.428 1.75 5.207 5.207 0 0 0-.536 2.357v.5h-4.107v-.5c0-1.357.215-2.536.714-3.5.464-.964 1.857-2.464 4.178-4.536l.43-.5c.643-.785.964-1.643.964-2.535 0-1.18-.358-2.108-1-2.785-.678-.68-1.643-1.001-2.858-1.001-1.536 0-2.642.464-3.357 1.43-.37.5-.621 1.135-.76 1.904a1.999 1.999 0 0 1-1.971 1.63h-.004c-1.277 0-2.257-1.183-1.98-2.43.337-1.518 1.02-2.78 2.073-3.784 1.536-1.5 3.607-2.25 6.25-2.25 2.32 0 4.214.607 5.642 1.894",fill:"#FFF"},null),p("path",{d:"M52.04 76.131s21.81 5.36 27.307 15.945c5.575 10.74-6.352 9.26-15.73 4.935-10.86-5.008-24.7-11.822-11.577-20.88",fill:"#FFB594"},null),p("path",{d:"M90.483 67.504l-.449 2.893c-.753.49-4.748-2.663-4.748-2.663l-1.645.748-1.346-5.684s6.815-4.589 8.917-5.018c2.452-.501 9.884.94 10.7 2.278 0 0 1.32.486-2.227.69-3.548.203-5.043.447-6.79 3.132-1.747 2.686-2.412 3.624-2.412 3.624",fill:"#FFC6A0"},null),p("path",{d:"M128.055 111.367c-2.627-7.724-6.15-13.18-8.917-15.478-3.5-2.906-9.34-2.225-11.366-4.187-1.27-1.231-3.215-1.197-3.215-1.197s-14.98-3.158-16.828-3.479c-2.37-.41-2.124-.714-6.054-1.405-1.57-1.907-2.917-1.122-2.917-1.122l-7.11-1.383c-.853-1.472-2.423-1.023-2.423-1.023l-2.468-.897c-1.645 9.976-7.74 13.796-7.74 13.796 1.795 1.122 15.703 8.3 15.703 8.3l5.107 37.11s-3.321 5.694 1.346 9.109c0 0 19.883-3.743 34.921-.329 0 0 3.047-2.546.972-8.806.523-3.01 1.394-8.263 1.736-11.622.385.772 2.019 1.918 3.14 3.477 0 0 9.407-7.365 11.052-14.012-.832-.723-1.598-1.585-2.267-2.453-.567-.736-.358-2.056-.765-2.717-.669-1.084-1.804-1.378-1.907-1.682",fill:"#FFF"},null),p("path",{d:"M101.09 289.998s4.295 2.041 7.354 1.021c2.821-.94 4.53.668 7.08 1.178 2.55.51 6.874 1.1 11.686-1.26-.103-5.51-6.889-3.98-11.96-6.713-2.563-1.38-3.784-4.722-3.598-8.799h-9.402s-1.392 10.52-1.16 14.573",fill:"#CBD1D1"},null),p("path",{d:"M101.067 289.826s2.428 1.271 6.759.653c3.058-.437 3.712.481 7.423 1.031 3.712.55 10.724-.069 11.823-.894.413 1.1-.343 2.063-.343 2.063s-1.512.603-4.812.824c-2.03.136-5.8.291-7.607-.503-1.787-1.375-5.247-1.903-5.728-.241-3.918.95-7.355-.286-7.355-.286l-.16-2.647z",fill:"#2B0849"},null),p("path",{d:"M108.341 276.044h3.094s-.103 6.702 4.536 8.558c-4.64.618-8.558-2.303-7.63-8.558",fill:"#A4AABA"},null),p("path",{d:"M57.542 272.401s-2.107 7.416-4.485 12.306c-1.798 3.695-4.225 7.492 5.465 7.492 6.648 0 8.953-.48 7.423-6.599-1.53-6.12.266-13.199.266-13.199h-8.669z",fill:"#CBD1D1"},null),p("path",{d:"M51.476 289.793s2.097 1.169 6.633 1.169c6.083 0 8.249-1.65 8.249-1.65s.602 1.114-.619 2.165c-.993.855-3.597 1.591-7.39 1.546-4.145-.048-5.832-.566-6.736-1.168-.825-.55-.687-1.58-.137-2.062",fill:"#2B0849"},null),p("path",{d:"M58.419 274.304s.033 1.519-.314 2.93c-.349 1.42-1.078 3.104-1.13 4.139-.058 1.151 4.537 1.58 5.155.034.62-1.547 1.294-6.427 1.913-7.252.619-.825-4.903-2.119-5.624.15",fill:"#A4AABA"},null),p("path",{d:"M99.66 278.514l13.378.092s1.298-54.52 1.853-64.403c.554-9.882 3.776-43.364 1.002-63.128l-12.547-.644-22.849.78s-.434 3.966-1.195 9.976c-.063.496-.682.843-.749 1.365-.075.585.423 1.354.32 1.966-2.364 14.08-6.377 33.104-8.744 46.677-.116.666-1.234 1.009-1.458 2.691-.04.302.211 1.525.112 1.795-6.873 18.744-10.949 47.842-14.277 61.885l14.607-.014s2.197-8.57 4.03-16.97c2.811-12.886 23.111-85.01 23.111-85.01l3.016-.521 1.043 46.35s-.224 1.234.337 2.02c.56.785-.56 1.123-.392 2.244l.392 1.794s-.449 7.178-.898 11.89c-.448 4.71-.092 39.165-.092 39.165",fill:"#7BB2F9"},null),p("path",{d:"M76.085 221.626c1.153.094 4.038-2.019 6.955-4.935M106.36 225.142s2.774-1.11 6.103-3.883",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M107.275 222.1s2.773-1.11 6.102-3.884",stroke:"#648BD8","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M74.74 224.767s2.622-.591 6.505-3.365M86.03 151.634c-.27 3.106.3 8.525-4.336 9.123M103.625 149.88s.11 14.012-1.293 15.065c-2.219 1.664-2.99 1.944-2.99 1.944M99.79 150.438s.035 12.88-1.196 24.377M93.673 175.911s7.212-1.664 9.431-1.664M74.31 205.861a212.013 212.013 0 0 1-.979 4.56s-1.458 1.832-1.009 3.776c.449 1.944-.947 2.045-4.985 15.355-1.696 5.59-4.49 18.591-6.348 27.597l-.231 1.12M75.689 197.807a320.934 320.934 0 0 1-.882 4.754M82.591 152.233L81.395 162.7s-1.097.15-.5 2.244c.113 1.346-2.674 15.775-5.18 30.43M56.12 274.418h13.31",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M116.241 148.22s-17.047-3.104-35.893.2c.158 2.514-.003 4.15-.003 4.15s14.687-2.818 35.67-.312c.252-2.355.226-4.038.226-4.038",fill:"#192064"},null),p("path",{d:"M106.322 151.165l.003-4.911a.81.81 0 0 0-.778-.815c-2.44-.091-5.066-.108-7.836-.014a.818.818 0 0 0-.789.815l-.003 4.906a.81.81 0 0 0 .831.813c2.385-.06 4.973-.064 7.73.017a.815.815 0 0 0 .842-.81",fill:"#FFF"},null),p("path",{d:"M105.207 150.233l.002-3.076a.642.642 0 0 0-.619-.646 94.321 94.321 0 0 0-5.866-.01.65.65 0 0 0-.63.647v3.072a.64.64 0 0 0 .654.644 121.12 121.12 0 0 1 5.794.011c.362.01.665-.28.665-.642",fill:"#192064"},null),p("path",{d:"M100.263 275.415h12.338M101.436 270.53c.006 3.387.042 5.79.111 6.506M101.451 264.548a915.75 915.75 0 0 0-.015 4.337M100.986 174.965l.898 44.642s.673 1.57-.225 2.692c-.897 1.122 2.468.673.898 2.243-1.57 1.57.897 1.122 0 3.365-.596 1.489-.994 21.1-1.096 35.146",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M46.876 83.427s-.516 6.045 7.223 5.552c11.2-.712 9.218-9.345 31.54-21.655-.786-2.708-2.447-4.744-2.447-4.744s-11.068 3.11-22.584 8.046c-6.766 2.9-13.395 6.352-13.732 12.801M104.46 91.057l.941-5.372-8.884-11.43-5.037 5.372-1.74 7.834a.321.321 0 0 0 .108.32c.965.8 6.5 5.013 14.347 3.544a.332.332 0 0 0 .264-.268",fill:"#FFC6A0"},null),p("path",{d:"M93.942 79.387s-4.533-2.853-2.432-6.855c1.623-3.09 4.513 1.133 4.513 1.133s.52-3.642 3.121-3.642c.52-1.04 1.561-4.162 1.561-4.162s11.445 2.601 13.526 3.121c0 5.203-2.304 19.424-7.84 19.861-8.892.703-12.449-9.456-12.449-9.456",fill:"#FFC6A0"},null),p("path",{d:"M113.874 73.446c2.601-2.081 3.47-9.722 3.47-9.722s-2.479-.49-6.64-2.05c-4.683-2.081-12.798-4.747-17.48.976-9.668 3.223-2.05 19.823-2.05 19.823l2.713-3.021s-3.935-3.287-2.08-6.243c2.17-3.462 3.92 1.073 3.92 1.073s.637-2.387 3.581-3.342c.355-.71 1.036-2.674 1.432-3.85a1.073 1.073 0 0 1 1.263-.704c2.4.558 8.677 2.019 11.356 2.662.522.125.871.615.82 1.15l-.305 3.248z",fill:"#520038"},null),p("path",{d:"M104.977 76.064c-.103.61-.582 1.038-1.07.956-.489-.083-.801-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.644.698 1.254M112.132 77.694c-.103.61-.582 1.038-1.07.956-.488-.083-.8-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.643.698 1.254",fill:"#552950"},null),p("path",{stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round",d:"M110.13 74.84l-.896 1.61-.298 4.357h-2.228"},null),p("path",{d:"M110.846 74.481s1.79-.716 2.506.537",stroke:"#5C2552","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M92.386 74.282s.477-1.114 1.113-.716c.637.398 1.274 1.433.558 1.99-.717.556.159 1.67.159 1.67",stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M103.287 72.93s1.83 1.113 4.137.954",stroke:"#5C2552","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M103.685 81.762s2.227 1.193 4.376 1.193M104.64 84.308s.954.398 1.511.318M94.693 81.205s2.308 7.4 10.424 7.639",stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M81.45 89.384s.45 5.647-4.935 12.787M69 82.654s-.726 9.282-8.204 14.206",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M129.405 122.865s-5.272 7.403-9.422 10.768",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M119.306 107.329s.452 4.366-2.127 32.062",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M150.028 151.232h-49.837a1.01 1.01 0 0 1-1.01-1.01v-31.688c0-.557.452-1.01 1.01-1.01h49.837c.558 0 1.01.453 1.01 1.01v31.688a1.01 1.01 0 0 1-1.01 1.01",fill:"#F2D7AD"},null),p("path",{d:"M150.29 151.232h-19.863v-33.707h20.784v32.786a.92.92 0 0 1-.92.92",fill:"#F4D19D"},null),p("path",{d:"M123.554 127.896H92.917a.518.518 0 0 1-.425-.816l6.38-9.113c.193-.277.51-.442.85-.442h31.092l-7.26 10.371z",fill:"#F2D7AD"},null),p("path",{fill:"#CC9B6E",d:"M123.689 128.447H99.25v-.519h24.169l7.183-10.26.424.298z"},null),p("path",{d:"M158.298 127.896h-18.669a2.073 2.073 0 0 1-1.659-.83l-7.156-9.541h19.965c.49 0 .95.23 1.244.622l6.69 8.92a.519.519 0 0 1-.415.83",fill:"#F4D19D"},null),p("path",{fill:"#CC9B6E",d:"M157.847 128.479h-19.384l-7.857-10.475.415-.31 7.7 10.266h19.126zM130.554 150.685l-.032-8.177.519-.002.032 8.177z"},null),p("path",{fill:"#CC9B6E",d:"M130.511 139.783l-.08-21.414.519-.002.08 21.414zM111.876 140.932l-.498-.143 1.479-5.167.498.143zM108.437 141.06l-2.679-2.935 2.665-3.434.41.318-2.397 3.089 2.384 2.612zM116.607 141.06l-.383-.35 2.383-2.612-2.397-3.089.41-.318 2.665 3.434z"},null),p("path",{d:"M154.316 131.892l-3.114-1.96.038 3.514-1.043.092c-1.682.115-3.634.23-4.789.23-1.902 0-2.693 2.258 2.23 2.648l-2.645-.596s-2.168 1.317.504 2.3c0 0-1.58 1.217.561 2.58-.584 3.504 5.247 4.058 7.122 3.59 1.876-.47 4.233-2.359 4.487-5.16.28-3.085-.89-5.432-3.35-7.238",fill:"#FFC6A0"},null),p("path",{d:"M153.686 133.577s-6.522.47-8.36.372c-1.836-.098-1.904 2.19 2.359 2.264 3.739.15 5.451-.044 5.451-.044",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M145.16 135.877c-1.85 1.346.561 2.355.561 2.355s3.478.898 6.73.617",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M151.89 141.71s-6.28.111-6.73-2.132c-.223-1.346.45-1.402.45-1.402M146.114 140.868s-1.103 3.16 5.44 3.533M151.202 129.932v3.477M52.838 89.286c3.533-.337 8.423-1.248 13.582-7.754",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M168.567 248.318a6.647 6.647 0 0 1-6.647-6.647v-66.466a6.647 6.647 0 1 1 13.294 0v66.466a6.647 6.647 0 0 1-6.647 6.647",fill:"#5BA02E"},null),p("path",{d:"M176.543 247.653a6.647 6.647 0 0 1-6.646-6.647v-33.232a6.647 6.647 0 1 1 13.293 0v33.232a6.647 6.647 0 0 1-6.647 6.647",fill:"#92C110"},null),p("path",{d:"M186.443 293.613H158.92a3.187 3.187 0 0 1-3.187-3.187v-46.134a3.187 3.187 0 0 1 3.187-3.187h27.524a3.187 3.187 0 0 1 3.187 3.187v46.134a3.187 3.187 0 0 1-3.187 3.187",fill:"#F2D7AD"},null),p("path",{d:"M88.979 89.48s7.776 5.384 16.6 2.842",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null)])]),$le=()=>p("svg",{width:"254",height:"294"},[p("defs",null,[p("path",{d:"M0 .335h253.49v253.49H0z"},null),p("path",{d:"M0 293.665h253.49V.401H0z"},null)]),p("g",{fill:"none","fill-rule":"evenodd"},[p("g",{transform:"translate(0 .067)"},[p("mask",{fill:"#fff"},null),p("path",{d:"M0 128.134v-2.11C0 56.608 56.273.334 125.69.334h2.11c69.416 0 125.69 56.274 125.69 125.69v2.11c0 69.417-56.274 125.69-125.69 125.69h-2.11C56.273 253.824 0 197.551 0 128.134",fill:"#E4EBF7",mask:"url(#b)"},null)]),p("path",{d:"M39.989 132.108a8.332 8.332 0 1 1-16.581-1.671 8.332 8.332 0 0 1 16.58 1.671",fill:"#FFF"},null),p("path",{d:"M37.19 135.59l10.553 5.983M48.665 147.884l-12.734 10.861",stroke:"#FFF","stroke-width":"2"},null),p("path",{d:"M40.11 160.816a5.706 5.706 0 1 1-11.354-1.145 5.706 5.706 0 0 1 11.354 1.145M57.943 144.6a5.747 5.747 0 1 1-11.436-1.152 5.747 5.747 0 0 1 11.436 1.153M99.656 27.434l30.024-.013a4.619 4.619 0 1 0-.004-9.238l-30.024.013a4.62 4.62 0 0 0 .004 9.238M111.14 45.896l30.023-.013a4.62 4.62 0 1 0-.004-9.238l-30.024.013a4.619 4.619 0 1 0 .004 9.238",fill:"#FFF"},null),p("path",{d:"M113.53 27.421v-.002l15.89-.007a4.619 4.619 0 1 0 .005 9.238l-15.892.007v-.002a4.618 4.618 0 0 0-.004-9.234M150.167 70.091h-3.979a4.789 4.789 0 0 1-4.774-4.775 4.788 4.788 0 0 1 4.774-4.774h3.979a4.789 4.789 0 0 1 4.775 4.774 4.789 4.789 0 0 1-4.775 4.775",fill:"#FFF"},null),p("path",{d:"M171.687 30.234c0-16.392 13.289-29.68 29.681-29.68 16.392 0 29.68 13.288 29.68 29.68 0 16.393-13.288 29.681-29.68 29.681s-29.68-13.288-29.68-29.68",fill:"#FF603B"},null),p("path",{d:"M203.557 19.435l-.676 15.035a1.514 1.514 0 0 1-3.026 0l-.675-15.035a2.19 2.19 0 1 1 4.377 0m-.264 19.378c.513.477.77 1.1.77 1.87s-.257 1.393-.77 1.907c-.55.476-1.21.733-1.943.733a2.545 2.545 0 0 1-1.87-.77c-.55-.514-.806-1.136-.806-1.87 0-.77.256-1.393.806-1.87.513-.513 1.137-.733 1.87-.733.77 0 1.43.22 1.943.733",fill:"#FFF"},null),p("path",{d:"M119.3 133.275c4.426-.598 3.612-1.204 4.079-4.778.675-5.18-3.108-16.935-8.262-25.118-1.088-10.72-12.598-11.24-12.598-11.24s4.312 4.895 4.196 16.199c1.398 5.243.804 14.45.804 14.45s5.255 11.369 11.78 10.487",fill:"#FFB594"},null),p("path",{d:"M100.944 91.61s1.463-.583 3.211.582c8.08 1.398 10.368 6.706 11.3 11.368 1.864 1.282 1.864 2.33 1.864 3.496.365.777 1.515 3.03 1.515 3.03s-7.225 1.748-10.954 6.758c-1.399-6.41-6.936-25.235-6.936-25.235",fill:"#FFF"},null),p("path",{d:"M94.008 90.5l1.019-5.815-9.23-11.874-5.233 5.581-2.593 9.863s8.39 5.128 16.037 2.246",fill:"#FFB594"},null),p("path",{d:"M82.931 78.216s-4.557-2.868-2.445-6.892c1.632-3.107 4.537 1.139 4.537 1.139s.524-3.662 3.139-3.662c.523-1.046 1.569-4.184 1.569-4.184s11.507 2.615 13.6 3.138c-.001 5.23-2.317 19.529-7.884 19.969-8.94.706-12.516-9.508-12.516-9.508",fill:"#FFC6A0"},null),p("path",{d:"M102.971 72.243c2.616-2.093 3.489-9.775 3.489-9.775s-2.492-.492-6.676-2.062c-4.708-2.092-12.867-4.771-17.575.982-9.54 4.41-2.062 19.93-2.062 19.93l2.729-3.037s-3.956-3.304-2.092-6.277c2.183-3.48 3.943 1.08 3.943 1.08s.64-2.4 3.6-3.36c.356-.714 1.04-2.69 1.44-3.872a1.08 1.08 0 0 1 1.27-.707c2.41.56 8.723 2.03 11.417 2.676.524.126.876.619.825 1.156l-.308 3.266z",fill:"#520038"},null),p("path",{d:"M101.22 76.514c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.961.491.083.805.647.702 1.26M94.26 75.074c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.96.491.082.805.646.702 1.26",fill:"#552950"},null),p("path",{stroke:"#DB836E","stroke-width":"1.063","stroke-linecap":"round","stroke-linejoin":"round",d:"M99.206 73.644l-.9 1.62-.3 4.38h-2.24"},null),p("path",{d:"M99.926 73.284s1.8-.72 2.52.54",stroke:"#5C2552","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M81.367 73.084s.48-1.12 1.12-.72c.64.4 1.28 1.44.56 2s.16 1.68.16 1.68",stroke:"#DB836E","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M92.326 71.724s1.84 1.12 4.16.96",stroke:"#5C2552","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M92.726 80.604s2.24 1.2 4.4 1.2M93.686 83.164s.96.4 1.52.32M83.687 80.044s1.786 6.547 9.262 7.954",stroke:"#DB836E","stroke-width":"1.063","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M95.548 91.663s-1.068 2.821-8.298 2.105c-7.23-.717-10.29-5.044-10.29-5.044",stroke:"#E4EBF7","stroke-width":"1.136","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M78.126 87.478s6.526 4.972 16.47 2.486c0 0 9.577 1.02 11.536 5.322 5.36 11.77.543 36.835 0 39.962 3.496 4.055-.466 8.483-.466 8.483-15.624-3.548-35.81-.6-35.81-.6-4.849-3.546-1.223-9.044-1.223-9.044L62.38 110.32c-2.485-15.227.833-19.803 3.549-20.743 3.03-1.049 8.04-1.282 8.04-1.282.496-.058 1.08-.076 1.37-.233 2.36-1.282 2.787-.583 2.787-.583",fill:"#FFF"},null),p("path",{d:"M65.828 89.81s-6.875.465-7.59 8.156c-.466 8.857 3.03 10.954 3.03 10.954s6.075 22.102 16.796 22.957c8.39-2.176 4.758-6.702 4.661-11.42-.233-11.304-7.108-16.897-7.108-16.897s-4.212-13.75-9.789-13.75",fill:"#FFC6A0"},null),p("path",{d:"M71.716 124.225s.855 11.264 9.828 6.486c4.765-2.536 7.581-13.828 9.789-22.568 1.456-5.768 2.58-12.197 2.58-12.197l-4.973-1.709s-2.408 5.516-7.769 12.275c-4.335 5.467-9.144 11.11-9.455 17.713",fill:"#FFC6A0"},null),p("path",{d:"M108.463 105.191s1.747 2.724-2.331 30.535c2.376 2.216 1.053 6.012-.233 7.51",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M123.262 131.527s-.427 2.732-11.77 1.981c-15.187-1.006-25.326-3.25-25.326-3.25l.933-5.8s.723.215 9.71-.068c11.887-.373 18.714-6.07 24.964-1.022 4.039 3.263 1.489 8.16 1.489 8.16",fill:"#FFC6A0"},null),p("path",{d:"M70.24 90.974s-5.593-4.739-11.054 2.68c-3.318 7.223.517 15.284 2.664 19.578-.31 3.729 2.33 4.311 2.33 4.311s.108.895 1.516 2.68c4.078-7.03 6.72-9.166 13.711-12.546-.328-.656-1.877-3.265-1.825-3.767.175-1.69-1.282-2.623-1.282-2.623s-.286-.156-1.165-2.738c-.788-2.313-2.036-5.177-4.895-7.575",fill:"#FFF"},null),p("path",{d:"M90.232 288.027s4.855 2.308 8.313 1.155c3.188-1.063 5.12.755 8.002 1.331 2.881.577 7.769 1.243 13.207-1.424-.117-6.228-7.786-4.499-13.518-7.588-2.895-1.56-4.276-5.336-4.066-9.944H91.544s-1.573 11.89-1.312 16.47",fill:"#CBD1D1"},null),p("path",{d:"M90.207 287.833s2.745 1.437 7.639.738c3.456-.494 3.223.66 7.418 1.282 4.195.621 13.092-.194 14.334-1.126.466 1.242-.388 2.33-.388 2.33s-1.709.682-5.438.932c-2.295.154-8.098.276-10.14-.621-2.02-1.554-4.894-1.515-6.06-.234-4.427 1.075-7.184-.31-7.184-.31l-.181-2.991z",fill:"#2B0849"},null),p("path",{d:"M98.429 272.257h3.496s-.117 7.574 5.127 9.671c-5.244.7-9.672-2.602-8.623-9.671",fill:"#A4AABA"},null),p("path",{d:"M44.425 272.046s-2.208 7.774-4.702 12.899c-1.884 3.874-4.428 7.854 5.729 7.854 6.97 0 9.385-.503 7.782-6.917-1.604-6.415.279-13.836.279-13.836h-9.088z",fill:"#CBD1D1"},null),p("path",{d:"M38.066 290.277s2.198 1.225 6.954 1.225c6.376 0 8.646-1.73 8.646-1.73s.63 1.168-.649 2.27c-1.04.897-3.77 1.668-7.745 1.621-4.347-.05-6.115-.593-7.062-1.224-.864-.577-.72-1.657-.144-2.162",fill:"#2B0849"},null),p("path",{d:"M45.344 274.041s.035 1.592-.329 3.07c-.365 1.49-1.13 3.255-1.184 4.34-.061 1.206 4.755 1.657 5.403.036.65-1.622 1.357-6.737 2.006-7.602.648-.865-5.14-2.222-5.896.156",fill:"#A4AABA"},null),p("path",{d:"M89.476 277.57l13.899.095s1.349-56.643 1.925-66.909c.576-10.267 3.923-45.052 1.042-65.585l-13.037-.669-23.737.81s-.452 4.12-1.243 10.365c-.065.515-.708.874-.777 1.417-.078.608.439 1.407.332 2.044-2.455 14.627-5.797 32.736-8.256 46.837-.121.693-1.282 1.048-1.515 2.796-.042.314.22 1.584.116 1.865-7.14 19.473-12.202 52.601-15.66 67.19l15.176-.015s2.282-10.145 4.185-18.871c2.922-13.389 24.012-88.32 24.012-88.32l3.133-.954-.158 48.568s-.233 1.282.35 2.098c.583.815-.581 1.167-.408 2.331l.408 1.864s-.466 7.458-.932 12.352c-.467 4.895 1.145 40.69 1.145 40.69",fill:"#7BB2F9"},null),p("path",{d:"M64.57 218.881c1.197.099 4.195-2.097 7.225-5.127M96.024 222.534s2.881-1.152 6.34-4.034",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M96.973 219.373s2.882-1.153 6.34-4.034",stroke:"#648BD8","stroke-width":"1.032","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M63.172 222.144s2.724-.614 6.759-3.496M74.903 146.166c-.281 3.226.31 8.856-4.506 9.478M93.182 144.344s.115 14.557-1.344 15.65c-2.305 1.73-3.107 2.02-3.107 2.02M89.197 144.923s.269 13.144-1.01 25.088M83.525 170.71s6.81-1.051 9.116-1.051M46.026 270.045l-.892 4.538M46.937 263.289l-.815 4.157M62.725 202.503c-.33 1.618-.102 1.904-.449 3.438 0 0-2.756 1.903-2.29 3.923.466 2.02-.31 3.424-4.505 17.252-1.762 5.807-4.233 18.922-6.165 28.278-.03.144-.521 2.646-1.14 5.8M64.158 194.136c-.295 1.658-.6 3.31-.917 4.938M71.33 146.787l-1.244 10.877s-1.14.155-.519 2.33c.117 1.399-2.778 16.39-5.382 31.615M44.242 273.727H58.07",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M106.18 142.117c-3.028-.489-18.825-2.744-36.219.2a.625.625 0 0 0-.518.644c.063 1.307.044 2.343.015 2.995a.617.617 0 0 0 .716.636c3.303-.534 17.037-2.412 35.664-.266.347.04.66-.214.692-.56.124-1.347.16-2.425.17-3.029a.616.616 0 0 0-.52-.62",fill:"#192064"},null),p("path",{d:"M96.398 145.264l.003-5.102a.843.843 0 0 0-.809-.847 114.104 114.104 0 0 0-8.141-.014.85.85 0 0 0-.82.847l-.003 5.097c0 .476.388.857.864.845 2.478-.064 5.166-.067 8.03.017a.848.848 0 0 0 .876-.843",fill:"#FFF"},null),p("path",{d:"M95.239 144.296l.002-3.195a.667.667 0 0 0-.643-.672c-1.9-.061-3.941-.073-6.094-.01a.675.675 0 0 0-.654.672l-.002 3.192c0 .376.305.677.68.669 1.859-.042 3.874-.043 6.02.012.376.01.69-.291.691-.668",fill:"#192064"},null),p("path",{d:"M90.102 273.522h12.819M91.216 269.761c.006 3.519-.072 5.55 0 6.292M90.923 263.474c-.009 1.599-.016 2.558-.016 4.505M90.44 170.404l.932 46.38s.7 1.631-.233 2.796c-.932 1.166 2.564.7.932 2.33-1.63 1.633.933 1.166 0 3.497-.618 1.546-1.031 21.921-1.138 36.513",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M73.736 98.665l2.214 4.312s2.098.816 1.865 2.68l.816 2.214M64.297 116.611c.233-.932 2.176-7.147 12.585-10.488M77.598 90.042s7.691 6.137 16.547 2.72",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M91.974 86.954s5.476-.816 7.574-4.545c1.297-.345.72 2.212-.33 3.671-.7.971-1.01 1.554-1.01 1.554s.194.31.155.816c-.053.697-.175.653-.272 1.048-.081.335.108.657 0 1.049-.046.17-.198.5-.382.878-.12.249-.072.687-.2.948-.231.469-1.562 1.87-2.622 2.855-3.826 3.554-5.018 1.644-6.001-.408-.894-1.865-.661-5.127-.874-6.875-.35-2.914-2.622-3.03-1.923-4.429.343-.685 2.87.69 3.263 1.748.757 2.04 2.952 1.807 2.622 1.69",fill:"#FFC6A0"},null),p("path",{d:"M99.8 82.429c-.465.077-.35.272-.97 1.243-.622.971-4.817 2.932-6.39 3.224-2.589.48-2.278-1.56-4.254-2.855-1.69-1.107-3.562-.638-1.398 1.398.99.932.932 1.107 1.398 3.205.335 1.506-.64 3.67.7 5.593",stroke:"#DB836E","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M79.543 108.673c-2.1 2.926-4.266 6.175-5.557 8.762",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M87.72 124.768s-2.098-1.942-5.127-2.719c-3.03-.777-3.574-.155-5.516.078-1.942.233-3.885-.932-3.652.7.233 1.63 5.05 1.01 5.206 2.097.155 1.087-6.37 2.796-8.313 2.175-.777.777.466 1.864 2.02 2.175.233 1.554 2.253 1.554 2.253 1.554s.699 1.01 2.641 1.088c2.486 1.32 8.934-.7 10.954-1.554 2.02-.855-.466-5.594-.466-5.594",fill:"#FFC6A0"},null),p("path",{d:"M73.425 122.826s.66 1.127 3.167 1.418c2.315.27 2.563.583 2.563.583s-2.545 2.894-9.07 2.272M72.416 129.274s3.826.097 4.933-.718M74.98 130.75s1.961.136 3.36-.505M77.232 131.916s1.748.019 2.914-.505M73.328 122.321s-.595-1.032 1.262-.427c1.671.544 2.833.055 5.128.155 1.389.061 3.067-.297 3.982.15 1.606.784 3.632 2.181 3.632 2.181s10.526 1.204 19.033-1.127M78.864 108.104s-8.39 2.758-13.168 12.12",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M109.278 112.533s3.38-3.613 7.575-4.662",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M107.375 123.006s9.697-2.745 11.445-.88",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M194.605 83.656l3.971-3.886M187.166 90.933l3.736-3.655M191.752 84.207l-4.462-4.56M198.453 91.057l-4.133-4.225M129.256 163.074l3.718-3.718M122.291 170.039l3.498-3.498M126.561 163.626l-4.27-4.27M132.975 170.039l-3.955-3.955",stroke:"#BFCDDD","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M190.156 211.779h-1.604a4.023 4.023 0 0 1-4.011-4.011V175.68a4.023 4.023 0 0 1 4.01-4.01h1.605a4.023 4.023 0 0 1 4.011 4.01v32.088a4.023 4.023 0 0 1-4.01 4.01",fill:"#A3B4C6"},null),p("path",{d:"M237.824 212.977a4.813 4.813 0 0 1-4.813 4.813h-86.636a4.813 4.813 0 0 1 0-9.626h86.636a4.813 4.813 0 0 1 4.813 4.813",fill:"#A3B4C6"},null),p("mask",{fill:"#fff"},null),p("path",{fill:"#A3B4C6",mask:"url(#d)",d:"M154.098 190.096h70.513v-84.617h-70.513z"},null),p("path",{d:"M224.928 190.096H153.78a3.219 3.219 0 0 1-3.208-3.209V167.92a3.219 3.219 0 0 1 3.208-3.21h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.219 3.219 0 0 1-3.21 3.209M224.928 130.832H153.78a3.218 3.218 0 0 1-3.208-3.208v-18.968a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.218 3.218 0 0 1-3.21 3.208",fill:"#BFCDDD",mask:"url(#d)"},null),p("path",{d:"M159.563 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 120.546h-22.461a.802.802 0 0 1-.802-.802v-3.208c0-.443.359-.803.802-.803h22.46c.444 0 .803.36.803.803v3.208c0 .443-.36.802-.802.802",fill:"#FFF",mask:"url(#d)"},null),p("path",{d:"M224.928 160.464H153.78a3.218 3.218 0 0 1-3.208-3.209v-18.967a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.209v18.967a3.218 3.218 0 0 1-3.21 3.209",fill:"#BFCDDD",mask:"url(#d)"},null),p("path",{d:"M173.455 130.832h49.301M164.984 130.832h6.089M155.952 130.832h6.75M173.837 160.613h49.3M165.365 160.613h6.089M155.57 160.613h6.751",stroke:"#7C90A5","stroke-width":"1.124","stroke-linecap":"round","stroke-linejoin":"round",mask:"url(#d)"},null),p("path",{d:"M159.563 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M166.98 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M174.397 151.038a2.407 2.407 0 1 1 .001-4.814 2.407 2.407 0 0 1 0 4.814M222.539 151.038h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802M159.563 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 179.987h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802",fill:"#FFF",mask:"url(#d)"},null),p("path",{d:"M203.04 221.108h-27.372a2.413 2.413 0 0 1-2.406-2.407v-11.448a2.414 2.414 0 0 1 2.406-2.407h27.372a2.414 2.414 0 0 1 2.407 2.407V218.7a2.413 2.413 0 0 1-2.407 2.407",fill:"#BFCDDD",mask:"url(#d)"},null),p("path",{d:"M177.259 207.217v11.52M201.05 207.217v11.52",stroke:"#A3B4C6","stroke-width":"1.124","stroke-linecap":"round","stroke-linejoin":"round",mask:"url(#d)"},null),p("path",{d:"M162.873 267.894a9.422 9.422 0 0 1-9.422-9.422v-14.82a9.423 9.423 0 0 1 18.845 0v14.82a9.423 9.423 0 0 1-9.423 9.422",fill:"#5BA02E",mask:"url(#d)"},null),p("path",{d:"M171.22 267.83a9.422 9.422 0 0 1-9.422-9.423v-3.438a9.423 9.423 0 0 1 18.845 0v3.438a9.423 9.423 0 0 1-9.422 9.423",fill:"#92C110",mask:"url(#d)"},null),p("path",{d:"M181.31 293.666h-27.712a3.209 3.209 0 0 1-3.209-3.21V269.79a3.209 3.209 0 0 1 3.209-3.21h27.711a3.209 3.209 0 0 1 3.209 3.21v20.668a3.209 3.209 0 0 1-3.209 3.209",fill:"#F2D7AD",mask:"url(#d)"},null)])]),Cle=()=>p("svg",{width:"251",height:"294"},[p("g",{fill:"none","fill-rule":"evenodd"},[p("path",{d:"M0 129.023v-2.084C0 58.364 55.591 2.774 124.165 2.774h2.085c68.574 0 124.165 55.59 124.165 124.165v2.084c0 68.575-55.59 124.166-124.165 124.166h-2.085C55.591 253.189 0 197.598 0 129.023",fill:"#E4EBF7"},null),p("path",{d:"M41.417 132.92a8.231 8.231 0 1 1-16.38-1.65 8.231 8.231 0 0 1 16.38 1.65",fill:"#FFF"},null),p("path",{d:"M38.652 136.36l10.425 5.91M49.989 148.505l-12.58 10.73",stroke:"#FFF","stroke-width":"2"},null),p("path",{d:"M41.536 161.28a5.636 5.636 0 1 1-11.216-1.13 5.636 5.636 0 0 1 11.216 1.13M59.154 145.261a5.677 5.677 0 1 1-11.297-1.138 5.677 5.677 0 0 1 11.297 1.138M100.36 29.516l29.66-.013a4.562 4.562 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 0 0 .005 9.126M111.705 47.754l29.659-.013a4.563 4.563 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 1 0 .005 9.126",fill:"#FFF"},null),p("path",{d:"M114.066 29.503V29.5l15.698-.007a4.563 4.563 0 1 0 .004 9.126l-15.698.007v-.002a4.562 4.562 0 0 0-.004-9.122M185.405 137.723c-.55 5.455-5.418 9.432-10.873 8.882-5.456-.55-9.432-5.418-8.882-10.873.55-5.455 5.418-9.432 10.873-8.882 5.455.55 9.432 5.418 8.882 10.873",fill:"#FFF"},null),p("path",{d:"M180.17 143.772l12.572 7.129M193.841 158.42L178.67 171.36",stroke:"#FFF","stroke-width":"2"},null),p("path",{d:"M185.55 171.926a6.798 6.798 0 1 1-13.528-1.363 6.798 6.798 0 0 1 13.527 1.363M204.12 155.285a6.848 6.848 0 1 1-13.627-1.375 6.848 6.848 0 0 1 13.626 1.375",fill:"#FFF"},null),p("path",{d:"M152.988 194.074a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0zM225.931 118.217a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM217.09 153.051a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.42 0zM177.84 109.842a2.21 2.21 0 1 1-4.422 0 2.21 2.21 0 0 1 4.421 0zM196.114 94.454a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM202.844 182.523a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0z",stroke:"#FFF","stroke-width":"2"},null),p("path",{stroke:"#FFF","stroke-width":"2",d:"M215.125 155.262l-1.902 20.075-10.87 5.958M174.601 176.636l-6.322 9.761H156.98l-4.484 6.449M175.874 127.28V111.56M221.51 119.404l-12.77 7.859-15.228-7.86V96.668"},null),p("path",{d:"M180.68 29.32C180.68 13.128 193.806 0 210 0c16.193 0 29.32 13.127 29.32 29.32 0 16.194-13.127 29.322-29.32 29.322-16.193 0-29.32-13.128-29.32-29.321",fill:"#A26EF4"},null),p("path",{d:"M221.45 41.706l-21.563-.125a1.744 1.744 0 0 1-1.734-1.754l.071-12.23a1.744 1.744 0 0 1 1.754-1.734l21.562.125c.964.006 1.74.791 1.735 1.755l-.071 12.229a1.744 1.744 0 0 1-1.754 1.734",fill:"#FFF"},null),p("path",{d:"M215.106 29.192c-.015 2.577-2.049 4.654-4.543 4.64-2.494-.014-4.504-2.115-4.489-4.693l.04-6.925c.016-2.577 2.05-4.654 4.543-4.64 2.494.015 4.504 2.116 4.49 4.693l-.04 6.925zm-4.53-14.074a6.877 6.877 0 0 0-6.916 6.837l-.043 7.368a6.877 6.877 0 0 0 13.754.08l.042-7.368a6.878 6.878 0 0 0-6.837-6.917zM167.566 68.367h-3.93a4.73 4.73 0 0 1-4.717-4.717 4.73 4.73 0 0 1 4.717-4.717h3.93a4.73 4.73 0 0 1 4.717 4.717 4.73 4.73 0 0 1-4.717 4.717",fill:"#FFF"},null),p("path",{d:"M168.214 248.838a6.611 6.611 0 0 1-6.61-6.611v-66.108a6.611 6.611 0 0 1 13.221 0v66.108a6.611 6.611 0 0 1-6.61 6.61",fill:"#5BA02E"},null),p("path",{d:"M176.147 248.176a6.611 6.611 0 0 1-6.61-6.61v-33.054a6.611 6.611 0 1 1 13.221 0v33.053a6.611 6.611 0 0 1-6.61 6.611",fill:"#92C110"},null),p("path",{d:"M185.994 293.89h-27.376a3.17 3.17 0 0 1-3.17-3.17v-45.887a3.17 3.17 0 0 1 3.17-3.17h27.376a3.17 3.17 0 0 1 3.17 3.17v45.886a3.17 3.17 0 0 1-3.17 3.17",fill:"#F2D7AD"},null),p("path",{d:"M81.972 147.673s6.377-.927 17.566-1.28c11.729-.371 17.57 1.086 17.57 1.086s3.697-3.855.968-8.424c1.278-12.077 5.982-32.827.335-48.273-1.116-1.339-3.743-1.512-7.536-.62-1.337.315-7.147-.149-7.983-.1l-15.311-.347s-3.487-.17-8.035-.508c-1.512-.113-4.227-1.683-5.458-.338-.406.443-2.425 5.669-1.97 16.077l8.635 35.642s-3.141 3.61 1.219 7.085",fill:"#FFF"},null),p("path",{d:"M75.768 73.325l-.9-6.397 11.982-6.52s7.302-.118 8.038 1.205c.737 1.324-5.616.993-5.616.993s-1.836 1.388-2.615 2.5c-1.654 2.363-.986 6.471-8.318 5.986-1.708.284-2.57 2.233-2.57 2.233",fill:"#FFC6A0"},null),p("path",{d:"M52.44 77.672s14.217 9.406 24.973 14.444c1.061.497-2.094 16.183-11.892 11.811-7.436-3.318-20.162-8.44-21.482-14.496-.71-3.258 2.543-7.643 8.401-11.76M141.862 80.113s-6.693 2.999-13.844 6.876c-3.894 2.11-10.137 4.704-12.33 7.988-6.224 9.314 3.536 11.22 12.947 7.503 6.71-2.651 28.999-12.127 13.227-22.367",fill:"#FFB594"},null),p("path",{d:"M76.166 66.36l3.06 3.881s-2.783 2.67-6.31 5.747c-7.103 6.195-12.803 14.296-15.995 16.44-3.966 2.662-9.754 3.314-12.177-.118-3.553-5.032.464-14.628 31.422-25.95",fill:"#FFC6A0"},null),p("path",{d:"M64.674 85.116s-2.34 8.413-8.912 14.447c.652.548 18.586 10.51 22.144 10.056 5.238-.669 6.417-18.968 1.145-20.531-.702-.208-5.901-1.286-8.853-2.167-.87-.26-1.611-1.71-3.545-.936l-1.98-.869zM128.362 85.826s5.318 1.956 7.325 13.734c-.546.274-17.55 12.35-21.829 7.805-6.534-6.94-.766-17.393 4.275-18.61 4.646-1.121 5.03-1.37 10.23-2.929",fill:"#FFF"},null),p("path",{d:"M78.18 94.656s.911 7.41-4.914 13.078",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M87.397 94.68s3.124 2.572 10.263 2.572c7.14 0 9.074-3.437 9.074-3.437",stroke:"#E4EBF7","stroke-width":".932","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M117.184 68.639l-6.781-6.177s-5.355-4.314-9.223-.893c-3.867 3.422 4.463 2.083 5.653 4.165 1.19 2.082.848 1.143-2.083.446-5.603-1.331-2.082.893 2.975 5.355 2.091 1.845 6.992.955 6.992.955l2.467-3.851z",fill:"#FFC6A0"},null),p("path",{d:"M105.282 91.315l-.297-10.937-15.918-.027-.53 10.45c-.026.403.17.788.515.999 2.049 1.251 9.387 5.093 15.799.424.287-.21.443-.554.431-.91",fill:"#FFB594"},null),p("path",{d:"M107.573 74.24c.817-1.147.982-9.118 1.015-11.928a1.046 1.046 0 0 0-.965-1.055l-4.62-.365c-7.71-1.044-17.071.624-18.253 6.346-5.482 5.813-.421 13.244-.421 13.244s1.963 3.566 4.305 6.791c.756 1.041.398-3.731 3.04-5.929 5.524-4.594 15.899-7.103 15.899-7.103",fill:"#5C2552"},null),p("path",{d:"M88.426 83.206s2.685 6.202 11.602 6.522c7.82.28 8.973-7.008 7.434-17.505l-.909-5.483c-6.118-2.897-15.478.54-15.478.54s-.576 2.044-.19 5.504c-2.276 2.066-1.824 5.618-1.824 5.618s-.905-1.922-1.98-2.321c-.86-.32-1.897.089-2.322 1.98-1.04 4.632 3.667 5.145 3.667 5.145",fill:"#FFC6A0"},null),p("path",{stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round",d:"M100.843 77.099l1.701-.928-1.015-4.324.674-1.406"},null),p("path",{d:"M105.546 74.092c-.022.713-.452 1.279-.96 1.263-.51-.016-.904-.607-.882-1.32.021-.713.452-1.278.96-1.263.51.016.904.607.882 1.32M97.592 74.349c-.022.713-.452 1.278-.961 1.263-.509-.016-.904-.607-.882-1.32.022-.713.452-1.279.961-1.263.51.016.904.606.882 1.32",fill:"#552950"},null),p("path",{d:"M91.132 86.786s5.269 4.957 12.679 2.327",stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M99.776 81.903s-3.592.232-1.44-2.79c1.59-1.496 4.897-.46 4.897-.46s1.156 3.906-3.457 3.25",fill:"#DB836E"},null),p("path",{d:"M102.88 70.6s2.483.84 3.402.715M93.883 71.975s2.492-1.144 4.778-1.073",stroke:"#5C2552","stroke-width":"1.526","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M86.32 77.374s.961.879 1.458 2.106c-.377.48-1.033 1.152-.236 1.809M99.337 83.719s1.911.151 2.509-.254",stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M87.782 115.821l15.73-3.012M100.165 115.821l10.04-2.008",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M66.508 86.763s-1.598 8.83-6.697 14.078",stroke:"#E4EBF7","stroke-width":"1.114","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M128.31 87.934s3.013 4.121 4.06 11.785",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M64.09 84.816s-6.03 9.912-13.607 9.903",stroke:"#DB836E","stroke-width":".795","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M112.366 65.909l-.142 5.32s5.993 4.472 11.945 9.202c4.482 3.562 8.888 7.455 10.985 8.662 4.804 2.766 8.9 3.355 11.076 1.808 4.071-2.894 4.373-9.878-8.136-15.263-4.271-1.838-16.144-6.36-25.728-9.73",fill:"#FFC6A0"},null),p("path",{d:"M130.532 85.488s4.588 5.757 11.619 6.214",stroke:"#DB836E","stroke-width":".75","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M121.708 105.73s-.393 8.564-1.34 13.612",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M115.784 161.512s-3.57-1.488-2.678-7.14",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M101.52 290.246s4.326 2.057 7.408 1.03c2.842-.948 4.564.673 7.132 1.186 2.57.514 6.925 1.108 11.772-1.269-.104-5.551-6.939-4.01-12.048-6.763-2.582-1.39-3.812-4.757-3.625-8.863h-9.471s-1.402 10.596-1.169 14.68",fill:"#CBD1D1"},null),p("path",{d:"M101.496 290.073s2.447 1.281 6.809.658c3.081-.44 3.74.485 7.479 1.039 3.739.554 10.802-.07 11.91-.9.415 1.108-.347 2.077-.347 2.077s-1.523.608-4.847.831c-2.045.137-5.843.293-7.663-.507-1.8-1.385-5.286-1.917-5.77-.243-3.947.958-7.41-.288-7.41-.288l-.16-2.667z",fill:"#2B0849"},null),p("path",{d:"M108.824 276.19h3.116s-.103 6.751 4.57 8.62c-4.673.624-8.62-2.32-7.686-8.62",fill:"#A4AABA"},null),p("path",{d:"M57.65 272.52s-2.122 7.47-4.518 12.396c-1.811 3.724-4.255 7.548 5.505 7.548 6.698 0 9.02-.483 7.479-6.648-1.541-6.164.268-13.296.268-13.296H57.65z",fill:"#CBD1D1"},null),p("path",{d:"M51.54 290.04s2.111 1.178 6.682 1.178c6.128 0 8.31-1.662 8.31-1.662s.605 1.122-.624 2.18c-1 .862-3.624 1.603-7.444 1.559-4.177-.049-5.876-.57-6.786-1.177-.831-.554-.692-1.593-.138-2.078",fill:"#2B0849"},null),p("path",{d:"M58.533 274.438s.034 1.529-.315 2.95c-.352 1.431-1.087 3.127-1.139 4.17-.058 1.16 4.57 1.592 5.194.035.623-1.559 1.303-6.475 1.927-7.306.622-.831-4.94-2.135-5.667.15",fill:"#A4AABA"},null),p("path",{d:"M100.885 277.015l13.306.092s1.291-54.228 1.843-64.056c.552-9.828 3.756-43.13.997-62.788l-12.48-.64-22.725.776s-.433 3.944-1.19 9.921c-.062.493-.677.838-.744 1.358-.075.582.42 1.347.318 1.956-2.35 14.003-6.343 32.926-8.697 46.425-.116.663-1.227 1.004-1.45 2.677-.04.3.21 1.516.112 1.785-6.836 18.643-10.89 47.584-14.2 61.551l14.528-.014s2.185-8.524 4.008-16.878c2.796-12.817 22.987-84.553 22.987-84.553l3-.517 1.037 46.1s-.223 1.228.334 2.008c.558.782-.556 1.117-.39 2.233l.39 1.784s-.446 7.14-.892 11.826c-.446 4.685-.092 38.954-.092 38.954",fill:"#7BB2F9"},null),p("path",{d:"M77.438 220.434c1.146.094 4.016-2.008 6.916-4.91M107.55 223.931s2.758-1.103 6.069-3.862",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M108.459 220.905s2.759-1.104 6.07-3.863",stroke:"#648BD8","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M76.099 223.557s2.608-.587 6.47-3.346M87.33 150.82c-.27 3.088.297 8.478-4.315 9.073M104.829 149.075s.11 13.936-1.286 14.983c-2.207 1.655-2.975 1.934-2.975 1.934M101.014 149.63s.035 12.81-1.19 24.245M94.93 174.965s7.174-1.655 9.38-1.655M75.671 204.754c-.316 1.55-.64 3.067-.973 4.535 0 0-1.45 1.822-1.003 3.756.446 1.934-.943 2.034-4.96 15.273-1.686 5.559-4.464 18.49-6.313 27.447-.078.38-4.018 18.06-4.093 18.423M77.043 196.743a313.269 313.269 0 0 1-.877 4.729M83.908 151.414l-1.19 10.413s-1.091.148-.496 2.23c.111 1.34-2.66 15.692-5.153 30.267M57.58 272.94h13.238",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),p("path",{d:"M117.377 147.423s-16.955-3.087-35.7.199c.157 2.501-.002 4.128-.002 4.128s14.607-2.802 35.476-.31c.251-2.342.226-4.017.226-4.017",fill:"#192064"},null),p("path",{d:"M107.511 150.353l.004-4.885a.807.807 0 0 0-.774-.81c-2.428-.092-5.04-.108-7.795-.014a.814.814 0 0 0-.784.81l-.003 4.88c0 .456.371.82.827.808a140.76 140.76 0 0 1 7.688.017.81.81 0 0 0 .837-.806",fill:"#FFF"},null),p("path",{d:"M106.402 149.426l.002-3.06a.64.64 0 0 0-.616-.643 94.135 94.135 0 0 0-5.834-.009.647.647 0 0 0-.626.643l-.001 3.056c0 .36.291.648.651.64 1.78-.04 3.708-.041 5.762.012.36.009.662-.279.662-.64",fill:"#192064"},null),p("path",{d:"M101.485 273.933h12.272M102.652 269.075c.006 3.368.04 5.759.11 6.47M102.667 263.125c-.009 1.53-.015 2.98-.016 4.313M102.204 174.024l.893 44.402s.669 1.561-.224 2.677c-.892 1.116 2.455.67.893 2.231-1.562 1.562.893 1.116 0 3.347-.592 1.48-.988 20.987-1.09 34.956",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null)])]),xle=e=>{const{componentCls:t,lineHeightHeading3:n,iconCls:o,padding:r,paddingXL:i,paddingXS:l,paddingLG:a,marginXS:s,lineHeight:c}=e;return{[t]:{padding:`${a*2}px ${i}px`,"&-rtl":{direction:"rtl"}},[`${t} ${t}-image`]:{width:e.imageWidth,height:e.imageHeight,margin:"auto"},[`${t} ${t}-icon`]:{marginBottom:a,textAlign:"center",[`& > ${o}`]:{fontSize:e.resultIconFontSize}},[`${t} ${t}-title`]:{color:e.colorTextHeading,fontSize:e.resultTitleFontSize,lineHeight:n,marginBlock:s,textAlign:"center"},[`${t} ${t}-subtitle`]:{color:e.colorTextDescription,fontSize:e.resultSubtitleFontSize,lineHeight:c,textAlign:"center"},[`${t} ${t}-content`]:{marginTop:a,padding:`${a}px ${r*2.5}px`,backgroundColor:e.colorFillAlter},[`${t} ${t}-extra`]:{margin:e.resultExtraMargin,textAlign:"center","& > *":{marginInlineEnd:l,"&:last-child":{marginInlineEnd:0}}}}},wle=e=>{const{componentCls:t,iconCls:n}=e;return{[`${t}-success ${t}-icon > ${n}`]:{color:e.resultSuccessIconColor},[`${t}-error ${t}-icon > ${n}`]:{color:e.resultErrorIconColor},[`${t}-info ${t}-icon > ${n}`]:{color:e.resultInfoIconColor},[`${t}-warning ${t}-icon > ${n}`]:{color:e.resultWarningIconColor}}},Ole=e=>[xle(e),wle(e)],Ple=e=>Ole(e),Ile=Xe("Result",e=>{const{paddingLG:t,fontSizeHeading3:n}=e,o=e.fontSize,r=`${t}px 0 0 0`,i=e.colorInfo,l=e.colorError,a=e.colorSuccess,s=e.colorWarning,c=Fe(e,{resultTitleFontSize:n,resultSubtitleFontSize:o,resultIconFontSize:n*3,resultExtraMargin:r,resultInfoIconColor:i,resultErrorIconColor:l,resultSuccessIconColor:a,resultWarningIconColor:s});return[Ple(c)]},{imageWidth:250,imageHeight:295}),Tle={success:mr,error:Un,info:vr,warning:CS},Du={404:Sle,500:$le,403:Cle},Ele=Object.keys(Du),_le=()=>({prefixCls:String,icon:W.any,status:{type:[Number,String],default:"info"},title:W.any,subTitle:W.any,extra:W.any}),Mle=(e,t)=>{let{status:n,icon:o}=t;if(Ele.includes(`${n}`)){const l=Du[n];return p("div",{class:`${e}-icon ${e}-image`},[p(l,null,null)])}const r=Tle[n],i=o||p(r,null,null);return p("div",{class:`${e}-icon`},[i])},Ale=(e,t)=>t&&p("div",{class:`${e}-extra`},[t]),Hl=re({compatConfig:{MODE:3},name:"AResult",inheritAttrs:!1,props:_le(),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ee("result",e),[l,a]=Ile(r),s=I(()=>ce(r.value,a.value,`${r.value}-${e.status}`,{[`${r.value}-rtl`]:i.value==="rtl"}));return()=>{var c,u,d,f,h,m,g,y;const b=(c=e.title)!==null&&c!==void 0?c:(u=n.title)===null||u===void 0?void 0:u.call(n),S=(d=e.subTitle)!==null&&d!==void 0?d:(f=n.subTitle)===null||f===void 0?void 0:f.call(n),$=(h=e.icon)!==null&&h!==void 0?h:(m=n.icon)===null||m===void 0?void 0:m.call(n),x=(g=e.extra)!==null&&g!==void 0?g:(y=n.extra)===null||y===void 0?void 0:y.call(n),C=r.value;return l(p("div",D(D({},o),{},{class:[s.value,o.class]}),[Mle(C,{status:e.status,icon:$}),p("div",{class:`${C}-title`},[b]),S&&p("div",{class:`${C}-subtitle`},[S]),Ale(C,x),n.default&&p("div",{class:`${C}-content`},[n.default()])]))}}});Hl.PRESENTED_IMAGE_403=Du[403];Hl.PRESENTED_IMAGE_404=Du[404];Hl.PRESENTED_IMAGE_500=Du[500];Hl.install=function(e){return e.component(Hl.name,Hl),e};const Rle=At(G1),xS=(e,t)=>{let{attrs:n}=t;const{included:o,vertical:r,style:i,class:l}=n;let{length:a,offset:s,reverse:c}=n;a<0&&(c=!c,a=Math.abs(a),s=100-s);const u=r?{[c?"top":"bottom"]:`${s}%`,[c?"bottom":"top"]:"auto",height:`${a}%`}:{[c?"right":"left"]:`${s}%`,[c?"left":"right"]:"auto",width:`${a}%`},d=v(v({},i),u);return o?p("div",{class:l,style:d},null):null};xS.inheritAttrs=!1;const Dle=(e,t,n,o,r,i)=>{const l=Object.keys(t).map(parseFloat).sort((a,s)=>a-s);if(n&&o)for(let a=r;a<=i;a+=o)l.indexOf(a)===-1&&l.push(a);return l},c_=(e,t)=>{let{attrs:n}=t;const{prefixCls:o,vertical:r,reverse:i,marks:l,dots:a,step:s,included:c,lowerBound:u,upperBound:d,max:f,min:h,dotStyle:m,activeDotStyle:g}=n,y=f-h,b=Dle(r,l,a,s,h,f).map(S=>{const $=`${Math.abs(S-h)/y*100}%`,x=!c&&S===d||c&&S<=d&&S>=u;let C=r?v(v({},m),{[i?"top":"bottom"]:$}):v(v({},m),{[i?"right":"left"]:$});x&&(C=v(v({},C),g));const O=ce({[`${o}-dot`]:!0,[`${o}-dot-active`]:x,[`${o}-dot-reverse`]:i});return p("span",{class:O,style:C,key:S},null)});return p("div",{class:`${o}-step`},[b])};c_.inheritAttrs=!1;const u_=(e,t)=>{let{attrs:n,slots:o}=t;const{class:r,vertical:i,reverse:l,marks:a,included:s,upperBound:c,lowerBound:u,max:d,min:f,onClickLabel:h}=n,m=Object.keys(a),g=o.mark,y=d-f,b=m.map(parseFloat).sort((S,$)=>S-$).map(S=>{const $=typeof a[S]=="function"?a[S]():a[S],x=typeof $=="object"&&!qt($);let C=x?$.label:$;if(!C&&C!==0)return null;g&&(C=g({point:S,label:C}));const O=!s&&S===c||s&&S<=c&&S>=u,w=ce({[`${r}-text`]:!0,[`${r}-text-active`]:O}),P={marginBottom:"-50%",[l?"top":"bottom"]:`${(S-f)/y*100}%`},T={transform:`translateX(${l?"50%":"-50%"})`,msTransform:`translateX(${l?"50%":"-50%"})`,[l?"right":"left"]:`${(S-f)/y*100}%`},M=i?P:T,E=x?v(v({},M),$.style):M,A={[nn?"onTouchstartPassive":"onTouchstart"]:R=>h(R,S)};return p("span",D({class:w,style:E,key:S,onMousedown:R=>h(R,S)},A),[C])});return p("div",{class:r},[b])};u_.inheritAttrs=!1;const d_=re({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:W.oneOfType([W.number,W.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup(e,t){let{attrs:n,emit:o,expose:r}=t;const i=oe(!1),l=oe(),a=()=>{document.activeElement===l.value&&(i.value=!0)},s=y=>{i.value=!1,o("blur",y)},c=()=>{i.value=!1},u=()=>{var y;(y=l.value)===null||y===void 0||y.focus()},d=()=>{var y;(y=l.value)===null||y===void 0||y.blur()},f=()=>{i.value=!0,u()},h=y=>{y.preventDefault(),u(),o("mousedown",y)};r({focus:u,blur:d,clickFocus:f,ref:l});let m=null;Ue(()=>{m=Dt(document,"mouseup",a)}),tt(()=>{m==null||m.remove()});const g=I(()=>{const{vertical:y,offset:b,reverse:S}=e;return y?{[S?"top":"bottom"]:`${b}%`,[S?"bottom":"top"]:"auto",transform:S?null:"translateY(+50%)"}:{[S?"right":"left"]:`${b}%`,[S?"left":"right"]:"auto",transform:`translateX(${S?"+":"-"}50%)`}});return()=>{const{prefixCls:y,disabled:b,min:S,max:$,value:x,tabindex:C,ariaLabel:O,ariaLabelledBy:w,ariaValueTextFormatter:P,onMouseenter:T,onMouseleave:M}=e,E=ce(n.class,{[`${y}-handle-click-focused`]:i.value}),A={"aria-valuemin":S,"aria-valuemax":$,"aria-valuenow":x,"aria-disabled":!!b},R=[n.style,g.value];let F=C||0;(b||C===null)&&(F=null);let _;P&&(_=P(x));const N=v(v(v(v({},n),{role:"slider",tabindex:F}),A),{class:E,onBlur:s,onKeydown:c,onMousedown:h,onMouseenter:T,onMouseleave:M,ref:l,style:R});return p("div",D(D({},N),{},{"aria-label":O,"aria-labelledby":w,"aria-valuetext":_}),null)}}});function qm(e,t){try{return Object.keys(t).some(n=>e.target===t[n].ref)}catch{return!1}}function f_(e,t){let{min:n,max:o}=t;return eo}function C4(e){return e.touches.length>1||e.type.toLowerCase()==="touchend"&&e.touches.length>0}function x4(e,t){let{marks:n,step:o,min:r,max:i}=t;const l=Object.keys(n).map(parseFloat);if(o!==null){const s=Math.pow(10,p_(o)),c=Math.floor((i*s-r*s)/(o*s)),u=Math.min((e-r)/o,c),d=Math.round(u)*o+r;l.push(d)}const a=l.map(s=>Math.abs(e-s));return l[a.indexOf(Math.min(...a))]}function p_(e){const t=e.toString();let n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n}function w4(e,t){let n=1;return window.visualViewport&&(n=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?t.clientY:t.pageX)/n}function O4(e,t){let n=1;return window.visualViewport&&(n=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?t.touches[0].clientY:t.touches[0].pageX)/n}function P4(e,t){const n=t.getBoundingClientRect();return e?n.top+n.height*.5:window.scrollX+n.left+n.width*.5}function wS(e,t){let{max:n,min:o}=t;return e<=o?o:e>=n?n:e}function h_(e,t){const{step:n}=t,o=isFinite(x4(e,t))?x4(e,t):0;return n===null?o:parseFloat(o.toFixed(p_(n)))}function hs(e){e.stopPropagation(),e.preventDefault()}function Nle(e,t,n){const o={increase:(l,a)=>l+a,decrease:(l,a)=>l-a},r=o[e](Object.keys(n.marks).indexOf(JSON.stringify(t)),1),i=Object.keys(n.marks)[r];return n.step?o[e](t,n.step):Object.keys(n.marks).length&&n.marks[i]?n.marks[i]:t}function g_(e,t,n){const o="increase",r="decrease";let i=o;switch(e.keyCode){case Ie.UP:i=t&&n?r:o;break;case Ie.RIGHT:i=!t&&n?r:o;break;case Ie.DOWN:i=t&&n?o:r;break;case Ie.LEFT:i=!t&&n?o:r;break;case Ie.END:return(l,a)=>a.max;case Ie.HOME:return(l,a)=>a.min;case Ie.PAGE_UP:return(l,a)=>l+a.step*2;case Ie.PAGE_DOWN:return(l,a)=>l-a.step*2;default:return}return(l,a)=>Nle(i,l,a)}var Ble=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{this.document=this.sliderRef&&this.sliderRef.ownerDocument;const{autofocus:n,disabled:o}=this;n&&!o&&this.focus()})},beforeUnmount(){this.$nextTick(()=>{this.removeDocumentEvents()})},methods:{defaultHandle(n){var{index:o,directives:r,className:i,style:l}=n,a=Ble(n,["index","directives","className","style"]);if(delete a.dragging,a.value===null)return null;const s=v(v({},a),{class:i,style:l,key:o});return p(d_,s,null)},onDown(n,o){let r=o;const{draggableTrack:i,vertical:l}=this.$props,{bounds:a}=this.$data,s=i&&this.positionGetValue?this.positionGetValue(r)||[]:[],c=qm(n,this.handlesRefs);if(this.dragTrack=i&&a.length>=2&&!c&&!s.map((u,d)=>{const f=d?!0:u>=a[d];return d===s.length-1?u<=a[d]:f}).some(u=>!u),this.dragTrack)this.dragOffset=r,this.startBounds=[...a];else{if(!c)this.dragOffset=0;else{const u=P4(l,n.target);this.dragOffset=r-u,r=u}this.onStart(r)}},onMouseDown(n){if(n.button!==0)return;this.removeDocumentEvents();const o=this.$props.vertical,r=w4(o,n);this.onDown(n,r),this.addDocumentMouseEvents()},onTouchStart(n){if(C4(n))return;const o=this.vertical,r=O4(o,n);this.onDown(n,r),this.addDocumentTouchEvents(),hs(n)},onFocus(n){const{vertical:o}=this;if(qm(n,this.handlesRefs)&&!this.dragTrack){const r=P4(o,n.target);this.dragOffset=0,this.onStart(r),hs(n),this.$emit("focus",n)}},onBlur(n){this.dragTrack||this.onEnd(),this.$emit("blur",n)},onMouseUp(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove(n){if(!this.sliderRef){this.onEnd();return}const o=w4(this.vertical,n);this.onMove(n,o-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove(n){if(C4(n)||!this.sliderRef){this.onEnd();return}const o=O4(this.vertical,n);this.onMove(n,o-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown(n){this.sliderRef&&qm(n,this.handlesRefs)&&this.onKeyboard(n)},onClickMarkLabel(n,o){n.stopPropagation(),this.onChange({sValue:o}),this.setState({sValue:o},()=>this.onEnd(!0))},getSliderStart(){const n=this.sliderRef,{vertical:o,reverse:r}=this,i=n.getBoundingClientRect();return o?r?i.bottom:i.top:window.scrollX+(r?i.right:i.left)},getSliderLength(){const n=this.sliderRef;if(!n)return 0;const o=n.getBoundingClientRect();return this.vertical?o.height:o.width},addDocumentTouchEvents(){this.onTouchMoveListener=Dt(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=Dt(this.document,"touchend",this.onEnd)},addDocumentMouseEvents(){this.onMouseMoveListener=Dt(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=Dt(this.document,"mouseup",this.onEnd)},removeDocumentEvents(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus(){var n;this.$props.disabled||(n=this.handlesRefs[0])===null||n===void 0||n.focus()},blur(){this.$props.disabled||Object.keys(this.handlesRefs).forEach(n=>{var o,r;(r=(o=this.handlesRefs[n])===null||o===void 0?void 0:o.blur)===null||r===void 0||r.call(o)})},calcValue(n){const{vertical:o,min:r,max:i}=this,l=Math.abs(Math.max(n,0)/this.getSliderLength());return o?(1-l)*(i-r)+r:l*(i-r)+r},calcValueByPos(n){const r=(this.reverse?-1:1)*(n-this.getSliderStart());return this.trimAlignValue(this.calcValue(r))},calcOffset(n){const{min:o,max:r}=this,i=(n-o)/(r-o);return Math.max(0,i*100)},saveSlider(n){this.sliderRef=n},saveHandle(n,o){this.handlesRefs[n]=o}},render(){const{prefixCls:n,marks:o,dots:r,step:i,included:l,disabled:a,vertical:s,reverse:c,min:u,max:d,maximumTrackStyle:f,railStyle:h,dotStyle:m,activeDotStyle:g,id:y}=this,{class:b,style:S}=this.$attrs,{tracks:$,handles:x}=this.renderSlider(),C=ce(n,b,{[`${n}-with-marks`]:Object.keys(o).length,[`${n}-disabled`]:a,[`${n}-vertical`]:s,[`${n}-horizontal`]:!s}),O={vertical:s,marks:o,included:l,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:d,min:u,reverse:c,class:`${n}-mark`,onClickLabel:a?ml:this.onClickMarkLabel},w={[nn?"onTouchstartPassive":"onTouchstart"]:a?ml:this.onTouchStart};return p("div",D(D({id:y,ref:this.saveSlider,tabindex:"-1",class:C},w),{},{onMousedown:a?ml:this.onMouseDown,onMouseup:a?ml:this.onMouseUp,onKeydown:a?ml:this.onKeyDown,onFocus:a?ml:this.onFocus,onBlur:a?ml:this.onBlur,style:S}),[p("div",{class:`${n}-rail`,style:v(v({},f),h)},null),$,p(c_,{prefixCls:n,vertical:s,reverse:c,marks:o,dots:r,step:i,included:l,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:d,min:u,dotStyle:m,activeDotStyle:g},null),x,p(u_,O,{mark:this.$slots.mark}),ih(this)])}})}const Lle=re({compatConfig:{MODE:3},name:"Slider",mixins:[sa],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:W.oneOfType([W.number,W.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data(){const e=this.defaultValue!==void 0?this.defaultValue:this.min,t=this.value!==void 0?this.value:e;return{sValue:this.trimAlignValue(t),dragging:!1}},watch:{value:{handler(e){this.setChangeValue(e)},deep:!0},min(){const{sValue:e}=this;this.setChangeValue(e)},max(){const{sValue:e}=this;this.setChangeValue(e)}},methods:{setChangeValue(e){const t=e!==void 0?e:this.sValue,n=this.trimAlignValue(t,this.$props);n!==this.sValue&&(this.setState({sValue:n}),f_(t,this.$props)&&this.$emit("change",n))},onChange(e){const t=!Qr(this,"value"),n=e.sValue>this.max?v(v({},e),{sValue:this.max}):e;t&&this.setState(n);const o=n.sValue;this.$emit("change",o)},onStart(e){this.setState({dragging:!0});const{sValue:t}=this;this.$emit("beforeChange",t);const n=this.calcValueByPos(e);this.startValue=n,this.startPosition=e,n!==t&&(this.prevMovedHandleIndex=0,this.onChange({sValue:n}))},onEnd(e){const{dragging:t}=this;this.removeDocumentEvents(),(t||e)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove(e,t){hs(e);const{sValue:n}=this,o=this.calcValueByPos(t);o!==n&&this.onChange({sValue:o})},onKeyboard(e){const{reverse:t,vertical:n}=this.$props,o=g_(e,n,t);if(o){hs(e);const{sValue:r}=this,i=o(r,this.$props),l=this.trimAlignValue(i);if(l===r)return;this.onChange({sValue:l}),this.$emit("afterChange",l),this.onEnd()}},getLowerBound(){const e=this.$props.startPoint||this.$props.min;return this.$data.sValue>e?e:this.$data.sValue},getUpperBound(){return this.$data.sValue1&&arguments[1]!==void 0?arguments[1]:{};if(e===null)return null;const n=v(v({},this.$props),t),o=wS(e,n);return h_(o,n)},getTrack(e){let{prefixCls:t,reverse:n,vertical:o,included:r,minimumTrackStyle:i,mergedTrackStyle:l,length:a,offset:s}=e;return p(xS,{class:`${t}-track`,vertical:o,included:r,offset:s,reverse:n,length:a,style:v(v({},i),l)},null)},renderSlider(){const{prefixCls:e,vertical:t,included:n,disabled:o,minimumTrackStyle:r,trackStyle:i,handleStyle:l,tabindex:a,ariaLabelForHandle:s,ariaLabelledByForHandle:c,ariaValueTextFormatterForHandle:u,min:d,max:f,startPoint:h,reverse:m,handle:g,defaultHandle:y}=this,b=g||y,{sValue:S,dragging:$}=this,x=this.calcOffset(S),C=b({class:`${e}-handle`,prefixCls:e,vertical:t,offset:x,value:S,dragging:$,disabled:o,min:d,max:f,reverse:m,index:0,tabindex:a,ariaLabel:s,ariaLabelledBy:c,ariaValueTextFormatter:u,style:l[0]||l,ref:P=>this.saveHandle(0,P),onFocus:this.onFocus,onBlur:this.onBlur}),O=h!==void 0?this.calcOffset(h):0,w=i[0]||i;return{tracks:this.getTrack({prefixCls:e,reverse:m,vertical:t,included:n,offset:O,minimumTrackStyle:r,mergedTrackStyle:w,length:x-O}),handles:C}}}}),kle=m_(Lle),Gs=e=>{let{value:t,handle:n,bounds:o,props:r}=e;const{allowCross:i,pushable:l}=r,a=Number(l),s=wS(t,r);let c=s;return!i&&n!=null&&o!==void 0&&(n>0&&s<=o[n-1]+a&&(c=o[n-1]+a),n=o[n+1]-a&&(c=o[n+1]-a)),h_(c,r)},Fle={defaultValue:W.arrayOf(W.number),value:W.arrayOf(W.number),count:Number,pushable:g8(W.oneOfType([W.looseBool,W.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:W.arrayOf(W.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},zle=re({compatConfig:{MODE:3},name:"Range",mixins:[sa],inheritAttrs:!1,props:et(Fle,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data(){const{count:e,min:t,max:n}=this,o=Array(...Array(e+1)).map(()=>t),r=Qr(this,"defaultValue")?this.defaultValue:o;let{value:i}=this;i===void 0&&(i=r);const l=i.map((s,c)=>Gs({value:s,handle:c,props:this.$props}));return{sHandle:null,recent:l[0]===n?0:l.length-1,bounds:l}},watch:{value:{handler(e){const{bounds:t}=this;this.setChangeValue(e||t)},deep:!0},min(){const{value:e}=this;this.setChangeValue(e||this.bounds)},max(){const{value:e}=this;this.setChangeValue(e||this.bounds)}},methods:{setChangeValue(e){const{bounds:t}=this;let n=e.map((o,r)=>Gs({value:o,handle:r,bounds:t,props:this.$props}));if(t.length===n.length){if(n.every((o,r)=>o===t[r]))return null}else n=e.map((o,r)=>Gs({value:o,handle:r,props:this.$props}));if(this.setState({bounds:n}),e.some(o=>f_(o,this.$props))){const o=e.map(r=>wS(r,this.$props));this.$emit("change",o)}},onChange(e){if(!Qr(this,"value"))this.setState(e);else{const r={};["sHandle","recent"].forEach(i=>{e[i]!==void 0&&(r[i]=e[i])}),Object.keys(r).length&&this.setState(r)}const o=v(v({},this.$data),e).bounds;this.$emit("change",o)},positionGetValue(e){const t=this.getValue(),n=this.calcValueByPos(e),o=this.getClosestBound(n),r=this.getBoundNeedMoving(n,o),i=t[r];if(n===i)return null;const l=[...t];return l[r]=n,l},onStart(e){const{bounds:t}=this;this.$emit("beforeChange",t);const n=this.calcValueByPos(e);this.startValue=n,this.startPosition=e;const o=this.getClosestBound(n);this.prevMovedHandleIndex=this.getBoundNeedMoving(n,o),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});const r=t[this.prevMovedHandleIndex];if(n===r)return;const i=[...t];i[this.prevMovedHandleIndex]=n,this.onChange({bounds:i})},onEnd(e){const{sHandle:t}=this;this.removeDocumentEvents(),t||(this.dragTrack=!1),(t!==null||e)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove(e,t,n,o){hs(e);const{$data:r,$props:i}=this,l=i.max||100,a=i.min||0;if(n){let f=i.vertical?-t:t;f=i.reverse?-f:f;const h=l-Math.max(...o),m=a-Math.min(...o),g=Math.min(Math.max(f/(this.getSliderLength()/100),m),h),y=o.map(b=>Math.floor(Math.max(Math.min(b+g,l),a)));r.bounds.map((b,S)=>b===y[S]).some(b=>!b)&&this.onChange({bounds:y});return}const{bounds:s,sHandle:c}=this,u=this.calcValueByPos(t),d=s[c];u!==d&&this.moveTo(u)},onKeyboard(e){const{reverse:t,vertical:n}=this.$props,o=g_(e,n,t);if(o){hs(e);const{bounds:r,sHandle:i}=this,l=r[i===null?this.recent:i],a=o(l,this.$props),s=Gs({value:a,handle:i,bounds:r,props:this.$props});if(s===l)return;this.moveTo(s,!0)}},getClosestBound(e){const{bounds:t}=this;let n=0;for(let o=1;o=t[o]&&(n=o);return Math.abs(t[n+1]-e)a-s),this.internalPointsCache={marks:e,step:t,points:l}}return this.internalPointsCache.points},moveTo(e,t){const n=[...this.bounds],{sHandle:o,recent:r}=this,i=o===null?r:o;n[i]=e;let l=i;this.$props.pushable!==!1?this.pushSurroundingHandles(n,l):this.$props.allowCross&&(n.sort((a,s)=>a-s),l=n.indexOf(e)),this.onChange({recent:l,sHandle:l,bounds:n}),t&&(this.$emit("afterChange",n),this.setState({},()=>{this.handlesRefs[l].focus()}),this.onEnd())},pushSurroundingHandles(e,t){const n=e[t],{pushable:o}=this,r=Number(o);let i=0;if(e[t+1]-n=o.length||i<0)return!1;const l=t+n,a=o[i],{pushable:s}=this,c=Number(s),u=n*(e[l]-a);return this.pushHandle(e,l,n,c-u)?(e[t]=a,!0):!1},trimAlignValue(e){const{sHandle:t,bounds:n}=this;return Gs({value:e,handle:t,bounds:n,props:this.$props})},ensureValueNotConflict(e,t,n){let{allowCross:o,pushable:r}=n;const i=this.$data||{},{bounds:l}=i;if(e=e===void 0?i.sHandle:e,r=Number(r),!o&&e!=null&&l!==void 0){if(e>0&&t<=l[e-1]+r)return l[e-1]+r;if(e=l[e+1]-r)return l[e+1]-r}return t},getTrack(e){let{bounds:t,prefixCls:n,reverse:o,vertical:r,included:i,offsets:l,trackStyle:a}=e;return t.slice(0,-1).map((s,c)=>{const u=c+1,d=ce({[`${n}-track`]:!0,[`${n}-track-${u}`]:!0});return p(xS,{class:d,vertical:r,reverse:o,included:i,offset:l[u-1],length:l[u]-l[u-1],style:a[c],key:u},null)})},renderSlider(){const{sHandle:e,bounds:t,prefixCls:n,vertical:o,included:r,disabled:i,min:l,max:a,reverse:s,handle:c,defaultHandle:u,trackStyle:d,handleStyle:f,tabindex:h,ariaLabelGroupForHandles:m,ariaLabelledByGroupForHandles:g,ariaValueTextFormatterGroupForHandles:y}=this,b=c||u,S=t.map(C=>this.calcOffset(C)),$=`${n}-handle`,x=t.map((C,O)=>{let w=h[O]||0;(i||h[O]===null)&&(w=null);const P=e===O;return b({class:ce({[$]:!0,[`${$}-${O+1}`]:!0,[`${$}-dragging`]:P}),prefixCls:n,vertical:o,dragging:P,offset:S[O],value:C,index:O,tabindex:w,min:l,max:a,reverse:s,disabled:i,style:f[O],ref:T=>this.saveHandle(O,T),onFocus:this.onFocus,onBlur:this.onBlur,ariaLabel:m[O],ariaLabelledBy:g[O],ariaValueTextFormatter:y[O]})});return{tracks:this.getTrack({bounds:t,prefixCls:n,reverse:s,vertical:o,included:r,offsets:S,trackStyle:d}),handles:x}}}}),Hle=m_(zle),jle=re({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:BI(),setup(e,t){let{attrs:n,slots:o}=t;const r=ie(null),i=ie(null);function l(){Qe.cancel(i.value),i.value=null}function a(){i.value=Qe(()=>{var c;(c=r.value)===null||c===void 0||c.forcePopupAlign(),i.value=null})}const s=()=>{l(),e.open&&a()};return Se([()=>e.open,()=>e.title],()=>{s()},{flush:"post",immediate:!0}),Zp(()=>{s()}),tt(()=>{l()}),()=>p(ho,D(D({ref:r},e),n),o)}}),Vle=e=>{const{componentCls:t,controlSize:n,dotSize:o,marginFull:r,marginPart:i,colorFillContentHover:l}=e;return{[t]:v(v({},Ze(e)),{position:"relative",height:n,margin:`${i}px ${r}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${r}px ${i}px`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.colorFillTertiary,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${t}-track`]:{position:"absolute",backgroundColor:e.colorPrimaryBorder,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},"&:hover":{[`${t}-rail`]:{backgroundColor:e.colorFillSecondary},[`${t}-track`]:{backgroundColor:e.colorPrimaryBorderHover},[`${t}-dot`]:{borderColor:l},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.colorPrimary}},[`${t}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${t}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+e.handleLineWidth*2,height:e.handleSize+e.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:` + inset-inline-start ${e.motionDurationMid}, + inset-block-start ${e.motionDurationMid}, + width ${e.motionDurationMid}, + height ${e.motionDurationMid}, + box-shadow ${e.motionDurationMid} + `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),insetBlockStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),width:e.handleSizeHover+e.handleLineWidthHover*2,height:e.handleSizeHover+e.handleLineWidthHover*2},"&::after":{boxShadow:`0 0 0 ${e.handleLineWidthHover}px ${e.colorPrimary}`,width:e.handleSizeHover,height:e.handleSizeHover,insetInlineStart:(e.handleSize-e.handleSizeHover)/2,insetBlockStart:(e.handleSize-e.handleSizeHover)/2}}},[`${t}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${t}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${t}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${t}-dot`]:{position:"absolute",width:o,height:o,backgroundColor:e.colorBgElevated,border:`${e.handleLineWidth}px solid ${e.colorBorderSecondary}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,"&-active":{borderColor:e.colorPrimaryBorder}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-rail`]:{backgroundColor:`${e.colorFillSecondary} !important`},[`${t}-track`]:{backgroundColor:`${e.colorTextDisabled} !important`},[` + ${t}-dot + `]:{backgroundColor:e.colorBgElevated,borderColor:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:e.handleSize,height:e.handleSize,boxShadow:`0 0 0 ${e.handleLineWidth}px ${new vt(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString()}`,insetInlineStart:0,insetBlockStart:0},[` + ${t}-mark-text, + ${t}-dot + `]:{cursor:"not-allowed !important"}}})}},v_=(e,t)=>{const{componentCls:n,railSize:o,handleSize:r,dotSize:i}=e,l=t?"paddingBlock":"paddingInline",a=t?"width":"height",s=t?"height":"width",c=t?"insetBlockStart":"insetInlineStart",u=t?"top":"insetInlineStart";return{[l]:o,[s]:o*3,[`${n}-rail`]:{[a]:"100%",[s]:o},[`${n}-track`]:{[s]:o},[`${n}-handle`]:{[c]:(o*3-r)/2},[`${n}-mark`]:{insetInlineStart:0,top:0,[u]:r,[a]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[u]:o,[a]:"100%",[s]:o},[`${n}-dot`]:{position:"absolute",[c]:(o-i)/2}}},Wle=e=>{const{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:v(v({},v_(e,!0)),{[`&${t}-with-marks`]:{marginBottom:n}})}},Kle=e=>{const{componentCls:t}=e;return{[`${t}-vertical`]:v(v({},v_(e,!1)),{height:"100%"})}},Ule=Xe("Slider",e=>{const t=Fe(e,{marginPart:(e.controlHeight-e.controlSize)/2,marginFull:e.controlSize/2,marginPartWithMark:e.controlHeightLG-e.controlSize});return[Vle(t),Wle(t),Kle(t)]},e=>{const n=e.controlHeightLG/4,o=e.controlHeightSM/2,r=e.lineWidth+1,i=e.lineWidth+1*3;return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:o,dotSize:8,handleLineWidth:r,handleLineWidthHover:i}});var I4=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rtypeof e=="number"?e.toString():"",Xle=()=>({id:String,prefixCls:String,tooltipPrefixCls:String,range:ze([Boolean,Object]),reverse:Ce(),min:Number,max:Number,step:ze([Object,Number]),marks:Ne(),dots:Ce(),value:ze([Array,Number]),defaultValue:ze([Array,Number]),included:Ce(),disabled:Ce(),vertical:Ce(),tipFormatter:ze([Function,Object],()=>Gle),tooltipOpen:Ce(),tooltipVisible:Ce(),tooltipPlacement:Be(),getTooltipPopupContainer:ve(),autofocus:Ce(),handleStyle:ze([Array,Object]),trackStyle:ze([Array,Object]),onChange:ve(),onAfterChange:ve(),onFocus:ve(),onBlur:ve(),"onUpdate:value":ve()}),Yle=re({compatConfig:{MODE:3},name:"ASlider",inheritAttrs:!1,props:Xle(),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r,expose:i}=t;const{prefixCls:l,rootPrefixCls:a,direction:s,getPopupContainer:c,configProvider:u}=Ee("slider",e),[d,f]=Ule(l),h=ln(),m=ie(),g=ie({}),y=(w,P)=>{g.value[w]=P},b=I(()=>e.tooltipPlacement?e.tooltipPlacement:e.vertical?s.value==="rtl"?"left":"right":"top"),S=()=>{var w;(w=m.value)===null||w===void 0||w.focus()},$=()=>{var w;(w=m.value)===null||w===void 0||w.blur()},x=w=>{r("update:value",w),r("change",w),h.onFieldChange()},C=w=>{r("blur",w)};i({focus:S,blur:$});const O=w=>{var{tooltipPrefixCls:P}=w,T=w.info,{value:M,dragging:E,index:A}=T,R=I4(T,["value","dragging","index"]);const{tipFormatter:F,tooltipOpen:_=e.tooltipVisible,getTooltipPopupContainer:N}=e,B=F?g.value[A]||E:!1,L=_||_===void 0&&B;return p(jle,{prefixCls:P,title:F?F(M):"",open:L,placement:b.value,transitionName:`${a.value}-zoom-down`,key:A,overlayClassName:`${l.value}-tooltip`,getPopupContainer:N||(c==null?void 0:c.value)},{default:()=>[p(d_,D(D({},R),{},{value:M,onMouseenter:()=>y(A,!0),onMouseleave:()=>y(A,!1)}),null)]})};return()=>{const{tooltipPrefixCls:w,range:P,id:T=h.id.value}=e,M=I4(e,["tooltipPrefixCls","range","id"]),E=u.getPrefixCls("tooltip",w),A=ce(n.class,{[`${l.value}-rtl`]:s.value==="rtl"},f.value);s.value==="rtl"&&!M.vertical&&(M.reverse=!M.reverse);let R;return typeof P=="object"&&(R=P.draggableTrack),d(P?p(Hle,D(D(D({},n),M),{},{step:M.step,draggableTrack:R,class:A,ref:m,handle:F=>O({tooltipPrefixCls:E,prefixCls:l.value,info:F}),prefixCls:l.value,onChange:x,onBlur:C}),{mark:o.mark}):p(kle,D(D(D({},n),M),{},{id:T,step:M.step,class:A,ref:m,handle:F=>O({tooltipPrefixCls:E,prefixCls:l.value,info:F}),prefixCls:l.value,onChange:x,onBlur:C}),{mark:o.mark}))}}}),qle=At(Yle);function T4(e){return typeof e=="string"}function Zle(){}const b_=()=>({prefixCls:String,itemWidth:String,active:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},status:Be(),iconPrefix:String,icon:W.any,adjustMarginRight:String,stepNumber:Number,stepIndex:Number,description:W.any,title:W.any,subTitle:W.any,progressDot:g8(W.oneOfType([W.looseBool,W.func])),tailContent:W.any,icons:W.shape({finish:W.any,error:W.any}).loose,onClick:ve(),onStepClick:ve(),stepIcon:ve(),itemRender:ve(),__legacy:Ce()}),y_=re({compatConfig:{MODE:3},name:"Step",inheritAttrs:!1,props:b_(),setup(e,t){let{slots:n,emit:o,attrs:r}=t;const i=a=>{o("click",a),o("stepClick",e.stepIndex)},l=a=>{let{icon:s,title:c,description:u}=a;const{prefixCls:d,stepNumber:f,status:h,iconPrefix:m,icons:g,progressDot:y=n.progressDot,stepIcon:b=n.stepIcon}=e;let S;const $=ce(`${d}-icon`,`${m}icon`,{[`${m}icon-${s}`]:s&&T4(s),[`${m}icon-check`]:!s&&h==="finish"&&(g&&!g.finish||!g),[`${m}icon-cross`]:!s&&h==="error"&&(g&&!g.error||!g)}),x=p("span",{class:`${d}-icon-dot`},null);return y?typeof y=="function"?S=p("span",{class:`${d}-icon`},[y({iconDot:x,index:f-1,status:h,title:c,description:u,prefixCls:d})]):S=p("span",{class:`${d}-icon`},[x]):s&&!T4(s)?S=p("span",{class:`${d}-icon`},[s]):g&&g.finish&&h==="finish"?S=p("span",{class:`${d}-icon`},[g.finish]):g&&g.error&&h==="error"?S=p("span",{class:`${d}-icon`},[g.error]):s||h==="finish"||h==="error"?S=p("span",{class:$},null):S=p("span",{class:`${d}-icon`},[f]),b&&(S=b({index:f-1,status:h,title:c,description:u,node:S})),S};return()=>{var a,s,c,u;const{prefixCls:d,itemWidth:f,active:h,status:m="wait",tailContent:g,adjustMarginRight:y,disabled:b,title:S=(a=n.title)===null||a===void 0?void 0:a.call(n),description:$=(s=n.description)===null||s===void 0?void 0:s.call(n),subTitle:x=(c=n.subTitle)===null||c===void 0?void 0:c.call(n),icon:C=(u=n.icon)===null||u===void 0?void 0:u.call(n),onClick:O,onStepClick:w}=e,P=m||"wait",T=ce(`${d}-item`,`${d}-item-${P}`,{[`${d}-item-custom`]:C,[`${d}-item-active`]:h,[`${d}-item-disabled`]:b===!0}),M={};f&&(M.width=f),y&&(M.marginRight=y);const E={onClick:O||Zle};w&&!b&&(E.role="button",E.tabindex=0,E.onClick=i);const A=p("div",D(D({},rt(r,["__legacy"])),{},{class:[T,r.class],style:[r.style,M]}),[p("div",D(D({},E),{},{class:`${d}-item-container`}),[p("div",{class:`${d}-item-tail`},[g]),p("div",{class:`${d}-item-icon`},[l({icon:C,title:S,description:$})]),p("div",{class:`${d}-item-content`},[p("div",{class:`${d}-item-title`},[S,x&&p("div",{title:typeof x=="string"?x:void 0,class:`${d}-item-subtitle`},[x])]),$&&p("div",{class:`${d}-item-description`},[$])])])]);return e.itemRender?e.itemRender(A):A}}});var Jle=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r[]),icons:W.shape({finish:W.any,error:W.any}).loose,stepIcon:ve(),isInline:W.looseBool,itemRender:ve()},emits:["change"],setup(e,t){let{slots:n,emit:o}=t;const r=a=>{const{current:s}=e;s!==a&&o("change",a)},i=(a,s,c)=>{const{prefixCls:u,iconPrefix:d,status:f,current:h,initial:m,icons:g,stepIcon:y=n.stepIcon,isInline:b,itemRender:S,progressDot:$=n.progressDot}=e,x=b||$,C=v(v({},a),{class:""}),O=m+s,w={active:O===h,stepNumber:O+1,stepIndex:O,key:O,prefixCls:u,iconPrefix:d,progressDot:x,stepIcon:y,icons:g,onStepClick:r};return f==="error"&&s===h-1&&(C.class=`${u}-next-error`),C.status||(O===h?C.status=f:OS(C,P)),p(y_,D(D(D({},C),w),{},{__legacy:!1}),null))},l=(a,s)=>i(v({},a.props),s,c=>ht(a,c));return()=>{var a;const{prefixCls:s,direction:c,type:u,labelPlacement:d,iconPrefix:f,status:h,size:m,current:g,progressDot:y=n.progressDot,initial:b,icons:S,items:$,isInline:x,itemRender:C}=e,O=Jle(e,["prefixCls","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","initial","icons","items","isInline","itemRender"]),w=u==="navigation",P=x||y,T=x?"horizontal":c,M=x?void 0:m,E=P?"vertical":d,A=ce(s,`${s}-${c}`,{[`${s}-${M}`]:M,[`${s}-label-${E}`]:T==="horizontal",[`${s}-dot`]:!!P,[`${s}-navigation`]:w,[`${s}-inline`]:x});return p("div",D({class:A},O),[$.filter(R=>R).map((R,F)=>i(R,F)),Nt((a=n.default)===null||a===void 0?void 0:a.call(n)).map(l)])}}}),eae=e=>{const{componentCls:t,stepsIconCustomTop:n,stepsIconCustomSize:o,stepsIconCustomFontSize:r}=e;return{[`${t}-item-custom`]:{[`> ${t}-item-container > ${t}-item-icon`]:{height:"auto",background:"none",border:0,[`> ${t}-icon`]:{top:n,width:o,height:o,fontSize:r,lineHeight:`${o}px`}}},[`&:not(${t}-vertical)`]:{[`${t}-item-custom`]:{[`${t}-item-icon`]:{width:"auto",background:"none"}}}}},tae=e=>{const{componentCls:t,stepsIconSize:n,lineHeight:o,stepsSmallIconSize:r}=e;return{[`&${t}-label-vertical`]:{[`${t}-item`]:{overflow:"visible","&-tail":{marginInlineStart:n/2+e.controlHeightLG,padding:`${e.paddingXXS}px ${e.paddingLG}px`},"&-content":{display:"block",width:(n/2+e.controlHeightLG)*2,marginTop:e.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:e.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:e.marginXXS,marginInlineStart:0,lineHeight:o}},[`&${t}-small:not(${t}-dot)`]:{[`${t}-item`]:{"&-icon":{marginInlineStart:e.controlHeightLG+(n-r)/2}}}}}},nae=e=>{const{componentCls:t,stepsNavContentMaxWidth:n,stepsNavArrowColor:o,stepsNavActiveColor:r,motionDurationSlow:i}=e;return{[`&${t}-navigation`]:{paddingTop:e.paddingSM,[`&${t}-small`]:{[`${t}-item`]:{"&-container":{marginInlineStart:-e.marginSM}}},[`${t}-item`]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:-e.margin,paddingBottom:e.paddingSM,textAlign:"start",transition:`opacity ${i}`,[`${t}-item-content`]:{maxWidth:n},[`${t}-item-title`]:v(v({maxWidth:"100%",paddingInlineEnd:0},Zt),{"&::after":{display:"none"}})},[`&:not(${t}-item-active)`]:{[`${t}-item-container[role='button']`]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:`calc(50% - ${e.paddingSM/2}px)`,insetInlineStart:"100%",display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,borderTop:`${e.lineWidth}px ${e.lineType} ${o}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${o}`,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:e.lineWidthBold,backgroundColor:r,transition:`width ${i}, inset-inline-start ${i}`,transitionTimingFunction:"ease-out",content:'""'}},[`${t}-item${t}-item-active::before`]:{insetInlineStart:0,width:"100%"}},[`&${t}-navigation${t}-vertical`]:{[`> ${t}-item`]:{marginInlineEnd:0,"&::before":{display:"none"},[`&${t}-item-active::before`]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:e.lineWidth*3,height:`calc(100% - ${e.marginLG}px)`},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:e.controlHeight*.25,height:e.controlHeight*.25,marginBottom:e.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},[`> ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}},[`&${t}-navigation${t}-horizontal`]:{[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{visibility:"hidden"}}}},oae=e=>{const{antCls:t,componentCls:n}=e;return{[`&${n}-with-progress`]:{[`${n}-item`]:{paddingTop:e.paddingXXS,[`&-process ${n}-item-container ${n}-item-icon ${n}-icon`]:{color:e.processIconColor}},[`&${n}-vertical > ${n}-item `]:{paddingInlineStart:e.paddingXXS,[`> ${n}-item-container > ${n}-item-tail`]:{top:e.marginXXS,insetInlineStart:e.stepsIconSize/2-e.lineWidth+e.paddingXXS}},[`&, &${n}-small`]:{[`&${n}-horizontal ${n}-item:first-child`]:{paddingBottom:e.paddingXXS,paddingInlineStart:e.paddingXXS}},[`&${n}-small${n}-vertical > ${n}-item > ${n}-item-container > ${n}-item-tail`]:{insetInlineStart:e.stepsSmallIconSize/2-e.lineWidth+e.paddingXXS},[`&${n}-label-vertical`]:{[`${n}-item ${n}-item-tail`]:{top:e.margin-2*e.lineWidth}},[`${n}-item-icon`]:{position:"relative",[`${t}-progress`]:{position:"absolute",insetBlockStart:(e.stepsIconSize-e.stepsProgressSize-e.lineWidth*2)/2,insetInlineStart:(e.stepsIconSize-e.stepsProgressSize-e.lineWidth*2)/2}}}}},rae=e=>{const{componentCls:t,descriptionWidth:n,lineHeight:o,stepsCurrentDotSize:r,stepsDotSize:i,motionDurationSlow:l}=e;return{[`&${t}-dot, &${t}-dot${t}-small`]:{[`${t}-item`]:{"&-title":{lineHeight:o},"&-tail":{top:Math.floor((e.stepsDotSize-e.lineWidth*3)/2),width:"100%",marginTop:0,marginBottom:0,marginInline:`${n/2}px 0`,padding:0,"&::after":{width:`calc(100% - ${e.marginSM*2}px)`,height:e.lineWidth*3,marginInlineStart:e.marginSM}},"&-icon":{width:i,height:i,marginInlineStart:(e.descriptionWidth-i)/2,paddingInlineEnd:0,lineHeight:`${i}px`,background:"transparent",border:0,[`${t}-icon-dot`]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:`all ${l}`,"&::after":{position:"absolute",top:-e.marginSM,insetInlineStart:(i-e.controlHeightLG*1.5)/2,width:e.controlHeightLG*1.5,height:e.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:n},[`&-process ${t}-item-icon`]:{position:"relative",top:(i-r)/2,width:r,height:r,lineHeight:`${r}px`,background:"none",marginInlineStart:(e.descriptionWidth-r)/2},[`&-process ${t}-icon`]:{[`&:first-child ${t}-icon-dot`]:{insetInlineStart:0}}}},[`&${t}-vertical${t}-dot`]:{[`${t}-item-icon`]:{marginTop:(e.controlHeight-i)/2,marginInlineStart:0,background:"none"},[`${t}-item-process ${t}-item-icon`]:{marginTop:(e.controlHeight-r)/2,top:0,insetInlineStart:(i-r)/2,marginInlineStart:0},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:(e.controlHeight-i)/2,insetInlineStart:0,margin:0,padding:`${i+e.paddingXS}px 0 ${e.paddingXS}px`,"&::after":{marginInlineStart:(i-e.lineWidth)/2}},[`&${t}-small`]:{[`${t}-item-icon`]:{marginTop:(e.controlHeightSM-i)/2},[`${t}-item-process ${t}-item-icon`]:{marginTop:(e.controlHeightSM-r)/2},[`${t}-item > ${t}-item-container > ${t}-item-tail`]:{top:(e.controlHeightSM-i)/2}},[`${t}-item:first-child ${t}-icon-dot`]:{insetInlineStart:0},[`${t}-item-content`]:{width:"inherit"}}}},iae=e=>{const{componentCls:t}=e;return{[`&${t}-rtl`]:{direction:"rtl",[`${t}-item`]:{"&-subtitle":{float:"left"}},[`&${t}-navigation`]:{[`${t}-item::after`]:{transform:"rotate(-45deg)"}},[`&${t}-vertical`]:{[`> ${t}-item`]:{"&::after":{transform:"rotate(225deg)"},[`${t}-item-icon`]:{float:"right"}}},[`&${t}-dot`]:{[`${t}-item-icon ${t}-icon-dot, &${t}-small ${t}-item-icon ${t}-icon-dot`]:{float:"right"}}}}},lae=e=>{const{componentCls:t,stepsSmallIconSize:n,fontSizeSM:o,fontSize:r,colorTextDescription:i}=e;return{[`&${t}-small`]:{[`&${t}-horizontal:not(${t}-label-vertical) ${t}-item`]:{paddingInlineStart:e.paddingSM,"&:first-child":{paddingInlineStart:0}},[`${t}-item-icon`]:{width:n,height:n,marginTop:0,marginBottom:0,marginInline:`0 ${e.marginXS}px`,fontSize:o,lineHeight:`${n}px`,textAlign:"center",borderRadius:n},[`${t}-item-title`]:{paddingInlineEnd:e.paddingSM,fontSize:r,lineHeight:`${n}px`,"&::after":{top:n/2}},[`${t}-item-description`]:{color:i,fontSize:r},[`${t}-item-tail`]:{top:n/2-e.paddingXXS},[`${t}-item-custom ${t}-item-icon`]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,[`> ${t}-icon`]:{fontSize:n,lineHeight:`${n}px`,transform:"none"}}}}},aae=e=>{const{componentCls:t,stepsSmallIconSize:n,stepsIconSize:o}=e;return{[`&${t}-vertical`]:{display:"flex",flexDirection:"column",[`> ${t}-item`]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",[`${t}-item-icon`]:{float:"left",marginInlineEnd:e.margin},[`${t}-item-content`]:{display:"block",minHeight:e.controlHeight*1.5,overflow:"hidden"},[`${t}-item-title`]:{lineHeight:`${o}px`},[`${t}-item-description`]:{paddingBottom:e.paddingSM}},[`> ${t}-item > ${t}-item-container > ${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.stepsIconSize/2-e.lineWidth,width:e.lineWidth,height:"100%",padding:`${o+e.marginXXS*1.5}px 0 ${e.marginXXS*1.5}px`,"&::after":{width:e.lineWidth,height:"100%"}},[`> ${t}-item:not(:last-child) > ${t}-item-container > ${t}-item-tail`]:{display:"block"},[` > ${t}-item > ${t}-item-container > ${t}-item-content > ${t}-item-title`]:{"&::after":{display:"none"}},[`&${t}-small ${t}-item-container`]:{[`${t}-item-tail`]:{position:"absolute",top:0,insetInlineStart:e.stepsSmallIconSize/2-e.lineWidth,padding:`${n+e.marginXXS*1.5}px 0 ${e.marginXXS*1.5}px`},[`${t}-item-title`]:{lineHeight:`${n}px`}}}}},sae=e=>{const{componentCls:t,inlineDotSize:n,inlineTitleColor:o,inlineTailColor:r}=e,i=e.paddingXS+e.lineWidth,l={[`${t}-item-container ${t}-item-content ${t}-item-title`]:{color:o}};return{[`&${t}-inline`]:{width:"auto",display:"inline-flex",[`${t}-item`]:{flex:"none","&-container":{padding:`${i}px ${e.paddingXXS}px 0`,margin:`0 ${e.marginXXS/2}px`,borderRadius:e.borderRadiusSM,cursor:"pointer",transition:`background-color ${e.motionDurationMid}`,"&:hover":{background:e.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:n,height:n,marginInlineStart:`calc(50% - ${n/2}px)`,[`> ${t}-icon`]:{top:0},[`${t}-icon-dot`]:{borderRadius:e.fontSizeSM/4}},"&-content":{width:"auto",marginTop:e.marginXS-e.lineWidth},"&-title":{color:o,fontSize:e.fontSizeSM,lineHeight:e.lineHeightSM,fontWeight:"normal",marginBottom:e.marginXXS/2},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:i+n/2,transform:"translateY(-50%)","&:after":{width:"100%",height:e.lineWidth,borderRadius:0,marginInlineStart:0,background:r}},[`&:first-child ${t}-item-tail`]:{width:"50%",marginInlineStart:"50%"},[`&:last-child ${t}-item-tail`]:{display:"block",width:"50%"},"&-wait":v({[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:e.colorBorderBg,border:`${e.lineWidth}px ${e.lineType} ${r}`}},l),"&-finish":v({[`${t}-item-tail::after`]:{backgroundColor:r},[`${t}-item-icon ${t}-icon ${t}-icon-dot`]:{backgroundColor:r,border:`${e.lineWidth}px ${e.lineType} ${r}`}},l),"&-error":l,"&-active, &-process":v({[`${t}-item-icon`]:{width:n,height:n,marginInlineStart:`calc(50% - ${n/2}px)`,top:0}},l),[`&:not(${t}-item-active) > ${t}-item-container[role='button']:hover`]:{[`${t}-item-title`]:{color:o}}}}}};var ka;(function(e){e.wait="wait",e.process="process",e.finish="finish",e.error="error"})(ka||(ka={}));const wd=(e,t)=>{const n=`${t.componentCls}-item`,o=`${e}IconColor`,r=`${e}TitleColor`,i=`${e}DescriptionColor`,l=`${e}TailColor`,a=`${e}IconBgColor`,s=`${e}IconBorderColor`,c=`${e}DotColor`;return{[`${n}-${e} ${n}-icon`]:{backgroundColor:t[a],borderColor:t[s],[`> ${t.componentCls}-icon`]:{color:t[o],[`${t.componentCls}-icon-dot`]:{background:t[c]}}},[`${n}-${e}${n}-custom ${n}-icon`]:{[`> ${t.componentCls}-icon`]:{color:t[c]}},[`${n}-${e} > ${n}-container > ${n}-content > ${n}-title`]:{color:t[r],"&::after":{backgroundColor:t[l]}},[`${n}-${e} > ${n}-container > ${n}-content > ${n}-description`]:{color:t[i]},[`${n}-${e} > ${n}-container > ${n}-tail::after`]:{backgroundColor:t[l]}}},cae=e=>{const{componentCls:t,motionDurationSlow:n}=e,o=`${t}-item`;return v(v(v(v(v(v({[o]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",[`> ${o}-container > ${o}-tail, > ${o}-container > ${o}-content > ${o}-title::after`]:{display:"none"}}},[`${o}-container`]:{outline:"none"},[`${o}-icon, ${o}-content`]:{display:"inline-block",verticalAlign:"top"},[`${o}-icon`]:{width:e.stepsIconSize,height:e.stepsIconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:e.marginXS,fontSize:e.stepsIconFontSize,fontFamily:e.fontFamily,lineHeight:`${e.stepsIconSize}px`,textAlign:"center",borderRadius:e.stepsIconSize,border:`${e.lineWidth}px ${e.lineType} transparent`,transition:`background-color ${n}, border-color ${n}`,[`${t}-icon`]:{position:"relative",top:e.stepsIconTop,color:e.colorPrimary,lineHeight:1}},[`${o}-tail`]:{position:"absolute",top:e.stepsIconSize/2-e.paddingXXS,insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:e.lineWidth,background:e.colorSplit,borderRadius:e.lineWidth,transition:`background ${n}`,content:'""'}},[`${o}-title`]:{position:"relative",display:"inline-block",paddingInlineEnd:e.padding,color:e.colorText,fontSize:e.fontSizeLG,lineHeight:`${e.stepsTitleLineHeight}px`,"&::after":{position:"absolute",top:e.stepsTitleLineHeight/2,insetInlineStart:"100%",display:"block",width:9999,height:e.lineWidth,background:e.processTailColor,content:'""'}},[`${o}-subtitle`]:{display:"inline",marginInlineStart:e.marginXS,color:e.colorTextDescription,fontWeight:"normal",fontSize:e.fontSize},[`${o}-description`]:{color:e.colorTextDescription,fontSize:e.fontSize}},wd(ka.wait,e)),wd(ka.process,e)),{[`${o}-process > ${o}-container > ${o}-title`]:{fontWeight:e.fontWeightStrong}}),wd(ka.finish,e)),wd(ka.error,e)),{[`${o}${t}-next-error > ${t}-item-title::after`]:{background:e.colorError},[`${o}-disabled`]:{cursor:"not-allowed"}})},uae=e=>{const{componentCls:t,motionDurationSlow:n}=e;return{[`& ${t}-item`]:{[`&:not(${t}-item-active)`]:{[`& > ${t}-item-container[role='button']`]:{cursor:"pointer",[`${t}-item`]:{[`&-title, &-subtitle, &-description, &-icon ${t}-icon`]:{transition:`color ${n}`}},"&:hover":{[`${t}-item`]:{"&-title, &-subtitle, &-description":{color:e.colorPrimary}}}},[`&:not(${t}-item-process)`]:{[`& > ${t}-item-container[role='button']:hover`]:{[`${t}-item`]:{"&-icon":{borderColor:e.colorPrimary,[`${t}-icon`]:{color:e.colorPrimary}}}}}}},[`&${t}-horizontal:not(${t}-label-vertical)`]:{[`${t}-item`]:{paddingInlineStart:e.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},[`&:last-child ${t}-item-title`]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:e.descriptionWidth,whiteSpace:"normal"}}}}},dae=e=>{const{componentCls:t}=e;return{[t]:v(v(v(v(v(v(v(v(v(v(v(v(v({},Ze(e)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),cae(e)),uae(e)),eae(e)),lae(e)),aae(e)),tae(e)),rae(e)),nae(e)),iae(e)),oae(e)),sae(e))}},fae=Xe("Steps",e=>{const{wireframe:t,colorTextDisabled:n,fontSizeHeading3:o,fontSize:r,controlHeight:i,controlHeightLG:l,colorTextLightSolid:a,colorText:s,colorPrimary:c,colorTextLabel:u,colorTextDescription:d,colorTextQuaternary:f,colorFillContent:h,controlItemBgActive:m,colorError:g,colorBgContainer:y,colorBorderSecondary:b}=e,S=e.controlHeight,$=e.colorSplit,x=Fe(e,{processTailColor:$,stepsNavArrowColor:n,stepsIconSize:S,stepsIconCustomSize:S,stepsIconCustomTop:0,stepsIconCustomFontSize:l/2,stepsIconTop:-.5,stepsIconFontSize:r,stepsTitleLineHeight:i,stepsSmallIconSize:o,stepsDotSize:i/4,stepsCurrentDotSize:l/4,stepsNavContentMaxWidth:"auto",processIconColor:a,processTitleColor:s,processDescriptionColor:s,processIconBgColor:c,processIconBorderColor:c,processDotColor:c,waitIconColor:t?n:u,waitTitleColor:d,waitDescriptionColor:d,waitTailColor:$,waitIconBgColor:t?y:h,waitIconBorderColor:t?n:"transparent",waitDotColor:n,finishIconColor:c,finishTitleColor:s,finishDescriptionColor:d,finishTailColor:c,finishIconBgColor:t?y:m,finishIconBorderColor:t?c:m,finishDotColor:c,errorIconColor:a,errorTitleColor:g,errorDescriptionColor:g,errorTailColor:$,errorIconBgColor:g,errorIconBorderColor:g,errorDotColor:g,stepsNavActiveColor:c,stepsProgressSize:l,inlineDotSize:6,inlineTitleColor:f,inlineTailColor:b});return[dae(x)]},{descriptionWidth:140}),pae=()=>({prefixCls:String,iconPrefix:String,current:Number,initial:Number,percent:Number,responsive:Ce(),items:ut(),labelPlacement:Be(),status:Be(),size:Be(),direction:Be(),progressDot:ze([Boolean,Function]),type:Be(),onChange:ve(),"onUpdate:current":ve()}),Zm=re({compatConfig:{MODE:3},name:"ASteps",inheritAttrs:!1,props:et(pae(),{current:0,responsive:!0,labelPlacement:"horizontal"}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r}=t;const{prefixCls:i,direction:l,configProvider:a}=Ee("steps",e),[s,c]=fae(i),[,u]=mi(),d=Ps(),f=I(()=>e.responsive&&d.value.xs?"vertical":e.direction),h=I(()=>a.getPrefixCls("",e.iconPrefix)),m=$=>{r("update:current",$),r("change",$)},g=I(()=>e.type==="inline"),y=I(()=>g.value?void 0:e.percent),b=$=>{let{node:x,status:C}=$;if(C==="process"&&e.percent!==void 0){const O=e.size==="small"?u.value.controlHeight:u.value.controlHeightLG;return p("div",{class:`${i.value}-progress-icon`},[p(SS,{type:"circle",percent:y.value,size:O,strokeWidth:4,format:()=>null},null),x])}return x},S=I(()=>({finish:p(Cs,{class:`${i.value}-finish-icon`},null),error:p(Kn,{class:`${i.value}-error-icon`},null)}));return()=>{const $=ce({[`${i.value}-rtl`]:l.value==="rtl",[`${i.value}-with-progress`]:y.value!==void 0},n.class,c.value),x=(C,O)=>C.description?p(ho,{title:C.description},{default:()=>[O]}):O;return s(p(Qle,D(D(D({icons:S.value},n),rt(e,["percent","responsive"])),{},{items:e.items,direction:f.value,prefixCls:i.value,iconPrefix:h.value,class:$,onChange:m,isInline:g.value,itemRender:g.value?x:void 0}),v({stepIcon:b},o)))}}}),cf=re(v(v({compatConfig:{MODE:3}},y_),{name:"AStep",props:b_()})),hae=v(Zm,{Step:cf,install:e=>(e.component(Zm.name,Zm),e.component(cf.name,cf),e)}),gae=e=>{const{componentCls:t}=e,n=`${t}-inner`;return{[t]:{[`&${t}-small`]:{minWidth:e.switchMinWidthSM,height:e.switchHeightSM,lineHeight:`${e.switchHeightSM}px`,[`${t}-inner`]:{paddingInlineStart:e.switchInnerMarginMaxSM,paddingInlineEnd:e.switchInnerMarginMinSM,[`${n}-checked`]:{marginInlineStart:`calc(-100% + ${e.switchPinSizeSM+e.switchPadding*2}px - ${e.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(100% - ${e.switchPinSizeSM+e.switchPadding*2}px + ${e.switchInnerMarginMaxSM*2}px)`},[`${n}-unchecked`]:{marginTop:-e.switchHeightSM,marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:e.switchPinSizeSM,height:e.switchPinSizeSM},[`${t}-loading-icon`]:{top:(e.switchPinSizeSM-e.switchLoadingIconSize)/2,fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:e.switchInnerMarginMinSM,paddingInlineEnd:e.switchInnerMarginMaxSM,[`${n}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${n}-unchecked`]:{marginInlineStart:`calc(100% - ${e.switchPinSizeSM+e.switchPadding*2}px + ${e.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(-100% + ${e.switchPinSizeSM+e.switchPadding*2}px - ${e.switchInnerMarginMaxSM*2}px)`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${e.switchPinSizeSM+e.switchPadding}px)`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${n}`]:{[`${n}-unchecked`]:{marginInlineStart:e.marginXXS/2,marginInlineEnd:-e.marginXXS/2}},[`&${t}-checked ${n}`]:{[`${n}-checked`]:{marginInlineStart:-e.marginXXS/2,marginInlineEnd:e.marginXXS/2}}}}}}},mae=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:(e.switchPinSize-e.fontSize)/2,color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},vae=e=>{const{componentCls:t}=e,n=`${t}-handle`;return{[t]:{[n]:{position:"absolute",top:e.switchPadding,insetInlineStart:e.switchPadding,width:e.switchPinSize,height:e.switchPinSize,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:e.colorWhite,borderRadius:e.switchPinSize/2,boxShadow:e.switchHandleShadow,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${n}`]:{insetInlineStart:`calc(100% - ${e.switchPinSize+e.switchPadding}px)`},[`&:not(${t}-disabled):active`]:{[`${n}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${n}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},bae=e=>{const{componentCls:t}=e,n=`${t}-inner`;return{[t]:{[n]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:e.switchInnerMarginMax,paddingInlineEnd:e.switchInnerMarginMin,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${n}-checked, ${n}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none"},[`${n}-checked`]:{marginInlineStart:`calc(-100% + ${e.switchPinSize+e.switchPadding*2}px - ${e.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(100% - ${e.switchPinSize+e.switchPadding*2}px + ${e.switchInnerMarginMax*2}px)`},[`${n}-unchecked`]:{marginTop:-e.switchHeight,marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${n}`]:{paddingInlineStart:e.switchInnerMarginMin,paddingInlineEnd:e.switchInnerMarginMax,[`${n}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${n}-unchecked`]:{marginInlineStart:`calc(100% - ${e.switchPinSize+e.switchPadding*2}px + ${e.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(-100% + ${e.switchPinSize+e.switchPadding*2}px - ${e.switchInnerMarginMax*2}px)`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${n}`]:{[`${n}-unchecked`]:{marginInlineStart:e.switchPadding*2,marginInlineEnd:-e.switchPadding*2}},[`&${t}-checked ${n}`]:{[`${n}-checked`]:{marginInlineStart:-e.switchPadding*2,marginInlineEnd:e.switchPadding*2}}}}}},yae=e=>{const{componentCls:t}=e;return{[t]:v(v(v(v({},Ze(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:e.switchMinWidth,height:e.switchHeight,lineHeight:`${e.switchHeight}px`,verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),pi(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}},Sae=Xe("Switch",e=>{const t=e.fontSize*e.lineHeight,n=e.controlHeight/2,o=2,r=t-o*2,i=n-o*2,l=Fe(e,{switchMinWidth:r*2+o*4,switchHeight:t,switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchInnerMarginMin:r/2,switchInnerMarginMax:r+o+o*2,switchPadding:o,switchPinSize:r,switchBg:e.colorBgContainer,switchMinWidthSM:i*2+o*2,switchHeightSM:n,switchInnerMarginMinSM:i/2,switchInnerMarginMaxSM:i+o+o*2,switchPinSizeSM:i,switchHandleShadow:`0 2px 4px 0 ${new vt("#00230b").setAlpha(.2).toRgbString()}`,switchLoadingIconSize:e.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[yae(l),bae(l),vae(l),mae(l),gae(l)]}),$ae=Mn("small","default"),Cae=()=>({id:String,prefixCls:String,size:W.oneOf($ae),disabled:{type:Boolean,default:void 0},checkedChildren:W.any,unCheckedChildren:W.any,tabindex:W.oneOfType([W.string,W.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:W.oneOfType([W.string,W.number,W.looseBool]),checkedValue:W.oneOfType([W.string,W.number,W.looseBool]).def(!0),unCheckedValue:W.oneOfType([W.string,W.number,W.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}),xae=re({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:Cae(),slots:Object,setup(e,t){let{attrs:n,slots:o,expose:r,emit:i}=t;const l=ln(),a=mo(),s=I(()=>{var T;return(T=e.disabled)!==null&&T!==void 0?T:a.value});Qp(()=>{});const c=ie(e.checked!==void 0?e.checked:n.defaultChecked),u=I(()=>c.value===e.checkedValue);Se(()=>e.checked,()=>{c.value=e.checked});const{prefixCls:d,direction:f,size:h}=Ee("switch",e),[m,g]=Sae(d),y=ie(),b=()=>{var T;(T=y.value)===null||T===void 0||T.focus()};r({focus:b,blur:()=>{var T;(T=y.value)===null||T===void 0||T.blur()}}),Ue(()=>{lt(()=>{e.autofocus&&!s.value&&y.value.focus()})});const $=(T,M)=>{s.value||(i("update:checked",T),i("change",T,M),l.onFieldChange())},x=T=>{i("blur",T)},C=T=>{b();const M=u.value?e.unCheckedValue:e.checkedValue;$(M,T),i("click",M,T)},O=T=>{T.keyCode===Ie.LEFT?$(e.unCheckedValue,T):T.keyCode===Ie.RIGHT&&$(e.checkedValue,T),i("keydown",T)},w=T=>{var M;(M=y.value)===null||M===void 0||M.blur(),i("mouseup",T)},P=I(()=>({[`${d.value}-small`]:h.value==="small",[`${d.value}-loading`]:e.loading,[`${d.value}-checked`]:u.value,[`${d.value}-disabled`]:s.value,[d.value]:!0,[`${d.value}-rtl`]:f.value==="rtl",[g.value]:!0}));return()=>{var T;return m(p(n1,null,{default:()=>[p("button",D(D(D({},rt(e,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),n),{},{id:(T=e.id)!==null&&T!==void 0?T:l.id.value,onKeydown:O,onClick:C,onBlur:x,onMouseup:w,type:"button",role:"switch","aria-checked":c.value,disabled:s.value||e.loading,class:[n.class,P.value],ref:y}),[p("div",{class:`${d.value}-handle`},[e.loading?p(io,{class:`${d.value}-loading-icon`},null):null]),p("span",{class:`${d.value}-inner`},[p("span",{class:`${d.value}-inner-checked`},[on(o,e,"checkedChildren")]),p("span",{class:`${d.value}-inner-unchecked`},[on(o,e,"unCheckedChildren")])])])]}))}}}),wae=At(xae),S_=Symbol("TableContextProps"),Oae=e=>{qe(S_,e)},Fr=()=>Ke(S_,{}),Pae="RC_TABLE_KEY";function $_(e){return e==null?[]:Array.isArray(e)?e:[e]}function C_(e,t){if(!t&&typeof t!="number")return e;const n=$_(t);let o=e;for(let r=0;r{const{key:r,dataIndex:i}=o||{};let l=r||$_(i).join("-")||Pae;for(;n[l];)l=`${l}_next`;n[l]=!0,t.push(l)}),t}function Iae(){const e={};function t(i,l){l&&Object.keys(l).forEach(a=>{const s=l[a];s&&typeof s=="object"?(i[a]=i[a]||{},t(i[a],s)):i[a]=s})}for(var n=arguments.length,o=new Array(n),r=0;r{t(e,i)}),e}function U0(e){return e!=null}const x_=Symbol("SlotsContextProps"),Tae=e=>{qe(x_,e)},OS=()=>Ke(x_,I(()=>({}))),w_=Symbol("ContextProps"),Eae=e=>{qe(w_,e)},_ae=()=>Ke(w_,{onResizeColumn:()=>{}}),ts="RC_TABLE_INTERNAL_COL_DEFINE",O_=Symbol("HoverContextProps"),Mae=e=>{qe(O_,e)},Aae=()=>Ke(O_,{startRow:oe(-1),endRow:oe(-1),onHover(){}}),G0=oe(!1),Rae=()=>{Ue(()=>{G0.value=G0.value||U1("position","sticky")})},Dae=()=>G0;var Nae=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r=n}function Lae(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!Yt(e)}const dg=re({name:"Cell",props:["prefixCls","record","index","renderIndex","dataIndex","customRender","component","colSpan","rowSpan","fixLeft","fixRight","firstFixLeft","lastFixLeft","firstFixRight","lastFixRight","appendNode","additionalProps","ellipsis","align","rowType","isSticky","column","cellType","transformCellText"],setup(e,t){let{slots:n}=t;const o=OS(),{onHover:r,startRow:i,endRow:l}=Aae(),a=I(()=>{var g,y,b,S;return(b=(g=e.colSpan)!==null&&g!==void 0?g:(y=e.additionalProps)===null||y===void 0?void 0:y.colSpan)!==null&&b!==void 0?b:(S=e.additionalProps)===null||S===void 0?void 0:S.colspan}),s=I(()=>{var g,y,b,S;return(b=(g=e.rowSpan)!==null&&g!==void 0?g:(y=e.additionalProps)===null||y===void 0?void 0:y.rowSpan)!==null&&b!==void 0?b:(S=e.additionalProps)===null||S===void 0?void 0:S.rowspan}),c=xo(()=>{const{index:g}=e;return Bae(g,s.value||1,i.value,l.value)}),u=Dae(),d=(g,y)=>{var b;const{record:S,index:$,additionalProps:x}=e;S&&r($,$+y-1),(b=x==null?void 0:x.onMouseenter)===null||b===void 0||b.call(x,g)},f=g=>{var y;const{record:b,additionalProps:S}=e;b&&r(-1,-1),(y=S==null?void 0:S.onMouseleave)===null||y===void 0||y.call(S,g)},h=g=>{const y=Nt(g)[0];return Yt(y)?y.type===Ji?y.children:Array.isArray(y.children)?h(y.children):void 0:y},m=oe(null);return Se([c,()=>e.prefixCls,m],()=>{const g=to(m.value);g&&(c.value?dp(g,`${e.prefixCls}-cell-row-hover`):fp(g,`${e.prefixCls}-cell-row-hover`))}),()=>{var g,y,b,S,$,x;const{prefixCls:C,record:O,index:w,renderIndex:P,dataIndex:T,customRender:M,component:E="td",fixLeft:A,fixRight:R,firstFixLeft:F,lastFixLeft:_,firstFixRight:N,lastFixRight:B,appendNode:L=(g=n.appendNode)===null||g===void 0?void 0:g.call(n),additionalProps:k={},ellipsis:z,align:H,rowType:j,isSticky:Y,column:Z={},cellType:G}=e,te=`${C}-cell`;let U,Q;const J=(y=n.default)===null||y===void 0?void 0:y.call(n);if(U0(J)||G==="header")Q=J;else{const fe=C_(O,T);if(Q=fe,M){const de=M({text:fe,value:fe,record:O,index:w,renderIndex:P,column:Z.__originColumn__});Lae(de)?(Q=de.children,U=de.props):Q=de}if(!(ts in Z)&&G==="body"&&o.value.bodyCell&&!(!((b=Z.slots)===null||b===void 0)&&b.customRender)){const de=gh(o.value,"bodyCell",{text:fe,value:fe,record:O,index:w,column:Z.__originColumn__},()=>{const ye=Q===void 0?fe:Q;return[typeof ye=="object"&&qt(ye)||typeof ye!="object"?ye:null]});Q=xt(de)}e.transformCellText&&(Q=e.transformCellText({text:Q,record:O,index:w,column:Z.__originColumn__}))}typeof Q=="object"&&!Array.isArray(Q)&&!Yt(Q)&&(Q=null),z&&(_||N)&&(Q=p("span",{class:`${te}-content`},[Q])),Array.isArray(Q)&&Q.length===1&&(Q=Q[0]);const X=U||{},{colSpan:q,rowSpan:V,style:K,class:ee}=X,ue=Nae(X,["colSpan","rowSpan","style","class"]),ae=(S=q!==void 0?q:a.value)!==null&&S!==void 0?S:1,le=($=V!==void 0?V:s.value)!==null&&$!==void 0?$:1;if(ae===0||le===0)return null;const ne={},se=typeof A=="number"&&u.value,pe=typeof R=="number"&&u.value;se&&(ne.position="sticky",ne.left=`${A}px`),pe&&(ne.position="sticky",ne.right=`${R}px`);const he={};H&&(he.textAlign=H);let ge;const be=z===!0?{showTitle:!0}:z;be&&(be.showTitle||j==="header")&&(typeof Q=="string"||typeof Q=="number"?ge=Q.toString():Yt(Q)&&(ge=h([Q])));const xe=v(v(v({title:ge},ue),k),{colSpan:ae!==1?ae:null,rowSpan:le!==1?le:null,class:ce(te,{[`${te}-fix-left`]:se&&u.value,[`${te}-fix-left-first`]:F&&u.value,[`${te}-fix-left-last`]:_&&u.value,[`${te}-fix-right`]:pe&&u.value,[`${te}-fix-right-first`]:N&&u.value,[`${te}-fix-right-last`]:B&&u.value,[`${te}-ellipsis`]:z,[`${te}-with-append`]:L,[`${te}-fix-sticky`]:(se||pe)&&Y&&u.value},k.class,ee),onMouseenter:fe=>{d(fe,le)},onMouseleave:f,style:[k.style,he,ne,K]});return p(E,D(D({},xe),{},{ref:m}),{default:()=>[L,Q,(x=n.dragHandle)===null||x===void 0?void 0:x.call(n)]})}}});function PS(e,t,n,o,r){const i=n[e]||{},l=n[t]||{};let a,s;i.fixed==="left"?a=o.left[e]:l.fixed==="right"&&(s=o.right[t]);let c=!1,u=!1,d=!1,f=!1;const h=n[t+1],m=n[e-1];return r==="rtl"?a!==void 0?f=!(m&&m.fixed==="left"):s!==void 0&&(d=!(h&&h.fixed==="right")):a!==void 0?c=!(h&&h.fixed==="left"):s!==void 0&&(u=!(m&&m.fixed==="right")),{fixLeft:a,fixRight:s,lastFixLeft:c,firstFixRight:u,lastFixRight:d,firstFixLeft:f,isSticky:o.isSticky}}const E4={mouse:{move:"mousemove",stop:"mouseup"},touch:{move:"touchmove",stop:"touchend"}},_4=50,kae=re({compatConfig:{MODE:3},name:"DragHandle",props:{prefixCls:String,width:{type:Number,required:!0},minWidth:{type:Number,default:_4},maxWidth:{type:Number,default:1/0},column:{type:Object,default:void 0}},setup(e){let t=0,n={remove:()=>{}},o={remove:()=>{}};const r=()=>{n.remove(),o.remove()};Wn(()=>{r()}),je(()=>{It(!isNaN(e.width),"Table","width must be a number when use resizable")});const{onResizeColumn:i}=_ae(),l=I(()=>typeof e.minWidth=="number"&&!isNaN(e.minWidth)?e.minWidth:_4),a=I(()=>typeof e.maxWidth=="number"&&!isNaN(e.maxWidth)?e.maxWidth:1/0),s=$n();let c=0;const u=oe(!1);let d;const f=$=>{let x=0;$.touches?$.touches.length?x=$.touches[0].pageX:x=$.changedTouches[0].pageX:x=$.pageX;const C=t-x;let O=Math.max(c-C,l.value);O=Math.min(O,a.value),Qe.cancel(d),d=Qe(()=>{i(O,e.column.__originColumn__)})},h=$=>{f($)},m=$=>{u.value=!1,f($),r()},g=($,x)=>{u.value=!0,r(),c=s.vnode.el.parentNode.getBoundingClientRect().width,!($ instanceof MouseEvent&&$.which!==1)&&($.stopPropagation&&$.stopPropagation(),t=$.touches?$.touches[0].pageX:$.pageX,n=Dt(document.documentElement,x.move,h),o=Dt(document.documentElement,x.stop,m))},y=$=>{$.stopPropagation(),$.preventDefault(),g($,E4.mouse)},b=$=>{$.stopPropagation(),$.preventDefault(),g($,E4.touch)},S=$=>{$.stopPropagation(),$.preventDefault()};return()=>{const{prefixCls:$}=e,x={[nn?"onTouchstartPassive":"onTouchstart"]:C=>b(C)};return p("div",D(D({class:`${$}-resize-handle ${u.value?"dragging":""}`,onMousedown:y},x),{},{onClick:S}),[p("div",{class:`${$}-resize-handle-line`},null)])}}}),Fae=re({name:"HeaderRow",props:["cells","stickyOffsets","flattenColumns","rowComponent","cellComponent","index","customHeaderRow"],setup(e){const t=Fr();return()=>{const{prefixCls:n,direction:o}=t,{cells:r,stickyOffsets:i,flattenColumns:l,rowComponent:a,cellComponent:s,customHeaderRow:c,index:u}=e;let d;c&&(d=c(r.map(h=>h.column),u));const f=ug(r.map(h=>h.column));return p(a,d,{default:()=>[r.map((h,m)=>{const{column:g}=h,y=PS(h.colStart,h.colEnd,l,i,o);let b;g&&g.customHeaderCell&&(b=h.column.customHeaderCell(g));const S=g;return p(dg,D(D(D({},h),{},{cellType:"header",ellipsis:g.ellipsis,align:g.align,component:s,prefixCls:n,key:f[m]},y),{},{additionalProps:b,rowType:"header",column:g}),{default:()=>g.title,dragHandle:()=>S.resizable?p(kae,{prefixCls:n,width:S.width,minWidth:S.minWidth,maxWidth:S.maxWidth,column:S},null):null})})]})}}});function zae(e){const t=[];function n(r,i){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[l]=t[l]||[];let a=i;return r.filter(Boolean).map(c=>{const u={key:c.key,class:ce(c.className,c.class),column:c,colStart:a};let d=1;const f=c.children;return f&&f.length>0&&(d=n(f,a,l+1).reduce((h,m)=>h+m,0),u.hasSubColumns=!0),"colSpan"in c&&({colSpan:d}=c),"rowSpan"in c&&(u.rowSpan=c.rowSpan),u.colSpan=d,u.colEnd=u.colStart+d-1,t[l].push(u),a+=d,d})}n(e,0);const o=t.length;for(let r=0;r{!("rowSpan"in i)&&!i.hasSubColumns&&(i.rowSpan=o-r)});return t}const M4=re({name:"TableHeader",inheritAttrs:!1,props:["columns","flattenColumns","stickyOffsets","customHeaderRow"],setup(e){const t=Fr(),n=I(()=>zae(e.columns));return()=>{const{prefixCls:o,getComponent:r}=t,{stickyOffsets:i,flattenColumns:l,customHeaderRow:a}=e,s=r(["header","wrapper"],"thead"),c=r(["header","row"],"tr"),u=r(["header","cell"],"th");return p(s,{class:`${o}-thead`},{default:()=>[n.value.map((d,f)=>p(Fae,{key:f,flattenColumns:l,cells:d,stickyOffsets:i,rowComponent:c,cellComponent:u,customHeaderRow:a,index:f},null))]})}}}),P_=Symbol("ExpandedRowProps"),Hae=e=>{qe(P_,e)},jae=()=>Ke(P_,{}),I_=re({name:"ExpandedRow",inheritAttrs:!1,props:["prefixCls","component","cellComponent","expanded","colSpan","isEmpty"],setup(e,t){let{slots:n,attrs:o}=t;const r=Fr(),i=jae(),{fixHeader:l,fixColumn:a,componentWidth:s,horizonScroll:c}=i;return()=>{const{prefixCls:u,component:d,cellComponent:f,expanded:h,colSpan:m,isEmpty:g}=e;return p(d,{class:o.class,style:{display:h?null:"none"}},{default:()=>[p(dg,{component:f,prefixCls:u,colSpan:m},{default:()=>{var y;let b=(y=n.default)===null||y===void 0?void 0:y.call(n);return(g?c.value:a.value)&&(b=p("div",{style:{width:`${s.value-(l.value?r.scrollbarSize:0)}px`,position:"sticky",left:0,overflow:"hidden"},class:`${u}-expanded-row-fixed`},[b])),b}})]})}}}),Vae=re({name:"MeasureCell",props:["columnKey"],setup(e,t){let{emit:n}=t;const o=ie();return Ue(()=>{o.value&&n("columnResize",e.columnKey,o.value.offsetWidth)}),()=>p(Go,{onResize:r=>{let{offsetWidth:i}=r;n("columnResize",e.columnKey,i)}},{default:()=>[p("td",{ref:o,style:{padding:0,border:0,height:0}},[p("div",{style:{height:0,overflow:"hidden"}},[vn(" ")])])]})}}),T_=Symbol("BodyContextProps"),Wae=e=>{qe(T_,e)},E_=()=>Ke(T_,{}),Kae=re({name:"BodyRow",inheritAttrs:!1,props:["record","index","renderIndex","recordKey","expandedKeys","rowComponent","cellComponent","customRow","rowExpandable","indent","rowKey","getRowKey","childrenColumnName"],setup(e,t){let{attrs:n}=t;const o=Fr(),r=E_(),i=oe(!1),l=I(()=>e.expandedKeys&&e.expandedKeys.has(e.recordKey));je(()=>{l.value&&(i.value=!0)});const a=I(()=>r.expandableType==="row"&&(!e.rowExpandable||e.rowExpandable(e.record))),s=I(()=>r.expandableType==="nest"),c=I(()=>e.childrenColumnName&&e.record&&e.record[e.childrenColumnName]),u=I(()=>a.value||s.value),d=(y,b)=>{r.onTriggerExpand(y,b)},f=I(()=>{var y;return((y=e.customRow)===null||y===void 0?void 0:y.call(e,e.record,e.index))||{}}),h=function(y){var b,S;r.expandRowByClick&&u.value&&d(e.record,y);for(var $=arguments.length,x=new Array($>1?$-1:0),C=1;C<$;C++)x[C-1]=arguments[C];(S=(b=f.value)===null||b===void 0?void 0:b.onClick)===null||S===void 0||S.call(b,y,...x)},m=I(()=>{const{record:y,index:b,indent:S}=e,{rowClassName:$}=r;return typeof $=="string"?$:typeof $=="function"?$(y,b,S):""}),g=I(()=>ug(r.flattenColumns));return()=>{const{class:y,style:b}=n,{record:S,index:$,rowKey:x,indent:C=0,rowComponent:O,cellComponent:w}=e,{prefixCls:P,fixedInfoList:T,transformCellText:M}=o,{flattenColumns:E,expandedRowClassName:A,indentSize:R,expandIcon:F,expandedRowRender:_,expandIconColumnIndex:N}=r,B=p(O,D(D({},f.value),{},{"data-row-key":x,class:ce(y,`${P}-row`,`${P}-row-level-${C}`,m.value,f.value.class),style:[b,f.value.style],onClick:h}),{default:()=>[E.map((k,z)=>{const{customRender:H,dataIndex:j,className:Y}=k,Z=g[z],G=T[z];let te;k.customCell&&(te=k.customCell(S,$,k));const U=z===(N||0)&&s.value?p(He,null,[p("span",{style:{paddingLeft:`${R*C}px`},class:`${P}-row-indent indent-level-${C}`},null),F({prefixCls:P,expanded:l.value,expandable:c.value,record:S,onExpand:d})]):null;return p(dg,D(D({cellType:"body",class:Y,ellipsis:k.ellipsis,align:k.align,component:w,prefixCls:P,key:Z,record:S,index:$,renderIndex:e.renderIndex,dataIndex:j,customRender:H},G),{},{additionalProps:te,column:k,transformCellText:M,appendNode:U}),null)})]});let L;if(a.value&&(i.value||l.value)){const k=_({record:S,index:$,indent:C+1,expanded:l.value}),z=A&&A(S,$,C);L=p(I_,{expanded:l.value,class:ce(`${P}-expanded-row`,`${P}-expanded-row-level-${C+1}`,z),prefixCls:P,component:O,cellComponent:w,colSpan:E.length,isEmpty:!1},{default:()=>[k]})}return p(He,null,[B,L])}}});function __(e,t,n,o,r,i){const l=[];l.push({record:e,indent:t,index:i});const a=r(e),s=o==null?void 0:o.has(a);if(e&&Array.isArray(e[n])&&s)for(let c=0;c{const i=t.value,l=n.value,a=e.value;if(l!=null&&l.size){const s=[];for(let c=0;c<(a==null?void 0:a.length);c+=1){const u=a[c];s.push(...__(u,0,i,l,o.value,c))}return s}return a==null?void 0:a.map((s,c)=>({record:s,indent:0,index:c}))})}const M_=Symbol("ResizeContextProps"),Gae=e=>{qe(M_,e)},Xae=()=>Ke(M_,{onColumnResize:()=>{}}),Yae=re({name:"TableBody",props:["data","getRowKey","measureColumnWidth","expandedKeys","customRow","rowExpandable","childrenColumnName"],setup(e,t){let{slots:n}=t;const o=Xae(),r=Fr(),i=E_(),l=Uae(We(e,"data"),We(e,"childrenColumnName"),We(e,"expandedKeys"),We(e,"getRowKey")),a=oe(-1),s=oe(-1);let c;return Mae({startRow:a,endRow:s,onHover:(u,d)=>{clearTimeout(c),c=setTimeout(()=>{a.value=u,s.value=d},100)}}),()=>{var u;const{data:d,getRowKey:f,measureColumnWidth:h,expandedKeys:m,customRow:g,rowExpandable:y,childrenColumnName:b}=e,{onColumnResize:S}=o,{prefixCls:$,getComponent:x}=r,{flattenColumns:C}=i,O=x(["body","wrapper"],"tbody"),w=x(["body","row"],"tr"),P=x(["body","cell"],"td");let T;d.length?T=l.value.map((E,A)=>{const{record:R,indent:F,index:_}=E,N=f(R,A);return p(Kae,{key:N,rowKey:N,record:R,recordKey:N,index:A,renderIndex:_,rowComponent:w,cellComponent:P,expandedKeys:m,customRow:g,getRowKey:f,rowExpandable:y,childrenColumnName:b,indent:F},null)}):T=p(I_,{expanded:!0,class:`${$}-placeholder`,prefixCls:$,component:w,cellComponent:P,colSpan:C.length,isEmpty:!0},{default:()=>[(u=n.emptyNode)===null||u===void 0?void 0:u.call(n)]});const M=ug(C);return p(O,{class:`${$}-tbody`},{default:()=>[h&&p("tr",{"aria-hidden":"true",class:`${$}-measure-row`,style:{height:0,fontSize:0}},[M.map(E=>p(Vae,{key:E,columnKey:E,onColumnResize:S},null))]),T]})}}}),Ri={};var qae=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{fixed:o}=n,r=o===!0?"left":o,i=n.children;return i&&i.length>0?[...t,...X0(i).map(l=>v({fixed:r},l))]:[...t,v(v({},n),{fixed:r})]},[])}function Zae(e){return e.map(t=>{const{fixed:n}=t,o=qae(t,["fixed"]);let r=n;return n==="left"?r="right":n==="right"&&(r="left"),v({fixed:r},o)})}function Jae(e,t){let{prefixCls:n,columns:o,expandable:r,expandedKeys:i,getRowKey:l,onTriggerExpand:a,expandIcon:s,rowExpandable:c,expandIconColumnIndex:u,direction:d,expandRowByClick:f,expandColumnWidth:h,expandFixed:m}=e;const g=OS(),y=I(()=>{if(r.value){let $=o.value.slice();if(!$.includes(Ri)){const R=u.value||0;R>=0&&$.splice(R,0,Ri)}const x=$.indexOf(Ri);$=$.filter((R,F)=>R!==Ri||F===x);const C=o.value[x];let O;(m.value==="left"||m.value)&&!u.value?O="left":(m.value==="right"||m.value)&&u.value===o.value.length?O="right":O=C?C.fixed:null;const w=i.value,P=c.value,T=s.value,M=n.value,E=f.value,A={[ts]:{class:`${n.value}-expand-icon-col`,columnType:"EXPAND_COLUMN"},title:gh(g.value,"expandColumnTitle",{},()=>[""]),fixed:O,class:`${n.value}-row-expand-icon-cell`,width:h.value,customRender:R=>{let{record:F,index:_}=R;const N=l.value(F,_),B=w.has(N),L=P?P(F):!0,k=T({prefixCls:M,expanded:B,expandable:L,record:F,onExpand:a});return E?p("span",{onClick:z=>z.stopPropagation()},[k]):k}};return $.map(R=>R===Ri?A:R)}return o.value.filter($=>$!==Ri)}),b=I(()=>{let $=y.value;return t.value&&($=t.value($)),$.length||($=[{customRender:()=>null}]),$}),S=I(()=>d.value==="rtl"?Zae(X0(b.value)):X0(b.value));return[b,S]}function A_(e){const t=oe(e);let n;const o=oe([]);function r(i){o.value.push(i),Qe.cancel(n),n=Qe(()=>{const l=o.value;o.value=[],l.forEach(a=>{t.value=a(t.value)})})}return tt(()=>{Qe.cancel(n)}),[t,r]}function Qae(e){const t=ie(null),n=ie();function o(){clearTimeout(n.value)}function r(l){t.value=l,o(),n.value=setTimeout(()=>{t.value=null,n.value=void 0},100)}function i(){return t.value}return tt(()=>{o()}),[r,i]}function ese(e,t,n){return I(()=>{const r=[],i=[];let l=0,a=0;const s=e.value,c=t.value,u=n.value;for(let d=0;d=0;a-=1){const s=t[a],c=n&&n[a],u=c&&c[ts];if(s||u||l){const d=u||{},{columnType:f}=d,h=tse(d,["columnType"]);r.unshift(p("col",D({key:a,style:{width:typeof s=="number"?`${s}px`:s}},h),null)),l=!0}}return p("colgroup",null,[r])}function Y0(e,t){let{slots:n}=t;var o;return p("div",null,[(o=n.default)===null||o===void 0?void 0:o.call(n)])}Y0.displayName="Panel";let nse=0;const ose=re({name:"TableSummary",props:["fixed"],setup(e,t){let{slots:n}=t;const o=Fr(),r=`table-summary-uni-key-${++nse}`,i=I(()=>e.fixed===""||e.fixed);return je(()=>{o.summaryCollect(r,i.value)}),tt(()=>{o.summaryCollect(r,!1)}),()=>{var l;return(l=n.default)===null||l===void 0?void 0:l.call(n)}}}),rse=re({compatConfig:{MODE:3},name:"ATableSummaryRow",setup(e,t){let{slots:n}=t;return()=>{var o;return p("tr",null,[(o=n.default)===null||o===void 0?void 0:o.call(n)])}}}),D_=Symbol("SummaryContextProps"),ise=e=>{qe(D_,e)},lse=()=>Ke(D_,{}),ase=re({name:"ATableSummaryCell",props:["index","colSpan","rowSpan","align"],setup(e,t){let{attrs:n,slots:o}=t;const r=Fr(),i=lse();return()=>{const{index:l,colSpan:a=1,rowSpan:s,align:c}=e,{prefixCls:u,direction:d}=r,{scrollColumnIndex:f,stickyOffsets:h,flattenColumns:m}=i,y=l+a-1+1===f?a+1:a,b=PS(l,l+y-1,m,h,d);return p(dg,D({class:n.class,index:l,component:"td",prefixCls:u,record:null,dataIndex:null,align:c,colSpan:y,rowSpan:s,customRender:()=>{var S;return(S=o.default)===null||S===void 0?void 0:S.call(o)}},b),null)}}}),Od=re({name:"TableFooter",inheritAttrs:!1,props:["stickyOffsets","flattenColumns"],setup(e,t){let{slots:n}=t;const o=Fr();return ise(ft({stickyOffsets:We(e,"stickyOffsets"),flattenColumns:We(e,"flattenColumns"),scrollColumnIndex:I(()=>{const r=e.flattenColumns.length-1,i=e.flattenColumns[r];return i!=null&&i.scrollbar?r:null})})),()=>{var r;const{prefixCls:i}=o;return p("tfoot",{class:`${i}-summary`},[(r=n.default)===null||r===void 0?void 0:r.call(n)])}}}),sse=ose;function cse(e){let{prefixCls:t,record:n,onExpand:o,expanded:r,expandable:i}=e;const l=`${t}-row-expand-icon`;if(!i)return p("span",{class:[l,`${t}-row-spaced`]},null);const a=s=>{o(n,s),s.stopPropagation()};return p("span",{class:{[l]:!0,[`${t}-row-expanded`]:r,[`${t}-row-collapsed`]:!r},onClick:a},null)}function use(e,t,n){const o=[];function r(i){(i||[]).forEach((l,a)=>{o.push(t(l,a)),r(l[n])})}return r(e),o}const dse=re({name:"StickyScrollBar",inheritAttrs:!1,props:["offsetScroll","container","scrollBodyRef","scrollBodySizeInfo"],emits:["scroll"],setup(e,t){let{emit:n,expose:o}=t;const r=Fr(),i=oe(0),l=oe(0),a=oe(0);je(()=>{i.value=e.scrollBodySizeInfo.scrollWidth||0,l.value=e.scrollBodySizeInfo.clientWidth||0,a.value=i.value&&l.value*(l.value/i.value)},{flush:"post"});const s=oe(),[c,u]=A_({scrollLeft:0,isHiddenScrollBar:!0}),d=ie({delta:0,x:0}),f=oe(!1),h=()=>{f.value=!1},m=w=>{d.value={delta:w.pageX-c.value.scrollLeft,x:0},f.value=!0,w.preventDefault()},g=w=>{const{buttons:P}=w||(window==null?void 0:window.event);if(!f.value||P===0){f.value&&(f.value=!1);return}let T=d.value.x+w.pageX-d.value.x-d.value.delta;T<=0&&(T=0),T+a.value>=l.value&&(T=l.value-a.value),n("scroll",{scrollLeft:T/l.value*(i.value+2)}),d.value.x=w.pageX},y=()=>{if(!e.scrollBodyRef.value)return;const w=Xf(e.scrollBodyRef.value).top,P=w+e.scrollBodyRef.value.offsetHeight,T=e.container===window?document.documentElement.scrollTop+window.innerHeight:Xf(e.container).top+e.container.clientHeight;P-Gf()<=T||w>=T-e.offsetScroll?u(M=>v(v({},M),{isHiddenScrollBar:!0})):u(M=>v(v({},M),{isHiddenScrollBar:!1}))};o({setScrollLeft:w=>{u(P=>v(v({},P),{scrollLeft:w/i.value*l.value||0}))}});let S=null,$=null,x=null,C=null;Ue(()=>{S=Dt(document.body,"mouseup",h,!1),$=Dt(document.body,"mousemove",g,!1),x=Dt(window,"resize",y,!1)}),Zp(()=>{lt(()=>{y()})}),Ue(()=>{setTimeout(()=>{Se([a,f],()=>{y()},{immediate:!0,flush:"post"})})}),Se(()=>e.container,()=>{C==null||C.remove(),C=Dt(e.container,"scroll",y,!1)},{immediate:!0,flush:"post"}),tt(()=>{S==null||S.remove(),$==null||$.remove(),C==null||C.remove(),x==null||x.remove()}),Se(()=>v({},c.value),(w,P)=>{w.isHiddenScrollBar!==(P==null?void 0:P.isHiddenScrollBar)&&!w.isHiddenScrollBar&&u(T=>{const M=e.scrollBodyRef.value;return M?v(v({},T),{scrollLeft:M.scrollLeft/M.scrollWidth*M.clientWidth}):T})},{immediate:!0});const O=Gf();return()=>{if(i.value<=l.value||!a.value||c.value.isHiddenScrollBar)return null;const{prefixCls:w}=r;return p("div",{style:{height:`${O}px`,width:`${l.value}px`,bottom:`${e.offsetScroll}px`},class:`${w}-sticky-scroll`},[p("div",{onMousedown:m,ref:s,class:ce(`${w}-sticky-scroll-bar`,{[`${w}-sticky-scroll-bar-active`]:f.value}),style:{width:`${a.value}px`,transform:`translate3d(${c.value.scrollLeft}px, 0, 0)`}},null)])}}}),A4=Hn()?window:null;function fse(e,t){return I(()=>{const{offsetHeader:n=0,offsetSummary:o=0,offsetScroll:r=0,getContainer:i=()=>A4}=typeof e.value=="object"?e.value:{},l=i()||A4,a=!!e.value;return{isSticky:a,stickyClassName:a?`${t.value}-sticky-holder`:"",offsetHeader:n,offsetSummary:o,offsetScroll:r,container:l}})}function pse(e,t){return I(()=>{const n=[],o=e.value,r=t.value;for(let i=0;ii.isSticky&&!e.fixHeader?0:i.scrollbarSize),a=ie(),s=g=>{const{currentTarget:y,deltaX:b}=g;b&&(r("scroll",{currentTarget:y,scrollLeft:y.scrollLeft+b}),g.preventDefault())},c=ie();Ue(()=>{lt(()=>{c.value=Dt(a.value,"wheel",s)})}),tt(()=>{var g;(g=c.value)===null||g===void 0||g.remove()});const u=I(()=>e.flattenColumns.every(g=>g.width&&g.width!==0&&g.width!=="0px")),d=ie([]),f=ie([]);je(()=>{const g=e.flattenColumns[e.flattenColumns.length-1],y={fixed:g?g.fixed:null,scrollbar:!0,customHeaderCell:()=>({class:`${i.prefixCls}-cell-scrollbar`})};d.value=l.value?[...e.columns,y]:e.columns,f.value=l.value?[...e.flattenColumns,y]:e.flattenColumns});const h=I(()=>{const{stickyOffsets:g,direction:y}=e,{right:b,left:S}=g;return v(v({},g),{left:y==="rtl"?[...S.map($=>$+l.value),0]:S,right:y==="rtl"?b:[...b.map($=>$+l.value),0],isSticky:i.isSticky})}),m=pse(We(e,"colWidths"),We(e,"columCount"));return()=>{var g;const{noData:y,columCount:b,stickyTopOffset:S,stickyBottomOffset:$,stickyClassName:x,maxContentScroll:C}=e,{isSticky:O}=i;return p("div",{style:v({overflow:"hidden"},O?{top:`${S}px`,bottom:`${$}px`}:{}),ref:a,class:ce(n.class,{[x]:!!x})},[p("table",{style:{tableLayout:"fixed",visibility:y||m.value?null:"hidden"}},[(!y||!C||u.value)&&p(R_,{colWidths:m.value?[...m.value,l.value]:[],columCount:b+1,columns:f.value},null),(g=o.default)===null||g===void 0?void 0:g.call(o,v(v({},e),{stickyOffsets:h.value,columns:d.value,flattenColumns:f.value}))])])}}});function D4(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o[r,We(e,r)])))}const hse=[],gse={},q0="rc-table-internal-hook",mse=re({name:"VcTable",inheritAttrs:!1,props:["prefixCls","data","columns","rowKey","tableLayout","scroll","rowClassName","title","footer","id","showHeader","components","customRow","customHeaderRow","direction","expandFixed","expandColumnWidth","expandedRowKeys","defaultExpandedRowKeys","expandedRowRender","expandRowByClick","expandIcon","onExpand","onExpandedRowsChange","onUpdate:expandedRowKeys","defaultExpandAllRows","indentSize","expandIconColumnIndex","expandedRowClassName","childrenColumnName","rowExpandable","sticky","transformColumns","internalHooks","internalRefs","canExpandable","onUpdateInternalRefs","transformCellText"],emits:["expand","expandedRowsChange","updateInternalRefs","update:expandedRowKeys"],setup(e,t){let{attrs:n,slots:o,emit:r}=t;const i=I(()=>e.data||hse),l=I(()=>!!i.value.length),a=I(()=>Iae(e.components,{})),s=(de,ye)=>C_(a.value,de)||ye,c=I(()=>{const de=e.rowKey;return typeof de=="function"?de:ye=>ye&&ye[de]}),u=I(()=>e.expandIcon||cse),d=I(()=>e.childrenColumnName||"children"),f=I(()=>e.expandedRowRender?"row":e.canExpandable||i.value.some(de=>de&&typeof de=="object"&&de[d.value])?"nest":!1),h=oe([]);je(()=>{e.defaultExpandedRowKeys&&(h.value=e.defaultExpandedRowKeys),e.defaultExpandAllRows&&(h.value=use(i.value,c.value,d.value))})();const g=I(()=>new Set(e.expandedRowKeys||h.value||[])),y=de=>{const ye=c.value(de,i.value.indexOf(de));let Oe;const Te=g.value.has(ye);Te?(g.value.delete(ye),Oe=[...g.value]):Oe=[...g.value,ye],h.value=Oe,r("expand",!Te,de),r("update:expandedRowKeys",Oe),r("expandedRowsChange",Oe)},b=ie(0),[S,$]=Jae(v(v({},lr(e)),{expandable:I(()=>!!e.expandedRowRender),expandedKeys:g,getRowKey:c,onTriggerExpand:y,expandIcon:u}),I(()=>e.internalHooks===q0?e.transformColumns:null)),x=I(()=>({columns:S.value,flattenColumns:$.value})),C=ie(),O=ie(),w=ie(),P=ie({scrollWidth:0,clientWidth:0}),T=ie(),[M,E]=St(!1),[A,R]=St(!1),[F,_]=A_(new Map),N=I(()=>ug($.value)),B=I(()=>N.value.map(de=>F.value.get(de))),L=I(()=>$.value.length),k=ese(B,L,We(e,"direction")),z=I(()=>e.scroll&&U0(e.scroll.y)),H=I(()=>e.scroll&&U0(e.scroll.x)||!!e.expandFixed),j=I(()=>H.value&&$.value.some(de=>{let{fixed:ye}=de;return ye})),Y=ie(),Z=fse(We(e,"sticky"),We(e,"prefixCls")),G=ft({}),te=I(()=>{const de=Object.values(G)[0];return(z.value||Z.value.isSticky)&&de}),U=(de,ye)=>{ye?G[de]=ye:delete G[de]},Q=ie({}),J=ie({}),X=ie({});je(()=>{z.value&&(J.value={overflowY:"scroll",maxHeight:$l(e.scroll.y)}),H.value&&(Q.value={overflowX:"auto"},z.value||(J.value={overflowY:"hidden"}),X.value={width:e.scroll.x===!0?"auto":$l(e.scroll.x),minWidth:"100%"})});const q=(de,ye)=>{mh(C.value)&&_(Oe=>{if(Oe.get(de)!==ye){const Te=new Map(Oe);return Te.set(de,ye),Te}return Oe})},[V,K]=Qae();function ee(de,ye){if(!ye)return;if(typeof ye=="function"){ye(de);return}const Oe=ye.$el||ye;Oe.scrollLeft!==de&&(Oe.scrollLeft=de)}const ue=de=>{let{currentTarget:ye,scrollLeft:Oe}=de;var Te;const Re=e.direction==="rtl",$e=typeof Oe=="number"?Oe:ye.scrollLeft,we=ye||gse;if((!K()||K()===we)&&(V(we),ee($e,O.value),ee($e,w.value),ee($e,T.value),ee($e,(Te=Y.value)===null||Te===void 0?void 0:Te.setScrollLeft)),ye){const{scrollWidth:Pe,clientWidth:Me}=ye;Re?(E(-$e0)):(E($e>0),R($e{H.value&&w.value?ue({currentTarget:w.value}):(E(!1),R(!1))};let le;const ne=de=>{de!==b.value&&(ae(),b.value=C.value?C.value.offsetWidth:de)},se=de=>{let{width:ye}=de;if(clearTimeout(le),b.value===0){ne(ye);return}le=setTimeout(()=>{ne(ye)},100)};Se([H,()=>e.data,()=>e.columns],()=>{H.value&&ae()},{flush:"post"});const[pe,he]=St(0);Rae(),Ue(()=>{lt(()=>{var de,ye;ae(),he(AF(w.value).width),P.value={scrollWidth:((de=w.value)===null||de===void 0?void 0:de.scrollWidth)||0,clientWidth:((ye=w.value)===null||ye===void 0?void 0:ye.clientWidth)||0}})}),Vn(()=>{lt(()=>{var de,ye;const Oe=((de=w.value)===null||de===void 0?void 0:de.scrollWidth)||0,Te=((ye=w.value)===null||ye===void 0?void 0:ye.clientWidth)||0;(P.value.scrollWidth!==Oe||P.value.clientWidth!==Te)&&(P.value={scrollWidth:Oe,clientWidth:Te})})}),je(()=>{e.internalHooks===q0&&e.internalRefs&&e.onUpdateInternalRefs({body:w.value?w.value.$el||w.value:null})},{flush:"post"});const ge=I(()=>e.tableLayout?e.tableLayout:j.value?e.scroll.x==="max-content"?"auto":"fixed":z.value||Z.value.isSticky||$.value.some(de=>{let{ellipsis:ye}=de;return ye})?"fixed":"auto"),be=()=>{var de;return l.value?null:((de=o.emptyText)===null||de===void 0?void 0:de.call(o))||"No Data"};Oae(ft(v(v({},lr(D4(e,"prefixCls","direction","transformCellText"))),{getComponent:s,scrollbarSize:pe,fixedInfoList:I(()=>$.value.map((de,ye)=>PS(ye,ye,$.value,k.value,e.direction))),isSticky:I(()=>Z.value.isSticky),summaryCollect:U}))),Wae(ft(v(v({},lr(D4(e,"rowClassName","expandedRowClassName","expandRowByClick","expandedRowRender","expandIconColumnIndex","indentSize"))),{columns:S,flattenColumns:$,tableLayout:ge,expandIcon:u,expandableType:f,onTriggerExpand:y}))),Gae({onColumnResize:q}),Hae({componentWidth:b,fixHeader:z,fixColumn:j,horizonScroll:H});const xe=()=>p(Yae,{data:i.value,measureColumnWidth:z.value||H.value||Z.value.isSticky,expandedKeys:g.value,rowExpandable:e.rowExpandable,getRowKey:c.value,customRow:e.customRow,childrenColumnName:d.value},{emptyNode:be}),fe=()=>p(R_,{colWidths:$.value.map(de=>{let{width:ye}=de;return ye}),columns:$.value},null);return()=>{var de;const{prefixCls:ye,scroll:Oe,tableLayout:Te,direction:Re,title:$e=o.title,footer:we=o.footer,id:Pe,showHeader:Me,customHeaderRow:De}=e,{isSticky:Ae,offsetHeader:ke,offsetSummary:ot,offsetScroll:gt,stickyClassName:st,container:mt}=Z.value,bt=s(["table"],"table"),en=s(["body"]),an=(de=o.summary)===null||de===void 0?void 0:de.call(o,{pageData:i.value});let hn=()=>null;const Kt={colWidths:B.value,columCount:$.value.length,stickyOffsets:k.value,customHeaderRow:De,fixHeader:z.value,scroll:Oe};if(z.value||Ae){let Ro=()=>null;typeof en=="function"?(Ro=()=>en(i.value,{scrollbarSize:pe.value,ref:w,onScroll:ue}),Kt.colWidths=$.value.map((ao,al)=>{let{width:_e}=ao;const Je=al===S.value.length-1?_e-pe.value:_e;return typeof Je=="number"&&!Number.isNaN(Je)?Je:0})):Ro=()=>p("div",{style:v(v({},Q.value),J.value),onScroll:ue,ref:w,class:ce(`${ye}-body`)},[p(bt,{style:v(v({},X.value),{tableLayout:ge.value})},{default:()=>[fe(),xe(),!te.value&&an&&p(Od,{stickyOffsets:k.value,flattenColumns:$.value},{default:()=>[an]})]})]);const Qo=v(v(v({noData:!i.value.length,maxContentScroll:H.value&&Oe.x==="max-content"},Kt),x.value),{direction:Re,stickyClassName:st,onScroll:ue});hn=()=>p(He,null,[Me!==!1&&p(R4,D(D({},Qo),{},{stickyTopOffset:ke,class:`${ye}-header`,ref:O}),{default:ao=>p(He,null,[p(M4,ao,null),te.value==="top"&&p(Od,ao,{default:()=>[an]})])}),Ro(),te.value&&te.value!=="top"&&p(R4,D(D({},Qo),{},{stickyBottomOffset:ot,class:`${ye}-summary`,ref:T}),{default:ao=>p(Od,ao,{default:()=>[an]})}),Ae&&w.value&&p(dse,{ref:Y,offsetScroll:gt,scrollBodyRef:w,onScroll:ue,container:mt,scrollBodySizeInfo:P.value},null)])}else hn=()=>p("div",{style:v(v({},Q.value),J.value),class:ce(`${ye}-content`),onScroll:ue,ref:w},[p(bt,{style:v(v({},X.value),{tableLayout:ge.value})},{default:()=>[fe(),Me!==!1&&p(M4,D(D({},Kt),x.value),null),xe(),an&&p(Od,{stickyOffsets:k.value,flattenColumns:$.value},{default:()=>[an]})]})]);const An=el(n,{aria:!0,data:!0}),lo=()=>p("div",D(D({},An),{},{class:ce(ye,{[`${ye}-rtl`]:Re==="rtl",[`${ye}-ping-left`]:M.value,[`${ye}-ping-right`]:A.value,[`${ye}-layout-fixed`]:Te==="fixed",[`${ye}-fixed-header`]:z.value,[`${ye}-fixed-column`]:j.value,[`${ye}-scroll-horizontal`]:H.value,[`${ye}-has-fix-left`]:$.value[0]&&$.value[0].fixed,[`${ye}-has-fix-right`]:$.value[L.value-1]&&$.value[L.value-1].fixed==="right",[n.class]:n.class}),style:n.style,id:Pe,ref:C}),[$e&&p(Y0,{class:`${ye}-title`},{default:()=>[$e(i.value)]}),p("div",{class:`${ye}-container`},[hn()]),we&&p(Y0,{class:`${ye}-footer`},{default:()=>[we(i.value)]})]);return H.value?p(Go,{onResize:se},{default:lo}):lo()}}});function vse(){const e=v({},arguments.length<=0?void 0:arguments[0]);for(let t=1;t{const r=n[o];r!==void 0&&(e[o]=r)})}return e}const Z0=10;function bse(e,t){const n={current:e.current,pageSize:e.pageSize};return Object.keys(t&&typeof t=="object"?t:{}).forEach(r=>{const i=e[r];typeof i!="function"&&(n[r]=i)}),n}function yse(e,t,n){const o=I(()=>t.value&&typeof t.value=="object"?t.value:{}),r=I(()=>o.value.total||0),[i,l]=St(()=>({current:"defaultCurrent"in o.value?o.value.defaultCurrent:1,pageSize:"defaultPageSize"in o.value?o.value.defaultPageSize:Z0})),a=I(()=>{const u=vse(i.value,o.value,{total:r.value>0?r.value:e.value}),d=Math.ceil((r.value||e.value)/u.pageSize);return u.current>d&&(u.current=d||1),u}),s=(u,d)=>{t.value!==!1&&l({current:u??1,pageSize:d||a.value.pageSize})},c=(u,d)=>{var f,h;t.value&&((h=(f=o.value).onChange)===null||h===void 0||h.call(f,u,d)),s(u,d),n(u,d||a.value.pageSize)};return[I(()=>t.value===!1?{}:v(v({},a.value),{onChange:c})),s]}function Sse(e,t,n){const o=oe({});Se([e,t,n],()=>{const i=new Map,l=n.value,a=t.value;function s(c){c.forEach((u,d)=>{const f=l(u,d);i.set(f,u),u&&typeof u=="object"&&a in u&&s(u[a]||[])})}s(e.value),o.value={kvMap:i}},{deep:!0,immediate:!0});function r(i){return o.value.kvMap.get(i)}return[r]}const Xr={},J0="SELECT_ALL",Q0="SELECT_INVERT",eb="SELECT_NONE",$se=[];function N_(e,t){let n=[];return(t||[]).forEach(o=>{n.push(o),o&&typeof o=="object"&&e in o&&(n=[...n,...N_(e,o[e])])}),n}function Cse(e,t){const n=I(()=>{const T=e.value||{},{checkStrictly:M=!0}=T;return v(v({},T),{checkStrictly:M})}),[o,r]=Mt(n.value.selectedRowKeys||n.value.defaultSelectedRowKeys||$se,{value:I(()=>n.value.selectedRowKeys)}),i=oe(new Map),l=T=>{if(n.value.preserveSelectedRowKeys){const M=new Map;T.forEach(E=>{let A=t.getRecordByKey(E);!A&&i.value.has(E)&&(A=i.value.get(E)),M.set(E,A)}),i.value=M}};je(()=>{l(o.value)});const a=I(()=>n.value.checkStrictly?null:_u(t.data.value,{externalGetKey:t.getRowKey.value,childrenPropName:t.childrenColumnName.value}).keyEntities),s=I(()=>N_(t.childrenColumnName.value,t.pageData.value)),c=I(()=>{const T=new Map,M=t.getRowKey.value,E=n.value.getCheckboxProps;return s.value.forEach((A,R)=>{const F=M(A,R),_=(E?E(A):null)||{};T.set(F,_)}),T}),{maxLevel:u,levelEntities:d}=Yh(a),f=T=>{var M;return!!(!((M=c.value.get(t.getRowKey.value(T)))===null||M===void 0)&&M.disabled)},h=I(()=>{if(n.value.checkStrictly)return[o.value||[],[]];const{checkedKeys:T,halfCheckedKeys:M}=Wo(o.value,!0,a.value,u.value,d.value,f);return[T||[],M]}),m=I(()=>h.value[0]),g=I(()=>h.value[1]),y=I(()=>{const T=n.value.type==="radio"?m.value.slice(0,1):m.value;return new Set(T)}),b=I(()=>n.value.type==="radio"?new Set:new Set(g.value)),[S,$]=St(null),x=T=>{let M,E;l(T);const{preserveSelectedRowKeys:A,onChange:R}=n.value,{getRecordByKey:F}=t;A?(M=T,E=T.map(_=>i.value.get(_))):(M=[],E=[],T.forEach(_=>{const N=F(_);N!==void 0&&(M.push(_),E.push(N))})),r(M),R==null||R(M,E)},C=(T,M,E,A)=>{const{onSelect:R}=n.value,{getRecordByKey:F}=t||{};if(R){const _=E.map(N=>F(N));R(F(T),M,_,A)}x(E)},O=I(()=>{const{onSelectInvert:T,onSelectNone:M,selections:E,hideSelectAll:A}=n.value,{data:R,pageData:F,getRowKey:_,locale:N}=t;return!E||A?null:(E===!0?[J0,Q0,eb]:E).map(L=>L===J0?{key:"all",text:N.value.selectionAll,onSelect(){x(R.value.map((k,z)=>_.value(k,z)).filter(k=>{const z=c.value.get(k);return!(z!=null&&z.disabled)||y.value.has(k)}))}}:L===Q0?{key:"invert",text:N.value.selectInvert,onSelect(){const k=new Set(y.value);F.value.forEach((H,j)=>{const Y=_.value(H,j),Z=c.value.get(Y);Z!=null&&Z.disabled||(k.has(Y)?k.delete(Y):k.add(Y))});const z=Array.from(k);T&&(It(!1,"Table","`onSelectInvert` will be removed in future. Please use `onChange` instead."),T(z)),x(z)}}:L===eb?{key:"none",text:N.value.selectNone,onSelect(){M==null||M(),x(Array.from(y.value).filter(k=>{const z=c.value.get(k);return z==null?void 0:z.disabled}))}}:L)}),w=I(()=>s.value.length);return[T=>{var M;const{onSelectAll:E,onSelectMultiple:A,columnWidth:R,type:F,fixed:_,renderCell:N,hideSelectAll:B,checkStrictly:L}=n.value,{prefixCls:k,getRecordByKey:z,getRowKey:H,expandType:j,getPopupContainer:Y}=t;if(!e.value)return T.filter(ne=>ne!==Xr);let Z=T.slice();const G=new Set(y.value),te=s.value.map(H.value).filter(ne=>!c.value.get(ne).disabled),U=te.every(ne=>G.has(ne)),Q=te.some(ne=>G.has(ne)),J=()=>{const ne=[];U?te.forEach(pe=>{G.delete(pe),ne.push(pe)}):te.forEach(pe=>{G.has(pe)||(G.add(pe),ne.push(pe))});const se=Array.from(G);E==null||E(!U,se.map(pe=>z(pe)),ne.map(pe=>z(pe))),x(se)};let X;if(F!=="radio"){let ne;if(O.value){const be=p(Xt,{getPopupContainer:Y.value},{default:()=>[O.value.map((xe,fe)=>{const{key:de,text:ye,onSelect:Oe}=xe;return p(Xt.Item,{key:de||fe,onClick:()=>{Oe==null||Oe(te)}},{default:()=>[ye]})})]});ne=p("div",{class:`${k.value}-selection-extra`},[p(sr,{overlay:be,getPopupContainer:Y.value},{default:()=>[p("span",null,[p(nl,null,null)])]})])}const se=s.value.map((be,xe)=>{const fe=H.value(be,xe),de=c.value.get(fe)||{};return v({checked:G.has(fe)},de)}).filter(be=>{let{disabled:xe}=be;return xe}),pe=!!se.length&&se.length===w.value,he=pe&&se.every(be=>{let{checked:xe}=be;return xe}),ge=pe&&se.some(be=>{let{checked:xe}=be;return xe});X=!B&&p("div",{class:`${k.value}-selection`},[p(Ko,{checked:pe?he:!!w.value&&U,indeterminate:pe?!he&&ge:!U&&Q,onChange:J,disabled:w.value===0||pe,"aria-label":ne?"Custom selection":"Select all",skipGroup:!0},null),ne])}let q;F==="radio"?q=ne=>{let{record:se,index:pe}=ne;const he=H.value(se,pe),ge=G.has(he);return{node:p(Jn,D(D({},c.value.get(he)),{},{checked:ge,onClick:be=>be.stopPropagation(),onChange:be=>{G.has(he)||C(he,!0,[he],be.nativeEvent)}}),null),checked:ge}}:q=ne=>{let{record:se,index:pe}=ne;var he;const ge=H.value(se,pe),be=G.has(ge),xe=b.value.has(ge),fe=c.value.get(ge);let de;return j.value==="nest"?(de=xe,It(typeof(fe==null?void 0:fe.indeterminate)!="boolean","Table","set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.")):de=(he=fe==null?void 0:fe.indeterminate)!==null&&he!==void 0?he:xe,{node:p(Ko,D(D({},fe),{},{indeterminate:de,checked:be,skipGroup:!0,onClick:ye=>ye.stopPropagation(),onChange:ye=>{let{nativeEvent:Oe}=ye;const{shiftKey:Te}=Oe;let Re=-1,$e=-1;if(Te&&L){const we=new Set([S.value,ge]);te.some((Pe,Me)=>{if(we.has(Pe))if(Re===-1)Re=Me;else return $e=Me,!0;return!1})}if($e!==-1&&Re!==$e&&L){const we=te.slice(Re,$e+1),Pe=[];be?we.forEach(De=>{G.has(De)&&(Pe.push(De),G.delete(De))}):we.forEach(De=>{G.has(De)||(Pe.push(De),G.add(De))});const Me=Array.from(G);A==null||A(!be,Me.map(De=>z(De)),Pe.map(De=>z(De))),x(Me)}else{const we=m.value;if(L){const Pe=be?Cr(we,ge):Kr(we,ge);C(ge,!be,Pe,Oe)}else{const Pe=Wo([...we,ge],!0,a.value,u.value,d.value,f),{checkedKeys:Me,halfCheckedKeys:De}=Pe;let Ae=Me;if(be){const ke=new Set(Me);ke.delete(ge),Ae=Wo(Array.from(ke),{halfCheckedKeys:De},a.value,u.value,d.value,f).checkedKeys}C(ge,!be,Ae,Oe)}}$(ge)}}),null),checked:be}};const V=ne=>{let{record:se,index:pe}=ne;const{node:he,checked:ge}=q({record:se,index:pe});return N?N(ge,se,pe,he):he};if(!Z.includes(Xr))if(Z.findIndex(ne=>{var se;return((se=ne[ts])===null||se===void 0?void 0:se.columnType)==="EXPAND_COLUMN"})===0){const[ne,...se]=Z;Z=[ne,Xr,...se]}else Z=[Xr,...Z];const K=Z.indexOf(Xr);Z=Z.filter((ne,se)=>ne!==Xr||se===K);const ee=Z[K-1],ue=Z[K+1];let ae=_;ae===void 0&&((ue==null?void 0:ue.fixed)!==void 0?ae=ue.fixed:(ee==null?void 0:ee.fixed)!==void 0&&(ae=ee.fixed)),ae&&ee&&((M=ee[ts])===null||M===void 0?void 0:M.columnType)==="EXPAND_COLUMN"&&ee.fixed===void 0&&(ee.fixed=ae);const le={fixed:ae,width:R,className:`${k.value}-selection-column`,title:n.value.columnTitle||X,customRender:V,[ts]:{class:`${k.value}-selection-col`}};return Z.map(ne=>ne===Xr?le:ne)},y]}var xse={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};function N4(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:[];const t=xt(e),n=[];return t.forEach(o=>{var r,i,l,a;if(!o)return;const s=o.key,c=((r=o.props)===null||r===void 0?void 0:r.style)||{},u=((i=o.props)===null||i===void 0?void 0:i.class)||"",d=o.props||{};for(const[y,b]of Object.entries(d))d[vs(y)]=b;const f=o.children||{},{default:h}=f,m=Ise(f,["default"]),g=v(v(v({},m),d),{style:c,class:u});if(s&&(g.key=s),!((l=o.type)===null||l===void 0)&&l.__ANT_TABLE_COLUMN_GROUP)g.children=B_(typeof h=="function"?h():h);else{const y=(a=o.children)===null||a===void 0?void 0:a.default;g.customRender=g.customRender||y}n.push(g)}),n}const uf="ascend",Jm="descend";function Rp(e){return typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1}function L4(e){return typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1}function Tse(e,t){return t?e[e.indexOf(t)+1]:e[0]}function tb(e,t,n){let o=[];function r(i,l){o.push({column:i,key:Zl(i,l),multiplePriority:Rp(i),sortOrder:i.sortOrder})}return(e||[]).forEach((i,l)=>{const a=Nu(l,n);i.children?("sortOrder"in i&&r(i,a),o=[...o,...tb(i.children,t,a)]):i.sorter&&("sortOrder"in i?r(i,a):t&&i.defaultSortOrder&&o.push({column:i,key:Zl(i,a),multiplePriority:Rp(i),sortOrder:i.defaultSortOrder}))}),o}function L_(e,t,n,o,r,i,l,a){return(t||[]).map((s,c)=>{const u=Nu(c,a);let d=s;if(d.sorter){const f=d.sortDirections||r,h=d.showSorterTooltip===void 0?l:d.showSorterTooltip,m=Zl(d,u),g=n.find(T=>{let{key:M}=T;return M===m}),y=g?g.sortOrder:null,b=Tse(f,y),S=f.includes(uf)&&p(TS,{class:ce(`${e}-column-sorter-up`,{active:y===uf}),role:"presentation"},null),$=f.includes(Jm)&&p(IS,{role:"presentation",class:ce(`${e}-column-sorter-down`,{active:y===Jm})},null),{cancelSort:x,triggerAsc:C,triggerDesc:O}=i||{};let w=x;b===Jm?w=O:b===uf&&(w=C);const P=typeof h=="object"?h:{title:w};d=v(v({},d),{className:ce(d.className,{[`${e}-column-sort`]:y}),title:T=>{const M=p("div",{class:`${e}-column-sorters`},[p("span",{class:`${e}-column-title`},[ES(s.title,T)]),p("span",{class:ce(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(S&&$)})},[p("span",{class:`${e}-column-sorter-inner`},[S,$])])]);return h?p(ho,P,{default:()=>[M]}):M},customHeaderCell:T=>{const M=s.customHeaderCell&&s.customHeaderCell(T)||{},E=M.onClick,A=M.onKeydown;return M.onClick=R=>{o({column:s,key:m,sortOrder:b,multiplePriority:Rp(s)}),E&&E(R)},M.onKeydown=R=>{R.keyCode===Ie.ENTER&&(o({column:s,key:m,sortOrder:b,multiplePriority:Rp(s)}),A==null||A(R))},y&&(M["aria-sort"]=y==="ascend"?"ascending":"descending"),M.class=ce(M.class,`${e}-column-has-sorters`),M.tabindex=0,M}})}return"children"in d&&(d=v(v({},d),{children:L_(e,d.children,n,o,r,i,l,u)})),d})}function k4(e){const{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}}function F4(e){const t=e.filter(n=>{let{sortOrder:o}=n;return o}).map(k4);return t.length===0&&e.length?v(v({},k4(e[e.length-1])),{column:void 0}):t.length<=1?t[0]||{}:t}function nb(e,t,n){const o=t.slice().sort((l,a)=>a.multiplePriority-l.multiplePriority),r=e.slice(),i=o.filter(l=>{let{column:{sorter:a},sortOrder:s}=l;return L4(a)&&s});return i.length?r.sort((l,a)=>{for(let s=0;s{const a=l[n];return a?v(v({},l),{[n]:nb(a,t,n)}):l}):r}function Ese(e){let{prefixCls:t,mergedColumns:n,onSorterChange:o,sortDirections:r,tableLocale:i,showSorterTooltip:l}=e;const[a,s]=St(tb(n.value,!0)),c=I(()=>{let m=!0;const g=tb(n.value,!1);if(!g.length)return a.value;const y=[];function b($){m?y.push($):y.push(v(v({},$),{sortOrder:null}))}let S=null;return g.forEach($=>{S===null?(b($),$.sortOrder&&($.multiplePriority===!1?m=!1:S=!0)):(S&&$.multiplePriority!==!1||(m=!1),b($))}),y}),u=I(()=>{const m=c.value.map(g=>{let{column:y,sortOrder:b}=g;return{column:y,order:b}});return{sortColumns:m,sortColumn:m[0]&&m[0].column,sortOrder:m[0]&&m[0].order}});function d(m){let g;m.multiplePriority===!1||!c.value.length||c.value[0].multiplePriority===!1?g=[m]:g=[...c.value.filter(y=>{let{key:b}=y;return b!==m.key}),m],s(g),o(F4(g),g)}const f=m=>L_(t.value,m,c.value,d,r.value,i.value,l.value),h=I(()=>F4(c.value));return[f,c,u,h]}var _se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"};function z4(e){for(var t=1;t{const{keyCode:t}=e;t===Ie.ENTER&&e.stopPropagation()},Rse=(e,t)=>{let{slots:n}=t;var o;return p("div",{onClick:r=>r.stopPropagation(),onKeydown:Ase},[(o=n.default)===null||o===void 0?void 0:o.call(n)])},H4=re({compatConfig:{MODE:3},name:"FilterSearch",inheritAttrs:!1,props:{value:Be(),onChange:ve(),filterSearch:ze([Boolean,Function]),tablePrefixCls:Be(),locale:Ne()},setup(e){return()=>{const{value:t,onChange:n,filterSearch:o,tablePrefixCls:r,locale:i}=e;return o?p("div",{class:`${r}-filter-dropdown-search`},[p(cn,{placeholder:i.filterSearchPlaceholder,onChange:n,value:t,htmlSize:1,class:`${r}-filter-dropdown-search-input`},{prefix:()=>p(ua,null,null)})]):null}}});var j4=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);re.motion?e.motion:xu()),s=(c,u)=>{var d,f,h,m;u==="appear"?(f=(d=a.value)===null||d===void 0?void 0:d.onAfterEnter)===null||f===void 0||f.call(d,c):u==="leave"&&((m=(h=a.value)===null||h===void 0?void 0:h.onAfterLeave)===null||m===void 0||m.call(h,c)),l.value||e.onMotionEnd(),l.value=!0};return Se(()=>e.motionNodes,()=>{e.motionNodes&&e.motionType==="hide"&&r.value&<(()=>{r.value=!1})},{immediate:!0,flush:"post"}),Ue(()=>{e.motionNodes&&e.onMotionStart()}),tt(()=>{e.motionNodes&&s()}),()=>{const{motion:c,motionNodes:u,motionType:d,active:f,eventKey:h}=e,m=j4(e,["motion","motionNodes","motionType","active","eventKey"]);return u?p(rn,D(D({},a.value),{},{appear:d==="show",onAfterAppear:g=>s(g,"appear"),onAfterLeave:g=>s(g,"leave")}),{default:()=>[_n(p("div",{class:`${i.value.prefixCls}-treenode-motion`},[u.map(g=>{const y=j4(g.data,[]),{title:b,key:S,isStart:$,isEnd:x}=g;return delete y.children,p(P0,D(D({},y),{},{title:b,active:f,data:g.data,key:S,eventKey:S,isStart:$,isEnd:x}),o)})]),[[oo,r.value]])]}):p(P0,D(D({class:n.class,style:n.style},m),{},{active:f,eventKey:h}),o)}}});function Nse(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const n=e.length,o=t.length;if(Math.abs(n-o)!==1)return{add:!1,key:null};function r(i,l){const a=new Map;i.forEach(c=>{a.set(c,!0)});const s=l.filter(c=>!a.has(c));return s.length===1?s[0]:null}return nl.key===n),r=e[o+1],i=t.findIndex(l=>l.key===n);if(r){const l=t.findIndex(a=>a.key===r.key);return t.slice(i+1,l)}return t.slice(i+1)}var W4=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{},Jl=`RC_TREE_MOTION_${Math.random()}`,ob={key:Jl},k_={key:Jl,level:0,index:0,pos:"0",node:ob,nodes:[ob]},U4={parent:null,children:[],pos:k_.pos,data:ob,title:null,key:Jl,isStart:[],isEnd:[]};function G4(e,t,n,o){return t===!1||!n?e:e.slice(0,Math.ceil(n/o)+1)}function X4(e){const{key:t,pos:n}=e;return Eu(t,n)}function Lse(e){let t=String(e.key),n=e;for(;n.parent;)n=n.parent,t=`${n.key} > ${t}`;return t}const kse=re({compatConfig:{MODE:3},name:"NodeList",inheritAttrs:!1,props:HZ,setup(e,t){let{expose:n,attrs:o}=t;const r=ie(),i=ie(),{expandedKeys:l,flattenNodes:a}=m5();n({scrollTo:g=>{r.value.scrollTo(g)},getIndentWidth:()=>i.value.offsetWidth});const s=oe(a.value),c=oe([]),u=ie(null);function d(){s.value=a.value,c.value=[],u.value=null,e.onListChangeEnd()}const f=W1();Se([()=>l.value.slice(),a],(g,y)=>{let[b,S]=g,[$,x]=y;const C=Nse($,b);if(C.key!==null){const{virtual:O,height:w,itemHeight:P}=e;if(C.add){const T=x.findIndex(A=>{let{key:R}=A;return R===C.key}),M=G4(V4(x,S,C.key),O,w,P),E=x.slice();E.splice(T+1,0,U4),s.value=E,c.value=M,u.value="show"}else{const T=S.findIndex(A=>{let{key:R}=A;return R===C.key}),M=G4(V4(S,x,C.key),O,w,P),E=S.slice();E.splice(T+1,0,U4),s.value=E,c.value=M,u.value="hide"}}else x!==S&&(s.value=S)}),Se(()=>f.value.dragging,g=>{g||d()});const h=I(()=>e.motion===void 0?s.value:a.value),m=()=>{e.onActiveChange(null)};return()=>{const g=v(v({},e),o),{prefixCls:y,selectable:b,checkable:S,disabled:$,motion:x,height:C,itemHeight:O,virtual:w,focusable:P,activeItem:T,focused:M,tabindex:E,onKeydown:A,onFocus:R,onBlur:F,onListChangeStart:_,onListChangeEnd:N}=g,B=W4(g,["prefixCls","selectable","checkable","disabled","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabindex","onKeydown","onFocus","onBlur","onListChangeStart","onListChangeEnd"]);return p(He,null,[M&&T&&p("span",{style:K4,"aria-live":"assertive"},[Lse(T)]),p("div",null,[p("input",{style:K4,disabled:P===!1||$,tabindex:P!==!1?E:null,onKeydown:A,onFocus:R,onBlur:F,value:"",onChange:Bse,"aria-label":"for screen reader"},null)]),p("div",{class:`${y}-treenode`,"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden"}},[p("div",{class:`${y}-indent`},[p("div",{ref:i,class:`${y}-indent-unit`},null)])]),p(Q8,D(D({},rt(B,["onActiveChange"])),{},{data:h.value,itemKey:X4,height:C,fullHeight:!1,virtual:w,itemHeight:O,prefixCls:`${y}-list`,ref:r,onVisibleChange:(L,k)=>{const z=new Set(L);k.filter(j=>!z.has(j)).some(j=>X4(j)===Jl)&&d()}}),{default:L=>{const{pos:k}=L,z=W4(L.data,[]),{title:H,key:j,isStart:Y,isEnd:Z}=L,G=Eu(j,k);return delete z.key,delete z.children,p(Dse,D(D({},z),{},{eventKey:G,title:H,active:!!T&&j===T.key,data:L.data,isStart:Y,isEnd:Z,motion:x,motionNodes:j===Jl?c.value:null,motionType:u.value,onMotionStart:_,onMotionEnd:d,onMousemove:m}),null)}})])}}});function Fse(e){let{dropPosition:t,dropLevelOffset:n,indent:o}=e;const r={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:"2px"};switch(t){case-1:r.top=0,r.left=`${-n*o}px`;break;case 1:r.bottom=0,r.left=`${-n*o}px`;break;case 0:r.bottom=0,r.left=`${o}`;break}return p("div",{style:r},null)}const zse=10,F_=re({compatConfig:{MODE:3},name:"Tree",inheritAttrs:!1,props:et(b5(),{prefixCls:"vc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,expandAction:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:Fse,allowDrop:()=>!0}),setup(e,t){let{attrs:n,slots:o,expose:r}=t;const i=oe(!1);let l={};const a=oe(),s=oe([]),c=oe([]),u=oe([]),d=oe([]),f=oe([]),h=oe([]),m={},g=ft({draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null}),y=oe([]);Se([()=>e.treeData,()=>e.children],()=>{y.value=e.treeData!==void 0?e.treeData.slice():T0(nt(e.children))},{immediate:!0,deep:!0});const b=oe({}),S=oe(!1),$=oe(null),x=oe(!1),C=I(()=>Kh(e.fieldNames)),O=oe();let w=null,P=null,T=null;const M=I(()=>({expandedKeysSet:E.value,selectedKeysSet:A.value,loadedKeysSet:R.value,loadingKeysSet:F.value,checkedKeysSet:_.value,halfCheckedKeysSet:N.value,dragOverNodeKey:g.dragOverNodeKey,dropPosition:g.dropPosition,keyEntities:b.value})),E=I(()=>new Set(h.value)),A=I(()=>new Set(s.value)),R=I(()=>new Set(d.value)),F=I(()=>new Set(f.value)),_=I(()=>new Set(c.value)),N=I(()=>new Set(u.value));je(()=>{if(y.value){const $e=_u(y.value,{fieldNames:C.value});b.value=v({[Jl]:k_},$e.keyEntities)}});let B=!1;Se([()=>e.expandedKeys,()=>e.autoExpandParent,b],($e,we)=>{let[Pe,Me]=$e,[De,Ae]=we,ke=h.value;if(e.expandedKeys!==void 0||B&&Me!==Ae)ke=e.autoExpandParent||!B&&e.defaultExpandParent?I0(e.expandedKeys,b.value):e.expandedKeys;else if(!B&&e.defaultExpandAll){const ot=v({},b.value);delete ot[Jl],ke=Object.keys(ot).map(gt=>ot[gt].key)}else!B&&e.defaultExpandedKeys&&(ke=e.autoExpandParent||e.defaultExpandParent?I0(e.defaultExpandedKeys,b.value):e.defaultExpandedKeys);ke&&(h.value=ke),B=!0},{immediate:!0});const L=oe([]);je(()=>{L.value=YZ(y.value,h.value,C.value)}),je(()=>{e.selectable&&(e.selectedKeys!==void 0?s.value=i2(e.selectedKeys,e):!B&&e.defaultSelectedKeys&&(s.value=i2(e.defaultSelectedKeys,e)))});const{maxLevel:k,levelEntities:z}=Yh(b);je(()=>{if(e.checkable){let $e;if(e.checkedKeys!==void 0?$e=Dm(e.checkedKeys)||{}:!B&&e.defaultCheckedKeys?$e=Dm(e.defaultCheckedKeys)||{}:y.value&&($e=Dm(e.checkedKeys)||{checkedKeys:c.value,halfCheckedKeys:u.value}),$e){let{checkedKeys:we=[],halfCheckedKeys:Pe=[]}=$e;e.checkStrictly||({checkedKeys:we,halfCheckedKeys:Pe}=Wo(we,!0,b.value,k.value,z.value)),c.value=we,u.value=Pe}}}),je(()=>{e.loadedKeys&&(d.value=e.loadedKeys)});const H=()=>{v(g,{dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})},j=$e=>{O.value.scrollTo($e)};Se(()=>e.activeKey,()=>{e.activeKey!==void 0&&($.value=e.activeKey)},{immediate:!0}),Se($,$e=>{lt(()=>{$e!==null&&j({key:$e})})},{immediate:!0,flush:"post"});const Y=$e=>{e.expandedKeys===void 0&&(h.value=$e)},Z=()=>{g.draggingNodeKey!==null&&v(g,{draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),w=null,T=null},G=($e,we)=>{const{onDragend:Pe}=e;g.dragOverNodeKey=null,Z(),Pe==null||Pe({event:$e,node:we.eventData}),P=null},te=$e=>{G($e,null),window.removeEventListener("dragend",te)},U=($e,we)=>{const{onDragstart:Pe}=e,{eventKey:Me,eventData:De}=we;P=we,w={x:$e.clientX,y:$e.clientY};const Ae=Cr(h.value,Me);g.draggingNodeKey=Me,g.dragChildrenKeys=KZ(Me,b.value),a.value=O.value.getIndentWidth(),Y(Ae),window.addEventListener("dragend",te),Pe&&Pe({event:$e,node:De})},Q=($e,we)=>{const{onDragenter:Pe,onExpand:Me,allowDrop:De,direction:Ae}=e,{pos:ke,eventKey:ot}=we;if(T!==ot&&(T=ot),!P){H();return}const{dropPosition:gt,dropLevelOffset:st,dropTargetKey:mt,dropContainerKey:bt,dropTargetPos:en,dropAllowed:an,dragOverNodeKey:hn}=r2($e,P,we,a.value,w,De,L.value,b.value,E.value,Ae);if(g.dragChildrenKeys.indexOf(mt)!==-1||!an){H();return}if(l||(l={}),Object.keys(l).forEach(Kt=>{clearTimeout(l[Kt])}),P.eventKey!==we.eventKey&&(l[ke]=window.setTimeout(()=>{if(g.draggingNodeKey===null)return;let Kt=h.value.slice();const An=b.value[we.eventKey];An&&(An.children||[]).length&&(Kt=Kr(h.value,we.eventKey)),Y(Kt),Me&&Me(Kt,{node:we.eventData,expanded:!0,nativeEvent:$e})},800)),P.eventKey===mt&&st===0){H();return}v(g,{dragOverNodeKey:hn,dropPosition:gt,dropLevelOffset:st,dropTargetKey:mt,dropContainerKey:bt,dropTargetPos:en,dropAllowed:an}),Pe&&Pe({event:$e,node:we.eventData,expandedKeys:h.value})},J=($e,we)=>{const{onDragover:Pe,allowDrop:Me,direction:De}=e;if(!P)return;const{dropPosition:Ae,dropLevelOffset:ke,dropTargetKey:ot,dropContainerKey:gt,dropAllowed:st,dropTargetPos:mt,dragOverNodeKey:bt}=r2($e,P,we,a.value,w,Me,L.value,b.value,E.value,De);g.dragChildrenKeys.indexOf(ot)!==-1||!st||(P.eventKey===ot&&ke===0?g.dropPosition===null&&g.dropLevelOffset===null&&g.dropTargetKey===null&&g.dropContainerKey===null&&g.dropTargetPos===null&&g.dropAllowed===!1&&g.dragOverNodeKey===null||H():Ae===g.dropPosition&&ke===g.dropLevelOffset&&ot===g.dropTargetKey&>===g.dropContainerKey&&mt===g.dropTargetPos&&st===g.dropAllowed&&bt===g.dragOverNodeKey||v(g,{dropPosition:Ae,dropLevelOffset:ke,dropTargetKey:ot,dropContainerKey:gt,dropTargetPos:mt,dropAllowed:st,dragOverNodeKey:bt}),Pe&&Pe({event:$e,node:we.eventData}))},X=($e,we)=>{T===we.eventKey&&!$e.currentTarget.contains($e.relatedTarget)&&(H(),T=null);const{onDragleave:Pe}=e;Pe&&Pe({event:$e,node:we.eventData})},q=function($e,we){let Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Me;const{dragChildrenKeys:De,dropPosition:Ae,dropTargetKey:ke,dropTargetPos:ot,dropAllowed:gt}=g;if(!gt)return;const{onDrop:st}=e;if(g.dragOverNodeKey=null,Z(),ke===null)return;const mt=v(v({},Ud(ke,nt(M.value))),{active:((Me=ye.value)===null||Me===void 0?void 0:Me.key)===ke,data:b.value[ke].node});De.indexOf(ke);const bt=K1(ot),en={event:$e,node:Gd(mt),dragNode:P?P.eventData:null,dragNodesKeys:[P.eventKey].concat(De),dropToGap:Ae!==0,dropPosition:Ae+Number(bt[bt.length-1])};Pe||st==null||st(en),P=null},V=($e,we)=>{const{expanded:Pe,key:Me}=we,De=L.value.filter(ke=>ke.key===Me)[0],Ae=Gd(v(v({},Ud(Me,M.value)),{data:De.data}));Y(Pe?Cr(h.value,Me):Kr(h.value,Me)),be($e,Ae)},K=($e,we)=>{const{onClick:Pe,expandAction:Me}=e;Me==="click"&&V($e,we),Pe&&Pe($e,we)},ee=($e,we)=>{const{onDblclick:Pe,expandAction:Me}=e;(Me==="doubleclick"||Me==="dblclick")&&V($e,we),Pe&&Pe($e,we)},ue=($e,we)=>{let Pe=s.value;const{onSelect:Me,multiple:De}=e,{selected:Ae}=we,ke=we[C.value.key],ot=!Ae;ot?De?Pe=Kr(Pe,ke):Pe=[ke]:Pe=Cr(Pe,ke);const gt=b.value,st=Pe.map(mt=>{const bt=gt[mt];return bt?bt.node:null}).filter(mt=>mt);e.selectedKeys===void 0&&(s.value=Pe),Me&&Me(Pe,{event:"select",selected:ot,node:we,selectedNodes:st,nativeEvent:$e})},ae=($e,we,Pe)=>{const{checkStrictly:Me,onCheck:De}=e,Ae=we[C.value.key];let ke;const ot={event:"check",node:we,checked:Pe,nativeEvent:$e},gt=b.value;if(Me){const st=Pe?Kr(c.value,Ae):Cr(c.value,Ae),mt=Cr(u.value,Ae);ke={checked:st,halfChecked:mt},ot.checkedNodes=st.map(bt=>gt[bt]).filter(bt=>bt).map(bt=>bt.node),e.checkedKeys===void 0&&(c.value=st)}else{let{checkedKeys:st,halfCheckedKeys:mt}=Wo([...c.value,Ae],!0,gt,k.value,z.value);if(!Pe){const bt=new Set(st);bt.delete(Ae),{checkedKeys:st,halfCheckedKeys:mt}=Wo(Array.from(bt),{halfCheckedKeys:mt},gt,k.value,z.value)}ke=st,ot.checkedNodes=[],ot.checkedNodesPositions=[],ot.halfCheckedKeys=mt,st.forEach(bt=>{const en=gt[bt];if(!en)return;const{node:an,pos:hn}=en;ot.checkedNodes.push(an),ot.checkedNodesPositions.push({node:an,pos:hn})}),e.checkedKeys===void 0&&(c.value=st,u.value=mt)}De&&De(ke,ot)},le=$e=>{const we=$e[C.value.key],Pe=new Promise((Me,De)=>{const{loadData:Ae,onLoad:ke}=e;if(!Ae||R.value.has(we)||F.value.has(we))return null;Ae($e).then(()=>{const gt=Kr(d.value,we),st=Cr(f.value,we);ke&&ke(gt,{event:"load",node:$e}),e.loadedKeys===void 0&&(d.value=gt),f.value=st,Me()}).catch(gt=>{const st=Cr(f.value,we);if(f.value=st,m[we]=(m[we]||0)+1,m[we]>=zse){const mt=Kr(d.value,we);e.loadedKeys===void 0&&(d.value=mt),Me()}De(gt)}),f.value=Kr(f.value,we)});return Pe.catch(()=>{}),Pe},ne=($e,we)=>{const{onMouseenter:Pe}=e;Pe&&Pe({event:$e,node:we})},se=($e,we)=>{const{onMouseleave:Pe}=e;Pe&&Pe({event:$e,node:we})},pe=($e,we)=>{const{onRightClick:Pe}=e;Pe&&($e.preventDefault(),Pe({event:$e,node:we}))},he=$e=>{const{onFocus:we}=e;S.value=!0,we&&we($e)},ge=$e=>{const{onBlur:we}=e;S.value=!1,de(null),we&&we($e)},be=($e,we)=>{let Pe=h.value;const{onExpand:Me,loadData:De}=e,{expanded:Ae}=we,ke=we[C.value.key];if(x.value)return;Pe.indexOf(ke);const ot=!Ae;if(ot?Pe=Kr(Pe,ke):Pe=Cr(Pe,ke),Y(Pe),Me&&Me(Pe,{node:we,expanded:ot,nativeEvent:$e}),ot&&De){const gt=le(we);gt&>.then(()=>{}).catch(st=>{const mt=Cr(h.value,ke);Y(mt),Promise.reject(st)})}},xe=()=>{x.value=!0},fe=()=>{setTimeout(()=>{x.value=!1})},de=$e=>{const{onActiveChange:we}=e;$.value!==$e&&(e.activeKey!==void 0&&($.value=$e),$e!==null&&j({key:$e}),we&&we($e))},ye=I(()=>$.value===null?null:L.value.find($e=>{let{key:we}=$e;return we===$.value})||null),Oe=$e=>{let we=L.value.findIndex(Me=>{let{key:De}=Me;return De===$.value});we===-1&&$e<0&&(we=L.value.length),we=(we+$e+L.value.length)%L.value.length;const Pe=L.value[we];if(Pe){const{key:Me}=Pe;de(Me)}else de(null)},Te=I(()=>Gd(v(v({},Ud($.value,M.value)),{data:ye.value.data,active:!0}))),Re=$e=>{const{onKeydown:we,checkable:Pe,selectable:Me}=e;switch($e.which){case Ie.UP:{Oe(-1),$e.preventDefault();break}case Ie.DOWN:{Oe(1),$e.preventDefault();break}}const De=ye.value;if(De&&De.data){const Ae=De.data.isLeaf===!1||!!(De.data.children||[]).length,ke=Te.value;switch($e.which){case Ie.LEFT:{Ae&&E.value.has($.value)?be({},ke):De.parent&&de(De.parent.key),$e.preventDefault();break}case Ie.RIGHT:{Ae&&!E.value.has($.value)?be({},ke):De.children&&De.children.length&&de(De.children[0].key),$e.preventDefault();break}case Ie.ENTER:case Ie.SPACE:{Pe&&!ke.disabled&&ke.checkable!==!1&&!ke.disableCheckbox?ae({},ke,!_.value.has($.value)):!Pe&&Me&&!ke.disabled&&ke.selectable!==!1&&ue({},ke);break}}}we&&we($e)};return r({onNodeExpand:be,scrollTo:j,onKeydown:Re,selectedKeys:I(()=>s.value),checkedKeys:I(()=>c.value),halfCheckedKeys:I(()=>u.value),loadedKeys:I(()=>d.value),loadingKeys:I(()=>f.value),expandedKeys:I(()=>h.value)}),Wn(()=>{window.removeEventListener("dragend",te),i.value=!0}),FZ({expandedKeys:h,selectedKeys:s,loadedKeys:d,loadingKeys:f,checkedKeys:c,halfCheckedKeys:u,expandedKeysSet:E,selectedKeysSet:A,loadedKeysSet:R,loadingKeysSet:F,checkedKeysSet:_,halfCheckedKeysSet:N,flattenNodes:L}),()=>{const{draggingNodeKey:$e,dropLevelOffset:we,dropContainerKey:Pe,dropTargetKey:Me,dropPosition:De,dragOverNodeKey:Ae}=g,{prefixCls:ke,showLine:ot,focusable:gt,tabindex:st=0,selectable:mt,showIcon:bt,icon:en=o.icon,switcherIcon:an,draggable:hn,checkable:Kt,checkStrictly:An,disabled:lo,motion:Ro,loadData:Qo,filterTreeNode:ao,height:al,itemHeight:_e,virtual:Je,dropIndicatorRender:Ye,onContextmenu:Pt,onScroll:sn,direction:Ut,rootClassName:so,rootStyle:On}=e,{class:br,style:vo}=n,Do=el(v(v({},e),n),{aria:!0,data:!0});let Bt;return hn?typeof hn=="object"?Bt=hn:typeof hn=="function"?Bt={nodeDraggable:hn}:Bt={}:Bt=!1,p(kZ,{value:{prefixCls:ke,selectable:mt,showIcon:bt,icon:en,switcherIcon:an,draggable:Bt,draggingNodeKey:$e,checkable:Kt,customCheckable:o.checkable,checkStrictly:An,disabled:lo,keyEntities:b.value,dropLevelOffset:we,dropContainerKey:Pe,dropTargetKey:Me,dropPosition:De,dragOverNodeKey:Ae,dragging:$e!==null,indent:a.value,direction:Ut,dropIndicatorRender:Ye,loadData:Qo,filterTreeNode:ao,onNodeClick:K,onNodeDoubleClick:ee,onNodeExpand:be,onNodeSelect:ue,onNodeCheck:ae,onNodeLoad:le,onNodeMouseEnter:ne,onNodeMouseLeave:se,onNodeContextMenu:pe,onNodeDragStart:U,onNodeDragEnter:Q,onNodeDragOver:J,onNodeDragLeave:X,onNodeDragEnd:G,onNodeDrop:q,slots:o}},{default:()=>[p("div",{role:"tree",class:ce(ke,br,so,{[`${ke}-show-line`]:ot,[`${ke}-focused`]:S.value,[`${ke}-active-focused`]:$.value!==null}),style:On},[p(kse,D({ref:O,prefixCls:ke,style:vo,disabled:lo,selectable:mt,checkable:!!Kt,motion:Ro,height:al,itemHeight:_e,virtual:Je,focusable:gt,focused:S.value,tabindex:st,activeItem:ye.value,onFocus:he,onBlur:ge,onKeydown:Re,onActiveChange:de,onListChangeStart:xe,onListChangeEnd:fe,onContextmenu:Pt,onScroll:sn},Do),null)])]})}}});var Hse={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};function Y4(e){for(var t=1;t({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),Jse=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${t.lineWidthBold}px solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),Qse=(e,t)=>{const{treeCls:n,treeNodeCls:o,treeNodePadding:r,treeTitleHeight:i}=t,l=(i-t.fontSizeLG)/2,a=t.paddingXS;return{[n]:v(v({},Ze(t)),{background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,[`&${n}-rtl`]:{[`${n}-switcher`]:{"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${n}-active-focused)`]:v({},fi(t)),[`${n}-list-holder-inner`]:{alignItems:"flex-start"},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:"stretch",[`${n}-node-content-wrapper`]:{flex:"auto"},[`${o}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:r,insetInlineStart:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:qse,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${o}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${r}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${n}-node-content-wrapper`]:v({},fi(t)),[`&:not(${o}-disabled).filter-node ${n}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${n}-draggable-icon`]:{width:i,lineHeight:`${i}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${t.motionDurationSlow}`,[`${o}:hover &`]:{opacity:.45}},[`&${o}-disabled`]:{[`${n}-draggable-icon`]:{visibility:"hidden"}}}},[`${n}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:i}},[`${n}-draggable-icon`]:{visibility:"hidden"},[`${n}-switcher`]:v(v({},Zse(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:i,margin:0,lineHeight:`${i}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:i/2,bottom:-r,marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:i/2*.8,height:i/2,borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${n}-checkbox`]:{top:"initial",marginInlineEnd:a,marginBlockStart:l},[`${n}-node-content-wrapper, ${n}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:i,margin:0,padding:`0 ${t.paddingXS/2}px`,color:"inherit",lineHeight:`${i}px`,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:t.controlItemBgHover},[`&${n}-node-selected`]:{backgroundColor:t.controlItemBgActive},[`${n}-iconEle`]:{display:"inline-block",width:i,height:i,lineHeight:`${i}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${n}-node-content-wrapper`]:v({lineHeight:`${i}px`,userSelect:"none"},Jse(e,t)),[`${o}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${t.colorPrimary}`}},"&-show-line":{[`${n}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:i/2,bottom:-r,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${n}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${o}-leaf-last`]:{[`${n}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${i/2}px !important`}}}}})}},ece=e=>{const{treeCls:t,treeNodeCls:n,treeNodePadding:o}=e;return{[`${t}${t}-directory`]:{[n]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:o,insetInlineStart:0,transition:`background-color ${e.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:e.controlItemBgHover}},"> *":{zIndex:1},[`${t}-switcher`]:{transition:`color ${e.motionDurationMid}`},[`${t}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${t}-node-selected`]:{color:e.colorTextLightSolid,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:e.colorPrimary},[`${t}-switcher`]:{color:e.colorTextLightSolid},[`${t}-node-content-wrapper`]:{color:e.colorTextLightSolid,background:"transparent"}}}}}},H_=(e,t)=>{const n=`.${e}`,o=`${n}-treenode`,r=t.paddingXS/2,i=t.controlHeightSM,l=Fe(t,{treeCls:n,treeNodeCls:o,treeNodePadding:r,treeTitleHeight:i});return[Qse(e,l),ece(l)]},tce=Xe("Tree",(e,t)=>{let{prefixCls:n}=t;return[{[e.componentCls]:Qh(`${n}-checkbox`,e)},H_(n,e),yu(e)]}),j_=()=>{const e=b5();return v(v({},e),{showLine:ze([Boolean,Object]),multiple:Ce(),autoExpandParent:Ce(),checkStrictly:Ce(),checkable:Ce(),disabled:Ce(),defaultExpandAll:Ce(),defaultExpandParent:Ce(),defaultExpandedKeys:ut(),expandedKeys:ut(),checkedKeys:ze([Array,Object]),defaultCheckedKeys:ut(),selectedKeys:ut(),defaultSelectedKeys:ut(),selectable:Ce(),loadedKeys:ut(),draggable:Ce(),showIcon:Ce(),icon:ve(),switcherIcon:W.any,prefixCls:String,replaceFields:Ne(),blockNode:Ce(),openAnimation:W.any,onDoubleclick:e.onDblclick,"onUpdate:selectedKeys":ve(),"onUpdate:checkedKeys":ve(),"onUpdate:expandedKeys":ve()})},df=re({compatConfig:{MODE:3},name:"ATree",inheritAttrs:!1,props:et(j_(),{checkable:!1,selectable:!0,showIcon:!1,blockNode:!1}),slots:Object,setup(e,t){let{attrs:n,expose:o,emit:r,slots:i}=t;e.treeData===void 0&&i.default;const{prefixCls:l,direction:a,virtual:s}=Ee("tree",e),[c,u]=tce(l),d=ie();o({treeRef:d,onNodeExpand:function(){var y;(y=d.value)===null||y===void 0||y.onNodeExpand(...arguments)},scrollTo:y=>{var b;(b=d.value)===null||b===void 0||b.scrollTo(y)},selectedKeys:I(()=>{var y;return(y=d.value)===null||y===void 0?void 0:y.selectedKeys}),checkedKeys:I(()=>{var y;return(y=d.value)===null||y===void 0?void 0:y.checkedKeys}),halfCheckedKeys:I(()=>{var y;return(y=d.value)===null||y===void 0?void 0:y.halfCheckedKeys}),loadedKeys:I(()=>{var y;return(y=d.value)===null||y===void 0?void 0:y.loadedKeys}),loadingKeys:I(()=>{var y;return(y=d.value)===null||y===void 0?void 0:y.loadingKeys}),expandedKeys:I(()=>{var y;return(y=d.value)===null||y===void 0?void 0:y.expandedKeys})}),je(()=>{It(e.replaceFields===void 0,"Tree","`replaceFields` is deprecated, please use fieldNames instead")});const h=(y,b)=>{r("update:checkedKeys",y),r("check",y,b)},m=(y,b)=>{r("update:expandedKeys",y),r("expand",y,b)},g=(y,b)=>{r("update:selectedKeys",y),r("select",y,b)};return()=>{const{showIcon:y,showLine:b,switcherIcon:S=i.switcherIcon,icon:$=i.icon,blockNode:x,checkable:C,selectable:O,fieldNames:w=e.replaceFields,motion:P=e.openAnimation,itemHeight:T=28,onDoubleclick:M,onDblclick:E}=e,A=v(v(v({},n),rt(e,["onUpdate:checkedKeys","onUpdate:expandedKeys","onUpdate:selectedKeys","onDoubleclick"])),{showLine:!!b,dropIndicatorRender:Yse,fieldNames:w,icon:$,itemHeight:T}),R=i.default?Nt(i.default()):void 0;return c(p(F_,D(D({},A),{},{virtual:s.value,motion:P,ref:d,prefixCls:l.value,class:ce({[`${l.value}-icon-hide`]:!y,[`${l.value}-block-node`]:x,[`${l.value}-unselectable`]:!O,[`${l.value}-rtl`]:a.value==="rtl"},n.class,u.value),direction:a.value,checkable:C,selectable:O,switcherIcon:F=>z_(l.value,S,F,i.leafIcon,b),onCheck:h,onExpand:m,onSelect:g,onDblclick:E||M,children:R}),v(v({},i),{checkable:()=>p("span",{class:`${l.value}-checkbox-inner`},null)})))}}});var nce={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};function e3(e){for(var t=1;t{if(a===Yr.End)return!1;if(s(c)){if(l.push(c),a===Yr.None)a=Yr.Start;else if(a===Yr.Start)return a=Yr.End,!1}else a===Yr.Start&&l.push(c);return n.includes(c)}),l}function Qm(e,t,n){const o=[...t],r=[];return BS(e,n,(i,l)=>{const a=o.indexOf(i);return a!==-1&&(r.push(l),o.splice(a,1)),!!o.length}),r}var ace=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rv(v({},j_()),{expandAction:ze([Boolean,String])});function cce(e){const{isLeaf:t,expanded:n}=e;return p(t?fg:n?DS:NS,null,null)}const ff=re({compatConfig:{MODE:3},name:"ADirectoryTree",inheritAttrs:!1,props:et(sce(),{showIcon:!0,expandAction:"click"}),slots:Object,setup(e,t){let{attrs:n,slots:o,emit:r,expose:i}=t;var l;const a=ie(e.treeData||T0(Nt((l=o.default)===null||l===void 0?void 0:l.call(o))));Se(()=>e.treeData,()=>{a.value=e.treeData}),Vn(()=>{lt(()=>{var T;e.treeData===void 0&&o.default&&(a.value=T0(Nt((T=o.default)===null||T===void 0?void 0:T.call(o))))})});const s=ie(),c=ie(),u=I(()=>Kh(e.fieldNames)),d=ie();i({scrollTo:T=>{var M;(M=d.value)===null||M===void 0||M.scrollTo(T)},selectedKeys:I(()=>{var T;return(T=d.value)===null||T===void 0?void 0:T.selectedKeys}),checkedKeys:I(()=>{var T;return(T=d.value)===null||T===void 0?void 0:T.checkedKeys}),halfCheckedKeys:I(()=>{var T;return(T=d.value)===null||T===void 0?void 0:T.halfCheckedKeys}),loadedKeys:I(()=>{var T;return(T=d.value)===null||T===void 0?void 0:T.loadedKeys}),loadingKeys:I(()=>{var T;return(T=d.value)===null||T===void 0?void 0:T.loadingKeys}),expandedKeys:I(()=>{var T;return(T=d.value)===null||T===void 0?void 0:T.expandedKeys})});const h=()=>{const{keyEntities:T}=_u(a.value,{fieldNames:u.value});let M;return e.defaultExpandAll?M=Object.keys(T):e.defaultExpandParent?M=I0(e.expandedKeys||e.defaultExpandedKeys||[],T):M=e.expandedKeys||e.defaultExpandedKeys,M},m=ie(e.selectedKeys||e.defaultSelectedKeys||[]),g=ie(h());Se(()=>e.selectedKeys,()=>{e.selectedKeys!==void 0&&(m.value=e.selectedKeys)},{immediate:!0}),Se(()=>e.expandedKeys,()=>{e.expandedKeys!==void 0&&(g.value=e.expandedKeys)},{immediate:!0});const b=Uy((T,M)=>{const{isLeaf:E}=M;E||T.shiftKey||T.metaKey||T.ctrlKey||d.value.onNodeExpand(T,M)},200,{leading:!0}),S=(T,M)=>{e.expandedKeys===void 0&&(g.value=T),r("update:expandedKeys",T),r("expand",T,M)},$=(T,M)=>{const{expandAction:E}=e;E==="click"&&b(T,M),r("click",T,M)},x=(T,M)=>{const{expandAction:E}=e;(E==="dblclick"||E==="doubleclick")&&b(T,M),r("doubleclick",T,M),r("dblclick",T,M)},C=(T,M)=>{const{multiple:E}=e,{node:A,nativeEvent:R}=M,F=A[u.value.key],_=v(v({},M),{selected:!0}),N=(R==null?void 0:R.ctrlKey)||(R==null?void 0:R.metaKey),B=R==null?void 0:R.shiftKey;let L;E&&N?(L=T,s.value=F,c.value=L,_.selectedNodes=Qm(a.value,L,u.value)):E&&B?(L=Array.from(new Set([...c.value||[],...lce({treeData:a.value,expandedKeys:g.value,startKey:F,endKey:s.value,fieldNames:u.value})])),_.selectedNodes=Qm(a.value,L,u.value)):(L=[F],s.value=F,c.value=L,_.selectedNodes=Qm(a.value,L,u.value)),r("update:selectedKeys",L),r("select",L,_),e.selectedKeys===void 0&&(m.value=L)},O=(T,M)=>{r("update:checkedKeys",T),r("check",T,M)},{prefixCls:w,direction:P}=Ee("tree",e);return()=>{const T=ce(`${w.value}-directory`,{[`${w.value}-directory-rtl`]:P.value==="rtl"},n.class),{icon:M=o.icon,blockNode:E=!0}=e,A=ace(e,["icon","blockNode"]);return p(df,D(D(D({},n),{},{icon:M||cce,ref:d,blockNode:E},A),{},{prefixCls:w.value,class:T,expandedKeys:g.value,selectedKeys:m.value,onSelect:C,onClick:$,onDblclick:x,onExpand:S,onCheck:O}),o)}}}),pf=P0,V_=v(df,{DirectoryTree:ff,TreeNode:pf,install:e=>(e.component(df.name,df),e.component(pf.name,pf),e.component(ff.name,ff),e)});function n3(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const o=new Set;function r(i,l){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;const s=o.has(i);if(qb(!s,"Warning: There may be circular references"),s)return!1;if(i===l)return!0;if(n&&a>1)return!1;o.add(i);const c=a+1;if(Array.isArray(i)){if(!Array.isArray(l)||i.length!==l.length)return!1;for(let u=0;ur(i[d],l[d],c))}return!1}return r(e,t)}const{SubMenu:uce,Item:dce}=Xt;function fce(e){return e.some(t=>{let{children:n}=t;return n&&n.length>0})}function W_(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function K_(e){let{filters:t,prefixCls:n,filteredKeys:o,filterMultiple:r,searchValue:i,filterSearch:l}=e;return t.map((a,s)=>{const c=String(a.value);if(a.children)return p(uce,{key:c||s,title:a.text,popupClassName:`${n}-dropdown-submenu`},{default:()=>[K_({filters:a.children,prefixCls:n,filteredKeys:o,filterMultiple:r,searchValue:i,filterSearch:l})]});const u=r?Ko:Jn,d=p(dce,{key:a.value!==void 0?c:s},{default:()=>[p(u,{checked:o.includes(c)},null),p("span",null,[a.text])]});return i.trim()?typeof l=="function"?l(i,a)?d:void 0:W_(i,a.text)?d:void 0:d})}const pce=re({name:"FilterDropdown",props:["tablePrefixCls","prefixCls","dropdownPrefixCls","column","filterState","filterMultiple","filterMode","filterSearch","columnKey","triggerFilter","locale","getPopupContainer"],setup(e,t){let{slots:n}=t;const o=OS(),r=I(()=>{var j;return(j=e.filterMode)!==null&&j!==void 0?j:"menu"}),i=I(()=>{var j;return(j=e.filterSearch)!==null&&j!==void 0?j:!1}),l=I(()=>e.column.filterDropdownOpen||e.column.filterDropdownVisible),a=I(()=>e.column.onFilterDropdownOpenChange||e.column.onFilterDropdownVisibleChange),s=oe(!1),c=I(()=>{var j;return!!(e.filterState&&(!((j=e.filterState.filteredKeys)===null||j===void 0)&&j.length||e.filterState.forceFiltered))}),u=I(()=>{var j;return pg((j=e.column)===null||j===void 0?void 0:j.filters)}),d=I(()=>{const{filterDropdown:j,slots:Y={},customFilterDropdown:Z}=e.column;return j||Y.filterDropdown&&o.value[Y.filterDropdown]||Z&&o.value.customFilterDropdown}),f=I(()=>{const{filterIcon:j,slots:Y={}}=e.column;return j||Y.filterIcon&&o.value[Y.filterIcon]||o.value.customFilterIcon}),h=j=>{var Y;s.value=j,(Y=a.value)===null||Y===void 0||Y.call(a,j)},m=I(()=>typeof l.value=="boolean"?l.value:s.value),g=I(()=>{var j;return(j=e.filterState)===null||j===void 0?void 0:j.filteredKeys}),y=oe([]),b=j=>{let{selectedKeys:Y}=j;y.value=Y},S=(j,Y)=>{let{node:Z,checked:G}=Y;e.filterMultiple?b({selectedKeys:j}):b({selectedKeys:G&&Z.key?[Z.key]:[]})};Se(g,()=>{s.value&&b({selectedKeys:g.value||[]})},{immediate:!0});const $=oe([]),x=oe(),C=j=>{x.value=setTimeout(()=>{$.value=j})},O=()=>{clearTimeout(x.value)};tt(()=>{clearTimeout(x.value)});const w=oe(""),P=j=>{const{value:Y}=j.target;w.value=Y};Se(s,()=>{s.value||(w.value="")});const T=j=>{const{column:Y,columnKey:Z,filterState:G}=e,te=j&&j.length?j:null;if(te===null&&(!G||!G.filteredKeys)||n3(te,G==null?void 0:G.filteredKeys,!0))return null;e.triggerFilter({column:Y,key:Z,filteredKeys:te})},M=()=>{h(!1),T(y.value)},E=function(){let{confirm:j,closeDropdown:Y}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};j&&T([]),Y&&h(!1),w.value="",e.column.filterResetToDefaultFilteredValue?y.value=(e.column.defaultFilteredValue||[]).map(Z=>String(Z)):y.value=[]},A=function(){let{closeDropdown:j}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};j&&h(!1),T(y.value)},R=j=>{j&&g.value!==void 0&&(y.value=g.value||[]),h(j),!j&&!d.value&&M()},{direction:F}=Ee("",e),_=j=>{if(j.target.checked){const Y=u.value;y.value=Y}else y.value=[]},N=j=>{let{filters:Y}=j;return(Y||[]).map((Z,G)=>{const te=String(Z.value),U={title:Z.text,key:Z.value!==void 0?te:G};return Z.children&&(U.children=N({filters:Z.children})),U})},B=j=>{var Y;return v(v({},j),{text:j.title,value:j.key,children:((Y=j.children)===null||Y===void 0?void 0:Y.map(Z=>B(Z)))||[]})},L=I(()=>N({filters:e.column.filters})),k=I(()=>ce({[`${e.dropdownPrefixCls}-menu-without-submenu`]:!fce(e.column.filters||[])})),z=()=>{const j=y.value,{column:Y,locale:Z,tablePrefixCls:G,filterMultiple:te,dropdownPrefixCls:U,getPopupContainer:Q,prefixCls:J}=e;return(Y.filters||[]).length===0?p(Bi,{image:Bi.PRESENTED_IMAGE_SIMPLE,description:Z.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}},null):r.value==="tree"?p(He,null,[p(H4,{filterSearch:i.value,value:w.value,onChange:P,tablePrefixCls:G,locale:Z},null),p("div",{class:`${G}-filter-dropdown-tree`},[te?p(Ko,{class:`${G}-filter-dropdown-checkall`,onChange:_,checked:j.length===u.value.length,indeterminate:j.length>0&&j.length[Z.filterCheckall]}):null,p(V_,{checkable:!0,selectable:!1,blockNode:!0,multiple:te,checkStrictly:!te,class:`${U}-menu`,onCheck:S,checkedKeys:j,selectedKeys:j,showIcon:!1,treeData:L.value,autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:w.value.trim()?X=>typeof i.value=="function"?i.value(w.value,B(X)):W_(w.value,X.title):void 0},null)])]):p(He,null,[p(H4,{filterSearch:i.value,value:w.value,onChange:P,tablePrefixCls:G,locale:Z},null),p(Xt,{multiple:te,prefixCls:`${U}-menu`,class:k.value,onClick:O,onSelect:b,onDeselect:b,selectedKeys:j,getPopupContainer:Q,openKeys:$.value,onOpenChange:C},{default:()=>K_({filters:Y.filters||[],filterSearch:i.value,prefixCls:J,filteredKeys:y.value,filterMultiple:te,searchValue:w.value})})])},H=I(()=>{const j=y.value;return e.column.filterResetToDefaultFilteredValue?n3((e.column.defaultFilteredValue||[]).map(Y=>String(Y)),j,!0):j.length===0});return()=>{var j;const{tablePrefixCls:Y,prefixCls:Z,column:G,dropdownPrefixCls:te,locale:U,getPopupContainer:Q}=e;let J;typeof d.value=="function"?J=d.value({prefixCls:`${te}-custom`,setSelectedKeys:V=>b({selectedKeys:V}),selectedKeys:y.value,confirm:A,clearFilters:E,filters:G.filters,visible:m.value,column:G.__originColumn__,close:()=>{h(!1)}}):d.value?J=d.value:J=p(He,null,[z(),p("div",{class:`${Z}-dropdown-btns`},[p(Wt,{type:"link",size:"small",disabled:H.value,onClick:()=>E()},{default:()=>[U.filterReset]}),p(Wt,{type:"primary",size:"small",onClick:M},{default:()=>[U.filterConfirm]})])]);const X=p(Rse,{class:`${Z}-dropdown`},{default:()=>[J]});let q;return typeof f.value=="function"?q=f.value({filtered:c.value,column:G.__originColumn__}):f.value?q=f.value:q=p(_S,null,null),p("div",{class:`${Z}-column`},[p("span",{class:`${Y}-column-title`},[(j=n.default)===null||j===void 0?void 0:j.call(n)]),p(sr,{overlay:X,trigger:["click"],open:m.value,onOpenChange:R,getPopupContainer:Q,placement:F.value==="rtl"?"bottomLeft":"bottomRight"},{default:()=>[p("span",{role:"button",tabindex:-1,class:ce(`${Z}-trigger`,{active:c.value}),onClick:V=>{V.stopPropagation()}},[q])]})])}}});function rb(e,t,n){let o=[];return(e||[]).forEach((r,i)=>{var l,a;const s=Nu(i,n),c=r.filterDropdown||((l=r==null?void 0:r.slots)===null||l===void 0?void 0:l.filterDropdown)||r.customFilterDropdown;if(r.filters||c||"onFilter"in r)if("filteredValue"in r){let u=r.filteredValue;c||(u=(a=u==null?void 0:u.map(String))!==null&&a!==void 0?a:u),o.push({column:r,key:Zl(r,s),filteredKeys:u,forceFiltered:r.filtered})}else o.push({column:r,key:Zl(r,s),filteredKeys:t&&r.defaultFilteredValue?r.defaultFilteredValue:void 0,forceFiltered:r.filtered});"children"in r&&(o=[...o,...rb(r.children,t,s)])}),o}function U_(e,t,n,o,r,i,l,a){return n.map((s,c)=>{var u;const d=Nu(c,a),{filterMultiple:f=!0,filterMode:h,filterSearch:m}=s;let g=s;const y=s.filterDropdown||((u=s==null?void 0:s.slots)===null||u===void 0?void 0:u.filterDropdown)||s.customFilterDropdown;if(g.filters||y){const b=Zl(g,d),S=o.find($=>{let{key:x}=$;return b===x});g=v(v({},g),{title:$=>p(pce,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:g,columnKey:b,filterState:S,filterMultiple:f,filterMode:h,filterSearch:m,triggerFilter:i,locale:r,getPopupContainer:l},{default:()=>[ES(s.title,$)]})})}return"children"in g&&(g=v(v({},g),{children:U_(e,t,g.children,o,r,i,l,d)})),g})}function pg(e){let t=[];return(e||[]).forEach(n=>{let{value:o,children:r}=n;t.push(o),r&&(t=[...t,...pg(r)])}),t}function o3(e){const t={};return e.forEach(n=>{let{key:o,filteredKeys:r,column:i}=n;var l;const a=i.filterDropdown||((l=i==null?void 0:i.slots)===null||l===void 0?void 0:l.filterDropdown)||i.customFilterDropdown,{filters:s}=i;if(a)t[o]=r||null;else if(Array.isArray(r)){const c=pg(s);t[o]=c.filter(u=>r.includes(String(u)))}else t[o]=null}),t}function r3(e,t){return t.reduce((n,o)=>{const{column:{onFilter:r,filters:i},filteredKeys:l}=o;return r&&l&&l.length?n.filter(a=>l.some(s=>{const c=pg(i),u=c.findIndex(f=>String(f)===String(s)),d=u!==-1?c[u]:s;return r(d,a)})):n},e)}function G_(e){return e.flatMap(t=>"children"in t?[t,...G_(t.children||[])]:[t])}function hce(e){let{prefixCls:t,dropdownPrefixCls:n,mergedColumns:o,locale:r,onFilterChange:i,getPopupContainer:l}=e;const a=I(()=>G_(o.value)),[s,c]=St(rb(a.value,!0)),u=I(()=>{const m=rb(a.value,!1);if(m.length===0)return m;let g=!0,y=!0;if(m.forEach(b=>{let{filteredKeys:S}=b;S!==void 0?g=!1:y=!1}),g){const b=(a.value||[]).map((S,$)=>Zl(S,Nu($)));return s.value.filter(S=>{let{key:$}=S;return b.includes($)}).map(S=>{const $=a.value[b.findIndex(x=>x===S.key)];return v(v({},S),{column:v(v({},S.column),$),forceFiltered:$.filtered})})}return It(y,"Table","Columns should all contain `filteredValue` or not contain `filteredValue`."),m}),d=I(()=>o3(u.value)),f=m=>{const g=u.value.filter(y=>{let{key:b}=y;return b!==m.key});g.push(m),c(g),i(o3(g),g)};return[m=>U_(t.value,n.value,m,u.value,r.value,f,l.value),u,d]}function X_(e,t){return e.map(n=>{const o=v({},n);return o.title=ES(o.title,t),"children"in o&&(o.children=X_(o.children,t)),o})}function gce(e){return[n=>X_(n,e.value)]}function mce(e){return function(n){let{prefixCls:o,onExpand:r,record:i,expanded:l,expandable:a}=n;const s=`${o}-row-expand-icon`;return p("button",{type:"button",onClick:c=>{r(i,c),c.stopPropagation()},class:ce(s,{[`${s}-spaced`]:!a,[`${s}-expanded`]:a&&l,[`${s}-collapsed`]:a&&!l}),"aria-label":l?e.collapse:e.expand,"aria-expanded":l},null)}}function Y_(e,t){const n=t.value;return e.map(o=>{var r;if(o===Xr||o===Ri)return o;const i=v({},o),{slots:l={}}=i;return i.__originColumn__=o,It(!("slots"in i),"Table","`column.slots` is deprecated. Please use `v-slot:headerCell` `v-slot:bodyCell` instead."),Object.keys(l).forEach(a=>{const s=l[a];i[a]===void 0&&n[s]&&(i[a]=n[s])}),t.value.headerCell&&!(!((r=o.slots)===null||r===void 0)&&r.title)&&(i.title=gh(t.value,"headerCell",{title:o.title,column:o},()=>[o.title])),"children"in i&&Array.isArray(i.children)&&(i.children=Y_(i.children,t)),i})}function vce(e){return[n=>Y_(n,e)]}const bce=e=>{const{componentCls:t}=e,n=`${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`,o=(r,i,l)=>({[`&${t}-${r}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"> table > tbody > tr > td":{[`> ${t}-expanded-row-fixed`]:{margin:`-${i}px -${l+e.lineWidth}px`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:v(v(v({[`> ${t}-title`]:{border:n,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:n,[` + > ${t}-content, + > ${t}-header, + > ${t}-body, + > ${t}-summary + `]:{"> table":{"\n > thead > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:n},"> thead":{"> tr:not(:last-child) > th":{borderBottom:n},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:n}},"> tbody > tr > td":{[`> ${t}-expanded-row-fixed`]:{margin:`-${e.tablePaddingVertical}px -${e.tablePaddingHorizontal+e.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:e.lineWidth,bottom:0,borderInlineEnd:n,content:'""'}}}}},[` + > ${t}-content, + > ${t}-header + `]:{"> table":{borderTop:n}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[` + > tr${t}-expanded-row, + > tr${t}-placeholder + `]:{"> td":{borderInlineEnd:0}}}}}},o("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),o("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{[`> ${t}-footer`]:{border:n,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${e.lineWidth}px 0 ${e.lineWidth}px ${e.tableHeaderBg}`}}}}},yce=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:v(v({},Zt),{wordBreak:"keep-all",[` + &${t}-cell-fix-left-last, + &${t}-cell-fix-right-first + `]:{overflow:"visible",[`${t}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${t}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},Sce=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:"center",color:e.colorTextDisabled,"&:hover > td":{background:e.colorBgContainer}}}}},$ce=e=>{const{componentCls:t,antCls:n,controlInteractiveSize:o,motionDurationSlow:r,lineWidth:i,paddingXS:l,lineType:a,tableBorderColor:s,tableExpandIconBg:c,tableExpandColumnWidth:u,borderRadius:d,fontSize:f,fontSizeSM:h,lineHeight:m,tablePaddingVertical:g,tablePaddingHorizontal:y,tableExpandedRowBg:b,paddingXXS:S}=e,$=o/2-i,x=$*2+i*3,C=`${i}px ${a} ${s}`,O=S-i;return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:u},[`${t}-row-expand-icon-cell`]:{textAlign:"center",[`${t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${t}-row-indent`]:{height:1,float:"left"},[`${t}-row-expand-icon`]:v(v({},fh(e)),{position:"relative",float:"left",boxSizing:"border-box",width:x,height:x,padding:0,color:"inherit",lineHeight:`${x}px`,background:c,border:C,borderRadius:d,transform:`scale(${o/x})`,transition:`all ${r}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${r} ease-out`,content:'""'},"&::before":{top:$,insetInlineEnd:O,insetInlineStart:O,height:i},"&::after":{top:O,bottom:O,insetInlineStart:$,width:i,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:(f*m-i*3)/2-Math.ceil((h*1.4-i*3)/2),marginInlineEnd:l},[`tr${t}-expanded-row`]:{"&, &:hover":{"> td":{background:b}},[`${n}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`-${g}px -${y}px`,padding:`${g}px ${y}px`}}}},Cce=e=>{const{componentCls:t,antCls:n,iconCls:o,tableFilterDropdownWidth:r,tableFilterDropdownSearchWidth:i,paddingXXS:l,paddingXS:a,colorText:s,lineWidth:c,lineType:u,tableBorderColor:d,tableHeaderIconColor:f,fontSizeSM:h,tablePaddingHorizontal:m,borderRadius:g,motionDurationSlow:y,colorTextDescription:b,colorPrimary:S,tableHeaderFilterActiveBg:$,colorTextDisabled:x,tableFilterDropdownBg:C,tableFilterDropdownHeight:O,controlItemBgHover:w,controlItemBgActive:P,boxShadowSecondary:T}=e,M=`${n}-dropdown`,E=`${t}-filter-dropdown`,A=`${n}-tree`,R=`${c}px ${u} ${d}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-l,marginInline:`${l}px ${-m/2}px`,padding:`0 ${l}px`,color:f,fontSize:h,borderRadius:g,cursor:"pointer",transition:`all ${y}`,"&:hover":{color:b,background:$},"&.active":{color:S}}}},{[`${n}-dropdown`]:{[E]:v(v({},Ze(e)),{minWidth:r,backgroundColor:C,borderRadius:g,boxShadow:T,[`${M}-menu`]:{maxHeight:O,overflowX:"hidden",border:0,boxShadow:"none","&:empty::after":{display:"block",padding:`${a}px 0`,color:x,fontSize:h,textAlign:"center",content:'"Not Found"'}},[`${E}-tree`]:{paddingBlock:`${a}px 0`,paddingInline:a,[A]:{padding:0},[`${A}-treenode ${A}-node-content-wrapper:hover`]:{backgroundColor:w},[`${A}-treenode-checkbox-checked ${A}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:P}}},[`${E}-search`]:{padding:a,borderBottom:R,"&-input":{input:{minWidth:i},[o]:{color:x}}},[`${E}-checkall`]:{width:"100%",marginBottom:l,marginInlineStart:l},[`${E}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${a-c}px ${a}px`,overflow:"hidden",backgroundColor:"inherit",borderTop:R}})}},{[`${n}-dropdown ${E}, ${E}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:a,color:s},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},xce=e=>{const{componentCls:t,lineWidth:n,colorSplit:o,motionDurationSlow:r,zIndexTableFixed:i,tableBg:l,zIndexTableSticky:a}=e,s=o;return{[`${t}-wrapper`]:{[` + ${t}-cell-fix-left, + ${t}-cell-fix-right + `]:{position:"sticky !important",zIndex:i,background:l},[` + ${t}-cell-fix-left-first::after, + ${t}-cell-fix-left-last::after + `]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-n,width:30,transform:"translateX(100%)",transition:`box-shadow ${r}`,content:'""',pointerEvents:"none"},[`${t}-cell-fix-left-all::after`]:{display:"none"},[` + ${t}-cell-fix-right-first::after, + ${t}-cell-fix-right-last::after + `]:{position:"absolute",top:0,bottom:-n,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${r}`,content:'""',pointerEvents:"none"},[`${t}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:a+1,width:30,transition:`box-shadow ${r}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${t}-ping-left`]:{[`&:not(${t}-has-fix-left) ${t}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${s}`}},[` + ${t}-cell-fix-left-first::after, + ${t}-cell-fix-left-last::after + `]:{boxShadow:`inset 10px 0 8px -8px ${s}`},[`${t}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${t}-ping-right`]:{[`&:not(${t}-has-fix-right) ${t}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${s}`}},[` + ${t}-cell-fix-right-first::after, + ${t}-cell-fix-right-last::after + `]:{boxShadow:`inset -10px 0 8px -8px ${s}`}}}}},wce=e=>{const{componentCls:t,antCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-pagination${n}-pagination`]:{margin:`${e.margin}px 0`},[`${t}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Oce=e=>{const{componentCls:t,tableRadius:n}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${n}px ${n}px 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,table:{borderRadius:0,"> thead > tr:first-child":{"th:first-child":{borderRadius:0},"th:last-child":{borderRadius:0}}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:`0 0 ${n}px ${n}px`}}}}},Pce=e=>{const{componentCls:t}=e;return{[`${t}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${t}-pagination-left`]:{justifyContent:"flex-end"},[`${t}-pagination-right`]:{justifyContent:"flex-start"},[`${t}-row-expand-icon`]:{"&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}}}}},Ice=e=>{const{componentCls:t,antCls:n,iconCls:o,fontSizeIcon:r,paddingXS:i,tableHeaderIconColor:l,tableHeaderIconColorHover:a}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:e.tableSelectionColumnWidth},[`${t}-bordered ${t}-selection-col`]:{width:e.tableSelectionColumnWidth+i*2},[` + table tr th${t}-selection-column, + table tr td${t}-selection-column + `]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",[`${n}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:e.zIndexTableFixed+1},[`table tr th${t}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${t}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${t}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${e.tablePaddingHorizontal/4}px`,[o]:{color:l,fontSize:r,verticalAlign:"baseline","&:hover":{color:a}}}}}},Tce=e=>{const{componentCls:t}=e,n=(o,r,i,l)=>({[`${t}${t}-${o}`]:{fontSize:l,[` + ${t}-title, + ${t}-footer, + ${t}-thead > tr > th, + ${t}-tbody > tr > td, + tfoot > tr > th, + tfoot > tr > td + `]:{padding:`${r}px ${i}px`},[`${t}-filter-trigger`]:{marginInlineEnd:`-${i/2}px`},[`${t}-expanded-row-fixed`]:{margin:`-${r}px -${i}px`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:`-${r}px`,marginInline:`${e.tableExpandColumnWidth-i}px -${i}px`}},[`${t}-selection-column`]:{paddingInlineStart:`${i/4}px`}}});return{[`${t}-wrapper`]:v(v({},n("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),n("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},Ece=e=>{const{componentCls:t}=e;return{[`${t}-wrapper ${t}-resize-handle`]:{position:"absolute",top:0,height:"100% !important",bottom:0,left:" auto !important",right:" -8px",cursor:"col-resize",touchAction:"none",userSelect:"auto",width:"16px",zIndex:1,"&-line":{display:"block",width:"1px",marginLeft:"7px",height:"100% !important",backgroundColor:e.colorPrimary,opacity:0},"&:hover &-line":{opacity:1}},[`${t}-wrapper ${t}-resize-handle.dragging`]:{overflow:"hidden",[`${t}-resize-handle-line`]:{opacity:1},"&:before":{position:"absolute",top:0,bottom:0,content:'" "',width:"200vw",transform:"translateX(-50%)",opacity:0}}}},_ce=e=>{const{componentCls:t,marginXXS:n,fontSizeIcon:o,tableHeaderIconColor:r,tableHeaderIconColorHover:i}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},[` + &${t}-cell-fix-left:hover, + &${t}-cell-fix-right:hover + `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${t}-column-sorter`]:{marginInlineStart:n,color:r,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:o,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:i}}}},Mce=e=>{const{componentCls:t,opacityLoading:n,tableScrollThumbBg:o,tableScrollThumbBgHover:r,tableScrollThumbSize:i,tableScrollBg:l,zIndexTableSticky:a}=e,s=`${e.lineWidth}px ${e.lineType} ${e.tableBorderColor}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:a,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${i}px !important`,zIndex:a,display:"flex",alignItems:"center",background:l,borderTop:s,opacity:n,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:i,backgroundColor:o,borderRadius:100,transition:`all ${e.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:r}}}}}}},i3=e=>{const{componentCls:t,lineWidth:n,tableBorderColor:o}=e,r=`${n}px ${e.lineType} ${o}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:r}}},[`div${t}-summary`]:{boxShadow:`0 -${n}px 0 ${o}`}}}},Ace=e=>{const{componentCls:t,fontWeightStrong:n,tablePaddingVertical:o,tablePaddingHorizontal:r,lineWidth:i,lineType:l,tableBorderColor:a,tableFontSize:s,tableBg:c,tableRadius:u,tableHeaderTextColor:d,motionDurationMid:f,tableHeaderBg:h,tableHeaderCellSplitColor:m,tableRowHoverBg:g,tableSelectedRowBg:y,tableSelectedRowHoverBg:b,tableFooterTextColor:S,tableFooterBg:$,paddingContentVerticalLG:x}=e,C=`${i}px ${l} ${a}`;return{[`${t}-wrapper`]:v(v({clear:"both",maxWidth:"100%"},ur()),{[t]:v(v({},Ze(e)),{fontSize:s,background:c,borderRadius:`${u}px ${u}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${u}px ${u}px 0 0`,borderCollapse:"separate",borderSpacing:0},[` + ${t}-thead > tr > th, + ${t}-tbody > tr > td, + tfoot > tr > th, + tfoot > tr > td + `]:{position:"relative",padding:`${x}px ${r}px`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${o}px ${r}px`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:d,fontWeight:n,textAlign:"start",background:h,borderBottom:C,transition:`background ${f} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:m,transform:"translateY(-50%)",transition:`background-color ${f}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}:not(${t}-bordered)`]:{[`${t}-tbody`]:{"> tr":{"> td":{borderTop:C,borderBottom:"transparent"},"&:last-child > td":{borderBottom:C},[`&:first-child > td, + &${t}-measure-row + tr > td`]:{borderTop:"none",borderTopColor:"transparent"}}}},[`${t}${t}-bordered`]:{[`${t}-tbody`]:{"> tr":{"> td":{borderBottom:C}}}},[`${t}-tbody`]:{"> tr":{"> td":{transition:`background ${f}, border-color ${f}`,[` + > ${t}-wrapper:only-child, + > ${t}-expanded-row-fixed > ${t}-wrapper:only-child + `]:{[t]:{marginBlock:`-${o}px`,marginInline:`${e.tableExpandColumnWidth-r}px -${r}px`,[`${t}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},[` + &${t}-row:hover > td, + > td${t}-cell-row-hover + `]:{background:g},[`&${t}-row-selected`]:{"> td":{background:y},"&:hover > td":{background:b}}}},[`${t}-footer`]:{padding:`${o}px ${r}px`,color:S,background:$}})}},Rce=Xe("Table",e=>{const{controlItemBgActive:t,controlItemBgActiveHover:n,colorTextPlaceholder:o,colorTextHeading:r,colorSplit:i,colorBorderSecondary:l,fontSize:a,padding:s,paddingXS:c,paddingSM:u,controlHeight:d,colorFillAlter:f,colorIcon:h,colorIconHover:m,opacityLoading:g,colorBgContainer:y,borderRadiusLG:b,colorFillContent:S,colorFillSecondary:$,controlInteractiveSize:x}=e,C=new vt(h),O=new vt(m),w=t,P=2,T=new vt($).onBackground(y).toHexString(),M=new vt(S).onBackground(y).toHexString(),E=new vt(f).onBackground(y).toHexString(),A=Fe(e,{tableFontSize:a,tableBg:y,tableRadius:b,tablePaddingVertical:s,tablePaddingHorizontal:s,tablePaddingVerticalMiddle:u,tablePaddingHorizontalMiddle:c,tablePaddingVerticalSmall:c,tablePaddingHorizontalSmall:c,tableBorderColor:l,tableHeaderTextColor:r,tableHeaderBg:E,tableFooterTextColor:r,tableFooterBg:E,tableHeaderCellSplitColor:l,tableHeaderSortBg:T,tableHeaderSortHoverBg:M,tableHeaderIconColor:C.clone().setAlpha(C.getAlpha()*g).toRgbString(),tableHeaderIconColorHover:O.clone().setAlpha(O.getAlpha()*g).toRgbString(),tableBodySortBg:E,tableFixedHeaderSortActiveBg:T,tableHeaderFilterActiveBg:S,tableFilterDropdownBg:y,tableRowHoverBg:E,tableSelectedRowBg:w,tableSelectedRowHoverBg:n,zIndexTableFixed:P,zIndexTableSticky:P+1,tableFontSizeMiddle:a,tableFontSizeSmall:a,tableSelectionColumnWidth:d,tableExpandIconBg:y,tableExpandColumnWidth:x+2*e.padding,tableExpandedRowBg:f,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:o,tableScrollThumbBgHover:r,tableScrollBg:i});return[Ace(A),wce(A),i3(A),_ce(A),Cce(A),bce(A),Oce(A),$ce(A),i3(A),Sce(A),Ice(A),xce(A),Mce(A),yce(A),Tce(A),Ece(A),Pce(A)]}),Dce=[],q_=()=>({prefixCls:Be(),columns:ut(),rowKey:ze([String,Function]),tableLayout:Be(),rowClassName:ze([String,Function]),title:ve(),footer:ve(),id:Be(),showHeader:Ce(),components:Ne(),customRow:ve(),customHeaderRow:ve(),direction:Be(),expandFixed:ze([Boolean,String]),expandColumnWidth:Number,expandedRowKeys:ut(),defaultExpandedRowKeys:ut(),expandedRowRender:ve(),expandRowByClick:Ce(),expandIcon:ve(),onExpand:ve(),onExpandedRowsChange:ve(),"onUpdate:expandedRowKeys":ve(),defaultExpandAllRows:Ce(),indentSize:Number,expandIconColumnIndex:Number,showExpandColumn:Ce(),expandedRowClassName:ve(),childrenColumnName:Be(),rowExpandable:ve(),sticky:ze([Boolean,Object]),dropdownPrefixCls:String,dataSource:ut(),pagination:ze([Boolean,Object]),loading:ze([Boolean,Object]),size:Be(),bordered:Ce(),locale:Ne(),onChange:ve(),onResizeColumn:ve(),rowSelection:Ne(),getPopupContainer:ve(),scroll:Ne(),sortDirections:ut(),showSorterTooltip:ze([Boolean,Object],!0),transformCellText:ve()}),Nce=re({name:"InternalTable",inheritAttrs:!1,props:et(v(v({},q_()),{contextSlots:Ne()}),{rowKey:"key"}),setup(e,t){let{attrs:n,slots:o,expose:r,emit:i}=t;It(!(typeof e.rowKey=="function"&&e.rowKey.length>1),"Table","`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected."),Tae(I(()=>e.contextSlots)),Eae({onResizeColumn:(ae,le)=>{i("resizeColumn",ae,le)}});const l=Ps(),a=I(()=>{const ae=new Set(Object.keys(l.value).filter(le=>l.value[le]));return e.columns.filter(le=>!le.responsive||le.responsive.some(ne=>ae.has(ne)))}),{size:s,renderEmpty:c,direction:u,prefixCls:d,configProvider:f}=Ee("table",e),[h,m]=Rce(d),g=I(()=>{var ae;return e.transformCellText||((ae=f.transformCellText)===null||ae===void 0?void 0:ae.value)}),[y]=Zo("Table",ro.Table,We(e,"locale")),b=I(()=>e.dataSource||Dce),S=I(()=>f.getPrefixCls("dropdown",e.dropdownPrefixCls)),$=I(()=>e.childrenColumnName||"children"),x=I(()=>b.value.some(ae=>ae==null?void 0:ae[$.value])?"nest":e.expandedRowRender?"row":null),C=ft({body:null}),O=ae=>{v(C,ae)},w=I(()=>typeof e.rowKey=="function"?e.rowKey:ae=>ae==null?void 0:ae[e.rowKey]),[P]=Sse(b,$,w),T={},M=function(ae,le){let ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{pagination:se,scroll:pe,onChange:he}=e,ge=v(v({},T),ae);ne&&(T.resetPagination(),ge.pagination.current&&(ge.pagination.current=1),se&&se.onChange&&se.onChange(1,ge.pagination.pageSize)),pe&&pe.scrollToFirstRowOnChange!==!1&&C.body&&oy(0,{getContainer:()=>C.body}),he==null||he(ge.pagination,ge.filters,ge.sorter,{currentDataSource:r3(nb(b.value,ge.sorterStates,$.value),ge.filterStates),action:le})},E=(ae,le)=>{M({sorter:ae,sorterStates:le},"sort",!1)},[A,R,F,_]=Ese({prefixCls:d,mergedColumns:a,onSorterChange:E,sortDirections:I(()=>e.sortDirections||["ascend","descend"]),tableLocale:y,showSorterTooltip:We(e,"showSorterTooltip")}),N=I(()=>nb(b.value,R.value,$.value)),B=(ae,le)=>{M({filters:ae,filterStates:le},"filter",!0)},[L,k,z]=hce({prefixCls:d,locale:y,dropdownPrefixCls:S,mergedColumns:a,onFilterChange:B,getPopupContainer:We(e,"getPopupContainer")}),H=I(()=>r3(N.value,k.value)),[j]=vce(We(e,"contextSlots")),Y=I(()=>{const ae={},le=z.value;return Object.keys(le).forEach(ne=>{le[ne]!==null&&(ae[ne]=le[ne])}),v(v({},F.value),{filters:ae})}),[Z]=gce(Y),G=(ae,le)=>{M({pagination:v(v({},T.pagination),{current:ae,pageSize:le})},"paginate")},[te,U]=yse(I(()=>H.value.length),We(e,"pagination"),G);je(()=>{T.sorter=_.value,T.sorterStates=R.value,T.filters=z.value,T.filterStates=k.value,T.pagination=e.pagination===!1?{}:bse(te.value,e.pagination),T.resetPagination=U});const Q=I(()=>{if(e.pagination===!1||!te.value.pageSize)return H.value;const{current:ae=1,total:le,pageSize:ne=Z0}=te.value;return It(ae>0,"Table","`current` should be positive number."),H.value.lengthne?H.value.slice((ae-1)*ne,ae*ne):H.value:H.value.slice((ae-1)*ne,ae*ne)});je(()=>{lt(()=>{const{total:ae,pageSize:le=Z0}=te.value;H.value.lengthle&&It(!1,"Table","`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.")})},{flush:"post"});const J=I(()=>e.showExpandColumn===!1?-1:x.value==="nest"&&e.expandIconColumnIndex===void 0?e.rowSelection?1:0:e.expandIconColumnIndex>0&&e.rowSelection?e.expandIconColumnIndex-1:e.expandIconColumnIndex),X=ie();Se(()=>e.rowSelection,()=>{X.value=e.rowSelection?v({},e.rowSelection):e.rowSelection},{deep:!0,immediate:!0});const[q,V]=Cse(X,{prefixCls:d,data:H,pageData:Q,getRowKey:w,getRecordByKey:P,expandType:x,childrenColumnName:$,locale:y,getPopupContainer:I(()=>e.getPopupContainer)}),K=(ae,le,ne)=>{let se;const{rowClassName:pe}=e;return typeof pe=="function"?se=ce(pe(ae,le,ne)):se=ce(pe),ce({[`${d.value}-row-selected`]:V.value.has(w.value(ae,le))},se)};r({selectedKeySet:V});const ee=I(()=>typeof e.indentSize=="number"?e.indentSize:15),ue=ae=>Z(q(L(A(j(ae)))));return()=>{var ae;const{expandIcon:le=o.expandIcon||mce(y.value),pagination:ne,loading:se,bordered:pe}=e;let he,ge;if(ne!==!1&&(!((ae=te.value)===null||ae===void 0)&&ae.total)){let de;te.value.size?de=te.value.size:de=s.value==="small"||s.value==="middle"?"small":void 0;const ye=Re=>p(lg,D(D({},te.value),{},{class:[`${d.value}-pagination ${d.value}-pagination-${Re}`,te.value.class],size:de}),null),Oe=u.value==="rtl"?"left":"right",{position:Te}=te.value;if(Te!==null&&Array.isArray(Te)){const Re=Te.find(Pe=>Pe.includes("top")),$e=Te.find(Pe=>Pe.includes("bottom")),we=Te.every(Pe=>`${Pe}`=="none");!Re&&!$e&&!we&&(ge=ye(Oe)),Re&&(he=ye(Re.toLowerCase().replace("top",""))),$e&&(ge=ye($e.toLowerCase().replace("bottom","")))}else ge=ye(Oe)}let be;typeof se=="boolean"?be={spinning:se}:typeof se=="object"&&(be=v({spinning:!0},se));const xe=ce(`${d.value}-wrapper`,{[`${d.value}-wrapper-rtl`]:u.value==="rtl"},n.class,m.value),fe=rt(e,["columns"]);return h(p("div",{class:xe,style:n.style},[p(Dr,D({spinning:!1},be),{default:()=>[he,p(mse,D(D(D({},n),fe),{},{expandedRowKeys:e.expandedRowKeys,defaultExpandedRowKeys:e.defaultExpandedRowKeys,expandIconColumnIndex:J.value,indentSize:ee.value,expandIcon:le,columns:a.value,direction:u.value,prefixCls:d.value,class:ce({[`${d.value}-middle`]:s.value==="middle",[`${d.value}-small`]:s.value==="small",[`${d.value}-bordered`]:pe,[`${d.value}-empty`]:b.value.length===0}),data:Q.value,rowKey:w.value,rowClassName:K,internalHooks:q0,internalRefs:C,onUpdateInternalRefs:O,transformColumns:ue,transformCellText:g.value}),v(v({},o),{emptyText:()=>{var de,ye;return((de=o.emptyText)===null||de===void 0?void 0:de.call(o))||((ye=e.locale)===null||ye===void 0?void 0:ye.emptyText)||c("Table")}})),ge]})]))}}}),ev=re({name:"ATable",inheritAttrs:!1,props:et(q_(),{rowKey:"key"}),slots:Object,setup(e,t){let{attrs:n,slots:o,expose:r}=t;const i=ie();return r({table:i}),()=>{var l;const a=e.columns||B_((l=o.default)===null||l===void 0?void 0:l.call(o));return p(Nce,D(D(D({ref:i},n),e),{},{columns:a||[],expandedRowRender:o.expandedRowRender||e.expandedRowRender,contextSlots:v({},o)}),o)}}}),hf=re({name:"ATableColumn",slots:Object,render(){return null}}),gf=re({name:"ATableColumnGroup",slots:Object,__ANT_TABLE_COLUMN_GROUP:!0,render(){return null}}),Dp=rse,Np=ase,mf=v(sse,{Cell:Np,Row:Dp,name:"ATableSummary"}),Bce=v(ev,{SELECTION_ALL:J0,SELECTION_INVERT:Q0,SELECTION_NONE:eb,SELECTION_COLUMN:Xr,EXPAND_COLUMN:Ri,Column:hf,ColumnGroup:gf,Summary:mf,install:e=>(e.component(mf.name,mf),e.component(Np.name,Np),e.component(Dp.name,Dp),e.component(ev.name,ev),e.component(hf.name,hf),e.component(gf.name,gf),e)}),Lce={prefixCls:String,placeholder:String,value:String,handleClear:Function,disabled:{type:Boolean,default:void 0},onChange:Function},kce=re({compatConfig:{MODE:3},name:"Search",inheritAttrs:!1,props:et(Lce,{placeholder:""}),emits:["change"],setup(e,t){let{emit:n}=t;const o=r=>{var i;n("change",r),r.target.value===""&&((i=e.handleClear)===null||i===void 0||i.call(e))};return()=>{const{placeholder:r,value:i,prefixCls:l,disabled:a}=e;return p(cn,{placeholder:r,class:l,value:i,onChange:o,disabled:a,allowClear:!0},{prefix:()=>p(ua,null,null)})}}});var Fce={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};function l3(e){for(var t=1;t{const{renderedText:o,renderedEl:r,item:i,checked:l,disabled:a,prefixCls:s,showRemove:c}=e,u=ce({[`${s}-content-item`]:!0,[`${s}-content-item-disabled`]:a||i.disabled});let d;return(typeof o=="string"||typeof o=="number")&&(d=String(o)),p(oa,{componentName:"Transfer",defaultLocale:ro.Transfer},{default:f=>{const h=p("span",{class:`${s}-content-item-text`},[r]);return c?p("li",{class:u,title:d},[h,p(Mp,{disabled:a||i.disabled,class:`${s}-content-item-remove`,"aria-label":f.remove,onClick:()=>{n("remove",i)}},{default:()=>[p(hg,null,null)]})]):p("li",{class:u,title:d,onClick:a||i.disabled?Hce:()=>{n("click",i)}},[p(Ko,{class:`${s}-checkbox`,checked:l,disabled:a||i.disabled},null),h])}})}}}),Wce={prefixCls:String,filteredRenderItems:W.array.def([]),selectedKeys:W.array,disabled:Ce(),showRemove:Ce(),pagination:W.any,onItemSelect:Function,onScroll:Function,onItemRemove:Function};function Kce(e){if(!e)return null;const t={pageSize:10,simple:!0,showSizeChanger:!1,showLessItems:!1};return typeof e=="object"?v(v({},t),e):t}const Uce=re({compatConfig:{MODE:3},name:"ListBody",inheritAttrs:!1,props:Wce,emits:["itemSelect","itemRemove","scroll"],setup(e,t){let{emit:n,expose:o}=t;const r=ie(1),i=d=>{const{selectedKeys:f}=e,h=f.indexOf(d.key)>=0;n("itemSelect",d.key,!h)},l=d=>{n("itemRemove",[d.key])},a=d=>{n("scroll",d)},s=I(()=>Kce(e.pagination));Se([s,()=>e.filteredRenderItems],()=>{if(s.value){const d=Math.ceil(e.filteredRenderItems.length/s.value.pageSize);r.value=Math.min(r.value,d)}},{immediate:!0});const c=I(()=>{const{filteredRenderItems:d}=e;let f=d;return s.value&&(f=d.slice((r.value-1)*s.value.pageSize,r.value*s.value.pageSize)),f}),u=d=>{r.value=d};return o({items:c}),()=>{const{prefixCls:d,filteredRenderItems:f,selectedKeys:h,disabled:m,showRemove:g}=e;let y=null;s.value&&(y=p(lg,{simple:s.value.simple,showSizeChanger:s.value.showSizeChanger,showLessItems:s.value.showLessItems,size:"small",disabled:m,class:`${d}-pagination`,total:f.length,pageSize:s.value.pageSize,current:r.value,onChange:u},null));const b=c.value.map(S=>{let{renderedEl:$,renderedText:x,item:C}=S;const{disabled:O}=C,w=h.indexOf(C.key)>=0;return p(Vce,{disabled:m||O,key:C.key,item:C,renderedText:x,renderedEl:$,checked:w,prefixCls:d,onClick:i,onRemove:l,showRemove:g},null)});return p(He,null,[p("ul",{class:ce(`${d}-content`,{[`${d}-content-show-remove`]:g}),onScroll:a},[b]),y])}}}),ib=e=>{const t=new Map;return e.forEach((n,o)=>{t.set(n,o)}),t},Gce=e=>{const t=new Map;return e.forEach((n,o)=>{let{disabled:r,key:i}=n;r&&t.set(i,o)}),t},Xce=()=>null;function Yce(e){return!!(e&&!qt(e)&&Object.prototype.toString.call(e)==="[object Object]")}function Pd(e){return e.filter(t=>!t.disabled).map(t=>t.key)}const qce={prefixCls:String,dataSource:ut([]),filter:String,filterOption:Function,checkedKeys:W.arrayOf(W.string),handleFilter:Function,handleClear:Function,renderItem:Function,showSearch:Ce(!1),searchPlaceholder:String,notFoundContent:W.any,itemUnit:String,itemsUnit:String,renderList:W.any,disabled:Ce(),direction:Be(),showSelectAll:Ce(),remove:String,selectAll:String,selectCurrent:String,selectInvert:String,removeAll:String,removeCurrent:String,selectAllLabel:W.any,showRemove:Ce(),pagination:W.any,onItemSelect:Function,onItemSelectAll:Function,onItemRemove:Function,onScroll:Function},a3=re({compatConfig:{MODE:3},name:"TransferList",inheritAttrs:!1,props:qce,slots:Object,setup(e,t){let{attrs:n,slots:o}=t;const r=ie(""),i=ie(),l=ie(),a=(C,O)=>{let w=C?C(O):null;const P=!!w&&Nt(w).length>0;return P||(w=p(Uce,D(D({},O),{},{ref:l}),null)),{customize:P,bodyContent:w}},s=C=>{const{renderItem:O=Xce}=e,w=O(C),P=Yce(w);return{renderedText:P?w.value:w,renderedEl:P?w.label:w,item:C}},c=ie([]),u=ie([]);je(()=>{const C=[],O=[];e.dataSource.forEach(w=>{const P=s(w),{renderedText:T}=P;if(r.value&&r.value.trim()&&!b(T,w))return null;C.push(w),O.push(P)}),c.value=C,u.value=O});const d=I(()=>{const{checkedKeys:C}=e;if(C.length===0)return"none";const O=ib(C);return c.value.every(w=>O.has(w.key)||!!w.disabled)?"all":"part"}),f=I(()=>Pd(c.value)),h=(C,O)=>Array.from(new Set([...C,...e.checkedKeys])).filter(w=>O.indexOf(w)===-1),m=C=>{let{disabled:O,prefixCls:w}=C;var P;const T=d.value==="all";return p(Ko,{disabled:((P=e.dataSource)===null||P===void 0?void 0:P.length)===0||O,checked:T,indeterminate:d.value==="part",class:`${w}-checkbox`,onChange:()=>{const E=f.value;e.onItemSelectAll(h(T?[]:E,T?e.checkedKeys:[]))}},null)},g=C=>{var O;const{target:{value:w}}=C;r.value=w,(O=e.handleFilter)===null||O===void 0||O.call(e,C)},y=C=>{var O;r.value="",(O=e.handleClear)===null||O===void 0||O.call(e,C)},b=(C,O)=>{const{filterOption:w}=e;return w?w(r.value,O):C.includes(r.value)},S=(C,O)=>{const{itemsUnit:w,itemUnit:P,selectAllLabel:T}=e;if(T)return typeof T=="function"?T({selectedCount:C,totalCount:O}):T;const M=O>1?w:P;return p(He,null,[(C>0?`${C}/`:"")+O,vn(" "),M])},$=I(()=>Array.isArray(e.notFoundContent)?e.notFoundContent[e.direction==="left"?0:1]:e.notFoundContent),x=(C,O,w,P,T,M)=>{const E=T?p("div",{class:`${C}-body-search-wrapper`},[p(kce,{prefixCls:`${C}-search`,onChange:g,handleClear:y,placeholder:O,value:r.value,disabled:M},null)]):null;let A;const{onEvents:R}=Kb(n),{bodyContent:F,customize:_}=a(P,v(v(v({},e),{filteredItems:c.value,filteredRenderItems:u.value,selectedKeys:w}),R));return _?A=p("div",{class:`${C}-body-customize-wrapper`},[F]):A=c.value.length?F:p("div",{class:`${C}-body-not-found`},[$.value]),p("div",{class:T?`${C}-body ${C}-body-with-search`:`${C}-body`,ref:i},[E,A])};return()=>{var C,O;const{prefixCls:w,checkedKeys:P,disabled:T,showSearch:M,searchPlaceholder:E,selectAll:A,selectCurrent:R,selectInvert:F,removeAll:_,removeCurrent:N,renderList:B,onItemSelectAll:L,onItemRemove:k,showSelectAll:z=!0,showRemove:H,pagination:j}=e,Y=(C=o.footer)===null||C===void 0?void 0:C.call(o,v({},e)),Z=ce(w,{[`${w}-with-pagination`]:!!j,[`${w}-with-footer`]:!!Y}),G=x(w,E,P,B,M,T),te=Y?p("div",{class:`${w}-footer`},[Y]):null,U=!H&&!j&&m({disabled:T,prefixCls:w});let Q=null;H?Q=p(Xt,null,{default:()=>[j&&p(Xt.Item,{key:"removeCurrent",onClick:()=>{const X=Pd((l.value.items||[]).map(q=>q.item));k==null||k(X)}},{default:()=>[N]}),p(Xt.Item,{key:"removeAll",onClick:()=>{k==null||k(f.value)}},{default:()=>[_]})]}):Q=p(Xt,null,{default:()=>[p(Xt.Item,{key:"selectAll",onClick:()=>{const X=f.value;L(h(X,[]))}},{default:()=>[A]}),j&&p(Xt.Item,{onClick:()=>{const X=Pd((l.value.items||[]).map(q=>q.item));L(h(X,[]))}},{default:()=>[R]}),p(Xt.Item,{key:"selectInvert",onClick:()=>{let X;j?X=Pd((l.value.items||[]).map(ee=>ee.item)):X=f.value;const q=new Set(P),V=[],K=[];X.forEach(ee=>{q.has(ee)?K.push(ee):V.push(ee)}),L(h(V,K))}},{default:()=>[F]})]});const J=p(sr,{class:`${w}-header-dropdown`,overlay:Q,disabled:T},{default:()=>[p(nl,null,null)]});return p("div",{class:Z,style:n.style},[p("div",{class:`${w}-header`},[z?p(He,null,[U,J]):null,p("span",{class:`${w}-header-selected`},[p("span",null,[S(P.length,c.value.length)]),p("span",{class:`${w}-header-title`},[(O=o.titleText)===null||O===void 0?void 0:O.call(o)])])]),G,te])}}});function s3(){}const LS=e=>{const{disabled:t,moveToLeft:n=s3,moveToRight:o=s3,leftArrowText:r="",rightArrowText:i="",leftActive:l,rightActive:a,class:s,style:c,direction:u,oneWay:d}=e;return p("div",{class:s,style:c},[p(Wt,{type:"primary",size:"small",disabled:t||!a,onClick:o,icon:p(u!=="rtl"?Ao:Lr,null,null)},{default:()=>[i]}),!d&&p(Wt,{type:"primary",size:"small",disabled:t||!l,onClick:n,icon:p(u!=="rtl"?Lr:Ao,null,null)},{default:()=>[r]})])};LS.displayName="Operation";LS.inheritAttrs=!1;const Zce=e=>{const{antCls:t,componentCls:n,listHeight:o,controlHeightLG:r,marginXXS:i,margin:l}=e,a=`${t}-table`,s=`${t}-input`;return{[`${n}-customize-list`]:{[`${n}-list`]:{flex:"1 1 50%",width:"auto",height:"auto",minHeight:o},[`${a}-wrapper`]:{[`${a}-small`]:{border:0,borderRadius:0,[`${a}-selection-column`]:{width:r,minWidth:r}},[`${a}-pagination${a}-pagination`]:{margin:`${l}px 0 ${i}px`}},[`${s}[disabled]`]:{backgroundColor:"transparent"}}}},c3=(e,t)=>{const{componentCls:n,colorBorder:o}=e;return{[`${n}-list`]:{borderColor:t,"&-search:not([disabled])":{borderColor:o}}}},Jce=e=>{const{componentCls:t}=e;return{[`${t}-status-error`]:v({},c3(e,e.colorError)),[`${t}-status-warning`]:v({},c3(e,e.colorWarning))}},Qce=e=>{const{componentCls:t,colorBorder:n,colorSplit:o,lineWidth:r,transferItemHeight:i,transferHeaderHeight:l,transferHeaderVerticalPadding:a,transferItemPaddingVertical:s,controlItemBgActive:c,controlItemBgActiveHover:u,colorTextDisabled:d,listHeight:f,listWidth:h,listWidthLG:m,fontSizeIcon:g,marginXS:y,paddingSM:b,lineType:S,iconCls:$,motionDurationSlow:x}=e;return{display:"flex",flexDirection:"column",width:h,height:f,border:`${r}px ${S} ${n}`,borderRadius:e.borderRadiusLG,"&-with-pagination":{width:m,height:"auto"},"&-search":{[`${$}-search`]:{color:d}},"&-header":{display:"flex",flex:"none",alignItems:"center",height:l,padding:`${a-r}px ${b}px ${a}px`,color:e.colorText,background:e.colorBgContainer,borderBottom:`${r}px ${S} ${o}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,"> *:not(:last-child)":{marginInlineEnd:4},"> *":{flex:"none"},"&-title":v(v({},Zt),{flex:"auto",textAlign:"end"}),"&-dropdown":v(v({},ra()),{fontSize:g,transform:"translateY(10%)",cursor:"pointer","&[disabled]":{cursor:"not-allowed"}})},"&-body":{display:"flex",flex:"auto",flexDirection:"column",overflow:"hidden",fontSize:e.fontSize,"&-search-wrapper":{position:"relative",flex:"none",padding:b}},"&-content":{flex:"auto",margin:0,padding:0,overflow:"auto",listStyle:"none","&-item":{display:"flex",alignItems:"center",minHeight:i,padding:`${s}px ${b}px`,transition:`all ${x}`,"> *:not(:last-child)":{marginInlineEnd:y},"> *":{flex:"none"},"&-text":v(v({},Zt),{flex:"auto"}),"&-remove":{position:"relative",color:n,cursor:"pointer",transition:`all ${x}`,"&:hover":{color:e.colorLinkHover},"&::after":{position:"absolute",insert:`-${s}px -50%`,content:'""'}},[`&:not(${t}-list-content-item-disabled)`]:{"&:hover":{backgroundColor:e.controlItemBgHover,cursor:"pointer"},[`&${t}-list-content-item-checked:hover`]:{backgroundColor:u}},"&-checked":{backgroundColor:c},"&-disabled":{color:d,cursor:"not-allowed"}},[`&-show-remove ${t}-list-content-item:not(${t}-list-content-item-disabled):hover`]:{background:"transparent",cursor:"default"}},"&-pagination":{padding:`${e.paddingXS}px 0`,textAlign:"end",borderTop:`${r}px ${S} ${o}`},"&-body-not-found":{flex:"none",width:"100%",margin:"auto 0",color:d,textAlign:"center"},"&-footer":{borderTop:`${r}px ${S} ${o}`},"&-checkbox":{lineHeight:1}}},eue=e=>{const{antCls:t,iconCls:n,componentCls:o,transferHeaderHeight:r,marginXS:i,marginXXS:l,fontSizeIcon:a,fontSize:s,lineHeight:c}=e;return{[o]:v(v({},Ze(e)),{position:"relative",display:"flex",alignItems:"stretch",[`${o}-disabled`]:{[`${o}-list`]:{background:e.colorBgContainerDisabled}},[`${o}-list`]:Qce(e),[`${o}-operation`]:{display:"flex",flex:"none",flexDirection:"column",alignSelf:"center",margin:`0 ${i}px`,verticalAlign:"middle",[`${t}-btn`]:{display:"block","&:first-child":{marginBottom:l},[n]:{fontSize:a}}},[`${t}-empty-image`]:{maxHeight:r/2-Math.round(s*c)}})}},tue=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},nue=Xe("Transfer",e=>{const{fontSize:t,lineHeight:n,lineWidth:o,controlHeightLG:r,controlHeight:i}=e,l=Math.round(t*n),a=r,s=i,c=Fe(e,{transferItemHeight:s,transferHeaderHeight:a,transferHeaderVerticalPadding:Math.ceil((a-o-l)/2),transferItemPaddingVertical:(s-l)/2});return[eue(c),Zce(c),Jce(c),tue(c)]},{listWidth:180,listHeight:200,listWidthLG:250}),oue=()=>({id:String,prefixCls:String,dataSource:ut([]),disabled:Ce(),targetKeys:ut(),selectedKeys:ut(),render:ve(),listStyle:ze([Function,Object],()=>({})),operationStyle:Ne(void 0),titles:ut(),operations:ut(),showSearch:Ce(!1),filterOption:ve(),searchPlaceholder:String,notFoundContent:W.any,locale:Ne(),rowKey:ve(),showSelectAll:Ce(),selectAllLabels:ut(),children:ve(),oneWay:Ce(),pagination:ze([Object,Boolean]),status:Be(),onChange:ve(),onSelectChange:ve(),onSearch:ve(),onScroll:ve(),"onUpdate:targetKeys":ve(),"onUpdate:selectedKeys":ve()}),rue=re({compatConfig:{MODE:3},name:"ATransfer",inheritAttrs:!1,props:oue(),slots:Object,setup(e,t){let{emit:n,attrs:o,slots:r,expose:i}=t;const{configProvider:l,prefixCls:a,direction:s}=Ee("transfer",e),[c,u]=nue(a),d=ie([]),f=ie([]),h=ln(),m=yn.useInject(),g=I(()=>gr(m.status,e.status));Se(()=>e.selectedKeys,()=>{var G,te;d.value=((G=e.selectedKeys)===null||G===void 0?void 0:G.filter(U=>e.targetKeys.indexOf(U)===-1))||[],f.value=((te=e.selectedKeys)===null||te===void 0?void 0:te.filter(U=>e.targetKeys.indexOf(U)>-1))||[]},{immediate:!0});const y=(G,te)=>{const U={notFoundContent:te("Transfer")},Q=on(r,e,"notFoundContent");return Q&&(U.notFoundContent=Q),e.searchPlaceholder!==void 0&&(U.searchPlaceholder=e.searchPlaceholder),v(v(v({},G),U),e.locale)},b=G=>{const{targetKeys:te=[],dataSource:U=[]}=e,Q=G==="right"?d.value:f.value,J=Gce(U),X=Q.filter(ee=>!J.has(ee)),q=ib(X),V=G==="right"?X.concat(te):te.filter(ee=>!q.has(ee)),K=G==="right"?"left":"right";G==="right"?d.value=[]:f.value=[],n("update:targetKeys",V),w(K,[]),n("change",V,G,X),h.onFieldChange()},S=()=>{b("left")},$=()=>{b("right")},x=(G,te)=>{w(G,te)},C=G=>x("left",G),O=G=>x("right",G),w=(G,te)=>{G==="left"?(e.selectedKeys||(d.value=te),n("update:selectedKeys",[...te,...f.value]),n("selectChange",te,nt(f.value))):(e.selectedKeys||(f.value=te),n("update:selectedKeys",[...te,...d.value]),n("selectChange",nt(d.value),te))},P=(G,te)=>{const U=te.target.value;n("search",G,U)},T=G=>{P("left",G)},M=G=>{P("right",G)},E=G=>{n("search",G,"")},A=()=>{E("left")},R=()=>{E("right")},F=(G,te,U)=>{const Q=G==="left"?[...d.value]:[...f.value],J=Q.indexOf(te);J>-1&&Q.splice(J,1),U&&Q.push(te),w(G,Q)},_=(G,te)=>F("left",G,te),N=(G,te)=>F("right",G,te),B=G=>{const{targetKeys:te=[]}=e,U=te.filter(Q=>!G.includes(Q));n("update:targetKeys",U),n("change",U,"left",[...G])},L=(G,te)=>{n("scroll",G,te)},k=G=>{L("left",G)},z=G=>{L("right",G)},H=(G,te)=>typeof G=="function"?G({direction:te}):G,j=ie([]),Y=ie([]);je(()=>{const{dataSource:G,rowKey:te,targetKeys:U=[]}=e,Q=[],J=new Array(U.length),X=ib(U);G.forEach(q=>{te&&(q.key=te(q)),X.has(q.key)?J[X.get(q.key)]=q:Q.push(q)}),j.value=Q,Y.value=J}),i({handleSelectChange:w});const Z=G=>{var te,U,Q,J,X,q;const{disabled:V,operations:K=[],showSearch:ee,listStyle:ue,operationStyle:ae,filterOption:le,showSelectAll:ne,selectAllLabels:se=[],oneWay:pe,pagination:he,id:ge=h.id.value}=e,{class:be,style:xe}=o,fe=r.children,de=!fe&&he,ye=l.renderEmpty,Oe=y(G,ye),{footer:Te}=r,Re=e.render||r.render,$e=f.value.length>0,we=d.value.length>0,Pe=ce(a.value,be,{[`${a.value}-disabled`]:V,[`${a.value}-customize-list`]:!!fe,[`${a.value}-rtl`]:s.value==="rtl"},Fn(a.value,g.value,m.hasFeedback),u.value),Me=e.titles,De=(Q=(te=Me&&Me[0])!==null&&te!==void 0?te:(U=r.leftTitle)===null||U===void 0?void 0:U.call(r))!==null&&Q!==void 0?Q:(Oe.titles||["",""])[0],Ae=(q=(J=Me&&Me[1])!==null&&J!==void 0?J:(X=r.rightTitle)===null||X===void 0?void 0:X.call(r))!==null&&q!==void 0?q:(Oe.titles||["",""])[1];return p("div",D(D({},o),{},{class:Pe,style:xe,id:ge}),[p(a3,D({key:"leftList",prefixCls:`${a.value}-list`,dataSource:j.value,filterOption:le,style:H(ue,"left"),checkedKeys:d.value,handleFilter:T,handleClear:A,onItemSelect:_,onItemSelectAll:C,renderItem:Re,showSearch:ee,renderList:fe,onScroll:k,disabled:V,direction:s.value==="rtl"?"right":"left",showSelectAll:ne,selectAllLabel:se[0]||r.leftSelectAllLabel,pagination:de},Oe),{titleText:()=>De,footer:Te}),p(LS,{key:"operation",class:`${a.value}-operation`,rightActive:we,rightArrowText:K[0],moveToRight:$,leftActive:$e,leftArrowText:K[1],moveToLeft:S,style:ae,disabled:V,direction:s.value,oneWay:pe},null),p(a3,D({key:"rightList",prefixCls:`${a.value}-list`,dataSource:Y.value,filterOption:le,style:H(ue,"right"),checkedKeys:f.value,handleFilter:M,handleClear:R,onItemSelect:N,onItemSelectAll:O,onItemRemove:B,renderItem:Re,showSearch:ee,renderList:fe,onScroll:z,disabled:V,direction:s.value==="rtl"?"left":"right",showSelectAll:ne,selectAllLabel:se[1]||r.rightSelectAllLabel,showRemove:pe,pagination:de},Oe),{titleText:()=>Ae,footer:Te})])};return()=>c(p(oa,{componentName:"Transfer",defaultLocale:ro.Transfer,children:Z},null))}}),iue=At(rue);function lue(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function aue(e){const{label:t,value:n,children:o}=e||{},r=n||"value";return{_title:t?[t]:["title","label"],value:r,key:r,children:o||"children"}}function lb(e){return e.disabled||e.disableCheckbox||e.checkable===!1}function sue(e,t){const n=[];function o(r){r.forEach(i=>{n.push(i[t.value]);const l=i[t.children];l&&o(l)})}return o(e),n}function u3(e){return e==null}const Z_=Symbol("TreeSelectContextPropsKey");function cue(e){return qe(Z_,e)}function uue(){return Ke(Z_,{})}const due={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},fue=re({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,setup(e,t){let{slots:n,expose:o}=t;const r=mu(),i=xh(),l=uue(),a=ie(),s=Iy(()=>l.treeData,[()=>r.open,()=>l.treeData],C=>C[0]),c=I(()=>{const{checkable:C,halfCheckedKeys:O,checkedKeys:w}=i;return C?{checked:w,halfChecked:O}:null});Se(()=>r.open,()=>{lt(()=>{var C;r.open&&!r.multiple&&i.checkedKeys.length&&((C=a.value)===null||C===void 0||C.scrollTo({key:i.checkedKeys[0]}))})},{immediate:!0,flush:"post"});const u=I(()=>String(r.searchValue).toLowerCase()),d=C=>u.value?String(C[i.treeNodeFilterProp]).toLowerCase().includes(u.value):!1,f=oe(i.treeDefaultExpandedKeys),h=oe(null);Se(()=>r.searchValue,()=>{r.searchValue&&(h.value=sue(nt(l.treeData),nt(l.fieldNames)))},{immediate:!0});const m=I(()=>i.treeExpandedKeys?i.treeExpandedKeys.slice():r.searchValue?h.value:f.value),g=C=>{var O;f.value=C,h.value=C,(O=i.onTreeExpand)===null||O===void 0||O.call(i,C)},y=C=>{C.preventDefault()},b=(C,O)=>{let{node:w}=O;var P,T;const{checkable:M,checkedKeys:E}=i;M&&lb(w)||((P=l.onSelect)===null||P===void 0||P.call(l,w.key,{selected:!E.includes(w.key)}),r.multiple||(T=r.toggleOpen)===null||T===void 0||T.call(r,!1))},S=ie(null),$=I(()=>i.keyEntities[S.value]),x=C=>{S.value=C};return o({scrollTo:function(){for(var C,O,w=arguments.length,P=new Array(w),T=0;T{var O;const{which:w}=C;switch(w){case Ie.UP:case Ie.DOWN:case Ie.LEFT:case Ie.RIGHT:(O=a.value)===null||O===void 0||O.onKeydown(C);break;case Ie.ENTER:{if($.value){const{selectable:P,value:T}=$.value.node||{};P!==!1&&b(null,{node:{key:S.value},selected:!i.checkedKeys.includes(T)})}break}case Ie.ESC:r.toggleOpen(!1)}},onKeyup:()=>{}}),()=>{var C;const{prefixCls:O,multiple:w,searchValue:P,open:T,notFoundContent:M=(C=n.notFoundContent)===null||C===void 0?void 0:C.call(n)}=r,{listHeight:E,listItemHeight:A,virtual:R,dropdownMatchSelectWidth:F,treeExpandAction:_}=l,{checkable:N,treeDefaultExpandAll:B,treeIcon:L,showTreeIcon:k,switcherIcon:z,treeLine:H,loadData:j,treeLoadedKeys:Y,treeMotion:Z,onTreeLoad:G,checkedKeys:te}=i;if(s.value.length===0)return p("div",{role:"listbox",class:`${O}-empty`,onMousedown:y},[M]);const U={fieldNames:l.fieldNames};return Y&&(U.loadedKeys=Y),m.value&&(U.expandedKeys=m.value),p("div",{onMousedown:y},[$.value&&T&&p("span",{style:due,"aria-live":"assertive"},[$.value.node.value]),p(F_,D(D({ref:a,focusable:!1,prefixCls:`${O}-tree`,treeData:s.value,height:E,itemHeight:A,virtual:R!==!1&&F!==!1,multiple:w,icon:L,showIcon:k,switcherIcon:z,showLine:H,loadData:P?null:j,motion:Z,activeKey:S.value,checkable:N,checkStrictly:!0,checkedKeys:c.value,selectedKeys:N?[]:te,defaultExpandAll:B},U),{},{onActiveChange:x,onSelect:b,onCheck:b,onExpand:g,onLoad:G,filterTreeNode:d,expandAction:_}),v(v({},n),{checkable:i.customSlots.treeCheckable}))])}}}),pue="SHOW_ALL",J_="SHOW_PARENT",kS="SHOW_CHILD";function d3(e,t,n,o){const r=new Set(e);return t===kS?e.filter(i=>{const l=n[i];return!(l&&l.children&&l.children.some(a=>{let{node:s}=a;return r.has(s[o.value])})&&l.children.every(a=>{let{node:s}=a;return lb(s)||r.has(s[o.value])}))}):t===J_?e.filter(i=>{const l=n[i],a=l?l.parent:null;return!(a&&!lb(a.node)&&r.has(a.key))}):e}const Es=()=>null;Es.inheritAttrs=!1;Es.displayName="ATreeSelectNode";Es.isTreeSelectNode=!0;var hue=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r0&&arguments[0]!==void 0?arguments[0]:[];return Nt(n).map(o=>{var r,i,l;if(!gue(o))return null;const a=o.children||{},s=o.key,c={};for(const[w,P]of Object.entries(o.props))c[vs(w)]=P;const{isLeaf:u,checkable:d,selectable:f,disabled:h,disableCheckbox:m}=c,g={isLeaf:u||u===""||void 0,checkable:d||d===""||void 0,selectable:f||f===""||void 0,disabled:h||h===""||void 0,disableCheckbox:m||m===""||void 0},y=v(v({},c),g),{title:b=(r=a.title)===null||r===void 0?void 0:r.call(a,y),switcherIcon:S=(i=a.switcherIcon)===null||i===void 0?void 0:i.call(a,y)}=c,$=hue(c,["title","switcherIcon"]),x=(l=a.default)===null||l===void 0?void 0:l.call(a),C=v(v(v({},$),{title:b,switcherIcon:S,key:s,isLeaf:u}),g),O=t(x);return O.length&&(C.children=O),C})}return t(e)}function ab(e){if(!e)return e;const t=v({},e);return"props"in t||Object.defineProperty(t,"props",{get(){return t}}),t}function vue(e,t,n,o,r,i){let l=null,a=null;function s(){function c(u){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return u.map((h,m)=>{const g=`${d}-${m}`,y=h[i.value],b=n.includes(y),S=c(h[i.children]||[],g,b),$=p(Es,h,{default:()=>[S.map(x=>x.node)]});if(t===y&&(l=$),b){const x={pos:g,node:$,children:S};return f||a.push(x),x}return null}).filter(h=>h)}a||(a=[],c(o),a.sort((u,d)=>{let{node:{props:{value:f}}}=u,{node:{props:{value:h}}}=d;const m=n.indexOf(f),g=n.indexOf(h);return m-g}))}Object.defineProperty(e,"triggerNode",{get(){return s(),l}}),Object.defineProperty(e,"allCheckedNodes",{get(){return s(),r?a:a.map(c=>{let{node:u}=c;return u})}})}function bue(e,t){let{id:n,pId:o,rootPId:r}=t;const i={},l=[];return e.map(s=>{const c=v({},s),u=c[n];return i[u]=c,c.key=c.key||u,c}).forEach(s=>{const c=s[o],u=i[c];u&&(u.children=u.children||[],u.children.push(s)),(c===r||!u&&r===null)&&l.push(s)}),l}function yue(e,t,n){const o=oe();return Se([n,e,t],()=>{const r=n.value;e.value?o.value=n.value?bue(nt(e.value),v({id:"id",pId:"pId",rootPId:null},r!==!0?r:{})):nt(e.value).slice():o.value=mue(nt(t.value))},{immediate:!0,deep:!0}),o}const Sue=e=>{const t=oe({valueLabels:new Map}),n=oe();return Se(e,()=>{n.value=nt(e.value)},{immediate:!0}),[I(()=>{const{valueLabels:r}=t.value,i=new Map,l=n.value.map(a=>{var s;const{value:c}=a,u=(s=a.label)!==null&&s!==void 0?s:r.get(c);return i.set(c,u),v(v({},a),{label:u})});return t.value.valueLabels=i,l})]},$ue=(e,t)=>{const n=oe(new Map),o=oe({});return je(()=>{const r=t.value,i=_u(e.value,{fieldNames:r,initWrapper:l=>v(v({},l),{valueEntities:new Map}),processEntity:(l,a)=>{const s=l.node[r.value];a.valueEntities.set(s,l)}});n.value=i.valueEntities,o.value=i.keyEntities}),{valueEntities:n,keyEntities:o}},Cue=(e,t,n,o,r,i)=>{const l=oe([]),a=oe([]);return je(()=>{let s=e.value.map(d=>{let{value:f}=d;return f}),c=t.value.map(d=>{let{value:f}=d;return f});const u=s.filter(d=>!o.value[d]);n.value&&({checkedKeys:s,halfCheckedKeys:c}=Wo(s,!0,o.value,r.value,i.value)),l.value=Array.from(new Set([...u,...s])),a.value=c}),[l,a]},xue=(e,t,n)=>{let{treeNodeFilterProp:o,filterTreeNode:r,fieldNames:i}=n;return I(()=>{const{children:l}=i.value,a=t.value,s=o==null?void 0:o.value;if(!a||r.value===!1)return e.value;let c;if(typeof r.value=="function")c=r.value;else{const d=a.toUpperCase();c=(f,h)=>{const m=h[s];return String(m).toUpperCase().includes(d)}}function u(d){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const h=[];for(let m=0,g=d.length;me.treeCheckable&&!e.treeCheckStrictly),a=I(()=>e.treeCheckable||e.treeCheckStrictly),s=I(()=>e.treeCheckStrictly||e.labelInValue),c=I(()=>a.value||e.multiple),u=I(()=>aue(e.fieldNames)),[d,f]=Mt("",{value:I(()=>e.searchValue!==void 0?e.searchValue:e.inputValue),postState:ge=>ge||""}),h=ge=>{var be;f(ge),(be=e.onSearch)===null||be===void 0||be.call(e,ge)},m=yue(We(e,"treeData"),We(e,"children"),We(e,"treeDataSimpleMode")),{keyEntities:g,valueEntities:y}=$ue(m,u),b=ge=>{const be=[],xe=[];return ge.forEach(fe=>{y.value.has(fe)?xe.push(fe):be.push(fe)}),{missingRawValues:be,existRawValues:xe}},S=xue(m,d,{fieldNames:u,treeNodeFilterProp:We(e,"treeNodeFilterProp"),filterTreeNode:We(e,"filterTreeNode")}),$=ge=>{if(ge){if(e.treeNodeLabelProp)return ge[e.treeNodeLabelProp];const{_title:be}=u.value;for(let xe=0;xelue(ge).map(xe=>wue(xe)?{value:xe}:xe),C=ge=>x(ge).map(xe=>{let{label:fe}=xe;const{value:de,halfChecked:ye}=xe;let Oe;const Te=y.value.get(de);return Te&&(fe=fe??$(Te.node),Oe=Te.node.disabled),{label:fe,value:de,halfChecked:ye,disabled:Oe}}),[O,w]=Mt(e.defaultValue,{value:We(e,"value")}),P=I(()=>x(O.value)),T=oe([]),M=oe([]);je(()=>{const ge=[],be=[];P.value.forEach(xe=>{xe.halfChecked?be.push(xe):ge.push(xe)}),T.value=ge,M.value=be});const E=I(()=>T.value.map(ge=>ge.value)),{maxLevel:A,levelEntities:R}=Yh(g),[F,_]=Cue(T,M,l,g,A,R),N=I(()=>{const xe=d3(F.value,e.showCheckedStrategy,g.value,u.value).map(ye=>{var Oe,Te,Re;return(Re=(Te=(Oe=g.value[ye])===null||Oe===void 0?void 0:Oe.node)===null||Te===void 0?void 0:Te[u.value.value])!==null&&Re!==void 0?Re:ye}).map(ye=>{const Oe=T.value.find(Te=>Te.value===ye);return{value:ye,label:Oe==null?void 0:Oe.label}}),fe=C(xe),de=fe[0];return!c.value&&de&&u3(de.value)&&u3(de.label)?[]:fe.map(ye=>{var Oe;return v(v({},ye),{label:(Oe=ye.label)!==null&&Oe!==void 0?Oe:ye.value})})}),[B]=Sue(N),L=(ge,be,xe)=>{const fe=C(ge);if(w(fe),e.autoClearSearchValue&&f(""),e.onChange){let de=ge;l.value&&(de=d3(ge,e.showCheckedStrategy,g.value,u.value).map(De=>{const Ae=y.value.get(De);return Ae?Ae.node[u.value.value]:De}));const{triggerValue:ye,selected:Oe}=be||{triggerValue:void 0,selected:void 0};let Te=de;if(e.treeCheckStrictly){const Me=M.value.filter(De=>!de.includes(De.value));Te=[...Te,...Me]}const Re=C(Te),$e={preValue:T.value,triggerValue:ye};let we=!0;(e.treeCheckStrictly||xe==="selection"&&!Oe)&&(we=!1),vue($e,ye,ge,m.value,we,u.value),a.value?$e.checked=Oe:$e.selected=Oe;const Pe=s.value?Re:Re.map(Me=>Me.value);e.onChange(c.value?Pe:Pe[0],s.value?null:Re.map(Me=>Me.label),$e)}},k=(ge,be)=>{let{selected:xe,source:fe}=be;var de,ye,Oe;const Te=nt(g.value),Re=nt(y.value),$e=Te[ge],we=$e==null?void 0:$e.node,Pe=(de=we==null?void 0:we[u.value.value])!==null&&de!==void 0?de:ge;if(!c.value)L([Pe],{selected:!0,triggerValue:Pe},"option");else{let Me=xe?[...E.value,Pe]:F.value.filter(De=>De!==Pe);if(l.value){const{missingRawValues:De,existRawValues:Ae}=b(Me),ke=Ae.map(gt=>Re.get(gt).key);let ot;xe?{checkedKeys:ot}=Wo(ke,!0,Te,A.value,R.value):{checkedKeys:ot}=Wo(ke,{halfCheckedKeys:_.value},Te,A.value,R.value),Me=[...De,...ot.map(gt=>Te[gt].node[u.value.value])]}L(Me,{selected:xe,triggerValue:Pe},fe||"option")}xe||!c.value?(ye=e.onSelect)===null||ye===void 0||ye.call(e,Pe,ab(we)):(Oe=e.onDeselect)===null||Oe===void 0||Oe.call(e,Pe,ab(we))},z=ge=>{if(e.onDropdownVisibleChange){const be={};Object.defineProperty(be,"documentClickClose",{get(){return!1}}),e.onDropdownVisibleChange(ge,be)}},H=(ge,be)=>{const xe=ge.map(fe=>fe.value);if(be.type==="clear"){L(xe,{},"selection");return}be.values.length&&k(be.values[0].value,{selected:!1,source:"selection"})},{treeNodeFilterProp:j,loadData:Y,treeLoadedKeys:Z,onTreeLoad:G,treeDefaultExpandAll:te,treeExpandedKeys:U,treeDefaultExpandedKeys:Q,onTreeExpand:J,virtual:X,listHeight:q,listItemHeight:V,treeLine:K,treeIcon:ee,showTreeIcon:ue,switcherIcon:ae,treeMotion:le,customSlots:ne,dropdownMatchSelectWidth:se,treeExpandAction:pe}=lr(e);oz(Yf({checkable:a,loadData:Y,treeLoadedKeys:Z,onTreeLoad:G,checkedKeys:F,halfCheckedKeys:_,treeDefaultExpandAll:te,treeExpandedKeys:U,treeDefaultExpandedKeys:Q,onTreeExpand:J,treeIcon:ee,treeMotion:le,showTreeIcon:ue,switcherIcon:ae,treeLine:K,treeNodeFilterProp:j,keyEntities:g,customSlots:ne})),cue(Yf({virtual:X,listHeight:q,listItemHeight:V,treeData:S,fieldNames:u,onSelect:k,dropdownMatchSelectWidth:se,treeExpandAction:pe}));const he=ie();return o({focus(){var ge;(ge=he.value)===null||ge===void 0||ge.focus()},blur(){var ge;(ge=he.value)===null||ge===void 0||ge.blur()},scrollTo(ge){var be;(be=he.value)===null||be===void 0||be.scrollTo(ge)}}),()=>{var ge;const be=rt(e,["id","prefixCls","customSlots","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","virtual","listHeight","listItemHeight","onDropdownVisibleChange","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion"]);return p(Py,D(D(D({ref:he},n),be),{},{id:i,prefixCls:e.prefixCls,mode:c.value?"multiple":void 0,displayValues:B.value,onDisplayValuesChange:H,searchValue:d.value,onSearch:h,OptionList:fue,emptyOptions:!m.value.length,onDropdownVisibleChange:z,tagRender:e.tagRender||r.tagRender,dropdownMatchSelectWidth:(ge=e.dropdownMatchSelectWidth)!==null&&ge!==void 0?ge:!0}),r)}}}),Pue=e=>{const{componentCls:t,treePrefixCls:n,colorBgElevated:o}=e,r=`.${n}`;return[{[`${t}-dropdown`]:[{padding:`${e.paddingXS}px ${e.paddingXS/2}px`},H_(n,Fe(e,{colorBgContainer:o})),{[r]:{borderRadius:0,"&-list-holder-inner":{alignItems:"stretch",[`${r}-treenode`]:{[`${r}-node-content-wrapper`]:{flex:"auto"}}}}},Qh(`${n}-checkbox`,e),{"&-rtl":{direction:"rtl",[`${r}-switcher${r}-switcher_close`]:{[`${r}-switcher-icon svg`]:{transform:"rotate(90deg)"}}}}]}]};function Iue(e,t){return Xe("TreeSelect",n=>{const o=Fe(n,{treePrefixCls:t.value});return[Pue(o)]})(e)}const f3=(e,t,n)=>n!==void 0?n:`${e}-${t}`;function Tue(){return v(v({},rt(Q_(),["showTreeIcon","treeMotion","inputIcon","getInputElement","treeLine","customSlots"])),{suffixIcon:W.any,size:Be(),bordered:Ce(),treeLine:ze([Boolean,Object]),replaceFields:Ne(),placement:Be(),status:Be(),popupClassName:String,dropdownClassName:String,"onUpdate:value":ve(),"onUpdate:treeExpandedKeys":ve(),"onUpdate:searchValue":ve()})}const tv=re({compatConfig:{MODE:3},name:"ATreeSelect",inheritAttrs:!1,props:et(Tue(),{choiceTransitionName:"",listHeight:256,treeIcon:!1,listItemHeight:26,bordered:!0}),slots:Object,setup(e,t){let{attrs:n,slots:o,expose:r,emit:i}=t;e.treeData===void 0&&o.default,It(e.multiple!==!1||!e.treeCheckable,"TreeSelect","`multiple` will always be `true` when `treeCheckable` is true"),It(e.replaceFields===void 0,"TreeSelect","`replaceFields` is deprecated, please use fieldNames instead"),It(!e.dropdownClassName,"TreeSelect","`dropdownClassName` is deprecated. Please use `popupClassName` instead.");const l=ln(),a=yn.useInject(),s=I(()=>gr(a.status,e.status)),{prefixCls:c,renderEmpty:u,direction:d,virtual:f,dropdownMatchSelectWidth:h,size:m,getPopupContainer:g,getPrefixCls:y,disabled:b}=Ee("select",e),{compactSize:S,compactItemClassnames:$}=ol(c,d),x=I(()=>S.value||m.value),C=mo(),O=I(()=>{var Z;return(Z=b.value)!==null&&Z!==void 0?Z:C.value}),w=I(()=>y()),P=I(()=>e.placement!==void 0?e.placement:d.value==="rtl"?"bottomRight":"bottomLeft"),T=I(()=>f3(w.value,Cy(P.value),e.transitionName)),M=I(()=>f3(w.value,"",e.choiceTransitionName)),E=I(()=>y("select-tree",e.prefixCls)),A=I(()=>y("tree-select",e.prefixCls)),[R,F]=Yy(c),[_]=Iue(A,E),N=I(()=>ce(e.popupClassName||e.dropdownClassName,`${A.value}-dropdown`,{[`${A.value}-dropdown-rtl`]:d.value==="rtl"},F.value)),B=I(()=>!!(e.treeCheckable||e.multiple)),L=I(()=>e.showArrow!==void 0?e.showArrow:e.loading||!B.value),k=ie();r({focus(){var Z,G;(G=(Z=k.value).focus)===null||G===void 0||G.call(Z)},blur(){var Z,G;(G=(Z=k.value).blur)===null||G===void 0||G.call(Z)}});const z=function(){for(var Z=arguments.length,G=new Array(Z),te=0;te{i("update:treeExpandedKeys",Z),i("treeExpand",Z)},j=Z=>{i("update:searchValue",Z),i("search",Z)},Y=Z=>{i("blur",Z),l.onFieldBlur()};return()=>{var Z,G,te;const{notFoundContent:U=(Z=o.notFoundContent)===null||Z===void 0?void 0:Z.call(o),prefixCls:Q,bordered:J,listHeight:X,listItemHeight:q,multiple:V,treeIcon:K,treeLine:ee,showArrow:ue,switcherIcon:ae=(G=o.switcherIcon)===null||G===void 0?void 0:G.call(o),fieldNames:le=e.replaceFields,id:ne=l.id.value,placeholder:se=(te=o.placeholder)===null||te===void 0?void 0:te.call(o)}=e,{isFormItemInput:pe,hasFeedback:he,feedbackIcon:ge}=a,{suffixIcon:be,removeIcon:xe,clearIcon:fe}=Ry(v(v({},e),{multiple:B.value,showArrow:L.value,hasFeedback:he,feedbackIcon:ge,prefixCls:c.value}),o);let de;U!==void 0?de=U:de=u("Select");const ye=rt(e,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon","bordered","status","onUpdate:value","onUpdate:treeExpandedKeys","onUpdate:searchValue"]),Oe=ce(!Q&&A.value,{[`${c.value}-lg`]:x.value==="large",[`${c.value}-sm`]:x.value==="small",[`${c.value}-rtl`]:d.value==="rtl",[`${c.value}-borderless`]:!J,[`${c.value}-in-form-item`]:pe},Fn(c.value,s.value,he),$.value,n.class,F.value),Te={};return e.treeData===void 0&&o.default&&(Te.children=xt(o.default())),R(_(p(Oue,D(D(D(D({},n),ye),{},{disabled:O.value,virtual:f.value,dropdownMatchSelectWidth:h.value,id:ne,fieldNames:le,ref:k,prefixCls:c.value,class:Oe,listHeight:X,listItemHeight:q,treeLine:!!ee,inputIcon:be,multiple:V,removeIcon:xe,clearIcon:fe,switcherIcon:Re=>z_(E.value,ae,Re,o.leafIcon,ee),showTreeIcon:K,notFoundContent:de,getPopupContainer:g==null?void 0:g.value,treeMotion:null,dropdownClassName:N.value,choiceTransitionName:M.value,onChange:z,onBlur:Y,onSearch:j,onTreeExpand:H},Te),{},{transitionName:T.value,customSlots:v(v({},o),{treeCheckable:()=>p("span",{class:`${c.value}-tree-checkbox-inner`},null)}),maxTagPlaceholder:e.maxTagPlaceholder||o.maxTagPlaceholder,placement:P.value,showArrow:he||ue,placeholder:se}),v(v({},o),{treeCheckable:()=>p("span",{class:`${c.value}-tree-checkbox-inner`},null)}))))}}}),sb=Es,Eue=v(tv,{TreeNode:Es,SHOW_ALL:pue,SHOW_PARENT:J_,SHOW_CHILD:kS,install:e=>(e.component(tv.name,tv),e.component(sb.displayName,sb),e)}),nv=()=>({format:String,showNow:Ce(),showHour:Ce(),showMinute:Ce(),showSecond:Ce(),use12Hours:Ce(),hourStep:Number,minuteStep:Number,secondStep:Number,hideDisabledOptions:Ce(),popupClassName:String,status:Be()});function _ue(e){const t=mE(e,v(v({},nv()),{order:{type:Boolean,default:!0}})),{TimePicker:n,RangePicker:o}=t,r=re({name:"ATimePicker",inheritAttrs:!1,props:v(v(v(v({},wp()),pE()),nv()),{addon:{type:Function}}),slots:Object,setup(l,a){let{slots:s,expose:c,emit:u,attrs:d}=a;const f=l,h=ln();It(!(s.addon||f.addon),"TimePicker","`addon` is deprecated. Please use `v-slot:renderExtraFooter` instead.");const m=ie();c({focus:()=>{var x;(x=m.value)===null||x===void 0||x.focus()},blur:()=>{var x;(x=m.value)===null||x===void 0||x.blur()}});const g=(x,C)=>{u("update:value",x),u("change",x,C),h.onFieldChange()},y=x=>{u("update:open",x),u("openChange",x)},b=x=>{u("focus",x)},S=x=>{u("blur",x),h.onFieldBlur()},$=x=>{u("ok",x)};return()=>{const{id:x=h.id.value}=f;return p(n,D(D(D({},d),rt(f,["onUpdate:value","onUpdate:open"])),{},{id:x,dropdownClassName:f.popupClassName,mode:void 0,ref:m,renderExtraFooter:f.addon||s.addon||f.renderExtraFooter||s.renderExtraFooter,onChange:g,onOpenChange:y,onFocus:b,onBlur:S,onOk:$}),s)}}}),i=re({name:"ATimeRangePicker",inheritAttrs:!1,props:v(v(v(v({},wp()),hE()),nv()),{order:{type:Boolean,default:!0}}),slots:Object,setup(l,a){let{slots:s,expose:c,emit:u,attrs:d}=a;const f=l,h=ie(),m=ln();c({focus:()=>{var O;(O=h.value)===null||O===void 0||O.focus()},blur:()=>{var O;(O=h.value)===null||O===void 0||O.blur()}});const g=(O,w)=>{u("update:value",O),u("change",O,w),m.onFieldChange()},y=O=>{u("update:open",O),u("openChange",O)},b=O=>{u("focus",O)},S=O=>{u("blur",O),m.onFieldBlur()},$=(O,w)=>{u("panelChange",O,w)},x=O=>{u("ok",O)},C=(O,w,P)=>{u("calendarChange",O,w,P)};return()=>{const{id:O=m.id.value}=f;return p(o,D(D(D({},d),rt(f,["onUpdate:open","onUpdate:value"])),{},{id:O,dropdownClassName:f.popupClassName,picker:"time",mode:void 0,ref:h,onChange:g,onOpenChange:y,onFocus:b,onBlur:S,onPanelChange:$,onOk:x,onCalendarChange:C}),s)}}});return{TimePicker:r,TimeRangePicker:i}}const{TimePicker:Id,TimeRangePicker:vf}=_ue(c1),Mue=v(Id,{TimePicker:Id,TimeRangePicker:vf,install:e=>(e.component(Id.name,Id),e.component(vf.name,vf),e)}),Aue=()=>({prefixCls:String,color:String,dot:W.any,pending:Ce(),position:W.oneOf(Mn("left","right","")).def(""),label:W.any}),lu=re({compatConfig:{MODE:3},name:"ATimelineItem",props:et(Aue(),{color:"blue",pending:!1}),slots:Object,setup(e,t){let{slots:n}=t;const{prefixCls:o}=Ee("timeline",e),r=I(()=>({[`${o.value}-item`]:!0,[`${o.value}-item-pending`]:e.pending})),i=I(()=>/blue|red|green|gray/.test(e.color||"")?void 0:e.color||"blue"),l=I(()=>({[`${o.value}-item-head`]:!0,[`${o.value}-item-head-${e.color||"blue"}`]:!i.value}));return()=>{var a,s,c;const{label:u=(a=n.label)===null||a===void 0?void 0:a.call(n),dot:d=(s=n.dot)===null||s===void 0?void 0:s.call(n)}=e;return p("li",{class:r.value},[u&&p("div",{class:`${o.value}-item-label`},[u]),p("div",{class:`${o.value}-item-tail`},null),p("div",{class:[l.value,!!d&&`${o.value}-item-head-custom`],style:{borderColor:i.value,color:i.value}},[d]),p("div",{class:`${o.value}-item-content`},[(c=n.default)===null||c===void 0?void 0:c.call(n)])])}}}),Rue=e=>{const{componentCls:t}=e;return{[t]:v(v({},Ze(e)),{margin:0,padding:0,listStyle:"none",[`${t}-item`]:{position:"relative",margin:0,paddingBottom:e.timeLineItemPaddingBottom,fontSize:e.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:e.timeLineItemHeadSize,insetInlineStart:(e.timeLineItemHeadSize-e.timeLineItemTailWidth)/2,height:`calc(100% - ${e.timeLineItemHeadSize}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px ${e.lineType} ${e.colorSplit}`},"&-pending":{[`${t}-item-head`]:{fontSize:e.fontSizeSM,backgroundColor:"transparent"},[`${t}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:e.timeLineItemHeadSize,height:e.timeLineItemHeadSize,backgroundColor:e.colorBgContainer,border:`${e.timeLineHeadBorderWidth}px ${e.lineType} transparent`,borderRadius:"50%","&-blue":{color:e.colorPrimary,borderColor:e.colorPrimary},"&-red":{color:e.colorError,borderColor:e.colorError},"&-green":{color:e.colorSuccess,borderColor:e.colorSuccess},"&-gray":{color:e.colorTextDisabled,borderColor:e.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:e.timeLineItemHeadSize/2,insetInlineStart:e.timeLineItemHeadSize/2,width:"auto",height:"auto",marginBlockStart:0,paddingBlock:e.timeLineItemCustomHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:-(e.fontSize*e.lineHeight-e.fontSize)+e.lineWidth,marginInlineStart:e.margin+e.timeLineItemHeadSize,marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${t}-item-tail`]:{display:"none"},[`> ${t}-item-content`]:{minHeight:e.controlHeightLG*1.2}}},[`&${t}-alternate, + &${t}-right, + &${t}-label`]:{[`${t}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:`-${e.marginXXS}px`,"&-custom":{marginInlineStart:e.timeLineItemTailWidth/2}},"&-left":{[`${t}-item-content`]:{insetInlineStart:`calc(50% - ${e.marginXXS}px)`,width:`calc(50% - ${e.marginSM}px)`,textAlign:"start"}},"&-right":{[`${t}-item-content`]:{width:`calc(50% - ${e.marginSM}px)`,margin:0,textAlign:"end"}}}},[`&${t}-right`]:{[`${t}-item-right`]:{[`${t}-item-tail, + ${t}-item-head, + ${t}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(e.timeLineItemHeadSize+e.timeLineItemTailWidth)/2}px)`},[`${t}-item-content`]:{width:`calc(100% - ${e.timeLineItemHeadSize+e.marginXS}px)`}}},[`&${t}-pending + ${t}-item-last + ${t}-item-tail`]:{display:"block",height:`calc(100% - ${e.margin}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px dotted ${e.colorSplit}`},[`&${t}-reverse + ${t}-item-last + ${t}-item-tail`]:{display:"none"},[`&${t}-reverse ${t}-item-pending`]:{[`${t}-item-tail`]:{insetBlockStart:e.margin,display:"block",height:`calc(100% - ${e.margin}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px dotted ${e.colorSplit}`},[`${t}-item-content`]:{minHeight:e.controlHeightLG*1.2}},[`&${t}-label`]:{[`${t}-item-label`]:{position:"absolute",insetBlockStart:-(e.fontSize*e.lineHeight-e.fontSize)+e.timeLineItemTailWidth,width:`calc(50% - ${e.marginSM}px)`,textAlign:"end"},[`${t}-item-right`]:{[`${t}-item-label`]:{insetInlineStart:`calc(50% + ${e.marginSM}px)`,width:`calc(50% - ${e.marginSM}px)`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${t}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}},Due=Xe("Timeline",e=>{const t=Fe(e,{timeLineItemPaddingBottom:e.padding*1.25,timeLineItemHeadSize:10,timeLineItemCustomHeadPaddingVertical:e.paddingXXS,timeLinePaddingInlineEnd:2,timeLineItemTailWidth:e.lineWidthBold,timeLineHeadBorderWidth:e.wireframe?e.lineWidthBold:e.lineWidth*3});return[Rue(t)]}),Nue=()=>({prefixCls:String,pending:W.any,pendingDot:W.any,reverse:Ce(),mode:W.oneOf(Mn("left","alternate","right",""))}),Ic=re({compatConfig:{MODE:3},name:"ATimeline",inheritAttrs:!1,props:et(Nue(),{reverse:!1,mode:""}),slots:Object,setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ee("timeline",e),[l,a]=Due(r),s=(c,u)=>{const d=c.props||{};return e.mode==="alternate"?d.position==="right"?`${r.value}-item-right`:d.position==="left"?`${r.value}-item-left`:u%2===0?`${r.value}-item-left`:`${r.value}-item-right`:e.mode==="left"?`${r.value}-item-left`:e.mode==="right"?`${r.value}-item-right`:d.position==="right"?`${r.value}-item-right`:""};return()=>{var c,u,d;const{pending:f=(c=n.pending)===null||c===void 0?void 0:c.call(n),pendingDot:h=(u=n.pendingDot)===null||u===void 0?void 0:u.call(n),reverse:m,mode:g}=e,y=typeof f=="boolean"?null:f,b=Nt((d=n.default)===null||d===void 0?void 0:d.call(n)),S=f?p(lu,{pending:!!f,dot:h||p(io,null,null)},{default:()=>[y]}):null;S&&b.push(S);const $=m?b.reverse():b,x=$.length,C=`${r.value}-item-last`,O=$.map((T,M)=>{const E=M===x-2?C:"",A=M===x-1?C:"";return bn(T,{class:ce([!m&&f?E:A,s(T,M)])})}),w=$.some(T=>{var M,E;return!!(!((M=T.props)===null||M===void 0)&&M.label||!((E=T.children)===null||E===void 0)&&E.label)}),P=ce(r.value,{[`${r.value}-pending`]:!!f,[`${r.value}-reverse`]:!!m,[`${r.value}-${g}`]:!!g&&!w,[`${r.value}-label`]:w,[`${r.value}-rtl`]:i.value==="rtl"},o.class,a.value);return l(p("ul",D(D({},o),{},{class:P}),[O]))}}});Ic.Item=lu;Ic.install=function(e){return e.component(Ic.name,Ic),e.component(lu.name,lu),e};var Bue={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};function p3(e){for(var t=1;t{const{sizeMarginHeadingVerticalEnd:r,fontWeightStrong:i}=o;return{marginBottom:r,color:n,fontWeight:i,fontSize:e,lineHeight:t}},Fue=e=>{const t=[1,2,3,4,5],n={};return t.forEach(o=>{n[` + h${o}&, + div&-h${o}, + div&-h${o} > textarea, + h${o} + `]=kue(e[`fontSizeHeading${o}`],e[`lineHeightHeading${o}`],e.colorTextHeading,e)}),n},zue=e=>{const{componentCls:t}=e;return{"a&, a":v(v({},fh(e)),{textDecoration:e.linkDecoration,"&:active, &:hover":{textDecoration:e.linkHoverDecoration},[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},Hue=()=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:oN[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:600},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),jue=e=>{const{componentCls:t}=e,o=ha(e).inputPaddingVertical+1;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:-e.paddingSM,marginTop:-o,marginBottom:`calc(1em - ${o}px)`},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.marginXS+2,insetBlockEnd:e.marginXS,color:e.colorTextDescription,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},Vue=e=>({"&-copy-success":{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}}}),Wue=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-single-line":{whiteSpace:"nowrap"},"&-ellipsis-single-line":{overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),Kue=e=>{const{componentCls:t,sizeMarginHeadingVerticalStart:n}=e;return{[t]:v(v(v(v(v(v(v(v(v({color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccess},[`&${t}-warning`]:{color:e.colorWarning},[`&${t}-danger`]:{color:e.colorError,"a&:active, a&:focus":{color:e.colorErrorActive},"a&:hover":{color:e.colorErrorHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},Fue(e)),{[` + & + h1${t}, + & + h2${t}, + & + h3${t}, + & + h4${t}, + & + h5${t} + `]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}}}),Hue()),zue(e)),{[` + ${t}-expand, + ${t}-edit, + ${t}-copy + `]:v(v({},fh(e)),{marginInlineStart:e.marginXXS})}),jue(e)),Vue(e)),Wue()),{"&-rtl":{direction:"rtl"}})}},eM=Xe("Typography",e=>[Kue(e)],{sizeMarginHeadingVerticalStart:"1.2em",sizeMarginHeadingVerticalEnd:"0.5em"}),Uue=()=>({prefixCls:String,value:String,maxlength:Number,autoSize:{type:[Boolean,Object]},onSave:Function,onCancel:Function,onEnd:Function,onChange:Function,originContent:String,direction:String,component:String}),Gue=re({compatConfig:{MODE:3},name:"Editable",inheritAttrs:!1,props:Uue(),setup(e,t){let{emit:n,slots:o,attrs:r}=t;const{prefixCls:i}=lr(e),l=ft({current:e.value||"",lastKeyCode:void 0,inComposition:!1,cancelFlag:!1});Se(()=>e.value,S=>{l.current=S});const a=ie();Ue(()=>{var S;if(a.value){const $=(S=a.value)===null||S===void 0?void 0:S.resizableTextArea,x=$==null?void 0:$.textArea;x.focus();const{length:C}=x.value;x.setSelectionRange(C,C)}});function s(S){a.value=S}function c(S){let{target:{value:$}}=S;l.current=$.replace(/[\r\n]/g,""),n("change",l.current)}function u(){l.inComposition=!0}function d(){l.inComposition=!1}function f(S){const{keyCode:$}=S;$===Ie.ENTER&&S.preventDefault(),!l.inComposition&&(l.lastKeyCode=$)}function h(S){const{keyCode:$,ctrlKey:x,altKey:C,metaKey:O,shiftKey:w}=S;l.lastKeyCode===$&&!l.inComposition&&!x&&!C&&!O&&!w&&($===Ie.ENTER?(g(),n("end")):$===Ie.ESC&&(l.current=e.originContent,n("cancel")))}function m(){g()}function g(){n("save",l.current.trim())}const[y,b]=eM(i);return()=>{const S=ce({[`${i.value}`]:!0,[`${i.value}-edit-content`]:!0,[`${i.value}-rtl`]:e.direction==="rtl",[e.component?`${i.value}-${e.component}`:""]:!0},r.class,b.value);return y(p("div",D(D({},r),{},{class:S}),[p(iS,{ref:s,maxlength:e.maxlength,value:l.current,onChange:c,onKeydown:f,onKeyup:h,onCompositionstart:u,onCompositionend:d,onBlur:m,rows:1,autoSize:e.autoSize===void 0||e.autoSize},null),o.enterIcon?o.enterIcon({className:`${e.prefixCls}-edit-content-confirm`}):p(FS,{class:`${e.prefixCls}-edit-content-confirm`},null)]))}}}),Xue=3,Yue=8;let uo;const ov={padding:0,margin:0,display:"inline",lineHeight:"inherit"};function tM(e,t){e.setAttribute("aria-hidden","true");const n=window.getComputedStyle(t),o=VF(n);e.setAttribute("style",o),e.style.position="fixed",e.style.left="0",e.style.height="auto",e.style.minHeight="auto",e.style.maxHeight="auto",e.style.paddingTop="0",e.style.paddingBottom="0",e.style.borderTopWidth="0",e.style.borderBottomWidth="0",e.style.top="-999999px",e.style.zIndex="-1000",e.style.textOverflow="clip",e.style.whiteSpace="normal",e.style.webkitLineClamp="none"}function que(e){const t=document.createElement("div");tM(t,e),t.appendChild(document.createTextNode("text")),document.body.appendChild(t);const n=t.getBoundingClientRect().height;return document.body.removeChild(t),n}const Zue=(e,t,n,o,r)=>{uo||(uo=document.createElement("div"),uo.setAttribute("aria-hidden","true"),document.body.appendChild(uo));const{rows:i,suffix:l=""}=t,a=que(e),s=Math.round(a*i*100)/100;tM(uo,e);const c=l6({render(){return p("div",{style:ov},[p("span",{style:ov},[n,l]),p("span",{style:ov},[o])])}});c.mount(uo);function u(){return Math.round(uo.getBoundingClientRect().height*100)/100-.1<=s}if(u())return c.unmount(),{content:n,text:uo.innerHTML,ellipsis:!1};const d=Array.prototype.slice.apply(uo.childNodes[0].childNodes[0].cloneNode(!0).childNodes).filter($=>{let{nodeType:x,data:C}=$;return x!==Yue&&C!==""}),f=Array.prototype.slice.apply(uo.childNodes[0].childNodes[1].cloneNode(!0).childNodes);c.unmount();const h=[];uo.innerHTML="";const m=document.createElement("span");uo.appendChild(m);const g=document.createTextNode(r+l);m.appendChild(g),f.forEach($=>{uo.appendChild($)});function y($){m.insertBefore($,g)}function b($,x){let C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,O=arguments.length>3&&arguments[3]!==void 0?arguments[3]:x.length,w=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;const P=Math.floor((C+O)/2),T=x.slice(0,P);if($.textContent=T,C>=O-1)for(let M=O;M>=C;M-=1){const E=x.slice(0,M);if($.textContent=E,u()||!E)return M===x.length?{finished:!1,vNode:x}:{finished:!0,vNode:E}}return u()?b($,x,P,O,P):b($,x,C,P,w)}function S($){if($.nodeType===Xue){const C=$.textContent||"",O=document.createTextNode(C);return y(O),b(O,C)}return{finished:!1,vNode:null}}return d.some($=>{const{finished:x,vNode:C}=S($);return C&&h.push(C),x}),{content:h,text:uo.innerHTML,ellipsis:!0}};var Jue=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r({prefixCls:String,direction:String,component:String}),fo=re({name:"ATypography",inheritAttrs:!1,props:Que(),setup(e,t){let{slots:n,attrs:o}=t;const{prefixCls:r,direction:i}=Ee("typography",e),[l,a]=eM(r);return()=>{var s;const c=v(v({},e),o),{prefixCls:u,direction:d,component:f="article"}=c,h=Jue(c,["prefixCls","direction","component"]);return l(p(f,D(D({},h),{},{class:ce(r.value,{[`${r.value}-rtl`]:i.value==="rtl"},o.class,a.value)}),{default:()=>[(s=n.default)===null||s===void 0?void 0:s.call(n)]}))}}}),ede=()=>{const e=document.getSelection();if(!e.rangeCount)return function(){};let t=document.activeElement;const n=[];for(let o=0;o"u"){s&&console.warn("unable to use e.clipboardData"),s&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();const d=h3[t.format]||h3.default;window.clipboardData.setData(d,e)}else u.clipboardData.clearData(),u.clipboardData.setData(t.format,e);t.onCopy&&(u.preventDefault(),t.onCopy(u.clipboardData))}),document.body.appendChild(l),r.selectNodeContents(l),i.addRange(r),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");a=!0}catch(c){s&&console.error("unable to copy using execCommand: ",c),s&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),a=!0}catch(u){s&&console.error("unable to copy using clipboardData: ",u),s&&console.error("falling back to prompt"),n=nde("message"in t?t.message:tde),window.prompt(n,e)}}finally{i&&(typeof i.removeRange=="function"?i.removeRange(r):i.removeAllRanges()),l&&document.body.removeChild(l),o()}return a}var rde={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};function g3(e){for(var t=1;t({editable:{type:[Boolean,Object],default:void 0},copyable:{type:[Boolean,Object],default:void 0},prefixCls:String,component:String,type:String,disabled:{type:Boolean,default:void 0},ellipsis:{type:[Boolean,Object],default:void 0},code:{type:Boolean,default:void 0},mark:{type:Boolean,default:void 0},underline:{type:Boolean,default:void 0},delete:{type:Boolean,default:void 0},strong:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},content:String,"onUpdate:content":Function}),Lu=re({compatConfig:{MODE:3},name:"TypographyBase",inheritAttrs:!1,props:Bu(),setup(e,t){let{slots:n,attrs:o,emit:r}=t;const{prefixCls:i,direction:l}=Ee("typography",e),a=ft({copied:!1,ellipsisText:"",ellipsisContent:null,isEllipsis:!1,expanded:!1,clientRendered:!1,expandStr:"",copyStr:"",copiedStr:"",editStr:"",copyId:void 0,rafId:void 0,prevProps:void 0,originContent:""}),s=ie(),c=ie(),u=I(()=>{const _=e.ellipsis;return _?v({rows:1,expandable:!1},typeof _=="object"?_:null):{}});Ue(()=>{a.clientRendered=!0,P()}),tt(()=>{clearTimeout(a.copyId),Qe.cancel(a.rafId)}),Se([()=>u.value.rows,()=>e.content],()=>{lt(()=>{O()})},{flush:"post",deep:!0}),je(()=>{e.content===void 0&&(Eo(!e.editable),Eo(!e.ellipsis))});function d(){var _;return e.ellipsis||e.editable?e.content:(_=to(s.value))===null||_===void 0?void 0:_.innerText}function f(_){const{onExpand:N}=u.value;a.expanded=!0,N==null||N(_)}function h(_){_.preventDefault(),a.originContent=e.content,C(!0)}function m(_){g(_),C(!1)}function g(_){const{onChange:N}=S.value;_!==e.content&&(r("update:content",_),N==null||N(_))}function y(){var _,N;(N=(_=S.value).onCancel)===null||N===void 0||N.call(_),C(!1)}function b(_){_.preventDefault(),_.stopPropagation();const{copyable:N}=e,B=v({},typeof N=="object"?N:null);B.text===void 0&&(B.text=d()),ode(B.text||""),a.copied=!0,lt(()=>{B.onCopy&&B.onCopy(_),a.copyId=setTimeout(()=>{a.copied=!1},3e3)})}const S=I(()=>{const _=e.editable;return _?v({},typeof _=="object"?_:null):{editing:!1}}),[$,x]=Mt(!1,{value:I(()=>S.value.editing)});function C(_){const{onStart:N}=S.value;_&&N&&N(),x(_)}Se($,_=>{var N;_||(N=c.value)===null||N===void 0||N.focus()},{flush:"post"});function O(_){if(_){const{width:N,height:B}=_;if(!N||!B)return}Qe.cancel(a.rafId),a.rafId=Qe(()=>{P()})}const w=I(()=>{const{rows:_,expandable:N,suffix:B,onEllipsis:L,tooltip:k}=u.value;return B||k||e.editable||e.copyable||N||L?!1:_===1?ude:cde}),P=()=>{const{ellipsisText:_,isEllipsis:N}=a,{rows:B,suffix:L,onEllipsis:k}=u.value;if(!B||B<0||!to(s.value)||a.expanded||e.content===void 0||w.value)return;const{content:z,text:H,ellipsis:j}=Zue(to(s.value),{rows:B,suffix:L},e.content,F(!0),v3);(_!==H||a.isEllipsis!==j)&&(a.ellipsisText=H,a.ellipsisContent=z,a.isEllipsis=j,N!==j&&k&&k(j))};function T(_,N){let{mark:B,code:L,underline:k,delete:z,strong:H,keyboard:j}=_,Y=N;function Z(G,te){if(!G)return;const U=function(){return Y}();Y=p(te,null,{default:()=>[U]})}return Z(H,"strong"),Z(k,"u"),Z(z,"del"),Z(L,"code"),Z(B,"mark"),Z(j,"kbd"),Y}function M(_){const{expandable:N,symbol:B}=u.value;if(!N||!_&&(a.expanded||!a.isEllipsis))return null;const L=(n.ellipsisSymbol?n.ellipsisSymbol():B)||a.expandStr;return p("a",{key:"expand",class:`${i.value}-expand`,onClick:f,"aria-label":a.expandStr},[L])}function E(){if(!e.editable)return;const{tooltip:_,triggerType:N=["icon"]}=e.editable,B=n.editableIcon?n.editableIcon():p(gg,{role:"button"},null),L=n.editableTooltip?n.editableTooltip():a.editStr,k=typeof L=="string"?L:"";return N.indexOf("icon")!==-1?p(ho,{key:"edit",title:_===!1?"":L},{default:()=>[p(Mp,{ref:c,class:`${i.value}-edit`,onClick:h,"aria-label":k},{default:()=>[B]})]}):null}function A(){if(!e.copyable)return;const{tooltip:_}=e.copyable,N=a.copied?a.copiedStr:a.copyStr,B=n.copyableTooltip?n.copyableTooltip({copied:a.copied}):N,L=typeof B=="string"?B:"",k=a.copied?p(Cs,null,null):p(zS,null,null),z=n.copyableIcon?n.copyableIcon({copied:!!a.copied}):k;return p(ho,{key:"copy",title:_===!1?"":B},{default:()=>[p(Mp,{class:[`${i.value}-copy`,{[`${i.value}-copy-success`]:a.copied}],onClick:b,"aria-label":L},{default:()=>[z]})]})}function R(){const{class:_,style:N}=o,{maxlength:B,autoSize:L,onEnd:k}=S.value;return p(Gue,{class:_,style:N,prefixCls:i.value,value:e.content,originContent:a.originContent,maxlength:B,autoSize:L,onSave:m,onChange:g,onCancel:y,onEnd:k,direction:l.value,component:e.component},{enterIcon:n.editableEnterIcon})}function F(_){return[M(_),E(),A()].filter(N=>N)}return()=>{var _;const{triggerType:N=["icon"]}=S.value,B=e.ellipsis||e.editable?e.content!==void 0?e.content:(_=n.default)===null||_===void 0?void 0:_.call(n):n.default?n.default():e.content;return $.value?R():p(oa,{componentName:"Text",children:L=>{const k=v(v({},e),o),{type:z,disabled:H,content:j,class:Y,style:Z}=k,G=sde(k,["type","disabled","content","class","style"]),{rows:te,suffix:U,tooltip:Q}=u.value,{edit:J,copy:X,copied:q,expand:V}=L;a.editStr=J,a.copyStr=X,a.copiedStr=q,a.expandStr=V;const K=rt(G,["prefixCls","editable","copyable","ellipsis","mark","code","delete","underline","strong","keyboard","onUpdate:content"]),ee=w.value,ue=te===1&&ee,ae=te&&te>1&ⅇlet le=B,ne;if(te&&a.isEllipsis&&!a.expanded&&!ee){const{title:he}=G;let ge=he||"";!he&&(typeof B=="string"||typeof B=="number")&&(ge=String(B)),ge=ge==null?void 0:ge.slice(String(a.ellipsisContent||"").length),le=p(He,null,[nt(a.ellipsisContent),p("span",{title:ge,"aria-hidden":"true"},[v3]),U])}else le=p(He,null,[B,U]);le=T(e,le);const se=Q&&te&&a.isEllipsis&&!a.expanded&&!ee,pe=n.ellipsisTooltip?n.ellipsisTooltip():Q;return p(Go,{onResize:O,disabled:!te},{default:()=>[p(fo,D({ref:s,class:[{[`${i.value}-${z}`]:z,[`${i.value}-disabled`]:H,[`${i.value}-ellipsis`]:te,[`${i.value}-single-line`]:te===1&&!a.isEllipsis,[`${i.value}-ellipsis-single-line`]:ue,[`${i.value}-ellipsis-multiple-line`]:ae},Y],style:v(v({},Z),{WebkitLineClamp:ae?te:void 0}),"aria-label":ne,direction:l.value,onClick:N.indexOf("text")!==-1?h:()=>{}},K),{default:()=>[se?p(ho,{title:Q===!0?B:pe},{default:()=>[p("span",null,[le])]}):le,F()]})]})}},null)}}});var dde=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rrt(v(v({},Bu()),{ellipsis:{type:Boolean,default:void 0}}),["component"]),_s=(e,t)=>{let{slots:n,attrs:o}=t;const r=v(v({},e),o),{ellipsis:i,rel:l}=r,a=dde(r,["ellipsis","rel"]),s=v(v({},a),{rel:l===void 0&&a.target==="_blank"?"noopener noreferrer":l,ellipsis:!!i,component:"a"});return delete s.navigate,p(Lu,s,n)};_s.displayName="ATypographyLink";_s.inheritAttrs=!1;_s.props=fde();const pde=()=>rt(Bu(),["component"]),Ms=(e,t)=>{let{slots:n,attrs:o}=t;const r=v(v(v({},e),{component:"div"}),o);return p(Lu,r,n)};Ms.displayName="ATypographyParagraph";Ms.inheritAttrs=!1;Ms.props=pde();const hde=()=>v(v({},rt(Bu(),["component"])),{ellipsis:{type:[Boolean,Object],default:void 0}}),As=(e,t)=>{let{slots:n,attrs:o}=t;const{ellipsis:r}=e,i=v(v(v({},e),{ellipsis:r&&typeof r=="object"?rt(r,["expandable","rows"]):r,component:"span"}),o);return p(Lu,i,n)};As.displayName="ATypographyText";As.inheritAttrs=!1;As.props=hde();var gde=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rv(v({},rt(Bu(),["component","strong"])),{level:Number}),Rs=(e,t)=>{let{slots:n,attrs:o}=t;const{level:r=1}=e,i=gde(e,["level"]);let l;mde.includes(r)?l=`h${r}`:l="h1";const a=v(v(v({},i),{component:l}),o);return p(Lu,a,n)};Rs.displayName="ATypographyTitle";Rs.inheritAttrs=!1;Rs.props=vde();fo.Text=As;fo.Title=Rs;fo.Paragraph=Ms;fo.Link=_s;fo.Base=Lu;fo.install=function(e){return e.component(fo.name,fo),e.component(fo.Text.displayName,As),e.component(fo.Title.displayName,Rs),e.component(fo.Paragraph.displayName,Ms),e.component(fo.Link.displayName,_s),e};function bde(e,t){const n=`cannot ${e.method} ${e.action} ${t.status}'`,o=new Error(n);return o.status=t.status,o.method=e.method,o.url=e.action,o}function b3(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function yde(e){const t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(i){i.total>0&&(i.percent=i.loaded/i.total*100),e.onProgress(i)});const n=new FormData;e.data&&Object.keys(e.data).forEach(r=>{const i=e.data[r];if(Array.isArray(i)){i.forEach(l=>{n.append(`${r}[]`,l)});return}n.append(r,i)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(i){e.onError(i)},t.onload=function(){return t.status<200||t.status>=300?e.onError(bde(e,t),b3(t)):e.onSuccess(b3(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const o=e.headers||{};return o["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(o).forEach(r=>{o[r]!==null&&t.setRequestHeader(r,o[r])}),t.send(n),{abort(){t.abort()}}}const Sde=+new Date;let $de=0;function rv(){return`vc-upload-${Sde}-${++$de}`}const iv=(e,t)=>{if(e&&t){const n=Array.isArray(t)?t:t.split(","),o=e.name||"",r=e.type||"",i=r.replace(/\/.*$/,"");return n.some(l=>{const a=l.trim();if(/^\*(\/\*)?$/.test(l))return!0;if(a.charAt(0)==="."){const s=o.toLowerCase(),c=a.toLowerCase();let u=[c];return(c===".jpg"||c===".jpeg")&&(u=[".jpg",".jpeg"]),u.some(d=>s.endsWith(d))}return/\/\*$/.test(a)?i===a.replace(/\/.*$/,""):!!(r===a||/^\w+$/.test(a))})}return!0};function Cde(e,t){const n=e.createReader();let o=[];function r(){n.readEntries(i=>{const l=Array.prototype.slice.apply(i);o=o.concat(l),!l.length?t(o):r()})}r()}const xde=(e,t,n)=>{const o=(r,i)=>{r.path=i||"",r.isFile?r.file(l=>{n(l)&&(r.fullPath&&!l.webkitRelativePath&&(Object.defineProperties(l,{webkitRelativePath:{writable:!0}}),l.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(l,{webkitRelativePath:{writable:!1}})),t([l]))}):r.isDirectory&&Cde(r,l=>{l.forEach(a=>{o(a,`${i}${r.name}/`)})})};e.forEach(r=>{o(r.webkitGetAsEntry())})},nM=()=>({capture:[Boolean,String],multipart:{type:Boolean,default:void 0},name:String,disabled:{type:Boolean,default:void 0},componentTag:String,action:[String,Function],method:String,directory:{type:Boolean,default:void 0},data:[Object,Function],headers:Object,accept:String,multiple:{type:Boolean,default:void 0},onBatchStart:Function,onReject:Function,onStart:Function,onError:Function,onSuccess:Function,onProgress:Function,beforeUpload:Function,customRequest:Function,withCredentials:{type:Boolean,default:void 0},openFileDialogOnClick:{type:Boolean,default:void 0},prefixCls:String,id:String,onMouseenter:Function,onMouseleave:Function,onClick:Function});var wde=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(l){l(i)})}return new(n||(n=Promise))(function(i,l){function a(u){try{c(o.next(u))}catch(d){l(d)}}function s(u){try{c(o.throw(u))}catch(d){l(d)}}function c(u){u.done?i(u.value):r(u.value).then(a,s)}c((o=o.apply(e,t||[])).next())})},Ode=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);rwde(this,void 0,void 0,function*(){const{beforeUpload:x}=e;let C=S;if(x){try{C=yield x(S,$)}catch{C=!1}if(C===!1)return{origin:S,parsedFile:null,action:null,data:null}}const{action:O}=e;let w;typeof O=="function"?w=yield O(S):w=O;const{data:P}=e;let T;typeof P=="function"?T=yield P(S):T=P;const M=(typeof C=="object"||typeof C=="string")&&C?C:S;let E;M instanceof File?E=M:E=new File([M],S.name,{type:S.type});const A=E;return A.uid=S.uid,{origin:S,data:T,parsedFile:A,action:w}}),u=S=>{let{data:$,origin:x,action:C,parsedFile:O}=S;if(!s)return;const{onStart:w,customRequest:P,name:T,headers:M,withCredentials:E,method:A}=e,{uid:R}=x,F=P||yde,_={action:C,filename:T,data:$,file:O,headers:M,withCredentials:E,method:A||"post",onProgress:N=>{const{onProgress:B}=e;B==null||B(N,O)},onSuccess:(N,B)=>{const{onSuccess:L}=e;L==null||L(N,O,B),delete l[R]},onError:(N,B)=>{const{onError:L}=e;L==null||L(N,B,O),delete l[R]}};w(x),l[R]=F(_)},d=()=>{i.value=rv()},f=S=>{if(S){const $=S.uid?S.uid:S;l[$]&&l[$].abort&&l[$].abort(),delete l[$]}else Object.keys(l).forEach($=>{l[$]&&l[$].abort&&l[$].abort(),delete l[$]})};Ue(()=>{s=!0}),tt(()=>{s=!1,f()});const h=S=>{const $=[...S],x=$.map(C=>(C.uid=rv(),c(C,$)));Promise.all(x).then(C=>{const{onBatchStart:O}=e;O==null||O(C.map(w=>{let{origin:P,parsedFile:T}=w;return{file:P,parsedFile:T}})),C.filter(w=>w.parsedFile!==null).forEach(w=>{u(w)})})},m=S=>{const{accept:$,directory:x}=e,{files:C}=S.target,O=[...C].filter(w=>!x||iv(w,$));h(O),d()},g=S=>{const $=a.value;if(!$)return;const{onClick:x}=e;$.click(),x&&x(S)},y=S=>{S.key==="Enter"&&g(S)},b=S=>{const{multiple:$}=e;if(S.preventDefault(),S.type!=="dragover")if(e.directory)xde(Array.prototype.slice.call(S.dataTransfer.items),h,x=>iv(x,e.accept));else{const x=YW(Array.prototype.slice.call(S.dataTransfer.files),w=>iv(w,e.accept));let C=x[0];const O=x[1];$===!1&&(C=C.slice(0,1)),h(C),O.length&&e.onReject&&e.onReject(O)}};return r({abort:f}),()=>{var S;const{componentTag:$,prefixCls:x,disabled:C,id:O,multiple:w,accept:P,capture:T,directory:M,openFileDialogOnClick:E,onMouseenter:A,onMouseleave:R}=e,F=Ode(e,["componentTag","prefixCls","disabled","id","multiple","accept","capture","directory","openFileDialogOnClick","onMouseenter","onMouseleave"]),_={[x]:!0,[`${x}-disabled`]:C,[o.class]:!!o.class},N=M?{directory:"directory",webkitdirectory:"webkitdirectory"}:{};return p($,D(D({},C?{}:{onClick:E?g:()=>{},onKeydown:E?y:()=>{},onMouseenter:A,onMouseleave:R,onDrop:b,onDragover:b,tabindex:"0"}),{},{class:_,role:"button",style:o.style}),{default:()=>[p("input",D(D(D({},el(F,{aria:!0,data:!0})),{},{id:O,type:"file",ref:a,onClick:L=>L.stopPropagation(),onCancel:L=>L.stopPropagation(),key:i.value,style:{display:"none"},accept:P},N),{},{multiple:w,onChange:m},T!=null?{capture:T}:{}),null),(S=n.default)===null||S===void 0?void 0:S.call(n)]})}}});function lv(){}const y3=re({compatConfig:{MODE:3},name:"Upload",inheritAttrs:!1,props:et(nM(),{componentTag:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:lv,onError:lv,onSuccess:lv,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0}),setup(e,t){let{slots:n,attrs:o,expose:r}=t;const i=ie();return r({abort:a=>{var s;(s=i.value)===null||s===void 0||s.abort(a)}}),()=>p(Pde,D(D(D({},e),o),{},{ref:i}),n)}});var Ide={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};function S3(e){for(var t=1;t{let{uid:i}=r;return i===e.uid});return o===-1?n.push(e):n[o]=e,n}function av(e,t){const n=e.uid!==void 0?"uid":"name";return t.filter(o=>o[n]===e[n])[0]}function Dde(e,t){const n=e.uid!==void 0?"uid":"name",o=t.filter(r=>r[n]!==e[n]);return o.length===t.length?null:o}const Nde=function(){const t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),o=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(o)||[""])[0]},rM=e=>e.indexOf("image/")===0,Bde=e=>{if(e.type&&!e.thumbUrl)return rM(e.type);const t=e.thumbUrl||e.url||"",n=Nde(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(n)?!0:!(/^data:/.test(t)||n)},Pi=200;function Lde(e){return new Promise(t=>{if(!e.type||!rM(e.type)){t("");return}const n=document.createElement("canvas");n.width=Pi,n.height=Pi,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${Pi}px; height: ${Pi}px; z-index: 9999; display: none;`,document.body.appendChild(n);const o=n.getContext("2d"),r=new Image;if(r.onload=()=>{const{width:i,height:l}=r;let a=Pi,s=Pi,c=0,u=0;i>l?(s=l*(Pi/i),u=-(s-a)/2):(a=i*(Pi/l),c=-(a-s)/2),o.drawImage(r,c,u,a,s);const d=n.toDataURL();document.body.removeChild(n),t(d)},r.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const i=new FileReader;i.addEventListener("load",()=>{i.result&&(r.src=i.result)}),i.readAsDataURL(e)}else r.src=window.URL.createObjectURL(e)})}var kde={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};function x3(e){for(var t=1;t({prefixCls:String,locale:Ne(void 0),file:Ne(),items:ut(),listType:Be(),isImgUrl:ve(),showRemoveIcon:Ce(),showDownloadIcon:Ce(),showPreviewIcon:Ce(),removeIcon:ve(),downloadIcon:ve(),previewIcon:ve(),iconRender:ve(),actionIconRender:ve(),itemRender:ve(),onPreview:ve(),onClose:ve(),onDownload:ve(),progress:Ne()}),Hde=re({compatConfig:{MODE:3},name:"ListItem",inheritAttrs:!1,props:zde(),setup(e,t){let{slots:n,attrs:o}=t;var r;const i=oe(!1),l=oe();Ue(()=>{l.value=setTimeout(()=>{i.value=!0},300)}),tt(()=>{clearTimeout(l.value)});const a=oe((r=e.file)===null||r===void 0?void 0:r.status);Se(()=>{var u;return(u=e.file)===null||u===void 0?void 0:u.status},u=>{u!=="removed"&&(a.value=u)});const{rootPrefixCls:s}=Ee("upload",e),c=I(()=>qo(`${s.value}-fade`));return()=>{var u,d;const{prefixCls:f,locale:h,listType:m,file:g,items:y,progress:b,iconRender:S=n.iconRender,actionIconRender:$=n.actionIconRender,itemRender:x=n.itemRender,isImgUrl:C,showPreviewIcon:O,showRemoveIcon:w,showDownloadIcon:P,previewIcon:T=n.previewIcon,removeIcon:M=n.removeIcon,downloadIcon:E=n.downloadIcon,onPreview:A,onDownload:R,onClose:F}=e,{class:_,style:N}=o,B=S({file:g});let L=p("div",{class:`${f}-text-icon`},[B]);if(m==="picture"||m==="picture-card")if(a.value==="uploading"||!g.thumbUrl&&!g.url){const K={[`${f}-list-item-thumbnail`]:!0,[`${f}-list-item-file`]:a.value!=="uploading"};L=p("div",{class:K},[B])}else{const K=C!=null&&C(g)?p("img",{src:g.thumbUrl||g.url,alt:g.name,class:`${f}-list-item-image`,crossorigin:g.crossOrigin},null):B,ee={[`${f}-list-item-thumbnail`]:!0,[`${f}-list-item-file`]:C&&!C(g)};L=p("a",{class:ee,onClick:ue=>A(g,ue),href:g.url||g.thumbUrl,target:"_blank",rel:"noopener noreferrer"},[K])}const k={[`${f}-list-item`]:!0,[`${f}-list-item-${a.value}`]:!0},z=typeof g.linkProps=="string"?JSON.parse(g.linkProps):g.linkProps,H=w?$({customIcon:M?M({file:g}):p(hg,null,null),callback:()=>F(g),prefixCls:f,title:h.removeFile}):null,j=P&&a.value==="done"?$({customIcon:E?E({file:g}):p(WS,null,null),callback:()=>R(g),prefixCls:f,title:h.downloadFile}):null,Y=m!=="picture-card"&&p("span",{key:"download-delete",class:[`${f}-list-item-actions`,{picture:m==="picture"}]},[j,H]),Z=`${f}-list-item-name`,G=g.url?[p("a",D(D({key:"view",target:"_blank",rel:"noopener noreferrer",class:Z,title:g.name},z),{},{href:g.url,onClick:K=>A(g,K)}),[g.name]),Y]:[p("span",{key:"view",class:Z,onClick:K=>A(g,K),title:g.name},[g.name]),Y],te={pointerEvents:"none",opacity:.5},U=O?p("a",{href:g.url||g.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:g.url||g.thumbUrl?void 0:te,onClick:K=>A(g,K),title:h.previewFile},[T?T({file:g}):p(Au,null,null)]):null,Q=m==="picture-card"&&a.value!=="uploading"&&p("span",{class:`${f}-list-item-actions`},[U,a.value==="done"&&j,H]),J=p("div",{class:k},[L,G,Q,i.value&&p(rn,c.value,{default:()=>[_n(p("div",{class:`${f}-list-item-progress`},["percent"in g?p(SS,D(D({},b),{},{type:"line",percent:g.percent}),null):null]),[[oo,a.value==="uploading"]])]})]),X={[`${f}-list-item-container`]:!0,[`${_}`]:!!_},q=g.response&&typeof g.response=="string"?g.response:((u=g.error)===null||u===void 0?void 0:u.statusText)||((d=g.error)===null||d===void 0?void 0:d.message)||h.uploadError,V=a.value==="error"?p(ho,{title:q,getPopupContainer:K=>K.parentNode},{default:()=>[J]}):J;return p("div",{class:X,style:N},[x?x({originNode:V,file:g,fileList:y,actions:{download:R.bind(null,g),preview:A.bind(null,g),remove:F.bind(null,g)}}):V])}}}),jde=(e,t)=>{let{slots:n}=t;var o;return Nt((o=n.default)===null||o===void 0?void 0:o.call(n))[0]},Vde=re({compatConfig:{MODE:3},name:"AUploadList",props:et(Rde(),{listType:"text",progress:{strokeWidth:2,showInfo:!1},showRemoveIcon:!0,showDownloadIcon:!1,showPreviewIcon:!0,previewFile:Lde,isImageUrl:Bde,items:[],appendActionVisible:!0}),setup(e,t){let{slots:n,expose:o}=t;const r=oe(!1);Ue(()=>{r.value==!0});const i=oe([]);Se(()=>e.items,function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];i.value=g.slice()},{immediate:!0,deep:!0}),je(()=>{if(e.listType!=="picture"&&e.listType!=="picture-card")return;let g=!1;(e.items||[]).forEach((y,b)=>{typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(y.originFileObj instanceof File||y.originFileObj instanceof Blob)||y.thumbUrl!==void 0||(y.thumbUrl="",e.previewFile&&e.previewFile(y.originFileObj).then(S=>{const $=S||"";$!==y.thumbUrl&&(i.value[b].thumbUrl=$,g=!0)}))}),g&&uP(i)});const l=(g,y)=>{if(e.onPreview)return y==null||y.preventDefault(),e.onPreview(g)},a=g=>{typeof e.onDownload=="function"?e.onDownload(g):g.url&&window.open(g.url)},s=g=>{var y;(y=e.onRemove)===null||y===void 0||y.call(e,g)},c=g=>{let{file:y}=g;const b=e.iconRender||n.iconRender;if(b)return b({file:y,listType:e.listType});const S=y.status==="uploading",$=e.isImageUrl&&e.isImageUrl(y)?p(jS,null,null):p(VS,null,null);let x=p(S?io:HS,null,null);return e.listType==="picture"?x=S?p(io,null,null):$:e.listType==="picture-card"&&(x=S?e.locale.uploading:$),x},u=g=>{const{customIcon:y,callback:b,prefixCls:S,title:$}=g,x={type:"text",size:"small",title:$,onClick:()=>{b()},class:`${S}-list-item-action`};return qt(y)?p(Wt,x,{icon:()=>y}):p(Wt,x,{default:()=>[p("span",null,[y])]})};o({handlePreview:l,handleDownload:a});const{prefixCls:d,rootPrefixCls:f}=Ee("upload",e),h=I(()=>({[`${d.value}-list`]:!0,[`${d.value}-list-${e.listType}`]:!0})),m=I(()=>{const g=v({},xu(`${f.value}-motion-collapse`));delete g.onAfterAppear,delete g.onAfterEnter,delete g.onAfterLeave;const y=v(v({},Ch(`${d.value}-${e.listType==="picture-card"?"animate-inline":"animate"}`)),{class:h.value,appear:r.value});return e.listType!=="picture-card"?v(v({},g),y):y});return()=>{const{listType:g,locale:y,isImageUrl:b,showPreviewIcon:S,showRemoveIcon:$,showDownloadIcon:x,removeIcon:C,previewIcon:O,downloadIcon:w,progress:P,appendAction:T,itemRender:M,appendActionVisible:E}=e,A=T==null?void 0:T(),R=i.value;return p(oh,D(D({},m.value),{},{tag:"div"}),{default:()=>[R.map(F=>{const{uid:_}=F;return p(Hde,{key:_,locale:y,prefixCls:d.value,file:F,items:R,progress:P,listType:g,isImgUrl:b,showPreviewIcon:S,showRemoveIcon:$,showDownloadIcon:x,onPreview:l,onDownload:a,onClose:s,removeIcon:C,previewIcon:O,downloadIcon:w,itemRender:M},v(v({},n),{iconRender:c,actionIconRender:u}))}),T?_n(p(jde,{key:"__ant_upload_appendAction"},{default:()=>A}),[[oo,!!E]]):null]})}}}),Wde=e=>{const{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:`${e.padding}px 0`},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${e.marginXXS}px`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{cursor:"not-allowed",[`p${t}-drag-icon ${n}, + p${t}-text, + p${t}-hint + `]:{color:e.colorTextDisabled}}}}}},Kde=e=>{const{componentCls:t,antCls:n,iconCls:o,fontSize:r,lineHeight:i}=e,l=`${t}-list-item`,a=`${l}-actions`,s=`${l}-action`,c=Math.round(r*i);return{[`${t}-wrapper`]:{[`${t}-list`]:v(v({},ur()),{lineHeight:e.lineHeight,[l]:{position:"relative",height:e.lineHeight*r,marginTop:e.marginXS,fontSize:r,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,"&:hover":{backgroundColor:e.controlItemBgHover},[`${l}-name`]:v(v({},Zt),{padding:`0 ${e.paddingXS}px`,lineHeight:i,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[a]:{[s]:{opacity:0},[`${s}${n}-btn-sm`]:{height:c,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[` + ${s}:focus, + &.picture ${s} + `]:{opacity:1},[o]:{color:e.colorTextDescription,transition:`all ${e.motionDurationSlow}`},[`&:hover ${o}`]:{color:e.colorText}},[`${t}-icon ${o}`]:{color:e.colorTextDescription,fontSize:r},[`${l}-progress`]:{position:"absolute",bottom:-e.uploadProgressOffset,width:"100%",paddingInlineStart:r+e.paddingXS,fontSize:r,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${l}:hover ${s}`]:{opacity:1,color:e.colorText},[`${l}-error`]:{color:e.colorError,[`${l}-name, ${t}-icon ${o}`]:{color:e.colorError},[a]:{[`${o}, ${o}:hover`]:{color:e.colorError},[s]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},w3=new it("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),O3=new it("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),Ude=e=>{const{componentCls:t}=e,n=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${n}-appear, ${n}-enter, ${n}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${n}-appear, ${n}-enter`]:{animationName:w3},[`${n}-leave`]:{animationName:O3}}},w3,O3]},Gde=e=>{const{componentCls:t,iconCls:n,uploadThumbnailSize:o,uploadProgressOffset:r}=e,i=`${t}-list`,l=`${i}-item`;return{[`${t}-wrapper`]:{[`${i}${i}-picture, ${i}${i}-picture-card`]:{[l]:{position:"relative",height:o+e.lineWidth*2+e.paddingXS*2,padding:e.paddingXS,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${l}-thumbnail`]:v(v({},Zt),{width:o,height:o,lineHeight:`${o+e.paddingSM}px`,textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${l}-progress`]:{bottom:r,width:`calc(100% - ${e.paddingSM*2}px)`,marginTop:0,paddingInlineStart:o+e.paddingXS}},[`${l}-error`]:{borderColor:e.colorError,[`${l}-thumbnail ${n}`]:{"svg path[fill='#e6f7ff']":{fill:e.colorErrorBg},"svg path[fill='#1890ff']":{fill:e.colorError}}},[`${l}-uploading`]:{borderStyle:"dashed",[`${l}-name`]:{marginBottom:r}}}}}},Xde=e=>{const{componentCls:t,iconCls:n,fontSizeLG:o,colorTextLightSolid:r}=e,i=`${t}-list`,l=`${i}-item`,a=e.uploadPicCardSize;return{[`${t}-wrapper${t}-picture-card-wrapper`]:v(v({},ur()),{display:"inline-block",width:"100%",[`${t}${t}-select`]:{width:a,height:a,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${i}${i}-picture-card`]:{[`${i}-item-container`]:{display:"inline-block",width:a,height:a,marginBlock:`0 ${e.marginXS}px`,marginInline:`0 ${e.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[l]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${e.paddingXS*2}px)`,height:`calc(100% - ${e.paddingXS*2}px)`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${l}:hover`]:{[`&::before, ${l}-actions`]:{opacity:1}},[`${l}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`${n}-eye, ${n}-download, ${n}-delete`]:{zIndex:10,width:o,margin:`0 ${e.marginXXS}px`,fontSize:o,cursor:"pointer",transition:`all ${e.motionDurationSlow}`}},[`${l}-actions, ${l}-actions:hover`]:{[`${n}-eye, ${n}-download, ${n}-delete`]:{color:new vt(r).setAlpha(.65).toRgbString(),"&:hover":{color:r}}},[`${l}-thumbnail, ${l}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${l}-name`]:{display:"none",textAlign:"center"},[`${l}-file + ${l}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${e.paddingXS*2}px)`},[`${l}-uploading`]:{[`&${l}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${l}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${e.paddingXS*2}px)`,paddingInlineStart:0}}})}},Yde=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},qde=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:v(v({},Ze(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},Zde=Xe("Upload",e=>{const{fontSizeHeading3:t,fontSize:n,lineHeight:o,lineWidth:r,controlHeightLG:i}=e,l=Math.round(n*o),a=Fe(e,{uploadThumbnailSize:t*2,uploadProgressOffset:l/2+r,uploadPicCardSize:i*2.55});return[qde(a),Wde(a),Gde(a),Xde(a),Kde(a),Ude(a),Yde(a),yu(a)]});var Jde=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(l){l(i)})}return new(n||(n=Promise))(function(i,l){function a(u){try{c(o.next(u))}catch(d){l(d)}}function s(u){try{c(o.throw(u))}catch(d){l(d)}}function c(u){u.done?i(u.value):r(u.value).then(a,s)}c((o=o.apply(e,t||[])).next())})},Qde=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var E;return(E=s.value)!==null&&E!==void 0?E:d.value}),[h,m]=Mt(e.defaultFileList||[],{value:We(e,"fileList"),postState:E=>{const A=Date.now();return(E??[]).map((R,F)=>(!R.uid&&!Object.isFrozen(R)&&(R.uid=`__AUTO__${A}_${F}__`),R))}}),g=ie("drop"),y=ie(null);Ue(()=>{It(e.fileList!==void 0||o.value===void 0,"Upload","`value` is not a valid prop, do you mean `fileList`?"),It(e.transformFile===void 0,"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly."),It(e.remove===void 0,"Upload","`remove` props is deprecated. Please use `remove` event.")});const b=(E,A,R)=>{var F,_;let N=[...A];e.maxCount===1?N=N.slice(-1):e.maxCount&&(N=N.slice(0,e.maxCount)),m(N);const B={file:E,fileList:N};R&&(B.event=R),(F=e["onUpdate:fileList"])===null||F===void 0||F.call(e,B.fileList),(_=e.onChange)===null||_===void 0||_.call(e,B),i.onFieldChange()},S=(E,A)=>Jde(this,void 0,void 0,function*(){const{beforeUpload:R,transformFile:F}=e;let _=E;if(R){const N=yield R(E,A);if(N===!1)return!1;if(delete E[ic],N===ic)return Object.defineProperty(E,ic,{value:!0,configurable:!0}),!1;typeof N=="object"&&N&&(_=N)}return F&&(_=yield F(_)),_}),$=E=>{const A=E.filter(_=>!_.file[ic]);if(!A.length)return;const R=A.map(_=>Td(_.file));let F=[...h.value];R.forEach(_=>{F=Ed(_,F)}),R.forEach((_,N)=>{let B=_;if(A[N].parsedFile)_.status="uploading";else{const{originFileObj:L}=_;let k;try{k=new File([L],L.name,{type:L.type})}catch{k=new Blob([L],{type:L.type}),k.name=L.name,k.lastModifiedDate=new Date,k.lastModified=new Date().getTime()}k.uid=_.uid,B=k}b(B,F)})},x=(E,A,R)=>{try{typeof E=="string"&&(E=JSON.parse(E))}catch{}if(!av(A,h.value))return;const F=Td(A);F.status="done",F.percent=100,F.response=E,F.xhr=R;const _=Ed(F,h.value);b(F,_)},C=(E,A)=>{if(!av(A,h.value))return;const R=Td(A);R.status="uploading",R.percent=E.percent;const F=Ed(R,h.value);b(R,F,E)},O=(E,A,R)=>{if(!av(R,h.value))return;const F=Td(R);F.error=E,F.response=A,F.status="error";const _=Ed(F,h.value);b(F,_)},w=E=>{let A;const R=e.onRemove||e.remove;Promise.resolve(typeof R=="function"?R(E):R).then(F=>{var _,N;if(F===!1)return;const B=Dde(E,h.value);B&&(A=v(v({},E),{status:"removed"}),(_=h.value)===null||_===void 0||_.forEach(L=>{const k=A.uid!==void 0?"uid":"name";L[k]===A[k]&&!Object.isFrozen(L)&&(L.status="removed")}),(N=y.value)===null||N===void 0||N.abort(A),b(A,B))})},P=E=>{var A;g.value=E.type,E.type==="drop"&&((A=e.onDrop)===null||A===void 0||A.call(e,E))};r({onBatchStart:$,onSuccess:x,onProgress:C,onError:O,fileList:h,upload:y});const[T]=Zo("Upload",ro.Upload,I(()=>e.locale)),M=(E,A)=>{const{removeIcon:R,previewIcon:F,downloadIcon:_,previewFile:N,onPreview:B,onDownload:L,isImageUrl:k,progress:z,itemRender:H,iconRender:j,showUploadList:Y}=e,{showDownloadIcon:Z,showPreviewIcon:G,showRemoveIcon:te}=typeof Y=="boolean"?{}:Y;return Y?p(Vde,{prefixCls:l.value,listType:e.listType,items:h.value,previewFile:N,onPreview:B,onDownload:L,onRemove:w,showRemoveIcon:!f.value&&te,showPreviewIcon:G,showDownloadIcon:Z,removeIcon:R,previewIcon:F,downloadIcon:_,iconRender:j,locale:T.value,isImageUrl:k,progress:z,itemRender:H,appendActionVisible:A,appendAction:E},v({},n)):E==null?void 0:E()};return()=>{var E,A,R;const{listType:F,type:_}=e,{class:N,style:B}=o,L=Qde(o,["class","style"]),k=v(v(v({onBatchStart:$,onError:O,onProgress:C,onSuccess:x},L),e),{id:(E=e.id)!==null&&E!==void 0?E:i.id.value,prefixCls:l.value,beforeUpload:S,onChange:void 0,disabled:f.value});delete k.remove,(!n.default||f.value)&&delete k.id;const z={[`${l.value}-rtl`]:a.value==="rtl"};if(_==="drag"){const Z=ce(l.value,{[`${l.value}-drag`]:!0,[`${l.value}-drag-uploading`]:h.value.some(G=>G.status==="uploading"),[`${l.value}-drag-hover`]:g.value==="dragover",[`${l.value}-disabled`]:f.value,[`${l.value}-rtl`]:a.value==="rtl"},o.class,u.value);return c(p("span",D(D({},o),{},{class:ce(`${l.value}-wrapper`,z,N,u.value)}),[p("div",{class:Z,onDrop:P,onDragover:P,onDragleave:P,style:o.style},[p(y3,D(D({},k),{},{ref:y,class:`${l.value}-btn`}),D({default:()=>[p("div",{class:`${l.value}-drag-container`},[(A=n.default)===null||A===void 0?void 0:A.call(n)])]},n))]),M()]))}const H=ce(l.value,{[`${l.value}-select`]:!0,[`${l.value}-select-${F}`]:!0,[`${l.value}-disabled`]:f.value,[`${l.value}-rtl`]:a.value==="rtl"}),j=xt((R=n.default)===null||R===void 0?void 0:R.call(n)),Y=Z=>p("div",{class:H,style:Z},[p(y3,D(D({},k),{},{ref:y}),n)]);return c(F==="picture-card"?p("span",D(D({},o),{},{class:ce(`${l.value}-wrapper`,`${l.value}-picture-card-wrapper`,z,o.class,u.value)}),[M(Y,!!(j&&j.length))]):p("span",D(D({},o),{},{class:ce(`${l.value}-wrapper`,z,o.class,u.value)}),[Y(j&&j.length?void 0:{display:"none"}),M()]))}}});var P3=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{height:r}=e,i=P3(e,["height"]),{style:l}=o,a=P3(o,["style"]),s=v(v(v({},i),a),{type:"drag",style:v(v({},l),{height:typeof r=="number"?`${r}px`:r})});return p(bf,s,n)}}}),efe=yf,tfe=v(bf,{Dragger:yf,LIST_IGNORE:ic,install(e){return e.component(bf.name,bf),e.component(yf.name,yf),e}});function nfe(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function ofe(e){return Object.keys(e).map(t=>`${nfe(t)}: ${e[t]};`).join(" ")}function I3(){return window.devicePixelRatio||1}function sv(e,t,n,o){e.translate(t,n),e.rotate(Math.PI/180*Number(o)),e.translate(-t,-n)}const rfe=(e,t)=>{let n=!1;return e.removedNodes.length&&(n=Array.from(e.removedNodes).some(o=>o===t)),e.type==="attributes"&&e.target===t&&(n=!0),n};var ife=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r2&&arguments[2]!==void 0?arguments[2]:{};const{window:o=BT}=n,r=ife(n,["window"]);let i;const l=DT(()=>o&&"MutationObserver"in o),a=()=>{i&&(i.disconnect(),i=void 0)},s=Se(()=>E1(e),u=>{a(),l.value&&o&&u&&(i=new MutationObserver(t),i.observe(u,r))},{immediate:!0}),c=()=>{a(),s()};return RT(c),{isSupported:l,stop:c}}const cv=2,T3=3,afe=()=>({zIndex:Number,rotate:Number,width:Number,height:Number,image:String,content:ze([String,Array]),font:Ne(),rootClassName:String,gap:ut(),offset:ut()}),sfe=re({name:"AWatermark",inheritAttrs:!1,props:et(afe(),{zIndex:9,rotate:-22,font:{},gap:[100,100]}),setup(e,t){let{slots:n,attrs:o}=t;const[,r]=mi(),i=oe(),l=oe(),a=oe(!1),s=I(()=>{var M,E;return(E=(M=e.gap)===null||M===void 0?void 0:M[0])!==null&&E!==void 0?E:100}),c=I(()=>{var M,E;return(E=(M=e.gap)===null||M===void 0?void 0:M[1])!==null&&E!==void 0?E:100}),u=I(()=>s.value/2),d=I(()=>c.value/2),f=I(()=>{var M,E;return(E=(M=e.offset)===null||M===void 0?void 0:M[0])!==null&&E!==void 0?E:u.value}),h=I(()=>{var M,E;return(E=(M=e.offset)===null||M===void 0?void 0:M[1])!==null&&E!==void 0?E:d.value}),m=I(()=>{var M,E;return(E=(M=e.font)===null||M===void 0?void 0:M.fontSize)!==null&&E!==void 0?E:r.value.fontSizeLG}),g=I(()=>{var M,E;return(E=(M=e.font)===null||M===void 0?void 0:M.fontWeight)!==null&&E!==void 0?E:"normal"}),y=I(()=>{var M,E;return(E=(M=e.font)===null||M===void 0?void 0:M.fontStyle)!==null&&E!==void 0?E:"normal"}),b=I(()=>{var M,E;return(E=(M=e.font)===null||M===void 0?void 0:M.fontFamily)!==null&&E!==void 0?E:"sans-serif"}),S=I(()=>{var M,E;return(E=(M=e.font)===null||M===void 0?void 0:M.color)!==null&&E!==void 0?E:r.value.colorFill}),$=I(()=>{var M;const E={zIndex:(M=e.zIndex)!==null&&M!==void 0?M:9,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let A=f.value-u.value,R=h.value-d.value;return A>0&&(E.left=`${A}px`,E.width=`calc(100% - ${A}px)`,A=0),R>0&&(E.top=`${R}px`,E.height=`calc(100% - ${R}px)`,R=0),E.backgroundPosition=`${A}px ${R}px`,E}),x=()=>{l.value&&(l.value.remove(),l.value=void 0)},C=(M,E)=>{var A;i.value&&l.value&&(a.value=!0,l.value.setAttribute("style",ofe(v(v({},$.value),{backgroundImage:`url('${M}')`,backgroundSize:`${(s.value+E)*cv}px`}))),(A=i.value)===null||A===void 0||A.append(l.value),setTimeout(()=>{a.value=!1}))},O=M=>{let E=120,A=64;const R=e.content,F=e.image,_=e.width,N=e.height;if(!F&&M.measureText){M.font=`${Number(m.value)}px ${b.value}`;const B=Array.isArray(R)?R:[R],L=B.map(k=>M.measureText(k).width);E=Math.ceil(Math.max(...L)),A=Number(m.value)*B.length+(B.length-1)*T3}return[_??E,N??A]},w=(M,E,A,R,F)=>{const _=I3(),N=e.content,B=Number(m.value)*_;M.font=`${y.value} normal ${g.value} ${B}px/${F}px ${b.value}`,M.fillStyle=S.value,M.textAlign="center",M.textBaseline="top",M.translate(R/2,0);const L=Array.isArray(N)?N:[N];L==null||L.forEach((k,z)=>{M.fillText(k??"",E,A+z*(B+T3*_))})},P=()=>{var M;const E=document.createElement("canvas"),A=E.getContext("2d"),R=e.image,F=(M=e.rotate)!==null&&M!==void 0?M:-22;if(A){l.value||(l.value=document.createElement("div"));const _=I3(),[N,B]=O(A),L=(s.value+N)*_,k=(c.value+B)*_;E.setAttribute("width",`${L*cv}px`),E.setAttribute("height",`${k*cv}px`);const z=s.value*_/2,H=c.value*_/2,j=N*_,Y=B*_,Z=(j+s.value*_)/2,G=(Y+c.value*_)/2,te=z+L,U=H+k,Q=Z+L,J=G+k;if(A.save(),sv(A,Z,G,F),R){const X=new Image;X.onload=()=>{A.drawImage(X,z,H,j,Y),A.restore(),sv(A,Q,J,F),A.drawImage(X,te,U,j,Y),C(E.toDataURL(),N)},X.crossOrigin="anonymous",X.referrerPolicy="no-referrer",X.src=R}else w(A,z,H,j,Y),A.restore(),sv(A,Q,J,F),w(A,te,U,j,Y),C(E.toDataURL(),N)}};return Ue(()=>{P()}),Se(()=>[e,r.value.colorFill,r.value.fontSizeLG],()=>{P()},{deep:!0,flush:"post"}),tt(()=>{x()}),lfe(i,M=>{a.value||M.forEach(E=>{rfe(E,l.value)&&(x(),P())})},{attributes:!0,subtree:!0,childList:!0,attributeFilter:["style","class"]}),()=>{var M;return p("div",D(D({},o),{},{ref:i,class:[o.class,e.rootClassName],style:[{position:"relative"},o.style]}),[(M=n.default)===null||M===void 0?void 0:M.call(n)])}}}),cfe=At(sfe);function E3(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function _3(e){return{backgroundColor:e.bgColorSelected,boxShadow:e.boxShadow}}const ufe=v({overflow:"hidden"},Zt),dfe=e=>{const{componentCls:t}=e;return{[t]:v(v(v(v(v({},Ze(e)),{display:"inline-block",padding:e.segmentedContainerPadding,color:e.labelColor,backgroundColor:e.bgColor,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${e.motionDurationMid} ${e.motionEaseInOut}`,borderRadius:e.borderRadiusSM,"&-selected":v(v({},_3(e)),{color:e.labelColorHover}),"&::after":{content:'""',position:"absolute",width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",transition:`background-color ${e.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.labelColorHover,"&::after":{backgroundColor:e.bgColorHover}},"&-label":v({minHeight:e.controlHeight-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeight-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`},ufe),"&-icon + *":{marginInlineStart:e.marginSM/2},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:v(v({},_3(e)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${e.paddingXXS}px 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:e.controlHeightLG-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightLG-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontal}px`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:e.controlHeightSM-e.segmentedContainerPadding*2,lineHeight:`${e.controlHeightSM-e.segmentedContainerPadding*2}px`,padding:`0 ${e.segmentedPaddingHorizontalSM}px`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),E3(`&-disabled ${t}-item`,e)),E3(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:"transform, width"}})}},ffe=Xe("Segmented",e=>{const{lineWidthBold:t,lineWidth:n,colorTextLabel:o,colorText:r,colorFillSecondary:i,colorBgLayout:l,colorBgElevated:a}=e,s=Fe(e,{segmentedPaddingHorizontal:e.controlPaddingHorizontal-n,segmentedPaddingHorizontalSM:e.controlPaddingHorizontalSM-n,segmentedContainerPadding:t,labelColor:o,labelColorHover:r,bgColor:l,bgColorHover:i,bgColorSelected:a});return[dfe(s)]}),M3=e=>e?{left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth}:null,xa=e=>e!==void 0?`${e}px`:void 0,pfe=re({props:{value:wt(),getValueIndex:wt(),prefixCls:wt(),motionName:wt(),onMotionStart:wt(),onMotionEnd:wt(),direction:wt(),containerRef:wt()},emits:["motionStart","motionEnd"],setup(e,t){let{emit:n}=t;const o=ie(),r=m=>{var g;const y=e.getValueIndex(m),b=(g=e.containerRef.value)===null||g===void 0?void 0:g.querySelectorAll(`.${e.prefixCls}-item`)[y];return(b==null?void 0:b.offsetParent)&&b},i=ie(null),l=ie(null);Se(()=>e.value,(m,g)=>{const y=r(g),b=r(m),S=M3(y),$=M3(b);i.value=S,l.value=$,n(y&&b?"motionStart":"motionEnd")},{flush:"post"});const a=I(()=>{var m,g;return e.direction==="rtl"?xa(-((m=i.value)===null||m===void 0?void 0:m.right)):xa((g=i.value)===null||g===void 0?void 0:g.left)}),s=I(()=>{var m,g;return e.direction==="rtl"?xa(-((m=l.value)===null||m===void 0?void 0:m.right)):xa((g=l.value)===null||g===void 0?void 0:g.left)});let c;const u=m=>{clearTimeout(c),lt(()=>{m&&(m.style.transform="translateX(var(--thumb-start-left))",m.style.width="var(--thumb-start-width)")})},d=m=>{c=setTimeout(()=>{m&&(dp(m,`${e.motionName}-appear-active`),m.style.transform="translateX(var(--thumb-active-left))",m.style.width="var(--thumb-active-width)")})},f=m=>{i.value=null,l.value=null,m&&(m.style.transform=null,m.style.width=null,fp(m,`${e.motionName}-appear-active`)),n("motionEnd")},h=I(()=>{var m,g;return{"--thumb-start-left":a.value,"--thumb-start-width":xa((m=i.value)===null||m===void 0?void 0:m.width),"--thumb-active-left":s.value,"--thumb-active-width":xa((g=l.value)===null||g===void 0?void 0:g.width)}});return tt(()=>{clearTimeout(c)}),()=>{const m={ref:o,style:h.value,class:[`${e.prefixCls}-thumb`]};return p(rn,{appear:!0,onBeforeEnter:u,onEnter:d,onAfterEnter:f},{default:()=>[!i.value||!l.value?null:p("div",m,null)]})}}});function hfe(e){return e.map(t=>typeof t=="object"&&t!==null?t:{label:t==null?void 0:t.toString(),title:t==null?void 0:t.toString(),value:t})}const gfe=()=>({prefixCls:String,options:ut(),block:Ce(),disabled:Ce(),size:Be(),value:v(v({},ze([String,Number])),{required:!0}),motionName:String,onChange:ve(),"onUpdate:value":ve()}),iM=(e,t)=>{let{slots:n,emit:o}=t;const{value:r,disabled:i,payload:l,title:a,prefixCls:s,label:c=n.label,checked:u,className:d}=e,f=h=>{i||o("change",h,r)};return p("label",{class:ce({[`${s}-item-disabled`]:i},d)},[p("input",{class:`${s}-item-input`,type:"radio",disabled:i,checked:u,onChange:f},null),p("div",{class:`${s}-item-label`,title:typeof a=="string"?a:""},[typeof c=="function"?c({value:r,disabled:i,payload:l,title:a}):c??r])])};iM.inheritAttrs=!1;const mfe=re({name:"ASegmented",inheritAttrs:!1,props:et(gfe(),{options:[],motionName:"thumb-motion"}),slots:Object,setup(e,t){let{emit:n,slots:o,attrs:r}=t;const{prefixCls:i,direction:l,size:a}=Ee("segmented",e),[s,c]=ffe(i),u=oe(),d=oe(!1),f=I(()=>hfe(e.options)),h=(m,g)=>{e.disabled||(n("update:value",g),n("change",g))};return()=>{const m=i.value;return s(p("div",D(D({},r),{},{class:ce(m,{[c.value]:!0,[`${m}-block`]:e.block,[`${m}-disabled`]:e.disabled,[`${m}-lg`]:a.value=="large",[`${m}-sm`]:a.value=="small",[`${m}-rtl`]:l.value==="rtl"},r.class),ref:u}),[p("div",{class:`${m}-group`},[p(pfe,{containerRef:u,prefixCls:m,value:e.value,motionName:`${m}-${e.motionName}`,direction:l.value,getValueIndex:g=>f.value.findIndex(y=>y.value===g),onMotionStart:()=>{d.value=!0},onMotionEnd:()=>{d.value=!1}},null),f.value.map(g=>p(iM,D(D({key:g.value,prefixCls:m,checked:g.value===e.value,onChange:h},g),{},{className:ce(g.className,`${m}-item`,{[`${m}-item-selected`]:g.value===e.value&&!d.value}),disabled:!!e.disabled||!!g.disabled}),o))])]))}}}),vfe=At(mfe),bfe=e=>{const{componentCls:t}=e;return{[t]:v(v({},Ze(e)),{display:"flex",justifyContent:"center",alignItems:"center",padding:e.paddingSM,backgroundColor:e.colorWhite,borderRadius:e.borderRadiusLG,border:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${t}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:e.colorText,lineHeight:e.lineHeight,background:e.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${t}-expired , & > ${t}-scanned`]:{color:e.QRCodeTextColor}},"&-icon":{marginBlockEnd:e.marginXS,fontSize:e.controlHeight}}),[`${t}-borderless`]:{borderColor:"transparent"}}},yfe=Xe("QRCode",e=>bfe(Fe(e,{QRCodeTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"})));var Sfe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z"}}]},name:"audit",theme:"outlined"};function A3(e){for(var t=1;t({size:{type:Number,default:160},value:{type:String,required:!0},type:Be("canvas"),color:String,bgColor:String,includeMargin:Boolean,imageSettings:Ne()}),Wfe=()=>v(v({},XS()),{errorLevel:Be("M"),icon:String,iconSize:{type:Number,default:40},status:Be("active"),bordered:{type:Boolean,default:!0}});/** + * @license QR Code generator library (TypeScript) + * Copyright (c) Project Nayuki. + * SPDX-License-Identifier: MIT + */var Vo;(function(e){class t{static encodeText(a,s){const c=e.QrSegment.makeSegments(a);return t.encodeSegments(c,s)}static encodeBinary(a,s){const c=e.QrSegment.makeBytes(a);return t.encodeSegments([c],s)}static encodeSegments(a,s){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(t.MIN_VERSION<=c&&c<=u&&u<=t.MAX_VERSION)||d<-1||d>7)throw new RangeError("Invalid value");let h,m;for(h=c;;h++){const S=t.getNumDataCodewords(h,s)*8,$=i.getTotalBits(a,h);if($<=S){m=$;break}if(h>=u)throw new RangeError("Data too long")}for(const S of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])f&&m<=t.getNumDataCodewords(h,S)*8&&(s=S);const g=[];for(const S of a){n(S.mode.modeBits,4,g),n(S.numChars,S.mode.numCharCountBits(h),g);for(const $ of S.getData())g.push($)}r(g.length==m);const y=t.getNumDataCodewords(h,s)*8;r(g.length<=y),n(0,Math.min(4,y-g.length),g),n(0,(8-g.length%8)%8,g),r(g.length%8==0);for(let S=236;g.lengthb[$>>>3]|=S<<7-($&7)),new t(h,s,b,d)}constructor(a,s,c,u){if(this.version=a,this.errorCorrectionLevel=s,this.modules=[],this.isFunction=[],at.MAX_VERSION)throw new RangeError("Version value out of range");if(u<-1||u>7)throw new RangeError("Mask value out of range");this.size=a*4+17;const d=[];for(let h=0;h>>9)*1335;const u=(s<<10|c)^21522;r(u>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,o(u,d));this.setFunctionModule(8,7,o(u,6)),this.setFunctionModule(8,8,o(u,7)),this.setFunctionModule(7,8,o(u,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,o(u,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,o(u,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,o(u,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let a=this.version;for(let c=0;c<12;c++)a=a<<1^(a>>>11)*7973;const s=this.version<<12|a;r(s>>>18==0);for(let c=0;c<18;c++){const u=o(s,c),d=this.size-11+c%3,f=Math.floor(c/3);this.setFunctionModule(d,f,u),this.setFunctionModule(f,d,u)}}drawFinderPattern(a,s){for(let c=-4;c<=4;c++)for(let u=-4;u<=4;u++){const d=Math.max(Math.abs(u),Math.abs(c)),f=a+u,h=s+c;0<=f&&f{(S!=m-d||x>=h)&&b.push($[S])});return r(b.length==f),b}drawCodewords(a){if(a.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let s=0;for(let c=this.size-1;c>=1;c-=2){c==6&&(c=5);for(let u=0;u>>3],7-(s&7)),s++)}}r(s==a.length*8)}applyMask(a){if(a<0||a>7)throw new RangeError("Mask value out of range");for(let s=0;s5&&a++):(this.finderPenaltyAddHistory(h,m),f||(a+=this.finderPenaltyCountPatterns(m)*t.PENALTY_N3),f=this.modules[d][g],h=1);a+=this.finderPenaltyTerminateAndCount(f,h,m)*t.PENALTY_N3}for(let d=0;d5&&a++):(this.finderPenaltyAddHistory(h,m),f||(a+=this.finderPenaltyCountPatterns(m)*t.PENALTY_N3),f=this.modules[g][d],h=1);a+=this.finderPenaltyTerminateAndCount(f,h,m)*t.PENALTY_N3}for(let d=0;df+(h?1:0),s);const c=this.size*this.size,u=Math.ceil(Math.abs(s*20-c*10)/c)-1;return r(0<=u&&u<=9),a+=u*t.PENALTY_N4,r(0<=a&&a<=2568888),a}getAlignmentPatternPositions(){if(this.version==1)return[];{const a=Math.floor(this.version/7)+2,s=this.version==32?26:Math.ceil((this.version*4+4)/(a*2-2))*2,c=[6];for(let u=this.size-7;c.lengtht.MAX_VERSION)throw new RangeError("Version number out of range");let s=(16*a+128)*a+64;if(a>=2){const c=Math.floor(a/7)+2;s-=(25*c-10)*c-55,a>=7&&(s-=36)}return r(208<=s&&s<=29648),s}static getNumDataCodewords(a,s){return Math.floor(t.getNumRawDataModules(a)/8)-t.ECC_CODEWORDS_PER_BLOCK[s.ordinal][a]*t.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][a]}static reedSolomonComputeDivisor(a){if(a<1||a>255)throw new RangeError("Degree out of range");const s=[];for(let u=0;u0);for(const u of a){const d=u^c.shift();c.push(0),s.forEach((f,h)=>c[h]^=t.reedSolomonMultiply(f,d))}return c}static reedSolomonMultiply(a,s){if(a>>>8||s>>>8)throw new RangeError("Byte out of range");let c=0;for(let u=7;u>=0;u--)c=c<<1^(c>>>7)*285,c^=(s>>>u&1)*a;return r(c>>>8==0),c}finderPenaltyCountPatterns(a){const s=a[1];r(s<=this.size*3);const c=s>0&&a[2]==s&&a[3]==s*3&&a[4]==s&&a[5]==s;return(c&&a[0]>=s*4&&a[6]>=s?1:0)+(c&&a[6]>=s*4&&a[0]>=s?1:0)}finderPenaltyTerminateAndCount(a,s,c){return a&&(this.finderPenaltyAddHistory(s,c),s=0),s+=this.size,this.finderPenaltyAddHistory(s,c),this.finderPenaltyCountPatterns(c)}finderPenaltyAddHistory(a,s){s[0]==0&&(a+=this.size),s.pop(),s.unshift(a)}}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function n(l,a,s){if(a<0||a>31||l>>>a)throw new RangeError("Value out of range");for(let c=a-1;c>=0;c--)s.push(l>>>c&1)}function o(l,a){return(l>>>a&1)!=0}function r(l){if(!l)throw new Error("Assertion error")}class i{static makeBytes(a){const s=[];for(const c of a)n(c,8,s);return new i(i.Mode.BYTE,a.length,s)}static makeNumeric(a){if(!i.isNumeric(a))throw new RangeError("String contains non-numeric characters");const s=[];for(let c=0;c=1<1&&arguments[1]!==void 0?arguments[1]:0;const n=[];return e.forEach(function(o,r){let i=null;o.forEach(function(l,a){if(!l&&i!==null){n.push(`M${i+t} ${r+t}h${a-i}v1H${i+t}z`),i=null;return}if(a===o.length-1){if(!l)return;i===null?n.push(`M${a+t},${r+t} h1v1H${a+t}z`):n.push(`M${i+t},${r+t} h${a+1-i}v1H${i+t}z`);return}l&&i===null&&(i=a)})}),n.join("")}function fM(e,t){return e.slice().map((n,o)=>o=t.y+t.h?n:n.map((r,i)=>i=t.x+t.w?r:!1))}function pM(e,t,n,o){if(o==null)return null;const r=e.length+n*2,i=Math.floor(t*Gfe),l=r/t,a=(o.width||i)*l,s=(o.height||i)*l,c=o.x==null?e.length/2-a/2:o.x*l,u=o.y==null?e.length/2-s/2:o.y*l;let d=null;if(o.excavate){const f=Math.floor(c),h=Math.floor(u),m=Math.ceil(a+c-f),g=Math.ceil(s+u-h);d={x:f,y:h,w:m,h:g}}return{x:c,y:u,h:s,w:a,excavation:d}}function hM(e,t){return t!=null?Math.floor(t):e?Kfe:Ufe}const Xfe=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),Yfe=re({name:"QRCodeCanvas",inheritAttrs:!1,props:v(v({},XS()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(e,t){let{attrs:n,expose:o}=t;const r=I(()=>{var s;return(s=e.imageSettings)===null||s===void 0?void 0:s.src}),i=oe(null),l=oe(null),a=oe(!1);return o({toDataURL:(s,c)=>{var u;return(u=i.value)===null||u===void 0?void 0:u.toDataURL(s,c)}}),je(()=>{const{value:s,size:c=cb,level:u=aM,bgColor:d=sM,fgColor:f=cM,includeMargin:h=uM,marginSize:m,imageSettings:g}=e;if(i.value!=null){const y=i.value,b=y.getContext("2d");if(!b)return;let S=Vo.QrCode.encodeText(s,lM[u]).getModules();const $=hM(h,m),x=S.length+$*2,C=pM(S,c,$,g),O=l.value,w=a.value&&C!=null&&O!==null&&O.complete&&O.naturalHeight!==0&&O.naturalWidth!==0;w&&C.excavation!=null&&(S=fM(S,C.excavation));const P=window.devicePixelRatio||1;y.height=y.width=c*P;const T=c/x*P;b.scale(T,T),b.fillStyle=d,b.fillRect(0,0,x,x),b.fillStyle=f,Xfe?b.fill(new Path2D(dM(S,$))):S.forEach(function(M,E){M.forEach(function(A,R){A&&b.fillRect(R+$,E+$,1,1)})}),w&&b.drawImage(O,C.x+$,C.y+$,C.w,C.h)}},{flush:"post"}),Se(r,()=>{a.value=!1}),()=>{var s;const c=(s=e.size)!==null&&s!==void 0?s:cb,u={height:`${c}px`,width:`${c}px`};let d=null;return r.value!=null&&(d=p("img",{src:r.value,key:r.value,style:{display:"none"},onLoad:()=>{a.value=!0},ref:l},null)),p(He,null,[p("canvas",D(D({},n),{},{style:[u,n.style],ref:i}),null),d])}}}),qfe=re({name:"QRCodeSVG",inheritAttrs:!1,props:v(v({},XS()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(e){let t=null,n=null,o=null,r=null,i=null,l=null;return je(()=>{const{value:a,size:s=cb,level:c=aM,includeMargin:u=uM,marginSize:d,imageSettings:f}=e;t=Vo.QrCode.encodeText(a,lM[c]).getModules(),n=hM(u,d),o=t.length+n*2,r=pM(t,s,n,f),f!=null&&r!=null&&(r.excavation!=null&&(t=fM(t,r.excavation)),l=p("image",{"xlink:href":f.src,height:r.h,width:r.w,x:r.x+n,y:r.y+n,preserveAspectRatio:"none"},null)),i=dM(t,n)}),()=>{const a=e.bgColor&&sM,s=e.fgColor&&cM;return p("svg",{height:e.size,width:e.size,viewBox:`0 0 ${o} ${o}`},[!!e.title&&p("title",null,[e.title]),p("path",{fill:a,d:`M0,0 h${o}v${o}H0z`,"shape-rendering":"crispEdges"},null),p("path",{fill:s,d:i,"shape-rendering":"crispEdges"},null),l])}}}),Zfe=re({name:"AQrcode",inheritAttrs:!1,props:Wfe(),emits:["refresh"],setup(e,t){let{emit:n,attrs:o,expose:r}=t;const[i]=Zo("QRCode"),{prefixCls:l}=Ee("qrcode",e),[a,s]=yfe(l),[,c]=mi(),u=ie();r({toDataURL:(f,h)=>{var m;return(m=u.value)===null||m===void 0?void 0:m.toDataURL(f,h)}});const d=I(()=>{const{value:f,icon:h="",size:m=160,iconSize:g=40,color:y=c.value.colorText,bgColor:b="transparent",errorLevel:S="M"}=e,$={src:h,x:void 0,y:void 0,height:g,width:g,excavate:!0};return{value:f,size:m-(c.value.paddingSM+c.value.lineWidth)*2,level:S,bgColor:b,fgColor:y,imageSettings:h?$:void 0}});return()=>{const f=l.value;return a(p("div",D(D({},o),{},{style:[o.style,{width:`${e.size}px`,height:`${e.size}px`,backgroundColor:d.value.bgColor}],class:[s.value,f,{[`${f}-borderless`]:!e.bordered}]}),[e.status!=="active"&&p("div",{class:`${f}-mask`},[e.status==="loading"&&p(Dr,null,null),e.status==="expired"&&p(He,null,[p("p",{class:`${f}-expired`},[i.value.expired]),p(Wt,{type:"link",onClick:h=>n("refresh",h)},{default:()=>[i.value.refresh],icon:()=>p(ku,null,null)})]),e.status==="scanned"&&p("p",{class:`${f}-scanned`},[i.value.scanned])]),e.type==="canvas"?p(Yfe,D({ref:u},d.value),null):p(qfe,d.value,null)]))}}}),Jfe=At(Zfe);function Qfe(e){const t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:o,right:r,bottom:i,left:l}=e.getBoundingClientRect();return o>=0&&l>=0&&r<=t&&i<=n}function epe(e,t,n,o){const[r,i]=St(void 0);je(()=>{const u=typeof e.value=="function"?e.value():e.value;i(u||null)},{flush:"post"});const[l,a]=St(null),s=()=>{if(!t.value){a(null);return}if(r.value){!Qfe(r.value)&&t.value&&r.value.scrollIntoView(o.value);const{left:u,top:d,width:f,height:h}=r.value.getBoundingClientRect(),m={left:u,top:d,width:f,height:h,radius:0};JSON.stringify(l.value)!==JSON.stringify(m)&&a(m)}else a(null)};return Ue(()=>{Se([t,r],()=>{s()},{flush:"post",immediate:!0}),window.addEventListener("resize",s)}),tt(()=>{window.removeEventListener("resize",s)}),[I(()=>{var u,d;if(!l.value)return l.value;const f=((u=n.value)===null||u===void 0?void 0:u.offset)||6,h=((d=n.value)===null||d===void 0?void 0:d.radius)||2;return{left:l.value.left-f,top:l.value.top-f,width:l.value.width+f*2,height:l.value.height+f*2,radius:h}}),r]}const tpe=()=>({arrow:ze([Boolean,Object]),target:ze([String,Function,Object]),title:ze([String,Object]),description:ze([String,Object]),placement:Be(),mask:ze([Object,Boolean],!0),className:{type:String},style:Ne(),scrollIntoViewOptions:ze([Boolean,Object])}),YS=()=>v(v({},tpe()),{prefixCls:{type:String},total:{type:Number},current:{type:Number},onClose:ve(),onFinish:ve(),renderPanel:ve(),onPrev:ve(),onNext:ve()}),npe=re({name:"DefaultPanel",inheritAttrs:!1,props:YS(),setup(e,t){let{attrs:n}=t;return()=>{const{prefixCls:o,current:r,total:i,title:l,description:a,onClose:s,onPrev:c,onNext:u,onFinish:d}=e;return p("div",D(D({},n),{},{class:ce(`${o}-content`,n.class)}),[p("div",{class:`${o}-inner`},[p("button",{type:"button",onClick:s,"aria-label":"Close",class:`${o}-close`},[p("span",{class:`${o}-close-x`},[vn("×")])]),p("div",{class:`${o}-header`},[p("div",{class:`${o}-title`},[l])]),p("div",{class:`${o}-description`},[a]),p("div",{class:`${o}-footer`},[p("div",{class:`${o}-sliders`},[i>1?[...Array.from({length:i}).keys()].map((f,h)=>p("span",{key:f,class:h===r?"active":""},null)):null]),p("div",{class:`${o}-buttons`},[r!==0?p("button",{class:`${o}-prev-btn`,onClick:c},[vn("Prev")]):null,r===i-1?p("button",{class:`${o}-finish-btn`,onClick:d},[vn("Finish")]):p("button",{class:`${o}-next-btn`,onClick:u},[vn("Next")])])])])])}}}),ope=re({name:"TourStep",inheritAttrs:!1,props:YS(),setup(e,t){let{attrs:n}=t;return()=>{const{current:o,renderPanel:r}=e;return p(He,null,[typeof r=="function"?r(v(v({},n),e),o):p(npe,D(D({},n),e),null)])}}});let W3=0;const rpe=Hn();function ipe(){let e;return rpe?(e=W3,W3+=1):e="TEST_OR_SSR",e}function lpe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ie("");const t=`vc_unique_${ipe()}`;return e.value||t}const _d={fill:"transparent","pointer-events":"auto"},ape=re({name:"TourMask",props:{prefixCls:{type:String},pos:Ne(),rootClassName:{type:String},showMask:Ce(),fill:{type:String,default:"rgba(0,0,0,0.5)"},open:Ce(),animated:ze([Boolean,Object]),zIndex:{type:Number}},setup(e,t){let{attrs:n}=t;const o=lpe();return()=>{const{prefixCls:r,open:i,rootClassName:l,pos:a,showMask:s,fill:c,animated:u,zIndex:d}=e,f=`${r}-mask-${o}`,h=typeof u=="object"?u==null?void 0:u.placeholder:u;return p(gu,{visible:i,autoLock:!0},{default:()=>i&&p("div",D(D({},n),{},{class:ce(`${r}-mask`,l,n.class),style:[{position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:d,pointerEvents:"none"},n.style]}),[s?p("svg",{style:{width:"100%",height:"100%"}},[p("defs",null,[p("mask",{id:f},[p("rect",{x:"0",y:"0",width:"100vw",height:"100vh",fill:"white"},null),a&&p("rect",{x:a.left,y:a.top,rx:a.radius,width:a.width,height:a.height,fill:"black",class:h?`${r}-placeholder-animated`:""},null)])]),p("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:c,mask:`url(#${f})`},null),a&&p(He,null,[p("rect",D(D({},_d),{},{x:"0",y:"0",width:"100%",height:a.top}),null),p("rect",D(D({},_d),{},{x:"0",y:"0",width:a.left,height:"100%"}),null),p("rect",D(D({},_d),{},{x:"0",y:a.top+a.height,width:"100%",height:`calc(100vh - ${a.top+a.height}px)`}),null),p("rect",D(D({},_d),{},{x:a.left+a.width,y:"0",width:`calc(100vw - ${a.left+a.width}px)`,height:"100%"}),null)])]):null])})}}}),spe=[0,0],K3={left:{points:["cr","cl"],offset:[-8,0]},right:{points:["cl","cr"],offset:[8,0]},top:{points:["bc","tc"],offset:[0,-8]},bottom:{points:["tc","bc"],offset:[0,8]},topLeft:{points:["bl","tl"],offset:[0,-8]},leftTop:{points:["tr","tl"],offset:[-8,0]},topRight:{points:["br","tr"],offset:[0,-8]},rightTop:{points:["tl","tr"],offset:[8,0]},bottomRight:{points:["tr","br"],offset:[0,8]},rightBottom:{points:["bl","br"],offset:[8,0]},bottomLeft:{points:["tl","bl"],offset:[0,8]},leftBottom:{points:["br","bl"],offset:[-8,0]}};function gM(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const t={};return Object.keys(K3).forEach(n=>{t[n]=v(v({},K3[n]),{autoArrow:e,targetOffset:spe})}),t}gM();var cpe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{builtinPlacements:e,popupAlign:t}=b8();return{builtinPlacements:e,popupAlign:t,steps:ut(),open:Ce(),defaultCurrent:{type:Number},current:{type:Number},onChange:ve(),onClose:ve(),onFinish:ve(),mask:ze([Boolean,Object],!0),arrow:ze([Boolean,Object],!0),rootClassName:{type:String},placement:Be("bottom"),prefixCls:{type:String,default:"rc-tour"},renderPanel:ve(),gap:Ne(),animated:ze([Boolean,Object]),scrollIntoViewOptions:ze([Boolean,Object],!0),zIndex:{type:Number,default:1001}}},upe=re({name:"Tour",inheritAttrs:!1,props:et(mM(),{}),setup(e){const{defaultCurrent:t,placement:n,mask:o,scrollIntoViewOptions:r,open:i,gap:l,arrow:a}=lr(e),s=ie(),[c,u]=Mt(0,{value:I(()=>e.current),defaultValue:t.value}),[d,f]=Mt(void 0,{value:I(()=>e.open),postState:w=>c.value<0||c.value>=e.steps.length?!1:w??!0}),h=oe(d.value);je(()=>{d.value&&!h.value&&u(0),h.value=d.value});const m=I(()=>e.steps[c.value]||{}),g=I(()=>{var w;return(w=m.value.placement)!==null&&w!==void 0?w:n.value}),y=I(()=>{var w;return d.value&&((w=m.value.mask)!==null&&w!==void 0?w:o.value)}),b=I(()=>{var w;return(w=m.value.scrollIntoViewOptions)!==null&&w!==void 0?w:r.value}),[S,$]=epe(I(()=>m.value.target),i,l,b),x=I(()=>$.value?typeof m.value.arrow>"u"?a.value:m.value.arrow:!1),C=I(()=>typeof x.value=="object"?x.value.pointAtCenter:!1);Se(C,()=>{var w;(w=s.value)===null||w===void 0||w.forcePopupAlign()}),Se(c,()=>{var w;(w=s.value)===null||w===void 0||w.forcePopupAlign()});const O=w=>{var P;u(w),(P=e.onChange)===null||P===void 0||P.call(e,w)};return()=>{var w;const{prefixCls:P,steps:T,onClose:M,onFinish:E,rootClassName:A,renderPanel:R,animated:F,zIndex:_}=e,N=cpe(e,["prefixCls","steps","onClose","onFinish","rootClassName","renderPanel","animated","zIndex"]);if($.value===void 0)return null;const B=()=>{f(!1),M==null||M(c.value)},L=typeof y.value=="boolean"?y.value:!!y.value,k=typeof y.value=="boolean"?void 0:y.value,z=()=>$.value||document.body,H=()=>p(ope,D({arrow:x.value,key:"content",prefixCls:P,total:T.length,renderPanel:R,onPrev:()=>{O(c.value-1)},onNext:()=>{O(c.value+1)},onClose:B,current:c.value,onFinish:()=>{B(),E==null||E()}},m.value),null),j=I(()=>{const Y=S.value||uv,Z={};return Object.keys(Y).forEach(G=>{typeof Y[G]=="number"?Z[G]=`${Y[G]}px`:Z[G]=Y[G]}),Z});return d.value?p(He,null,[p(ape,{zIndex:_,prefixCls:P,pos:S.value,showMask:L,style:k==null?void 0:k.style,fill:k==null?void 0:k.color,open:d.value,animated:F,rootClassName:A},null),p(ca,D(D({},N),{},{arrow:!!N.arrow,builtinPlacements:m.value.target?(w=N.builtinPlacements)!==null&&w!==void 0?w:gM(C.value):void 0,ref:s,popupStyle:m.value.target?m.value.style:v(v({},m.value.style),{position:"fixed",left:uv.left,top:uv.top,transform:"translate(-50%, -50%)"}),popupPlacement:g.value,popupVisible:d.value,popupClassName:ce(A,m.value.className),prefixCls:P,popup:H,forceRender:!1,destroyPopupOnHide:!0,zIndex:_,mask:!1,getTriggerDOMNode:z}),{default:()=>[p(gu,{visible:d.value,autoLock:!0},{default:()=>[p("div",{class:ce(A,`${P}-target-placeholder`),style:v(v({},j.value),{position:"fixed",pointerEvents:"none"})},null)]})]})]):null}}}),dpe=()=>v(v({},mM()),{steps:{type:Array},prefixCls:{type:String},current:{type:Number},type:{type:String},"onUpdate:current":Function}),fpe=()=>v(v({},YS()),{cover:{type:Object},nextButtonProps:{type:Object},prevButtonProps:{type:Object},current:{type:Number},type:{type:String}}),ppe=re({name:"ATourPanel",inheritAttrs:!1,props:fpe(),setup(e,t){let{attrs:n,slots:o}=t;const{current:r,total:i}=lr(e),l=I(()=>r.value===i.value-1),a=c=>{var u;const d=e.prevButtonProps;(u=e.onPrev)===null||u===void 0||u.call(e,c),typeof(d==null?void 0:d.onClick)=="function"&&(d==null||d.onClick())},s=c=>{var u,d;const f=e.nextButtonProps;l.value?(u=e.onFinish)===null||u===void 0||u.call(e,c):(d=e.onNext)===null||d===void 0||d.call(e,c),typeof(f==null?void 0:f.onClick)=="function"&&(f==null||f.onClick())};return()=>{const{prefixCls:c,title:u,onClose:d,cover:f,description:h,type:m,arrow:g}=e,y=e.prevButtonProps,b=e.nextButtonProps;let S;u&&(S=p("div",{class:`${c}-header`},[p("div",{class:`${c}-title`},[u])]));let $;h&&($=p("div",{class:`${c}-description`},[h]));let x;f&&(x=p("div",{class:`${c}-cover`},[f]));let C;o.indicatorsRender?C=o.indicatorsRender({current:r.value,total:i}):C=[...Array.from({length:i.value}).keys()].map((P,T)=>p("span",{key:P,class:ce(T===r.value&&`${c}-indicator-active`,`${c}-indicator`)},null));const O=m==="primary"?"default":"primary",w={type:"default",ghost:m==="primary"};return p(oa,{componentName:"Tour",defaultLocale:ro.Tour},{default:P=>{var T;return p("div",D(D({},n),{},{class:ce(m==="primary"?`${c}-primary`:"",n.class,`${c}-content`)}),[g&&p("div",{class:`${c}-arrow`,key:"arrow"},null),p("div",{class:`${c}-inner`},[p(Kn,{class:`${c}-close`,onClick:d},null),x,S,$,p("div",{class:`${c}-footer`},[i.value>1&&p("div",{class:`${c}-indicators`},[C]),p("div",{class:`${c}-buttons`},[r.value!==0?p(Wt,D(D(D({},w),y),{},{onClick:a,size:"small",class:ce(`${c}-prev-btn`,y==null?void 0:y.className)}),{default:()=>[Lv(y==null?void 0:y.children)?y.children():(T=y==null?void 0:y.children)!==null&&T!==void 0?T:P.Previous]}):null,p(Wt,D(D({type:O},b),{},{onClick:s,size:"small",class:ce(`${c}-next-btn`,b==null?void 0:b.className)}),{default:()=>[Lv(b==null?void 0:b.children)?b==null?void 0:b.children():l.value?P.Finish:P.Next]})])])])])}})}}}),hpe=e=>{let{defaultType:t,steps:n,current:o,defaultCurrent:r}=e;const i=ie(r==null?void 0:r.value),l=I(()=>o==null?void 0:o.value);Se(l,u=>{i.value=u??(r==null?void 0:r.value)},{immediate:!0});const a=u=>{i.value=u},s=I(()=>{var u,d;return typeof i.value=="number"?n&&((d=(u=n.value)===null||u===void 0?void 0:u[i.value])===null||d===void 0?void 0:d.type):t==null?void 0:t.value});return{currentMergedType:I(()=>{var u;return(u=s.value)!==null&&u!==void 0?u:t==null?void 0:t.value}),updateInnerCurrent:a}},gpe=e=>{const{componentCls:t,lineHeight:n,padding:o,paddingXS:r,borderRadius:i,borderRadiusXS:l,colorPrimary:a,colorText:s,colorFill:c,indicatorHeight:u,indicatorWidth:d,boxShadowTertiary:f,tourZIndexPopup:h,fontSize:m,colorBgContainer:g,fontWeightStrong:y,marginXS:b,colorTextLightSolid:S,tourBorderRadius:$,colorWhite:x,colorBgTextHover:C,tourCloseSize:O,motionDurationSlow:w,antCls:P}=e;return[{[t]:v(v({},Ze(e)),{color:s,position:"absolute",zIndex:h,display:"block",visibility:"visible",fontSize:m,lineHeight:n,width:520,"--antd-arrow-background-color":g,"&-pure":{maxWidth:"100%",position:"relative"},[`&${t}-hidden`]:{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{textAlign:"start",textDecoration:"none",borderRadius:$,boxShadow:f,position:"relative",backgroundColor:g,border:"none",backgroundClip:"padding-box",[`${t}-close`]:{position:"absolute",top:o,insetInlineEnd:o,color:e.colorIcon,outline:"none",width:O,height:O,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?"transparent":e.colorFillContent}},[`${t}-cover`]:{textAlign:"center",padding:`${o+O+r}px ${o}px 0`,img:{width:"100%"}},[`${t}-header`]:{padding:`${o}px ${o}px ${r}px`,[`${t}-title`]:{lineHeight:n,fontSize:m,fontWeight:y}},[`${t}-description`]:{padding:`0 ${o}px`,lineHeight:n,wordWrap:"break-word"},[`${t}-footer`]:{padding:`${r}px ${o}px ${o}px`,textAlign:"end",borderRadius:`0 0 ${l}px ${l}px`,display:"flex",[`${t}-indicators`]:{display:"inline-block",[`${t}-indicator`]:{width:d,height:u,display:"inline-block",borderRadius:"50%",background:c,"&:not(:last-child)":{marginInlineEnd:u},"&-active":{background:a}}},[`${t}-buttons`]:{marginInlineStart:"auto",[`${P}-btn`]:{marginInlineStart:b}}}},[`${t}-primary, &${t}-primary`]:{"--antd-arrow-background-color":a,[`${t}-inner`]:{color:S,textAlign:"start",textDecoration:"none",backgroundColor:a,borderRadius:i,boxShadow:f,[`${t}-close`]:{color:S},[`${t}-indicators`]:{[`${t}-indicator`]:{background:new vt(S).setAlpha(.15).toRgbString(),"&-active":{background:S}}},[`${t}-prev-btn`]:{color:S,borderColor:new vt(S).setAlpha(.15).toRgbString(),backgroundColor:a,"&:hover":{backgroundColor:new vt(S).setAlpha(.15).toRgbString(),borderColor:"transparent"}},[`${t}-next-btn`]:{color:a,borderColor:"transparent",background:x,"&:hover":{background:new vt(C).onBackground(x).toRgbString()}}}}}),[`${t}-mask`]:{[`${t}-placeholder-animated`]:{transition:`all ${w}`}},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:Math.min($,Qy)}}},e1(e,{colorBg:"var(--antd-arrow-background-color)",contentRadius:$,limitVerticalRadius:!0})]},mpe=Xe("Tour",e=>{const{borderRadiusLG:t,fontSize:n,lineHeight:o}=e,r=Fe(e,{tourZIndexPopup:e.zIndexPopupBase+70,indicatorWidth:6,indicatorHeight:6,tourBorderRadius:t,tourCloseSize:n*o});return[gpe(r)]});var vpe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{const{steps:g,current:y,type:b,rootClassName:S}=e,$=vpe(e,["steps","current","type","rootClassName"]),x=ce({[`${c.value}-primary`]:h.value==="primary",[`${c.value}-rtl`]:u.value==="rtl"},f.value,S),C=(P,T)=>p(ppe,D(D({},P),{},{type:b,current:T}),{indicatorsRender:r.indicatorsRender}),O=P=>{m(P),o("update:current",P),o("change",P)},w=I(()=>Jy({arrowPointAtCenter:!0,autoAdjustOverflow:!0}));return d(p(upe,D(D(D({},n),$),{},{rootClassName:x,prefixCls:c.value,current:y,defaultCurrent:e.defaultCurrent,animated:!0,renderPanel:C,onChange:O,steps:g,builtinPlacements:w.value}),null))}}}),ype=At(bpe),vM=Symbol("appConfigContext"),Spe=e=>qe(vM,e),$pe=()=>Ke(vM,{}),bM=Symbol("appContext"),Cpe=e=>qe(bM,e),xpe=ft({message:{},notification:{},modal:{}}),wpe=()=>Ke(bM,xpe),Ope=e=>{const{componentCls:t,colorText:n,fontSize:o,lineHeight:r,fontFamily:i}=e;return{[t]:{color:n,fontSize:o,lineHeight:r,fontFamily:i}}},Ppe=Xe("App",e=>[Ope(e)]),Ipe=()=>({rootClassName:String,message:Ne(),notification:Ne()}),Tpe=()=>wpe(),Tc=re({name:"AApp",props:et(Ipe(),{}),setup(e,t){let{slots:n}=t;const{prefixCls:o}=Ee("app",e),[r,i]=Ppe(o),l=I(()=>ce(i.value,o.value,e.rootClassName)),a=$pe(),s=I(()=>({message:v(v({},a.message),e.message),notification:v(v({},a.notification),e.notification)}));Spe(s.value);const[c,u]=W5(s.value.message),[d,f]=nE(s.value.notification),[h,m]=i_(),g=I(()=>({message:c,notification:d,modal:h}));return Cpe(g.value),()=>{var y;return r(p("div",{class:l.value},[m(),u(),f(),(y=n.default)===null||y===void 0?void 0:y.call(n)]))}}});Tc.useApp=Tpe;Tc.install=function(e){e.component(Tc.name,Tc)};const yM=["wrap","nowrap","wrap-reverse"],SM=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],$M=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],Epe=(e,t)=>{const n={};return yM.forEach(o=>{n[`${e}-wrap-${o}`]=t.wrap===o}),n},_pe=(e,t)=>{const n={};return $M.forEach(o=>{n[`${e}-align-${o}`]=t.align===o}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},Mpe=(e,t)=>{const n={};return SM.forEach(o=>{n[`${e}-justify-${o}`]=t.justify===o}),n};function Ape(e,t){return ce(v(v(v({},Epe(e,t)),_pe(e,t)),Mpe(e,t)))}const Rpe=e=>{const{componentCls:t}=e;return{[t]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},Dpe=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},Npe=e=>{const{componentCls:t}=e,n={};return yM.forEach(o=>{n[`${t}-wrap-${o}`]={flexWrap:o}}),n},Bpe=e=>{const{componentCls:t}=e,n={};return $M.forEach(o=>{n[`${t}-align-${o}`]={alignItems:o}}),n},Lpe=e=>{const{componentCls:t}=e,n={};return SM.forEach(o=>{n[`${t}-justify-${o}`]={justifyContent:o}}),n},kpe=Xe("Flex",e=>{const t=Fe(e,{flexGapSM:e.paddingXS,flexGap:e.padding,flexGapLG:e.paddingLG});return[Rpe(t),Dpe(t),Npe(t),Bpe(t),Lpe(t)]});function U3(e){return["small","middle","large"].includes(e)}const Fpe=()=>({prefixCls:Be(),vertical:Ce(),wrap:Be(),justify:Be(),align:Be(),flex:ze([Number,String]),gap:ze([Number,String]),component:wt()});var zpe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r{var u;return[l.value,s.value,Ape(l.value,e),{[`${l.value}-rtl`]:i.value==="rtl",[`${l.value}-gap-${e.gap}`]:U3(e.gap),[`${l.value}-vertical`]:(u=e.vertical)!==null&&u!==void 0?u:r==null?void 0:r.value.vertical}]});return()=>{var u;const{flex:d,gap:f,component:h="div"}=e,m=zpe(e,["flex","gap","component"]),g={};return d&&(g.flex=d),f&&!U3(f)&&(g.gap=`${f}px`),a(p(h,D({class:[o.class,c.value],style:[o.style,g]},rt(m,["justify","wrap","align","vertical"])),{default:()=>[(u=n.default)===null||u===void 0?void 0:u.call(n)]}))}}}),jpe=At(Hpe),G3=Object.freeze(Object.defineProperty({__proto__:null,Affix:o8,Alert:bU,Anchor:xl,AnchorLink:ry,App:Tc,AutoComplete:GK,AutoCompleteOptGroup:UK,AutoCompleteOption:KK,Avatar:Bl,AvatarGroup:op,BackTop:Ip,Badge:yc,BadgeRibbon:rp,Breadcrumb:Ll,BreadcrumbItem:Jc,BreadcrumbSeparator:pp,Button:Wt,ButtonGroup:cp,Calendar:XY,Card:qa,CardGrid:bp,CardMeta:vp,Carousel:DZ,Cascader:YQ,CheckableTag:xp,Checkbox:Ko,CheckboxGroup:$p,Col:tee,Collapse:$c,CollapsePanel:yp,Comment:lee,Compact:tp,ConfigProvider:Fl,DatePicker:xte,Descriptions:Ma,DescriptionsItem:vE,DirectoryTree:ff,Divider:Bte,Drawer:Zte,Dropdown:sr,DropdownButton:Zc,Empty:Bi,Flex:jpe,FloatButton:Gi,FloatButtonGroup:Pp,Form:Li,FormItem:B5,FormItemRest:Jf,Grid:eee,Image:Ol,ImagePreviewGroup:zE,Input:cn,InputGroup:IE,InputNumber:Toe,InputPassword:_E,InputSearch:TE,Layout:Hoe,LayoutContent:zoe,LayoutFooter:koe,LayoutHeader:Loe,LayoutSider:Foe,List:_i,ListItem:KE,ListItemMeta:VE,LocaleProvider:z5,Mentions:Xre,MentionsOption:sf,Menu:Xt,MenuDivider:eu,MenuItem:Rr,MenuItemGroup:Qc,Modal:fn,MonthPicker:Jd,PageHeader:wie,Pagination:lg,Popconfirm:_ie,Popover:t1,Progress:SS,QRCode:Jfe,QuarterPicker:Qd,Radio:Jn,RadioButton:gp,RadioGroup:_1,RangePicker:ef,Rate:vle,Result:Hl,Row:Rle,Segmented:vfe,Select:Cn,SelectOptGroup:jK,SelectOption:HK,Skeleton:Dn,SkeletonAvatar:z1,SkeletonButton:L1,SkeletonImage:F1,SkeletonInput:k1,SkeletonTitle:Hh,Slider:qle,Space:es,Spin:Dr,Statistic:ei,StatisticCountdown:uie,Step:cf,Steps:hae,SubMenu:ql,Switch:wae,TabPane:mp,Table:Bce,TableColumn:hf,TableColumnGroup:gf,TableSummary:mf,TableSummaryCell:Np,TableSummaryRow:Dp,Tabs:kl,Tag:Qa,Textarea:iS,TimePicker:Mue,TimeRangePicker:vf,Timeline:Ic,TimelineItem:lu,Tooltip:ho,Tour:ype,Transfer:iue,Tree:V_,TreeNode:pf,TreeSelect:Eue,TreeSelectNode:sb,Typography:fo,TypographyLink:_s,TypographyParagraph:Ms,TypographyText:As,TypographyTitle:Rs,Upload:tfe,UploadDragger:efe,Watermark:cfe,WeekPicker:Zd,message:po,notification:qi},Symbol.toStringTag,{value:"Module"})),Vpe=function(e){return Object.keys(G3).forEach(t=>{const n=G3[t];n.install&&e.use(n)}),e.use(z9.StyleProvider),e.config.globalProperties.$message=po,e.config.globalProperties.$notification=qi,e.config.globalProperties.$info=fn.info,e.config.globalProperties.$success=fn.success,e.config.globalProperties.$error=fn.error,e.config.globalProperties.$warning=fn.warning,e.config.globalProperties.$confirm=fn.confirm,e.config.globalProperties.$destroyAll=fn.destroyAll,e},Wpe={version:K6,install:Vpe};/*! + * pinia v2.3.1 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */let CM;const xg=e=>CM=e,xM=Symbol();function ub(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Ec;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Ec||(Ec={}));function Kpe(){const e=UO(!0),t=e.run(()=>ie({}));let n=[],o=[];const r=Mb({install(i){xg(r),r._a=i,i.provide(xM,r),i.config.globalProperties.$pinia=r,o.forEach(l=>n.push(l)),o=[]},use(i){return this._a?n.push(i):o.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const wM=()=>{};function X3(e,t,n,o=wM){e.push(t);const r=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),o())};return!n&&wb()&&GO(r),r}function wa(e,...t){e.slice().forEach(n=>{n(...t)})}const Upe=e=>e(),Y3=Symbol(),dv=Symbol();function db(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,o)=>e.set(o,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],r=e[n];ub(r)&&ub(o)&&e.hasOwnProperty(n)&&!jt(o)&&!ii(o)?e[n]=db(r,o):e[n]=o}return e}const Gpe=Symbol();function Xpe(e){return!ub(e)||!e.hasOwnProperty(Gpe)}const{assign:Mi}=Object;function Ype(e){return!!(jt(e)&&e.effect)}function qpe(e,t,n,o){const{state:r,actions:i,getters:l}=t,a=n.state.value[e];let s;function c(){a||(n.state.value[e]=r?r():{});const u=lr(n.state.value[e]);return Mi(u,i,Object.keys(l||{}).reduce((d,f)=>(d[f]=Mb(I(()=>{xg(n);const h=n._s.get(e);return l[f].call(h,h)})),d),{}))}return s=OM(e,c,t,n,o,!0),s}function OM(e,t,n={},o,r,i){let l;const a=Mi({actions:{}},n),s={deep:!0};let c,u,d=[],f=[],h;const m=o.state.value[e];!i&&!m&&(o.state.value[e]={});let g;function y(P){let T;c=u=!1,typeof P=="function"?(P(o.state.value[e]),T={type:Ec.patchFunction,storeId:e,events:h}):(db(o.state.value[e],P),T={type:Ec.patchObject,payload:P,storeId:e,events:h});const M=g=Symbol();lt().then(()=>{g===M&&(c=!0)}),u=!0,wa(d,T,o.state.value[e])}const b=i?function(){const{state:T}=n,M=T?T():{};this.$patch(E=>{Mi(E,M)})}:wM;function S(){l.stop(),d=[],f=[],o._s.delete(e)}const $=(P,T="")=>{if(Y3 in P)return P[dv]=T,P;const M=function(){xg(o);const E=Array.from(arguments),A=[],R=[];function F(B){A.push(B)}function _(B){R.push(B)}wa(f,{args:E,name:M[dv],store:C,after:F,onError:_});let N;try{N=P.apply(this&&this.$id===e?this:C,E)}catch(B){throw wa(R,B),B}return N instanceof Promise?N.then(B=>(wa(A,B),B)).catch(B=>(wa(R,B),Promise.reject(B))):(wa(A,N),N)};return M[Y3]=!0,M[dv]=T,M},x={_p:o,$id:e,$onAction:X3.bind(null,f),$patch:y,$reset:b,$subscribe(P,T={}){const M=X3(d,P,T.detached,()=>E()),E=l.run(()=>Se(()=>o.state.value[e],A=>{(T.flush==="sync"?u:c)&&P({storeId:e,type:Ec.direct,events:h},A)},Mi({},s,T)));return M},$dispose:S},C=ft(x);o._s.set(e,C);const w=(o._a&&o._a.runWithContext||Upe)(()=>o._e.run(()=>(l=UO()).run(()=>t({action:$}))));for(const P in w){const T=w[P];if(jt(T)&&!Ype(T)||ii(T))i||(m&&Xpe(T)&&(jt(T)?T.value=m[P]:db(T,m[P])),o.state.value[e][P]=T);else if(typeof T=="function"){const M=$(T,P);w[P]=M,a.actions[P]=T}}return Mi(C,w),Mi(nt(C),w),Object.defineProperty(C,"$state",{get:()=>o.state.value[e],set:P=>{y(T=>{Mi(T,P)})}}),o._p.forEach(P=>{Mi(C,l.run(()=>P({store:C,app:o._a,pinia:o,options:a})))}),m&&i&&n.hydrate&&n.hydrate(C.$state,m),c=!0,u=!0,C}/*! #__NO_SIDE_EFFECTS__ */function Zpe(e,t,n){let o,r;const i=typeof t=="function";o=e,r=i?n:t;function l(a,s){const c=S7();return a=a||(c?Ke(xM,null):null),a&&xg(a),a=CM,a._s.has(o)||(i?OM(o,t,r,a):qpe(o,r,a)),a._s.get(o)}return l.$id=o,l}const Jpe={items_per_page:"/ صفحه",jump_to:"برو به",jump_to_confirm:"تایید",page:"",prev_page:"صفحه قبلی",next_page:"صفحه بعدی",prev_5:"۵ صفحه قبلی",next_5:"۵ صفحه بعدی",prev_3:"۳ صفحه قبلی",next_3:"۳ صفحه بعدی"},Qpe={locale:"fa_IR",today:"امروز",now:"اکنون",backToToday:"بازگشت به روز",ok:"باشه",clear:"پاک کردن",month:"ماه",year:"سال",timeSelect:"انتخاب زمان",dateSelect:"انتخاب تاریخ",monthSelect:"یک ماه را انتخاب کنید",yearSelect:"یک سال را انتخاب کنید",decadeSelect:"یک دهه را انتخاب کنید",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"ماه قبل (PageUp)",nextMonth:"ماه بعد (PageDown)",previousYear:"سال قبل (Control + left)",nextYear:"سال بعد (Control + right)",previousDecade:"دهه قبل",nextDecade:"دهه بعد",previousCentury:"قرن قبل",nextCentury:"قرن بعد"},PM={placeholder:"انتخاب زمان",rangePlaceholder:["زمان شروع","زمان پایان"]},q3={lang:v({placeholder:"انتخاب تاریخ",yearPlaceholder:"انتخاب سال",quarterPlaceholder:"انتخاب فصل",monthPlaceholder:"انتخاب ماه",weekPlaceholder:"انتخاب هفته",rangePlaceholder:["تاریخ شروع","تاریخ پایان"],rangeYearPlaceholder:["سال شروع","سال پایان"],rangeMonthPlaceholder:["ماه شروع","ماه پایان"],rangeWeekPlaceholder:["هفته شروع","هفته پایان"]},Qpe),timePickerLocale:v({},PM)},$o="${label} از نوع ${type} معتبر نیست",ehe={locale:"fa",Pagination:Jpe,DatePicker:q3,TimePicker:PM,Calendar:q3,global:{placeholder:"لطفاً انتخاب کنید"},Table:{filterTitle:"منوی فیلتر",filterConfirm:"تایید",filterReset:"پاک کردن",filterEmptyText:"بدون فیلتر",emptyText:"بدون داده",selectAll:"انتخاب صفحه‌ی کنونی",selectInvert:"معکوس کردن انتخاب‌ها در صفحه ی کنونی",selectNone:"انتخاب هیچکدام",selectionAll:"انتخاب همه داده‌ها",sortTitle:"مرتب سازی",expand:"باز شدن ردیف",collapse:"بستن ردیف",triggerDesc:"ترتیب نزولی",triggerAsc:"ترتیب صعودی",cancelSort:"لغوِ ترتیبِ داده شده"},Modal:{okText:"تایید",cancelText:"لغو",justOkText:"تایید"},Popconfirm:{okText:"تایید",cancelText:"لغو"},Transfer:{titles:["",""],searchPlaceholder:"جستجو",itemUnit:"عدد",itemsUnit:"عدد",remove:"حذف",selectCurrent:"انتخاب صفحه فعلی",removeCurrent:"پاک کردن انتخاب‌های صفحه فعلی",selectAll:"انتخاب همه",removeAll:"پاک کردن همه انتخاب‌ها",selectInvert:"معکوس کردن انتخاب‌ها در صفحه ی کنونی"},Upload:{uploading:"در حال آپلود...",removeFile:"حذف فایل",uploadError:"خطا در آپلود",previewFile:"مشاهده‌ی فایل",downloadFile:"دریافت فایل"},Empty:{description:"داده‌ای موجود نیست"},Icon:{icon:"آیکن"},Text:{edit:"ویرایش",copy:"کپی",copied:"کپی شد",expand:"توسعه"},PageHeader:{back:"برگشت"},Form:{optional:"(اختیاری)",defaultValidateMessages:{default:"خطا در ${label}",required:"فیلد ${label} اجباریست",enum:"${label} باید یکی از [${enum}] باشد",whitespace:"${label} نمیتواند خالی باشد",date:{format:"ساختار تاریخ در ${label} نامعتبر است",parse:"${label} قابل تبدیل به تاریخ نیست",invalid:"${label} تاریخی نا معتبر است"},types:{string:$o,method:$o,array:$o,object:$o,number:$o,date:$o,boolean:$o,integer:$o,float:$o,regexp:$o,email:$o,url:$o,hex:$o},string:{len:"${label} باید ${len} کاراکتر باشد",min:"${label} باید حداقل ${min} کاراکتر باشد",max:"${label} باید حداکثر ${max} کاراکتر باشد",range:"${label} باید بین ${min}-${max} کاراکتر باشد"},number:{len:"${label} باید برابر ${len}",min:"${label} حداقل میتواند ${min} باشد",max:"${label} حداکثر میتواند ${max} باشد",range:"${label} باید بین ${min}-${max} باشد"},array:{len:"تعداد ${label} باید ${len} باشد.",min:"تعداد ${label} حداقل باید ${min} باشد",max:"تعداد ${label} حداکثر باید ${max} باشد",range:"مقدار ${label} باید بین ${min}-${max} باشد"},pattern:{mismatch:"الگوی ${label} با ${pattern} برابری نمی‌کند"}}},Image:{preview:"نمایش"}};var the={exports:{}};(function(e,t){(function(n,o){e.exports=o(aT)})(Si,function(n){function o(l){return l&&typeof l=="object"&&"default"in l?l:{default:l}}var r=o(n),i={name:"fa",weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekStart:6,months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),ordinal:function(l){return l},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"}};return r.default.locale(i,null,!0),i})})(the);const nhe=re({__name:"App",setup(e){un.locale("fa");const t={token:{colorPrimary:"#4f46e5",fontFamily:'IRANSans, "IRANSansWeb(FaNum)", Tahoma, sans-serif',borderRadius:8,colorBgContainer:"#ffffff",colorBgLayout:"#f4f6fa",colorSuccess:"#10b981",colorWarning:"#f59e0b",colorError:"#ef4444",controlHeight:36}};return(n,o)=>{const r=Vt("router-view"),i=Vt("a-config-provider");return yt(),Nn(i,{direction:"rtl",locale:ct(ehe),theme:t},{default:Ot(()=>[p(r)]),_:1},8,["locale"])}}}),ohe=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|Tablet|tablet/i,rhe=1024;function Fu(){if(typeof window>"u")return!1;const e=ohe.test(navigator.userAgent);return window.innerWidth<=rhe||e}const Bp=ie(Fu());let Z3=!1,Ur=null;const qS={login:"m-login",dashboard:"m-dashboard",campaigns:"m-campaigns","campaign-create":"m-campaign-create","campaign-edit":"m-campaign-edit","campaign-prizes":"m-campaign-prizes",users:"m-users","user-detail":"m-user-detail",spins:"m-spins",winners:"m-winners",sms:"m-sms",reports:"m-reports",audit:"m-audit"},IM=Object.fromEntries(Object.entries(qS).map(([e,t])=>[t,e]));function TM(){if(!Ur)return;const e=Fu();Bp.value=e;const t=Ur.currentRoute.value,n=t.path.startsWith("/m")||!!t.meta.mobile,o=String(t.name||"");if(e&&!n){if(o==="login"){Ur.replace({name:"m-login",query:t.query});return}const r=qS[o];r?Ur.replace({name:r,params:t.params,query:t.query}):Ur.replace("/m/dashboard");return}if(!e&&n){if(o==="m-login"){Ur.replace({name:"login",query:t.query});return}const r=IM[o];r?Ur.replace({name:r,params:t.params,query:t.query}):Ur.replace("/dashboard")}}function J3(){const e=Fu();e!==Bp.value&&(Bp.value=e,TM())}function ihe(){Z3||typeof window>"u"||(window.addEventListener("resize",J3),window.addEventListener("orientationchange",J3),Z3=!0)}function lhe(e){Ur=e,Bp.value=Fu(),ihe(),e.isReady().then(()=>TM())}function EM(){return Fu()}const ahe="modulepreload",she=function(e){return"/"+e},Q3={},Lt=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),a=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));r=Promise.allSettled(n.map(s=>{if(s=she(s),s in Q3)return;Q3[s]=!0;const c=s.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":ahe,c||(d.as="script"),d.crossOrigin="",d.href=s,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${s}`)))})}))}function i(l){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=l,window.dispatchEvent(a),!a.defaultPrevented)throw l}return r.then(l=>{for(const a of l||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};/*! + * vue-router v4.6.4 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */const Aa=typeof document<"u";function _M(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function che(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&_M(e.default)}const Et=Object.assign;function fv(e,t){const n={};for(const o in t){const r=t[o];n[o]=pr(r)?r.map(e):e(r)}return n}const _c=()=>{},pr=Array.isArray;function eO(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}const MM=/#/g,uhe=/&/g,dhe=/\//g,fhe=/=/g,phe=/\?/g,AM=/\+/g,hhe=/%5B/g,ghe=/%5D/g,RM=/%5E/g,mhe=/%60/g,DM=/%7B/g,vhe=/%7C/g,NM=/%7D/g,bhe=/%20/g;function ZS(e){return e==null?"":encodeURI(""+e).replace(vhe,"|").replace(hhe,"[").replace(ghe,"]")}function yhe(e){return ZS(e).replace(DM,"{").replace(NM,"}").replace(RM,"^")}function fb(e){return ZS(e).replace(AM,"%2B").replace(bhe,"+").replace(MM,"%23").replace(uhe,"%26").replace(mhe,"`").replace(DM,"{").replace(NM,"}").replace(RM,"^")}function She(e){return fb(e).replace(fhe,"%3D")}function $he(e){return ZS(e).replace(MM,"%23").replace(phe,"%3F")}function Che(e){return $he(e).replace(dhe,"%2F")}function au(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const xhe=/\/$/,whe=e=>e.replace(xhe,"");function pv(e,t,n="/"){let o,r={},i="",l="";const a=t.indexOf("#");let s=t.indexOf("?");return s=a>=0&&s>a?-1:s,s>=0&&(o=t.slice(0,s),i=t.slice(s,a>0?a:t.length),r=e(i.slice(1))),a>=0&&(o=o||t.slice(0,a),l=t.slice(a,t.length)),o=The(o??t,n),{fullPath:o+i+l,path:o,query:r,hash:au(l)}}function Ohe(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function tO(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Phe(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&gs(t.matched[o],n.matched[r])&&BM(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function gs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function BM(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Ihe(e[n],t[n]))return!1;return!0}function Ihe(e,t){return pr(e)?nO(e,t):pr(t)?nO(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function nO(e,t){return pr(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function The(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let i=n.length-1,l,a;for(l=0;l1&&i--;else break;return n.slice(0,i).join("/")+"/"+o.slice(l).join("/")}const Ii={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let pb=function(e){return e.pop="pop",e.push="push",e}({}),hv=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function Ehe(e){if(!e)if(Aa){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),whe(e)}const _he=/^[^#]+#/;function Mhe(e,t){return e.replace(_he,"#")+t}function Ahe(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const wg=()=>({left:window.scrollX,top:window.scrollY});function Rhe(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Ahe(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function oO(e,t){return(history.state?history.state.position-t:-1)+e}const hb=new Map;function Dhe(e,t){hb.set(e,t)}function Nhe(e){const t=hb.get(e);return hb.delete(e),t}function Bhe(e){return typeof e=="string"||e&&typeof e=="object"}function LM(e){return typeof e=="string"||typeof e=="symbol"}let Gt=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const kM=Symbol("");Gt.MATCHER_NOT_FOUND+"",Gt.NAVIGATION_GUARD_REDIRECT+"",Gt.NAVIGATION_ABORTED+"",Gt.NAVIGATION_CANCELLED+"",Gt.NAVIGATION_DUPLICATED+"";function ms(e,t){return Et(new Error,{type:e,[kM]:!0},t)}function Wr(e,t){return e instanceof Error&&kM in e&&(t==null||!!(e.type&t))}const Lhe=["params","query","hash"];function khe(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Lhe)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Fhe(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;or&&fb(r)):[o&&fb(o)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function zhe(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=pr(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const Hhe=Symbol(""),iO=Symbol(""),Og=Symbol(""),JS=Symbol(""),gb=Symbol("");function Xs(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Di(e,t,n,o,r,i=l=>l()){const l=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((a,s)=>{const c=f=>{f===!1?s(ms(Gt.NAVIGATION_ABORTED,{from:n,to:t})):f instanceof Error?s(f):Bhe(f)?s(ms(Gt.NAVIGATION_GUARD_REDIRECT,{from:t,to:f})):(l&&o.enterCallbacks[r]===l&&typeof f=="function"&&l.push(f),a())},u=i(()=>e.call(o&&o.instances[r],t,n,c));let d=Promise.resolve(u);e.length<3&&(d=d.then(c)),d.catch(f=>s(f))})}function gv(e,t,n,o,r=i=>i()){const i=[];for(const l of e)for(const a in l.components){let s=l.components[a];if(!(t!=="beforeRouteEnter"&&!l.instances[a]))if(_M(s)){const c=(s.__vccOpts||s)[t];c&&i.push(Di(c,n,o,l,a,r))}else{let c=s();i.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${l.path}"`);const d=che(u)?u.default:u;l.mods[a]=u,l.components[a]=d;const f=(d.__vccOpts||d)[t];return f&&Di(f,n,o,l,a,r)()}))}}return i}function jhe(e,t){const n=[],o=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let l=0;lgs(c,a))?o.push(a):n.push(a));const s=e.matched[l];s&&(t.matched.find(c=>gs(c,s))||r.push(s))}return[n,o,r]}/*! + * vue-router v4.6.4 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */let Vhe=()=>location.protocol+"//"+location.host;function FM(e,t){const{pathname:n,search:o,hash:r}=t,i=e.indexOf("#");if(i>-1){let l=r.includes(e.slice(i))?e.slice(i).length:1,a=r.slice(l);return a[0]!=="/"&&(a="/"+a),tO(a,"")}return tO(n,e)+o+r}function Whe(e,t,n,o){let r=[],i=[],l=null;const a=({state:f})=>{const h=FM(e,location),m=n.value,g=t.value;let y=0;if(f){if(n.value=h,t.value=f,l&&l===m){l=null;return}y=g?f.position-g.position:0}else o(h);r.forEach(b=>{b(n.value,m,{delta:y,type:pb.pop,direction:y?y>0?hv.forward:hv.back:hv.unknown})})};function s(){l=n.value}function c(f){r.push(f);const h=()=>{const m=r.indexOf(f);m>-1&&r.splice(m,1)};return i.push(h),h}function u(){if(document.visibilityState==="hidden"){const{history:f}=window;if(!f.state)return;f.replaceState(Et({},f.state,{scroll:wg()}),"")}}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:s,listen:c,destroy:d}}function lO(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?wg():null}}function Khe(e){const{history:t,location:n}=window,o={value:FM(e,n)},r={value:t.state};r.value||i(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(s,c,u){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+s:Vhe()+e+s;try{t[u?"replaceState":"pushState"](c,"",f),r.value=c}catch(h){console.error(h),n[u?"replace":"assign"](f)}}function l(s,c){i(s,Et({},t.state,lO(r.value.back,s,r.value.forward,!0),c,{position:r.value.position}),!0),o.value=s}function a(s,c){const u=Et({},r.value,t.state,{forward:s,scroll:wg()});i(u.current,u,!0),i(s,Et({},lO(o.value,s,null),{position:u.position+1},c),!1),o.value=s}return{location:o,state:r,push:a,replace:l}}function Uhe(e){e=Ehe(e);const t=Khe(e),n=Whe(e,t.state,t.location,t.replace);function o(i,l=!0){l||n.pauseListeners(),history.go(i)}const r=Et({location:"",base:e,go:o,createHref:Mhe.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let _l=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var gn=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(gn||{});const Ghe={type:_l.Static,value:""},Xhe=/[a-zA-Z0-9_]/;function Yhe(e){if(!e)return[[]];if(e==="/")return[[Ghe]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${c}": ${h}`)}let n=gn.Static,o=n;const r=[];let i;function l(){i&&r.push(i),i=[]}let a=0,s,c="",u="";function d(){c&&(n===gn.Static?i.push({type:_l.Static,value:c}):n===gn.Param||n===gn.ParamRegExp||n===gn.ParamRegExpEnd?(i.length>1&&(s==="*"||s==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:_l.Param,value:c,regexp:u,repeatable:s==="*"||s==="+",optional:s==="*"||s==="?"})):t("Invalid state to consume buffer"),c="")}function f(){c+=s}for(;at.length?t.length===1&&t[0]===qn.Static+qn.Segment?1:-1:0}function zM(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const ege={strict:!1,end:!0,sensitive:!1};function tge(e,t,n){const o=Jhe(Yhe(e.path),n),r=Et(o,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function nge(e,t){const n=[],o=new Map;t=eO(ege,t);function r(d){return o.get(d)}function i(d,f,h){const m=!h,g=uO(d);g.aliasOf=h&&h.record;const y=eO(t,d),b=[g];if("alias"in d){const x=typeof d.alias=="string"?[d.alias]:d.alias;for(const C of x)b.push(uO(Et({},g,{components:h?h.record.components:g.components,path:C,aliasOf:h?h.record:g})))}let S,$;for(const x of b){const{path:C}=x;if(f&&C[0]!=="/"){const O=f.record.path,w=O[O.length-1]==="/"?"":"/";x.path=f.record.path+(C&&w+C)}if(S=tge(x,f,y),h?h.alias.push(S):($=$||S,$!==S&&$.alias.push(S),m&&d.name&&!dO(S)&&l(d.name)),HM(S)&&s(S),g.children){const O=g.children;for(let w=0;w{l($)}:_c}function l(d){if(LM(d)){const f=o.get(d);f&&(o.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(l),f.alias.forEach(l))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&o.delete(d.record.name),d.children.forEach(l),d.alias.forEach(l))}}function a(){return n}function s(d){const f=ige(d,n);n.splice(f,0,d),d.record.name&&!dO(d)&&o.set(d.record.name,d)}function c(d,f){let h,m={},g,y;if("name"in d&&d.name){if(h=o.get(d.name),!h)throw ms(Gt.MATCHER_NOT_FOUND,{location:d});y=h.record.name,m=Et(cO(f.params,h.keys.filter($=>!$.optional).concat(h.parent?h.parent.keys.filter($=>$.optional):[]).map($=>$.name)),d.params&&cO(d.params,h.keys.map($=>$.name))),g=h.stringify(m)}else if(d.path!=null)g=d.path,h=n.find($=>$.re.test(g)),h&&(m=h.parse(g),y=h.record.name);else{if(h=f.name?o.get(f.name):n.find($=>$.re.test(f.path)),!h)throw ms(Gt.MATCHER_NOT_FOUND,{location:d,currentLocation:f});y=h.record.name,m=Et({},f.params,d.params),g=h.stringify(m)}const b=[];let S=h;for(;S;)b.unshift(S.record),S=S.parent;return{name:y,path:g,params:m,matched:b,meta:rge(b)}}e.forEach(d=>i(d));function u(){n.length=0,o.clear()}return{addRoute:i,resolve:c,removeRoute:l,clearRoutes:u,getRoutes:a,getRecordMatcher:r}}function cO(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function uO(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:oge(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function oge(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function dO(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function rge(e){return e.reduce((t,n)=>Et(t,n.meta),{})}function ige(e,t){let n=0,o=t.length;for(;n!==o;){const i=n+o>>1;zM(e,t[i])<0?o=i:n=i+1}const r=lge(e);return r&&(o=t.lastIndexOf(r,o-1)),o}function lge(e){let t=e;for(;t=t.parent;)if(HM(t)&&zM(e,t)===0)return t}function HM({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function fO(e){const t=Ke(Og),n=Ke(JS),o=I(()=>{const s=ct(e.to);return t.resolve(s)}),r=I(()=>{const{matched:s}=o.value,{length:c}=s,u=s[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(gs.bind(null,u));if(f>-1)return f;const h=pO(s[c-2]);return c>1&&pO(u)===h&&d[d.length-1].path!==h?d.findIndex(gs.bind(null,s[c-2])):f}),i=I(()=>r.value>-1&&dge(n.params,o.value.params)),l=I(()=>r.value>-1&&r.value===n.matched.length-1&&BM(n.params,o.value.params));function a(s={}){if(uge(s)){const c=t[ct(e.replace)?"replace":"push"](ct(e.to)).catch(_c);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:o,href:I(()=>o.value.href),isActive:i,isExactActive:l,navigate:a}}function age(e){return e.length===1?e[0]:e}const sge=re({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:fO,setup(e,{slots:t}){const n=ft(fO(e)),{options:o}=Ke(Og),r=I(()=>({[hO(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[hO(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&age(t.default(n));return e.custom?i:di("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),cge=sge;function uge(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function dge(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!pr(r)||r.length!==o.length||o.some((i,l)=>i.valueOf()!==r[l].valueOf()))return!1}return!0}function pO(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const hO=(e,t,n)=>e??t??n,fge=re({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=Ke(gb),r=I(()=>e.route||o.value),i=Ke(iO,0),l=I(()=>{let c=ct(i);const{matched:u}=r.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=I(()=>r.value.matched[l.value]);qe(iO,I(()=>l.value+1)),qe(Hhe,a),qe(gb,r);const s=ie();return Se(()=>[s.value,a.value,e.name],([c,u,d],[f,h,m])=>{u&&(u.instances[d]=c,h&&h!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),c&&u&&(!h||!gs(u,h)||!f)&&(u.enterCallbacks[d]||[]).forEach(g=>g(c))},{flush:"post"}),()=>{const c=r.value,u=e.name,d=a.value,f=d&&d.components[u];if(!f)return gO(n.default,{Component:f,route:c});const h=d.props[u],m=h?h===!0?c.params:typeof h=="function"?h(c):h:null,y=di(f,Et({},m,t,{onVnodeUnmounted:b=>{b.component.isUnmounted&&(d.instances[u]=null)},ref:s}));return gO(n.default,{Component:y,route:c})||y}}});function gO(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const pge=fge;function hge(e){const t=nge(e.routes,e),n=e.parseQuery||Fhe,o=e.stringifyQuery||rO,r=e.history,i=Xs(),l=Xs(),a=Xs(),s=oe(Ii);let c=Ii;Aa&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=fv.bind(null,U=>""+U),d=fv.bind(null,Che),f=fv.bind(null,au);function h(U,Q){let J,X;return LM(U)?(J=t.getRecordMatcher(U),X=Q):X=U,t.addRoute(X,J)}function m(U){const Q=t.getRecordMatcher(U);Q&&t.removeRoute(Q)}function g(){return t.getRoutes().map(U=>U.record)}function y(U){return!!t.getRecordMatcher(U)}function b(U,Q){if(Q=Et({},Q||s.value),typeof U=="string"){const ee=pv(n,U,Q.path),ue=t.resolve({path:ee.path},Q),ae=r.createHref(ee.fullPath);return Et(ee,ue,{params:f(ue.params),hash:au(ee.hash),redirectedFrom:void 0,href:ae})}let J;if(U.path!=null)J=Et({},U,{path:pv(n,U.path,Q.path).path});else{const ee=Et({},U.params);for(const ue in ee)ee[ue]==null&&delete ee[ue];J=Et({},U,{params:d(ee)}),Q.params=d(Q.params)}const X=t.resolve(J,Q),q=U.hash||"";X.params=u(f(X.params));const V=Ohe(o,Et({},U,{hash:yhe(q),path:X.path})),K=r.createHref(V);return Et({fullPath:V,hash:q,query:o===rO?zhe(U.query):U.query||{}},X,{redirectedFrom:void 0,href:K})}function S(U){return typeof U=="string"?pv(n,U,s.value.path):Et({},U)}function $(U,Q){if(c!==U)return ms(Gt.NAVIGATION_CANCELLED,{from:Q,to:U})}function x(U){return w(U)}function C(U){return x(Et(S(U),{replace:!0}))}function O(U,Q){const J=U.matched[U.matched.length-1];if(J&&J.redirect){const{redirect:X}=J;let q=typeof X=="function"?X(U,Q):X;return typeof q=="string"&&(q=q.includes("?")||q.includes("#")?q=S(q):{path:q},q.params={}),Et({query:U.query,hash:U.hash,params:q.path!=null?{}:U.params},q)}}function w(U,Q){const J=c=b(U),X=s.value,q=U.state,V=U.force,K=U.replace===!0,ee=O(J,X);if(ee)return w(Et(S(ee),{state:typeof ee=="object"?Et({},q,ee.state):q,force:V,replace:K}),Q||J);const ue=J;ue.redirectedFrom=Q;let ae;return!V&&Phe(o,X,J)&&(ae=ms(Gt.NAVIGATION_DUPLICATED,{to:ue,from:X}),H(X,X,!0,!1)),(ae?Promise.resolve(ae):M(ue,X)).catch(le=>Wr(le)?Wr(le,Gt.NAVIGATION_GUARD_REDIRECT)?le:z(le):L(le,ue,X)).then(le=>{if(le){if(Wr(le,Gt.NAVIGATION_GUARD_REDIRECT))return w(Et({replace:K},S(le.to),{state:typeof le.to=="object"?Et({},q,le.to.state):q,force:V}),Q||ue)}else le=A(ue,X,!0,K,q);return E(ue,X,le),le})}function P(U,Q){const J=$(U,Q);return J?Promise.reject(J):Promise.resolve()}function T(U){const Q=Z.values().next().value;return Q&&typeof Q.runWithContext=="function"?Q.runWithContext(U):U()}function M(U,Q){let J;const[X,q,V]=jhe(U,Q);J=gv(X.reverse(),"beforeRouteLeave",U,Q);for(const ee of X)ee.leaveGuards.forEach(ue=>{J.push(Di(ue,U,Q))});const K=P.bind(null,U,Q);return J.push(K),te(J).then(()=>{J=[];for(const ee of i.list())J.push(Di(ee,U,Q));return J.push(K),te(J)}).then(()=>{J=gv(q,"beforeRouteUpdate",U,Q);for(const ee of q)ee.updateGuards.forEach(ue=>{J.push(Di(ue,U,Q))});return J.push(K),te(J)}).then(()=>{J=[];for(const ee of V)if(ee.beforeEnter)if(pr(ee.beforeEnter))for(const ue of ee.beforeEnter)J.push(Di(ue,U,Q));else J.push(Di(ee.beforeEnter,U,Q));return J.push(K),te(J)}).then(()=>(U.matched.forEach(ee=>ee.enterCallbacks={}),J=gv(V,"beforeRouteEnter",U,Q,T),J.push(K),te(J))).then(()=>{J=[];for(const ee of l.list())J.push(Di(ee,U,Q));return J.push(K),te(J)}).catch(ee=>Wr(ee,Gt.NAVIGATION_CANCELLED)?ee:Promise.reject(ee))}function E(U,Q,J){a.list().forEach(X=>T(()=>X(U,Q,J)))}function A(U,Q,J,X,q){const V=$(U,Q);if(V)return V;const K=Q===Ii,ee=Aa?history.state:{};J&&(X||K?r.replace(U.fullPath,Et({scroll:K&&ee&&ee.scroll},q)):r.push(U.fullPath,q)),s.value=U,H(U,Q,J,K),z()}let R;function F(){R||(R=r.listen((U,Q,J)=>{if(!G.listening)return;const X=b(U),q=O(X,G.currentRoute.value);if(q){w(Et(q,{replace:!0,force:!0}),X).catch(_c);return}c=X;const V=s.value;Aa&&Dhe(oO(V.fullPath,J.delta),wg()),M(X,V).catch(K=>Wr(K,Gt.NAVIGATION_ABORTED|Gt.NAVIGATION_CANCELLED)?K:Wr(K,Gt.NAVIGATION_GUARD_REDIRECT)?(w(Et(S(K.to),{force:!0}),X).then(ee=>{Wr(ee,Gt.NAVIGATION_ABORTED|Gt.NAVIGATION_DUPLICATED)&&!J.delta&&J.type===pb.pop&&r.go(-1,!1)}).catch(_c),Promise.reject()):(J.delta&&r.go(-J.delta,!1),L(K,X,V))).then(K=>{K=K||A(X,V,!1),K&&(J.delta&&!Wr(K,Gt.NAVIGATION_CANCELLED)?r.go(-J.delta,!1):J.type===pb.pop&&Wr(K,Gt.NAVIGATION_ABORTED|Gt.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),E(X,V,K)}).catch(_c)}))}let _=Xs(),N=Xs(),B;function L(U,Q,J){z(U);const X=N.list();return X.length?X.forEach(q=>q(U,Q,J)):console.error(U),Promise.reject(U)}function k(){return B&&s.value!==Ii?Promise.resolve():new Promise((U,Q)=>{_.add([U,Q])})}function z(U){return B||(B=!U,F(),_.list().forEach(([Q,J])=>U?J(U):Q()),_.reset()),U}function H(U,Q,J,X){const{scrollBehavior:q}=e;if(!Aa||!q)return Promise.resolve();const V=!J&&Nhe(oO(U.fullPath,0))||(X||!J)&&history.state&&history.state.scroll||null;return lt().then(()=>q(U,Q,V)).then(K=>K&&Rhe(K)).catch(K=>L(K,U,Q))}const j=U=>r.go(U);let Y;const Z=new Set,G={currentRoute:s,listening:!0,addRoute:h,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:y,getRoutes:g,resolve:b,options:e,push:x,replace:C,go:j,back:()=>j(-1),forward:()=>j(1),beforeEach:i.add,beforeResolve:l.add,afterEach:a.add,onError:N.add,isReady:k,install(U){U.component("RouterLink",cge),U.component("RouterView",pge),U.config.globalProperties.$router=G,Object.defineProperty(U.config.globalProperties,"$route",{enumerable:!0,get:()=>ct(s)}),Aa&&!Y&&s.value===Ii&&(Y=!0,x(r.location).catch(X=>{}));const Q={};for(const X in Ii)Object.defineProperty(Q,X,{get:()=>s.value[X],enumerable:!0});U.provide(Og,G),U.provide(JS,sP(Q)),U.provide(gb,s);const J=U.unmount;Z.add(U),U.unmount=function(){Z.delete(U),Z.size<1&&(c=Ii,R&&R(),R=null,s.value=Ii,Y=!1,B=!1),J()}}};function te(U){return U.reduce((Q,J)=>Q.then(()=>T(J)),Promise.resolve())}return G}function QS(){return Ke(Og)}function e$(e){return Ke(JS)}function jM(e,t){return function(){return e.apply(t,arguments)}}const{toString:gge}=Object.prototype,{getPrototypeOf:Zi}=Object,{iterator:zu,toStringTag:VM}=Symbol,su=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),WM=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),KM=(e,t,n)=>e===Object.prototype||!n&&t===null,mge=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(WM(n))return!1;const o=Object.getOwnPropertyDescriptor(e,n);return!!o&&o.configurable&&o.writable===!0})},cu=(e,t)=>{let n=e;const o=[];for(;n!=null;){if(o.indexOf(n)!==-1)return!1;o.push(n);const r=Zi(n);if(KM(n,r,n===e))return!1;if(su(n,t))return!0;n=r}return!1},vge=(e,t)=>e!=null&&cu(e,t)?e[t]:void 0,bge=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=Zi(e);if(t===null&&mge(e))return e;const n=Object.create(null),o=Object.create(null),r=[];let i=e;for(;i!=null&&r.indexOf(i)===-1;){r.push(i);const l=i===e?t:Zi(i);if(KM(i,l,i===e))break;const a=Object.getOwnPropertyNames(i);Object.getOwnPropertySymbols&&a.push(...Object.getOwnPropertySymbols(i));for(const s of a)WM(s)||su(o,s)||(n[s]=e[s],o[s]=!0);i=l}return n},t$=(e=>t=>{const n=gge.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Jo=e=>(e=e.toLowerCase(),t=>t$(t)===e),Pg=e=>t=>typeof t===e,{isArray:Ql}=Array,ea=Pg("undefined");function Ds(e){return e!==null&&!ea(e)&&e.constructor!==null&&!ea(e.constructor)&&go(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const UM=Jo("ArrayBuffer");function yge(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&UM(e.buffer),t}const Sge=Pg("string"),go=Pg("function"),GM=Pg("number"),Ns=e=>e!==null&&typeof e=="object",$ge=e=>e===!0||e===!1,Sf=e=>{if(!Ns(e))return!1;const t=Zi(e);return(t===null||t===Object.prototype||Zi(t)===null)&&!cu(e,VM)&&!cu(e,zu)},Cge=e=>{if(!Ns(e)||Ds(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},xge=Jo("Date"),wge=Jo("File"),Oge=e=>!!(e&&typeof e.uri<"u"),Pge=e=>e&&typeof e.getParts<"u",Ige=Jo("Blob"),Tge=Jo("FileList"),Ege=Jo("Set"),_ge=e=>Ns(e)&&go(e.pipe);function Mge(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const mO=Mge(),vO=typeof mO.FormData<"u"?mO.FormData:void 0,Age=e=>{if(!e)return!1;if(vO&&e instanceof vO)return!0;const t=Zi(e);if(!t||t===Object.prototype||!go(e.append))return!1;const n=t$(e);return n==="formdata"||n==="object"&&go(e.toString)&&e.toString()==="[object FormData]"},Rge=Jo("URLSearchParams"),[Dge,Nge,Bge,Lge]=["ReadableStream","Request","Response","Headers"].map(Jo),kge=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Hu(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,r;if(typeof e!="object"&&(e=[e]),Ql(e))for(o=0,r=e.length;o0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Ml=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,YM=e=>!ea(e)&&e!==Ml;function mb(...e){const{caseless:t,skipUndefined:n}=YM(this)&&this||{},o={},r=(i,l)=>{if(l==="__proto__"||l==="constructor"||l==="prototype")return;const a=t&&typeof l=="string"&&XM(o,l)||l,s=su(o,a)?o[a]:void 0;Sf(s)&&Sf(i)?o[a]=mb(s,i):Sf(i)?o[a]=mb({},i):Ql(i)?o[a]=i.slice():(!n||!ea(i))&&(o[a]=i)};for(let i=0,l=e.length;i(Hu(t,(r,i)=>{n&&go(r)?Object.defineProperty(e,i,{__proto__:null,value:jM(r,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),e),zge=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Hge=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},jge=(e,t,n,o)=>{let r,i,l;const a={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),i=r.length;i-- >0;)l=r[i],(!o||o(l,e,t))&&!a[l]&&(t[l]=e[l],a[l]=!0);e=n!==!1&&Zi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Vge=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},Wge=e=>{if(!e)return null;if(Ql(e))return e;let t=e.length;if(!GM(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Kge=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Zi(Uint8Array)),Uge=(e,t)=>{const o=(e&&e[zu]).call(e);let r;for(;(r=o.next())&&!r.done;){const i=r.value;t.call(e,i[0],i[1])}},Gge=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},Xge=Jo("HTMLFormElement"),Yge=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),{propertyIsEnumerable:qge}=Object.prototype,Zge=Jo("RegExp"),qM=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};Hu(n,(r,i)=>{let l;(l=t(r,i,e))!==!1&&(o[i]=l||r)}),Object.defineProperties(e,o)},Jge=e=>{qM(e,(t,n)=>{if(go(e)&&["arguments","caller","callee"].includes(n))return!1;const o=e[n];if(go(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Qge=(e,t)=>{const n={},o=r=>{r.forEach(i=>{n[i]=!0})};return Ql(e)?o(e):o(String(e).split(t)),n},eme=()=>{},tme=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function nme(e){return!!(e&&go(e.append)&&e[VM]==="FormData"&&e[zu])}const ome=e=>{const t=new WeakSet,n=o=>{if(Ns(o)){if(t.has(o))return;if(Ds(o))return o;if(!("toJSON"in o)){t.add(o);let r;if(Ege(o)){r=[];for(const i of o){const l=n(i);!ea(l)&&r.push(l)}}else r=Ql(o)?[]:{},Hu(o,(i,l)=>{const a=n(i);!ea(a)&&(r[l]=a)});return t.delete(o),r}}return o};return n(e)},rme=Jo("AsyncFunction"),ime=e=>e&&(Ns(e)||go(e))&&go(e.then)&&go(e.catch),ZM=((e,t)=>e?setImmediate:t?((n,o)=>(Ml.addEventListener("message",({source:r,data:i})=>{r===Ml&&i===n&&o.length&&o.shift()()},!1),r=>{o.push(r),Ml.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",go(Ml.postMessage)),lme=typeof queueMicrotask<"u"?queueMicrotask.bind(Ml):typeof process<"u"&&process.nextTick||ZM,JM=e=>e!=null&&go(e[zu]),ame=e=>e!=null&&cu(e,zu)&&JM(e),me={isArray:Ql,isArrayBuffer:UM,isBuffer:Ds,isFormData:Age,isArrayBufferView:yge,isString:Sge,isNumber:GM,isBoolean:$ge,isObject:Ns,isPlainObject:Sf,isEmptyObject:Cge,isReadableStream:Dge,isRequest:Nge,isResponse:Bge,isHeaders:Lge,isUndefined:ea,isDate:xge,isFile:wge,isReactNativeBlob:Oge,isReactNative:Pge,isBlob:Ige,isRegExp:Zge,isFunction:go,isStream:_ge,isURLSearchParams:Rge,isTypedArray:Kge,isFileList:Tge,forEach:Hu,merge:mb,extend:Fge,trim:kge,stripBOM:zge,inherits:Hge,toFlatObject:jge,kindOf:t$,kindOfTest:Jo,endsWith:Vge,toArray:Wge,forEachEntry:Uge,matchAll:Gge,isHTMLForm:Xge,hasOwnProperty:su,hasOwnProp:su,hasOwnInPrototypeChain:cu,getSafeProp:vge,toSafeFlatObject:bge,reduceDescriptors:qM,freezeMethods:Jge,toObjectSet:Qge,toCamelCase:Yge,noop:eme,toFiniteNumber:tme,findKey:XM,global:Ml,isContextDefined:YM,isSpecCompliantForm:nme,toJSONObject:ome,isAsyncFn:rme,isThenable:ime,setImmediate:ZM,asap:lme,isIterable:JM,isSafeIterable:ame},sme=me.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),cme=e=>{const t={};let n,o,r;return e&&e.split(` +`).forEach(function(l){r=l.indexOf(":"),n=l.substring(0,r).trim().toLowerCase(),o=l.substring(r+1).trim();const a=me.hasOwnProp(t,n);!n||a&&me.hasOwnProp(sme,n)||(n==="set-cookie"?a?t[n].push(o):t[n]=[o]:t[n]=a?t[n]+", "+o:o)}),t};function ume(e){let t=0,n=e.length;for(;tt;){const o=e.charCodeAt(n-1);if(o!==9&&o!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const dme=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),fme=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function n$(e,t){return me.isArray(e)?e.map(n=>n$(n,t)):ume(String(e).replace(t,""))}const pme=e=>n$(e,dme),hme=e=>n$(e,fme);function QM(e){const t=Object.create(null);return me.forEach(e.toJSON(),(n,o)=>{t[o]=hme(n)}),t}const bO=Symbol("internals");function Ys(e){return e&&String(e).trim().toLowerCase()}function $f(e){return e===!1||e==null?e:me.isArray(e)?e.map($f):pme(String(e))}function gme(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}const mme=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function mv(e){let t=0,n=e.length;for(;tt;){const o=e.charCodeAt(n-1);if(o!==9&&o!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function vme(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let o=1;o=t))return e;n+=e[o]}return n}function bme(e){const t=Object.create(null),n=String(e);let o=0,r=!1,i=!1;function l(a){const s=mv(n.slice(o,a)),c=s.indexOf("=");if(c<1)return;const u=mv(s.slice(0,c));if(!mme.test(u))return;const d=u.toLowerCase();if(d==="__proto__"||d==="constructor"||d==="prototype")return;const f=mv(s.slice(c+1));t[d]=vme(f)}for(let a=0;a/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function vv(e,t,n,o,r){if(me.isFunction(o))return o.call(this,t,n);if(r&&(t=n),!!me.isString(t)){if(me.isString(o))return t.indexOf(o)!==-1;if(me.isRegExp(o))return o.test(t)}}function Sme(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function $me(e,t){const n=me.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{__proto__:null,value:function(r,i,l){return this[o].call(this,t,r,i,l)},configurable:!0})})}let zn=class{constructor(t){t&&this.set(t)}set(t,n,o){const r=this;function i(a,s,c){const u=Ys(s);if(!u)return;const d=me.findKey(r,u);(!d||r[d]===void 0||c===!0||c===void 0&&r[d]!==!1)&&(r[d||s]=$f(a))}const l=(a,s)=>me.forEach(a,(c,u)=>i(c,u,s));if(me.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(me.isString(t)&&(t=t.trim())&&!yme(t))l(cme(t),n);else if(me.isObject(t)&&me.isSafeIterable(t)){let a=Object.create(null),s,c;for(const u of t){if(!me.isArray(u))throw new TypeError("Object iterator must return a key-value pair");c=u[0],me.hasOwnProp(a,c)?(s=a[c],a[c]=me.isArray(s)?[...s,u[1]]:[s,u[1]]):a[c]=u[1]}l(a,n)}else t!=null&&i(n,t,o);return this}get(t,n){if(t=Ys(t),t){const o=me.findKey(this,t);if(o){const r=this[o];if(!n)return r;if(n===!0)return gme(r);if(me.isFunction(n))return n.call(this,r,o);if(me.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ys(t),t){const o=me.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||vv(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let r=!1;function i(l){if(l=Ys(l),l){const a=me.findKey(o,l);a&&(!n||vv(o,o[a],a,n))&&(delete o[a],r=!0)}}return me.isArray(t)?t.forEach(i):i(t),r}clear(t){const n=Object.keys(this);let o=n.length,r=!1;for(;o--;){const i=n[o];(!t||vv(this,this[i],i,t,!0))&&(delete this[i],r=!0)}return r}normalize(t){const n=this,o={};return me.forEach(this,(r,i)=>{const l=me.findKey(o,i);if(l){n[l]=$f(r),delete n[i];return}const a=t?Sme(i):String(i).trim();a!==i&&delete n[i],n[a]=$f(r),o[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return me.forEach(this,(o,r)=>{o!=null&&o!==!1&&(n[r]=t&&me.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}getSetCookie(){const t=this.get("set-cookie");return me.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return bme(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[bO]=this[bO]={accessors:{}}).accessors,r=this.prototype;function i(l){const a=Ys(l);o[a]||($me(r,l),o[a]=!0)}return me.isArray(t)?t.forEach(i):i(t),this}};zn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);me.reduceDescriptors(zn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});me.freezeMethods(zn);const Lp="[REDACTED ****]";function Cme(e){if(me.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(me.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function xme(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),o=[],r=i=>{if(i===null||typeof i!="object"||me.isBuffer(i))return i;if(o.indexOf(i)!==-1)return;i instanceof zn&&(i=i.toJSON()),o.push(i);let l;if(me.isArray(i))l=[],i.forEach((a,s)=>{const c=r(a);me.isUndefined(c)||(l[s]=c)});else{if(!me.isPlainObject(i)&&Cme(i))return o.pop(),i;l=Object.create(null);for(const[a,s]of Object.entries(i)){const c=n.has(a.toLowerCase())?Lp:r(s);me.isUndefined(c)||(l[a]=c)}}return o.pop(),l};return r(e)}function yO(e){try{return String(e)}catch{return""}}function wme(e){return e.errors.map(n=>{try{return n&&n.message?yO(n.message):yO(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let Le=class eA extends Error{static from(t,n,o,r,i,l){let a=t.message;!a&&me.isArray(t.errors)&&t.errors.length&&(a=wme(t));const s=new eA(a,n||t.code,o,r,i);return Object.defineProperty(s,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),l&&Object.assign(s,l),s}constructor(t,n,o,r,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),o&&(this.config=o),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,n=t&&me.hasOwnProp(t,"redact")?t.redact:void 0,o=me.isArray(n)&&n.length>0?xme(t,n):me.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};Le.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Le.ERR_BAD_OPTION="ERR_BAD_OPTION";Le.ECONNABORTED="ECONNABORTED";Le.ETIMEDOUT="ETIMEDOUT";Le.ECONNREFUSED="ECONNREFUSED";Le.ERR_NETWORK="ERR_NETWORK";Le.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Le.ERR_DEPRECATED="ERR_DEPRECATED";Le.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Le.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Le.ERR_CANCELED="ERR_CANCELED";Le.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Le.ERR_INVALID_URL="ERR_INVALID_URL";Le.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Ome=null,tA=100;function vb(e){return me.isPlainObject(e)||me.isArray(e)}function nA(e){return me.endsWith(e,"[]")?e.slice(0,-2):e}function bv(e,t,n){return e?e.concat(t).map(function(r,i){return r=nA(r),!n&&i?"["+r+"]":r}).join(n?".":""):t}function Pme(e){return me.isArray(e)&&!e.some(vb)}const Ime=me.toFlatObject(me,{},null,function(t){return/^is[A-Z]/.test(t)});function Ig(e,t,n){if(!me.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const o=(S,$)=>{const x=me.getSafeProp(n,S);return me.isUndefined(x)?$:x},r=o("metaTokens",!0),i=o("visitor")||g,l=o("dots",!1),a=o("indexes",!1),s=o("Blob")||typeof Blob<"u"&&Blob,c=o("maxDepth",tA),u=s&&me.isSpecCompliantForm(t),d=[];if(!me.isFunction(i))throw new TypeError("visitor must be a function");function f(S){if(S===null)return"";if(me.isDate(S))return S.toISOString();if(me.isBoolean(S))return S.toString();if(!u&&me.isBlob(S))throw new Le("Blob is not supported. Use a Buffer instead.");if(me.isArrayBuffer(S)||me.isTypedArray(S)){if(u&&typeof s=="function")return new s([S]);throw new Le("Blob is not supported. Use a Buffer instead.",Le.ERR_NOT_SUPPORT)}return S}function h(S){if(S>c)throw new Le("Object is too deeply nested ("+S+" levels). Max depth: "+c,Le.ERR_FORM_DATA_DEPTH_EXCEEDED)}function m(S,$){if(c===1/0)return JSON.stringify(S);const x=[];return JSON.stringify(S,function(O,w){if(!me.isObject(w))return w;for(;x.length&&x[x.length-1]!==this;)x.pop();return x.push(w),h($+x.length-1),w})}function g(S,$,x){let C=S;if(me.isReactNative(t)&&me.isReactNativeBlob(S))return t.append(bv(x,$,l),f(S)),!1;if(S&&!x&&typeof S=="object"){if(me.endsWith($,"{}"))$=r?$:$.slice(0,-2),S=m(S,1);else if(me.isArray(S)&&Pme(S)||(me.isFileList(S)||me.endsWith($,"[]"))&&(C=me.toArray(S)))return $=nA($),C.forEach(function(w,P){!(me.isUndefined(w)||w===null)&&t.append(a===!0?bv([$],P,l):a===null?$:$+"[]",f(w))}),!1}return vb(S)?!0:(t.append(bv(x,$,l),f(S)),!1)}const y=Object.assign(Ime,{defaultVisitor:g,convertValue:f,isVisitable:vb});function b(S,$,x=0){if(!me.isUndefined(S)){if(h(x),d.indexOf(S)!==-1)throw new Error("Circular reference detected in "+$.join("."));d.push(S),me.forEach(S,function(O,w){(!(me.isUndefined(O)||O===null)&&i.call(t,O,me.isString(w)?w.trim():w,$,y))===!0&&b(O,$?$.concat(w):[w],x+1)}),d.pop()}}if(!me.isObject(e))throw new TypeError("data must be an object");return b(e),t}function SO(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(o){return t[o]})}function o$(e,t){this._pairs=[],e&&Ig(e,this,t)}const oA=o$.prototype;oA.append=function(t,n){this._pairs.push([t,n])};oA.toString=function(t){const n=t?o=>t.call(this,o,SO):SO;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function Tme(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function rA(e,t,n){if(!t)return e;e=e||"";const o=me.isFunction(n)?{serialize:n}:n,r=me.getSafeProp(o,"encode")||Tme,i=me.getSafeProp(o,"serialize");let l;if(i?l=i(t,o):l=me.isURLSearchParams(t)?t.toString():new o$(t,o).toString(r),l){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}const qs=Symbol("internals");function iA(e){return e?e.length:0}function $O(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function Zs(e,t){const n=e.handlers,o=iA(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):o!==t.handlersLength&&(o?t.handlerEntries.forEach(function(i,l){n[i.index]!==i.handler&&t.handlerEntries.delete(l)}):t.handlerEntries.clear()),t.handlersLength=o}class CO{constructor(){this.handlers=[],this[qs]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,n,o){const r={fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null},i=this[qs];this.handlers==null&&(this.handlers=[]),Zs(this,i);const l=i.nextId++;return this.handlers.push(r),i.handlerEntries.set(l,{handler:r,index:this.handlers.length-1}),i.handlersLength=this.handlers.length,l}eject(t){const n=this[qs];Zs(this,n);const o=n.handlerEntries.get(t);if(o){if(n.handlerEntries.delete(t),this.handlers[o.index]!==o.handler)return;this.handlers[o.index]=null,n.iterationDepth||($O(this.handlers),n.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],Zs(this,this[qs]))}forEach(t){const n=this[qs];Zs(this,n),n.iterationDepth++;try{me.forEach(this.handlers,function(r){r!==null&&t(r)})}finally{--n.iterationDepth||(Zs(this,n),$O(this.handlers),n.handlersLength=iA(this.handlers))}}}const r$={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Eme=typeof URLSearchParams<"u"?URLSearchParams:o$,_me=typeof FormData<"u"?FormData:null,Mme=typeof Blob<"u"?Blob:null,Ame={isBrowser:!0,classes:{URLSearchParams:Eme,FormData:_me,Blob:Mme},protocols:["http","https","file","blob","url","data"]},i$=typeof window<"u"&&typeof document<"u",bb=typeof navigator=="object"&&navigator||void 0,Rme=i$&&(!bb||["ReactNative","NativeScript","NS"].indexOf(bb.product)<0),Dme=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Nme=i$&&window.location.href||"http://localhost",Bme=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:i$,hasStandardBrowserEnv:Rme,hasStandardBrowserWebWorkerEnv:Dme,navigator:bb,origin:Nme},Symbol.toStringTag,{value:"Module"})),wn={...Bme,...Ame};function Lme(e,t){return Ig(e,new wn.classes.URLSearchParams,{visitor:function(n,o,r,i){return wn.isNode&&me.isBuffer(n)?(this.append(o,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}const xO=tA;function lA(e){if(e>xO)throw new Le("FormData field is too deeply nested ("+e+" levels). Max depth: "+xO,Le.ERR_FORM_DATA_DEPTH_EXCEEDED)}function kme(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let o;for(;(o=n.exec(e))!==null;)lA(t.length),t.push(o[0]==="[]"?"":o[1]||o[0]);return t}function Fme(e){const t={},n=Object.keys(e);let o;const r=n.length;let i;for(o=0;o=n.length;return l=!l&&me.isArray(r)?r.length:l,s?(me.hasOwnProp(r,l)?r[l]=me.isArray(r[l])?r[l].concat(o):[r[l],o]:r[l]=o,!a):((!me.hasOwnProp(r,l)||!me.isObject(r[l]))&&(r[l]=[]),t(n,o,r[l],i)&&me.isArray(r[l])&&(r[l]=Fme(r[l])),!a)}if(me.isFormData(e)&&me.isFunction(e.entries)){const n={};return me.forEachEntry(e,(o,r)=>{t(kme(o),r,n,0)}),n}return null}const sA=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Oa=(e,t)=>e!=null&&me.hasOwnProp(e,t)?e[t]:void 0;function zme(e,t,n){if(me.isString(e))try{return(t||JSON.parse)(e),me.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const ju={transitional:r$,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,i=me.isObject(t);if(i&&me.isHTMLForm(t)&&(t=new FormData(t)),me.isFormData(t))return r?JSON.stringify(aA(t)):t;if(me.isArrayBuffer(t)||me.isBuffer(t)||me.isStream(t)||me.isFile(t)||me.isBlob(t)||me.isReadableStream(t))return t;if(me.isArrayBufferView(t))return t.buffer;if(me.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){const s=Oa(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return Lme(t,s).toString();if((a=me.isFileList(t))||o.indexOf("multipart/form-data")>-1){const c=Oa(this,"env"),u=c&&c.FormData;return Ig(a?{"files[]":t}:t,u&&new u,s)}}return i||r?(n.setContentType("application/json",!1),zme(t)):t}],transformResponse:[function(t){const n=Oa(this,"transitional")||ju.transitional,o=n&&n.forcedJSONParsing,r=Oa(this,"responseType"),i=r==="json";if(me.isResponse(t)||me.isReadableStream(t))return t;if(t&&me.isString(t)&&(o&&!r||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,Oa(this,"parseReviver"))}catch(s){if(a)throw s.name==="SyntaxError"?Le.from(s,Le.ERR_BAD_RESPONSE,this,null,Oa(this,"response")):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wn.classes.FormData,Blob:wn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};me.forEach(sA,e=>{ju.headers[e]={}});function yv(e,t){const n=this||ju,o=t||n,r=zn.from(o.headers);let i=o.data;return me.forEach(e,function(a){i=a.call(n,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function cA(e){return!!(e&&e.__CANCEL__)}let Vu=class extends Le{constructor(t,n,o){super(t??"canceled",Le.ERR_CANCELED,n,o),this.name="CanceledError",this.__CANCEL__=!0}};function uA(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Le("Request failed with status code "+n.status,n.status>=400&&n.status<500?Le.ERR_BAD_REQUEST:Le.ERR_BAD_RESPONSE,n.config,n.request,n))}const Hme=/[\t\n\r]/g;function dA(e){if(typeof e!="string")return e;let t=0;for(;t{n=d,r=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const d=Date.now(),f=d-n;f>=o?l(u,d):(r=u,i||(i=setTimeout(()=>{i=null,l(r)},o-f)))},()=>r&&l(r),(...u)=>l(u)]}const kp=(e,t,n=3)=>{let o=0;const r=jme(50,250);return Vme(i=>{if(!i||!me.isNumber(i.loaded))return;const l=i.loaded,a=i.lengthComputable?i.total:void 0,s=Math.max(0,a!=null?Math.min(l,a):l),c=Math.max(0,s-o),u=r(c);o=Math.max(o,s);const d={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},wO=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},OO=(e,t=me.asap)=>(...n)=>t(()=>e(...n)),Wme=wn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,wn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(wn.origin),wn.navigator&&/(msie|trident)/i.test(wn.navigator.userAgent)):()=>!0,Kme=wn.hasStandardBrowserEnv?{write(e,t,n,o,r,i,l){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];me.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),me.isString(o)&&a.push(`path=${o}`),me.isString(r)&&a.push(`domain=${r}`),i===!0&&a.push("secure"),me.isString(l)&&a.push(`SameSite=${l}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const Xme=/^https?:(?!\/\/)/i;function Yme(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,o="")=>`${n}${o}${Lp}`)}function qme(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Lp}@`),n=t.indexOf("#"),r=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Lp}`);return n===-1?r:`${r}#${Yme(t.slice(n+1))}`}function PO(e,t){if(typeof e=="string"){const n=dA(e);if(Xme.test(n))throw new Le(`Invalid URL ${JSON.stringify(qme(n))}: missing "//" after protocol`,Le.ERR_INVALID_URL,t)}}function fA(e,t,n,o){PO(t,o);let r=!Ume(t);return e&&(r||n===!1)?(PO(e,o),Gme(e,t)):t}const IO=e=>e instanceof zn?{...e}:e,Zme=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function ta(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function o(u,d,f,h){return me.isPlainObject(u)&&me.isPlainObject(d)?me.merge.call({caseless:h},u,d):me.isPlainObject(d)?me.merge({},d):me.isArray(d)?d.slice():d}function r(u,d,f,h){if(me.isUndefined(d)){if(!me.isUndefined(u))return o(void 0,u,f,h)}else return o(u,d,f,h)}function i(u,d){if(!me.isUndefined(d))return o(void 0,d)}function l(u,d){if(me.isUndefined(d)){if(!me.isUndefined(u))return o(void 0,u)}else return o(void 0,d)}function a(u){const d=me.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!me.isUndefined(d))if(me.isPlainObject(d)){if(me.hasOwnProp(d,u))return d[u]}else return;const f=me.hasOwnProp(e,"transitional")?e.transitional:void 0;if(me.isPlainObject(f)&&me.hasOwnProp(f,u))return f[u]}function s(u,d,f){if(me.hasOwnProp(t,f))return o(u,d);if(me.hasOwnProp(e,f))return o(void 0,u)}const c={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutErrorMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,allowedSocketPaths:l,responseEncoding:l,validateStatus:s,headers:(u,d,f)=>r(IO(u),IO(d),f,!0)};return me.forEach(Zme({...e,...t}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const f=me.hasOwnProp(c,d)?c[d]:r,h=me.hasOwnProp(e,d)?e[d]:void 0,m=me.hasOwnProp(t,d)?t[d]:void 0,g=f(h,m,d);me.isUndefined(g)&&f!==s||(n[d]=g)}),me.hasOwnProp(t,"validateStatus")&&me.isUndefined(t.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(me.hasOwnProp(e,"validateStatus")?n.validateStatus=o(void 0,e.validateStatus):delete n.validateStatus),n}const Jme=["content-type","content-length"];function Qme(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([o,r])=>{Jme.includes(o.toLowerCase())&&e.set(o,r)})}const eve=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function pA(e){const t=ta({},e),n=f=>me.hasOwnProp(t,f)?t[f]:void 0,o=n("data");let r=n("withXSRFToken");const i=n("xsrfHeaderName"),l=n("xsrfCookieName");let a=n("headers");const s=n("auth"),c=n("baseURL"),u=n("allowAbsoluteUrls"),d=n("url");if(t.headers=a=zn.from(a),t.url=rA(fA(c,d,u,t),n("params"),n("paramsSerializer")),s){const f=me.getSafeProp(s,"username")||"",h=me.getSafeProp(s,"password")||"";try{a.set("Authorization","Basic "+btoa(f+":"+(h?eve(h):"")))}catch(m){throw Le.from(m,Le.ERR_BAD_OPTION_VALUE,e)}}if(me.isFormData(o)){const f=me.getSafeProp(o,"getHeaders");wn.hasStandardBrowserEnv||wn.hasStandardBrowserWebWorkerEnv||me.isReactNative(o)?a.setContentType(void 0):me.isFunction(f)&&Qme(a,f.call(o),n("formDataHeaderPolicy"))}if(wn.hasStandardBrowserEnv&&(me.isFunction(r)&&(r=r(t)),r===!0||r==null&&Wme(t.url))){const h=i&&l&&Kme.read(l);h&&a.set(i,h)}return t}const tve=typeof XMLHttpRequest<"u",nve=tve&&function(e){return new Promise(function(n,o){const r=pA(e);let i=r.data;const l=zn.from(r.headers).normalize();let{responseType:a,onUploadProgress:s,onDownloadProgress:c}=r,u,d,f,h,m,g;function y(){h&&h(),m&&m(),r.cancelToken&&r.cancelToken.unsubscribe(u),r.signal&&r.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(r.method.toUpperCase(),r.url,!0),b.timeout=r.timeout;function S(x){if(!b)return;if(b.status===0&&(Sv(dA(r.url))||Sv(wn.origin))!=="file"&&!(b.responseURL&&b.responseURL.startsWith("file:"))){o(new Le("Request aborted",Le.ECONNABORTED,e,b)),y(),b=null;return}try{x?g&&g(x):m&&m()}catch(P){setTimeout(()=>{throw P})}if(!b)return;const C=zn.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),w={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:C,config:e,request:b};uA(function(T){n(T),y()},function(T){o(T),y()},w),b=null}"onloadend"in b?b.onloadend=S:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.startsWith("file:"))||setTimeout(S)},b.onabort=function(){b&&(o(new Le("Request aborted",Le.ECONNABORTED,e,b)),y(),b=null)},b.onerror=function(C){const O=C&&C.message?C.message:"Network Error",w=new Le(O,Le.ERR_NETWORK,e,b);w.event=C||null,o(w),y(),b=null},b.ontimeout=function(){let C=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const O=r.transitional||r$;r.timeoutErrorMessage&&(C=r.timeoutErrorMessage),o(new Le(C,O.clarifyTimeoutError?Le.ETIMEDOUT:Le.ECONNABORTED,e,b)),y(),b=null},i===void 0&&l.setContentType(null),"setRequestHeader"in b&&me.forEach(QM(l),function(C,O){b.setRequestHeader(O,C)}),me.isUndefined(r.withCredentials)||(b.withCredentials=!!r.withCredentials),a&&a!=="json"&&(b.responseType=r.responseType),c&&([f,m,g]=kp(c,!0),b.addEventListener("progress",f)),s&&b.upload&&([d,h]=kp(s),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(u=x=>{b&&(o(!x||x.type?new Vu(null,e,b):x),b.abort(),y(),b=null)},r.cancelToken&&r.cancelToken.subscribe(u),r.signal&&(r.signal.aborted?u():r.signal.addEventListener("abort",u)));const $=Sv(r.url);if($&&!wn.protocols.includes($)){o(new Le("Unsupported protocol "+$+":",Le.ERR_BAD_REQUEST,e)),y();return}b.send(i||null)})},ove=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let o=!1;const r=function(s){if(!o){o=!0,l();const c=s instanceof Error?s:this.reason;n.abort(c instanceof Le?c:new Vu(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,r(new Le(`timeout of ${t}ms exceeded`,Le.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(s=>{s.unsubscribe?s.unsubscribe(r):s.removeEventListener("abort",r)}),e=null)};e.forEach(s=>{if(!o){if(s.aborted){r.call(s);return}s.addEventListener("abort",r,{once:!0})}});const{signal:a}=n;return a.unsubscribe=()=>me.asap(l),a},rve=function*(e,t){let n=e.byteLength;if(n{const r=ive(e,t);let i=0,l,a=s=>{l||(l=!0,o&&o(s))};return new ReadableStream({async pull(s){try{const{done:c,value:u}=await r.next();if(c){a(),s.close();return}let d=u.byteLength;if(n){let f=i+=d;n(f)}s.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(s){return a(s),r.return()}},{highWaterMark:2})},EO=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,hA=(e,t,n)=>t+2e<=57?e-48:(e&223)-55,ave=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,sve=e=>e===9||e===10||e===12||e===13||e===32,cve=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},uve=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},dve=e=>{const t=e.length;let n=0,o=0,r=!1;for(let i=0;i0){r=!0;continue}n++}}return r||o>2||o>0&&(n+o)%4!==0||n%4===1?uve(e):cve(n)},fve=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const o=e.slice(5,n),r=e.slice(n+1);if(/;base64/i.test(o))return t(r);let l=0;for(let a=0,s=r.length;a=55296&&c<=56319&&a+1=56320&&u<=57343?(l+=4,a++):l+=3}else l+=3}return l};function pve(e){const t=typeof e=="string"?e.indexOf("#"):-1;return fve(t===-1?e:e.slice(0,t),dve)}const l$="1.20.0",MO=64*1024,hve={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Md}=me,gve=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),AO=e=>{if(!me.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},RO=(e,...t)=>{try{return!!e(...t)}catch{return!1}},mve=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},vve=e=>{const t=me.global!==void 0&&me.global!==null?me.global:globalThis,{ReadableStream:n,TextEncoder:o}=t;e=me.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:r,Request:i,Response:l}=e,a=r?Md(r):typeof fetch=="function",s=Md(i),c=Md(l);if(!a)return!1;const u=a&&Md(n),d=a&&(typeof o=="function"?(b=>S=>b.encode(S))(new o):async b=>new Uint8Array(await new i(b).arrayBuffer())),f=s&&u&&RO(()=>{let b=!1;const S=new i(wn.origin,{body:new n,method:"POST",get duplex(){return b=!0,"half"}}),$=S.headers.has("Content-Type");return S.body!=null&&S.body.cancel(),b&&!$}),h=c&&u&&RO(()=>me.isReadableStream(new l("").body)),m={stream:h&&(b=>b.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!m[b]&&(m[b]=(S,$)=>{let x=S&&S[b];if(x)return x.call(S);throw new Le(`Response type '${b}' is not supported`,Le.ERR_NOT_SUPPORT,$)})});const g=async b=>{if(b==null)return 0;if(me.isBlob(b))return b.size;if(me.isSpecCompliantForm(b))return(await new i(wn.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(me.isArrayBufferView(b)||me.isArrayBuffer(b))return b.byteLength;if(me.isURLSearchParams(b)&&(b=b+""),me.isString(b))return(await d(b)).byteLength},y=async(b,S)=>{const $=me.toFiniteNumber(b.getContentLength());return $??g(S)};return async b=>{let{url:S,method:$,data:x,signal:C,cancelToken:O,timeout:w,onDownloadProgress:P,onUploadProgress:T,responseType:M,headers:E,withCredentials:A="same-origin",fetchOptions:R,maxContentLength:F,maxBodyLength:_,maxRedirects:N}=pA(b);const B=me.isNumber(F)&&F>-1,L=me.isNumber(_)&&_>-1,k=U=>me.hasOwnProp(b,U)?b[U]:void 0;let z=r||fetch;M=M?(M+"").toLowerCase():"text";let H=ove([C,O&&O.toAbortSignal()],w),j=null;const Y=H&&H.unsubscribe&&(()=>{H.unsubscribe()});let Z,G=null;const te=()=>new Le("Request body larger than maxBodyLength limit",Le.ERR_BAD_REQUEST,b,j);try{let U;const Q=k("auth");if(Q){const ne=me.getSafeProp(Q,"username")||"",se=me.getSafeProp(Q,"password")||"";U={username:ne,password:se}}if(mve(S)){const ne=new URL(S,wn.origin);if(!U&&(ne.username||ne.password)){const se=AO(ne.username),pe=AO(ne.password);U={username:se,password:pe}}(ne.username||ne.password)&&(ne.username="",ne.password="",S=ne.href)}if(U&&(E.delete("authorization"),E.set("Authorization","Basic "+btoa(gve((U.username||"")+":"+(U.password||""))))),B&&typeof S=="string"&&S.startsWith("data:")&&pve(S)>F)throw new Le("maxContentLength size of "+F+" exceeded",Le.ERR_BAD_RESPONSE,b,j);if(L&&$!=="get"&&$!=="head"){const ne=await g(x);if(typeof ne=="number"&&isFinite(ne)&&(Z=ne,ne>_))throw te()}const J=L&&(me.isReadableStream(x)||me.isStream(x)),X=(ne,se,pe)=>TO(ne,MO,he=>{if(L&&he>_)throw G=te();se&&se(he)},pe);if(f&&$!=="get"&&$!=="head"&&(T||J)){if(Z=Z??await y(E,x),Z!==0||J){let ne=new i(S,{method:"POST",body:x,duplex:"half"}),se;if(me.isFormData(x)&&(se=ne.headers.get("content-type"))&&E.setContentType(se),ne.body){const[pe,he]=T&&wO(Z,kp(OO(T)))||[];x=X(ne.body,pe,he)}}}else if(J&&!s&&u&&$!=="get"&&$!=="head")x=X(x);else if(J&&s&&!f&&$!=="get"&&$!=="head")throw new Le("Stream request bodies are not supported by the current fetch implementation",Le.ERR_NOT_SUPPORT,b,j);me.isString(A)||(A=A?"include":"omit");const q=s&&"credentials"in i.prototype;if(me.isFormData(x)){const ne=E.getContentType();ne&&/^multipart\/form-data/i.test(ne)&&!/boundary=/i.test(ne)&&E.delete("content-type")}E.set("User-Agent","axios/"+l$,!1);const V=R==null?R:Object.assign(Object.create(null),R);V&&(delete V.body,delete V.headers,delete V.method,delete V.signal,delete V.duplex,delete V.credentials);const K=Object.assign(Object.create(null),V,{signal:H,method:$.toUpperCase(),headers:QM(E.normalize()),body:x,duplex:"half",credentials:q?A:void 0});s&&(me.forEach(hve,(ne,se)=>{K[se]===void 0&&(K[se]=ne)}),K.signal===void 0&&(K.signal=null),K.body===void 0&&(K.body=null)),N===0&&(K.redirect="manual",V&&(V.redirect="manual")),j=s&&new i(S,K);let ee=await(s?z(j,V):z(S,K));const ue=zn.from(ee.headers);if(B){const ne=me.toFiniteNumber(ue.getContentLength());if(ne!=null&&ne>F)throw new Le("maxContentLength size of "+F+" exceeded",Le.ERR_BAD_RESPONSE,b,j)}const ae=h&&(M==="stream"||M==="response");if(h&&ee.body&&(P||B||ae&&Y)){const ne={};["status","statusText","headers"].forEach(xe=>{ne[xe]=ee[xe]});const se=me.toFiniteNumber(ue.getContentLength()),[pe,he]=P&&wO(se,kp(OO(P),!0))||[];let ge=0;const be=xe=>{if(B&&(ge=xe,ge>F))throw new Le("maxContentLength size of "+F+" exceeded",Le.ERR_BAD_RESPONSE,b,j);pe&&pe(xe)};ee=new l(TO(ee.body,MO,be,()=>{he&&he(),Y&&Y()}),ne)}M=M||"text";let le=await m[me.findKey(m,M)||"text"](ee,b);if(B&&!h&&!ae){let ne;if(le!=null&&(typeof le.byteLength=="number"?ne=le.byteLength:typeof le.size=="number"?ne=le.size:typeof le=="string"&&(ne=typeof o=="function"?new o().encode(le).byteLength:le.length)),typeof ne=="number"&&ne>F)throw new Le("maxContentLength size of "+F+" exceeded",Le.ERR_BAD_RESPONSE,b,j)}return!ae&&Y&&Y(),await new Promise((ne,se)=>{uA(ne,se,{data:le,headers:zn.from(ee.headers),status:ee.status,statusText:ee.statusText,config:b,request:j})})}catch(U){if(Y&&Y(),H&&H.aborted&&H.reason instanceof Le){const Q=H.reason;throw Q.config=b,j&&(Q.request=j),U!==Q&&Object.defineProperty(Q,"cause",{__proto__:null,value:U,writable:!0,enumerable:!1,configurable:!0}),Q}if(G)throw j&&!G.request&&(G.request=j),G;if(U instanceof Le)throw j&&!U.request&&(U.request=j),U;if(U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)){const Q=new Le("Network Error",Le.ERR_NETWORK,b,j,U&&U.response);throw Object.defineProperty(Q,"cause",{__proto__:null,value:U.cause||U,writable:!0,enumerable:!1,configurable:!0}),Q}throw Le.from(U,U&&U.code,b,j,U&&U.response)}}},bve=new Map,gA=e=>{let t=e&&e.env||{};const{fetch:n,Request:o,Response:r}=t,i=[o,r,n];let l=i.length,a=l,s,c,u=bve;for(;a--;)s=i[a],c=u.get(s),c===void 0&&u.set(s,c=a?new Map:vve(t)),u=c;return c};gA();const a$={http:Ome,xhr:nve,fetch:{get:gA}};me.forEach(a$,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const DO=e=>`- ${e}`,yve=e=>me.isFunction(e)||e===null||e===!1;function Sve(e,t){e=me.isArray(e)?e:[e];const{length:n}=e;let o,r;const i={};for(let l=0;l`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?l.length>1?`since : +`+l.map(DO).join(` +`):" "+DO(l[0]):"as no adapter specified";throw new Le("There is no suitable adapter to dispatch the request "+a,Le.ERR_NOT_SUPPORT)}return r}const mA={getAdapter:Sve,adapters:a$};function $v(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vu(null,e)}function Cv(e){const t=me.toSafeFlatObject(e);return $v(t),t.headers=zn.from(me.getSafeProp(t,"headers")),t.data=yv.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),mA.getAdapter(t.adapter||ju.adapter,t)(t).then(function(r){$v(t),t.response=r;try{r.data=yv.call(t,t.transformResponse,r)}finally{delete t.response}return r.headers=zn.from(r.headers),r},function(r){if(!cA(r)&&($v(t),r&&r.response)){t.response=r.response;try{r.response.data=yv.call(t,t.transformResponse,r.response)}finally{delete t.response}r.response.headers=zn.from(r.response.headers)}return Promise.reject(r)})}const Tg={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Tg[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const NO={};Tg.transitional=function(t,n,o){function r(i,l){return"[Axios v"+l$+"] Transitional option '"+i+"'"+l+(o?". "+o:"")}return(i,l,a)=>{if(t===!1)throw new Le(r(l," has been removed"+(n?" in "+n:"")),Le.ERR_DEPRECATED);return n&&!NO[l]&&(NO[l]=!0,console.warn(r(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,a):!0}};Tg.spelling=function(t){return(n,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function $ve(e,t,n){if(typeof e!="object"||e===null)throw new Le("options must be an object",Le.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const i=o[r],l=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(l){const a=e[i],s=a===void 0||l(a,i,e);if(s!==!0)throw new Le("option "+i+" must be "+s,Le.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Le("Unknown option "+i,Le.ERR_BAD_OPTION)}}const Cf={assertOptions:$ve,validators:Tg},Rn=Cf.validators;let jl=class{constructor(t){this.defaults=t||{},this.interceptors={request:new CO,response:new CO}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error)try{let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const i=r.stack;let l="";if(typeof i=="string"){const a=i.indexOf(` +`);l=a===-1?"":i.slice(a+1)}if(!o.stack)o.stack=l;else if(l){const a=l.indexOf(` +`),s=a===-1?-1:l.indexOf(` +`,a+1),c=s===-1?"":l.slice(s+1);String(o.stack).endsWith(c)||(o.stack+=` +`+l)}}catch{}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ta(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:i}=n;o!==void 0&&Cf.assertOptions(o,{silentJSONParsing:Rn.transitional(Rn.boolean),forcedJSONParsing:Rn.transitional(Rn.boolean),clarifyTimeoutError:Rn.transitional(Rn.boolean),legacyInterceptorReqResOrdering:Rn.transitional(Rn.boolean),advertiseZstdAcceptEncoding:Rn.transitional(Rn.boolean),validateStatusUndefinedResolves:Rn.transitional(Rn.boolean)},!1),r!=null&&(me.isFunction(r)?n.paramsSerializer={serialize:r}:Cf.assertOptions(r,{encode:Rn.function,serialize:Rn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Cf.assertOptions(n,{baseUrl:Rn.spelling("baseURL"),withXsrfToken:Rn.spelling("withXSRFToken")},!0),n.method=(me.getSafeProp(n,"method")||me.getSafeProp(this.defaults,"method")||"get").toLowerCase();let l=i&&me.merge(i.common,i[n.method]);i&&me.forEach(sA.concat("common"),m=>{delete i[m]}),n.headers=zn.concat(l,i);const a=[];let s=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;s=s&&g.synchronous;const y=n.transitional||r$;y&&y.legacyInterceptorReqResOrdering?a.unshift(g.fulfilled,g.rejected):a.push(g.fulfilled,g.rejected)});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let u,d=0,f;if(!s){const m=[Cv.bind(this),void 0];for(m.unshift(...a),m.push(...c),f=m.length,u=Promise.resolve(n);dCv.call(this,h)))}catch(b){u=Promise.reject(b)}break}}if(!u)try{u=Cv.call(this,h)}catch(m){u=Promise.reject(m)}for(d=0,f=c.length;d{if(!o._listeners)return;let i=o._listeners.length;for(;i-- >0;)o._listeners[i](r);o._listeners=null}),this.promise.then=r=>{let i;const l=new Promise(a=>{o.subscribe(a),i=a}).then(r);return l.cancel=function(){o.unsubscribe(i)},l},t(function(i,l,a){o.reason||(o.reason=new Vu(i,l,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new vA(function(r){t=r}),cancel:t}}};function xve(e){return function(n){return e.apply(null,n)}}function wve(e){return me.isObject(e)&&e.isAxiosError===!0}const xf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(xf).forEach(([e,t])=>{xf[t]===void 0&&(xf[t]=e)});function bA(e){const t=new jl(e),n=jM(jl.prototype.request,t);return me.extend(n,jl.prototype,t,{allOwnKeys:!0}),me.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return bA(ta(e,r))},n}const Jt=bA(ju);Jt.Axios=jl;Jt.CanceledError=Vu;Jt.CancelToken=Cve;Jt.isCancel=cA;Jt.VERSION=l$;Jt.toFormData=Ig;Jt.AxiosError=Le;Jt.Cancel=Jt.CanceledError;Jt.all=function(t){return Promise.all(t)};Jt.spread=xve;Jt.isAxiosError=wve;Jt.mergeConfig=ta;Jt.AxiosHeaders=zn;Jt.formToJSON=e=>aA(me.isHTMLForm(e)?new FormData(e):e);Jt.getAdapter=mA.getAdapter;Jt.HttpStatusCode=xf;Jt.default=Jt;const{Axios:F0e,AxiosError:z0e,CanceledError:H0e,isCancel:j0e,CancelToken:V0e,VERSION:W0e,all:K0e,Cancel:U0e,isAxiosError:G0e,spread:X0e,toFormData:Y0e,AxiosHeaders:q0e,HttpStatusCode:Z0e,formToJSON:J0e,getAdapter:Q0e,mergeConfig:ebe,create:tbe}=Jt,ji=Jt.create({baseURL:"/api",headers:{"Content-Type":"application/json"}});ji.interceptors.request.use(e=>{const t=localStorage.getItem("admin_access_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));let xv=!1,yb=[];const BO=(e,t=null)=>{yb.forEach(n=>{e?n.reject(e):n.resolve(t)}),yb=[]};ji.interceptors.response.use(e=>{if(e.data instanceof Blob)return e;if(e.data&&typeof e.data=="object"){if("success"in e.data&&"data"in e.data)return{...e,data:e.data.data,meta:e.data.meta};if("data"in e.data&&"meta"in e.data)return{...e,data:e.data.data,meta:e.data.meta}}return e},async e=>{var o,r,i,l,a,s,c,u,d,f,h;const t=e.config;if(((o=e.response)==null?void 0:o.status)===401&&!t._retry){if((r=t.url)!=null&&r.includes("/admin/auth/login")||(i=t.url)!=null&&i.includes("/admin/auth/refresh"))return Promise.reject(e);if(xv)return new Promise((g,y)=>{yb.push({resolve:g,reject:y})}).then(g=>(t.headers.Authorization=`Bearer ${g}`,ji(t))).catch(g=>Promise.reject(g));t._retry=!0,xv=!0;const m=localStorage.getItem("admin_refresh_token");if(!m)return localStorage.removeItem("admin_access_token"),localStorage.removeItem("admin_info"),window.location.href="/login",Promise.reject(e);try{const{data:g}=await Jt.post("/api/admin/auth/refresh",{refreshToken:m}),y=((l=g.data)==null?void 0:l.accessToken)||g.accessToken;return localStorage.setItem("admin_access_token",y),ji.defaults.headers.common.Authorization=`Bearer ${y}`,BO(null,y),ji(t)}catch(g){return BO(g,null),localStorage.removeItem("admin_access_token"),localStorage.removeItem("admin_refresh_token"),localStorage.removeItem("admin_info"),window.location.href="/login",Promise.reject(g)}finally{xv=!1}}const n=((s=(a=e.response)==null?void 0:a.data)==null?void 0:s.message)||(Array.isArray((u=(c=e.response)==null?void 0:c.data)==null?void 0:u.message)?(f=(d=e.response)==null?void 0:d.data)==null?void 0:f.message.join(" - "):"خطایی در ارتباط با سرور رخ داده است.");return((h=e.response)==null?void 0:h.status)!==401&&po.error(n),Promise.reject(e)});const yA=Zpe("adminAuth",()=>{const e=ie(localStorage.getItem("admin_access_token")),t=ie(localStorage.getItem("admin_info")?JSON.parse(localStorage.getItem("admin_info")):null),n=ie(!1),o=I(()=>!!e.value);async function r(a){n.value=!0;try{const c=(await ji.post("/admin/auth/login",a)).data;return e.value=c.accessToken,t.value=c.admin,localStorage.setItem("admin_access_token",c.accessToken),localStorage.setItem("admin_refresh_token",c.refreshToken),localStorage.setItem("admin_info",JSON.stringify(c.admin)),c}finally{n.value=!1}}async function i(){try{await ji.post("/admin/auth/logout")}catch{}finally{e.value=null,t.value=null,localStorage.removeItem("admin_access_token"),localStorage.removeItem("admin_refresh_token"),localStorage.removeItem("admin_info")}}async function l(a){n.value=!0;try{const s=await ji.patch("/admin/auth/profile",a);return t.value=s.data,localStorage.setItem("admin_info",JSON.stringify(s.data)),s.data}finally{n.value=!1}}return{token:e,admin:t,loading:n,isAuthenticated:o,login:r,logout:i,updateProfile:l}}),Ove={class:"logo-box"},Pve={key:0,class:"logo-text"},Ive={key:0,class:"search-container"},Tve={class:"search-bar"},Eve={class:"menu-scroll-wrap"},_ve={class:"sider-nav"},Mve={key:0,class:"nav-group"},Ave={key:0,class:"nav-group-header"},Rve={class:"nav-group-items"},Dve=["onClick"],Nve={key:0,class:"nav-link-text"},Bve={key:1,class:"nav-group nav-group-secondary"},Lve={key:0,class:"nav-group-header"},kve={class:"nav-group-items"},Fve=["onClick"],zve={key:0,class:"nav-link-text"},Hve={key:2,class:"empty-search-text"},jve={class:"header-right"},Vve={class:"user-profile-trigger"},Wve={class:"user-info-text"},Kve={class:"user-name"},Uve={class:"user-role-label"},Gve={class:"dropdown-user-card"},Xve={class:"card-avatar-wrap"},Yve={class:"card-text"},qve={class:"card-name"},Zve={class:"card-sub"},Jve={class:"card-badge-row"},Qve={class:"dropdown-menu-item"},e0e={class:"dropdown-menu-item text-danger"},t0e=re({__name:"AdminLayout",setup(e){const t=e$(),n=QS(),o=yA(),r=ie(!1),i=ie([t.name||"dashboard"]),l=ie(""),a=[{key:"dashboard",label:"داشبورد آماری",icon:vg,path:"/dashboard"},{key:"campaigns",label:"مدیریت کمپین‌ها",icon:$g,path:"/campaigns"},{key:"users",label:"مدیریت کاربران",icon:ns,path:"/users"},{key:"winners",label:"مدیریت برندگان",icon:Cg,path:"/winners"},{key:"spins",label:"تاریخچه اسپین‌ها",icon:ku,path:"/spins"}],s=[{key:"sms",label:"لاگ‌های پیامک",icon:Sg,path:"/sms"},{key:"reports",label:"گزارش‌ها و KPI",icon:bg,path:"/reports"},{key:"audit",label:"لاگ بازرسی (Audit)",icon:mg,path:"/audit"}],c=I(()=>{if(!l.value.trim())return a;const x=l.value.toLowerCase().trim();return a.filter(C=>C.label.toLowerCase().includes(x))}),u=I(()=>{if(!l.value.trim())return s;const x=l.value.toLowerCase().trim();return s.filter(C=>C.label.toLowerCase().includes(x))});function d(x){i.value=[x.key],n.push(x.path)}Se(()=>t.name,x=>{x&&(i.value=[x])});const f=I(()=>{var x;return((x=o.admin)==null?void 0:x.name)||"مدیر سیستم"}),h=I(()=>{var x;return((x=o.admin)==null?void 0:x.role)||"OPERATOR"}),m=ie(!1),g=ie(!1),y=ft({name:"",mobile:"",email:"",password:""});function b(){var x,C,O;y.name=((x=o.admin)==null?void 0:x.name)||"",y.mobile=((C=o.admin)==null?void 0:C.mobile)||"",y.email=((O=o.admin)==null?void 0:O.email)||"",y.password="",m.value=!0}async function S(){var x,C;if(!y.name.trim()){po.error("لطفاً نام و نام خانوادگی را وارد کنید.");return}if(!y.mobile.trim()||!/^09\d{9}$/.test(y.mobile.trim())){po.error("شماره موبایل باید ۱۱ رقمی باشد و با ۰۹ شروع شود.");return}if(!y.email.trim()){po.error("لطفاً ایمیل را وارد کنید.");return}if(y.password&&y.password.length<6){po.error("کلمه عبور جدید باید حداقل ۶ کاراکتر باشد.");return}g.value=!0;try{const O={name:y.name.trim(),mobile:y.mobile.trim(),email:y.email.trim()};y.password&&(O.password=y.password),await o.updateProfile(O),po.success("اطلاعات کاربر با موفقیت به‌روزرسانی شد."),m.value=!1}catch(O){const w=((C=(x=O==null?void 0:O.response)==null?void 0:x.data)==null?void 0:C.message)||"خطا در ویرایش اطلاعات کاربر.";po.error(typeof w=="string"?w:"اطلاعات وارد شده نامعتبر است.")}finally{g.value=!1}}function $(){fn.confirm({title:"خروج از حساب کاربری",icon:p(Su),content:"آیا اطمینان دارید که می‌خواهید از پنل مدیریت خارج شوید؟",okText:"خروج",cancelText:"انصراف",okButtonProps:{danger:!0},onOk:async()=>{await o.logout(),n.push("/login")}})}return(x,C)=>{const O=Vt("a-tooltip"),w=Vt("a-layout-sider"),P=Vt("a-avatar"),T=Vt("a-tag"),M=Vt("a-menu-divider"),E=Vt("a-menu-item"),A=Vt("a-menu"),R=Vt("a-dropdown"),F=Vt("a-layout-header"),_=Vt("router-view"),N=Vt("a-layout-content"),B=Vt("a-layout"),L=Vt("a-input"),k=Vt("a-form-item"),z=Vt("a-col"),H=Vt("a-row"),j=Vt("a-input-password"),Y=Vt("a-form"),Z=Vt("a-modal");return yt(),Nn(B,{style:{"min-height":"100vh"}},{default:Ot(()=>[p(w,{collapsed:r.value,"onUpdate:collapsed":C[5]||(C[5]=G=>r.value=G),trigger:null,collapsible:"",width:236,collapsedWidth:72,theme:"light",class:"app-sider"},{default:Ot(()=>[Ge("div",Ove,[Ge("div",{class:"brand-wrap",onClick:C[0]||(C[0]=G=>ct(n).push("/dashboard"))},[C[11]||(C[11]=Ge("div",{class:"logo-emblem"},[Ge("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ge("rect",{width:"24",height:"24",rx:"6",fill:"url(#brandGrad)"}),Ge("circle",{cx:"12",cy:"12",r:"7.5",stroke:"white","stroke-width":"1.8","stroke-dasharray":"3 2"}),Ge("path",{d:"M12 4.5V12L16.5 7.5",stroke:"white","stroke-width":"1.8","stroke-linecap":"round"}),Ge("circle",{cx:"12",cy:"12",r:"2",fill:"white"}),Ge("defs",null,[Ge("linearGradient",{id:"brandGrad",x1:"0",y1:"0",x2:"24",y2:"24",gradientUnits:"userSpaceOnUse"},[Ge("stop",{"stop-color":"#7c3aed"}),Ge("stop",{offset:"1","stop-color":"#4f46e5"})])])])],-1)),r.value?Yn("",!0):(yt(),tn("h2",Pve,"گردونه شانس"))]),r.value?(yt(),tn("button",{key:1,type:"button",class:"sider-collapse-btn collapsed-toggle",title:"باز کردن سایدبار",onClick:C[2]||(C[2]=G=>r.value=!r.value)},[p(ct(US))])):(yt(),tn("button",{key:0,type:"button",class:"sider-collapse-btn",title:"بستن سایدبار",onClick:C[1]||(C[1]=G=>r.value=!r.value)},[p(ct(KS))]))]),r.value?Yn("",!0):(yt(),tn("div",Ive,[Ge("div",Tve,[p(ct(ua),{class:"search-bar-icon"}),_n(Ge("input",{"onUpdate:modelValue":C[3]||(C[3]=G=>l.value=G),type:"text",placeholder:"جستجو در منو...",class:"search-bar-input"},null,512),[[JR,l.value]]),l.value?(yt(),Nn(ct($u),{key:0,class:"clear-search-icon",onClick:C[4]||(C[4]=G=>l.value="")})):Yn("",!0)])])),Ge("div",Eve,[Ge("nav",_ve,[c.value.length>0?(yt(),tn("div",Mve,[r.value?Yn("",!0):(yt(),tn("div",Ave,"اصلی")),Ge("div",Rve,[(yt(!0),tn(He,null,Mf(c.value,G=>(yt(),Nn(O,{key:G.key,title:r.value?G.label:"",placement:"left"},{default:Ot(()=>[Ge("div",{class:Mr(["nav-link-item",{"is-active":i.value.includes(G.key)}]),onClick:te=>d(G)},[(yt(),Nn(ja(G.icon),{class:"nav-link-icon"})),r.value?Yn("",!0):(yt(),tn("span",Nve,Zn(G.label),1))],10,Dve)]),_:2},1032,["title"]))),128))])])):Yn("",!0),u.value.length>0?(yt(),tn("div",Bve,[r.value?Yn("",!0):(yt(),tn("div",Lve,"سیستم و ابزارها")),Ge("div",kve,[(yt(!0),tn(He,null,Mf(u.value,G=>(yt(),Nn(O,{key:G.key,title:r.value?G.label:"",placement:"left"},{default:Ot(()=>[Ge("div",{class:Mr(["nav-link-item",{"is-active":i.value.includes(G.key)}]),onClick:te=>d(G)},[(yt(),Nn(ja(G.icon),{class:"nav-link-icon"})),r.value?Yn("",!0):(yt(),tn("span",zve,Zn(G.label),1))],10,Fve)]),_:2},1032,["title"]))),128))])])):Yn("",!0),!r.value&&c.value.length===0&&u.value.length===0?(yt(),tn("div",Hve," موردی یافت نشد ")):Yn("",!0)])])]),_:1},8,["collapsed"]),p(B,null,{default:Ot(()=>[p(F,{class:"app-header"},{default:Ot(()=>[C[14]||(C[14]=Ge("div",{class:"header-left"},[Ge("span",{class:"header-title"},"سامانه مدیریت گردونه شانس")],-1)),Ge("div",jve,[p(R,{trigger:["click"],placement:"bottomLeft",overlayClassName:"admin-user-dropdown-popover"},{overlay:Ot(()=>[p(A,{class:"user-dropdown-menu"},{default:Ot(()=>{var G,te;return[Ge("div",Gve,[Ge("div",Xve,[p(P,{size:40,class:"card-avatar"},{icon:Ot(()=>[p(ct(ns))]),_:1}),Ge("div",Yve,[Ge("div",qve,Zn(f.value),1),Ge("div",Zve,Zn(((G=ct(o).admin)==null?void 0:G.mobile)||((te=ct(o).admin)==null?void 0:te.email)||"حساب کاربری ادمین"),1)])]),Ge("div",Jve,[p(T,{color:h.value==="SUPER_ADMIN"?"purple":"blue",class:"role-pill"},{default:Ot(()=>[vn(Zn(h.value==="SUPER_ADMIN"?"مدیر ارشد سامانه":"اپراتور سامانه"),1)]),_:1},8,["color"])])]),p(M),p(E,{key:"edit-profile",onClick:b},{default:Ot(()=>[Ge("div",Qve,[p(ct(gg),{class:"menu-item-icon"}),C[12]||(C[12]=Ge("span",null,"ویرایش کاربر",-1))])]),_:1}),p(M),p(E,{key:"logout",onClick:$},{default:Ot(()=>[Ge("div",e0e,[p(ct(yg),{class:"menu-item-icon"}),C[13]||(C[13]=Ge("span",null,"خروج از سامانه",-1))])]),_:1})]}),_:1})]),default:Ot(()=>[Ge("div",Vve,[p(P,{size:"small",class:"user-avatar"},{icon:Ot(()=>[p(ct(ns))]),_:1}),Ge("div",Wve,[Ge("span",Kve,Zn(f.value),1),Ge("span",Uve,Zn(h.value==="SUPER_ADMIN"?"مدیر ارشد":"اپراتور"),1)]),p(ct(nl),{class:"dropdown-chevron"})])]),_:1})])]),_:1}),p(N,{class:"app-content"},{default:Ot(()=>[p(_,null,{default:Ot(({Component:G})=>[p(rn,{name:"fade-slide",mode:"out-in"},{default:Ot(()=>[(yt(),Nn(ja(G)))]),_:2},1024)]),_:1})]),_:1})]),_:1}),p(Z,{open:m.value,"onUpdate:open":C[10]||(C[10]=G=>m.value=G),title:"ویرایش اطلاعات حساب کاربر",confirmLoading:g.value,okText:"ذخیره تغییرات",cancelText:"انصراف",width:"500px",style:{top:"40px"},onOk:S},{default:Ot(()=>[p(Y,{layout:"vertical",style:{"margin-top":"16px"}},{default:Ot(()=>[p(k,{label:"نام و نام خانوادگی",required:""},{default:Ot(()=>[p(L,{value:y.name,"onUpdate:value":C[6]||(C[6]=G=>y.name=G),placeholder:"مثال: مدیر ارشد سامانه"},null,8,["value"])]),_:1}),p(H,{gutter:16},{default:Ot(()=>[p(z,{span:12},{default:Ot(()=>[p(k,{label:"شماره موبایل",required:"",tooltip:"شماره همراه ۱۱ رقمی مدیر"},{default:Ot(()=>[p(L,{value:y.mobile,"onUpdate:value":C[7]||(C[7]=G=>y.mobile=G),placeholder:"۰۹۱۲۰۰۰۰۰۰۰"},null,8,["value"])]),_:1})]),_:1}),p(z,{span:12},{default:Ot(()=>[p(k,{label:"آدرس ایمیل",required:""},{default:Ot(()=>[p(L,{value:y.email,"onUpdate:value":C[8]||(C[8]=G=>y.email=G),placeholder:"admin@luckywheel.local"},null,8,["value"])]),_:1})]),_:1})]),_:1}),p(k,{label:"کلمه عبور جدید (اختیاری)",tooltip:"در صورتی که نمی‌خواهید رمز را تغییر دهید، خالی بگذارید"},{default:Ot(()=>[p(j,{value:y.password,"onUpdate:value":C[9]||(C[9]=G=>y.password=G),placeholder:"حداقل ۶ کاراکتر"},null,8,["value"])]),_:1}),p(k,{label:"نقش و سطح دسترسی",style:{"margin-bottom":"0"}},{default:Ot(()=>[p(T,{color:h.value==="SUPER_ADMIN"?"purple":"blue",style:{"font-size":"13px",padding:"4px 12px","border-radius":"6px"}},{default:Ot(()=>[vn(Zn(h.value==="SUPER_ADMIN"?"مدیر ارشد سامانه (SUPER_ADMIN)":"اپراتور سامانه (OPERATOR)"),1)]),_:1},8,["color"])]),_:1})]),_:1})]),_:1},8,["open","confirmLoading"])]),_:1})}}}),Eg=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},n0e=Eg(t0e,[["__scopeId","data-v-addabc1f"]]),o0e={class:"m-bottom-nav","aria-label":"ناوبری اصلی"},r0e={class:"m-bottom-nav__inner"},i0e=["onClick"],l0e={class:"m-bottom-nav__icon-wrap"},a0e={class:"m-bottom-nav__label"},s0e={class:"m-bottom-nav__icon-wrap"},c0e={class:"m-more-grid"},u0e=["onClick"],d0e={class:"m-more-item__icon"},f0e={class:"m-more-item__label"},p0e={key:0,class:"m-more-profile"},h0e={class:"m-more-profile__info"},g0e={class:"m-more-profile__avatar"},m0e={class:"m-more-profile__name"},v0e={class:"m-more-profile__email"},b0e=re({__name:"MobileBottomNav",setup(e){const t=e$(),n=QS(),o=yA(),r=ie(!1),i=[{key:"m-dashboard",label:"داشبورد",icon:vg,path:"/m/dashboard"},{key:"m-campaigns",label:"کمپین‌ها",icon:$g,path:"/m/campaigns"},{key:"m-users",label:"کاربران",icon:ns,path:"/m/users"},{key:"m-winners",label:"برندگان",icon:Cg,path:"/m/winners"}],l=[{key:"m-spins",label:"تاریخچه اسپین",icon:ku,path:"/m/spins"},{key:"m-sms",label:"لاگ پیامک",icon:Sg,path:"/m/sms"},{key:"m-reports",label:"گزارش‌ها",icon:bg,path:"/m/reports"},{key:"m-audit",label:"لاگ بازرسی",icon:mg,path:"/m/audit"}],a=I(()=>{const f=String(t.name||"");return i.some(h=>h.key===f||f.startsWith(h.key))?f.startsWith("m-campaign")?"m-campaigns":f.startsWith("m-user")?"m-users":f:l.some(h=>h.key===f)?"more":f}),s=I(()=>l.some(f=>f.key===String(t.name)));function c(f){r.value=!1,t.path!==f&&n.push(f)}function u(){r.value=!0}async function d(){r.value=!1,await o.logout(),n.push("/m/login")}return(f,h)=>{const m=Vt("a-drawer");return yt(),tn(He,null,[Ge("nav",o0e,[Ge("div",r0e,[(yt(),tn(He,null,Mf(i,g=>Ge("button",{key:g.key,type:"button",class:Mr(["m-bottom-nav__item",{"is-active":a.value===g.key}]),onClick:y=>c(g.path)},[Ge("span",l0e,[(yt(),Nn(ja(g.icon),{class:"m-bottom-nav__icon"}))]),Ge("span",a0e,Zn(g.label),1)],10,i0e)),64)),Ge("button",{type:"button",class:Mr(["m-bottom-nav__item",{"is-active":s.value||r.value}]),onClick:u},[Ge("span",s0e,[p(ct(GS),{class:"m-bottom-nav__icon"})]),h[1]||(h[1]=Ge("span",{class:"m-bottom-nav__label"},"بیشتر",-1))],2)]),h[2]||(h[2]=Ge("div",{class:"m-bottom-nav__safe"},null,-1))]),p(m,{open:r.value,"onUpdate:open":h[0]||(h[0]=g=>r.value=g),placement:"bottom",height:"auto",closable:!1,class:"m-more-drawer","body-style":{padding:"12px 16px 24px"}},{default:Ot(()=>[h[4]||(h[4]=Ge("div",{class:"m-more-handle"},null,-1)),h[5]||(h[5]=Ge("div",{class:"m-more-title"},"منوی بیشتر",-1)),Ge("div",c0e,[(yt(),tn(He,null,Mf(l,g=>Ge("button",{key:g.key,type:"button",class:Mr(["m-more-item",{"is-active":String(ct(t).name)===g.key}]),onClick:y=>c(g.path)},[Ge("span",d0e,[(yt(),Nn(ja(g.icon)))]),Ge("span",f0e,Zn(g.label),1)],10,u0e)),64))]),ct(o).admin?(yt(),tn("div",p0e,[Ge("div",h0e,[Ge("div",g0e,Zn((ct(o).admin.name||"ا").charAt(0)),1),Ge("div",null,[Ge("div",m0e,Zn(ct(o).admin.name),1),Ge("div",v0e,Zn(ct(o).admin.email),1)])]),Ge("button",{type:"button",class:"m-more-logout",onClick:d},[p(ct(yg)),h[3]||(h[3]=vn(" خروج ",-1))])])):Yn("",!0)]),_:1},8,["open"])],64)}}}),y0e=Eg(b0e,[["__scopeId","data-v-ac1cee7c"]]),S0e={class:"m-topbar__inner"},$0e={class:"m-topbar__side m-topbar__side--start"},C0e={class:"m-topbar__title"},x0e={class:"m-topbar__side m-topbar__side--end"},w0e=re({__name:"MobileTopBar",props:{title:{default:""},showBack:{type:Boolean,default:!1},transparent:{type:Boolean,default:!1}},emits:["back"],setup(e,{emit:t}){const n=e,o=t,r=QS(),i=I(()=>n.showBack);function l(){o("back"),window.history.length>1?r.back():r.push("/m/dashboard")}return(a,s)=>(yt(),tn("header",{class:Mr(["m-topbar",{"m-topbar--transparent":e.transparent}])},[s[0]||(s[0]=Ge("div",{class:"m-topbar__safe"},null,-1)),Ge("div",S0e,[Ge("div",$0e,[i.value?(yt(),tn("button",{key:0,type:"button",class:"m-topbar__btn","aria-label":"بازگشت",onClick:l},[p(ct(ag))])):Yn("",!0),_v(a.$slots,"start",{},void 0)]),Ge("h1",C0e,Zn(e.title),1),Ge("div",x0e,[_v(a.$slots,"actions",{},void 0)])])],2))}}),O0e=Eg(w0e,[["__scopeId","data-v-f160c287"]]),P0e={class:"mobile-shell__content"},I0e=re({__name:"MobileLayout",setup(e){const t=e$(),n={"m-dashboard":"داشبورد","m-campaigns":"کمپین‌ها","m-campaign-create":"ایجاد کمپین","m-campaign-edit":"ویرایش کمپین","m-campaign-prizes":"مدیریت جوایز","m-users":"کاربران","m-user-detail":"جزئیات کاربر","m-spins":"اسپین‌ها","m-winners":"برندگان","m-sms":"لاگ پیامک","m-reports":"گزارش‌ها","m-audit":"لاگ بازرسی"},o=new Set(["m-campaign-create","m-campaign-edit","m-user-detail"]),r=new Set(["m-campaign-create","m-campaign-edit","m-campaign-prizes","m-user-detail"]),i=I(()=>{const u=t.meta.title;return u||n[String(t.name)]||"پنل مدیریت"}),l=I(()=>!o.has(String(t.name))),a=I(()=>r.has(String(t.name))||!!t.meta.showBack),s=I(()=>!!t.meta.hideTopBar),c=ie("m-slide-left");return Se(()=>t.fullPath,(u,d)=>{const f=u.split("/").filter(Boolean).length,h=(d||"").split("/").filter(Boolean).length;c.value=f>=h?"m-slide-left":"m-slide-right"}),(u,d)=>{const f=Vt("router-view");return yt(),tn("div",{class:Mr(["mobile-shell",{"mobile-shell--no-nav":!l.value}])},[s.value?Yn("",!0):(yt(),Nn(O0e,{key:0,title:i.value,"show-back":a.value},{actions:Ot(()=>[_v(u.$slots,"top-actions",{},void 0,!0)]),_:3},8,["title","show-back"])),Ge("main",P0e,[p(f,null,{default:Ot(({Component:h,route:m})=>[p(rn,{name:c.value,mode:"out-in"},{default:Ot(()=>[(yt(),tn("div",{key:m.fullPath,class:"mobile-shell__page"},[(yt(),Nn(ja(h)))]))]),_:2},1032,["name"])]),_:1})]),l.value?(yt(),Nn(y0e,{key:1})):Yn("",!0)],2)}}}),T0e=Eg(I0e,[["__scopeId","data-v-ba3e5f72"]]),E0e=[{path:"/login",name:"login",component:()=>Lt(()=>import("./LoginView-CnoEJDts.js"),__vite__mapDeps([0,1,2,3])),meta:{guestOnly:!0}},{path:"/m/login",name:"m-login",component:()=>Lt(()=>import("./MLoginView-DrgmodqC.js"),__vite__mapDeps([4,1,2,5])),meta:{guestOnly:!0,mobile:!0}},{path:"/",component:n0e,meta:{requiresAuth:!0},children:[{path:"",redirect:"/dashboard"},{path:"dashboard",name:"dashboard",component:()=>Lt(()=>import("./DashboardView-BSKs-P5X.js"),__vite__mapDeps([6,7,8,9,10,11,12,13]))},{path:"campaigns",name:"campaigns",component:()=>Lt(()=>import("./CampaignListView-CGptQkZU.js"),__vite__mapDeps([14,7,15,12,16]))},{path:"campaigns/create",name:"campaign-create",component:()=>Lt(()=>import("./CampaignFormView-DyefXmzg.js"),__vite__mapDeps([17,18,19,20]))},{path:"campaigns/:id/edit",name:"campaign-edit",component:()=>Lt(()=>import("./CampaignFormView-DyefXmzg.js"),__vite__mapDeps([17,18,19,20]))},{path:"campaigns/:campaignId/prizes",name:"campaign-prizes",component:()=>Lt(()=>import("./PrizeListView-Y0tRTqdG.js"),__vite__mapDeps([21,7,15,19,22]))},{path:"users",name:"users",component:()=>Lt(()=>import("./UserListView-CTSE4Pmv.js"),__vite__mapDeps([23,7,10,24,2,25]))},{path:"users/:id",name:"user-detail",component:()=>Lt(()=>import("./UserDetailView-BifrFoXz.js"),__vite__mapDeps([26,7,10,27]))},{path:"spins",name:"spins",component:()=>Lt(()=>import("./SpinListView-DM6_RMTR.js"),__vite__mapDeps([28,7,29]))},{path:"winners",name:"winners",component:()=>Lt(()=>import("./WinnerListView-DwOoquHF.js"),__vite__mapDeps([30,7,31]))},{path:"sms",name:"sms",component:()=>Lt(()=>import("./SmsLogListView-Cp_2i0gj.js"),__vite__mapDeps([32,7,33]))},{path:"reports",name:"reports",component:()=>Lt(()=>import("./ReportView-DAkvN1UA.js"),__vite__mapDeps([34,7,11,12,35]))},{path:"audit",name:"audit",component:()=>Lt(()=>import("./AuditLogView-Dx1yARgc.js"),__vite__mapDeps([36,7,37]))}]},{path:"/m",component:T0e,meta:{requiresAuth:!0,mobile:!0},children:[{path:"",redirect:"/m/dashboard"},{path:"dashboard",name:"m-dashboard",component:()=>Lt(()=>import("./MDashboardView-BOwauKcj.js"),__vite__mapDeps([38,7,8,10,11,39]))},{path:"campaigns",name:"m-campaigns",component:()=>Lt(()=>import("./MCampaignListView-DhD-QCtV.js"),__vite__mapDeps([40,7,15,12,41]))},{path:"campaigns/create",name:"m-campaign-create",component:()=>Lt(()=>import("./MCampaignFormView-BK95YxT0.js"),__vite__mapDeps([42,18,43]))},{path:"campaigns/:id/edit",name:"m-campaign-edit",component:()=>Lt(()=>import("./MCampaignFormView-BK95YxT0.js"),__vite__mapDeps([42,18,43]))},{path:"campaigns/:campaignId/prizes",name:"m-campaign-prizes",component:()=>Lt(()=>import("./MPrizeListView-C8piSCMK.js"),__vite__mapDeps([44,7,45]))},{path:"users",name:"m-users",component:()=>Lt(()=>import("./MUserListView-DgLEnBWI.js"),__vite__mapDeps([46,7,10,2,24,47]))},{path:"users/:id",name:"m-user-detail",component:()=>Lt(()=>import("./MUserDetailView-BLWa_4fj.js"),__vite__mapDeps([48,7,10,49]))},{path:"spins",name:"m-spins",component:()=>Lt(()=>import("./MSpinListView-D8QgZHY1.js"),__vite__mapDeps([50,7,51]))},{path:"winners",name:"m-winners",component:()=>Lt(()=>import("./MWinnerListView-CCZkNU_c.js"),__vite__mapDeps([52,7,53]))},{path:"sms",name:"m-sms",component:()=>Lt(()=>import("./MSmsLogView-DCYQGMw5.js"),__vite__mapDeps([54,7,55]))},{path:"reports",name:"m-reports",component:()=>Lt(()=>import("./MReportView-Q03nS5y6.js"),__vite__mapDeps([56,7,9,12,11,57]))},{path:"audit",name:"m-audit",component:()=>Lt(()=>import("./MAuditLogView-_cInDqas.js"),__vite__mapDeps([58,7,59]))}]},{path:"/:pathMatch(.*)*",redirect:()=>EM()?"/m/dashboard":"/dashboard"}],s$=hge({history:Uhe(),routes:E0e});function _0e(e){const t=String(e.name||""),n=qS[t];return n?{name:n,params:e.params,query:e.query}:null}function M0e(e){const t=String(e.name||""),n=IM[t];return n?{name:n,params:e.params,query:e.query}:null}s$.beforeEach(async(e,t,n)=>{const o=localStorage.getItem("admin_access_token"),r=EM(),i=e.path.startsWith("/m")||!!e.meta.mobile;if(e.meta.requiresAuth&&!o){n(r?"/m/login":"/login");return}if(e.meta.guestOnly&&o){n(r?"/m/dashboard":"/dashboard");return}if(o||e.meta.guestOnly){if(r&&!i){if(e.name==="login"){n({name:"m-login",query:e.query});return}const l=_0e(e);if(l){n(l);return}n("/m/dashboard");return}if(!r&&i){if(e.name==="m-login"){n({name:"login",query:e.query});return}const l=M0e(e);if(l){n(l);return}n("/dashboard");return}}n()});const _g=l6(nhe),A0e=Kpe();_g.use(A0e);_g.use(s$);_g.use(Wpe);lhe(s$);_g.mount("#app");export{WS as $,yS as A,Dh as B,zS as C,B1 as D,gg as E,He as F,xb as G,Au as H,Ve as I,fn as J,mr as K,bg as L,GS as M,Mr as N,un as O,$g as P,e$ as Q,ku as R,ua as S,Cg as T,ns as U,tC as V,ag as W,hg as X,JR as Y,I as Z,Eg as _,Ge as a,p as b,tn as c,re as d,ct as e,vn as f,ft as g,ie as h,QS as i,EM as j,N0e as k,Ue as l,Wn as m,ji as n,yt as o,lt as p,_n as q,Vt as r,Yn as s,Zn as t,yA as u,oo as v,Ot as w,Nn as x,Mf as y,po as z}; diff --git a/apps/admin/dist/assets/index-CbZGMCSS.js b/apps/admin/dist/assets/index-CbZGMCSS.js new file mode 100644 index 0000000..5212829 --- /dev/null +++ b/apps/admin/dist/assets/index-CbZGMCSS.js @@ -0,0 +1,60 @@ +import{b as iw,I as ow}from"./index-C4s_T2hP.js";var U2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"};function jy(r){for(var e=1;e"u"&&typeof self<"u"?yt.worker=!0:!yt.hasGlobalWindow||"Deno"in window?(yt.node=!0,yt.svgSupported=!0):K2(navigator.userAgent,yt);function K2(r,e){var t=e.browser,a=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);a&&(t.firefox=!0,t.version=a[1]),n&&(t.ie=!0,t.version=n[1]),i&&(t.edge=!0,t.version=i[1],t.newEdge=+i[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}var Ud=12,uw="sans-serif",Ua=Ud+"px "+uw,J2=20,Q2=100,j2="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function tI(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t=0)s=o*t.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",n[u]+":0",a[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return t}function xI(r,e,t){for(var a=t?"invTrans":"trans",n=e[a],i=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),h=2*u,v=f.left,c=f.top;o.push(v,c),l=l&&i&&v===i[h]&&c===i[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(e.srcCoords=o,e[a]=t?nm(s,o):nm(o,s))}function gw(r){return r.nodeName.toUpperCase()==="CANVAS"}var bI=/([&<>"'])/g,wI={"&":"&","<":"<",">":">",'"':""","'":"'"};function we(r){return r==null?"":(r+"").replace(bI,function(e,t){return wI[t]})}var TI=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Eh=[],AI=yt.browser.firefox&&+yt.browser.version.split(".")[0]<39;function lp(r,e,t,a){return t=t||{},a?om(r,e,t):AI&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):om(r,e,t),t}function om(r,e,t){if(yt.domSupported&&r.getBoundingClientRect){var a=e.clientX,n=e.clientY;if(gw(r)){var i=r.getBoundingClientRect();t.zrX=a-i.left,t.zrY=n-i.top;return}else if(sp(Eh,r,a,n)){t.zrX=Eh[0],t.zrY=Eh[1];return}}t.zrX=t.zrY=0}function Jd(r){return r||window.event}function Ke(r,e,t){if(e=Jd(e),e.zrX!=null)return e;var a=e.type,n=a&&a.indexOf("touch")>=0;if(n){var o=a!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&lp(r,o,e,t)}else{lp(r,e,e,t);var i=CI(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&TI.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function CI(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,a=r.deltaY;if(t==null||a==null)return e;var n=Math.abs(a!==0?a:t),i=a>0?-1:a<0?1:t>0?-1:1;return 3*n*i}function up(r,e,t,a){r.addEventListener(e,t,a)}function DI(r,e,t,a){r.removeEventListener(e,t,a)}var oa=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function sm(r){return r.which===2||r.which===3}var MI=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,a){return this._doTrack(e,t,a),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,a){var n=e.touches;if(n){for(var i={points:[],touches:[],target:t,event:e},o=0,s=n.length;o1&&a&&a.length>1){var i=lm(a)/lm(n);!isFinite(i)&&(i=1),e.pinchScale=i;var o=II(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function He(){return[1,0,0,1,0,0]}function Zf(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Qd(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function ra(r,e,t){var a=e[0]*t[0]+e[2]*t[1],n=e[1]*t[0]+e[3]*t[1],i=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=a,r[1]=n,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function Fr(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function si(r,e,t,a){a===void 0&&(a=[0,0]);var n=e[0],i=e[2],o=e[4],s=e[1],l=e[3],u=e[5],f=Math.sin(t),h=Math.cos(t);return r[0]=n*h+s*f,r[1]=-n*f+s*h,r[2]=i*h+l*f,r[3]=-i*f+h*l,r[4]=h*(o-a[0])+f*(u-a[1])+a[0],r[5]=h*(u-a[1])-f*(o-a[0])+a[1],r}function jd(r,e,t){var a=t[0],n=t[1];return r[0]=e[0]*a,r[1]=e[1]*n,r[2]=e[2]*a,r[3]=e[3]*n,r[4]=e[4]*a,r[5]=e[5]*n,r}function ho(r,e){var t=e[0],a=e[2],n=e[4],i=e[1],o=e[3],s=e[5],l=t*o-i*a;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-a*l,r[3]=t*l,r[4]=(a*s-o*n)*l,r[5]=(i*n-t*s)*l,r):null}function LI(r){var e=He();return Qd(e,r),e}var ft=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,a=this.y-e.y;return Math.sqrt(t*t+a*a)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,a=this.y-e.y;return t*t+a*a},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,a=this.y;return this.x=e[0]*t+e[2]*a+e[4],this.y=e[1]*t+e[3]*a+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,a){e.x=t,e.y=a},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,a){e.x=t.x+a.x,e.y=t.y+a.y},r.sub=function(e,t,a){e.x=t.x-a.x,e.y=t.y-a.y},r.scale=function(e,t,a){e.x=t.x*a,e.y=t.y*a},r.scaleAndAdd=function(e,t,a,n){e.x=t.x+a.x*n,e.y=t.y+a.y*n},r.lerp=function(e,t,a,n){var i=1-n;e.x=i*t.x+n*a.x,e.y=i*t.y+n*a.y},r}(),Dl=Math.min,Ml=Math.max,en=new ft,rn=new ft,an=new ft,nn=new ft,Co=new ft,Do=new ft,ht=function(){function r(e,t,a,n){a<0&&(e=e+a,a=-a),n<0&&(t=t+n,n=-n),this.x=e,this.y=t,this.width=a,this.height=n}return r.prototype.union=function(e){var t=Dl(e.x,this.x),a=Dl(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Ml(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Ml(e.y+e.height,this.y+this.height)-a:this.height=e.height,this.x=t,this.y=a},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,a=e.width/t.width,n=e.height/t.height,i=He();return Fr(i,i,[-t.x,-t.y]),jd(i,i,[a,n]),Fr(i,i,[e.x,e.y]),i},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var a=this,n=a.x,i=a.x+a.width,o=a.y,s=a.y+a.height,l=e.x,u=e.x+e.width,f=e.y,h=e.y+e.height,v=!(ip&&(p=_,dp&&(p=S,y=a.x&&e<=a.x+a.width&&t>=a.y&&t<=a.y+a.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,a){if(!a){e!==t&&r.copy(e,t);return}if(a[1]<1e-5&&a[1]>-1e-5&&a[2]<1e-5&&a[2]>-1e-5){var n=a[0],i=a[3],o=a[4],s=a[5];e.x=t.x*n+o,e.y=t.y*i+s,e.width=t.width*n,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}en.x=an.x=t.x,en.y=nn.y=t.y,rn.x=nn.x=t.x+t.width,rn.y=an.y=t.y+t.height,en.transform(a),nn.transform(a),rn.transform(a),an.transform(a),e.x=Dl(en.x,rn.x,an.x,nn.x),e.y=Dl(en.y,rn.y,an.y,nn.y);var l=Ml(en.x,rn.x,an.x,nn.x),u=Ml(en.y,rn.y,an.y,nn.y);e.width=l-e.x,e.height=u-e.y},r}(),yw="silent";function PI(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:RI}}function RI(){oa(this.event)}var EI=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(sr),Mo=function(){function r(e,t){this.x=e,this.y=t}return r}(),kI=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Oh=new ht(0,0,0,0),mw=function(r){k(e,r);function e(t,a,n,i,o){var s=r.call(this)||this;return s._hovered=new Mo(0,0),s.storage=t,s.painter=a,s.painterRoot=i,s._pointerSize=o,n=n||new EI,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new yI(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(D(kI,function(a){t.on&&t.on(a,this[a],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var a=t.zrX,n=t.zrY,i=_w(this,a,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=i?new Mo(a,n):this.findHover(a,n),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var a=t.zrEventControl;a!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),a!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Mo(0,0)},e.prototype.dispatch=function(t,a){var n=this[t];n&&n.call(this,a)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var a=this.proxy;a.setCursor&&a.setCursor(t)},e.prototype.dispatchToElement=function(t,a,n){t=t||{};var i=t.target;if(!(i&&i.silent)){for(var o="on"+a,s=PI(a,t,n);i&&(i[o]&&(s.cancelBubble=!!i[o].call(i,s)),i.trigger(a,s),i=i.__hostTarget?i.__hostTarget:i.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(a,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(a,s)}))}},e.prototype.findHover=function(t,a,n){var i=this.storage.getDisplayList(),o=new Mo(t,a);if(um(i,o,t,a,n),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new ht(t-u,a-u,l,l),h=i.length-1;h>=0;h--){var v=i[h];v!==n&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(Oh.copy(v.getBoundingRect()),v.transform&&Oh.applyTransform(v.transform),Oh.intersect(f)&&s.push(v))}if(s.length)for(var c=4,p=Math.PI/12,d=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(i,r,e)}});function OI(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var a=r,n=void 0,i=!1;a;){if(a.ignoreClip&&(i=!0),!i){var o=a.getClipPath();if(o&&!o.contain(e,t))return!1}a.silent&&(n=!0);var s=a.__hostTarget;a=s||a.parent}return n?yw:!0}return!1}function um(r,e,t,a,n){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==n&&!o.ignore&&(s=OI(o,t,a))&&(!e.topTarget&&(e.topTarget=o),s!==yw)){e.target=o;break}}}function _w(r,e,t){var a=r.painter;return e<0||e>a.getWidth()||t<0||t>a.getHeight()}var Sw=32,Io=7;function NI(r){for(var e=0;r>=Sw;)e|=r&1,r>>=1;return r+e}function fm(r,e,t,a){var n=e+1;if(n===t)return 1;if(a(r[n++],r[e])<0){for(;n=0;)n++;return n-e}function BI(r,e,t){for(t--;e>>1,n(i,r[l])<0?s=l:o=l+1;var u=a-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=i}}function Nh(r,e,t,a,n,i){var o=0,s=0,l=1;if(i(r,e[t+n])>0){for(s=a-n;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o>>1);i(r,e[t+f])>0?o=f+1:l=f}return l}function Bh(r,e,t,a,n,i){var o=0,s=0,l=1;if(i(r,e[t+n])<0){for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=a-n;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o>>1);i(r,e[t+f])<0?l=f:o=f+1}return l}function VI(r,e){var t=Io,a,n,i=0,o=[];a=[],n=[];function s(c,p){a[i]=c,n[i]=p,i+=1}function l(){for(;i>1;){var c=i-2;if(c>=1&&n[c-1]<=n[c]+n[c+1]||c>=2&&n[c-2]<=n[c]+n[c-1])n[c-1]n[c+1])break;f(c)}}function u(){for(;i>1;){var c=i-2;c>0&&n[c-1]=Io||w>=Io);if(T)break;b<0&&(b=0),b+=2}if(t=b,t<1&&(t=1),p===1){for(y=0;y=0;y--)r[x+y]=r[b+y];r[S]=o[_];return}for(var w=t;;){var T=0,A=0,C=!1;do if(e(o[_],r[m])<0){if(r[S--]=r[m--],T++,A=0,--p===0){C=!0;break}}else if(r[S--]=o[_--],A++,T=0,--g===1){C=!0;break}while((T|A)=0;y--)r[x+y]=r[b+y];if(p===0){C=!0;break}}if(r[S--]=o[_--],--g===1){C=!0;break}if(A=g-Nh(r[m],o,0,g,g-1,e),A!==0){for(S-=A,_-=A,g-=A,x=S+1,b=_+1,y=0;y=Io||A>=Io);if(C)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),g===1){for(S-=p,m-=p,x=S+1,b=m+1,y=p-1;y>=0;y--)r[x+y]=r[b+y];r[S]=o[_]}else{if(g===0)throw new Error;for(b=S-(g-1),y=0;ys&&(l=s),hm(r,t,t+l,t+i,e),i=l}o.pushRun(t,i),o.mergeRuns(),n-=i,t+=i}while(n!==0);o.forceMergeRuns()}}var Ge=1,es=2,Bi=4,vm=!1;function Vh(){vm||(vm=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function cm(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var zI=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=cm}return r.prototype.traverse=function(e,t){for(var a=0;a0&&(f.__clipPaths=[]),isNaN(f.z)&&(Vh(),f.z=0),isNaN(f.z2)&&(Vh(),f.z2=0),isNaN(f.zlevel)&&(Vh(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=e.getDecalElement&&e.getDecalElement();h&&this._updateAndAddDisplayable(h,t,a);var v=e.getTextGuideLine();v&&this._updateAndAddDisplayable(v,t,a);var c=e.getTextContent();c&&this._updateAndAddDisplayable(c,t,a)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,a=e.length;t=0&&this._roots.splice(n,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}(),Ku;Ku=yt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var ps={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)))},elasticOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/a)+1)},elasticInOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-ps.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?ps.bounceIn(r*2)*.5:ps.bounceOut(r*2-1)*.5+.5}},Il=Math.pow,Ga=Math.sqrt,Ju=1e-8,xw=1e-4,pm=Ga(3),Ll=1/3,Rr=oi(),tr=oi(),Xi=oi();function ka(r){return r>-Ju&&rJu||r<-Ju}function te(r,e,t,a,n){var i=1-n;return i*i*(i*r+3*n*e)+n*n*(n*a+3*i*t)}function dm(r,e,t,a,n){var i=1-n;return 3*(((e-r)*i+2*(t-e)*n)*i+(a-t)*n*n)}function Qu(r,e,t,a,n,i){var o=a+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-n,f=s*s-3*o*l,h=s*l-9*o*u,v=l*l-3*s*u,c=0;if(ka(f)&&ka(h))if(ka(s))i[0]=0;else{var p=-l/s;p>=0&&p<=1&&(i[c++]=p)}else{var d=h*h-4*f*v;if(ka(d)){var g=h/f,p=-s/o+g,y=-g/2;p>=0&&p<=1&&(i[c++]=p),y>=0&&y<=1&&(i[c++]=y)}else if(d>0){var m=Ga(d),_=f*s+1.5*o*(-h+m),S=f*s+1.5*o*(-h-m);_<0?_=-Il(-_,Ll):_=Il(_,Ll),S<0?S=-Il(-S,Ll):S=Il(S,Ll);var p=(-s-(_+S))/(3*o);p>=0&&p<=1&&(i[c++]=p)}else{var b=(2*f*s-3*o*h)/(2*Ga(f*f*f)),x=Math.acos(b)/3,w=Ga(f),T=Math.cos(x),p=(-s-2*w*T)/(3*o),y=(-s+w*(T+pm*Math.sin(x)))/(3*o),A=(-s+w*(T-pm*Math.sin(x)))/(3*o);p>=0&&p<=1&&(i[c++]=p),y>=0&&y<=1&&(i[c++]=y),A>=0&&A<=1&&(i[c++]=A)}}return c}function ww(r,e,t,a,n){var i=6*t-12*e+6*r,o=9*e+3*a-3*r-9*t,s=3*e-3*r,l=0;if(ka(o)){if(bw(i)){var u=-s/i;u>=0&&u<=1&&(n[l++]=u)}}else{var f=i*i-4*o*s;if(ka(f))n[0]=-i/(2*o);else if(f>0){var h=Ga(f),u=(-i+h)/(2*o),v=(-i-h)/(2*o);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function Xa(r,e,t,a,n,i){var o=(e-r)*n+r,s=(t-e)*n+e,l=(a-t)*n+t,u=(s-o)*n+o,f=(l-s)*n+s,h=(f-u)*n+u;i[0]=r,i[1]=o,i[2]=u,i[3]=h,i[4]=h,i[5]=f,i[6]=l,i[7]=a}function Tw(r,e,t,a,n,i,o,s,l,u,f){var h,v=.005,c=1/0,p,d,g,y;Rr[0]=l,Rr[1]=u;for(var m=0;m<1;m+=.05)tr[0]=te(r,t,n,o,m),tr[1]=te(e,a,i,s,m),g=Un(Rr,tr),g=0&&g=0&&u<=1&&(n[l++]=u)}}else{var f=o*o-4*i*s;if(ka(f)){var u=-o/(2*i);u>=0&&u<=1&&(n[l++]=u)}else if(f>0){var h=Ga(f),u=(-o+h)/(2*i),v=(-o-h)/(2*i);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function Aw(r,e,t){var a=r+t-2*e;return a===0?.5:(r-e)/a}function Ps(r,e,t,a,n){var i=(e-r)*a+r,o=(t-e)*a+e,s=(o-i)*a+i;n[0]=r,n[1]=i,n[2]=s,n[3]=s,n[4]=o,n[5]=t}function Cw(r,e,t,a,n,i,o,s,l){var u,f=.005,h=1/0;Rr[0]=o,Rr[1]=s;for(var v=0;v<1;v+=.05){tr[0]=oe(r,t,n,v),tr[1]=oe(e,a,i,v);var c=Un(Rr,tr);c=0&&c=1?1:Qu(0,a,i,1,l,s)&&te(0,n,o,1,s[0])}}}var UI=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Xt,this.ondestroy=e.ondestroy||Xt,this.onrestart=e.onrestart||Xt,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var a=this._life,n=e-this._startTime-this._pausedTime,i=n/a;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=n%a;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=J(e)?e:ps[e]||tg(e)},r}(),Dw=function(){function r(e){this.value=e}return r}(),YI=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new Dw(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,a=e.next;t?t.next=a:this.head=a,a?a.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),nl=function(){function r(e){this._list=new YI,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var a=this._list,n=this._map,i=null;if(n[e]==null){var o=a.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=a.head;a.remove(l),delete n[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new Dw(t),s.key=e,a.insertEntry(s),n[e]=s}return i},r.prototype.get=function(e){var t=this._map[e],a=this._list;if(t!=null)return t!==a.tail&&(a.remove(t),a.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),gm={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function mr(r){return r=Math.round(r),r<0?0:r>255?255:r}function XI(r){return r=Math.round(r),r<0?0:r>360?360:r}function Rs(r){return r<0?0:r>1?1:r}function zh(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?mr(parseFloat(e)/100*255):mr(parseInt(e,10))}function Yn(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Rs(parseFloat(e)/100):Rs(parseFloat(e))}function Gh(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function Oa(r,e,t){return r+(e-r)*t}function qe(r,e,t,a,n){return r[0]=e,r[1]=t,r[2]=a,r[3]=n,r}function hp(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var Mw=new nl(20),Pl=null;function gi(r,e){Pl&&hp(Pl,e),Pl=Mw.put(r,Pl||e.slice())}function We(r,e){if(r){e=e||[];var t=Mw.get(r);if(t)return hp(e,t);r=r+"";var a=r.replace(/ /g,"").toLowerCase();if(a in gm)return hp(e,gm[a]),gi(r,e),e;var n=a.length;if(a.charAt(0)==="#"){if(n===4||n===5){var i=parseInt(a.slice(1,4),16);if(!(i>=0&&i<=4095)){qe(e,0,0,0,1);return}return qe(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,n===5?parseInt(a.slice(4),16)/15:1),gi(r,e),e}else if(n===7||n===9){var i=parseInt(a.slice(1,7),16);if(!(i>=0&&i<=16777215)){qe(e,0,0,0,1);return}return qe(e,(i&16711680)>>16,(i&65280)>>8,i&255,n===9?parseInt(a.slice(7),16)/255:1),gi(r,e),e}return}var o=a.indexOf("("),s=a.indexOf(")");if(o!==-1&&s+1===n){var l=a.substr(0,o),u=a.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?qe(e,+u[0],+u[1],+u[2],1):qe(e,0,0,0,1);f=Yn(u.pop());case"rgb":if(u.length>=3)return qe(e,zh(u[0]),zh(u[1]),zh(u[2]),u.length===3?f:Yn(u[3])),gi(r,e),e;qe(e,0,0,0,1);return;case"hsla":if(u.length!==4){qe(e,0,0,0,1);return}return u[3]=Yn(u[3]),vp(u,e),gi(r,e),e;case"hsl":if(u.length!==3){qe(e,0,0,0,1);return}return vp(u,e),gi(r,e),e;default:return}}qe(e,0,0,0,1)}}function vp(r,e){var t=(parseFloat(r[0])%360+360)%360/360,a=Yn(r[1]),n=Yn(r[2]),i=n<=.5?n*(a+1):n+a-n*a,o=n*2-i;return e=e||[],qe(e,mr(Gh(o,i,t+1/3)*255),mr(Gh(o,i,t)*255),mr(Gh(o,i,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function ZI(r){if(r){var e=r[0]/255,t=r[1]/255,a=r[2]/255,n=Math.min(e,t,a),i=Math.max(e,t,a),o=i-n,s=(i+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+n):u=o/(2-i-n);var f=((i-e)/6+o/2)/o,h=((i-t)/6+o/2)/o,v=((i-a)/6+o/2)/o;e===i?l=v-h:t===i?l=1/3+f-v:a===i&&(l=2/3+h-f),l<0&&(l+=1),l>1&&(l-=1)}var c=[l*360,u,s];return r[3]!=null&&c.push(r[3]),c}}function cp(r,e){var t=We(r);if(t){for(var a=0;a<3;a++)e<0?t[a]=t[a]*(1-e)|0:t[a]=(255-t[a])*e+t[a]|0,t[a]>255?t[a]=255:t[a]<0&&(t[a]=0);return aa(t,t.length===4?"rgba":"rgb")}}function Fh(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var a=r*(e.length-1),n=Math.floor(a),i=Math.ceil(a),o=e[n],s=e[i],l=a-n;return t[0]=mr(Oa(o[0],s[0],l)),t[1]=mr(Oa(o[1],s[1],l)),t[2]=mr(Oa(o[2],s[2],l)),t[3]=Rs(Oa(o[3],s[3],l)),t}}function $I(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var a=r*(e.length-1),n=Math.floor(a),i=Math.ceil(a),o=We(e[n]),s=We(e[i]),l=a-n,u=aa([mr(Oa(o[0],s[0],l)),mr(Oa(o[1],s[1],l)),mr(Oa(o[2],s[2],l)),Rs(Oa(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:n,rightIndex:i,value:a}:u}}function ds(r,e,t,a){var n=We(r);if(r)return n=ZI(n),e!=null&&(n[0]=XI(e)),t!=null&&(n[1]=Yn(t)),a!=null&&(n[2]=Yn(a)),aa(vp(n),"rgba")}function ju(r,e){var t=We(r);if(t&&e!=null)return t[3]=Rs(e),aa(t,"rgba")}function aa(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function tf(r,e){var t=We(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var ym=new nl(100);function pp(r){if(Y(r)){var e=ym.get(r);return e||(e=cp(r,-.1),ym.put(r,e)),e}else if(Yf(r)){var t=V({},r);return t.colorStops=G(r.colorStops,function(a){return{offset:a.offset,color:cp(a.color,-.1)}}),t}return r}var ef=Math.round;function Es(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=We(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var mm=1e-4;function Na(r){return r-mm}function Rl(r){return ef(r*1e3)/1e3}function dp(r){return ef(r*1e4)/1e4}function qI(r){return"matrix("+Rl(r[0])+","+Rl(r[1])+","+Rl(r[2])+","+Rl(r[3])+","+dp(r[4])+","+dp(r[5])+")"}var KI={left:"start",right:"end",center:"middle",middle:"middle"};function JI(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function QI(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function jI(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function Iw(r){return r&&!!r.image}function tL(r){return r&&!!r.svgElement}function eg(r){return Iw(r)||tL(r)}function Lw(r){return r.type==="linear"}function Pw(r){return r.type==="radial"}function Rw(r){return r&&(r.type==="linear"||r.type==="radial")}function $f(r){return"url(#"+r+")"}function Ew(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function kw(r){var e=r.x||0,t=r.y||0,a=(r.rotation||0)*Mu,n=st(r.scaleX,1),i=st(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),a&&l.push("rotate("+a+")"),(n!==1||i!==1)&&l.push("scale("+n+","+i+")"),(o||s)&&l.push("skew("+ef(o*Mu)+"deg, "+ef(s*Mu)+"deg)"),l.join(" ")}var eL=function(){return yt.hasGlobalWindow&&J(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),gp=Array.prototype.slice;function Jr(r,e,t){return(e-r)*t+r}function Hh(r,e,t,a){for(var n=e.length,i=0;ia?e:r,i=Math.min(t,a),o=n[i-1]||{color:[0,0,0,0],offset:0},s=i;so;if(s)a.length=o;else for(var l=i;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,a){this._needsSort=!0;var n=this.keyframes,i=n.length,o=!1,s=Sm,l=t;if(ye(t)){var u=iL(t);s=u,(u===1&&!wt(t[0])||u===2&&!wt(t[0][0]))&&(o=!0)}else if(wt(t)&&!Is(t))s=kl;else if(Y(t))if(!isNaN(+t))s=kl;else{var f=We(t);f&&(l=f,s=rs)}else if(Yf(t)){var h=V({},l);h.colorStops=G(t.colorStops,function(c){return{offset:c.offset,color:We(c.color)}}),Lw(t)?s=yp:Pw(t)&&(s=mp),l=h}i===0?this.valType=s:(s!==this.valType||s===Sm)&&(o=!0),this.discrete=this.discrete||o;var v={time:e,value:l,rawValue:t,percent:0};return a&&(v.easing=a,v.easingFunc=J(a)?a:ps[a]||tg(a)),n.push(v),v},r.prototype.prepare=function(e,t){var a=this.keyframes;this._needsSort&&a.sort(function(d,g){return d.time-g.time});for(var n=this.valType,i=a.length,o=a[i-1],s=this.discrete,l=Ol(n),u=xm(n),f=0;f=0&&!(o[f].percent<=t);f--);f=v(f,s-2)}else{for(f=h;ft);f++);f=v(f-1,s-2)}p=o[f+1],c=o[f]}if(c&&p){this._lastFr=f,this._lastFrP=t;var g=p.percent-c.percent,y=g===0?1:v((t-c.percent)/g,1);p.easingFunc&&(y=p.easingFunc(y));var m=a?this._additiveValue:u?Lo:e[l];if((Ol(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)e[l]=y<1?c.rawValue:p.rawValue;else if(Ol(i))i===Eu?Hh(m,c[n],p[n],y):rL(m,c[n],p[n],y);else if(xm(i)){var _=c[n],S=p[n],b=i===yp;e[l]={type:b?"linear":"radial",x:Jr(_.x,S.x,y),y:Jr(_.y,S.y,y),colorStops:G(_.colorStops,function(w,T){var A=S.colorStops[T];return{offset:Jr(w.offset,A.offset,y),color:Ru(Hh([],w.color,A.color,y))}}),global:S.global},b?(e[l].x2=Jr(_.x2,S.x2,y),e[l].y2=Jr(_.y2,S.y2,y)):e[l].r=Jr(_.r,S.r,y)}else if(u)Hh(m,c[n],p[n],y),a||(e[l]=Ru(m));else{var x=Jr(c[n],p[n],y);a?this._additiveValue=x:e[l]=x}a&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,a=this.propName,n=this._additiveValue;t===kl?e[a]=e[a]+n:t===rs?(We(e[a],Lo),El(Lo,Lo,n,1),e[a]=Ru(Lo)):t===Eu?El(e[a],e[a],n,1):t===Ow&&_m(e[a],e[a],n,1)},r}(),rg=function(){function r(e,t,a,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&n){Zd("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=a}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,a){return this.whenWithKeys(e,t,_t(t),a)},r.prototype.whenWithKeys=function(e,t,a,n){for(var i=this._tracks,o=0;o0&&l.addKeyframe(0,gs(u),n),this._trackKeys.push(s)}l.addKeyframe(e,gs(t[s]),n)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,a=0;a0)){this._started=1;for(var t=this,a=[],n=this._maxTime||0,i=0;i1){var s=o.pop();i.addKeyframe(s.time,e[n]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r}();function Hi(){return new Date().getTime()}var sL=function(r){k(e,r);function e(t){var a=r.call(this)||this;return a._running=!1,a._time=0,a._pausedTime=0,a._pauseStart=0,a._paused=!1,t=t||{},a.stage=t.stage||{},a}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var a=t.getClip();a&&this.addClip(a)},e.prototype.removeClip=function(t){if(t.animation){var a=t.prev,n=t.next;a?a.next=n:this._head=n,n?n.prev=a:this._tail=a,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var a=t.getClip();a&&this.removeClip(a),t.animation=null},e.prototype.update=function(t){for(var a=Hi()-this._pausedTime,n=a-this._time,i=this._head;i;){var o=i.next,s=i.step(a,n);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=a,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function a(){t._running&&(Ku(a),!t._paused&&t.update())}Ku(a)},e.prototype.start=function(){this._running||(this._time=Hi(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Hi(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Hi()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var a=t.next;t.prev=t.next=t.animation=null,t=a}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,a){a=a||{},this.start();var n=new rg(t,a.loop);return this.addAnimator(n),n},e}(sr),lL=300,Wh=yt.domSupported,Uh=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=G(r,function(n){var i=n.replace("mouse","pointer");return t.hasOwnProperty(i)?i:n});return{mouse:r,touch:e,pointer:a}}(),bm={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},wm=!1;function _p(r){var e=r.pointerType;return e==="pen"||e==="touch"}function uL(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function Yh(r){r&&(r.zrByTouch=!0)}function fL(r,e){return Ke(r.dom,new hL(r,e),!0)}function Nw(r,e){for(var t=e,a=!1;t&&t.nodeType!==9&&!(a=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return a}var hL=function(){function r(e,t){this.stopPropagation=Xt,this.stopImmediatePropagation=Xt,this.preventDefault=Xt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),cr={mousedown:function(r){r=Ke(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Ke(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Ke(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Ke(this.dom,r);var e=r.toElement||r.relatedTarget;Nw(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){wm=!0,r=Ke(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){wm||(r=Ke(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Ke(this.dom,r),Yh(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),cr.mousemove.call(this,r),cr.mousedown.call(this,r)},touchmove:function(r){r=Ke(this.dom,r),Yh(r),this.handler.processGesture(r,"change"),cr.mousemove.call(this,r)},touchend:function(r){r=Ke(this.dom,r),Yh(r),this.handler.processGesture(r,"end"),cr.mouseup.call(this,r),+new Date-+this.__lastTouchMomentCm||r<-Cm}var sn=[],yi=[],Zh=He(),$h=Math.abs,jr=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return on(this.rotation)||on(this.x)||on(this.y)||on(this.scaleX-1)||on(this.scaleY-1)||on(this.skewX)||on(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),a=this.transform;if(!(t||e)){a&&(Am(a),this.invTransform=null);return}a=a||He(),t?this.getLocalTransform(a):Am(a),e&&(t?ra(a,e,a):Qd(a,e)),this.transform=a,this._resolveGlobalScaleRatio(a)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(sn);var a=sn[0]<0?-1:1,n=sn[1]<0?-1:1,i=((sn[0]-a)*t+a)/sn[0]||0,o=((sn[1]-n)*t+n)/sn[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||He(),ho(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],a=e[2]*e[2]+e[3]*e[3],n=Math.atan2(e[1],e[0]),i=Math.PI/2+n-Math.atan2(e[3],e[2]);a=Math.sqrt(a)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-n,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=a,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||He(),ra(yi,e.invTransform,t),t=yi);var a=this.originX,n=this.originY;(a||n)&&(Zh[4]=a,Zh[5]=n,ra(yi,t,Zh),yi[4]-=a,yi[5]-=n,t=yi),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var a=[e,t],n=this.invTransform;return n&&fe(a,a,n),a},r.prototype.transformCoordToGlobal=function(e,t){var a=[e,t],n=this.transform;return n&&fe(a,a,n),a},r.prototype.getLineScale=function(){var e=this.transform;return e&&$h(e[0]-1)>1e-10&&$h(e[3]-1)>1e-10?Math.sqrt($h(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){Vw(this,e)},r.getLocalTransform=function(e,t){t=t||[];var a=e.originX||0,n=e.originY||0,i=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,f=e.x,h=e.y,v=e.skewX?Math.tan(e.skewX):0,c=e.skewY?Math.tan(-e.skewY):0;if(a||n||s||l){var p=a+s,d=n+l;t[4]=-p*i-v*d*o,t[5]=-d*o-c*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=c*i,t[2]=v*o,u&&si(t,t,u),t[4]+=a+f,t[5]+=n+h,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),Hr=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Vw(r,e){for(var t=0;t=0?parseFloat(r)/100*e:parseFloat(r):r}function af(r,e,t){var a=e.position||"inside",n=e.distance!=null?e.distance:5,i=t.height,o=t.width,s=i/2,l=t.x,u=t.y,f="left",h="top";if(a instanceof Array)l+=Sr(a[0],t.width),u+=Sr(a[1],t.height),f=null,h=null;else switch(a){case"left":l-=n,u+=s,f="right",h="middle";break;case"right":l+=n+o,u+=s,h="middle";break;case"top":l+=o/2,u-=n,f="center",h="bottom";break;case"bottom":l+=o/2,u+=i+n,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=n,u+=s,h="middle";break;case"insideRight":l+=o-n,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=n,f="center";break;case"insideBottom":l+=o/2,u+=i-n,f="center",h="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,f="right";break;case"insideBottomLeft":l+=n,u+=i-n,h="bottom";break;case"insideBottomRight":l+=o-n,u+=i-n,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var qh="__zr_normal__",Kh=Hr.concat(["ignore"]),gL=Gr(Hr,function(r,e){return r[e]=!0,r},{ignore:!1}),mi={},yL=new ht(0,0,0,0),Kf=function(){function r(e){this.id=vw(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,a){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var a=this.textConfig,n=a.local,i=t.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=n?this:null;var u=!1;if(i.copyTransform(t),a.position!=null){var f=yL;a.layoutRect?f.copy(a.layoutRect):f.copy(this.getBoundingRect()),n||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(mi,a,f):af(mi,a,f),i.x=mi.x,i.y=mi.y,o=mi.align,s=mi.verticalAlign;var h=a.origin;if(h&&a.rotation!=null){var v=void 0,c=void 0;h==="center"?(v=f.width*.5,c=f.height*.5):(v=Sr(h[0],f.width),c=Sr(h[1],f.height)),u=!0,i.originX=-i.x+v+(n?0:f.x),i.originY=-i.y+c+(n?0:f.y)}}a.rotation!=null&&(i.rotation=a.rotation);var p=a.offset;p&&(i.x+=p[0],i.y+=p[1],u||(i.originX=-p[0],i.originY=-p[1]));var d=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;d&&this.canBeInsideText()?(y=a.insideFill,m=a.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=a.outsideFill,m=a.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(y),_=!0)),y=y||"#000",(y!==g.fill||m!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=y,g.stroke=m,g.autoStroke=_,g.align=o,g.verticalAlign=s,t.setDefaultTextStyle(g)),t.__dirty|=Ge,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?wp:bp},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),a=typeof t=="string"&&We(t);a||(a=[255,255,255,1]);for(var n=a[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)a[o]=a[o]*n+(i?0:255)*(1-n);return a[3]=1,aa(a,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},V(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(et(e))for(var a=e,n=_t(a),i=0;i0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(qh,!1,e)},r.prototype.useState=function(e,t,a,n){var i=e===qh,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(ct(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!i){Zd("State "+e+" not exists.");return}i||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||n);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!a&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,v=this._textGuide;return h&&h.useState(e,t,a,f),v&&v.useState(e,t,a,f),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Ge),u}}},r.prototype.useStates=function(e,t,a){if(!e.length)this.clearStates();else{var n=[],i=this.currentStates,o=e.length,s=o===i.length;if(s){for(var l=0;l0,p);var d=this._textContent,g=this._textGuide;d&&d.useStates(e,t,v),g&&g.useStates(e,t,v),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!v&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Ge)}},r.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},r.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var a=this.currentStates.slice();a.splice(t,1),this.useStates(a)}},r.prototype.replaceState=function(e,t,a){var n=this.currentStates.slice(),i=ct(n,e),o=ct(n,t)>=0;i>=0?o?n.splice(i,1):n[i]=t:a&&!o&&n.push(t),this.useStates(n)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},a,n=0;n=0&&i.splice(o,1)}),this.animators.push(e),a&&a.animation.addAnimator(e),a&&a.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var a=this.animators,n=a.length,i=[],o=0;o0&&t.during&&i[0].during(function(p,d){t.during(d)});for(var v=0;v0||n.force&&!o.length){var T=void 0,A=void 0,C=void 0;if(s){A={},v&&(T={});for(var S=0;S<_;S++){var y=d[S];A[y]=t[y],v?T[y]=a[y]:t[y]=a[y]}}else if(v){C={};for(var S=0;S<_;S++){var y=d[S];C[y]=gs(t[y]),_L(t,a,y)}}var b=new rg(t,!1,!1,h?Ct(p,function(I){return I.targetName===e}):null);b.targetName=e,n.scope&&(b.scope=n.scope),v&&T&&b.whenWithKeys(0,T,d),C&&b.whenWithKeys(0,C,d),b.whenWithKeys(u??500,s?A:a,d).delay(f||0),r.addAnimator(b,e),o.push(b)}}var at=function(r){k(e,r);function e(t){var a=r.call(this)||this;return a.isGroup=!0,a._children=[],a.attr(t),a}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var a=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,a){var n=ct(this._children,t);return n>=0&&this.replaceAt(a,n),this},e.prototype.replaceAt=function(t,a){var n=this._children,i=n[a];if(t&&t!==this&&t.parent!==this&&t!==i){n[a]=t,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var a=this.__zr;a&&a!==t.__zr&&t.addSelfToZr(a),a&&a.refresh()},e.prototype.remove=function(t){var a=this.__zr,n=this._children,i=ct(n,t);return i<0?this:(n.splice(i,1),t.parent=null,a&&t.removeSelfFromZr(a),a&&a.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,a=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,a){return this._disposed||this.handler.on(e,t,a),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(r<=n)return o;if(r>=i)return s}else{if(r>=n)return o;if(r<=i)return s}else{if(r===n)return o;if(r===i)return s}return(r-n)/l*u+o}function W(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Y(r)?ML(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function Ut(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),Fw),r=(+r).toFixed(e),t?r:+r}function nr(r){return r.sort(function(e,t){return e-t}),r}function kr(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return IL(r)}function IL(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),a=t>0?+e.slice(t+1):0,n=t>0?t:e.length,i=e.indexOf("."),o=i<0?0:n-1-i;return Math.max(0,o-a)}function Hw(r,e){var t=Math.log,a=Math.LN10,n=Math.floor(t(r[1]-r[0])/a),i=Math.round(t(Math.abs(e[1]-e[0]))/a),o=Math.min(Math.max(-n+i,0),20);return isFinite(o)?o:20}function LL(r,e){var t=Gr(r,function(c,p){return c+(isNaN(p)?0:p)},0);if(t===0)return[];for(var a=Math.pow(10,e),n=G(r,function(c){return(isNaN(c)?0:c)/t*a*100}),i=a*100,o=G(n,function(c){return Math.floor(c)}),s=Gr(o,function(c,p){return c+p},0),l=G(n,function(c,p){return c-o[p]});su&&(u=l[h],f=h);++o[f],l[f]=0,++s}return G(o,function(c){return c/a})}function PL(r,e){var t=Math.max(kr(r),kr(e)),a=r+e;return t>Fw?a:Ut(a,t)}var Pm=9007199254740991;function Ww(r){var e=Math.PI*2;return(r%e+e)%e}function ks(r){return r>-Lm&&r=10&&e++,e}function Uw(r,e){var t=ag(r),a=Math.pow(10,t),n=r/a,i;return n<1.5?i=1:n<2.5?i=2:n<4?i=3:n<7?i=5:i=10,r=i*a,t>=-20?+r.toFixed(t<0?-t:0):r}function jh(r,e){var t=(r.length-1)*e+1,a=Math.floor(t),n=+r[a-1],i=t-a;return i?n+i*(r[a]-n):n}function Rm(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,a=0;a=0||i&&ct(i,l)<0)){var u=a.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var aP=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],nP=ei(aP),iP=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return nP(this,e,t)},r}(),Cp=new nl(50);function oP(r){if(typeof r=="string"){var e=Cp.get(r);return e&&e.image}else return r}function sg(r,e,t,a,n){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var i=Cp.get(r),o={hostEl:t,cb:a,cbPayload:n};return i?(e=i.image,!Qf(e)&&i.pending.push(o)):(e=Ya.loadImage(r,Nm,Nm),e.__zrImageSrc=r,Cp.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function Nm(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=o;l++)s-=o;var u=Ue(t,e);return u>s&&(t="",u=0),s=r-u,n.ellipsis=t,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=r,n}function aT(r,e,t){var a=t.containerWidth,n=t.font,i=t.contentWidth;if(!a){r.textLine="",r.isTruncated=!1;return}var o=Ue(e,n);if(o<=a){r.textLine=e,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?lP(e,i,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=Ue(e,n)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function lP(r,e,t,a){for(var n=0,i=0,o=r.length;ip&&u){var d=Math.floor(p/s);f=f||v.length>d,v=v.slice(0,d)}if(r&&i&&h!=null)for(var g=rT(h,n,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),y={},m=0;ms&&ev(t,r.substring(s,u),e,o),ev(t,l[2],e,o,l[1]),s=tv.lastIndex}sn){var L=t.lines.length;x>0?(_.tokens=_.tokens.slice(0,x),y(_,b,S),t.lines=t.lines.slice(0,m+1)):t.lines=t.lines.slice(0,m),t.isTruncated=t.isTruncated||t.lines.length0&&p+a.accumWidth>a.width&&(f=e.split(` +`),u=!0),a.accumWidth=p}else{var d=nT(e,l,a.width,a.breakAll,a.accumWidth);a.accumWidth=d.accumWidth+c,h=d.linesWidths,f=d.lines}}else f=e.split(` +`);for(var g=0;g=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var pP=Gr(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function dP(r){return cP(r)?!!pP[r]:!0}function nT(r,e,t,a,n){for(var i=[],o=[],s="",l="",u=0,f=0,h=0;ht:n+f+c>t){f?(s||l)&&(p?(s||(s=l,l="",u=0,f=u),i.push(s),o.push(f-u),l+=v,u+=c,s="",f=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(f),s=v,f=c)):p?(i.push(l),o.push(u),l=v,u=c):(i.push(v),o.push(c));continue}f+=c,p?(l+=v,u+=c):(l&&(s+=l,l="",u=0),s+=v)}return!i.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(i.push(s),o.push(f)),i.length===1&&(f+=n),{accumWidth:f,lines:i,linesWidths:o}}var Dp="__zr_style_"+Math.round(Math.random()*10),Xn={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},jf={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Xn[Dp]=!0;var Vm=["z","z2","invisible"],gP=["invisible"],or=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var a=_t(t),n=0;n1e-4){s[0]=r-t,s[1]=e-a,l[0]=r+t,l[1]=e+a;return}if(Nl[0]=iv(n)*t+r,Nl[1]=nv(n)*a+e,Bl[0]=iv(i)*t+r,Bl[1]=nv(i)*a+e,u(s,Nl,Bl),f(l,Nl,Bl),n=n%un,n<0&&(n=n+un),i=i%un,i<0&&(i=i+un),n>i&&!o?i+=un:nn&&(Vl[0]=iv(c)*t+r,Vl[1]=nv(c)*a+e,u(s,Vl,s),f(l,Vl,l))}var kt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},fn=[],hn=[],Tr=[],ma=[],Ar=[],Cr=[],ov=Math.min,sv=Math.max,vn=Math.cos,cn=Math.sin,$r=Math.abs,Mp=Math.PI,Da=Mp*2,lv=typeof Float32Array<"u",Po=[];function uv(r){var e=Math.round(r/Mp*1e8)/1e8;return e%2*Mp}function lg(r,e){var t=uv(r[0]);t<0&&(t+=Da);var a=t-r[0],n=r[1];n+=a,!e&&n-t>=Da?n=t+Da:e&&t-n>=Da?n=t-Da:!e&&t>n?n=t+(Da-uv(t-n)):e&&t0&&(this._ux=$r(a/rf/e)||0,this._uy=$r(a/rf/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(kt.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var a=$r(e-this._xi),n=$r(t-this._yi),i=a>this._ux||n>this._uy;if(this.addData(kt.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=a*a+n*n;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,a,n,i,o){return this._drawPendingPt(),this.addData(kt.C,e,t,a,n,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,a,n,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,a,n){return this._drawPendingPt(),this.addData(kt.Q,e,t,a,n),this._ctx&&this._ctx.quadraticCurveTo(e,t,a,n),this._xi=a,this._yi=n,this},r.prototype.arc=function(e,t,a,n,i,o){this._drawPendingPt(),Po[0]=n,Po[1]=i,lg(Po,o),n=Po[0],i=Po[1];var s=i-n;return this.addData(kt.A,e,t,a,a,n,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,a,n,i,o),this._xi=vn(i)*a+e,this._yi=cn(i)*a+t,this},r.prototype.arcTo=function(e,t,a,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,a,n,i),this},r.prototype.rect=function(e,t,a,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,a,n),this.addData(kt.R,e,t,a,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(kt.Z);var e=this._ctx,t=this._x0,a=this._y0;return e&&e.closePath(),this._xi=t,this._yi=a,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&lv&&(this.data=new Float32Array(t));for(var a=0;af.length&&(this._expandData(),f=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){Tr[0]=Tr[1]=Ar[0]=Ar[1]=Number.MAX_VALUE,ma[0]=ma[1]=Cr[0]=Cr[1]=-Number.MAX_VALUE;var e=this.data,t=0,a=0,n=0,i=0,o;for(o=0;oa||$r(_)>n||v===t-1)&&(d=Math.sqrt(m*m+_*_),i=g,o=y);break}case kt.C:{var S=e[v++],b=e[v++],g=e[v++],y=e[v++],x=e[v++],w=e[v++];d=GI(i,o,S,b,g,y,x,w,10),i=x,o=w;break}case kt.Q:{var S=e[v++],b=e[v++],g=e[v++],y=e[v++];d=HI(i,o,S,b,g,y,10),i=g,o=y;break}case kt.A:var T=e[v++],A=e[v++],C=e[v++],M=e[v++],I=e[v++],L=e[v++],P=L+I;v+=1,p&&(s=vn(I)*C+T,l=cn(I)*M+A),d=sv(C,M)*ov(Da,Math.abs(L)),i=vn(P)*C+T,o=cn(P)*M+A;break;case kt.R:{s=i=e[v++],l=o=e[v++];var R=e[v++],E=e[v++];d=R*2+E*2;break}case kt.Z:{var m=s-i,_=l-o;d=Math.sqrt(m*m+_*_),i=s,o=l;break}}d>=0&&(u[h++]=d,f+=d)}return this._pathLen=f,f},r.prototype.rebuildPath=function(e,t){var a=this.data,n=this._ux,i=this._uy,o=this._len,s,l,u,f,h,v,c=t<1,p,d,g=0,y=0,m,_=0,S,b;if(!(c&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,d=this._pathLen,m=t*d,!m)))t:for(var x=0;x0&&(e.lineTo(S,b),_=0),w){case kt.M:s=u=a[x++],l=f=a[x++],e.moveTo(u,f);break;case kt.L:{h=a[x++],v=a[x++];var A=$r(h-u),C=$r(v-f);if(A>n||C>i){if(c){var M=p[y++];if(g+M>m){var I=(m-g)/M;e.lineTo(u*(1-I)+h*I,f*(1-I)+v*I);break t}g+=M}e.lineTo(h,v),u=h,f=v,_=0}else{var L=A*A+C*C;L>_&&(S=h,b=v,_=L)}break}case kt.C:{var P=a[x++],R=a[x++],E=a[x++],N=a[x++],O=a[x++],B=a[x++];if(c){var M=p[y++];if(g+M>m){var I=(m-g)/M;Xa(u,P,E,O,I,fn),Xa(f,R,N,B,I,hn),e.bezierCurveTo(fn[1],hn[1],fn[2],hn[2],fn[3],hn[3]);break t}g+=M}e.bezierCurveTo(P,R,E,N,O,B),u=O,f=B;break}case kt.Q:{var P=a[x++],R=a[x++],E=a[x++],N=a[x++];if(c){var M=p[y++];if(g+M>m){var I=(m-g)/M;Ps(u,P,E,I,fn),Ps(f,R,N,I,hn),e.quadraticCurveTo(fn[1],hn[1],fn[2],hn[2]);break t}g+=M}e.quadraticCurveTo(P,R,E,N),u=E,f=N;break}case kt.A:var F=a[x++],H=a[x++],U=a[x++],K=a[x++],Q=a[x++],it=a[x++],Lt=a[x++],Wt=!a[x++],vt=U>K?U:K,tt=$r(U-K)>.001,pt=Q+it,q=!1;if(c){var M=p[y++];g+M>m&&(pt=Q+it*(m-g)/M,q=!0),g+=M}if(tt&&e.ellipse?e.ellipse(F,H,U,K,Lt,Q,pt,Wt):e.arc(F,H,vt,Q,pt,Wt),q)break t;T&&(s=vn(Q)*U+F,l=cn(Q)*K+H),u=vn(pt)*U+F,f=cn(pt)*K+H;break;case kt.R:s=u=a[x],l=f=a[x+1],h=a[x++],v=a[x++];var ot=a[x++],Ot=a[x++];if(c){var M=p[y++];if(g+M>m){var It=m-g;e.moveTo(h,v),e.lineTo(h+ov(It,ot),v),It-=ot,It>0&&e.lineTo(h+ot,v+ov(It,Ot)),It-=Ot,It>0&&e.lineTo(h+sv(ot-It,0),v+Ot),It-=ot,It>0&&e.lineTo(h,v+sv(Ot-It,0));break t}g+=M}e.rect(h,v,ot,Ot);break;case kt.Z:if(c){var M=p[y++];if(g+M>m){var I=(m-g)/M;e.lineTo(u*(1-I)+s*I,f*(1-I)+l*I);break t}g+=M}e.closePath(),u=s,f=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.CMD=kt,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}();function Ia(r,e,t,a,n,i,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>e+s&&o>a+s||or+s&&i>t+s||ie+h&&f>a+h&&f>i+h&&f>s+h||fr+h&&u>t+h&&u>n+h&&u>o+h||ue+u&&l>a+u&&l>i+u||lr+u&&s>t+u&&s>n+u||st||f+un&&(n+=Ro);var v=Math.atan2(l,s);return v<0&&(v+=Ro),v>=a&&v<=n||v+Ro>=a&&v+Ro<=n}function Qr(r,e,t,a,n,i){if(i>e&&i>a||in?s:0}var _a=Ur.CMD,pn=Math.PI*2,wP=1e-4;function TP(r,e){return Math.abs(r-e)e&&u>a&&u>i&&u>s||u1&&AP(),c=te(e,a,i,s,Qe[0]),v>1&&(p=te(e,a,i,s,Qe[1]))),v===2?ge&&s>a&&s>i||s=0&&u<=1){for(var f=0,h=oe(e,a,i,u),v=0;vt||s<-t)return 0;var l=Math.sqrt(t*t-s*s);xe[0]=-l,xe[1]=l;var u=Math.abs(a-n);if(u<1e-4)return 0;if(u>=pn-1e-4){a=0,n=pn;var f=i?1:-1;return o>=xe[0]+r&&o<=xe[1]+r?f:0}if(a>n){var h=a;a=n,n=h}a<0&&(a+=pn,n+=pn);for(var v=0,c=0;c<2;c++){var p=xe[c];if(p+r>o){var d=Math.atan2(s,p),f=i?1:-1;d<0&&(d=pn+d),(d>=a&&d<=n||d+pn>=a&&d+pn<=n)&&(d>Math.PI/2&&d1&&(t||(s+=Qr(l,u,f,h,a,n))),g&&(l=i[p],u=i[p+1],f=l,h=u),d){case _a.M:f=i[p++],h=i[p++],l=f,u=h;break;case _a.L:if(t){if(Ia(l,u,i[p],i[p+1],e,a,n))return!0}else s+=Qr(l,u,i[p],i[p+1],a,n)||0;l=i[p++],u=i[p++];break;case _a.C:if(t){if(xP(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],e,a,n))return!0}else s+=CP(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],a,n)||0;l=i[p++],u=i[p++];break;case _a.Q:if(t){if(iT(l,u,i[p++],i[p++],i[p],i[p+1],e,a,n))return!0}else s+=DP(l,u,i[p++],i[p++],i[p],i[p+1],a,n)||0;l=i[p++],u=i[p++];break;case _a.A:var y=i[p++],m=i[p++],_=i[p++],S=i[p++],b=i[p++],x=i[p++];p+=1;var w=!!(1-i[p++]);v=Math.cos(b)*_+y,c=Math.sin(b)*S+m,g?(f=v,h=c):s+=Qr(l,u,v,c,a,n);var T=(a-y)*S/_+y;if(t){if(bP(y,m,S,b,b+x,w,e,T,n))return!0}else s+=MP(y,m,S,b,b+x,w,T,n);l=Math.cos(b+x)*_+y,u=Math.sin(b+x)*S+m;break;case _a.R:f=l=i[p++],h=u=i[p++];var A=i[p++],C=i[p++];if(v=f+A,c=h+C,t){if(Ia(f,h,v,h,e,a,n)||Ia(v,h,v,c,e,a,n)||Ia(v,c,f,c,e,a,n)||Ia(f,c,f,h,e,a,n))return!0}else s+=Qr(v,h,v,c,a,n),s+=Qr(f,c,f,h,a,n);break;case _a.Z:if(t){if(Ia(l,u,f,h,e,a,n))return!0}else s+=Qr(l,u,f,h,a,n);l=f,u=h;break}}return!t&&!TP(u,h)&&(s+=Qr(l,u,f,h,a,n)||0),s!==0}function IP(r,e,t){return oT(r,0,!1,e,t)}function LP(r,e,t,a){return oT(r,e,!0,t,a)}var nf=j({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Xn),PP={style:j({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},jf.style)},fv=Hr.concat(["invisible","culling","z","z2","zlevel","parent"]),gt=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var a=this.style;if(a.decal){var n=this._decalEl=this._decalEl||new e;n.buildPath===e.prototype.buildPath&&(n.buildPath=function(l){t.buildPath(l,t.shape)}),n.silent=!0;var i=n.style;for(var o in a)i[o]!==a[o]&&(i[o]=a[o]);i.fill=a.fill?a.decal:null,i.decal=null,i.shadowColor=null,a.strokeFirst&&(i.stroke=null);for(var s=0;s.5?bp:a>.2?dL:wp}else if(t)return wp}return bp},e.prototype.getInsideTextStroke=function(t){var a=this.style.fill;if(Y(a)){var n=this.__zr,i=!!(n&&n.isDarkMode()),o=tf(t,0)0))},e.prototype.hasFill=function(){var t=this.style,a=t.fill;return a!=null&&a!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,a=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&Bi)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){s.copy(t);var l=a.strokeNoScale?this.getLineScale():1,u=a.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect(),o=this.style;if(t=n[0],a=n[1],i.contain(t,a)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),LP(s,l/u,t,a)))return!0}if(this.hasFill())return IP(s,t,a)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Bi,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,a){t==="shape"?this.setShape(a):r.prototype.attrKV.call(this,t,a)},e.prototype.setShape=function(t,a){var n=this.shape;return n||(n=this.shape={}),typeof t=="string"?n[t]=a:V(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Bi)},e.prototype.createStyle=function(t){return Xf(nf,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var a=this._normalState;t.shape&&!a.shape&&(a.shape=V({},this.shape))},e.prototype._applyStateObj=function(t,a,n,i,o,s){r.prototype._applyStateObj.call(this,t,a,n,i,o,s);var l=!(a&&i),u;if(a&&a.shape?o?i?u=a.shape:(u=V({},n.shape),V(u,a.shape)):(u=V({},i?this.shape:n.shape),V(u,a.shape)):l&&(u=n.shape),u)if(o){this.shape=V({},this.shape);for(var f={},h=_t(u),v=0;v0},e.prototype.hasFill=function(){var t=this.style,a=t.fill;return a!=null&&a!=="none"},e.prototype.createStyle=function(t){return Xf(RP,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var a=t.text;a!=null?a+="":a="";var n=il(a,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(or);ji.prototype.type="tspan";var EP=j({x:0,y:0},Xn),kP={style:j({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},jf.style)};function OP(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var le=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return Xf(EP,t)},e.prototype._getSize=function(t){var a=this.style,n=a[t];if(n!=null)return n;var i=OP(a.image)?a.image:this.__image;if(!i)return 0;var o=t==="width"?"height":"width",s=a[o];return s==null?i[t]:i[t]/i[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return kP},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new ht(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(or);le.prototype.type="image";function NP(r,e){var t=e.x,a=e.y,n=e.width,i=e.height,o=e.r,s,l,u,f;n<0&&(t=t+n,n=-n),i<0&&(a=a+i,i=-i),typeof o=="number"?s=l=u=f=o:o instanceof Array?o.length===1?s=l=u=f=o[0]:o.length===2?(s=u=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],f=o[3]):s=l=u=f=0;var h;s+l>n&&(h=s+l,s*=n/h,l*=n/h),u+f>n&&(h=u+f,u*=n/h,f*=n/h),l+u>i&&(h=l+u,l*=i/h,u*=i/h),s+f>i&&(h=s+f,s*=i/h,f*=i/h),r.moveTo(t+s,a),r.lineTo(t+n-l,a),l!==0&&r.arc(t+n-l,a+l,l,-Math.PI/2,0),r.lineTo(t+n,a+i-u),u!==0&&r.arc(t+n-u,a+i-u,u,0,Math.PI/2),r.lineTo(t+f,a+i),f!==0&&r.arc(t+f,a+i-f,f,Math.PI/2,Math.PI),r.lineTo(t,a+s),s!==0&&r.arc(t+s,a+s,s,Math.PI,Math.PI*1.5)}var Wi=Math.round;function sT(r,e,t){if(e){var a=e.x1,n=e.x2,i=e.y1,o=e.y2;r.x1=a,r.x2=n,r.y1=i,r.y2=o;var s=t&&t.lineWidth;return s&&(Wi(a*2)===Wi(n*2)&&(r.x1=r.x2=Bn(a,s,!0)),Wi(i*2)===Wi(o*2)&&(r.y1=r.y2=Bn(i,s,!0))),r}}function lT(r,e,t){if(e){var a=e.x,n=e.y,i=e.width,o=e.height;r.x=a,r.y=n,r.width=i,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=Bn(a,s,!0),r.y=Bn(n,s,!0),r.width=Math.max(Bn(a+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(Bn(n+o,s,!1)-r.y,o===0?0:1)),r}}function Bn(r,e,t){if(!e)return r;var a=Wi(r*2);return(a+Wi(e))%2===0?a/2:(a+(t?1:-1))/2}var BP=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),VP={},St=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new BP},e.prototype.buildPath=function(t,a){var n,i,o,s;if(this.subPixelOptimize){var l=lT(VP,a,this.style);n=l.x,i=l.y,o=l.width,s=l.height,l.r=a.r,a=l}else n=a.x,i=a.y,o=a.width,s=a.height;a.r?NP(t,a):t.rect(n,i,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(gt);St.prototype.type="rect";var Wm={fill:"#000"},Um=2,zP={style:j({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},jf.style)},bt=function(r){k(e,r);function e(t){var a=r.call(this)||this;return a.type="text",a._children=[],a._defaultStyle=Wm,a.attr(t),a}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,I=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),L=o.calculatedLineHeight,P=0;P=0&&(P=x[L],P.align==="right");)this._placeToken(P,t,T,y,I,"right",_),A-=P.width,I-=P.width,L--;for(M+=(i-(M-g)-(m-I)-A)/2;C<=L;)P=x[C],this._placeToken(P,t,T,y,M+P.width/2,"center",_),M+=P.width,C++;y+=T}},e.prototype._placeToken=function(t,a,n,i,o,s,l){var u=a.rich[t.styleName]||{};u.text=t.text;var f=t.verticalAlign,h=i+n/2;f==="top"?h=i+t.height/2:f==="bottom"&&(h=i+n-t.height/2);var v=!t.isLineHolder&&hv(u);v&&this._renderBackground(u,a,s==="right"?o-t.width:s==="center"?o-t.width/2:o,h-t.height/2,t.width,t.height);var c=!!u.backgroundColor,p=t.textPadding;p&&(o=Km(o,s,p),h-=t.height/2-p[0]-t.innerHeight/2);var d=this._getOrCreateChild(ji),g=d.createStyle();d.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=qm("fill"in u?u.fill:"fill"in a?a.fill:(m=!0,y.fill)),b=$m("stroke"in u?u.stroke:"stroke"in a?a.stroke:!c&&!l&&(!y.autoStroke||m)?(_=Um,y.stroke):null),x=u.textShadowBlur>0||a.textShadowBlur>0;g.text=t.text,g.x=o,g.y=h,x&&(g.shadowBlur=u.textShadowBlur||a.textShadowBlur||0,g.shadowColor=u.textShadowColor||a.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||a.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||a.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=t.font||Ua,g.opacity=Vr(u.opacity,a.opacity,1),Xm(g,u),b&&(g.lineWidth=Vr(u.lineWidth,a.lineWidth,_),g.lineDash=st(u.lineDash,a.lineDash),g.lineDashOffset=a.lineDashOffset||0,g.stroke=b),S&&(g.fill=S);var w=t.contentWidth,T=t.contentHeight;d.setBoundingRect(new ht(as(g.x,w,g.textAlign),Vi(g.y,T,g.textBaseline),w,T))},e.prototype._renderBackground=function(t,a,n,i,o,s){var l=t.backgroundColor,u=t.borderWidth,f=t.borderColor,h=l&&l.image,v=l&&!h,c=t.borderRadius,p=this,d,g;if(v||t.lineHeight||u&&f){d=this._getOrCreateChild(St),d.useStyle(d.createStyle()),d.style.fill=null;var y=d.shape;y.x=n,y.y=i,y.width=o,y.height=s,y.r=c,d.dirtyShape()}if(v){var m=d.style;m.fill=l||null,m.fillOpacity=st(t.fillOpacity,1)}else if(h){g=this._getOrCreateChild(le),g.onload=function(){p.dirtyStyle()};var _=g.style;_.image=l.image,_.x=n,_.y=i,_.width=o,_.height=s}if(u&&f){var m=d.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=st(t.strokeOpacity,1),m.lineDash=t.borderDash,m.lineDashOffset=t.borderDashOffset||0,d.strokeContainThreshold=0,d.hasFill()&&d.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(d||g).style;S.shadowBlur=t.shadowBlur||0,S.shadowColor=t.shadowColor||"transparent",S.shadowOffsetX=t.shadowOffsetX||0,S.shadowOffsetY=t.shadowOffsetY||0,S.opacity=Vr(t.opacity,a.opacity,1)},e.makeFont=function(t){var a="";return fT(t)&&(a=[t.fontStyle,t.fontWeight,uT(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),a&&gr(a)||t.textFont||t.font},e}(or),GP={left:!0,right:1,center:1},FP={top:1,bottom:1,middle:1},Ym=["fontStyle","fontWeight","fontSize","fontFamily"];function uT(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Ud+"px":r+"px"}function Xm(r,e){for(var t=0;t=0,i=!1;if(r instanceof gt){var o=hT(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(_i(s)||_i(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(i=!0,a=V({},a),u=V({},u),u.fill=s):!_i(u.fill)&&_i(s)?(i=!0,a=V({},a),u=V({},u),u.fill=pp(s)):!_i(u.stroke)&&_i(l)&&(i||(a=V({},a),u=V({},u)),u.stroke=pp(l)),a.style=u}}if(a&&a.z2==null){i||(a=V({},a));var f=r.z2EmphasisLift;a.z2=r.z2+(f??co)}return a}function $P(r,e,t){if(t&&t.z2==null){t=V({},t);var a=r.z2SelectLift;t.z2=r.z2+(a??WP)}return t}function qP(r,e,t){var a=ct(r.currentStates,e)>=0,n=r.style.opacity,i=a?null:XP(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=V({},t),o=V({opacity:a?n:i.opacity*.1},o),t.style=o),t}function vv(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return ZP(this,r,e,t);if(r==="blur")return qP(this,r,t);if(r==="select")return $P(this,r,t)}return t}function ri(r){r.stateProxy=vv;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=vv),t&&(t.stateProxy=vv)}function e0(r,e){!mT(r,e)&&!r.__highByOuter&&pa(r,vT)}function r0(r,e){!mT(r,e)&&!r.__highByOuter&&pa(r,cT)}function la(r,e){r.__highByOuter|=1<<(e||0),pa(r,vT)}function ua(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&pa(r,cT)}function dT(r){pa(r,hg)}function vg(r){pa(r,pT)}function gT(r){pa(r,UP)}function yT(r){pa(r,YP)}function mT(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function _T(r){var e=r.getModel(),t=[],a=[];e.eachComponent(function(n,i){var o=ug(i),s=n==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){pT(u)}),s&&t.push(i)),o.isBlured=!1}),D(a,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(t,!1,e)})}function Lp(r,e,t,a){var n=a.getModel();t=t||"coordinateSystem";function i(u,f){for(var h=0;h0){var s={dataIndex:o,seriesIndex:t.seriesIndex};i!=null&&(s.dataType=i),e.push(s)}})}),e}function $n(r,e,t){Vn(r,!0),pa(r,ri),Rp(r,e,t)}function eR(r){Vn(r,!1)}function Ht(r,e,t,a){a?eR(r):$n(r,e,t)}function Rp(r,e,t){var a=nt(r);e!=null?(a.focus=e,a.blurScope=t):a.focus&&(a.focus=null)}var n0=["emphasis","blur","select"],rR={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function he(r,e,t,a){t=t||"itemStyle";for(var n=0;n1&&(o*=cv(p),s*=cv(p));var d=(n===i?-1:1)*cv((o*o*(s*s)-o*o*(c*c)-s*s*(v*v))/(o*o*(c*c)+s*s*(v*v)))||0,g=d*o*c/s,y=d*-s*v/o,m=(r+t)/2+Gl(h)*g-zl(h)*y,_=(e+a)/2+zl(h)*g+Gl(h)*y,S=l0([1,0],[(v-g)/o,(c-y)/s]),b=[(v-g)/o,(c-y)/s],x=[(-1*v-g)/o,(-1*c-y)/s],w=l0(b,x);if(kp(b,x)<=-1&&(w=Eo),kp(b,x)>=1&&(w=0),w<0){var T=Math.round(w/Eo*1e6)/1e6;w=Eo*2+T%2*Eo}f.addData(u,m,_,o,s,S,w,h,i)}var lR=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,uR=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function fR(r){var e=new Ur;if(!r)return e;var t=0,a=0,n=t,i=a,o,s=Ur.CMD,l=r.match(lR);if(!l)return e;for(var u=0;uP*P+R*R&&(T=C,A=M),{cx:T,cy:A,x0:-f,y0:-h,x1:T*(n/b-1),y1:A*(n/b-1)}}function yR(r){var e;if(z(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function mR(r,e){var t,a=ns(e.r,0),n=ns(e.r0||0,0),i=a>0,o=n>0;if(!(!i&&!o)){if(i||(a=n,n=0),n>a){var s=a;a=n,n=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var f=e.cx,h=e.cy,v=!!e.clockwise,c=f0(u-l),p=c>pv&&c%pv;if(p>vr&&(c=p),!(a>vr))r.moveTo(f,h);else if(c>pv-vr)r.moveTo(f+a*xi(l),h+a*dn(l)),r.arc(f,h,a,l,u,!v),n>vr&&(r.moveTo(f+n*xi(u),h+n*dn(u)),r.arc(f,h,n,u,l,v));else{var d=void 0,g=void 0,y=void 0,m=void 0,_=void 0,S=void 0,b=void 0,x=void 0,w=void 0,T=void 0,A=void 0,C=void 0,M=void 0,I=void 0,L=void 0,P=void 0,R=a*xi(l),E=a*dn(l),N=n*xi(u),O=n*dn(u),B=c>vr;if(B){var F=e.cornerRadius;F&&(t=yR(F),d=t[0],g=t[1],y=t[2],m=t[3]);var H=f0(a-n)/2;if(_=Dr(H,y),S=Dr(H,m),b=Dr(H,d),x=Dr(H,g),A=w=ns(_,S),C=T=ns(b,x),(w>vr||T>vr)&&(M=a*xi(u),I=a*dn(u),L=n*xi(l),P=n*dn(l),cvr){var tt=Dr(y,A),pt=Dr(m,A),q=Fl(L,P,R,E,a,tt,v),ot=Fl(M,I,N,O,a,pt,v);r.moveTo(f+q.cx+q.x0,h+q.cy+q.y0),A0&&r.arc(f+q.cx,h+q.cy,tt,ce(q.y0,q.x0),ce(q.y1,q.x1),!v),r.arc(f,h,a,ce(q.cy+q.y1,q.cx+q.x1),ce(ot.cy+ot.y1,ot.cx+ot.x1),!v),pt>0&&r.arc(f+ot.cx,h+ot.cy,pt,ce(ot.y1,ot.x1),ce(ot.y0,ot.x0),!v))}else r.moveTo(f+R,h+E),r.arc(f,h,a,l,u,!v);if(!(n>vr)||!B)r.lineTo(f+N,h+O);else if(C>vr){var tt=Dr(d,C),pt=Dr(g,C),q=Fl(N,O,M,I,n,-pt,v),ot=Fl(R,E,L,P,n,-tt,v);r.lineTo(f+q.cx+q.x0,h+q.cy+q.y0),C0&&r.arc(f+q.cx,h+q.cy,pt,ce(q.y0,q.x0),ce(q.y1,q.x1),!v),r.arc(f,h,n,ce(q.cy+q.y1,q.cx+q.x1),ce(ot.cy+ot.y1,ot.cx+ot.x1),v),tt>0&&r.arc(f+ot.cx,h+ot.cy,tt,ce(ot.y1,ot.x1),ce(ot.y0,ot.x0),!v))}else r.lineTo(f+N,h+O),r.arc(f,h,n,u,l,v)}r.closePath()}}}var _R=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r}(),Me=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new _R},e.prototype.buildPath=function(t,a){mR(t,a)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(gt);Me.prototype.type="sector";var SR=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),ll=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new SR},e.prototype.buildPath=function(t,a){var n=a.cx,i=a.cy,o=Math.PI*2;t.moveTo(n+a.r,i),t.arc(n,i,a.r,0,o,!1),t.moveTo(n+a.r0,i),t.arc(n,i,a.r0,0,o,!0)},e}(gt);ll.prototype.type="ring";function xR(r,e,t,a){var n=[],i=[],o=[],s=[],l,u,f,h;if(a){f=[1/0,1/0],h=[-1/0,-1/0];for(var v=0,c=r.length;v=2){if(a){var i=xR(n,a,t,e.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(t?o:o-1);s++){var l=i[s*2],u=i[s*2+1],f=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,h=n.length;syn[1]){if(s=!1,i)return s;var f=Math.abs(yn[0]-gn[1]),h=Math.abs(gn[0]-yn[1]);Math.min(f,h)>n.len()&&(f0){var h=f.duration,v=f.delay,c=f.easing,p={duration:h,delay:v||0,easing:c,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,p):e.animateTo(t,p)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),i&&i()}function Tt(r,e,t,a,n,i){gg("update",r,e,t,a,n,i)}function zt(r,e,t,a,n,i){gg("enter",r,e,t,a,n,i)}function Zi(r){if(!r.__zr)return!0;for(var e=0;eMath.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function c0(r){return!r.isGroup}function OR(r){return r.shape!=null}function hl(r,e,t){if(!r||!e)return;function a(o){var s={};return o.traverse(function(l){c0(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return OR(o)&&(s.shape=V({},o.shape)),s}var i=a(r);e.traverse(function(o){if(c0(o)&&o.anid){var s=i[o.anid];if(s){var l=n(o);o.attr(n(s)),Tt(o,l,t,nt(o).dataIndex)}}})}function ET(r,e){return G(r,function(t){var a=t[0];a=lf(a,e.x),a=uf(a,e.x+e.width);var n=t[1];return n=lf(n,e.y),n=uf(n,e.y+e.height),[a,n]})}function NR(r,e){var t=lf(r.x,e.x),a=uf(r.x+r.width,e.x+e.width),n=lf(r.y,e.y),i=uf(r.y+r.height,e.y+e.height);if(a>=t&&i>=n)return{x:t,y:n,width:a-t,height:i-n}}function vl(r,e,t){var a=V({rectHover:!0},e),n=a.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),j(n,t),new le(a)):ih(r.replace("path://",""),a,t,"center")}function is(r,e,t,a,n){for(var i=0,o=n[n.length-1];i1)return!1;var g=dv(c,p,f,h)/v;return!(g<0||g>1)}function dv(r,e,t,a){return r*a-t*e}function BR(r){return r<=1e-6&&r>=-1e-6}function li(r){var e=r.itemTooltipOption,t=r.componentModel,a=r.itemName,n=Y(e)?{formatter:e}:e,i=t.mainType,o=t.componentIndex,s={componentType:i,name:a,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&D(_t(l),function(f){Z(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=nt(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:a,option:j({content:a,encodeHTMLContent:!0,formatterParams:s},n)}}function p0(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function Qa(r,e){if(r)if(z(r))for(var t=0;t=0&&s.push(l)}),s}}function ja(r,e){return ut(ut({},r,!0),e,!0)}const qR={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},KR={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var hf="ZH",_g="EN",$i=_g,zu={},Sg={},GT=yt.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||$i).toUpperCase();return r.indexOf(hf)>-1?hf:$i}():$i;function FT(r,e){r=r.toUpperCase(),Sg[r]=new Mt(e),zu[r]=e}function JR(r){if(Y(r)){var e=zu[r.toUpperCase()]||{};return r===hf||r===_g?rt(e):ut(rt(e),rt(zu[$i]),!1)}else return ut(rt(r),rt(zu[$i]),!1)}function Bp(r){return Sg[r]}function QR(){return Sg[$i]}FT(_g,qR);FT(hf,KR);var xg=1e3,bg=xg*60,bs=bg*60,ar=bs*24,_0=ar*365,os={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Ul="{yyyy}-{MM}-{dd}",S0={year:"{yyyy}",month:"{yyyy}-{MM}",day:Ul,hour:Ul+" "+os.hour,minute:Ul+" "+os.minute,second:Ul+" "+os.second,millisecond:os.none},mv=["year","month","day","hour","minute","second","millisecond"],HT=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Sa(r,e){return r+="","0000".substr(0,e-r.length)+r}function qi(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function jR(r){return r===qi(r)}function tE(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function lh(r,e,t,a){var n=Wr(r),i=n[wg(t)](),o=n[Ki(t)]()+1,s=Math.floor((o-1)/3)+1,l=n[uh(t)](),u=n["get"+(t?"UTC":"")+"Day"](),f=n[zs(t)](),h=(f-1)%12+1,v=n[fh(t)](),c=n[hh(t)](),p=n[vh(t)](),d=f>=12?"pm":"am",g=d.toUpperCase(),y=a instanceof Mt?a:Bp(a||GT)||QR(),m=y.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),b=m.get("dayOfWeek"),x=m.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,d+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,Sa(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,Sa(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Sa(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Sa(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Sa(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Sa(v,2)).replace(/{m}/g,v+"").replace(/{ss}/g,Sa(c,2)).replace(/{s}/g,c+"").replace(/{SSS}/g,Sa(p,3)).replace(/{S}/g,p+"")}function eE(r,e,t,a,n){var i=null;if(Y(t))i=t;else if(J(t))i=t(r.value,e,{level:r.level});else{var o=V({},os);if(r.level>0)for(var s=0;s=0;--s)if(l[u]){i=l[u];break}i=i||o.none}if(z(i)){var h=r.level==null?0:r.level>=0?r.level:i.length+r.level;h=Math.min(h,i.length-1),i=i[h]}}return lh(new Date(r.value),i,n,a)}function WT(r,e){var t=Wr(r),a=t[Ki(e)]()+1,n=t[uh(e)](),i=t[zs(e)](),o=t[fh(e)](),s=t[hh(e)](),l=t[vh(e)](),u=l===0,f=u&&s===0,h=f&&o===0,v=h&&i===0,c=v&&n===1,p=c&&a===1;return p?"year":c?"month":v?"day":h?"hour":f?"minute":u?"second":"millisecond"}function x0(r,e,t){var a=wt(r)?Wr(r):r;switch(e=e||WT(r,t),e){case"year":return a[wg(t)]();case"half-year":return a[Ki(t)]()>=6?1:0;case"quarter":return Math.floor((a[Ki(t)]()+1)/4);case"month":return a[Ki(t)]();case"day":return a[uh(t)]();case"half-day":return a[zs(t)]()/24;case"hour":return a[zs(t)]();case"minute":return a[fh(t)]();case"second":return a[hh(t)]();case"millisecond":return a[vh(t)]()}}function wg(r){return r?"getUTCFullYear":"getFullYear"}function Ki(r){return r?"getUTCMonth":"getMonth"}function uh(r){return r?"getUTCDate":"getDate"}function zs(r){return r?"getUTCHours":"getHours"}function fh(r){return r?"getUTCMinutes":"getMinutes"}function hh(r){return r?"getUTCSeconds":"getSeconds"}function vh(r){return r?"getUTCMilliseconds":"getMilliseconds"}function rE(r){return r?"setUTCFullYear":"setFullYear"}function UT(r){return r?"setUTCMonth":"setMonth"}function YT(r){return r?"setUTCDate":"setDate"}function XT(r){return r?"setUTCHours":"setHours"}function ZT(r){return r?"setUTCMinutes":"setMinutes"}function $T(r){return r?"setUTCSeconds":"setSeconds"}function qT(r){return r?"setUTCMilliseconds":"setMilliseconds"}function KT(r){if(!Yw(r))return Y(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function JT(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,a){return a.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var mo=Kd;function Vp(r,e,t){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(f){return f&&gr(f)?f:"-"}function i(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?Wr(r):r;if(isNaN(+l)){if(s)return"-"}else return lh(l,a,t)}if(e==="ordinal")return rp(r)?n(r):wt(r)&&i(r)?r+"":"-";var u=sa(r);return i(u)?KT(u):rp(r)?n(r):typeof r=="boolean"?r+"":"-"}var b0=["a","b","c","d","e","f","g"],_v=function(r,e){return"{"+r+(e??"")+"}"};function QT(r,e,t){z(e)||(e=[e]);var a=e.length;if(!a)return"";for(var n=e[0].$vars||[],i=0;i':'';var o=t.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}}function ai(r,e){return e=e||"transparent",Y(r)?r:et(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function vf(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Gu=D,jT=["left","right","top","bottom","width","height"],zn=[["width","left","right"],["height","top","bottom"]];function Tg(r,e,t,a,n){var i=0,o=0;a==null&&(a=1/0),n==null&&(n=1/0);var s=0;e.eachChild(function(l,u){var f=l.getBoundingRect(),h=e.childAt(u+1),v=h&&h.getBoundingRect(),c,p;if(r==="horizontal"){var d=f.width+(v?-v.x+f.x:0);c=i+d,c>a||l.newline?(i=0,c=d,o+=s+t,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(v?-v.y+f.y:0);p=o+g,p>n||l.newline?(i+=s+t,o=0,p=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=c+t:o=p+t)})}var Kn=Tg;lt(Tg,"vertical");lt(Tg,"horizontal");function iE(r,e,t){var a=e.width,n=e.height,i=W(r.left,a),o=W(r.top,n),s=W(r.right,a),l=W(r.bottom,n);return(isNaN(i)||isNaN(parseFloat(r.left)))&&(i=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=a),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=n),t=mo(t||0),{width:Math.max(s-i-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function Qt(r,e,t){t=mo(t||0);var a=e.width,n=e.height,i=W(r.left,a),o=W(r.top,n),s=W(r.right,a),l=W(r.bottom,n),u=W(r.width,a),f=W(r.height,n),h=t[2]+t[0],v=t[1]+t[3],c=r.aspect;switch(isNaN(u)&&(u=a-s-v-i),isNaN(f)&&(f=n-l-h-o),c!=null&&(isNaN(u)&&isNaN(f)&&(c>a/n?u=a*.8:f=n*.8),isNaN(u)&&(u=c*f),isNaN(f)&&(f=u/c)),isNaN(i)&&(i=a-s-u-v),isNaN(o)&&(o=n-l-f-h),r.left||r.right){case"center":i=a/2-u/2-t[3];break;case"right":i=a-u-v;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-f/2-t[0];break;case"bottom":o=n-f-h;break}i=i||0,o=o||0,isNaN(u)&&(u=a-v-i-(s||0)),isNaN(f)&&(f=n-h-o-(l||0));var p=new ht(i+t[3],o+t[0],u,f);return p.margin=t,p}function ch(r,e,t,a,n,i){var o=!n||!n.hv||n.hv[0],s=!n||!n.hv||n.hv[1],l=n&&n.boundingMode||"all";if(i=i||r,i.x=r.x,i.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new ht(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var f=r.getLocalTransform();u=u.clone(),u.applyTransform(f)}var h=Qt(j({width:u.width,height:u.height},e),t,a),v=o?h.x-u.x:0,c=s?h.y-u.y:0;return l==="raw"?(i.x=v,i.y=c):(i.x+=v,i.y+=c),i===r&&r.markRedraw(),!0}function oE(r,e){return r[zn[e][0]]!=null||r[zn[e][1]]!=null&&r[zn[e][2]]!=null}function Gs(r){var e=r.layoutMode||r.constructor.layoutMode;return et(e)?e:e?{type:e}:null}function $a(r,e,t){var a=t&&t.ignoreSize;!z(a)&&(a=[a,a]);var n=o(zn[0],0),i=o(zn[1],1);u(zn[0],r,n),u(zn[1],r,i);function o(f,h){var v={},c=0,p={},d=0,g=2;if(Gu(f,function(_){p[_]=r[_]}),Gu(f,function(_){s(e,_)&&(v[_]=p[_]=e[_]),l(v,_)&&c++,l(p,_)&&d++}),a[h])return l(e,f[1])?p[f[2]]=null:l(e,f[2])&&(p[f[1]]=null),p;if(d===g||!c)return p;if(c>=g)return v;for(var y=0;y=0;l--)s=ut(s,n[l],!0);a.defaultOption=s}return a.defaultOption},e.prototype.getReferringComponents=function(t,a){var n=t+"Index",i=t+"Id";return ol(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},a)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Mt);eT(mt,Mt);Jf(mt);ZR(mt);$R(mt,lE);function lE(r){var e=[];return D(mt.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=G(e,function(t){return Or(t).main}),r!=="dataset"&&ct(e,"dataset")<=0&&e.unshift("dataset"),e}var eA="";typeof navigator<"u"&&(eA=navigator.platform||"");var bi="rgba(0, 0, 0, 0.2)";const uE={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:bi,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:bi,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:bi,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:bi,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:bi,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:bi,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:eA.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var rA=$(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),lr="original",me="arrayRows",ur="objectRows",Yr="keyedColumns",Fa="typedArray",aA="unknown",zr="column",So="row",ue={Must:1,Might:2,Not:3},nA=xt();function fE(r){nA(r).datasetMap=$()}function iA(r,e,t){var a={},n=Cg(e);if(!n||!r)return a;var i=[],o=[],s=e.ecModel,l=nA(s).datasetMap,u=n.uid+"_"+t.seriesLayoutBy,f,h;r=r.slice(),D(r,function(d,g){var y=et(d)?d:r[g]={name:d};y.type==="ordinal"&&f==null&&(f=g,h=p(y)),a[y.name]=[]});var v=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});D(r,function(d,g){var y=d.name,m=p(d);if(f==null){var _=v.valueWayDim;c(a[y],_,m),c(o,_,m),v.valueWayDim+=m}else if(f===g)c(a[y],0,m),c(i,0,m);else{var _=v.categoryWayDim;c(a[y],_,m),c(o,_,m),v.categoryWayDim+=m}});function c(d,g,y){for(var m=0;me)return r[a];return r[t-1]}function lA(r,e,t,a,n,i,o){i=i||r;var s=e(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var f=o==null||!a?t:dE(a,o);if(f=f||t,!(!f||!f.length)){var h=f[l];return n&&(u[n]=h),s.paletteIdx=(l+1)%f.length,h}}function gE(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var Yl,ko,T0,A0="\0_ec_inner",yE=1,Mg=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,a,n,i,o,s){i=i||{},this.option=null,this._theme=new Mt(i),this._locale=new Mt(o),this._optionManager=s},e.prototype.setOption=function(t,a,n){var i=M0(a);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,a){return this._resetOption(t,M0(a))},e.prototype._resetOption=function(t,a){var n=!1,i=this._optionManager;if(!t||t==="recreate"){var o=i.mountOption(t==="recreate");!this.option||t==="recreate"?T0(this,o):(this.restoreData(),this._mergeOption(o,a)),n=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=i.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,a))}if(!t||t==="recreate"||t==="media"){var l=i.getMediaOption(this);l.length&&D(l,function(u){n=!0,this._mergeOption(u,a)},this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,a){var n=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=$(),u=a&&a.replaceMergeMainTypeMap;fE(this),D(t,function(h,v){h!=null&&(mt.hasClass(v)?v&&(s.push(v),l.set(v,!0)):n[v]=n[v]==null?rt(h):ut(n[v],h,!0))}),u&&u.each(function(h,v){mt.hasClass(v)&&!l.get(v)&&(s.push(v),l.set(v,!0))}),mt.topologicalTravel(s,mt.getAllClassMainTypes(),f,this);function f(h){var v=cE(this,h,Pt(t[h])),c=i.get(h),p=c?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",d=Kw(c,v,p);HL(d,h,mt),n[h]=null,i.set(h,null),o.set(h,0);var g=[],y=[],m=0,_;D(d,function(S,b){var x=S.existing,w=S.newOption;if(!w)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var T=h==="series",A=mt.getClass(h,S.keyInfo.subType,!T);if(!A)return;if(h==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===A)x.name=S.keyInfo.name,x.mergeOption(w,this),x.optionUpdated(w,!1);else{var C=V({componentIndex:b},S.keyInfo);x=new A(w,this,this,C),V(x,C),S.brandNew&&(x.__requireNewView=!0),x.init(w,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),y.push(x),m++):(g.push(void 0),y.push(void 0))},this),n[h]=g,i.set(h,y),o.set(h,m),h==="series"&&Yl(this)}this._seriesIndices||Yl(this)},e.prototype.getOption=function(){var t=rt(this.option);return D(t,function(a,n){if(mt.hasClass(n)){for(var i=Pt(a),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!Os(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,t[n]=i}}),delete t[A0],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,a){var n=this._componentsMap.get(t);if(n){var i=n[a||0];if(i)return i;if(a==null){for(var o=0;o=e:t==="max"?r<=e:r===e}function CE(r,e){return r.join(",")===e.join(",")}var fr=D,Fs=et,I0=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function xv(r){var e=r&&r.itemStyle;if(e)for(var t=0,a=I0.length;t=0;g--){var y=r[g];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,c)),p>=0){var m=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&v>=0&&m>0||l==="samesign"&&v<=0&&m<0){v=PL(v,m),d=m;break}}}return a[0]=v,a[1]=d,a})})}var ph=function(){function r(e){this.data=e.data||(e.sourceFormat===Yr?{}:[]),this.sourceFormat=e.sourceFormat||aA,this.seriesLayoutBy=e.seriesLayoutBy||zr,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var a=0;ad&&(d=_)}c[0]=p,c[1]=d}},n=function(){return this._data?this._data.length/this._dimSize:0};N0=(e={},e[me+"_"+zr]={pure:!0,appendData:i},e[me+"_"+So]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[ur]={pure:!0,appendData:i},e[Yr]={pure:!0,appendData:function(o){var s=this._data;D(o,function(l,u){for(var f=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},e[lr]={appendData:i},e[Fa]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(o){for(var s=0;s=0&&(d=o.interpolatedValue[g])}return d!=null?d+"":""})}},r.prototype.getRawValue=function(e,t){return eo(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,a){},r}();function G0(r){var e,t;return et(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function ws(r){return new WE(r)}var WE=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,a=e&&e.skip;if(this._dirty&&t){var n=this.context;n.data=n.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!a&&(i=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(i="reset");function f(m){return!(m>=1)&&(m=1),m}var h;(this._dirty||i==="reset")&&(this._dirty=!1,h=this._doReset(a)),this._modBy=l,this._modDataCount=u;var v=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var c=this._dueIndex,p=Math.min(v!=null?this._dueIndex+v:1/0,this._dueEnd);if(!a&&(h||c1&&a>0?s:o}};return i;function o(){return e=r?null:le},gte:function(r,e){return r>=e}},YE=function(){function r(e,t){if(!wt(t)){var a="";At(a)}this._opFn=_A[e],this._rvalFloat=sa(t)}return r.prototype.evaluate=function(e){return wt(e)?this._opFn(e,this._rvalFloat):this._opFn(sa(e),this._rvalFloat)},r}(),SA=function(){function r(e,t){var a=e==="desc";this._resultLT=a?1:-1,t==null&&(t=a?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var a=wt(e)?e:sa(e),n=wt(t)?t:sa(t),i=isNaN(a),o=isNaN(n);if(i&&(a=this._incomparable),o&&(n=this._incomparable),i&&o){var s=Y(e),l=Y(t);s&&(a=l?e:0),l&&(n=s?t:0)}return an?-this._resultLT:0},r}(),XE=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=sa(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var a=typeof e;a!==this._rvalTypeof&&(a==="number"||this._rvalTypeof==="number")&&(t=sa(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function ZE(r,e){return r==="eq"||r==="ne"?new XE(r==="eq",e):Z(_A,r)?new YE(r,e):null}var $E=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return Ha(e,t)},r}();function qE(r,e){var t=new $E,a=r.data,n=t.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==zr&&At(o);var s=[],l={},u=r.dimensionsDefine;if(u)D(u,function(d,g){var y=d.name,m={index:g,name:y,displayName:d.displayName};if(s.push(m),y!=null){var _="";Z(l,y)&&At(_),l[y]=m}});else for(var f=0;f65535?ak:nk}function Ti(){return[1/0,-1/0]}function ik(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function W0(r,e,t,a,n){var i=wA[t||"float"];if(n){var o=r[e],s=o&&o.length;if(s!==a){for(var l=new i(a),u=0;ug[1]&&(g[1]=d)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,a){for(var n=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=G(o,function(m){return m.property}),f=0;fy[1]&&(y[1]=g)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,a=t[e];if(a!=null&&ae)i=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(e,t,a){var n=this._chunks,i=n[e],o=[];if(!i)return o;a==null&&(a=1/0);for(var s=1/0,l=-1,u=0,f=0,h=this.count();f=0&&l<0)&&(s=p,l=c,u=0),c===l&&(o[u++]=f))}return o.length=u,o},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var a=t.constructor,n=this._count;if(a===Array){e=new a(n);for(var i=0;i=h&&m<=v||isNaN(m))&&(l[u++]=d),d++}p=!0}else if(i===2){for(var g=c[n[0]],_=c[n[1]],S=e[n[1]][0],b=e[n[1]][1],y=0;y=h&&m<=v||isNaN(m))&&(x>=S&&x<=b||isNaN(x))&&(l[u++]=d),d++}p=!0}}if(!p)if(i===1)for(var y=0;y=h&&m<=v||isNaN(m))&&(l[u++]=w)}else for(var y=0;ye[C][1])&&(T=!1)}T&&(l[u++]=t.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(e,t){var a=this.clone([e],!0),n=a._chunks,i=n[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),f,h,v,c=new(wi(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));c[s++]=u;for(var p=1;pf&&(f=h,v=S)}M>0&&Ms&&(d=s-f);for(var g=0;gp&&(p=m,c=f+g)}var _=this.getRawIndex(h),S=this.getRawIndex(c);hf-p&&(l=f-p,s.length=l);for(var d=0;dh[1]&&(h[1]=y),v[c++]=m}return i._count=c,i._indices=v,i._updateGetRawIdx(),i},r.prototype.each=function(e,t){if(this._count)for(var a=e.length,n=this._chunks,i=0,o=this.count();il&&(l=h)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var a=[],n=this._chunks,i=0;i=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,a,n,i){return Ha(t[i],this._dimensions[i])}Tv={arrayRows:e,objectRows:function(t,a,n,i){return Ha(t[a],this._dimensions[i])},keyedColumns:e,original:function(t,a,n,i){var o=t&&(t.value==null?t:t.value);return Ha(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,a,n,i){return t[i]}}}(),r}(),TA=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),a=!!t.length,n,i;if(Xl(e)){var o=e,s=void 0,l=void 0,u=void 0;if(a){var f=t[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,i=[f._getVersionSign()]}else s=o.get("data",!0),l=Be(s)?Fa:lr,i=[];var h=this._getSourceMetaRawOption()||{},v=u&&u.metaRawOption||{},c=st(h.seriesLayoutBy,v.seriesLayoutBy)||null,p=st(h.sourceHeader,v.sourceHeader),d=st(h.dimensions,v.dimensions),g=c!==v.seriesLayoutBy||!!p!=!!v.sourceHeader||d;n=g?[Fp(s,{seriesLayoutBy:c,sourceHeader:p,dimensions:d},l)]:[]}else{var y=e;if(a){var m=this._applyTransform(t);n=m.sourceList,i=m.upstreamSignList}else{var _=y.get("source",!0);n=[Fp(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(n,i)},r.prototype._applyTransform=function(e){var t=this._sourceHost,a=t.get("transform",!0),n=t.get("fromTransformResult",!0);if(n!=null){var i="";e.length!==1&&Y0(i)}var o,s=[],l=[];return D(e,function(u){u.prepareSource();var f=u.getSource(n||0),h="";n!=null&&!f&&Y0(h),s.push(f),l.push(u._getVersionSign())}),a?o=ek(a,s,{datasetIndex:t.componentIndex}):n!=null&&(o=[NE(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||t>0&&!r.noHeader;return D(r.blocks,function(n){var i=MA(n);i>=e&&(e=i+ +(a&&(!i||Wp(n)&&!n.noHeader)))}),e}return 0}function uk(r,e,t,a){var n=e.noHeader,i=hk(MA(e)),o=[],s=e.blocks||[];Ce(!s||z(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Z(u,l)){var f=new SA(u[l],null);s.sort(function(d,g){return f.evaluate(d.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}D(s,function(d,g){var y=e.valueFormatter,m=DA(d)(y?V(V({},r),{valueFormatter:y}):r,d,g>0?i.html:0,a);m!=null&&o.push(m)});var h=r.renderMode==="richText"?o.join(i.richText):Up(a,o.join(""),n?t:i.html);if(n)return h;var v=Vp(e.header,"ordinal",r.useUTC),c=CA(a,r.renderMode).nameStyle,p=AA(a);return r.renderMode==="richText"?IA(r,v,c)+i.richText+h:Up(a,'
'+we(v)+"
"+h,t)}function fk(r,e,t,a){var n=r.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,f=e.valueFormatter||r.valueFormatter||function(S){return S=z(S)?S:[S],G(S,function(b,x){return Vp(b,z(c)?c[x]:c,u)})};if(!(i&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",n),v=i?"":Vp(l,"ordinal",u),c=e.valueType,p=o?[]:f(e.value,e.dataIndex),d=!s||!i,g=!s&&i,y=CA(a,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":h)+(i?"":IA(r,v,m))+(o?"":pk(r,p,d,g,_)):Up(a,(s?"":h)+(i?"":vk(v,!s,m))+(o?"":ck(p,d,g,_)),t)}}function X0(r,e,t,a,n,i){if(r){var o=DA(r),s={useUTC:n,renderMode:t,orderMode:a,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function hk(r){return{html:sk[r],richText:lk[r]}}function Up(r,e,t){var a='
',n="margin: "+t+"px 0 0",i=AA(r);return'
'+e+a+"
"}function vk(r,e,t){var a=e?"margin-left:2px":"";return''+we(r)+""}function ck(r,e,t,a){var n=t?"10px":"20px",i=e?"float:right;margin-left:"+n:"";return r=z(r)?r:[r],''+G(r,function(o){return we(o)}).join("  ")+""}function IA(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function pk(r,e,t,a,n){var i=[n],o=a?10:20;return t&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(z(e)?e.join(" "):e,i)}function LA(r,e){var t=r.getData().getItemVisual(e,"style"),a=t[r.visualDrawType];return ai(a)}function PA(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var Av=function(){function r(){this.richTextStyles={},this._nextStyleNameId=Xw()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,a){var n=a==="richText"?this._generateStyleName():null,i=nE({color:t,type:e,renderMode:a,markerId:n});return Y(i)?i:(this.richTextStyles[n]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var a={};z(t)?D(t,function(i){return V(a,i)}):V(a,t);var n=this._generateStyleName();return this.richTextStyles[n]=a,"{"+n+"|"+e+"}"},r}();function RA(r){var e=r.series,t=r.dataIndex,a=r.multipleSeries,n=e.getData(),i=n.mapDimensionsAll("defaultedTooltip"),o=i.length,s=e.getRawValue(t),l=z(s),u=LA(e,t),f,h,v,c;if(o>1||l&&!o){var p=dk(s,e,t,i,u);f=p.inlineValues,h=p.inlineValueTypes,v=p.blocks,c=p.inlineValues[0]}else if(o){var d=n.getDimensionInfo(i[0]);c=f=eo(n,t,i[0]),h=d.type}else c=f=l?s[0]:s;var g=ng(e),y=g&&e.name||"",m=n.getName(t),_=a?y:m;return ie("section",{header:y,noHeader:a||!g,sortParam:c,blocks:[ie("nameValue",{markerType:"item",markerColor:u,name:_,noName:!gr(_),value:f,valueType:h,dataIndex:t})].concat(v||[])})}function dk(r,e,t,a,n){var i=e.getData(),o=Gr(r,function(h,v,c){var p=i.getDimensionInfo(c);return h=h||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];a.length?D(a,function(h){f(eo(i,t,h),h)}):D(r,f);function f(h,v){var c=i.getDimensionInfo(v);!c||c.otherDims.tooltip===!1||(o?u.push(ie("nameValue",{markerType:"subItem",markerColor:n,name:c.displayName,value:h,valueType:c.type})):(s.push(h),l.push(c.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var xa=xt();function Zl(r,e){return r.getName(e)||r.getId(e)}var Fu="__universalTransitionEnabled",Vt=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,a,n){this.seriesIndex=this.componentIndex,this.dataTask=ws({count:yk,reset:mk}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n);var i=xa(this).sourceManager=new TA(this);i.prepareSource();var o=this.getInitialData(t,n);$0(o,this),this.dataTask.context.data=o,xa(this).dataBeforeProcessed=o,Z0(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,a){var n=Gs(this),i=n?_o(t):{},o=this.subType;mt.hasClass(o)&&(o+="Series"),ut(t,a.getTheme().get(this.subType)),ut(t,this.getDefaultOption()),jn(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&$a(t,i,n)},e.prototype.mergeOption=function(t,a){t=ut(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Gs(this);n&&$a(this.option,t,n);var i=xa(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,a);$0(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,xa(this).dataBeforeProcessed=o,Z0(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!Be(t))for(var a=["show"],n=0;nthis.getShallow("animationThreshold")&&(a=!1),!!a},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,a,n){var i=this.ecModel,o=Dg.prototype.getColorFromPalette.call(this,t,a,n);return o||(o=i.getColorFromPalette(t,a,n)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,a){this._innerSelect(this.getData(a),t)},e.prototype.unselect=function(t,a){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,o=this.getData(a);if(i==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&n.push(o)}return n},e.prototype.isSelected=function(t,a){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(a);return(n==="all"||n[Zl(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Fu])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,a){var n,i,o=this.option,s=o.selectedMode,l=a.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){et(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(t,a)}},e.registerClass=function(t){return mt.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(mt);Kt(Vt,dh);Kt(Vt,Dg);eT(Vt,mt);function Z0(r){var e=r.name;ng(r)||(r.name=gk(r)||e)}function gk(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),a=[];return D(t,function(n){var i=e.getDimensionInfo(n);i.displayName&&a.push(i.displayName)}),a.join(" ")}function yk(r){return r.model.getRawData().count()}function mk(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),_k}function _k(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function $0(r,e){D(Ls(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,lt(Sk,e))})}function Sk(r,e){var t=Yp(r);return t&&t.setOutputEnd((e||this).count()),e}function Yp(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var a=t.currentTask;if(a){var n=a.agentStubMap;n&&(a=n.get(r.uid))}return a}}var Ft=function(){function r(){this.group=new at,this.uid=yo("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,n){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,n){},r.prototype.updateLayout=function(e,t,a,n){},r.prototype.updateVisual=function(e,t,a,n){},r.prototype.toggleBlurSeries=function(e,t,a){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();og(Ft);Jf(Ft);function xo(){var r=xt();return function(e){var t=r(e),a=e.pipelineContext,n=!!t.large,i=!!t.progressiveRender,o=t.large=!!(a&&a.large),s=t.progressiveRender=!!(a&&a.progressiveRender);return(n!==o||i!==s)&&"reset"}}var EA=xt(),xk=xo(),Rt=function(){function r(){this.group=new at,this.uid=yo("viewChart"),this.renderTask=ws({plan:bk,reset:wk}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,n){},r.prototype.highlight=function(e,t,a,n){var i=e.getData(n&&n.dataType);i&&K0(i,n,"emphasis")},r.prototype.downplay=function(e,t,a,n){var i=e.getData(n&&n.dataType);i&&K0(i,n,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.updateLayout=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.updateVisual=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.eachRendered=function(e){Qa(this.group,e)},r.markUpdateMethod=function(e,t){EA(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function q0(r,e,t){r&&Bs(r)&&(e==="emphasis"?la:ua)(r,t)}function K0(r,e,t){var a=ti(r,e),n=e&&e.highlightKey!=null?nR(e.highlightKey):null;a!=null?D(Pt(a),function(i){q0(r.getItemGraphicEl(i),t,n)}):r.eachItemGraphicEl(function(i){q0(i,t,n)})}og(Rt);Jf(Rt);function bk(r){return xk(r.model)}function wk(r){var e=r.model,t=r.ecModel,a=r.api,n=r.payload,i=e.pipelineContext.progressiveRender,o=r.view,s=n&&EA(n).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,a,n),Tk[l]}var Tk={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},cf="\0__throttleOriginMethod",J0="\0__throttleRate",Q0="\0__throttleType";function Eg(r,e,t){var a,n=0,i=0,o=null,s,l,u,f;e=e||0;function h(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var v=function(){for(var c=[],p=0;p=0?h():o=setTimeout(h,-s),n=a};return v.clear=function(){o&&(clearTimeout(o),o=null)},v.debounceNextCall=function(c){f=c},v}function bo(r,e,t,a){var n=r[e];if(n){var i=n[cf]||n,o=n[Q0],s=n[J0];if(s!==t||o!==a){if(t==null||!a)return r[e]=i;n=r[e]=Eg(i,t,a==="debounce"),n[cf]=i,n[Q0]=a,n[J0]=t}return n}}function Hs(r,e){var t=r[e];t&&t[cf]&&(t.clear&&t.clear(),r[e]=t[cf])}var j0=xt(),t_={itemStyle:ei(zT,!0),lineStyle:ei(VT,!0)},Ak={lineStyle:"stroke",itemStyle:"fill"};function kA(r,e){var t=r.visualStyleMapper||t_[e];return t||(console.warn("Unknown style type '"+e+"'."),t_.itemStyle)}function OA(r,e){var t=r.visualDrawType||Ak[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var Ck={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=r.getModel(a),i=kA(r,a),o=i(n),s=n.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=OA(r,a),u=o[l],f=J(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||h){var v=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=v,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||J(o.fill)?v:o.fill,o.stroke=o.stroke==="auto"||J(o.stroke)?v:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&f)return t.setVisual("colorFromPalette",!1),{dataEach:function(c,p){var d=r.getDataParams(p),g=V({},o);g[l]=f(d),c.setItemVisual(p,"style",g)}}}},No=new Mt,Dk={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=kA(r,a),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){No.option=l[a];var u=n(No),f=o.ensureUniqueItemVisual(s,"style");V(f,u),No.option.decal&&(o.setItemVisual(s,"decal",No.option.decal),No.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},Mk={performRawSeries:!0,overallReset:function(r){var e=$();r.eachSeries(function(t){var a=t.getColorBy();if(!t.isColorBySeries()){var n=t.type+"-"+a,i=e.get(n);i||(i={},e.set(n,i)),j0(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var a=t.getRawData(),n={},i=t.getData(),o=j0(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=OA(t,s);i.each(function(u){var f=i.getRawIndex(u);n[f]=u}),a.each(function(u){var f=n[u],h=i.getItemVisual(f,"colorFromPalette");if(h){var v=i.ensureUniqueItemVisual(f,"style"),c=a.getName(u)||u+"",p=a.count();v[l]=t.getColorFromPalette(c,o,p)}})}})}},$l=Math.PI;function Ik(r,e){e=e||{},j(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new at,a=new St({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(a);var n=new bt({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new St({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(i);var o;return e.showSpinner&&(o=new nh({shape:{startAngle:-$l/2,endAngle:-$l/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:$l*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:$l*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=n.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:f}),i.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var NA=function(){function r(e,t,a,n){this._stageTaskMap=$(),this.ecInstance=e,this.api=t,a=this._dataProcessorHandlers=a.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=a.concat(n)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(a){var n=a.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var a=this._pipelineMap.get(e.__pipeline.id),n=a.context,i=!t&&a.progressiveEnabled&&(!n||n.progressiveRender)&&e.__idxInPipeline>a.blockIndex,o=i?a.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var a=this._pipelineMap.get(e.uid),n=e.getData(),i=n.count(),o=a.progressiveEnabled&&t.incrementalPrepareRender&&i>=a.threshold,s=e.get("large")&&i>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=a.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,a=t._pipelineMap=$();e.eachSeries(function(n){var i=n.getProgressive(),o=n.uid;a.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:i&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),a=this.api;D(this._allHandlers,function(n){var i=e.get(n.uid)||e.set(n.uid,{}),o="";Ce(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,i,t,a),n.overallReset&&this._createOverallStageTask(n,i,t,a)},this)},r.prototype.prepareView=function(e,t,a,n){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=a,o.api=n,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,a){this._performStageTasks(this._visualHandlers,e,t,a)},r.prototype._performStageTasks=function(e,t,a,n){n=n||{};var i=!1,o=this;D(e,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),h=f.seriesTaskMap,v=f.overallTask;if(v){var c,p=v.agentStubMap;p.each(function(g){s(n,g)&&(g.dirty(),c=!0)}),c&&v.dirty(),o.updatePayload(v,a);var d=o.getPerformArgs(v,n.block);p.each(function(g){g.perform(d)}),v.perform(d)&&(i=!0)}else h&&h.each(function(g,y){s(n,g)&&g.dirty();var m=o.getPerformArgs(g,n.block);m.skip=!l.performRawSeries&&t.isSeriesFiltered(g.context.model),o.updatePayload(g,a),g.perform(m)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(a){t=a.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,a,n){var i=this,o=t.seriesTaskMap,s=t.seriesTaskMap=$(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?a.eachRawSeries(f):l?a.eachRawSeriesByType(l,f):u&&u(a,n).each(f);function f(h){var v=h.uid,c=s.set(v,o&&o.get(v)||ws({plan:kk,reset:Ok,count:Bk}));c.context={model:h,ecModel:a,api:n,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(h,c)}},r.prototype._createOverallStageTask=function(e,t,a,n){var i=this,o=t.overallTask=t.overallTask||ws({reset:Lk});o.context={ecModel:a,api:n,overallReset:e.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=$(),u=e.seriesType,f=e.getTargetSeries,h=!0,v=!1,c="";Ce(!e.createOnAllSeries,c),u?a.eachRawSeriesByType(u,p):f?f(a,n).each(p):(h=!1,D(a.getSeries(),p));function p(d){var g=d.uid,y=l.set(g,s&&s.get(g)||(v=!0,ws({reset:Pk,onDirty:Ek})));y.context={model:d,overallProgress:h},y.agent=o,y.__block=h,i._pipe(d,y)}v&&o.dirty()},r.prototype._pipe=function(e,t){var a=e.uid,n=this._pipelineMap.get(a);!n.head&&(n.head=t),n.tail&&n.tail.pipe(t),n.tail=t,t.__idxInPipeline=n.count++,t.__pipeline=n},r.wrapStageHandler=function(e,t){return J(e)&&(e={overallReset:e,seriesType:Vk(e)}),e.uid=yo("stageHandler"),t&&(e.visualType=t),e},r}();function Lk(r){r.overallReset(r.ecModel,r.api,r.payload)}function Pk(r){return r.overallProgress&&Rk}function Rk(){this.agent.dirty(),this.getDownstream().dirty()}function Ek(){this.agent&&this.agent.dirty()}function kk(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function Ok(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Pt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?G(e,function(t,a){return BA(a)}):Nk}var Nk=BA(0);function BA(r){return function(e,t){var a=t.data,n=t.resetDefines[r];if(n&&n.dataEach)for(var i=e.start;i0&&c===u.length-v.length){var p=u.slice(0,c);p!=="data"&&(t.mainType=p,t[v.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(a[u]=l,f=!0),f||(n[u]=l)})}return{cptQuery:t,dataQuery:a,otherQuery:n}},r.prototype.filter=function(e,t){var a=this.eventInfo;if(!a)return!0;var n=a.targetEl,i=a.packedEvent,o=a.model,s=a.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,i,"name")&&f(u,i,"dataIndex")&&f(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,n,i));function f(h,v,c,p){return h[c]==null||v[p||c]===h[c]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),Xp=["symbol","symbolSize","symbolRotate","symbolOffset"],n_=Xp.concat(["symbolKeepAspect"]),Fk={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var a={},n={},i=!1,o=0;o=0&&Fn(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function Zp(r,e,t){for(var a=e.type==="radial"?rO(r,e,t):eO(r,e,t),n=e.colorStops,i=0;i0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:wt(r)?[r]:z(r)?r:null}function Og(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&nO(e.lineDash,e.lineWidth),a=e.lineDashOffset;if(t){var n=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(t=G(t,function(i){return i/n}),a/=n)}return[t,a]}var iO=new Ur(!0);function gf(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function i_(r){return typeof r=="string"&&r!=="none"}function yf(r){var e=r.fill;return e!=null&&e!=="none"}function o_(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function s_(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function $p(r,e,t){var a=sg(e.image,e.__image,t);if(Qf(a)){var n=r.createPattern(a,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var i=new DOMMatrix;i.translateSelf(e.x||0,e.y||0),i.rotateSelf(0,0,(e.rotation||0)*Mu),i.scaleSelf(e.scaleX||1,e.scaleY||1),n.setTransform(i)}return n}}function oO(r,e,t,a){var n,i=gf(t),o=yf(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var f=e.path||iO,h=e.__dirty;if(!a){var v=t.fill,c=t.stroke,p=o&&!!v.colorStops,d=i&&!!c.colorStops,g=o&&!!v.image,y=i&&!!c.image,m=void 0,_=void 0,S=void 0,b=void 0,x=void 0;(p||d)&&(x=e.getBoundingRect()),p&&(m=h?Zp(r,v,x):e.__canvasFillGradient,e.__canvasFillGradient=m),d&&(_=h?Zp(r,c,x):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(S=h||!e.__canvasFillPattern?$p(r,v,e):e.__canvasFillPattern,e.__canvasFillPattern=S),y&&(b=h||!e.__canvasStrokePattern?$p(r,c,e):e.__canvasStrokePattern,e.__canvasStrokePattern=S),p?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),d?r.strokeStyle=_:y&&(b?r.strokeStyle=b:i=!1)}var w=e.getGlobalScale();f.setScale(w[0],w[1],e.segmentIgnoreThreshold);var T,A;r.setLineDash&&t.lineDash&&(n=Og(e),T=n[0],A=n[1]);var C=!0;(u||h&Bi)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),C=!1),f.reset(),e.buildPath(f,e.shape,a),f.toStatic(),e.pathUpdated()),C&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=A),a||(t.strokeFirst?(i&&s_(r,t),o&&o_(r,t)):(o&&o_(r,t),i&&s_(r,t))),T&&r.setLineDash([])}function sO(r,e,t){var a=e.__image=sg(t.image,e.__image,e,e.onload);if(!(!a||!Qf(a))){var n=t.x||0,i=t.y||0,o=e.getWidth(),s=e.getHeight(),l=a.width/a.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=a.width,s=a.height),t.sWidth&&t.sHeight){var u=t.sx||0,f=t.sy||0;r.drawImage(a,u,f,t.sWidth,t.sHeight,n,i,o,s)}else if(t.sx&&t.sy){var u=t.sx,f=t.sy,h=o-u,v=s-f;r.drawImage(a,u,f,h,v,n,i,o,s)}else r.drawImage(a,n,i,o,s)}}function lO(r,e,t){var a,n=t.text;if(n!=null&&(n+=""),n){r.font=t.font||Ua,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var i=void 0,o=void 0;r.setLineDash&&t.lineDash&&(a=Og(e),i=a[0],o=a[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),t.strokeFirst?(gf(t)&&r.strokeText(n,t.x,t.y),yf(t)&&r.fillText(n,t.x,t.y)):(yf(t)&&r.fillText(n,t.x,t.y),gf(t)&&r.strokeText(n,t.x,t.y)),i&&r.setLineDash([])}}var l_=["shadowBlur","shadowOffsetX","shadowOffsetY"],u_=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function WA(r,e,t,a,n){var i=!1;if(!a&&(t=t||{},e===t))return!1;if(a||e.opacity!==t.opacity){Ne(r,n),i=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?Xn.opacity:o}(a||e.blend!==t.blend)&&(i||(Ne(r,n),i=!0),r.globalCompositeOperation=e.blend||Xn.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,a,n){if(!this[pe]){if(this._disposed){this.id;return}var i,o,s;if(et(a)&&(n=a.lazyUpdate,i=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[pe]=!0,!this._model||a){var l=new bE(this._api),u=this._theme,f=this._model=new Mg;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},Kp);var h={seriesTransition:s,optionChanged:!0};if(n)this[Ee]={silent:i,updateParams:h},this[pe]=!1,this.getZr().wakeUp();else{try{Ci(this),ba.update.call(this,null,h)}catch(v){throw this[Ee]=null,this[pe]=!1,v}this._ssr||this._zr.flush(),this[Ee]=null,this[pe]=!1,Bo.call(this,i),Vo.call(this,i)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||yt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var a=this._zr.painter;return a.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(yt.svgSupported){var t=this._zr,a=t.storage.getDisplayList();return D(a,function(n){n.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var a=t.excludeComponents,n=this._model,i=[],o=this;D(a,function(l){n.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(i.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return D(i,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var a=t.type==="svg",n=this.group,i=Math.min,o=Math.max,s=1/0;if(T_[n]){var l=s,u=s,f=-s,h=-s,v=[],c=t&&t.pixelRatio||this.getDevicePixelRatio();D(As,function(_,S){if(_.group===n){var b=a?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(rt(t)),x=_.getDom().getBoundingClientRect();l=i(x.left,l),u=i(x.top,u),f=o(x.right,f),h=o(x.bottom,h),v.push({dom:b,left:x.left,top:x.top})}}),l*=c,u*=c,f*=c,h*=c;var p=f-l,d=h-u,g=Ya.createCanvas(),y=Im(g,{renderer:a?"svg":"canvas"});if(y.resize({width:p,height:d}),a){var m="";return D(v,function(_){var S=_.left-l,b=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return t.connectedBackgroundColor&&y.add(new St({shape:{x:0,y:0,width:p,height:d},style:{fill:t.connectedBackgroundColor}})),D(v,function(_){var S=new le({style:{x:_.left*c-l,y:_.top*c-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,a){return Lv(this,"convertToPixel",t,a)},e.prototype.convertFromPixel=function(t,a){return Lv(this,"convertFromPixel",t,a)},e.prototype.containPixel=function(t,a){if(this._disposed){this.id;return}var n=this._model,i,o=ms(n,t);return D(o,function(s,l){l.indexOf("Models")>=0&&D(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)i=i||!!f.containPoint(a);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(i=i||h.containPoint(a,u))}},this)},this),!!i},e.prototype.getVisual=function(t,a){var n=this._model,i=ms(n,t,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?kg(s,l,a):pl(s,a)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;D(EO,function(a){var n=function(i){var o=t.getModel(),s=i.target,l,u=a==="globalout";if(u?l={}:s&&Gn(s,function(p){var d=nt(p);if(d&&d.dataIndex!=null){var g=d.dataModel||o.getSeriesByIndex(d.seriesIndex);return l=g&&g.getDataParams(d.dataIndex,d.dataType,s)||{},!0}else if(d.eventData)return l=V({},d.eventData),!0},!0),l){var f=l.componentType,h=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=l.seriesIndex);var v=f&&h!=null&&o.getComponent(f,h),c=v&&t[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];l.event=i,l.type=a,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:v,view:c},t.trigger(a,l)}};n.zrEventfulCallAtLast=!0,t._zr.on(a,n,t)}),D(Ts,function(a,n){t._messageCenter.on(n,function(i){this.trigger(n,i)},t)}),D(["selectchanged"],function(a){t._messageCenter.on(a,function(n){this.trigger(a,n)},t)}),Wk(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&Qw(this.getDom(),Vg,"");var a=this,n=a._api,i=a._model;D(a._componentsViews,function(o){o.dispose(i,n)}),D(a._chartsViews,function(o){o.dispose(i,n)}),a._zr.dispose(),a._dom=a._model=a._chartsMap=a._componentsMap=a._chartsViews=a._componentsViews=a._scheduler=a._api=a._zr=a._throttledZrFlush=a._theme=a._coordSysMgr=a._messageCenter=null,delete As[a.id]},e.prototype.resize=function(t){if(!this[pe]){if(this._disposed){this.id;return}this._zr.resize(t);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var n=a.resetOption("media"),i=t&&t.silent;this[Ee]&&(i==null&&(i=this[Ee].silent),n=!0,this[Ee]=null),this[pe]=!0;try{n&&Ci(this),ba.update.call(this,{type:"resize",animation:V({duration:0},t&&t.animation)})}catch(o){throw this[pe]=!1,o}this[pe]=!1,Bo.call(this,i),Vo.call(this,i)}}},e.prototype.showLoading=function(t,a){if(this._disposed){this.id;return}if(et(t)&&(a=t,t=""),t=t||"default",this.hideLoading(),!!Jp[t]){var n=Jp[t](this._api,a),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var a=V({},t);return a.type=Ts[t.type],a},e.prototype.dispatchAction=function(t,a){if(this._disposed){this.id;return}if(et(a)||(a={silent:!!a}),!!mf[t.type]&&this._model){if(this[pe]){this._pendingActions.push(t);return}var n=a.silent;Rv.call(this,t,n);var i=a.flush;i?this._zr.flush():i!==!1&&yt.browser.weChat&&this._throttledZrFlush(),Bo.call(this,n),Vo.call(this,n)}},e.prototype.updateLabelLayout=function(){pr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var a=t.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(a);i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){Ci=function(h){var v=h._scheduler;v.restorePipelines(h._model),v.prepareStageTasks(),Iv(h,!0),Iv(h,!1),v.plan()},Iv=function(h,v){for(var c=h._model,p=h._scheduler,d=v?h._componentsViews:h._chartsViews,g=v?h._componentsMap:h._chartsMap,y=h._zr,m=h._api,_=0;_v.get("hoverLayerThreshold")&&!yt.node&&!yt.worker&&v.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=h._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function o(h,v){var c=h.get("blendMode")||null;v.eachRendered(function(p){p.isGroup||(p.style.blend=c)})}function s(h,v){if(!h.preventAutoZ){var c=h.get("z")||0,p=h.get("zlevel")||0;v.eachRendered(function(d){return l(d,c,p,-1/0),!0})}}function l(h,v,c,p){var d=h.getTextContent(),g=h.getTextGuideLine(),y=h.isGroup;if(y)for(var m=h.childrenRef(),_=0;_0?{duration:d,delay:c.get("delay"),easing:c.get("easing")}:null;v.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Zi(y))return;if(y instanceof gt&&iR(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(p){y.stateTransition=g;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&n(y)}})}b_=function(h){return new(function(v){k(c,v);function c(){return v!==null&&v.apply(this,arguments)||this}return c.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},c.prototype.getComponentByElement=function(p){for(;p;){var d=p.__ecComponentInfo;if(d!=null)return h._model.getComponent(d.mainType,d.index);p=p.parent}},c.prototype.enterEmphasis=function(p,d){la(p,d),Ye(h)},c.prototype.leaveEmphasis=function(p,d){ua(p,d),Ye(h)},c.prototype.enterBlur=function(p){dT(p),Ye(h)},c.prototype.leaveBlur=function(p){vg(p),Ye(h)},c.prototype.enterSelect=function(p){gT(p),Ye(h)},c.prototype.leaveSelect=function(p){yT(p),Ye(h)},c.prototype.getModel=function(){return h.getModel()},c.prototype.getViewOfComponentModel=function(p){return h.getViewOfComponentModel(p)},c.prototype.getViewOfSeriesModel=function(p){return h.getViewOfSeriesModel(p)},c}(uA))(h)},nC=function(h){function v(c,p){for(var d=0;d=0)){A_.push(t);var i=NA.wrapStageHandler(t,n);i.__prio=e,i.__raw=t,r.push(i)}}function fC(r,e){Jp[r]=e}function GO(r,e,t){var a=mO("registerMap");a&&a(r,e,t)}var FO=tk;hi(Ng,Ck);hi(yh,Dk);hi(yh,Mk);hi(Ng,Fk);hi(yh,Hk);hi(QA,gO);lC(hA);uC(xO,kE);fC("default",Ik);Xr({type:Zn,event:Zn,update:Zn},Xt);Xr({type:Nu,event:Nu,update:Nu},Xt);Xr({type:_s,event:_s,update:_s},Xt);Xr({type:Bu,event:Bu,update:Bu},Xt);Xr({type:Ss,event:Ss,update:Ss},Xt);sC("light",zk);sC("dark",GA);var C_=[],HO={registerPreprocessor:lC,registerProcessor:uC,registerPostInit:NO,registerPostUpdate:BO,registerUpdateLifecycle:zg,registerAction:Xr,registerCoordinateSystem:VO,registerLayout:zO,registerVisual:hi,registerTransform:FO,registerLoading:fC,registerMap:GO,registerImpl:yO,PRIORITY:LO,ComponentModel:mt,ComponentView:Ft,SeriesModel:Vt,ChartView:Rt,registerComponentModel:function(r){mt.registerClass(r)},registerComponentView:function(r){Ft.registerClass(r)},registerSeriesModel:function(r){Vt.registerClass(r)},registerChartView:function(r){Rt.registerClass(r)},registerSubTypeDefaulter:function(r,e){mt.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){AL(r,e)}};function dt(r){if(z(r)){D(r,function(e){dt(e)});return}ct(C_,r)>=0||(C_.push(r),J(r)&&(r={install:r}),r.install(HO))}function zo(r){return r==null?0:r.length||1}function D_(r){return r}var fa=function(){function r(e,t,a,n,i,o){this._old=e,this._new=t,this._oldKeyGetter=a||D_,this._newKeyGetter=n||D_,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,a={},n=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,n,"_oldKeyGetter"),this._initIndexMap(t,a,i,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(a[s]=l[0]),this._update&&this._update(f,o)}else u===1?(a[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,a)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,a={},n={},i=[],o=[];this._initIndexMap(e,a,i,"_oldKeyGetter"),this._initIndexMap(t,n,o,"_newKeyGetter");for(var s=0;s1&&v===1)this._updateManyToOne&&this._updateManyToOne(f,u),n[l]=null;else if(h===1&&v>1)this._updateOneToMany&&this._updateOneToMany(f,u),n[l]=null;else if(h===1&&v===1)this._update&&this._update(f,u),n[l]=null;else if(h>1&&v>1)this._updateManyToMany&&this._updateManyToMany(f,u),n[l]=null;else if(h>1)for(var c=0;c1)for(var s=0;s30}var Go=et,wa=G,$O=typeof Int32Array>"u"?Array:Int32Array,qO="e\0\0",M_=-1,KO=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],JO=["_approximateExtent"],I_,jl,Fo,Ho,Ov,Wo,Nv,Te=function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var a,n=!1;vC(e)?(a=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(n=!0,a=e),a=a||["x","y"];for(var i={},o=[],s={},l=!1,u={},f=0;f=t)){var a=this._store,n=a.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===lr;if(l&&!n.pure)for(var u=[],f=e;f0},r.prototype.ensureUniqueItemVisual=function(e,t){var a=this._itemVisuals,n=a[e];n||(n=a[e]={});var i=n[t];return i==null&&(i=this.getVisual(t),z(i)?i=i.slice():Go(i)&&(i=V({},i)),n[t]=i),i},r.prototype.setItemVisual=function(e,t,a){var n=this._itemVisuals[e]||{};this._itemVisuals[e]=n,Go(t)?V(n,t):n[t]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Go(e)?V(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,a){this._itemLayouts[e]=a?V(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var a=this.hostModel&&this.hostModel.seriesIndex;Ip(a,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){D(this._graphicEls,function(a,n){a&&e&&e.call(t,a,n)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:wa(this.dimensions,this._getDimInfo,this),this.hostModel)),Ov(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var a=this[e];J(a)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var n=a.apply(this,arguments);return t.apply(this,[n].concat(qd(arguments)))})},r.internalField=function(){I_=function(e){var t=e._invertedIndicesMap;D(t,function(a,n){var i=e._dimInfos[n],o=i.ordinalMeta,s=e._store;if(o){a=t[n]=new $O(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),n[t]=l}}}(),r}();function dl(r,e){Ig(r)||(r=Lg(r)),e=e||{};var t=e.coordDimensions||[],a=e.dimensionsDefine||r.dimensionsDefine||[],n=$(),i=[],o=jO(r,t,a,e.dimensionsCount),s=e.canOmitUnusedDimensions&&dC(o),l=a===r.dimensionsDefine,u=l?pC(r):cC(a),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(r,o));for(var h=$(f),v=new bA(o),c=0;c0&&(a.name=n+(i-1)),i++,e.set(n,i)}}function jO(r,e,t,a){var n=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,a||0);return D(e,function(i){var o;et(i)&&(o=i.dimsDef)&&(n=Math.max(n,o.length))}),n}function tN(r,e,t){if(t||e.hasKey(r)){for(var a=0;e.hasKey(r+a);)a++;r+=a}return e.set(r,!0),r}var eN=function(){function r(e){this.coordSysDims=[],this.axisMap=$(),this.categoryAxisMap=$(),this.coordSysName=e}return r}();function rN(r){var e=r.get("coordinateSystem"),t=new eN(e),a=aN[e];if(a)return a(r,t,t.axisMap,t.categoryAxisMap),t}var aN={cartesian2d:function(r,e,t,a){var n=r.getReferringComponents("xAxis",$t).models[0],i=r.getReferringComponents("yAxis",$t).models[0];e.coordSysDims=["x","y"],t.set("x",n),t.set("y",i),Di(n)&&(a.set("x",n),e.firstCategoryDimIndex=0),Di(i)&&(a.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,a){var n=r.getReferringComponents("singleAxis",$t).models[0];e.coordSysDims=["single"],t.set("single",n),Di(n)&&(a.set("single",n),e.firstCategoryDimIndex=0)},polar:function(r,e,t,a){var n=r.getReferringComponents("polar",$t).models[0],i=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",o),Di(i)&&(a.set("radius",i),e.firstCategoryDimIndex=0),Di(o)&&(a.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,a){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,a){var n=r.ecModel,i=n.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=i.dimensions.slice();D(i.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),f=o[l];t.set(f,u),Di(u)&&(a.set(f,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function Di(r){return r.get("type")==="category"}function nN(r,e,t){t=t||{};var a=t.byIndex,n=t.stackedCoordDimension,i,o,s;iN(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,f,h,v;if(D(i,function(m,_){Y(m)&&(i[_]=m={name:m}),l&&!m.isExtraCoord&&(!a&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!n||n===m.coordDim)&&(f=m))}),f&&!a&&!u&&(a=!0),f){h="__\0ecstackresult_"+r.id,v="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var c=f.coordDim,p=f.type,d=0;D(i,function(m){m.coordDim===c&&d++});var g={name:h,coordDim:c,coordDimIndex:d,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:v,coordDim:v,coordDimIndex:d+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(v,p),y.storeDimIndex=s.ensureCalculationDimension(h,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:v,stackResultDimension:h}}function iN(r){return!vC(r.schema)}function qa(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function gC(r,e){return qa(r,e)?r.getCalculationInfo("stackResultDimension"):e}function oN(r,e){var t=r.get("coordinateSystem"),a=cl.get(t),n;return e&&e.coordSysDims&&(n=G(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=Sf(l)}return o})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),n}function sN(r,e,t){var a,n;return t&&D(r,function(i,o){var s=i.coordDim,l=t.categoryAxisMap.get(s);l&&(a==null&&(a=o),i.ordinalMeta=l.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(n=!0)}),!n&&a!=null&&(r[a].otherDims.itemName=0),a}function ga(r,e,t){t=t||{};var a=e.getSourceManager(),n,i=!1;r?(i=!0,n=Lg(r)):(n=a.getSource(),i=n.sourceFormat===lr);var o=rN(e),s=oN(e,o),l=t.useEncodeDefaulter,u=J(l)?l:l?lt(iA,s,e):null,f={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},h=dl(n,f),v=sN(h.dimensions,t.createInvertedIndices,o),c=i?null:a.getSharedDataStore(h),p=nN(e,{schema:h,store:c}),d=new Te(h,e);d.setCalculationInfo(p);var g=v!=null&&lN(n)?function(y,m,_,S){return S===v?_:this.defaultDimValueGetter(y,m,_,S)}:null;return d.hasItemOption=!1,d.initData(i?n:c,null,g),d}function lN(r){if(r.sourceFormat===lr){var e=uN(r.data||[]);return!z(vo(e))}}function uN(r){for(var e=0;et[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var a=this._extent;isNaN(e)||(a[0]=e),isNaN(t)||(a[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();Jf(Zr);var fN=0,Qp=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++fN}return r.createByAxisModel=function(e){var t=e.option,a=t.data,n=a&&G(a,hN);return new r({categories:n,needCollect:!n,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,a=this._needCollect;if(!Y(e)&&!a)return e;if(a&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var n=this._getOrCreateMap();return t=n.get(e),t==null&&(a?(t=this.categories.length,this.categories[t]=e,n.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=$(this.categories))},r}();function hN(r){return et(r)&&r.value!=null?r.value:r+""}function jp(r){return r.type==="interval"||r.type==="log"}function vN(r,e,t,a){var n={},i=r[1]-r[0],o=n.interval=Uw(i/e);t!=null&&oa&&(o=n.interval=a);var s=n.intervalPrecision=yC(o),l=n.niceTickExtent=[Ut(Math.ceil(r[0]/o)*o,s),Ut(Math.floor(r[1]/o)*o,s)];return cN(l,r),n}function Bv(r){var e=Math.pow(10,ag(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Ut(t*e)}function yC(r){return kr(r)+2}function L_(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function cN(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),L_(r,0,e),L_(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function mh(r,e){return r>=e[0]&&r<=e[1]}function _h(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function Sh(r,e){return r*(e[1]-e[0])+e[0]}var xh=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;a.type="ordinal";var n=a.getSetting("ordinalMeta");return n||(n=new Qp({})),z(n)&&(n=new Qp({categories:G(n,function(i){return et(i)?i.value:i})})),a._ordinalMeta=n,a._extent=a.getSetting("extent")||[0,n.categories.length-1],a}return e.prototype.parse=function(t){return t==null?NaN:Y(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),mh(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),_h(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(Sh(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],a=this._extent,n=a[0];n<=a[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var a=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,a.length);o=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Zr);Zr.registerClass(xh);var xn=Ut,ha=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return mh(t,this._extent)},e.prototype.normalize=function(t){return _h(t,this._extent)},e.prototype.scale=function(t){return Sh(t,this._extent)},e.prototype.setExtent=function(t,a){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(a)||(n[1]=parseFloat(a))},e.prototype.unionExtent=function(t){var a=this._extent;t[0]a[1]&&(a[1]=t[1]),this.setExtent(a[0],a[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=yC(t)},e.prototype.getTicks=function(t){var a=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=[];if(!a)return s;var l=1e4;n[0]l)return[];var f=s.length?s[s.length-1].value:i[1];return n[1]>f&&(t?s.push({value:xn(f+a,o)}):s.push({value:n[1]})),s},e.prototype.getMinorTicks=function(t){for(var a=this.getTicks(!0),n=[],i=this.getExtent(),o=1;oi[0]&&c0&&(i=i===null?s:Math.min(i,s))}t[a]=i}}return t}function xC(r){var e=gN(r),t=[];return D(r,function(a){var n=a.coordinateSystem,i=n.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=e[l],f=Math.abs(o[1]-o[0]),h=i.scale.getExtent(),v=Math.abs(h[1]-h[0]);s=u?f/v*u:f}else{var c=a.getData();s=Math.abs(o[1]-o[0])/c.count()}var p=W(a.get("barWidth"),s),d=W(a.get("barMaxWidth"),s),g=W(a.get("barMinWidth")||(CC(a)?.5:1),s),y=a.get("barGap"),m=a.get("barCategoryGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:d,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:Fg(i),stackId:_C(a)})}),bC(t)}function bC(r){var e={};D(r,function(a,n){var i=a.axisKey,o=a.bandWidth,s=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[i]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=a.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=a.barMaxWidth;h&&(l[u].maxWidth=h);var v=a.barMinWidth;v&&(l[u].minWidth=v);var c=a.barGap;c!=null&&(s.gap=c);var p=a.barCategoryGap;p!=null&&(s.categoryGap=p)});var t={};return D(e,function(a,n){t[n]={};var i=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=_t(i).length;s=Math.max(35-l*4,15)+"%"}var u=W(s,o),f=W(a.gap,1),h=a.remainedWidth,v=a.autoWidthCount,c=(h-u)/(v+(v-1)*f);c=Math.max(c,0),D(i,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var S=y.width;m&&(S=Math.min(S,m)),_&&(S=Math.max(S,_)),y.width=S,h-=S+f*S,v--}else{var S=c;m&&mS&&(S=_),S!==c&&(y.width=S,h-=S+f*S,v--)}}),c=(h-u)/(v+(v-1)*f),c=Math.max(c,0);var p=0,d;D(i,function(y,m){y.width||(y.width=c),d=y,p+=y.width*(1+f)}),d&&(p-=d.width*f);var g=-p/2;D(i,function(y,m){t[n][m]=t[n][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),t}function yN(r,e,t){if(r&&e){var a=r[Fg(e)];return a}}function wC(r,e){var t=SC(r,e),a=xC(t);D(t,function(n){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=_C(n),u=a[Fg(s)][l],f=u.offset,h=u.width;i.setLayout({bandWidth:u.bandWidth,offset:f,size:h})})}function TC(r){return{seriesType:r,plan:xo(),reset:function(e){if(AC(e)){var t=e.getData(),a=e.coordinateSystem,n=a.getBaseAxis(),i=a.getOtherAxis(n),o=t.getDimensionIndex(t.mapDimension(i.dim)),s=t.getDimensionIndex(t.mapDimension(n.dim)),l=e.get("showBackground",!0),u=t.mapDimension(i.dim),f=t.getCalculationInfo("stackResultDimension"),h=qa(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),v=i.isHorizontal(),c=mN(n,i),p=CC(e),d=e.get("barMinHeight")||0,g=f&&t.getDimensionIndex(f),y=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(_,S){for(var b=_.count,x=p&&Nr(b*3),w=p&&l&&Nr(b*3),T=p&&Nr(b),A=a.master.getRect(),C=v?A.width:A.height,M,I=S.getStore(),L=0;(M=_.next())!=null;){var P=I.get(h?g:o,M),R=I.get(s,M),E=c,N=void 0;h&&(N=+P-I.get(o,M));var O=void 0,B=void 0,F=void 0,H=void 0;if(v){var U=a.dataToPoint([P,R]);if(h){var K=a.dataToPoint([N,R]);E=K[0]}O=E,B=U[1]+m,F=U[0]-E,H=y,Math.abs(F)0?t:1:t))}var _N=function(r,e,t,a){for(;t>>1;r[n][1]n&&(this._approxInterval=n);var s=tu.length,l=Math.min(_N(tu,this._approxInterval,0,s),s-1);this._interval=tu[l][1],this._minLevelUnit=tu[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return wt(t)?t:+Wr(t)},e.prototype.contain=function(t){return mh(this.parse(t),this._extent)},e.prototype.normalize=function(t){return _h(this.parse(t),this._extent)},e.prototype.scale=function(t){return Sh(t,this._extent)},e.type="time",e}(ha),tu=[["second",xg],["minute",bg],["hour",bs],["quarter-day",bs*6],["half-day",bs*12],["day",ar*1.2],["half-week",ar*3.5],["week",ar*7],["month",ar*31],["quarter",ar*95],["half-year",_0/2],["year",_0]];function SN(r,e,t,a){var n=Wr(e),i=Wr(t),o=function(p){return x0(n,p,a)===x0(i,p,a)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},h=function(){return f()&&o("minute")},v=function(){return h()&&o("second")},c=function(){return v()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return h();case"second":return v();case"millisecond":return c()}}function xN(r,e){return r/=ar,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function bN(r){var e=30*ar;return r/=e,r>6?6:r>3?3:r>2?2:1}function wN(r){return r/=bs,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function P_(r,e){return r/=e?bg:xg,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function TN(r){return Uw(r)}function AN(r,e,t){var a=new Date(r);switch(qi(e)){case"year":case"month":a[UT(t)](0);case"day":a[YT(t)](1);case"hour":a[XT(t)](0);case"minute":a[ZT(t)](0);case"second":a[$T(t)](0),a[qT(t)](0)}return a.getTime()}function CN(r,e,t,a){var n=1e4,i=HT,o=0;function s(C,M,I,L,P,R,E){for(var N=new Date(M),O=M,B=N[L]();O1&&R===0&&I.unshift({value:I[0].value-O})}}for(var R=0;R=a[0]&&m<=a[1]&&h++)}var _=(a[1]-a[0])/e;if(h>_*1.5&&v>_/1.5||(u.push(g),h>_||r===i[c]))break}f=[]}}}for(var S=Ct(G(u,function(C){return Ct(C,function(M){return M.value>=a[0]&&M.value<=a[1]&&!M.notAdd})}),function(C){return C.length>0}),b=[],x=S.length-1,c=0;c0;)i*=10;var s=[Ut(IN(a[0]/i)*i),Ut(MN(a[1]/i)*i)];this._interval=i,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){Cs.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=hr(t)/hr(this.base),mh(t,this._extent)},e.prototype.normalize=function(t){return t=hr(t)/hr(this.base),_h(t,this._extent)},e.prototype.scale=function(t){return t=Sh(t,this._extent),eu(this.base,t)},e.type="log",e}(Zr),DC=Wg.prototype;DC.getMinorTicks=Cs.getMinorTicks;DC.getLabel=Cs.getLabel;function ru(r,e){return DN(r,kr(e))}Zr.registerClass(Wg);var LN=function(){function r(e,t,a){this._prepareParams(e,t,a)}return r.prototype._prepareParams=function(e,t,a){a[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var v=this._determinedMin,c=this._determinedMax;return v!=null&&(s=v,u=!0),c!=null&&(l=c,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:h}},r.prototype.modifyDataMinMax=function(e,t){this[RN[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var a=PN[e];this[a]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),PN={min:"_determinedMin",max:"_determinedMax"},RN={min:"_dataMin",max:"_dataMax"};function MC(r,e,t){var a=r.rawExtentInfo;return a||(a=new LN(r,e,t),r.rawExtentInfo=a,a)}function au(r,e){return e==null?null:Is(e)?NaN:r.parse(e)}function IC(r,e){var t=r.type,a=MC(r,e,r.getExtent()).calculate();r.setBlank(a.isBlank);var n=a.min,i=a.max,o=e.ecModel;if(o&&t==="time"){var s=SC("bar",o),l=!1;if(D(s,function(h){l=l||h.getBaseAxis()===e.axis}),l){var u=xC(s),f=EN(n,i,e,u);n=f.min,i=f.max}}return{extent:[n,i],fixMin:a.minFixed,fixMax:a.maxFixed}}function EN(r,e,t,a){var n=t.axis.getExtent(),i=Math.abs(n[1]-n[0]),o=yN(a,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;D(o,function(c){s=Math.min(c.offset,s)});var l=-1/0;D(o,function(c){l=Math.max(c.offset+c.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=e-r,h=1-(s+l)/i,v=f/h-f;return e+=v*(l/u),r-=v*(s/u),{min:r,max:e}}function ao(r,e){var t=e,a=IC(r,t),n=a.extent,i=t.get("splitNumber");r instanceof Wg&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:i,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function bh(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new xh({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new Hg({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(Zr.getClass(e)||ha)}}function kN(r){var e=r.scale.getExtent(),t=e[0],a=e[1];return!(t>0&&a>0||t<0&&a<0)}function To(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(a){return function(n,i){return r.scale.getFormattedLabel(n,i,a)}}(e):Y(e)?function(a){return function(n){var i=r.scale.getLabel(n),o=a.replace("{value}",i??"");return o}}(e):J(e)?function(a){return function(n,i){return t!=null&&(i=n.value-t),a(Ug(r,n),i,n.level!=null?{level:n.level}:null)}}(e):function(a){return r.scale.getLabel(a)}}function Ug(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function ON(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var a,n,i=t.getExtent();t instanceof xh?n=t.count():(a=t.getTicks(),n=a.length);var o=r.getLabelModel(),s=To(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var f=0;fr[1]&&(r[1]=n[1])})}var gl=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),VN=1e-8;function E_(r,e){return Math.abs(r-e)n&&(a=o,n=l)}if(a)return GN(a.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var a=this._rect;if(a&&!t)return a;var n=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return D(o,function(s){s.type==="polygon"?k_(s.exterior,n,i,t):D(s.points,function(l){k_(l,n,i,t)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),a=new ht(n[0],n[1],i[0]-n[0],i[1]-n[1]),t||(this._rect=a),a},e.prototype.contain=function(t){var a=this.getBoundingRect(),n=this.geometries;if(!a.contain(t[0],t[1]))return!1;t:for(var i=0,o=n.length;i>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=i,n=s,i=l,a.push([s/t,l/t])}return a}function WN(r,e){return r=HN(r),G(Ct(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var a=t.properties,n=t.geometry,i=[];switch(n.type){case"Polygon":var o=n.coordinates;i.push(new O_(o[0],o.slice(1)));break;case"MultiPolygon":D(n.coordinates,function(l){l[0]&&i.push(new O_(l[0],l.slice(1)))});break;case"LineString":i.push(new N_([n.coordinates]));break;case"MultiLineString":i.push(new N_(n.coordinates))}var s=new RC(a[e||"name"],i,a.cp);return s.properties=a,s})}var Ys=xt();function kC(r,e){var t=G(e,function(a){return r.scale.parse(a)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function UN(r){var e=r.getLabelModel().get("customValues");if(e){var t=To(r),a=r.scale.getExtent(),n=kC(r,e),i=Ct(n,function(o){return o>=a[0]&&o<=a[1]});return{labels:G(i,function(o){var s={value:o};return{formattedLabel:t(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?XN(r):$N(r)}function YN(r,e){var t=r.getTickModel().get("customValues");if(t){var a=r.scale.getExtent(),n=kC(r,t);return{ticks:Ct(n,function(i){return i>=a[0]&&i<=a[1]})}}return r.type==="category"?ZN(r,e):{ticks:G(r.scale.getTicks(),function(i){return i.value})}}function XN(r){var e=r.getLabelModel(),t=OC(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function OC(r,e){var t=NC(r,"labels"),a=Yg(e),n=BC(t,a);if(n)return n;var i,o;return J(a)?i=GC(r,a):(o=a==="auto"?qN(r):a,i=zC(r,o)),VC(t,a,{labels:i,labelCategoryInterval:o})}function ZN(r,e){var t=NC(r,"ticks"),a=Yg(e),n=BC(t,a);if(n)return n;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),J(a))i=GC(r,a,!0);else if(a==="auto"){var s=OC(r,r.getLabelModel());o=s.labelCategoryInterval,i=G(s.labels,function(l){return l.tickValue})}else o=a,i=zC(r,o,!0);return VC(t,a,{ticks:i,tickCategoryInterval:o})}function $N(r){var e=r.scale.getTicks(),t=To(r);return{labels:G(e,function(a,n){return{level:a.level,formattedLabel:t(a,n),rawLabel:r.scale.getLabel(a),tickValue:a.value}})}}function NC(r,e){return Ys(r)[e]||(Ys(r)[e]=[])}function BC(r,e){for(var t=0;t40&&(s=Math.max(1,Math.floor(o/40)));for(var l=i[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),f=Math.abs(u*Math.cos(a)),h=Math.abs(u*Math.sin(a)),v=0,c=0;l<=i[1];l+=s){var p=0,d=0,g=il(t({value:l}),e.font,"center","top");p=g.width*1.3,d=g.height*1.3,v=Math.max(v,p,7),c=Math.max(c,d,7)}var y=v/f,m=c/h;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),S=Ys(r.model),b=r.getExtent(),x=S.lastAutoInterval,w=S.lastTickCount;return x!=null&&w!=null&&Math.abs(x-_)<=1&&Math.abs(w-o)<=1&&x>_&&S.axisExtent0===b[0]&&S.axisExtent1===b[1]?_=x:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=b[0],S.axisExtent1=b[1]),_}function JN(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function zC(r,e,t){var a=To(r),n=r.scale,i=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],f=n.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=LC(r),v=o.get("showMinLabel")||h,c=o.get("showMaxLabel")||h;v&&u!==i[0]&&d(i[0]);for(var p=u;p<=i[1];p+=l)d(p);c&&p-l!==i[1]&&d(i[1]);function d(g){var y={value:g};s.push(t?g:{formattedLabel:a(y),rawLabel:n.getLabel(y),tickValue:g})}return s}function GC(r,e,t){var a=r.scale,n=To(r),i=[];return D(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;e(o.value,s)&&i.push(t?l:{formattedLabel:n(o),rawLabel:s,tickValue:l})}),i}var B_=[0,1],wr=function(){function r(e,t,a){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=a||[0,0]}return r.prototype.contain=function(e){var t=this._extent,a=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return e>=a&&e<=n},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return Hw(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var a=this._extent;a[0]=e,a[1]=t},r.prototype.dataToCoord=function(e,t){var a=this._extent,n=this.scale;return e=n.normalize(e),this.onBand&&n.type==="ordinal"&&(a=a.slice(),V_(a,n.count())),Dt(e,B_,a,t)},r.prototype.coordToData=function(e,t){var a=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(a=a.slice(),V_(a,n.count()));var i=Dt(e,a,B_,t);return this.scale.scale(i)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),a=YN(this,t),n=a.ticks,i=G(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return QN(this,i,o,e.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var a=this.scale.getMinorTicks(t),n=G(a,function(i){return G(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(){return UN(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),a=t[1]-t[0]+(this.onBand?1:0);a===0&&(a=1);var n=Math.abs(e[1]-e[0]);return Math.abs(n)/a},r.prototype.calculateCategoryInterval=function(){return KN(this)},r}();function V_(r,e){var t=r[1]-r[0],a=e,n=t/a/2;r[0]+=n,r[1]-=n}function QN(r,e,t,a){var n=e.length;if(!r.onBand||t||!n)return;var i=r.getExtent(),o,s;if(n===1)e[0].coord=i[0],o=e[1]={coord:i[1],tickValue:e[0].tickValue};else{var l=e[n-1].tickValue-e[0].tickValue,u=(e[n-1].coord-e[0].coord)/l;D(e,function(c){c.coord-=u/2});var f=r.scale.getExtent();s=1+f[1]-e[n-1].tickValue,o={coord:e[n-1].coord+u*s,tickValue:f[1]+1},e.push(o)}var h=i[0]>i[1];v(e[0].coord,i[0])&&(a?e[0].coord=i[0]:e.shift()),a&&v(i[0],e[0].coord)&&e.unshift({coord:i[0]}),v(i[1],o.coord)&&(a?o.coord=i[1]:e.pop()),a&&v(o.coord,i[1])&&e.push({coord:i[1]});function v(c,p){return c=Ut(c),p=Ut(p),h?c>p:cn&&(n+=Uo);var c=Math.atan2(s,o);if(c<0&&(c+=Uo),c>=a&&c<=n||c+Uo>=a&&c+Uo<=n)return l[0]=f,l[1]=h,u-t;var p=t*Math.cos(a)+r,d=t*Math.sin(a)+e,g=t*Math.cos(n)+r,y=t*Math.sin(n)+e,m=(p-o)*(p-o)+(d-s)*(d-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=p,l[1]=d,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function bf(r,e,t,a,n,i,o,s){var l=n-r,u=i-e,f=t-r,h=a-e,v=Math.sqrt(f*f+h*h);f/=v,h/=v;var c=l*f+u*h,p=c/v;s&&(p=Math.min(Math.max(p,0),1)),p*=v;var d=o[0]=r+p*f,g=o[1]=e+p*h;return Math.sqrt((d-n)*(d-n)+(g-i)*(g-i))}function FC(r,e,t,a,n,i,o){t<0&&(r=r+t,t=-t),a<0&&(e=e+a,a=-a);var s=r+t,l=e+a,u=o[0]=Math.min(Math.max(n,r),s),f=o[1]=Math.min(Math.max(i,e),l);return Math.sqrt((u-n)*(u-n)+(f-i)*(f-i))}var dr=[];function rB(r,e,t){var a=FC(e.x,e.y,e.width,e.height,r.x,r.y,dr);return t.set(dr[0],dr[1]),a}function aB(r,e,t){for(var a=0,n=0,i=0,o=0,s,l,u=1/0,f=e.data,h=r.x,v=r.y,c=0;c0){e=e/180*Math.PI,yr.fromArray(r[0]),Nt.fromArray(r[1]),Yt.fromArray(r[2]),ft.sub(Br,yr,Nt),ft.sub(Er,Yt,Nt);var t=Br.len(),a=Er.len();if(!(t<.001||a<.001)){Br.scale(1/t),Er.scale(1/a);var n=Br.dot(Er),i=Math.cos(e);if(i1&&ft.copy(be,Yt),be.toArray(r[1])}}}}function nB(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,yr.fromArray(r[0]),Nt.fromArray(r[1]),Yt.fromArray(r[2]),ft.sub(Br,Nt,yr),ft.sub(Er,Yt,Nt);var a=Br.len(),n=Er.len();if(!(a<.001||n<.001)){Br.scale(1/a),Er.scale(1/n);var i=Br.dot(e),o=Math.cos(t);if(i=l)ft.copy(be,Yt);else{be.scaleAndAdd(Er,s/Math.tan(Math.PI/2-f));var h=Yt.x!==Nt.x?(be.x-Nt.x)/(Yt.x-Nt.x):(be.y-Nt.y)/(Yt.y-Nt.y);if(isNaN(h))return;h<0?ft.copy(be,Nt):h>1&&ft.copy(be,Yt)}be.toArray(r[1])}}}}function Gv(r,e,t,a){var n=t==="normal",i=n?r:r.ensureState(t);i.ignore=e;var o=a.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();n?r.useStyle(s):i.style=s}function iB(r,e){var t=e.smooth,a=e.points;if(a)if(r.moveTo(a[0][0],a[0][1]),t>0&&a.length>=3){var n=Pa(a[0],a[1]),i=Pa(a[1],a[2]);if(!n||!i){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(n,i)*t,s=Lu([],a[1],a[0],o/n),l=Lu([],a[1],a[2],o/i),u=Lu([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],a[2][0],a[2][1])}else for(var f=1;f0){_(A*T,0,o);var C=A+x;C<0&&S(-C*T,1)}else S(-x*T,1)}}function _(x,w,T){x!==0&&(u=!0);for(var A=w;A0)for(var C=0;C0;C--){var P=T[C-1]*L;_(-P,C,o)}}}function b(x){var w=x<0?-1:1;x=Math.abs(x);for(var T=Math.ceil(x/(o-1)),A=0;A0?_(T,0,A+1):_(-T,o-A-1,o),x-=T,x<=0)return}return u}function oB(r,e,t,a){return UC(r,"x","width",e,t)}function YC(r,e,t,a){return UC(r,"y","height",e,t)}function XC(r){var e=[];r.sort(function(d,g){return g.priority-d.priority});var t=new ht(0,0,0,0);function a(d){if(!d.ignore){var g=d.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}d.ignore=!0}for(var n=0;n=0&&a.attr(i.oldLayoutSelect),ct(v,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),Tt(a,u,t,l)}else if(a.attr(u),!go(a).valueAnimation){var h=st(a.style.opacity,1);a.style.opacity=0,zt(a,{style:{opacity:h}},t,l)}if(i.oldLayout=u,a.states.select){var c=i.oldLayoutSelect={};nu(c,u,iu),nu(c,a.states.select,iu)}if(a.states.emphasis){var p=i.oldLayoutEmphasis={};nu(p,u,iu),nu(p,a.states.emphasis,iu)}BT(a,l,f,t,t)}if(n&&!n.ignore&&!n.invisible){var i=uB(n),o=i.oldLayout,d={points:n.shape.points};o?(n.attr({shape:o}),Tt(n,{shape:d},t)):(n.setShape(d),n.style.strokePercent=0,zt(n,{style:{strokePercent:1}},t)),i.oldLayout=d}},r}(),Hv=xt();function hB(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var n=Hv(t).labelManager;n||(n=Hv(t).labelManager=new fB),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var n=Hv(t).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}var Wv=Math.sin,Uv=Math.cos,ZC=Math.PI,wn=Math.PI*2,vB=180/ZC,$C=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,a,n,i,o){this._add("C",e,t,a,n,i,o)},r.prototype.quadraticCurveTo=function(e,t,a,n){this._add("Q",e,t,a,n)},r.prototype.arc=function(e,t,a,n,i,o){this.ellipse(e,t,a,a,0,n,i,o)},r.prototype.ellipse=function(e,t,a,n,i,o,s,l){var u=s-o,f=!l,h=Math.abs(u),v=Na(h-wn)||(f?u>=wn:-u>=wn),c=u>0?u%wn:u%wn+wn,p=!1;v?p=!0:Na(h)?p=!1:p=c>=ZC==!!f;var d=e+a*Uv(o),g=t+n*Wv(o);this._start&&this._add("M",d,g);var y=Math.round(i*vB);if(v){var m=1/this._p,_=(f?1:-1)*(wn-m);this._add("A",a,n,y,1,+f,e+a*Uv(o+_),t+n*Wv(o+_)),m>.01&&this._add("A",a,n,y,0,+f,d,g)}else{var S=e+a*Uv(s),b=t+n*Wv(s);this._add("A",a,n,y,+p,+f,S,b)}},r.prototype.rect=function(e,t,a,n){this._add("M",e,t),this._add("l",a,0),this._add("l",0,n),this._add("l",-a,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,a,n,i,o,s,l,u){for(var f=[],h=this._p,v=1;v"}function xB(r){return""}function qg(r,e){e=e||{};var t=e.newline?` +`:"";function a(n){var i=n.children,o=n.tag,s=n.attrs,l=n.text;return SB(o,s)+(o!=="style"?we(l):l||"")+(i?""+t+G(i,function(u){return a(u)}).join(t)+t:"")+xB(o)}return a(r)}function bB(r,e,t){t=t||{};var a=t.newline?` +`:"",n=" {"+a,i=a+"}",o=G(_t(r),function(l){return l+n+G(_t(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+i}).join(a),s=G(_t(e),function(l){return"@keyframes "+l+n+G(_t(e[l]),function(u){return u+n+G(_t(e[l][u]),function(f){var h=e[l][u][f];return f==="d"&&(h='path("'+h+'")'),f+":"+h+";"}).join(a)+i}).join(a)+i}).join(a);return!o&&!s?"":[""].join(a)}function rd(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function H_(r,e,t,a){return re("svg","root",{width:r,height:e,xmlns:qC,"xmlns:xlink":KC,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+e:!1},t)}var wB=0;function QC(){return wB++}var W_={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Cn="transform-origin";function TB(r,e,t){var a=V({},r.shape);V(a,e),r.buildPath(t,a);var n=new $C;return n.reset(Ew(r)),t.rebuildPath(n,1),n.generateStr(),n.getStr()}function AB(r,e){var t=e.originX,a=e.originY;(t||a)&&(r[Cn]=t+"px "+a+"px")}var CB={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function jC(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function DB(r,e,t){var a=r.shape.paths,n={},i,o;if(D(a,function(l){var u=rd(t.zrId);u.animation=!0,wh(l,{},u,!0);var f=u.cssAnims,h=u.cssNodes,v=_t(f),c=v.length;if(c){o=v[c-1];var p=f[o];for(var d in p){var g=p[d];n[d]=n[d]||{d:""},n[d].d+=g.d||""}for(var y in h){var m=h[y].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){e.d=!1;var s=jC(n,t);return i.replace(o,s)}}function U_(r){return Y(r)?W_[r]?"cubic-bezier("+W_[r]+")":tg(r)?r:"":""}function wh(r,e,t,a){var n=r.animators,i=n.length,o=[];if(r instanceof dg){var s=DB(r,e,t);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u0}).length){var Wt=jC(w,t);return Wt+" "+m[0]+" both"}}for(var g in l){var s=d(l[g]);s&&o.push(s)}if(o.length){var y=t.zrId+"-cls-"+QC();t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function MB(r,e,t){if(!r.ignore)if(r.isSilent()){var a={"pointer-events":"none"};Y_(a,e,t)}else{var n=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},i=n.fill;if(!i){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(i=pp(l))}var u=n.lineWidth;if(u){var f=!n.strokeNoScale&&r.transform?r.transform[0]:1;u=u/f}var a={cursor:"pointer"};i&&(a.fill=i),n.stroke&&(a.stroke=n.stroke),u&&(a["stroke-width"]=u),Y_(a,e,t)}}function Y_(r,e,t,a){var n=JSON.stringify(r),i=t.cssStyleCache[n];i||(i=t.zrId+"-cls-"+QC(),t.cssStyleCache[n]=i,t.cssNodes["."+i+":hover"]=r),e.class=e.class?e.class+" "+i:i}var Xs=Math.round;function tD(r){return r&&Y(r.src)}function eD(r){return r&&J(r.toDataURL)}function Kg(r,e,t,a){yB(function(n,i){var o=n==="fill"||n==="stroke";o&&Rw(i)?aD(e,r,n,a):o&&eg(i)?nD(t,r,n,a):r[n]=i,o&&a.ssr&&i==="none"&&(r["pointer-events"]="visible")},e,t,!1),OB(t,r,a)}function Jg(r,e){var t=CL(e);t&&(t.each(function(a,n){a!=null&&(r[(F_+n).toLowerCase()]=a+"")}),e.isSilent()&&(r[F_+"silent"]="true"))}function X_(r){return Na(r[0]-1)&&Na(r[1])&&Na(r[2])&&Na(r[3]-1)}function IB(r){return Na(r[4])&&Na(r[5])}function Qg(r,e,t){if(e&&!(IB(e)&&X_(e))){var a=1e4;r.transform=X_(e)?"translate("+Xs(e[4]*a)/a+" "+Xs(e[5]*a)/a+")":qI(e)}}function Z_(r,e,t){for(var a=r.points,n=[],i=0;i"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";Ce(v,g),Ce(c,g)}else if(v==null||c==null){var y=function(C,M){if(C){var I=C.elm,L=v||M.width,P=c||M.height;C.tag==="pattern"&&(u?(P=1,L/=i.width):f&&(L=1,P/=i.height)),C.attrs.width=L,C.attrs.height=P,I&&(I.setAttribute("width",L),I.setAttribute("height",P))}},m=sg(p,null,r,function(C){l||y(x,C),y(h,C)});m&&m.width&&m.height&&(v=v||m.width,c=c||m.height)}h=re("image","img",{href:p,width:v,height:c}),o.width=v,o.height=c}else n.svgElement&&(h=rt(n.svgElement),o.width=n.svgWidth,o.height=n.svgHeight);if(h){var _,S;l?_=S=1:u?(S=1,_=o.width/i.width):f?(_=1,S=o.height/i.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),S!=null&&!isNaN(S)&&(o.height=S);var b=kw(n);b&&(o.patternTransform=b);var x=re("pattern","",o,[h]),w=qg(x),T=a.patternCache,A=T[w];A||(A=a.zrId+"-p"+a.patternIdx++,T[w]=A,o.id=A,x=a.defs[A]=re("pattern",A,o,[h])),e[t]=$f(A)}}function NB(r,e,t){var a=t.clipPathCache,n=t.defs,i=a[r.id];if(!i){i=t.zrId+"-c"+t.clipPathIdx++;var o={id:i};a[r.id]=i,n[i]=re("clipPath",i,o,[rD(r,t)])}e["clip-path"]=$f(i)}function K_(r){return document.createTextNode(r)}function En(r,e,t){r.insertBefore(e,t)}function J_(r,e){r.removeChild(e)}function Q_(r,e){r.appendChild(e)}function iD(r){return r.parentNode}function oD(r){return r.nextSibling}function Yv(r,e){r.textContent=e}var j_=58,BB=120,VB=re("","");function ad(r){return r===void 0}function Pr(r){return r!==void 0}function zB(r,e,t){for(var a={},n=e;n<=t;++n){var i=r[n].key;i!==void 0&&(a[i]=n)}return a}function ls(r,e){var t=r.key===e.key,a=r.tag===e.tag;return a&&t}function Zs(r){var e,t=r.children,a=r.tag;if(Pr(a)){var n=r.elm=JC(a);if(jg(VB,r),z(t))for(e=0;ei?(p=t[l+1]==null?null:t[l+1].elm,sD(r,p,t,n,l)):Tf(r,e,a,i))}function zi(r,e){var t=e.elm=r.elm,a=r.children,n=e.children;r!==e&&(jg(r,e),ad(e.text)?Pr(a)&&Pr(n)?a!==n&&GB(t,a,n):Pr(n)?(Pr(r.text)&&Yv(t,""),sD(t,null,n,0,n.length-1)):Pr(a)?Tf(t,a,0,a.length-1):Pr(r.text)&&Yv(t,""):r.text!==e.text&&(Pr(a)&&Tf(t,a,0,a.length-1),Yv(t,e.text)))}function FB(r,e){if(ls(r,e))zi(r,e);else{var t=r.elm,a=iD(t);Zs(e),a!==null&&(En(a,e.elm,oD(t)),Tf(a,[r],0,0))}return e}var HB=0,WB=function(){function r(e,t,a){if(this.type="svg",this.refreshHover=t1(),this.configLayer=t1(),this.storage=t,this._opts=a=V({},a),this.root=e,this._id="zr"+HB++,this._oldVNode=H_(a.width,a.height),e&&!a.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=JC("svg");jg(null,this._oldVNode),n.appendChild(i),e.appendChild(n)}this.resize(a.width,a.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",FB(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return q_(e,rd(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),a=this._width,n=this._height,i=rd(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=UB(a,n,this._backgroundColor,i);s&&o.push(s);var l=e.compress?null:this._mainVNode=re("g","main",{},[]);this._paintList(t,i,l?l.children:o),l&&o.push(l);var u=G(_t(i.defs),function(v){return i.defs[v]});if(u.length&&o.push(re("defs","defs",{},u)),e.animation){var f=bB(i.cssNodes,i.cssAnims,{newline:!0});if(f){var h=re("style","stl",{},[],f);o.push(h)}}return H_(a,n,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},qg(this.renderToVNode({animation:st(e.cssAnimation,!0),emphasis:st(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:st(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,a){for(var n=e.length,i=[],o=0,s,l,u=0,f=0;f=0&&!(v&&l&&v[d]===l[d]);d--);for(var g=p-1;g>d;g--)o--,s=i[o-1];for(var y=d+1;y=s)}}for(var h=this.__startIndex;h15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var C=c.dpr,M=0;M0&&e>n[0]){for(l=0;le);l++);s=a[n[l]]}if(n.splice(l+1,0,e),a[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var a=this._zlevelList,n=0;n0?ou:0),this._needsManuallyCompositing),f.__builtin__||Zd("ZLevel "+u+" has been used by unkown layer "+f.id),f!==i&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,t(l),i=f),n.__dirty&Ge&&!n.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(h,v){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,D(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var a=this._layerConfig;a[e]?ut(a[e],t,!0):a[e]=t;for(var n=0;n-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),a},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Vt);function no(r,e){var t=r.mapDimensionsAll("defaultedLabel"),a=t.length;if(a===1){var n=eo(r,e,t[0]);return n!=null?n+"":null}else if(a){for(var i=[],o=0;o=0&&a.push(e[i])}return a.join(" ")}var yl=function(r){k(e,r);function e(t,a,n,i){var o=r.call(this)||this;return o.updateData(t,a,n,i),o}return e.prototype._createSymbol=function(t,a,n,i,o){this.removeAll();var s=qt(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=QB,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){la(this.childAt(0))},e.prototype.downplay=function(){ua(this.childAt(0))},e.prototype.setZ=function(t,a){var n=this.childAt(0);n.zlevel=t,n.z=a},e.prototype.setDraggable=function(t,a){var n=this.childAt(0);n.draggable=t,n.cursor=!a&&t?"move":n.cursor},e.prototype.updateData=function(t,a,n,i){this.silent=!1;var o=t.getItemVisual(a,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,a),u=o!==this._symbolType,f=i&&i.disableAnimation;if(u){var h=t.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,t,a,l,h)}else{var v=this.childAt(0);v.silent=!1;var c={scaleX:l[0]/2,scaleY:l[1]/2};f?v.attr(c):Tt(v,c,s,a),xr(v)}if(this._updateCommon(t,a,l,n,i),u){var v=this.childAt(0);if(!f){var c={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,zt(v,c,s,a)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,a,n,i,o){var s=this.childAt(0),l=t.hostModel,u,f,h,v,c,p,d,g,y;if(i&&(u=i.emphasisItemStyle,f=i.blurItemStyle,h=i.selectItemStyle,v=i.focus,c=i.blurScope,d=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,p=i.emphasisDisabled),!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(a),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),v=_.get("focus"),c=_.get("blurScope"),p=_.get("disabled"),d=ne(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=t.getItemVisual(a,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var b=fi(t.getItemVisual(a,"symbolOffset"),n);b&&(s.x=b[0],s.y=b[1]),y&&s.attr("cursor",y);var x=t.getItemVisual(a,"style"),w=x.fill;if(s instanceof le){var T=s.style;s.useStyle(V({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle(V({},x)):s.useStyle(x),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var A=t.getItemVisual(a,"liftZ"),C=this._z2;A!=null?C==null&&(this._z2=s.z2,s.z2+=A):C!=null&&(s.z2=C,this._z2=null);var M=o&&o.useNameLabel;ve(s,d,{labelFetcher:l,labelDataIndex:a,defaultText:I,inheritColor:w,defaultOpacity:x.opacity});function I(R){return M?t.getName(R):no(t,R)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;L.scaleX=this._sizeX*P,L.scaleY=this._sizeY*P,this.setSymbolScale(1),Ht(this,v,c,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,a,n){var i=this.childAt(0),o=nt(this).dataIndex,s=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&Za(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Za(i,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,a){return wo(t.getItemVisual(a,"symbolSize"))},e}(at);function QB(r,e){this.parent.drift(r,e)}function Zv(r,e,t,a){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(a.isIgnore&&a.isIgnore(t))&&!(a.clipShape&&!a.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function a1(r){return r!=null&&!et(r)&&(r={isIgnore:r}),r||{}}function n1(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:ne(e),cursorStyle:e.get("cursor")}}var ml=function(){function r(e){this.group=new at,this._SymbolCtor=e||yl}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=a1(t);var a=this.group,n=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=n1(e),u={disableAnimation:s},f=t.getSymbolPoint||function(h){return e.getItemLayout(h)};i||a.removeAll(),e.diff(i).add(function(h){var v=f(h);if(Zv(e,v,h,t)){var c=new o(e,h,l,u);c.setPosition(v),e.setItemGraphicEl(h,c),a.add(c)}}).update(function(h,v){var c=i.getItemGraphicEl(v),p=f(h);if(!Zv(e,p,h,t)){a.remove(c);return}var d=e.getItemVisual(h,"symbol")||"circle",g=c&&c.getSymbolType&&c.getSymbolType();if(!c||g&&g!==d)a.remove(c),c=new o(e,h,l,u),c.setPosition(p);else{c.updateData(e,h,l,u);var y={x:p[0],y:p[1]};s?c.attr(y):Tt(c,y,n)}a.add(c),e.setItemGraphicEl(h,c)}).remove(function(h){var v=i.getItemGraphicEl(h);v&&v.fadeOut(function(){a.remove(v)},n)}).execute(),this._getSymbolPoint=f,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(a,n){var i=e._getSymbolPoint(n);a.setPosition(i),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=n1(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,a){this._progressiveEls=[],a=a1(a);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0?t=a[0]:a[1]<0&&(t=a[1]),t}function fD(r,e,t,a){var n=NaN;r.stacked&&(n=t.get(t.getCalculationInfo("stackedOverDimension"),a)),isNaN(n)&&(n=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=t.get(r.baseDim,a),o[1-i]=n,e.dataToPoint(o)}function tV(r,e){var t=[];return e.diff(r).add(function(a){t.push({cmd:"+",idx:a})}).update(function(a,n){t.push({cmd:"=",idx:n,idx1:a})}).remove(function(a){t.push({cmd:"-",idx:a})}).execute(),t}function eV(r,e,t,a,n,i,o,s){for(var l=tV(r,e),u=[],f=[],h=[],v=[],c=[],p=[],d=[],g=uD(n,e,o),y=r.getLayout("points")||[],m=e.getLayout("points")||[],_=0;_=n||d<0)break;if(Jn(y,m)){if(l){d+=i;continue}break}if(d===t)r[i>0?"moveTo":"lineTo"](y,m),h=y,v=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){d+=i;continue}if(o>0){for(var b=d+i,x=e[b*2],w=e[b*2+1];x===y&&w===m&&g=a||Jn(x,w))c=y,p=m;else{C=x-u,M=w-f;var P=y-u,R=x-y,E=m-f,N=w-m,O=void 0,B=void 0;if(s==="x"){O=Math.abs(P),B=Math.abs(R);var F=C>0?1:-1;c=y-F*O*o,p=m,I=y+F*B*o,L=m}else if(s==="y"){O=Math.abs(E),B=Math.abs(N);var H=M>0?1:-1;c=y,p=m-H*O*o,I=y,L=m+H*B*o}else O=Math.sqrt(P*P+E*E),B=Math.sqrt(R*R+N*N),A=B/(B+O),c=y-C*o*(1-A),p=m-M*o*(1-A),I=y+C*o*A,L=m+M*o*A,I=Ta(I,Aa(x,y)),L=Ta(L,Aa(w,m)),I=Aa(I,Ta(x,y)),L=Aa(L,Ta(w,m)),C=I-y,M=L-m,c=y-C*O/B,p=m-M*O/B,c=Ta(c,Aa(u,y)),p=Ta(p,Aa(f,m)),c=Aa(c,Ta(u,y)),p=Aa(p,Ta(f,m)),C=y-c,M=m-p,I=y+C*B/O,L=m+M*B/O}r.bezierCurveTo(h,v,c,p,y,m),h=I,v=L}else r.lineTo(y,m)}u=y,f=m,d+=i}return g}var hD=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),rV=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polyline",a}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new hD},e.prototype.buildPath=function(t,a){var n=a.points,i=0,o=n.length/2;if(a.connectNulls){for(;o>0&&Jn(n[o*2-2],n[o*2-1]);o--);for(;i=0){var S=u?(p-l)*_+l:(c-s)*_+s;return u?[t,S]:[S,t]}s=c,l=p;break;case o.C:c=i[h++],p=i[h++],d=i[h++],g=i[h++],y=i[h++],m=i[h++];var b=u?Qu(s,c,d,y,t,f):Qu(l,p,g,m,t,f);if(b>0)for(var x=0;x=0){var S=u?te(l,p,g,m,w):te(s,c,d,y,w);return u?[t,S]:[S,t]}}s=y,l=m;break}}},e}(gt),aV=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(hD),vD=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polygon",a}return e.prototype.getDefaultShape=function(){return new aV},e.prototype.buildPath=function(t,a){var n=a.points,i=a.stackedOnPoints,o=0,s=n.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&Jn(n[s*2-2],n[s*2-1]);s--);for(;oe){i?t.push(o(i,l,e)):n&&t.push(o(n,l,0),o(n,l,e));break}else n&&(t.push(o(n,l,0)),n=null),t.push(l),i=l}return t}function oV(r,e,t){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&e.type==="cartesian2d"){for(var n,i,o=a.length-1;o>=0;o--){var s=r.getDimensionInfo(a[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){i=a[o];break}}if(i){var l=e.getAxis(n),u=G(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=i.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var v=iV(u,n==="x"?t.getWidth():t.getHeight()),c=v.length;if(!c&&f)return u[0].coord<0?h[1]?h[1]:u[f-1].color:h[0]?h[0]:u[0].color;var p=10,d=v[0].coord-p,g=v[c-1].coord+p,y=g-d;if(y<.001)return"transparent";D(v,function(_){_.offset=(_.coord-d)/y}),v.push({offset:c?v[c-1].offset:.5,color:h[1]||"transparent"}),v.unshift({offset:c?v[0].offset:.5,color:h[0]||"transparent"});var m=new fl(0,0,0,0,v,!0);return m[n]=d,m[n+"2"]=g,m}}}function sV(r,e,t){var a=r.get("showAllSymbol"),n=a==="auto";if(!(a&&!n)){var i=t.getAxesByScale("ordinal")[0];if(i&&!(n&&lV(i,e))){var o=e.mapDimension(i.dim),s={};return D(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function lV(r,e){var t=r.getExtent(),a=Math.abs(t[1]-t[0])/r.scale.count();isNaN(a)&&(a=0);for(var n=e.count(),i=Math.max(1,Math.round(n/5)),o=0;oa)return!1;return!0}function uV(r,e){return isNaN(r)||isNaN(e)}function fV(r){for(var e=r.length/2;e>0&&uV(r[e*2-2],r[e*2-1]);e--);return e-1}function u1(r,e){return[r[e*2],r[e*2+1]]}function hV(r,e,t){for(var a=r.length/2,n=t==="x"?0:1,i,o,s=0,l=-1,u=0;u=e||i>=e&&o<=e){l=u;break}s=u,i=o}return{range:[s,l],t:(e-i)/(o-i)}}function dD(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var B=p.getState("emphasis").style;B.lineWidth=+p.style.lineWidth+1}nt(p).seriesIndex=t.seriesIndex,Ht(p,E,N,O);var F=l1(t.get("smooth")),H=t.get("smoothMonotone");if(p.setShape({smooth:F,smoothMonotone:H,connectNulls:w}),d){var U=s.getCalculationInfo("stackedOnSeries"),K=0;d.useStyle(j(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),U&&(K=l1(U.get("smooth"))),d.setShape({smooth:F,stackedOnSmooth:K,smoothMonotone:H,connectNulls:w}),he(d,t,"areaStyle"),nt(d).seriesIndex=t.seriesIndex,Ht(d,E,N,O)}var Q=this._changePolyState;s.eachItemGraphicEl(function(it){it&&(it.onHoverStateChange=Q)}),this._polyline.onHoverStateChange=Q,this._data=s,this._coordSys=i,this._stackedOnPoints=b,this._points=f,this._step=C,this._valueOrigin=_,t.get("triggerLineEvent")&&(this.packEventData(t,p),d&&this.packEventData(t,d))},e.prototype.packEventData=function(t,a){nt(a).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,a,n,i){var o=t.getData(),s=ti(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],h=l[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var v=t.get("zlevel")||0,c=t.get("z")||0;u=new yl(o,s),u.x=f,u.y=h,u.setZ(v,c);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=v,p.z=c,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Rt.prototype.highlight.call(this,t,a,n,i)},e.prototype.downplay=function(t,a,n,i){var o=t.getData(),s=ti(o,i);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Rt.prototype.downplay.call(this,t,a,n,i)},e.prototype._changePolyState=function(t){var a=this._polygon;of(this._polyline,t),a&&of(a,t)},e.prototype._newPolyline=function(t){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new rV({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},e.prototype._newPolygon=function(t,a){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new vD({shape:{points:t,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,a,n){var i,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):a.type==="polar"&&(i=s.dim==="angle",o=!0);var u=t.hostModel,f=u.get("animationDuration");J(f)&&(f=f(null));var h=u.get("animationDelay")||0,v=J(h)?h(null):h;t.eachItemGraphicEl(function(c,p){var d=c;if(d){var g=[c.x,c.y],y=void 0,m=void 0,_=void 0;if(n)if(o){var S=n,b=a.pointToCoord(g);i?(y=S.startAngle,m=S.endAngle,_=-b[1]/180*Math.PI):(y=S.r0,m=S.r,_=b[0])}else{var x=n;i?(y=x.x,m=x.x+x.width,_=c.x):(y=x.y+x.height,m=x.y,_=c.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var T=J(h)?h(p):f*w+v,A=d.getSymbolPath(),C=A.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),C&&C.animateFrom({style:{opacity:0}},{duration:300,delay:T}),A.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,a,n){var i=t.getModel("endLabel");if(dD(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new bt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=fV(l);f>=0&&(ve(s,ne(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:f,defaultText:function(h,v,c){return c!=null?lD(o,c):no(o,h)},enableTextSetter:!0},vV(i,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,a,n,i,o,s,l){var u=this._endLabel,f=this._polyline;if(u){t<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var h=n.getLayout("points"),v=n.hostModel,c=v.get("connectNulls"),p=s.get("precision"),d=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=a.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,b=(y?d:0)*(m?-1:1),x=(y?0:-d)*(m?-1:1),w=y?"x":"y",T=hV(h,S,w),A=T.range,C=A[1]-A[0],M=void 0;if(C>=1){if(C>1&&!c){var I=u1(h,A[0]);u.attr({x:I[0]+b,y:I[1]+x}),o&&(M=v.getRawValue(A[0]))}else{var I=f.getPointOn(S,w);I&&u.attr({x:I[0]+b,y:I[1]+x});var L=v.getRawValue(A[0]),P=v.getRawValue(A[1]);o&&(M=jw(n,p,L,P,T.t))}i.lastFrameIndex=A[0]}else{var R=t===1||i.lastFrameIndex>0?A[0]:0,I=u1(h,R);o&&(M=v.getRawValue(R)),u.attr({x:I[0]+b,y:I[1]+x})}if(o){var E=go(u);typeof E.setLabelText=="function"&&E.setLabelText(M)}}},e.prototype._doUpdateAnimation=function(t,a,n,i,o,s,l){var u=this._polyline,f=this._polygon,h=t.hostModel,v=eV(this._data,t,this._stackedOnPoints,a,this._coordSys,n,this._valueOrigin),c=v.current,p=v.stackedOnCurrent,d=v.next,g=v.stackedOnNext;if(o&&(p=Ca(v.stackedOnCurrent,v.current,n,o,l),c=Ca(v.current,null,n,o,l),g=Ca(v.stackedOnNext,v.next,n,o,l),d=Ca(v.next,null,n,o,l)),s1(c,d)>3e3||f&&s1(p,g)>3e3){u.stopAnimation(),u.setShape({points:d}),f&&(f.stopAnimation(),f.setShape({points:d,stackedOnPoints:g}));return}u.shape.__points=v.current,u.shape.points=c;var y={shape:{points:d}};v.current!==c&&(y.shape.__points=v.next),u.stopAnimation(),Tt(u,y,h),f&&(f.setShape({points:c,stackedOnPoints:p}),f.stopAnimation(),Tt(f,{shape:{stackedOnPoints:g}},h),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=v.status,S=0;S<_.length;S++){var b=_[S].cmd;if(b==="="){var x=t.getItemGraphicEl(_[S].idx1);x&&m.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var w=u.shape.__points,T=0;Te&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),h=a.getDevicePixelRatio(),v=Math.abs(f[1]-f[0])*(h||1),c=Math.round(s/v);if(isFinite(c)&&c>1){i==="lttb"?e.setData(n.lttbDownSample(n.mapDimension(u.dim),1/c)):i==="minmax"&&e.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/c));var p=void 0;Y(i)?p=pV[i]:J(i)&&(p=i),p&&e.setData(n.downSample(n.mapDimension(u.dim),1/c,p,dV))}}}}}function gV(r){r.registerChartView(cV),r.registerSeriesModel(JB),r.registerLayout(Sl("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),a=e.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,gD("line"))}var $s=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return ga(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,a,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(t),s=i.dataToPoint(o);if(n)D(i.getAxes(),function(v,c){if(v.type==="category"&&a!=null){var p=v.getTicksCoords(),d=v.getTickModel().get("alignWithLabel"),g=o[c],y=a[c]==="x1"||a[c]==="y1";if(y&&!d&&(g+=1),p.length<2)return;if(p.length===2){s[c]=v.toGlobalCoord(v.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,S=1,b=0;bg){_=(x+m)/2;break}b===1&&(S=w-p[0].tickValue)}_==null&&(m?m&&(_=p[p.length-1].coord):_=p[0].coord),s[c]=v.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),h=i.getBaseAxis().isHorizontal()?0:1;s[h]+=u+f/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Vt);Vt.registerClass($s);var yV=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return ga(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>t&&(t=a),t},e.prototype.brushSelector=function(t,a,n){return n.rect(a.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=ja($s.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}($s),mV=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),Af=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="sausage",a}return e.prototype.getDefaultShape=function(){return new mV},e.prototype.buildPath=function(t,a){var n=a.cx,i=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,f=a.startAngle,h=a.endAngle,v=a.clockwise,c=Math.PI*2,p=v?h-fMath.PI/2&&fs)return!0;s=h}return!1},e.prototype._isOrderDifferentInView=function(t,a){for(var n=a.scale,i=n.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,a,n,i){if(this._isOrderChangedWithinSameData(t,a,n)){var o=this._dataSort(t,n,a);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,a,n){var i=a.baseAxis,o=this._dataSort(t,i,function(s){return t.get(t.mapDimension(a.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(t,a){this._clear(this._model),this._removeOnRenderedListener(a)},e.prototype.dispose=function(t,a){this._removeOnRenderedListener(a)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var a=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){Vs(i,t,nt(i).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Rt),f1={cartesian2d:function(r,e){var t=e.width<0?-1:1,a=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height);var n=r.x+r.width,i=r.y+r.height,o=qv(e.x,r.x),s=Kv(e.x+e.width,n),l=qv(e.y,r.y),u=Kv(e.y+e.height,i),f=sn?s:o,e.y=h&&l>i?u:l,e.width=f?0:s-o,e.height=h?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height),f||h},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}var n=Kv(e.r,r.r),i=qv(e.r0,r.r0);e.r=n,e.r0=i;var o=n-i<0;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}return o}},h1={cartesian2d:function(r,e,t,a,n,i,o,s,l){var u=new St({shape:V({},a),z2:1});if(u.__dataIndex=t,u.name="item",i){var f=u.shape,h=n?"height":"width";f[h]=0}return u},polar:function(r,e,t,a,n,i,o,s,l){var u=!n&&l?Af:Me,f=new u({shape:a,z2:1});f.name="item";var h=yD(n);if(f.calculateTextPosition=_V(h,{isRoundCap:u===Af}),i){var v=f.shape,c=n?"r":"endAngle",p={};v[c]=n?a.r0:a.startAngle,p[c]=a[c],(s?Tt:zt)(f,{shape:p},i)}return f}};function wV(r,e){var t=r.get("realtimeSort",!0),a=e.getBaseAxis();if(t&&a.type==="category"&&e.type==="cartesian2d")return{baseAxis:a,otherAxis:e.getOtherAxis(a)}}function v1(r,e,t,a,n,i,o,s){var l,u;i?(u={x:a.x,width:a.width},l={y:a.y,height:a.height}):(u={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?Tt:zt)(t,{shape:l},e,n,null);var f=e?r.baseAxis.model:null;(o?Tt:zt)(t,{shape:u},f,n)}function c1(r,e){for(var t=0;t0?1:-1,o=a.height>0?1:-1;return{x:a.x+i*n/2,y:a.y+o*n/2,width:a.width-i*n,height:a.height-o*n}},polar:function(r,e,t){var a=r.getItemLayout(e);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function CV(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function yD(r){return function(e){var t=e?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+t;default:return a}}}(r)}function d1(r,e,t,a,n,i,o,s){var l=e.getItemVisual(t,"style");if(s){if(!i.get("roundCap")){var f=r.shape,h=Wn(a.getModel("itemStyle"),f,!0);V(f,h),r.setShape(f)}}else{var u=a.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var v=a.getShallow("cursor");v&&r.attr("cursor",v);var c=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",p=ne(a);ve(r,p,{labelFetcher:i,labelDataIndex:t,defaultText:no(i.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:c});var d=r.getTextContent();if(s&&d){var g=a.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,SV(r,g==="outside"?c:g,yD(o),a.get(["label","rotate"]))}NT(d,p,i.getRawValue(t),function(m){return lD(e,m)});var y=a.getModel(["emphasis"]);Ht(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),he(r,a),CV(n)&&(r.style.fill="none",r.style.stroke="none",D(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function DV(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(a,n,i)}var MV=function(){function r(){}return r}(),g1=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeBar",a}return e.prototype.getDefaultShape=function(){return new MV},e.prototype.buildPath=function(t,a){for(var n=a.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?t:null},30,!1);function IV(r,e,t){for(var a=r.baseDimIdx,n=1-a,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,h=i.length/3;f=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[f]}return-1}function mD(r,e,t){if(vi(t,"cartesian2d")){var a=e,n=t.getArea();return{x:r?a.x:n.x,y:r?n.y:a.y,width:r?a.width:n.width,height:r?n.height:a.height}}else{var n=t.getArea(),i=e;return{cx:n.cx,cy:n.cy,r0:r?n.r0:i.r0,r:r?n.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function LV(r,e,t){var a=r.type==="polar"?Me:St;return new a({shape:mD(e,t,r),silent:!0,z2:0})}function PV(r){r.registerChartView(bV),r.registerSeriesModel(yV),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,lt(wC,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,TC("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,gD("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var a=e.componentType||"series";t.eachComponent({mainType:a,query:e},function(n){e.sortInfo&&n.axis.setCategorySortInfo(e.sortInfo)})})}var _1=Math.PI*2,fu=Math.PI/180;function _D(r,e){return Qt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function SD(r,e){var t=_D(r,e),a=r.get("center"),n=r.get("radius");z(n)||(n=[0,n]);var i=W(t.width,e.getWidth()),o=W(t.height,e.getHeight()),s=Math.min(i,o),l=W(n[0],s/2),u=W(n[1],s/2),f,h,v=r.coordinateSystem;if(v){var c=v.dataToPoint(a);f=c[0]||0,h=c[1]||0}else z(a)||(a=[a,a]),f=W(a[0],i)+t.x,h=W(a[1],o)+t.y;return{cx:f,cy:h,r0:l,r:u}}function RV(r,e,t){e.eachSeriesByType(r,function(a){var n=a.getData(),i=n.mapDimension("value"),o=_D(a,t),s=SD(a,t),l=s.cx,u=s.cy,f=s.r,h=s.r0,v=-a.get("startAngle")*fu,c=a.get("endAngle"),p=a.get("padAngle")*fu;c=c==="auto"?v-_1:-c*fu;var d=a.get("minAngle")*fu,g=d+p,y=0;n.each(i,function(N){!isNaN(N)&&y++});var m=n.getSum(i),_=Math.PI/(m||y)*2,S=a.get("clockwise"),b=a.get("roseType"),x=a.get("stillShowZeroSum"),w=n.getDataExtent(i);w[0]=0;var T=S?1:-1,A=[v,c],C=T*p/2;lg(A,!S),v=A[0],c=A[1];var M=xD(a);M.startAngle=v,M.endAngle=c,M.clockwise=S;var I=Math.abs(c-v),L=I,P=0,R=v;if(n.setLayout({viewRect:o,r:f}),n.each(i,function(N,O){var B;if(isNaN(N)){n.setItemLayout(O,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:l,cy:u,r0:h,r:b?NaN:f});return}b!=="area"?B=m===0&&x?_:N*_:B=I/y,BB?(H=R+T*B/2,U=H):(H=R+C,U=F-C),n.setItemLayout(O,{angle:B,startAngle:H,endAngle:U,clockwise:S,cx:l,cy:u,r0:h,r:b?Dt(N,w,[h,f]):f}),R=F}),L<_1&&y)if(L<=.001){var E=I/y;n.each(i,function(N,O){if(!isNaN(N)){var B=n.getItemLayout(O);B.angle=E;var F=0,H=0;Et?y:g,b=Math.abs(_.label.y-t);if(b>=S.maxY){var x=_.label.x-e-_.len2*n,w=a+_.len,T=Math.abs(x)r.unconstrainedWidth?null:c:null;a.setStyle("width",p)}var d=a.getBoundingRect();i.width=d.width;var g=(a.style.margin||0)+2.1;i.height=d.height+g,i.y-=(i.height-h)/2}}}function Jv(r){return r.position==="center"}function OV(r){var e=r.getData(),t=[],a,n,i=!1,o=(r.get("minShowLabelAngle")||0)*EV,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,f=s.x,h=s.y,v=s.height;function c(x){x.ignore=!0}function p(x){if(!x.ignore)return!0;for(var w in x.states)if(x.states[w].ignore===!1)return!0;return!1}e.each(function(x){var w=e.getItemGraphicEl(x),T=w.shape,A=w.getTextContent(),C=w.getTextGuideLine(),M=e.getItemModel(x),I=M.getModel("label"),L=I.get("position")||M.get(["emphasis","label","position"]),P=I.get("distanceToLabelLine"),R=I.get("alignTo"),E=W(I.get("edgeDistance"),u),N=I.get("bleedMargin"),O=M.getModel("labelLine"),B=O.get("length");B=W(B,u);var F=O.get("length2");if(F=W(F,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":U>0?"left":"right"}var Et=Math.PI,Gt=0,jt=I.get("rotate");if(wt(jt))Gt=jt*(Et/180);else if(L==="center")Gt=0;else if(jt==="radial"||jt===!0){var Ve=U<0?-H+Et:-H;Gt=Ve}else if(jt==="tangential"&&L!=="outside"&&L!=="outer"){var Pe=Math.atan2(U,K);Pe<0&&(Pe=Et*2+Pe);var tn=K>0;tn&&(Pe=Et+Pe),Gt=Pe-Et}if(i=!!Gt,A.x=Q,A.y=it,A.rotation=Gt,A.setStyle({verticalAlign:"middle"}),vt){A.setStyle({align:Wt});var Ph=A.states.select;Ph&&(Ph.x+=A.x,Ph.y+=A.y)}else{var ya=A.getBoundingRect().clone();ya.applyTransform(A.getComputedTransform());var Qy=(A.style.margin||0)+2.1;ya.y-=Qy/2,ya.height+=Qy,t.push({label:A,labelLine:C,position:L,len:B,len2:F,minTurnAngle:O.get("minTurnAngle"),maxSurfaceAngle:O.get("maxSurfaceAngle"),surfaceNormal:new ft(U,K),linePoints:Lt,textAlign:Wt,labelDistance:P,labelAlignTo:R,edgeDistance:E,bleedMargin:N,rect:ya,unconstrainedWidth:ya.width,labelStyleWidth:A.style.width})}w.setTextConfig({inside:vt})}}),!i&&r.get("avoidLabelOverlap")&&kV(t,a,n,l,u,v,f,h);for(var d=0;d0){for(var f=o.getItemLayout(0),h=1;isNaN(f&&f.startAngle)&&h=i.r0}},e.type="pie",e}(Rt);function Ao(r,e,t){e=z(e)&&{coordDimensions:e}||V({encodeDefine:r.getEncode()},e);var a=r.getSource(),n=dl(a,e).dimensions,i=new Te(n,r);return i.initData(a,t),i}var bl=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var a=this._getDataWithEncodedVisual();return a.getItemVisual(e,t)},r}(),VV=xt(),zV=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new bl(X(this.getData,this),X(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Ao(this,{coordDimensions:["value"],encodeDefaulter:lt(Ag,this)})},e.prototype.getDataParams=function(t){var a=this.getData(),n=VV(a),i=n.seats;if(!i){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),i=n.seats=LL(o,a.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=i[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){jn(t,"labelLine",["show"]);var a=t.labelLine,n=t.emphasis.labelLine;a.show=a.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Vt);function GV(r){return{seriesType:r,reset:function(e,t){var a=e.getData();a.filterSelf(function(n){var i=a.mapDimension("value"),o=a.get(i,n);return!(wt(o)&&!isNaN(o)&&o<0)})}}}function FV(r){r.registerChartView(BV),r.registerSeriesModel(zV),HA("pie",r.registerAction),r.registerLayout(lt(RV,"pie")),r.registerProcessor(xl("pie")),r.registerProcessor(GV("pie"))}var HV=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,a){return ga(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,a,n){return n.point(a.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Vt),wD=4,WV=function(){function r(){}return r}(),UV=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.getDefaultShape=function(){return new WV},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,a){var n=a.points,i=a.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&i[0]=0;u--){var f=u*2,h=i[f]-s/2,v=i[f+1]-l/2;if(t>=h&&a>=v&&t<=h+s&&a<=v+l)return u}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,n=a.points,i=a.size,o=i[0],s=i[1],l=1/0,u=1/0,f=-1/0,h=-1/0,v=0;v=0&&(u.dataIndex=h+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),XV=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._symbolDraw.incrementalUpdate(t,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=t.end===a.getData().count()},e.prototype.updateTransform=function(t,a,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Sl("").reset(t,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var a=t.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,a){var n=this._symbolDraw,i=a.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new YV:new ml,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Rt),ZV=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(mt),id=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",$t).models[0]},e.type="cartesian2dAxis",e}(mt);Kt(id,gl);var TD={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},$V=ut({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},TD),ty=ut({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},TD),qV=ut({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},ty),KV=j({logBase:10},ty);const AD={category:$V,value:ty,time:qV,log:KV};var JV={value:1,category:1,time:1,log:1};function io(r,e,t,a){D(JV,function(n,i){var o=ut(ut({},AD[i],!0),a,!0),s=function(l){k(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=e+"Axis."+i,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var v=Gs(this),c=v?_o(f):{},p=h.getTheme();ut(f,p.get(i+"Axis")),ut(f,this.getDefaultOption()),f.type=x1(f),v&&$a(f,c,v)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=Qp.createByAxisModel(this))},u.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+i,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",x1)}function x1(r){return r.type||(r.data?"category":"value")}var QV=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return G(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Ct(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}(),od=["x","y"];function b1(r){return r.type==="interval"||r.type==="time"}var jV=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=od,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!b1(t)||!b1(a))){var n=t.getExtent(),i=a.getExtent(),o=this.dataToPoint([n[0],i[0]]),s=this.dataToPoint([n[1],i[1]]),l=n[1]-n[0],u=i[1]-i[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,h=(s[1]-o[1])/u,v=o[0]-n[0]*f,c=o[1]-i[0]*h,p=this._transform=[f,0,0,h,v,c];this._invTransform=ho([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var a=this.getAxis("x"),n=this.getAxis("y");return a.contain(a.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,a){var n=this.dataToPoint(t),i=this.dataToPoint(a),o=this.getArea(),s=new ht(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,a,n){n=n||[];var i=t[0],o=t[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return fe(n,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(i,a)),n[1]=l.toGlobalCoord(l.dataToCoord(o,a)),n},e.prototype.clampData=function(t,a){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),s=i.getExtent(),l=n.parse(t[0]),u=i.parse(t[1]);return a=a||[],a[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),a[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),a},e.prototype.pointToData=function(t,a){var n=[];if(this._invTransform)return fe(n,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),a),n[1]=o.coordToData(o.toLocalCoord(t[1]),a),n},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var a=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(a[0],a[1])-t,o=Math.min(n[0],n[1])-t,s=Math.max(a[0],a[1])-i+t,l=Math.max(n[0],n[1])-o+t;return new ht(i,o,s,l)},e}(QV),tz=function(r){k(e,r);function e(t,a,n,i,o){var s=r.call(this,t,a,n)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),t&&a[0]>a[1]&&a.reverse(),a},e.prototype.pointToData=function(t,a){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),a)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(wr);function sd(r,e,t){t=t||{};var a=r.coordinateSystem,n=e.axis,i={},o=n.getAxesOnZeroOf()[0],s=n.position,l=o?"onZero":s,u=n.dim,f=a.getRect(),h=[f.x,f.x+f.width,f.y,f.y+f.height],v={left:0,right:1,top:0,bottom:1,onZero:2},c=e.get("offset")||0,p=u==="x"?[h[2]-c,h[3]+c]:[h[0]-c,h[1]+c];if(o){var d=o.toGlobalCoord(o.dataToCoord(0));p[v.onZero]=Math.max(Math.min(d,p[1]),p[0])}i.position=[u==="y"?p[v[l]]:h[0],u==="x"?p[v[l]]:h[3]],i.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=g[s],i.labelOffset=o?p[v[s]]-p[v.onZero]:0,e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),se(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var y=e.get(["axisLabel","rotate"]);return i.labelRotate=l==="top"?-y:y,i.z2=1,i}function w1(r){return r.get("coordinateSystem")==="cartesian2d"}function T1(r){var e={xAxisModel:null,yAxisModel:null};return D(e,function(t,a){var n=a.replace(/Model$/,""),i=r.getReferringComponents(n,$t).models[0];e[a]=i}),e}var Qv=Math.log;function CD(r,e,t){var a=ha.prototype,n=a.getTicks.call(t),i=a.getTicks.call(t,!0),o=n.length-1,s=a.getInterval.call(t),l=IC(r,e),u=l.extent,f=l.fixMin,h=l.fixMax;if(r.type==="log"){var v=Qv(r.base);u=[Qv(u[0])/v,Qv(u[1])/v]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var c=a.getExtent.call(r);f&&(u[0]=c[0]),h&&(u[1]=c[1]);var p=a.getInterval.call(r),d=u[0],g=u[1];if(f&&h)p=(g-d)/o;else if(f)for(g=u[0]+p*o;gu[0]&&isFinite(d)&&isFinite(u[0]);)p=Bv(p),d=u[1]-p*o;else{var y=r.getTicks().length-1;y>o&&(p=Bv(p));var m=p*o;g=Math.ceil(u[1]/p)*p,d=Ut(g-m),d<0&&u[0]>=0?(d=0,g=Ut(m)):g>0&&u[1]<=0&&(g=0,d=-Ut(m))}var _=(n[0].value-i[0].value)/s,S=(n[o].value-i[o].value)/s;a.setExtent.call(r,d+p*_,g+p*S),a.setInterval.call(r,p),(_||S)&&a.setNiceExtent.call(r,d+p,g-p)}var ez=function(){function r(e,t,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=od,this._initCartesian(e,t,a),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var a=this._axesMap;this._updateScale(e,this.model);function n(o){var s,l=_t(o),u=l.length;if(u){for(var f=[],h=u-1;h>=0;h--){var v=+l[h],c=o[v],p=c.model,d=c.scale;jp(d)&&p.get("alignTicks")&&p.get("interval")==null?f.push(c):(ao(d,p),jp(d)&&(s=c))}f.length&&(s||(s=f.pop(),ao(s.scale,s.model)),D(f,function(g){CD(g.scale,g.model,s.scale)}))}}n(a.x),n(a.y);var i={};D(a.x,function(o){A1(a,"y",o,i)}),D(a.y,function(o){A1(a,"x",o,i)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,a){var n=e.getBoxLayoutParams(),i=!a&&e.get("containLabel"),o=Qt(n,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),i&&(D(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=ON(u);if(f){var h=u.isHorizontal()?"height":"width",v=u.model.get(["axisLabel","margin"]);o[h]-=f[h]+v,u.position==="top"?o.y+=f.height+v:u.position==="left"&&(o.x+=f.width+v)}}}),l()),D(this._coordsList,function(u){u.calcAffineTransform()});function l(){D(s,function(u){var f=u.isHorizontal(),h=f?[0,o.width]:[0,o.height],v=u.inverse?1:0;u.setExtent(h[v],h[1-v]),rz(u,f?o.x:o.y)})}},r.prototype.getAxis=function(e,t){var a=this._axesMap[e];if(a!=null)return a[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var a="x"+e+"y"+t;return this._coordsMap[a]}et(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,i=this._coordsList;n0?"top":"bottom",i="center"):ks(n-Ba)?(o=a>0?"bottom":"top",i="center"):(o="middle",n>0&&n0?"right":"left":i=a>0?"left":"right"),{rotation:n,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),D1={axisLine:function(r,e,t,a){var n=e.get(["axisLine","show"]);if(n==="auto"&&r.handleAutoShown&&(n=r.handleAutoShown("axisLine")),!!n){var i=e.axis.getExtent(),o=a.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];o&&(fe(s,s,o),fe(l,l,o));var f=V({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new ee({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});to(h.shape,h.style.lineWidth),h.anid="line",t.add(h);var v=e.get(["axisLine","symbol"]);if(v!=null){var c=e.get(["axisLine","symbolSize"]);Y(v)&&(v=[v,v]),(Y(c)||wt(c))&&(c=[c,c]);var p=fi(e.get(["axisLine","symbolOffset"])||0,c),d=c[0],g=c[1];D([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(y,m){if(v[m]!=="none"&&v[m]!=null){var _=qt(v[m],-d/2,-g/2,d,g,f.stroke,!0),S=y.r+y.offset,b=u?l:s;_.attr({rotation:y.rotate,x:b[0]+S*Math.cos(r.rotation),y:b[1]-S*Math.sin(r.rotation),silent:!0,z2:11}),t.add(_)}})}}},axisTickLabel:function(r,e,t,a){var n=iz(t,a,e,r),i=sz(t,a,e,r);if(nz(e,i,n),oz(t,a,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=WC(G(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));XC(o)}},axisName:function(r,e,t,a){var n=se(r.axisName,e.get("name"));if(n){var i=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),f=u[0]>u[1]?-1:1,h=[i==="start"?u[0]-f*l:i==="end"?u[1]+f*l:(u[0]+u[1])/2,I1(i)?r.labelOffset+o*l:0],v,c=e.get("nameRotate");c!=null&&(c=c*Ba/180);var p;I1(i)?v=Ae.innerTextLayout(r.rotation,c??r.rotation,o):(v=az(r.rotation,i,c||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(v.rotation)),!isFinite(p)&&(p=null)));var d=s.getFont(),g=e.get("nameTruncate",!0)||{},y=g.ellipsis,m=se(r.nameTruncateMaxWidth,g.maxWidth,p),_=new bt({x:h[0],y:h[1],rotation:v.rotation,silent:Ae.isLabelSilent(e),style:Bt(s,{text:n,font:d,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||v.textAlign,verticalAlign:s.get("verticalAlign")||v.textVerticalAlign}),z2:1});if(li({el:_,componentModel:e,itemName:n}),_.__fullText=n,_.anid="name",e.get("triggerEvent")){var S=Ae.makeAxisEventDataBase(e);S.targetType="axisName",S.name=n,nt(_).eventData=S}a.add(_),_.updateTransform(),t.add(_),_.decomposeTransform()}}};function az(r,e,t,a){var n=Ww(t-r),i,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return ks(n-Ba/2)?(o=l?"bottom":"top",i="center"):ks(n-Ba*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",nBa/2?i=l?"left":"right":i=l?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:o}}function nz(r,e,t){if(!LC(r.axis)){var a=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var i=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],f=t[1],h=t[t.length-1],v=t[t.length-2];a===!1?(Xe(i),Xe(u)):M1(i,o)&&(a?(Xe(o),Xe(f)):(Xe(i),Xe(u))),n===!1?(Xe(s),Xe(h)):M1(l,s)&&(n?(Xe(l),Xe(v)):(Xe(s),Xe(h)))}}function Xe(r){r&&(r.ignore=!0)}function M1(r,e){var t=r&&r.getBoundingRect().clone(),a=e&&e.getBoundingRect().clone();if(!(!t||!a)){var n=Zf([]);return si(n,n,-r.rotation),t.applyTransform(ra([],n,r.getLocalTransform())),a.applyTransform(ra([],n,e.getLocalTransform())),t.intersect(a)}}function I1(r){return r==="middle"||r==="center"}function DD(r,e,t,a,n){for(var i=[],o=[],s=[],l=0;l=0||r===e}function cz(r){var e=ey(r);if(e){var t=e.axisPointerModel,a=e.axis.scale,n=t.option,i=t.get("status"),o=t.get("value");o!=null&&(o=a.parse(o));var s=ld(t);i==null&&(n.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=j({color:p.color},l));var g=ut(rt(p),{boundaryGap:t,splitNumber:a,scale:n,axisLine:i,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:v},!1);if(Y(f)){var y=g.name;g.name=f.replace("{value}",y??"")}else J(f)&&(g.name=f(g.name,g));var m=new Mt(g,null,this.ecModel);return Kt(m,gl.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ut({lineStyle:{color:"#bbb"}},Yo.axisLine),axisLabel:hu(Yo.axisLabel,!1),axisTick:hu(Yo.axisTick,!1),splitLine:hu(Yo.splitLine,!0),splitArea:hu(Yo.splitArea,!0),indicator:[]},e}(mt),Cz=["axisLine","axisTickLabel","axisName"],Dz=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=this.group;i.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var a=t.coordinateSystem,n=a.getIndicatorAxes(),i=G(n,function(o){var s=o.model.get("showName")?o.name:"",l=new Ae(o.model,{axisName:s,position:[a.cx,a.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});D(i,function(o){D(Cz,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var a=t.coordinateSystem,n=a.getIndicatorAxes();if(!n.length)return;var i=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),h=s.get("show"),v=l.get("color"),c=u.get("color"),p=z(v)?v:[v],d=z(c)?c:[c],g=[],y=[];function m(R,E,N){var O=N%E.length;return R[O]=R[O]||[],O}if(i==="circle")for(var _=n[0].getTicksCoords(),S=a.cx,b=a.cy,x=0;x<_.length;x++){if(f){var w=m(g,p,x);g[w].push(new da({shape:{cx:S,cy:b,r:_[x].coord}}))}if(h&&x<_.length-1){var w=m(y,d,x);y[w].push(new ll({shape:{cx:S,cy:b,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var T,A=G(n,function(R,E){var N=R.getTicksCoords();return T=T==null?N.length-1:Math.min(N.length-1,T),G(N,function(O){return a.coordToPoint(O.coord,E)})}),C=[],x=0;x<=T;x++){for(var M=[],I=0;I3?1.4:o>1?1.2:1.1,f=i>0?u:1/u;ec(this,"zoom","zoomOnMouseWheel",t,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(n){var h=Math.abs(i),v=(i>0?1:-1)*(h>3?.4:h>1?.15:.05);ec(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:v,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!O1(this._zr,"globalPan")){var a=t.pinchScale>1?1.1:1/1.1;ec(this,"zoom",null,t,{scale:a,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(sr);function ec(r,e,t,a,n){r.pointerChecker&&r.pointerChecker(a,n.originX,n.originY)&&(oa(a.event),ED(r,e,t,a,n))}function ED(r,e,t,a,n){n.isAvailableBehavior=X(Wu,null,t,a),r.trigger(e,n)}function Wu(r,e,t){var a=t[r];return!r||a&&(!Y(a)||e.event[a+"Key"])}function ay(r,e,t){var a=r.target;a.x+=e,a.y+=t,a.dirty()}function ny(r,e,t,a){var n=r.target,i=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,i){var s=i.min||0,l=i.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,n.x-=(t-n.x)*(u-1),n.y-=(a-n.y)*(u-1),n.scaleX*=u,n.scaleY*=u,n.dirty()}var kz={axisPointer:1,tooltip:1,brush:1};function Th(r,e,t){var a=e.getComponentByElement(r.topTarget),n=a&&a.coordinateSystem;return a&&a!==t&&!kz.hasOwnProperty(a.mainType)&&n&&n.model!==t}function kD(r){if(Y(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var rc,Cf={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},N1=_t(Cf),Df={"alignment-baseline":"textBaseline","stop-color":"stopColor"},B1=_t(Df),Oz=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var a=kD(e);this._defsUsePending=[];var n=new at;this._root=n;var i=[],o=a.getAttribute("viewBox")||"",s=parseFloat(a.getAttribute("width")||t.width),l=parseFloat(a.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),ze(a,n,null,!0,!1);for(var u=a.firstChild;u;)this._parseNode(u,n,i,null,!1,!1),u=u.nextSibling;Vz(this._defs,this._defsUsePending),this._defsUsePending=[];var f,h;if(o){var v=Ah(o);v.length>=4&&(f={x:parseFloat(v[0]||0),y:parseFloat(v[1]||0),width:parseFloat(v[2]),height:parseFloat(v[3])})}if(f&&s!=null&&l!=null&&(h=ND(f,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var c=n;n=new at,n.add(c),c.scaleX=c.scaleY=h.scale,c.x=h.x,c.y=h.y}return!t.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new St({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:f,viewBoxTransform:h,named:i}},r.prototype._parseNode=function(e,t,a,n,i,o){var s=e.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!i){var f=rc[s];if(f&&Z(rc,s)){l=f.call(this,e,t);var h=e.getAttribute("name");if(h){var v={name:h,namedFrom:null,svgNodeTagLower:s,el:l};a.push(v),s==="g"&&(u=v)}else n&&a.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});t.add(l)}}var c=V1[s];if(c&&Z(V1,s)){var p=c.call(this,e),d=e.getAttribute("id");d&&(this._defs[d]=p)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,a,u,i,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(e,t){var a=new ji({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Ze(t,a),ze(e,a,this._defsUsePending,!1,!1),Nz(a,t);var n=a.style,i=n.fontSize;i&&i<9&&(n.fontSize=9,a.scaleX*=i/9,a.scaleY*=i/9);var o=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=o;var s=a.getBoundingRect();return this._textX+=s.width,t.add(a),a},r.internalField=function(){rc={g:function(e,t){var a=new at;return Ze(t,a),ze(e,a,this._defsUsePending,!1,!1),a},rect:function(e,t){var a=new St;return Ze(t,a),ze(e,a,this._defsUsePending,!1,!1),a.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),a.silent=!0,a},circle:function(e,t){var a=new da;return Ze(t,a),ze(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),a.silent=!0,a},line:function(e,t){var a=new ee;return Ze(t,a),ze(e,a,this._defsUsePending,!1,!1),a.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),a.silent=!0,a},ellipse:function(e,t){var a=new ah;return Ze(t,a),ze(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),a.silent=!0,a},polygon:function(e,t){var a=e.getAttribute("points"),n;a&&(n=F1(a));var i=new Ie({shape:{points:n||[]},silent:!0});return Ze(t,i),ze(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var a=e.getAttribute("points"),n;a&&(n=F1(a));var i=new Le({shape:{points:n||[]},silent:!0});return Ze(t,i),ze(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var a=new le;return Ze(t,a),ze(e,a,this._defsUsePending,!1,!1),a.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),a.silent=!0,a},text:function(e,t){var a=e.getAttribute("x")||"0",n=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(i),this._textY=parseFloat(n)+parseFloat(o);var s=new at;return Ze(t,s),ze(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var a=e.getAttribute("x"),n=e.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),n!=null&&(this._textY=parseFloat(n));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new at;return Ze(t,s),ze(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(e,t){var a=e.getAttribute("d")||"",n=TT(a);return Ze(t,n),ze(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}}(),r}(),V1={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),a=parseInt(r.getAttribute("x2")||"10",10),n=parseInt(r.getAttribute("y2")||"0",10),i=new fl(e,t,a,n);return z1(r,i),G1(r,i),i},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),a=parseInt(r.getAttribute("r")||"0",10),n=new MT(e,t,a);return z1(r,n),G1(r,n),n}};function z1(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function G1(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var a=t.getAttribute("offset"),n=void 0;a&&a.indexOf("%")>0?n=parseInt(a,10)/100:a?n=parseFloat(a):n=0;var i={};OD(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:n,color:o})}t=t.nextSibling}}function Ze(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),j(e.__inheritedStyle,r.__inheritedStyle))}function F1(r){for(var e=Ah(r),t=[],a=0;a0;i-=2){var o=a[i],s=a[i-1],l=Ah(o);switch(n=n||He(),s){case"translate":Fr(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":jd(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":si(n,n,-parseFloat(l[0])*ac,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*ac);ra(n,[1,0,u,1,0,0],n);break;case"skewY":var f=Math.tan(parseFloat(l[0])*ac);ra(n,[1,f,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}e.setLocalTransform(n)}}var W1=/([^\s:;]+)\s*:\s*([^:;]+)/g;function OD(r,e,t){var a=r.getAttribute("style");if(a){W1.lastIndex=0;for(var n;(n=W1.exec(a))!=null;){var i=n[1],o=Z(Cf,i)?Cf[i]:null;o&&(e[o]=n[2]);var s=Z(Df,i)?Df[i]:null;s&&(t[s]=n[2])}}}function Hz(r,e,t){for(var a=0;a0,g={api:a,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:v};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,a),this._updateMapSelectHandler(e,u,a,n)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=$(),a=$(),n=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function f(c,p){return p&&(c=p(c)),c&&[c[0]*i.scaleX+i.x,c[1]*i.scaleY+i.y]}function h(c){for(var p=[],d=!u&&l&&l.project,g=0;g=0)&&(v=n);var c=o?{normal:{align:"center",verticalAlign:"middle"}}:null;ve(e,ne(a),{labelFetcher:v,labelDataIndex:h,defaultText:t},c);var p=e.getTextContent();if(p&&(BD(p).ignore=p.ignore,e.textConfig&&o)){var d=e.getBoundingRect().clone();e.textConfig.layoutRect=d,e.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function $1(r,e,t,a,n,i){r.data?r.data.setItemGraphicEl(i,e):nt(e).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:t,region:a&&a.option||{}}}function q1(r,e,t,a,n){r.data||li({el:e,componentModel:n,itemName:t,itemTooltipOption:a.get("tooltip")})}function K1(r,e,t,a,n){e.highDownSilentOnTouch=!!n.get("selectedMode");var i=a.getModel("emphasis"),o=i.get("focus");return Ht(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&aR(e,n,t),o}function J1(r,e,t){var a=[],n;function i(){n=[]}function o(){n.length&&(a.push(n),n=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),D(r,function(l){s.lineStart();for(var u=0;u-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Vt);function l5(r,e){var t={};return D(r,function(a){a.each(a.mapDimension("value"),function(n,i){var o="ec-"+a.getName(i);t[o]=t[o]||[],isNaN(n)||t[o].push(n)})}),r[0].map(r[0].mapDimension("value"),function(a,n){for(var i="ec-"+r[0].getName(n),o=0,s=1/0,l=-1/0,u=t[i].length,f=0;f1?(S.width=_,S.height=_/g):(S.height=_,S.width=_*g),S.y=m[1]-S.height/2,S.x=m[0]-S.width/2;else{var b=r.getBoxLayoutParams();b.aspect=g,S=Qt(b,{width:p,height:d})}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function v5(r,e){D(e.get("geoCoord"),function(t,a){r.addGeoCoord(a,t)})}var c5=function(){function r(){this.dimensions=zD}return r.prototype.create=function(e,t){var a=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new hd(l+s,l,V({nameMap:o.get("nameMap")},n(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=eS,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=a[l]}});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),D(i,function(o,s){var l=G(o,function(f){return f.get("nameMap")}),u=new hd(s,s,V({nameMap:$d(l)},n(o[0])));u.zoomLimit=se.apply(null,G(o,function(f){return f.get("scaleLimit")})),a.push(u),u.resize=eS,u.resize(o[0],t),D(o,function(f){f.coordinateSystem=u,v5(u,f)})}),a},r.prototype.getFilledRegions=function(e,t,a,n){for(var i=(e||[]).slice(),o=$(),s=0;s=0;o--){var s=n[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function _5(r,e){var t=r.isExpand?r.children:[],a=r.parentNode.children,n=r.hierNode.i?a[r.hierNode.i-1]:null;if(t.length){b5(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+e(r,n),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else n&&(r.hierNode.prelim=n.hierNode.prelim+e(r,n));r.parentNode.hierNode.defaultAncestor=w5(r,n,r.parentNode.hierNode.defaultAncestor||a[0],e)}function S5(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function aS(r){return arguments.length?r:C5}function us(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function x5(r,e){return Qt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function b5(r){for(var e=r.children,t=e.length,a=0,n=0;--t>=0;){var i=e[t];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function w5(r,e,t,a){if(e){for(var n=r,i=r,o=i.parentNode.children[0],s=e,l=n.hierNode.modifier,u=i.hierNode.modifier,f=o.hierNode.modifier,h=s.hierNode.modifier;s=nc(s),i=ic(i),s&&i;){n=nc(n),o=ic(o),n.hierNode.ancestor=r;var v=s.hierNode.prelim+h-i.hierNode.prelim-u+a(s,i);v>0&&(A5(T5(s,r,t),r,v),u+=v,l+=v),h+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,f+=o.hierNode.modifier}s&&!nc(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=h-l),i&&!ic(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-f,t=r)}return t}function nc(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function ic(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function T5(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function A5(r,e,t){var a=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=a}function C5(r,e){return r.parentNode===e.parentNode?1:2}var D5=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),M5=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new D5},e.prototype.buildPath=function(t,a){var n=a.childPoints,i=n.length,o=a.parentPoint,s=n[0],l=n[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=a.orient,f=u==="TB"||u==="BT"?0:1,h=1-f,v=W(a.forkPosition,1),c=[];c[f]=o[f],c[h]=o[h]+(l[h]-o[h])*v,t.moveTo(o[0],o[1]),t.lineTo(c[0],c[1]),t.moveTo(s[0],s[1]),c[f]=s[f],t.lineTo(c[0],c[1]),c[f]=l[f],t.lineTo(c[0],c[1]),t.lineTo(l[0],l[1]);for(var p=1;pm.x,b||(S=S-Math.PI));var w=b?"left":"right",T=s.getModel("label"),A=T.get("rotate"),C=A*(Math.PI/180),M=g.getTextContent();M&&(g.setTextConfig({position:T.get("position")||w,rotation:A==null?-S:C,origin:"center"}),M.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),L=I==="relative"?Ls(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;L&&(nt(t).focus=L),L5(n,o,f,t,p,c,d,a),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var R=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);R&&R.hoverState===sl||of(t.__edge,P)}})}function L5(r,e,t,a,n,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),f=r.get("layout"),h=r.getOrient(),v=r.get(["lineStyle","curveness"]),c=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),d=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(d||(d=a.__edge=new ul({shape:vd(f,h,v,n,n)})),Tt(d,{shape:vd(f,h,v,i,o)},r));else if(u==="polyline"&&f==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;mt&&(t=n.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,a=this.children,n=a.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var a=t.getData().tree.root,n=r.targetNode;if(Y(n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=r.targetNodeId;if(i!=null&&(n=a.getNodeById(i)))return{node:n}}}function YD(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function uy(r,e){var t=YD(r);return ct(t,e)>=0}function Ch(r,e){for(var t=[];r;){var a=r.dataIndex;t.push({name:r.name,dataIndex:a,value:e.getRawValue(a)}),r=r.parentNode}return t.reverse(),t}var z5=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var a={name:t.name,children:t.data},n=t.leaves||{},i=new Mt(n,this,this.ecModel),o=ly.createTree(a,this,s);function s(h){h.wrapMethod("getItemModel",function(v,c){var p=o.getNodeByDataIndex(c);return p&&p.children.length&&p.isExpand||(v.parentModel=i),v})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=t.expandAndCollapse,f=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var v=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=v&&v.collapsed!=null?!v.collapsed:h.depth<=f}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,a,n){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return ie("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Ch(n,this),a.collapsed=!n.isExpand,a},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Vt);function G5(r,e,t){for(var a=[r],n=[],i;i=a.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s=0;i--)t.push(n[i])}}function F5(r,e){r.eachSeriesByType("tree",function(t){H5(t,e)})}function H5(r,e){var t=x5(r,e);r.layoutInfo=t;var a=r.get("layout"),n=0,i=0,o=null;a==="radial"?(n=2*Math.PI,i=Math.min(t.height,t.width)/2,o=aS(function(_,S){return(_.parentNode===S.parentNode?1:2)/_.depth})):(n=t.width,i=t.height,o=aS());var s=r.getData().tree.root,l=s.children[0];if(l){m5(s),G5(l,_5,o),s.hierNode.modifier=-l.hierNode.prelim,Zo(l,S5);var u=l,f=l,h=l;Zo(l,function(_){var S=_.getLayout().x;Sf.getLayout().x&&(f=_),_.depth>h.depth&&(h=_)});var v=u===f?1:o(u,f)/2,c=v-u.getLayout().x,p=0,d=0,g=0,y=0;if(a==="radial")p=n/(f.getLayout().x+v+c),d=i/(h.depth-1||1),Zo(l,function(_){g=(_.getLayout().x+c)*p,y=(_.depth-1)*d;var S=us(g,y);_.setLayout({x:S.x,y:S.y,rawX:g,rawY:y},!0)});else{var m=r.getOrient();m==="RL"||m==="LR"?(d=i/(f.getLayout().x+v+c),p=n/(h.depth-1||1),Zo(l,function(_){y=(_.getLayout().x+c)*d,g=m==="LR"?(_.depth-1)*p:n-(_.depth-1)*p,_.setLayout({x:g,y},!0)})):(m==="TB"||m==="BT")&&(p=n/(f.getLayout().x+v+c),d=i/(h.depth-1||1),Zo(l,function(_){g=(_.getLayout().x+c)*p,y=m==="TB"?(_.depth-1)*d:i-(_.depth-1)*d,_.setLayout({x:g,y},!0)}))}}}function W5(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),a=t.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(n.dataIndex,"style");V(s,o)})})}function U5(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var n=e.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=n.coordinateSystem,o=oy(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function Y5(r){r.registerChartView(I5),r.registerSeriesModel(z5),r.registerLayout(F5),r.registerVisual(W5),U5(r)}var lS=["treemapZoomToNode","treemapRender","treemapMove"];function X5(r){for(var e=0;e1;)i=i.parentNode;var o=Gp(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var Z5=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};ZD(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new Mt({itemStyle:o},this,a);i=t.levels=$5(i,a);var l=G(i||[],function(h){return new Mt(h,s,a)},this),u=ly.createTree(n,this,f);function f(h){h.wrapMethod("getItemModel",function(v,c){var p=u.getNodeByDataIndex(c),d=p?l[p.depth]:null;return v.parentModel=d||s,v})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return ie("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Ch(n,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},V(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var a=this._idIndexMap;a||(a=this._idIndexMap=$(),this._idIndexMapCount=0);var n=a.get(t);return n==null&&a.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){XD(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Vt);function ZD(r){var e=0;D(r.children,function(a){ZD(a);var n=a.value;z(n)&&(n=n[0]),e+=n});var t=r.value;z(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),z(r.value)?r.value[0]=t:r.value=t}function $5(r,e){var t=Pt(e.get("color")),a=Pt(e.get(["aria","decal","decals"]));if(t){r=r||[];var n,i;D(r,function(s){var l=new Mt(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return n||(o.color=t.slice()),!i&&a&&(o.decal=a.slice()),r}}var q5=8,uS=8,oc=5,K5=function(){function r(e){this.group=new at,e.add(this.group)}return r.prototype.render=function(e,t,a,n){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!a)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),f=l.getModel(["itemStyle","textStyle"]),h={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(a,h,u),this._renderContent(e,h,s,l,u,f,n),ch(o,h.pos,h.box)}},r.prototype._prepare=function(e,t,a){for(var n=e;n;n=n.parentNode){var i=Jt(n.getModel().get("name"),""),o=a.getTextRect(i),s=Math.max(o.width+q5*2,t.emptyItemWidth);t.totalWidth+=s+uS,t.renderList.push({node:n,text:i,width:s})}},r.prototype._renderContent=function(e,t,a,n,i,o,s){for(var l=0,u=t.emptyItemWidth,f=e.get(["breadcrumb","height"]),h=iE(t.pos,t.box),v=t.totalWidth,c=t.renderList,p=n.getModel("itemStyle").getItemStyle(),d=c.length-1;d>=0;d--){var g=c[d],y=g.node,m=g.width,_=g.text;v>h.width&&(v-=m-u,m=u,_=null);var S=new Ie({shape:{points:J5(l,0,m,f,d===c.length-1,d===0)},style:j(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new bt({style:Bt(i,{text:_})}),textConfig:{position:"inside"},z2:co*1e4,onclick:lt(s,y)});S.disableLabelAnimation=!0,S.getTextContent().ensureState("emphasis").style=Bt(o,{text:_}),S.ensureState("emphasis").style=p,Ht(S,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(S),Q5(S,e,y),l+=m+uS}},r.prototype.remove=function(){this.group.removeAll()},r}();function J5(r,e,t,a,n,i){var o=[[n?r:r-oc,e],[r+t,e],[r+t,e+a],[n?r:r-oc,e+a]];return!i&&o.splice(2,0,[r+t+oc,e+a/2]),!n&&o.push([r,e+a/2]),o}function Q5(r,e,t){nt(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Ch(t,e)}}var j5=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,a,n,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,a=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,i=this._storage.length;nhS||Math.abs(t.dy)>hS)){var a=this.seriesModel.getData().tree.root;if(!a)return;var n=a.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var a=t.originX,n=t.originY,i=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new ht(s.x,s.y,s.width,s.height),u=null,f=this._controllerHost;u=f.zoomLimit;var h=f.zoom=f.zoom||1;if(h*=i,u){var v=u.min||0,c=u.max||1/0;h=Math.max(Math.min(c,h),v)}var p=h/f.zoom;f.zoom=h;var d=this.seriesModel.layoutInfo;a-=d.x,n-=d.y;var g=He();Fr(g,g,[-a,-n]),jd(g,g,[p,p]),Fr(g,g,[a,n]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var a=this;t.on("click",function(n){if(a._state==="ready"){var i=a.seriesModel.get("nodeClick",!0);if(i){var o=a.findTarget(n.offsetX,n.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),f=l.get("target",!0)||"blank";u&&vf(u,f)}}}}},this)},e.prototype._renderBreadcrumb=function(t,a,n){var i=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new K5(this.group))).render(t,a,n.node,function(o){i._state!=="animating"&&(uy(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=$o(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,a){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},e.type="treemap",e}(Rt);function $o(){return{nodeGroup:[],background:[],content:[]}}function iG(r,e,t,a,n,i,o,s,l,u){if(!o)return;var f=o.getLayout(),h=r.getData(),v=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var c=f.width,p=f.height,d=f.borderWidth,g=f.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,S=f.upperHeight,b=_&&_.length,x=v.getModel("itemStyle"),w=v.getModel(["emphasis","itemStyle"]),T=v.getModel(["blur","itemStyle"]),A=v.getModel(["select","itemStyle"]),C=x.get("borderRadius")||0,M=it("nodeGroup",cd);if(!M)return;if(l.add(M),M.x=f.x||0,M.y=f.y||0,M.markRedraw(),Mf(M).nodeWidth=c,Mf(M).nodeHeight=p,f.isAboveViewRoot)return M;var I=it("background",fS,u,rG);I&&F(M,I,b&&f.upperLabelHeight);var L=v.getModel("emphasis"),P=L.get("focus"),R=L.get("blurScope"),E=L.get("disabled"),N=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)Bs(M)&&Vn(M,!1),I&&(Vn(I,!E),h.setItemGraphicEl(o.dataIndex,I),Rp(I,N,R));else{var O=it("content",fS,u,aG);O&&H(M,O),I.disableMorphing=!0,I&&Bs(I)&&Vn(I,!1),Vn(M,!E),h.setItemGraphicEl(o.dataIndex,M);var B=v.getShallow("cursor");B&&O.attr("cursor",B),Rp(M,N,R)}return M;function F(vt,tt,pt){var q=nt(tt);if(q.dataIndex=o.dataIndex,q.seriesIndex=r.seriesIndex,tt.setShape({x:0,y:0,width:c,height:p,r:C}),g)U(tt);else{tt.invisible=!1;var ot=o.getVisual("style"),Ot=ot.stroke,It=pS(x);It.fill=Ot;var Et=Mn(w);Et.fill=w.get("borderColor");var Gt=Mn(T);Gt.fill=T.get("borderColor");var jt=Mn(A);if(jt.fill=A.get("borderColor"),pt){var Ve=c-2*d;K(tt,Ot,ot.opacity,{x:d,y:0,width:Ve,height:S})}else tt.removeTextContent();tt.setStyle(It),tt.ensureState("emphasis").style=Et,tt.ensureState("blur").style=Gt,tt.ensureState("select").style=jt,ri(tt)}vt.add(tt)}function H(vt,tt){var pt=nt(tt);pt.dataIndex=o.dataIndex,pt.seriesIndex=r.seriesIndex;var q=Math.max(c-2*d,0),ot=Math.max(p-2*d,0);if(tt.culling=!0,tt.setShape({x:d,y:d,width:q,height:ot,r:C}),g)U(tt);else{tt.invisible=!1;var Ot=o.getVisual("style"),It=Ot.fill,Et=pS(x);Et.fill=It,Et.decal=Ot.decal;var Gt=Mn(w),jt=Mn(T),Ve=Mn(A);K(tt,It,Ot.opacity,null),tt.setStyle(Et),tt.ensureState("emphasis").style=Gt,tt.ensureState("blur").style=jt,tt.ensureState("select").style=Ve,ri(tt)}vt.add(tt)}function U(vt){!vt.invisible&&i.push(vt)}function K(vt,tt,pt,q){var ot=v.getModel(q?cS:vS),Ot=Jt(v.get("name"),null),It=ot.getShallow("show");ve(vt,ne(v,q?cS:vS),{defaultText:It?Ot:null,inheritColor:tt,defaultOpacity:pt,labelFetcher:r,labelDataIndex:o.dataIndex});var Et=vt.getTextContent();if(Et){var Gt=Et.style,jt=Kd(Gt.padding||0);q&&(vt.setTextConfig({layoutRect:q}),Et.disableLabelLayout=!0),Et.beforeUpdate=function(){var Pe=Math.max((q?q.width:vt.shape.width)-jt[1]-jt[3],0),tn=Math.max((q?q.height:vt.shape.height)-jt[0]-jt[2],0);(Gt.width!==Pe||Gt.height!==tn)&&Et.setStyle({width:Pe,height:tn})},Gt.truncateMinChar=2,Gt.lineOverflow="truncate",Q(Gt,q,f);var Ve=Et.getState("emphasis");Q(Ve?Ve.style:null,q,f)}}function Q(vt,tt,pt){var q=vt?vt.text:null;if(!tt&&pt.isLeafRoot&&q!=null){var ot=r.get("drillDownIcon",!0);vt.text=ot?ot+" "+q:q}}function it(vt,tt,pt,q){var ot=m!=null&&t[vt][m],Ot=n[vt];return ot?(t[vt][m]=null,Lt(Ot,ot)):g||(ot=new tt,ot instanceof or&&(ot.z2=oG(pt,q)),Wt(Ot,ot)),e[vt][y]=ot}function Lt(vt,tt){var pt=vt[y]={};tt instanceof cd?(pt.oldX=tt.x,pt.oldY=tt.y):pt.oldShape=V({},tt.shape)}function Wt(vt,tt){var pt=vt[y]={},q=o.parentNode,ot=tt instanceof at;if(q&&(!a||a.direction==="drillDown")){var Ot=0,It=0,Et=n.background[q.getRawIndex()];!a&&Et&&Et.oldShape&&(Ot=Et.oldShape.width,It=Et.oldShape.height),ot?(pt.oldX=0,pt.oldY=It):pt.oldShape={x:Ot,y:It,width:0,height:0}}pt.fadein=!ot}}function oG(r,e){return r*eG+e}var Js=D,sG=et,If=-1,ae=function(){function r(e){var t=e.mappingMethod,a=e.type,n=this.option=rt(e);this.type=a,this.mappingMethod=t,this._normalizeData=fG[t];var i=r.visualHandlers[a];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(sc(n),lG(n)):t==="category"?n.categories?uG(n):sc(n,!0):(Ce(t!=="linear"||n.dataExtent),sc(n))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return X(this._normalizeData,this)},r.listVisualTypes=function(){return _t(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,a){et(e)?D(e,t,a):t.call(a,e)},r.mapVisual=function(e,t,a){var n,i=z(e)?[]:et(e)?{}:(n=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(a,o,s);n?i=l:i[s]=l}),i},r.retrieveVisuals=function(e){var t={},a;return e&&Js(r.visualHandlers,function(n,i){e.hasOwnProperty(i)&&(t[i]=e[i],a=!0)}),a?t:null},r.prepareVisualTypes=function(e){if(z(e))e=e.slice();else if(sG(e)){var t=[];Js(e,function(a,n){t.push(n)}),e=t}else return[];return e.sort(function(a,n){return n==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,a){for(var n,i=1/0,o=0,s=t.length;o=0;i--)a[i]==null&&(delete t[e[i]],e.pop())}function sc(r,e){var t=r.visual,a=[];et(t)?Js(t,function(i){a.push(i)}):t!=null&&a.push(t);var n={color:1,symbol:1};!e&&a.length===1&&!n.hasOwnProperty(r.type)&&(a[1]=a[0]),$D(r,a)}function cu(r){return{applyVisual:function(e,t,a){var n=this.mapValueToVisual(e);a("color",r(t("color"),n))},_normalizedToVisual:pd([0,1])}}function dS(r){var e=this.option.visual;return e[Math.round(Dt(r,[0,1],[0,e.length-1],!0))]||{}}function qo(r){return function(e,t,a){a(r,this.mapValueToVisual(e))}}function fs(r){var e=this.option.visual;return e[this.option.loop&&r!==If?r%e.length:r]}function In(){return this.option.visual[0]}function pd(r){return{linear:function(e){return Dt(e,r,this.option.visual,!0)},category:fs,piecewise:function(e,t){var a=dd.call(this,t);return a==null&&(a=Dt(e,r,this.option.visual,!0)),a},fixed:In}}function dd(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var a=ae.findPieceIndex(r,t),n=t[a];if(n&&n.visual)return n.visual[this.type]}}function $D(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=G(e,function(t){var a=We(t);return a||[0,0,0,1]})),e}var fG={linear:function(r){return Dt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=ae.findPieceIndex(r,e,!0);if(t!=null)return Dt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??If},fixed:Xt};function pu(r,e,t){return r?e<=t:e=t.length||d===t[d.depth]){var y=gG(n,l,d,g,p,a);KD(d,y,t,a)}})}}}function cG(r,e,t){var a=V({},e),n=t.designatedVisualItemStyle;return D(["color","colorAlpha","colorSaturation"],function(i){n[i]=e[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function gS(r){var e=lc(r,"color");if(e){var t=lc(r,"colorAlpha"),a=lc(r,"colorSaturation");return a&&(e=ds(e,null,null,a)),t&&(e=ju(e,t)),e}}function pG(r,e){return e!=null?ds(e,null,null,r):null}function lc(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function dG(r,e,t,a,n,i){if(!(!i||!i.length)){var o=uc(e,"color")||n.color!=null&&n.color!=="none"&&(uc(e,"colorAlpha")||uc(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=e.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(f==="index"||f==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var v=new ae(h);return qD(v).drColorMappingBy=f,v}}}function uc(r,e){var t=r.get(e);return z(t)&&t.length?{name:e,range:t}:null}function gG(r,e,t,a,n,i){var o=V({},e);if(n){var s=n.type,l=s==="color"&&qD(n).drColorMappingBy,u=l==="index"?a:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var Qs=Math.max,Lf=Math.min,yS=se,fy=D,JD=["itemStyle","borderWidth"],yG=["itemStyle","gapWidth"],mG=["upperLabel","show"],_G=["upperLabel","height"];const SG={seriesType:"treemap",reset:function(r,e,t,a){var n=t.getWidth(),i=t.getHeight(),o=r.option,s=Qt(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=W(yS(s.width,l[0]),n),f=W(yS(s.height,l[1]),i),h=a&&a.type,v=["treemapZoomToNode","treemapRootToNode"],c=Ks(a,v,r),p=h==="treemapRender"||h==="treemapMove"?a.rootRect:null,d=r.getViewRoot(),g=YD(d);if(h!=="treemapMove"){var y=h==="treemapZoomToNode"?CG(r,c,d,u,f):p?[p.width,p.height]:[u,f],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var _={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};d.hostTree.clearLayouts();var S={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};d.setLayout(S),QD(d,_,!1,0),S=d.getLayout(),fy(g,function(x,w){var T=(g[w+1]||d).getValue();x.setLayout(V({dataExtent:[T,T],borderWidth:0,upperHeight:0},S))})}var b=r.getData().tree.root;b.setLayout(DG(s,p,c),!0),r.setLayoutInfo(s),jD(b,new ht(-s.x,-s.y,n,i),g,d,0)}};function QD(r,e,t,a){var n,i;if(!r.isRemoved()){var o=r.getLayout();n=o.width,i=o.height;var s=r.getModel(),l=s.get(JD),u=s.get(yG)/2,f=tM(s),h=Math.max(l,f),v=l-u,c=h-u;r.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:f},!0),n=Qs(n-2*v,0),i=Qs(i-v-c,0);var p=n*i,d=xG(r,s,p,e,t,a);if(d.length){var g={x:v,y:c,width:n,height:i},y=Lf(n,i),m=1/0,_=[];_.area=0;for(var S=0,b=d.length;S=0;l--){var u=n[a==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function AG(r,e,t){for(var a=0,n=1/0,i=0,o=void 0,s=r.length;ia&&(a=o));var l=r.area*r.area,u=e*e*t;return l?Qs(u*a/l,l/(u*n)):1/0}function mS(r,e,t,a,n){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],f=e?r.area/e:0;(n||f>t[l[o]])&&(f=t[l[o]]);for(var h=0,v=r.length;hPm&&(u=Pm),i=s}ua&&(a=e);var i=a%2?a+2:a+3;n=[];for(var o=0;o0&&(b[0]=-b[0],b[1]=-b[1]);var w=S[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(S[1],S[0]);h[0].8?"left":v[0]<-.8?"right":"center",d=v[1]>.8?"top":v[1]<-.8?"bottom":"middle";break;case"start":i.x=-v[0]*y+f[0],i.y=-v[1]*m+f[1],p=v[0]>.8?"right":v[0]<-.8?"left":"center",d=v[1]>.8?"bottom":v[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*w+f[0],i.y=f[1]+A,p=S[0]<0?"right":"left",i.originX=-y*w,i.originY=-A;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+A,p="center",i.originY=-A;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*w+h[0],i.y=h[1]+A,p=S[0]>=0?"right":"left",i.originX=y*w,i.originY=-A;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||p})}},e}(at),dy=function(){function r(e){this.group=new at,this._LineCtor=e||py}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var a=this,n=a.group,i=a._lineData;a._lineData=e,i||n.removeAll();var o=TS(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){n.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,a){t.updateLayout(e,a)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=TS(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(s){!s.isGroup&&!YG(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0}function TS(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:ne(e)}}function AS(r){return isNaN(r[0])||isNaN(r[1])}function pc(r){return r&&!AS(r[0])&&!AS(r[1])}var dc=[],gc=[],yc=[],Li=oe,mc=Un,CS=Math.abs;function DS(r,e,t){for(var a=r[0],n=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,f=.1;f<=.9;f+=.1){dc[0]=Li(a[0],n[0],i[0],f),dc[1]=Li(a[1],n[1],i[1],f);var h=CS(mc(dc,e)-l);h=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function _c(r,e){var t=[],a=Ps,n=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[ea(u[0]),ea(u[1])],u[2]&&u.__original.push(ea(u[2])));var v=u.__original;if(u[2]!=null){if(Se(n[0],v[0]),Se(n[1],v[2]),Se(n[2],v[1]),f&&f!=="none"){var c=vs(s.node1),p=DS(n,v[0],c*e);a(n[0][0],n[1][0],n[2][0],p,t),n[0][0]=t[3],n[1][0]=t[4],a(n[0][1],n[1][1],n[2][1],p,t),n[0][1]=t[3],n[1][1]=t[4]}if(h&&h!=="none"){var c=vs(s.node2),p=DS(n,v[1],c*e);a(n[0][0],n[1][0],n[2][0],p,t),n[1][0]=t[1],n[2][0]=t[2],a(n[0][1],n[1][1],n[2][1],p,t),n[1][1]=t[1],n[2][1]=t[2]}Se(u[0],n[0]),Se(u[1],n[2]),Se(u[2],n[1])}else{if(Se(i[0],v[0]),Se(i[1],v[1]),Nn(o,i[1],i[0]),fo(o,o),f&&f!=="none"){var c=vs(s.node1);ap(i[0],i[0],o,c*e)}if(h&&h!=="none"){var c=vs(s.node2);ap(i[1],i[1],o,-c*e)}Se(u[0],i[0]),Se(u[1],i[1])}})}function MS(r){return r.type==="view"}var XG=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){var n=new ml,i=new dy,o=this.group;this._controller=new wl(a.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,a,n){var i=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(MS(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(f):Tt(u,f,t)}_c(t.getGraph(),hs(t));var h=t.getData();s.updateData(h);var v=t.getEdgeData();l.updateData(v),this._updateNodeAndLinkScale(),this._updateController(t,a,n),clearTimeout(this._layoutTimeout);var c=t.forceLayout,p=t.get(["force","layoutAnimation"]);c&&this._startForceLayoutIteration(c,p);var d=t.get("layout");h.graph.eachNode(function(_){var S=_.dataIndex,b=_.getGraphicEl(),x=_.getModel();if(b){b.off("drag").off("dragend");var w=x.get("draggable");w&&b.on("drag",function(A){switch(d){case"force":c.warmUp(),!i._layouting&&i._startForceLayoutIteration(c,p),c.setFixed(S),h.setItemLayout(S,[b.x,b.y]);break;case"circular":h.setItemLayout(S,[b.x,b.y]),_.setLayout({fixed:!0},!0),cy(t,"symbolSize",_,[A.offsetX,A.offsetY]),i.updateLayout(t);break;case"none":default:h.setItemLayout(S,[b.x,b.y]),vy(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){c&&c.setUnfixed(S)}),b.setDraggable(w,!!x.get("cursor"));var T=x.get(["emphasis","focus"]);T==="adjacency"&&(nt(b).focus=_.getAdjacentDataIndices())}}),h.graph.eachEdge(function(_){var S=_.getGraphicEl(),b=_.getModel().get(["emphasis","focus"]);S&&b==="adjacency"&&(nt(S).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),y=h.getLayout("cx"),m=h.getLayout("cy");h.graph.eachNode(function(_){nM(_,g,y,m)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,a){var n=this;(function i(){t.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(a?n._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,a,n){var i=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,f,h){var v=l.getBoundingRect();return v.applyTransform(l.transform),v.contain(f,h)&&!Th(u,n,t)}),!MS(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){ay(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){ny(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(),_c(t.getGraph(),hs(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,a=t.getData(),n=hs(t);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(t){_c(t.getGraph(),hs(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(Rt);function Pi(r){return"_EC_"+r}var ZG=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var a=this._nodesMap;if(!a[Pi(e)]){var n=new Ln(e,t);return n.hostGraph=this,this.nodes.push(n),a[Pi(e)]=n,n}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[Pi(e)]},r.prototype.addEdge=function(e,t,a){var n=this._nodesMap,i=this._edgesMap;if(wt(e)&&(e=this.nodes[e]),wt(t)&&(t=this.nodes[t]),e instanceof Ln||(e=n[Pi(e)]),t instanceof Ln||(t=n[Pi(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new oM(e,t,a);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof Ln&&(e=e.id),t instanceof Ln&&(t=t.id);var a=this._edgesMap;return this._directed?a[e+"-"+t]:a[e+"-"+t]||a[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var a=this.nodes,n=a.length,i=0;i=0&&e.call(t,a[i],i)},r.prototype.eachEdge=function(e,t){for(var a=this.edges,n=a.length,i=0;i=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&e.call(t,a[i],i)},r.prototype.breadthFirstTraverse=function(e,t,a,n){if(t instanceof Ln||(t=this._nodesMap[Pi(t)]),!!t){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var i=0,o=n.length;i=0&&this[r][e].setItemVisual(this.dataIndex,t,a)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,a){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,a)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}Kt(Ln,sM("hostGraph","data"));Kt(oM,sM("hostGraph","edgeData"));function lM(r,e,t,a,n){for(var i=new ZG(a),o=0;o "+v)),u++)}var c=t.get("coordinateSystem"),p;if(c==="cartesian2d"||c==="polar")p=ga(r,t);else{var d=cl.get(c),g=d?d.dimensions||[]:[];ct(g,"value")<0&&g.concat(["value"]);var y=dl(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new Te(y,t),p.initData(r)}var m=new Te(["value"],t);return m.initData(l,s),n&&n(p,m),WD({mainData:p,struct:i,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var $G=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var a=this;function n(){return a._categoriesData}this.legendVisualProvider=new bl(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),jn(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&n){kG(this);var s=lM(i,n,this,!0,l);return D(s.edges,function(u){OG(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,f){u.wrapMethod("getItemModel",function(p){var d=o._categoriesModels,g=p.getShallow("category"),y=d[g];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var h=Mt.prototype.getModel;function v(p,d){var g=h.call(this,p,d);return g.resolveParentPath=c,g}f.wrapMethod("getItemModel",function(p){return p.resolveParentPath=c,p.getModel=v,p});function c(p){if(p&&(p[0]==="label"||p[1]==="label")){var d=p.slice();return p[0]==="label"?d[0]="edgeLabel":p[1]==="label"&&(d[1]="edgeLabel"),d}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,a,n){if(n==="edge"){var i=this.getData(),o=this.getDataParams(t,n),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),ie("nameValue",{name:f.join(" > "),value:o.value,noValue:o.value==null})}var h=RA({series:this,dataIndex:t,multipleSeries:a});return h},e.prototype._updateCategoriesData=function(){var t=G(this.option.categories||[],function(n){return n.value!=null?n:V({value:0},n)}),a=new Te(["value"],this);a.initData(t),this._categoriesData=a,this._categoriesModels=a.mapArray(function(n){return a.getItemModel(n)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Vt),qG={type:"graphRoam",event:"graphRoam",update:"none"};function KG(r){r.registerChartView(XG),r.registerSeriesModel($G),r.registerProcessor(IG),r.registerVisual(LG),r.registerVisual(PG),r.registerLayout(NG),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,VG),r.registerLayout(GG),r.registerCoordinateSystem("graphView",{dimensions:Tl.dimensions,create:HG}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Xt),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Xt),r.registerAction(qG,function(e,t,a){t.eachComponent({mainType:"series",query:e},function(n){var i=n.coordinateSystem,o=oy(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}var JG=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),QG=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="pointer",a}return e.prototype.getDefaultShape=function(){return new JG},e.prototype.buildPath=function(t,a){var n=Math.cos,i=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-n(l)*s*(s>=o/3?1:2),f=a.y-i(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,t.moveTo(u,f),t.lineTo(a.x+n(l)*s,a.y+i(l)*s),t.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),t.lineTo(a.x-n(l)*s,a.y-i(l)*s),t.lineTo(u,f)},e}(gt);function jG(r,e){var t=r.get("center"),a=e.getWidth(),n=e.getHeight(),i=Math.min(a,n),o=W(t[0],e.getWidth()),s=W(t[1],e.getHeight()),l=W(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function gu(r,e){var t=r==null?"":r+"";return e&&(Y(e)?t=e.replace("{value}",t):J(e)&&(t=e(r))),t}var tF=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=jG(t,n);this._renderMain(t,a,n,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,a,n,i,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,f=-t.get("endAngle")/180*Math.PI,h=t.getModel("axisLine"),v=h.get("roundCap"),c=v?Af:Me,p=h.get("show"),d=h.getModel("lineStyle"),g=d.get("width"),y=[u,f];lg(y,!l),u=y[0],f=y[1];for(var m=f-u,_=u,S=[],b=0;p&&b=A&&(C===0?0:i[C-1][0])Math.PI/2&&(Q+=Math.PI)):K==="tangential"?Q=-T-Math.PI/2:wt(K)&&(Q=K*Math.PI/180),Q===0?h.add(new bt({style:Bt(_,{text:B,x:H,y:U,verticalAlign:R<-.8?"top":R>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:F}),silent:!0})):h.add(new bt({style:Bt(_,{text:B,x:H,y:U,verticalAlign:"middle",align:"center"},{inheritColor:F}),silent:!0,originX:H,originY:U,rotation:Q}))}if(m.get("show")&&E!==S){var N=m.get("distance");N=N?N+f:f;for(var it=0;it<=b;it++){P=Math.cos(T),R=Math.sin(T);var Lt=new ee({shape:{x1:P*(p-N)+v,y1:R*(p-N)+c,x2:P*(p-w-N)+v,y2:R*(p-w-N)+c},silent:!0,style:I});I.stroke==="auto"&&Lt.setStyle({stroke:i((E+it/b)/S)}),h.add(Lt),T+=C}T-=C}else T+=A}},e.prototype._renderPointer=function(t,a,n,i,o,s,l,u,f){var h=this.group,v=this._data,c=this._progressEls,p=[],d=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),_=m.mapDimension("value"),S=+t.get("min"),b=+t.get("max"),x=[S,b],w=[s,l];function T(C,M){var I=m.getItemModel(C),L=I.getModel("pointer"),P=W(L.get("width"),o.r),R=W(L.get("length"),o.r),E=t.get(["pointer","icon"]),N=L.get("offsetCenter"),O=W(N[0],o.r),B=W(N[1],o.r),F=L.get("keepAspect"),H;return E?H=qt(E,O-P/2,B-R,P,R,null,F):H=new QG({shape:{angle:-Math.PI/2,width:P,r:R,x:O,y:B}}),H.rotation=-(M+Math.PI/2),H.x=o.cx,H.y=o.cy,H}function A(C,M){var I=g.get("roundCap"),L=I?Af:Me,P=g.get("overlap"),R=P?g.get("width"):f/m.count(),E=P?o.r-R:o.r-(C+1)*R,N=P?o.r:o.r-C*R,O=new L({shape:{startAngle:s,endAngle:M,cx:o.cx,cy:o.cy,clockwise:u,r0:E,r:N}});return P&&(O.z2=Dt(m.get(_,C),[S,b],[100,0],!0)),O}(y||d)&&(m.diff(v).add(function(C){var M=m.get(_,C);if(d){var I=T(C,s);zt(I,{rotation:-((isNaN(+M)?w[0]:Dt(M,x,w,!0))+Math.PI/2)},t),h.add(I),m.setItemGraphicEl(C,I)}if(y){var L=A(C,s),P=g.get("clip");zt(L,{shape:{endAngle:Dt(M,x,w,P)}},t),h.add(L),Ip(t.seriesIndex,m.dataType,C,L),p[C]=L}}).update(function(C,M){var I=m.get(_,C);if(d){var L=v.getItemGraphicEl(M),P=L?L.rotation:s,R=T(C,P);R.rotation=P,Tt(R,{rotation:-((isNaN(+I)?w[0]:Dt(I,x,w,!0))+Math.PI/2)},t),h.add(R),m.setItemGraphicEl(C,R)}if(y){var E=c[M],N=E?E.shape.endAngle:s,O=A(C,N),B=g.get("clip");Tt(O,{shape:{endAngle:Dt(I,x,w,B)}},t),h.add(O),Ip(t.seriesIndex,m.dataType,C,O),p[C]=O}}).execute(),m.each(function(C){var M=m.getItemModel(C),I=M.getModel("emphasis"),L=I.get("focus"),P=I.get("blurScope"),R=I.get("disabled");if(d){var E=m.getItemGraphicEl(C),N=m.getItemVisual(C,"style"),O=N.fill;if(E instanceof le){var B=E.style;E.useStyle(V({image:B.image,x:B.x,y:B.y,width:B.width,height:B.height},N))}else E.useStyle(N),E.type!=="pointer"&&E.setColor(O);E.setStyle(M.getModel(["pointer","itemStyle"]).getItemStyle()),E.style.fill==="auto"&&E.setStyle("fill",i(Dt(m.get(_,C),x,[0,1],!0))),E.z2EmphasisLift=0,he(E,M),Ht(E,L,P,R)}if(y){var F=p[C];F.useStyle(m.getItemVisual(C,"style")),F.setStyle(M.getModel(["progress","itemStyle"]).getItemStyle()),F.z2EmphasisLift=0,he(F,M),Ht(F,L,P,R)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,a){var n=t.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),f=qt(s,a.cx-o/2+W(l[0],a.r),a.cy-o/2+W(l[1],a.r),o,o,null,u);f.z2=n.get("showAbove")?1:0,f.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(f)}},e.prototype._renderTitleAndDetail=function(t,a,n,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),f=+t.get("min"),h=+t.get("max"),v=new at,c=[],p=[],d=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){c[y]=new bt({silent:!0}),p[y]=new bt({silent:!0})}).update(function(y,m){c[y]=s._titleEls[m],p[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),S=new at,b=i(Dt(_,[f,h],[0,1],!0)),x=m.getModel("title");if(x.get("show")){var w=x.get("offsetCenter"),T=o.cx+W(w[0],o.r),A=o.cy+W(w[1],o.r),C=c[y];C.attr({z2:g?0:2,style:Bt(x,{x:T,y:A,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:b})}),S.add(C)}var M=m.getModel("detail");if(M.get("show")){var I=M.get("offsetCenter"),L=o.cx+W(I[0],o.r),P=o.cy+W(I[1],o.r),R=W(M.get("width"),o.r),E=W(M.get("height"),o.r),N=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:b,C=p[y],O=M.get("formatter");C.attr({z2:g?0:2,style:Bt(M,{x:L,y:P,text:gu(_,O),width:isNaN(R)?null:R,height:isNaN(E)?null:E,align:"center",verticalAlign:"middle"},{inheritColor:N})}),NT(C,{normal:M},_,function(F){return gu(F,O)}),d&&BT(C,y,l,t,{getFormattedLabel:function(F,H,U,K,Q,it){return gu(it?it.interpolatedValue:_,O)}}),S.add(C)}v.add(S)}),this.group.add(v),this._titleEls=c,this._detailEls=p},e.type="gauge",e}(Rt),eF=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,a){return Ao(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Vt);function rF(r){r.registerChartView(tF),r.registerSeriesModel(eF)}var aF=["itemStyle","opacity"],nF=function(r){k(e,r);function e(t,a){var n=r.call(this)||this,i=n,o=new Le,s=new bt;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(t,a,!0),n}return e.prototype.updateData=function(t,a,n){var i=this,o=t.hostModel,s=t.getItemModel(a),l=t.getItemLayout(a),u=s.getModel("emphasis"),f=s.get(aF);f=f??1,n||xr(i),i.useStyle(t.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,zt(i,{style:{opacity:f}},o,a)):Tt(i,{style:{opacity:f},shape:{points:l.points}},o,a),he(i,s),this._updateLabel(t,a),Ht(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=t.hostModel,l=t.getItemModel(a),u=t.getItemLayout(a),f=u.label,h=t.getItemVisual(a,"style"),v=h.fill;ve(o,ne(l),{labelFetcher:t.hostModel,labelDataIndex:a,defaultOpacity:h.opacity,defaultText:t.getName(a)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}}),n.setTextConfig({local:!0,inside:!!f.inside,insideStroke:v,outsideFill:v});var c=f.linePoints;i.setShape({points:c}),n.textGuideLineConfig={anchor:c?new ft(c[0][0],c[0][1]):null},Tt(o,{style:{x:f.x,y:f.y}},s,a),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),Xg(n,Zg(l),{stroke:v})},e}(Ie),iF=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new nF(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(i,l),s.add(f),i.setItemGraphicEl(l,f)}).remove(function(l){var u=o.getItemGraphicEl(l);Vs(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Rt),oF=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new bl(X(this.getData,this),X(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,a){return Ao(this,{coordDimensions:["value"],encodeDefaulter:lt(Ag,this)})},e.prototype._defaultLabelLine=function(t){jn(t,"labelLine",["show"]);var a=t.labelLine,n=t.emphasis.labelLine;a.show=a.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var a=this.getData(),n=r.prototype.getDataParams.call(this,t),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Vt);function sF(r,e){return Qt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function lF(r,e){for(var t=r.mapDimension("value"),a=r.mapArray(t,function(l){return l}),n=[],i=e==="ascending",o=0,s=r.count();oTF)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!xc(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=t.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function xc(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var DF=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var a=this.option;t&&ut(a,t,!0),this._initDimensions()},e.prototype.contains=function(t,a){var n=t.get("parallelIndex");return n!=null&&a.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){D(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){t.hasOwnProperty(a)&&(this.option[a]=t[a])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],a=this.parallelAxisIndex=[],n=Ct(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);D(n,function(i){t.push("dim"+i.get("dim")),a.push(i.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(mt),MF=function(r){k(e,r);function e(t,a,n,i,o){var s=r.call(this,t,a,n)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(wr);function pi(r,e,t,a,n,i){r=r||0;var o=t[1]-t[0];if(n!=null&&(n=Ri(n,[0,o])),i!=null&&(i=Math.max(i,n??0)),a==="all"){var s=Math.abs(e[1]-e[0]);s=Ri(s,[0,o]),n=i=Ri(s,[n,i]),a=0}e[0]=Ri(e[0],t),e[1]=Ri(e[1],t);var l=bc(e,a);e[a]+=r;var u=n||0,f=t.slice();l.sign<0?f[0]+=u:f[1]-=u,e[a]=Ri(e[a],f);var h;return h=bc(e,a),n!=null&&(h.sign!==l.sign||h.spani&&(e[1-a]=e[a]+h.sign*i),e}function bc(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Ri(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var wc=D,fM=Math.min,hM=Math.max,PS=Math.floor,IF=Math.ceil,RS=Ut,LF=Math.PI,PF=function(){function r(e,t,a){this.type="parallel",this._axesMap=$(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,a)}return r.prototype._init=function(e,t,a){var n=e.dimensions,i=e.parallelAxisIndex;wc(n,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),f=this._axesMap.set(o,new MF(o,bh(u),[0,0],u.get("type"),l)),h=f.type==="category";f.onBand=h&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),a=t.axisBase,n=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],s=e[i];return o>=a&&o<=a+t.axisLength&&s>=n&&s<=n+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(a){if(e.contains(a,t)){var n=a.getData();wc(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(n,n.mapDimension(i)),ao(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=Qt(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,a=["x","y"],n=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=t[n[o]],l=[0,s],u=this.dimensions.length,f=yu(e.get("axisExpandWidth"),l),h=yu(e.get("axisExpandCount")||0,[0,u]),v=e.get("axisExpandable")&&u>3&&u>h&&h>1&&f>0&&s>0,c=e.get("axisExpandWindow"),p;if(c)p=yu(c[1]-c[0],l),c[1]=c[0]+p;else{p=yu(f*(h-1),l);var d=e.get("axisExpandCenter")||PS(u/2);c=[f*d-p/2],c[1]=c[0]+p}var g=(s-p)/(u-h);g<3&&(g=0);var y=[PS(RS(c[0]/f,1))+1,IF(RS(c[1]/f,1))-1],m=g/f*c[0];return{layout:i,pixelDimIndex:o,layoutBase:t[a[o]],layoutLength:s,axisBase:t[a[1-o]],axisLength:t[n[1-o]],axisExpandable:v,axisExpandWidth:f,axisCollapseWidth:g,axisExpandWindow:c,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,a=this.dimensions,n=this._makeLayoutInfo(),i=n.layout;t.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),wc(a,function(o,s){var l=(n.axisExpandable?EF:RF)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},f={horizontal:LF/2,vertical:0},h=[u[i].x+e.x,u[i].y+e.y],v=f[i],c=He();si(c,c,v),Fr(c,c,h),this._axesLayout[o]={position:h,rotation:v,transform:c,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,a,n){a==null&&(a=0),n==null&&(n=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];D(o,function(g){s.push(e.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),f=a;fi*(1-h[0])?(u="jump",l=s-i*(1-h[2])):(l=s-i*h[1])>=0&&(l=s-i*(1-h[1]))<=0&&(l=0),l*=t.axisExpandWidth/f,l?pi(l,n,o,"all"):u="none";else{var c=n[1]-n[0],p=o[1]*s/c;n=[hM(0,p-c/2)],n[1]=fM(o[1],n[0]+c),n[0]=n[1]-c}return{axisExpandWindow:n,behavior:u}},r}();function yu(r,e){return fM(hM(r,e[0]),e[1])}function RF(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function EF(r,e){var t=e.layoutLength,a=e.axisExpandWidth,n=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,f;return r=0;n--)nr(a[n])},e.prototype.getActiveState=function(t){var a=this.activeIntervals;if(!a.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(a.length===1){var n=a[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=a.length;iVF}function yM(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function mM(r,e,t,a){var n=new at;return n.add(new St({name:"main",style:Sy(t),silent:!0,draggable:!0,cursor:"move",drift:lt(OS,r,e,n,["n","s","w","e"]),ondragend:lt(ii,e,{isEnd:!0})})),D(a,function(i){n.add(new St({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:lt(OS,r,e,n,i),ondragend:lt(ii,e,{isEnd:!0})}))}),n}function _M(r,e,t,a){var n=a.brushStyle.lineWidth||0,i=oo(n,zF),o=t[0][0],s=t[1][0],l=o-n/2,u=s-n/2,f=t[0][1],h=t[1][1],v=f-i+n/2,c=h-i+n/2,p=f-o,d=h-s,g=p+n,y=d+n;Kr(r,e,"main",o,s,p,d),a.transformable&&(Kr(r,e,"w",l,u,i,y),Kr(r,e,"e",v,u,i,y),Kr(r,e,"n",l,u,g,i),Kr(r,e,"s",l,c,g,i),Kr(r,e,"nw",l,u,i,i),Kr(r,e,"ne",v,u,i,i),Kr(r,e,"sw",l,c,i,i),Kr(r,e,"se",v,c,i,i))}function xd(r,e){var t=e.__brushOption,a=t.transformable,n=e.childAt(0);n.useStyle(Sy(t)),n.attr({silent:!a,cursor:a?"move":"default"}),D([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=e.childOfName(i.join("")),s=i.length===1?bd(r,i[0]):YF(r,i);o&&o.attr({silent:!a,invisible:!a,cursor:a?FF[s]+"-resize":null})})}function Kr(r,e,t,a,n,i,o){var s=e.childOfName(t);s&&s.setShape(ZF(xy(r,e,[[a,n],[a+i,n+o]])))}function Sy(r){return j({strokeNoScale:!0},r.brushStyle)}function SM(r,e,t,a){var n=[tl(r,t),tl(e,a)],i=[oo(r,t),oo(e,a)];return[[n[0],i[0]],[n[1],i[1]]]}function UF(r){return qn(r.group)}function bd(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=oh(t[e],UF(r));return a[n]}function YF(r,e){var t=[bd(r,e[0]),bd(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function OS(r,e,t,a,n,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=xM(e,n,i);D(a,function(u){var f=GF[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(SM(s[0][0],s[1][0],s[0][1],s[1][1])),yy(e,t),ii(e,{isEnd:!1})}function XF(r,e,t,a){var n=e.__brushOption.range,i=xM(r,t,a);D(n,function(o){o[0]+=i[0],o[1]+=i[1]}),yy(r,e),ii(r,{isEnd:!1})}function xM(r,e,t){var a=r.group,n=a.transformCoordToLocal(e,t),i=a.transformCoordToLocal(0,0);return[n[0]-i[0],n[1]-i[1]]}function xy(r,e,t){var a=gM(r,e);return a&&a!==ni?a.clipPath(t,r._transform):rt(t)}function ZF(r){var e=tl(r[0][0],r[1][0]),t=tl(r[0][1],r[1][1]),a=oo(r[0][0],r[1][0]),n=oo(r[0][1],r[1][1]);return{x:e,y:t,width:a-e,height:n-t}}function $F(r,e,t){if(!(!r._brushType||KF(r,e.offsetX,e.offsetY))){var a=r._zr,n=r._covers,i=_y(r,e,t);if(!r._dragging)for(var o=0;oa.getWidth()||t<0||t>a.getHeight()}var Mh={lineX:VS(0),lineY:VS(1),rect:{createCover:function(r,e){function t(a){return a}return mM({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=yM(r);return SM(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,a){_M(r,e,t,a)},updateCommon:xd,contain:Td},polygon:{createCover:function(r,e){var t=new at;return t.add(new Le({name:"main",style:Sy(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new Ie({name:"main",draggable:!0,drift:lt(XF,r,e),ondragend:lt(ii,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,a){e.childAt(0).setShape({points:xy(r,e,t)})},updateCommon:xd,contain:Td}};function VS(r){return{createCover:function(e,t){return mM({toRectRange:function(a){var n=[a,[0,100]];return r&&n.reverse(),n},fromRectRange:function(a){return a[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=yM(e),a=tl(t[0][r],t[1][r]),n=oo(t[0][r],t[1][r]);return[a,n]},updateCoverShape:function(e,t,a,n){var i,o=gM(e,t);if(o!==ni&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=e._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[a,i];r&&l.reverse(),_M(e,t,l,n)},updateCommon:xd,contain:Td}}function wM(r){return r=by(r),function(e){return ET(e,r)}}function TM(r,e){return r=by(r),function(t){var a=e??t,n=a?r.width:r.height,i=a?r.x:r.y;return[i,i+(n||0)]}}function AM(r,e,t){var a=by(r);return function(n,i){return a.contain(i[0],i[1])&&!Th(n,e,t)}}function by(r){return ht.create(r)}var JF=["axisLine","axisTickLabel","axisName"],QF=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){r.prototype.init.apply(this,arguments),(this._brushController=new gy(a.getZr())).on("brush",X(this._onBrush,this))},e.prototype.render=function(t,a,n,i){if(!jF(t,a,i)){this.axisModel=t,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new at,this.group.add(this._axisGroup),!!t.get("show")){var s=e3(t,a),l=s.coordinateSystem,u=t.getAreaSelectStyle(),f=u.width,h=t.axis.dim,v=l.getAxisLayout(h),c=V({strokeContainThreshold:f},v),p=new Ae(t,c);D(JF,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(c,u,t,s,f,n),hl(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,a,n,i,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),h=ht.create({x:l[0],y:-o/2,width:u,height:o});h.x-=f,h.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:wM(h),isTargetByCursor:AM(h,s,i),getLinearBrushOtherExtent:TM(h,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(t3(n))},e.prototype._onBrush=function(t){var a=t.areas,n=this.axisModel,i=n.axis,o=G(a,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Ft);function jF(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function t3(r){var e=r.axis;return G(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function e3(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var r3={type:"axisAreaSelect",event:"axisAreaSelected"};function a3(r){r.registerAction(r3,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(a){a.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(a){a.setAxisExpand(e)})})}var n3={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function CM(r){r.registerComponentView(AF),r.registerComponentModel(DF),r.registerCoordinateSystem("parallel",OF),r.registerPreprocessor(xF),r.registerComponentModel(_d),r.registerComponentView(QF),io(r,"parallel",_d,n3),a3(r)}function i3(r){dt(CM),r.registerChartView(cF),r.registerSeriesModel(gF),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,SF)}var o3=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),s3=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new o3},e.prototype.buildPath=function(t,a){var n=a.extent;t.moveTo(a.x1,a.y1),t.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(t.lineTo(a.x2+n,a.y2),t.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(t.lineTo(a.x2,a.y2+n),t.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),t.closePath()},e.prototype.highlight=function(){la(this)},e.prototype.downplay=function(){ua(this)},e}(gt),l3=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,a,n){var i=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,f=l.height,h=t.getData(),v=t.getData("edge"),c=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var d=new s3,g=nt(d);g.dataIndex=p.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var y=p.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),S=p.node1.getLayout(),b=p.node1.getModel(),x=b.get("localX"),w=b.get("localY"),T=p.node2.getLayout(),A=p.node2.getModel(),C=A.get("localX"),M=A.get("localY"),I=p.getLayout(),L,P,R,E,N,O,B,F;d.shape.extent=Math.max(1,I.dy),d.shape.orient=c,c==="vertical"?(L=(x!=null?x*u:S.x)+I.sy,P=(w!=null?w*f:S.y)+S.dy,R=(C!=null?C*u:T.x)+I.ty,E=M!=null?M*f:T.y,N=L,O=P*(1-_)+E*_,B=R,F=P*_+E*(1-_)):(L=(x!=null?x*u:S.x)+S.dx,P=(w!=null?w*f:S.y)+I.sy,R=C!=null?C*u:T.x,E=(M!=null?M*f:T.y)+I.ty,N=L*(1-_)+R*_,O=P,B=L*_+R*(1-_),F=E),d.setShape({x1:L,y1:P,x2:R,y2:E,cpx1:N,cpy1:O,cpx2:B,cpy2:F}),d.useStyle(m.getItemStyle()),zS(d.style,c,p);var H=""+y.get("value"),U=ne(y,"edgeLabel");ve(d,U,{labelFetcher:{getFormattedLabel:function(it,Lt,Wt,vt,tt,pt){return t.getFormattedLabel(it,Lt,"edge",vt,Vr(tt,U.normal&&U.normal.get("formatter"),H),pt)}},labelDataIndex:p.dataIndex,defaultText:H}),d.setTextConfig({position:"inside"});var K=y.getModel("emphasis");he(d,y,"lineStyle",function(it){var Lt=it.getItemStyle();return zS(Lt,c,p),Lt}),s.add(d),v.setItemGraphicEl(p.dataIndex,d);var Q=K.get("focus");Ht(d,Q==="adjacency"?p.getAdjacentDataIndices():Q==="trajectory"?p.getTrajectoryDataIndices():Q,K.get("blurScope"),K.get("disabled"))}),o.eachNode(function(p){var d=p.getLayout(),g=p.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),S=g.get(["itemStyle","borderRadius"])||0,b=new St({shape:{x:y!=null?y*u:d.x,y:m!=null?m*f:d.y,width:d.dx,height:d.dy,r:S},style:g.getModel("itemStyle").getItemStyle(),z2:10});ve(b,ne(g),{labelFetcher:{getFormattedLabel:function(w,T){return t.getFormattedLabel(w,T,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),b.disableLabelAnimation=!0,b.setStyle("fill",p.getVisual("color")),b.setStyle("decal",p.getVisual("style").decal),he(b,g),s.add(b),h.setItemGraphicEl(p.dataIndex,b),nt(b).dataType="node";var x=_.get("focus");Ht(b,x==="adjacency"?p.getAdjacentDataIndices():x==="trajectory"?p.getTrajectoryDataIndices():x,_.get("blurScope"),_.get("disabled"))}),h.eachItemGraphicEl(function(p,d){var g=h.getItemModel(d);g.get("draggable")&&(p.drift=function(y,m){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:h.getRawIndex(d),localX:this.shape.x/u,localY:this.shape.y/f})},p.ondragend=function(){i._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(u3(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(Rt);function zS(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var a=t.node1.getVisual("color"),n=t.node2.getVisual("color");Y(a)&&Y(n)&&(r.fill=new fl(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function u3(r,e,t){var a=new St({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return zt(a,{shape:{width:r.width+20}},e,t),a}var f3=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Mt(o[l],this,a));var u=lM(i,n,this,!0,f);return u.data;function f(h,v){h.wrapMethod("getItemModel",function(c,p){var d=c.parentModel,g=d.getData().getItemLayout(p);if(g){var y=g.depth,m=d.levelModels[y];m&&(c.parentModel=m)}return c}),v.wrapMethod("getItemModel",function(c,p){var d=c.parentModel,g=d.getGraph().getEdgeByIndex(p),y=g.node1.getLayout();if(y){var m=y.depth,_=d.levelModels[m];_&&(c.parentModel=_)}return c})}},e.prototype.setNodePosition=function(t,a){var n=this.option.data||this.option.nodes,i=n[t];i.localX=a[0],i.localY=a[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,n){function i(c){return isNaN(c)||c==null}if(n==="edge"){var o=this.getDataParams(t,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return ie("nameValue",{name:u,value:l,noValue:i(l)})}else{var f=this.getGraph().getNodeByIndex(t),h=f.getLayout().value,v=this.getDataParams(t,n).data.name;return ie("nameValue",{name:v!=null?v+"":null,value:h,noValue:i(h)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,a){var n=r.prototype.getDataParams.call(this,t,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;n.value=o}return n},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Vt);function h3(r,e){r.eachSeriesByType("sankey",function(t){var a=t.get("nodeWidth"),n=t.get("nodeGap"),i=v3(t,e);t.layoutInfo=i;var o=i.width,s=i.height,l=t.getGraph(),u=l.nodes,f=l.edges;p3(u);var h=Ct(u,function(d){return d.getLayout().value===0}),v=h.length!==0?0:t.get("layoutIterations"),c=t.get("orient"),p=t.get("nodeAlign");c3(u,f,a,n,o,s,v,c,p)})}function v3(r,e){return Qt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function c3(r,e,t,a,n,i,o,s,l){d3(r,e,t,n,i,s,l),_3(r,e,i,n,a,o,s),M3(r,s)}function p3(r){D(r,function(e){var t=Wa(e.outEdges,Pf),a=Wa(e.inEdges,Pf),n=e.getValue()||0,i=Math.max(t,a,n);e.setLayout({value:i},!0)})}function d3(r,e,t,a,n,i,o){for(var s=[],l=[],u=[],f=[],h=0,v=0;v=0;y&&g.depth>c&&(c=g.depth),d.setLayout({depth:y?g.depth:h},!0),i==="vertical"?d.setLayout({dy:t},!0):d.setLayout({dx:t},!0);for(var m=0;mh-1?c:h-1;o&&o!=="left"&&g3(r,o,i,w);var T=i==="vertical"?(n-t)/w:(a-t)/w;m3(r,T,i)}function DM(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function g3(r,e,t,a){if(e==="right"){for(var n=[],i=r,o=0;i.length;){for(var s=0;s0;i--)l*=.99,b3(s,l,o),Tc(s,n,t,a,o),D3(s,l,o),Tc(s,n,t,a,o)}function S3(r,e){var t=[],a=e==="vertical"?"y":"x",n=Ap(r,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,o){return i-o}),D(n.keys,function(i){t.push(n.buckets.get(i))}),t}function x3(r,e,t,a,n,i){var o=1/0;D(r,function(s){var l=s.length,u=0;D(s,function(h){u+=h.getLayout().value});var f=i==="vertical"?(a-(l-1)*n)/u:(t-(l-1)*n)/u;f0&&(s=l.getLayout()[i]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]+l.getLayout()[v]+e;var p=n==="vertical"?a:t;if(u=f-e-p,u>0){s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),f=s;for(var c=h-2;c>=0;--c)l=o[c],u=l.getLayout()[i]+l.getLayout()[v]+e-f,u>0&&(s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]}})}function b3(r,e,t){D(r.slice().reverse(),function(a){D(a,function(n){if(n.outEdges.length){var i=Wa(n.outEdges,w3,t)/Wa(n.outEdges,Pf);if(isNaN(i)){var o=n.outEdges.length;i=o?Wa(n.outEdges,T3,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-Ka(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Ka(n,t))*e;n.setLayout({y:l},!0)}}})})}function w3(r,e){return Ka(r.node2,e)*r.getValue()}function T3(r,e){return Ka(r.node2,e)}function A3(r,e){return Ka(r.node1,e)*r.getValue()}function C3(r,e){return Ka(r.node1,e)}function Ka(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Pf(r){return r.getValue()}function Wa(r,e,t){for(var a=0,n=r.length,i=-1;++io&&(o=l)}),D(a,function(s){var l=new ae({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),f=s.getModel().get(["itemStyle","color"]);f!=null?(s.setVisual("color",f),s.setVisual("style",{fill:f})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&D(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function L3(r){r.registerChartView(l3),r.registerSeriesModel(f3),r.registerLayout(h3),r.registerVisual(I3),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){a.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var MM=function(){function r(){}return r.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},r.prototype.getInitialData=function(e,t){var a,n=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",a=n.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",a=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],f=e.layout==="horizontal"?0:1,h=this._baseAxisDim=u[f],v=u[1-f],c=[n,i],p=c[f].get("type"),d=c[1-f].get("type"),g=e.data;if(g&&l){var y=[];D(g,function(S,b){var x;z(S)?(x=S.slice(),S.unshift(b)):z(S.value)?(x=V({},S),x.value=x.value.slice(),S.value.unshift(b)):x=S,y.push(x)}),e.data=y}var m=this.defaultValueDimensions,_=[{name:h,type:Sf(p),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:v,type:Sf(d),dimsDef:m.slice()}];return Ao(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:lt(iA,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),IM=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(Vt);Kt(IM,MM,!0);var P3=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var f=i.getItemLayout(u),h=GS(f,i,u,l,!0);i.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,f){var h=s.getItemGraphicEl(f);if(!i.hasValue(u)){o.remove(h);return}var v=i.getItemLayout(u);h?(xr(h),LM(v,h,i,u)):h=GS(v,i,u,l),o.add(h),i.setItemGraphicEl(u,h)}).remove(function(u){var f=s.getItemGraphicEl(u);f&&o.remove(f)}).execute(),this._data=i},e.prototype.remove=function(t){var a=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&a.remove(i)})},e.type="boxplot",e}(Rt),R3=function(){function r(){}return r}(),E3=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="boxplotBoxPath",a}return e.prototype.getDefaultShape=function(){return new R3},e.prototype.buildPath=function(t,a){var n=a.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();id){var S=[y,_];a.push(S)}}}return{boxData:t,outliers:a}}var G3={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==me){var a="";At(a)}var n=z3(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function F3(r){r.registerSeriesModel(IM),r.registerChartView(P3),r.registerLayout(O3),r.registerTransform(G3)}var H3=["itemStyle","borderColor"],W3=["itemStyle","borderColor0"],U3=["itemStyle","borderColorDoji"],Y3=["itemStyle","color"],X3=["itemStyle","color0"];function wy(r,e){return e.get(r>0?Y3:X3)}function Ty(r,e){return e.get(r===0?U3:r>0?H3:W3)}var Z3={seriesType:"candlestick",plan:xo(),performRawSeries:!0,reset:function(r,e){if(!e.isSeriesFiltered(r)){var t=r.pipelineContext.large;return!t&&{progress:function(a,n){for(var i;(i=a.next())!=null;){var o=n.getItemModel(i),s=n.getItemLayout(i).sign,l=o.getItemStyle();l.fill=wy(s,o),l.stroke=Ty(s,o)||l.fill;var u=n.ensureUniqueItemVisual(i,"style");V(u,l)}}}}}},$3=["color","borderColor"],q3=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,a,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,a,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,a):this._incrementalRenderNormal(t,a)},e.prototype.eachRendered=function(t){Qa(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var a=t.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(t){var a=t.getData(),n=this._data,i=this.group,o=a.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),a.diff(n).add(function(f){if(a.hasValue(f)){var h=a.getItemLayout(f);if(s&&FS(u,h))return;var v=Ac(h,f,!0);zt(v,{shape:{points:h.ends}},t,f),Cc(v,a,f,o),i.add(v),a.setItemGraphicEl(f,v)}}).update(function(f,h){var v=n.getItemGraphicEl(h);if(!a.hasValue(f)){i.remove(v);return}var c=a.getItemLayout(f);if(s&&FS(u,c)){i.remove(v);return}v?(Tt(v,{shape:{points:c.ends}},t,f),xr(v)):v=Ac(c),Cc(v,a,f,o),i.add(v),a.setItemGraphicEl(f,v)}).remove(function(f){var h=n.getItemGraphicEl(f);h&&i.remove(h)}).execute(),this._data=a},e.prototype._renderLarge=function(t){this._clear(),HS(t,this.group);var a=t.get("clip",!0)?_l(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,a){for(var n=a.getData(),i=n.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=n.getItemLayout(o),l=Ac(s);Cc(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,a){HS(a,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Rt),K3=function(){function r(){}return r}(),J3=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="normalCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new K3},e.prototype.buildPath=function(t,a){var n=a.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(gt);function Ac(r,e,t){var a=r.ends;return new J3({shape:{points:t?Q3(a,r):a},z2:100})}function FS(r,e){for(var t=!0,a=0;ab?M[i]:C[i],ends:P,brushRect:B(x,w,_)})}function N(H,U){var K=[];return K[n]=U,K[i]=H,isNaN(U)||isNaN(H)?[NaN,NaN]:e.dataToPoint(K)}function O(H,U,K){var Q=U.slice(),it=U.slice();Q[n]=Vu(Q[n]+a/2,1,!1),it[n]=Vu(it[n]-a/2,1,!0),K?H.push(Q,it):H.push(it,Q)}function B(H,U,K){var Q=N(H,K),it=N(U,K);return Q[n]-=a/2,it[n]-=a/2,{x:Q[0],y:Q[1],width:a,height:it[1]-Q[1]}}function F(H){return H[n]=Vu(H[n],1),H}}function p(d,g){for(var y=Nr(d.count*4),m=0,_,S=[],b=[],x,w=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(x=d.next())!=null;){var A=w.get(s,x),C=w.get(u,x),M=w.get(f,x),I=w.get(h,x),L=w.get(v,x);if(isNaN(A)||isNaN(I)||isNaN(L)){y[m++]=NaN,m+=3;continue}y[m++]=WS(w,x,C,M,f,T),S[n]=A,S[i]=I,_=e.dataToPoint(S,null,b),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,S[i]=L,_=e.dataToPoint(S,null,b),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function WS(r,e,t,a,n,i){var o;return t>a?o=-1:t0?r.get(n,e-1)<=a?1:-1:1,o}function r4(r,e){var t=r.getBaseAxis(),a,n=t.type==="category"?t.getBandWidth():(a=t.getExtent(),Math.abs(a[1]-a[0])/e.count()),i=W(st(r.get("barMaxWidth"),n),n),o=W(st(r.get("barMinWidth"),1),n),s=r.get("barWidth");return s!=null?W(s,n):Math.max(Math.min(n/2,i),o)}function a4(r){r.registerChartView(q3),r.registerSeriesModel(PM),r.registerPreprocessor(t4),r.registerVisual(Z3),r.registerLayout(e4)}function US(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var n4=function(r){k(e,r);function e(t,a){var n=r.call(this)||this,i=new yl(t,a),o=new at;return n.add(i),n.add(o),n.updateData(t,a),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var a=t.symbolType,n=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(i)/f*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var v=void 0;J(h)?v=h(n):v=h,i.__t>0&&(v=-s*i.__t),this._animateSymbol(i,s,v,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,a,n,i,o){if(a>0){t.__t=0;var s=this,l=t.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return Pa(t.__p1,t.__cp1)+Pa(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,a){t.__p1=a[0],t.__p2=a[1],t.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},e.prototype.updateData=function(t,a,n){this.childAt(0).updateData(t,a,n),this._updateEffectSymbol(t,a)},e.prototype._updateSymbolPosition=function(t){var a=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=oe,f=fp;s[0]=u(a[0],i[0],n[0],o),s[1]=u(a[1],i[1],n[1],o);var h=t.__t<1?f(a[0],i[0],n[0],o):f(n[0],i[0],a[0],1-o),v=t.__t<1?f(a[1],i[1],n[1],o):f(n[1],i[1],a[1],1-o);t.rotation=-Math.atan2(v,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(i[l]<=a);l--);l=Math.min(l,o-2)}else{for(l=s;la);l++);l=Math.min(l-1,o-2)}var f=(a-i[l])/(i[l+1]-i[l]),h=n[l],v=n[l+1];t.x=h[0]*(1-f)+f*v[0],t.y=h[1]*(1-f)+f*v[1];var c=t.__t<1?v[0]-h[0]:h[0]-v[0],p=t.__t<1?v[1]-h[1]:h[1]-v[1];t.rotation=-Math.atan2(p,c)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,t.ignore=!1}},e}(RM),u4=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),f4=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new u4},e.prototype.buildPath=function(t,a){var n=a.segs,i=a.curveness,o;if(a.polyline)for(o=this._off;o0){t.moveTo(n[o++],n[o++]);for(var l=1;l0){var c=(u+h)/2-(f-v)*i,p=(f+v)/2-(h-u)*i;t.quadraticCurveTo(c,p,h,v)}else t.lineTo(h,v)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,a){var n=this.shape,i=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u0)for(var h=i[u++],v=i[u++],c=1;c0){var g=(h+p)/2-(v-d)*o,y=(v+d)/2-(p-h)*o;if(iT(h,v,g,y,p,d,s,t,a))return l}else if(Ia(h,v,p,d,s,t,a))return l;l++}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,n=a.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),kM={seriesType:"lines",plan:xo(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(n,i){var o=[];if(a){var s=void 0,l=n.end-n.start;if(t){for(var u=0,f=n.start;f0&&(f||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var h=t.get("clip",!0)&&_l(t.coordinateSystem,!1,t);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._lineDraw.incrementalUpdate(t,a.getData()),this._finished=t.end===a.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,a,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=kM.reset(t,a,n);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,a){var n=this._lineDraw,i=this._showEffect(a),o=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new h4:new dy(o?i?l4:EM:i?RM:py),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var a=t.getZr(),n=a.painter.getType()==="svg";!n&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},e.prototype.dispose=function(t,a){this.remove(t,a)},e.type="lines",e}(Rt),c4=typeof Uint32Array>"u"?Array:Uint32Array,p4=typeof Float64Array>"u"?Array:Float64Array;function YS(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=G(e,function(t){var a=[t[0].coord,t[1].coord],n={coords:a};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),$d([n,t[0],t[1]])}))}var d4=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],YS(t);var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(YS(t),t.data){var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var a=this._processFlatCoordsArray(t.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=Ls(this._flatCoords,a.flatCoords),this._flatCoordsOffset=Ls(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),t.data=new Float32Array(a.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var a=this.getData().getItemModel(t),n=a.option instanceof Array?a.option:a.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,a){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),a=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&a>0?a+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(Vt);function mu(r){return r instanceof Array||(r=[r,r]),r}var g4={seriesType:"lines",reset:function(r){var e=mu(r.get("symbol")),t=mu(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",e&&e[0]),a.setVisual("toSymbol",e&&e[1]),a.setVisual("fromSymbolSize",t&&t[0]),a.setVisual("toSymbolSize",t&&t[1]);function n(i,o){var s=i.getItemModel(o),l=mu(s.getShallow("symbol",!0)),u=mu(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?n:null}}};function y4(r){r.registerChartView(v4),r.registerSeriesModel(d4),r.registerLayout(kM),r.registerVisual(g4)}var m4=256,_4=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Ya.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,a,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),f=this.pointSize+this.blurSize,h=this.canvas,v=h.getContext("2d"),c=e.length;h.width=t,h.height=a;for(var p=0;p0){var I=o(_)?l:u;_>0&&(_=_*C+T),b[x++]=I[M],b[x++]=I[M+1],b[x++]=I[M+2],b[x++]=I[M+3]*_*256}else x+=4}return v.putImageData(S,0,0),h},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Ya.createCanvas()),t=this.pointSize+this.blurSize,a=t*2;e.width=a,e.height=a;var n=e.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-t,t,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),e},r.prototype._getGradient=function(e,t){for(var a=this._gradientPixels,n=a[t]||(a[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r}();function S4(r,e,t){var a=r[1]-r[0];e=G(e,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var n=e.length,i=0;return function(o){var s;for(s=i;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s=e[0]&&a<=e[1]}}function XS(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var b4=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):XS(o)&&this._renderOnGeo(o,t,i,n)},e.prototype.incrementalPrepareRender=function(t,a,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,a,n,i){var o=a.coordinateSystem;o&&(XS(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(a,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Qa(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,a,n,i,o){var s=t.coordinateSystem,l=vi(s,"cartesian2d"),u,f,h,v;if(l){var c=s.getAxis("x"),p=s.getAxis("y");u=c.getBandWidth()+.5,f=p.getBandWidth()+.5,h=c.scale.getExtent(),v=p.scale.getExtent()}for(var d=this.group,g=t.getData(),y=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),_=t.getModel(["select","itemStyle"]).getItemStyle(),S=t.get(["itemStyle","borderRadius"]),b=ne(t),x=t.getModel("emphasis"),w=x.get("focus"),T=x.get("blurScope"),A=x.get("disabled"),C=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],M=n;Mh[1]||Rv[1])continue;var E=s.dataToPoint([P,R]);I=new St({shape:{x:E[0]-u/2,y:E[1]-f/2,width:u,height:f},style:L})}else{if(isNaN(g.get(C[1],M)))continue;I=new St({z2:1,shape:s.dataToRect([g.get(C[0],M)]).contentShape,style:L})}if(g.hasItemOption){var N=g.getItemModel(M),O=N.getModel("emphasis");y=O.getModel("itemStyle").getItemStyle(),m=N.getModel(["blur","itemStyle"]).getItemStyle(),_=N.getModel(["select","itemStyle"]).getItemStyle(),S=N.get(["itemStyle","borderRadius"]),w=O.get("focus"),T=O.get("blurScope"),A=O.get("disabled"),b=ne(N)}I.shape.r=S;var B=t.getRawValue(M),F="-";B&&B[2]!=null&&(F=B[2]+""),ve(I,b,{labelFetcher:t,labelDataIndex:M,defaultOpacity:L.opacity,defaultText:F}),I.ensureState("emphasis").style=y,I.ensureState("blur").style=m,I.ensureState("select").style=_,Ht(I,w,T,A),I.incremental=o,o&&(I.states.emphasis.hoverLayer=!0),d.add(I),g.setItemGraphicEl(M,I),this._progressiveEls&&this._progressiveEls.push(I)}},e.prototype._renderOnGeo=function(t,a,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new _4;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var f=t.getViewRect().clone(),h=t.getRoamTransform();f.applyTransform(h);var v=Math.max(f.x,0),c=Math.max(f.y,0),p=Math.min(f.width+f.x,i.getWidth()),d=Math.min(f.height+f.y,i.getHeight()),g=p-v,y=d-c,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(w,T,A){var C=t.dataToPoint([w,T]);return C[0]-=v,C[1]-=c,C.push(A),C}),S=n.getExtent(),b=n.type==="visualMap.continuous"?x4(S,n.option.range):S4(S,n.getPieceList(),n.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var x=new le({style:{width:g,height:y,x:v,y:c,image:u.canvas},silent:!0});this.group.add(x)},e.type="heatmap",e}(Rt),w4=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return ga(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=cl.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(Vt);function T4(r){r.registerChartView(b4),r.registerSeriesModel(w4)}var A4=["itemStyle","borderWidth"],ZS=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Ic=new da,C4=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),h=l.master.getRect(),v={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:f,valueDim:ZS[+f],categoryDim:ZS[1-+f]};o.diff(s).add(function(p){if(o.hasValue(p)){var d=qS(o,p),g=$S(o,p,d,v),y=KS(o,v,g);o.setItemGraphicEl(p,y),i.add(y),QS(y,v,g)}}).update(function(p,d){var g=s.getItemGraphicEl(d);if(!o.hasValue(p)){i.remove(g);return}var y=qS(o,p),m=$S(o,p,y,v),_=GM(o,m);g&&_!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(p,null),g=null),g?E4(g,v,m):g=KS(o,v,m,!0),o.setItemGraphicEl(p,g),g.__pictorialSymbolMeta=m,i.add(g),QS(g,v,m)}).remove(function(p){var d=s.getItemGraphicEl(p);d&&JS(s,p,d.__pictorialSymbolMeta.animationModel,d)}).execute();var c=t.get("clip",!0)?_l(t.coordinateSystem,!1,t):null;return c?i.setClipPath(c):i.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,a){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(o){JS(i,nt(o).dataIndex,t,o)}):n.removeAll()},e.type="pictorialBar",e}(Rt);function $S(r,e,t,a){var n=r.getItemLayout(e),i=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=t.get("symbolPatternSize")||2,h=t.isAnimationEnabled(),v={dataIndex:e,layout:n,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:h?t:null,hoverScale:h&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};D4(t,i,n,a,v),M4(r,e,n,i,o,v.boundingLength,v.pxSign,f,a,v),I4(t,v.symbolScale,u,a,v);var c=v.symbolSize,p=fi(t.get("symbolOffset"),c);return L4(t,c,n,i,o,p,s,v.valueLineWidth,v.boundingLength,v.repeatCutLength,a,v),v}function D4(r,e,t,a,n){var i=a.valueDim,o=r.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[i.wh]<=0),f;if(z(o)){var h=[Lc(s,o[0])-l,Lc(s,o[1])-l];h[1]=0?1:-1:f>0?1:-1}function Lc(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function M4(r,e,t,a,n,i,o,s,l,u){var f=l.valueDim,h=l.categoryDim,v=Math.abs(t[h.wh]),c=r.getItemVisual(e,"symbolSize"),p;z(c)?p=c.slice():c==null?p=["100%","100%"]:p=[c,c],p[h.index]=W(p[h.index],v),p[f.index]=W(p[f.index],a?v:Math.abs(i)),u.symbolSize=p;var d=u.symbolScale=[p[0]/s,p[1]/s];d[f.index]*=(l.isHorizontal?-1:1)*o}function I4(r,e,t,a,n){var i=r.get(A4)||0;i&&(Ic.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Ic.updateTransform(),i/=Ic.getLineScale(),i*=e[a.valueDim.index]),n.valueLineWidth=i||0}function L4(r,e,t,a,n,i,o,s,l,u,f,h){var v=f.categoryDim,c=f.valueDim,p=h.pxSign,d=Math.max(e[c.index]+s,0),g=d;if(a){var y=Math.abs(l),m=se(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var S=W(m,e[c.index]),b=Math.max(d+S*2,0),x=_?0:S*2,w=Yw(a),T=w?a:jS((y+x)/b),A=y-T*d;S=A/2/(_?T:Math.max(T-1,1)),b=d+S*2,x=_?0:S*2,!w&&a!=="fixed"&&(T=u?jS((Math.abs(u)+x)/b):0),g=T*b-x,h.repeatTimes=T,h.symbolMargin=S}var C=p*(g/2),M=h.pathPosition=[];M[v.index]=t[v.wh]/2,M[c.index]=o==="start"?C:o==="end"?l-C:l/2,i&&(M[0]+=i[0],M[1]+=i[1]);var I=h.bundlePosition=[];I[v.index]=t[v.xy],I[c.index]=t[c.xy];var L=h.barRectShape=V({},t);L[c.wh]=p*Math.max(Math.abs(t[c.wh]),Math.abs(M[c.index]+C)),L[v.wh]=t[v.wh];var P=h.clipShape={};P[v.xy]=-t[v.xy],P[v.wh]=f.ecSize[v.wh],P[c.xy]=0,P[c.wh]=t[c.wh]}function OM(r){var e=r.symbolPatternSize,t=qt(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function NM(r,e,t,a){var n=r.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,f=0,h=i[e.valueDim.index]+o+t.symbolMargin*2;for(Ay(r,function(d){d.__pictorialAnimationIndex=f,d.__pictorialRepeatTimes=u,f0:y<0)&&(m=u-1-d),g[l.index]=h*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function BM(r,e,t,a){var n=r.__pictorialBundle,i=r.__pictorialMainPath;i?Ji(i,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,a):(i=r.__pictorialMainPath=OM(t),n.add(i),Ji(i,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,a))}function VM(r,e,t){var a=V({},e.barRectShape),n=r.__pictorialBarRect;n?Ji(n,null,{shape:a},e,t):(n=r.__pictorialBarRect=new St({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function zM(r,e,t,a){if(t.symbolClip){var n=r.__pictorialClipPath,i=V({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(n)Tt(n,{shape:i},s,l);else{i[o.wh]=0,n=new St({shape:i}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=t.clipShape[o.wh],ui[a?"updateProps":"initProps"](n,{shape:u},s,l)}}}function qS(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=P4,t.isAnimationEnabled=R4,t}function P4(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function R4(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function KS(r,e,t,a){var n=new at,i=new at;return n.add(i),n.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?NM(n,e,t):BM(n,e,t),VM(n,t,a),zM(n,e,t,a),n.__pictorialShapeStr=GM(r,t),n.__pictorialSymbolMeta=t,n}function E4(r,e,t){var a=t.animationModel,n=t.dataIndex,i=r.__pictorialBundle;Tt(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},a,n),t.symbolRepeat?NM(r,e,t,!0):BM(r,e,t,!0),VM(r,t,!0),zM(r,e,t,!0)}function JS(r,e,t,a){var n=a.__pictorialBarRect;n&&n.removeTextContent();var i=[];Ay(a,function(o){i.push(o)}),a.__pictorialMainPath&&i.push(a.__pictorialMainPath),a.__pictorialClipPath&&(t=null),D(i,function(o){Za(o,{scaleX:0,scaleY:0},t,e,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(e,null)}function GM(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Ay(r,e,t){D(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&e.call(t,a)})}function Ji(r,e,t,a,n,i){e&&r.attr(e),a.symbolClip&&!n?t&&r.attr(t):t&&ui[n?"updateProps":"initProps"](r,t,a.animationModel,a.dataIndex,i)}function QS(r,e,t){var a=t.dataIndex,n=t.itemModel,i=n.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),f=i.get("focus"),h=i.get("blurScope"),v=i.get("scale");Ay(r,function(d){if(d instanceof le){var g=d.style;d.useStyle(V({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else d.useStyle(t.style);var y=d.ensureState("emphasis");y.style=o,v&&(y.scaleX=d.scaleX*1.1,y.scaleY=d.scaleY*1.1),d.ensureState("blur").style=s,d.ensureState("select").style=l,u&&(d.cursor=u),d.z2=t.z2});var c=e.valueDim.posDesc[+(t.boundingLength>0)],p=r.__pictorialBarRect;p.ignoreClip=!0,ve(p,ne(n),{labelFetcher:e.seriesModel,labelDataIndex:a,defaultText:no(e.seriesModel.getData(),a),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:c}),Ht(r,f,h,i.get("disabled"))}function jS(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var k4=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=ja($s.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}($s);function O4(r){r.registerChartView(C4),r.registerSeriesModel(k4),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,lt(wC,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,TC("pictorialBar"))}var N4=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),f=u.rect,h=u.boundaryGap;s.x=0,s.y=f.y+h[0];function v(g){return g.name}var c=new fa(this._layersSeries||[],l,v,v),p=[];c.add(X(d,this,"add")).update(X(d,this,"update")).remove(X(d,this,"remove")).execute();function d(g,y,m){var _=o._layers;if(g==="remove"){s.remove(_[y]);return}for(var S=[],b=[],x,w=l[y].indices,T=0;Ti&&(i=s),a.push(s)}for(var u=0;ui&&(i=h)}return{y0:n,max:i}}function F4(r){r.registerChartView(N4),r.registerSeriesModel(V4),r.registerLayout(z4),r.registerProcessor(xl("themeRiver"))}var H4=2,W4=4,ex=function(r){k(e,r);function e(t,a,n,i){var o=r.call(this)||this;o.z2=H4,o.textConfig={inside:!0},nt(o).seriesIndex=a.seriesIndex;var s=new bt({z2:W4,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,a,n,i),o}return e.prototype.updateData=function(t,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;nt(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),f=a.getLayout(),h=V({},f);h.label=null;var v=a.getVisual("style");v.lineJoin="bevel";var c=a.getVisual("decal");c&&(v.decal=ro(c,o));var p=Wn(l.getModel("itemStyle"),h,!0);V(h,p),D(De,function(m){var _=s.ensureState(m),S=l.getModel([m,"itemStyle"]);_.style=S.getItemStyle();var b=Wn(S,h);b&&(_.shape=b)}),t?(s.setShape(h),s.shape.r=f.r0,zt(s,{shape:{r:f.r}},n,a.dataIndex)):(Tt(s,{shape:h},n),xr(s)),s.useStyle(v),this._updateLabel(n);var d=l.getShallow("cursor");d&&s.attr("cursor",d),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="relative"?Ls(a.getAncestorsIndices(),a.getDescendantIndices()):g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;Ht(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var a=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),f=Math.sin(l),h=this,v=h.getTextContent(),c=this.node.dataIndex,p=i.get("minAngle")/180*Math.PI,d=i.get("show")&&!(p!=null&&Math.abs(s)P&&!ks(E-P)&&E0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,a,n):(o.virtualPiece=new ex(m,t,a,n),f.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(S){o._rootToNode(_.parentNode)})):o.virtualPiece&&(f.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var f=l.get("target",!0)||"_blank";vf(u,f)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Ad,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e}(Rt),Z4=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};FM(n);var i=this._levelModels=G(t.levels||[],function(l){return new Mt(l,this,a)},this),o=ly.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,f){var h=o.getNodeByDataIndex(f),v=i[h.depth];return v&&(u.parentModel=v),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treePathInfo=Ch(n,this),a},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){XD(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(Vt);function FM(r){var e=0;D(r.children,function(a){FM(a);var n=a.value;z(n)&&(n=n[0]),e+=n});var t=r.value;z(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),z(r.value)?r.value[0]=t:r.value=t}var ax=Math.PI/180;function $4(r,e,t){e.eachSeriesByType(r,function(a){var n=a.get("center"),i=a.get("radius");z(i)||(i=[0,i]),z(n)||(n=[n,n]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=W(n[0],o),f=W(n[1],s),h=W(i[0],l/2),v=W(i[1],l/2),c=-a.get("startAngle")*ax,p=a.get("minAngle")*ax,d=a.getData().tree.root,g=a.getViewRoot(),y=g.depth,m=a.get("sort");m!=null&&HM(g,m);var _=0;D(g.children,function(E){!isNaN(E.getValue())&&_++});var S=g.getValue(),b=Math.PI/(S||_)*2,x=g.depth>0,w=g.height-(x?-1:1),T=(v-h)/(w||1),A=a.get("clockwise"),C=a.get("stillShowZeroSum"),M=A?1:-1,I=function(E,N){if(E){var O=N;if(E!==d){var B=E.getValue(),F=S===0&&C?b:B*b;F1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return a.depth>1&&Y(s)&&(s=cp(s,(a.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(a){var n=a.getData(),i=n.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");V(u,l)})})}function J4(r){r.registerChartView(X4),r.registerSeriesModel(Z4),r.registerLayout(lt($4,"sunburst")),r.registerProcessor(lt(xl,"sunburst")),r.registerVisual(K4),Y4(r)}var nx={color:"fill",borderColor:"stroke"},Q4={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},na=xt(),j4=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,a){return ga(null,this)},e.prototype.getDataParams=function(t,a,n){var i=r.prototype.getDataParams.call(this,t,a);return n&&(i.info=na(n).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Vt);function tH(r,e){return e=e||[0,0],G(["x","y"],function(t,a){var n=this.getAxis(t),i=e[a],o=r[a]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function eH(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:X(tH,r)}}}function rH(r,e){return e=e||[0,0],G([0,1],function(t){var a=e[t],n=r[t]/2,i=[],o=[];return i[t]=a-n,o[t]=a+n,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function aH(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:X(rH,r)}}}function nH(r,e){var t=this.getAxis(),a=e instanceof Array?e[0]:e,n=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(a-n)-t.dataToCoord(a+n))}function iH(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:X(nH,r)}}}function oH(r,e){return e=e||[0,0],G(["Radius","Angle"],function(t,a){var n="get"+t+"Axis",i=this[n](),o=e[a],s=r[a]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function sH(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(n){var i=e.dataToRadius(n[0]),o=t.dataToAngle(n[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:X(oH,r)}}}function lH(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(a,n){return r.dataToPoint(a,n)}}}}function WM(r,e,t,a){return r&&(r.legacy||r.legacy!==!1&&!t&&!a&&e!=="tspan"&&(e==="text"||Z(r,"text")))}function UM(r,e,t){var a=r,n,i,o;if(e==="text")o=a;else{o={},Z(a,"text")&&(o.text=a.text),Z(a,"rich")&&(o.rich=a.rich),Z(a,"textFill")&&(o.fill=a.textFill),Z(a,"textStroke")&&(o.stroke=a.textStroke),Z(a,"fontFamily")&&(o.fontFamily=a.fontFamily),Z(a,"fontSize")&&(o.fontSize=a.fontSize),Z(a,"fontStyle")&&(o.fontStyle=a.fontStyle),Z(a,"fontWeight")&&(o.fontWeight=a.fontWeight),i={type:"text",style:o,silent:!0},n={};var s=Z(a,"textPosition");t?n.position=s?a.textPosition:"inside":s&&(n.position=a.textPosition),Z(a,"textPosition")&&(n.position=a.textPosition),Z(a,"textOffset")&&(n.offset=a.textOffset),Z(a,"textRotation")&&(n.rotation=a.textRotation),Z(a,"textDistance")&&(n.distance=a.textDistance)}return ix(o,r),D(o.rich,function(l){ix(l,l)}),{textConfig:n,textContent:i}}function ix(r,e){e&&(e.font=e.textFont||e.font,Z(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),Z(e,"textAlign")&&(r.align=e.textAlign),Z(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),Z(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),Z(e,"textWidth")&&(r.width=e.textWidth),Z(e,"textHeight")&&(r.height=e.textHeight),Z(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),Z(e,"textPadding")&&(r.padding=e.textPadding),Z(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),Z(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),Z(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),Z(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),Z(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),Z(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),Z(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function ox(r,e,t){var a=r;a.textPosition=a.textPosition||t.position||"inside",t.offset!=null&&(a.textOffset=t.offset),t.rotation!=null&&(a.textRotation=t.rotation),t.distance!=null&&(a.textDistance=t.distance);var n=a.textPosition.indexOf("inside")>=0,i=r.fill||"#000";sx(a,e);var o=a.textFill==null;return n?o&&(a.textFill=t.insideFill||"#fff",!a.textStroke&&t.insideStroke&&(a.textStroke=t.insideStroke),!a.textStroke&&(a.textStroke=i),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=r.fill||t.outsideFill||"#000"),!a.textStroke&&t.outsideStroke&&(a.textStroke=t.outsideStroke)),a.text=e.text,a.rich=e.rich,D(e.rich,function(s){sx(s,s)}),a}function sx(r,e){e&&(Z(e,"fill")&&(r.textFill=e.fill),Z(e,"stroke")&&(r.textStroke=e.fill),Z(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),Z(e,"font")&&(r.font=e.font),Z(e,"fontStyle")&&(r.fontStyle=e.fontStyle),Z(e,"fontWeight")&&(r.fontWeight=e.fontWeight),Z(e,"fontSize")&&(r.fontSize=e.fontSize),Z(e,"fontFamily")&&(r.fontFamily=e.fontFamily),Z(e,"align")&&(r.textAlign=e.align),Z(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),Z(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),Z(e,"width")&&(r.textWidth=e.width),Z(e,"height")&&(r.textHeight=e.height),Z(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),Z(e,"padding")&&(r.textPadding=e.padding),Z(e,"borderColor")&&(r.textBorderColor=e.borderColor),Z(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),Z(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),Z(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),Z(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),Z(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),Z(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),Z(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),Z(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),Z(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),Z(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var YM={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},lx=_t(YM);Gr(Hr,function(r,e){return r[e]=1,r},{});Hr.join(", ");var Rf=["","style","shape","extra"],so=xt();function Cy(r,e,t,a,n){var i=r+"Animation",o=po(r,a,n)||{},s=so(e).userDuring;return o.duration>0&&(o.during=s?X(cH,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),V(o,t[i]),o}function Uu(r,e,t,a){a=a||{};var n=a.dataIndex,i=a.isInit,o=a.clearStyle,s=t.isAnimationEnabled(),l=so(r),u=e.style;l.userDuring=e.during;var f={},h={};if(dH(r,e,h),fx("shape",e,h),fx("extra",e,h),!i&&s&&(pH(r,e,f),ux("shape",r,e,f),ux("extra",r,e,f),gH(r,e,u,f)),h.style=u,uH(r,h,o),hH(r,e),s)if(i){var v={};D(Rf,function(p){var d=p?e[p]:e;d&&d.enterFrom&&(p&&(v[p]=v[p]||{}),V(p?v[p]:v,d.enterFrom))});var c=Cy("enter",r,e,t,n);c.duration>0&&r.animateFrom(v,c)}else fH(r,e,n||0,t,f);XM(r,e),u?r.dirty():r.markRedraw()}function XM(r,e){for(var t=so(r).leaveToProps,a=0;a0&&r.animateFrom(n,i)}}function hH(r,e){Z(e,"silent")&&(r.silent=e.silent),Z(e,"ignore")&&(r.ignore=e.ignore),r instanceof or&&Z(e,"invisible")&&(r.invisible=e.invisible),r instanceof gt&&Z(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var Ir={},vH={setTransform:function(r,e){return Ir.el[r]=e,this},getTransform:function(r){return Ir.el[r]},setShape:function(r,e){var t=Ir.el,a=t.shape||(t.shape={});return a[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=Ir.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=Ir.el,a=t.style;return a&&(a[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=Ir.el.style;if(e)return e[r]},setExtra:function(r,e){var t=Ir.el.extra||(Ir.el.extra={});return t[r]=e,this},getExtra:function(r){var e=Ir.el.extra;if(e)return e[r]}};function cH(){var r=this,e=r.el;if(e){var t=so(e).userDuring,a=r.userDuring;if(t!==a){r.el=r.userDuring=null;return}Ir.el=e,a(vH)}}function ux(r,e,t,a){var n=t[r];if(n){var i=e[r],o;if(i){var s=t.transition,l=n.transition;if(l)if(!o&&(o=a[r]={}),Qn(l))V(o,i);else for(var u=Pt(l),f=0;f=0){!o&&(o=a[r]={});for(var c=_t(i),f=0;f=0)){var v=r.getAnimationStyleProps(),c=v?v.style:null;if(c){!i&&(i=a.style={});for(var p=_t(t),u=0;u=0?e.getStore().get(N,R):void 0}var O=e.get(E.name,R),B=E&&E.ordinalMeta;return B?B.categories[O]:O}function x(P,R){R==null&&(R=u);var E=e.getItemVisual(R,"style"),N=E&&E.fill,O=E&&E.opacity,B=m(R,Va).getItemStyle();N!=null&&(B.fill=N),O!=null&&(B.opacity=O);var F={inheritColor:Y(N)?N:"#000"},H=_(R,Va),U=Bt(H,null,F,!1,!0);U.text=H.getShallow("show")?st(r.getFormattedLabel(R,Va),no(e,R)):null;var K=ff(H,F,!1);return A(P,B),B=ox(B,U,K),P&&T(B,P),B.legacy=!0,B}function w(P,R){R==null&&(R=u);var E=m(R,ia).getItemStyle(),N=_(R,ia),O=Bt(N,null,null,!0,!0);O.text=N.getShallow("show")?Vr(r.getFormattedLabel(R,ia),r.getFormattedLabel(R,Va),no(e,R)):null;var B=ff(N,null,!0);return A(P,E),E=ox(E,O,B),P&&T(E,P),E.legacy=!0,E}function T(P,R){for(var E in R)Z(R,E)&&(P[E]=R[E])}function A(P,R){P&&(P.textFill&&(R.textFill=P.textFill),P.textPosition&&(R.textPosition=P.textPosition))}function C(P,R){if(R==null&&(R=u),Z(nx,P)){var E=e.getItemVisual(R,"style");return E?E[nx[P]]:null}if(Z(Q4,P))return e.getItemVisual(R,P)}function M(P){if(i.type==="cartesian2d"){var R=i.getBaseAxis();return dN(j({axis:R},P))}}function I(){return t.getCurrentSeriesIndices()}function L(P){return mg(P,t)}}function CH(r){var e={};return D(r.dimensions,function(t){var a=r.getDimensionInfo(t);if(!a.isExtraCoord){var n=a.coordDim,i=e[n]=e[n]||[];i[a.coordDimIndex]=r.getDimensionIndex(t)}}),e}function kc(r,e,t,a,n,i,o){if(!a){i.remove(e);return}var s=Py(r,e,t,a,n,i);return s&&o.setItemGraphicEl(t,s),s&&Ht(s,a.focus,a.blurScope,a.emphasisDisabled),s}function Py(r,e,t,a,n,i){var o=-1,s=e;e&&KM(e,a,n)&&(o=ct(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=Iy(a),s&&bH(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),$e.normal.cfg=$e.normal.conOpt=$e.emphasis.cfg=$e.emphasis.conOpt=$e.blur.cfg=$e.blur.conOpt=$e.select.cfg=$e.select.conOpt=null,$e.isLegacy=!1,MH(u,t,a,n,l,$e),DH(u,t,a,n,l),Ly(r,u,t,a,$e,n,l),Z(a,"info")&&(na(u).info=a.info);for(var f=0;f=0?i.replaceAt(u,o):i.add(u),u}function KM(r,e,t){var a=na(r),n=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&EH(i)&&JM(i)!==a.customPathData||n==="image"&&Z(o,"image")&&o.image!==a.customImagePath}function DH(r,e,t,a,n){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&KM(o,i,a)&&(o=null),o||(o=Iy(i),r.setClipPath(o)),Ly(null,o,e,i,null,a,n)}}function MH(r,e,t,a,n,i){if(!r.isGroup){vx(t,null,i),vx(t,ia,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var f=r.getTextContent();if(o===!1)f&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},f?f.clearStates():(f=Iy(o),r.setTextContent(f)),Ly(null,f,e,o,null,a,n);for(var h=o&&o.style,v=0;v=f;c--){var p=e.childAt(c);LH(e,p,n)}}}function LH(r,e,t){e&&Ih(e,na(r).option,t)}function PH(r){new fa(r.oldChildren,r.newChildren,cx,cx,r).add(px).update(px).remove(RH).execute()}function cx(r,e){var t=r&&r.name;return t??SH+e}function px(r,e){var t=this.context,a=r!=null?t.newChildren[r]:null,n=e!=null?t.oldChildren[e]:null;Py(t.api,n,t.dataIndex,a,t.seriesModel,t.group)}function RH(r){var e=this.context,t=e.oldChildren[r];t&&Ih(t,na(t).option,e.seriesModel)}function JM(r){return r&&(r.pathData||r.d)}function EH(r){return r&&(Z(r,"pathData")||Z(r,"d"))}function kH(r){r.registerChartView(wH),r.registerSeriesModel(j4)}var kn=xt(),dx=rt,Oc=X,Ey=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,a,n){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=a,!(!n&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,i,e,t,a);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=f;var h=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new at,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),a.getZr().add(s);else{var v=lt(gx,t,h);this.updatePointerEl(s,u,v),this.updateLabelEl(s,u,v,t)}mx(s,t,!0),this._renderHandle(i)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var a=t.get("animation"),n=e.axis,i=n.type==="category",o=t.get("snap");if(!o&&!i)return!1;if(a==="auto"||a==null){var s=this.animationThreshold;if(i&&n.getBandWidth()>s)return!0;if(o){var l=ey(e).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},r.prototype.makeElOption=function(e,t,a,n,i){},r.prototype.createPointerEl=function(e,t,a,n){var i=t.pointer;if(i){var o=kn(e).pointerEl=new ui[i.type](dx(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,a,n){if(t.label){var i=kn(e).labelEl=new bt(dx(t.label));e.add(i),yx(i,n)}},r.prototype.updatePointerEl=function(e,t,a){var n=kn(e).pointerEl;n&&t.pointer&&(n.setStyle(t.pointer.style),a(n,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,a,n){var i=kn(e).labelEl;i&&(i.setStyle(t.label.style),a(i,{x:t.label.x,y:t.label.y}),yx(i,n))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,a=this._api.getZr(),n=this._handle,i=t.getModel("handle"),o=t.get("status");if(!i.get("show")||!o||o==="hide"){n&&a.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=vl(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){oa(u.event)},onmousedown:Oc(this._onHandleDragMove,this,0,0),drift:Oc(this._onHandleDragMove,this),ondragend:Oc(this._onHandleDragEnd,this)}),a.add(n)),mx(n,t,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");z(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,bo(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){gx(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Nc(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var a=this._handle;if(a){this._dragging=!0;var n=this.updateHandleTransform(Nc(a),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=n,a.stopAnimation(),a.attr(Nc(n)),kn(a).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),a=this._group,n=this._handle;t&&a&&(this._lastGraphicKey=null,a&&t.remove(a),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),Hs(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,a){return a=a||0,{x:e[a],y:e[1-a],width:t[a],height:t[1-a]}},r}();function gx(r,e,t,a){QM(kn(t).lastProp,a)||(kn(t).lastProp=a,e?Tt(t,a,r):(t.stopAnimation(),t.attr(a)))}function QM(r,e){if(et(r)&&et(e)){var t=!0;return D(e,function(a,n){t=t&&QM(r[n],a)}),!!t}else return r===e}function yx(r,e){r[e.get(["label","show"])?"show":"hide"]()}function Nc(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function mx(r,e,t){var a=e.get("z"),n=e.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(a!=null&&(i.z=a),n!=null&&(i.zlevel=n),i.silent=t)})}function ky(r){var e=r.get("type"),t=r.getModel(e+"Style"),a;return e==="line"?(a=t.getLineStyle(),a.fill=null):e==="shadow"&&(a=t.getAreaStyle(),a.stroke=null),a}function jM(r,e,t,a,n){var i=t.get("value"),o=t2(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=mo(s.get("padding")||0),u=s.getFont(),f=il(o,u),h=n.position,v=f.width+l[1]+l[3],c=f.height+l[0]+l[2],p=n.align;p==="right"&&(h[0]-=v),p==="center"&&(h[0]-=v/2);var d=n.verticalAlign;d==="bottom"&&(h[1]-=c),d==="middle"&&(h[1]-=c/2),OH(h,v,c,a);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:Bt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function OH(r,e,t,a){var n=a.getWidth(),i=a.getHeight();r[0]=Math.min(r[0]+e,n)-e,r[1]=Math.min(r[1]+t,i)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function t2(r,e,t,a,n){r=e.scale.parse(r);var i=e.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:Ug(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};D(a,function(l){var u=t.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=u&&u.getDataParams(f);h&&s.seriesData.push(h)}),Y(o)?i=o.replace("{value}",i):J(o)&&(i=o(s))}return i}function Oy(r,e,t){var a=He();return si(a,a,t.rotation),Fr(a,a,t.position),_r([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],a)}function e2(r,e,t,a,n,i){var o=Ae.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=n.get(["label","margin"]),jM(e,a,n,i,{position:Oy(a.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Ny(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function r2(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function _x(r,e,t,a,n,i){return{cx:r,cy:e,r0:t,r:a,startAngle:n,endAngle:i,clockwise:!0}}var NH=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis,l=s.grid,u=i.get("type"),f=Sx(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var v=ky(i),c=BH[u](s,h,f);c.style=v,t.graphicKey=c.type,t.pointer=c}var p=sd(l.model,n);e2(a,t,p,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=sd(a.axis.grid.model,a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=Oy(a.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,n,i){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=Sx(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[t.x,t.y];h[f]+=a[f],h[f]=Math.min(l[1],h[f]),h[f]=Math.max(l[0],h[f]);var v=(u[1]+u[0])/2,c=[v,v];c[f]=h[f];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:c,tooltipOption:p[f]}},e}(Ey);function Sx(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var BH={line:function(r,e,t){var a=Ny([e,t[0]],[e,t[1]],xx(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=Math.max(1,r.getBandWidth()),n=t[1]-t[0];return{type:"Rect",shape:r2([e-a/2,t[0]],[a,n],xx(r))}}};function xx(r){return r.dim==="x"?0:1}var VH=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(mt),ta=xt(),zH=D;function a2(r,e,t){if(!yt.node){var a=e.getZr();ta(a).records||(ta(a).records={}),GH(a,e);var n=ta(a).records[r]||(ta(a).records[r]={});n.handler=t}}function GH(r,e){if(ta(r).initialized)return;ta(r).initialized=!0,t("click",lt(bx,"click")),t("mousemove",lt(bx,"mousemove")),t("globalout",HH);function t(a,n){r.on(a,function(i){var o=WH(e);zH(ta(r).records,function(s){s&&n(s,i,o.dispatchAction)}),FH(o.pendings,e)})}}function FH(r,e){var t=r.showTip.length,a=r.hideTip.length,n;t?n=r.showTip[t-1]:a&&(n=r.hideTip[a-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function HH(r,e,t){r.handler("leave",null,t)}function bx(r,e,t,a){e.handler(r,t,a)}function WH(r){var e={showTip:[],hideTip:[]},t=function(a){var n=e[a.type];n?n.push(a):(a.dispatchAction=t,r.dispatchAction(a))};return{dispatchAction:t,pendings:e}}function Md(r,e){if(!yt.node){var t=e.getZr(),a=(ta(t).records||{})[r];a&&(ta(t).records[r]=null)}}var UH=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=a.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";a2("axisPointer",n,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,a){Md("axisPointer",a)},e.prototype.dispose=function(t,a){Md("axisPointer",a)},e.type="axisPointer",e}(Ft);function n2(r,e){var t=[],a=r.seriesIndex,n;if(a==null||!(n=e.getSeriesByIndex(a)))return{point:[]};var i=n.getData(),o=ti(i,r);if(o==null||o<0||z(o))return{point:[]};var s=i.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)t=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),h=f.dim,v=u.dim,c=h==="x"||h==="radius"?1:0,p=i.mapDimension(v),d=[];d[c]=i.get(p,o),d[1-c]=i.get(i.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(d)||[]}else t=l.dataToPoint(i.getValues(G(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:s}}var Tx=xt();function YH(r,e,t){var a=r.currTrigger,n=[r.x,r.y],i=r,o=r.dispatchAction||X(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Yu(n)&&(n=n2({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=Yu(n),u=i.axesInfo,f=s.axesInfo,h=a==="leave"||Yu(n),v={},c={},p={list:[],map:{}},d={showPointer:lt(ZH,c),showTooltip:lt($H,p)};D(s.coordSysMap,function(y,m){var _=l||y.containPoint(n);D(s.coordSysAxesInfo[m],function(S,b){var x=S.axis,w=QH(u,S);if(!h&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=x.pointToData(n)),T!=null&&Ax(S,T,d,!1,v)}})});var g={};return D(f,function(y,m){var _=y.linkGroup;_&&!c[m]&&D(_.axesInfo,function(S,b){var x=c[b];if(S!==y&&x){var w=x.value;_.mapper&&(w=y.axis.scale.parse(_.mapper(w,Cx(S),Cx(y)))),g[y.key]=w}})}),D(g,function(y,m){Ax(f[m],y,d,!0,v)}),qH(c,f,v),KH(p,n,r,o),JH(f,o,t),v}}function Ax(r,e,t,a,n){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=XH(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&V(n,s[0]),!a&&r.snap&&i.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function XH(r,e){var t=e.axis,a=t.dim,n=r,i=[],o=Number.MAX_VALUE,s=-1;return D(e.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(a),h,v;if(l.getAxisTooltipData){var c=l.getAxisTooltipData(f,r,t);v=c.dataIndices,h=c.nestestValue}else{if(v=l.getData().indicesOfNearest(f[0],r,t.type==="category"?.5:null),!v.length)return;h=l.getData().get(f[0],v[0])}if(!(h==null||!isFinite(h))){var p=r-h,d=Math.abs(p);d<=o&&((d=0&&s<0)&&(o=d,s=p,n=h,i.length=0),D(v,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:n}}function ZH(r,e,t,a){r[e.key]={value:t,payloadBatch:a}}function $H(r,e,t,a){var n=t.payloadBatch,i=e.axis,o=i.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!n.length)){var l=e.coordSys.model,u=qs(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function qH(r,e,t){var a=t.axesInfo=[];D(e,function(n,i){var o=n.axisPointerModel.option,s=r[i];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function KH(r,e,t,a){if(Yu(e)||!r.list.length){a({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function JH(r,e,t){var a=t.getZr(),n="axisPointerLastHighlights",i=Tx(a)[n]||{},o=Tx(a)[n]={};D(r,function(u,f){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&D(h.seriesDataIndices,function(v){var c=v.seriesIndex+" | "+v.dataIndex;o[c]=v})});var s=[],l=[];D(i,function(u,f){!o[f]&&l.push(u)}),D(o,function(u,f){!i[f]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function QH(r,e){for(var t=0;t<(r||[]).length;t++){var a=r[t];if(e.axis.dim===a.axisDim&&e.axis.model.componentIndex===a.axisIndex)return a}}function Cx(r){var e=r.axis.model,t={},a=t.axisDim=r.axis.dim;return t.axisIndex=t[a+"AxisIndex"]=e.componentIndex,t.axisName=t[a+"AxisName"]=e.name,t.axisId=t[a+"AxisId"]=e.id,t}function Yu(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Al(r){ci.registerAxisPointerClass("CartesianAxisPointer",NH),r.registerComponentModel(VH),r.registerComponentView(UH),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!z(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=lz(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},YH)}function jH(r){dt(RD),dt(Al)}var tW=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),f=u.getExtent(),h=s.dataToCoord(a),v=i.get("type");if(v&&v!=="none"){var c=ky(i),p=rW[v](s,l,h,f);p.style=c,t.graphicKey=p.type,t.pointer=p}var d=i.get(["label","margin"]),g=eW(a,n,i,l,d);jM(t,n,i,o,g)},e}(Ey);function eW(r,e,t,a,n){var i=e.axis,o=i.dataToCoord(r),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,f,h;if(i.dim==="radius"){var v=He();si(v,v,s),Fr(v,v,[a.cx,a.cy]),u=_r([o,-n],v);var c=e.getModel("axisLabel").get("rotate")||0,p=Ae.innerTextLayout(s,c*Math.PI/180,-1);f=p.textAlign,h=p.textVerticalAlign}else{var d=l[1];u=a.coordToPoint([d+n,o]);var g=a.cx,y=a.cy;f=Math.abs(u[0]-g)/d<.3?"center":u[0]>g?"left":"right",h=Math.abs(u[1]-y)/d<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:f,verticalAlign:h}}var rW={line:function(r,e,t,a){return r.dim==="angle"?{type:"Line",shape:Ny(e.coordToPoint([a[0],t]),e.coordToPoint([a[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,a){var n=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:_x(e.cx,e.cy,a[0],a[1],(-t-n/2)*i,(-t+n/2)*i)}:{type:"Sector",shape:_x(e.cx,e.cy,t-n/2,t+n/2,0,Math.PI*2)}}},aW=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var a,n=this.ecModel;return n.eachComponent(t,function(i){i.getCoordSysModel()===this&&(a=i)},this),a},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(mt),By=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",$t).models[0]},e.type="polarAxis",e}(mt);Kt(By,gl);var nW=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(By),iW=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(By),Vy=function(r){k(e,r);function e(t,a){return r.call(this,"radius",t,a)||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e}(wr);Vy.prototype.dataToRadius=wr.prototype.dataToCoord;Vy.prototype.radiusToData=wr.prototype.coordToData;var oW=xt(),zy=function(r){k(e,r);function e(t,a){return r.call(this,"angle",t,a||[0,360])||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,a=t.getLabelModel(),n=t.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),f=il(s==null?"":s+"",a.getFont(),"center","top"),h=Math.max(f.height,7),v=h/u;isNaN(v)&&(v=1/0);var c=Math.max(0,Math.floor(v)),p=oW(t.model),d=p.lastAutoInterval,g=p.lastTickCount;return d!=null&&g!=null&&Math.abs(d-c)<=1&&Math.abs(g-o)<=1&&d>c?c=d:(p.lastTickCount=o,p.lastAutoInterval=c),c},e}(wr);zy.prototype.dataToAngle=wr.prototype.dataToCoord;zy.prototype.angleToData=wr.prototype.coordToData;var i2=["radius","angle"],sW=function(){function r(e){this.dimensions=i2,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Vy,this._angleAxis=new zy,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],a=this._angleAxis,n=this._radiusAxis;return a.scale.type===e&&t.push(a),n.scale.type===e&&t.push(n),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var a=this.pointToCoord(e);return[this._radiusAxis.radiusToData(a[0],t),this._angleAxis.angleToData(a[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,a=e[1]-this.cy,n=this.getAngleAxis(),i=n.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);n.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+a*a);t/=l,a/=l;for(var u=Math.atan2(-a,t)/Math.PI*180,f=us;)u+=f*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],a=e[1]/180*Math.PI,n=Math.cos(a)*t+this.cx,i=-Math.sin(a)*t+this.cy;return[n,i]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),a=t.getExtent().slice();a[0]>a[1]&&a.reverse();var n=e.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:a[0],r:a[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,f=l-this.cy,h=u*u+f*f,v=this.r,c=this.r0;return v!==c&&h-o<=v*v&&h+o>=c*c}}},r.prototype.convertToPixel=function(e,t,a){var n=Dx(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=Dx(t);return n===this?this.pointToData(a):null},r}();function Dx(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function lW(r,e,t){var a=e.get("center"),n=t.getWidth(),i=t.getHeight();r.cx=W(a[0],n),r.cy=W(a[1],i);var o=r.getRadiusAxis(),s=Math.min(n,i)/2,l=e.get("radius");l==null?l=[0,"100%"]:z(l)||(l=[0,l]);var u=[W(l[0],s),W(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function uW(r,e){var t=this,a=t.getAngleAxis(),n=t.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();D(xf(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),D(xf(l,"angle"),function(u){a.scale.unionExtentFromData(l,u)})}}),ao(a.scale,a.model),ao(n.scale,n.model),a.type==="category"&&!a.onBand){var i=a.getExtent(),o=360/a.scale.count();a.inverse?i[1]+=o:i[1]-=o,a.setExtent(i[0],i[1])}}function fW(r){return r.mainType==="angleAxis"}function Mx(r,e){var t;if(r.type=e.get("type"),r.scale=bh(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),fW(e)){r.inverse=r.inverse!==e.get("clockwise");var a=e.get("startAngle"),n=(t=e.get("endAngle"))!==null&&t!==void 0?t:a+(r.inverse?-360:360);r.setExtent(a,n)}e.axis=r,r.model=e}var hW={dimensions:i2,create:function(r,e){var t=[];return r.eachComponent("polar",function(a,n){var i=new sW(n+"");i.update=uW;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");Mx(o,l),Mx(s,u),lW(i,a,e),t.push(i),a.coordinateSystem=i,i.model=a}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var n=a.getReferringComponents("polar",$t).models[0];a.coordinateSystem=n.coordinateSystem}}),t}},vW=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function _u(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var a=r.coordToPoint([e[0],t]),n=r.coordToPoint([e[1],t]);return{x1:a[0],y1:a[1],x2:n[0],y2:n[1]}}function Su(r){var e=r.getRadiusAxis();return e.inverse?0:1}function Ix(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var cW=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,a){if(this.group.removeAll(),!!t.get("show")){var n=t.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),s=n.getTicksCoords(),l=n.getMinorTicksCoords(),u=G(n.getViewLabels(),function(f){f=rt(f);var h=n.scale,v=h.type==="ordinal"?h.getRawOrdinalNumber(f.tickValue):f.tickValue;return f.coord=n.dataToCoord(v),f});Ix(u),Ix(s),D(vW,function(f){t.get([f,"show"])&&(!n.scale.isBlank()||f==="axisLine")&&pW[f](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e}(ci),pW={axisLine:function(r,e,t,a,n,i){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),f=Su(t),h=f?0:1,v,c=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[h]===0?v=new ui[c]({shape:{cx:t.cx,cy:t.cy,r:i[f],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):v=new ll({shape:{cx:t.cx,cy:t.cy,r:i[f],r0:i[h]},style:o.getLineStyle(),z2:1,silent:!0}),v.style.fill=null,r.add(v)},axisTick:function(r,e,t,a,n,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[Su(t)],u=G(a,function(f){return new ee({shape:_u(t,[l,l+s],f.coord)})});r.add(rr(u,{style:j(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,a,n,i){if(n.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[Su(t)],f=[],h=0;hy?"left":"right",S=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[p]){var b=s[p];et(b)&&b.textStyle&&(c=new Mt(b.textStyle,l,l.ecModel))}var x=new bt({silent:Ae.isLabelSilent(e),style:Bt(c,{x:g[0],y:g[1],fill:c.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:_,verticalAlign:S})});if(r.add(x),f){var w=Ae.makeAxisEventDataBase(e);w.targetType="axisLabel",w.value=h.rawLabel,nt(x).eventData=w}},this)},splitLine:function(r,e,t,a,n,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var f=[],h=0;h=0?"p":"n",R=A;b&&(a[f][L]||(a[f][L]={p:A,n:A}),R=a[f][L][P]);var E=void 0,N=void 0,O=void 0,B=void 0;if(p.dim==="radius"){var F=p.dataToCoord(I)-A,H=l.dataToCoord(L);Math.abs(F)=B})}}})}function xW(r){var e={};D(r,function(a,n){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=s2(o,s),u=s.getExtent(),f=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),h=e[l]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},v=h.stacks;e[l]=h;var c=o2(a);v[c]||h.autoWidthCount++,v[c]=v[c]||{width:0,maxWidth:0};var p=W(a.get("barWidth"),f),d=W(a.get("barMaxWidth"),f),g=a.get("barGap"),y=a.get("barCategoryGap");p&&!v[c].width&&(p=Math.min(h.remainedWidth,p),v[c].width=p,h.remainedWidth-=p),d&&(v[c].maxWidth=d),g!=null&&(h.gap=g),y!=null&&(h.categoryGap=y)});var t={};return D(e,function(a,n){t[n]={};var i=a.stacks,o=a.bandWidth,s=W(a.categoryGap,o),l=W(a.gap,1),u=a.remainedWidth,f=a.autoWidthCount,h=(u-s)/(f+(f-1)*l);h=Math.max(h,0),D(i,function(d,g){var y=d.maxWidth;y&&y=t.y&&e[1]<=t.y+t.height:a.contain(a.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),a=this.getRect(),n=[],i=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[i]=t.toGlobalCoord(t.dataToCoord(+e)),n[1-i]=i===0?a.y+a.height/2:a.x+a.width/2,n},r.prototype.convertToPixel=function(e,t,a){var n=Lx(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=Lx(t);return n===this?this.pointToData(a):null},r}();function Lx(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function RW(r,e){var t=[];return r.eachComponent("singleAxis",function(a,n){var i=new PW(a,r,e);i.name="single_"+n,i.resize(a,e),a.coordinateSystem=i,t.push(i)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var n=a.getReferringComponents("singleAxis",$t).models[0];a.coordinateSystem=n&&n.coordinateSystem}}),t}var EW={create:RW,dimensions:l2},Px=["x","y"],kW=["width","height"],OW=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis,l=s.coordinateSystem,u=Bc(l,1-Of(s)),f=l.dataToPoint(a)[0],h=i.get("type");if(h&&h!=="none"){var v=ky(i),c=NW[h](s,f,u);c.style=v,t.graphicKey=c.type,t.pointer=c}var p=Id(n);e2(a,t,p,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=Id(a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=Oy(a.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,n,i){var o=n.axis,s=o.coordinateSystem,l=Of(o),u=Bc(s,l),f=[t.x,t.y];f[l]+=a[l],f[l]=Math.min(u[1],f[l]),f[l]=Math.max(u[0],f[l]);var h=Bc(s,1-l),v=(h[1]+h[0])/2,c=[v,v];return c[l]=f[l],{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(Ey),NW={line:function(r,e,t){var a=Ny([e,t[0]],[e,t[1]],Of(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=r.getBandWidth(),n=t[1]-t[0];return{type:"Rect",shape:r2([e-a/2,t[0]],[a,n],Of(r))}}};function Of(r){return r.isHorizontal()?0:1}function Bc(r,e){var t=r.getRect();return[t[Px[e]],t[Px[e]]+t[kW[e]]]}var BW=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Ft);function VW(r){dt(Al),ci.registerAxisPointerClass("SingleAxisPointer",OW),r.registerComponentView(BW),r.registerComponentView(MW),r.registerComponentModel(Xu),io(r,"single",Xu,Xu.defaultOption),r.registerCoordinateSystem("single",EW)}var zW=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a,n){var i=_o(t);r.prototype.init.apply(this,arguments),Rx(t,i)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),Rx(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(mt);function Rx(r,e){var t=r.cellSize,a;z(t)?a=t:a=r.cellSize=[t,t],a.length===1&&(a[1]=a[0]);var n=G([0,1],function(i){return oE(e,i)&&(a[i]="auto"),a[i]!=null&&a[i]!=="auto"});$a(r,e,{type:"box",ignoreSize:n})}var GW=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=this.group;i.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=a.getLocaleModel();this._renderDayRect(t,s,i),this._renderLines(t,s,l,i),this._renderYearText(t,s,l,i),this._renderMonthText(t,u,l,i),this._renderWeekText(t,u,s,l,i)},e.prototype._renderDayRect=function(t,a,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=a.start.time;u<=a.end.time;u=i.getNextNDay(u,1).time){var f=i.dataToRect([u],!1).tl,h=new St({shape:{x:f[0],y:f[1],width:s,height:l},cursor:"default",style:o});n.add(h)}},e.prototype._renderLines=function(t,a,n,i){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),f=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=a.start,v=0;h.time<=a.end.time;v++){p(h.formatedDate),v===0&&(h=s.getDateInfo(a.start.y+"-"+a.start.m));var c=h.date;c.setMonth(c.getMonth()+1),h=s.getDateInfo(c)}p(s.getNextNDay(a.end.time,1).formatedDate);function p(d){o._firstDayOfMonth.push(s.getDateInfo(d)),o._firstDayPoints.push(s.dataToRect([d],!1).tl);var g=o._getLinePointsOfOneWeek(t,d,n);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,f,n),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,f,n),l,i)},e.prototype._getEdgesPoints=function(t,a,n){var i=[t[0].slice(),t[t.length-1].slice()],o=n==="horizontal"?0:1;return i[0][o]=i[0][o]-a/2,i[1][o]=i[1][o]+a/2,i},e.prototype._drawSplitline=function(t,a,n){var i=new Le({z2:20,shape:{points:t},style:a});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,a,n){for(var i=t.coordinateSystem,o=i.getDateInfo(a),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),f=i.dataToRect([u.time],!1);s[2*u.day]=f.tl,s[2*u.day+1]=f[n==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,a){return Y(t)&&t?aE(t,a):J(t)?t(a):a.nameMap},e.prototype._yearTextPositionControl=function(t,a,n,i,o){var s=a[0],l=a[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var f=0;return(i==="left"||i==="right")&&(f=Math.PI/2),{rotation:f,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,a,n,i){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=n!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],f=(u[0][0]+u[1][0])/2,h=(u[0][1]+u[1][1])/2,v=n==="horizontal"?0:1,c={top:[f,u[v][1]],bottom:[f,u[1-v][1]],left:[u[1-v][0],h],right:[u[v][0],h]},p=a.start.y;+a.end.y>+a.start.y&&(p=p+"-"+a.end.y);var d=o.get("formatter"),g={start:a.start.y,end:a.end.y,nameMap:p},y=this._formatterLabel(d,g),m=new bt({z2:30,style:Bt(o,{text:y}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,c[l],n,l,s)),i.add(m)}},e.prototype._monthTextPositionControl=function(t,a,n,i,o){var s="left",l="top",u=t[0],f=t[1];return n==="horizontal"?(f=f+o,a&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,a&&(l="middle"),i==="start"&&(s="right")),{x:u,y:f,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,a,n,i){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),f=o.get("align"),h=[this._tlpoints,this._blpoints];(!s||Y(s))&&(s&&(a=Bp(s)||a),s=a.get(["time","monthAbbr"])||[]);var v=u==="start"?0:1,c=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=f==="center",d=o.get("silent"),g=0;g=n.start.time&&a.times.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],a;t[0].time>t[1].time&&(a=!0,t.reverse());var n=Math.floor(t[1].time/Vc)-Math.floor(t[0].time/Vc)+1,i=new Date(t[0].time),o=i.getDate(),s=t[1].date.getDate();i.setDate(o+n-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-t[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-t[1].time)*u>0;)n-=u,i.setDate(l-u);var f=Math.floor((n+t[0].day+6)/7),h=a?-f+1:f-1;return a&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:f,nthWeek:h,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,a){var n=this._getRangeInfo(a);if(e>n.weeks||e===0&&tn.lweek)return null;var i=(e-1)*7-n.fweek+t,o=new Date(n.start.time);return o.setDate(+n.start.d+i),this.getDateInfo(o)},r.create=function(e,t){var a=[];return e.eachComponent("calendar",function(n){var i=new r(n);a.push(i),n.coordinateSystem=i}),e.eachSeries(function(n){n.get("coordinateSystem")==="calendar"&&(n.coordinateSystem=a[n.get("calendarIndex")||0])}),a},r.dimensions=["time","value"],r}();function Ex(r){var e=r.calendarModel,t=r.seriesModel,a=e?e.coordinateSystem:t?t.coordinateSystem:null;return a}function HW(r){r.registerComponentModel(zW),r.registerComponentView(GW),r.registerCoordinateSystem("calendar",FW)}function WW(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var a=e.parentOption;a?e.parentId=a.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function kx(r,e){var t;return D(e,function(a){r[a]!=null&&r[a]!=="auto"&&(t=!0)}),t}function UW(r,e,t){var a=V({},t),n=r[e],i=t.$action||"merge";i==="merge"?n?(ut(n,a,!0),$a(n,a,{ignoreSize:!0}),tA(t,n),xu(t,n),xu(t,n,"shape"),xu(t,n,"style"),xu(t,n,"extra"),t.clipPath=n.clipPath):r[e]=a:i==="replace"?r[e]=a:i==="remove"&&n&&(r[e]=null)}var u2=["transition","enterFrom","leaveTo"],YW=u2.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function xu(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var a=t?u2:YW,n=0;n=0;f--){var h=n[f],v=Jt(h.id,null),c=v!=null?o.get(v):null;if(c){var p=c.parent,y=je(p),m=p===i?{width:s,height:l}:{width:y.width,height:y.height},_={},S=ch(c,h,m,null,{hv:h.hv,boundingMode:h.bounding},_);if(!je(c).isNew&&S){for(var b=h.transition,x={},w=0;w=0)?x[T]=A:c[T]=A}Tt(c,x,t,0)}else c.attr(_)}}},e.prototype._clear=function(){var t=this,a=this._elMap;a.each(function(n){Zu(n,je(n).option,a,t._lastGraphicModel)}),this._elMap=$()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Ft);function Ld(r){var e=Z(Ox,r)?Ox[r]:yg(r),t=new e({});return je(t).type=r,t}function Nx(r,e,t,a){var n=Ld(t);return e.add(n),a.set(r,n),je(n).id=r,je(n).isNew=!0,n}function Zu(r,e,t,a){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(i){Zu(i,e,t,a)}),Ih(r,e,a),t.removeKey(je(r).id))}function Bx(r,e,t,a){r.isGroup||D([["cursor",or.prototype.cursor],["zlevel",a||0],["z",t||0],["z2",0]],function(n){var i=n[0];Z(e,i)?r[i]=st(e[i],n[1]):r[i]==null&&(r[i]=n[1])}),D(_t(e),function(n){if(n.indexOf("on")===0){var i=e[n];r[n]=J(i)?i:null}}),Z(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function qW(r){return r=V({},r),D(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(jT),function(e){delete r[e]}),r}function KW(r,e,t){var a=nt(r).eventData;!r.silent&&!r.ignore&&!a&&(a=nt(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),a&&(a.info=t.info)}function JW(r){r.registerComponentModel(ZW),r.registerComponentView($W),r.registerPreprocessor(function(e){var t=e.graphic;z(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var Vx=["x","y","radius","angle","single"],QW=["cartesian2d","polar","singleAxis"];function jW(r){var e=r.get("coordinateSystem");return ct(QW,e)>=0}function za(r){return r+"Axis"}function t6(r,e){var t=$(),a=[],n=$();r.eachComponent({mainType:"dataZoom",query:e},function(f){n.get(f.uid)||s(f)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(f){!n.get(f.uid)&&l(f)&&(s(f),i=!0)}function s(f){n.set(f.uid,!0),a.push(f),u(f)}function l(f){var h=!1;return f.eachTargetAxis(function(v,c){var p=t.get(v);p&&p[c]&&(h=!0)}),h}function u(f){f.eachTargetAxis(function(h,v){(t.get(h)||t.set(h,[]))[v]=!0})}return a}function f2(r){var e=r.ecModel,t={infoList:[],infoMap:$()};return r.eachTargetAxis(function(a,n){var i=e.getComponent(za(a),n);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(i)}}}),t}var zc=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),el=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,a,n){var i=zx(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var a=zx(t);ut(this.option,t,!0),ut(this.settledOption,a,!0),this._doInit(a)},e.prototype._doInit=function(t){var a=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;D([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(a[i[0]]=n[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),a=this._targetAxisInfoMap=$(),n=this._fillSpecifiedTargetAxis(a);n?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var a=!1;return D(Vx,function(n){var i=this.getReferringComponents(za(n),XL);if(i.specified){a=!0;var o=new zc;D(i.models,function(s){o.add(s.componentIndex)}),t.set(n,o)}},this),a},e.prototype._fillAutoTargetAxisByOrient=function(t,a){var n=this.ecModel,i=!0;if(i){var o=a==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=n.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===a}});l(s,"single")}function l(u,f){var h=u[0];if(h){var v=new zc;if(v.add(h.componentIndex),t.set(f,v),i=!1,f==="x"||f==="y"){var c=h.getReferringComponents("grid",$t).models[0];c&&D(u,function(p){h.componentIndex!==p.componentIndex&&c===p.getReferringComponents("grid",$t).models[0]&&v.add(p.componentIndex)})}}}i&&D(Vx,function(u){if(i){var f=n.findComponents({mainType:za(u),filter:function(v){return v.get("type",!0)==="category"}});if(f[0]){var h=new zc;h.add(f[0].componentIndex),t.set(u,h),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(a){!t&&(t=a)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var a=this._rangePropMode,n=this.get("rangeMode");D([["start","startValue"],["end","endValue"]],function(i,o){var s=t[i[0]]!=null,l=t[i[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":n?a[o]=n[o]:s&&(a[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(a,n){t==null&&(t=this.ecModel.getComponent(za(a),n))},this),t},e.prototype.eachTargetAxis=function(t,a){this._targetAxisInfoMap.each(function(n,i){D(n.indexList,function(o){t.call(a,i,o)})})},e.prototype.getAxisProxy=function(t,a){var n=this.getAxisModel(t,a);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,a){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[a])return this.ecModel.getComponent(za(t),a)},e.prototype.setRawRange=function(t){var a=this.option,n=this.settledOption;D([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(a[i[0]]=n[i[0]]=t[i[0]],a[i[1]]=n[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var a=this.option;D(["start","startValue","end","endValue"],function(n){a[n]=t[n]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,a){if(t==null&&a==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(t,a).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var a,n=this._targetAxisInfoMap.keys(),i=0;io[1];if(_&&!S&&!b)return!0;_&&(g=!0),S&&(p=!0),b&&(d=!0)}return g&&p&&d})}else Gi(f,function(c){if(i==="empty")l.setData(u=u.map(c,function(d){return s(d)?d:NaN}));else{var p={};p[c]=o,u.selectRange(p)}});Gi(f,function(c){u.setApproximateExtent(o,c)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,a=this._dataExtent;Gi(["min","max"],function(n){var i=t.get(n+"Span"),o=t.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=Dt(a[0]+o,a,[0,100],!0):i!=null&&(o=Dt(i,[0,100],a,!0)-a[0]),e[n+"Span"]=i,e[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,a=this._valueWindow;if(t){var n=Hw(a,[0,500]);n=Math.min(n,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+a[0].toFixed(n)),t[1]!==100&&i.setDeterminedMinMax("max",+a[1].toFixed(n)),i.freeze()}},r}();function n6(r,e,t){var a=[1/0,-1/0];Gi(t,function(o){BN(a,o.getData(),e)});var n=r.getAxisModel(),i=MC(n.axis.scale,n,a).calculate();return[i.min,i.max]}var i6={getTargetSeries:function(r){function e(n){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(za(o),s);n(o,s,l,i)})})}e(function(n,i,o,s){o.__dzAxisProxy=null});var t=[];e(function(n,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new a6(n,i,s,r),t.push(o.__dzAxisProxy))});var a=$();return D(t,function(n){D(n.getTargetSeriesModels(),function(i){a.set(i.uid,i)})}),a},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(a,n){t.getAxisProxy(a,n).reset(t)}),t.eachTargetAxis(function(a,n){t.getAxisProxy(a,n).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var a=t.findRepresentativeAxisProxy();if(a){var n=a.getDataPercentWindow(),i=a.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};function o6(r){r.registerAction("dataZoom",function(e,t){var a=t6(t,e);D(a,function(n){n.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var Fx=!1;function Fy(r){Fx||(Fx=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,i6),o6(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function s6(r){r.registerComponentModel(e6),r.registerComponentView(r6),Fy(r)}var er=function(){function r(){}return r}(),h2={};function Fi(r,e){h2[r]=e}function v2(r){return h2[r]}var l6=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;D(this.option.feature,function(a,n){var i=v2(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),ut(a,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(mt);function u6(r,e,t){var a=e.getBoxLayoutParams(),n=e.get("padding"),i={width:t.getWidth(),height:t.getHeight()},o=Qt(a,i,n);Kn(e.get("orient"),r,e.get("itemGap"),o.width,o.height),ch(r,a,i,n)}function c2(r,e){var t=mo(e.get("padding")),a=e.getItemStyle(["color","opacity"]);return a.fill=e.get("backgroundColor"),r=new St({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:a,silent:!0,z2:-1}),r}var f6=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n,i){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},f=this._features||(this._features={}),h=[];D(u,function(p,d){h.push(d)}),new fa(this._featureNames||[],h).add(v).update(v).remove(lt(v,null)).execute(),this._featureNames=h;function v(p,d){var g=h[p],y=h[d],m=u[g],_=new Mt(m,t,t.ecModel),S;if(i&&i.newTitle!=null&&i.featureName===g&&(m.title=i.newTitle),g&&!y){if(h6(g))S={onclick:_.option.onclick,featureName:g};else{var b=v2(g);if(!b)return;S=new b}f[g]=S}else if(S=f[y],!S)return;S.uid=yo("toolbox-feature"),S.model=_,S.ecModel=a,S.api=n;var x=S instanceof er;if(!g&&y){x&&S.dispose&&S.dispose(a,n);return}if(!_.get("show")||x&&S.unusable){x&&S.remove&&S.remove(a,n);return}c(_,S,g),_.setIconStatus=function(w,T){var A=this.option,C=this.iconPaths;A.iconStatus=A.iconStatus||{},A.iconStatus[w]=T,C[w]&&(T==="emphasis"?la:ua)(C[w])},S instanceof er&&S.render&&S.render(_,a,n,i)}function c(p,d,g){var y=p.getModel("iconStyle"),m=p.getModel(["emphasis","iconStyle"]),_=d instanceof er&&d.getIcons?d.getIcons():p.get("icon"),S=p.get("title")||{},b,x;Y(_)?(b={},b[g]=_):b=_,Y(S)?(x={},x[g]=S):x=S;var w=p.iconPaths={};D(b,function(T,A){var C=vl(T,{},{x:-s/2,y:-s/2,width:s,height:s});C.setStyle(y.getItemStyle());var M=C.ensureState("emphasis");M.style=m.getItemStyle();var I=new bt({style:{text:x[A],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null,font:mg({fontStyle:m.get("textFontStyle"),fontFamily:m.get("textFontFamily"),fontSize:m.get("textFontSize"),fontWeight:m.get("textFontWeight")},a)},ignore:!0});C.setTextContent(I),li({el:C,componentModel:t,itemName:A,formatterParamsExtra:{title:x[A]}}),C.__title=x[A],C.on("mouseover",function(){var L=m.getItemStyle(),P=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";I.setStyle({fill:m.get("textFill")||L.fill||L.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),C.setTextConfig({position:m.get("textPosition")||P}),I.ignore=!t.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",A])!=="emphasis"&&n.leaveEmphasis(this),I.hide()}),(p.get(["iconStatus",A])==="emphasis"?la:ua)(C),o.add(C),C.on("click",X(d.onclick,d,a,n,A)),w[A]=C})}u6(o,t,n),o.add(c2(o.getBoundingRect(),t)),l||o.eachChild(function(p){var d=p.__title,g=p.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),m=p.getTextContent(),_=m&&m.ensureState("emphasis");if(_&&!J(_)&&d){var S=_.style||(_.style={}),b=il(d,bt.makeFont(S)),x=p.x+o.x,w=p.y+o.y+s,T=!1;w+b.height>n.getHeight()&&(y.position="top",T=!0);var A=T?-5-b.height:s+10;x+b.width/2>n.getWidth()?(y.position=["100%",A],S.align="right"):x-b.width/2<0&&(y.position=[0,A],S.align="left")}})},e.prototype.updateView=function(t,a,n,i){D(this._features,function(o){o instanceof er&&o.updateView&&o.updateView(o.model,a,n,i)})},e.prototype.remove=function(t,a){D(this._features,function(n){n instanceof er&&n.remove&&n.remove(t,a)}),this.group.removeAll()},e.prototype.dispose=function(t,a){D(this._features,function(n){n instanceof er&&n.dispose&&n.dispose(t,a)})},e.type="toolbox",e}(Ft);function h6(r){return r.indexOf("my")===0}var v6=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o=a.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=a.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=yt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=i+"."+s,f.target="_blank",f.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var v=l.split(","),c=v[0].indexOf("base64")>-1,p=o?decodeURIComponent(v[1]):v[1];c&&(p=window.atob(p));var d=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,y=new Uint8Array(g);g--;)y[g]=p.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,d)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,b=S.document;b.open("image/svg+xml","replace"),b.write(p),b.close(),S.focus(),b.execCommand("SaveAs",!0,d),document.body.removeChild(_)}}else{var x=n.get("lang"),w='',T=window.open();T.document.write(w),T.document.title=i}},e.getDefaultOption=function(t){var a={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},e}(er),Hx="__ec_magicType_stack__",c6=[["line","bar"],["stack"]],p6=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,a=t.get("icon"),n={};return D(t.get("type"),function(i){a[i]&&(n[i]=a[i])}),n},e.getDefaultOption=function(t){var a={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return a},e.prototype.onclick=function(t,a,n){var i=this.model,o=i.get(["seriesIndex",n]);if(Wx[n]){var s={series:[]},l=function(h){var v=h.subType,c=h.id,p=Wx[n](v,c,h,i);p&&(j(p,h.option),s.series.push(p));var d=h.coordinateSystem;if(d&&d.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=d.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=h.getReferringComponents(m,$t).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var b=0;b<=S;b++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=n==="bar"}}};D(c6,function(h){ct(h,n)>=0&&D(h,function(v){i.setIconStatus(v,"normal")})}),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=n;n==="stack"&&(u=ut({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",n])!=="emphasis"&&(f="tiled")),a.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},e}(er),Wx={line:function(r,e,t,a){if(r==="bar")return ut({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(r,e,t,a){if(r==="line")return ut({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(r,e,t,a){var n=t.get("stack")===Hx;if(r==="line"||r==="bar")return a.setIconStatus("stack",n?"normal":"emphasis"),ut({id:e,stack:n?"":Hx},a.get(["option","stack"])||{},!0)}};Xr({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var Lh=new Array(60).join("-"),lo=" ";function d6(r){var e={},t=[],a=[];return r.eachRawSeries(function(n){var i=n.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(n)}else t.push(n)}else t.push(n)}),{seriesGroupByCategoryAxis:e,other:t,meta:a}}function g6(r){var e=[];return D(r,function(t,a){var n=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat(G(t.series,function(c){return c.name})),l=[n.model.getCategories()];D(t.series,function(c){var p=c.getRawData();l.push(c.getRawData().mapArray(p.mapDimension(o),function(d){return d}))});for(var u=[s.join(lo)],f=0;f=0)return!0}var Pd=new RegExp("["+lo+"]+","g");function S6(r){for(var e=r.split(/\n+/g),t=Nf(e.shift()).split(Pd),a=[],n=G(t,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=t[i];if(o[n])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();t[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),t.push(e)}function C6(r){var e=Hy(r),t=e[e.length-1];e.length>1&&e.pop();var a={};return p2(t,function(n,i){for(var o=e.length-1;o>=0;o--)if(n=e[o][i],n){a[i]=n;break}}),a}function D6(r){d2(r).snapshots=null}function M6(r){return Hy(r).length}function Hy(r){var e=d2(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var I6=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){D6(t),a.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var a={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return a},e}(er);Xr({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var L6=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Wy=function(){function r(e,t,a){var n=this;this._targetInfoList=[];var i=Ux(t,e);D(P6,function(o,s){(!a||!a.include||ct(a.include,s)>=0)&&o(i,n._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(a,n,i){if((a.coordRanges||(a.coordRanges=[])).push(n),!a.coordRange){a.coordRange=n;var o=Gc[a.brushType](0,i,n);a.__rangeOffset={offset:$x[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,a){D(e,function(n){var i=this.findTargetInfo(n,t);i&&i!==!0&&D(i.coordSyses,function(o){var s=Gc[n.brushType](1,o,n.range,!0);a(n,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){D(e,function(a){var n=this.findTargetInfo(a,t);if(a.range=a.range||[],n&&n!==!0){a.panelId=n.panelId;var i=Gc[a.brushType](0,n.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?$x[a.brushType](i.values,o.offset,R6(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(e,t){return G(this._targetInfoList,function(a){var n=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:t?t(a):null,clipPath:wM(n),isTargetByCursor:AM(n,e,a.coordSysModel),getLinearBrushOtherExtent:TM(n)}})},r.prototype.controlSeries=function(e,t,a){var n=this.findTargetInfo(e,a);return n===!0||n&&ct(n.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var a=this._targetInfoList,n=Ux(t,e),i=0;ir[1]&&r.reverse(),r}function Ux(r,e){return ms(r,e,{includeMainTypes:L6})}var P6={grid:function(r,e){var t=r.xAxisModels,a=r.yAxisModels,n=r.gridModels,i=$(),o={},s={};!t&&!a&&!n||(D(t,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),D(a,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),D(n,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,f=[];D(u.getCartesians(),function(h,v){(ct(t,h.getAxis("x").model)>=0||ct(a,h.getAxis("y").model)>=0)&&f.push(h)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:Xx.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){D(r.geoModels,function(t){var a=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:a,coordSyses:[a],getPanelRect:Xx.geo})})}},Yx=[function(r,e){var t=r.xAxisModel,a=r.yAxisModel,n=r.gridModel;return!n&&t&&(n=t.axis.grid.model),!n&&a&&(n=a.axis.grid.model),n&&n===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],Xx={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(qn(r)),e}},Gc={lineX:lt(Zx,0),lineY:lt(Zx,1),rect:function(r,e,t,a){var n=r?e.pointToData([t[0][0],t[1][0]],a):e.dataToPoint([t[0][0],t[1][0]],a),i=r?e.pointToData([t[0][1],t[1][1]],a):e.dataToPoint([t[0][1],t[1][1]],a),o=[Rd([n[0],i[0]]),Rd([n[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,a){var n=[[1/0,-1/0],[1/0,-1/0]],i=G(t,function(o){var s=r?e.pointToData(o,a):e.dataToPoint(o,a);return n[0][0]=Math.min(n[0][0],s[0]),n[1][0]=Math.min(n[1][0],s[1]),n[0][1]=Math.max(n[0][1],s[0]),n[1][1]=Math.max(n[1][1],s[1]),s});return{values:i,xyMinMax:n}}};function Zx(r,e,t,a){var n=t.getAxis(["x","y"][r]),i=Rd(G([0,1],function(s){return e?n.coordToData(n.toLocalCoord(a[s]),!0):n.toGlobalCoord(n.dataToCoord(a[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var $x={lineX:lt(qx,0),lineY:lt(qx,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return G(r,function(a,n){return[a[0]-t[0]*e[n][0],a[1]-t[1]*e[n][1]]})}};function qx(r,e,t,a){return[e[0]-a[r]*t[0],e[1]-a[r]*t[1]]}function R6(r,e){var t=Kx(r),a=Kx(e),n=[t[0]/a[0],t[1]/a[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function Kx(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var Ed=D,E6=FL("toolbox-dataZoom_"),k6=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n,i){this._brushController||(this._brushController=new gy(n.getZr()),this._brushController.on("brush",X(this._onBrush,this)).mount()),B6(t,a,this,i,n),N6(t,a)},e.prototype.onclick=function(t,a,n){O6[n].call(this)},e.prototype.remove=function(t,a){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,a){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var a=t.areas;if(!t.isEnd||!a.length)return;var n={},i=this.ecModel;this._brushController.updateCovers([]);var o=new Wy(Uy(this.model),i,{include:["grid"]});o.matchOutputRanges(a,i,function(u,f,h){if(h.type==="cartesian2d"){var v=u.brushType;v==="rect"?(s("x",h,f[0]),s("y",h,f[1])):s({lineX:"x",lineY:"y"}[v],h,f)}}),A6(i,n),this._dispatchZoomAction(n);function s(u,f,h){var v=f.getAxis(u),c=v.model,p=l(u,c,i),d=p.findRepresentativeAxisProxy(c).getMinMaxSpan();(d.minValueSpan!=null||d.maxValueSpan!=null)&&(h=pi(0,h.slice(),v.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),p&&(n[p.id]={dataZoomId:p.id,startValue:h[0],endValue:h[1]})}function l(u,f,h){var v;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(c){var p=c.getAxisModel(u,f.componentIndex);p&&(v=c)}),v}},e.prototype._dispatchZoomAction=function(t){var a=[];Ed(t,function(n,i){a.push(rt(n))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},e.getDefaultOption=function(t){var a={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return a},e}(er),O6={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(C6(this.ecModel))}};function Uy(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function N6(r,e){r.setIconStatus("back",M6(e)>1?"emphasis":"normal")}function B6(r,e,t,a,n){var i=t._isZoomActive;a&&a.type==="takeGlobalCursor"&&(i=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),t._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new Wy(Uy(r),e,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}vE("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var a=e.getModel(t),n=[],i=Uy(a),o=ms(r,i);Ed(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Ed(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var h=l.componentIndex,v={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:E6+u+h};v[f]=h,n.push(v)}return n});function V6(r){r.registerComponentModel(l6),r.registerComponentView(f6),Fi("saveAsImage",v6),Fi("magicType",p6),Fi("dataView",w6),Fi("dataZoom",k6),Fi("restore",I6),dt(s6)}var z6=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(mt);function g2(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function y2(r){if(yt.domSupported){for(var e=document.documentElement.style,t=0,a=r.length;t-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var f=u*Math.PI/180,h=o+n,v=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),c=Math.round(((v-Math.SQRT2*n)/2+Math.SQRT2*n-(v-h)/2)*100)/100;s+=";"+i+":-"+c+"px";var p=e+" solid "+n+"px;",d=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+a+";"];return'
'}function X6(r,e){var t="cubic-bezier(0.23,1,0.32,1)",a=" "+r/2+"s "+t,n="opacity"+a+",visibility"+a;return e||(a=" "+r+"s "+t,n+=yt.transformSupported?","+Yy+a:",left"+a+",top"+a),H6+":"+n}function Jx(r,e,t){var a=r.toFixed(0)+"px",n=e.toFixed(0)+"px";if(!yt.transformSupported)return t?"top:"+n+";left:"+a+";":[["top",n],["left",a]];var i=yt.transform3dSupported,o="translate"+(i?"3d":"")+"("+a+","+n+(i?",0":"")+")";return t?"top:0;left:0;"+Yy+":"+o+";":[["top",0],["left",0],[m2,o]]}function Z6(r){var e=[],t=r.get("fontSize"),a=r.getTextColor();a&&e.push("color:"+a),e.push("font:"+r.getFont());var n=st(r.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+n+"px");var i=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return i&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),D(["decoration","align"],function(u){var f=r.get(u);f&&e.push("text-"+u+":"+f)}),e.join(";")}function $6(r,e,t){var a=[],n=r.get("transitionDuration"),i=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),f=r.getModel("textStyle"),h=PA(r,"html"),v=l+"px "+u+"px "+o+"px "+s;return a.push("box-shadow:"+v),e&&n&&a.push(X6(n,t)),i&&a.push("background-color:"+i),D(["width","color","radius"],function(c){var p="border-"+c,d=JT(p),g=r.get(d);g!=null&&a.push(p+":"+g+(c==="color"?"":"px"))}),a.push(Z6(f)),h!=null&&a.push("padding:"+mo(h).join("px ")+"px"),a.join(";")+";"}function Qx(r,e,t,a,n){var i=e&&e.painter;if(t){var o=i&&i.getViewportRoot();o&&_I(r,o,t,a,n)}else{r[0]=a,r[1]=n;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var q6=function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,yt.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var n=this._zr=e.getZr(),i=t.appendTo,o=i&&(Y(i)?document.querySelector(i):Qi(i)?i:J(i)&&i(e.getDom()));Qx(this._styleCoord,n,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(a),this._api=e,this._container=o;var s=this;a.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},a.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,f=n.painter.getViewportRoot();Ke(f,l,!0),u.dispatch("mousemove",l)}},a.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),a=F6(t,"position"),n=t.style;n.position!=="absolute"&&a!=="absolute"&&(n.position="relative")}var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,n=a.style,i=this._styleCoord;a.innerHTML?n.cssText=W6+$6(e,!this._firstShow,this._longHide)+Jx(i[0],i[1],!0)+("border-color:"+ai(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,a,n,i){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(Y(i)&&a.get("trigger")==="item"&&!g2(a)&&(s=Y6(a,n,i)),Y(e))o.innerHTML=e+s;else if(e){o.innerHTML="",z(e)||(e=[e]);for(var l=0;l=0?this._tryShow(i,o):n==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,a=this._ecModel,n=this._api,i=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(t,a,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,a,n,i){if(!(i.from===this.uid||yt.node||!n.getDom())){var o=eb(i,n);this._ticket="";var s=i.dataByCoordSys,l=r8(i,a,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var f=J6;f.x=i.x,f.y=i.y,f.update(),nt(f).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:f},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(t,a,n,i))return;var h=n2(i,a),v=h.point[0],c=h.point[1];v!=null&&c!=null&&this._tryShow({offsetX:v,offsetY:c,target:h.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(t,a,n,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(eb(i,n))},e.prototype._manuallyAxisShowTip=function(t,a,n,i){var o=i.seriesIndex,s=i.dataIndex,l=a.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=a.getSeriesByIndex(o);if(u){var f=u.getData(),h=Ko([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},e.prototype._tryShow=function(t,a){var n=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(n){var s=nt(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Gn(n,function(f){if(nt(f).dataIndex!=null)return l=f,!0;if(nt(f).tooltipConfig!=null)return u=f,!0},!0),l?this._showSeriesItemTooltip(t,l,a):u?this._showComponentItemTooltip(t,u,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},e.prototype._showOrMove=function(t,a){var n=t.get("showDelay");a=X(a,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(a,n):a()},e.prototype._showAxisTooltip=function(t,a){var n=this._ecModel,i=this._tooltipModel,o=[a.offsetX,a.offsetY],s=Ko([a.tooltipOption],i),l=this._renderMode,u=[],f=ie("section",{blocks:[],noHeader:!0}),h=[],v=new Av;D(t,function(m){D(m.dataByAxis,function(_){var S=n.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!S||b==null)){var x=t2(b,S.axis,n,_.seriesDataIndices,_.valueLabelOpt),w=ie("section",{header:x,noHeader:!gr(x),sortBlocks:!0,blocks:[]});f.blocks.push(w),D(_.seriesDataIndices,function(T){var A=n.getSeriesByIndex(T.seriesIndex),C=T.dataIndexInside,M=A.getDataParams(C);if(!(M.dataIndex<0)){M.axisDim=_.axisDim,M.axisIndex=_.axisIndex,M.axisType=_.axisType,M.axisId=_.axisId,M.axisValue=Ug(S.axis,{value:b}),M.axisValueLabel=x,M.marker=v.makeTooltipMarker("item",ai(M.color),l);var I=G0(A.formatTooltip(C,!0,null)),L=I.frag;if(L){var P=Ko([A],i).get("valueFormatter");w.blocks.push(P?V({valueFormatter:P},L):L)}I.text&&h.push(I.text),u.push(M)}})}})}),f.blocks.reverse(),h.reverse();var c=a.position,p=s.get("order"),d=X0(f,v,l,p,n.get("useUTC"),s.get("textStyle"));d&&h.unshift(d);var g=l==="richText"?` + +`:"
",y=h.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,c,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],c,null,v)})},e.prototype._showSeriesItemTooltip=function(t,a,n){var i=this._ecModel,o=nt(a),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,v=u.getData(h),c=this._renderMode,p=t.positionDefault,d=Ko([v.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=d.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(f,h),m=new Av;y.marker=m.makeTooltipMarker("item",ai(y.color),c);var _=G0(u.formatTooltip(f,!1,h)),S=d.get("order"),b=d.get("valueFormatter"),x=_.frag,w=x?X0(b?V({valueFormatter:b},x):x,m,c,S,i.get("useUTC"),d.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(d,function(){this._showTooltipContent(d,w,y,T,t.offsetX,t.offsetY,t.position,t.target,m)}),n({type:"showTip",dataIndexInside:f,dataIndex:v.getRawIndex(f),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,a,n){var i=this._renderMode==="html",o=nt(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(Y(l)){var f=l;l={content:f,formatter:f},u=!0}u&&i&&l.content&&(l=rt(l),l.content=we(l.content));var h=[l],v=this._ecModel.getComponent(o.componentMainType,o.componentIndex);v&&h.push(v),h.push({formatter:l.content});var c=t.positionDefault,p=Ko(h,this._tooltipModel,c?{position:c}:null),d=p.get("content"),g=Math.random()+"",y=new Av;this._showOrMove(p,function(){var m=rt(p.get("formatterParams")||{});this._showTooltipContent(p,d,m,g,t.offsetX,t.offsetY,t.position,a,y)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,a,n,i,o,s,l,u,f){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var v=t.get("formatter");l=l||t.get("position");var c=a,p=this._getNearestPoint([o,s],n,t.get("trigger"),t.get("borderColor")),d=p.color;if(v)if(Y(v)){var g=t.ecModel.get("useUTC"),y=z(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;c=v,m&&(c=lh(y.axisValue,c,g)),c=QT(c,n,!0)}else if(J(v)){var _=X(function(S,b){S===this._ticket&&(h.setContent(b,f,t,d,l),this._updatePosition(t,l,o,s,h,n,u))},this);this._ticket=i,c=v(n,i,_)}else c=v;h.setContent(c,f,t,d,l),h.show(t,d),this._updatePosition(t,l,o,s,h,n,u)}},e.prototype._getNearestPoint=function(t,a,n,i){if(n==="axis"||z(a))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!z(a))return{color:i||a.color||a.borderColor}},e.prototype._updatePosition=function(t,a,n,i,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();a=a||t.get("position");var h=o.getSize(),v=t.get("align"),c=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),J(a)&&(a=a([n,i],s,o.el,p,{viewSize:[u,f],contentSize:h.slice()})),z(a))n=W(a[0],u),i=W(a[1],f);else if(et(a)){var d=a;d.width=h[0],d.height=h[1];var g=Qt(d,{width:u,height:f});n=g.x,i=g.y,v=null,c=null}else if(Y(a)&&l){var y=e8(a,p,h,t.get("borderWidth"));n=y[0],i=y[1]}else{var y=j6(n,i,o,u,f,v?null:20,c?null:20);n=y[0],i=y[1]}if(v&&(n-=rb(v)?h[0]/2:v==="right"?h[0]:0),c&&(i-=rb(c)?h[1]/2:c==="bottom"?h[1]:0),g2(t)){var y=t8(n,i,o,u,f);n=y[0],i=y[1]}o.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===t.length;return o&&D(n,function(s,l){var u=s.dataByAxis||[],f=t[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&D(u,function(v,c){var p=h[c]||{},d=v.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&v.value===p.value&&v.axisType===p.axisType&&v.axisId===p.axisId&&d.length===g.length,o&&D(d,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&D(v.seriesDataIndices,function(y){var m=y.seriesIndex,_=a[m],S=i[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=a,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,a){yt.node||!a.getDom()||(Hs(this,"_updatePosition"),this._tooltipContent.dispose(),Md("itemTooltip",a))},e.type="tooltip",e}(Ft);function Ko(r,e,t){var a=e.ecModel,n;t?(n=new Mt(t,a,a),n=new Mt(e.option,n,a)):n=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof Mt&&(o=o.get("tooltip",!0)),Y(o)&&(o={formatter:o}),o&&(n=new Mt(o,n,a)))}return n}function eb(r,e){return r.dispatchAction||X(e.dispatchAction,e)}function j6(r,e,t,a,n,i,o){var s=t.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>a?r-=l+i:r+=i),o!=null&&(e+u+o>n?e-=u+o:e+=o),[r,e]}function t8(r,e,t,a,n){var i=t.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,a)-o,e=Math.min(e+s,n)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function e8(r,e,t,a){var n=t[0],i=t[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=e.width,f=e.height;switch(r){case"inside":s=e.x+u/2-n/2,l=e.y+f/2-i/2;break;case"top":s=e.x+u/2-n/2,l=e.y-i-o;break;case"bottom":s=e.x+u/2-n/2,l=e.y+f+o;break;case"left":s=e.x-n-o,l=e.y+f/2-i/2;break;case"right":s=e.x+u+o,l=e.y+f/2-i/2}return[s,l]}function rb(r){return r==="center"||r==="middle"}function r8(r,e,t){var a=ig(r).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=ol(e,n,a.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=nt(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}function a8(r){dt(Al),r.registerComponentModel(z6),r.registerComponentView(Q6),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Xt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Xt)}var n8=["rect","polygon","keep","clear"];function i8(r,e){var t=Pt(r?r.brush:[]);if(t.length){var a=[];D(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var n=r&&r.toolbox;z(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),o8(s),e&&!s.length&&s.push.apply(s,n8)}}function o8(r){var e={};D(r,function(t){e[t]=1}),r.length=0,D(e,function(t,a){r.push(a)})}var ab=D;function nb(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function kd(r,e,t){var a={};return ab(e,function(i){var o=a[i]=n();ab(r[i],function(s,l){if(ae.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new ae(u),l==="opacity"&&(u=rt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new ae(u))}})}),a;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function S2(r,e,t){var a;D(t,function(n){e.hasOwnProperty(n)&&nb(e[n])&&(a=!0)}),a&&D(t,function(n){e.hasOwnProperty(n)&&nb(e[n])?r[n]=rt(e[n]):delete r[n]})}function s8(r,e,t,a,n,i){var o={};D(r,function(h){var v=ae.prepareVisualTypes(e[h]);o[h]=v});var s;function l(h){return kg(t,s,h)}function u(h,v){FA(t,s,h,v)}t.each(f);function f(h,v){s=h;var c=t.getRawDataItem(s);if(!(c&&c.visualMap===!1))for(var p=a.call(n,h),d=e[p],g=o[p],y=0,m=g.length;ye[0][1]&&(e[0][1]=i[0]),i[1]e[1][1]&&(e[1][1]=i[1])}return e&&ub(e)}};function ub(r){return new ht(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var d8=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.ecModel=t,this.api=a,this.model,(this._brushController=new gy(a.getZr())).on("brush",X(this._onBrush,this)).mount()},e.prototype.render=function(t,a,n,i){this.model=t,this._updateController(t,a,n,i)},e.prototype.updateTransform=function(t,a,n,i){x2(a),this._updateController(t,a,n,i)},e.prototype.updateVisual=function(t,a,n,i){this.updateTransform(t,a,n,i)},e.prototype.updateView=function(t,a,n,i){this._updateController(t,a,n,i)},e.prototype._updateController=function(t,a,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var a=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:rt(n),$from:a}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:rt(n),$from:a})},e.type="brush",e}(Ft),g8="#ddd",y8=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&S2(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:g8},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=G(t,function(a){return fb(this.option,a)},this))},e.prototype.setBrushOption=function(t){this.brushOption=fb(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(mt);function fb(r,e){return ut({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Mt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var m8=["rect","polygon","lineX","lineY","keep","clear"],_8=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n){var i,o,s;a.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,D(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,a,n){this.render(t,a,n)},e.prototype.getIcons=function(){var t=this.model,a=t.get("icon",!0),n={};return D(t.get("type",!0),function(i){a[i]&&(n[i]=a[i])}),n},e.prototype.onclick=function(t,a,n){var i=this._brushType,o=this._brushMode;n==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?i:i===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var a={show:!0,type:m8.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return a},e}(er);function S8(r){r.registerComponentView(d8),r.registerComponentModel(y8),r.registerPreprocessor(i8),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,f8),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(a){a.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Xt),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Xt),Fi("brush",_8)}var x8=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(mt),b8=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){if(this.group.removeAll(),!!t.get("show")){var i=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=st(t.get("textBaseline"),t.get("textVerticalAlign")),f=new bt({style:Bt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),v=t.get("subtext"),c=new bt({style:Bt(s,{text:v,fill:s.getTextColor(),y:h.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),g=t.get("triggerEvent",!0);f.silent=!p&&!g,c.silent=!d&&!g,p&&f.on("click",function(){vf(p,"_"+t.get("target"))}),d&&c.on("click",function(){vf(d,"_"+t.get("subtarget"))}),nt(f).eventData=nt(c).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(f),v&&i.add(c);var y=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=Qt(m,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),i.x=_.x,i.y=_.y,i.markRedraw();var S={align:l,verticalAlign:u};f.setStyle(S),c.setStyle(S),y=i.getBoundingRect();var b=_.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var w=new St({shape:{x:y.x-b[3],y:y.y-b[0],width:y.width+b[1]+b[3],height:y.height+b[0]+b[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(w)}},e.type="title",e}(Ft);function w8(r){r.registerComponentModel(x8),r.registerComponentView(b8)}var hb=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var a=this._data.count();this.option.loop?t=(t%a+a)%a:(t>=a&&(t=a-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,a=t.data||[],n=t.axisType,i=this._names=[],o;n==="category"?(o=[],D(a,function(u,f){var h=Jt(vo(u),""),v;et(u)?(v=rt(u),v.value=f):v=f,o.push(v),i.push(h)})):o=a;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new Te([{name:"value",type:s}],this);l.initData(o,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(mt),b2=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=ja(hb.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(hb);Kt(b2,dh.prototype);var T8=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Ft),A8=function(r){k(e,r);function e(t,a,n,i){var o=r.call(this,t,a,n)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(wr),Hc=Math.PI,vb=xt(),C8=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.api=a},e.prototype.render=function(t,a,n){if(this.model=t,this.api=n,this.ecModel=a,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,t);t.formatTooltip=function(u){var f=l.scale.getLabel({value:u});return ie("nameValue",{noName:!0,value:f})},D(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,t)},this),this._renderAxisLabel(i,s,l,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,a){var n=t.get(["label","position"]),i=t.get("orient"),o=M8(t,a),s;n==null||n==="auto"?s=i==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:Hc/2},h=i==="vertical"?o.height:o.width,v=t.getModel("controlStyle"),c=v.get("show",!0),p=c?v.get("itemSize"):0,d=c?v.get("itemGap"):0,g=p+d,y=t.get(["label","rotate"])||0;y=y*Hc/180;var m,_,S,b=v.get("position",!0),x=c&&v.get("showPlayBtn",!0),w=c&&v.get("showPrevBtn",!0),T=c&&v.get("showNextBtn",!0),A=0,C=h;b==="left"||b==="bottom"?(x&&(m=[0,0],A+=g),w&&(_=[A,0],A+=g),T&&(S=[C-p,0],C-=g)):(x&&(m=[C-p,0],C-=g),w&&(_=[0,0],A+=g),T&&(S=[C-p,0],C-=g));var M=[A,C];return t.get("inverse")&&M.reverse(),{viewRect:o,mainLength:h,orient:i,rotation:f[i],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:_,nextBtnPosition:S,axisExtent:M,controlSize:p,controlGap:d}},e.prototype._position=function(t,a){var n=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=He(),l=o.x,u=o.y+o.height;Fr(s,s,[-l,-u]),si(s,s,-Hc/2),Fr(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var f=m(o),h=m(n.getBoundingRect()),v=m(i.getBoundingRect()),c=[n.x,n.y],p=[i.x,i.y];p[0]=c[0]=f[0][0];var d=t.labelPosOpt;if(d==null||Y(d)){var g=d==="+"?0:1;_(c,h,f,1,g),_(p,v,f,1,1-g)}else{var g=d>=0?0:1;_(c,h,f,1,g),p[1]=c[1]+d}n.setPosition(c),i.setPosition(p),n.rotation=i.rotation=t.rotation,y(n),y(i);function y(S){S.originX=f[0][0]-S.x,S.originY=f[1][0]-S.y}function m(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function _(S,b,x,w,T){S[w]+=x[w][T]-b[w][T]}},e.prototype._createAxis=function(t,a){var n=a.getData(),i=a.get("axisType"),o=D8(a,i);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var s=n.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new A8("value",o,t.axisExtent,i);return l.model=a,l},e.prototype._createGroup=function(t){var a=this[t]=new at;return this.group.add(a),a},e.prototype._renderAxisLine=function(t,a,n,i){var o=n.getExtent();if(i.get(["lineStyle","show"])){var s=new ee({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:V({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(s);var l=this._progressLine=new ee({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:j({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(l)}},e.prototype._renderAxisTick=function(t,a,n,i){var o=this,s=i.getData(),l=n.scale.getTicks();this._tickSymbols=[],D(l,function(u){var f=n.dataToCoord(u.value),h=s.getItemModel(u.value),v=h.getModel("itemStyle"),c=h.getModel(["emphasis","itemStyle"]),p=h.getModel(["progress","itemStyle"]),d={x:f,y:0,onclick:X(o._changeTimeline,o,u.value)},g=cb(h,v,a,d);g.ensureState("emphasis").style=c.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),$n(g);var y=nt(g);h.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,a,n,i){var o=this,s=n.getLabelModel();if(s.get("show")){var l=i.getData(),u=n.getViewLabels();this._tickLabels=[],D(u,function(f){var h=f.tickValue,v=l.getItemModel(h),c=v.getModel("label"),p=v.getModel(["emphasis","label"]),d=v.getModel(["progress","label"]),g=n.dataToCoord(f.tickValue),y=new bt({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:X(o._changeTimeline,o,h),silent:!1,style:Bt(c,{text:f.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=Bt(p),y.ensureState("progress").style=Bt(d),a.add(y),$n(y),vb(y).dataIndex=h,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,a,n,i){var o=t.controlSize,s=t.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),f=i.getPlayState(),h=i.get("inverse",!0);v(t.nextBtnPosition,"next",X(this._changeTimeline,this,h?"-":"+")),v(t.prevBtnPosition,"prev",X(this._changeTimeline,this,h?"+":"-")),v(t.playPosition,f?"stop":"play",X(this._handlePlayClick,this,!f),!0);function v(c,p,d,g){if(c){var y=Sr(st(i.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=I8(i,p+"Icon",m,{x:c[0],y:c[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});_.ensureState("emphasis").style=u,a.add(_),$n(_)}}},e.prototype._renderCurrentPointer=function(t,a,n,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,f={onCreate:function(h){h.draggable=!0,h.drift=X(u._handlePointerDrag,u),h.ondragend=X(u._handlePointerDragend,u),pb(h,u._progressLine,s,n,i,!0)},onUpdate:function(h){pb(h,u._progressLine,s,n,i)}};this._currentPointer=cb(l,l,this._mainGroup,{},this._currentPointer,f)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,a,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,a){var n=this._toAxisCoord(t)[0],i=this._axis,o=nr(i.getExtent().slice());n>o[1]&&(n=o[1]),n=0&&(o[i]=+o[i].toFixed(v)),[o,h]}var Wc={min:lt(Tu,"min"),max:lt(Tu,"max"),average:lt(Tu,"average"),median:lt(Tu,"median")};function rl(r,e){if(e){var t=r.getData(),a=r.coordinateSystem,n=a&&a.dimensions;if(!O8(e)&&!z(e.coord)&&z(n)){var i=w2(e,t,a,r);if(e=rt(e),e.type&&Wc[e.type]&&i.baseAxis&&i.valueAxis){var o=ct(n,i.baseAxis.dim),s=ct(n,i.valueAxis.dim),l=Wc[e.type](t,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!z(n))e.coord=[];else for(var u=e.coord,f=0;f<2;f++)Wc[u[f]]&&(u[f]=Zy(t,t.mapDimension(n[f]),u[f]));return e}}function w2(r,e,t,a){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,n.valueAxis=t.getAxis(N8(a,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function N8(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function al(r,e){return r&&r.containData&&e.coord&&!Nd(e)?r.containData(e.coord):!0}function B8(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Nd(e)&&!Nd(t)?r.containZone(e.coord,t.coord):!0}function T2(r,e){return r?function(t,a,n,i){var o=i<2?t.coord&&t.coord[i]:t.value;return Ha(o,e[i])}:function(t,a,n,i){return Ha(t.value,e[i])}}function Zy(r,e,t){if(t==="average"){var a=0,n=0;return r.each(e,function(i,o){isNaN(i)||(a+=i,n++)}),a/n}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var Uc=xt(),$y=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=$()},e.prototype.render=function(t,a,n){var i=this,o=this.markerGroupMap;o.each(function(s){Uc(s).keep=!1}),a.eachSeries(function(s){var l=ca.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,a,n)}),o.each(function(s){!Uc(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){Uc(t).keep=!0},e.prototype.toggleBlurSeries=function(t,a){var n=this;D(t,function(i){var o=ca.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?dT(l):vg(l))})}})},e.type="marker",e}(Ft);function gb(r,e,t){var a=e.coordinateSystem;r.each(function(n){var i=r.getItemModel(n),o,s=W(i.get("x"),t.getWidth()),l=W(i.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,n));else if(a){var u=r.get(a.dimensions[0],n),f=r.get(a.dimensions[1],n);o=a.dataToPoint([u,f])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(n,o)})}var V8=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=ca.getMarkerModelFromSeries(i,"markPoint");o&&(gb(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new ml),h=z8(o,t,a);a.setData(h),gb(a.getData(),t,i),h.each(function(v){var c=h.getItemModel(v),p=c.getShallow("symbol"),d=c.getShallow("symbolSize"),g=c.getShallow("symbolRotate"),y=c.getShallow("symbolOffset"),m=c.getShallow("symbolKeepAspect");if(J(p)||J(d)||J(g)||J(y)){var _=a.getRawValue(v),S=a.getDataParams(v);J(p)&&(p=p(_,S)),J(d)&&(d=d(_,S)),J(g)&&(g=g(_,S)),J(y)&&(y=y(_,S))}var b=c.getModel("itemStyle").getItemStyle(),x=pl(l,"color");b.fill||(b.fill=x),h.setItemVisual(v,{symbol:p,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:b})}),f.updateData(h),this.group.add(f.group),h.eachItemGraphicEl(function(v){v.traverse(function(c){nt(c).dataModel=a})}),this.markKeep(f),f.group.silent=a.get("silent")||t.get("silent")},e.type="markPoint",e}($y);function z8(r,e,t){var a;r?a=G(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return V(V({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Te(a,t),i=G(t.get("data"),lt(rl,e));r&&(i=Ct(i,lt(al,r)));var o=T2(!!r,a);return n.initData(i,null,o),n}function G8(r){r.registerComponentModel(k8),r.registerComponentView(V8),r.registerPreprocessor(function(e){Xy(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var F8=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(ca),Au=xt(),H8=function(r,e,t,a){var n=r.getData(),i;if(z(a))i=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=e.getAxis(a.yAxis!=null?"y":"x"),l=se(a.yAxis,a.xAxis);else{var u=w2(a,n,e,r);s=u.valueAxis;var f=gC(n,u.valueDataDim);l=Zy(n,f,o)}var h=s.dim==="x"?0:1,v=1-h,c=rt(a),p={coord:[]};c.type=null,c.coord=[],c.coord[v]=-1/0,p.coord[v]=1/0;var d=t.get("precision");d>=0&&wt(l)&&(l=+l.toFixed(Math.min(d,20))),c.coord[h]=p.coord[h]=l,i=[c,p,{type:o,valueIndex:a.valueIndex,value:l}]}else i=[]}var g=[rl(r,i[0]),rl(r,i[1]),V({},i[2])];return g[2].type=g[2].type||null,ut(g[2],g[0]),ut(g[2],g[1]),g};function Bf(r){return!isNaN(r)&&!isFinite(r)}function yb(r,e,t,a){var n=1-r,i=a.dimensions[r];return Bf(e[n])&&Bf(t[n])&&e[r]===t[r]&&a.getAxis(i).containData(e[r])}function W8(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,a=e[1].coord;if(t&&a&&(yb(1,t,a,r)||yb(0,t,a,r)))return!0}return al(r,e[0])&&al(r,e[1])}function Yc(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=W(o.get("x"),n.getWidth()),u=W(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,e));else{var f=i.dimensions,h=r.get(f[0],e),v=r.get(f[1],e);s=i.dataToPoint([h,v])}if(vi(i,"cartesian2d")){var c=i.getAxis("x"),p=i.getAxis("y"),f=i.dimensions;Bf(r.get(f[0],e))?s[0]=c.toGlobalCoord(c.getExtent()[t?0:1]):Bf(r.get(f[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var U8=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=ca.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=Au(o).from,u=Au(o).to;l.each(function(f){Yc(l,f,!0,i,n),Yc(u,f,!1,i,n)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new dy);this.group.add(f.group);var h=Y8(o,t,a),v=h.from,c=h.to,p=h.line;Au(a).from=v,Au(a).to=c,a.setData(p);var d=a.get("symbol"),g=a.get("symbolSize"),y=a.get("symbolRotate"),m=a.get("symbolOffset");z(d)||(d=[d,d]),z(g)||(g=[g,g]),z(y)||(y=[y,y]),z(m)||(m=[m,m]),h.from.each(function(S){_(v,S,!0),_(c,S,!1)}),p.each(function(S){var b=p.getItemModel(S).getModel("lineStyle").getLineStyle();p.setItemLayout(S,[v.getItemLayout(S),c.getItemLayout(S)]),b.stroke==null&&(b.stroke=v.getItemVisual(S,"style").fill),p.setItemVisual(S,{fromSymbolKeepAspect:v.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:v.getItemVisual(S,"symbolOffset"),fromSymbolRotate:v.getItemVisual(S,"symbolRotate"),fromSymbolSize:v.getItemVisual(S,"symbolSize"),fromSymbol:v.getItemVisual(S,"symbol"),toSymbolKeepAspect:c.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(S,"symbolOffset"),toSymbolRotate:c.getItemVisual(S,"symbolRotate"),toSymbolSize:c.getItemVisual(S,"symbolSize"),toSymbol:c.getItemVisual(S,"symbol"),style:b})}),f.updateData(p),h.line.eachItemGraphicEl(function(S){nt(S).dataModel=a,S.traverse(function(b){nt(b).dataModel=a})});function _(S,b,x){var w=S.getItemModel(b);Yc(S,b,x,t,i);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=pl(l,"color")),S.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:st(w.get("symbolOffset",!0),m[x?0:1]),symbolRotate:st(w.get("symbolRotate",!0),y[x?0:1]),symbolSize:st(w.get("symbolSize"),g[x?0:1]),symbol:st(w.get("symbol",!0),d[x?0:1]),style:T})}this.markKeep(f),f.group.silent=a.get("silent")||t.get("silent")},e.type="markLine",e}($y);function Y8(r,e,t){var a;r?a=G(r&&r.dimensions,function(u){var f=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return V(V({},f),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Te(a,t),i=new Te(a,t),o=new Te([],t),s=G(t.get("data"),lt(H8,e,r,t));r&&(s=Ct(s,lt(W8,r)));var l=T2(!!r,a);return n.initData(G(s,function(u){return u[0]}),null,l),i.initData(G(s,function(u){return u[1]}),null,l),o.initData(G(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}function X8(r){r.registerComponentModel(F8),r.registerComponentView(U8),r.registerPreprocessor(function(e){Xy(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Z8=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(ca),Cu=xt(),$8=function(r,e,t,a){var n=a[0],i=a[1];if(!(!n||!i)){var o=rl(r,n),s=rl(r,i),l=o.coord,u=s.coord;l[0]=se(l[0],-1/0),l[1]=se(l[1],-1/0),u[0]=se(u[0],1/0),u[1]=se(u[1],1/0);var f=$d([{},o,s]);return f.coord=[o.coord,s.coord],f.x0=o.x,f.y0=o.y,f.x1=s.x,f.y1=s.y,f}};function Vf(r){return!isNaN(r)&&!isFinite(r)}function mb(r,e,t,a){var n=1-r;return Vf(e[n])&&Vf(t[n])}function q8(r,e){var t=e.coord[0],a=e.coord[1],n={coord:t,x:e.x0,y:e.y0},i={coord:a,x:e.x1,y:e.y1};return vi(r,"cartesian2d")?t&&a&&(mb(1,t,a)||mb(0,t,a))?!0:B8(r,n,i):al(r,n)||al(r,i)}function _b(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=W(o.get(t[0]),n.getWidth()),u=W(o.get(t[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var f=r.getValues(["x0","y0"],e),h=r.getValues(["x1","y1"],e),v=i.clampData(f),c=i.clampData(h),p=[];t[0]==="x0"?p[0]=v[0]>c[0]?h[0]:f[0]:p[0]=v[0]>c[0]?f[0]:h[0],t[1]==="y0"?p[1]=v[1]>c[1]?h[1]:f[1]:p[1]=v[1]>c[1]?f[1]:h[1],s=a.getMarkerPosition(p,t,!0)}else{var d=r.get(t[0],e),g=r.get(t[1],e),y=[d,g];i.clampData&&i.clampData(y,y),s=i.dataToPoint(y,!0)}if(vi(i,"cartesian2d")){var m=i.getAxis("x"),_=i.getAxis("y"),d=r.get(t[0],e),g=r.get(t[1],e);Vf(d)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):Vf(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var Sb=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],K8=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=ca.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=G(Sb,function(h){return _b(s,l,h,i,n)});s.setItemLayout(l,u);var f=s.getItemGraphicEl(l);f.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,{group:new at});this.group.add(f.group),this.markKeep(f);var h=J8(o,t,a);a.setData(h),h.each(function(v){var c=G(Sb,function(T){return _b(h,v,T,t,i)}),p=o.getAxis("x").scale,d=o.getAxis("y").scale,g=p.getExtent(),y=d.getExtent(),m=[p.parse(h.get("x0",v)),p.parse(h.get("x1",v))],_=[d.parse(h.get("y0",v)),d.parse(h.get("y1",v))];nr(m),nr(_);var S=!(g[0]>m[1]||g[1]_[1]||y[1]<_[0]),b=!S;h.setItemLayout(v,{points:c,allClipped:b});var x=h.getItemModel(v).getModel("itemStyle").getItemStyle(),w=pl(l,"color");x.fill||(x.fill=w,Y(x.fill)&&(x.fill=ju(x.fill,.4))),x.stroke||(x.stroke=w),h.setItemVisual(v,"style",x)}),h.diff(Cu(f).data).add(function(v){var c=h.getItemLayout(v);if(!c.allClipped){var p=new Ie({shape:{points:c.points}});h.setItemGraphicEl(v,p),f.group.add(p)}}).update(function(v,c){var p=Cu(f).data.getItemGraphicEl(c),d=h.getItemLayout(v);d.allClipped?p&&f.group.remove(p):(p?Tt(p,{shape:{points:d.points}},a,v):p=new Ie({shape:{points:d.points}}),h.setItemGraphicEl(v,p),f.group.add(p))}).remove(function(v){var c=Cu(f).data.getItemGraphicEl(v);f.group.remove(c)}).execute(),h.eachItemGraphicEl(function(v,c){var p=h.getItemModel(c),d=h.getItemVisual(c,"style");v.useStyle(h.getItemVisual(c,"style")),ve(v,ne(p),{labelFetcher:a,labelDataIndex:c,defaultText:h.getName(c)||"",inheritColor:Y(d.fill)?ju(d.fill,1):"#000"}),he(v,p),Ht(v,null,null,p.get(["emphasis","disabled"])),nt(v).dataModel=a}),Cu(f).data=h,f.group.silent=a.get("silent")||t.get("silent")},e.type="markArea",e}($y);function J8(r,e,t){var a,n,i=["x0","y0","x1","y1"];if(r){var o=G(r&&r.dimensions,function(u){var f=e.getData(),h=f.getDimensionInfo(f.mapDimension(u))||{};return V(V({},h),{name:u,ordinalMeta:null})});n=G(i,function(u,f){return{name:u,type:o[f%2].type}}),a=new Te(n,t)}else n=[{name:"value",type:"float"}],a=new Te(n,t);var s=G(t.get("data"),lt($8,e,r,t));r&&(s=Ct(s,lt(q8,r)));var l=r?function(u,f,h,v){var c=u.coord[Math.floor(v/2)][v%2];return Ha(c,n[v])}:function(u,f,h,v){return Ha(u.value,n[v])};return a.initData(s,null,l),a.hasItemOption=!0,a}function Q8(r){r.registerComponentModel(Z8),r.registerComponentView(K8),r.registerPreprocessor(function(e){Xy(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var j8=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},Bd=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),this._updateSelector(t)},e.prototype._updateSelector=function(t){var a=t.selector,n=this.ecModel;a===!0&&(a=t.selector=["all","inverse"]),z(a)&&D(a,function(i,o){Y(i)&&(i={type:i}),a[o]=ut(i,j8(n,i.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var a=!1,n=0;n=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(mt),Ei=lt,Vd=D,Du=at,A2=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new Du),this.group.add(this._selectorGroup=new Du),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,a,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,a,n,l,s,u);var f=t.getBoxLayoutParams(),h={width:n.getWidth(),height:n.getHeight()},v=t.get("padding"),c=Qt(f,h,v),p=this.layoutInner(t,o,c,i,l,u),d=Qt(j({width:p.width,height:p.height},f),h,v);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=c2(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,a,n,i,o,s,l){var u=this.getContentGroup(),f=$(),h=a.get("selectedMode"),v=[];n.eachRawSeries(function(c){!c.get("legendHoverLink")&&v.push(c.id)}),Vd(a.getData(),function(c,p){var d=c.get("name");if(!this.newlineDisabled&&(d===""||d===` +`)){var g=new Du;g.newline=!0,u.add(g);return}var y=n.getSeriesByName(d)[0];if(!f.get(d))if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},S=m.getVisual("legendIcon"),b=m.getVisual("style"),x=this._createItem(y,d,p,c,a,t,_,b,S,h,i);x.on("click",Ei(xb,d,null,i,v)).on("mouseover",Ei(zd,y.name,null,i,v)).on("mouseout",Ei(Gd,y.name,null,i,v)),n.ssr&&x.eachChild(function(w){var T=nt(w);T.seriesIndex=y.seriesIndex,T.dataIndex=p,T.ssrType="legend"}),f.set(d,!0)}else n.eachRawSeries(function(w){if(!f.get(d)&&w.legendVisualProvider){var T=w.legendVisualProvider;if(!T.containName(d))return;var A=T.indexOfName(d),C=T.getItemVisual(A,"style"),M=T.getItemVisual(A,"legendIcon"),I=We(C.fill);I&&I[3]===0&&(I[3]=.2,C=V(V({},C),{fill:aa(I,"rgba")}));var L=this._createItem(w,d,p,c,a,t,{},C,M,h,i);L.on("click",Ei(xb,null,d,i,v)).on("mouseover",Ei(zd,null,d,i,v)).on("mouseout",Ei(Gd,null,d,i,v)),n.ssr&&L.eachChild(function(P){var R=nt(P);R.seriesIndex=w.seriesIndex,R.dataIndex=p,R.ssrType="legend"}),f.set(d,!0)}},this)},this),o&&this._createSelector(o,a,i,s,l)},e.prototype._createSelector=function(t,a,n,i,o){var s=this.getSelectorGroup();Vd(t,function(u){var f=u.type,h=new bt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(h);var v=a.getModel("selectorLabel"),c=a.getModel(["emphasis","selectorLabel"]);ve(h,{normal:v,emphasis:c},{defaultText:u.title}),$n(h)})},e.prototype._createItem=function(t,a,n,i,o,s,l,u,f,h,v){var c=t.visualDrawType,p=o.get("itemWidth"),d=o.get("itemHeight"),g=o.isSelected(a),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var S=tU(f,i,l,u,c,g,v),b=new Du,x=i.getModel("textStyle");if(J(t.getLegendIcon)&&(!_||_==="inherit"))b.add(t.getLegendIcon({itemWidth:p,itemHeight:d,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var w=_==="inherit"&&t.getData().getVisual("symbol")?y==="inherit"?t.getData().getVisual("symbolRotate"):y:0;b.add(eU({itemWidth:p,itemHeight:d,icon:f,iconRotate:w,itemStyle:S.itemStyle,symbolKeepAspect:m}))}var T=s==="left"?p+5:-5,A=s,C=o.get("formatter"),M=a;Y(C)&&C?M=C.replace("{name}",a??""):J(C)&&(M=C(a));var I=g?x.getTextColor():i.get("inactiveColor");b.add(new bt({style:Bt(x,{text:M,x:T,y:d/2,fill:I,align:A,verticalAlign:"middle"},{inheritColor:I})}));var L=new St({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=i.getModel("tooltip");return P.get("show")&&li({el:L,componentModel:o,itemName:a,itemTooltipOption:P.option}),b.add(L),b.eachChild(function(R){R.silent=!0}),L.silent=!h,this.getContentGroup().add(b),$n(b),b.__legendDataIndex=n,b},e.prototype.layoutInner=function(t,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Kn(t.get("orient"),l,t.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){Kn("horizontal",u,t.get("selectorItemGap",!0));var v=u.getBoundingRect(),c=[-v.x,-v.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,g=d===0?"width":"height",y=d===0?"height":"width",m=d===0?"y":"x";s==="end"?c[d]+=f[g]+p:h[d]+=v[g]+p,c[1-d]+=f[y]/2-v[y]/2,u.x=c[0],u.y=c[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[g]=f[g]+p+v[g],_[y]=Math.max(f[y],v[y]),_[m]=Math.min(0,v[m]+c[1-d]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Ft);function tU(r,e,t,a,n,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),Vd(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?a.decal:ro(h,o),u.fill==="inherit"&&(u.fill=a[n]),u.stroke==="inherit"&&(u.stroke=a[f]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?a:t).opacity),s(u,a);var v=e.getModel("lineStyle"),c=v.getLineStyle();if(s(c,t),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),c.stroke==="auto"&&(c.stroke=a.fill),!i){var p=e.get("inactiveBorderWidth"),d=u[f];u.lineWidth=p==="auto"?a.lineWidth>0&&d?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),c.stroke=v.get("inactiveColor"),c.lineWidth=v.get("inactiveWidth")}return{itemStyle:u,lineStyle:c}}function eU(r){var e=r.icon||"roundRect",t=qt(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function xb(r,e,t,a){Gd(r,e,t,a),t.dispatchAction({type:"legendToggleSelect",name:r??e}),zd(r,e,t,a)}function C2(r){for(var e=r.getZr().storage.getDisplayList(),t,a=0,n=e.length;an[o],g=[-c.x,-c.y];a||(g[i]=f[u]);var y=[0,0],m=[-p.x,-p.y],_=st(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var S=t.get("pageButtonPosition",!0);S==="end"?m[i]+=n[o]-p[o]:y[i]+=p[o]+_}m[1-i]+=c[s]/2-p[s]/2,f.setPosition(g),h.setPosition(y),v.setPosition(m);var b={x:0,y:0};if(b[o]=d?n[o]:c[o],b[s]=Math.max(c[s],p[s]),b[l]=Math.min(0,p[l]+m[1-i]),h.__rectSize=n[o],d){var x={x:0,y:0};x[o]=Math.max(n[o]-p[o]-_,0),x[s]=b[s],h.setClipPath(new St({shape:x})),h.__rectSize=x[o]}else v.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&Tt(f,{x:w.contentPosition[0],y:w.contentPosition[1]},d?t:null),this._updatePageInfoView(t,w),b},e.prototype._pageGo=function(t,a,n){var i=this._getPageInfo(a)[t];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},e.prototype._updatePageInfoView=function(t,a){var n=this._controllerGroup;D(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",v=a[h]!=null,c=n.childOfName(f);c&&(c.setStyle("fill",v?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),c.cursor=v?"pointer":"default")});var i=n.childOfName("pageText"),o=t.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;i&&o&&i.setStyle("text",Y(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var a=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=Xc[o],l=Zc[o],u=this._findTargetItemIndex(a),f=n.children(),h=f[u],v=f.length,c=v?1:0,p={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return p;var d=S(h);p.contentPosition[o]=-d.s;for(var g=u+1,y=d,m=d,_=null;g<=v;++g)_=S(f[g]),(!_&&m.e>y.s+i||_&&!b(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),m=_;for(var g=u-1,y=d,m=d,_=null;g>=-1;--g)_=S(f[g]),(!_||!b(m,_.s))&&y.i=w&&x.s<=w+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var a,n=this.getContentGroup(),i;return n.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===t&&(a=s)}),a??i},e.type="legend.scroll",e}(A2);function oU(r){r.registerAction("legendScroll","legendscroll",function(e,t){var a=e.scrollDataIndex;a!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(n){n.setScrollDataIndex(a)})})}function sU(r){dt(D2),r.registerComponentModel(nU),r.registerComponentView(iU),oU(r)}function lU(r){dt(D2),dt(sU)}var uU=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=ja(el.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(el),qy=xt();function fU(r,e,t){qy(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(e.uid);n&&(n.getRange=t)})}function hU(r,e){for(var t=qy(r).coordSysRecordMap,a=t.keys(),n=0;na[t+e]&&(e=s),n=n&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function gU(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var a=qy(t),n=a.coordSysRecordMap||(a.coordSysRecordMap=$());n.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=f2(i);D(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,vU(t,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=$());f.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),n.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){M2(n,i);return}var f=dU(l);o.enable(f.controlType,f.opt),o.setPointerChecker(i.containsPoint),bo(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var yU=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,a,n){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),fU(n,t,{pan:X($c.pan,this),zoom:X($c.zoom,this),scrollMove:X($c.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){hU(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(Gy),$c={zoom:function(r,e,t,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(o){var s=qc[e](null,[a.originX,a.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/a.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(pi(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:Ab(function(r,e,t,a,n,i){var o=qc[a]([i.oldX,i.oldY],[i.newX,i.newY],e,n,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:Ab(function(r,e,t,a,n,i){var o=qc[a]([0,0],[i.scrollDelta,i.scrollDelta],e,n,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function Ab(r){return function(e,t,a,n){var i=this.range,o=i.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,a,n);if(pi(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var qc={grid:function(r,e,t,a,n){var i=t.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,a,n){var i=t.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,a,n){var i=t.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function I2(r){Fy(r),r.registerComponentModel(uU),r.registerComponentView(yU),gU(r)}var mU=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=ja(el.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(el),jo=St,Cb=7,_U=1,Kc=30,SU=7,ts="horizontal",Db="vertical",xU=5,bU=["line","bar","candlestick","scatter"],wU={easing:"cubicOut",duration:100,delay:0},TU=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,a){this.api=a,this._onBrush=X(this._onBrush,this),this._onBrushEnd=X(this._onBrushEnd,this)},e.prototype.render=function(t,a,n,i){if(r.prototype.render.apply(this,arguments),bo(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Hs(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new at;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(a),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,a=this.api,n=t.get("brushSelect"),i=n?SU:0,o=this._findCoordRect(),s={width:a.getWidth(),height:a.getHeight()},l=this._orient===ts?{right:s.width-o.x-o.width,top:s.height-Kc-Cb-i,width:o.width,height:Kc}:{right:Cb,top:o.y,width:Kc,height:o.height},u=_o(t.option);D(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=l[h])});var f=Qt(u,s);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===Db&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,a=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===ts&&!o?{scaleY:l?1:-1,scaleX:1}:n===ts&&o?{scaleY:l?1:-1,scaleX:-1}:n===Db&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=a.x-u.x,t.y=a.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new jo({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new jo({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:X(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var a=this._size,n=this._shadowSize||[],i=t.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var h=o.getDataExtent(l),v=(h[1]-h[0])*.3;h=[h[0]-v,h[1]+v];var c=[0,a[1]],p=[0,a[0]],d=[[a[0],0],[0,0]],g=[],y=p[1]/(o.count()-1),m=0,_=Math.round(o.count()/a[0]),S;o.each([l],function(A,C){if(_>0&&C%_){m+=y;return}var M=A==null||isNaN(A)||A==="",I=M?0:Dt(A,h,c,!0);M&&!S&&C?(d.push([d[d.length-1][0],0]),g.push([g[g.length-1][0],0])):!M&&S&&(d.push([m,0]),g.push([m,0])),d.push([m,I]),g.push([m,I]),m+=y,S=M}),u=this._shadowPolygonPts=d,f=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var b=this.dataZoomModel;function x(A){var C=b.getModel(A?"selectedDataBackground":"dataBackground"),M=new at,I=new Ie({shape:{points:u},segmentIgnoreThreshold:1,style:C.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),L=new Le({shape:{points:f},segmentIgnoreThreshold:1,style:C.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return M.add(I),M.add(L),M}for(var w=0;w<3;w++){var T=x(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,a=t.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();D(l,function(u){if(!n&&!(a!==!0&&ct(bU,u.get("type"))<0)){var f=i.getComponent(za(o),s).axis,h=AU(o),v,c=u.coordinateSystem;h!=null&&c.getOtherAxis&&(v=c.getOtherAxis(f).inverse),h=u.getData().mapDimension(h),n={thisAxis:f,series:u,thisDim:o,otherDim:h,otherAxisInverse:v}}},this)},this),n}},e.prototype._renderHandle=function(){var t=this.group,a=this._displayables,n=a.handles=[null,null],i=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,h=l.get("brushSelect"),v=a.filler=new jo({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(v),o.add(new jo({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:_U,fill:"rgba(0,0,0,0)"}})),D([0,1],function(_){var S=l.get("handleIcon");!df[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var b=qt(S,-1,0,2,2,null,!0);b.attr({cursor:Mb(this._orient),draggable:!0,drift:X(this._onDragMove,this,_),ondragend:X(this._onDragEnd,this),onmouseover:X(this._showDataInfo,this,!0),onmouseout:X(this._showDataInfo,this,!1),z2:5});var x=b.getBoundingRect(),w=l.get("handleSize");this._handleHeight=W(w,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),$n(b);var T=l.get("handleColor");T!=null&&(b.style.fill=T),o.add(n[_]=b);var A=l.getModel("textStyle"),C=l.get("handleLabel")||{},M=C.show||!1;t.add(i[_]=new bt({silent:!0,invisible:!M,style:Bt(A,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:A.getTextColor(),font:A.getFont()}),z2:10}))},this);var c=v;if(h){var p=W(l.get("moveHandleSize"),s[1]),d=a.moveHandle=new St({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,y=a.moveHandleIcon=qt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+p/2-.5,d.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(p,10));c=a.moveZone=new St({invisible:!0,shape:{y:s[1]-m,height:p+m}}),c.on("mouseover",function(){u.enterEmphasis(d)}).on("mouseout",function(){u.leaveEmphasis(d)}),o.add(d),o.add(y),o.add(c)}c.attr({draggable:!0,cursor:Mb(this._orient),drift:X(this._onDragMove,this,"all"),ondragstart:X(this._showDataInfo,this,!0),ondragend:X(this._onDragEnd,this),onmouseover:X(this._showDataInfo,this,!0),onmouseout:X(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[Dt(t[0],[0,100],a,!0),Dt(t[1],[0,100],a,!0)]},e.prototype._updateInterval=function(t,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];pi(a,i,o,n.get("zoomLock")?"all":t,s.minSpan!=null?Dt(s.minSpan,l,o,!0):null,s.maxSpan!=null?Dt(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=nr([Dt(i[0],o,l,!0),Dt(i[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},e.prototype._updateView=function(t){var a=this._displayables,n=this._handleEnds,i=nr(n.slice()),o=this._size;D([0,1],function(c){var p=a.handles[c],d=this._handleHeight;p.attr({scaleX:d/2,scaleY:d/2,x:n[c]+(c?-1:1),y:o[1]/2-d/2})},this),a.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,i[0],i[1],o[0]],f=0;fa[0]||n[1]<0||n[1]>a[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var a=t.offsetX,n=t.offsetY;this._brushStart=new ft(a,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var n=a.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=nr([Dt(n.x,o,s,!0),Dt(n.x+n.width,o,s,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(oa(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new jo({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,a),f=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:h[1]})},e.prototype._dispatchZoomAction=function(t){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?wU:null,start:a[0],end:a[1]})},e.prototype._findCoordRect=function(){var t,a=f2(this.dataZoomModel).infoList;if(!t&&a.length){var n=a[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(Gy);function AU(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function Mb(r){return r==="vertical"?"ns-resize":"ew-resize"}function L2(r){r.registerComponentModel(mU),r.registerComponentView(TU),Fy(r)}function CU(r){dt(I2),dt(L2)}var P2={get:function(r,e,t){var a=rt((DU[r]||{})[e]);return t&&z(a)?a[a.length-1]:a}},DU={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Ib=ae.mapVisual,MU=ae.eachVisual,IU=z,Lb=D,LU=nr,PU=Dt,zf=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&S2(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var a=this.stateList;t=X(t,this),this.controllerVisuals=kd(this.option.controller,a,t),this.targetVisuals=kd(this.option.target,a,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,a=[];return t==null||t==="all"?this.ecModel.eachSeries(function(n,i){a.push(i)}):a=Pt(t),a},e.prototype.eachTargetSeries=function(t,a){D(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(a,i)},this)},e.prototype.isTargetSeries=function(t){var a=!1;return this.eachTargetSeries(function(n){n===t&&(a=!0)}),a},e.prototype.formatValueText=function(t,a,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],z(t)&&(t=t.slice(),u=!0);var f=a?t:u?[h(t[0]),h(t[1])]:h(t);if(Y(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(J(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?n[0]+" "+f[1]:t[1]===s[1]?n[1]+" "+f[0]:f[0]+" - "+f[1];return f;function h(v){return v===s[0]?"min":v===s[1]?"max":(+v).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,a=LU([t.min,t.max]);this._dataExtent=a},e.prototype.getDataDimensionIndex=function(t){var a=this.option.dimension;if(a!=null)return t.getDimensionIndex(a);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});ut(i,n),ut(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),f.call(this,o);function l(h){IU(a.color)&&!h.inRange&&(h.inRange={color:a.color.slice().reverse()}),h.inRange=h.inRange||{color:t.get("gradientColor")}}function u(h,v,c){var p=h[v],d=h[c];p&&!d&&(d=h[c]={},Lb(p,function(g,y){if(ae.isValidType(y)){var m=P2.get(y,"inactive",s);m!=null&&(d[y]=m,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function f(h){var v=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,c=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";Lb(this.stateList,function(y){var m=this.itemSize,_=h[y];_||(_=h[y]={color:s?p:[p]}),_.symbol==null&&(_.symbol=v&&rt(v)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=c&&rt(c)||(s?m[0]:[m[0],m[0]])),_.symbol=Ib(_.symbol,function(x){return x==="none"?g:x});var S=_.symbolSize;if(S!=null){var b=-1/0;MU(S,function(x){x>b&&(b=x)}),_.symbolSize=Ib(S,function(x){return PU(x,[0,b],[0,m[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(mt),Pb=[20,140],RU=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=Pb[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=Pb[1])},e.prototype._resetRange=function(){var t=this.getExtent(),a=this.option.range;!a||a.auto?(t.auto=1,this.option.range=t):z(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],t[0]),a[1]=Math.min(a[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),D(this.stateList,function(t){var a=this.option.controller[t].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),a=nr((this.get("range")||[]).slice());return a[0]>t[1]&&(a[0]=t[1]),a[1]>t[1]&&(a[1]=t[1]),a[0]=n[1]||t<=a[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},e.prototype.getVisualMeta=function(t){var a=Rb(this,"outOfRange",this.getExtent()),n=Rb(this,"inRange",this.option.range.slice()),i=[];function o(c,p){i.push({value:c,color:t(c,p)})}for(var s=0,l=0,u=n.length,f=a.length;lt[1])break;i.push({color:this.getControllerVisual(l,"color",a),offset:s/n})}return i.push({color:this.getControllerVisual(t[1],"color",a),offset:1}),i},e.prototype._createBarPoints=function(t,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-a[1],t[1]]]},e.prototype._createBarGroup=function(t){var a=this._orient,n=this.visualMapModel.get("inverse");return new at(a==="horizontal"&&!n?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,a){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent(),f=this._applyTransform("left",n.mainGroup);EU([0,1],function(h){var v=o[h];v.setStyle("fill",a.handlesColor[h]),v.y=t[h];var c=Lr(t[h],[0,l[1]],u,!0),p=this.getControllerVisual(c,"symbolSize");v.scaleX=v.scaleY=p/l[0],v.x=l[0]-p/2;var d=_r(n.handleLabelPoints[h],qn(v,this.group));if(this._orient==="horizontal"){var g=f==="left"||f==="top"?(l[0]-p)/2:(l[0]-p)/-2;d[1]+=g}s[h].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,a,n,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,h=f.indicator;if(h){h.attr("invisible",!1);var v={convertOpacityToAlpha:!0},c=this.getControllerVisual(t,"color",v),p=this.getControllerVisual(t,"symbolSize"),d=Lr(t,s,u,!0),g=l[0]-p/2,y={x:h.x,y:h.y};h.y=d,h.x=g;var m=_r(f.indicatorLabelPoint,qn(h,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),b=this._orient,x=b==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:x?S:"middle",align:x?"center":S});var w={x:g,y:d,style:{fill:c}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var A={duration:100,easing:"cubicInOut",additive:!0};h.x=y.x,h.y=y.y,h.animateTo(w,A),_.animateTo(T,A)}else h.attr(w),_.attr(T);this._firstShowIndicator=!1;var C=this._shapes.handleLabels;if(C)for(var M=0;Mo[1]&&(h[1]=1/0),a&&(h[0]===-1/0?this._showIndicator(f,h[1],"< ",l):h[1]===1/0?this._showIndicator(f,h[0],"> ",l):this._showIndicator(f,f,"≈ ",l));var v=this._hoverLinkDataIndices,c=[];(a||Nb(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(h));var p=UL(v,c);this._dispatchHighDown("downplay",$u(p[0],n)),this._dispatchHighDown("highlight",$u(p[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var a;if(Gn(t.target,function(l){var u=nt(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var n=this.ecModel.getSeriesByIndex(a.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(a.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var n=0;n=0&&(i.dimension=o,a.push(i))}}),r.getData().setVisual("visualMeta",a)}}];function FU(r,e,t,a){for(var n=e.targetVisuals[a],i=ae.prepareVisualTypes(n),o={color:pl(r.getData(),"color")},s=0,l=i.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(VU,zU),D(GU,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(HU))}function O2(r){r.registerComponentModel(RU),r.registerComponentView(NU),k2(r)}var WU=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],UU[this._mode].call(this,this._pieceList),this._resetSelected(t,a);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=rt(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=G(this._pieceList,function(l){return l=rt(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,a={},n=ae.listVisualTypes(),i=this.isCategory();D(t.pieces,function(s){D(n,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),D(a,function(s,l){var u=!1;D(this.stateList,function(f){u=u||o(t,f,l)||o(t.target,f,l)},this),!u&&D(this.stateList,function(f){(t[f]||(t[f]={}))[l]=P2.get(l,f==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,a){var n=this.option,i=this._pieceList,o=(a?n:t).selected||{};if(n.selected=o,D(i,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),n.selectedMode==="single"){var s=!1;D(i,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=rt(t)},e.prototype.getValueState=function(t){var a=ae.findPieceIndex(t,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=ae.findPieceIndex(l,n);f===t&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},e.prototype.getRepresentValue=function(t){var a;if(this.isCategory())a=t.value;else if(t.value!=null)a=t.value;else{var n=t.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(f,h){var v=i.getRepresentValue({interval:f});h||(h=i.getValueState(v));var c=t(v,h);f[0]===-1/0?n[0]=c:f[1]===1/0?n[1]=c:a.push({value:f[0],color:c},{value:f[1],color:c})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return D(s,function(f){var h=f.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:a,outerColors:n}},e.type="visualMap.piecewise",e.defaultOption=ja(zf.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(zf),UU={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),a=this.getExtent(),n=e.splitNumber;n=Math.max(parseInt(n,10),1),e.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o","≥"][a[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,n)},this)}};function Gb(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var YU=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=i.getFont(),s=i.getTextColor(),l=this._getItemAlign(),u=a.itemSize,f=this._getViewData(),h=f.endsText,v=se(a.get("showLabel",!0),!h),c=!a.get("selectedMode");h&&this._renderEndsText(t,h[0],u,v,l),D(f.viewPieceList,function(p){var d=p.piece,g=new at;g.onclick=X(this._onItemClick,this,d),this._enableHoverLink(g,p.indexInModelPieceList);var y=a.getRepresentValue(d);if(this._createItemSymbol(g,y,[0,0,u[0],u[1]],c),v){var m=this.visualMapModel.getValueState(y);g.add(new bt({style:{x:l==="right"?-n:u[0]+n,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:m==="outOfRange"?.5:1},silent:c}))}t.add(g)},this),h&&this._renderEndsText(t,h[1],u,v,l),Kn(a.get("orient"),t,a.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,a){var n=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:$u(s.findTargetDataIndices(a),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,a=t.option;if(a.orient==="vertical")return E2(t,this.api,t.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},e.prototype._renderEndsText=function(t,a,n,i,o){if(a){var s=new at,l=this.visualMapModel.textStyleModel;s.add(new bt({style:Bt(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,a=G(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},e.prototype._createItemSymbol=function(t,a,n,i){var o=qt(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color"));o.silent=i,t.add(o)},e.prototype._onItemClick=function(t){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(i){var o=rt(n.selected),s=a.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,D(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(R2);function N2(r){r.registerComponentModel(WU),r.registerComponentView(YU),k2(r)}function XU(r){dt(O2),dt(N2)}var ZU={label:{enabled:!0},decal:{show:!1}},Fb=xt(),$U={};function qU(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var a=rt(ZU);ut(a.label,r.getLocaleModel().get("aria"),!1),ut(t.option,a,!1),n(),i();function n(){var u=t.getModel("decal"),f=u.get("show");if(f){var h=$();r.eachSeries(function(v){if(!v.isColorBySeries()){var c=h.get(v.type);c||(c={},h.set(v.type,c)),Fb(v).scope=c}}),r.eachRawSeries(function(v){if(r.isSeriesFiltered(v))return;if(J(v.enableAriaDecal)){v.enableAriaDecal();return}var c=v.getData();if(v.isColorBySeries()){var m=Gp(v.ecModel,v.name,$U,r.getSeriesCount()),_=c.getVisual("decal");c.setVisual("decal",S(_,m))}else{var p=v.getRawData(),d={},g=Fb(v).scope;c.each(function(b){var x=c.getRawIndex(b);d[x]=b});var y=p.count();p.each(function(b){var x=d[b],w=p.getName(b)||b+"",T=Gp(v.ecModel,w,g,y),A=c.getItemVisual(x,"decal");c.setItemVisual(x,"decal",S(A,T))})}function S(b,x){var w=b?V(V({},x),b):x;return w.dirty=!0,w}})}}function i(){var u=e.getZr().dom;if(u){var f=r.getLocaleModel().get("aria"),h=t.getModel("label");if(h.option=j(h.option,f),!!h.get("enabled")){if(u.setAttribute("role","img"),h.get("description")){u.setAttribute("aria-label",h.get("description"));return}var v=r.getSeriesCount(),c=h.get(["data","maxCount"])||10,p=h.get(["series","maxCount"])||10,d=Math.min(v,p),g;if(!(v<1)){var y=s();if(y){var m=h.get(["general","withTitle"]);g=o(m,{title:y})}else g=h.get(["general","withoutTitle"]);var _=[],S=v>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);g+=o(S,{seriesCount:v}),r.eachSeries(function(T,A){if(A1?h.get(["series","multiple",I]):h.get(["series","single",I]),C=o(C,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var L=T.getData();if(L.count()>c){var P=h.get(["data","partialData"]);C+=o(P,{displayCnt:c})}else C+=h.get(["data","allData"]);for(var R=h.get(["data","separator","middle"]),E=h.get(["data","separator","end"]),N=h.get(["data","excludeDimensionId"]),O=[],B=0;B":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},QU=function(){function r(e){var t=this._condVal=Y(e)?new RegExp(e):fI(e)?e:null;if(t==null){var a="";At(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return Y(t)?this._condVal.test(e):wt(t)?this._condVal.test(e+""):!1},r}(),jU=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),t7=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&a.push(n),n=[L,P]}function f(L,P,R,E){Yi(L,R)&&Yi(P,E)||n.push(L,P,R,E,R,E)}function h(L,P,R,E,N,O){var B=Math.abs(P-L),F=Math.tan(B/4)*4/3,H=PT:M2&&a.push(n),a}function Hd(r,e,t,a,n,i,o,s,l,u){if(Yi(r,t)&&Yi(e,a)&&Yi(n,o)&&Yi(i,s)){l.push(o,s);return}var f=2/u,h=f*f,v=o-r,c=s-e,p=Math.sqrt(v*v+c*c);v/=p,c/=p;var d=t-r,g=a-e,y=n-o,m=i-s,_=d*d+g*g,S=y*y+m*m;if(_=0&&T=0){l.push(o,s);return}var A=[],C=[];Xa(r,t,n,o,.5,A),Xa(e,a,i,s,.5,C),Hd(A[0],C[0],A[1],C[1],A[2],C[2],A[3],C[3],l,u),Hd(A[4],C[4],A[5],C[5],A[6],C[6],A[7],C[7],l,u)}function p7(r,e){var t=Fd(r),a=[];e=e||1;for(var n=0;n0)for(var u=0;uMath.abs(u),h=V2([l,u],f?0:1,e),v=(f?s:u)/h.length,c=0;cn,o=V2([a,n],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",f=i?"y":"x",h=r[s]/o.length,v=0;v1?null:new ft(d*l+r,d*u+e)}function y7(r,e,t){var a=new ft;ft.sub(a,t,e),a.normalize();var n=new ft;ft.sub(n,r,e);var i=n.dot(a);return i}function Oi(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function m7(r,e,t){for(var a=r.length,n=[],i=0;io?(u.x=f.x=s+i/2,u.y=l,f.y=l+o):(u.y=f.y=l+o/2,u.x=s,f.x=s+i),m7(e,u,f)}function Gf(r,e,t,a){if(t===1)a.push(e);else{var n=Math.floor(t/2),i=r(e);Gf(r,i[0],n,a),Gf(r,i[1],t-n,a)}return a}function _7(r,e){for(var t=[],a=0;a0;u/=2){var f=0,h=0;(r&u)>0&&(f=1),(e&u)>0&&(h=1),s+=u*u*(3*f^h),h===0&&(f===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function Wf(r){var e=1/0,t=1/0,a=-1/0,n=-1/0,i=G(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),f=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return e=Math.min(f,e),t=Math.min(h,t),a=Math.max(f,a),n=Math.max(h,n),[f,h]}),o=G(i,function(s,l){return{cp:s,z:M7(s[0],s[1],e,t,a,n),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function F2(r){return b7(r.path,r.count)}function Wd(){return{fromIndividuals:[],toIndividuals:[],count:0}}function I7(r,e,t){var a=[];function n(b){for(var x=0;x=0;n--)if(!t[n].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[n].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var P7={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;Kb(r)&&(u=r,f=e),Kb(e)&&(u=e,f=r);function h(y,m,_,S,b){var x=y.many,w=y.one;if(x.length===1&&!b){var T=m?x[0]:w,A=m?w:x[0];if(Ff(T))h({many:[T],one:A},!0,_,S,!0);else{var C=s?j({delay:s(_,S)},l):l;Jy(T,A,C),i(T,A,T,A,C)}}else for(var M=j({dividePath:P7[t],individualDelay:s&&function(N,O,B,F){return s(N+_,S)}},l),I=m?I7(x,w,M):L7(w,x,M),L=I.fromIndividuals,P=I.toIndividuals,R=L.length,E=0;Ee.length,c=u?Jb(f,u):Jb(v?e:r,[v?r:e]),p=0,d=0;dH2))for(var i=a.getIndices(),o=0;o0&&x.group.traverse(function(T){T instanceof gt&&!T.animators.length&&T.animateFrom({style:{opacity:0}},w)})})}function rw(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function aw(r){return z(r)?r.sort().join(","):r}function La(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function V7(r,e){var t=$(),a=$(),n=$();return D(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=rw(i),f=aw(u);a.set(f,{dataGroupId:s,data:l}),z(u)&&D(u,function(h){n.set(h,{key:f,dataGroupId:s,data:l})})}),D(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=rw(i),u=aw(l),f=a.get(u);if(f)t.set(u,{oldSeries:[{dataGroupId:f.dataGroupId,divide:La(f.data),data:f.data}],newSeries:[{dataGroupId:o,divide:La(s),data:s}]});else if(z(l)){var h=[];D(l,function(p){var d=a.get(p);d.data&&h.push({dataGroupId:d.dataGroupId,divide:La(d.data),data:d.data})}),h.length&&t.set(u,{oldSeries:h,newSeries:[{dataGroupId:o,data:s,divide:La(s)}]})}else{var v=n.get(l);if(v){var c=t.get(v.key);c||(c={oldSeries:[{dataGroupId:v.dataGroupId,data:v.data,divide:La(v.data)}],newSeries:[]},t.set(v.key,c)),c.newSeries.push({dataGroupId:o,data:s,divide:La(s)})}}}}),t}function nw(r,e){for(var t=0;t=0&&n.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:La(e.oldData[s]),groupIdDim:o.dimension})}),D(Pt(r.to),function(o){var s=nw(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:La(l),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&W2(n,i,a)}function G7(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){D(Pt(a.seriesTransition),function(n){D(Pt(n.to),function(i){for(var o=a.updatedSeries,s=0;s(A.CLASSIC_CASINO="CLASSIC_CASINO",A.NEON_CYBER="NEON_CYBER",A.MINIMAL_FLAT="MINIMAL_FLAT",A.LUXURY_GOLD="LUXURY_GOLD",A.PLAYFUL_CARTOON="PLAYFUL_CARTOON",A.RUSTIC_WOOD="RUSTIC_WOOD",A.GALAXY_SPACE="GALAXY_SPACE",A.CANDY_LAND="CANDY_LAND",A.FIRE_FLAME="FIRE_FLAME",A.CRYSTAL_ICE="CRYSTAL_ICE",A))(L||{});export{L as W}; diff --git a/apps/admin/dist/assets/index-S1RRhVeD.css b/apps/admin/dist/assets/index-S1RRhVeD.css new file mode 100644 index 0000000..8e39be4 --- /dev/null +++ b/apps/admin/dist/assets/index-S1RRhVeD.css @@ -0,0 +1 @@ +html,body{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}@-ms-viewport{width:device-width}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{-webkit-text-decoration:underline dotted;text-decoration:underline;text-decoration:underline dotted;border-bottom:0;cursor:help}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}pre,code,kbd,samp{font-size:1em;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;text-align:left;caption-side:bottom}input,button,select,optgroup,textarea{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{padding:0;border-style:none}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;margin:0;padding:0;border:0}legend{display:block;width:100%;max-width:100%;margin-bottom:.5em;padding:0;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{padding:.2em;background-color:#feffe6}@font-face{font-family:IRANSans;font-style:normal;font-weight:200;font-display:swap;src:url("/assets/IRANSansWeb(FaNum)_UltraLight-hW-WDKY9.woff2") format("woff2"),url("/assets/IRANSansWeb(FaNum)_UltraLight-X2tWVnbe.woff") format("woff")}@font-face{font-family:IRANSans;font-style:normal;font-weight:300;font-display:swap;src:url("/assets/IRANSansWeb(FaNum)_Light-B637MNLG.woff2") format("woff2"),url("/assets/IRANSansWeb(FaNum)_Light-Blhumvhg.woff") format("woff")}@font-face{font-family:IRANSans;font-style:normal;font-weight:400;font-display:swap;src:url("/assets/IRANSansWeb(FaNum)-BLA2CtIC.woff2") format("woff2"),url("/assets/IRANSansWeb(FaNum)-C2LCNwav.woff") format("woff")}@font-face{font-family:IRANSans;font-style:normal;font-weight:500;font-display:swap;src:url("/assets/IRANSansWeb(FaNum)_Medium-C2CKjrKB.woff2") format("woff2"),url("/assets/IRANSansWeb(FaNum)_Medium-DJxlPmBM.woff") format("woff")}@font-face{font-family:IRANSans;font-style:normal;font-weight:700;font-display:swap;src:url("/assets/IRANSansWeb(FaNum)_Bold-C8urhp07.woff2") format("woff2"),url("/assets/IRANSansWeb(FaNum)_Bold-DFiUzN7v.woff") format("woff")}@font-face{font-family:IRANSans;font-style:normal;font-weight:900;font-display:swap;src:url("/assets/IRANSansWeb(FaNum)_Black-BFAfOkt4.woff2") format("woff2"),url("/assets/IRANSansWeb(FaNum)_Black-BZZZWzNZ.woff") format("woff")}@font-face{font-family:"IRANSansWeb(FaNum)";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/IRANSansWeb(FaNum)-BLA2CtIC.woff2") format("woff2"),url("/assets/IRANSansWeb(FaNum)-C2LCNwav.woff") format("woff")}@font-face{font-family:"IRANSansWeb(FaNum)";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/IRANSansWeb(FaNum)_Bold-C8urhp07.woff2") format("woff2"),url("/assets/IRANSansWeb(FaNum)_Bold-DFiUzN7v.woff") format("woff")}*,*:before,*:after,body,button,input,select,textarea,.ant-typography,.ant-btn,.ant-input,.ant-table,.ant-statistic,.ant-statistic-content-value,.ant-statistic-content-value-int,.ant-statistic-content-value-decimal,.ant-pagination,.ant-pagination-item,.ant-pagination-total-text,.ant-badge,.ant-tag,.ant-card,.ant-modal,.ant-drawer,.ant-form-item-label,.ant-select,.ant-picker,.ant-dropdown{font-family:IRANSans,"IRANSansWeb(FaNum)",Tahoma,sans-serif!important;font-variant-numeric:normal!important}.ant-table-cell,.ant-statistic-content,.ant-statistic-title{font-family:IRANSans,"IRANSansWeb(FaNum)",Tahoma,sans-serif!important;font-variant-numeric:normal!important}body{margin:0;padding:0;direction:rtl;font-family:IRANSans,"IRANSansWeb(FaNum)",Tahoma,sans-serif;background-color:#f4f6fa;color:#1e293b;-webkit-font-smoothing:antialiased}.ant-table-wrapper .ant-table{border-radius:10px}.ant-table-wrapper .ant-table-thead>tr>th{background:#f8fafc!important;color:#475569!important;font-weight:600!important;font-size:13px!important;border-bottom:1px solid #e2e8f0!important;padding:13px 16px!important}.ant-table-wrapper .ant-table-tbody>tr>td{padding:12px 16px!important;border-bottom:1px solid #f1f5f9!important;transition:background-color .2s ease}.ant-table-wrapper .ant-table-tbody>tr:hover>td{background-color:#f8faff!important}.ant-table-wrapper .ant-pagination{margin:16px 0 8px!important}.action-dropdown-menu.ant-dropdown-menu{border-radius:10px;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000000d;border:1px solid #f1f5f9;padding:6px;min-width:170px}.action-dropdown-menu .ant-dropdown-menu-item{border-radius:6px;padding:8px 12px;font-size:13px;transition:all .15s ease}.action-dropdown-menu .ant-dropdown-menu-item:hover{background-color:#f1f5f9}.ant-modal{max-width:calc(100vw - 32px)}.ant-modal .ant-modal-content{border-radius:12px}.app-sider[data-v-addabc1f]{background:#fff!important;border-inline-end:1px solid #eaecf0!important;box-shadow:none!important;z-index:100;position:sticky!important;top:0!important;height:100vh!important;max-height:100vh!important;overflow:hidden!important;transition:all .2s cubic-bezier(.4,0,.2,1)}.app-sider[data-v-addabc1f] .ant-layout-sider-children{display:flex;flex-direction:column;height:100vh;max-height:100vh;overflow:hidden;background:#fff}.logo-box[data-v-addabc1f]{height:52px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid #f1f5f9;flex-shrink:0}.brand-wrap[data-v-addabc1f]{display:flex;align-items:center;gap:10px;cursor:pointer}.logo-emblem[data-v-addabc1f]{width:26px;height:26px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.logo-text[data-v-addabc1f]{color:#0f172a;font-size:15px;font-weight:700;margin:0;letter-spacing:-.2px;white-space:nowrap}.sider-collapse-btn[data-v-addabc1f]{background:transparent;border:none;cursor:pointer;color:#64748b;font-size:15px;width:28px;height:28px;border-radius:6px;display:flex;align-items:center;justify-content:center;transition:all .15s ease;padding:0}.sider-collapse-btn[data-v-addabc1f]:hover{background:#f1f5f9;color:#0f172a}.collapsed-toggle[data-v-addabc1f]{margin:0 auto}.search-container[data-v-addabc1f]{padding:12px 14px 6px;flex-shrink:0}.search-bar[data-v-addabc1f]{display:flex;align-items:center;gap:8px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:0 10px;height:36px;transition:all .2s ease}.search-bar[data-v-addabc1f]:focus-within{background:#fff;border-color:#4f46e5;box-shadow:0 0 0 2px #4f46e51f}.search-bar-icon[data-v-addabc1f]{color:#94a3b8;font-size:14px}.search-bar-input[data-v-addabc1f]{border:none;outline:none;background:transparent;font-size:12.5px;width:100%;color:#1e293b;font-family:inherit}.search-bar-input[data-v-addabc1f]::placeholder{color:#94a3b8}.clear-search-icon[data-v-addabc1f]{color:#cbd5e1;font-size:12px;cursor:pointer;transition:color .15s}.clear-search-icon[data-v-addabc1f]:hover{color:#64748b}.menu-scroll-wrap[data-v-addabc1f]{flex:1;overflow:hidden;padding:6px 10px 16px}.sider-nav[data-v-addabc1f],.nav-group[data-v-addabc1f]{display:flex;flex-direction:column}.nav-group-secondary[data-v-addabc1f]{margin-top:16px}.nav-group-header[data-v-addabc1f]{font-size:11px;font-weight:700;color:#94a3b8;padding:6px 12px;text-align:right;-webkit-user-select:none;user-select:none}.nav-group-items[data-v-addabc1f]{display:flex;flex-direction:column;gap:3px}.nav-link-item[data-v-addabc1f]{display:flex;align-items:center;gap:12px;height:40px;padding:0 12px;border-radius:8px;cursor:pointer;color:#475569;font-size:13.5px;font-weight:500;transition:all .15s ease;-webkit-user-select:none;user-select:none}.nav-link-icon[data-v-addabc1f]{font-size:17px;color:#64748b;flex-shrink:0;transition:color .15s ease}.nav-link-text[data-v-addabc1f]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nav-link-item[data-v-addabc1f]:hover:not(.is-active){background:#f1f5f9;color:#0f172a}.nav-link-item:hover:not(.is-active) .nav-link-icon[data-v-addabc1f]{color:#4f46e5}.nav-link-item.is-active[data-v-addabc1f]{background:#4f46e5!important;color:#fff!important;font-weight:600!important;box-shadow:0 3px 10px #4f46e547!important}.nav-link-item.is-active .nav-link-icon[data-v-addabc1f],.nav-link-item.is-active .nav-link-text[data-v-addabc1f]{color:#fff!important}.app-sider.ant-layout-sider-collapsed .nav-link-item[data-v-addabc1f]{justify-content:center;padding:0;width:40px;height:40px;margin:2px auto}.app-sider.ant-layout-sider-collapsed .nav-group-header[data-v-addabc1f]{display:none}.app-sider.ant-layout-sider-collapsed .nav-group-secondary[data-v-addabc1f]{margin-top:8px}.empty-search-text[data-v-addabc1f]{font-size:12px;color:#94a3b8;text-align:center;padding:20px 0}.app-header[data-v-addabc1f]{background:#fff;padding:0 28px;height:64px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e2e8f0;box-shadow:0 1px 3px #00000008}.header-title[data-v-addabc1f]{font-size:15px;font-weight:600;color:#1e293b}.user-profile-trigger[data-v-addabc1f]{display:inline-flex;align-items:center;gap:10px;padding:5px 12px;border-radius:10px;cursor:pointer;background:#f8fafc;border:1px solid #e2e8f0;transition:all .2s ease;-webkit-user-select:none;user-select:none}.user-profile-trigger[data-v-addabc1f]:hover{background:#f1f5f9;border-color:#cbd5e1;box-shadow:0 2px 6px #0000000a}.user-avatar[data-v-addabc1f]{background:linear-gradient(135deg,#6366f1,#4f46e5)!important;color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px #4f46e540}.user-info-text[data-v-addabc1f]{display:flex;flex-direction:column;text-align:right;line-height:1.3}.user-name[data-v-addabc1f]{font-size:13px;font-weight:600;color:#1e293b}.user-role-label[data-v-addabc1f]{font-size:11px;color:#64748b}.dropdown-chevron[data-v-addabc1f]{font-size:10px;color:#94a3b8;transition:transform .2s ease;margin-right:2px}.user-profile-trigger:hover .dropdown-chevron[data-v-addabc1f]{color:#4f46e5;transform:translateY(1px)}.user-dropdown-menu[data-v-addabc1f]{min-width:240px;padding:8px!important;border-radius:12px!important;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000000d!important}.dropdown-user-card[data-v-addabc1f]{padding:10px 12px;background:#f8fafc;border-radius:8px;margin-bottom:6px;border:1px solid #f1f5f9}.card-avatar-wrap[data-v-addabc1f]{display:flex;align-items:center;gap:12px}.card-avatar[data-v-addabc1f]{background:linear-gradient(135deg,#6366f1,#4f46e5)!important;color:#fff;flex-shrink:0}.card-text[data-v-addabc1f]{display:flex;flex-direction:column;overflow:hidden}.card-name[data-v-addabc1f]{font-size:13px;font-weight:700;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-sub[data-v-addabc1f]{font-size:11px;color:#64748b;margin-top:2px;direction:ltr;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-badge-row[data-v-addabc1f]{margin-top:8px;display:flex}.role-pill[data-v-addabc1f]{font-size:11px;border-radius:4px;margin:0}.dropdown-menu-item[data-v-addabc1f]{display:flex;align-items:center;gap:10px;font-size:13px;color:#334155;padding:4px 2px}.menu-item-icon[data-v-addabc1f]{font-size:14px;color:#64748b}.dropdown-menu-item:hover .menu-item-icon[data-v-addabc1f]{color:#4f46e5}.text-danger[data-v-addabc1f]{color:#ef4444!important;font-weight:500}.text-danger .menu-item-icon[data-v-addabc1f]{color:#ef4444!important}.app-content[data-v-addabc1f]{margin:24px;min-height:280px}.fade-slide-enter-active[data-v-addabc1f],.fade-slide-leave-active[data-v-addabc1f]{transition:opacity .2s ease,transform .2s ease}.fade-slide-enter-from[data-v-addabc1f]{opacity:0;transform:translateY(6px)}.fade-slide-leave-to[data-v-addabc1f]{opacity:0;transform:translateY(-6px)}.m-bottom-nav[data-v-ac1cee7c]{position:fixed;bottom:0;left:0;right:0;z-index:110;background:#fffffff5;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border-top:1px solid #e2e8f0;box-shadow:0 -8px 24px #0f172a0f}.m-bottom-nav__inner[data-v-ac1cee7c]{height:64px;display:flex;align-items:stretch;justify-content:space-around;padding:0 4px}.m-bottom-nav__safe[data-v-ac1cee7c]{height:env(safe-area-inset-bottom,0px)}.m-bottom-nav__item[data-v-ac1cee7c]{flex:1;border:none;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:#94a3b8;cursor:pointer;min-width:0;padding:6px 2px;transition:color .2s ease}.m-bottom-nav__icon-wrap[data-v-ac1cee7c]{width:36px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:14px;transition:all .22s ease}.m-bottom-nav__icon[data-v-ac1cee7c]{font-size:20px}.m-bottom-nav__label[data-v-ac1cee7c]{font-size:11px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.m-bottom-nav__item.is-active[data-v-ac1cee7c]{color:#4f46e5}.m-bottom-nav__item.is-active .m-bottom-nav__icon-wrap[data-v-ac1cee7c]{background:#eef2ff;transform:translateY(-2px) scale(1.05)}.m-bottom-nav__item:active .m-bottom-nav__icon-wrap[data-v-ac1cee7c]{transform:scale(.92)}.m-more-handle[data-v-ac1cee7c]{width:40px;height:4px;border-radius:4px;background:#cbd5e1;margin:0 auto 16px}.m-more-title[data-v-ac1cee7c]{font-size:15px;font-weight:700;color:#0f172a;margin-bottom:14px;text-align:center}.m-more-grid[data-v-ac1cee7c]{display:grid;grid-template-columns:1fr 1fr;gap:10px}.m-more-item[data-v-ac1cee7c]{border:1px solid #e2e8f0;background:#f8fafc;border-radius:14px;padding:14px 12px;display:flex;align-items:center;gap:10px;cursor:pointer;text-align:right}.m-more-item.is-active[data-v-ac1cee7c]{border-color:#c7d2fe;background:#eef2ff;color:#4f46e5}.m-more-item__icon[data-v-ac1cee7c]{width:40px;height:40px;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:center;font-size:18px;color:#4f46e5;box-shadow:0 2px 8px #0f172a0f}.m-more-item__label[data-v-ac1cee7c]{font-size:13px;font-weight:600;color:#1e293b}.m-more-profile[data-v-ac1cee7c]{margin-top:18px;padding-top:16px;border-top:1px solid #e2e8f0;display:flex;align-items:center;justify-content:space-between;gap:12px}.m-more-profile__info[data-v-ac1cee7c]{display:flex;align-items:center;gap:10px;min-width:0}.m-more-profile__avatar[data-v-ac1cee7c]{width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;flex-shrink:0}.m-more-profile__name[data-v-ac1cee7c]{font-size:13px;font-weight:700;color:#0f172a}.m-more-profile__email[data-v-ac1cee7c]{font-size:11px;color:#64748b;direction:ltr;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:160px}.m-more-logout[data-v-ac1cee7c]{border:none;background:#fef2f2;color:#ef4444;border-radius:12px;padding:10px 12px;font-size:12px;font-weight:700;display:inline-flex;align-items:center;gap:6px;cursor:pointer;flex-shrink:0}.m-topbar[data-v-f160c287]{position:sticky;top:0;z-index:100;background:linear-gradient(135deg,#4f46e5,#6366f1 55%,#7c3aed);color:#fff;box-shadow:0 4px 20px #4f46e547}.m-topbar--transparent[data-v-f160c287]{background:transparent;box-shadow:none}.m-topbar__safe[data-v-f160c287]{height:env(safe-area-inset-top,0px)}.m-topbar__inner[data-v-f160c287]{height:56px;display:grid;grid-template-columns:72px 1fr 72px;align-items:center;padding:0 8px}.m-topbar__title[data-v-f160c287]{margin:0;text-align:center;font-size:16px;font-weight:700;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#fff}.m-topbar__side[data-v-f160c287]{display:flex;align-items:center;gap:4px;min-height:48px}.m-topbar__side--start[data-v-f160c287]{justify-content:flex-start}.m-topbar__side--end[data-v-f160c287]{justify-content:flex-end}.m-topbar__btn[data-v-f160c287]{width:44px;height:44px;border:none;border-radius:12px;background:#ffffff24;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:16px;cursor:pointer}.m-topbar__btn[data-v-f160c287]:active{background:#ffffff47;transform:scale(.96)}[data-v-f160c287] .m-topbar-action{width:44px;height:44px;border:none;border-radius:12px;background:#ffffff24;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:16px;cursor:pointer}[data-v-f160c287] .m-topbar-action:active{background:#ffffff47;transform:scale(.96)}.mobile-shell[data-v-ba3e5f72]{min-height:100vh;min-height:100dvh;background:#f4f6fa;display:flex;flex-direction:column;overflow:hidden;position:relative}.mobile-shell__content[data-v-ba3e5f72]{flex:1;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}.mobile-shell--no-nav .mobile-shell__content[data-v-ba3e5f72]{padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}.mobile-shell__page[data-v-ba3e5f72]{min-height:100%}.m-slide-left-enter-active[data-v-ba3e5f72],.m-slide-left-leave-active[data-v-ba3e5f72],.m-slide-right-enter-active[data-v-ba3e5f72],.m-slide-right-leave-active[data-v-ba3e5f72]{transition:all .28s cubic-bezier(.22,1,.36,1)}.m-slide-left-enter-from[data-v-ba3e5f72]{opacity:0;transform:translate(-24px)}.m-slide-left-leave-to[data-v-ba3e5f72]{opacity:0;transform:translate(16px)}.m-slide-right-enter-from[data-v-ba3e5f72]{opacity:0;transform:translate(24px)}.m-slide-right-leave-to[data-v-ba3e5f72]{opacity:0;transform:translate(-16px)} diff --git a/apps/admin/dist/index.html b/apps/admin/dist/index.html new file mode 100644 index 0000000..097980e --- /dev/null +++ b/apps/admin/dist/index.html @@ -0,0 +1,39 @@ + + + + + + + + + + + + پنل مدیریت گردونه شانس و قرعه‌کشی + + + + + + + + +
+ + diff --git a/apps/admin/nginx.conf b/apps/admin/nginx.conf index a9ad253..b775ea3 100644 --- a/apps/admin/nginx.conf +++ b/apps/admin/nginx.conf @@ -1,9 +1,18 @@ server { listen 80; - server_name localhost; + server_name _; + + root /usr/share/nginx/html; + index index.html; + + # Docker's embedded DNS. Without re-resolving at request time, nginx caches the + # api container's IP from startup and keeps returning 502 ("no live upstreams") + # after the api container restarts with a new IP. + resolver 127.0.0.11 valid=10s ipv6=off; location /api/ { - proxy_pass http://api:3000/api/; + set $api_upstream http://luckywheel-api:3000; + proxy_pass $api_upstream$request_uri; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; @@ -15,7 +24,8 @@ server { } location /uploads/ { - proxy_pass http://api:3000/uploads/; + set $api_upstream http://luckywheel-api:3000; + proxy_pass $api_upstream$request_uri; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -23,8 +33,12 @@ server { } location / { - root /usr/share/nginx/html; - index index.html index.htm; try_files $uri $uri/ /index.html; } + + location ~* \.(?:ico|css|js|gif|jpe?g|png|woff2?|eot|ttf|svg)$ { + expires 6M; + access_log off; + add_header Cache-Control "public"; + } } diff --git a/apps/api/.dockerignore b/apps/api/.dockerignore new file mode 100644 index 0000000..74aad9e --- /dev/null +++ b/apps/api/.dockerignore @@ -0,0 +1,4 @@ +* +!release/ +!release/** +!Dockerfile diff --git a/apps/api/Dockerfile b/apps/api/Dockerfile index 4b6e1f2..1058fa1 100644 --- a/apps/api/Dockerfile +++ b/apps/api/Dockerfile @@ -1,28 +1,19 @@ -FROM node:20-alpine AS builder - -ENV PNPM_HOME="/pnpm" -ENV PATH="$PNPM_HOME:$PATH" -RUN apk add --no-cache openssl -RUN corepack enable pnpm +FROM docker.arvancloud.ir/node:20-bookworm +# Pre-built on the developer machine: +# pnpm build:release +# NOTE: full "bookworm" (not -slim/-alpine) on purpose — Prisma's query engine +# links against libssl.so.3, which the slim/alpine variants do not ship, and the +# deploy host cannot reach apt/apk mirrors to install it. WORKDIR /app -COPY . . +ENV NODE_ENV=production +# Vendored Prisma lives in ./vendor (not node_modules — that path is gitignored) +ENV NODE_PATH=/app/vendor +ENV PRISMA_QUERY_ENGINE_LIBRARY=/app/vendor/.prisma/client/libquery_engine-debian-openssl-3.0.x.so.node -RUN pnpm install --frozen-lockfile -RUN pnpm --filter @lucky-wheel/api exec prisma generate -RUN pnpm run build:types -RUN pnpm --filter @lucky-wheel/api build -RUN pnpm deploy --filter @lucky-wheel/api --prod /prod/api -RUN cp -r /app/node_modules/.pnpm/@prisma+client* /prod/api/node_modules/.pnpm/ - -FROM node:20-alpine AS runner - -RUN apk add --no-cache openssl - -WORKDIR /app -COPY --from=builder /prod/api . +COPY release/ ./ EXPOSE 3000 -CMD ["node", "dist/src/main"] +CMD ["node", "app.js"] diff --git a/apps/api/esbuild.release.config.cjs b/apps/api/esbuild.release.config.cjs new file mode 100644 index 0000000..7487d58 --- /dev/null +++ b/apps/api/esbuild.release.config.cjs @@ -0,0 +1,40 @@ +/** + * esbuild config for Docker release bundle (apps/api/release/app.js). + * Used by: node scripts/bundle-release.cjs + */ +const path = require('path'); +const { createRequire } = require('module'); + +const requireFromApi = createRequire(path.join(__dirname, 'package.json')); + +module.exports = { + entryPoints: [path.join(__dirname, 'dist/src/main.js')], + outfile: path.join(__dirname, 'release/app.js'), + bundle: true, + platform: 'node', + target: 'node20', + format: 'cjs', + // Prisma ships native binaries — keep out of the JS bundle and vendor into release/ + // Nest optional peers are required dynamically and are not used by this API. + external: [ + '@prisma/client', + '.prisma/client', + '@nestjs/microservices', + '@nestjs/microservices/*', + '@nestjs/websockets', + '@nestjs/websockets/*', + 'msgpackr-extract', + ], + plugins: [ + { + name: 'class-transformer-storage', + setup(build) { + build.onResolve({ filter: /^class-transformer\/storage$/ }, () => ({ + path: requireFromApi.resolve('class-transformer/cjs/storage.js'), + })); + }, + }, + ], + sourcemap: false, + logLevel: 'info', +}; diff --git a/apps/api/package.json b/apps/api/package.json index 63a43b1..c9cc800 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -4,6 +4,7 @@ "private": true, "scripts": { "build": "nest build", + "build:release": "pnpm exec prisma generate && node scripts/clean-dist.cjs && nest build && node scripts/bundle-release.cjs", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", "start": "nest start", "start:dev": "nest start --watch", @@ -30,7 +31,7 @@ "@nestjs/swagger": "^7.3.1", "@nestjs/throttler": "^5.1.2", "@prisma/client": "^5.14.0", - "bcrypt": "^5.1.1", + "bcryptjs": "^3.0.3", "bullmq": "^5.7.8", "class-transformer": "^0.5.1", "class-validator": "^0.14.1", @@ -48,7 +49,7 @@ "@nestjs/cli": "^10.3.2", "@nestjs/schematics": "^10.1.1", "@nestjs/testing": "^10.3.8", - "@types/bcrypt": "^5.0.2", + "@types/bcryptjs": "^3.0.0", "@types/express": "^4.17.21", "@types/jest": "^29.5.12", "@types/multer": "^1.4.11", @@ -56,6 +57,7 @@ "@types/passport-jwt": "^4.0.1", "@types/passport-local": "^1.0.38", "@types/supertest": "^6.0.2", + "esbuild": "^0.25.0", "jest": "^29.7.0", "prisma": "^5.14.0", "source-map-support": "^0.5.21", diff --git a/apps/api/prisma/schema.prisma b/apps/api/prisma/schema.prisma index a23a92e..3e91323 100644 --- a/apps/api/prisma/schema.prisma +++ b/apps/api/prisma/schema.prisma @@ -1,6 +1,7 @@ generator client { provider = "prisma-client-js" - binaryTargets = ["native", "linux-musl-openssl-3.0.x"] + // native = local Windows/macOS; debian-openssl-3.0.x = node:20-bookworm (Arvan) + binaryTargets = ["native", "debian-openssl-3.0.x"] } datasource db { diff --git a/apps/api/release/app.js b/apps/api/release/app.js new file mode 100644 index 0000000..69d7b31 --- /dev/null +++ b/apps/api/release/app.js @@ -0,0 +1,212330 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs +var tslib_es6_exports = {}; +__export(tslib_es6_exports, { + __addDisposableResource: () => __addDisposableResource, + __assign: () => __assign, + __asyncDelegator: () => __asyncDelegator, + __asyncGenerator: () => __asyncGenerator, + __asyncValues: () => __asyncValues, + __await: () => __await, + __awaiter: () => __awaiter, + __classPrivateFieldGet: () => __classPrivateFieldGet, + __classPrivateFieldIn: () => __classPrivateFieldIn, + __classPrivateFieldSet: () => __classPrivateFieldSet, + __createBinding: () => __createBinding, + __decorate: () => __decorate, + __disposeResources: () => __disposeResources, + __esDecorate: () => __esDecorate, + __exportStar: () => __exportStar, + __extends: () => __extends, + __generator: () => __generator, + __importDefault: () => __importDefault, + __importStar: () => __importStar, + __makeTemplateObject: () => __makeTemplateObject, + __metadata: () => __metadata, + __param: () => __param, + __propKey: () => __propKey, + __read: () => __read, + __rest: () => __rest, + __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, + __runInitializers: () => __runInitializers, + __setFunctionName: () => __setFunctionName, + __spread: () => __spread, + __spreadArray: () => __spreadArray, + __spreadArrays: () => __spreadArrays, + __values: () => __values, + default: () => tslib_es6_default +}); +function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} +function __param(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; +} +function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { + if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); + return f; + } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _2, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function(f) { + if (done) throw new TypeError("Cannot add initializers after decoration has completed"); + extraInitializers.push(accept(f || null)); + }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_2 = accept(result.get)) descriptor.get = _2; + if (_2 = accept(result.set)) descriptor.set = _2; + if (_2 = accept(result.init)) initializers.unshift(_2); + } else if (_2 = accept(result)) { + if (kind === "field") initializers.unshift(_2); + else descriptor[key] = _2; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; +} +function __runInitializers(thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; +} +function __propKey(x) { + return typeof x === "symbol" ? x : "".concat(x); +} +function __setFunctionName(f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); +} +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} +function __generator(thisArg, body) { + var _2 = { label: 0, sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_2 = 0)), _2) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _2.label++; + return { value: op[1], done: false }; + case 5: + _2.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _2.ops.pop(); + _2.trys.pop(); + continue; + default: + if (!(t = _2.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _2 = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _2.label = op[1]; + break; + } + if (op[0] === 6 && _2.label < t[1]) { + _2.label = t[1]; + t = op; + break; + } + if (t && _2.label < t[2]) { + _2.label = t[2]; + _2.ops.push(op); + break; + } + if (t[2]) _2.ops.pop(); + _2.trys.pop(); + continue; + } + op = body.call(thisArg, _2); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } +} +function __exportStar(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); +} +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function() { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; +} +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +} +function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l2 = from.length, ar; i < l2; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +} +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function awaitReturn(f) { + return function(v) { + return Promise.resolve(v).then(f, reject); + }; + } + function verb(n, f) { + if (g[n]) { + i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + if (f) i[n] = f(i[n]); + } + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } +} +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function(e) { + throw e; + }), verb("return"), i[Symbol.iterator] = function() { + return this; + }, i; + function verb(n, f) { + i[n] = o[n] ? function(v) { + return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; + } : f; + } +} +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve({ value: v2, done: d }); + }, reject); + } +} +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { + Object.defineProperty(cooked, "raw", { value: raw }); + } else { + cooked.raw = raw; + } + return cooked; +} +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; +} +function __importDefault(mod) { + return mod && mod.__esModule ? mod : { default: mod }; +} +function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +} +function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; +} +function __classPrivateFieldIn(state, receiver) { + if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); +} +function __addDisposableResource(env3, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { + try { + inner.call(this); + } catch (e) { + return Promise.reject(e); + } + }; + env3.stack.push({ value, dispose, async }); + } else if (async) { + env3.stack.push({ async: true }); + } + return value; +} +function __disposeResources(env3) { + function fail(e) { + env3.error = env3.hasError ? new _SuppressedError(e, env3.error, "An error was suppressed during disposal.") : e; + env3.hasError = true; + } + var r, s = 0; + function next() { + while (r = env3.stack.pop()) { + try { + if (!r.async && s === 1) return s = 0, env3.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { + fail(e); + return next(); + }); + } else s |= 1; + } catch (e) { + fail(e); + } + } + if (s === 1) return env3.hasError ? Promise.reject(env3.error) : Promise.resolve(); + if (env3.hasError) throw env3.error; + } + return next(); +} +function __rewriteRelativeImportExtension(path, preserveJsx) { + if (typeof path === "string" && /^\.\.?\//.test(path)) { + return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; + }); + } + return path; +} +var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; +var init_tslib_es6 = __esm({ + "../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs"() { + extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics(d, b); + }; + __assign = function() { + __assign = Object.assign || function __assign2(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + }; + tslib_es6_default = { + __extends, + __assign, + __rest, + __decorate, + __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, + __metadata, + __awaiter, + __generator, + __createBinding, + __exportStar, + __values, + __read, + __spread, + __spreadArrays, + __spreadArray, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject, + __importStar, + __importDefault, + __classPrivateFieldGet, + __classPrivateFieldSet, + __classPrivateFieldIn, + __addDisposableResource, + __disposeResources, + __rewriteRelativeImportExtension + }; + } +}); + +// ../../node_modules/.pnpm/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js +var require_Reflect = __commonJS({ + "../../node_modules/.pnpm/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js"() { + var Reflect2; + (function(Reflect3) { + (function(factory) { + var root = typeof globalThis === "object" ? globalThis : typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : sloppyModeThis(); + var exporter = makeExporter(Reflect3); + if (typeof root.Reflect !== "undefined") { + exporter = makeExporter(root.Reflect, exporter); + } + factory(exporter, root); + if (typeof root.Reflect === "undefined") { + root.Reflect = Reflect3; + } + function makeExporter(target, previous) { + return function(key, value) { + Object.defineProperty(target, key, { configurable: true, writable: true, value }); + if (previous) + previous(key, value); + }; + } + function functionThis() { + try { + return Function("return this;")(); + } catch (_2) { + } + } + function indirectEvalThis() { + try { + return (void 0, eval)("(function() { return this; })()"); + } catch (_2) { + } + } + function sloppyModeThis() { + return functionThis() || indirectEvalThis(); + } + })(function(exporter, root) { + var hasOwn = Object.prototype.hasOwnProperty; + var supportsSymbol = typeof Symbol === "function"; + var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive"; + var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator"; + var supportsCreate = typeof Object.create === "function"; + var supportsProto = { __proto__: [] } instanceof Array; + var downLevel = !supportsCreate && !supportsProto; + var HashMap = { + // create an object in dictionary mode (a.k.a. "slow" mode in v8) + create: supportsCreate ? function() { + return MakeDictionary(/* @__PURE__ */ Object.create(null)); + } : supportsProto ? function() { + return MakeDictionary({ __proto__: null }); + } : function() { + return MakeDictionary({}); + }, + has: downLevel ? function(map, key) { + return hasOwn.call(map, key); + } : function(map, key) { + return key in map; + }, + get: downLevel ? function(map, key) { + return hasOwn.call(map, key) ? map[key] : void 0; + } : function(map, key) { + return map[key]; + } + }; + var functionPrototype = Object.getPrototypeOf(Function); + var _Map = typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill(); + var _Set = typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill(); + var _WeakMap = typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill(); + var registrySymbol = supportsSymbol ? Symbol.for("@reflect-metadata:registry") : void 0; + var metadataRegistry = GetOrCreateMetadataRegistry(); + var metadataProvider = CreateMetadataProvider(metadataRegistry); + function decorate(decorators, target, propertyKey, attributes) { + if (!IsUndefined(propertyKey)) { + if (!IsArray(decorators)) + throw new TypeError(); + if (!IsObject(target)) + throw new TypeError(); + if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes)) + throw new TypeError(); + if (IsNull(attributes)) + attributes = void 0; + propertyKey = ToPropertyKey(propertyKey); + return DecorateProperty(decorators, target, propertyKey, attributes); + } else { + if (!IsArray(decorators)) + throw new TypeError(); + if (!IsConstructor(target)) + throw new TypeError(); + return DecorateConstructor(decorators, target); + } + } + exporter("decorate", decorate); + function metadata(metadataKey, metadataValue) { + function decorator(target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey)) + throw new TypeError(); + OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey); + } + return decorator; + } + exporter("metadata", metadata); + function defineMetadata(metadataKey, metadataValue, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey); + } + exporter("defineMetadata", defineMetadata); + function hasMetadata(metadataKey, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryHasMetadata(metadataKey, target, propertyKey); + } + exporter("hasMetadata", hasMetadata); + function hasOwnMetadata(metadataKey, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey); + } + exporter("hasOwnMetadata", hasOwnMetadata); + function getMetadata(metadataKey, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryGetMetadata(metadataKey, target, propertyKey); + } + exporter("getMetadata", getMetadata); + function getOwnMetadata(metadataKey, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey); + } + exporter("getOwnMetadata", getOwnMetadata); + function getMetadataKeys(target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryMetadataKeys(target, propertyKey); + } + exporter("getMetadataKeys", getMetadataKeys); + function getOwnMetadataKeys(target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + return OrdinaryOwnMetadataKeys(target, propertyKey); + } + exporter("getOwnMetadataKeys", getOwnMetadataKeys); + function deleteMetadata(metadataKey, target, propertyKey) { + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + if (!IsObject(target)) + throw new TypeError(); + if (!IsUndefined(propertyKey)) + propertyKey = ToPropertyKey(propertyKey); + var provider = GetMetadataProvider( + target, + propertyKey, + /*Create*/ + false + ); + if (IsUndefined(provider)) + return false; + return provider.OrdinaryDeleteMetadata(metadataKey, target, propertyKey); + } + exporter("deleteMetadata", deleteMetadata); + function DecorateConstructor(decorators, target) { + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + var decorated = decorator(target); + if (!IsUndefined(decorated) && !IsNull(decorated)) { + if (!IsConstructor(decorated)) + throw new TypeError(); + target = decorated; + } + } + return target; + } + function DecorateProperty(decorators, target, propertyKey, descriptor) { + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + var decorated = decorator(target, propertyKey, descriptor); + if (!IsUndefined(decorated) && !IsNull(decorated)) { + if (!IsObject(decorated)) + throw new TypeError(); + descriptor = decorated; + } + } + return descriptor; + } + function OrdinaryHasMetadata(MetadataKey, O, P) { + var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn2) + return true; + var parent = OrdinaryGetPrototypeOf(O); + if (!IsNull(parent)) + return OrdinaryHasMetadata(MetadataKey, parent, P); + return false; + } + function OrdinaryHasOwnMetadata(MetadataKey, O, P) { + var provider = GetMetadataProvider( + O, + P, + /*Create*/ + false + ); + if (IsUndefined(provider)) + return false; + return ToBoolean(provider.OrdinaryHasOwnMetadata(MetadataKey, O, P)); + } + function OrdinaryGetMetadata(MetadataKey, O, P) { + var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn2) + return OrdinaryGetOwnMetadata(MetadataKey, O, P); + var parent = OrdinaryGetPrototypeOf(O); + if (!IsNull(parent)) + return OrdinaryGetMetadata(MetadataKey, parent, P); + return void 0; + } + function OrdinaryGetOwnMetadata(MetadataKey, O, P) { + var provider = GetMetadataProvider( + O, + P, + /*Create*/ + false + ); + if (IsUndefined(provider)) + return; + return provider.OrdinaryGetOwnMetadata(MetadataKey, O, P); + } + function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) { + var provider = GetMetadataProvider( + O, + P, + /*Create*/ + true + ); + provider.OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P); + } + function OrdinaryMetadataKeys(O, P) { + var ownKeys2 = OrdinaryOwnMetadataKeys(O, P); + var parent = OrdinaryGetPrototypeOf(O); + if (parent === null) + return ownKeys2; + var parentKeys = OrdinaryMetadataKeys(parent, P); + if (parentKeys.length <= 0) + return ownKeys2; + if (ownKeys2.length <= 0) + return parentKeys; + var set = new _Set(); + var keys = []; + for (var _i = 0, ownKeys_1 = ownKeys2; _i < ownKeys_1.length; _i++) { + var key = ownKeys_1[_i]; + var hasKey = set.has(key); + if (!hasKey) { + set.add(key); + keys.push(key); + } + } + for (var _a = 0, parentKeys_1 = parentKeys; _a < parentKeys_1.length; _a++) { + var key = parentKeys_1[_a]; + var hasKey = set.has(key); + if (!hasKey) { + set.add(key); + keys.push(key); + } + } + return keys; + } + function OrdinaryOwnMetadataKeys(O, P) { + var provider = GetMetadataProvider( + O, + P, + /*create*/ + false + ); + if (!provider) { + return []; + } + return provider.OrdinaryOwnMetadataKeys(O, P); + } + function Type(x) { + if (x === null) + return 1; + switch (typeof x) { + case "undefined": + return 0; + case "boolean": + return 2; + case "string": + return 3; + case "symbol": + return 4; + case "number": + return 5; + case "object": + return x === null ? 1 : 6; + default: + return 6; + } + } + function IsUndefined(x) { + return x === void 0; + } + function IsNull(x) { + return x === null; + } + function IsSymbol(x) { + return typeof x === "symbol"; + } + function IsObject(x) { + return typeof x === "object" ? x !== null : typeof x === "function"; + } + function ToPrimitive(input, PreferredType) { + switch (Type(input)) { + case 0: + return input; + case 1: + return input; + case 2: + return input; + case 3: + return input; + case 4: + return input; + case 5: + return input; + } + var hint = PreferredType === 3 ? "string" : PreferredType === 5 ? "number" : "default"; + var exoticToPrim = GetMethod(input, toPrimitiveSymbol); + if (exoticToPrim !== void 0) { + var result = exoticToPrim.call(input, hint); + if (IsObject(result)) + throw new TypeError(); + return result; + } + return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint); + } + function OrdinaryToPrimitive(O, hint) { + if (hint === "string") { + var toString_1 = O.toString; + if (IsCallable(toString_1)) { + var result = toString_1.call(O); + if (!IsObject(result)) + return result; + } + var valueOf = O.valueOf; + if (IsCallable(valueOf)) { + var result = valueOf.call(O); + if (!IsObject(result)) + return result; + } + } else { + var valueOf = O.valueOf; + if (IsCallable(valueOf)) { + var result = valueOf.call(O); + if (!IsObject(result)) + return result; + } + var toString_2 = O.toString; + if (IsCallable(toString_2)) { + var result = toString_2.call(O); + if (!IsObject(result)) + return result; + } + } + throw new TypeError(); + } + function ToBoolean(argument) { + return !!argument; + } + function ToString(argument) { + return "" + argument; + } + function ToPropertyKey(argument) { + var key = ToPrimitive( + argument, + 3 + /* String */ + ); + if (IsSymbol(key)) + return key; + return ToString(key); + } + function IsArray(argument) { + return Array.isArray ? Array.isArray(argument) : argument instanceof Object ? argument instanceof Array : Object.prototype.toString.call(argument) === "[object Array]"; + } + function IsCallable(argument) { + return typeof argument === "function"; + } + function IsConstructor(argument) { + return typeof argument === "function"; + } + function IsPropertyKey(argument) { + switch (Type(argument)) { + case 3: + return true; + case 4: + return true; + default: + return false; + } + } + function SameValueZero(x, y) { + return x === y || x !== x && y !== y; + } + function GetMethod(V, P) { + var func = V[P]; + if (func === void 0 || func === null) + return void 0; + if (!IsCallable(func)) + throw new TypeError(); + return func; + } + function GetIterator(obj2) { + var method = GetMethod(obj2, iteratorSymbol); + if (!IsCallable(method)) + throw new TypeError(); + var iterator = method.call(obj2); + if (!IsObject(iterator)) + throw new TypeError(); + return iterator; + } + function IteratorValue(iterResult) { + return iterResult.value; + } + function IteratorStep(iterator) { + var result = iterator.next(); + return result.done ? false : result; + } + function IteratorClose(iterator) { + var f = iterator["return"]; + if (f) + f.call(iterator); + } + function OrdinaryGetPrototypeOf(O) { + var proto = Object.getPrototypeOf(O); + if (typeof O !== "function" || O === functionPrototype) + return proto; + if (proto !== functionPrototype) + return proto; + var prototype = O.prototype; + var prototypeProto = prototype && Object.getPrototypeOf(prototype); + if (prototypeProto == null || prototypeProto === Object.prototype) + return proto; + var constructor = prototypeProto.constructor; + if (typeof constructor !== "function") + return proto; + if (constructor === O) + return proto; + return constructor; + } + function CreateMetadataRegistry() { + var fallback; + if (!IsUndefined(registrySymbol) && typeof root.Reflect !== "undefined" && !(registrySymbol in root.Reflect) && typeof root.Reflect.defineMetadata === "function") { + fallback = CreateFallbackProvider(root.Reflect); + } + var first; + var second; + var rest; + var targetProviderMap = new _WeakMap(); + var registry = { + registerProvider, + getProvider, + setProvider + }; + return registry; + function registerProvider(provider) { + if (!Object.isExtensible(registry)) { + throw new Error("Cannot add provider to a frozen registry."); + } + switch (true) { + case fallback === provider: + break; + case IsUndefined(first): + first = provider; + break; + case first === provider: + break; + case IsUndefined(second): + second = provider; + break; + case second === provider: + break; + default: + if (rest === void 0) + rest = new _Set(); + rest.add(provider); + break; + } + } + function getProviderNoCache(O, P) { + if (!IsUndefined(first)) { + if (first.isProviderFor(O, P)) + return first; + if (!IsUndefined(second)) { + if (second.isProviderFor(O, P)) + return first; + if (!IsUndefined(rest)) { + var iterator = GetIterator(rest); + while (true) { + var next = IteratorStep(iterator); + if (!next) { + return void 0; + } + var provider = IteratorValue(next); + if (provider.isProviderFor(O, P)) { + IteratorClose(iterator); + return provider; + } + } + } + } + } + if (!IsUndefined(fallback) && fallback.isProviderFor(O, P)) { + return fallback; + } + return void 0; + } + function getProvider(O, P) { + var providerMap = targetProviderMap.get(O); + var provider; + if (!IsUndefined(providerMap)) { + provider = providerMap.get(P); + } + if (!IsUndefined(provider)) { + return provider; + } + provider = getProviderNoCache(O, P); + if (!IsUndefined(provider)) { + if (IsUndefined(providerMap)) { + providerMap = new _Map(); + targetProviderMap.set(O, providerMap); + } + providerMap.set(P, provider); + } + return provider; + } + function hasProvider(provider) { + if (IsUndefined(provider)) + throw new TypeError(); + return first === provider || second === provider || !IsUndefined(rest) && rest.has(provider); + } + function setProvider(O, P, provider) { + if (!hasProvider(provider)) { + throw new Error("Metadata provider not registered."); + } + var existingProvider = getProvider(O, P); + if (existingProvider !== provider) { + if (!IsUndefined(existingProvider)) { + return false; + } + var providerMap = targetProviderMap.get(O); + if (IsUndefined(providerMap)) { + providerMap = new _Map(); + targetProviderMap.set(O, providerMap); + } + providerMap.set(P, provider); + } + return true; + } + } + function GetOrCreateMetadataRegistry() { + var metadataRegistry2; + if (!IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect)) { + metadataRegistry2 = root.Reflect[registrySymbol]; + } + if (IsUndefined(metadataRegistry2)) { + metadataRegistry2 = CreateMetadataRegistry(); + } + if (!IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect)) { + Object.defineProperty(root.Reflect, registrySymbol, { + enumerable: false, + configurable: false, + writable: false, + value: metadataRegistry2 + }); + } + return metadataRegistry2; + } + function CreateMetadataProvider(registry) { + var metadata2 = new _WeakMap(); + var provider = { + isProviderFor: function(O, P) { + var targetMetadata = metadata2.get(O); + if (IsUndefined(targetMetadata)) + return false; + return targetMetadata.has(P); + }, + OrdinaryDefineOwnMetadata: OrdinaryDefineOwnMetadata2, + OrdinaryHasOwnMetadata: OrdinaryHasOwnMetadata2, + OrdinaryGetOwnMetadata: OrdinaryGetOwnMetadata2, + OrdinaryOwnMetadataKeys: OrdinaryOwnMetadataKeys2, + OrdinaryDeleteMetadata + }; + metadataRegistry.registerProvider(provider); + return provider; + function GetOrCreateMetadataMap(O, P, Create) { + var targetMetadata = metadata2.get(O); + var createdTargetMetadata = false; + if (IsUndefined(targetMetadata)) { + if (!Create) + return void 0; + targetMetadata = new _Map(); + metadata2.set(O, targetMetadata); + createdTargetMetadata = true; + } + var metadataMap = targetMetadata.get(P); + if (IsUndefined(metadataMap)) { + if (!Create) + return void 0; + metadataMap = new _Map(); + targetMetadata.set(P, metadataMap); + if (!registry.setProvider(O, P, provider)) { + targetMetadata.delete(P); + if (createdTargetMetadata) { + metadata2.delete(O); + } + throw new Error("Wrong provider for target."); + } + } + return metadataMap; + } + function OrdinaryHasOwnMetadata2(MetadataKey, O, P) { + var metadataMap = GetOrCreateMetadataMap( + O, + P, + /*Create*/ + false + ); + if (IsUndefined(metadataMap)) + return false; + return ToBoolean(metadataMap.has(MetadataKey)); + } + function OrdinaryGetOwnMetadata2(MetadataKey, O, P) { + var metadataMap = GetOrCreateMetadataMap( + O, + P, + /*Create*/ + false + ); + if (IsUndefined(metadataMap)) + return void 0; + return metadataMap.get(MetadataKey); + } + function OrdinaryDefineOwnMetadata2(MetadataKey, MetadataValue, O, P) { + var metadataMap = GetOrCreateMetadataMap( + O, + P, + /*Create*/ + true + ); + metadataMap.set(MetadataKey, MetadataValue); + } + function OrdinaryOwnMetadataKeys2(O, P) { + var keys = []; + var metadataMap = GetOrCreateMetadataMap( + O, + P, + /*Create*/ + false + ); + if (IsUndefined(metadataMap)) + return keys; + var keysObj = metadataMap.keys(); + var iterator = GetIterator(keysObj); + var k = 0; + while (true) { + var next = IteratorStep(iterator); + if (!next) { + keys.length = k; + return keys; + } + var nextValue = IteratorValue(next); + try { + keys[k] = nextValue; + } catch (e) { + try { + IteratorClose(iterator); + } finally { + throw e; + } + } + k++; + } + } + function OrdinaryDeleteMetadata(MetadataKey, O, P) { + var metadataMap = GetOrCreateMetadataMap( + O, + P, + /*Create*/ + false + ); + if (IsUndefined(metadataMap)) + return false; + if (!metadataMap.delete(MetadataKey)) + return false; + if (metadataMap.size === 0) { + var targetMetadata = metadata2.get(O); + if (!IsUndefined(targetMetadata)) { + targetMetadata.delete(P); + if (targetMetadata.size === 0) { + metadata2.delete(targetMetadata); + } + } + } + return true; + } + } + function CreateFallbackProvider(reflect) { + var defineMetadata2 = reflect.defineMetadata, hasOwnMetadata2 = reflect.hasOwnMetadata, getOwnMetadata2 = reflect.getOwnMetadata, getOwnMetadataKeys2 = reflect.getOwnMetadataKeys, deleteMetadata2 = reflect.deleteMetadata; + var metadataOwner = new _WeakMap(); + var provider = { + isProviderFor: function(O, P) { + var metadataPropertySet = metadataOwner.get(O); + if (!IsUndefined(metadataPropertySet) && metadataPropertySet.has(P)) { + return true; + } + if (getOwnMetadataKeys2(O, P).length) { + if (IsUndefined(metadataPropertySet)) { + metadataPropertySet = new _Set(); + metadataOwner.set(O, metadataPropertySet); + } + metadataPropertySet.add(P); + return true; + } + return false; + }, + OrdinaryDefineOwnMetadata: defineMetadata2, + OrdinaryHasOwnMetadata: hasOwnMetadata2, + OrdinaryGetOwnMetadata: getOwnMetadata2, + OrdinaryOwnMetadataKeys: getOwnMetadataKeys2, + OrdinaryDeleteMetadata: deleteMetadata2 + }; + return provider; + } + function GetMetadataProvider(O, P, Create) { + var registeredProvider = metadataRegistry.getProvider(O, P); + if (!IsUndefined(registeredProvider)) { + return registeredProvider; + } + if (Create) { + if (metadataRegistry.setProvider(O, P, metadataProvider)) { + return metadataProvider; + } + throw new Error("Illegal state."); + } + return void 0; + } + function CreateMapPolyfill() { + var cacheSentinel = {}; + var arraySentinel = []; + var MapIterator = ( + /** @class */ + (function() { + function MapIterator2(keys, values, selector) { + this._index = 0; + this._keys = keys; + this._values = values; + this._selector = selector; + } + MapIterator2.prototype["@@iterator"] = function() { + return this; + }; + MapIterator2.prototype[iteratorSymbol] = function() { + return this; + }; + MapIterator2.prototype.next = function() { + var index = this._index; + if (index >= 0 && index < this._keys.length) { + var result = this._selector(this._keys[index], this._values[index]); + if (index + 1 >= this._keys.length) { + this._index = -1; + this._keys = arraySentinel; + this._values = arraySentinel; + } else { + this._index++; + } + return { value: result, done: false }; + } + return { value: void 0, done: true }; + }; + MapIterator2.prototype.throw = function(error) { + if (this._index >= 0) { + this._index = -1; + this._keys = arraySentinel; + this._values = arraySentinel; + } + throw error; + }; + MapIterator2.prototype.return = function(value) { + if (this._index >= 0) { + this._index = -1; + this._keys = arraySentinel; + this._values = arraySentinel; + } + return { value, done: true }; + }; + return MapIterator2; + })() + ); + var Map2 = ( + /** @class */ + (function() { + function Map3() { + this._keys = []; + this._values = []; + this._cacheKey = cacheSentinel; + this._cacheIndex = -2; + } + Object.defineProperty(Map3.prototype, "size", { + get: function() { + return this._keys.length; + }, + enumerable: true, + configurable: true + }); + Map3.prototype.has = function(key) { + return this._find( + key, + /*insert*/ + false + ) >= 0; + }; + Map3.prototype.get = function(key) { + var index = this._find( + key, + /*insert*/ + false + ); + return index >= 0 ? this._values[index] : void 0; + }; + Map3.prototype.set = function(key, value) { + var index = this._find( + key, + /*insert*/ + true + ); + this._values[index] = value; + return this; + }; + Map3.prototype.delete = function(key) { + var index = this._find( + key, + /*insert*/ + false + ); + if (index >= 0) { + var size = this._keys.length; + for (var i = index + 1; i < size; i++) { + this._keys[i - 1] = this._keys[i]; + this._values[i - 1] = this._values[i]; + } + this._keys.length--; + this._values.length--; + if (SameValueZero(key, this._cacheKey)) { + this._cacheKey = cacheSentinel; + this._cacheIndex = -2; + } + return true; + } + return false; + }; + Map3.prototype.clear = function() { + this._keys.length = 0; + this._values.length = 0; + this._cacheKey = cacheSentinel; + this._cacheIndex = -2; + }; + Map3.prototype.keys = function() { + return new MapIterator(this._keys, this._values, getKey); + }; + Map3.prototype.values = function() { + return new MapIterator(this._keys, this._values, getValue); + }; + Map3.prototype.entries = function() { + return new MapIterator(this._keys, this._values, getEntry); + }; + Map3.prototype["@@iterator"] = function() { + return this.entries(); + }; + Map3.prototype[iteratorSymbol] = function() { + return this.entries(); + }; + Map3.prototype._find = function(key, insert) { + if (!SameValueZero(this._cacheKey, key)) { + this._cacheIndex = -1; + for (var i = 0; i < this._keys.length; i++) { + if (SameValueZero(this._keys[i], key)) { + this._cacheIndex = i; + break; + } + } + } + if (this._cacheIndex < 0 && insert) { + this._cacheIndex = this._keys.length; + this._keys.push(key); + this._values.push(void 0); + } + return this._cacheIndex; + }; + return Map3; + })() + ); + return Map2; + function getKey(key, _2) { + return key; + } + function getValue(_2, value) { + return value; + } + function getEntry(key, value) { + return [key, value]; + } + } + function CreateSetPolyfill() { + var Set2 = ( + /** @class */ + (function() { + function Set3() { + this._map = new _Map(); + } + Object.defineProperty(Set3.prototype, "size", { + get: function() { + return this._map.size; + }, + enumerable: true, + configurable: true + }); + Set3.prototype.has = function(value) { + return this._map.has(value); + }; + Set3.prototype.add = function(value) { + return this._map.set(value, value), this; + }; + Set3.prototype.delete = function(value) { + return this._map.delete(value); + }; + Set3.prototype.clear = function() { + this._map.clear(); + }; + Set3.prototype.keys = function() { + return this._map.keys(); + }; + Set3.prototype.values = function() { + return this._map.keys(); + }; + Set3.prototype.entries = function() { + return this._map.entries(); + }; + Set3.prototype["@@iterator"] = function() { + return this.keys(); + }; + Set3.prototype[iteratorSymbol] = function() { + return this.keys(); + }; + return Set3; + })() + ); + return Set2; + } + function CreateWeakMapPolyfill() { + var UUID_SIZE = 16; + var keys = HashMap.create(); + var rootKey = CreateUniqueKey(); + return ( + /** @class */ + (function() { + function WeakMap2() { + this._key = CreateUniqueKey(); + } + WeakMap2.prototype.has = function(target) { + var table = GetOrCreateWeakMapTable( + target, + /*create*/ + false + ); + return table !== void 0 ? HashMap.has(table, this._key) : false; + }; + WeakMap2.prototype.get = function(target) { + var table = GetOrCreateWeakMapTable( + target, + /*create*/ + false + ); + return table !== void 0 ? HashMap.get(table, this._key) : void 0; + }; + WeakMap2.prototype.set = function(target, value) { + var table = GetOrCreateWeakMapTable( + target, + /*create*/ + true + ); + table[this._key] = value; + return this; + }; + WeakMap2.prototype.delete = function(target) { + var table = GetOrCreateWeakMapTable( + target, + /*create*/ + false + ); + return table !== void 0 ? delete table[this._key] : false; + }; + WeakMap2.prototype.clear = function() { + this._key = CreateUniqueKey(); + }; + return WeakMap2; + })() + ); + function CreateUniqueKey() { + var key; + do + key = "@@WeakMap@@" + CreateUUID(); + while (HashMap.has(keys, key)); + keys[key] = true; + return key; + } + function GetOrCreateWeakMapTable(target, create) { + if (!hasOwn.call(target, rootKey)) { + if (!create) + return void 0; + Object.defineProperty(target, rootKey, { value: HashMap.create() }); + } + return target[rootKey]; + } + function FillRandomBytes(buffer, size) { + for (var i = 0; i < size; ++i) + buffer[i] = Math.random() * 255 | 0; + return buffer; + } + function GenRandomBytes(size) { + if (typeof Uint8Array === "function") { + var array = new Uint8Array(size); + if (typeof crypto !== "undefined") { + crypto.getRandomValues(array); + } else if (typeof msCrypto !== "undefined") { + msCrypto.getRandomValues(array); + } else { + FillRandomBytes(array, size); + } + return array; + } + return FillRandomBytes(new Array(size), size); + } + function CreateUUID() { + var data = GenRandomBytes(UUID_SIZE); + data[6] = data[6] & 79 | 64; + data[8] = data[8] & 191 | 128; + var result = ""; + for (var offset = 0; offset < UUID_SIZE; ++offset) { + var byte = data[offset]; + if (offset === 4 || offset === 6 || offset === 8) + result += "-"; + if (byte < 16) + result += "0"; + result += byte.toString(16).toLowerCase(); + } + return result; + } + } + function MakeDictionary(obj2) { + obj2.__ = void 0; + delete obj2.__; + return obj2; + } + }); + })(Reflect2 || (Reflect2 = {})); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/bind.decorator.js +var require_bind_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/bind.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Bind = Bind; + function Bind(...decorators) { + return (target, key, descriptor) => { + decorators.forEach((fn, index) => fn(target, key, index)); + return descriptor; + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/constants.js +var require_constants = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ENTRY_PROVIDER_WATERMARK = exports2.CATCH_WATERMARK = exports2.CONTROLLER_WATERMARK = exports2.INJECTABLE_WATERMARK = exports2.VERSION_METADATA = exports2.SSE_METADATA = exports2.RESPONSE_PASSTHROUGH_METADATA = exports2.REDIRECT_METADATA = exports2.HEADERS_METADATA = exports2.MODULE_PATH = exports2.HTTP_CODE_METADATA = exports2.RENDER_METADATA = exports2.ENHANCER_KEY_TO_SUBTYPE_MAP = exports2.EXCEPTION_FILTERS_METADATA = exports2.INTERCEPTORS_METADATA = exports2.GUARDS_METADATA = exports2.PIPES_METADATA = exports2.FILTER_CATCH_EXCEPTIONS = exports2.CUSTOM_ROUTE_ARGS_METADATA = exports2.ROUTE_ARGS_METADATA = exports2.METHOD_METADATA = exports2.SCOPE_OPTIONS_METADATA = exports2.OPTIONAL_PROPERTY_DEPS_METADATA = exports2.PROPERTY_DEPS_METADATA = exports2.OPTIONAL_DEPS_METADATA = exports2.SELF_DECLARED_DEPS_METADATA = exports2.PARAMTYPES_METADATA = exports2.PATH_METADATA = exports2.HOST_METADATA = exports2.GLOBAL_MODULE_METADATA = exports2.MODULE_METADATA = void 0; + exports2.MODULE_METADATA = { + IMPORTS: "imports", + PROVIDERS: "providers", + CONTROLLERS: "controllers", + EXPORTS: "exports" + }; + exports2.GLOBAL_MODULE_METADATA = "__module:global__"; + exports2.HOST_METADATA = "host"; + exports2.PATH_METADATA = "path"; + exports2.PARAMTYPES_METADATA = "design:paramtypes"; + exports2.SELF_DECLARED_DEPS_METADATA = "self:paramtypes"; + exports2.OPTIONAL_DEPS_METADATA = "optional:paramtypes"; + exports2.PROPERTY_DEPS_METADATA = "self:properties_metadata"; + exports2.OPTIONAL_PROPERTY_DEPS_METADATA = "optional:properties_metadata"; + exports2.SCOPE_OPTIONS_METADATA = "scope:options"; + exports2.METHOD_METADATA = "method"; + exports2.ROUTE_ARGS_METADATA = "__routeArguments__"; + exports2.CUSTOM_ROUTE_ARGS_METADATA = "__customRouteArgs__"; + exports2.FILTER_CATCH_EXCEPTIONS = "__filterCatchExceptions__"; + exports2.PIPES_METADATA = "__pipes__"; + exports2.GUARDS_METADATA = "__guards__"; + exports2.INTERCEPTORS_METADATA = "__interceptors__"; + exports2.EXCEPTION_FILTERS_METADATA = "__exceptionFilters__"; + exports2.ENHANCER_KEY_TO_SUBTYPE_MAP = { + [exports2.GUARDS_METADATA]: "guard", + [exports2.INTERCEPTORS_METADATA]: "interceptor", + [exports2.PIPES_METADATA]: "pipe", + [exports2.EXCEPTION_FILTERS_METADATA]: "filter" + }; + exports2.RENDER_METADATA = "__renderTemplate__"; + exports2.HTTP_CODE_METADATA = "__httpCode__"; + exports2.MODULE_PATH = "__module_path__"; + exports2.HEADERS_METADATA = "__headers__"; + exports2.REDIRECT_METADATA = "__redirect__"; + exports2.RESPONSE_PASSTHROUGH_METADATA = "__responsePassthrough__"; + exports2.SSE_METADATA = "__sse__"; + exports2.VERSION_METADATA = "__version__"; + exports2.INJECTABLE_WATERMARK = "__injectable__"; + exports2.CONTROLLER_WATERMARK = "__controller__"; + exports2.CATCH_WATERMARK = "__catch__"; + exports2.ENTRY_PROVIDER_WATERMARK = "__entryProvider__"; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/catch.decorator.js +var require_catch_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/catch.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Catch = Catch; + var constants_1 = require_constants(); + function Catch(...exceptions) { + return (target) => { + Reflect.defineMetadata(constants_1.CATCH_WATERMARK, true, target); + Reflect.defineMetadata(constants_1.FILTER_CATCH_EXCEPTIONS, exceptions, target); + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/shared.utils.js +var require_shared_utils = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/shared.utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isSymbol = exports2.isEmpty = exports2.isNil = exports2.isConstructor = exports2.isNumber = exports2.isString = exports2.isFunction = exports2.stripEndSlash = exports2.normalizePath = exports2.addLeadingSlash = exports2.isPlainObject = exports2.isObject = exports2.isUndefined = void 0; + var isUndefined = (obj2) => typeof obj2 === "undefined"; + exports2.isUndefined = isUndefined; + var isObject2 = (fn) => !(0, exports2.isNil)(fn) && typeof fn === "object"; + exports2.isObject = isObject2; + var isPlainObject = (fn) => { + if (!(0, exports2.isObject)(fn)) { + return false; + } + const proto = Object.getPrototypeOf(fn); + if (proto === null) { + return true; + } + const ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof ctor === "function" && ctor instanceof ctor && Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object); + }; + exports2.isPlainObject = isPlainObject; + var addLeadingSlash = (path) => path && typeof path === "string" ? path.charAt(0) !== "/" ? "/" + path : path : ""; + exports2.addLeadingSlash = addLeadingSlash; + var normalizePath = (path) => path ? path.startsWith("/") ? ("/" + path.replace(/\/+$/, "")).replace(/\/+/g, "/") : "/" + path.replace(/\/+$/, "") : "/"; + exports2.normalizePath = normalizePath; + var stripEndSlash = (path) => path[path.length - 1] === "/" ? path.slice(0, path.length - 1) : path; + exports2.stripEndSlash = stripEndSlash; + var isFunction = (val) => typeof val === "function"; + exports2.isFunction = isFunction; + var isString = (val) => typeof val === "string"; + exports2.isString = isString; + var isNumber = (val) => typeof val === "number"; + exports2.isNumber = isNumber; + var isConstructor = (val) => val === "constructor"; + exports2.isConstructor = isConstructor; + var isNil = (val) => (0, exports2.isUndefined)(val) || val === null; + exports2.isNil = isNil; + var isEmpty = (array) => !(array && array.length > 0); + exports2.isEmpty = isEmpty; + var isSymbol = (val) => typeof val === "symbol"; + exports2.isSymbol = isSymbol; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/controller.decorator.js +var require_controller_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/controller.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Controller = Controller; + var constants_1 = require_constants(); + var shared_utils_1 = require_shared_utils(); + function Controller(prefixOrOptions) { + const defaultPath = "/"; + const [path, host, scopeOptions, versionOptions] = (0, shared_utils_1.isUndefined)(prefixOrOptions) ? [defaultPath, void 0, void 0, void 0] : (0, shared_utils_1.isString)(prefixOrOptions) || Array.isArray(prefixOrOptions) ? [prefixOrOptions, void 0, void 0, void 0] : [ + prefixOrOptions.path || defaultPath, + prefixOrOptions.host, + { scope: prefixOrOptions.scope, durable: prefixOrOptions.durable }, + Array.isArray(prefixOrOptions.version) ? Array.from(new Set(prefixOrOptions.version)) : prefixOrOptions.version + ]; + return (target) => { + Reflect.defineMetadata(constants_1.CONTROLLER_WATERMARK, true, target); + Reflect.defineMetadata(constants_1.PATH_METADATA, path, target); + Reflect.defineMetadata(constants_1.HOST_METADATA, host, target); + Reflect.defineMetadata(constants_1.SCOPE_OPTIONS_METADATA, scopeOptions, target); + Reflect.defineMetadata(constants_1.VERSION_METADATA, versionOptions, target); + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/dependencies.decorator.js +var require_dependencies_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/dependencies.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Dependencies = void 0; + exports2.flatten = flatten; + var constants_1 = require_constants(); + function flatten(arr) { + const flat = [].concat(...arr); + return flat.some(Array.isArray) ? flatten(flat) : flat; + } + var Dependencies = (...dependencies) => { + const flattenDeps = flatten(dependencies); + return (target) => { + Reflect.defineMetadata(constants_1.PARAMTYPES_METADATA, flattenDeps, target); + }; + }; + exports2.Dependencies = Dependencies; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/extend-metadata.util.js +var require_extend_metadata_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/extend-metadata.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.extendArrayMetadata = extendArrayMetadata; + function extendArrayMetadata(key, metadata, target) { + const previousValue = Reflect.getMetadata(key, target) || []; + const value = [...previousValue, ...metadata]; + Reflect.defineMetadata(key, value, target); + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/validate-each.util.js +var require_validate_each_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/validate-each.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InvalidDecoratorItemException = void 0; + exports2.validateEach = validateEach; + var InvalidDecoratorItemException = class extends Error { + constructor(decorator, item, context) { + const message = `Invalid ${item} passed to ${decorator}() decorator (${context}).`; + super(message); + this.msg = message; + } + what() { + return this.msg; + } + }; + exports2.InvalidDecoratorItemException = InvalidDecoratorItemException; + function validateEach(context, arr, predicate, decorator, item) { + if (!context || !context.name) { + return true; + } + const errors = arr.some((str) => !predicate(str)); + if (errors) { + throw new InvalidDecoratorItemException(decorator, item, context.name); + } + return true; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/exception-filters.decorator.js +var require_exception_filters_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/exception-filters.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UseFilters = void 0; + var constants_1 = require_constants(); + var extend_metadata_util_1 = require_extend_metadata_util(); + var shared_utils_1 = require_shared_utils(); + var validate_each_util_1 = require_validate_each_util(); + var UseFilters = (...filters) => addExceptionFiltersMetadata(...filters); + exports2.UseFilters = UseFilters; + function addExceptionFiltersMetadata(...filters) { + return (target, key, descriptor) => { + const isFilterValid = (filter) => filter && ((0, shared_utils_1.isFunction)(filter) || (0, shared_utils_1.isFunction)(filter.catch)); + if (descriptor) { + (0, validate_each_util_1.validateEach)(target.constructor, filters, isFilterValid, "@UseFilters", "filter"); + (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.EXCEPTION_FILTERS_METADATA, filters, descriptor.value); + return descriptor; + } + (0, validate_each_util_1.validateEach)(target, filters, isFilterValid, "@UseFilters", "filter"); + (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.EXCEPTION_FILTERS_METADATA, filters, target); + return target; + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/inject.decorator.js +var require_inject_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/inject.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Inject = Inject; + var constants_1 = require_constants(); + var shared_utils_1 = require_shared_utils(); + function Inject(token) { + const injectCallHasArguments = arguments.length > 0; + return (target, key, index) => { + let type = token || Reflect.getMetadata("design:type", target, key); + if (!type && !injectCallHasArguments) { + type = Reflect.getMetadata(constants_1.PARAMTYPES_METADATA, target, key)?.[index]; + } + if (!(0, shared_utils_1.isUndefined)(index)) { + let dependencies = Reflect.getMetadata(constants_1.SELF_DECLARED_DEPS_METADATA, target) || []; + dependencies = [...dependencies, { index, param: type }]; + Reflect.defineMetadata(constants_1.SELF_DECLARED_DEPS_METADATA, dependencies, target); + return; + } + let properties = Reflect.getMetadata(constants_1.PROPERTY_DEPS_METADATA, target.constructor) || []; + properties = [...properties, { key, type }]; + Reflect.defineMetadata(constants_1.PROPERTY_DEPS_METADATA, properties, target.constructor); + }; + } + } +}); + +// ../../node_modules/.pnpm/uid@2.0.2/node_modules/uid/dist/index.js +var require_dist = __commonJS({ + "../../node_modules/.pnpm/uid@2.0.2/node_modules/uid/dist/index.js"(exports2) { + var IDX = 256; + var HEX = []; + var SIZE = 256; + var BUFFER; + while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1); + function uid(len) { + var i = 0, tmp = len || 11; + if (!BUFFER || IDX + tmp > SIZE * 2) { + for (BUFFER = "", IDX = 0; i < SIZE; i++) { + BUFFER += HEX[Math.random() * 256 | 0]; + } + } + return BUFFER.substring(IDX, IDX++ + tmp); + } + exports2.uid = uid; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/injectable.decorator.js +var require_injectable_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/injectable.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Injectable = Injectable; + exports2.mixin = mixin; + var uid_1 = require_dist(); + var constants_1 = require_constants(); + function Injectable(options) { + return (target) => { + Reflect.defineMetadata(constants_1.INJECTABLE_WATERMARK, true, target); + Reflect.defineMetadata(constants_1.SCOPE_OPTIONS_METADATA, options, target); + }; + } + function mixin(mixinClass) { + Object.defineProperty(mixinClass, "name", { + value: (0, uid_1.uid)(21) + }); + Injectable()(mixinClass); + return mixinClass; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/optional.decorator.js +var require_optional_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/optional.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Optional = Optional; + var constants_1 = require_constants(); + var shared_utils_1 = require_shared_utils(); + function Optional() { + return (target, key, index) => { + if (!(0, shared_utils_1.isUndefined)(index)) { + const args = Reflect.getMetadata(constants_1.OPTIONAL_DEPS_METADATA, target) || []; + Reflect.defineMetadata(constants_1.OPTIONAL_DEPS_METADATA, [...args, index], target); + return; + } + const properties = Reflect.getMetadata(constants_1.OPTIONAL_PROPERTY_DEPS_METADATA, target.constructor) || []; + Reflect.defineMetadata(constants_1.OPTIONAL_PROPERTY_DEPS_METADATA, [...properties, key], target.constructor); + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/set-metadata.decorator.js +var require_set_metadata_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/set-metadata.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SetMetadata = void 0; + var SetMetadata = (metadataKey, metadataValue) => { + const decoratorFactory = (target, key, descriptor) => { + if (descriptor) { + Reflect.defineMetadata(metadataKey, metadataValue, descriptor.value); + return descriptor; + } + Reflect.defineMetadata(metadataKey, metadataValue, target); + return target; + }; + decoratorFactory.KEY = metadataKey; + return decoratorFactory; + }; + exports2.SetMetadata = SetMetadata; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/use-guards.decorator.js +var require_use_guards_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/use-guards.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UseGuards = UseGuards; + var constants_1 = require_constants(); + var extend_metadata_util_1 = require_extend_metadata_util(); + var shared_utils_1 = require_shared_utils(); + var validate_each_util_1 = require_validate_each_util(); + function UseGuards(...guards) { + return (target, key, descriptor) => { + const isGuardValid = (guard) => guard && ((0, shared_utils_1.isFunction)(guard) || (0, shared_utils_1.isFunction)(guard.canActivate)); + if (descriptor) { + (0, validate_each_util_1.validateEach)(target.constructor, guards, isGuardValid, "@UseGuards", "guard"); + (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.GUARDS_METADATA, guards, descriptor.value); + return descriptor; + } + (0, validate_each_util_1.validateEach)(target, guards, isGuardValid, "@UseGuards", "guard"); + (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.GUARDS_METADATA, guards, target); + return target; + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/use-interceptors.decorator.js +var require_use_interceptors_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/use-interceptors.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UseInterceptors = UseInterceptors; + var constants_1 = require_constants(); + var extend_metadata_util_1 = require_extend_metadata_util(); + var shared_utils_1 = require_shared_utils(); + var validate_each_util_1 = require_validate_each_util(); + function UseInterceptors(...interceptors) { + return (target, key, descriptor) => { + const isInterceptorValid = (interceptor) => interceptor && ((0, shared_utils_1.isFunction)(interceptor) || (0, shared_utils_1.isFunction)(interceptor.intercept)); + if (descriptor) { + (0, validate_each_util_1.validateEach)(target.constructor, interceptors, isInterceptorValid, "@UseInterceptors", "interceptor"); + (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.INTERCEPTORS_METADATA, interceptors, descriptor.value); + return descriptor; + } + (0, validate_each_util_1.validateEach)(target, interceptors, isInterceptorValid, "@UseInterceptors", "interceptor"); + (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.INTERCEPTORS_METADATA, interceptors, target); + return target; + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/use-pipes.decorator.js +var require_use_pipes_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/use-pipes.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UsePipes = UsePipes; + var constants_1 = require_constants(); + var extend_metadata_util_1 = require_extend_metadata_util(); + var shared_utils_1 = require_shared_utils(); + var validate_each_util_1 = require_validate_each_util(); + function UsePipes(...pipes) { + return (target, key, descriptor) => { + const isPipeValid = (pipe) => pipe && ((0, shared_utils_1.isFunction)(pipe) || (0, shared_utils_1.isFunction)(pipe.transform)); + if (descriptor) { + (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.PIPES_METADATA, pipes, descriptor.value); + return descriptor; + } + (0, validate_each_util_1.validateEach)(target, pipes, isPipeValid, "@UsePipes", "pipe"); + (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.PIPES_METADATA, pipes, target); + return target; + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/apply-decorators.js +var require_apply_decorators = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/apply-decorators.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.applyDecorators = applyDecorators; + function applyDecorators(...decorators) { + return (target, propertyKey, descriptor) => { + for (const decorator of decorators) { + if (target instanceof Function && !descriptor) { + decorator(target); + continue; + } + decorator(target, propertyKey, descriptor); + } + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/version.decorator.js +var require_version_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/version.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Version = Version; + var constants_1 = require_constants(); + function Version(version2) { + if (Array.isArray(version2)) { + version2 = Array.from(new Set(version2)); + } + return (target, key, descriptor) => { + Reflect.defineMetadata(constants_1.VERSION_METADATA, version2, descriptor.value); + return descriptor; + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/index.js +var require_core = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/core/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_bind_decorator(), exports2); + tslib_1.__exportStar(require_catch_decorator(), exports2); + tslib_1.__exportStar(require_controller_decorator(), exports2); + tslib_1.__exportStar(require_dependencies_decorator(), exports2); + tslib_1.__exportStar(require_exception_filters_decorator(), exports2); + tslib_1.__exportStar(require_inject_decorator(), exports2); + tslib_1.__exportStar(require_injectable_decorator(), exports2); + tslib_1.__exportStar(require_optional_decorator(), exports2); + tslib_1.__exportStar(require_set_metadata_decorator(), exports2); + tslib_1.__exportStar(require_use_guards_decorator(), exports2); + tslib_1.__exportStar(require_use_interceptors_decorator(), exports2); + tslib_1.__exportStar(require_use_pipes_decorator(), exports2); + tslib_1.__exportStar(require_apply_decorators(), exports2); + tslib_1.__exportStar(require_version_decorator(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/modules/global.decorator.js +var require_global_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/modules/global.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Global = Global; + var constants_1 = require_constants(); + function Global() { + return (target) => { + Reflect.defineMetadata(constants_1.GLOBAL_MODULE_METADATA, true, target); + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/validate-module-keys.util.js +var require_validate_module_keys_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/validate-module-keys.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.INVALID_MODULE_CONFIG_MESSAGE = void 0; + exports2.validateModuleKeys = validateModuleKeys; + var constants_1 = require_constants(); + var INVALID_MODULE_CONFIG_MESSAGE = (text, property) => `Invalid property '${property}' passed into the @Module() decorator.`; + exports2.INVALID_MODULE_CONFIG_MESSAGE = INVALID_MODULE_CONFIG_MESSAGE; + var metadataKeys = [ + constants_1.MODULE_METADATA.IMPORTS, + constants_1.MODULE_METADATA.EXPORTS, + constants_1.MODULE_METADATA.CONTROLLERS, + constants_1.MODULE_METADATA.PROVIDERS + ]; + function validateModuleKeys(keys) { + const validateKey = (key) => { + if (metadataKeys.includes(key)) { + return; + } + throw new Error((0, exports2.INVALID_MODULE_CONFIG_MESSAGE)`${key}`); + }; + keys.forEach(validateKey); + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/modules/module.decorator.js +var require_module_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/modules/module.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Module = Module; + var validate_module_keys_util_1 = require_validate_module_keys_util(); + function Module(metadata) { + const propsKeys = Object.keys(metadata); + (0, validate_module_keys_util_1.validateModuleKeys)(propsKeys); + return (target) => { + for (const property in metadata) { + if (metadata.hasOwnProperty(property)) { + Reflect.defineMetadata(property, metadata[property], target); + } + } + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/modules/index.js +var require_modules = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/modules/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_global_decorator(), exports2); + tslib_1.__exportStar(require_module_decorator(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/enums/request-method.enum.js +var require_request_method_enum = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/enums/request-method.enum.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RequestMethod = void 0; + var RequestMethod; + (function(RequestMethod2) { + RequestMethod2[RequestMethod2["GET"] = 0] = "GET"; + RequestMethod2[RequestMethod2["POST"] = 1] = "POST"; + RequestMethod2[RequestMethod2["PUT"] = 2] = "PUT"; + RequestMethod2[RequestMethod2["DELETE"] = 3] = "DELETE"; + RequestMethod2[RequestMethod2["PATCH"] = 4] = "PATCH"; + RequestMethod2[RequestMethod2["ALL"] = 5] = "ALL"; + RequestMethod2[RequestMethod2["OPTIONS"] = 6] = "OPTIONS"; + RequestMethod2[RequestMethod2["HEAD"] = 7] = "HEAD"; + RequestMethod2[RequestMethod2["SEARCH"] = 8] = "SEARCH"; + })(RequestMethod || (exports2.RequestMethod = RequestMethod = {})); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/request-mapping.decorator.js +var require_request_mapping_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/request-mapping.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Search = exports2.All = exports2.Head = exports2.Options = exports2.Patch = exports2.Put = exports2.Delete = exports2.Get = exports2.Post = exports2.RequestMapping = void 0; + var constants_1 = require_constants(); + var request_method_enum_1 = require_request_method_enum(); + var defaultMetadata = { + [constants_1.PATH_METADATA]: "/", + [constants_1.METHOD_METADATA]: request_method_enum_1.RequestMethod.GET + }; + var RequestMapping = (metadata = defaultMetadata) => { + const pathMetadata = metadata[constants_1.PATH_METADATA]; + const path = pathMetadata && pathMetadata.length ? pathMetadata : "/"; + const requestMethod = metadata[constants_1.METHOD_METADATA] || request_method_enum_1.RequestMethod.GET; + return (target, key, descriptor) => { + Reflect.defineMetadata(constants_1.PATH_METADATA, path, descriptor.value); + Reflect.defineMetadata(constants_1.METHOD_METADATA, requestMethod, descriptor.value); + return descriptor; + }; + }; + exports2.RequestMapping = RequestMapping; + var createMappingDecorator = (method) => (path) => { + return (0, exports2.RequestMapping)({ + [constants_1.PATH_METADATA]: path, + [constants_1.METHOD_METADATA]: method + }); + }; + exports2.Post = createMappingDecorator(request_method_enum_1.RequestMethod.POST); + exports2.Get = createMappingDecorator(request_method_enum_1.RequestMethod.GET); + exports2.Delete = createMappingDecorator(request_method_enum_1.RequestMethod.DELETE); + exports2.Put = createMappingDecorator(request_method_enum_1.RequestMethod.PUT); + exports2.Patch = createMappingDecorator(request_method_enum_1.RequestMethod.PATCH); + exports2.Options = createMappingDecorator(request_method_enum_1.RequestMethod.OPTIONS); + exports2.Head = createMappingDecorator(request_method_enum_1.RequestMethod.HEAD); + exports2.All = createMappingDecorator(request_method_enum_1.RequestMethod.ALL); + exports2.Search = createMappingDecorator(request_method_enum_1.RequestMethod.SEARCH); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/enums/route-paramtypes.enum.js +var require_route_paramtypes_enum = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/enums/route-paramtypes.enum.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RouteParamtypes = void 0; + var RouteParamtypes; + (function(RouteParamtypes2) { + RouteParamtypes2[RouteParamtypes2["REQUEST"] = 0] = "REQUEST"; + RouteParamtypes2[RouteParamtypes2["RESPONSE"] = 1] = "RESPONSE"; + RouteParamtypes2[RouteParamtypes2["NEXT"] = 2] = "NEXT"; + RouteParamtypes2[RouteParamtypes2["BODY"] = 3] = "BODY"; + RouteParamtypes2[RouteParamtypes2["QUERY"] = 4] = "QUERY"; + RouteParamtypes2[RouteParamtypes2["PARAM"] = 5] = "PARAM"; + RouteParamtypes2[RouteParamtypes2["HEADERS"] = 6] = "HEADERS"; + RouteParamtypes2[RouteParamtypes2["SESSION"] = 7] = "SESSION"; + RouteParamtypes2[RouteParamtypes2["FILE"] = 8] = "FILE"; + RouteParamtypes2[RouteParamtypes2["FILES"] = 9] = "FILES"; + RouteParamtypes2[RouteParamtypes2["HOST"] = 10] = "HOST"; + RouteParamtypes2[RouteParamtypes2["IP"] = 11] = "IP"; + RouteParamtypes2[RouteParamtypes2["RAW_BODY"] = 12] = "RAW_BODY"; + })(RouteParamtypes || (exports2.RouteParamtypes = RouteParamtypes = {})); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/route-params.decorator.js +var require_route_params_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/route-params.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Res = exports2.Req = exports2.Headers = exports2.Session = exports2.Ip = exports2.Next = exports2.Response = exports2.Request = void 0; + exports2.assignMetadata = assignMetadata; + exports2.UploadedFile = UploadedFile; + exports2.UploadedFiles = UploadedFiles; + exports2.Query = Query; + exports2.Body = Body; + exports2.RawBody = RawBody; + exports2.Param = Param; + exports2.HostParam = HostParam; + var constants_1 = require_constants(); + var route_paramtypes_enum_1 = require_route_paramtypes_enum(); + var shared_utils_1 = require_shared_utils(); + function assignMetadata(args, paramtype, index, data, ...pipes) { + return { + ...args, + [`${paramtype}:${index}`]: { + index, + data, + pipes + } + }; + } + function createRouteParamDecorator(paramtype) { + return (data) => (target, key, index) => { + const args = Reflect.getMetadata(constants_1.ROUTE_ARGS_METADATA, target.constructor, key) || {}; + Reflect.defineMetadata(constants_1.ROUTE_ARGS_METADATA, assignMetadata(args, paramtype, index, data), target.constructor, key); + }; + } + var createPipesRouteParamDecorator = (paramtype) => (data, ...pipes) => (target, key, index) => { + const args = Reflect.getMetadata(constants_1.ROUTE_ARGS_METADATA, target.constructor, key) || {}; + const hasParamData = (0, shared_utils_1.isNil)(data) || (0, shared_utils_1.isString)(data); + const paramData = hasParamData ? data : void 0; + const paramPipes = hasParamData ? pipes : [data, ...pipes]; + Reflect.defineMetadata(constants_1.ROUTE_ARGS_METADATA, assignMetadata(args, paramtype, index, paramData, ...paramPipes), target.constructor, key); + }; + exports2.Request = createRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.REQUEST); + var Response = (options) => (target, key, index) => { + if (options?.passthrough) { + Reflect.defineMetadata(constants_1.RESPONSE_PASSTHROUGH_METADATA, options?.passthrough, target.constructor, key); + } + return createRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.RESPONSE)()(target, key, index); + }; + exports2.Response = Response; + exports2.Next = createRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.NEXT); + exports2.Ip = createRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.IP); + exports2.Session = createRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.SESSION); + function UploadedFile(fileKey, ...pipes) { + return createPipesRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.FILE)(fileKey, ...pipes); + } + function UploadedFiles(...pipes) { + return createPipesRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.FILES)(void 0, ...pipes); + } + exports2.Headers = createRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.HEADERS); + function Query(property, ...pipes) { + return createPipesRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.QUERY)(property, ...pipes); + } + function Body(property, ...pipes) { + return createPipesRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.BODY)(property, ...pipes); + } + function RawBody(...pipes) { + return createPipesRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.RAW_BODY)(void 0, ...pipes); + } + function Param(property, ...pipes) { + return createPipesRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.PARAM)(property, ...pipes); + } + function HostParam(property) { + return createRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.HOST)(property); + } + exports2.Req = exports2.Request; + exports2.Res = exports2.Response; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/http-code.decorator.js +var require_http_code_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/http-code.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpCode = HttpCode; + var constants_1 = require_constants(); + function HttpCode(statusCode) { + return (target, key, descriptor) => { + Reflect.defineMetadata(constants_1.HTTP_CODE_METADATA, statusCode, descriptor.value); + return descriptor; + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/assign-custom-metadata.util.js +var require_assign_custom_metadata_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/assign-custom-metadata.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.assignCustomParameterMetadata = assignCustomParameterMetadata; + var constants_1 = require_constants(); + function assignCustomParameterMetadata(args, paramtype, index, factory, data, ...pipes) { + return { + ...args, + [`${paramtype}${constants_1.CUSTOM_ROUTE_ARGS_METADATA}:${index}`]: { + index, + factory, + data, + pipes + } + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/create-route-param-metadata.decorator.js +var require_create_route_param_metadata_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/create-route-param-metadata.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createParamDecorator = createParamDecorator; + var uid_1 = require_dist(); + var constants_1 = require_constants(); + var assign_custom_metadata_util_1 = require_assign_custom_metadata_util(); + var shared_utils_1 = require_shared_utils(); + function createParamDecorator(factory, enhancers = []) { + const paramtype = (0, uid_1.uid)(21); + return (data, ...pipes) => (target, key, index) => { + const args = Reflect.getMetadata(constants_1.ROUTE_ARGS_METADATA, target.constructor, key) || {}; + const isPipe = (pipe) => pipe && ((0, shared_utils_1.isFunction)(pipe) && pipe.prototype && (0, shared_utils_1.isFunction)(pipe.prototype.transform) || (0, shared_utils_1.isFunction)(pipe.transform)); + const hasParamData = (0, shared_utils_1.isNil)(data) || !isPipe(data); + const paramData = hasParamData ? data : void 0; + const paramPipes = hasParamData ? pipes : [data, ...pipes]; + Reflect.defineMetadata(constants_1.ROUTE_ARGS_METADATA, (0, assign_custom_metadata_util_1.assignCustomParameterMetadata)(args, paramtype, index, factory, paramData, ...paramPipes), target.constructor, key); + enhancers.forEach((fn) => fn(target, key, index)); + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/render.decorator.js +var require_render_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/render.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Render = Render; + var constants_1 = require_constants(); + function Render(template) { + return (target, key, descriptor) => { + Reflect.defineMetadata(constants_1.RENDER_METADATA, template, descriptor.value); + return descriptor; + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/header.decorator.js +var require_header_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/header.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Header = Header; + var constants_1 = require_constants(); + var extend_metadata_util_1 = require_extend_metadata_util(); + function Header(name, value) { + return (target, key, descriptor) => { + (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.HEADERS_METADATA, [{ name, value }], descriptor.value); + return descriptor; + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/redirect.decorator.js +var require_redirect_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/redirect.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Redirect = Redirect; + var constants_1 = require_constants(); + function Redirect(url = "", statusCode) { + return (target, key, descriptor) => { + Reflect.defineMetadata(constants_1.REDIRECT_METADATA, { statusCode, url }, descriptor.value); + return descriptor; + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/sse.decorator.js +var require_sse_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/sse.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sse = Sse; + var constants_1 = require_constants(); + var request_method_enum_1 = require_request_method_enum(); + function Sse(path) { + return (target, key, descriptor) => { + path = path && path.length ? path : "/"; + Reflect.defineMetadata(constants_1.PATH_METADATA, path, descriptor.value); + Reflect.defineMetadata(constants_1.METHOD_METADATA, request_method_enum_1.RequestMethod.GET, descriptor.value); + Reflect.defineMetadata(constants_1.SSE_METADATA, true, descriptor.value); + return descriptor; + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/index.js +var require_http = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/http/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_request_mapping_decorator(), exports2); + tslib_1.__exportStar(require_route_params_decorator(), exports2); + tslib_1.__exportStar(require_http_code_decorator(), exports2); + tslib_1.__exportStar(require_create_route_param_metadata_decorator(), exports2); + tslib_1.__exportStar(require_render_decorator(), exports2); + tslib_1.__exportStar(require_header_decorator(), exports2); + tslib_1.__exportStar(require_redirect_decorator(), exports2); + tslib_1.__exportStar(require_sse_decorator(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/index.js +var require_decorators = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/decorators/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_core(), exports2); + tslib_1.__exportStar(require_modules(), exports2); + tslib_1.__exportStar(require_http(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/enums/http-status.enum.js +var require_http_status_enum = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/enums/http-status.enum.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpStatus = void 0; + var HttpStatus; + (function(HttpStatus2) { + HttpStatus2[HttpStatus2["CONTINUE"] = 100] = "CONTINUE"; + HttpStatus2[HttpStatus2["SWITCHING_PROTOCOLS"] = 101] = "SWITCHING_PROTOCOLS"; + HttpStatus2[HttpStatus2["PROCESSING"] = 102] = "PROCESSING"; + HttpStatus2[HttpStatus2["EARLYHINTS"] = 103] = "EARLYHINTS"; + HttpStatus2[HttpStatus2["OK"] = 200] = "OK"; + HttpStatus2[HttpStatus2["CREATED"] = 201] = "CREATED"; + HttpStatus2[HttpStatus2["ACCEPTED"] = 202] = "ACCEPTED"; + HttpStatus2[HttpStatus2["NON_AUTHORITATIVE_INFORMATION"] = 203] = "NON_AUTHORITATIVE_INFORMATION"; + HttpStatus2[HttpStatus2["NO_CONTENT"] = 204] = "NO_CONTENT"; + HttpStatus2[HttpStatus2["RESET_CONTENT"] = 205] = "RESET_CONTENT"; + HttpStatus2[HttpStatus2["PARTIAL_CONTENT"] = 206] = "PARTIAL_CONTENT"; + HttpStatus2[HttpStatus2["AMBIGUOUS"] = 300] = "AMBIGUOUS"; + HttpStatus2[HttpStatus2["MOVED_PERMANENTLY"] = 301] = "MOVED_PERMANENTLY"; + HttpStatus2[HttpStatus2["FOUND"] = 302] = "FOUND"; + HttpStatus2[HttpStatus2["SEE_OTHER"] = 303] = "SEE_OTHER"; + HttpStatus2[HttpStatus2["NOT_MODIFIED"] = 304] = "NOT_MODIFIED"; + HttpStatus2[HttpStatus2["TEMPORARY_REDIRECT"] = 307] = "TEMPORARY_REDIRECT"; + HttpStatus2[HttpStatus2["PERMANENT_REDIRECT"] = 308] = "PERMANENT_REDIRECT"; + HttpStatus2[HttpStatus2["BAD_REQUEST"] = 400] = "BAD_REQUEST"; + HttpStatus2[HttpStatus2["UNAUTHORIZED"] = 401] = "UNAUTHORIZED"; + HttpStatus2[HttpStatus2["PAYMENT_REQUIRED"] = 402] = "PAYMENT_REQUIRED"; + HttpStatus2[HttpStatus2["FORBIDDEN"] = 403] = "FORBIDDEN"; + HttpStatus2[HttpStatus2["NOT_FOUND"] = 404] = "NOT_FOUND"; + HttpStatus2[HttpStatus2["METHOD_NOT_ALLOWED"] = 405] = "METHOD_NOT_ALLOWED"; + HttpStatus2[HttpStatus2["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE"; + HttpStatus2[HttpStatus2["PROXY_AUTHENTICATION_REQUIRED"] = 407] = "PROXY_AUTHENTICATION_REQUIRED"; + HttpStatus2[HttpStatus2["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT"; + HttpStatus2[HttpStatus2["CONFLICT"] = 409] = "CONFLICT"; + HttpStatus2[HttpStatus2["GONE"] = 410] = "GONE"; + HttpStatus2[HttpStatus2["LENGTH_REQUIRED"] = 411] = "LENGTH_REQUIRED"; + HttpStatus2[HttpStatus2["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED"; + HttpStatus2[HttpStatus2["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE"; + HttpStatus2[HttpStatus2["URI_TOO_LONG"] = 414] = "URI_TOO_LONG"; + HttpStatus2[HttpStatus2["UNSUPPORTED_MEDIA_TYPE"] = 415] = "UNSUPPORTED_MEDIA_TYPE"; + HttpStatus2[HttpStatus2["REQUESTED_RANGE_NOT_SATISFIABLE"] = 416] = "REQUESTED_RANGE_NOT_SATISFIABLE"; + HttpStatus2[HttpStatus2["EXPECTATION_FAILED"] = 417] = "EXPECTATION_FAILED"; + HttpStatus2[HttpStatus2["I_AM_A_TEAPOT"] = 418] = "I_AM_A_TEAPOT"; + HttpStatus2[HttpStatus2["MISDIRECTED"] = 421] = "MISDIRECTED"; + HttpStatus2[HttpStatus2["UNPROCESSABLE_ENTITY"] = 422] = "UNPROCESSABLE_ENTITY"; + HttpStatus2[HttpStatus2["FAILED_DEPENDENCY"] = 424] = "FAILED_DEPENDENCY"; + HttpStatus2[HttpStatus2["PRECONDITION_REQUIRED"] = 428] = "PRECONDITION_REQUIRED"; + HttpStatus2[HttpStatus2["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS"; + HttpStatus2[HttpStatus2["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR"; + HttpStatus2[HttpStatus2["NOT_IMPLEMENTED"] = 501] = "NOT_IMPLEMENTED"; + HttpStatus2[HttpStatus2["BAD_GATEWAY"] = 502] = "BAD_GATEWAY"; + HttpStatus2[HttpStatus2["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE"; + HttpStatus2[HttpStatus2["GATEWAY_TIMEOUT"] = 504] = "GATEWAY_TIMEOUT"; + HttpStatus2[HttpStatus2["HTTP_VERSION_NOT_SUPPORTED"] = 505] = "HTTP_VERSION_NOT_SUPPORTED"; + })(HttpStatus || (exports2.HttpStatus = HttpStatus = {})); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/enums/shutdown-signal.enum.js +var require_shutdown_signal_enum = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/enums/shutdown-signal.enum.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ShutdownSignal = void 0; + var ShutdownSignal; + (function(ShutdownSignal2) { + ShutdownSignal2["SIGHUP"] = "SIGHUP"; + ShutdownSignal2["SIGINT"] = "SIGINT"; + ShutdownSignal2["SIGQUIT"] = "SIGQUIT"; + ShutdownSignal2["SIGILL"] = "SIGILL"; + ShutdownSignal2["SIGTRAP"] = "SIGTRAP"; + ShutdownSignal2["SIGABRT"] = "SIGABRT"; + ShutdownSignal2["SIGBUS"] = "SIGBUS"; + ShutdownSignal2["SIGFPE"] = "SIGFPE"; + ShutdownSignal2["SIGSEGV"] = "SIGSEGV"; + ShutdownSignal2["SIGUSR2"] = "SIGUSR2"; + ShutdownSignal2["SIGTERM"] = "SIGTERM"; + })(ShutdownSignal || (exports2.ShutdownSignal = ShutdownSignal = {})); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/enums/version-type.enum.js +var require_version_type_enum = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/enums/version-type.enum.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.VersioningType = void 0; + var VersioningType; + (function(VersioningType2) { + VersioningType2[VersioningType2["URI"] = 0] = "URI"; + VersioningType2[VersioningType2["HEADER"] = 1] = "HEADER"; + VersioningType2[VersioningType2["MEDIA_TYPE"] = 2] = "MEDIA_TYPE"; + VersioningType2[VersioningType2["CUSTOM"] = 3] = "CUSTOM"; + })(VersioningType || (exports2.VersioningType = VersioningType = {})); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/enums/index.js +var require_enums = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/enums/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_request_method_enum(), exports2); + tslib_1.__exportStar(require_http_status_enum(), exports2); + tslib_1.__exportStar(require_shutdown_signal_enum(), exports2); + tslib_1.__exportStar(require_version_type_enum(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/http.exception.js +var require_http_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/http.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpException = void 0; + var shared_utils_1 = require_shared_utils(); + var HttpException = class extends Error { + /** + * Instantiate a plain HTTP Exception. + * + * @example + * throw new HttpException('message', HttpStatus.BAD_REQUEST) + * throw new HttpException('custom message', HttpStatus.BAD_REQUEST, { + * cause: new Error('Cause Error'), + * }) + * + * + * @usageNotes + * The constructor arguments define the response and the HTTP response status code. + * - The `response` argument (required) defines the JSON response body. alternatively, it can also be + * an error object that is used to define an error [cause](https://nodejs.org/en/blog/release/v16.9.0/#error-cause). + * - The `status` argument (required) defines the HTTP Status Code. + * - The `options` argument (optional) defines additional error options. Currently, it supports the `cause` attribute, + * and can be used as an alternative way to specify the error cause: `const error = new HttpException('description', 400, { cause: new Error() });` + * + * By default, the JSON response body contains two properties: + * - `statusCode`: the Http Status Code. + * - `message`: a short description of the HTTP error by default; override this + * by supplying a string in the `response` parameter. + * + * To override the entire JSON response body, pass an object to the `createBody` + * method. Nest will serialize the object and return it as the JSON response body. + * + * The `status` argument is required, and should be a valid HTTP status code. + * Best practice is to use the `HttpStatus` enum imported from `nestjs/common`. + * + * @param response string, object describing the error condition or the error cause. + * @param status HTTP response status code. + * @param options An object used to add an error cause. + */ + constructor(response, status, options) { + super(); + this.response = response; + this.status = status; + this.options = options; + this.initMessage(); + this.initName(); + this.initCause(); + } + /** + * Configures error chaining support + * + * @see https://nodejs.org/en/blog/release/v16.9.0/#error-cause + * @see https://github.com/microsoft/TypeScript/issues/45167 + */ + initCause() { + if (this.options?.cause) { + this.cause = this.options.cause; + return; + } + } + initMessage() { + if ((0, shared_utils_1.isString)(this.response)) { + this.message = this.response; + } else if ((0, shared_utils_1.isObject)(this.response) && (0, shared_utils_1.isString)(this.response.message)) { + this.message = this.response.message; + } else if (this.constructor) { + this.message = this.constructor.name.match(/[A-Z][a-z]+|[0-9]+/g)?.join(" ") ?? "Error"; + } + } + initName() { + this.name = this.constructor.name; + } + getResponse() { + return this.response; + } + getStatus() { + return this.status; + } + static createBody(arg0, arg1, statusCode) { + if (!arg0) { + return { + message: arg1, + statusCode + }; + } + if ((0, shared_utils_1.isString)(arg0) || Array.isArray(arg0)) { + return { + message: arg0, + error: arg1, + statusCode + }; + } + return arg0; + } + static getDescriptionFrom(descriptionOrOptions) { + return (0, shared_utils_1.isString)(descriptionOrOptions) ? descriptionOrOptions : descriptionOrOptions?.description; + } + static getHttpExceptionOptionsFrom(descriptionOrOptions) { + return (0, shared_utils_1.isString)(descriptionOrOptions) ? {} : descriptionOrOptions; + } + /** + * Utility method used to extract the error description and httpExceptionOptions from the given argument. + * This is used by inheriting classes to correctly parse both options. + * @returns the error description and the httpExceptionOptions as an object. + */ + static extractDescriptionAndOptionsFrom(descriptionOrOptions) { + const description = (0, shared_utils_1.isString)(descriptionOrOptions) ? descriptionOrOptions : descriptionOrOptions?.description; + const httpExceptionOptions = (0, shared_utils_1.isString)(descriptionOrOptions) ? {} : descriptionOrOptions; + return { + description, + httpExceptionOptions + }; + } + }; + exports2.HttpException = HttpException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/bad-request.exception.js +var require_bad_request_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/bad-request.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BadRequestException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var BadRequestException = class extends http_exception_1.HttpException { + /** + * Instantiate a `BadRequestException` Exception. + * + * @example + * `throw new BadRequestException()` + * + * @usageNotes + * The HTTP response status code will be 400. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 400. + * - `message`: the string `'Bad Request'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Bad Request") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.BAD_REQUEST), http_status_enum_1.HttpStatus.BAD_REQUEST, httpExceptionOptions); + } + }; + exports2.BadRequestException = BadRequestException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/unauthorized.exception.js +var require_unauthorized_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/unauthorized.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnauthorizedException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var UnauthorizedException = class extends http_exception_1.HttpException { + /** + * Instantiate an `UnauthorizedException` Exception. + * + * @example + * `throw new UnauthorizedException()` + * + * @usageNotes + * The HTTP response status code will be 401. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 401. + * - `message`: the string `'Unauthorized'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Unauthorized") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.UNAUTHORIZED), http_status_enum_1.HttpStatus.UNAUTHORIZED, httpExceptionOptions); + } + }; + exports2.UnauthorizedException = UnauthorizedException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/method-not-allowed.exception.js +var require_method_not_allowed_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/method-not-allowed.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MethodNotAllowedException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var MethodNotAllowedException = class extends http_exception_1.HttpException { + /** + * Instantiate a `MethodNotAllowedException` Exception. + * + * @example + * `throw new MethodNotAllowedException()` + * + * @usageNotes + * The HTTP response status code will be 405. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 405. + * - `message`: the string `'Method Not Allowed'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Method Not Allowed") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.METHOD_NOT_ALLOWED), http_status_enum_1.HttpStatus.METHOD_NOT_ALLOWED, httpExceptionOptions); + } + }; + exports2.MethodNotAllowedException = MethodNotAllowedException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/not-found.exception.js +var require_not_found_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/not-found.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NotFoundException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var NotFoundException = class extends http_exception_1.HttpException { + /** + * Instantiate a `NotFoundException` Exception. + * + * @example + * `throw new NotFoundException()` + * + * @usageNotes + * The HTTP response status code will be 404. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 404. + * - `message`: the string `'Not Found'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Not Found") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.NOT_FOUND), http_status_enum_1.HttpStatus.NOT_FOUND, httpExceptionOptions); + } + }; + exports2.NotFoundException = NotFoundException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/forbidden.exception.js +var require_forbidden_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/forbidden.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ForbiddenException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var ForbiddenException = class extends http_exception_1.HttpException { + /** + * Instantiate a `ForbiddenException` Exception. + * + * @example + * `throw new ForbiddenException()` + * + * @usageNotes + * The HTTP response status code will be 403. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 403. + * - `message`: the string `'Forbidden'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Forbidden") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.FORBIDDEN), http_status_enum_1.HttpStatus.FORBIDDEN, httpExceptionOptions); + } + }; + exports2.ForbiddenException = ForbiddenException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/not-acceptable.exception.js +var require_not_acceptable_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/not-acceptable.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NotAcceptableException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var NotAcceptableException = class extends http_exception_1.HttpException { + /** + * Instantiate a `NotAcceptableException` Exception. + * + * @example + * `throw new NotAcceptableException()` + * + * @usageNotes + * The HTTP response status code will be 406. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 406. + * - `error`: the string `'Not Acceptable'` by default; override this by supplying + * a string in the `error` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Not Acceptable") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.NOT_ACCEPTABLE), http_status_enum_1.HttpStatus.NOT_ACCEPTABLE, httpExceptionOptions); + } + }; + exports2.NotAcceptableException = NotAcceptableException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/request-timeout.exception.js +var require_request_timeout_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/request-timeout.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RequestTimeoutException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var RequestTimeoutException = class extends http_exception_1.HttpException { + /** + * Instantiate a `RequestTimeoutException` Exception. + * + * @example + * `throw new RequestTimeoutException()` + * + * @usageNotes + * The HTTP response status code will be 408. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 408. + * - `message`: the string `'Request Timeout'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Request Timeout") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.REQUEST_TIMEOUT), http_status_enum_1.HttpStatus.REQUEST_TIMEOUT, httpExceptionOptions); + } + }; + exports2.RequestTimeoutException = RequestTimeoutException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/conflict.exception.js +var require_conflict_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/conflict.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ConflictException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var ConflictException = class extends http_exception_1.HttpException { + /** + * Instantiate a `ConflictException` Exception. + * + * @example + * `throw new ConflictException()` + * + * @usageNotes + * The HTTP response status code will be 409. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 409. + * - `message`: the string `'Conflict'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Conflict") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.CONFLICT), http_status_enum_1.HttpStatus.CONFLICT, httpExceptionOptions); + } + }; + exports2.ConflictException = ConflictException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/gone.exception.js +var require_gone_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/gone.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GoneException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var GoneException = class extends http_exception_1.HttpException { + /** + * Instantiate a `GoneException` Exception. + * + * @example + * `throw new GoneException()` + * + * @usageNotes + * The HTTP response status code will be 410. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 410. + * - `message`: the string `'Gone'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Gone") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.GONE), http_status_enum_1.HttpStatus.GONE, httpExceptionOptions); + } + }; + exports2.GoneException = GoneException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/payload-too-large.exception.js +var require_payload_too_large_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/payload-too-large.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PayloadTooLargeException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var PayloadTooLargeException = class extends http_exception_1.HttpException { + /** + * Instantiate a `PayloadTooLargeException` Exception. + * + * @example + * `throw new PayloadTooLargeException()` + * + * @usageNotes + * The HTTP response status code will be 413. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 413. + * - `message`: the string `'Payload Too Large'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Payload Too Large") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.PAYLOAD_TOO_LARGE), http_status_enum_1.HttpStatus.PAYLOAD_TOO_LARGE, httpExceptionOptions); + } + }; + exports2.PayloadTooLargeException = PayloadTooLargeException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/unsupported-media-type.exception.js +var require_unsupported_media_type_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/unsupported-media-type.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnsupportedMediaTypeException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var UnsupportedMediaTypeException = class extends http_exception_1.HttpException { + /** + * Instantiate an `UnsupportedMediaTypeException` Exception. + * + * @example + * `throw new UnsupportedMediaTypeException()` + * + * @usageNotes + * The HTTP response status code will be 415. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 415. + * - `message`: the string `'Unsupported Media Type'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Unsupported Media Type") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.UNSUPPORTED_MEDIA_TYPE), http_status_enum_1.HttpStatus.UNSUPPORTED_MEDIA_TYPE, httpExceptionOptions); + } + }; + exports2.UnsupportedMediaTypeException = UnsupportedMediaTypeException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/unprocessable-entity.exception.js +var require_unprocessable_entity_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/unprocessable-entity.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnprocessableEntityException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var UnprocessableEntityException = class extends http_exception_1.HttpException { + /** + * Instantiate an `UnprocessableEntityException` Exception. + * + * @example + * `throw new UnprocessableEntityException()` + * + * @usageNotes + * The HTTP response status code will be 422. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 422. + * - `message`: the string `'Unprocessable Entity'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Unprocessable Entity") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.UNPROCESSABLE_ENTITY), http_status_enum_1.HttpStatus.UNPROCESSABLE_ENTITY, httpExceptionOptions); + } + }; + exports2.UnprocessableEntityException = UnprocessableEntityException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/internal-server-error.exception.js +var require_internal_server_error_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/internal-server-error.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InternalServerErrorException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var InternalServerErrorException = class extends http_exception_1.HttpException { + /** + * Instantiate an `InternalServerErrorException` Exception. + * + * @example + * `throw new InternalServerErrorException()` + * + * @usageNotes + * The HTTP response status code will be 500. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 500. + * - `message`: the string `'Internal Server Error'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Internal Server Error") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.INTERNAL_SERVER_ERROR), http_status_enum_1.HttpStatus.INTERNAL_SERVER_ERROR, httpExceptionOptions); + } + }; + exports2.InternalServerErrorException = InternalServerErrorException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/not-implemented.exception.js +var require_not_implemented_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/not-implemented.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NotImplementedException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var NotImplementedException = class extends http_exception_1.HttpException { + /** + * Instantiate a `NotImplementedException` Exception. + * + * @example + * `throw new NotImplementedException()` + * + * @usageNotes + * The HTTP response status code will be 501. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 501. + * - `message`: the string `'Not Implemented'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + * @param error a short description of the HTTP error. + */ + constructor(objectOrError, descriptionOrOptions = "Not Implemented") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.NOT_IMPLEMENTED), http_status_enum_1.HttpStatus.NOT_IMPLEMENTED, httpExceptionOptions); + } + }; + exports2.NotImplementedException = NotImplementedException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/http-version-not-supported.exception.js +var require_http_version_not_supported_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/http-version-not-supported.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpVersionNotSupportedException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var HttpVersionNotSupportedException = class extends http_exception_1.HttpException { + /** + * Instantiate a `HttpVersionNotSupportedException` Exception. + * + * @example + * `throw new HttpVersionNotSupportedException()` + * + * @usageNotes + * The HTTP response status code will be 505. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 505. + * - `message`: the string `'HTTP Version Not Supported'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "HTTP Version Not Supported") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.HTTP_VERSION_NOT_SUPPORTED), http_status_enum_1.HttpStatus.HTTP_VERSION_NOT_SUPPORTED, httpExceptionOptions); + } + }; + exports2.HttpVersionNotSupportedException = HttpVersionNotSupportedException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/bad-gateway.exception.js +var require_bad_gateway_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/bad-gateway.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BadGatewayException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var BadGatewayException = class extends http_exception_1.HttpException { + /** + * Instantiate a `BadGatewayException` Exception. + * + * @example + * `throw new BadGatewayException()` + * + * @usageNotes + * The HTTP response status code will be 502. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 502. + * - `message`: the string `'Bad Gateway'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Bad Gateway") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.BAD_GATEWAY), http_status_enum_1.HttpStatus.BAD_GATEWAY, httpExceptionOptions); + } + }; + exports2.BadGatewayException = BadGatewayException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/service-unavailable.exception.js +var require_service_unavailable_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/service-unavailable.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceUnavailableException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var ServiceUnavailableException = class extends http_exception_1.HttpException { + /** + * Instantiate a `ServiceUnavailableException` Exception. + * + * @example + * `throw new ServiceUnavailableException()` + * + * @usageNotes + * The HTTP response status code will be 503. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 503. + * - `message`: the string `'Service Unavailable'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Service Unavailable") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.SERVICE_UNAVAILABLE), http_status_enum_1.HttpStatus.SERVICE_UNAVAILABLE, httpExceptionOptions); + } + }; + exports2.ServiceUnavailableException = ServiceUnavailableException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/gateway-timeout.exception.js +var require_gateway_timeout_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/gateway-timeout.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GatewayTimeoutException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var GatewayTimeoutException = class extends http_exception_1.HttpException { + /** + * Instantiate a `GatewayTimeoutException` Exception. + * + * @example + * `throw new GatewayTimeoutException()` + * + * @usageNotes + * The HTTP response status code will be 504. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 504. + * - `message`: the string `'Gateway Timeout'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Gateway Timeout") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.GATEWAY_TIMEOUT), http_status_enum_1.HttpStatus.GATEWAY_TIMEOUT, httpExceptionOptions); + } + }; + exports2.GatewayTimeoutException = GatewayTimeoutException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/im-a-teapot.exception.js +var require_im_a_teapot_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/im-a-teapot.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ImATeapotException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var ImATeapotException = class extends http_exception_1.HttpException { + /** + * Instantiate an `ImATeapotException` Exception. + * + * @example + * `throw new ImATeapotException()` + * + * @usageNotes + * The HTTP response status code will be 418. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 418. + * - `message`: the string `"I'm a Teapot"` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = `I'm a teapot`) { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.I_AM_A_TEAPOT), http_status_enum_1.HttpStatus.I_AM_A_TEAPOT, httpExceptionOptions); + } + }; + exports2.ImATeapotException = ImATeapotException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/precondition-failed.exception.js +var require_precondition_failed_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/precondition-failed.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PreconditionFailedException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var PreconditionFailedException = class extends http_exception_1.HttpException { + /** + * Instantiate a `PreconditionFailedException` Exception. + * + * @example + * `throw new PreconditionFailedException()` + * + * @usageNotes + * The HTTP response status code will be 412. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 412. + * - `message`: the string `'Precondition Failed'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Precondition Failed") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.PRECONDITION_FAILED), http_status_enum_1.HttpStatus.PRECONDITION_FAILED, httpExceptionOptions); + } + }; + exports2.PreconditionFailedException = PreconditionFailedException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/misdirected.exception.js +var require_misdirected_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/misdirected.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MisdirectedException = void 0; + var http_status_enum_1 = require_http_status_enum(); + var http_exception_1 = require_http_exception(); + var MisdirectedException = class extends http_exception_1.HttpException { + /** + * Instantiate a `MisdirectedException` Exception. + * + * @example + * `throw new MisdirectedException()` + * + * @usageNotes + * The HTTP response status code will be 421. + * - The `objectOrError` argument defines the JSON response body or the message string. + * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. + * + * By default, the JSON response body contains two properties: + * - `statusCode`: this will be the value 421. + * - `message`: the string `'Bad Gateway'` by default; override this by supplying + * a string in the `objectOrError` parameter. + * + * If the parameter `objectOrError` is a string, the response body will contain an + * additional property, `error`, with a short description of the HTTP error. To override the + * entire JSON response body, pass an object instead. Nest will serialize the object + * and return it as the JSON response body. + * + * @param objectOrError string or object describing the error condition. + * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause + */ + constructor(objectOrError, descriptionOrOptions = "Misdirected") { + const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); + super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.MISDIRECTED), http_status_enum_1.HttpStatus.MISDIRECTED, httpExceptionOptions); + } + }; + exports2.MisdirectedException = MisdirectedException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/index.js +var require_exceptions = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/exceptions/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_bad_request_exception(), exports2); + tslib_1.__exportStar(require_http_exception(), exports2); + tslib_1.__exportStar(require_unauthorized_exception(), exports2); + tslib_1.__exportStar(require_method_not_allowed_exception(), exports2); + tslib_1.__exportStar(require_not_found_exception(), exports2); + tslib_1.__exportStar(require_forbidden_exception(), exports2); + tslib_1.__exportStar(require_not_acceptable_exception(), exports2); + tslib_1.__exportStar(require_request_timeout_exception(), exports2); + tslib_1.__exportStar(require_conflict_exception(), exports2); + tslib_1.__exportStar(require_gone_exception(), exports2); + tslib_1.__exportStar(require_payload_too_large_exception(), exports2); + tslib_1.__exportStar(require_unsupported_media_type_exception(), exports2); + tslib_1.__exportStar(require_unprocessable_entity_exception(), exports2); + tslib_1.__exportStar(require_internal_server_error_exception(), exports2); + tslib_1.__exportStar(require_not_implemented_exception(), exports2); + tslib_1.__exportStar(require_http_version_not_supported_exception(), exports2); + tslib_1.__exportStar(require_bad_gateway_exception(), exports2); + tslib_1.__exportStar(require_service_unavailable_exception(), exports2); + tslib_1.__exportStar(require_gateway_timeout_exception(), exports2); + tslib_1.__exportStar(require_im_a_teapot_exception(), exports2); + tslib_1.__exportStar(require_precondition_failed_exception(), exports2); + tslib_1.__exportStar(require_misdirected_exception(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/cli-colors.util.js +var require_cli_colors_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/cli-colors.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.yellow = exports2.clc = void 0; + var isColorAllowed = () => !process.env.NO_COLOR; + var colorIfAllowed = (colorFn) => (text) => isColorAllowed() ? colorFn(text) : text; + exports2.clc = { + bold: colorIfAllowed((text) => `\x1B[1m${text}\x1B[0m`), + green: colorIfAllowed((text) => `\x1B[32m${text}\x1B[39m`), + yellow: colorIfAllowed((text) => `\x1B[33m${text}\x1B[39m`), + red: colorIfAllowed((text) => `\x1B[31m${text}\x1B[39m`), + magentaBright: colorIfAllowed((text) => `\x1B[95m${text}\x1B[39m`), + cyanBright: colorIfAllowed((text) => `\x1B[96m${text}\x1B[39m`) + }; + exports2.yellow = colorIfAllowed((text) => `\x1B[38;5;3m${text}\x1B[39m`); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/services/utils/is-log-level-enabled.util.js +var require_is_log_level_enabled_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/services/utils/is-log-level-enabled.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isLogLevelEnabled = isLogLevelEnabled; + var LOG_LEVEL_VALUES = { + verbose: 0, + debug: 1, + log: 2, + warn: 3, + error: 4, + fatal: 5 + }; + function isLogLevelEnabled(targetLevel, logLevels) { + if (!logLevels || Array.isArray(logLevels) && logLevels?.length === 0) { + return false; + } + if (logLevels.includes(targetLevel)) { + return true; + } + const highestLogLevelValue = logLevels.map((level) => LOG_LEVEL_VALUES[level]).sort((a, b) => b - a)?.[0]; + const targetLevelValue = LOG_LEVEL_VALUES[targetLevel]; + return targetLevelValue >= highestLogLevelValue; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/services/utils/index.js +var require_utils = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/services/utils/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_is_log_level_enabled_util(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/services/console-logger.service.js +var require_console_logger_service = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/services/console-logger.service.js"(exports2) { + "use strict"; + var ConsoleLogger_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ConsoleLogger = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_12 = require_core(); + var cli_colors_util_1 = require_cli_colors_util(); + var shared_utils_1 = require_shared_utils(); + var utils_1 = require_utils(); + var DEFAULT_LOG_LEVELS = [ + "log", + "error", + "warn", + "debug", + "verbose", + "fatal" + ]; + var dateTimeFormatter = new Intl.DateTimeFormat(void 0, { + year: "numeric", + hour: "numeric", + minute: "numeric", + second: "numeric", + day: "2-digit", + month: "2-digit" + }); + var ConsoleLogger = ConsoleLogger_1 = class ConsoleLogger { + constructor(context, options = {}) { + this.context = context; + this.options = options; + if (!options.logLevels) { + options.logLevels = DEFAULT_LOG_LEVELS; + } + if (context) { + this.originalContext = context; + } + } + log(message, ...optionalParams) { + if (!this.isLevelEnabled("log")) { + return; + } + const { messages, context } = this.getContextAndMessagesToPrint([ + message, + ...optionalParams + ]); + this.printMessages(messages, context, "log"); + } + error(message, ...optionalParams) { + if (!this.isLevelEnabled("error")) { + return; + } + const { messages, context, stack } = this.getContextAndStackAndMessagesToPrint([message, ...optionalParams]); + this.printMessages(messages, context, "error", "stderr"); + this.printStackTrace(stack); + } + warn(message, ...optionalParams) { + if (!this.isLevelEnabled("warn")) { + return; + } + const { messages, context } = this.getContextAndMessagesToPrint([ + message, + ...optionalParams + ]); + this.printMessages(messages, context, "warn"); + } + debug(message, ...optionalParams) { + if (!this.isLevelEnabled("debug")) { + return; + } + const { messages, context } = this.getContextAndMessagesToPrint([ + message, + ...optionalParams + ]); + this.printMessages(messages, context, "debug"); + } + verbose(message, ...optionalParams) { + if (!this.isLevelEnabled("verbose")) { + return; + } + const { messages, context } = this.getContextAndMessagesToPrint([ + message, + ...optionalParams + ]); + this.printMessages(messages, context, "verbose"); + } + fatal(message, ...optionalParams) { + if (!this.isLevelEnabled("fatal")) { + return; + } + const { messages, context } = this.getContextAndMessagesToPrint([ + message, + ...optionalParams + ]); + this.printMessages(messages, context, "fatal"); + } + /** + * Set log levels + * @param levels log levels + */ + setLogLevels(levels) { + if (!this.options) { + this.options = {}; + } + this.options.logLevels = levels; + } + /** + * Set logger context + * @param context context + */ + setContext(context) { + this.context = context; + } + /** + * Resets the logger context to the value that was passed in the constructor. + */ + resetContext() { + this.context = this.originalContext; + } + isLevelEnabled(level) { + const logLevels = this.options?.logLevels; + return (0, utils_1.isLogLevelEnabled)(level, logLevels); + } + getTimestamp() { + return dateTimeFormatter.format(Date.now()); + } + printMessages(messages, context = "", logLevel = "log", writeStreamType) { + messages.forEach((message) => { + const pidMessage = this.formatPid(process.pid); + const contextMessage = this.formatContext(context); + const timestampDiff = this.updateAndGetTimestampDiff(); + const formattedLogLevel = logLevel.toUpperCase().padStart(7, " "); + const formattedMessage = this.formatMessage(logLevel, message, pidMessage, formattedLogLevel, contextMessage, timestampDiff); + process[writeStreamType ?? "stdout"].write(formattedMessage); + }); + } + formatPid(pid) { + return `[Nest] ${pid} - `; + } + formatContext(context) { + return context ? (0, cli_colors_util_1.yellow)(`[${context}] `) : ""; + } + formatMessage(logLevel, message, pidMessage, formattedLogLevel, contextMessage, timestampDiff) { + const output = this.stringifyMessage(message, logLevel); + pidMessage = this.colorize(pidMessage, logLevel); + formattedLogLevel = this.colorize(formattedLogLevel, logLevel); + return `${pidMessage}${this.getTimestamp()} ${formattedLogLevel} ${contextMessage}${output}${timestampDiff} +`; + } + stringifyMessage(message, logLevel) { + if ((0, shared_utils_1.isFunction)(message)) { + const messageAsStr = Function.prototype.toString.call(message); + const isClass2 = messageAsStr.startsWith("class "); + if (isClass2) { + return this.stringifyMessage(message.name, logLevel); + } + return this.stringifyMessage(message(), logLevel); + } + return (0, shared_utils_1.isPlainObject)(message) || Array.isArray(message) ? `${this.colorize("Object:", logLevel)} +${JSON.stringify(message, (key, value) => typeof value === "bigint" ? value.toString() : value, 2)} +` : this.colorize(message, logLevel); + } + colorize(message, logLevel) { + const color = this.getColorByLogLevel(logLevel); + return color(message); + } + printStackTrace(stack) { + if (!stack) { + return; + } + process.stderr.write(`${stack} +`); + } + updateAndGetTimestampDiff() { + const includeTimestamp = ConsoleLogger_1.lastTimestampAt && this.options?.timestamp; + const result = includeTimestamp ? this.formatTimestampDiff(Date.now() - ConsoleLogger_1.lastTimestampAt) : ""; + ConsoleLogger_1.lastTimestampAt = Date.now(); + return result; + } + formatTimestampDiff(timestampDiff) { + return (0, cli_colors_util_1.yellow)(` +${timestampDiff}ms`); + } + getContextAndMessagesToPrint(args) { + if (args?.length <= 1) { + return { messages: args, context: this.context }; + } + const lastElement = args[args.length - 1]; + const isContext = (0, shared_utils_1.isString)(lastElement); + if (!isContext) { + return { messages: args, context: this.context }; + } + return { + context: lastElement, + messages: args.slice(0, args.length - 1) + }; + } + getContextAndStackAndMessagesToPrint(args) { + if (args.length === 2) { + return this.isStackFormat(args[1]) ? { + messages: [args[0]], + stack: args[1], + context: this.context + } : { + messages: [args[0]], + context: args[1] + }; + } + const { messages, context } = this.getContextAndMessagesToPrint(args); + if (messages?.length <= 1) { + return { messages, context }; + } + const lastElement = messages[messages.length - 1]; + const isStack = (0, shared_utils_1.isString)(lastElement); + if (!isStack && !(0, shared_utils_1.isUndefined)(lastElement)) { + return { messages, context }; + } + return { + stack: lastElement, + messages: messages.slice(0, messages.length - 1), + context + }; + } + isStackFormat(stack) { + if (!(0, shared_utils_1.isString)(stack) && !(0, shared_utils_1.isUndefined)(stack)) { + return false; + } + return /^(.)+\n\s+at .+:\d+:\d+/.test(stack); + } + getColorByLogLevel(level) { + switch (level) { + case "debug": + return cli_colors_util_1.clc.magentaBright; + case "warn": + return cli_colors_util_1.clc.yellow; + case "error": + return cli_colors_util_1.clc.red; + case "verbose": + return cli_colors_util_1.clc.cyanBright; + case "fatal": + return cli_colors_util_1.clc.bold; + default: + return cli_colors_util_1.clc.green; + } + } + }; + exports2.ConsoleLogger = ConsoleLogger; + exports2.ConsoleLogger = ConsoleLogger = ConsoleLogger_1 = tslib_1.__decorate([ + (0, core_12.Injectable)(), + tslib_1.__param(0, (0, core_12.Optional)()), + tslib_1.__param(1, (0, core_12.Optional)()), + tslib_1.__metadata("design:paramtypes", [String, Object]) + ], ConsoleLogger); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/services/logger.service.js +var require_logger_service = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/services/logger.service.js"(exports2) { + "use strict"; + var Logger_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Logger = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_12 = require_core(); + var shared_utils_1 = require_shared_utils(); + var console_logger_service_1 = require_console_logger_service(); + var utils_1 = require_utils(); + var DEFAULT_LOGGER = new console_logger_service_1.ConsoleLogger(); + var dateTimeFormatter = new Intl.DateTimeFormat(void 0, { + year: "numeric", + hour: "numeric", + minute: "numeric", + second: "numeric", + day: "2-digit", + month: "2-digit" + }); + var Logger = Logger_1 = class Logger { + constructor(context, options = {}) { + this.context = context; + this.options = options; + } + get localInstance() { + if (Logger_1.staticInstanceRef === DEFAULT_LOGGER) { + return this.registerLocalInstanceRef(); + } else if (Logger_1.staticInstanceRef instanceof Logger_1) { + const prototype = Object.getPrototypeOf(Logger_1.staticInstanceRef); + if (prototype.constructor === Logger_1) { + return this.registerLocalInstanceRef(); + } + } + return Logger_1.staticInstanceRef; + } + error(message, ...optionalParams) { + optionalParams = this.context ? (optionalParams.length ? optionalParams : [void 0]).concat(this.context) : optionalParams; + this.localInstance?.error(message, ...optionalParams); + } + log(message, ...optionalParams) { + optionalParams = this.context ? optionalParams.concat(this.context) : optionalParams; + this.localInstance?.log(message, ...optionalParams); + } + warn(message, ...optionalParams) { + optionalParams = this.context ? optionalParams.concat(this.context) : optionalParams; + this.localInstance?.warn(message, ...optionalParams); + } + debug(message, ...optionalParams) { + optionalParams = this.context ? optionalParams.concat(this.context) : optionalParams; + this.localInstance?.debug?.(message, ...optionalParams); + } + verbose(message, ...optionalParams) { + optionalParams = this.context ? optionalParams.concat(this.context) : optionalParams; + this.localInstance?.verbose?.(message, ...optionalParams); + } + fatal(message, ...optionalParams) { + optionalParams = this.context ? optionalParams.concat(this.context) : optionalParams; + this.localInstance?.fatal?.(message, ...optionalParams); + } + static error(message, ...optionalParams) { + this.staticInstanceRef?.error(message, ...optionalParams); + } + static log(message, ...optionalParams) { + this.staticInstanceRef?.log(message, ...optionalParams); + } + static warn(message, ...optionalParams) { + this.staticInstanceRef?.warn(message, ...optionalParams); + } + static debug(message, ...optionalParams) { + this.staticInstanceRef?.debug?.(message, ...optionalParams); + } + static verbose(message, ...optionalParams) { + this.staticInstanceRef?.verbose?.(message, ...optionalParams); + } + static fatal(message, ...optionalParams) { + this.staticInstanceRef?.fatal?.(message, ...optionalParams); + } + /** + * Print buffered logs and detach buffer. + */ + static flush() { + this.isBufferAttached = false; + this.logBuffer.forEach((item) => item.methodRef(...item.arguments)); + this.logBuffer = []; + } + /** + * Attach buffer. + * Turns on initialization logs buffering. + */ + static attachBuffer() { + this.isBufferAttached = true; + } + /** + * Detach buffer. + * Turns off initialization logs buffering. + */ + static detachBuffer() { + this.isBufferAttached = false; + } + static getTimestamp() { + return dateTimeFormatter.format(Date.now()); + } + static overrideLogger(logger) { + if (Array.isArray(logger)) { + Logger_1.logLevels = logger; + return this.staticInstanceRef?.setLogLevels(logger); + } + if ((0, shared_utils_1.isObject)(logger)) { + if (logger instanceof Logger_1 && logger.constructor !== Logger_1) { + const errorMessage = `Using the "extends Logger" instruction is not allowed in Nest v9. Please, use "extends ConsoleLogger" instead.`; + this.staticInstanceRef.error(errorMessage); + throw new Error(errorMessage); + } + this.staticInstanceRef = logger; + } else { + this.staticInstanceRef = void 0; + } + } + static isLevelEnabled(level) { + const logLevels = Logger_1.logLevels; + return (0, utils_1.isLogLevelEnabled)(level, logLevels); + } + registerLocalInstanceRef() { + if (this.localInstanceRef) { + return this.localInstanceRef; + } + this.localInstanceRef = new console_logger_service_1.ConsoleLogger(this.context, { + timestamp: this.options?.timestamp, + logLevels: Logger_1.logLevels + }); + return this.localInstanceRef; + } + }; + exports2.Logger = Logger; + Logger.logBuffer = new Array(); + Logger.staticInstanceRef = DEFAULT_LOGGER; + Logger.WrapBuffer = (target, propertyKey, descriptor) => { + const originalFn = descriptor.value; + descriptor.value = function(...args) { + if (Logger_1.isBufferAttached) { + Logger_1.logBuffer.push({ + methodRef: originalFn.bind(this), + arguments: args + }); + return; + } + return originalFn.call(this, ...args); + }; + }; + tslib_1.__decorate([ + Logger.WrapBuffer, + tslib_1.__metadata("design:type", Function), + tslib_1.__metadata("design:paramtypes", [Object, Object]), + tslib_1.__metadata("design:returntype", void 0) + ], Logger.prototype, "error", null); + tslib_1.__decorate([ + Logger.WrapBuffer, + tslib_1.__metadata("design:type", Function), + tslib_1.__metadata("design:paramtypes", [Object, Object]), + tslib_1.__metadata("design:returntype", void 0) + ], Logger.prototype, "log", null); + tslib_1.__decorate([ + Logger.WrapBuffer, + tslib_1.__metadata("design:type", Function), + tslib_1.__metadata("design:paramtypes", [Object, Object]), + tslib_1.__metadata("design:returntype", void 0) + ], Logger.prototype, "warn", null); + tslib_1.__decorate([ + Logger.WrapBuffer, + tslib_1.__metadata("design:type", Function), + tslib_1.__metadata("design:paramtypes", [Object, Object]), + tslib_1.__metadata("design:returntype", void 0) + ], Logger.prototype, "debug", null); + tslib_1.__decorate([ + Logger.WrapBuffer, + tslib_1.__metadata("design:type", Function), + tslib_1.__metadata("design:paramtypes", [Object, Object]), + tslib_1.__metadata("design:returntype", void 0) + ], Logger.prototype, "verbose", null); + tslib_1.__decorate([ + Logger.WrapBuffer, + tslib_1.__metadata("design:type", Function), + tslib_1.__metadata("design:paramtypes", [Object, Object]), + tslib_1.__metadata("design:returntype", void 0) + ], Logger.prototype, "fatal", null); + tslib_1.__decorate([ + Logger.WrapBuffer, + tslib_1.__metadata("design:type", Function), + tslib_1.__metadata("design:paramtypes", [Object, Object]), + tslib_1.__metadata("design:returntype", void 0) + ], Logger, "error", null); + tslib_1.__decorate([ + Logger.WrapBuffer, + tslib_1.__metadata("design:type", Function), + tslib_1.__metadata("design:paramtypes", [Object, Object]), + tslib_1.__metadata("design:returntype", void 0) + ], Logger, "log", null); + tslib_1.__decorate([ + Logger.WrapBuffer, + tslib_1.__metadata("design:type", Function), + tslib_1.__metadata("design:paramtypes", [Object, Object]), + tslib_1.__metadata("design:returntype", void 0) + ], Logger, "warn", null); + tslib_1.__decorate([ + Logger.WrapBuffer, + tslib_1.__metadata("design:type", Function), + tslib_1.__metadata("design:paramtypes", [Object, Object]), + tslib_1.__metadata("design:returntype", void 0) + ], Logger, "debug", null); + tslib_1.__decorate([ + Logger.WrapBuffer, + tslib_1.__metadata("design:type", Function), + tslib_1.__metadata("design:paramtypes", [Object, Object]), + tslib_1.__metadata("design:returntype", void 0) + ], Logger, "verbose", null); + tslib_1.__decorate([ + Logger.WrapBuffer, + tslib_1.__metadata("design:type", Function), + tslib_1.__metadata("design:paramtypes", [Object, Object]), + tslib_1.__metadata("design:returntype", void 0) + ], Logger, "fatal", null); + exports2.Logger = Logger = Logger_1 = tslib_1.__decorate([ + (0, core_12.Injectable)(), + tslib_1.__param(0, (0, core_12.Optional)()), + tslib_1.__param(1, (0, core_12.Optional)()), + tslib_1.__metadata("design:paramtypes", [String, Object]) + ], Logger); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/services/index.js +var require_services = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/services/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_console_logger_service(), exports2); + tslib_1.__exportStar(require_logger_service(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/file-stream/streamable-file.js +var require_streamable_file = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/file-stream/streamable-file.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StreamableFile = void 0; + var stream_1 = require("stream"); + var util_1 = require("util"); + var enums_1 = require_enums(); + var shared_utils_1 = require_shared_utils(); + var services_1 = require_services(); + var StreamableFile = class { + constructor(bufferOrReadStream, options = {}) { + this.options = options; + this.logger = new services_1.Logger("StreamableFile"); + this.handleError = (err, res) => { + if (res.destroyed) { + return; + } + if (res.headersSent) { + res.end(); + return; + } + res.statusCode = enums_1.HttpStatus.BAD_REQUEST; + res.send(err.message); + }; + this.logError = (err) => { + this.logger.error(err.message, err.stack); + }; + if (util_1.types.isUint8Array(bufferOrReadStream)) { + this.stream = new stream_1.Readable(); + this.stream.push(bufferOrReadStream); + this.stream.push(null); + this.options.length ??= bufferOrReadStream.length; + } else if (bufferOrReadStream.pipe && (0, shared_utils_1.isFunction)(bufferOrReadStream.pipe)) { + this.stream = bufferOrReadStream; + } + } + getStream() { + return this.stream; + } + getHeaders() { + const { type = "application/octet-stream", disposition = void 0, length = void 0 } = this.options; + return { + type, + disposition, + length + }; + } + get errorHandler() { + return this.handleError; + } + setErrorHandler(handler) { + this.handleError = handler; + return this; + } + get errorLogger() { + return this.logError; + } + setErrorLogger(handler) { + this.logError = handler; + return this; + } + }; + exports2.StreamableFile = StreamableFile; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/file-stream/index.js +var require_file_stream = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/file-stream/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_streamable_file(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/abstract.interface.js +var require_abstract_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/abstract.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/controllers/controller-metadata.interface.js +var require_controller_metadata_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/controllers/controller-metadata.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/controllers/controller.interface.js +var require_controller_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/controllers/controller.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/exceptions/exception-filter.interface.js +var require_exception_filter_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/exceptions/exception-filter.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/exceptions/rpc-exception-filter.interface.js +var require_rpc_exception_filter_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/exceptions/rpc-exception-filter.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/exceptions/ws-exception-filter.interface.js +var require_ws_exception_filter_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/exceptions/ws-exception-filter.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/external/validation-error.interface.js +var require_validation_error_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/external/validation-error.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/features/arguments-host.interface.js +var require_arguments_host_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/features/arguments-host.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/features/can-activate.interface.js +var require_can_activate_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/features/can-activate.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/features/custom-route-param-factory.interface.js +var require_custom_route_param_factory_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/features/custom-route-param-factory.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/features/execution-context.interface.js +var require_execution_context_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/features/execution-context.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/features/nest-interceptor.interface.js +var require_nest_interceptor_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/features/nest-interceptor.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/features/paramtype.interface.js +var require_paramtype_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/features/paramtype.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/features/pipe-transform.interface.js +var require_pipe_transform_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/features/pipe-transform.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/global-prefix-options.interface.js +var require_global_prefix_options_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/global-prefix-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/hooks/before-application-shutdown.interface.js +var require_before_application_shutdown_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/hooks/before-application-shutdown.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/hooks/on-application-bootstrap.interface.js +var require_on_application_bootstrap_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/hooks/on-application-bootstrap.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/hooks/on-application-shutdown.interface.js +var require_on_application_shutdown_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/hooks/on-application-shutdown.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/hooks/on-destroy.interface.js +var require_on_destroy_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/hooks/on-destroy.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/hooks/on-init.interface.js +var require_on_init_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/hooks/on-init.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/hooks/index.js +var require_hooks = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/hooks/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_before_application_shutdown_interface(), exports2); + tslib_1.__exportStar(require_on_application_bootstrap_interface(), exports2); + tslib_1.__exportStar(require_on_application_shutdown_interface(), exports2); + tslib_1.__exportStar(require_on_destroy_interface(), exports2); + tslib_1.__exportStar(require_on_init_interface(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/http/http-exception-body.interface.js +var require_http_exception_body_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/http/http-exception-body.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/http/http-redirect-response.interface.js +var require_http_redirect_response_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/http/http-redirect-response.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/http/http-server.interface.js +var require_http_server_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/http/http-server.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/http/message-event.interface.js +var require_message_event_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/http/message-event.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/http/raw-body-request.interface.js +var require_raw_body_request_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/http/raw-body-request.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/http/index.js +var require_http2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/http/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_http_exception_body_interface(), exports2); + tslib_1.__exportStar(require_http_redirect_response_interface(), exports2); + tslib_1.__exportStar(require_http_server_interface(), exports2); + tslib_1.__exportStar(require_message_event_interface(), exports2); + tslib_1.__exportStar(require_raw_body_request_interface(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/injectable.interface.js +var require_injectable_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/injectable.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/microservices/nest-hybrid-application-options.interface.js +var require_nest_hybrid_application_options_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/microservices/nest-hybrid-application-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/middleware/middleware-config-proxy.interface.js +var require_middleware_config_proxy_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/middleware/middleware-config-proxy.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/middleware/middleware-configuration.interface.js +var require_middleware_configuration_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/middleware/middleware-configuration.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/middleware/middleware-consumer.interface.js +var require_middleware_consumer_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/middleware/middleware-consumer.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/middleware/nest-middleware.interface.js +var require_nest_middleware_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/middleware/nest-middleware.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/middleware/index.js +var require_middleware = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/middleware/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_middleware_config_proxy_interface(), exports2); + tslib_1.__exportStar(require_middleware_configuration_interface(), exports2); + tslib_1.__exportStar(require_middleware_consumer_interface(), exports2); + tslib_1.__exportStar(require_nest_middleware_interface(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/dynamic-module.interface.js +var require_dynamic_module_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/dynamic-module.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/forward-reference.interface.js +var require_forward_reference_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/forward-reference.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/injection-token.interface.js +var require_injection_token_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/injection-token.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/introspection-result.interface.js +var require_introspection_result_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/introspection-result.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/module-metadata.interface.js +var require_module_metadata_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/module-metadata.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/nest-module.interface.js +var require_nest_module_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/nest-module.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/optional-factory-dependency.interface.js +var require_optional_factory_dependency_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/optional-factory-dependency.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/provider.interface.js +var require_provider_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/provider.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/index.js +var require_modules2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/modules/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_dynamic_module_interface(), exports2); + tslib_1.__exportStar(require_forward_reference_interface(), exports2); + tslib_1.__exportStar(require_injection_token_interface(), exports2); + tslib_1.__exportStar(require_introspection_result_interface(), exports2); + tslib_1.__exportStar(require_module_metadata_interface(), exports2); + tslib_1.__exportStar(require_nest_module_interface(), exports2); + tslib_1.__exportStar(require_optional_factory_dependency_interface(), exports2); + tslib_1.__exportStar(require_provider_interface(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/nest-application-context.interface.js +var require_nest_application_context_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/nest-application-context.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/nest-application-options.interface.js +var require_nest_application_options_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/nest-application-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/nest-application.interface.js +var require_nest_application_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/nest-application.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/nest-microservice.interface.js +var require_nest_microservice_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/nest-microservice.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/scope-options.interface.js +var require_scope_options_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/scope-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Scope = void 0; + var Scope; + (function(Scope2) { + Scope2[Scope2["DEFAULT"] = 0] = "DEFAULT"; + Scope2[Scope2["TRANSIENT"] = 1] = "TRANSIENT"; + Scope2[Scope2["REQUEST"] = 2] = "REQUEST"; + })(Scope || (exports2.Scope = Scope = {})); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/type.interface.js +var require_type_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/type.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/version-options.interface.js +var require_version_options_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/version-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.VERSION_NEUTRAL = void 0; + exports2.VERSION_NEUTRAL = Symbol("VERSION_NEUTRAL"); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/websockets/web-socket-adapter.interface.js +var require_web_socket_adapter_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/websockets/web-socket-adapter.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/index.js +var require_interfaces = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/interfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_abstract_interface(), exports2); + tslib_1.__exportStar(require_controller_metadata_interface(), exports2); + tslib_1.__exportStar(require_controller_interface(), exports2); + tslib_1.__exportStar(require_exception_filter_interface(), exports2); + tslib_1.__exportStar(require_rpc_exception_filter_interface(), exports2); + tslib_1.__exportStar(require_ws_exception_filter_interface(), exports2); + tslib_1.__exportStar(require_validation_error_interface(), exports2); + tslib_1.__exportStar(require_arguments_host_interface(), exports2); + tslib_1.__exportStar(require_can_activate_interface(), exports2); + tslib_1.__exportStar(require_custom_route_param_factory_interface(), exports2); + tslib_1.__exportStar(require_execution_context_interface(), exports2); + tslib_1.__exportStar(require_nest_interceptor_interface(), exports2); + tslib_1.__exportStar(require_paramtype_interface(), exports2); + tslib_1.__exportStar(require_pipe_transform_interface(), exports2); + tslib_1.__exportStar(require_global_prefix_options_interface(), exports2); + tslib_1.__exportStar(require_hooks(), exports2); + tslib_1.__exportStar(require_http2(), exports2); + tslib_1.__exportStar(require_injectable_interface(), exports2); + tslib_1.__exportStar(require_nest_hybrid_application_options_interface(), exports2); + tslib_1.__exportStar(require_middleware(), exports2); + tslib_1.__exportStar(require_modules2(), exports2); + tslib_1.__exportStar(require_nest_application_context_interface(), exports2); + tslib_1.__exportStar(require_nest_application_options_interface(), exports2); + tslib_1.__exportStar(require_nest_application_interface(), exports2); + tslib_1.__exportStar(require_nest_microservice_interface(), exports2); + tslib_1.__exportStar(require_scope_options_interface(), exports2); + tslib_1.__exportStar(require_type_interface(), exports2); + tslib_1.__exportStar(require_version_options_interface(), exports2); + tslib_1.__exportStar(require_web_socket_adapter_interface(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/random-string-generator.util.js +var require_random_string_generator_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/random-string-generator.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.randomStringGenerator = void 0; + var uid_1 = require_dist(); + var randomStringGenerator = () => (0, uid_1.uid)(21); + exports2.randomStringGenerator = randomStringGenerator; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/constants.js +var require_constants2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CONFIGURABLE_MODULE_ID = exports2.ASYNC_METHOD_SUFFIX = exports2.DEFAULT_FACTORY_CLASS_METHOD_KEY = exports2.DEFAULT_METHOD_KEY = void 0; + exports2.DEFAULT_METHOD_KEY = "register"; + exports2.DEFAULT_FACTORY_CLASS_METHOD_KEY = "create"; + exports2.ASYNC_METHOD_SUFFIX = "Async"; + exports2.CONFIGURABLE_MODULE_ID = "CONFIGURABLE_MODULE_ID"; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/utils/generate-options-injection-token.util.js +var require_generate_options_injection_token_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/utils/generate-options-injection-token.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateOptionsInjectionToken = generateOptionsInjectionToken; + var random_string_generator_util_1 = require_random_string_generator_util(); + function generateOptionsInjectionToken() { + const hash = (0, random_string_generator_util_1.randomStringGenerator)(); + return `CONFIGURABLE_MODULE_OPTIONS[${hash}]`; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/utils/get-injection-providers.util.js +var require_get_injection_providers_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/utils/get-injection-providers.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getInjectionProviders = getInjectionProviders; + var shared_utils_1 = require_shared_utils(); + function isOptionalFactoryDependency(value) { + return !(0, shared_utils_1.isUndefined)(value.token) && !(0, shared_utils_1.isUndefined)(value.optional) && !value.prototype; + } + var mapInjectToTokens = (t) => isOptionalFactoryDependency(t) ? t.token : t; + function getInjectionProviders(providers, tokens) { + const result = []; + let search = tokens.map(mapInjectToTokens); + while (search.length > 0) { + const match = (providers ?? []).filter((p) => !result.includes(p) && // this prevents circular loops and duplication + (search.includes(p) || search.includes(p?.provide))); + result.push(...match); + search = match.filter((p) => p?.inject).flatMap((p) => p.inject).map(mapInjectToTokens); + } + return result; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/utils/index.js +var require_utils2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/utils/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_generate_options_injection_token_util(), exports2); + tslib_1.__exportStar(require_get_injection_providers_util(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/configurable-module.builder.js +var require_configurable_module_builder = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/configurable-module.builder.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ConfigurableModuleBuilder = void 0; + var logger_service_1 = require_logger_service(); + var random_string_generator_util_1 = require_random_string_generator_util(); + var constants_1 = require_constants2(); + var utils_1 = require_utils2(); + var ConfigurableModuleBuilder = class _ConfigurableModuleBuilder { + constructor(options = {}, parentBuilder) { + this.options = options; + this.logger = new logger_service_1.Logger(_ConfigurableModuleBuilder.name); + if (parentBuilder) { + this.staticMethodKey = parentBuilder.staticMethodKey; + this.factoryClassMethodKey = parentBuilder.factoryClassMethodKey; + this.transformModuleDefinition = parentBuilder.transformModuleDefinition; + this.extras = parentBuilder.extras; + } + } + /** + * Registers the "extras" object (a set of extra options that can be used to modify the dynamic module definition). + * Values you specify within the "extras" object will be used as default values (that can be overridden by module consumers). + * + * This method also applies the so-called "module definition transform function" that takes the auto-generated + * dynamic module object ("DynamicModule") and the actual consumer "extras" object as input parameters. + * The "extras" object consists of values explicitly specified by module consumers and default values. + * + * @example + * ```typescript + * .setExtras<{ isGlobal?: boolean }>({ isGlobal: false }, (definition, extras) => + * ({ ...definition, global: extras.isGlobal }) + * ) + * ``` + */ + setExtras(extras, transformDefinition = (def) => def) { + const builder = new _ConfigurableModuleBuilder(this.options, this); + builder.extras = extras; + builder.transformModuleDefinition = transformDefinition; + return builder; + } + /** + * Dynamic modules must expose public static methods that let you pass in + * configuration parameters (control the module's behavior from the outside). + * Some frequently used names that you may have seen in other modules are: + * "forRoot", "forFeature", "register", "configure". + * + * This method "setClassMethodName" lets you specify the name of the + * method that will be auto-generated. + * + * @param key name of the method + */ + setClassMethodName(key) { + const builder = new _ConfigurableModuleBuilder(this.options, this); + builder.staticMethodKey = key; + return builder; + } + /** + * Asynchronously configured modules (that rely on other modules, i.e. "ConfigModule") + * let you pass the configuration factory class that will be registered and instantiated as a provider. + * This provider then will be used to retrieve the module's configuration. To provide the configuration, + * the corresponding factory method must be implemented. + * + * This method ("setFactoryMethodName") lets you control what method name will have to be + * implemented by the config factory (default is "create"). + * + * @param key name of the method + */ + setFactoryMethodName(key) { + const builder = new _ConfigurableModuleBuilder(this.options, this); + builder.factoryClassMethodKey = key; + return builder; + } + /** + * Returns an object consisting of multiple properties that lets you + * easily construct dynamic configurable modules. See "ConfigurableModuleHost" interface for more details. + */ + build() { + this.staticMethodKey ??= constants_1.DEFAULT_METHOD_KEY; + this.factoryClassMethodKey ??= constants_1.DEFAULT_FACTORY_CLASS_METHOD_KEY; + this.options.optionsInjectionToken ??= this.options.moduleName ? this.constructInjectionTokenString() : (0, utils_1.generateOptionsInjectionToken)(); + this.transformModuleDefinition ??= (definition) => definition; + return { + ConfigurableModuleClass: this.createConfigurableModuleCls(), + MODULE_OPTIONS_TOKEN: this.options.optionsInjectionToken, + ASYNC_OPTIONS_TYPE: this.createTypeProxy("ASYNC_OPTIONS_TYPE"), + OPTIONS_TYPE: this.createTypeProxy("OPTIONS_TYPE") + }; + } + constructInjectionTokenString() { + const moduleNameInSnakeCase = this.options.moduleName.trim().split(/(?=[A-Z])/).join("_").toUpperCase(); + return `${moduleNameInSnakeCase}_MODULE_OPTIONS`; + } + createConfigurableModuleCls() { + const self2 = this; + const asyncMethodKey = this.staticMethodKey + constants_1.ASYNC_METHOD_SUFFIX; + class InternalModuleClass { + static [self2.staticMethodKey](options) { + const providers = [ + { + provide: self2.options.optionsInjectionToken, + useValue: this.omitExtras(options, self2.extras) + } + ]; + if (self2.options.alwaysTransient) { + providers.push({ + provide: constants_1.CONFIGURABLE_MODULE_ID, + useValue: (0, random_string_generator_util_1.randomStringGenerator)() + }); + } + return self2.transformModuleDefinition({ + module: this, + providers + }, { + ...self2.extras, + ...options + }); + } + static [asyncMethodKey](options) { + const providers = this.createAsyncProviders(options); + if (self2.options.alwaysTransient) { + providers.push({ + provide: constants_1.CONFIGURABLE_MODULE_ID, + useValue: (0, random_string_generator_util_1.randomStringGenerator)() + }); + } + return self2.transformModuleDefinition({ + module: this, + imports: options.imports || [], + providers + }, { + ...self2.extras, + ...options + }); + } + static omitExtras(input, extras) { + if (!extras) { + return input; + } + const moduleOptions = {}; + const extrasKeys = Object.keys(extras); + Object.keys(input).filter((key) => !extrasKeys.includes(key)).forEach((key) => { + moduleOptions[key] = input[key]; + }); + return moduleOptions; + } + static createAsyncProviders(options) { + if (options.useExisting || options.useFactory) { + if (options.inject && options.provideInjectionTokensFrom) { + return [ + this.createAsyncOptionsProvider(options), + ...(0, utils_1.getInjectionProviders)(options.provideInjectionTokensFrom, options.inject) + ]; + } + return [this.createAsyncOptionsProvider(options)]; + } + return [ + this.createAsyncOptionsProvider(options), + { + provide: options.useClass, + useClass: options.useClass + } + ]; + } + static createAsyncOptionsProvider(options) { + if (options.useFactory) { + return { + provide: self2.options.optionsInjectionToken, + useFactory: options.useFactory, + inject: options.inject || [] + }; + } + return { + provide: self2.options.optionsInjectionToken, + useFactory: async (optionsFactory) => await optionsFactory[self2.factoryClassMethodKey](), + inject: [options.useExisting || options.useClass] + }; + } + } + return InternalModuleClass; + } + createTypeProxy(typeName) { + const proxy = new Proxy({}, { + get: () => { + throw new Error(`"${typeName}" is not supposed to be used as a value.`); + } + }); + return proxy; + } + }; + exports2.ConfigurableModuleBuilder = ConfigurableModuleBuilder; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-async-options.interface.js +var require_configurable_module_async_options_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-async-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-cls.interface.js +var require_configurable_module_cls_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-cls.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-host.interface.js +var require_configurable_module_host_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-host.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/interfaces/index.js +var require_interfaces2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/interfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_configurable_module_async_options_interface(), exports2); + tslib_1.__exportStar(require_configurable_module_cls_interface(), exports2); + tslib_1.__exportStar(require_configurable_module_host_interface(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/index.js +var require_module_utils = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/module-utils/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_configurable_module_builder(), exports2); + tslib_1.__exportStar(require_interfaces2(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/default-value.pipe.js +var require_default_value_pipe = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/default-value.pipe.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DefaultValuePipe = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var injectable_decorator_1 = require_injectable_decorator(); + var shared_utils_1 = require_shared_utils(); + var DefaultValuePipe = class DefaultValuePipe { + constructor(defaultValue) { + this.defaultValue = defaultValue; + } + transform(value, _metadata) { + if ((0, shared_utils_1.isNil)(value) || (0, shared_utils_1.isNumber)(value) && isNaN(value)) { + return this.defaultValue; + } + return value; + } + }; + exports2.DefaultValuePipe = DefaultValuePipe; + exports2.DefaultValuePipe = DefaultValuePipe = tslib_1.__decorate([ + (0, injectable_decorator_1.Injectable)(), + tslib_1.__metadata("design:paramtypes", [Object]) + ], DefaultValuePipe); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/http-error-by-code.util.js +var require_http_error_by_code_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/http-error-by-code.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpErrorByCode = void 0; + var enums_1 = require_enums(); + var exceptions_1 = require_exceptions(); + exports2.HttpErrorByCode = { + [enums_1.HttpStatus.BAD_GATEWAY]: exceptions_1.BadGatewayException, + [enums_1.HttpStatus.BAD_REQUEST]: exceptions_1.BadRequestException, + [enums_1.HttpStatus.CONFLICT]: exceptions_1.ConflictException, + [enums_1.HttpStatus.FORBIDDEN]: exceptions_1.ForbiddenException, + [enums_1.HttpStatus.GATEWAY_TIMEOUT]: exceptions_1.GatewayTimeoutException, + [enums_1.HttpStatus.GONE]: exceptions_1.GoneException, + [enums_1.HttpStatus.I_AM_A_TEAPOT]: exceptions_1.ImATeapotException, + [enums_1.HttpStatus.INTERNAL_SERVER_ERROR]: exceptions_1.InternalServerErrorException, + [enums_1.HttpStatus.METHOD_NOT_ALLOWED]: exceptions_1.MethodNotAllowedException, + [enums_1.HttpStatus.NOT_ACCEPTABLE]: exceptions_1.NotAcceptableException, + [enums_1.HttpStatus.NOT_FOUND]: exceptions_1.NotFoundException, + [enums_1.HttpStatus.NOT_IMPLEMENTED]: exceptions_1.NotImplementedException, + [enums_1.HttpStatus.PAYLOAD_TOO_LARGE]: exceptions_1.PayloadTooLargeException, + [enums_1.HttpStatus.PRECONDITION_FAILED]: exceptions_1.PreconditionFailedException, + [enums_1.HttpStatus.REQUEST_TIMEOUT]: exceptions_1.RequestTimeoutException, + [enums_1.HttpStatus.SERVICE_UNAVAILABLE]: exceptions_1.ServiceUnavailableException, + [enums_1.HttpStatus.UNAUTHORIZED]: exceptions_1.UnauthorizedException, + [enums_1.HttpStatus.UNPROCESSABLE_ENTITY]: exceptions_1.UnprocessableEntityException, + [enums_1.HttpStatus.UNSUPPORTED_MEDIA_TYPE]: exceptions_1.UnsupportedMediaTypeException + }; + } +}); + +// ../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/concat.js +var require_concat = __commonJS({ + "../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/concat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var ConcatIterator = class { + constructor(toConcat) { + this.toConcat = toConcat; + } + next() { + if (this.toConcat.length === 0) { + return { done: true }; + } + const result = this.toConcat[0].next(); + if (!result.done) { + return result; + } + this.toConcat.shift(); + return this.next(); + } + }; + exports2.ConcatIterator = ConcatIterator; + } +}); + +// ../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/filter.js +var require_filter = __commonJS({ + "../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/filter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var FilterIterator = class { + constructor(source, predicate) { + this.source = source; + this.predicate = predicate; + } + next() { + let result; + do { + result = this.source.next(); + } while (!result.done && !this.predicate(result.value)); + return result; + } + }; + exports2.FilterIterator = FilterIterator; + } +}); + +// ../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/utils.js +var require_utils3 = __commonJS({ + "../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function isIterator(candidate) { + return typeof candidate === "object" && candidate !== null && typeof candidate.next === "function"; + } + exports2.isIterator = isIterator; + function isIterable(candidate) { + return typeof candidate === "object" && candidate !== null && typeof candidate[Symbol.iterator] === "function"; + } + exports2.isIterable = isIterable; + function toIterator(collection) { + if (isIterator(collection)) { + return collection; + } + if (isIterable(collection)) { + return collection[Symbol.iterator](); + } + throw new Error("Passed collection is neither an Iterator nor an Iterable"); + } + exports2.toIterator = toIterator; + } +}); + +// ../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/flatten.js +var require_flatten = __commonJS({ + "../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/flatten.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils_1 = require_utils3(); + var FlattenIterator = class { + constructor(outer) { + this.outer = outer; + } + next() { + if (this.inner) { + const result = this.inner.next(); + if (!result.done) { + return result; + } + this.inner = void 0; + } + const { value, done } = this.outer.next(); + if (utils_1.isIterable(value)) { + this.inner = value[Symbol.iterator](); + return this.next(); + } + return { value, done }; + } + }; + exports2.FlattenIterator = FlattenIterator; + } +}); + +// ../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/map.js +var require_map = __commonJS({ + "../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/map.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var MapIterator = class { + constructor(source, iteratee) { + this.source = source; + this.iteratee = iteratee; + } + next() { + const { value, done } = this.source.next(); + return { value: !done && this.iteratee(value), done }; + } + }; + exports2.MapIterator = MapIterator; + } +}); + +// ../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/slice.js +var require_slice = __commonJS({ + "../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/slice.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var SliceIterator = class { + /** + * @param {Iterator} source Source Iterator + * @param {number} start Zero-based positive start index, inclusive + * @param {number} end Zero-based positive end index, exclusive, defaults to end of iterator + */ + constructor(source, start, end = Infinity) { + this.source = source; + this.start = start; + this.end = end; + this.i = 0; + } + next() { + while (this.i < this.start) { + const result = this.source.next(); + if (result.done) { + return result; + } + this.i++; + } + this.i++; + if (this.i >= this.end) { + return { done: true }; + } + return this.source.next(); + } + }; + exports2.SliceIterator = SliceIterator; + } +}); + +// ../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/zip.js +var require_zip = __commonJS({ + "../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/zip.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var ZipIterator = class { + constructor(a, b) { + this.a = a; + this.b = b; + } + next() { + const a = this.a.next(); + if (a.done) { + return { done: true }; + } + const b = this.b.next(); + if (b.done) { + return { done: true }; + } + return { value: [a.value, b.value], done: false }; + } + }; + exports2.ZipIterator = ZipIterator; + } +}); + +// ../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/iterate.js +var require_iterate = __commonJS({ + "../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/iterate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var concat_1 = require_concat(); + var filter_1 = require_filter(); + var flatten_1 = require_flatten(); + var map_1 = require_map(); + var slice_1 = require_slice(); + var utils_1 = require_utils3(); + var zip_1 = require_zip(); + var IteratorWithOperators = class _IteratorWithOperators { + /** + * @param source Iterator to wrap + */ + constructor(source) { + this.source = source; + } + /** + * Returns a `{ value, done }` object that adheres to the Iterator protocol + */ + next() { + return this.source.next(); + } + /** + * The presence of this method makes the Iterator itself Iterable. + * This makes it possible to pass it to `for of` and Iterable-accepting functions like `Array.from()` + */ + [Symbol.iterator]() { + return this; + } + /** + * Returns a new Iterator by running each element thru iteratee + */ + map(iteratee) { + return new _IteratorWithOperators(new map_1.MapIterator(this.source, iteratee)); + } + filter(predicate) { + return new _IteratorWithOperators(new filter_1.FilterIterator(this.source, predicate)); + } + /** + * Returns a new Iterator concatenating the Iterator with an additional Iterator or Iterable + */ + concat(collection) { + return new _IteratorWithOperators(new concat_1.ConcatIterator([this.source, utils_1.toIterator(collection)])); + } + /** + * Returns a new Iterator that emits slice of the source with n elements taken from the beginning + * + * @param limit The number of elements to take. + */ + take(limit) { + return new _IteratorWithOperators(new slice_1.SliceIterator(this.source, 0, limit + 1)); + } + /** + * Returns a new Iterator that emits slice of the source with n elements dropped from the beginning + * + * @param n The number of elements to drop. + */ + drop(n) { + return new _IteratorWithOperators(new slice_1.SliceIterator(this.source, n, Infinity)); + } + /** + * Returns a new Iterator that emits a slice of the source + * + * @param {number} start Zero-based positive start index, inclusive + * @param {number} end Zero-based positive end index, exclusive, defaults to end of iterator + */ + slice(start, end = Infinity) { + return new _IteratorWithOperators(new slice_1.SliceIterator(this.source, start, end)); + } + /** + * Returns a new Iterator that flattens items emitted by the Iterator a single level deep + */ + flatten() { + return new _IteratorWithOperators(new flatten_1.FlattenIterator(this.source)); + } + reduce(iteratee, accumulator) { + let result; + if (accumulator === void 0) { + result = this.source.next(); + if (result.done) { + throw new TypeError("Reduce of empty Iterator with no initial value"); + } + accumulator = result.value; + } + while (true) { + result = this.source.next(); + if (result.done) { + break; + } + accumulator = iteratee(accumulator, result.value); + } + return accumulator; + } + find(predicate) { + let result; + while (true) { + result = this.source.next(); + if (result.done) { + return void 0; + } + if (predicate(result.value)) { + return result.value; + } + } + } + /** + * Iterates and checks if `value` is emitted by the Iterator + * + * @param value The value to search + */ + includes(value) { + let result; + do { + result = this.source.next(); + if (!result.done && result.value === value) { + return true; + } + } while (!result.done); + return false; + } + /** + * Iterates and checks if `predicate` returns truthy for any element emitted by the Iterator + */ + some(predicate) { + let result; + do { + result = this.source.next(); + if (!result.done && predicate(result.value)) { + return true; + } + } while (!result.done); + return false; + } + /** + * Iterates and checks if `predicate` returns truthy for all elements emitted by the Iterator + */ + every(predicate) { + let result; + do { + result = this.source.next(); + if (!result.done && !predicate(result.value)) { + return false; + } + } while (!result.done); + return true; + } + /** + * Iterates and invokes `iteratee` for every element emitted by the Iterator + */ + forEach(iteratee) { + let result; + while (true) { + result = this.source.next(); + if (result.done) { + break; + } + iteratee(result.value); + } + } + /** + * Iterates and joins all elements emitted by the Iterator together as a string separated by an optional separator + */ + join(separator = ",") { + let joined = ""; + let result; + while (true) { + result = this.source.next(); + if (result.done) { + break; + } + joined += separator + result.value; + } + return joined.substr(separator.length); + } + /** + * Iterates and returns all items emitted by the Iterator as an array. + * Equivalent to passing the Iterator to `Array.from()` + */ + toArray() { + return Array.from(this); + } + /** + * Iterates and returns all items emitted by the Iterator as an ES6 Set. + * Equivalent to passing the Iterator to `new Set()` + */ + toSet() { + const set = /* @__PURE__ */ new Set(); + while (true) { + const { value, done } = this.next(); + if (done) { + return set; + } + set.add(value); + } + } + /** + * Iterates and returns all `[key, value]` paris emitted by the Iterator as an ES6 Map. + * Equivalent to passing the Iterator to `new Map()` + */ + toMap() { + return new Map(this); + } + }; + exports2.IteratorWithOperators = IteratorWithOperators; + function iterate(collection) { + return new IteratorWithOperators(utils_1.toIterator(collection)); + } + exports2.iterate = iterate; + function zip(a, b) { + return new IteratorWithOperators(new zip_1.ZipIterator(utils_1.toIterator(a), utils_1.toIterator(b))); + } + exports2.zip = zip; + exports2.default = iterate; + } +}); + +// ../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/index.js +var require_lib = __commonJS({ + "../../node_modules/.pnpm/iterare@1.2.1/node_modules/iterare/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var iterate_1 = require_iterate(); + exports2.iterate = iterate_1.iterate; + exports2.zip = iterate_1.zip; + exports2.default = iterate_1.iterate; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/load-package.util.js +var require_load_package_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/load-package.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.loadPackage = loadPackage; + var logger_service_1 = require_logger_service(); + var MISSING_REQUIRED_DEPENDENCY = (name, reason) => `The "${name}" package is missing. Please, make sure to install it to take advantage of ${reason}.`; + var logger = new logger_service_1.Logger("PackageLoader"); + function loadPackage(packageName, context, loaderFn) { + try { + return loaderFn ? loaderFn() : require(packageName); + } catch (e) { + logger.error(MISSING_REQUIRED_DEPENDENCY(packageName, context)); + logger_service_1.Logger.flush(); + process.exit(1); + } + } + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/metadata/ValidationMetadata.js +var require_ValidationMetadata = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/metadata/ValidationMetadata.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ValidationMetadata = void 0; + var ValidationMetadata = class { + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + constructor(args) { + this.groups = []; + this.each = false; + this.context = void 0; + this.type = args.type; + this.name = args.name; + this.target = args.target; + this.propertyName = args.propertyName; + this.constraints = args === null || args === void 0 ? void 0 : args.constraints; + this.constraintCls = args.constraintCls; + this.validationTypeOptions = args.validationTypeOptions; + if (args.validationOptions) { + this.message = args.validationOptions.message; + this.groups = args.validationOptions.groups; + this.always = args.validationOptions.always; + this.each = args.validationOptions.each; + this.context = args.validationOptions.context; + } + } + }; + exports2.ValidationMetadata = ValidationMetadata; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation-schema/ValidationSchemaToMetadataTransformer.js +var require_ValidationSchemaToMetadataTransformer = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation-schema/ValidationSchemaToMetadataTransformer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ValidationSchemaToMetadataTransformer = void 0; + var ValidationMetadata_1 = require_ValidationMetadata(); + var ValidationSchemaToMetadataTransformer = class { + transform(schema) { + const metadatas = []; + Object.keys(schema.properties).forEach((property) => { + schema.properties[property].forEach((validation) => { + const validationOptions = { + message: validation.message, + groups: validation.groups, + always: validation.always, + each: validation.each + }; + const args = { + type: validation.type, + name: validation.name, + target: schema.name, + propertyName: property, + constraints: validation.constraints, + validationTypeOptions: validation.options, + validationOptions + }; + metadatas.push(new ValidationMetadata_1.ValidationMetadata(args)); + }); + }); + return metadatas; + } + }; + exports2.ValidationSchemaToMetadataTransformer = ValidationSchemaToMetadataTransformer; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/utils/convert-to-array.util.js +var require_convert_to_array_util = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/utils/convert-to-array.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.convertToArray = void 0; + function convertToArray(val) { + if (val instanceof Map) { + return Array.from(val.values()); + } + return Array.isArray(val) ? val : Array.from(val); + } + exports2.convertToArray = convertToArray; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/utils/get-global.util.js +var require_get_global_util = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/utils/get-global.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getGlobal = void 0; + function getGlobal() { + if (typeof globalThis !== "undefined") { + return globalThis; + } + if (typeof global !== "undefined") { + return global; + } + if (typeof window !== "undefined") { + return window; + } + if (typeof self !== "undefined") { + return self; + } + } + exports2.getGlobal = getGlobal; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/utils/is-promise.util.js +var require_is_promise_util = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/utils/is-promise.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isPromise = void 0; + function isPromise(p) { + return p !== null && typeof p === "object" && typeof p.then === "function"; + } + exports2.isPromise = isPromise; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/utils/index.js +var require_utils4 = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/utils/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_convert_to_array_util(), exports2); + __exportStar2(require_get_global_util(), exports2); + __exportStar2(require_is_promise_util(), exports2); + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/metadata/MetadataStorage.js +var require_MetadataStorage = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/metadata/MetadataStorage.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getMetadataStorage = exports2.MetadataStorage = void 0; + var ValidationSchemaToMetadataTransformer_1 = require_ValidationSchemaToMetadataTransformer(); + var utils_1 = require_utils4(); + var MetadataStorage = class { + constructor() { + this.validationMetadatas = /* @__PURE__ */ new Map(); + this.constraintMetadatas = /* @__PURE__ */ new Map(); + } + get hasValidationMetaData() { + return !!this.validationMetadatas.size; + } + // ------------------------------------------------------------------------- + // Public Methods + // ------------------------------------------------------------------------- + /** + * Adds a new validation metadata. + */ + addValidationSchema(schema) { + const validationMetadatas = new ValidationSchemaToMetadataTransformer_1.ValidationSchemaToMetadataTransformer().transform(schema); + validationMetadatas.forEach((validationMetadata) => this.addValidationMetadata(validationMetadata)); + } + /** + * Adds a new validation metadata. + */ + addValidationMetadata(metadata) { + const existingMetadata = this.validationMetadatas.get(metadata.target); + if (existingMetadata) { + existingMetadata.push(metadata); + } else { + this.validationMetadatas.set(metadata.target, [metadata]); + } + } + /** + * Adds a new constraint metadata. + */ + addConstraintMetadata(metadata) { + const existingMetadata = this.constraintMetadatas.get(metadata.target); + if (existingMetadata) { + existingMetadata.push(metadata); + } else { + this.constraintMetadatas.set(metadata.target, [metadata]); + } + } + /** + * Groups metadata by their property names. + */ + groupByPropertyName(metadata) { + const grouped = {}; + metadata.forEach((metadata2) => { + if (!grouped[metadata2.propertyName]) + grouped[metadata2.propertyName] = []; + grouped[metadata2.propertyName].push(metadata2); + }); + return grouped; + } + /** + * Gets all validation metadatas for the given object with the given groups. + */ + getTargetValidationMetadatas(targetConstructor, targetSchema, always, strictGroups, groups) { + const includeMetadataBecauseOfAlwaysOption = (metadata) => { + if (typeof metadata.always !== "undefined") + return metadata.always; + if (metadata.groups && metadata.groups.length) + return false; + return always; + }; + const excludeMetadataBecauseOfStrictGroupsOption = (metadata) => { + if (strictGroups) { + if (!groups || !groups.length) { + if (metadata.groups && metadata.groups.length) + return true; + } + } + return false; + }; + const filteredForOriginalMetadatasSearch = this.validationMetadatas.get(targetConstructor) || []; + const originalMetadatas = filteredForOriginalMetadatasSearch.filter((metadata) => { + if (metadata.target !== targetConstructor && metadata.target !== targetSchema) + return false; + if (includeMetadataBecauseOfAlwaysOption(metadata)) + return true; + if (excludeMetadataBecauseOfStrictGroupsOption(metadata)) + return false; + if (groups && groups.length > 0) + return metadata.groups && !!metadata.groups.find((group) => groups.indexOf(group) !== -1); + return true; + }); + const filteredForInheritedMetadatasSearch = []; + for (const [key, value] of this.validationMetadatas.entries()) { + if (targetConstructor.prototype instanceof key) { + filteredForInheritedMetadatasSearch.push(...value); + } + } + const inheritedMetadatas = filteredForInheritedMetadatasSearch.filter((metadata) => { + if (typeof metadata.target === "string") + return false; + if (metadata.target === targetConstructor) + return false; + if (metadata.target instanceof Function && !(targetConstructor.prototype instanceof metadata.target)) + return false; + if (includeMetadataBecauseOfAlwaysOption(metadata)) + return true; + if (excludeMetadataBecauseOfStrictGroupsOption(metadata)) + return false; + if (groups && groups.length > 0) + return metadata.groups && !!metadata.groups.find((group) => groups.indexOf(group) !== -1); + return true; + }); + const uniqueInheritedMetadatas = inheritedMetadatas.filter((inheritedMetadata) => { + return !originalMetadatas.find((originalMetadata) => { + return originalMetadata.propertyName === inheritedMetadata.propertyName && originalMetadata.type === inheritedMetadata.type; + }); + }); + return originalMetadatas.concat(uniqueInheritedMetadatas); + } + /** + * Gets all validator constraints for the given object. + */ + getTargetValidatorConstraints(target) { + return this.constraintMetadatas.get(target) || []; + } + }; + exports2.MetadataStorage = MetadataStorage; + function getMetadataStorage() { + const global2 = (0, utils_1.getGlobal)(); + if (!global2.classValidatorMetadataStorage) { + global2.classValidatorMetadataStorage = new MetadataStorage(); + } + return global2.classValidatorMetadataStorage; + } + exports2.getMetadataStorage = getMetadataStorage; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation/ValidationError.js +var require_ValidationError = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation/ValidationError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ValidationError = void 0; + var ValidationError = class { + /** + * + * @param shouldDecorate decorate the message with ANSI formatter escape codes for better readability + * @param hasParent true when the error is a child of an another one + * @param parentPath path as string to the parent of this property + * @param showConstraintMessages show constraint messages instead of constraint names + */ + toString(shouldDecorate = false, hasParent = false, parentPath = ``, showConstraintMessages = false) { + const boldStart = shouldDecorate ? `\x1B[1m` : ``; + const boldEnd = shouldDecorate ? `\x1B[22m` : ``; + const constraintsToString = () => { + var _a; + return (showConstraintMessages ? Object.values : Object.keys)((_a = this.constraints) !== null && _a !== void 0 ? _a : {}).join(`, `); + }; + const propConstraintFailed = (propertyName) => ` - property ${boldStart}${parentPath}${propertyName}${boldEnd} has failed the following constraints: ${boldStart}${constraintsToString()}${boldEnd} +`; + if (!hasParent) { + return `An instance of ${boldStart}${this.target ? this.target.constructor.name : "an object"}${boldEnd} has failed the validation: +` + (this.constraints ? propConstraintFailed(this.property) : ``) + (this.children ? this.children.map((childError) => childError.toString(shouldDecorate, true, this.property, showConstraintMessages)).join(``) : ``); + } else { + const formattedProperty = Number.isInteger(+this.property) ? `[${this.property}]` : `${parentPath ? `.` : ``}${this.property}`; + if (this.constraints) { + return propConstraintFailed(formattedProperty); + } else { + return this.children ? this.children.map((childError) => childError.toString(shouldDecorate, true, `${parentPath}${formattedProperty}`, showConstraintMessages)).join(``) : ``; + } + } + } + }; + exports2.ValidationError = ValidationError; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation/ValidationTypes.js +var require_ValidationTypes = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation/ValidationTypes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ValidationTypes = void 0; + var ValidationTypes = class { + /** + * Checks if validation type is valid. + */ + static isValid(type) { + return type !== "isValid" && type !== "getMessage" && Object.keys(this).map((key) => this[key]).indexOf(type) !== -1; + } + }; + exports2.ValidationTypes = ValidationTypes; + ValidationTypes.CUSTOM_VALIDATION = "customValidation"; + ValidationTypes.NESTED_VALIDATION = "nestedValidation"; + ValidationTypes.PROMISE_VALIDATION = "promiseValidation"; + ValidationTypes.CONDITIONAL_VALIDATION = "conditionalValidation"; + ValidationTypes.WHITELIST = "whitelistValidation"; + ValidationTypes.IS_DEFINED = "isDefined"; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation/ValidationUtils.js +var require_ValidationUtils = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation/ValidationUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ValidationUtils = exports2.constraintToString = void 0; + function constraintToString(constraint) { + if (Array.isArray(constraint)) { + return constraint.join(", "); + } + if (typeof constraint === "symbol") { + constraint = constraint.description; + } + return `${constraint}`; + } + exports2.constraintToString = constraintToString; + var ValidationUtils = class { + static replaceMessageSpecialTokens(message, validationArguments) { + let messageString; + if (message instanceof Function) { + messageString = message(validationArguments); + } else if (typeof message === "string") { + messageString = message; + } + if (messageString && Array.isArray(validationArguments.constraints)) { + validationArguments.constraints.forEach((constraint, index) => { + messageString = messageString.replace(new RegExp(`\\$constraint${index + 1}`, "g"), constraintToString(constraint)); + }); + } + if (messageString && validationArguments.value !== void 0 && validationArguments.value !== null && ["string", "boolean", "number"].includes(typeof validationArguments.value)) + messageString = messageString.replace(/\$value/g, validationArguments.value); + if (messageString) + messageString = messageString.replace(/\$property/g, validationArguments.property); + if (messageString) + messageString = messageString.replace(/\$target/g, validationArguments.targetName); + return messageString; + } + }; + exports2.ValidationUtils = ValidationUtils; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation/ValidationExecutor.js +var require_ValidationExecutor = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation/ValidationExecutor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ValidationExecutor = void 0; + var ValidationError_1 = require_ValidationError(); + var ValidationTypes_1 = require_ValidationTypes(); + var ValidationUtils_1 = require_ValidationUtils(); + var utils_1 = require_utils4(); + var MetadataStorage_1 = require_MetadataStorage(); + var ValidationExecutor = class { + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + constructor(validator, validatorOptions) { + this.validator = validator; + this.validatorOptions = validatorOptions; + this.awaitingPromises = []; + this.ignoreAsyncValidations = false; + this.metadataStorage = (0, MetadataStorage_1.getMetadataStorage)(); + } + // ------------------------------------------------------------------------- + // Public Methods + // ------------------------------------------------------------------------- + execute(object, targetSchema, validationErrors) { + var _a, _b; + if (!this.metadataStorage.hasValidationMetaData && ((_a = this.validatorOptions) === null || _a === void 0 ? void 0 : _a.enableDebugMessages) === true) { + console.warn(`No validation metadata found. No validation will be performed. There are multiple possible reasons: + - There may be multiple class-validator versions installed. You will need to flatten your dependencies to fix the issue. + - This validation runs before any file with validation decorator was parsed by NodeJS.`); + } + const groups = this.validatorOptions ? this.validatorOptions.groups : void 0; + const strictGroups = this.validatorOptions && this.validatorOptions.strictGroups || false; + const always = this.validatorOptions && this.validatorOptions.always || false; + const forbidUnknownValues = ((_b = this.validatorOptions) === null || _b === void 0 ? void 0 : _b.forbidUnknownValues) === void 0 || this.validatorOptions.forbidUnknownValues !== false; + const targetMetadatas = this.metadataStorage.getTargetValidationMetadatas(object.constructor, targetSchema, always, strictGroups, groups); + const groupedMetadatas = this.metadataStorage.groupByPropertyName(targetMetadatas); + if (forbidUnknownValues && !targetMetadatas.length) { + const validationError = new ValidationError_1.ValidationError(); + if (!this.validatorOptions || !this.validatorOptions.validationError || this.validatorOptions.validationError.target === void 0 || this.validatorOptions.validationError.target === true) + validationError.target = object; + validationError.value = void 0; + validationError.property = void 0; + validationError.children = []; + validationError.constraints = { unknownValue: "an unknown value was passed to the validate function" }; + validationErrors.push(validationError); + return; + } + if (this.validatorOptions && this.validatorOptions.whitelist) + this.whitelist(object, groupedMetadatas, validationErrors); + Object.keys(groupedMetadatas).forEach((propertyName) => { + const value = object[propertyName]; + const definedMetadatas = groupedMetadatas[propertyName].filter((metadata) => metadata.type === ValidationTypes_1.ValidationTypes.IS_DEFINED); + const metadatas = groupedMetadatas[propertyName].filter((metadata) => metadata.type !== ValidationTypes_1.ValidationTypes.IS_DEFINED && metadata.type !== ValidationTypes_1.ValidationTypes.WHITELIST); + if (value instanceof Promise && metadatas.find((metadata) => metadata.type === ValidationTypes_1.ValidationTypes.PROMISE_VALIDATION)) { + this.awaitingPromises.push(value.then((resolvedValue) => { + this.performValidations(object, resolvedValue, propertyName, definedMetadatas, metadatas, validationErrors); + })); + } else { + this.performValidations(object, value, propertyName, definedMetadatas, metadatas, validationErrors); + } + }); + } + whitelist(object, groupedMetadatas, validationErrors) { + const notAllowedProperties = []; + Object.keys(object).forEach((propertyName) => { + if (!groupedMetadatas[propertyName] || groupedMetadatas[propertyName].length === 0) + notAllowedProperties.push(propertyName); + }); + if (notAllowedProperties.length > 0) { + if (this.validatorOptions && this.validatorOptions.forbidNonWhitelisted) { + notAllowedProperties.forEach((property) => { + const validationError = this.generateValidationError(object, object[property], property); + validationError.constraints = { [ValidationTypes_1.ValidationTypes.WHITELIST]: `property ${property} should not exist` }; + validationError.children = void 0; + validationErrors.push(validationError); + }); + } else { + notAllowedProperties.forEach((property) => delete object[property]); + } + } + } + stripEmptyErrors(errors) { + return errors.filter((error) => { + if (error.children) { + error.children = this.stripEmptyErrors(error.children); + } + if (Object.keys(error.constraints).length === 0) { + if (error.children.length === 0) { + return false; + } else { + delete error.constraints; + } + } + return true; + }); + } + // ------------------------------------------------------------------------- + // Private Methods + // ------------------------------------------------------------------------- + performValidations(object, value, propertyName, definedMetadatas, metadatas, validationErrors) { + const customValidationMetadatas = metadatas.filter((metadata) => metadata.type === ValidationTypes_1.ValidationTypes.CUSTOM_VALIDATION); + const nestedValidationMetadatas = metadatas.filter((metadata) => metadata.type === ValidationTypes_1.ValidationTypes.NESTED_VALIDATION); + const conditionalValidationMetadatas = metadatas.filter((metadata) => metadata.type === ValidationTypes_1.ValidationTypes.CONDITIONAL_VALIDATION); + const validationError = this.generateValidationError(object, value, propertyName); + validationErrors.push(validationError); + const canValidate = this.conditionalValidations(object, value, conditionalValidationMetadatas); + if (!canValidate) { + return; + } + this.customValidations(object, value, definedMetadatas, validationError); + this.mapContexts(object, value, definedMetadatas, validationError); + if (value === void 0 && this.validatorOptions && this.validatorOptions.skipUndefinedProperties === true) { + return; + } + if (value === null && this.validatorOptions && this.validatorOptions.skipNullProperties === true) { + return; + } + if ((value === null || value === void 0) && this.validatorOptions && this.validatorOptions.skipMissingProperties === true) { + return; + } + this.customValidations(object, value, customValidationMetadatas, validationError); + this.nestedValidations(value, nestedValidationMetadatas, validationError); + this.mapContexts(object, value, metadatas, validationError); + this.mapContexts(object, value, customValidationMetadatas, validationError); + } + generateValidationError(object, value, propertyName) { + const validationError = new ValidationError_1.ValidationError(); + if (!this.validatorOptions || !this.validatorOptions.validationError || this.validatorOptions.validationError.target === void 0 || this.validatorOptions.validationError.target === true) + validationError.target = object; + if (!this.validatorOptions || !this.validatorOptions.validationError || this.validatorOptions.validationError.value === void 0 || this.validatorOptions.validationError.value === true) + validationError.value = value; + validationError.property = propertyName; + validationError.children = []; + validationError.constraints = {}; + return validationError; + } + conditionalValidations(object, value, metadatas) { + return metadatas.map((metadata) => metadata.constraints[0](object, value)).reduce((resultA, resultB) => resultA && resultB, true); + } + customValidations(object, value, metadatas, error) { + metadatas.forEach((metadata) => { + this.metadataStorage.getTargetValidatorConstraints(metadata.constraintCls).forEach((customConstraintMetadata) => { + if (customConstraintMetadata.async && this.ignoreAsyncValidations) + return; + if (this.validatorOptions && this.validatorOptions.stopAtFirstError && Object.keys(error.constraints || {}).length > 0) + return; + const validationArguments = { + targetName: object.constructor ? object.constructor.name : void 0, + property: metadata.propertyName, + object, + value, + constraints: metadata.constraints + }; + if (!metadata.each || !(Array.isArray(value) || value instanceof Set || value instanceof Map)) { + const validatedValue = customConstraintMetadata.instance.validate(value, validationArguments); + if ((0, utils_1.isPromise)(validatedValue)) { + const promise = validatedValue.then((isValid) => { + if (!isValid) { + const [type, message] = this.createValidationError(object, value, metadata, customConstraintMetadata); + error.constraints[type] = message; + if (metadata.context) { + if (!error.contexts) { + error.contexts = {}; + } + error.contexts[type] = Object.assign(error.contexts[type] || {}, metadata.context); + } + } + }); + this.awaitingPromises.push(promise); + } else { + if (!validatedValue) { + const [type, message] = this.createValidationError(object, value, metadata, customConstraintMetadata); + error.constraints[type] = message; + } + } + return; + } + const arrayValue = (0, utils_1.convertToArray)(value); + const validatedSubValues = arrayValue.map((subValue) => customConstraintMetadata.instance.validate(subValue, validationArguments)); + const validationIsAsync = validatedSubValues.some((validatedSubValue) => (0, utils_1.isPromise)(validatedSubValue)); + if (validationIsAsync) { + const asyncValidatedSubValues = validatedSubValues.map((validatedSubValue) => (0, utils_1.isPromise)(validatedSubValue) ? validatedSubValue : Promise.resolve(validatedSubValue)); + const asyncValidationIsFinishedPromise = Promise.all(asyncValidatedSubValues).then((flatValidatedValues) => { + const validationResult2 = flatValidatedValues.every((isValid) => isValid); + if (!validationResult2) { + const [type, message] = this.createValidationError(object, value, metadata, customConstraintMetadata); + error.constraints[type] = message; + if (metadata.context) { + if (!error.contexts) { + error.contexts = {}; + } + error.contexts[type] = Object.assign(error.contexts[type] || {}, metadata.context); + } + } + }); + this.awaitingPromises.push(asyncValidationIsFinishedPromise); + return; + } + const validationResult = validatedSubValues.every((isValid) => isValid); + if (!validationResult) { + const [type, message] = this.createValidationError(object, value, metadata, customConstraintMetadata); + error.constraints[type] = message; + } + }); + }); + } + nestedValidations(value, metadatas, error) { + if (value === void 0) { + return; + } + metadatas.forEach((metadata) => { + if (metadata.type !== ValidationTypes_1.ValidationTypes.NESTED_VALIDATION && metadata.type !== ValidationTypes_1.ValidationTypes.PROMISE_VALIDATION) { + return; + } else if (this.validatorOptions && this.validatorOptions.stopAtFirstError && Object.keys(error.constraints || {}).length > 0) { + return; + } + if (Array.isArray(value) || value instanceof Set || value instanceof Map) { + const arrayLikeValue = value instanceof Set ? Array.from(value) : value; + arrayLikeValue.forEach((subValue, index) => { + this.performValidations(value, subValue, index.toString(), [], metadatas, error.children); + }); + } else if (value instanceof Object) { + const targetSchema = typeof metadata.target === "string" ? metadata.target : metadata.target.name; + this.execute(value, targetSchema, error.children); + } else { + const [type, message] = this.createValidationError(metadata.target, value, metadata); + error.constraints[type] = message; + } + }); + } + mapContexts(object, value, metadatas, error) { + return metadatas.forEach((metadata) => { + if (metadata.context) { + let customConstraint; + if (metadata.type === ValidationTypes_1.ValidationTypes.CUSTOM_VALIDATION) { + const customConstraints = this.metadataStorage.getTargetValidatorConstraints(metadata.constraintCls); + customConstraint = customConstraints[0]; + } + const type = this.getConstraintType(metadata, customConstraint); + if (error.constraints[type]) { + if (!error.contexts) { + error.contexts = {}; + } + error.contexts[type] = Object.assign(error.contexts[type] || {}, metadata.context); + } + } + }); + } + createValidationError(object, value, metadata, customValidatorMetadata) { + const targetName = object.constructor ? object.constructor.name : void 0; + const type = this.getConstraintType(metadata, customValidatorMetadata); + const validationArguments = { + targetName, + property: metadata.propertyName, + object, + value, + constraints: metadata.constraints + }; + let message = metadata.message || ""; + if (!metadata.message && (!this.validatorOptions || this.validatorOptions && !this.validatorOptions.dismissDefaultMessages)) { + if (customValidatorMetadata && customValidatorMetadata.instance.defaultMessage instanceof Function) { + message = customValidatorMetadata.instance.defaultMessage(validationArguments); + } + } + const messageString = ValidationUtils_1.ValidationUtils.replaceMessageSpecialTokens(message, validationArguments); + return [type, messageString]; + } + getConstraintType(metadata, customValidatorMetadata) { + const type = customValidatorMetadata && customValidatorMetadata.name ? customValidatorMetadata.name : metadata.type; + return type; + } + }; + exports2.ValidationExecutor = ValidationExecutor; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation/Validator.js +var require_Validator = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation/Validator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Validator = void 0; + var ValidationExecutor_1 = require_ValidationExecutor(); + var Validator = class { + /** + * Performs validation of the given object based on decorators or validation schema. + */ + validate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + return this.coreValidate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions); + } + /** + * Performs validation of the given object based on decorators or validation schema and reject on error. + */ + async validateOrReject(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + const errors = await this.coreValidate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions); + if (errors.length) + return Promise.reject(errors); + } + /** + * Performs validation of the given object based on decorators or validation schema. + */ + validateSync(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + const object = typeof objectOrSchemaName === "string" ? objectOrValidationOptions : objectOrSchemaName; + const options = typeof objectOrSchemaName === "string" ? maybeValidatorOptions : objectOrValidationOptions; + const schema = typeof objectOrSchemaName === "string" ? objectOrSchemaName : void 0; + const executor = new ValidationExecutor_1.ValidationExecutor(this, options); + executor.ignoreAsyncValidations = true; + const validationErrors = []; + executor.execute(object, schema, validationErrors); + return executor.stripEmptyErrors(validationErrors); + } + // ------------------------------------------------------------------------- + // Private Properties + // ------------------------------------------------------------------------- + /** + * Performs validation of the given object based on decorators or validation schema. + * Common method for `validateOrReject` and `validate` methods. + */ + coreValidate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + const object = typeof objectOrSchemaName === "string" ? objectOrValidationOptions : objectOrSchemaName; + const options = typeof objectOrSchemaName === "string" ? maybeValidatorOptions : objectOrValidationOptions; + const schema = typeof objectOrSchemaName === "string" ? objectOrSchemaName : void 0; + const executor = new ValidationExecutor_1.ValidationExecutor(this, options); + const validationErrors = []; + executor.execute(object, schema, validationErrors); + return Promise.all(executor.awaitingPromises).then(() => { + return executor.stripEmptyErrors(validationErrors); + }); + } + }; + exports2.Validator = Validator; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/container.js +var require_container = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getFromContainer = exports2.useContainer = void 0; + var defaultContainer = new class { + constructor() { + this.instances = []; + } + get(someClass) { + let instance = this.instances.find((instance2) => instance2.type === someClass); + if (!instance) { + instance = { type: someClass, object: new someClass() }; + this.instances.push(instance); + } + return instance.object; + } + }(); + var userContainer; + var userContainerOptions; + function useContainer(iocContainer, options) { + userContainer = iocContainer; + userContainerOptions = options; + } + exports2.useContainer = useContainer; + function getFromContainer(someClass) { + if (userContainer) { + try { + const instance = userContainer.get(someClass); + if (instance) + return instance; + if (!userContainerOptions || !userContainerOptions.fallback) + return instance; + } catch (error) { + if (!userContainerOptions || !userContainerOptions.fallbackOnErrors) + throw error; + } + } + return defaultContainer.get(someClass); + } + exports2.getFromContainer = getFromContainer; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/Allow.js +var require_Allow = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/Allow.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Allow = void 0; + var ValidationTypes_1 = require_ValidationTypes(); + var ValidationMetadata_1 = require_ValidationMetadata(); + var MetadataStorage_1 = require_MetadataStorage(); + function Allow(validationOptions) { + return function(object, propertyName) { + const args = { + type: ValidationTypes_1.ValidationTypes.WHITELIST, + target: object.constructor, + propertyName, + validationOptions + }; + (0, MetadataStorage_1.getMetadataStorage)().addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); + }; + } + exports2.Allow = Allow; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/metadata/ConstraintMetadata.js +var require_ConstraintMetadata = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/metadata/ConstraintMetadata.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ConstraintMetadata = void 0; + var container_1 = require_container(); + var ConstraintMetadata = class { + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + constructor(target, name, async = false) { + this.target = target; + this.name = name; + this.async = async; + } + // ------------------------------------------------------------------------- + // Accessors + // ------------------------------------------------------------------------- + /** + * Instance of the target custom validation class which performs validation. + */ + get instance() { + return (0, container_1.getFromContainer)(this.target); + } + }; + exports2.ConstraintMetadata = ConstraintMetadata; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/register-decorator.js +var require_register_decorator = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/register-decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.registerDecorator = void 0; + var ConstraintMetadata_1 = require_ConstraintMetadata(); + var ValidationMetadata_1 = require_ValidationMetadata(); + var ValidationTypes_1 = require_ValidationTypes(); + var container_1 = require_container(); + var MetadataStorage_1 = require_MetadataStorage(); + function registerDecorator(options) { + let constraintCls; + if (options.validator instanceof Function) { + constraintCls = options.validator; + const constraintClasses = (0, container_1.getFromContainer)(MetadataStorage_1.MetadataStorage).getTargetValidatorConstraints(options.validator); + if (constraintClasses.length > 1) { + throw `More than one implementation of ValidatorConstraintInterface found for validator on: ${options.target.name}:${options.propertyName}`; + } + } else { + const validator = options.validator; + constraintCls = class CustomConstraint { + validate(value, validationArguments) { + return validator.validate(value, validationArguments); + } + defaultMessage(validationArguments) { + if (validator.defaultMessage) { + return validator.defaultMessage(validationArguments); + } + return ""; + } + }; + (0, MetadataStorage_1.getMetadataStorage)().addConstraintMetadata(new ConstraintMetadata_1.ConstraintMetadata(constraintCls, options.name, options.async)); + } + const validationMetadataArgs = { + type: options.name && ValidationTypes_1.ValidationTypes.isValid(options.name) ? options.name : ValidationTypes_1.ValidationTypes.CUSTOM_VALIDATION, + name: options.name, + target: options.target, + propertyName: options.propertyName, + validationOptions: options.options, + constraintCls, + constraints: options.constraints + }; + (0, MetadataStorage_1.getMetadataStorage)().addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(validationMetadataArgs)); + } + exports2.registerDecorator = registerDecorator; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/ValidateBy.js +var require_ValidateBy = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/ValidateBy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ValidateBy = exports2.buildMessage = void 0; + var register_decorator_1 = require_register_decorator(); + function buildMessage(impl, validationOptions) { + return (validationArguments) => { + const eachPrefix = validationOptions && validationOptions.each ? "each value in " : ""; + return impl(eachPrefix, validationArguments); + }; + } + exports2.buildMessage = buildMessage; + function ValidateBy(options, validationOptions) { + return function(object, propertyName) { + (0, register_decorator_1.registerDecorator)({ + name: options.name, + target: object.constructor, + propertyName, + options: validationOptions, + constraints: options.constraints, + validator: options.validator + }); + }; + } + exports2.ValidateBy = ValidateBy; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsDefined.js +var require_IsDefined = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsDefined.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsDefined = exports2.isDefined = exports2.IS_DEFINED = void 0; + var ValidateBy_1 = require_ValidateBy(); + var ValidationTypes_1 = require_ValidationTypes(); + exports2.IS_DEFINED = ValidationTypes_1.ValidationTypes.IS_DEFINED; + function isDefined(value) { + return value !== void 0 && value !== null; + } + exports2.isDefined = isDefined; + function IsDefined(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_DEFINED, + validator: { + validate: (value) => isDefined(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property should not be null or undefined", validationOptions) + } + }, validationOptions); + } + exports2.IsDefined = IsDefined; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsOptional.js +var require_IsOptional = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsOptional.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsOptional = exports2.IS_OPTIONAL = void 0; + var ValidationTypes_1 = require_ValidationTypes(); + var ValidationMetadata_1 = require_ValidationMetadata(); + var MetadataStorage_1 = require_MetadataStorage(); + exports2.IS_OPTIONAL = "isOptional"; + function IsOptional(validationOptions) { + return function(object, propertyName) { + const args = { + type: ValidationTypes_1.ValidationTypes.CONDITIONAL_VALIDATION, + name: exports2.IS_OPTIONAL, + target: object.constructor, + propertyName, + constraints: [ + (object2, value) => { + return object2[propertyName] !== null && object2[propertyName] !== void 0; + } + ], + validationOptions + }; + (0, MetadataStorage_1.getMetadataStorage)().addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); + }; + } + exports2.IsOptional = IsOptional; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/Validate.js +var require_Validate = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/Validate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Validate = exports2.ValidatorConstraint = void 0; + var ValidationMetadata_1 = require_ValidationMetadata(); + var MetadataStorage_1 = require_MetadataStorage(); + var ValidationTypes_1 = require_ValidationTypes(); + var ConstraintMetadata_1 = require_ConstraintMetadata(); + function ValidatorConstraint(options) { + return function(target) { + const isAsync = options && options.async; + let name = options && options.name ? options.name : ""; + if (!name) { + name = target.name; + if (!name) + name = name.replace(/\.?([A-Z]+)/g, (x, y) => "_" + y.toLowerCase()).replace(/^_/, ""); + } + const metadata = new ConstraintMetadata_1.ConstraintMetadata(target, name, isAsync); + (0, MetadataStorage_1.getMetadataStorage)().addConstraintMetadata(metadata); + }; + } + exports2.ValidatorConstraint = ValidatorConstraint; + function Validate(constraintClass, constraintsOrValidationOptions, maybeValidationOptions) { + return function(object, propertyName) { + const args = { + type: ValidationTypes_1.ValidationTypes.CUSTOM_VALIDATION, + target: object.constructor, + propertyName, + constraintCls: constraintClass, + constraints: Array.isArray(constraintsOrValidationOptions) ? constraintsOrValidationOptions : void 0, + validationOptions: !Array.isArray(constraintsOrValidationOptions) ? constraintsOrValidationOptions : maybeValidationOptions + }; + (0, MetadataStorage_1.getMetadataStorage)().addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); + }; + } + exports2.Validate = Validate; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/ValidateIf.js +var require_ValidateIf = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/ValidateIf.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ValidateIf = void 0; + var ValidationTypes_1 = require_ValidationTypes(); + var ValidationMetadata_1 = require_ValidationMetadata(); + var MetadataStorage_1 = require_MetadataStorage(); + function ValidateIf(condition, validationOptions) { + return function(object, propertyName) { + const args = { + type: ValidationTypes_1.ValidationTypes.CONDITIONAL_VALIDATION, + target: object.constructor, + propertyName, + constraints: [condition], + validationOptions + }; + (0, MetadataStorage_1.getMetadataStorage)().addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); + }; + } + exports2.ValidateIf = ValidateIf; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/ValidateNested.js +var require_ValidateNested = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/ValidateNested.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ValidateNested = void 0; + var ValidationTypes_1 = require_ValidationTypes(); + var ValidationMetadata_1 = require_ValidationMetadata(); + var MetadataStorage_1 = require_MetadataStorage(); + function ValidateNested(validationOptions) { + const opts = { ...validationOptions }; + const eachPrefix = opts.each ? "each value in " : ""; + opts.message = opts.message || eachPrefix + "nested property $property must be either object or array"; + return function(object, propertyName) { + const args = { + type: ValidationTypes_1.ValidationTypes.NESTED_VALIDATION, + target: object.constructor, + propertyName, + validationOptions: opts + }; + (0, MetadataStorage_1.getMetadataStorage)().addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); + }; + } + exports2.ValidateNested = ValidateNested; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/ValidatePromise.js +var require_ValidatePromise = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/ValidatePromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ValidatePromise = void 0; + var ValidationTypes_1 = require_ValidationTypes(); + var ValidationMetadata_1 = require_ValidationMetadata(); + var MetadataStorage_1 = require_MetadataStorage(); + function ValidatePromise(validationOptions) { + return function(object, propertyName) { + const args = { + type: ValidationTypes_1.ValidationTypes.PROMISE_VALIDATION, + target: object.constructor, + propertyName, + validationOptions + }; + (0, MetadataStorage_1.getMetadataStorage)().addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); + }; + } + exports2.ValidatePromise = ValidatePromise; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/assertString.js +var require_assertString = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/assertString.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = assertString; + function assertString(input) { + if (input === void 0 || input === null) throw new TypeError("Expected a string but received a ".concat(input)); + if (input.constructor.name !== "String") throw new TypeError("Expected a string but received a ".concat(input.constructor.name)); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/merge.js +var require_merge = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/merge.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = merge; + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function merge() { + var obj2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + var defaults = arguments.length > 1 ? arguments[1] : void 0; + if (_typeof(obj2) !== "object" || obj2 === null) { + obj2 = {}; + } + for (var key in defaults) { + if (typeof obj2[key] === "undefined") { + obj2[key] = defaults[key]; + } + } + return obj2; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/includesString.js +var require_includesString = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/includesString.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var includes = function includes2(str, val) { + return str.indexOf(val) !== -1; + }; + var _default = exports2.default = includes; + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isLatLong.js +var require_isLatLong = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isLatLong.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isLatLong; + var _assertString = _interopRequireDefault(require_assertString()); + var _merge = _interopRequireDefault(require_merge()); + var _includesString = _interopRequireDefault(require_includesString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var lat = /^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/; + var long = /^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/; + var latDMS = /^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i; + var longDMS = /^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i; + var defaultLatLongOptions = { + checkDMS: false + }; + function isLatLong(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, defaultLatLongOptions); + if (!(0, _includesString.default)(str, ",")) return false; + var pair = str.split(","); + if (pair[0].startsWith("(") && !pair[1].endsWith(")") || pair[1].endsWith(")") && !pair[0].startsWith("(")) return false; + if (options.checkDMS) { + return latDMS.test(pair[0]) && longDMS.test(pair[1]); + } + return lat.test(pair[0]) && long.test(pair[1]); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsLatLong.js +var require_IsLatLong = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsLatLong.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsLatLong = exports2.isLatLong = exports2.IS_LATLONG = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isLatLong_1 = __importDefault2(require_isLatLong()); + exports2.IS_LATLONG = "isLatLong"; + function isLatLong(value) { + return typeof value === "string" && (0, isLatLong_1.default)(value); + } + exports2.isLatLong = isLatLong; + function IsLatLong(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_LATLONG, + validator: { + validate: (value, args) => isLatLong(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a latitude,longitude string", validationOptions) + } + }, validationOptions); + } + exports2.IsLatLong = IsLatLong; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsLatitude.js +var require_IsLatitude = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsLatitude.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsLatitude = exports2.isLatitude = exports2.IS_LATITUDE = void 0; + var ValidateBy_1 = require_ValidateBy(); + var IsLatLong_1 = require_IsLatLong(); + exports2.IS_LATITUDE = "isLatitude"; + function isLatitude(value) { + return (typeof value === "number" || typeof value === "string") && (0, IsLatLong_1.isLatLong)(`${value},0`); + } + exports2.isLatitude = isLatitude; + function IsLatitude(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_LATITUDE, + validator: { + validate: (value, args) => isLatitude(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a latitude string or number", validationOptions) + } + }, validationOptions); + } + exports2.IsLatitude = IsLatitude; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsLongitude.js +var require_IsLongitude = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsLongitude.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsLongitude = exports2.isLongitude = exports2.IS_LONGITUDE = void 0; + var ValidateBy_1 = require_ValidateBy(); + var IsLatLong_1 = require_IsLatLong(); + exports2.IS_LONGITUDE = "isLongitude"; + function isLongitude(value) { + return (typeof value === "number" || typeof value === "string") && (0, IsLatLong_1.isLatLong)(`0,${value}`); + } + exports2.isLongitude = isLongitude; + function IsLongitude(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_LONGITUDE, + validator: { + validate: (value, args) => isLongitude(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a longitude string or number", validationOptions) + } + }, validationOptions); + } + exports2.IsLongitude = IsLongitude; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/Equals.js +var require_Equals = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/Equals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Equals = exports2.equals = exports2.EQUALS = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.EQUALS = "equals"; + function equals(value, comparison) { + return value === comparison; + } + exports2.equals = equals; + function Equals(comparison, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.EQUALS, + constraints: [comparison], + validator: { + validate: (value, args) => equals(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be equal to $constraint1", validationOptions) + } + }, validationOptions); + } + exports2.Equals = Equals; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/NotEquals.js +var require_NotEquals = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/NotEquals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NotEquals = exports2.notEquals = exports2.NOT_EQUALS = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.NOT_EQUALS = "notEquals"; + function notEquals(value, comparison) { + return value !== comparison; + } + exports2.notEquals = notEquals; + function NotEquals(comparison, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.NOT_EQUALS, + constraints: [comparison], + validator: { + validate: (value, args) => notEquals(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property should not be equal to $constraint1", validationOptions) + } + }, validationOptions); + } + exports2.NotEquals = NotEquals; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsEmpty.js +var require_IsEmpty = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsEmpty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsEmpty = exports2.isEmpty = exports2.IS_EMPTY = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_EMPTY = "isEmpty"; + function isEmpty(value) { + return value === "" || value === null || value === void 0; + } + exports2.isEmpty = isEmpty; + function IsEmpty(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_EMPTY, + validator: { + validate: (value, args) => isEmpty(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be empty", validationOptions) + } + }, validationOptions); + } + exports2.IsEmpty = IsEmpty; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsNotEmpty.js +var require_IsNotEmpty = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsNotEmpty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsNotEmpty = exports2.isNotEmpty = exports2.IS_NOT_EMPTY = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_NOT_EMPTY = "isNotEmpty"; + function isNotEmpty(value) { + return value !== "" && value !== null && value !== void 0; + } + exports2.isNotEmpty = isNotEmpty; + function IsNotEmpty(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_NOT_EMPTY, + validator: { + validate: (value, args) => isNotEmpty(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property should not be empty", validationOptions) + } + }, validationOptions); + } + exports2.IsNotEmpty = IsNotEmpty; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsIn.js +var require_IsIn = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsIn.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsIn = exports2.isIn = exports2.IS_IN = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_IN = "isIn"; + function isIn(value, possibleValues) { + return Array.isArray(possibleValues) && possibleValues.some((possibleValue) => possibleValue === value); + } + exports2.isIn = isIn; + function IsIn(values, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_IN, + constraints: [values], + validator: { + validate: (value, args) => isIn(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be one of the following values: $constraint1", validationOptions) + } + }, validationOptions); + } + exports2.IsIn = IsIn; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsNotIn.js +var require_IsNotIn = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/common/IsNotIn.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsNotIn = exports2.isNotIn = exports2.IS_NOT_IN = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_NOT_IN = "isNotIn"; + function isNotIn(value, possibleValues) { + return !Array.isArray(possibleValues) || !possibleValues.some((possibleValue) => possibleValue === value); + } + exports2.isNotIn = isNotIn; + function IsNotIn(values, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_NOT_IN, + constraints: [values], + validator: { + validate: (value, args) => isNotIn(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property should not be one of the following values: $constraint1", validationOptions) + } + }, validationOptions); + } + exports2.IsNotIn = IsNotIn; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/nullUndefinedCheck.js +var require_nullUndefinedCheck = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/nullUndefinedCheck.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isNullOrUndefined; + function isNullOrUndefined(value) { + return value === null || value === void 0; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/alpha.js +var require_alpha = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/alpha.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.farsiLocales = exports2.englishLocales = exports2.dotDecimal = exports2.decimal = exports2.commaDecimal = exports2.bengaliLocales = exports2.arabicLocales = exports2.alphanumeric = exports2.alpha = void 0; + var alpha = exports2.alpha = { + "en-US": /^[A-Z]+$/i, + "az-AZ": /^[A-VXYZÇƏĞİıÖŞÜ]+$/i, + "bg-BG": /^[А-Я]+$/i, + "cs-CZ": /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + "da-DK": /^[A-ZÆØÅ]+$/i, + "de-DE": /^[A-ZÄÖÜß]+$/i, + "el-GR": /^[Α-ώ]+$/i, + "es-ES": /^[A-ZÁÉÍÑÓÚÜ]+$/i, + "fa-IR": /^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i, + "fi-FI": /^[A-ZÅÄÖ]+$/i, + "fr-FR": /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + "it-IT": /^[A-ZÀÉÈÌÎÓÒÙ]+$/i, + "ja-JP": /^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i, + "nb-NO": /^[A-ZÆØÅ]+$/i, + "nl-NL": /^[A-ZÁÉËÏÓÖÜÚ]+$/i, + "nn-NO": /^[A-ZÆØÅ]+$/i, + "hu-HU": /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + "pl-PL": /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + "pt-PT": /^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i, + "ru-RU": /^[А-ЯЁ]+$/i, + "kk-KZ": /^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i, + "sl-SI": /^[A-ZČĆĐŠŽ]+$/i, + "sk-SK": /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i, + "sr-RS@latin": /^[A-ZČĆŽŠĐ]+$/i, + "sr-RS": /^[А-ЯЂЈЉЊЋЏ]+$/i, + "sv-SE": /^[A-ZÅÄÖ]+$/i, + "th-TH": /^[ก-๐\s]+$/i, + "tr-TR": /^[A-ZÇĞİıÖŞÜ]+$/i, + "uk-UA": /^[А-ЩЬЮЯЄIЇҐі]+$/i, + "vi-VN": /^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i, + "ko-KR": /^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/, + "ku-IQ": /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i, + ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/, + he: /^[א-ת]+$/, + fa: /^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i, + bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/, + eo: /^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i, + "hi-IN": /^[\u0900-\u0961]+[\u0972-\u097F]*$/i, + "si-LK": /^[\u0D80-\u0DFF]+$/, + "ta-IN": /^[\u0B80-\u0BFF]+$/i, + "te-IN": /^[\u0C00-\u0C7F]+$/i, + "kn-IN": /^[\u0C80-\u0CFF]+$/i, + "ml-IN": /^[\u0D00-\u0D7F]+$/i, + "gu-IN": /^[\u0A80-\u0AFF]+$/i, + "pa-IN": /^[\u0A00-\u0A7F]+$/i, + "or-IN": /^[\u0B00-\u0B7F]+$/i + }; + var alphanumeric = exports2.alphanumeric = { + "en-US": /^[0-9A-Z]+$/i, + "az-AZ": /^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i, + "bg-BG": /^[0-9А-Я]+$/i, + "cs-CZ": /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + "da-DK": /^[0-9A-ZÆØÅ]+$/i, + "de-DE": /^[0-9A-ZÄÖÜß]+$/i, + "el-GR": /^[0-9Α-ω]+$/i, + "es-ES": /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i, + "fi-FI": /^[0-9A-ZÅÄÖ]+$/i, + "fr-FR": /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + "it-IT": /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i, + "ja-JP": /^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i, + "hu-HU": /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + "nb-NO": /^[0-9A-ZÆØÅ]+$/i, + "nl-NL": /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i, + "nn-NO": /^[0-9A-ZÆØÅ]+$/i, + "pl-PL": /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + "pt-PT": /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i, + "ru-RU": /^[0-9А-ЯЁ]+$/i, + "kk-KZ": /^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i, + "sl-SI": /^[0-9A-ZČĆĐŠŽ]+$/i, + "sk-SK": /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i, + "sr-RS@latin": /^[0-9A-ZČĆŽŠĐ]+$/i, + "sr-RS": /^[0-9А-ЯЂЈЉЊЋЏ]+$/i, + "sv-SE": /^[0-9A-ZÅÄÖ]+$/i, + "th-TH": /^[ก-๙\s]+$/i, + "tr-TR": /^[0-9A-ZÇĞİıÖŞÜ]+$/i, + "uk-UA": /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i, + "ko-KR": /^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/, + "ku-IQ": /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i, + "vi-VN": /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i, + ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/, + he: /^[0-9א-ת]+$/, + fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i, + bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/, + eo: /^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i, + "hi-IN": /^[\u0900-\u0963]+[\u0966-\u097F]*$/i, + "si-LK": /^[0-9\u0D80-\u0DFF]+$/, + "ta-IN": /^[0-9\u0B80-\u0BFF.]+$/i, + "te-IN": /^[0-9\u0C00-\u0C7F.]+$/i, + "kn-IN": /^[0-9\u0C80-\u0CFF.]+$/i, + "ml-IN": /^[0-9\u0D00-\u0D7F.]+$/i, + "gu-IN": /^[0-9\u0A80-\u0AFF.]+$/i, + "pa-IN": /^[0-9\u0A00-\u0A7F.]+$/i, + "or-IN": /^[0-9\u0B00-\u0B7F.]+$/i + }; + var decimal = exports2.decimal = { + "en-US": ".", + ar: "\u066B" + }; + var englishLocales = exports2.englishLocales = ["AU", "GB", "HK", "IN", "NZ", "ZA", "ZM"]; + for (i = 0; i < englishLocales.length; i++) { + locale = "en-".concat(englishLocales[i]); + alpha[locale] = alpha["en-US"]; + alphanumeric[locale] = alphanumeric["en-US"]; + decimal[locale] = decimal["en-US"]; + } + var locale; + var i; + var arabicLocales = exports2.arabicLocales = ["AE", "BH", "DZ", "EG", "IQ", "JO", "KW", "LB", "LY", "MA", "QM", "QA", "SA", "SD", "SY", "TN", "YE"]; + for (_i = 0; _i < arabicLocales.length; _i++) { + _locale = "ar-".concat(arabicLocales[_i]); + alpha[_locale] = alpha.ar; + alphanumeric[_locale] = alphanumeric.ar; + decimal[_locale] = decimal.ar; + } + var _locale; + var _i; + var farsiLocales = exports2.farsiLocales = ["IR", "AF"]; + for (_i2 = 0; _i2 < farsiLocales.length; _i2++) { + _locale2 = "fa-".concat(farsiLocales[_i2]); + alphanumeric[_locale2] = alphanumeric.fa; + decimal[_locale2] = decimal.ar; + } + var _locale2; + var _i2; + var bengaliLocales = exports2.bengaliLocales = ["BD", "IN"]; + for (_i3 = 0; _i3 < bengaliLocales.length; _i3++) { + _locale3 = "bn-".concat(bengaliLocales[_i3]); + alpha[_locale3] = alpha.bn; + alphanumeric[_locale3] = alphanumeric.bn; + decimal[_locale3] = decimal["en-US"]; + } + var _locale3; + var _i3; + var dotDecimal = exports2.dotDecimal = ["ar-EG", "ar-LB", "ar-LY"]; + var commaDecimal = exports2.commaDecimal = ["bg-BG", "cs-CZ", "da-DK", "de-DE", "el-GR", "en-ZM", "eo", "es-ES", "fr-CA", "fr-FR", "gu-IN", "hi-IN", "hu-HU", "id-ID", "it-IT", "kk-KZ", "kn-IN", "ku-IQ", "ml-IN", "nb-NO", "nl-NL", "nn-NO", "or-IN", "pa-IN", "pl-PL", "pt-PT", "ru-RU", "si-LK", "sl-SI", "sr-RS", "sr-RS@latin", "sv-SE", "ta-IN", "te-IN", "tr-TR", "uk-UA", "vi-VN"]; + for (_i4 = 0; _i4 < dotDecimal.length; _i4++) { + decimal[dotDecimal[_i4]] = decimal["en-US"]; + } + var _i4; + for (_i5 = 0; _i5 < commaDecimal.length; _i5++) { + decimal[commaDecimal[_i5]] = ","; + } + var _i5; + alpha["fr-CA"] = alpha["fr-FR"]; + alphanumeric["fr-CA"] = alphanumeric["fr-FR"]; + alpha["pt-BR"] = alpha["pt-PT"]; + alphanumeric["pt-BR"] = alphanumeric["pt-PT"]; + decimal["pt-BR"] = decimal["pt-PT"]; + alpha["pl-Pl"] = alpha["pl-PL"]; + alphanumeric["pl-Pl"] = alphanumeric["pl-PL"]; + decimal["pl-Pl"] = decimal["pl-PL"]; + alpha["fa-AF"] = alpha.fa; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isFloat.js +var require_isFloat = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isFloat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isFloat; + exports2.locales = void 0; + var _assertString = _interopRequireDefault(require_assertString()); + var _nullUndefinedCheck = _interopRequireDefault(require_nullUndefinedCheck()); + var _alpha = require_alpha(); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function isFloat(str, options) { + (0, _assertString.default)(str); + options = options || {}; + var float = new RegExp("^(?:[-+])?(?:[0-9]+)?(?:\\".concat(options.locale ? _alpha.decimal[options.locale] : ".", "[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$")); + if (str === "" || str === "." || str === "," || str === "-" || str === "+") { + return false; + } + var value = parseFloat(str.replace(",", ".")); + return float.test(str) && (!options.hasOwnProperty("min") || (0, _nullUndefinedCheck.default)(options.min) || value >= options.min) && (!options.hasOwnProperty("max") || (0, _nullUndefinedCheck.default)(options.max) || value <= options.max) && (!options.hasOwnProperty("lt") || (0, _nullUndefinedCheck.default)(options.lt) || value < options.lt) && (!options.hasOwnProperty("gt") || (0, _nullUndefinedCheck.default)(options.gt) || value > options.gt); + } + var locales = exports2.locales = Object.keys(_alpha.decimal); + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/toFloat.js +var require_toFloat = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/toFloat.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = toFloat; + var _isFloat = _interopRequireDefault(require_isFloat()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function toFloat(str) { + if (!(0, _isFloat.default)(str)) return NaN; + return parseFloat(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isDivisibleBy.js +var require_isDivisibleBy = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isDivisibleBy.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isDivisibleBy; + var _assertString = _interopRequireDefault(require_assertString()); + var _toFloat = _interopRequireDefault(require_toFloat()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function isDivisibleBy(str, num) { + (0, _assertString.default)(str); + return (0, _toFloat.default)(str) % parseInt(num, 10) === 0; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/number/IsDivisibleBy.js +var require_IsDivisibleBy = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/number/IsDivisibleBy.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsDivisibleBy = exports2.isDivisibleBy = exports2.IS_DIVISIBLE_BY = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isDivisibleBy_1 = __importDefault2(require_isDivisibleBy()); + exports2.IS_DIVISIBLE_BY = "isDivisibleBy"; + function isDivisibleBy(value, num) { + return typeof value === "number" && typeof num === "number" && (0, isDivisibleBy_1.default)(String(value), num); + } + exports2.isDivisibleBy = isDivisibleBy; + function IsDivisibleBy(num, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_DIVISIBLE_BY, + constraints: [num], + validator: { + validate: (value, args) => isDivisibleBy(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be divisible by $constraint1", validationOptions) + } + }, validationOptions); + } + exports2.IsDivisibleBy = IsDivisibleBy; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/number/IsPositive.js +var require_IsPositive = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/number/IsPositive.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsPositive = exports2.isPositive = exports2.IS_POSITIVE = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_POSITIVE = "isPositive"; + function isPositive(value) { + return typeof value === "number" && value > 0; + } + exports2.isPositive = isPositive; + function IsPositive(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_POSITIVE, + validator: { + validate: (value, args) => isPositive(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a positive number", validationOptions) + } + }, validationOptions); + } + exports2.IsPositive = IsPositive; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/number/IsNegative.js +var require_IsNegative = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/number/IsNegative.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsNegative = exports2.isNegative = exports2.IS_NEGATIVE = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_NEGATIVE = "isNegative"; + function isNegative(value) { + return typeof value === "number" && value < 0; + } + exports2.isNegative = isNegative; + function IsNegative(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_NEGATIVE, + validator: { + validate: (value, args) => isNegative(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a negative number", validationOptions) + } + }, validationOptions); + } + exports2.IsNegative = IsNegative; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/number/Max.js +var require_Max = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/number/Max.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Max = exports2.max = exports2.MAX = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.MAX = "max"; + function max(num, max2) { + return typeof num === "number" && typeof max2 === "number" && num <= max2; + } + exports2.max = max; + function Max(maxValue, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.MAX, + constraints: [maxValue], + validator: { + validate: (value, args) => max(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must not be greater than $constraint1", validationOptions) + } + }, validationOptions); + } + exports2.Max = Max; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/number/Min.js +var require_Min = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/number/Min.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Min = exports2.min = exports2.MIN = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.MIN = "min"; + function min(num, min2) { + return typeof num === "number" && typeof min2 === "number" && num >= min2; + } + exports2.min = min; + function Min(minValue, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.MIN, + constraints: [minValue], + validator: { + validate: (value, args) => min(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must not be less than $constraint1", validationOptions) + } + }, validationOptions); + } + exports2.Min = Min; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/date/MinDate.js +var require_MinDate = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/date/MinDate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MinDate = exports2.minDate = exports2.MIN_DATE = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.MIN_DATE = "minDate"; + function minDate(date, minDate2) { + return date instanceof Date && date.getTime() >= (minDate2 instanceof Date ? minDate2 : minDate2()).getTime(); + } + exports2.minDate = minDate; + function MinDate(date, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.MIN_DATE, + constraints: [date], + validator: { + validate: (value, args) => minDate(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => "minimal allowed date for " + eachPrefix + "$property is $constraint1", validationOptions) + } + }, validationOptions); + } + exports2.MinDate = MinDate; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/date/MaxDate.js +var require_MaxDate = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/date/MaxDate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MaxDate = exports2.maxDate = exports2.MAX_DATE = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.MAX_DATE = "maxDate"; + function maxDate(date, maxDate2) { + return date instanceof Date && date.getTime() <= (maxDate2 instanceof Date ? maxDate2 : maxDate2()).getTime(); + } + exports2.maxDate = maxDate; + function MaxDate(date, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.MAX_DATE, + constraints: [date], + validator: { + validate: (value, args) => maxDate(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => "maximal allowed date for " + eachPrefix + "$property is $constraint1", validationOptions) + } + }, validationOptions); + } + exports2.MaxDate = MaxDate; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/toString.js +var require_toString = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/toString.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = toString2; + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function toString2(input) { + if (_typeof(input) === "object" && input !== null) { + if (typeof input.toString === "function") { + input = input.toString(); + } else { + input = "[object Object]"; + } + } else if (input === null || typeof input === "undefined" || isNaN(input) && !input.length) { + input = ""; + } + return String(input); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/contains.js +var require_contains = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/contains.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = contains; + var _assertString = _interopRequireDefault(require_assertString()); + var _toString = _interopRequireDefault(require_toString()); + var _merge = _interopRequireDefault(require_merge()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var defaultContainsOptions = { + ignoreCase: false, + minOccurrences: 1 + }; + function contains(str, elem, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, defaultContainsOptions); + if (options.ignoreCase) { + return str.toLowerCase().split((0, _toString.default)(elem).toLowerCase()).length > options.minOccurrences; + } + return str.split((0, _toString.default)(elem)).length > options.minOccurrences; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/Contains.js +var require_Contains = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/Contains.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Contains = exports2.contains = exports2.CONTAINS = void 0; + var ValidateBy_1 = require_ValidateBy(); + var contains_1 = __importDefault2(require_contains()); + exports2.CONTAINS = "contains"; + function contains(value, seed) { + return typeof value === "string" && (0, contains_1.default)(value, seed); + } + exports2.contains = contains; + function Contains(seed, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.CONTAINS, + constraints: [seed], + validator: { + validate: (value, args) => contains(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must contain a $constraint1 string", validationOptions) + } + }, validationOptions); + } + exports2.Contains = Contains; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/NotContains.js +var require_NotContains = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/NotContains.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NotContains = exports2.notContains = exports2.NOT_CONTAINS = void 0; + var ValidateBy_1 = require_ValidateBy(); + var contains_1 = __importDefault2(require_contains()); + exports2.NOT_CONTAINS = "notContains"; + function notContains(value, seed) { + return typeof value === "string" && !(0, contains_1.default)(value, seed); + } + exports2.notContains = notContains; + function NotContains(seed, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.NOT_CONTAINS, + constraints: [seed], + validator: { + validate: (value, args) => notContains(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property should not contain a $constraint1 string", validationOptions) + } + }, validationOptions); + } + exports2.NotContains = NotContains; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isAlpha.js +var require_isAlpha = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isAlpha.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isAlpha; + exports2.locales = void 0; + var _assertString = _interopRequireDefault(require_assertString()); + var _alpha = require_alpha(); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function isAlpha(_str) { + var locale = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en-US"; + var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; + (0, _assertString.default)(_str); + var str = _str; + var ignore = options.ignore; + if (ignore) { + if (ignore instanceof RegExp) { + str = str.replace(ignore, ""); + } else if (typeof ignore === "string") { + str = str.replace(new RegExp("[".concat(ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, "\\$&"), "]"), "g"), ""); + } else { + throw new Error("ignore should be instance of a String or RegExp"); + } + } + if (locale in _alpha.alpha) { + return _alpha.alpha[locale].test(str); + } + throw new Error("Invalid locale '".concat(locale, "'")); + } + var locales = exports2.locales = Object.keys(_alpha.alpha); + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsAlpha.js +var require_IsAlpha = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsAlpha.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsAlpha = exports2.isAlpha = exports2.IS_ALPHA = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isAlpha_1 = __importDefault2(require_isAlpha()); + exports2.IS_ALPHA = "isAlpha"; + function isAlpha(value, locale) { + return typeof value === "string" && (0, isAlpha_1.default)(value, locale); + } + exports2.isAlpha = isAlpha; + function IsAlpha(locale, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_ALPHA, + constraints: [locale], + validator: { + validate: (value, args) => isAlpha(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must contain only letters (a-zA-Z)", validationOptions) + } + }, validationOptions); + } + exports2.IsAlpha = IsAlpha; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isAlphanumeric.js +var require_isAlphanumeric = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isAlphanumeric.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isAlphanumeric; + exports2.locales = void 0; + var _assertString = _interopRequireDefault(require_assertString()); + var _alpha = require_alpha(); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function isAlphanumeric(_str) { + var locale = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en-US"; + var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; + (0, _assertString.default)(_str); + var str = _str; + var ignore = options.ignore; + if (ignore) { + if (ignore instanceof RegExp) { + str = str.replace(ignore, ""); + } else if (typeof ignore === "string") { + str = str.replace(new RegExp("[".concat(ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, "\\$&"), "]"), "g"), ""); + } else { + throw new Error("ignore should be instance of a String or RegExp"); + } + } + if (locale in _alpha.alphanumeric) { + return _alpha.alphanumeric[locale].test(str); + } + throw new Error("Invalid locale '".concat(locale, "'")); + } + var locales = exports2.locales = Object.keys(_alpha.alphanumeric); + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsAlphanumeric.js +var require_IsAlphanumeric = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsAlphanumeric.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsAlphanumeric = exports2.isAlphanumeric = exports2.IS_ALPHANUMERIC = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isAlphanumeric_1 = __importDefault2(require_isAlphanumeric()); + exports2.IS_ALPHANUMERIC = "isAlphanumeric"; + function isAlphanumeric(value, locale) { + return typeof value === "string" && (0, isAlphanumeric_1.default)(value, locale); + } + exports2.isAlphanumeric = isAlphanumeric; + function IsAlphanumeric(locale, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_ALPHANUMERIC, + constraints: [locale], + validator: { + validate: (value, args) => isAlphanumeric(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must contain only letters and numbers", validationOptions) + } + }, validationOptions); + } + exports2.IsAlphanumeric = IsAlphanumeric; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/includesArray.js +var require_includesArray = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/includesArray.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var includes = function includes2(arr, val) { + return arr.some(function(arrVal) { + return val === arrVal; + }); + }; + var _default = exports2.default = includes; + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isDecimal.js +var require_isDecimal = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isDecimal.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isDecimal; + var _merge = _interopRequireDefault(require_merge()); + var _assertString = _interopRequireDefault(require_assertString()); + var _includesArray = _interopRequireDefault(require_includesArray()); + var _alpha = require_alpha(); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function decimalRegExp(options) { + var regExp = new RegExp("^[-+]?([0-9]+)?(\\".concat(_alpha.decimal[options.locale], "[0-9]{").concat(options.decimal_digits, "})").concat(options.force_decimal ? "" : "?", "$")); + return regExp; + } + var default_decimal_options = { + force_decimal: false, + decimal_digits: "1,", + locale: "en-US" + }; + var blacklist = ["", "-", "+"]; + function isDecimal(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, default_decimal_options); + if (options.locale in _alpha.decimal) { + return !(0, _includesArray.default)(blacklist, str.replace(/ /g, "")) && decimalRegExp(options).test(str); + } + throw new Error("Invalid locale '".concat(options.locale, "'")); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsDecimal.js +var require_IsDecimal = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsDecimal.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsDecimal = exports2.isDecimal = exports2.IS_DECIMAL = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isDecimal_1 = __importDefault2(require_isDecimal()); + exports2.IS_DECIMAL = "isDecimal"; + function isDecimal(value, options) { + return typeof value === "string" && (0, isDecimal_1.default)(value, options); + } + exports2.isDecimal = isDecimal; + function IsDecimal(options, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_DECIMAL, + constraints: [options], + validator: { + validate: (value, args) => isDecimal(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property is not a valid decimal number.", validationOptions) + } + }, validationOptions); + } + exports2.IsDecimal = IsDecimal; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isAscii.js +var require_isAscii = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isAscii.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isAscii; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var ascii = /^[\x00-\x7F]+$/; + function isAscii(str) { + (0, _assertString.default)(str); + return ascii.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsAscii.js +var require_IsAscii = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsAscii.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsAscii = exports2.isAscii = exports2.IS_ASCII = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isAscii_1 = __importDefault2(require_isAscii()); + exports2.IS_ASCII = "isAscii"; + function isAscii(value) { + return typeof value === "string" && (0, isAscii_1.default)(value); + } + exports2.isAscii = isAscii; + function IsAscii(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_ASCII, + validator: { + validate: (value, args) => isAscii(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must contain only ASCII characters", validationOptions) + } + }, validationOptions); + } + exports2.IsAscii = IsAscii; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isBase64.js +var require_isBase64 = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isBase64.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isBase64; + var _assertString = _interopRequireDefault(require_assertString()); + var _merge = _interopRequireDefault(require_merge()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var base64WithPadding = /^[A-Za-z0-9+/]+={0,2}$/; + var base64WithoutPadding = /^[A-Za-z0-9+/]+$/; + var base64UrlWithPadding = /^[A-Za-z0-9_-]+={0,2}$/; + var base64UrlWithoutPadding = /^[A-Za-z0-9_-]+$/; + function isBase64(str, options) { + var _options; + (0, _assertString.default)(str); + options = (0, _merge.default)(options, { + urlSafe: false, + padding: !((_options = options) !== null && _options !== void 0 && _options.urlSafe) + }); + if (str === "") return true; + if (options.padding && str.length % 4 !== 0) return false; + var regex; + if (options.urlSafe) { + regex = options.padding ? base64UrlWithPadding : base64UrlWithoutPadding; + } else { + regex = options.padding ? base64WithPadding : base64WithoutPadding; + } + return (!options.padding || str.length % 4 === 0) && regex.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsBase64.js +var require_IsBase64 = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsBase64.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsBase64 = exports2.isBase64 = exports2.IS_BASE64 = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isBase64_1 = __importDefault2(require_isBase64()); + exports2.IS_BASE64 = "isBase64"; + function isBase64(value, options) { + return typeof value === "string" && (0, isBase64_1.default)(value, options); + } + exports2.isBase64 = isBase64; + function IsBase64(options, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_BASE64, + constraints: [options], + validator: { + validate: (value, args) => isBase64(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be base64 encoded", validationOptions) + } + }, validationOptions); + } + exports2.IsBase64 = IsBase64; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isByteLength.js +var require_isByteLength = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isByteLength.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isByteLength; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function isByteLength(str, options) { + (0, _assertString.default)(str); + var min; + var max; + if (_typeof(options) === "object") { + min = options.min || 0; + max = options.max; + } else { + min = arguments[1]; + max = arguments[2]; + } + var len = encodeURI(str).split(/%..|./).length - 1; + return len >= min && (typeof max === "undefined" || len <= max); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsByteLength.js +var require_IsByteLength = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsByteLength.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsByteLength = exports2.isByteLength = exports2.IS_BYTE_LENGTH = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isByteLength_1 = __importDefault2(require_isByteLength()); + exports2.IS_BYTE_LENGTH = "isByteLength"; + function isByteLength(value, min, max) { + return typeof value === "string" && (0, isByteLength_1.default)(value, { min, max }); + } + exports2.isByteLength = isByteLength; + function IsByteLength(min, max, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_BYTE_LENGTH, + constraints: [min, max], + validator: { + validate: (value, args) => isByteLength(value, args === null || args === void 0 ? void 0 : args.constraints[0], args === null || args === void 0 ? void 0 : args.constraints[1]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property's byte length must fall into ($constraint1, $constraint2) range", validationOptions) + } + }, validationOptions); + } + exports2.IsByteLength = IsByteLength; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isLuhnNumber.js +var require_isLuhnNumber = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isLuhnNumber.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isLuhnNumber; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function isLuhnNumber(str) { + (0, _assertString.default)(str); + var sanitized = str.replace(/[- ]+/g, ""); + var sum = 0; + var digit; + var tmpNum; + var shouldDouble; + for (var i = sanitized.length - 1; i >= 0; i--) { + digit = sanitized.substring(i, i + 1); + tmpNum = parseInt(digit, 10); + if (shouldDouble) { + tmpNum *= 2; + if (tmpNum >= 10) { + sum += tmpNum % 10 + 1; + } else { + sum += tmpNum; + } + } else { + sum += tmpNum; + } + shouldDouble = !shouldDouble; + } + return !!(sum % 10 === 0 ? sanitized : false); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isCreditCard.js +var require_isCreditCard = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isCreditCard.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isCreditCard; + var _assertString = _interopRequireDefault(require_assertString()); + var _isLuhnNumber = _interopRequireDefault(require_isLuhnNumber()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var cards = { + amex: /^3[47][0-9]{13}$/, + dinersclub: /^3(?:0[0-5]|[68][0-9])[0-9]{11}$/, + discover: /^6(?:011|5[0-9][0-9])[0-9]{12,15}$/, + jcb: /^(?:2131|1800|35\d{3})\d{11}$/, + mastercard: /^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/, + // /^[25][1-7][0-9]{14}$/; + unionpay: /^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/, + visa: /^(?:4[0-9]{12})(?:[0-9]{3,6})?$/ + }; + var allCards = (function() { + var tmpCardsArray = []; + for (var cardProvider in cards) { + if (cards.hasOwnProperty(cardProvider)) { + tmpCardsArray.push(cards[cardProvider]); + } + } + return tmpCardsArray; + })(); + function isCreditCard(card) { + var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + (0, _assertString.default)(card); + var provider = options.provider; + var sanitized = card.replace(/[- ]+/g, ""); + if (provider && provider.toLowerCase() in cards) { + if (!cards[provider.toLowerCase()].test(sanitized)) { + return false; + } + } else if (provider && !(provider.toLowerCase() in cards)) { + throw new Error("".concat(provider, " is not a valid credit card provider.")); + } else if (!allCards.some(function(cardProvider) { + return cardProvider.test(sanitized); + })) { + return false; + } + return (0, _isLuhnNumber.default)(card); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsCreditCard.js +var require_IsCreditCard = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsCreditCard.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsCreditCard = exports2.isCreditCard = exports2.IS_CREDIT_CARD = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isCreditCard_1 = __importDefault2(require_isCreditCard()); + exports2.IS_CREDIT_CARD = "isCreditCard"; + function isCreditCard(value) { + return typeof value === "string" && (0, isCreditCard_1.default)(value); + } + exports2.isCreditCard = isCreditCard; + function IsCreditCard(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_CREDIT_CARD, + validator: { + validate: (value, args) => isCreditCard(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a credit card", validationOptions) + } + }, validationOptions); + } + exports2.IsCreditCard = IsCreditCard; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isCurrency.js +var require_isCurrency = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isCurrency.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isCurrency; + var _merge = _interopRequireDefault(require_merge()); + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function currencyRegex(options) { + var decimal_digits = "\\d{".concat(options.digits_after_decimal[0], "}"); + options.digits_after_decimal.forEach(function(digit, index) { + if (index !== 0) decimal_digits = "".concat(decimal_digits, "|\\d{").concat(digit, "}"); + }); + var symbol = "(".concat(options.symbol.replace(/\W/, function(m) { + return "\\".concat(m); + }), ")").concat(options.require_symbol ? "" : "?"), negative = "-?", whole_dollar_amount_without_sep = "[1-9]\\d*", whole_dollar_amount_with_sep = "[1-9]\\d{0,2}(\\".concat(options.thousands_separator, "\\d{3})*"), valid_whole_dollar_amounts = ["0", whole_dollar_amount_without_sep, whole_dollar_amount_with_sep], whole_dollar_amount = "(".concat(valid_whole_dollar_amounts.join("|"), ")?"), decimal_amount = "(\\".concat(options.decimal_separator, "(").concat(decimal_digits, "))").concat(options.require_decimal ? "" : "?"); + var pattern = whole_dollar_amount + (options.allow_decimal || options.require_decimal ? decimal_amount : ""); + if (options.allow_negatives && !options.parens_for_negatives) { + if (options.negative_sign_after_digits) { + pattern += negative; + } else if (options.negative_sign_before_digits) { + pattern = negative + pattern; + } + } + if (options.allow_negative_sign_placeholder) { + pattern = "( (?!\\-))?".concat(pattern); + } else if (options.allow_space_after_symbol) { + pattern = " ?".concat(pattern); + } else if (options.allow_space_after_digits) { + pattern += "( (?!$))?"; + } + if (options.symbol_after_digits) { + pattern += symbol; + } else { + pattern = symbol + pattern; + } + if (options.allow_negatives) { + if (options.parens_for_negatives) { + pattern = "(\\(".concat(pattern, "\\)|").concat(pattern, ")"); + } else if (!(options.negative_sign_before_digits || options.negative_sign_after_digits)) { + pattern = negative + pattern; + } + } + return new RegExp("^(?!-? )(?=.*\\d)".concat(pattern, "$")); + } + var default_currency_options = { + symbol: "$", + require_symbol: false, + allow_space_after_symbol: false, + symbol_after_digits: false, + allow_negatives: true, + parens_for_negatives: false, + negative_sign_before_digits: false, + negative_sign_after_digits: false, + allow_negative_sign_placeholder: false, + thousands_separator: ",", + decimal_separator: ".", + allow_decimal: true, + require_decimal: false, + digits_after_decimal: [2], + allow_space_after_digits: false + }; + function isCurrency(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, default_currency_options); + return currencyRegex(options).test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsCurrency.js +var require_IsCurrency = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsCurrency.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsCurrency = exports2.isCurrency = exports2.IS_CURRENCY = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isCurrency_1 = __importDefault2(require_isCurrency()); + exports2.IS_CURRENCY = "isCurrency"; + function isCurrency(value, options) { + return typeof value === "string" && (0, isCurrency_1.default)(value, options); + } + exports2.isCurrency = isCurrency; + function IsCurrency(options, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_CURRENCY, + constraints: [options], + validator: { + validate: (value, args) => isCurrency(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a currency", validationOptions) + } + }, validationOptions); + } + exports2.IsCurrency = IsCurrency; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/checkHost.js +var require_checkHost = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/checkHost.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = checkHost; + function isRegExp(obj2) { + return Object.prototype.toString.call(obj2) === "[object RegExp]"; + } + function checkHost(host, matches) { + for (var i = 0; i < matches.length; i++) { + var match = matches[i]; + if (host === match || isRegExp(match) && match.test(host)) { + return true; + } + } + return false; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isFQDN.js +var require_isFQDN = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isFQDN.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isFQDN; + var _assertString = _interopRequireDefault(require_assertString()); + var _merge = _interopRequireDefault(require_merge()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var default_fqdn_options = { + require_tld: true, + allow_underscores: false, + allow_trailing_dot: false, + allow_numeric_tld: false, + allow_wildcard: false, + ignore_max_length: false + }; + function isFQDN(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, default_fqdn_options); + if (options.allow_trailing_dot && str[str.length - 1] === ".") { + str = str.substring(0, str.length - 1); + } + if (options.allow_wildcard === true && str.indexOf("*.") === 0) { + str = str.substring(2); + } + var parts = str.split("."); + var tld = parts[parts.length - 1]; + if (options.require_tld) { + if (parts.length < 2) { + return false; + } + if (!options.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) { + return false; + } + if (/\s/.test(tld)) { + return false; + } + } + if (!options.allow_numeric_tld && /^\d+$/.test(tld)) { + return false; + } + return parts.every(function(part) { + if (part.length > 63 && !options.ignore_max_length) { + return false; + } + if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) { + return false; + } + if (/[\uff01-\uff5e]/.test(part)) { + return false; + } + if (/^-|-$/.test(part)) { + return false; + } + if (!options.allow_underscores && /_/.test(part)) { + return false; + } + return true; + }); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isIP.js +var require_isIP = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isIP.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isIP; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + var IPv4SegmentFormat = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])"; + var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat); + var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$")); + var IPv6SegmentFormat = "(?:[0-9a-fA-F]{1,4})"; + var IPv6AddressRegExp = new RegExp("^(" + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ")(%[0-9a-zA-Z.]{1,})?$"); + function isIP(ipAddress) { + var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + (0, _assertString.default)(ipAddress); + var version2 = (_typeof(options) === "object" ? options.version : arguments[1]) || ""; + if (!version2) { + return isIP(ipAddress, { + version: 4 + }) || isIP(ipAddress, { + version: 6 + }); + } + if (version2.toString() === "4") { + return IPv4AddressRegExp.test(ipAddress); + } + if (version2.toString() === "6") { + return IPv6AddressRegExp.test(ipAddress); + } + return false; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isEmail.js +var require_isEmail = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isEmail.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isEmail; + var _assertString = _interopRequireDefault(require_assertString()); + var _checkHost = _interopRequireDefault(require_checkHost()); + var _isByteLength = _interopRequireDefault(require_isByteLength()); + var _isFQDN = _interopRequireDefault(require_isFQDN()); + var _isIP = _interopRequireDefault(require_isIP()); + var _merge = _interopRequireDefault(require_merge()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var default_email_options = { + allow_display_name: false, + allow_underscores: false, + require_display_name: false, + allow_utf8_local_part: true, + require_tld: true, + blacklisted_chars: "", + ignore_max_length: false, + host_blacklist: [], + host_whitelist: [] + }; + var splitNameAddress = /^([^\x00-\x1F\x7F-\x9F\cX]+)]/.test(display_name_without_quotes); + if (contains_illegal) { + if (display_name_without_quotes === display_name) { + return false; + } + var all_start_with_back_slash = display_name_without_quotes.split('"').length === display_name_without_quotes.split('\\"').length; + if (!all_start_with_back_slash) { + return false; + } + } + return true; + } + function isEmail(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, default_email_options); + if (options.require_display_name || options.allow_display_name) { + var display_email = str.match(splitNameAddress); + if (display_email) { + var display_name = display_email[1]; + str = str.replace(display_name, "").replace(/(^<|>$)/g, ""); + if (display_name.endsWith(" ")) { + display_name = display_name.slice(0, -1); + } + if (!validateDisplayName(display_name)) { + return false; + } + } else if (options.require_display_name) { + return false; + } + } + if (!options.ignore_max_length && str.length > defaultMaxEmailLength) { + return false; + } + var parts = str.split("@"); + var domain = parts.pop(); + var lower_domain = domain.toLowerCase(); + if (options.host_blacklist.length > 0 && (0, _checkHost.default)(lower_domain, options.host_blacklist)) { + return false; + } + if (options.host_whitelist.length > 0 && !(0, _checkHost.default)(lower_domain, options.host_whitelist)) { + return false; + } + var user = parts.join("@"); + if (options.domain_specific_validation && (lower_domain === "gmail.com" || lower_domain === "googlemail.com")) { + user = user.toLowerCase(); + var username = user.split("+")[0]; + if (!(0, _isByteLength.default)(username.replace(/\./g, ""), { + min: 6, + max: 30 + })) { + return false; + } + var _user_parts = username.split("."); + for (var i = 0; i < _user_parts.length; i++) { + if (!gmailUserPart.test(_user_parts[i])) { + return false; + } + } + } + if (options.ignore_max_length === false && (!(0, _isByteLength.default)(user, { + max: 64 + }) || !(0, _isByteLength.default)(domain, { + max: 254 + }))) { + return false; + } + if (!(0, _isFQDN.default)(domain, { + require_tld: options.require_tld, + ignore_max_length: options.ignore_max_length, + allow_underscores: options.allow_underscores + })) { + if (!options.allow_ip_domain) { + return false; + } + if (!(0, _isIP.default)(domain)) { + if (!domain.startsWith("[") || !domain.endsWith("]")) { + return false; + } + var noBracketdomain = domain.slice(1, -1); + if (noBracketdomain.length === 0 || !(0, _isIP.default)(noBracketdomain)) { + return false; + } + } + } + if (options.blacklisted_chars) { + if (user.search(new RegExp("[".concat(options.blacklisted_chars, "]+"), "g")) !== -1) return false; + } + if (user[0] === '"' && user[user.length - 1] === '"') { + user = user.slice(1, user.length - 1); + return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user); + } + var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart; + var user_parts = user.split("."); + for (var _i = 0; _i < user_parts.length; _i++) { + if (!pattern.test(user_parts[_i])) { + return false; + } + } + return true; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsEmail.js +var require_IsEmail = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsEmail.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsEmail = exports2.isEmail = exports2.IS_EMAIL = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isEmail_1 = __importDefault2(require_isEmail()); + exports2.IS_EMAIL = "isEmail"; + function isEmail(value, options) { + return typeof value === "string" && (0, isEmail_1.default)(value, options); + } + exports2.isEmail = isEmail; + function IsEmail(options, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_EMAIL, + constraints: [options], + validator: { + validate: (value, args) => isEmail(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be an email", validationOptions) + } + }, validationOptions); + } + exports2.IsEmail = IsEmail; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsFQDN.js +var require_IsFQDN = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsFQDN.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsFQDN = exports2.isFQDN = exports2.IS_FQDN = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isFQDN_1 = __importDefault2(require_isFQDN()); + exports2.IS_FQDN = "isFqdn"; + function isFQDN(value, options) { + return typeof value === "string" && (0, isFQDN_1.default)(value, options); + } + exports2.isFQDN = isFQDN; + function IsFQDN(options, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_FQDN, + constraints: [options], + validator: { + validate: (value, args) => isFQDN(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a valid domain name", validationOptions) + } + }, validationOptions); + } + exports2.IsFQDN = IsFQDN; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isFullWidth.js +var require_isFullWidth = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isFullWidth.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isFullWidth; + exports2.fullWidth = void 0; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var fullWidth = exports2.fullWidth = /[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; + function isFullWidth(str) { + (0, _assertString.default)(str); + return fullWidth.test(str); + } + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsFullWidth.js +var require_IsFullWidth = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsFullWidth.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsFullWidth = exports2.isFullWidth = exports2.IS_FULL_WIDTH = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isFullWidth_1 = __importDefault2(require_isFullWidth()); + exports2.IS_FULL_WIDTH = "isFullWidth"; + function isFullWidth(value) { + return typeof value === "string" && (0, isFullWidth_1.default)(value); + } + exports2.isFullWidth = isFullWidth; + function IsFullWidth(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_FULL_WIDTH, + validator: { + validate: (value, args) => isFullWidth(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must contain a full-width characters", validationOptions) + } + }, validationOptions); + } + exports2.IsFullWidth = IsFullWidth; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isHalfWidth.js +var require_isHalfWidth = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isHalfWidth.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isHalfWidth; + exports2.halfWidth = void 0; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var halfWidth = exports2.halfWidth = /[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; + function isHalfWidth(str) { + (0, _assertString.default)(str); + return halfWidth.test(str); + } + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsHalfWidth.js +var require_IsHalfWidth = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsHalfWidth.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsHalfWidth = exports2.isHalfWidth = exports2.IS_HALF_WIDTH = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isHalfWidth_1 = __importDefault2(require_isHalfWidth()); + exports2.IS_HALF_WIDTH = "isHalfWidth"; + function isHalfWidth(value) { + return typeof value === "string" && (0, isHalfWidth_1.default)(value); + } + exports2.isHalfWidth = isHalfWidth; + function IsHalfWidth(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_HALF_WIDTH, + validator: { + validate: (value, args) => isHalfWidth(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must contain a half-width characters", validationOptions) + } + }, validationOptions); + } + exports2.IsHalfWidth = IsHalfWidth; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isVariableWidth.js +var require_isVariableWidth = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isVariableWidth.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isVariableWidth; + var _assertString = _interopRequireDefault(require_assertString()); + var _isFullWidth = require_isFullWidth(); + var _isHalfWidth = require_isHalfWidth(); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function isVariableWidth(str) { + (0, _assertString.default)(str); + return _isFullWidth.fullWidth.test(str) && _isHalfWidth.halfWidth.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsVariableWidth.js +var require_IsVariableWidth = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsVariableWidth.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsVariableWidth = exports2.isVariableWidth = exports2.IS_VARIABLE_WIDTH = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isVariableWidth_1 = __importDefault2(require_isVariableWidth()); + exports2.IS_VARIABLE_WIDTH = "isVariableWidth"; + function isVariableWidth(value) { + return typeof value === "string" && (0, isVariableWidth_1.default)(value); + } + exports2.isVariableWidth = isVariableWidth; + function IsVariableWidth(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_VARIABLE_WIDTH, + validator: { + validate: (value, args) => isVariableWidth(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must contain a full-width and half-width characters", validationOptions) + } + }, validationOptions); + } + exports2.IsVariableWidth = IsVariableWidth; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isHexColor.js +var require_isHexColor = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isHexColor.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isHexColor; + var _assertString = _interopRequireDefault(require_assertString()); + var _merge = _interopRequireDefault(require_merge()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i; + var hexcolor_with_prefix = /^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i; + var default_is_hexcolor_options = { + require_hashtag: false + }; + function isHexColor(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, default_is_hexcolor_options); + var hexcolor_regex = options.require_hashtag ? hexcolor_with_prefix : hexcolor; + return hexcolor_regex.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsHexColor.js +var require_IsHexColor = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsHexColor.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsHexColor = exports2.isHexColor = exports2.IS_HEX_COLOR = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isHexColor_1 = __importDefault2(require_isHexColor()); + exports2.IS_HEX_COLOR = "isHexColor"; + function isHexColor(value) { + return typeof value === "string" && (0, isHexColor_1.default)(value); + } + exports2.isHexColor = isHexColor; + function IsHexColor(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_HEX_COLOR, + validator: { + validate: (value, args) => isHexColor(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a hexadecimal color", validationOptions) + } + }, validationOptions); + } + exports2.IsHexColor = IsHexColor; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isHexadecimal.js +var require_isHexadecimal = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isHexadecimal.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isHexadecimal; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var hexadecimal = /^(0x|0h)?[0-9A-F]+$/i; + function isHexadecimal(str) { + (0, _assertString.default)(str); + return hexadecimal.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsHexadecimal.js +var require_IsHexadecimal = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsHexadecimal.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsHexadecimal = exports2.isHexadecimal = exports2.IS_HEXADECIMAL = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isHexadecimal_1 = __importDefault2(require_isHexadecimal()); + exports2.IS_HEXADECIMAL = "isHexadecimal"; + function isHexadecimal(value) { + return typeof value === "string" && (0, isHexadecimal_1.default)(value); + } + exports2.isHexadecimal = isHexadecimal; + function IsHexadecimal(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_HEXADECIMAL, + validator: { + validate: (value, args) => isHexadecimal(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a hexadecimal number", validationOptions) + } + }, validationOptions); + } + exports2.IsHexadecimal = IsHexadecimal; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/ValidationOptions.js +var require_ValidationOptions = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/ValidationOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isValidationOptions = void 0; + function isValidationOptions(val) { + if (!val) { + return false; + } + return "each" in val || "message" in val || "groups" in val || "always" in val || "context" in val; + } + exports2.isValidationOptions = isValidationOptions; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isMACAddress.js +var require_isMACAddress = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isMACAddress.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isMACAddress; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var macAddress48 = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/; + var macAddress48NoSeparators = /^([0-9a-fA-F]){12}$/; + var macAddress48WithDots = /^([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})$/; + var macAddress64 = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){6}([0-9a-fA-F]{2})$/; + var macAddress64NoSeparators = /^([0-9a-fA-F]){16}$/; + var macAddress64WithDots = /^([0-9a-fA-F]{4}\.){3}([0-9a-fA-F]{4})$/; + function isMACAddress(str, options) { + (0, _assertString.default)(str); + if (options !== null && options !== void 0 && options.eui) { + options.eui = String(options.eui); + } + if (options !== null && options !== void 0 && options.no_colons || options !== null && options !== void 0 && options.no_separators) { + if (options.eui === "48") { + return macAddress48NoSeparators.test(str); + } + if (options.eui === "64") { + return macAddress64NoSeparators.test(str); + } + return macAddress48NoSeparators.test(str) || macAddress64NoSeparators.test(str); + } + if ((options === null || options === void 0 ? void 0 : options.eui) === "48") { + return macAddress48.test(str) || macAddress48WithDots.test(str); + } + if ((options === null || options === void 0 ? void 0 : options.eui) === "64") { + return macAddress64.test(str) || macAddress64WithDots.test(str); + } + return isMACAddress(str, { + eui: "48" + }) || isMACAddress(str, { + eui: "64" + }); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsMacAddress.js +var require_IsMacAddress = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsMacAddress.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsMACAddress = exports2.isMACAddress = exports2.IS_MAC_ADDRESS = void 0; + var ValidationOptions_1 = require_ValidationOptions(); + var ValidateBy_1 = require_ValidateBy(); + var isMACAddress_1 = __importDefault2(require_isMACAddress()); + exports2.IS_MAC_ADDRESS = "isMacAddress"; + function isMACAddress(value, options) { + return typeof value === "string" && (0, isMACAddress_1.default)(value, options); + } + exports2.isMACAddress = isMACAddress; + function IsMACAddress(optionsOrValidationOptionsArg, validationOptionsArg) { + const options = !(0, ValidationOptions_1.isValidationOptions)(optionsOrValidationOptionsArg) ? optionsOrValidationOptionsArg : void 0; + const validationOptions = (0, ValidationOptions_1.isValidationOptions)(optionsOrValidationOptionsArg) ? optionsOrValidationOptionsArg : validationOptionsArg; + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_MAC_ADDRESS, + constraints: [options], + validator: { + validate: (value, args) => isMACAddress(value, options), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a MAC Address", validationOptions) + } + }, validationOptions); + } + exports2.IsMACAddress = IsMACAddress; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsIP.js +var require_IsIP = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsIP.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsIP = exports2.isIP = exports2.IS_IP = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isIP_1 = __importDefault2(require_isIP()); + exports2.IS_IP = "isIp"; + function isIP(value, version2) { + const versionStr = version2 ? `${version2}` : void 0; + return typeof value === "string" && (0, isIP_1.default)(value, versionStr); + } + exports2.isIP = isIP; + function IsIP(version2, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_IP, + constraints: [version2], + validator: { + validate: (value, args) => isIP(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be an ip address", validationOptions) + } + }, validationOptions); + } + exports2.IsIP = IsIP; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isInt.js +var require_isInt = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isInt.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isInt; + var _assertString = _interopRequireDefault(require_assertString()); + var _nullUndefinedCheck = _interopRequireDefault(require_nullUndefinedCheck()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var int = /^(?:[-+]?(?:0|[1-9][0-9]*))$/; + var intLeadingZeroes = /^[-+]?[0-9]+$/; + function isInt(str, options) { + (0, _assertString.default)(str); + options = options || {}; + var regex = options.allow_leading_zeroes === false ? int : intLeadingZeroes; + var minCheckPassed = !options.hasOwnProperty("min") || (0, _nullUndefinedCheck.default)(options.min) || str >= options.min; + var maxCheckPassed = !options.hasOwnProperty("max") || (0, _nullUndefinedCheck.default)(options.max) || str <= options.max; + var ltCheckPassed = !options.hasOwnProperty("lt") || (0, _nullUndefinedCheck.default)(options.lt) || str < options.lt; + var gtCheckPassed = !options.hasOwnProperty("gt") || (0, _nullUndefinedCheck.default)(options.gt) || str > options.gt; + return regex.test(str) && minCheckPassed && maxCheckPassed && ltCheckPassed && gtCheckPassed; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isPort.js +var require_isPort = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isPort.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isPort; + var _isInt = _interopRequireDefault(require_isInt()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function isPort(str) { + return (0, _isInt.default)(str, { + allow_leading_zeroes: false, + min: 0, + max: 65535 + }); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsPort.js +var require_IsPort = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsPort.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsPort = exports2.isPort = exports2.IS_PORT = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isPort_1 = __importDefault2(require_isPort()); + exports2.IS_PORT = "isPort"; + function isPort(value) { + return typeof value === "string" && (0, isPort_1.default)(value); + } + exports2.isPort = isPort; + function IsPort(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_PORT, + validator: { + validate: (value, args) => isPort(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a port", validationOptions) + } + }, validationOptions); + } + exports2.IsPort = IsPort; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISBN.js +var require_isISBN = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISBN.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isISBN; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var possibleIsbn10 = /^(?:[0-9]{9}X|[0-9]{10})$/; + var possibleIsbn13 = /^(?:[0-9]{13})$/; + var factor = [1, 3]; + function isISBN(isbn, options) { + (0, _assertString.default)(isbn); + var version2 = String((options === null || options === void 0 ? void 0 : options.version) || options); + if (!(options !== null && options !== void 0 && options.version || options)) { + return isISBN(isbn, { + version: 10 + }) || isISBN(isbn, { + version: 13 + }); + } + var sanitizedIsbn = isbn.replace(/[\s-]+/g, ""); + var checksum = 0; + if (version2 === "10") { + if (!possibleIsbn10.test(sanitizedIsbn)) { + return false; + } + for (var i = 0; i < version2 - 1; i++) { + checksum += (i + 1) * sanitizedIsbn.charAt(i); + } + if (sanitizedIsbn.charAt(9) === "X") { + checksum += 10 * 10; + } else { + checksum += 10 * sanitizedIsbn.charAt(9); + } + if (checksum % 11 === 0) { + return true; + } + } else if (version2 === "13") { + if (!possibleIsbn13.test(sanitizedIsbn)) { + return false; + } + for (var _i = 0; _i < 12; _i++) { + checksum += factor[_i % 2] * sanitizedIsbn.charAt(_i); + } + if (sanitizedIsbn.charAt(12) - (10 - checksum % 10) % 10 === 0) { + return true; + } + } + return false; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsISBN.js +var require_IsISBN = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsISBN.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsISBN = exports2.isISBN = exports2.IS_ISBN = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isISBN_1 = __importDefault2(require_isISBN()); + exports2.IS_ISBN = "isIsbn"; + function isISBN(value, version2) { + const versionStr = version2 ? `${version2}` : void 0; + return typeof value === "string" && (0, isISBN_1.default)(value, versionStr); + } + exports2.isISBN = isISBN; + function IsISBN(version2, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_ISBN, + constraints: [version2], + validator: { + validate: (value, args) => isISBN(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be an ISBN", validationOptions) + } + }, validationOptions); + } + exports2.IsISBN = IsISBN; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISIN.js +var require_isISIN = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISIN.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isISIN; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var isin = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/; + function isISIN(str) { + (0, _assertString.default)(str); + if (!isin.test(str)) { + return false; + } + var double = true; + var sum = 0; + for (var i = str.length - 2; i >= 0; i--) { + if (str[i] >= "A" && str[i] <= "Z") { + var value = str[i].charCodeAt(0) - 55; + var lo = value % 10; + var hi = Math.trunc(value / 10); + for (var _i = 0, _arr = [lo, hi]; _i < _arr.length; _i++) { + var digit = _arr[_i]; + if (double) { + if (digit >= 5) { + sum += 1 + (digit - 5) * 2; + } else { + sum += digit * 2; + } + } else { + sum += digit; + } + double = !double; + } + } else { + var _digit = str[i].charCodeAt(0) - "0".charCodeAt(0); + if (double) { + if (_digit >= 5) { + sum += 1 + (_digit - 5) * 2; + } else { + sum += _digit * 2; + } + } else { + sum += _digit; + } + double = !double; + } + } + var check = Math.trunc((sum + 9) / 10) * 10 - sum; + return +str[str.length - 1] === check; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsISIN.js +var require_IsISIN = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsISIN.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsISIN = exports2.isISIN = exports2.IS_ISIN = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isISIN_1 = __importDefault2(require_isISIN()); + exports2.IS_ISIN = "isIsin"; + function isISIN(value) { + return typeof value === "string" && (0, isISIN_1.default)(value); + } + exports2.isISIN = isISIN; + function IsISIN(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_ISIN, + validator: { + validate: (value, args) => isISIN(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be an ISIN (stock/security identifier)", validationOptions) + } + }, validationOptions); + } + exports2.IsISIN = IsISIN; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISO8601.js +var require_isISO8601 = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISO8601.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isISO8601; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var iso8601 = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/; + var iso8601StrictSeparator = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/; + var isValidDate = function isValidDate2(str) { + var ordinalMatch = str.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/); + if (ordinalMatch) { + var oYear = Number(ordinalMatch[1]); + var oDay = Number(ordinalMatch[2]); + if (oYear % 4 === 0 && oYear % 100 !== 0 || oYear % 400 === 0) return oDay <= 366; + return oDay <= 365; + } + var match = str.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number); + var year = match[1]; + var month = match[2]; + var day = match[3]; + var monthString = month ? "0".concat(month).slice(-2) : month; + var dayString = day ? "0".concat(day).slice(-2) : day; + var d = new Date("".concat(year, "-").concat(monthString || "01", "-").concat(dayString || "01")); + if (month && day) { + return d.getUTCFullYear() === year && d.getUTCMonth() + 1 === month && d.getUTCDate() === day; + } + return true; + }; + function isISO8601(str) { + var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + (0, _assertString.default)(str); + var check = options.strictSeparator ? iso8601StrictSeparator.test(str) : iso8601.test(str); + if (check && options.strict) return isValidDate(str); + return check; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsISO8601.js +var require_IsISO8601 = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsISO8601.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsISO8601 = exports2.isISO8601 = exports2.IS_ISO8601 = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isISO8601_1 = __importDefault2(require_isISO8601()); + exports2.IS_ISO8601 = "isIso8601"; + function isISO8601(value, options) { + return typeof value === "string" && (0, isISO8601_1.default)(value, options); + } + exports2.isISO8601 = isISO8601; + function IsISO8601(options, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_ISO8601, + constraints: [options], + validator: { + validate: (value, args) => isISO8601(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a valid ISO 8601 date string", validationOptions) + } + }, validationOptions); + } + exports2.IsISO8601 = IsISO8601; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isJSON.js +var require_isJSON = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isJSON.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isJSON; + var _assertString = _interopRequireDefault(require_assertString()); + var _includesArray = _interopRequireDefault(require_includesArray()); + var _merge = _interopRequireDefault(require_merge()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + var default_json_options = { + allow_primitives: false, + allow_any_value: false + }; + function isJSON(str, options) { + (0, _assertString.default)(str); + try { + options = (0, _merge.default)(options, default_json_options); + var obj2 = JSON.parse(str); + if (options.allow_any_value) { + return true; + } + var primitives = []; + if (options.allow_primitives) { + primitives = [null, false, true]; + } + return (0, _includesArray.default)(primitives, obj2) || !!obj2 && _typeof(obj2) === "object"; + } catch (e) { + } + return false; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsJSON.js +var require_IsJSON = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsJSON.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsJSON = exports2.isJSON = exports2.IS_JSON = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isJSON_1 = __importDefault2(require_isJSON()); + exports2.IS_JSON = "isJson"; + function isJSON(value) { + return typeof value === "string" && (0, isJSON_1.default)(value); + } + exports2.isJSON = isJSON; + function IsJSON(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_JSON, + validator: { + validate: (value, args) => isJSON(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a json string", validationOptions) + } + }, validationOptions); + } + exports2.IsJSON = IsJSON; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isJWT.js +var require_isJWT = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isJWT.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isJWT; + var _assertString = _interopRequireDefault(require_assertString()); + var _isBase = _interopRequireDefault(require_isBase64()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function isJWT(str) { + (0, _assertString.default)(str); + var dotSplit = str.split("."); + var len = dotSplit.length; + if (len !== 3) { + return false; + } + return dotSplit.reduce(function(acc, currElem) { + return acc && (0, _isBase.default)(currElem, { + urlSafe: true + }); + }, true); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsJWT.js +var require_IsJWT = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsJWT.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsJWT = exports2.isJWT = exports2.IS_JWT = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isJWT_1 = __importDefault2(require_isJWT()); + exports2.IS_JWT = "isJwt"; + function isJWT(value) { + return typeof value === "string" && (0, isJWT_1.default)(value); + } + exports2.isJWT = isJWT; + function IsJWT(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_JWT, + validator: { + validate: (value, args) => isJWT(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a jwt string", validationOptions) + } + }, validationOptions); + } + exports2.IsJWT = IsJWT; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isLowercase.js +var require_isLowercase = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isLowercase.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isLowercase; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function isLowercase(str) { + (0, _assertString.default)(str); + return str === str.toLowerCase(); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsLowercase.js +var require_IsLowercase = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsLowercase.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsLowercase = exports2.isLowercase = exports2.IS_LOWERCASE = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isLowercase_1 = __importDefault2(require_isLowercase()); + exports2.IS_LOWERCASE = "isLowercase"; + function isLowercase(value) { + return typeof value === "string" && (0, isLowercase_1.default)(value); + } + exports2.isLowercase = isLowercase; + function IsLowercase(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_LOWERCASE, + validator: { + validate: (value, args) => isLowercase(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a lowercase string", validationOptions) + } + }, validationOptions); + } + exports2.IsLowercase = IsLowercase; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isMobilePhone.js +var require_isMobilePhone = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isMobilePhone.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isMobilePhone; + exports2.locales = void 0; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var phones = { + "am-AM": /^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/, + "ar-AE": /^((\+?971)|0)?5[024568]\d{7}$/, + "ar-BH": /^(\+?973)?(3|6)\d{7}$/, + "ar-DZ": /^(\+?213|0)(5|6|7)\d{8}$/, + "ar-LB": /^(\+?961)?((3|81)\d{6}|7\d{7})$/, + "ar-EG": /^((\+?20)|0)?1[0125]\d{8}$/, + "ar-IQ": /^(\+?964|0)?7[0-9]\d{8}$/, + "ar-JO": /^(\+?962|0)?7[789]\d{7}$/, + "ar-KW": /^(\+?965)([569]\d{7}|41\d{6})$/, + "ar-LY": /^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/, + "ar-MA": /^(?:(?:\+|00)212|0)[5-7]\d{8}$/, + "ar-OM": /^((\+|00)968)?([79][1-9])\d{6}$/, + "ar-PS": /^(\+?970|0)5[6|9](\d{7})$/, + "ar-SA": /^(!?(\+?966)|0)?5\d{8}$/, + "ar-SD": /^((\+?249)|0)?(9[012369]|1[012])\d{7}$/, + "ar-SY": /^(!?(\+?963)|0)?9\d{8}$/, + "ar-TN": /^(\+?216)?[2459]\d{7}$/, + "az-AZ": /^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/, + "ar-QA": /^(\+?974|0)?([3567]\d{7})$/, + "bs-BA": /^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/, + "be-BY": /^(\+?375)?(24|25|29|33|44)\d{7}$/, + "bg-BG": /^(\+?359|0)?8[789]\d{7}$/, + "bn-BD": /^(\+?880|0)1[13456789][0-9]{8}$/, + "ca-AD": /^(\+376)?[346]\d{5}$/, + "cs-CZ": /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, + "da-DK": /^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/, + "de-DE": /^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/, + "de-AT": /^(\+43|0)\d{1,4}\d{3,12}$/, + "de-CH": /^(\+41|0)([1-9])\d{1,9}$/, + "de-LU": /^(\+352)?((6\d1)\d{6})$/, + "dv-MV": /^(\+?960)?(7[2-9]|9[1-9])\d{5}$/, + "el-GR": /^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/, + "el-CY": /^(\+?357?)?(9(9|7|6|5|4)\d{6})$/, + "en-AI": /^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/, + "en-AU": /^(\+?61|0)4\d{8}$/, + "en-AG": /^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/, + "en-BM": /^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/, + "en-BS": /^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/, + "en-GB": /^(\+?44|0)7[1-9]\d{8}$/, + "en-GG": /^(\+?44|0)1481\d{6}$/, + "en-GH": /^(\+233|0)(20|50|24|54|27|57|26|56|23|53|28|55|59)\d{7}$/, + "en-GY": /^(\+592|0)6\d{6}$/, + "en-HK": /^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/, + "en-MO": /^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/, + "en-IE": /^(\+?353|0)8[356789]\d{7}$/, + "en-IN": /^(\+?91|0)?[6789]\d{9}$/, + "en-JM": /^(\+?876)?\d{7}$/, + "en-KE": /^(\+?254|0)(7|1)\d{8}$/, + "fr-CF": /^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/, + "en-SS": /^(\+?211|0)(9[1257])\d{7}$/, + "en-KI": /^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/, + "en-KN": /^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/, + "en-LS": /^(\+?266)(22|28|57|58|59|27|52)\d{6}$/, + "en-MT": /^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/, + "en-MU": /^(\+?230|0)?\d{8}$/, + "en-MW": /^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/, + "en-NA": /^(\+?264|0)(6|8)\d{7}$/, + "en-NG": /^(\+?234|0)?[789]\d{9}$/, + "en-NZ": /^(\+?64|0)[28]\d{7,9}$/, + "en-PG": /^(\+?675|0)?(7\d|8[18])\d{6}$/, + "en-PK": /^((00|\+)?92|0)3[0-6]\d{8}$/, + "en-PH": /^(09|\+639)\d{9}$/, + "en-RW": /^(\+?250|0)?[7]\d{8}$/, + "en-SG": /^(\+65)?[3689]\d{7}$/, + "en-SL": /^(\+?232|0)\d{8}$/, + "en-TZ": /^(\+?255|0)?[67]\d{8}$/, + "en-UG": /^(\+?256|0)?[7]\d{8}$/, + "en-US": /^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/, + "en-ZA": /^(\+?27|0)\d{9}$/, + "en-ZM": /^(\+?26)?0[79][567]\d{7}$/, + "en-ZW": /^(\+263)[0-9]{9}$/, + "en-BW": /^(\+?267)?(7[1-8]{1})\d{6}$/, + "es-AR": /^\+?549(11|[2368]\d)\d{8}$/, + "es-BO": /^(\+?591)?(6|7)\d{7}$/, + "es-CO": /^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/, + "es-CL": /^(\+?56|0)[2-9]\d{1}\d{7}$/, + "es-CR": /^(\+506)?[2-8]\d{7}$/, + "es-CU": /^(\+53|0053)?5\d{7}$/, + "es-DO": /^(\+?1)?8[024]9\d{7}$/, + "es-HN": /^(\+?504)?[9|8|3|2]\d{7}$/, + "es-EC": /^(\+?593|0)([2-7]|9[2-9])\d{7}$/, + "es-ES": /^(\+?34)?[6|7]\d{8}$/, + "es-GT": /^(\+?502)?[2|6|7]\d{7}$/, + "es-PE": /^(\+?51)?9\d{8}$/, + "es-MX": /^(\+?52)?(1|01)?\d{10,11}$/, + "es-NI": /^(\+?505)\d{7,8}$/, + "es-PA": /^(\+?507)\d{7,8}$/, + "es-PY": /^(\+?595|0)9[9876]\d{7}$/, + "es-SV": /^(\+?503)?[67]\d{7}$/, + "es-UY": /^(\+598|0)9[1-9][\d]{6}$/, + "es-VE": /^(\+?58)?(2|4)\d{9}$/, + "et-EE": /^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/, + "fa-IR": /^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/, + "fi-FI": /^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/, + "fj-FJ": /^(\+?679)?\s?\d{3}\s?\d{4}$/, + "fo-FO": /^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/, + "fr-BF": /^(\+226|0)[67]\d{7}$/, + "fr-BJ": /^(\+229)\d{8}$/, + "fr-CD": /^(\+?243|0)?(8|9)\d{8}$/, + "fr-CM": /^(\+?237)6[0-9]{8}$/, + "fr-DJ": /^(?:\+253)?77[6-8]\d{5}$/, + "fr-FR": /^(\+?33|0)[67]\d{8}$/, + "fr-GF": /^(\+?594|0|00594)[67]\d{8}$/, + "fr-GP": /^(\+?590|0|00590)[67]\d{8}$/, + "fr-MQ": /^(\+?596|0|00596)[67]\d{8}$/, + "fr-PF": /^(\+?689)?8[789]\d{6}$/, + "fr-RE": /^(\+?262|0|00262)[67]\d{8}$/, + "fr-WF": /^(\+681)?\d{6}$/, + "he-IL": /^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/, + "hu-HU": /^(\+?36|06)(20|30|31|50|70)\d{7}$/, + "id-ID": /^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/, + "ir-IR": /^(\+98|0)?9\d{9}$/, + "it-IT": /^(\+?39)?\s?3\d{2} ?\d{6,7}$/, + "it-SM": /^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/, + "ja-JP": /^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/, + "ka-GE": /^(\+?995)?(79\d{7}|5\d{8})$/, + "kk-KZ": /^(\+?7|8)?7\d{9}$/, + "kl-GL": /^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/, + "ko-KR": /^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/, + "ky-KG": /^(\+996\s?)?(22[0-9]|50[0-9]|55[0-9]|70[0-9]|75[0-9]|77[0-9]|880|990|995|996|997|998)\s?\d{3}\s?\d{3}$/, + "lt-LT": /^(\+370|8)\d{8}$/, + "lv-LV": /^(\+?371)2\d{7}$/, + "mg-MG": /^((\+?261|0)(2|3)\d)?\d{7}$/, + "mn-MN": /^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/, + "my-MM": /^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/, + "ms-MY": /^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/, + "mz-MZ": /^(\+?258)?8[234567]\d{7}$/, + "nb-NO": /^(\+?47)?[49]\d{7}$/, + "ne-NP": /^(\+?977)?9[78]\d{8}$/, + "nl-BE": /^(\+?32|0)4\d{8}$/, + "nl-NL": /^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/, + "nl-AW": /^(\+)?297(56|59|64|73|74|99)\d{5}$/, + "nn-NO": /^(\+?47)?[49]\d{7}$/, + "pl-PL": /^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/, + "pt-BR": /^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/, + "pt-PT": /^(\+?351)?9[1236]\d{7}$/, + "pt-AO": /^(\+?244)?9\d{8}$/, + "ro-MD": /^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/, + "ro-RO": /^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/, + "ru-RU": /^(\+?7|8)?9\d{9}$/, + "si-LK": /^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/, + "sl-SI": /^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/, + "sk-SK": /^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, + "so-SO": /^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/, + "sq-AL": /^(\+355|0)6[2-9]\d{7}$/, + "sr-RS": /^(\+3816|06)[- \d]{5,9}$/, + "sv-SE": /^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/, + "tg-TJ": /^(\+?992)?[5][5]\d{7}$/, + "th-TH": /^(\+66|66|0)\d{9}$/, + "tr-TR": /^(\+?90|0)?5\d{9}$/, + "tk-TM": /^(\+993|993|8)\d{8}$/, + "uk-UA": /^(\+?38)?0(50|6[36-8]|7[357]|9[1-9])\d{7}$/, + "uz-UZ": /^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/, + "vi-VN": /^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/, + "zh-CN": /^((\+|00)86)?(1[3-9]|9[28])\d{9}$/, + "zh-TW": /^(\+?886\-?|0)?9\d{8}$/, + "dz-BT": /^(\+?975|0)?(17|16|77|02)\d{6}$/, + "ar-YE": /^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/, + "ar-EH": /^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/, + "fa-AF": /^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/, + "mk-MK": /^(\+?389|0)?((?:2[2-9]\d{6}|(?:3[1-4]|4[2-8])\d{6}|500\d{5}|5[2-9]\d{6}|7[0-9][2-9]\d{5}|8[1-9]\d{6}|800\d{5}|8009\d{4}))$/ + }; + phones["en-CA"] = phones["en-US"]; + phones["fr-CA"] = phones["en-CA"]; + phones["fr-BE"] = phones["nl-BE"]; + phones["zh-HK"] = phones["en-HK"]; + phones["zh-MO"] = phones["en-MO"]; + phones["ga-IE"] = phones["en-IE"]; + phones["fr-CH"] = phones["de-CH"]; + phones["it-CH"] = phones["fr-CH"]; + function isMobilePhone(str, locale, options) { + (0, _assertString.default)(str); + if (options && options.strictMode && !str.startsWith("+")) { + return false; + } + if (Array.isArray(locale)) { + return locale.some(function(key2) { + if (phones.hasOwnProperty(key2)) { + var phone2 = phones[key2]; + if (phone2.test(str)) { + return true; + } + } + return false; + }); + } else if (locale in phones) { + return phones[locale].test(str); + } else if (!locale || locale === "any") { + for (var key in phones) { + if (phones.hasOwnProperty(key)) { + var phone = phones[key]; + if (phone.test(str)) { + return true; + } + } + } + return false; + } + throw new Error("Invalid locale '".concat(locale, "'")); + } + var locales = exports2.locales = Object.keys(phones); + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsMobilePhone.js +var require_IsMobilePhone = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsMobilePhone.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsMobilePhone = exports2.isMobilePhone = exports2.IS_MOBILE_PHONE = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isMobilePhone_1 = __importDefault2(require_isMobilePhone()); + exports2.IS_MOBILE_PHONE = "isMobilePhone"; + function isMobilePhone(value, locale, options) { + return typeof value === "string" && (0, isMobilePhone_1.default)(value, locale, options); + } + exports2.isMobilePhone = isMobilePhone; + function IsMobilePhone(locale, options, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_MOBILE_PHONE, + constraints: [locale, options], + validator: { + validate: (value, args) => isMobilePhone(value, args === null || args === void 0 ? void 0 : args.constraints[0], args === null || args === void 0 ? void 0 : args.constraints[1]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a phone number", validationOptions) + } + }, validationOptions); + } + exports2.IsMobilePhone = IsMobilePhone; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISO31661Alpha2.js +var require_isISO31661Alpha2 = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISO31661Alpha2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.CountryCodes = void 0; + exports2.default = isISO31661Alpha2; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var validISO31661Alpha2CountriesCodes = /* @__PURE__ */ new Set(["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW"]); + var alpha2CountryCode = /^[a-zA-Z]{2}$/; + function isISO31661Alpha2(str) { + var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + (0, _assertString.default)(str); + var userAssignedCodes = options.userAssignedCodes; + var validUserAssignedCodes = (userAssignedCodes || []).reduce(function(accumulator, userAssignedCode) { + if (alpha2CountryCode.test(userAssignedCode)) { + accumulator.push(userAssignedCode.toUpperCase()); + } + return accumulator; + }, []); + if (validUserAssignedCodes.includes(str.toUpperCase())) { + return true; + } + return validISO31661Alpha2CountriesCodes.has(str.toUpperCase()); + } + var CountryCodes = exports2.CountryCodes = validISO31661Alpha2CountriesCodes; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsISO31661Alpha2.js +var require_IsISO31661Alpha2 = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsISO31661Alpha2.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsISO31661Alpha2 = exports2.isISO31661Alpha2 = exports2.IS_ISO31661_ALPHA_2 = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isISO31661Alpha2_1 = __importDefault2(require_isISO31661Alpha2()); + exports2.IS_ISO31661_ALPHA_2 = "isISO31661Alpha2"; + function isISO31661Alpha2(value) { + return typeof value === "string" && (0, isISO31661Alpha2_1.default)(value); + } + exports2.isISO31661Alpha2 = isISO31661Alpha2; + function IsISO31661Alpha2(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_ISO31661_ALPHA_2, + validator: { + validate: (value, args) => isISO31661Alpha2(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a valid ISO31661 Alpha2 code", validationOptions) + } + }, validationOptions); + } + exports2.IsISO31661Alpha2 = IsISO31661Alpha2; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISO31661Alpha3.js +var require_isISO31661Alpha3 = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISO31661Alpha3.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isISO31661Alpha3; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var validISO31661Alpha3CountriesCodes = /* @__PURE__ */ new Set(["AFG", "ALA", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "KHM", "CMR", "CAN", "CPV", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COG", "COD", "COK", "CRI", "CIV", "HRV", "CUB", "CUW", "CYP", "CZE", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MKD", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "REU", "ROU", "RUS", "RWA", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWZ", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "USA", "UMI", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE"]); + var alpha3CountryCode = /^[a-zA-Z]{3}$/; + function isISO31661Alpha3(str) { + var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + (0, _assertString.default)(str); + var userAssignedCodes = options.userAssignedCodes; + var validUserAssignedCodes = (userAssignedCodes || []).reduce(function(accumulator, userAssignedCode) { + if (alpha3CountryCode.test(userAssignedCode)) { + accumulator.push(userAssignedCode.toUpperCase()); + } + return accumulator; + }, []); + if (validUserAssignedCodes.includes(str.toUpperCase())) { + return true; + } + return validISO31661Alpha3CountriesCodes.has(str.toUpperCase()); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsISO31661Alpha3.js +var require_IsISO31661Alpha3 = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsISO31661Alpha3.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsISO31661Alpha3 = exports2.isISO31661Alpha3 = exports2.IS_ISO31661_ALPHA_3 = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isISO31661Alpha3_1 = __importDefault2(require_isISO31661Alpha3()); + exports2.IS_ISO31661_ALPHA_3 = "isISO31661Alpha3"; + function isISO31661Alpha3(value) { + return typeof value === "string" && (0, isISO31661Alpha3_1.default)(value); + } + exports2.isISO31661Alpha3 = isISO31661Alpha3; + function IsISO31661Alpha3(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_ISO31661_ALPHA_3, + validator: { + validate: (value, args) => isISO31661Alpha3(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a valid ISO31661 Alpha3 code", validationOptions) + } + }, validationOptions); + } + exports2.IsISO31661Alpha3 = IsISO31661Alpha3; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isMongoId.js +var require_isMongoId = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isMongoId.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isMongoId; + var _assertString = _interopRequireDefault(require_assertString()); + var _isHexadecimal = _interopRequireDefault(require_isHexadecimal()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function isMongoId(str) { + (0, _assertString.default)(str); + return (0, _isHexadecimal.default)(str) && str.length === 24; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsMongoId.js +var require_IsMongoId = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsMongoId.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsMongoId = exports2.isMongoId = exports2.IS_MONGO_ID = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isMongoId_1 = __importDefault2(require_isMongoId()); + exports2.IS_MONGO_ID = "isMongoId"; + function isMongoId(value) { + return typeof value === "string" && (0, isMongoId_1.default)(value); + } + exports2.isMongoId = isMongoId; + function IsMongoId(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_MONGO_ID, + validator: { + validate: (value, args) => isMongoId(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a mongodb id", validationOptions) + } + }, validationOptions); + } + exports2.IsMongoId = IsMongoId; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isMultibyte.js +var require_isMultibyte = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isMultibyte.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isMultibyte; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var multibyte = /[^\x00-\x7F]/; + function isMultibyte(str) { + (0, _assertString.default)(str); + return multibyte.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsMultibyte.js +var require_IsMultibyte = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsMultibyte.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsMultibyte = exports2.isMultibyte = exports2.IS_MULTIBYTE = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isMultibyte_1 = __importDefault2(require_isMultibyte()); + exports2.IS_MULTIBYTE = "isMultibyte"; + function isMultibyte(value) { + return typeof value === "string" && (0, isMultibyte_1.default)(value); + } + exports2.isMultibyte = isMultibyte; + function IsMultibyte(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_MULTIBYTE, + validator: { + validate: (value, args) => isMultibyte(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must contain one or more multibyte chars", validationOptions) + } + }, validationOptions); + } + exports2.IsMultibyte = IsMultibyte; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isSurrogatePair.js +var require_isSurrogatePair = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isSurrogatePair.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isSurrogatePair; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var surrogatePair = /[\uD800-\uDBFF][\uDC00-\uDFFF]/; + function isSurrogatePair(str) { + (0, _assertString.default)(str); + return surrogatePair.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsSurrogatePair.js +var require_IsSurrogatePair = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsSurrogatePair.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsSurrogatePair = exports2.isSurrogatePair = exports2.IS_SURROGATE_PAIR = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isSurrogatePair_1 = __importDefault2(require_isSurrogatePair()); + exports2.IS_SURROGATE_PAIR = "isSurrogatePair"; + function isSurrogatePair(value) { + return typeof value === "string" && (0, isSurrogatePair_1.default)(value); + } + exports2.isSurrogatePair = isSurrogatePair; + function IsSurrogatePair(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_SURROGATE_PAIR, + validator: { + validate: (value, args) => isSurrogatePair(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must contain any surrogate pairs chars", validationOptions) + } + }, validationOptions); + } + exports2.IsSurrogatePair = IsSurrogatePair; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isURL.js +var require_isURL = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isURL.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isURL; + var _assertString = _interopRequireDefault(require_assertString()); + var _checkHost = _interopRequireDefault(require_checkHost()); + var _includesString = _interopRequireDefault(require_includesString()); + var _isFQDN = _interopRequireDefault(require_isFQDN()); + var _isIP = _interopRequireDefault(require_isIP()); + var _merge = _interopRequireDefault(require_merge()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); + } + function _nonIterableRest() { + 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 _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + function _iterableToArrayLimit(r, l2) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, n, i, u, a = [], f = true, o = false; + try { + if (i = (t = t.call(r)).next, 0 === l2) { + if (Object(t) !== t) return; + f = false; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l2); f = true) ; + } catch (r2) { + o = true, n = r2; + } finally { + try { + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } + } + function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; + } + var default_url_options = { + protocols: ["http", "https", "ftp"], + require_tld: true, + require_protocol: false, + require_host: true, + require_port: false, + require_valid_protocol: true, + allow_underscores: false, + allow_trailing_dot: false, + allow_protocol_relative_urls: false, + allow_fragments: true, + allow_query_components: true, + validate_length: true, + max_allowed_length: 2084 + }; + var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/; + function isURL(url, options) { + (0, _assertString.default)(url); + if (!url || /[\s<>]/.test(url)) { + return false; + } + if (url.indexOf("mailto:") === 0) { + return false; + } + options = (0, _merge.default)(options, default_url_options); + if (options.validate_length && url.length > options.max_allowed_length) { + return false; + } + if (!options.allow_fragments && (0, _includesString.default)(url, "#")) { + return false; + } + if (!options.allow_query_components && ((0, _includesString.default)(url, "?") || (0, _includesString.default)(url, "&"))) { + return false; + } + var protocol, auth, host, hostname, port, port_str, split, ipv6; + split = url.split("#"); + url = split.shift(); + split = url.split("?"); + url = split.shift(); + var protocol_match = url.match(/^([a-z][a-z0-9+\-.]*):/i); + var had_explicit_protocol = false; + var cleanUpProtocol = function cleanUpProtocol2(potential_protocol2) { + had_explicit_protocol = true; + protocol = potential_protocol2.toLowerCase(); + if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) { + return false; + } + return url.substring(protocol_match[0].length); + }; + if (protocol_match) { + var potential_protocol = protocol_match[1]; + var after_colon = url.substring(protocol_match[0].length); + var starts_with_slashes = after_colon.slice(0, 2) === "//"; + if (!starts_with_slashes) { + var first_slash_position = after_colon.indexOf("/"); + var before_slash = first_slash_position === -1 ? after_colon : after_colon.substring(0, first_slash_position); + var at_position = before_slash.indexOf("@"); + if (at_position !== -1) { + var before_at = before_slash.substring(0, at_position); + var valid_auth_regex = /^[a-zA-Z0-9\-_.%:]*$/; + var is_valid_auth = valid_auth_regex.test(before_at); + var has_encoded_content = /%[0-9a-fA-F]{2}/.test(before_at); + if (is_valid_auth && !has_encoded_content) { + if (options.require_protocol) { + return false; + } + } else { + url = cleanUpProtocol(potential_protocol); + if (url === false) { + return false; + } + } + } else { + var looks_like_port = /^[0-9]/.test(after_colon); + if (looks_like_port) { + if (options.require_protocol) { + return false; + } + } else { + url = cleanUpProtocol(potential_protocol); + if (url === false) { + return false; + } + } + } + } else { + url = cleanUpProtocol(potential_protocol); + if (url === false) { + return false; + } + } + } else if (options.require_protocol) { + return false; + } + if (url.slice(0, 2) === "//") { + if (!had_explicit_protocol && !options.allow_protocol_relative_urls) { + return false; + } + url = url.slice(2); + } + if (url === "") { + return false; + } + split = url.split("/"); + url = split.shift(); + if (url === "" && !options.require_host) { + return true; + } + split = url.split("@"); + if (split.length > 1) { + if (options.disallow_auth) { + return false; + } + if (split[0] === "") { + return false; + } + auth = split.shift(); + if (auth.indexOf(":") >= 0 && auth.split(":").length > 2) { + return false; + } + var _auth$split = auth.split(":"), _auth$split2 = _slicedToArray(_auth$split, 2), user = _auth$split2[0], password = _auth$split2[1]; + if (user === "" && password === "") { + return false; + } + } + hostname = split.join("@"); + port_str = null; + ipv6 = null; + var ipv6_match = hostname.match(wrapped_ipv6); + if (ipv6_match) { + host = ""; + ipv6 = ipv6_match[1]; + port_str = ipv6_match[2] || null; + } else { + split = hostname.split(":"); + host = split.shift(); + if (split.length) { + port_str = split.join(":"); + } + } + if (port_str !== null && port_str.length > 0) { + port = parseInt(port_str, 10); + if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) { + return false; + } + } else if (options.require_port) { + return false; + } + if (options.host_whitelist) { + return (0, _checkHost.default)(host, options.host_whitelist); + } + if (host === "" && !options.require_host) { + return true; + } + if (!(0, _isIP.default)(host) && !(0, _isFQDN.default)(host, options) && (!ipv6 || !(0, _isIP.default)(ipv6, 6))) { + return false; + } + host = host || ipv6; + if (options.host_blacklist && (0, _checkHost.default)(host, options.host_blacklist)) { + return false; + } + return true; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsUrl.js +var require_IsUrl = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsUrl.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsUrl = exports2.isURL = exports2.IS_URL = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isURL_1 = __importDefault2(require_isURL()); + exports2.IS_URL = "isUrl"; + function isURL(value, options) { + return typeof value === "string" && (0, isURL_1.default)(value, options); + } + exports2.isURL = isURL; + function IsUrl(options, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_URL, + constraints: [options], + validator: { + validate: (value, args) => isURL(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a URL address", validationOptions) + } + }, validationOptions); + } + exports2.IsUrl = IsUrl; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isUUID.js +var require_isUUID = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isUUID.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isUUID; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var uuid = { + 1: /^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 2: /^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 6: /^[0-9A-F]{8}-[0-9A-F]{4}-6[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 7: /^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 8: /^[0-9A-F]{8}-[0-9A-F]{4}-8[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + nil: /^00000000-0000-0000-0000-000000000000$/i, + max: /^ffffffff-ffff-ffff-ffff-ffffffffffff$/i, + loose: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i, + // From https://github.com/uuidjs/uuid/blob/main/src/regex.js + all: /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i + }; + function isUUID(str, version2) { + (0, _assertString.default)(str); + if (version2 === void 0 || version2 === null) { + version2 = "all"; + } + return version2 in uuid ? uuid[version2].test(str) : false; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsUUID.js +var require_IsUUID = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsUUID.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsUUID = exports2.isUUID = exports2.IS_UUID = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isUUID_1 = __importDefault2(require_isUUID()); + exports2.IS_UUID = "isUuid"; + function isUUID(value, version2) { + return typeof value === "string" && (0, isUUID_1.default)(value, version2); + } + exports2.isUUID = isUUID; + function IsUUID(version2, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_UUID, + constraints: [version2], + validator: { + validate: (value, args) => isUUID(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a UUID", validationOptions) + } + }, validationOptions); + } + exports2.IsUUID = IsUUID; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsFirebasePushId.js +var require_IsFirebasePushId = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsFirebasePushId.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsFirebasePushId = exports2.isFirebasePushId = exports2.IS_FIREBASE_PUSH_ID = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_FIREBASE_PUSH_ID = "IsFirebasePushId"; + function isFirebasePushId(value) { + const webSafeRegex = /^[a-zA-Z0-9_-]*$/; + return typeof value === "string" && value.length === 20 && webSafeRegex.test(value); + } + exports2.isFirebasePushId = isFirebasePushId; + function IsFirebasePushId(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_FIREBASE_PUSH_ID, + validator: { + validate: (value, args) => isFirebasePushId(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a Firebase Push Id", validationOptions) + } + }, validationOptions); + } + exports2.IsFirebasePushId = IsFirebasePushId; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isUppercase.js +var require_isUppercase = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isUppercase.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isUppercase; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function isUppercase(str) { + (0, _assertString.default)(str); + return str === str.toUpperCase(); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsUppercase.js +var require_IsUppercase = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsUppercase.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsUppercase = exports2.isUppercase = exports2.IS_UPPERCASE = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isUppercase_1 = __importDefault2(require_isUppercase()); + exports2.IS_UPPERCASE = "isUppercase"; + function isUppercase(value) { + return typeof value === "string" && (0, isUppercase_1.default)(value); + } + exports2.isUppercase = isUppercase; + function IsUppercase(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_UPPERCASE, + validator: { + validate: (value, args) => isUppercase(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be uppercase", validationOptions) + } + }, validationOptions); + } + exports2.IsUppercase = IsUppercase; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isLength.js +var require_isLength = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isLength.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isLength; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function isLength(str, options) { + (0, _assertString.default)(str); + var min; + var max; + if (_typeof(options) === "object") { + min = options.min || 0; + max = options.max; + } else { + min = arguments[1] || 0; + max = arguments[2]; + } + var presentationSequences = str.match(/[^\uFE0F\uFE0E][\uFE0F\uFE0E]/g) || []; + var surrogatePairs = str.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g) || []; + var len = str.length - presentationSequences.length - surrogatePairs.length; + var isInsideRange = len >= min && (typeof max === "undefined" || len <= max); + if (isInsideRange && Array.isArray(options === null || options === void 0 ? void 0 : options.discreteLengths)) { + return options.discreteLengths.some(function(discreteLen) { + return discreteLen === len; + }); + } + return isInsideRange; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/Length.js +var require_Length = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/Length.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Length = exports2.length = exports2.IS_LENGTH = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isLength_1 = __importDefault2(require_isLength()); + exports2.IS_LENGTH = "isLength"; + function length(value, min, max) { + return typeof value === "string" && (0, isLength_1.default)(value, { min, max }); + } + exports2.length = length; + function Length(min, max, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_LENGTH, + constraints: [min, max], + validator: { + validate: (value, args) => length(value, args === null || args === void 0 ? void 0 : args.constraints[0], args === null || args === void 0 ? void 0 : args.constraints[1]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix, args) => { + const isMinLength = (args === null || args === void 0 ? void 0 : args.constraints[0]) !== null && (args === null || args === void 0 ? void 0 : args.constraints[0]) !== void 0; + const isMaxLength = (args === null || args === void 0 ? void 0 : args.constraints[1]) !== null && (args === null || args === void 0 ? void 0 : args.constraints[1]) !== void 0; + if (isMinLength && (!args.value || args.value.length < (args === null || args === void 0 ? void 0 : args.constraints[0]))) { + return eachPrefix + "$property must be longer than or equal to $constraint1 characters"; + } else if (isMaxLength && args.value.length > (args === null || args === void 0 ? void 0 : args.constraints[1])) { + return eachPrefix + "$property must be shorter than or equal to $constraint2 characters"; + } + return eachPrefix + "$property must be longer than or equal to $constraint1 and shorter than or equal to $constraint2 characters"; + }, validationOptions) + } + }, validationOptions); + } + exports2.Length = Length; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/MaxLength.js +var require_MaxLength = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/MaxLength.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MaxLength = exports2.maxLength = exports2.MAX_LENGTH = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isLength_1 = __importDefault2(require_isLength()); + exports2.MAX_LENGTH = "maxLength"; + function maxLength(value, max) { + return typeof value === "string" && (0, isLength_1.default)(value, { min: 0, max }); + } + exports2.maxLength = maxLength; + function MaxLength(max, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.MAX_LENGTH, + constraints: [max], + validator: { + validate: (value, args) => maxLength(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be shorter than or equal to $constraint1 characters", validationOptions) + } + }, validationOptions); + } + exports2.MaxLength = MaxLength; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/MinLength.js +var require_MinLength = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/MinLength.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MinLength = exports2.minLength = exports2.MIN_LENGTH = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isLength_1 = __importDefault2(require_isLength()); + exports2.MIN_LENGTH = "minLength"; + function minLength(value, min) { + return typeof value === "string" && (0, isLength_1.default)(value, { min }); + } + exports2.minLength = minLength; + function MinLength(min, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.MIN_LENGTH, + constraints: [min], + validator: { + validate: (value, args) => minLength(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be longer than or equal to $constraint1 characters", validationOptions) + } + }, validationOptions); + } + exports2.MinLength = MinLength; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/matches.js +var require_matches = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/matches.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = matches; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function matches(str, pattern, modifiers) { + (0, _assertString.default)(str); + if (Object.prototype.toString.call(pattern) !== "[object RegExp]") { + pattern = new RegExp(pattern, modifiers); + } + return !!str.match(pattern); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/Matches.js +var require_Matches = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/Matches.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Matches = exports2.matches = exports2.MATCHES = void 0; + var ValidateBy_1 = require_ValidateBy(); + var matches_1 = __importDefault2(require_matches()); + exports2.MATCHES = "matches"; + function matches(value, pattern, modifiers) { + return typeof value === "string" && (0, matches_1.default)(value, pattern, modifiers); + } + exports2.matches = matches; + function Matches(pattern, modifiersOrAnnotationOptions, validationOptions) { + let modifiers; + if (modifiersOrAnnotationOptions && modifiersOrAnnotationOptions instanceof Object && !validationOptions) { + validationOptions = modifiersOrAnnotationOptions; + } else { + modifiers = modifiersOrAnnotationOptions; + } + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.MATCHES, + constraints: [pattern, modifiers], + validator: { + validate: (value, args) => matches(value, args === null || args === void 0 ? void 0 : args.constraints[0], args === null || args === void 0 ? void 0 : args.constraints[1]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix, args) => eachPrefix + "$property must match $constraint1 regular expression", validationOptions) + } + }, validationOptions); + } + exports2.Matches = Matches; + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/metadata.max.json +var require_metadata_max = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/metadata.max.json"(exports2, module2) { + module2.exports = { version: 4, country_calling_codes: { "1": ["US", "AG", "AI", "AS", "BB", "BM", "BS", "CA", "DM", "DO", "GD", "GU", "JM", "KN", "KY", "LC", "MP", "MS", "PR", "SX", "TC", "TT", "VC", "VG", "VI"], "7": ["RU", "KZ"], "20": ["EG"], "27": ["ZA"], "30": ["GR"], "31": ["NL"], "32": ["BE"], "33": ["FR"], "34": ["ES"], "36": ["HU"], "39": ["IT", "VA"], "40": ["RO"], "41": ["CH"], "43": ["AT"], "44": ["GB", "GG", "IM", "JE"], "45": ["DK"], "46": ["SE"], "47": ["NO", "SJ"], "48": ["PL"], "49": ["DE"], "51": ["PE"], "52": ["MX"], "53": ["CU"], "54": ["AR"], "55": ["BR"], "56": ["CL"], "57": ["CO"], "58": ["VE"], "60": ["MY"], "61": ["AU", "CC", "CX"], "62": ["ID"], "63": ["PH"], "64": ["NZ"], "65": ["SG"], "66": ["TH"], "81": ["JP"], "82": ["KR"], "84": ["VN"], "86": ["CN"], "90": ["TR"], "91": ["IN"], "92": ["PK"], "93": ["AF"], "94": ["LK"], "95": ["MM"], "98": ["IR"], "211": ["SS"], "212": ["MA", "EH"], "213": ["DZ"], "216": ["TN"], "218": ["LY"], "220": ["GM"], "221": ["SN"], "222": ["MR"], "223": ["ML"], "224": ["GN"], "225": ["CI"], "226": ["BF"], "227": ["NE"], "228": ["TG"], "229": ["BJ"], "230": ["MU"], "231": ["LR"], "232": ["SL"], "233": ["GH"], "234": ["NG"], "235": ["TD"], "236": ["CF"], "237": ["CM"], "238": ["CV"], "239": ["ST"], "240": ["GQ"], "241": ["GA"], "242": ["CG"], "243": ["CD"], "244": ["AO"], "245": ["GW"], "246": ["IO"], "247": ["AC"], "248": ["SC"], "249": ["SD"], "250": ["RW"], "251": ["ET"], "252": ["SO"], "253": ["DJ"], "254": ["KE"], "255": ["TZ"], "256": ["UG"], "257": ["BI"], "258": ["MZ"], "260": ["ZM"], "261": ["MG"], "262": ["RE", "YT"], "263": ["ZW"], "264": ["NA"], "265": ["MW"], "266": ["LS"], "267": ["BW"], "268": ["SZ"], "269": ["KM"], "290": ["SH", "TA"], "291": ["ER"], "297": ["AW"], "298": ["FO"], "299": ["GL"], "350": ["GI"], "351": ["PT"], "352": ["LU"], "353": ["IE"], "354": ["IS"], "355": ["AL"], "356": ["MT"], "357": ["CY"], "358": ["FI", "AX"], "359": ["BG"], "370": ["LT"], "371": ["LV"], "372": ["EE"], "373": ["MD"], "374": ["AM"], "375": ["BY"], "376": ["AD"], "377": ["MC"], "378": ["SM"], "380": ["UA"], "381": ["RS"], "382": ["ME"], "383": ["XK"], "385": ["HR"], "386": ["SI"], "387": ["BA"], "389": ["MK"], "420": ["CZ"], "421": ["SK"], "423": ["LI"], "500": ["FK"], "501": ["BZ"], "502": ["GT"], "503": ["SV"], "504": ["HN"], "505": ["NI"], "506": ["CR"], "507": ["PA"], "508": ["PM"], "509": ["HT"], "590": ["GP", "BL", "MF"], "591": ["BO"], "592": ["GY"], "593": ["EC"], "594": ["GF"], "595": ["PY"], "596": ["MQ"], "597": ["SR"], "598": ["UY"], "599": ["CW", "BQ"], "670": ["TL"], "672": ["NF"], "673": ["BN"], "674": ["NR"], "675": ["PG"], "676": ["TO"], "677": ["SB"], "678": ["VU"], "679": ["FJ"], "680": ["PW"], "681": ["WF"], "682": ["CK"], "683": ["NU"], "685": ["WS"], "686": ["KI"], "687": ["NC"], "688": ["TV"], "689": ["PF"], "690": ["TK"], "691": ["FM"], "692": ["MH"], "850": ["KP"], "852": ["HK"], "853": ["MO"], "855": ["KH"], "856": ["LA"], "880": ["BD"], "886": ["TW"], "960": ["MV"], "961": ["LB"], "962": ["JO"], "963": ["SY"], "964": ["IQ"], "965": ["KW"], "966": ["SA"], "967": ["YE"], "968": ["OM"], "970": ["PS"], "971": ["AE"], "972": ["IL"], "973": ["BH"], "974": ["QA"], "975": ["BT"], "976": ["MN"], "977": ["NP"], "992": ["TJ"], "993": ["TM"], "994": ["AZ"], "995": ["GE"], "996": ["KG"], "998": ["UZ"] }, countries: { AC: ["247", "00", "(?:[01589]\\d|[2-467])\\d{4}", [5, 6], 0, 0, 0, 0, 0, 0, 0, [["6\\d{4}", [5]], ["[2-47]\\d{4}", [5]], 0, 0, 0, 0, ["(?:0[1-9]|[1589]\\d)\\d{4}", [6]]]], AD: ["376", "00", "(?:1|6\\d)\\d{7}|[135-9]\\d{5}", [6, 8, 9], [["(\\d{3})(\\d{3})", "$1 $2", ["[135-9]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["1"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]]], 0, 0, 0, 0, 0, 0, [["[78]\\d{5}", [6]], ["690\\d{6}|[356]\\d{5}", [6, 9]], ["180[02]\\d{4}", [8]], ["[19]\\d{5}", [6]]]], AE: ["971", "00", "(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{3})(\\d{2,9})", "$1 $2", ["60|8"]], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[236]|[479][2-8]"], "0$1"], ["(\\d{3})(\\d)(\\d{5})", "$1 $2 $3", ["[479]"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"]], "0", 0, 0, 0, 0, 0, [["[2-4679][2-8]\\d{6}", [8]], ["5[02-68]\\d{7}", [9]], ["400\\d{6}|800\\d{2,9}"], ["900[02]\\d{5}", [9]], 0, 0, ["600[25]\\d{5}", [9]], 0, 0, ["700[05]\\d{5}", [9]]]], AF: ["93", "00", "[2-7]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:[25][0-8]|[34][0-4]|6[0-5])[2-9]\\d{6}"], ["7\\d{8}"]]], AG: ["1", "011", "(?:268|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([457]\\d{6})$|1", "268$1", 0, "268", [["268(?:4(?:6[0-38]|84)|56[0-2])\\d{4}"], ["268(?:464|7(?:1[3-9]|[28]\\d|3[0246]|64|7[0-689]))\\d{4}"], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"], 0, 0, ["26840[69]\\d{4}"], ["26848[01]\\d{4}"]]], AI: ["1", "011", "(?:264|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2457]\\d{6})$|1", "264$1", 0, "264", [["264(?:292|4(?:6[12]|9[78]))\\d{4}"], ["264(?:235|4(?:69|7[67])|5(?:3[6-9]|8[1-4])|7(?:29|72))\\d{4}"], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"], 0, 0, ["264724\\d{4}"]]], AL: ["355", "00", "(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}", [6, 7, 8, 9], [["(\\d{3})(\\d{3,4})", "$1 $2", ["80|9"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["4[2-6]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2358][2-5]|4"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["[23578]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["6"], "0$1"]], "0", 0, 0, 0, 0, 0, [["4505[0-2]\\d{3}|(?:[2358][16-9]\\d[2-9]|4410)\\d{4}|(?:[2358][2-5][2-9]|4(?:[2-57-9][2-9]|6\\d))\\d{5}", [8]], ["6(?:[78][2-9]|9\\d)\\d{6}", [9]], ["800\\d{4}", [7]], ["900[1-9]\\d\\d", [6]], ["700[2-9]\\d{4}", [8]], 0, 0, 0, 0, ["808[1-9]\\d\\d", [6]]]], AM: ["374", "00", "(?:[1-489]\\d|55|60|77)\\d{6}", [8], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[89]0"], "0 $1"], ["(\\d{3})(\\d{5})", "$1 $2", ["2|3[12]"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["1|47"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[3-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:(?:1[0-25]|47)\\d|2(?:2[2-46]|3[1-8]|4[2-69]|5[2-7]|6[1-9]|8[1-7])|3[12]2)\\d{5}"], ["(?:33|4[1349]|55|77|88|9[13-9])\\d{6}"], ["800\\d{5}"], ["90[016]\\d{5}"], 0, 0, 0, 0, ["60(?:2[78]|3[5-9]|4[02-9]|5[0-46-9]|[6-8]\\d|9[0-2])\\d{4}"], ["80[1-4]\\d{5}"]]], AO: ["244", "00", "[29]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[29]"]]], 0, 0, 0, 0, 0, 0, [["2\\d(?:[0134][25-9]|[25-9]\\d)\\d{5}"], ["9[1-79]\\d{7}"]]], AR: ["54", "00", "(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}", [10, 11], [["(\\d{4})(\\d{2})(\\d{4})", "$1 $2-$3", ["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])", "2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)", "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["1"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[68]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2-$3", ["[23]"], "0$1", 1], ["(\\d)(\\d{4})(\\d{2})(\\d{4})", "$2 15-$3-$4", ["9(?:2[2-469]|3[3-578])", "9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))", "9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)", "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"], "0$1", 0, "$1 $2 $3-$4"], ["(\\d)(\\d{2})(\\d{4})(\\d{4})", "$2 15-$3-$4", ["91"], "0$1", 0, "$1 $2 $3-$4"], ["(\\d{3})(\\d{3})(\\d{5})", "$1-$2-$3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{4})", "$2 15-$3-$4", ["9"], "0$1", 0, "$1 $2 $3-$4"]], "0", 0, "0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?", "9$1", 0, 0, [["3(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|(?:2(?:2(?:2[59]|44|52)|3(?:26|44)|47[35]|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|(?:2(?:657|9(?:54|66))|3(?:48[27]|7(?:55|77)|8(?:65|78)))[2-8]\\d{5}|(?:2(?:284|3(?:02|23)|477|622|920)|3(?:4(?:46|89|92)|541))[2-7]\\d{5}|(?:(?:11[0-8]|670)\\d|2(?:2(?:0[45]|1[2-6]|3[3-6])|3(?:[06]4|7[45])|494|6(?:04|1[2-8]|[36][45]|4[3-6])|80[45]|9(?:[17][4-6]|[48][45]|9[3-6]))|3(?:364|4(?:1[2-8]|[25][4-6]|3[3-6]|84)|5(?:1[2-9]|[38][4-6])|6(?:2[45]|44)|7[069][45]|8(?:0[45]|1[2-7]|3[4-6]|5[3-6]|7[2-6]|8[3-68])))\\d{6}|(?:2(?:2(?:62|81)|320|9(?:42|83))|3(?:329|4(?:62|7[16])|5(?:43|64)|7(?:18|5[17])))[2-6]\\d{5}|2(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|(?:2(?:257|3(?:24|46|92)|9(?:01|23|64))|3(?:4(?:42|64)|5(?:25|37|4[47]|71)|7(?:35|72)|825))[3-6]\\d{5}|(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|25|[45][25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[035-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[14]|4[13]|5[468]|7[3-5]|8[26])|8(?:2[67]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}", [10]], ["93(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|9(?:2(?:2(?:2[59]|44|52)|3(?:26|44)|47[35]|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|9(?:2(?:657|9(?:54|66))|3(?:48[27]|7(?:55|77)|8(?:65|78)))[2-8]\\d{5}|9(?:2(?:284|3(?:02|23)|477|622|920)|3(?:4(?:46|89|92)|541))[2-7]\\d{5}|(?:675\\d|9(?:11[0-8]\\d|2(?:2(?:0[45]|1[2-6]|3[3-6])|3(?:[06]4|7[45])|494|6(?:04|1[2-8]|[36][45]|4[3-6])|80[45]|9(?:[17][4-6]|[48][45]|9[3-6]))|3(?:364|4(?:1[2-8]|[25][4-6]|3[3-6]|84)|5(?:1[2-9]|[38][4-6])|6(?:2[45]|44)|7[069][45]|8(?:0[45]|1[2-7]|3[4-6]|5[3-6]|7[2-6]|8[3-68]))))\\d{6}|9(?:2(?:2(?:62|81)|320|9(?:42|83))|3(?:329|4(?:62|7[16])|5(?:43|64)|7(?:18|5[17])))[2-6]\\d{5}|92(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|9(?:2(?:257|3(?:24|46|92)|9(?:01|23|64))|3(?:4(?:42|64)|5(?:25|37|4[47]|71)|7(?:35|72)|825))[3-6]\\d{5}|9(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|25|[45][25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[035-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[14]|4[13]|5[468]|7[3-5]|8[26])|8(?:2[67]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}"], ["800\\d{7,8}"], ["60[04579]\\d{7}", [10]], 0, 0, ["810\\d{7}", [10]]]], AS: ["1", "011", "(?:[58]\\d\\d|684|900)\\d{7}", [10], 0, "1", 0, "([267]\\d{6})$|1", "684$1", 0, "684", [["684(?:274|6(?:22|33|44|55|77|88|9[19]))\\d{4}"], ["684(?:2(?:48|5[2468]|7[246])|7(?:3[13]|70|82))\\d{4}"], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], AT: ["43", "00", "1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], [["(\\d)(\\d{3,12})", "$1 $2", ["1(?:11|[2-9])"], "0$1"], ["(\\d{3})(\\d{2})", "$1 $2", ["517"], "0$1"], ["(\\d{2})(\\d{3,5})", "$1 $2", ["5[079]"], "0$1"], ["(\\d{3})(\\d{3,10})", "$1 $2", ["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]", "(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"], "0$1"], ["(\\d{4})(\\d{3,9})", "$1 $2", ["[2-467]|5[2-6]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4,7})", "$1 $2 $3", ["5"], "0$1"]], "0", 0, 0, 0, 0, 0, [["1(?:11\\d|[2-9]\\d{3,11})|(?:316|463)\\d{3,10}|648[34]\\d{3,9}|(?:51|66|73)2\\d{3,10}|(?:2(?:1[467]|2[13-8]|5[2357]|6[1-46-8]|7[1-8]|8[124-7]|9[1458])|3(?:1[1-578]|3[23568]|4[5-7]|5[1378]|6[1-38]|8[3-68])|4(?:2[1-8]|35|7[1368]|8[2457])|5(?:2[1-8]|3[357]|4[147]|5[12578]|6[37])|6(?:13|2[1-47]|4[135-7]|5[468])|7(?:2[1-8]|35|4[13478]|5[68]|6[16-8]|7[1-6]|9[45]))\\d{4,10}"], ["6(?:485|(?:5[0-3579]|6[013-9]|[7-9]\\d)\\d)\\d{3,9}", [7, 8, 9, 10, 11, 12, 13]], ["800\\d{6,10}", [9, 10, 11, 12, 13]], ["(?:8[69][2-68]|9(?:0[01]|3[019]))\\d{6,10}", [9, 10, 11, 12, 13]], 0, 0, 0, 0, ["5(?:0[1-9]|17|[79]\\d)\\d{2,10}|7[28]0\\d{6,10}", [5, 6, 7, 8, 9, 10, 11, 12, 13]], ["8(?:10|2[018])\\d{6,10}|828\\d{5}", [8, 9, 10, 11, 12, 13]]]], AU: ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}", [5, 6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{3,4})", "$1 $2", ["16"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["16"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["14|4"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[2378]"], "(0$1)"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:30|[89])"]]], "0", 0, "(183[12])|0", 0, 0, 0, [["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}", [9]], ["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, ["163\\d{2,6}", [5, 6, 7, 8, 9]], ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], AW: ["297", "00", "(?:[25-79]\\d\\d|800)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[25-9]"]]], 0, 0, 0, 0, 0, 0, [["5(?:2\\d|8[1-9])\\d{4}"], ["(?:290|5[69]\\d|6(?:[03]0|22|4[0-2]|[69]\\d)|7(?:[34]\\d|7[07])|9(?:6[45]|9[4-8]))\\d{4}"], ["800\\d{4}"], ["900\\d{4}"], 0, 0, 0, 0, ["(?:28\\d|501)\\d{4}"]]], AX: ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}", [5, 6, 7, 8, 9, 10, 11, 12], 0, "0", 0, 0, 0, 0, "18", [["18[1-8]\\d{3,6}", [6, 7, 8, 9]], ["4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}", [6, 7, 8, 9, 10]], ["800\\d{4,6}", [7, 8, 9]], ["[67]00\\d{5,6}", [8, 9]], 0, 0, ["20\\d{4,8}|60[12]\\d{5,6}|7(?:099\\d{4,5}|5[03-9]\\d{3,7})|20[2-59]\\d\\d|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:10|29|3[09]|70[1-5]\\d)\\d{4,8}"]], "00"], AZ: ["994", "00", "365\\d{6}|(?:[124579]\\d|60|88)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["90"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[28]|2|365|46", "1[28]|2|365[45]|46", "1[28]|2|365(?:4|5[02])|46"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[13-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:2[12]428|3655[02])\\d{4}|(?:2(?:22[0-79]|63[0-28])|3654)\\d{5}|(?:(?:1[28]|46)\\d|2(?:[014-6]2|[23]3))\\d{6}"], ["36554\\d{4}|(?:[16]0|4[04]|5[015]|7[07]|99)\\d{7}"], ["88\\d{7}"], ["900200\\d{3}"]]], BA: ["387", "00", "6\\d{8}|(?:[35689]\\d|49|70)\\d{6}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[1-3]|[7-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2-$3", ["[3-5]|6[56]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["6"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:3(?:[05-79][2-9]|1[4579]|[23][24-9]|4[2-4689]|8[2457-9])|49[2-579]|5(?:0[2-49]|[13][2-9]|[268][2-4679]|4[4689]|5[2-79]|7[2-69]|9[2-4689]))\\d{5}", [8]], ["6040\\d{5}|6(?:03|[1-356]|44|7\\d)\\d{6}"], ["8[08]\\d{6}", [8]], ["9[0246]\\d{6}", [8]], 0, 0, ["703[235]0\\d{3}|70(?:2[0-5]|3[0146]|[56]0)\\d{4}", [8]], 0, 0, ["8[12]\\d{6}", [8]]]], BB: ["1", "011", "(?:246|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "246$1", 0, "246", [["246521[0369]\\d{3}|246(?:2(?:2[78]|7[0-4])|4(?:1[024-6]|2\\d|3[2-9])|5(?:20|[34]\\d|54|7[1-3])|6(?:2\\d|38)|7[35]7|9(?:1[89]|63))\\d{4}"], ["246(?:(?:2(?:[3568]\\d|4[0-57-9])|3(?:5[2-9]|6[0-6])|4(?:46|5\\d)|69[5-7]|8(?:[2-5]\\d|83))\\d|52(?:1[147]|20))\\d{3}"], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["(?:246976|900[2-9]\\d\\d)\\d{4}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"], 0, ["246(?:292|367|4(?:1[7-9]|3[01]|4[47-9]|67)|7(?:1[2-9]|2\\d|3[016]|53))\\d{4}"], 0, ["24631\\d{5}"]]], BD: ["880", "00", "[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}", [6, 7, 8, 9, 10], [["(\\d{2})(\\d{4,6})", "$1-$2", ["31[5-8]|[459]1"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1-$2", ["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"], "0$1"], ["(\\d{4})(\\d{3,6})", "$1-$2", ["[13-9]|2[23]"], "0$1"], ["(\\d)(\\d{7,8})", "$1-$2", ["2"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:4(?:31\\d\\d|423)|5222)\\d{3}(?:\\d{2})?|8332[6-9]\\d\\d|(?:3(?:03[56]|224)|4(?:22[25]|653))\\d{3,4}|(?:3(?:42[47]|529|823)|4(?:027|525|65(?:28|8))|562|6257|7(?:1(?:5[3-5]|6[12]|7[156]|89)|22[589]56|32|42675|52(?:[25689](?:56|8)|[347]8)|71(?:6[1267]|75|89)|92374)|82(?:2[59]|32)56|9(?:03[23]56|23(?:256|373)|31|5(?:1|2[4589]56)))\\d{3}|(?:3(?:02[348]|22[35]|324|422)|4(?:22[67]|32[236-9]|6(?:2[46]|5[57])|953)|5526|6(?:024|6655)|81)\\d{4,5}|(?:2(?:7(?:1[0-267]|2[0-289]|3[0-29]|4[01]|5[1-3]|6[013]|7[0178]|91)|8(?:0[125]|1[1-6]|2[0157-9]|3[1-69]|41|6[1-35]|7[1-5]|8[1-8]|9[0-6])|9(?:0[0-2]|1[0-4]|2[568]|3[3-6]|5[5-7]|6[0136-9]|7[0-7]|8[014-9]))|3(?:0(?:2[025-79]|3[2-4])|181|22[12]|32[2356]|824)|4(?:02[09]|22[348]|32[045]|523|6(?:27|54))|666(?:22|53)|7(?:22[57-9]|42[56]|82[35])8|8(?:0[124-9]|2(?:181|2[02-4679]8)|4[12]|[5-7]2)|9(?:[04]2|2(?:2|328)|81))\\d{4}|(?:2(?:[23]\\d|[45])\\d\\d|3(?:1(?:2[5-7]|[5-7])|425|822)|4(?:033|1\\d|[257]1|332|4(?:2[246]|5[25])|6(?:2[35]|56|62)|8(?:23|54)|92[2-5])|5(?:02[03489]|22[457]|32[35-79]|42[46]|6(?:[18]|53)|724|826)|6(?:023|2(?:2[2-5]|5[3-5]|8)|32[3478]|42[34]|52[47]|6(?:[18]|6(?:2[34]|5[24]))|[78]2[2-5]|92[2-6])|7(?:02|21\\d|[3-589]1|6[12]|72[24])|8(?:217|3[12]|[5-7]1)|9[24]1)\\d{5}|(?:(?:3[2-8]|5[2-57-9]|6[03-589])1|4[4689][18])\\d{5}|[59]1\\d{5}"], ["(?:1[13-9]\\d|644)\\d{7}|(?:3[78]|44|66)[02-9]\\d{7}", [10]], ["80[03]\\d{7}", [10]], 0, 0, 0, 0, 0, ["96(?:0[1-69]|1[0-479]|2[278]|3[13-9]|4[0134]|54|6[69]|7[78]|88)\\d{6}", [10]]]], BE: ["32", "00", "4\\d{8}|[1-9]\\d{7}", [8, 9], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:80|9)0"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[239]|4[23]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[15-8]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4"], "0$1"]], "0", 0, 0, 0, 0, 0, [["80[2-8]\\d{5}|(?:1[0-69]|[23][2-8]|4[23]|5\\d|6[013-57-9]|71|8[1-79]|9[2-4])\\d{6}", [8]], ["4[5-9]\\d{7}", [9]], ["800[1-9]\\d{4}", [8]], ["(?:70(?:2[0-57]|3[04-7]|44|6[04-69]|7[0579])|90\\d\\d)\\d{4}", [8]], 0, 0, ["78(?:0[578]|1[014-8]|2[25]|3[15-8]|48|5[05]|60|7[06-8]|9\\d)\\d{4}", [8]], 0, 0, ["7879\\d{4}", [8]]]], BF: ["226", "00", "[024-7]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[024-7]"]]], 0, 0, 0, 0, 0, 0, [["2(?:0(?:49|5[23]|6[5-7]|9[016-9])|4(?:4[569]|5[4-6]|6[5-7]|7[0179])|5(?:[34]\\d|50|6[5-8]))\\d{4}"], ["(?:0[1-7]|4[4-6]|5[0-8]|[67]\\d)\\d{6}"]]], BG: ["359", "00", "00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}", [6, 7, 8, 9, 12], [["(\\d)(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["43[1-6]|70[1-9]"], "0$1"], ["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:70|8)0"], "0$1"], ["(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3", ["43[1-7]|7"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[48]|9[08]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"]], "0", 0, 0, 0, 0, 0, [["2\\d{5,7}|(?:43[1-6]|70[1-9])\\d{4,5}|(?:[36]\\d|4[124-7]|[57][1-9]|8[1-6]|9[1-7])\\d{5,6}", [6, 7, 8]], ["(?:43[07-9]|99[69]\\d)\\d{5}|(?:8[7-9]|98)\\d{7}", [8, 9]], ["(?:00800\\d\\d|800)\\d{5}", [8, 12]], ["90\\d{6}", [8]], 0, 0, 0, 0, 0, ["700\\d{5}", [8]]]], BH: ["973", "00", "[136-9]\\d{7}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[13679]|8[02-4679]"]]], 0, 0, 0, 0, 0, 0, [["(?:1(?:3[1356]|6[0156]|7\\d)\\d|6(?:1[16]\\d|500|6(?:0\\d|3[12]|44|55|7[7-9]|88)|9[69][69])|7(?:[07]\\d\\d|1(?:11|78)))\\d{4}"], ["(?:3(?:[0-79]\\d|8[0-57-9])\\d|6(?:3(?:00|33|6[16])|441|6(?:3[03-9]|[69]\\d|7[0-689])))\\d{4}"], ["8[02369]\\d{6}"], ["(?:87|9[0-8])\\d{6}"], 0, 0, 0, 0, 0, ["84\\d{6}"]]], BI: ["257", "00", "(?:[267]\\d|31)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2367]"]]], 0, 0, 0, 0, 0, 0, [["(?:22|31)\\d{6}"], ["(?:29|6[1-9]|7[125-9])\\d{6}"]]], BJ: ["229", "00", "(?:01\\d|8)\\d{7}", [8, 10], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["0"]]], 0, 0, 0, 0, 0, 0, [["012\\d{7}", [10]], ["01(?:2[5-9]|[4-69]\\d)\\d{6}", [10]], 0, 0, 0, 0, ["81\\d{6}", [8]], 0, ["857[58]\\d{4}", [8]]]], BL: ["590", "00", "7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"], ["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"], ["80[0-5]\\d{6}"], ["8[129]\\d{7}"], 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]], BM: ["1", "011", "(?:441|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "441$1", 0, "441", [["441(?:[46]\\d\\d|5(?:4\\d|60|89))\\d{4}"], ["441(?:[2378]\\d|5[0-39]|9[02])\\d{5}"], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], BN: ["673", "00", "[2-578]\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-578]"]]], 0, 0, 0, 0, 0, 0, [["22[0-7]\\d{4}|(?:2[013-9]|[34]\\d|5[0-25-9])\\d{5}"], ["(?:22[89]|[78]\\d\\d)\\d{4}"], 0, 0, 0, 0, 0, 0, ["5[34]\\d{5}"]]], BO: ["591", "00(?:1\\d)?", "(?:[2-7]\\d\\d|8001)\\d{5}", [8, 9], [["(\\d)(\\d{7})", "$1 $2", ["[23]|4[46]|50"]], ["(\\d{8})", "$1", ["[5-7]"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["8"]]], "0", 0, "0(1\\d)?", 0, 0, 0, [["(?:2(?:2\\d\\d|5(?:11|[258]\\d|9[67])|6(?:12|2\\d|9[34])|8(?:2[34]|39|62))|3(?:3\\d\\d|4(?:6\\d|8[24])|8(?:25|42|5[257]|86|9[25])|9(?:[27]\\d|3[2-4]|4[248]|5[24]|6[2-6]))|4(?:4\\d\\d|6(?:11|[24689]\\d|72)))\\d{4}", [8]], ["(?:57|[67]\\d)\\d{6}", [8]], ["8001[07]\\d{4}", [9]], 0, 0, 0, 0, 0, ["50\\d{6}", [8]]]], BQ: ["599", "00", "(?:[34]1|7\\d)\\d{5}", [7], 0, 0, 0, 0, 0, 0, "[347]", [["(?:318[023]|41(?:6[023]|70)|7(?:1[578]|2[05]|50)\\d)\\d{3}"], ["(?:31(?:8[14-8]|9[14578])|416[14-9]|7(?:0[01]|7[07]|8\\d|9[056])\\d)\\d{3}"]]], BR: ["55", "00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)", "[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}", [8, 9, 10, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["300|4(?:0[02]|37|86)", "300|4(?:0(?:0|20)|370|864)"]], ["(\\d{3})(\\d{2,3})(\\d{4})", "$1 $2 $3", ["(?:[358]|90)0"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"], "($1)"], ["(\\d{2})(\\d{5})(\\d{4})", "$1 $2-$3", ["[16][1-9]|[2-57-9]"], "($1)"]], "0", 0, "(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?", "$2", 0, 0, [["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-5]\\d{7}", [10]], ["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])(?:7|9\\d)\\d{7}", [10, 11]], ["800\\d{6,7}", [9, 10]], ["[59]00\\d{6,7}", [9, 10]], 0, 0, 0, 0, 0, ["(?:30[03]\\d{3}|4(?:0(?:0\\d|20)|370|864))\\d{4}|300\\d{5}", [8, 10]]]], BS: ["1", "011", "(?:242|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([3-8]\\d{6})$|1", "242$1", 0, "242", [["242(?:3(?:02|[236][1-9]|4[0-24-9]|5[0-68]|7[347]|8[0-4]|9[2-467])|461|502|6(?:0[1-5]|12|2[013]|[45]0|7[67]|8[78]|9[89])|7(?:02|88))\\d{4}"], ["242(?:3(?:5[79]|7[56]|95)|4(?:[23][1-9]|4[1-35-9]|5[1-8]|6[2-8]|7\\d|81)|5(?:2[45]|3[35]|44|5[1-46-9]|65|77)|6[34]6|7(?:27|38)|8(?:0[1-9]|1[02-9]|2\\d|3[0-4]|[89]9))\\d{4}"], ["242300\\d{4}|8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"], 0, ["242225\\d{4}"]]], BT: ["975", "00", "[178]\\d{7}|[2-8]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-6]|7[246]|8[2-4]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|[78]"]]], 0, 0, 0, 0, 0, 0, [["(?:2[3-6]|[34][5-7]|5[236]|6[2-46]|7[246]|8[2-4])\\d{5}", [7]], ["(?:1[67]|[78]7)\\d{6}", [8]]]], BW: ["267", "00", "(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}", [7, 8, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["90"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[24-6]|3[15-9]"]], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37]"]], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [["(?:2(?:4[0-48]|6[0-24]|9[0578])|3(?:1[0-35-9]|55|[69]\\d|7[013]|81)|4(?:6[03]|7[1267]|9[0-5])|5(?:3[03489]|4[0489]|7[1-47]|88|9[0-49])|6(?:2[1-35]|5[149]|8[013467]))\\d{4}", [7]], ["(?:321|7(?:[1-8]\\d|9[03]))\\d{5}", [8]], ["(?:0800|800\\d)\\d{6}", [10]], ["90\\d{5}", [7]], 0, 0, 0, 0, ["79(?:1(?:[0-2]\\d|3[0-8])|2[0-7]\\d)\\d{3}", [8]]]], BY: ["375", "810", "(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}", [6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{3})", "$1 $2", ["800"], "8 $1"], ["(\\d{3})(\\d{2})(\\d{2,4})", "$1 $2 $3", ["800"], "8 $1"], ["(\\d{4})(\\d{2})(\\d{3})", "$1 $2-$3", ["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])", "1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"], "8 0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["1(?:[56]|7[467])|2[1-3]"], "8 0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[1-4]"], "8 0$1"], ["(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[89]"], "8 $1"]], "8", 0, "0|80?", 0, 0, 0, [["(?:1(?:5(?:1[1-5]|[24]\\d|6[2-4]|9[1-7])|6(?:[235]\\d|4[1-7])|7\\d\\d)|2(?:1(?:[246]\\d|3[0-35-9]|5[1-9])|2(?:[235]\\d|4[0-8])|3(?:[26]\\d|3[02-79]|4[024-7]|5[03-7])))\\d{5}", [9]], ["(?:2(?:5[5-79]|9[1-9])|(?:33|44)\\d)\\d{6}", [9]], ["800\\d{3,7}|8(?:0[13]|20\\d)\\d{7}"], ["(?:810|902)\\d{7}", [10]], 0, 0, 0, 0, ["249\\d{6}", [9]]], "8~10"], BZ: ["501", "00", "(?:0800\\d|[2-8])\\d{6}", [7, 11], [["(\\d{3})(\\d{4})", "$1-$2", ["[2-8]"]], ["(\\d)(\\d{3})(\\d{4})(\\d{3})", "$1-$2-$3-$4", ["0"]]], 0, 0, 0, 0, 0, 0, [["(?:2(?:[02]\\d|36|[68]0)|[3-58](?:[02]\\d|[68]0)|7(?:[02]\\d|32|[68]0))\\d{4}", [7]], ["6[0-35-7]\\d{5}", [7]], ["0800\\d{7}", [11]]]], CA: ["1", "011", "[2-9]\\d{9}|3\\d{6}", [7, 10], 0, "1", 0, 0, 0, 0, 0, [["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}", [10]], ["", [10]], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", [10]], ["900[2-9]\\d{6}", [10]], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}", [10]], 0, ["310\\d{4}", [7]], 0, ["600[2-9]\\d{6}", [10]]]], CC: ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", [6, 7, 8, 9, 10, 12], 0, "0", 0, "([59]\\d{7})$|0", "8$1", 0, 0, [["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}", [9]], ["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, 0, ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], CD: ["243", "00", "(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}", [7, 8, 9, 10], [["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{5})", "$1 $2", ["[1-6]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["5"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:(?:12|573)\\d\\d|276)\\d{5}|[1-6]\\d{6}"], ["88\\d{5}|(?:8[0-69]|9[016-9])\\d{7}", [7, 9]]]], CF: ["236", "00", "8776\\d{4}|(?:[27]\\d|61)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[26-8]"]]], 0, 0, 0, 0, 0, 0, [["(?:2[12]|61)\\d{6}"], ["7[02-7]\\d{6}"], 0, ["8776\\d{4}"]]], CG: ["242", "00", "222\\d{6}|(?:0\\d|80)\\d{7}", [9], [["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[02]"]]], 0, 0, 0, 0, 0, 0, [["222[1-589]\\d{5}"], ["026(?:1[0-5]|6[6-9])\\d{4}|0(?:[14-6]\\d\\d|2(?:40|5[5-8]|6[07-9]))\\d{5}"], 0, ["80[0-2]\\d{6}"]]], CH: ["41", "00", "8\\d{11}|[2-9]\\d{8}", [9, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8[047]|90"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-79]|81"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:2[12467]|3[1-4]|4[134]|5[256]|6[12]|[7-9]1)\\d{7}", [9]], ["(?:6[89]|7[235-9])\\d{7}", [9]], ["800\\d{6}", [9]], ["90[016]\\d{6}", [9]], ["878\\d{6}", [9]], ["860\\d{9}", [12]], ["5[18]\\d{7}", [9]], ["74[0248]\\d{6}", [9]], 0, ["84[0248]\\d{6}", [9]]]], CI: ["225", "00", "[02]\\d{9}", [10], [["(\\d{2})(\\d{2})(\\d)(\\d{5})", "$1 $2 $3 $4", ["2"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3 $4", ["0"]]], 0, 0, 0, 0, 0, 0, [["2(?:[15]\\d{3}|7(?:2(?:0[23]|1[2357]|2[245]|3[45]|4[3-5])|3(?:06|1[69]|[2-6]7)))\\d{5}"], ["0[157]\\d{8}"]]], CK: ["682", "00", "[2-578]\\d{4}", [5], [["(\\d{2})(\\d{3})", "$1 $2", ["[2-578]"]]], 0, 0, 0, 0, 0, 0, [["(?:2\\d|3[13-7]|4[1-5])\\d{3}"], ["[578]\\d{4}"]]], CL: ["56", "(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0", "12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}", [9, 10, 11], [["(\\d{5})(\\d{4})", "$1 $2", ["219", "2196"], "($1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["60|809"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["44"]], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2[1-36]"], "($1)"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["9(?:10|[2-9])"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"], "($1)"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["60|8"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], ["(\\d{3})(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["60"]]], 0, 0, 0, 0, 0, 0, [["2(?:1982[0-6]|3314[05-9])\\d{3}|(?:2(?:1(?:160|962)|3(?:(?:[24]\\d|50)\\d|3(?:[0346-9]\\d|1[0-35-9]|2[1-9]|5[0-24-9])|600)|646[59])|(?:600|80[1-9])\\d\\d|9(?:(?:10[0-2]|7[1-9]\\d)\\d|3(?:[0-57-9]\\d\\d|6(?:0[02-9]|[1-9]\\d))|6(?:[0-8]\\d\\d|9(?:[02-79]\\d|1[05-9]))|9(?:[03-9]\\d\\d|1(?:[0235-9]\\d|4[0-24-9])|2(?:[0-79]\\d|8[0-46-9]))))\\d{4}|(?:22|3[2-5]|[47][1-35]|5[1-3578]|6[13-57]|8[1-9]|9[2458])\\d{7}", [9]], ["2(?:1982[0-6]|3314[05-9])\\d{3}|(?:2(?:1(?:160|962)|3(?:(?:[24]\\d|50)\\d|3(?:[0346-9]\\d|1[0-35-9]|2[1-9]|5[0-24-9])|600)|646[59])|80[1-8]\\d\\d|9(?:(?:10[0-2]|7[1-9]\\d)\\d|3(?:[0-57-9]\\d\\d|6(?:0[02-9]|[1-9]\\d))|6(?:[0-8]\\d\\d|9(?:[02-79]\\d|1[05-9]))|9(?:[03-9]\\d\\d|1(?:[0235-9]\\d|4[0-24-9])|2(?:[0-79]\\d|8[0-46-9]))))\\d{4}|(?:22|3[2-5]|[47][1-35]|5[1-3578]|6[13-57]|8[1-9]|9[2458])\\d{7}", [9]], ["(?:123|8)00\\d{6}", [9, 11]], 0, 0, 0, 0, 0, ["44\\d{7}", [9]], ["600\\d{7,8}", [10, 11]]]], CM: ["237", "00", "[26]\\d{8}|88\\d{6,7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["88"]], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[26]|88"]]], 0, 0, 0, 0, 0, 0, [["2(?:22|33)\\d{6}", [9]], ["(?:24[23]|6(?:[25-9]\\d|4[0-2]))\\d{6}", [9]], ["88\\d{6,7}"]]], CN: ["86", "00|1(?:[12]\\d|79)\\d\\d00", "(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}", [7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{5,6})", "$1 $2", ["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]", "(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"], "0$1"], ["(\\d{3})(\\d{5,6})", "$1 $2", ["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]", "(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]", "85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])", "85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["(?:4|80)0"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["10|2(?:[02-57-9]|1[1-9])", "10|2(?:[02-57-9]|1[1-9])", "10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"], "0$1", 1], ["(\\d{3})(\\d{7,8})", "$1 $2", ["9"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["80"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["[3-578]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["1[3-9]"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["[12]"], "0$1", 1]], "0", 0, "(1(?:[12]\\d|79)\\d\\d)|0", 0, 0, 0, [["(?:10(?:[02-79]\\d\\d|[18](?:0[1-9]|[1-9]\\d))|2(?:[02-57-9]\\d{3}|1(?:[18](?:0[1-9]|[1-9]\\d)|[2-79]\\d\\d))|(?:41[03]|8078|9(?:78|94))\\d\\d)\\d{5}|(?:10|2[0-57-9])(?:1(?:00|23)\\d\\d|95\\d{3,4})|(?:41[03]|9(?:78|94))(?:100\\d\\d|95\\d{3,4})|8078123|(?:43[35]|754|851)\\d{7,8}|(?:43[35]|754|851)(?:1(?:00\\d|23)\\d|95\\d{3,4})|(?:3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1\\d|2[37]|3[12]|51|7[13-79]|9[15])|7(?:[39]1|5[57]|6[09])|8(?:71|98))(?:[02-8]\\d{7}|1(?:0(?:0\\d\\d(?:\\d{3})?|[1-9]\\d{5})|[13-9]\\d{6}|2(?:[0-24-9]\\d{5}|3\\d(?:\\d{4})?))|9(?:[0-46-9]\\d{6}|5\\d{3}(?:\\d(?:\\d{2})?)?))|(?:3(?:1[02-9]|35|49|5\\d|7[02-68]|9[1-68])|4(?:1[24-9]|2[179]|3[46-9]|5[2-9]|6[47-9]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[17]\\d|2[248]|3[04-9]|4[3-6]|5[0-3689]|6[2368]|9[02-9])|8(?:1[236-8]|2[5-7]|3\\d|5[2-9]|7[02-9]|8[36-8]|9[1-7])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))(?:[02-8]\\d{6}|1(?:0(?:0\\d\\d(?:\\d{2})?|[1-9]\\d{4})|[13-9]\\d{5}|2(?:[0-24-9]\\d{4}|3\\d(?:\\d{3})?))|9(?:[0-46-9]\\d{5}|5\\d{3,5}))", [7, 8, 9, 10, 11]], ["1(?:610\\d|740[0-5])\\d{6}|1(?:[38]\\d|4[57]|[59][0-35-9]|6[25-7]|7[0-35-8])\\d{8}", [11]], ["(?:(?:10|21)8|8)00\\d{7}", [10, 12]], ["16[08]\\d{5}", [8]], 0, 0, 0, 0, 0, ["10(?:10\\d{4}|96\\d{3,4})|400\\d{7}|950\\d{7,8}|(?:2[0-57-9]|3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))96\\d{3,4}", [7, 8, 9, 10, 11]]], "00"], CO: ["57", "00(?:4(?:[14]4|56)|[579])", "(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["46"]], ["(\\d{3})(\\d{7})", "$1 $2", ["6|90"], "($1)"], ["(\\d{3})(\\d{7})", "$1 $2", ["3[0-357]|9[14]"]], ["(\\d)(\\d{3})(\\d{7})", "$1-$2-$3", ["1"], "0$1", 0, "$1 $2 $3"]], "0", 0, "0([3579]|4(?:[14]4|56))?", 0, 0, 0, [["601055(?:[0-4]\\d|50)\\d\\d|6010(?:[0-4]\\d|5[0-4])\\d{4}|(?:46|60(?:[18][1-9]|[24-7][2-9]))\\d{6}", [8, 10]], ["333301[0-5]\\d{3}|3333(?:00|2[5-9]|[3-9]\\d)\\d{4}|(?:3(?:(?:0[0-5]|1\\d|5[01]|70)\\d|2(?:[0-3]\\d|4[1-9])|3(?:00|3[0-24-9]))|9(?:101|408))\\d{6}", [10]], ["1800\\d{7}", [11]], ["(?:19(?:0[01]|4[78])|901)\\d{7}", [10, 11]]]], CR: ["506", "00", "(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}", [8, 10], [["(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[3-9]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[89]"]]], 0, 0, "(19(?:0[0-2468]|1[09]|20|66|77|99))", 0, 0, 0, [["210[7-9]\\d{4}|2(?:[024-7]\\d|1[1-9])\\d{5}", [8]], ["(?:3005\\d|6500[01])\\d{3}|(?:5[07]|6[0-4]|7[0-3]|8[3-9])\\d{6}", [8]], ["800\\d{7}", [10]], ["90[059]\\d{7}", [10]], 0, 0, 0, 0, ["(?:210[0-6]|4\\d{3}|5100)\\d{4}", [8]]]], CU: ["53", "119", "(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}", [6, 7, 8, 10], [["(\\d{2})(\\d{4,6})", "$1 $2", ["2[1-4]|[34]"], "(0$1)"], ["(\\d)(\\d{6,7})", "$1 $2", ["7"], "(0$1)"], ["(\\d)(\\d{7})", "$1 $2", ["[56]"], "0$1"], ["(\\d{3})(\\d{7})", "$1 $2", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:3[23]|4[89])\\d{4,6}|(?:31|4[36]|8(?:0[25]|78)\\d)\\d{6}|(?:2[1-4]|4[1257]|7\\d)\\d{5,6}"], ["(?:5\\d|6[2-4])\\d{6}", [8]], ["800\\d{7}", [10]], 0, 0, 0, 0, 0, 0, ["807\\d{7}", [10]]]], CV: ["238", "0", "(?:[2-59]\\d\\d|800)\\d{4}", [7], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2-589]"]]], 0, 0, 0, 0, 0, 0, [["2(?:2[1-7]|3[0-8]|4[12]|5[1256]|6\\d|7[1-3]|8[1-5])\\d{4}"], ["(?:36|5[1-389]|9\\d)\\d{5}"], ["800\\d{4}"], 0, 0, 0, 0, 0, ["(?:3[3-5]|4[356])\\d{5}"]]], CW: ["599", "00", "(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["[3467]"]], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["9[4-8]"]]], 0, 0, 0, 0, 0, "[69]", [["9(?:4(?:3[0-5]|4[14]|6\\d)|50\\d|7(?:2[014]|3[02-9]|4[4-9]|6[357]|77|8[7-9])|8(?:3[39]|[46]\\d|7[01]|8[57-9]))\\d{4}"], ["953[01]\\d{4}|9(?:5[12467]|6[5-9])\\d{5}"], 0, 0, 0, 0, 0, ["955\\d{5}", [8]], 0, ["60[0-2]\\d{4}", [7]]]], CX: ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", [6, 7, 8, 9, 10, 12], 0, "0", 0, "([59]\\d{7})$|0", "8$1", 0, 0, [["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}", [9]], ["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, 0, ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], CY: ["357", "00", "(?:[279]\\d|[58]0)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[257-9]"]]], 0, 0, 0, 0, 0, 0, [["2[2-6]\\d{6}"], ["9(?:10|[4-79]\\d)\\d{5}"], ["800\\d{5}"], ["90[09]\\d{5}"], ["700\\d{5}"], 0, ["(?:50|77)\\d{6}"], 0, 0, ["80[1-9]\\d{5}"]]], CZ: ["420", "00", "(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}", [9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]|9[015-7]"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["96"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]], 0, 0, 0, 0, 0, 0, [["(?:2\\d|3[1257-9]|4[16-9]|5[13-9])\\d{7}", [9]], ["7060\\d{5}|(?:60[1-8]|7(?:0[2-5]|19|[2379]\\d))\\d{6}", [9]], ["800\\d{6}", [9]], ["9(?:0[05689]|76)\\d{6}", [9]], ["70[01]\\d{6}", [9]], ["9(?:3\\d{9}|6\\d{7,10})"], ["9(?:5\\d|7[2-4])\\d{6}", [9]], 0, ["9[17]0\\d{6}", [9]], ["8[134]\\d{7}", [9]]]], DE: ["49", "00", "[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [["(\\d{2})(\\d{3,13})", "$1 $2", ["3[02]|40|[68]9"], "0$1"], ["(\\d{3})(\\d{3,12})", "$1 $2", ["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1", "2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"], "0$1"], ["(\\d{4})(\\d{2,11})", "$1 $2", ["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]", "[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["138"], "0$1"], ["(\\d{5})(\\d{2,10})", "$1 $2", ["3"], "0$1"], ["(\\d{3})(\\d{5,11})", "$1 $2", ["181"], "0$1"], ["(\\d{3})(\\d)(\\d{4,10})", "$1 $2 $3", ["1(?:3|80)|9"], "0$1"], ["(\\d{3})(\\d{7,8})", "$1 $2", ["1[67]"], "0$1"], ["(\\d{3})(\\d{7,12})", "$1 $2", ["8"], "0$1"], ["(\\d{5})(\\d{6})", "$1 $2", ["185", "1850", "18500"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{4})(\\d{7})", "$1 $2", ["18[68]"], "0$1"], ["(\\d{4})(\\d{7})", "$1 $2", ["15[1279]"], "0$1"], ["(\\d{5})(\\d{6})", "$1 $2", ["15[03568]", "15(?:[0568]|3[13])"], "0$1"], ["(\\d{3})(\\d{8})", "$1 $2", ["18"], "0$1"], ["(\\d{3})(\\d{2})(\\d{7,8})", "$1 $2 $3", ["1(?:6[023]|7)"], "0$1"], ["(\\d{4})(\\d{2})(\\d{7})", "$1 $2 $3", ["15[279]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{8})", "$1 $2 $3", ["15"], "0$1"]], "0", 0, 0, 0, 0, 0, [["32\\d{9,11}|49[1-6]\\d{10}|322\\d{6}|49[0-7]\\d{3,9}|(?:[34]0|[68]9)\\d{3,13}|(?:2(?:0[1-689]|[1-3569]\\d|4[0-8]|7[1-7]|8[0-7])|3(?:[3569]\\d|4[0-79]|7[1-7]|8[1-8])|4(?:1[02-9]|[2-48]\\d|5[0-6]|6[0-8]|7[0-79])|5(?:0[2-8]|[124-6]\\d|[38][0-8]|[79][0-7])|6(?:0[02-9]|[1-358]\\d|[47][0-8]|6[1-9])|7(?:0[2-8]|1[1-9]|[27][0-7]|3\\d|[4-6][0-8]|8[0-5]|9[013-7])|8(?:0[2-9]|1[0-79]|2\\d|3[0-46-9]|4[0-6]|5[013-9]|6[1-8]|7[0-8]|8[0-24-6])|9(?:0[6-9]|[1-4]\\d|[589][0-7]|6[0-8]|7[0-467]))\\d{3,12}", [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]], ["1(?:6[023]|7\\d)\\d{7,8}|15(?:[0-25-9]\\d\\d|3(?:10|33))\\d{6}", [10, 11]], ["800\\d{7,12}", [10, 11, 12, 13, 14, 15]], ["(?:137[7-9]|900(?:[135]|9\\d))\\d{6}", [10, 11]], ["700\\d{8}", [11]], ["1(?:6(?:013|255|399)|7(?:(?:[015]1|[69]3)3|[2-4]55|[78]99))\\d{7,8}|15(?:(?:[03-68]00|113)\\d|2\\d55|7\\d99|9\\d33)\\d{7}", [12, 13]], ["18(?:1\\d{5,11}|[2-9]\\d{8})", [8, 9, 10, 11, 12, 13, 14]], ["16(?:4\\d{1,10}|[89]\\d{1,11})", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]], 0, ["180\\d{5,11}|13(?:7[1-6]\\d\\d|8)\\d{4}", [7, 8, 9, 10, 11, 12, 13, 14]]]], DJ: ["253", "00", "(?:2\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[27]"]]], 0, 0, 0, 0, 0, 0, [["2(?:1[2-5]|7[45])\\d{5}"], ["77\\d{6}"]]], DK: ["45", "00", "[2-9]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, [["(?:2(?:[0-59][1-9]|[6-8]\\d)|3(?:[0-3][1-9]|4[13]|5[1-58]|6[1347-9]|7\\d|8[1-8]|9[1-79])|4(?:[0-25][1-9]|[34][2-9]|6[13-579]|7[13579]|8[1-47]|9[127])|5(?:[0-36][1-9]|4[146-9]|5[3-57-9]|7[568]|8[1-358]|9[1-69])|6(?:[0135][1-9]|2[1-68]|4[2-8]|6[1689]|[78]\\d|9[15689])|7(?:[0-69][1-9]|7[3-9]|8[147])|8(?:[16-9][1-9]|2[1-58])|9(?:[1-47-9][1-9]|6\\d))\\d{5}"], ["(?:2[6-8]|37|6[78]|96)\\d{6}|(?:2[0-59]|3[0-689]|[457]\\d|6[0-69]|8[126-9]|9[1-47-9])[1-9]\\d{5}"], ["80\\d{6}"], ["90\\d{6}"]]], DM: ["1", "011", "(?:[58]\\d\\d|767|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "767$1", 0, "767", [["767(?:2(?:55|66)|4(?:2[01]|4[0-25-9])|50[0-4])\\d{4}"], ["767(?:2(?:[2-4689]5|7[5-7])|31[5-7]|61[1-8]|70[1-6])\\d{4}"], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], DO: ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "8001|8[024]9", [["8(?:[04]9[2-9]\\d\\d|29(?:2(?:[0-59]\\d|6[04-9]|7[0-27]|8[0237-9])|3(?:[0-35-9]\\d|4[7-9])|[45]\\d\\d|6(?:[0-27-9]\\d|[3-5][1-9]|6[0135-8])|7(?:0[013-9]|[1-37]\\d|4[1-35689]|5[1-4689]|6[1-57-9]|8[1-79]|9[1-8])|8(?:0[146-9]|1[0-48]|[248]\\d|3[1-79]|5[01589]|6[013-68]|7[124-8]|9[0-8])|9(?:[0-24]\\d|3[02-46-9]|5[0-79]|60|7[0169]|8[57-9]|9[02-9])))\\d{4}"], ["8[024]9[2-9]\\d{6}"], ["800(?:14|[2-9]\\d)\\d{5}|8[024]9[01]\\d{6}|8(?:33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], DZ: ["213", "00", "(?:[1-4]|[5-79]\\d|80)\\d{7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-4]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["9"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-8]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["9619\\d{5}|(?:[1-3]\\d|4[013-689])\\d{6}"], ["5(?:4[0-29]|6[0-4])\\d{6}|(?:55|6\\d|7[7-9])\\d{7}", [9]], ["800\\d{6}", [9]], ["80[3-689]1\\d{5}", [9]], 0, 0, 0, 0, ["98[23]\\d{6}", [9]], ["80[12]1\\d{5}", [9]]]], EC: ["593", "00", "1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}", [8, 9, 10, 11], [["(\\d)(\\d{3})(\\d{4})", "$1 $2-$3", ["[2-7]"], "(0$1)", 0, "$1-$2-$3"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1"]]], "0", 0, 0, 0, 0, 0, [["[2-7][2-7]\\d{6}", [8]], ["964[0-2]\\d{5}|9(?:39|[57][89]|6[0-36-9]|[89]\\d)\\d{6}", [9]], ["1800\\d{7}|1[78]00\\d{6}", [10, 11]], 0, 0, 0, 0, 0, ["[2-7]890\\d{4}", [8]]]], EE: ["372", "00", "8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88", "[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]], ["(\\d{4})(\\d{3,4})", "$1 $2", ["[45]|8(?:00|[1-49])", "[45]|8(?:00[1-9]|[1-49])"]], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [["(?:3[23589]|4[3-8]|6\\d|7[1-9]|88)\\d{5}", [7]], ["(?:5\\d{5}|8(?:1(?:0(?:0(?:00|[178]\\d)|[3-9]\\d\\d)|(?:1(?:0[2-6]|1\\d)|[2-79]\\d\\d)\\d)|2(?:0(?:0(?:00|4\\d)|(?:19|[2-7]\\d)\\d)|(?:(?:[124-69]\\d|3[5-9])\\d|7(?:[0-79]\\d|8[013-9])|8(?:[2-6]\\d|7[01]))\\d)|[349]\\d{4}))\\d\\d|5(?:(?:[02]\\d|5[0-478])\\d|1(?:[0-8]\\d|95)|6(?:4[0-4]|5[1-589]))\\d{3}", [7, 8]], ["800(?:(?:0\\d\\d|1)\\d|[2-9])\\d{3}"], ["(?:40\\d\\d|900)\\d{4}", [7, 8]], ["70[0-2]\\d{5}", [8]]]], EG: ["20", "00", "[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}", [8, 9, 10], [["(\\d)(\\d{7,8})", "$1 $2", ["[23]"], "0$1"], ["(\\d{2})(\\d{6,7})", "$1 $2", ["1[35]|[4-6]|8[2468]|9[235-7]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{8})", "$1 $2", ["1"], "0$1"]], "0", 0, 0, 0, 0, 0, [["13[23]\\d{6}|(?:15|57)\\d{6,7}|(?:2\\d|3|4[05-8]|5[05]|6[24-689]|8[2468]|9[235-7])\\d{7}", [8, 9]], ["1[0-25]\\d{8}", [10]], ["800\\d{7}", [10]], ["900\\d{7}", [10]]]], EH: ["212", "00", "[5-8]\\d{8}", [9], 0, "0", 0, 0, 0, 0, 0, [["528[89]\\d{5}"], ["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|3[01]|5[0-5]))\\d{6}"], ["80[0-7]\\d{6}"], ["89\\d{7}"], 0, 0, 0, 0, ["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]], ER: ["291", "00", "[178]\\d{6}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[178]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:1(?:1[12568]|[24]0|55|6[146])|8\\d\\d)\\d{4}"], ["(?:17[1-3]|7\\d\\d)\\d{4}"]]], ES: ["34", "00", "(?:400|[5-9]\\d\\d)\\d{6}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]00"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[4-9]"]]], 0, 0, 0, 0, 0, 0, [["96906(?:0[0-8]|1[1-9]|[2-9]\\d)\\d\\d|9(?:69(?:0[0-57-9]|[1-9]\\d)|73(?:[0-8]\\d|9[1-9]))\\d{4}|(?:400|8(?:[1356]\\d|[28][0-8]|[47][1-9])|9(?:[135]\\d|[268][0-8]|4[1-9]|7[124-9]))\\d{6}"], ["96906(?:09|10)\\d\\d|(?:590(?:10[0-2]|600)|97390\\d)\\d{3}|(?:6\\d|7[1-48])\\d{7}"], ["[89]00\\d{6}"], ["80[367]\\d{6}"], ["70\\d{7}"], 0, ["51\\d{7}"], 0, 0, ["90[12]\\d{6}"]]], ET: ["251", "00", "(?:11|[2-57-9]\\d)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-57-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:11(?:[124]\\d\\d|3(?:[0-79]\\d|8[0-7])|5(?:[02-9]\\d|1[0-57-9])|6(?:[02-79]\\d|1[0-57-9]|8[0-8]))|2(?:2(?:11[1-9]|22[0-7]|33\\d|44[1467]|66[1-68])|5(?:11[124-6]|33[2-8]|44[1467]|55[14]|66[1-3679]|77[124-79]|880))|3(?:3(?:11[0-46-8]|(?:22|55)[0-6]|33[0134689]|44[04]|66[01467])|4(?:44[0-8]|55[0-69]|66[0-3]|77[1-5]))|4(?:6(?:119|22[0-24-7]|33[1-5]|44[13-69]|55[14-689]|660|88[1-4])|7(?:(?:11|22)[1-9]|33[13-7]|44[13-6]|55[1-689]))|5(?:7(?:227|55[05]|(?:66|77)[14-8])|8(?:11[149]|22[013-79]|33[0-68]|44[013-8]|550|66[1-5]|77\\d)))\\d{4}"], ["700[1-9]\\d{5}|(?:7(?:0[1-9]|1[0-8]|2[1-35-79]|3\\d|77|86|99)|(?:8[01]|9\\d)\\d)\\d{6}"]]], FI: ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{5})", "$1", ["20[2-59]"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1 $2", ["(?:[1-3]0|[68])0|70[07-9]"], "0$1"], ["(\\d{2})(\\d{4,8})", "$1 $2", ["[14]|2[09]|50|7[135]"], "0$1"], ["(\\d{2})(\\d{6,10})", "$1 $2", ["7"], "0$1"], ["(\\d)(\\d{4,9})", "$1 $2", ["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"], "0$1"]], "0", 0, 0, 0, 0, "1[03-79]|[2-9]", [["1[3-7][1-8]\\d{3,6}|(?:19[1-8]|[23568][1-8]\\d|9(?:00|[1-8]\\d))\\d{2,6}", [5, 6, 7, 8, 9]], ["4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}", [6, 7, 8, 9, 10]], ["800\\d{4,6}", [7, 8, 9]], ["[67]00\\d{5,6}", [8, 9]], 0, 0, ["20\\d{4,8}|60[12]\\d{5,6}|7(?:099\\d{4,5}|5[03-9]\\d{3,7})|20[2-59]\\d\\d|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:10|29|3[09]|70[1-5]\\d)\\d{4,8}"]], "00"], FJ: ["679", "0(?:0|52)", "45\\d{5}|(?:0800\\d|[235-9])\\d{6}", [7, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["[235-9]|45"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]]], 0, 0, 0, 0, 0, 0, [["603\\d{4}|(?:3[0-6]|6[25-7]|8[58])\\d{5}", [7]], ["(?:[279]\\d|45|5[01568]|8[034679])\\d{5}", [7]], ["0800\\d{7}", [11]]], "00"], FK: ["500", "00", "[2-7]\\d{4}", [5], 0, 0, 0, 0, 0, 0, 0, [["[2-47]\\d{4}"], ["[56]\\d{4}"]]], FM: ["691", "00", "(?:[39]\\d\\d|820)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[389]"]]], 0, 0, 0, 0, 0, 0, [["31(?:00[67]|208|309)\\d\\d|(?:3(?:[2357]0[1-9]|602|804|905)|(?:820|9[2-6]\\d)\\d)\\d{3}"], ["31(?:00[67]|208|309)\\d\\d|(?:3(?:[2357]0[1-9]|602|804|905)|(?:820|9[2-7]\\d)\\d)\\d{3}"]]], FO: ["298", "00", "[2-9]\\d{5}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2-9]"]]], 0, 0, "(10(?:01|[12]0|88))", 0, 0, 0, [["(?:20|[34]\\d|8[19])\\d{4}"], ["(?:[27][1-9]|5\\d|9[16])\\d{4}"], ["80[257-9]\\d{3}"], ["90(?:[13-5][15-7]|2[125-7]|9\\d)\\d\\d"], 0, 0, 0, 0, ["6[0-36]\\d{4}"]]], FR: ["33", "00", "[1-9]\\d{8}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0 $1"], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[1-79]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:26[013-9]|59[1-35-9])\\d{6}|(?:[13]\\d|2[0-57-9]|4[1-9]|5[0-8])\\d{7}"], ["(?:6(?:[0-24-8]\\d|3[0-8]|9[589])|7[3-9]\\d)\\d{6}"], ["80[0-5]\\d{6}"], ["836(?:0[0-36-9]|[1-9]\\d)\\d{4}|8(?:1[2-9]|2[2-47-9]|3[0-57-9]|[569]\\d|8[0-35-9])\\d{6}"], 0, 0, ["80[6-9]\\d{6}"], 0, ["9\\d{8}"], ["8(?:1[01]|2[0156]|4[024]|84)\\d{6}"]]], GA: ["241", "00", "(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}", [7, 8], [["(\\d)(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-7]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["11|[67]"], "0$1"]], 0, 0, "0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})", "$1", 0, 0, [["[01]1\\d{6}", [8]], ["(?:(?:0[2-7]|7[467])\\d|6(?:0[0-4]|10|[256]\\d))\\d{5}|[2-7]\\d{6}"]]], GB: ["44", "00", "[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}", [7, 9, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["800", "8001", "80011", "800111", "8001111"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["845", "8454", "84546", "845464"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["800"], "0$1"], ["(\\d{5})(\\d{4,5})", "$1 $2", ["1(?:38|5[23]|69|76|94)", "1(?:(?:38|69)7|5(?:24|39)|768|946)", "1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"], "0$1"], ["(\\d{4})(\\d{5,6})", "$1 $2", ["1(?:[2-69][02-9]|[78])"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[25]|7(?:0|6[02-9])", "[25]|7(?:0|6(?:[03-9]|2[356]))"], "0$1"], ["(\\d{4})(\\d{6})", "$1 $2", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1389]"], "0$1"]], "0", 0, "0|180020", 0, 0, 0, [["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}", [9, 10]], ["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}", [10]], ["80[08]\\d{7}|800\\d{6}|8001111"], ["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d", [7, 10]], ["70\\d{8}", [10]], 0, ["(?:3[0347]|55)\\d{8}", [10]], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", [10]], ["56\\d{8}", [10]]], 0, " x"], GD: ["1", "011", "(?:473|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "473$1", 0, "473", [["473(?:2(?:3[0-2]|69)|3(?:2[89]|86)|4(?:[06]8|3[5-9]|4[0-4]|5[59]|73|90)|63[68]|7(?:58|84)|800|938)\\d{4}"], ["473(?:4(?:0[2-79]|1[04-9]|2[0-5]|49|5[6-8])|5(?:2[01]|3[3-8])|901)\\d{4}"], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], GE: ["995", "00", "(?:[3-57]\\d\\d|800)\\d{6}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["32"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[57]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[348]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:3(?:[256]\\d|4[124-9]|7[0-4])|4(?:1\\d|2[2-7]|3[1-79]|4[2-8]|7[239]|9[1-7]))\\d{6}"], ["5(?:(?:(?:0555|1(?:[17]77|555))[5-9]|757(?:7[7-9]|8[01]))\\d|22252[0-4])\\d\\d|5(?:0(?:0(?:1[09]|70)|505)|1(?:0[01]0|1(?:07|33|51))|2(?:0[02]0|2[25]2)|3(?:0[03]0|3[35]3)|4(?:0[04]0|411)|5222|9000)[0-4]\\d{3}|(?:5(?:0(?:0(?:0\\d|1[12]|2[02]|3[0-6]|4[04]|5[05]|77|88|9[09])|(?:[14]\\d|77)\\d|22[02])|1(?:1(?:[03][01]|[124]\\d|5[02-6]|7[0-6])|4\\d\\d)|2(?:228|555)|3555|4(?:4(?:[02-9]\\d|14)|555)|5(?:[0157-9]\\d\\d|200|333|4(?:44|55))|6[89]\\d\\d|7(?:(?:[0147-9]\\d|22)\\d|5(?:00|[57]5))|8(?:0(?:[018]\\d|2[0-4])|5(?:55|8[89])|8(?:55|88))|9(?:090|[1-35-9]\\d\\d))|790\\d\\d)\\d{4}"], ["800\\d{6}"], 0, 0, 0, 0, 0, ["70[67]\\d{6}"]]], GF: ["594", "00", "(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-7]|80[6-9]|9[47]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[89]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:59(?:4(?:[02-49]\\d|1[0-5]|5[6-9]|6[0-3]|80)|88\\d)|80[6-9]\\d\\d)\\d{4}"], ["(?:694(?:[0-249]\\d|3[0-8])|7093[0-3])\\d{4}"], ["80[0-5]\\d{6}"], ["8[129]\\d{7}"], 0, 0, 0, 0, ["9(?:(?:396|76\\d)\\d|476[0-6])\\d{4}"]]], GG: ["44", "00", "(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?", [7, 9, 10], 0, "0", 0, "([25-9]\\d{5})$|0|180020", "1481$1", 0, 0, [["1481[25-9]\\d{5}", [10]], ["7(?:(?:781|839)\\d|911[17])\\d{5}", [10]], ["80[08]\\d{7}|800\\d{6}|8001111"], ["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d", [7, 10]], ["70\\d{8}", [10]], 0, ["(?:3[0347]|55)\\d{8}", [10]], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", [10]], ["56\\d{8}", [10]]]], GH: ["233", "00", "[235]\\d{8}|800\\d{5,6}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2358]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["3082[0-5]\\d{4}|3(?:0(?:[237]\\d|8[01])|[167](?:2[0-6]|7\\d|80)|2(?:2[0-5]|7\\d|80)|3(?:2[0-3]|7\\d|80)|4(?:2[013-9]|3[01]|7\\d|80)|5(?:2[0-7]|7\\d|80)|8(?:2[0-2]|7\\d|80)|9(?:[28]0|7\\d))\\d{5}", [9]], ["(?:2(?:[0346-9]\\d|5[67])|5(?:[03-7]\\d|9[1-9]))\\d{6}", [9]], ["800\\d{5,6}"]]], GI: ["350", "00", "(?:[25]\\d|60)\\d{6}", [8], [["(\\d{3})(\\d{5})", "$1 $2", ["2"]]], 0, 0, 0, 0, 0, 0, [["2190[0-2]\\d{3}|2(?:0(?:[02]\\d|3[01])|16[24-9]|2[2-5]\\d)\\d{4}"], ["5251[0-4]\\d{3}|(?:5(?:[146-8]\\d\\d|250)|60(?:1[01]|6\\d))\\d{4}"]]], GL: ["299", "00", "(?:19|[2-689]\\d|70)\\d{4}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["19|[2-9]"]]], 0, 0, 0, 0, 0, 0, [["(?:19|3[1-7]|[68][1-9]|70|9\\d)\\d{4}"], ["[245]\\d{5}"], ["80\\d{4}"], 0, 0, 0, 0, 0, ["3[89]\\d{4}"]]], GM: ["220", "00", "[48]\\d{8}|[2-9]\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["[235-9]|4(?:[0-35]|4[16-9])"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[48]"]]], 0, 0, 0, 0, 0, 0, [["(?:4(?:[23]\\d\\d|4(?:1[024679]|(?:4(?:[237-9]\\d|4[14-9])|8[0-389]\\d)\\d|5(?:5(?:3\\d|4[0-7])|[67]\\d\\d)))|5(?:5(?:3\\d|4[0-7])|6[67]\\d|7(?:1[04]|2[035]|3[58]|48))|8[0-389]\\d\\d)\\d{3}|44[6-9]\\d{4}"], ["(?:(?:[23679]\\d|4[015]|8(?:(?:3[35]|6[68]|99)\\d|7(?:[27]\\d|4[015])))\\d|5(?:[0-489]\\d|56))\\d{4}|8[4-7]\\d{5}"]]], GN: ["224", "00", "722\\d{6}|(?:3|6\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["3"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[67]"]]], 0, 0, 0, 0, 0, 0, [["3(?:0(?:24|3[12]|4[1-35-7]|5[13]|6[189]|[78]1|9[1478])|1\\d\\d)\\d{4}", [8]], ["6[0-356]\\d{7}", [9]], 0, 0, 0, 0, 0, 0, ["722\\d{6}", [9]]]], GP: ["590", "00", "7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-79]|80[6-9]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"], ["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"], ["80[0-5]\\d{6}"], ["8[129]\\d{7}"], 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]], GQ: ["240", "00", "222\\d{6}|(?:3\\d|55|[89]0)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235]"]], ["(\\d{3})(\\d{6})", "$1 $2", ["[89]"]]], 0, 0, 0, 0, 0, 0, [["33[0-24-9]\\d[46]\\d{4}|3(?:33|5\\d)\\d[7-9]\\d{4}"], ["(?:222|55\\d)\\d{6}"], ["80\\d[1-9]\\d{5}"], ["90\\d[1-9]\\d{5}"]]], GR: ["30", "00", "5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}", [10, 11, 12], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["21|7"]], ["(\\d{4})(\\d{6})", "$1 $2", ["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2689]"]], ["(\\d{3})(\\d{3,4})(\\d{5})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [["2(?:1\\d\\d|2(?:2[1-46-9]|[36][1-8]|4[1-7]|5[1-4]|7[1-5]|[89][1-9])|3(?:1\\d|2[1-57]|[35][1-3]|4[13]|7[1-7]|8[124-6]|9[1-79])|4(?:1\\d|2[1-8]|3[1-4]|4[13-5]|6[1-578]|9[1-5])|5(?:1\\d|[29][1-4]|3[1-5]|4[124]|5[1-6])|6(?:1\\d|[269][1-6]|3[1245]|4[1-7]|5[13-9]|7[14]|8[1-5])|7(?:1\\d|2[1-5]|3[1-6]|4[1-7]|5[1-57]|6[135]|9[125-7])|8(?:1\\d|2[1-5]|[34][1-4]|9[1-57]))\\d{6}", [10]], ["68[57-9]\\d{7}|(?:69|94)\\d{8}", [10]], ["800\\d{7,9}"], ["90[19]\\d{7}", [10]], ["70\\d{8}", [10]], 0, ["5005000\\d{3}", [10]], 0, 0, ["8(?:0[16]|12|[27]5|50)\\d{7}", [10]]]], GT: ["502", "00", "80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}", [8, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[2-8]"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]], 0, 0, 0, 0, 0, 0, [["[267][2-9]\\d{6}", [8]], ["(?:[3-5]\\d\\d|80[0-4])\\d{5}", [8]], ["18[01]\\d{8}", [11]], ["19\\d{9}", [11]]]], GU: ["1", "011", "(?:[58]\\d\\d|671|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "671$1", 0, "671", [["671(?:2\\d\\d|3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[02-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[478])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[16-9]))\\d{4}"], [""], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], GW: ["245", "00", "[49]\\d{8}|4\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["40"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"]]], 0, 0, 0, 0, 0, 0, [["443\\d{6}", [9]], ["9(?:5\\d|6[569]|77)\\d{6}", [9]], 0, 0, 0, 0, 0, 0, ["40\\d{5}", [7]]]], GY: ["592", "001", "(?:[2-8]\\d{3}|9008)\\d{3}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, [["(?:2(?:1[6-9]|2[0-35-9]|3[1-4]|5[3-9]|6\\d|7[0-79])|3(?:2[25-9]|3\\d)|4(?:4[0-24]|5[56])|50[0-6]|77[1-57])\\d{4}"], ["(?:51[01]|6\\d\\d|7(?:[0-5]\\d|6[0-79]|70|8[067]))\\d{4}"], ["(?:289|8(?:00|6[28]|88|99))\\d{4}"], ["9008\\d{3}"], 0, 0, 0, 0, ["515\\d{4}"]]], HK: ["852", "00(?:30|5[09]|[126-9]?)", "8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}", [5, 6, 7, 8, 9, 11], [["(\\d{3})(\\d{2,5})", "$1 $2", ["900", "9003"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{3})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]], 0, 0, 0, 0, 0, 0, [["(?:2(?:[13-9]\\d|2[013-9])\\d|3(?:(?:[1569][0-24-9]|4[0-246-9]|7[0-24-69])\\d|8(?:4[0-8]|[579]\\d|6[0-5]))|58(?:0[1-9]|1[2-9]))\\d{4}", [8]], ["(?:4(?:0(?:6[0-3]|9[3-6])|24[3-6]|44[0-35-9]|6(?:4[0-57-9]|6[0-6])|7(?:4[0-48]|6[0-5]))|5(?:25[3-7]|35[4-8]|73[0-6]|95[0-8])|6(?:26[013-8]|(?:66|78)[0-5])|70(?:7[1-8]|8[0-8])|84(?:4[0-2]|8[0-35-9])|9(?:29[013-9]|39[014-9]|59[0-467]|899))\\d{4}|(?:4(?:4[0-35-9]|6[0-357-9]|7[0-35])|5(?:[1-59][0-46-9]|6[0-4689]|7[0-246-9])|6(?:0[1-9]|[13-59]\\d|[268][0-57-9]|7[0-79])|70[1-59]|84[0-39]|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}", [8]], ["800\\d{6}", [9]], ["900(?:[0-24-9]\\d{7}|3\\d{1,4})", [5, 6, 7, 8, 11]], ["8(?:1[0-4679]\\d|2(?:[0-36]\\d|7[0-4])|3(?:[034]\\d|2[09]|70))\\d{4}", [8]], 0, ["30(?:0[1-9]|[15-7]\\d|2[047]|89)\\d{4}", [8]], ["7(?:1(?:0[0-48]|1[0-3679]|3[013]|69|9[0136])|2(?:[02389]\\d|1[18]|7[27-9])|3(?:[0-38]\\d|7[0-369]|9[2357-9])|47\\d|5(?:[178]\\d|5[0-5])|6(?:0[0-7]|2[236-9]|[35]\\d)|7(?:[27]\\d|8[7-9])|8(?:[23689]\\d|7[1-9])|9(?:[025]\\d|6[0-246-8]|7[0-36-9]|8[238]))\\d{4}", [8]]], "00"], HN: ["504", "00", "8\\d{10}|[237-9]\\d{7}", [8, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["[237-9]"]]], 0, 0, 0, 0, 0, 0, [["2(?:2(?:0[0-59]|1[1-9]|[23]\\d|4[02-8]|5[57]|6[2458]|7[0135689]|8[01346-9]|9[0-2])|4(?:0[578]|2[3-59]|3[13-9]|4[0-68]|5[1-3589]|80)|5(?:0[2357-9]|1[1-6]|4[03-58]|5\\d|6[014-69]|7[04]|80)|6(?:[056]\\d|17|2[067]|3[047]|4[0-378]|[78][0-8]|9[01])|7(?:0[5-79]|2[01]|6[46-9]|7[02-9]|8[034]|91)|8(?:79|8[0-357-9]|9[1-57-9]))\\d{4}", [8]], ["[37-9]\\d{7}", [8]], ["8002\\d{7}", [11]]]], HR: ["385", "00", "[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}", [7, 8, 9], [["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["6[01]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{4})(\\d{3})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6|7[245]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-57]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["1\\d{7}|(?:2[0-3]|3[1-5]|4[02-47-9]|5[1-3])\\d{6,7}", [8, 9]], ["9(?:(?:0[1-9]|[12589]\\d)\\d\\d|7(?:[0679]\\d\\d|5(?:[01]\\d|44|55|77|9[5-79])))\\d{4}|98\\d{6}", [8, 9]], ["80\\d{5,7}"], ["6[01459]\\d{6}|6[01]\\d{5}", [7, 8]], ["7[45]\\d{6}", [8]], 0, ["62\\d{6,7}|72\\d{6}", [8, 9]]]], HT: ["509", "00", "[2-589]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["[2-589]"]]], 0, 0, 0, 0, 0, 0, [["2(?:2\\d|5[1-5]|81|9[149])\\d{5}"], ["(?:[34]\\d|5[568])\\d{6}"], ["8\\d{7}"], 0, 0, 0, 0, 0, ["9(?:[67][0-4]|8[0-3589]|9\\d)\\d{5}"]]], HU: ["36", "00", "[235-7]\\d{8}|[1-9]\\d{7}", [8, 9], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "(06 $1)"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"], "(06 $1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "06 $1"]], "06", 0, 0, 0, 0, 0, [["(?:1\\d|[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6[23689]|8[2-57-9]|9[2-69])\\d{6}", [8]], ["(?:[257]0|3[01])\\d{7}", [9]], ["(?:[48]0\\d|680[29])\\d{5}"], ["9[01]\\d{6}", [8]], 0, 0, ["38\\d{7}", [9]], 0, ["21\\d{7}", [9]]]], ID: ["62", "00[89]", "00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}", [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["15"]], ["(\\d{2})(\\d{5,9})", "$1 $2", ["2[124]|[36]1"], "(0$1)"], ["(\\d{3})(\\d{5,7})", "$1 $2", ["800"], "0$1"], ["(\\d{3})(\\d{5,8})", "$1 $2", ["[2-79]"], "(0$1)"], ["(\\d{3})(\\d{3,4})(\\d{3})", "$1-$2-$3", ["8[1-35-9]"], "0$1"], ["(\\d{3})(\\d{6,8})", "$1 $2", ["1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["804"], "0$1"], ["(\\d{3})(\\d)(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["80"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1-$2-$3", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["2[124]\\d{7,8}|619\\d{8}|2(?:1(?:14|500)|2\\d{3})\\d{3}|61\\d{5,8}|(?:2(?:[35][1-4]|6[0-8]|7[1-6]|8\\d|9[1-8])|3(?:1|[25][1-8]|3[1-68]|4[1-3]|6[1-3568]|7[0-469]|8\\d)|4(?:0[1-589]|1[01347-9]|2[0-36-8]|3[0-24-68]|43|5[1-378]|6[1-5]|7[134]|8[1245])|5(?:1[1-35-9]|2[25-8]|3[124-9]|4[1-3589]|5[1-46]|6[1-8])|6(?:[25]\\d|3[1-69]|4[1-6])|7(?:02|[125][1-9]|[36]\\d|4[1-8]|7[0-36-9])|9(?:0[12]|1[013-8]|2[0-479]|5[125-8]|6[23679]|7[159]|8[01346]))\\d{5,8}", [7, 8, 9, 10, 11]], ["8[1-35-9]\\d{7,10}", [9, 10, 11, 12]], ["00(?:1803\\d{5,11}|7803\\d{7})|(?:177\\d|800)\\d{5,7}", [8, 9, 10, 11, 12, 13, 14, 15, 16, 17]], ["809\\d{7}", [10]], 0, 0, ["(?:1500|8071\\d{3})\\d{3}", [7, 10]], 0, 0, ["804\\d{7}", [10]]]], IE: ["353", "00", "(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}", [7, 8, 9, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["2[24-9]|47|58|6[237-9]|9[35-9]"], "(0$1)"], ["(\\d{3})(\\d{5})", "$1 $2", ["[45]0"], "(0$1)"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["1"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2569]|4[1-69]|7[14]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["81"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[78]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["4"], "(0$1)"], ["(\\d{2})(\\d)(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:1\\d|21)\\d{6,7}|(?:2[24-9]|4(?:0[24]|5\\d|7)|5(?:0[45]|1\\d|8)|6(?:1\\d|[237-9])|9(?:1\\d|[35-9]))\\d{5}|(?:23|4(?:[1-469]|8\\d)|5[23679]|6[4-6]|7[14]|9[04])\\d{7}"], ["8(?:22|[35-9]\\d)\\d{6}", [9]], ["1800\\d{6}", [10]], ["15(?:1[2-8]|[2-8]0|9[089])\\d{6}", [10]], ["700\\d{6}", [9]], ["88210[1-9]\\d{4}|8(?:[35-79]5\\d\\d|8(?:[013-9]\\d\\d|2(?:[01][1-9]|[2-9]\\d)))\\d{5}", [10]], ["818\\d{6}", [9]], 0, ["76\\d{7}", [9]], ["18[59]0\\d{6}", [10]]]], IL: ["972", "0(?:0|1(?:05|[2-9]))", "1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}", [7, 8, 9, 10, 11, 12], [["(\\d{4})(\\d{3})", "$1-$2", ["125"]], ["(\\d{4})(\\d{2})(\\d{2})", "$1-$2-$3", ["121"]], ["(\\d)(\\d{3})(\\d{4})", "$1-$2-$3", ["[2-489]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["[57]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1-$2-$3", ["12"]], ["(\\d{4})(\\d{6})", "$1-$2", ["159"]], ["(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3-$4", ["1[7-9]"]], ["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})", "$1-$2 $3-$4", ["15"]]], "0", 0, 0, 0, 0, 0, [["153\\d{8,9}|29[1-9]\\d{5}|(?:2[0-8]|[3489]\\d)\\d{6}", [8, 11, 12]], ["55(?:4(?:0[0-3]|10|6[015-9])|57[0-289]|8[06][0-2])\\d{4}|5(?:(?:[0-2][02-9]|[36]\\d|[49][2-9]|8[3-7])\\d|5(?:01|2\\d|3[0-3]|4[3-5]|5[0-25689]|6[6-8]|7[0-267]|8[7-9]|9[1-9]))\\d{5}", [9]], ["1(?:255|80[019]\\d{3})\\d{3}", [7, 10]], ["1212\\d{4}|1(?:200|9(?:0[0-2]|19|9\\d))\\d{6}", [8, 10]], 0, ["151\\d{8,9}", [11, 12]], ["1599\\d{6}", [10]], 0, ["7(?:280[01]|38(?:[05]\\d|8[01358])|8(?:33|55|77|81)\\d)\\d{4}|7(?:18|2[23]|3[237]|47|6[258]|7\\d|82|9[2-9])\\d{6}", [9]], ["1700\\d{6}", [10]]]], IM: ["44", "00", "1624\\d{6}|(?:[3578]\\d|90)\\d{8}", [10], 0, "0", 0, "([25-8]\\d{5})$|0|180020", "1624$1", 0, "74576|(?:16|7[56])24", [["1624(?:230|[5-8]\\d\\d)\\d{3}"], ["76245[06]\\d{4}|7(?:4576|[59]24\\d|624[0-4689])\\d{5}"], ["808162\\d{4}"], ["8(?:440[49]06|72299\\d)\\d{3}|(?:8(?:45|70)|90[0167])624\\d{4}"], ["70\\d{8}"], 0, ["3440[49]06\\d{3}|(?:3(?:08162|3\\d{4}|45624|7(?:0624|2299))|55\\d{4})\\d{4}"], 0, ["56\\d{8}"]]], IN: ["91", "00", "(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}", [8, 9, 10, 11, 12, 13], [["(\\d{8})", "$1", ["5(?:0|2[23]|3[03]|[67]1|88)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"], 0, 1], ["(\\d{4})(\\d{4,5})", "$1 $2", ["180", "1800"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["140"], 0, 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["11|2[02]|33|4[04]|79[1-7]|80[2-46]", "11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])", "11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[14]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31)|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|8(?:16|2[014]|3[126]|6[136]|7[78]|83)(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"], "0$1", 1], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|3[129]|5[29]|6[02-5]|70)|807", "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]", "1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"], "0$1", 1], ["(\\d{5})(\\d{5})", "$1 $2", ["16|[6-9]"], "0$1", 1], ["(\\d{4})(\\d{2,4})(\\d{4})", "$1 $2 $3", ["18[06]", "18[06]0"], 0, 1], ["(\\d{4})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["18"], 0, 1]], "0", 0, 0, 0, 0, 0, [["271795\\d{4}|(?:2717[2-7]|6828[235-7]|7979[1-6])\\d{5}|(?:271[0-689]|682[0-79]|782[0-6])[2-7]\\d{5}|(?:170[24]|2(?:(?:[02][2-79]|90)\\d|80[13468])|(?:3(?:23|80)|683)\\d|4(?:20[24]|72[2-8])|552[1-7]|79(?:[1-6]\\d|71))\\d{6}|(?:11|33|4[04]|80)[2-7]\\d{7}|(?:342|674|788)(?:[0189][2-7]|[2-7]\\d)\\d{5}|(?:1(?:2[0-249]|3[0-25]|4[145]|[59][14]|6[014]|7[1257]|8[01346])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568]|9[14])|3(?:26|4[13]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[014-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|2[14]|3[134]|4[47]|5[15]|[67]1)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91))[2-7]\\d{6}|(?:1(?:2[35-8]|3[346-9]|4[236-9]|[59][0235-9]|6[235-9]|7[34689]|8[257-9])|2(?:1[134689]|3[24-8]|4[2-8]|5[25689]|6[2-4679]|7[3-79]|8[2-479]|9[235-9])|3(?:01|1[79]|2[1245]|4[5-8]|5[125689]|6[235-7]|7[157-9]|8[2-46-8])|4(?:1[14578]|2[5689]|3[2-467]|5[4-7]|6[35]|73|8[2689]|9[2389])|5(?:[16][146-9]|2[14-8]|3[1346]|4[14-69]|5[46]|7[2-4]|8[2-8]|9[246])|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[14-6])|7(?:1[013-9]|2[0235-9]|3[2679]|4[1-35689]|5[2-46-9]|[67][02-9]|8[013-7]|90)|8(?:1[1357-9]|2[235-8]|3[03-57-9]|4[0-24-9]|5\\d|6[2457-9]|7[1-6]|8[1256]|9[2-4]))\\d[2-7]\\d{5}", [10]], ["(?:6(?:1279|828[01489])|7(?:887[02-9]|9(?:313|79[07-9]))|8(?:079[04-9]|(?:84|91)7[02-8]))\\d{5}|(?:160[01]|6(?:(?:12|[2-4]1|5[17]|6[13]|80)[0189]|7(?:1[0189]|86))|7(?:1(?:2[0189]|9[0-5])|3(?:2[5-8]|[34][017-9]|9[016-9])|5(?:[15][017-9]|2[04-9]|9[7-9])|6(?:0[0-47]|1[0-257-9]|2[0-4]|3[19]|5[4589])|70[0289]|88[089]|97[02-8])|8(?:0(?:6[67]|7[02-8])|70[017-9]|84[01489]|91[0-289]))\\d{6}|(?:731|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[0189]\\d|7[02-8])\\d{5}|(?:6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|4[0189]|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-5])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]|881))[0189]\\d{5}|(?:6(?:[09]\\d|1[04679]|2[03689]|3[05-9]|4[0489]|50|6[069]|7[07]|8[7-9])|7(?:[024]\\d|3[05-8]|5[0346-8]|6[6-9]|7[1-9]|8[0-79]|9[089])|8(?:0[01589]|1[0-57-9]|2[235-9]|3[03-57-9]|[45]\\d|6[02457-9]|7[1-69]|8[0-25-9]|9[02-9])|9\\d\\d)\\d{7}", [10]], ["000800\\d{7}|180(?:0\\d{4,9}|3\\d{9})"], ["186[12]\\d{9}", [13]], 0, 0, ["140\\d{7}", [10]], 0, 0, ["1860\\d{7}", [11]]]], IO: ["246", "00", "3\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["3"]]], 0, 0, 0, 0, 0, 0, [["37\\d{5}"], ["38\\d{5}"]]], IQ: ["964", "00", "(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-6]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"]], "0", 0, 0, 0, 0, 0, [["1\\d{7}|(?:2[13-5]|3[02367]|4[023]|5[03]|6[026])\\d{6,7}", [8, 9]], ["7[3-9]\\d{8}", [10]]]], IR: ["98", "00", "[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}", [4, 5, 6, 7, 10], [["(\\d{4,5})", "$1", ["96"], "0$1"], ["(\\d{2})(\\d{4,5})", "$1 $2", ["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[1-8]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])(?:[03-57]\\d{7}|[16]\\d{3}(?:\\d{4})?|[289]\\d{3}(?:\\d(?:\\d{3})?)?)|94(?:000[09]|(?:12\\d|30[0-2])\\d|2(?:[02689]0\\d|121)|4(?:111|40\\d))\\d{4}", [6, 7, 10]], ["9(?:(?:0[0-5]|[13]\\d|2[0-3])\\d\\d|9(?:[0-46]\\d\\d|5(?:10|5\\d)|8(?:[12]\\d|3[0-2]|88)|9(?:[01359]\\d|21|69|77|8[7-9])))\\d{5}", [10]], 0, 0, 0, 0, ["96(?:0[12]|2[16-8]|3(?:08|[14]5|[23]|66)|4(?:0|80)|5[01]|6[89]|86|9[19])", [4, 5]]]], IS: ["354", "00|1(?:0(?:01|[12]0)|100)", "(?:38\\d|[4-9])\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["[4-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["3"]]], 0, 0, 0, 0, 0, 0, [["(?:4(?:1[0-24-69]|2[0-7]|[37][0-8]|4[0-24589]|5[0-68]|6\\d|8[0-36-8])|5(?:05|[156]\\d|2[02578]|3[0-579]|4[03-7]|7[0-2578]|8[0-35-9]|9[013-689])|872)\\d{4}", [7]], ["(?:38[589]\\d\\d|6(?:1[1-8]|2[0-6]|3[026-9]|4[014679]|5[0159]|6[0-69]|70|8[06-8]|9\\d)|7(?:5[057]|[6-9]\\d)|8(?:2[0-59]|[3-69]\\d|8[238]))\\d{4}"], ["80[0-8]\\d{4}", [7]], ["90(?:0\\d|1[5-79]|2[015-79]|3[135-79]|4[125-7]|5[25-79]|7[1-37]|8[0-35-7])\\d{3}", [7]], 0, ["(?:689|8(?:7[18]|80)|95[48])\\d{4}", [7]], ["809\\d{4}", [7]], 0, ["49[0-24-79]\\d{4}", [7]]], "00"], IT: ["39", "00", "0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?", [6, 7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{4,6})", "$1 $2", ["0[26]"]], ["(\\d{3})(\\d{3,6})", "$1 $2", ["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])", "0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]], ["(\\d{4})(\\d{2,6})", "$1 $2", ["0(?:[13-579][2-46-8]|8[236-8])"]], ["(\\d{4})(\\d{4})", "$1 $2", ["894"]], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[26]|5"]], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1(?:44|[679])|[378]|43"]], ["(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[13-57-9][0159]|14"]], ["(\\d{2})(\\d{4})(\\d{5})", "$1 $2 $3", ["0[26]"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["[03]"]]], 0, 0, 0, 0, 0, 0, [["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"], ["3[2-9]\\d{7,8}|(?:31|43)\\d{8}", [9, 10]], ["80(?:0\\d{3}|3)\\d{3}", [6, 9]], ["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}", [6, 8, 9, 10]], ["1(?:78\\d|99)\\d{6}", [9, 10]], ["3[2-8]\\d{9,10}", [11, 12]], 0, 0, ["55\\d{8}", [10]], ["84(?:[08]\\d{3}|[17])\\d{3}", [6, 9]]]], JE: ["44", "00", "1534\\d{6}|(?:[3578]\\d|90)\\d{8}", [10], 0, "0", 0, "([0-24-8]\\d{5})$|0|180020", "1534$1", 0, 0, [["1534[0-24-8]\\d{5}"], ["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"], ["80(?:07(?:35|81)|8901)\\d{4}"], ["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"], ["701511\\d{4}"], 0, ["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"], ["56\\d{8}"]]], JM: ["1", "011", "(?:[58]\\d\\d|658|900)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "658|876", [["8766060\\d{3}|(?:658(?:2(?:[5-8]\\d|9[0-46-9])|[3-9]\\d\\d)|876(?:52[35]|6(?:0[1-3579]|1[0235-9]|[23]\\d|40|5[06]|6[2-589]|7[0-25-9]|8[04]|9[4-9])|7(?:0[2-689]|[1-6]\\d|8[056]|9[45])|9(?:0[1-8]|1[02378]|[2-8]\\d|9[2-468])))\\d{4}"], ["(?:6582(?:[0-4]\\d|95)|876(?:2(?:0[1-9]|[13-9]\\d|2[013-9])|[348]\\d\\d|5(?:0[1-9]|[1-9]\\d)|6(?:4[89]|6[67])|7(?:0[07]|7\\d|8[1-47-9]|9[0-36-9])|9(?:[01]9|9[0579])))\\d{4}"], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], JO: ["962", "00", "(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}", [8, 9], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2356]|87"], "(0$1)"], ["(\\d{3})(\\d{5,6})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["70"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[47]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["87(?:000|90[01])\\d{3}|(?:2(?:6(?:2[0-35-9]|3[0-578]|4[24-7]|5[0-24-8]|[6-8][023]|9[0-3])|7(?:0[1-79]|10|2[014-7]|3[0-689]|4[019]|5[0-3578]))|32(?:0[1-69]|1[1-35-7]|2[024-7]|3\\d|4[0-3]|[5-7][023])|53(?:0[0-3]|[13][023]|2[0-59]|49|5[0-35-9]|6[15]|7[45]|8[1-6]|9[0-36-9])|6(?:2(?:[05]0|22)|3(?:00|33)|4(?:0[0-25]|1[2-7]|2[0569]|[38][07-9]|4[025689]|6[0-589]|7\\d|9[0-2])|5(?:[01][056]|2[034]|3[0-57-9]|4[178]|5[0-69]|6[0-35-9]|7[1-379]|8[0-68]|9[0239]))|87(?:20|7[078]|99))\\d{4}", [8]], ["(?:427|7(?:11|[29]\\d|[78][0-25-9]))\\d{6}", [9]], ["80\\d{6}", [8]], ["9\\d{7}", [8]], ["70\\d{7}", [9]], 0, ["8(?:10|8\\d)\\d{5}", [8]], ["74(?:66|77)\\d{5}", [9]], 0, ["85\\d{6}", [8]]]], JP: ["81", "010", "00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}", [8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [["(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3", ["(?:12|57|99)0"], "0$1"], ["(\\d{4})(\\d)(\\d{4})", "$1-$2-$3", ["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])", "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]", "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["60"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2-$3", ["3|4(?:2[09]|7[01])|6[1-9]", "3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])", "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]", "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3", ["[14]|[289][2-9]|5[3-9]|7[2-4679]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["800"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[25-9]"], "0$1"]], "0", 0, "(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0", "$1", 0, 0, [["(?:1(?:1[235-8]|2[3-6]|3[3-9]|4[2-6]|[58][2-8]|6[2-7]|7[2-9]|9[1-9])|(?:2[2-9]|[36][1-9])\\d|4(?:[2-578]\\d|6[02-8]|9[2-59])|5(?:[2-589]\\d|6[1-9]|7[2-8])|7(?:[25-9]\\d|3[4-9]|4[02-9])|8(?:[2679]\\d|3[2-9]|4[5-9]|5[1-9]|8[03-9])|9(?:[2-58]\\d|[679][1-9]))\\d{6}", [9]], ["[6-9]0[1-9]\\d{7}", [10]], ["00777(?:[01]|5\\d)\\d\\d|(?:00(?:7778|882[1245])|(?:120|800\\d)\\d\\d)\\d{4}|00(?:37|66|78)\\d{6,13}"], ["990\\d{6}", [9]], ["60\\d{7}", [9]], 0, ["570\\d{6}", [9]], ["20\\d{8}", [10]], ["50[1-9]\\d{7}", [10]]]], KE: ["254", "000", "(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}", [7, 8, 9, 10], [["(\\d{2})(\\d{5,7})", "$1 $2", ["[24-6]"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["[17]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:4[245]|5[1-79]|6[01457-9])\\d{5,7}|(?:4[136]|5[08]|62)\\d{7}|(?:[24]0|66)\\d{6,7}", [7, 8, 9]], ["(?:1(?:0[0-8]|[18]\\d|2[014]|30|4[0-5])|7\\d\\d)\\d{6}", [9]], ["800[02-8]\\d{5,6}", [9, 10]], ["900[02-9]\\d{5}", [9]]]], KG: ["996", "00", "8\\d{9}|[235-9]\\d{8}", [9, 10], [["(\\d{4})(\\d{5})", "$1 $2", ["3(?:1[346]|[24-79])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235-79]|88"], "0$1"], ["(\\d{3})(\\d{3})(\\d)(\\d{2,3})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["312(?:5[0-79]\\d|9(?:[0-689]\\d|7[0-24-9]))\\d{3}|(?:3(?:1(?:2[0-46-8]|3[1-9]|47|[56]\\d)|2(?:22|3[0-479]|6[0-7])|4(?:22|5[6-9]|6\\d)|5(?:22|3[4-7]|59|6\\d)|6(?:22|5[35-7]|6\\d)|7(?:22|3[468]|4[1-9]|59|[67]\\d)|9(?:22|4[1-8]|6\\d))|6(?:09|12|2[2-4])\\d)\\d{5}", [9]], ["312(?:58\\d|973)\\d{3}|(?:2(?:0[0-35]|2\\d)|5[0-24-7]\\d|600|7(?:[07]\\d|55)|88[08]|9(?:12|9[05-9]))\\d{6}", [9]], ["800\\d{6,7}"]]], KH: ["855", "00[14-9]", "1\\d{9}|[1-9]\\d{7,8}", [8, 9, 10], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-9]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0", 0, 0, 0, 0, 0, [["23(?:4(?:[2-4]|[56]\\d)|[568]\\d\\d)\\d{4}|23[236-9]\\d{5}|(?:2[4-6]|3[2-6]|4[2-4]|[5-7][2-5])(?:(?:[237-9]|4[56]|5\\d)\\d{5}|6\\d{5,6})", [8, 9]], ["(?:(?:1[28]|3[18]|9[67])\\d|6[016-9]|7(?:[07-9]|[16]\\d)|8(?:[013-79]|8\\d))\\d{6}|(?:1\\d|9[0-57-9])\\d{6}|(?:2[3-6]|3[2-6]|4[2-4]|[5-7][2-5])48\\d{5}", [8, 9]], ["1800(?:1\\d|2[019])\\d{4}", [10]], ["1900(?:1\\d|2[09])\\d{4}", [10]]]], KI: ["686", "00", "(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}", [5, 8], 0, "0", 0, 0, 0, 0, 0, [["(?:[24]\\d|3[1-9]|50|65(?:02[12]|12[56]|22[89]|[3-5]00)|7(?:27\\d\\d|3100|5(?:02[12]|12[56]|22[89]|[34](?:00|81)|500))|8[0-5])\\d{3}"], ["(?:6200[01]|7(?:310[1-9]|5(?:02[03-9]|12[0-47-9]|22[0-7]|[34](?:0[1-9]|8[02-9])|50[1-9])))\\d{3}|(?:63\\d\\d|7(?:(?:[0146-9]\\d|2[0-689])\\d|3(?:[02-9]\\d|1[1-9])|5(?:[0-2][013-9]|[34][1-79]|5[1-9]|[6-9]\\d)))\\d{4}", [8]], 0, 0, 0, 0, 0, 0, ["30(?:0[01]\\d\\d|12(?:11|20))\\d\\d", [8]]]], KM: ["269", "00", "[3478]\\d{6}", [7], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[3478]"]]], 0, 0, 0, 0, 0, 0, [["7[4-7]\\d{5}"], ["[34]\\d{6}"], 0, ["8\\d{6}"]]], KN: ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "869$1", 0, "869", [["869(?:2(?:29|36)|302|4(?:6[015-9]|70)|56[5-7])\\d{4}"], ["869(?:48[89]|55[6-8]|66\\d|76[02-7])\\d{4}"], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], KP: ["850", "00|99", "85\\d{6}|(?:19\\d|[2-7])\\d{7}", [8, 10], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:(?:195|2)\\d|3[19]|4[159]|5[37]|6[17]|7[39]|85)\\d{6}"], ["19[1-3]\\d{7}", [10]]]], KR: ["82", "00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))", "00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}", [5, 6, 8, 9, 10, 11, 12, 13, 14], [["(\\d{2})(\\d{3,4})", "$1-$2", ["(?:3[1-3]|[46][1-4]|5[1-5])1"], "0$1"], ["(\\d{4})(\\d{4})", "$1-$2", ["1"]], ["(\\d)(\\d{3,4})(\\d{4})", "$1-$2-$3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["[36]0|8"], "0$1"], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1-$2-$3", ["[1346]|5[1-5]"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[57]"], "0$1"], ["(\\d{2})(\\d{5})(\\d{4})", "$1-$2-$3", ["5"], "0$1"]], "0", 0, "0(8(?:[1-46-8]|5\\d\\d))?", 0, 0, 0, [["(?:2|3[1-3]|[46][1-4]|5[1-5])[1-9]\\d{6,7}|(?:3[1-3]|[46][1-4]|5[1-5])1\\d{2,3}", [5, 6, 8, 9, 10]], ["1(?:05(?:[0-8]\\d|9[0-6])|22[13]\\d)\\d{4,5}|1(?:0[0-46-9]|[16-9]\\d|2[013-9])\\d{6,7}", [9, 10]], ["00(?:308\\d{6,7}|798\\d{7,9})|(?:00368|[38]0)\\d{7}", [9, 11, 12, 13, 14]], ["60[2-9]\\d{6}", [9]], ["50\\d{8,9}", [10, 11]], 0, ["1(?:5(?:22|33|44|66|77|88|99)|6(?:[07]0|44|6[0168]|88)|8(?:00|33|55|77|99))\\d{4}", [8]], ["15\\d{7,8}", [9, 10]], ["70\\d{8}", [10]]]], KW: ["965", "00", "18\\d{5}|(?:[2569]\\d|41)\\d{6}", [7, 8], [["(\\d{4})(\\d{3,4})", "$1 $2", ["[169]|2(?:[235]|4[1-35-9])|52"]], ["(\\d{3})(\\d{5})", "$1 $2", ["[245]"]]], 0, 0, 0, 0, 0, 0, [["2(?:[23]\\d\\d|4(?:[1-35-9]\\d|44)|5(?:0[034]|[2-46]\\d|5[1-3]|7[1-7]))\\d{4}", [8]], ["(?:41\\d\\d|5(?:(?:[05]\\d|1[0-7]|6[56])\\d|2(?:22|5[25])|7(?:55|77)|88[58])|6(?:(?:0[034679]|5[015-9]|6\\d)\\d|1(?:00|11|6[16])|2[26]2|3[36]3|4[46]4|7(?:0[013-9]|[67]\\d)|8[68]8|9(?:[069]\\d|3[039]))|9(?:(?:[04679]\\d|8[057-9])\\d|1(?:00|1[01]|99)|2(?:00|2\\d)|3(?:00|3[03])|5(?:00|5\\d)))\\d{4}", [8]], ["18\\d{5}", [7]]]], KY: ["1", "011", "(?:345|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "345$1", 0, "345", [["345(?:2(?:22|3[23]|44|66)|333|444|6(?:23|38|40)|7(?:30|4[35-79]|6[6-9]|77)|8(?:00|1[45]|4[89]|88)|9(?:14|4[035-9]))\\d{4}"], ["345(?:32[1-9]|4(?:1[2-6]|2[0-4])|5(?:1[67]|2[5-79]|4[6-9]|50|76)|649|82[56]|9(?:1[679]|2[2-9]|3[06-9]|90))\\d{4}"], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["(?:345976|900[2-9]\\d\\d)\\d{4}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], KZ: ["7", "810", "8\\d{13}|[78]\\d{9}", [10, 14], 0, "8", 0, 0, 0, 0, "7", [["7(?:1(?:0(?:[23]\\d|4[0-3]|59|63)|1(?:[23]\\d|4[0-79]|59)|2(?:[23]\\d|59)|3(?:2\\d|3[0-79]|4[0-35-9]|59)|4(?:[24]\\d|3[013-9]|5[1-9]|97)|5(?:2\\d|3[1-9]|4[0-7]|59)|6(?:[2-4]\\d|5[19]|61)|72\\d|8(?:[27]\\d|3[1-46-9]|4[0-5]|59))|2(?:1(?:[23]\\d|4[46-9]|5[3469])|2(?:2\\d|3[0679]|46|5[12679])|3(?:[2-4]\\d|5[139])|4(?:2\\d|3[1-35-9]|59)|5(?:[23]\\d|4[0-8]|59|61)|6(?:2\\d|3[1-9]|4[0-4]|59)|7(?:[2379]\\d|40|5[279])|8(?:[23]\\d|4[0-3]|59)|9(?:2\\d|3[124578]|59)))\\d{5}", [10]], ["7(?:0[0-25-8]|47|6[0-4]|7[15-8]|85)\\d{7}", [10]], ["8(?:00|108\\d{3})\\d{7}"], ["809\\d{7}", [10]], ["808\\d{7}", [10]], 0, 0, 0, ["751\\d{7}", [10]]], "8~10"], LA: ["856", "00", "[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}", [8, 9, 10], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["2[13]|3[14]|[4-8]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["3"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[23]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:2[13]|[35-7][14]|41|8[1468])\\d{6}", [8]], ["(?:20(?:[23579]\\d|8[78])|30[24]\\d)\\d{6}|30\\d{7}", [9, 10]]]], LB: ["961", "00", "[27-9]\\d{7}|[13-9]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27-9]"]]], "0", 0, 0, 0, 0, 0, [["7(?:62|8[0-6]|9[04-9])\\d{4}|(?:[14-69]\\d|2(?:[14-69]\\d|[78][1-9])|7[2-57]|8[02-9])\\d{5}"], ["(?:(?:3|81)\\d|7(?:[01]\\d|6[013-9]|8[7-9]|9[0-4]))\\d{5}"], 0, ["9[01]\\d{6}", [8]], 0, 0, 0, 0, 0, ["80\\d{6}", [8]]]], LC: ["1", "011", "(?:[58]\\d\\d|758|900)\\d{7}", [10], 0, "1", 0, "([2-8]\\d{6})$|1", "758$1", 0, "758", [["758(?:234|4(?:30|5\\d|6[2-9]|8[0-2])|57[0-2]|(?:63|75)8)\\d{4}"], ["758(?:28[4-7]|384|4(?:6[01]|8[4-9])|5(?:1[89]|20|84)|7(?:1[2-9]|2\\d|3[0-3])|812)\\d{4}"], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], LI: ["423", "00", "[68]\\d{8}|(?:[2378]\\d|90)\\d{5}", [7, 9], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2379]|8(?:0[09]|7)", "[2379]|8(?:0(?:02|9)|7)"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["69"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]]], "0", 0, "(1001)|0", 0, 0, 0, [["(?:2(?:01|1[27]|2[024]|3\\d|6[02-578]|96)|3(?:[24]0|33|7[0135-7]|8[048]|9[0269]))\\d{4}", [7]], ["(?:6(?:(?:4[5-9]|5\\d)\\d|6(?:[024-68]\\d|1[01]|3[7-9]|7[02]))\\d|7(?:[37-9]\\d|42|56))\\d{4}"], ["8002[28]\\d\\d|80(?:05\\d|9)\\d{4}"], ["90(?:02[258]|1(?:23|3[14])|66[136])\\d\\d", [7]], 0, ["697(?:42|56|[78]\\d)\\d{4}", [9]], ["870(?:28|87)\\d\\d", [7]]]], LK: ["94", "00", "[1-9]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[1-689]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:12[2-9]|602|8[12]\\d|9(?:1\\d|22|9[245]))\\d{6}|(?:11|2[13-7]|3[1-8]|4[157]|5[12457]|6[35-7])[2-57]\\d{6}"], ["7(?:[0-25-8]\\d|4[0-4])\\d{6}"], 0, 0, 0, 0, ["1973\\d{5}"]]], LR: ["231", "00", "(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}", [7, 8, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["4[67]|[56]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-578]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["2\\d{7}", [8]], ["(?:(?:(?:22|33)0|555|7(?:6[01]|7\\d)|88\\d)\\d|4(?:240|[67]))\\d{5}|[56]\\d{6}", [7, 9]], 0, ["332(?:02|[34]\\d)\\d{4}", [9]]]], LS: ["266", "00", "(?:[256]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2568]"]]], 0, 0, 0, 0, 0, 0, [["2\\d{7}"], ["[56]\\d{7}"], ["800[1256]\\d{4}"]]], LT: ["370", "00", "(?:[3469]\\d|52|[78]0)\\d{6}", [8], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["52[0-7]"], "(0-$1)", 1], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0 $1", 1], ["(\\d{2})(\\d{6})", "$1 $2", ["37|4(?:[15]|6[1-8])"], "(0-$1)", 1], ["(\\d{3})(\\d{5})", "$1 $2", ["[3-6]"], "(0-$1)", 1]], "0", 0, "[08]", 0, 0, 0, [["(?:3[1478]|4[124-6]|52)\\d{6}"], ["6\\d{7}"], ["80[02]\\d{5}"], ["9(?:0[0239]|10)\\d{5}"], ["70[05]\\d{5}"], 0, ["70[67]\\d{5}"], 0, ["[89]01\\d{5}"], ["808\\d{5}"]]], LU: ["352", "00", "35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}", [4, 5, 6, 7, 8, 9, 10, 11], [["(\\d{2})(\\d{3})", "$1 $2", ["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]], ["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["20[2-689]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", "$1 $2 $3 $4", ["20"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})", "$1 $2 $3 $4", ["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["80[01]|90[015]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["20"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", "$1 $2 $3 $4 $5", ["20"]]], 0, 0, "(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)", 0, 0, 0, [["(?:35[013-9]|80[2-9]|90[89])\\d{1,8}|(?:2[2-9]|3[0-46-9]|[457]\\d|8[13-9]|9[2-579])\\d{2,9}"], ["6(?:[26][18]|5[1568]|7[189]|81|9[128])\\d{6}", [9]], ["800\\d{5}", [8]], ["90[015]\\d{5}", [8]], 0, 0, 0, 0, ["20(?:1\\d{5}|[2-689]\\d{1,7})", [4, 5, 6, 7, 8, 9, 10]], ["801\\d{5}", [8]]]], LV: ["371", "00", "(?:[268]\\d|78|90)\\d{6}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2679]|8[01]"]]], 0, 0, 0, 0, 0, 0, [["6\\d{7}"], ["2333[0-8]\\d{3}|2(?:[0-24-9]\\d\\d|3(?:0[07]|[14-9]\\d|2[02-9]|3[0-24-9]))\\d{4}"], ["80\\d{6}"], ["90\\d{6}"], 0, 0, 0, 0, 0, ["81\\d{6}"]]], LY: ["218", "00", "[2-9]\\d{8}", [9], [["(\\d{2})(\\d{7})", "$1-$2", ["[2-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:2(?:0[56]|[1-6]\\d|7[124579]|8[124])|3(?:1\\d|2[2356])|4(?:[17]\\d|2[1-357]|5[2-4]|8[124])|5(?:[1347]\\d|2[1-469]|5[13-5]|8[1-4])|6(?:[1-479]\\d|5[2-57]|8[1-5])|7(?:[13]\\d|2[13-79])|8(?:[124]\\d|5[124]|84))\\d{6}"], ["9[1-6]\\d{7}"]]], MA: ["212", "00", "[5-8]\\d{8}", [9], [["(\\d{4})(\\d{5})", "$1-$2", ["892"], "0$1"], ["(\\d{2})(\\d{7})", "$1-$2", ["8(?:0[0-7]|9)"], "0$1"], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[5-8]"], "0$1"]], "0", 0, 0, 0, 0, "[5-8]", [["5(?:(?:18|4[0679]|5[03])\\d|2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-9])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9]))\\d{5}"], ["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|3[01]|5[0-5]))\\d{6}"], ["80[0-7]\\d{6}"], ["89\\d{7}"], 0, 0, 0, 0, ["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]], MC: ["377", "00", "(?:[3489]|[67]\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["4"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[389]"]], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[67]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:870|9[2-47-9]\\d)\\d{5}", [8]], ["4(?:[46]\\d|5[1-9])\\d{5}|(?:3|[67]\\d)\\d{7}"], ["(?:800|90\\d)\\d{5}", [8]]]], MD: ["373", "00", "(?:[235-7]\\d|[89]0)\\d{6}", [8], [["(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["22|3"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[25-7]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:(?:2[1-9]|3[1-79])\\d|5(?:33|5[257]))\\d{5}"], ["562\\d{5}|(?:6\\d|7[16-9])\\d{6}"], ["800\\d{5}"], ["90[056]\\d{5}"], 0, 0, ["803\\d{5}"], 0, ["3[08]\\d{6}"], ["808\\d{5}"]]], ME: ["382", "00", "(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:20[2-8]|3(?:[0-2][2-7]|3[24-7])|4(?:0[2-467]|1[2467])|5(?:0[2467]|1[24-7]|2[2-467]))\\d{5}", [8]], ["6(?:[07-9]\\d|3[024]|6[0-25])\\d{5}", [8]], ["80(?:[0-2578]|9\\d)\\d{5}"], ["9(?:4[1568]|5[178])\\d{5}", [8]], 0, 0, ["77[1-9]\\d{5}", [8]], 0, ["78[1-49]\\d{5}", [8]]]], MF: ["590", "00", "7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"], ["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"], ["80[0-5]\\d{6}"], ["8[129]\\d{7}"], 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]], MG: ["261", "00", "[23]\\d{8}", [9], [["(\\d{2})(\\d{2})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["[23]"], "0$1"]], "0", 0, "([24-9]\\d{6})$|0", "20$1", 0, 0, [["2072[29]\\d{4}|20(?:2\\d|4[47]|5[3467]|6[279]|7[356]|8[268]|9[2457])\\d{5}"], ["3[2-9]\\d{7}"], 0, 0, 0, 0, 0, 0, ["22\\d{7}"]]], MH: ["692", "011", "329\\d{4}|(?:[256]\\d|45)\\d{5}", [7], [["(\\d{3})(\\d{4})", "$1-$2", ["[2-6]"]]], "1", 0, 0, 0, 0, 0, [["(?:247|528|625)\\d{4}"], ["(?:(?:23|54)5|329|45[35-8])\\d{4}"], 0, 0, 0, 0, 0, 0, ["635\\d{4}"]]], MK: ["389", "00", "[2-578]\\d{7}", [8], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["2|34[47]|4(?:[37]7|5[47]|64)"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[347]"], "0$1"], ["(\\d{3})(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[58]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:(?:2(?:62|77)0|3444)\\d|4[56]440)\\d{3}|(?:34|4[357])700\\d{3}|(?:2(?:[0-3]\\d|5[0-578]|6[01]|82)|3(?:1[3-68]|[23][2-68]|4[23568])|4(?:[23][2-68]|4[3-68]|5[2568]|6[25-8]|7[24-68]|8[4-68]))\\d{5}"], ["7(?:3555|(?:474|9[019]7)7)\\d{3}|7(?:[0-25-8]\\d\\d|3(?:[1-478]\\d|6[01])|4(?:2\\d|60|7[01578])|9(?:[2-4]\\d|5[01]|7[015]))\\d{4}"], ["800\\d{5}"], ["5\\d{7}"], 0, 0, 0, 0, 0, ["8(?:0[1-9]|[1-9]\\d)\\d{5}"]]], ML: ["223", "00", "[24-9]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24-9]"]]], 0, 0, 0, 0, 0, 0, [["2(?:07[0-8]|12[67])\\d{4}|(?:2(?:02|1[4-689])|4(?:0[0-4]|4[1-69]))\\d{5}"], ["2(?:0(?:01|79)|17\\d)\\d{4}|(?:5[0-3]|[679]\\d|8[2-59])\\d{6}"], ["80\\d{6}"]]], MM: ["95", "00", "1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}", [6, 7, 8, 9, 10], [["(\\d)(\\d{2})(\\d{3})", "$1 $2 $3", ["16|2"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"], "0$1"], ["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[12]|452|678|86", "[12]|452|6788|86"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[4-7]|8[1-35]"], "0$1"], ["(\\d)(\\d{3})(\\d{4,6})", "$1 $2 $3", ["9(?:2[0-4]|[35-9]|4[137-9])"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["92"], "0$1"], ["(\\d)(\\d{5})(\\d{4})", "$1 $2 $3", ["9"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:1(?:(?:12|[28]\\d|3[56]|7[3-6]|9[0-6])\\d|4(?:2[29]|7[0-2]|83)|6)|2(?:2(?:00|8[34])|4(?:0\\d|22|7[0-2]|83)|51\\d\\d)|4(?:2(?:2\\d\\d|48[013])|3(?:20\\d|4(?:70|83)|56)|420\\d|5(?:2\\d|470))|6(?:0(?:[23]|88\\d)|(?:124|[56]2\\d)\\d|2472|3(?:20\\d|470)|4(?:2[04]\\d|472)|7(?:3\\d\\d|4[67]0|8(?:[01459]\\d|8))))\\d{4}|5(?:2(?:2\\d{5,6}|47[02]\\d{4})|(?:3472|4(?:2(?:1|86)|470)|522\\d|6(?:20\\d|483)|7(?:20\\d|48[01])|8(?:20\\d|47[02])|9(?:20\\d|470))\\d{4})|7(?:(?:0470|4(?:25\\d|470)|5(?:202|470|96\\d))\\d{4}|1(?:20\\d{4,5}|4(?:70|83)\\d{4}))|8(?:1(?:2\\d{5,6}|4(?:10|7[01]\\d)\\d{3})|2(?:2\\d{5,6}|(?:320|490\\d)\\d{3})|(?:3(?:2\\d\\d|470)|4[24-7]|5(?:(?:2\\d|51)\\d|4(?:[1-35-9]\\d|4[0-57-9]))|6[23])\\d{4})|(?:1[2-6]\\d|4(?:2[24-8]|3[2-7]|[46][2-6]|5[3-5])|5(?:[27][2-8]|3[2-68]|4[24-8]|5[23]|6[2-4]|8[24-7]|9[2-7])|6(?:[19]20|42[03-6]|(?:52|7[45])\\d)|7(?:[04][24-8]|[15][2-7]|22|3[2-4])|8(?:1[2-689]|2[2-8]|(?:[35]2|64)\\d))\\d{4}|25\\d{5,6}|(?:2[2-9]|6(?:1[2356]|[24][2-6]|3[24-6]|5[2-4]|6[2-8]|7[235-7]|8[245]|9[24])|8(?:3[24]|5[245]))\\d{4}", [6, 7, 8, 9]], ["(?:17[01]|9(?:2(?:[0-4]|[56]\\d\\d)|(?:3(?:[0-36]|4\\d)|(?:6\\d|8[89]|9[4-8])\\d|7(?:3|40|[5-9]\\d))\\d|4(?:(?:[0245]\\d|[1379])\\d|88)|5[0-6])\\d)\\d{4}|9[69]1\\d{6}|9(?:[68]\\d|9[089])\\d{5}", [7, 8, 9, 10]], ["80080(?:0[1-9]|2\\d)\\d{3}", [10]], 0, 0, 0, 0, 0, ["1333\\d{4}", [8]]]], MN: ["976", "001", "[12]\\d{7,9}|[5-9]\\d{7}", [8, 9, 10], [["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["11|2[16]"], "0$1"], ["(\\d{4})(\\d{4})", "$1 $2", ["[5-9]"]], ["(\\d{3})(\\d{5,6})", "$1 $2", ["[12]2[1-3]"], "0$1"], ["(\\d{4})(\\d{5,6})", "$1 $2", ["[12](?:27|3[2-8]|4[2-68]|5[1-4689])", "[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"], "0$1"], ["(\\d{5})(\\d{4,5})", "$1 $2", ["[12]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["[12](?:2[1-3]|(?:3[2-8]|4[2-68]|5[1-4689])\\d)\\d{5,6}|7(?:0(?:[0-5]\\d|7[078]|80)|128)\\d{4}|[12]27\\d{6}|(?:11|2[16]|5[368])\\d{6}"], ["(?:87[01]|92[0139])\\d{5}|(?:5[05]|6[069]|7[28]|8[0135689]|9[013-9])\\d{6}", [8]], 0, 0, 0, 0, 0, 0, ["712[0-79]\\d{4}|7(?:1[013-9]|[5-79]\\d)\\d{5}", [8]]]], MO: ["853", "00", "0800\\d{3}|(?:28|[68]\\d)\\d{6}", [7, 8], [["(\\d{4})(\\d{3})", "$1 $2", ["0"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[268]"]]], 0, 0, 0, 0, 0, 0, [["(?:28[2-9]|8(?:11|[2-57-9]\\d))\\d{5}", [8]], ["6800[0-79]\\d{3}|6(?:[235]\\d\\d|6(?:0[0-5]|[1-9]\\d)|8(?:0[1-9]|[14-8]\\d|2[5-9]|[39][0-4]))\\d{4}", [8]], ["0800\\d{3}", [7]]]], MP: ["1", "011", "[58]\\d{9}|(?:67|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "670$1", 0, "670", [["670(?:2(?:3[3-7]|56|8[4-8])|32[1-38]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}"], [""], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], MQ: ["596", "00", "7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-79]|8(?:0[6-9]|[36])"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:59(?:6(?:[03-7]\\d|1[05]|2[7-9]|8[0-39]|9[04-9])|89\\d)|80[6-9]\\d\\d|9(?:477[6-9]|767[4589]))\\d{4}"], ["(?:69[67]\\d\\d|7091[0-3])\\d{4}"], ["80[0-5]\\d{6}"], ["8[129]\\d{7}"], 0, 0, 0, 0, ["9(?:397[0-3]|477[0-5]|76(?:6\\d|7[0-367]))\\d{4}"]]], MR: ["222", "00", "(?:[2-4]\\d\\d|800)\\d{5}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-48]"]]], 0, 0, 0, 0, 0, 0, [["(?:25[08]|35\\d|45[1-7])\\d{5}"], ["[2-4][0-46-9]\\d{6}"], ["800\\d{5}"]]], MS: ["1", "011", "(?:[58]\\d\\d|664|900)\\d{7}", [10], 0, "1", 0, "([34]\\d{6})$|1", "664$1", 0, "664", [["6644(?:1[0-3]|91)\\d{4}"], ["664(?:3(?:49|9[1-6])|49[2-6])\\d{4}"], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], MT: ["356", "00", "3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2357-9]"]]], 0, 0, 0, 0, 0, 0, [["20(?:3[1-4]|6[059])\\d{4}|2(?:0[19]|[1-357]\\d|60)\\d{5}"], ["(?:7(?:210|[79]\\d\\d)|9(?:[29]\\d\\d|69[67]|8(?:1[1-3]|89|97)))\\d{4}"], ["800(?:02|[3467]\\d)\\d{3}"], ["5(?:0(?:0(?:37|43)|(?:6\\d|70|9[0168])\\d)|[12]\\d0[1-5])\\d{3}"], 0, 0, ["501\\d{5}"], ["7117\\d{4}"], ["3550\\d{4}"]]], MU: ["230", "0(?:0|[24-7]0|3[03])", "(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-46]|8[013]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[57]"]], ["(\\d{5})(\\d{5})", "$1 $2", ["8"]]], 0, 0, 0, 0, 0, 0, [["(?:2(?:[0346-8]\\d|1[0-8])|4(?:[013568]\\d|2[0-24-8]|71|90)|54(?:[3-5]\\d|71)|6\\d\\d|8(?:14|3[129]))\\d{4}", [7, 8]], ["5(?:4(?:2[1-389]|7[1-9])|87[15-8])\\d{4}|(?:5(?:2[5-9]|4[3-689]|[57]\\d|8[0-689]|9[0-8])|7(?:0[0-7]|3[013]))\\d{5}", [8]], ["802\\d{7}|80[0-2]\\d{4}", [7, 10]], ["30\\d{5}", [7]], 0, 0, 0, ["219\\d{4}", [7]], ["3(?:20|9\\d)\\d{4}", [7]]], "020"], MV: ["960", "0(?:0|19)", "(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}", [7, 10], [["(\\d{3})(\\d{4})", "$1-$2", ["[34679]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"]]], 0, 0, 0, 0, 0, 0, [["(?:3(?:0[0-4]|3[0-59])|6(?:[58][024689]|6[024-68]|7[02468]))\\d{4}", [7]], ["(?:46[46]|[79]\\d\\d)\\d{4}", [7]], ["800\\d{7}", [10]], ["900\\d{7}", [10]], 0, 0, ["4(?:0[01]|50)\\d{4}", [7]]], "00"], MW: ["265", "00", "(?:[1289]\\d|31|77)\\d{7}|1\\d{6}", [7, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["1[2-9]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-37-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["1[2-9]\\d{5}", [7]], ["111\\d{6}|(?:2[12]|31|77|[89][89])\\d{7}", [9]]]], MX: ["52", "0[09]", "[2-9]\\d{9}", [10], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["33|5[56]|81"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, [["(?:2(?:0[01]|2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[267][1-9]|3[1-8]|[45]\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-36-9]|6[0-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}"], ["(?:2(?:2\\d|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[267][1-9]|3[1-8]|[45]\\d|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-36-9]|6[0-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1346][1-9]|[27]\\d|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[0-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69]\\d|7[12]|8[1-8]))\\d{7}"], ["8(?:00|88)\\d{7}"], ["900\\d{7}"], ["500\\d{7}"], 0, 0, 0, 0, ["300\\d{7}"]], "00"], MY: ["60", "00", "1\\d{8,9}|(?:3\\d|[4-9])\\d{7}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1-$2 $3", ["[4-79]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1-$2 $3", ["1(?:[02469]|[378][1-9]|53)|8", "1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2 $3", ["3"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3-$4", ["1(?:[367]|80)"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2 $3", ["15"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2 $3", ["1"], "0$1"]], "0", 0, 0, 0, 0, 0, [["427[01]\\d{4}|(?:3(?:2[0-36-9]|3[0-368]|4[0-278]|5[0-24-8]|6[0-467]|7[1246-9]|8\\d|9[0-57])\\d|4(?:2[0-689]|[3-79]\\d|8[1-35689])|5(?:2[0-589]|[3468]\\d|5[0-489]|7[1-9]|9[23])|6(?:2[2-9]|3[1357-9]|[46]\\d|5[0-6]|7[0-35-9]|85|9[015-8])|7(?:[2579]\\d|3[03-68]|4[0-8]|6[5-9]|8[0-35-9])|8(?:[24][2-8]|3[2-5]|5[2-7]|6[2-589]|7[2-578]|[89][2-9])|9(?:0[57]|13|[25-7]\\d|[3489][0-8]))\\d{5}", [8, 9]], ["1(?:(?:1888[689]|4400|8(?:47|8[27])[0-4])\\d{4}|9\\d{7,8})|1(?:0(?:[23568]\\d|4[0-6]|7[016-9]|9[0-8])|1(?:[1-5]\\d\\d|6(?:0[5-9]|[1-9]\\d)|7(?:[0-4]\\d|5[0-79]|6[02-4]|8[02-5]))|(?:[26]\\d|[37][1-9]|4[235-9])\\d|5(?:31|9\\d\\d)|8(?:1[23]|[236]\\d|4[06]|5(?:46|[7-9])|7[016-9]|8[01]|9[0-8]))\\d{5}", [9, 10]], ["1[378]00\\d{6}", [10]], ["1600\\d{6}", [10]], 0, 0, 0, 0, ["15(?:4(?:6[0-4]\\d|8(?:0[125]|[17]\\d|21|3[01]|4[01589]|5[014]|6[02]))|6(?:32[0-6]|78\\d))\\d{4}", [10]]]], MZ: ["258", "00", "(?:2|8\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2|8[2-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [["2(?:[1346]\\d|5[0-2]|[78][12]|93)\\d{5}", [8]], ["8[2-9]\\d{7}", [9]], ["800\\d{6}", [9]]]], NA: ["264", "00", "[68]\\d{7,8}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["87"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["64426\\d{3}|6(?:1(?:2[2-7]|3[01378]|4[0-4])|254|32[0237]|4(?:27|41|5[25])|52[236-8]|626|7(?:2[2-4]|30))\\d{4,5}|6(?:1(?:(?:0\\d|2[0189]|3[24-69]|4[5-9])\\d|17|69|7[014])|2(?:17|5[0-36-8]|69|70)|3(?:17|2[14-689]|34|6[289]|7[01]|81)|4(?:17|2[0-2]|4[06]|5[0137]|69|7[01])|5(?:17|2[0459]|69|7[01])|6(?:17|25|38|42|69|7[01])|7(?:17|2[569]|3[13]|6[89]|7[01]))\\d{4}"], ["(?:60|8[1245])\\d{7}", [9]], ["80\\d{7}", [9]], ["8701\\d{5}", [9]], 0, 0, 0, 0, ["8(?:3\\d\\d|86)\\d{5}"]]], NC: ["687", "00", "(?:050|[2-57-9]\\d\\d)\\d{3}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1.$2.$3", ["[02-57-9]"]]], 0, 0, 0, 0, 0, 0, [["(?:2[03-9]|3[0-5]|4[1-7]|88)\\d{4}"], ["(?:[579]\\d|8[0-79])\\d{4}"], ["050\\d{3}"], ["36\\d{4}"]]], NE: ["227", "00", "[027-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["08"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[089]|2[013]|7[0467]"]]], 0, 0, 0, 0, 0, 0, [["2(?:0(?:20|3[1-8]|4[13-5]|5[14]|6[14578]|7[1-578])|1(?:4[145]|5[14]|6[14-68]|7[169]|88))\\d{4}"], ["(?:23|7[0467]|[89]\\d)\\d{6}"], ["08\\d{6}"], ["09\\d{6}"]]], NF: ["672", "00", "[13]\\d{5}", [6], [["(\\d{2})(\\d{4})", "$1 $2", ["1[0-3]"]], ["(\\d)(\\d{5})", "$1 $2", ["[13]"]]], 0, 0, "([0-258]\\d{4})$", "3$1", 0, 0, [["(?:1(?:06|17|28|39)|3[0-2]\\d)\\d{3}"], ["(?:14|3[58])\\d{4}"]]], NG: ["234", "009", "(?:20|9\\d)\\d{8}|[78]\\d{9,13}", [10, 11, 12, 13, 14], [["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[7-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["20[129]"], "0$1"], ["(\\d{4})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["[78]"], "0$1"], ["(\\d{3})(\\d{5})(\\d{5,6})", "$1 $2 $3", ["[78]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["20(?:[1259]\\d|3[013-9]|4[1-8]|6[024-689]|7[1-79]|8[2-9])\\d{6}", [10]], ["(?:702[0-24-9]|819[01])\\d{6}|(?:7(?:0[13-9]|[12]\\d)|8(?:0[1-9]|1[0-8])|9(?:0[1-9]|1[1-6]))\\d{7}", [10]], ["800\\d{7,11}"], 0, 0, 0, ["700\\d{7,11}"]]], NI: ["505", "00", "(?:1800|[25-8]\\d{3})\\d{4}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[125-8]"]]], 0, 0, 0, 0, 0, 0, [["2\\d{7}"], ["(?:5(?:5[0-7]|[78]\\d)|6(?:20|3[035]|4[045]|5[05]|77|8[1-9]|9[059])|(?:7[5-8]|8\\d)\\d)\\d{5}"], ["1800\\d{4}"]]], NL: ["31", "00", "(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}", [5, 6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{4,7})", "$1 $2", ["[89]0"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["66"], "0$1"], ["(\\d)(\\d{8})", "$1 $2", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-578]|91"], "0$1"], ["(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3", ["9"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:1(?:[035]\\d|1[13-578]|6[124-8]|7[24]|8[0-467])|2(?:[0346]\\d|2[2-46-9]|5[125]|9[479])|3(?:[03568]\\d|1[3-8]|2[01]|4[1-8])|4(?:[0356]\\d|1[1-368]|7[58]|8[15-8]|9[23579])|5(?:[0358]\\d|[19][1-9]|2[1-57-9]|4[13-8]|6[126]|7[0-3578])|7\\d\\d)\\d{6}", [9]], ["(?:6[1-58]|970\\d)\\d{7}", [9, 11]], ["800\\d{4,7}", [7, 8, 9, 10]], ["90[069]\\d{4,7}", [7, 8, 9, 10]], 0, 0, ["140(?:1[035]|2[0346]|3[03568]|4[0356]|5[0358]|8[458])|(?:140(?:1[16-8]|2[259]|3[124]|4[17-9]|5[124679]|7)|8[478]\\d{6})\\d", [5, 6, 9]], ["66\\d{7}", [9]], ["(?:85|91)\\d{7}", [9]]]], NO: ["47", "00", "(?:0|[2-9]\\d{3})\\d{4}", [5, 8], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-79]"]]], 0, 0, 0, 0, 0, "[02-689]|7[0-8]", [["(?:2[1-4]|3[1-3578]|5[1-35-7]|6[1-46-9]|7[0-8])\\d{6}", [8]], ["45(?:[0-24-9]\\d|3[0-57-9])\\d{4}|(?:4[016-8]|9\\d)\\d{6}", [8]], ["80[01]\\d{5}", [8]], ["82[09]\\d{5}", [8]], ["880\\d{5}", [8]], ["81[23]\\d{5}", [8]], ["(?:0[235-9]|81(?:0(?:0[7-9]|1\\d)|5\\d\\d))\\d{3}"], 0, ["85[0-5]\\d{5}", [8]], ["810(?:0[0-6]|[2-8]\\d)\\d{3}", [8]]]], NP: ["977", "00", "(?:1\\d|9)\\d{9}|[1-9]\\d{7}", [8, 10, 11], [["(\\d)(\\d{7})", "$1-$2", ["1[2-6]"], "0$1"], ["(\\d{2})(\\d{6})", "$1-$2", ["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"], "0$1"], ["(\\d{3})(\\d{7})", "$1-$2", ["9"]]], "0", 0, 0, 0, 0, 0, [["(?:1[0-6]\\d|99[02-6])\\d{5}|(?:2[13-79]|3[135-8]|4[146-9]|5[135-7]|6[13-9]|7[15-9]|8[1-46-9]|9[1-7])[2-6]\\d{5}", [8]], ["9(?:00|6[0-3]|7[0-24-6]|8[0-24-68])\\d{7}", [10]], ["1(?:66001|800\\d\\d)\\d{5}", [11]]]], NR: ["674", "00", "(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[24-9]"]]], 0, 0, 0, 0, 0, 0, [["444\\d{4}"], ["(?:222|55[3-9]|666|777|8\\d\\d|999)\\d{4}"]]], NU: ["683", "00", "(?:[4-7]|888\\d)\\d{3}", [4, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["8"]]], 0, 0, 0, 0, 0, 0, [["[47]\\d{3}", [4]], ["(?:[56]|888[1-9])\\d{3}"]]], NZ: ["64", "0(?:0|161)", "[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}", [5, 6, 7, 8, 9, 10], [["(\\d{2})(\\d{3,8})", "$1 $2", ["8[1-79]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["50[036-8]|8|90", "50(?:[0367]|88)|8|90"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["24|[346]|7[2-57-9]|9[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2(?:10|74)|[589]"], "0$1"], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["1|2[028]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,5})", "$1 $2 $3", ["2(?:[169]|7[0-35-9])|7"], "0$1"]], "0", 0, 0, 0, 0, 0, [["240\\d{5}|(?:3[2-79]|[49][2-9]|6[235-9]|7[2-57-9])\\d{6}", [8]], ["2(?:[0-27-9]\\d|6)\\d{6,7}|2(?:1\\d|75)\\d{5}", [8, 9, 10]], ["508\\d{6,7}|80\\d{6,8}", [8, 9, 10]], ["(?:1[13-57-9]\\d{5}|50(?:0[08]|30|66|77|88))\\d{3}|90\\d{6,8}", [7, 8, 9, 10]], ["70\\d{7}", [9]], 0, ["8(?:1[16-9]|22|3\\d|4[045]|5[459]|6[235-9]|7[0-3579]|90)\\d{2,7}"]], "00"], OM: ["968", "00", "(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}", [7, 8, 9], [["(\\d{3})(\\d{4,6})", "$1 $2", ["[58]"]], ["(\\d{2})(\\d{6})", "$1 $2", ["2"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[179]"]]], 0, 0, 0, 0, 0, 0, [["2[1-6]\\d{6}", [8]], ["(?:1505|90[1-9]\\d)\\d{4}|(?:7[124-9]|9[1-9])\\d{6}", [8]], ["8007\\d{4,5}|(?:500|800[05])\\d{4}"], ["900\\d{5}", [8]]]], PA: ["507", "00", "(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}", [7, 8, 10, 11], [["(\\d{3})(\\d{4})", "$1-$2", ["[1-57-9]"]], ["(\\d{4})(\\d{4})", "$1-$2", ["[68]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [["(?:1(?:0\\d|1[0479]|2[37]|3[0137]|4[147]|5[05]|6[058]|7[0167]|8[2358]|9[1389])|2(?:[0235-79]\\d|1[0-7]|4[013-9]|8[02-9])|3(?:[0147-9]\\d|[25][0-5]|33|6[068])|4(?:00|3[0-579]|4\\d|7[0-57-9])|5(?:[01]\\d|2[0-7]|[56]0|79)|7(?:0[09]|2[0-26-8]|3[03]|4[04]|5[05-9]|6[0156]|7[0-24-9]|8[4-9]|90)|8(?:09|2[89]|3\\d|4[0-24-689]|5[014]|8[02])|9(?:0[5-9]|1[0135-8]|2[036-9]|3[35-79]|40|5[0457-9]|6[05-9]|7[04-9]|8[35-8]|9\\d))\\d{4}", [7]], ["(?:1[16]1|21[89]|6\\d{3}|8(?:1[01]|7[23]))\\d{4}", [7, 8]], ["800\\d{4,5}|(?:00800|800\\d)\\d{6}"], ["(?:8(?:22|55|60|7[78]|86)|9(?:00|81))\\d{4}", [7]]]], PE: ["51", "00|19(?:1[124]|77|90)00", "(?:[14-8]|9\\d)\\d{7}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["80"], "(0$1)"], ["(\\d)(\\d{7})", "$1 $2", ["1"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[4-8]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"]]], "0", 0, 0, 0, 0, 0, [["(?:(?:19[02-68]|(?:4[34]|5[14])[0-8]|687)\\d|7(?:173|(?:3[0-8]|55)\\d)|8(?:10[05689]|6(?:0[06-9]|1[6-9]|29)|7(?:0[0569]|[56]0)))\\d{4}|(?:1[0-8]|4[12]|5[236]|6[1-7]|7[246]|8[2-4])\\d{6}", [8]], ["9\\d{8}", [9]], ["800\\d{5}", [8]], ["805\\d{5}", [8]], ["80[24]\\d{5}", [8]], 0, 0, 0, 0, ["801\\d{5}", [8]]], "00", " Anexo "], PF: ["689", "00", "4\\d{5}(?:\\d{2})?|8\\d{7,8}", [6, 8, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["44"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4|8[7-9]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]]], 0, 0, 0, 0, 0, 0, [["4(?:0[4-689]|9[4-68])\\d{5}", [8]], ["8[7-9]\\d{6}", [8]], ["80[0-5]\\d{6}", [9]], 0, 0, 0, ["44\\d{4}", [6]], 0, ["499\\d{5}", [8]]]], PG: ["675", "00|140[1-3]", "(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["18|[2-69]|85[02-46-9]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[78]"]]], 0, 0, 0, 0, 0, 0, [["(?:(?:3[0-2]|4[257]|5[34]|9[78])\\d|64[1-9]|85[02-46-9])\\d{4}", [7]], ["(?:7\\d|8[1-58])\\d{6}", [8]], ["180\\d{4}", [7]], 0, 0, 0, 0, ["27[01]\\d{4}", [7]], ["2(?:0[0-57]|7[568])\\d{4}", [7]]], "00"], PH: ["63", "00", "(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}", [6, 8, 9, 10, 11, 12, 13], [["(\\d)(\\d{5})", "$1 $2", ["2"], "(0$1)"], ["(\\d{4})(\\d{4,6})", "$1 $2", ["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2", "3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"], "(0$1)"], ["(\\d{5})(\\d{4})", "$1 $2", ["346|4(?:27|9[35])|883", "3469|4(?:279|9(?:30|56))|8834"], "(0$1)"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[3-7]|8[2-8]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], ["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["1"]]], "0", 0, 0, 0, 0, 0, [["(?:(?:2[3-8]|3[2-68]|4[2-9]|5[2-6]|6[2-58]|7[24578])\\d{3}|88(?:22\\d\\d|42))\\d{4}|(?:2|8[2-8]\\d\\d)\\d{5}", [6, 8, 9, 10]], ["(?:8(?:1[37]|9[5-8])|9(?:0[5-9]|1[0-24-9]|[235-7]\\d|4[2-9]|8[135-9]|9[1-9]))\\d{7}", [10]], ["1800\\d{7,9}", [11, 12, 13]]]], PK: ["92", "00", "122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{2,7})", "$1 $2 $3", ["[89]0"], "0$1"], ["(\\d{4})(\\d{5})", "$1 $2", ["1"]], ["(\\d{3})(\\d{6,7})", "$1 $2", ["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])", "9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"], "(0$1)"], ["(\\d{2})(\\d{7,8})", "$1 $2", ["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"], "(0$1)"], ["(\\d{5})(\\d{5})", "$1 $2", ["58"], "(0$1)"], ["(\\d{3})(\\d{7})", "$1 $2", ["3"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[24-9]"], "(0$1)"]], "0", 0, 0, 0, 0, 0, [["(?:(?:21|42)[2-9]|58[126])\\d{7}|(?:2[25]|4[0146-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]\\d{6,7}|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8]))[2-9]\\d{5,6}", [9, 10]], ["3(?:[0-247]\\d|3[0-79]|55|64)\\d{7}", [10]], ["800\\d{5}(?:\\d{3})?", [8, 11]], ["900\\d{5}", [8]], ["122\\d{6}", [9]], 0, ["(?:2(?:[125]|3[2358]|4[2-4]|9[2-8])|4(?:[0-246-9]|5[3479])|5(?:[1-35-7]|4[2-467])|6(?:0[468]|[1-8])|7(?:[14]|2[236])|8(?:[16]|2[2-689]|3[23578]|4[3478]|5[2356])|9(?:1|22|3[27-9]|4[2-6]|6[3569]|9[2-7]))111\\d{6}", [11, 12]]]], PL: ["48", "00", "(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}", [6, 7, 8, 9, 10], [["(\\d{5})", "$1", ["19"]], ["(\\d{3})(\\d{3})", "$1 $2", ["11|20|64"]], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1", "30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["64"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[2-8]|[2-7]|8[1-79]|9[145]"]], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["8"]]], 0, 0, 0, 0, 0, 0, [["(?:30|47\\d\\d)\\d{5}|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])(?:[02-9]\\d{6}|1(?:[0-8]\\d{5}|9\\d{3}(?:\\d{2})?))", [7, 9]], ["21(?:1[013-5]|2\\d|3[1-9])\\d{5}|(?:45|5[0137]|6[069]|7[2389]|88)\\d{7}", [9]], ["800\\d{6,7}", [9, 10]], ["70[01346-8]\\d{6}", [9]], 0, 0, ["804\\d{6}", [9]], ["64\\d{4,7}", [6, 7, 8, 9]], ["39\\d{7}", [9]], ["801\\d{6}", [9]]]], PM: ["508", "00", "[78]\\d{8}|[2-9]\\d{5}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["80[6-9]\\d{6}|(?:[236-9]\\d|4[1-35-9]|5[0-47-9])\\d{4}"], ["708(?:4[0-5]|5[0-6])\\d{4}|(?:[236-9]\\d|4[02-489]|5[02-9])\\d{4}"], ["80[0-5]\\d{6}", [9]], ["8[129]\\d{7}", [9]]]], PR: ["1", "011", "(?:[589]\\d\\d|787)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "787|939", [["(?:787|939)[2-9]\\d{6}"], [""], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], PS: ["970", "00", "[2489]2\\d{6}|(?:1\\d|5)\\d{8}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2489]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0", 0, 0, 0, 0, 0, [["(?:22[2-47-9]|42[45]|82[014-68]|92[3569])\\d{5}", [8]], ["5[69]\\d{7}", [9]], ["1800\\d{6}", [10]], 0, 0, 0, 0, 0, 0, ["1700\\d{6}", [10]]]], PT: ["351", "00", "1693\\d{5}|(?:[26-9]\\d|30)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["2[12]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["16|[236-9]"]]], 0, 0, 0, 0, 0, 0, [["2(?:[12]\\d|3[1-689]|4[1-59]|[57][1-9]|6[1-35689]|8[1-69]|9[1256])\\d{6}"], ["6(?:[06]92(?:30|9\\d)|[35]92(?:[049]\\d|3[034]))\\d{3}|(?:(?:16|6[0356])93|9(?:[1-36]\\d\\d|480))\\d{5}"], ["80[02]\\d{6}"], ["(?:6(?:0[178]|4[68])\\d|76(?:0[1-57]|1[2-47]|2[237]))\\d{5}"], ["884[0-4689]\\d{5}"], ["600\\d{6}|6[06]92(?:0\\d|3[349]|49)\\d{3}"], ["70(?:38[01]|596|(?:7\\d|8[17])\\d)\\d{4}"], ["6(?:222\\d|89(?:00|88|99))\\d{4}"], ["30\\d{7}"], ["80(?:8\\d|9[1579])\\d{5}"]]], PW: ["680", "01[12]", "(?:[24-8]\\d\\d|345|900)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, [["(?:2(?:55|77)|345|488|5(?:35|44|87)|6(?:22|54|79)|7(?:33|47)|8(?:24|55|76)|900)\\d{4}"], ["(?:(?:46|83)[0-5]|(?:6[2-4689]|78)0)\\d{4}|(?:45|77|88)\\d{5}"]]], PY: ["595", "00", "[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}", [6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{3,6})", "$1 $2", ["[2-9]0"], "0$1"], ["(\\d{2})(\\d{5})", "$1 $2", ["3[289]|4[246-8]|61|7[1-3]|8[1-36]"], "(0$1)"], ["(\\d{3})(\\d{4,5})", "$1 $2", ["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["87"]], ["(\\d{3})(\\d{6})", "$1 $2", ["9(?:[5-79]|8[1-7])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"]]], "0", 0, 0, 0, 0, 0, [["(?:3[289]|4[246-8]|61|7[1-3]|8[1-36])\\d{5,7}|(?:2(?:[14-68]\\d|2[4-68]|7[15]|9[1-5])|3(?:18|3[167]|4[2357]|51|[67]\\d)|4(?:1\\d|3[12]|5[13]|9[1-47])|5(?:[1-4]\\d|5[02-4])|6(?:3[1-3]|44|7[1-8])|7(?:4[0-4]|5\\d|6[1-578]|75|8[0-8])|858)\\d{5,6}", [7, 8, 9]], ["9(?:51|6[129]|7[1-6]|8[1-7]|9[1-5])\\d{6}", [9]], ["9800\\d{5,7}", [9, 10, 11]], 0, 0, 0, ["[245]0\\d{6,7}|[36-9]0\\d{4,7}", [6, 7, 8, 9]], 0, ["8700[0-4]\\d{4}", [9]]]], QA: ["974", "00", "800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}", [7, 8, 9, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["2[136]|8"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[3-7]"]]], 0, 0, 0, 0, 0, 0, [["4(?:(?:[014]\\d\\d|999)\\d|2022)\\d{3}", [8]], ["[35-7]\\d{7}", [8]], ["800\\d{4}|(?:0080[01]|800)\\d{6}", [7, 9, 11]], 0, 0, 0, 0, ["2[136]\\d{5}", [7]]]], RE: ["262", "00", "709\\d{6}|(?:26|[689]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[26-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"], ["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"], ["80\\d{7}"], ["89[1-37-9]\\d{6}"], 0, 0, 0, 0, ["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"], ["8(?:1[019]|2[0156]|84|90)\\d{6}"]]], RO: ["40", "00", "(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}", [6, 9], [["(\\d{3})(\\d{3})", "$1 $2", ["2[3-6]", "2[3-6]\\d9"], "0$1"], ["(\\d{2})(\\d{4})", "$1 $2", ["219|31"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[23]1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[236-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["[23][13-6]\\d{7}|(?:2(?:19\\d|[3-6]\\d9)|31\\d\\d)\\d\\d"], ["(?:630|702)0\\d{5}|(?:6(?:00|2\\d)|7(?:0[013-9]|1[0-3]|[2-7]\\d|8[03-8]|9[0-39]))\\d{6}", [9]], ["800\\d{6}", [9]], ["90[0136]\\d{6}", [9]], 0, 0, ["(?:37\\d|80[578])\\d{6}", [9]], 0, 0, ["801\\d{6}", [9]]], 0, " int "], RS: ["381", "00", "38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}", [6, 7, 8, 9, 10, 11, 12], [["(\\d{3})(\\d{3,9})", "$1 $2", ["(?:2[389]|39)0|[7-9]"], "0$1"], ["(\\d{2})(\\d{5,10})", "$1 $2", ["[1-36]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:11[1-9]\\d|(?:2[389]|39)(?:0[2-9]|[2-9]\\d))\\d{3,8}|(?:1[02-9]|2[0-24-7]|3[0-8])[2-9]\\d{4,9}", [7, 8, 9, 10, 11, 12]], ["6(?:[0-689]|7\\d)\\d{6,7}", [8, 9, 10]], ["800\\d{3,9}"], ["(?:78\\d|90[0169])\\d{3,7}", [6, 7, 8, 9, 10]], 0, 0, ["7[06]\\d{4,10}"]]], RU: ["7", "810", "8\\d{13}|[347-9]\\d{9}", [10, 14], [["(\\d{4})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["7(?:1[0-8]|2[1-9])", "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))", "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"], "8 ($1)", 1], ["(\\d{5})(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["7(?:1[0-68]|2[1-9])", "7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))", "7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"], "8 ($1)", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "8 ($1)", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[349]|8(?:[02-7]|1[1-8])"], "8 ($1)", 1], ["(\\d{4})(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["8"], "8 ($1)"]], "8", 0, 0, 0, 0, "[3489]", [["(?:3(?:0[12]|36|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}", [10]], ["9\\d{9}", [10]], ["8(?:0[04]|108\\d{3})\\d{7}"], ["80[39]\\d{7}", [10]], ["808\\d{7}", [10]]], "8~10"], RW: ["250", "00", "(?:06|[27]\\d\\d|[89]00)\\d{6}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:06|2[23568]\\d)\\d{6}"], ["7[237-9]\\d{7}", [9]], ["800\\d{6}", [9]], ["900\\d{6}", [9]]]], SA: ["966", "00", "(?:[15]\\d|800|92)\\d{7}", [9, 10], [["(\\d{4})(\\d{5})", "$1 $2", ["9"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]], "0", 0, 0, 0, 0, 0, [["1(?:1\\d|2[24-8]|3[35-8]|4[3-68]|6[2-5]|7[235-7])\\d{6}", [9]], ["579[0-8]\\d{5}|5(?:[013-689]\\d|7[0-8])\\d{6}", [9]], ["800\\d{7}", [10]], ["925\\d{6}", [9]], 0, 0, 0, 0, 0, ["920\\d{6}", [9]]]], SB: ["677", "0[01]", "[6-9]\\d{6}|[1-6]\\d{4}", [5, 7], [["(\\d{2})(\\d{5})", "$1 $2", ["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]], 0, 0, 0, 0, 0, 0, [["(?:1[4-79]|[23]\\d|4[0-2]|5[03]|6[0-37])\\d{3}", [5]], ["48\\d{3}|(?:(?:6[89]|7[1-9]|8[4-9])\\d|9(?:1[2-9]|2[013-9]|3[0-2]|[46]\\d|5[0-46-9]|7[0-689]|8[0-79]|9[0-8]))\\d{4}"], ["1[38]\\d{3}", [5]], 0, 0, 0, 0, 0, ["5[12]\\d{3}", [5]]]], SC: ["248", "010|0[0-2]", "(?:[2489]\\d|64)\\d{5}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[246]|9[57]"]]], 0, 0, 0, 0, 0, 0, [["4[2-46]\\d{5}"], ["2[125-8]\\d{5}"], ["800[08]\\d{3}"], ["85\\d{5}"], 0, 0, 0, 0, ["971\\d{4}|(?:64|95)\\d{5}"]], "00"], SD: ["249", "00", "[19]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[19]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["1(?:5\\d|8[35-7])\\d{6}"], ["(?:1[0-2]|9[0-3569])\\d{7}"]]], SE: ["46", "00", "(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}", [6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["20"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{4})", "$1-$2", ["9(?:00|39|44|9)"], "0$1", 0, "$1 $2"], ["(\\d{2})(\\d{3})(\\d{2})", "$1-$2 $3", ["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3"], ["(\\d)(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{2,3})(\\d{3})", "$1-$2 $3", ["9(?:00|39|44)"], "0$1", 0, "$1 $2 $3"], ["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["10|7"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{3})", "$1-$2 $3 $4", ["9"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4 $5", ["[26]"], "0$1", 0, "$1 $2 $3 $4 $5"]], "0", 0, 0, 0, 0, 0, [["(?:(?:[12][136]|3[356]|4[0246]|6[03]|8\\d)\\d|90[1-9])\\d{4,6}|(?:1(?:2[0-35]|4[0-4]|5[0-25-9]|7[13-6]|[89]\\d)|2(?:2[0-7]|4[0136-8]|5[0138]|7[018]|8[01]|9[0-57])|3(?:0[0-4]|1\\d|2[0-25]|4[056]|7[0-2]|8[0-3]|9[023])|4(?:1[013-8]|3[0135]|5[14-79]|7[0-246-9]|8[0156]|9[0-689])|5(?:0[0-6]|[15][0-5]|2[0-68]|3[0-4]|4\\d|6[03-5]|7[013]|8[0-79]|9[01])|6(?:1[1-3]|2[0-4]|4[02-57]|5[0-37]|6[0-3]|7[0-2]|8[0247]|9[0-356])|9(?:1[0-68]|2\\d|3[02-5]|4[0-3]|5[0-4]|[68][01]|7[0135-8]))\\d{5,6}", [7, 8, 9]], ["7[023689]\\d{7}", [9]], ["20\\d{4,7}", [6, 7, 8, 9]], ["649\\d{6}|99[1-59]\\d{4}(?:\\d{3})?|9(?:00|39|44)[1-8]\\d{3,6}", [7, 8, 9, 10]], ["75[1-8]\\d{6}", [9]], ["(?:25[245]|67[3-68])\\d{9}", [12]], ["10[1-8]\\d{6}", [9]], ["74[02-9]\\d{6}", [9]], 0, ["77[0-7]\\d{6}", [9]]]], SG: ["65", "0[0-3]\\d", "(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[369]|8(?:0[1-9]|[1-9])"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{4})(\\d{4})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]], 0, 0, 0, 0, 0, 0, [["662[0-24-9]\\d{4}|6(?:[0-578]\\d|6[013-57-9]|9[0-35-9])\\d{5}", [8]], ["80[1-9]\\d{5}|(?:8[1-9]|9[0-8])\\d{6}", [8]], ["(?:18|8)00\\d{7}", [10, 11]], ["1900\\d{7}", [11]], 0, 0, ["7000\\d{7}", [11]], 0, ["(?:3[12]\\d|666)\\d{5}", [8]]]], SH: ["290", "00", "(?:[256]\\d|8)\\d{3}", [4, 5], 0, 0, 0, 0, 0, 0, "[256]", [["2(?:[0-57-9]\\d|6[4-9])\\d\\d"], ["[56]\\d{4}", [5]], 0, 0, 0, 0, 0, 0, ["262\\d\\d", [5]]]], SI: ["386", "00|10(?:22|66|88|99)", "[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}", [5, 6, 7, 8], [["(\\d{2})(\\d{3,6})", "$1 $2", ["8[09]|9"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["59|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37][01]|4[013]|51|6"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-57]"], "(0$1)"]], "0", 0, 0, 0, 0, 0, [["(?:[1-357][2-8]|4[24-8])\\d{6}", [8]], ["65(?:[178]\\d|5[56]|6[01])\\d{4}|(?:[37][01]|4[013]|51|6[489])\\d{6}", [8]], ["80\\d{4,6}", [6, 7, 8]], ["89[1-3]\\d{2,5}|90\\d{4,6}"], 0, 0, 0, 0, ["(?:59\\d\\d|8(?:1(?:[67]\\d|8[0-589])|2(?:0\\d|2[0-37-9]|8[0-2489])|3[389]\\d))\\d{4}", [8]]], "00"], SJ: ["47", "00", "0\\d{4}|(?:[489]\\d|79)\\d{6}", [5, 8], 0, 0, 0, 0, 0, 0, "79", [["79\\d{6}", [8]], ["45(?:[0-24-9]\\d|3[0-57-9])\\d{4}|(?:4[016-8]|9\\d)\\d{6}", [8]], ["80[01]\\d{5}", [8]], ["82[09]\\d{5}", [8]], ["880\\d{5}", [8]], ["81[23]\\d{5}", [8]], ["(?:0[235-9]|81(?:0(?:0[7-9]|1\\d)|5\\d\\d))\\d{3}"], 0, ["85[0-5]\\d{5}", [8]], ["810(?:0[0-6]|[2-8]\\d)\\d{3}", [8]]]], SK: ["421", "00", "[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}", [6, 7, 9], [["(\\d)(\\d{2})(\\d{3,4})", "$1 $2 $3", ["21"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["[3-5][1-8]1", "[3-5][1-8]1[67]"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[689]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[3-5]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:2(?:16|[2-9]\\d{3})|(?:(?:[3-5][1-8]\\d|819)\\d|601[1-5])\\d)\\d{4}|(?:2|[3-5][1-8])1[67]\\d{3}|[3-5][1-8]16\\d\\d"], ["909[1-9]\\d{5}|9(?:0[1-8]|1[0-24-9]|4[03-57-9]|5\\d)\\d{6}", [9]], ["800\\d{6}", [9]], ["9(?:00|[78]\\d)\\d{6}", [9]], 0, 0, ["96\\d{7}", [9]], ["9090\\d{3}", [7]], ["6(?:02|5[0-4]|9[0-6])\\d{6}", [9]], ["8[5-9]\\d{7}", [9]]]], SL: ["232", "00", "(?:[237-9]\\d|66)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[236-9]"], "(0$1)"]], "0", 0, 0, 0, 0, 0, [["22[2-4][2-9]\\d{4}"], ["(?:25|3[0-5]|66|7\\d|8[08]|9[09])\\d{6}"]]], SM: ["378", "00", "(?:0549|[5-7]\\d)\\d{6}", [8, 10], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-7]"]], ["(\\d{4})(\\d{6})", "$1 $2", ["0"]]], 0, 0, "([89]\\d{5})$", "0549$1", 0, 0, [["0549(?:8[0157-9]|9\\d)\\d{4}", [10]], ["6[16]\\d{6}", [8]], 0, ["7[178]\\d{6}", [8]], 0, 0, 0, 0, ["5[158]\\d{6}", [8]]]], SN: ["221", "00", "(?:[378]\\d|93)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[379]"]]], 0, 0, 0, 0, 0, 0, [["3(?:[026]\\d|3[89])\\d{6}"], ["7(?:[015-8]\\d|21|90)\\d{6}"], ["800\\d{6}"], ["88[4689]\\d{6}"], 0, 0, 0, 0, ["(?:39|93)\\d{7}"], ["81[02468]\\d{6}"]]], SO: ["252", "00", "[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}", [6, 7, 8, 9], [["(\\d{2})(\\d{4})", "$1 $2", ["8[125]"]], ["(\\d{6})", "$1", ["[134]"]], ["(\\d)(\\d{6})", "$1 $2", ["[15]|2[0-79]|3[0-46-8]|4[0-7]"]], ["(\\d{2})(\\d{5,7})", "$1 $2", ["1|28|9[2-9]"]], ["(\\d)(\\d{7})", "$1 $2", ["[267]|904"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[346-9]"]]], "0", 0, 0, 0, 0, 0, [["(?:1\\d|2[0-79]|3[0-46-8]|4[0-7]|5[57-9])\\d{5}|(?:[134]\\d|8[125])\\d{4}", [6, 7]], ["(?:(?:15|(?:3[59]|4[89]|6\\d|7[0-35-9]|8[08])\\d|9(?:0\\d|[2-9]))\\d|2(?:4\\d|8))\\d{5}|(?:[67]\\d\\d|904)\\d{5}", [7, 8, 9]]]], SR: ["597", "00", "(?:[2-5]|[6-9]\\d)\\d{5}", [6, 7], [["(\\d{2})(\\d{2})(\\d{2})", "$1-$2-$3", ["56"]], ["(\\d{3})(\\d{3})", "$1-$2", ["[2-5]"]], ["(\\d{3})(\\d{4})", "$1-$2", ["[6-9]"]]], 0, 0, 0, 0, 0, 0, [["(?:2[1-3]|3[0-7]|4\\d|5[2-578])\\d{4}", [6]], ["(?:6[08]|7[1-7]|8[1-9])\\d{5}", [7]], ["80\\d{5}", [7]], ["90\\d{5}", [7]], 0, 0, 0, 0, ["(?:56|91\\d)\\d{4}"]]], SS: ["211", "00", "[19]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[19]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["1[89]\\d{7}"], ["(?:12|9[1257-9])\\d{7}"]]], ST: ["239", "00", "(?:22|9\\d)\\d{5}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[29]"]]], 0, 0, 0, 0, 0, 0, [["22\\d{5}"], ["900[5-9]\\d{3}|9(?:0[1-9]|[89]\\d)\\d{4}"]]], SV: ["503", "00", "[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?", [7, 8, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["[89]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[25-7]"]], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["[89]"]]], 0, 0, 0, 0, 0, 0, [["2(?:79(?:0[0347-9]|[1-9]\\d)|89(?:0[024589]|[1-9]\\d))\\d{3}|2(?:[1-69]\\d|[78][0-8])\\d{5}", [8]], ["[5-7]\\d{7}", [8]], ["800\\d{8}|80[01]\\d{4}", [7, 11]], ["900\\d{4}(?:\\d{4})?", [7, 11]]]], SX: ["1", "011", "7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "(5\\d{6})$|1", "721$1", 0, "721", [["7215(?:4[2-8]|8[39]|9[056])\\d{4}"], ["7215(?:1[02]|2\\d|5[034679]|8[0-24-8])\\d{4}"], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], SY: ["963", "00", "[1-359]\\d{8}|[1-5]\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-4]|5[1-3]"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[59]"], "0$1", 1]], "0", 0, 0, 0, 0, 0, [["(?:1(?:[1478]\\d|[2356])|21\\d|3(?:[13]\\d|4)|4[134]|5[1-3])\\d{6}|2[1-5]\\d{6}"], ["(?:50|9[03-689])\\d{7}", [9]]]], SZ: ["268", "00", "0800\\d{4}|(?:[237]\\d|900)\\d{6}", [8, 9], [["(\\d{4})(\\d{4})", "$1 $2", ["[0237]"]], ["(\\d{5})(\\d{4})", "$1 $2", ["9"]]], 0, 0, 0, 0, 0, 0, [["[23][2-5]\\d{6}", [8]], ["7[5-9]\\d{6}", [8]], ["0800\\d{4}", [8]], ["900\\d{6}", [9]], 0, 0, 0, 0, ["70\\d{6}", [8]]]], TA: ["290", "00", "8\\d{3}", [4], 0, 0, 0, 0, 0, 0, "8", [["8\\d{3}"]]], TC: ["1", "011", "(?:[58]\\d\\d|649|900)\\d{7}", [10], 0, "1", 0, "([2-479]\\d{6})$|1", "649$1", 0, "649", [["649(?:266|712|9(?:4\\d|50))\\d{4}"], ["649(?:2(?:3[129]|4[1-79])|3\\d\\d|4[34][1-3])\\d{4}"], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"], 0, 0, 0, ["649(?:71[01]|966)\\d{4}"]]], TD: ["235", "00|16", "(?:22|[3689]\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[236-9]"]]], 0, 0, 0, 0, 0, 0, [["22(?:[37-9]0|5[0-5]|6[89])\\d{4}"], ["(?:3[01]|[69]\\d|77|8[5-7])\\d{6}"]], "00"], TG: ["228", "00", "[279]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[279]"]]], 0, 0, 0, 0, 0, 0, [["2(?:2[2-7]|3[23]|4[45]|55|6[67]|77)\\d{5}"], ["(?:7[0-389]|9[0-36-9])\\d{6}"]]], TH: ["66", "00[1-9]", "(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}", [8, 9, 10, 13], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[13-9]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0", 0, 0, 0, 0, 0, [["(?:1[0689]|2\\d|3[2-9]|4[2-5]|5[2-6]|7[3-7])\\d{6}", [8]], ["(?:(?:14|[89]\\d)\\d\\d|6(?:[1-6]\\d\\d|7(?:1[0-8]|2[4-7]|3[1-6])))\\d{5}", [9]], ["(?:001800\\d|1800)\\d{6}", [10, 13]], ["1900\\d{6}", [10]], 0, 0, 0, 0, ["6[08]\\d{7}", [9]]]], TJ: ["992", "810", "(?:[0-57-9]\\d|66)\\d{7}", [9], [["(\\d{6})(\\d)(\\d{2})", "$1 $2 $3", ["331", "3317"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["44[02-479]|[34]7"]], ["(\\d{4})(\\d)(\\d{4})", "$1 $2 $3", ["3(?:[1245]|3[12])"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["\\d"]]], 0, 0, 0, 0, 0, 0, [["(?:3(?:1[3-5]|2[245]|3[12]|4[24-7]|5[25]|72)|4(?:46|74|87))\\d{6}"], ["(?:33[03-9]|4(?:1[18]|4[02-479])|81[1-9])\\d{6}|(?:[09]\\d|1[0-27-9]|2[0-27]|3[08]|40|5[05]|66|7[0157-9]|8[07-9])\\d{7}"]], "8~10"], TK: ["690", "00", "[2-47]\\d{3,6}", [4, 5, 6, 7], 0, 0, 0, 0, 0, 0, 0, [["(?:2[2-4]|[34]\\d)\\d{2,5}"], ["7[2-4]\\d{2,5}"]]], TL: ["670", "00", "7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-489]|70"]], ["(\\d{4})(\\d{4})", "$1 $2", ["7"]]], 0, 0, 0, 0, 0, 0, [["(?:2[1-5]|3[1-9]|4[1-4])\\d{5}", [7]], ["7[2-8]\\d{6}", [8]], ["80\\d{5}", [7]], ["90\\d{5}", [7]], ["70\\d{5}", [7]]]], TM: ["993", "810", "[1-7]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["12"], "(8 $1)"], ["(\\d{3})(\\d)(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[1-5]"], "(8 $1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[67]"], "8 $1"]], "8", 0, 0, 0, 0, 0, [["(?:1(?:2\\d|3[1-9])|2(?:22|4[0-35-8])|3(?:22|4[03-9])|4(?:22|3[128]|4\\d|6[15])|5(?:22|5[7-9]|6[014-689]))\\d{5}"], ["(?:6\\d|7[12])\\d{6}"]], "8~10"], TN: ["216", "00", "[2-57-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-57-9]"]]], 0, 0, 0, 0, 0, 0, [["81200\\d{3}|(?:3[0-2]|7\\d)\\d{6}"], ["3(?:001|[12]40)\\d{4}|(?:(?:[259]\\d|4[0-8])\\d|3(?:1[1-35]|6[0-4]|91))\\d{5}"], ["8010\\d{4}"], ["88\\d{6}"], 0, 0, 0, 0, 0, ["8[12]10\\d{4}"]]], TO: ["676", "00", "(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}", [5, 7], [["(\\d{2})(\\d{3})", "$1-$2", ["[2-4]|50|6[09]|7[0-24-69]|8[05]"]], ["(\\d{4})(\\d{3})", "$1 $2", ["0"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[5-9]"]]], 0, 0, 0, 0, 0, 0, [["(?:2\\d|3[0-8]|4[0-4]|50|6[09]|7[0-24-69]|8[05])\\d{3}", [5]], ["(?:5(?:4[0-5]|5[4-6])|6(?:[09]\\d|3[02]|8[15-9])|(?:7\\d|8[46-9])\\d|999)\\d{4}", [7]], ["0800\\d{3}", [7]], 0, 0, 0, 0, 0, ["55[0-37-9]\\d{4}", [7]]]], TR: ["90", "00", "4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}", [7, 10, 12, 13], [["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["512|8[01589]|90"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["5"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24][1-8]|3[1-9]"], "(0$1)", 1], ["(\\d{3})(\\d{3})(\\d{6,7})", "$1 $2 $3", ["80"], "0$1", 1]], "0", 0, 0, 0, 0, 0, [["(?:2(?:1[26]|[28][2468]|[3-5][268]|[67][246])|3(?:[13][28]|[24-6][2468]|[78][02468]|92)|4(?:[16][246]|[23578][2468]|4[26]))\\d{7}", [10]], ["5(?:61(?:011|61\\d)|82[2-4]\\d\\d)\\d{4}|5(?:[03-5]\\d|1[06]|24|6[24]|7[245]|9[46])\\d{7}", [10]], ["8(?:00\\d{7}(?:\\d{2,3})?|11\\d{7})", [10, 12, 13]], ["(?:8[89]8|900)\\d{7}", [10]], ["592(?:21[12]|461)\\d{4}", [10]], 0, ["444\\d{4}", [7]], ["512\\d{7}", [10]], ["850\\d{7}", [10]]]], TT: ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-46-8]\\d{6})$|1", "868$1", 0, "868", [["868(?:2(?:01|1[5-9]|[23]\\d|4[0-2])|6(?:0[7-9]|1[02-8]|2[1-9]|[3-69]\\d|7[0-79])|82[124])\\d{4}"], ["868(?:(?:2[5-9]|3\\d)\\d|4(?:3[0-6]|[6-9]\\d)|6(?:20|78|8\\d)|7(?:0[1-9]|1[02-9]|[2-9]\\d))\\d{4}"], ["868800\\d{4}|8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"], ["868619\\d{4}"]]], TV: ["688", "00", "(?:2|7\\d\\d|90)\\d{4}", [5, 6, 7], [["(\\d{2})(\\d{3})", "$1 $2", ["2"]], ["(\\d{2})(\\d{4})", "$1 $2", ["90"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]], 0, 0, 0, 0, 0, 0, [["2[02-9]\\d{3}", [5]], ["(?:7[01]\\d|90)\\d{4}", [6, 7]]]], TW: ["886", "0(?:0[25-79]|19)", "[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}", [7, 8, 9, 10, 11], [["(\\d{2})(\\d)(\\d{4})", "$1 $2 $3", ["202"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["826"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["83"], "0$1"], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["82"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[25]0|37|49|8[09]"], "0$1"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[23568]|4(?:0[02-48]|[1-478])|7[1-9]", "[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["7"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:2[2-8]\\d|370|55[01]|7[1-9])\\d{6}|4(?:(?:0(?:0[1-9]|[2-48]\\d)|1[023]\\d)\\d{4,5}|(?:[239]\\d\\d|4(?:0[56]|12|49))\\d{5})|6(?:[01]\\d{7}|4(?:0[56]|12|24|4[09])\\d{4,5})|8(?:(?:2(?:3\\d|4[0-269]|[578]0|66)|36[24-9]|90\\d\\d)\\d{4}|4(?:0[56]|12|24|4[09])\\d{4,5})|(?:2(?:2(?:0\\d\\d|4(?:0[68]|[249]0|3[0-467]|5[0-25-9]|6[0235689]))|(?:3(?:[09]\\d|1[0-4])|(?:4\\d|5[0-49]|6[0-29]|7[0-5])\\d)\\d)|(?:(?:3[2-9]|5[2-8]|6[0-35-79]|8[7-9])\\d\\d|4(?:2(?:[089]\\d|7[1-9])|(?:3[0-4]|[78]\\d|9[01])\\d))\\d)\\d{3}", [8, 9]], ["(?:40001[0-2]|9[0-8]\\d{4})\\d{3}", [9]], ["80[0-79]\\d{6}|800\\d{5}", [8, 9]], ["20(?:[013-9]\\d\\d|2)\\d{4}", [7, 9]], ["99\\d{7}", [9]], 0, ["50[0-46-9]\\d{6}", [9]], 0, ["7010(?:[0-2679]\\d|3[0-7]|8[0-5])\\d{5}|70\\d{8}", [10, 11]]], 0, "#"], TZ: ["255", "00[056]", "(?:[25-8]\\d|41|90)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[24]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["5"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[67]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["2[2-8]\\d{7}"], ["(?:6[0-35-9]|7\\d)\\d{7}"], ["80[08]\\d{6}"], ["90\\d{7}"], 0, 0, 0, 0, ["41\\d{7}"], ["8(?:40|6[01])\\d{6}"]]], UA: ["380", "00", "[89]\\d{9}|[3-9]\\d{8}", [9, 10], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]", "6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"], "0$1"], ["(\\d{4})(\\d{5})", "$1 $2", ["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])", "3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[3-7]|89|9[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:3[1-8]|4[13-8]|5[1-7]|6[12459])\\d{7}", [9]], ["790\\d{6}|(?:39|50|6[36-8]|7[1-357]|9[1-9])\\d{7}", [9]], ["800[1-8]\\d{5,6}"], ["900[239]\\d{5,6}"], 0, 0, 0, 0, ["89[1-579]\\d{6}", [9]]], "0~0"], UG: ["256", "00[057]", "800\\d{6}|(?:[29]0|[347]\\d)\\d{7}", [9], [["(\\d{4})(\\d{5})", "$1 $2", ["202", "2024", "20240"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["20[0-35-7]|4(?:6[45]|[7-9])|[7-9]", "20(?:[0135-7]|2[5-9])|4(?:6[45]|[7-9])|[7-9]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[2-4]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["20(?:(?:24[09]|30[67])\\d|6(?:00[0-2]|30[0-4]))\\d{3}|(?:20(?:[017]\\d|2[5-9]|3[1-4]|5[0-4]|6[15-9])|[34]\\d{3})\\d{5}"], ["7(?:28|34)0\\d{5}|7(?:[014-8]\\d|2[01467]|3[0167]|9[0-589])\\d{6}"], ["800[1-3]\\d{5}"], ["90[1-3]\\d{6}"]]], US: ["1", "011", "[2-9]\\d{9}|3\\d{6}", [10], [["(\\d{3})(\\d{4})", "$1-$2", ["310"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "($1) $2-$3", ["[2-9]"], 0, 1, "$1-$2-$3"]], "1", 0, 0, 0, 0, 0, [["(?:472[2-47-9]|983[2-57-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[02469]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"], [""], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], UY: ["598", "0(?:0|1[3-9]\\d)", "0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], [["(\\d{4,5})", "$1", ["21"]], ["(\\d{3})(\\d{3,4})", "$1 $2", ["0"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[49]0|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{4})(\\d{4})", "$1 $2", ["[124]"]], ["(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3 $4", ["0"]]], "0", 0, 0, 0, 0, 0, [["(?:1(?:770|9(?:20|[89]7))|(?:2\\d|4[2-7])\\d\\d)\\d{4}", [8]], ["9[1-9]\\d{6}", [8]], ["0004\\d{2,9}|(?:405|80[05])\\d{4}", [6, 7, 8, 9, 10, 11, 12, 13]], ["90[0-8]\\d{4}", [7]], 0, 0, ["21\\d{2,3}", [4, 5]]], "00", " int. "], UZ: ["998", "00", "(?:20|33|[5-9]\\d)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[235-9]"]]], 0, 0, 0, 0, 0, 0, [["(?:55\\d\\d|6(?:1(?:22|3[124]|4[1-4]|5[1-3578]|64)|2(?:22|3[0-57-9]|41)|5(?:22|3[3-7]|5[024-8])|[69]\\d\\d|7(?:[23]\\d|7[69]))|7(?:[168]\\d\\d|2(?:22|3[13-57-9]|4[1-3579]|5[14])|3(?:2\\d|3[1578]|4[1-35-7]|5[1-57]|61)|4(?:2\\d|3[1-579]|7[1-79])|5(?:22|5[1-9]|6[1457])|9(?:22|5[1-9])))\\d{5}"], ["(?:(?:[25]0|33|8[078]|9[0-57-9])\\d{3}|6(?:1(?:2(?:2[01]|98)|35[0-4]|50\\d|61[23]|7(?:[01][017]|4\\d|55|9[5-9]))|2(?:(?:11|7\\d)\\d|2(?:[12]1|9[01379])|5(?:[126]\\d|3[0-4]))|5(?:19[01]|2(?:27|9[26])|(?:30|59|7\\d)\\d)|6(?:2(?:1[5-9]|2[0367]|38|41|52|60)|(?:3[79]|9[0-3])\\d|4(?:56|83)|7(?:[07]\\d|1[017]|3[07]|4[047]|5[057]|67|8[0178]|9[79]))|7(?:2(?:24|3[237]|4[5-9]|7[15-8])|5(?:7[12]|8[0589])|7(?:0\\d|[39][07])|9(?:0\\d|7[079])))|7(?:[07]\\d{3}|2(?:2(?:2[79]|95)|3(?:2[5-9]|6[0-6])|57\\d|7(?:0\\d|1[17]|2[27]|3[37]|44|5[057]|66|88))|3(?:2(?:1[0-6]|21|3[469]|7[159])|(?:33|9[4-6])\\d|5(?:0[0-4]|5[579]|9\\d)|7(?:[0-3579]\\d|4[0467]|6[67]|8[078]))|4(?:2(?:29|5[0257]|6[0-7]|7[1-57])|5(?:1[0-4]|8\\d|9[5-9])|7(?:0\\d|1[024589]|2[0-27]|3[0137]|[46][07]|5[01]|7[5-9]|9[079])|9(?:7[015-9]|[89]\\d))|5(?:112|2(?:0\\d|2[29]|[49]4)|3[1568]\\d|52[6-9]|7(?:0[01578]|1[017]|[23]7|4[047]|[5-7]\\d|8[78]|9[079]))|9(?:22[128]|3(?:2[0-4]|7\\d)|57[02569]|7(?:2[05-9]|3[37]|4\\d|60|7[2579]|87|9[07]))))\\d{4}"]]], VA: ["39", "00", "0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}", [6, 7, 8, 9, 10, 11, 12], 0, 0, 0, 0, 0, 0, "06698", [["06698\\d{1,6}", [6, 7, 8, 9, 10, 11]], ["3[1-9]\\d{8}|3[2-9]\\d{7}", [9, 10]], ["80(?:0\\d{3}|3)\\d{3}", [6, 9]], ["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}", [6, 8, 9, 10]], ["1(?:78\\d|99)\\d{6}", [9, 10]], ["3[2-8]\\d{9,10}", [11, 12]], 0, 0, ["55\\d{8}", [10]], ["84(?:[08]\\d{3}|[17])\\d{3}", [6, 9]]]], VC: ["1", "011", "(?:[58]\\d\\d|784|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "784$1", 0, "784", [["784(?:266|3(?:6[6-9]|7\\d|8[0-6])|4(?:38|5[0-36-8]|8[0-8])|5(?:55|7[0-2]|93)|638|784)\\d{4}"], ["784(?:4(?:3[0-5]|5[45]|89|9[0-8])|5(?:2[6-9]|3[0-4])|720)\\d{4}"], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"], 0, 0, 0, ["78451[0-2]\\d{4}"]]], VE: ["58", "00", "[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}", [10], [["(\\d{3})(\\d{7})", "$1-$2", ["[24-689]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:2(?:12|3[457-9]|[467]\\d|[58][1-9]|9[1-6])|[4-6]00)\\d{7}"], ["4(?:1[24-8]|2[246])\\d{7}"], ["800\\d{7}"], ["90[01]\\d{7}"], 0, 0, ["501\\d{7}"]]], VG: ["1", "011", "(?:284|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-578]\\d{6})$|1", "284$1", 0, "284", [["284(?:229|4(?:22|9[45])|774|8(?:52|6[459]))\\d{4}"], ["284(?:245|3(?:0[0-3]|4[0-7]|68|9[34])|4(?:4[0-6]|68|9[69])|5(?:4[0-7]|68|9[69]))\\d{4}"], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], VI: ["1", "011", "[58]\\d{9}|(?:34|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "340$1", 0, "340", [["340(?:2(?:0\\d|10|2[06-8]|4[49]|77)|3(?:32|44)|4(?:2[23]|44|7[34]|89)|5(?:1[34]|55)|6(?:2[56]|4[23]|77|9[023])|7(?:1[2-57-9]|2[57]|7\\d)|884|998)\\d{4}"], [""], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], VN: ["84", "00", "[12]\\d{9}|[135-9]\\d{8}|[16]\\d{6,7}|7\\d{6}", [7, 8, 9, 10], [["(\\d{4})(\\d{4,6})", "$1 $2", ["1(?:2[02]|[89])"], 0, 1], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[26]|6"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[357-9]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["2[48]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["2"], "0$1", 1]], "0", 0, 0, 0, 0, 0, [["2(?:0[3-9]|1[0-689]|2[0-25-9]|[38][2-9]|4[2-8]|5[124-9]|6[0-39]|7[0-7]|9[0-4679])\\d{7}", [10]], ["121[0-3]\\d{5}|(?:160|(?:3\\d|7[06-9])\\d|5(?:[1689]\\d|2[238]|59)|8(?:[1-8]\\d|9[6-9])|9(?:[0-8]\\d|9[013-9]))\\d{6}", [9]], ["1800\\d{4,6}|12(?:0[13]|28)\\d{4}", [8, 9, 10]], ["1900\\d{4,6}", [8, 9, 10]], 0, 0, ["[17]99\\d{4}|69\\d{5,6}", [7, 8]], 0, ["672\\d{6}", [9]]]], VU: ["678", "00", "[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}", [5, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["[57-9]"]]], 0, 0, 0, 0, 0, 0, [["(?:38[0-8]|48[4-9])\\d\\d|(?:2[02-9]|3[4-7]|88)\\d{3}", [5]], ["(?:[58]\\d|7[0-7])\\d{5}", [7]], ["81[18]\\d\\d", [5]], 0, 0, 0, ["(?:3[03]|900\\d)\\d{3}"], 0, ["9(?:0[1-9]|1[01])\\d{4}", [7]]]], WF: ["681", "00", "(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[47-9]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]]], 0, 0, 0, 0, 0, 0, [["72\\d{4}", [6]], ["(?:72|8[23])\\d{4}", [6]], ["80[0-5]\\d{6}", [9]], 0, 0, ["[48]0\\d{4}", [6]], 0, 0, ["9[23]\\d{4}", [6]]]], WS: ["685", "0", "(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}", [5, 6, 7, 10], [["(\\d{5})", "$1", ["[2-5]|6[1-9]"]], ["(\\d{3})(\\d{3,7})", "$1 $2", ["[68]"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]], 0, 0, 0, 0, 0, 0, [["6[1-9]\\d{3}|(?:[2-5]|60)\\d{4}", [5, 6]], ["(?:7[1-35-8]|8(?:[3-7]|9\\d{3}))\\d{5}", [7, 10]], ["800\\d{3}", [6]]]], XK: ["383", "00", "2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-4]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2|39"], "0$1"], ["(\\d{2})(\\d{7,10})", "$1 $2", ["3"], "0$1"]], "0", 0, 0, 0, 0, 0, [["38\\d{6,10}|(?:2[89]|39)(?:0\\d{5,6}|[1-9]\\d{5})"], ["4[3-9]\\d{6}", [8]], ["800\\d{5}", [8]], ["900\\d{5}", [8]]]], YE: ["967", "00", "(?:1|7\\d)\\d{7}|[1-7]\\d{6}", [7, 8, 9], [["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-6]|7(?:[24-6]|8[0-7])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"], "0$1"]], "0", 0, 0, 0, 0, 0, [["78[0-7]\\d{4}|17\\d{6}|(?:[12][2-68]|3[2358]|4[2-58]|5[2-6]|6[3-58]|7[24-6])\\d{5}", [7, 8]], ["7[01378]\\d{7}", [9]]]], YT: ["262", "00", "(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"], ["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"], ["80\\d{7}"], 0, 0, 0, 0, 0, ["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]], ZA: ["27", "00", "[1-79]\\d{8}|8\\d{4,9}", [5, 6, 7, 8, 9, 10], [["(\\d{2})(\\d{3,4})", "$1 $2", ["8[1-4]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["8[1-4]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["860"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:2(?:0330|4302)|52087)0\\d{3}|(?:1[0-8]|2[1-378]|3[1-69]|4\\d|5[1346-8])\\d{7}", [9]], ["(?:1(?:3492[0-25]|4495[0235]|549(?:20|5[01]))|4[34]492[01])\\d{3}|8[1-4]\\d{3,7}|(?:2[27]|47|54)4950\\d{3}|(?:1(?:049[2-4]|9[12]\\d\\d)|(?:50[0-2]|[67]\\d\\d)\\d\\d|8(?:5\\d{3}|7(?:08[67]|158|28[5-9]|310)))\\d{4}|(?:1[6-8]|28|3[2-69]|4[025689]|5[36-8])4920\\d{3}|(?:12|[2-5]1)492\\d{4}", [5, 6, 7, 8, 9]], ["80\\d{7}", [9]], ["(?:86[2-9]|9[0-2]\\d)\\d{6}", [9]], 0, 0, ["861\\d{6,7}", [9, 10]], 0, ["87(?:08[0-589]|15[0-79]|28[0-4]|31[1-9])\\d{4}|87(?:[02][0-79]|1[0-46-9]|3[02-9]|[4-9]\\d)\\d{5}", [9]], ["860\\d{6}", [9]]]], ZM: ["260", "00", "800\\d{6}|(?:21|[579]\\d|63)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[28]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[579]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["21[1-8]\\d{6}"], ["(?:[59][5-8]|7[5-9])\\d{7}"], ["800\\d{6}"], 0, 0, 0, 0, 0, ["63\\d{7}"]]], ZW: ["263", "00", "(?:13|8\\d{4})\\d{5}|[235-8]\\d{8}|[2-689]\\d{6}", [7, 9, 10], [["(\\d{2})(\\d{3,5})", "$1 $2", ["1|2(?:0[0-36-9]|29|58)|67[0-46-9]|(?:55|68)[0-69]"], "0$1"], ["(\\d{3})(\\d{3,5})", "$1 $2", ["2(?:0[45]|[27]|48)|37|675|(?:55|68)[78]"], "0$1"], ["(\\d)(\\d{3})(\\d{2,4})", "$1 $2 $3", ["[49]"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["80"], "0$1"], ["(\\d{4})(\\d{3,5})", "$1 $2", ["548"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["29[013-9]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[256]|39|8[13-59]"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["3"], "0$1"], ["(\\d{4})(\\d{6})", "$1 $2", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:2(?:(?:(?:02[014]|72[03])\\d|48)\\d|2(?:[278]\\d|92)|583)|(?:37[56]|6[78]21\\d)\\d|5(?:483|525\\d\\d))\\d{3}|(?:2(?:0\\d|7[1-7])|(?:55|6[78])\\d)\\d{4}|(?:13|2(?:(?:42|9\\d)\\d|[56]20)|3(?:123|92\\d)|(?:4|542)\\d|6(?:[16]21|52[013])|8(?:[1349]28|523)|9[2-9])\\d{5}", [7, 9]], ["7(?:[1278]\\d|3[1-9]|9[01])\\d{6}", [9]], ["80(?:[01]\\d|20|8[0-8])\\d{3}", [7]], 0, 0, 0, 0, 0, ["86(?:1[12]|22|30|44|55|77|8[368])\\d{6}", [10]]]] }, nonGeographic: { "800": ["800", 0, "(?:00|[1-9]\\d)\\d{6}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["\\d"]]], 0, 0, 0, 0, 0, 0, [0, 0, ["(?:00|[1-9]\\d)\\d{6}"]]], "808": ["808", 0, "[1-9]\\d{7}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[1-9]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, 0, ["[1-9]\\d{7}"]]], "870": ["870", 0, "7\\d{11}|[235-7]\\d{8}", [9, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235-7]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"], 0, 0, 0, 0, 0, 0, ["2\\d{8}", [9]]]], "878": ["878", 0, "10\\d{10}", [12], [["(\\d{2})(\\d{5})(\\d{5})", "$1 $2 $3", ["1"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, ["10\\d{10}"]]], "881": ["881", 0, "6\\d{9}|[0-36-9]\\d{8}", [9, 10], [["(\\d)(\\d{3})(\\d{5})", "$1 $2 $3", ["[0-37-9]"]], ["(\\d)(\\d{3})(\\d{5,6})", "$1 $2 $3", ["6"]]], 0, 0, 0, 0, 0, 0, [0, ["6\\d{9}|[0-36-9]\\d{8}"]]], "882": ["882", 0, "[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?", [7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{5})", "$1 $2", ["16|342"]], ["(\\d{2})(\\d{6})", "$1 $2", ["49"]], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["1[36]|9"]], ["(\\d{2})(\\d{4})(\\d{3})", "$1 $2 $3", ["3[23]"]], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["16"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["10|23|3(?:[15]|4[57])|4|5[12]"]], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["34"]], ["(\\d{2})(\\d{4,5})(\\d{5})", "$1 $2 $3", ["[1-35]"]]], 0, 0, 0, 0, 0, 0, [0, ["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}", [7, 8, 9, 10, 12]], 0, 0, 0, ["348[57]\\d{7}", [11]], 0, 0, ["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]], "883": ["883", 0, "(?:[1-4]\\d|51)\\d{6,10}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{2,8})", "$1 $2 $3", ["[14]|2[24-689]|3[02-689]|51[24-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["510"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["21"]], ["(\\d{4})(\\d{4})(\\d{4})", "$1 $2 $3", ["51[13]"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[235]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, ["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]], "888": ["888", 0, "\\d{11}", [11], [["(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, ["\\d{11}"]]], "979": ["979", 0, "[1359]\\d{8}", [9], [["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[1359]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, ["[1359]\\d{8}"]]] } }; + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/isObject.js +var require_isObject = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/isObject.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = isObject2; + var objectConstructor = {}.constructor; + function isObject2(object) { + return object !== void 0 && object !== null && object.constructor === objectConstructor; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/normalizeArguments.js +var require_normalizeArguments = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/normalizeArguments.js"(exports2) { + "use strict"; + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = normalizeArguments; + var _isObject = _interopRequireDefault(require_isObject()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function ownKeys2(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys2(Object(t), true).forEach(function(r2) { + _defineProperty(e, r2, t[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys2(Object(t)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); + }); + } + return e; + } + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); + } + function _nonIterableRest() { + 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 _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + function _iterableToArrayLimit(r, l2) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, n, i, u, a = [], f = true, o = false; + try { + if (i = (t = t.call(r)).next, 0 === l2) { + if (Object(t) !== t) return; + f = false; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l2); f = true) ; + } catch (r2) { + o = true, n = r2; + } finally { + try { + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } + } + function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; + } + function normalizeArguments(args) { + var _Array$prototype$slic = Array.prototype.slice.call(args), _Array$prototype$slic2 = _slicedToArray(_Array$prototype$slic, 4), arg_1 = _Array$prototype$slic2[0], arg_2 = _Array$prototype$slic2[1], arg_3 = _Array$prototype$slic2[2], arg_4 = _Array$prototype$slic2[3]; + var text; + var options; + var metadata; + if (typeof arg_1 === "string") { + text = arg_1; + } else throw new TypeError("A text for parsing must be a string."); + if (!arg_2 || typeof arg_2 === "string") { + if (arg_4) { + options = arg_3; + metadata = arg_4; + } else { + options = void 0; + metadata = arg_3; + } + if (arg_2) { + options = _objectSpread({ + defaultCountry: arg_2 + }, options); + } + } else if ((0, _isObject["default"])(arg_2)) { + if (arg_3) { + options = arg_2; + metadata = arg_3; + } else { + metadata = arg_2; + } + } else throw new Error("Invalid second argument: ".concat(arg_2)); + return { + text, + options, + metadata + }; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/constants.js +var require_constants3 = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.WHITESPACE = exports2.VALID_PUNCTUATION = exports2.VALID_DIGITS = exports2.PLUS_CHARS = exports2.MIN_LENGTH_FOR_NSN = exports2.MAX_LENGTH_FOR_NSN = exports2.MAX_LENGTH_COUNTRY_CODE = void 0; + var MIN_LENGTH_FOR_NSN = exports2.MIN_LENGTH_FOR_NSN = 2; + var MAX_LENGTH_FOR_NSN = exports2.MAX_LENGTH_FOR_NSN = 17; + var MAX_LENGTH_COUNTRY_CODE = exports2.MAX_LENGTH_COUNTRY_CODE = 3; + var VALID_DIGITS = exports2.VALID_DIGITS = "0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9"; + var DASHES = "-\u2010-\u2015\u2212\u30FC\uFF0D"; + var SLASHES = "\uFF0F/"; + var DOTS = "\uFF0E."; + var WHITESPACE = exports2.WHITESPACE = " \xA0\xAD\u200B\u2060\u3000"; + var BRACKETS = "()\uFF08\uFF09\uFF3B\uFF3D\\[\\]"; + var TILDES = "~\u2053\u223C\uFF5E"; + var VALID_PUNCTUATION = exports2.VALID_PUNCTUATION = "".concat(DASHES).concat(SLASHES).concat(DOTS).concat(WHITESPACE).concat(BRACKETS).concat(TILDES); + var PLUS_CHARS = exports2.PLUS_CHARS = "+\uFF0B"; + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/ParseError.js +var require_ParseError = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/ParseError.js"(exports2) { + "use strict"; + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = void 0; + function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o); + } + } + function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: false }), e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); + } + function _callSuper(t, o, e) { + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); + } + function _possibleConstructorReturn(t, e) { + if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); + return _assertThisInitialized(t); + } + function _assertThisInitialized(e) { + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e; + } + function _inherits(t, e) { + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); + t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: true, configurable: true } }), Object.defineProperty(t, "prototype", { writable: false }), e && _setPrototypeOf(t, e); + } + function _wrapNativeSuper(t) { + var r = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0; + return _wrapNativeSuper = function _wrapNativeSuper2(t2) { + if (null === t2 || !_isNativeFunction(t2)) return t2; + if ("function" != typeof t2) throw new TypeError("Super expression must either be null or a function"); + if (void 0 !== r) { + if (r.has(t2)) return r.get(t2); + r.set(t2, Wrapper); + } + function Wrapper() { + return _construct(t2, arguments, _getPrototypeOf(this).constructor); + } + return Wrapper.prototype = Object.create(t2.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }), _setPrototypeOf(Wrapper, t2); + }, _wrapNativeSuper(t); + } + function _construct(t, e, r) { + if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); + var o = [null]; + o.push.apply(o, e); + var p = new (t.bind.apply(t, o))(); + return r && _setPrototypeOf(p, r.prototype), p; + } + function _isNativeReflectConstruct() { + try { + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { + })); + } catch (t2) { + } + return (_isNativeReflectConstruct = function _isNativeReflectConstruct2() { + return !!t; + })(); + } + function _isNativeFunction(t) { + try { + return -1 !== Function.toString.call(t).indexOf("[native code]"); + } catch (n) { + return "function" == typeof t; + } + } + function _setPrototypeOf(t, e) { + return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) { + return t2.__proto__ = e2, t2; + }, _setPrototypeOf(t, e); + } + function _getPrototypeOf(t) { + return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t2) { + return t2.__proto__ || Object.getPrototypeOf(t2); + }, _getPrototypeOf(t); + } + var ParseError = exports2["default"] = /* @__PURE__ */ (function(_Error) { + function ParseError2(code) { + var _this; + _classCallCheck(this, ParseError2); + _this = _callSuper(this, ParseError2, [code]); + Object.setPrototypeOf(_this, ParseError2.prototype); + _this.name = _this.constructor.name; + return _this; + } + _inherits(ParseError2, _Error); + return _createClass(ParseError2); + })(/* @__PURE__ */ _wrapNativeSuper(Error)); + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/tools/semver-compare.js +var require_semver_compare = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/tools/semver-compare.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = _default; + function _default(a, b) { + a = a.split("-"); + b = b.split("-"); + var pa = a[0].split("."); + var pb = b[0].split("."); + for (var i = 0; i < 3; i++) { + var na = Number(pa[i]); + var nb = Number(pb[i]); + if (na > nb) return 1; + if (nb > na) return -1; + if (!isNaN(na) && isNaN(nb)) return 1; + if (isNaN(na) && !isNaN(nb)) return -1; + } + if (a[1] && b[1]) { + return a[1] > b[1] ? 1 : a[1] < b[1] ? -1 : 0; + } + return !a[1] && b[1] ? 1 : a[1] && !b[1] ? -1 : 0; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/isCallingCode.js +var require_isCallingCode = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/isCallingCode.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = isCallingCode; + var CALLING_CODE_REG_EXP = /^\d+$/; + function isCallingCode(string) { + return CALLING_CODE_REG_EXP.test(string); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/metadata.js +var require_metadata = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/metadata.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = void 0; + exports2.getCountryCallingCode = getCountryCallingCode; + exports2.getExtPrefix = getExtPrefix; + exports2.isSupportedCountry = isSupportedCountry; + exports2.validateMetadata = validateMetadata; + var _semverCompare = _interopRequireDefault(require_semver_compare()); + var _isObject = _interopRequireDefault(require_isObject()); + var _isCallingCode = _interopRequireDefault(require_isCallingCode()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); + } + function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o); + } + } + function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: false }), e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + var V3 = "1.2.0"; + var V4 = "1.7.35"; + var DEFAULT_EXT_PREFIX = " ext. "; + var Metadata = exports2["default"] = /* @__PURE__ */ (function() { + function Metadata2(metadata) { + _classCallCheck(this, Metadata2); + validateMetadata(metadata); + this.metadata = metadata; + setVersion.call(this, metadata); + } + return _createClass(Metadata2, [{ + key: "getCountries", + value: function getCountries() { + return Object.keys(this.metadata.countries).filter(function(_2) { + return _2 !== "001"; + }); + } + }, { + key: "getCountryMetadata", + value: function getCountryMetadata(countryCode) { + return this.metadata.countries[countryCode]; + } + }, { + key: "nonGeographic", + value: function nonGeographic() { + if (this.v1 || this.v2 || this.v3) return; + return this.metadata.nonGeographic || this.metadata.nonGeographical; + } + }, { + key: "hasCountry", + value: function hasCountry(country2) { + return this.getCountryMetadata(country2) !== void 0; + } + }, { + key: "hasCallingCode", + value: function hasCallingCode(callingCode) { + if (this.getCountryCodesForCallingCode(callingCode)) { + return true; + } + if (this.nonGeographic()) { + if (this.nonGeographic()[callingCode]) { + return true; + } + } else { + var countryCodes = this.countryCallingCodes()[callingCode]; + if (countryCodes && countryCodes.length === 1 && countryCodes[0] === "001") { + return true; + } + } + } + }, { + key: "isNonGeographicCallingCode", + value: function isNonGeographicCallingCode(callingCode) { + if (this.nonGeographic()) { + return this.nonGeographic()[callingCode] ? true : false; + } else { + return this.getCountryCodesForCallingCode(callingCode) ? false : true; + } + } + // Deprecated. + }, { + key: "country", + value: function country2(countryCode) { + return this.selectNumberingPlan(countryCode); + } + /** + * Selects a telephone numbering plan based on either a country code or a calling code. + * @param {string} argument — Country code or calling code. + * @param {string} legacyArgumentCallingCode — Legacy argument: calling code, if the first argument is not passed. + */ + }, { + key: "selectNumberingPlan", + value: function selectNumberingPlan(argument, legacyArgumentCallingCode) { + var countryCode; + var callingCode; + if (argument) { + if ((0, _isCallingCode["default"])(argument)) { + callingCode = argument; + } else { + countryCode = argument; + } + } + if (legacyArgumentCallingCode) { + callingCode = legacyArgumentCallingCode; + } + if (countryCode && countryCode !== "001") { + var countryMetadata = this.getCountryMetadata(countryCode); + if (!countryMetadata) { + throw new Error("Unknown country: ".concat(countryCode)); + } + this.numberingPlan = new NumberingPlan(countryMetadata, this); + } else if (callingCode) { + if (!this.hasCallingCode(callingCode)) { + throw new Error("Unknown calling code: ".concat(callingCode)); + } + this.numberingPlan = new NumberingPlan(this.getNumberingPlanMetadata(callingCode), this); + } else { + this.numberingPlan = void 0; + } + return this; + } + }, { + key: "getCountryCodesForCallingCode", + value: function getCountryCodesForCallingCode(callingCode) { + var countryCodes = this.countryCallingCodes()[callingCode]; + if (countryCodes) { + if (countryCodes.length === 1 && countryCodes[0].length === 3) { + return; + } + return countryCodes; + } + } + }, { + key: "getCountryCodeForCallingCode", + value: function getCountryCodeForCallingCode(callingCode) { + var countryCodes = this.getCountryCodesForCallingCode(callingCode); + if (countryCodes) { + return countryCodes[0]; + } + } + }, { + key: "getNumberingPlanMetadata", + value: function getNumberingPlanMetadata(callingCode) { + var countryCode = this.getCountryCodeForCallingCode(callingCode); + if (countryCode) { + return this.getCountryMetadata(countryCode); + } + if (this.nonGeographic()) { + var metadata = this.nonGeographic()[callingCode]; + if (metadata) { + return metadata; + } + } else { + var countryCodes = this.countryCallingCodes()[callingCode]; + if (countryCodes && countryCodes.length === 1 && countryCodes[0] === "001") { + return this.metadata.countries["001"]; + } + } + } + // Deprecated. + }, { + key: "countryCallingCode", + value: function countryCallingCode() { + return this.numberingPlan.callingCode(); + } + // Deprecated. + }, { + key: "IDDPrefix", + value: function IDDPrefix() { + return this.numberingPlan.IDDPrefix(); + } + // Deprecated. + }, { + key: "defaultIDDPrefix", + value: function defaultIDDPrefix() { + return this.numberingPlan.defaultIDDPrefix(); + } + // Deprecated. + }, { + key: "nationalNumberPattern", + value: function nationalNumberPattern() { + return this.numberingPlan.nationalNumberPattern(); + } + // Deprecated. + }, { + key: "possibleLengths", + value: function possibleLengths() { + return this.numberingPlan.possibleLengths(); + } + // Deprecated. + }, { + key: "formats", + value: function formats() { + return this.numberingPlan.formats(); + } + // Deprecated. + }, { + key: "nationalPrefixForParsing", + value: function nationalPrefixForParsing() { + return this.numberingPlan.nationalPrefixForParsing(); + } + // Deprecated. + }, { + key: "nationalPrefixTransformRule", + value: function nationalPrefixTransformRule() { + return this.numberingPlan.nationalPrefixTransformRule(); + } + // Deprecated. + }, { + key: "leadingDigits", + value: function leadingDigits() { + return this.numberingPlan.leadingDigits(); + } + // Deprecated. + }, { + key: "hasTypes", + value: function hasTypes() { + return this.numberingPlan.hasTypes(); + } + // Deprecated. + }, { + key: "type", + value: function type(_type) { + return this.numberingPlan.type(_type); + } + // Deprecated. + }, { + key: "ext", + value: function ext() { + return this.numberingPlan.ext(); + } + }, { + key: "countryCallingCodes", + value: function countryCallingCodes() { + if (this.v1) return this.metadata.country_phone_code_to_countries; + return this.metadata.country_calling_codes; + } + // Deprecated. + }, { + key: "chooseCountryByCountryCallingCode", + value: function chooseCountryByCountryCallingCode(callingCode) { + return this.selectNumberingPlan(callingCode); + } + }, { + key: "hasSelectedNumberingPlan", + value: function hasSelectedNumberingPlan() { + return this.numberingPlan !== void 0; + } + }]); + })(); + var NumberingPlan = /* @__PURE__ */ (function() { + function NumberingPlan2(metadata, globalMetadataObject) { + _classCallCheck(this, NumberingPlan2); + this.globalMetadataObject = globalMetadataObject; + this.metadata = metadata; + setVersion.call(this, globalMetadataObject.metadata); + } + return _createClass(NumberingPlan2, [{ + key: "callingCode", + value: function callingCode() { + return this.metadata[0]; + } + // When multiple countries share the same calling code, + // all phone number formatting rules are included in the metadata + // of the "default" country for that calling code. + // Any other countries' metdata doesn't include any formatting rules. + // Google developers said that such storage architecture was chosen for performance reasons. + // + // For example, for NANPA region ("North American Numbering Plan Administration", + // which includes USA, Canada, Cayman Islands, Bahamas, etc) all formatting rules + // are contained in the metadata of `US` country. + // + // This is not public API. + // + }, { + key: "_getDefaultCountryMetadataForThisCallingCode", + value: function _getDefaultCountryMetadataForThisCallingCode() { + return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode()); + } + // Deprecated. + }, { + key: "getDefaultCountryMetadataForRegion", + value: function getDefaultCountryMetadataForRegion() { + return this._getDefaultCountryMetadataForThisCallingCode(); + } + // Is always present. + }, { + key: "IDDPrefix", + value: function IDDPrefix() { + if (this.v1 || this.v2) return; + return this.metadata[1]; + } + // Is only present when a country supports multiple IDD prefixes. + }, { + key: "defaultIDDPrefix", + value: function defaultIDDPrefix() { + if (this.v1 || this.v2) return; + return this.metadata[12]; + } + }, { + key: "nationalNumberPattern", + value: function nationalNumberPattern() { + if (this.v1 || this.v2) return this.metadata[1]; + return this.metadata[2]; + } + // "possible length" data is always present in Google's metadata. + }, { + key: "possibleLengths", + value: function possibleLengths() { + if (this.v1) return; + return this.metadata[this.v2 ? 2 : 3]; + } + }, { + key: "_getFormats", + value: function _getFormats(metadata) { + return metadata[this.v1 ? 2 : this.v2 ? 3 : 4]; + } + // For countries of the same region (e.g. NANPA) + // formats are all stored in the "main" country for that region. + // E.g. "RU" and "KZ", "US" and "CA". + }, { + key: "formats", + value: function formats() { + var _this = this; + var formats2 = this._getFormats(this.metadata) || this._getFormats(this._getDefaultCountryMetadataForThisCallingCode()) || []; + return formats2.map(function(_2) { + return new Format(_2, _this); + }); + } + }, { + key: "nationalPrefix", + value: function nationalPrefix() { + return this.metadata[this.v1 ? 3 : this.v2 ? 4 : 5]; + } + }, { + key: "_getNationalPrefixFormattingRule", + value: function _getNationalPrefixFormattingRule(metadata) { + return metadata[this.v1 ? 4 : this.v2 ? 5 : 6]; + } + // For countries of the same region (e.g. NANPA) + // national prefix formatting rule is stored in the "main" country for that region. + // E.g. "RU" and "KZ", "US" and "CA". + }, { + key: "nationalPrefixFormattingRule", + value: function nationalPrefixFormattingRule() { + return this._getNationalPrefixFormattingRule(this.metadata) || this._getNationalPrefixFormattingRule(this._getDefaultCountryMetadataForThisCallingCode()); + } + }, { + key: "_nationalPrefixForParsing", + value: function _nationalPrefixForParsing() { + return this.metadata[this.v1 ? 5 : this.v2 ? 6 : 7]; + } + }, { + key: "nationalPrefixForParsing", + value: function nationalPrefixForParsing() { + return this._nationalPrefixForParsing() || this.nationalPrefix(); + } + }, { + key: "nationalPrefixTransformRule", + value: function nationalPrefixTransformRule() { + return this.metadata[this.v1 ? 6 : this.v2 ? 7 : 8]; + } + }, { + key: "_getNationalPrefixIsOptionalWhenFormatting", + value: function _getNationalPrefixIsOptionalWhenFormatting() { + return !!this.metadata[this.v1 ? 7 : this.v2 ? 8 : 9]; + } + // For countries of the same region (e.g. NANPA) + // "national prefix is optional when formatting" flag is + // stored in the "main" country for that region. + // E.g. "RU" and "KZ", "US" and "CA". + }, { + key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat", + value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() { + return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata) || this._getNationalPrefixIsOptionalWhenFormatting(this._getDefaultCountryMetadataForThisCallingCode()); + } + }, { + key: "leadingDigits", + value: function leadingDigits() { + return this.metadata[this.v1 ? 8 : this.v2 ? 9 : 10]; + } + }, { + key: "types", + value: function types() { + return this.metadata[this.v1 ? 9 : this.v2 ? 10 : 11]; + } + }, { + key: "hasTypes", + value: function hasTypes() { + if (this.types() && this.types().length === 0) { + return false; + } + return !!this.types(); + } + }, { + key: "type", + value: function type(_type2) { + if (this.hasTypes() && getType(this.types(), _type2)) { + return new Type(getType(this.types(), _type2), this); + } + } + }, { + key: "ext", + value: function ext() { + if (this.v1 || this.v2) return DEFAULT_EXT_PREFIX; + return this.metadata[13] || DEFAULT_EXT_PREFIX; + } + }]); + })(); + var Format = /* @__PURE__ */ (function() { + function Format2(format, metadata) { + _classCallCheck(this, Format2); + this._format = format; + this.metadata = metadata; + } + return _createClass(Format2, [{ + key: "pattern", + value: function pattern() { + return this._format[0]; + } + }, { + key: "format", + value: function format() { + return this._format[1]; + } + }, { + key: "leadingDigitsPatterns", + value: function leadingDigitsPatterns() { + return this._format[2] || []; + } + }, { + key: "nationalPrefixFormattingRule", + value: function nationalPrefixFormattingRule() { + return this._format[3] || this.metadata.nationalPrefixFormattingRule(); + } + }, { + key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat", + value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() { + return !!this._format[4] || this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat(); + } + }, { + key: "nationalPrefixIsMandatoryWhenFormattingInNationalFormat", + value: function nationalPrefixIsMandatoryWhenFormattingInNationalFormat() { + return this.usesNationalPrefix() && !this.nationalPrefixIsOptionalWhenFormattingInNationalFormat(); + } + // Checks whether national prefix formatting rule contains national prefix. + }, { + key: "usesNationalPrefix", + value: function usesNationalPrefix() { + return this.nationalPrefixFormattingRule() && // Check that national prefix formatting rule is not a "dummy" one. + !FIRST_GROUP_ONLY_PREFIX_PATTERN.test(this.nationalPrefixFormattingRule()) ? true : false; + } + }, { + key: "internationalFormat", + value: function internationalFormat() { + return this._format[5] || this.format(); + } + }]); + })(); + var FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\(?\$1\)?$/; + var Type = /* @__PURE__ */ (function() { + function Type2(type, metadata) { + _classCallCheck(this, Type2); + this.type = type; + this.metadata = metadata; + } + return _createClass(Type2, [{ + key: "pattern", + value: function pattern() { + if (this.metadata.v1) return this.type; + return this.type[0]; + } + }, { + key: "possibleLengths", + value: function possibleLengths() { + if (this.metadata.v1) return; + return this.type[1] || this.metadata.possibleLengths(); + } + }]); + })(); + function getType(types, type) { + switch (type) { + case "FIXED_LINE": + return types[0]; + case "MOBILE": + return types[1]; + case "TOLL_FREE": + return types[2]; + case "PREMIUM_RATE": + return types[3]; + case "PERSONAL_NUMBER": + return types[4]; + case "VOICEMAIL": + return types[5]; + case "UAN": + return types[6]; + case "PAGER": + return types[7]; + case "VOIP": + return types[8]; + case "SHARED_COST": + return types[9]; + } + } + function validateMetadata(metadata) { + if (!metadata) { + throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments."); + } + if (!(0, _isObject["default"])(metadata) || !(0, _isObject["default"])(metadata.countries)) { + throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat((0, _isObject["default"])(metadata) ? "an object of shape: { " + Object.keys(metadata).join(", ") + " }" : "a " + typeOf(metadata) + ": " + metadata, ".")); + } + } + var typeOf = function typeOf2(_2) { + return _typeof(_2); + }; + function getExtPrefix(country2, metadataJson) { + var metadata = new Metadata(metadataJson); + if (metadata.hasCountry(country2)) { + return metadata.selectNumberingPlan(country2).ext(); + } + return DEFAULT_EXT_PREFIX; + } + function getCountryCallingCode(country2, metadataJson) { + var metadata = new Metadata(metadataJson); + if (metadata.hasCountry(country2)) { + return metadata.selectNumberingPlan(country2).countryCallingCode(); + } + throw new Error("Unknown country: ".concat(country2)); + } + function isSupportedCountry(country2, metadataJson) { + return metadataJson.countries.hasOwnProperty(country2); + } + function setVersion(metadata) { + var version2 = metadata.version; + if (typeof version2 === "number") { + this.v1 = version2 === 1; + this.v2 = version2 === 2; + this.v3 = version2 === 3; + this.v4 = version2 === 4; + } else { + if (!version2) { + this.v1 = true; + } else if ((0, _semverCompare["default"])(version2, V3) === -1) { + this.v2 = true; + } else if ((0, _semverCompare["default"])(version2, V4) === -1) { + this.v3 = true; + } else { + this.v4 = true; + } + } + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/extension/createExtensionPattern.js +var require_createExtensionPattern = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/extension/createExtensionPattern.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = createExtensionPattern; + var _constants = require_constants3(); + var RFC3966_EXTN_PREFIX = ";ext="; + var getExtensionDigitsPattern = function getExtensionDigitsPattern2(maxLength) { + return "([".concat(_constants.VALID_DIGITS, "]{1,").concat(maxLength, "})"); + }; + function createExtensionPattern(purpose) { + var extLimitAfterExplicitLabel = "20"; + var extLimitAfterLikelyLabel = "15"; + var extLimitAfterAmbiguousChar = "9"; + var extLimitWhenNotSure = "6"; + var possibleSeparatorsBetweenNumberAndExtLabel = "[ \xA0\\t,]*"; + var possibleCharsAfterExtLabel = "[:\\.\uFF0E]?[ \xA0\\t,-]*"; + var optionalExtnSuffix = "#?"; + var explicitExtLabels = "(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)"; + var ambiguousExtLabels = "(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)"; + var ambiguousSeparator = "[- ]+"; + var possibleSeparatorsNumberExtLabelNoComma = "[ \xA0\\t]*"; + var autoDiallingAndExtLabelsFound = "(?:,{2}|;)"; + var rfcExtn = RFC3966_EXTN_PREFIX + getExtensionDigitsPattern(extLimitAfterExplicitLabel); + var explicitExtn = possibleSeparatorsBetweenNumberAndExtLabel + explicitExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterExplicitLabel) + optionalExtnSuffix; + var ambiguousExtn = possibleSeparatorsBetweenNumberAndExtLabel + ambiguousExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix; + var americanStyleExtnWithSuffix = ambiguousSeparator + getExtensionDigitsPattern(extLimitWhenNotSure) + "#"; + var autoDiallingExtn = possibleSeparatorsNumberExtLabelNoComma + autoDiallingAndExtLabelsFound + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterLikelyLabel) + optionalExtnSuffix; + var onlyCommasExtn = possibleSeparatorsNumberExtLabelNoComma + "(?:,)+" + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix; + return rfcExtn + "|" + explicitExtn + "|" + ambiguousExtn + "|" + americanStyleExtnWithSuffix + "|" + autoDiallingExtn + "|" + onlyCommasExtn; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/isViablePhoneNumber.js +var require_isViablePhoneNumber = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/isViablePhoneNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.VALID_PHONE_NUMBER_WITH_EXTENSION = exports2.VALID_PHONE_NUMBER = void 0; + exports2["default"] = isViablePhoneNumber; + exports2.isViablePhoneNumberStart = isViablePhoneNumberStart; + var _constants = require_constants3(); + var _createExtensionPattern = _interopRequireDefault(require_createExtensionPattern()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var MIN_LENGTH_PHONE_NUMBER_PATTERN = "[" + _constants.VALID_DIGITS + "]{" + _constants.MIN_LENGTH_FOR_NSN + "}"; + var VALID_PHONE_NUMBER = exports2.VALID_PHONE_NUMBER = "[" + _constants.PLUS_CHARS + "]{0,1}(?:[" + _constants.VALID_PUNCTUATION + "]*[" + _constants.VALID_DIGITS + "]){3,}[" + _constants.VALID_PUNCTUATION + _constants.VALID_DIGITS + "]*"; + var VALID_PHONE_NUMBER_START_REG_EXP = new RegExp("^[" + _constants.PLUS_CHARS + "]{0,1}(?:[" + _constants.VALID_PUNCTUATION + "]*[" + _constants.VALID_DIGITS + "]){1,2}$", "i"); + var VALID_PHONE_NUMBER_WITH_EXTENSION = exports2.VALID_PHONE_NUMBER_WITH_EXTENSION = VALID_PHONE_NUMBER + // Phone number extensions + "(?:" + (0, _createExtensionPattern["default"])() + ")?"; + var VALID_PHONE_NUMBER_PATTERN = new RegExp( + // Either a short two-digit-only phone number + "^" + MIN_LENGTH_PHONE_NUMBER_PATTERN + "$|^" + VALID_PHONE_NUMBER_WITH_EXTENSION + "$", + "i" + ); + function isViablePhoneNumber(number) { + return number.length >= _constants.MIN_LENGTH_FOR_NSN && VALID_PHONE_NUMBER_PATTERN.test(number); + } + function isViablePhoneNumberStart(number) { + return VALID_PHONE_NUMBER_START_REG_EXP.test(number); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/extension/extractExtension.js +var require_extractExtension = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/extension/extractExtension.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = extractExtension; + var _createExtensionPattern = _interopRequireDefault(require_createExtensionPattern()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var EXTN_PATTERN = new RegExp("(?:" + (0, _createExtensionPattern["default"])() + ")$", "i"); + function extractExtension(number) { + var start = number.search(EXTN_PATTERN); + if (start < 0) { + return {}; + } + var numberWithoutExtension = number.slice(0, start); + var matches = number.match(EXTN_PATTERN); + var i = 1; + while (i < matches.length) { + if (matches[i]) { + return { + number: numberWithoutExtension, + ext: matches[i] + }; + } + i++; + } + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/parseDigits.js +var require_parseDigits = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/parseDigits.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.DIGITS = void 0; + exports2["default"] = parseDigits; + exports2.parseDigit = parseDigit; + function _createForOfIteratorHelperLoose(r, e) { + var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (t) return (t = t.call(r)).next.bind(t); + if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { + t && (r = t); + var o = 0; + return function() { + return o >= r.length ? { done: true } : { done: false, value: r[o++] }; + }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + var DIGITS = exports2.DIGITS = { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "9": "9", + "\uFF10": "0", + // Fullwidth digit 0 + "\uFF11": "1", + // Fullwidth digit 1 + "\uFF12": "2", + // Fullwidth digit 2 + "\uFF13": "3", + // Fullwidth digit 3 + "\uFF14": "4", + // Fullwidth digit 4 + "\uFF15": "5", + // Fullwidth digit 5 + "\uFF16": "6", + // Fullwidth digit 6 + "\uFF17": "7", + // Fullwidth digit 7 + "\uFF18": "8", + // Fullwidth digit 8 + "\uFF19": "9", + // Fullwidth digit 9 + "\u0660": "0", + // Arabic-indic digit 0 + "\u0661": "1", + // Arabic-indic digit 1 + "\u0662": "2", + // Arabic-indic digit 2 + "\u0663": "3", + // Arabic-indic digit 3 + "\u0664": "4", + // Arabic-indic digit 4 + "\u0665": "5", + // Arabic-indic digit 5 + "\u0666": "6", + // Arabic-indic digit 6 + "\u0667": "7", + // Arabic-indic digit 7 + "\u0668": "8", + // Arabic-indic digit 8 + "\u0669": "9", + // Arabic-indic digit 9 + "\u06F0": "0", + // Eastern-Arabic digit 0 + "\u06F1": "1", + // Eastern-Arabic digit 1 + "\u06F2": "2", + // Eastern-Arabic digit 2 + "\u06F3": "3", + // Eastern-Arabic digit 3 + "\u06F4": "4", + // Eastern-Arabic digit 4 + "\u06F5": "5", + // Eastern-Arabic digit 5 + "\u06F6": "6", + // Eastern-Arabic digit 6 + "\u06F7": "7", + // Eastern-Arabic digit 7 + "\u06F8": "8", + // Eastern-Arabic digit 8 + "\u06F9": "9" + // Eastern-Arabic digit 9 + }; + function parseDigit(character) { + return DIGITS[character]; + } + function parseDigits(string) { + var result = ""; + for (var _iterator = _createForOfIteratorHelperLoose(string.split("")), _step; !(_step = _iterator()).done; ) { + var character = _step.value; + var digit = parseDigit(character); + if (digit) { + result += digit; + } + } + return result; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/parseIncompletePhoneNumber.js +var require_parseIncompletePhoneNumber = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/parseIncompletePhoneNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = parseIncompletePhoneNumber; + exports2.parsePhoneNumberCharacter = parsePhoneNumberCharacter; + var _parseDigits = require_parseDigits(); + function _createForOfIteratorHelperLoose(r, e) { + var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (t) return (t = t.call(r)).next.bind(t); + if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { + t && (r = t); + var o = 0; + return function() { + return o >= r.length ? { done: true } : { done: false, value: r[o++] }; + }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + function parseIncompletePhoneNumber(string) { + var result = ""; + for (var _iterator = _createForOfIteratorHelperLoose(string.split("")), _step; !(_step = _iterator()).done; ) { + var character = _step.value; + result += parsePhoneNumberCharacter(character, result) || ""; + } + return result; + } + function parsePhoneNumberCharacter(character, prevParsedCharacters, eventListener) { + if (character === "+") { + if (prevParsedCharacters) { + if (typeof eventListener === "function") { + eventListener("end"); + } + return; + } + return "+"; + } + return (0, _parseDigits.parseDigit)(character); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/getCountryCallingCode.js +var require_getCountryCallingCode = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/getCountryCallingCode.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + Object.defineProperty(exports2, "default", { + enumerable: true, + get: function get() { + return _metadata.getCountryCallingCode; + } + }); + var _metadata = require_metadata(); + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/mergeArrays.js +var require_mergeArrays = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/mergeArrays.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = mergeArrays; + function _createForOfIteratorHelperLoose(r, e) { + var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (t) return (t = t.call(r)).next.bind(t); + if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { + t && (r = t); + var o = 0; + return function() { + return o >= r.length ? { done: true } : { done: false, value: r[o++] }; + }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + function mergeArrays(a, b) { + var merged = a.slice(); + for (var _iterator = _createForOfIteratorHelperLoose(b), _step; !(_step = _iterator()).done; ) { + var element = _step.value; + if (a.indexOf(element) < 0) { + merged.push(element); + } + } + return merged.sort(function(a2, b2) { + return a2 - b2; + }); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/checkNumberLength.js +var require_checkNumberLength = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/checkNumberLength.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.checkNumberLengthForType = checkNumberLengthForType; + exports2["default"] = checkNumberLength; + var _metadata = _interopRequireDefault(require_metadata()); + var _mergeArrays = _interopRequireDefault(require_mergeArrays()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function checkNumberLength(nationalNumber, country2, metadata) { + return checkNumberLengthForType(nationalNumber, void 0, country2, metadata); + } + function checkNumberLengthForType(nationalNumber, type, country2, metadata) { + if (country2) { + metadata = new _metadata["default"](metadata.metadata); + metadata.selectNumberingPlan(country2); + } + var type_info = metadata.type(type); + var possible_lengths = type_info && type_info.possibleLengths() || metadata.possibleLengths(); + if (!possible_lengths) { + return "IS_POSSIBLE"; + } + if (type === "FIXED_LINE_OR_MOBILE") { + if (!metadata.type("FIXED_LINE")) { + return checkNumberLengthForType(nationalNumber, "MOBILE", country2, metadata); + } + var mobile_type = metadata.type("MOBILE"); + if (mobile_type) { + possible_lengths = (0, _mergeArrays["default"])(possible_lengths, mobile_type.possibleLengths()); + } + } else if (type && !type_info) { + return "INVALID_LENGTH"; + } + var actual_length = nationalNumber.length; + var minimum_length = possible_lengths[0]; + if (minimum_length === actual_length) { + return "IS_POSSIBLE"; + } + if (minimum_length > actual_length) { + return "TOO_SHORT"; + } + if (possible_lengths[possible_lengths.length - 1] < actual_length) { + return "TOO_LONG"; + } + return possible_lengths.indexOf(actual_length, 1) >= 0 ? "IS_POSSIBLE" : "INVALID_LENGTH"; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/isPossible.js +var require_isPossible = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/isPossible.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = isPossiblePhoneNumber; + exports2.isPossibleNumber = isPossibleNumber; + var _metadata = _interopRequireDefault(require_metadata()); + var _checkNumberLength = _interopRequireDefault(require_checkNumberLength()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function isPossiblePhoneNumber(input, options, metadataJson) { + if (options === void 0) { + options = {}; + } + var metadata = new _metadata["default"](metadataJson); + if (options.v2) { + if (!input.countryCallingCode) { + throw new Error("Invalid phone number object passed"); + } + metadata.selectNumberingPlan(input.country || input.countryCallingCode); + } else { + if (!input.phone) { + return false; + } + if (input.country) { + if (!metadata.hasCountry(input.country)) { + throw new Error("Unknown country: ".concat(input.country)); + } + metadata.selectNumberingPlan(input.country); + } else { + if (!input.countryCallingCode) { + throw new Error("Invalid phone number object passed"); + } + metadata.selectNumberingPlan(input.countryCallingCode); + } + } + if (metadata.possibleLengths()) { + return isPossibleNumber(input.phone || input.nationalNumber, metadata); + } + if (input.countryCallingCode && metadata.isNonGeographicCallingCode(input.countryCallingCode)) { + return true; + } + throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.'); + } + function isPossibleNumber(nationalNumber, metadata) { + switch ((0, _checkNumberLength["default"])(nationalNumber, void 0, metadata)) { + case "IS_POSSIBLE": + return true; + // This library ignores "local-only" phone numbers (for simplicity). + // See the readme for more info on what are "local-only" phone numbers. + // case 'IS_POSSIBLE_LOCAL_ONLY': + // return !isInternational + default: + return false; + } + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/matchesEntirely.js +var require_matchesEntirely = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/matchesEntirely.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = matchesEntirely; + function matchesEntirely(text, regularExpressionText) { + text = text || ""; + return new RegExp("^(?:" + regularExpressionText + ")$").test(text); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/getNumberType.js +var require_getNumberType = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/getNumberType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = getNumberType; + exports2.isNumberTypeEqualTo = isNumberTypeEqualTo; + var _metadata = _interopRequireDefault(require_metadata()); + var _matchesEntirely = _interopRequireDefault(require_matchesEntirely()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _createForOfIteratorHelperLoose(r, e) { + var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (t) return (t = t.call(r)).next.bind(t); + if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { + t && (r = t); + var o = 0; + return function() { + return o >= r.length ? { done: true } : { done: false, value: r[o++] }; + }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + var NON_FIXED_LINE_PHONE_TYPES = ["MOBILE", "PREMIUM_RATE", "TOLL_FREE", "SHARED_COST", "VOIP", "PERSONAL_NUMBER", "PAGER", "UAN", "VOICEMAIL"]; + function getNumberType(input, options, metadataJson) { + options = options || {}; + if (!input.country && !input.countryCallingCode) { + return; + } + var metadata = new _metadata["default"](metadataJson); + metadata.selectNumberingPlan(input.country || input.countryCallingCode); + var nationalNumber = options.v2 ? input.nationalNumber : input.phone; + if (!(0, _matchesEntirely["default"])(nationalNumber, metadata.nationalNumberPattern())) { + return; + } + if (isNumberTypeEqualTo(nationalNumber, "FIXED_LINE", metadata)) { + if (metadata.type("MOBILE") && metadata.type("MOBILE").pattern() === "") { + return "FIXED_LINE_OR_MOBILE"; + } + if (!metadata.type("MOBILE")) { + return "FIXED_LINE_OR_MOBILE"; + } + if (isNumberTypeEqualTo(nationalNumber, "MOBILE", metadata)) { + return "FIXED_LINE_OR_MOBILE"; + } + return "FIXED_LINE"; + } + for (var _iterator = _createForOfIteratorHelperLoose(NON_FIXED_LINE_PHONE_TYPES), _step; !(_step = _iterator()).done; ) { + var type = _step.value; + if (isNumberTypeEqualTo(nationalNumber, type, metadata)) { + return type; + } + } + } + function isNumberTypeEqualTo(nationalNumber, type, metadata) { + var typeDefinition = metadata.type(type); + if (!typeDefinition || !typeDefinition.pattern()) { + return false; + } + if (typeDefinition.possibleLengths() && typeDefinition.possibleLengths().indexOf(nationalNumber.length) < 0) { + return false; + } + return (0, _matchesEntirely["default"])(nationalNumber, typeDefinition.pattern()); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/isValid.js +var require_isValid = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/isValid.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = isValidNumber; + var _metadata = _interopRequireDefault(require_metadata()); + var _matchesEntirely = _interopRequireDefault(require_matchesEntirely()); + var _getNumberType = _interopRequireDefault(require_getNumberType()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function isValidNumber(input, options, metadataJson) { + options = options || {}; + var metadata = new _metadata["default"](metadataJson); + metadata.selectNumberingPlan(input.country || input.countryCallingCode); + if (metadata.hasTypes()) { + return (0, _getNumberType["default"])(input, options, metadata.metadata) !== void 0; + } + var nationalNumber = options.v2 ? input.nationalNumber : input.phone; + return (0, _matchesEntirely["default"])(nationalNumber, metadata.nationalNumberPattern()); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/isCountryCode.js +var require_isCountryCode = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/isCountryCode.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = isCountryCode; + var COUNTRY_CODE_REG_EXP = /^[A-Z]{2}$/; + function isCountryCode(string) { + return COUNTRY_CODE_REG_EXP.test(string); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/getCountryAndCallingCodeFromOneOfThem.js +var require_getCountryAndCallingCodeFromOneOfThem = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/getCountryAndCallingCodeFromOneOfThem.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = getCountryAndCallingCodeFromOneOfThem; + var _metadata = _interopRequireDefault(require_metadata()); + var _isCountryCode = _interopRequireDefault(require_isCountryCode()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var USE_NON_GEOGRAPHIC_COUNTRY_CODE = false; + function getCountryAndCallingCodeFromOneOfThem(countryOrCallingCode, metadataJson) { + var country2; + var callingCode; + var metadata = new _metadata["default"](metadataJson); + if ((0, _isCountryCode["default"])(countryOrCallingCode)) { + country2 = countryOrCallingCode; + metadata.selectNumberingPlan(country2); + callingCode = metadata.countryCallingCode(); + } else { + callingCode = countryOrCallingCode; + if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) { + if (metadata.isNonGeographicCallingCode(callingCode)) { + country2 = "001"; + } + } + } + return { + country: country2, + callingCode + }; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/getPossibleCountriesForNumber.js +var require_getPossibleCountriesForNumber = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/getPossibleCountriesForNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = getPossibleCountriesForNumber; + var _metadata2 = _interopRequireDefault(require_metadata()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function getPossibleCountriesForNumber(callingCode, nationalNumber, metadata) { + var _metadata = new _metadata2["default"](metadata); + var possibleCountries = _metadata.getCountryCodesForCallingCode(callingCode); + if (!possibleCountries) { + return []; + } + return possibleCountries.filter(function(country2) { + return couldNationalNumberBelongToCountry(nationalNumber, country2, metadata); + }); + } + function couldNationalNumberBelongToCountry(nationalNumber, country2, metadataJson) { + var metadata = new _metadata2["default"](metadataJson); + metadata.selectNumberingPlan(country2); + return metadata.numberingPlan.possibleLengths().indexOf(nationalNumber.length) >= 0; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/stripIddPrefix.js +var require_stripIddPrefix = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/stripIddPrefix.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = stripIddPrefix; + var _metadata = _interopRequireDefault(require_metadata()); + var _constants = require_constants3(); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var CAPTURING_DIGIT_PATTERN = new RegExp("([" + _constants.VALID_DIGITS + "])"); + function stripIddPrefix(number, country2, callingCode, metadataJson) { + if (!country2) { + return; + } + var metadata = new _metadata["default"](metadataJson); + metadata.selectNumberingPlan(country2 || callingCode); + var IDDPrefixPattern = new RegExp(metadata.IDDPrefix()); + if (number.search(IDDPrefixPattern) !== 0) { + return; + } + number = number.slice(number.match(IDDPrefixPattern)[0].length); + var matchedGroups = number.match(CAPTURING_DIGIT_PATTERN); + if (matchedGroups && matchedGroups[1] != null && matchedGroups[1].length > 0) { + if (matchedGroups[1] === "0") { + return; + } + } + return number; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +var require_extractNationalNumberFromPossiblyIncompleteNumber = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = extractNationalNumberFromPossiblyIncompleteNumber; + function extractNationalNumberFromPossiblyIncompleteNumber(number, metadata) { + if (number && metadata.numberingPlan.nationalPrefixForParsing()) { + var prefixPattern = new RegExp("^(?:" + metadata.numberingPlan.nationalPrefixForParsing() + ")"); + var prefixMatch = prefixPattern.exec(number); + if (prefixMatch) { + var nationalNumber; + var carrierCode; + var capturedGroupsCount = prefixMatch.length - 1; + var hasCapturedGroups = capturedGroupsCount > 0 && prefixMatch[capturedGroupsCount]; + if (metadata.nationalPrefixTransformRule() && hasCapturedGroups) { + nationalNumber = number.replace(prefixPattern, metadata.nationalPrefixTransformRule()); + if (capturedGroupsCount > 1) { + carrierCode = prefixMatch[1]; + } + } else { + var prefixBeforeNationalNumber = prefixMatch[0]; + nationalNumber = number.slice(prefixBeforeNationalNumber.length); + if (hasCapturedGroups) { + carrierCode = prefixMatch[1]; + } + } + var nationalPrefix; + if (hasCapturedGroups) { + var possiblePositionOfTheFirstCapturedGroup = number.indexOf(prefixMatch[1]); + var possibleNationalPrefix = number.slice(0, possiblePositionOfTheFirstCapturedGroup); + if (possibleNationalPrefix === metadata.numberingPlan.nationalPrefix()) { + nationalPrefix = metadata.numberingPlan.nationalPrefix(); + } + } else { + nationalPrefix = prefixMatch[0]; + } + return { + nationalNumber, + nationalPrefix, + carrierCode + }; + } + } + return { + nationalNumber: number + }; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/getCountryByNationalNumber.js +var require_getCountryByNationalNumber = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/getCountryByNationalNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = getCountryByNationalNumber; + var _metadata = _interopRequireDefault(require_metadata()); + var _getNumberType = _interopRequireDefault(require_getNumberType()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _createForOfIteratorHelperLoose(r, e) { + var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (t) return (t = t.call(r)).next.bind(t); + if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { + t && (r = t); + var o = 0; + return function() { + return o >= r.length ? { done: true } : { done: false, value: r[o++] }; + }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + function getCountryByNationalNumber(nationalNumber, countries, metadataJson) { + var metadata = new _metadata["default"](metadataJson); + for (var _iterator = _createForOfIteratorHelperLoose(countries), _step; !(_step = _iterator()).done; ) { + var country2 = _step.value; + metadata.selectNumberingPlan(country2); + if (metadata.leadingDigits()) { + if (nationalNumber && nationalNumber.search(metadata.leadingDigits()) === 0) { + return country2; + } + } else if ((0, _getNumberType["default"])({ + phone: nationalNumber, + country: country2 + }, void 0, metadata.metadata)) { + return country2; + } + } + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/getCountryByCallingCode.js +var require_getCountryByCallingCode = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/getCountryByCallingCode.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = getCountryByCallingCode; + var _getCountryByNationalNumber = _interopRequireDefault(require_getCountryByNationalNumber()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var USE_NON_GEOGRAPHIC_COUNTRY_CODE = false; + function getCountryByCallingCode(callingCode, _ref) { + var nationalNumber = _ref.nationalNumber, metadata = _ref.metadata; + if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) { + if (metadata.isNonGeographicCallingCode(callingCode)) { + return "001"; + } + } + var possibleCountries = metadata.getCountryCodesForCallingCode(callingCode); + if (!possibleCountries) { + return; + } + if (possibleCountries.length === 1) { + return possibleCountries[0]; + } + return (0, _getCountryByNationalNumber["default"])(nationalNumber, possibleCountries, metadata.metadata); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/extractNationalNumber.js +var require_extractNationalNumber = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/extractNationalNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = extractNationalNumber; + var _extractNationalNumberFromPossiblyIncompleteNumber = _interopRequireDefault(require_extractNationalNumberFromPossiblyIncompleteNumber()); + var _matchesEntirely = _interopRequireDefault(require_matchesEntirely()); + var _checkNumberLength = _interopRequireDefault(require_checkNumberLength()); + var _getCountryByCallingCode = _interopRequireDefault(require_getCountryByCallingCode()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function extractNationalNumber(number, country2, metadata) { + var _extractNationalNumbe = (0, _extractNationalNumberFromPossiblyIncompleteNumber["default"])(number, metadata), carrierCode = _extractNationalNumbe.carrierCode, nationalNumber = _extractNationalNumbe.nationalNumber; + if (nationalNumber !== number) { + if (!shouldHaveExtractedNationalPrefix(number, nationalNumber, metadata)) { + return { + nationalNumber: number + }; + } + if (metadata.numberingPlan.possibleLengths()) { + if (!country2) { + country2 = (0, _getCountryByCallingCode["default"])(metadata.numberingPlan.callingCode(), { + nationalNumber, + metadata + }); + } + if (!isPossibleIncompleteNationalNumber(nationalNumber, country2, metadata)) { + return { + nationalNumber: number + }; + } + } + } + return { + nationalNumber, + carrierCode + }; + } + function shouldHaveExtractedNationalPrefix(nationalNumberBefore, nationalNumberAfter, metadata) { + if ((0, _matchesEntirely["default"])(nationalNumberBefore, metadata.nationalNumberPattern()) && !(0, _matchesEntirely["default"])(nationalNumberAfter, metadata.nationalNumberPattern())) { + return false; + } + return true; + } + function isPossibleIncompleteNationalNumber(nationalNumber, country2, metadata) { + switch ((0, _checkNumberLength["default"])(nationalNumber, country2, metadata)) { + case "TOO_SHORT": + case "INVALID_LENGTH": + return false; + default: + return true; + } + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +var require_extractCountryCallingCodeFromInternationalNumberWithoutPlusSign = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign; + var _metadata = _interopRequireDefault(require_metadata()); + var _matchesEntirely = _interopRequireDefault(require_matchesEntirely()); + var _extractNationalNumber = _interopRequireDefault(require_extractNationalNumber()); + var _checkNumberLength = _interopRequireDefault(require_checkNumberLength()); + var _getCountryCallingCode = _interopRequireDefault(require_getCountryCallingCode()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country2, defaultCountry, defaultCallingCode, metadataJson) { + if (!(country2 || defaultCountry || defaultCallingCode)) { + return { + number + }; + } + var countryCallingCode = country2 || defaultCountry ? (0, _getCountryCallingCode["default"])(country2 || defaultCountry, metadataJson) : defaultCallingCode; + if (number.indexOf(countryCallingCode) === 0) { + var metadata = new _metadata["default"](metadataJson); + metadata.selectNumberingPlan(country2 || defaultCountry || defaultCallingCode); + var possibleShorterNumber = number.slice(countryCallingCode.length); + var _extractNationalNumbe = (0, _extractNationalNumber["default"])(possibleShorterNumber, void 0, metadata), possibleShorterNationalNumber = _extractNationalNumbe.nationalNumber; + var _extractNationalNumbe2 = (0, _extractNationalNumber["default"])(number, void 0, metadata), nationalNumber = _extractNationalNumbe2.nationalNumber; + if (!(0, _matchesEntirely["default"])(nationalNumber, metadata.nationalNumberPattern()) && (0, _matchesEntirely["default"])(possibleShorterNationalNumber, metadata.nationalNumberPattern()) || (0, _checkNumberLength["default"])(nationalNumber, void 0, metadata) === "TOO_LONG") { + return { + countryCallingCode, + number: possibleShorterNumber + }; + } + } + return { + number + }; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/extractCountryCallingCode.js +var require_extractCountryCallingCode = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/extractCountryCallingCode.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = extractCountryCallingCode; + var _stripIddPrefix = _interopRequireDefault(require_stripIddPrefix()); + var _extractCountryCallingCodeFromInternationalNumberWithoutPlusSign = _interopRequireDefault(require_extractCountryCallingCodeFromInternationalNumberWithoutPlusSign()); + var _metadata = _interopRequireDefault(require_metadata()); + var _constants = require_constants3(); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function extractCountryCallingCode(number, country2, defaultCountry, defaultCallingCode, metadataJson) { + if (!number) { + return {}; + } + var isNumberWithIddPrefix; + if (number[0] !== "+") { + var numberWithoutIDD = (0, _stripIddPrefix["default"])(number, country2 || defaultCountry, defaultCallingCode, metadataJson); + if (numberWithoutIDD && numberWithoutIDD !== number) { + isNumberWithIddPrefix = true; + number = "+" + numberWithoutIDD; + } else { + if (country2 || defaultCountry || defaultCallingCode) { + var _extractCountryCallin = (0, _extractCountryCallingCodeFromInternationalNumberWithoutPlusSign["default"])(number, country2, defaultCountry, defaultCallingCode, metadataJson), countryCallingCode = _extractCountryCallin.countryCallingCode, shorterNumber = _extractCountryCallin.number; + if (countryCallingCode) { + return { + countryCallingCodeSource: "FROM_NUMBER_WITHOUT_PLUS_SIGN", + countryCallingCode, + number: shorterNumber + }; + } + } + return { + // No need to set it to `UNSPECIFIED`. It can be just `undefined`. + // countryCallingCodeSource: 'UNSPECIFIED', + number + }; + } + } + if (number[1] === "0") { + return {}; + } + var metadata = new _metadata["default"](metadataJson); + var i = 2; + while (i - 1 <= _constants.MAX_LENGTH_COUNTRY_CODE && i <= number.length) { + var _countryCallingCode = number.slice(1, i); + if (metadata.hasCallingCode(_countryCallingCode)) { + metadata.selectNumberingPlan(_countryCallingCode); + return { + countryCallingCodeSource: isNumberWithIddPrefix ? "FROM_NUMBER_WITH_IDD" : "FROM_NUMBER_WITH_PLUS_SIGN", + countryCallingCode: _countryCallingCode, + number: number.slice(i) + }; + } + i++; + } + return {}; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/applyInternationalSeparatorStyle.js +var require_applyInternationalSeparatorStyle = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/applyInternationalSeparatorStyle.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = applyInternationalSeparatorStyle; + var _constants = require_constants3(); + function applyInternationalSeparatorStyle(formattedNumber) { + return formattedNumber.replace(new RegExp("[".concat(_constants.VALID_PUNCTUATION, "]+"), "g"), " ").trim(); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/formatNationalNumberUsingFormat.js +var require_formatNationalNumberUsingFormat = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/formatNationalNumberUsingFormat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.FIRST_GROUP_PATTERN = void 0; + exports2["default"] = formatNationalNumberUsingFormat; + var _applyInternationalSeparatorStyle = _interopRequireDefault(require_applyInternationalSeparatorStyle()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var FIRST_GROUP_PATTERN = exports2.FIRST_GROUP_PATTERN = /(\$\d)/; + function formatNationalNumberUsingFormat(number, format, _ref) { + var useInternationalFormat = _ref.useInternationalFormat, withNationalPrefix = _ref.withNationalPrefix, carrierCode = _ref.carrierCode, metadata = _ref.metadata; + var formattedNumber = number.replace(new RegExp(format.pattern()), useInternationalFormat ? format.internationalFormat() : ( + // This library doesn't use `domestic_carrier_code_formatting_rule`, + // because that one is only used when formatting phone numbers + // for dialing from a mobile phone, and this is not a dialing library. + // carrierCode && format.domesticCarrierCodeFormattingRule() + // // First, replace the $CC in the formatting rule with the desired carrier code. + // // Then, replace the $FG in the formatting rule with the first group + // // and the carrier code combined in the appropriate way. + // ? format.format().replace(FIRST_GROUP_PATTERN, format.domesticCarrierCodeFormattingRule().replace('$CC', carrierCode)) + // : ( + // withNationalPrefix && format.nationalPrefixFormattingRule() + // ? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule()) + // : format.format() + // ) + withNationalPrefix && format.nationalPrefixFormattingRule() ? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule()) : format.format() + )); + if (useInternationalFormat) { + return (0, _applyInternationalSeparatorStyle["default"])(formattedNumber); + } + return formattedNumber; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/getIddPrefix.js +var require_getIddPrefix = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/getIddPrefix.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = getIddPrefix; + var _metadata = _interopRequireDefault(require_metadata()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var SINGLE_IDD_PREFIX_REG_EXP = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/; + function getIddPrefix(country2, callingCode, metadata) { + var countryMetadata = new _metadata["default"](metadata); + countryMetadata.selectNumberingPlan(country2 || callingCode); + if (countryMetadata.defaultIDDPrefix()) { + return countryMetadata.defaultIDDPrefix(); + } + if (SINGLE_IDD_PREFIX_REG_EXP.test(countryMetadata.IDDPrefix())) { + return countryMetadata.IDDPrefix(); + } + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/RFC3966.js +var require_RFC3966 = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/RFC3966.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.formatRFC3966 = formatRFC3966; + exports2.parseRFC3966 = parseRFC3966; + var _isViablePhoneNumber = _interopRequireDefault(require_isViablePhoneNumber()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); + } + function _nonIterableRest() { + 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 _iterableToArrayLimit(r, l2) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, n, i, u, a = [], f = true, o = false; + try { + if (i = (t = t.call(r)).next, 0 === l2) { + if (Object(t) !== t) return; + f = false; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l2); f = true) ; + } catch (r2) { + o = true, n = r2; + } finally { + try { + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } + } + function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; + } + function _createForOfIteratorHelperLoose(r, e) { + var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (t) return (t = t.call(r)).next.bind(t); + if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { + t && (r = t); + var o = 0; + return function() { + return o >= r.length ? { done: true } : { done: false, value: r[o++] }; + }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + function parseRFC3966(text) { + var number; + var ext; + text = text.replace(/^tel:/, "tel="); + for (var _iterator = _createForOfIteratorHelperLoose(text.split(";")), _step; !(_step = _iterator()).done; ) { + var part = _step.value; + var _part$split = part.split("="), _part$split2 = _slicedToArray(_part$split, 2), name = _part$split2[0], value = _part$split2[1]; + switch (name) { + case "tel": + number = value; + break; + case "ext": + ext = value; + break; + case "phone-context": + if (value[0] === "+") { + number = value + number; + } + break; + } + } + if (!(0, _isViablePhoneNumber["default"])(number)) { + return {}; + } + var result = { + number + }; + if (ext) { + result.ext = ext; + } + return result; + } + function formatRFC3966(_ref) { + var number = _ref.number, ext = _ref.ext; + if (!number) { + return ""; + } + if (number[0] !== "+") { + throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.'); + } + return "tel:".concat(number).concat(ext ? ";ext=" + ext : ""); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/format.js +var require_format = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/format.js"(exports2) { + "use strict"; + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.chooseFormatForNumber = chooseFormatForNumber; + exports2["default"] = formatNumber2; + var _matchesEntirely = _interopRequireDefault(require_matchesEntirely()); + var _formatNationalNumberUsingFormat = _interopRequireDefault(require_formatNationalNumberUsingFormat()); + var _metadata = _interopRequireWildcard(require_metadata()); + var _getIddPrefix = _interopRequireDefault(require_getIddPrefix()); + var _RFC = require_RFC3966(); + function _interopRequireWildcard(e, t) { + if ("function" == typeof WeakMap) var r = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(); + return (_interopRequireWildcard = function _interopRequireWildcard2(e2, t2) { + if (!t2 && e2 && e2.__esModule) return e2; + var o, i, f = { __proto__: null, "default": e2 }; + if (null === e2 || "object" != _typeof(e2) && "function" != typeof e2) return f; + if (o = t2 ? n : r) { + if (o.has(e2)) return o.get(e2); + o.set(e2, f); + } + for (var _t in e2) "default" !== _t && {}.hasOwnProperty.call(e2, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e2, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e2[_t]); + return f; + })(e, t); + } + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var DEFAULT_OPTIONS = { + formatExtension: function formatExtension(formattedNumber, extension, metadata) { + return "".concat(formattedNumber).concat(metadata.ext()).concat(extension); + } + }; + function formatNumber2(input, format, options, metadataJson) { + if (options) { + options = merge({}, DEFAULT_OPTIONS, options); + } else { + options = DEFAULT_OPTIONS; + } + var metadata = new _metadata["default"](metadataJson); + if (input.country && input.country !== "001") { + if (!metadata.hasCountry(input.country)) { + throw new Error("Unknown country: ".concat(input.country)); + } + metadata.selectNumberingPlan(input.country); + } else if (input.countryCallingCode) { + metadata.selectNumberingPlan(input.countryCallingCode); + } else return input.phone || ""; + var countryCallingCode = metadata.countryCallingCode(); + var nationalNumber = options.v2 ? input.nationalNumber : input.phone; + var number; + switch (format) { + case "NATIONAL": + if (!nationalNumber) { + return ""; + } + number = formatNationalNumber(nationalNumber, input.carrierCode, "NATIONAL", metadata, options); + return addExtension(number, input.ext, metadata, options.formatExtension); + case "INTERNATIONAL": + if (!nationalNumber) { + return "+".concat(countryCallingCode); + } + number = formatNationalNumber(nationalNumber, null, "INTERNATIONAL", metadata, options); + number = "+".concat(countryCallingCode, " ").concat(number); + return addExtension(number, input.ext, metadata, options.formatExtension); + case "E.164": + return "+".concat(countryCallingCode).concat(nationalNumber); + case "RFC3966": + return (0, _RFC.formatRFC3966)({ + number: "+".concat(countryCallingCode).concat(nationalNumber), + ext: input.ext + }); + // For reference, here's Google's IDD formatter: + // https://github.com/google/libphonenumber/blob/32719cf74e68796788d1ca45abc85dcdc63ba5b9/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L1546 + // Not saying that this IDD formatter replicates it 1:1, but it seems to work. + // Who would even need to format phone numbers in IDD format anyway? + case "IDD": + if (!options.fromCountry) { + return; + } + var formattedNumber = formatIDD(nationalNumber, input.carrierCode, countryCallingCode, options.fromCountry, metadata); + if (!formattedNumber) { + return; + } + return addExtension(formattedNumber, input.ext, metadata, options.formatExtension); + default: + throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(format, '"')); + } + } + function formatNationalNumber(number, carrierCode, formatAs, metadata, options) { + var format = chooseFormatForNumber(metadata.formats(), number); + if (!format) { + return number; + } + return (0, _formatNationalNumberUsingFormat["default"])(number, format, { + useInternationalFormat: formatAs === "INTERNATIONAL", + withNationalPrefix: format.nationalPrefixIsOptionalWhenFormattingInNationalFormat() && options && options.nationalPrefix === false ? false : true, + carrierCode, + metadata + }); + } + function chooseFormatForNumber(availableFormats, nationalNumber) { + return pickFirstMatchingElement(availableFormats, function(format) { + if (format.leadingDigitsPatterns().length > 0) { + var lastLeadingDigitsPattern = format.leadingDigitsPatterns()[format.leadingDigitsPatterns().length - 1]; + if (nationalNumber.search(lastLeadingDigitsPattern) !== 0) { + return false; + } + } + return (0, _matchesEntirely["default"])(nationalNumber, format.pattern()); + }); + } + function addExtension(formattedNumber, ext, metadata, formatExtension) { + return ext ? formatExtension(formattedNumber, ext, metadata) : formattedNumber; + } + function formatIDD(nationalNumber, carrierCode, countryCallingCode, fromCountry, metadata) { + var fromCountryCallingCode = (0, _metadata.getCountryCallingCode)(fromCountry, metadata.metadata); + if (fromCountryCallingCode === countryCallingCode) { + var formattedNumber = formatNationalNumber(nationalNumber, carrierCode, "NATIONAL", metadata); + if (countryCallingCode === "1") { + return countryCallingCode + " " + formattedNumber; + } + return formattedNumber; + } + var iddPrefix = (0, _getIddPrefix["default"])(fromCountry, void 0, metadata.metadata); + if (iddPrefix) { + return "".concat(iddPrefix, " ").concat(countryCallingCode, " ").concat(formatNationalNumber(nationalNumber, null, "INTERNATIONAL", metadata)); + } + } + function merge() { + var i = 1; + for (var _len = arguments.length, objects = new Array(_len), _key = 0; _key < _len; _key++) { + objects[_key] = arguments[_key]; + } + while (i < objects.length) { + if (objects[i]) { + for (var key in objects[i]) { + objects[0][key] = objects[i][key]; + } + } + i++; + } + return objects[0]; + } + function pickFirstMatchingElement(elements, testFunction) { + var i = 0; + while (i < elements.length) { + if (testFunction(elements[i])) { + return elements[i]; + } + i++; + } + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/PhoneNumber.js +var require_PhoneNumber = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/PhoneNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = void 0; + var _metadata = _interopRequireWildcard(require_metadata()); + var _isPossible = _interopRequireDefault(require_isPossible()); + var _isValid = _interopRequireDefault(require_isValid()); + var _getNumberType = _interopRequireDefault(require_getNumberType()); + var _getCountryAndCallingCodeFromOneOfThem = _interopRequireDefault(require_getCountryAndCallingCodeFromOneOfThem()); + var _getPossibleCountriesForNumber = _interopRequireDefault(require_getPossibleCountriesForNumber()); + var _extractCountryCallingCode = _interopRequireDefault(require_extractCountryCallingCode()); + var _isObject = _interopRequireDefault(require_isObject()); + var _format2 = _interopRequireDefault(require_format()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _interopRequireWildcard(e, t) { + if ("function" == typeof WeakMap) var r = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(); + return (_interopRequireWildcard = function _interopRequireWildcard2(e2, t2) { + if (!t2 && e2 && e2.__esModule) return e2; + var o, i, f = { __proto__: null, "default": e2 }; + if (null === e2 || "object" != _typeof(e2) && "function" != typeof e2) return f; + if (o = t2 ? n : r) { + if (o.has(e2)) return o.get(e2); + o.set(e2, f); + } + for (var _t in e2) "default" !== _t && {}.hasOwnProperty.call(e2, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e2, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e2[_t]); + return f; + })(e, t); + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function ownKeys2(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys2(Object(t), true).forEach(function(r2) { + _defineProperty(e, r2, t[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys2(Object(t)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); + }); + } + return e; + } + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; + } + function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); + } + function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o); + } + } + function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: false }), e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + var PhoneNumber = exports2["default"] = /* @__PURE__ */ (function() { + function PhoneNumber2(countryOrCountryCallingCode, nationalNumber, metadata) { + _classCallCheck(this, PhoneNumber2); + if (!countryOrCountryCallingCode) { + throw new TypeError("First argument is required"); + } + if (typeof countryOrCountryCallingCode !== "string") { + throw new TypeError("First argument must be a string"); + } + if (countryOrCountryCallingCode[0] === "+" && !nationalNumber) { + throw new TypeError("`metadata` argument not passed"); + } + if ((0, _isObject["default"])(nationalNumber) && (0, _isObject["default"])(nationalNumber.countries)) { + metadata = nationalNumber; + var e164Number = countryOrCountryCallingCode; + if (!E164_NUMBER_REGEXP.test(e164Number)) { + throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits'); + } + var _extractCountryCallin = (0, _extractCountryCallingCode["default"])(e164Number, void 0, void 0, void 0, metadata), _countryCallingCode = _extractCountryCallin.countryCallingCode, number = _extractCountryCallin.number; + nationalNumber = number; + countryOrCountryCallingCode = _countryCallingCode; + if (!nationalNumber) { + throw new Error("Invalid `number` argument passed: too short"); + } + } + if (!nationalNumber) { + throw new TypeError("`nationalNumber` argument is required"); + } + if (typeof nationalNumber !== "string") { + throw new TypeError("`nationalNumber` argument must be a string"); + } + (0, _metadata.validateMetadata)(metadata); + var _getCountryAndCalling = (0, _getCountryAndCallingCodeFromOneOfThem["default"])(countryOrCountryCallingCode, metadata), country2 = _getCountryAndCalling.country, countryCallingCode = _getCountryAndCalling.callingCode; + this.country = country2; + this.countryCallingCode = countryCallingCode; + this.nationalNumber = nationalNumber; + this.number = "+" + this.countryCallingCode + this.nationalNumber; + this.getMetadata = function() { + return metadata; + }; + } + return _createClass(PhoneNumber2, [{ + key: "setExt", + value: function setExt(ext) { + this.ext = ext; + } + }, { + key: "getPossibleCountries", + value: function getPossibleCountries() { + if (this.country) { + return [this.country]; + } + return (0, _getPossibleCountriesForNumber["default"])(this.countryCallingCode, this.nationalNumber, this.getMetadata()); + } + }, { + key: "isPossible", + value: function isPossible() { + return (0, _isPossible["default"])(this, { + v2: true + }, this.getMetadata()); + } + }, { + key: "isValid", + value: function isValid() { + return (0, _isValid["default"])(this, { + v2: true + }, this.getMetadata()); + } + }, { + key: "isNonGeographic", + value: function isNonGeographic() { + var metadata = new _metadata["default"](this.getMetadata()); + return metadata.isNonGeographicCallingCode(this.countryCallingCode); + } + }, { + key: "isEqual", + value: function isEqual(phoneNumber) { + return this.number === phoneNumber.number && this.ext === phoneNumber.ext; + } + // `validateLength()` method was originally meant to be an equivalent for `validatePhoneNumberLength()`. + // + // Later, it became apparent that it's not really a true equivalent. + // The reason is that a `PhoneNumber` instance is not created + // when the phone number string is too short for it to be considered a valid phone number: + // * When there must be at least 2 national (significant) number digits: `"1"`. + // * When the country calling code part of an international number is incomplete: `"+12"`. + // + // So leaving this `validateLength()` method here would suggest a hidden anti-pattern + // of using it instead of `validatePhoneNumberLength()` while ignoring + // the "too short to be even possible" case from phone number length validation. + // And ignoring that case wouldn't make any sense in a real-world application + // because it would still be a valid case that should be handled. + // + // Because of that, this method was eventually commented out in order to not introduce + // that kind of an anti-pattern. + // + // validateLength() { + // const result = checkNumberLength( + // this.nationalNumber, + // undefined, + // this.getMetadata() + // ) + // if (result !== 'IS_POSSIBLE') { + // return result + // } + // } + }, { + key: "getType", + value: function getType() { + return (0, _getNumberType["default"])(this, { + v2: true + }, this.getMetadata()); + } + }, { + key: "format", + value: function format(_format, options) { + return (0, _format2["default"])(this, _format, options ? _objectSpread(_objectSpread({}, options), {}, { + v2: true + }) : { + v2: true + }, this.getMetadata()); + } + }, { + key: "formatNational", + value: function formatNational(options) { + return this.format("NATIONAL", options); + } + }, { + key: "formatInternational", + value: function formatInternational(options) { + return this.format("INTERNATIONAL", options); + } + }, { + key: "getURI", + value: function getURI(options) { + return this.format("RFC3966", options); + } + }]); + })(); + var E164_NUMBER_REGEXP = /^\+\d+$/; + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/extractPhoneContext.js +var require_extractPhoneContext = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/extractPhoneContext.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.RFC3966_PREFIX_ = exports2.RFC3966_PHONE_CONTEXT_ = exports2.RFC3966_ISDN_SUBADDRESS_ = exports2.PLUS_SIGN = void 0; + exports2["default"] = extractPhoneContext; + exports2.isPhoneContextValid = isPhoneContextValid; + var _constants = require_constants3(); + var PLUS_SIGN = exports2.PLUS_SIGN = "+"; + var RFC3966_VISUAL_SEPARATOR_ = "[\\-\\.\\(\\)]?"; + var RFC3966_PHONE_DIGIT_ = "([" + _constants.VALID_DIGITS + "]|" + RFC3966_VISUAL_SEPARATOR_ + ")"; + var RFC3966_GLOBAL_NUMBER_DIGITS_ = "^\\" + PLUS_SIGN + RFC3966_PHONE_DIGIT_ + "*[" + _constants.VALID_DIGITS + "]" + RFC3966_PHONE_DIGIT_ + "*$"; + var RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_ = new RegExp(RFC3966_GLOBAL_NUMBER_DIGITS_, "g"); + var ALPHANUM_ = _constants.VALID_DIGITS; + var RFC3966_DOMAINLABEL_ = "[" + ALPHANUM_ + "]+((\\-)*[" + ALPHANUM_ + "])*"; + var VALID_ALPHA_ = "a-zA-Z"; + var RFC3966_TOPLABEL_ = "[" + VALID_ALPHA_ + "]+((\\-)*[" + ALPHANUM_ + "])*"; + var RFC3966_DOMAINNAME_ = "^(" + RFC3966_DOMAINLABEL_ + "\\.)*" + RFC3966_TOPLABEL_ + "\\.?$"; + var RFC3966_DOMAINNAME_PATTERN_ = new RegExp(RFC3966_DOMAINNAME_, "g"); + var RFC3966_PREFIX_ = exports2.RFC3966_PREFIX_ = "tel:"; + var RFC3966_PHONE_CONTEXT_ = exports2.RFC3966_PHONE_CONTEXT_ = ";phone-context="; + var RFC3966_ISDN_SUBADDRESS_ = exports2.RFC3966_ISDN_SUBADDRESS_ = ";isub="; + function extractPhoneContext(numberToExtractFrom) { + var indexOfPhoneContext = numberToExtractFrom.indexOf(RFC3966_PHONE_CONTEXT_); + if (indexOfPhoneContext < 0) { + return null; + } + var phoneContextStart = indexOfPhoneContext + RFC3966_PHONE_CONTEXT_.length; + if (phoneContextStart >= numberToExtractFrom.length) { + return ""; + } + var phoneContextEnd = numberToExtractFrom.indexOf(";", phoneContextStart); + if (phoneContextEnd >= 0) { + return numberToExtractFrom.substring(phoneContextStart, phoneContextEnd); + } else { + return numberToExtractFrom.substring(phoneContextStart); + } + } + function isPhoneContextValid(phoneContext) { + if (phoneContext === null) { + return true; + } + if (phoneContext.length === 0) { + return false; + } + return RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_.test(phoneContext) || RFC3966_DOMAINNAME_PATTERN_.test(phoneContext); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +var require_extractFormattedPhoneNumberFromPossibleRfc3966NumberUri = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js"(exports2) { + "use strict"; + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = extractFormattedPhoneNumberFromPossibleRfc3966NumberUri; + var _extractPhoneContext = _interopRequireWildcard(require_extractPhoneContext()); + var _ParseError = _interopRequireDefault(require_ParseError()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _interopRequireWildcard(e, t) { + if ("function" == typeof WeakMap) var r = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(); + return (_interopRequireWildcard = function _interopRequireWildcard2(e2, t2) { + if (!t2 && e2 && e2.__esModule) return e2; + var o, i, f = { __proto__: null, "default": e2 }; + if (null === e2 || "object" != _typeof(e2) && "function" != typeof e2) return f; + if (o = t2 ? n : r) { + if (o.has(e2)) return o.get(e2); + o.set(e2, f); + } + for (var _t in e2) "default" !== _t && {}.hasOwnProperty.call(e2, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e2, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e2[_t]); + return f; + })(e, t); + } + function extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(numberToParse, _ref) { + var extractFormattedPhoneNumber = _ref.extractFormattedPhoneNumber; + var phoneContext = (0, _extractPhoneContext["default"])(numberToParse); + if (!(0, _extractPhoneContext.isPhoneContextValid)(phoneContext)) { + throw new _ParseError["default"]("NOT_A_NUMBER"); + } + var phoneNumberString; + if (phoneContext === null) { + phoneNumberString = extractFormattedPhoneNumber(numberToParse) || ""; + } else { + phoneNumberString = ""; + if (phoneContext.charAt(0) === _extractPhoneContext.PLUS_SIGN) { + phoneNumberString += phoneContext; + } + var indexOfRfc3966Prefix = numberToParse.indexOf(_extractPhoneContext.RFC3966_PREFIX_); + var indexOfNationalNumber; + if (indexOfRfc3966Prefix >= 0) { + indexOfNationalNumber = indexOfRfc3966Prefix + _extractPhoneContext.RFC3966_PREFIX_.length; + } else { + indexOfNationalNumber = 0; + } + var indexOfPhoneContext = numberToParse.indexOf(_extractPhoneContext.RFC3966_PHONE_CONTEXT_); + phoneNumberString += numberToParse.substring(indexOfNationalNumber, indexOfPhoneContext); + } + var indexOfIsdn = phoneNumberString.indexOf(_extractPhoneContext.RFC3966_ISDN_SUBADDRESS_); + if (indexOfIsdn > 0) { + phoneNumberString = phoneNumberString.substring(0, indexOfIsdn); + } + if (phoneNumberString !== "") { + return phoneNumberString; + } + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/parse.js +var require_parse = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/parse.js"(exports2) { + "use strict"; + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = parse2; + var _constants = require_constants3(); + var _ParseError = _interopRequireDefault(require_ParseError()); + var _metadata = _interopRequireDefault(require_metadata()); + var _isViablePhoneNumber = _interopRequireWildcard(require_isViablePhoneNumber()); + var _extractExtension = _interopRequireDefault(require_extractExtension()); + var _parseIncompletePhoneNumber = _interopRequireDefault(require_parseIncompletePhoneNumber()); + var _getCountryCallingCode = _interopRequireDefault(require_getCountryCallingCode()); + var _isPossible = require_isPossible(); + var _PhoneNumber = _interopRequireDefault(require_PhoneNumber()); + var _matchesEntirely = _interopRequireDefault(require_matchesEntirely()); + var _extractCountryCallingCode = _interopRequireDefault(require_extractCountryCallingCode()); + var _extractNationalNumber = _interopRequireDefault(require_extractNationalNumber()); + var _getCountryByCallingCode = _interopRequireDefault(require_getCountryByCallingCode()); + var _extractFormattedPhoneNumberFromPossibleRfc3966NumberUri = _interopRequireDefault(require_extractFormattedPhoneNumberFromPossibleRfc3966NumberUri()); + function _interopRequireWildcard(e, t) { + if ("function" == typeof WeakMap) var r = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(); + return (_interopRequireWildcard = function _interopRequireWildcard2(e2, t2) { + if (!t2 && e2 && e2.__esModule) return e2; + var o, i, f = { __proto__: null, "default": e2 }; + if (null === e2 || "object" != _typeof(e2) && "function" != typeof e2) return f; + if (o = t2 ? n : r) { + if (o.has(e2)) return o.get(e2); + o.set(e2, f); + } + for (var _t in e2) "default" !== _t && {}.hasOwnProperty.call(e2, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e2, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e2[_t]); + return f; + })(e, t); + } + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var MAX_INPUT_STRING_LENGTH = 250; + var PHONE_NUMBER_START_PATTERN = new RegExp("[" + _constants.PLUS_CHARS + _constants.VALID_DIGITS + "]"); + var AFTER_PHONE_NUMBER_END_PATTERN = new RegExp("[^" + _constants.VALID_DIGITS + "#]+$"); + var USE_NON_GEOGRAPHIC_COUNTRY_CODE = false; + function parse2(text, options, metadataJson) { + options = options || {}; + var metadata = new _metadata["default"](metadataJson); + if (options.defaultCountry && !metadata.hasCountry(options.defaultCountry)) { + if (options.v2) { + throw new _ParseError["default"]("INVALID_COUNTRY"); + } + throw new Error("Unknown country: ".concat(options.defaultCountry)); + } + var _parseInput = parseInput(text, options.v2, options.extract), formattedPhoneNumber = _parseInput.number, ext = _parseInput.ext, error = _parseInput.error; + if (!formattedPhoneNumber) { + if (options.v2) { + if (error === "TOO_SHORT") { + throw new _ParseError["default"]("TOO_SHORT"); + } + throw new _ParseError["default"]("NOT_A_NUMBER"); + } + return {}; + } + var _parsePhoneNumber = parsePhoneNumber( + formattedPhoneNumber, + options.defaultCountry, + options.defaultCallingCode, + // If `country` is returned, its numbering plan will also be selected in `metadata`. + // Otherwise, if `countryCallingCode` is returned, its numbering plan will also be selected in `metadata`. + // Otherwise, if neither `country` nor `countryCallingCode` are returned, no numbering plan will be selected in `metadata`. + metadata + ), country2 = _parsePhoneNumber.country, nationalNumber = _parsePhoneNumber.nationalNumber, countryCallingCode = _parsePhoneNumber.countryCallingCode, countryCallingCodeSource = _parsePhoneNumber.countryCallingCodeSource, carrierCode = _parsePhoneNumber.carrierCode; + if (!metadata.hasSelectedNumberingPlan()) { + if (options.v2) { + throw new _ParseError["default"]("INVALID_COUNTRY"); + } + return {}; + } + if (!nationalNumber || nationalNumber.length < _constants.MIN_LENGTH_FOR_NSN) { + if (options.v2) { + throw new _ParseError["default"]("TOO_SHORT"); + } + return {}; + } + if (nationalNumber.length > _constants.MAX_LENGTH_FOR_NSN) { + if (options.v2) { + throw new _ParseError["default"]("TOO_LONG"); + } + return {}; + } + if (options.v2) { + var phoneNumber = new _PhoneNumber["default"](countryCallingCode, nationalNumber, metadata.metadata); + if (country2) { + phoneNumber.country = country2; + } + if (carrierCode) { + phoneNumber.carrierCode = carrierCode; + } + if (ext) { + phoneNumber.ext = ext; + } + phoneNumber.__countryCallingCodeSource = countryCallingCodeSource; + return phoneNumber; + } + var valid = (options.extended ? metadata.hasSelectedNumberingPlan() : country2) ? (0, _matchesEntirely["default"])(nationalNumber, metadata.nationalNumberPattern()) : false; + if (!options.extended) { + return valid ? result(country2, nationalNumber, ext) : {}; + } + return { + country: country2, + countryCallingCode, + carrierCode, + valid, + possible: valid ? true : options.extended === true && metadata.possibleLengths() && (0, _isPossible.isPossibleNumber)(nationalNumber, metadata) ? true : false, + phone: nationalNumber, + ext + }; + } + function _extractFormattedPhoneNumber(text, extract, throwOnError) { + if (!text) { + return; + } + if (text.length > MAX_INPUT_STRING_LENGTH) { + if (throwOnError) { + throw new _ParseError["default"]("TOO_LONG"); + } + return; + } + if (extract === false) { + return text; + } + var startsAt = text.search(PHONE_NUMBER_START_PATTERN); + if (startsAt < 0) { + return; + } + return text.slice(startsAt).replace(AFTER_PHONE_NUMBER_END_PATTERN, ""); + } + function parseInput(text, v2, extract) { + var number = (0, _extractFormattedPhoneNumberFromPossibleRfc3966NumberUri["default"])(text, { + extractFormattedPhoneNumber: function extractFormattedPhoneNumber(text2) { + return _extractFormattedPhoneNumber(text2, extract, v2); + } + }); + if (!number) { + return {}; + } + if (!(0, _isViablePhoneNumber["default"])(number)) { + if ((0, _isViablePhoneNumber.isViablePhoneNumberStart)(number)) { + return { + error: "TOO_SHORT" + }; + } + return {}; + } + var withExtensionStripped = (0, _extractExtension["default"])(number); + if (withExtensionStripped.ext) { + return withExtensionStripped; + } + return { + number + }; + } + function result(country2, nationalNumber, ext) { + var result2 = { + country: country2, + phone: nationalNumber + }; + if (ext) { + result2.ext = ext; + } + return result2; + } + function parsePhoneNumber(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata) { + var _extractCountryCallin = (0, _extractCountryCallingCode["default"])( + (0, _parseIncompletePhoneNumber["default"])(formattedPhoneNumber), + void 0, + // `defaultCountry` and `defaultCallingCode` are only used to detect + // if it's an "international" phone number or not. They won't be used + // to derive the resulting `countryCallingCode` from them, or anything like that. + defaultCountry, + defaultCallingCode, + metadata.metadata + ), countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource, countryCallingCode = _extractCountryCallin.countryCallingCode, number = _extractCountryCallin.number; + var country2; + if (countryCallingCode) { + metadata.selectNumberingPlan(countryCallingCode); + } else if (number && (defaultCountry || defaultCallingCode)) { + if (defaultCountry) { + country2 = defaultCountry; + metadata.selectNumberingPlan(defaultCountry); + countryCallingCode = metadata.numberingPlan.callingCode(); + } else { + metadata.selectNumberingPlan(defaultCallingCode); + countryCallingCode = defaultCallingCode; + if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) { + if (metadata.isNonGeographicCallingCode(countryCallingCode)) { + country2 = "001"; + } + } + } + } else return {}; + if (!number) { + return { + countryCallingCodeSource, + countryCallingCode + }; + } + var _extractNationalNumbe = (0, _extractNationalNumber["default"])((0, _parseIncompletePhoneNumber["default"])(number), void 0, metadata), nationalNumber = _extractNationalNumbe.nationalNumber, carrierCode = _extractNationalNumbe.carrierCode; + var exactCountry = (0, _getCountryByCallingCode["default"])(countryCallingCode, { + nationalNumber, + metadata + }); + if (exactCountry) { + country2 = exactCountry; + if (exactCountry === "001") { + } else { + metadata.selectNumberingPlan(country2); + } + } + return { + country: country2, + countryCallingCode, + countryCallingCodeSource, + nationalNumber, + carrierCode + }; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/parsePhoneNumberWithError_.js +var require_parsePhoneNumberWithError = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/parsePhoneNumberWithError_.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = parsePhoneNumberWithError; + var _parse = _interopRequireDefault(require_parse()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function ownKeys2(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys2(Object(t), true).forEach(function(r2) { + _defineProperty(e, r2, t[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys2(Object(t)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); + }); + } + return e; + } + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function parsePhoneNumberWithError(text, options, metadata) { + return (0, _parse["default"])(text, _objectSpread(_objectSpread({}, options), {}, { + v2: true + }), metadata); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/parsePhoneNumber_.js +var require_parsePhoneNumber = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/parsePhoneNumber_.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = parsePhoneNumber; + var _parsePhoneNumberWithError_ = _interopRequireDefault(require_parsePhoneNumberWithError()); + var _ParseError = _interopRequireDefault(require_ParseError()); + var _metadata = require_metadata(); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function ownKeys2(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys2(Object(t), true).forEach(function(r2) { + _defineProperty(e, r2, t[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys2(Object(t)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); + }); + } + return e; + } + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function parsePhoneNumber(text, options, metadata) { + if (options && options.defaultCountry && !(0, _metadata.isSupportedCountry)(options.defaultCountry, metadata)) { + options = _objectSpread(_objectSpread({}, options), {}, { + defaultCountry: void 0 + }); + } + try { + return (0, _parsePhoneNumberWithError_["default"])(text, options, metadata); + } catch (error) { + if (error instanceof _ParseError["default"]) { + } else { + throw error; + } + } + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/parsePhoneNumber.js +var require_parsePhoneNumber2 = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/parsePhoneNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = parsePhoneNumber; + var _normalizeArguments2 = _interopRequireDefault(require_normalizeArguments()); + var _parsePhoneNumber_ = _interopRequireDefault(require_parsePhoneNumber()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function parsePhoneNumber() { + var _normalizeArguments = (0, _normalizeArguments2["default"])(arguments), text = _normalizeArguments.text, options = _normalizeArguments.options, metadata = _normalizeArguments.metadata; + return (0, _parsePhoneNumber_["default"])(text, options, metadata); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/parsePhoneNumberWithError.js +var require_parsePhoneNumberWithError2 = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/parsePhoneNumberWithError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = parsePhoneNumberWithError; + var _parsePhoneNumberWithError_ = _interopRequireDefault(require_parsePhoneNumberWithError()); + var _normalizeArguments2 = _interopRequireDefault(require_normalizeArguments()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function parsePhoneNumberWithError() { + var _normalizeArguments = (0, _normalizeArguments2["default"])(arguments), text = _normalizeArguments.text, options = _normalizeArguments.options, metadata = _normalizeArguments.metadata; + return (0, _parsePhoneNumberWithError_["default"])(text, options, metadata); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/isValidPhoneNumber.js +var require_isValidPhoneNumber = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/isValidPhoneNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = isValidPhoneNumber; + var _normalizeArguments2 = _interopRequireDefault(require_normalizeArguments()); + var _parsePhoneNumber_ = _interopRequireDefault(require_parsePhoneNumber()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function ownKeys2(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys2(Object(t), true).forEach(function(r2) { + _defineProperty(e, r2, t[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys2(Object(t)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); + }); + } + return e; + } + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function isValidPhoneNumber() { + var _normalizeArguments = (0, _normalizeArguments2["default"])(arguments), text = _normalizeArguments.text, options = _normalizeArguments.options, metadata = _normalizeArguments.metadata; + options = _objectSpread(_objectSpread({}, options), {}, { + extract: false + }); + var phoneNumber = (0, _parsePhoneNumber_["default"])(text, options, metadata); + return phoneNumber && phoneNumber.isValid() || false; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/isPossiblePhoneNumber.js +var require_isPossiblePhoneNumber = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/isPossiblePhoneNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = isPossiblePhoneNumber; + var _normalizeArguments2 = _interopRequireDefault(require_normalizeArguments()); + var _parsePhoneNumber_ = _interopRequireDefault(require_parsePhoneNumber()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function ownKeys2(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys2(Object(t), true).forEach(function(r2) { + _defineProperty(e, r2, t[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys2(Object(t)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); + }); + } + return e; + } + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function isPossiblePhoneNumber() { + var _normalizeArguments = (0, _normalizeArguments2["default"])(arguments), text = _normalizeArguments.text, options = _normalizeArguments.options, metadata = _normalizeArguments.metadata; + options = _objectSpread(_objectSpread({}, options), {}, { + extract: false + }); + var phoneNumber = (0, _parsePhoneNumber_["default"])(text, options, metadata); + return phoneNumber && phoneNumber.isPossible() || false; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/validatePhoneNumberLength.js +var require_validatePhoneNumberLength = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/validatePhoneNumberLength.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = validatePhoneNumberLength; + var _normalizeArguments2 = _interopRequireDefault(require_normalizeArguments()); + var _parsePhoneNumberWithError_ = _interopRequireDefault(require_parsePhoneNumberWithError()); + var _ParseError = _interopRequireDefault(require_ParseError()); + var _metadata = _interopRequireDefault(require_metadata()); + var _checkNumberLength = _interopRequireDefault(require_checkNumberLength()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function ownKeys2(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys2(Object(t), true).forEach(function(r2) { + _defineProperty(e, r2, t[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys2(Object(t)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); + }); + } + return e; + } + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function validatePhoneNumberLength() { + var _normalizeArguments = (0, _normalizeArguments2["default"])(arguments), text = _normalizeArguments.text, options = _normalizeArguments.options, metadata = _normalizeArguments.metadata; + options = _objectSpread(_objectSpread({}, options), {}, { + extract: false + }); + try { + var phoneNumber = (0, _parsePhoneNumberWithError_["default"])(text, options, metadata); + var metadataInstance = new _metadata["default"](metadata); + metadataInstance.selectNumberingPlan(phoneNumber.country || phoneNumber.countryCallingCode); + var result = (0, _checkNumberLength["default"])(phoneNumber.nationalNumber, void 0, metadataInstance); + if (result !== "IS_POSSIBLE") { + return result; + } + } catch (error) { + if (error instanceof _ParseError["default"]) { + return error.message; + } else { + throw error; + } + } + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/LRUCache.js +var require_LRUCache = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/LRUCache.js"(exports2) { + "use strict"; + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = void 0; + function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o); + } + } + function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: false }), e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); + } + var Node = /* @__PURE__ */ _createClass(function Node2(key, value) { + var next = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null; + var prev = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null; + _classCallCheck(this, Node2); + this.key = key; + this.value = value; + this.next = next; + this.prev = prev; + }); + var LRUCache = exports2["default"] = /* @__PURE__ */ (function() { + function LRUCache2() { + var limit = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10; + _classCallCheck(this, LRUCache2); + this.size = 0; + this.limit = limit; + this.head = null; + this.tail = null; + this.cache = {}; + } + return _createClass(LRUCache2, [{ + key: "put", + value: function put(key, value) { + this.ensureLimit(); + if (!this.head) { + this.head = this.tail = new Node(key, value); + } else { + var node = new Node(key, value, this.head); + this.head.prev = node; + this.head = node; + } + this.cache[key] = this.head; + this.size++; + } + // Read from cache map and make that node as new Head of LinkedList + }, { + key: "get", + value: function get(key) { + if (this.cache[key]) { + var value = this.cache[key].value; + this.remove(key); + this.put(key, value); + return value; + } + console.log("Item not available in cache for key ".concat(key)); + } + }, { + key: "ensureLimit", + value: function ensureLimit() { + if (this.size === this.limit) { + this.remove(this.tail.key); + } + } + }, { + key: "remove", + value: function remove(key) { + var node = this.cache[key]; + if (node.prev !== null) { + node.prev.next = node.next; + } else { + this.head = node.next; + } + if (node.next !== null) { + node.next.prev = node.prev; + } else { + this.tail = node.prev; + } + delete this.cache[key]; + this.size--; + } + }, { + key: "clear", + value: function clear() { + this.head = null; + this.tail = null; + this.size = 0; + this.cache = {}; + } + // // Invokes the callback function with every node of the chain and the index of the node. + // forEach(fn) { + // let node = this.head; + // let counter = 0; + // while (node) { + // fn(node, counter); + // node = node.next; + // counter++; + // } + // } + // // To iterate over LRU with a 'for...of' loop + // *[Symbol.iterator]() { + // let node = this.head; + // while (node) { + // yield node; + // node = node.next; + // } + // } + }]); + })(); + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/RegExpCache.js +var require_RegExpCache = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/RegExpCache.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = void 0; + var _LRUCache = _interopRequireDefault(require_LRUCache()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); + } + function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o); + } + } + function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: false }), e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + var RegExpCache = exports2["default"] = /* @__PURE__ */ (function() { + function RegExpCache2(size) { + _classCallCheck(this, RegExpCache2); + this.cache = new _LRUCache["default"](size); + } + return _createClass(RegExpCache2, [{ + key: "getPatternForRegExp", + value: function getPatternForRegExp(pattern) { + var regExp = this.cache.get(pattern); + if (!regExp) { + regExp = new RegExp("^" + pattern); + this.cache.put(pattern, regExp); + } + return regExp; + } + }]); + })(); + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/util.js +var require_util = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.endsWith = endsWith; + exports2.limit = limit; + exports2.startsWith = startsWith; + exports2.trimAfterFirstMatch = trimAfterFirstMatch; + function limit(lower, upper) { + if (lower < 0 || upper <= 0 || upper < lower) { + throw new TypeError(); + } + return "{".concat(lower, ",").concat(upper, "}"); + } + function trimAfterFirstMatch(regexp, string) { + var index = string.search(regexp); + if (index >= 0) { + return string.slice(0, index); + } + return string; + } + function startsWith(string, substring) { + return string.indexOf(substring) === 0; + } + function endsWith(string, substring) { + return string.indexOf(substring, string.length - substring.length) === string.length - substring.length; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/utf-8.js +var require_utf_8 = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/utf-8.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2._pN = exports2._pL = exports2.PZ = void 0; + exports2.isInvalidPunctuationSymbol = isInvalidPunctuationSymbol; + exports2.isLatinLetter = isLatinLetter; + exports2.pZ = exports2.pNd = void 0; + var _pZ = " \xA0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000"; + var pZ = exports2.pZ = "[".concat(_pZ, "]"); + var PZ = exports2.PZ = "[^".concat(_pZ, "]"); + var _pN = exports2._pN = "0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19"; + var _pNd = "0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19"; + var pNd = exports2.pNd = "[".concat(_pNd, "]"); + var _pL = exports2._pL = "A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"; + var pL = "[".concat(_pL, "]"); + var pL_regexp = new RegExp(pL); + var _pSc = "$\xA2-\xA5\u058F\u060B\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20B9\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6"; + var pSc = "[".concat(_pSc, "]"); + var pSc_regexp = new RegExp(pSc); + var _pMn = "\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u08FE\u0900-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1DC0-\u1DE6\u1DFC-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE26"; + var pMn = "[".concat(_pMn, "]"); + var pMn_regexp = new RegExp(pMn); + var _InBasic_Latin = "\0-\x7F"; + var _InLatin_1_Supplement = "\x80-\xFF"; + var _InLatin_Extended_A = "\u0100-\u017F"; + var _InLatin_Extended_Additional = "\u1E00-\u1EFF"; + var _InLatin_Extended_B = "\u0180-\u024F"; + var _InCombining_Diacritical_Marks = "\u0300-\u036F"; + var latinLetterRegexp = new RegExp("[" + _InBasic_Latin + _InLatin_1_Supplement + _InLatin_Extended_A + _InLatin_Extended_Additional + _InLatin_Extended_B + _InCombining_Diacritical_Marks + "]"); + function isLatinLetter(letter) { + if (!pL_regexp.test(letter) && !pMn_regexp.test(letter)) { + return false; + } + return latinLetterRegexp.test(letter); + } + function isInvalidPunctuationSymbol(character) { + return character === "%" || pSc_regexp.test(character); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/matchPhoneNumberStringAgainstPhoneNumber.js +var require_matchPhoneNumberStringAgainstPhoneNumber = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/matchPhoneNumberStringAgainstPhoneNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = matchPhoneNumberStringAgainstPhoneNumber; + var _parsePhoneNumber = _interopRequireDefault(require_parsePhoneNumber2()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function matchPhoneNumberStringAgainstPhoneNumber(phoneNumberString, phoneNumber, metadata) { + var phoneNumberStringContainsCallingCode = true; + var parsedPhoneNumber = (0, _parsePhoneNumber["default"])(phoneNumberString, metadata); + if (!parsedPhoneNumber) { + phoneNumberStringContainsCallingCode = false; + parsedPhoneNumber = (0, _parsePhoneNumber["default"])(phoneNumberString, { + defaultCallingCode: phoneNumber.countryCallingCode + }, metadata); + } + if (!parsedPhoneNumber) { + return "INVALID_NUMBER"; + } + if (phoneNumber.ext) { + if (parsedPhoneNumber.ext !== phoneNumber.ext) { + return "NO_MATCH"; + } + } else { + if (parsedPhoneNumber.ext) { + return "NO_MATCH"; + } + } + if (phoneNumberStringContainsCallingCode) { + if (phoneNumber.countryCallingCode !== parsedPhoneNumber.countryCallingCode) { + return "NO_MATCH"; + } + } + if (phoneNumber.number === parsedPhoneNumber.number) { + if (phoneNumberStringContainsCallingCode) { + return "EXACT_MATCH"; + } else { + return "NSN_MATCH"; + } + } + if (phoneNumber.nationalNumber.indexOf(parsedPhoneNumber.nationalNumber) === 0 || parsedPhoneNumber.nationalNumber.indexOf(phoneNumber.nationalNumber) === 0) { + return "SHORT_NSN_MATCH"; + } + return "NO_MATCH"; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/Leniency.js +var require_Leniency = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/Leniency.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.containsMoreThanOneSlashInNationalNumber = containsMoreThanOneSlashInNationalNumber; + exports2["default"] = void 0; + var _parseDigits = _interopRequireDefault(require_parseDigits()); + var _matchPhoneNumberStringAgainstPhoneNumber = _interopRequireDefault(require_matchPhoneNumberStringAgainstPhoneNumber()); + var _metadata2 = _interopRequireDefault(require_metadata()); + var _getCountryByCallingCode = _interopRequireDefault(require_getCountryByCallingCode()); + var _format = require_format(); + var _util = require_util(); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _createForOfIteratorHelperLoose(r, e) { + var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (t) return (t = t.call(r)).next.bind(t); + if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { + t && (r = t); + var o = 0; + return function() { + return o >= r.length ? { done: true } : { done: false, value: r[o++] }; + }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + var _default = exports2["default"] = { + /** + * Phone numbers accepted are "possible", but not necessarily "valid". + */ + POSSIBLE: function POSSIBLE(phoneNumber, _ref) { + var candidate = _ref.candidate, metadata = _ref.metadata; + return true; + }, + /** + * Phone numbers accepted are "possible" and "valid". + * Numbers written in national format must have their national-prefix + * present if it is usually written for a number of this type. + */ + VALID: function VALID(phoneNumber, _ref2) { + var candidate = _ref2.candidate, defaultCountry = _ref2.defaultCountry, metadata = _ref2.metadata; + if (!phoneNumber.isValid() || !containsOnlyValidXChars(phoneNumber, candidate, metadata)) { + return false; + } + return true; + }, + /** + * Phone numbers accepted are "valid" and + * are grouped in a possible way for this locale. For example, a US number written as + * "65 02 53 00 00" and "650253 0000" are not accepted at this leniency level, whereas + * "650 253 0000", "650 2530000" or "6502530000" are. + * Numbers with more than one '/' symbol in the national significant number + * are also dropped at this level. + * + * Warning: This level might result in lower coverage especially for regions outside of + * country code "+1". If you are not sure about which level to use, + * email the discussion group libphonenumber-discuss@googlegroups.com. + */ + STRICT_GROUPING: function STRICT_GROUPING(phoneNumber, _ref3) { + var candidate = _ref3.candidate, defaultCountry = _ref3.defaultCountry, metadata = _ref3.metadata, regExpCache = _ref3.regExpCache; + if (!phoneNumber.isValid() || !containsOnlyValidXChars(phoneNumber, candidate, metadata) || containsMoreThanOneSlashInNationalNumber(phoneNumber, candidate) || !isNationalPrefixPresentIfRequired(phoneNumber, { + defaultCountry, + metadata + })) { + return false; + } + return checkNumberGroupingIsValid(phoneNumber, candidate, metadata, allNumberGroupsRemainGrouped, regExpCache); + }, + /** + * Phone numbers accepted are "valid" and are grouped in the same way + * that we would have formatted it, or as a single block. + * For example, a US number written as "650 2530000" is not accepted + * at this leniency level, whereas "650 253 0000" or "6502530000" are. + * Numbers with more than one '/' symbol are also dropped at this level. + * + * Warning: This level might result in lower coverage especially for regions outside of + * country code "+1". If you are not sure about which level to use, email the discussion group + * libphonenumber-discuss@googlegroups.com. + */ + EXACT_GROUPING: function EXACT_GROUPING(phoneNumber, _ref4) { + var candidate = _ref4.candidate, defaultCountry = _ref4.defaultCountry, metadata = _ref4.metadata, regExpCache = _ref4.regExpCache; + if (!phoneNumber.isValid() || !containsOnlyValidXChars(phoneNumber, candidate, metadata) || containsMoreThanOneSlashInNationalNumber(phoneNumber, candidate) || !isNationalPrefixPresentIfRequired(phoneNumber, { + defaultCountry, + metadata + })) { + return false; + } + return checkNumberGroupingIsValid(phoneNumber, candidate, metadata, allNumberGroupsAreExactlyPresent, regExpCache); + } + }; + function containsOnlyValidXChars(phoneNumber, candidate, metadata) { + for (var index = 0; index < candidate.length - 1; index++) { + var charAtIndex = candidate.charAt(index); + if (charAtIndex === "x" || charAtIndex === "X") { + var charAtNextIndex = candidate.charAt(index + 1); + if (charAtNextIndex === "x" || charAtNextIndex === "X") { + index++; + if ((0, _matchPhoneNumberStringAgainstPhoneNumber["default"])(candidate.substring(index), phoneNumber, metadata) !== "NSN_MATCH") { + return false; + } + } else { + var ext = (0, _parseDigits["default"])(candidate.substring(index)); + if (ext) { + if (phoneNumber.ext !== ext) { + return false; + } + } else { + if (phoneNumber.ext) { + return false; + } + } + } + } + } + return true; + } + function isNationalPrefixPresentIfRequired(phoneNumber, _ref5) { + var defaultCountry = _ref5.defaultCountry, _metadata = _ref5.metadata; + if (phoneNumber.__countryCallingCodeSource !== "FROM_DEFAULT_COUNTRY") { + return true; + } + var metadata = new _metadata2["default"](_metadata); + metadata.selectNumberingPlan(phoneNumber.countryCallingCode); + var phoneNumberRegion = phoneNumber.country || (0, _getCountryByCallingCode["default"])(phoneNumber.countryCallingCode, { + nationalNumber: phoneNumber.nationalNumber, + metadata + }); + var nationalNumber = phoneNumber.nationalNumber; + var format = (0, _format.chooseFormatForNumber)(metadata.numberingPlan.formats(), nationalNumber); + if (format.nationalPrefixFormattingRule()) { + if (metadata.numberingPlan.nationalPrefixIsOptionalWhenFormattingInNationalFormat()) { + return true; + } + if (!format.usesNationalPrefix()) { + return true; + } + return Boolean(phoneNumber.nationalPrefix); + } + return true; + } + function containsMoreThanOneSlashInNationalNumber(phoneNumber, candidate) { + var firstSlashInBodyIndex = candidate.indexOf("/"); + if (firstSlashInBodyIndex < 0) { + return false; + } + var secondSlashInBodyIndex = candidate.indexOf("/", firstSlashInBodyIndex + 1); + if (secondSlashInBodyIndex < 0) { + return false; + } + var candidateHasCountryCode = phoneNumber.__countryCallingCodeSource === "FROM_NUMBER_WITH_PLUS_SIGN" || phoneNumber.__countryCallingCodeSource === "FROM_NUMBER_WITHOUT_PLUS_SIGN"; + if (candidateHasCountryCode && (0, _parseDigits["default"])(candidate.substring(0, firstSlashInBodyIndex)) === phoneNumber.countryCallingCode) { + return candidate.slice(secondSlashInBodyIndex + 1).indexOf("/") >= 0; + } + return true; + } + function checkNumberGroupingIsValid(number, candidate, metadata, checkGroups, regExpCache) { + throw new Error("This part of code hasn't been ported"); + var normalizedCandidate = normalizeDigits( + candidate, + true + /* keep non-digits */ + ); + var formattedNumberGroups = getNationalNumberGroups(metadata, number, null); + if (checkGroups(metadata, number, normalizedCandidate, formattedNumberGroups)) { + return true; + } + var alternateFormats = MetadataManager.getAlternateFormatsForCountry(number.getCountryCode()); + var nationalSignificantNumber = util.getNationalSignificantNumber(number); + if (alternateFormats) { + for (var _iterator = _createForOfIteratorHelperLoose(alternateFormats.numberFormats()), _step; !(_step = _iterator()).done; ) { + var alternateFormat = _step.value; + if (alternateFormat.leadingDigitsPatterns().length > 0) { + var leadingDigitsRegExp = regExpCache.getPatternForRegExp("^" + alternateFormat.leadingDigitsPatterns()[0]); + if (!leadingDigitsRegExp.test(nationalSignificantNumber)) { + continue; + } + } + formattedNumberGroups = getNationalNumberGroups(metadata, number, alternateFormat); + if (checkGroups(metadata, number, normalizedCandidate, formattedNumberGroups)) { + return true; + } + } + } + return false; + } + function getNationalNumberGroups(metadata, number, formattingPattern) { + throw new Error("This part of code hasn't been ported"); + if (formattingPattern) { + var nationalSignificantNumber = util.getNationalSignificantNumber(number); + return util.formatNsnUsingPattern(nationalSignificantNumber, formattingPattern, "RFC3966", metadata).split("-"); + } + var rfc3966Format = formatNumber(number, "RFC3966", metadata); + var endIndex = rfc3966Format.indexOf(";"); + if (endIndex < 0) { + endIndex = rfc3966Format.length; + } + var startIndex = rfc3966Format.indexOf("-") + 1; + return rfc3966Format.slice(startIndex, endIndex).split("-"); + } + function allNumberGroupsAreExactlyPresent(metadata, number, normalizedCandidate, formattedNumberGroups) { + throw new Error("This part of code hasn't been ported"); + var candidateGroups = normalizedCandidate.split(NON_DIGITS_PATTERN); + var candidateNumberGroupIndex = number.hasExtension() ? candidateGroups.length - 2 : candidateGroups.length - 1; + if (candidateGroups.length == 1 || candidateGroups[candidateNumberGroupIndex].contains(util.getNationalSignificantNumber(number))) { + return true; + } + var formattedNumberGroupIndex = formattedNumberGroups.length - 1; + while (formattedNumberGroupIndex > 0 && candidateNumberGroupIndex >= 0) { + if (candidateGroups[candidateNumberGroupIndex] !== formattedNumberGroups[formattedNumberGroupIndex]) { + return false; + } + formattedNumberGroupIndex--; + candidateNumberGroupIndex--; + } + return candidateNumberGroupIndex >= 0 && (0, _util.endsWith)(candidateGroups[candidateNumberGroupIndex], formattedNumberGroups[0]); + } + function allNumberGroupsRemainGrouped(metadata, number, normalizedCandidate, formattedNumberGroups) { + throw new Error("This part of code hasn't been ported"); + var fromIndex = 0; + if (number.getCountryCodeSource() !== CountryCodeSource.FROM_DEFAULT_COUNTRY) { + var countryCode = String(number.getCountryCode()); + fromIndex = normalizedCandidate.indexOf(countryCode) + countryCode.length(); + } + for (var i = 0; i < formattedNumberGroups.length; i++) { + fromIndex = normalizedCandidate.indexOf(formattedNumberGroups[i], fromIndex); + if (fromIndex < 0) { + return false; + } + fromIndex += formattedNumberGroups[i].length(); + if (i == 0 && fromIndex < normalizedCandidate.length()) { + var region = util.getRegionCodeForCountryCode(number.getCountryCode()); + if (util.getNddPrefixForRegion(region, true) != null && Character.isDigit(normalizedCandidate.charAt(fromIndex))) { + var nationalSignificantNumber = util.getNationalSignificantNumber(number); + return (0, _util.startsWith)(normalizedCandidate.slice(fromIndex - formattedNumberGroups[i].length), nationalSignificantNumber); + } + } + } + return normalizedCandidate.slice(fromIndex).contains(number.getExtension()); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/parsePreCandidate.js +var require_parsePreCandidate = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/parsePreCandidate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = parsePreCandidate; + var _util = require_util(); + var SECOND_NUMBER_START_PATTERN = /[\\/] *x/; + function parsePreCandidate(candidate) { + return (0, _util.trimAfterFirstMatch)(SECOND_NUMBER_START_PATTERN, candidate); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/isValidPreCandidate.js +var require_isValidPreCandidate = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/isValidPreCandidate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = isValidPreCandidate; + var SLASH_SEPARATED_DATES = /(?:(?:[0-3]?\d\/[01]?\d)|(?:[01]?\d\/[0-3]?\d))\/(?:[12]\d)?\d{2}/; + var TIME_STAMPS = /[12]\d{3}[-/]?[01]\d[-/]?[0-3]\d +[0-2]\d$/; + var TIME_STAMPS_SUFFIX_LEADING = /^:[0-5]\d/; + function isValidPreCandidate(candidate, offset, text) { + if (SLASH_SEPARATED_DATES.test(candidate)) { + return false; + } + if (TIME_STAMPS.test(candidate)) { + var followingText = text.slice(offset + candidate.length); + if (TIME_STAMPS_SUFFIX_LEADING.test(followingText)) { + return false; + } + } + return true; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/isValidCandidate.js +var require_isValidCandidate = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findNumbers/isValidCandidate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.LEAD_CLASS = void 0; + exports2["default"] = isValidCandidate; + var _constants = require_constants3(); + var _util = require_util(); + var _utf = require_utf_8(); + var OPENING_PARENS = "(\\[\uFF08\uFF3B"; + var CLOSING_PARENS = ")\\]\uFF09\uFF3D"; + var NON_PARENS = "[^".concat(OPENING_PARENS).concat(CLOSING_PARENS, "]"); + var LEAD_CLASS = exports2.LEAD_CLASS = "[".concat(OPENING_PARENS).concat(_constants.PLUS_CHARS, "]"); + var LEAD_CLASS_LEADING = new RegExp("^" + LEAD_CLASS); + var BRACKET_PAIR_LIMIT = (0, _util.limit)(0, 3); + var MATCHING_BRACKETS_ENTIRE = new RegExp("^(?:[" + OPENING_PARENS + "])?(?:" + NON_PARENS + "+[" + CLOSING_PARENS + "])?" + NON_PARENS + "+(?:[" + OPENING_PARENS + "]" + NON_PARENS + "+[" + CLOSING_PARENS + "])" + BRACKET_PAIR_LIMIT + NON_PARENS + "*$"); + var PUB_PAGES = /\d{1,5}-+\d{1,5}\s{0,4}\(\d{1,4}/; + function isValidCandidate(candidate, offset, text, leniency) { + if (!MATCHING_BRACKETS_ENTIRE.test(candidate) || PUB_PAGES.test(candidate)) { + return; + } + if (leniency !== "POSSIBLE") { + if (offset > 0 && !LEAD_CLASS_LEADING.test(candidate)) { + var previousChar = text[offset - 1]; + if ((0, _utf.isInvalidPunctuationSymbol)(previousChar) || (0, _utf.isLatinLetter)(previousChar)) { + return false; + } + } + var lastCharIndex = offset + candidate.length; + if (lastCharIndex < text.length) { + var nextChar = text[lastCharIndex]; + if ((0, _utf.isInvalidPunctuationSymbol)(nextChar) || (0, _utf.isLatinLetter)(nextChar)) { + return false; + } + } + } + return true; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/PhoneNumberMatcher.js +var require_PhoneNumberMatcher = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/PhoneNumberMatcher.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = void 0; + var _constants = require_constants3(); + var _createExtensionPattern = _interopRequireDefault(require_createExtensionPattern()); + var _RegExpCache = _interopRequireDefault(require_RegExpCache()); + var _util = require_util(); + var _utf = require_utf_8(); + var _Leniency = _interopRequireDefault(require_Leniency()); + var _parsePreCandidate = _interopRequireDefault(require_parsePreCandidate()); + var _isValidPreCandidate = _interopRequireDefault(require_isValidPreCandidate()); + var _isValidCandidate = _interopRequireWildcard(require_isValidCandidate()); + var _metadata = require_metadata(); + var _parsePhoneNumber = _interopRequireDefault(require_parsePhoneNumber2()); + function _interopRequireWildcard(e, t) { + if ("function" == typeof WeakMap) var r = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(); + return (_interopRequireWildcard = function _interopRequireWildcard2(e2, t2) { + if (!t2 && e2 && e2.__esModule) return e2; + var o, i, f = { __proto__: null, "default": e2 }; + if (null === e2 || "object" != _typeof(e2) && "function" != typeof e2) return f; + if (o = t2 ? n : r) { + if (o.has(e2)) return o.get(e2); + o.set(e2, f); + } + for (var _t in e2) "default" !== _t && {}.hasOwnProperty.call(e2, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e2, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e2[_t]); + return f; + })(e, t); + } + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function _createForOfIteratorHelperLoose(r, e) { + var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (t) return (t = t.call(r)).next.bind(t); + if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { + t && (r = t); + var o = 0; + return function() { + return o >= r.length ? { done: true } : { done: false, value: r[o++] }; + }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); + } + function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o); + } + } + function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: false }), e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + var USE_NON_GEOGRAPHIC_COUNTRY_CODE = false; + var EXTN_PATTERNS_FOR_MATCHING = (0, _createExtensionPattern["default"])("matching"); + var INNER_MATCHES = [ + // Breaks on the slash - e.g. "651-234-2345/332-445-1234" + "/+(.*)", + // Note that the bracket here is inside the capturing group, since we consider it part of the + // phone number. Will match a pattern like "(650) 223 3345 (754) 223 3321". + "(\\([^(]*)", + // Breaks on a hyphen - e.g. "12345 - 332-445-1234 is my number." + // We require a space on either side of the hyphen for it to be considered a separator. + "(?:".concat(_utf.pZ, "-|-").concat(_utf.pZ, ")").concat(_utf.pZ, "*(.+)"), + // Various types of wide hyphens. Note we have decided not to enforce a space here, since it's + // possible that it's supposed to be used to break two numbers without spaces, and we haven't + // seen many instances of it used within a number. + "[\u2012-\u2015\uFF0D]".concat(_utf.pZ, "*(.+)"), + // Breaks on a full stop - e.g. "12345. 332-445-1234 is my number." + "\\.+".concat(_utf.pZ, "*([^.]+)"), + // Breaks on space - e.g. "3324451234 8002341234" + "".concat(_utf.pZ, "+(").concat(_utf.PZ, "+)") + ]; + var leadLimit = (0, _util.limit)(0, 2); + var punctuationLimit = (0, _util.limit)(0, 4); + var digitBlockLimit = _constants.MAX_LENGTH_FOR_NSN + _constants.MAX_LENGTH_COUNTRY_CODE; + var blockLimit = (0, _util.limit)(0, digitBlockLimit); + var punctuation = "[".concat(_constants.VALID_PUNCTUATION, "]") + punctuationLimit; + var digitSequence = _utf.pNd + (0, _util.limit)(1, digitBlockLimit); + var PATTERN = "(?:" + _isValidCandidate.LEAD_CLASS + punctuation + ")" + leadLimit + digitSequence + "(?:" + punctuation + digitSequence + ")" + blockLimit + "(?:" + EXTN_PATTERNS_FOR_MATCHING + ")?"; + var UNWANTED_END_CHAR_PATTERN = new RegExp("[^".concat(_utf._pN).concat(_utf._pL, "#]+$")); + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1; + var PhoneNumberMatcher = exports2["default"] = /* @__PURE__ */ (function() { + function PhoneNumberMatcher2() { + var text = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; + var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + var metadata = arguments.length > 2 ? arguments[2] : void 0; + _classCallCheck(this, PhoneNumberMatcher2); + options = { + v2: options.v2, + defaultCallingCode: options.defaultCallingCode, + defaultCountry: options.defaultCountry && (0, _metadata.isSupportedCountry)(options.defaultCountry, metadata) ? options.defaultCountry : void 0, + // Here it should've assigned a default value only if `options.leniency === undefined`. + leniency: options.leniency || (options.extended ? "POSSIBLE" : "VALID"), + // Here it should've assigned a default value only if `options.maxTries === undefined`. + maxTries: options.maxTries || MAX_SAFE_INTEGER + }; + if (!_Leniency["default"][options.leniency]) { + throw new TypeError('Unknown leniency: "'.concat(options.leniency, '"')); + } + if (options.leniency !== "POSSIBLE" && options.leniency !== "VALID") { + throw new TypeError('Invalid `leniency`: "'.concat(options.leniency, '". Supported values: "POSSIBLE", "VALID".')); + } + if (options.maxTries < 0) { + throw new TypeError("`maxTries` must be `>= 0`"); + } + this.text = text; + this.options = options; + this.metadata = metadata; + this.leniency = _Leniency["default"][options.leniency]; + this.maxTries = options.maxTries; + this.PATTERN = new RegExp(PATTERN, "ig"); + this.INNER_MATCHES = INNER_MATCHES.map(function(pattern) { + return new RegExp(pattern, "g"); + }); + this.state = "NOT_READY"; + this.searchIndex = 0; + this.regExpCache = new _RegExpCache["default"](32); + } + return _createClass(PhoneNumberMatcher2, [{ + key: "find", + value: function find(index) { + this.PATTERN.lastIndex = index; + var matches; + while (this.maxTries > 0 && (matches = this.PATTERN.exec(this.text)) !== null) { + var candidate = matches[0]; + var offset = matches.index; + candidate = (0, _parsePreCandidate["default"])(candidate); + if ((0, _isValidPreCandidate["default"])(candidate, offset, this.text)) { + var match = ( + // Try to come up with a valid match given the entire candidate. + this.parseAndVerify(candidate, offset, this.text) || this.extractInnerMatch(candidate, offset, this.text) + ); + if (match) { + if (this.options.v2) { + return { + startsAt: match.startsAt, + endsAt: match.endsAt, + number: match.phoneNumber + }; + } else { + var phoneNumber = match.phoneNumber; + var result = { + startsAt: match.startsAt, + endsAt: match.endsAt, + phone: phoneNumber.nationalNumber + }; + if (phoneNumber.country) { + if (USE_NON_GEOGRAPHIC_COUNTRY_CODE && country === "001") { + result.countryCallingCode = phoneNumber.countryCallingCode; + } else { + result.country = phoneNumber.country; + } + } else { + result.countryCallingCode = phoneNumber.countryCallingCode; + } + if (phoneNumber.ext) { + result.ext = phoneNumber.ext; + } + return result; + } + } + } + this.maxTries--; + } + } + /** + * Attempts to extract a match from `substring` + * if the substring itself does not qualify as a match. + */ + }, { + key: "extractInnerMatch", + value: function extractInnerMatch(substring, offset, text) { + for (var _iterator = _createForOfIteratorHelperLoose(this.INNER_MATCHES), _step; !(_step = _iterator()).done; ) { + var innerMatchRegExp = _step.value; + innerMatchRegExp.lastIndex = 0; + var isFirstMatch = true; + var candidateMatch = void 0; + while (this.maxTries > 0 && (candidateMatch = innerMatchRegExp.exec(substring)) !== null) { + if (isFirstMatch) { + var _candidate = (0, _util.trimAfterFirstMatch)(UNWANTED_END_CHAR_PATTERN, substring.slice(0, candidateMatch.index)); + var _match = this.parseAndVerify(_candidate, offset, text); + if (_match) { + return _match; + } + this.maxTries--; + isFirstMatch = false; + } + var candidate = (0, _util.trimAfterFirstMatch)(UNWANTED_END_CHAR_PATTERN, candidateMatch[1]); + var candidateIndexGuess = substring.indexOf(candidate, candidateMatch.index); + var match = this.parseAndVerify(candidate, offset + candidateIndexGuess, text); + if (match) { + return match; + } + this.maxTries--; + } + } + } + /** + * Parses a phone number from the `candidate` using `parse` and + * verifies it matches the requested `leniency`. If parsing and verification succeed, + * a corresponding `PhoneNumberMatch` is returned, otherwise this method returns `null`. + * + * @param candidate the candidate match + * @param offset the offset of {@code candidate} within {@link #text} + * @return the parsed and validated phone number match, or null + */ + }, { + key: "parseAndVerify", + value: function parseAndVerify(candidate, offset, text) { + if (!(0, _isValidCandidate["default"])(candidate, offset, text, this.options.leniency)) { + return; + } + var phoneNumber = (0, _parsePhoneNumber["default"])(candidate, { + extended: true, + defaultCountry: this.options.defaultCountry, + defaultCallingCode: this.options.defaultCallingCode + }, this.metadata); + if (!phoneNumber) { + return; + } + if (!phoneNumber.isPossible()) { + return; + } + if (this.leniency(phoneNumber, { + candidate, + defaultCountry: this.options.defaultCountry, + metadata: this.metadata, + regExpCache: this.regExpCache + })) { + return { + startsAt: offset, + endsAt: offset + candidate.length, + phoneNumber + }; + } + } + }, { + key: "hasNext", + value: function hasNext() { + if (this.state === "NOT_READY") { + this.lastMatch = this.find(this.searchIndex); + if (this.lastMatch) { + this.searchIndex = this.lastMatch.endsAt; + this.state = "READY"; + } else { + this.state = "DONE"; + } + } + return this.state === "READY"; + } + }, { + key: "next", + value: function next() { + if (!this.hasNext()) { + throw new Error("No next element"); + } + var result = this.lastMatch; + this.lastMatch = null; + this.state = "NOT_READY"; + return result; + } + }]); + })(); + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/legacy/findNumbers.js +var require_findNumbers = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/legacy/findNumbers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = findNumbers; + var _PhoneNumberMatcher = _interopRequireDefault(require_PhoneNumberMatcher()); + var _normalizeArguments2 = _interopRequireDefault(require_normalizeArguments()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function findNumbers() { + var _normalizeArguments = (0, _normalizeArguments2["default"])(arguments), text = _normalizeArguments.text, options = _normalizeArguments.options, metadata = _normalizeArguments.metadata; + var matcher = new _PhoneNumberMatcher["default"](text, options, metadata); + var results = []; + while (matcher.hasNext()) { + results.push(matcher.next()); + } + return results; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/legacy/searchNumbers.js +var require_searchNumbers = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/legacy/searchNumbers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = searchNumbers; + var _normalizeArguments2 = _interopRequireDefault(require_normalizeArguments()); + var _PhoneNumberMatcher = _interopRequireDefault(require_PhoneNumberMatcher()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function searchNumbers() { + var _normalizeArguments = (0, _normalizeArguments2["default"])(arguments), text = _normalizeArguments.text, options = _normalizeArguments.options, metadata = _normalizeArguments.metadata; + var matcher = new _PhoneNumberMatcher["default"](text, options, metadata); + return _defineProperty({}, Symbol.iterator, function() { + return { + next: function next() { + if (matcher.hasNext()) { + return { + done: false, + value: matcher.next() + }; + } + return { + done: true + }; + } + }; + }); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findPhoneNumbersInText.js +var require_findPhoneNumbersInText = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/findPhoneNumbersInText.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = findPhoneNumbersInText; + var _PhoneNumberMatcher = _interopRequireDefault(require_PhoneNumberMatcher()); + var _normalizeArguments2 = _interopRequireDefault(require_normalizeArguments()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function ownKeys2(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys2(Object(t), true).forEach(function(r2) { + _defineProperty(e, r2, t[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys2(Object(t)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); + }); + } + return e; + } + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function findPhoneNumbersInText() { + var _normalizeArguments = (0, _normalizeArguments2["default"])(arguments), text = _normalizeArguments.text, options = _normalizeArguments.options, metadata = _normalizeArguments.metadata; + var matcher = new _PhoneNumberMatcher["default"](text, _objectSpread(_objectSpread({}, options), {}, { + v2: true + }), metadata); + var results = []; + while (matcher.hasNext()) { + results.push(matcher.next()); + } + return results; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/searchPhoneNumbersInText.js +var require_searchPhoneNumbersInText = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/searchPhoneNumbersInText.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = searchPhoneNumbersInText; + var _PhoneNumberMatcher = _interopRequireDefault(require_PhoneNumberMatcher()); + var _normalizeArguments2 = _interopRequireDefault(require_normalizeArguments()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function ownKeys2(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys2(Object(t), true).forEach(function(r2) { + _defineProperty(e, r2, t[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys2(Object(t)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); + }); + } + return e; + } + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function searchPhoneNumbersInText() { + var _normalizeArguments = (0, _normalizeArguments2["default"])(arguments), text = _normalizeArguments.text, options = _normalizeArguments.options, metadata = _normalizeArguments.metadata; + var matcher = new _PhoneNumberMatcher["default"](text, _objectSpread(_objectSpread({}, options), {}, { + v2: true + }), metadata); + return _defineProperty({}, Symbol.iterator, function() { + return { + next: function next() { + if (matcher.hasNext()) { + return { + done: false, + value: matcher.next() + }; + } + return { + done: true + }; + } + }; + }); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/AsYouTypeState.js +var require_AsYouTypeState = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/AsYouTypeState.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = void 0; + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); + } + function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o); + } + } + function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: false }), e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + var AsYouTypeState = exports2["default"] = /* @__PURE__ */ (function() { + function AsYouTypeState2(_ref) { + var onCountryChange = _ref.onCountryChange, onCallingCodeChange = _ref.onCallingCodeChange; + _classCallCheck(this, AsYouTypeState2); + this.onCountryChange = onCountryChange; + this.onCallingCodeChange = onCallingCodeChange; + } + return _createClass(AsYouTypeState2, [{ + key: "reset", + value: function reset(_ref2) { + var country2 = _ref2.country, callingCode = _ref2.callingCode; + this.international = false; + this.missingPlus = false; + this.IDDPrefix = void 0; + this.callingCode = void 0; + this.digits = ""; + this.resetNationalSignificantNumber(); + this.initCountryAndCallingCode(country2, callingCode); + } + }, { + key: "resetNationalSignificantNumber", + value: function resetNationalSignificantNumber() { + this.nationalSignificantNumber = this.getNationalDigits(); + this.nationalSignificantNumberIsModified = false; + this.nationalPrefix = void 0; + this.carrierCode = void 0; + this.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = void 0; + } + }, { + key: "update", + value: function update(properties) { + for (var _i = 0, _Object$keys = Object.keys(properties); _i < _Object$keys.length; _i++) { + var key = _Object$keys[_i]; + this[key] = properties[key]; + } + } + }, { + key: "initCountryAndCallingCode", + value: function initCountryAndCallingCode(country2, callingCode) { + this.setCountry(country2); + this.setCallingCode(callingCode); + } + }, { + key: "setCountry", + value: function setCountry(country2) { + this.country = country2; + this.onCountryChange(country2); + } + }, { + key: "setCallingCode", + value: function setCallingCode(callingCode) { + this.callingCode = callingCode; + this.onCallingCodeChange(callingCode, this.country); + } + }, { + key: "startInternationalNumber", + value: function startInternationalNumber(country2, callingCode) { + this.international = true; + this.initCountryAndCallingCode(country2, callingCode); + } + }, { + key: "appendDigits", + value: function appendDigits(nextDigits) { + this.digits += nextDigits; + } + }, { + key: "appendNationalSignificantNumberDigits", + value: function appendNationalSignificantNumberDigits(nextDigits) { + this.nationalSignificantNumber += nextDigits; + } + /** + * Returns the part of `this.digits` that corresponds to the national number. + * Basically, all digits that have been input by the user, except for the + * international prefix and the country calling code part + * (if the number is an international one). + * @return {string} + */ + }, { + key: "getNationalDigits", + value: function getNationalDigits() { + if (this.international) { + return this.digits.slice((this.IDDPrefix ? this.IDDPrefix.length : 0) + (this.callingCode ? this.callingCode.length : 0)); + } + return this.digits; + } + }, { + key: "getDigitsWithoutInternationalPrefix", + value: function getDigitsWithoutInternationalPrefix() { + if (this.international) { + if (this.IDDPrefix) { + return this.digits.slice(this.IDDPrefix.length); + } + } + return this.digits; + } + }]); + })(); + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/AsYouTypeFormatter.util.js +var require_AsYouTypeFormatter_util = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/AsYouTypeFormatter.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.DIGIT_PLACEHOLDER = void 0; + exports2.closeNonPairedParens = closeNonPairedParens; + exports2.countOccurences = countOccurences; + exports2.cutAndStripNonPairedParens = cutAndStripNonPairedParens; + exports2.populateTemplateWithDigits = populateTemplateWithDigits; + exports2.repeat = repeat; + exports2.stripNonPairedParens = stripNonPairedParens; + function _createForOfIteratorHelperLoose(r, e) { + var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (t) return (t = t.call(r)).next.bind(t); + if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { + t && (r = t); + var o = 0; + return function() { + return o >= r.length ? { done: true } : { done: false, value: r[o++] }; + }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + var DIGIT_PLACEHOLDER = exports2.DIGIT_PLACEHOLDER = "x"; + var DIGIT_PLACEHOLDER_MATCHER = new RegExp(DIGIT_PLACEHOLDER); + function countOccurences(symbol, string) { + var count = 0; + for (var _iterator = _createForOfIteratorHelperLoose(string.split("")), _step; !(_step = _iterator()).done; ) { + var character = _step.value; + if (character === symbol) { + count++; + } + } + return count; + } + function repeat(string, times) { + if (times < 1) { + return ""; + } + var result = ""; + while (times > 1) { + if (times & 1) { + result += string; + } + times >>= 1; + string += string; + } + return result + string; + } + function cutAndStripNonPairedParens(string, cutBeforeIndex) { + if (string[cutBeforeIndex] === ")") { + cutBeforeIndex++; + } + return stripNonPairedParens(string.slice(0, cutBeforeIndex)); + } + function closeNonPairedParens(template, cut_before) { + var retained_template = template.slice(0, cut_before); + var opening_braces = countOccurences("(", retained_template); + var closing_braces = countOccurences(")", retained_template); + var dangling_braces = opening_braces - closing_braces; + while (dangling_braces > 0 && cut_before < template.length) { + if (template[cut_before] === ")") { + dangling_braces--; + } + cut_before++; + } + return template.slice(0, cut_before); + } + function stripNonPairedParens(string) { + var dangling_braces = []; + var i = 0; + while (i < string.length) { + if (string[i] === "(") { + dangling_braces.push(i); + } else if (string[i] === ")") { + dangling_braces.pop(); + } + i++; + } + var start = 0; + var cleared_string = ""; + dangling_braces.push(string.length); + for (var _i = 0, _dangling_braces = dangling_braces; _i < _dangling_braces.length; _i++) { + var index = _dangling_braces[_i]; + cleared_string += string.slice(start, index); + start = index + 1; + } + return cleared_string; + } + function populateTemplateWithDigits(template, position, digits) { + for (var _iterator2 = _createForOfIteratorHelperLoose(digits.split("")), _step2; !(_step2 = _iterator2()).done; ) { + var digit = _step2.value; + if (template.slice(position + 1).search(DIGIT_PLACEHOLDER_MATCHER) < 0) { + return; + } + position = template.search(DIGIT_PLACEHOLDER_MATCHER); + template = template.replace(DIGIT_PLACEHOLDER_MATCHER, digit); + } + return [template, position]; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/AsYouTypeFormatter.complete.js +var require_AsYouTypeFormatter_complete = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/AsYouTypeFormatter.complete.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.canFormatCompleteNumber = canFormatCompleteNumber; + exports2["default"] = formatCompleteNumber; + var _checkNumberLength = _interopRequireDefault(require_checkNumberLength()); + var _parseDigits = _interopRequireDefault(require_parseDigits()); + var _formatNationalNumberUsingFormat = _interopRequireDefault(require_formatNationalNumberUsingFormat()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function formatCompleteNumber(state, format, _ref) { + var metadata = _ref.metadata, shouldTryNationalPrefixFormattingRule = _ref.shouldTryNationalPrefixFormattingRule, getSeparatorAfterNationalPrefix = _ref.getSeparatorAfterNationalPrefix; + var matcher = new RegExp("^(?:".concat(format.pattern(), ")$")); + if (matcher.test(state.nationalSignificantNumber)) { + return formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(state, format, { + metadata, + shouldTryNationalPrefixFormattingRule, + getSeparatorAfterNationalPrefix + }); + } + } + function canFormatCompleteNumber(nationalSignificantNumber, metadata) { + return (0, _checkNumberLength["default"])(nationalSignificantNumber, void 0, metadata) === "IS_POSSIBLE"; + } + function formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(state, format, _ref2) { + var metadata = _ref2.metadata, shouldTryNationalPrefixFormattingRule = _ref2.shouldTryNationalPrefixFormattingRule, getSeparatorAfterNationalPrefix = _ref2.getSeparatorAfterNationalPrefix; + var nationalSignificantNumber = state.nationalSignificantNumber, international = state.international, nationalPrefix = state.nationalPrefix, carrierCode = state.carrierCode; + if (shouldTryNationalPrefixFormattingRule(format)) { + var formattedNumber = formatNationalNumber(state, format, { + useNationalPrefixFormattingRule: true, + getSeparatorAfterNationalPrefix, + metadata + }); + if (formattedNumber) { + return formattedNumber; + } + } + return formatNationalNumber(state, format, { + useNationalPrefixFormattingRule: false, + getSeparatorAfterNationalPrefix, + metadata + }); + } + function formatNationalNumber(state, format, _ref3) { + var metadata = _ref3.metadata, useNationalPrefixFormattingRule = _ref3.useNationalPrefixFormattingRule, getSeparatorAfterNationalPrefix = _ref3.getSeparatorAfterNationalPrefix; + var formattedNationalNumber = (0, _formatNationalNumberUsingFormat["default"])(state.nationalSignificantNumber, format, { + carrierCode: state.carrierCode, + useInternationalFormat: state.international, + withNationalPrefix: useNationalPrefixFormattingRule, + metadata + }); + if (!useNationalPrefixFormattingRule) { + if (state.nationalPrefix) { + formattedNationalNumber = state.nationalPrefix + getSeparatorAfterNationalPrefix(format) + formattedNationalNumber; + } else if (state.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix) { + formattedNationalNumber = state.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix + " " + formattedNationalNumber; + } + } + if (isValidFormattedNationalNumber(formattedNationalNumber, state)) { + return formattedNationalNumber; + } + } + function isValidFormattedNationalNumber(formattedNationalNumber, state) { + return (0, _parseDigits["default"])(formattedNationalNumber) === state.getNationalDigits(); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/AsYouTypeFormatter.PatternParser.js +var require_AsYouTypeFormatter_PatternParser = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/AsYouTypeFormatter.PatternParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = void 0; + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); + } + function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o); + } + } + function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: false }), e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + var PatternParser = exports2["default"] = /* @__PURE__ */ (function() { + function PatternParser2() { + _classCallCheck(this, PatternParser2); + } + return _createClass(PatternParser2, [{ + key: "parse", + value: function parse2(pattern) { + this.context = [{ + or: true, + instructions: [] + }]; + this.parsePattern(pattern); + if (this.context.length !== 1) { + throw new Error("Non-finalized contexts left when pattern parse ended"); + } + var _this$context$ = this.context[0], branches = _this$context$.branches, instructions = _this$context$.instructions; + if (branches) { + return { + op: "|", + args: branches.concat([expandSingleElementArray(instructions)]) + }; + } + if (instructions.length === 0) { + throw new Error("Pattern is required"); + } + if (instructions.length === 1) { + return instructions[0]; + } + return instructions; + } + }, { + key: "startContext", + value: function startContext(context) { + this.context.push(context); + } + }, { + key: "endContext", + value: function endContext() { + this.context.pop(); + } + }, { + key: "getContext", + value: function getContext() { + return this.context[this.context.length - 1]; + } + }, { + key: "parsePattern", + value: function parsePattern(pattern) { + if (!pattern) { + throw new Error("Pattern is required"); + } + var match = pattern.match(OPERATOR); + if (!match) { + if (ILLEGAL_CHARACTER_REGEXP.test(pattern)) { + throw new Error("Illegal characters found in a pattern: ".concat(pattern)); + } + this.getContext().instructions = this.getContext().instructions.concat(pattern.split("")); + return; + } + var operator = match[1]; + var before = pattern.slice(0, match.index); + var rightPart = pattern.slice(match.index + operator.length); + switch (operator) { + case "(?:": + if (before) { + this.parsePattern(before); + } + this.startContext({ + or: true, + instructions: [], + branches: [] + }); + break; + case ")": + if (!this.getContext().or) { + throw new Error('")" operator must be preceded by "(?:" operator'); + } + if (before) { + this.parsePattern(before); + } + if (this.getContext().instructions.length === 0) { + throw new Error('No instructions found after "|" operator in an "or" group'); + } + var _this$getContext = this.getContext(), branches = _this$getContext.branches; + branches.push(expandSingleElementArray(this.getContext().instructions)); + this.endContext(); + this.getContext().instructions.push({ + op: "|", + args: branches + }); + break; + case "|": + if (!this.getContext().or) { + throw new Error('"|" operator can only be used inside "or" groups'); + } + if (before) { + this.parsePattern(before); + } + if (!this.getContext().branches) { + if (this.context.length === 1) { + this.getContext().branches = []; + } else { + throw new Error('"branches" not found in an "or" group context'); + } + } + this.getContext().branches.push(expandSingleElementArray(this.getContext().instructions)); + this.getContext().instructions = []; + break; + case "[": + if (before) { + this.parsePattern(before); + } + this.startContext({ + oneOfSet: true + }); + break; + case "]": + if (!this.getContext().oneOfSet) { + throw new Error('"]" operator must be preceded by "[" operator'); + } + this.endContext(); + this.getContext().instructions.push({ + op: "[]", + args: parseOneOfSet(before) + }); + break; + /* istanbul ignore next */ + default: + throw new Error("Unknown operator: ".concat(operator)); + } + if (rightPart) { + this.parsePattern(rightPart); + } + } + }]); + })(); + function parseOneOfSet(pattern) { + var values = []; + var i = 0; + while (i < pattern.length) { + if (pattern[i] === "-") { + if (i === 0 || i === pattern.length - 1) { + throw new Error("Couldn't parse a one-of set pattern: ".concat(pattern)); + } + var prevValue = pattern[i - 1].charCodeAt(0) + 1; + var nextValue = pattern[i + 1].charCodeAt(0) - 1; + var value = prevValue; + while (value <= nextValue) { + values.push(String.fromCharCode(value)); + value++; + } + } else { + values.push(pattern[i]); + } + i++; + } + return values; + } + var ILLEGAL_CHARACTER_REGEXP = /[\(\)\[\]\?\:\|]/; + var OPERATOR = new RegExp( + // any of: + "(\\||\\(\\?\\:|\\)|\\[|\\])" + ); + function expandSingleElementArray(array) { + if (array.length === 1) { + return array[0]; + } + return array; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/AsYouTypeFormatter.PatternMatcher.js +var require_AsYouTypeFormatter_PatternMatcher = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/AsYouTypeFormatter.PatternMatcher.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = void 0; + var _AsYouTypeFormatterPatternParser = _interopRequireDefault(require_AsYouTypeFormatter_PatternParser()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _createForOfIteratorHelperLoose(r, e) { + var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (t) return (t = t.call(r)).next.bind(t); + if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { + t && (r = t); + var o = 0; + return function() { + return o >= r.length ? { done: true } : { done: false, value: r[o++] }; + }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); + } + function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o); + } + } + function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: false }), e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + var PatternMatcher = exports2["default"] = /* @__PURE__ */ (function() { + function PatternMatcher2(pattern) { + _classCallCheck(this, PatternMatcher2); + this.matchTree = new _AsYouTypeFormatterPatternParser["default"]().parse(pattern); + } + return _createClass(PatternMatcher2, [{ + key: "match", + value: function match(string) { + var _ref = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, allowOverflow = _ref.allowOverflow; + if (!string) { + throw new Error("String is required"); + } + var result = _match(string.split(""), this.matchTree, true); + if (result && result.match) { + delete result.matchedChars; + } + if (result && result.overflow) { + if (!allowOverflow) { + return; + } + } + return result; + } + }]); + })(); + function _match(characters, tree, last) { + if (typeof tree === "string") { + var characterString = characters.join(""); + if (tree.indexOf(characterString) === 0) { + if (characters.length === tree.length) { + return { + match: true, + matchedChars: characters + }; + } + return { + partialMatch: true + // matchedChars: characters + }; + } + if (characterString.indexOf(tree) === 0) { + if (last) { + if (characters.length > tree.length) { + return { + overflow: true + }; + } + } + return { + match: true, + matchedChars: characters.slice(0, tree.length) + }; + } + return; + } + if (Array.isArray(tree)) { + var restCharacters = characters.slice(); + var i = 0; + while (i < tree.length) { + var subtree = tree[i]; + var result = _match(restCharacters, subtree, last && i === tree.length - 1); + if (!result) { + return; + } else if (result.overflow) { + return result; + } else if (result.match) { + restCharacters = restCharacters.slice(result.matchedChars.length); + if (restCharacters.length === 0) { + if (i === tree.length - 1) { + return { + match: true, + matchedChars: characters + }; + } else { + return { + partialMatch: true + // matchedChars: characters + }; + } + } + } else { + if (result.partialMatch) { + return { + partialMatch: true + // matchedChars: characters + }; + } else { + throw new Error("Unsupported match result:\n".concat(JSON.stringify(result, null, 2))); + } + } + i++; + } + if (last) { + return { + overflow: true + }; + } + return { + match: true, + matchedChars: characters.slice(0, characters.length - restCharacters.length) + }; + } + switch (tree.op) { + case "|": + var partialMatch; + for (var _iterator = _createForOfIteratorHelperLoose(tree.args), _step; !(_step = _iterator()).done; ) { + var branch = _step.value; + var _result = _match(characters, branch, last); + if (_result) { + if (_result.overflow) { + return _result; + } else if (_result.match) { + return { + match: true, + matchedChars: _result.matchedChars + }; + } else { + if (_result.partialMatch) { + partialMatch = true; + } else { + throw new Error("Unsupported match result:\n".concat(JSON.stringify(_result, null, 2))); + } + } + } + } + if (partialMatch) { + return { + partialMatch: true + // matchedChars: ... + }; + } + return; + case "[]": + for (var _iterator2 = _createForOfIteratorHelperLoose(tree.args), _step2; !(_step2 = _iterator2()).done; ) { + var _char = _step2.value; + if (characters[0] === _char) { + if (characters.length === 1) { + return { + match: true, + matchedChars: characters + }; + } + if (last) { + return { + overflow: true + }; + } + return { + match: true, + matchedChars: [_char] + }; + } + } + return; + /* istanbul ignore next */ + default: + throw new Error("Unsupported instruction tree: ".concat(tree)); + } + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/AsYouTypeFormatter.js +var require_AsYouTypeFormatter = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/AsYouTypeFormatter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + Object.defineProperty(exports2, "DIGIT_PLACEHOLDER", { + enumerable: true, + get: function get() { + return _AsYouTypeFormatterUtil.DIGIT_PLACEHOLDER; + } + }); + exports2["default"] = void 0; + var _AsYouTypeFormatterUtil = require_AsYouTypeFormatter_util(); + var _AsYouTypeFormatterComplete = _interopRequireWildcard(require_AsYouTypeFormatter_complete()); + var _AsYouTypeFormatterPatternMatcher = _interopRequireDefault(require_AsYouTypeFormatter_PatternMatcher()); + var _parseDigits = _interopRequireDefault(require_parseDigits()); + var _formatNationalNumberUsingFormat = require_formatNationalNumberUsingFormat(); + var _constants = require_constants3(); + var _applyInternationalSeparatorStyle = _interopRequireDefault(require_applyInternationalSeparatorStyle()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _interopRequireWildcard(e, t) { + if ("function" == typeof WeakMap) var r = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(); + return (_interopRequireWildcard = function _interopRequireWildcard2(e2, t2) { + if (!t2 && e2 && e2.__esModule) return e2; + var o, i, f = { __proto__: null, "default": e2 }; + if (null === e2 || "object" != _typeof(e2) && "function" != typeof e2) return f; + if (o = t2 ? n : r) { + if (o.has(e2)) return o.get(e2); + o.set(e2, f); + } + for (var _t in e2) "default" !== _t && {}.hasOwnProperty.call(e2, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e2, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e2[_t]); + return f; + })(e, t); + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function _createForOfIteratorHelperLoose(r, e) { + var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (t) return (t = t.call(r)).next.bind(t); + if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { + t && (r = t); + var o = 0; + return function() { + return o >= r.length ? { done: true } : { done: false, value: r[o++] }; + }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); + } + function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o); + } + } + function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: false }), e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + var DUMMY_DIGIT = "9"; + var LONGEST_NATIONAL_PHONE_NUMBER_LENGTH = 15; + var LONGEST_DUMMY_PHONE_NUMBER = (0, _AsYouTypeFormatterUtil.repeat)(DUMMY_DIGIT, LONGEST_NATIONAL_PHONE_NUMBER_LENGTH); + var NATIONAL_PREFIX_SEPARATORS_PATTERN = /[- ]/; + var SUPPORT_LEGACY_FORMATTING_PATTERNS = true; + var CREATE_CHARACTER_CLASS_PATTERN = SUPPORT_LEGACY_FORMATTING_PATTERNS && function() { + return /\[([^\[\]])*\]/g; + }; + var CREATE_STANDALONE_DIGIT_PATTERN = SUPPORT_LEGACY_FORMATTING_PATTERNS && function() { + return /\d(?=[^,}][^,}])/g; + }; + var NON_ALTERING_FORMAT_REG_EXP = new RegExp("[" + _constants.VALID_PUNCTUATION + "]*\\$1[" + _constants.VALID_PUNCTUATION + "]*(\\$\\d[" + _constants.VALID_PUNCTUATION + "]*)*$"); + var MIN_LEADING_DIGITS_LENGTH = 3; + var AsYouTypeFormatter = exports2["default"] = /* @__PURE__ */ (function() { + function AsYouTypeFormatter2(_ref) { + var state = _ref.state, metadata = _ref.metadata; + _classCallCheck(this, AsYouTypeFormatter2); + this.metadata = metadata; + this.resetFormat(); + } + return _createClass(AsYouTypeFormatter2, [{ + key: "resetFormat", + value: function resetFormat() { + this.chosenFormat = void 0; + this.template = void 0; + this.nationalNumberTemplate = void 0; + this.populatedNationalNumberTemplate = void 0; + this.populatedNationalNumberTemplatePosition = -1; + } + }, { + key: "reset", + value: function reset(numberingPlan, state) { + this.resetFormat(); + if (numberingPlan) { + this.isNANP = numberingPlan.callingCode() === "1"; + this.matchingFormats = numberingPlan.formats(); + if (state.nationalSignificantNumber) { + this.narrowDownMatchingFormats(state); + } + } else { + this.isNANP = void 0; + this.matchingFormats = []; + } + } + /** + * Formats an updated phone number. + * @param {string} nextDigits — Additional phone number digits. + * @param {object} state — `AsYouType` state. + * @return {[string]} Returns undefined if the updated phone number can't be formatted using any of the available formats. + */ + }, { + key: "format", + value: function format(nextDigits, state) { + var _this = this; + if ((0, _AsYouTypeFormatterComplete.canFormatCompleteNumber)(state.nationalSignificantNumber, this.metadata)) { + for (var _iterator = _createForOfIteratorHelperLoose(this.matchingFormats), _step; !(_step = _iterator()).done; ) { + var _format = _step.value; + var formattedCompleteNumber = (0, _AsYouTypeFormatterComplete["default"])(state, _format, { + metadata: this.metadata, + shouldTryNationalPrefixFormattingRule: function shouldTryNationalPrefixFormattingRule(format2) { + return _this.shouldTryNationalPrefixFormattingRule(format2, { + international: state.international, + nationalPrefix: state.nationalPrefix + }); + }, + getSeparatorAfterNationalPrefix: function getSeparatorAfterNationalPrefix(format2) { + return _this.getSeparatorAfterNationalPrefix(format2); + } + }); + if (formattedCompleteNumber) { + this.resetFormat(); + this.chosenFormat = _format; + this.setNationalNumberTemplate(formattedCompleteNumber.replace(/\d/g, _AsYouTypeFormatterUtil.DIGIT_PLACEHOLDER), state); + this.populatedNationalNumberTemplate = formattedCompleteNumber; + this.populatedNationalNumberTemplatePosition = this.template.lastIndexOf(_AsYouTypeFormatterUtil.DIGIT_PLACEHOLDER); + return formattedCompleteNumber; + } + } + } + return this.formatNationalNumberWithNextDigits(nextDigits, state); + } + // Formats the next phone number digits. + }, { + key: "formatNationalNumberWithNextDigits", + value: function formatNationalNumberWithNextDigits(nextDigits, state) { + var previouslyChosenFormat = this.chosenFormat; + var newlyChosenFormat = this.chooseFormat(state); + if (newlyChosenFormat) { + if (newlyChosenFormat === previouslyChosenFormat) { + return this.formatNextNationalNumberDigits(nextDigits); + } else { + return this.formatNextNationalNumberDigits(state.getNationalDigits()); + } + } + } + }, { + key: "narrowDownMatchingFormats", + value: function narrowDownMatchingFormats(_ref2) { + var _this2 = this; + var nationalSignificantNumber = _ref2.nationalSignificantNumber, nationalPrefix = _ref2.nationalPrefix, international = _ref2.international; + var leadingDigits = nationalSignificantNumber; + var leadingDigitsPatternIndex = leadingDigits.length - MIN_LEADING_DIGITS_LENGTH; + if (leadingDigitsPatternIndex < 0) { + leadingDigitsPatternIndex = 0; + } + this.matchingFormats = this.matchingFormats.filter(function(format) { + return _this2.formatSuits(format, international, nationalPrefix) && _this2.formatMatches(format, leadingDigits, leadingDigitsPatternIndex); + }); + if (this.chosenFormat && this.matchingFormats.indexOf(this.chosenFormat) === -1) { + this.resetFormat(); + } + } + }, { + key: "formatSuits", + value: function formatSuits(format, international, nationalPrefix) { + if (nationalPrefix && !format.usesNationalPrefix() && // !format.domesticCarrierCodeFormattingRule() && + !format.nationalPrefixIsOptionalWhenFormattingInNationalFormat()) { + return false; + } + if (!international && !nationalPrefix && format.nationalPrefixIsMandatoryWhenFormattingInNationalFormat()) { + return false; + } + return true; + } + }, { + key: "formatMatches", + value: function formatMatches(format, leadingDigits, leadingDigitsPatternIndex) { + var leadingDigitsPatternsCount = format.leadingDigitsPatterns().length; + if (leadingDigitsPatternsCount === 0) { + return true; + } + leadingDigitsPatternIndex = Math.min(leadingDigitsPatternIndex, leadingDigitsPatternsCount - 1); + var leadingDigitsPattern = format.leadingDigitsPatterns()[leadingDigitsPatternIndex]; + if (leadingDigits.length < MIN_LEADING_DIGITS_LENGTH) { + try { + return new _AsYouTypeFormatterPatternMatcher["default"](leadingDigitsPattern).match(leadingDigits, { + allowOverflow: true + }) !== void 0; + } catch (error) { + console.error(error); + return true; + } + } + return new RegExp("^(".concat(leadingDigitsPattern, ")")).test(leadingDigits); + } + }, { + key: "getFormatFormat", + value: function getFormatFormat(format, international) { + return international ? format.internationalFormat() : format.format(); + } + }, { + key: "chooseFormat", + value: function chooseFormat(state) { + var _this3 = this; + var _loop = function _loop2() { + var format = _step2.value; + if (_this3.chosenFormat === format) { + return 0; + } + if (!NON_ALTERING_FORMAT_REG_EXP.test(_this3.getFormatFormat(format, state.international))) { + return 1; + } + if (!_this3.createTemplateForFormat(format, state)) { + _this3.matchingFormats = _this3.matchingFormats.filter(function(_2) { + return _2 !== format; + }); + return 1; + } + _this3.chosenFormat = format; + return 0; + }, _ret; + for (var _iterator2 = _createForOfIteratorHelperLoose(this.matchingFormats.slice()), _step2; !(_step2 = _iterator2()).done; ) { + _ret = _loop(); + if (_ret === 0) break; + if (_ret === 1) continue; + } + if (!this.chosenFormat) { + this.resetFormat(); + } + return this.chosenFormat; + } + }, { + key: "createTemplateForFormat", + value: function createTemplateForFormat(format, state) { + if (SUPPORT_LEGACY_FORMATTING_PATTERNS && format.pattern().indexOf("|") >= 0) { + return; + } + var template = this.getTemplateForFormat(format, state); + if (template) { + this.setNationalNumberTemplate(template, state); + return true; + } + } + }, { + key: "getSeparatorAfterNationalPrefix", + value: function getSeparatorAfterNationalPrefix(format) { + if (this.isNANP) { + return " "; + } + if (format && format.nationalPrefixFormattingRule() && NATIONAL_PREFIX_SEPARATORS_PATTERN.test(format.nationalPrefixFormattingRule())) { + return " "; + } + return ""; + } + }, { + key: "getInternationalPrefixBeforeCountryCallingCode", + value: function getInternationalPrefixBeforeCountryCallingCode(_ref3, options) { + var IDDPrefix = _ref3.IDDPrefix, missingPlus = _ref3.missingPlus; + if (IDDPrefix) { + return options && options.spacing === false ? IDDPrefix : IDDPrefix + " "; + } + if (missingPlus) { + return ""; + } + return "+"; + } + }, { + key: "getTemplate", + value: function getTemplate(state) { + if (!this.template) { + return; + } + var index = -1; + var i = 0; + var internationalPrefix = state.international ? this.getInternationalPrefixBeforeCountryCallingCode(state, { + spacing: false + }) : ""; + while (i < internationalPrefix.length + state.getDigitsWithoutInternationalPrefix().length) { + index = this.template.indexOf(_AsYouTypeFormatterUtil.DIGIT_PLACEHOLDER, index + 1); + i++; + } + return (0, _AsYouTypeFormatterUtil.cutAndStripNonPairedParens)(this.template, index + 1); + } + }, { + key: "setNationalNumberTemplate", + value: function setNationalNumberTemplate(template, state) { + this.nationalNumberTemplate = template; + this.populatedNationalNumberTemplate = template; + this.populatedNationalNumberTemplatePosition = -1; + if (state.international) { + this.template = this.getInternationalPrefixBeforeCountryCallingCode(state).replace(/[\d\+]/g, _AsYouTypeFormatterUtil.DIGIT_PLACEHOLDER) + (0, _AsYouTypeFormatterUtil.repeat)(_AsYouTypeFormatterUtil.DIGIT_PLACEHOLDER, state.callingCode.length) + " " + template; + } else { + this.template = template; + } + } + /** + * Generates formatting template for a national phone number, + * optionally containing a national prefix, for a format. + * @param {Format} format + * @param {string} nationalPrefix + * @return {string} + */ + }, { + key: "getTemplateForFormat", + value: function getTemplateForFormat(format, _ref4) { + var nationalSignificantNumber = _ref4.nationalSignificantNumber, international = _ref4.international, nationalPrefix = _ref4.nationalPrefix, prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = _ref4.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix; + var pattern = format.pattern(); + if (SUPPORT_LEGACY_FORMATTING_PATTERNS) { + pattern = pattern.replace(CREATE_CHARACTER_CLASS_PATTERN(), "\\d").replace(CREATE_STANDALONE_DIGIT_PATTERN(), "\\d"); + } + var digits = LONGEST_DUMMY_PHONE_NUMBER.match(pattern)[0]; + if (nationalSignificantNumber.length > digits.length) { + return; + } + var strictPattern = new RegExp("^" + pattern + "$"); + var nationalNumberDummyDigits = nationalSignificantNumber.replace(/\d/g, DUMMY_DIGIT); + if (strictPattern.test(nationalNumberDummyDigits)) { + digits = nationalNumberDummyDigits; + } + var numberFormat = this.getFormatFormat(format, international); + var nationalPrefixIncludedInTemplate; + if (this.shouldTryNationalPrefixFormattingRule(format, { + international, + nationalPrefix + })) { + var numberFormatWithNationalPrefix = numberFormat.replace(_formatNationalNumberUsingFormat.FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule()); + if ((0, _parseDigits["default"])(format.nationalPrefixFormattingRule()) === (nationalPrefix || "") + (0, _parseDigits["default"])("$1")) { + numberFormat = numberFormatWithNationalPrefix; + nationalPrefixIncludedInTemplate = true; + if (nationalPrefix) { + var i = nationalPrefix.length; + while (i > 0) { + numberFormat = numberFormat.replace(/\d/, _AsYouTypeFormatterUtil.DIGIT_PLACEHOLDER); + i--; + } + } + } + } + var template = digits.replace(new RegExp(pattern), numberFormat).replace(new RegExp(DUMMY_DIGIT, "g"), _AsYouTypeFormatterUtil.DIGIT_PLACEHOLDER); + if (!nationalPrefixIncludedInTemplate) { + if (prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix) { + template = (0, _AsYouTypeFormatterUtil.repeat)(_AsYouTypeFormatterUtil.DIGIT_PLACEHOLDER, prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix.length) + " " + template; + } else if (nationalPrefix) { + template = (0, _AsYouTypeFormatterUtil.repeat)(_AsYouTypeFormatterUtil.DIGIT_PLACEHOLDER, nationalPrefix.length) + this.getSeparatorAfterNationalPrefix(format) + template; + } + } + if (international) { + template = (0, _applyInternationalSeparatorStyle["default"])(template); + } + return template; + } + }, { + key: "formatNextNationalNumberDigits", + value: function formatNextNationalNumberDigits(digits) { + var result = (0, _AsYouTypeFormatterUtil.populateTemplateWithDigits)(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition, digits); + if (!result) { + this.resetFormat(); + return; + } + this.populatedNationalNumberTemplate = result[0]; + this.populatedNationalNumberTemplatePosition = result[1]; + return (0, _AsYouTypeFormatterUtil.cutAndStripNonPairedParens)(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition + 1); + } + }, { + key: "shouldTryNationalPrefixFormattingRule", + value: function shouldTryNationalPrefixFormattingRule(format, _ref5) { + var international = _ref5.international, nationalPrefix = _ref5.nationalPrefix; + if (format.nationalPrefixFormattingRule()) { + var usesNationalPrefix = format.usesNationalPrefix(); + if (usesNationalPrefix && nationalPrefix || !usesNationalPrefix && !international) { + return true; + } + } + } + }]); + })(); + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/AsYouTypeParser.js +var require_AsYouTypeParser = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/AsYouTypeParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = void 0; + exports2.extractFormattedDigitsAndPlus = extractFormattedDigitsAndPlus; + var _extractCountryCallingCode2 = _interopRequireDefault(require_extractCountryCallingCode()); + var _extractCountryCallingCodeFromInternationalNumberWithoutPlusSign = _interopRequireDefault(require_extractCountryCallingCodeFromInternationalNumberWithoutPlusSign()); + var _extractNationalNumberFromPossiblyIncompleteNumber = _interopRequireDefault(require_extractNationalNumberFromPossiblyIncompleteNumber()); + var _stripIddPrefix = _interopRequireDefault(require_stripIddPrefix()); + var _parseDigits = _interopRequireDefault(require_parseDigits()); + var _constants = require_constants3(); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); + } + function _nonIterableRest() { + 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 _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + function _iterableToArrayLimit(r, l2) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, n, i, u, a = [], f = true, o = false; + try { + if (i = (t = t.call(r)).next, 0 === l2) { + if (Object(t) !== t) return; + f = false; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l2); f = true) ; + } catch (r2) { + o = true, n = r2; + } finally { + try { + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } + } + function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; + } + function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); + } + function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o); + } + } + function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: false }), e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + var VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART = "[" + _constants.VALID_PUNCTUATION + _constants.VALID_DIGITS + "]+"; + var VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN = new RegExp("^" + VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART + "$", "i"); + var VALID_FORMATTED_PHONE_NUMBER_PART = "(?:[" + _constants.PLUS_CHARS + "][" + _constants.VALID_PUNCTUATION + _constants.VALID_DIGITS + "]*|[" + _constants.VALID_PUNCTUATION + _constants.VALID_DIGITS + "]+)"; + var AFTER_PHONE_NUMBER_DIGITS_END_PATTERN = new RegExp("[^" + _constants.VALID_PUNCTUATION + _constants.VALID_DIGITS + "]+.*$"); + var COMPLEX_NATIONAL_PREFIX = /[^\d\[\]]/; + var AsYouTypeParser = exports2["default"] = /* @__PURE__ */ (function() { + function AsYouTypeParser2(_ref) { + var defaultCountry = _ref.defaultCountry, defaultCallingCode = _ref.defaultCallingCode, metadata = _ref.metadata, onNationalSignificantNumberChange = _ref.onNationalSignificantNumberChange; + _classCallCheck(this, AsYouTypeParser2); + this.defaultCountry = defaultCountry; + this.defaultCallingCode = defaultCallingCode; + this.metadata = metadata; + this.onNationalSignificantNumberChange = onNationalSignificantNumberChange; + } + return _createClass(AsYouTypeParser2, [{ + key: "input", + value: function input(text, state) { + var _extractFormattedDigi = extractFormattedDigitsAndPlus(text), _extractFormattedDigi2 = _slicedToArray(_extractFormattedDigi, 2), formattedDigits = _extractFormattedDigi2[0], hasPlus = _extractFormattedDigi2[1]; + var digits = (0, _parseDigits["default"])(formattedDigits); + var justLeadingPlus; + if (hasPlus) { + if (!state.digits) { + state.startInternationalNumber(void 0, void 0); + if (!digits) { + justLeadingPlus = true; + } + } + } + if (digits) { + this.inputDigits(digits, state); + } + return { + digits, + justLeadingPlus + }; + } + /** + * Inputs "next" phone number digits. + * @param {string} digits + * @return {string} [formattedNumber] Formatted national phone number (if it can be formatted at this stage). Returning `undefined` means "don't format the national phone number at this stage". + */ + }, { + key: "inputDigits", + value: function inputDigits(nextDigits, state) { + var digits = state.digits; + var hasReceivedThreeLeadingDigits = digits.length < 3 && digits.length + nextDigits.length >= 3; + state.appendDigits(nextDigits); + if (hasReceivedThreeLeadingDigits) { + this.extractIddPrefix(state); + } + if (this.isWaitingForCountryCallingCode(state)) { + if (!this.extractCountryCallingCode(state)) { + return; + } + } else { + state.appendNationalSignificantNumberDigits(nextDigits); + } + if (!state.international) { + if (!this.hasExtractedNationalSignificantNumber) { + this.extractNationalSignificantNumber(state.getNationalDigits(), function(stateUpdate) { + return state.update(stateUpdate); + }); + } + } + } + }, { + key: "isWaitingForCountryCallingCode", + value: function isWaitingForCountryCallingCode(_ref2) { + var international = _ref2.international, callingCode = _ref2.callingCode; + return international && !callingCode; + } + // Extracts a country calling code from a number + // being entered in internatonal format. + }, { + key: "extractCountryCallingCode", + value: function extractCountryCallingCode(state) { + var _extractCountryCallin = (0, _extractCountryCallingCode2["default"])("+" + state.getDigitsWithoutInternationalPrefix(), state.country, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata), countryCallingCode = _extractCountryCallin.countryCallingCode, number = _extractCountryCallin.number; + if (countryCallingCode) { + state.setCallingCode(countryCallingCode); + state.update({ + nationalSignificantNumber: number + }); + return true; + } + } + }, { + key: "reset", + value: function reset(numberingPlan) { + if (numberingPlan) { + this.hasSelectedNumberingPlan = true; + var nationalPrefixForParsing = numberingPlan._nationalPrefixForParsing(); + this.couldPossiblyExtractAnotherNationalSignificantNumber = nationalPrefixForParsing && COMPLEX_NATIONAL_PREFIX.test(nationalPrefixForParsing); + } else { + this.hasSelectedNumberingPlan = void 0; + this.couldPossiblyExtractAnotherNationalSignificantNumber = void 0; + } + } + /** + * Extracts a national (significant) number from user input. + * Google's library is different in that it only applies `national_prefix_for_parsing` + * and doesn't apply `national_prefix_transform_rule` after that. + * https://github.com/google/libphonenumber/blob/a3d70b0487875475e6ad659af404943211d26456/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L539 + * @return {boolean} [extracted] + */ + }, { + key: "extractNationalSignificantNumber", + value: function extractNationalSignificantNumber(nationalDigits, setState) { + if (!this.hasSelectedNumberingPlan) { + return; + } + var _extractNationalNumbe = (0, _extractNationalNumberFromPossiblyIncompleteNumber["default"])(nationalDigits, this.metadata), nationalPrefix = _extractNationalNumbe.nationalPrefix, nationalNumber = _extractNationalNumbe.nationalNumber, carrierCode = _extractNationalNumbe.carrierCode; + if (nationalNumber === nationalDigits) { + return; + } + this.onExtractedNationalNumber(nationalPrefix, carrierCode, nationalNumber, nationalDigits, setState); + return true; + } + /** + * In Google's code this function is called "attempt to extract longer NDD". + * "Some national prefixes are a substring of others", they say. + * @return {boolean} [result] — Returns `true` if extracting a national prefix produced different results from what they were. + */ + }, { + key: "extractAnotherNationalSignificantNumber", + value: function extractAnotherNationalSignificantNumber(nationalDigits, prevNationalSignificantNumber, setState) { + if (!this.hasExtractedNationalSignificantNumber) { + return this.extractNationalSignificantNumber(nationalDigits, setState); + } + if (!this.couldPossiblyExtractAnotherNationalSignificantNumber) { + return; + } + var _extractNationalNumbe2 = (0, _extractNationalNumberFromPossiblyIncompleteNumber["default"])(nationalDigits, this.metadata), nationalPrefix = _extractNationalNumbe2.nationalPrefix, nationalNumber = _extractNationalNumbe2.nationalNumber, carrierCode = _extractNationalNumbe2.carrierCode; + if (nationalNumber === prevNationalSignificantNumber) { + return; + } + this.onExtractedNationalNumber(nationalPrefix, carrierCode, nationalNumber, nationalDigits, setState); + return true; + } + }, { + key: "onExtractedNationalNumber", + value: function onExtractedNationalNumber(nationalPrefix, carrierCode, nationalSignificantNumber, nationalDigits, setState) { + var nationalSignificantNumberIsModified = false; + var prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix; + var nationalSignificantNumberIndex = nationalDigits.lastIndexOf(nationalSignificantNumber); + if (nationalSignificantNumberIndex < 0 || nationalSignificantNumberIndex !== nationalDigits.length - nationalSignificantNumber.length) { + nationalSignificantNumberIsModified = true; + } else { + var prefixBeforeNationalNumber = nationalDigits.slice(0, nationalSignificantNumberIndex); + if (prefixBeforeNationalNumber) { + if (prefixBeforeNationalNumber !== nationalPrefix) { + prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = prefixBeforeNationalNumber; + } + } + } + setState({ + nationalPrefix, + carrierCode, + nationalSignificantNumber, + nationalSignificantNumberIsModified, + prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix + }); + this.hasExtractedNationalSignificantNumber = true; + this.onNationalSignificantNumberChange(); + } + }, { + key: "reExtractNationalSignificantNumber", + value: function reExtractNationalSignificantNumber(state) { + if (this.extractAnotherNationalSignificantNumber(state.getNationalDigits(), state.nationalSignificantNumber, function(stateUpdate) { + return state.update(stateUpdate); + })) { + return true; + } + if (this.extractIddPrefix(state)) { + this.extractCallingCodeAndNationalSignificantNumber(state); + return true; + } + if (this.fixMissingPlus(state)) { + this.extractCallingCodeAndNationalSignificantNumber(state); + return true; + } + } + }, { + key: "extractIddPrefix", + value: function extractIddPrefix(state) { + var international = state.international, IDDPrefix = state.IDDPrefix, digits = state.digits, nationalSignificantNumber = state.nationalSignificantNumber; + if (international || IDDPrefix) { + return; + } + var numberWithoutIDD = (0, _stripIddPrefix["default"])(digits, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata); + if (numberWithoutIDD !== void 0 && numberWithoutIDD !== digits) { + state.update({ + IDDPrefix: digits.slice(0, digits.length - numberWithoutIDD.length) + }); + this.startInternationalNumber(state, { + country: void 0, + callingCode: void 0 + }); + return true; + } + } + }, { + key: "fixMissingPlus", + value: function fixMissingPlus(state) { + if (!state.international) { + var _extractCountryCallin2 = (0, _extractCountryCallingCodeFromInternationalNumberWithoutPlusSign["default"])(state.digits, state.country, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata), newCallingCode = _extractCountryCallin2.countryCallingCode; + if (newCallingCode) { + state.update({ + missingPlus: true + }); + this.startInternationalNumber(state, { + country: state.country, + callingCode: newCallingCode + }); + return true; + } + } + } + }, { + key: "startInternationalNumber", + value: function startInternationalNumber(state, _ref3) { + var country2 = _ref3.country, callingCode = _ref3.callingCode; + state.startInternationalNumber(country2, callingCode); + if (state.nationalSignificantNumber) { + state.resetNationalSignificantNumber(); + this.onNationalSignificantNumberChange(); + this.hasExtractedNationalSignificantNumber = void 0; + } + } + }, { + key: "extractCallingCodeAndNationalSignificantNumber", + value: function extractCallingCodeAndNationalSignificantNumber(state) { + if (this.extractCountryCallingCode(state)) { + this.extractNationalSignificantNumber(state.getNationalDigits(), function(stateUpdate) { + return state.update(stateUpdate); + }); + } + } + }]); + })(); + function extractFormattedPhoneNumber(text) { + var startsAt = text.search(VALID_FORMATTED_PHONE_NUMBER_PART); + if (startsAt < 0) { + return; + } + text = text.slice(startsAt); + var hasPlus; + if (text[0] === "+") { + hasPlus = true; + text = text.slice("+".length); + } + text = text.replace(AFTER_PHONE_NUMBER_DIGITS_END_PATTERN, ""); + if (hasPlus) { + text = "+" + text; + } + return text; + } + function _extractFormattedDigitsAndPlus(text) { + var extractedNumber = extractFormattedPhoneNumber(text) || ""; + if (extractedNumber[0] === "+") { + return [extractedNumber.slice("+".length), true]; + } + return [extractedNumber]; + } + function extractFormattedDigitsAndPlus(text) { + var _extractFormattedDigi3 = _extractFormattedDigitsAndPlus(text), _extractFormattedDigi4 = _slicedToArray(_extractFormattedDigi3, 2), formattedDigits = _extractFormattedDigi4[0], hasPlus = _extractFormattedDigi4[1]; + if (!VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN.test(formattedDigits)) { + formattedDigits = ""; + } + return [formattedDigits, hasPlus]; + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/AsYouType.js +var require_AsYouType = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/AsYouType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = void 0; + var _metadata = _interopRequireDefault(require_metadata()); + var _PhoneNumber = _interopRequireDefault(require_PhoneNumber()); + var _checkNumberLength = _interopRequireDefault(require_checkNumberLength()); + var _AsYouTypeState = _interopRequireDefault(require_AsYouTypeState()); + var _AsYouTypeFormatter = _interopRequireWildcard(require_AsYouTypeFormatter()); + var _AsYouTypeParser = _interopRequireWildcard(require_AsYouTypeParser()); + var _getCountryByCallingCode = _interopRequireDefault(require_getCountryByCallingCode()); + var _getCountryByNationalNumber = _interopRequireDefault(require_getCountryByNationalNumber()); + var _isObject = _interopRequireDefault(require_isObject()); + function _interopRequireWildcard(e, t) { + if ("function" == typeof WeakMap) var r = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(); + return (_interopRequireWildcard = function _interopRequireWildcard2(e2, t2) { + if (!t2 && e2 && e2.__esModule) return e2; + var o, i, f = { __proto__: null, "default": e2 }; + if (null === e2 || "object" != _typeof(e2) && "function" != typeof e2) return f; + if (o = t2 ? n : r) { + if (o.has(e2)) return o.get(e2); + o.set(e2, f); + } + for (var _t in e2) "default" !== _t && {}.hasOwnProperty.call(e2, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e2, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e2[_t]); + return f; + })(e, t); + } + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); + } + function _nonIterableRest() { + 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 _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + function _iterableToArrayLimit(r, l2) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, n, i, u, a = [], f = true, o = false; + try { + if (i = (t = t.call(r)).next, 0 === l2) { + if (Object(t) !== t) return; + f = false; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l2); f = true) ; + } catch (r2) { + o = true, n = r2; + } finally { + try { + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } + } + function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; + } + function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); + } + function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o); + } + } + function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: false }), e; + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; + } + function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + var USE_NON_GEOGRAPHIC_COUNTRY_CODE = false; + var AsYouType = exports2["default"] = /* @__PURE__ */ (function() { + function AsYouType2(optionsOrDefaultCountry, metadata) { + _classCallCheck(this, AsYouType2); + this.metadata = new _metadata["default"](metadata); + var _this$getCountryAndCa = this.getCountryAndCallingCode(optionsOrDefaultCountry), _this$getCountryAndCa2 = _slicedToArray(_this$getCountryAndCa, 2), defaultCountry = _this$getCountryAndCa2[0], defaultCallingCode = _this$getCountryAndCa2[1]; + this.defaultCountry = defaultCountry; + this.defaultCallingCode = defaultCallingCode; + this.reset(); + } + return _createClass(AsYouType2, [{ + key: "getCountryAndCallingCode", + value: function getCountryAndCallingCode(optionsOrDefaultCountry) { + var defaultCountry; + var defaultCallingCode; + if (optionsOrDefaultCountry) { + if ((0, _isObject["default"])(optionsOrDefaultCountry)) { + defaultCountry = optionsOrDefaultCountry.defaultCountry; + defaultCallingCode = optionsOrDefaultCountry.defaultCallingCode; + } else { + defaultCountry = optionsOrDefaultCountry; + } + } + if (defaultCountry && !this.metadata.hasCountry(defaultCountry)) { + defaultCountry = void 0; + } + if (defaultCallingCode) { + if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) { + if (this.metadata.isNonGeographicCallingCode(defaultCallingCode)) { + defaultCountry = "001"; + } + } + } + return [defaultCountry, defaultCallingCode]; + } + /** + * Inputs "next" phone number characters. + * @param {string} text + * @return {string} Formatted phone number characters that have been input so far. + */ + }, { + key: "input", + value: function input(text) { + var _this$parser$input = this.parser.input(text, this.state), digits = _this$parser$input.digits, justLeadingPlus = _this$parser$input.justLeadingPlus; + if (justLeadingPlus) { + this.formattedOutput = "+"; + } else if (digits) { + this.determineTheCountryIfNeeded(); + if (this.state.nationalSignificantNumber) { + this.formatter.narrowDownMatchingFormats(this.state); + } + var formattedNationalNumber; + if (this.metadata.hasSelectedNumberingPlan()) { + formattedNationalNumber = this.formatter.format(digits, this.state); + } + if (formattedNationalNumber === void 0) { + if (this.parser.reExtractNationalSignificantNumber(this.state)) { + this.determineTheCountryIfNeeded(); + var nationalDigits = this.state.getNationalDigits(); + if (nationalDigits) { + formattedNationalNumber = this.formatter.format(nationalDigits, this.state); + } + } + } + this.formattedOutput = formattedNationalNumber ? this.getFullNumber(formattedNationalNumber) : this.getNonFormattedNumber(); + } + return this.formattedOutput; + } + }, { + key: "reset", + value: function reset() { + var _this = this; + this.state = new _AsYouTypeState["default"]({ + onCountryChange: function onCountryChange(country2) { + _this.country = country2; + }, + onCallingCodeChange: function onCallingCodeChange(callingCode, country2) { + _this.metadata.selectNumberingPlan(country2 || callingCode); + _this.formatter.reset(_this.metadata.numberingPlan, _this.state); + _this.parser.reset(_this.metadata.numberingPlan); + } + }); + this.formatter = new _AsYouTypeFormatter["default"]({ + state: this.state, + metadata: this.metadata + }); + this.parser = new _AsYouTypeParser["default"]({ + defaultCountry: this.defaultCountry, + defaultCallingCode: this.defaultCallingCode, + metadata: this.metadata, + state: this.state, + onNationalSignificantNumberChange: function onNationalSignificantNumberChange() { + _this.determineTheCountryIfNeeded(); + _this.formatter.reset(_this.metadata.numberingPlan, _this.state); + } + }); + this.state.reset({ + country: this.defaultCountry, + callingCode: this.defaultCallingCode + }); + this.formattedOutput = ""; + return this; + } + /** + * Returns `true` if the phone number is being input in international format. + * In other words, returns `true` if and only if the parsed phone number starts with a `"+"`. + * @return {boolean} + */ + }, { + key: "isInternational", + value: function isInternational() { + return this.state.international; + } + /** + * Returns the "calling code" part of the phone number when it's being input + * in an international format. + * If no valid calling code has been entered so far, returns `undefined`. + * @return {string} [callingCode] + */ + }, { + key: "getCallingCode", + value: function getCallingCode() { + if (this.isInternational()) { + return this.state.callingCode; + } + } + // A legacy alias. + }, { + key: "getCountryCallingCode", + value: function getCountryCallingCode() { + return this.getCallingCode(); + } + /** + * Returns a two-letter country code of the phone number. + * Returns `undefined` for "non-geographic" phone numbering plans. + * Returns `undefined` if no phone number has been input yet. + * @return {string} [country] + */ + }, { + key: "getCountry", + value: function getCountry() { + var digits = this.state.digits; + if (digits) { + return this._getCountry(); + } + } + /** + * Returns a two-letter country code of the phone number. + * Returns `undefined` for "non-geographic" phone numbering plans. + * @return {string} [country] + */ + }, { + key: "_getCountry", + value: function _getCountry() { + var country2 = this.state.country; + if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) { + if (country2 === "001") { + return; + } + } + return country2; + } + }, { + key: "determineTheCountryIfNeeded", + value: function determineTheCountryIfNeeded() { + if (!this.state.country || this.isCountryCallingCodeAmbiguous()) { + this.determineTheCountry(); + } + } + // Prepends `+CountryCode ` in case of an international phone number + }, { + key: "getFullNumber", + value: function getFullNumber(formattedNationalNumber) { + var _this2 = this; + if (this.isInternational()) { + var prefix = function prefix2(text) { + return _this2.formatter.getInternationalPrefixBeforeCountryCallingCode(_this2.state, { + spacing: text ? true : false + }) + text; + }; + var callingCode = this.state.callingCode; + if (!callingCode) { + return prefix("".concat(this.state.getDigitsWithoutInternationalPrefix())); + } + if (!formattedNationalNumber) { + return prefix(callingCode); + } + return prefix("".concat(callingCode, " ").concat(formattedNationalNumber)); + } + return formattedNationalNumber; + } + }, { + key: "getNonFormattedNationalNumberWithPrefix", + value: function getNonFormattedNationalNumberWithPrefix() { + var _this$state = this.state, nationalSignificantNumber = _this$state.nationalSignificantNumber, prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = _this$state.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix, nationalPrefix = _this$state.nationalPrefix; + var number = nationalSignificantNumber; + var prefix = prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix || nationalPrefix; + if (prefix) { + number = prefix + number; + } + return number; + } + }, { + key: "getNonFormattedNumber", + value: function getNonFormattedNumber() { + var nationalSignificantNumberIsModified = this.state.nationalSignificantNumberIsModified; + return this.getFullNumber(nationalSignificantNumberIsModified ? this.state.getNationalDigits() : this.getNonFormattedNationalNumberWithPrefix()); + } + }, { + key: "getNonFormattedTemplate", + value: function getNonFormattedTemplate() { + var number = this.getNonFormattedNumber(); + if (number) { + return number.replace(/[\+\d]/g, _AsYouTypeFormatter.DIGIT_PLACEHOLDER); + } + } + }, { + key: "isCountryCallingCodeAmbiguous", + value: function isCountryCallingCodeAmbiguous() { + var callingCode = this.state.callingCode; + var countryCodes = this.metadata.getCountryCodesForCallingCode(callingCode); + return countryCodes && countryCodes.length > 1; + } + // Determines the exact country of the phone number + // entered so far based on the country phone code + // and the national phone number. + }, { + key: "determineTheCountry", + value: function determineTheCountry() { + var country2 = (0, _getCountryByCallingCode["default"])(this.isInternational() ? this.state.callingCode : this.defaultCallingCode, { + nationalNumber: this.state.nationalSignificantNumber, + metadata: this.metadata + }); + if (country2 !== this.state.country) { + this.state.setCountry(country2); + if (country2) { + this.metadata.selectNumberingPlan(country2); + } + } + } + /** + * Returns a E.164 phone number value for the user's input. + * + * For example, for country `"US"` and input `"(222) 333-4444"` + * it will return `"+12223334444"`. + * + * For international phone number input, it will also auto-correct + * some minor errors such as using a national prefix when writing + * an international phone number. For example, if the user inputs + * `"+44 0 7400 000000"` then it will return an auto-corrected + * `"+447400000000"` phone number value. + * + * Will return `undefined` if no digits have been input, + * or when inputting a phone number in national format and no + * default country or default "country calling code" have been set. + * + * @return {string} [value] + */ + }, { + key: "getNumberValue", + value: function getNumberValue() { + var _this$state2 = this.state, digits = _this$state2.digits, callingCode = _this$state2.callingCode, country2 = _this$state2.country, nationalSignificantNumber = _this$state2.nationalSignificantNumber; + if (!digits) { + return; + } + if (this.isInternational()) { + if (callingCode) { + return "+" + callingCode + nationalSignificantNumber; + } else { + return "+" + digits; + } + } else { + if (country2 || callingCode) { + var callingCode_ = country2 ? this.metadata.countryCallingCode() : callingCode; + return "+" + callingCode_ + nationalSignificantNumber; + } + } + } + /** + * Returns an instance of `PhoneNumber` class. + * Will return `undefined` if no national (significant) number + * digits have been entered so far, or if no `defaultCountry` has been + * set and the user enters a phone number not in international format. + */ + }, { + key: "getNumber", + value: function getNumber() { + var _this$state3 = this.state, nationalSignificantNumber = _this$state3.nationalSignificantNumber, carrierCode = _this$state3.carrierCode, callingCode = _this$state3.callingCode; + if (!nationalSignificantNumber) { + return; + } + var country2 = this._getCountry(); + if (!country2 && !callingCode) { + return; + } + if (country2) { + if (country2 === this.defaultCountry) { + var countryCallingCode = this.metadata.numberingPlan.callingCode(); + var exactCountry = getExactCountryForMultiCountryCallingCode(countryCallingCode, nationalSignificantNumber, this.metadata); + if (exactCountry) { + country2 = exactCountry; + } + } + } + var phoneNumber = new _PhoneNumber["default"](country2 || callingCode, nationalSignificantNumber, this.metadata.metadata); + if (carrierCode) { + phoneNumber.carrierCode = carrierCode; + } + return phoneNumber; + } + /** + * Returns `true` if the phone number is "possible". + * Is just a shortcut for `PhoneNumber.isPossible()`. + * @return {boolean} + */ + }, { + key: "isPossible", + value: function isPossible() { + var phoneNumber = this.getNumber(); + if (!phoneNumber) { + return false; + } + return phoneNumber.isPossible(); + } + /** + * Returns `true` if the phone number is "valid". + * Is just a shortcut for `PhoneNumber.isValid()`. + * @return {boolean} + */ + }, { + key: "isValid", + value: function isValid() { + var phoneNumber = this.getNumber(); + if (!phoneNumber) { + return false; + } + return phoneNumber.isValid(); + } + /** + * Checks if the phone number length is valid. + * If it is, nothing is returned. + * Otherwise, a rejection reason is returned. + * @return {string?} + */ + }, { + key: "validateLength", + value: function validateLength() { + var _this$state4 = this.state, digits = _this$state4.digits, nationalSignificantNumber = _this$state4.nationalSignificantNumber; + if (!digits) { + return "NOT_A_NUMBER"; + } + if (!this.metadata.numberingPlan) { + return "INVALID_COUNTRY"; + } + if (!nationalSignificantNumber) { + return "TOO_SHORT"; + } + var result = (0, _checkNumberLength["default"])(nationalSignificantNumber, void 0, this.metadata); + if (result !== "IS_POSSIBLE") { + return result; + } + } + /** + * @deprecated + * This method is used in `react-phone-number-input/source/input-control.js` + * in versions before `3.0.16`. + */ + }, { + key: "getNationalNumber", + value: function getNationalNumber() { + return this.state.nationalSignificantNumber; + } + /** + * Returns the phone number characters entered by the user. + * @return {string} + */ + }, { + key: "getChars", + value: function getChars() { + return (this.state.international ? "+" : "") + this.state.digits; + } + /** + * Returns the template for the formatted phone number. + * @return {string} + */ + }, { + key: "getTemplate", + value: function getTemplate() { + return this.formatter.getTemplate(this.state) || this.getNonFormattedTemplate() || ""; + } + }]); + })(); + function getExactCountryForMultiCountryCallingCode(callingCode, nationalSignificantNumber, metadata) { + var ambiguousCountries = metadata.getCountryCodesForCallingCode(callingCode); + if (ambiguousCountries.length > 1) { + return (0, _getCountryByNationalNumber["default"])(nationalSignificantNumber, ambiguousCountries, metadata.metadata); + } + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/getCountries.js +var require_getCountries = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/getCountries.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = getCountries; + var _metadata = _interopRequireDefault(require_metadata()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function getCountries(metadata) { + return new _metadata["default"](metadata).getCountries(); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/getExampleNumber.js +var require_getExampleNumber = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/getExampleNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = getExampleNumber; + var _PhoneNumber = _interopRequireDefault(require_PhoneNumber()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function getExampleNumber(country2, examples, metadata) { + if (examples[country2]) { + return new _PhoneNumber["default"](country2, examples[country2], metadata); + } + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/formatIncompletePhoneNumber.js +var require_formatIncompletePhoneNumber = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/build/formatIncompletePhoneNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2["default"] = formatIncompletePhoneNumber; + var _AsYouType = _interopRequireDefault(require_AsYouType()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function formatIncompletePhoneNumber(value, optionsOrDefaultCountry, metadata) { + if (!metadata) { + metadata = optionsOrDefaultCountry; + optionsOrDefaultCountry = void 0; + } + return new _AsYouType["default"](optionsOrDefaultCountry, metadata).input(value); + } + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/core/index.cjs +var require_core2 = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/core/index.cjs"(exports2, module2) { + "use strict"; + var parsePhoneNumberFromString = require_parsePhoneNumber2().default; + exports2 = module2.exports = parsePhoneNumberFromString; + exports2["default"] = parsePhoneNumberFromString; + exports2.PhoneNumber = require_PhoneNumber().default; + exports2.ParseError = require_ParseError().default; + var parsePhoneNumberWithError = require_parsePhoneNumberWithError2().default; + exports2.parsePhoneNumberWithError = parsePhoneNumberWithError; + exports2.parsePhoneNumber = parsePhoneNumberWithError; + exports2.parsePhoneNumberFromString = parsePhoneNumberFromString; + exports2.isValidPhoneNumber = require_isValidPhoneNumber().default; + exports2.isPossiblePhoneNumber = require_isPossiblePhoneNumber().default; + exports2.validatePhoneNumberLength = require_validatePhoneNumberLength().default; + exports2.findNumbers = require_findNumbers().default; + exports2.searchNumbers = require_searchNumbers().default; + exports2.findPhoneNumbersInText = require_findPhoneNumbersInText().default; + exports2.searchPhoneNumbersInText = require_searchPhoneNumbersInText().default; + exports2.PhoneNumberMatcher = require_PhoneNumberMatcher().default; + exports2.AsYouType = require_AsYouType().default; + exports2.Metadata = require_metadata().default; + exports2.isSupportedCountry = require_metadata().isSupportedCountry; + exports2.getCountries = require_getCountries().default; + exports2.getCountryCallingCode = require_metadata().getCountryCallingCode; + exports2.getExtPrefix = require_metadata().getExtPrefix; + exports2.getExampleNumber = require_getExampleNumber().default; + exports2.formatIncompletePhoneNumber = require_formatIncompletePhoneNumber().default; + exports2.parseIncompletePhoneNumber = require_parseIncompletePhoneNumber().default; + exports2.parsePhoneNumberCharacter = require_parseIncompletePhoneNumber().parsePhoneNumberCharacter; + exports2.parseDigits = require_parseDigits().default; + exports2.DIGIT_PLACEHOLDER = require_AsYouTypeFormatter().DIGIT_PLACEHOLDER; + exports2.parseRFC3966 = require_RFC3966().parseRFC3966; + exports2.formatRFC3966 = require_RFC3966().formatRFC3966; + } +}); + +// ../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/max/index.cjs +var require_max = __commonJS({ + "../../node_modules/.pnpm/libphonenumber-js@1.13.12/node_modules/libphonenumber-js/max/index.cjs"(exports2, module2) { + "use strict"; + var metadata = require_metadata_max(); + var core = require_core2(); + function call(func, _arguments) { + var args = Array.prototype.slice.call(_arguments); + args.push(metadata); + return func.apply(this, args); + } + function parsePhoneNumberFromString() { + return call(core.parsePhoneNumberFromString, arguments); + } + exports2 = module2.exports = parsePhoneNumberFromString; + exports2["default"] = parsePhoneNumberFromString; + exports2.PhoneNumber = core.PhoneNumber; + exports2.ParseError = core.ParseError; + function parsePhoneNumberWithError() { + return call(core.parsePhoneNumberWithError, arguments); + } + exports2.parsePhoneNumber = parsePhoneNumberWithError; + exports2.parsePhoneNumberWithError = parsePhoneNumberWithError; + exports2.parsePhoneNumberFromString = parsePhoneNumberFromString; + exports2.isValidPhoneNumber = function isValidPhoneNumber() { + return call(core.isValidPhoneNumber, arguments); + }; + exports2.isPossiblePhoneNumber = function isPossiblePhoneNumber() { + return call(core.isPossiblePhoneNumber, arguments); + }; + exports2.validatePhoneNumberLength = function validatePhoneNumberLength() { + return call(core.validatePhoneNumberLength, arguments); + }; + exports2.findNumbers = function findNumbers() { + return call(core.findNumbers, arguments); + }; + exports2.searchNumbers = function searchNumbers() { + return call(core.searchNumbers, arguments); + }; + exports2.findPhoneNumbersInText = function findPhoneNumbersInText() { + return call(core.findPhoneNumbersInText, arguments); + }; + exports2.searchPhoneNumbersInText = function searchPhoneNumbersInText() { + return call(core.searchPhoneNumbersInText, arguments); + }; + exports2.PhoneNumberMatcher = function PhoneNumberMatcher(text, options) { + return core.PhoneNumberMatcher.call(this, text, options, metadata); + }; + exports2.PhoneNumberMatcher.prototype = Object.create(core.PhoneNumberMatcher.prototype, {}); + exports2.PhoneNumberMatcher.prototype.constructor = exports2.PhoneNumberMatcher; + exports2.AsYouType = function AsYouType(country2) { + return core.AsYouType.call(this, country2, metadata); + }; + exports2.AsYouType.prototype = Object.create(core.AsYouType.prototype, {}); + exports2.AsYouType.prototype.constructor = exports2.AsYouType; + exports2.isSupportedCountry = function isSupportedCountry(country2) { + return call(core.isSupportedCountry, arguments); + }; + exports2.getCountries = function getCountries() { + return call(core.getCountries, arguments); + }; + exports2.getCountryCallingCode = function getCountryCallingCode() { + return call(core.getCountryCallingCode, arguments); + }; + exports2.getExtPrefix = function getExtPrefix(country2) { + return call(core.getExtPrefix, arguments); + }; + exports2.getExampleNumber = function getExampleNumber() { + return call(core.getExampleNumber, arguments); + }; + exports2.formatIncompletePhoneNumber = function formatIncompletePhoneNumber() { + return call(core.formatIncompletePhoneNumber, arguments); + }; + exports2.parseIncompletePhoneNumber = core.parseIncompletePhoneNumber; + exports2.parsePhoneNumberCharacter = core.parsePhoneNumberCharacter; + exports2.parseDigits = core.parseDigits; + exports2.DIGIT_PLACEHOLDER = core.DIGIT_PLACEHOLDER; + exports2.parseRFC3966 = core.parseRFC3966; + exports2.formatRFC3966 = core.formatRFC3966; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsPhoneNumber.js +var require_IsPhoneNumber = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsPhoneNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsPhoneNumber = exports2.isPhoneNumber = exports2.IS_PHONE_NUMBER = void 0; + var ValidateBy_1 = require_ValidateBy(); + var max_1 = require_max(); + exports2.IS_PHONE_NUMBER = "isPhoneNumber"; + function isPhoneNumber(value, region) { + if (typeof value !== "string" || value.trim() !== value) { + return false; + } + try { + const phoneNumber = (0, max_1.parsePhoneNumber)(value, region); + if (region && phoneNumber.country !== region) { + return false; + } + return phoneNumber.isValid(); + } catch (error) { + return false; + } + } + exports2.isPhoneNumber = isPhoneNumber; + function IsPhoneNumber(region, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_PHONE_NUMBER, + constraints: [region], + validator: { + validate: (value, args) => isPhoneNumber(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a valid phone number", validationOptions) + } + }, validationOptions); + } + exports2.IsPhoneNumber = IsPhoneNumber; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsMilitaryTime.js +var require_IsMilitaryTime = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsMilitaryTime.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsMilitaryTime = exports2.isMilitaryTime = exports2.IS_MILITARY_TIME = void 0; + var ValidateBy_1 = require_ValidateBy(); + var matches_1 = __importDefault2(require_matches()); + exports2.IS_MILITARY_TIME = "isMilitaryTime"; + function isMilitaryTime(value) { + const militaryTimeRegex = /^([01]\d|2[0-3]):?([0-5]\d)$/; + return typeof value === "string" && (0, matches_1.default)(value, militaryTimeRegex); + } + exports2.isMilitaryTime = isMilitaryTime; + function IsMilitaryTime(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_MILITARY_TIME, + validator: { + validate: (value, args) => isMilitaryTime(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a valid representation of military time in the format HH:MM", validationOptions) + } + }, validationOptions); + } + exports2.IsMilitaryTime = IsMilitaryTime; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isHash.js +var require_isHash = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isHash.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isHash; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var lengths = { + md5: 32, + md4: 32, + sha1: 40, + sha256: 64, + sha384: 96, + sha512: 128, + ripemd128: 32, + ripemd160: 40, + tiger128: 32, + tiger160: 40, + tiger192: 48, + crc32: 8, + crc32b: 8 + }; + function isHash(str, algorithm) { + (0, _assertString.default)(str); + var hash = new RegExp("^[a-fA-F0-9]{".concat(lengths[algorithm], "}$")); + return hash.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsHash.js +var require_IsHash = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsHash.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsHash = exports2.isHash = exports2.IS_HASH = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isHash_1 = __importDefault2(require_isHash()); + exports2.IS_HASH = "isHash"; + function isHash(value, algorithm) { + return typeof value === "string" && (0, isHash_1.default)(value, algorithm); + } + exports2.isHash = isHash; + function IsHash(algorithm, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_HASH, + constraints: [algorithm], + validator: { + validate: (value, args) => isHash(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a hash of type $constraint1", validationOptions) + } + }, validationOptions); + } + exports2.IsHash = IsHash; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISSN.js +var require_isISSN = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISSN.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isISSN; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var issn = "^\\d{4}-?\\d{3}[\\dX]$"; + function isISSN(str) { + var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + (0, _assertString.default)(str); + var testIssn = issn; + testIssn = options.require_hyphen ? testIssn.replace("?", "") : testIssn; + testIssn = options.case_sensitive ? new RegExp(testIssn) : new RegExp(testIssn, "i"); + if (!testIssn.test(str)) { + return false; + } + var digits = str.replace("-", "").toUpperCase(); + var checksum = 0; + for (var i = 0; i < digits.length; i++) { + var digit = digits[i]; + checksum += (digit === "X" ? 10 : +digit) * (8 - i); + } + return checksum % 11 === 0; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsISSN.js +var require_IsISSN = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsISSN.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsISSN = exports2.isISSN = exports2.IS_ISSN = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isISSN_1 = __importDefault2(require_isISSN()); + exports2.IS_ISSN = "isISSN"; + function isISSN(value, options) { + return typeof value === "string" && (0, isISSN_1.default)(value, options); + } + exports2.isISSN = isISSN; + function IsISSN(options, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_ISSN, + constraints: [options], + validator: { + validate: (value, args) => isISSN(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a ISSN", validationOptions) + } + }, validationOptions); + } + exports2.IsISSN = IsISSN; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsDateString.js +var require_IsDateString = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsDateString.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsDateString = exports2.isDateString = exports2.IS_DATE_STRING = void 0; + var ValidateBy_1 = require_ValidateBy(); + var IsISO8601_1 = require_IsISO8601(); + exports2.IS_DATE_STRING = "isDateString"; + function isDateString(value, options) { + return (0, IsISO8601_1.isISO8601)(value, options); + } + exports2.isDateString = isDateString; + function IsDateString(options, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_DATE_STRING, + constraints: [options], + validator: { + validate: (value) => isDateString(value, options), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a valid ISO 8601 date string", validationOptions) + } + }, validationOptions); + } + exports2.IsDateString = IsDateString; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isBoolean.js +var require_isBoolean = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isBoolean.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isBoolean; + var _assertString = _interopRequireDefault(require_assertString()); + var _includesArray = _interopRequireDefault(require_includesArray()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var defaultOptions = { + loose: false + }; + var strictBooleans = ["true", "false", "1", "0"]; + var looseBooleans = [].concat(strictBooleans, ["yes", "no"]); + function isBoolean(str) { + var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : defaultOptions; + (0, _assertString.default)(str); + if (options.loose) { + return (0, _includesArray.default)(looseBooleans, str.toLowerCase()); + } + return (0, _includesArray.default)(strictBooleans, str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsBooleanString.js +var require_IsBooleanString = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsBooleanString.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsBooleanString = exports2.isBooleanString = exports2.IS_BOOLEAN_STRING = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isBoolean_1 = __importDefault2(require_isBoolean()); + exports2.IS_BOOLEAN_STRING = "isBooleanString"; + function isBooleanString(value) { + return typeof value === "string" && (0, isBoolean_1.default)(value); + } + exports2.isBooleanString = isBooleanString; + function IsBooleanString(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_BOOLEAN_STRING, + validator: { + validate: (value, args) => isBooleanString(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a boolean string", validationOptions) + } + }, validationOptions); + } + exports2.IsBooleanString = IsBooleanString; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isNumeric.js +var require_isNumeric = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isNumeric.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isNumeric; + var _assertString = _interopRequireDefault(require_assertString()); + var _alpha = require_alpha(); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var numericNoSymbols = /^[0-9]+$/; + function isNumeric(str, options) { + (0, _assertString.default)(str); + if (options && options.no_symbols) { + return numericNoSymbols.test(str); + } + return new RegExp("^[+-]?([0-9]*[".concat((options || {}).locale ? _alpha.decimal[options.locale] : ".", "])?[0-9]+$")).test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsNumberString.js +var require_IsNumberString = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsNumberString.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsNumberString = exports2.isNumberString = exports2.IS_NUMBER_STRING = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isNumeric_1 = __importDefault2(require_isNumeric()); + exports2.IS_NUMBER_STRING = "isNumberString"; + function isNumberString(value, options) { + return typeof value === "string" && (0, isNumeric_1.default)(value, options); + } + exports2.isNumberString = isNumberString; + function IsNumberString(options, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_NUMBER_STRING, + constraints: [options], + validator: { + validate: (value, args) => isNumberString(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a number string", validationOptions) + } + }, validationOptions); + } + exports2.IsNumberString = IsNumberString; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isBase32.js +var require_isBase32 = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isBase32.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isBase32; + var _assertString = _interopRequireDefault(require_assertString()); + var _merge = _interopRequireDefault(require_merge()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var base32 = /^[A-Z2-7]+=*$/; + var crockfordBase32 = /^[A-HJKMNP-TV-Z0-9]+$/; + var defaultBase32Options = { + crockford: false + }; + function isBase32(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, defaultBase32Options); + if (options.crockford) { + return crockfordBase32.test(str); + } + return str.length % 8 === 0 && base32.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsBase32.js +var require_IsBase32 = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsBase32.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsBase32 = exports2.isBase32 = exports2.IS_BASE32 = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isBase32_1 = __importDefault2(require_isBase32()); + exports2.IS_BASE32 = "isBase32"; + function isBase32(value) { + return typeof value === "string" && (0, isBase32_1.default)(value); + } + exports2.isBase32 = isBase32; + function IsBase32(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_BASE32, + validator: { + validate: (value, args) => isBase32(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be base32 encoded", validationOptions) + } + }, validationOptions); + } + exports2.IsBase32 = IsBase32; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isBIC.js +var require_isBIC = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isBIC.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isBIC; + var _assertString = _interopRequireDefault(require_assertString()); + var _isISO31661Alpha = require_isISO31661Alpha2(); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var isBICReg = /^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/; + function isBIC(str) { + (0, _assertString.default)(str); + var countryCode = str.slice(4, 6).toUpperCase(); + if (!_isISO31661Alpha.CountryCodes.has(countryCode) && countryCode !== "XK") { + return false; + } + return isBICReg.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsBIC.js +var require_IsBIC = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsBIC.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsBIC = exports2.isBIC = exports2.IS_BIC = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isBIC_1 = __importDefault2(require_isBIC()); + exports2.IS_BIC = "isBIC"; + function isBIC(value) { + return typeof value === "string" && (0, isBIC_1.default)(value); + } + exports2.isBIC = isBIC; + function IsBIC(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_BIC, + validator: { + validate: (value, args) => isBIC(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a BIC or SWIFT code", validationOptions) + } + }, validationOptions); + } + exports2.IsBIC = IsBIC; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isBtcAddress.js +var require_isBtcAddress = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isBtcAddress.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isBtcAddress; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var bech32 = /^(bc1|tb1|bc1p|tb1p)[ac-hj-np-z02-9]{39,58}$/; + var base58 = /^(1|2|3|m)[A-HJ-NP-Za-km-z1-9]{25,39}$/; + function isBtcAddress(str) { + (0, _assertString.default)(str); + return bech32.test(str) || base58.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsBtcAddress.js +var require_IsBtcAddress = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsBtcAddress.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsBtcAddress = exports2.isBtcAddress = exports2.IS_BTC_ADDRESS = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isBtcAddress_1 = __importDefault2(require_isBtcAddress()); + exports2.IS_BTC_ADDRESS = "isBtcAddress"; + function isBtcAddress(value) { + return typeof value === "string" && (0, isBtcAddress_1.default)(value); + } + exports2.isBtcAddress = isBtcAddress; + function IsBtcAddress(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_BTC_ADDRESS, + validator: { + validate: (value, args) => isBtcAddress(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a BTC address", validationOptions) + } + }, validationOptions); + } + exports2.IsBtcAddress = IsBtcAddress; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isDataURI.js +var require_isDataURI = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isDataURI.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isDataURI; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var validMediaType = /^[a-z]+\/[a-z0-9\-\+\._]+$/i; + var validAttribute = /^[a-z\-]+=[a-z0-9\-]+$/i; + var validData = /^[a-z0-9!\$&'\(\)\*\+,;=\-\._~:@\/\?%\s]*$/i; + function isDataURI(str) { + (0, _assertString.default)(str); + var data = str.split(","); + if (data.length < 2) { + return false; + } + var attributes = data.shift().trim().split(";"); + var schemeAndMediaType = attributes.shift(); + if (schemeAndMediaType.slice(0, 5) !== "data:") { + return false; + } + var mediaType = schemeAndMediaType.slice(5); + if (mediaType !== "" && !validMediaType.test(mediaType)) { + return false; + } + for (var i = 0; i < attributes.length; i++) { + if (!(i === attributes.length - 1 && attributes[i].toLowerCase() === "base64") && !validAttribute.test(attributes[i])) { + return false; + } + } + for (var _i = 0; _i < data.length; _i++) { + if (!validData.test(data[_i])) { + return false; + } + } + return true; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsDataURI.js +var require_IsDataURI = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsDataURI.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsDataURI = exports2.isDataURI = exports2.IS_DATA_URI = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isDataURI_1 = __importDefault2(require_isDataURI()); + exports2.IS_DATA_URI = "isDataURI"; + function isDataURI(value) { + return typeof value === "string" && (0, isDataURI_1.default)(value); + } + exports2.isDataURI = isDataURI; + function IsDataURI(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_DATA_URI, + validator: { + validate: (value, args) => isDataURI(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a data uri format", validationOptions) + } + }, validationOptions); + } + exports2.IsDataURI = IsDataURI; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isEAN.js +var require_isEAN = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isEAN.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isEAN; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var LENGTH_EAN_8 = 8; + var LENGTH_EAN_14 = 14; + var validEanRegex = /^(\d{8}|\d{13}|\d{14})$/; + function getPositionWeightThroughLengthAndIndex(length, index) { + if (length === LENGTH_EAN_8 || length === LENGTH_EAN_14) { + return index % 2 === 0 ? 3 : 1; + } + return index % 2 === 0 ? 1 : 3; + } + function calculateCheckDigit(ean) { + var checksum = ean.slice(0, -1).split("").map(function(char, index) { + return Number(char) * getPositionWeightThroughLengthAndIndex(ean.length, index); + }).reduce(function(acc, partialSum) { + return acc + partialSum; + }, 0); + var remainder = 10 - checksum % 10; + return remainder < 10 ? remainder : 0; + } + function isEAN(str) { + (0, _assertString.default)(str); + var actualCheckDigit = Number(str.slice(-1)); + return validEanRegex.test(str) && actualCheckDigit === calculateCheckDigit(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsEAN.js +var require_IsEAN = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsEAN.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsEAN = exports2.isEAN = exports2.IS_EAN = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isEAN_1 = __importDefault2(require_isEAN()); + exports2.IS_EAN = "isEAN"; + function isEAN(value) { + return typeof value === "string" && (0, isEAN_1.default)(value); + } + exports2.isEAN = isEAN; + function IsEAN(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_EAN, + validator: { + validate: (value, args) => isEAN(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be an EAN (European Article Number)", validationOptions) + } + }, validationOptions); + } + exports2.IsEAN = IsEAN; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isEthereumAddress.js +var require_isEthereumAddress = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isEthereumAddress.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isEthereumAddress; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var eth = /^(0x)[0-9a-f]{40}$/i; + function isEthereumAddress(str) { + (0, _assertString.default)(str); + return eth.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsEthereumAddress.js +var require_IsEthereumAddress = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsEthereumAddress.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsEthereumAddress = exports2.isEthereumAddress = exports2.IS_ETHEREUM_ADDRESS = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isEthereumAddress_1 = __importDefault2(require_isEthereumAddress()); + exports2.IS_ETHEREUM_ADDRESS = "isEthereumAddress"; + function isEthereumAddress(value) { + return typeof value === "string" && (0, isEthereumAddress_1.default)(value); + } + exports2.isEthereumAddress = isEthereumAddress; + function IsEthereumAddress(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_ETHEREUM_ADDRESS, + validator: { + validate: (value, args) => isEthereumAddress(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be an Ethereum address", validationOptions) + } + }, validationOptions); + } + exports2.IsEthereumAddress = IsEthereumAddress; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isHSL.js +var require_isHSL = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isHSL.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isHSL; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var hslComma = /^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}(,((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?))?\)$/i; + var hslSpace = /^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s?(\/\s((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s?)?\)$/i; + function isHSL(str) { + (0, _assertString.default)(str); + var strippedStr = str.replace(/\s+/g, " ").replace(/\s?(hsla?\(|\)|,)\s?/ig, "$1"); + if (strippedStr.indexOf(",") !== -1) { + return hslComma.test(strippedStr); + } + return hslSpace.test(strippedStr); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsHSL.js +var require_IsHSL = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsHSL.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsHSL = exports2.isHSL = exports2.IS_HSL = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isHSL_1 = __importDefault2(require_isHSL()); + exports2.IS_HSL = "isHSL"; + function isHSL(value) { + return typeof value === "string" && (0, isHSL_1.default)(value); + } + exports2.isHSL = isHSL; + function IsHSL(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_HSL, + validator: { + validate: (value, args) => isHSL(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a HSL color", validationOptions) + } + }, validationOptions); + } + exports2.IsHSL = IsHSL; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isIBAN.js +var require_isIBAN = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isIBAN.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isIBAN; + exports2.locales = void 0; + var _assertString = _interopRequireDefault(require_assertString()); + var _includesArray = _interopRequireDefault(require_includesArray()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var ibanRegexThroughCountryCode = { + AD: /^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/, + AE: /^(AE[0-9]{2})\d{3}\d{16}$/, + AL: /^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/, + AT: /^(AT[0-9]{2})\d{16}$/, + AZ: /^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/, + BA: /^(BA[0-9]{2})\d{16}$/, + BE: /^(BE[0-9]{2})\d{12}$/, + BG: /^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/, + BH: /^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/, + BR: /^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/, + BY: /^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/, + CH: /^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/, + CR: /^(CR[0-9]{2})\d{18}$/, + CY: /^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/, + CZ: /^(CZ[0-9]{2})\d{20}$/, + DE: /^(DE[0-9]{2})\d{18}$/, + DK: /^(DK[0-9]{2})\d{14}$/, + DO: /^(DO[0-9]{2})[A-Z]{4}\d{20}$/, + DZ: /^(DZ\d{24})$/, + EE: /^(EE[0-9]{2})\d{16}$/, + EG: /^(EG[0-9]{2})\d{25}$/, + ES: /^(ES[0-9]{2})\d{20}$/, + FI: /^(FI[0-9]{2})\d{14}$/, + FO: /^(FO[0-9]{2})\d{14}$/, + FR: /^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/, + GB: /^(GB[0-9]{2})[A-Z]{4}\d{14}$/, + GE: /^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/, + GI: /^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/, + GL: /^(GL[0-9]{2})\d{14}$/, + GR: /^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/, + GT: /^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/, + HR: /^(HR[0-9]{2})\d{17}$/, + HU: /^(HU[0-9]{2})\d{24}$/, + IE: /^(IE[0-9]{2})[A-Z]{4}\d{14}$/, + IL: /^(IL[0-9]{2})\d{19}$/, + IQ: /^(IQ[0-9]{2})[A-Z]{4}\d{15}$/, + IR: /^(IR[0-9]{2})\d{22}$/, + IS: /^(IS[0-9]{2})\d{22}$/, + IT: /^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/, + JO: /^(JO[0-9]{2})[A-Z]{4}\d{22}$/, + KW: /^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/, + KZ: /^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/, + LB: /^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/, + LC: /^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/, + LI: /^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/, + LT: /^(LT[0-9]{2})\d{16}$/, + LU: /^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/, + LV: /^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/, + MA: /^(MA[0-9]{26})$/, + MC: /^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/, + MD: /^(MD[0-9]{2})[A-Z0-9]{20}$/, + ME: /^(ME[0-9]{2})\d{18}$/, + MK: /^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/, + MR: /^(MR[0-9]{2})\d{23}$/, + MT: /^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/, + MU: /^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/, + MZ: /^(MZ[0-9]{2})\d{21}$/, + NL: /^(NL[0-9]{2})[A-Z]{4}\d{10}$/, + NO: /^(NO[0-9]{2})\d{11}$/, + PK: /^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/, + PL: /^(PL[0-9]{2})\d{24}$/, + PS: /^(PS[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/, + PT: /^(PT[0-9]{2})\d{21}$/, + QA: /^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/, + RO: /^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/, + RS: /^(RS[0-9]{2})\d{18}$/, + SA: /^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/, + SC: /^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/, + SE: /^(SE[0-9]{2})\d{20}$/, + SI: /^(SI[0-9]{2})\d{15}$/, + SK: /^(SK[0-9]{2})\d{20}$/, + SM: /^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/, + SV: /^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/, + TL: /^(TL[0-9]{2})\d{19}$/, + TN: /^(TN[0-9]{2})\d{20}$/, + TR: /^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/, + UA: /^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/, + VA: /^(VA[0-9]{2})\d{18}$/, + VG: /^(VG[0-9]{2})[A-Z]{4}\d{16}$/, + XK: /^(XK[0-9]{2})\d{16}$/ + }; + function hasOnlyValidCountryCodes(countryCodeArray) { + var countryCodeArrayFilteredWithObjectIbanCode = countryCodeArray.filter(function(countryCode) { + return !(countryCode in ibanRegexThroughCountryCode); + }); + return countryCodeArrayFilteredWithObjectIbanCode.length === 0; + } + function hasValidIbanFormat(str, options) { + var strippedStr = str.replace(/[\s\-]+/gi, "").toUpperCase(); + var isoCountryCode = strippedStr.slice(0, 2).toUpperCase(); + var isoCountryCodeInIbanRegexCodeObject = isoCountryCode in ibanRegexThroughCountryCode; + if (options.whitelist) { + if (!hasOnlyValidCountryCodes(options.whitelist)) { + return false; + } + var isoCountryCodeInWhiteList = (0, _includesArray.default)(options.whitelist, isoCountryCode); + if (!isoCountryCodeInWhiteList) { + return false; + } + } + if (options.blacklist) { + var isoCountryCodeInBlackList = (0, _includesArray.default)(options.blacklist, isoCountryCode); + if (isoCountryCodeInBlackList) { + return false; + } + } + return isoCountryCodeInIbanRegexCodeObject && ibanRegexThroughCountryCode[isoCountryCode].test(strippedStr); + } + function hasValidIbanChecksum(str) { + var strippedStr = str.replace(/[^A-Z0-9]+/gi, "").toUpperCase(); + var rearranged = strippedStr.slice(4) + strippedStr.slice(0, 4); + var alphaCapsReplacedWithDigits = rearranged.replace(/[A-Z]/g, function(char) { + return char.charCodeAt(0) - 55; + }); + var remainder = alphaCapsReplacedWithDigits.match(/\d{1,7}/g).reduce(function(acc, value) { + return Number(acc + value) % 97; + }, ""); + return remainder === 1; + } + function isIBAN(str) { + var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + (0, _assertString.default)(str); + return hasValidIbanFormat(str, options) && hasValidIbanChecksum(str); + } + var locales = exports2.locales = Object.keys(ibanRegexThroughCountryCode); + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsIBAN.js +var require_IsIBAN = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsIBAN.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsIBAN = exports2.isIBAN = exports2.IS_IBAN = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isIBAN_1 = __importDefault2(require_isIBAN()); + exports2.IS_IBAN = "isIBAN"; + function isIBAN(value) { + return typeof value === "string" && (0, isIBAN_1.default)(value); + } + exports2.isIBAN = isIBAN; + function IsIBAN(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_IBAN, + validator: { + validate: (value, args) => isIBAN(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be an IBAN", validationOptions) + } + }, validationOptions); + } + exports2.IsIBAN = IsIBAN; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isIdentityCard.js +var require_isIdentityCard = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isIdentityCard.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isIdentityCard; + var _assertString = _interopRequireDefault(require_assertString()); + var _includesArray = _interopRequireDefault(require_includesArray()); + var _isInt = _interopRequireDefault(require_isInt()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var validators = { + PL: function PL(str) { + (0, _assertString.default)(str); + var weightOfDigits = { + 1: 1, + 2: 3, + 3: 7, + 4: 9, + 5: 1, + 6: 3, + 7: 7, + 8: 9, + 9: 1, + 10: 3, + 11: 0 + }; + if (str != null && str.length === 11 && (0, _isInt.default)(str, { + allow_leading_zeroes: true + })) { + var digits = str.split("").slice(0, -1); + var sum = digits.reduce(function(acc, digit, index) { + return acc + Number(digit) * weightOfDigits[index + 1]; + }, 0); + var modulo = sum % 10; + var lastDigit = Number(str.charAt(str.length - 1)); + if (modulo === 0 && lastDigit === 0 || lastDigit === 10 - modulo) { + return true; + } + } + return false; + }, + ES: function ES(str) { + (0, _assertString.default)(str); + var DNI = /^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/; + var charsValue = { + X: 0, + Y: 1, + Z: 2 + }; + var controlDigits = ["T", "R", "W", "A", "G", "M", "Y", "F", "P", "D", "X", "B", "N", "J", "Z", "S", "Q", "V", "H", "L", "C", "K", "E"]; + var sanitized = str.trim().toUpperCase(); + if (!DNI.test(sanitized)) { + return false; + } + var number = sanitized.slice(0, -1).replace(/[X,Y,Z]/g, function(char) { + return charsValue[char]; + }); + return sanitized.endsWith(controlDigits[number % 23]); + }, + FI: function FI(str) { + (0, _assertString.default)(str); + if (str.length !== 11) { + return false; + } + if (!str.match(/^\d{6}[\-A\+]\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/)) { + return false; + } + var checkDigits = "0123456789ABCDEFHJKLMNPRSTUVWXY"; + var idAsNumber = parseInt(str.slice(0, 6), 10) * 1e3 + parseInt(str.slice(7, 10), 10); + var remainder = idAsNumber % 31; + var checkDigit = checkDigits[remainder]; + return checkDigit === str.slice(10, 11); + }, + IN: function IN(str) { + var DNI = /^[1-9]\d{3}\s?\d{4}\s?\d{4}$/; + var d = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 0, 6, 7, 8, 9, 5], [2, 3, 4, 0, 1, 7, 8, 9, 5, 6], [3, 4, 0, 1, 2, 8, 9, 5, 6, 7], [4, 0, 1, 2, 3, 9, 5, 6, 7, 8], [5, 9, 8, 7, 6, 0, 4, 3, 2, 1], [6, 5, 9, 8, 7, 1, 0, 4, 3, 2], [7, 6, 5, 9, 8, 2, 1, 0, 4, 3], [8, 7, 6, 5, 9, 3, 2, 1, 0, 4], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]]; + var p = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 5, 7, 6, 2, 8, 3, 0, 9, 4], [5, 8, 0, 3, 7, 9, 6, 1, 4, 2], [8, 9, 1, 6, 0, 4, 3, 5, 2, 7], [9, 4, 5, 3, 1, 2, 6, 8, 7, 0], [4, 2, 8, 6, 5, 7, 3, 9, 0, 1], [2, 7, 9, 3, 8, 0, 6, 4, 1, 5], [7, 0, 4, 6, 9, 1, 3, 2, 5, 8]]; + var sanitized = str.trim(); + if (!DNI.test(sanitized)) { + return false; + } + var c = 0; + var invertedArray = sanitized.replace(/\s/g, "").split("").map(Number).reverse(); + invertedArray.forEach(function(val, i) { + c = d[c][p[i % 8][val]]; + }); + return c === 0; + }, + IR: function IR(str) { + if (!str.match(/^\d{10}$/)) return false; + str = "0000".concat(str).slice(str.length - 6); + if (parseInt(str.slice(3, 9), 10) === 0) return false; + var lastNumber = parseInt(str.slice(9, 10), 10); + var sum = 0; + for (var i = 0; i < 9; i++) { + sum += parseInt(str.slice(i, i + 1), 10) * (10 - i); + } + sum %= 11; + return sum < 2 && lastNumber === sum || sum >= 2 && lastNumber === 11 - sum; + }, + IT: function IT(str) { + if (str.length !== 9) return false; + if (str === "CA00000AA") return false; + return str.search(/C[A-Z]\d{5}[A-Z]{2}/i) > -1; + }, + NO: function NO(str) { + var sanitized = str.trim(); + if (isNaN(Number(sanitized))) return false; + if (sanitized.length !== 11) return false; + if (sanitized === "00000000000") return false; + var f = sanitized.split("").map(Number); + var k1 = (11 - (3 * f[0] + 7 * f[1] + 6 * f[2] + 1 * f[3] + 8 * f[4] + 9 * f[5] + 4 * f[6] + 5 * f[7] + 2 * f[8]) % 11) % 11; + var k2 = (11 - (5 * f[0] + 4 * f[1] + 3 * f[2] + 2 * f[3] + 7 * f[4] + 6 * f[5] + 5 * f[6] + 4 * f[7] + 3 * f[8] + 2 * k1) % 11) % 11; + if (k1 !== f[9] || k2 !== f[10]) return false; + return true; + }, + TH: function TH(str) { + if (!str.match(/^[1-8]\d{12}$/)) return false; + var sum = 0; + for (var i = 0; i < 12; i++) { + sum += parseInt(str[i], 10) * (13 - i); + } + return str[12] === ((11 - sum % 11) % 10).toString(); + }, + LK: function LK(str) { + var old_nic = /^[1-9]\d{8}[vx]$/i; + var new_nic = /^[1-9]\d{11}$/i; + if (str.length === 10 && old_nic.test(str)) return true; + else if (str.length === 12 && new_nic.test(str)) return true; + return false; + }, + "he-IL": function heIL(str) { + var DNI = /^\d{9}$/; + var sanitized = str.trim(); + if (!DNI.test(sanitized)) { + return false; + } + var id = sanitized; + var sum = 0, incNum; + for (var i = 0; i < id.length; i++) { + incNum = Number(id[i]) * (i % 2 + 1); + sum += incNum > 9 ? incNum - 9 : incNum; + } + return sum % 10 === 0; + }, + "ar-LY": function arLY(str) { + var NIN = /^(1|2)\d{11}$/; + var sanitized = str.trim(); + return NIN.test(sanitized); + }, + "ar-TN": function arTN(str) { + var DNI = /^\d{8}$/; + var sanitized = str.trim(); + return DNI.test(sanitized); + }, + "zh-CN": function zhCN(str) { + var provincesAndCities = [ + "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" + // 国外 + ]; + var powers = ["7", "9", "10", "5", "8", "4", "2", "1", "6", "3", "7", "9", "10", "5", "8", "4", "2"]; + var parityBit = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"]; + var checkAddressCode = function checkAddressCode2(addressCode) { + return (0, _includesArray.default)(provincesAndCities, addressCode); + }; + var checkBirthDayCode = function checkBirthDayCode2(birDayCode) { + var yyyy = parseInt(birDayCode.substring(0, 4), 10); + var mm = parseInt(birDayCode.substring(4, 6), 10); + var dd = parseInt(birDayCode.substring(6), 10); + var xdata = new Date(yyyy, mm - 1, dd); + if (xdata > /* @__PURE__ */ new Date()) { + return false; + } else if (xdata.getFullYear() === yyyy && xdata.getMonth() === mm - 1 && xdata.getDate() === dd) { + return true; + } + return false; + }; + var getParityBit = function getParityBit2(idCardNo) { + var id17 = idCardNo.substring(0, 17); + var power = 0; + for (var i = 0; i < 17; i++) { + power += parseInt(id17.charAt(i), 10) * parseInt(powers[i], 10); + } + var mod = power % 11; + return parityBit[mod]; + }; + var checkParityBit = function checkParityBit2(idCardNo) { + return getParityBit(idCardNo) === idCardNo.charAt(17).toUpperCase(); + }; + var check15IdCardNo = function check15IdCardNo2(idCardNo) { + var check = /^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(idCardNo); + if (!check) return false; + var addressCode = idCardNo.substring(0, 2); + check = checkAddressCode(addressCode); + if (!check) return false; + var birDayCode = "19".concat(idCardNo.substring(6, 12)); + check = checkBirthDayCode(birDayCode); + if (!check) return false; + return true; + }; + var check18IdCardNo = function check18IdCardNo2(idCardNo) { + var check = /^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(idCardNo); + if (!check) return false; + var addressCode = idCardNo.substring(0, 2); + check = checkAddressCode(addressCode); + if (!check) return false; + var birDayCode = idCardNo.substring(6, 14); + check = checkBirthDayCode(birDayCode); + if (!check) return false; + return checkParityBit(idCardNo); + }; + var checkIdCardNo = function checkIdCardNo2(idCardNo) { + var check = /^\d{15}|(\d{17}(\d|x|X))$/.test(idCardNo); + if (!check) return false; + if (idCardNo.length === 15) { + return check15IdCardNo(idCardNo); + } + return check18IdCardNo(idCardNo); + }; + return checkIdCardNo(str); + }, + "zh-HK": function zhHK(str) { + str = str.trim(); + var regexHKID = /^[A-Z]{1,2}[0-9]{6}((\([0-9A]\))|(\[[0-9A]\])|([0-9A]))$/; + var regexIsDigit = /^[0-9]$/; + str = str.toUpperCase(); + if (!regexHKID.test(str)) return false; + str = str.replace(/\[|\]|\(|\)/g, ""); + if (str.length === 8) str = "3".concat(str); + var checkSumVal = 0; + for (var i = 0; i <= 7; i++) { + var convertedChar = void 0; + if (!regexIsDigit.test(str[i])) convertedChar = (str[i].charCodeAt(0) - 55) % 11; + else convertedChar = str[i]; + checkSumVal += convertedChar * (9 - i); + } + checkSumVal %= 11; + var checkSumConverted; + if (checkSumVal === 0) checkSumConverted = "0"; + else if (checkSumVal === 1) checkSumConverted = "A"; + else checkSumConverted = String(11 - checkSumVal); + if (checkSumConverted === str[str.length - 1]) return true; + return false; + }, + "zh-TW": function zhTW(str) { + var ALPHABET_CODES = { + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15, + G: 16, + H: 17, + I: 34, + J: 18, + K: 19, + L: 20, + M: 21, + N: 22, + O: 35, + P: 23, + Q: 24, + R: 25, + S: 26, + T: 27, + U: 28, + V: 29, + W: 32, + X: 30, + Y: 31, + Z: 33 + }; + var sanitized = str.trim().toUpperCase(); + if (!/^[A-Z][0-9]{9}$/.test(sanitized)) return false; + return Array.from(sanitized).reduce(function(sum, number, index) { + if (index === 0) { + var code = ALPHABET_CODES[number]; + return code % 10 * 9 + Math.floor(code / 10); + } + if (index === 9) { + return (10 - sum % 10 - Number(number)) % 10 === 0; + } + return sum + Number(number) * (9 - index); + }, 0); + }, + PK: function PK(str) { + var CNIC = /^[1-7][0-9]{4}-[0-9]{7}-[1-9]$/; + var sanitized = str.trim(); + return CNIC.test(sanitized); + } + }; + function isIdentityCard(str, locale) { + (0, _assertString.default)(str); + if (locale in validators) { + return validators[locale](str); + } else if (locale === "any") { + for (var key in validators) { + if (validators.hasOwnProperty(key)) { + var validator = validators[key]; + if (validator(str)) { + return true; + } + } + } + return false; + } + throw new Error("Invalid locale '".concat(locale, "'")); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsIdentityCard.js +var require_IsIdentityCard = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsIdentityCard.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsIdentityCard = exports2.isIdentityCard = exports2.IS_IDENTITY_CARD = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isIdentityCard_1 = __importDefault2(require_isIdentityCard()); + exports2.IS_IDENTITY_CARD = "isIdentityCard"; + function isIdentityCard(value, locale) { + return typeof value === "string" && (0, isIdentityCard_1.default)(value, locale); + } + exports2.isIdentityCard = isIdentityCard; + function IsIdentityCard(locale, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_IDENTITY_CARD, + constraints: [locale], + validator: { + validate: (value, args) => isIdentityCard(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a identity card number", validationOptions) + } + }, validationOptions); + } + exports2.IsIdentityCard = IsIdentityCard; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISRC.js +var require_isISRC = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISRC.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isISRC; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var isrc = /^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/; + function isISRC(str) { + (0, _assertString.default)(str); + return isrc.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsISRC.js +var require_IsISRC = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsISRC.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsISRC = exports2.isISRC = exports2.IS_ISRC = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isISRC_1 = __importDefault2(require_isISRC()); + exports2.IS_ISRC = "isISRC"; + function isISRC(value) { + return typeof value === "string" && (0, isISRC_1.default)(value); + } + exports2.isISRC = isISRC; + function IsISRC(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_ISRC, + validator: { + validate: (value, args) => isISRC(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be an ISRC", validationOptions) + } + }, validationOptions); + } + exports2.IsISRC = IsISRC; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isLocale.js +var require_isLocale = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isLocale.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isLocale; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var extlang = "([A-Za-z]{3}(-[A-Za-z]{3}){0,2})"; + var language = "(([a-zA-Z]{2,3}(-".concat(extlang, ")?)|([a-zA-Z]{5,8}))"); + var script = "([A-Za-z]{4})"; + var region = "([A-Za-z]{2}|\\d{3})"; + var variant = "([A-Za-z0-9]{5,8}|(\\d[A-Z-a-z0-9]{3}))"; + var singleton = "(\\d|[A-W]|[Y-Z]|[a-w]|[y-z])"; + var extension = "(".concat(singleton, "(-[A-Za-z0-9]{2,8})+)"); + var privateuse = "(x(-[A-Za-z0-9]{1,8})+)"; + var irregular = "((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))"; + var regular = "((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang))"; + var grandfathered = "(".concat(irregular, "|").concat(regular, ")"); + var delimiter = "(-|_)"; + var langtag = "".concat(language, "(").concat(delimiter).concat(script, ")?(").concat(delimiter).concat(region, ")?(").concat(delimiter).concat(variant, ")*(").concat(delimiter).concat(extension, ")*(").concat(delimiter).concat(privateuse, ")?"); + var languageTagRegex = new RegExp("(^".concat(privateuse, "$)|(^").concat(grandfathered, "$)|(^").concat(langtag, "$)")); + function isLocale(str) { + (0, _assertString.default)(str); + return languageTagRegex.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsLocale.js +var require_IsLocale = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsLocale.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsLocale = exports2.isLocale = exports2.IS_LOCALE = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isLocale_1 = __importDefault2(require_isLocale()); + exports2.IS_LOCALE = "isLocale"; + function isLocale(value) { + return typeof value === "string" && (0, isLocale_1.default)(value); + } + exports2.isLocale = isLocale; + function IsLocale(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_LOCALE, + validator: { + validate: (value, args) => isLocale(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be locale", validationOptions) + } + }, validationOptions); + } + exports2.IsLocale = IsLocale; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isMagnetURI.js +var require_isMagnetURI = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isMagnetURI.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isMagnetURI; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var magnetURIComponent = /(?:^magnet:\?|[^?&]&)xt(?:\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i; + function isMagnetURI(url) { + (0, _assertString.default)(url); + if (url.indexOf("magnet:?") !== 0) { + return false; + } + return magnetURIComponent.test(url); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsMagnetURI.js +var require_IsMagnetURI = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsMagnetURI.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsMagnetURI = exports2.isMagnetURI = exports2.IS_MAGNET_URI = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isMagnetURI_1 = __importDefault2(require_isMagnetURI()); + exports2.IS_MAGNET_URI = "isMagnetURI"; + function isMagnetURI(value) { + return typeof value === "string" && (0, isMagnetURI_1.default)(value); + } + exports2.isMagnetURI = isMagnetURI; + function IsMagnetURI(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_MAGNET_URI, + validator: { + validate: (value, args) => isMagnetURI(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be magnet uri format", validationOptions) + } + }, validationOptions); + } + exports2.IsMagnetURI = IsMagnetURI; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isMimeType.js +var require_isMimeType = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isMimeType.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isMimeType; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var mimeTypeSimple = /^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+_]{1,100}$/i; + var mimeTypeText = /^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i; + var mimeTypeMultipart = /^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i; + function isMimeType(str) { + (0, _assertString.default)(str); + return mimeTypeSimple.test(str) || mimeTypeText.test(str) || mimeTypeMultipart.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsMimeType.js +var require_IsMimeType = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsMimeType.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsMimeType = exports2.isMimeType = exports2.IS_MIME_TYPE = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isMimeType_1 = __importDefault2(require_isMimeType()); + exports2.IS_MIME_TYPE = "isMimeType"; + function isMimeType(value) { + return typeof value === "string" && (0, isMimeType_1.default)(value); + } + exports2.isMimeType = isMimeType; + function IsMimeType(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_MIME_TYPE, + validator: { + validate: (value, args) => isMimeType(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be MIME type format", validationOptions) + } + }, validationOptions); + } + exports2.IsMimeType = IsMimeType; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isOctal.js +var require_isOctal = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isOctal.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isOctal; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var octal = /^(0o)?[0-7]+$/i; + function isOctal(str) { + (0, _assertString.default)(str); + return octal.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsOctal.js +var require_IsOctal = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsOctal.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsOctal = exports2.isOctal = exports2.IS_OCTAL = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isOctal_1 = __importDefault2(require_isOctal()); + exports2.IS_OCTAL = "isOctal"; + function isOctal(value) { + return typeof value === "string" && (0, isOctal_1.default)(value); + } + exports2.isOctal = isOctal; + function IsOctal(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_OCTAL, + validator: { + validate: (value, args) => isOctal(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be valid octal number", validationOptions) + } + }, validationOptions); + } + exports2.IsOctal = IsOctal; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isPassportNumber.js +var require_isPassportNumber = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isPassportNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isPassportNumber; + exports2.locales = void 0; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var passportRegexByCountryCode = { + AM: /^[A-Z]{2}\d{7}$/, + // ARMENIA + AR: /^[A-Z]{3}\d{6}$/, + // ARGENTINA + AT: /^[A-Z]\d{7}$/, + // AUSTRIA + AU: /^[A-Z]\d{7}$/, + // AUSTRALIA + AZ: /^[A-Z]{1}\d{8}$/, + // AZERBAIJAN + BE: /^[A-Z]{2}\d{6}$/, + // BELGIUM + BG: /^\d{9}$/, + // BULGARIA + BR: /^[A-Z]{2}\d{6}$/, + // BRAZIL + BY: /^[A-Z]{2}\d{7}$/, + // BELARUS + CA: /^[A-Z]{2}\d{6}$|^[A-Z]\d{6}[A-Z]{2}$/, + // CANADA + CH: /^[A-Z]\d{7}$/, + // SWITZERLAND + CN: /^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/, + // CHINA [G=Ordinary, E=Electronic] followed by 8-digits, or E followed by any UPPERCASE letter (except I and O) followed by 7 digits + CY: /^[A-Z](\d{6}|\d{8})$/, + // CYPRUS + CZ: /^\d{8}$/, + // CZECH REPUBLIC + DE: /^[CFGHJKLMNPRTVWXYZ0-9]{9}$/, + // GERMANY + DK: /^\d{9}$/, + // DENMARK + DZ: /^\d{9}$/, + // ALGERIA + EE: /^([A-Z]\d{7}|[A-Z]{2}\d{7})$/, + // ESTONIA (K followed by 7-digits), e-passports have 2 UPPERCASE followed by 7 digits + ES: /^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/, + // SPAIN + FI: /^[A-Z]{2}\d{7}$/, + // FINLAND + FR: /^\d{2}[A-Z]{2}\d{5}$/, + // FRANCE + GB: /^\d{9}$/, + // UNITED KINGDOM + GR: /^[A-Z]{2}\d{7}$/, + // GREECE + HR: /^\d{9}$/, + // CROATIA + HU: /^[A-Z]{2}(\d{6}|\d{7})$/, + // HUNGARY + IE: /^[A-Z0-9]{2}\d{7}$/, + // IRELAND + IN: /^[A-Z]{1}-?\d{7}$/, + // INDIA + ID: /^[A-C]\d{7}$/, + // INDONESIA + IR: /^[A-Z]\d{8}$/, + // IRAN + IS: /^(A)\d{7}$/, + // ICELAND + IT: /^[A-Z0-9]{2}\d{7}$/, + // ITALY + JM: /^[Aa]\d{7}$/, + // JAMAICA + JP: /^[A-Z]{2}\d{7}$/, + // JAPAN + KR: /^[MS]\d{8}$/, + // SOUTH KOREA, REPUBLIC OF KOREA, [S=PS Passports, M=PM Passports] + KZ: /^[a-zA-Z]\d{7}$/, + // KAZAKHSTAN + LI: /^[a-zA-Z]\d{5}$/, + // LIECHTENSTEIN + LT: /^[A-Z0-9]{8}$/, + // LITHUANIA + LU: /^[A-Z0-9]{8}$/, + // LUXEMBURG + LV: /^[A-Z0-9]{2}\d{7}$/, + // LATVIA + LY: /^[A-Z0-9]{8}$/, + // LIBYA + MT: /^\d{7}$/, + // MALTA + MZ: /^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/, + // MOZAMBIQUE + MY: /^[AHK]\d{8}$/, + // MALAYSIA + MX: /^[A-Z]\d{8}$/, + // MEXICO + NL: /^[A-Z]{2}[A-Z0-9]{6}\d$/, + // NETHERLANDS + NZ: /^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/, + // NEW ZEALAND + PH: /^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/, + // PHILIPPINES + PK: /^[A-Z]{2}\d{7}$/, + // PAKISTAN + PL: /^[A-Z]{2}\d{7}$/, + // POLAND + PT: /^[A-Z]\d{6}$/, + // PORTUGAL + RO: /^\d{8,9}$/, + // ROMANIA + RU: /^\d{9}$/, + // RUSSIAN FEDERATION + SE: /^\d{8}$/, + // SWEDEN + SL: /^(P)[A-Z]\d{7}$/, + // SLOVENIA + SK: /^[0-9A-Z]\d{7}$/, + // SLOVAKIA + TH: /^[A-Z]{1,2}\d{6,7}$/, + // THAILAND + TR: /^[A-Z]\d{8}$/, + // TURKEY + UA: /^[A-Z]{2}\d{6}$/, + // UKRAINE + US: /^\d{9}$|^[A-Z]\d{8}$/, + // UNITED STATES + ZA: /^[TAMD]\d{8}$/ + // SOUTH AFRICA + }; + var locales = exports2.locales = Object.keys(passportRegexByCountryCode); + function isPassportNumber(str, countryCode) { + (0, _assertString.default)(str); + var normalizedStr = str.replace(/\s/g, "").toUpperCase(); + return countryCode.toUpperCase() in passportRegexByCountryCode && passportRegexByCountryCode[countryCode].test(normalizedStr); + } + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsPassportNumber.js +var require_IsPassportNumber = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsPassportNumber.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsPassportNumber = exports2.isPassportNumber = exports2.IS_PASSPORT_NUMBER = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isPassportNumber_1 = __importDefault2(require_isPassportNumber()); + exports2.IS_PASSPORT_NUMBER = "isPassportNumber"; + function isPassportNumber(value, countryCode) { + return typeof value === "string" && (0, isPassportNumber_1.default)(value, countryCode); + } + exports2.isPassportNumber = isPassportNumber; + function IsPassportNumber(countryCode, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_PASSPORT_NUMBER, + constraints: [countryCode], + validator: { + validate: (value, args) => isPassportNumber(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be valid passport number", validationOptions) + } + }, validationOptions); + } + exports2.IsPassportNumber = IsPassportNumber; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isPostalCode.js +var require_isPostalCode = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isPostalCode.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isPostalCode; + exports2.locales = void 0; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var threeDigit = /^\d{3}$/; + var fourDigit = /^\d{4}$/; + var fiveDigit = /^\d{5}$/; + var sixDigit = /^\d{6}$/; + var patterns = { + AD: /^AD\d{3}$/, + AT: fourDigit, + AU: fourDigit, + AZ: /^AZ\d{4}$/, + BA: /^([7-8]\d{4}$)/, + BD: /^([1-8][0-9]{3}|9[0-4][0-9]{2})$/, + BE: fourDigit, + BG: fourDigit, + BR: /^\d{5}-?\d{3}$/, + BY: /^2[1-4]\d{4}$/, + CA: /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i, + CH: fourDigit, + CN: /^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/, + CO: /^(05|08|11|13|15|17|18|19|20|23|25|27|41|44|47|50|52|54|63|66|68|70|73|76|81|85|86|88|91|94|95|97|99)(\d{4})$/, + CZ: /^\d{3}\s?\d{2}$/, + DE: fiveDigit, + DK: fourDigit, + DO: fiveDigit, + DZ: fiveDigit, + EE: fiveDigit, + ES: /^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/, + FI: fiveDigit, + FR: /^(?:(?:0[1-9]|[1-8]\d|9[0-5])\d{3}|97[1-46]\d{2})$/, + GB: /^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i, + GR: /^\d{3}\s?\d{2}$/, + HR: /^([1-5]\d{4}$)/, + HT: /^HT\d{4}$/, + HU: fourDigit, + ID: fiveDigit, + IE: /^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i, + IL: /^(\d{5}|\d{7})$/, + IN: /^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/, + IR: /^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/, + IS: threeDigit, + IT: fiveDigit, + JP: /^\d{3}\-\d{4}$/, + KE: fiveDigit, + KR: /^(\d{5}|\d{6})$/, + LI: /^(948[5-9]|949[0-7])$/, + LT: /^LT\-\d{5}$/, + LU: fourDigit, + LV: /^LV\-\d{4}$/, + LK: fiveDigit, + MC: /^980\d{2}$/, + MG: threeDigit, + MX: fiveDigit, + MT: /^[A-Za-z]{3}\s{0,1}\d{4}$/, + MY: fiveDigit, + NL: /^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i, + NO: fourDigit, + NP: /^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i, + NZ: fourDigit, + // https://www.pakpost.gov.pk/postcodes.php + PK: fiveDigit, + PL: /^\d{2}\-\d{3}$/, + PR: /^00[679]\d{2}([ -]\d{4})?$/, + PT: /^\d{4}\-\d{3}?$/, + RO: sixDigit, + RU: sixDigit, + SA: fiveDigit, + SE: /^[1-9]\d{2}\s?\d{2}$/, + SG: sixDigit, + SI: fourDigit, + SK: /^\d{3}\s?\d{2}$/, + TH: fiveDigit, + TN: fourDigit, + TW: /^\d{3}(\d{2,3})?$/, + UA: fiveDigit, + US: /^\d{5}(-\d{4})?$/, + ZA: fourDigit, + ZM: fiveDigit + }; + var locales = exports2.locales = Object.keys(patterns); + function isPostalCode(str, locale) { + (0, _assertString.default)(str); + if (locale in patterns) { + return patterns[locale].test(str); + } else if (locale === "any") { + for (var key in patterns) { + if (patterns.hasOwnProperty(key)) { + var pattern = patterns[key]; + if (pattern.test(str)) { + return true; + } + } + } + return false; + } + throw new Error("Invalid locale '".concat(locale, "'")); + } + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsPostalCode.js +var require_IsPostalCode = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsPostalCode.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsPostalCode = exports2.isPostalCode = exports2.IS_POSTAL_CODE = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isPostalCode_1 = __importDefault2(require_isPostalCode()); + exports2.IS_POSTAL_CODE = "isPostalCode"; + function isPostalCode(value, locale) { + return typeof value === "string" && (0, isPostalCode_1.default)(value, locale); + } + exports2.isPostalCode = isPostalCode; + function IsPostalCode(locale, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_POSTAL_CODE, + constraints: [locale], + validator: { + validate: (value, args) => isPostalCode(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a postal code", validationOptions) + } + }, validationOptions); + } + exports2.IsPostalCode = IsPostalCode; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isRFC3339.js +var require_isRFC3339 = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isRFC3339.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isRFC3339; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var dateFullYear = /[0-9]{4}/; + var dateMonth = /(0[1-9]|1[0-2])/; + var dateMDay = /([12]\d|0[1-9]|3[01])/; + var timeHour = /([01][0-9]|2[0-3])/; + var timeMinute = /[0-5][0-9]/; + var timeSecond = /([0-5][0-9]|60)/; + var timeSecFrac = /(\.[0-9]+)?/; + var timeNumOffset = new RegExp("[-+]".concat(timeHour.source, ":").concat(timeMinute.source)); + var timeOffset = new RegExp("([zZ]|".concat(timeNumOffset.source, ")")); + var partialTime = new RegExp("".concat(timeHour.source, ":").concat(timeMinute.source, ":").concat(timeSecond.source).concat(timeSecFrac.source)); + var fullDate = new RegExp("".concat(dateFullYear.source, "-").concat(dateMonth.source, "-").concat(dateMDay.source)); + var fullTime = new RegExp("".concat(partialTime.source).concat(timeOffset.source)); + var rfc3339 = new RegExp("^".concat(fullDate.source, "[ tT]").concat(fullTime.source, "$")); + function isRFC3339(str) { + (0, _assertString.default)(str); + return rfc3339.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsRFC3339.js +var require_IsRFC3339 = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsRFC3339.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsRFC3339 = exports2.isRFC3339 = exports2.IS_RFC_3339 = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isRFC3339_1 = __importDefault2(require_isRFC3339()); + exports2.IS_RFC_3339 = "isRFC3339"; + function isRFC3339(value) { + return typeof value === "string" && (0, isRFC3339_1.default)(value); + } + exports2.isRFC3339 = isRFC3339; + function IsRFC3339(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_RFC_3339, + validator: { + validate: (value, args) => isRFC3339(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be RFC 3339 date", validationOptions) + } + }, validationOptions); + } + exports2.IsRFC3339 = IsRFC3339; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isRgbColor.js +var require_isRgbColor = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isRgbColor.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isRgbColor; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + var rgbColor = /^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/; + var rgbaColor = /^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/; + var rgbColorPercent = /^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)$/; + var rgbaColorPercent = /^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/; + var startsWithRgb = /^rgba?/; + function isRgbColor(str, options) { + (0, _assertString.default)(str); + var allowSpaces = false; + var includePercentValues = true; + if (_typeof(options) !== "object") { + if (arguments.length >= 2) { + includePercentValues = arguments[1]; + } + } else { + allowSpaces = options.allowSpaces !== void 0 ? options.allowSpaces : allowSpaces; + includePercentValues = options.includePercentValues !== void 0 ? options.includePercentValues : includePercentValues; + } + if (allowSpaces) { + if (!startsWithRgb.test(str)) { + return false; + } + str = str.replace(/\s/g, ""); + } + if (!includePercentValues) { + return rgbColor.test(str) || rgbaColor.test(str); + } + return rgbColor.test(str) || rgbaColor.test(str) || rgbColorPercent.test(str) || rgbaColorPercent.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsRgbColor.js +var require_IsRgbColor = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsRgbColor.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsRgbColor = exports2.isRgbColor = exports2.IS_RGB_COLOR = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isRgbColor_1 = __importDefault2(require_isRgbColor()); + exports2.IS_RGB_COLOR = "isRgbColor"; + function isRgbColor(value, includePercentValues) { + return typeof value === "string" && (0, isRgbColor_1.default)(value, { + includePercentValues + }); + } + exports2.isRgbColor = isRgbColor; + function IsRgbColor(includePercentValues, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_RGB_COLOR, + constraints: [includePercentValues], + validator: { + validate: (value, args) => isRgbColor(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be RGB color", validationOptions) + } + }, validationOptions); + } + exports2.IsRgbColor = IsRgbColor; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/multilineRegex.js +var require_multilineRegex = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/multilineRegex.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = multilineRegexp; + function multilineRegexp(parts, flags) { + var regexpAsStringLiteral = parts.join(""); + return new RegExp(regexpAsStringLiteral, flags); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isSemVer.js +var require_isSemVer = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isSemVer.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isSemVer; + var _assertString = _interopRequireDefault(require_assertString()); + var _multilineRegex = _interopRequireDefault(require_multilineRegex()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var semanticVersioningRegex = (0, _multilineRegex.default)(["^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)", "(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))", "?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$"], "i"); + function isSemVer(str) { + (0, _assertString.default)(str); + return semanticVersioningRegex.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsSemVer.js +var require_IsSemVer = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsSemVer.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsSemVer = exports2.isSemVer = exports2.IS_SEM_VER = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isSemVer_1 = __importDefault2(require_isSemVer()); + exports2.IS_SEM_VER = "isSemVer"; + function isSemVer(value) { + return typeof value === "string" && (0, isSemVer_1.default)(value); + } + exports2.isSemVer = isSemVer; + function IsSemVer(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_SEM_VER, + validator: { + validate: (value, args) => isSemVer(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a Semantic Versioning Specification", validationOptions) + } + }, validationOptions); + } + exports2.IsSemVer = IsSemVer; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/toDate.js +var require_toDate = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/toDate.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = toDate; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function toDate(date) { + (0, _assertString.default)(date); + date = Date.parse(date); + return !isNaN(date) ? new Date(date) : null; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/toInt.js +var require_toInt = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/toInt.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = toInt; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function toInt(str, radix) { + (0, _assertString.default)(str); + return parseInt(str, radix || 10); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/toBoolean.js +var require_toBoolean = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/toBoolean.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = toBoolean; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function toBoolean(str, strict) { + (0, _assertString.default)(str); + if (strict) { + return str === "1" || /^true$/i.test(str); + } + return str !== "0" && !/^false$/i.test(str) && str !== ""; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/equals.js +var require_equals = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/equals.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = equals; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function equals(str, comparison) { + (0, _assertString.default)(str); + return str === comparison; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isIPRange.js +var require_isIPRange = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isIPRange.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isIPRange; + var _assertString = _interopRequireDefault(require_assertString()); + var _isIP = _interopRequireDefault(require_isIP()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var subnetMaybe = /^\d{1,3}$/; + var v4Subnet = 32; + var v6Subnet = 128; + function isIPRange(str) { + var version2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""; + (0, _assertString.default)(str); + var parts = str.split("/"); + if (parts.length !== 2) { + return false; + } + if (!subnetMaybe.test(parts[1])) { + return false; + } + if (parts[1].length > 1 && parts[1].startsWith("0")) { + return false; + } + var isValidIP = (0, _isIP.default)(parts[0], version2); + if (!isValidIP) { + return false; + } + var expectedSubnet = null; + switch (String(version2)) { + case "4": + expectedSubnet = v4Subnet; + break; + case "6": + expectedSubnet = v6Subnet; + break; + default: + expectedSubnet = (0, _isIP.default)(parts[0], "6") ? v6Subnet : v4Subnet; + } + return parts[1] <= expectedSubnet && parts[1] >= 0; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isDate.js +var require_isDate = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isDate.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isDate; + var _merge = _interopRequireDefault(require_merge()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); + } + function _nonIterableRest() { + 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 _iterableToArrayLimit(r, l2) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, n, i, u, a = [], f = true, o = false; + try { + if (i = (t = t.call(r)).next, 0 === l2) { + if (Object(t) !== t) return; + f = false; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l2); f = true) ; + } catch (r2) { + o = true, n = r2; + } finally { + try { + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } + } + function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; + } + function _createForOfIteratorHelper(r, e) { + var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (!t) { + if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { + t && (r = t); + var _n = 0, F = function F2() { + }; + return { s: F, n: function n() { + return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; + }, e: function e2(r2) { + throw r2; + }, f: F }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + var o, a = true, u = false; + return { s: function s() { + t = t.call(r); + }, n: function n() { + var r2 = t.next(); + return a = r2.done, r2; + }, e: function e2(r2) { + u = true, o = r2; + }, f: function f() { + try { + a || null == t.return || t.return(); + } finally { + if (u) throw o; + } + } }; + } + function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + var default_date_options = { + format: "YYYY/MM/DD", + delimiters: ["/", "-"], + strictMode: false + }; + function isValidFormat(format) { + return /(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(format); + } + function zip(date, format) { + var zippedArr = [], len = Math.max(date.length, format.length); + for (var i = 0; i < len; i++) { + zippedArr.push([date[i], format[i]]); + } + return zippedArr; + } + function isDate(input, options) { + if (typeof options === "string") { + options = (0, _merge.default)({ + format: options + }, default_date_options); + } else { + options = (0, _merge.default)(options, default_date_options); + } + if (typeof input === "string" && isValidFormat(options.format)) { + if (options.strictMode && input.length !== options.format.length) return false; + var formatDelimiter = options.delimiters.find(function(delimiter) { + return options.format.indexOf(delimiter) !== -1; + }); + var dateDelimiter = options.strictMode ? formatDelimiter : options.delimiters.find(function(delimiter) { + return input.indexOf(delimiter) !== -1; + }); + var dateAndFormat = zip(input.split(dateDelimiter), options.format.toLowerCase().split(formatDelimiter)); + var dateObj = {}; + var _iterator = _createForOfIteratorHelper(dateAndFormat), _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done; ) { + var _step$value = _slicedToArray(_step.value, 2), dateWord = _step$value[0], formatWord = _step$value[1]; + if (!dateWord || !formatWord || dateWord.length !== formatWord.length) { + return false; + } + dateObj[formatWord.charAt(0)] = dateWord; + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + var fullYear = dateObj.y; + if (fullYear.startsWith("-")) { + return false; + } + if (dateObj.y.length === 2) { + var parsedYear = parseInt(dateObj.y, 10); + if (isNaN(parsedYear)) { + return false; + } + var currentYearLastTwoDigits = (/* @__PURE__ */ new Date()).getFullYear() % 100; + if (parsedYear < currentYearLastTwoDigits) { + fullYear = "20".concat(dateObj.y); + } else { + fullYear = "19".concat(dateObj.y); + } + } + var month = dateObj.m; + if (dateObj.m.length === 1) { + month = "0".concat(dateObj.m); + } + var day = dateObj.d; + if (dateObj.d.length === 1) { + day = "0".concat(dateObj.d); + } + return new Date("".concat(fullYear, "-").concat(month, "-").concat(day, "T00:00:00.000Z")).getUTCDate() === +dateObj.d; + } + if (!options.strictMode) { + return Object.prototype.toString.call(input) === "[object Date]" && isFinite(input); + } + return false; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isTime.js +var require_isTime = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isTime.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isTime; + var _merge = _interopRequireDefault(require_merge()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var default_time_options = { + hourFormat: "hour24", + mode: "default" + }; + var formats = { + hour24: { + default: /^([01]?[0-9]|2[0-3]):([0-5][0-9])$/, + withSeconds: /^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/, + withOptionalSeconds: /^([01]?[0-9]|2[0-3]):([0-5][0-9])(?::([0-5][0-9]))?$/ + }, + hour12: { + default: /^(0?[1-9]|1[0-2]):([0-5][0-9]) (A|P)M$/, + withSeconds: /^(0?[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9]) (A|P)M$/, + withOptionalSeconds: /^(0?[1-9]|1[0-2]):([0-5][0-9])(?::([0-5][0-9]))? (A|P)M$/ + } + }; + function isTime(input, options) { + options = (0, _merge.default)(options, default_time_options); + if (typeof input !== "string") return false; + return formats[options.hourFormat][options.mode].test(input); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isAbaRouting.js +var require_isAbaRouting = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isAbaRouting.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isAbaRouting; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var isRoutingReg = /^(?!(1[3-9])|(20)|(3[3-9])|(4[0-9])|(5[0-9])|(60)|(7[3-9])|(8[1-9])|(9[0-2])|(9[3-9]))[0-9]{9}$/; + function isAbaRouting(str) { + (0, _assertString.default)(str); + if (!isRoutingReg.test(str)) return false; + var checkSumVal = 0; + for (var i = 0; i < str.length; i++) { + if (i % 3 === 0) checkSumVal += str[i] * 3; + else if (i % 3 === 1) checkSumVal += str[i] * 7; + else checkSumVal += str[i] * 1; + } + return checkSumVal % 10 === 0; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isIMEI.js +var require_isIMEI = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isIMEI.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isIMEI; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var imeiRegexWithoutHyphens = /^[0-9]{15}$/; + var imeiRegexWithHyphens = /^\d{2}-\d{6}-\d{6}-\d{1}$/; + function isIMEI(str, options) { + (0, _assertString.default)(str); + options = options || {}; + var imeiRegex = imeiRegexWithoutHyphens; + if (options.allow_hyphens) { + imeiRegex = imeiRegexWithHyphens; + } + if (!imeiRegex.test(str)) { + return false; + } + str = str.replace(/-/g, ""); + var sum = 0, mul = 2, l2 = 14; + for (var i = 0; i < l2; i++) { + var digit = str.substring(l2 - i - 1, l2 - i); + var tp = parseInt(digit, 10) * mul; + if (tp >= 10) { + sum += tp % 10 + 1; + } else { + sum += tp; + } + if (mul === 1) { + mul += 1; + } else { + mul -= 1; + } + } + var chk = (10 - sum % 10) % 10; + if (chk !== parseInt(str.substring(14, 15), 10)) { + return false; + } + return true; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isMD5.js +var require_isMD5 = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isMD5.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isMD5; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var md52 = /^[a-f0-9]{32}$/; + function isMD5(str) { + (0, _assertString.default)(str); + return md52.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isEmpty.js +var require_isEmpty = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isEmpty.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isEmpty; + var _assertString = _interopRequireDefault(require_assertString()); + var _merge = _interopRequireDefault(require_merge()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var default_is_empty_options = { + ignore_whitespace: false + }; + function isEmpty(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, default_is_empty_options); + return (options.ignore_whitespace ? str.trim().length : str.length) === 0; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isULID.js +var require_isULID = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isULID.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isULID; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function isULID(str) { + (0, _assertString.default)(str); + return /^[0-7][0-9A-HJKMNP-TV-Z]{25}$/i.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isAfter.js +var require_isAfter = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isAfter.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isAfter; + var _toDate = _interopRequireDefault(require_toDate()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function isAfter(date, options) { + var comparisonDate = (_typeof(options) === "object" ? options.comparisonDate : options) || Date().toString(); + var comparison = (0, _toDate.default)(comparisonDate); + var original = (0, _toDate.default)(date); + return !!(original && comparison && original > comparison); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isBefore.js +var require_isBefore = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isBefore.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isBefore; + var _toDate = _interopRequireDefault(require_toDate()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function isBefore(date, options) { + var comparisonDate = (_typeof(options) === "object" ? options.comparisonDate : options) || Date().toString(); + var comparison = (0, _toDate.default)(comparisonDate); + var original = (0, _toDate.default)(date); + return !!(original && comparison && original < comparison); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isIn.js +var require_isIn = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isIn.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isIn; + var _assertString = _interopRequireDefault(require_assertString()); + var _toString = _interopRequireDefault(require_toString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + function isIn(str, options) { + (0, _assertString.default)(str); + var i; + if (Object.prototype.toString.call(options) === "[object Array]") { + var array = []; + for (i in options) { + if ({}.hasOwnProperty.call(options, i)) { + array[i] = (0, _toString.default)(options[i]); + } + } + return array.indexOf(str) >= 0; + } else if (_typeof(options) === "object") { + return options.hasOwnProperty(str); + } else if (options && typeof options.indexOf === "function") { + return options.indexOf(str) >= 0; + } + return false; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/algorithms.js +var require_algorithms = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/util/algorithms.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.iso7064Check = iso7064Check; + exports2.luhnCheck = luhnCheck; + exports2.reverseMultiplyAndSum = reverseMultiplyAndSum; + exports2.verhoeffCheck = verhoeffCheck; + function iso7064Check(str) { + var checkvalue = 10; + for (var i = 0; i < str.length - 1; i++) { + checkvalue = (parseInt(str[i], 10) + checkvalue) % 10 === 0 ? 10 * 2 % 11 : (parseInt(str[i], 10) + checkvalue) % 10 * 2 % 11; + } + checkvalue = checkvalue === 1 ? 0 : 11 - checkvalue; + return checkvalue === parseInt(str[10], 10); + } + function luhnCheck(str) { + var checksum = 0; + var second = false; + for (var i = str.length - 1; i >= 0; i--) { + if (second) { + var product = parseInt(str[i], 10) * 2; + if (product > 9) { + checksum += product.toString().split("").map(function(a) { + return parseInt(a, 10); + }).reduce(function(a, b) { + return a + b; + }, 0); + } else { + checksum += product; + } + } else { + checksum += parseInt(str[i], 10); + } + second = !second; + } + return checksum % 10 === 0; + } + function reverseMultiplyAndSum(digits, base) { + var total = 0; + for (var i = 0; i < digits.length; i++) { + total += digits[i] * (base - i); + } + return total; + } + function verhoeffCheck(str) { + var d_table = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 0, 6, 7, 8, 9, 5], [2, 3, 4, 0, 1, 7, 8, 9, 5, 6], [3, 4, 0, 1, 2, 8, 9, 5, 6, 7], [4, 0, 1, 2, 3, 9, 5, 6, 7, 8], [5, 9, 8, 7, 6, 0, 4, 3, 2, 1], [6, 5, 9, 8, 7, 1, 0, 4, 3, 2], [7, 6, 5, 9, 8, 2, 1, 0, 4, 3], [8, 7, 6, 5, 9, 3, 2, 1, 0, 4], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]]; + var p_table = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 5, 7, 6, 2, 8, 3, 0, 9, 4], [5, 8, 0, 3, 7, 9, 6, 1, 4, 2], [8, 9, 1, 6, 0, 4, 3, 5, 2, 7], [9, 4, 5, 3, 1, 2, 6, 8, 7, 0], [4, 2, 8, 6, 5, 7, 3, 9, 0, 1], [2, 7, 9, 3, 8, 0, 6, 4, 1, 5], [7, 0, 4, 6, 9, 1, 3, 2, 5, 8]]; + var str_copy = str.split("").reverse().join(""); + var checksum = 0; + for (var i = 0; i < str_copy.length; i++) { + checksum = d_table[checksum][p_table[i % 8][parseInt(str_copy[i], 10)]]; + } + return checksum === 0; + } + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isTaxID.js +var require_isTaxID = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isTaxID.js"(exports2, module2) { + "use strict"; + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isTaxID; + var _assertString = _interopRequireDefault(require_assertString()); + var algorithms = _interopRequireWildcard(require_algorithms()); + var _isDate = _interopRequireDefault(require_isDate()); + function _interopRequireWildcard(e, t) { + if ("function" == typeof WeakMap) var r = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(); + return (_interopRequireWildcard = function _interopRequireWildcard2(e2, t2) { + if (!t2 && e2 && e2.__esModule) return e2; + var o, i, f = { __proto__: null, default: e2 }; + if (null === e2 || "object" != _typeof(e2) && "function" != typeof e2) return f; + if (o = t2 ? n : r) { + if (o.has(e2)) return o.get(e2); + o.set(e2, f); + } + for (var _t in e2) "default" !== _t && {}.hasOwnProperty.call(e2, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e2, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e2[_t]); + return f; + })(e, t); + } + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); + } + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _iterableToArray(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); + } + function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + function bgBgCheck(tin) { + var century_year = tin.slice(0, 2); + var month = parseInt(tin.slice(2, 4), 10); + if (month > 40) { + month -= 40; + century_year = "20".concat(century_year); + } else if (month > 20) { + month -= 20; + century_year = "18".concat(century_year); + } else { + century_year = "19".concat(century_year); + } + if (month < 10) { + month = "0".concat(month); + } + var date = "".concat(century_year, "/").concat(month, "/").concat(tin.slice(4, 6)); + if (!(0, _isDate.default)(date, "YYYY/MM/DD")) { + return false; + } + var digits = tin.split("").map(function(a) { + return parseInt(a, 10); + }); + var multip_lookup = [2, 4, 8, 5, 10, 9, 7, 3, 6]; + var checksum = 0; + for (var i = 0; i < multip_lookup.length; i++) { + checksum += digits[i] * multip_lookup[i]; + } + checksum = checksum % 11 === 10 ? 0 : checksum % 11; + return checksum === digits[9]; + } + function isCanadianSIN(input) { + var digitsArray = input.split(""); + var even = digitsArray.filter(function(_2, idx) { + return idx % 2; + }).map(function(i) { + return Number(i) * 2; + }).join("").split(""); + var total = digitsArray.filter(function(_2, idx) { + return !(idx % 2); + }).concat(even).map(function(i) { + return Number(i); + }).reduce(function(acc, cur) { + return acc + cur; + }); + return total % 10 === 0; + } + function csCzCheck(tin) { + tin = tin.replace(/\W/, ""); + var full_year = parseInt(tin.slice(0, 2), 10); + if (tin.length === 10) { + if (full_year < 54) { + full_year = "20".concat(full_year); + } else { + full_year = "19".concat(full_year); + } + } else { + if (tin.slice(6) === "000") { + return false; + } + if (full_year < 54) { + full_year = "19".concat(full_year); + } else { + return false; + } + } + if (full_year.length === 3) { + full_year = [full_year.slice(0, 2), "0", full_year.slice(2)].join(""); + } + var month = parseInt(tin.slice(2, 4), 10); + if (month > 50) { + month -= 50; + } + if (month > 20) { + if (parseInt(full_year, 10) < 2004) { + return false; + } + month -= 20; + } + if (month < 10) { + month = "0".concat(month); + } + var date = "".concat(full_year, "/").concat(month, "/").concat(tin.slice(4, 6)); + if (!(0, _isDate.default)(date, "YYYY/MM/DD")) { + return false; + } + if (tin.length === 10) { + if (parseInt(tin, 10) % 11 !== 0) { + var checkdigit = parseInt(tin.slice(0, 9), 10) % 11; + if (parseInt(full_year, 10) < 1986 && checkdigit === 10) { + if (parseInt(tin.slice(9), 10) !== 0) { + return false; + } + } else { + return false; + } + } + } + return true; + } + function deAtCheck(tin) { + return algorithms.luhnCheck(tin); + } + function deDeCheck(tin) { + var digits = tin.split("").map(function(a) { + return parseInt(a, 10); + }); + var occurrences = []; + for (var i = 0; i < digits.length - 1; i++) { + occurrences.push(""); + for (var j = 0; j < digits.length - 1; j++) { + if (digits[i] === digits[j]) { + occurrences[i] += j; + } + } + } + occurrences = occurrences.filter(function(a) { + return a.length > 1; + }); + if (occurrences.length !== 2 && occurrences.length !== 3) { + return false; + } + if (occurrences[0].length === 3) { + var trip_locations = occurrences[0].split("").map(function(a) { + return parseInt(a, 10); + }); + var recurrent = 0; + for (var _i = 0; _i < trip_locations.length - 1; _i++) { + if (trip_locations[_i] + 1 === trip_locations[_i + 1]) { + recurrent += 1; + } + } + if (recurrent === 2) { + return false; + } + } + return algorithms.iso7064Check(tin); + } + function dkDkCheck(tin) { + tin = tin.replace(/\W/, ""); + var year = parseInt(tin.slice(4, 6), 10); + var century_digit = tin.slice(6, 7); + switch (century_digit) { + case "0": + case "1": + case "2": + case "3": + year = "19".concat(year); + break; + case "4": + case "9": + if (year < 37) { + year = "20".concat(year); + } else { + year = "19".concat(year); + } + break; + default: + if (year < 37) { + year = "20".concat(year); + } else if (year > 58) { + year = "18".concat(year); + } else { + return false; + } + break; + } + if (year.length === 3) { + year = [year.slice(0, 2), "0", year.slice(2)].join(""); + } + var date = "".concat(year, "/").concat(tin.slice(2, 4), "/").concat(tin.slice(0, 2)); + if (!(0, _isDate.default)(date, "YYYY/MM/DD")) { + return false; + } + var digits = tin.split("").map(function(a) { + return parseInt(a, 10); + }); + var checksum = 0; + var weight = 4; + for (var i = 0; i < 9; i++) { + checksum += digits[i] * weight; + weight -= 1; + if (weight === 1) { + weight = 7; + } + } + checksum %= 11; + if (checksum === 1) { + return false; + } + return checksum === 0 ? digits[9] === 0 : digits[9] === 11 - checksum; + } + function elCyCheck(tin) { + var digits = tin.slice(0, 8).split("").map(function(a) { + return parseInt(a, 10); + }); + var checksum = 0; + for (var i = 1; i < digits.length; i += 2) { + checksum += digits[i]; + } + for (var _i2 = 0; _i2 < digits.length; _i2 += 2) { + if (digits[_i2] < 2) { + checksum += 1 - digits[_i2]; + } else { + checksum += 2 * (digits[_i2] - 2) + 5; + if (digits[_i2] > 4) { + checksum += 2; + } + } + } + return String.fromCharCode(checksum % 26 + 65) === tin.charAt(8); + } + function elGrCheck(tin) { + var digits = tin.split("").map(function(a) { + return parseInt(a, 10); + }); + var checksum = 0; + for (var i = 0; i < 8; i++) { + checksum += digits[i] * Math.pow(2, 8 - i); + } + return checksum % 11 % 10 === digits[8]; + } + function enIeCheck(tin) { + var checksum = algorithms.reverseMultiplyAndSum(tin.split("").slice(0, 7).map(function(a) { + return parseInt(a, 10); + }), 8); + if (tin.length === 9 && tin[8] !== "W") { + checksum += (tin[8].charCodeAt(0) - 64) * 9; + } + checksum %= 23; + if (checksum === 0) { + return tin[7].toUpperCase() === "W"; + } + return tin[7].toUpperCase() === String.fromCharCode(64 + checksum); + } + var enUsCampusPrefix = { + andover: ["10", "12"], + atlanta: ["60", "67"], + austin: ["50", "53"], + brookhaven: ["01", "02", "03", "04", "05", "06", "11", "13", "14", "16", "21", "22", "23", "25", "34", "51", "52", "54", "55", "56", "57", "58", "59", "65"], + cincinnati: ["30", "32", "35", "36", "37", "38", "61"], + fresno: ["15", "24"], + internet: ["20", "26", "27", "45", "46", "47"], + kansas: ["40", "44"], + memphis: ["94", "95"], + ogden: ["80", "90"], + philadelphia: ["33", "39", "41", "42", "43", "46", "48", "62", "63", "64", "66", "68", "71", "72", "73", "74", "75", "76", "77", "81", "82", "83", "84", "85", "86", "87", "88", "91", "92", "93", "98", "99"], + sba: ["31"] + }; + function enUsGetPrefixes() { + var prefixes = []; + for (var location in enUsCampusPrefix) { + if (enUsCampusPrefix.hasOwnProperty(location)) { + prefixes.push.apply(prefixes, _toConsumableArray(enUsCampusPrefix[location])); + } + } + return prefixes; + } + function enUsCheck(tin) { + return enUsGetPrefixes().indexOf(tin.slice(0, 2)) !== -1; + } + function esArCheck(tin) { + var accum = 0; + var digits = tin.split(""); + var digit = parseInt(digits.pop(), 10); + for (var i = 0; i < digits.length; i++) { + accum += digits[9 - i] * (2 + i % 6); + } + var verif = 11 - accum % 11; + if (verif === 11) { + verif = 0; + } else if (verif === 10) { + verif = 9; + } + return digit === verif; + } + function esEsCheck(tin) { + var chars = tin.toUpperCase().split(""); + if (isNaN(parseInt(chars[0], 10)) && chars.length > 1) { + var lead_replace = 0; + switch (chars[0]) { + case "Y": + lead_replace = 1; + break; + case "Z": + lead_replace = 2; + break; + default: + } + chars.splice(0, 1, lead_replace); + } else { + while (chars.length < 9) { + chars.unshift(0); + } + } + var lookup = ["T", "R", "W", "A", "G", "M", "Y", "F", "P", "D", "X", "B", "N", "J", "Z", "S", "Q", "V", "H", "L", "C", "K", "E"]; + chars = chars.join(""); + var checksum = parseInt(chars.slice(0, 8), 10) % 23; + return chars[8] === lookup[checksum]; + } + function etEeCheck(tin) { + var full_year = tin.slice(1, 3); + var century_digit = tin.slice(0, 1); + switch (century_digit) { + case "1": + case "2": + full_year = "18".concat(full_year); + break; + case "3": + case "4": + full_year = "19".concat(full_year); + break; + default: + full_year = "20".concat(full_year); + break; + } + var date = "".concat(full_year, "/").concat(tin.slice(3, 5), "/").concat(tin.slice(5, 7)); + if (!(0, _isDate.default)(date, "YYYY/MM/DD")) { + return false; + } + var digits = tin.split("").map(function(a) { + return parseInt(a, 10); + }); + var checksum = 0; + var weight = 1; + for (var i = 0; i < 10; i++) { + checksum += digits[i] * weight; + weight += 1; + if (weight === 10) { + weight = 1; + } + } + if (checksum % 11 === 10) { + checksum = 0; + weight = 3; + for (var _i3 = 0; _i3 < 10; _i3++) { + checksum += digits[_i3] * weight; + weight += 1; + if (weight === 10) { + weight = 1; + } + } + if (checksum % 11 === 10) { + return digits[10] === 0; + } + } + return checksum % 11 === digits[10]; + } + function fiFiCheck(tin) { + var full_year = tin.slice(4, 6); + var century_symbol = tin.slice(6, 7); + switch (century_symbol) { + case "+": + full_year = "18".concat(full_year); + break; + case "-": + full_year = "19".concat(full_year); + break; + default: + full_year = "20".concat(full_year); + break; + } + var date = "".concat(full_year, "/").concat(tin.slice(2, 4), "/").concat(tin.slice(0, 2)); + if (!(0, _isDate.default)(date, "YYYY/MM/DD")) { + return false; + } + var checksum = parseInt(tin.slice(0, 6) + tin.slice(7, 10), 10) % 31; + if (checksum < 10) { + return checksum === parseInt(tin.slice(10), 10); + } + checksum -= 10; + var letters_lookup = ["A", "B", "C", "D", "E", "F", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y"]; + return letters_lookup[checksum] === tin.slice(10); + } + function frBeCheck(tin) { + if (tin.slice(2, 4) !== "00" || tin.slice(4, 6) !== "00") { + var date = "".concat(tin.slice(0, 2), "/").concat(tin.slice(2, 4), "/").concat(tin.slice(4, 6)); + if (!(0, _isDate.default)(date, "YY/MM/DD")) { + return false; + } + } + var checksum = 97 - parseInt(tin.slice(0, 9), 10) % 97; + var checkdigits = parseInt(tin.slice(9, 11), 10); + if (checksum !== checkdigits) { + checksum = 97 - parseInt("2".concat(tin.slice(0, 9)), 10) % 97; + if (checksum !== checkdigits) { + return false; + } + } + return true; + } + function frFrCheck(tin) { + tin = tin.replace(/\s/g, ""); + var checksum = parseInt(tin.slice(0, 10), 10) % 511; + var checkdigits = parseInt(tin.slice(10, 13), 10); + return checksum === checkdigits; + } + function frLuCheck(tin) { + var date = "".concat(tin.slice(0, 4), "/").concat(tin.slice(4, 6), "/").concat(tin.slice(6, 8)); + if (!(0, _isDate.default)(date, "YYYY/MM/DD")) { + return false; + } + if (!algorithms.luhnCheck(tin.slice(0, 12))) { + return false; + } + return algorithms.verhoeffCheck("".concat(tin.slice(0, 11)).concat(tin[12])); + } + function hrHrCheck(tin) { + return algorithms.iso7064Check(tin); + } + function huHuCheck(tin) { + var digits = tin.split("").map(function(a) { + return parseInt(a, 10); + }); + var checksum = 8; + for (var i = 1; i < 9; i++) { + checksum += digits[i] * (i + 1); + } + return checksum % 11 === digits[9]; + } + function itItNameCheck(name) { + var vowelflag = false; + var xflag = false; + for (var i = 0; i < 3; i++) { + if (!vowelflag && /[AEIOU]/.test(name[i])) { + vowelflag = true; + } else if (!xflag && vowelflag && name[i] === "X") { + xflag = true; + } else if (i > 0) { + if (vowelflag && !xflag) { + if (!/[AEIOU]/.test(name[i])) { + return false; + } + } + if (xflag) { + if (!/X/.test(name[i])) { + return false; + } + } + } + } + return true; + } + function itItCheck(tin) { + var chars = tin.toUpperCase().split(""); + if (!itItNameCheck(chars.slice(0, 3))) { + return false; + } + if (!itItNameCheck(chars.slice(3, 6))) { + return false; + } + var number_locations = [6, 7, 9, 10, 12, 13, 14]; + var number_replace = { + L: "0", + M: "1", + N: "2", + P: "3", + Q: "4", + R: "5", + S: "6", + T: "7", + U: "8", + V: "9" + }; + for (var _i4 = 0, _number_locations = number_locations; _i4 < _number_locations.length; _i4++) { + var i = _number_locations[_i4]; + if (chars[i] in number_replace) { + chars.splice(i, 1, number_replace[chars[i]]); + } + } + var month_replace = { + A: "01", + B: "02", + C: "03", + D: "04", + E: "05", + H: "06", + L: "07", + M: "08", + P: "09", + R: "10", + S: "11", + T: "12" + }; + var month = month_replace[chars[8]]; + var day = parseInt(chars[9] + chars[10], 10); + if (day > 40) { + day -= 40; + } + if (day < 10) { + day = "0".concat(day); + } + var date = "".concat(chars[6]).concat(chars[7], "/").concat(month, "/").concat(day); + if (!(0, _isDate.default)(date, "YY/MM/DD")) { + return false; + } + var checksum = 0; + for (var _i5 = 1; _i5 < chars.length - 1; _i5 += 2) { + var char_to_int = parseInt(chars[_i5], 10); + if (isNaN(char_to_int)) { + char_to_int = chars[_i5].charCodeAt(0) - 65; + } + checksum += char_to_int; + } + var odd_convert = { + // Maps of characters at odd places + A: 1, + B: 0, + C: 5, + D: 7, + E: 9, + F: 13, + G: 15, + H: 17, + I: 19, + J: 21, + K: 2, + L: 4, + M: 18, + N: 20, + O: 11, + P: 3, + Q: 6, + R: 8, + S: 12, + T: 14, + U: 16, + V: 10, + W: 22, + X: 25, + Y: 24, + Z: 23, + 0: 1, + 1: 0 + }; + for (var _i6 = 0; _i6 < chars.length - 1; _i6 += 2) { + var _char_to_int = 0; + if (chars[_i6] in odd_convert) { + _char_to_int = odd_convert[chars[_i6]]; + } else { + var multiplier = parseInt(chars[_i6], 10); + _char_to_int = 2 * multiplier + 1; + if (multiplier > 4) { + _char_to_int += 2; + } + } + checksum += _char_to_int; + } + if (String.fromCharCode(65 + checksum % 26) !== chars[15]) { + return false; + } + return true; + } + function lvLvCheck(tin) { + tin = tin.replace(/\W/, ""); + var day = tin.slice(0, 2); + if (day !== "32") { + var month = tin.slice(2, 4); + if (month !== "00") { + var full_year = tin.slice(4, 6); + switch (tin[6]) { + case "0": + full_year = "18".concat(full_year); + break; + case "1": + full_year = "19".concat(full_year); + break; + default: + full_year = "20".concat(full_year); + break; + } + var date = "".concat(full_year, "/").concat(tin.slice(2, 4), "/").concat(day); + if (!(0, _isDate.default)(date, "YYYY/MM/DD")) { + return false; + } + } + var checksum = 1101; + var multip_lookup = [1, 6, 3, 7, 9, 10, 5, 8, 4, 2]; + for (var i = 0; i < tin.length - 1; i++) { + checksum -= parseInt(tin[i], 10) * multip_lookup[i]; + } + return parseInt(tin[10], 10) === checksum % 11; + } + return true; + } + function mtMtCheck(tin) { + if (tin.length !== 9) { + var chars = tin.toUpperCase().split(""); + while (chars.length < 8) { + chars.unshift(0); + } + switch (tin[7]) { + case "A": + case "P": + if (parseInt(chars[6], 10) === 0) { + return false; + } + break; + default: { + var first_part = parseInt(chars.join("").slice(0, 5), 10); + if (first_part > 32e3) { + return false; + } + var second_part = parseInt(chars.join("").slice(5, 7), 10); + if (first_part === second_part) { + return false; + } + } + } + } + return true; + } + function nlNlCheck(tin) { + return algorithms.reverseMultiplyAndSum(tin.split("").slice(0, 8).map(function(a) { + return parseInt(a, 10); + }), 9) % 11 === parseInt(tin[8], 10); + } + function plPlCheck(tin) { + if (tin.length === 10) { + var lookup = [6, 5, 7, 2, 3, 4, 5, 6, 7]; + var _checksum = 0; + for (var i = 0; i < lookup.length; i++) { + _checksum += parseInt(tin[i], 10) * lookup[i]; + } + _checksum %= 11; + if (_checksum === 10) { + return false; + } + return _checksum === parseInt(tin[9], 10); + } + var full_year = tin.slice(0, 2); + var month = parseInt(tin.slice(2, 4), 10); + if (month > 80) { + full_year = "18".concat(full_year); + month -= 80; + } else if (month > 60) { + full_year = "22".concat(full_year); + month -= 60; + } else if (month > 40) { + full_year = "21".concat(full_year); + month -= 40; + } else if (month > 20) { + full_year = "20".concat(full_year); + month -= 20; + } else { + full_year = "19".concat(full_year); + } + if (month < 10) { + month = "0".concat(month); + } + var date = "".concat(full_year, "/").concat(month, "/").concat(tin.slice(4, 6)); + if (!(0, _isDate.default)(date, "YYYY/MM/DD")) { + return false; + } + var checksum = 0; + var multiplier = 1; + for (var _i7 = 0; _i7 < tin.length - 1; _i7++) { + checksum += parseInt(tin[_i7], 10) * multiplier % 10; + multiplier += 2; + if (multiplier > 10) { + multiplier = 1; + } else if (multiplier === 5) { + multiplier += 2; + } + } + checksum = 10 - checksum % 10; + return checksum === parseInt(tin[10], 10); + } + function cnpjCharToValue(char) { + return char.charCodeAt(0) - 48; + } + function validateCnpj(cnpj) { + var identifiers = cnpj.substring(0, 12).toUpperCase(); + var checkDigits = cnpj.substring(12); + if (/^(.)\1+$/.test(cnpj.toUpperCase())) { + return false; + } + var sum = 0; + var weight = 5; + for (var i = 0; i < 12; i++) { + sum += cnpjCharToValue(identifiers.charAt(i)) * weight; + weight = weight === 2 ? 9 : weight - 1; + } + var remainder = sum % 11; + var firstDV = remainder < 2 ? 0 : 11 - remainder; + if (firstDV !== parseInt(checkDigits.charAt(0), 10)) { + return false; + } + sum = 0; + weight = 6; + for (var _i8 = 0; _i8 < 12; _i8++) { + sum += cnpjCharToValue(identifiers.charAt(_i8)) * weight; + weight = weight === 2 ? 9 : weight - 1; + } + sum += firstDV * 2; + remainder = sum % 11; + var secondDV = remainder < 2 ? 0 : 11 - remainder; + return secondDV === parseInt(checkDigits.charAt(1), 10); + } + function ptBrCheck(tin) { + tin = tin.replace(/[.\-/]/g, ""); + if (tin.length === 11) { + var sum; + var remainder; + sum = 0; + if ( + // Reject known invalid CPFs + tin === "11111111111" || tin === "22222222222" || tin === "33333333333" || tin === "44444444444" || tin === "55555555555" || tin === "66666666666" || tin === "77777777777" || tin === "88888888888" || tin === "99999999999" || tin === "00000000000" + ) return false; + for (var i = 1; i <= 9; i++) sum += parseInt(tin.substring(i - 1, i), 10) * (11 - i); + remainder = sum * 10 % 11; + if (remainder === 10) remainder = 0; + if (remainder !== parseInt(tin.substring(9, 10), 10)) return false; + sum = 0; + for (var _i9 = 1; _i9 <= 10; _i9++) sum += parseInt(tin.substring(_i9 - 1, _i9), 10) * (12 - _i9); + remainder = sum * 10 % 11; + if (remainder === 10) remainder = 0; + if (remainder !== parseInt(tin.substring(10, 11), 10)) return false; + return true; + } + return validateCnpj(tin); + } + function ptPtCheck(tin) { + var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split("").slice(0, 8).map(function(a) { + return parseInt(a, 10); + }), 9) % 11; + if (checksum > 9) { + return parseInt(tin[8], 10) === 0; + } + return checksum === parseInt(tin[8], 10); + } + function roRoCheck(tin) { + if (tin.slice(0, 4) !== "9000") { + var full_year = tin.slice(1, 3); + switch (tin[0]) { + case "1": + case "2": + full_year = "19".concat(full_year); + break; + case "3": + case "4": + full_year = "18".concat(full_year); + break; + case "5": + case "6": + full_year = "20".concat(full_year); + break; + default: + } + var date = "".concat(full_year, "/").concat(tin.slice(3, 5), "/").concat(tin.slice(5, 7)); + if (date.length === 8) { + if (!(0, _isDate.default)(date, "YY/MM/DD")) { + return false; + } + } else if (!(0, _isDate.default)(date, "YYYY/MM/DD")) { + return false; + } + var digits = tin.split("").map(function(a) { + return parseInt(a, 10); + }); + var multipliers = [2, 7, 9, 1, 4, 6, 3, 5, 8, 2, 7, 9]; + var checksum = 0; + for (var i = 0; i < multipliers.length; i++) { + checksum += digits[i] * multipliers[i]; + } + if (checksum % 11 === 10) { + return digits[12] === 1; + } + return digits[12] === checksum % 11; + } + return true; + } + function skSkCheck(tin) { + if (tin.length === 9) { + tin = tin.replace(/\W/, ""); + if (tin.slice(6) === "000") { + return false; + } + var full_year = parseInt(tin.slice(0, 2), 10); + if (full_year > 53) { + return false; + } + if (full_year < 10) { + full_year = "190".concat(full_year); + } else { + full_year = "19".concat(full_year); + } + var month = parseInt(tin.slice(2, 4), 10); + if (month > 50) { + month -= 50; + } + if (month < 10) { + month = "0".concat(month); + } + var date = "".concat(full_year, "/").concat(month, "/").concat(tin.slice(4, 6)); + if (!(0, _isDate.default)(date, "YYYY/MM/DD")) { + return false; + } + } + return true; + } + function slSiCheck(tin) { + var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split("").slice(0, 7).map(function(a) { + return parseInt(a, 10); + }), 8) % 11; + if (checksum === 10) { + return parseInt(tin[7], 10) === 0; + } + return checksum === parseInt(tin[7], 10); + } + function svSeCheck(tin) { + var tin_copy = tin.slice(0); + if (tin.length > 11) { + tin_copy = tin_copy.slice(2); + } + var full_year = ""; + var month = tin_copy.slice(2, 4); + var day = parseInt(tin_copy.slice(4, 6), 10); + if (tin.length > 11) { + full_year = tin.slice(0, 4); + } else { + full_year = tin.slice(0, 2); + if (tin.length === 11 && day < 60) { + var current_year = (/* @__PURE__ */ new Date()).getFullYear().toString(); + var current_century = parseInt(current_year.slice(0, 2), 10); + current_year = parseInt(current_year, 10); + if (tin[6] === "-") { + if (parseInt("".concat(current_century).concat(full_year), 10) > current_year) { + full_year = "".concat(current_century - 1).concat(full_year); + } else { + full_year = "".concat(current_century).concat(full_year); + } + } else { + full_year = "".concat(current_century - 1).concat(full_year); + if (current_year - parseInt(full_year, 10) < 100) { + return false; + } + } + } + } + if (day > 60) { + day -= 60; + } + if (day < 10) { + day = "0".concat(day); + } + var date = "".concat(full_year, "/").concat(month, "/").concat(day); + if (date.length === 8) { + if (!(0, _isDate.default)(date, "YY/MM/DD")) { + return false; + } + } else if (!(0, _isDate.default)(date, "YYYY/MM/DD")) { + return false; + } + return algorithms.luhnCheck(tin.replace(/\W/, "")); + } + function ukUaCheck(tin) { + var digits = tin.split("").map(function(a) { + return parseInt(a, 10); + }); + var multipliers = [-1, 5, 7, 9, 4, 6, 10, 5, 7]; + var checksum = 0; + for (var i = 0; i < multipliers.length; i++) { + checksum += digits[i] * multipliers[i]; + } + return checksum % 11 === 10 ? digits[9] === 0 : digits[9] === checksum % 11; + } + var taxIdFormat = { + "bg-BG": /^\d{10}$/, + "cs-CZ": /^\d{6}\/{0,1}\d{3,4}$/, + "de-AT": /^\d{9}$/, + "de-DE": /^[1-9]\d{10}$/, + "dk-DK": /^\d{6}-{0,1}\d{4}$/, + "el-CY": /^[09]\d{7}[A-Z]$/, + "el-GR": /^([0-4]|[7-9])\d{8}$/, + "en-CA": /^\d{9}$/, + "en-GB": /^\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\d{6}[ABCD ]$/i, + "en-IE": /^\d{7}[A-W][A-IW]{0,1}$/i, + "en-US": /^\d{2}[- ]{0,1}\d{7}$/, + "es-AR": /(20|23|24|27|30|33|34)[0-9]{8}[0-9]/, + "es-ES": /^(\d{0,8}|[XYZKLM]\d{7})[A-HJ-NP-TV-Z]$/i, + "et-EE": /^[1-6]\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\d$/, + "fi-FI": /^\d{6}[-+A]\d{3}[0-9A-FHJ-NPR-Y]$/i, + "fr-BE": /^\d{11}$/, + "fr-FR": /^[0-3]\d{12}$|^[0-3]\d\s\d{2}(\s\d{3}){3}$/, + // Conforms both to official spec and provided example + "fr-LU": /^\d{13}$/, + "hr-HR": /^\d{11}$/, + "hu-HU": /^8\d{9}$/, + "it-IT": /^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i, + "lv-LV": /^\d{6}-{0,1}\d{5}$/, + // Conforms both to DG TAXUD spec and original research + "mt-MT": /^\d{3,7}[APMGLHBZ]$|^([1-8])\1\d{7}$/i, + "nl-NL": /^\d{9}$/, + "pl-PL": /^\d{10,11}$/, + "pt-BR": /(?:^\d{3}\.\d{3}\.\d{3}-\d{2}$)|(?:^\d{11}$)|(?:^[A-Z0-9]{12}\d{2}$)/i, + "pt-PT": /^\d{9}$/, + "ro-RO": /^\d{13}$/, + "sk-SK": /^\d{6}\/{0,1}\d{3,4}$/, + "sl-SI": /^[1-9]\d{7}$/, + "sv-SE": /^(\d{6}[-+]{0,1}\d{4}|(18|19|20)\d{6}[-+]{0,1}\d{4})$/, + "uk-UA": /^\d{10}$/ + }; + taxIdFormat["lb-LU"] = taxIdFormat["fr-LU"]; + taxIdFormat["lt-LT"] = taxIdFormat["et-EE"]; + taxIdFormat["nl-BE"] = taxIdFormat["fr-BE"]; + taxIdFormat["fr-CA"] = taxIdFormat["en-CA"]; + var taxIdCheck = { + "bg-BG": bgBgCheck, + "cs-CZ": csCzCheck, + "de-AT": deAtCheck, + "de-DE": deDeCheck, + "dk-DK": dkDkCheck, + "el-CY": elCyCheck, + "el-GR": elGrCheck, + "en-CA": isCanadianSIN, + "en-IE": enIeCheck, + "en-US": enUsCheck, + "es-AR": esArCheck, + "es-ES": esEsCheck, + "et-EE": etEeCheck, + "fi-FI": fiFiCheck, + "fr-BE": frBeCheck, + "fr-FR": frFrCheck, + "fr-LU": frLuCheck, + "hr-HR": hrHrCheck, + "hu-HU": huHuCheck, + "it-IT": itItCheck, + "lv-LV": lvLvCheck, + "mt-MT": mtMtCheck, + "nl-NL": nlNlCheck, + "pl-PL": plPlCheck, + "pt-BR": ptBrCheck, + "pt-PT": ptPtCheck, + "ro-RO": roRoCheck, + "sk-SK": skSkCheck, + "sl-SI": slSiCheck, + "sv-SE": svSeCheck, + "uk-UA": ukUaCheck + }; + taxIdCheck["lb-LU"] = taxIdCheck["fr-LU"]; + taxIdCheck["lt-LT"] = taxIdCheck["et-EE"]; + taxIdCheck["nl-BE"] = taxIdCheck["fr-BE"]; + taxIdCheck["fr-CA"] = taxIdCheck["en-CA"]; + var allsymbols = /[-\\\/!@#$%\^&\*\(\)\+\=\[\]]+/g; + var sanitizeRegexes = { + "de-AT": allsymbols, + "de-DE": /[\/\\]/g, + "fr-BE": allsymbols + }; + sanitizeRegexes["nl-BE"] = sanitizeRegexes["fr-BE"]; + function isTaxID(str) { + var locale = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en-US"; + (0, _assertString.default)(str); + var strcopy = str.slice(0); + if (locale in taxIdFormat) { + if (locale in sanitizeRegexes) { + strcopy = strcopy.replace(sanitizeRegexes[locale], ""); + } + if (!taxIdFormat[locale].test(strcopy)) { + return false; + } + if (locale in taxIdCheck) { + return taxIdCheck[locale](strcopy); + } + return true; + } + throw new Error("Invalid locale '".concat(locale, "'")); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISO6346.js +var require_isISO6346 = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISO6346.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.isFreightContainerID = void 0; + exports2.isISO6346 = isISO6346; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var isISO6346Str = /^[A-Z]{3}(U[0-9]{7})|([J,Z][0-9]{6,7})$/; + var isDigit = /^[0-9]$/; + function isISO6346(str) { + (0, _assertString.default)(str); + str = str.toUpperCase(); + if (!isISO6346Str.test(str)) return false; + if (str.length === 11) { + var sum = 0; + for (var i = 0; i < str.length - 1; i++) { + if (!isDigit.test(str[i])) { + var convertedCode = void 0; + var letterCode = str.charCodeAt(i) - 55; + if (letterCode < 11) convertedCode = letterCode; + else if (letterCode >= 11 && letterCode <= 20) convertedCode = 12 + letterCode % 11; + else if (letterCode >= 21 && letterCode <= 30) convertedCode = 23 + letterCode % 21; + else convertedCode = 34 + letterCode % 31; + sum += convertedCode * Math.pow(2, i); + } else sum += str[i] * Math.pow(2, i); + } + var checkSumDigit = sum % 11; + if (checkSumDigit === 10) checkSumDigit = 0; + return Number(str[str.length - 1]) === checkSumDigit; + } + return true; + } + var isFreightContainerID = exports2.isFreightContainerID = isISO6346; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISO6391.js +var require_isISO6391 = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISO6391.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isISO6391; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var isISO6391Set = /* @__PURE__ */ new Set(["aa", "ab", "ae", "af", "ak", "am", "an", "ar", "as", "av", "ay", "az", "az", "ba", "be", "bg", "bh", "bi", "bm", "bn", "bo", "br", "bs", "ca", "ce", "ch", "co", "cr", "cs", "cu", "cv", "cy", "da", "de", "dv", "dz", "ee", "el", "en", "eo", "es", "et", "eu", "fa", "ff", "fi", "fj", "fo", "fr", "fy", "ga", "gd", "gl", "gn", "gu", "gv", "ha", "he", "hi", "ho", "hr", "ht", "hu", "hy", "hz", "ia", "id", "ie", "ig", "ii", "ik", "io", "is", "it", "iu", "ja", "jv", "ka", "kg", "ki", "kj", "kk", "kl", "km", "kn", "ko", "kr", "ks", "ku", "kv", "kw", "ky", "la", "lb", "lg", "li", "ln", "lo", "lt", "lu", "lv", "mg", "mh", "mi", "mk", "ml", "mn", "mr", "ms", "mt", "my", "na", "nb", "nd", "ne", "ng", "nl", "nn", "no", "nr", "nv", "ny", "oc", "oj", "om", "or", "os", "pa", "pi", "pl", "ps", "pt", "qu", "rm", "rn", "ro", "ru", "rw", "sa", "sc", "sd", "se", "sg", "si", "sk", "sl", "sm", "sn", "so", "sq", "sr", "ss", "st", "su", "sv", "sw", "ta", "te", "tg", "th", "ti", "tk", "tl", "tn", "to", "tr", "ts", "tt", "tw", "ty", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "wo", "xh", "yi", "yo", "za", "zh", "zu"]); + function isISO6391(str) { + (0, _assertString.default)(str); + return isISO6391Set.has(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISO15924.js +var require_isISO15924 = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISO15924.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.ScriptCodes = void 0; + exports2.default = isISO15924; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var validISO15924Codes = /* @__PURE__ */ new Set(["Adlm", "Afak", "Aghb", "Ahom", "Arab", "Aran", "Armi", "Armn", "Avst", "Bali", "Bamu", "Bass", "Batk", "Beng", "Bhks", "Blis", "Bopo", "Brah", "Brai", "Bugi", "Buhd", "Cakm", "Cans", "Cari", "Cham", "Cher", "Chis", "Chrs", "Cirt", "Copt", "Cpmn", "Cprt", "Cyrl", "Cyrs", "Deva", "Diak", "Dogr", "Dsrt", "Dupl", "Egyd", "Egyh", "Egyp", "Elba", "Elym", "Ethi", "Gara", "Geok", "Geor", "Glag", "Gong", "Gonm", "Goth", "Gran", "Grek", "Gujr", "Gukh", "Guru", "Hanb", "Hang", "Hani", "Hano", "Hans", "Hant", "Hatr", "Hebr", "Hira", "Hluw", "Hmng", "Hmnp", "Hrkt", "Hung", "Inds", "Ital", "Jamo", "Java", "Jpan", "Jurc", "Kali", "Kana", "Kawi", "Khar", "Khmr", "Khoj", "Kitl", "Kits", "Knda", "Kore", "Kpel", "Krai", "Kthi", "Lana", "Laoo", "Latf", "Latg", "Latn", "Leke", "Lepc", "Limb", "Lina", "Linb", "Lisu", "Loma", "Lyci", "Lydi", "Mahj", "Maka", "Mand", "Mani", "Marc", "Maya", "Medf", "Mend", "Merc", "Mero", "Mlym", "Modi", "Mong", "Moon", "Mroo", "Mtei", "Mult", "Mymr", "Nagm", "Nand", "Narb", "Nbat", "Newa", "Nkdb", "Nkgb", "Nkoo", "Nshu", "Ogam", "Olck", "Onao", "Orkh", "Orya", "Osge", "Osma", "Ougr", "Palm", "Pauc", "Pcun", "Pelm", "Perm", "Phag", "Phli", "Phlp", "Phlv", "Phnx", "Plrd", "Piqd", "Prti", "Psin", "Qaaa", "Qaab", "Qaac", "Qaad", "Qaae", "Qaaf", "Qaag", "Qaah", "Qaai", "Qaaj", "Qaak", "Qaal", "Qaam", "Qaan", "Qaao", "Qaap", "Qaaq", "Qaar", "Qaas", "Qaat", "Qaau", "Qaav", "Qaaw", "Qaax", "Qaay", "Qaaz", "Qaba", "Qabb", "Qabc", "Qabd", "Qabe", "Qabf", "Qabg", "Qabh", "Qabi", "Qabj", "Qabk", "Qabl", "Qabm", "Qabn", "Qabo", "Qabp", "Qabq", "Qabr", "Qabs", "Qabt", "Qabu", "Qabv", "Qabw", "Qabx", "Ranj", "Rjng", "Rohg", "Roro", "Runr", "Samr", "Sara", "Sarb", "Saur", "Sgnw", "Shaw", "Shrd", "Shui", "Sidd", "Sidt", "Sind", "Sinh", "Sogd", "Sogo", "Sora", "Soyo", "Sund", "Sunu", "Sylo", "Syrc", "Syre", "Syrj", "Syrn", "Tagb", "Takr", "Tale", "Talu", "Taml", "Tang", "Tavt", "Tayo", "Telu", "Teng", "Tfng", "Tglg", "Thaa", "Thai", "Tibt", "Tirh", "Tnsa", "Todr", "Tols", "Toto", "Tutg", "Ugar", "Vaii", "Visp", "Vith", "Wara", "Wcho", "Wole", "Xpeo", "Xsux", "Yezi", "Yiii", "Zanb", "Zinh", "Zmth", "Zsye", "Zsym", "Zxxx", "Zyyy", "Zzzz"]); + function isISO15924(str) { + (0, _assertString.default)(str); + return validISO15924Codes.has(str); + } + var ScriptCodes = exports2.ScriptCodes = validISO15924Codes; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISO31661Numeric.js +var require_isISO31661Numeric = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISO31661Numeric.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isISO31661Numeric; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var validISO31661NumericCountriesCodes = /* @__PURE__ */ new Set(["004", "008", "010", "012", "016", "020", "024", "028", "031", "032", "036", "040", "044", "048", "050", "051", "052", "056", "060", "064", "068", "070", "072", "074", "076", "084", "086", "090", "092", "096", "100", "104", "108", "112", "116", "120", "124", "132", "136", "140", "144", "148", "152", "156", "158", "162", "166", "170", "174", "175", "178", "180", "184", "188", "191", "192", "196", "203", "204", "208", "212", "214", "218", "222", "226", "231", "232", "233", "234", "238", "239", "242", "246", "248", "250", "254", "258", "260", "262", "266", "268", "270", "275", "276", "288", "292", "296", "300", "304", "308", "312", "316", "320", "324", "328", "332", "334", "336", "340", "344", "348", "352", "356", "360", "364", "368", "372", "376", "380", "384", "388", "392", "398", "400", "404", "408", "410", "414", "417", "418", "422", "426", "428", "430", "434", "438", "440", "442", "446", "450", "454", "458", "462", "466", "470", "474", "478", "480", "484", "492", "496", "498", "499", "500", "504", "508", "512", "516", "520", "524", "528", "531", "533", "534", "535", "540", "548", "554", "558", "562", "566", "570", "574", "578", "580", "581", "583", "584", "585", "586", "591", "598", "600", "604", "608", "612", "616", "620", "624", "626", "630", "634", "638", "642", "643", "646", "652", "654", "659", "660", "662", "663", "666", "670", "674", "678", "682", "686", "688", "690", "694", "702", "703", "704", "705", "706", "710", "716", "724", "728", "729", "732", "740", "744", "748", "752", "756", "760", "762", "764", "768", "772", "776", "780", "784", "788", "792", "795", "796", "798", "800", "804", "807", "818", "826", "831", "832", "833", "834", "840", "850", "854", "858", "860", "862", "876", "882", "887", "894"]); + function isISO31661Numeric(str) { + (0, _assertString.default)(str); + return validISO31661NumericCountriesCodes.has(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISO4217.js +var require_isISO4217 = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isISO4217.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.CurrencyCodes = void 0; + exports2.default = isISO4217; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var validISO4217CurrencyCodes = /* @__PURE__ */ new Set(["AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLE", "SLL", "SOS", "SRD", "SSP", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "USN", "UYI", "UYU", "UYW", "UZS", "VED", "VES", "VND", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XSU", "XTS", "XUA", "XXX", "YER", "ZAR", "ZMW", "ZWL"]); + function isISO4217(str) { + (0, _assertString.default)(str); + return validISO4217CurrencyCodes.has(str.toUpperCase()); + } + var CurrencyCodes = exports2.CurrencyCodes = validISO4217CurrencyCodes; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isBase58.js +var require_isBase58 = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isBase58.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isBase58; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var base58Reg = /^[A-HJ-NP-Za-km-z1-9]*$/; + function isBase58(str) { + (0, _assertString.default)(str); + return base58Reg.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/rtrim.js +var require_rtrim = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/rtrim.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = rtrim; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function rtrim(str, chars) { + (0, _assertString.default)(str); + if (chars) { + var pattern = new RegExp("[".concat(chars.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "]+$"), "g"); + return str.replace(pattern, ""); + } + var strIndex = str.length - 1; + while (/\s/.test(str.charAt(strIndex))) { + strIndex -= 1; + } + return str.slice(0, strIndex + 1); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/ltrim.js +var require_ltrim = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/ltrim.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = ltrim; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function ltrim(str, chars) { + (0, _assertString.default)(str); + var pattern = chars ? new RegExp("^[".concat(chars.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "]+"), "g") : /^\s+/g; + return str.replace(pattern, ""); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/trim.js +var require_trim = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/trim.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = trim; + var _rtrim = _interopRequireDefault(require_rtrim()); + var _ltrim = _interopRequireDefault(require_ltrim()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function trim(str, chars) { + return (0, _rtrim.default)((0, _ltrim.default)(str, chars), chars); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isMailtoURI.js +var require_isMailtoURI = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isMailtoURI.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isMailtoURI; + var _trim = _interopRequireDefault(require_trim()); + var _isEmail = _interopRequireDefault(require_isEmail()); + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); + } + function _nonIterableRest() { + 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 _iterableToArrayLimit(r, l2) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, n, i, u, a = [], f = true, o = false; + try { + if (i = (t = t.call(r)).next, 0 === l2) { + if (Object(t) !== t) return; + f = false; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l2); f = true) ; + } catch (r2) { + o = true, n = r2; + } finally { + try { + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } + } + function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; + } + function _createForOfIteratorHelper(r, e) { + var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (!t) { + if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { + t && (r = t); + var _n = 0, F = function F2() { + }; + return { s: F, n: function n() { + return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; + }, e: function e2(r2) { + throw r2; + }, f: F }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + var o, a = true, u = false; + return { s: function s() { + t = t.call(r); + }, n: function n() { + var r2 = t.next(); + return a = r2.done, r2; + }, e: function e2(r2) { + u = true, o = r2; + }, f: function f() { + try { + a || null == t.return || t.return(); + } finally { + if (u) throw o; + } + } }; + } + function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + function parseMailtoQueryString(queryString) { + var allowedParams = /* @__PURE__ */ new Set(["subject", "body", "cc", "bcc"]), query = { + cc: "", + bcc: "" + }; + var isParseFailed = false; + var queryParams = queryString.split("&"); + if (queryParams.length > 4) { + return false; + } + var _iterator = _createForOfIteratorHelper(queryParams), _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done; ) { + var q = _step.value; + var _q$split = q.split("="), _q$split2 = _slicedToArray(_q$split, 2), key = _q$split2[0], value = _q$split2[1]; + if (key && !allowedParams.has(key)) { + isParseFailed = true; + break; + } + if (value && (key === "cc" || key === "bcc")) { + query[key] = value; + } + if (key) { + allowedParams.delete(key); + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + return isParseFailed ? false : query; + } + function isMailtoURI(url, options) { + (0, _assertString.default)(url); + if (url.indexOf("mailto:") !== 0) { + return false; + } + var _url$replace$split = url.replace("mailto:", "").split("?"), _url$replace$split2 = _slicedToArray(_url$replace$split, 2), to = _url$replace$split2[0], _url$replace$split2$ = _url$replace$split2[1], queryString = _url$replace$split2$ === void 0 ? "" : _url$replace$split2$; + if (!to && !queryString) { + return true; + } + var query = parseMailtoQueryString(queryString); + if (!query) { + return false; + } + return "".concat(to, ",").concat(query.cc, ",").concat(query.bcc).split(",").every(function(email) { + email = (0, _trim.default)(email, " "); + if (email) { + return (0, _isEmail.default)(email, options); + } + return true; + }); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/escape.js +var require_escape = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/escape.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = escape2; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function escape2(str) { + (0, _assertString.default)(str); + return str.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">").replace(/\//g, "/").replace(/\\/g, "\").replace(/`/g, "`"); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/unescape.js +var require_unescape = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/unescape.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = unescape2; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function unescape2(str) { + (0, _assertString.default)(str); + return str.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(///g, "/").replace(/\/g, "\\").replace(/`/g, "`").replace(/&/g, "&"); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/blacklist.js +var require_blacklist = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/blacklist.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = blacklist; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function blacklist(str, chars) { + (0, _assertString.default)(str); + return str.replace(new RegExp("[".concat(chars, "]+"), "g"), ""); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/stripLow.js +var require_stripLow = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/stripLow.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = stripLow; + var _assertString = _interopRequireDefault(require_assertString()); + var _blacklist = _interopRequireDefault(require_blacklist()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function stripLow(str, keep_new_lines) { + (0, _assertString.default)(str); + var chars = keep_new_lines ? "\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F" : "\\x00-\\x1F\\x7F"; + return (0, _blacklist.default)(str, chars); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/whitelist.js +var require_whitelist = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/whitelist.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = whitelist; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function whitelist(str, chars) { + (0, _assertString.default)(str); + return str.replace(new RegExp("[^".concat(chars, "]+"), "g"), ""); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isWhitelisted.js +var require_isWhitelisted = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isWhitelisted.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isWhitelisted; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + function isWhitelisted(str, chars) { + (0, _assertString.default)(str); + for (var i = str.length - 1; i >= 0; i--) { + if (chars.indexOf(str[i]) === -1) { + return false; + } + } + return true; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/normalizeEmail.js +var require_normalizeEmail = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/normalizeEmail.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = normalizeEmail; + var _merge = _interopRequireDefault(require_merge()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var default_normalize_email_options = { + // The following options apply to all email addresses + // Lowercases the local part of the email address. + // Please note this may violate RFC 5321 as per http://stackoverflow.com/a/9808332/192024). + // The domain is always lowercased, as per RFC 1035 + all_lowercase: true, + // The following conversions are specific to GMail + // Lowercases the local part of the GMail address (known to be case-insensitive) + gmail_lowercase: true, + // Removes dots from the local part of the email address, as that's ignored by GMail + gmail_remove_dots: true, + // Removes the subaddress (e.g. "+foo") from the email address + gmail_remove_subaddress: true, + // Conversts the googlemail.com domain to gmail.com + gmail_convert_googlemaildotcom: true, + // The following conversions are specific to Outlook.com / Windows Live / Hotmail + // Lowercases the local part of the Outlook.com address (known to be case-insensitive) + outlookdotcom_lowercase: true, + // Removes the subaddress (e.g. "+foo") from the email address + outlookdotcom_remove_subaddress: true, + // The following conversions are specific to Yahoo + // Lowercases the local part of the Yahoo address (known to be case-insensitive) + yahoo_lowercase: true, + // Removes the subaddress (e.g. "-foo") from the email address + yahoo_remove_subaddress: true, + // The following conversions are specific to Yandex + // Lowercases the local part of the Yandex address (known to be case-insensitive) + yandex_lowercase: true, + // all yandex domains are equal, this explicitly sets the domain to 'yandex.ru' + yandex_convert_yandexru: true, + // The following conversions are specific to iCloud + // Lowercases the local part of the iCloud address (known to be case-insensitive) + icloud_lowercase: true, + // Removes the subaddress (e.g. "+foo") from the email address + icloud_remove_subaddress: true + }; + var icloud_domains = ["icloud.com", "me.com"]; + var outlookdotcom_domains = ["hotmail.at", "hotmail.be", "hotmail.ca", "hotmail.cl", "hotmail.co.il", "hotmail.co.nz", "hotmail.co.th", "hotmail.co.uk", "hotmail.com", "hotmail.com.ar", "hotmail.com.au", "hotmail.com.br", "hotmail.com.gr", "hotmail.com.mx", "hotmail.com.pe", "hotmail.com.tr", "hotmail.com.vn", "hotmail.cz", "hotmail.de", "hotmail.dk", "hotmail.es", "hotmail.fr", "hotmail.hu", "hotmail.id", "hotmail.ie", "hotmail.in", "hotmail.it", "hotmail.jp", "hotmail.kr", "hotmail.lv", "hotmail.my", "hotmail.ph", "hotmail.pt", "hotmail.sa", "hotmail.sg", "hotmail.sk", "live.be", "live.co.uk", "live.com", "live.com.ar", "live.com.mx", "live.de", "live.es", "live.eu", "live.fr", "live.it", "live.nl", "msn.com", "outlook.at", "outlook.be", "outlook.cl", "outlook.co.il", "outlook.co.nz", "outlook.co.th", "outlook.com", "outlook.com.ar", "outlook.com.au", "outlook.com.br", "outlook.com.gr", "outlook.com.pe", "outlook.com.tr", "outlook.com.vn", "outlook.cz", "outlook.de", "outlook.dk", "outlook.es", "outlook.fr", "outlook.hu", "outlook.id", "outlook.ie", "outlook.in", "outlook.it", "outlook.jp", "outlook.kr", "outlook.lv", "outlook.my", "outlook.ph", "outlook.pt", "outlook.sa", "outlook.sg", "outlook.sk", "passport.com"]; + var yahoo_domains = ["rocketmail.com", "yahoo.ca", "yahoo.co.uk", "yahoo.com", "yahoo.de", "yahoo.fr", "yahoo.in", "yahoo.it", "ymail.com"]; + var yandex_domains = ["yandex.ru", "yandex.ua", "yandex.kz", "yandex.com", "yandex.by", "ya.ru"]; + function dotsReplacer(match) { + if (match.length > 1) { + return match; + } + return ""; + } + function normalizeEmail(email, options) { + options = (0, _merge.default)(options, default_normalize_email_options); + var raw_parts = email.split("@"); + var domain = raw_parts.pop(); + var user = raw_parts.join("@"); + var parts = [user, domain]; + parts[1] = parts[1].toLowerCase(); + if (parts[1] === "gmail.com" || parts[1] === "googlemail.com") { + if (options.gmail_remove_subaddress) { + parts[0] = parts[0].split("+")[0]; + } + if (options.gmail_remove_dots) { + parts[0] = parts[0].replace(/\.+/g, dotsReplacer); + } + if (!parts[0].length) { + return false; + } + if (options.all_lowercase || options.gmail_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + parts[1] = options.gmail_convert_googlemaildotcom ? "gmail.com" : parts[1]; + } else if (icloud_domains.indexOf(parts[1]) >= 0) { + if (options.icloud_remove_subaddress) { + parts[0] = parts[0].split("+")[0]; + } + if (!parts[0].length) { + return false; + } + if (options.all_lowercase || options.icloud_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (outlookdotcom_domains.indexOf(parts[1]) >= 0) { + if (options.outlookdotcom_remove_subaddress) { + parts[0] = parts[0].split("+")[0]; + } + if (!parts[0].length) { + return false; + } + if (options.all_lowercase || options.outlookdotcom_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (yahoo_domains.indexOf(parts[1]) >= 0) { + if (options.yahoo_remove_subaddress) { + var components = parts[0].split("-"); + parts[0] = components.length > 1 ? components.slice(0, -1).join("-") : components[0]; + } + if (!parts[0].length) { + return false; + } + if (options.all_lowercase || options.yahoo_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (yandex_domains.indexOf(parts[1]) >= 0) { + if (options.all_lowercase || options.yandex_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + parts[1] = options.yandex_convert_yandexru ? "yandex.ru" : parts[1]; + } else if (options.all_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + return parts.join("@"); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isSlug.js +var require_isSlug = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isSlug.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isSlug; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var charsetRegex = /^[a-z0-9](?!.*[-_]{2,})(?:[a-z0-9_-]*[a-z0-9])?$/; + function isSlug(str) { + (0, _assertString.default)(str); + return charsetRegex.test(str); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isLicensePlate.js +var require_isLicensePlate = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isLicensePlate.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isLicensePlate; + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var validators = { + "cs-CZ": function csCZ(str) { + return /^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(str); + }, + "de-DE": function deDE(str) { + return /^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÜ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÖ|GP|GR|GS|GT|GÜ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG|LH|LI|LL|LM|LN|LÖ|LP|LR|LU|M|MA|MB|MC|MD|ME|MG|MH|MI|MK|ML|MM|MN|MO|MQ|MR|MS|MÜ|MW|MY|MZ|N|NB|ND|NE|NF|NH|NI|NK|NM|NÖ|NP|NR|NT|NU|NW|NY|NZ|OA|OB|OC|OD|OE|OF|OG|OH|OK|OL|OP|OS|OZ|P|PA|PB|PE|PF|PI|PL|PM|PN|PR|PS|PW|PZ|R|RA|RC|RD|RE|RG|RH|RI|RL|RM|RN|RO|RP|RS|RT|RU|RV|RW|RZ|S|SB|SC|SE|SG|SI|SK|SL|SM|SN|SO|SP|SR|ST|SU|SW|SY|SZ|TE|TF|TG|TO|TP|TR|TS|TT|TÜ|ÜB|UE|UH|UL|UM|UN|V|VB|VG|VK|VR|VS|W|WA|WB|WE|WF|WI|WK|WL|WM|WN|WO|WR|WS|WT|WÜ|WW|WZ|Z|ZE|ZI|ZP|ZR|ZW|ZZ)[- ]?[A-Z]{1,2}[- ]?\d{1,4}|(ABG|ABI|AIB|AIC|ALF|ALZ|ANA|ANG|ANK|APD|ARN|ART|ASL|ASZ|AUR|AZE|BAD|BAR|BBG|BCH|BED|BER|BGD|BGL|BID|BIN|BIR|BIT|BIW|BKS|BLB|BLK|BNA|BOG|BOH|BOR|BOT|BRA|BRB|BRG|BRK|BRL|BRV|BSB|BSK|BTF|BÜD|BUL|BÜR|BÜS|BÜZ|CAS|CHA|CLP|CLZ|COC|COE|CUX|DAH|DAN|DAU|DBR|DEG|DEL|DGF|DIL|DIN|DIZ|DKB|DLG|DON|DUD|DÜW|EBE|EBN|EBS|ECK|EIC|EIL|EIN|EIS|EMD|EMS|ERB|ERH|ERK|ERZ|ESB|ESW|FDB|FDS|FEU|FFB|FKB|FLÖ|FOR|FRG|FRI|FRW|FTL|FÜS|GAN|GAP|GDB|GEL|GEO|GER|GHA|GHC|GLA|GMN|GNT|GOA|GOH|GRA|GRH|GRI|GRM|GRZ|GTH|GUB|GUN|GVM|HAB|HAL|HAM|HAS|HBN|HBS|HCH|HDH|HDL|HEB|HEF|HEI|HER|HET|HGN|HGW|HHM|HIG|HIP|HMÜ|HOG|HOH|HOL|HOM|HOR|HÖS|HOT|HRO|HSK|HST|HVL|HWI|IGB|ILL|JÜL|KEH|KEL|KEM|KIB|KLE|KLZ|KÖN|KÖT|KÖZ|KRU|KÜN|KUS|KYF|LAN|LAU|LBS|LBZ|LDK|LDS|LEO|LER|LEV|LIB|LIF|LIP|LÖB|LOS|LRO|LSZ|LÜN|LUP|LWL|MAB|MAI|MAK|MAL|MED|MEG|MEI|MEK|MEL|MER|MET|MGH|MGN|MHL|MIL|MKK|MOD|MOL|MON|MOS|MSE|MSH|MSP|MST|MTK|MTL|MÜB|MÜR|MYK|MZG|NAB|NAI|NAU|NDH|NEA|NEB|NEC|NEN|NES|NEW|NMB|NMS|NOH|NOL|NOM|NOR|NVP|NWM|OAL|OBB|OBG|OCH|OHA|ÖHR|OHV|OHZ|OPR|OSL|OVI|OVL|OVP|PAF|PAN|PAR|PCH|PEG|PIR|PLÖ|PRÜ|QFT|QLB|RDG|REG|REH|REI|RID|RIE|ROD|ROF|ROK|ROL|ROS|ROT|ROW|RSL|RÜD|RÜG|SAB|SAD|SAN|SAW|SBG|SBK|SCZ|SDH|SDL|SDT|SEB|SEE|SEF|SEL|SFB|SFT|SGH|SHA|SHG|SHK|SHL|SIG|SIM|SLE|SLF|SLK|SLN|SLS|SLÜ|SLZ|SMÜ|SOB|SOG|SOK|SÖM|SON|SPB|SPN|SRB|SRO|STA|STB|STD|STE|STL|SUL|SÜW|SWA|SZB|TBB|TDO|TET|TIR|TÖL|TUT|UEM|UER|UFF|USI|VAI|VEC|VER|VIB|VIE|VIT|VOH|WAF|WAK|WAN|WAR|WAT|WBS|WDA|WEL|WEN|WER|WES|WHV|WIL|WIS|WIT|WIZ|WLG|WMS|WND|WOB|WOH|WOL|WOR|WOS|WRN|WSF|WST|WSW|WTL|WTM|WUG|WÜM|WUN|WUR|WZL|ZEL|ZIG)[- ]?(([A-Z][- ]?\d{1,4})|([A-Z]{2}[- ]?\d{1,3})))[- ]?(E|H)?$/.test(str); + }, + "de-LI": function deLI(str) { + return /^FL[- ]?\d{1,5}[UZ]?$/.test(str); + }, + "en-IN": function enIN(str) { + return /^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(str); + }, + "en-SG": function enSG(str) { + return /^[A-Z]{3}[ -]?[\d]{4}[ -]?[A-Z]{1}$/.test(str); + }, + "es-AR": function esAR(str) { + return /^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(str); + }, + "fi-FI": function fiFI(str) { + return /^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(str); + }, + "hu-HU": function huHU(str) { + return /^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\d{3})|(M\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \d{2}-\d{2})|(CD \d{3}-\d{3})|(C-(C|X) \d{4})|(X-(A|B|C) \d{4})|(([EPVZ]-\d{5}))|(S A[A-Z]{2} \d{2})|(SP \d{2}-\d{2}))$/.test(str); + }, + "pt-BR": function ptBR(str) { + return /^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(str); + }, + "pt-PT": function ptPT(str) { + return /^(([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[A-Z]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2})|([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2}))$/.test(str); + }, + "sq-AL": function sqAL(str) { + return /^[A-Z]{2}[- ]?((\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\d{3}))$/.test(str); + }, + "sv-SE": function svSE(str) { + return /^[A-HJ-PR-UW-Z]{3} ?[\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(str.trim()); + }, + "en-PK": function enPK(str) { + return /(^[A-Z]{2}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{3}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{4}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]((\s|-){0,1})[0-9]{4}((\s|-)[0-9]{2}){0,1}$)/.test(str.trim()); + } + }; + function isLicensePlate(str, locale) { + (0, _assertString.default)(str); + if (locale in validators) { + return validators[locale](str); + } else if (locale === "any") { + for (var key in validators) { + var validator = validators[key]; + if (validator(str)) { + return true; + } + } + return false; + } + throw new Error("Invalid locale '".concat(locale, "'")); + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isStrongPassword.js +var require_isStrongPassword = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isStrongPassword.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isStrongPassword; + var _merge = _interopRequireDefault(require_merge()); + var _assertString = _interopRequireDefault(require_assertString()); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var upperCaseRegex = /^[A-Z]$/; + var lowerCaseRegex = /^[a-z]$/; + var numberRegex = /^[0-9]$/; + var symbolRegex = /^[-#!$@£%^&*()_+|~=`{}\[\]:";'<>?,.\/\\ ]$/; + var defaultOptions = { + minLength: 8, + minLowercase: 1, + minUppercase: 1, + minNumbers: 1, + minSymbols: 1, + returnScore: false, + pointsPerUnique: 1, + pointsPerRepeat: 0.5, + pointsForContainingLower: 10, + pointsForContainingUpper: 10, + pointsForContainingNumber: 10, + pointsForContainingSymbol: 10 + }; + function countChars(str) { + var result = {}; + Array.from(str).forEach(function(char) { + var curVal = result[char]; + if (curVal) { + result[char] += 1; + } else { + result[char] = 1; + } + }); + return result; + } + function analyzePassword(password) { + var charMap = countChars(password); + var analysis = { + length: password.length, + uniqueChars: Object.keys(charMap).length, + uppercaseCount: 0, + lowercaseCount: 0, + numberCount: 0, + symbolCount: 0 + }; + Object.keys(charMap).forEach(function(char) { + if (upperCaseRegex.test(char)) { + analysis.uppercaseCount += charMap[char]; + } else if (lowerCaseRegex.test(char)) { + analysis.lowercaseCount += charMap[char]; + } else if (numberRegex.test(char)) { + analysis.numberCount += charMap[char]; + } else if (symbolRegex.test(char)) { + analysis.symbolCount += charMap[char]; + } + }); + return analysis; + } + function scorePassword(analysis, scoringOptions) { + var points = 0; + points += analysis.uniqueChars * scoringOptions.pointsPerUnique; + points += (analysis.length - analysis.uniqueChars) * scoringOptions.pointsPerRepeat; + if (analysis.lowercaseCount > 0) { + points += scoringOptions.pointsForContainingLower; + } + if (analysis.uppercaseCount > 0) { + points += scoringOptions.pointsForContainingUpper; + } + if (analysis.numberCount > 0) { + points += scoringOptions.pointsForContainingNumber; + } + if (analysis.symbolCount > 0) { + points += scoringOptions.pointsForContainingSymbol; + } + return points; + } + function isStrongPassword(str) { + var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null; + (0, _assertString.default)(str); + var analysis = analyzePassword(str); + options = (0, _merge.default)(options || {}, defaultOptions); + if (options.returnScore) { + return scorePassword(analysis, options); + } + return analysis.length >= options.minLength && analysis.lowercaseCount >= options.minLowercase && analysis.uppercaseCount >= options.minUppercase && analysis.numberCount >= options.minNumbers && analysis.symbolCount >= options.minSymbols; + } + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isVAT.js +var require_isVAT = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/lib/isVAT.js"(exports2) { + "use strict"; + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = isVAT; + exports2.vatMatchers = void 0; + var _assertString = _interopRequireDefault(require_assertString()); + var algorithms = _interopRequireWildcard(require_algorithms()); + function _interopRequireWildcard(e, t) { + if ("function" == typeof WeakMap) var r = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(); + return (_interopRequireWildcard = function _interopRequireWildcard2(e2, t2) { + if (!t2 && e2 && e2.__esModule) return e2; + var o, i, f = { __proto__: null, default: e2 }; + if (null === e2 || "object" != _typeof(e2) && "function" != typeof e2) return f; + if (o = t2 ? n : r) { + if (o.has(e2)) return o.get(e2); + o.set(e2, f); + } + for (var _t in e2) "default" !== _t && {}.hasOwnProperty.call(e2, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e2, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e2[_t]); + return f; + })(e, t); + } + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var AU = function AU2(str) { + var match = str.match(/^(AU)?(\d{11})$/); + if (!match) { + return false; + } + var weights = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19]; + str = str.replace(/^AU/, ""); + var ABN = (parseInt(str.slice(0, 1), 10) - 1).toString() + str.slice(1); + var total = 0; + for (var i = 0; i < 11; i++) { + total += weights[i] * ABN.charAt(i); + } + return total !== 0 && total % 89 === 0; + }; + var CH = function CH2(str) { + var hasValidCheckNumber = function hasValidCheckNumber2(digits) { + var lastDigit = digits.pop(); + var weights = [5, 4, 3, 2, 7, 6, 5, 4]; + var calculatedCheckNumber = (11 - digits.reduce(function(acc, el, idx) { + return acc + el * weights[idx]; + }, 0) % 11) % 11; + return lastDigit === calculatedCheckNumber; + }; + return /^(CHE[- ]?)?(\d{9}|(\d{3}\.\d{3}\.\d{3})|(\d{3} \d{3} \d{3})) ?(TVA|MWST|IVA)?$/.test(str) && hasValidCheckNumber(str.match(/\d/g).map(function(el) { + return +el; + })); + }; + var PT = function PT2(str) { + var match = str.match(/^(PT)?(\d{9})$/); + if (!match) { + return false; + } + var tin = match[2]; + var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split("").slice(0, 8).map(function(a) { + return parseInt(a, 10); + }), 9) % 11; + if (checksum > 9) { + return parseInt(tin[8], 10) === 0; + } + return checksum === parseInt(tin[8], 10); + }; + var vatMatchers = exports2.vatMatchers = { + /** + * European Union VAT identification numbers + */ + AT: function AT(str) { + return /^(AT)?U\d{8}$/.test(str); + }, + BE: function BE(str) { + return /^(BE)?\d{10}$/.test(str); + }, + BG: function BG(str) { + return /^(BG)?\d{9,10}$/.test(str); + }, + HR: function HR(str) { + return /^(HR)?\d{11}$/.test(str); + }, + CY: function CY(str) { + return /^(CY)?\w{9}$/.test(str); + }, + CZ: function CZ(str) { + return /^(CZ)?\d{8,10}$/.test(str); + }, + DK: function DK(str) { + return /^(DK)?\d{8}$/.test(str); + }, + EE: function EE(str) { + return /^(EE)?\d{9}$/.test(str); + }, + FI: function FI(str) { + return /^(FI)?\d{8}$/.test(str); + }, + FR: function FR(str) { + return /^(FR)([A-Z0-9]{2}\d{9})$/.test(str); + }, + DE: function DE(str) { + return /^(DE)?\d{9}$/.test(str); + }, + EL: function EL(str) { + return /^(EL)?\d{9}$/.test(str); + }, + HU: function HU(str) { + return /^(HU)?\d{8}$/.test(str); + }, + IE: function IE(str) { + return /^(IE)?\d{7}\w{1}(W)?$/.test(str); + }, + IT: function IT(str) { + return /^(IT)?\d{11}$/.test(str); + }, + LV: function LV(str) { + return /^(LV)?\d{11}$/.test(str); + }, + LT: function LT(str) { + return /^(LT)?\d{9,12}$/.test(str); + }, + LU: function LU(str) { + return /^(LU)?\d{8}$/.test(str); + }, + MT: function MT(str) { + return /^(MT)?\d{8}$/.test(str); + }, + NL: function NL(str) { + return /^(NL)?\d{9}B\d{2}$/.test(str); + }, + PL: function PL(str) { + return /^(PL)?(\d{10}|(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3}))$/.test(str); + }, + PT, + RO: function RO(str) { + return /^(RO)?\d{2,10}$/.test(str); + }, + SK: function SK(str) { + return /^(SK)?\d{10}$/.test(str); + }, + SI: function SI(str) { + return /^(SI)?\d{8}$/.test(str); + }, + ES: function ES(str) { + return /^(ES)?\w\d{7}[A-Z]$/.test(str); + }, + SE: function SE(str) { + return /^(SE)?\d{12}$/.test(str); + }, + /** + * VAT numbers of non-EU countries + */ + AL: function AL(str) { + return /^(AL)?\w{9}[A-Z]$/.test(str); + }, + MK: function MK(str) { + return /^(MK)?\d{13}$/.test(str); + }, + AU, + BY: function BY(str) { + return /^(УНП )?\d{9}$/.test(str); + }, + CA: function CA(str) { + return /^(CA)?\d{9}$/.test(str); + }, + IS: function IS(str) { + return /^(IS)?\d{5,6}$/.test(str); + }, + IN: function IN(str) { + return /^(IN)?\d{15}$/.test(str); + }, + ID: function ID(str) { + return /^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(str); + }, + IL: function IL(str) { + return /^(IL)?\d{9}$/.test(str); + }, + KZ: function KZ(str) { + return /^(KZ)?\d{12}$/.test(str); + }, + NZ: function NZ(str) { + return /^(NZ)?\d{9}$/.test(str); + }, + NG: function NG(str) { + return /^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(str); + }, + NO: function NO(str) { + return /^(NO)?\d{9}MVA$/.test(str); + }, + PH: function PH(str) { + return /^(PH)?(\d{12}|\d{3} \d{3} \d{3} \d{3})$/.test(str); + }, + RU: function RU(str) { + return /^(RU)?(\d{10}|\d{12})$/.test(str); + }, + SM: function SM(str) { + return /^(SM)?\d{5}$/.test(str); + }, + SA: function SA(str) { + return /^(SA)?\d{15}$/.test(str); + }, + RS: function RS(str) { + return /^(RS)?\d{9}$/.test(str); + }, + CH, + TR: function TR(str) { + return /^(TR)?\d{10}$/.test(str); + }, + UA: function UA(str) { + return /^(UA)?\d{12}$/.test(str); + }, + GB: function GB(str) { + return /^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(str); + }, + UZ: function UZ(str) { + return /^(UZ)?\d{9}$/.test(str); + }, + /** + * VAT numbers of Latin American countries + */ + AR: function AR(str) { + return /^(AR)?\d{11}$/.test(str); + }, + BO: function BO(str) { + return /^(BO)?\d{7}$/.test(str); + }, + BR: function BR(str) { + return /^(BR)?((\d{2}.\d{3}.\d{3}\/\d{4}-\d{2})|(\d{3}.\d{3}.\d{3}-\d{2}))$/.test(str); + }, + CL: function CL(str) { + return /^(CL)?\d{8}-\d{1}$/.test(str); + }, + CO: function CO(str) { + return /^(CO)?\d{10}$/.test(str); + }, + CR: function CR(str) { + return /^(CR)?\d{9,12}$/.test(str); + }, + EC: function EC(str) { + return /^(EC)?\d{13}$/.test(str); + }, + SV: function SV(str) { + return /^(SV)?\d{4}-\d{6}-\d{3}-\d{1}$/.test(str); + }, + GT: function GT(str) { + return /^(GT)?\d{7}-\d{1}$/.test(str); + }, + HN: function HN(str) { + return /^(HN)?$/.test(str); + }, + MX: function MX(str) { + return /^(MX)?\w{3,4}\d{6}\w{3}$/.test(str); + }, + NI: function NI(str) { + return /^(NI)?\d{3}-\d{6}-\d{4}\w{1}$/.test(str); + }, + PA: function PA(str) { + return /^(PA)?$/.test(str); + }, + PY: function PY(str) { + return /^(PY)?\d{6,8}-\d{1}$/.test(str); + }, + PE: function PE(str) { + return /^(PE)?\d{11}$/.test(str); + }, + DO: function DO(str) { + return /^(DO)?(\d{11}|(\d{3}-\d{7}-\d{1})|[1,4,5]{1}\d{8}|([1,4,5]{1})-\d{2}-\d{5}-\d{1})$/.test(str); + }, + UY: function UY(str) { + return /^(UY)?\d{12}$/.test(str); + }, + VE: function VE(str) { + return /^(VE)?[J,G,V,E]{1}-(\d{9}|(\d{8}-\d{1}))$/.test(str); + } + }; + function isVAT(str, countryCode) { + (0, _assertString.default)(str); + (0, _assertString.default)(countryCode); + if (countryCode in vatMatchers) { + return vatMatchers[countryCode](str); + } + throw new Error("Invalid country code: '".concat(countryCode, "'")); + } + } +}); + +// ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/index.js +var require_validator = __commonJS({ + "../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/index.js"(exports2, module2) { + "use strict"; + function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + return typeof o2; + } : function(o2) { + return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; + }, _typeof(o); + } + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = void 0; + var _toDate = _interopRequireDefault(require_toDate()); + var _toFloat = _interopRequireDefault(require_toFloat()); + var _toInt = _interopRequireDefault(require_toInt()); + var _toBoolean = _interopRequireDefault(require_toBoolean()); + var _equals = _interopRequireDefault(require_equals()); + var _contains = _interopRequireDefault(require_contains()); + var _matches = _interopRequireDefault(require_matches()); + var _isEmail = _interopRequireDefault(require_isEmail()); + var _isURL = _interopRequireDefault(require_isURL()); + var _isMACAddress = _interopRequireDefault(require_isMACAddress()); + var _isIP = _interopRequireDefault(require_isIP()); + var _isIPRange = _interopRequireDefault(require_isIPRange()); + var _isFQDN = _interopRequireDefault(require_isFQDN()); + var _isDate = _interopRequireDefault(require_isDate()); + var _isTime = _interopRequireDefault(require_isTime()); + var _isBoolean = _interopRequireDefault(require_isBoolean()); + var _isLocale = _interopRequireDefault(require_isLocale()); + var _isAbaRouting = _interopRequireDefault(require_isAbaRouting()); + var _isAlpha = _interopRequireWildcard(require_isAlpha()); + var _isAlphanumeric = _interopRequireWildcard(require_isAlphanumeric()); + var _isNumeric = _interopRequireDefault(require_isNumeric()); + var _isPassportNumber = _interopRequireWildcard(require_isPassportNumber()); + var _isPort = _interopRequireDefault(require_isPort()); + var _isLowercase = _interopRequireDefault(require_isLowercase()); + var _isUppercase = _interopRequireDefault(require_isUppercase()); + var _isIMEI = _interopRequireDefault(require_isIMEI()); + var _isAscii = _interopRequireDefault(require_isAscii()); + var _isFullWidth = _interopRequireDefault(require_isFullWidth()); + var _isHalfWidth = _interopRequireDefault(require_isHalfWidth()); + var _isVariableWidth = _interopRequireDefault(require_isVariableWidth()); + var _isMultibyte = _interopRequireDefault(require_isMultibyte()); + var _isSemVer = _interopRequireDefault(require_isSemVer()); + var _isSurrogatePair = _interopRequireDefault(require_isSurrogatePair()); + var _isInt = _interopRequireDefault(require_isInt()); + var _isFloat = _interopRequireWildcard(require_isFloat()); + var _isDecimal = _interopRequireDefault(require_isDecimal()); + var _isHexadecimal = _interopRequireDefault(require_isHexadecimal()); + var _isOctal = _interopRequireDefault(require_isOctal()); + var _isDivisibleBy = _interopRequireDefault(require_isDivisibleBy()); + var _isHexColor = _interopRequireDefault(require_isHexColor()); + var _isRgbColor = _interopRequireDefault(require_isRgbColor()); + var _isHSL = _interopRequireDefault(require_isHSL()); + var _isISRC = _interopRequireDefault(require_isISRC()); + var _isIBAN = _interopRequireWildcard(require_isIBAN()); + var _isBIC = _interopRequireDefault(require_isBIC()); + var _isMD = _interopRequireDefault(require_isMD5()); + var _isHash = _interopRequireDefault(require_isHash()); + var _isJWT = _interopRequireDefault(require_isJWT()); + var _isJSON = _interopRequireDefault(require_isJSON()); + var _isEmpty = _interopRequireDefault(require_isEmpty()); + var _isLength = _interopRequireDefault(require_isLength()); + var _isByteLength = _interopRequireDefault(require_isByteLength()); + var _isULID = _interopRequireDefault(require_isULID()); + var _isUUID = _interopRequireDefault(require_isUUID()); + var _isMongoId = _interopRequireDefault(require_isMongoId()); + var _isAfter = _interopRequireDefault(require_isAfter()); + var _isBefore = _interopRequireDefault(require_isBefore()); + var _isIn = _interopRequireDefault(require_isIn()); + var _isLuhnNumber = _interopRequireDefault(require_isLuhnNumber()); + var _isCreditCard = _interopRequireDefault(require_isCreditCard()); + var _isIdentityCard = _interopRequireDefault(require_isIdentityCard()); + var _isEAN = _interopRequireDefault(require_isEAN()); + var _isISIN = _interopRequireDefault(require_isISIN()); + var _isISBN = _interopRequireDefault(require_isISBN()); + var _isISSN = _interopRequireDefault(require_isISSN()); + var _isTaxID = _interopRequireDefault(require_isTaxID()); + var _isMobilePhone = _interopRequireWildcard(require_isMobilePhone()); + var _isEthereumAddress = _interopRequireDefault(require_isEthereumAddress()); + var _isCurrency = _interopRequireDefault(require_isCurrency()); + var _isBtcAddress = _interopRequireDefault(require_isBtcAddress()); + var _isISO = require_isISO6346(); + var _isISO2 = _interopRequireDefault(require_isISO6391()); + var _isISO3 = _interopRequireDefault(require_isISO8601()); + var _isRFC = _interopRequireDefault(require_isRFC3339()); + var _isISO4 = _interopRequireDefault(require_isISO15924()); + var _isISO31661Alpha = _interopRequireDefault(require_isISO31661Alpha2()); + var _isISO31661Alpha2 = _interopRequireDefault(require_isISO31661Alpha3()); + var _isISO31661Numeric = _interopRequireDefault(require_isISO31661Numeric()); + var _isISO5 = _interopRequireDefault(require_isISO4217()); + var _isBase = _interopRequireDefault(require_isBase32()); + var _isBase2 = _interopRequireDefault(require_isBase58()); + var _isBase3 = _interopRequireDefault(require_isBase64()); + var _isDataURI = _interopRequireDefault(require_isDataURI()); + var _isMagnetURI = _interopRequireDefault(require_isMagnetURI()); + var _isMailtoURI = _interopRequireDefault(require_isMailtoURI()); + var _isMimeType = _interopRequireDefault(require_isMimeType()); + var _isLatLong = _interopRequireDefault(require_isLatLong()); + var _isPostalCode = _interopRequireWildcard(require_isPostalCode()); + var _ltrim = _interopRequireDefault(require_ltrim()); + var _rtrim = _interopRequireDefault(require_rtrim()); + var _trim = _interopRequireDefault(require_trim()); + var _escape = _interopRequireDefault(require_escape()); + var _unescape = _interopRequireDefault(require_unescape()); + var _stripLow = _interopRequireDefault(require_stripLow()); + var _whitelist = _interopRequireDefault(require_whitelist()); + var _blacklist = _interopRequireDefault(require_blacklist()); + var _isWhitelisted = _interopRequireDefault(require_isWhitelisted()); + var _normalizeEmail = _interopRequireDefault(require_normalizeEmail()); + var _isSlug = _interopRequireDefault(require_isSlug()); + var _isLicensePlate = _interopRequireDefault(require_isLicensePlate()); + var _isStrongPassword = _interopRequireDefault(require_isStrongPassword()); + var _isVAT = _interopRequireDefault(require_isVAT()); + function _interopRequireWildcard(e, t) { + if ("function" == typeof WeakMap) var r = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(); + return (_interopRequireWildcard = function _interopRequireWildcard2(e2, t2) { + if (!t2 && e2 && e2.__esModule) return e2; + var o, i, f = { __proto__: null, default: e2 }; + if (null === e2 || "object" != _typeof(e2) && "function" != typeof e2) return f; + if (o = t2 ? n : r) { + if (o.has(e2)) return o.get(e2); + o.set(e2, f); + } + for (var _t in e2) "default" !== _t && {}.hasOwnProperty.call(e2, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e2, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e2[_t]); + return f; + })(e, t); + } + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var version2 = "13.15.35"; + var validator = { + version: version2, + toDate: _toDate.default, + toFloat: _toFloat.default, + toInt: _toInt.default, + toBoolean: _toBoolean.default, + equals: _equals.default, + contains: _contains.default, + matches: _matches.default, + isEmail: _isEmail.default, + isURL: _isURL.default, + isMACAddress: _isMACAddress.default, + isIP: _isIP.default, + isIPRange: _isIPRange.default, + isFQDN: _isFQDN.default, + isBoolean: _isBoolean.default, + isIBAN: _isIBAN.default, + isBIC: _isBIC.default, + isAbaRouting: _isAbaRouting.default, + isAlpha: _isAlpha.default, + isAlphaLocales: _isAlpha.locales, + isAlphanumeric: _isAlphanumeric.default, + isAlphanumericLocales: _isAlphanumeric.locales, + isNumeric: _isNumeric.default, + isPassportNumber: _isPassportNumber.default, + passportNumberLocales: _isPassportNumber.locales, + isPort: _isPort.default, + isLowercase: _isLowercase.default, + isUppercase: _isUppercase.default, + isAscii: _isAscii.default, + isFullWidth: _isFullWidth.default, + isHalfWidth: _isHalfWidth.default, + isVariableWidth: _isVariableWidth.default, + isMultibyte: _isMultibyte.default, + isSemVer: _isSemVer.default, + isSurrogatePair: _isSurrogatePair.default, + isInt: _isInt.default, + isIMEI: _isIMEI.default, + isFloat: _isFloat.default, + isFloatLocales: _isFloat.locales, + isDecimal: _isDecimal.default, + isHexadecimal: _isHexadecimal.default, + isOctal: _isOctal.default, + isDivisibleBy: _isDivisibleBy.default, + isHexColor: _isHexColor.default, + isRgbColor: _isRgbColor.default, + isHSL: _isHSL.default, + isISRC: _isISRC.default, + isMD5: _isMD.default, + isHash: _isHash.default, + isJWT: _isJWT.default, + isJSON: _isJSON.default, + isEmpty: _isEmpty.default, + isLength: _isLength.default, + isLocale: _isLocale.default, + isByteLength: _isByteLength.default, + isULID: _isULID.default, + isUUID: _isUUID.default, + isMongoId: _isMongoId.default, + isAfter: _isAfter.default, + isBefore: _isBefore.default, + isIn: _isIn.default, + isLuhnNumber: _isLuhnNumber.default, + isCreditCard: _isCreditCard.default, + isIdentityCard: _isIdentityCard.default, + isEAN: _isEAN.default, + isISIN: _isISIN.default, + isISBN: _isISBN.default, + isISSN: _isISSN.default, + isMobilePhone: _isMobilePhone.default, + isMobilePhoneLocales: _isMobilePhone.locales, + isPostalCode: _isPostalCode.default, + isPostalCodeLocales: _isPostalCode.locales, + isEthereumAddress: _isEthereumAddress.default, + isCurrency: _isCurrency.default, + isBtcAddress: _isBtcAddress.default, + isISO6346: _isISO.isISO6346, + isFreightContainerID: _isISO.isFreightContainerID, + isISO6391: _isISO2.default, + isISO8601: _isISO3.default, + isISO15924: _isISO4.default, + isRFC3339: _isRFC.default, + isISO31661Alpha2: _isISO31661Alpha.default, + isISO31661Alpha3: _isISO31661Alpha2.default, + isISO31661Numeric: _isISO31661Numeric.default, + isISO4217: _isISO5.default, + isBase32: _isBase.default, + isBase58: _isBase2.default, + isBase64: _isBase3.default, + isDataURI: _isDataURI.default, + isMagnetURI: _isMagnetURI.default, + isMailtoURI: _isMailtoURI.default, + isMimeType: _isMimeType.default, + isLatLong: _isLatLong.default, + ltrim: _ltrim.default, + rtrim: _rtrim.default, + trim: _trim.default, + escape: _escape.default, + unescape: _unescape.default, + stripLow: _stripLow.default, + whitelist: _whitelist.default, + blacklist: _blacklist.default, + isWhitelisted: _isWhitelisted.default, + normalizeEmail: _normalizeEmail.default, + toString, + isSlug: _isSlug.default, + isStrongPassword: _isStrongPassword.default, + isTaxID: _isTaxID.default, + isDate: _isDate.default, + isTime: _isTime.default, + isLicensePlate: _isLicensePlate.default, + isVAT: _isVAT.default, + ibanLocales: _isIBAN.locales + }; + var _default = exports2.default = validator; + module2.exports = exports2.default; + module2.exports.default = exports2.default; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsStrongPassword.js +var require_IsStrongPassword = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsStrongPassword.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsStrongPassword = exports2.isStrongPassword = exports2.IS_STRONG_PASSWORD = void 0; + var validator = __importStar2(require_validator()); + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_STRONG_PASSWORD = "isStrongPassword"; + function isStrongPassword(value, options) { + return typeof value === "string" && validator.isStrongPassword(value, options); + } + exports2.isStrongPassword = isStrongPassword; + function IsStrongPassword(options, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_STRONG_PASSWORD, + constraints: [options], + validator: { + validate: (value, args) => isStrongPassword(value, args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property is not strong enough", validationOptions) + } + }, validationOptions); + } + exports2.IsStrongPassword = IsStrongPassword; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsTimeZone.js +var require_IsTimeZone = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsTimeZone.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsTimeZone = exports2.isTimeZone = exports2.IS_TIMEZONE = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_TIMEZONE = "isTimeZone"; + function isTimeZone(value) { + try { + if (typeof value !== "string") { + return false; + } + Intl.DateTimeFormat(void 0, { timeZone: value }); + return true; + } catch (exception) { + return false; + } + } + exports2.isTimeZone = isTimeZone; + function IsTimeZone(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_TIMEZONE, + validator: { + validate: (value, args) => isTimeZone(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a valid IANA time-zone", validationOptions) + } + }, validationOptions); + } + exports2.IsTimeZone = IsTimeZone; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsBase58.js +var require_IsBase58 = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/IsBase58.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsBase58 = exports2.isBase58 = exports2.IS_BASE58 = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isBase58_1 = __importDefault2(require_isBase58()); + exports2.IS_BASE58 = "isBase58"; + function isBase58(value) { + return typeof value === "string" && (0, isBase58_1.default)(value); + } + exports2.isBase58 = isBase58; + function IsBase58(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_BASE58, + validator: { + validate: (value, args) => isBase58(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be base58 encoded", validationOptions) + } + }, validationOptions); + } + exports2.IsBase58 = IsBase58; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/is-tax-id.js +var require_is_tax_id = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/is-tax-id.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsTaxId = exports2.isTaxId = exports2.IS_TAX_ID = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isTaxID_1 = __importDefault2(require_isTaxID()); + exports2.IS_TAX_ID = "isTaxId"; + function isTaxId(value, locale) { + return typeof value === "string" && (0, isTaxID_1.default)(value, locale || "en-US"); + } + exports2.isTaxId = isTaxId; + function IsTaxId(locale, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_TAX_ID, + constraints: [locale], + validator: { + validate: (value, args) => isTaxId(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a Tax Identification Number", validationOptions) + } + }, validationOptions); + } + exports2.IsTaxId = IsTaxId; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/is-iso4217-currency-code.js +var require_is_iso4217_currency_code = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/string/is-iso4217-currency-code.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsISO4217CurrencyCode = exports2.isISO4217CurrencyCode = exports2.IS_ISO4217_CURRENCY_CODE = void 0; + var ValidateBy_1 = require_ValidateBy(); + var isISO4217_1 = __importDefault2(require_isISO4217()); + exports2.IS_ISO4217_CURRENCY_CODE = "isISO4217CurrencyCode"; + function isISO4217CurrencyCode(value) { + return typeof value === "string" && (0, isISO4217_1.default)(value); + } + exports2.isISO4217CurrencyCode = isISO4217CurrencyCode; + function IsISO4217CurrencyCode(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_ISO4217_CURRENCY_CODE, + validator: { + validate: (value, args) => isISO4217CurrencyCode(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a valid ISO4217 currency code", validationOptions) + } + }, validationOptions); + } + exports2.IsISO4217CurrencyCode = IsISO4217CurrencyCode; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/typechecker/IsBoolean.js +var require_IsBoolean = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/typechecker/IsBoolean.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsBoolean = exports2.isBoolean = exports2.IS_BOOLEAN = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_BOOLEAN = "isBoolean"; + function isBoolean(value) { + return value instanceof Boolean || typeof value === "boolean"; + } + exports2.isBoolean = isBoolean; + function IsBoolean(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_BOOLEAN, + validator: { + validate: (value, args) => isBoolean(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a boolean value", validationOptions) + } + }, validationOptions); + } + exports2.IsBoolean = IsBoolean; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/typechecker/IsDate.js +var require_IsDate = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/typechecker/IsDate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsDate = exports2.isDate = exports2.IS_DATE = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_DATE = "isDate"; + function isDate(value) { + return value instanceof Date && !isNaN(value.getTime()); + } + exports2.isDate = isDate; + function IsDate(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_DATE, + validator: { + validate: (value, args) => isDate(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a Date instance", validationOptions) + } + }, validationOptions); + } + exports2.IsDate = IsDate; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/typechecker/IsNumber.js +var require_IsNumber = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/typechecker/IsNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsNumber = exports2.isNumber = exports2.IS_NUMBER = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_NUMBER = "isNumber"; + function isNumber(value, options = {}) { + if (typeof value !== "number") { + return false; + } + if (value === Infinity || value === -Infinity) { + return !!options.allowInfinity; + } + if (Number.isNaN(value)) { + return !!options.allowNaN; + } + if (options.maxDecimalPlaces !== void 0) { + let decimalPlaces = 0; + if (value % 1 !== 0) { + decimalPlaces = value.toString().split(".")[1].length; + } + if (decimalPlaces > options.maxDecimalPlaces) { + return false; + } + } + return Number.isFinite(value); + } + exports2.isNumber = isNumber; + function IsNumber(options = {}, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_NUMBER, + constraints: [options], + validator: { + validate: (value, args) => isNumber(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a number conforming to the specified constraints", validationOptions) + } + }, validationOptions); + } + exports2.IsNumber = IsNumber; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/typechecker/IsEnum.js +var require_IsEnum = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/typechecker/IsEnum.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsEnum = exports2.isEnum = exports2.IS_ENUM = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_ENUM = "isEnum"; + function isEnum(value, entity) { + const enumValues = Object.keys(entity).map((k) => entity[k]); + return enumValues.includes(value); + } + exports2.isEnum = isEnum; + function validEnumValues(entity) { + return Object.entries(entity).filter(([key, value]) => isNaN(parseInt(key))).map(([key, value]) => value); + } + function IsEnum(entity, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_ENUM, + constraints: [entity, validEnumValues(entity)], + validator: { + validate: (value, args) => isEnum(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be one of the following values: $constraint2", validationOptions) + } + }, validationOptions); + } + exports2.IsEnum = IsEnum; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/typechecker/IsInt.js +var require_IsInt = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/typechecker/IsInt.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsInt = exports2.isInt = exports2.IS_INT = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_INT = "isInt"; + function isInt(val) { + return typeof val === "number" && Number.isInteger(val); + } + exports2.isInt = isInt; + function IsInt(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_INT, + validator: { + validate: (value, args) => isInt(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be an integer number", validationOptions) + } + }, validationOptions); + } + exports2.IsInt = IsInt; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/typechecker/IsString.js +var require_IsString = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/typechecker/IsString.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsString = exports2.isString = exports2.IS_STRING = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_STRING = "isString"; + function isString(value) { + return value instanceof String || typeof value === "string"; + } + exports2.isString = isString; + function IsString(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_STRING, + validator: { + validate: (value, args) => isString(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a string", validationOptions) + } + }, validationOptions); + } + exports2.IsString = IsString; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/typechecker/IsArray.js +var require_IsArray = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/typechecker/IsArray.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsArray = exports2.isArray = exports2.IS_ARRAY = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_ARRAY = "isArray"; + function isArray(value) { + return Array.isArray(value); + } + exports2.isArray = isArray; + function IsArray(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_ARRAY, + validator: { + validate: (value, args) => isArray(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be an array", validationOptions) + } + }, validationOptions); + } + exports2.IsArray = IsArray; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/typechecker/IsObject.js +var require_IsObject = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/typechecker/IsObject.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsObject = exports2.isObject = exports2.IS_OBJECT = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_OBJECT = "isObject"; + function isObject2(value) { + return value != null && (typeof value === "object" || typeof value === "function") && !Array.isArray(value); + } + exports2.isObject = isObject2; + function IsObject(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_OBJECT, + validator: { + validate: (value, args) => isObject2(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be an object", validationOptions) + } + }, validationOptions); + } + exports2.IsObject = IsObject; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/array/ArrayContains.js +var require_ArrayContains = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/array/ArrayContains.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ArrayContains = exports2.arrayContains = exports2.ARRAY_CONTAINS = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.ARRAY_CONTAINS = "arrayContains"; + function arrayContains(array, values) { + if (!Array.isArray(array)) + return false; + return values.every((value) => array.indexOf(value) !== -1); + } + exports2.arrayContains = arrayContains; + function ArrayContains(values, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.ARRAY_CONTAINS, + constraints: [values], + validator: { + validate: (value, args) => arrayContains(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must contain $constraint1 values", validationOptions) + } + }, validationOptions); + } + exports2.ArrayContains = ArrayContains; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/array/ArrayNotContains.js +var require_ArrayNotContains = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/array/ArrayNotContains.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ArrayNotContains = exports2.arrayNotContains = exports2.ARRAY_NOT_CONTAINS = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.ARRAY_NOT_CONTAINS = "arrayNotContains"; + function arrayNotContains(array, values) { + if (!Array.isArray(array)) + return false; + return values.every((value) => array.indexOf(value) === -1); + } + exports2.arrayNotContains = arrayNotContains; + function ArrayNotContains(values, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.ARRAY_NOT_CONTAINS, + constraints: [values], + validator: { + validate: (value, args) => arrayNotContains(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property should not contain $constraint1 values", validationOptions) + } + }, validationOptions); + } + exports2.ArrayNotContains = ArrayNotContains; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/array/ArrayNotEmpty.js +var require_ArrayNotEmpty = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/array/ArrayNotEmpty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ArrayNotEmpty = exports2.arrayNotEmpty = exports2.ARRAY_NOT_EMPTY = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.ARRAY_NOT_EMPTY = "arrayNotEmpty"; + function arrayNotEmpty(array) { + return Array.isArray(array) && array.length > 0; + } + exports2.arrayNotEmpty = arrayNotEmpty; + function ArrayNotEmpty(validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.ARRAY_NOT_EMPTY, + validator: { + validate: (value, args) => arrayNotEmpty(value), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property should not be empty", validationOptions) + } + }, validationOptions); + } + exports2.ArrayNotEmpty = ArrayNotEmpty; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/array/ArrayMinSize.js +var require_ArrayMinSize = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/array/ArrayMinSize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ArrayMinSize = exports2.arrayMinSize = exports2.ARRAY_MIN_SIZE = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.ARRAY_MIN_SIZE = "arrayMinSize"; + function arrayMinSize(array, min) { + return Array.isArray(array) && array.length >= min; + } + exports2.arrayMinSize = arrayMinSize; + function ArrayMinSize(min, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.ARRAY_MIN_SIZE, + constraints: [min], + validator: { + validate: (value, args) => arrayMinSize(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must contain at least $constraint1 elements", validationOptions) + } + }, validationOptions); + } + exports2.ArrayMinSize = ArrayMinSize; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/array/ArrayMaxSize.js +var require_ArrayMaxSize = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/array/ArrayMaxSize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ArrayMaxSize = exports2.arrayMaxSize = exports2.ARRAY_MAX_SIZE = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.ARRAY_MAX_SIZE = "arrayMaxSize"; + function arrayMaxSize(array, max) { + return Array.isArray(array) && array.length <= max; + } + exports2.arrayMaxSize = arrayMaxSize; + function ArrayMaxSize(max, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.ARRAY_MAX_SIZE, + constraints: [max], + validator: { + validate: (value, args) => arrayMaxSize(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must contain no more than $constraint1 elements", validationOptions) + } + }, validationOptions); + } + exports2.ArrayMaxSize = ArrayMaxSize; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/array/ArrayUnique.js +var require_ArrayUnique = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/array/ArrayUnique.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ArrayUnique = exports2.arrayUnique = exports2.ARRAY_UNIQUE = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.ARRAY_UNIQUE = "arrayUnique"; + function arrayUnique(array, identifier) { + if (!Array.isArray(array)) + return false; + if (identifier) { + array = array.map((o) => o != null ? identifier(o) : o); + } + const uniqueItems = array.filter((a, b, c) => c.indexOf(a) === b); + return array.length === uniqueItems.length; + } + exports2.arrayUnique = arrayUnique; + function ArrayUnique(identifierOrOptions, validationOptions) { + const identifier = typeof identifierOrOptions === "function" ? identifierOrOptions : void 0; + const options = typeof identifierOrOptions !== "function" ? identifierOrOptions : validationOptions; + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.ARRAY_UNIQUE, + validator: { + validate: (value, args) => arrayUnique(value, identifier), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "All $property's elements must be unique", options) + } + }, options); + } + exports2.ArrayUnique = ArrayUnique; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/object/IsNotEmptyObject.js +var require_IsNotEmptyObject = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/object/IsNotEmptyObject.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsNotEmptyObject = exports2.isNotEmptyObject = exports2.IS_NOT_EMPTY_OBJECT = void 0; + var ValidateBy_1 = require_ValidateBy(); + var IsObject_1 = require_IsObject(); + exports2.IS_NOT_EMPTY_OBJECT = "isNotEmptyObject"; + function isNotEmptyObject(value, options) { + if (!(0, IsObject_1.isObject)(value)) { + return false; + } + if ((options === null || options === void 0 ? void 0 : options.nullable) === false) { + return !Object.values(value).every((propertyValue) => propertyValue === null || propertyValue === void 0); + } + for (const key in value) { + if (value.hasOwnProperty(key)) { + return true; + } + } + return false; + } + exports2.isNotEmptyObject = isNotEmptyObject; + function IsNotEmptyObject(options, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_NOT_EMPTY_OBJECT, + constraints: [options], + validator: { + validate: (value, args) => isNotEmptyObject(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a non-empty object", validationOptions) + } + }, validationOptions); + } + exports2.IsNotEmptyObject = IsNotEmptyObject; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/object/IsInstance.js +var require_IsInstance = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/object/IsInstance.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IsInstance = exports2.isInstance = exports2.IS_INSTANCE = void 0; + var ValidateBy_1 = require_ValidateBy(); + exports2.IS_INSTANCE = "isInstance"; + function isInstance(object, targetTypeConstructor) { + return targetTypeConstructor && typeof targetTypeConstructor === "function" && object instanceof targetTypeConstructor; + } + exports2.isInstance = isInstance; + function IsInstance(targetType, validationOptions) { + return (0, ValidateBy_1.ValidateBy)({ + name: exports2.IS_INSTANCE, + constraints: [targetType], + validator: { + validate: (value, args) => isInstance(value, args === null || args === void 0 ? void 0 : args.constraints[0]), + defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix, args) => { + if (args === null || args === void 0 ? void 0 : args.constraints[0]) { + return eachPrefix + `$property must be an instance of ${args === null || args === void 0 ? void 0 : args.constraints[0].name}`; + } else { + return eachPrefix + `${exports2.IS_INSTANCE} decorator expects and object as value, but got falsy value.`; + } + }, validationOptions) + } + }, validationOptions); + } + exports2.IsInstance = IsInstance; + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/decorators.js +var require_decorators2 = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/decorator/decorators.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_Allow(), exports2); + __exportStar2(require_IsDefined(), exports2); + __exportStar2(require_IsOptional(), exports2); + __exportStar2(require_Validate(), exports2); + __exportStar2(require_ValidateBy(), exports2); + __exportStar2(require_ValidateIf(), exports2); + __exportStar2(require_ValidateNested(), exports2); + __exportStar2(require_ValidatePromise(), exports2); + __exportStar2(require_IsLatLong(), exports2); + __exportStar2(require_IsLatitude(), exports2); + __exportStar2(require_IsLongitude(), exports2); + __exportStar2(require_Equals(), exports2); + __exportStar2(require_NotEquals(), exports2); + __exportStar2(require_IsEmpty(), exports2); + __exportStar2(require_IsNotEmpty(), exports2); + __exportStar2(require_IsIn(), exports2); + __exportStar2(require_IsNotIn(), exports2); + __exportStar2(require_IsDivisibleBy(), exports2); + __exportStar2(require_IsPositive(), exports2); + __exportStar2(require_IsNegative(), exports2); + __exportStar2(require_Max(), exports2); + __exportStar2(require_Min(), exports2); + __exportStar2(require_MinDate(), exports2); + __exportStar2(require_MaxDate(), exports2); + __exportStar2(require_Contains(), exports2); + __exportStar2(require_NotContains(), exports2); + __exportStar2(require_IsAlpha(), exports2); + __exportStar2(require_IsAlphanumeric(), exports2); + __exportStar2(require_IsDecimal(), exports2); + __exportStar2(require_IsAscii(), exports2); + __exportStar2(require_IsBase64(), exports2); + __exportStar2(require_IsByteLength(), exports2); + __exportStar2(require_IsCreditCard(), exports2); + __exportStar2(require_IsCurrency(), exports2); + __exportStar2(require_IsEmail(), exports2); + __exportStar2(require_IsFQDN(), exports2); + __exportStar2(require_IsFullWidth(), exports2); + __exportStar2(require_IsHalfWidth(), exports2); + __exportStar2(require_IsVariableWidth(), exports2); + __exportStar2(require_IsHexColor(), exports2); + __exportStar2(require_IsHexadecimal(), exports2); + __exportStar2(require_IsMacAddress(), exports2); + __exportStar2(require_IsIP(), exports2); + __exportStar2(require_IsPort(), exports2); + __exportStar2(require_IsISBN(), exports2); + __exportStar2(require_IsISIN(), exports2); + __exportStar2(require_IsISO8601(), exports2); + __exportStar2(require_IsJSON(), exports2); + __exportStar2(require_IsJWT(), exports2); + __exportStar2(require_IsLowercase(), exports2); + __exportStar2(require_IsMobilePhone(), exports2); + __exportStar2(require_IsISO31661Alpha2(), exports2); + __exportStar2(require_IsISO31661Alpha3(), exports2); + __exportStar2(require_IsMongoId(), exports2); + __exportStar2(require_IsMultibyte(), exports2); + __exportStar2(require_IsSurrogatePair(), exports2); + __exportStar2(require_IsUrl(), exports2); + __exportStar2(require_IsUUID(), exports2); + __exportStar2(require_IsFirebasePushId(), exports2); + __exportStar2(require_IsUppercase(), exports2); + __exportStar2(require_Length(), exports2); + __exportStar2(require_MaxLength(), exports2); + __exportStar2(require_MinLength(), exports2); + __exportStar2(require_Matches(), exports2); + __exportStar2(require_IsPhoneNumber(), exports2); + __exportStar2(require_IsMilitaryTime(), exports2); + __exportStar2(require_IsHash(), exports2); + __exportStar2(require_IsISSN(), exports2); + __exportStar2(require_IsDateString(), exports2); + __exportStar2(require_IsBooleanString(), exports2); + __exportStar2(require_IsNumberString(), exports2); + __exportStar2(require_IsBase32(), exports2); + __exportStar2(require_IsBIC(), exports2); + __exportStar2(require_IsBtcAddress(), exports2); + __exportStar2(require_IsDataURI(), exports2); + __exportStar2(require_IsEAN(), exports2); + __exportStar2(require_IsEthereumAddress(), exports2); + __exportStar2(require_IsHSL(), exports2); + __exportStar2(require_IsIBAN(), exports2); + __exportStar2(require_IsIdentityCard(), exports2); + __exportStar2(require_IsISRC(), exports2); + __exportStar2(require_IsLocale(), exports2); + __exportStar2(require_IsMagnetURI(), exports2); + __exportStar2(require_IsMimeType(), exports2); + __exportStar2(require_IsOctal(), exports2); + __exportStar2(require_IsPassportNumber(), exports2); + __exportStar2(require_IsPostalCode(), exports2); + __exportStar2(require_IsRFC3339(), exports2); + __exportStar2(require_IsRgbColor(), exports2); + __exportStar2(require_IsSemVer(), exports2); + __exportStar2(require_IsStrongPassword(), exports2); + __exportStar2(require_IsTimeZone(), exports2); + __exportStar2(require_IsBase58(), exports2); + __exportStar2(require_is_tax_id(), exports2); + __exportStar2(require_is_iso4217_currency_code(), exports2); + __exportStar2(require_IsBoolean(), exports2); + __exportStar2(require_IsDate(), exports2); + __exportStar2(require_IsNumber(), exports2); + __exportStar2(require_IsEnum(), exports2); + __exportStar2(require_IsInt(), exports2); + __exportStar2(require_IsString(), exports2); + __exportStar2(require_IsArray(), exports2); + __exportStar2(require_IsObject(), exports2); + __exportStar2(require_ArrayContains(), exports2); + __exportStar2(require_ArrayNotContains(), exports2); + __exportStar2(require_ArrayNotEmpty(), exports2); + __exportStar2(require_ArrayMinSize(), exports2); + __exportStar2(require_ArrayMaxSize(), exports2); + __exportStar2(require_ArrayUnique(), exports2); + __exportStar2(require_IsNotEmptyObject(), exports2); + __exportStar2(require_IsInstance(), exports2); + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation/ValidatorConstraintInterface.js +var require_ValidatorConstraintInterface = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation/ValidatorConstraintInterface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation/ValidatorOptions.js +var require_ValidatorOptions = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation/ValidatorOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation/ValidationArguments.js +var require_ValidationArguments = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation/ValidationArguments.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation-schema/ValidationSchema.js +var require_ValidationSchema = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/validation-schema/ValidationSchema.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/index.js +var require_cjs = __commonJS({ + "../../node_modules/.pnpm/class-validator@0.14.4/node_modules/class-validator/cjs/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.registerSchema = exports2.validateSync = exports2.validateOrReject = exports2.validate = void 0; + var MetadataStorage_1 = require_MetadataStorage(); + var Validator_1 = require_Validator(); + var container_1 = require_container(); + __exportStar2(require_container(), exports2); + __exportStar2(require_decorators2(), exports2); + __exportStar2(require_ValidationOptions(), exports2); + __exportStar2(require_ValidatorConstraintInterface(), exports2); + __exportStar2(require_ValidationError(), exports2); + __exportStar2(require_ValidatorOptions(), exports2); + __exportStar2(require_ValidationArguments(), exports2); + __exportStar2(require_ValidationTypes(), exports2); + __exportStar2(require_Validator(), exports2); + __exportStar2(require_ValidationSchema(), exports2); + __exportStar2(require_register_decorator(), exports2); + __exportStar2(require_MetadataStorage(), exports2); + function validate2(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { + if (typeof schemaNameOrObject === "string") { + return (0, container_1.getFromContainer)(Validator_1.Validator).validate(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions); + } else { + return (0, container_1.getFromContainer)(Validator_1.Validator).validate(schemaNameOrObject, objectOrValidationOptions); + } + } + exports2.validate = validate2; + function validateOrReject(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { + if (typeof schemaNameOrObject === "string") { + return (0, container_1.getFromContainer)(Validator_1.Validator).validateOrReject(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions); + } else { + return (0, container_1.getFromContainer)(Validator_1.Validator).validateOrReject(schemaNameOrObject, objectOrValidationOptions); + } + } + exports2.validateOrReject = validateOrReject; + function validateSync(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { + if (typeof schemaNameOrObject === "string") { + return (0, container_1.getFromContainer)(Validator_1.Validator).validateSync(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions); + } else { + return (0, container_1.getFromContainer)(Validator_1.Validator).validateSync(schemaNameOrObject, objectOrValidationOptions); + } + } + exports2.validateSync = validateSync; + function registerSchema(schema) { + (0, MetadataStorage_1.getMetadataStorage)().addValidationSchema(schema); + } + exports2.registerSchema = registerSchema; + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/enums/transformation-type.enum.js +var require_transformation_type_enum = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/enums/transformation-type.enum.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TransformationType = void 0; + var TransformationType; + (function(TransformationType2) { + TransformationType2[TransformationType2["PLAIN_TO_CLASS"] = 0] = "PLAIN_TO_CLASS"; + TransformationType2[TransformationType2["CLASS_TO_PLAIN"] = 1] = "CLASS_TO_PLAIN"; + TransformationType2[TransformationType2["CLASS_TO_CLASS"] = 2] = "CLASS_TO_CLASS"; + })(TransformationType = exports2.TransformationType || (exports2.TransformationType = {})); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/enums/index.js +var require_enums2 = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/enums/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_transformation_type_enum(), exports2); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/MetadataStorage.js +var require_MetadataStorage2 = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/MetadataStorage.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MetadataStorage = void 0; + var enums_1 = require_enums2(); + var MetadataStorage = class { + constructor() { + this._typeMetadatas = /* @__PURE__ */ new Map(); + this._transformMetadatas = /* @__PURE__ */ new Map(); + this._exposeMetadatas = /* @__PURE__ */ new Map(); + this._excludeMetadatas = /* @__PURE__ */ new Map(); + this._ancestorsMap = /* @__PURE__ */ new Map(); + } + // ------------------------------------------------------------------------- + // Adder Methods + // ------------------------------------------------------------------------- + addTypeMetadata(metadata) { + if (!this._typeMetadatas.has(metadata.target)) { + this._typeMetadatas.set(metadata.target, /* @__PURE__ */ new Map()); + } + this._typeMetadatas.get(metadata.target).set(metadata.propertyName, metadata); + } + addTransformMetadata(metadata) { + if (!this._transformMetadatas.has(metadata.target)) { + this._transformMetadatas.set(metadata.target, /* @__PURE__ */ new Map()); + } + if (!this._transformMetadatas.get(metadata.target).has(metadata.propertyName)) { + this._transformMetadatas.get(metadata.target).set(metadata.propertyName, []); + } + this._transformMetadatas.get(metadata.target).get(metadata.propertyName).push(metadata); + } + addExposeMetadata(metadata) { + if (!this._exposeMetadatas.has(metadata.target)) { + this._exposeMetadatas.set(metadata.target, /* @__PURE__ */ new Map()); + } + this._exposeMetadatas.get(metadata.target).set(metadata.propertyName, metadata); + } + addExcludeMetadata(metadata) { + if (!this._excludeMetadatas.has(metadata.target)) { + this._excludeMetadatas.set(metadata.target, /* @__PURE__ */ new Map()); + } + this._excludeMetadatas.get(metadata.target).set(metadata.propertyName, metadata); + } + // ------------------------------------------------------------------------- + // Public Methods + // ------------------------------------------------------------------------- + findTransformMetadatas(target, propertyName, transformationType) { + return this.findMetadatas(this._transformMetadatas, target, propertyName).filter((metadata) => { + if (!metadata.options) + return true; + if (metadata.options.toClassOnly === true && metadata.options.toPlainOnly === true) + return true; + if (metadata.options.toClassOnly === true) { + return transformationType === enums_1.TransformationType.CLASS_TO_CLASS || transformationType === enums_1.TransformationType.PLAIN_TO_CLASS; + } + if (metadata.options.toPlainOnly === true) { + return transformationType === enums_1.TransformationType.CLASS_TO_PLAIN; + } + return true; + }); + } + findExcludeMetadata(target, propertyName) { + return this.findMetadata(this._excludeMetadatas, target, propertyName); + } + findExposeMetadata(target, propertyName) { + return this.findMetadata(this._exposeMetadatas, target, propertyName); + } + findExposeMetadataByCustomName(target, name) { + return this.getExposedMetadatas(target).find((metadata) => { + return metadata.options && metadata.options.name === name; + }); + } + findTypeMetadata(target, propertyName) { + return this.findMetadata(this._typeMetadatas, target, propertyName); + } + getStrategy(target) { + const excludeMap = this._excludeMetadatas.get(target); + const exclude = excludeMap && excludeMap.get(void 0); + const exposeMap = this._exposeMetadatas.get(target); + const expose = exposeMap && exposeMap.get(void 0); + if (exclude && expose || !exclude && !expose) + return "none"; + return exclude ? "excludeAll" : "exposeAll"; + } + getExposedMetadatas(target) { + return this.getMetadata(this._exposeMetadatas, target); + } + getExcludedMetadatas(target) { + return this.getMetadata(this._excludeMetadatas, target); + } + getExposedProperties(target, transformationType) { + return this.getExposedMetadatas(target).filter((metadata) => { + if (!metadata.options) + return true; + if (metadata.options.toClassOnly === true && metadata.options.toPlainOnly === true) + return true; + if (metadata.options.toClassOnly === true) { + return transformationType === enums_1.TransformationType.CLASS_TO_CLASS || transformationType === enums_1.TransformationType.PLAIN_TO_CLASS; + } + if (metadata.options.toPlainOnly === true) { + return transformationType === enums_1.TransformationType.CLASS_TO_PLAIN; + } + return true; + }).map((metadata) => metadata.propertyName); + } + getExcludedProperties(target, transformationType) { + return this.getExcludedMetadatas(target).filter((metadata) => { + if (!metadata.options) + return true; + if (metadata.options.toClassOnly === true && metadata.options.toPlainOnly === true) + return true; + if (metadata.options.toClassOnly === true) { + return transformationType === enums_1.TransformationType.CLASS_TO_CLASS || transformationType === enums_1.TransformationType.PLAIN_TO_CLASS; + } + if (metadata.options.toPlainOnly === true) { + return transformationType === enums_1.TransformationType.CLASS_TO_PLAIN; + } + return true; + }).map((metadata) => metadata.propertyName); + } + clear() { + this._typeMetadatas.clear(); + this._exposeMetadatas.clear(); + this._excludeMetadatas.clear(); + this._ancestorsMap.clear(); + } + // ------------------------------------------------------------------------- + // Private Methods + // ------------------------------------------------------------------------- + getMetadata(metadatas, target) { + const metadataFromTargetMap = metadatas.get(target); + let metadataFromTarget; + if (metadataFromTargetMap) { + metadataFromTarget = Array.from(metadataFromTargetMap.values()).filter((meta) => meta.propertyName !== void 0); + } + const metadataFromAncestors = []; + for (const ancestor of this.getAncestors(target)) { + const ancestorMetadataMap = metadatas.get(ancestor); + if (ancestorMetadataMap) { + const metadataFromAncestor = Array.from(ancestorMetadataMap.values()).filter((meta) => meta.propertyName !== void 0); + metadataFromAncestors.push(...metadataFromAncestor); + } + } + return metadataFromAncestors.concat(metadataFromTarget || []); + } + findMetadata(metadatas, target, propertyName) { + const metadataFromTargetMap = metadatas.get(target); + if (metadataFromTargetMap) { + const metadataFromTarget = metadataFromTargetMap.get(propertyName); + if (metadataFromTarget) { + return metadataFromTarget; + } + } + for (const ancestor of this.getAncestors(target)) { + const ancestorMetadataMap = metadatas.get(ancestor); + if (ancestorMetadataMap) { + const ancestorResult = ancestorMetadataMap.get(propertyName); + if (ancestorResult) { + return ancestorResult; + } + } + } + return void 0; + } + findMetadatas(metadatas, target, propertyName) { + const metadataFromTargetMap = metadatas.get(target); + let metadataFromTarget; + if (metadataFromTargetMap) { + metadataFromTarget = metadataFromTargetMap.get(propertyName); + } + const metadataFromAncestorsTarget = []; + for (const ancestor of this.getAncestors(target)) { + const ancestorMetadataMap = metadatas.get(ancestor); + if (ancestorMetadataMap) { + if (ancestorMetadataMap.has(propertyName)) { + metadataFromAncestorsTarget.push(...ancestorMetadataMap.get(propertyName)); + } + } + } + return metadataFromAncestorsTarget.slice().reverse().concat((metadataFromTarget || []).slice().reverse()); + } + getAncestors(target) { + if (!target) + return []; + if (!this._ancestorsMap.has(target)) { + const ancestors = []; + for (let baseClass = Object.getPrototypeOf(target.prototype.constructor); typeof baseClass.prototype !== "undefined"; baseClass = Object.getPrototypeOf(baseClass.prototype.constructor)) { + ancestors.push(baseClass); + } + this._ancestorsMap.set(target, ancestors); + } + return this._ancestorsMap.get(target); + } + }; + exports2.MetadataStorage = MetadataStorage; + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/storage.js +var require_storage = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/storage.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultMetadataStorage = void 0; + var MetadataStorage_1 = require_MetadataStorage2(); + exports2.defaultMetadataStorage = new MetadataStorage_1.MetadataStorage(); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/utils/get-global.util.js +var require_get_global_util2 = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/utils/get-global.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getGlobal = void 0; + function getGlobal() { + if (typeof globalThis !== "undefined") { + return globalThis; + } + if (typeof global !== "undefined") { + return global; + } + if (typeof window !== "undefined") { + return window; + } + if (typeof self !== "undefined") { + return self; + } + } + exports2.getGlobal = getGlobal; + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/utils/is-promise.util.js +var require_is_promise_util2 = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/utils/is-promise.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isPromise = void 0; + function isPromise(p) { + return p !== null && typeof p === "object" && typeof p.then === "function"; + } + exports2.isPromise = isPromise; + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/utils/index.js +var require_utils5 = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/utils/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_get_global_util2(), exports2); + __exportStar2(require_is_promise_util2(), exports2); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/TransformOperationExecutor.js +var require_TransformOperationExecutor = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/TransformOperationExecutor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TransformOperationExecutor = void 0; + var storage_1 = require_storage(); + var enums_1 = require_enums2(); + var utils_1 = require_utils5(); + function instantiateArrayType(arrayType) { + const array = new arrayType(); + if (!(array instanceof Set) && !("push" in array)) { + return []; + } + return array; + } + var TransformOperationExecutor = class { + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + constructor(transformationType, options) { + this.transformationType = transformationType; + this.options = options; + this.recursionStack = /* @__PURE__ */ new Set(); + } + // ------------------------------------------------------------------------- + // Public Methods + // ------------------------------------------------------------------------- + transform(source, value, targetType, arrayType, isMap, level = 0) { + if (Array.isArray(value) || value instanceof Set) { + const newValue = arrayType && this.transformationType === enums_1.TransformationType.PLAIN_TO_CLASS ? instantiateArrayType(arrayType) : []; + value.forEach((subValue, index) => { + const subSource = source ? source[index] : void 0; + if (!this.options.enableCircularCheck || !this.isCircular(subValue)) { + let realTargetType; + if (typeof targetType !== "function" && targetType && targetType.options && targetType.options.discriminator && targetType.options.discriminator.property && targetType.options.discriminator.subTypes) { + if (this.transformationType === enums_1.TransformationType.PLAIN_TO_CLASS) { + realTargetType = targetType.options.discriminator.subTypes.find((subType) => subType.name === subValue[targetType.options.discriminator.property]); + const options = { newObject: newValue, object: subValue, property: void 0 }; + const newType = targetType.typeFunction(options); + realTargetType === void 0 ? realTargetType = newType : realTargetType = realTargetType.value; + if (!targetType.options.keepDiscriminatorProperty) + delete subValue[targetType.options.discriminator.property]; + } + if (this.transformationType === enums_1.TransformationType.CLASS_TO_CLASS) { + realTargetType = subValue.constructor; + } + if (this.transformationType === enums_1.TransformationType.CLASS_TO_PLAIN) { + subValue[targetType.options.discriminator.property] = targetType.options.discriminator.subTypes.find((subType) => subType.value === subValue.constructor).name; + } + } else { + realTargetType = targetType; + } + const value2 = this.transform(subSource, subValue, realTargetType, void 0, subValue instanceof Map, level + 1); + if (newValue instanceof Set) { + newValue.add(value2); + } else { + newValue.push(value2); + } + } else if (this.transformationType === enums_1.TransformationType.CLASS_TO_CLASS) { + if (newValue instanceof Set) { + newValue.add(subValue); + } else { + newValue.push(subValue); + } + } + }); + return newValue; + } else if (targetType === String && !isMap) { + if (value === null || value === void 0) + return value; + return String(value); + } else if (targetType === Number && !isMap) { + if (value === null || value === void 0) + return value; + return Number(value); + } else if (targetType === Boolean && !isMap) { + if (value === null || value === void 0) + return value; + return Boolean(value); + } else if ((targetType === Date || value instanceof Date) && !isMap) { + if (value instanceof Date) { + return new Date(value.valueOf()); + } + if (value === null || value === void 0) + return value; + return new Date(value); + } else if (!!(0, utils_1.getGlobal)().Buffer && (targetType === Buffer || value instanceof Buffer) && !isMap) { + if (value === null || value === void 0) + return value; + return Buffer.from(value); + } else if ((0, utils_1.isPromise)(value) && !isMap) { + return new Promise((resolve, reject) => { + value.then((data) => resolve(this.transform(void 0, data, targetType, void 0, void 0, level + 1)), reject); + }); + } else if (!isMap && value !== null && typeof value === "object" && typeof value.then === "function") { + return value; + } else if (typeof value === "object" && value !== null) { + if (!targetType && value.constructor !== Object) + if (!Array.isArray(value) && value.constructor === Array) { + } else { + targetType = value.constructor; + } + if (!targetType && source) + targetType = source.constructor; + if (this.options.enableCircularCheck) { + this.recursionStack.add(value); + } + const keys = this.getKeys(targetType, value, isMap); + let newValue = source ? source : {}; + if (!source && (this.transformationType === enums_1.TransformationType.PLAIN_TO_CLASS || this.transformationType === enums_1.TransformationType.CLASS_TO_CLASS)) { + if (isMap) { + newValue = /* @__PURE__ */ new Map(); + } else if (targetType) { + newValue = new targetType(); + } else { + newValue = {}; + } + } + for (const key of keys) { + if (key === "__proto__" || key === "constructor") { + continue; + } + const valueKey = key; + let newValueKey = key, propertyName = key; + if (!this.options.ignoreDecorators && targetType) { + if (this.transformationType === enums_1.TransformationType.PLAIN_TO_CLASS) { + const exposeMetadata = storage_1.defaultMetadataStorage.findExposeMetadataByCustomName(targetType, key); + if (exposeMetadata) { + propertyName = exposeMetadata.propertyName; + newValueKey = exposeMetadata.propertyName; + } + } else if (this.transformationType === enums_1.TransformationType.CLASS_TO_PLAIN || this.transformationType === enums_1.TransformationType.CLASS_TO_CLASS) { + const exposeMetadata = storage_1.defaultMetadataStorage.findExposeMetadata(targetType, key); + if (exposeMetadata && exposeMetadata.options && exposeMetadata.options.name) { + newValueKey = exposeMetadata.options.name; + } + } + } + let subValue = void 0; + if (this.transformationType === enums_1.TransformationType.PLAIN_TO_CLASS) { + subValue = value[valueKey]; + } else { + if (value instanceof Map) { + subValue = value.get(valueKey); + } else if (value[valueKey] instanceof Function) { + subValue = value[valueKey](); + } else { + subValue = value[valueKey]; + } + } + let type = void 0, isSubValueMap = subValue instanceof Map; + if (targetType && isMap) { + type = targetType; + } else if (targetType) { + const metadata = storage_1.defaultMetadataStorage.findTypeMetadata(targetType, propertyName); + if (metadata) { + const options = { newObject: newValue, object: value, property: propertyName }; + const newType = metadata.typeFunction ? metadata.typeFunction(options) : metadata.reflectedType; + if (metadata.options && metadata.options.discriminator && metadata.options.discriminator.property && metadata.options.discriminator.subTypes) { + if (!(value[valueKey] instanceof Array)) { + if (this.transformationType === enums_1.TransformationType.PLAIN_TO_CLASS) { + type = metadata.options.discriminator.subTypes.find((subType) => { + if (subValue && subValue instanceof Object && metadata.options.discriminator.property in subValue) { + return subType.name === subValue[metadata.options.discriminator.property]; + } + }); + type === void 0 ? type = newType : type = type.value; + if (!metadata.options.keepDiscriminatorProperty) { + if (subValue && subValue instanceof Object && metadata.options.discriminator.property in subValue) { + delete subValue[metadata.options.discriminator.property]; + } + } + } + if (this.transformationType === enums_1.TransformationType.CLASS_TO_CLASS) { + type = subValue.constructor; + } + if (this.transformationType === enums_1.TransformationType.CLASS_TO_PLAIN) { + if (subValue) { + subValue[metadata.options.discriminator.property] = metadata.options.discriminator.subTypes.find((subType) => subType.value === subValue.constructor).name; + } + } + } else { + type = metadata; + } + } else { + type = newType; + } + isSubValueMap = isSubValueMap || metadata.reflectedType === Map; + } else if (this.options.targetMaps) { + this.options.targetMaps.filter((map) => map.target === targetType && !!map.properties[propertyName]).forEach((map) => type = map.properties[propertyName]); + } else if (this.options.enableImplicitConversion && this.transformationType === enums_1.TransformationType.PLAIN_TO_CLASS) { + const reflectedType = Reflect.getMetadata("design:type", targetType.prototype, propertyName); + if (reflectedType) { + type = reflectedType; + } + } + } + const arrayType2 = Array.isArray(value[valueKey]) ? this.getReflectedType(targetType, propertyName) : void 0; + const subSource = source ? source[valueKey] : void 0; + if (newValue.constructor.prototype) { + const descriptor = Object.getOwnPropertyDescriptor(newValue.constructor.prototype, newValueKey); + if ((this.transformationType === enums_1.TransformationType.PLAIN_TO_CLASS || this.transformationType === enums_1.TransformationType.CLASS_TO_CLASS) && // eslint-disable-next-line @typescript-eslint/unbound-method + (descriptor && !descriptor.set || newValue[newValueKey] instanceof Function)) + continue; + } + if (!this.options.enableCircularCheck || !this.isCircular(subValue)) { + const transformKey = this.transformationType === enums_1.TransformationType.PLAIN_TO_CLASS ? newValueKey : key; + let finalValue; + if (this.transformationType === enums_1.TransformationType.CLASS_TO_PLAIN) { + finalValue = value[transformKey]; + finalValue = this.applyCustomTransformations(finalValue, targetType, transformKey, value, this.transformationType); + finalValue = value[transformKey] === finalValue ? subValue : finalValue; + finalValue = this.transform(subSource, finalValue, type, arrayType2, isSubValueMap, level + 1); + } else { + if (subValue === void 0 && this.options.exposeDefaultValues) { + finalValue = newValue[newValueKey]; + } else { + finalValue = this.transform(subSource, subValue, type, arrayType2, isSubValueMap, level + 1); + finalValue = this.applyCustomTransformations(finalValue, targetType, transformKey, value, this.transformationType); + } + } + if (finalValue !== void 0 || this.options.exposeUnsetFields) { + if (newValue instanceof Map) { + newValue.set(newValueKey, finalValue); + } else { + newValue[newValueKey] = finalValue; + } + } + } else if (this.transformationType === enums_1.TransformationType.CLASS_TO_CLASS) { + let finalValue = subValue; + finalValue = this.applyCustomTransformations(finalValue, targetType, key, value, this.transformationType); + if (finalValue !== void 0 || this.options.exposeUnsetFields) { + if (newValue instanceof Map) { + newValue.set(newValueKey, finalValue); + } else { + newValue[newValueKey] = finalValue; + } + } + } + } + if (this.options.enableCircularCheck) { + this.recursionStack.delete(value); + } + return newValue; + } else { + return value; + } + } + applyCustomTransformations(value, target, key, obj2, transformationType) { + let metadatas = storage_1.defaultMetadataStorage.findTransformMetadatas(target, key, this.transformationType); + if (this.options.version !== void 0) { + metadatas = metadatas.filter((metadata) => { + if (!metadata.options) + return true; + return this.checkVersion(metadata.options.since, metadata.options.until); + }); + } + if (this.options.groups && this.options.groups.length) { + metadatas = metadatas.filter((metadata) => { + if (!metadata.options) + return true; + return this.checkGroups(metadata.options.groups); + }); + } else { + metadatas = metadatas.filter((metadata) => { + return !metadata.options || !metadata.options.groups || !metadata.options.groups.length; + }); + } + metadatas.forEach((metadata) => { + value = metadata.transformFn({ value, key, obj: obj2, type: transformationType, options: this.options }); + }); + return value; + } + // preventing circular references + isCircular(object) { + return this.recursionStack.has(object); + } + getReflectedType(target, propertyName) { + if (!target) + return void 0; + const meta = storage_1.defaultMetadataStorage.findTypeMetadata(target, propertyName); + return meta ? meta.reflectedType : void 0; + } + getKeys(target, object, isMap) { + let strategy = storage_1.defaultMetadataStorage.getStrategy(target); + if (strategy === "none") + strategy = this.options.strategy || "exposeAll"; + let keys = []; + if (strategy === "exposeAll" || isMap) { + if (object instanceof Map) { + keys = Array.from(object.keys()); + } else { + keys = Object.keys(object); + } + } + if (isMap) { + return keys; + } + if (this.options.ignoreDecorators && this.options.excludeExtraneousValues && target) { + const exposedProperties = storage_1.defaultMetadataStorage.getExposedProperties(target, this.transformationType); + const excludedProperties = storage_1.defaultMetadataStorage.getExcludedProperties(target, this.transformationType); + keys = [...exposedProperties, ...excludedProperties]; + } + if (!this.options.ignoreDecorators && target) { + let exposedProperties = storage_1.defaultMetadataStorage.getExposedProperties(target, this.transformationType); + if (this.transformationType === enums_1.TransformationType.PLAIN_TO_CLASS) { + exposedProperties = exposedProperties.map((key) => { + const exposeMetadata = storage_1.defaultMetadataStorage.findExposeMetadata(target, key); + if (exposeMetadata && exposeMetadata.options && exposeMetadata.options.name) { + return exposeMetadata.options.name; + } + return key; + }); + } + if (this.options.excludeExtraneousValues) { + keys = exposedProperties; + } else { + keys = keys.concat(exposedProperties); + } + const excludedProperties = storage_1.defaultMetadataStorage.getExcludedProperties(target, this.transformationType); + if (excludedProperties.length > 0) { + keys = keys.filter((key) => { + return !excludedProperties.includes(key); + }); + } + if (this.options.version !== void 0) { + keys = keys.filter((key) => { + const exposeMetadata = storage_1.defaultMetadataStorage.findExposeMetadata(target, key); + if (!exposeMetadata || !exposeMetadata.options) + return true; + return this.checkVersion(exposeMetadata.options.since, exposeMetadata.options.until); + }); + } + if (this.options.groups && this.options.groups.length) { + keys = keys.filter((key) => { + const exposeMetadata = storage_1.defaultMetadataStorage.findExposeMetadata(target, key); + if (!exposeMetadata || !exposeMetadata.options) + return true; + return this.checkGroups(exposeMetadata.options.groups); + }); + } else { + keys = keys.filter((key) => { + const exposeMetadata = storage_1.defaultMetadataStorage.findExposeMetadata(target, key); + return !exposeMetadata || !exposeMetadata.options || !exposeMetadata.options.groups || !exposeMetadata.options.groups.length; + }); + } + } + if (this.options.excludePrefixes && this.options.excludePrefixes.length) { + keys = keys.filter((key) => this.options.excludePrefixes.every((prefix) => { + return key.substr(0, prefix.length) !== prefix; + })); + } + keys = keys.filter((key, index, self2) => { + return self2.indexOf(key) === index; + }); + return keys; + } + checkVersion(since, until) { + let decision = true; + if (decision && since) + decision = this.options.version >= since; + if (decision && until) + decision = this.options.version < until; + return decision; + } + checkGroups(groups) { + if (!groups) + return true; + return this.options.groups.some((optionGroup) => groups.includes(optionGroup)); + } + }; + exports2.TransformOperationExecutor = TransformOperationExecutor; + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/constants/default-options.constant.js +var require_default_options_constant = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/constants/default-options.constant.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultOptions = void 0; + exports2.defaultOptions = { + enableCircularCheck: false, + enableImplicitConversion: false, + excludeExtraneousValues: false, + excludePrefixes: void 0, + exposeDefaultValues: false, + exposeUnsetFields: true, + groups: void 0, + ignoreDecorators: false, + strategy: void 0, + targetMaps: void 0, + version: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/ClassTransformer.js +var require_ClassTransformer = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/ClassTransformer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ClassTransformer = void 0; + var TransformOperationExecutor_1 = require_TransformOperationExecutor(); + var enums_1 = require_enums2(); + var default_options_constant_1 = require_default_options_constant(); + var ClassTransformer = class { + instanceToPlain(object, options) { + const executor = new TransformOperationExecutor_1.TransformOperationExecutor(enums_1.TransformationType.CLASS_TO_PLAIN, { + ...default_options_constant_1.defaultOptions, + ...options + }); + return executor.transform(void 0, object, void 0, void 0, void 0, void 0); + } + classToPlainFromExist(object, plainObject, options) { + const executor = new TransformOperationExecutor_1.TransformOperationExecutor(enums_1.TransformationType.CLASS_TO_PLAIN, { + ...default_options_constant_1.defaultOptions, + ...options + }); + return executor.transform(plainObject, object, void 0, void 0, void 0, void 0); + } + plainToInstance(cls, plain, options) { + const executor = new TransformOperationExecutor_1.TransformOperationExecutor(enums_1.TransformationType.PLAIN_TO_CLASS, { + ...default_options_constant_1.defaultOptions, + ...options + }); + return executor.transform(void 0, plain, cls, void 0, void 0, void 0); + } + plainToClassFromExist(clsObject, plain, options) { + const executor = new TransformOperationExecutor_1.TransformOperationExecutor(enums_1.TransformationType.PLAIN_TO_CLASS, { + ...default_options_constant_1.defaultOptions, + ...options + }); + return executor.transform(clsObject, plain, void 0, void 0, void 0, void 0); + } + instanceToInstance(object, options) { + const executor = new TransformOperationExecutor_1.TransformOperationExecutor(enums_1.TransformationType.CLASS_TO_CLASS, { + ...default_options_constant_1.defaultOptions, + ...options + }); + return executor.transform(void 0, object, void 0, void 0, void 0, void 0); + } + classToClassFromExist(object, fromObject, options) { + const executor = new TransformOperationExecutor_1.TransformOperationExecutor(enums_1.TransformationType.CLASS_TO_CLASS, { + ...default_options_constant_1.defaultOptions, + ...options + }); + return executor.transform(fromObject, object, void 0, void 0, void 0, void 0); + } + serialize(object, options) { + return JSON.stringify(this.instanceToPlain(object, options)); + } + /** + * Deserializes given JSON string to a object of the given class. + */ + deserialize(cls, json, options) { + const jsonObject = JSON.parse(json); + return this.plainToInstance(cls, jsonObject, options); + } + /** + * Deserializes given JSON string to an array of objects of the given class. + */ + deserializeArray(cls, json, options) { + const jsonObject = JSON.parse(json); + return this.plainToInstance(cls, jsonObject, options); + } + }; + exports2.ClassTransformer = ClassTransformer; + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/exclude.decorator.js +var require_exclude_decorator = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/exclude.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Exclude = void 0; + var storage_1 = require_storage(); + function Exclude(options = {}) { + return function(object, propertyName) { + storage_1.defaultMetadataStorage.addExcludeMetadata({ + target: object instanceof Function ? object : object.constructor, + propertyName, + options + }); + }; + } + exports2.Exclude = Exclude; + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/expose.decorator.js +var require_expose_decorator = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/expose.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Expose = void 0; + var storage_1 = require_storage(); + function Expose(options = {}) { + return function(object, propertyName) { + storage_1.defaultMetadataStorage.addExposeMetadata({ + target: object instanceof Function ? object : object.constructor, + propertyName, + options + }); + }; + } + exports2.Expose = Expose; + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/transform-instance-to-instance.decorator.js +var require_transform_instance_to_instance_decorator = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/transform-instance-to-instance.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TransformInstanceToInstance = void 0; + var ClassTransformer_1 = require_ClassTransformer(); + function TransformInstanceToInstance(params) { + return function(target, propertyKey, descriptor) { + const classTransformer = new ClassTransformer_1.ClassTransformer(); + const originalMethod = descriptor.value; + descriptor.value = function(...args) { + const result = originalMethod.apply(this, args); + const isPromise = !!result && (typeof result === "object" || typeof result === "function") && typeof result.then === "function"; + return isPromise ? result.then((data) => classTransformer.instanceToInstance(data, params)) : classTransformer.instanceToInstance(result, params); + }; + }; + } + exports2.TransformInstanceToInstance = TransformInstanceToInstance; + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/transform-instance-to-plain.decorator.js +var require_transform_instance_to_plain_decorator = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/transform-instance-to-plain.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TransformInstanceToPlain = void 0; + var ClassTransformer_1 = require_ClassTransformer(); + function TransformInstanceToPlain(params) { + return function(target, propertyKey, descriptor) { + const classTransformer = new ClassTransformer_1.ClassTransformer(); + const originalMethod = descriptor.value; + descriptor.value = function(...args) { + const result = originalMethod.apply(this, args); + const isPromise = !!result && (typeof result === "object" || typeof result === "function") && typeof result.then === "function"; + return isPromise ? result.then((data) => classTransformer.instanceToPlain(data, params)) : classTransformer.instanceToPlain(result, params); + }; + }; + } + exports2.TransformInstanceToPlain = TransformInstanceToPlain; + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/transform-plain-to-instance.decorator.js +var require_transform_plain_to_instance_decorator = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/transform-plain-to-instance.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TransformPlainToInstance = void 0; + var ClassTransformer_1 = require_ClassTransformer(); + function TransformPlainToInstance(classType, params) { + return function(target, propertyKey, descriptor) { + const classTransformer = new ClassTransformer_1.ClassTransformer(); + const originalMethod = descriptor.value; + descriptor.value = function(...args) { + const result = originalMethod.apply(this, args); + const isPromise = !!result && (typeof result === "object" || typeof result === "function") && typeof result.then === "function"; + return isPromise ? result.then((data) => classTransformer.plainToInstance(classType, data, params)) : classTransformer.plainToInstance(classType, result, params); + }; + }; + } + exports2.TransformPlainToInstance = TransformPlainToInstance; + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/transform.decorator.js +var require_transform_decorator = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/transform.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Transform = void 0; + var storage_1 = require_storage(); + function Transform(transformFn, options = {}) { + return function(target, propertyName) { + storage_1.defaultMetadataStorage.addTransformMetadata({ + target: target.constructor, + propertyName, + transformFn, + options + }); + }; + } + exports2.Transform = Transform; + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/type.decorator.js +var require_type_decorator = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/type.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Type = void 0; + var storage_1 = require_storage(); + function Type(typeFunction, options = {}) { + return function(target, propertyName) { + const reflectedType = Reflect.getMetadata("design:type", target, propertyName); + storage_1.defaultMetadataStorage.addTypeMetadata({ + target: target.constructor, + propertyName, + reflectedType, + typeFunction, + options + }); + }; + } + exports2.Type = Type; + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/index.js +var require_decorators3 = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_exclude_decorator(), exports2); + __exportStar2(require_expose_decorator(), exports2); + __exportStar2(require_transform_instance_to_instance_decorator(), exports2); + __exportStar2(require_transform_instance_to_plain_decorator(), exports2); + __exportStar2(require_transform_plain_to_instance_decorator(), exports2); + __exportStar2(require_transform_decorator(), exports2); + __exportStar2(require_type_decorator(), exports2); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/decorator-options/expose-options.interface.js +var require_expose_options_interface = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/decorator-options/expose-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/decorator-options/exclude-options.interface.js +var require_exclude_options_interface = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/decorator-options/exclude-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/decorator-options/transform-options.interface.js +var require_transform_options_interface = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/decorator-options/transform-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/decorator-options/type-discriminator-descriptor.interface.js +var require_type_discriminator_descriptor_interface = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/decorator-options/type-discriminator-descriptor.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/decorator-options/type-options.interface.js +var require_type_options_interface = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/decorator-options/type-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/metadata/exclude-metadata.interface.js +var require_exclude_metadata_interface = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/metadata/exclude-metadata.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/metadata/expose-metadata.interface.js +var require_expose_metadata_interface = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/metadata/expose-metadata.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/metadata/transform-metadata.interface.js +var require_transform_metadata_interface = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/metadata/transform-metadata.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/metadata/transform-fn-params.interface.js +var require_transform_fn_params_interface = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/metadata/transform-fn-params.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/metadata/type-metadata.interface.js +var require_type_metadata_interface = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/metadata/type-metadata.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/class-constructor.type.js +var require_class_constructor_type = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/class-constructor.type.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/class-transformer-options.interface.js +var require_class_transformer_options_interface = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/class-transformer-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/target-map.interface.js +var require_target_map_interface = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/target-map.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/type-help-options.interface.js +var require_type_help_options_interface = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/type-help-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/index.js +var require_interfaces3 = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/interfaces/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_expose_options_interface(), exports2); + __exportStar2(require_exclude_options_interface(), exports2); + __exportStar2(require_transform_options_interface(), exports2); + __exportStar2(require_type_discriminator_descriptor_interface(), exports2); + __exportStar2(require_type_options_interface(), exports2); + __exportStar2(require_exclude_metadata_interface(), exports2); + __exportStar2(require_expose_metadata_interface(), exports2); + __exportStar2(require_transform_metadata_interface(), exports2); + __exportStar2(require_transform_fn_params_interface(), exports2); + __exportStar2(require_type_metadata_interface(), exports2); + __exportStar2(require_class_constructor_type(), exports2); + __exportStar2(require_class_transformer_options_interface(), exports2); + __exportStar2(require_target_map_interface(), exports2); + __exportStar2(require_type_help_options_interface(), exports2); + } +}); + +// ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/index.js +var require_cjs2 = __commonJS({ + "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.deserializeArray = exports2.deserialize = exports2.serialize = exports2.classToClassFromExist = exports2.instanceToInstance = exports2.plainToClassFromExist = exports2.plainToInstance = exports2.plainToClass = exports2.classToPlainFromExist = exports2.instanceToPlain = exports2.classToPlain = exports2.ClassTransformer = void 0; + var ClassTransformer_1 = require_ClassTransformer(); + var ClassTransformer_2 = require_ClassTransformer(); + Object.defineProperty(exports2, "ClassTransformer", { enumerable: true, get: function() { + return ClassTransformer_2.ClassTransformer; + } }); + __exportStar2(require_decorators3(), exports2); + __exportStar2(require_interfaces3(), exports2); + __exportStar2(require_enums2(), exports2); + var classTransformer = new ClassTransformer_1.ClassTransformer(); + function classToPlain(object, options) { + return classTransformer.instanceToPlain(object, options); + } + exports2.classToPlain = classToPlain; + function instanceToPlain(object, options) { + return classTransformer.instanceToPlain(object, options); + } + exports2.instanceToPlain = instanceToPlain; + function classToPlainFromExist(object, plainObject, options) { + return classTransformer.classToPlainFromExist(object, plainObject, options); + } + exports2.classToPlainFromExist = classToPlainFromExist; + function plainToClass(cls, plain, options) { + return classTransformer.plainToInstance(cls, plain, options); + } + exports2.plainToClass = plainToClass; + function plainToInstance(cls, plain, options) { + return classTransformer.plainToInstance(cls, plain, options); + } + exports2.plainToInstance = plainToInstance; + function plainToClassFromExist(clsObject, plain, options) { + return classTransformer.plainToClassFromExist(clsObject, plain, options); + } + exports2.plainToClassFromExist = plainToClassFromExist; + function instanceToInstance(object, options) { + return classTransformer.instanceToInstance(object, options); + } + exports2.instanceToInstance = instanceToInstance; + function classToClassFromExist(object, fromObject, options) { + return classTransformer.classToClassFromExist(object, fromObject, options); + } + exports2.classToClassFromExist = classToClassFromExist; + function serialize(object, options) { + return classTransformer.serialize(object, options); + } + exports2.serialize = serialize; + function deserialize(cls, json, options) { + return classTransformer.deserialize(cls, json, options); + } + exports2.deserialize = deserialize; + function deserializeArray(cls, json, options) { + return classTransformer.deserializeArray(cls, json, options); + } + exports2.deserializeArray = deserializeArray; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/validation.pipe.js +var require_validation_pipe = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/validation.pipe.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ValidationPipe = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var iterare_1 = require_lib(); + var util_1 = require("util"); + var decorators_1 = require_decorators(); + var core_12 = require_core(); + var http_status_enum_1 = require_http_status_enum(); + var http_error_by_code_util_1 = require_http_error_by_code_util(); + var load_package_util_1 = require_load_package_util(); + var shared_utils_1 = require_shared_utils(); + var classValidator = {}; + var classTransformer = {}; + var ValidationPipe = class ValidationPipe { + constructor(options) { + options = options || {}; + const { transform, disableErrorMessages, errorHttpStatusCode, expectedType, transformOptions, validateCustomDecorators, ...validatorOptions } = options; + this.validatorOptions = { forbidUnknownValues: false, ...validatorOptions }; + this.isTransformEnabled = !!transform; + this.transformOptions = transformOptions; + this.isDetailedOutputDisabled = disableErrorMessages; + this.validateCustomDecorators = validateCustomDecorators || false; + this.errorHttpStatusCode = errorHttpStatusCode || http_status_enum_1.HttpStatus.BAD_REQUEST; + this.expectedType = expectedType; + this.exceptionFactory = options.exceptionFactory || this.createExceptionFactory(); + classValidator = this.loadValidator(options.validatorPackage); + classTransformer = this.loadTransformer(options.transformerPackage); + } + loadValidator(validatorPackage) { + return validatorPackage ?? (0, load_package_util_1.loadPackage)("class-validator", "ValidationPipe", () => require_cjs()); + } + loadTransformer(transformerPackage) { + return transformerPackage ?? (0, load_package_util_1.loadPackage)("class-transformer", "ValidationPipe", () => require_cjs2()); + } + async transform(value, metadata) { + if (this.expectedType) { + metadata = { ...metadata, metatype: this.expectedType }; + } + const metatype = metadata.metatype; + if (!metatype || !this.toValidate(metadata)) { + return this.isTransformEnabled ? this.transformPrimitive(value, metadata) : value; + } + const originalValue = value; + value = this.toEmptyIfNil(value, metatype); + const isNil = value !== originalValue; + const isPrimitive2 = this.isPrimitive(value); + this.stripProtoKeys(value); + let entity = classTransformer.plainToClass(metatype, value, this.transformOptions); + const originalEntity = entity; + const isCtorNotEqual = entity.constructor !== metatype; + if (isCtorNotEqual && !isPrimitive2) { + entity.constructor = metatype; + } else if (isCtorNotEqual) { + entity = { constructor: metatype }; + } + const errors = await this.validate(entity, this.validatorOptions); + if (errors.length > 0) { + throw await this.exceptionFactory(errors); + } + if (isPrimitive2) { + entity = originalEntity; + } + if (this.isTransformEnabled) { + return entity; + } + if (isNil) { + return originalValue; + } + const shouldTransformToPlain = Object.keys(this.validatorOptions).length > 1; + return shouldTransformToPlain ? classTransformer.classToPlain(entity, this.transformOptions) : value; + } + createExceptionFactory() { + return (validationErrors = []) => { + if (this.isDetailedOutputDisabled) { + return new http_error_by_code_util_1.HttpErrorByCode[this.errorHttpStatusCode](); + } + const errors = this.flattenValidationErrors(validationErrors); + return new http_error_by_code_util_1.HttpErrorByCode[this.errorHttpStatusCode](errors); + }; + } + toValidate(metadata) { + const { metatype, type } = metadata; + if (type === "custom" && !this.validateCustomDecorators) { + return false; + } + const types = [String, Boolean, Number, Array, Object, Buffer, Date]; + return !types.some((t) => metatype === t) && !(0, shared_utils_1.isNil)(metatype); + } + transformPrimitive(value, metadata) { + if (!metadata.data) { + return value; + } + const { type, metatype } = metadata; + if (type !== "param" && type !== "query") { + return value; + } + if (metatype === Boolean) { + if ((0, shared_utils_1.isUndefined)(value)) { + return void 0; + } + return value === true || value === "true"; + } + if (metatype === Number) { + return +value; + } + if (metatype === String && !(0, shared_utils_1.isUndefined)(value)) { + return String(value); + } + return value; + } + toEmptyIfNil(value, metatype) { + if (!(0, shared_utils_1.isNil)(value)) { + return value; + } + if (typeof metatype === "function" || metatype && "prototype" in metatype && metatype.prototype?.constructor) { + return {}; + } + return ""; + } + stripProtoKeys(value) { + if (value == null || typeof value !== "object" || util_1.types.isTypedArray(value)) { + return; + } + if (Array.isArray(value)) { + for (const v of value) { + this.stripProtoKeys(v); + } + return; + } + delete value.__proto__; + for (const key in value) { + this.stripProtoKeys(value[key]); + } + } + isPrimitive(value) { + return ["number", "boolean", "string"].includes(typeof value); + } + validate(object, validatorOptions) { + return classValidator.validate(object, validatorOptions); + } + flattenValidationErrors(validationErrors) { + return (0, iterare_1.iterate)(validationErrors).map((error) => this.mapChildrenToValidationErrors(error)).flatten().filter((item) => !!item.constraints).map((item) => Object.values(item.constraints)).flatten().toArray(); + } + mapChildrenToValidationErrors(error, parentPath) { + if (!(error.children && error.children.length)) { + return [error]; + } + const validationErrors = []; + parentPath = parentPath ? `${parentPath}.${error.property}` : error.property; + for (const item of error.children) { + if (item.children && item.children.length) { + validationErrors.push(...this.mapChildrenToValidationErrors(item, parentPath)); + } + validationErrors.push(this.prependConstraintsWithParentProp(parentPath, item)); + } + return validationErrors; + } + prependConstraintsWithParentProp(parentPath, error) { + const constraints = {}; + for (const key in error.constraints) { + constraints[key] = `${parentPath}.${error.constraints[key]}`; + } + return { + ...error, + constraints + }; + } + }; + exports2.ValidationPipe = ValidationPipe; + exports2.ValidationPipe = ValidationPipe = tslib_1.__decorate([ + (0, core_12.Injectable)(), + tslib_1.__param(0, (0, decorators_1.Optional)()), + tslib_1.__metadata("design:paramtypes", [Object]) + ], ValidationPipe); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/parse-array.pipe.js +var require_parse_array_pipe = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/parse-array.pipe.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ParseArrayPipe = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var injectable_decorator_1 = require_injectable_decorator(); + var optional_decorator_1 = require_optional_decorator(); + var http_status_enum_1 = require_http_status_enum(); + var http_error_by_code_util_1 = require_http_error_by_code_util(); + var shared_utils_1 = require_shared_utils(); + var validation_pipe_1 = require_validation_pipe(); + var VALIDATION_ERROR_MESSAGE = "Validation failed (parsable array expected)"; + var DEFAULT_ARRAY_SEPARATOR = ","; + var ParseArrayPipe = class ParseArrayPipe { + constructor(options = {}) { + this.options = options; + this.validationPipe = new validation_pipe_1.ValidationPipe({ + transform: true, + validateCustomDecorators: true, + ...options + }); + const { exceptionFactory, errorHttpStatusCode = http_status_enum_1.HttpStatus.BAD_REQUEST } = options; + this.exceptionFactory = exceptionFactory || ((error) => new http_error_by_code_util_1.HttpErrorByCode[errorHttpStatusCode](error)); + } + /** + * Method that accesses and performs optional transformation on argument for + * in-flight requests. + * + * @param value currently processed route argument + * @param metadata contains metadata about the currently processed route argument + */ + async transform(value, metadata) { + if (!value && !this.options.optional) { + throw this.exceptionFactory(VALIDATION_ERROR_MESSAGE); + } else if ((0, shared_utils_1.isNil)(value) && this.options.optional) { + return value; + } + if (!Array.isArray(value)) { + if (!(0, shared_utils_1.isString)(value)) { + throw this.exceptionFactory(VALIDATION_ERROR_MESSAGE); + } else { + try { + value = value.trim().split(this.options.separator || DEFAULT_ARRAY_SEPARATOR); + } catch { + throw this.exceptionFactory(VALIDATION_ERROR_MESSAGE); + } + } + } + if (this.options.items) { + const validationMetadata = { + metatype: this.options.items, + type: "query" + }; + const isExpectedTypePrimitive = this.isExpectedTypePrimitive(); + const toClassInstance = (item, index) => { + if (this.options.items !== String) { + try { + item = JSON.parse(item); + } catch { + } + } + if (isExpectedTypePrimitive) { + return this.validatePrimitive(item, index); + } + return this.validationPipe.transform(item, validationMetadata); + }; + if (this.options.stopAtFirstError === false) { + let errors = []; + const targetArray = value; + for (let i = 0; i < targetArray.length; i++) { + try { + targetArray[i] = await toClassInstance(targetArray[i]); + } catch (err) { + let message; + if (err.getResponse) { + const response = err.getResponse(); + if (Array.isArray(response.message)) { + message = response.message.map((item) => `[${i}] ${item}`); + } else { + message = `[${i}] ${response.message}`; + } + } else { + message = err; + } + errors = errors.concat(message); + } + } + if (errors.length > 0) { + throw this.exceptionFactory(errors); + } + return targetArray; + } else { + value = await Promise.all(value.map(toClassInstance)); + } + } + return value; + } + isExpectedTypePrimitive() { + return [Boolean, Number, String].includes(this.options.items); + } + validatePrimitive(originalValue, index) { + if (this.options.items === Number) { + const value = originalValue !== null && originalValue !== "" ? +originalValue : NaN; + if (isNaN(value)) { + throw this.exceptionFactory(`${(0, shared_utils_1.isUndefined)(index) ? "" : `[${index}] `}item must be a number`); + } + return value; + } else if (this.options.items === String) { + if (!(0, shared_utils_1.isString)(originalValue)) { + return `${originalValue}`; + } + } else if (this.options.items === Boolean) { + if (typeof originalValue !== "boolean") { + throw this.exceptionFactory(`${(0, shared_utils_1.isUndefined)(index) ? "" : `[${index}] `}item must be a boolean value`); + } + } + return originalValue; + } + }; + exports2.ParseArrayPipe = ParseArrayPipe; + exports2.ParseArrayPipe = ParseArrayPipe = tslib_1.__decorate([ + (0, injectable_decorator_1.Injectable)(), + tslib_1.__param(0, (0, optional_decorator_1.Optional)()), + tslib_1.__metadata("design:paramtypes", [Object]) + ], ParseArrayPipe); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/parse-bool.pipe.js +var require_parse_bool_pipe = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/parse-bool.pipe.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ParseBoolPipe = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var injectable_decorator_1 = require_injectable_decorator(); + var optional_decorator_1 = require_optional_decorator(); + var http_status_enum_1 = require_http_status_enum(); + var http_error_by_code_util_1 = require_http_error_by_code_util(); + var shared_utils_1 = require_shared_utils(); + var ParseBoolPipe = class ParseBoolPipe { + constructor(options) { + this.options = options; + options = options || {}; + const { exceptionFactory, errorHttpStatusCode = http_status_enum_1.HttpStatus.BAD_REQUEST } = options; + this.exceptionFactory = exceptionFactory || ((error) => new http_error_by_code_util_1.HttpErrorByCode[errorHttpStatusCode](error)); + } + /** + * Method that accesses and performs optional transformation on argument for + * in-flight requests. + * + * @param value currently processed route argument + * @param metadata contains metadata about the currently processed route argument + */ + async transform(value, metadata) { + if ((0, shared_utils_1.isNil)(value) && this.options?.optional) { + return value; + } + if (this.isTrue(value)) { + return true; + } + if (this.isFalse(value)) { + return false; + } + throw this.exceptionFactory("Validation failed (boolean string is expected)"); + } + /** + * @param value currently processed route argument + * @returns `true` if `value` is said 'true', ie., if it is equal to the boolean + * `true` or the string `"true"` + */ + isTrue(value) { + return value === true || value === "true"; + } + /** + * @param value currently processed route argument + * @returns `true` if `value` is said 'false', ie., if it is equal to the boolean + * `false` or the string `"false"` + */ + isFalse(value) { + return value === false || value === "false"; + } + }; + exports2.ParseBoolPipe = ParseBoolPipe; + exports2.ParseBoolPipe = ParseBoolPipe = tslib_1.__decorate([ + (0, injectable_decorator_1.Injectable)(), + tslib_1.__param(0, (0, optional_decorator_1.Optional)()), + tslib_1.__metadata("design:paramtypes", [Object]) + ], ParseBoolPipe); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/parse-int.pipe.js +var require_parse_int_pipe = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/parse-int.pipe.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ParseIntPipe = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var injectable_decorator_1 = require_injectable_decorator(); + var optional_decorator_1 = require_optional_decorator(); + var http_status_enum_1 = require_http_status_enum(); + var http_error_by_code_util_1 = require_http_error_by_code_util(); + var shared_utils_1 = require_shared_utils(); + var ParseIntPipe = class ParseIntPipe { + constructor(options) { + this.options = options; + options = options || {}; + const { exceptionFactory, errorHttpStatusCode = http_status_enum_1.HttpStatus.BAD_REQUEST } = options; + this.exceptionFactory = exceptionFactory || ((error) => new http_error_by_code_util_1.HttpErrorByCode[errorHttpStatusCode](error)); + } + /** + * Method that accesses and performs optional transformation on argument for + * in-flight requests. + * + * @param value currently processed route argument + * @param metadata contains metadata about the currently processed route argument + */ + async transform(value, metadata) { + if ((0, shared_utils_1.isNil)(value) && this.options?.optional) { + return value; + } + if (!this.isNumeric(value)) { + throw this.exceptionFactory("Validation failed (numeric string is expected)"); + } + return parseInt(value, 10); + } + /** + * @param value currently processed route argument + * @returns `true` if `value` is a valid integer number + */ + isNumeric(value) { + return ["string", "number"].includes(typeof value) && /^-?\d+$/.test(value) && isFinite(value); + } + }; + exports2.ParseIntPipe = ParseIntPipe; + exports2.ParseIntPipe = ParseIntPipe = tslib_1.__decorate([ + (0, injectable_decorator_1.Injectable)(), + tslib_1.__param(0, (0, optional_decorator_1.Optional)()), + tslib_1.__metadata("design:paramtypes", [Object]) + ], ParseIntPipe); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/parse-float.pipe.js +var require_parse_float_pipe = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/parse-float.pipe.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ParseFloatPipe = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_12 = require_core(); + var index_1 = require_common(); + var http_error_by_code_util_1 = require_http_error_by_code_util(); + var shared_utils_1 = require_shared_utils(); + var ParseFloatPipe = class ParseFloatPipe { + constructor(options) { + this.options = options; + options = options || {}; + const { exceptionFactory, errorHttpStatusCode = index_1.HttpStatus.BAD_REQUEST } = options; + this.exceptionFactory = exceptionFactory || ((error) => new http_error_by_code_util_1.HttpErrorByCode[errorHttpStatusCode](error)); + } + /** + * Method that accesses and performs optional transformation on argument for + * in-flight requests. + * + * @param value currently processed route argument + * @param metadata contains metadata about the currently processed route argument + */ + async transform(value, metadata) { + if ((0, shared_utils_1.isNil)(value) && this.options?.optional) { + return value; + } + if (!this.isNumeric(value)) { + throw this.exceptionFactory("Validation failed (numeric string is expected)"); + } + return parseFloat(value); + } + /** + * @param value currently processed route argument + * @returns `true` if `value` is a valid float number + */ + isNumeric(value) { + return ["string", "number"].includes(typeof value) && !isNaN(parseFloat(value)) && isFinite(value); + } + }; + exports2.ParseFloatPipe = ParseFloatPipe; + exports2.ParseFloatPipe = ParseFloatPipe = tslib_1.__decorate([ + (0, core_12.Injectable)(), + tslib_1.__param(0, (0, core_12.Optional)()), + tslib_1.__metadata("design:paramtypes", [Object]) + ], ParseFloatPipe); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/parse-enum.pipe.js +var require_parse_enum_pipe = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/parse-enum.pipe.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ParseEnumPipe = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_12 = require_core(); + var index_1 = require_common(); + var http_error_by_code_util_1 = require_http_error_by_code_util(); + var shared_utils_1 = require_shared_utils(); + var ParseEnumPipe = class ParseEnumPipe { + constructor(enumType, options) { + this.enumType = enumType; + this.options = options; + if (!enumType) { + throw new Error(`"ParseEnumPipe" requires "enumType" argument specified (to validate input values).`); + } + options = options || {}; + const { exceptionFactory, errorHttpStatusCode = index_1.HttpStatus.BAD_REQUEST } = options; + this.exceptionFactory = exceptionFactory || ((error) => new http_error_by_code_util_1.HttpErrorByCode[errorHttpStatusCode](error)); + } + /** + * Method that accesses and performs optional transformation on argument for + * in-flight requests. + * + * @param value currently processed route argument + * @param metadata contains metadata about the currently processed route argument + */ + async transform(value, metadata) { + if ((0, shared_utils_1.isNil)(value) && this.options?.optional) { + return value; + } + if (!this.isEnum(value)) { + throw this.exceptionFactory("Validation failed (enum string is expected)"); + } + return value; + } + isEnum(value) { + const enumValues = Object.keys(this.enumType).map((item) => this.enumType[item]); + return enumValues.includes(value); + } + }; + exports2.ParseEnumPipe = ParseEnumPipe; + exports2.ParseEnumPipe = ParseEnumPipe = tslib_1.__decorate([ + (0, core_12.Injectable)(), + tslib_1.__param(1, (0, core_12.Optional)()), + tslib_1.__metadata("design:paramtypes", [Object, Object]) + ], ParseEnumPipe); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/parse-uuid.pipe.js +var require_parse_uuid_pipe = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/parse-uuid.pipe.js"(exports2) { + "use strict"; + var ParseUUIDPipe_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ParseUUIDPipe = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var injectable_decorator_1 = require_injectable_decorator(); + var optional_decorator_1 = require_optional_decorator(); + var http_status_enum_1 = require_http_status_enum(); + var http_error_by_code_util_1 = require_http_error_by_code_util(); + var shared_utils_1 = require_shared_utils(); + var ParseUUIDPipe = ParseUUIDPipe_1 = class ParseUUIDPipe { + constructor(options) { + this.options = options; + options = options || {}; + const { exceptionFactory, errorHttpStatusCode = http_status_enum_1.HttpStatus.BAD_REQUEST, version: version2 } = options; + this.version = version2; + this.exceptionFactory = exceptionFactory || ((error) => new http_error_by_code_util_1.HttpErrorByCode[errorHttpStatusCode](error)); + } + async transform(value, metadata) { + if ((0, shared_utils_1.isNil)(value) && this.options?.optional) { + return value; + } + if (!this.isUUID(value, this.version)) { + throw this.exceptionFactory(`Validation failed (uuid${this.version ? ` v ${this.version}` : ""} is expected)`); + } + return value; + } + isUUID(str, version2 = "all") { + if (!(0, shared_utils_1.isString)(str)) { + throw this.exceptionFactory("The value passed as UUID is not a string"); + } + const pattern = ParseUUIDPipe_1.uuidRegExps[version2]; + return pattern?.test(str); + } + }; + exports2.ParseUUIDPipe = ParseUUIDPipe; + ParseUUIDPipe.uuidRegExps = { + 3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i, + 4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 7: /^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i + }; + exports2.ParseUUIDPipe = ParseUUIDPipe = ParseUUIDPipe_1 = tslib_1.__decorate([ + (0, injectable_decorator_1.Injectable)(), + tslib_1.__param(0, (0, optional_decorator_1.Optional)()), + tslib_1.__metadata("design:paramtypes", [Object]) + ], ParseUUIDPipe); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/file/file-validator.interface.js +var require_file_validator_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/file/file-validator.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FileValidator = void 0; + var FileValidator = class { + constructor(validationOptions) { + this.validationOptions = validationOptions; + } + }; + exports2.FileValidator = FileValidator; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/file/file-type.validator.js +var require_file_type_validator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/file/file-type.validator.js"(exports, module) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.FileTypeValidator = void 0; + var file_validator_interface_1 = require_file_validator_interface(); + var FileTypeValidator = class extends file_validator_interface_1.FileValidator { + buildErrorMessage(file2) { + if (file2?.mimetype) { + return `Validation failed (current file type is ${file2.mimetype}, expected type is ${this.validationOptions.fileType})`; + } + return `Validation failed (expected type is ${this.validationOptions.fileType})`; + } + async isValid(file) { + if (!this.validationOptions) { + return true; + } + const isFileValid = !!file && "mimetype" in file; + if (this.validationOptions.skipMagicNumbersValidation) { + return isFileValid && !!file.mimetype.match(this.validationOptions.fileType); + } + if (!isFileValid || !file.buffer) { + return false; + } + try { + const { fileTypeFromBuffer } = await eval('import ("file-type")'); + const fileType = await fileTypeFromBuffer(file.buffer); + return !!fileType && !!fileType.mime.match(this.validationOptions.fileType); + } catch { + return false; + } + } + }; + exports.FileTypeValidator = FileTypeValidator; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/file/max-file-size.validator.js +var require_max_file_size_validator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/file/max-file-size.validator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MaxFileSizeValidator = void 0; + var file_validator_interface_12 = require_file_validator_interface(); + var MaxFileSizeValidator = class extends file_validator_interface_12.FileValidator { + buildErrorMessage() { + if ("message" in this.validationOptions) { + if (typeof this.validationOptions.message === "function") { + return this.validationOptions.message(this.validationOptions.maxSize); + } + return this.validationOptions.message; + } + return `Validation failed (expected size is less than ${this.validationOptions.maxSize})`; + } + isValid(file2) { + if (!this.validationOptions || !file2) { + return true; + } + return "size" in file2 && file2.size < this.validationOptions.maxSize; + } + }; + exports2.MaxFileSizeValidator = MaxFileSizeValidator; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/file/parse-file-options.interface.js +var require_parse_file_options_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/file/parse-file-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/file/parse-file.pipe.js +var require_parse_file_pipe = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/file/parse-file.pipe.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ParseFilePipe = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_12 = require_core(); + var enums_1 = require_enums(); + var http_error_by_code_util_1 = require_http_error_by_code_util(); + var shared_utils_1 = require_shared_utils(); + var ParseFilePipe = class ParseFilePipe { + constructor(options = {}) { + const { exceptionFactory, errorHttpStatusCode = enums_1.HttpStatus.BAD_REQUEST, validators = [], fileIsRequired } = options; + this.exceptionFactory = exceptionFactory || ((error) => new http_error_by_code_util_1.HttpErrorByCode[errorHttpStatusCode](error)); + this.validators = validators; + this.fileIsRequired = fileIsRequired ?? true; + } + async transform(value) { + const areThereAnyFilesIn = this.thereAreNoFilesIn(value); + if (areThereAnyFilesIn && this.fileIsRequired) { + throw this.exceptionFactory("File is required"); + } + if (!areThereAnyFilesIn && this.validators.length) { + await this.validateFilesOrFile(value); + } + return value; + } + async validateFilesOrFile(value) { + if (Array.isArray(value)) { + await Promise.all(value.map((f) => this.validate(f))); + } else { + await this.validate(value); + } + } + thereAreNoFilesIn(value) { + const isEmptyArray = Array.isArray(value) && (0, shared_utils_1.isEmpty)(value); + const isEmptyObject = (0, shared_utils_1.isObject)(value) && (0, shared_utils_1.isEmpty)(Object.keys(value)); + return (0, shared_utils_1.isUndefined)(value) || isEmptyArray || isEmptyObject; + } + async validate(file2) { + for (const validator of this.validators) { + await this.validateOrThrow(file2, validator); + } + return file2; + } + async validateOrThrow(file2, validator) { + const isValid = await validator.isValid(file2); + if (!isValid) { + const errorMessage = validator.buildErrorMessage(file2); + throw this.exceptionFactory(errorMessage); + } + } + /** + * @returns list of validators used in this pipe. + */ + getValidators() { + return this.validators; + } + }; + exports2.ParseFilePipe = ParseFilePipe; + exports2.ParseFilePipe = ParseFilePipe = tslib_1.__decorate([ + (0, core_12.Injectable)(), + tslib_1.__param(0, (0, core_12.Optional)()), + tslib_1.__metadata("design:paramtypes", [Object]) + ], ParseFilePipe); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/file/parse-file-pipe.builder.js +var require_parse_file_pipe_builder = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/file/parse-file-pipe.builder.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ParseFilePipeBuilder = void 0; + var file_type_validator_1 = require_file_type_validator(); + var max_file_size_validator_1 = require_max_file_size_validator(); + var parse_file_pipe_1 = require_parse_file_pipe(); + var ParseFilePipeBuilder = class { + constructor() { + this.validators = []; + } + addMaxSizeValidator(options) { + return this.addValidator(new max_file_size_validator_1.MaxFileSizeValidator(options)); + } + addFileTypeValidator(options) { + return this.addValidator(new file_type_validator_1.FileTypeValidator(options)); + } + addValidator(validator) { + this.validators.push(validator); + return this; + } + build(additionalOptions) { + const parseFilePipe = new parse_file_pipe_1.ParseFilePipe({ + ...additionalOptions, + validators: this.validators + }); + this.validators = []; + return parseFilePipe; + } + }; + exports2.ParseFilePipeBuilder = ParseFilePipeBuilder; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/file/index.js +var require_file = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/file/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_file_type_validator(), exports2); + tslib_1.__exportStar(require_file_validator_interface(), exports2); + tslib_1.__exportStar(require_max_file_size_validator(), exports2); + tslib_1.__exportStar(require_parse_file_options_interface(), exports2); + tslib_1.__exportStar(require_parse_file_pipe(), exports2); + tslib_1.__exportStar(require_parse_file_pipe_builder(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/index.js +var require_pipes = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/pipes/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_default_value_pipe(), exports2); + tslib_1.__exportStar(require_parse_array_pipe(), exports2); + tslib_1.__exportStar(require_parse_bool_pipe(), exports2); + tslib_1.__exportStar(require_parse_int_pipe(), exports2); + tslib_1.__exportStar(require_parse_float_pipe(), exports2); + tslib_1.__exportStar(require_parse_enum_pipe(), exports2); + tslib_1.__exportStar(require_parse_uuid_pipe(), exports2); + tslib_1.__exportStar(require_validation_pipe(), exports2); + tslib_1.__exportStar(require_file(), exports2); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isFunction.js +var require_isFunction = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isFunction.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isFunction = void 0; + function isFunction(value) { + return typeof value === "function"; + } + exports2.isFunction = isFunction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/lift.js +var require_lift = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/lift.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.operate = exports2.hasLift = void 0; + var isFunction_1 = require_isFunction(); + function hasLift(source) { + return isFunction_1.isFunction(source === null || source === void 0 ? void 0 : source.lift); + } + exports2.hasLift = hasLift; + function operate(init) { + return function(source) { + if (hasLift(source)) { + return source.lift(function(liftedSource) { + try { + return init(liftedSource, this); + } catch (err) { + this.error(err); + } + }); + } + throw new TypeError("Unable to lift unknown Observable type"); + }; + } + exports2.operate = operate; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js +var require_isArrayLike = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isArrayLike = void 0; + exports2.isArrayLike = (function(x) { + return x && typeof x.length === "number" && typeof x !== "function"; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isPromise.js +var require_isPromise = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isPromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isPromise = void 0; + var isFunction_1 = require_isFunction(); + function isPromise(value) { + return isFunction_1.isFunction(value === null || value === void 0 ? void 0 : value.then); + } + exports2.isPromise = isPromise; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js +var require_createErrorClass = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createErrorClass = void 0; + function createErrorClass(createImpl) { + var _super = function(instance) { + Error.call(instance); + instance.stack = new Error().stack; + }; + var ctorFunc = createImpl(_super); + ctorFunc.prototype = Object.create(Error.prototype); + ctorFunc.prototype.constructor = ctorFunc; + return ctorFunc; + } + exports2.createErrorClass = createErrorClass; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js +var require_UnsubscriptionError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnsubscriptionError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.UnsubscriptionError = createErrorClass_1.createErrorClass(function(_super) { + return function UnsubscriptionErrorImpl(errors) { + _super(this); + this.message = errors ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function(err, i) { + return i + 1 + ") " + err.toString(); + }).join("\n ") : ""; + this.name = "UnsubscriptionError"; + this.errors = errors; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js +var require_arrRemove = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arrRemove = void 0; + function arrRemove(arr, item) { + if (arr) { + var index = arr.indexOf(item); + 0 <= index && arr.splice(index, 1); + } + } + exports2.arrRemove = arrRemove; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/Subscription.js +var require_Subscription = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/Subscription.js"(exports2) { + "use strict"; + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function() { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isSubscription = exports2.EMPTY_SUBSCRIPTION = exports2.Subscription = void 0; + var isFunction_1 = require_isFunction(); + var UnsubscriptionError_1 = require_UnsubscriptionError(); + var arrRemove_1 = require_arrRemove(); + var Subscription = (function() { + function Subscription2(initialTeardown) { + this.initialTeardown = initialTeardown; + this.closed = false; + this._parentage = null; + this._finalizers = null; + } + Subscription2.prototype.unsubscribe = function() { + var e_1, _a, e_2, _b; + var errors; + if (!this.closed) { + this.closed = true; + var _parentage = this._parentage; + if (_parentage) { + this._parentage = null; + if (Array.isArray(_parentage)) { + try { + for (var _parentage_1 = __values2(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) { + var parent_1 = _parentage_1_1.value; + parent_1.remove(this); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1); + } finally { + if (e_1) throw e_1.error; + } + } + } else { + _parentage.remove(this); + } + } + var initialFinalizer = this.initialTeardown; + if (isFunction_1.isFunction(initialFinalizer)) { + try { + initialFinalizer(); + } catch (e) { + errors = e instanceof UnsubscriptionError_1.UnsubscriptionError ? e.errors : [e]; + } + } + var _finalizers = this._finalizers; + if (_finalizers) { + this._finalizers = null; + try { + for (var _finalizers_1 = __values2(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) { + var finalizer = _finalizers_1_1.value; + try { + execFinalizer(finalizer); + } catch (err) { + errors = errors !== null && errors !== void 0 ? errors : []; + if (err instanceof UnsubscriptionError_1.UnsubscriptionError) { + errors = __spreadArray2(__spreadArray2([], __read2(errors)), __read2(err.errors)); + } else { + errors.push(err); + } + } + } + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { + try { + if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1); + } finally { + if (e_2) throw e_2.error; + } + } + } + if (errors) { + throw new UnsubscriptionError_1.UnsubscriptionError(errors); + } + } + }; + Subscription2.prototype.add = function(teardown) { + var _a; + if (teardown && teardown !== this) { + if (this.closed) { + execFinalizer(teardown); + } else { + if (teardown instanceof Subscription2) { + if (teardown.closed || teardown._hasParent(this)) { + return; + } + teardown._addParent(this); + } + (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown); + } + } + }; + Subscription2.prototype._hasParent = function(parent) { + var _parentage = this._parentage; + return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent); + }; + Subscription2.prototype._addParent = function(parent) { + var _parentage = this._parentage; + this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; + }; + Subscription2.prototype._removeParent = function(parent) { + var _parentage = this._parentage; + if (_parentage === parent) { + this._parentage = null; + } else if (Array.isArray(_parentage)) { + arrRemove_1.arrRemove(_parentage, parent); + } + }; + Subscription2.prototype.remove = function(teardown) { + var _finalizers = this._finalizers; + _finalizers && arrRemove_1.arrRemove(_finalizers, teardown); + if (teardown instanceof Subscription2) { + teardown._removeParent(this); + } + }; + Subscription2.EMPTY = (function() { + var empty = new Subscription2(); + empty.closed = true; + return empty; + })(); + return Subscription2; + })(); + exports2.Subscription = Subscription; + exports2.EMPTY_SUBSCRIPTION = Subscription.EMPTY; + function isSubscription(value) { + return value instanceof Subscription || value && "closed" in value && isFunction_1.isFunction(value.remove) && isFunction_1.isFunction(value.add) && isFunction_1.isFunction(value.unsubscribe); + } + exports2.isSubscription = isSubscription; + function execFinalizer(finalizer) { + if (isFunction_1.isFunction(finalizer)) { + finalizer(); + } else { + finalizer.unsubscribe(); + } + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/config.js +var require_config = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/config.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.config = void 0; + exports2.config = { + onUnhandledError: null, + onStoppedNotification: null, + Promise: void 0, + useDeprecatedSynchronousErrorHandling: false, + useDeprecatedNextContext: false + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js +var require_timeoutProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timeoutProvider = void 0; + exports2.timeoutProvider = { + setTimeout: function(handler, timeout) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + var delegate = exports2.timeoutProvider.delegate; + if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) { + return delegate.setTimeout.apply(delegate, __spreadArray2([handler, timeout], __read2(args))); + } + return setTimeout.apply(void 0, __spreadArray2([handler, timeout], __read2(args))); + }, + clearTimeout: function(handle) { + var delegate = exports2.timeoutProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js +var require_reportUnhandledError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.reportUnhandledError = void 0; + var config_12 = require_config(); + var timeoutProvider_1 = require_timeoutProvider(); + function reportUnhandledError(err) { + timeoutProvider_1.timeoutProvider.setTimeout(function() { + var onUnhandledError = config_12.config.onUnhandledError; + if (onUnhandledError) { + onUnhandledError(err); + } else { + throw err; + } + }); + } + exports2.reportUnhandledError = reportUnhandledError; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/noop.js +var require_noop = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/noop.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.noop = void 0; + function noop() { + } + exports2.noop = noop; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/NotificationFactories.js +var require_NotificationFactories = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/NotificationFactories.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createNotification = exports2.nextNotification = exports2.errorNotification = exports2.COMPLETE_NOTIFICATION = void 0; + exports2.COMPLETE_NOTIFICATION = (function() { + return createNotification("C", void 0, void 0); + })(); + function errorNotification(error) { + return createNotification("E", void 0, error); + } + exports2.errorNotification = errorNotification; + function nextNotification(value) { + return createNotification("N", value, void 0); + } + exports2.nextNotification = nextNotification; + function createNotification(kind, value, error) { + return { + kind, + value, + error + }; + } + exports2.createNotification = createNotification; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/errorContext.js +var require_errorContext = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/errorContext.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.captureError = exports2.errorContext = void 0; + var config_12 = require_config(); + var context = null; + function errorContext(cb) { + if (config_12.config.useDeprecatedSynchronousErrorHandling) { + var isRoot = !context; + if (isRoot) { + context = { errorThrown: false, error: null }; + } + cb(); + if (isRoot) { + var _a = context, errorThrown = _a.errorThrown, error = _a.error; + context = null; + if (errorThrown) { + throw error; + } + } + } else { + cb(); + } + } + exports2.errorContext = errorContext; + function captureError(err) { + if (config_12.config.useDeprecatedSynchronousErrorHandling && context) { + context.errorThrown = true; + context.error = err; + } + } + exports2.captureError = captureError; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/Subscriber.js +var require_Subscriber = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/Subscriber.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ (function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.EMPTY_OBSERVER = exports2.SafeSubscriber = exports2.Subscriber = void 0; + var isFunction_1 = require_isFunction(); + var Subscription_1 = require_Subscription(); + var config_12 = require_config(); + var reportUnhandledError_1 = require_reportUnhandledError(); + var noop_1 = require_noop(); + var NotificationFactories_1 = require_NotificationFactories(); + var timeoutProvider_1 = require_timeoutProvider(); + var errorContext_1 = require_errorContext(); + var Subscriber = (function(_super) { + __extends2(Subscriber2, _super); + function Subscriber2(destination) { + var _this = _super.call(this) || this; + _this.isStopped = false; + if (destination) { + _this.destination = destination; + if (Subscription_1.isSubscription(destination)) { + destination.add(_this); + } + } else { + _this.destination = exports2.EMPTY_OBSERVER; + } + return _this; + } + Subscriber2.create = function(next, error, complete) { + return new SafeSubscriber(next, error, complete); + }; + Subscriber2.prototype.next = function(value) { + if (this.isStopped) { + handleStoppedNotification(NotificationFactories_1.nextNotification(value), this); + } else { + this._next(value); + } + }; + Subscriber2.prototype.error = function(err) { + if (this.isStopped) { + handleStoppedNotification(NotificationFactories_1.errorNotification(err), this); + } else { + this.isStopped = true; + this._error(err); + } + }; + Subscriber2.prototype.complete = function() { + if (this.isStopped) { + handleStoppedNotification(NotificationFactories_1.COMPLETE_NOTIFICATION, this); + } else { + this.isStopped = true; + this._complete(); + } + }; + Subscriber2.prototype.unsubscribe = function() { + if (!this.closed) { + this.isStopped = true; + _super.prototype.unsubscribe.call(this); + this.destination = null; + } + }; + Subscriber2.prototype._next = function(value) { + this.destination.next(value); + }; + Subscriber2.prototype._error = function(err) { + try { + this.destination.error(err); + } finally { + this.unsubscribe(); + } + }; + Subscriber2.prototype._complete = function() { + try { + this.destination.complete(); + } finally { + this.unsubscribe(); + } + }; + return Subscriber2; + })(Subscription_1.Subscription); + exports2.Subscriber = Subscriber; + var _bind = Function.prototype.bind; + function bind(fn, thisArg) { + return _bind.call(fn, thisArg); + } + var ConsumerObserver = (function() { + function ConsumerObserver2(partialObserver) { + this.partialObserver = partialObserver; + } + ConsumerObserver2.prototype.next = function(value) { + var partialObserver = this.partialObserver; + if (partialObserver.next) { + try { + partialObserver.next(value); + } catch (error) { + handleUnhandledError(error); + } + } + }; + ConsumerObserver2.prototype.error = function(err) { + var partialObserver = this.partialObserver; + if (partialObserver.error) { + try { + partialObserver.error(err); + } catch (error) { + handleUnhandledError(error); + } + } else { + handleUnhandledError(err); + } + }; + ConsumerObserver2.prototype.complete = function() { + var partialObserver = this.partialObserver; + if (partialObserver.complete) { + try { + partialObserver.complete(); + } catch (error) { + handleUnhandledError(error); + } + } + }; + return ConsumerObserver2; + })(); + var SafeSubscriber = (function(_super) { + __extends2(SafeSubscriber2, _super); + function SafeSubscriber2(observerOrNext, error, complete) { + var _this = _super.call(this) || this; + var partialObserver; + if (isFunction_1.isFunction(observerOrNext) || !observerOrNext) { + partialObserver = { + next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : void 0, + error: error !== null && error !== void 0 ? error : void 0, + complete: complete !== null && complete !== void 0 ? complete : void 0 + }; + } else { + var context_1; + if (_this && config_12.config.useDeprecatedNextContext) { + context_1 = Object.create(observerOrNext); + context_1.unsubscribe = function() { + return _this.unsubscribe(); + }; + partialObserver = { + next: observerOrNext.next && bind(observerOrNext.next, context_1), + error: observerOrNext.error && bind(observerOrNext.error, context_1), + complete: observerOrNext.complete && bind(observerOrNext.complete, context_1) + }; + } else { + partialObserver = observerOrNext; + } + } + _this.destination = new ConsumerObserver(partialObserver); + return _this; + } + return SafeSubscriber2; + })(Subscriber); + exports2.SafeSubscriber = SafeSubscriber; + function handleUnhandledError(error) { + if (config_12.config.useDeprecatedSynchronousErrorHandling) { + errorContext_1.captureError(error); + } else { + reportUnhandledError_1.reportUnhandledError(error); + } + } + function defaultErrorHandler(err) { + throw err; + } + function handleStoppedNotification(notification, subscriber) { + var onStoppedNotification = config_12.config.onStoppedNotification; + onStoppedNotification && timeoutProvider_1.timeoutProvider.setTimeout(function() { + return onStoppedNotification(notification, subscriber); + }); + } + exports2.EMPTY_OBSERVER = { + closed: true, + next: noop_1.noop, + error: defaultErrorHandler, + complete: noop_1.noop + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/symbol/observable.js +var require_observable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/symbol/observable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.observable = void 0; + exports2.observable = (function() { + return typeof Symbol === "function" && Symbol.observable || "@@observable"; + })(); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/identity.js +var require_identity = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/identity.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.identity = void 0; + function identity(x) { + return x; + } + exports2.identity = identity; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/pipe.js +var require_pipe = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/pipe.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pipeFromArray = exports2.pipe = void 0; + var identity_1 = require_identity(); + function pipe() { + var fns = []; + for (var _i = 0; _i < arguments.length; _i++) { + fns[_i] = arguments[_i]; + } + return pipeFromArray(fns); + } + exports2.pipe = pipe; + function pipeFromArray(fns) { + if (fns.length === 0) { + return identity_1.identity; + } + if (fns.length === 1) { + return fns[0]; + } + return function piped(input) { + return fns.reduce(function(prev, fn) { + return fn(prev); + }, input); + }; + } + exports2.pipeFromArray = pipeFromArray; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/Observable.js +var require_Observable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/Observable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Observable = void 0; + var Subscriber_1 = require_Subscriber(); + var Subscription_1 = require_Subscription(); + var observable_1 = require_observable(); + var pipe_1 = require_pipe(); + var config_12 = require_config(); + var isFunction_1 = require_isFunction(); + var errorContext_1 = require_errorContext(); + var Observable = (function() { + function Observable2(subscribe) { + if (subscribe) { + this._subscribe = subscribe; + } + } + Observable2.prototype.lift = function(operator) { + var observable = new Observable2(); + observable.source = this; + observable.operator = operator; + return observable; + }; + Observable2.prototype.subscribe = function(observerOrNext, error, complete) { + var _this = this; + var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new Subscriber_1.SafeSubscriber(observerOrNext, error, complete); + errorContext_1.errorContext(function() { + var _a = _this, operator = _a.operator, source = _a.source; + subscriber.add(operator ? operator.call(subscriber, source) : source ? _this._subscribe(subscriber) : _this._trySubscribe(subscriber)); + }); + return subscriber; + }; + Observable2.prototype._trySubscribe = function(sink) { + try { + return this._subscribe(sink); + } catch (err) { + sink.error(err); + } + }; + Observable2.prototype.forEach = function(next, promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function(resolve, reject) { + var subscriber = new Subscriber_1.SafeSubscriber({ + next: function(value) { + try { + next(value); + } catch (err) { + reject(err); + subscriber.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + _this.subscribe(subscriber); + }); + }; + Observable2.prototype._subscribe = function(subscriber) { + var _a; + return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber); + }; + Observable2.prototype[observable_1.observable] = function() { + return this; + }; + Observable2.prototype.pipe = function() { + var operations = []; + for (var _i = 0; _i < arguments.length; _i++) { + operations[_i] = arguments[_i]; + } + return pipe_1.pipeFromArray(operations)(this); + }; + Observable2.prototype.toPromise = function(promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function(resolve, reject) { + var value; + _this.subscribe(function(x) { + return value = x; + }, function(err) { + return reject(err); + }, function() { + return resolve(value); + }); + }); + }; + Observable2.create = function(subscribe) { + return new Observable2(subscribe); + }; + return Observable2; + })(); + exports2.Observable = Observable; + function getPromiseCtor(promiseCtor) { + var _a; + return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config_12.config.Promise) !== null && _a !== void 0 ? _a : Promise; + } + function isObserver(value) { + return value && isFunction_1.isFunction(value.next) && isFunction_1.isFunction(value.error) && isFunction_1.isFunction(value.complete); + } + function isSubscriber(value) { + return value && value instanceof Subscriber_1.Subscriber || isObserver(value) && Subscription_1.isSubscription(value); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js +var require_isInteropObservable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isInteropObservable = void 0; + var observable_1 = require_observable(); + var isFunction_1 = require_isFunction(); + function isInteropObservable(input) { + return isFunction_1.isFunction(input[observable_1.observable]); + } + exports2.isInteropObservable = isInteropObservable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js +var require_isAsyncIterable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isAsyncIterable = void 0; + var isFunction_1 = require_isFunction(); + function isAsyncIterable(obj2) { + return Symbol.asyncIterator && isFunction_1.isFunction(obj2 === null || obj2 === void 0 ? void 0 : obj2[Symbol.asyncIterator]); + } + exports2.isAsyncIterable = isAsyncIterable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js +var require_throwUnobservableError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createInvalidObservableTypeError = void 0; + function createInvalidObservableTypeError(input) { + return new TypeError("You provided " + (input !== null && typeof input === "object" ? "an invalid object" : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."); + } + exports2.createInvalidObservableTypeError = createInvalidObservableTypeError; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js +var require_iterator = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.iterator = exports2.getSymbolIterator = void 0; + function getSymbolIterator() { + if (typeof Symbol !== "function" || !Symbol.iterator) { + return "@@iterator"; + } + return Symbol.iterator; + } + exports2.getSymbolIterator = getSymbolIterator; + exports2.iterator = getSymbolIterator(); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isIterable.js +var require_isIterable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isIterable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isIterable = void 0; + var iterator_1 = require_iterator(); + var isFunction_1 = require_isFunction(); + function isIterable(input) { + return isFunction_1.isFunction(input === null || input === void 0 ? void 0 : input[iterator_1.iterator]); + } + exports2.isIterable = isIterable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js +var require_isReadableStreamLike = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js"(exports2) { + "use strict"; + var __generator2 = exports2 && exports2.__generator || function(thisArg, body) { + var _2 = { label: 0, sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_2) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _2.label++; + return { value: op[1], done: false }; + case 5: + _2.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _2.ops.pop(); + _2.trys.pop(); + continue; + default: + if (!(t = _2.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _2 = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _2.label = op[1]; + break; + } + if (op[0] === 6 && _2.label < t[1]) { + _2.label = t[1]; + t = op; + break; + } + if (t && _2.label < t[2]) { + _2.label = t[2]; + _2.ops.push(op); + break; + } + if (t[2]) _2.ops.pop(); + _2.trys.pop(); + continue; + } + op = body.call(thisArg, _2); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + var __await2 = exports2 && exports2.__await || function(v) { + return this instanceof __await2 ? (this.v = v, this) : new __await2(v); + }; + var __asyncGenerator2 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isReadableStreamLike = exports2.readableStreamLikeToAsyncGenerator = void 0; + var isFunction_1 = require_isFunction(); + function readableStreamLikeToAsyncGenerator(readableStream) { + return __asyncGenerator2(this, arguments, function readableStreamLikeToAsyncGenerator_1() { + var reader, _a, value, done; + return __generator2(this, function(_b) { + switch (_b.label) { + case 0: + reader = readableStream.getReader(); + _b.label = 1; + case 1: + _b.trys.push([1, , 9, 10]); + _b.label = 2; + case 2: + if (false) return [3, 8]; + return [4, __await2(reader.read())]; + case 3: + _a = _b.sent(), value = _a.value, done = _a.done; + if (!done) return [3, 5]; + return [4, __await2(void 0)]; + case 4: + return [2, _b.sent()]; + case 5: + return [4, __await2(value)]; + case 6: + return [4, _b.sent()]; + case 7: + _b.sent(); + return [3, 2]; + case 8: + return [3, 10]; + case 9: + reader.releaseLock(); + return [7]; + case 10: + return [2]; + } + }); + }); + } + exports2.readableStreamLikeToAsyncGenerator = readableStreamLikeToAsyncGenerator; + function isReadableStreamLike(obj2) { + return isFunction_1.isFunction(obj2 === null || obj2 === void 0 ? void 0 : obj2.getReader); + } + exports2.isReadableStreamLike = isReadableStreamLike; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js +var require_innerFrom = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator2 = exports2 && exports2.__generator || function(thisArg, body) { + var _2 = { label: 0, sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_2) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _2.label++; + return { value: op[1], done: false }; + case 5: + _2.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _2.ops.pop(); + _2.trys.pop(); + continue; + default: + if (!(t = _2.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _2 = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _2.label = op[1]; + break; + } + if (op[0] === 6 && _2.label < t[1]) { + _2.label = t[1]; + t = op; + break; + } + if (t && _2.label < t[2]) { + _2.label = t[2]; + _2.ops.push(op); + break; + } + if (t[2]) _2.ops.pop(); + _2.trys.pop(); + continue; + } + op = body.call(thisArg, _2); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values2 === "function" ? __values2(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve, reject) { + v = o[n](v), settle(resolve, reject, v.done, v.value); + }); + }; + } + function settle(resolve, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve({ value: v2, done: d }); + }, reject); + } + }; + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function() { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromReadableStreamLike = exports2.fromAsyncIterable = exports2.fromIterable = exports2.fromPromise = exports2.fromArrayLike = exports2.fromInteropObservable = exports2.innerFrom = void 0; + var isArrayLike_1 = require_isArrayLike(); + var isPromise_1 = require_isPromise(); + var Observable_1 = require_Observable(); + var isInteropObservable_1 = require_isInteropObservable(); + var isAsyncIterable_1 = require_isAsyncIterable(); + var throwUnobservableError_1 = require_throwUnobservableError(); + var isIterable_1 = require_isIterable(); + var isReadableStreamLike_1 = require_isReadableStreamLike(); + var isFunction_1 = require_isFunction(); + var reportUnhandledError_1 = require_reportUnhandledError(); + var observable_1 = require_observable(); + function innerFrom(input) { + if (input instanceof Observable_1.Observable) { + return input; + } + if (input != null) { + if (isInteropObservable_1.isInteropObservable(input)) { + return fromInteropObservable(input); + } + if (isArrayLike_1.isArrayLike(input)) { + return fromArrayLike(input); + } + if (isPromise_1.isPromise(input)) { + return fromPromise(input); + } + if (isAsyncIterable_1.isAsyncIterable(input)) { + return fromAsyncIterable(input); + } + if (isIterable_1.isIterable(input)) { + return fromIterable(input); + } + if (isReadableStreamLike_1.isReadableStreamLike(input)) { + return fromReadableStreamLike(input); + } + } + throw throwUnobservableError_1.createInvalidObservableTypeError(input); + } + exports2.innerFrom = innerFrom; + function fromInteropObservable(obj2) { + return new Observable_1.Observable(function(subscriber) { + var obs = obj2[observable_1.observable](); + if (isFunction_1.isFunction(obs.subscribe)) { + return obs.subscribe(subscriber); + } + throw new TypeError("Provided object does not correctly implement Symbol.observable"); + }); + } + exports2.fromInteropObservable = fromInteropObservable; + function fromArrayLike(array) { + return new Observable_1.Observable(function(subscriber) { + for (var i = 0; i < array.length && !subscriber.closed; i++) { + subscriber.next(array[i]); + } + subscriber.complete(); + }); + } + exports2.fromArrayLike = fromArrayLike; + function fromPromise(promise) { + return new Observable_1.Observable(function(subscriber) { + promise.then(function(value) { + if (!subscriber.closed) { + subscriber.next(value); + subscriber.complete(); + } + }, function(err) { + return subscriber.error(err); + }).then(null, reportUnhandledError_1.reportUnhandledError); + }); + } + exports2.fromPromise = fromPromise; + function fromIterable(iterable) { + return new Observable_1.Observable(function(subscriber) { + var e_1, _a; + try { + for (var iterable_1 = __values2(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) { + var value = iterable_1_1.value; + subscriber.next(value); + if (subscriber.closed) { + return; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1); + } finally { + if (e_1) throw e_1.error; + } + } + subscriber.complete(); + }); + } + exports2.fromIterable = fromIterable; + function fromAsyncIterable(asyncIterable) { + return new Observable_1.Observable(function(subscriber) { + process3(asyncIterable, subscriber).catch(function(err) { + return subscriber.error(err); + }); + }); + } + exports2.fromAsyncIterable = fromAsyncIterable; + function fromReadableStreamLike(readableStream) { + return fromAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(readableStream)); + } + exports2.fromReadableStreamLike = fromReadableStreamLike; + function process3(asyncIterable, subscriber) { + var asyncIterable_1, asyncIterable_1_1; + var e_2, _a; + return __awaiter2(this, void 0, void 0, function() { + var value, e_2_1; + return __generator2(this, function(_b) { + switch (_b.label) { + case 0: + _b.trys.push([0, 5, 6, 11]); + asyncIterable_1 = __asyncValues2(asyncIterable); + _b.label = 1; + case 1: + return [4, asyncIterable_1.next()]; + case 2: + if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4]; + value = asyncIterable_1_1.value; + subscriber.next(value); + if (subscriber.closed) { + return [2]; + } + _b.label = 3; + case 3: + return [3, 1]; + case 4: + return [3, 11]; + case 5: + e_2_1 = _b.sent(); + e_2 = { error: e_2_1 }; + return [3, 11]; + case 6: + _b.trys.push([6, , 9, 10]); + if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8]; + return [4, _a.call(asyncIterable_1)]; + case 7: + _b.sent(); + _b.label = 8; + case 8: + return [3, 10]; + case 9: + if (e_2) throw e_2.error; + return [7]; + case 10: + return [7]; + case 11: + subscriber.complete(); + return [2]; + } + }); + }); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js +var require_OperatorSubscriber = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ (function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OperatorSubscriber = exports2.createOperatorSubscriber = void 0; + var Subscriber_1 = require_Subscriber(); + function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { + return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); + } + exports2.createOperatorSubscriber = createOperatorSubscriber; + var OperatorSubscriber = (function(_super) { + __extends2(OperatorSubscriber2, _super); + function OperatorSubscriber2(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) { + var _this = _super.call(this, destination) || this; + _this.onFinalize = onFinalize; + _this.shouldUnsubscribe = shouldUnsubscribe; + _this._next = onNext ? function(value) { + try { + onNext(value); + } catch (err) { + destination.error(err); + } + } : _super.prototype._next; + _this._error = onError ? function(err) { + try { + onError(err); + } catch (err2) { + destination.error(err2); + } finally { + this.unsubscribe(); + } + } : _super.prototype._error; + _this._complete = onComplete ? function() { + try { + onComplete(); + } catch (err) { + destination.error(err); + } finally { + this.unsubscribe(); + } + } : _super.prototype._complete; + return _this; + } + OperatorSubscriber2.prototype.unsubscribe = function() { + var _a; + if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { + var closed_1 = this.closed; + _super.prototype.unsubscribe.call(this); + !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); + } + }; + return OperatorSubscriber2; + })(Subscriber_1.Subscriber); + exports2.OperatorSubscriber = OperatorSubscriber; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/audit.js +var require_audit = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/audit.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.audit = void 0; + var lift_1 = require_lift(); + var innerFrom_1 = require_innerFrom(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function audit(durationSelector) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var lastValue = null; + var durationSubscriber = null; + var isComplete = false; + var endDuration = function() { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + isComplete && subscriber.complete(); + }; + var cleanupDuration = function() { + durationSubscriber = null; + isComplete && subscriber.complete(); + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + hasValue = true; + lastValue = value; + if (!durationSubscriber) { + innerFrom_1.innerFrom(durationSelector(value)).subscribe(durationSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, endDuration, cleanupDuration)); + } + }, function() { + isComplete = true; + (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); + })); + }); + } + exports2.audit = audit; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js +var require_Action = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ (function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Action = void 0; + var Subscription_1 = require_Subscription(); + var Action = (function(_super) { + __extends2(Action2, _super); + function Action2(scheduler2, work) { + return _super.call(this) || this; + } + Action2.prototype.schedule = function(state, delay) { + if (delay === void 0) { + delay = 0; + } + return this; + }; + return Action2; + })(Subscription_1.Subscription); + exports2.Action = Action; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js +var require_intervalProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.intervalProvider = void 0; + exports2.intervalProvider = { + setInterval: function(handler, timeout) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + var delegate = exports2.intervalProvider.delegate; + if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) { + return delegate.setInterval.apply(delegate, __spreadArray2([handler, timeout], __read2(args))); + } + return setInterval.apply(void 0, __spreadArray2([handler, timeout], __read2(args))); + }, + clearInterval: function(handle) { + var delegate = exports2.intervalProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js +var require_AsyncAction = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ (function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsyncAction = void 0; + var Action_1 = require_Action(); + var intervalProvider_1 = require_intervalProvider(); + var arrRemove_1 = require_arrRemove(); + var AsyncAction = (function(_super) { + __extends2(AsyncAction2, _super); + function AsyncAction2(scheduler2, work) { + var _this = _super.call(this, scheduler2, work) || this; + _this.scheduler = scheduler2; + _this.work = work; + _this.pending = false; + return _this; + } + AsyncAction2.prototype.schedule = function(state, delay) { + var _a; + if (delay === void 0) { + delay = 0; + } + if (this.closed) { + return this; + } + this.state = state; + var id = this.id; + var scheduler2 = this.scheduler; + if (id != null) { + this.id = this.recycleAsyncId(scheduler2, id, delay); + } + this.pending = true; + this.delay = delay; + this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler2, this.id, delay); + return this; + }; + AsyncAction2.prototype.requestAsyncId = function(scheduler2, _id, delay) { + if (delay === void 0) { + delay = 0; + } + return intervalProvider_1.intervalProvider.setInterval(scheduler2.flush.bind(scheduler2, this), delay); + }; + AsyncAction2.prototype.recycleAsyncId = function(_scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay != null && this.delay === delay && this.pending === false) { + return id; + } + if (id != null) { + intervalProvider_1.intervalProvider.clearInterval(id); + } + return void 0; + }; + AsyncAction2.prototype.execute = function(state, delay) { + if (this.closed) { + return new Error("executing a cancelled action"); + } + this.pending = false; + var error = this._execute(state, delay); + if (error) { + return error; + } else if (this.pending === false && this.id != null) { + this.id = this.recycleAsyncId(this.scheduler, this.id, null); + } + }; + AsyncAction2.prototype._execute = function(state, _delay) { + var errored = false; + var errorValue; + try { + this.work(state); + } catch (e) { + errored = true; + errorValue = e ? e : new Error("Scheduled action threw falsy error"); + } + if (errored) { + this.unsubscribe(); + return errorValue; + } + }; + AsyncAction2.prototype.unsubscribe = function() { + if (!this.closed) { + var _a = this, id = _a.id, scheduler2 = _a.scheduler; + var actions = scheduler2.actions; + this.work = this.state = this.scheduler = null; + this.pending = false; + arrRemove_1.arrRemove(actions, this); + if (id != null) { + this.id = this.recycleAsyncId(scheduler2, id, null); + } + this.delay = null; + _super.prototype.unsubscribe.call(this); + } + }; + return AsyncAction2; + })(Action_1.Action); + exports2.AsyncAction = AsyncAction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js +var require_dateTimestampProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.dateTimestampProvider = void 0; + exports2.dateTimestampProvider = { + now: function() { + return (exports2.dateTimestampProvider.delegate || Date).now(); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/Scheduler.js +var require_Scheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/Scheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Scheduler = void 0; + var dateTimestampProvider_1 = require_dateTimestampProvider(); + var Scheduler = (function() { + function Scheduler2(schedulerActionCtor, now) { + if (now === void 0) { + now = Scheduler2.now; + } + this.schedulerActionCtor = schedulerActionCtor; + this.now = now; + } + Scheduler2.prototype.schedule = function(work, delay, state) { + if (delay === void 0) { + delay = 0; + } + return new this.schedulerActionCtor(this, work).schedule(state, delay); + }; + Scheduler2.now = dateTimestampProvider_1.dateTimestampProvider.now; + return Scheduler2; + })(); + exports2.Scheduler = Scheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js +var require_AsyncScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ (function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsyncScheduler = void 0; + var Scheduler_1 = require_Scheduler(); + var AsyncScheduler = (function(_super) { + __extends2(AsyncScheduler2, _super); + function AsyncScheduler2(SchedulerAction, now) { + if (now === void 0) { + now = Scheduler_1.Scheduler.now; + } + var _this = _super.call(this, SchedulerAction, now) || this; + _this.actions = []; + _this._active = false; + return _this; + } + AsyncScheduler2.prototype.flush = function(action) { + var actions = this.actions; + if (this._active) { + actions.push(action); + return; + } + var error; + this._active = true; + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while (action = actions.shift()); + this._active = false; + if (error) { + while (action = actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AsyncScheduler2; + })(Scheduler_1.Scheduler); + exports2.AsyncScheduler = AsyncScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/async.js +var require_async = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/async.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.async = exports2.asyncScheduler = void 0; + var AsyncAction_1 = require_AsyncAction(); + var AsyncScheduler_1 = require_AsyncScheduler(); + exports2.asyncScheduler = new AsyncScheduler_1.AsyncScheduler(AsyncAction_1.AsyncAction); + exports2.async = exports2.asyncScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js +var require_isScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isScheduler = void 0; + var isFunction_1 = require_isFunction(); + function isScheduler(value) { + return value && isFunction_1.isFunction(value.schedule); + } + exports2.isScheduler = isScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isDate.js +var require_isDate2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isDate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isValidDate = void 0; + function isValidDate(value) { + return value instanceof Date && !isNaN(value); + } + exports2.isValidDate = isValidDate; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/timer.js +var require_timer = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/timer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timer = void 0; + var Observable_1 = require_Observable(); + var async_1 = require_async(); + var isScheduler_1 = require_isScheduler(); + var isDate_1 = require_isDate2(); + function timer(dueTime, intervalOrScheduler, scheduler2) { + if (dueTime === void 0) { + dueTime = 0; + } + if (scheduler2 === void 0) { + scheduler2 = async_1.async; + } + var intervalDuration = -1; + if (intervalOrScheduler != null) { + if (isScheduler_1.isScheduler(intervalOrScheduler)) { + scheduler2 = intervalOrScheduler; + } else { + intervalDuration = intervalOrScheduler; + } + } + return new Observable_1.Observable(function(subscriber) { + var due = isDate_1.isValidDate(dueTime) ? +dueTime - scheduler2.now() : dueTime; + if (due < 0) { + due = 0; + } + var n = 0; + return scheduler2.schedule(function() { + if (!subscriber.closed) { + subscriber.next(n++); + if (0 <= intervalDuration) { + this.schedule(void 0, intervalDuration); + } else { + subscriber.complete(); + } + } + }, due); + }); + } + exports2.timer = timer; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js +var require_auditTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.auditTime = void 0; + var async_1 = require_async(); + var audit_1 = require_audit(); + var timer_1 = require_timer(); + function auditTime(duration, scheduler2) { + if (scheduler2 === void 0) { + scheduler2 = async_1.asyncScheduler; + } + return audit_1.audit(function() { + return timer_1.timer(duration, scheduler2); + }); + } + exports2.auditTime = auditTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/buffer.js +var require_buffer = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/buffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buffer = void 0; + var lift_1 = require_lift(); + var noop_1 = require_noop(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + function buffer(closingNotifier) { + return lift_1.operate(function(source, subscriber) { + var currentBuffer = []; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + return currentBuffer.push(value); + }, function() { + subscriber.next(currentBuffer); + subscriber.complete(); + })); + innerFrom_1.innerFrom(closingNotifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + var b = currentBuffer; + currentBuffer = []; + subscriber.next(b); + }, noop_1.noop)); + return function() { + currentBuffer = null; + }; + }); + } + exports2.buffer = buffer; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js +var require_bufferCount = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js"(exports2) { + "use strict"; + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function() { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bufferCount = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var arrRemove_1 = require_arrRemove(); + function bufferCount(bufferSize, startBufferEvery) { + if (startBufferEvery === void 0) { + startBufferEvery = null; + } + startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; + return lift_1.operate(function(source, subscriber) { + var buffers = []; + var count = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var e_1, _a, e_2, _b; + var toEmit = null; + if (count++ % startBufferEvery === 0) { + buffers.push([]); + } + try { + for (var buffers_1 = __values2(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { + var buffer = buffers_1_1.value; + buffer.push(value); + if (bufferSize <= buffer.length) { + toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; + toEmit.push(buffer); + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); + } finally { + if (e_1) throw e_1.error; + } + } + if (toEmit) { + try { + for (var toEmit_1 = __values2(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) { + var buffer = toEmit_1_1.value; + arrRemove_1.arrRemove(buffers, buffer); + subscriber.next(buffer); + } + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { + try { + if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) _b.call(toEmit_1); + } finally { + if (e_2) throw e_2.error; + } + } + } + }, function() { + var e_3, _a; + try { + for (var buffers_2 = __values2(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) { + var buffer = buffers_2_1.value; + subscriber.next(buffer); + } + } catch (e_3_1) { + e_3 = { error: e_3_1 }; + } finally { + try { + if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) _a.call(buffers_2); + } finally { + if (e_3) throw e_3.error; + } + } + subscriber.complete(); + }, void 0, function() { + buffers = null; + })); + }); + } + exports2.bufferCount = bufferCount; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/args.js +var require_args = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/args.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.popNumber = exports2.popScheduler = exports2.popResultSelector = void 0; + var isFunction_1 = require_isFunction(); + var isScheduler_1 = require_isScheduler(); + function last(arr) { + return arr[arr.length - 1]; + } + function popResultSelector(args) { + return isFunction_1.isFunction(last(args)) ? args.pop() : void 0; + } + exports2.popResultSelector = popResultSelector; + function popScheduler(args) { + return isScheduler_1.isScheduler(last(args)) ? args.pop() : void 0; + } + exports2.popScheduler = popScheduler; + function popNumber(args, defaultValue) { + return typeof last(args) === "number" ? args.pop() : defaultValue; + } + exports2.popNumber = popNumber; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js +var require_executeSchedule = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.executeSchedule = void 0; + function executeSchedule(parentSubscription, scheduler2, work, delay, repeat) { + if (delay === void 0) { + delay = 0; + } + if (repeat === void 0) { + repeat = false; + } + var scheduleSubscription = scheduler2.schedule(function() { + work(); + if (repeat) { + parentSubscription.add(this.schedule(null, delay)); + } else { + this.unsubscribe(); + } + }, delay); + parentSubscription.add(scheduleSubscription); + if (!repeat) { + return scheduleSubscription; + } + } + exports2.executeSchedule = executeSchedule; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js +var require_bufferTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js"(exports2) { + "use strict"; + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function() { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bufferTime = void 0; + var Subscription_1 = require_Subscription(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var arrRemove_1 = require_arrRemove(); + var async_1 = require_async(); + var args_1 = require_args(); + var executeSchedule_1 = require_executeSchedule(); + function bufferTime(bufferTimeSpan) { + var _a, _b; + var otherArgs = []; + for (var _i = 1; _i < arguments.length; _i++) { + otherArgs[_i - 1] = arguments[_i]; + } + var scheduler2 = (_a = args_1.popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : async_1.asyncScheduler; + var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var maxBufferSize = otherArgs[1] || Infinity; + return lift_1.operate(function(source, subscriber) { + var bufferRecords = []; + var restartOnEmit = false; + var emit = function(record) { + var buffer = record.buffer, subs = record.subs; + subs.unsubscribe(); + arrRemove_1.arrRemove(bufferRecords, record); + subscriber.next(buffer); + restartOnEmit && startBuffer(); + }; + var startBuffer = function() { + if (bufferRecords) { + var subs = new Subscription_1.Subscription(); + subscriber.add(subs); + var buffer = []; + var record_1 = { + buffer, + subs + }; + bufferRecords.push(record_1); + executeSchedule_1.executeSchedule(subs, scheduler2, function() { + return emit(record_1); + }, bufferTimeSpan); + } + }; + if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { + executeSchedule_1.executeSchedule(subscriber, scheduler2, startBuffer, bufferCreationInterval, true); + } else { + restartOnEmit = true; + } + startBuffer(); + var bufferTimeSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var e_1, _a2; + var recordsCopy = bufferRecords.slice(); + try { + for (var recordsCopy_1 = __values2(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) { + var record = recordsCopy_1_1.value; + var buffer = record.buffer; + buffer.push(value); + maxBufferSize <= buffer.length && emit(record); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a2 = recordsCopy_1.return)) _a2.call(recordsCopy_1); + } finally { + if (e_1) throw e_1.error; + } + } + }, function() { + while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { + subscriber.next(bufferRecords.shift().buffer); + } + bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); + subscriber.complete(); + subscriber.unsubscribe(); + }, void 0, function() { + return bufferRecords = null; + }); + source.subscribe(bufferTimeSubscriber); + }); + } + exports2.bufferTime = bufferTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js +var require_bufferToggle = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js"(exports2) { + "use strict"; + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function() { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bufferToggle = void 0; + var Subscription_1 = require_Subscription(); + var lift_1 = require_lift(); + var innerFrom_1 = require_innerFrom(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + var arrRemove_1 = require_arrRemove(); + function bufferToggle(openings, closingSelector) { + return lift_1.operate(function(source, subscriber) { + var buffers = []; + innerFrom_1.innerFrom(openings).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(openValue) { + var buffer = []; + buffers.push(buffer); + var closingSubscription = new Subscription_1.Subscription(); + var emitBuffer = function() { + arrRemove_1.arrRemove(buffers, buffer); + subscriber.next(buffer); + closingSubscription.unsubscribe(); + }; + closingSubscription.add(innerFrom_1.innerFrom(closingSelector(openValue)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, emitBuffer, noop_1.noop))); + }, noop_1.noop)); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var e_1, _a; + try { + for (var buffers_1 = __values2(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { + var buffer = buffers_1_1.value; + buffer.push(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); + } finally { + if (e_1) throw e_1.error; + } + } + }, function() { + while (buffers.length > 0) { + subscriber.next(buffers.shift()); + } + subscriber.complete(); + })); + }); + } + exports2.bufferToggle = bufferToggle; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js +var require_bufferWhen = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bufferWhen = void 0; + var lift_1 = require_lift(); + var noop_1 = require_noop(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + function bufferWhen(closingSelector) { + return lift_1.operate(function(source, subscriber) { + var buffer = null; + var closingSubscriber = null; + var openBuffer = function() { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + var b = buffer; + buffer = []; + b && subscriber.next(b); + innerFrom_1.innerFrom(closingSelector()).subscribe(closingSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, openBuffer, noop_1.noop)); + }; + openBuffer(); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); + }, function() { + buffer && subscriber.next(buffer); + subscriber.complete(); + }, void 0, function() { + return buffer = closingSubscriber = null; + })); + }); + } + exports2.bufferWhen = bufferWhen; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/catchError.js +var require_catchError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/catchError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.catchError = void 0; + var innerFrom_1 = require_innerFrom(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var lift_1 = require_lift(); + function catchError(selector) { + return lift_1.operate(function(source, subscriber) { + var innerSub = null; + var syncUnsub = false; + var handledResult; + innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, void 0, void 0, function(err) { + handledResult = innerFrom_1.innerFrom(selector(err, catchError(selector)(source))); + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } else { + syncUnsub = true; + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + handledResult.subscribe(subscriber); + } + }); + } + exports2.catchError = catchError; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js +var require_argsArgArrayOrObject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argsArgArrayOrObject = void 0; + var isArray = Array.isArray; + var getPrototypeOf = Object.getPrototypeOf; + var objectProto = Object.prototype; + var getKeys = Object.keys; + function argsArgArrayOrObject(args) { + if (args.length === 1) { + var first_1 = args[0]; + if (isArray(first_1)) { + return { args: first_1, keys: null }; + } + if (isPOJO(first_1)) { + var keys = getKeys(first_1); + return { + args: keys.map(function(key) { + return first_1[key]; + }), + keys + }; + } + } + return { args, keys: null }; + } + exports2.argsArgArrayOrObject = argsArgArrayOrObject; + function isPOJO(obj2) { + return obj2 && typeof obj2 === "object" && getPrototypeOf(obj2) === objectProto; + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js +var require_observeOn = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.observeOn = void 0; + var executeSchedule_1 = require_executeSchedule(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function observeOn(scheduler2, delay) { + if (delay === void 0) { + delay = 0; + } + return lift_1.operate(function(source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + return executeSchedule_1.executeSchedule(subscriber, scheduler2, function() { + return subscriber.next(value); + }, delay); + }, function() { + return executeSchedule_1.executeSchedule(subscriber, scheduler2, function() { + return subscriber.complete(); + }, delay); + }, function(err) { + return executeSchedule_1.executeSchedule(subscriber, scheduler2, function() { + return subscriber.error(err); + }, delay); + })); + }); + } + exports2.observeOn = observeOn; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js +var require_subscribeOn = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.subscribeOn = void 0; + var lift_1 = require_lift(); + function subscribeOn(scheduler2, delay) { + if (delay === void 0) { + delay = 0; + } + return lift_1.operate(function(source, subscriber) { + subscriber.add(scheduler2.schedule(function() { + return source.subscribe(subscriber); + }, delay)); + }); + } + exports2.subscribeOn = subscribeOn; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js +var require_scheduleObservable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleObservable = void 0; + var innerFrom_1 = require_innerFrom(); + var observeOn_1 = require_observeOn(); + var subscribeOn_1 = require_subscribeOn(); + function scheduleObservable(input, scheduler2) { + return innerFrom_1.innerFrom(input).pipe(subscribeOn_1.subscribeOn(scheduler2), observeOn_1.observeOn(scheduler2)); + } + exports2.scheduleObservable = scheduleObservable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js +var require_schedulePromise = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.schedulePromise = void 0; + var innerFrom_1 = require_innerFrom(); + var observeOn_1 = require_observeOn(); + var subscribeOn_1 = require_subscribeOn(); + function schedulePromise(input, scheduler2) { + return innerFrom_1.innerFrom(input).pipe(subscribeOn_1.subscribeOn(scheduler2), observeOn_1.observeOn(scheduler2)); + } + exports2.schedulePromise = schedulePromise; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js +var require_scheduleArray = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleArray = void 0; + var Observable_1 = require_Observable(); + function scheduleArray(input, scheduler2) { + return new Observable_1.Observable(function(subscriber) { + var i = 0; + return scheduler2.schedule(function() { + if (i === input.length) { + subscriber.complete(); + } else { + subscriber.next(input[i++]); + if (!subscriber.closed) { + this.schedule(); + } + } + }); + }); + } + exports2.scheduleArray = scheduleArray; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js +var require_scheduleIterable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleIterable = void 0; + var Observable_1 = require_Observable(); + var iterator_1 = require_iterator(); + var isFunction_1 = require_isFunction(); + var executeSchedule_1 = require_executeSchedule(); + function scheduleIterable(input, scheduler2) { + return new Observable_1.Observable(function(subscriber) { + var iterator; + executeSchedule_1.executeSchedule(subscriber, scheduler2, function() { + iterator = input[iterator_1.iterator](); + executeSchedule_1.executeSchedule(subscriber, scheduler2, function() { + var _a; + var value; + var done; + try { + _a = iterator.next(), value = _a.value, done = _a.done; + } catch (err) { + subscriber.error(err); + return; + } + if (done) { + subscriber.complete(); + } else { + subscriber.next(value); + } + }, 0, true); + }); + return function() { + return isFunction_1.isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); + }; + }); + } + exports2.scheduleIterable = scheduleIterable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js +var require_scheduleAsyncIterable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleAsyncIterable = void 0; + var Observable_1 = require_Observable(); + var executeSchedule_1 = require_executeSchedule(); + function scheduleAsyncIterable(input, scheduler2) { + if (!input) { + throw new Error("Iterable cannot be null"); + } + return new Observable_1.Observable(function(subscriber) { + executeSchedule_1.executeSchedule(subscriber, scheduler2, function() { + var iterator = input[Symbol.asyncIterator](); + executeSchedule_1.executeSchedule(subscriber, scheduler2, function() { + iterator.next().then(function(result) { + if (result.done) { + subscriber.complete(); + } else { + subscriber.next(result.value); + } + }); + }, 0, true); + }); + }); + } + exports2.scheduleAsyncIterable = scheduleAsyncIterable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js +var require_scheduleReadableStreamLike = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduleReadableStreamLike = void 0; + var scheduleAsyncIterable_1 = require_scheduleAsyncIterable(); + var isReadableStreamLike_1 = require_isReadableStreamLike(); + function scheduleReadableStreamLike(input, scheduler2) { + return scheduleAsyncIterable_1.scheduleAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(input), scheduler2); + } + exports2.scheduleReadableStreamLike = scheduleReadableStreamLike; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js +var require_scheduled = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scheduled = void 0; + var scheduleObservable_1 = require_scheduleObservable(); + var schedulePromise_1 = require_schedulePromise(); + var scheduleArray_1 = require_scheduleArray(); + var scheduleIterable_1 = require_scheduleIterable(); + var scheduleAsyncIterable_1 = require_scheduleAsyncIterable(); + var isInteropObservable_1 = require_isInteropObservable(); + var isPromise_1 = require_isPromise(); + var isArrayLike_1 = require_isArrayLike(); + var isIterable_1 = require_isIterable(); + var isAsyncIterable_1 = require_isAsyncIterable(); + var throwUnobservableError_1 = require_throwUnobservableError(); + var isReadableStreamLike_1 = require_isReadableStreamLike(); + var scheduleReadableStreamLike_1 = require_scheduleReadableStreamLike(); + function scheduled(input, scheduler2) { + if (input != null) { + if (isInteropObservable_1.isInteropObservable(input)) { + return scheduleObservable_1.scheduleObservable(input, scheduler2); + } + if (isArrayLike_1.isArrayLike(input)) { + return scheduleArray_1.scheduleArray(input, scheduler2); + } + if (isPromise_1.isPromise(input)) { + return schedulePromise_1.schedulePromise(input, scheduler2); + } + if (isAsyncIterable_1.isAsyncIterable(input)) { + return scheduleAsyncIterable_1.scheduleAsyncIterable(input, scheduler2); + } + if (isIterable_1.isIterable(input)) { + return scheduleIterable_1.scheduleIterable(input, scheduler2); + } + if (isReadableStreamLike_1.isReadableStreamLike(input)) { + return scheduleReadableStreamLike_1.scheduleReadableStreamLike(input, scheduler2); + } + } + throw throwUnobservableError_1.createInvalidObservableTypeError(input); + } + exports2.scheduled = scheduled; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/from.js +var require_from = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/from.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.from = void 0; + var scheduled_1 = require_scheduled(); + var innerFrom_1 = require_innerFrom(); + function from(input, scheduler2) { + return scheduler2 ? scheduled_1.scheduled(input, scheduler2) : innerFrom_1.innerFrom(input); + } + exports2.from = from; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/map.js +var require_map2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/map.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.map = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function map(project, thisArg) { + return lift_1.operate(function(source, subscriber) { + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + subscriber.next(project.call(thisArg, value, index++)); + })); + }); + } + exports2.map = map; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js +var require_mapOneOrManyArgs = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mapOneOrManyArgs = void 0; + var map_1 = require_map2(); + var isArray = Array.isArray; + function callOrApply(fn, args) { + return isArray(args) ? fn.apply(void 0, __spreadArray2([], __read2(args))) : fn(args); + } + function mapOneOrManyArgs(fn) { + return map_1.map(function(args) { + return callOrApply(fn, args); + }); + } + exports2.mapOneOrManyArgs = mapOneOrManyArgs; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/createObject.js +var require_createObject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/createObject.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createObject = void 0; + function createObject(keys, values) { + return keys.reduce(function(result, key, i) { + return result[key] = values[i], result; + }, {}); + } + exports2.createObject = createObject; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js +var require_combineLatest = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineLatestInit = exports2.combineLatest = void 0; + var Observable_1 = require_Observable(); + var argsArgArrayOrObject_1 = require_argsArgArrayOrObject(); + var from_1 = require_from(); + var identity_1 = require_identity(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var args_1 = require_args(); + var createObject_1 = require_createObject(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var executeSchedule_1 = require_executeSchedule(); + function combineLatest() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler2 = args_1.popScheduler(args); + var resultSelector = args_1.popResultSelector(args); + var _a = argsArgArrayOrObject_1.argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys; + if (observables.length === 0) { + return from_1.from([], scheduler2); + } + var result = new Observable_1.Observable(combineLatestInit(observables, scheduler2, keys ? function(values) { + return createObject_1.createObject(keys, values); + } : identity_1.identity)); + return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result; + } + exports2.combineLatest = combineLatest; + function combineLatestInit(observables, scheduler2, valueTransform) { + if (valueTransform === void 0) { + valueTransform = identity_1.identity; + } + return function(subscriber) { + maybeSchedule(scheduler2, function() { + var length = observables.length; + var values = new Array(length); + var active = length; + var remainingFirstValues = length; + var _loop_1 = function(i2) { + maybeSchedule(scheduler2, function() { + var source = from_1.from(observables[i2], scheduler2); + var hasFirstValue = false; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + values[i2] = value; + if (!hasFirstValue) { + hasFirstValue = true; + remainingFirstValues--; + } + if (!remainingFirstValues) { + subscriber.next(valueTransform(values.slice())); + } + }, function() { + if (!--active) { + subscriber.complete(); + } + })); + }, subscriber); + }; + for (var i = 0; i < length; i++) { + _loop_1(i); + } + }, subscriber); + }; + } + exports2.combineLatestInit = combineLatestInit; + function maybeSchedule(scheduler2, execute, subscription) { + if (scheduler2) { + executeSchedule_1.executeSchedule(subscription, scheduler2, execute); + } else { + execute(); + } + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js +var require_mergeInternals = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeInternals = void 0; + var innerFrom_1 = require_innerFrom(); + var executeSchedule_1 = require_executeSchedule(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) { + var buffer = []; + var active = 0; + var index = 0; + var isComplete = false; + var checkComplete = function() { + if (isComplete && !buffer.length && !active) { + subscriber.complete(); + } + }; + var outerNext = function(value) { + return active < concurrent ? doInnerSub(value) : buffer.push(value); + }; + var doInnerSub = function(value) { + expand && subscriber.next(value); + active++; + var innerComplete = false; + innerFrom_1.innerFrom(project(value, index++)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(innerValue) { + onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); + if (expand) { + outerNext(innerValue); + } else { + subscriber.next(innerValue); + } + }, function() { + innerComplete = true; + }, void 0, function() { + if (innerComplete) { + try { + active--; + var _loop_1 = function() { + var bufferedValue = buffer.shift(); + if (innerSubScheduler) { + executeSchedule_1.executeSchedule(subscriber, innerSubScheduler, function() { + return doInnerSub(bufferedValue); + }); + } else { + doInnerSub(bufferedValue); + } + }; + while (buffer.length && active < concurrent) { + _loop_1(); + } + checkComplete(); + } catch (err) { + subscriber.error(err); + } + } + })); + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, outerNext, function() { + isComplete = true; + checkComplete(); + })); + return function() { + additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer(); + }; + } + exports2.mergeInternals = mergeInternals; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js +var require_mergeMap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeMap = void 0; + var map_1 = require_map2(); + var innerFrom_1 = require_innerFrom(); + var lift_1 = require_lift(); + var mergeInternals_1 = require_mergeInternals(); + var isFunction_1 = require_isFunction(); + function mergeMap(project, resultSelector, concurrent) { + if (concurrent === void 0) { + concurrent = Infinity; + } + if (isFunction_1.isFunction(resultSelector)) { + return mergeMap(function(a, i) { + return map_1.map(function(b, ii) { + return resultSelector(a, b, i, ii); + })(innerFrom_1.innerFrom(project(a, i))); + }, concurrent); + } else if (typeof resultSelector === "number") { + concurrent = resultSelector; + } + return lift_1.operate(function(source, subscriber) { + return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent); + }); + } + exports2.mergeMap = mergeMap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js +var require_scanInternals = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scanInternals = void 0; + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { + return function(source, subscriber) { + var hasState = hasSeed; + var state = seed; + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var i = index++; + state = hasState ? accumulator(state, value, i) : (hasState = true, value); + emitOnNext && subscriber.next(state); + }, emitBeforeComplete && (function() { + hasState && subscriber.next(state); + subscriber.complete(); + }))); + }; + } + exports2.scanInternals = scanInternals; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/reduce.js +var require_reduce = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/reduce.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.reduce = void 0; + var scanInternals_1 = require_scanInternals(); + var lift_1 = require_lift(); + function reduce(accumulator, seed) { + return lift_1.operate(scanInternals_1.scanInternals(accumulator, seed, arguments.length >= 2, false, true)); + } + exports2.reduce = reduce; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/toArray.js +var require_toArray = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/toArray.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toArray = void 0; + var reduce_1 = require_reduce(); + var lift_1 = require_lift(); + var arrReducer = function(arr, value) { + return arr.push(value), arr; + }; + function toArray() { + return lift_1.operate(function(source, subscriber) { + reduce_1.reduce(arrReducer, [])(source).subscribe(subscriber); + }); + } + exports2.toArray = toArray; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js +var require_joinAllInternals = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.joinAllInternals = void 0; + var identity_1 = require_identity(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var pipe_1 = require_pipe(); + var mergeMap_1 = require_mergeMap(); + var toArray_1 = require_toArray(); + function joinAllInternals(joinFn, project) { + return pipe_1.pipe(toArray_1.toArray(), mergeMap_1.mergeMap(function(sources) { + return joinFn(sources); + }), project ? mapOneOrManyArgs_1.mapOneOrManyArgs(project) : identity_1.identity); + } + exports2.joinAllInternals = joinAllInternals; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js +var require_combineLatestAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineLatestAll = void 0; + var combineLatest_1 = require_combineLatest(); + var joinAllInternals_1 = require_joinAllInternals(); + function combineLatestAll(project) { + return joinAllInternals_1.joinAllInternals(combineLatest_1.combineLatest, project); + } + exports2.combineLatestAll = combineLatestAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js +var require_combineAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineAll = void 0; + var combineLatestAll_1 = require_combineLatestAll(); + exports2.combineAll = combineLatestAll_1.combineLatestAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js +var require_argsOrArgArray = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argsOrArgArray = void 0; + var isArray = Array.isArray; + function argsOrArgArray(args) { + return args.length === 1 && isArray(args[0]) ? args[0] : args; + } + exports2.argsOrArgArray = argsOrArgArray; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js +var require_combineLatest2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineLatest = void 0; + var combineLatest_1 = require_combineLatest(); + var lift_1 = require_lift(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var pipe_1 = require_pipe(); + var args_1 = require_args(); + function combineLatest() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var resultSelector = args_1.popResultSelector(args); + return resultSelector ? pipe_1.pipe(combineLatest.apply(void 0, __spreadArray2([], __read2(args))), mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : lift_1.operate(function(source, subscriber) { + combineLatest_1.combineLatestInit(__spreadArray2([source], __read2(argsOrArgArray_1.argsOrArgArray(args))))(subscriber); + }); + } + exports2.combineLatest = combineLatest; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js +var require_combineLatestWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.combineLatestWith = void 0; + var combineLatest_1 = require_combineLatest2(); + function combineLatestWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return combineLatest_1.combineLatest.apply(void 0, __spreadArray2([], __read2(otherSources))); + } + exports2.combineLatestWith = combineLatestWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js +var require_mergeAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeAll = void 0; + var mergeMap_1 = require_mergeMap(); + var identity_1 = require_identity(); + function mergeAll(concurrent) { + if (concurrent === void 0) { + concurrent = Infinity; + } + return mergeMap_1.mergeMap(identity_1.identity, concurrent); + } + exports2.mergeAll = mergeAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js +var require_concatAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concatAll = void 0; + var mergeAll_1 = require_mergeAll(); + function concatAll() { + return mergeAll_1.mergeAll(1); + } + exports2.concatAll = concatAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/concat.js +var require_concat2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/concat.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = void 0; + var lift_1 = require_lift(); + var concatAll_1 = require_concatAll(); + var args_1 = require_args(); + var from_1 = require_from(); + function concat() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler2 = args_1.popScheduler(args); + return lift_1.operate(function(source, subscriber) { + concatAll_1.concatAll()(from_1.from(__spreadArray2([source], __read2(args)), scheduler2)).subscribe(subscriber); + }); + } + exports2.concat = concat; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js +var require_concatMap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concatMap = void 0; + var mergeMap_1 = require_mergeMap(); + var isFunction_1 = require_isFunction(); + function concatMap(project, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? mergeMap_1.mergeMap(project, resultSelector, 1) : mergeMap_1.mergeMap(project, 1); + } + exports2.concatMap = concatMap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js +var require_concatMapTo = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concatMapTo = void 0; + var concatMap_1 = require_concatMap(); + var isFunction_1 = require_isFunction(); + function concatMapTo(innerObservable, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? concatMap_1.concatMap(function() { + return innerObservable; + }, resultSelector) : concatMap_1.concatMap(function() { + return innerObservable; + }); + } + exports2.concatMapTo = concatMapTo; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js +var require_concatWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concatWith = void 0; + var concat_1 = require_concat2(); + function concatWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return concat_1.concat.apply(void 0, __spreadArray2([], __read2(otherSources))); + } + exports2.concatWith = concatWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js +var require_ObjectUnsubscribedError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ObjectUnsubscribedError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.ObjectUnsubscribedError = createErrorClass_1.createErrorClass(function(_super) { + return function ObjectUnsubscribedErrorImpl() { + _super(this); + this.name = "ObjectUnsubscribedError"; + this.message = "object unsubscribed"; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/Subject.js +var require_Subject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/Subject.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ (function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function() { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousSubject = exports2.Subject = void 0; + var Observable_1 = require_Observable(); + var Subscription_1 = require_Subscription(); + var ObjectUnsubscribedError_1 = require_ObjectUnsubscribedError(); + var arrRemove_1 = require_arrRemove(); + var errorContext_1 = require_errorContext(); + var Subject = (function(_super) { + __extends2(Subject2, _super); + function Subject2() { + var _this = _super.call(this) || this; + _this.closed = false; + _this.currentObservers = null; + _this.observers = []; + _this.isStopped = false; + _this.hasError = false; + _this.thrownError = null; + return _this; + } + Subject2.prototype.lift = function(operator) { + var subject = new AnonymousSubject(this, this); + subject.operator = operator; + return subject; + }; + Subject2.prototype._throwIfClosed = function() { + if (this.closed) { + throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); + } + }; + Subject2.prototype.next = function(value) { + var _this = this; + errorContext_1.errorContext(function() { + var e_1, _a; + _this._throwIfClosed(); + if (!_this.isStopped) { + if (!_this.currentObservers) { + _this.currentObservers = Array.from(_this.observers); + } + try { + for (var _b = __values2(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) { + var observer = _c.value; + observer.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } finally { + if (e_1) throw e_1.error; + } + } + } + }); + }; + Subject2.prototype.error = function(err) { + var _this = this; + errorContext_1.errorContext(function() { + _this._throwIfClosed(); + if (!_this.isStopped) { + _this.hasError = _this.isStopped = true; + _this.thrownError = err; + var observers = _this.observers; + while (observers.length) { + observers.shift().error(err); + } + } + }); + }; + Subject2.prototype.complete = function() { + var _this = this; + errorContext_1.errorContext(function() { + _this._throwIfClosed(); + if (!_this.isStopped) { + _this.isStopped = true; + var observers = _this.observers; + while (observers.length) { + observers.shift().complete(); + } + } + }); + }; + Subject2.prototype.unsubscribe = function() { + this.isStopped = this.closed = true; + this.observers = this.currentObservers = null; + }; + Object.defineProperty(Subject2.prototype, "observed", { + get: function() { + var _a; + return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; + }, + enumerable: false, + configurable: true + }); + Subject2.prototype._trySubscribe = function(subscriber) { + this._throwIfClosed(); + return _super.prototype._trySubscribe.call(this, subscriber); + }; + Subject2.prototype._subscribe = function(subscriber) { + this._throwIfClosed(); + this._checkFinalizedStatuses(subscriber); + return this._innerSubscribe(subscriber); + }; + Subject2.prototype._innerSubscribe = function(subscriber) { + var _this = this; + var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers; + if (hasError || isStopped) { + return Subscription_1.EMPTY_SUBSCRIPTION; + } + this.currentObservers = null; + observers.push(subscriber); + return new Subscription_1.Subscription(function() { + _this.currentObservers = null; + arrRemove_1.arrRemove(observers, subscriber); + }); + }; + Subject2.prototype._checkFinalizedStatuses = function(subscriber) { + var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped; + if (hasError) { + subscriber.error(thrownError); + } else if (isStopped) { + subscriber.complete(); + } + }; + Subject2.prototype.asObservable = function() { + var observable = new Observable_1.Observable(); + observable.source = this; + return observable; + }; + Subject2.create = function(destination, source) { + return new AnonymousSubject(destination, source); + }; + return Subject2; + })(Observable_1.Observable); + exports2.Subject = Subject; + var AnonymousSubject = (function(_super) { + __extends2(AnonymousSubject2, _super); + function AnonymousSubject2(destination, source) { + var _this = _super.call(this) || this; + _this.destination = destination; + _this.source = source; + return _this; + } + AnonymousSubject2.prototype.next = function(value) { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value); + }; + AnonymousSubject2.prototype.error = function(err) { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err); + }; + AnonymousSubject2.prototype.complete = function() { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a); + }; + AnonymousSubject2.prototype._subscribe = function(subscriber) { + var _a, _b; + return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : Subscription_1.EMPTY_SUBSCRIPTION; + }; + return AnonymousSubject2; + })(Subject); + exports2.AnonymousSubject = AnonymousSubject; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js +var require_fromSubscribable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromSubscribable = void 0; + var Observable_1 = require_Observable(); + function fromSubscribable(subscribable) { + return new Observable_1.Observable(function(subscriber) { + return subscribable.subscribe(subscriber); + }); + } + exports2.fromSubscribable = fromSubscribable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/connect.js +var require_connect = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/connect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.connect = void 0; + var Subject_1 = require_Subject(); + var innerFrom_1 = require_innerFrom(); + var lift_1 = require_lift(); + var fromSubscribable_1 = require_fromSubscribable(); + var DEFAULT_CONFIG = { + connector: function() { + return new Subject_1.Subject(); + } + }; + function connect(selector, config) { + if (config === void 0) { + config = DEFAULT_CONFIG; + } + var connector = config.connector; + return lift_1.operate(function(source, subscriber) { + var subject = connector(); + innerFrom_1.innerFrom(selector(fromSubscribable_1.fromSubscribable(subject))).subscribe(subscriber); + subscriber.add(source.subscribe(subject)); + }); + } + exports2.connect = connect; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/count.js +var require_count = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/count.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.count = void 0; + var reduce_1 = require_reduce(); + function count(predicate) { + return reduce_1.reduce(function(total, value, i) { + return !predicate || predicate(value, i) ? total + 1 : total; + }, 0); + } + exports2.count = count; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/debounce.js +var require_debounce = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/debounce.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.debounce = void 0; + var lift_1 = require_lift(); + var noop_1 = require_noop(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + function debounce(durationSelector) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var lastValue = null; + var durationSubscriber = null; + var emit = function() { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + hasValue = true; + lastValue = value; + durationSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, emit, noop_1.noop); + innerFrom_1.innerFrom(durationSelector(value)).subscribe(durationSubscriber); + }, function() { + emit(); + subscriber.complete(); + }, void 0, function() { + lastValue = durationSubscriber = null; + })); + }); + } + exports2.debounce = debounce; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js +var require_debounceTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.debounceTime = void 0; + var async_1 = require_async(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function debounceTime(dueTime, scheduler2) { + if (scheduler2 === void 0) { + scheduler2 = async_1.asyncScheduler; + } + return lift_1.operate(function(source, subscriber) { + var activeTask = null; + var lastValue = null; + var lastTime = null; + var emit = function() { + if (activeTask) { + activeTask.unsubscribe(); + activeTask = null; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + function emitWhenIdle() { + var targetTime = lastTime + dueTime; + var now = scheduler2.now(); + if (now < targetTime) { + activeTask = this.schedule(void 0, targetTime - now); + subscriber.add(activeTask); + return; + } + emit(); + } + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + lastValue = value; + lastTime = scheduler2.now(); + if (!activeTask) { + activeTask = scheduler2.schedule(emitWhenIdle, dueTime); + subscriber.add(activeTask); + } + }, function() { + emit(); + subscriber.complete(); + }, void 0, function() { + lastValue = activeTask = null; + })); + }); + } + exports2.debounceTime = debounceTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js +var require_defaultIfEmpty = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultIfEmpty = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function defaultIfEmpty(defaultValue) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + hasValue = true; + subscriber.next(value); + }, function() { + if (!hasValue) { + subscriber.next(defaultValue); + } + subscriber.complete(); + })); + }); + } + exports2.defaultIfEmpty = defaultIfEmpty; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/concat.js +var require_concat3 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/concat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = void 0; + var concatAll_1 = require_concatAll(); + var args_1 = require_args(); + var from_1 = require_from(); + function concat() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return concatAll_1.concatAll()(from_1.from(args, args_1.popScheduler(args))); + } + exports2.concat = concat; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/empty.js +var require_empty = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/empty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.empty = exports2.EMPTY = void 0; + var Observable_1 = require_Observable(); + exports2.EMPTY = new Observable_1.Observable(function(subscriber) { + return subscriber.complete(); + }); + function empty(scheduler2) { + return scheduler2 ? emptyScheduled(scheduler2) : exports2.EMPTY; + } + exports2.empty = empty; + function emptyScheduled(scheduler2) { + return new Observable_1.Observable(function(subscriber) { + return scheduler2.schedule(function() { + return subscriber.complete(); + }); + }); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/take.js +var require_take = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/take.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.take = void 0; + var empty_1 = require_empty(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function take(count) { + return count <= 0 ? function() { + return empty_1.EMPTY; + } : lift_1.operate(function(source, subscriber) { + var seen = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + if (++seen <= count) { + subscriber.next(value); + if (count <= seen) { + subscriber.complete(); + } + } + })); + }); + } + exports2.take = take; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js +var require_ignoreElements = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ignoreElements = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + function ignoreElements() { + return lift_1.operate(function(source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, noop_1.noop)); + }); + } + exports2.ignoreElements = ignoreElements; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js +var require_mapTo = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mapTo = void 0; + var map_1 = require_map2(); + function mapTo(value) { + return map_1.map(function() { + return value; + }); + } + exports2.mapTo = mapTo; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js +var require_delayWhen = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delayWhen = void 0; + var concat_1 = require_concat3(); + var take_1 = require_take(); + var ignoreElements_1 = require_ignoreElements(); + var mapTo_1 = require_mapTo(); + var mergeMap_1 = require_mergeMap(); + var innerFrom_1 = require_innerFrom(); + function delayWhen(delayDurationSelector, subscriptionDelay) { + if (subscriptionDelay) { + return function(source) { + return concat_1.concat(subscriptionDelay.pipe(take_1.take(1), ignoreElements_1.ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); + }; + } + return mergeMap_1.mergeMap(function(value, index) { + return innerFrom_1.innerFrom(delayDurationSelector(value, index)).pipe(take_1.take(1), mapTo_1.mapTo(value)); + }); + } + exports2.delayWhen = delayWhen; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/delay.js +var require_delay = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = void 0; + var async_1 = require_async(); + var delayWhen_1 = require_delayWhen(); + var timer_1 = require_timer(); + function delay(due, scheduler2) { + if (scheduler2 === void 0) { + scheduler2 = async_1.asyncScheduler; + } + var duration = timer_1.timer(due, scheduler2); + return delayWhen_1.delayWhen(function() { + return duration; + }); + } + exports2.delay = delay; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/of.js +var require_of = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/of.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.of = void 0; + var args_1 = require_args(); + var from_1 = require_from(); + function of() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler2 = args_1.popScheduler(args); + return from_1.from(args, scheduler2); + } + exports2.of = of; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/throwError.js +var require_throwError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/throwError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throwError = void 0; + var Observable_1 = require_Observable(); + var isFunction_1 = require_isFunction(); + function throwError(errorOrErrorFactory, scheduler2) { + var errorFactory = isFunction_1.isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function() { + return errorOrErrorFactory; + }; + var init = function(subscriber) { + return subscriber.error(errorFactory()); + }; + return new Observable_1.Observable(scheduler2 ? function(subscriber) { + return scheduler2.schedule(init, 0, subscriber); + } : init); + } + exports2.throwError = throwError; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/Notification.js +var require_Notification = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/Notification.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.observeNotification = exports2.Notification = exports2.NotificationKind = void 0; + var empty_1 = require_empty(); + var of_1 = require_of(); + var throwError_1 = require_throwError(); + var isFunction_1 = require_isFunction(); + var NotificationKind; + (function(NotificationKind2) { + NotificationKind2["NEXT"] = "N"; + NotificationKind2["ERROR"] = "E"; + NotificationKind2["COMPLETE"] = "C"; + })(NotificationKind = exports2.NotificationKind || (exports2.NotificationKind = {})); + var Notification = (function() { + function Notification2(kind, value, error) { + this.kind = kind; + this.value = value; + this.error = error; + this.hasValue = kind === "N"; + } + Notification2.prototype.observe = function(observer) { + return observeNotification(this, observer); + }; + Notification2.prototype.do = function(nextHandler, errorHandler, completeHandler) { + var _a = this, kind = _a.kind, value = _a.value, error = _a.error; + return kind === "N" ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === "E" ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler(); + }; + Notification2.prototype.accept = function(nextOrObserver, error, complete) { + var _a; + return isFunction_1.isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next) ? this.observe(nextOrObserver) : this.do(nextOrObserver, error, complete); + }; + Notification2.prototype.toObservable = function() { + var _a = this, kind = _a.kind, value = _a.value, error = _a.error; + var result = kind === "N" ? of_1.of(value) : kind === "E" ? throwError_1.throwError(function() { + return error; + }) : kind === "C" ? empty_1.EMPTY : 0; + if (!result) { + throw new TypeError("Unexpected notification kind " + kind); + } + return result; + }; + Notification2.createNext = function(value) { + return new Notification2("N", value); + }; + Notification2.createError = function(err) { + return new Notification2("E", void 0, err); + }; + Notification2.createComplete = function() { + return Notification2.completeNotification; + }; + Notification2.completeNotification = new Notification2("C"); + return Notification2; + })(); + exports2.Notification = Notification; + function observeNotification(notification, observer) { + var _a, _b, _c; + var _d = notification, kind = _d.kind, value = _d.value, error = _d.error; + if (typeof kind !== "string") { + throw new TypeError('Invalid notification, missing "kind"'); + } + kind === "N" ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === "E" ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer); + } + exports2.observeNotification = observeNotification; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js +var require_dematerialize = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.dematerialize = void 0; + var Notification_1 = require_Notification(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function dematerialize() { + return lift_1.operate(function(source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(notification) { + return Notification_1.observeNotification(notification, subscriber); + })); + }); + } + exports2.dematerialize = dematerialize; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/distinct.js +var require_distinct = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/distinct.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.distinct = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + var innerFrom_1 = require_innerFrom(); + function distinct(keySelector, flushes) { + return lift_1.operate(function(source, subscriber) { + var distinctKeys = /* @__PURE__ */ new Set(); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var key = keySelector ? keySelector(value) : value; + if (!distinctKeys.has(key)) { + distinctKeys.add(key); + subscriber.next(value); + } + })); + flushes && innerFrom_1.innerFrom(flushes).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + return distinctKeys.clear(); + }, noop_1.noop)); + }); + } + exports2.distinct = distinct; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js +var require_distinctUntilChanged = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.distinctUntilChanged = void 0; + var identity_1 = require_identity(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function distinctUntilChanged(comparator, keySelector) { + if (keySelector === void 0) { + keySelector = identity_1.identity; + } + comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; + return lift_1.operate(function(source, subscriber) { + var previousKey; + var first = true; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var currentKey = keySelector(value); + if (first || !comparator(previousKey, currentKey)) { + first = false; + previousKey = currentKey; + subscriber.next(value); + } + })); + }); + } + exports2.distinctUntilChanged = distinctUntilChanged; + function defaultCompare(a, b) { + return a === b; + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js +var require_distinctUntilKeyChanged = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.distinctUntilKeyChanged = void 0; + var distinctUntilChanged_1 = require_distinctUntilChanged(); + function distinctUntilKeyChanged(key, compare) { + return distinctUntilChanged_1.distinctUntilChanged(function(x, y) { + return compare ? compare(x[key], y[key]) : x[key] === y[key]; + }); + } + exports2.distinctUntilKeyChanged = distinctUntilKeyChanged; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js +var require_ArgumentOutOfRangeError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ArgumentOutOfRangeError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.ArgumentOutOfRangeError = createErrorClass_1.createErrorClass(function(_super) { + return function ArgumentOutOfRangeErrorImpl() { + _super(this); + this.name = "ArgumentOutOfRangeError"; + this.message = "argument out of range"; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/filter.js +var require_filter2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/filter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.filter = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function filter(predicate, thisArg) { + return lift_1.operate(function(source, subscriber) { + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + return predicate.call(thisArg, value, index++) && subscriber.next(value); + })); + }); + } + exports2.filter = filter; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js +var require_EmptyError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.EmptyError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.EmptyError = createErrorClass_1.createErrorClass(function(_super) { + return function EmptyErrorImpl() { + _super(this); + this.name = "EmptyError"; + this.message = "no elements in sequence"; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js +var require_throwIfEmpty = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throwIfEmpty = void 0; + var EmptyError_1 = require_EmptyError(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function throwIfEmpty(errorFactory) { + if (errorFactory === void 0) { + errorFactory = defaultErrorFactory; + } + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + hasValue = true; + subscriber.next(value); + }, function() { + return hasValue ? subscriber.complete() : subscriber.error(errorFactory()); + })); + }); + } + exports2.throwIfEmpty = throwIfEmpty; + function defaultErrorFactory() { + return new EmptyError_1.EmptyError(); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js +var require_elementAt = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.elementAt = void 0; + var ArgumentOutOfRangeError_1 = require_ArgumentOutOfRangeError(); + var filter_1 = require_filter2(); + var throwIfEmpty_1 = require_throwIfEmpty(); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + var take_1 = require_take(); + function elementAt(index, defaultValue) { + if (index < 0) { + throw new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); + } + var hasDefaultValue = arguments.length >= 2; + return function(source) { + return source.pipe(filter_1.filter(function(v, i) { + return i === index; + }), take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function() { + return new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); + })); + }; + } + exports2.elementAt = elementAt; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/endWith.js +var require_endWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/endWith.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.endWith = void 0; + var concat_1 = require_concat3(); + var of_1 = require_of(); + function endWith() { + var values = []; + for (var _i = 0; _i < arguments.length; _i++) { + values[_i] = arguments[_i]; + } + return function(source) { + return concat_1.concat(source, of_1.of.apply(void 0, __spreadArray2([], __read2(values)))); + }; + } + exports2.endWith = endWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/every.js +var require_every = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/every.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.every = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function every(predicate, thisArg) { + return lift_1.operate(function(source, subscriber) { + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + if (!predicate.call(thisArg, value, index++, source)) { + subscriber.next(false); + subscriber.complete(); + } + }, function() { + subscriber.next(true); + subscriber.complete(); + })); + }); + } + exports2.every = every; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js +var require_exhaustMap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exhaustMap = void 0; + var map_1 = require_map2(); + var innerFrom_1 = require_innerFrom(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function exhaustMap(project, resultSelector) { + if (resultSelector) { + return function(source) { + return source.pipe(exhaustMap(function(a, i) { + return innerFrom_1.innerFrom(project(a, i)).pipe(map_1.map(function(b, ii) { + return resultSelector(a, b, i, ii); + })); + })); + }; + } + return lift_1.operate(function(source, subscriber) { + var index = 0; + var innerSub = null; + var isComplete = false; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(outerValue) { + if (!innerSub) { + innerSub = OperatorSubscriber_1.createOperatorSubscriber(subscriber, void 0, function() { + innerSub = null; + isComplete && subscriber.complete(); + }); + innerFrom_1.innerFrom(project(outerValue, index++)).subscribe(innerSub); + } + }, function() { + isComplete = true; + !innerSub && subscriber.complete(); + })); + }); + } + exports2.exhaustMap = exhaustMap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js +var require_exhaustAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exhaustAll = void 0; + var exhaustMap_1 = require_exhaustMap(); + var identity_1 = require_identity(); + function exhaustAll() { + return exhaustMap_1.exhaustMap(identity_1.identity); + } + exports2.exhaustAll = exhaustAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js +var require_exhaust = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exhaust = void 0; + var exhaustAll_1 = require_exhaustAll(); + exports2.exhaust = exhaustAll_1.exhaustAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/expand.js +var require_expand = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/expand.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.expand = void 0; + var lift_1 = require_lift(); + var mergeInternals_1 = require_mergeInternals(); + function expand(project, concurrent, scheduler2) { + if (concurrent === void 0) { + concurrent = Infinity; + } + concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; + return lift_1.operate(function(source, subscriber) { + return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent, void 0, true, scheduler2); + }); + } + exports2.expand = expand; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/finalize.js +var require_finalize = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/finalize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.finalize = void 0; + var lift_1 = require_lift(); + function finalize(callback) { + return lift_1.operate(function(source, subscriber) { + try { + source.subscribe(subscriber); + } finally { + subscriber.add(callback); + } + }); + } + exports2.finalize = finalize; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/find.js +var require_find = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/find.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createFind = exports2.find = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function find(predicate, thisArg) { + return lift_1.operate(createFind(predicate, thisArg, "value")); + } + exports2.find = find; + function createFind(predicate, thisArg, emit) { + var findIndex = emit === "index"; + return function(source, subscriber) { + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var i = index++; + if (predicate.call(thisArg, value, i, source)) { + subscriber.next(findIndex ? i : value); + subscriber.complete(); + } + }, function() { + subscriber.next(findIndex ? -1 : void 0); + subscriber.complete(); + })); + }; + } + exports2.createFind = createFind; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js +var require_findIndex = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findIndex = void 0; + var lift_1 = require_lift(); + var find_1 = require_find(); + function findIndex(predicate, thisArg) { + return lift_1.operate(find_1.createFind(predicate, thisArg, "index")); + } + exports2.findIndex = findIndex; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/first.js +var require_first = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/first.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.first = void 0; + var EmptyError_1 = require_EmptyError(); + var filter_1 = require_filter2(); + var take_1 = require_take(); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + var throwIfEmpty_1 = require_throwIfEmpty(); + var identity_1 = require_identity(); + function first(predicate, defaultValue) { + var hasDefaultValue = arguments.length >= 2; + return function(source) { + return source.pipe(predicate ? filter_1.filter(function(v, i) { + return predicate(v, i, source); + }) : identity_1.identity, take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function() { + return new EmptyError_1.EmptyError(); + })); + }; + } + exports2.first = first; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js +var require_groupBy = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.groupBy = void 0; + var Observable_1 = require_Observable(); + var innerFrom_1 = require_innerFrom(); + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function groupBy(keySelector, elementOrOptions, duration, connector) { + return lift_1.operate(function(source, subscriber) { + var element; + if (!elementOrOptions || typeof elementOrOptions === "function") { + element = elementOrOptions; + } else { + duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector; + } + var groups = /* @__PURE__ */ new Map(); + var notify = function(cb) { + groups.forEach(cb); + cb(subscriber); + }; + var handleError = function(err) { + return notify(function(consumer) { + return consumer.error(err); + }); + }; + var activeGroups = 0; + var teardownAttempted = false; + var groupBySourceSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function(value) { + try { + var key_1 = keySelector(value); + var group_1 = groups.get(key_1); + if (!group_1) { + groups.set(key_1, group_1 = connector ? connector() : new Subject_1.Subject()); + var grouped = createGroupedObservable(key_1, group_1); + subscriber.next(grouped); + if (duration) { + var durationSubscriber_1 = OperatorSubscriber_1.createOperatorSubscriber(group_1, function() { + group_1.complete(); + durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe(); + }, void 0, void 0, function() { + return groups.delete(key_1); + }); + groupBySourceSubscriber.add(innerFrom_1.innerFrom(duration(grouped)).subscribe(durationSubscriber_1)); + } + } + group_1.next(element ? element(value) : value); + } catch (err) { + handleError(err); + } + }, function() { + return notify(function(consumer) { + return consumer.complete(); + }); + }, handleError, function() { + return groups.clear(); + }, function() { + teardownAttempted = true; + return activeGroups === 0; + }); + source.subscribe(groupBySourceSubscriber); + function createGroupedObservable(key, groupSubject) { + var result = new Observable_1.Observable(function(groupSubscriber) { + activeGroups++; + var innerSub = groupSubject.subscribe(groupSubscriber); + return function() { + innerSub.unsubscribe(); + --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe(); + }; + }); + result.key = key; + return result; + } + }); + } + exports2.groupBy = groupBy; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js +var require_isEmpty2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isEmpty = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function isEmpty() { + return lift_1.operate(function(source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + subscriber.next(false); + subscriber.complete(); + }, function() { + subscriber.next(true); + subscriber.complete(); + })); + }); + } + exports2.isEmpty = isEmpty; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js +var require_takeLast = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js"(exports2) { + "use strict"; + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function() { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.takeLast = void 0; + var empty_1 = require_empty(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function takeLast(count) { + return count <= 0 ? function() { + return empty_1.EMPTY; + } : lift_1.operate(function(source, subscriber) { + var buffer = []; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + buffer.push(value); + count < buffer.length && buffer.shift(); + }, function() { + var e_1, _a; + try { + for (var buffer_1 = __values2(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) { + var value = buffer_1_1.value; + subscriber.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1); + } finally { + if (e_1) throw e_1.error; + } + } + subscriber.complete(); + }, void 0, function() { + buffer = null; + })); + }); + } + exports2.takeLast = takeLast; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/last.js +var require_last = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/last.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.last = void 0; + var EmptyError_1 = require_EmptyError(); + var filter_1 = require_filter2(); + var takeLast_1 = require_takeLast(); + var throwIfEmpty_1 = require_throwIfEmpty(); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + var identity_1 = require_identity(); + function last(predicate, defaultValue) { + var hasDefaultValue = arguments.length >= 2; + return function(source) { + return source.pipe(predicate ? filter_1.filter(function(v, i) { + return predicate(v, i, source); + }) : identity_1.identity, takeLast_1.takeLast(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function() { + return new EmptyError_1.EmptyError(); + })); + }; + } + exports2.last = last; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/materialize.js +var require_materialize = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/materialize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.materialize = void 0; + var Notification_1 = require_Notification(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function materialize() { + return lift_1.operate(function(source, subscriber) { + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + subscriber.next(Notification_1.Notification.createNext(value)); + }, function() { + subscriber.next(Notification_1.Notification.createComplete()); + subscriber.complete(); + }, function(err) { + subscriber.next(Notification_1.Notification.createError(err)); + subscriber.complete(); + })); + }); + } + exports2.materialize = materialize; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/max.js +var require_max2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/max.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.max = void 0; + var reduce_1 = require_reduce(); + var isFunction_1 = require_isFunction(); + function max(comparer) { + return reduce_1.reduce(isFunction_1.isFunction(comparer) ? function(x, y) { + return comparer(x, y) > 0 ? x : y; + } : function(x, y) { + return x > y ? x : y; + }); + } + exports2.max = max; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/merge.js +var require_merge2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/merge.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.merge = void 0; + var lift_1 = require_lift(); + var mergeAll_1 = require_mergeAll(); + var args_1 = require_args(); + var from_1 = require_from(); + function merge() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler2 = args_1.popScheduler(args); + var concurrent = args_1.popNumber(args, Infinity); + return lift_1.operate(function(source, subscriber) { + mergeAll_1.mergeAll(concurrent)(from_1.from(__spreadArray2([source], __read2(args)), scheduler2)).subscribe(subscriber); + }); + } + exports2.merge = merge; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js +var require_flatMap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.flatMap = void 0; + var mergeMap_1 = require_mergeMap(); + exports2.flatMap = mergeMap_1.mergeMap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js +var require_mergeMapTo = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeMapTo = void 0; + var mergeMap_1 = require_mergeMap(); + var isFunction_1 = require_isFunction(); + function mergeMapTo(innerObservable, resultSelector, concurrent) { + if (concurrent === void 0) { + concurrent = Infinity; + } + if (isFunction_1.isFunction(resultSelector)) { + return mergeMap_1.mergeMap(function() { + return innerObservable; + }, resultSelector, concurrent); + } + if (typeof resultSelector === "number") { + concurrent = resultSelector; + } + return mergeMap_1.mergeMap(function() { + return innerObservable; + }, concurrent); + } + exports2.mergeMapTo = mergeMapTo; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js +var require_mergeScan = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeScan = void 0; + var lift_1 = require_lift(); + var mergeInternals_1 = require_mergeInternals(); + function mergeScan(accumulator, seed, concurrent) { + if (concurrent === void 0) { + concurrent = Infinity; + } + return lift_1.operate(function(source, subscriber) { + var state = seed; + return mergeInternals_1.mergeInternals(source, subscriber, function(value, index) { + return accumulator(state, value, index); + }, concurrent, function(value) { + state = value; + }, false, void 0, function() { + return state = null; + }); + }); + } + exports2.mergeScan = mergeScan; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js +var require_mergeWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeWith = void 0; + var merge_1 = require_merge2(); + function mergeWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return merge_1.merge.apply(void 0, __spreadArray2([], __read2(otherSources))); + } + exports2.mergeWith = mergeWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/min.js +var require_min = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/min.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.min = void 0; + var reduce_1 = require_reduce(); + var isFunction_1 = require_isFunction(); + function min(comparer) { + return reduce_1.reduce(isFunction_1.isFunction(comparer) ? function(x, y) { + return comparer(x, y) < 0 ? x : y; + } : function(x, y) { + return x < y ? x : y; + }); + } + exports2.min = min; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/refCount.js +var require_refCount = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/refCount.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.refCount = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function refCount() { + return lift_1.operate(function(source, subscriber) { + var connection = null; + source._refCount++; + var refCounter = OperatorSubscriber_1.createOperatorSubscriber(subscriber, void 0, void 0, void 0, function() { + if (!source || source._refCount <= 0 || 0 < --source._refCount) { + connection = null; + return; + } + var sharedConnection = source._connection; + var conn = connection; + connection = null; + if (sharedConnection && (!conn || sharedConnection === conn)) { + sharedConnection.unsubscribe(); + } + subscriber.unsubscribe(); + }); + source.subscribe(refCounter); + if (!refCounter.closed) { + connection = source.connect(); + } + }); + } + exports2.refCount = refCount; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js +var require_ConnectableObservable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ (function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ConnectableObservable = void 0; + var Observable_1 = require_Observable(); + var Subscription_1 = require_Subscription(); + var refCount_1 = require_refCount(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var lift_1 = require_lift(); + var ConnectableObservable = (function(_super) { + __extends2(ConnectableObservable2, _super); + function ConnectableObservable2(source, subjectFactory) { + var _this = _super.call(this) || this; + _this.source = source; + _this.subjectFactory = subjectFactory; + _this._subject = null; + _this._refCount = 0; + _this._connection = null; + if (lift_1.hasLift(source)) { + _this.lift = source.lift; + } + return _this; + } + ConnectableObservable2.prototype._subscribe = function(subscriber) { + return this.getSubject().subscribe(subscriber); + }; + ConnectableObservable2.prototype.getSubject = function() { + var subject = this._subject; + if (!subject || subject.isStopped) { + this._subject = this.subjectFactory(); + } + return this._subject; + }; + ConnectableObservable2.prototype._teardown = function() { + this._refCount = 0; + var _connection = this._connection; + this._subject = this._connection = null; + _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); + }; + ConnectableObservable2.prototype.connect = function() { + var _this = this; + var connection = this._connection; + if (!connection) { + connection = this._connection = new Subscription_1.Subscription(); + var subject_1 = this.getSubject(); + connection.add(this.source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subject_1, void 0, function() { + _this._teardown(); + subject_1.complete(); + }, function(err) { + _this._teardown(); + subject_1.error(err); + }, function() { + return _this._teardown(); + }))); + if (connection.closed) { + this._connection = null; + connection = Subscription_1.Subscription.EMPTY; + } + } + return connection; + }; + ConnectableObservable2.prototype.refCount = function() { + return refCount_1.refCount()(this); + }; + return ConnectableObservable2; + })(Observable_1.Observable); + exports2.ConnectableObservable = ConnectableObservable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/multicast.js +var require_multicast = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/multicast.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multicast = void 0; + var ConnectableObservable_1 = require_ConnectableObservable(); + var isFunction_1 = require_isFunction(); + var connect_1 = require_connect(); + function multicast(subjectOrSubjectFactory, selector) { + var subjectFactory = isFunction_1.isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function() { + return subjectOrSubjectFactory; + }; + if (isFunction_1.isFunction(selector)) { + return connect_1.connect(selector, { + connector: subjectFactory + }); + } + return function(source) { + return new ConnectableObservable_1.ConnectableObservable(source, subjectFactory); + }; + } + exports2.multicast = multicast; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js +var require_onErrorResumeNext = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.onErrorResumeNext = void 0; + var Observable_1 = require_Observable(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + var innerFrom_1 = require_innerFrom(); + function onErrorResumeNext() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + var nextSources = argsOrArgArray_1.argsOrArgArray(sources); + return new Observable_1.Observable(function(subscriber) { + var sourceIndex = 0; + var subscribeNext = function() { + if (sourceIndex < nextSources.length) { + var nextSource = void 0; + try { + nextSource = innerFrom_1.innerFrom(nextSources[sourceIndex++]); + } catch (err) { + subscribeNext(); + return; + } + var innerSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, void 0, noop_1.noop, noop_1.noop); + nextSource.subscribe(innerSubscriber); + innerSubscriber.add(subscribeNext); + } else { + subscriber.complete(); + } + }; + subscribeNext(); + }); + } + exports2.onErrorResumeNext = onErrorResumeNext; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js +var require_onErrorResumeNextWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.onErrorResumeNext = exports2.onErrorResumeNextWith = void 0; + var argsOrArgArray_1 = require_argsOrArgArray(); + var onErrorResumeNext_1 = require_onErrorResumeNext(); + function onErrorResumeNextWith() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + var nextSources = argsOrArgArray_1.argsOrArgArray(sources); + return function(source) { + return onErrorResumeNext_1.onErrorResumeNext.apply(void 0, __spreadArray2([source], __read2(nextSources))); + }; + } + exports2.onErrorResumeNextWith = onErrorResumeNextWith; + exports2.onErrorResumeNext = onErrorResumeNextWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js +var require_pairwise = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pairwise = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function pairwise() { + return lift_1.operate(function(source, subscriber) { + var prev; + var hasPrev = false; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var p = prev; + prev = value; + hasPrev && subscriber.next([p, value]); + hasPrev = true; + })); + }); + } + exports2.pairwise = pairwise; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/not.js +var require_not = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/not.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.not = void 0; + function not(pred, thisArg) { + return function(value, index) { + return !pred.call(thisArg, value, index); + }; + } + exports2.not = not; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/partition.js +var require_partition = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/partition.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.partition = void 0; + var not_1 = require_not(); + var filter_1 = require_filter2(); + function partition(predicate, thisArg) { + return function(source) { + return [filter_1.filter(predicate, thisArg)(source), filter_1.filter(not_1.not(predicate, thisArg))(source)]; + }; + } + exports2.partition = partition; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/pluck.js +var require_pluck = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/pluck.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pluck = void 0; + var map_1 = require_map2(); + function pluck() { + var properties = []; + for (var _i = 0; _i < arguments.length; _i++) { + properties[_i] = arguments[_i]; + } + var length = properties.length; + if (length === 0) { + throw new Error("list of properties cannot be empty."); + } + return map_1.map(function(x) { + var currentProp = x; + for (var i = 0; i < length; i++) { + var p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]]; + if (typeof p !== "undefined") { + currentProp = p; + } else { + return void 0; + } + } + return currentProp; + }); + } + exports2.pluck = pluck; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/publish.js +var require_publish = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/publish.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publish = void 0; + var Subject_1 = require_Subject(); + var multicast_1 = require_multicast(); + var connect_1 = require_connect(); + function publish(selector) { + return selector ? function(source) { + return connect_1.connect(selector)(source); + } : function(source) { + return multicast_1.multicast(new Subject_1.Subject())(source); + }; + } + exports2.publish = publish; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/BehaviorSubject.js +var require_BehaviorSubject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/BehaviorSubject.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ (function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BehaviorSubject = void 0; + var Subject_1 = require_Subject(); + var BehaviorSubject = (function(_super) { + __extends2(BehaviorSubject2, _super); + function BehaviorSubject2(_value) { + var _this = _super.call(this) || this; + _this._value = _value; + return _this; + } + Object.defineProperty(BehaviorSubject2.prototype, "value", { + get: function() { + return this.getValue(); + }, + enumerable: false, + configurable: true + }); + BehaviorSubject2.prototype._subscribe = function(subscriber) { + var subscription = _super.prototype._subscribe.call(this, subscriber); + !subscription.closed && subscriber.next(this._value); + return subscription; + }; + BehaviorSubject2.prototype.getValue = function() { + var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value; + if (hasError) { + throw thrownError; + } + this._throwIfClosed(); + return _value; + }; + BehaviorSubject2.prototype.next = function(value) { + _super.prototype.next.call(this, this._value = value); + }; + return BehaviorSubject2; + })(Subject_1.Subject); + exports2.BehaviorSubject = BehaviorSubject; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js +var require_publishBehavior = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publishBehavior = void 0; + var BehaviorSubject_1 = require_BehaviorSubject(); + var ConnectableObservable_1 = require_ConnectableObservable(); + function publishBehavior(initialValue) { + return function(source) { + var subject = new BehaviorSubject_1.BehaviorSubject(initialValue); + return new ConnectableObservable_1.ConnectableObservable(source, function() { + return subject; + }); + }; + } + exports2.publishBehavior = publishBehavior; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/AsyncSubject.js +var require_AsyncSubject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/AsyncSubject.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ (function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsyncSubject = void 0; + var Subject_1 = require_Subject(); + var AsyncSubject = (function(_super) { + __extends2(AsyncSubject2, _super); + function AsyncSubject2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this._value = null; + _this._hasValue = false; + _this._isComplete = false; + return _this; + } + AsyncSubject2.prototype._checkFinalizedStatuses = function(subscriber) { + var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete; + if (hasError) { + subscriber.error(thrownError); + } else if (isStopped || _isComplete) { + _hasValue && subscriber.next(_value); + subscriber.complete(); + } + }; + AsyncSubject2.prototype.next = function(value) { + if (!this.isStopped) { + this._value = value; + this._hasValue = true; + } + }; + AsyncSubject2.prototype.complete = function() { + var _a = this, _hasValue = _a._hasValue, _value = _a._value, _isComplete = _a._isComplete; + if (!_isComplete) { + this._isComplete = true; + _hasValue && _super.prototype.next.call(this, _value); + _super.prototype.complete.call(this); + } + }; + return AsyncSubject2; + })(Subject_1.Subject); + exports2.AsyncSubject = AsyncSubject; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js +var require_publishLast = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publishLast = void 0; + var AsyncSubject_1 = require_AsyncSubject(); + var ConnectableObservable_1 = require_ConnectableObservable(); + function publishLast() { + return function(source) { + var subject = new AsyncSubject_1.AsyncSubject(); + return new ConnectableObservable_1.ConnectableObservable(source, function() { + return subject; + }); + }; + } + exports2.publishLast = publishLast; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/ReplaySubject.js +var require_ReplaySubject = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/ReplaySubject.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ (function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ReplaySubject = void 0; + var Subject_1 = require_Subject(); + var dateTimestampProvider_1 = require_dateTimestampProvider(); + var ReplaySubject = (function(_super) { + __extends2(ReplaySubject2, _super); + function ReplaySubject2(_bufferSize, _windowTime, _timestampProvider) { + if (_bufferSize === void 0) { + _bufferSize = Infinity; + } + if (_windowTime === void 0) { + _windowTime = Infinity; + } + if (_timestampProvider === void 0) { + _timestampProvider = dateTimestampProvider_1.dateTimestampProvider; + } + var _this = _super.call(this) || this; + _this._bufferSize = _bufferSize; + _this._windowTime = _windowTime; + _this._timestampProvider = _timestampProvider; + _this._buffer = []; + _this._infiniteTimeWindow = true; + _this._infiniteTimeWindow = _windowTime === Infinity; + _this._bufferSize = Math.max(1, _bufferSize); + _this._windowTime = Math.max(1, _windowTime); + return _this; + } + ReplaySubject2.prototype.next = function(value) { + var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime; + if (!isStopped) { + _buffer.push(value); + !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); + } + this._trimBuffer(); + _super.prototype.next.call(this, value); + }; + ReplaySubject2.prototype._subscribe = function(subscriber) { + this._throwIfClosed(); + this._trimBuffer(); + var subscription = this._innerSubscribe(subscriber); + var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer; + var copy = _buffer.slice(); + for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { + subscriber.next(copy[i]); + } + this._checkFinalizedStatuses(subscriber); + return subscription; + }; + ReplaySubject2.prototype._trimBuffer = function() { + var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow; + var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; + _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); + if (!_infiniteTimeWindow) { + var now = _timestampProvider.now(); + var last = 0; + for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) { + last = i; + } + last && _buffer.splice(0, last + 1); + } + }; + return ReplaySubject2; + })(Subject_1.Subject); + exports2.ReplaySubject = ReplaySubject; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js +var require_publishReplay = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.publishReplay = void 0; + var ReplaySubject_1 = require_ReplaySubject(); + var multicast_1 = require_multicast(); + var isFunction_1 = require_isFunction(); + function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) { + if (selectorOrScheduler && !isFunction_1.isFunction(selectorOrScheduler)) { + timestampProvider = selectorOrScheduler; + } + var selector = isFunction_1.isFunction(selectorOrScheduler) ? selectorOrScheduler : void 0; + return function(source) { + return multicast_1.multicast(new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); + }; + } + exports2.publishReplay = publishReplay; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/race.js +var require_race = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/race.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.raceInit = exports2.race = void 0; + var Observable_1 = require_Observable(); + var innerFrom_1 = require_innerFrom(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function race() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + sources = argsOrArgArray_1.argsOrArgArray(sources); + return sources.length === 1 ? innerFrom_1.innerFrom(sources[0]) : new Observable_1.Observable(raceInit(sources)); + } + exports2.race = race; + function raceInit(sources) { + return function(subscriber) { + var subscriptions = []; + var _loop_1 = function(i2) { + subscriptions.push(innerFrom_1.innerFrom(sources[i2]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + if (subscriptions) { + for (var s = 0; s < subscriptions.length; s++) { + s !== i2 && subscriptions[s].unsubscribe(); + } + subscriptions = null; + } + subscriber.next(value); + }))); + }; + for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { + _loop_1(i); + } + }; + } + exports2.raceInit = raceInit; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js +var require_raceWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.raceWith = void 0; + var race_1 = require_race(); + var lift_1 = require_lift(); + var identity_1 = require_identity(); + function raceWith() { + var otherSources = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherSources[_i] = arguments[_i]; + } + return !otherSources.length ? identity_1.identity : lift_1.operate(function(source, subscriber) { + race_1.raceInit(__spreadArray2([source], __read2(otherSources)))(subscriber); + }); + } + exports2.raceWith = raceWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/race.js +var require_race2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/race.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.race = void 0; + var argsOrArgArray_1 = require_argsOrArgArray(); + var raceWith_1 = require_raceWith(); + function race() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return raceWith_1.raceWith.apply(void 0, __spreadArray2([], __read2(argsOrArgArray_1.argsOrArgArray(args)))); + } + exports2.race = race; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/repeat.js +var require_repeat = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/repeat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.repeat = void 0; + var empty_1 = require_empty(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + var timer_1 = require_timer(); + function repeat(countOrConfig) { + var _a; + var count = Infinity; + var delay; + if (countOrConfig != null) { + if (typeof countOrConfig === "object") { + _a = countOrConfig.count, count = _a === void 0 ? Infinity : _a, delay = countOrConfig.delay; + } else { + count = countOrConfig; + } + } + return count <= 0 ? function() { + return empty_1.EMPTY; + } : lift_1.operate(function(source, subscriber) { + var soFar = 0; + var sourceSub; + var resubscribe = function() { + sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe(); + sourceSub = null; + if (delay != null) { + var notifier = typeof delay === "number" ? timer_1.timer(delay) : innerFrom_1.innerFrom(delay(soFar)); + var notifierSubscriber_1 = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + notifierSubscriber_1.unsubscribe(); + subscribeToSource(); + }); + notifier.subscribe(notifierSubscriber_1); + } else { + subscribeToSource(); + } + }; + var subscribeToSource = function() { + var syncUnsub = false; + sourceSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, void 0, function() { + if (++soFar < count) { + if (sourceSub) { + resubscribe(); + } else { + syncUnsub = true; + } + } else { + subscriber.complete(); + } + })); + if (syncUnsub) { + resubscribe(); + } + }; + subscribeToSource(); + }); + } + exports2.repeat = repeat; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js +var require_repeatWhen = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.repeatWhen = void 0; + var innerFrom_1 = require_innerFrom(); + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function repeatWhen(notifier) { + return lift_1.operate(function(source, subscriber) { + var innerSub; + var syncResub = false; + var completions$; + var isNotifierComplete = false; + var isMainComplete = false; + var checkComplete = function() { + return isMainComplete && isNotifierComplete && (subscriber.complete(), true); + }; + var getCompletionSubject = function() { + if (!completions$) { + completions$ = new Subject_1.Subject(); + innerFrom_1.innerFrom(notifier(completions$)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + if (innerSub) { + subscribeForRepeatWhen(); + } else { + syncResub = true; + } + }, function() { + isNotifierComplete = true; + checkComplete(); + })); + } + return completions$; + }; + var subscribeForRepeatWhen = function() { + isMainComplete = false; + innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, void 0, function() { + isMainComplete = true; + !checkComplete() && getCompletionSubject().next(); + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRepeatWhen(); + } + }; + subscribeForRepeatWhen(); + }); + } + exports2.repeatWhen = repeatWhen; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/retry.js +var require_retry = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/retry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retry = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var identity_1 = require_identity(); + var timer_1 = require_timer(); + var innerFrom_1 = require_innerFrom(); + function retry(configOrCount) { + if (configOrCount === void 0) { + configOrCount = Infinity; + } + var config; + if (configOrCount && typeof configOrCount === "object") { + config = configOrCount; + } else { + config = { + count: configOrCount + }; + } + var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b; + return count <= 0 ? identity_1.identity : lift_1.operate(function(source, subscriber) { + var soFar = 0; + var innerSub; + var subscribeForRetry = function() { + var syncUnsub = false; + innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + if (resetOnSuccess) { + soFar = 0; + } + subscriber.next(value); + }, void 0, function(err) { + if (soFar++ < count) { + var resub_1 = function() { + if (innerSub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } else { + syncUnsub = true; + } + }; + if (delay != null) { + var notifier = typeof delay === "number" ? timer_1.timer(delay) : innerFrom_1.innerFrom(delay(err, soFar)); + var notifierSubscriber_1 = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + notifierSubscriber_1.unsubscribe(); + resub_1(); + }, function() { + subscriber.complete(); + }); + notifier.subscribe(notifierSubscriber_1); + } else { + resub_1(); + } + } else { + subscriber.error(err); + } + })); + if (syncUnsub) { + innerSub.unsubscribe(); + innerSub = null; + subscribeForRetry(); + } + }; + subscribeForRetry(); + }); + } + exports2.retry = retry; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js +var require_retryWhen = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryWhen = void 0; + var innerFrom_1 = require_innerFrom(); + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function retryWhen(notifier) { + return lift_1.operate(function(source, subscriber) { + var innerSub; + var syncResub = false; + var errors$; + var subscribeForRetryWhen = function() { + innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, void 0, void 0, function(err) { + if (!errors$) { + errors$ = new Subject_1.Subject(); + innerFrom_1.innerFrom(notifier(errors$)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + return innerSub ? subscribeForRetryWhen() : syncResub = true; + })); + } + if (errors$) { + errors$.next(err); + } + })); + if (syncResub) { + innerSub.unsubscribe(); + innerSub = null; + syncResub = false; + subscribeForRetryWhen(); + } + }; + subscribeForRetryWhen(); + }); + } + exports2.retryWhen = retryWhen; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/sample.js +var require_sample = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/sample.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sample = void 0; + var innerFrom_1 = require_innerFrom(); + var lift_1 = require_lift(); + var noop_1 = require_noop(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function sample(notifier) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var lastValue = null; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + hasValue = true; + lastValue = value; + })); + innerFrom_1.innerFrom(notifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + if (hasValue) { + hasValue = false; + var value = lastValue; + lastValue = null; + subscriber.next(value); + } + }, noop_1.noop)); + }); + } + exports2.sample = sample; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/interval.js +var require_interval = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/interval.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.interval = void 0; + var async_1 = require_async(); + var timer_1 = require_timer(); + function interval(period, scheduler2) { + if (period === void 0) { + period = 0; + } + if (scheduler2 === void 0) { + scheduler2 = async_1.asyncScheduler; + } + if (period < 0) { + period = 0; + } + return timer_1.timer(period, period, scheduler2); + } + exports2.interval = interval; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js +var require_sampleTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sampleTime = void 0; + var async_1 = require_async(); + var sample_1 = require_sample(); + var interval_1 = require_interval(); + function sampleTime(period, scheduler2) { + if (scheduler2 === void 0) { + scheduler2 = async_1.asyncScheduler; + } + return sample_1.sample(interval_1.interval(period, scheduler2)); + } + exports2.sampleTime = sampleTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/scan.js +var require_scan = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/scan.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.scan = void 0; + var lift_1 = require_lift(); + var scanInternals_1 = require_scanInternals(); + function scan(accumulator, seed) { + return lift_1.operate(scanInternals_1.scanInternals(accumulator, seed, arguments.length >= 2, true)); + } + exports2.scan = scan; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js +var require_sequenceEqual = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sequenceEqual = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + function sequenceEqual(compareTo, comparator) { + if (comparator === void 0) { + comparator = function(a, b) { + return a === b; + }; + } + return lift_1.operate(function(source, subscriber) { + var aState = createState(); + var bState = createState(); + var emit = function(isEqual) { + subscriber.next(isEqual); + subscriber.complete(); + }; + var createSubscriber = function(selfState, otherState) { + var sequenceEqualSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(a) { + var buffer = otherState.buffer, complete = otherState.complete; + if (buffer.length === 0) { + complete ? emit(false) : selfState.buffer.push(a); + } else { + !comparator(a, buffer.shift()) && emit(false); + } + }, function() { + selfState.complete = true; + var complete = otherState.complete, buffer = otherState.buffer; + complete && emit(buffer.length === 0); + sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); + }); + return sequenceEqualSubscriber; + }; + source.subscribe(createSubscriber(aState, bState)); + innerFrom_1.innerFrom(compareTo).subscribe(createSubscriber(bState, aState)); + }); + } + exports2.sequenceEqual = sequenceEqual; + function createState() { + return { + buffer: [], + complete: false + }; + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/share.js +var require_share = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/share.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.share = void 0; + var innerFrom_1 = require_innerFrom(); + var Subject_1 = require_Subject(); + var Subscriber_1 = require_Subscriber(); + var lift_1 = require_lift(); + function share(options) { + if (options === void 0) { + options = {}; + } + var _a = options.connector, connector = _a === void 0 ? function() { + return new Subject_1.Subject(); + } : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d; + return function(wrapperSource) { + var connection; + var resetConnection; + var subject; + var refCount = 0; + var hasCompleted = false; + var hasErrored = false; + var cancelReset = function() { + resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); + resetConnection = void 0; + }; + var reset = function() { + cancelReset(); + connection = subject = void 0; + hasCompleted = hasErrored = false; + }; + var resetAndUnsubscribe = function() { + var conn = connection; + reset(); + conn === null || conn === void 0 ? void 0 : conn.unsubscribe(); + }; + return lift_1.operate(function(source, subscriber) { + refCount++; + if (!hasErrored && !hasCompleted) { + cancelReset(); + } + var dest = subject = subject !== null && subject !== void 0 ? subject : connector(); + subscriber.add(function() { + refCount--; + if (refCount === 0 && !hasErrored && !hasCompleted) { + resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); + } + }); + dest.subscribe(subscriber); + if (!connection && refCount > 0) { + connection = new Subscriber_1.SafeSubscriber({ + next: function(value) { + return dest.next(value); + }, + error: function(err) { + hasErrored = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnError, err); + dest.error(err); + }, + complete: function() { + hasCompleted = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnComplete); + dest.complete(); + } + }); + innerFrom_1.innerFrom(source).subscribe(connection); + } + })(wrapperSource); + }; + } + exports2.share = share; + function handleReset(reset, on) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + if (on === true) { + reset(); + return; + } + if (on === false) { + return; + } + var onSubscriber = new Subscriber_1.SafeSubscriber({ + next: function() { + onSubscriber.unsubscribe(); + reset(); + } + }); + return innerFrom_1.innerFrom(on.apply(void 0, __spreadArray2([], __read2(args)))).subscribe(onSubscriber); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js +var require_shareReplay = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.shareReplay = void 0; + var ReplaySubject_1 = require_ReplaySubject(); + var share_1 = require_share(); + function shareReplay(configOrBufferSize, windowTime, scheduler2) { + var _a, _b, _c; + var bufferSize; + var refCount = false; + if (configOrBufferSize && typeof configOrBufferSize === "object") { + _a = configOrBufferSize.bufferSize, bufferSize = _a === void 0 ? Infinity : _a, _b = configOrBufferSize.windowTime, windowTime = _b === void 0 ? Infinity : _b, _c = configOrBufferSize.refCount, refCount = _c === void 0 ? false : _c, scheduler2 = configOrBufferSize.scheduler; + } else { + bufferSize = configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity; + } + return share_1.share({ + connector: function() { + return new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, scheduler2); + }, + resetOnError: true, + resetOnComplete: false, + resetOnRefCountZero: refCount + }); + } + exports2.shareReplay = shareReplay; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js +var require_SequenceError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SequenceError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.SequenceError = createErrorClass_1.createErrorClass(function(_super) { + return function SequenceErrorImpl(message) { + _super(this); + this.name = "SequenceError"; + this.message = message; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js +var require_NotFoundError = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NotFoundError = void 0; + var createErrorClass_1 = require_createErrorClass(); + exports2.NotFoundError = createErrorClass_1.createErrorClass(function(_super) { + return function NotFoundErrorImpl(message) { + _super(this); + this.name = "NotFoundError"; + this.message = message; + }; + }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/single.js +var require_single = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/single.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.single = void 0; + var EmptyError_1 = require_EmptyError(); + var SequenceError_1 = require_SequenceError(); + var NotFoundError_1 = require_NotFoundError(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function single(predicate) { + return lift_1.operate(function(source, subscriber) { + var hasValue = false; + var singleValue; + var seenValue = false; + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + seenValue = true; + if (!predicate || predicate(value, index++, source)) { + hasValue && subscriber.error(new SequenceError_1.SequenceError("Too many matching values")); + hasValue = true; + singleValue = value; + } + }, function() { + if (hasValue) { + subscriber.next(singleValue); + subscriber.complete(); + } else { + subscriber.error(seenValue ? new NotFoundError_1.NotFoundError("No matching values") : new EmptyError_1.EmptyError()); + } + })); + }); + } + exports2.single = single; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/skip.js +var require_skip = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/skip.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skip = void 0; + var filter_1 = require_filter2(); + function skip(count) { + return filter_1.filter(function(_2, index) { + return count <= index; + }); + } + exports2.skip = skip; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js +var require_skipLast = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skipLast = void 0; + var identity_1 = require_identity(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function skipLast(skipCount) { + return skipCount <= 0 ? identity_1.identity : lift_1.operate(function(source, subscriber) { + var ring = new Array(skipCount); + var seen = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var valueIndex = seen++; + if (valueIndex < skipCount) { + ring[valueIndex] = value; + } else { + var index = valueIndex % skipCount; + var oldValue = ring[index]; + ring[index] = value; + subscriber.next(oldValue); + } + })); + return function() { + ring = null; + }; + }); + } + exports2.skipLast = skipLast; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js +var require_skipUntil = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skipUntil = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + var noop_1 = require_noop(); + function skipUntil(notifier) { + return lift_1.operate(function(source, subscriber) { + var taking = false; + var skipSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); + taking = true; + }, noop_1.noop); + innerFrom_1.innerFrom(notifier).subscribe(skipSubscriber); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + return taking && subscriber.next(value); + })); + }); + } + exports2.skipUntil = skipUntil; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js +var require_skipWhile = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.skipWhile = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function skipWhile(predicate) { + return lift_1.operate(function(source, subscriber) { + var taking = false; + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); + })); + }); + } + exports2.skipWhile = skipWhile; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/startWith.js +var require_startWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/startWith.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.startWith = void 0; + var concat_1 = require_concat3(); + var args_1 = require_args(); + var lift_1 = require_lift(); + function startWith() { + var values = []; + for (var _i = 0; _i < arguments.length; _i++) { + values[_i] = arguments[_i]; + } + var scheduler2 = args_1.popScheduler(values); + return lift_1.operate(function(source, subscriber) { + (scheduler2 ? concat_1.concat(values, source, scheduler2) : concat_1.concat(values, source)).subscribe(subscriber); + }); + } + exports2.startWith = startWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js +var require_switchMap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.switchMap = void 0; + var innerFrom_1 = require_innerFrom(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function switchMap(project, resultSelector) { + return lift_1.operate(function(source, subscriber) { + var innerSubscriber = null; + var index = 0; + var isComplete = false; + var checkComplete = function() { + return isComplete && !innerSubscriber && subscriber.complete(); + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); + var innerIndex = 0; + var outerIndex = index++; + innerFrom_1.innerFrom(project(value, outerIndex)).subscribe(innerSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(innerValue) { + return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); + }, function() { + innerSubscriber = null; + checkComplete(); + })); + }, function() { + isComplete = true; + checkComplete(); + })); + }); + } + exports2.switchMap = switchMap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js +var require_switchAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.switchAll = void 0; + var switchMap_1 = require_switchMap(); + var identity_1 = require_identity(); + function switchAll() { + return switchMap_1.switchMap(identity_1.identity); + } + exports2.switchAll = switchAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js +var require_switchMapTo = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.switchMapTo = void 0; + var switchMap_1 = require_switchMap(); + var isFunction_1 = require_isFunction(); + function switchMapTo(innerObservable, resultSelector) { + return isFunction_1.isFunction(resultSelector) ? switchMap_1.switchMap(function() { + return innerObservable; + }, resultSelector) : switchMap_1.switchMap(function() { + return innerObservable; + }); + } + exports2.switchMapTo = switchMapTo; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js +var require_switchScan = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.switchScan = void 0; + var switchMap_1 = require_switchMap(); + var lift_1 = require_lift(); + function switchScan(accumulator, seed) { + return lift_1.operate(function(source, subscriber) { + var state = seed; + switchMap_1.switchMap(function(value, index) { + return accumulator(state, value, index); + }, function(_2, innerValue) { + return state = innerValue, innerValue; + })(source).subscribe(subscriber); + return function() { + state = null; + }; + }); + } + exports2.switchScan = switchScan; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js +var require_takeUntil = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.takeUntil = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + var noop_1 = require_noop(); + function takeUntil(notifier) { + return lift_1.operate(function(source, subscriber) { + innerFrom_1.innerFrom(notifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + return subscriber.complete(); + }, noop_1.noop)); + !subscriber.closed && source.subscribe(subscriber); + }); + } + exports2.takeUntil = takeUntil; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js +var require_takeWhile = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.takeWhile = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function takeWhile(predicate, inclusive) { + if (inclusive === void 0) { + inclusive = false; + } + return lift_1.operate(function(source, subscriber) { + var index = 0; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var result = predicate(value, index++); + (result || inclusive) && subscriber.next(value); + !result && subscriber.complete(); + })); + }); + } + exports2.takeWhile = takeWhile; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/tap.js +var require_tap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/tap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tap = void 0; + var isFunction_1 = require_isFunction(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var identity_1 = require_identity(); + function tap(observerOrNext, error, complete) { + var tapObserver = isFunction_1.isFunction(observerOrNext) || error || complete ? { next: observerOrNext, error, complete } : observerOrNext; + return tapObserver ? lift_1.operate(function(source, subscriber) { + var _a; + (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + var isUnsub = true; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var _a2; + (_a2 = tapObserver.next) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver, value); + subscriber.next(value); + }, function() { + var _a2; + isUnsub = false; + (_a2 = tapObserver.complete) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver); + subscriber.complete(); + }, function(err) { + var _a2; + isUnsub = false; + (_a2 = tapObserver.error) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver, err); + subscriber.error(err); + }, function() { + var _a2, _b; + if (isUnsub) { + (_a2 = tapObserver.unsubscribe) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver); + } + (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); + })); + }) : identity_1.identity; + } + exports2.tap = tap; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/throttle.js +var require_throttle = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/throttle.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttle = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + function throttle(durationSelector, config) { + return lift_1.operate(function(source, subscriber) { + var _a = config !== null && config !== void 0 ? config : {}, _b = _a.leading, leading = _b === void 0 ? true : _b, _c = _a.trailing, trailing = _c === void 0 ? false : _c; + var hasValue = false; + var sendValue = null; + var throttled = null; + var isComplete = false; + var endThrottling = function() { + throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); + throttled = null; + if (trailing) { + send(); + isComplete && subscriber.complete(); + } + }; + var cleanupThrottling = function() { + throttled = null; + isComplete && subscriber.complete(); + }; + var startThrottle = function(value) { + return throttled = innerFrom_1.innerFrom(durationSelector(value)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling)); + }; + var send = function() { + if (hasValue) { + hasValue = false; + var value = sendValue; + sendValue = null; + subscriber.next(value); + !isComplete && startThrottle(value); + } + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + hasValue = true; + sendValue = value; + !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); + }, function() { + isComplete = true; + !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); + })); + }); + } + exports2.throttle = throttle; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js +var require_throttleTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttleTime = void 0; + var async_1 = require_async(); + var throttle_1 = require_throttle(); + var timer_1 = require_timer(); + function throttleTime(duration, scheduler2, config) { + if (scheduler2 === void 0) { + scheduler2 = async_1.asyncScheduler; + } + var duration$ = timer_1.timer(duration, scheduler2); + return throttle_1.throttle(function() { + return duration$; + }, config); + } + exports2.throttleTime = throttleTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js +var require_timeInterval = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TimeInterval = exports2.timeInterval = void 0; + var async_1 = require_async(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function timeInterval(scheduler2) { + if (scheduler2 === void 0) { + scheduler2 = async_1.asyncScheduler; + } + return lift_1.operate(function(source, subscriber) { + var last = scheduler2.now(); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var now = scheduler2.now(); + var interval = now - last; + last = now; + subscriber.next(new TimeInterval(value, interval)); + })); + }); + } + exports2.timeInterval = timeInterval; + var TimeInterval = /* @__PURE__ */ (function() { + function TimeInterval2(value, interval) { + this.value = value; + this.interval = interval; + } + return TimeInterval2; + })(); + exports2.TimeInterval = TimeInterval; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/timeout.js +var require_timeout = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/timeout.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timeout = exports2.TimeoutError = void 0; + var async_1 = require_async(); + var isDate_1 = require_isDate2(); + var lift_1 = require_lift(); + var innerFrom_1 = require_innerFrom(); + var createErrorClass_1 = require_createErrorClass(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var executeSchedule_1 = require_executeSchedule(); + exports2.TimeoutError = createErrorClass_1.createErrorClass(function(_super) { + return function TimeoutErrorImpl(info) { + if (info === void 0) { + info = null; + } + _super(this); + this.message = "Timeout has occurred"; + this.name = "TimeoutError"; + this.info = info; + }; + }); + function timeout(config, schedulerArg) { + var _a = isDate_1.isValidDate(config) ? { first: config } : typeof config === "number" ? { each: config } : config, first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler2 = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : async_1.asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d; + if (first == null && each == null) { + throw new TypeError("No timeout provided."); + } + return lift_1.operate(function(source, subscriber) { + var originalSourceSubscription; + var timerSubscription; + var lastValue = null; + var seen = 0; + var startTimer = function(delay) { + timerSubscription = executeSchedule_1.executeSchedule(subscriber, scheduler2, function() { + try { + originalSourceSubscription.unsubscribe(); + innerFrom_1.innerFrom(_with({ + meta, + lastValue, + seen + })).subscribe(subscriber); + } catch (err) { + subscriber.error(err); + } + }, delay); + }; + originalSourceSubscription = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); + seen++; + subscriber.next(lastValue = value); + each > 0 && startTimer(each); + }, void 0, void 0, function() { + if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { + timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); + } + lastValue = null; + })); + !seen && startTimer(first != null ? typeof first === "number" ? first : +first - scheduler2.now() : each); + }); + } + exports2.timeout = timeout; + function timeoutErrorFactory(info) { + throw new exports2.TimeoutError(info); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js +var require_timeoutWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timeoutWith = void 0; + var async_1 = require_async(); + var isDate_1 = require_isDate2(); + var timeout_1 = require_timeout(); + function timeoutWith(due, withObservable, scheduler2) { + var first; + var each; + var _with; + scheduler2 = scheduler2 !== null && scheduler2 !== void 0 ? scheduler2 : async_1.async; + if (isDate_1.isValidDate(due)) { + first = due; + } else if (typeof due === "number") { + each = due; + } + if (withObservable) { + _with = function() { + return withObservable; + }; + } else { + throw new TypeError("No observable provided to switch to"); + } + if (first == null && each == null) { + throw new TypeError("No timeout provided."); + } + return timeout_1.timeout({ + first, + each, + scheduler: scheduler2, + with: _with + }); + } + exports2.timeoutWith = timeoutWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js +var require_timestamp = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timestamp = void 0; + var dateTimestampProvider_1 = require_dateTimestampProvider(); + var map_1 = require_map2(); + function timestamp(timestampProvider) { + if (timestampProvider === void 0) { + timestampProvider = dateTimestampProvider_1.dateTimestampProvider; + } + return map_1.map(function(value) { + return { value, timestamp: timestampProvider.now() }; + }); + } + exports2.timestamp = timestamp; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/window.js +var require_window = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/window.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.window = void 0; + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + var innerFrom_1 = require_innerFrom(); + function window2(windowBoundaries) { + return lift_1.operate(function(source, subscriber) { + var windowSubject = new Subject_1.Subject(); + subscriber.next(windowSubject.asObservable()); + var errorHandler = function(err) { + windowSubject.error(err); + subscriber.error(err); + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); + }, function() { + windowSubject.complete(); + subscriber.complete(); + }, errorHandler)); + innerFrom_1.innerFrom(windowBoundaries).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function() { + windowSubject.complete(); + subscriber.next(windowSubject = new Subject_1.Subject()); + }, noop_1.noop, errorHandler)); + return function() { + windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); + windowSubject = null; + }; + }); + } + exports2.window = window2; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js +var require_windowCount = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js"(exports2) { + "use strict"; + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function() { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.windowCount = void 0; + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + function windowCount(windowSize, startWindowEvery) { + if (startWindowEvery === void 0) { + startWindowEvery = 0; + } + var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; + return lift_1.operate(function(source, subscriber) { + var windows = [new Subject_1.Subject()]; + var starts = []; + var count = 0; + subscriber.next(windows[0].asObservable()); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var e_1, _a; + try { + for (var windows_1 = __values2(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) { + var window_1 = windows_1_1.value; + window_1.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (windows_1_1 && !windows_1_1.done && (_a = windows_1.return)) _a.call(windows_1); + } finally { + if (e_1) throw e_1.error; + } + } + var c = count - windowSize + 1; + if (c >= 0 && c % startEvery === 0) { + windows.shift().complete(); + } + if (++count % startEvery === 0) { + var window_2 = new Subject_1.Subject(); + windows.push(window_2); + subscriber.next(window_2.asObservable()); + } + }, function() { + while (windows.length > 0) { + windows.shift().complete(); + } + subscriber.complete(); + }, function(err) { + while (windows.length > 0) { + windows.shift().error(err); + } + subscriber.error(err); + }, function() { + starts = null; + windows = null; + })); + }); + } + exports2.windowCount = windowCount; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js +var require_windowTime = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.windowTime = void 0; + var Subject_1 = require_Subject(); + var async_1 = require_async(); + var Subscription_1 = require_Subscription(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var arrRemove_1 = require_arrRemove(); + var args_1 = require_args(); + var executeSchedule_1 = require_executeSchedule(); + function windowTime(windowTimeSpan) { + var _a, _b; + var otherArgs = []; + for (var _i = 1; _i < arguments.length; _i++) { + otherArgs[_i - 1] = arguments[_i]; + } + var scheduler2 = (_a = args_1.popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : async_1.asyncScheduler; + var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; + var maxWindowSize = otherArgs[1] || Infinity; + return lift_1.operate(function(source, subscriber) { + var windowRecords = []; + var restartOnClose = false; + var closeWindow = function(record) { + var window2 = record.window, subs = record.subs; + window2.complete(); + subs.unsubscribe(); + arrRemove_1.arrRemove(windowRecords, record); + restartOnClose && startWindow(); + }; + var startWindow = function() { + if (windowRecords) { + var subs = new Subscription_1.Subscription(); + subscriber.add(subs); + var window_1 = new Subject_1.Subject(); + var record_1 = { + window: window_1, + subs, + seen: 0 + }; + windowRecords.push(record_1); + subscriber.next(window_1.asObservable()); + executeSchedule_1.executeSchedule(subs, scheduler2, function() { + return closeWindow(record_1); + }, windowTimeSpan); + } + }; + if (windowCreationInterval !== null && windowCreationInterval >= 0) { + executeSchedule_1.executeSchedule(subscriber, scheduler2, startWindow, windowCreationInterval, true); + } else { + restartOnClose = true; + } + startWindow(); + var loop = function(cb) { + return windowRecords.slice().forEach(cb); + }; + var terminate = function(cb) { + loop(function(_a2) { + var window2 = _a2.window; + return cb(window2); + }); + cb(subscriber); + subscriber.unsubscribe(); + }; + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + loop(function(record) { + record.window.next(value); + maxWindowSize <= ++record.seen && closeWindow(record); + }); + }, function() { + return terminate(function(consumer) { + return consumer.complete(); + }); + }, function(err) { + return terminate(function(consumer) { + return consumer.error(err); + }); + })); + return function() { + windowRecords = null; + }; + }); + } + exports2.windowTime = windowTime; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js +var require_windowToggle = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js"(exports2) { + "use strict"; + var __values2 = exports2 && exports2.__values || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function() { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.windowToggle = void 0; + var Subject_1 = require_Subject(); + var Subscription_1 = require_Subscription(); + var lift_1 = require_lift(); + var innerFrom_1 = require_innerFrom(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var noop_1 = require_noop(); + var arrRemove_1 = require_arrRemove(); + function windowToggle(openings, closingSelector) { + return lift_1.operate(function(source, subscriber) { + var windows = []; + var handleError = function(err) { + while (0 < windows.length) { + windows.shift().error(err); + } + subscriber.error(err); + }; + innerFrom_1.innerFrom(openings).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(openValue) { + var window2 = new Subject_1.Subject(); + windows.push(window2); + var closingSubscription = new Subscription_1.Subscription(); + var closeWindow = function() { + arrRemove_1.arrRemove(windows, window2); + window2.complete(); + closingSubscription.unsubscribe(); + }; + var closingNotifier; + try { + closingNotifier = innerFrom_1.innerFrom(closingSelector(openValue)); + } catch (err) { + handleError(err); + return; + } + subscriber.next(window2.asObservable()); + closingSubscription.add(closingNotifier.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, closeWindow, noop_1.noop, handleError))); + }, noop_1.noop)); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + var e_1, _a; + var windowsCopy = windows.slice(); + try { + for (var windowsCopy_1 = __values2(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) { + var window_1 = windowsCopy_1_1.value; + window_1.next(value); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a = windowsCopy_1.return)) _a.call(windowsCopy_1); + } finally { + if (e_1) throw e_1.error; + } + } + }, function() { + while (0 < windows.length) { + windows.shift().complete(); + } + subscriber.complete(); + }, handleError, function() { + while (0 < windows.length) { + windows.shift().unsubscribe(); + } + })); + }); + } + exports2.windowToggle = windowToggle; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js +var require_windowWhen = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.windowWhen = void 0; + var Subject_1 = require_Subject(); + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + function windowWhen(closingSelector) { + return lift_1.operate(function(source, subscriber) { + var window2; + var closingSubscriber; + var handleError = function(err) { + window2.error(err); + subscriber.error(err); + }; + var openWindow = function() { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + window2 === null || window2 === void 0 ? void 0 : window2.complete(); + window2 = new Subject_1.Subject(); + subscriber.next(window2.asObservable()); + var closingNotifier; + try { + closingNotifier = innerFrom_1.innerFrom(closingSelector()); + } catch (err) { + handleError(err); + return; + } + closingNotifier.subscribe(closingSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, openWindow, openWindow, handleError)); + }; + openWindow(); + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + return window2.next(value); + }, function() { + window2.complete(); + subscriber.complete(); + }, handleError, function() { + closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); + window2 = null; + })); + }); + } + exports2.windowWhen = windowWhen; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js +var require_withLatestFrom = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.withLatestFrom = void 0; + var lift_1 = require_lift(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var innerFrom_1 = require_innerFrom(); + var identity_1 = require_identity(); + var noop_1 = require_noop(); + var args_1 = require_args(); + function withLatestFrom() { + var inputs = []; + for (var _i = 0; _i < arguments.length; _i++) { + inputs[_i] = arguments[_i]; + } + var project = args_1.popResultSelector(inputs); + return lift_1.operate(function(source, subscriber) { + var len = inputs.length; + var otherValues = new Array(len); + var hasValue = inputs.map(function() { + return false; + }); + var ready = false; + var _loop_1 = function(i2) { + innerFrom_1.innerFrom(inputs[i2]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + otherValues[i2] = value; + if (!ready && !hasValue[i2]) { + hasValue[i2] = true; + (ready = hasValue.every(identity_1.identity)) && (hasValue = null); + } + }, noop_1.noop)); + }; + for (var i = 0; i < len; i++) { + _loop_1(i); + } + source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + if (ready) { + var values = __spreadArray2([value], __read2(otherValues)); + subscriber.next(project ? project.apply(void 0, __spreadArray2([], __read2(values))) : values); + } + })); + }); + } + exports2.withLatestFrom = withLatestFrom; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/zip.js +var require_zip2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/zip.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zip = void 0; + var Observable_1 = require_Observable(); + var innerFrom_1 = require_innerFrom(); + var argsOrArgArray_1 = require_argsOrArgArray(); + var empty_1 = require_empty(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var args_1 = require_args(); + function zip() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var resultSelector = args_1.popResultSelector(args); + var sources = argsOrArgArray_1.argsOrArgArray(args); + return sources.length ? new Observable_1.Observable(function(subscriber) { + var buffers = sources.map(function() { + return []; + }); + var completed = sources.map(function() { + return false; + }); + subscriber.add(function() { + buffers = completed = null; + }); + var _loop_1 = function(sourceIndex2) { + innerFrom_1.innerFrom(sources[sourceIndex2]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + buffers[sourceIndex2].push(value); + if (buffers.every(function(buffer) { + return buffer.length; + })) { + var result = buffers.map(function(buffer) { + return buffer.shift(); + }); + subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray2([], __read2(result))) : result); + if (buffers.some(function(buffer, i) { + return !buffer.length && completed[i]; + })) { + subscriber.complete(); + } + } + }, function() { + completed[sourceIndex2] = true; + !buffers[sourceIndex2].length && subscriber.complete(); + })); + }; + for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { + _loop_1(sourceIndex); + } + return function() { + buffers = completed = null; + }; + }) : empty_1.EMPTY; + } + exports2.zip = zip; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/zip.js +var require_zip3 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/zip.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zip = void 0; + var zip_1 = require_zip2(); + var lift_1 = require_lift(); + function zip() { + var sources = []; + for (var _i = 0; _i < arguments.length; _i++) { + sources[_i] = arguments[_i]; + } + return lift_1.operate(function(source, subscriber) { + zip_1.zip.apply(void 0, __spreadArray2([source], __read2(sources))).subscribe(subscriber); + }); + } + exports2.zip = zip; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js +var require_zipAll = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zipAll = void 0; + var zip_1 = require_zip2(); + var joinAllInternals_1 = require_joinAllInternals(); + function zipAll(project) { + return joinAllInternals_1.joinAllInternals(zip_1.zip, project); + } + exports2.zipAll = zipAll; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js +var require_zipWith = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.zipWith = void 0; + var zip_1 = require_zip3(); + function zipWith() { + var otherInputs = []; + for (var _i = 0; _i < arguments.length; _i++) { + otherInputs[_i] = arguments[_i]; + } + return zip_1.zip.apply(void 0, __spreadArray2([], __read2(otherInputs))); + } + exports2.zipWith = zipWith; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/operators/index.js +var require_operators = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/operators/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeAll = exports2.merge = exports2.max = exports2.materialize = exports2.mapTo = exports2.map = exports2.last = exports2.isEmpty = exports2.ignoreElements = exports2.groupBy = exports2.first = exports2.findIndex = exports2.find = exports2.finalize = exports2.filter = exports2.expand = exports2.exhaustMap = exports2.exhaustAll = exports2.exhaust = exports2.every = exports2.endWith = exports2.elementAt = exports2.distinctUntilKeyChanged = exports2.distinctUntilChanged = exports2.distinct = exports2.dematerialize = exports2.delayWhen = exports2.delay = exports2.defaultIfEmpty = exports2.debounceTime = exports2.debounce = exports2.count = exports2.connect = exports2.concatWith = exports2.concatMapTo = exports2.concatMap = exports2.concatAll = exports2.concat = exports2.combineLatestWith = exports2.combineLatest = exports2.combineLatestAll = exports2.combineAll = exports2.catchError = exports2.bufferWhen = exports2.bufferToggle = exports2.bufferTime = exports2.bufferCount = exports2.buffer = exports2.auditTime = exports2.audit = void 0; + exports2.timeInterval = exports2.throwIfEmpty = exports2.throttleTime = exports2.throttle = exports2.tap = exports2.takeWhile = exports2.takeUntil = exports2.takeLast = exports2.take = exports2.switchScan = exports2.switchMapTo = exports2.switchMap = exports2.switchAll = exports2.subscribeOn = exports2.startWith = exports2.skipWhile = exports2.skipUntil = exports2.skipLast = exports2.skip = exports2.single = exports2.shareReplay = exports2.share = exports2.sequenceEqual = exports2.scan = exports2.sampleTime = exports2.sample = exports2.refCount = exports2.retryWhen = exports2.retry = exports2.repeatWhen = exports2.repeat = exports2.reduce = exports2.raceWith = exports2.race = exports2.publishReplay = exports2.publishLast = exports2.publishBehavior = exports2.publish = exports2.pluck = exports2.partition = exports2.pairwise = exports2.onErrorResumeNext = exports2.observeOn = exports2.multicast = exports2.min = exports2.mergeWith = exports2.mergeScan = exports2.mergeMapTo = exports2.mergeMap = exports2.flatMap = void 0; + exports2.zipWith = exports2.zipAll = exports2.zip = exports2.withLatestFrom = exports2.windowWhen = exports2.windowToggle = exports2.windowTime = exports2.windowCount = exports2.window = exports2.toArray = exports2.timestamp = exports2.timeoutWith = exports2.timeout = void 0; + var audit_1 = require_audit(); + Object.defineProperty(exports2, "audit", { enumerable: true, get: function() { + return audit_1.audit; + } }); + var auditTime_1 = require_auditTime(); + Object.defineProperty(exports2, "auditTime", { enumerable: true, get: function() { + return auditTime_1.auditTime; + } }); + var buffer_1 = require_buffer(); + Object.defineProperty(exports2, "buffer", { enumerable: true, get: function() { + return buffer_1.buffer; + } }); + var bufferCount_1 = require_bufferCount(); + Object.defineProperty(exports2, "bufferCount", { enumerable: true, get: function() { + return bufferCount_1.bufferCount; + } }); + var bufferTime_1 = require_bufferTime(); + Object.defineProperty(exports2, "bufferTime", { enumerable: true, get: function() { + return bufferTime_1.bufferTime; + } }); + var bufferToggle_1 = require_bufferToggle(); + Object.defineProperty(exports2, "bufferToggle", { enumerable: true, get: function() { + return bufferToggle_1.bufferToggle; + } }); + var bufferWhen_1 = require_bufferWhen(); + Object.defineProperty(exports2, "bufferWhen", { enumerable: true, get: function() { + return bufferWhen_1.bufferWhen; + } }); + var catchError_1 = require_catchError(); + Object.defineProperty(exports2, "catchError", { enumerable: true, get: function() { + return catchError_1.catchError; + } }); + var combineAll_1 = require_combineAll(); + Object.defineProperty(exports2, "combineAll", { enumerable: true, get: function() { + return combineAll_1.combineAll; + } }); + var combineLatestAll_1 = require_combineLatestAll(); + Object.defineProperty(exports2, "combineLatestAll", { enumerable: true, get: function() { + return combineLatestAll_1.combineLatestAll; + } }); + var combineLatest_1 = require_combineLatest2(); + Object.defineProperty(exports2, "combineLatest", { enumerable: true, get: function() { + return combineLatest_1.combineLatest; + } }); + var combineLatestWith_1 = require_combineLatestWith(); + Object.defineProperty(exports2, "combineLatestWith", { enumerable: true, get: function() { + return combineLatestWith_1.combineLatestWith; + } }); + var concat_1 = require_concat2(); + Object.defineProperty(exports2, "concat", { enumerable: true, get: function() { + return concat_1.concat; + } }); + var concatAll_1 = require_concatAll(); + Object.defineProperty(exports2, "concatAll", { enumerable: true, get: function() { + return concatAll_1.concatAll; + } }); + var concatMap_1 = require_concatMap(); + Object.defineProperty(exports2, "concatMap", { enumerable: true, get: function() { + return concatMap_1.concatMap; + } }); + var concatMapTo_1 = require_concatMapTo(); + Object.defineProperty(exports2, "concatMapTo", { enumerable: true, get: function() { + return concatMapTo_1.concatMapTo; + } }); + var concatWith_1 = require_concatWith(); + Object.defineProperty(exports2, "concatWith", { enumerable: true, get: function() { + return concatWith_1.concatWith; + } }); + var connect_1 = require_connect(); + Object.defineProperty(exports2, "connect", { enumerable: true, get: function() { + return connect_1.connect; + } }); + var count_1 = require_count(); + Object.defineProperty(exports2, "count", { enumerable: true, get: function() { + return count_1.count; + } }); + var debounce_1 = require_debounce(); + Object.defineProperty(exports2, "debounce", { enumerable: true, get: function() { + return debounce_1.debounce; + } }); + var debounceTime_1 = require_debounceTime(); + Object.defineProperty(exports2, "debounceTime", { enumerable: true, get: function() { + return debounceTime_1.debounceTime; + } }); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + Object.defineProperty(exports2, "defaultIfEmpty", { enumerable: true, get: function() { + return defaultIfEmpty_1.defaultIfEmpty; + } }); + var delay_1 = require_delay(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_1.delay; + } }); + var delayWhen_1 = require_delayWhen(); + Object.defineProperty(exports2, "delayWhen", { enumerable: true, get: function() { + return delayWhen_1.delayWhen; + } }); + var dematerialize_1 = require_dematerialize(); + Object.defineProperty(exports2, "dematerialize", { enumerable: true, get: function() { + return dematerialize_1.dematerialize; + } }); + var distinct_1 = require_distinct(); + Object.defineProperty(exports2, "distinct", { enumerable: true, get: function() { + return distinct_1.distinct; + } }); + var distinctUntilChanged_1 = require_distinctUntilChanged(); + Object.defineProperty(exports2, "distinctUntilChanged", { enumerable: true, get: function() { + return distinctUntilChanged_1.distinctUntilChanged; + } }); + var distinctUntilKeyChanged_1 = require_distinctUntilKeyChanged(); + Object.defineProperty(exports2, "distinctUntilKeyChanged", { enumerable: true, get: function() { + return distinctUntilKeyChanged_1.distinctUntilKeyChanged; + } }); + var elementAt_1 = require_elementAt(); + Object.defineProperty(exports2, "elementAt", { enumerable: true, get: function() { + return elementAt_1.elementAt; + } }); + var endWith_1 = require_endWith(); + Object.defineProperty(exports2, "endWith", { enumerable: true, get: function() { + return endWith_1.endWith; + } }); + var every_1 = require_every(); + Object.defineProperty(exports2, "every", { enumerable: true, get: function() { + return every_1.every; + } }); + var exhaust_1 = require_exhaust(); + Object.defineProperty(exports2, "exhaust", { enumerable: true, get: function() { + return exhaust_1.exhaust; + } }); + var exhaustAll_1 = require_exhaustAll(); + Object.defineProperty(exports2, "exhaustAll", { enumerable: true, get: function() { + return exhaustAll_1.exhaustAll; + } }); + var exhaustMap_1 = require_exhaustMap(); + Object.defineProperty(exports2, "exhaustMap", { enumerable: true, get: function() { + return exhaustMap_1.exhaustMap; + } }); + var expand_1 = require_expand(); + Object.defineProperty(exports2, "expand", { enumerable: true, get: function() { + return expand_1.expand; + } }); + var filter_1 = require_filter2(); + Object.defineProperty(exports2, "filter", { enumerable: true, get: function() { + return filter_1.filter; + } }); + var finalize_1 = require_finalize(); + Object.defineProperty(exports2, "finalize", { enumerable: true, get: function() { + return finalize_1.finalize; + } }); + var find_1 = require_find(); + Object.defineProperty(exports2, "find", { enumerable: true, get: function() { + return find_1.find; + } }); + var findIndex_1 = require_findIndex(); + Object.defineProperty(exports2, "findIndex", { enumerable: true, get: function() { + return findIndex_1.findIndex; + } }); + var first_1 = require_first(); + Object.defineProperty(exports2, "first", { enumerable: true, get: function() { + return first_1.first; + } }); + var groupBy_1 = require_groupBy(); + Object.defineProperty(exports2, "groupBy", { enumerable: true, get: function() { + return groupBy_1.groupBy; + } }); + var ignoreElements_1 = require_ignoreElements(); + Object.defineProperty(exports2, "ignoreElements", { enumerable: true, get: function() { + return ignoreElements_1.ignoreElements; + } }); + var isEmpty_1 = require_isEmpty2(); + Object.defineProperty(exports2, "isEmpty", { enumerable: true, get: function() { + return isEmpty_1.isEmpty; + } }); + var last_1 = require_last(); + Object.defineProperty(exports2, "last", { enumerable: true, get: function() { + return last_1.last; + } }); + var map_1 = require_map2(); + Object.defineProperty(exports2, "map", { enumerable: true, get: function() { + return map_1.map; + } }); + var mapTo_1 = require_mapTo(); + Object.defineProperty(exports2, "mapTo", { enumerable: true, get: function() { + return mapTo_1.mapTo; + } }); + var materialize_1 = require_materialize(); + Object.defineProperty(exports2, "materialize", { enumerable: true, get: function() { + return materialize_1.materialize; + } }); + var max_1 = require_max2(); + Object.defineProperty(exports2, "max", { enumerable: true, get: function() { + return max_1.max; + } }); + var merge_1 = require_merge2(); + Object.defineProperty(exports2, "merge", { enumerable: true, get: function() { + return merge_1.merge; + } }); + var mergeAll_1 = require_mergeAll(); + Object.defineProperty(exports2, "mergeAll", { enumerable: true, get: function() { + return mergeAll_1.mergeAll; + } }); + var flatMap_1 = require_flatMap(); + Object.defineProperty(exports2, "flatMap", { enumerable: true, get: function() { + return flatMap_1.flatMap; + } }); + var mergeMap_1 = require_mergeMap(); + Object.defineProperty(exports2, "mergeMap", { enumerable: true, get: function() { + return mergeMap_1.mergeMap; + } }); + var mergeMapTo_1 = require_mergeMapTo(); + Object.defineProperty(exports2, "mergeMapTo", { enumerable: true, get: function() { + return mergeMapTo_1.mergeMapTo; + } }); + var mergeScan_1 = require_mergeScan(); + Object.defineProperty(exports2, "mergeScan", { enumerable: true, get: function() { + return mergeScan_1.mergeScan; + } }); + var mergeWith_1 = require_mergeWith(); + Object.defineProperty(exports2, "mergeWith", { enumerable: true, get: function() { + return mergeWith_1.mergeWith; + } }); + var min_1 = require_min(); + Object.defineProperty(exports2, "min", { enumerable: true, get: function() { + return min_1.min; + } }); + var multicast_1 = require_multicast(); + Object.defineProperty(exports2, "multicast", { enumerable: true, get: function() { + return multicast_1.multicast; + } }); + var observeOn_1 = require_observeOn(); + Object.defineProperty(exports2, "observeOn", { enumerable: true, get: function() { + return observeOn_1.observeOn; + } }); + var onErrorResumeNextWith_1 = require_onErrorResumeNextWith(); + Object.defineProperty(exports2, "onErrorResumeNext", { enumerable: true, get: function() { + return onErrorResumeNextWith_1.onErrorResumeNext; + } }); + var pairwise_1 = require_pairwise(); + Object.defineProperty(exports2, "pairwise", { enumerable: true, get: function() { + return pairwise_1.pairwise; + } }); + var partition_1 = require_partition(); + Object.defineProperty(exports2, "partition", { enumerable: true, get: function() { + return partition_1.partition; + } }); + var pluck_1 = require_pluck(); + Object.defineProperty(exports2, "pluck", { enumerable: true, get: function() { + return pluck_1.pluck; + } }); + var publish_1 = require_publish(); + Object.defineProperty(exports2, "publish", { enumerable: true, get: function() { + return publish_1.publish; + } }); + var publishBehavior_1 = require_publishBehavior(); + Object.defineProperty(exports2, "publishBehavior", { enumerable: true, get: function() { + return publishBehavior_1.publishBehavior; + } }); + var publishLast_1 = require_publishLast(); + Object.defineProperty(exports2, "publishLast", { enumerable: true, get: function() { + return publishLast_1.publishLast; + } }); + var publishReplay_1 = require_publishReplay(); + Object.defineProperty(exports2, "publishReplay", { enumerable: true, get: function() { + return publishReplay_1.publishReplay; + } }); + var race_1 = require_race2(); + Object.defineProperty(exports2, "race", { enumerable: true, get: function() { + return race_1.race; + } }); + var raceWith_1 = require_raceWith(); + Object.defineProperty(exports2, "raceWith", { enumerable: true, get: function() { + return raceWith_1.raceWith; + } }); + var reduce_1 = require_reduce(); + Object.defineProperty(exports2, "reduce", { enumerable: true, get: function() { + return reduce_1.reduce; + } }); + var repeat_1 = require_repeat(); + Object.defineProperty(exports2, "repeat", { enumerable: true, get: function() { + return repeat_1.repeat; + } }); + var repeatWhen_1 = require_repeatWhen(); + Object.defineProperty(exports2, "repeatWhen", { enumerable: true, get: function() { + return repeatWhen_1.repeatWhen; + } }); + var retry_1 = require_retry(); + Object.defineProperty(exports2, "retry", { enumerable: true, get: function() { + return retry_1.retry; + } }); + var retryWhen_1 = require_retryWhen(); + Object.defineProperty(exports2, "retryWhen", { enumerable: true, get: function() { + return retryWhen_1.retryWhen; + } }); + var refCount_1 = require_refCount(); + Object.defineProperty(exports2, "refCount", { enumerable: true, get: function() { + return refCount_1.refCount; + } }); + var sample_1 = require_sample(); + Object.defineProperty(exports2, "sample", { enumerable: true, get: function() { + return sample_1.sample; + } }); + var sampleTime_1 = require_sampleTime(); + Object.defineProperty(exports2, "sampleTime", { enumerable: true, get: function() { + return sampleTime_1.sampleTime; + } }); + var scan_1 = require_scan(); + Object.defineProperty(exports2, "scan", { enumerable: true, get: function() { + return scan_1.scan; + } }); + var sequenceEqual_1 = require_sequenceEqual(); + Object.defineProperty(exports2, "sequenceEqual", { enumerable: true, get: function() { + return sequenceEqual_1.sequenceEqual; + } }); + var share_1 = require_share(); + Object.defineProperty(exports2, "share", { enumerable: true, get: function() { + return share_1.share; + } }); + var shareReplay_1 = require_shareReplay(); + Object.defineProperty(exports2, "shareReplay", { enumerable: true, get: function() { + return shareReplay_1.shareReplay; + } }); + var single_1 = require_single(); + Object.defineProperty(exports2, "single", { enumerable: true, get: function() { + return single_1.single; + } }); + var skip_1 = require_skip(); + Object.defineProperty(exports2, "skip", { enumerable: true, get: function() { + return skip_1.skip; + } }); + var skipLast_1 = require_skipLast(); + Object.defineProperty(exports2, "skipLast", { enumerable: true, get: function() { + return skipLast_1.skipLast; + } }); + var skipUntil_1 = require_skipUntil(); + Object.defineProperty(exports2, "skipUntil", { enumerable: true, get: function() { + return skipUntil_1.skipUntil; + } }); + var skipWhile_1 = require_skipWhile(); + Object.defineProperty(exports2, "skipWhile", { enumerable: true, get: function() { + return skipWhile_1.skipWhile; + } }); + var startWith_1 = require_startWith(); + Object.defineProperty(exports2, "startWith", { enumerable: true, get: function() { + return startWith_1.startWith; + } }); + var subscribeOn_1 = require_subscribeOn(); + Object.defineProperty(exports2, "subscribeOn", { enumerable: true, get: function() { + return subscribeOn_1.subscribeOn; + } }); + var switchAll_1 = require_switchAll(); + Object.defineProperty(exports2, "switchAll", { enumerable: true, get: function() { + return switchAll_1.switchAll; + } }); + var switchMap_1 = require_switchMap(); + Object.defineProperty(exports2, "switchMap", { enumerable: true, get: function() { + return switchMap_1.switchMap; + } }); + var switchMapTo_1 = require_switchMapTo(); + Object.defineProperty(exports2, "switchMapTo", { enumerable: true, get: function() { + return switchMapTo_1.switchMapTo; + } }); + var switchScan_1 = require_switchScan(); + Object.defineProperty(exports2, "switchScan", { enumerable: true, get: function() { + return switchScan_1.switchScan; + } }); + var take_1 = require_take(); + Object.defineProperty(exports2, "take", { enumerable: true, get: function() { + return take_1.take; + } }); + var takeLast_1 = require_takeLast(); + Object.defineProperty(exports2, "takeLast", { enumerable: true, get: function() { + return takeLast_1.takeLast; + } }); + var takeUntil_1 = require_takeUntil(); + Object.defineProperty(exports2, "takeUntil", { enumerable: true, get: function() { + return takeUntil_1.takeUntil; + } }); + var takeWhile_1 = require_takeWhile(); + Object.defineProperty(exports2, "takeWhile", { enumerable: true, get: function() { + return takeWhile_1.takeWhile; + } }); + var tap_1 = require_tap(); + Object.defineProperty(exports2, "tap", { enumerable: true, get: function() { + return tap_1.tap; + } }); + var throttle_1 = require_throttle(); + Object.defineProperty(exports2, "throttle", { enumerable: true, get: function() { + return throttle_1.throttle; + } }); + var throttleTime_1 = require_throttleTime(); + Object.defineProperty(exports2, "throttleTime", { enumerable: true, get: function() { + return throttleTime_1.throttleTime; + } }); + var throwIfEmpty_1 = require_throwIfEmpty(); + Object.defineProperty(exports2, "throwIfEmpty", { enumerable: true, get: function() { + return throwIfEmpty_1.throwIfEmpty; + } }); + var timeInterval_1 = require_timeInterval(); + Object.defineProperty(exports2, "timeInterval", { enumerable: true, get: function() { + return timeInterval_1.timeInterval; + } }); + var timeout_1 = require_timeout(); + Object.defineProperty(exports2, "timeout", { enumerable: true, get: function() { + return timeout_1.timeout; + } }); + var timeoutWith_1 = require_timeoutWith(); + Object.defineProperty(exports2, "timeoutWith", { enumerable: true, get: function() { + return timeoutWith_1.timeoutWith; + } }); + var timestamp_1 = require_timestamp(); + Object.defineProperty(exports2, "timestamp", { enumerable: true, get: function() { + return timestamp_1.timestamp; + } }); + var toArray_1 = require_toArray(); + Object.defineProperty(exports2, "toArray", { enumerable: true, get: function() { + return toArray_1.toArray; + } }); + var window_1 = require_window(); + Object.defineProperty(exports2, "window", { enumerable: true, get: function() { + return window_1.window; + } }); + var windowCount_1 = require_windowCount(); + Object.defineProperty(exports2, "windowCount", { enumerable: true, get: function() { + return windowCount_1.windowCount; + } }); + var windowTime_1 = require_windowTime(); + Object.defineProperty(exports2, "windowTime", { enumerable: true, get: function() { + return windowTime_1.windowTime; + } }); + var windowToggle_1 = require_windowToggle(); + Object.defineProperty(exports2, "windowToggle", { enumerable: true, get: function() { + return windowToggle_1.windowToggle; + } }); + var windowWhen_1 = require_windowWhen(); + Object.defineProperty(exports2, "windowWhen", { enumerable: true, get: function() { + return windowWhen_1.windowWhen; + } }); + var withLatestFrom_1 = require_withLatestFrom(); + Object.defineProperty(exports2, "withLatestFrom", { enumerable: true, get: function() { + return withLatestFrom_1.withLatestFrom; + } }); + var zip_1 = require_zip3(); + Object.defineProperty(exports2, "zip", { enumerable: true, get: function() { + return zip_1.zip; + } }); + var zipAll_1 = require_zipAll(); + Object.defineProperty(exports2, "zipAll", { enumerable: true, get: function() { + return zipAll_1.zipAll; + } }); + var zipWith_1 = require_zipWith(); + Object.defineProperty(exports2, "zipWith", { enumerable: true, get: function() { + return zipWith_1.zipWith; + } }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/serializer/class-serializer.constants.js +var require_class_serializer_constants = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/serializer/class-serializer.constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CLASS_SERIALIZER_OPTIONS = void 0; + exports2.CLASS_SERIALIZER_OPTIONS = "class_serializer:options"; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/serializer/class-serializer.interceptor.js +var require_class_serializer_interceptor = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/serializer/class-serializer.interceptor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ClassSerializerInterceptor = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var operators_1 = require_operators(); + var core_12 = require_core(); + var file_stream_1 = require_file_stream(); + var load_package_util_1 = require_load_package_util(); + var shared_utils_1 = require_shared_utils(); + var class_serializer_constants_1 = require_class_serializer_constants(); + var classTransformer = {}; + var REFLECTOR = "Reflector"; + var ClassSerializerInterceptor = class ClassSerializerInterceptor { + constructor(reflector, defaultOptions = {}) { + this.reflector = reflector; + this.defaultOptions = defaultOptions; + classTransformer = defaultOptions?.transformerPackage ?? (0, load_package_util_1.loadPackage)("class-transformer", "ClassSerializerInterceptor", () => require_cjs2()); + if (!defaultOptions?.transformerPackage) { + require_cjs2(); + } + } + intercept(context, next) { + const contextOptions = this.getContextOptions(context); + const options = { + ...this.defaultOptions, + ...contextOptions + }; + return next.handle().pipe((0, operators_1.map)((res) => this.serialize(res, options))); + } + /** + * Serializes responses that are non-null objects nor streamable files. + */ + serialize(response, options) { + if (!(0, shared_utils_1.isObject)(response) || response instanceof file_stream_1.StreamableFile) { + return response; + } + return Array.isArray(response) ? response.map((item) => this.transformToPlain(item, options)) : this.transformToPlain(response, options); + } + transformToPlain(plainOrClass, options) { + if (!plainOrClass) { + return plainOrClass; + } + if (!options.type) { + return classTransformer.classToPlain(plainOrClass, options); + } + if (plainOrClass instanceof options.type) { + return classTransformer.classToPlain(plainOrClass, options); + } + const instance = classTransformer.plainToClass(options.type, plainOrClass); + return classTransformer.classToPlain(instance, options); + } + getContextOptions(context) { + return this.reflector.getAllAndOverride(class_serializer_constants_1.CLASS_SERIALIZER_OPTIONS, [ + context.getHandler(), + context.getClass() + ]); + } + }; + exports2.ClassSerializerInterceptor = ClassSerializerInterceptor; + exports2.ClassSerializerInterceptor = ClassSerializerInterceptor = tslib_1.__decorate([ + (0, core_12.Injectable)(), + tslib_1.__param(0, (0, core_12.Inject)(REFLECTOR)), + tslib_1.__param(1, (0, core_12.Optional)()), + tslib_1.__metadata("design:paramtypes", [Object, Object]) + ], ClassSerializerInterceptor); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/serializer/decorators/serialize-options.decorator.js +var require_serialize_options_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/serializer/decorators/serialize-options.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SerializeOptions = void 0; + var decorators_1 = require_decorators(); + var class_serializer_constants_1 = require_class_serializer_constants(); + var SerializeOptions = (options) => (0, decorators_1.SetMetadata)(class_serializer_constants_1.CLASS_SERIALIZER_OPTIONS, options); + exports2.SerializeOptions = SerializeOptions; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/serializer/decorators/index.js +var require_decorators4 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/serializer/decorators/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_serialize_options_decorator(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/serializer/class-serializer.interfaces.js +var require_class_serializer_interfaces = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/serializer/class-serializer.interfaces.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/serializer/index.js +var require_serializer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/serializer/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_class_serializer_interceptor(), exports2); + tslib_1.__exportStar(require_decorators4(), exports2); + tslib_1.__exportStar(require_class_serializer_interfaces(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/forward-ref.util.js +var require_forward_ref_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/forward-ref.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.forwardRef = void 0; + var forwardRef = (fn) => ({ + forwardRef: fn + }); + exports2.forwardRef = forwardRef; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/index.js +var require_utils6 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_forward_ref_util(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/index.js +var require_common = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.VERSION_NEUTRAL = exports2.Scope = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + require_Reflect(); + tslib_1.__exportStar(require_decorators(), exports2); + tslib_1.__exportStar(require_enums(), exports2); + tslib_1.__exportStar(require_exceptions(), exports2); + tslib_1.__exportStar(require_file_stream(), exports2); + var interfaces_1 = require_interfaces(); + Object.defineProperty(exports2, "Scope", { enumerable: true, get: function() { + return interfaces_1.Scope; + } }); + Object.defineProperty(exports2, "VERSION_NEUTRAL", { enumerable: true, get: function() { + return interfaces_1.VERSION_NEUTRAL; + } }); + tslib_1.__exportStar(require_module_utils(), exports2); + tslib_1.__exportStar(require_pipes(), exports2); + tslib_1.__exportStar(require_serializer(), exports2); + tslib_1.__exportStar(require_services(), exports2); + tslib_1.__exportStar(require_utils6(), exports2); + } +}); + +// ../../node_modules/.pnpm/dotenv@16.4.5/node_modules/dotenv/package.json +var require_package = __commonJS({ + "../../node_modules/.pnpm/dotenv@16.4.5/node_modules/dotenv/package.json"(exports2, module2) { + module2.exports = { + name: "dotenv", + version: "16.4.5", + description: "Loads environment variables from .env file", + main: "lib/main.js", + types: "lib/main.d.ts", + exports: { + ".": { + types: "./lib/main.d.ts", + require: "./lib/main.js", + default: "./lib/main.js" + }, + "./config": "./config.js", + "./config.js": "./config.js", + "./lib/env-options": "./lib/env-options.js", + "./lib/env-options.js": "./lib/env-options.js", + "./lib/cli-options": "./lib/cli-options.js", + "./lib/cli-options.js": "./lib/cli-options.js", + "./package.json": "./package.json" + }, + scripts: { + "dts-check": "tsc --project tests/types/tsconfig.json", + lint: "standard", + "lint-readme": "standard-markdown", + pretest: "npm run lint && npm run dts-check", + test: "tap tests/*.js --100 -Rspec", + "test:coverage": "tap --coverage-report=lcov", + prerelease: "npm test", + release: "standard-version" + }, + repository: { + type: "git", + url: "git://github.com/motdotla/dotenv.git" + }, + funding: "https://dotenvx.com", + keywords: [ + "dotenv", + "env", + ".env", + "environment", + "variables", + "config", + "settings" + ], + readmeFilename: "README.md", + license: "BSD-2-Clause", + devDependencies: { + "@definitelytyped/dtslint": "^0.0.133", + "@types/node": "^18.11.3", + decache: "^4.6.1", + sinon: "^14.0.1", + standard: "^17.0.0", + "standard-markdown": "^7.1.0", + "standard-version": "^9.5.0", + tap: "^16.3.0", + tar: "^6.1.11", + typescript: "^4.8.4" + }, + engines: { + node: ">=12" + }, + browser: { + fs: false + } + }; + } +}); + +// ../../node_modules/.pnpm/dotenv@16.4.5/node_modules/dotenv/lib/main.js +var require_main = __commonJS({ + "../../node_modules/.pnpm/dotenv@16.4.5/node_modules/dotenv/lib/main.js"(exports2, module2) { + var fs = require("fs"); + var path = require("path"); + var os2 = require("os"); + var crypto5 = require("crypto"); + var packageJson = require_package(); + var version2 = packageJson.version; + var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg; + function parse2(src) { + const obj2 = {}; + let lines = src.toString(); + lines = lines.replace(/\r\n?/mg, "\n"); + let match; + while ((match = LINE.exec(lines)) != null) { + const key = match[1]; + let value = match[2] || ""; + value = value.trim(); + const maybeQuote = value[0]; + value = value.replace(/^(['"`])([\s\S]*)\1$/mg, "$2"); + if (maybeQuote === '"') { + value = value.replace(/\\n/g, "\n"); + value = value.replace(/\\r/g, "\r"); + } + obj2[key] = value; + } + return obj2; + } + function _parseVault(options) { + const vaultPath = _vaultPath(options); + const result = DotenvModule.configDotenv({ path: vaultPath }); + if (!result.parsed) { + const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`); + err.code = "MISSING_DATA"; + throw err; + } + const keys = _dotenvKey(options).split(","); + const length = keys.length; + let decrypted; + for (let i = 0; i < length; i++) { + try { + const key = keys[i].trim(); + const attrs = _instructions(result, key); + decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key); + break; + } catch (error) { + if (i + 1 >= length) { + throw error; + } + } + } + return DotenvModule.parse(decrypted); + } + function _log(message) { + console.log(`[dotenv@${version2}][INFO] ${message}`); + } + function _warn(message) { + console.log(`[dotenv@${version2}][WARN] ${message}`); + } + function _debug(message) { + console.log(`[dotenv@${version2}][DEBUG] ${message}`); + } + function _dotenvKey(options) { + if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) { + return options.DOTENV_KEY; + } + if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) { + return process.env.DOTENV_KEY; + } + return ""; + } + function _instructions(result, dotenvKey) { + let uri; + try { + uri = new URL(dotenvKey); + } catch (error) { + if (error.code === "ERR_INVALID_URL") { + const err = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development"); + err.code = "INVALID_DOTENV_KEY"; + throw err; + } + throw error; + } + const key = uri.password; + if (!key) { + const err = new Error("INVALID_DOTENV_KEY: Missing key part"); + err.code = "INVALID_DOTENV_KEY"; + throw err; + } + const environment = uri.searchParams.get("environment"); + if (!environment) { + const err = new Error("INVALID_DOTENV_KEY: Missing environment part"); + err.code = "INVALID_DOTENV_KEY"; + throw err; + } + const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`; + const ciphertext = result.parsed[environmentKey]; + if (!ciphertext) { + const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`); + err.code = "NOT_FOUND_DOTENV_ENVIRONMENT"; + throw err; + } + return { ciphertext, key }; + } + function _vaultPath(options) { + let possibleVaultPath = null; + if (options && options.path && options.path.length > 0) { + if (Array.isArray(options.path)) { + for (const filepath of options.path) { + if (fs.existsSync(filepath)) { + possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`; + } + } + } else { + possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`; + } + } else { + possibleVaultPath = path.resolve(process.cwd(), ".env.vault"); + } + if (fs.existsSync(possibleVaultPath)) { + return possibleVaultPath; + } + return null; + } + function _resolveHome(envPath) { + return envPath[0] === "~" ? path.join(os2.homedir(), envPath.slice(1)) : envPath; + } + function _configVault(options) { + _log("Loading env from encrypted .env.vault"); + const parsed = DotenvModule._parseVault(options); + let processEnv = process.env; + if (options && options.processEnv != null) { + processEnv = options.processEnv; + } + DotenvModule.populate(processEnv, parsed, options); + return { parsed }; + } + function configDotenv(options) { + const dotenvPath = path.resolve(process.cwd(), ".env"); + let encoding = "utf8"; + const debug = Boolean(options && options.debug); + if (options && options.encoding) { + encoding = options.encoding; + } else { + if (debug) { + _debug("No encoding is specified. UTF-8 is used by default"); + } + } + let optionPaths = [dotenvPath]; + if (options && options.path) { + if (!Array.isArray(options.path)) { + optionPaths = [_resolveHome(options.path)]; + } else { + optionPaths = []; + for (const filepath of options.path) { + optionPaths.push(_resolveHome(filepath)); + } + } + } + let lastError; + const parsedAll = {}; + for (const path2 of optionPaths) { + try { + const parsed = DotenvModule.parse(fs.readFileSync(path2, { encoding })); + DotenvModule.populate(parsedAll, parsed, options); + } catch (e) { + if (debug) { + _debug(`Failed to load ${path2} ${e.message}`); + } + lastError = e; + } + } + let processEnv = process.env; + if (options && options.processEnv != null) { + processEnv = options.processEnv; + } + DotenvModule.populate(processEnv, parsedAll, options); + if (lastError) { + return { parsed: parsedAll, error: lastError }; + } else { + return { parsed: parsedAll }; + } + } + function config(options) { + if (_dotenvKey(options).length === 0) { + return DotenvModule.configDotenv(options); + } + const vaultPath = _vaultPath(options); + if (!vaultPath) { + _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`); + return DotenvModule.configDotenv(options); + } + return DotenvModule._configVault(options); + } + function decrypt(encrypted, keyStr) { + const key = Buffer.from(keyStr.slice(-64), "hex"); + let ciphertext = Buffer.from(encrypted, "base64"); + const nonce = ciphertext.subarray(0, 12); + const authTag = ciphertext.subarray(-16); + ciphertext = ciphertext.subarray(12, -16); + try { + const aesgcm = crypto5.createDecipheriv("aes-256-gcm", key, nonce); + aesgcm.setAuthTag(authTag); + return `${aesgcm.update(ciphertext)}${aesgcm.final()}`; + } catch (error) { + const isRange = error instanceof RangeError; + const invalidKeyLength = error.message === "Invalid key length"; + const decryptionFailed = error.message === "Unsupported state or unable to authenticate data"; + if (isRange || invalidKeyLength) { + const err = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)"); + err.code = "INVALID_DOTENV_KEY"; + throw err; + } else if (decryptionFailed) { + const err = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY"); + err.code = "DECRYPTION_FAILED"; + throw err; + } else { + throw error; + } + } + } + function populate(processEnv, parsed, options = {}) { + const debug = Boolean(options && options.debug); + const override = Boolean(options && options.override); + if (typeof parsed !== "object") { + const err = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate"); + err.code = "OBJECT_REQUIRED"; + throw err; + } + for (const key of Object.keys(parsed)) { + if (Object.prototype.hasOwnProperty.call(processEnv, key)) { + if (override === true) { + processEnv[key] = parsed[key]; + } + if (debug) { + if (override === true) { + _debug(`"${key}" is already defined and WAS overwritten`); + } else { + _debug(`"${key}" is already defined and was NOT overwritten`); + } + } + } else { + processEnv[key] = parsed[key]; + } + } + } + var DotenvModule = { + configDotenv, + _configVault, + _parseVault, + config, + decrypt, + parse: parse2, + populate + }; + module2.exports.configDotenv = DotenvModule.configDotenv; + module2.exports._configVault = DotenvModule._configVault; + module2.exports._parseVault = DotenvModule._parseVault; + module2.exports.config = DotenvModule.config; + module2.exports.decrypt = DotenvModule.decrypt; + module2.exports.parse = DotenvModule.parse; + module2.exports.populate = DotenvModule.populate; + module2.exports = DotenvModule; + } +}); + +// ../../node_modules/.pnpm/dotenv-expand@10.0.0/node_modules/dotenv-expand/lib/main.js +var require_main2 = __commonJS({ + "../../node_modules/.pnpm/dotenv-expand@10.0.0/node_modules/dotenv-expand/lib/main.js"(exports2, module2) { + "use strict"; + function _searchLast(str, rgx) { + const matches = Array.from(str.matchAll(rgx)); + return matches.length > 0 ? matches.slice(-1)[0].index : -1; + } + function _interpolate(envValue, environment, config) { + const lastUnescapedDollarSignIndex = _searchLast(envValue, /(?!(?<=\\))\$/g); + if (lastUnescapedDollarSignIndex === -1) return envValue; + const rightMostGroup = envValue.slice(lastUnescapedDollarSignIndex); + const matchGroup = /((?!(?<=\\))\${?([\w]+)(?::-([^}\\]*))?}?)/; + const match = rightMostGroup.match(matchGroup); + if (match != null) { + const [, group, variableName, defaultValue] = match; + return _interpolate( + envValue.replace( + group, + environment[variableName] || defaultValue || config.parsed[variableName] || "" + ), + environment, + config + ); + } + return envValue; + } + function _resolveEscapeSequences(value) { + return value.replace(/\\\$/g, "$"); + } + function expand(config) { + const environment = config.ignoreProcessEnv ? {} : process.env; + for (const configKey in config.parsed) { + const value = Object.prototype.hasOwnProperty.call(environment, configKey) ? environment[configKey] : config.parsed[configKey]; + config.parsed[configKey] = _resolveEscapeSequences( + _interpolate(value, environment, config) + ); + } + for (const processKey in config.parsed) { + environment[processKey] = config.parsed[processKey]; + } + return config; + } + module2.exports.expand = expand; + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/config.constants.js +var require_config_constants = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/config.constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AS_PROVIDER_METHOD_KEY = exports2.VALIDATED_ENV_PROPNAME = exports2.PARTIAL_CONFIGURATION_PROPNAME = exports2.PARTIAL_CONFIGURATION_KEY = exports2.VALIDATED_ENV_LOADER = exports2.CONFIGURATION_LOADER = exports2.CONFIGURATION_TOKEN = exports2.CONFIGURATION_SERVICE_TOKEN = void 0; + exports2.CONFIGURATION_SERVICE_TOKEN = Symbol("CONFIG_SERVICE"); + exports2.CONFIGURATION_TOKEN = "CONFIGURATION_TOKEN"; + exports2.CONFIGURATION_LOADER = "CONFIGURATION_LOADER"; + exports2.VALIDATED_ENV_LOADER = "VALIDATED_ENV_LOADER"; + exports2.PARTIAL_CONFIGURATION_KEY = "PARTIAL_CONFIGURATION_KEY"; + exports2.PARTIAL_CONFIGURATION_PROPNAME = "KEY"; + exports2.VALIDATED_ENV_PROPNAME = "_PROCESS_ENV_VALIDATED"; + exports2.AS_PROVIDER_METHOD_KEY = "asProvider"; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js +var require_isArray = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js"(exports2, module2) { + var isArray = Array.isArray; + module2.exports = isArray; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js +var require_freeGlobal = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js"(exports2, module2) { + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + module2.exports = freeGlobal; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js +var require_root = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js"(exports2, module2) { + var freeGlobal = require_freeGlobal(); + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + module2.exports = root; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js +var require_Symbol = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js"(exports2, module2) { + var root = require_root(); + var Symbol2 = root.Symbol; + module2.exports = Symbol2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js +var require_getRawTag = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var nativeObjectToString = objectProto.toString; + var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0; + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; + try { + value[symToStringTag] = void 0; + var unmasked = true; + } catch (e) { + } + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + module2.exports = getRawTag; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js +var require_objectToString = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js"(exports2, module2) { + var objectProto = Object.prototype; + var nativeObjectToString = objectProto.toString; + function objectToString(value) { + return nativeObjectToString.call(value); + } + module2.exports = objectToString; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js +var require_baseGetTag = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var getRawTag = require_getRawTag(); + var objectToString = require_objectToString(); + var nullTag = "[object Null]"; + var undefinedTag = "[object Undefined]"; + var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0; + function baseGetTag(value) { + if (value == null) { + return value === void 0 ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); + } + module2.exports = baseGetTag; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js +var require_isObjectLike = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js"(exports2, module2) { + function isObjectLike(value) { + return value != null && typeof value == "object"; + } + module2.exports = isObjectLike; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js +var require_isSymbol = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObjectLike = require_isObjectLike(); + var symbolTag = "[object Symbol]"; + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag; + } + module2.exports = isSymbol; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKey.js +var require_isKey = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKey.js"(exports2, module2) { + var isArray = require_isArray(); + var isSymbol = require_isSymbol(); + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/; + var reIsPlainProp = /^\w*$/; + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object); + } + module2.exports = isKey; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js +var require_isObject2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js"(exports2, module2) { + function isObject2(value) { + var type = typeof value; + return value != null && (type == "object" || type == "function"); + } + module2.exports = isObject2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js +var require_isFunction2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObject2 = require_isObject2(); + var asyncTag = "[object AsyncFunction]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var proxyTag = "[object Proxy]"; + function isFunction(value) { + if (!isObject2(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + module2.exports = isFunction; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js +var require_coreJsData = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js"(exports2, module2) { + var root = require_root(); + var coreJsData = root["__core-js_shared__"]; + module2.exports = coreJsData; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isMasked.js +var require_isMasked = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isMasked.js"(exports2, module2) { + var coreJsData = require_coreJsData(); + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + })(); + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + module2.exports = isMasked; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toSource.js +var require_toSource = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toSource.js"(exports2, module2) { + var funcProto = Function.prototype; + var funcToString = funcProto.toString; + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + module2.exports = toSource; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js +var require_baseIsNative = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js"(exports2, module2) { + var isFunction = require_isFunction2(); + var isMasked = require_isMasked(); + var isObject2 = require_isObject2(); + var toSource = require_toSource(); + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var funcProto = Function.prototype; + var objectProto = Object.prototype; + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var reIsNative = RegExp( + "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + function baseIsNative(value) { + if (!isObject2(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + module2.exports = baseIsNative; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getValue.js +var require_getValue = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getValue.js"(exports2, module2) { + function getValue(object, key) { + return object == null ? void 0 : object[key]; + } + module2.exports = getValue; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getNative.js +var require_getNative = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getNative.js"(exports2, module2) { + var baseIsNative = require_baseIsNative(); + var getValue = require_getValue(); + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : void 0; + } + module2.exports = getNative; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js +var require_nativeCreate = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js"(exports2, module2) { + var getNative = require_getNative(); + var nativeCreate = getNative(Object, "create"); + module2.exports = nativeCreate; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js +var require_hashClear = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js"(exports2, module2) { + var nativeCreate = require_nativeCreate(); + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + module2.exports = hashClear; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js +var require_hashDelete = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js"(exports2, module2) { + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + module2.exports = hashDelete; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js +var require_hashGet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js"(exports2, module2) { + var nativeCreate = require_nativeCreate(); + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? void 0 : result; + } + return hasOwnProperty.call(data, key) ? data[key] : void 0; + } + module2.exports = hashGet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js +var require_hashHas = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js"(exports2, module2) { + var nativeCreate = require_nativeCreate(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key); + } + module2.exports = hashHas; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js +var require_hashSet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js"(exports2, module2) { + var nativeCreate = require_nativeCreate(); + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value; + return this; + } + module2.exports = hashSet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js +var require_Hash = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js"(exports2, module2) { + var hashClear = require_hashClear(); + var hashDelete = require_hashDelete(); + var hashGet = require_hashGet(); + var hashHas = require_hashHas(); + var hashSet = require_hashSet(); + function Hash(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + module2.exports = Hash; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js +var require_listCacheClear = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js"(exports2, module2) { + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + module2.exports = listCacheClear; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js +var require_eq = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js"(exports2, module2) { + function eq(value, other) { + return value === other || value !== value && other !== other; + } + module2.exports = eq; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js +var require_assocIndexOf = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js"(exports2, module2) { + var eq = require_eq(); + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + module2.exports = assocIndexOf; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js +var require_listCacheDelete = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js"(exports2, module2) { + var assocIndexOf = require_assocIndexOf(); + var arrayProto = Array.prototype; + var splice = arrayProto.splice; + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + module2.exports = listCacheDelete; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js +var require_listCacheGet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js"(exports2, module2) { + var assocIndexOf = require_assocIndexOf(); + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? void 0 : data[index][1]; + } + module2.exports = listCacheGet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js +var require_listCacheHas = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js"(exports2, module2) { + var assocIndexOf = require_assocIndexOf(); + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + module2.exports = listCacheHas; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js +var require_listCacheSet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js"(exports2, module2) { + var assocIndexOf = require_assocIndexOf(); + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + module2.exports = listCacheSet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js +var require_ListCache = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js"(exports2, module2) { + var listCacheClear = require_listCacheClear(); + var listCacheDelete = require_listCacheDelete(); + var listCacheGet = require_listCacheGet(); + var listCacheHas = require_listCacheHas(); + var listCacheSet = require_listCacheSet(); + function ListCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + module2.exports = ListCache; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Map.js +var require_Map = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Map.js"(exports2, module2) { + var getNative = require_getNative(); + var root = require_root(); + var Map2 = getNative(root, "Map"); + module2.exports = Map2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js +var require_mapCacheClear = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js"(exports2, module2) { + var Hash = require_Hash(); + var ListCache = require_ListCache(); + var Map2 = require_Map(); + function mapCacheClear() { + this.size = 0; + this.__data__ = { + "hash": new Hash(), + "map": new (Map2 || ListCache)(), + "string": new Hash() + }; + } + module2.exports = mapCacheClear; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js +var require_isKeyable = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js"(exports2, module2) { + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + module2.exports = isKeyable; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js +var require_getMapData = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js"(exports2, module2) { + var isKeyable = require_isKeyable(); + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + module2.exports = getMapData; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js +var require_mapCacheDelete = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js"(exports2, module2) { + var getMapData = require_getMapData(); + function mapCacheDelete(key) { + var result = getMapData(this, key)["delete"](key); + this.size -= result ? 1 : 0; + return result; + } + module2.exports = mapCacheDelete; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js +var require_mapCacheGet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js"(exports2, module2) { + var getMapData = require_getMapData(); + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + module2.exports = mapCacheGet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js +var require_mapCacheHas = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js"(exports2, module2) { + var getMapData = require_getMapData(); + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + module2.exports = mapCacheHas; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js +var require_mapCacheSet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js"(exports2, module2) { + var getMapData = require_getMapData(); + function mapCacheSet(key, value) { + var data = getMapData(this, key), size = data.size; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + module2.exports = mapCacheSet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js +var require_MapCache = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js"(exports2, module2) { + var mapCacheClear = require_mapCacheClear(); + var mapCacheDelete = require_mapCacheDelete(); + var mapCacheGet = require_mapCacheGet(); + var mapCacheHas = require_mapCacheHas(); + var mapCacheSet = require_mapCacheSet(); + function MapCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + module2.exports = MapCache; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/memoize.js +var require_memoize = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/memoize.js"(exports2, module2) { + var MapCache = require_MapCache(); + var FUNC_ERROR_TEXT = "Expected a function"; + function memoize(func, resolver) { + if (typeof func != "function" || resolver != null && typeof resolver != "function") { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; + } + memoize.Cache = MapCache; + module2.exports = memoize; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_memoizeCapped.js +var require_memoizeCapped = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_memoizeCapped.js"(exports2, module2) { + var memoize = require_memoize(); + var MAX_MEMOIZE_SIZE = 500; + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + var cache = result.cache; + return result; + } + module2.exports = memoizeCapped; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringToPath.js +var require_stringToPath = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringToPath.js"(exports2, module2) { + var memoizeCapped = require_memoizeCapped(); + var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + var reEscapeChar = /\\(\\)?/g; + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46) { + result.push(""); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match); + }); + return result; + }); + module2.exports = stringToPath; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js +var require_arrayMap = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js"(exports2, module2) { + function arrayMap(array, iteratee) { + var index = -1, length = array == null ? 0 : array.length, result = Array(length); + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + module2.exports = arrayMap; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToString.js +var require_baseToString = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToString.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var arrayMap = require_arrayMap(); + var isArray = require_isArray(); + var isSymbol = require_isSymbol(); + var INFINITY = 1 / 0; + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolToString = symbolProto ? symbolProto.toString : void 0; + function baseToString(value) { + if (typeof value == "string") { + return value; + } + if (isArray(value)) { + return arrayMap(value, baseToString) + ""; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ""; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + module2.exports = baseToString; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toString.js +var require_toString2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toString.js"(exports2, module2) { + var baseToString = require_baseToString(); + function toString2(value) { + return value == null ? "" : baseToString(value); + } + module2.exports = toString2; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castPath.js +var require_castPath = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castPath.js"(exports2, module2) { + var isArray = require_isArray(); + var isKey = require_isKey(); + var stringToPath = require_stringToPath(); + var toString2 = require_toString2(); + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString2(value)); + } + module2.exports = castPath; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toKey.js +var require_toKey = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toKey.js"(exports2, module2) { + var isSymbol = require_isSymbol(); + var INFINITY = 1 / 0; + function toKey(value) { + if (typeof value == "string" || isSymbol(value)) { + return value; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + module2.exports = toKey; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js +var require_baseGet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js"(exports2, module2) { + var castPath = require_castPath(); + var toKey = require_toKey(); + function baseGet(object, path) { + path = castPath(path, object); + var index = 0, length = path.length; + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return index && index == length ? object : void 0; + } + module2.exports = baseGet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/get.js +var require_get = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/get.js"(exports2, module2) { + var baseGet = require_baseGet(); + function get(object, path, defaultValue) { + var result = object == null ? void 0 : baseGet(object, path); + return result === void 0 ? defaultValue : result; + } + module2.exports = get; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHas.js +var require_baseHas = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHas.js"(exports2, module2) { + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + module2.exports = baseHas; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsArguments.js +var require_baseIsArguments = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsArguments.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObjectLike = require_isObjectLike(); + var argsTag = "[object Arguments]"; + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + module2.exports = baseIsArguments; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js +var require_isArguments = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js"(exports2, module2) { + var baseIsArguments = require_baseIsArguments(); + var isObjectLike = require_isObjectLike(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var isArguments = baseIsArguments(/* @__PURE__ */ (function() { + return arguments; + })()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee"); + }; + module2.exports = isArguments; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIndex.js +var require_isIndex = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIndex.js"(exports2, module2) { + var MAX_SAFE_INTEGER = 9007199254740991; + var reIsUint = /^(?:0|[1-9]\d*)$/; + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + module2.exports = isIndex; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js +var require_isLength2 = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js"(exports2, module2) { + var MAX_SAFE_INTEGER = 9007199254740991; + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + module2.exports = isLength; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hasPath.js +var require_hasPath = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hasPath.js"(exports2, module2) { + var castPath = require_castPath(); + var isArguments = require_isArguments(); + var isArray = require_isArray(); + var isIndex = require_isIndex(); + var isLength = require_isLength2(); + var toKey = require_toKey(); + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + var index = -1, length = path.length, result = false; + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); + } + module2.exports = hasPath; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/has.js +var require_has = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/has.js"(exports2, module2) { + var baseHas = require_baseHas(); + var hasPath = require_hasPath(); + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + module2.exports = has; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_defineProperty.js +var require_defineProperty = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_defineProperty.js"(exports2, module2) { + var getNative = require_getNative(); + var defineProperty = (function() { + try { + var func = getNative(Object, "defineProperty"); + func({}, "", {}); + return func; + } catch (e) { + } + })(); + module2.exports = defineProperty; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js +var require_baseAssignValue = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js"(exports2, module2) { + var defineProperty = require_defineProperty(); + function baseAssignValue(object, key, value) { + if (key == "__proto__" && defineProperty) { + defineProperty(object, key, { + "configurable": true, + "enumerable": true, + "value": value, + "writable": true + }); + } else { + object[key] = value; + } + } + module2.exports = baseAssignValue; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js +var require_assignValue = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js"(exports2, module2) { + var baseAssignValue = require_baseAssignValue(); + var eq = require_eq(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) { + baseAssignValue(object, key, value); + } + } + module2.exports = assignValue; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSet.js +var require_baseSet = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSet.js"(exports2, module2) { + var assignValue = require_assignValue(); + var castPath = require_castPath(); + var isIndex = require_isIndex(); + var isObject2 = require_isObject2(); + var toKey = require_toKey(); + function baseSet(object, path, value, customizer) { + if (!isObject2(object)) { + return object; + } + path = castPath(path, object); + var index = -1, length = path.length, lastIndex = length - 1, nested = object; + while (nested != null && ++index < length) { + var key = toKey(path[index]), newValue = value; + if (key === "__proto__" || key === "constructor" || key === "prototype") { + return object; + } + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : void 0; + if (newValue === void 0) { + newValue = isObject2(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {}; + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + module2.exports = baseSet; + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/set.js +var require_set = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/set.js"(exports2, module2) { + var baseSet = require_baseSet(); + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + module2.exports = set; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js +var require_performanceTimestampProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.performanceTimestampProvider = void 0; + exports2.performanceTimestampProvider = { + now: function() { + return (exports2.performanceTimestampProvider.delegate || performance).now(); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js +var require_animationFrameProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.animationFrameProvider = void 0; + var Subscription_1 = require_Subscription(); + exports2.animationFrameProvider = { + schedule: function(callback) { + var request = requestAnimationFrame; + var cancel = cancelAnimationFrame; + var delegate = exports2.animationFrameProvider.delegate; + if (delegate) { + request = delegate.requestAnimationFrame; + cancel = delegate.cancelAnimationFrame; + } + var handle = request(function(timestamp) { + cancel = void 0; + callback(timestamp); + }); + return new Subscription_1.Subscription(function() { + return cancel === null || cancel === void 0 ? void 0 : cancel(handle); + }); + }, + requestAnimationFrame: function() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var delegate = exports2.animationFrameProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray2([], __read2(args))); + }, + cancelAnimationFrame: function() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var delegate = exports2.animationFrameProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray2([], __read2(args))); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js +var require_animationFrames = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.animationFrames = void 0; + var Observable_1 = require_Observable(); + var performanceTimestampProvider_1 = require_performanceTimestampProvider(); + var animationFrameProvider_1 = require_animationFrameProvider(); + function animationFrames(timestampProvider) { + return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; + } + exports2.animationFrames = animationFrames; + function animationFramesFactory(timestampProvider) { + return new Observable_1.Observable(function(subscriber) { + var provider = timestampProvider || performanceTimestampProvider_1.performanceTimestampProvider; + var start = provider.now(); + var id = 0; + var run = function() { + if (!subscriber.closed) { + id = animationFrameProvider_1.animationFrameProvider.requestAnimationFrame(function(timestamp) { + id = 0; + var now = provider.now(); + subscriber.next({ + timestamp: timestampProvider ? now : timestamp, + elapsed: now - start + }); + run(); + }); + } + }; + run(); + return function() { + if (id) { + animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id); + } + }; + }); + } + var DEFAULT_ANIMATION_FRAMES = animationFramesFactory(); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/Immediate.js +var require_Immediate = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/Immediate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TestTools = exports2.Immediate = void 0; + var nextHandle = 1; + var resolved; + var activeHandles = {}; + function findAndClearHandle(handle) { + if (handle in activeHandles) { + delete activeHandles[handle]; + return true; + } + return false; + } + exports2.Immediate = { + setImmediate: function(cb) { + var handle = nextHandle++; + activeHandles[handle] = true; + if (!resolved) { + resolved = Promise.resolve(); + } + resolved.then(function() { + return findAndClearHandle(handle) && cb(); + }); + return handle; + }, + clearImmediate: function(handle) { + findAndClearHandle(handle); + } + }; + exports2.TestTools = { + pending: function() { + return Object.keys(activeHandles).length; + } + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js +var require_immediateProvider = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.immediateProvider = void 0; + var Immediate_1 = require_Immediate(); + var setImmediate2 = Immediate_1.Immediate.setImmediate; + var clearImmediate = Immediate_1.Immediate.clearImmediate; + exports2.immediateProvider = { + setImmediate: function() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var delegate = exports2.immediateProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate2).apply(void 0, __spreadArray2([], __read2(args))); + }, + clearImmediate: function(handle) { + var delegate = exports2.immediateProvider.delegate; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle); + }, + delegate: void 0 + }; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js +var require_AsapAction = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ (function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsapAction = void 0; + var AsyncAction_1 = require_AsyncAction(); + var immediateProvider_1 = require_immediateProvider(); + var AsapAction = (function(_super) { + __extends2(AsapAction2, _super); + function AsapAction2(scheduler2, work) { + var _this = _super.call(this, scheduler2, work) || this; + _this.scheduler = scheduler2; + _this.work = work; + return _this; + } + AsapAction2.prototype.requestAsyncId = function(scheduler2, id, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler2, id, delay); + } + scheduler2.actions.push(this); + return scheduler2._scheduled || (scheduler2._scheduled = immediateProvider_1.immediateProvider.setImmediate(scheduler2.flush.bind(scheduler2, void 0))); + }; + AsapAction2.prototype.recycleAsyncId = function(scheduler2, id, delay) { + var _a; + if (delay === void 0) { + delay = 0; + } + if (delay != null ? delay > 0 : this.delay > 0) { + return _super.prototype.recycleAsyncId.call(this, scheduler2, id, delay); + } + var actions = scheduler2.actions; + if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { + immediateProvider_1.immediateProvider.clearImmediate(id); + if (scheduler2._scheduled === id) { + scheduler2._scheduled = void 0; + } + } + return void 0; + }; + return AsapAction2; + })(AsyncAction_1.AsyncAction); + exports2.AsapAction = AsapAction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js +var require_AsapScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ (function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsapScheduler = void 0; + var AsyncScheduler_1 = require_AsyncScheduler(); + var AsapScheduler = (function(_super) { + __extends2(AsapScheduler2, _super); + function AsapScheduler2() { + return _super !== null && _super.apply(this, arguments) || this; + } + AsapScheduler2.prototype.flush = function(action) { + this._active = true; + var flushId = this._scheduled; + this._scheduled = void 0; + var actions = this.actions; + var error; + action = action || actions.shift(); + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + this._active = false; + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AsapScheduler2; + })(AsyncScheduler_1.AsyncScheduler); + exports2.AsapScheduler = AsapScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js +var require_asap = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.asap = exports2.asapScheduler = void 0; + var AsapAction_1 = require_AsapAction(); + var AsapScheduler_1 = require_AsapScheduler(); + exports2.asapScheduler = new AsapScheduler_1.AsapScheduler(AsapAction_1.AsapAction); + exports2.asap = exports2.asapScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js +var require_QueueAction = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ (function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QueueAction = void 0; + var AsyncAction_1 = require_AsyncAction(); + var QueueAction = (function(_super) { + __extends2(QueueAction2, _super); + function QueueAction2(scheduler2, work) { + var _this = _super.call(this, scheduler2, work) || this; + _this.scheduler = scheduler2; + _this.work = work; + return _this; + } + QueueAction2.prototype.schedule = function(state, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay > 0) { + return _super.prototype.schedule.call(this, state, delay); + } + this.delay = delay; + this.state = state; + this.scheduler.flush(this); + return this; + }; + QueueAction2.prototype.execute = function(state, delay) { + return delay > 0 || this.closed ? _super.prototype.execute.call(this, state, delay) : this._execute(state, delay); + }; + QueueAction2.prototype.requestAsyncId = function(scheduler2, id, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay != null && delay > 0 || delay == null && this.delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler2, id, delay); + } + scheduler2.flush(this); + return 0; + }; + return QueueAction2; + })(AsyncAction_1.AsyncAction); + exports2.QueueAction = QueueAction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js +var require_QueueScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ (function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QueueScheduler = void 0; + var AsyncScheduler_1 = require_AsyncScheduler(); + var QueueScheduler = (function(_super) { + __extends2(QueueScheduler2, _super); + function QueueScheduler2() { + return _super !== null && _super.apply(this, arguments) || this; + } + return QueueScheduler2; + })(AsyncScheduler_1.AsyncScheduler); + exports2.QueueScheduler = QueueScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js +var require_queue = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.queue = exports2.queueScheduler = void 0; + var QueueAction_1 = require_QueueAction(); + var QueueScheduler_1 = require_QueueScheduler(); + exports2.queueScheduler = new QueueScheduler_1.QueueScheduler(QueueAction_1.QueueAction); + exports2.queue = exports2.queueScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js +var require_AnimationFrameAction = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ (function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnimationFrameAction = void 0; + var AsyncAction_1 = require_AsyncAction(); + var animationFrameProvider_1 = require_animationFrameProvider(); + var AnimationFrameAction = (function(_super) { + __extends2(AnimationFrameAction2, _super); + function AnimationFrameAction2(scheduler2, work) { + var _this = _super.call(this, scheduler2, work) || this; + _this.scheduler = scheduler2; + _this.work = work; + return _this; + } + AnimationFrameAction2.prototype.requestAsyncId = function(scheduler2, id, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay !== null && delay > 0) { + return _super.prototype.requestAsyncId.call(this, scheduler2, id, delay); + } + scheduler2.actions.push(this); + return scheduler2._scheduled || (scheduler2._scheduled = animationFrameProvider_1.animationFrameProvider.requestAnimationFrame(function() { + return scheduler2.flush(void 0); + })); + }; + AnimationFrameAction2.prototype.recycleAsyncId = function(scheduler2, id, delay) { + var _a; + if (delay === void 0) { + delay = 0; + } + if (delay != null ? delay > 0 : this.delay > 0) { + return _super.prototype.recycleAsyncId.call(this, scheduler2, id, delay); + } + var actions = scheduler2.actions; + if (id != null && id === scheduler2._scheduled && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { + animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id); + scheduler2._scheduled = void 0; + } + return void 0; + }; + return AnimationFrameAction2; + })(AsyncAction_1.AsyncAction); + exports2.AnimationFrameAction = AnimationFrameAction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js +var require_AnimationFrameScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ (function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnimationFrameScheduler = void 0; + var AsyncScheduler_1 = require_AsyncScheduler(); + var AnimationFrameScheduler = (function(_super) { + __extends2(AnimationFrameScheduler2, _super); + function AnimationFrameScheduler2() { + return _super !== null && _super.apply(this, arguments) || this; + } + AnimationFrameScheduler2.prototype.flush = function(action) { + this._active = true; + var flushId; + if (action) { + flushId = action.id; + } else { + flushId = this._scheduled; + this._scheduled = void 0; + } + var actions = this.actions; + var error; + action = action || actions.shift(); + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + this._active = false; + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AnimationFrameScheduler2; + })(AsyncScheduler_1.AsyncScheduler); + exports2.AnimationFrameScheduler = AnimationFrameScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js +var require_animationFrame = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.animationFrame = exports2.animationFrameScheduler = void 0; + var AnimationFrameAction_1 = require_AnimationFrameAction(); + var AnimationFrameScheduler_1 = require_AnimationFrameScheduler(); + exports2.animationFrameScheduler = new AnimationFrameScheduler_1.AnimationFrameScheduler(AnimationFrameAction_1.AnimationFrameAction); + exports2.animationFrame = exports2.animationFrameScheduler; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js +var require_VirtualTimeScheduler = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js"(exports2) { + "use strict"; + var __extends2 = exports2 && exports2.__extends || /* @__PURE__ */ (function() { + var extendStatics2 = function(d, b) { + extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { + d2.__proto__ = b2; + } || function(d2, b2) { + for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; + }; + return extendStatics2(d, b); + }; + return function(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics2(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.VirtualAction = exports2.VirtualTimeScheduler = void 0; + var AsyncAction_1 = require_AsyncAction(); + var Subscription_1 = require_Subscription(); + var AsyncScheduler_1 = require_AsyncScheduler(); + var VirtualTimeScheduler = (function(_super) { + __extends2(VirtualTimeScheduler2, _super); + function VirtualTimeScheduler2(schedulerActionCtor, maxFrames) { + if (schedulerActionCtor === void 0) { + schedulerActionCtor = VirtualAction; + } + if (maxFrames === void 0) { + maxFrames = Infinity; + } + var _this = _super.call(this, schedulerActionCtor, function() { + return _this.frame; + }) || this; + _this.maxFrames = maxFrames; + _this.frame = 0; + _this.index = -1; + return _this; + } + VirtualTimeScheduler2.prototype.flush = function() { + var _a = this, actions = _a.actions, maxFrames = _a.maxFrames; + var error; + var action; + while ((action = actions[0]) && action.delay <= maxFrames) { + actions.shift(); + this.frame = action.delay; + if (error = action.execute(action.state, action.delay)) { + break; + } + } + if (error) { + while (action = actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + VirtualTimeScheduler2.frameTimeFactor = 10; + return VirtualTimeScheduler2; + })(AsyncScheduler_1.AsyncScheduler); + exports2.VirtualTimeScheduler = VirtualTimeScheduler; + var VirtualAction = (function(_super) { + __extends2(VirtualAction2, _super); + function VirtualAction2(scheduler2, work, index) { + if (index === void 0) { + index = scheduler2.index += 1; + } + var _this = _super.call(this, scheduler2, work) || this; + _this.scheduler = scheduler2; + _this.work = work; + _this.index = index; + _this.active = true; + _this.index = scheduler2.index = index; + return _this; + } + VirtualAction2.prototype.schedule = function(state, delay) { + if (delay === void 0) { + delay = 0; + } + if (Number.isFinite(delay)) { + if (!this.id) { + return _super.prototype.schedule.call(this, state, delay); + } + this.active = false; + var action = new VirtualAction2(this.scheduler, this.work); + this.add(action); + return action.schedule(state, delay); + } else { + return Subscription_1.Subscription.EMPTY; + } + }; + VirtualAction2.prototype.requestAsyncId = function(scheduler2, id, delay) { + if (delay === void 0) { + delay = 0; + } + this.delay = scheduler2.frame + delay; + var actions = scheduler2.actions; + actions.push(this); + actions.sort(VirtualAction2.sortActions); + return 1; + }; + VirtualAction2.prototype.recycleAsyncId = function(scheduler2, id, delay) { + if (delay === void 0) { + delay = 0; + } + return void 0; + }; + VirtualAction2.prototype._execute = function(state, delay) { + if (this.active === true) { + return _super.prototype._execute.call(this, state, delay); + } + }; + VirtualAction2.sortActions = function(a, b) { + if (a.delay === b.delay) { + if (a.index === b.index) { + return 0; + } else if (a.index > b.index) { + return 1; + } else { + return -1; + } + } else if (a.delay > b.delay) { + return 1; + } else { + return -1; + } + }; + return VirtualAction2; + })(AsyncAction_1.AsyncAction); + exports2.VirtualAction = VirtualAction; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isObservable.js +var require_isObservable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isObservable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isObservable = void 0; + var Observable_1 = require_Observable(); + var isFunction_1 = require_isFunction(); + function isObservable(obj2) { + return !!obj2 && (obj2 instanceof Observable_1.Observable || isFunction_1.isFunction(obj2.lift) && isFunction_1.isFunction(obj2.subscribe)); + } + exports2.isObservable = isObservable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js +var require_lastValueFrom = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.lastValueFrom = void 0; + var EmptyError_1 = require_EmptyError(); + function lastValueFrom(source, config) { + var hasConfig = typeof config === "object"; + return new Promise(function(resolve, reject) { + var _hasValue = false; + var _value; + source.subscribe({ + next: function(value) { + _value = value; + _hasValue = true; + }, + error: reject, + complete: function() { + if (_hasValue) { + resolve(_value); + } else if (hasConfig) { + resolve(config.defaultValue); + } else { + reject(new EmptyError_1.EmptyError()); + } + } + }); + }); + } + exports2.lastValueFrom = lastValueFrom; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js +var require_firstValueFrom = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.firstValueFrom = void 0; + var EmptyError_1 = require_EmptyError(); + var Subscriber_1 = require_Subscriber(); + function firstValueFrom(source, config) { + var hasConfig = typeof config === "object"; + return new Promise(function(resolve, reject) { + var subscriber = new Subscriber_1.SafeSubscriber({ + next: function(value) { + resolve(value); + subscriber.unsubscribe(); + }, + error: reject, + complete: function() { + if (hasConfig) { + resolve(config.defaultValue); + } else { + reject(new EmptyError_1.EmptyError()); + } + } + }); + source.subscribe(subscriber); + }); + } + exports2.firstValueFrom = firstValueFrom; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js +var require_bindCallbackInternals = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bindCallbackInternals = void 0; + var isScheduler_1 = require_isScheduler(); + var Observable_1 = require_Observable(); + var subscribeOn_1 = require_subscribeOn(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var observeOn_1 = require_observeOn(); + var AsyncSubject_1 = require_AsyncSubject(); + function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler2) { + if (resultSelector) { + if (isScheduler_1.isScheduler(resultSelector)) { + scheduler2 = resultSelector; + } else { + return function() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler2).apply(this, args).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); + }; + } + } + if (scheduler2) { + return function() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return bindCallbackInternals(isNodeStyle, callbackFunc).apply(this, args).pipe(subscribeOn_1.subscribeOn(scheduler2), observeOn_1.observeOn(scheduler2)); + }; + } + return function() { + var _this = this; + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var subject = new AsyncSubject_1.AsyncSubject(); + var uninitialized = true; + return new Observable_1.Observable(function(subscriber) { + var subs = subject.subscribe(subscriber); + if (uninitialized) { + uninitialized = false; + var isAsync_1 = false; + var isComplete_1 = false; + callbackFunc.apply(_this, __spreadArray2(__spreadArray2([], __read2(args)), [ + function() { + var results = []; + for (var _i2 = 0; _i2 < arguments.length; _i2++) { + results[_i2] = arguments[_i2]; + } + if (isNodeStyle) { + var err = results.shift(); + if (err != null) { + subject.error(err); + return; + } + } + subject.next(1 < results.length ? results : results[0]); + isComplete_1 = true; + if (isAsync_1) { + subject.complete(); + } + } + ])); + if (isComplete_1) { + subject.complete(); + } + isAsync_1 = true; + } + return subs; + }); + }; + } + exports2.bindCallbackInternals = bindCallbackInternals; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js +var require_bindCallback = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bindCallback = void 0; + var bindCallbackInternals_1 = require_bindCallbackInternals(); + function bindCallback(callbackFunc, resultSelector, scheduler2) { + return bindCallbackInternals_1.bindCallbackInternals(false, callbackFunc, resultSelector, scheduler2); + } + exports2.bindCallback = bindCallback; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js +var require_bindNodeCallback = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bindNodeCallback = void 0; + var bindCallbackInternals_1 = require_bindCallbackInternals(); + function bindNodeCallback(callbackFunc, resultSelector, scheduler2) { + return bindCallbackInternals_1.bindCallbackInternals(true, callbackFunc, resultSelector, scheduler2); + } + exports2.bindNodeCallback = bindNodeCallback; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/defer.js +var require_defer = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/defer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defer = void 0; + var Observable_1 = require_Observable(); + var innerFrom_1 = require_innerFrom(); + function defer(observableFactory) { + return new Observable_1.Observable(function(subscriber) { + innerFrom_1.innerFrom(observableFactory()).subscribe(subscriber); + }); + } + exports2.defer = defer; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/connectable.js +var require_connectable = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/connectable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.connectable = void 0; + var Subject_1 = require_Subject(); + var Observable_1 = require_Observable(); + var defer_1 = require_defer(); + var DEFAULT_CONFIG = { + connector: function() { + return new Subject_1.Subject(); + }, + resetOnDisconnect: true + }; + function connectable(source, config) { + if (config === void 0) { + config = DEFAULT_CONFIG; + } + var connection = null; + var connector = config.connector, _a = config.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a; + var subject = connector(); + var result = new Observable_1.Observable(function(subscriber) { + return subject.subscribe(subscriber); + }); + result.connect = function() { + if (!connection || connection.closed) { + connection = defer_1.defer(function() { + return source; + }).subscribe(subject); + if (resetOnDisconnect) { + connection.add(function() { + return subject = connector(); + }); + } + } + return connection; + }; + return result; + } + exports2.connectable = connectable; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js +var require_forkJoin = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.forkJoin = void 0; + var Observable_1 = require_Observable(); + var argsArgArrayOrObject_1 = require_argsArgArrayOrObject(); + var innerFrom_1 = require_innerFrom(); + var args_1 = require_args(); + var OperatorSubscriber_1 = require_OperatorSubscriber(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var createObject_1 = require_createObject(); + function forkJoin() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var resultSelector = args_1.popResultSelector(args); + var _a = argsArgArrayOrObject_1.argsArgArrayOrObject(args), sources = _a.args, keys = _a.keys; + var result = new Observable_1.Observable(function(subscriber) { + var length = sources.length; + if (!length) { + subscriber.complete(); + return; + } + var values = new Array(length); + var remainingCompletions = length; + var remainingEmissions = length; + var _loop_1 = function(sourceIndex2) { + var hasValue = false; + innerFrom_1.innerFrom(sources[sourceIndex2]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) { + if (!hasValue) { + hasValue = true; + remainingEmissions--; + } + values[sourceIndex2] = value; + }, function() { + return remainingCompletions--; + }, void 0, function() { + if (!remainingCompletions || !hasValue) { + if (!remainingEmissions) { + subscriber.next(keys ? createObject_1.createObject(keys, values) : values); + } + subscriber.complete(); + } + })); + }; + for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) { + _loop_1(sourceIndex); + } + }); + return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result; + } + exports2.forkJoin = forkJoin; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js +var require_fromEvent = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js"(exports2) { + "use strict"; + var __read2 = exports2 && exports2.__read || function(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromEvent = void 0; + var innerFrom_1 = require_innerFrom(); + var Observable_1 = require_Observable(); + var mergeMap_1 = require_mergeMap(); + var isArrayLike_1 = require_isArrayLike(); + var isFunction_1 = require_isFunction(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + var nodeEventEmitterMethods = ["addListener", "removeListener"]; + var eventTargetMethods = ["addEventListener", "removeEventListener"]; + var jqueryMethods = ["on", "off"]; + function fromEvent(target, eventName, options, resultSelector) { + if (isFunction_1.isFunction(options)) { + resultSelector = options; + options = void 0; + } + if (resultSelector) { + return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); + } + var _a = __read2(isEventTarget(target) ? eventTargetMethods.map(function(methodName) { + return function(handler) { + return target[methodName](eventName, handler, options); + }; + }) : isNodeStyleEventEmitter(target) ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) : isJQueryStyleEventEmitter(target) ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) : [], 2), add = _a[0], remove = _a[1]; + if (!add) { + if (isArrayLike_1.isArrayLike(target)) { + return mergeMap_1.mergeMap(function(subTarget) { + return fromEvent(subTarget, eventName, options); + })(innerFrom_1.innerFrom(target)); + } + } + if (!add) { + throw new TypeError("Invalid event target"); + } + return new Observable_1.Observable(function(subscriber) { + var handler = function() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return subscriber.next(1 < args.length ? args : args[0]); + }; + add(handler); + return function() { + return remove(handler); + }; + }); + } + exports2.fromEvent = fromEvent; + function toCommonHandlerRegistry(target, eventName) { + return function(methodName) { + return function(handler) { + return target[methodName](eventName, handler); + }; + }; + } + function isNodeStyleEventEmitter(target) { + return isFunction_1.isFunction(target.addListener) && isFunction_1.isFunction(target.removeListener); + } + function isJQueryStyleEventEmitter(target) { + return isFunction_1.isFunction(target.on) && isFunction_1.isFunction(target.off); + } + function isEventTarget(target) { + return isFunction_1.isFunction(target.addEventListener) && isFunction_1.isFunction(target.removeEventListener); + } + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js +var require_fromEventPattern = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fromEventPattern = void 0; + var Observable_1 = require_Observable(); + var isFunction_1 = require_isFunction(); + var mapOneOrManyArgs_1 = require_mapOneOrManyArgs(); + function fromEventPattern(addHandler, removeHandler, resultSelector) { + if (resultSelector) { + return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); + } + return new Observable_1.Observable(function(subscriber) { + var handler = function() { + var e = []; + for (var _i = 0; _i < arguments.length; _i++) { + e[_i] = arguments[_i]; + } + return subscriber.next(e.length === 1 ? e[0] : e); + }; + var retValue = addHandler(handler); + return isFunction_1.isFunction(removeHandler) ? function() { + return removeHandler(handler, retValue); + } : void 0; + }); + } + exports2.fromEventPattern = fromEventPattern; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/generate.js +var require_generate = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/generate.js"(exports2) { + "use strict"; + var __generator2 = exports2 && exports2.__generator || function(thisArg, body) { + var _2 = { label: 0, sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_2) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _2.label++; + return { value: op[1], done: false }; + case 5: + _2.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _2.ops.pop(); + _2.trys.pop(); + continue; + default: + if (!(t = _2.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _2 = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _2.label = op[1]; + break; + } + if (op[0] === 6 && _2.label < t[1]) { + _2.label = t[1]; + t = op; + break; + } + if (t && _2.label < t[2]) { + _2.label = t[2]; + _2.ops.push(op); + break; + } + if (t[2]) _2.ops.pop(); + _2.trys.pop(); + continue; + } + op = body.call(thisArg, _2); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generate = void 0; + var identity_1 = require_identity(); + var isScheduler_1 = require_isScheduler(); + var defer_1 = require_defer(); + var scheduleIterable_1 = require_scheduleIterable(); + function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler2) { + var _a, _b; + var resultSelector; + var initialState; + if (arguments.length === 1) { + _a = initialStateOrOptions, initialState = _a.initialState, condition = _a.condition, iterate = _a.iterate, _b = _a.resultSelector, resultSelector = _b === void 0 ? identity_1.identity : _b, scheduler2 = _a.scheduler; + } else { + initialState = initialStateOrOptions; + if (!resultSelectorOrScheduler || isScheduler_1.isScheduler(resultSelectorOrScheduler)) { + resultSelector = identity_1.identity; + scheduler2 = resultSelectorOrScheduler; + } else { + resultSelector = resultSelectorOrScheduler; + } + } + function gen() { + var state; + return __generator2(this, function(_a2) { + switch (_a2.label) { + case 0: + state = initialState; + _a2.label = 1; + case 1: + if (!(!condition || condition(state))) return [3, 4]; + return [4, resultSelector(state)]; + case 2: + _a2.sent(); + _a2.label = 3; + case 3: + state = iterate(state); + return [3, 1]; + case 4: + return [2]; + } + }); + } + return defer_1.defer(scheduler2 ? function() { + return scheduleIterable_1.scheduleIterable(gen(), scheduler2); + } : gen); + } + exports2.generate = generate; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/iif.js +var require_iif = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/iif.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.iif = void 0; + var defer_1 = require_defer(); + function iif(condition, trueResult, falseResult) { + return defer_1.defer(function() { + return condition() ? trueResult : falseResult; + }); + } + exports2.iif = iif; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/merge.js +var require_merge3 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/merge.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.merge = void 0; + var mergeAll_1 = require_mergeAll(); + var innerFrom_1 = require_innerFrom(); + var empty_1 = require_empty(); + var args_1 = require_args(); + var from_1 = require_from(); + function merge() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler2 = args_1.popScheduler(args); + var concurrent = args_1.popNumber(args, Infinity); + var sources = args; + return !sources.length ? empty_1.EMPTY : sources.length === 1 ? innerFrom_1.innerFrom(sources[0]) : mergeAll_1.mergeAll(concurrent)(from_1.from(sources, scheduler2)); + } + exports2.merge = merge; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/never.js +var require_never = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/never.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.never = exports2.NEVER = void 0; + var Observable_1 = require_Observable(); + var noop_1 = require_noop(); + exports2.NEVER = new Observable_1.Observable(noop_1.noop); + function never() { + return exports2.NEVER; + } + exports2.never = never; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/pairs.js +var require_pairs = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/pairs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pairs = void 0; + var from_1 = require_from(); + function pairs(obj2, scheduler2) { + return from_1.from(Object.entries(obj2), scheduler2); + } + exports2.pairs = pairs; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/partition.js +var require_partition2 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/partition.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.partition = void 0; + var not_1 = require_not(); + var filter_1 = require_filter2(); + var innerFrom_1 = require_innerFrom(); + function partition(source, predicate, thisArg) { + return [filter_1.filter(predicate, thisArg)(innerFrom_1.innerFrom(source)), filter_1.filter(not_1.not(predicate, thisArg))(innerFrom_1.innerFrom(source))]; + } + exports2.partition = partition; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/range.js +var require_range = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/range.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.range = void 0; + var Observable_1 = require_Observable(); + var empty_1 = require_empty(); + function range(start, count, scheduler2) { + if (count == null) { + count = start; + start = 0; + } + if (count <= 0) { + return empty_1.EMPTY; + } + var end = count + start; + return new Observable_1.Observable(scheduler2 ? function(subscriber) { + var n = start; + return scheduler2.schedule(function() { + if (n < end) { + subscriber.next(n++); + this.schedule(); + } else { + subscriber.complete(); + } + }); + } : function(subscriber) { + var n = start; + while (n < end && !subscriber.closed) { + subscriber.next(n++); + } + subscriber.complete(); + }); + } + exports2.range = range; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/using.js +var require_using = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/using.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.using = void 0; + var Observable_1 = require_Observable(); + var innerFrom_1 = require_innerFrom(); + var empty_1 = require_empty(); + function using(resourceFactory, observableFactory) { + return new Observable_1.Observable(function(subscriber) { + var resource = resourceFactory(); + var result = observableFactory(resource); + var source = result ? innerFrom_1.innerFrom(result) : empty_1.EMPTY; + source.subscribe(subscriber); + return function() { + if (resource) { + resource.unsubscribe(); + } + }; + }); + } + exports2.using = using; + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/types.js +var require_types = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/index.js +var require_cjs3 = __commonJS({ + "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.interval = exports2.iif = exports2.generate = exports2.fromEventPattern = exports2.fromEvent = exports2.from = exports2.forkJoin = exports2.empty = exports2.defer = exports2.connectable = exports2.concat = exports2.combineLatest = exports2.bindNodeCallback = exports2.bindCallback = exports2.UnsubscriptionError = exports2.TimeoutError = exports2.SequenceError = exports2.ObjectUnsubscribedError = exports2.NotFoundError = exports2.EmptyError = exports2.ArgumentOutOfRangeError = exports2.firstValueFrom = exports2.lastValueFrom = exports2.isObservable = exports2.identity = exports2.noop = exports2.pipe = exports2.NotificationKind = exports2.Notification = exports2.Subscriber = exports2.Subscription = exports2.Scheduler = exports2.VirtualAction = exports2.VirtualTimeScheduler = exports2.animationFrameScheduler = exports2.animationFrame = exports2.queueScheduler = exports2.queue = exports2.asyncScheduler = exports2.async = exports2.asapScheduler = exports2.asap = exports2.AsyncSubject = exports2.ReplaySubject = exports2.BehaviorSubject = exports2.Subject = exports2.animationFrames = exports2.observable = exports2.ConnectableObservable = exports2.Observable = void 0; + exports2.filter = exports2.expand = exports2.exhaustMap = exports2.exhaustAll = exports2.exhaust = exports2.every = exports2.endWith = exports2.elementAt = exports2.distinctUntilKeyChanged = exports2.distinctUntilChanged = exports2.distinct = exports2.dematerialize = exports2.delayWhen = exports2.delay = exports2.defaultIfEmpty = exports2.debounceTime = exports2.debounce = exports2.count = exports2.connect = exports2.concatWith = exports2.concatMapTo = exports2.concatMap = exports2.concatAll = exports2.combineLatestWith = exports2.combineLatestAll = exports2.combineAll = exports2.catchError = exports2.bufferWhen = exports2.bufferToggle = exports2.bufferTime = exports2.bufferCount = exports2.buffer = exports2.auditTime = exports2.audit = exports2.config = exports2.NEVER = exports2.EMPTY = exports2.scheduled = exports2.zip = exports2.using = exports2.timer = exports2.throwError = exports2.range = exports2.race = exports2.partition = exports2.pairs = exports2.onErrorResumeNext = exports2.of = exports2.never = exports2.merge = void 0; + exports2.switchMap = exports2.switchAll = exports2.subscribeOn = exports2.startWith = exports2.skipWhile = exports2.skipUntil = exports2.skipLast = exports2.skip = exports2.single = exports2.shareReplay = exports2.share = exports2.sequenceEqual = exports2.scan = exports2.sampleTime = exports2.sample = exports2.refCount = exports2.retryWhen = exports2.retry = exports2.repeatWhen = exports2.repeat = exports2.reduce = exports2.raceWith = exports2.publishReplay = exports2.publishLast = exports2.publishBehavior = exports2.publish = exports2.pluck = exports2.pairwise = exports2.onErrorResumeNextWith = exports2.observeOn = exports2.multicast = exports2.min = exports2.mergeWith = exports2.mergeScan = exports2.mergeMapTo = exports2.mergeMap = exports2.flatMap = exports2.mergeAll = exports2.max = exports2.materialize = exports2.mapTo = exports2.map = exports2.last = exports2.isEmpty = exports2.ignoreElements = exports2.groupBy = exports2.first = exports2.findIndex = exports2.find = exports2.finalize = void 0; + exports2.zipWith = exports2.zipAll = exports2.withLatestFrom = exports2.windowWhen = exports2.windowToggle = exports2.windowTime = exports2.windowCount = exports2.window = exports2.toArray = exports2.timestamp = exports2.timeoutWith = exports2.timeout = exports2.timeInterval = exports2.throwIfEmpty = exports2.throttleTime = exports2.throttle = exports2.tap = exports2.takeWhile = exports2.takeUntil = exports2.takeLast = exports2.take = exports2.switchScan = exports2.switchMapTo = void 0; + var Observable_1 = require_Observable(); + Object.defineProperty(exports2, "Observable", { enumerable: true, get: function() { + return Observable_1.Observable; + } }); + var ConnectableObservable_1 = require_ConnectableObservable(); + Object.defineProperty(exports2, "ConnectableObservable", { enumerable: true, get: function() { + return ConnectableObservable_1.ConnectableObservable; + } }); + var observable_1 = require_observable(); + Object.defineProperty(exports2, "observable", { enumerable: true, get: function() { + return observable_1.observable; + } }); + var animationFrames_1 = require_animationFrames(); + Object.defineProperty(exports2, "animationFrames", { enumerable: true, get: function() { + return animationFrames_1.animationFrames; + } }); + var Subject_1 = require_Subject(); + Object.defineProperty(exports2, "Subject", { enumerable: true, get: function() { + return Subject_1.Subject; + } }); + var BehaviorSubject_1 = require_BehaviorSubject(); + Object.defineProperty(exports2, "BehaviorSubject", { enumerable: true, get: function() { + return BehaviorSubject_1.BehaviorSubject; + } }); + var ReplaySubject_1 = require_ReplaySubject(); + Object.defineProperty(exports2, "ReplaySubject", { enumerable: true, get: function() { + return ReplaySubject_1.ReplaySubject; + } }); + var AsyncSubject_1 = require_AsyncSubject(); + Object.defineProperty(exports2, "AsyncSubject", { enumerable: true, get: function() { + return AsyncSubject_1.AsyncSubject; + } }); + var asap_1 = require_asap(); + Object.defineProperty(exports2, "asap", { enumerable: true, get: function() { + return asap_1.asap; + } }); + Object.defineProperty(exports2, "asapScheduler", { enumerable: true, get: function() { + return asap_1.asapScheduler; + } }); + var async_1 = require_async(); + Object.defineProperty(exports2, "async", { enumerable: true, get: function() { + return async_1.async; + } }); + Object.defineProperty(exports2, "asyncScheduler", { enumerable: true, get: function() { + return async_1.asyncScheduler; + } }); + var queue_1 = require_queue(); + Object.defineProperty(exports2, "queue", { enumerable: true, get: function() { + return queue_1.queue; + } }); + Object.defineProperty(exports2, "queueScheduler", { enumerable: true, get: function() { + return queue_1.queueScheduler; + } }); + var animationFrame_1 = require_animationFrame(); + Object.defineProperty(exports2, "animationFrame", { enumerable: true, get: function() { + return animationFrame_1.animationFrame; + } }); + Object.defineProperty(exports2, "animationFrameScheduler", { enumerable: true, get: function() { + return animationFrame_1.animationFrameScheduler; + } }); + var VirtualTimeScheduler_1 = require_VirtualTimeScheduler(); + Object.defineProperty(exports2, "VirtualTimeScheduler", { enumerable: true, get: function() { + return VirtualTimeScheduler_1.VirtualTimeScheduler; + } }); + Object.defineProperty(exports2, "VirtualAction", { enumerable: true, get: function() { + return VirtualTimeScheduler_1.VirtualAction; + } }); + var Scheduler_1 = require_Scheduler(); + Object.defineProperty(exports2, "Scheduler", { enumerable: true, get: function() { + return Scheduler_1.Scheduler; + } }); + var Subscription_1 = require_Subscription(); + Object.defineProperty(exports2, "Subscription", { enumerable: true, get: function() { + return Subscription_1.Subscription; + } }); + var Subscriber_1 = require_Subscriber(); + Object.defineProperty(exports2, "Subscriber", { enumerable: true, get: function() { + return Subscriber_1.Subscriber; + } }); + var Notification_1 = require_Notification(); + Object.defineProperty(exports2, "Notification", { enumerable: true, get: function() { + return Notification_1.Notification; + } }); + Object.defineProperty(exports2, "NotificationKind", { enumerable: true, get: function() { + return Notification_1.NotificationKind; + } }); + var pipe_1 = require_pipe(); + Object.defineProperty(exports2, "pipe", { enumerable: true, get: function() { + return pipe_1.pipe; + } }); + var noop_1 = require_noop(); + Object.defineProperty(exports2, "noop", { enumerable: true, get: function() { + return noop_1.noop; + } }); + var identity_1 = require_identity(); + Object.defineProperty(exports2, "identity", { enumerable: true, get: function() { + return identity_1.identity; + } }); + var isObservable_1 = require_isObservable(); + Object.defineProperty(exports2, "isObservable", { enumerable: true, get: function() { + return isObservable_1.isObservable; + } }); + var lastValueFrom_1 = require_lastValueFrom(); + Object.defineProperty(exports2, "lastValueFrom", { enumerable: true, get: function() { + return lastValueFrom_1.lastValueFrom; + } }); + var firstValueFrom_1 = require_firstValueFrom(); + Object.defineProperty(exports2, "firstValueFrom", { enumerable: true, get: function() { + return firstValueFrom_1.firstValueFrom; + } }); + var ArgumentOutOfRangeError_1 = require_ArgumentOutOfRangeError(); + Object.defineProperty(exports2, "ArgumentOutOfRangeError", { enumerable: true, get: function() { + return ArgumentOutOfRangeError_1.ArgumentOutOfRangeError; + } }); + var EmptyError_1 = require_EmptyError(); + Object.defineProperty(exports2, "EmptyError", { enumerable: true, get: function() { + return EmptyError_1.EmptyError; + } }); + var NotFoundError_1 = require_NotFoundError(); + Object.defineProperty(exports2, "NotFoundError", { enumerable: true, get: function() { + return NotFoundError_1.NotFoundError; + } }); + var ObjectUnsubscribedError_1 = require_ObjectUnsubscribedError(); + Object.defineProperty(exports2, "ObjectUnsubscribedError", { enumerable: true, get: function() { + return ObjectUnsubscribedError_1.ObjectUnsubscribedError; + } }); + var SequenceError_1 = require_SequenceError(); + Object.defineProperty(exports2, "SequenceError", { enumerable: true, get: function() { + return SequenceError_1.SequenceError; + } }); + var timeout_1 = require_timeout(); + Object.defineProperty(exports2, "TimeoutError", { enumerable: true, get: function() { + return timeout_1.TimeoutError; + } }); + var UnsubscriptionError_1 = require_UnsubscriptionError(); + Object.defineProperty(exports2, "UnsubscriptionError", { enumerable: true, get: function() { + return UnsubscriptionError_1.UnsubscriptionError; + } }); + var bindCallback_1 = require_bindCallback(); + Object.defineProperty(exports2, "bindCallback", { enumerable: true, get: function() { + return bindCallback_1.bindCallback; + } }); + var bindNodeCallback_1 = require_bindNodeCallback(); + Object.defineProperty(exports2, "bindNodeCallback", { enumerable: true, get: function() { + return bindNodeCallback_1.bindNodeCallback; + } }); + var combineLatest_1 = require_combineLatest(); + Object.defineProperty(exports2, "combineLatest", { enumerable: true, get: function() { + return combineLatest_1.combineLatest; + } }); + var concat_1 = require_concat3(); + Object.defineProperty(exports2, "concat", { enumerable: true, get: function() { + return concat_1.concat; + } }); + var connectable_1 = require_connectable(); + Object.defineProperty(exports2, "connectable", { enumerable: true, get: function() { + return connectable_1.connectable; + } }); + var defer_1 = require_defer(); + Object.defineProperty(exports2, "defer", { enumerable: true, get: function() { + return defer_1.defer; + } }); + var empty_1 = require_empty(); + Object.defineProperty(exports2, "empty", { enumerable: true, get: function() { + return empty_1.empty; + } }); + var forkJoin_1 = require_forkJoin(); + Object.defineProperty(exports2, "forkJoin", { enumerable: true, get: function() { + return forkJoin_1.forkJoin; + } }); + var from_1 = require_from(); + Object.defineProperty(exports2, "from", { enumerable: true, get: function() { + return from_1.from; + } }); + var fromEvent_1 = require_fromEvent(); + Object.defineProperty(exports2, "fromEvent", { enumerable: true, get: function() { + return fromEvent_1.fromEvent; + } }); + var fromEventPattern_1 = require_fromEventPattern(); + Object.defineProperty(exports2, "fromEventPattern", { enumerable: true, get: function() { + return fromEventPattern_1.fromEventPattern; + } }); + var generate_1 = require_generate(); + Object.defineProperty(exports2, "generate", { enumerable: true, get: function() { + return generate_1.generate; + } }); + var iif_1 = require_iif(); + Object.defineProperty(exports2, "iif", { enumerable: true, get: function() { + return iif_1.iif; + } }); + var interval_1 = require_interval(); + Object.defineProperty(exports2, "interval", { enumerable: true, get: function() { + return interval_1.interval; + } }); + var merge_1 = require_merge3(); + Object.defineProperty(exports2, "merge", { enumerable: true, get: function() { + return merge_1.merge; + } }); + var never_1 = require_never(); + Object.defineProperty(exports2, "never", { enumerable: true, get: function() { + return never_1.never; + } }); + var of_1 = require_of(); + Object.defineProperty(exports2, "of", { enumerable: true, get: function() { + return of_1.of; + } }); + var onErrorResumeNext_1 = require_onErrorResumeNext(); + Object.defineProperty(exports2, "onErrorResumeNext", { enumerable: true, get: function() { + return onErrorResumeNext_1.onErrorResumeNext; + } }); + var pairs_1 = require_pairs(); + Object.defineProperty(exports2, "pairs", { enumerable: true, get: function() { + return pairs_1.pairs; + } }); + var partition_1 = require_partition2(); + Object.defineProperty(exports2, "partition", { enumerable: true, get: function() { + return partition_1.partition; + } }); + var race_1 = require_race(); + Object.defineProperty(exports2, "race", { enumerable: true, get: function() { + return race_1.race; + } }); + var range_1 = require_range(); + Object.defineProperty(exports2, "range", { enumerable: true, get: function() { + return range_1.range; + } }); + var throwError_1 = require_throwError(); + Object.defineProperty(exports2, "throwError", { enumerable: true, get: function() { + return throwError_1.throwError; + } }); + var timer_1 = require_timer(); + Object.defineProperty(exports2, "timer", { enumerable: true, get: function() { + return timer_1.timer; + } }); + var using_1 = require_using(); + Object.defineProperty(exports2, "using", { enumerable: true, get: function() { + return using_1.using; + } }); + var zip_1 = require_zip2(); + Object.defineProperty(exports2, "zip", { enumerable: true, get: function() { + return zip_1.zip; + } }); + var scheduled_1 = require_scheduled(); + Object.defineProperty(exports2, "scheduled", { enumerable: true, get: function() { + return scheduled_1.scheduled; + } }); + var empty_2 = require_empty(); + Object.defineProperty(exports2, "EMPTY", { enumerable: true, get: function() { + return empty_2.EMPTY; + } }); + var never_2 = require_never(); + Object.defineProperty(exports2, "NEVER", { enumerable: true, get: function() { + return never_2.NEVER; + } }); + __exportStar2(require_types(), exports2); + var config_12 = require_config(); + Object.defineProperty(exports2, "config", { enumerable: true, get: function() { + return config_12.config; + } }); + var audit_1 = require_audit(); + Object.defineProperty(exports2, "audit", { enumerable: true, get: function() { + return audit_1.audit; + } }); + var auditTime_1 = require_auditTime(); + Object.defineProperty(exports2, "auditTime", { enumerable: true, get: function() { + return auditTime_1.auditTime; + } }); + var buffer_1 = require_buffer(); + Object.defineProperty(exports2, "buffer", { enumerable: true, get: function() { + return buffer_1.buffer; + } }); + var bufferCount_1 = require_bufferCount(); + Object.defineProperty(exports2, "bufferCount", { enumerable: true, get: function() { + return bufferCount_1.bufferCount; + } }); + var bufferTime_1 = require_bufferTime(); + Object.defineProperty(exports2, "bufferTime", { enumerable: true, get: function() { + return bufferTime_1.bufferTime; + } }); + var bufferToggle_1 = require_bufferToggle(); + Object.defineProperty(exports2, "bufferToggle", { enumerable: true, get: function() { + return bufferToggle_1.bufferToggle; + } }); + var bufferWhen_1 = require_bufferWhen(); + Object.defineProperty(exports2, "bufferWhen", { enumerable: true, get: function() { + return bufferWhen_1.bufferWhen; + } }); + var catchError_1 = require_catchError(); + Object.defineProperty(exports2, "catchError", { enumerable: true, get: function() { + return catchError_1.catchError; + } }); + var combineAll_1 = require_combineAll(); + Object.defineProperty(exports2, "combineAll", { enumerable: true, get: function() { + return combineAll_1.combineAll; + } }); + var combineLatestAll_1 = require_combineLatestAll(); + Object.defineProperty(exports2, "combineLatestAll", { enumerable: true, get: function() { + return combineLatestAll_1.combineLatestAll; + } }); + var combineLatestWith_1 = require_combineLatestWith(); + Object.defineProperty(exports2, "combineLatestWith", { enumerable: true, get: function() { + return combineLatestWith_1.combineLatestWith; + } }); + var concatAll_1 = require_concatAll(); + Object.defineProperty(exports2, "concatAll", { enumerable: true, get: function() { + return concatAll_1.concatAll; + } }); + var concatMap_1 = require_concatMap(); + Object.defineProperty(exports2, "concatMap", { enumerable: true, get: function() { + return concatMap_1.concatMap; + } }); + var concatMapTo_1 = require_concatMapTo(); + Object.defineProperty(exports2, "concatMapTo", { enumerable: true, get: function() { + return concatMapTo_1.concatMapTo; + } }); + var concatWith_1 = require_concatWith(); + Object.defineProperty(exports2, "concatWith", { enumerable: true, get: function() { + return concatWith_1.concatWith; + } }); + var connect_1 = require_connect(); + Object.defineProperty(exports2, "connect", { enumerable: true, get: function() { + return connect_1.connect; + } }); + var count_1 = require_count(); + Object.defineProperty(exports2, "count", { enumerable: true, get: function() { + return count_1.count; + } }); + var debounce_1 = require_debounce(); + Object.defineProperty(exports2, "debounce", { enumerable: true, get: function() { + return debounce_1.debounce; + } }); + var debounceTime_1 = require_debounceTime(); + Object.defineProperty(exports2, "debounceTime", { enumerable: true, get: function() { + return debounceTime_1.debounceTime; + } }); + var defaultIfEmpty_1 = require_defaultIfEmpty(); + Object.defineProperty(exports2, "defaultIfEmpty", { enumerable: true, get: function() { + return defaultIfEmpty_1.defaultIfEmpty; + } }); + var delay_1 = require_delay(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_1.delay; + } }); + var delayWhen_1 = require_delayWhen(); + Object.defineProperty(exports2, "delayWhen", { enumerable: true, get: function() { + return delayWhen_1.delayWhen; + } }); + var dematerialize_1 = require_dematerialize(); + Object.defineProperty(exports2, "dematerialize", { enumerable: true, get: function() { + return dematerialize_1.dematerialize; + } }); + var distinct_1 = require_distinct(); + Object.defineProperty(exports2, "distinct", { enumerable: true, get: function() { + return distinct_1.distinct; + } }); + var distinctUntilChanged_1 = require_distinctUntilChanged(); + Object.defineProperty(exports2, "distinctUntilChanged", { enumerable: true, get: function() { + return distinctUntilChanged_1.distinctUntilChanged; + } }); + var distinctUntilKeyChanged_1 = require_distinctUntilKeyChanged(); + Object.defineProperty(exports2, "distinctUntilKeyChanged", { enumerable: true, get: function() { + return distinctUntilKeyChanged_1.distinctUntilKeyChanged; + } }); + var elementAt_1 = require_elementAt(); + Object.defineProperty(exports2, "elementAt", { enumerable: true, get: function() { + return elementAt_1.elementAt; + } }); + var endWith_1 = require_endWith(); + Object.defineProperty(exports2, "endWith", { enumerable: true, get: function() { + return endWith_1.endWith; + } }); + var every_1 = require_every(); + Object.defineProperty(exports2, "every", { enumerable: true, get: function() { + return every_1.every; + } }); + var exhaust_1 = require_exhaust(); + Object.defineProperty(exports2, "exhaust", { enumerable: true, get: function() { + return exhaust_1.exhaust; + } }); + var exhaustAll_1 = require_exhaustAll(); + Object.defineProperty(exports2, "exhaustAll", { enumerable: true, get: function() { + return exhaustAll_1.exhaustAll; + } }); + var exhaustMap_1 = require_exhaustMap(); + Object.defineProperty(exports2, "exhaustMap", { enumerable: true, get: function() { + return exhaustMap_1.exhaustMap; + } }); + var expand_1 = require_expand(); + Object.defineProperty(exports2, "expand", { enumerable: true, get: function() { + return expand_1.expand; + } }); + var filter_1 = require_filter2(); + Object.defineProperty(exports2, "filter", { enumerable: true, get: function() { + return filter_1.filter; + } }); + var finalize_1 = require_finalize(); + Object.defineProperty(exports2, "finalize", { enumerable: true, get: function() { + return finalize_1.finalize; + } }); + var find_1 = require_find(); + Object.defineProperty(exports2, "find", { enumerable: true, get: function() { + return find_1.find; + } }); + var findIndex_1 = require_findIndex(); + Object.defineProperty(exports2, "findIndex", { enumerable: true, get: function() { + return findIndex_1.findIndex; + } }); + var first_1 = require_first(); + Object.defineProperty(exports2, "first", { enumerable: true, get: function() { + return first_1.first; + } }); + var groupBy_1 = require_groupBy(); + Object.defineProperty(exports2, "groupBy", { enumerable: true, get: function() { + return groupBy_1.groupBy; + } }); + var ignoreElements_1 = require_ignoreElements(); + Object.defineProperty(exports2, "ignoreElements", { enumerable: true, get: function() { + return ignoreElements_1.ignoreElements; + } }); + var isEmpty_1 = require_isEmpty2(); + Object.defineProperty(exports2, "isEmpty", { enumerable: true, get: function() { + return isEmpty_1.isEmpty; + } }); + var last_1 = require_last(); + Object.defineProperty(exports2, "last", { enumerable: true, get: function() { + return last_1.last; + } }); + var map_1 = require_map2(); + Object.defineProperty(exports2, "map", { enumerable: true, get: function() { + return map_1.map; + } }); + var mapTo_1 = require_mapTo(); + Object.defineProperty(exports2, "mapTo", { enumerable: true, get: function() { + return mapTo_1.mapTo; + } }); + var materialize_1 = require_materialize(); + Object.defineProperty(exports2, "materialize", { enumerable: true, get: function() { + return materialize_1.materialize; + } }); + var max_1 = require_max2(); + Object.defineProperty(exports2, "max", { enumerable: true, get: function() { + return max_1.max; + } }); + var mergeAll_1 = require_mergeAll(); + Object.defineProperty(exports2, "mergeAll", { enumerable: true, get: function() { + return mergeAll_1.mergeAll; + } }); + var flatMap_1 = require_flatMap(); + Object.defineProperty(exports2, "flatMap", { enumerable: true, get: function() { + return flatMap_1.flatMap; + } }); + var mergeMap_1 = require_mergeMap(); + Object.defineProperty(exports2, "mergeMap", { enumerable: true, get: function() { + return mergeMap_1.mergeMap; + } }); + var mergeMapTo_1 = require_mergeMapTo(); + Object.defineProperty(exports2, "mergeMapTo", { enumerable: true, get: function() { + return mergeMapTo_1.mergeMapTo; + } }); + var mergeScan_1 = require_mergeScan(); + Object.defineProperty(exports2, "mergeScan", { enumerable: true, get: function() { + return mergeScan_1.mergeScan; + } }); + var mergeWith_1 = require_mergeWith(); + Object.defineProperty(exports2, "mergeWith", { enumerable: true, get: function() { + return mergeWith_1.mergeWith; + } }); + var min_1 = require_min(); + Object.defineProperty(exports2, "min", { enumerable: true, get: function() { + return min_1.min; + } }); + var multicast_1 = require_multicast(); + Object.defineProperty(exports2, "multicast", { enumerable: true, get: function() { + return multicast_1.multicast; + } }); + var observeOn_1 = require_observeOn(); + Object.defineProperty(exports2, "observeOn", { enumerable: true, get: function() { + return observeOn_1.observeOn; + } }); + var onErrorResumeNextWith_1 = require_onErrorResumeNextWith(); + Object.defineProperty(exports2, "onErrorResumeNextWith", { enumerable: true, get: function() { + return onErrorResumeNextWith_1.onErrorResumeNextWith; + } }); + var pairwise_1 = require_pairwise(); + Object.defineProperty(exports2, "pairwise", { enumerable: true, get: function() { + return pairwise_1.pairwise; + } }); + var pluck_1 = require_pluck(); + Object.defineProperty(exports2, "pluck", { enumerable: true, get: function() { + return pluck_1.pluck; + } }); + var publish_1 = require_publish(); + Object.defineProperty(exports2, "publish", { enumerable: true, get: function() { + return publish_1.publish; + } }); + var publishBehavior_1 = require_publishBehavior(); + Object.defineProperty(exports2, "publishBehavior", { enumerable: true, get: function() { + return publishBehavior_1.publishBehavior; + } }); + var publishLast_1 = require_publishLast(); + Object.defineProperty(exports2, "publishLast", { enumerable: true, get: function() { + return publishLast_1.publishLast; + } }); + var publishReplay_1 = require_publishReplay(); + Object.defineProperty(exports2, "publishReplay", { enumerable: true, get: function() { + return publishReplay_1.publishReplay; + } }); + var raceWith_1 = require_raceWith(); + Object.defineProperty(exports2, "raceWith", { enumerable: true, get: function() { + return raceWith_1.raceWith; + } }); + var reduce_1 = require_reduce(); + Object.defineProperty(exports2, "reduce", { enumerable: true, get: function() { + return reduce_1.reduce; + } }); + var repeat_1 = require_repeat(); + Object.defineProperty(exports2, "repeat", { enumerable: true, get: function() { + return repeat_1.repeat; + } }); + var repeatWhen_1 = require_repeatWhen(); + Object.defineProperty(exports2, "repeatWhen", { enumerable: true, get: function() { + return repeatWhen_1.repeatWhen; + } }); + var retry_1 = require_retry(); + Object.defineProperty(exports2, "retry", { enumerable: true, get: function() { + return retry_1.retry; + } }); + var retryWhen_1 = require_retryWhen(); + Object.defineProperty(exports2, "retryWhen", { enumerable: true, get: function() { + return retryWhen_1.retryWhen; + } }); + var refCount_1 = require_refCount(); + Object.defineProperty(exports2, "refCount", { enumerable: true, get: function() { + return refCount_1.refCount; + } }); + var sample_1 = require_sample(); + Object.defineProperty(exports2, "sample", { enumerable: true, get: function() { + return sample_1.sample; + } }); + var sampleTime_1 = require_sampleTime(); + Object.defineProperty(exports2, "sampleTime", { enumerable: true, get: function() { + return sampleTime_1.sampleTime; + } }); + var scan_1 = require_scan(); + Object.defineProperty(exports2, "scan", { enumerable: true, get: function() { + return scan_1.scan; + } }); + var sequenceEqual_1 = require_sequenceEqual(); + Object.defineProperty(exports2, "sequenceEqual", { enumerable: true, get: function() { + return sequenceEqual_1.sequenceEqual; + } }); + var share_1 = require_share(); + Object.defineProperty(exports2, "share", { enumerable: true, get: function() { + return share_1.share; + } }); + var shareReplay_1 = require_shareReplay(); + Object.defineProperty(exports2, "shareReplay", { enumerable: true, get: function() { + return shareReplay_1.shareReplay; + } }); + var single_1 = require_single(); + Object.defineProperty(exports2, "single", { enumerable: true, get: function() { + return single_1.single; + } }); + var skip_1 = require_skip(); + Object.defineProperty(exports2, "skip", { enumerable: true, get: function() { + return skip_1.skip; + } }); + var skipLast_1 = require_skipLast(); + Object.defineProperty(exports2, "skipLast", { enumerable: true, get: function() { + return skipLast_1.skipLast; + } }); + var skipUntil_1 = require_skipUntil(); + Object.defineProperty(exports2, "skipUntil", { enumerable: true, get: function() { + return skipUntil_1.skipUntil; + } }); + var skipWhile_1 = require_skipWhile(); + Object.defineProperty(exports2, "skipWhile", { enumerable: true, get: function() { + return skipWhile_1.skipWhile; + } }); + var startWith_1 = require_startWith(); + Object.defineProperty(exports2, "startWith", { enumerable: true, get: function() { + return startWith_1.startWith; + } }); + var subscribeOn_1 = require_subscribeOn(); + Object.defineProperty(exports2, "subscribeOn", { enumerable: true, get: function() { + return subscribeOn_1.subscribeOn; + } }); + var switchAll_1 = require_switchAll(); + Object.defineProperty(exports2, "switchAll", { enumerable: true, get: function() { + return switchAll_1.switchAll; + } }); + var switchMap_1 = require_switchMap(); + Object.defineProperty(exports2, "switchMap", { enumerable: true, get: function() { + return switchMap_1.switchMap; + } }); + var switchMapTo_1 = require_switchMapTo(); + Object.defineProperty(exports2, "switchMapTo", { enumerable: true, get: function() { + return switchMapTo_1.switchMapTo; + } }); + var switchScan_1 = require_switchScan(); + Object.defineProperty(exports2, "switchScan", { enumerable: true, get: function() { + return switchScan_1.switchScan; + } }); + var take_1 = require_take(); + Object.defineProperty(exports2, "take", { enumerable: true, get: function() { + return take_1.take; + } }); + var takeLast_1 = require_takeLast(); + Object.defineProperty(exports2, "takeLast", { enumerable: true, get: function() { + return takeLast_1.takeLast; + } }); + var takeUntil_1 = require_takeUntil(); + Object.defineProperty(exports2, "takeUntil", { enumerable: true, get: function() { + return takeUntil_1.takeUntil; + } }); + var takeWhile_1 = require_takeWhile(); + Object.defineProperty(exports2, "takeWhile", { enumerable: true, get: function() { + return takeWhile_1.takeWhile; + } }); + var tap_1 = require_tap(); + Object.defineProperty(exports2, "tap", { enumerable: true, get: function() { + return tap_1.tap; + } }); + var throttle_1 = require_throttle(); + Object.defineProperty(exports2, "throttle", { enumerable: true, get: function() { + return throttle_1.throttle; + } }); + var throttleTime_1 = require_throttleTime(); + Object.defineProperty(exports2, "throttleTime", { enumerable: true, get: function() { + return throttleTime_1.throttleTime; + } }); + var throwIfEmpty_1 = require_throwIfEmpty(); + Object.defineProperty(exports2, "throwIfEmpty", { enumerable: true, get: function() { + return throwIfEmpty_1.throwIfEmpty; + } }); + var timeInterval_1 = require_timeInterval(); + Object.defineProperty(exports2, "timeInterval", { enumerable: true, get: function() { + return timeInterval_1.timeInterval; + } }); + var timeout_2 = require_timeout(); + Object.defineProperty(exports2, "timeout", { enumerable: true, get: function() { + return timeout_2.timeout; + } }); + var timeoutWith_1 = require_timeoutWith(); + Object.defineProperty(exports2, "timeoutWith", { enumerable: true, get: function() { + return timeoutWith_1.timeoutWith; + } }); + var timestamp_1 = require_timestamp(); + Object.defineProperty(exports2, "timestamp", { enumerable: true, get: function() { + return timestamp_1.timestamp; + } }); + var toArray_1 = require_toArray(); + Object.defineProperty(exports2, "toArray", { enumerable: true, get: function() { + return toArray_1.toArray; + } }); + var window_1 = require_window(); + Object.defineProperty(exports2, "window", { enumerable: true, get: function() { + return window_1.window; + } }); + var windowCount_1 = require_windowCount(); + Object.defineProperty(exports2, "windowCount", { enumerable: true, get: function() { + return windowCount_1.windowCount; + } }); + var windowTime_1 = require_windowTime(); + Object.defineProperty(exports2, "windowTime", { enumerable: true, get: function() { + return windowTime_1.windowTime; + } }); + var windowToggle_1 = require_windowToggle(); + Object.defineProperty(exports2, "windowToggle", { enumerable: true, get: function() { + return windowToggle_1.windowToggle; + } }); + var windowWhen_1 = require_windowWhen(); + Object.defineProperty(exports2, "windowWhen", { enumerable: true, get: function() { + return windowWhen_1.windowWhen; + } }); + var withLatestFrom_1 = require_withLatestFrom(); + Object.defineProperty(exports2, "withLatestFrom", { enumerable: true, get: function() { + return withLatestFrom_1.withLatestFrom; + } }); + var zipAll_1 = require_zipAll(); + Object.defineProperty(exports2, "zipAll", { enumerable: true, get: function() { + return zipAll_1.zipAll; + } }); + var zipWith_1 = require_zipWith(); + Object.defineProperty(exports2, "zipWith", { enumerable: true, get: function() { + return zipWith_1.zipWith; + } }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/config.service.js +var require_config_service = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/config.service.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ConfigService = void 0; + var common_12 = require_common(); + var shared_utils_1 = require_shared_utils(); + var dotenv = __importStar2(require_main()); + var fs_1 = __importDefault2(require("fs")); + var get_1 = __importDefault2(require_get()); + var has_1 = __importDefault2(require_has()); + var set_1 = __importDefault2(require_set()); + var rxjs_1 = require_cjs3(); + var config_constants_1 = require_config_constants(); + var ConfigService = class ConfigService { + set isCacheEnabled(value) { + this._isCacheEnabled = value; + } + get isCacheEnabled() { + return this._isCacheEnabled; + } + constructor(internalConfig = {}) { + this.internalConfig = internalConfig; + this.cache = {}; + this._changes$ = new rxjs_1.Subject(); + this._isCacheEnabled = false; + this.envFilePaths = []; + } + /** + * Returns a stream of configuration changes. + * Each event contains the attribute path, the old value and the new value. + */ + get changes$() { + return this._changes$.asObservable(); + } + /** + * Get a configuration value (either custom configuration or process environment variable) + * based on property path (you can use dot notation to traverse nested object, e.g. "database.host"). + * It returns a default value if the key does not exist. + * @param propertyPath + * @param defaultValueOrOptions + */ + get(propertyPath, defaultValueOrOptions, options) { + const validatedEnvValue = this.getFromValidatedEnv(propertyPath); + if (!(0, shared_utils_1.isUndefined)(validatedEnvValue)) { + return validatedEnvValue; + } + const defaultValue = this.isGetOptionsObject(defaultValueOrOptions) && !options ? void 0 : defaultValueOrOptions; + const processEnvValue = this.getFromProcessEnv(propertyPath, defaultValue); + if (!(0, shared_utils_1.isUndefined)(processEnvValue)) { + return processEnvValue; + } + const internalValue = this.getFromInternalConfig(propertyPath); + if (!(0, shared_utils_1.isUndefined)(internalValue)) { + return internalValue; + } + return defaultValue; + } + /** + * Get a configuration value (either custom configuration or process environment variable) + * based on property path (you can use dot notation to traverse nested object, e.g. "database.host"). + * It returns a default value if the key does not exist. + * If the default value is undefined an exception will be thrown. + * @param propertyPath + * @param defaultValueOrOptions + */ + getOrThrow(propertyPath, defaultValueOrOptions, options) { + const value = this.get(propertyPath, defaultValueOrOptions, options); + if ((0, shared_utils_1.isUndefined)(value)) { + throw new TypeError(`Configuration key "${propertyPath.toString()}" does not exist`); + } + return value; + } + /** + * Sets a configuration value based on property path. + * @param propertyPath + * @param value + */ + set(propertyPath, value) { + const oldValue = this.get(propertyPath); + (0, set_1.default)(this.internalConfig, propertyPath, value); + if (typeof propertyPath === "string") { + process.env[propertyPath] = String(value); + this.updateInterpolatedEnv(propertyPath, String(value)); + } + if (this.isCacheEnabled) { + this.setInCacheIfDefined(propertyPath, value); + } + this._changes$.next({ + path: propertyPath, + oldValue, + newValue: value + }); + } + /** + * Sets env file paths from `config.module.ts` to parse. + * @param paths + */ + setEnvFilePaths(paths) { + this.envFilePaths = paths; + } + getFromCache(propertyPath, defaultValue) { + const cachedValue = (0, get_1.default)(this.cache, propertyPath); + return (0, shared_utils_1.isUndefined)(cachedValue) ? defaultValue : cachedValue; + } + getFromValidatedEnv(propertyPath) { + const validatedEnvValue = (0, get_1.default)(this.internalConfig[config_constants_1.VALIDATED_ENV_PROPNAME], propertyPath); + return validatedEnvValue; + } + getFromProcessEnv(propertyPath, defaultValue) { + if (this.isCacheEnabled && (0, has_1.default)(this.cache, propertyPath)) { + const cachedValue = this.getFromCache(propertyPath, defaultValue); + return !(0, shared_utils_1.isUndefined)(cachedValue) ? cachedValue : defaultValue; + } + const processValue = (0, get_1.default)(process.env, propertyPath); + this.setInCacheIfDefined(propertyPath, processValue); + return processValue; + } + getFromInternalConfig(propertyPath) { + const internalValue = (0, get_1.default)(this.internalConfig, propertyPath); + return internalValue; + } + setInCacheIfDefined(propertyPath, value) { + if (typeof value === "undefined") { + return; + } + (0, set_1.default)(this.cache, propertyPath, value); + } + isGetOptionsObject(options) { + return options && options?.infer && Object.keys(options).length === 1; + } + updateInterpolatedEnv(propertyPath, value) { + let config = {}; + for (const envFilePath of this.envFilePaths) { + if (fs_1.default.existsSync(envFilePath)) { + config = Object.assign(dotenv.parse(fs_1.default.readFileSync(envFilePath)), config); + } + } + const regex = new RegExp(`\\$\\{?${propertyPath}\\}?`, "g"); + for (const [k, v] of Object.entries(config)) { + if (regex.test(v)) { + process.env[k] = v.replace(regex, value); + } + } + } + }; + exports2.ConfigService = ConfigService; + exports2.ConfigService = ConfigService = __decorate2([ + (0, common_12.Injectable)(), + __param2(0, (0, common_12.Optional)()), + __param2(0, (0, common_12.Inject)(config_constants_1.CONFIGURATION_TOKEN)), + __metadata2("design:paramtypes", [Object]) + ], ConfigService); + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/config-host.module.js +var require_config_host_module = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/config-host.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ConfigHostModule = void 0; + var common_12 = require_common(); + var config_constants_1 = require_config_constants(); + var config_service_1 = require_config_service(); + var ConfigHostModule = class ConfigHostModule { + }; + exports2.ConfigHostModule = ConfigHostModule; + exports2.ConfigHostModule = ConfigHostModule = __decorate2([ + (0, common_12.Global)(), + (0, common_12.Module)({ + providers: [ + { + provide: config_constants_1.CONFIGURATION_TOKEN, + useFactory: () => ({}) + }, + { + provide: config_constants_1.CONFIGURATION_SERVICE_TOKEN, + useClass: config_service_1.ConfigService + } + ], + exports: [config_constants_1.CONFIGURATION_TOKEN, config_constants_1.CONFIGURATION_SERVICE_TOKEN] + }) + ], ConfigHostModule); + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/utils/get-config-token.util.js +var require_get_config_token_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/utils/get-config-token.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getConfigToken = getConfigToken; + function getConfigToken(token) { + return `CONFIGURATION(${token})`; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/utils/create-config-factory.util.js +var require_create_config_factory_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/utils/create-config-factory.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createConfigProvider = createConfigProvider; + var get_config_token_util_1 = require_get_config_token_util(); + var crypto_1 = require("crypto"); + function createConfigProvider(factory) { + return { + provide: factory.KEY || (0, get_config_token_util_1.getConfigToken)((0, crypto_1.randomUUID)()), + useFactory: factory, + inject: [] + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/utils/get-registration-token.util.js +var require_get_registration_token_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/utils/get-registration-token.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRegistrationToken = getRegistrationToken; + var config_constants_1 = require_config_constants(); + function getRegistrationToken(config) { + return config[config_constants_1.PARTIAL_CONFIGURATION_KEY]; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/utils/merge-configs.util.js +var require_merge_configs_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/utils/merge-configs.util.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeConfigObject = mergeConfigObject; + var set_1 = __importDefault2(require_set()); + function mergeConfigObject(host, partial, token) { + if (token) { + (0, set_1.default)(host, token, partial); + return partial; + } + Object.assign(host, partial); + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/config.module.js +var require_config_module = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/config.module.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var ConfigModule_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ConfigModule = void 0; + var common_12 = require_common(); + var shared_utils_1 = require_shared_utils(); + var dotenv = __importStar2(require_main()); + var dotenv_expand_1 = require_main2(); + var fs = __importStar2(require("fs")); + var path_12 = require("path"); + var config_host_module_1 = require_config_host_module(); + var config_constants_1 = require_config_constants(); + var config_service_1 = require_config_service(); + var create_config_factory_util_1 = require_create_config_factory_util(); + var get_registration_token_util_1 = require_get_registration_token_util(); + var merge_configs_util_1 = require_merge_configs_util(); + var ConfigModule = ConfigModule_1 = class ConfigModule { + /** + * This promise resolves when "dotenv" completes loading environment variables. + * When "ignoreEnvFile" is set to true, then it will resolve immediately after the + * "ConfigModule#forRoot" method is called. + */ + static get envVariablesLoaded() { + return this._envVariablesLoaded; + } + /** + * Loads process environment variables depending on the "ignoreEnvFile" flag and "envFilePath" value. + * Also, registers custom configurations globally. + * @param options + */ + static async forRoot(options = {}) { + const envFilePaths = Array.isArray(options.envFilePath) ? options.envFilePath : [options.envFilePath || (0, path_12.resolve)(process.cwd(), ".env")]; + let validatedEnvConfig = void 0; + let config = options.ignoreEnvFile ? {} : this.loadEnvFile(envFilePaths, options); + if (!options.ignoreEnvVars) { + config = { + ...config, + ...process.env + }; + } + if (options.validate) { + const validatedConfig = options.validate(config); + validatedEnvConfig = validatedConfig; + this.assignVariablesToProcess(validatedConfig); + } else if (options.validationSchema) { + const validationOptions = this.getSchemaValidationOptions(options); + const { error, value: validatedConfig } = options.validationSchema.validate(config, validationOptions); + if (error) { + throw new Error(`Config validation error: ${error.message}`); + } + validatedEnvConfig = validatedConfig; + this.assignVariablesToProcess(validatedConfig); + } else { + this.assignVariablesToProcess(config); + } + const isConfigToLoad = options.load && options.load.length; + const configFactory = await Promise.all(options.load || []); + const providers = configFactory.map((factory) => (0, create_config_factory_util_1.createConfigProvider)(factory)).filter((item) => item); + const configProviderTokens = providers.map((item) => item.provide); + const configServiceProvider = { + provide: config_service_1.ConfigService, + useFactory: (configService) => { + if (options.cache) { + configService.isCacheEnabled = true; + } + configService.setEnvFilePaths(envFilePaths); + return configService; + }, + inject: [config_constants_1.CONFIGURATION_SERVICE_TOKEN, ...configProviderTokens] + }; + providers.push(configServiceProvider); + if (validatedEnvConfig) { + const validatedEnvConfigLoader = { + provide: config_constants_1.VALIDATED_ENV_LOADER, + useFactory: (host) => { + host[config_constants_1.VALIDATED_ENV_PROPNAME] = validatedEnvConfig; + }, + inject: [config_constants_1.CONFIGURATION_TOKEN] + }; + providers.push(validatedEnvConfigLoader); + } + this.environmentVariablesLoadedSignal(); + return { + module: ConfigModule_1, + global: options.isGlobal, + providers: isConfigToLoad ? [ + ...providers, + { + provide: config_constants_1.CONFIGURATION_LOADER, + useFactory: (host, ...configurations) => { + configurations.forEach((item, index) => this.mergePartial(host, item, providers[index])); + }, + inject: [config_constants_1.CONFIGURATION_TOKEN, ...configProviderTokens] + } + ] : providers, + exports: [config_service_1.ConfigService, ...configProviderTokens] + }; + } + /** + * Registers configuration object (partial registration). + * @param config + */ + static forFeature(config) { + const configProvider = (0, create_config_factory_util_1.createConfigProvider)(config); + const serviceProvider = { + provide: config_service_1.ConfigService, + useFactory: (configService) => configService, + inject: [config_constants_1.CONFIGURATION_SERVICE_TOKEN, configProvider.provide] + }; + return { + module: ConfigModule_1, + providers: [ + configProvider, + serviceProvider, + { + provide: config_constants_1.CONFIGURATION_LOADER, + useFactory: (host, partialConfig) => { + this.mergePartial(host, partialConfig, configProvider); + }, + inject: [config_constants_1.CONFIGURATION_TOKEN, configProvider.provide] + } + ], + exports: [config_service_1.ConfigService, configProvider.provide] + }; + } + static loadEnvFile(envFilePaths, options) { + let config = {}; + for (const envFilePath of envFilePaths) { + if (fs.existsSync(envFilePath)) { + config = Object.assign(dotenv.parse(fs.readFileSync(envFilePath)), config); + if (options.expandVariables) { + const expandOptions = typeof options.expandVariables === "object" ? options.expandVariables : {}; + config = (0, dotenv_expand_1.expand)({ ...expandOptions, parsed: config }).parsed || config; + } + } + } + return config; + } + static assignVariablesToProcess(config) { + if (!(0, shared_utils_1.isObject)(config)) { + return; + } + const keys = Object.keys(config).filter((key) => !(key in process.env)); + keys.forEach((key) => { + const value = config[key]; + if (typeof value === "string") { + process.env[key] = value; + } else if (typeof value === "boolean" || typeof value === "number") { + process.env[key] = `${value}`; + } + }); + } + static mergePartial(host, item, provider) { + const factoryRef = provider.useFactory; + const token = (0, get_registration_token_util_1.getRegistrationToken)(factoryRef); + (0, merge_configs_util_1.mergeConfigObject)(host, item, token); + } + static getSchemaValidationOptions(options) { + if (options.validationOptions) { + if (typeof options.validationOptions.allowUnknown === "undefined") { + options.validationOptions.allowUnknown = true; + } + return options.validationOptions; + } + return { + abortEarly: false, + allowUnknown: true + }; + } + }; + exports2.ConfigModule = ConfigModule; + ConfigModule._envVariablesLoaded = new Promise((resolve) => ConfigModule_1.environmentVariablesLoadedSignal = resolve); + exports2.ConfigModule = ConfigModule = ConfigModule_1 = __decorate2([ + (0, common_12.Module)({ + imports: [config_host_module_1.ConfigHostModule], + providers: [ + { + provide: config_service_1.ConfigService, + useExisting: config_constants_1.CONFIGURATION_SERVICE_TOKEN + } + ], + exports: [config_host_module_1.ConfigHostModule, config_service_1.ConfigService] + }) + ], ConfigModule); + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/conditional.module.js +var require_conditional_module = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/conditional.module.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ConditionalModule = void 0; + var common_12 = require_common(); + var config_module_1 = require_config_module(); + var getInstanceName = (instance) => { + if (instance?.forwardRef) { + return instance.forwardRef()?.name; + } + if (instance.module) { + return instance.module?.name; + } + return instance.name; + }; + var ConditionalModule = class _ConditionalModule { + /** + * @publicApi + */ + static async registerWhen(module3, condition, options) { + const { timeout = 5e3, debug = true } = options ?? {}; + const moduleName = getInstanceName(module3) || module3.toString(); + const timer = setTimeout(() => { + throw new Error(`Nest was not able to resolve the config variables within ${timeout} milliseconds. Bause of this, the ConditionalModule was not able to determine if ${moduleName} should be registered or not`); + }, timeout); + timer.unref(); + const returnModule = { module: _ConditionalModule, imports: [], exports: [] }; + if (typeof condition === "string") { + const key = condition; + condition = (env3) => { + return env3[key]?.toLowerCase() !== "false"; + }; + } + await config_module_1.ConfigModule.envVariablesLoaded; + clearTimeout(timer); + const evaluation = condition(process.env); + if (evaluation) { + returnModule.imports.push(module3); + returnModule.exports.push(module3); + } else { + if (debug) { + common_12.Logger.debug(`${condition.toString()} evaluated to false. Skipping the registration of ${moduleName}`, _ConditionalModule.name); + } + } + return returnModule; + } + }; + exports2.ConditionalModule = ConditionalModule; + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/types/config-object.type.js +var require_config_object_type = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/types/config-object.type.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/types/config.type.js +var require_config_type = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/types/config.type.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/types/no-infer.type.js +var require_no_infer_type = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/types/no-infer.type.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/types/path-value.type.js +var require_path_value_type = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/types/path-value.type.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/types/index.js +var require_types2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/types/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_config_object_type(), exports2); + __exportStar2(require_config_type(), exports2); + __exportStar2(require_no_infer_type(), exports2); + __exportStar2(require_path_value_type(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/utils/register-as.util.js +var require_register_as_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/utils/register-as.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.registerAs = registerAs; + var __1 = require_dist2(); + var config_constants_1 = require_config_constants(); + var get_config_token_util_1 = require_get_config_token_util(); + function registerAs(token, configFactory) { + const defineProperty = (key, value) => { + Object.defineProperty(configFactory, key, { + configurable: false, + enumerable: false, + value, + writable: false + }); + }; + defineProperty(config_constants_1.PARTIAL_CONFIGURATION_KEY, token); + defineProperty(config_constants_1.PARTIAL_CONFIGURATION_PROPNAME, (0, get_config_token_util_1.getConfigToken)(token)); + defineProperty(config_constants_1.AS_PROVIDER_METHOD_KEY, () => ({ + imports: [__1.ConfigModule.forFeature(configFactory)], + useFactory: (config) => config, + inject: [(0, get_config_token_util_1.getConfigToken)(token)] + })); + return configFactory; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/utils/index.js +var require_utils7 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/utils/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_register_as_util(), exports2); + __exportStar2(require_get_config_token_util(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/interfaces/config-change-event.interface.js +var require_config_change_event_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/interfaces/config-change-event.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/interfaces/config-factory.interface.js +var require_config_factory_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/interfaces/config-factory.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/interfaces/config-module-options.interface.js +var require_config_module_options_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/interfaces/config-module-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/interfaces/index.js +var require_interfaces4 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/interfaces/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_config_change_event_interface(), exports2); + __exportStar2(require_config_factory_interface(), exports2); + __exportStar2(require_config_module_options_interface(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/index.js +var require_dist2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/dist/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_conditional_module(), exports2); + __exportStar2(require_config_module(), exports2); + __exportStar2(require_config_service(), exports2); + __exportStar2(require_types2(), exports2); + __exportStar2(require_utils7(), exports2); + __exportStar2(require_interfaces4(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/index.js +var require_config2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+config@3.3.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_4ccxbulbtcejfsbymv6e4s3eea/node_modules/@nestjs/config/index.js"(exports2) { + "use strict"; + function __export2(m) { + for (var p in m) if (!exports2.hasOwnProperty(p)) exports2[p] = m[p]; + } + exports2.__esModule = true; + __export2(require_dist2()); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/adapters/http-adapter.js +var require_http_adapter = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/adapters/http-adapter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbstractHttpAdapter = void 0; + var AbstractHttpAdapter = class { + constructor(instance) { + this.instance = instance; + } + // eslint-disable-next-line @typescript-eslint/no-empty-function + async init() { + } + use(...args) { + return this.instance.use(...args); + } + get(...args) { + return this.instance.get(...args); + } + post(...args) { + return this.instance.post(...args); + } + head(...args) { + return this.instance.head(...args); + } + delete(...args) { + return this.instance.delete(...args); + } + put(...args) { + return this.instance.put(...args); + } + patch(...args) { + return this.instance.patch(...args); + } + all(...args) { + return this.instance.all(...args); + } + search(...args) { + return this.instance.search(...args); + } + options(...args) { + return this.instance.options(...args); + } + listen(port, hostname, callback) { + return this.instance.listen(port, hostname, callback); + } + getHttpServer() { + return this.httpServer; + } + setHttpServer(httpServer) { + this.httpServer = httpServer; + } + setInstance(instance) { + this.instance = instance; + } + getInstance() { + return this.instance; + } + }; + exports2.AbstractHttpAdapter = AbstractHttpAdapter; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/adapters/index.js +var require_adapters = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/adapters/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_http_adapter(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/application-config.js +var require_application_config = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/application-config.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApplicationConfig = void 0; + var ApplicationConfig = class { + constructor(ioAdapter = null) { + this.ioAdapter = ioAdapter; + this.globalPrefix = ""; + this.globalPrefixOptions = {}; + this.globalPipes = []; + this.globalFilters = []; + this.globalInterceptors = []; + this.globalGuards = []; + this.globalRequestPipes = []; + this.globalRequestFilters = []; + this.globalRequestInterceptors = []; + this.globalRequestGuards = []; + } + setGlobalPrefix(prefix) { + this.globalPrefix = prefix; + } + getGlobalPrefix() { + return this.globalPrefix; + } + setGlobalPrefixOptions(options) { + this.globalPrefixOptions = options; + } + getGlobalPrefixOptions() { + return this.globalPrefixOptions; + } + setIoAdapter(ioAdapter) { + this.ioAdapter = ioAdapter; + } + getIoAdapter() { + return this.ioAdapter; + } + addGlobalPipe(pipe) { + this.globalPipes.push(pipe); + } + useGlobalPipes(...pipes) { + this.globalPipes = this.globalPipes.concat(pipes); + } + getGlobalFilters() { + return this.globalFilters; + } + addGlobalFilter(filter) { + this.globalFilters.push(filter); + } + useGlobalFilters(...filters) { + this.globalFilters = this.globalFilters.concat(filters); + } + getGlobalPipes() { + return this.globalPipes; + } + getGlobalInterceptors() { + return this.globalInterceptors; + } + addGlobalInterceptor(interceptor) { + this.globalInterceptors.push(interceptor); + } + useGlobalInterceptors(...interceptors) { + this.globalInterceptors = this.globalInterceptors.concat(interceptors); + } + getGlobalGuards() { + return this.globalGuards; + } + addGlobalGuard(guard) { + this.globalGuards.push(guard); + } + useGlobalGuards(...guards) { + this.globalGuards = this.globalGuards.concat(guards); + } + addGlobalRequestInterceptor(wrapper) { + this.globalRequestInterceptors.push(wrapper); + } + getGlobalRequestInterceptors() { + return this.globalRequestInterceptors; + } + addGlobalRequestPipe(wrapper) { + this.globalRequestPipes.push(wrapper); + } + getGlobalRequestPipes() { + return this.globalRequestPipes; + } + addGlobalRequestFilter(wrapper) { + this.globalRequestFilters.push(wrapper); + } + getGlobalRequestFilters() { + return this.globalRequestFilters; + } + addGlobalRequestGuard(wrapper) { + this.globalRequestGuards.push(wrapper); + } + getGlobalRequestGuards() { + return this.globalRequestGuards; + } + enableVersioning(options) { + if (Array.isArray(options.defaultVersion)) { + options.defaultVersion = Array.from(new Set(options.defaultVersion)); + } + this.versioningOptions = options; + } + getVersioning() { + return this.versioningOptions; + } + }; + exports2.ApplicationConfig = ApplicationConfig; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/constants.js +var require_constants4 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ENHANCER_TOKEN_TO_SUBTYPE_MAP = exports2.APP_FILTER = exports2.APP_GUARD = exports2.APP_PIPE = exports2.APP_INTERCEPTOR = exports2.MESSAGES = void 0; + exports2.MESSAGES = { + APPLICATION_START: `Starting Nest application...`, + APPLICATION_READY: `Nest application successfully started`, + MICROSERVICE_READY: `Nest microservice successfully started`, + UNKNOWN_EXCEPTION_MESSAGE: "Internal server error", + ERROR_DURING_SHUTDOWN: "Error happened during shutdown", + CALL_LISTEN_FIRST: "app.listen() needs to be called before calling app.getUrl()" + }; + exports2.APP_INTERCEPTOR = "APP_INTERCEPTOR"; + exports2.APP_PIPE = "APP_PIPE"; + exports2.APP_GUARD = "APP_GUARD"; + exports2.APP_FILTER = "APP_FILTER"; + exports2.ENHANCER_TOKEN_TO_SUBTYPE_MAP = { + [exports2.APP_GUARD]: "guard", + [exports2.APP_INTERCEPTOR]: "interceptor", + [exports2.APP_PIPE]: "pipe", + [exports2.APP_FILTER]: "filter" + }; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/metadata-scanner.js +var require_metadata_scanner = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/metadata-scanner.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MetadataScanner = void 0; + var shared_utils_1 = require_shared_utils(); + var MetadataScanner = class { + constructor() { + this.cachedScannedPrototypes = /* @__PURE__ */ new Map(); + } + /** + * @deprecated + * @see {@link getAllMethodNames} + * @see getAllMethodNames + */ + scanFromPrototype(instance, prototype, callback) { + if (!prototype) { + return []; + } + const visitedNames = /* @__PURE__ */ new Map(); + const result = []; + do { + for (const property of Object.getOwnPropertyNames(prototype)) { + if (visitedNames.has(property)) { + continue; + } + visitedNames.set(property, true); + const descriptor = Object.getOwnPropertyDescriptor(prototype, property); + if (descriptor.set || descriptor.get || (0, shared_utils_1.isConstructor)(property) || !(0, shared_utils_1.isFunction)(prototype[property])) { + continue; + } + const value = callback(property); + if ((0, shared_utils_1.isNil)(value)) { + continue; + } + result.push(value); + } + } while ((prototype = Reflect.getPrototypeOf(prototype)) && prototype !== Object.prototype); + return result; + } + /** + * @deprecated + * @see {@link getAllMethodNames} + * @see getAllMethodNames + */ + *getAllFilteredMethodNames(prototype) { + yield* this.getAllMethodNames(prototype); + } + getAllMethodNames(prototype) { + if (!prototype) { + return []; + } + if (this.cachedScannedPrototypes.has(prototype)) { + return this.cachedScannedPrototypes.get(prototype); + } + const visitedNames = /* @__PURE__ */ new Map(); + const result = []; + this.cachedScannedPrototypes.set(prototype, result); + do { + for (const property of Object.getOwnPropertyNames(prototype)) { + if (visitedNames.has(property)) { + continue; + } + visitedNames.set(property, true); + const descriptor = Object.getOwnPropertyDescriptor(prototype, property); + if (descriptor.set || descriptor.get || (0, shared_utils_1.isConstructor)(property) || !(0, shared_utils_1.isFunction)(prototype[property])) { + continue; + } + result.push(property); + } + } while ((prototype = Reflect.getPrototypeOf(prototype)) && prototype !== Object.prototype); + return result; + } + }; + exports2.MetadataScanner = MetadataScanner; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/modules-container.js +var require_modules_container = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/modules-container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ModulesContainer = void 0; + var uid_1 = require_dist(); + var ModulesContainer = class extends Map { + constructor() { + super(...arguments); + this._applicationId = (0, uid_1.uid)(21); + } + get applicationId() { + return this._applicationId; + } + getById(id) { + return Array.from(this.values()).find((moduleRef) => moduleRef.id === id); + } + }; + exports2.ModulesContainer = ModulesContainer; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/discovery/discoverable-meta-host-collection.js +var require_discoverable_meta_host_collection = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/discovery/discoverable-meta-host-collection.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DiscoverableMetaHostCollection = void 0; + var DiscoverableMetaHostCollection = class _DiscoverableMetaHostCollection { + /** + * Adds a link between a class reference and a metadata key. + * @param target The class reference. + * @param metadataKey The metadata key. + */ + static addClassMetaHostLink(target, metadataKey) { + this.metaHostLinks.set(target, metadataKey); + } + /** + * Inspects a provider instance wrapper and adds it to the collection of providers + * if it has a metadata key. + * @param hostContainerRef A reference to the modules container. + * @param instanceWrapper A provider instance wrapper. + * @returns void + */ + static inspectProvider(hostContainerRef, instanceWrapper) { + return this.inspectInstanceWrapper(hostContainerRef, instanceWrapper, this.providersByMetaKey); + } + /** + * Inspects a controller instance wrapper and adds it to the collection of controllers + * if it has a metadata key. + * @param hostContainerRef A reference to the modules container. + * @param instanceWrapper A controller's instance wrapper. + * @returns void + */ + static inspectController(hostContainerRef, instanceWrapper) { + return this.inspectInstanceWrapper(hostContainerRef, instanceWrapper, this.controllersByMetaKey); + } + static insertByMetaKey(metaKey, instanceWrapper, collection) { + if (collection.has(metaKey)) { + const wrappers = collection.get(metaKey); + wrappers.add(instanceWrapper); + } else { + const wrappers = /* @__PURE__ */ new Set(); + wrappers.add(instanceWrapper); + collection.set(metaKey, wrappers); + } + } + static getProvidersByMetaKey(hostContainerRef, metaKey) { + const wrappersByMetaKey = this.providersByMetaKey.get(hostContainerRef); + return wrappersByMetaKey?.get(metaKey) ?? /* @__PURE__ */ new Set(); + } + static getControllersByMetaKey(hostContainerRef, metaKey) { + const wrappersByMetaKey = this.controllersByMetaKey.get(hostContainerRef); + return wrappersByMetaKey?.get(metaKey) ?? /* @__PURE__ */ new Set(); + } + static inspectInstanceWrapper(hostContainerRef, instanceWrapper, wrapperByMetaKeyMap) { + const metaKey = _DiscoverableMetaHostCollection.getMetaKeyByInstanceWrapper(instanceWrapper); + if (!metaKey) { + return; + } + let collection; + if (wrapperByMetaKeyMap.has(hostContainerRef)) { + collection = wrapperByMetaKeyMap.get(hostContainerRef); + } else { + collection = /* @__PURE__ */ new Map(); + wrapperByMetaKeyMap.set(hostContainerRef, collection); + } + this.insertByMetaKey(metaKey, instanceWrapper, collection); + } + static getMetaKeyByInstanceWrapper(instanceWrapper) { + return this.metaHostLinks.get( + // NOTE: Regarding the ternary statement below, + // - The condition `!wrapper.metatype` is needed because when we use `useValue` + // the value of `wrapper.metatype` will be `null`. + // - The condition `wrapper.inject` is needed here because when we use + // `useFactory`, the value of `wrapper.metatype` will be the supplied + // factory function. + // For both cases, we should use `wrapper.instance.constructor` instead + // of `wrapper.metatype` to resolve processor's class properly. + // But since calling `wrapper.instance` could degrade overall performance + // we must defer it as much we can. + instanceWrapper.metatype || instanceWrapper.inject ? instanceWrapper.instance?.constructor ?? instanceWrapper.metatype : instanceWrapper.metatype + ); + } + }; + exports2.DiscoverableMetaHostCollection = DiscoverableMetaHostCollection; + DiscoverableMetaHostCollection.metaHostLinks = /* @__PURE__ */ new Map(); + DiscoverableMetaHostCollection.providersByMetaKey = /* @__PURE__ */ new WeakMap(); + DiscoverableMetaHostCollection.controllersByMetaKey = /* @__PURE__ */ new WeakMap(); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/discovery/discovery-service.js +var require_discovery_service = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/discovery/discovery-service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DiscoveryService = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var common_12 = require_common(); + var uid_1 = require_dist(); + var modules_container_1 = require_modules_container(); + var discoverable_meta_host_collection_1 = require_discoverable_meta_host_collection(); + var DiscoveryService = class DiscoveryService { + constructor(modulesContainer) { + this.modulesContainer = modulesContainer; + } + /** + * Creates a decorator that can be used to decorate classes and methods with metadata. + * The decorator will also add the class to the collection of discoverable classes (by metadata key). + * Decorated classes can be discovered using the `getProviders` and `getControllers` methods. + * @returns A decorator function. + */ + static createDecorator() { + const metadataKey = (0, uid_1.uid)(21); + const decoratorFn = (opts) => (target, key, descriptor) => { + if (!descriptor) { + discoverable_meta_host_collection_1.DiscoverableMetaHostCollection.addClassMetaHostLink(target, metadataKey); + } + (0, common_12.SetMetadata)(metadataKey, opts ?? {})(target, key, descriptor); + }; + decoratorFn.KEY = metadataKey; + return decoratorFn; + } + /** + * Returns an array of instance wrappers (providers). + * Depending on the options, the array will contain either all providers or only providers with the specified metadata key. + * @param options Discovery options. + * @param modules A list of modules to filter by. + * @returns An array of instance wrappers (providers). + */ + getProviders(options = {}, modules = this.getModules(options)) { + if ("metadataKey" in options) { + const providers2 = discoverable_meta_host_collection_1.DiscoverableMetaHostCollection.getProvidersByMetaKey(this.modulesContainer, options.metadataKey); + return Array.from(providers2); + } + const providers = modules.map((item) => [...item.providers.values()]); + return (0, common_12.flatten)(providers); + } + /** + * Returns an array of instance wrappers (controllers). + * Depending on the options, the array will contain either all controllers or only controllers with the specified metadata key. + * @param options Discovery options. + * @param modules A list of modules to filter by. + * @returns An array of instance wrappers (controllers). + */ + getControllers(options = {}, modules = this.getModules(options)) { + if ("metadataKey" in options) { + const controllers2 = discoverable_meta_host_collection_1.DiscoverableMetaHostCollection.getControllersByMetaKey(this.modulesContainer, options.metadataKey); + return Array.from(controllers2); + } + const controllers = modules.map((item) => [...item.controllers.values()]); + return (0, common_12.flatten)(controllers); + } + /** + * Retrieves metadata from the specified instance wrapper. + * @param decorator The decorator to retrieve metadata of. + * @param instanceWrapper Reference to the instance wrapper. + * @param methodKey An optional method key to retrieve metadata from. + * @returns Discovered metadata. + */ + getMetadataByDecorator(decorator, instanceWrapper, methodKey) { + if (methodKey) { + return Reflect.getMetadata(decorator.KEY, instanceWrapper.instance[methodKey]); + } + const clsRef = instanceWrapper.instance?.constructor ?? instanceWrapper.metatype; + return Reflect.getMetadata(decorator.KEY, clsRef); + } + /** + * Returns a list of modules to be used for discovery. + */ + getModules(options = {}) { + const includeInOpts = "include" in options; + if (!includeInOpts) { + const moduleRefs = [...this.modulesContainer.values()]; + return moduleRefs; + } + const whitelisted = this.includeWhitelisted(options.include); + return whitelisted; + } + includeWhitelisted(include) { + const moduleRefs = [...this.modulesContainer.values()]; + return moduleRefs.filter(({ metatype }) => include.some((item) => item === metatype)); + } + }; + exports2.DiscoveryService = DiscoveryService; + exports2.DiscoveryService = DiscoveryService = tslib_1.__decorate([ + (0, common_12.Injectable)(), + tslib_1.__metadata("design:paramtypes", [modules_container_1.ModulesContainer]) + ], DiscoveryService); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/discovery/discovery-module.js +var require_discovery_module = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/discovery/discovery-module.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DiscoveryModule = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var common_12 = require_common(); + var metadata_scanner_1 = require_metadata_scanner(); + var discovery_service_1 = require_discovery_service(); + var DiscoveryModule = class DiscoveryModule { + }; + exports2.DiscoveryModule = DiscoveryModule; + exports2.DiscoveryModule = DiscoveryModule = tslib_1.__decorate([ + (0, common_12.Module)({ + providers: [metadata_scanner_1.MetadataScanner, discovery_service_1.DiscoveryService], + exports: [metadata_scanner_1.MetadataScanner, discovery_service_1.DiscoveryService] + }) + ], DiscoveryModule); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/discovery/index.js +var require_discovery = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/discovery/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_discovery_module(), exports2); + tslib_1.__exportStar(require_discovery_service(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/http-adapter-host.js +var require_http_adapter_host = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/http-adapter-host.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpAdapterHost = void 0; + var rxjs_1 = require_cjs3(); + var HttpAdapterHost = class { + constructor() { + this._listen$ = new rxjs_1.Subject(); + this.isListening = false; + } + /** + * Accessor for the underlying `HttpAdapter` + * + * @param httpAdapter reference to the `HttpAdapter` to be set + */ + set httpAdapter(httpAdapter) { + this._httpAdapter = httpAdapter; + } + /** + * Accessor for the underlying `HttpAdapter` + * + * @example + * `const httpAdapter = adapterHost.httpAdapter;` + */ + get httpAdapter() { + return this._httpAdapter; + } + /** + * Observable that allows to subscribe to the `listen` event. + * This event is emitted when the HTTP application is listening for incoming requests. + */ + get listen$() { + return this._listen$.asObservable(); + } + /** + * Sets the listening state of the application. + */ + set listening(listening) { + this.isListening = listening; + if (listening) { + this._listen$.next(); + this._listen$.complete(); + } + } + /** + * Returns a boolean indicating whether the application is listening for incoming requests. + */ + get listening() { + return this.isListening; + } + }; + exports2.HttpAdapterHost = HttpAdapterHost; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/exceptions/base-exception-filter.js +var require_base_exception_filter = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/exceptions/base-exception-filter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseExceptionFilter = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var common_12 = require_common(); + var shared_utils_1 = require_shared_utils(); + var constants_1 = require_constants4(); + var http_adapter_host_1 = require_http_adapter_host(); + var BaseExceptionFilter = class _BaseExceptionFilter { + constructor(applicationRef) { + this.applicationRef = applicationRef; + } + catch(exception, host) { + const applicationRef = this.applicationRef || this.httpAdapterHost && this.httpAdapterHost.httpAdapter; + if (!(exception instanceof common_12.HttpException)) { + return this.handleUnknownError(exception, host, applicationRef); + } + const res = exception.getResponse(); + const message = (0, shared_utils_1.isObject)(res) ? res : { + statusCode: exception.getStatus(), + message: res + }; + const response = host.getArgByIndex(1); + if (!applicationRef.isHeadersSent(response)) { + applicationRef.reply(response, message, exception.getStatus()); + } else { + applicationRef.end(response); + } + } + handleUnknownError(exception, host, applicationRef) { + const body = this.isHttpError(exception) ? { + statusCode: exception.statusCode, + message: exception.message + } : { + statusCode: common_12.HttpStatus.INTERNAL_SERVER_ERROR, + message: constants_1.MESSAGES.UNKNOWN_EXCEPTION_MESSAGE + }; + const response = host.getArgByIndex(1); + if (!applicationRef.isHeadersSent(response)) { + applicationRef.reply(response, body, body.statusCode); + } else { + applicationRef.end(response); + } + if (this.isExceptionObject(exception)) { + return _BaseExceptionFilter.logger.error(exception.message, exception.stack); + } + return _BaseExceptionFilter.logger.error(exception); + } + isExceptionObject(err) { + return (0, shared_utils_1.isObject)(err) && !!err.message; + } + /** + * Checks if the thrown error comes from the "http-errors" library. + * @param err error object + */ + isHttpError(err) { + return err?.statusCode && err?.message; + } + }; + exports2.BaseExceptionFilter = BaseExceptionFilter; + BaseExceptionFilter.logger = new common_12.Logger("ExceptionsHandler"); + tslib_1.__decorate([ + (0, common_12.Optional)(), + (0, common_12.Inject)(), + tslib_1.__metadata("design:type", http_adapter_host_1.HttpAdapterHost) + ], BaseExceptionFilter.prototype, "httpAdapterHost", void 0); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/exceptions/index.js +var require_exceptions2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/exceptions/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_base_exception_filter(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/request/request-constants.js +var require_request_constants = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/request/request-constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.REQUEST_CONTEXT_ID = exports2.REQUEST = void 0; + exports2.REQUEST = "REQUEST"; + exports2.REQUEST_CONTEXT_ID = Symbol("REQUEST_CONTEXT_ID"); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/context-id-factory.js +var require_context_id_factory = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/context-id-factory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContextIdFactory = void 0; + exports2.createContextId = createContextId; + var shared_utils_1 = require_shared_utils(); + var request_constants_1 = require_request_constants(); + function createContextId() { + return { id: Math.random() }; + } + var ContextIdFactory = class _ContextIdFactory { + /** + * Generates a context identifier based on the request object. + */ + static create() { + return createContextId(); + } + /** + * Generates a random identifier to track asynchronous execution context. + * @param request request object + */ + static getByRequest(request, propsToInspect = ["raw"]) { + if (!request) { + return _ContextIdFactory.create(); + } + if (request[request_constants_1.REQUEST_CONTEXT_ID]) { + return request[request_constants_1.REQUEST_CONTEXT_ID]; + } + for (const key of propsToInspect) { + if (request[key]?.[request_constants_1.REQUEST_CONTEXT_ID]) { + return request[key][request_constants_1.REQUEST_CONTEXT_ID]; + } + } + if (!this.strategy) { + return _ContextIdFactory.create(); + } + const contextId = createContextId(); + const resolverObjectOrFunction = this.strategy.attach(contextId, request); + if (this.isContextIdResolverWithPayload(resolverObjectOrFunction)) { + contextId.getParent = resolverObjectOrFunction.resolve; + contextId.payload = resolverObjectOrFunction.payload; + } else { + contextId.getParent = resolverObjectOrFunction; + } + return contextId; + } + /** + * Registers a custom context id strategy that lets you attach + * a parent context id to the existing context id object. + * @param strategy strategy instance + */ + static apply(strategy) { + this.strategy = strategy; + } + static isContextIdResolverWithPayload(resolverOrResolverFn) { + return (0, shared_utils_1.isObject)(resolverOrResolverFn); + } + }; + exports2.ContextIdFactory = ContextIdFactory; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/constants.js +var require_constants5 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.STATIC_CONTEXT = exports2.CONTROLLER_ID_KEY = void 0; + exports2.CONTROLLER_ID_KEY = "CONTROLLER_ID"; + var STATIC_CONTEXT_ID = 1; + exports2.STATIC_CONTEXT = Object.freeze({ + id: STATIC_CONTEXT_ID + }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/context-creator.js +var require_context_creator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/context-creator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContextCreator = void 0; + var constants_1 = require_constants5(); + var ContextCreator = class { + createContext(instance, callback, metadataKey, contextId = constants_1.STATIC_CONTEXT, inquirerId) { + const globalMetadata = this.getGlobalMetadata && this.getGlobalMetadata(contextId, inquirerId); + const classMetadata = this.reflectClassMetadata(instance, metadataKey); + const methodMetadata = this.reflectMethodMetadata(callback, metadataKey); + return [ + ...this.createConcreteContext(globalMetadata || [], contextId, inquirerId), + ...this.createConcreteContext(classMetadata, contextId, inquirerId), + ...this.createConcreteContext(methodMetadata, contextId, inquirerId) + ]; + } + reflectClassMetadata(instance, metadataKey) { + const prototype = Object.getPrototypeOf(instance); + return Reflect.getMetadata(metadataKey, prototype.constructor); + } + reflectMethodMetadata(callback, metadataKey) { + return Reflect.getMetadata(metadataKey, callback); + } + getContextId(contextId, instanceWrapper) { + return contextId.getParent ? contextId.getParent({ + token: instanceWrapper.token, + isTreeDurable: instanceWrapper.isDependencyTreeDurable() + }) : contextId; + } + }; + exports2.ContextCreator = ContextCreator; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/exceptions/base-exception-filter-context.js +var require_base_exception_filter_context = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/exceptions/base-exception-filter-context.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseExceptionFilterContext = void 0; + var constants_1 = require_constants(); + var shared_utils_1 = require_shared_utils(); + var iterare_1 = require_lib(); + var context_creator_1 = require_context_creator(); + var constants_2 = require_constants5(); + var BaseExceptionFilterContext = class extends context_creator_1.ContextCreator { + constructor(container) { + super(); + this.container = container; + } + createConcreteContext(metadata, contextId = constants_2.STATIC_CONTEXT, inquirerId) { + if ((0, shared_utils_1.isEmpty)(metadata)) { + return []; + } + return (0, iterare_1.iterate)(metadata).filter((instance) => instance && ((0, shared_utils_1.isFunction)(instance.catch) || instance.name)).map((filter) => this.getFilterInstance(filter, contextId, inquirerId)).filter((item) => !!item).map((instance) => ({ + func: instance.catch.bind(instance), + exceptionMetatypes: this.reflectCatchExceptions(instance) + })).toArray(); + } + getFilterInstance(filter, contextId = constants_2.STATIC_CONTEXT, inquirerId) { + const isObject2 = filter.catch; + if (isObject2) { + return filter; + } + const instanceWrapper = this.getInstanceByMetatype(filter); + if (!instanceWrapper) { + return null; + } + const instanceHost = instanceWrapper.getInstanceByContextId(this.getContextId(contextId, instanceWrapper), inquirerId); + return instanceHost && instanceHost.instance; + } + getInstanceByMetatype(metatype) { + if (!this.moduleContext) { + return; + } + const collection = this.container.getModules(); + const moduleRef = collection.get(this.moduleContext); + if (!moduleRef) { + return; + } + return moduleRef.injectables.get(metatype); + } + reflectCatchExceptions(instance) { + const prototype = Object.getPrototypeOf(instance); + return Reflect.getMetadata(constants_1.FILTER_CATCH_EXCEPTIONS, prototype.constructor) || []; + } + }; + exports2.BaseExceptionFilterContext = BaseExceptionFilterContext; + } +}); + +// ../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/select-exception-filter-metadata.util.js +var require_select_exception_filter_metadata_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_reflect-metadata@0.2.2_rxjs@7.8.2/node_modules/@nestjs/common/utils/select-exception-filter-metadata.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.selectExceptionFilterMetadata = void 0; + var selectExceptionFilterMetadata = (filters, exception) => filters.find(({ exceptionMetatypes }) => !exceptionMetatypes.length || exceptionMetatypes.some((ExceptionMetaType) => exception instanceof ExceptionMetaType)); + exports2.selectExceptionFilterMetadata = selectExceptionFilterMetadata; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/exceptions/external-exception-filter.js +var require_external_exception_filter = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/exceptions/external-exception-filter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ExternalExceptionFilter = void 0; + var common_12 = require_common(); + var ExternalExceptionFilter = class _ExternalExceptionFilter { + catch(exception, host) { + if (exception instanceof Error && !(exception instanceof common_12.HttpException)) { + _ExternalExceptionFilter.logger.error(exception.message, exception.stack); + } + throw exception; + } + }; + exports2.ExternalExceptionFilter = ExternalExceptionFilter; + ExternalExceptionFilter.logger = new common_12.Logger("ExceptionsHandler"); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/runtime.exception.js +var require_runtime_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/runtime.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RuntimeException = void 0; + var RuntimeException = class extends Error { + constructor(message = ``) { + super(message); + } + what() { + return this.message; + } + }; + exports2.RuntimeException = RuntimeException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/messages.js +var require_messages = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/messages.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MICROSERVICES_PACKAGE_NOT_FOUND_EXCEPTION = exports2.INVALID_EXCEPTION_FILTER = exports2.UNHANDLED_RUNTIME_EXCEPTION = exports2.INVALID_MIDDLEWARE_CONFIGURATION = exports2.UNKNOWN_REQUEST_MAPPING = exports2.INVALID_CLASS_SCOPE_MESSAGE = exports2.INVALID_CLASS_MESSAGE = exports2.UNKNOWN_EXPORT_MESSAGE = exports2.UNDEFINED_MODULE_MESSAGE = exports2.USING_INVALID_CLASS_AS_A_MODULE_MESSAGE = exports2.INVALID_MODULE_MESSAGE = exports2.UNDEFINED_FORWARDREF_MESSAGE = exports2.INVALID_MIDDLEWARE_MESSAGE = exports2.UNKNOWN_DEPENDENCIES_MESSAGE = void 0; + var shared_utils_1 = require_shared_utils(); + var getInstanceName = (instance) => { + if (instance?.forwardRef) { + return instance.forwardRef()?.name; + } + if (instance?.module) { + return instance.module?.name; + } + return instance?.name; + }; + var getDependencyName = (dependency, fallbackValue, disambiguated = true) => ( + // use class name + getInstanceName(dependency) || // use injection token (symbol) + (0, shared_utils_1.isSymbol)(dependency) && dependency.toString() || // use string directly + (dependency ? disambiguated ? `"${dependency}"` : dependency : void 0) || // otherwise + fallbackValue + ); + var getModuleName = (module3) => module3 && getInstanceName(module3.metatype) || "current"; + var stringifyScope = (scope) => (scope || []).map(getInstanceName).join(" -> "); + var UNKNOWN_DEPENDENCIES_MESSAGE = (type, unknownDependencyContext, module3) => { + const { index, name, dependencies, key } = unknownDependencyContext; + const moduleName = getModuleName(module3); + const dependencyName = getDependencyName(name, "dependency"); + const potentialSolutions = ( + // If module's name is well defined + moduleName !== "current" ? ` + +Potential solutions: +- Is ${moduleName} a valid NestJS module? +- If ${dependencyName} is a provider, is it part of the current ${moduleName}? +- If ${dependencyName} is exported from a separate @Module, is that module imported within ${moduleName}? + @Module({ + imports: [ /* the Module containing ${dependencyName} */ ] + }) +` : ` + +Potential solutions: +- If ${dependencyName} is a provider, is it part of the current Module? +- If ${dependencyName} is exported from a separate @Module, is that module imported within Module? + @Module({ + imports: [ /* the Module containing ${dependencyName} */ ] + }) +` + ); + let message = `Nest can't resolve dependencies of the ${type.toString()}`; + if ((0, shared_utils_1.isNil)(index)) { + message += `. Please make sure that the "${key.toString()}" property is available in the current context.${potentialSolutions}`; + return message; + } + const dependenciesName = (dependencies || []).map((dependencyName2) => getDependencyName(dependencyName2, "+", false)); + dependenciesName[index] = "?"; + message += ` (`; + message += dependenciesName.join(", "); + message += `). Please make sure that the argument ${dependencyName} at index [${index}] is available in the ${moduleName} context.`; + message += potentialSolutions; + return message; + }; + exports2.UNKNOWN_DEPENDENCIES_MESSAGE = UNKNOWN_DEPENDENCIES_MESSAGE; + var INVALID_MIDDLEWARE_MESSAGE = (text, name) => `The middleware doesn't provide the 'use' method (${name})`; + exports2.INVALID_MIDDLEWARE_MESSAGE = INVALID_MIDDLEWARE_MESSAGE; + var UNDEFINED_FORWARDREF_MESSAGE = (scope) => `Nest cannot create the module instance. Often, this is because of a circular dependency between modules. Use forwardRef() to avoid it. + +(Read more: https://docs.nestjs.com/fundamentals/circular-dependency) +Scope [${stringifyScope(scope)}] +`; + exports2.UNDEFINED_FORWARDREF_MESSAGE = UNDEFINED_FORWARDREF_MESSAGE; + var INVALID_MODULE_MESSAGE = (parentModule, index, scope) => { + const parentModuleName = parentModule?.name || "module"; + return `Nest cannot create the ${parentModuleName} instance. +Received an unexpected value at index [${index}] of the ${parentModuleName} "imports" array. + +Scope [${stringifyScope(scope)}]`; + }; + exports2.INVALID_MODULE_MESSAGE = INVALID_MODULE_MESSAGE; + var USING_INVALID_CLASS_AS_A_MODULE_MESSAGE = (metatypeUsedAsAModule, scope) => { + const metatypeNameQuote = `"${getInstanceName(metatypeUsedAsAModule)}"` || "that class"; + return `Classes annotated with @Injectable(), @Catch(), and @Controller() decorators must not appear in the "imports" array of a module. +Please remove ${metatypeNameQuote} (including forwarded occurrences, if any) from all of the "imports" arrays. + +Scope [${stringifyScope(scope)}] +`; + }; + exports2.USING_INVALID_CLASS_AS_A_MODULE_MESSAGE = USING_INVALID_CLASS_AS_A_MODULE_MESSAGE; + var UNDEFINED_MODULE_MESSAGE = (parentModule, index, scope) => { + const parentModuleName = parentModule?.name || "module"; + return `Nest cannot create the ${parentModuleName} instance. +The module at index [${index}] of the ${parentModuleName} "imports" array is undefined. + +Potential causes: +- A circular dependency between modules. Use forwardRef() to avoid it. Read more: https://docs.nestjs.com/fundamentals/circular-dependency +- The module at index [${index}] is of type "undefined". Check your import statements and the type of the module. + +Scope [${stringifyScope(scope)}]`; + }; + exports2.UNDEFINED_MODULE_MESSAGE = UNDEFINED_MODULE_MESSAGE; + var UNKNOWN_EXPORT_MESSAGE = (token = "item", module3) => { + token = (0, shared_utils_1.isSymbol)(token) ? token.toString() : token; + return `Nest cannot export a provider/module that is not a part of the currently processed module (${module3}). Please verify whether the exported ${token} is available in this particular context. + +Possible Solutions: +- Is ${token} part of the relevant providers/imports within ${module3}? +`; + }; + exports2.UNKNOWN_EXPORT_MESSAGE = UNKNOWN_EXPORT_MESSAGE; + var INVALID_CLASS_MESSAGE = (text, value) => `ModuleRef cannot instantiate class (${value} is not constructable).`; + exports2.INVALID_CLASS_MESSAGE = INVALID_CLASS_MESSAGE; + var INVALID_CLASS_SCOPE_MESSAGE = (text, name) => `${name || "This class"} is marked as a scoped provider. Request and transient-scoped providers can't be used in combination with "get()" method. Please, use "resolve()" instead.`; + exports2.INVALID_CLASS_SCOPE_MESSAGE = INVALID_CLASS_SCOPE_MESSAGE; + var UNKNOWN_REQUEST_MAPPING = (metatype) => { + const className = metatype.name; + return className ? `An invalid controller has been detected. "${className}" does not have the @Controller() decorator but it is being listed in the "controllers" array of some module.` : `An invalid controller has been detected. Perhaps, one of your controllers is missing the @Controller() decorator.`; + }; + exports2.UNKNOWN_REQUEST_MAPPING = UNKNOWN_REQUEST_MAPPING; + exports2.INVALID_MIDDLEWARE_CONFIGURATION = `An invalid middleware configuration has been passed inside the module 'configure()' method.`; + exports2.UNHANDLED_RUNTIME_EXCEPTION = `Unhandled Runtime Exception.`; + exports2.INVALID_EXCEPTION_FILTER = `Invalid exception filters (@UseFilters()).`; + exports2.MICROSERVICES_PACKAGE_NOT_FOUND_EXCEPTION = `Unable to load @nestjs/microservices package. (Please make sure that it's already installed.)`; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/invalid-exception-filter.exception.js +var require_invalid_exception_filter_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/invalid-exception-filter.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InvalidExceptionFilterException = void 0; + var runtime_exception_1 = require_runtime_exception(); + var messages_1 = require_messages(); + var InvalidExceptionFilterException = class extends runtime_exception_1.RuntimeException { + constructor() { + super(messages_1.INVALID_EXCEPTION_FILTER); + } + }; + exports2.InvalidExceptionFilterException = InvalidExceptionFilterException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/exceptions/external-exceptions-handler.js +var require_external_exceptions_handler = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/exceptions/external-exceptions-handler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ExternalExceptionsHandler = void 0; + var shared_utils_1 = require_shared_utils(); + var select_exception_filter_metadata_util_1 = require_select_exception_filter_metadata_util(); + var external_exception_filter_1 = require_external_exception_filter(); + var invalid_exception_filter_exception_1 = require_invalid_exception_filter_exception(); + var ExternalExceptionsHandler = class extends external_exception_filter_1.ExternalExceptionFilter { + constructor() { + super(...arguments); + this.filters = []; + } + next(exception, host) { + const result = this.invokeCustomFilters(exception, host); + if (result) { + return result; + } + return super.catch(exception, host); + } + setCustomFilters(filters) { + if (!Array.isArray(filters)) { + throw new invalid_exception_filter_exception_1.InvalidExceptionFilterException(); + } + this.filters = filters; + } + invokeCustomFilters(exception, host) { + if ((0, shared_utils_1.isEmpty)(this.filters)) { + return null; + } + const filter = (0, select_exception_filter_metadata_util_1.selectExceptionFilterMetadata)(this.filters, exception); + return filter ? filter.func(exception, host) : null; + } + }; + exports2.ExternalExceptionsHandler = ExternalExceptionsHandler; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/exceptions/external-exception-filter-context.js +var require_external_exception_filter_context = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/exceptions/external-exception-filter-context.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ExternalExceptionFilterContext = void 0; + var constants_1 = require_constants(); + var shared_utils_1 = require_shared_utils(); + var constants_2 = require_constants5(); + var base_exception_filter_context_1 = require_base_exception_filter_context(); + var external_exceptions_handler_1 = require_external_exceptions_handler(); + var iterare_1 = require_lib(); + var ExternalExceptionFilterContext = class extends base_exception_filter_context_1.BaseExceptionFilterContext { + constructor(container, config) { + super(container); + this.config = config; + } + create(instance, callback, module3, contextId = constants_2.STATIC_CONTEXT, inquirerId) { + this.moduleContext = module3; + const exceptionHandler = new external_exceptions_handler_1.ExternalExceptionsHandler(); + const filters = this.createContext(instance, callback, constants_1.EXCEPTION_FILTERS_METADATA, contextId, inquirerId); + if ((0, shared_utils_1.isEmpty)(filters)) { + return exceptionHandler; + } + exceptionHandler.setCustomFilters(filters.reverse()); + return exceptionHandler; + } + getGlobalMetadata(contextId = constants_2.STATIC_CONTEXT, inquirerId) { + if (!this.config) { + return []; + } + const globalFilters = this.config.getGlobalFilters(); + if (contextId === constants_2.STATIC_CONTEXT && !inquirerId) { + return globalFilters; + } + const scopedFilterWrappers = this.config.getGlobalRequestFilters(); + const scopedFilters = (0, iterare_1.iterate)(scopedFilterWrappers).map((wrapper) => wrapper.getInstanceByContextId(contextId, inquirerId)).filter((host) => !!host).map((host) => host.instance).toArray(); + return globalFilters.concat(scopedFilters); + } + }; + exports2.ExternalExceptionFilterContext = ExternalExceptionFilterContext; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/guards/constants.js +var require_constants6 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/guards/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FORBIDDEN_MESSAGE = void 0; + exports2.FORBIDDEN_MESSAGE = "Forbidden resource"; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/execution-context-host.js +var require_execution_context_host = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/execution-context-host.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ExecutionContextHost = void 0; + var ExecutionContextHost = class { + constructor(args, constructorRef = null, handler = null) { + this.args = args; + this.constructorRef = constructorRef; + this.handler = handler; + this.contextType = "http"; + } + setType(type) { + type && (this.contextType = type); + } + getType() { + return this.contextType; + } + getClass() { + return this.constructorRef; + } + getHandler() { + return this.handler; + } + getArgs() { + return this.args; + } + getArgByIndex(index) { + return this.args[index]; + } + switchToRpc() { + return Object.assign(this, { + getData: () => this.getArgByIndex(0), + getContext: () => this.getArgByIndex(1) + }); + } + switchToHttp() { + return Object.assign(this, { + getRequest: () => this.getArgByIndex(0), + getResponse: () => this.getArgByIndex(1), + getNext: () => this.getArgByIndex(2) + }); + } + switchToWs() { + return Object.assign(this, { + getClient: () => this.getArgByIndex(0), + getData: () => this.getArgByIndex(1), + getPattern: () => this.getArgByIndex(this.getArgs().length - 1) + }); + } + }; + exports2.ExecutionContextHost = ExecutionContextHost; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/guards/guards-consumer.js +var require_guards_consumer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/guards/guards-consumer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GuardsConsumer = void 0; + var shared_utils_1 = require_shared_utils(); + var rxjs_1 = require_cjs3(); + var execution_context_host_1 = require_execution_context_host(); + var GuardsConsumer = class { + async tryActivate(guards, args, instance, callback, type) { + if (!guards || (0, shared_utils_1.isEmpty)(guards)) { + return true; + } + const context = this.createContext(args, instance, callback); + context.setType(type); + for (const guard of guards) { + const result = guard.canActivate(context); + if (await this.pickResult(result)) { + continue; + } + return false; + } + return true; + } + createContext(args, instance, callback) { + return new execution_context_host_1.ExecutionContextHost(args, instance.constructor, callback); + } + async pickResult(result) { + if (result instanceof rxjs_1.Observable) { + return (0, rxjs_1.lastValueFrom)(result); + } + return result; + } + }; + exports2.GuardsConsumer = GuardsConsumer; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/guards/guards-context-creator.js +var require_guards_context_creator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/guards/guards-context-creator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GuardsContextCreator = void 0; + var constants_1 = require_constants(); + var shared_utils_1 = require_shared_utils(); + var iterare_1 = require_lib(); + var context_creator_1 = require_context_creator(); + var constants_2 = require_constants5(); + var GuardsContextCreator = class extends context_creator_1.ContextCreator { + constructor(container, config) { + super(); + this.container = container; + this.config = config; + } + create(instance, callback, module3, contextId = constants_2.STATIC_CONTEXT, inquirerId) { + this.moduleContext = module3; + return this.createContext(instance, callback, constants_1.GUARDS_METADATA, contextId, inquirerId); + } + createConcreteContext(metadata, contextId = constants_2.STATIC_CONTEXT, inquirerId) { + if ((0, shared_utils_1.isEmpty)(metadata)) { + return []; + } + return (0, iterare_1.iterate)(metadata).filter((guard) => guard && (guard.name || guard.canActivate)).map((guard) => this.getGuardInstance(guard, contextId, inquirerId)).filter((guard) => guard && (0, shared_utils_1.isFunction)(guard.canActivate)).toArray(); + } + getGuardInstance(metatype, contextId = constants_2.STATIC_CONTEXT, inquirerId) { + const isObject2 = metatype.canActivate; + if (isObject2) { + return metatype; + } + const instanceWrapper = this.getInstanceByMetatype(metatype); + if (!instanceWrapper) { + return null; + } + const instanceHost = instanceWrapper.getInstanceByContextId(this.getContextId(contextId, instanceWrapper), inquirerId); + return instanceHost && instanceHost.instance; + } + getInstanceByMetatype(metatype) { + if (!this.moduleContext) { + return; + } + const collection = this.container.getModules(); + const moduleRef = collection.get(this.moduleContext); + if (!moduleRef) { + return; + } + const injectables = moduleRef.injectables; + return injectables.get(metatype); + } + getGlobalMetadata(contextId = constants_2.STATIC_CONTEXT, inquirerId) { + if (!this.config) { + return []; + } + const globalGuards = this.config.getGlobalGuards(); + if (contextId === constants_2.STATIC_CONTEXT && !inquirerId) { + return globalGuards; + } + const scopedGuardWrappers = this.config.getGlobalRequestGuards(); + const scopedGuards = (0, iterare_1.iterate)(scopedGuardWrappers).map((wrapper) => wrapper.getInstanceByContextId(this.getContextId(contextId, wrapper), inquirerId)).filter((host) => !!host).map((host) => host.instance).toArray(); + return globalGuards.concat(scopedGuards); + } + }; + exports2.GuardsContextCreator = GuardsContextCreator; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/guards/index.js +var require_guards = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/guards/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_constants6(), exports2); + tslib_1.__exportStar(require_guards_consumer(), exports2); + tslib_1.__exportStar(require_guards_context_creator(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/interceptors/interceptors-consumer.js +var require_interceptors_consumer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/interceptors/interceptors-consumer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InterceptorsConsumer = void 0; + var shared_utils_1 = require_shared_utils(); + var async_hooks_1 = require("async_hooks"); + var rxjs_1 = require_cjs3(); + var operators_1 = require_operators(); + var execution_context_host_1 = require_execution_context_host(); + var InterceptorsConsumer = class { + async intercept(interceptors, args, instance, callback, next, type) { + if ((0, shared_utils_1.isEmpty)(interceptors)) { + return next(); + } + const context = this.createContext(args, instance, callback); + context.setType(type); + const nextFn = async (i = 0) => { + if (i >= interceptors.length) { + return (0, rxjs_1.defer)(async_hooks_1.AsyncResource.bind(() => this.transformDeferred(next))); + } + const handler = { + handle: () => (0, rxjs_1.defer)(async_hooks_1.AsyncResource.bind(() => nextFn(i + 1))).pipe((0, operators_1.mergeAll)()) + }; + return interceptors[i].intercept(context, handler); + }; + return (0, rxjs_1.defer)(() => nextFn()).pipe((0, operators_1.mergeAll)()); + } + createContext(args, instance, callback) { + return new execution_context_host_1.ExecutionContextHost(args, instance.constructor, callback); + } + transformDeferred(next) { + return (0, rxjs_1.from)(next()).pipe((0, operators_1.switchMap)((res) => { + const isDeferred = res instanceof Promise || res instanceof rxjs_1.Observable; + return isDeferred ? res : Promise.resolve(res); + })); + } + }; + exports2.InterceptorsConsumer = InterceptorsConsumer; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/interceptors/interceptors-context-creator.js +var require_interceptors_context_creator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/interceptors/interceptors-context-creator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InterceptorsContextCreator = void 0; + var constants_1 = require_constants(); + var shared_utils_1 = require_shared_utils(); + var iterare_1 = require_lib(); + var context_creator_1 = require_context_creator(); + var constants_2 = require_constants5(); + var InterceptorsContextCreator = class extends context_creator_1.ContextCreator { + constructor(container, config) { + super(); + this.container = container; + this.config = config; + } + create(instance, callback, module3, contextId = constants_2.STATIC_CONTEXT, inquirerId) { + this.moduleContext = module3; + return this.createContext(instance, callback, constants_1.INTERCEPTORS_METADATA, contextId, inquirerId); + } + createConcreteContext(metadata, contextId = constants_2.STATIC_CONTEXT, inquirerId) { + if ((0, shared_utils_1.isEmpty)(metadata)) { + return []; + } + return (0, iterare_1.iterate)(metadata).filter((interceptor) => interceptor && (interceptor.name || interceptor.intercept)).map((interceptor) => this.getInterceptorInstance(interceptor, contextId, inquirerId)).filter((interceptor) => interceptor && (0, shared_utils_1.isFunction)(interceptor.intercept)).toArray(); + } + getInterceptorInstance(metatype, contextId = constants_2.STATIC_CONTEXT, inquirerId) { + const isObject2 = metatype.intercept; + if (isObject2) { + return metatype; + } + const instanceWrapper = this.getInstanceByMetatype(metatype); + if (!instanceWrapper) { + return null; + } + const instanceHost = instanceWrapper.getInstanceByContextId(this.getContextId(contextId, instanceWrapper), inquirerId); + return instanceHost && instanceHost.instance; + } + getInstanceByMetatype(metatype) { + if (!this.moduleContext) { + return; + } + const collection = this.container.getModules(); + const moduleRef = collection.get(this.moduleContext); + if (!moduleRef) { + return; + } + return moduleRef.injectables.get(metatype); + } + getGlobalMetadata(contextId = constants_2.STATIC_CONTEXT, inquirerId) { + if (!this.config) { + return []; + } + const globalInterceptors = this.config.getGlobalInterceptors(); + if (contextId === constants_2.STATIC_CONTEXT && !inquirerId) { + return globalInterceptors; + } + const scopedInterceptorWrappers = this.config.getGlobalRequestInterceptors(); + const scopedInterceptors = (0, iterare_1.iterate)(scopedInterceptorWrappers).map((wrapper) => wrapper.getInstanceByContextId(this.getContextId(contextId, wrapper), inquirerId)).filter((host) => !!host).map((host) => host.instance).toArray(); + return globalInterceptors.concat(scopedInterceptors); + } + }; + exports2.InterceptorsContextCreator = InterceptorsContextCreator; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/interceptors/index.js +var require_interceptors = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/interceptors/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_interceptors_consumer(), exports2); + tslib_1.__exportStar(require_interceptors_context_creator(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/pipes/params-token-factory.js +var require_params_token_factory = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/pipes/params-token-factory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ParamsTokenFactory = void 0; + var route_paramtypes_enum_1 = require_route_paramtypes_enum(); + var ParamsTokenFactory = class { + exchangeEnumForString(type) { + switch (type) { + case route_paramtypes_enum_1.RouteParamtypes.BODY: + return "body"; + case route_paramtypes_enum_1.RouteParamtypes.PARAM: + return "param"; + case route_paramtypes_enum_1.RouteParamtypes.QUERY: + return "query"; + default: + return "custom"; + } + } + }; + exports2.ParamsTokenFactory = ParamsTokenFactory; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/pipes/pipes-consumer.js +var require_pipes_consumer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/pipes/pipes-consumer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PipesConsumer = void 0; + var params_token_factory_1 = require_params_token_factory(); + var PipesConsumer = class { + constructor() { + this.paramsTokenFactory = new params_token_factory_1.ParamsTokenFactory(); + } + async apply(value, { metatype, type, data }, pipes) { + const token = this.paramsTokenFactory.exchangeEnumForString(type); + return this.applyPipes(value, { metatype, type: token, data }, pipes); + } + async applyPipes(value, { metatype, type, data }, transforms) { + return transforms.reduce(async (deferredValue, pipe) => { + const val = await deferredValue; + const result = pipe.transform(val, { metatype, type, data }); + return result; + }, Promise.resolve(value)); + } + }; + exports2.PipesConsumer = PipesConsumer; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/pipes/pipes-context-creator.js +var require_pipes_context_creator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/pipes/pipes-context-creator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PipesContextCreator = void 0; + var constants_1 = require_constants(); + var shared_utils_1 = require_shared_utils(); + var iterare_1 = require_lib(); + var context_creator_1 = require_context_creator(); + var constants_2 = require_constants5(); + var PipesContextCreator = class extends context_creator_1.ContextCreator { + constructor(container, config) { + super(); + this.container = container; + this.config = config; + } + create(instance, callback, moduleKey, contextId = constants_2.STATIC_CONTEXT, inquirerId) { + this.moduleContext = moduleKey; + return this.createContext(instance, callback, constants_1.PIPES_METADATA, contextId, inquirerId); + } + createConcreteContext(metadata, contextId = constants_2.STATIC_CONTEXT, inquirerId) { + if ((0, shared_utils_1.isEmpty)(metadata)) { + return []; + } + return (0, iterare_1.iterate)(metadata).filter((pipe) => pipe && (pipe.name || pipe.transform)).map((pipe) => this.getPipeInstance(pipe, contextId, inquirerId)).filter((pipe) => pipe && pipe.transform && (0, shared_utils_1.isFunction)(pipe.transform)).toArray(); + } + getPipeInstance(pipe, contextId = constants_2.STATIC_CONTEXT, inquirerId) { + const isObject2 = pipe.transform; + if (isObject2) { + return pipe; + } + const instanceWrapper = this.getInstanceByMetatype(pipe); + if (!instanceWrapper) { + return null; + } + const instanceHost = instanceWrapper.getInstanceByContextId(this.getContextId(contextId, instanceWrapper), inquirerId); + return instanceHost && instanceHost.instance; + } + getInstanceByMetatype(metatype) { + if (!this.moduleContext) { + return; + } + const collection = this.container.getModules(); + const moduleRef = collection.get(this.moduleContext); + if (!moduleRef) { + return; + } + return moduleRef.injectables.get(metatype); + } + getGlobalMetadata(contextId = constants_2.STATIC_CONTEXT, inquirerId) { + if (!this.config) { + return []; + } + const globalPipes = this.config.getGlobalPipes(); + if (contextId === constants_2.STATIC_CONTEXT && !inquirerId) { + return globalPipes; + } + const scopedPipeWrappers = this.config.getGlobalRequestPipes(); + const scopedPipes = (0, iterare_1.iterate)(scopedPipeWrappers).map((wrapper) => wrapper.getInstanceByContextId(this.getContextId(contextId, wrapper), inquirerId)).filter((host) => !!host).map((host) => host.instance).toArray(); + return globalPipes.concat(scopedPipes); + } + setModuleContext(context) { + this.moduleContext = context; + } + }; + exports2.PipesContextCreator = PipesContextCreator; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/pipes/index.js +var require_pipes2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/pipes/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_params_token_factory(), exports2); + tslib_1.__exportStar(require_pipes_consumer(), exports2); + tslib_1.__exportStar(require_pipes_context_creator(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/context-utils.js +var require_context_utils = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/context-utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContextUtils = void 0; + var constants_1 = require_constants(); + var shared_utils_1 = require_shared_utils(); + var execution_context_host_1 = require_execution_context_host(); + var ContextUtils = class { + mapParamType(key) { + const keyPair = key.split(":"); + return keyPair[0]; + } + reflectCallbackParamtypes(instance, methodName) { + return Reflect.getMetadata(constants_1.PARAMTYPES_METADATA, instance, methodName); + } + reflectCallbackMetadata(instance, methodName, metadataKey) { + return Reflect.getMetadata(metadataKey, instance.constructor, methodName); + } + reflectPassthrough(instance, methodName) { + return Reflect.getMetadata(constants_1.RESPONSE_PASSTHROUGH_METADATA, instance.constructor, methodName); + } + getArgumentsLength(keys, metadata) { + return keys.length ? Math.max(...keys.map((key) => metadata[key].index)) + 1 : 0; + } + createNullArray(length) { + const a = new Array(length); + for (let i = 0; i < length; ++i) + a[i] = void 0; + return a; + } + mergeParamsMetatypes(paramsProperties, paramtypes) { + if (!paramtypes) { + return paramsProperties; + } + return paramsProperties.map((param) => ({ + ...param, + metatype: paramtypes[param.index] + })); + } + getCustomFactory(factory, data, contextFactory) { + return (0, shared_utils_1.isFunction)(factory) ? (...args) => factory(data, contextFactory(args)) : () => null; + } + getContextFactory(contextType, instance, callback) { + const type = instance && instance.constructor; + return (args) => { + const ctx = new execution_context_host_1.ExecutionContextHost(args, type, callback); + ctx.setType(contextType); + return ctx; + }; + } + }; + exports2.ContextUtils = ContextUtils; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/external-proxy.js +var require_external_proxy = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/external-proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ExternalErrorProxy = void 0; + var execution_context_host_1 = require_execution_context_host(); + var ExternalErrorProxy = class { + createProxy(targetCallback, exceptionsHandler, type) { + return async (...args) => { + try { + return await targetCallback(...args); + } catch (e) { + const host = new execution_context_host_1.ExecutionContextHost(args); + host.setType(type); + return exceptionsHandler.next(e, host); + } + }; + } + }; + exports2.ExternalErrorProxy = ExternalErrorProxy; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/handler-metadata-storage.js +var require_handler_metadata_storage = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/handler-metadata-storage.js"(exports2) { + "use strict"; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HandlerMetadataStorage = exports2.HANDLER_METADATA_SYMBOL = void 0; + var constants_1 = require_constants5(); + exports2.HANDLER_METADATA_SYMBOL = Symbol.for("handler_metadata:cache"); + var HandlerMetadataStorage = class { + constructor() { + this[_a] = /* @__PURE__ */ new Map(); + } + set(controller, methodName, metadata) { + const metadataKey = this.getMetadataKey(controller, methodName); + this[exports2.HANDLER_METADATA_SYMBOL].set(metadataKey, metadata); + } + get(controller, methodName) { + const metadataKey = this.getMetadataKey(controller, methodName); + return this[exports2.HANDLER_METADATA_SYMBOL].get(metadataKey); + } + getMetadataKey(controller, methodName) { + const ctor = controller.constructor; + const controllerKey = ctor && (ctor[constants_1.CONTROLLER_ID_KEY] || ctor.name); + return controllerKey + methodName; + } + }; + exports2.HandlerMetadataStorage = HandlerMetadataStorage; + _a = exports2.HANDLER_METADATA_SYMBOL; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/external-context-creator.js +var require_external_context_creator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/external-context-creator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ExternalContextCreator = void 0; + var common_12 = require_common(); + var constants_1 = require_constants(); + var shared_utils_1 = require_shared_utils(); + var rxjs_1 = require_cjs3(); + var external_exception_filter_context_1 = require_external_exception_filter_context(); + var constants_2 = require_constants6(); + var guards_1 = require_guards(); + var constants_3 = require_constants5(); + var interceptors_1 = require_interceptors(); + var pipes_1 = require_pipes2(); + var context_utils_1 = require_context_utils(); + var external_proxy_1 = require_external_proxy(); + var handler_metadata_storage_1 = require_handler_metadata_storage(); + var ExternalContextCreator = class _ExternalContextCreator { + constructor(guardsContextCreator, guardsConsumer, interceptorsContextCreator, interceptorsConsumer, modulesContainer, pipesContextCreator, pipesConsumer, filtersContextCreator) { + this.guardsContextCreator = guardsContextCreator; + this.guardsConsumer = guardsConsumer; + this.interceptorsContextCreator = interceptorsContextCreator; + this.interceptorsConsumer = interceptorsConsumer; + this.modulesContainer = modulesContainer; + this.pipesContextCreator = pipesContextCreator; + this.pipesConsumer = pipesConsumer; + this.filtersContextCreator = filtersContextCreator; + this.contextUtils = new context_utils_1.ContextUtils(); + this.externalErrorProxy = new external_proxy_1.ExternalErrorProxy(); + this.handlerMetadataStorage = new handler_metadata_storage_1.HandlerMetadataStorage(); + } + static fromContainer(container) { + const guardsContextCreator = new guards_1.GuardsContextCreator(container, container.applicationConfig); + const guardsConsumer = new guards_1.GuardsConsumer(); + const interceptorsContextCreator = new interceptors_1.InterceptorsContextCreator(container, container.applicationConfig); + const interceptorsConsumer = new interceptors_1.InterceptorsConsumer(); + const pipesContextCreator = new pipes_1.PipesContextCreator(container, container.applicationConfig); + const pipesConsumer = new pipes_1.PipesConsumer(); + const filtersContextCreator = new external_exception_filter_context_1.ExternalExceptionFilterContext(container, container.applicationConfig); + const externalContextCreator = new _ExternalContextCreator(guardsContextCreator, guardsConsumer, interceptorsContextCreator, interceptorsConsumer, container.getModules(), pipesContextCreator, pipesConsumer, filtersContextCreator); + externalContextCreator.container = container; + return externalContextCreator; + } + create(instance, callback, methodName, metadataKey, paramsFactory, contextId = constants_3.STATIC_CONTEXT, inquirerId, options = { + interceptors: true, + guards: true, + filters: true + }, contextType = "http") { + const module3 = this.getContextModuleKey(instance.constructor); + const { argsLength, paramtypes, getParamsMetadata } = this.getMetadata(instance, methodName, metadataKey, paramsFactory, contextType); + const pipes = this.pipesContextCreator.create(instance, callback, module3, contextId, inquirerId); + const guards = this.guardsContextCreator.create(instance, callback, module3, contextId, inquirerId); + const exceptionFilter = this.filtersContextCreator.create(instance, callback, module3, contextId, inquirerId); + const interceptors = options.interceptors ? this.interceptorsContextCreator.create(instance, callback, module3, contextId, inquirerId) : []; + const paramsMetadata = getParamsMetadata(module3, contextId, inquirerId); + const paramsOptions = paramsMetadata ? this.contextUtils.mergeParamsMetatypes(paramsMetadata, paramtypes) : []; + const fnCanActivate = options.guards ? this.createGuardsFn(guards, instance, callback, contextType) : null; + const fnApplyPipes = this.createPipesFn(pipes, paramsOptions); + const handler = (initialArgs, ...args) => async () => { + if (fnApplyPipes) { + await fnApplyPipes(initialArgs, ...args); + return callback.apply(instance, initialArgs); + } + return callback.apply(instance, args); + }; + const target = async (...args) => { + const initialArgs = this.contextUtils.createNullArray(argsLength); + fnCanActivate && await fnCanActivate(args); + const result = await this.interceptorsConsumer.intercept(interceptors, args, instance, callback, handler(initialArgs, ...args), contextType); + return this.transformToResult(result); + }; + return options.filters ? this.externalErrorProxy.createProxy(target, exceptionFilter, contextType) : target; + } + getMetadata(instance, methodName, metadataKey, paramsFactory, contextType) { + const cacheMetadata = this.handlerMetadataStorage.get(instance, methodName); + if (cacheMetadata) { + return cacheMetadata; + } + const metadata = this.contextUtils.reflectCallbackMetadata(instance, methodName, metadataKey || "") || {}; + const keys = Object.keys(metadata); + const argsLength = this.contextUtils.getArgumentsLength(keys, metadata); + const paramtypes = this.contextUtils.reflectCallbackParamtypes(instance, methodName); + const contextFactory = this.contextUtils.getContextFactory(contextType, instance, instance[methodName]); + const getParamsMetadata = (moduleKey, contextId = constants_3.STATIC_CONTEXT, inquirerId) => paramsFactory ? this.exchangeKeysForValues(keys, metadata, moduleKey, paramsFactory, contextId, inquirerId, contextFactory) : null; + const handlerMetadata = { + argsLength, + paramtypes, + getParamsMetadata + }; + this.handlerMetadataStorage.set(instance, methodName, handlerMetadata); + return handlerMetadata; + } + getContextModuleKey(moduleCtor) { + const emptyModuleKey = ""; + if (!moduleCtor) { + return emptyModuleKey; + } + const moduleContainerEntries = this.modulesContainer.entries(); + for (const [key, moduleRef] of moduleContainerEntries) { + if (moduleRef.hasProvider(moduleCtor)) { + return key; + } + } + return emptyModuleKey; + } + exchangeKeysForValues(keys, metadata, moduleContext, paramsFactory, contextId = constants_3.STATIC_CONTEXT, inquirerId, contextFactory = this.contextUtils.getContextFactory("http")) { + this.pipesContextCreator.setModuleContext(moduleContext); + return keys.map((key) => { + const { index, data, pipes: pipesCollection } = metadata[key]; + const pipes = this.pipesContextCreator.createConcreteContext(pipesCollection, contextId, inquirerId); + const type = this.contextUtils.mapParamType(key); + if (key.includes(constants_1.CUSTOM_ROUTE_ARGS_METADATA)) { + const { factory } = metadata[key]; + const customExtractValue = this.contextUtils.getCustomFactory(factory, data, contextFactory); + return { index, extractValue: customExtractValue, type, data, pipes }; + } + const numericType = Number(type); + const extractValue = (...args) => paramsFactory.exchangeKeyForValue(numericType, data, args); + return { index, extractValue, type: numericType, data, pipes }; + }); + } + createPipesFn(pipes, paramsOptions) { + const pipesFn = async (args, ...params) => { + const resolveParamValue = async (param) => { + const { index, extractValue, type, data, metatype, pipes: paramPipes } = param; + const value = extractValue(...params); + args[index] = await this.getParamValue(value, { metatype, type, data }, pipes.concat(paramPipes)); + }; + await Promise.all(paramsOptions.map(resolveParamValue)); + }; + return paramsOptions.length ? pipesFn : null; + } + async getParamValue(value, { metatype, type, data }, pipes) { + return (0, shared_utils_1.isEmpty)(pipes) ? value : this.pipesConsumer.apply(value, { metatype, type, data }, pipes); + } + async transformToResult(resultOrDeferred) { + if ((0, rxjs_1.isObservable)(resultOrDeferred)) { + return (0, rxjs_1.lastValueFrom)(resultOrDeferred); + } + return resultOrDeferred; + } + createGuardsFn(guards, instance, callback, contextType) { + const canActivateFn = async (args) => { + const canActivate = await this.guardsConsumer.tryActivate(guards, args, instance, callback, contextType); + if (!canActivate) { + throw new common_12.ForbiddenException(constants_2.FORBIDDEN_MESSAGE); + } + }; + return guards.length ? canActivateFn : null; + } + registerRequestProvider(request, contextId) { + this.container.registerRequestProvider(request, contextId); + } + }; + exports2.ExternalContextCreator = ExternalContextCreator; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/index.js +var require_helpers = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_context_id_factory(), exports2); + tslib_1.__exportStar(require_external_context_creator(), exports2); + tslib_1.__exportStar(require_http_adapter_host(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/circular-dependency.exception.js +var require_circular_dependency_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/circular-dependency.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CircularDependencyException = void 0; + var runtime_exception_1 = require_runtime_exception(); + var CircularDependencyException = class extends runtime_exception_1.RuntimeException { + constructor(context) { + const ctx = context ? ` inside ${context}` : ``; + super(`A circular dependency has been detected${ctx}. Please, make sure that each side of a bidirectional relationships are decorated with "forwardRef()". Note that circular relationships between custom providers (e.g., factories) are not supported since functions cannot be called more than once.`); + } + }; + exports2.CircularDependencyException = CircularDependencyException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/unknown-element.exception.js +var require_unknown_element_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/unknown-element.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnknownElementException = void 0; + var runtime_exception_1 = require_runtime_exception(); + var UnknownElementException = class extends runtime_exception_1.RuntimeException { + constructor(name) { + name = name && name.toString(); + super(`Nest could not find ${name || "given"} element (this provider does not exist in the current context)`); + } + }; + exports2.UnknownElementException = UnknownElementException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/invalid-class-scope.exception.js +var require_invalid_class_scope_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/invalid-class-scope.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InvalidClassScopeException = void 0; + var shared_utils_1 = require_shared_utils(); + var messages_1 = require_messages(); + var runtime_exception_1 = require_runtime_exception(); + var InvalidClassScopeException = class extends runtime_exception_1.RuntimeException { + constructor(metatypeOrToken) { + let name = (0, shared_utils_1.isFunction)(metatypeOrToken) ? metatypeOrToken.name : metatypeOrToken; + name = name && name.toString(); + super((0, messages_1.INVALID_CLASS_SCOPE_MESSAGE)`${name}`); + } + }; + exports2.InvalidClassScopeException = InvalidClassScopeException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/invalid-class.exception.js +var require_invalid_class_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/invalid-class.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InvalidClassException = void 0; + var messages_1 = require_messages(); + var runtime_exception_1 = require_runtime_exception(); + var InvalidClassException = class extends runtime_exception_1.RuntimeException { + constructor(value) { + super((0, messages_1.INVALID_CLASS_MESSAGE)`${value}`); + } + }; + exports2.InvalidClassException = InvalidClassException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/unknown-export.exception.js +var require_unknown_export_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/unknown-export.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnknownExportException = void 0; + var messages_1 = require_messages(); + var runtime_exception_1 = require_runtime_exception(); + var UnknownExportException = class extends runtime_exception_1.RuntimeException { + constructor(token, moduleName) { + super((0, messages_1.UNKNOWN_EXPORT_MESSAGE)(token, moduleName)); + } + }; + exports2.UnknownExportException = UnknownExportException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/unknown-module.exception.js +var require_unknown_module_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/unknown-module.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnknownModuleException = void 0; + var runtime_exception_1 = require_runtime_exception(); + var UnknownModuleException = class extends runtime_exception_1.RuntimeException { + constructor(moduleName) { + super(`Nest could not select the given module (${moduleName ? `"${moduleName}"` : "it"} does not exist in current context).`); + } + }; + exports2.UnknownModuleException = UnknownModuleException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/undefined-forwardref.exception.js +var require_undefined_forwardref_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/undefined-forwardref.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UndefinedForwardRefException = void 0; + var messages_1 = require_messages(); + var runtime_exception_1 = require_runtime_exception(); + var UndefinedForwardRefException = class extends runtime_exception_1.RuntimeException { + constructor(scope) { + super((0, messages_1.UNDEFINED_FORWARDREF_MESSAGE)(scope)); + } + }; + exports2.UndefinedForwardRefException = UndefinedForwardRefException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/index.js +var require_exceptions3 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_circular_dependency_exception(), exports2); + tslib_1.__exportStar(require_runtime_exception(), exports2); + tslib_1.__exportStar(require_unknown_element_exception(), exports2); + tslib_1.__exportStar(require_invalid_class_scope_exception(), exports2); + tslib_1.__exportStar(require_invalid_class_exception(), exports2); + tslib_1.__exportStar(require_unknown_export_exception(), exports2); + tslib_1.__exportStar(require_unknown_module_exception(), exports2); + tslib_1.__exportStar(require_undefined_forwardref_exception(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/inspector/initialize-on-preview.allowlist.js +var require_initialize_on_preview_allowlist = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/inspector/initialize-on-preview.allowlist.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InitializeOnPreviewAllowlist = void 0; + var InitializeOnPreviewAllowlist = class { + static add(type) { + this.allowlist.set(type, true); + } + static has(type) { + return this.allowlist.has(type); + } + }; + exports2.InitializeOnPreviewAllowlist = InitializeOnPreviewAllowlist; + InitializeOnPreviewAllowlist.allowlist = /* @__PURE__ */ new WeakMap(); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/inquirer/inquirer-constants.js +var require_inquirer_constants = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/inquirer/inquirer-constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.INQUIRER = void 0; + exports2.INQUIRER = "INQUIRER"; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/helpers/silent-logger.js +var require_silent_logger = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/helpers/silent-logger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SilentLogger = void 0; + var common_12 = require_common(); + var noop = () => { + }; + var SilentLogger = class extends common_12.Logger { + constructor() { + super(...arguments); + this.log = noop; + this.error = noop; + this.warn = noop; + this.debug = noop; + this.verbose = noop; + this.fatal = noop; + this.setLogLevels = noop; + } + }; + exports2.SilentLogger = SilentLogger; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/get-class-scope.js +var require_get_class_scope = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/get-class-scope.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getClassScope = getClassScope; + var constants_1 = require_constants(); + function getClassScope(provider) { + const metadata = Reflect.getMetadata(constants_1.SCOPE_OPTIONS_METADATA, provider); + return metadata && metadata.scope; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/is-durable.js +var require_is_durable = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/is-durable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isDurable = isDurable; + var constants_1 = require_constants(); + function isDurable(provider) { + const metadata = Reflect.getMetadata(constants_1.SCOPE_OPTIONS_METADATA, provider); + return metadata && metadata.durable; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/abstract-instance-resolver.js +var require_abstract_instance_resolver = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/abstract-instance-resolver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbstractInstanceResolver = void 0; + var common_12 = require_common(); + var exceptions_1 = require_exceptions3(); + var AbstractInstanceResolver = class { + find(typeOrToken, options) { + const instanceLinkOrArray = this.instanceLinksHost.get(typeOrToken, options); + const pluckInstance = ({ wrapperRef }) => { + if (wrapperRef.scope === common_12.Scope.REQUEST || wrapperRef.scope === common_12.Scope.TRANSIENT) { + throw new exceptions_1.InvalidClassScopeException(typeOrToken); + } + return wrapperRef.instance; + }; + if (Array.isArray(instanceLinkOrArray)) { + return instanceLinkOrArray.map(pluckInstance); + } + return pluckInstance(instanceLinkOrArray); + } + async resolvePerContext(typeOrToken, contextModule, contextId, options) { + const instanceLinkOrArray = options?.strict ? this.instanceLinksHost.get(typeOrToken, { + moduleId: contextModule.id, + each: options.each + }) : this.instanceLinksHost.get(typeOrToken, { + each: options.each + }); + const pluckInstance = async (instanceLink) => { + const { wrapperRef, collection } = instanceLink; + if (wrapperRef.isDependencyTreeStatic() && !wrapperRef.isTransient) { + return this.get(typeOrToken, { strict: options.strict }); + } + const ctorHost = wrapperRef.instance || { constructor: typeOrToken }; + const instance = await this.injector.loadPerContext(ctorHost, wrapperRef.host, collection, contextId, wrapperRef); + if (!instance) { + throw new exceptions_1.UnknownElementException(); + } + return instance; + }; + if (Array.isArray(instanceLinkOrArray)) { + return Promise.all(instanceLinkOrArray.map((instanceLink) => pluckInstance(instanceLink))); + } + return pluckInstance(instanceLinkOrArray); + } + }; + exports2.AbstractInstanceResolver = AbstractInstanceResolver; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/undefined-dependency.exception.js +var require_undefined_dependency_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/undefined-dependency.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UndefinedDependencyException = void 0; + var messages_1 = require_messages(); + var runtime_exception_1 = require_runtime_exception(); + var UndefinedDependencyException = class extends runtime_exception_1.RuntimeException { + constructor(type, undefinedDependencyContext, module3) { + super((0, messages_1.UNKNOWN_DEPENDENCIES_MESSAGE)(type, undefinedDependencyContext, module3)); + } + }; + exports2.UndefinedDependencyException = UndefinedDependencyException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/unknown-dependencies.exception.js +var require_unknown_dependencies_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/unknown-dependencies.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnknownDependenciesException = void 0; + var messages_1 = require_messages(); + var runtime_exception_1 = require_runtime_exception(); + var UnknownDependenciesException = class extends runtime_exception_1.RuntimeException { + constructor(type, context, moduleRef, metadata) { + super((0, messages_1.UNKNOWN_DEPENDENCIES_MESSAGE)(type, context, moduleRef)); + this.type = type; + this.context = context; + this.metadata = metadata; + this.moduleRef = moduleRef && { id: moduleRef.id }; + } + }; + exports2.UnknownDependenciesException = UnknownDependenciesException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/inquirer/index.js +var require_inquirer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/inquirer/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_inquirer_constants(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/inspector/deterministic-uuid-registry.js +var require_deterministic_uuid_registry = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/inspector/deterministic-uuid-registry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DeterministicUuidRegistry = void 0; + var DeterministicUuidRegistry = class { + static get(str, inc = 0) { + const id = inc ? this.hashCode(`${str}_${inc}`) : this.hashCode(str); + if (this.registry.has(id)) { + return this.get(str, inc + 1); + } + this.registry.set(id, true); + return id; + } + static clear() { + this.registry.clear(); + } + static hashCode(s) { + let h = 0; + for (let i = 0; i < s.length; i++) + h = Math.imul(31, h) + s.charCodeAt(i) | 0; + return h.toString(); + } + }; + exports2.DeterministicUuidRegistry = DeterministicUuidRegistry; + DeterministicUuidRegistry.registry = /* @__PURE__ */ new Map(); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/inspector/uuid-factory.js +var require_uuid_factory = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/inspector/uuid-factory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UuidFactory = exports2.UuidFactoryMode = void 0; + var random_string_generator_util_1 = require_random_string_generator_util(); + var deterministic_uuid_registry_1 = require_deterministic_uuid_registry(); + var UuidFactoryMode; + (function(UuidFactoryMode2) { + UuidFactoryMode2["Random"] = "random"; + UuidFactoryMode2["Deterministic"] = "deterministic"; + })(UuidFactoryMode || (exports2.UuidFactoryMode = UuidFactoryMode = {})); + var UuidFactory = class { + static set mode(value) { + this._mode = value; + } + static get(key = "") { + return this._mode === UuidFactoryMode.Deterministic ? deterministic_uuid_registry_1.DeterministicUuidRegistry.get(key) : (0, random_string_generator_util_1.randomStringGenerator)(); + } + }; + exports2.UuidFactory = UuidFactory; + UuidFactory._mode = UuidFactoryMode.Random; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/helpers/provider-classifier.js +var require_provider_classifier = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/helpers/provider-classifier.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isClassProvider = isClassProvider; + exports2.isValueProvider = isValueProvider; + exports2.isFactoryProvider = isFactoryProvider; + var shared_utils_1 = require_shared_utils(); + function isClassProvider(provider) { + return Boolean(provider?.useClass); + } + function isValueProvider(provider) { + const providerValue = provider?.useValue; + return !(0, shared_utils_1.isUndefined)(providerValue); + } + function isFactoryProvider(provider) { + return Boolean(provider.useFactory); + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/instance-wrapper.js +var require_instance_wrapper = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/instance-wrapper.js"(exports2) { + "use strict"; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InstanceWrapper = exports2.INSTANCE_ID_SYMBOL = exports2.INSTANCE_METADATA_SYMBOL = void 0; + var common_12 = require_common(); + var cli_colors_util_1 = require_cli_colors_util(); + var random_string_generator_util_1 = require_random_string_generator_util(); + var shared_utils_1 = require_shared_utils(); + var iterare_1 = require_lib(); + var uuid_factory_1 = require_uuid_factory(); + var constants_1 = require_constants5(); + var provider_classifier_1 = require_provider_classifier(); + exports2.INSTANCE_METADATA_SYMBOL = Symbol.for("instance_metadata:cache"); + exports2.INSTANCE_ID_SYMBOL = Symbol.for("instance_metadata:id"); + var InstanceWrapper = class _InstanceWrapper { + constructor(metadata = {}) { + this.isAlias = false; + this.scope = common_12.Scope.DEFAULT; + this.values = /* @__PURE__ */ new WeakMap(); + this[_a] = {}; + this.initialize(metadata); + this[exports2.INSTANCE_ID_SYMBOL] = metadata[exports2.INSTANCE_ID_SYMBOL] ?? this.generateUuid(); + } + get id() { + return this[exports2.INSTANCE_ID_SYMBOL]; + } + set instance(value) { + this.values.set(constants_1.STATIC_CONTEXT, { instance: value }); + } + get instance() { + const instancePerContext = this.getInstanceByContextId(constants_1.STATIC_CONTEXT); + return instancePerContext.instance; + } + get isNotMetatype() { + return !this.metatype || this.isFactory; + } + get isFactory() { + return this.metatype && !(0, shared_utils_1.isNil)(this.inject); + } + get isTransient() { + return this.scope === common_12.Scope.TRANSIENT; + } + getInstanceByContextId(contextId, inquirerId) { + if (this.scope === common_12.Scope.TRANSIENT && inquirerId) { + return this.getInstanceByInquirerId(contextId, inquirerId); + } + const instancePerContext = this.values.get(contextId); + return instancePerContext ? instancePerContext : this.cloneStaticInstance(contextId); + } + getInstanceByInquirerId(contextId, inquirerId) { + let collectionPerContext = this.transientMap.get(inquirerId); + if (!collectionPerContext) { + collectionPerContext = /* @__PURE__ */ new WeakMap(); + this.transientMap.set(inquirerId, collectionPerContext); + } + const instancePerContext = collectionPerContext.get(contextId); + return instancePerContext ? instancePerContext : this.cloneTransientInstance(contextId, inquirerId); + } + setInstanceByContextId(contextId, value, inquirerId) { + if (this.scope === common_12.Scope.TRANSIENT && inquirerId) { + return this.setInstanceByInquirerId(contextId, inquirerId, value); + } + this.values.set(contextId, value); + } + setInstanceByInquirerId(contextId, inquirerId, value) { + let collection = this.transientMap.get(inquirerId); + if (!collection) { + collection = /* @__PURE__ */ new WeakMap(); + this.transientMap.set(inquirerId, collection); + } + collection.set(contextId, value); + } + removeInstanceByContextId(contextId, inquirerId) { + if (this.scope === common_12.Scope.TRANSIENT && inquirerId) { + return this.removeInstanceByInquirerId(contextId, inquirerId); + } + this.values.delete(contextId); + } + removeInstanceByInquirerId(contextId, inquirerId) { + const collection = this.transientMap.get(inquirerId); + if (!collection) { + return; + } + collection.delete(contextId); + } + addCtorMetadata(index, wrapper) { + if (!this[exports2.INSTANCE_METADATA_SYMBOL].dependencies) { + this[exports2.INSTANCE_METADATA_SYMBOL].dependencies = []; + } + this[exports2.INSTANCE_METADATA_SYMBOL].dependencies[index] = wrapper; + } + getCtorMetadata() { + return this[exports2.INSTANCE_METADATA_SYMBOL].dependencies; + } + addPropertiesMetadata(key, wrapper) { + if (!this[exports2.INSTANCE_METADATA_SYMBOL].properties) { + this[exports2.INSTANCE_METADATA_SYMBOL].properties = []; + } + this[exports2.INSTANCE_METADATA_SYMBOL].properties.push({ + key, + wrapper + }); + } + getPropertiesMetadata() { + return this[exports2.INSTANCE_METADATA_SYMBOL].properties; + } + addEnhancerMetadata(wrapper) { + if (!this[exports2.INSTANCE_METADATA_SYMBOL].enhancers) { + this[exports2.INSTANCE_METADATA_SYMBOL].enhancers = []; + } + this[exports2.INSTANCE_METADATA_SYMBOL].enhancers.push(wrapper); + } + getEnhancersMetadata() { + return this[exports2.INSTANCE_METADATA_SYMBOL].enhancers; + } + isDependencyTreeDurable(lookupRegistry = []) { + if (!(0, shared_utils_1.isUndefined)(this.isTreeDurable)) { + return this.isTreeDurable; + } + if (this.scope === common_12.Scope.REQUEST) { + this.isTreeDurable = this.durable === void 0 ? false : this.durable; + if (this.isTreeDurable) { + this.printIntrospectedAsDurable(); + } + return this.isTreeDurable; + } + const isStatic = this.isDependencyTreeStatic(); + if (isStatic) { + return false; + } + const isTreeNonDurable = this.introspectDepsAttribute((collection, registry) => collection.some((item) => !item.isDependencyTreeStatic() && !item.isDependencyTreeDurable(registry)), lookupRegistry); + this.isTreeDurable = !isTreeNonDurable; + if (this.isTreeDurable) { + this.printIntrospectedAsDurable(); + } + return this.isTreeDurable; + } + introspectDepsAttribute(callback, lookupRegistry = []) { + if (lookupRegistry.includes(this[exports2.INSTANCE_ID_SYMBOL])) { + return false; + } + lookupRegistry = lookupRegistry.concat(this[exports2.INSTANCE_ID_SYMBOL]); + const { dependencies, properties, enhancers } = this[exports2.INSTANCE_METADATA_SYMBOL]; + let introspectionResult = dependencies ? callback(dependencies, lookupRegistry) : false; + if (introspectionResult || !(properties || enhancers)) { + return introspectionResult; + } + introspectionResult = properties ? callback(properties.map((item) => item.wrapper), lookupRegistry) : false; + if (introspectionResult || !enhancers) { + return introspectionResult; + } + return enhancers ? callback(enhancers, lookupRegistry) : false; + } + isDependencyTreeStatic(lookupRegistry = []) { + if (!(0, shared_utils_1.isUndefined)(this.isTreeStatic)) { + return this.isTreeStatic; + } + if (this.scope === common_12.Scope.REQUEST) { + this.isTreeStatic = false; + this.printIntrospectedAsRequestScoped(); + return this.isTreeStatic; + } + this.isTreeStatic = !this.introspectDepsAttribute((collection, registry) => collection.some((item) => !item.isDependencyTreeStatic(registry)), lookupRegistry); + if (!this.isTreeStatic) { + this.printIntrospectedAsRequestScoped(); + } + return this.isTreeStatic; + } + cloneStaticInstance(contextId) { + const staticInstance = this.getInstanceByContextId(constants_1.STATIC_CONTEXT); + if (this.isDependencyTreeStatic()) { + return staticInstance; + } + const instancePerContext = { + ...staticInstance, + instance: void 0, + isResolved: false, + isPending: false + }; + if (this.isNewable()) { + instancePerContext.instance = Object.create(this.metatype.prototype); + } + this.setInstanceByContextId(contextId, instancePerContext); + return instancePerContext; + } + cloneTransientInstance(contextId, inquirerId) { + const staticInstance = this.getInstanceByContextId(constants_1.STATIC_CONTEXT); + const instancePerContext = { + ...staticInstance, + instance: void 0, + isResolved: false, + isPending: false + }; + if (this.isNewable()) { + instancePerContext.instance = Object.create(this.metatype.prototype); + } + this.setInstanceByInquirerId(contextId, inquirerId, instancePerContext); + return instancePerContext; + } + createPrototype(contextId) { + const host = this.getInstanceByContextId(contextId); + if (!this.isNewable() || host.isResolved) { + return; + } + return Object.create(this.metatype.prototype); + } + isInRequestScope(contextId, inquirer) { + const isDependencyTreeStatic = this.isDependencyTreeStatic(); + return !isDependencyTreeStatic && contextId !== constants_1.STATIC_CONTEXT && (!this.isTransient || this.isTransient && !!inquirer); + } + isLazyTransient(contextId, inquirer) { + const isInquirerRequestScoped = inquirer && !inquirer.isDependencyTreeStatic(); + return this.isDependencyTreeStatic() && contextId !== constants_1.STATIC_CONTEXT && this.isTransient && isInquirerRequestScoped; + } + isExplicitlyRequested(contextId, inquirer) { + const isSelfRequested = inquirer === this; + return this.isDependencyTreeStatic() && contextId !== constants_1.STATIC_CONTEXT && (isSelfRequested || inquirer && inquirer.scope === common_12.Scope.TRANSIENT); + } + isStatic(contextId, inquirer) { + const isInquirerRequestScoped = inquirer && !inquirer.isDependencyTreeStatic(); + const isStaticTransient = this.isTransient && !isInquirerRequestScoped; + return this.isDependencyTreeStatic() && contextId === constants_1.STATIC_CONTEXT && (!this.isTransient || isStaticTransient && !!inquirer && !inquirer.isTransient); + } + getStaticTransientInstances() { + if (!this.transientMap) { + return []; + } + const instances = [...this.transientMap.values()]; + return (0, iterare_1.iterate)(instances).map((item) => item.get(constants_1.STATIC_CONTEXT)).filter((item) => !!item).toArray(); + } + mergeWith(provider) { + if ((0, provider_classifier_1.isValueProvider)(provider)) { + this.metatype = null; + this.inject = null; + this.scope = common_12.Scope.DEFAULT; + this.setInstanceByContextId(constants_1.STATIC_CONTEXT, { + instance: provider.useValue, + isResolved: true, + isPending: false + }); + } else if ((0, provider_classifier_1.isClassProvider)(provider)) { + this.inject = null; + this.metatype = provider.useClass; + } else if ((0, provider_classifier_1.isFactoryProvider)(provider)) { + this.metatype = provider.useFactory; + this.inject = provider.inject || []; + } + } + isNewable() { + return (0, shared_utils_1.isNil)(this.inject) && this.metatype && this.metatype.prototype; + } + initialize(metadata) { + const { instance, isResolved, ...wrapperPartial } = metadata; + Object.assign(this, wrapperPartial); + this.setInstanceByContextId(constants_1.STATIC_CONTEXT, { + instance, + isResolved + }); + this.scope === common_12.Scope.TRANSIENT && (this.transientMap = /* @__PURE__ */ new Map()); + } + printIntrospectedAsRequestScoped() { + if (!this.isDebugMode() || this.name === "REQUEST") { + return; + } + if ((0, shared_utils_1.isString)(this.name)) { + _InstanceWrapper.logger.log(`${cli_colors_util_1.clc.cyanBright(this.name)}${cli_colors_util_1.clc.green(" introspected as ")}${cli_colors_util_1.clc.magentaBright("request-scoped")}`); + } + } + printIntrospectedAsDurable() { + if (!this.isDebugMode()) { + return; + } + if ((0, shared_utils_1.isString)(this.name)) { + _InstanceWrapper.logger.log(`${cli_colors_util_1.clc.cyanBright(this.name)}${cli_colors_util_1.clc.green(" introspected as ")}${cli_colors_util_1.clc.magentaBright("durable")}`); + } + } + isDebugMode() { + return !!process.env.NEST_DEBUG; + } + generateUuid() { + let key = this.name?.toString() ?? this.token?.toString(); + key += this.host?.name ?? ""; + return key ? uuid_factory_1.UuidFactory.get(key) : (0, random_string_generator_util_1.randomStringGenerator)(); + } + }; + exports2.InstanceWrapper = InstanceWrapper; + _a = exports2.INSTANCE_METADATA_SYMBOL; + InstanceWrapper.logger = new common_12.Logger(InstanceWrapper.name); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/settlement-signal.js +var require_settlement_signal = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/settlement-signal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SettlementSignal = void 0; + var SettlementSignal = class { + constructor() { + this._refs = /* @__PURE__ */ new Set(); + this.completed = false; + this.settledPromise = new Promise((resolve) => { + this.settleFn = resolve; + }); + } + /** + * Resolves the promise returned by `asPromise`. + */ + complete() { + this.completed = true; + this.settleFn(); + } + /** + * Rejects the promise returned by `asPromise` with the given error. + * @param err Error to reject the promise returned by `asPromise` with. + */ + error(err) { + this.completed = true; + this.settleFn(err); + } + /** + * Returns a promise that will be resolved when `complete` or `error` is called. + * @returns Promise that will be resolved when `complete` or `error` is called. + */ + asPromise() { + return this.settledPromise; + } + /** + * Inserts a wrapper id that the host of this signal depends on. + * @param wrapperId Wrapper id to insert. + */ + insertRef(wrapperId) { + this._refs.add(wrapperId); + } + /** + * Check if relationship is circular. + * @param wrapperId Wrapper id to check. + * @returns True if relationship is circular, false otherwise. + */ + isCycle(wrapperId) { + return !this.completed && this._refs.has(wrapperId); + } + }; + exports2.SettlementSignal = SettlementSignal; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/injector.js +var require_injector = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/injector.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Injector = void 0; + var common_12 = require_common(); + var constants_1 = require_constants(); + var cli_colors_util_1 = require_cli_colors_util(); + var shared_utils_1 = require_shared_utils(); + var iterare_1 = require_lib(); + var perf_hooks_1 = require("perf_hooks"); + var exceptions_1 = require_exceptions3(); + var runtime_exception_1 = require_runtime_exception(); + var undefined_dependency_exception_1 = require_undefined_dependency_exception(); + var unknown_dependencies_exception_1 = require_unknown_dependencies_exception(); + var constants_2 = require_constants5(); + var inquirer_1 = require_inquirer(); + var instance_wrapper_1 = require_instance_wrapper(); + var settlement_signal_1 = require_settlement_signal(); + var Injector = class { + constructor(options) { + this.options = options; + this.logger = new common_12.Logger("InjectorLogger"); + } + loadPrototype({ token }, collection, contextId = constants_2.STATIC_CONTEXT) { + if (!collection) { + return; + } + const target = collection.get(token); + const instance = target.createPrototype(contextId); + if (instance) { + const wrapper = new instance_wrapper_1.InstanceWrapper({ + ...target, + instance + }); + collection.set(token, wrapper); + } + } + async loadInstance(wrapper, collection, moduleRef, contextId = constants_2.STATIC_CONTEXT, inquirer) { + const inquirerId = this.getInquirerId(inquirer); + const instanceHost = wrapper.getInstanceByContextId(this.getContextId(contextId, wrapper), inquirerId); + if (instanceHost.isPending) { + const settlementSignal2 = wrapper.settlementSignal; + if (inquirer && settlementSignal2?.isCycle(inquirer.id)) { + throw new exceptions_1.CircularDependencyException(`"${wrapper.name}"`); + } + return instanceHost.donePromise.then((err) => { + if (err) { + throw err; + } + }); + } + const settlementSignal = this.applySettlementSignal(instanceHost, wrapper); + const token = wrapper.token || wrapper.name; + const { inject } = wrapper; + const targetWrapper = collection.get(token); + if ((0, shared_utils_1.isUndefined)(targetWrapper)) { + throw new runtime_exception_1.RuntimeException(); + } + if (instanceHost.isResolved) { + return settlementSignal.complete(); + } + try { + const t0 = this.getNowTimestamp(); + const callback = async (instances) => { + const properties = await this.resolveProperties(wrapper, moduleRef, inject, contextId, wrapper, inquirer); + const instance = await this.instantiateClass(instances, wrapper, targetWrapper, contextId, inquirer); + this.applyProperties(instance, properties); + wrapper.initTime = this.getNowTimestamp() - t0; + settlementSignal.complete(); + }; + await this.resolveConstructorParams(wrapper, moduleRef, inject, callback, contextId, wrapper, inquirer); + } catch (err) { + wrapper.removeInstanceByContextId(this.getContextId(contextId, wrapper), inquirerId); + settlementSignal.error(err); + throw err; + } + } + async loadMiddleware(wrapper, collection, moduleRef, contextId = constants_2.STATIC_CONTEXT, inquirer) { + const { metatype, token } = wrapper; + const targetWrapper = collection.get(token); + if (!(0, shared_utils_1.isUndefined)(targetWrapper.instance)) { + return; + } + targetWrapper.instance = Object.create(metatype.prototype); + await this.loadInstance(wrapper, collection, moduleRef, contextId, inquirer || wrapper); + } + async loadController(wrapper, moduleRef, contextId = constants_2.STATIC_CONTEXT) { + const controllers = moduleRef.controllers; + await this.loadInstance(wrapper, controllers, moduleRef, contextId, wrapper); + await this.loadEnhancersPerContext(wrapper, contextId, wrapper); + } + async loadInjectable(wrapper, moduleRef, contextId = constants_2.STATIC_CONTEXT, inquirer) { + const injectables = moduleRef.injectables; + await this.loadInstance(wrapper, injectables, moduleRef, contextId, inquirer); + } + async loadProvider(wrapper, moduleRef, contextId = constants_2.STATIC_CONTEXT, inquirer) { + const providers = moduleRef.providers; + await this.loadInstance(wrapper, providers, moduleRef, contextId, inquirer); + await this.loadEnhancersPerContext(wrapper, contextId, wrapper); + } + applySettlementSignal(instancePerContext, host) { + const settlementSignal = new settlement_signal_1.SettlementSignal(); + instancePerContext.donePromise = settlementSignal.asPromise(); + instancePerContext.isPending = true; + host.settlementSignal = settlementSignal; + return settlementSignal; + } + async resolveConstructorParams(wrapper, moduleRef, inject, callback, contextId = constants_2.STATIC_CONTEXT, inquirer, parentInquirer) { + let inquirerId = this.getInquirerId(inquirer); + const metadata = wrapper.getCtorMetadata(); + if (metadata && contextId !== constants_2.STATIC_CONTEXT) { + const deps = await this.loadCtorMetadata(metadata, contextId, inquirer, parentInquirer); + return callback(deps); + } + const isFactoryProvider = !(0, shared_utils_1.isNil)(inject); + const [dependencies, optionalDependenciesIds] = isFactoryProvider ? this.getFactoryProviderDependencies(wrapper) : this.getClassDependencies(wrapper); + let isResolved = true; + const resolveParam = async (param, index) => { + try { + if (this.isInquirer(param, parentInquirer)) { + return parentInquirer && parentInquirer.instance; + } + if (inquirer?.isTransient && parentInquirer) { + inquirer = parentInquirer; + inquirerId = this.getInquirerId(parentInquirer); + } + const paramWrapper = await this.resolveSingleParam(wrapper, param, { index, dependencies }, moduleRef, contextId, inquirer, index); + const instanceHost = paramWrapper.getInstanceByContextId(this.getContextId(contextId, paramWrapper), inquirerId); + if (!instanceHost.isResolved && !paramWrapper.forwardRef) { + isResolved = false; + } + return instanceHost?.instance; + } catch (err) { + const isOptional = optionalDependenciesIds.includes(index); + if (!isOptional) { + throw err; + } + return void 0; + } + }; + const instances = await Promise.all(dependencies.map(resolveParam)); + isResolved && await callback(instances); + } + getClassDependencies(wrapper) { + const ctorRef = wrapper.metatype; + return [ + this.reflectConstructorParams(ctorRef), + this.reflectOptionalParams(ctorRef) + ]; + } + getFactoryProviderDependencies(wrapper) { + const optionalDependenciesIds = []; + function isOptionalFactoryDependency(value) { + return !(0, shared_utils_1.isUndefined)(value.token) && !(0, shared_utils_1.isUndefined)(value.optional) && !value.prototype; + } + const mapFactoryProviderInjectArray = (item, index) => { + if (typeof item !== "object") { + return item; + } + if (isOptionalFactoryDependency(item)) { + if (item.optional) { + optionalDependenciesIds.push(index); + } + return item?.token; + } + return item; + }; + return [ + wrapper.inject?.map?.(mapFactoryProviderInjectArray), + optionalDependenciesIds + ]; + } + reflectConstructorParams(type) { + const paramtypes = [ + ...Reflect.getMetadata(constants_1.PARAMTYPES_METADATA, type) || [] + ]; + const selfParams = this.reflectSelfParams(type); + selfParams.forEach(({ index, param }) => paramtypes[index] = param); + return paramtypes; + } + reflectOptionalParams(type) { + return Reflect.getMetadata(constants_1.OPTIONAL_DEPS_METADATA, type) || []; + } + reflectSelfParams(type) { + return Reflect.getMetadata(constants_1.SELF_DECLARED_DEPS_METADATA, type) || []; + } + async resolveSingleParam(wrapper, param, dependencyContext, moduleRef, contextId = constants_2.STATIC_CONTEXT, inquirer, keyOrIndex) { + if ((0, shared_utils_1.isUndefined)(param)) { + this.logger.log("Nest encountered an undefined dependency. This may be due to a circular import or a missing dependency declaration."); + throw new undefined_dependency_exception_1.UndefinedDependencyException(wrapper.name, dependencyContext, moduleRef); + } + const token = this.resolveParamToken(wrapper, param); + return this.resolveComponentInstance(moduleRef, token, dependencyContext, wrapper, contextId, inquirer, keyOrIndex); + } + resolveParamToken(wrapper, param) { + if (!param.forwardRef) { + return param; + } + wrapper.forwardRef = true; + return param.forwardRef(); + } + async resolveComponentInstance(moduleRef, token, dependencyContext, wrapper, contextId = constants_2.STATIC_CONTEXT, inquirer, keyOrIndex) { + this.printResolvingDependenciesLog(token, inquirer); + this.printLookingForProviderLog(token, moduleRef); + const providers = moduleRef.providers; + const instanceWrapper = await this.lookupComponent(providers, moduleRef, { ...dependencyContext, name: token }, wrapper, contextId, inquirer, keyOrIndex); + return this.resolveComponentHost(moduleRef, instanceWrapper, contextId, inquirer); + } + async resolveComponentHost(moduleRef, instanceWrapper, contextId = constants_2.STATIC_CONTEXT, inquirer) { + const inquirerId = this.getInquirerId(inquirer); + const instanceHost = instanceWrapper.getInstanceByContextId(this.getContextId(contextId, instanceWrapper), inquirerId); + if (!instanceHost.isResolved && !instanceWrapper.forwardRef) { + inquirer?.settlementSignal?.insertRef(instanceWrapper.id); + await this.loadProvider(instanceWrapper, instanceWrapper.host ?? moduleRef, contextId, inquirer); + } else if (!instanceHost.isResolved && instanceWrapper.forwardRef && (contextId !== constants_2.STATIC_CONTEXT || !!inquirerId)) { + instanceHost.donePromise && instanceHost.donePromise.then(() => this.loadProvider(instanceWrapper, moduleRef, contextId, inquirer)); + } + if (instanceWrapper.async) { + const host = instanceWrapper.getInstanceByContextId(this.getContextId(contextId, instanceWrapper), inquirerId); + host.instance = await host.instance; + instanceWrapper.setInstanceByContextId(contextId, host, inquirerId); + } + return instanceWrapper; + } + async lookupComponent(providers, moduleRef, dependencyContext, wrapper, contextId = constants_2.STATIC_CONTEXT, inquirer, keyOrIndex) { + const token = wrapper.token || wrapper.name; + const { name } = dependencyContext; + if (wrapper && token === name) { + throw new unknown_dependencies_exception_1.UnknownDependenciesException(wrapper.name, dependencyContext, moduleRef, { id: wrapper.id }); + } + if (providers.has(name)) { + const instanceWrapper = providers.get(name); + this.printFoundInModuleLog(name, moduleRef); + this.addDependencyMetadata(keyOrIndex, wrapper, instanceWrapper); + return instanceWrapper; + } + return this.lookupComponentInParentModules(dependencyContext, moduleRef, wrapper, contextId, inquirer, keyOrIndex); + } + async lookupComponentInParentModules(dependencyContext, moduleRef, wrapper, contextId = constants_2.STATIC_CONTEXT, inquirer, keyOrIndex) { + const instanceWrapper = await this.lookupComponentInImports(moduleRef, dependencyContext.name, wrapper, [], contextId, inquirer, keyOrIndex); + if ((0, shared_utils_1.isNil)(instanceWrapper)) { + throw new unknown_dependencies_exception_1.UnknownDependenciesException(wrapper.name, dependencyContext, moduleRef, { id: wrapper.id }); + } + return instanceWrapper; + } + async lookupComponentInImports(moduleRef, name, wrapper, moduleRegistry = [], contextId = constants_2.STATIC_CONTEXT, inquirer, keyOrIndex, isTraversing) { + let instanceWrapperRef = null; + const imports = moduleRef.imports || /* @__PURE__ */ new Set(); + const identity = (item) => item; + let children = [...imports.values()].filter(identity); + if (isTraversing) { + const contextModuleExports = moduleRef.exports; + children = children.filter((child) => contextModuleExports.has(child.metatype)); + } + for (const relatedModule of children) { + if (moduleRegistry.includes(relatedModule.id)) { + continue; + } + this.printLookingForProviderLog(name, relatedModule); + moduleRegistry.push(relatedModule.id); + const { providers, exports: exports3 } = relatedModule; + if (!exports3.has(name) || !providers.has(name)) { + const instanceRef = await this.lookupComponentInImports(relatedModule, name, wrapper, moduleRegistry, contextId, inquirer, keyOrIndex, true); + if (instanceRef) { + this.addDependencyMetadata(keyOrIndex, wrapper, instanceRef); + return instanceRef; + } + continue; + } + this.printFoundInModuleLog(name, relatedModule); + instanceWrapperRef = providers.get(name); + this.addDependencyMetadata(keyOrIndex, wrapper, instanceWrapperRef); + const inquirerId = this.getInquirerId(inquirer); + const instanceHost = instanceWrapperRef.getInstanceByContextId(this.getContextId(contextId, instanceWrapperRef), inquirerId); + if (!instanceHost.isResolved && !instanceWrapperRef.forwardRef) { + wrapper.settlementSignal?.insertRef(instanceWrapperRef.id); + await this.loadProvider(instanceWrapperRef, relatedModule, contextId, wrapper); + break; + } + } + return instanceWrapperRef; + } + async resolveProperties(wrapper, moduleRef, inject, contextId = constants_2.STATIC_CONTEXT, inquirer, parentInquirer) { + if (!(0, shared_utils_1.isNil)(inject)) { + return []; + } + const metadata = wrapper.getPropertiesMetadata(); + if (metadata && contextId !== constants_2.STATIC_CONTEXT) { + return this.loadPropertiesMetadata(metadata, contextId, inquirer); + } + const properties = this.reflectProperties(wrapper.metatype); + const instances = await Promise.all(properties.map(async (item) => { + try { + const dependencyContext = { + key: item.key, + name: item.name + }; + if (this.isInquirer(item.name, parentInquirer)) { + return parentInquirer && parentInquirer.instance; + } + const paramWrapper = await this.resolveSingleParam(wrapper, item.name, dependencyContext, moduleRef, contextId, inquirer, item.key); + if (!paramWrapper) { + return void 0; + } + const inquirerId = this.getInquirerId(inquirer); + const instanceHost = paramWrapper.getInstanceByContextId(this.getContextId(contextId, paramWrapper), inquirerId); + return instanceHost.instance; + } catch (err) { + if (!item.isOptional) { + throw err; + } + return void 0; + } + })); + return properties.map((item, index) => ({ + ...item, + instance: instances[index] + })); + } + reflectProperties(type) { + const properties = Reflect.getMetadata(constants_1.PROPERTY_DEPS_METADATA, type) || []; + const optionalKeys = Reflect.getMetadata(constants_1.OPTIONAL_PROPERTY_DEPS_METADATA, type) || []; + return properties.map((item) => ({ + ...item, + name: item.type, + isOptional: optionalKeys.includes(item.key) + })); + } + applyProperties(instance, properties) { + if (!(0, shared_utils_1.isObject)(instance)) { + return void 0; + } + (0, iterare_1.iterate)(properties).filter((item) => !(0, shared_utils_1.isNil)(item.instance)).forEach((item) => instance[item.key] = item.instance); + } + async instantiateClass(instances, wrapper, targetMetatype, contextId = constants_2.STATIC_CONTEXT, inquirer) { + const { metatype, inject } = wrapper; + const inquirerId = this.getInquirerId(inquirer); + const instanceHost = targetMetatype.getInstanceByContextId(this.getContextId(contextId, targetMetatype), inquirerId); + const isInContext = wrapper.isStatic(contextId, inquirer) || wrapper.isInRequestScope(contextId, inquirer) || wrapper.isLazyTransient(contextId, inquirer) || wrapper.isExplicitlyRequested(contextId, inquirer); + if (this.options?.preview && !wrapper.host?.initOnPreview) { + instanceHost.isResolved = true; + return instanceHost.instance; + } + if ((0, shared_utils_1.isNil)(inject) && isInContext) { + instanceHost.instance = wrapper.forwardRef ? Object.assign(instanceHost.instance, new metatype(...instances)) : new metatype(...instances); + } else if (isInContext) { + const factoryReturnValue = targetMetatype.metatype(...instances); + instanceHost.instance = await factoryReturnValue; + } + instanceHost.isResolved = true; + return instanceHost.instance; + } + async loadPerContext(instance, moduleRef, collection, ctx, wrapper) { + if (!wrapper) { + const injectionToken = instance.constructor; + wrapper = collection.get(injectionToken); + } + await this.loadInstance(wrapper, collection, moduleRef, ctx, wrapper); + await this.loadEnhancersPerContext(wrapper, ctx, wrapper); + const host = wrapper.getInstanceByContextId(this.getContextId(ctx, wrapper), wrapper.id); + return host && host.instance; + } + async loadEnhancersPerContext(wrapper, ctx, inquirer) { + const enhancers = wrapper.getEnhancersMetadata() || []; + const loadEnhancer = (item) => { + const hostModule = item.host; + return this.loadInstance(item, hostModule.injectables, hostModule, ctx, inquirer); + }; + await Promise.all(enhancers.map(loadEnhancer)); + } + async loadCtorMetadata(metadata, contextId, inquirer, parentInquirer) { + const hosts = await Promise.all(metadata.map(async (item) => this.resolveScopedComponentHost(item, contextId, inquirer, parentInquirer))); + const inquirerId = this.getInquirerId(inquirer); + return hosts.map((item) => item?.getInstanceByContextId(this.getContextId(contextId, item), inquirerId).instance); + } + async loadPropertiesMetadata(metadata, contextId, inquirer) { + const dependenciesHosts = await Promise.all(metadata.map(async ({ wrapper: item, key }) => ({ + key, + host: await this.resolveComponentHost(item.host, item, contextId, inquirer) + }))); + const inquirerId = this.getInquirerId(inquirer); + return dependenciesHosts.map(({ key, host }) => ({ + key, + name: key, + instance: host.getInstanceByContextId(this.getContextId(contextId, host), inquirerId).instance + })); + } + getInquirerId(inquirer) { + return inquirer && inquirer.id; + } + resolveScopedComponentHost(item, contextId, inquirer, parentInquirer) { + return this.isInquirerRequest(item, parentInquirer) ? parentInquirer : this.resolveComponentHost(item.host, item, contextId, inquirer); + } + isInquirerRequest(item, parentInquirer) { + return item.isTransient && item.name === inquirer_1.INQUIRER && parentInquirer; + } + isInquirer(param, parentInquirer) { + return param === inquirer_1.INQUIRER && parentInquirer; + } + addDependencyMetadata(keyOrIndex, hostWrapper, instanceWrapper) { + if ((0, shared_utils_1.isSymbol)(keyOrIndex) || (0, shared_utils_1.isString)(keyOrIndex)) { + hostWrapper.addPropertiesMetadata(keyOrIndex, instanceWrapper); + } else { + hostWrapper.addCtorMetadata(keyOrIndex, instanceWrapper); + } + } + getTokenName(token) { + return (0, shared_utils_1.isFunction)(token) ? token.name : token.toString(); + } + printResolvingDependenciesLog(token, inquirer) { + if (!this.isDebugMode()) { + return; + } + const tokenName = this.getTokenName(token); + const dependentName = (inquirer?.name && inquirer.name.toString?.()) ?? "unknown"; + const isAlias = dependentName === tokenName; + const messageToPrint = `Resolving dependency ${cli_colors_util_1.clc.cyanBright(tokenName)}${cli_colors_util_1.clc.green(" in the ")}${cli_colors_util_1.clc.yellow(dependentName)}${cli_colors_util_1.clc.green(` provider ${isAlias ? "(alias)" : ""}`)}`; + this.logger.log(messageToPrint); + } + printLookingForProviderLog(token, moduleRef) { + if (!this.isDebugMode()) { + return; + } + const tokenName = this.getTokenName(token); + const moduleRefName = moduleRef?.metatype?.name ?? "unknown"; + this.logger.log(`Looking for ${cli_colors_util_1.clc.cyanBright(tokenName)}${cli_colors_util_1.clc.green(" in ")}${cli_colors_util_1.clc.magentaBright(moduleRefName)}`); + } + printFoundInModuleLog(token, moduleRef) { + if (!this.isDebugMode()) { + return; + } + const tokenName = this.getTokenName(token); + const moduleRefName = moduleRef?.metatype?.name ?? "unknown"; + this.logger.log(`Found ${cli_colors_util_1.clc.cyanBright(tokenName)}${cli_colors_util_1.clc.green(" in ")}${cli_colors_util_1.clc.magentaBright(moduleRefName)}`); + } + isDebugMode() { + return !!process.env.NEST_DEBUG; + } + getContextId(contextId, instanceWrapper) { + return contextId.getParent ? contextId.getParent({ + token: instanceWrapper.token, + isTreeDurable: instanceWrapper.isDependencyTreeDurable() + }) : contextId; + } + getNowTimestamp() { + return perf_hooks_1.performance.now(); + } + }; + exports2.Injector = Injector; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/instance-links-host.js +var require_instance_links_host = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/instance-links-host.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InstanceLinksHost = void 0; + var shared_utils_1 = require_shared_utils(); + var unknown_element_exception_1 = require_unknown_element_exception(); + var InstanceLinksHost = class { + constructor(container) { + this.container = container; + this.instanceLinks = /* @__PURE__ */ new Map(); + this.initialize(); + } + get(token, options = {}) { + const instanceLinksForGivenToken = this.instanceLinks.get(token); + if (!instanceLinksForGivenToken) { + throw new unknown_element_exception_1.UnknownElementException(this.getInstanceNameByToken(token)); + } + if (options.each) { + return instanceLinksForGivenToken; + } + const instanceLink = options.moduleId ? instanceLinksForGivenToken.find((item) => item.moduleId === options.moduleId) : instanceLinksForGivenToken[instanceLinksForGivenToken.length - 1]; + if (!instanceLink) { + throw new unknown_element_exception_1.UnknownElementException(this.getInstanceNameByToken(token)); + } + return instanceLink; + } + initialize() { + const modules = this.container.getModules(); + modules.forEach((moduleRef) => { + const { providers, injectables, controllers } = moduleRef; + providers.forEach((wrapper, token) => this.addLink(wrapper, token, moduleRef, "providers")); + injectables.forEach((wrapper, token) => this.addLink(wrapper, token, moduleRef, "injectables")); + controllers.forEach((wrapper, token) => this.addLink(wrapper, token, moduleRef, "controllers")); + }); + } + addLink(wrapper, token, moduleRef, collectionName) { + const instanceLink = { + moduleId: moduleRef.id, + wrapperRef: wrapper, + collection: moduleRef[collectionName], + token + }; + const existingLinks = this.instanceLinks.get(token); + if (!existingLinks) { + this.instanceLinks.set(token, [instanceLink]); + } else { + existingLinks.push(instanceLink); + } + } + getInstanceNameByToken(token) { + return (0, shared_utils_1.isFunction)(token) ? token?.name : token; + } + }; + exports2.InstanceLinksHost = InstanceLinksHost; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/module-ref.js +var require_module_ref = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/module-ref.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ModuleRef = void 0; + var common_12 = require_common(); + var get_class_scope_1 = require_get_class_scope(); + var is_durable_1 = require_is_durable(); + var abstract_instance_resolver_1 = require_abstract_instance_resolver(); + var injector_1 = require_injector(); + var instance_links_host_1 = require_instance_links_host(); + var instance_wrapper_1 = require_instance_wrapper(); + var ModuleRef = class extends abstract_instance_resolver_1.AbstractInstanceResolver { + get instanceLinksHost() { + if (!this._instanceLinksHost) { + this._instanceLinksHost = new instance_links_host_1.InstanceLinksHost(this.container); + } + return this._instanceLinksHost; + } + constructor(container) { + super(); + this.container = container; + this.injector = new injector_1.Injector(); + } + introspect(token) { + const { wrapperRef } = this.instanceLinksHost.get(token); + let scope = common_12.Scope.DEFAULT; + if (!wrapperRef.isDependencyTreeStatic()) { + scope = common_12.Scope.REQUEST; + } else if (wrapperRef.isTransient) { + scope = common_12.Scope.TRANSIENT; + } + return { scope }; + } + registerRequestByContextId(request, contextId) { + this.container.registerRequestProvider(request, contextId); + } + async instantiateClass(type, moduleRef, contextId) { + const wrapper = new instance_wrapper_1.InstanceWrapper({ + name: type && type.name, + metatype: type, + isResolved: false, + scope: (0, get_class_scope_1.getClassScope)(type), + durable: (0, is_durable_1.isDurable)(type), + host: moduleRef + }); + return new Promise(async (resolve, reject) => { + try { + const callback = async (instances) => { + const properties = await this.injector.resolveProperties(wrapper, moduleRef, void 0, contextId); + const instance = new type(...instances); + this.injector.applyProperties(instance, properties); + resolve(instance); + }; + await this.injector.resolveConstructorParams(wrapper, moduleRef, void 0, callback, contextId); + } catch (err) { + reject(err); + } + }); + } + }; + exports2.ModuleRef = ModuleRef; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/lazy-module-loader/lazy-module-loader.js +var require_lazy_module_loader = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/lazy-module-loader/lazy-module-loader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LazyModuleLoader = void 0; + var silent_logger_1 = require_silent_logger(); + var module_ref_1 = require_module_ref(); + var LazyModuleLoader = class { + constructor(dependenciesScanner, instanceLoader, moduleCompiler, modulesContainer, moduleOverrides) { + this.dependenciesScanner = dependenciesScanner; + this.instanceLoader = instanceLoader; + this.moduleCompiler = moduleCompiler; + this.modulesContainer = modulesContainer; + this.moduleOverrides = moduleOverrides; + } + async load(loaderFn, loadOpts) { + this.registerLoggerConfiguration(loadOpts); + const moduleClassOrDynamicDefinition = await loaderFn(); + const moduleInstances = await this.dependenciesScanner.scanForModules({ + moduleDefinition: moduleClassOrDynamicDefinition, + overrides: this.moduleOverrides, + lazy: true + }); + if (moduleInstances.length === 0) { + const { token } = await this.moduleCompiler.compile(moduleClassOrDynamicDefinition); + const moduleInstance = this.modulesContainer.get(token); + return moduleInstance && this.getTargetModuleRef(moduleInstance); + } + const lazyModulesContainer = this.createLazyModulesContainer(moduleInstances); + await this.dependenciesScanner.scanModulesForDependencies(lazyModulesContainer); + await this.instanceLoader.createInstancesOfDependencies(lazyModulesContainer); + const [targetModule] = moduleInstances; + return this.getTargetModuleRef(targetModule); + } + registerLoggerConfiguration(loadOpts) { + if (loadOpts?.logger === false) { + this.instanceLoader.setLogger(new silent_logger_1.SilentLogger()); + } + } + createLazyModulesContainer(moduleInstances) { + moduleInstances = Array.from(new Set(moduleInstances)); + return new Map(moduleInstances.map((ref) => [ref.token, ref])); + } + getTargetModuleRef(moduleInstance) { + const moduleRefInstanceWrapper = moduleInstance.getProviderByKey(module_ref_1.ModuleRef); + return moduleRefInstanceWrapper.instance; + } + }; + exports2.LazyModuleLoader = LazyModuleLoader; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/services/reflector.service.js +var require_reflector_service = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/services/reflector.service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Reflector = void 0; + var common_12 = require_common(); + var shared_utils_1 = require_shared_utils(); + var uid_1 = require_dist(); + var Reflector = class { + static createDecorator(options = {}) { + const metadataKey = options.key ?? (0, uid_1.uid)(21); + const decoratorFn = (metadataValue) => (target, key, descriptor) => { + const value = options.transform ? options.transform(metadataValue) : metadataValue; + (0, common_12.SetMetadata)(metadataKey, value ?? {})(target, key, descriptor); + }; + decoratorFn.KEY = metadataKey; + return decoratorFn; + } + /** + * Retrieve metadata for a specified key or decorator for a specified target. + * + * @example + * `const roles = this.reflector.get('roles', context.getHandler());` + * + * @param metadataKey lookup key or decorator for metadata to retrieve + * @param target context (decorated object) to retrieve metadata from + * + */ + get(metadataKeyOrDecorator, target) { + const metadataKey = metadataKeyOrDecorator.KEY ?? metadataKeyOrDecorator; + return Reflect.getMetadata(metadataKey, target); + } + /** + * Retrieve metadata for a specified key or decorator for a specified set of targets. + * + * @param metadataKeyOrDecorator lookup key or decorator for metadata to retrieve + * @param targets context (decorated objects) to retrieve metadata from + * + */ + getAll(metadataKeyOrDecorator, targets) { + return (targets || []).map((target) => this.get(metadataKeyOrDecorator, target)); + } + /** + * Retrieve metadata for a specified key or decorator for a specified set of targets and merge results. + * + * @param metadataKeyOrDecorator lookup key for metadata to retrieve + * @param targets context (decorated objects) to retrieve metadata from + * + */ + getAllAndMerge(metadataKeyOrDecorator, targets) { + const metadataCollection = this.getAll(metadataKeyOrDecorator, targets).filter((item) => item !== void 0); + if ((0, shared_utils_1.isEmpty)(metadataCollection)) { + return metadataCollection; + } + return metadataCollection.reduce((a, b) => { + if (Array.isArray(a)) { + return a.concat(b); + } + if ((0, shared_utils_1.isObject)(a) && (0, shared_utils_1.isObject)(b)) { + return { + ...a, + ...b + }; + } + return [a, b]; + }); + } + /** + * Retrieve metadata for a specified key or decorator for a specified set of targets and return a first not undefined value. + * + * @param metadataKeyOrDecorator lookup key or metadata for metadata to retrieve + * @param targets context (decorated objects) to retrieve metadata from + * + */ + getAllAndOverride(metadataKeyOrDecorator, targets) { + for (const target of targets) { + const result = this.get(metadataKeyOrDecorator, target); + if (result !== void 0) { + return result; + } + } + return void 0; + } + }; + exports2.Reflector = Reflector; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/inspector/serialized-graph.js +var require_serialized_graph = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/inspector/serialized-graph.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SerializedGraph = void 0; + var application_config_1 = require_application_config(); + var external_context_creator_1 = require_external_context_creator(); + var http_adapter_host_1 = require_http_adapter_host(); + var inquirer_constants_1 = require_inquirer_constants(); + var lazy_module_loader_1 = require_lazy_module_loader(); + var module_ref_1 = require_module_ref(); + var modules_container_1 = require_modules_container(); + var request_constants_1 = require_request_constants(); + var reflector_service_1 = require_reflector_service(); + var deterministic_uuid_registry_1 = require_deterministic_uuid_registry(); + var SerializedGraph = class _SerializedGraph { + constructor() { + this.nodes = /* @__PURE__ */ new Map(); + this.edges = /* @__PURE__ */ new Map(); + this.entrypoints = /* @__PURE__ */ new Map(); + this.extras = { + orphanedEnhancers: [], + attachedEnhancers: [] + }; + this._status = "complete"; + } + set status(status) { + this._status = status; + } + set metadata(metadata) { + this._metadata = metadata; + } + insertNode(nodeDefinition) { + if (nodeDefinition.metadata.type === "provider" && _SerializedGraph.INTERNAL_PROVIDERS.includes(nodeDefinition.metadata.token)) { + nodeDefinition.metadata = { + ...nodeDefinition.metadata, + internal: true + }; + } + if (this.nodes.has(nodeDefinition.id)) { + return this.nodes.get(nodeDefinition.id); + } + this.nodes.set(nodeDefinition.id, nodeDefinition); + return nodeDefinition; + } + insertEdge(edgeDefinition) { + if (edgeDefinition.metadata.type === "class-to-class" && (_SerializedGraph.INTERNAL_PROVIDERS.includes(edgeDefinition.metadata.sourceClassToken) || _SerializedGraph.INTERNAL_PROVIDERS.includes(edgeDefinition.metadata.targetClassToken))) { + edgeDefinition.metadata = { + ...edgeDefinition.metadata, + internal: true + }; + } + const id = edgeDefinition.id ?? this.generateUuidByEdgeDefinition(edgeDefinition); + const edge = { + ...edgeDefinition, + id + }; + this.edges.set(id, edge); + return edge; + } + insertEntrypoint(definition, parentId) { + if (this.entrypoints.has(parentId)) { + const existingCollection = this.entrypoints.get(parentId); + existingCollection.push(definition); + } else { + this.entrypoints.set(parentId, [definition]); + } + } + insertOrphanedEnhancer(entry) { + this.extras.orphanedEnhancers.push(entry); + } + insertAttachedEnhancer(nodeId) { + this.extras.attachedEnhancers.push({ + nodeId + }); + } + getNodeById(id) { + return this.nodes.get(id); + } + toJSON() { + const json = { + nodes: Object.fromEntries(this.nodes), + edges: Object.fromEntries(this.edges), + entrypoints: Object.fromEntries(this.entrypoints), + extras: this.extras + }; + if (this._status) { + json["status"] = this._status; + } + if (this._metadata) { + json["metadata"] = this._metadata; + } + return json; + } + toString() { + const replacer = (key, value) => { + if (typeof value === "symbol") { + return value.toString(); + } + return typeof value === "function" ? value.name ?? "Function" : value; + }; + return JSON.stringify(this.toJSON(), replacer, 2); + } + generateUuidByEdgeDefinition(edgeDefinition) { + return deterministic_uuid_registry_1.DeterministicUuidRegistry.get(JSON.stringify(edgeDefinition)); + } + }; + exports2.SerializedGraph = SerializedGraph; + SerializedGraph.INTERNAL_PROVIDERS = [ + application_config_1.ApplicationConfig, + module_ref_1.ModuleRef, + http_adapter_host_1.HttpAdapterHost, + lazy_module_loader_1.LazyModuleLoader, + external_context_creator_1.ExternalContextCreator, + modules_container_1.ModulesContainer, + reflector_service_1.Reflector, + SerializedGraph, + http_adapter_host_1.HttpAdapterHost.name, + reflector_service_1.Reflector.name, + request_constants_1.REQUEST, + inquirer_constants_1.INQUIRER + ]; + } +}); + +// ../../node_modules/.pnpm/fast-safe-stringify@2.1.1/node_modules/fast-safe-stringify/index.js +var require_fast_safe_stringify = __commonJS({ + "../../node_modules/.pnpm/fast-safe-stringify@2.1.1/node_modules/fast-safe-stringify/index.js"(exports2, module2) { + module2.exports = stringify2; + stringify2.default = stringify2; + stringify2.stable = deterministicStringify; + stringify2.stableStringify = deterministicStringify; + var LIMIT_REPLACE_NODE = "[...]"; + var CIRCULAR_REPLACE_NODE = "[Circular]"; + var arr = []; + var replacerStack = []; + function defaultOptions() { + return { + depthLimit: Number.MAX_SAFE_INTEGER, + edgesLimit: Number.MAX_SAFE_INTEGER + }; + } + function stringify2(obj2, replacer, spacer, options) { + if (typeof options === "undefined") { + options = defaultOptions(); + } + decirc(obj2, "", 0, [], void 0, 0, options); + var res; + try { + if (replacerStack.length === 0) { + res = JSON.stringify(obj2, replacer, spacer); + } else { + res = JSON.stringify(obj2, replaceGetterValues(replacer), spacer); + } + } catch (_2) { + return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]"); + } finally { + while (arr.length !== 0) { + var part = arr.pop(); + if (part.length === 4) { + Object.defineProperty(part[0], part[1], part[3]); + } else { + part[0][part[1]] = part[2]; + } + } + } + return res; + } + function setReplace(replace, val, k, parent) { + var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k); + if (propertyDescriptor.get !== void 0) { + if (propertyDescriptor.configurable) { + Object.defineProperty(parent, k, { value: replace }); + arr.push([parent, k, val, propertyDescriptor]); + } else { + replacerStack.push([val, k, replace]); + } + } else { + parent[k] = replace; + arr.push([parent, k, val]); + } + } + function decirc(val, k, edgeIndex, stack, parent, depth, options) { + depth += 1; + var i; + if (typeof val === "object" && val !== null) { + for (i = 0; i < stack.length; i++) { + if (stack[i] === val) { + setReplace(CIRCULAR_REPLACE_NODE, val, k, parent); + return; + } + } + if (typeof options.depthLimit !== "undefined" && depth > options.depthLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + if (typeof options.edgesLimit !== "undefined" && edgeIndex + 1 > options.edgesLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + stack.push(val); + if (Array.isArray(val)) { + for (i = 0; i < val.length; i++) { + decirc(val[i], i, i, stack, val, depth, options); + } + } else { + var keys = Object.keys(val); + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + decirc(val[key], key, i, stack, val, depth, options); + } + } + stack.pop(); + } + } + function compareFunction(a, b) { + if (a < b) { + return -1; + } + if (a > b) { + return 1; + } + return 0; + } + function deterministicStringify(obj2, replacer, spacer, options) { + if (typeof options === "undefined") { + options = defaultOptions(); + } + var tmp = deterministicDecirc(obj2, "", 0, [], void 0, 0, options) || obj2; + var res; + try { + if (replacerStack.length === 0) { + res = JSON.stringify(tmp, replacer, spacer); + } else { + res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer); + } + } catch (_2) { + return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]"); + } finally { + while (arr.length !== 0) { + var part = arr.pop(); + if (part.length === 4) { + Object.defineProperty(part[0], part[1], part[3]); + } else { + part[0][part[1]] = part[2]; + } + } + } + return res; + } + function deterministicDecirc(val, k, edgeIndex, stack, parent, depth, options) { + depth += 1; + var i; + if (typeof val === "object" && val !== null) { + for (i = 0; i < stack.length; i++) { + if (stack[i] === val) { + setReplace(CIRCULAR_REPLACE_NODE, val, k, parent); + return; + } + } + try { + if (typeof val.toJSON === "function") { + return; + } + } catch (_2) { + return; + } + if (typeof options.depthLimit !== "undefined" && depth > options.depthLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + if (typeof options.edgesLimit !== "undefined" && edgeIndex + 1 > options.edgesLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + stack.push(val); + if (Array.isArray(val)) { + for (i = 0; i < val.length; i++) { + deterministicDecirc(val[i], i, i, stack, val, depth, options); + } + } else { + var tmp = {}; + var keys = Object.keys(val).sort(compareFunction); + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + deterministicDecirc(val[key], key, i, stack, val, depth, options); + tmp[key] = val[key]; + } + if (typeof parent !== "undefined") { + arr.push([parent, k, val]); + parent[k] = tmp; + } else { + return tmp; + } + } + stack.pop(); + } + } + function replaceGetterValues(replacer) { + replacer = typeof replacer !== "undefined" ? replacer : function(k, v) { + return v; + }; + return function(key, val) { + if (replacerStack.length > 0) { + for (var i = 0; i < replacerStack.length; i++) { + var part = replacerStack[i]; + if (part[1] === key && part[0] === val) { + val = part[2]; + replacerStack.splice(i, 1); + break; + } + } + } + return replacer.call(this, key, val); + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/module-token-factory.js +var require_module_token_factory = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/module-token-factory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ModuleTokenFactory = void 0; + var common_12 = require_common(); + var random_string_generator_util_1 = require_random_string_generator_util(); + var shared_utils_1 = require_shared_utils(); + var crypto_1 = require("crypto"); + var fast_safe_stringify_1 = require_fast_safe_stringify(); + var perf_hooks_1 = require("perf_hooks"); + var CLASS_STR = "class "; + var CLASS_STR_LEN = CLASS_STR.length; + var ModuleTokenFactory = class _ModuleTokenFactory { + constructor() { + this.moduleTokenCache = /* @__PURE__ */ new Map(); + this.moduleIdsCache = /* @__PURE__ */ new WeakMap(); + this.logger = new common_12.Logger(_ModuleTokenFactory.name, { + timestamp: true + }); + } + create(metatype, dynamicModuleMetadata) { + const moduleId = this.getModuleId(metatype); + if (!dynamicModuleMetadata) { + return this.getStaticModuleToken(moduleId, this.getModuleName(metatype)); + } + const opaqueToken = { + id: moduleId, + module: this.getModuleName(metatype), + dynamic: dynamicModuleMetadata + }; + const start = perf_hooks_1.performance.now(); + const opaqueTokenString = this.getStringifiedOpaqueToken(opaqueToken); + const timeSpentInMs = perf_hooks_1.performance.now() - start; + if (timeSpentInMs > 10) { + const formattedTimeSpent = timeSpentInMs.toFixed(2); + this.logger.warn(`The module "${opaqueToken.module}" is taking ${formattedTimeSpent}ms to serialize, this may be caused by larger objects statically assigned to the module. More details: https://github.com/nestjs/nest/issues/12738`); + } + return this.hashString(opaqueTokenString); + } + getStaticModuleToken(moduleId, moduleName) { + const key = `${moduleId}_${moduleName}`; + if (this.moduleTokenCache.has(key)) { + return this.moduleTokenCache.get(key); + } + const hash = this.hashString(key); + this.moduleTokenCache.set(key, hash); + return hash; + } + getStringifiedOpaqueToken(opaqueToken) { + return opaqueToken ? (0, fast_safe_stringify_1.default)(opaqueToken, this.replacer) : ""; + } + getModuleId(metatype) { + let moduleId = this.moduleIdsCache.get(metatype); + if (moduleId) { + return moduleId; + } + moduleId = (0, random_string_generator_util_1.randomStringGenerator)(); + this.moduleIdsCache.set(metatype, moduleId); + return moduleId; + } + getModuleName(metatype) { + return metatype.name; + } + hashString(value) { + return (0, crypto_1.createHash)("sha256").update(value).digest("hex"); + } + replacer(key, value) { + if ((0, shared_utils_1.isFunction)(value)) { + const funcAsString = value.toString(); + const isClass2 = funcAsString.slice(0, CLASS_STR_LEN) === CLASS_STR; + if (isClass2) { + return value.name; + } + return funcAsString; + } + if ((0, shared_utils_1.isSymbol)(value)) { + return value.toString(); + } + return value; + } + }; + exports2.ModuleTokenFactory = ModuleTokenFactory; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/compiler.js +var require_compiler = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/compiler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ModuleCompiler = void 0; + var module_token_factory_1 = require_module_token_factory(); + var ModuleCompiler = class { + constructor(moduleTokenFactory = new module_token_factory_1.ModuleTokenFactory()) { + this.moduleTokenFactory = moduleTokenFactory; + } + async compile(metatype) { + const { type, dynamicMetadata } = this.extractMetadata(await metatype); + const token = this.moduleTokenFactory.create(type, dynamicMetadata); + return { type, dynamicMetadata, token }; + } + extractMetadata(metatype) { + if (!this.isDynamicModule(metatype)) { + return { + type: metatype?.forwardRef ? metatype.forwardRef() : metatype + }; + } + const { module: type, ...dynamicMetadata } = metatype; + return { type, dynamicMetadata }; + } + isDynamicModule(module3) { + return !!module3.module; + } + }; + exports2.ModuleCompiler = ModuleCompiler; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/request/request-providers.js +var require_request_providers = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/request/request-providers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.requestProvider = void 0; + var common_12 = require_common(); + var request_constants_1 = require_request_constants(); + var noop = () => { + }; + exports2.requestProvider = { + provide: request_constants_1.REQUEST, + scope: common_12.Scope.REQUEST, + useFactory: noop + }; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/services/index.js +var require_services2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/services/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_reflector_service(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/inquirer/inquirer-providers.js +var require_inquirer_providers = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/inquirer/inquirer-providers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.inquirerProvider = void 0; + var common_12 = require_common(); + var inquirer_constants_1 = require_inquirer_constants(); + var noop = () => { + }; + exports2.inquirerProvider = { + provide: inquirer_constants_1.INQUIRER, + scope: common_12.Scope.TRANSIENT, + useFactory: noop + }; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/internal-core-module/internal-core-module.js +var require_internal_core_module = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/internal-core-module/internal-core-module.js"(exports2) { + "use strict"; + var InternalCoreModule_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InternalCoreModule = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var common_12 = require_common(); + var request_providers_1 = require_request_providers(); + var services_1 = require_services2(); + var inquirer_providers_1 = require_inquirer_providers(); + var ReflectorAliasProvider = { + provide: services_1.Reflector.name, + useExisting: services_1.Reflector + }; + var InternalCoreModule = InternalCoreModule_1 = class InternalCoreModule { + static register(providers) { + return { + module: InternalCoreModule_1, + providers: [...providers], + exports: [...providers.map((item) => item.provide)] + }; + } + }; + exports2.InternalCoreModule = InternalCoreModule; + exports2.InternalCoreModule = InternalCoreModule = InternalCoreModule_1 = tslib_1.__decorate([ + (0, common_12.Global)(), + (0, common_12.Module)({ + providers: [ + services_1.Reflector, + ReflectorAliasProvider, + request_providers_1.requestProvider, + inquirer_providers_1.inquirerProvider + ], + exports: [ + services_1.Reflector, + ReflectorAliasProvider, + request_providers_1.requestProvider, + inquirer_providers_1.inquirerProvider + ] + }) + ], InternalCoreModule); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/internal-providers-storage.js +var require_internal_providers_storage = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/internal-providers-storage.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InternalProvidersStorage = void 0; + var http_adapter_host_1 = require_http_adapter_host(); + var InternalProvidersStorage = class { + constructor() { + this._httpAdapterHost = new http_adapter_host_1.HttpAdapterHost(); + } + get httpAdapterHost() { + return this._httpAdapterHost; + } + get httpAdapter() { + return this._httpAdapter; + } + set httpAdapter(httpAdapter) { + this._httpAdapter = httpAdapter; + } + }; + exports2.InternalProvidersStorage = InternalProvidersStorage; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/module.js +var require_module = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/module.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Module = void 0; + var constants_1 = require_constants(); + var interfaces_1 = require_interfaces(); + var random_string_generator_util_1 = require_random_string_generator_util(); + var shared_utils_1 = require_shared_utils(); + var iterare_1 = require_lib(); + var application_config_1 = require_application_config(); + var exceptions_1 = require_exceptions3(); + var context_id_factory_1 = require_context_id_factory(); + var get_class_scope_1 = require_get_class_scope(); + var is_durable_1 = require_is_durable(); + var uuid_factory_1 = require_uuid_factory(); + var constants_2 = require_constants5(); + var instance_wrapper_1 = require_instance_wrapper(); + var module_ref_1 = require_module_ref(); + var Module = class { + constructor(_metatype, container) { + this._metatype = _metatype; + this.container = container; + this._imports = /* @__PURE__ */ new Set(); + this._providers = /* @__PURE__ */ new Map(); + this._injectables = /* @__PURE__ */ new Map(); + this._middlewares = /* @__PURE__ */ new Map(); + this._controllers = /* @__PURE__ */ new Map(); + this._entryProviderKeys = /* @__PURE__ */ new Set(); + this._exports = /* @__PURE__ */ new Set(); + this._distance = 0; + this._initOnPreview = false; + this._isGlobal = false; + this.addCoreProviders(); + this._id = this.generateUuid(); + } + get id() { + return this._id; + } + get token() { + return this._token; + } + set token(token) { + this._token = token; + } + get name() { + return this.metatype.name; + } + get isGlobal() { + return this._isGlobal; + } + set isGlobal(global2) { + this._isGlobal = global2; + } + get initOnPreview() { + return this._initOnPreview; + } + set initOnPreview(initOnPreview) { + this._initOnPreview = initOnPreview; + } + get providers() { + return this._providers; + } + get middlewares() { + return this._middlewares; + } + get imports() { + return this._imports; + } + get injectables() { + return this._injectables; + } + get controllers() { + return this._controllers; + } + get entryProviders() { + return Array.from(this._entryProviderKeys).map((token) => this.providers.get(token)); + } + get exports() { + return this._exports; + } + get instance() { + if (!this._providers.has(this._metatype)) { + throw new exceptions_1.RuntimeException(); + } + const module3 = this._providers.get(this._metatype); + return module3.instance; + } + get metatype() { + return this._metatype; + } + get distance() { + return this._distance; + } + set distance(value) { + this._distance = value; + } + addCoreProviders() { + this.addModuleAsProvider(); + this.addModuleRef(); + this.addApplicationConfig(); + } + addModuleRef() { + const moduleRef = this.createModuleReferenceType(); + this._providers.set(module_ref_1.ModuleRef, new instance_wrapper_1.InstanceWrapper({ + token: module_ref_1.ModuleRef, + name: module_ref_1.ModuleRef.name, + metatype: module_ref_1.ModuleRef, + isResolved: true, + instance: new moduleRef(), + host: this + })); + } + addModuleAsProvider() { + this._providers.set(this._metatype, new instance_wrapper_1.InstanceWrapper({ + token: this._metatype, + name: this._metatype.name, + metatype: this._metatype, + isResolved: false, + instance: null, + host: this + })); + } + addApplicationConfig() { + this._providers.set(application_config_1.ApplicationConfig, new instance_wrapper_1.InstanceWrapper({ + token: application_config_1.ApplicationConfig, + name: application_config_1.ApplicationConfig.name, + isResolved: true, + instance: this.container.applicationConfig, + host: this + })); + } + addInjectable(injectable, enhancerSubtype, host) { + if (this.isCustomProvider(injectable)) { + return this.addCustomProvider(injectable, this._injectables, enhancerSubtype); + } + let instanceWrapper = this.injectables.get(injectable); + if (!instanceWrapper) { + instanceWrapper = new instance_wrapper_1.InstanceWrapper({ + token: injectable, + name: injectable.name, + metatype: injectable, + instance: null, + isResolved: false, + scope: (0, get_class_scope_1.getClassScope)(injectable), + durable: (0, is_durable_1.isDurable)(injectable), + subtype: enhancerSubtype, + host: this + }); + this._injectables.set(injectable, instanceWrapper); + } + if (host) { + const hostWrapper = this._controllers.get(host) || this._providers.get(host); + hostWrapper && hostWrapper.addEnhancerMetadata(instanceWrapper); + } + return instanceWrapper; + } + addProvider(provider, enhancerSubtype) { + if (this.isCustomProvider(provider)) { + if (this.isEntryProvider(provider.provide)) { + this._entryProviderKeys.add(provider.provide); + } + return this.addCustomProvider(provider, this._providers, enhancerSubtype); + } + const isAlreadyDeclared = this._providers.has(provider); + if (this.isTransientProvider(provider) && isAlreadyDeclared) { + return provider; + } + this._providers.set(provider, new instance_wrapper_1.InstanceWrapper({ + token: provider, + name: provider.name, + metatype: provider, + instance: null, + isResolved: false, + scope: (0, get_class_scope_1.getClassScope)(provider), + durable: (0, is_durable_1.isDurable)(provider), + host: this + })); + if (this.isEntryProvider(provider)) { + this._entryProviderKeys.add(provider); + } + return provider; + } + isCustomProvider(provider) { + return !(0, shared_utils_1.isNil)(provider.provide); + } + addCustomProvider(provider, collection, enhancerSubtype) { + if (this.isCustomClass(provider)) { + this.addCustomClass(provider, collection, enhancerSubtype); + } else if (this.isCustomValue(provider)) { + this.addCustomValue(provider, collection, enhancerSubtype); + } else if (this.isCustomFactory(provider)) { + this.addCustomFactory(provider, collection, enhancerSubtype); + } else if (this.isCustomUseExisting(provider)) { + this.addCustomUseExisting(provider, collection, enhancerSubtype); + } + return provider.provide; + } + isCustomClass(provider) { + return !(0, shared_utils_1.isUndefined)(provider.useClass); + } + isCustomValue(provider) { + return (0, shared_utils_1.isObject)(provider) && Object.prototype.hasOwnProperty.call(provider, "useValue"); + } + isCustomFactory(provider) { + return !(0, shared_utils_1.isUndefined)(provider.useFactory); + } + isCustomUseExisting(provider) { + return !(0, shared_utils_1.isUndefined)(provider.useExisting); + } + isDynamicModule(exported) { + return exported && exported.module; + } + addCustomClass(provider, collection, enhancerSubtype) { + let { scope, durable } = provider; + const { useClass } = provider; + if ((0, shared_utils_1.isUndefined)(scope)) { + scope = (0, get_class_scope_1.getClassScope)(useClass); + } + if ((0, shared_utils_1.isUndefined)(durable)) { + durable = (0, is_durable_1.isDurable)(useClass); + } + const token = provider.provide; + collection.set(token, new instance_wrapper_1.InstanceWrapper({ + token, + name: useClass?.name || useClass, + metatype: useClass, + instance: null, + isResolved: false, + scope, + durable, + host: this, + subtype: enhancerSubtype + })); + } + addCustomValue(provider, collection, enhancerSubtype) { + const { useValue: value, provide: providerToken } = provider; + collection.set(providerToken, new instance_wrapper_1.InstanceWrapper({ + token: providerToken, + name: providerToken?.name || providerToken, + metatype: null, + instance: value, + isResolved: true, + async: value instanceof Promise, + host: this, + subtype: enhancerSubtype + })); + } + addCustomFactory(provider, collection, enhancerSubtype) { + const { useFactory: factory, inject, scope, durable, provide: providerToken } = provider; + collection.set(providerToken, new instance_wrapper_1.InstanceWrapper({ + token: providerToken, + name: providerToken?.name || providerToken, + metatype: factory, + instance: null, + isResolved: false, + inject: inject || [], + scope, + durable, + host: this, + subtype: enhancerSubtype + })); + } + addCustomUseExisting(provider, collection, enhancerSubtype) { + const { useExisting, provide: providerToken } = provider; + collection.set(providerToken, new instance_wrapper_1.InstanceWrapper({ + token: providerToken, + name: providerToken?.name || providerToken, + metatype: ((instance) => instance), + instance: null, + isResolved: false, + inject: [useExisting], + host: this, + isAlias: true, + subtype: enhancerSubtype + })); + } + addExportedProvider(provider) { + const addExportedUnit = (token) => this._exports.add(this.validateExportedProvider(token)); + if (this.isCustomProvider(provider)) { + return this.addCustomExportedProvider(provider); + } else if ((0, shared_utils_1.isString)(provider) || (0, shared_utils_1.isSymbol)(provider)) { + return addExportedUnit(provider); + } else if (this.isDynamicModule(provider)) { + const { module: moduleClassRef } = provider; + return addExportedUnit(moduleClassRef); + } + addExportedUnit(provider); + } + addCustomExportedProvider(provider) { + const provide = provider.provide; + if ((0, shared_utils_1.isString)(provide) || (0, shared_utils_1.isSymbol)(provide)) { + return this._exports.add(this.validateExportedProvider(provide)); + } + this._exports.add(this.validateExportedProvider(provide)); + } + validateExportedProvider(token) { + if (this._providers.has(token)) { + return token; + } + const imports = (0, iterare_1.iterate)(this._imports.values()).filter((item) => !!item).map(({ metatype }) => metatype).filter((metatype) => !!metatype).toArray(); + if (!imports.includes(token)) { + const { name } = this.metatype; + const providerName = (0, shared_utils_1.isFunction)(token) ? token.name : token; + throw new exceptions_1.UnknownExportException(providerName, name); + } + return token; + } + addController(controller) { + this._controllers.set(controller, new instance_wrapper_1.InstanceWrapper({ + token: controller, + name: controller.name, + metatype: controller, + instance: null, + isResolved: false, + scope: (0, get_class_scope_1.getClassScope)(controller), + durable: (0, is_durable_1.isDurable)(controller), + host: this + })); + this.assignControllerUniqueId(controller); + } + assignControllerUniqueId(controller) { + Object.defineProperty(controller, constants_2.CONTROLLER_ID_KEY, { + enumerable: false, + writable: false, + configurable: true, + value: (0, random_string_generator_util_1.randomStringGenerator)() + }); + } + addImport(moduleRef) { + this._imports.add(moduleRef); + } + /** + * @deprecated + */ + addRelatedModule(module3) { + this._imports.add(module3); + } + replace(toReplace, options) { + if (options.isProvider && this.hasProvider(toReplace)) { + const originalProvider = this._providers.get(toReplace); + return originalProvider.mergeWith({ provide: toReplace, ...options }); + } else if (!options.isProvider && this.hasInjectable(toReplace)) { + const originalInjectable = this._injectables.get(toReplace); + return originalInjectable.mergeWith({ + provide: toReplace, + ...options + }); + } + } + hasProvider(token) { + return this._providers.has(token); + } + hasInjectable(token) { + return this._injectables.has(token); + } + getProviderByKey(name) { + return this._providers.get(name); + } + getProviderById(id) { + return Array.from(this._providers.values()).find((item) => item.id === id); + } + getControllerById(id) { + return Array.from(this._controllers.values()).find((item) => item.id === id); + } + getInjectableById(id) { + return Array.from(this._injectables.values()).find((item) => item.id === id); + } + getMiddlewareById(id) { + return Array.from(this._middlewares.values()).find((item) => item.id === id); + } + getNonAliasProviders() { + return [...this._providers].filter(([_2, wrapper]) => !wrapper.isAlias); + } + createModuleReferenceType() { + const self2 = this; + return class extends module_ref_1.ModuleRef { + constructor() { + super(self2.container); + } + get(typeOrToken, options = {}) { + options.strict ??= true; + options.each ??= false; + return this.find(typeOrToken, options.strict ? { + moduleId: self2.id, + each: options.each + } : options); + } + resolve(typeOrToken, contextId = (0, context_id_factory_1.createContextId)(), options = {}) { + options.strict ??= true; + options.each ??= false; + return this.resolvePerContext(typeOrToken, self2, contextId, options); + } + async create(type, contextId) { + if (!(type && (0, shared_utils_1.isFunction)(type) && type.prototype)) { + throw new exceptions_1.InvalidClassException(type); + } + return this.instantiateClass(type, self2, contextId); + } + }; + } + isEntryProvider(metatype) { + return typeof metatype === "function" ? !!Reflect.getMetadata(constants_1.ENTRY_PROVIDER_WATERMARK, metatype) : false; + } + generateUuid() { + const prefix = "M_"; + const key = this.name?.toString() ?? this.token?.toString(); + return key ? uuid_factory_1.UuidFactory.get(`${prefix}_${key}`) : (0, random_string_generator_util_1.randomStringGenerator)(); + } + isTransientProvider(provider) { + return (0, get_class_scope_1.getClassScope)(provider) === interfaces_1.Scope.TRANSIENT; + } + }; + exports2.Module = Module; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/container.js +var require_container2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NestContainer = void 0; + var constants_1 = require_constants(); + var discoverable_meta_host_collection_1 = require_discoverable_meta_host_collection(); + var exceptions_1 = require_exceptions3(); + var initialize_on_preview_allowlist_1 = require_initialize_on_preview_allowlist(); + var serialized_graph_1 = require_serialized_graph(); + var request_constants_1 = require_request_constants(); + var compiler_1 = require_compiler(); + var internal_core_module_1 = require_internal_core_module(); + var internal_providers_storage_1 = require_internal_providers_storage(); + var module_1 = require_module(); + var module_token_factory_1 = require_module_token_factory(); + var modules_container_1 = require_modules_container(); + var NestContainer = class { + constructor(_applicationConfig = void 0) { + this._applicationConfig = _applicationConfig; + this.globalModules = /* @__PURE__ */ new Set(); + this.moduleTokenFactory = new module_token_factory_1.ModuleTokenFactory(); + this.moduleCompiler = new compiler_1.ModuleCompiler(this.moduleTokenFactory); + this.modules = new modules_container_1.ModulesContainer(); + this.dynamicModulesMetadata = /* @__PURE__ */ new Map(); + this.internalProvidersStorage = new internal_providers_storage_1.InternalProvidersStorage(); + this._serializedGraph = new serialized_graph_1.SerializedGraph(); + } + get serializedGraph() { + return this._serializedGraph; + } + get applicationConfig() { + return this._applicationConfig; + } + setHttpAdapter(httpAdapter) { + this.internalProvidersStorage.httpAdapter = httpAdapter; + if (!this.internalProvidersStorage.httpAdapterHost) { + return; + } + const host = this.internalProvidersStorage.httpAdapterHost; + host.httpAdapter = httpAdapter; + } + getHttpAdapterRef() { + return this.internalProvidersStorage.httpAdapter; + } + getHttpAdapterHostRef() { + return this.internalProvidersStorage.httpAdapterHost; + } + async addModule(metatype, scope) { + if (!metatype) { + throw new exceptions_1.UndefinedForwardRefException(scope); + } + const { type, dynamicMetadata, token } = await this.moduleCompiler.compile(metatype); + if (this.modules.has(token)) { + return { + moduleRef: this.modules.get(token), + inserted: true + }; + } + return { + moduleRef: await this.setModule({ + token, + type, + dynamicMetadata + }, scope), + inserted: true + }; + } + async replaceModule(metatypeToReplace, newMetatype, scope) { + if (!metatypeToReplace || !newMetatype) { + throw new exceptions_1.UndefinedForwardRefException(scope); + } + const { token } = await this.moduleCompiler.compile(metatypeToReplace); + const { type, dynamicMetadata } = await this.moduleCompiler.compile(newMetatype); + return { + moduleRef: await this.setModule({ + token, + type, + dynamicMetadata + }, scope), + inserted: false + }; + } + async setModule({ token, dynamicMetadata, type }, scope) { + const moduleRef = new module_1.Module(type, this); + moduleRef.token = token; + moduleRef.initOnPreview = this.shouldInitOnPreview(type); + this.modules.set(token, moduleRef); + const updatedScope = [].concat(scope, type); + await this.addDynamicMetadata(token, dynamicMetadata, updatedScope); + if (this.isGlobalModule(type, dynamicMetadata)) { + moduleRef.isGlobal = true; + this.addGlobalModule(moduleRef); + } + return moduleRef; + } + async addDynamicMetadata(token, dynamicModuleMetadata, scope) { + if (!dynamicModuleMetadata) { + return; + } + this.dynamicModulesMetadata.set(token, dynamicModuleMetadata); + const { imports } = dynamicModuleMetadata; + await this.addDynamicModules(imports, scope); + } + async addDynamicModules(modules, scope) { + if (!modules) { + return; + } + await Promise.all(modules.map((module3) => this.addModule(module3, scope))); + } + isGlobalModule(metatype, dynamicMetadata) { + if (dynamicMetadata && dynamicMetadata.global) { + return true; + } + return !!Reflect.getMetadata(constants_1.GLOBAL_MODULE_METADATA, metatype); + } + addGlobalModule(module3) { + this.globalModules.add(module3); + } + getModules() { + return this.modules; + } + getModuleCompiler() { + return this.moduleCompiler; + } + getModuleByKey(moduleKey) { + return this.modules.get(moduleKey); + } + getInternalCoreModuleRef() { + return this.internalCoreModule; + } + async addImport(relatedModule, token) { + if (!this.modules.has(token)) { + return; + } + const moduleRef = this.modules.get(token); + const { token: relatedModuleToken } = await this.moduleCompiler.compile(relatedModule); + const related = this.modules.get(relatedModuleToken); + moduleRef.addImport(related); + } + addProvider(provider, token, enhancerSubtype) { + const moduleRef = this.modules.get(token); + if (!provider) { + throw new exceptions_1.CircularDependencyException(moduleRef?.metatype.name); + } + if (!moduleRef) { + throw new exceptions_1.UnknownModuleException(); + } + const providerKey = moduleRef.addProvider(provider, enhancerSubtype); + const providerRef = moduleRef.getProviderByKey(providerKey); + discoverable_meta_host_collection_1.DiscoverableMetaHostCollection.inspectProvider(this.modules, providerRef); + return providerKey; + } + addInjectable(injectable, token, enhancerSubtype, host) { + if (!this.modules.has(token)) { + throw new exceptions_1.UnknownModuleException(); + } + const moduleRef = this.modules.get(token); + return moduleRef.addInjectable(injectable, enhancerSubtype, host); + } + addExportedProvider(provider, token) { + if (!this.modules.has(token)) { + throw new exceptions_1.UnknownModuleException(); + } + const moduleRef = this.modules.get(token); + moduleRef.addExportedProvider(provider); + } + addController(controller, token) { + if (!this.modules.has(token)) { + throw new exceptions_1.UnknownModuleException(); + } + const moduleRef = this.modules.get(token); + moduleRef.addController(controller); + const controllerRef = moduleRef.controllers.get(controller); + discoverable_meta_host_collection_1.DiscoverableMetaHostCollection.inspectController(this.modules, controllerRef); + } + clear() { + this.modules.clear(); + } + replace(toReplace, options) { + this.modules.forEach((moduleRef) => moduleRef.replace(toReplace, options)); + } + bindGlobalScope() { + this.modules.forEach((moduleRef) => this.bindGlobalsToImports(moduleRef)); + } + bindGlobalsToImports(moduleRef) { + this.globalModules.forEach((globalModule) => this.bindGlobalModuleToModule(moduleRef, globalModule)); + } + bindGlobalModuleToModule(target, globalModule) { + if (target === globalModule || target === this.internalCoreModule) { + return; + } + target.addImport(globalModule); + } + getDynamicMetadataByToken(token, metadataKey) { + const metadata = this.dynamicModulesMetadata.get(token); + return metadataKey ? metadata?.[metadataKey] ?? [] : metadata; + } + registerCoreModuleRef(moduleRef) { + this.internalCoreModule = moduleRef; + this.modules[internal_core_module_1.InternalCoreModule.name] = moduleRef; + } + getModuleTokenFactory() { + return this.moduleTokenFactory; + } + registerRequestProvider(request, contextId) { + const wrapper = this.internalCoreModule.getProviderByKey(request_constants_1.REQUEST); + wrapper.setInstanceByContextId(contextId, { + instance: request, + isResolved: true + }); + } + shouldInitOnPreview(type) { + return initialize_on_preview_allowlist_1.InitializeOnPreviewAllowlist.has(type); + } + }; + exports2.NestContainer = NestContainer; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/index.js +var require_injector2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_container2(), exports2); + tslib_1.__exportStar(require_inquirer(), exports2); + tslib_1.__exportStar(require_lazy_module_loader(), exports2); + tslib_1.__exportStar(require_module_ref(), exports2); + tslib_1.__exportStar(require_modules_container(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/inspector/partial-graph.host.js +var require_partial_graph_host = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/inspector/partial-graph.host.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PartialGraphHost = void 0; + var PartialGraphHost = class { + static toJSON() { + return this.partialGraph?.toJSON(); + } + static toString() { + return this.partialGraph?.toString(); + } + static register(partialGraph) { + this.partialGraph = partialGraph; + } + }; + exports2.PartialGraphHost = PartialGraphHost; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/inspector/graph-inspector.js +var require_graph_inspector = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/inspector/graph-inspector.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GraphInspector = void 0; + var unknown_dependencies_exception_1 = require_unknown_dependencies_exception(); + var deterministic_uuid_registry_1 = require_deterministic_uuid_registry(); + var partial_graph_host_1 = require_partial_graph_host(); + var GraphInspector = class { + constructor(container) { + this.container = container; + this.enhancersMetadataCache = new Array(); + this.graph = container.serializedGraph; + } + inspectModules(modules = this.container.getModules()) { + for (const moduleRef of modules.values()) { + this.insertModuleNode(moduleRef); + this.insertClassNodes(moduleRef); + this.insertModuleToModuleEdges(moduleRef); + } + this.enhancersMetadataCache.forEach((entry) => this.insertEnhancerEdge(entry)); + deterministic_uuid_registry_1.DeterministicUuidRegistry.clear(); + } + registerPartial(error) { + this.graph.status = "partial"; + if (error instanceof unknown_dependencies_exception_1.UnknownDependenciesException) { + this.graph.metadata = { + cause: { + type: "unknown-dependencies", + context: error.context, + moduleId: error.moduleRef?.id, + nodeId: error.metadata?.id + } + }; + } else { + this.graph.metadata = { + cause: { + type: "unknown", + error + } + }; + } + partial_graph_host_1.PartialGraphHost.register(this.graph); + } + inspectInstanceWrapper(source, moduleRef) { + const ctorMetadata = source.getCtorMetadata(); + ctorMetadata?.forEach((target, index) => this.insertClassToClassEdge(source, target, moduleRef, index, "constructor")); + const propertiesMetadata = source.getPropertiesMetadata(); + propertiesMetadata?.forEach(({ key, wrapper: target }) => this.insertClassToClassEdge(source, target, moduleRef, key, "property")); + } + insertEnhancerMetadataCache(entry) { + this.enhancersMetadataCache.push(entry); + } + insertOrphanedEnhancer(entry) { + this.graph.insertOrphanedEnhancer({ + ...entry, + ref: entry.ref?.constructor?.name ?? "Object" + }); + } + insertAttachedEnhancer(wrapper) { + const existingNode = this.graph.getNodeById(wrapper.id); + existingNode.metadata.global = true; + this.graph.insertAttachedEnhancer(existingNode.id); + } + insertEntrypointDefinition(definition, parentId) { + definition = { + ...definition, + id: `${definition.classNodeId}_${definition.methodName}` + }; + this.graph.insertEntrypoint(definition, parentId); + } + insertClassNode(moduleRef, wrapper, type) { + this.graph.insertNode({ + id: wrapper.id, + label: wrapper.name, + parent: moduleRef.id, + metadata: { + type, + internal: wrapper.metatype === moduleRef.metatype, + sourceModuleName: moduleRef.name, + durable: wrapper.isDependencyTreeDurable(), + static: wrapper.isDependencyTreeStatic(), + scope: wrapper.scope, + transient: wrapper.isTransient, + exported: moduleRef.exports.has(wrapper.token), + token: wrapper.token, + subtype: wrapper.subtype, + initTime: wrapper.initTime + } + }); + } + insertModuleNode(moduleRef) { + const dynamicMetadata = this.container.getDynamicMetadataByToken(moduleRef.token); + const node = { + id: moduleRef.id, + label: moduleRef.name, + metadata: { + type: "module", + global: moduleRef.isGlobal, + dynamic: !!dynamicMetadata, + internal: moduleRef.name === "InternalCoreModule" + } + }; + this.graph.insertNode(node); + } + insertModuleToModuleEdges(moduleRef) { + for (const targetModuleRef of moduleRef.imports) { + this.graph.insertEdge({ + source: moduleRef.id, + target: targetModuleRef.id, + metadata: { + type: "module-to-module", + sourceModuleName: moduleRef.name, + targetModuleName: targetModuleRef.name + } + }); + } + } + insertEnhancerEdge(entry) { + const moduleRef = this.container.getModuleByKey(entry.moduleToken); + const sourceInstanceWrapper = moduleRef.controllers.get(entry.classRef) ?? moduleRef.providers.get(entry.classRef); + const existingSourceNode = this.graph.getNodeById(sourceInstanceWrapper.id); + const enhancers = existingSourceNode.metadata.enhancers ?? []; + if (entry.enhancerInstanceWrapper) { + this.insertClassToClassEdge(sourceInstanceWrapper, entry.enhancerInstanceWrapper, moduleRef, void 0, "decorator"); + enhancers.push({ + id: entry.enhancerInstanceWrapper.id, + methodKey: entry.methodKey, + subtype: entry.subtype + }); + } else { + const name = entry.enhancerRef.constructor?.name ?? entry.enhancerRef.name; + enhancers.push({ + name, + methodKey: entry.methodKey, + subtype: entry.subtype + }); + } + existingSourceNode.metadata.enhancers = enhancers; + } + insertClassToClassEdge(source, target, moduleRef, keyOrIndex, injectionType) { + this.graph.insertEdge({ + source: source.id, + target: target.id, + metadata: { + type: "class-to-class", + sourceModuleName: moduleRef.name, + sourceClassName: source.name, + targetClassName: target.name, + sourceClassToken: source.token, + targetClassToken: target.token, + targetModuleName: target.host?.name, + keyOrIndex, + injectionType + } + }); + } + insertClassNodes(moduleRef) { + moduleRef.providers.forEach((value) => this.insertClassNode(moduleRef, value, "provider")); + moduleRef.injectables.forEach((value) => this.insertClassNode(moduleRef, value, "injectable")); + moduleRef.controllers.forEach((value) => this.insertClassNode(moduleRef, value, "controller")); + } + }; + exports2.GraphInspector = GraphInspector; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/inspector/index.js +var require_inspector = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/inspector/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_graph_inspector(), exports2); + tslib_1.__exportStar(require_initialize_on_preview_allowlist(), exports2); + tslib_1.__exportStar(require_partial_graph_host(), exports2); + tslib_1.__exportStar(require_serialized_graph(), exports2); + } +}); + +// ../../node_modules/.pnpm/path-to-regexp@3.3.0/node_modules/path-to-regexp/index.js +var require_path_to_regexp = __commonJS({ + "../../node_modules/.pnpm/path-to-regexp@3.3.0/node_modules/path-to-regexp/index.js"(exports2, module2) { + module2.exports = pathToRegexp; + module2.exports.match = match; + module2.exports.regexpToFunction = regexpToFunction; + module2.exports.parse = parse2; + module2.exports.compile = compile; + module2.exports.tokensToFunction = tokensToFunction; + module2.exports.tokensToRegExp = tokensToRegExp; + var DEFAULT_DELIMITER = "/"; + var PATH_REGEXP = new RegExp([ + // Match escaped characters that would otherwise appear in future matches. + // This allows the user to escape special characters that won't transform. + "(\\\\.)", + // Match Express-style parameters and un-named parameters with a prefix + // and optional suffixes. Matches appear as: + // + // ":test(\\d+)?" => ["test", "\d+", undefined, "?"] + // "(\\d+)" => [undefined, undefined, "\d+", undefined] + "(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?" + ].join("|"), "g"); + function parse2(str, options) { + var tokens = []; + var key = 0; + var index = 0; + var path = ""; + var defaultDelimiter = options && options.delimiter || DEFAULT_DELIMITER; + var whitelist = options && options.whitelist || void 0; + var pathEscaped = false; + var res; + while ((res = PATH_REGEXP.exec(str)) !== null) { + var m = res[0]; + var escaped = res[1]; + var offset = res.index; + path += str.slice(index, offset); + index = offset + m.length; + if (escaped) { + path += escaped[1]; + pathEscaped = true; + continue; + } + var prev = ""; + var name = res[2]; + var capture = res[3]; + var group = res[4]; + var modifier = res[5]; + if (!pathEscaped && path.length) { + var k = path.length - 1; + var c = path[k]; + var matches = whitelist ? whitelist.indexOf(c) > -1 : true; + if (matches) { + prev = c; + path = path.slice(0, k); + } + } + if (path) { + tokens.push(path); + path = ""; + pathEscaped = false; + } + var repeat = modifier === "+" || modifier === "*"; + var optional = modifier === "?" || modifier === "*"; + var pattern = capture || group; + var delimiter = prev || defaultDelimiter; + var prevText = prev || (typeof tokens[tokens.length - 1] === "string" ? tokens[tokens.length - 1] : ""); + tokens.push({ + name: name || key++, + prefix: prev, + delimiter, + optional, + repeat, + pattern: pattern ? escapeGroup(pattern) : restrictBacktrack(delimiter, defaultDelimiter, prevText) + }); + } + if (path || index < str.length) { + tokens.push(path + str.substr(index)); + } + return tokens; + } + function restrictBacktrack(delimiter, defaultDelimiter, prevText) { + var charGroup = "[^" + escapeString(delimiter === defaultDelimiter ? delimiter : delimiter + defaultDelimiter) + "]"; + if (!prevText || prevText.indexOf(delimiter) > -1 || prevText.indexOf(defaultDelimiter) > -1) { + return charGroup + "+?"; + } + return escapeString(prevText) + "|(?:(?!" + escapeString(prevText) + ")" + charGroup + ")+?"; + } + function compile(str, options) { + return tokensToFunction(parse2(str, options), options); + } + function match(str, options) { + var keys = []; + var re = pathToRegexp(str, keys, options); + return regexpToFunction(re, keys); + } + function regexpToFunction(re, keys) { + return function(pathname, options) { + var m = re.exec(pathname); + if (!m) return false; + var path = m[0]; + var index = m.index; + var params = {}; + var decode = options && options.decode || decodeURIComponent; + for (var i = 1; i < m.length; i++) { + if (m[i] === void 0) continue; + var key = keys[i - 1]; + if (key.repeat) { + params[key.name] = m[i].split(key.delimiter).map(function(value) { + return decode(value, key); + }); + } else { + params[key.name] = decode(m[i], key); + } + } + return { path, index, params }; + }; + } + function tokensToFunction(tokens, options) { + var matches = new Array(tokens.length); + for (var i = 0; i < tokens.length; i++) { + if (typeof tokens[i] === "object") { + matches[i] = new RegExp("^(?:" + tokens[i].pattern + ")$", flags(options)); + } + } + return function(data, options2) { + var path = ""; + var encode = options2 && options2.encode || encodeURIComponent; + var validate2 = options2 ? options2.validate !== false : true; + for (var i2 = 0; i2 < tokens.length; i2++) { + var token = tokens[i2]; + if (typeof token === "string") { + path += token; + continue; + } + var value = data ? data[token.name] : void 0; + var segment; + if (Array.isArray(value)) { + if (!token.repeat) { + throw new TypeError('Expected "' + token.name + '" to not repeat, but got array'); + } + if (value.length === 0) { + if (token.optional) continue; + throw new TypeError('Expected "' + token.name + '" to not be empty'); + } + for (var j = 0; j < value.length; j++) { + segment = encode(value[j], token); + if (validate2 && !matches[i2].test(segment)) { + throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '"'); + } + path += (j === 0 ? token.prefix : token.delimiter) + segment; + } + continue; + } + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + segment = encode(String(value), token); + if (validate2 && !matches[i2].test(segment)) { + throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but got "' + segment + '"'); + } + path += token.prefix + segment; + continue; + } + if (token.optional) continue; + throw new TypeError('Expected "' + token.name + '" to be ' + (token.repeat ? "an array" : "a string")); + } + return path; + }; + } + function escapeString(str) { + return str.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1"); + } + function escapeGroup(group) { + return group.replace(/([=!:$/()])/g, "\\$1"); + } + function flags(options) { + return options && options.sensitive ? "" : "i"; + } + function regexpToRegexp(path, keys) { + if (!keys) return path; + var groups = path.source.match(/\((?!\?)/g); + if (groups) { + for (var i = 0; i < groups.length; i++) { + keys.push({ + name: i, + prefix: null, + delimiter: null, + optional: false, + repeat: false, + pattern: null + }); + } + } + return path; + } + function arrayToRegexp(path, keys, options) { + var parts = []; + for (var i = 0; i < path.length; i++) { + parts.push(pathToRegexp(path[i], keys, options).source); + } + return new RegExp("(?:" + parts.join("|") + ")", flags(options)); + } + function stringToRegexp(path, keys, options) { + return tokensToRegExp(parse2(path, options), keys, options); + } + function tokensToRegExp(tokens, keys, options) { + options = options || {}; + var strict = options.strict; + var start = options.start !== false; + var end = options.end !== false; + var delimiter = options.delimiter || DEFAULT_DELIMITER; + var endsWith = [].concat(options.endsWith || []).map(escapeString).concat("$").join("|"); + var route = start ? "^" : ""; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + if (typeof token === "string") { + route += escapeString(token); + } else { + var capture = token.repeat ? "(?:" + token.pattern + ")(?:" + escapeString(token.delimiter) + "(?:" + token.pattern + "))*" : token.pattern; + if (keys) keys.push(token); + if (token.optional) { + if (!token.prefix) { + route += "(" + capture + ")?"; + } else { + route += "(?:" + escapeString(token.prefix) + "(" + capture + "))?"; + } + } else { + route += escapeString(token.prefix) + "(" + capture + ")"; + } + } + } + if (end) { + if (!strict) route += "(?:" + escapeString(delimiter) + ")?"; + route += endsWith === "$" ? "$" : "(?=" + endsWith + ")"; + } else { + var endToken = tokens[tokens.length - 1]; + var isEndDelimited = typeof endToken === "string" ? endToken[endToken.length - 1] === delimiter : endToken === void 0; + if (!strict) route += "(?:" + escapeString(delimiter) + "(?=" + endsWith + "))?"; + if (!isEndDelimited) route += "(?=" + escapeString(delimiter) + "|" + endsWith + ")"; + } + return new RegExp(route, flags(options)); + } + function pathToRegexp(path, keys, options) { + if (path instanceof RegExp) { + return regexpToRegexp(path, keys); + } + if (Array.isArray(path)) { + return arrayToRegexp( + /** @type {!Array} */ + path, + keys, + options + ); + } + return stringToRegexp( + /** @type {string} */ + path, + keys, + options + ); + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/utils/exclude-route.util.js +var require_exclude_route_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/utils/exclude-route.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isRequestMethodAll = void 0; + exports2.isRouteExcluded = isRouteExcluded; + var common_12 = require_common(); + var shared_utils_1 = require_shared_utils(); + var isRequestMethodAll = (method) => { + return common_12.RequestMethod.ALL === method || method === -1; + }; + exports2.isRequestMethodAll = isRequestMethodAll; + function isRouteExcluded(excludedRoutes, path, requestMethod) { + return excludedRoutes.some((route) => { + if ((0, exports2.isRequestMethodAll)(route.requestMethod) || route.requestMethod === requestMethod) { + return route.pathRegex.exec((0, shared_utils_1.addLeadingSlash)(path)); + } + return false; + }); + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/utils/flatten-route-paths.util.js +var require_flatten_route_paths_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/utils/flatten-route-paths.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.flattenRoutePaths = flattenRoutePaths; + var shared_utils_1 = require_shared_utils(); + function flattenRoutePaths(routes) { + const result = []; + routes.forEach((item) => { + if (item.module && item.path) { + result.push({ module: item.module, path: item.path }); + } + if (item.children) { + const childrenRef = item.children; + childrenRef.forEach((child) => { + if (!(0, shared_utils_1.isString)(child) && child.path) { + child.path = (0, shared_utils_1.normalizePath)((0, shared_utils_1.normalizePath)(item.path) + (0, shared_utils_1.normalizePath)(child.path)); + } else { + result.push({ path: item.path, module: child }); + } + }); + result.push(...flattenRoutePaths(childrenRef)); + } + }); + return result; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/utils/index.js +var require_utils8 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/utils/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_exclude_route_util(), exports2); + tslib_1.__exportStar(require_flatten_route_paths_util(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/middleware/utils.js +var require_utils9 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/middleware/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mapToClass = exports2.filterMiddleware = exports2.mapToExcludeRoute = void 0; + exports2.isMiddlewareClass = isMiddlewareClass; + exports2.assignToken = assignToken; + exports2.isMiddlewareRouteExcluded = isMiddlewareRouteExcluded; + var common_12 = require_common(); + var shared_utils_1 = require_shared_utils(); + var iterare_1 = require_lib(); + var pathToRegexp = require_path_to_regexp(); + var uid_1 = require_dist(); + var utils_1 = require_utils8(); + var mapToExcludeRoute = (routes) => { + return routes.map((route) => { + if ((0, shared_utils_1.isString)(route)) { + return { + path: route, + requestMethod: common_12.RequestMethod.ALL, + pathRegex: pathToRegexp((0, shared_utils_1.addLeadingSlash)(route)) + }; + } + return { + path: route.path, + requestMethod: route.method, + pathRegex: pathToRegexp((0, shared_utils_1.addLeadingSlash)(route.path)) + }; + }); + }; + exports2.mapToExcludeRoute = mapToExcludeRoute; + var filterMiddleware = (middleware, routes, httpAdapter) => { + const excludedRoutes = (0, exports2.mapToExcludeRoute)(routes); + return (0, iterare_1.iterate)([]).concat(middleware).filter(shared_utils_1.isFunction).map((item) => (0, exports2.mapToClass)(item, excludedRoutes, httpAdapter)).toArray(); + }; + exports2.filterMiddleware = filterMiddleware; + var mapToClass = (middleware, excludedRoutes, httpAdapter) => { + if (isMiddlewareClass(middleware)) { + if (excludedRoutes.length <= 0) { + return middleware; + } + const MiddlewareHost = class extends middleware { + use(...params) { + const [req, _2, next] = params; + const isExcluded = isMiddlewareRouteExcluded(req, excludedRoutes, httpAdapter); + if (isExcluded) { + return next(); + } + return super.use(...params); + } + }; + return assignToken(MiddlewareHost, middleware.name); + } + return assignToken(class { + constructor() { + this.use = (...params) => { + const [req, _2, next] = params; + const isExcluded = isMiddlewareRouteExcluded(req, excludedRoutes, httpAdapter); + if (isExcluded) { + return next(); + } + return middleware(...params); + }; + } + }); + }; + exports2.mapToClass = mapToClass; + function isMiddlewareClass(middleware) { + const middlewareStr = middleware.toString(); + if (middlewareStr.substring(0, 5) === "class") { + return true; + } + const middlewareArr = middlewareStr.split(" "); + return middlewareArr[0] === "function" && /[A-Z]/.test(middlewareArr[1]?.[0]) && (0, shared_utils_1.isFunction)(middleware.prototype?.use); + } + function assignToken(metatype, token = (0, uid_1.uid)(21)) { + Object.defineProperty(metatype, "name", { value: token }); + return metatype; + } + function isMiddlewareRouteExcluded(req, excludedRoutes, httpAdapter) { + if (excludedRoutes.length <= 0) { + return false; + } + const reqMethod = httpAdapter.getRequestMethod(req); + const originalUrl = httpAdapter.getRequestUrl(req); + const queryParamsIndex = originalUrl && originalUrl.indexOf("?"); + const pathname = queryParamsIndex >= 0 ? originalUrl.slice(0, queryParamsIndex) : originalUrl; + return (0, utils_1.isRouteExcluded)(excludedRoutes, pathname, common_12.RequestMethod[reqMethod]); + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/middleware/builder.js +var require_builder = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/middleware/builder.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MiddlewareBuilder = void 0; + var dependencies_decorator_1 = require_dependencies_decorator(); + var shared_utils_1 = require_shared_utils(); + var iterare_1 = require_lib(); + var utils_1 = require_utils9(); + var MiddlewareBuilder = class _MiddlewareBuilder { + constructor(routesMapper, httpAdapter, routeInfoPathExtractor) { + this.routesMapper = routesMapper; + this.httpAdapter = httpAdapter; + this.routeInfoPathExtractor = routeInfoPathExtractor; + this.middlewareCollection = /* @__PURE__ */ new Set(); + } + apply(...middleware) { + return new _MiddlewareBuilder.ConfigProxy(this, (0, dependencies_decorator_1.flatten)(middleware), this.routeInfoPathExtractor); + } + build() { + return [...this.middlewareCollection]; + } + getHttpAdapter() { + return this.httpAdapter; + } + }; + exports2.MiddlewareBuilder = MiddlewareBuilder; + MiddlewareBuilder.ConfigProxy = class { + constructor(builder, middleware, routeInfoPathExtractor) { + this.builder = builder; + this.middleware = middleware; + this.routeInfoPathExtractor = routeInfoPathExtractor; + this.excludedRoutes = []; + } + getExcludedRoutes() { + return this.excludedRoutes; + } + exclude(...routes) { + this.excludedRoutes = [ + ...this.excludedRoutes, + ...this.getRoutesFlatList(routes).reduce((excludedRoutes, route) => { + for (const routePath of this.routeInfoPathExtractor.extractPathFrom(route)) { + excludedRoutes.push({ + ...route, + path: routePath + }); + } + return excludedRoutes; + }, []) + ]; + return this; + } + forRoutes(...routes) { + const { middlewareCollection } = this.builder; + const flattedRoutes = this.getRoutesFlatList(routes); + const forRoutes = this.removeOverlappedRoutes(flattedRoutes); + const configuration = { + middleware: (0, utils_1.filterMiddleware)(this.middleware, this.excludedRoutes, this.builder.getHttpAdapter()), + forRoutes + }; + middlewareCollection.add(configuration); + return this.builder; + } + getRoutesFlatList(routes) { + const { routesMapper } = this.builder; + return (0, iterare_1.iterate)(routes).map((route) => routesMapper.mapRouteToRouteInfo(route)).flatten().toArray(); + } + removeOverlappedRoutes(routes) { + const regexMatchParams = /(:[^\/]*)/g; + const wildcard = "([^/]*)"; + const routesWithRegex = routes.filter((route) => route.path.includes(":")).map((route) => ({ + method: route.method, + path: route.path, + regex: new RegExp("^(" + route.path.replace(regexMatchParams, wildcard) + ")$", "g") + })); + return routes.filter((route) => { + const isOverlapped = (item) => { + if (route.method !== item.method) { + return false; + } + const normalizedRoutePath = (0, shared_utils_1.stripEndSlash)(route.path); + return normalizedRoutePath !== item.path && item.regex.test(normalizedRoutePath); + }; + const routeMatch = routesWithRegex.find(isOverlapped); + return routeMatch === void 0; + }); + } + }; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/middleware/index.js +var require_middleware2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/middleware/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_builder(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/optional-require.js +var require_optional_require = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/optional-require.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.optionalRequire = optionalRequire; + function optionalRequire(packageName, loaderFn) { + try { + return loaderFn ? loaderFn() : require(packageName); + } catch (e) { + return {}; + } + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/middleware/container.js +var require_container3 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/middleware/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MiddlewareContainer = void 0; + var get_class_scope_1 = require_get_class_scope(); + var is_durable_1 = require_is_durable(); + var instance_wrapper_1 = require_instance_wrapper(); + var MiddlewareContainer = class { + constructor(container) { + this.container = container; + this.middleware = /* @__PURE__ */ new Map(); + this.configurationSets = /* @__PURE__ */ new Map(); + } + getMiddlewareCollection(moduleKey) { + if (!this.middleware.has(moduleKey)) { + const moduleRef = this.container.getModuleByKey(moduleKey); + this.middleware.set(moduleKey, moduleRef.middlewares); + } + return this.middleware.get(moduleKey); + } + getConfigurations() { + return this.configurationSets; + } + insertConfig(configList, moduleKey) { + const middleware = this.getMiddlewareCollection(moduleKey); + const targetConfig = this.getTargetConfig(moduleKey); + const configurations = configList || []; + const insertMiddleware = (metatype) => { + const token = metatype; + middleware.set(token, new instance_wrapper_1.InstanceWrapper({ + scope: (0, get_class_scope_1.getClassScope)(metatype), + durable: (0, is_durable_1.isDurable)(metatype), + name: token?.name ?? token, + metatype, + token + })); + }; + configurations.forEach((config) => { + [].concat(config.middleware).map(insertMiddleware); + targetConfig.add(config); + }); + } + getTargetConfig(moduleName) { + if (!this.configurationSets.has(moduleName)) { + this.configurationSets.set(moduleName, /* @__PURE__ */ new Set()); + } + return this.configurationSets.get(moduleName); + } + }; + exports2.MiddlewareContainer = MiddlewareContainer; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/invalid-middleware.exception.js +var require_invalid_middleware_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/invalid-middleware.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InvalidMiddlewareException = void 0; + var messages_1 = require_messages(); + var runtime_exception_1 = require_runtime_exception(); + var InvalidMiddlewareException = class extends runtime_exception_1.RuntimeException { + constructor(name) { + super((0, messages_1.INVALID_MIDDLEWARE_MESSAGE)`${name}`); + } + }; + exports2.InvalidMiddlewareException = InvalidMiddlewareException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/exceptions/exceptions-handler.js +var require_exceptions_handler = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/exceptions/exceptions-handler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ExceptionsHandler = void 0; + var shared_utils_1 = require_shared_utils(); + var select_exception_filter_metadata_util_1 = require_select_exception_filter_metadata_util(); + var base_exception_filter_1 = require_base_exception_filter(); + var invalid_exception_filter_exception_1 = require_invalid_exception_filter_exception(); + var ExceptionsHandler = class extends base_exception_filter_1.BaseExceptionFilter { + constructor() { + super(...arguments); + this.filters = []; + } + next(exception, ctx) { + if (this.invokeCustomFilters(exception, ctx)) { + return; + } + super.catch(exception, ctx); + } + setCustomFilters(filters) { + if (!Array.isArray(filters)) { + throw new invalid_exception_filter_exception_1.InvalidExceptionFilterException(); + } + this.filters = filters; + } + invokeCustomFilters(exception, ctx) { + if ((0, shared_utils_1.isEmpty)(this.filters)) { + return false; + } + const filter = (0, select_exception_filter_metadata_util_1.selectExceptionFilterMetadata)(this.filters, exception); + filter && filter.func(exception, ctx); + return !!filter; + } + }; + exports2.ExceptionsHandler = ExceptionsHandler; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/router-exception-filters.js +var require_router_exception_filters = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/router-exception-filters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RouterExceptionFilters = void 0; + var constants_1 = require_constants(); + var shared_utils_1 = require_shared_utils(); + var base_exception_filter_context_1 = require_base_exception_filter_context(); + var exceptions_handler_1 = require_exceptions_handler(); + var constants_2 = require_constants5(); + var iterare_1 = require_lib(); + var RouterExceptionFilters = class extends base_exception_filter_context_1.BaseExceptionFilterContext { + constructor(container, config, applicationRef) { + super(container); + this.config = config; + this.applicationRef = applicationRef; + } + create(instance, callback, moduleKey, contextId = constants_2.STATIC_CONTEXT, inquirerId) { + this.moduleContext = moduleKey; + const exceptionHandler = new exceptions_handler_1.ExceptionsHandler(this.applicationRef); + const filters = this.createContext(instance, callback, constants_1.EXCEPTION_FILTERS_METADATA, contextId, inquirerId); + if ((0, shared_utils_1.isEmpty)(filters)) { + return exceptionHandler; + } + exceptionHandler.setCustomFilters(filters.reverse()); + return exceptionHandler; + } + getGlobalMetadata(contextId = constants_2.STATIC_CONTEXT, inquirerId) { + const globalFilters = this.config.getGlobalFilters(); + if (contextId === constants_2.STATIC_CONTEXT && !inquirerId) { + return globalFilters; + } + const scopedFilterWrappers = this.config.getGlobalRequestFilters(); + const scopedFilters = (0, iterare_1.iterate)(scopedFilterWrappers).map((wrapper) => wrapper.getInstanceByContextId(contextId, inquirerId)).filter((host) => !!host).map((host) => host.instance).toArray(); + return globalFilters.concat(scopedFilters); + } + }; + exports2.RouterExceptionFilters = RouterExceptionFilters; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/router-proxy.js +var require_router_proxy = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/router-proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RouterProxy = void 0; + var execution_context_host_1 = require_execution_context_host(); + var RouterProxy = class { + createProxy(targetCallback, exceptionsHandler) { + return async (req, res, next) => { + try { + await targetCallback(req, res, next); + } catch (e) { + const host = new execution_context_host_1.ExecutionContextHost([req, res, next]); + exceptionsHandler.next(e, host); + return res; + } + }; + } + createExceptionLayerProxy(targetCallback, exceptionsHandler) { + return async (err, req, res, next) => { + try { + await targetCallback(err, req, res, next); + } catch (e) { + const host = new execution_context_host_1.ExecutionContextHost([req, res, next]); + exceptionsHandler.next(e, host); + return res; + } + }; + } + }; + exports2.RouterProxy = RouterProxy; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/middleware/resolver.js +var require_resolver = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/middleware/resolver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MiddlewareResolver = void 0; + var MiddlewareResolver = class { + constructor(middlewareContainer, injector) { + this.middlewareContainer = middlewareContainer; + this.injector = injector; + } + async resolveInstances(moduleRef, moduleName) { + const middlewareMap = this.middlewareContainer.getMiddlewareCollection(moduleName); + const resolveInstance = async (wrapper) => this.resolveMiddlewareInstance(wrapper, middlewareMap, moduleRef); + await Promise.all([...middlewareMap.values()].map(resolveInstance)); + } + async resolveMiddlewareInstance(wrapper, middlewareMap, moduleRef) { + await this.injector.loadMiddleware(wrapper, middlewareMap, moduleRef); + } + }; + exports2.MiddlewareResolver = MiddlewareResolver; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/route-path-factory.js +var require_route_path_factory = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/route-path-factory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RoutePathFactory = void 0; + var common_12 = require_common(); + var shared_utils_1 = require_shared_utils(); + var utils_1 = require_utils8(); + var RoutePathFactory = class { + constructor(applicationConfig) { + this.applicationConfig = applicationConfig; + } + create(metadata, requestMethod) { + let paths = [""]; + const versionOrVersions = this.getVersion(metadata); + if (versionOrVersions && metadata.versioningOptions?.type === common_12.VersioningType.URI) { + const versionPrefix = this.getVersionPrefix(metadata.versioningOptions); + if (Array.isArray(versionOrVersions)) { + paths = (0, common_12.flatten)(paths.map((path) => versionOrVersions.map((version2) => ( + // Version Neutral - Do not include version in URL + version2 === common_12.VERSION_NEUTRAL ? path : `${path}/${versionPrefix}${version2}` + )))); + } else { + if (versionOrVersions !== common_12.VERSION_NEUTRAL) { + paths = paths.map((path) => `${path}/${versionPrefix}${versionOrVersions}`); + } + } + } + paths = this.appendToAllIfDefined(paths, metadata.modulePath); + paths = this.appendToAllIfDefined(paths, metadata.ctrlPath); + paths = this.appendToAllIfDefined(paths, metadata.methodPath); + if (metadata.globalPrefix) { + paths = paths.map((path) => { + if (this.isExcludedFromGlobalPrefix(path, requestMethod, versionOrVersions, metadata.versioningOptions)) { + return path; + } + return (0, shared_utils_1.stripEndSlash)(metadata.globalPrefix || "") + path; + }); + } + return paths.map((path) => (0, shared_utils_1.addLeadingSlash)(path || "/")).map((path) => path !== "/" ? (0, shared_utils_1.stripEndSlash)(path) : path); + } + getVersion(metadata) { + return metadata.methodVersion || metadata.controllerVersion; + } + getVersionPrefix(versioningOptions) { + const defaultPrefix = "v"; + if (versioningOptions.type === common_12.VersioningType.URI) { + if (versioningOptions.prefix === false) { + return ""; + } else if (versioningOptions.prefix !== void 0) { + return versioningOptions.prefix; + } + } + return defaultPrefix; + } + appendToAllIfDefined(paths, fragmentToAppend) { + if (!fragmentToAppend) { + return paths; + } + const concatPaths = (a, b) => (0, shared_utils_1.stripEndSlash)(a) + (0, shared_utils_1.addLeadingSlash)(b); + if (Array.isArray(fragmentToAppend)) { + const paths2dArray = paths.map((path) => fragmentToAppend.map((fragment) => concatPaths(path, fragment))); + return (0, common_12.flatten)(paths2dArray); + } + return paths.map((path) => concatPaths(path, fragmentToAppend)); + } + isExcludedFromGlobalPrefix(path, requestMethod, versionOrVersions, versioningOptions) { + if ((0, shared_utils_1.isUndefined)(requestMethod)) { + return false; + } + const options = this.applicationConfig.getGlobalPrefixOptions(); + const excludedRoutes = options.exclude; + if (versionOrVersions && versionOrVersions !== common_12.VERSION_NEUTRAL && versioningOptions?.type === common_12.VersioningType.URI) { + path = this.truncateVersionPrefixFromPath(path, versionOrVersions, versioningOptions); + } + return Array.isArray(excludedRoutes) && (0, utils_1.isRouteExcluded)(excludedRoutes, path, requestMethod); + } + truncateVersionPrefixFromPath(path, versionValue, versioningOptions) { + if (typeof versionValue !== "string") { + versionValue.forEach((version2) => { + if (typeof version2 === "string") { + path = this.truncateVersionPrefixFromPath(path, version2, versioningOptions); + } + }); + return path; + } + const prefix = `/${this.getVersionPrefix(versioningOptions)}${versionValue}`; + return path.startsWith(prefix) ? path.replace(prefix, "") : path; + } + }; + exports2.RoutePathFactory = RoutePathFactory; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/middleware/route-info-path-extractor.js +var require_route_info_path_extractor = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/middleware/route-info-path-extractor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RouteInfoPathExtractor = void 0; + var common_12 = require_common(); + var shared_utils_1 = require_shared_utils(); + var utils_1 = require_utils8(); + var route_path_factory_1 = require_route_path_factory(); + var RouteInfoPathExtractor = class { + constructor(applicationConfig) { + this.applicationConfig = applicationConfig; + this.routePathFactory = new route_path_factory_1.RoutePathFactory(applicationConfig); + this.prefixPath = (0, shared_utils_1.stripEndSlash)((0, shared_utils_1.addLeadingSlash)(this.applicationConfig.getGlobalPrefix())); + this.excludedGlobalPrefixRoutes = this.applicationConfig.getGlobalPrefixOptions().exclude; + this.versioningConfig = this.applicationConfig.getVersioning(); + } + extractPathsFrom({ path, method, version: version2 }) { + const versionPaths = this.extractVersionPathFrom(version2); + if (this.isAWildcard(path)) { + const entries = versionPaths.length > 0 ? versionPaths.map((versionPath) => [ + this.prefixPath + versionPath + "$", + this.prefixPath + versionPath + (0, shared_utils_1.addLeadingSlash)(path) + ]).flat() : this.prefixPath ? [this.prefixPath + "$", this.prefixPath + (0, shared_utils_1.addLeadingSlash)(path)] : [(0, shared_utils_1.addLeadingSlash)(path)]; + return Array.isArray(this.excludedGlobalPrefixRoutes) ? [ + ...entries, + ...this.excludedGlobalPrefixRoutes.map((route) => versionPaths + (0, shared_utils_1.addLeadingSlash)(route.path)) + ] : entries; + } + return this.extractNonWildcardPathsFrom({ path, method, version: version2 }); + } + extractPathFrom(route) { + if (this.isAWildcard(route.path) && !route.version) { + return [(0, shared_utils_1.addLeadingSlash)(route.path)]; + } + return this.extractNonWildcardPathsFrom(route); + } + isAWildcard(path) { + return ["*", "/*", "/*/", "(.*)", "/(.*)"].includes(path); + } + extractNonWildcardPathsFrom({ path, method, version: version2 }) { + const versionPaths = this.extractVersionPathFrom(version2); + if (Array.isArray(this.excludedGlobalPrefixRoutes) && (0, utils_1.isRouteExcluded)(this.excludedGlobalPrefixRoutes, path, method)) { + if (!versionPaths.length) { + return [(0, shared_utils_1.addLeadingSlash)(path)]; + } + return versionPaths.map((versionPath) => versionPath + (0, shared_utils_1.addLeadingSlash)(path)); + } + if (!versionPaths.length) { + return [this.prefixPath + (0, shared_utils_1.addLeadingSlash)(path)]; + } + return versionPaths.map((versionPath) => this.prefixPath + versionPath + (0, shared_utils_1.addLeadingSlash)(path)); + } + extractVersionPathFrom(versionValue) { + if (!versionValue || this.versioningConfig?.type !== common_12.VersioningType.URI) + return []; + const versionPrefix = this.routePathFactory.getVersionPrefix(this.versioningConfig); + if (Array.isArray(versionValue)) { + return versionValue.map((version2) => (0, shared_utils_1.addLeadingSlash)(versionPrefix + version2.toString())); + } + return [(0, shared_utils_1.addLeadingSlash)(versionPrefix + versionValue.toString())]; + } + }; + exports2.RouteInfoPathExtractor = RouteInfoPathExtractor; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/paths-explorer.js +var require_paths_explorer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/paths-explorer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathsExplorer = void 0; + var constants_1 = require_constants(); + var shared_utils_1 = require_shared_utils(); + var PathsExplorer = class { + constructor(metadataScanner) { + this.metadataScanner = metadataScanner; + } + scanForPaths(instance, prototype) { + const instancePrototype = (0, shared_utils_1.isUndefined)(prototype) ? Object.getPrototypeOf(instance) : prototype; + return this.metadataScanner.getAllMethodNames(instancePrototype).reduce((acc, method) => { + const route = this.exploreMethodMetadata(instance, instancePrototype, method); + if (route) { + acc.push(route); + } + return acc; + }, []); + } + exploreMethodMetadata(instance, prototype, methodName) { + const instanceCallback = instance[methodName]; + const prototypeCallback = prototype[methodName]; + const routePath = Reflect.getMetadata(constants_1.PATH_METADATA, prototypeCallback); + if ((0, shared_utils_1.isUndefined)(routePath)) { + return null; + } + const requestMethod = Reflect.getMetadata(constants_1.METHOD_METADATA, prototypeCallback); + const version2 = Reflect.getMetadata(constants_1.VERSION_METADATA, prototypeCallback); + const path = (0, shared_utils_1.isString)(routePath) ? [(0, shared_utils_1.addLeadingSlash)(routePath)] : routePath.map((p) => (0, shared_utils_1.addLeadingSlash)(p)); + return { + path, + requestMethod, + targetCallback: instanceCallback, + methodName, + version: version2 + }; + } + }; + exports2.PathsExplorer = PathsExplorer; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/router-module.js +var require_router_module = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/router-module.js"(exports2) { + "use strict"; + var RouterModule_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RouterModule = exports2.targetModulesByContainer = exports2.ROUTES = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var common_12 = require_common(); + var constants_1 = require_constants(); + var shared_utils_1 = require_shared_utils(); + var modules_container_1 = require_modules_container(); + var utils_1 = require_utils8(); + exports2.ROUTES = Symbol("ROUTES"); + exports2.targetModulesByContainer = /* @__PURE__ */ new WeakMap(); + var RouterModule = RouterModule_1 = class RouterModule { + constructor(modulesContainer, routes) { + this.modulesContainer = modulesContainer; + this.routes = routes; + this.routes = this.deepCloneRoutes(routes); + this.initialize(); + } + static register(routes) { + return { + module: RouterModule_1, + providers: [ + { + provide: exports2.ROUTES, + useValue: routes + } + ] + }; + } + deepCloneRoutes(routes) { + return routes.map((routeOrType) => { + if (typeof routeOrType === "function") { + return routeOrType; + } + if (routeOrType.children) { + return { + ...routeOrType, + children: this.deepCloneRoutes(routeOrType.children) + }; + } + return { ...routeOrType }; + }); + } + initialize() { + const flattenedRoutes = (0, utils_1.flattenRoutePaths)(this.routes); + flattenedRoutes.forEach((route) => { + const modulePath = (0, shared_utils_1.normalizePath)(route.path); + this.registerModulePathMetadata(route.module, modulePath); + this.updateTargetModulesCache(route.module); + }); + } + registerModulePathMetadata(moduleCtor, modulePath) { + Reflect.defineMetadata(constants_1.MODULE_PATH + this.modulesContainer.applicationId, modulePath, moduleCtor); + } + updateTargetModulesCache(moduleCtor) { + let moduleClassSet; + if (exports2.targetModulesByContainer.has(this.modulesContainer)) { + moduleClassSet = exports2.targetModulesByContainer.get(this.modulesContainer); + } else { + moduleClassSet = /* @__PURE__ */ new WeakSet(); + exports2.targetModulesByContainer.set(this.modulesContainer, moduleClassSet); + } + const moduleRef = Array.from(this.modulesContainer.values()).find((item) => item?.metatype === moduleCtor); + if (!moduleRef) { + return; + } + moduleClassSet.add(moduleRef); + } + }; + exports2.RouterModule = RouterModule; + exports2.RouterModule = RouterModule = RouterModule_1 = tslib_1.__decorate([ + (0, common_12.Module)({}), + tslib_1.__param(1, (0, common_12.Inject)(exports2.ROUTES)), + tslib_1.__metadata("design:paramtypes", [modules_container_1.ModulesContainer, Array]) + ], RouterModule); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/middleware/routes-mapper.js +var require_routes_mapper = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/middleware/routes-mapper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RoutesMapper = void 0; + var constants_1 = require_constants(); + var interfaces_1 = require_interfaces(); + var shared_utils_1 = require_shared_utils(); + var metadata_scanner_1 = require_metadata_scanner(); + var paths_explorer_1 = require_paths_explorer(); + var router_module_1 = require_router_module(); + var RoutesMapper = class { + constructor(container, applicationConfig) { + this.container = container; + this.applicationConfig = applicationConfig; + this.pathsExplorer = new paths_explorer_1.PathsExplorer(new metadata_scanner_1.MetadataScanner()); + } + mapRouteToRouteInfo(controllerOrRoute) { + if ((0, shared_utils_1.isString)(controllerOrRoute)) { + return this.getRouteInfoFromPath(controllerOrRoute); + } + const routePathOrPaths = this.getRoutePath(controllerOrRoute); + if (this.isRouteInfo(routePathOrPaths, controllerOrRoute)) { + return this.getRouteInfoFromObject(controllerOrRoute); + } + return this.getRouteInfoFromController(controllerOrRoute, routePathOrPaths); + } + getRouteInfoFromPath(routePath) { + const defaultRequestMethod = -1; + return [ + { + path: (0, shared_utils_1.addLeadingSlash)(routePath), + method: defaultRequestMethod + } + ]; + } + getRouteInfoFromObject(routeInfoObject) { + const routeInfo = { + path: (0, shared_utils_1.addLeadingSlash)(routeInfoObject.path), + method: routeInfoObject.method + }; + if (routeInfoObject.version) { + routeInfo.version = routeInfoObject.version; + } + return [routeInfo]; + } + getRouteInfoFromController(controller, routePath) { + const controllerPaths = this.pathsExplorer.scanForPaths(Object.create(controller), controller.prototype); + const controllerVersion = this.getVersionMetadata(controller); + const versioningConfig = this.applicationConfig.getVersioning(); + const moduleRef = this.getHostModuleOfController(controller); + const modulePath = this.getModulePath(moduleRef?.metatype); + const concatPaths = (acc, currentValue) => acc.concat(currentValue); + const toUndefinedIfNeural = (version2) => version2 === interfaces_1.VERSION_NEUTRAL ? void 0 : version2; + const toRouteInfo = (item, prefix) => item.path?.flatMap((p) => { + let endpointPath = modulePath ?? ""; + endpointPath += this.normalizeGlobalPath(prefix) + (0, shared_utils_1.addLeadingSlash)(p); + const routeInfo = { + path: endpointPath, + method: item.requestMethod + }; + const version2 = item.version ?? controllerVersion; + if (version2 && versioningConfig) { + if (typeof version2 !== "string" && Array.isArray(version2)) { + return version2.map((v) => ({ + ...routeInfo, + version: toUndefinedIfNeural(v) + })); + } + routeInfo.version = toUndefinedIfNeural(version2); + } + return routeInfo; + }); + return [].concat(routePath).map((routePath2) => controllerPaths.map((item) => toRouteInfo(item, routePath2)).reduce(concatPaths, [])).reduce(concatPaths, []); + } + isRouteInfo(path, objectOrClass) { + return (0, shared_utils_1.isUndefined)(path); + } + normalizeGlobalPath(path) { + const prefix = (0, shared_utils_1.addLeadingSlash)(path); + return prefix === "/" ? "" : prefix; + } + getRoutePath(route) { + return Reflect.getMetadata(constants_1.PATH_METADATA, route); + } + getHostModuleOfController(metatype) { + if (!metatype) { + return; + } + const modulesContainer = this.container.getModules(); + const moduleRefsSet = router_module_1.targetModulesByContainer.get(modulesContainer); + if (!moduleRefsSet) { + return; + } + const modules = Array.from(modulesContainer.values()).filter((moduleRef) => moduleRefsSet.has(moduleRef)); + return modules.find(({ controllers }) => controllers.has(metatype)); + } + getModulePath(metatype) { + if (!metatype) { + return; + } + const modulesContainer = this.container.getModules(); + const modulePath = Reflect.getMetadata(constants_1.MODULE_PATH + modulesContainer.applicationId, metatype); + return modulePath ?? Reflect.getMetadata(constants_1.MODULE_PATH, metatype); + } + getVersionMetadata(metatype) { + const versioningConfig = this.applicationConfig.getVersioning(); + if (versioningConfig) { + return Reflect.getMetadata(constants_1.VERSION_METADATA, metatype) ?? versioningConfig.defaultVersion; + } + } + }; + exports2.RoutesMapper = RoutesMapper; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/middleware/middleware-module.js +var require_middleware_module = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/middleware/middleware-module.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MiddlewareModule = void 0; + var common_12 = require_common(); + var request_method_enum_1 = require_request_method_enum(); + var shared_utils_1 = require_shared_utils(); + var invalid_middleware_exception_1 = require_invalid_middleware_exception(); + var runtime_exception_1 = require_runtime_exception(); + var context_id_factory_1 = require_context_id_factory(); + var execution_context_host_1 = require_execution_context_host(); + var constants_1 = require_constants5(); + var request_constants_1 = require_request_constants(); + var router_exception_filters_1 = require_router_exception_filters(); + var router_proxy_1 = require_router_proxy(); + var utils_1 = require_utils8(); + var builder_1 = require_builder(); + var resolver_1 = require_resolver(); + var route_info_path_extractor_1 = require_route_info_path_extractor(); + var routes_mapper_1 = require_routes_mapper(); + var MiddlewareModule = class _MiddlewareModule { + constructor() { + this.routerProxy = new router_proxy_1.RouterProxy(); + this.exceptionFiltersCache = /* @__PURE__ */ new WeakMap(); + this.logger = new common_12.Logger(_MiddlewareModule.name); + } + async register(middlewareContainer, container, config, injector, httpAdapter, graphInspector, options) { + this.appOptions = options; + const appRef = container.getHttpAdapterRef(); + this.routerExceptionFilter = new router_exception_filters_1.RouterExceptionFilters(container, config, appRef); + this.routesMapper = new routes_mapper_1.RoutesMapper(container, config); + this.resolver = new resolver_1.MiddlewareResolver(middlewareContainer, injector); + this.routeInfoPathExtractor = new route_info_path_extractor_1.RouteInfoPathExtractor(config); + this.injector = injector; + this.container = container; + this.httpAdapter = httpAdapter; + this.graphInspector = graphInspector; + const modules = container.getModules(); + await this.resolveMiddleware(middlewareContainer, modules); + } + async resolveMiddleware(middlewareContainer, modules) { + const moduleEntries = [...modules.entries()]; + const loadMiddlewareConfiguration = async ([moduleName, moduleRef]) => { + await this.loadConfiguration(middlewareContainer, moduleRef, moduleName); + await this.resolver.resolveInstances(moduleRef, moduleName); + }; + await Promise.all(moduleEntries.map(loadMiddlewareConfiguration)); + } + async loadConfiguration(middlewareContainer, moduleRef, moduleKey) { + const { instance } = moduleRef; + if (!instance.configure) { + return; + } + const middlewareBuilder = new builder_1.MiddlewareBuilder(this.routesMapper, this.httpAdapter, this.routeInfoPathExtractor); + try { + await instance.configure(middlewareBuilder); + } catch (err) { + if (!this.appOptions.preview) { + throw err; + } + const warningMessage = `Warning! "${moduleRef.name}" module exposes a "configure" method that throws an exception in the preview mode (possibly due to missing dependencies). Note: you can ignore this message, just be aware that some of those conditional middlewares will not be reflected in your graph.`; + this.logger.warn(warningMessage); + } + if (!(middlewareBuilder instanceof builder_1.MiddlewareBuilder)) { + return; + } + const config = middlewareBuilder.build(); + middlewareContainer.insertConfig(config, moduleKey); + } + async registerMiddleware(middlewareContainer, applicationRef) { + const configs = middlewareContainer.getConfigurations(); + const registerAllConfigs = async (moduleKey, middlewareConfig) => { + for (const config of middlewareConfig) { + await this.registerMiddlewareConfig(middlewareContainer, config, moduleKey, applicationRef); + } + }; + const entriesSortedByDistance = [...configs.entries()].sort(([moduleA], [moduleB]) => { + return this.container.getModuleByKey(moduleA).distance - this.container.getModuleByKey(moduleB).distance; + }); + for (const [moduleRef, moduleConfigurations] of entriesSortedByDistance) { + await registerAllConfigs(moduleRef, [...moduleConfigurations]); + } + } + async registerMiddlewareConfig(middlewareContainer, config, moduleKey, applicationRef) { + const { forRoutes } = config; + for (const routeInfo of forRoutes) { + await this.registerRouteMiddleware(middlewareContainer, routeInfo, config, moduleKey, applicationRef); + } + } + async registerRouteMiddleware(middlewareContainer, routeInfo, config, moduleKey, applicationRef) { + const middlewareCollection = [].concat(config.middleware); + const moduleRef = this.container.getModuleByKey(moduleKey); + for (const metatype of middlewareCollection) { + const collection = middlewareContainer.getMiddlewareCollection(moduleKey); + const instanceWrapper = collection.get(metatype); + if ((0, shared_utils_1.isUndefined)(instanceWrapper)) { + throw new runtime_exception_1.RuntimeException(); + } + if (instanceWrapper.isTransient) { + return; + } + this.graphInspector.insertClassNode(moduleRef, instanceWrapper, "middleware"); + const middlewareDefinition = { + type: "middleware", + methodName: "use", + className: instanceWrapper.name, + classNodeId: instanceWrapper.id, + metadata: { + key: routeInfo.path, + path: routeInfo.path, + requestMethod: request_method_enum_1.RequestMethod[routeInfo.method] ?? "ALL", + version: routeInfo.version + } + }; + this.graphInspector.insertEntrypointDefinition(middlewareDefinition, instanceWrapper.id); + await this.bindHandler(instanceWrapper, applicationRef, routeInfo, moduleRef, collection); + } + } + async bindHandler(wrapper, applicationRef, routeInfo, moduleRef, collection) { + const { instance, metatype } = wrapper; + if ((0, shared_utils_1.isUndefined)(instance?.use)) { + throw new invalid_middleware_exception_1.InvalidMiddlewareException(metatype.name); + } + const isStatic = wrapper.isDependencyTreeStatic(); + if (isStatic) { + const proxy = await this.createProxy(instance); + return this.registerHandler(applicationRef, routeInfo, proxy); + } + const isTreeDurable = wrapper.isDependencyTreeDurable(); + await this.registerHandler(applicationRef, routeInfo, async (req, res, next) => { + try { + const contextId = this.getContextId(req, isTreeDurable); + const contextInstance = await this.injector.loadPerContext(instance, moduleRef, collection, contextId); + const proxy = await this.createProxy(contextInstance, contextId); + return proxy(req, res, next); + } catch (err) { + let exceptionsHandler = this.exceptionFiltersCache.get(instance.use); + if (!exceptionsHandler) { + exceptionsHandler = this.routerExceptionFilter.create(instance, instance.use, void 0); + this.exceptionFiltersCache.set(instance.use, exceptionsHandler); + } + const host = new execution_context_host_1.ExecutionContextHost([req, res, next]); + exceptionsHandler.next(err, host); + } + }); + } + async createProxy(instance, contextId = constants_1.STATIC_CONTEXT) { + const exceptionsHandler = this.routerExceptionFilter.create(instance, instance.use, void 0, contextId); + const middleware = instance.use.bind(instance); + return this.routerProxy.createProxy(middleware, exceptionsHandler); + } + async registerHandler(applicationRef, routeInfo, proxy) { + const { method } = routeInfo; + const paths = this.routeInfoPathExtractor.extractPathsFrom(routeInfo); + const isMethodAll = (0, utils_1.isRequestMethodAll)(method); + const requestMethod = request_method_enum_1.RequestMethod[method]; + const router = await applicationRef.createMiddlewareFactory(method); + const middlewareFunction = isMethodAll ? proxy : (req, res, next) => { + if (applicationRef.getRequestMethod(req) === requestMethod) { + return proxy(req, res, next); + } + return next(); + }; + const pathsToApplyMiddleware = []; + paths.some((path) => path.match(/^\/?$/)) ? pathsToApplyMiddleware.push("/") : pathsToApplyMiddleware.push(...paths); + pathsToApplyMiddleware.forEach((path) => router(path, middlewareFunction)); + } + getContextId(request, isTreeDurable) { + const contextId = context_id_factory_1.ContextIdFactory.getByRequest(request); + if (!request[request_constants_1.REQUEST_CONTEXT_ID]) { + Object.defineProperty(request, request_constants_1.REQUEST_CONTEXT_ID, { + value: contextId, + enumerable: false, + writable: false, + configurable: false + }); + const requestProviderValue = isTreeDurable ? contextId.payload : Object.assign(request, contextId.payload); + this.container.registerRequestProvider(requestProviderValue, contextId); + } + return contextId; + } + }; + exports2.MiddlewareModule = MiddlewareModule; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/helpers/transient-instances.js +var require_transient_instances = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/helpers/transient-instances.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getTransientInstances = getTransientInstances; + exports2.getNonTransientInstances = getNonTransientInstances; + var iterare_1 = require_lib(); + function getTransientInstances(instances) { + return (0, iterare_1.iterate)(instances).filter(([_2, wrapper]) => wrapper.isDependencyTreeStatic()).map(([_2, wrapper]) => wrapper.getStaticTransientInstances()).flatten().filter((item) => !!item).map(({ instance }) => instance).toArray(); + } + function getNonTransientInstances(instances) { + return (0, iterare_1.iterate)(instances).filter(([key, wrapper]) => wrapper.isDependencyTreeStatic() && !wrapper.isTransient).map(([key, { instance }]) => instance).toArray(); + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/hooks/on-app-bootstrap.hook.js +var require_on_app_bootstrap_hook = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/hooks/on-app-bootstrap.hook.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.callModuleBootstrapHook = callModuleBootstrapHook; + var shared_utils_1 = require_shared_utils(); + var iterare_1 = require_lib(); + var transient_instances_1 = require_transient_instances(); + function hasOnAppBootstrapHook(instance) { + return (0, shared_utils_1.isFunction)(instance.onApplicationBootstrap); + } + function callOperator(instances) { + return (0, iterare_1.iterate)(instances).filter((instance) => !(0, shared_utils_1.isNil)(instance)).filter(hasOnAppBootstrapHook).map(async (instance) => instance.onApplicationBootstrap()).toArray(); + } + async function callModuleBootstrapHook(module3) { + const providers = module3.getNonAliasProviders(); + const [_2, moduleClassHost] = providers.shift(); + const instances = [ + ...module3.controllers, + ...providers, + ...module3.injectables, + ...module3.middlewares + ]; + const nonTransientInstances = (0, transient_instances_1.getNonTransientInstances)(instances); + await Promise.all(callOperator(nonTransientInstances)); + const transientInstances = (0, transient_instances_1.getTransientInstances)(instances); + await Promise.all(callOperator(transientInstances)); + const moduleClassInstance = moduleClassHost.instance; + if (moduleClassInstance && hasOnAppBootstrapHook(moduleClassInstance) && moduleClassHost.isDependencyTreeStatic()) { + await moduleClassInstance.onApplicationBootstrap(); + } + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/hooks/on-app-shutdown.hook.js +var require_on_app_shutdown_hook = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/hooks/on-app-shutdown.hook.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.callAppShutdownHook = callAppShutdownHook; + var shared_utils_1 = require_shared_utils(); + var iterare_1 = require_lib(); + var transient_instances_1 = require_transient_instances(); + function hasOnAppShutdownHook(instance) { + return (0, shared_utils_1.isFunction)(instance.onApplicationShutdown); + } + function callOperator(instances, signal) { + return (0, iterare_1.iterate)(instances).filter((instance) => !(0, shared_utils_1.isNil)(instance)).filter(hasOnAppShutdownHook).map(async (instance) => instance.onApplicationShutdown(signal)).toArray(); + } + async function callAppShutdownHook(module3, signal) { + const providers = module3.getNonAliasProviders(); + const [_2, moduleClassHost] = providers.shift(); + const instances = [ + ...module3.controllers, + ...providers, + ...module3.injectables, + ...module3.middlewares + ]; + const nonTransientInstances = (0, transient_instances_1.getNonTransientInstances)(instances); + await Promise.all(callOperator(nonTransientInstances, signal)); + const transientInstances = (0, transient_instances_1.getTransientInstances)(instances); + await Promise.all(callOperator(transientInstances, signal)); + const moduleClassInstance = moduleClassHost.instance; + if (moduleClassInstance && hasOnAppShutdownHook(moduleClassInstance) && moduleClassHost.isDependencyTreeStatic()) { + await moduleClassInstance.onApplicationShutdown(signal); + } + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/hooks/on-module-destroy.hook.js +var require_on_module_destroy_hook = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/hooks/on-module-destroy.hook.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.callModuleDestroyHook = callModuleDestroyHook; + var shared_utils_1 = require_shared_utils(); + var iterare_1 = require_lib(); + var transient_instances_1 = require_transient_instances(); + function hasOnModuleDestroyHook(instance) { + return (0, shared_utils_1.isFunction)(instance.onModuleDestroy); + } + function callOperator(instances) { + return (0, iterare_1.iterate)(instances).filter((instance) => !(0, shared_utils_1.isNil)(instance)).filter(hasOnModuleDestroyHook).map(async (instance) => instance.onModuleDestroy()).toArray(); + } + async function callModuleDestroyHook(module3) { + const providers = module3.getNonAliasProviders(); + const [_2, moduleClassHost] = providers.shift(); + const instances = [ + ...module3.controllers, + ...providers, + ...module3.injectables, + ...module3.middlewares + ]; + const nonTransientInstances = (0, transient_instances_1.getNonTransientInstances)(instances); + await Promise.all(callOperator(nonTransientInstances)); + const transientInstances = (0, transient_instances_1.getTransientInstances)(instances); + await Promise.all(callOperator(transientInstances)); + const moduleClassInstance = moduleClassHost.instance; + if (moduleClassInstance && hasOnModuleDestroyHook(moduleClassInstance) && moduleClassHost.isDependencyTreeStatic()) { + await moduleClassInstance.onModuleDestroy(); + } + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/hooks/on-module-init.hook.js +var require_on_module_init_hook = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/hooks/on-module-init.hook.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.callModuleInitHook = callModuleInitHook; + var shared_utils_1 = require_shared_utils(); + var iterare_1 = require_lib(); + var transient_instances_1 = require_transient_instances(); + function hasOnModuleInitHook(instance) { + return (0, shared_utils_1.isFunction)(instance.onModuleInit); + } + function callOperator(instances) { + return (0, iterare_1.iterate)(instances).filter((instance) => !(0, shared_utils_1.isNil)(instance)).filter(hasOnModuleInitHook).map(async (instance) => instance.onModuleInit()).toArray(); + } + async function callModuleInitHook(module3) { + const providers = module3.getNonAliasProviders(); + const [_2, moduleClassHost] = providers.shift(); + const instances = [ + ...module3.controllers, + ...providers, + ...module3.injectables, + ...module3.middlewares + ]; + const nonTransientInstances = (0, transient_instances_1.getNonTransientInstances)(instances); + await Promise.all(callOperator(nonTransientInstances)); + const transientInstances = (0, transient_instances_1.getTransientInstances)(instances); + await Promise.all(callOperator(transientInstances)); + const moduleClassInstance = moduleClassHost.instance; + if (moduleClassInstance && hasOnModuleInitHook(moduleClassInstance) && moduleClassHost.isDependencyTreeStatic()) { + await moduleClassInstance.onModuleInit(); + } + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/hooks/before-app-shutdown.hook.js +var require_before_app_shutdown_hook = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/hooks/before-app-shutdown.hook.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.callBeforeAppShutdownHook = callBeforeAppShutdownHook; + var shared_utils_1 = require_shared_utils(); + var iterare_1 = require_lib(); + var transient_instances_1 = require_transient_instances(); + function hasBeforeApplicationShutdownHook(instance) { + return (0, shared_utils_1.isFunction)(instance.beforeApplicationShutdown); + } + function callOperator(instances, signal) { + return (0, iterare_1.iterate)(instances).filter((instance) => !(0, shared_utils_1.isNil)(instance)).filter(hasBeforeApplicationShutdownHook).map(async (instance) => instance.beforeApplicationShutdown(signal)).toArray(); + } + async function callBeforeAppShutdownHook(module3, signal) { + const providers = module3.getNonAliasProviders(); + const [_2, moduleClassHost] = providers.shift(); + const instances = [ + ...module3.controllers, + ...providers, + ...module3.injectables, + ...module3.middlewares + ]; + const nonTransientInstances = (0, transient_instances_1.getNonTransientInstances)(instances); + await Promise.all(callOperator(nonTransientInstances, signal)); + const transientInstances = (0, transient_instances_1.getTransientInstances)(instances); + await Promise.all(callOperator(transientInstances, signal)); + const moduleClassInstance = moduleClassHost.instance; + if (moduleClassInstance && hasBeforeApplicationShutdownHook(moduleClassInstance) && moduleClassHost.isDependencyTreeStatic()) { + await moduleClassInstance.beforeApplicationShutdown(signal); + } + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/hooks/index.js +var require_hooks2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/hooks/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_on_app_bootstrap_hook(), exports2); + tslib_1.__exportStar(require_on_app_shutdown_hook(), exports2); + tslib_1.__exportStar(require_on_module_destroy_hook(), exports2); + tslib_1.__exportStar(require_on_module_init_hook(), exports2); + tslib_1.__exportStar(require_before_app_shutdown_hook(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/nest-application-context.js +var require_nest_application_context = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/nest-application-context.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NestApplicationContext = void 0; + var common_12 = require_common(); + var shared_utils_1 = require_shared_utils(); + var iterare_1 = require_lib(); + var constants_1 = require_constants4(); + var exceptions_1 = require_exceptions3(); + var context_id_factory_1 = require_context_id_factory(); + var hooks_1 = require_hooks2(); + var abstract_instance_resolver_1 = require_abstract_instance_resolver(); + var compiler_1 = require_compiler(); + var injector_1 = require_injector(); + var instance_links_host_1 = require_instance_links_host(); + var NestApplicationContext = class _NestApplicationContext extends abstract_instance_resolver_1.AbstractInstanceResolver { + get instanceLinksHost() { + if (!this._instanceLinksHost) { + this._instanceLinksHost = new instance_links_host_1.InstanceLinksHost(this.container); + } + return this._instanceLinksHost; + } + constructor(container, appOptions = {}, contextModule = null, scope = new Array()) { + super(); + this.container = container; + this.appOptions = appOptions; + this.contextModule = contextModule; + this.scope = scope; + this.isInitialized = false; + this.logger = new common_12.Logger(_NestApplicationContext.name, { + timestamp: true + }); + this.shouldFlushLogsOnOverride = false; + this.activeShutdownSignals = new Array(); + this.moduleCompiler = new compiler_1.ModuleCompiler(); + this.injector = new injector_1.Injector(); + if (this.appOptions.preview) { + this.printInPreviewModeWarning(); + } + } + selectContextModule() { + const modules = this.container.getModules().values(); + this.contextModule = modules.next().value; + } + /** + * Allows navigating through the modules tree, for example, to pull out a specific instance from the selected module. + * @returns {INestApplicationContext} + */ + select(moduleType) { + const modulesContainer = this.container.getModules(); + const contextModuleCtor = this.contextModule.metatype; + const scope = this.scope.concat(contextModuleCtor); + const moduleTokenFactory = this.container.getModuleTokenFactory(); + const { type, dynamicMetadata } = this.moduleCompiler.extractMetadata(moduleType); + const token = moduleTokenFactory.create(type, dynamicMetadata); + const selectedModule = modulesContainer.get(token); + if (!selectedModule) { + throw new exceptions_1.UnknownModuleException(type.name); + } + return new _NestApplicationContext(this.container, this.appOptions, selectedModule, scope); + } + /** + * Retrieves an instance (or a list of instances) of either injectable or controller, otherwise, throws exception. + * @returns {TResult | Array} + */ + get(typeOrToken, options = { strict: false }) { + return !(options && options.strict) ? this.find(typeOrToken, options) : this.find(typeOrToken, { + moduleId: this.contextModule?.id, + each: options.each + }); + } + /** + * Resolves transient or request-scoped instance (or a list of instances) of either injectable or controller, otherwise, throws exception. + * @returns {Promise>} + */ + resolve(typeOrToken, contextId = (0, context_id_factory_1.createContextId)(), options = { strict: false }) { + return this.resolvePerContext(typeOrToken, this.contextModule, contextId, options); + } + /** + * Registers the request/context object for a given context ID (DI container sub-tree). + * @returns {void} + */ + registerRequestByContextId(request, contextId) { + this.container.registerRequestProvider(request, contextId); + } + /** + * Initializes the Nest application. + * Calls the Nest lifecycle events. + * + * @returns {Promise} The NestApplicationContext instance as Promise + */ + async init() { + if (this.isInitialized) { + return this; + } + this.initializationPromise = new Promise(async (resolve, reject) => { + try { + await this.callInitHook(); + await this.callBootstrapHook(); + resolve(); + } catch (err) { + reject(err); + } + }); + await this.initializationPromise; + this.isInitialized = true; + return this; + } + /** + * Terminates the application + * @returns {Promise} + */ + async close(signal) { + await this.initializationPromise; + await this.callDestroyHook(); + await this.callBeforeShutdownHook(signal); + await this.dispose(); + await this.callShutdownHook(signal); + this.unsubscribeFromProcessSignals(); + } + /** + * Sets custom logger service. + * Flushes buffered logs if auto flush is on. + * @returns {void} + */ + useLogger(logger) { + common_12.Logger.overrideLogger(logger); + if (this.shouldFlushLogsOnOverride) { + this.flushLogs(); + } + } + /** + * Prints buffered logs and detaches buffer. + * @returns {void} + */ + flushLogs() { + common_12.Logger.flush(); + } + /** + * Define that it must flush logs right after defining a custom logger. + */ + flushLogsOnOverride() { + this.shouldFlushLogsOnOverride = true; + } + /** + * Enables the usage of shutdown hooks. Will call the + * `onApplicationShutdown` function of a provider if the + * process receives a shutdown signal. + * + * @param {ShutdownSignal[]} [signals=[]] The system signals it should listen to + * + * @returns {this} The Nest application context instance + */ + enableShutdownHooks(signals = []) { + if ((0, shared_utils_1.isEmpty)(signals)) { + signals = Object.keys(common_12.ShutdownSignal).map((key) => common_12.ShutdownSignal[key]); + } else { + signals = Array.from(new Set(signals)); + } + signals = (0, iterare_1.iterate)(signals).map((signal) => signal.toString().toUpperCase().trim()).filter((signal) => !this.activeShutdownSignals.includes(signal)).toArray(); + this.listenToShutdownSignals(signals); + return this; + } + async dispose() { + return Promise.resolve(); + } + /** + * Listens to shutdown signals by listening to + * process events + * + * @param {string[]} signals The system signals it should listen to + */ + listenToShutdownSignals(signals) { + let receivedSignal = false; + const cleanup = async (signal) => { + try { + if (receivedSignal) { + return; + } + receivedSignal = true; + await this.initializationPromise; + await this.callDestroyHook(); + await this.callBeforeShutdownHook(signal); + await this.dispose(); + await this.callShutdownHook(signal); + signals.forEach((sig) => process.removeListener(sig, cleanup)); + process.kill(process.pid, signal); + } catch (err) { + common_12.Logger.error(constants_1.MESSAGES.ERROR_DURING_SHUTDOWN, err?.stack, _NestApplicationContext.name); + process.exit(1); + } + }; + this.shutdownCleanupRef = cleanup; + signals.forEach((signal) => { + this.activeShutdownSignals.push(signal); + process.on(signal, cleanup); + }); + } + /** + * Unsubscribes from shutdown signals (process events) + */ + unsubscribeFromProcessSignals() { + if (!this.shutdownCleanupRef) { + return; + } + this.activeShutdownSignals.forEach((signal) => { + process.removeListener(signal, this.shutdownCleanupRef); + }); + } + /** + * Calls the `onModuleInit` function on the registered + * modules and its children. + */ + async callInitHook() { + const modulesSortedByDistance = this.getModulesToTriggerHooksOn(); + for (const module3 of modulesSortedByDistance) { + await (0, hooks_1.callModuleInitHook)(module3); + } + } + /** + * Calls the `onModuleDestroy` function on the registered + * modules and its children. + */ + async callDestroyHook() { + const modulesSortedByDistance = this.getModulesToTriggerHooksOn(); + for (const module3 of modulesSortedByDistance) { + await (0, hooks_1.callModuleDestroyHook)(module3); + } + } + /** + * Calls the `onApplicationBootstrap` function on the registered + * modules and its children. + */ + async callBootstrapHook() { + const modulesSortedByDistance = this.getModulesToTriggerHooksOn(); + for (const module3 of modulesSortedByDistance) { + await (0, hooks_1.callModuleBootstrapHook)(module3); + } + } + /** + * Calls the `onApplicationShutdown` function on the registered + * modules and children. + */ + async callShutdownHook(signal) { + const modulesSortedByDistance = this.getModulesToTriggerHooksOn(); + for (const module3 of modulesSortedByDistance) { + await (0, hooks_1.callAppShutdownHook)(module3, signal); + } + } + /** + * Calls the `beforeApplicationShutdown` function on the registered + * modules and children. + */ + async callBeforeShutdownHook(signal) { + const modulesSortedByDistance = this.getModulesToTriggerHooksOn(); + for (const module3 of modulesSortedByDistance) { + await (0, hooks_1.callBeforeAppShutdownHook)(module3, signal); + } + } + assertNotInPreviewMode(methodName) { + if (this.appOptions.preview) { + const error = `Calling the "${methodName}" in the preview mode is not supported.`; + this.logger.error(error); + throw new Error(error); + } + } + getModulesToTriggerHooksOn() { + if (this._moduleRefsForHooksByDistance) { + return this._moduleRefsForHooksByDistance; + } + const modulesContainer = this.container.getModules(); + const compareFn = (a, b) => b.distance - a.distance; + const modulesSortedByDistance = Array.from(modulesContainer.values()).sort(compareFn); + this._moduleRefsForHooksByDistance = this.appOptions?.preview ? modulesSortedByDistance.filter((moduleRef) => moduleRef.initOnPreview) : modulesSortedByDistance; + return this._moduleRefsForHooksByDistance; + } + printInPreviewModeWarning() { + this.logger.warn("------------------------------------------------"); + this.logger.warn("Application is running in the PREVIEW mode!"); + this.logger.warn("Providers/controllers will not be instantiated."); + this.logger.warn("------------------------------------------------"); + } + }; + exports2.NestApplicationContext = NestApplicationContext; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/messages.js +var require_messages2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/messages.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.INVALID_EXECUTION_CONTEXT = exports2.VERSIONED_CONTROLLER_MAPPING_MESSAGE = exports2.CONTROLLER_MAPPING_MESSAGE = exports2.VERSIONED_ROUTE_MAPPED_MESSAGE = exports2.ROUTE_MAPPED_MESSAGE = exports2.MODULE_INIT_MESSAGE = void 0; + var request_method_enum_1 = require_request_method_enum(); + var version_options_interface_1 = require_version_options_interface(); + var MODULE_INIT_MESSAGE = (text, module3) => `${module3} dependencies initialized`; + exports2.MODULE_INIT_MESSAGE = MODULE_INIT_MESSAGE; + var ROUTE_MAPPED_MESSAGE = (path, method) => `Mapped {${path}, ${request_method_enum_1.RequestMethod[method]}} route`; + exports2.ROUTE_MAPPED_MESSAGE = ROUTE_MAPPED_MESSAGE; + var VERSIONED_ROUTE_MAPPED_MESSAGE = (path, method, version2) => { + const controllerVersions = Array.isArray(version2) ? version2 : [version2]; + const versions = controllerVersions.map((version3) => version3 === version_options_interface_1.VERSION_NEUTRAL ? "Neutral" : version3).join(","); + return `Mapped {${path}, ${request_method_enum_1.RequestMethod[method]}} (version: ${versions}) route`; + }; + exports2.VERSIONED_ROUTE_MAPPED_MESSAGE = VERSIONED_ROUTE_MAPPED_MESSAGE; + var CONTROLLER_MAPPING_MESSAGE = (name, path) => `${name} {${path}}:`; + exports2.CONTROLLER_MAPPING_MESSAGE = CONTROLLER_MAPPING_MESSAGE; + var VERSIONED_CONTROLLER_MAPPING_MESSAGE = (name, path, version2) => { + const controllerVersions = Array.isArray(version2) ? version2 : [version2]; + const versions = controllerVersions.map((version3) => version3 === version_options_interface_1.VERSION_NEUTRAL ? "Neutral" : version3).join(","); + return `${name} {${path}} (version: ${versions}):`; + }; + exports2.VERSIONED_CONTROLLER_MAPPING_MESSAGE = VERSIONED_CONTROLLER_MAPPING_MESSAGE; + var INVALID_EXECUTION_CONTEXT = (methodName, currentContext) => `Calling ${methodName} is not allowed in this context. Your current execution context is "${currentContext}".`; + exports2.INVALID_EXECUTION_CONTEXT = INVALID_EXECUTION_CONTEXT; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/unknown-request-mapping.exception.js +var require_unknown_request_mapping_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/unknown-request-mapping.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnknownRequestMappingException = void 0; + var runtime_exception_1 = require_runtime_exception(); + var messages_1 = require_messages(); + var UnknownRequestMappingException = class extends runtime_exception_1.RuntimeException { + constructor(metatype) { + super((0, messages_1.UNKNOWN_REQUEST_MAPPING)(metatype)); + } + }; + exports2.UnknownRequestMappingException = UnknownRequestMappingException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/router-method-factory.js +var require_router_method_factory = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/router-method-factory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RouterMethodFactory = void 0; + var request_method_enum_1 = require_request_method_enum(); + var REQUEST_METHOD_MAP = { + [request_method_enum_1.RequestMethod.GET]: "get", + [request_method_enum_1.RequestMethod.POST]: "post", + [request_method_enum_1.RequestMethod.PUT]: "put", + [request_method_enum_1.RequestMethod.DELETE]: "delete", + [request_method_enum_1.RequestMethod.PATCH]: "patch", + [request_method_enum_1.RequestMethod.ALL]: "all", + [request_method_enum_1.RequestMethod.OPTIONS]: "options", + [request_method_enum_1.RequestMethod.HEAD]: "head", + [request_method_enum_1.RequestMethod.SEARCH]: "search" + }; + var RouterMethodFactory = class { + get(target, requestMethod) { + const methodName = REQUEST_METHOD_MAP[requestMethod]; + const method = target[methodName]; + if (!method) { + return target.use; + } + return method; + } + }; + exports2.RouterMethodFactory = RouterMethodFactory; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/route-params-factory.js +var require_route_params_factory = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/route-params-factory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RouteParamsFactory = void 0; + var route_paramtypes_enum_1 = require_route_paramtypes_enum(); + var RouteParamsFactory = class { + exchangeKeyForValue(key, data, { req, res, next }) { + switch (key) { + case route_paramtypes_enum_1.RouteParamtypes.NEXT: + return next; + case route_paramtypes_enum_1.RouteParamtypes.REQUEST: + return req; + case route_paramtypes_enum_1.RouteParamtypes.RESPONSE: + return res; + case route_paramtypes_enum_1.RouteParamtypes.BODY: + return data && req.body ? req.body[data] : req.body; + case route_paramtypes_enum_1.RouteParamtypes.RAW_BODY: + return req.rawBody; + case route_paramtypes_enum_1.RouteParamtypes.PARAM: + return data ? req.params[data] : req.params; + case route_paramtypes_enum_1.RouteParamtypes.HOST: + const hosts = req.hosts || {}; + return data ? hosts[data] : hosts; + case route_paramtypes_enum_1.RouteParamtypes.QUERY: + return data ? req.query[data] : req.query; + case route_paramtypes_enum_1.RouteParamtypes.HEADERS: + return data ? req.headers[data.toLowerCase()] : req.headers; + case route_paramtypes_enum_1.RouteParamtypes.SESSION: + return req.session; + case route_paramtypes_enum_1.RouteParamtypes.FILE: + return req[data || "file"]; + case route_paramtypes_enum_1.RouteParamtypes.FILES: + return req.files; + case route_paramtypes_enum_1.RouteParamtypes.IP: + return req.ip; + default: + return null; + } + } + }; + exports2.RouteParamsFactory = RouteParamsFactory; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/sse-stream.js +var require_sse_stream = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/sse-stream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SseStream = void 0; + var shared_utils_1 = require_shared_utils(); + var stream_1 = require("stream"); + function toDataString(data) { + if ((0, shared_utils_1.isObject)(data)) { + return toDataString(JSON.stringify(data)); + } + return data.split(/\r\n|\r|\n/).map((line) => `data: ${line} +`).join(""); + } + var SseStream = class extends stream_1.Transform { + constructor(req) { + super({ objectMode: true }); + this.lastEventId = null; + if (req && req.socket) { + req.socket.setKeepAlive(true); + req.socket.setNoDelay(true); + req.socket.setTimeout(0); + } + } + pipe(destination, options) { + if (destination.writeHead) { + destination.writeHead(200, { + ...options?.additionalHeaders, + // See https://github.com/dunglas/mercure/blob/master/hub/subscribe.go#L124-L130 + "Content-Type": "text/event-stream", + Connection: "keep-alive", + // Disable cache, even for old browsers and proxies + "Cache-Control": "private, no-cache, no-store, must-revalidate, max-age=0, no-transform", + Pragma: "no-cache", + Expire: "0", + // NGINX support https://www.nginx.com/resources/wiki/start/topics/examples/x-accel/#x-accel-buffering + "X-Accel-Buffering": "no" + }); + destination.flushHeaders(); + } + destination.write("\n"); + return super.pipe(destination, options); + } + _transform(message, encoding, callback) { + let data = message.type ? `event: ${message.type} +` : ""; + data += message.id ? `id: ${message.id} +` : ""; + data += message.retry ? `retry: ${message.retry} +` : ""; + data += message.data ? toDataString(message.data) : ""; + data += "\n"; + this.push(data); + callback(); + } + /** + * Calls `.write` but handles the drain if needed + */ + writeMessage(message, cb) { + if (!message.id) { + this.lastEventId++; + message.id = this.lastEventId.toString(); + } + if (!this.write(message, "utf-8")) { + this.once("drain", cb); + } else { + process.nextTick(cb); + } + } + }; + exports2.SseStream = SseStream; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/router-response-controller.js +var require_router_response_controller = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/router-response-controller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RouterResponseController = void 0; + var common_12 = require_common(); + var shared_utils_1 = require_shared_utils(); + var rxjs_1 = require_cjs3(); + var operators_1 = require_operators(); + var sse_stream_1 = require_sse_stream(); + var RouterResponseController = class _RouterResponseController { + constructor(applicationRef) { + this.applicationRef = applicationRef; + this.logger = new common_12.Logger(_RouterResponseController.name); + } + async apply(result, response, httpStatusCode) { + return this.applicationRef.reply(response, result, httpStatusCode); + } + async redirect(resultOrDeferred, response, redirectResponse) { + const result = await this.transformToResult(resultOrDeferred); + const statusCode = result && result.statusCode ? result.statusCode : redirectResponse.statusCode ? redirectResponse.statusCode : common_12.HttpStatus.FOUND; + const url = result && result.url ? result.url : redirectResponse.url; + this.applicationRef.redirect(response, statusCode, url); + } + async render(resultOrDeferred, response, template) { + const result = await this.transformToResult(resultOrDeferred); + return this.applicationRef.render(response, template, result); + } + async transformToResult(resultOrDeferred) { + if ((0, rxjs_1.isObservable)(resultOrDeferred)) { + return (0, rxjs_1.lastValueFrom)(resultOrDeferred); + } + return resultOrDeferred; + } + getStatusByMethod(requestMethod) { + switch (requestMethod) { + case common_12.RequestMethod.POST: + return common_12.HttpStatus.CREATED; + default: + return common_12.HttpStatus.OK; + } + } + setHeaders(response, headers) { + headers.forEach(({ name, value }) => this.applicationRef.setHeader(response, name, typeof value === "function" ? value() : value)); + } + setStatus(response, statusCode) { + this.applicationRef.status(response, statusCode); + } + sse(result, response, request, options) { + if (response.writableEnded) { + return; + } + this.assertObservable(result); + const stream = new sse_stream_1.SseStream(request); + stream.pipe(response, options); + const subscription = result.pipe((0, operators_1.map)((message) => { + if ((0, shared_utils_1.isObject)(message)) { + return message; + } + return { data: message }; + }), (0, operators_1.concatMap)((message) => new Promise((resolve) => stream.writeMessage(message, () => resolve()))), (0, operators_1.catchError)((err) => { + const data = err instanceof Error ? err.message : err; + stream.writeMessage({ type: "error", data }, (writeError) => { + if (writeError) { + this.logger.error(writeError); + } + }); + return rxjs_1.EMPTY; + })).subscribe({ + complete: () => { + response.end(); + } + }); + request.on("close", () => { + subscription.unsubscribe(); + if (!stream.writableEnded) { + stream.end(); + } + }); + } + assertObservable(value) { + if (!(0, rxjs_1.isObservable)(value)) { + throw new ReferenceError("You must return an Observable stream to use Server-Sent Events (SSE)."); + } + } + }; + exports2.RouterResponseController = RouterResponseController; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/router-execution-context.js +var require_router_execution_context = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/router-execution-context.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RouterExecutionContext = void 0; + var common_12 = require_common(); + var constants_1 = require_constants(); + var route_paramtypes_enum_1 = require_route_paramtypes_enum(); + var shared_utils_1 = require_shared_utils(); + var guards_1 = require_guards(); + var context_utils_1 = require_context_utils(); + var handler_metadata_storage_1 = require_handler_metadata_storage(); + var constants_2 = require_constants5(); + var router_response_controller_1 = require_router_response_controller(); + var RouterExecutionContext = class { + constructor(paramsFactory, pipesContextCreator, pipesConsumer, guardsContextCreator, guardsConsumer, interceptorsContextCreator, interceptorsConsumer, applicationRef) { + this.paramsFactory = paramsFactory; + this.pipesContextCreator = pipesContextCreator; + this.pipesConsumer = pipesConsumer; + this.guardsContextCreator = guardsContextCreator; + this.guardsConsumer = guardsConsumer; + this.interceptorsContextCreator = interceptorsContextCreator; + this.interceptorsConsumer = interceptorsConsumer; + this.applicationRef = applicationRef; + this.handlerMetadataStorage = new handler_metadata_storage_1.HandlerMetadataStorage(); + this.contextUtils = new context_utils_1.ContextUtils(); + this.responseController = new router_response_controller_1.RouterResponseController(applicationRef); + } + create(instance, callback, methodName, moduleKey, requestMethod, contextId = constants_2.STATIC_CONTEXT, inquirerId) { + const contextType = "http"; + const { argsLength, fnHandleResponse, paramtypes, getParamsMetadata, httpStatusCode, responseHeaders, hasCustomHeaders } = this.getMetadata(instance, callback, methodName, moduleKey, requestMethod, contextType); + const paramsOptions = this.contextUtils.mergeParamsMetatypes(getParamsMetadata(moduleKey, contextId, inquirerId), paramtypes); + const pipes = this.pipesContextCreator.create(instance, callback, moduleKey, contextId, inquirerId); + const guards = this.guardsContextCreator.create(instance, callback, moduleKey, contextId, inquirerId); + const interceptors = this.interceptorsContextCreator.create(instance, callback, moduleKey, contextId, inquirerId); + const fnCanActivate = this.createGuardsFn(guards, instance, callback, contextType); + const fnApplyPipes = this.createPipesFn(pipes, paramsOptions); + const handler = (args, req, res, next) => async () => { + fnApplyPipes && await fnApplyPipes(args, req, res, next); + return callback.apply(instance, args); + }; + return async (req, res, next) => { + const args = this.contextUtils.createNullArray(argsLength); + fnCanActivate && await fnCanActivate([req, res, next]); + this.responseController.setStatus(res, httpStatusCode); + hasCustomHeaders && this.responseController.setHeaders(res, responseHeaders); + const result = await this.interceptorsConsumer.intercept(interceptors, [req, res, next], instance, callback, handler(args, req, res, next), contextType); + await fnHandleResponse(result, res, req); + }; + } + getMetadata(instance, callback, methodName, moduleKey, requestMethod, contextType) { + const cacheMetadata = this.handlerMetadataStorage.get(instance, methodName); + if (cacheMetadata) { + return cacheMetadata; + } + const metadata = this.contextUtils.reflectCallbackMetadata(instance, methodName, constants_1.ROUTE_ARGS_METADATA) || {}; + const keys = Object.keys(metadata); + const argsLength = this.contextUtils.getArgumentsLength(keys, metadata); + const paramtypes = this.contextUtils.reflectCallbackParamtypes(instance, methodName); + const contextFactory = this.contextUtils.getContextFactory(contextType, instance, callback); + const getParamsMetadata = (moduleKey2, contextId = constants_2.STATIC_CONTEXT, inquirerId) => this.exchangeKeysForValues(keys, metadata, moduleKey2, contextId, inquirerId, contextFactory); + const paramsMetadata = getParamsMetadata(moduleKey); + const isResponseHandled = this.isResponseHandled(instance, methodName, paramsMetadata); + const httpRedirectResponse = this.reflectRedirect(callback); + const fnHandleResponse = this.createHandleResponseFn(callback, isResponseHandled, httpRedirectResponse); + const httpCode = this.reflectHttpStatusCode(callback); + const httpStatusCode = httpCode ? httpCode : this.responseController.getStatusByMethod(requestMethod); + const responseHeaders = this.reflectResponseHeaders(callback); + const hasCustomHeaders = !(0, shared_utils_1.isEmpty)(responseHeaders); + const handlerMetadata = { + argsLength, + fnHandleResponse, + paramtypes, + getParamsMetadata, + httpStatusCode, + hasCustomHeaders, + responseHeaders + }; + this.handlerMetadataStorage.set(instance, methodName, handlerMetadata); + return handlerMetadata; + } + reflectRedirect(callback) { + return Reflect.getMetadata(constants_1.REDIRECT_METADATA, callback); + } + reflectHttpStatusCode(callback) { + return Reflect.getMetadata(constants_1.HTTP_CODE_METADATA, callback); + } + reflectRenderTemplate(callback) { + return Reflect.getMetadata(constants_1.RENDER_METADATA, callback); + } + reflectResponseHeaders(callback) { + return Reflect.getMetadata(constants_1.HEADERS_METADATA, callback) || []; + } + reflectSse(callback) { + return Reflect.getMetadata(constants_1.SSE_METADATA, callback); + } + exchangeKeysForValues(keys, metadata, moduleContext, contextId = constants_2.STATIC_CONTEXT, inquirerId, contextFactory) { + this.pipesContextCreator.setModuleContext(moduleContext); + return keys.map((key) => { + const { index, data, pipes: pipesCollection } = metadata[key]; + const pipes = this.pipesContextCreator.createConcreteContext(pipesCollection, contextId, inquirerId); + const type = this.contextUtils.mapParamType(key); + if (key.includes(constants_1.CUSTOM_ROUTE_ARGS_METADATA)) { + const { factory } = metadata[key]; + const customExtractValue = this.contextUtils.getCustomFactory(factory, data, contextFactory); + return { index, extractValue: customExtractValue, type, data, pipes }; + } + const numericType = Number(type); + const extractValue = (req, res, next) => this.paramsFactory.exchangeKeyForValue(numericType, data, { + req, + res, + next + }); + return { index, extractValue, type: numericType, data, pipes }; + }); + } + async getParamValue(value, { metatype, type, data }, pipes) { + if (!(0, shared_utils_1.isEmpty)(pipes)) { + return this.pipesConsumer.apply(value, { metatype, type, data }, pipes); + } + return value; + } + isPipeable(type) { + return type === route_paramtypes_enum_1.RouteParamtypes.BODY || type === route_paramtypes_enum_1.RouteParamtypes.RAW_BODY || type === route_paramtypes_enum_1.RouteParamtypes.QUERY || type === route_paramtypes_enum_1.RouteParamtypes.PARAM || type === route_paramtypes_enum_1.RouteParamtypes.FILE || type === route_paramtypes_enum_1.RouteParamtypes.FILES || (0, shared_utils_1.isString)(type); + } + createGuardsFn(guards, instance, callback, contextType) { + const canActivateFn = async (args) => { + const canActivate = await this.guardsConsumer.tryActivate(guards, args, instance, callback, contextType); + if (!canActivate) { + throw new common_12.ForbiddenException(guards_1.FORBIDDEN_MESSAGE); + } + }; + return guards.length ? canActivateFn : null; + } + createPipesFn(pipes, paramsOptions) { + const pipesFn = async (args, req, res, next) => { + const resolveParamValue = async (param) => { + const { index, extractValue, type, data, metatype, pipes: paramPipes } = param; + const value = extractValue(req, res, next); + args[index] = this.isPipeable(type) ? await this.getParamValue(value, { metatype, type, data }, pipes.concat(paramPipes)) : value; + }; + await Promise.all(paramsOptions.map(resolveParamValue)); + }; + return paramsOptions.length ? pipesFn : null; + } + createHandleResponseFn(callback, isResponseHandled, redirectResponse, httpStatusCode) { + const renderTemplate = this.reflectRenderTemplate(callback); + if (renderTemplate) { + return async (result, res) => { + return await this.responseController.render(result, res, renderTemplate); + }; + } + if (redirectResponse && (0, shared_utils_1.isString)(redirectResponse.url)) { + return async (result, res) => { + await this.responseController.redirect(result, res, redirectResponse); + }; + } + const isSseHandler = !!this.reflectSse(callback); + if (isSseHandler) { + return (result, res, req) => { + this.responseController.sse(result, res.raw || res, req.raw || req, { additionalHeaders: res.getHeaders?.() }); + }; + } + return async (result, res) => { + result = await this.responseController.transformToResult(result); + !isResponseHandled && await this.responseController.apply(result, res, httpStatusCode); + return res; + }; + } + isResponseHandled(instance, methodName, paramsMetadata) { + const hasResponseOrNextDecorator = paramsMetadata.some(({ type }) => type === route_paramtypes_enum_1.RouteParamtypes.RESPONSE || type === route_paramtypes_enum_1.RouteParamtypes.NEXT); + const isPassthroughEnabled = this.contextUtils.reflectPassthrough(instance, methodName); + return hasResponseOrNextDecorator && !isPassthroughEnabled; + } + }; + exports2.RouterExecutionContext = RouterExecutionContext; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/router-explorer.js +var require_router_explorer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/router-explorer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RouterExplorer = void 0; + var constants_1 = require_constants(); + var enums_1 = require_enums(); + var exceptions_1 = require_exceptions(); + var logger_service_1 = require_logger_service(); + var shared_utils_1 = require_shared_utils(); + var pathToRegexp = require_path_to_regexp(); + var unknown_request_mapping_exception_1 = require_unknown_request_mapping_exception(); + var guards_1 = require_guards(); + var context_id_factory_1 = require_context_id_factory(); + var execution_context_host_1 = require_execution_context_host(); + var messages_1 = require_messages2(); + var router_method_factory_1 = require_router_method_factory(); + var constants_2 = require_constants5(); + var interceptors_1 = require_interceptors(); + var pipes_1 = require_pipes2(); + var paths_explorer_1 = require_paths_explorer(); + var request_constants_1 = require_request_constants(); + var route_params_factory_1 = require_route_params_factory(); + var router_execution_context_1 = require_router_execution_context(); + var RouterExplorer = class _RouterExplorer { + constructor(metadataScanner, container, injector, routerProxy, exceptionsFilter, config, routePathFactory, graphInspector) { + this.container = container; + this.injector = injector; + this.routerProxy = routerProxy; + this.exceptionsFilter = exceptionsFilter; + this.routePathFactory = routePathFactory; + this.graphInspector = graphInspector; + this.routerMethodFactory = new router_method_factory_1.RouterMethodFactory(); + this.logger = new logger_service_1.Logger(_RouterExplorer.name, { + timestamp: true + }); + this.exceptionFiltersCache = /* @__PURE__ */ new WeakMap(); + this.pathsExplorer = new paths_explorer_1.PathsExplorer(metadataScanner); + const routeParamsFactory = new route_params_factory_1.RouteParamsFactory(); + const pipesContextCreator = new pipes_1.PipesContextCreator(container, config); + const pipesConsumer = new pipes_1.PipesConsumer(); + const guardsContextCreator = new guards_1.GuardsContextCreator(container, config); + const guardsConsumer = new guards_1.GuardsConsumer(); + const interceptorsContextCreator = new interceptors_1.InterceptorsContextCreator(container, config); + const interceptorsConsumer = new interceptors_1.InterceptorsConsumer(); + this.executionContextCreator = new router_execution_context_1.RouterExecutionContext(routeParamsFactory, pipesContextCreator, pipesConsumer, guardsContextCreator, guardsConsumer, interceptorsContextCreator, interceptorsConsumer, container.getHttpAdapterRef()); + } + explore(instanceWrapper, moduleKey, applicationRef, host, routePathMetadata) { + const { instance } = instanceWrapper; + const routerPaths = this.pathsExplorer.scanForPaths(instance); + this.applyPathsToRouterProxy(applicationRef, routerPaths, instanceWrapper, moduleKey, routePathMetadata, host); + } + extractRouterPath(metatype) { + const path = Reflect.getMetadata(constants_1.PATH_METADATA, metatype); + if ((0, shared_utils_1.isUndefined)(path)) { + throw new unknown_request_mapping_exception_1.UnknownRequestMappingException(metatype); + } + if (Array.isArray(path)) { + return path.map((p) => (0, shared_utils_1.addLeadingSlash)(p)); + } + return [(0, shared_utils_1.addLeadingSlash)(path)]; + } + applyPathsToRouterProxy(router, routeDefinitions, instanceWrapper, moduleKey, routePathMetadata, host) { + (routeDefinitions || []).forEach((routeDefinition) => { + const { version: methodVersion } = routeDefinition; + routePathMetadata.methodVersion = methodVersion; + this.applyCallbackToRouter(router, routeDefinition, instanceWrapper, moduleKey, routePathMetadata, host); + }); + } + applyCallbackToRouter(router, routeDefinition, instanceWrapper, moduleKey, routePathMetadata, host) { + const { path: paths, requestMethod, targetCallback, methodName } = routeDefinition; + const { instance } = instanceWrapper; + const routerMethodRef = this.routerMethodFactory.get(router, requestMethod).bind(router); + const isRequestScoped = !instanceWrapper.isDependencyTreeStatic(); + const proxy = isRequestScoped ? this.createRequestScopedHandler(instanceWrapper, requestMethod, this.container.getModuleByKey(moduleKey), moduleKey, methodName) : this.createCallbackProxy(instance, targetCallback, methodName, moduleKey, requestMethod); + const isVersioned = (routePathMetadata.methodVersion || routePathMetadata.controllerVersion) && routePathMetadata.versioningOptions; + let routeHandler = this.applyHostFilter(host, proxy); + paths.forEach((path) => { + if (isVersioned && routePathMetadata.versioningOptions.type !== enums_1.VersioningType.URI) { + routeHandler = this.applyVersionFilter(router, routePathMetadata, routeHandler); + } + routePathMetadata.methodPath = path; + const pathsToRegister = this.routePathFactory.create(routePathMetadata, requestMethod); + pathsToRegister.forEach((path2) => { + const entrypointDefinition = { + type: "http-endpoint", + methodName, + className: instanceWrapper.name, + classNodeId: instanceWrapper.id, + metadata: { + key: path2, + path: path2, + requestMethod: enums_1.RequestMethod[requestMethod], + methodVersion: routePathMetadata.methodVersion, + controllerVersion: routePathMetadata.controllerVersion + } + }; + this.copyMetadataToCallback(targetCallback, routeHandler); + routerMethodRef(path2, routeHandler); + this.graphInspector.insertEntrypointDefinition(entrypointDefinition, instanceWrapper.id); + }); + const pathsToLog = this.routePathFactory.create({ + ...routePathMetadata, + versioningOptions: void 0 + }, requestMethod); + pathsToLog.forEach((path2) => { + if (isVersioned) { + const version2 = this.routePathFactory.getVersion(routePathMetadata); + this.logger.log((0, messages_1.VERSIONED_ROUTE_MAPPED_MESSAGE)(path2, requestMethod, version2)); + } else { + this.logger.log((0, messages_1.ROUTE_MAPPED_MESSAGE)(path2, requestMethod)); + } + }); + }); + } + applyHostFilter(host, handler) { + if (!host) { + return handler; + } + const httpAdapterRef = this.container.getHttpAdapterRef(); + const hosts = Array.isArray(host) ? host : [host]; + const hostRegExps = hosts.map((host2) => { + const keys = []; + const regexp = pathToRegexp(host2, keys); + return { regexp, keys }; + }); + const unsupportedFilteringErrorMessage = Array.isArray(host) ? `HTTP adapter does not support filtering on hosts: ["${host.join('", "')}"]` : `HTTP adapter does not support filtering on host: "${host}"`; + return (req, res, next) => { + req.hosts = {}; + const hostname = httpAdapterRef.getRequestHostname(req) || ""; + for (const exp of hostRegExps) { + const match = hostname.match(exp.regexp); + if (match) { + if (exp.keys.length > 0) { + exp.keys.forEach((key, i) => req.hosts[key.name] = match[i + 1]); + } else if (exp.regexp && match.groups) { + for (const groupName in match.groups) { + req.hosts[groupName] = match.groups[groupName]; + } + } + return handler(req, res, next); + } + } + if (!next) { + throw new exceptions_1.InternalServerErrorException(unsupportedFilteringErrorMessage); + } + return next(); + }; + } + applyVersionFilter(router, routePathMetadata, handler) { + const version2 = this.routePathFactory.getVersion(routePathMetadata); + return router.applyVersionFilter(handler, version2, routePathMetadata.versioningOptions); + } + createCallbackProxy(instance, callback, methodName, moduleRef, requestMethod, contextId = constants_2.STATIC_CONTEXT, inquirerId) { + const executionContext = this.executionContextCreator.create(instance, callback, methodName, moduleRef, requestMethod, contextId, inquirerId); + const exceptionFilter = this.exceptionsFilter.create(instance, callback, moduleRef, contextId, inquirerId); + return this.routerProxy.createProxy(executionContext, exceptionFilter); + } + createRequestScopedHandler(instanceWrapper, requestMethod, moduleRef, moduleKey, methodName) { + const { instance } = instanceWrapper; + const collection = moduleRef.controllers; + const isTreeDurable = instanceWrapper.isDependencyTreeDurable(); + return async (req, res, next) => { + try { + const contextId = this.getContextId(req, isTreeDurable); + const contextInstance = await this.injector.loadPerContext(instance, moduleRef, collection, contextId); + await this.createCallbackProxy(contextInstance, contextInstance[methodName], methodName, moduleKey, requestMethod, contextId, instanceWrapper.id)(req, res, next); + } catch (err) { + let exceptionFilter = this.exceptionFiltersCache.get(instance[methodName]); + if (!exceptionFilter) { + exceptionFilter = this.exceptionsFilter.create(instance, instance[methodName], moduleKey); + this.exceptionFiltersCache.set(instance[methodName], exceptionFilter); + } + const host = new execution_context_host_1.ExecutionContextHost([req, res, next]); + exceptionFilter.next(err, host); + } + }; + } + getContextId(request, isTreeDurable) { + const contextId = context_id_factory_1.ContextIdFactory.getByRequest(request); + if (!request[request_constants_1.REQUEST_CONTEXT_ID]) { + Object.defineProperty(request, request_constants_1.REQUEST_CONTEXT_ID, { + value: contextId, + enumerable: false, + writable: false, + configurable: false + }); + const requestProviderValue = isTreeDurable ? contextId.payload : Object.assign(request, contextId.payload); + this.container.registerRequestProvider(requestProviderValue, contextId); + } + return contextId; + } + copyMetadataToCallback(originalCallback, targetCallback) { + for (const key of Reflect.getMetadataKeys(originalCallback)) { + Reflect.defineMetadata(key, Reflect.getMetadata(key, originalCallback), targetCallback); + } + } + }; + exports2.RouterExplorer = RouterExplorer; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/routes-resolver.js +var require_routes_resolver = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/routes-resolver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RoutesResolver = void 0; + var common_12 = require_common(); + var constants_1 = require_constants(); + var logger_service_1 = require_logger_service(); + var messages_1 = require_messages2(); + var metadata_scanner_1 = require_metadata_scanner(); + var route_path_factory_1 = require_route_path_factory(); + var router_exception_filters_1 = require_router_exception_filters(); + var router_explorer_1 = require_router_explorer(); + var router_proxy_1 = require_router_proxy(); + var RoutesResolver = class _RoutesResolver { + constructor(container, applicationConfig, injector, graphInspector) { + this.container = container; + this.applicationConfig = applicationConfig; + this.injector = injector; + this.logger = new logger_service_1.Logger(_RoutesResolver.name, { + timestamp: true + }); + this.routerProxy = new router_proxy_1.RouterProxy(); + const httpAdapterRef = container.getHttpAdapterRef(); + this.routerExceptionsFilter = new router_exception_filters_1.RouterExceptionFilters(container, applicationConfig, httpAdapterRef); + this.routePathFactory = new route_path_factory_1.RoutePathFactory(this.applicationConfig); + const metadataScanner = new metadata_scanner_1.MetadataScanner(); + this.routerExplorer = new router_explorer_1.RouterExplorer(metadataScanner, this.container, this.injector, this.routerProxy, this.routerExceptionsFilter, this.applicationConfig, this.routePathFactory, graphInspector); + } + resolve(applicationRef, globalPrefix) { + const modules = this.container.getModules(); + modules.forEach(({ controllers, metatype }, moduleName) => { + const modulePath = this.getModulePathMetadata(metatype); + this.registerRouters(controllers, moduleName, globalPrefix, modulePath, applicationRef); + }); + } + registerRouters(routes, moduleName, globalPrefix, modulePath, applicationRef) { + routes.forEach((instanceWrapper) => { + const { metatype } = instanceWrapper; + const host = this.getHostMetadata(metatype); + const routerPaths = this.routerExplorer.extractRouterPath(metatype); + const controllerVersion = this.getVersionMetadata(metatype); + const controllerName = metatype.name; + routerPaths.forEach((path) => { + const pathsToLog = this.routePathFactory.create({ + ctrlPath: path, + modulePath, + globalPrefix + }); + if (!controllerVersion) { + pathsToLog.forEach((path2) => { + const logMessage = (0, messages_1.CONTROLLER_MAPPING_MESSAGE)(controllerName, path2); + this.logger.log(logMessage); + }); + } else { + pathsToLog.forEach((path2) => { + const logMessage = (0, messages_1.VERSIONED_CONTROLLER_MAPPING_MESSAGE)(controllerName, path2, controllerVersion); + this.logger.log(logMessage); + }); + } + const versioningOptions = this.applicationConfig.getVersioning(); + const routePathMetadata = { + ctrlPath: path, + modulePath, + globalPrefix, + controllerVersion, + versioningOptions + }; + this.routerExplorer.explore(instanceWrapper, moduleName, applicationRef, host, routePathMetadata); + }); + }); + } + registerNotFoundHandler() { + const applicationRef = this.container.getHttpAdapterRef(); + const callback = (req, res) => { + const method = applicationRef.getRequestMethod(req); + const url = applicationRef.getRequestUrl(req); + throw new common_12.NotFoundException(`Cannot ${method} ${url}`); + }; + const handler = this.routerExceptionsFilter.create({}, callback, void 0); + const proxy = this.routerProxy.createProxy(callback, handler); + applicationRef.setNotFoundHandler && applicationRef.setNotFoundHandler(proxy, this.applicationConfig.getGlobalPrefix()); + } + registerExceptionHandler() { + const callback = (err, req, res, next) => { + throw this.mapExternalException(err); + }; + const handler = this.routerExceptionsFilter.create({}, callback, void 0); + const proxy = this.routerProxy.createExceptionLayerProxy(callback, handler); + const applicationRef = this.container.getHttpAdapterRef(); + applicationRef.setErrorHandler && applicationRef.setErrorHandler(proxy, this.applicationConfig.getGlobalPrefix()); + } + mapExternalException(err) { + switch (true) { + // SyntaxError is thrown by Express body-parser when given invalid JSON (#422, #430) + // URIError is thrown by Express when given a path parameter with an invalid percentage + // encoding, e.g. '%FF' (#8915) + case (err instanceof SyntaxError || err instanceof URIError): + return new common_12.BadRequestException(err.message); + default: + return err; + } + } + getModulePathMetadata(metatype) { + const modulesContainer = this.container.getModules(); + const modulePath = Reflect.getMetadata(constants_1.MODULE_PATH + modulesContainer.applicationId, metatype); + return modulePath ?? Reflect.getMetadata(constants_1.MODULE_PATH, metatype); + } + getHostMetadata(metatype) { + return Reflect.getMetadata(constants_1.HOST_METADATA, metatype); + } + getVersionMetadata(metatype) { + const versioningConfig = this.applicationConfig.getVersioning(); + if (versioningConfig) { + return Reflect.getMetadata(constants_1.VERSION_METADATA, metatype) ?? versioningConfig.defaultVersion; + } + } + }; + exports2.RoutesResolver = RoutesResolver; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/nest-application.js +var require_nest_application = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/nest-application.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NestApplication = void 0; + var common_12 = require_common(); + var logger_service_1 = require_logger_service(); + var load_package_util_1 = require_load_package_util(); + var shared_utils_1 = require_shared_utils(); + var iterare_1 = require_lib(); + var os_1 = require("os"); + var application_config_1 = require_application_config(); + var constants_1 = require_constants4(); + var optional_require_1 = require_optional_require(); + var injector_1 = require_injector(); + var container_1 = require_container3(); + var middleware_module_1 = require_middleware_module(); + var utils_1 = require_utils9(); + var nest_application_context_1 = require_nest_application_context(); + var routes_resolver_1 = require_routes_resolver(); + var { SocketModule } = (0, optional_require_1.optionalRequire)("@nestjs/websockets/socket-module", () => require("@nestjs/websockets/socket-module")); + var { MicroservicesModule } = (0, optional_require_1.optionalRequire)("@nestjs/microservices/microservices-module", () => require("@nestjs/microservices/microservices-module")); + var NestApplication = class _NestApplication extends nest_application_context_1.NestApplicationContext { + constructor(container, httpAdapter, config, graphInspector, appOptions = {}) { + super(container, appOptions); + this.httpAdapter = httpAdapter; + this.config = config; + this.graphInspector = graphInspector; + this.logger = new logger_service_1.Logger(_NestApplication.name, { + timestamp: true + }); + this.middlewareContainer = new container_1.MiddlewareContainer(this.container); + this.microservicesModule = MicroservicesModule && new MicroservicesModule(); + this.socketModule = SocketModule && new SocketModule(); + this.microservices = []; + this.isListening = false; + this.selectContextModule(); + this.registerHttpServer(); + this.injector = new injector_1.Injector({ preview: this.appOptions.preview }); + this.middlewareModule = new middleware_module_1.MiddlewareModule(); + this.routesResolver = new routes_resolver_1.RoutesResolver(this.container, this.config, this.injector, this.graphInspector); + } + async dispose() { + this.socketModule && await this.socketModule.close(); + this.microservicesModule && await this.microservicesModule.close(); + this.httpAdapter && await this.httpAdapter.close(); + await Promise.all((0, iterare_1.iterate)(this.microservices).map(async (microservice) => { + microservice.setIsTerminated(true); + await microservice.close(); + })); + } + getHttpAdapter() { + return this.httpAdapter; + } + registerHttpServer() { + this.httpServer = this.createServer(); + } + getUnderlyingHttpServer() { + return this.httpAdapter.getHttpServer(); + } + applyOptions() { + if (!this.appOptions || !this.appOptions.cors) { + return void 0; + } + const passCustomOptions = (0, shared_utils_1.isObject)(this.appOptions.cors) || (0, shared_utils_1.isFunction)(this.appOptions.cors); + if (!passCustomOptions) { + return this.enableCors(); + } + return this.enableCors(this.appOptions.cors); + } + createServer() { + this.httpAdapter.initHttpServer(this.appOptions); + return this.httpAdapter.getHttpServer(); + } + async registerModules() { + this.registerWsModule(); + if (this.microservicesModule) { + this.microservicesModule.register(this.container, this.graphInspector, this.config, this.appOptions); + this.microservicesModule.setupClients(this.container); + } + await this.middlewareModule.register(this.middlewareContainer, this.container, this.config, this.injector, this.httpAdapter, this.graphInspector, this.appOptions); + } + registerWsModule() { + if (!this.socketModule) { + return; + } + this.socketModule.register(this.container, this.config, this.graphInspector, this.appOptions, this.httpServer); + } + async init() { + if (this.isInitialized) { + return this; + } + this.applyOptions(); + await this.httpAdapter?.init(); + const useBodyParser = this.appOptions && this.appOptions.bodyParser !== false; + useBodyParser && this.registerParserMiddleware(); + await this.registerModules(); + await this.registerRouter(); + await this.callInitHook(); + await this.registerRouterHooks(); + await this.callBootstrapHook(); + this.isInitialized = true; + this.logger.log(constants_1.MESSAGES.APPLICATION_READY); + return this; + } + registerParserMiddleware() { + const prefix = this.config.getGlobalPrefix(); + const rawBody = !!this.appOptions?.rawBody; + this.httpAdapter.registerParserMiddleware(prefix, rawBody); + } + async registerRouter() { + await this.registerMiddleware(this.httpAdapter); + const prefix = this.config.getGlobalPrefix(); + const basePath = (0, shared_utils_1.addLeadingSlash)(prefix); + this.routesResolver.resolve(this.httpAdapter, basePath); + } + async registerRouterHooks() { + this.routesResolver.registerNotFoundHandler(); + this.routesResolver.registerExceptionHandler(); + } + connectMicroservice(microserviceOptions, hybridAppOptions = {}) { + const { NestMicroservice } = (0, load_package_util_1.loadPackage)("@nestjs/microservices", "NestFactory", () => require("@nestjs/microservices")); + const { inheritAppConfig } = hybridAppOptions; + const applicationConfig = inheritAppConfig ? this.config : new application_config_1.ApplicationConfig(); + const instance = new NestMicroservice(this.container, microserviceOptions, this.graphInspector, applicationConfig); + instance.registerListeners(); + instance.setIsInitialized(true); + instance.setIsInitHookCalled(true); + this.microservices.push(instance); + return instance; + } + getMicroservices() { + return this.microservices; + } + getHttpServer() { + return this.httpServer; + } + async startAllMicroservices() { + this.assertNotInPreviewMode("startAllMicroservices"); + await Promise.all(this.microservices.map((msvc) => msvc.listen())); + return this; + } + use(...args) { + this.httpAdapter.use(...args); + return this; + } + useBodyParser(...args) { + if (!("useBodyParser" in this.httpAdapter)) { + this.logger.warn("Your HTTP Adapter does not support `.useBodyParser`."); + return this; + } + const [parserType, ...otherArgs] = args; + const rawBody = !!this.appOptions.rawBody; + this.httpAdapter.useBodyParser(...[parserType, rawBody, ...otherArgs]); + return this; + } + enableCors(options) { + this.httpAdapter.enableCors(options); + } + enableVersioning(options = { type: common_12.VersioningType.URI }) { + this.config.enableVersioning(options); + return this; + } + async listen(port, ...args) { + this.assertNotInPreviewMode("listen"); + if (!this.isInitialized) { + await this.init(); + } + const httpAdapterHost = this.container.getHttpAdapterHostRef(); + return new Promise((resolve, reject) => { + const errorHandler = (e) => { + this.logger.error(e?.toString?.()); + reject(e); + }; + this.httpServer.once("error", errorHandler); + const isCallbackInOriginalArgs = (0, shared_utils_1.isFunction)(args[args.length - 1]); + const listenFnArgs = isCallbackInOriginalArgs ? args.slice(0, args.length - 1) : args; + this.httpAdapter.listen(port, ...listenFnArgs, (...originalCallbackArgs) => { + if (this.appOptions?.autoFlushLogs ?? true) { + this.flushLogs(); + } + if (originalCallbackArgs[0] instanceof Error) { + return reject(originalCallbackArgs[0]); + } + const address = this.httpServer.address(); + if (address) { + this.httpServer.removeListener("error", errorHandler); + this.isListening = true; + httpAdapterHost.listening = true; + resolve(this.httpServer); + } + if (isCallbackInOriginalArgs) { + args[args.length - 1](...originalCallbackArgs); + } + }); + }); + } + async getUrl() { + return new Promise((resolve, reject) => { + if (!this.isListening) { + this.logger.error(constants_1.MESSAGES.CALL_LISTEN_FIRST); + reject(constants_1.MESSAGES.CALL_LISTEN_FIRST); + return; + } + const address = this.httpServer.address(); + resolve(this.formatAddress(address)); + }); + } + formatAddress(address) { + if ((0, shared_utils_1.isString)(address)) { + if ((0, os_1.platform)() === "win32") { + return address; + } + const basePath = encodeURIComponent(address); + return `${this.getProtocol()}+unix://${basePath}`; + } + let host = this.host(); + if (address && address.family === "IPv6") { + if (host === "::") { + host = "[::1]"; + } else { + host = `[${host}]`; + } + } else if (host === "0.0.0.0") { + host = "127.0.0.1"; + } + return `${this.getProtocol()}://${host}:${address.port}`; + } + setGlobalPrefix(prefix, options) { + this.config.setGlobalPrefix(prefix); + if (options) { + const exclude = options?.exclude ? (0, utils_1.mapToExcludeRoute)(options.exclude) : []; + this.config.setGlobalPrefixOptions({ + ...options, + exclude + }); + } + return this; + } + useWebSocketAdapter(adapter) { + this.config.setIoAdapter(adapter); + return this; + } + useGlobalFilters(...filters) { + this.config.useGlobalFilters(...filters); + filters.forEach((item) => this.graphInspector.insertOrphanedEnhancer({ + subtype: "filter", + ref: item + })); + return this; + } + useGlobalPipes(...pipes) { + this.config.useGlobalPipes(...pipes); + pipes.forEach((item) => this.graphInspector.insertOrphanedEnhancer({ + subtype: "pipe", + ref: item + })); + return this; + } + useGlobalInterceptors(...interceptors) { + this.config.useGlobalInterceptors(...interceptors); + interceptors.forEach((item) => this.graphInspector.insertOrphanedEnhancer({ + subtype: "interceptor", + ref: item + })); + return this; + } + useGlobalGuards(...guards) { + this.config.useGlobalGuards(...guards); + guards.forEach((item) => this.graphInspector.insertOrphanedEnhancer({ + subtype: "guard", + ref: item + })); + return this; + } + useStaticAssets(pathOrOptions, options) { + this.httpAdapter.useStaticAssets && this.httpAdapter.useStaticAssets(pathOrOptions, options); + return this; + } + setBaseViewsDir(path) { + this.httpAdapter.setBaseViewsDir && this.httpAdapter.setBaseViewsDir(path); + return this; + } + setViewEngine(engineOrOptions) { + this.httpAdapter.setViewEngine && this.httpAdapter.setViewEngine(engineOrOptions); + return this; + } + host() { + const address = this.httpServer.address(); + if ((0, shared_utils_1.isString)(address)) { + return void 0; + } + return address && address.address; + } + getProtocol() { + return this.appOptions && this.appOptions.httpsOptions ? "https" : "http"; + } + async registerMiddleware(instance) { + await this.middlewareModule.registerMiddleware(this.middlewareContainer, instance); + } + }; + exports2.NestApplication = NestApplication; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exception-handler.js +var require_exception_handler = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exception-handler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ExceptionHandler = void 0; + var runtime_exception_1 = require_runtime_exception(); + var logger_service_1 = require_logger_service(); + var ExceptionHandler = class _ExceptionHandler { + handle(exception) { + if (!(exception instanceof runtime_exception_1.RuntimeException)) { + _ExceptionHandler.logger.error(exception.message, exception.stack); + return; + } + _ExceptionHandler.logger.error(exception.what(), exception.stack); + } + }; + exports2.ExceptionHandler = ExceptionHandler; + ExceptionHandler.logger = new logger_service_1.Logger(ExceptionHandler.name); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions-zone.js +var require_exceptions_zone = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions-zone.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ExceptionsZone = void 0; + var common_12 = require_common(); + var exception_handler_1 = require_exception_handler(); + var DEFAULT_TEARDOWN = () => process.exit(1); + var ExceptionsZone = class { + static run(callback, teardown = DEFAULT_TEARDOWN, autoFlushLogs) { + try { + callback(); + } catch (e) { + this.exceptionHandler.handle(e); + if (autoFlushLogs) { + common_12.Logger.flush(); + } + teardown(e); + } + } + static async asyncRun(callback, teardown = DEFAULT_TEARDOWN, autoFlushLogs) { + try { + await callback(); + } catch (e) { + this.exceptionHandler.handle(e); + if (autoFlushLogs) { + common_12.Logger.flush(); + } + teardown(e); + } + } + }; + exports2.ExceptionsZone = ExceptionsZone; + ExceptionsZone.exceptionHandler = new exception_handler_1.ExceptionHandler(); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/load-adapter.js +var require_load_adapter = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/load-adapter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.loadAdapter = loadAdapter; + var common_12 = require_common(); + var MISSING_REQUIRED_DEPENDENCY = (defaultPlatform, transport) => `No driver (${transport}) has been selected. In order to take advantage of the default driver, please, ensure to install the "${defaultPlatform}" package ($ npm install ${defaultPlatform}).`; + var logger = new common_12.Logger("PackageLoader"); + function loadAdapter(defaultPlatform, transport, loaderFn) { + try { + return loaderFn ? loaderFn() : require(defaultPlatform); + } catch (e) { + logger.error(MISSING_REQUIRED_DEPENDENCY(defaultPlatform, transport)); + process.exit(1); + } + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/rethrow.js +var require_rethrow = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/helpers/rethrow.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rethrow = void 0; + var rethrow = (err) => { + throw err; + }; + exports2.rethrow = rethrow; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/instance-loader.js +var require_instance_loader = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/instance-loader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InstanceLoader = void 0; + var common_12 = require_common(); + var messages_1 = require_messages2(); + var internal_core_module_1 = require_internal_core_module(); + var InstanceLoader = class _InstanceLoader { + constructor(container, injector, graphInspector, logger = new common_12.Logger(_InstanceLoader.name, { + timestamp: true + })) { + this.container = container; + this.injector = injector; + this.graphInspector = graphInspector; + this.logger = logger; + } + setLogger(logger) { + this.logger = logger; + } + async createInstancesOfDependencies(modules = this.container.getModules()) { + this.createPrototypes(modules); + try { + await this.createInstances(modules); + } catch (err) { + this.graphInspector.inspectModules(modules); + this.graphInspector.registerPartial(err); + throw err; + } + this.graphInspector.inspectModules(modules); + } + createPrototypes(modules) { + modules.forEach((moduleRef) => { + this.createPrototypesOfProviders(moduleRef); + this.createPrototypesOfInjectables(moduleRef); + this.createPrototypesOfControllers(moduleRef); + }); + } + async createInstances(modules) { + await Promise.all([...modules.values()].map(async (moduleRef) => { + await this.createInstancesOfProviders(moduleRef); + await this.createInstancesOfInjectables(moduleRef); + await this.createInstancesOfControllers(moduleRef); + const { name } = moduleRef; + this.isModuleWhitelisted(name) && this.logger.log((0, messages_1.MODULE_INIT_MESSAGE)`${name}`); + })); + } + createPrototypesOfProviders(moduleRef) { + const { providers } = moduleRef; + providers.forEach((wrapper) => this.injector.loadPrototype(wrapper, providers)); + } + async createInstancesOfProviders(moduleRef) { + const { providers } = moduleRef; + const wrappers = [...providers.values()]; + await Promise.all(wrappers.map(async (item) => { + await this.injector.loadProvider(item, moduleRef); + this.graphInspector.inspectInstanceWrapper(item, moduleRef); + })); + } + createPrototypesOfControllers(moduleRef) { + const { controllers } = moduleRef; + controllers.forEach((wrapper) => this.injector.loadPrototype(wrapper, controllers)); + } + async createInstancesOfControllers(moduleRef) { + const { controllers } = moduleRef; + const wrappers = [...controllers.values()]; + await Promise.all(wrappers.map(async (item) => { + await this.injector.loadController(item, moduleRef); + this.graphInspector.inspectInstanceWrapper(item, moduleRef); + })); + } + createPrototypesOfInjectables(moduleRef) { + const { injectables } = moduleRef; + injectables.forEach((wrapper) => this.injector.loadPrototype(wrapper, injectables)); + } + async createInstancesOfInjectables(moduleRef) { + const { injectables } = moduleRef; + const wrappers = [...injectables.values()]; + await Promise.all(wrappers.map(async (item) => { + await this.injector.loadInjectable(item, moduleRef); + this.graphInspector.inspectInstanceWrapper(item, moduleRef); + })); + } + isModuleWhitelisted(name) { + return name !== internal_core_module_1.InternalCoreModule.name; + } + }; + exports2.InstanceLoader = InstanceLoader; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/inspector/noop-graph-inspector.js +var require_noop_graph_inspector = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/inspector/noop-graph-inspector.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NoopGraphInspector = void 0; + var graph_inspector_1 = require_graph_inspector(); + var noop = () => { + }; + exports2.NoopGraphInspector = new Proxy(graph_inspector_1.GraphInspector.prototype, { + get: () => noop + }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/invalid-class-module.exception.js +var require_invalid_class_module_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/invalid-class-module.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InvalidClassModuleException = void 0; + var messages_1 = require_messages(); + var runtime_exception_1 = require_runtime_exception(); + var InvalidClassModuleException = class extends runtime_exception_1.RuntimeException { + constructor(metatypeUsedAsAModule, scope) { + super((0, messages_1.USING_INVALID_CLASS_AS_A_MODULE_MESSAGE)(metatypeUsedAsAModule, scope)); + } + }; + exports2.InvalidClassModuleException = InvalidClassModuleException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/invalid-module.exception.js +var require_invalid_module_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/invalid-module.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InvalidModuleException = void 0; + var messages_1 = require_messages(); + var runtime_exception_1 = require_runtime_exception(); + var InvalidModuleException = class extends runtime_exception_1.RuntimeException { + constructor(parentModule, index, scope) { + super((0, messages_1.INVALID_MODULE_MESSAGE)(parentModule, index, scope)); + } + }; + exports2.InvalidModuleException = InvalidModuleException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/undefined-module.exception.js +var require_undefined_module_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/errors/exceptions/undefined-module.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UndefinedModuleException = void 0; + var runtime_exception_1 = require_runtime_exception(); + var messages_1 = require_messages(); + var UndefinedModuleException = class extends runtime_exception_1.RuntimeException { + constructor(parentModule, index, scope) { + super((0, messages_1.UNDEFINED_MODULE_MESSAGE)(parentModule, index, scope)); + } + }; + exports2.UndefinedModuleException = UndefinedModuleException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/internal-core-module/internal-core-module-factory.js +var require_internal_core_module_factory = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/injector/internal-core-module/internal-core-module-factory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InternalCoreModuleFactory = void 0; + var common_12 = require_common(); + var external_context_creator_1 = require_external_context_creator(); + var http_adapter_host_1 = require_http_adapter_host(); + var initialize_on_preview_allowlist_1 = require_initialize_on_preview_allowlist(); + var serialized_graph_1 = require_serialized_graph(); + var injector_1 = require_injector(); + var instance_loader_1 = require_instance_loader(); + var lazy_module_loader_1 = require_lazy_module_loader(); + var modules_container_1 = require_modules_container(); + var internal_core_module_1 = require_internal_core_module(); + var InternalCoreModuleFactory = class { + static create(container, scanner, moduleCompiler, httpAdapterHost, graphInspector, moduleOverrides) { + const lazyModuleLoaderFactory = () => { + const logger = new common_12.Logger(lazy_module_loader_1.LazyModuleLoader.name, { + timestamp: false + }); + const injector = new injector_1.Injector(); + const instanceLoader = new instance_loader_1.InstanceLoader(container, injector, graphInspector, logger); + return new lazy_module_loader_1.LazyModuleLoader(scanner, instanceLoader, moduleCompiler, container.getModules(), moduleOverrides); + }; + initialize_on_preview_allowlist_1.InitializeOnPreviewAllowlist.add(internal_core_module_1.InternalCoreModule); + return internal_core_module_1.InternalCoreModule.register([ + { + provide: external_context_creator_1.ExternalContextCreator, + useFactory: () => external_context_creator_1.ExternalContextCreator.fromContainer(container) + }, + { + provide: modules_container_1.ModulesContainer, + useFactory: () => container.getModules() + }, + { + provide: http_adapter_host_1.HttpAdapterHost, + useFactory: () => httpAdapterHost + }, + { + provide: lazy_module_loader_1.LazyModuleLoader, + useFactory: lazyModuleLoaderFactory + }, + { + provide: serialized_graph_1.SerializedGraph, + useFactory: () => container.serializedGraph + } + ]); + } + }; + exports2.InternalCoreModuleFactory = InternalCoreModuleFactory; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/scanner.js +var require_scanner = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/scanner.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DependenciesScanner = void 0; + var constants_1 = require_constants(); + var interfaces_1 = require_interfaces(); + var shared_utils_1 = require_shared_utils(); + var iterare_1 = require_lib(); + var application_config_1 = require_application_config(); + var constants_2 = require_constants4(); + var circular_dependency_exception_1 = require_circular_dependency_exception(); + var invalid_class_module_exception_1 = require_invalid_class_module_exception(); + var invalid_module_exception_1 = require_invalid_module_exception(); + var undefined_module_exception_1 = require_undefined_module_exception(); + var get_class_scope_1 = require_get_class_scope(); + var internal_core_module_factory_1 = require_internal_core_module_factory(); + var uuid_factory_1 = require_uuid_factory(); + var DependenciesScanner = class { + constructor(container, metadataScanner, graphInspector, applicationConfig = new application_config_1.ApplicationConfig()) { + this.container = container; + this.metadataScanner = metadataScanner; + this.graphInspector = graphInspector; + this.applicationConfig = applicationConfig; + this.applicationProvidersApplyMap = []; + } + async scan(module3, options) { + await this.registerCoreModule(options?.overrides); + await this.scanForModules({ + moduleDefinition: module3, + overrides: options?.overrides + }); + await this.scanModulesForDependencies(); + this.calculateModulesDistance(); + this.addScopedEnhancersMetadata(); + this.container.bindGlobalScope(); + } + async scanForModules({ moduleDefinition, lazy, scope = [], ctxRegistry = [], overrides = [] }) { + const { moduleRef: moduleInstance, inserted: moduleInserted } = await this.insertOrOverrideModule(moduleDefinition, overrides, scope) ?? {}; + moduleDefinition = this.getOverrideModuleByModule(moduleDefinition, overrides)?.newModule ?? moduleDefinition; + moduleDefinition = moduleDefinition instanceof Promise ? await moduleDefinition : moduleDefinition; + ctxRegistry.push(moduleDefinition); + if (this.isForwardReference(moduleDefinition)) { + moduleDefinition = moduleDefinition.forwardRef(); + } + const modules = !this.isDynamicModule(moduleDefinition) ? this.reflectMetadata(constants_1.MODULE_METADATA.IMPORTS, moduleDefinition) : [ + ...this.reflectMetadata(constants_1.MODULE_METADATA.IMPORTS, moduleDefinition.module), + ...moduleDefinition.imports || [] + ]; + let registeredModuleRefs = []; + for (const [index, innerModule] of modules.entries()) { + if (innerModule === void 0) { + throw new undefined_module_exception_1.UndefinedModuleException(moduleDefinition, index, scope); + } + if (!innerModule) { + throw new invalid_module_exception_1.InvalidModuleException(moduleDefinition, index, scope); + } + if (ctxRegistry.includes(innerModule)) { + continue; + } + const moduleRefs = await this.scanForModules({ + moduleDefinition: innerModule, + scope: [].concat(scope, moduleDefinition), + ctxRegistry, + overrides, + lazy + }); + registeredModuleRefs = registeredModuleRefs.concat(moduleRefs); + } + if (!moduleInstance) { + return registeredModuleRefs; + } + if (lazy && moduleInserted) { + this.container.bindGlobalsToImports(moduleInstance); + } + return [moduleInstance].concat(registeredModuleRefs); + } + async insertModule(moduleDefinition, scope) { + const moduleToAdd = this.isForwardReference(moduleDefinition) ? moduleDefinition.forwardRef() : moduleDefinition; + if (this.isInjectable(moduleToAdd) || this.isController(moduleToAdd) || this.isExceptionFilter(moduleToAdd)) { + throw new invalid_class_module_exception_1.InvalidClassModuleException(moduleDefinition, scope); + } + return this.container.addModule(moduleToAdd, scope); + } + async scanModulesForDependencies(modules = this.container.getModules()) { + for (const [token, { metatype }] of modules) { + await this.reflectImports(metatype, token, metatype.name); + this.reflectProviders(metatype, token); + this.reflectControllers(metatype, token); + this.reflectExports(metatype, token); + } + } + async reflectImports(module3, token, context) { + const modules = [ + ...this.reflectMetadata(constants_1.MODULE_METADATA.IMPORTS, module3), + ...this.container.getDynamicMetadataByToken(token, constants_1.MODULE_METADATA.IMPORTS) + ]; + for (const related of modules) { + await this.insertImport(related, token, context); + } + } + reflectProviders(module3, token) { + const providers = [ + ...this.reflectMetadata(constants_1.MODULE_METADATA.PROVIDERS, module3), + ...this.container.getDynamicMetadataByToken(token, constants_1.MODULE_METADATA.PROVIDERS) + ]; + providers.forEach((provider) => { + this.insertProvider(provider, token); + this.reflectDynamicMetadata(provider, token); + }); + } + reflectControllers(module3, token) { + const controllers = [ + ...this.reflectMetadata(constants_1.MODULE_METADATA.CONTROLLERS, module3), + ...this.container.getDynamicMetadataByToken(token, constants_1.MODULE_METADATA.CONTROLLERS) + ]; + controllers.forEach((item) => { + this.insertController(item, token); + this.reflectDynamicMetadata(item, token); + }); + } + reflectDynamicMetadata(cls, token) { + if (!cls || !cls.prototype) { + return; + } + this.reflectInjectables(cls, token, constants_1.GUARDS_METADATA); + this.reflectInjectables(cls, token, constants_1.INTERCEPTORS_METADATA); + this.reflectInjectables(cls, token, constants_1.EXCEPTION_FILTERS_METADATA); + this.reflectInjectables(cls, token, constants_1.PIPES_METADATA); + this.reflectParamInjectables(cls, token, constants_1.ROUTE_ARGS_METADATA); + } + reflectExports(module3, token) { + const exports3 = [ + ...this.reflectMetadata(constants_1.MODULE_METADATA.EXPORTS, module3), + ...this.container.getDynamicMetadataByToken(token, constants_1.MODULE_METADATA.EXPORTS) + ]; + exports3.forEach((exportedProvider) => this.insertExportedProvider(exportedProvider, token)); + } + reflectInjectables(component, token, metadataKey) { + const controllerInjectables = this.reflectMetadata(metadataKey, component); + const methodInjectables = this.metadataScanner.getAllMethodNames(component.prototype).reduce((acc, method) => { + const methodInjectable = this.reflectKeyMetadata(component, metadataKey, method); + if (methodInjectable) { + acc.push(methodInjectable); + } + return acc; + }, []); + controllerInjectables.forEach((injectable) => this.insertInjectable(injectable, token, component, constants_1.ENHANCER_KEY_TO_SUBTYPE_MAP[metadataKey])); + methodInjectables.forEach((methodInjectable) => { + methodInjectable.metadata.forEach((injectable) => this.insertInjectable(injectable, token, component, constants_1.ENHANCER_KEY_TO_SUBTYPE_MAP[metadataKey], methodInjectable.methodKey)); + }); + } + reflectParamInjectables(component, token, metadataKey) { + const paramsMethods = this.metadataScanner.getAllMethodNames(component.prototype); + paramsMethods.forEach((methodKey) => { + const metadata = Reflect.getMetadata(metadataKey, component, methodKey); + if (!metadata) { + return; + } + const params = Object.values(metadata); + params.map((item) => item.pipes).flat(1).forEach((injectable) => this.insertInjectable(injectable, token, component, "pipe", methodKey)); + }); + } + reflectKeyMetadata(component, key, methodKey) { + let prototype = component.prototype; + do { + const descriptor = Reflect.getOwnPropertyDescriptor(prototype, methodKey); + if (!descriptor) { + continue; + } + const metadata = Reflect.getMetadata(key, descriptor.value); + if (!metadata) { + return; + } + return { methodKey, metadata }; + } while ((prototype = Reflect.getPrototypeOf(prototype)) && prototype !== Object.prototype && prototype); + return void 0; + } + calculateModulesDistance() { + const modulesGenerator = this.container.getModules().values(); + modulesGenerator.next(); + const modulesStack = []; + const calculateDistance = (moduleRef, distance = 1) => { + if (!moduleRef || modulesStack.includes(moduleRef)) { + return; + } + modulesStack.push(moduleRef); + const moduleImports = moduleRef.imports; + moduleImports.forEach((importedModuleRef) => { + if (importedModuleRef) { + if (distance > importedModuleRef.distance) { + importedModuleRef.distance = distance; + } + calculateDistance(importedModuleRef, distance + 1); + } + }); + }; + const rootModule = modulesGenerator.next().value; + calculateDistance(rootModule); + } + async insertImport(related, token, context) { + if ((0, shared_utils_1.isUndefined)(related)) { + throw new circular_dependency_exception_1.CircularDependencyException(context); + } + if (this.isForwardReference(related)) { + return this.container.addImport(related.forwardRef(), token); + } + await this.container.addImport(related, token); + } + isCustomProvider(provider) { + return provider && !(0, shared_utils_1.isNil)(provider.provide); + } + insertProvider(provider, token) { + const isCustomProvider = this.isCustomProvider(provider); + if (!isCustomProvider) { + return this.container.addProvider(provider, token); + } + const applyProvidersMap = this.getApplyProvidersMap(); + const providersKeys = Object.keys(applyProvidersMap); + const type = provider.provide; + if (!providersKeys.includes(type)) { + return this.container.addProvider(provider, token); + } + const uuid = uuid_factory_1.UuidFactory.get(type.toString()); + const providerToken = `${type} (UUID: ${uuid})`; + let scope = provider.scope; + if ((0, shared_utils_1.isNil)(scope) && provider.useClass) { + scope = (0, get_class_scope_1.getClassScope)(provider.useClass); + } + this.applicationProvidersApplyMap.push({ + type, + moduleKey: token, + providerKey: providerToken, + scope + }); + const newProvider = { + ...provider, + provide: providerToken, + scope + }; + const enhancerSubtype = constants_2.ENHANCER_TOKEN_TO_SUBTYPE_MAP[type]; + const factoryOrClassProvider = newProvider; + if (this.isRequestOrTransient(factoryOrClassProvider.scope)) { + return this.container.addInjectable(newProvider, token, enhancerSubtype); + } + this.container.addProvider(newProvider, token, enhancerSubtype); + } + insertInjectable(injectable, token, host, subtype, methodKey) { + if ((0, shared_utils_1.isFunction)(injectable)) { + const instanceWrapper = this.container.addInjectable(injectable, token, subtype, host); + this.graphInspector.insertEnhancerMetadataCache({ + moduleToken: token, + classRef: host, + enhancerInstanceWrapper: instanceWrapper, + targetNodeId: instanceWrapper.id, + subtype, + methodKey + }); + return instanceWrapper; + } else { + this.graphInspector.insertEnhancerMetadataCache({ + moduleToken: token, + classRef: host, + enhancerRef: injectable, + methodKey, + subtype + }); + } + } + insertExportedProvider(exportedProvider, token) { + const fulfilledProvider = this.isForwardReference(exportedProvider) ? exportedProvider.forwardRef() : exportedProvider; + this.container.addExportedProvider(fulfilledProvider, token); + } + insertController(controller, token) { + this.container.addController(controller, token); + } + insertOrOverrideModule(moduleDefinition, overrides, scope) { + const overrideModule = this.getOverrideModuleByModule(moduleDefinition, overrides); + if (overrideModule !== void 0) { + return this.overrideModule(moduleDefinition, overrideModule.newModule, scope); + } + return this.insertModule(moduleDefinition, scope); + } + getOverrideModuleByModule(module3, overrides) { + if (this.isForwardReference(module3)) { + return overrides.find((moduleToOverride) => { + return moduleToOverride.moduleToReplace === module3.forwardRef() || moduleToOverride.moduleToReplace.forwardRef?.() === module3.forwardRef(); + }); + } + return overrides.find((moduleToOverride) => moduleToOverride.moduleToReplace === module3); + } + async overrideModule(moduleToOverride, newModule, scope) { + return this.container.replaceModule(this.isForwardReference(moduleToOverride) ? moduleToOverride.forwardRef() : moduleToOverride, this.isForwardReference(newModule) ? newModule.forwardRef() : newModule, scope); + } + reflectMetadata(metadataKey, metatype) { + return Reflect.getMetadata(metadataKey, metatype) || []; + } + async registerCoreModule(overrides) { + const moduleDefinition = internal_core_module_factory_1.InternalCoreModuleFactory.create(this.container, this, this.container.getModuleCompiler(), this.container.getHttpAdapterHostRef(), this.graphInspector, overrides); + const [instance] = await this.scanForModules({ + moduleDefinition, + overrides + }); + this.container.registerCoreModuleRef(instance); + } + /** + * Add either request or transient globally scoped enhancers + * to all controllers metadata storage + */ + addScopedEnhancersMetadata() { + (0, iterare_1.iterate)(this.applicationProvidersApplyMap).filter((wrapper) => this.isRequestOrTransient(wrapper.scope)).forEach(({ moduleKey, providerKey }) => { + const modulesContainer = this.container.getModules(); + const { injectables } = modulesContainer.get(moduleKey); + const instanceWrapper = injectables.get(providerKey); + const iterableIterator = modulesContainer.values(); + (0, iterare_1.iterate)(iterableIterator).map((moduleRef) => Array.from(moduleRef.controllers.values()).concat(moduleRef.entryProviders)).flatten().forEach((controllerOrEntryProvider) => controllerOrEntryProvider.addEnhancerMetadata(instanceWrapper)); + }); + } + applyApplicationProviders() { + const applyProvidersMap = this.getApplyProvidersMap(); + const applyRequestProvidersMap = this.getApplyRequestProvidersMap(); + const getInstanceWrapper = (moduleKey, providerKey, collectionKey) => { + const modules = this.container.getModules(); + const collection = modules.get(moduleKey)[collectionKey]; + return collection.get(providerKey); + }; + this.applicationProvidersApplyMap.forEach(({ moduleKey, providerKey, type, scope }) => { + let instanceWrapper; + if (this.isRequestOrTransient(scope)) { + instanceWrapper = getInstanceWrapper(moduleKey, providerKey, "injectables"); + this.graphInspector.insertAttachedEnhancer(instanceWrapper); + return applyRequestProvidersMap[type](instanceWrapper); + } + instanceWrapper = getInstanceWrapper(moduleKey, providerKey, "providers"); + this.graphInspector.insertAttachedEnhancer(instanceWrapper); + applyProvidersMap[type](instanceWrapper.instance); + }); + } + getApplyProvidersMap() { + return { + [constants_2.APP_INTERCEPTOR]: (interceptor) => this.applicationConfig.addGlobalInterceptor(interceptor), + [constants_2.APP_PIPE]: (pipe) => this.applicationConfig.addGlobalPipe(pipe), + [constants_2.APP_GUARD]: (guard) => this.applicationConfig.addGlobalGuard(guard), + [constants_2.APP_FILTER]: (filter) => this.applicationConfig.addGlobalFilter(filter) + }; + } + getApplyRequestProvidersMap() { + return { + [constants_2.APP_INTERCEPTOR]: (interceptor) => this.applicationConfig.addGlobalRequestInterceptor(interceptor), + [constants_2.APP_PIPE]: (pipe) => this.applicationConfig.addGlobalRequestPipe(pipe), + [constants_2.APP_GUARD]: (guard) => this.applicationConfig.addGlobalRequestGuard(guard), + [constants_2.APP_FILTER]: (filter) => this.applicationConfig.addGlobalRequestFilter(filter) + }; + } + isDynamicModule(module3) { + return module3 && !!module3.module; + } + /** + * @param metatype + * @returns `true` if `metatype` is annotated with the `@Injectable()` decorator. + */ + isInjectable(metatype) { + return !!Reflect.getMetadata(constants_1.INJECTABLE_WATERMARK, metatype); + } + /** + * @param metatype + * @returns `true` if `metatype` is annotated with the `@Controller()` decorator. + */ + isController(metatype) { + return !!Reflect.getMetadata(constants_1.CONTROLLER_WATERMARK, metatype); + } + /** + * @param metatype + * @returns `true` if `metatype` is annotated with the `@Catch()` decorator. + */ + isExceptionFilter(metatype) { + return !!Reflect.getMetadata(constants_1.CATCH_WATERMARK, metatype); + } + isForwardReference(module3) { + return module3 && !!module3.forwardRef; + } + isRequestOrTransient(scope) { + return scope === interfaces_1.Scope.REQUEST || scope === interfaces_1.Scope.TRANSIENT; + } + }; + exports2.DependenciesScanner = DependenciesScanner; + } +}); + +// ../../node_modules/.pnpm/depd@2.0.0/node_modules/depd/index.js +var require_depd = __commonJS({ + "../../node_modules/.pnpm/depd@2.0.0/node_modules/depd/index.js"(exports2, module2) { + var relative = require("path").relative; + module2.exports = depd; + var basePath = process.cwd(); + function containsNamespace(str, namespace) { + var vals = str.split(/[ ,]+/); + var ns = String(namespace).toLowerCase(); + for (var i = 0; i < vals.length; i++) { + var val = vals[i]; + if (val && (val === "*" || val.toLowerCase() === ns)) { + return true; + } + } + return false; + } + function convertDataDescriptorToAccessor(obj2, prop, message) { + var descriptor = Object.getOwnPropertyDescriptor(obj2, prop); + var value = descriptor.value; + descriptor.get = function getter() { + return value; + }; + if (descriptor.writable) { + descriptor.set = function setter(val) { + return value = val; + }; + } + delete descriptor.value; + delete descriptor.writable; + Object.defineProperty(obj2, prop, descriptor); + return descriptor; + } + function createArgumentsString(arity) { + var str = ""; + for (var i = 0; i < arity; i++) { + str += ", arg" + i; + } + return str.substr(2); + } + function createStackString(stack) { + var str = this.name + ": " + this.namespace; + if (this.message) { + str += " deprecated " + this.message; + } + for (var i = 0; i < stack.length; i++) { + str += "\n at " + stack[i].toString(); + } + return str; + } + function depd(namespace) { + if (!namespace) { + throw new TypeError("argument namespace is required"); + } + var stack = getStack(); + var site = callSiteLocation(stack[1]); + var file2 = site[0]; + function deprecate(message) { + log.call(deprecate, message); + } + deprecate._file = file2; + deprecate._ignored = isignored(namespace); + deprecate._namespace = namespace; + deprecate._traced = istraced(namespace); + deprecate._warned = /* @__PURE__ */ Object.create(null); + deprecate.function = wrapfunction; + deprecate.property = wrapproperty; + return deprecate; + } + function eehaslisteners(emitter, type) { + var count = typeof emitter.listenerCount !== "function" ? emitter.listeners(type).length : emitter.listenerCount(type); + return count > 0; + } + function isignored(namespace) { + if (process.noDeprecation) { + return true; + } + var str = process.env.NO_DEPRECATION || ""; + return containsNamespace(str, namespace); + } + function istraced(namespace) { + if (process.traceDeprecation) { + return true; + } + var str = process.env.TRACE_DEPRECATION || ""; + return containsNamespace(str, namespace); + } + function log(message, site) { + var haslisteners = eehaslisteners(process, "deprecation"); + if (!haslisteners && this._ignored) { + return; + } + var caller; + var callFile; + var callSite; + var depSite; + var i = 0; + var seen = false; + var stack = getStack(); + var file2 = this._file; + if (site) { + depSite = site; + callSite = callSiteLocation(stack[1]); + callSite.name = depSite.name; + file2 = callSite[0]; + } else { + i = 2; + depSite = callSiteLocation(stack[i]); + callSite = depSite; + } + for (; i < stack.length; i++) { + caller = callSiteLocation(stack[i]); + callFile = caller[0]; + if (callFile === file2) { + seen = true; + } else if (callFile === this._file) { + file2 = this._file; + } else if (seen) { + break; + } + } + var key = caller ? depSite.join(":") + "__" + caller.join(":") : void 0; + if (key !== void 0 && key in this._warned) { + return; + } + this._warned[key] = true; + var msg = message; + if (!msg) { + msg = callSite === depSite || !callSite.name ? defaultMessage(depSite) : defaultMessage(callSite); + } + if (haslisteners) { + var err = DeprecationError(this._namespace, msg, stack.slice(i)); + process.emit("deprecation", err); + return; + } + var format = process.stderr.isTTY ? formatColor : formatPlain; + var output = format.call(this, msg, caller, stack.slice(i)); + process.stderr.write(output + "\n", "utf8"); + } + function callSiteLocation(callSite) { + var file2 = callSite.getFileName() || ""; + var line = callSite.getLineNumber(); + var colm = callSite.getColumnNumber(); + if (callSite.isEval()) { + file2 = callSite.getEvalOrigin() + ", " + file2; + } + var site = [file2, line, colm]; + site.callSite = callSite; + site.name = callSite.getFunctionName(); + return site; + } + function defaultMessage(site) { + var callSite = site.callSite; + var funcName = site.name; + if (!funcName) { + funcName = ""; + } + var context = callSite.getThis(); + var typeName = context && callSite.getTypeName(); + if (typeName === "Object") { + typeName = void 0; + } + if (typeName === "Function") { + typeName = context.name || typeName; + } + return typeName && callSite.getMethodName() ? typeName + "." + funcName : funcName; + } + function formatPlain(msg, caller, stack) { + var timestamp = (/* @__PURE__ */ new Date()).toUTCString(); + var formatted = timestamp + " " + this._namespace + " deprecated " + msg; + if (this._traced) { + for (var i = 0; i < stack.length; i++) { + formatted += "\n at " + stack[i].toString(); + } + return formatted; + } + if (caller) { + formatted += " at " + formatLocation(caller); + } + return formatted; + } + function formatColor(msg, caller, stack) { + var formatted = "\x1B[36;1m" + this._namespace + "\x1B[22;39m \x1B[33;1mdeprecated\x1B[22;39m \x1B[0m" + msg + "\x1B[39m"; + if (this._traced) { + for (var i = 0; i < stack.length; i++) { + formatted += "\n \x1B[36mat " + stack[i].toString() + "\x1B[39m"; + } + return formatted; + } + if (caller) { + formatted += " \x1B[36m" + formatLocation(caller) + "\x1B[39m"; + } + return formatted; + } + function formatLocation(callSite) { + return relative(basePath, callSite[0]) + ":" + callSite[1] + ":" + callSite[2]; + } + function getStack() { + var limit = Error.stackTraceLimit; + var obj2 = {}; + var prep = Error.prepareStackTrace; + Error.prepareStackTrace = prepareObjectStackTrace; + Error.stackTraceLimit = Math.max(10, limit); + Error.captureStackTrace(obj2); + var stack = obj2.stack.slice(1); + Error.prepareStackTrace = prep; + Error.stackTraceLimit = limit; + return stack; + } + function prepareObjectStackTrace(obj2, stack) { + return stack; + } + function wrapfunction(fn, message) { + if (typeof fn !== "function") { + throw new TypeError("argument fn must be a function"); + } + var args = createArgumentsString(fn.length); + var stack = getStack(); + var site = callSiteLocation(stack[1]); + site.name = fn.name; + var deprecatedfn = new Function( + "fn", + "log", + "deprecate", + "message", + "site", + '"use strict"\nreturn function (' + args + ") {log.call(deprecate, message, site)\nreturn fn.apply(this, arguments)\n}" + )(fn, log, this, message, site); + return deprecatedfn; + } + function wrapproperty(obj2, prop, message) { + if (!obj2 || typeof obj2 !== "object" && typeof obj2 !== "function") { + throw new TypeError("argument obj must be object"); + } + var descriptor = Object.getOwnPropertyDescriptor(obj2, prop); + if (!descriptor) { + throw new TypeError("must call property on owner object"); + } + if (!descriptor.configurable) { + throw new TypeError("property must be configurable"); + } + var deprecate = this; + var stack = getStack(); + var site = callSiteLocation(stack[1]); + site.name = prop; + if ("value" in descriptor) { + descriptor = convertDataDescriptorToAccessor(obj2, prop, message); + } + var get = descriptor.get; + var set = descriptor.set; + if (typeof get === "function") { + descriptor.get = function getter() { + log.call(deprecate, message, site); + return get.apply(this, arguments); + }; + } + if (typeof set === "function") { + descriptor.set = function setter() { + log.call(deprecate, message, site); + return set.apply(this, arguments); + }; + } + Object.defineProperty(obj2, prop, descriptor); + } + function DeprecationError(namespace, message, stack) { + var error = new Error(); + var stackString; + Object.defineProperty(error, "constructor", { + value: DeprecationError + }); + Object.defineProperty(error, "message", { + configurable: true, + enumerable: false, + value: message, + writable: true + }); + Object.defineProperty(error, "name", { + enumerable: false, + configurable: true, + value: "DeprecationError", + writable: true + }); + Object.defineProperty(error, "namespace", { + configurable: true, + enumerable: false, + value: namespace, + writable: true + }); + Object.defineProperty(error, "stack", { + configurable: true, + enumerable: false, + get: function() { + if (stackString !== void 0) { + return stackString; + } + return stackString = createStackString.call(this, stack); + }, + set: function setter(val) { + stackString = val; + } + }); + return error; + } + } +}); + +// ../../node_modules/.pnpm/bytes@3.1.2/node_modules/bytes/index.js +var require_bytes = __commonJS({ + "../../node_modules/.pnpm/bytes@3.1.2/node_modules/bytes/index.js"(exports2, module2) { + "use strict"; + module2.exports = bytes; + module2.exports.format = format; + module2.exports.parse = parse2; + var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g; + var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/; + var map = { + b: 1, + kb: 1 << 10, + mb: 1 << 20, + gb: 1 << 30, + tb: Math.pow(1024, 4), + pb: Math.pow(1024, 5) + }; + var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i; + function bytes(value, options) { + if (typeof value === "string") { + return parse2(value); + } + if (typeof value === "number") { + return format(value, options); + } + return null; + } + function format(value, options) { + if (!Number.isFinite(value)) { + return null; + } + var mag = Math.abs(value); + var thousandsSeparator = options && options.thousandsSeparator || ""; + var unitSeparator = options && options.unitSeparator || ""; + var decimalPlaces = options && options.decimalPlaces !== void 0 ? options.decimalPlaces : 2; + var fixedDecimals = Boolean(options && options.fixedDecimals); + var unit = options && options.unit || ""; + if (!unit || !map[unit.toLowerCase()]) { + if (mag >= map.pb) { + unit = "PB"; + } else if (mag >= map.tb) { + unit = "TB"; + } else if (mag >= map.gb) { + unit = "GB"; + } else if (mag >= map.mb) { + unit = "MB"; + } else if (mag >= map.kb) { + unit = "KB"; + } else { + unit = "B"; + } + } + var val = value / map[unit.toLowerCase()]; + var str = val.toFixed(decimalPlaces); + if (!fixedDecimals) { + str = str.replace(formatDecimalsRegExp, "$1"); + } + if (thousandsSeparator) { + str = str.split(".").map(function(s, i) { + return i === 0 ? s.replace(formatThousandsRegExp, thousandsSeparator) : s; + }).join("."); + } + return str + unitSeparator + unit; + } + function parse2(val) { + if (typeof val === "number" && !isNaN(val)) { + return val; + } + if (typeof val !== "string") { + return null; + } + var results = parseRegExp.exec(val); + var floatValue; + var unit = "b"; + if (!results) { + floatValue = parseInt(val, 10); + unit = "b"; + } else { + floatValue = parseFloat(results[1]); + unit = results[4].toLowerCase(); + } + if (isNaN(floatValue)) { + return null; + } + return Math.floor(map[unit] * floatValue); + } + } +}); + +// ../../node_modules/.pnpm/content-type@1.0.5/node_modules/content-type/index.js +var require_content_type = __commonJS({ + "../../node_modules/.pnpm/content-type@1.0.5/node_modules/content-type/index.js"(exports2) { + "use strict"; + var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g; + var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/; + var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/; + var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g; + var QUOTE_REGEXP = /([\\"])/g; + var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/; + exports2.format = format; + exports2.parse = parse2; + function format(obj2) { + if (!obj2 || typeof obj2 !== "object") { + throw new TypeError("argument obj is required"); + } + var parameters = obj2.parameters; + var type = obj2.type; + if (!type || !TYPE_REGEXP.test(type)) { + throw new TypeError("invalid type"); + } + var string = type; + if (parameters && typeof parameters === "object") { + var param; + var params = Object.keys(parameters).sort(); + for (var i = 0; i < params.length; i++) { + param = params[i]; + if (!TOKEN_REGEXP.test(param)) { + throw new TypeError("invalid parameter name"); + } + string += "; " + param + "=" + qstring(parameters[param]); + } + } + return string; + } + function parse2(string) { + if (!string) { + throw new TypeError("argument string is required"); + } + var header = typeof string === "object" ? getcontenttype(string) : string; + if (typeof header !== "string") { + throw new TypeError("argument string is required to be a string"); + } + var index = header.indexOf(";"); + var type = index !== -1 ? header.slice(0, index).trim() : header.trim(); + if (!TYPE_REGEXP.test(type)) { + throw new TypeError("invalid media type"); + } + var obj2 = new ContentType(type.toLowerCase()); + if (index !== -1) { + var key; + var match; + var value; + PARAM_REGEXP.lastIndex = index; + while (match = PARAM_REGEXP.exec(header)) { + if (match.index !== index) { + throw new TypeError("invalid parameter format"); + } + index += match[0].length; + key = match[1].toLowerCase(); + value = match[2]; + if (value.charCodeAt(0) === 34) { + value = value.slice(1, -1); + if (value.indexOf("\\") !== -1) { + value = value.replace(QESC_REGEXP, "$1"); + } + } + obj2.parameters[key] = value; + } + if (index !== header.length) { + throw new TypeError("invalid parameter format"); + } + } + return obj2; + } + function getcontenttype(obj2) { + var header; + if (typeof obj2.getHeader === "function") { + header = obj2.getHeader("content-type"); + } else if (typeof obj2.headers === "object") { + header = obj2.headers && obj2.headers["content-type"]; + } + if (typeof header !== "string") { + throw new TypeError("content-type header is missing from object"); + } + return header; + } + function qstring(val) { + var str = String(val); + if (TOKEN_REGEXP.test(str)) { + return str; + } + if (str.length > 0 && !TEXT_REGEXP.test(str)) { + throw new TypeError("invalid parameter value"); + } + return '"' + str.replace(QUOTE_REGEXP, "\\$1") + '"'; + } + function ContentType(type) { + this.parameters = /* @__PURE__ */ Object.create(null); + this.type = type; + } + } +}); + +// ../../node_modules/.pnpm/setprototypeof@1.2.0/node_modules/setprototypeof/index.js +var require_setprototypeof = __commonJS({ + "../../node_modules/.pnpm/setprototypeof@1.2.0/node_modules/setprototypeof/index.js"(exports2, module2) { + "use strict"; + module2.exports = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties); + function setProtoOf(obj2, proto) { + obj2.__proto__ = proto; + return obj2; + } + function mixinProperties(obj2, proto) { + for (var prop in proto) { + if (!Object.prototype.hasOwnProperty.call(obj2, prop)) { + obj2[prop] = proto[prop]; + } + } + return obj2; + } + } +}); + +// ../../node_modules/.pnpm/statuses@2.0.2/node_modules/statuses/codes.json +var require_codes = __commonJS({ + "../../node_modules/.pnpm/statuses@2.0.2/node_modules/statuses/codes.json"(exports2, module2) { + module2.exports = { + "100": "Continue", + "101": "Switching Protocols", + "102": "Processing", + "103": "Early Hints", + "200": "OK", + "201": "Created", + "202": "Accepted", + "203": "Non-Authoritative Information", + "204": "No Content", + "205": "Reset Content", + "206": "Partial Content", + "207": "Multi-Status", + "208": "Already Reported", + "226": "IM Used", + "300": "Multiple Choices", + "301": "Moved Permanently", + "302": "Found", + "303": "See Other", + "304": "Not Modified", + "305": "Use Proxy", + "307": "Temporary Redirect", + "308": "Permanent Redirect", + "400": "Bad Request", + "401": "Unauthorized", + "402": "Payment Required", + "403": "Forbidden", + "404": "Not Found", + "405": "Method Not Allowed", + "406": "Not Acceptable", + "407": "Proxy Authentication Required", + "408": "Request Timeout", + "409": "Conflict", + "410": "Gone", + "411": "Length Required", + "412": "Precondition Failed", + "413": "Payload Too Large", + "414": "URI Too Long", + "415": "Unsupported Media Type", + "416": "Range Not Satisfiable", + "417": "Expectation Failed", + "418": "I'm a Teapot", + "421": "Misdirected Request", + "422": "Unprocessable Entity", + "423": "Locked", + "424": "Failed Dependency", + "425": "Too Early", + "426": "Upgrade Required", + "428": "Precondition Required", + "429": "Too Many Requests", + "431": "Request Header Fields Too Large", + "451": "Unavailable For Legal Reasons", + "500": "Internal Server Error", + "501": "Not Implemented", + "502": "Bad Gateway", + "503": "Service Unavailable", + "504": "Gateway Timeout", + "505": "HTTP Version Not Supported", + "506": "Variant Also Negotiates", + "507": "Insufficient Storage", + "508": "Loop Detected", + "509": "Bandwidth Limit Exceeded", + "510": "Not Extended", + "511": "Network Authentication Required" + }; + } +}); + +// ../../node_modules/.pnpm/statuses@2.0.2/node_modules/statuses/index.js +var require_statuses = __commonJS({ + "../../node_modules/.pnpm/statuses@2.0.2/node_modules/statuses/index.js"(exports2, module2) { + "use strict"; + var codes = require_codes(); + module2.exports = status; + status.message = codes; + status.code = createMessageToStatusCodeMap(codes); + status.codes = createStatusCodeList(codes); + status.redirect = { + 300: true, + 301: true, + 302: true, + 303: true, + 305: true, + 307: true, + 308: true + }; + status.empty = { + 204: true, + 205: true, + 304: true + }; + status.retry = { + 502: true, + 503: true, + 504: true + }; + function createMessageToStatusCodeMap(codes2) { + var map = {}; + Object.keys(codes2).forEach(function forEachCode(code) { + var message = codes2[code]; + var status2 = Number(code); + map[message.toLowerCase()] = status2; + }); + return map; + } + function createStatusCodeList(codes2) { + return Object.keys(codes2).map(function mapCode(code) { + return Number(code); + }); + } + function getStatusCode(message) { + var msg = message.toLowerCase(); + if (!Object.prototype.hasOwnProperty.call(status.code, msg)) { + throw new Error('invalid status message: "' + message + '"'); + } + return status.code[msg]; + } + function getStatusMessage(code) { + if (!Object.prototype.hasOwnProperty.call(status.message, code)) { + throw new Error("invalid status code: " + code); + } + return status.message[code]; + } + function status(code) { + if (typeof code === "number") { + return getStatusMessage(code); + } + if (typeof code !== "string") { + throw new TypeError("code must be a number or string"); + } + var n = parseInt(code, 10); + if (!isNaN(n)) { + return getStatusMessage(n); + } + return getStatusCode(code); + } + } +}); + +// ../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js +var require_inherits_browser = __commonJS({ + "../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(exports2, module2) { + if (typeof Object.create === "function") { + module2.exports = function inherits2(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + } + }; + } else { + module2.exports = function inherits2(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + var TempCtor = function() { + }; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + }; + } + } +}); + +// ../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js +var require_inherits = __commonJS({ + "../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js"(exports2, module2) { + try { + util2 = require("util"); + if (typeof util2.inherits !== "function") throw ""; + module2.exports = util2.inherits; + } catch (e) { + module2.exports = require_inherits_browser(); + } + var util2; + } +}); + +// ../../node_modules/.pnpm/toidentifier@1.0.1/node_modules/toidentifier/index.js +var require_toidentifier = __commonJS({ + "../../node_modules/.pnpm/toidentifier@1.0.1/node_modules/toidentifier/index.js"(exports2, module2) { + "use strict"; + module2.exports = toIdentifier; + function toIdentifier(str) { + return str.split(" ").map(function(token) { + return token.slice(0, 1).toUpperCase() + token.slice(1); + }).join("").replace(/[^ _0-9a-z]/gi, ""); + } + } +}); + +// ../../node_modules/.pnpm/http-errors@2.0.1/node_modules/http-errors/index.js +var require_http_errors = __commonJS({ + "../../node_modules/.pnpm/http-errors@2.0.1/node_modules/http-errors/index.js"(exports2, module2) { + "use strict"; + var deprecate = require_depd()("http-errors"); + var setPrototypeOf = require_setprototypeof(); + var statuses = require_statuses(); + var inherits2 = require_inherits(); + var toIdentifier = require_toidentifier(); + module2.exports = createError; + module2.exports.HttpError = createHttpErrorConstructor(); + module2.exports.isHttpError = createIsHttpErrorFunction(module2.exports.HttpError); + populateConstructorExports(module2.exports, statuses.codes, module2.exports.HttpError); + function codeClass(status) { + return Number(String(status).charAt(0) + "00"); + } + function createError() { + var err; + var msg; + var status = 500; + var props = {}; + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + var type = typeof arg; + if (type === "object" && arg instanceof Error) { + err = arg; + status = err.status || err.statusCode || status; + } else if (type === "number" && i === 0) { + status = arg; + } else if (type === "string") { + msg = arg; + } else if (type === "object") { + props = arg; + } else { + throw new TypeError("argument #" + (i + 1) + " unsupported type " + type); + } + } + if (typeof status === "number" && (status < 400 || status >= 600)) { + deprecate("non-error status code; use only 4xx or 5xx status codes"); + } + if (typeof status !== "number" || !statuses.message[status] && (status < 400 || status >= 600)) { + status = 500; + } + var HttpError = createError[status] || createError[codeClass(status)]; + if (!err) { + err = HttpError ? new HttpError(msg) : new Error(msg || statuses.message[status]); + Error.captureStackTrace(err, createError); + } + if (!HttpError || !(err instanceof HttpError) || err.status !== status) { + err.expose = status < 500; + err.status = err.statusCode = status; + } + for (var key in props) { + if (key !== "status" && key !== "statusCode") { + err[key] = props[key]; + } + } + return err; + } + function createHttpErrorConstructor() { + function HttpError() { + throw new TypeError("cannot construct abstract class"); + } + inherits2(HttpError, Error); + return HttpError; + } + function createClientErrorConstructor(HttpError, name, code) { + var className = toClassName(name); + function ClientError(message) { + var msg = message != null ? message : statuses.message[code]; + var err = new Error(msg); + Error.captureStackTrace(err, ClientError); + setPrototypeOf(err, ClientError.prototype); + Object.defineProperty(err, "message", { + enumerable: true, + configurable: true, + value: msg, + writable: true + }); + Object.defineProperty(err, "name", { + enumerable: false, + configurable: true, + value: className, + writable: true + }); + return err; + } + inherits2(ClientError, HttpError); + nameFunc(ClientError, className); + ClientError.prototype.status = code; + ClientError.prototype.statusCode = code; + ClientError.prototype.expose = true; + return ClientError; + } + function createIsHttpErrorFunction(HttpError) { + return function isHttpError(val) { + if (!val || typeof val !== "object") { + return false; + } + if (val instanceof HttpError) { + return true; + } + return val instanceof Error && typeof val.expose === "boolean" && typeof val.statusCode === "number" && val.status === val.statusCode; + }; + } + function createServerErrorConstructor(HttpError, name, code) { + var className = toClassName(name); + function ServerError(message) { + var msg = message != null ? message : statuses.message[code]; + var err = new Error(msg); + Error.captureStackTrace(err, ServerError); + setPrototypeOf(err, ServerError.prototype); + Object.defineProperty(err, "message", { + enumerable: true, + configurable: true, + value: msg, + writable: true + }); + Object.defineProperty(err, "name", { + enumerable: false, + configurable: true, + value: className, + writable: true + }); + return err; + } + inherits2(ServerError, HttpError); + nameFunc(ServerError, className); + ServerError.prototype.status = code; + ServerError.prototype.statusCode = code; + ServerError.prototype.expose = false; + return ServerError; + } + function nameFunc(func, name) { + var desc = Object.getOwnPropertyDescriptor(func, "name"); + if (desc && desc.configurable) { + desc.value = name; + Object.defineProperty(func, "name", desc); + } + } + function populateConstructorExports(exports3, codes, HttpError) { + codes.forEach(function forEachCode(code) { + var CodeError; + var name = toIdentifier(statuses.message[code]); + switch (codeClass(code)) { + case 400: + CodeError = createClientErrorConstructor(HttpError, name, code); + break; + case 500: + CodeError = createServerErrorConstructor(HttpError, name, code); + break; + } + if (CodeError) { + exports3[code] = CodeError; + exports3[name] = CodeError; + } + }); + } + function toClassName(name) { + return name.slice(-5) === "Error" ? name : name + "Error"; + } + } +}); + +// ../../node_modules/.pnpm/ms@2.0.0/node_modules/ms/index.js +var require_ms = __commonJS({ + "../../node_modules/.pnpm/ms@2.0.0/node_modules/ms/index.js"(exports2, module2) { + var s = 1e3; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var y = d * 365.25; + module2.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === "string" && val.length > 0) { + return parse2(val); + } else if (type === "number" && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) + ); + }; + function parse2(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || "ms").toLowerCase(); + switch (type) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return n * y; + case "days": + case "day": + case "d": + return n * d; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return n * h; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return n * m; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return n * s; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return n; + default: + return void 0; + } + } + function fmtShort(ms) { + if (ms >= d) { + return Math.round(ms / d) + "d"; + } + if (ms >= h) { + return Math.round(ms / h) + "h"; + } + if (ms >= m) { + return Math.round(ms / m) + "m"; + } + if (ms >= s) { + return Math.round(ms / s) + "s"; + } + return ms + "ms"; + } + function fmtLong(ms) { + return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms"; + } + function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + " " + name; + } + return Math.ceil(ms / n) + " " + name + "s"; + } + } +}); + +// ../../node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/debug.js +var require_debug = __commonJS({ + "../../node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/debug.js"(exports2, module2) { + exports2 = module2.exports = createDebug.debug = createDebug["default"] = createDebug; + exports2.coerce = coerce; + exports2.disable = disable; + exports2.enable = enable; + exports2.enabled = enabled; + exports2.humanize = require_ms(); + exports2.names = []; + exports2.skips = []; + exports2.formatters = {}; + var prevTime; + function selectColor(namespace) { + var hash = 0, i; + for (i in namespace) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; + } + return exports2.colors[Math.abs(hash) % exports2.colors.length]; + } + function createDebug(namespace) { + function debug() { + if (!debug.enabled) return; + var self2 = debug; + var curr = +/* @__PURE__ */ new Date(); + var ms = curr - (prevTime || curr); + self2.diff = ms; + self2.prev = prevTime; + self2.curr = curr; + prevTime = curr; + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + args[0] = exports2.coerce(args[0]); + if ("string" !== typeof args[0]) { + args.unshift("%O"); + } + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { + if (match === "%%") return match; + index++; + var formatter = exports2.formatters[format]; + if ("function" === typeof formatter) { + var val = args[index]; + match = formatter.call(self2, val); + args.splice(index, 1); + index--; + } + return match; + }); + exports2.formatArgs.call(self2, args); + var logFn = debug.log || exports2.log || console.log.bind(console); + logFn.apply(self2, args); + } + debug.namespace = namespace; + debug.enabled = exports2.enabled(namespace); + debug.useColors = exports2.useColors(); + debug.color = selectColor(namespace); + if ("function" === typeof exports2.init) { + exports2.init(debug); + } + return debug; + } + function enable(namespaces) { + exports2.save(namespaces); + exports2.names = []; + exports2.skips = []; + var split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); + var len = split.length; + for (var i = 0; i < len; i++) { + if (!split[i]) continue; + namespaces = split[i].replace(/\*/g, ".*?"); + if (namespaces[0] === "-") { + exports2.skips.push(new RegExp("^" + namespaces.substr(1) + "$")); + } else { + exports2.names.push(new RegExp("^" + namespaces + "$")); + } + } + } + function disable() { + exports2.enable(""); + } + function enabled(name) { + var i, len; + for (i = 0, len = exports2.skips.length; i < len; i++) { + if (exports2.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports2.names.length; i < len; i++) { + if (exports2.names[i].test(name)) { + return true; + } + } + return false; + } + function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; + } + } +}); + +// ../../node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/browser.js +var require_browser = __commonJS({ + "../../node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/browser.js"(exports2, module2) { + exports2 = module2.exports = require_debug(); + exports2.log = log; + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.storage = "undefined" != typeof chrome && "undefined" != typeof chrome.storage ? chrome.storage.local : localstorage(); + exports2.colors = [ + "lightseagreen", + "forestgreen", + "goldenrod", + "dodgerblue", + "darkorchid", + "crimson" + ]; + function useColors() { + if (typeof window !== "undefined" && window.process && window.process.type === "renderer") { + return true; + } + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // is firebug? http://stackoverflow.com/a/398120/376773 + typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // double check webkit in userAgent just in case we are in a worker + typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + } + exports2.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return "[UnexpectedJSONParseError]: " + err.message; + } + }; + function formatArgs(args) { + var useColors2 = this.useColors; + args[0] = (useColors2 ? "%c" : "") + this.namespace + (useColors2 ? " %c" : " ") + args[0] + (useColors2 ? "%c " : " ") + "+" + exports2.humanize(this.diff); + if (!useColors2) return; + var c = "color: " + this.color; + args.splice(1, 0, c, "color: inherit"); + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function(match) { + if ("%%" === match) return; + index++; + if ("%c" === match) { + lastC = index; + } + }); + args.splice(lastC, 0, c); + } + function log() { + return "object" === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments); + } + function save(namespaces) { + try { + if (null == namespaces) { + exports2.storage.removeItem("debug"); + } else { + exports2.storage.debug = namespaces; + } + } catch (e) { + } + } + function load() { + var r; + try { + r = exports2.storage.debug; + } catch (e) { + } + if (!r && typeof process !== "undefined" && "env" in process) { + r = process.env.DEBUG; + } + return r; + } + exports2.enable(load()); + function localstorage() { + try { + return window.localStorage; + } catch (e) { + } + } + } +}); + +// ../../node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/node.js +var require_node = __commonJS({ + "../../node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/node.js"(exports2, module2) { + var tty2 = require("tty"); + var util2 = require("util"); + exports2 = module2.exports = require_debug(); + exports2.init = init; + exports2.log = log; + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.colors = [6, 2, 3, 4, 5, 1]; + exports2.inspectOpts = Object.keys(process.env).filter(function(key) { + return /^debug_/i.test(key); + }).reduce(function(obj2, key) { + var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_2, k) { + return k.toUpperCase(); + }); + var val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) val = true; + else if (/^(no|off|false|disabled)$/i.test(val)) val = false; + else if (val === "null") val = null; + else val = Number(val); + obj2[prop] = val; + return obj2; + }, {}); + var fd = parseInt(process.env.DEBUG_FD, 10) || 2; + if (1 !== fd && 2 !== fd) { + util2.deprecate(function() { + }, "except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")(); + } + var stream = 1 === fd ? process.stdout : 2 === fd ? process.stderr : createWritableStdioStream(fd); + function useColors() { + return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty2.isatty(fd); + } + exports2.formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util2.inspect(v, this.inspectOpts).split("\n").map(function(str) { + return str.trim(); + }).join(" "); + }; + exports2.formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util2.inspect(v, this.inspectOpts); + }; + function formatArgs(args) { + var name = this.namespace; + var useColors2 = this.useColors; + if (useColors2) { + var c = this.color; + var prefix = " \x1B[3" + c + ";1m" + name + " \x1B[0m"; + args[0] = prefix + args[0].split("\n").join("\n" + prefix); + args.push("\x1B[3" + c + "m+" + exports2.humanize(this.diff) + "\x1B[0m"); + } else { + args[0] = (/* @__PURE__ */ new Date()).toUTCString() + " " + name + " " + args[0]; + } + } + function log() { + return stream.write(util2.format.apply(util2, arguments) + "\n"); + } + function save(namespaces) { + if (null == namespaces) { + delete process.env.DEBUG; + } else { + process.env.DEBUG = namespaces; + } + } + function load() { + return process.env.DEBUG; + } + function createWritableStdioStream(fd2) { + var stream2; + var tty_wrap = process.binding("tty_wrap"); + switch (tty_wrap.guessHandleType(fd2)) { + case "TTY": + stream2 = new tty2.WriteStream(fd2); + stream2._type = "tty"; + if (stream2._handle && stream2._handle.unref) { + stream2._handle.unref(); + } + break; + case "FILE": + var fs = require("fs"); + stream2 = new fs.SyncWriteStream(fd2, { autoClose: false }); + stream2._type = "fs"; + break; + case "PIPE": + case "TCP": + var net = require("net"); + stream2 = new net.Socket({ + fd: fd2, + readable: false, + writable: true + }); + stream2.readable = false; + stream2.read = null; + stream2._type = "pipe"; + if (stream2._handle && stream2._handle.unref) { + stream2._handle.unref(); + } + break; + default: + throw new Error("Implement me. Unknown stream file type!"); + } + stream2.fd = fd2; + stream2._isStdio = true; + return stream2; + } + function init(debug) { + debug.inspectOpts = {}; + var keys = Object.keys(exports2.inspectOpts); + for (var i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; + } + } + exports2.enable(load()); + } +}); + +// ../../node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/index.js +var require_src = __commonJS({ + "../../node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/index.js"(exports2, module2) { + if (typeof process !== "undefined" && process.type === "renderer") { + module2.exports = require_browser(); + } else { + module2.exports = require_node(); + } + } +}); + +// ../../node_modules/.pnpm/destroy@1.2.0/node_modules/destroy/index.js +var require_destroy = __commonJS({ + "../../node_modules/.pnpm/destroy@1.2.0/node_modules/destroy/index.js"(exports2, module2) { + "use strict"; + var EventEmitter = require("events").EventEmitter; + var ReadStream = require("fs").ReadStream; + var Stream = require("stream"); + var Zlib = require("zlib"); + module2.exports = destroy; + function destroy(stream, suppress) { + if (isFsReadStream(stream)) { + destroyReadStream(stream); + } else if (isZlibStream(stream)) { + destroyZlibStream(stream); + } else if (hasDestroy(stream)) { + stream.destroy(); + } + if (isEventEmitter(stream) && suppress) { + stream.removeAllListeners("error"); + stream.addListener("error", noop); + } + return stream; + } + function destroyReadStream(stream) { + stream.destroy(); + if (typeof stream.close === "function") { + stream.on("open", onOpenClose); + } + } + function closeZlibStream(stream) { + if (stream._hadError === true) { + var prop = stream._binding === null ? "_binding" : "_handle"; + stream[prop] = { + close: function() { + this[prop] = null; + } + }; + } + stream.close(); + } + function destroyZlibStream(stream) { + if (typeof stream.destroy === "function") { + if (stream._binding) { + stream.destroy(); + if (stream._processing) { + stream._needDrain = true; + stream.once("drain", onDrainClearBinding); + } else { + stream._binding.clear(); + } + } else if (stream._destroy && stream._destroy !== Stream.Transform.prototype._destroy) { + stream.destroy(); + } else if (stream._destroy && typeof stream.close === "function") { + stream.destroyed = true; + stream.close(); + } else { + stream.destroy(); + } + } else if (typeof stream.close === "function") { + closeZlibStream(stream); + } + } + function hasDestroy(stream) { + return stream instanceof Stream && typeof stream.destroy === "function"; + } + function isEventEmitter(val) { + return val instanceof EventEmitter; + } + function isFsReadStream(stream) { + return stream instanceof ReadStream; + } + function isZlibStream(stream) { + return stream instanceof Zlib.Gzip || stream instanceof Zlib.Gunzip || stream instanceof Zlib.Deflate || stream instanceof Zlib.DeflateRaw || stream instanceof Zlib.Inflate || stream instanceof Zlib.InflateRaw || stream instanceof Zlib.Unzip; + } + function noop() { + } + function onDrainClearBinding() { + this._binding.clear(); + } + function onOpenClose() { + if (typeof this.fd === "number") { + this.close(); + } + } + } +}); + +// ../../node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/safer.js +var require_safer = __commonJS({ + "../../node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/safer.js"(exports2, module2) { + "use strict"; + var buffer = require("buffer"); + var Buffer2 = buffer.Buffer; + var safer = {}; + var key; + for (key in buffer) { + if (!buffer.hasOwnProperty(key)) continue; + if (key === "SlowBuffer" || key === "Buffer") continue; + safer[key] = buffer[key]; + } + var Safer = safer.Buffer = {}; + for (key in Buffer2) { + if (!Buffer2.hasOwnProperty(key)) continue; + if (key === "allocUnsafe" || key === "allocUnsafeSlow") continue; + Safer[key] = Buffer2[key]; + } + safer.Buffer.prototype = Buffer2.prototype; + if (!Safer.from || Safer.from === Uint8Array.from) { + Safer.from = function(value, encodingOrOffset, length) { + if (typeof value === "number") { + throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value); + } + if (value && typeof value.length === "undefined") { + throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value); + } + return Buffer2(value, encodingOrOffset, length); + }; + } + if (!Safer.alloc) { + Safer.alloc = function(size, fill, encoding) { + if (typeof size !== "number") { + throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size); + } + if (size < 0 || size >= 2 * (1 << 30)) { + throw new RangeError('The value "' + size + '" is invalid for option "size"'); + } + var buf = Buffer2(size); + if (!fill || fill.length === 0) { + buf.fill(0); + } else if (typeof encoding === "string") { + buf.fill(fill, encoding); + } else { + buf.fill(fill); + } + return buf; + }; + } + if (!safer.kStringMaxLength) { + try { + safer.kStringMaxLength = process.binding("buffer").kStringMaxLength; + } catch (e) { + } + } + if (!safer.constants) { + safer.constants = { + MAX_LENGTH: safer.kMaxLength + }; + if (safer.kStringMaxLength) { + safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength; + } + } + module2.exports = safer; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/lib/bom-handling.js +var require_bom_handling = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/lib/bom-handling.js"(exports2) { + "use strict"; + var BOMChar = "\uFEFF"; + exports2.PrependBOM = PrependBOMWrapper; + function PrependBOMWrapper(encoder, options) { + this.encoder = encoder; + this.addBOM = true; + } + PrependBOMWrapper.prototype.write = function(str) { + if (this.addBOM) { + str = BOMChar + str; + this.addBOM = false; + } + return this.encoder.write(str); + }; + PrependBOMWrapper.prototype.end = function() { + return this.encoder.end(); + }; + exports2.StripBOM = StripBOMWrapper; + function StripBOMWrapper(decoder, options) { + this.decoder = decoder; + this.pass = false; + this.options = options || {}; + } + StripBOMWrapper.prototype.write = function(buf) { + var res = this.decoder.write(buf); + if (this.pass || !res) + return res; + if (res[0] === BOMChar) { + res = res.slice(1); + if (typeof this.options.stripBOM === "function") + this.options.stripBOM(); + } + this.pass = true; + return res; + }; + StripBOMWrapper.prototype.end = function() { + return this.decoder.end(); + }; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/internal.js +var require_internal = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/internal.js"(exports2, module2) { + "use strict"; + var Buffer2 = require_safer().Buffer; + module2.exports = { + // Encodings + utf8: { type: "_internal", bomAware: true }, + cesu8: { type: "_internal", bomAware: true }, + unicode11utf8: "utf8", + ucs2: { type: "_internal", bomAware: true }, + utf16le: "ucs2", + binary: { type: "_internal" }, + base64: { type: "_internal" }, + hex: { type: "_internal" }, + // Codec. + _internal: InternalCodec + }; + function InternalCodec(codecOptions, iconv) { + this.enc = codecOptions.encodingName; + this.bomAware = codecOptions.bomAware; + if (this.enc === "base64") + this.encoder = InternalEncoderBase64; + else if (this.enc === "cesu8") { + this.enc = "utf8"; + this.encoder = InternalEncoderCesu8; + if (Buffer2.from("eda0bdedb2a9", "hex").toString() !== "\u{1F4A9}") { + this.decoder = InternalDecoderCesu8; + this.defaultCharUnicode = iconv.defaultCharUnicode; + } + } + } + InternalCodec.prototype.encoder = InternalEncoder; + InternalCodec.prototype.decoder = InternalDecoder; + var StringDecoder = require("string_decoder").StringDecoder; + if (!StringDecoder.prototype.end) + StringDecoder.prototype.end = function() { + }; + function InternalDecoder(options, codec) { + StringDecoder.call(this, codec.enc); + } + InternalDecoder.prototype = StringDecoder.prototype; + function InternalEncoder(options, codec) { + this.enc = codec.enc; + } + InternalEncoder.prototype.write = function(str) { + return Buffer2.from(str, this.enc); + }; + InternalEncoder.prototype.end = function() { + }; + function InternalEncoderBase64(options, codec) { + this.prevStr = ""; + } + InternalEncoderBase64.prototype.write = function(str) { + str = this.prevStr + str; + var completeQuads = str.length - str.length % 4; + this.prevStr = str.slice(completeQuads); + str = str.slice(0, completeQuads); + return Buffer2.from(str, "base64"); + }; + InternalEncoderBase64.prototype.end = function() { + return Buffer2.from(this.prevStr, "base64"); + }; + function InternalEncoderCesu8(options, codec) { + } + InternalEncoderCesu8.prototype.write = function(str) { + var buf = Buffer2.alloc(str.length * 3), bufIdx = 0; + for (var i = 0; i < str.length; i++) { + var charCode = str.charCodeAt(i); + if (charCode < 128) + buf[bufIdx++] = charCode; + else if (charCode < 2048) { + buf[bufIdx++] = 192 + (charCode >>> 6); + buf[bufIdx++] = 128 + (charCode & 63); + } else { + buf[bufIdx++] = 224 + (charCode >>> 12); + buf[bufIdx++] = 128 + (charCode >>> 6 & 63); + buf[bufIdx++] = 128 + (charCode & 63); + } + } + return buf.slice(0, bufIdx); + }; + InternalEncoderCesu8.prototype.end = function() { + }; + function InternalDecoderCesu8(options, codec) { + this.acc = 0; + this.contBytes = 0; + this.accBytes = 0; + this.defaultCharUnicode = codec.defaultCharUnicode; + } + InternalDecoderCesu8.prototype.write = function(buf) { + var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, res = ""; + for (var i = 0; i < buf.length; i++) { + var curByte = buf[i]; + if ((curByte & 192) !== 128) { + if (contBytes > 0) { + res += this.defaultCharUnicode; + contBytes = 0; + } + if (curByte < 128) { + res += String.fromCharCode(curByte); + } else if (curByte < 224) { + acc = curByte & 31; + contBytes = 1; + accBytes = 1; + } else if (curByte < 240) { + acc = curByte & 15; + contBytes = 2; + accBytes = 1; + } else { + res += this.defaultCharUnicode; + } + } else { + if (contBytes > 0) { + acc = acc << 6 | curByte & 63; + contBytes--; + accBytes++; + if (contBytes === 0) { + if (accBytes === 2 && acc < 128 && acc > 0) + res += this.defaultCharUnicode; + else if (accBytes === 3 && acc < 2048) + res += this.defaultCharUnicode; + else + res += String.fromCharCode(acc); + } + } else { + res += this.defaultCharUnicode; + } + } + } + this.acc = acc; + this.contBytes = contBytes; + this.accBytes = accBytes; + return res; + }; + InternalDecoderCesu8.prototype.end = function() { + var res = 0; + if (this.contBytes > 0) + res += this.defaultCharUnicode; + return res; + }; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/utf16.js +var require_utf16 = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/utf16.js"(exports2) { + "use strict"; + var Buffer2 = require_safer().Buffer; + exports2.utf16be = Utf16BECodec; + function Utf16BECodec() { + } + Utf16BECodec.prototype.encoder = Utf16BEEncoder; + Utf16BECodec.prototype.decoder = Utf16BEDecoder; + Utf16BECodec.prototype.bomAware = true; + function Utf16BEEncoder() { + } + Utf16BEEncoder.prototype.write = function(str) { + var buf = Buffer2.from(str, "ucs2"); + for (var i = 0; i < buf.length; i += 2) { + var tmp = buf[i]; + buf[i] = buf[i + 1]; + buf[i + 1] = tmp; + } + return buf; + }; + Utf16BEEncoder.prototype.end = function() { + }; + function Utf16BEDecoder() { + this.overflowByte = -1; + } + Utf16BEDecoder.prototype.write = function(buf) { + if (buf.length == 0) + return ""; + var buf2 = Buffer2.alloc(buf.length + 1), i = 0, j = 0; + if (this.overflowByte !== -1) { + buf2[0] = buf[0]; + buf2[1] = this.overflowByte; + i = 1; + j = 2; + } + for (; i < buf.length - 1; i += 2, j += 2) { + buf2[j] = buf[i + 1]; + buf2[j + 1] = buf[i]; + } + this.overflowByte = i == buf.length - 1 ? buf[buf.length - 1] : -1; + return buf2.slice(0, j).toString("ucs2"); + }; + Utf16BEDecoder.prototype.end = function() { + }; + exports2.utf16 = Utf16Codec; + function Utf16Codec(codecOptions, iconv) { + this.iconv = iconv; + } + Utf16Codec.prototype.encoder = Utf16Encoder; + Utf16Codec.prototype.decoder = Utf16Decoder; + function Utf16Encoder(options, codec) { + options = options || {}; + if (options.addBOM === void 0) + options.addBOM = true; + this.encoder = codec.iconv.getEncoder("utf-16le", options); + } + Utf16Encoder.prototype.write = function(str) { + return this.encoder.write(str); + }; + Utf16Encoder.prototype.end = function() { + return this.encoder.end(); + }; + function Utf16Decoder(options, codec) { + this.decoder = null; + this.initialBytes = []; + this.initialBytesLen = 0; + this.options = options || {}; + this.iconv = codec.iconv; + } + Utf16Decoder.prototype.write = function(buf) { + if (!this.decoder) { + this.initialBytes.push(buf); + this.initialBytesLen += buf.length; + if (this.initialBytesLen < 16) + return ""; + var buf = Buffer2.concat(this.initialBytes), encoding = detectEncoding(buf, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + this.initialBytes.length = this.initialBytesLen = 0; + } + return this.decoder.write(buf); + }; + Utf16Decoder.prototype.end = function() { + if (!this.decoder) { + var buf = Buffer2.concat(this.initialBytes), encoding = detectEncoding(buf, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + var res = this.decoder.write(buf), trail = this.decoder.end(); + return trail ? res + trail : res; + } + return this.decoder.end(); + }; + function detectEncoding(buf, defaultEncoding) { + var enc = defaultEncoding || "utf-16le"; + if (buf.length >= 2) { + if (buf[0] == 254 && buf[1] == 255) + enc = "utf-16be"; + else if (buf[0] == 255 && buf[1] == 254) + enc = "utf-16le"; + else { + var asciiCharsLE = 0, asciiCharsBE = 0, _len = Math.min(buf.length - buf.length % 2, 64); + for (var i = 0; i < _len; i += 2) { + if (buf[i] === 0 && buf[i + 1] !== 0) asciiCharsBE++; + if (buf[i] !== 0 && buf[i + 1] === 0) asciiCharsLE++; + } + if (asciiCharsBE > asciiCharsLE) + enc = "utf-16be"; + else if (asciiCharsBE < asciiCharsLE) + enc = "utf-16le"; + } + } + return enc; + } + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/utf7.js +var require_utf7 = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/utf7.js"(exports2) { + "use strict"; + var Buffer2 = require_safer().Buffer; + exports2.utf7 = Utf7Codec; + exports2.unicode11utf7 = "utf7"; + function Utf7Codec(codecOptions, iconv) { + this.iconv = iconv; + } + Utf7Codec.prototype.encoder = Utf7Encoder; + Utf7Codec.prototype.decoder = Utf7Decoder; + Utf7Codec.prototype.bomAware = true; + var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; + function Utf7Encoder(options, codec) { + this.iconv = codec.iconv; + } + Utf7Encoder.prototype.write = function(str) { + return Buffer2.from(str.replace(nonDirectChars, function(chunk) { + return "+" + (chunk === "+" ? "" : this.iconv.encode(chunk, "utf16-be").toString("base64").replace(/=+$/, "")) + "-"; + }.bind(this))); + }; + Utf7Encoder.prototype.end = function() { + }; + function Utf7Decoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ""; + } + var base64Regex = /[A-Za-z0-9\/+]/; + var base64Chars = []; + for (i = 0; i < 256; i++) + base64Chars[i] = base64Regex.test(String.fromCharCode(i)); + var i; + var plusChar = "+".charCodeAt(0); + var minusChar = "-".charCodeAt(0); + var andChar = "&".charCodeAt(0); + Utf7Decoder.prototype.write = function(buf) { + var res = "", lastI = 0, inBase64 = this.inBase64, base64Accum = this.base64Accum; + for (var i2 = 0; i2 < buf.length; i2++) { + if (!inBase64) { + if (buf[i2] == plusChar) { + res += this.iconv.decode(buf.slice(lastI, i2), "ascii"); + lastI = i2 + 1; + inBase64 = true; + } + } else { + if (!base64Chars[buf[i2]]) { + if (i2 == lastI && buf[i2] == minusChar) { + res += "+"; + } else { + var b64str = base64Accum + buf.slice(lastI, i2).toString(); + res += this.iconv.decode(Buffer2.from(b64str, "base64"), "utf16-be"); + } + if (buf[i2] != minusChar) + i2--; + lastI = i2 + 1; + inBase64 = false; + base64Accum = ""; + } + } + } + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); + } else { + var b64str = base64Accum + buf.slice(lastI).toString(); + var canBeDecoded = b64str.length - b64str.length % 8; + base64Accum = b64str.slice(canBeDecoded); + b64str = b64str.slice(0, canBeDecoded); + res += this.iconv.decode(Buffer2.from(b64str, "base64"), "utf16-be"); + } + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + return res; + }; + Utf7Decoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(Buffer2.from(this.base64Accum, "base64"), "utf16-be"); + this.inBase64 = false; + this.base64Accum = ""; + return res; + }; + exports2.utf7imap = Utf7IMAPCodec; + function Utf7IMAPCodec(codecOptions, iconv) { + this.iconv = iconv; + } + Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; + Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; + Utf7IMAPCodec.prototype.bomAware = true; + function Utf7IMAPEncoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = Buffer2.alloc(6); + this.base64AccumIdx = 0; + } + Utf7IMAPEncoder.prototype.write = function(str) { + var inBase64 = this.inBase64, base64Accum = this.base64Accum, base64AccumIdx = this.base64AccumIdx, buf = Buffer2.alloc(str.length * 5 + 10), bufIdx = 0; + for (var i2 = 0; i2 < str.length; i2++) { + var uChar = str.charCodeAt(i2); + if (32 <= uChar && uChar <= 126) { + if (inBase64) { + if (base64AccumIdx > 0) { + bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString("base64").replace(/\//g, ",").replace(/=+$/, ""), bufIdx); + base64AccumIdx = 0; + } + buf[bufIdx++] = minusChar; + inBase64 = false; + } + if (!inBase64) { + buf[bufIdx++] = uChar; + if (uChar === andChar) + buf[bufIdx++] = minusChar; + } + } else { + if (!inBase64) { + buf[bufIdx++] = andChar; + inBase64 = true; + } + if (inBase64) { + base64Accum[base64AccumIdx++] = uChar >> 8; + base64Accum[base64AccumIdx++] = uChar & 255; + if (base64AccumIdx == base64Accum.length) { + bufIdx += buf.write(base64Accum.toString("base64").replace(/\//g, ","), bufIdx); + base64AccumIdx = 0; + } + } + } + } + this.inBase64 = inBase64; + this.base64AccumIdx = base64AccumIdx; + return buf.slice(0, bufIdx); + }; + Utf7IMAPEncoder.prototype.end = function() { + var buf = Buffer2.alloc(10), bufIdx = 0; + if (this.inBase64) { + if (this.base64AccumIdx > 0) { + bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString("base64").replace(/\//g, ",").replace(/=+$/, ""), bufIdx); + this.base64AccumIdx = 0; + } + buf[bufIdx++] = minusChar; + this.inBase64 = false; + } + return buf.slice(0, bufIdx); + }; + function Utf7IMAPDecoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ""; + } + var base64IMAPChars = base64Chars.slice(); + base64IMAPChars[",".charCodeAt(0)] = true; + Utf7IMAPDecoder.prototype.write = function(buf) { + var res = "", lastI = 0, inBase64 = this.inBase64, base64Accum = this.base64Accum; + for (var i2 = 0; i2 < buf.length; i2++) { + if (!inBase64) { + if (buf[i2] == andChar) { + res += this.iconv.decode(buf.slice(lastI, i2), "ascii"); + lastI = i2 + 1; + inBase64 = true; + } + } else { + if (!base64IMAPChars[buf[i2]]) { + if (i2 == lastI && buf[i2] == minusChar) { + res += "&"; + } else { + var b64str = base64Accum + buf.slice(lastI, i2).toString().replace(/,/g, "/"); + res += this.iconv.decode(Buffer2.from(b64str, "base64"), "utf16-be"); + } + if (buf[i2] != minusChar) + i2--; + lastI = i2 + 1; + inBase64 = false; + base64Accum = ""; + } + } + } + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); + } else { + var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, "/"); + var canBeDecoded = b64str.length - b64str.length % 8; + base64Accum = b64str.slice(canBeDecoded); + b64str = b64str.slice(0, canBeDecoded); + res += this.iconv.decode(Buffer2.from(b64str, "base64"), "utf16-be"); + } + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + return res; + }; + Utf7IMAPDecoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(Buffer2.from(this.base64Accum, "base64"), "utf16-be"); + this.inBase64 = false; + this.base64Accum = ""; + return res; + }; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/sbcs-codec.js +var require_sbcs_codec = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/sbcs-codec.js"(exports2) { + "use strict"; + var Buffer2 = require_safer().Buffer; + exports2._sbcs = SBCSCodec; + function SBCSCodec(codecOptions, iconv) { + if (!codecOptions) + throw new Error("SBCS codec is called without the data."); + if (!codecOptions.chars || codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256) + throw new Error("Encoding '" + codecOptions.type + "' has incorrect 'chars' (must be of len 128 or 256)"); + if (codecOptions.chars.length === 128) { + var asciiString = ""; + for (var i = 0; i < 128; i++) + asciiString += String.fromCharCode(i); + codecOptions.chars = asciiString + codecOptions.chars; + } + this.decodeBuf = Buffer2.from(codecOptions.chars, "ucs2"); + var encodeBuf = Buffer2.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)); + for (var i = 0; i < codecOptions.chars.length; i++) + encodeBuf[codecOptions.chars.charCodeAt(i)] = i; + this.encodeBuf = encodeBuf; + } + SBCSCodec.prototype.encoder = SBCSEncoder; + SBCSCodec.prototype.decoder = SBCSDecoder; + function SBCSEncoder(options, codec) { + this.encodeBuf = codec.encodeBuf; + } + SBCSEncoder.prototype.write = function(str) { + var buf = Buffer2.alloc(str.length); + for (var i = 0; i < str.length; i++) + buf[i] = this.encodeBuf[str.charCodeAt(i)]; + return buf; + }; + SBCSEncoder.prototype.end = function() { + }; + function SBCSDecoder(options, codec) { + this.decodeBuf = codec.decodeBuf; + } + SBCSDecoder.prototype.write = function(buf) { + var decodeBuf = this.decodeBuf; + var newBuf = Buffer2.alloc(buf.length * 2); + var idx1 = 0, idx2 = 0; + for (var i = 0; i < buf.length; i++) { + idx1 = buf[i] * 2; + idx2 = i * 2; + newBuf[idx2] = decodeBuf[idx1]; + newBuf[idx2 + 1] = decodeBuf[idx1 + 1]; + } + return newBuf.toString("ucs2"); + }; + SBCSDecoder.prototype.end = function() { + }; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/sbcs-data.js +var require_sbcs_data = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/sbcs-data.js"(exports2, module2) { + "use strict"; + module2.exports = { + // Not supported by iconv, not sure why. + "10029": "maccenteuro", + "maccenteuro": { + "type": "_sbcs", + "chars": "\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7" + }, + "808": "cp808", + "ibm808": "cp808", + "cp808": { + "type": "_sbcs", + "chars": "\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0404\u0454\u0407\u0457\u040E\u045E\xB0\u2219\xB7\u221A\u2116\u20AC\u25A0\xA0" + }, + "mik": { + "type": "_sbcs", + "chars": "\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2514\u2534\u252C\u251C\u2500\u253C\u2563\u2551\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2510\u2591\u2592\u2593\u2502\u2524\u2116\xA7\u2557\u255D\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0" + }, + // Aliases of generated encodings. + "ascii8bit": "ascii", + "usascii": "ascii", + "ansix34": "ascii", + "ansix341968": "ascii", + "ansix341986": "ascii", + "csascii": "ascii", + "cp367": "ascii", + "ibm367": "ascii", + "isoir6": "ascii", + "iso646us": "ascii", + "iso646irv": "ascii", + "us": "ascii", + "latin1": "iso88591", + "latin2": "iso88592", + "latin3": "iso88593", + "latin4": "iso88594", + "latin5": "iso88599", + "latin6": "iso885910", + "latin7": "iso885913", + "latin8": "iso885914", + "latin9": "iso885915", + "latin10": "iso885916", + "csisolatin1": "iso88591", + "csisolatin2": "iso88592", + "csisolatin3": "iso88593", + "csisolatin4": "iso88594", + "csisolatincyrillic": "iso88595", + "csisolatinarabic": "iso88596", + "csisolatingreek": "iso88597", + "csisolatinhebrew": "iso88598", + "csisolatin5": "iso88599", + "csisolatin6": "iso885910", + "l1": "iso88591", + "l2": "iso88592", + "l3": "iso88593", + "l4": "iso88594", + "l5": "iso88599", + "l6": "iso885910", + "l7": "iso885913", + "l8": "iso885914", + "l9": "iso885915", + "l10": "iso885916", + "isoir14": "iso646jp", + "isoir57": "iso646cn", + "isoir100": "iso88591", + "isoir101": "iso88592", + "isoir109": "iso88593", + "isoir110": "iso88594", + "isoir144": "iso88595", + "isoir127": "iso88596", + "isoir126": "iso88597", + "isoir138": "iso88598", + "isoir148": "iso88599", + "isoir157": "iso885910", + "isoir166": "tis620", + "isoir179": "iso885913", + "isoir199": "iso885914", + "isoir203": "iso885915", + "isoir226": "iso885916", + "cp819": "iso88591", + "ibm819": "iso88591", + "cyrillic": "iso88595", + "arabic": "iso88596", + "arabic8": "iso88596", + "ecma114": "iso88596", + "asmo708": "iso88596", + "greek": "iso88597", + "greek8": "iso88597", + "ecma118": "iso88597", + "elot928": "iso88597", + "hebrew": "iso88598", + "hebrew8": "iso88598", + "turkish": "iso88599", + "turkish8": "iso88599", + "thai": "iso885911", + "thai8": "iso885911", + "celtic": "iso885914", + "celtic8": "iso885914", + "isoceltic": "iso885914", + "tis6200": "tis620", + "tis62025291": "tis620", + "tis62025330": "tis620", + "10000": "macroman", + "10006": "macgreek", + "10007": "maccyrillic", + "10079": "maciceland", + "10081": "macturkish", + "cspc8codepage437": "cp437", + "cspc775baltic": "cp775", + "cspc850multilingual": "cp850", + "cspcp852": "cp852", + "cspc862latinhebrew": "cp862", + "cpgr": "cp869", + "msee": "cp1250", + "mscyrl": "cp1251", + "msansi": "cp1252", + "msgreek": "cp1253", + "msturk": "cp1254", + "mshebr": "cp1255", + "msarab": "cp1256", + "winbaltrim": "cp1257", + "cp20866": "koi8r", + "20866": "koi8r", + "ibm878": "koi8r", + "cskoi8r": "koi8r", + "cp21866": "koi8u", + "21866": "koi8u", + "ibm1168": "koi8u", + "strk10482002": "rk1048", + "tcvn5712": "tcvn", + "tcvn57121": "tcvn", + "gb198880": "iso646cn", + "cn": "iso646cn", + "csiso14jisc6220ro": "iso646jp", + "jisc62201969ro": "iso646jp", + "jp": "iso646jp", + "cshproman8": "hproman8", + "r8": "hproman8", + "roman8": "hproman8", + "xroman8": "hproman8", + "ibm1051": "hproman8", + "mac": "macintosh", + "csmacintosh": "macintosh" + }; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/sbcs-data-generated.js +var require_sbcs_data_generated = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/sbcs-data-generated.js"(exports2, module2) { + "use strict"; + module2.exports = { + "437": "cp437", + "737": "cp737", + "775": "cp775", + "850": "cp850", + "852": "cp852", + "855": "cp855", + "856": "cp856", + "857": "cp857", + "858": "cp858", + "860": "cp860", + "861": "cp861", + "862": "cp862", + "863": "cp863", + "864": "cp864", + "865": "cp865", + "866": "cp866", + "869": "cp869", + "874": "windows874", + "922": "cp922", + "1046": "cp1046", + "1124": "cp1124", + "1125": "cp1125", + "1129": "cp1129", + "1133": "cp1133", + "1161": "cp1161", + "1162": "cp1162", + "1163": "cp1163", + "1250": "windows1250", + "1251": "windows1251", + "1252": "windows1252", + "1253": "windows1253", + "1254": "windows1254", + "1255": "windows1255", + "1256": "windows1256", + "1257": "windows1257", + "1258": "windows1258", + "28591": "iso88591", + "28592": "iso88592", + "28593": "iso88593", + "28594": "iso88594", + "28595": "iso88595", + "28596": "iso88596", + "28597": "iso88597", + "28598": "iso88598", + "28599": "iso88599", + "28600": "iso885910", + "28601": "iso885911", + "28603": "iso885913", + "28604": "iso885914", + "28605": "iso885915", + "28606": "iso885916", + "windows874": { + "type": "_sbcs", + "chars": "\u20AC\uFFFD\uFFFD\uFFFD\uFFFD\u2026\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD" + }, + "win874": "windows874", + "cp874": "windows874", + "windows1250": { + "type": "_sbcs", + "chars": "\u20AC\uFFFD\u201A\uFFFD\u201E\u2026\u2020\u2021\uFFFD\u2030\u0160\u2039\u015A\u0164\u017D\u0179\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0161\u203A\u015B\u0165\u017E\u017A\xA0\u02C7\u02D8\u0141\xA4\u0104\xA6\xA7\xA8\xA9\u015E\xAB\xAC\xAD\xAE\u017B\xB0\xB1\u02DB\u0142\xB4\xB5\xB6\xB7\xB8\u0105\u015F\xBB\u013D\u02DD\u013E\u017C\u0154\xC1\xC2\u0102\xC4\u0139\u0106\xC7\u010C\xC9\u0118\xCB\u011A\xCD\xCE\u010E\u0110\u0143\u0147\xD3\xD4\u0150\xD6\xD7\u0158\u016E\xDA\u0170\xDC\xDD\u0162\xDF\u0155\xE1\xE2\u0103\xE4\u013A\u0107\xE7\u010D\xE9\u0119\xEB\u011B\xED\xEE\u010F\u0111\u0144\u0148\xF3\xF4\u0151\xF6\xF7\u0159\u016F\xFA\u0171\xFC\xFD\u0163\u02D9" + }, + "win1250": "windows1250", + "cp1250": "windows1250", + "windows1251": { + "type": "_sbcs", + "chars": "\u0402\u0403\u201A\u0453\u201E\u2026\u2020\u2021\u20AC\u2030\u0409\u2039\u040A\u040C\u040B\u040F\u0452\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0459\u203A\u045A\u045C\u045B\u045F\xA0\u040E\u045E\u0408\xA4\u0490\xA6\xA7\u0401\xA9\u0404\xAB\xAC\xAD\xAE\u0407\xB0\xB1\u0406\u0456\u0491\xB5\xB6\xB7\u0451\u2116\u0454\xBB\u0458\u0405\u0455\u0457\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F" + }, + "win1251": "windows1251", + "cp1251": "windows1251", + "windows1252": { + "type": "_sbcs", + "chars": "\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\uFFFD\u017D\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\uFFFD\u017E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF" + }, + "win1252": "windows1252", + "cp1252": "windows1252", + "windows1253": { + "type": "_sbcs", + "chars": "\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\uFFFD\u2030\uFFFD\u2039\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\xA0\u0385\u0386\xA3\xA4\xA5\xA6\xA7\xA8\xA9\uFFFD\xAB\xAC\xAD\xAE\u2015\xB0\xB1\xB2\xB3\u0384\xB5\xB6\xB7\u0388\u0389\u038A\xBB\u038C\xBD\u038E\u038F\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\uFFFD\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03AA\u03AB\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\uFFFD" + }, + "win1253": "windows1253", + "cp1253": "windows1253", + "windows1254": { + "type": "_sbcs", + "chars": "\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\uFFFD\uFFFD\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u011E\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u0130\u015E\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u011F\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u0131\u015F\xFF" + }, + "win1254": "windows1254", + "cp1254": "windows1254", + "windows1255": { + "type": "_sbcs", + "chars": "\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\uFFFD\u2039\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\xA0\xA1\xA2\xA3\u20AA\xA5\xA6\xA7\xA8\xA9\xD7\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xF7\xBB\xBC\xBD\xBE\xBF\u05B0\u05B1\u05B2\u05B3\u05B4\u05B5\u05B6\u05B7\u05B8\u05B9\u05BA\u05BB\u05BC\u05BD\u05BE\u05BF\u05C0\u05C1\u05C2\u05C3\u05F0\u05F1\u05F2\u05F3\u05F4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\uFFFD\u200E\u200F\uFFFD" + }, + "win1255": "windows1255", + "cp1255": "windows1255", + "windows1256": { + "type": "_sbcs", + "chars": "\u20AC\u067E\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0679\u2039\u0152\u0686\u0698\u0688\u06AF\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u06A9\u2122\u0691\u203A\u0153\u200C\u200D\u06BA\xA0\u060C\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\u06BE\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\u061B\xBB\xBC\xBD\xBE\u061F\u06C1\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\xD7\u0637\u0638\u0639\u063A\u0640\u0641\u0642\u0643\xE0\u0644\xE2\u0645\u0646\u0647\u0648\xE7\xE8\xE9\xEA\xEB\u0649\u064A\xEE\xEF\u064B\u064C\u064D\u064E\xF4\u064F\u0650\xF7\u0651\xF9\u0652\xFB\xFC\u200E\u200F\u06D2" + }, + "win1256": "windows1256", + "cp1256": "windows1256", + "windows1257": { + "type": "_sbcs", + "chars": "\u20AC\uFFFD\u201A\uFFFD\u201E\u2026\u2020\u2021\uFFFD\u2030\uFFFD\u2039\uFFFD\xA8\u02C7\xB8\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\xAF\u02DB\uFFFD\xA0\uFFFD\xA2\xA3\xA4\uFFFD\xA6\xA7\xD8\xA9\u0156\xAB\xAC\xAD\xAE\xC6\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xF8\xB9\u0157\xBB\xBC\xBD\xBE\xE6\u0104\u012E\u0100\u0106\xC4\xC5\u0118\u0112\u010C\xC9\u0179\u0116\u0122\u0136\u012A\u013B\u0160\u0143\u0145\xD3\u014C\xD5\xD6\xD7\u0172\u0141\u015A\u016A\xDC\u017B\u017D\xDF\u0105\u012F\u0101\u0107\xE4\xE5\u0119\u0113\u010D\xE9\u017A\u0117\u0123\u0137\u012B\u013C\u0161\u0144\u0146\xF3\u014D\xF5\xF6\xF7\u0173\u0142\u015B\u016B\xFC\u017C\u017E\u02D9" + }, + "win1257": "windows1257", + "cp1257": "windows1257", + "windows1258": { + "type": "_sbcs", + "chars": "\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\uFFFD\u2039\u0152\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\uFFFD\u203A\u0153\uFFFD\uFFFD\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF" + }, + "win1258": "windows1258", + "cp1258": "windows1258", + "iso88591": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF" + }, + "cp28591": "iso88591", + "iso88592": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u02D8\u0141\xA4\u013D\u015A\xA7\xA8\u0160\u015E\u0164\u0179\xAD\u017D\u017B\xB0\u0105\u02DB\u0142\xB4\u013E\u015B\u02C7\xB8\u0161\u015F\u0165\u017A\u02DD\u017E\u017C\u0154\xC1\xC2\u0102\xC4\u0139\u0106\xC7\u010C\xC9\u0118\xCB\u011A\xCD\xCE\u010E\u0110\u0143\u0147\xD3\xD4\u0150\xD6\xD7\u0158\u016E\xDA\u0170\xDC\xDD\u0162\xDF\u0155\xE1\xE2\u0103\xE4\u013A\u0107\xE7\u010D\xE9\u0119\xEB\u011B\xED\xEE\u010F\u0111\u0144\u0148\xF3\xF4\u0151\xF6\xF7\u0159\u016F\xFA\u0171\xFC\xFD\u0163\u02D9" + }, + "cp28592": "iso88592", + "iso88593": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0126\u02D8\xA3\xA4\uFFFD\u0124\xA7\xA8\u0130\u015E\u011E\u0134\xAD\uFFFD\u017B\xB0\u0127\xB2\xB3\xB4\xB5\u0125\xB7\xB8\u0131\u015F\u011F\u0135\xBD\uFFFD\u017C\xC0\xC1\xC2\uFFFD\xC4\u010A\u0108\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\uFFFD\xD1\xD2\xD3\xD4\u0120\xD6\xD7\u011C\xD9\xDA\xDB\xDC\u016C\u015C\xDF\xE0\xE1\xE2\uFFFD\xE4\u010B\u0109\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\uFFFD\xF1\xF2\xF3\xF4\u0121\xF6\xF7\u011D\xF9\xFA\xFB\xFC\u016D\u015D\u02D9" + }, + "cp28593": "iso88593", + "iso88594": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0138\u0156\xA4\u0128\u013B\xA7\xA8\u0160\u0112\u0122\u0166\xAD\u017D\xAF\xB0\u0105\u02DB\u0157\xB4\u0129\u013C\u02C7\xB8\u0161\u0113\u0123\u0167\u014A\u017E\u014B\u0100\xC1\xC2\xC3\xC4\xC5\xC6\u012E\u010C\xC9\u0118\xCB\u0116\xCD\xCE\u012A\u0110\u0145\u014C\u0136\xD4\xD5\xD6\xD7\xD8\u0172\xDA\xDB\xDC\u0168\u016A\xDF\u0101\xE1\xE2\xE3\xE4\xE5\xE6\u012F\u010D\xE9\u0119\xEB\u0117\xED\xEE\u012B\u0111\u0146\u014D\u0137\xF4\xF5\xF6\xF7\xF8\u0173\xFA\xFB\xFC\u0169\u016B\u02D9" + }, + "cp28594": "iso88594", + "iso88595": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0401\u0402\u0403\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\xAD\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2116\u0451\u0452\u0453\u0454\u0455\u0456\u0457\u0458\u0459\u045A\u045B\u045C\xA7\u045E\u045F" + }, + "cp28595": "iso88595", + "iso88596": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\uFFFD\uFFFD\xA4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u060C\xAD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u061B\uFFFD\uFFFD\uFFFD\u061F\uFFFD\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" + }, + "cp28596": "iso88596", + "iso88597": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u2018\u2019\xA3\u20AC\u20AF\xA6\xA7\xA8\xA9\u037A\xAB\xAC\xAD\uFFFD\u2015\xB0\xB1\xB2\xB3\u0384\u0385\u0386\xB7\u0388\u0389\u038A\xBB\u038C\xBD\u038E\u038F\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\uFFFD\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03AA\u03AB\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\uFFFD" + }, + "cp28597": "iso88597", + "iso88598": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xD7\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xF7\xBB\xBC\xBD\xBE\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2017\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\uFFFD\u200E\u200F\uFFFD" + }, + "cp28598": "iso88598", + "iso88599": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u011E\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u0130\u015E\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u011F\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u0131\u015F\xFF" + }, + "cp28599": "iso88599", + "iso885910": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0112\u0122\u012A\u0128\u0136\xA7\u013B\u0110\u0160\u0166\u017D\xAD\u016A\u014A\xB0\u0105\u0113\u0123\u012B\u0129\u0137\xB7\u013C\u0111\u0161\u0167\u017E\u2015\u016B\u014B\u0100\xC1\xC2\xC3\xC4\xC5\xC6\u012E\u010C\xC9\u0118\xCB\u0116\xCD\xCE\xCF\xD0\u0145\u014C\xD3\xD4\xD5\xD6\u0168\xD8\u0172\xDA\xDB\xDC\xDD\xDE\xDF\u0101\xE1\xE2\xE3\xE4\xE5\xE6\u012F\u010D\xE9\u0119\xEB\u0117\xED\xEE\xEF\xF0\u0146\u014D\xF3\xF4\xF5\xF6\u0169\xF8\u0173\xFA\xFB\xFC\xFD\xFE\u0138" + }, + "cp28600": "iso885910", + "iso885911": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD" + }, + "cp28601": "iso885911", + "iso885913": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u201D\xA2\xA3\xA4\u201E\xA6\xA7\xD8\xA9\u0156\xAB\xAC\xAD\xAE\xC6\xB0\xB1\xB2\xB3\u201C\xB5\xB6\xB7\xF8\xB9\u0157\xBB\xBC\xBD\xBE\xE6\u0104\u012E\u0100\u0106\xC4\xC5\u0118\u0112\u010C\xC9\u0179\u0116\u0122\u0136\u012A\u013B\u0160\u0143\u0145\xD3\u014C\xD5\xD6\xD7\u0172\u0141\u015A\u016A\xDC\u017B\u017D\xDF\u0105\u012F\u0101\u0107\xE4\xE5\u0119\u0113\u010D\xE9\u017A\u0117\u0123\u0137\u012B\u013C\u0161\u0144\u0146\xF3\u014D\xF5\xF6\xF7\u0173\u0142\u015B\u016B\xFC\u017C\u017E\u2019" + }, + "cp28603": "iso885913", + "iso885914": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u1E02\u1E03\xA3\u010A\u010B\u1E0A\xA7\u1E80\xA9\u1E82\u1E0B\u1EF2\xAD\xAE\u0178\u1E1E\u1E1F\u0120\u0121\u1E40\u1E41\xB6\u1E56\u1E81\u1E57\u1E83\u1E60\u1EF3\u1E84\u1E85\u1E61\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0174\xD1\xD2\xD3\xD4\xD5\xD6\u1E6A\xD8\xD9\xDA\xDB\xDC\xDD\u0176\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0175\xF1\xF2\xF3\xF4\xF5\xF6\u1E6B\xF8\xF9\xFA\xFB\xFC\xFD\u0177\xFF" + }, + "cp28604": "iso885914", + "iso885915": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\u20AC\xA5\u0160\xA7\u0161\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u017D\xB5\xB6\xB7\u017E\xB9\xBA\xBB\u0152\u0153\u0178\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF" + }, + "cp28605": "iso885915", + "iso885916": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0105\u0141\u20AC\u201E\u0160\xA7\u0161\xA9\u0218\xAB\u0179\xAD\u017A\u017B\xB0\xB1\u010C\u0142\u017D\u201D\xB6\xB7\u017E\u010D\u0219\xBB\u0152\u0153\u0178\u017C\xC0\xC1\xC2\u0102\xC4\u0106\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0110\u0143\xD2\xD3\xD4\u0150\xD6\u015A\u0170\xD9\xDA\xDB\xDC\u0118\u021A\xDF\xE0\xE1\xE2\u0103\xE4\u0107\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0111\u0144\xF2\xF3\xF4\u0151\xF6\u015B\u0171\xF9\xFA\xFB\xFC\u0119\u021B\xFF" + }, + "cp28606": "iso885916", + "cp437": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0" + }, + "ibm437": "cp437", + "csibm437": "cp437", + "cp737": { + "type": "_sbcs", + "chars": "\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C2\u03C4\u03C5\u03C6\u03C7\u03C8\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03C9\u03AC\u03AD\u03AE\u03CA\u03AF\u03CC\u03CD\u03CB\u03CE\u0386\u0388\u0389\u038A\u038C\u038E\u038F\xB1\u2265\u2264\u03AA\u03AB\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0" + }, + "ibm737": "cp737", + "csibm737": "cp737", + "cp775": { + "type": "_sbcs", + "chars": "\u0106\xFC\xE9\u0101\xE4\u0123\xE5\u0107\u0142\u0113\u0156\u0157\u012B\u0179\xC4\xC5\xC9\xE6\xC6\u014D\xF6\u0122\xA2\u015A\u015B\xD6\xDC\xF8\xA3\xD8\xD7\xA4\u0100\u012A\xF3\u017B\u017C\u017A\u201D\xA6\xA9\xAE\xAC\xBD\xBC\u0141\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u0104\u010C\u0118\u0116\u2563\u2551\u2557\u255D\u012E\u0160\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u0172\u016A\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u017D\u0105\u010D\u0119\u0117\u012F\u0161\u0173\u016B\u017E\u2518\u250C\u2588\u2584\u258C\u2590\u2580\xD3\xDF\u014C\u0143\xF5\xD5\xB5\u0144\u0136\u0137\u013B\u013C\u0146\u0112\u0145\u2019\xAD\xB1\u201C\xBE\xB6\xA7\xF7\u201E\xB0\u2219\xB7\xB9\xB3\xB2\u25A0\xA0" + }, + "ibm775": "cp775", + "csibm775": "cp775", + "cp850": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\xD7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xF0\xD0\xCA\xCB\xC8\u0131\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\xFE\xDE\xDA\xDB\xD9\xFD\xDD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0" + }, + "ibm850": "cp850", + "csibm850": "cp850", + "cp852": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xE4\u016F\u0107\xE7\u0142\xEB\u0150\u0151\xEE\u0179\xC4\u0106\xC9\u0139\u013A\xF4\xF6\u013D\u013E\u015A\u015B\xD6\xDC\u0164\u0165\u0141\xD7\u010D\xE1\xED\xF3\xFA\u0104\u0105\u017D\u017E\u0118\u0119\xAC\u017A\u010C\u015F\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\u011A\u015E\u2563\u2551\u2557\u255D\u017B\u017C\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u0102\u0103\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\u0111\u0110\u010E\xCB\u010F\u0147\xCD\xCE\u011B\u2518\u250C\u2588\u2584\u0162\u016E\u2580\xD3\xDF\xD4\u0143\u0144\u0148\u0160\u0161\u0154\xDA\u0155\u0170\xFD\xDD\u0163\xB4\xAD\u02DD\u02DB\u02C7\u02D8\xA7\xF7\xB8\xB0\xA8\u02D9\u0171\u0158\u0159\u25A0\xA0" + }, + "ibm852": "cp852", + "csibm852": "cp852", + "cp855": { + "type": "_sbcs", + "chars": "\u0452\u0402\u0453\u0403\u0451\u0401\u0454\u0404\u0455\u0405\u0456\u0406\u0457\u0407\u0458\u0408\u0459\u0409\u045A\u040A\u045B\u040B\u045C\u040C\u045E\u040E\u045F\u040F\u044E\u042E\u044A\u042A\u0430\u0410\u0431\u0411\u0446\u0426\u0434\u0414\u0435\u0415\u0444\u0424\u0433\u0413\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u0445\u0425\u0438\u0418\u2563\u2551\u2557\u255D\u0439\u0419\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u043A\u041A\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\u043B\u041B\u043C\u041C\u043D\u041D\u043E\u041E\u043F\u2518\u250C\u2588\u2584\u041F\u044F\u2580\u042F\u0440\u0420\u0441\u0421\u0442\u0422\u0443\u0423\u0436\u0416\u0432\u0412\u044C\u042C\u2116\xAD\u044B\u042B\u0437\u0417\u0448\u0428\u044D\u042D\u0449\u0429\u0447\u0427\xA7\u25A0\xA0" + }, + "ibm855": "cp855", + "csibm855": "cp855", + "cp856": { + "type": "_sbcs", + "chars": "\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\xA3\uFFFD\xD7\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xAE\xAC\xBD\xBC\uFFFD\xAB\xBB\u2591\u2592\u2593\u2502\u2524\uFFFD\uFFFD\uFFFD\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\uFFFD\uFFFD\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2518\u250C\u2588\u2584\xA6\uFFFD\u2580\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xB5\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0" + }, + "ibm856": "cp856", + "csibm856": "cp856", + "cp857": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\u0131\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\u0130\xD6\xDC\xF8\xA3\xD8\u015E\u015F\xE1\xED\xF3\xFA\xF1\xD1\u011E\u011F\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xBA\xAA\xCA\xCB\xC8\uFFFD\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\uFFFD\xD7\xDA\xDB\xD9\xEC\xFF\xAF\xB4\xAD\xB1\uFFFD\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0" + }, + "ibm857": "cp857", + "csibm857": "cp857", + "cp858": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\xD7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xF0\xD0\xCA\xCB\xC8\u20AC\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\xFE\xDE\xDA\xDB\xD9\xFD\xDD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0" + }, + "ibm858": "cp858", + "csibm858": "cp858", + "cp860": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xE3\xE0\xC1\xE7\xEA\xCA\xE8\xCD\xD4\xEC\xC3\xC2\xC9\xC0\xC8\xF4\xF5\xF2\xDA\xF9\xCC\xD5\xDC\xA2\xA3\xD9\u20A7\xD3\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xD2\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0" + }, + "ibm860": "cp860", + "csibm860": "cp860", + "cp861": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xD0\xF0\xDE\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xFE\xFB\xDD\xFD\xD6\xDC\xF8\xA3\xD8\u20A7\u0192\xE1\xED\xF3\xFA\xC1\xCD\xD3\xDA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0" + }, + "ibm861": "cp861", + "csibm861": "cp861", + "cp862": { + "type": "_sbcs", + "chars": "\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0" + }, + "ibm862": "cp862", + "csibm862": "cp862", + "cp863": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xC2\xE0\xB6\xE7\xEA\xEB\xE8\xEF\xEE\u2017\xC0\xA7\xC9\xC8\xCA\xF4\xCB\xCF\xFB\xF9\xA4\xD4\xDC\xA2\xA3\xD9\xDB\u0192\xA6\xB4\xF3\xFA\xA8\xB8\xB3\xAF\xCE\u2310\xAC\xBD\xBC\xBE\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0" + }, + "ibm863": "cp863", + "csibm863": "cp863", + "cp864": { + "type": "_sbcs", + "chars": "\0\x07\b \n\v\f\r\x1B !\"#$\u066A&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xB0\xB7\u2219\u221A\u2592\u2500\u2502\u253C\u2524\u252C\u251C\u2534\u2510\u250C\u2514\u2518\u03B2\u221E\u03C6\xB1\xBD\xBC\u2248\xAB\xBB\uFEF7\uFEF8\uFFFD\uFFFD\uFEFB\uFEFC\uFFFD\xA0\xAD\uFE82\xA3\xA4\uFE84\uFFFD\uFFFD\uFE8E\uFE8F\uFE95\uFE99\u060C\uFE9D\uFEA1\uFEA5\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFED1\u061B\uFEB1\uFEB5\uFEB9\u061F\xA2\uFE80\uFE81\uFE83\uFE85\uFECA\uFE8B\uFE8D\uFE91\uFE93\uFE97\uFE9B\uFE9F\uFEA3\uFEA7\uFEA9\uFEAB\uFEAD\uFEAF\uFEB3\uFEB7\uFEBB\uFEBF\uFEC1\uFEC5\uFECB\uFECF\xA6\xAC\xF7\xD7\uFEC9\u0640\uFED3\uFED7\uFEDB\uFEDF\uFEE3\uFEE7\uFEEB\uFEED\uFEEF\uFEF3\uFEBD\uFECC\uFECE\uFECD\uFEE1\uFE7D\u0651\uFEE5\uFEE9\uFEEC\uFEF0\uFEF2\uFED0\uFED5\uFEF5\uFEF6\uFEDD\uFED9\uFEF1\u25A0\uFFFD" + }, + "ibm864": "cp864", + "csibm864": "cp864", + "cp865": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xA4\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0" + }, + "ibm865": "cp865", + "csibm865": "cp865", + "cp866": { + "type": "_sbcs", + "chars": "\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0404\u0454\u0407\u0457\u040E\u045E\xB0\u2219\xB7\u221A\u2116\xA4\u25A0\xA0" + }, + "ibm866": "cp866", + "csibm866": "cp866", + "cp869": { + "type": "_sbcs", + "chars": "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0386\uFFFD\xB7\xAC\xA6\u2018\u2019\u0388\u2015\u0389\u038A\u03AA\u038C\uFFFD\uFFFD\u038E\u03AB\xA9\u038F\xB2\xB3\u03AC\xA3\u03AD\u03AE\u03AF\u03CA\u0390\u03CC\u03CD\u0391\u0392\u0393\u0394\u0395\u0396\u0397\xBD\u0398\u0399\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u039A\u039B\u039C\u039D\u2563\u2551\u2557\u255D\u039E\u039F\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u03A0\u03A1\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u2518\u250C\u2588\u2584\u03B4\u03B5\u2580\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C2\u03C4\u0384\xAD\xB1\u03C5\u03C6\u03C7\xA7\u03C8\u0385\xB0\xA8\u03C9\u03CB\u03B0\u03CE\u25A0\xA0" + }, + "ibm869": "cp869", + "csibm869": "cp869", + "cp922": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\u203E\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0160\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\u017D\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0161\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\u017E\xFF" + }, + "ibm922": "cp922", + "csibm922": "cp922", + "cp1046": { + "type": "_sbcs", + "chars": "\uFE88\xD7\xF7\uF8F6\uF8F5\uF8F4\uF8F7\uFE71\x88\u25A0\u2502\u2500\u2510\u250C\u2514\u2518\uFE79\uFE7B\uFE7D\uFE7F\uFE77\uFE8A\uFEF0\uFEF3\uFEF2\uFECE\uFECF\uFED0\uFEF6\uFEF8\uFEFA\uFEFC\xA0\uF8FA\uF8F9\uF8F8\xA4\uF8FB\uFE8B\uFE91\uFE97\uFE9B\uFE9F\uFEA3\u060C\xAD\uFEA7\uFEB3\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFEB7\u061B\uFEBB\uFEBF\uFECA\u061F\uFECB\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\uFEC7\u0639\u063A\uFECC\uFE82\uFE84\uFE8E\uFED3\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\uFED7\uFEDB\uFEDF\uF8FC\uFEF5\uFEF7\uFEF9\uFEFB\uFEE3\uFEE7\uFEEC\uFEE9\uFFFD" + }, + "ibm1046": "cp1046", + "csibm1046": "cp1046", + "cp1124": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0401\u0402\u0490\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\xAD\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2116\u0451\u0452\u0491\u0454\u0455\u0456\u0457\u0458\u0459\u045A\u045B\u045C\xA7\u045E\u045F" + }, + "ibm1124": "cp1124", + "csibm1124": "cp1124", + "cp1125": { + "type": "_sbcs", + "chars": "\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0490\u0491\u0404\u0454\u0406\u0456\u0407\u0457\xB7\u221A\u2116\xA4\u25A0\xA0" + }, + "ibm1125": "cp1125", + "csibm1125": "cp1125", + "cp1129": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\u0153\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u0178\xB5\xB6\xB7\u0152\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF" + }, + "ibm1129": "cp1129", + "csibm1129": "cp1129", + "cp1133": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E81\u0E82\u0E84\u0E87\u0E88\u0EAA\u0E8A\u0E8D\u0E94\u0E95\u0E96\u0E97\u0E99\u0E9A\u0E9B\u0E9C\u0E9D\u0E9E\u0E9F\u0EA1\u0EA2\u0EA3\u0EA5\u0EA7\u0EAB\u0EAD\u0EAE\uFFFD\uFFFD\uFFFD\u0EAF\u0EB0\u0EB2\u0EB3\u0EB4\u0EB5\u0EB6\u0EB7\u0EB8\u0EB9\u0EBC\u0EB1\u0EBB\u0EBD\uFFFD\uFFFD\uFFFD\u0EC0\u0EC1\u0EC2\u0EC3\u0EC4\u0EC8\u0EC9\u0ECA\u0ECB\u0ECC\u0ECD\u0EC6\uFFFD\u0EDC\u0EDD\u20AD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0ED0\u0ED1\u0ED2\u0ED3\u0ED4\u0ED5\u0ED6\u0ED7\u0ED8\u0ED9\uFFFD\uFFFD\xA2\xAC\xA6\uFFFD" + }, + "ibm1133": "cp1133", + "csibm1133": "cp1133", + "cp1161": { + "type": "_sbcs", + "chars": "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E48\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\u0E49\u0E4A\u0E4B\u20AC\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\xA2\xAC\xA6\xA0" + }, + "ibm1161": "cp1161", + "csibm1161": "cp1161", + "cp1162": { + "type": "_sbcs", + "chars": "\u20AC\x81\x82\x83\x84\u2026\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD" + }, + "ibm1162": "cp1162", + "csibm1162": "cp1162", + "cp1163": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\u20AC\xA5\xA6\xA7\u0153\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u0178\xB5\xB6\xB7\u0152\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF" + }, + "ibm1163": "cp1163", + "csibm1163": "cp1163", + "maccroatian": { + "type": "_sbcs", + "chars": "\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u2126\u017E\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uFFFD\xA9\u2044\xA4\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7" + }, + "maccyrillic": { + "type": "_sbcs", + "chars": "\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\xA2\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u2202\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\xA4" + }, + "macgreek": { + "type": "_sbcs", + "chars": "\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\xAD\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\u0387\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026\xA0\u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\uFFFD" + }, + "maciceland": { + "type": "_sbcs", + "chars": "\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7" + }, + "macroman": { + "type": "_sbcs", + "chars": "\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7" + }, + "macromania": { + "type": "_sbcs", + "chars": "\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u015E\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\u0103\u015F\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\u0162\u0163\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7" + }, + "macthai": { + "type": "_sbcs", + "chars": "\xAB\xBB\u2026\uF88C\uF88F\uF892\uF895\uF898\uF88B\uF88E\uF891\uF894\uF897\u201C\u201D\uF899\uFFFD\u2022\uF884\uF889\uF885\uF886\uF887\uF888\uF88A\uF88D\uF890\uF893\uF896\u2018\u2019\uFFFD\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFEFF\u200B\u2013\u2014\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u2122\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\xAE\xA9\uFFFD\uFFFD\uFFFD\uFFFD" + }, + "macturkish": { + "type": "_sbcs", + "chars": "\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\uFFFD\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7" + }, + "macukraine": { + "type": "_sbcs", + "chars": "\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\xA4" + }, + "koi8r": { + "type": "_sbcs", + "chars": "\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u2553\u2554\u2555\u2556\u2557\u2558\u2559\u255A\u255B\u255C\u255D\u255E\u255F\u2560\u2561\u0401\u2562\u2563\u2564\u2565\u2566\u2567\u2568\u2569\u256A\u256B\u256C\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A" + }, + "koi8u": { + "type": "_sbcs", + "chars": "\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255A\u255B\u0491\u255D\u255E\u255F\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256A\u0490\u256C\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A" + }, + "koi8ru": { + "type": "_sbcs", + "chars": "\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255A\u255B\u0491\u045E\u255E\u255F\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256A\u0490\u040E\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A" + }, + "koi8t": { + "type": "_sbcs", + "chars": "\u049B\u0493\u201A\u0492\u201E\u2026\u2020\u2021\uFFFD\u2030\u04B3\u2039\u04B2\u04B7\u04B6\uFFFD\u049A\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u04EF\u04EE\u0451\xA4\u04E3\xA6\xA7\uFFFD\uFFFD\uFFFD\xAB\xAC\xAD\xAE\uFFFD\xB0\xB1\xB2\u0401\uFFFD\u04E2\xB6\xB7\uFFFD\u2116\uFFFD\xBB\uFFFD\uFFFD\uFFFD\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A" + }, + "armscii8": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\u0587\u0589)(\xBB\xAB\u2014.\u055D,-\u058A\u2026\u055C\u055B\u055E\u0531\u0561\u0532\u0562\u0533\u0563\u0534\u0564\u0535\u0565\u0536\u0566\u0537\u0567\u0538\u0568\u0539\u0569\u053A\u056A\u053B\u056B\u053C\u056C\u053D\u056D\u053E\u056E\u053F\u056F\u0540\u0570\u0541\u0571\u0542\u0572\u0543\u0573\u0544\u0574\u0545\u0575\u0546\u0576\u0547\u0577\u0548\u0578\u0549\u0579\u054A\u057A\u054B\u057B\u054C\u057C\u054D\u057D\u054E\u057E\u054F\u057F\u0550\u0580\u0551\u0581\u0552\u0582\u0553\u0583\u0554\u0584\u0555\u0585\u0556\u0586\u055A\uFFFD" + }, + "rk1048": { + "type": "_sbcs", + "chars": "\u0402\u0403\u201A\u0453\u201E\u2026\u2020\u2021\u20AC\u2030\u0409\u2039\u040A\u049A\u04BA\u040F\u0452\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0459\u203A\u045A\u049B\u04BB\u045F\xA0\u04B0\u04B1\u04D8\xA4\u04E8\xA6\xA7\u0401\xA9\u0492\xAB\xAC\xAD\xAE\u04AE\xB0\xB1\u0406\u0456\u04E9\xB5\xB6\xB7\u0451\u2116\u0493\xBB\u04D9\u04A2\u04A3\u04AF\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F" + }, + "tcvn": { + "type": "_sbcs", + "chars": "\0\xDA\u1EE4\u1EEA\u1EEC\u1EEE\x07\b \n\v\f\r\u1EE8\u1EF0\u1EF2\u1EF6\u1EF8\xDD\u1EF4\x1B !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xC0\u1EA2\xC3\xC1\u1EA0\u1EB6\u1EAC\xC8\u1EBA\u1EBC\xC9\u1EB8\u1EC6\xCC\u1EC8\u0128\xCD\u1ECA\xD2\u1ECE\xD5\xD3\u1ECC\u1ED8\u1EDC\u1EDE\u1EE0\u1EDA\u1EE2\xD9\u1EE6\u0168\xA0\u0102\xC2\xCA\xD4\u01A0\u01AF\u0110\u0103\xE2\xEA\xF4\u01A1\u01B0\u0111\u1EB0\u0300\u0309\u0303\u0301\u0323\xE0\u1EA3\xE3\xE1\u1EA1\u1EB2\u1EB1\u1EB3\u1EB5\u1EAF\u1EB4\u1EAE\u1EA6\u1EA8\u1EAA\u1EA4\u1EC0\u1EB7\u1EA7\u1EA9\u1EAB\u1EA5\u1EAD\xE8\u1EC2\u1EBB\u1EBD\xE9\u1EB9\u1EC1\u1EC3\u1EC5\u1EBF\u1EC7\xEC\u1EC9\u1EC4\u1EBE\u1ED2\u0129\xED\u1ECB\xF2\u1ED4\u1ECF\xF5\xF3\u1ECD\u1ED3\u1ED5\u1ED7\u1ED1\u1ED9\u1EDD\u1EDF\u1EE1\u1EDB\u1EE3\xF9\u1ED6\u1EE7\u0169\xFA\u1EE5\u1EEB\u1EED\u1EEF\u1EE9\u1EF1\u1EF3\u1EF7\u1EF9\xFD\u1EF5\u1ED0" + }, + "georgianacademy": { + "type": "_sbcs", + "chars": "\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10EF\u10F0\u10F1\u10F2\u10F3\u10F4\u10F5\u10F6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF" + }, + "georgianps": { + "type": "_sbcs", + "chars": "\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10F1\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10F2\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10F3\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10F4\u10EF\u10F0\u10F5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF" + }, + "pt154": { + "type": "_sbcs", + "chars": "\u0496\u0492\u04EE\u0493\u201E\u2026\u04B6\u04AE\u04B2\u04AF\u04A0\u04E2\u04A2\u049A\u04BA\u04B8\u0497\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u04B3\u04B7\u04A1\u04E3\u04A3\u049B\u04BB\u04B9\xA0\u040E\u045E\u0408\u04E8\u0498\u04B0\xA7\u0401\xA9\u04D8\xAB\xAC\u04EF\xAE\u049C\xB0\u04B1\u0406\u0456\u0499\u04E9\xB6\xB7\u0451\u2116\u04D9\xBB\u0458\u04AA\u04AB\u049D\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F" + }, + "viscii": { + "type": "_sbcs", + "chars": "\0\u1EB2\u1EB4\u1EAA\x07\b \n\v\f\r\u1EF6\u1EF8\x1B\u1EF4 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7F\u1EA0\u1EAE\u1EB0\u1EB6\u1EA4\u1EA6\u1EA8\u1EAC\u1EBC\u1EB8\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EE2\u1EDA\u1EDC\u1EDE\u1ECA\u1ECE\u1ECC\u1EC8\u1EE6\u0168\u1EE4\u1EF2\xD5\u1EAF\u1EB1\u1EB7\u1EA5\u1EA7\u1EA9\u1EAD\u1EBD\u1EB9\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1ED1\u1ED3\u1ED5\u1ED7\u1EE0\u01A0\u1ED9\u1EDD\u1EDF\u1ECB\u1EF0\u1EE8\u1EEA\u1EEC\u01A1\u1EDB\u01AF\xC0\xC1\xC2\xC3\u1EA2\u0102\u1EB3\u1EB5\xC8\xC9\xCA\u1EBA\xCC\xCD\u0128\u1EF3\u0110\u1EE9\xD2\xD3\xD4\u1EA1\u1EF7\u1EEB\u1EED\xD9\xDA\u1EF9\u1EF5\xDD\u1EE1\u01B0\xE0\xE1\xE2\xE3\u1EA3\u0103\u1EEF\u1EAB\xE8\xE9\xEA\u1EBB\xEC\xED\u0129\u1EC9\u0111\u1EF1\xF2\xF3\xF4\xF5\u1ECF\u1ECD\u1EE5\xF9\xFA\u0169\u1EE7\xFD\u1EE3\u1EEE" + }, + "iso646cn": { + "type": "_sbcs", + "chars": "\0\x07\b \n\v\f\r\x1B !\"#\xA5%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" + }, + "iso646jp": { + "type": "_sbcs", + "chars": "\0\x07\b \n\v\f\r\x1B !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\xA5]^_`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" + }, + "hproman8": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xC0\xC2\xC8\xCA\xCB\xCE\xCF\xB4\u02CB\u02C6\xA8\u02DC\xD9\xDB\u20A4\xAF\xDD\xFD\xB0\xC7\xE7\xD1\xF1\xA1\xBF\xA4\xA3\xA5\xA7\u0192\xA2\xE2\xEA\xF4\xFB\xE1\xE9\xF3\xFA\xE0\xE8\xF2\xF9\xE4\xEB\xF6\xFC\xC5\xEE\xD8\xC6\xE5\xED\xF8\xE6\xC4\xEC\xD6\xDC\xC9\xEF\xDF\xD4\xC1\xC3\xE3\xD0\xF0\xCD\xCC\xD3\xD2\xD5\xF5\u0160\u0161\xDA\u0178\xFF\xDE\xFE\xB7\xB5\xB6\xBE\u2014\xBC\xBD\xAA\xBA\xAB\u25A0\xBB\xB1\uFFFD" + }, + "macintosh": { + "type": "_sbcs", + "chars": "\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7" + }, + "ascii": { + "type": "_sbcs", + "chars": "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" + }, + "tis620": { + "type": "_sbcs", + "chars": "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD" + } + }; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/dbcs-codec.js +var require_dbcs_codec = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/dbcs-codec.js"(exports2) { + "use strict"; + var Buffer2 = require_safer().Buffer; + exports2._dbcs = DBCSCodec; + var UNASSIGNED = -1; + var GB18030_CODE = -2; + var SEQ_START = -10; + var NODE_START = -1e3; + var UNASSIGNED_NODE = new Array(256); + var DEF_CHAR = -1; + for (i = 0; i < 256; i++) + UNASSIGNED_NODE[i] = UNASSIGNED; + var i; + function DBCSCodec(codecOptions, iconv) { + this.encodingName = codecOptions.encodingName; + if (!codecOptions) + throw new Error("DBCS codec is called without the data."); + if (!codecOptions.table) + throw new Error("Encoding '" + this.encodingName + "' has no data."); + var mappingTable = codecOptions.table(); + this.decodeTables = []; + this.decodeTables[0] = UNASSIGNED_NODE.slice(0); + this.decodeTableSeq = []; + for (var i2 = 0; i2 < mappingTable.length; i2++) + this._addDecodeChunk(mappingTable[i2]); + this.defaultCharUnicode = iconv.defaultCharUnicode; + this.encodeTable = []; + this.encodeTableSeq = []; + var skipEncodeChars = {}; + if (codecOptions.encodeSkipVals) + for (var i2 = 0; i2 < codecOptions.encodeSkipVals.length; i2++) { + var val = codecOptions.encodeSkipVals[i2]; + if (typeof val === "number") + skipEncodeChars[val] = true; + else + for (var j = val.from; j <= val.to; j++) + skipEncodeChars[j] = true; + } + this._fillEncodeTable(0, 0, skipEncodeChars); + if (codecOptions.encodeAdd) { + for (var uChar in codecOptions.encodeAdd) + if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) + this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); + } + this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; + if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]["?"]; + if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); + if (typeof codecOptions.gb18030 === "function") { + this.gb18030 = codecOptions.gb18030(); + var thirdByteNodeIdx = this.decodeTables.length; + var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0); + var fourthByteNodeIdx = this.decodeTables.length; + var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0); + for (var i2 = 129; i2 <= 254; i2++) { + var secondByteNodeIdx = NODE_START - this.decodeTables[0][i2]; + var secondByteNode = this.decodeTables[secondByteNodeIdx]; + for (var j = 48; j <= 57; j++) + secondByteNode[j] = NODE_START - thirdByteNodeIdx; + } + for (var i2 = 129; i2 <= 254; i2++) + thirdByteNode[i2] = NODE_START - fourthByteNodeIdx; + for (var i2 = 48; i2 <= 57; i2++) + fourthByteNode[i2] = GB18030_CODE; + } + } + DBCSCodec.prototype.encoder = DBCSEncoder; + DBCSCodec.prototype.decoder = DBCSDecoder; + DBCSCodec.prototype._getDecodeTrieNode = function(addr) { + var bytes = []; + for (; addr > 0; addr >>= 8) + bytes.push(addr & 255); + if (bytes.length == 0) + bytes.push(0); + var node = this.decodeTables[0]; + for (var i2 = bytes.length - 1; i2 > 0; i2--) { + var val = node[bytes[i2]]; + if (val == UNASSIGNED) { + node[bytes[i2]] = NODE_START - this.decodeTables.length; + this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); + } else if (val <= NODE_START) { + node = this.decodeTables[NODE_START - val]; + } else + throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); + } + return node; + }; + DBCSCodec.prototype._addDecodeChunk = function(chunk) { + var curAddr = parseInt(chunk[0], 16); + var writeTable = this._getDecodeTrieNode(curAddr); + curAddr = curAddr & 255; + for (var k = 1; k < chunk.length; k++) { + var part = chunk[k]; + if (typeof part === "string") { + for (var l2 = 0; l2 < part.length; ) { + var code = part.charCodeAt(l2++); + if (55296 <= code && code < 56320) { + var codeTrail = part.charCodeAt(l2++); + if (56320 <= codeTrail && codeTrail < 57344) + writeTable[curAddr++] = 65536 + (code - 55296) * 1024 + (codeTrail - 56320); + else + throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); + } else if (4080 < code && code <= 4095) { + var len = 4095 - code + 2; + var seq = []; + for (var m = 0; m < len; m++) + seq.push(part.charCodeAt(l2++)); + writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; + this.decodeTableSeq.push(seq); + } else + writeTable[curAddr++] = code; + } + } else if (typeof part === "number") { + var charCode = writeTable[curAddr - 1] + 1; + for (var l2 = 0; l2 < part; l2++) + writeTable[curAddr++] = charCode++; + } else + throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); + } + if (curAddr > 255) + throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); + }; + DBCSCodec.prototype._getEncodeBucket = function(uCode) { + var high = uCode >> 8; + if (this.encodeTable[high] === void 0) + this.encodeTable[high] = UNASSIGNED_NODE.slice(0); + return this.encodeTable[high]; + }; + DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 255; + if (bucket[low] <= SEQ_START) + this.encodeTableSeq[SEQ_START - bucket[low]][DEF_CHAR] = dbcsCode; + else if (bucket[low] == UNASSIGNED) + bucket[low] = dbcsCode; + }; + DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { + var uCode = seq[0]; + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 255; + var node; + if (bucket[low] <= SEQ_START) { + node = this.encodeTableSeq[SEQ_START - bucket[low]]; + } else { + node = {}; + if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; + bucket[low] = SEQ_START - this.encodeTableSeq.length; + this.encodeTableSeq.push(node); + } + for (var j = 1; j < seq.length - 1; j++) { + var oldVal = node[uCode]; + if (typeof oldVal === "object") + node = oldVal; + else { + node = node[uCode] = {}; + if (oldVal !== void 0) + node[DEF_CHAR] = oldVal; + } + } + uCode = seq[seq.length - 1]; + node[uCode] = dbcsCode; + }; + DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { + var node = this.decodeTables[nodeIdx]; + for (var i2 = 0; i2 < 256; i2++) { + var uCode = node[i2]; + var mbCode = prefix + i2; + if (skipEncodeChars[mbCode]) + continue; + if (uCode >= 0) + this._setEncodeChar(uCode, mbCode); + else if (uCode <= NODE_START) + this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars); + else if (uCode <= SEQ_START) + this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); + } + }; + function DBCSEncoder(options, codec) { + this.leadSurrogate = -1; + this.seqObj = void 0; + this.encodeTable = codec.encodeTable; + this.encodeTableSeq = codec.encodeTableSeq; + this.defaultCharSingleByte = codec.defCharSB; + this.gb18030 = codec.gb18030; + } + DBCSEncoder.prototype.write = function(str) { + var newBuf = Buffer2.alloc(str.length * (this.gb18030 ? 4 : 3)), leadSurrogate = this.leadSurrogate, seqObj = this.seqObj, nextChar = -1, i2 = 0, j = 0; + while (true) { + if (nextChar === -1) { + if (i2 == str.length) break; + var uCode = str.charCodeAt(i2++); + } else { + var uCode = nextChar; + nextChar = -1; + } + if (55296 <= uCode && uCode < 57344) { + if (uCode < 56320) { + if (leadSurrogate === -1) { + leadSurrogate = uCode; + continue; + } else { + leadSurrogate = uCode; + uCode = UNASSIGNED; + } + } else { + if (leadSurrogate !== -1) { + uCode = 65536 + (leadSurrogate - 55296) * 1024 + (uCode - 56320); + leadSurrogate = -1; + } else { + uCode = UNASSIGNED; + } + } + } else if (leadSurrogate !== -1) { + nextChar = uCode; + uCode = UNASSIGNED; + leadSurrogate = -1; + } + var dbcsCode = UNASSIGNED; + if (seqObj !== void 0 && uCode != UNASSIGNED) { + var resCode = seqObj[uCode]; + if (typeof resCode === "object") { + seqObj = resCode; + continue; + } else if (typeof resCode == "number") { + dbcsCode = resCode; + } else if (resCode == void 0) { + resCode = seqObj[DEF_CHAR]; + if (resCode !== void 0) { + dbcsCode = resCode; + nextChar = uCode; + } else { + } + } + seqObj = void 0; + } else if (uCode >= 0) { + var subtable = this.encodeTable[uCode >> 8]; + if (subtable !== void 0) + dbcsCode = subtable[uCode & 255]; + if (dbcsCode <= SEQ_START) { + seqObj = this.encodeTableSeq[SEQ_START - dbcsCode]; + continue; + } + if (dbcsCode == UNASSIGNED && this.gb18030) { + var idx = findIdx(this.gb18030.uChars, uCode); + if (idx != -1) { + var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); + newBuf[j++] = 129 + Math.floor(dbcsCode / 12600); + dbcsCode = dbcsCode % 12600; + newBuf[j++] = 48 + Math.floor(dbcsCode / 1260); + dbcsCode = dbcsCode % 1260; + newBuf[j++] = 129 + Math.floor(dbcsCode / 10); + dbcsCode = dbcsCode % 10; + newBuf[j++] = 48 + dbcsCode; + continue; + } + } + } + if (dbcsCode === UNASSIGNED) + dbcsCode = this.defaultCharSingleByte; + if (dbcsCode < 256) { + newBuf[j++] = dbcsCode; + } else if (dbcsCode < 65536) { + newBuf[j++] = dbcsCode >> 8; + newBuf[j++] = dbcsCode & 255; + } else { + newBuf[j++] = dbcsCode >> 16; + newBuf[j++] = dbcsCode >> 8 & 255; + newBuf[j++] = dbcsCode & 255; + } + } + this.seqObj = seqObj; + this.leadSurrogate = leadSurrogate; + return newBuf.slice(0, j); + }; + DBCSEncoder.prototype.end = function() { + if (this.leadSurrogate === -1 && this.seqObj === void 0) + return; + var newBuf = Buffer2.alloc(10), j = 0; + if (this.seqObj) { + var dbcsCode = this.seqObj[DEF_CHAR]; + if (dbcsCode !== void 0) { + if (dbcsCode < 256) { + newBuf[j++] = dbcsCode; + } else { + newBuf[j++] = dbcsCode >> 8; + newBuf[j++] = dbcsCode & 255; + } + } else { + } + this.seqObj = void 0; + } + if (this.leadSurrogate !== -1) { + newBuf[j++] = this.defaultCharSingleByte; + this.leadSurrogate = -1; + } + return newBuf.slice(0, j); + }; + DBCSEncoder.prototype.findIdx = findIdx; + function DBCSDecoder(options, codec) { + this.nodeIdx = 0; + this.prevBuf = Buffer2.alloc(0); + this.decodeTables = codec.decodeTables; + this.decodeTableSeq = codec.decodeTableSeq; + this.defaultCharUnicode = codec.defaultCharUnicode; + this.gb18030 = codec.gb18030; + } + DBCSDecoder.prototype.write = function(buf) { + var newBuf = Buffer2.alloc(buf.length * 2), nodeIdx = this.nodeIdx, prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length, seqStart = -this.prevBuf.length, uCode; + if (prevBufOffset > 0) + prevBuf = Buffer2.concat([prevBuf, buf.slice(0, 10)]); + for (var i2 = 0, j = 0; i2 < buf.length; i2++) { + var curByte = i2 >= 0 ? buf[i2] : prevBuf[i2 + prevBufOffset]; + var uCode = this.decodeTables[nodeIdx][curByte]; + if (uCode >= 0) { + } else if (uCode === UNASSIGNED) { + i2 = seqStart; + uCode = this.defaultCharUnicode.charCodeAt(0); + } else if (uCode === GB18030_CODE) { + var curSeq = seqStart >= 0 ? buf.slice(seqStart, i2 + 1) : prevBuf.slice(seqStart + prevBufOffset, i2 + 1 + prevBufOffset); + var ptr = (curSeq[0] - 129) * 12600 + (curSeq[1] - 48) * 1260 + (curSeq[2] - 129) * 10 + (curSeq[3] - 48); + var idx = findIdx(this.gb18030.gbChars, ptr); + uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; + } else if (uCode <= NODE_START) { + nodeIdx = NODE_START - uCode; + continue; + } else if (uCode <= SEQ_START) { + var seq = this.decodeTableSeq[SEQ_START - uCode]; + for (var k = 0; k < seq.length - 1; k++) { + uCode = seq[k]; + newBuf[j++] = uCode & 255; + newBuf[j++] = uCode >> 8; + } + uCode = seq[seq.length - 1]; + } else + throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); + if (uCode > 65535) { + uCode -= 65536; + var uCodeLead = 55296 + Math.floor(uCode / 1024); + newBuf[j++] = uCodeLead & 255; + newBuf[j++] = uCodeLead >> 8; + uCode = 56320 + uCode % 1024; + } + newBuf[j++] = uCode & 255; + newBuf[j++] = uCode >> 8; + nodeIdx = 0; + seqStart = i2 + 1; + } + this.nodeIdx = nodeIdx; + this.prevBuf = seqStart >= 0 ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset); + return newBuf.slice(0, j).toString("ucs2"); + }; + DBCSDecoder.prototype.end = function() { + var ret2 = ""; + while (this.prevBuf.length > 0) { + ret2 += this.defaultCharUnicode; + var buf = this.prevBuf.slice(1); + this.prevBuf = Buffer2.alloc(0); + this.nodeIdx = 0; + if (buf.length > 0) + ret2 += this.write(buf); + } + this.nodeIdx = 0; + return ret2; + }; + function findIdx(table, val) { + if (table[0] > val) + return -1; + var l2 = 0, r = table.length; + while (l2 < r - 1) { + var mid = l2 + Math.floor((r - l2 + 1) / 2); + if (table[mid] <= val) + l2 = mid; + else + r = mid; + } + return l2; + } + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tables/shiftjis.json +var require_shiftjis = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tables/shiftjis.json"(exports2, module2) { + module2.exports = [ + ["0", "\0", 128], + ["a1", "\uFF61", 62], + ["8140", "\u3000\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01\u309B\u309C\xB4\uFF40\xA8\uFF3E\uFFE3\uFF3F\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\u2015\u2010\uFF0F\uFF3C\uFF5E\u2225\uFF5C\u2026\u2025\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\uFF3B\uFF3D\uFF5B\uFF5D\u3008", 9, "\uFF0B\uFF0D\xB1\xD7"], + ["8180", "\xF7\uFF1D\u2260\uFF1C\uFF1E\u2266\u2267\u221E\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFFE5\uFF04\uFFE0\uFFE1\uFF05\uFF03\uFF06\uFF0A\uFF20\xA7\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u203B\u3012\u2192\u2190\u2191\u2193\u3013"], + ["81b8", "\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229"], + ["81c8", "\u2227\u2228\uFFE2\u21D2\u21D4\u2200\u2203"], + ["81da", "\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C"], + ["81f0", "\u212B\u2030\u266F\u266D\u266A\u2020\u2021\xB6"], + ["81fc", "\u25EF"], + ["824f", "\uFF10", 9], + ["8260", "\uFF21", 25], + ["8281", "\uFF41", 25], + ["829f", "\u3041", 82], + ["8340", "\u30A1", 62], + ["8380", "\u30E0", 22], + ["839f", "\u0391", 16, "\u03A3", 6], + ["83bf", "\u03B1", 16, "\u03C3", 6], + ["8440", "\u0410", 5, "\u0401\u0416", 25], + ["8470", "\u0430", 5, "\u0451\u0436", 7], + ["8480", "\u043E", 17], + ["849f", "\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542"], + ["8740", "\u2460", 19, "\u2160", 9], + ["875f", "\u3349\u3314\u3322\u334D\u3318\u3327\u3303\u3336\u3351\u3357\u330D\u3326\u3323\u332B\u334A\u333B\u339C\u339D\u339E\u338E\u338F\u33C4\u33A1"], + ["877e", "\u337B"], + ["8780", "\u301D\u301F\u2116\u33CD\u2121\u32A4", 4, "\u3231\u3232\u3239\u337E\u337D\u337C\u2252\u2261\u222B\u222E\u2211\u221A\u22A5\u2220\u221F\u22BF\u2235\u2229\u222A"], + ["889f", "\u4E9C\u5516\u5A03\u963F\u54C0\u611B\u6328\u59F6\u9022\u8475\u831C\u7A50\u60AA\u63E1\u6E25\u65ED\u8466\u82A6\u9BF5\u6893\u5727\u65A1\u6271\u5B9B\u59D0\u867B\u98F4\u7D62\u7DBE\u9B8E\u6216\u7C9F\u88B7\u5B89\u5EB5\u6309\u6697\u6848\u95C7\u978D\u674F\u4EE5\u4F0A\u4F4D\u4F9D\u5049\u56F2\u5937\u59D4\u5A01\u5C09\u60DF\u610F\u6170\u6613\u6905\u70BA\u754F\u7570\u79FB\u7DAD\u7DEF\u80C3\u840E\u8863\u8B02\u9055\u907A\u533B\u4E95\u4EA5\u57DF\u80B2\u90C1\u78EF\u4E00\u58F1\u6EA2\u9038\u7A32\u8328\u828B\u9C2F\u5141\u5370\u54BD\u54E1\u56E0\u59FB\u5F15\u98F2\u6DEB\u80E4\u852D"], + ["8940", "\u9662\u9670\u96A0\u97FB\u540B\u53F3\u5B87\u70CF\u7FBD\u8FC2\u96E8\u536F\u9D5C\u7ABA\u4E11\u7893\u81FC\u6E26\u5618\u5504\u6B1D\u851A\u9C3B\u59E5\u53A9\u6D66\u74DC\u958F\u5642\u4E91\u904B\u96F2\u834F\u990C\u53E1\u55B6\u5B30\u5F71\u6620\u66F3\u6804\u6C38\u6CF3\u6D29\u745B\u76C8\u7A4E\u9834\u82F1\u885B\u8A60\u92ED\u6DB2\u75AB\u76CA\u99C5\u60A6\u8B01\u8D8A\u95B2\u698E\u53AD\u5186"], + ["8980", "\u5712\u5830\u5944\u5BB4\u5EF6\u6028\u63A9\u63F4\u6CBF\u6F14\u708E\u7114\u7159\u71D5\u733F\u7E01\u8276\u82D1\u8597\u9060\u925B\u9D1B\u5869\u65BC\u6C5A\u7525\u51F9\u592E\u5965\u5F80\u5FDC\u62BC\u65FA\u6A2A\u6B27\u6BB4\u738B\u7FC1\u8956\u9D2C\u9D0E\u9EC4\u5CA1\u6C96\u837B\u5104\u5C4B\u61B6\u81C6\u6876\u7261\u4E59\u4FFA\u5378\u6069\u6E29\u7A4F\u97F3\u4E0B\u5316\u4EEE\u4F55\u4F3D\u4FA1\u4F73\u52A0\u53EF\u5609\u590F\u5AC1\u5BB6\u5BE1\u79D1\u6687\u679C\u67B6\u6B4C\u6CB3\u706B\u73C2\u798D\u79BE\u7A3C\u7B87\u82B1\u82DB\u8304\u8377\u83EF\u83D3\u8766\u8AB2\u5629\u8CA8\u8FE6\u904E\u971E\u868A\u4FC4\u5CE8\u6211\u7259\u753B\u81E5\u82BD\u86FE\u8CC0\u96C5\u9913\u99D5\u4ECB\u4F1A\u89E3\u56DE\u584A\u58CA\u5EFB\u5FEB\u602A\u6094\u6062\u61D0\u6212\u62D0\u6539"], + ["8a40", "\u9B41\u6666\u68B0\u6D77\u7070\u754C\u7686\u7D75\u82A5\u87F9\u958B\u968E\u8C9D\u51F1\u52BE\u5916\u54B3\u5BB3\u5D16\u6168\u6982\u6DAF\u788D\u84CB\u8857\u8A72\u93A7\u9AB8\u6D6C\u99A8\u86D9\u57A3\u67FF\u86CE\u920E\u5283\u5687\u5404\u5ED3\u62E1\u64B9\u683C\u6838\u6BBB\u7372\u78BA\u7A6B\u899A\u89D2\u8D6B\u8F03\u90ED\u95A3\u9694\u9769\u5B66\u5CB3\u697D\u984D\u984E\u639B\u7B20\u6A2B"], + ["8a80", "\u6A7F\u68B6\u9C0D\u6F5F\u5272\u559D\u6070\u62EC\u6D3B\u6E07\u6ED1\u845B\u8910\u8F44\u4E14\u9C39\u53F6\u691B\u6A3A\u9784\u682A\u515C\u7AC3\u84B2\u91DC\u938C\u565B\u9D28\u6822\u8305\u8431\u7CA5\u5208\u82C5\u74E6\u4E7E\u4F83\u51A0\u5BD2\u520A\u52D8\u52E7\u5DFB\u559A\u582A\u59E6\u5B8C\u5B98\u5BDB\u5E72\u5E79\u60A3\u611F\u6163\u61BE\u63DB\u6562\u67D1\u6853\u68FA\u6B3E\u6B53\u6C57\u6F22\u6F97\u6F45\u74B0\u7518\u76E3\u770B\u7AFF\u7BA1\u7C21\u7DE9\u7F36\u7FF0\u809D\u8266\u839E\u89B3\u8ACC\u8CAB\u9084\u9451\u9593\u9591\u95A2\u9665\u97D3\u9928\u8218\u4E38\u542B\u5CB8\u5DCC\u73A9\u764C\u773C\u5CA9\u7FEB\u8D0B\u96C1\u9811\u9854\u9858\u4F01\u4F0E\u5371\u559C\u5668\u57FA\u5947\u5B09\u5BC4\u5C90\u5E0C\u5E7E\u5FCC\u63EE\u673A\u65D7\u65E2\u671F\u68CB\u68C4"], + ["8b40", "\u6A5F\u5E30\u6BC5\u6C17\u6C7D\u757F\u7948\u5B63\u7A00\u7D00\u5FBD\u898F\u8A18\u8CB4\u8D77\u8ECC\u8F1D\u98E2\u9A0E\u9B3C\u4E80\u507D\u5100\u5993\u5B9C\u622F\u6280\u64EC\u6B3A\u72A0\u7591\u7947\u7FA9\u87FB\u8ABC\u8B70\u63AC\u83CA\u97A0\u5409\u5403\u55AB\u6854\u6A58\u8A70\u7827\u6775\u9ECD\u5374\u5BA2\u811A\u8650\u9006\u4E18\u4E45\u4EC7\u4F11\u53CA\u5438\u5BAE\u5F13\u6025\u6551"], + ["8b80", "\u673D\u6C42\u6C72\u6CE3\u7078\u7403\u7A76\u7AAE\u7B08\u7D1A\u7CFE\u7D66\u65E7\u725B\u53BB\u5C45\u5DE8\u62D2\u62E0\u6319\u6E20\u865A\u8A31\u8DDD\u92F8\u6F01\u79A6\u9B5A\u4EA8\u4EAB\u4EAC\u4F9B\u4FA0\u50D1\u5147\u7AF6\u5171\u51F6\u5354\u5321\u537F\u53EB\u55AC\u5883\u5CE1\u5F37\u5F4A\u602F\u6050\u606D\u631F\u6559\u6A4B\u6CC1\u72C2\u72ED\u77EF\u80F8\u8105\u8208\u854E\u90F7\u93E1\u97FF\u9957\u9A5A\u4EF0\u51DD\u5C2D\u6681\u696D\u5C40\u66F2\u6975\u7389\u6850\u7C81\u50C5\u52E4\u5747\u5DFE\u9326\u65A4\u6B23\u6B3D\u7434\u7981\u79BD\u7B4B\u7DCA\u82B9\u83CC\u887F\u895F\u8B39\u8FD1\u91D1\u541F\u9280\u4E5D\u5036\u53E5\u533A\u72D7\u7396\u77E9\u82E6\u8EAF\u99C6\u99C8\u99D2\u5177\u611A\u865E\u55B0\u7A7A\u5076\u5BD3\u9047\u9685\u4E32\u6ADB\u91E7\u5C51\u5C48"], + ["8c40", "\u6398\u7A9F\u6C93\u9774\u8F61\u7AAA\u718A\u9688\u7C82\u6817\u7E70\u6851\u936C\u52F2\u541B\u85AB\u8A13\u7FA4\u8ECD\u90E1\u5366\u8888\u7941\u4FC2\u50BE\u5211\u5144\u5553\u572D\u73EA\u578B\u5951\u5F62\u5F84\u6075\u6176\u6167\u61A9\u63B2\u643A\u656C\u666F\u6842\u6E13\u7566\u7A3D\u7CFB\u7D4C\u7D99\u7E4B\u7F6B\u830E\u834A\u86CD\u8A08\u8A63\u8B66\u8EFD\u981A\u9D8F\u82B8\u8FCE\u9BE8"], + ["8c80", "\u5287\u621F\u6483\u6FC0\u9699\u6841\u5091\u6B20\u6C7A\u6F54\u7A74\u7D50\u8840\u8A23\u6708\u4EF6\u5039\u5026\u5065\u517C\u5238\u5263\u55A7\u570F\u5805\u5ACC\u5EFA\u61B2\u61F8\u62F3\u6372\u691C\u6A29\u727D\u72AC\u732E\u7814\u786F\u7D79\u770C\u80A9\u898B\u8B19\u8CE2\u8ED2\u9063\u9375\u967A\u9855\u9A13\u9E78\u5143\u539F\u53B3\u5E7B\u5F26\u6E1B\u6E90\u7384\u73FE\u7D43\u8237\u8A00\u8AFA\u9650\u4E4E\u500B\u53E4\u547C\u56FA\u59D1\u5B64\u5DF1\u5EAB\u5F27\u6238\u6545\u67AF\u6E56\u72D0\u7CCA\u88B4\u80A1\u80E1\u83F0\u864E\u8A87\u8DE8\u9237\u96C7\u9867\u9F13\u4E94\u4E92\u4F0D\u5348\u5449\u543E\u5A2F\u5F8C\u5FA1\u609F\u68A7\u6A8E\u745A\u7881\u8A9E\u8AA4\u8B77\u9190\u4E5E\u9BC9\u4EA4\u4F7C\u4FAF\u5019\u5016\u5149\u516C\u529F\u52B9\u52FE\u539A\u53E3\u5411"], + ["8d40", "\u540E\u5589\u5751\u57A2\u597D\u5B54\u5B5D\u5B8F\u5DE5\u5DE7\u5DF7\u5E78\u5E83\u5E9A\u5EB7\u5F18\u6052\u614C\u6297\u62D8\u63A7\u653B\u6602\u6643\u66F4\u676D\u6821\u6897\u69CB\u6C5F\u6D2A\u6D69\u6E2F\u6E9D\u7532\u7687\u786C\u7A3F\u7CE0\u7D05\u7D18\u7D5E\u7DB1\u8015\u8003\u80AF\u80B1\u8154\u818F\u822A\u8352\u884C\u8861\u8B1B\u8CA2\u8CFC\u90CA\u9175\u9271\u783F\u92FC\u95A4\u964D"], + ["8d80", "\u9805\u9999\u9AD8\u9D3B\u525B\u52AB\u53F7\u5408\u58D5\u62F7\u6FE0\u8C6A\u8F5F\u9EB9\u514B\u523B\u544A\u56FD\u7A40\u9177\u9D60\u9ED2\u7344\u6F09\u8170\u7511\u5FFD\u60DA\u9AA8\u72DB\u8FBC\u6B64\u9803\u4ECA\u56F0\u5764\u58BE\u5A5A\u6068\u61C7\u660F\u6606\u6839\u68B1\u6DF7\u75D5\u7D3A\u826E\u9B42\u4E9B\u4F50\u53C9\u5506\u5D6F\u5DE6\u5DEE\u67FB\u6C99\u7473\u7802\u8A50\u9396\u88DF\u5750\u5EA7\u632B\u50B5\u50AC\u518D\u6700\u54C9\u585E\u59BB\u5BB0\u5F69\u624D\u63A1\u683D\u6B73\u6E08\u707D\u91C7\u7280\u7815\u7826\u796D\u658E\u7D30\u83DC\u88C1\u8F09\u969B\u5264\u5728\u6750\u7F6A\u8CA1\u51B4\u5742\u962A\u583A\u698A\u80B4\u54B2\u5D0E\u57FC\u7895\u9DFA\u4F5C\u524A\u548B\u643E\u6628\u6714\u67F5\u7A84\u7B56\u7D22\u932F\u685C\u9BAD\u7B39\u5319\u518A\u5237"], + ["8e40", "\u5BDF\u62F6\u64AE\u64E6\u672D\u6BBA\u85A9\u96D1\u7690\u9BD6\u634C\u9306\u9BAB\u76BF\u6652\u4E09\u5098\u53C2\u5C71\u60E8\u6492\u6563\u685F\u71E6\u73CA\u7523\u7B97\u7E82\u8695\u8B83\u8CDB\u9178\u9910\u65AC\u66AB\u6B8B\u4ED5\u4ED4\u4F3A\u4F7F\u523A\u53F8\u53F2\u55E3\u56DB\u58EB\u59CB\u59C9\u59FF\u5B50\u5C4D\u5E02\u5E2B\u5FD7\u601D\u6307\u652F\u5B5C\u65AF\u65BD\u65E8\u679D\u6B62"], + ["8e80", "\u6B7B\u6C0F\u7345\u7949\u79C1\u7CF8\u7D19\u7D2B\u80A2\u8102\u81F3\u8996\u8A5E\u8A69\u8A66\u8A8C\u8AEE\u8CC7\u8CDC\u96CC\u98FC\u6B6F\u4E8B\u4F3C\u4F8D\u5150\u5B57\u5BFA\u6148\u6301\u6642\u6B21\u6ECB\u6CBB\u723E\u74BD\u75D4\u78C1\u793A\u800C\u8033\u81EA\u8494\u8F9E\u6C50\u9E7F\u5F0F\u8B58\u9D2B\u7AFA\u8EF8\u5B8D\u96EB\u4E03\u53F1\u57F7\u5931\u5AC9\u5BA4\u6089\u6E7F\u6F06\u75BE\u8CEA\u5B9F\u8500\u7BE0\u5072\u67F4\u829D\u5C61\u854A\u7E1E\u820E\u5199\u5C04\u6368\u8D66\u659C\u716E\u793E\u7D17\u8005\u8B1D\u8ECA\u906E\u86C7\u90AA\u501F\u52FA\u5C3A\u6753\u707C\u7235\u914C\u91C8\u932B\u82E5\u5BC2\u5F31\u60F9\u4E3B\u53D6\u5B88\u624B\u6731\u6B8A\u72E9\u73E0\u7A2E\u816B\u8DA3\u9152\u9996\u5112\u53D7\u546A\u5BFF\u6388\u6A39\u7DAC\u9700\u56DA\u53CE\u5468"], + ["8f40", "\u5B97\u5C31\u5DDE\u4FEE\u6101\u62FE\u6D32\u79C0\u79CB\u7D42\u7E4D\u7FD2\u81ED\u821F\u8490\u8846\u8972\u8B90\u8E74\u8F2F\u9031\u914B\u916C\u96C6\u919C\u4EC0\u4F4F\u5145\u5341\u5F93\u620E\u67D4\u6C41\u6E0B\u7363\u7E26\u91CD\u9283\u53D4\u5919\u5BBF\u6DD1\u795D\u7E2E\u7C9B\u587E\u719F\u51FA\u8853\u8FF0\u4FCA\u5CFB\u6625\u77AC\u7AE3\u821C\u99FF\u51C6\u5FAA\u65EC\u696F\u6B89\u6DF3"], + ["8f80", "\u6E96\u6F64\u76FE\u7D14\u5DE1\u9075\u9187\u9806\u51E6\u521D\u6240\u6691\u66D9\u6E1A\u5EB6\u7DD2\u7F72\u66F8\u85AF\u85F7\u8AF8\u52A9\u53D9\u5973\u5E8F\u5F90\u6055\u92E4\u9664\u50B7\u511F\u52DD\u5320\u5347\u53EC\u54E8\u5546\u5531\u5617\u5968\u59BE\u5A3C\u5BB5\u5C06\u5C0F\u5C11\u5C1A\u5E84\u5E8A\u5EE0\u5F70\u627F\u6284\u62DB\u638C\u6377\u6607\u660C\u662D\u6676\u677E\u68A2\u6A1F\u6A35\u6CBC\u6D88\u6E09\u6E58\u713C\u7126\u7167\u75C7\u7701\u785D\u7901\u7965\u79F0\u7AE0\u7B11\u7CA7\u7D39\u8096\u83D6\u848B\u8549\u885D\u88F3\u8A1F\u8A3C\u8A54\u8A73\u8C61\u8CDE\u91A4\u9266\u937E\u9418\u969C\u9798\u4E0A\u4E08\u4E1E\u4E57\u5197\u5270\u57CE\u5834\u58CC\u5B22\u5E38\u60C5\u64FE\u6761\u6756\u6D44\u72B6\u7573\u7A63\u84B8\u8B72\u91B8\u9320\u5631\u57F4\u98FE"], + ["9040", "\u62ED\u690D\u6B96\u71ED\u7E54\u8077\u8272\u89E6\u98DF\u8755\u8FB1\u5C3B\u4F38\u4FE1\u4FB5\u5507\u5A20\u5BDD\u5BE9\u5FC3\u614E\u632F\u65B0\u664B\u68EE\u699B\u6D78\u6DF1\u7533\u75B9\u771F\u795E\u79E6\u7D33\u81E3\u82AF\u85AA\u89AA\u8A3A\u8EAB\u8F9B\u9032\u91DD\u9707\u4EBA\u4EC1\u5203\u5875\u58EC\u5C0B\u751A\u5C3D\u814E\u8A0A\u8FC5\u9663\u976D\u7B25\u8ACF\u9808\u9162\u56F3\u53A8"], + ["9080", "\u9017\u5439\u5782\u5E25\u63A8\u6C34\u708A\u7761\u7C8B\u7FE0\u8870\u9042\u9154\u9310\u9318\u968F\u745E\u9AC4\u5D07\u5D69\u6570\u67A2\u8DA8\u96DB\u636E\u6749\u6919\u83C5\u9817\u96C0\u88FE\u6F84\u647A\u5BF8\u4E16\u702C\u755D\u662F\u51C4\u5236\u52E2\u59D3\u5F81\u6027\u6210\u653F\u6574\u661F\u6674\u68F2\u6816\u6B63\u6E05\u7272\u751F\u76DB\u7CBE\u8056\u58F0\u88FD\u897F\u8AA0\u8A93\u8ACB\u901D\u9192\u9752\u9759\u6589\u7A0E\u8106\u96BB\u5E2D\u60DC\u621A\u65A5\u6614\u6790\u77F3\u7A4D\u7C4D\u7E3E\u810A\u8CAC\u8D64\u8DE1\u8E5F\u78A9\u5207\u62D9\u63A5\u6442\u6298\u8A2D\u7A83\u7BC0\u8AAC\u96EA\u7D76\u820C\u8749\u4ED9\u5148\u5343\u5360\u5BA3\u5C02\u5C16\u5DDD\u6226\u6247\u64B0\u6813\u6834\u6CC9\u6D45\u6D17\u67D3\u6F5C\u714E\u717D\u65CB\u7A7F\u7BAD\u7DDA"], + ["9140", "\u7E4A\u7FA8\u817A\u821B\u8239\u85A6\u8A6E\u8CCE\u8DF5\u9078\u9077\u92AD\u9291\u9583\u9BAE\u524D\u5584\u6F38\u7136\u5168\u7985\u7E55\u81B3\u7CCE\u564C\u5851\u5CA8\u63AA\u66FE\u66FD\u695A\u72D9\u758F\u758E\u790E\u7956\u79DF\u7C97\u7D20\u7D44\u8607\u8A34\u963B\u9061\u9F20\u50E7\u5275\u53CC\u53E2\u5009\u55AA\u58EE\u594F\u723D\u5B8B\u5C64\u531D\u60E3\u60F3\u635C\u6383\u633F\u63BB"], + ["9180", "\u64CD\u65E9\u66F9\u5DE3\u69CD\u69FD\u6F15\u71E5\u4E89\u75E9\u76F8\u7A93\u7CDF\u7DCF\u7D9C\u8061\u8349\u8358\u846C\u84BC\u85FB\u88C5\u8D70\u9001\u906D\u9397\u971C\u9A12\u50CF\u5897\u618E\u81D3\u8535\u8D08\u9020\u4FC3\u5074\u5247\u5373\u606F\u6349\u675F\u6E2C\u8DB3\u901F\u4FD7\u5C5E\u8CCA\u65CF\u7D9A\u5352\u8896\u5176\u63C3\u5B58\u5B6B\u5C0A\u640D\u6751\u905C\u4ED6\u591A\u592A\u6C70\u8A51\u553E\u5815\u59A5\u60F0\u6253\u67C1\u8235\u6955\u9640\u99C4\u9A28\u4F53\u5806\u5BFE\u8010\u5CB1\u5E2F\u5F85\u6020\u614B\u6234\u66FF\u6CF0\u6EDE\u80CE\u817F\u82D4\u888B\u8CB8\u9000\u902E\u968A\u9EDB\u9BDB\u4EE3\u53F0\u5927\u7B2C\u918D\u984C\u9DF9\u6EDD\u7027\u5353\u5544\u5B85\u6258\u629E\u62D3\u6CA2\u6FEF\u7422\u8A17\u9438\u6FC1\u8AFE\u8338\u51E7\u86F8\u53EA"], + ["9240", "\u53E9\u4F46\u9054\u8FB0\u596A\u8131\u5DFD\u7AEA\u8FBF\u68DA\u8C37\u72F8\u9C48\u6A3D\u8AB0\u4E39\u5358\u5606\u5766\u62C5\u63A2\u65E6\u6B4E\u6DE1\u6E5B\u70AD\u77ED\u7AEF\u7BAA\u7DBB\u803D\u80C6\u86CB\u8A95\u935B\u56E3\u58C7\u5F3E\u65AD\u6696\u6A80\u6BB5\u7537\u8AC7\u5024\u77E5\u5730\u5F1B\u6065\u667A\u6C60\u75F4\u7A1A\u7F6E\u81F4\u8718\u9045\u99B3\u7BC9\u755C\u7AF9\u7B51\u84C4"], + ["9280", "\u9010\u79E9\u7A92\u8336\u5AE1\u7740\u4E2D\u4EF2\u5B99\u5FE0\u62BD\u663C\u67F1\u6CE8\u866B\u8877\u8A3B\u914E\u92F3\u99D0\u6A17\u7026\u732A\u82E7\u8457\u8CAF\u4E01\u5146\u51CB\u558B\u5BF5\u5E16\u5E33\u5E81\u5F14\u5F35\u5F6B\u5FB4\u61F2\u6311\u66A2\u671D\u6F6E\u7252\u753A\u773A\u8074\u8139\u8178\u8776\u8ABF\u8ADC\u8D85\u8DF3\u929A\u9577\u9802\u9CE5\u52C5\u6357\u76F4\u6715\u6C88\u73CD\u8CC3\u93AE\u9673\u6D25\u589C\u690E\u69CC\u8FFD\u939A\u75DB\u901A\u585A\u6802\u63B4\u69FB\u4F43\u6F2C\u67D8\u8FBB\u8526\u7DB4\u9354\u693F\u6F70\u576A\u58F7\u5B2C\u7D2C\u722A\u540A\u91E3\u9DB4\u4EAD\u4F4E\u505C\u5075\u5243\u8C9E\u5448\u5824\u5B9A\u5E1D\u5E95\u5EAD\u5EF7\u5F1F\u608C\u62B5\u633A\u63D0\u68AF\u6C40\u7887\u798E\u7A0B\u7DE0\u8247\u8A02\u8AE6\u8E44\u9013"], + ["9340", "\u90B8\u912D\u91D8\u9F0E\u6CE5\u6458\u64E2\u6575\u6EF4\u7684\u7B1B\u9069\u93D1\u6EBA\u54F2\u5FB9\u64A4\u8F4D\u8FED\u9244\u5178\u586B\u5929\u5C55\u5E97\u6DFB\u7E8F\u751C\u8CBC\u8EE2\u985B\u70B9\u4F1D\u6BBF\u6FB1\u7530\u96FB\u514E\u5410\u5835\u5857\u59AC\u5C60\u5F92\u6597\u675C\u6E21\u767B\u83DF\u8CED\u9014\u90FD\u934D\u7825\u783A\u52AA\u5EA6\u571F\u5974\u6012\u5012\u515A\u51AC"], + ["9380", "\u51CD\u5200\u5510\u5854\u5858\u5957\u5B95\u5CF6\u5D8B\u60BC\u6295\u642D\u6771\u6843\u68BC\u68DF\u76D7\u6DD8\u6E6F\u6D9B\u706F\u71C8\u5F53\u75D8\u7977\u7B49\u7B54\u7B52\u7CD6\u7D71\u5230\u8463\u8569\u85E4\u8A0E\u8B04\u8C46\u8E0F\u9003\u900F\u9419\u9676\u982D\u9A30\u95D8\u50CD\u52D5\u540C\u5802\u5C0E\u61A7\u649E\u6D1E\u77B3\u7AE5\u80F4\u8404\u9053\u9285\u5CE0\u9D07\u533F\u5F97\u5FB3\u6D9C\u7279\u7763\u79BF\u7BE4\u6BD2\u72EC\u8AAD\u6803\u6A61\u51F8\u7A81\u6934\u5C4A\u9CF6\u82EB\u5BC5\u9149\u701E\u5678\u5C6F\u60C7\u6566\u6C8C\u8C5A\u9041\u9813\u5451\u66C7\u920D\u5948\u90A3\u5185\u4E4D\u51EA\u8599\u8B0E\u7058\u637A\u934B\u6962\u99B4\u7E04\u7577\u5357\u6960\u8EDF\u96E3\u6C5D\u4E8C\u5C3C\u5F10\u8FE9\u5302\u8CD1\u8089\u8679\u5EFF\u65E5\u4E73\u5165"], + ["9440", "\u5982\u5C3F\u97EE\u4EFB\u598A\u5FCD\u8A8D\u6FE1\u79B0\u7962\u5BE7\u8471\u732B\u71B1\u5E74\u5FF5\u637B\u649A\u71C3\u7C98\u4E43\u5EFC\u4E4B\u57DC\u56A2\u60A9\u6FC3\u7D0D\u80FD\u8133\u81BF\u8FB2\u8997\u86A4\u5DF4\u628A\u64AD\u8987\u6777\u6CE2\u6D3E\u7436\u7834\u5A46\u7F75\u82AD\u99AC\u4FF3\u5EC3\u62DD\u6392\u6557\u676F\u76C3\u724C\u80CC\u80BA\u8F29\u914D\u500D\u57F9\u5A92\u6885"], + ["9480", "\u6973\u7164\u72FD\u8CB7\u58F2\u8CE0\u966A\u9019\u877F\u79E4\u77E7\u8429\u4F2F\u5265\u535A\u62CD\u67CF\u6CCA\u767D\u7B94\u7C95\u8236\u8584\u8FEB\u66DD\u6F20\u7206\u7E1B\u83AB\u99C1\u9EA6\u51FD\u7BB1\u7872\u7BB8\u8087\u7B48\u6AE8\u5E61\u808C\u7551\u7560\u516B\u9262\u6E8C\u767A\u9197\u9AEA\u4F10\u7F70\u629C\u7B4F\u95A5\u9CE9\u567A\u5859\u86E4\u96BC\u4F34\u5224\u534A\u53CD\u53DB\u5E06\u642C\u6591\u677F\u6C3E\u6C4E\u7248\u72AF\u73ED\u7554\u7E41\u822C\u85E9\u8CA9\u7BC4\u91C6\u7169\u9812\u98EF\u633D\u6669\u756A\u76E4\u78D0\u8543\u86EE\u532A\u5351\u5426\u5983\u5E87\u5F7C\u60B2\u6249\u6279\u62AB\u6590\u6BD4\u6CCC\u75B2\u76AE\u7891\u79D8\u7DCB\u7F77\u80A5\u88AB\u8AB9\u8CBB\u907F\u975E\u98DB\u6A0B\u7C38\u5099\u5C3E\u5FAE\u6787\u6BD8\u7435\u7709\u7F8E"], + ["9540", "\u9F3B\u67CA\u7A17\u5339\u758B\u9AED\u5F66\u819D\u83F1\u8098\u5F3C\u5FC5\u7562\u7B46\u903C\u6867\u59EB\u5A9B\u7D10\u767E\u8B2C\u4FF5\u5F6A\u6A19\u6C37\u6F02\u74E2\u7968\u8868\u8A55\u8C79\u5EDF\u63CF\u75C5\u79D2\u82D7\u9328\u92F2\u849C\u86ED\u9C2D\u54C1\u5F6C\u658C\u6D5C\u7015\u8CA7\u8CD3\u983B\u654F\u74F6\u4E0D\u4ED8\u57E0\u592B\u5A66\u5BCC\u51A8\u5E03\u5E9C\u6016\u6276\u6577"], + ["9580", "\u65A7\u666E\u6D6E\u7236\u7B26\u8150\u819A\u8299\u8B5C\u8CA0\u8CE6\u8D74\u961C\u9644\u4FAE\u64AB\u6B66\u821E\u8461\u856A\u90E8\u5C01\u6953\u98A8\u847A\u8557\u4F0F\u526F\u5FA9\u5E45\u670D\u798F\u8179\u8907\u8986\u6DF5\u5F17\u6255\u6CB8\u4ECF\u7269\u9B92\u5206\u543B\u5674\u58B3\u61A4\u626E\u711A\u596E\u7C89\u7CDE\u7D1B\u96F0\u6587\u805E\u4E19\u4F75\u5175\u5840\u5E63\u5E73\u5F0A\u67C4\u4E26\u853D\u9589\u965B\u7C73\u9801\u50FB\u58C1\u7656\u78A7\u5225\u77A5\u8511\u7B86\u504F\u5909\u7247\u7BC7\u7DE8\u8FBA\u8FD4\u904D\u4FBF\u52C9\u5A29\u5F01\u97AD\u4FDD\u8217\u92EA\u5703\u6355\u6B69\u752B\u88DC\u8F14\u7A42\u52DF\u5893\u6155\u620A\u66AE\u6BCD\u7C3F\u83E9\u5023\u4FF8\u5305\u5446\u5831\u5949\u5B9D\u5CF0\u5CEF\u5D29\u5E96\u62B1\u6367\u653E\u65B9\u670B"], + ["9640", "\u6CD5\u6CE1\u70F9\u7832\u7E2B\u80DE\u82B3\u840C\u84EC\u8702\u8912\u8A2A\u8C4A\u90A6\u92D2\u98FD\u9CF3\u9D6C\u4E4F\u4EA1\u508D\u5256\u574A\u59A8\u5E3D\u5FD8\u5FD9\u623F\u66B4\u671B\u67D0\u68D2\u5192\u7D21\u80AA\u81A8\u8B00\u8C8C\u8CBF\u927E\u9632\u5420\u982C\u5317\u50D5\u535C\u58A8\u64B2\u6734\u7267\u7766\u7A46\u91E6\u52C3\u6CA1\u6B86\u5800\u5E4C\u5954\u672C\u7FFB\u51E1\u76C6"], + ["9680", "\u6469\u78E8\u9B54\u9EBB\u57CB\u59B9\u6627\u679A\u6BCE\u54E9\u69D9\u5E55\u819C\u6795\u9BAA\u67FE\u9C52\u685D\u4EA6\u4FE3\u53C8\u62B9\u672B\u6CAB\u8FC4\u4FAD\u7E6D\u9EBF\u4E07\u6162\u6E80\u6F2B\u8513\u5473\u672A\u9B45\u5DF3\u7B95\u5CAC\u5BC6\u871C\u6E4A\u84D1\u7A14\u8108\u5999\u7C8D\u6C11\u7720\u52D9\u5922\u7121\u725F\u77DB\u9727\u9D61\u690B\u5A7F\u5A18\u51A5\u540D\u547D\u660E\u76DF\u8FF7\u9298\u9CF4\u59EA\u725D\u6EC5\u514D\u68C9\u7DBF\u7DEC\u9762\u9EBA\u6478\u6A21\u8302\u5984\u5B5F\u6BDB\u731B\u76F2\u7DB2\u8017\u8499\u5132\u6728\u9ED9\u76EE\u6762\u52FF\u9905\u5C24\u623B\u7C7E\u8CB0\u554F\u60B6\u7D0B\u9580\u5301\u4E5F\u51B6\u591C\u723A\u8036\u91CE\u5F25\u77E2\u5384\u5F79\u7D04\u85AC\u8A33\u8E8D\u9756\u67F3\u85AE\u9453\u6109\u6108\u6CB9\u7652"], + ["9740", "\u8AED\u8F38\u552F\u4F51\u512A\u52C7\u53CB\u5BA5\u5E7D\u60A0\u6182\u63D6\u6709\u67DA\u6E67\u6D8C\u7336\u7337\u7531\u7950\u88D5\u8A98\u904A\u9091\u90F5\u96C4\u878D\u5915\u4E88\u4F59\u4E0E\u8A89\u8F3F\u9810\u50AD\u5E7C\u5996\u5BB9\u5EB8\u63DA\u63FA\u64C1\u66DC\u694A\u69D8\u6D0B\u6EB6\u7194\u7528\u7AAF\u7F8A\u8000\u8449\u84C9\u8981\u8B21\u8E0A\u9065\u967D\u990A\u617E\u6291\u6B32"], + ["9780", "\u6C83\u6D74\u7FCC\u7FFC\u6DC0\u7F85\u87BA\u88F8\u6765\u83B1\u983C\u96F7\u6D1B\u7D61\u843D\u916A\u4E71\u5375\u5D50\u6B04\u6FEB\u85CD\u862D\u89A7\u5229\u540F\u5C65\u674E\u68A8\u7406\u7483\u75E2\u88CF\u88E1\u91CC\u96E2\u9678\u5F8B\u7387\u7ACB\u844E\u63A0\u7565\u5289\u6D41\u6E9C\u7409\u7559\u786B\u7C92\u9686\u7ADC\u9F8D\u4FB6\u616E\u65C5\u865C\u4E86\u4EAE\u50DA\u4E21\u51CC\u5BEE\u6599\u6881\u6DBC\u731F\u7642\u77AD\u7A1C\u7CE7\u826F\u8AD2\u907C\u91CF\u9675\u9818\u529B\u7DD1\u502B\u5398\u6797\u6DCB\u71D0\u7433\u81E8\u8F2A\u96A3\u9C57\u9E9F\u7460\u5841\u6D99\u7D2F\u985E\u4EE4\u4F36\u4F8B\u51B7\u52B1\u5DBA\u601C\u73B2\u793C\u82D3\u9234\u96B7\u96F6\u970A\u9E97\u9F62\u66A6\u6B74\u5217\u52A3\u70C8\u88C2\u5EC9\u604B\u6190\u6F23\u7149\u7C3E\u7DF4\u806F"], + ["9840", "\u84EE\u9023\u932C\u5442\u9B6F\u6AD3\u7089\u8CC2\u8DEF\u9732\u52B4\u5A41\u5ECA\u5F04\u6717\u697C\u6994\u6D6A\u6F0F\u7262\u72FC\u7BED\u8001\u807E\u874B\u90CE\u516D\u9E93\u7984\u808B\u9332\u8AD6\u502D\u548C\u8A71\u6B6A\u8CC4\u8107\u60D1\u67A0\u9DF2\u4E99\u4E98\u9C10\u8A6B\u85C1\u8568\u6900\u6E7E\u7897\u8155"], + ["989f", "\u5F0C\u4E10\u4E15\u4E2A\u4E31\u4E36\u4E3C\u4E3F\u4E42\u4E56\u4E58\u4E82\u4E85\u8C6B\u4E8A\u8212\u5F0D\u4E8E\u4E9E\u4E9F\u4EA0\u4EA2\u4EB0\u4EB3\u4EB6\u4ECE\u4ECD\u4EC4\u4EC6\u4EC2\u4ED7\u4EDE\u4EED\u4EDF\u4EF7\u4F09\u4F5A\u4F30\u4F5B\u4F5D\u4F57\u4F47\u4F76\u4F88\u4F8F\u4F98\u4F7B\u4F69\u4F70\u4F91\u4F6F\u4F86\u4F96\u5118\u4FD4\u4FDF\u4FCE\u4FD8\u4FDB\u4FD1\u4FDA\u4FD0\u4FE4\u4FE5\u501A\u5028\u5014\u502A\u5025\u5005\u4F1C\u4FF6\u5021\u5029\u502C\u4FFE\u4FEF\u5011\u5006\u5043\u5047\u6703\u5055\u5050\u5048\u505A\u5056\u506C\u5078\u5080\u509A\u5085\u50B4\u50B2"], + ["9940", "\u50C9\u50CA\u50B3\u50C2\u50D6\u50DE\u50E5\u50ED\u50E3\u50EE\u50F9\u50F5\u5109\u5101\u5102\u5116\u5115\u5114\u511A\u5121\u513A\u5137\u513C\u513B\u513F\u5140\u5152\u514C\u5154\u5162\u7AF8\u5169\u516A\u516E\u5180\u5182\u56D8\u518C\u5189\u518F\u5191\u5193\u5195\u5196\u51A4\u51A6\u51A2\u51A9\u51AA\u51AB\u51B3\u51B1\u51B2\u51B0\u51B5\u51BD\u51C5\u51C9\u51DB\u51E0\u8655\u51E9\u51ED"], + ["9980", "\u51F0\u51F5\u51FE\u5204\u520B\u5214\u520E\u5227\u522A\u522E\u5233\u5239\u524F\u5244\u524B\u524C\u525E\u5254\u526A\u5274\u5269\u5273\u527F\u527D\u528D\u5294\u5292\u5271\u5288\u5291\u8FA8\u8FA7\u52AC\u52AD\u52BC\u52B5\u52C1\u52CD\u52D7\u52DE\u52E3\u52E6\u98ED\u52E0\u52F3\u52F5\u52F8\u52F9\u5306\u5308\u7538\u530D\u5310\u530F\u5315\u531A\u5323\u532F\u5331\u5333\u5338\u5340\u5346\u5345\u4E17\u5349\u534D\u51D6\u535E\u5369\u536E\u5918\u537B\u5377\u5382\u5396\u53A0\u53A6\u53A5\u53AE\u53B0\u53B6\u53C3\u7C12\u96D9\u53DF\u66FC\u71EE\u53EE\u53E8\u53ED\u53FA\u5401\u543D\u5440\u542C\u542D\u543C\u542E\u5436\u5429\u541D\u544E\u548F\u5475\u548E\u545F\u5471\u5477\u5470\u5492\u547B\u5480\u5476\u5484\u5490\u5486\u54C7\u54A2\u54B8\u54A5\u54AC\u54C4\u54C8\u54A8"], + ["9a40", "\u54AB\u54C2\u54A4\u54BE\u54BC\u54D8\u54E5\u54E6\u550F\u5514\u54FD\u54EE\u54ED\u54FA\u54E2\u5539\u5540\u5563\u554C\u552E\u555C\u5545\u5556\u5557\u5538\u5533\u555D\u5599\u5580\u54AF\u558A\u559F\u557B\u557E\u5598\u559E\u55AE\u557C\u5583\u55A9\u5587\u55A8\u55DA\u55C5\u55DF\u55C4\u55DC\u55E4\u55D4\u5614\u55F7\u5616\u55FE\u55FD\u561B\u55F9\u564E\u5650\u71DF\u5634\u5636\u5632\u5638"], + ["9a80", "\u566B\u5664\u562F\u566C\u566A\u5686\u5680\u568A\u56A0\u5694\u568F\u56A5\u56AE\u56B6\u56B4\u56C2\u56BC\u56C1\u56C3\u56C0\u56C8\u56CE\u56D1\u56D3\u56D7\u56EE\u56F9\u5700\u56FF\u5704\u5709\u5708\u570B\u570D\u5713\u5718\u5716\u55C7\u571C\u5726\u5737\u5738\u574E\u573B\u5740\u574F\u5769\u57C0\u5788\u5761\u577F\u5789\u5793\u57A0\u57B3\u57A4\u57AA\u57B0\u57C3\u57C6\u57D4\u57D2\u57D3\u580A\u57D6\u57E3\u580B\u5819\u581D\u5872\u5821\u5862\u584B\u5870\u6BC0\u5852\u583D\u5879\u5885\u58B9\u589F\u58AB\u58BA\u58DE\u58BB\u58B8\u58AE\u58C5\u58D3\u58D1\u58D7\u58D9\u58D8\u58E5\u58DC\u58E4\u58DF\u58EF\u58FA\u58F9\u58FB\u58FC\u58FD\u5902\u590A\u5910\u591B\u68A6\u5925\u592C\u592D\u5932\u5938\u593E\u7AD2\u5955\u5950\u594E\u595A\u5958\u5962\u5960\u5967\u596C\u5969"], + ["9b40", "\u5978\u5981\u599D\u4F5E\u4FAB\u59A3\u59B2\u59C6\u59E8\u59DC\u598D\u59D9\u59DA\u5A25\u5A1F\u5A11\u5A1C\u5A09\u5A1A\u5A40\u5A6C\u5A49\u5A35\u5A36\u5A62\u5A6A\u5A9A\u5ABC\u5ABE\u5ACB\u5AC2\u5ABD\u5AE3\u5AD7\u5AE6\u5AE9\u5AD6\u5AFA\u5AFB\u5B0C\u5B0B\u5B16\u5B32\u5AD0\u5B2A\u5B36\u5B3E\u5B43\u5B45\u5B40\u5B51\u5B55\u5B5A\u5B5B\u5B65\u5B69\u5B70\u5B73\u5B75\u5B78\u6588\u5B7A\u5B80"], + ["9b80", "\u5B83\u5BA6\u5BB8\u5BC3\u5BC7\u5BC9\u5BD4\u5BD0\u5BE4\u5BE6\u5BE2\u5BDE\u5BE5\u5BEB\u5BF0\u5BF6\u5BF3\u5C05\u5C07\u5C08\u5C0D\u5C13\u5C20\u5C22\u5C28\u5C38\u5C39\u5C41\u5C46\u5C4E\u5C53\u5C50\u5C4F\u5B71\u5C6C\u5C6E\u4E62\u5C76\u5C79\u5C8C\u5C91\u5C94\u599B\u5CAB\u5CBB\u5CB6\u5CBC\u5CB7\u5CC5\u5CBE\u5CC7\u5CD9\u5CE9\u5CFD\u5CFA\u5CED\u5D8C\u5CEA\u5D0B\u5D15\u5D17\u5D5C\u5D1F\u5D1B\u5D11\u5D14\u5D22\u5D1A\u5D19\u5D18\u5D4C\u5D52\u5D4E\u5D4B\u5D6C\u5D73\u5D76\u5D87\u5D84\u5D82\u5DA2\u5D9D\u5DAC\u5DAE\u5DBD\u5D90\u5DB7\u5DBC\u5DC9\u5DCD\u5DD3\u5DD2\u5DD6\u5DDB\u5DEB\u5DF2\u5DF5\u5E0B\u5E1A\u5E19\u5E11\u5E1B\u5E36\u5E37\u5E44\u5E43\u5E40\u5E4E\u5E57\u5E54\u5E5F\u5E62\u5E64\u5E47\u5E75\u5E76\u5E7A\u9EBC\u5E7F\u5EA0\u5EC1\u5EC2\u5EC8\u5ED0\u5ECF"], + ["9c40", "\u5ED6\u5EE3\u5EDD\u5EDA\u5EDB\u5EE2\u5EE1\u5EE8\u5EE9\u5EEC\u5EF1\u5EF3\u5EF0\u5EF4\u5EF8\u5EFE\u5F03\u5F09\u5F5D\u5F5C\u5F0B\u5F11\u5F16\u5F29\u5F2D\u5F38\u5F41\u5F48\u5F4C\u5F4E\u5F2F\u5F51\u5F56\u5F57\u5F59\u5F61\u5F6D\u5F73\u5F77\u5F83\u5F82\u5F7F\u5F8A\u5F88\u5F91\u5F87\u5F9E\u5F99\u5F98\u5FA0\u5FA8\u5FAD\u5FBC\u5FD6\u5FFB\u5FE4\u5FF8\u5FF1\u5FDD\u60B3\u5FFF\u6021\u6060"], + ["9c80", "\u6019\u6010\u6029\u600E\u6031\u601B\u6015\u602B\u6026\u600F\u603A\u605A\u6041\u606A\u6077\u605F\u604A\u6046\u604D\u6063\u6043\u6064\u6042\u606C\u606B\u6059\u6081\u608D\u60E7\u6083\u609A\u6084\u609B\u6096\u6097\u6092\u60A7\u608B\u60E1\u60B8\u60E0\u60D3\u60B4\u5FF0\u60BD\u60C6\u60B5\u60D8\u614D\u6115\u6106\u60F6\u60F7\u6100\u60F4\u60FA\u6103\u6121\u60FB\u60F1\u610D\u610E\u6147\u613E\u6128\u6127\u614A\u613F\u613C\u612C\u6134\u613D\u6142\u6144\u6173\u6177\u6158\u6159\u615A\u616B\u6174\u616F\u6165\u6171\u615F\u615D\u6153\u6175\u6199\u6196\u6187\u61AC\u6194\u619A\u618A\u6191\u61AB\u61AE\u61CC\u61CA\u61C9\u61F7\u61C8\u61C3\u61C6\u61BA\u61CB\u7F79\u61CD\u61E6\u61E3\u61F6\u61FA\u61F4\u61FF\u61FD\u61FC\u61FE\u6200\u6208\u6209\u620D\u620C\u6214\u621B"], + ["9d40", "\u621E\u6221\u622A\u622E\u6230\u6232\u6233\u6241\u624E\u625E\u6263\u625B\u6260\u6268\u627C\u6282\u6289\u627E\u6292\u6293\u6296\u62D4\u6283\u6294\u62D7\u62D1\u62BB\u62CF\u62FF\u62C6\u64D4\u62C8\u62DC\u62CC\u62CA\u62C2\u62C7\u629B\u62C9\u630C\u62EE\u62F1\u6327\u6302\u6308\u62EF\u62F5\u6350\u633E\u634D\u641C\u634F\u6396\u638E\u6380\u63AB\u6376\u63A3\u638F\u6389\u639F\u63B5\u636B"], + ["9d80", "\u6369\u63BE\u63E9\u63C0\u63C6\u63E3\u63C9\u63D2\u63F6\u63C4\u6416\u6434\u6406\u6413\u6426\u6436\u651D\u6417\u6428\u640F\u6467\u646F\u6476\u644E\u652A\u6495\u6493\u64A5\u64A9\u6488\u64BC\u64DA\u64D2\u64C5\u64C7\u64BB\u64D8\u64C2\u64F1\u64E7\u8209\u64E0\u64E1\u62AC\u64E3\u64EF\u652C\u64F6\u64F4\u64F2\u64FA\u6500\u64FD\u6518\u651C\u6505\u6524\u6523\u652B\u6534\u6535\u6537\u6536\u6538\u754B\u6548\u6556\u6555\u654D\u6558\u655E\u655D\u6572\u6578\u6582\u6583\u8B8A\u659B\u659F\u65AB\u65B7\u65C3\u65C6\u65C1\u65C4\u65CC\u65D2\u65DB\u65D9\u65E0\u65E1\u65F1\u6772\u660A\u6603\u65FB\u6773\u6635\u6636\u6634\u661C\u664F\u6644\u6649\u6641\u665E\u665D\u6664\u6667\u6668\u665F\u6662\u6670\u6683\u6688\u668E\u6689\u6684\u6698\u669D\u66C1\u66B9\u66C9\u66BE\u66BC"], + ["9e40", "\u66C4\u66B8\u66D6\u66DA\u66E0\u663F\u66E6\u66E9\u66F0\u66F5\u66F7\u670F\u6716\u671E\u6726\u6727\u9738\u672E\u673F\u6736\u6741\u6738\u6737\u6746\u675E\u6760\u6759\u6763\u6764\u6789\u6770\u67A9\u677C\u676A\u678C\u678B\u67A6\u67A1\u6785\u67B7\u67EF\u67B4\u67EC\u67B3\u67E9\u67B8\u67E4\u67DE\u67DD\u67E2\u67EE\u67B9\u67CE\u67C6\u67E7\u6A9C\u681E\u6846\u6829\u6840\u684D\u6832\u684E"], + ["9e80", "\u68B3\u682B\u6859\u6863\u6877\u687F\u689F\u688F\u68AD\u6894\u689D\u689B\u6883\u6AAE\u68B9\u6874\u68B5\u68A0\u68BA\u690F\u688D\u687E\u6901\u68CA\u6908\u68D8\u6922\u6926\u68E1\u690C\u68CD\u68D4\u68E7\u68D5\u6936\u6912\u6904\u68D7\u68E3\u6925\u68F9\u68E0\u68EF\u6928\u692A\u691A\u6923\u6921\u68C6\u6979\u6977\u695C\u6978\u696B\u6954\u697E\u696E\u6939\u6974\u693D\u6959\u6930\u6961\u695E\u695D\u6981\u696A\u69B2\u69AE\u69D0\u69BF\u69C1\u69D3\u69BE\u69CE\u5BE8\u69CA\u69DD\u69BB\u69C3\u69A7\u6A2E\u6991\u69A0\u699C\u6995\u69B4\u69DE\u69E8\u6A02\u6A1B\u69FF\u6B0A\u69F9\u69F2\u69E7\u6A05\u69B1\u6A1E\u69ED\u6A14\u69EB\u6A0A\u6A12\u6AC1\u6A23\u6A13\u6A44\u6A0C\u6A72\u6A36\u6A78\u6A47\u6A62\u6A59\u6A66\u6A48\u6A38\u6A22\u6A90\u6A8D\u6AA0\u6A84\u6AA2\u6AA3"], + ["9f40", "\u6A97\u8617\u6ABB\u6AC3\u6AC2\u6AB8\u6AB3\u6AAC\u6ADE\u6AD1\u6ADF\u6AAA\u6ADA\u6AEA\u6AFB\u6B05\u8616\u6AFA\u6B12\u6B16\u9B31\u6B1F\u6B38\u6B37\u76DC\u6B39\u98EE\u6B47\u6B43\u6B49\u6B50\u6B59\u6B54\u6B5B\u6B5F\u6B61\u6B78\u6B79\u6B7F\u6B80\u6B84\u6B83\u6B8D\u6B98\u6B95\u6B9E\u6BA4\u6BAA\u6BAB\u6BAF\u6BB2\u6BB1\u6BB3\u6BB7\u6BBC\u6BC6\u6BCB\u6BD3\u6BDF\u6BEC\u6BEB\u6BF3\u6BEF"], + ["9f80", "\u9EBE\u6C08\u6C13\u6C14\u6C1B\u6C24\u6C23\u6C5E\u6C55\u6C62\u6C6A\u6C82\u6C8D\u6C9A\u6C81\u6C9B\u6C7E\u6C68\u6C73\u6C92\u6C90\u6CC4\u6CF1\u6CD3\u6CBD\u6CD7\u6CC5\u6CDD\u6CAE\u6CB1\u6CBE\u6CBA\u6CDB\u6CEF\u6CD9\u6CEA\u6D1F\u884D\u6D36\u6D2B\u6D3D\u6D38\u6D19\u6D35\u6D33\u6D12\u6D0C\u6D63\u6D93\u6D64\u6D5A\u6D79\u6D59\u6D8E\u6D95\u6FE4\u6D85\u6DF9\u6E15\u6E0A\u6DB5\u6DC7\u6DE6\u6DB8\u6DC6\u6DEC\u6DDE\u6DCC\u6DE8\u6DD2\u6DC5\u6DFA\u6DD9\u6DE4\u6DD5\u6DEA\u6DEE\u6E2D\u6E6E\u6E2E\u6E19\u6E72\u6E5F\u6E3E\u6E23\u6E6B\u6E2B\u6E76\u6E4D\u6E1F\u6E43\u6E3A\u6E4E\u6E24\u6EFF\u6E1D\u6E38\u6E82\u6EAA\u6E98\u6EC9\u6EB7\u6ED3\u6EBD\u6EAF\u6EC4\u6EB2\u6ED4\u6ED5\u6E8F\u6EA5\u6EC2\u6E9F\u6F41\u6F11\u704C\u6EEC\u6EF8\u6EFE\u6F3F\u6EF2\u6F31\u6EEF\u6F32\u6ECC"], + ["e040", "\u6F3E\u6F13\u6EF7\u6F86\u6F7A\u6F78\u6F81\u6F80\u6F6F\u6F5B\u6FF3\u6F6D\u6F82\u6F7C\u6F58\u6F8E\u6F91\u6FC2\u6F66\u6FB3\u6FA3\u6FA1\u6FA4\u6FB9\u6FC6\u6FAA\u6FDF\u6FD5\u6FEC\u6FD4\u6FD8\u6FF1\u6FEE\u6FDB\u7009\u700B\u6FFA\u7011\u7001\u700F\u6FFE\u701B\u701A\u6F74\u701D\u7018\u701F\u7030\u703E\u7032\u7051\u7063\u7099\u7092\u70AF\u70F1\u70AC\u70B8\u70B3\u70AE\u70DF\u70CB\u70DD"], + ["e080", "\u70D9\u7109\u70FD\u711C\u7119\u7165\u7155\u7188\u7166\u7162\u714C\u7156\u716C\u718F\u71FB\u7184\u7195\u71A8\u71AC\u71D7\u71B9\u71BE\u71D2\u71C9\u71D4\u71CE\u71E0\u71EC\u71E7\u71F5\u71FC\u71F9\u71FF\u720D\u7210\u721B\u7228\u722D\u722C\u7230\u7232\u723B\u723C\u723F\u7240\u7246\u724B\u7258\u7274\u727E\u7282\u7281\u7287\u7292\u7296\u72A2\u72A7\u72B9\u72B2\u72C3\u72C6\u72C4\u72CE\u72D2\u72E2\u72E0\u72E1\u72F9\u72F7\u500F\u7317\u730A\u731C\u7316\u731D\u7334\u732F\u7329\u7325\u733E\u734E\u734F\u9ED8\u7357\u736A\u7368\u7370\u7378\u7375\u737B\u737A\u73C8\u73B3\u73CE\u73BB\u73C0\u73E5\u73EE\u73DE\u74A2\u7405\u746F\u7425\u73F8\u7432\u743A\u7455\u743F\u745F\u7459\u7441\u745C\u7469\u7470\u7463\u746A\u7476\u747E\u748B\u749E\u74A7\u74CA\u74CF\u74D4\u73F1"], + ["e140", "\u74E0\u74E3\u74E7\u74E9\u74EE\u74F2\u74F0\u74F1\u74F8\u74F7\u7504\u7503\u7505\u750C\u750E\u750D\u7515\u7513\u751E\u7526\u752C\u753C\u7544\u754D\u754A\u7549\u755B\u7546\u755A\u7569\u7564\u7567\u756B\u756D\u7578\u7576\u7586\u7587\u7574\u758A\u7589\u7582\u7594\u759A\u759D\u75A5\u75A3\u75C2\u75B3\u75C3\u75B5\u75BD\u75B8\u75BC\u75B1\u75CD\u75CA\u75D2\u75D9\u75E3\u75DE\u75FE\u75FF"], + ["e180", "\u75FC\u7601\u75F0\u75FA\u75F2\u75F3\u760B\u760D\u7609\u761F\u7627\u7620\u7621\u7622\u7624\u7634\u7630\u763B\u7647\u7648\u7646\u765C\u7658\u7661\u7662\u7668\u7669\u766A\u7667\u766C\u7670\u7672\u7676\u7678\u767C\u7680\u7683\u7688\u768B\u768E\u7696\u7693\u7699\u769A\u76B0\u76B4\u76B8\u76B9\u76BA\u76C2\u76CD\u76D6\u76D2\u76DE\u76E1\u76E5\u76E7\u76EA\u862F\u76FB\u7708\u7707\u7704\u7729\u7724\u771E\u7725\u7726\u771B\u7737\u7738\u7747\u775A\u7768\u776B\u775B\u7765\u777F\u777E\u7779\u778E\u778B\u7791\u77A0\u779E\u77B0\u77B6\u77B9\u77BF\u77BC\u77BD\u77BB\u77C7\u77CD\u77D7\u77DA\u77DC\u77E3\u77EE\u77FC\u780C\u7812\u7926\u7820\u792A\u7845\u788E\u7874\u7886\u787C\u789A\u788C\u78A3\u78B5\u78AA\u78AF\u78D1\u78C6\u78CB\u78D4\u78BE\u78BC\u78C5\u78CA\u78EC"], + ["e240", "\u78E7\u78DA\u78FD\u78F4\u7907\u7912\u7911\u7919\u792C\u792B\u7940\u7960\u7957\u795F\u795A\u7955\u7953\u797A\u797F\u798A\u799D\u79A7\u9F4B\u79AA\u79AE\u79B3\u79B9\u79BA\u79C9\u79D5\u79E7\u79EC\u79E1\u79E3\u7A08\u7A0D\u7A18\u7A19\u7A20\u7A1F\u7980\u7A31\u7A3B\u7A3E\u7A37\u7A43\u7A57\u7A49\u7A61\u7A62\u7A69\u9F9D\u7A70\u7A79\u7A7D\u7A88\u7A97\u7A95\u7A98\u7A96\u7AA9\u7AC8\u7AB0"], + ["e280", "\u7AB6\u7AC5\u7AC4\u7ABF\u9083\u7AC7\u7ACA\u7ACD\u7ACF\u7AD5\u7AD3\u7AD9\u7ADA\u7ADD\u7AE1\u7AE2\u7AE6\u7AED\u7AF0\u7B02\u7B0F\u7B0A\u7B06\u7B33\u7B18\u7B19\u7B1E\u7B35\u7B28\u7B36\u7B50\u7B7A\u7B04\u7B4D\u7B0B\u7B4C\u7B45\u7B75\u7B65\u7B74\u7B67\u7B70\u7B71\u7B6C\u7B6E\u7B9D\u7B98\u7B9F\u7B8D\u7B9C\u7B9A\u7B8B\u7B92\u7B8F\u7B5D\u7B99\u7BCB\u7BC1\u7BCC\u7BCF\u7BB4\u7BC6\u7BDD\u7BE9\u7C11\u7C14\u7BE6\u7BE5\u7C60\u7C00\u7C07\u7C13\u7BF3\u7BF7\u7C17\u7C0D\u7BF6\u7C23\u7C27\u7C2A\u7C1F\u7C37\u7C2B\u7C3D\u7C4C\u7C43\u7C54\u7C4F\u7C40\u7C50\u7C58\u7C5F\u7C64\u7C56\u7C65\u7C6C\u7C75\u7C83\u7C90\u7CA4\u7CAD\u7CA2\u7CAB\u7CA1\u7CA8\u7CB3\u7CB2\u7CB1\u7CAE\u7CB9\u7CBD\u7CC0\u7CC5\u7CC2\u7CD8\u7CD2\u7CDC\u7CE2\u9B3B\u7CEF\u7CF2\u7CF4\u7CF6\u7CFA\u7D06"], + ["e340", "\u7D02\u7D1C\u7D15\u7D0A\u7D45\u7D4B\u7D2E\u7D32\u7D3F\u7D35\u7D46\u7D73\u7D56\u7D4E\u7D72\u7D68\u7D6E\u7D4F\u7D63\u7D93\u7D89\u7D5B\u7D8F\u7D7D\u7D9B\u7DBA\u7DAE\u7DA3\u7DB5\u7DC7\u7DBD\u7DAB\u7E3D\u7DA2\u7DAF\u7DDC\u7DB8\u7D9F\u7DB0\u7DD8\u7DDD\u7DE4\u7DDE\u7DFB\u7DF2\u7DE1\u7E05\u7E0A\u7E23\u7E21\u7E12\u7E31\u7E1F\u7E09\u7E0B\u7E22\u7E46\u7E66\u7E3B\u7E35\u7E39\u7E43\u7E37"], + ["e380", "\u7E32\u7E3A\u7E67\u7E5D\u7E56\u7E5E\u7E59\u7E5A\u7E79\u7E6A\u7E69\u7E7C\u7E7B\u7E83\u7DD5\u7E7D\u8FAE\u7E7F\u7E88\u7E89\u7E8C\u7E92\u7E90\u7E93\u7E94\u7E96\u7E8E\u7E9B\u7E9C\u7F38\u7F3A\u7F45\u7F4C\u7F4D\u7F4E\u7F50\u7F51\u7F55\u7F54\u7F58\u7F5F\u7F60\u7F68\u7F69\u7F67\u7F78\u7F82\u7F86\u7F83\u7F88\u7F87\u7F8C\u7F94\u7F9E\u7F9D\u7F9A\u7FA3\u7FAF\u7FB2\u7FB9\u7FAE\u7FB6\u7FB8\u8B71\u7FC5\u7FC6\u7FCA\u7FD5\u7FD4\u7FE1\u7FE6\u7FE9\u7FF3\u7FF9\u98DC\u8006\u8004\u800B\u8012\u8018\u8019\u801C\u8021\u8028\u803F\u803B\u804A\u8046\u8052\u8058\u805A\u805F\u8062\u8068\u8073\u8072\u8070\u8076\u8079\u807D\u807F\u8084\u8086\u8085\u809B\u8093\u809A\u80AD\u5190\u80AC\u80DB\u80E5\u80D9\u80DD\u80C4\u80DA\u80D6\u8109\u80EF\u80F1\u811B\u8129\u8123\u812F\u814B"], + ["e440", "\u968B\u8146\u813E\u8153\u8151\u80FC\u8171\u816E\u8165\u8166\u8174\u8183\u8188\u818A\u8180\u8182\u81A0\u8195\u81A4\u81A3\u815F\u8193\u81A9\u81B0\u81B5\u81BE\u81B8\u81BD\u81C0\u81C2\u81BA\u81C9\u81CD\u81D1\u81D9\u81D8\u81C8\u81DA\u81DF\u81E0\u81E7\u81FA\u81FB\u81FE\u8201\u8202\u8205\u8207\u820A\u820D\u8210\u8216\u8229\u822B\u8238\u8233\u8240\u8259\u8258\u825D\u825A\u825F\u8264"], + ["e480", "\u8262\u8268\u826A\u826B\u822E\u8271\u8277\u8278\u827E\u828D\u8292\u82AB\u829F\u82BB\u82AC\u82E1\u82E3\u82DF\u82D2\u82F4\u82F3\u82FA\u8393\u8303\u82FB\u82F9\u82DE\u8306\u82DC\u8309\u82D9\u8335\u8334\u8316\u8332\u8331\u8340\u8339\u8350\u8345\u832F\u832B\u8317\u8318\u8385\u839A\u83AA\u839F\u83A2\u8396\u8323\u838E\u8387\u838A\u837C\u83B5\u8373\u8375\u83A0\u8389\u83A8\u83F4\u8413\u83EB\u83CE\u83FD\u8403\u83D8\u840B\u83C1\u83F7\u8407\u83E0\u83F2\u840D\u8422\u8420\u83BD\u8438\u8506\u83FB\u846D\u842A\u843C\u855A\u8484\u8477\u846B\u84AD\u846E\u8482\u8469\u8446\u842C\u846F\u8479\u8435\u84CA\u8462\u84B9\u84BF\u849F\u84D9\u84CD\u84BB\u84DA\u84D0\u84C1\u84C6\u84D6\u84A1\u8521\u84FF\u84F4\u8517\u8518\u852C\u851F\u8515\u8514\u84FC\u8540\u8563\u8558\u8548"], + ["e540", "\u8541\u8602\u854B\u8555\u8580\u85A4\u8588\u8591\u858A\u85A8\u856D\u8594\u859B\u85EA\u8587\u859C\u8577\u857E\u8590\u85C9\u85BA\u85CF\u85B9\u85D0\u85D5\u85DD\u85E5\u85DC\u85F9\u860A\u8613\u860B\u85FE\u85FA\u8606\u8622\u861A\u8630\u863F\u864D\u4E55\u8654\u865F\u8667\u8671\u8693\u86A3\u86A9\u86AA\u868B\u868C\u86B6\u86AF\u86C4\u86C6\u86B0\u86C9\u8823\u86AB\u86D4\u86DE\u86E9\u86EC"], + ["e580", "\u86DF\u86DB\u86EF\u8712\u8706\u8708\u8700\u8703\u86FB\u8711\u8709\u870D\u86F9\u870A\u8734\u873F\u8737\u873B\u8725\u8729\u871A\u8760\u875F\u8778\u874C\u874E\u8774\u8757\u8768\u876E\u8759\u8753\u8763\u876A\u8805\u87A2\u879F\u8782\u87AF\u87CB\u87BD\u87C0\u87D0\u96D6\u87AB\u87C4\u87B3\u87C7\u87C6\u87BB\u87EF\u87F2\u87E0\u880F\u880D\u87FE\u87F6\u87F7\u880E\u87D2\u8811\u8816\u8815\u8822\u8821\u8831\u8836\u8839\u8827\u883B\u8844\u8842\u8852\u8859\u885E\u8862\u886B\u8881\u887E\u889E\u8875\u887D\u88B5\u8872\u8882\u8897\u8892\u88AE\u8899\u88A2\u888D\u88A4\u88B0\u88BF\u88B1\u88C3\u88C4\u88D4\u88D8\u88D9\u88DD\u88F9\u8902\u88FC\u88F4\u88E8\u88F2\u8904\u890C\u890A\u8913\u8943\u891E\u8925\u892A\u892B\u8941\u8944\u893B\u8936\u8938\u894C\u891D\u8960\u895E"], + ["e640", "\u8966\u8964\u896D\u896A\u896F\u8974\u8977\u897E\u8983\u8988\u898A\u8993\u8998\u89A1\u89A9\u89A6\u89AC\u89AF\u89B2\u89BA\u89BD\u89BF\u89C0\u89DA\u89DC\u89DD\u89E7\u89F4\u89F8\u8A03\u8A16\u8A10\u8A0C\u8A1B\u8A1D\u8A25\u8A36\u8A41\u8A5B\u8A52\u8A46\u8A48\u8A7C\u8A6D\u8A6C\u8A62\u8A85\u8A82\u8A84\u8AA8\u8AA1\u8A91\u8AA5\u8AA6\u8A9A\u8AA3\u8AC4\u8ACD\u8AC2\u8ADA\u8AEB\u8AF3\u8AE7"], + ["e680", "\u8AE4\u8AF1\u8B14\u8AE0\u8AE2\u8AF7\u8ADE\u8ADB\u8B0C\u8B07\u8B1A\u8AE1\u8B16\u8B10\u8B17\u8B20\u8B33\u97AB\u8B26\u8B2B\u8B3E\u8B28\u8B41\u8B4C\u8B4F\u8B4E\u8B49\u8B56\u8B5B\u8B5A\u8B6B\u8B5F\u8B6C\u8B6F\u8B74\u8B7D\u8B80\u8B8C\u8B8E\u8B92\u8B93\u8B96\u8B99\u8B9A\u8C3A\u8C41\u8C3F\u8C48\u8C4C\u8C4E\u8C50\u8C55\u8C62\u8C6C\u8C78\u8C7A\u8C82\u8C89\u8C85\u8C8A\u8C8D\u8C8E\u8C94\u8C7C\u8C98\u621D\u8CAD\u8CAA\u8CBD\u8CB2\u8CB3\u8CAE\u8CB6\u8CC8\u8CC1\u8CE4\u8CE3\u8CDA\u8CFD\u8CFA\u8CFB\u8D04\u8D05\u8D0A\u8D07\u8D0F\u8D0D\u8D10\u9F4E\u8D13\u8CCD\u8D14\u8D16\u8D67\u8D6D\u8D71\u8D73\u8D81\u8D99\u8DC2\u8DBE\u8DBA\u8DCF\u8DDA\u8DD6\u8DCC\u8DDB\u8DCB\u8DEA\u8DEB\u8DDF\u8DE3\u8DFC\u8E08\u8E09\u8DFF\u8E1D\u8E1E\u8E10\u8E1F\u8E42\u8E35\u8E30\u8E34\u8E4A"], + ["e740", "\u8E47\u8E49\u8E4C\u8E50\u8E48\u8E59\u8E64\u8E60\u8E2A\u8E63\u8E55\u8E76\u8E72\u8E7C\u8E81\u8E87\u8E85\u8E84\u8E8B\u8E8A\u8E93\u8E91\u8E94\u8E99\u8EAA\u8EA1\u8EAC\u8EB0\u8EC6\u8EB1\u8EBE\u8EC5\u8EC8\u8ECB\u8EDB\u8EE3\u8EFC\u8EFB\u8EEB\u8EFE\u8F0A\u8F05\u8F15\u8F12\u8F19\u8F13\u8F1C\u8F1F\u8F1B\u8F0C\u8F26\u8F33\u8F3B\u8F39\u8F45\u8F42\u8F3E\u8F4C\u8F49\u8F46\u8F4E\u8F57\u8F5C"], + ["e780", "\u8F62\u8F63\u8F64\u8F9C\u8F9F\u8FA3\u8FAD\u8FAF\u8FB7\u8FDA\u8FE5\u8FE2\u8FEA\u8FEF\u9087\u8FF4\u9005\u8FF9\u8FFA\u9011\u9015\u9021\u900D\u901E\u9016\u900B\u9027\u9036\u9035\u9039\u8FF8\u904F\u9050\u9051\u9052\u900E\u9049\u903E\u9056\u9058\u905E\u9068\u906F\u9076\u96A8\u9072\u9082\u907D\u9081\u9080\u908A\u9089\u908F\u90A8\u90AF\u90B1\u90B5\u90E2\u90E4\u6248\u90DB\u9102\u9112\u9119\u9132\u9130\u914A\u9156\u9158\u9163\u9165\u9169\u9173\u9172\u918B\u9189\u9182\u91A2\u91AB\u91AF\u91AA\u91B5\u91B4\u91BA\u91C0\u91C1\u91C9\u91CB\u91D0\u91D6\u91DF\u91E1\u91DB\u91FC\u91F5\u91F6\u921E\u91FF\u9214\u922C\u9215\u9211\u925E\u9257\u9245\u9249\u9264\u9248\u9295\u923F\u924B\u9250\u929C\u9296\u9293\u929B\u925A\u92CF\u92B9\u92B7\u92E9\u930F\u92FA\u9344\u932E"], + ["e840", "\u9319\u9322\u931A\u9323\u933A\u9335\u933B\u935C\u9360\u937C\u936E\u9356\u93B0\u93AC\u93AD\u9394\u93B9\u93D6\u93D7\u93E8\u93E5\u93D8\u93C3\u93DD\u93D0\u93C8\u93E4\u941A\u9414\u9413\u9403\u9407\u9410\u9436\u942B\u9435\u9421\u943A\u9441\u9452\u9444\u945B\u9460\u9462\u945E\u946A\u9229\u9470\u9475\u9477\u947D\u945A\u947C\u947E\u9481\u947F\u9582\u9587\u958A\u9594\u9596\u9598\u9599"], + ["e880", "\u95A0\u95A8\u95A7\u95AD\u95BC\u95BB\u95B9\u95BE\u95CA\u6FF6\u95C3\u95CD\u95CC\u95D5\u95D4\u95D6\u95DC\u95E1\u95E5\u95E2\u9621\u9628\u962E\u962F\u9642\u964C\u964F\u964B\u9677\u965C\u965E\u965D\u965F\u9666\u9672\u966C\u968D\u9698\u9695\u9697\u96AA\u96A7\u96B1\u96B2\u96B0\u96B4\u96B6\u96B8\u96B9\u96CE\u96CB\u96C9\u96CD\u894D\u96DC\u970D\u96D5\u96F9\u9704\u9706\u9708\u9713\u970E\u9711\u970F\u9716\u9719\u9724\u972A\u9730\u9739\u973D\u973E\u9744\u9746\u9748\u9742\u9749\u975C\u9760\u9764\u9766\u9768\u52D2\u976B\u9771\u9779\u9785\u977C\u9781\u977A\u9786\u978B\u978F\u9790\u979C\u97A8\u97A6\u97A3\u97B3\u97B4\u97C3\u97C6\u97C8\u97CB\u97DC\u97ED\u9F4F\u97F2\u7ADF\u97F6\u97F5\u980F\u980C\u9838\u9824\u9821\u9837\u983D\u9846\u984F\u984B\u986B\u986F\u9870"], + ["e940", "\u9871\u9874\u9873\u98AA\u98AF\u98B1\u98B6\u98C4\u98C3\u98C6\u98E9\u98EB\u9903\u9909\u9912\u9914\u9918\u9921\u991D\u991E\u9924\u9920\u992C\u992E\u993D\u993E\u9942\u9949\u9945\u9950\u994B\u9951\u9952\u994C\u9955\u9997\u9998\u99A5\u99AD\u99AE\u99BC\u99DF\u99DB\u99DD\u99D8\u99D1\u99ED\u99EE\u99F1\u99F2\u99FB\u99F8\u9A01\u9A0F\u9A05\u99E2\u9A19\u9A2B\u9A37\u9A45\u9A42\u9A40\u9A43"], + ["e980", "\u9A3E\u9A55\u9A4D\u9A5B\u9A57\u9A5F\u9A62\u9A65\u9A64\u9A69\u9A6B\u9A6A\u9AAD\u9AB0\u9ABC\u9AC0\u9ACF\u9AD1\u9AD3\u9AD4\u9ADE\u9ADF\u9AE2\u9AE3\u9AE6\u9AEF\u9AEB\u9AEE\u9AF4\u9AF1\u9AF7\u9AFB\u9B06\u9B18\u9B1A\u9B1F\u9B22\u9B23\u9B25\u9B27\u9B28\u9B29\u9B2A\u9B2E\u9B2F\u9B32\u9B44\u9B43\u9B4F\u9B4D\u9B4E\u9B51\u9B58\u9B74\u9B93\u9B83\u9B91\u9B96\u9B97\u9B9F\u9BA0\u9BA8\u9BB4\u9BC0\u9BCA\u9BB9\u9BC6\u9BCF\u9BD1\u9BD2\u9BE3\u9BE2\u9BE4\u9BD4\u9BE1\u9C3A\u9BF2\u9BF1\u9BF0\u9C15\u9C14\u9C09\u9C13\u9C0C\u9C06\u9C08\u9C12\u9C0A\u9C04\u9C2E\u9C1B\u9C25\u9C24\u9C21\u9C30\u9C47\u9C32\u9C46\u9C3E\u9C5A\u9C60\u9C67\u9C76\u9C78\u9CE7\u9CEC\u9CF0\u9D09\u9D08\u9CEB\u9D03\u9D06\u9D2A\u9D26\u9DAF\u9D23\u9D1F\u9D44\u9D15\u9D12\u9D41\u9D3F\u9D3E\u9D46\u9D48"], + ["ea40", "\u9D5D\u9D5E\u9D64\u9D51\u9D50\u9D59\u9D72\u9D89\u9D87\u9DAB\u9D6F\u9D7A\u9D9A\u9DA4\u9DA9\u9DB2\u9DC4\u9DC1\u9DBB\u9DB8\u9DBA\u9DC6\u9DCF\u9DC2\u9DD9\u9DD3\u9DF8\u9DE6\u9DED\u9DEF\u9DFD\u9E1A\u9E1B\u9E1E\u9E75\u9E79\u9E7D\u9E81\u9E88\u9E8B\u9E8C\u9E92\u9E95\u9E91\u9E9D\u9EA5\u9EA9\u9EB8\u9EAA\u9EAD\u9761\u9ECC\u9ECE\u9ECF\u9ED0\u9ED4\u9EDC\u9EDE\u9EDD\u9EE0\u9EE5\u9EE8\u9EEF"], + ["ea80", "\u9EF4\u9EF6\u9EF7\u9EF9\u9EFB\u9EFC\u9EFD\u9F07\u9F08\u76B7\u9F15\u9F21\u9F2C\u9F3E\u9F4A\u9F52\u9F54\u9F63\u9F5F\u9F60\u9F61\u9F66\u9F67\u9F6C\u9F6A\u9F77\u9F72\u9F76\u9F95\u9F9C\u9FA0\u582F\u69C7\u9059\u7464\u51DC\u7199"], + ["ed40", "\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F"], + ["ed80", "\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1"], + ["ee40", "\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559"], + ["ee80", "\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"], + ["eeef", "\u2170", 9, "\uFFE2\uFFE4\uFF07\uFF02"], + ["f040", "\uE000", 62], + ["f080", "\uE03F", 124], + ["f140", "\uE0BC", 62], + ["f180", "\uE0FB", 124], + ["f240", "\uE178", 62], + ["f280", "\uE1B7", 124], + ["f340", "\uE234", 62], + ["f380", "\uE273", 124], + ["f440", "\uE2F0", 62], + ["f480", "\uE32F", 124], + ["f540", "\uE3AC", 62], + ["f580", "\uE3EB", 124], + ["f640", "\uE468", 62], + ["f680", "\uE4A7", 124], + ["f740", "\uE524", 62], + ["f780", "\uE563", 124], + ["f840", "\uE5E0", 62], + ["f880", "\uE61F", 124], + ["f940", "\uE69C"], + ["fa40", "\u2170", 9, "\u2160", 9, "\uFFE2\uFFE4\uFF07\uFF02\u3231\u2116\u2121\u2235\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A"], + ["fa80", "\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F"], + ["fb40", "\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19"], + ["fb80", "\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9"], + ["fc40", "\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"] + ]; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tables/eucjp.json +var require_eucjp = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tables/eucjp.json"(exports2, module2) { + module2.exports = [ + ["0", "\0", 127], + ["8ea1", "\uFF61", 62], + ["a1a1", "\u3000\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01\u309B\u309C\xB4\uFF40\xA8\uFF3E\uFFE3\uFF3F\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\u2015\u2010\uFF0F\uFF3C\uFF5E\u2225\uFF5C\u2026\u2025\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\uFF3B\uFF3D\uFF5B\uFF5D\u3008", 9, "\uFF0B\uFF0D\xB1\xD7\xF7\uFF1D\u2260\uFF1C\uFF1E\u2266\u2267\u221E\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFFE5\uFF04\uFFE0\uFFE1\uFF05\uFF03\uFF06\uFF0A\uFF20\xA7\u2606\u2605\u25CB\u25CF\u25CE\u25C7"], + ["a2a1", "\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u203B\u3012\u2192\u2190\u2191\u2193\u3013"], + ["a2ba", "\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229"], + ["a2ca", "\u2227\u2228\uFFE2\u21D2\u21D4\u2200\u2203"], + ["a2dc", "\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C"], + ["a2f2", "\u212B\u2030\u266F\u266D\u266A\u2020\u2021\xB6"], + ["a2fe", "\u25EF"], + ["a3b0", "\uFF10", 9], + ["a3c1", "\uFF21", 25], + ["a3e1", "\uFF41", 25], + ["a4a1", "\u3041", 82], + ["a5a1", "\u30A1", 85], + ["a6a1", "\u0391", 16, "\u03A3", 6], + ["a6c1", "\u03B1", 16, "\u03C3", 6], + ["a7a1", "\u0410", 5, "\u0401\u0416", 25], + ["a7d1", "\u0430", 5, "\u0451\u0436", 25], + ["a8a1", "\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542"], + ["ada1", "\u2460", 19, "\u2160", 9], + ["adc0", "\u3349\u3314\u3322\u334D\u3318\u3327\u3303\u3336\u3351\u3357\u330D\u3326\u3323\u332B\u334A\u333B\u339C\u339D\u339E\u338E\u338F\u33C4\u33A1"], + ["addf", "\u337B\u301D\u301F\u2116\u33CD\u2121\u32A4", 4, "\u3231\u3232\u3239\u337E\u337D\u337C\u2252\u2261\u222B\u222E\u2211\u221A\u22A5\u2220\u221F\u22BF\u2235\u2229\u222A"], + ["b0a1", "\u4E9C\u5516\u5A03\u963F\u54C0\u611B\u6328\u59F6\u9022\u8475\u831C\u7A50\u60AA\u63E1\u6E25\u65ED\u8466\u82A6\u9BF5\u6893\u5727\u65A1\u6271\u5B9B\u59D0\u867B\u98F4\u7D62\u7DBE\u9B8E\u6216\u7C9F\u88B7\u5B89\u5EB5\u6309\u6697\u6848\u95C7\u978D\u674F\u4EE5\u4F0A\u4F4D\u4F9D\u5049\u56F2\u5937\u59D4\u5A01\u5C09\u60DF\u610F\u6170\u6613\u6905\u70BA\u754F\u7570\u79FB\u7DAD\u7DEF\u80C3\u840E\u8863\u8B02\u9055\u907A\u533B\u4E95\u4EA5\u57DF\u80B2\u90C1\u78EF\u4E00\u58F1\u6EA2\u9038\u7A32\u8328\u828B\u9C2F\u5141\u5370\u54BD\u54E1\u56E0\u59FB\u5F15\u98F2\u6DEB\u80E4\u852D"], + ["b1a1", "\u9662\u9670\u96A0\u97FB\u540B\u53F3\u5B87\u70CF\u7FBD\u8FC2\u96E8\u536F\u9D5C\u7ABA\u4E11\u7893\u81FC\u6E26\u5618\u5504\u6B1D\u851A\u9C3B\u59E5\u53A9\u6D66\u74DC\u958F\u5642\u4E91\u904B\u96F2\u834F\u990C\u53E1\u55B6\u5B30\u5F71\u6620\u66F3\u6804\u6C38\u6CF3\u6D29\u745B\u76C8\u7A4E\u9834\u82F1\u885B\u8A60\u92ED\u6DB2\u75AB\u76CA\u99C5\u60A6\u8B01\u8D8A\u95B2\u698E\u53AD\u5186\u5712\u5830\u5944\u5BB4\u5EF6\u6028\u63A9\u63F4\u6CBF\u6F14\u708E\u7114\u7159\u71D5\u733F\u7E01\u8276\u82D1\u8597\u9060\u925B\u9D1B\u5869\u65BC\u6C5A\u7525\u51F9\u592E\u5965\u5F80\u5FDC"], + ["b2a1", "\u62BC\u65FA\u6A2A\u6B27\u6BB4\u738B\u7FC1\u8956\u9D2C\u9D0E\u9EC4\u5CA1\u6C96\u837B\u5104\u5C4B\u61B6\u81C6\u6876\u7261\u4E59\u4FFA\u5378\u6069\u6E29\u7A4F\u97F3\u4E0B\u5316\u4EEE\u4F55\u4F3D\u4FA1\u4F73\u52A0\u53EF\u5609\u590F\u5AC1\u5BB6\u5BE1\u79D1\u6687\u679C\u67B6\u6B4C\u6CB3\u706B\u73C2\u798D\u79BE\u7A3C\u7B87\u82B1\u82DB\u8304\u8377\u83EF\u83D3\u8766\u8AB2\u5629\u8CA8\u8FE6\u904E\u971E\u868A\u4FC4\u5CE8\u6211\u7259\u753B\u81E5\u82BD\u86FE\u8CC0\u96C5\u9913\u99D5\u4ECB\u4F1A\u89E3\u56DE\u584A\u58CA\u5EFB\u5FEB\u602A\u6094\u6062\u61D0\u6212\u62D0\u6539"], + ["b3a1", "\u9B41\u6666\u68B0\u6D77\u7070\u754C\u7686\u7D75\u82A5\u87F9\u958B\u968E\u8C9D\u51F1\u52BE\u5916\u54B3\u5BB3\u5D16\u6168\u6982\u6DAF\u788D\u84CB\u8857\u8A72\u93A7\u9AB8\u6D6C\u99A8\u86D9\u57A3\u67FF\u86CE\u920E\u5283\u5687\u5404\u5ED3\u62E1\u64B9\u683C\u6838\u6BBB\u7372\u78BA\u7A6B\u899A\u89D2\u8D6B\u8F03\u90ED\u95A3\u9694\u9769\u5B66\u5CB3\u697D\u984D\u984E\u639B\u7B20\u6A2B\u6A7F\u68B6\u9C0D\u6F5F\u5272\u559D\u6070\u62EC\u6D3B\u6E07\u6ED1\u845B\u8910\u8F44\u4E14\u9C39\u53F6\u691B\u6A3A\u9784\u682A\u515C\u7AC3\u84B2\u91DC\u938C\u565B\u9D28\u6822\u8305\u8431"], + ["b4a1", "\u7CA5\u5208\u82C5\u74E6\u4E7E\u4F83\u51A0\u5BD2\u520A\u52D8\u52E7\u5DFB\u559A\u582A\u59E6\u5B8C\u5B98\u5BDB\u5E72\u5E79\u60A3\u611F\u6163\u61BE\u63DB\u6562\u67D1\u6853\u68FA\u6B3E\u6B53\u6C57\u6F22\u6F97\u6F45\u74B0\u7518\u76E3\u770B\u7AFF\u7BA1\u7C21\u7DE9\u7F36\u7FF0\u809D\u8266\u839E\u89B3\u8ACC\u8CAB\u9084\u9451\u9593\u9591\u95A2\u9665\u97D3\u9928\u8218\u4E38\u542B\u5CB8\u5DCC\u73A9\u764C\u773C\u5CA9\u7FEB\u8D0B\u96C1\u9811\u9854\u9858\u4F01\u4F0E\u5371\u559C\u5668\u57FA\u5947\u5B09\u5BC4\u5C90\u5E0C\u5E7E\u5FCC\u63EE\u673A\u65D7\u65E2\u671F\u68CB\u68C4"], + ["b5a1", "\u6A5F\u5E30\u6BC5\u6C17\u6C7D\u757F\u7948\u5B63\u7A00\u7D00\u5FBD\u898F\u8A18\u8CB4\u8D77\u8ECC\u8F1D\u98E2\u9A0E\u9B3C\u4E80\u507D\u5100\u5993\u5B9C\u622F\u6280\u64EC\u6B3A\u72A0\u7591\u7947\u7FA9\u87FB\u8ABC\u8B70\u63AC\u83CA\u97A0\u5409\u5403\u55AB\u6854\u6A58\u8A70\u7827\u6775\u9ECD\u5374\u5BA2\u811A\u8650\u9006\u4E18\u4E45\u4EC7\u4F11\u53CA\u5438\u5BAE\u5F13\u6025\u6551\u673D\u6C42\u6C72\u6CE3\u7078\u7403\u7A76\u7AAE\u7B08\u7D1A\u7CFE\u7D66\u65E7\u725B\u53BB\u5C45\u5DE8\u62D2\u62E0\u6319\u6E20\u865A\u8A31\u8DDD\u92F8\u6F01\u79A6\u9B5A\u4EA8\u4EAB\u4EAC"], + ["b6a1", "\u4F9B\u4FA0\u50D1\u5147\u7AF6\u5171\u51F6\u5354\u5321\u537F\u53EB\u55AC\u5883\u5CE1\u5F37\u5F4A\u602F\u6050\u606D\u631F\u6559\u6A4B\u6CC1\u72C2\u72ED\u77EF\u80F8\u8105\u8208\u854E\u90F7\u93E1\u97FF\u9957\u9A5A\u4EF0\u51DD\u5C2D\u6681\u696D\u5C40\u66F2\u6975\u7389\u6850\u7C81\u50C5\u52E4\u5747\u5DFE\u9326\u65A4\u6B23\u6B3D\u7434\u7981\u79BD\u7B4B\u7DCA\u82B9\u83CC\u887F\u895F\u8B39\u8FD1\u91D1\u541F\u9280\u4E5D\u5036\u53E5\u533A\u72D7\u7396\u77E9\u82E6\u8EAF\u99C6\u99C8\u99D2\u5177\u611A\u865E\u55B0\u7A7A\u5076\u5BD3\u9047\u9685\u4E32\u6ADB\u91E7\u5C51\u5C48"], + ["b7a1", "\u6398\u7A9F\u6C93\u9774\u8F61\u7AAA\u718A\u9688\u7C82\u6817\u7E70\u6851\u936C\u52F2\u541B\u85AB\u8A13\u7FA4\u8ECD\u90E1\u5366\u8888\u7941\u4FC2\u50BE\u5211\u5144\u5553\u572D\u73EA\u578B\u5951\u5F62\u5F84\u6075\u6176\u6167\u61A9\u63B2\u643A\u656C\u666F\u6842\u6E13\u7566\u7A3D\u7CFB\u7D4C\u7D99\u7E4B\u7F6B\u830E\u834A\u86CD\u8A08\u8A63\u8B66\u8EFD\u981A\u9D8F\u82B8\u8FCE\u9BE8\u5287\u621F\u6483\u6FC0\u9699\u6841\u5091\u6B20\u6C7A\u6F54\u7A74\u7D50\u8840\u8A23\u6708\u4EF6\u5039\u5026\u5065\u517C\u5238\u5263\u55A7\u570F\u5805\u5ACC\u5EFA\u61B2\u61F8\u62F3\u6372"], + ["b8a1", "\u691C\u6A29\u727D\u72AC\u732E\u7814\u786F\u7D79\u770C\u80A9\u898B\u8B19\u8CE2\u8ED2\u9063\u9375\u967A\u9855\u9A13\u9E78\u5143\u539F\u53B3\u5E7B\u5F26\u6E1B\u6E90\u7384\u73FE\u7D43\u8237\u8A00\u8AFA\u9650\u4E4E\u500B\u53E4\u547C\u56FA\u59D1\u5B64\u5DF1\u5EAB\u5F27\u6238\u6545\u67AF\u6E56\u72D0\u7CCA\u88B4\u80A1\u80E1\u83F0\u864E\u8A87\u8DE8\u9237\u96C7\u9867\u9F13\u4E94\u4E92\u4F0D\u5348\u5449\u543E\u5A2F\u5F8C\u5FA1\u609F\u68A7\u6A8E\u745A\u7881\u8A9E\u8AA4\u8B77\u9190\u4E5E\u9BC9\u4EA4\u4F7C\u4FAF\u5019\u5016\u5149\u516C\u529F\u52B9\u52FE\u539A\u53E3\u5411"], + ["b9a1", "\u540E\u5589\u5751\u57A2\u597D\u5B54\u5B5D\u5B8F\u5DE5\u5DE7\u5DF7\u5E78\u5E83\u5E9A\u5EB7\u5F18\u6052\u614C\u6297\u62D8\u63A7\u653B\u6602\u6643\u66F4\u676D\u6821\u6897\u69CB\u6C5F\u6D2A\u6D69\u6E2F\u6E9D\u7532\u7687\u786C\u7A3F\u7CE0\u7D05\u7D18\u7D5E\u7DB1\u8015\u8003\u80AF\u80B1\u8154\u818F\u822A\u8352\u884C\u8861\u8B1B\u8CA2\u8CFC\u90CA\u9175\u9271\u783F\u92FC\u95A4\u964D\u9805\u9999\u9AD8\u9D3B\u525B\u52AB\u53F7\u5408\u58D5\u62F7\u6FE0\u8C6A\u8F5F\u9EB9\u514B\u523B\u544A\u56FD\u7A40\u9177\u9D60\u9ED2\u7344\u6F09\u8170\u7511\u5FFD\u60DA\u9AA8\u72DB\u8FBC"], + ["baa1", "\u6B64\u9803\u4ECA\u56F0\u5764\u58BE\u5A5A\u6068\u61C7\u660F\u6606\u6839\u68B1\u6DF7\u75D5\u7D3A\u826E\u9B42\u4E9B\u4F50\u53C9\u5506\u5D6F\u5DE6\u5DEE\u67FB\u6C99\u7473\u7802\u8A50\u9396\u88DF\u5750\u5EA7\u632B\u50B5\u50AC\u518D\u6700\u54C9\u585E\u59BB\u5BB0\u5F69\u624D\u63A1\u683D\u6B73\u6E08\u707D\u91C7\u7280\u7815\u7826\u796D\u658E\u7D30\u83DC\u88C1\u8F09\u969B\u5264\u5728\u6750\u7F6A\u8CA1\u51B4\u5742\u962A\u583A\u698A\u80B4\u54B2\u5D0E\u57FC\u7895\u9DFA\u4F5C\u524A\u548B\u643E\u6628\u6714\u67F5\u7A84\u7B56\u7D22\u932F\u685C\u9BAD\u7B39\u5319\u518A\u5237"], + ["bba1", "\u5BDF\u62F6\u64AE\u64E6\u672D\u6BBA\u85A9\u96D1\u7690\u9BD6\u634C\u9306\u9BAB\u76BF\u6652\u4E09\u5098\u53C2\u5C71\u60E8\u6492\u6563\u685F\u71E6\u73CA\u7523\u7B97\u7E82\u8695\u8B83\u8CDB\u9178\u9910\u65AC\u66AB\u6B8B\u4ED5\u4ED4\u4F3A\u4F7F\u523A\u53F8\u53F2\u55E3\u56DB\u58EB\u59CB\u59C9\u59FF\u5B50\u5C4D\u5E02\u5E2B\u5FD7\u601D\u6307\u652F\u5B5C\u65AF\u65BD\u65E8\u679D\u6B62\u6B7B\u6C0F\u7345\u7949\u79C1\u7CF8\u7D19\u7D2B\u80A2\u8102\u81F3\u8996\u8A5E\u8A69\u8A66\u8A8C\u8AEE\u8CC7\u8CDC\u96CC\u98FC\u6B6F\u4E8B\u4F3C\u4F8D\u5150\u5B57\u5BFA\u6148\u6301\u6642"], + ["bca1", "\u6B21\u6ECB\u6CBB\u723E\u74BD\u75D4\u78C1\u793A\u800C\u8033\u81EA\u8494\u8F9E\u6C50\u9E7F\u5F0F\u8B58\u9D2B\u7AFA\u8EF8\u5B8D\u96EB\u4E03\u53F1\u57F7\u5931\u5AC9\u5BA4\u6089\u6E7F\u6F06\u75BE\u8CEA\u5B9F\u8500\u7BE0\u5072\u67F4\u829D\u5C61\u854A\u7E1E\u820E\u5199\u5C04\u6368\u8D66\u659C\u716E\u793E\u7D17\u8005\u8B1D\u8ECA\u906E\u86C7\u90AA\u501F\u52FA\u5C3A\u6753\u707C\u7235\u914C\u91C8\u932B\u82E5\u5BC2\u5F31\u60F9\u4E3B\u53D6\u5B88\u624B\u6731\u6B8A\u72E9\u73E0\u7A2E\u816B\u8DA3\u9152\u9996\u5112\u53D7\u546A\u5BFF\u6388\u6A39\u7DAC\u9700\u56DA\u53CE\u5468"], + ["bda1", "\u5B97\u5C31\u5DDE\u4FEE\u6101\u62FE\u6D32\u79C0\u79CB\u7D42\u7E4D\u7FD2\u81ED\u821F\u8490\u8846\u8972\u8B90\u8E74\u8F2F\u9031\u914B\u916C\u96C6\u919C\u4EC0\u4F4F\u5145\u5341\u5F93\u620E\u67D4\u6C41\u6E0B\u7363\u7E26\u91CD\u9283\u53D4\u5919\u5BBF\u6DD1\u795D\u7E2E\u7C9B\u587E\u719F\u51FA\u8853\u8FF0\u4FCA\u5CFB\u6625\u77AC\u7AE3\u821C\u99FF\u51C6\u5FAA\u65EC\u696F\u6B89\u6DF3\u6E96\u6F64\u76FE\u7D14\u5DE1\u9075\u9187\u9806\u51E6\u521D\u6240\u6691\u66D9\u6E1A\u5EB6\u7DD2\u7F72\u66F8\u85AF\u85F7\u8AF8\u52A9\u53D9\u5973\u5E8F\u5F90\u6055\u92E4\u9664\u50B7\u511F"], + ["bea1", "\u52DD\u5320\u5347\u53EC\u54E8\u5546\u5531\u5617\u5968\u59BE\u5A3C\u5BB5\u5C06\u5C0F\u5C11\u5C1A\u5E84\u5E8A\u5EE0\u5F70\u627F\u6284\u62DB\u638C\u6377\u6607\u660C\u662D\u6676\u677E\u68A2\u6A1F\u6A35\u6CBC\u6D88\u6E09\u6E58\u713C\u7126\u7167\u75C7\u7701\u785D\u7901\u7965\u79F0\u7AE0\u7B11\u7CA7\u7D39\u8096\u83D6\u848B\u8549\u885D\u88F3\u8A1F\u8A3C\u8A54\u8A73\u8C61\u8CDE\u91A4\u9266\u937E\u9418\u969C\u9798\u4E0A\u4E08\u4E1E\u4E57\u5197\u5270\u57CE\u5834\u58CC\u5B22\u5E38\u60C5\u64FE\u6761\u6756\u6D44\u72B6\u7573\u7A63\u84B8\u8B72\u91B8\u9320\u5631\u57F4\u98FE"], + ["bfa1", "\u62ED\u690D\u6B96\u71ED\u7E54\u8077\u8272\u89E6\u98DF\u8755\u8FB1\u5C3B\u4F38\u4FE1\u4FB5\u5507\u5A20\u5BDD\u5BE9\u5FC3\u614E\u632F\u65B0\u664B\u68EE\u699B\u6D78\u6DF1\u7533\u75B9\u771F\u795E\u79E6\u7D33\u81E3\u82AF\u85AA\u89AA\u8A3A\u8EAB\u8F9B\u9032\u91DD\u9707\u4EBA\u4EC1\u5203\u5875\u58EC\u5C0B\u751A\u5C3D\u814E\u8A0A\u8FC5\u9663\u976D\u7B25\u8ACF\u9808\u9162\u56F3\u53A8\u9017\u5439\u5782\u5E25\u63A8\u6C34\u708A\u7761\u7C8B\u7FE0\u8870\u9042\u9154\u9310\u9318\u968F\u745E\u9AC4\u5D07\u5D69\u6570\u67A2\u8DA8\u96DB\u636E\u6749\u6919\u83C5\u9817\u96C0\u88FE"], + ["c0a1", "\u6F84\u647A\u5BF8\u4E16\u702C\u755D\u662F\u51C4\u5236\u52E2\u59D3\u5F81\u6027\u6210\u653F\u6574\u661F\u6674\u68F2\u6816\u6B63\u6E05\u7272\u751F\u76DB\u7CBE\u8056\u58F0\u88FD\u897F\u8AA0\u8A93\u8ACB\u901D\u9192\u9752\u9759\u6589\u7A0E\u8106\u96BB\u5E2D\u60DC\u621A\u65A5\u6614\u6790\u77F3\u7A4D\u7C4D\u7E3E\u810A\u8CAC\u8D64\u8DE1\u8E5F\u78A9\u5207\u62D9\u63A5\u6442\u6298\u8A2D\u7A83\u7BC0\u8AAC\u96EA\u7D76\u820C\u8749\u4ED9\u5148\u5343\u5360\u5BA3\u5C02\u5C16\u5DDD\u6226\u6247\u64B0\u6813\u6834\u6CC9\u6D45\u6D17\u67D3\u6F5C\u714E\u717D\u65CB\u7A7F\u7BAD\u7DDA"], + ["c1a1", "\u7E4A\u7FA8\u817A\u821B\u8239\u85A6\u8A6E\u8CCE\u8DF5\u9078\u9077\u92AD\u9291\u9583\u9BAE\u524D\u5584\u6F38\u7136\u5168\u7985\u7E55\u81B3\u7CCE\u564C\u5851\u5CA8\u63AA\u66FE\u66FD\u695A\u72D9\u758F\u758E\u790E\u7956\u79DF\u7C97\u7D20\u7D44\u8607\u8A34\u963B\u9061\u9F20\u50E7\u5275\u53CC\u53E2\u5009\u55AA\u58EE\u594F\u723D\u5B8B\u5C64\u531D\u60E3\u60F3\u635C\u6383\u633F\u63BB\u64CD\u65E9\u66F9\u5DE3\u69CD\u69FD\u6F15\u71E5\u4E89\u75E9\u76F8\u7A93\u7CDF\u7DCF\u7D9C\u8061\u8349\u8358\u846C\u84BC\u85FB\u88C5\u8D70\u9001\u906D\u9397\u971C\u9A12\u50CF\u5897\u618E"], + ["c2a1", "\u81D3\u8535\u8D08\u9020\u4FC3\u5074\u5247\u5373\u606F\u6349\u675F\u6E2C\u8DB3\u901F\u4FD7\u5C5E\u8CCA\u65CF\u7D9A\u5352\u8896\u5176\u63C3\u5B58\u5B6B\u5C0A\u640D\u6751\u905C\u4ED6\u591A\u592A\u6C70\u8A51\u553E\u5815\u59A5\u60F0\u6253\u67C1\u8235\u6955\u9640\u99C4\u9A28\u4F53\u5806\u5BFE\u8010\u5CB1\u5E2F\u5F85\u6020\u614B\u6234\u66FF\u6CF0\u6EDE\u80CE\u817F\u82D4\u888B\u8CB8\u9000\u902E\u968A\u9EDB\u9BDB\u4EE3\u53F0\u5927\u7B2C\u918D\u984C\u9DF9\u6EDD\u7027\u5353\u5544\u5B85\u6258\u629E\u62D3\u6CA2\u6FEF\u7422\u8A17\u9438\u6FC1\u8AFE\u8338\u51E7\u86F8\u53EA"], + ["c3a1", "\u53E9\u4F46\u9054\u8FB0\u596A\u8131\u5DFD\u7AEA\u8FBF\u68DA\u8C37\u72F8\u9C48\u6A3D\u8AB0\u4E39\u5358\u5606\u5766\u62C5\u63A2\u65E6\u6B4E\u6DE1\u6E5B\u70AD\u77ED\u7AEF\u7BAA\u7DBB\u803D\u80C6\u86CB\u8A95\u935B\u56E3\u58C7\u5F3E\u65AD\u6696\u6A80\u6BB5\u7537\u8AC7\u5024\u77E5\u5730\u5F1B\u6065\u667A\u6C60\u75F4\u7A1A\u7F6E\u81F4\u8718\u9045\u99B3\u7BC9\u755C\u7AF9\u7B51\u84C4\u9010\u79E9\u7A92\u8336\u5AE1\u7740\u4E2D\u4EF2\u5B99\u5FE0\u62BD\u663C\u67F1\u6CE8\u866B\u8877\u8A3B\u914E\u92F3\u99D0\u6A17\u7026\u732A\u82E7\u8457\u8CAF\u4E01\u5146\u51CB\u558B\u5BF5"], + ["c4a1", "\u5E16\u5E33\u5E81\u5F14\u5F35\u5F6B\u5FB4\u61F2\u6311\u66A2\u671D\u6F6E\u7252\u753A\u773A\u8074\u8139\u8178\u8776\u8ABF\u8ADC\u8D85\u8DF3\u929A\u9577\u9802\u9CE5\u52C5\u6357\u76F4\u6715\u6C88\u73CD\u8CC3\u93AE\u9673\u6D25\u589C\u690E\u69CC\u8FFD\u939A\u75DB\u901A\u585A\u6802\u63B4\u69FB\u4F43\u6F2C\u67D8\u8FBB\u8526\u7DB4\u9354\u693F\u6F70\u576A\u58F7\u5B2C\u7D2C\u722A\u540A\u91E3\u9DB4\u4EAD\u4F4E\u505C\u5075\u5243\u8C9E\u5448\u5824\u5B9A\u5E1D\u5E95\u5EAD\u5EF7\u5F1F\u608C\u62B5\u633A\u63D0\u68AF\u6C40\u7887\u798E\u7A0B\u7DE0\u8247\u8A02\u8AE6\u8E44\u9013"], + ["c5a1", "\u90B8\u912D\u91D8\u9F0E\u6CE5\u6458\u64E2\u6575\u6EF4\u7684\u7B1B\u9069\u93D1\u6EBA\u54F2\u5FB9\u64A4\u8F4D\u8FED\u9244\u5178\u586B\u5929\u5C55\u5E97\u6DFB\u7E8F\u751C\u8CBC\u8EE2\u985B\u70B9\u4F1D\u6BBF\u6FB1\u7530\u96FB\u514E\u5410\u5835\u5857\u59AC\u5C60\u5F92\u6597\u675C\u6E21\u767B\u83DF\u8CED\u9014\u90FD\u934D\u7825\u783A\u52AA\u5EA6\u571F\u5974\u6012\u5012\u515A\u51AC\u51CD\u5200\u5510\u5854\u5858\u5957\u5B95\u5CF6\u5D8B\u60BC\u6295\u642D\u6771\u6843\u68BC\u68DF\u76D7\u6DD8\u6E6F\u6D9B\u706F\u71C8\u5F53\u75D8\u7977\u7B49\u7B54\u7B52\u7CD6\u7D71\u5230"], + ["c6a1", "\u8463\u8569\u85E4\u8A0E\u8B04\u8C46\u8E0F\u9003\u900F\u9419\u9676\u982D\u9A30\u95D8\u50CD\u52D5\u540C\u5802\u5C0E\u61A7\u649E\u6D1E\u77B3\u7AE5\u80F4\u8404\u9053\u9285\u5CE0\u9D07\u533F\u5F97\u5FB3\u6D9C\u7279\u7763\u79BF\u7BE4\u6BD2\u72EC\u8AAD\u6803\u6A61\u51F8\u7A81\u6934\u5C4A\u9CF6\u82EB\u5BC5\u9149\u701E\u5678\u5C6F\u60C7\u6566\u6C8C\u8C5A\u9041\u9813\u5451\u66C7\u920D\u5948\u90A3\u5185\u4E4D\u51EA\u8599\u8B0E\u7058\u637A\u934B\u6962\u99B4\u7E04\u7577\u5357\u6960\u8EDF\u96E3\u6C5D\u4E8C\u5C3C\u5F10\u8FE9\u5302\u8CD1\u8089\u8679\u5EFF\u65E5\u4E73\u5165"], + ["c7a1", "\u5982\u5C3F\u97EE\u4EFB\u598A\u5FCD\u8A8D\u6FE1\u79B0\u7962\u5BE7\u8471\u732B\u71B1\u5E74\u5FF5\u637B\u649A\u71C3\u7C98\u4E43\u5EFC\u4E4B\u57DC\u56A2\u60A9\u6FC3\u7D0D\u80FD\u8133\u81BF\u8FB2\u8997\u86A4\u5DF4\u628A\u64AD\u8987\u6777\u6CE2\u6D3E\u7436\u7834\u5A46\u7F75\u82AD\u99AC\u4FF3\u5EC3\u62DD\u6392\u6557\u676F\u76C3\u724C\u80CC\u80BA\u8F29\u914D\u500D\u57F9\u5A92\u6885\u6973\u7164\u72FD\u8CB7\u58F2\u8CE0\u966A\u9019\u877F\u79E4\u77E7\u8429\u4F2F\u5265\u535A\u62CD\u67CF\u6CCA\u767D\u7B94\u7C95\u8236\u8584\u8FEB\u66DD\u6F20\u7206\u7E1B\u83AB\u99C1\u9EA6"], + ["c8a1", "\u51FD\u7BB1\u7872\u7BB8\u8087\u7B48\u6AE8\u5E61\u808C\u7551\u7560\u516B\u9262\u6E8C\u767A\u9197\u9AEA\u4F10\u7F70\u629C\u7B4F\u95A5\u9CE9\u567A\u5859\u86E4\u96BC\u4F34\u5224\u534A\u53CD\u53DB\u5E06\u642C\u6591\u677F\u6C3E\u6C4E\u7248\u72AF\u73ED\u7554\u7E41\u822C\u85E9\u8CA9\u7BC4\u91C6\u7169\u9812\u98EF\u633D\u6669\u756A\u76E4\u78D0\u8543\u86EE\u532A\u5351\u5426\u5983\u5E87\u5F7C\u60B2\u6249\u6279\u62AB\u6590\u6BD4\u6CCC\u75B2\u76AE\u7891\u79D8\u7DCB\u7F77\u80A5\u88AB\u8AB9\u8CBB\u907F\u975E\u98DB\u6A0B\u7C38\u5099\u5C3E\u5FAE\u6787\u6BD8\u7435\u7709\u7F8E"], + ["c9a1", "\u9F3B\u67CA\u7A17\u5339\u758B\u9AED\u5F66\u819D\u83F1\u8098\u5F3C\u5FC5\u7562\u7B46\u903C\u6867\u59EB\u5A9B\u7D10\u767E\u8B2C\u4FF5\u5F6A\u6A19\u6C37\u6F02\u74E2\u7968\u8868\u8A55\u8C79\u5EDF\u63CF\u75C5\u79D2\u82D7\u9328\u92F2\u849C\u86ED\u9C2D\u54C1\u5F6C\u658C\u6D5C\u7015\u8CA7\u8CD3\u983B\u654F\u74F6\u4E0D\u4ED8\u57E0\u592B\u5A66\u5BCC\u51A8\u5E03\u5E9C\u6016\u6276\u6577\u65A7\u666E\u6D6E\u7236\u7B26\u8150\u819A\u8299\u8B5C\u8CA0\u8CE6\u8D74\u961C\u9644\u4FAE\u64AB\u6B66\u821E\u8461\u856A\u90E8\u5C01\u6953\u98A8\u847A\u8557\u4F0F\u526F\u5FA9\u5E45\u670D"], + ["caa1", "\u798F\u8179\u8907\u8986\u6DF5\u5F17\u6255\u6CB8\u4ECF\u7269\u9B92\u5206\u543B\u5674\u58B3\u61A4\u626E\u711A\u596E\u7C89\u7CDE\u7D1B\u96F0\u6587\u805E\u4E19\u4F75\u5175\u5840\u5E63\u5E73\u5F0A\u67C4\u4E26\u853D\u9589\u965B\u7C73\u9801\u50FB\u58C1\u7656\u78A7\u5225\u77A5\u8511\u7B86\u504F\u5909\u7247\u7BC7\u7DE8\u8FBA\u8FD4\u904D\u4FBF\u52C9\u5A29\u5F01\u97AD\u4FDD\u8217\u92EA\u5703\u6355\u6B69\u752B\u88DC\u8F14\u7A42\u52DF\u5893\u6155\u620A\u66AE\u6BCD\u7C3F\u83E9\u5023\u4FF8\u5305\u5446\u5831\u5949\u5B9D\u5CF0\u5CEF\u5D29\u5E96\u62B1\u6367\u653E\u65B9\u670B"], + ["cba1", "\u6CD5\u6CE1\u70F9\u7832\u7E2B\u80DE\u82B3\u840C\u84EC\u8702\u8912\u8A2A\u8C4A\u90A6\u92D2\u98FD\u9CF3\u9D6C\u4E4F\u4EA1\u508D\u5256\u574A\u59A8\u5E3D\u5FD8\u5FD9\u623F\u66B4\u671B\u67D0\u68D2\u5192\u7D21\u80AA\u81A8\u8B00\u8C8C\u8CBF\u927E\u9632\u5420\u982C\u5317\u50D5\u535C\u58A8\u64B2\u6734\u7267\u7766\u7A46\u91E6\u52C3\u6CA1\u6B86\u5800\u5E4C\u5954\u672C\u7FFB\u51E1\u76C6\u6469\u78E8\u9B54\u9EBB\u57CB\u59B9\u6627\u679A\u6BCE\u54E9\u69D9\u5E55\u819C\u6795\u9BAA\u67FE\u9C52\u685D\u4EA6\u4FE3\u53C8\u62B9\u672B\u6CAB\u8FC4\u4FAD\u7E6D\u9EBF\u4E07\u6162\u6E80"], + ["cca1", "\u6F2B\u8513\u5473\u672A\u9B45\u5DF3\u7B95\u5CAC\u5BC6\u871C\u6E4A\u84D1\u7A14\u8108\u5999\u7C8D\u6C11\u7720\u52D9\u5922\u7121\u725F\u77DB\u9727\u9D61\u690B\u5A7F\u5A18\u51A5\u540D\u547D\u660E\u76DF\u8FF7\u9298\u9CF4\u59EA\u725D\u6EC5\u514D\u68C9\u7DBF\u7DEC\u9762\u9EBA\u6478\u6A21\u8302\u5984\u5B5F\u6BDB\u731B\u76F2\u7DB2\u8017\u8499\u5132\u6728\u9ED9\u76EE\u6762\u52FF\u9905\u5C24\u623B\u7C7E\u8CB0\u554F\u60B6\u7D0B\u9580\u5301\u4E5F\u51B6\u591C\u723A\u8036\u91CE\u5F25\u77E2\u5384\u5F79\u7D04\u85AC\u8A33\u8E8D\u9756\u67F3\u85AE\u9453\u6109\u6108\u6CB9\u7652"], + ["cda1", "\u8AED\u8F38\u552F\u4F51\u512A\u52C7\u53CB\u5BA5\u5E7D\u60A0\u6182\u63D6\u6709\u67DA\u6E67\u6D8C\u7336\u7337\u7531\u7950\u88D5\u8A98\u904A\u9091\u90F5\u96C4\u878D\u5915\u4E88\u4F59\u4E0E\u8A89\u8F3F\u9810\u50AD\u5E7C\u5996\u5BB9\u5EB8\u63DA\u63FA\u64C1\u66DC\u694A\u69D8\u6D0B\u6EB6\u7194\u7528\u7AAF\u7F8A\u8000\u8449\u84C9\u8981\u8B21\u8E0A\u9065\u967D\u990A\u617E\u6291\u6B32\u6C83\u6D74\u7FCC\u7FFC\u6DC0\u7F85\u87BA\u88F8\u6765\u83B1\u983C\u96F7\u6D1B\u7D61\u843D\u916A\u4E71\u5375\u5D50\u6B04\u6FEB\u85CD\u862D\u89A7\u5229\u540F\u5C65\u674E\u68A8\u7406\u7483"], + ["cea1", "\u75E2\u88CF\u88E1\u91CC\u96E2\u9678\u5F8B\u7387\u7ACB\u844E\u63A0\u7565\u5289\u6D41\u6E9C\u7409\u7559\u786B\u7C92\u9686\u7ADC\u9F8D\u4FB6\u616E\u65C5\u865C\u4E86\u4EAE\u50DA\u4E21\u51CC\u5BEE\u6599\u6881\u6DBC\u731F\u7642\u77AD\u7A1C\u7CE7\u826F\u8AD2\u907C\u91CF\u9675\u9818\u529B\u7DD1\u502B\u5398\u6797\u6DCB\u71D0\u7433\u81E8\u8F2A\u96A3\u9C57\u9E9F\u7460\u5841\u6D99\u7D2F\u985E\u4EE4\u4F36\u4F8B\u51B7\u52B1\u5DBA\u601C\u73B2\u793C\u82D3\u9234\u96B7\u96F6\u970A\u9E97\u9F62\u66A6\u6B74\u5217\u52A3\u70C8\u88C2\u5EC9\u604B\u6190\u6F23\u7149\u7C3E\u7DF4\u806F"], + ["cfa1", "\u84EE\u9023\u932C\u5442\u9B6F\u6AD3\u7089\u8CC2\u8DEF\u9732\u52B4\u5A41\u5ECA\u5F04\u6717\u697C\u6994\u6D6A\u6F0F\u7262\u72FC\u7BED\u8001\u807E\u874B\u90CE\u516D\u9E93\u7984\u808B\u9332\u8AD6\u502D\u548C\u8A71\u6B6A\u8CC4\u8107\u60D1\u67A0\u9DF2\u4E99\u4E98\u9C10\u8A6B\u85C1\u8568\u6900\u6E7E\u7897\u8155"], + ["d0a1", "\u5F0C\u4E10\u4E15\u4E2A\u4E31\u4E36\u4E3C\u4E3F\u4E42\u4E56\u4E58\u4E82\u4E85\u8C6B\u4E8A\u8212\u5F0D\u4E8E\u4E9E\u4E9F\u4EA0\u4EA2\u4EB0\u4EB3\u4EB6\u4ECE\u4ECD\u4EC4\u4EC6\u4EC2\u4ED7\u4EDE\u4EED\u4EDF\u4EF7\u4F09\u4F5A\u4F30\u4F5B\u4F5D\u4F57\u4F47\u4F76\u4F88\u4F8F\u4F98\u4F7B\u4F69\u4F70\u4F91\u4F6F\u4F86\u4F96\u5118\u4FD4\u4FDF\u4FCE\u4FD8\u4FDB\u4FD1\u4FDA\u4FD0\u4FE4\u4FE5\u501A\u5028\u5014\u502A\u5025\u5005\u4F1C\u4FF6\u5021\u5029\u502C\u4FFE\u4FEF\u5011\u5006\u5043\u5047\u6703\u5055\u5050\u5048\u505A\u5056\u506C\u5078\u5080\u509A\u5085\u50B4\u50B2"], + ["d1a1", "\u50C9\u50CA\u50B3\u50C2\u50D6\u50DE\u50E5\u50ED\u50E3\u50EE\u50F9\u50F5\u5109\u5101\u5102\u5116\u5115\u5114\u511A\u5121\u513A\u5137\u513C\u513B\u513F\u5140\u5152\u514C\u5154\u5162\u7AF8\u5169\u516A\u516E\u5180\u5182\u56D8\u518C\u5189\u518F\u5191\u5193\u5195\u5196\u51A4\u51A6\u51A2\u51A9\u51AA\u51AB\u51B3\u51B1\u51B2\u51B0\u51B5\u51BD\u51C5\u51C9\u51DB\u51E0\u8655\u51E9\u51ED\u51F0\u51F5\u51FE\u5204\u520B\u5214\u520E\u5227\u522A\u522E\u5233\u5239\u524F\u5244\u524B\u524C\u525E\u5254\u526A\u5274\u5269\u5273\u527F\u527D\u528D\u5294\u5292\u5271\u5288\u5291\u8FA8"], + ["d2a1", "\u8FA7\u52AC\u52AD\u52BC\u52B5\u52C1\u52CD\u52D7\u52DE\u52E3\u52E6\u98ED\u52E0\u52F3\u52F5\u52F8\u52F9\u5306\u5308\u7538\u530D\u5310\u530F\u5315\u531A\u5323\u532F\u5331\u5333\u5338\u5340\u5346\u5345\u4E17\u5349\u534D\u51D6\u535E\u5369\u536E\u5918\u537B\u5377\u5382\u5396\u53A0\u53A6\u53A5\u53AE\u53B0\u53B6\u53C3\u7C12\u96D9\u53DF\u66FC\u71EE\u53EE\u53E8\u53ED\u53FA\u5401\u543D\u5440\u542C\u542D\u543C\u542E\u5436\u5429\u541D\u544E\u548F\u5475\u548E\u545F\u5471\u5477\u5470\u5492\u547B\u5480\u5476\u5484\u5490\u5486\u54C7\u54A2\u54B8\u54A5\u54AC\u54C4\u54C8\u54A8"], + ["d3a1", "\u54AB\u54C2\u54A4\u54BE\u54BC\u54D8\u54E5\u54E6\u550F\u5514\u54FD\u54EE\u54ED\u54FA\u54E2\u5539\u5540\u5563\u554C\u552E\u555C\u5545\u5556\u5557\u5538\u5533\u555D\u5599\u5580\u54AF\u558A\u559F\u557B\u557E\u5598\u559E\u55AE\u557C\u5583\u55A9\u5587\u55A8\u55DA\u55C5\u55DF\u55C4\u55DC\u55E4\u55D4\u5614\u55F7\u5616\u55FE\u55FD\u561B\u55F9\u564E\u5650\u71DF\u5634\u5636\u5632\u5638\u566B\u5664\u562F\u566C\u566A\u5686\u5680\u568A\u56A0\u5694\u568F\u56A5\u56AE\u56B6\u56B4\u56C2\u56BC\u56C1\u56C3\u56C0\u56C8\u56CE\u56D1\u56D3\u56D7\u56EE\u56F9\u5700\u56FF\u5704\u5709"], + ["d4a1", "\u5708\u570B\u570D\u5713\u5718\u5716\u55C7\u571C\u5726\u5737\u5738\u574E\u573B\u5740\u574F\u5769\u57C0\u5788\u5761\u577F\u5789\u5793\u57A0\u57B3\u57A4\u57AA\u57B0\u57C3\u57C6\u57D4\u57D2\u57D3\u580A\u57D6\u57E3\u580B\u5819\u581D\u5872\u5821\u5862\u584B\u5870\u6BC0\u5852\u583D\u5879\u5885\u58B9\u589F\u58AB\u58BA\u58DE\u58BB\u58B8\u58AE\u58C5\u58D3\u58D1\u58D7\u58D9\u58D8\u58E5\u58DC\u58E4\u58DF\u58EF\u58FA\u58F9\u58FB\u58FC\u58FD\u5902\u590A\u5910\u591B\u68A6\u5925\u592C\u592D\u5932\u5938\u593E\u7AD2\u5955\u5950\u594E\u595A\u5958\u5962\u5960\u5967\u596C\u5969"], + ["d5a1", "\u5978\u5981\u599D\u4F5E\u4FAB\u59A3\u59B2\u59C6\u59E8\u59DC\u598D\u59D9\u59DA\u5A25\u5A1F\u5A11\u5A1C\u5A09\u5A1A\u5A40\u5A6C\u5A49\u5A35\u5A36\u5A62\u5A6A\u5A9A\u5ABC\u5ABE\u5ACB\u5AC2\u5ABD\u5AE3\u5AD7\u5AE6\u5AE9\u5AD6\u5AFA\u5AFB\u5B0C\u5B0B\u5B16\u5B32\u5AD0\u5B2A\u5B36\u5B3E\u5B43\u5B45\u5B40\u5B51\u5B55\u5B5A\u5B5B\u5B65\u5B69\u5B70\u5B73\u5B75\u5B78\u6588\u5B7A\u5B80\u5B83\u5BA6\u5BB8\u5BC3\u5BC7\u5BC9\u5BD4\u5BD0\u5BE4\u5BE6\u5BE2\u5BDE\u5BE5\u5BEB\u5BF0\u5BF6\u5BF3\u5C05\u5C07\u5C08\u5C0D\u5C13\u5C20\u5C22\u5C28\u5C38\u5C39\u5C41\u5C46\u5C4E\u5C53"], + ["d6a1", "\u5C50\u5C4F\u5B71\u5C6C\u5C6E\u4E62\u5C76\u5C79\u5C8C\u5C91\u5C94\u599B\u5CAB\u5CBB\u5CB6\u5CBC\u5CB7\u5CC5\u5CBE\u5CC7\u5CD9\u5CE9\u5CFD\u5CFA\u5CED\u5D8C\u5CEA\u5D0B\u5D15\u5D17\u5D5C\u5D1F\u5D1B\u5D11\u5D14\u5D22\u5D1A\u5D19\u5D18\u5D4C\u5D52\u5D4E\u5D4B\u5D6C\u5D73\u5D76\u5D87\u5D84\u5D82\u5DA2\u5D9D\u5DAC\u5DAE\u5DBD\u5D90\u5DB7\u5DBC\u5DC9\u5DCD\u5DD3\u5DD2\u5DD6\u5DDB\u5DEB\u5DF2\u5DF5\u5E0B\u5E1A\u5E19\u5E11\u5E1B\u5E36\u5E37\u5E44\u5E43\u5E40\u5E4E\u5E57\u5E54\u5E5F\u5E62\u5E64\u5E47\u5E75\u5E76\u5E7A\u9EBC\u5E7F\u5EA0\u5EC1\u5EC2\u5EC8\u5ED0\u5ECF"], + ["d7a1", "\u5ED6\u5EE3\u5EDD\u5EDA\u5EDB\u5EE2\u5EE1\u5EE8\u5EE9\u5EEC\u5EF1\u5EF3\u5EF0\u5EF4\u5EF8\u5EFE\u5F03\u5F09\u5F5D\u5F5C\u5F0B\u5F11\u5F16\u5F29\u5F2D\u5F38\u5F41\u5F48\u5F4C\u5F4E\u5F2F\u5F51\u5F56\u5F57\u5F59\u5F61\u5F6D\u5F73\u5F77\u5F83\u5F82\u5F7F\u5F8A\u5F88\u5F91\u5F87\u5F9E\u5F99\u5F98\u5FA0\u5FA8\u5FAD\u5FBC\u5FD6\u5FFB\u5FE4\u5FF8\u5FF1\u5FDD\u60B3\u5FFF\u6021\u6060\u6019\u6010\u6029\u600E\u6031\u601B\u6015\u602B\u6026\u600F\u603A\u605A\u6041\u606A\u6077\u605F\u604A\u6046\u604D\u6063\u6043\u6064\u6042\u606C\u606B\u6059\u6081\u608D\u60E7\u6083\u609A"], + ["d8a1", "\u6084\u609B\u6096\u6097\u6092\u60A7\u608B\u60E1\u60B8\u60E0\u60D3\u60B4\u5FF0\u60BD\u60C6\u60B5\u60D8\u614D\u6115\u6106\u60F6\u60F7\u6100\u60F4\u60FA\u6103\u6121\u60FB\u60F1\u610D\u610E\u6147\u613E\u6128\u6127\u614A\u613F\u613C\u612C\u6134\u613D\u6142\u6144\u6173\u6177\u6158\u6159\u615A\u616B\u6174\u616F\u6165\u6171\u615F\u615D\u6153\u6175\u6199\u6196\u6187\u61AC\u6194\u619A\u618A\u6191\u61AB\u61AE\u61CC\u61CA\u61C9\u61F7\u61C8\u61C3\u61C6\u61BA\u61CB\u7F79\u61CD\u61E6\u61E3\u61F6\u61FA\u61F4\u61FF\u61FD\u61FC\u61FE\u6200\u6208\u6209\u620D\u620C\u6214\u621B"], + ["d9a1", "\u621E\u6221\u622A\u622E\u6230\u6232\u6233\u6241\u624E\u625E\u6263\u625B\u6260\u6268\u627C\u6282\u6289\u627E\u6292\u6293\u6296\u62D4\u6283\u6294\u62D7\u62D1\u62BB\u62CF\u62FF\u62C6\u64D4\u62C8\u62DC\u62CC\u62CA\u62C2\u62C7\u629B\u62C9\u630C\u62EE\u62F1\u6327\u6302\u6308\u62EF\u62F5\u6350\u633E\u634D\u641C\u634F\u6396\u638E\u6380\u63AB\u6376\u63A3\u638F\u6389\u639F\u63B5\u636B\u6369\u63BE\u63E9\u63C0\u63C6\u63E3\u63C9\u63D2\u63F6\u63C4\u6416\u6434\u6406\u6413\u6426\u6436\u651D\u6417\u6428\u640F\u6467\u646F\u6476\u644E\u652A\u6495\u6493\u64A5\u64A9\u6488\u64BC"], + ["daa1", "\u64DA\u64D2\u64C5\u64C7\u64BB\u64D8\u64C2\u64F1\u64E7\u8209\u64E0\u64E1\u62AC\u64E3\u64EF\u652C\u64F6\u64F4\u64F2\u64FA\u6500\u64FD\u6518\u651C\u6505\u6524\u6523\u652B\u6534\u6535\u6537\u6536\u6538\u754B\u6548\u6556\u6555\u654D\u6558\u655E\u655D\u6572\u6578\u6582\u6583\u8B8A\u659B\u659F\u65AB\u65B7\u65C3\u65C6\u65C1\u65C4\u65CC\u65D2\u65DB\u65D9\u65E0\u65E1\u65F1\u6772\u660A\u6603\u65FB\u6773\u6635\u6636\u6634\u661C\u664F\u6644\u6649\u6641\u665E\u665D\u6664\u6667\u6668\u665F\u6662\u6670\u6683\u6688\u668E\u6689\u6684\u6698\u669D\u66C1\u66B9\u66C9\u66BE\u66BC"], + ["dba1", "\u66C4\u66B8\u66D6\u66DA\u66E0\u663F\u66E6\u66E9\u66F0\u66F5\u66F7\u670F\u6716\u671E\u6726\u6727\u9738\u672E\u673F\u6736\u6741\u6738\u6737\u6746\u675E\u6760\u6759\u6763\u6764\u6789\u6770\u67A9\u677C\u676A\u678C\u678B\u67A6\u67A1\u6785\u67B7\u67EF\u67B4\u67EC\u67B3\u67E9\u67B8\u67E4\u67DE\u67DD\u67E2\u67EE\u67B9\u67CE\u67C6\u67E7\u6A9C\u681E\u6846\u6829\u6840\u684D\u6832\u684E\u68B3\u682B\u6859\u6863\u6877\u687F\u689F\u688F\u68AD\u6894\u689D\u689B\u6883\u6AAE\u68B9\u6874\u68B5\u68A0\u68BA\u690F\u688D\u687E\u6901\u68CA\u6908\u68D8\u6922\u6926\u68E1\u690C\u68CD"], + ["dca1", "\u68D4\u68E7\u68D5\u6936\u6912\u6904\u68D7\u68E3\u6925\u68F9\u68E0\u68EF\u6928\u692A\u691A\u6923\u6921\u68C6\u6979\u6977\u695C\u6978\u696B\u6954\u697E\u696E\u6939\u6974\u693D\u6959\u6930\u6961\u695E\u695D\u6981\u696A\u69B2\u69AE\u69D0\u69BF\u69C1\u69D3\u69BE\u69CE\u5BE8\u69CA\u69DD\u69BB\u69C3\u69A7\u6A2E\u6991\u69A0\u699C\u6995\u69B4\u69DE\u69E8\u6A02\u6A1B\u69FF\u6B0A\u69F9\u69F2\u69E7\u6A05\u69B1\u6A1E\u69ED\u6A14\u69EB\u6A0A\u6A12\u6AC1\u6A23\u6A13\u6A44\u6A0C\u6A72\u6A36\u6A78\u6A47\u6A62\u6A59\u6A66\u6A48\u6A38\u6A22\u6A90\u6A8D\u6AA0\u6A84\u6AA2\u6AA3"], + ["dda1", "\u6A97\u8617\u6ABB\u6AC3\u6AC2\u6AB8\u6AB3\u6AAC\u6ADE\u6AD1\u6ADF\u6AAA\u6ADA\u6AEA\u6AFB\u6B05\u8616\u6AFA\u6B12\u6B16\u9B31\u6B1F\u6B38\u6B37\u76DC\u6B39\u98EE\u6B47\u6B43\u6B49\u6B50\u6B59\u6B54\u6B5B\u6B5F\u6B61\u6B78\u6B79\u6B7F\u6B80\u6B84\u6B83\u6B8D\u6B98\u6B95\u6B9E\u6BA4\u6BAA\u6BAB\u6BAF\u6BB2\u6BB1\u6BB3\u6BB7\u6BBC\u6BC6\u6BCB\u6BD3\u6BDF\u6BEC\u6BEB\u6BF3\u6BEF\u9EBE\u6C08\u6C13\u6C14\u6C1B\u6C24\u6C23\u6C5E\u6C55\u6C62\u6C6A\u6C82\u6C8D\u6C9A\u6C81\u6C9B\u6C7E\u6C68\u6C73\u6C92\u6C90\u6CC4\u6CF1\u6CD3\u6CBD\u6CD7\u6CC5\u6CDD\u6CAE\u6CB1\u6CBE"], + ["dea1", "\u6CBA\u6CDB\u6CEF\u6CD9\u6CEA\u6D1F\u884D\u6D36\u6D2B\u6D3D\u6D38\u6D19\u6D35\u6D33\u6D12\u6D0C\u6D63\u6D93\u6D64\u6D5A\u6D79\u6D59\u6D8E\u6D95\u6FE4\u6D85\u6DF9\u6E15\u6E0A\u6DB5\u6DC7\u6DE6\u6DB8\u6DC6\u6DEC\u6DDE\u6DCC\u6DE8\u6DD2\u6DC5\u6DFA\u6DD9\u6DE4\u6DD5\u6DEA\u6DEE\u6E2D\u6E6E\u6E2E\u6E19\u6E72\u6E5F\u6E3E\u6E23\u6E6B\u6E2B\u6E76\u6E4D\u6E1F\u6E43\u6E3A\u6E4E\u6E24\u6EFF\u6E1D\u6E38\u6E82\u6EAA\u6E98\u6EC9\u6EB7\u6ED3\u6EBD\u6EAF\u6EC4\u6EB2\u6ED4\u6ED5\u6E8F\u6EA5\u6EC2\u6E9F\u6F41\u6F11\u704C\u6EEC\u6EF8\u6EFE\u6F3F\u6EF2\u6F31\u6EEF\u6F32\u6ECC"], + ["dfa1", "\u6F3E\u6F13\u6EF7\u6F86\u6F7A\u6F78\u6F81\u6F80\u6F6F\u6F5B\u6FF3\u6F6D\u6F82\u6F7C\u6F58\u6F8E\u6F91\u6FC2\u6F66\u6FB3\u6FA3\u6FA1\u6FA4\u6FB9\u6FC6\u6FAA\u6FDF\u6FD5\u6FEC\u6FD4\u6FD8\u6FF1\u6FEE\u6FDB\u7009\u700B\u6FFA\u7011\u7001\u700F\u6FFE\u701B\u701A\u6F74\u701D\u7018\u701F\u7030\u703E\u7032\u7051\u7063\u7099\u7092\u70AF\u70F1\u70AC\u70B8\u70B3\u70AE\u70DF\u70CB\u70DD\u70D9\u7109\u70FD\u711C\u7119\u7165\u7155\u7188\u7166\u7162\u714C\u7156\u716C\u718F\u71FB\u7184\u7195\u71A8\u71AC\u71D7\u71B9\u71BE\u71D2\u71C9\u71D4\u71CE\u71E0\u71EC\u71E7\u71F5\u71FC"], + ["e0a1", "\u71F9\u71FF\u720D\u7210\u721B\u7228\u722D\u722C\u7230\u7232\u723B\u723C\u723F\u7240\u7246\u724B\u7258\u7274\u727E\u7282\u7281\u7287\u7292\u7296\u72A2\u72A7\u72B9\u72B2\u72C3\u72C6\u72C4\u72CE\u72D2\u72E2\u72E0\u72E1\u72F9\u72F7\u500F\u7317\u730A\u731C\u7316\u731D\u7334\u732F\u7329\u7325\u733E\u734E\u734F\u9ED8\u7357\u736A\u7368\u7370\u7378\u7375\u737B\u737A\u73C8\u73B3\u73CE\u73BB\u73C0\u73E5\u73EE\u73DE\u74A2\u7405\u746F\u7425\u73F8\u7432\u743A\u7455\u743F\u745F\u7459\u7441\u745C\u7469\u7470\u7463\u746A\u7476\u747E\u748B\u749E\u74A7\u74CA\u74CF\u74D4\u73F1"], + ["e1a1", "\u74E0\u74E3\u74E7\u74E9\u74EE\u74F2\u74F0\u74F1\u74F8\u74F7\u7504\u7503\u7505\u750C\u750E\u750D\u7515\u7513\u751E\u7526\u752C\u753C\u7544\u754D\u754A\u7549\u755B\u7546\u755A\u7569\u7564\u7567\u756B\u756D\u7578\u7576\u7586\u7587\u7574\u758A\u7589\u7582\u7594\u759A\u759D\u75A5\u75A3\u75C2\u75B3\u75C3\u75B5\u75BD\u75B8\u75BC\u75B1\u75CD\u75CA\u75D2\u75D9\u75E3\u75DE\u75FE\u75FF\u75FC\u7601\u75F0\u75FA\u75F2\u75F3\u760B\u760D\u7609\u761F\u7627\u7620\u7621\u7622\u7624\u7634\u7630\u763B\u7647\u7648\u7646\u765C\u7658\u7661\u7662\u7668\u7669\u766A\u7667\u766C\u7670"], + ["e2a1", "\u7672\u7676\u7678\u767C\u7680\u7683\u7688\u768B\u768E\u7696\u7693\u7699\u769A\u76B0\u76B4\u76B8\u76B9\u76BA\u76C2\u76CD\u76D6\u76D2\u76DE\u76E1\u76E5\u76E7\u76EA\u862F\u76FB\u7708\u7707\u7704\u7729\u7724\u771E\u7725\u7726\u771B\u7737\u7738\u7747\u775A\u7768\u776B\u775B\u7765\u777F\u777E\u7779\u778E\u778B\u7791\u77A0\u779E\u77B0\u77B6\u77B9\u77BF\u77BC\u77BD\u77BB\u77C7\u77CD\u77D7\u77DA\u77DC\u77E3\u77EE\u77FC\u780C\u7812\u7926\u7820\u792A\u7845\u788E\u7874\u7886\u787C\u789A\u788C\u78A3\u78B5\u78AA\u78AF\u78D1\u78C6\u78CB\u78D4\u78BE\u78BC\u78C5\u78CA\u78EC"], + ["e3a1", "\u78E7\u78DA\u78FD\u78F4\u7907\u7912\u7911\u7919\u792C\u792B\u7940\u7960\u7957\u795F\u795A\u7955\u7953\u797A\u797F\u798A\u799D\u79A7\u9F4B\u79AA\u79AE\u79B3\u79B9\u79BA\u79C9\u79D5\u79E7\u79EC\u79E1\u79E3\u7A08\u7A0D\u7A18\u7A19\u7A20\u7A1F\u7980\u7A31\u7A3B\u7A3E\u7A37\u7A43\u7A57\u7A49\u7A61\u7A62\u7A69\u9F9D\u7A70\u7A79\u7A7D\u7A88\u7A97\u7A95\u7A98\u7A96\u7AA9\u7AC8\u7AB0\u7AB6\u7AC5\u7AC4\u7ABF\u9083\u7AC7\u7ACA\u7ACD\u7ACF\u7AD5\u7AD3\u7AD9\u7ADA\u7ADD\u7AE1\u7AE2\u7AE6\u7AED\u7AF0\u7B02\u7B0F\u7B0A\u7B06\u7B33\u7B18\u7B19\u7B1E\u7B35\u7B28\u7B36\u7B50"], + ["e4a1", "\u7B7A\u7B04\u7B4D\u7B0B\u7B4C\u7B45\u7B75\u7B65\u7B74\u7B67\u7B70\u7B71\u7B6C\u7B6E\u7B9D\u7B98\u7B9F\u7B8D\u7B9C\u7B9A\u7B8B\u7B92\u7B8F\u7B5D\u7B99\u7BCB\u7BC1\u7BCC\u7BCF\u7BB4\u7BC6\u7BDD\u7BE9\u7C11\u7C14\u7BE6\u7BE5\u7C60\u7C00\u7C07\u7C13\u7BF3\u7BF7\u7C17\u7C0D\u7BF6\u7C23\u7C27\u7C2A\u7C1F\u7C37\u7C2B\u7C3D\u7C4C\u7C43\u7C54\u7C4F\u7C40\u7C50\u7C58\u7C5F\u7C64\u7C56\u7C65\u7C6C\u7C75\u7C83\u7C90\u7CA4\u7CAD\u7CA2\u7CAB\u7CA1\u7CA8\u7CB3\u7CB2\u7CB1\u7CAE\u7CB9\u7CBD\u7CC0\u7CC5\u7CC2\u7CD8\u7CD2\u7CDC\u7CE2\u9B3B\u7CEF\u7CF2\u7CF4\u7CF6\u7CFA\u7D06"], + ["e5a1", "\u7D02\u7D1C\u7D15\u7D0A\u7D45\u7D4B\u7D2E\u7D32\u7D3F\u7D35\u7D46\u7D73\u7D56\u7D4E\u7D72\u7D68\u7D6E\u7D4F\u7D63\u7D93\u7D89\u7D5B\u7D8F\u7D7D\u7D9B\u7DBA\u7DAE\u7DA3\u7DB5\u7DC7\u7DBD\u7DAB\u7E3D\u7DA2\u7DAF\u7DDC\u7DB8\u7D9F\u7DB0\u7DD8\u7DDD\u7DE4\u7DDE\u7DFB\u7DF2\u7DE1\u7E05\u7E0A\u7E23\u7E21\u7E12\u7E31\u7E1F\u7E09\u7E0B\u7E22\u7E46\u7E66\u7E3B\u7E35\u7E39\u7E43\u7E37\u7E32\u7E3A\u7E67\u7E5D\u7E56\u7E5E\u7E59\u7E5A\u7E79\u7E6A\u7E69\u7E7C\u7E7B\u7E83\u7DD5\u7E7D\u8FAE\u7E7F\u7E88\u7E89\u7E8C\u7E92\u7E90\u7E93\u7E94\u7E96\u7E8E\u7E9B\u7E9C\u7F38\u7F3A"], + ["e6a1", "\u7F45\u7F4C\u7F4D\u7F4E\u7F50\u7F51\u7F55\u7F54\u7F58\u7F5F\u7F60\u7F68\u7F69\u7F67\u7F78\u7F82\u7F86\u7F83\u7F88\u7F87\u7F8C\u7F94\u7F9E\u7F9D\u7F9A\u7FA3\u7FAF\u7FB2\u7FB9\u7FAE\u7FB6\u7FB8\u8B71\u7FC5\u7FC6\u7FCA\u7FD5\u7FD4\u7FE1\u7FE6\u7FE9\u7FF3\u7FF9\u98DC\u8006\u8004\u800B\u8012\u8018\u8019\u801C\u8021\u8028\u803F\u803B\u804A\u8046\u8052\u8058\u805A\u805F\u8062\u8068\u8073\u8072\u8070\u8076\u8079\u807D\u807F\u8084\u8086\u8085\u809B\u8093\u809A\u80AD\u5190\u80AC\u80DB\u80E5\u80D9\u80DD\u80C4\u80DA\u80D6\u8109\u80EF\u80F1\u811B\u8129\u8123\u812F\u814B"], + ["e7a1", "\u968B\u8146\u813E\u8153\u8151\u80FC\u8171\u816E\u8165\u8166\u8174\u8183\u8188\u818A\u8180\u8182\u81A0\u8195\u81A4\u81A3\u815F\u8193\u81A9\u81B0\u81B5\u81BE\u81B8\u81BD\u81C0\u81C2\u81BA\u81C9\u81CD\u81D1\u81D9\u81D8\u81C8\u81DA\u81DF\u81E0\u81E7\u81FA\u81FB\u81FE\u8201\u8202\u8205\u8207\u820A\u820D\u8210\u8216\u8229\u822B\u8238\u8233\u8240\u8259\u8258\u825D\u825A\u825F\u8264\u8262\u8268\u826A\u826B\u822E\u8271\u8277\u8278\u827E\u828D\u8292\u82AB\u829F\u82BB\u82AC\u82E1\u82E3\u82DF\u82D2\u82F4\u82F3\u82FA\u8393\u8303\u82FB\u82F9\u82DE\u8306\u82DC\u8309\u82D9"], + ["e8a1", "\u8335\u8334\u8316\u8332\u8331\u8340\u8339\u8350\u8345\u832F\u832B\u8317\u8318\u8385\u839A\u83AA\u839F\u83A2\u8396\u8323\u838E\u8387\u838A\u837C\u83B5\u8373\u8375\u83A0\u8389\u83A8\u83F4\u8413\u83EB\u83CE\u83FD\u8403\u83D8\u840B\u83C1\u83F7\u8407\u83E0\u83F2\u840D\u8422\u8420\u83BD\u8438\u8506\u83FB\u846D\u842A\u843C\u855A\u8484\u8477\u846B\u84AD\u846E\u8482\u8469\u8446\u842C\u846F\u8479\u8435\u84CA\u8462\u84B9\u84BF\u849F\u84D9\u84CD\u84BB\u84DA\u84D0\u84C1\u84C6\u84D6\u84A1\u8521\u84FF\u84F4\u8517\u8518\u852C\u851F\u8515\u8514\u84FC\u8540\u8563\u8558\u8548"], + ["e9a1", "\u8541\u8602\u854B\u8555\u8580\u85A4\u8588\u8591\u858A\u85A8\u856D\u8594\u859B\u85EA\u8587\u859C\u8577\u857E\u8590\u85C9\u85BA\u85CF\u85B9\u85D0\u85D5\u85DD\u85E5\u85DC\u85F9\u860A\u8613\u860B\u85FE\u85FA\u8606\u8622\u861A\u8630\u863F\u864D\u4E55\u8654\u865F\u8667\u8671\u8693\u86A3\u86A9\u86AA\u868B\u868C\u86B6\u86AF\u86C4\u86C6\u86B0\u86C9\u8823\u86AB\u86D4\u86DE\u86E9\u86EC\u86DF\u86DB\u86EF\u8712\u8706\u8708\u8700\u8703\u86FB\u8711\u8709\u870D\u86F9\u870A\u8734\u873F\u8737\u873B\u8725\u8729\u871A\u8760\u875F\u8778\u874C\u874E\u8774\u8757\u8768\u876E\u8759"], + ["eaa1", "\u8753\u8763\u876A\u8805\u87A2\u879F\u8782\u87AF\u87CB\u87BD\u87C0\u87D0\u96D6\u87AB\u87C4\u87B3\u87C7\u87C6\u87BB\u87EF\u87F2\u87E0\u880F\u880D\u87FE\u87F6\u87F7\u880E\u87D2\u8811\u8816\u8815\u8822\u8821\u8831\u8836\u8839\u8827\u883B\u8844\u8842\u8852\u8859\u885E\u8862\u886B\u8881\u887E\u889E\u8875\u887D\u88B5\u8872\u8882\u8897\u8892\u88AE\u8899\u88A2\u888D\u88A4\u88B0\u88BF\u88B1\u88C3\u88C4\u88D4\u88D8\u88D9\u88DD\u88F9\u8902\u88FC\u88F4\u88E8\u88F2\u8904\u890C\u890A\u8913\u8943\u891E\u8925\u892A\u892B\u8941\u8944\u893B\u8936\u8938\u894C\u891D\u8960\u895E"], + ["eba1", "\u8966\u8964\u896D\u896A\u896F\u8974\u8977\u897E\u8983\u8988\u898A\u8993\u8998\u89A1\u89A9\u89A6\u89AC\u89AF\u89B2\u89BA\u89BD\u89BF\u89C0\u89DA\u89DC\u89DD\u89E7\u89F4\u89F8\u8A03\u8A16\u8A10\u8A0C\u8A1B\u8A1D\u8A25\u8A36\u8A41\u8A5B\u8A52\u8A46\u8A48\u8A7C\u8A6D\u8A6C\u8A62\u8A85\u8A82\u8A84\u8AA8\u8AA1\u8A91\u8AA5\u8AA6\u8A9A\u8AA3\u8AC4\u8ACD\u8AC2\u8ADA\u8AEB\u8AF3\u8AE7\u8AE4\u8AF1\u8B14\u8AE0\u8AE2\u8AF7\u8ADE\u8ADB\u8B0C\u8B07\u8B1A\u8AE1\u8B16\u8B10\u8B17\u8B20\u8B33\u97AB\u8B26\u8B2B\u8B3E\u8B28\u8B41\u8B4C\u8B4F\u8B4E\u8B49\u8B56\u8B5B\u8B5A\u8B6B"], + ["eca1", "\u8B5F\u8B6C\u8B6F\u8B74\u8B7D\u8B80\u8B8C\u8B8E\u8B92\u8B93\u8B96\u8B99\u8B9A\u8C3A\u8C41\u8C3F\u8C48\u8C4C\u8C4E\u8C50\u8C55\u8C62\u8C6C\u8C78\u8C7A\u8C82\u8C89\u8C85\u8C8A\u8C8D\u8C8E\u8C94\u8C7C\u8C98\u621D\u8CAD\u8CAA\u8CBD\u8CB2\u8CB3\u8CAE\u8CB6\u8CC8\u8CC1\u8CE4\u8CE3\u8CDA\u8CFD\u8CFA\u8CFB\u8D04\u8D05\u8D0A\u8D07\u8D0F\u8D0D\u8D10\u9F4E\u8D13\u8CCD\u8D14\u8D16\u8D67\u8D6D\u8D71\u8D73\u8D81\u8D99\u8DC2\u8DBE\u8DBA\u8DCF\u8DDA\u8DD6\u8DCC\u8DDB\u8DCB\u8DEA\u8DEB\u8DDF\u8DE3\u8DFC\u8E08\u8E09\u8DFF\u8E1D\u8E1E\u8E10\u8E1F\u8E42\u8E35\u8E30\u8E34\u8E4A"], + ["eda1", "\u8E47\u8E49\u8E4C\u8E50\u8E48\u8E59\u8E64\u8E60\u8E2A\u8E63\u8E55\u8E76\u8E72\u8E7C\u8E81\u8E87\u8E85\u8E84\u8E8B\u8E8A\u8E93\u8E91\u8E94\u8E99\u8EAA\u8EA1\u8EAC\u8EB0\u8EC6\u8EB1\u8EBE\u8EC5\u8EC8\u8ECB\u8EDB\u8EE3\u8EFC\u8EFB\u8EEB\u8EFE\u8F0A\u8F05\u8F15\u8F12\u8F19\u8F13\u8F1C\u8F1F\u8F1B\u8F0C\u8F26\u8F33\u8F3B\u8F39\u8F45\u8F42\u8F3E\u8F4C\u8F49\u8F46\u8F4E\u8F57\u8F5C\u8F62\u8F63\u8F64\u8F9C\u8F9F\u8FA3\u8FAD\u8FAF\u8FB7\u8FDA\u8FE5\u8FE2\u8FEA\u8FEF\u9087\u8FF4\u9005\u8FF9\u8FFA\u9011\u9015\u9021\u900D\u901E\u9016\u900B\u9027\u9036\u9035\u9039\u8FF8"], + ["eea1", "\u904F\u9050\u9051\u9052\u900E\u9049\u903E\u9056\u9058\u905E\u9068\u906F\u9076\u96A8\u9072\u9082\u907D\u9081\u9080\u908A\u9089\u908F\u90A8\u90AF\u90B1\u90B5\u90E2\u90E4\u6248\u90DB\u9102\u9112\u9119\u9132\u9130\u914A\u9156\u9158\u9163\u9165\u9169\u9173\u9172\u918B\u9189\u9182\u91A2\u91AB\u91AF\u91AA\u91B5\u91B4\u91BA\u91C0\u91C1\u91C9\u91CB\u91D0\u91D6\u91DF\u91E1\u91DB\u91FC\u91F5\u91F6\u921E\u91FF\u9214\u922C\u9215\u9211\u925E\u9257\u9245\u9249\u9264\u9248\u9295\u923F\u924B\u9250\u929C\u9296\u9293\u929B\u925A\u92CF\u92B9\u92B7\u92E9\u930F\u92FA\u9344\u932E"], + ["efa1", "\u9319\u9322\u931A\u9323\u933A\u9335\u933B\u935C\u9360\u937C\u936E\u9356\u93B0\u93AC\u93AD\u9394\u93B9\u93D6\u93D7\u93E8\u93E5\u93D8\u93C3\u93DD\u93D0\u93C8\u93E4\u941A\u9414\u9413\u9403\u9407\u9410\u9436\u942B\u9435\u9421\u943A\u9441\u9452\u9444\u945B\u9460\u9462\u945E\u946A\u9229\u9470\u9475\u9477\u947D\u945A\u947C\u947E\u9481\u947F\u9582\u9587\u958A\u9594\u9596\u9598\u9599\u95A0\u95A8\u95A7\u95AD\u95BC\u95BB\u95B9\u95BE\u95CA\u6FF6\u95C3\u95CD\u95CC\u95D5\u95D4\u95D6\u95DC\u95E1\u95E5\u95E2\u9621\u9628\u962E\u962F\u9642\u964C\u964F\u964B\u9677\u965C\u965E"], + ["f0a1", "\u965D\u965F\u9666\u9672\u966C\u968D\u9698\u9695\u9697\u96AA\u96A7\u96B1\u96B2\u96B0\u96B4\u96B6\u96B8\u96B9\u96CE\u96CB\u96C9\u96CD\u894D\u96DC\u970D\u96D5\u96F9\u9704\u9706\u9708\u9713\u970E\u9711\u970F\u9716\u9719\u9724\u972A\u9730\u9739\u973D\u973E\u9744\u9746\u9748\u9742\u9749\u975C\u9760\u9764\u9766\u9768\u52D2\u976B\u9771\u9779\u9785\u977C\u9781\u977A\u9786\u978B\u978F\u9790\u979C\u97A8\u97A6\u97A3\u97B3\u97B4\u97C3\u97C6\u97C8\u97CB\u97DC\u97ED\u9F4F\u97F2\u7ADF\u97F6\u97F5\u980F\u980C\u9838\u9824\u9821\u9837\u983D\u9846\u984F\u984B\u986B\u986F\u9870"], + ["f1a1", "\u9871\u9874\u9873\u98AA\u98AF\u98B1\u98B6\u98C4\u98C3\u98C6\u98E9\u98EB\u9903\u9909\u9912\u9914\u9918\u9921\u991D\u991E\u9924\u9920\u992C\u992E\u993D\u993E\u9942\u9949\u9945\u9950\u994B\u9951\u9952\u994C\u9955\u9997\u9998\u99A5\u99AD\u99AE\u99BC\u99DF\u99DB\u99DD\u99D8\u99D1\u99ED\u99EE\u99F1\u99F2\u99FB\u99F8\u9A01\u9A0F\u9A05\u99E2\u9A19\u9A2B\u9A37\u9A45\u9A42\u9A40\u9A43\u9A3E\u9A55\u9A4D\u9A5B\u9A57\u9A5F\u9A62\u9A65\u9A64\u9A69\u9A6B\u9A6A\u9AAD\u9AB0\u9ABC\u9AC0\u9ACF\u9AD1\u9AD3\u9AD4\u9ADE\u9ADF\u9AE2\u9AE3\u9AE6\u9AEF\u9AEB\u9AEE\u9AF4\u9AF1\u9AF7"], + ["f2a1", "\u9AFB\u9B06\u9B18\u9B1A\u9B1F\u9B22\u9B23\u9B25\u9B27\u9B28\u9B29\u9B2A\u9B2E\u9B2F\u9B32\u9B44\u9B43\u9B4F\u9B4D\u9B4E\u9B51\u9B58\u9B74\u9B93\u9B83\u9B91\u9B96\u9B97\u9B9F\u9BA0\u9BA8\u9BB4\u9BC0\u9BCA\u9BB9\u9BC6\u9BCF\u9BD1\u9BD2\u9BE3\u9BE2\u9BE4\u9BD4\u9BE1\u9C3A\u9BF2\u9BF1\u9BF0\u9C15\u9C14\u9C09\u9C13\u9C0C\u9C06\u9C08\u9C12\u9C0A\u9C04\u9C2E\u9C1B\u9C25\u9C24\u9C21\u9C30\u9C47\u9C32\u9C46\u9C3E\u9C5A\u9C60\u9C67\u9C76\u9C78\u9CE7\u9CEC\u9CF0\u9D09\u9D08\u9CEB\u9D03\u9D06\u9D2A\u9D26\u9DAF\u9D23\u9D1F\u9D44\u9D15\u9D12\u9D41\u9D3F\u9D3E\u9D46\u9D48"], + ["f3a1", "\u9D5D\u9D5E\u9D64\u9D51\u9D50\u9D59\u9D72\u9D89\u9D87\u9DAB\u9D6F\u9D7A\u9D9A\u9DA4\u9DA9\u9DB2\u9DC4\u9DC1\u9DBB\u9DB8\u9DBA\u9DC6\u9DCF\u9DC2\u9DD9\u9DD3\u9DF8\u9DE6\u9DED\u9DEF\u9DFD\u9E1A\u9E1B\u9E1E\u9E75\u9E79\u9E7D\u9E81\u9E88\u9E8B\u9E8C\u9E92\u9E95\u9E91\u9E9D\u9EA5\u9EA9\u9EB8\u9EAA\u9EAD\u9761\u9ECC\u9ECE\u9ECF\u9ED0\u9ED4\u9EDC\u9EDE\u9EDD\u9EE0\u9EE5\u9EE8\u9EEF\u9EF4\u9EF6\u9EF7\u9EF9\u9EFB\u9EFC\u9EFD\u9F07\u9F08\u76B7\u9F15\u9F21\u9F2C\u9F3E\u9F4A\u9F52\u9F54\u9F63\u9F5F\u9F60\u9F61\u9F66\u9F67\u9F6C\u9F6A\u9F77\u9F72\u9F76\u9F95\u9F9C\u9FA0"], + ["f4a1", "\u582F\u69C7\u9059\u7464\u51DC\u7199"], + ["f9a1", "\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7"], + ["faa1", "\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1"], + ["fba1", "\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA"], + ["fca1", "\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"], + ["fcf1", "\u2170", 9, "\uFFE2\uFFE4\uFF07\uFF02"], + ["8fa2af", "\u02D8\u02C7\xB8\u02D9\u02DD\xAF\u02DB\u02DA\uFF5E\u0384\u0385"], + ["8fa2c2", "\xA1\xA6\xBF"], + ["8fa2eb", "\xBA\xAA\xA9\xAE\u2122\xA4\u2116"], + ["8fa6e1", "\u0386\u0388\u0389\u038A\u03AA"], + ["8fa6e7", "\u038C"], + ["8fa6e9", "\u038E\u03AB"], + ["8fa6ec", "\u038F"], + ["8fa6f1", "\u03AC\u03AD\u03AE\u03AF\u03CA\u0390\u03CC\u03C2\u03CD\u03CB\u03B0\u03CE"], + ["8fa7c2", "\u0402", 10, "\u040E\u040F"], + ["8fa7f2", "\u0452", 10, "\u045E\u045F"], + ["8fa9a1", "\xC6\u0110"], + ["8fa9a4", "\u0126"], + ["8fa9a6", "\u0132"], + ["8fa9a8", "\u0141\u013F"], + ["8fa9ab", "\u014A\xD8\u0152"], + ["8fa9af", "\u0166\xDE"], + ["8fa9c1", "\xE6\u0111\xF0\u0127\u0131\u0133\u0138\u0142\u0140\u0149\u014B\xF8\u0153\xDF\u0167\xFE"], + ["8faaa1", "\xC1\xC0\xC4\xC2\u0102\u01CD\u0100\u0104\xC5\xC3\u0106\u0108\u010C\xC7\u010A\u010E\xC9\xC8\xCB\xCA\u011A\u0116\u0112\u0118"], + ["8faaba", "\u011C\u011E\u0122\u0120\u0124\xCD\xCC\xCF\xCE\u01CF\u0130\u012A\u012E\u0128\u0134\u0136\u0139\u013D\u013B\u0143\u0147\u0145\xD1\xD3\xD2\xD6\xD4\u01D1\u0150\u014C\xD5\u0154\u0158\u0156\u015A\u015C\u0160\u015E\u0164\u0162\xDA\xD9\xDC\xDB\u016C\u01D3\u0170\u016A\u0172\u016E\u0168\u01D7\u01DB\u01D9\u01D5\u0174\xDD\u0178\u0176\u0179\u017D\u017B"], + ["8faba1", "\xE1\xE0\xE4\xE2\u0103\u01CE\u0101\u0105\xE5\xE3\u0107\u0109\u010D\xE7\u010B\u010F\xE9\xE8\xEB\xEA\u011B\u0117\u0113\u0119\u01F5\u011D\u011F"], + ["8fabbd", "\u0121\u0125\xED\xEC\xEF\xEE\u01D0"], + ["8fabc5", "\u012B\u012F\u0129\u0135\u0137\u013A\u013E\u013C\u0144\u0148\u0146\xF1\xF3\xF2\xF6\xF4\u01D2\u0151\u014D\xF5\u0155\u0159\u0157\u015B\u015D\u0161\u015F\u0165\u0163\xFA\xF9\xFC\xFB\u016D\u01D4\u0171\u016B\u0173\u016F\u0169\u01D8\u01DC\u01DA\u01D6\u0175\xFD\xFF\u0177\u017A\u017E\u017C"], + ["8fb0a1", "\u4E02\u4E04\u4E05\u4E0C\u4E12\u4E1F\u4E23\u4E24\u4E28\u4E2B\u4E2E\u4E2F\u4E30\u4E35\u4E40\u4E41\u4E44\u4E47\u4E51\u4E5A\u4E5C\u4E63\u4E68\u4E69\u4E74\u4E75\u4E79\u4E7F\u4E8D\u4E96\u4E97\u4E9D\u4EAF\u4EB9\u4EC3\u4ED0\u4EDA\u4EDB\u4EE0\u4EE1\u4EE2\u4EE8\u4EEF\u4EF1\u4EF3\u4EF5\u4EFD\u4EFE\u4EFF\u4F00\u4F02\u4F03\u4F08\u4F0B\u4F0C\u4F12\u4F15\u4F16\u4F17\u4F19\u4F2E\u4F31\u4F60\u4F33\u4F35\u4F37\u4F39\u4F3B\u4F3E\u4F40\u4F42\u4F48\u4F49\u4F4B\u4F4C\u4F52\u4F54\u4F56\u4F58\u4F5F\u4F63\u4F6A\u4F6C\u4F6E\u4F71\u4F77\u4F78\u4F79\u4F7A\u4F7D\u4F7E\u4F81\u4F82\u4F84"], + ["8fb1a1", "\u4F85\u4F89\u4F8A\u4F8C\u4F8E\u4F90\u4F92\u4F93\u4F94\u4F97\u4F99\u4F9A\u4F9E\u4F9F\u4FB2\u4FB7\u4FB9\u4FBB\u4FBC\u4FBD\u4FBE\u4FC0\u4FC1\u4FC5\u4FC6\u4FC8\u4FC9\u4FCB\u4FCC\u4FCD\u4FCF\u4FD2\u4FDC\u4FE0\u4FE2\u4FF0\u4FF2\u4FFC\u4FFD\u4FFF\u5000\u5001\u5004\u5007\u500A\u500C\u500E\u5010\u5013\u5017\u5018\u501B\u501C\u501D\u501E\u5022\u5027\u502E\u5030\u5032\u5033\u5035\u5040\u5041\u5042\u5045\u5046\u504A\u504C\u504E\u5051\u5052\u5053\u5057\u5059\u505F\u5060\u5062\u5063\u5066\u5067\u506A\u506D\u5070\u5071\u503B\u5081\u5083\u5084\u5086\u508A\u508E\u508F\u5090"], + ["8fb2a1", "\u5092\u5093\u5094\u5096\u509B\u509C\u509E", 4, "\u50AA\u50AF\u50B0\u50B9\u50BA\u50BD\u50C0\u50C3\u50C4\u50C7\u50CC\u50CE\u50D0\u50D3\u50D4\u50D8\u50DC\u50DD\u50DF\u50E2\u50E4\u50E6\u50E8\u50E9\u50EF\u50F1\u50F6\u50FA\u50FE\u5103\u5106\u5107\u5108\u510B\u510C\u510D\u510E\u50F2\u5110\u5117\u5119\u511B\u511C\u511D\u511E\u5123\u5127\u5128\u512C\u512D\u512F\u5131\u5133\u5134\u5135\u5138\u5139\u5142\u514A\u514F\u5153\u5155\u5157\u5158\u515F\u5164\u5166\u517E\u5183\u5184\u518B\u518E\u5198\u519D\u51A1\u51A3\u51AD\u51B8\u51BA\u51BC\u51BE\u51BF\u51C2"], + ["8fb3a1", "\u51C8\u51CF\u51D1\u51D2\u51D3\u51D5\u51D8\u51DE\u51E2\u51E5\u51EE\u51F2\u51F3\u51F4\u51F7\u5201\u5202\u5205\u5212\u5213\u5215\u5216\u5218\u5222\u5228\u5231\u5232\u5235\u523C\u5245\u5249\u5255\u5257\u5258\u525A\u525C\u525F\u5260\u5261\u5266\u526E\u5277\u5278\u5279\u5280\u5282\u5285\u528A\u528C\u5293\u5295\u5296\u5297\u5298\u529A\u529C\u52A4\u52A5\u52A6\u52A7\u52AF\u52B0\u52B6\u52B7\u52B8\u52BA\u52BB\u52BD\u52C0\u52C4\u52C6\u52C8\u52CC\u52CF\u52D1\u52D4\u52D6\u52DB\u52DC\u52E1\u52E5\u52E8\u52E9\u52EA\u52EC\u52F0\u52F1\u52F4\u52F6\u52F7\u5300\u5303\u530A\u530B"], + ["8fb4a1", "\u530C\u5311\u5313\u5318\u531B\u531C\u531E\u531F\u5325\u5327\u5328\u5329\u532B\u532C\u532D\u5330\u5332\u5335\u533C\u533D\u533E\u5342\u534C\u534B\u5359\u535B\u5361\u5363\u5365\u536C\u536D\u5372\u5379\u537E\u5383\u5387\u5388\u538E\u5393\u5394\u5399\u539D\u53A1\u53A4\u53AA\u53AB\u53AF\u53B2\u53B4\u53B5\u53B7\u53B8\u53BA\u53BD\u53C0\u53C5\u53CF\u53D2\u53D3\u53D5\u53DA\u53DD\u53DE\u53E0\u53E6\u53E7\u53F5\u5402\u5413\u541A\u5421\u5427\u5428\u542A\u542F\u5431\u5434\u5435\u5443\u5444\u5447\u544D\u544F\u545E\u5462\u5464\u5466\u5467\u5469\u546B\u546D\u546E\u5474\u547F"], + ["8fb5a1", "\u5481\u5483\u5485\u5488\u5489\u548D\u5491\u5495\u5496\u549C\u549F\u54A1\u54A6\u54A7\u54A9\u54AA\u54AD\u54AE\u54B1\u54B7\u54B9\u54BA\u54BB\u54BF\u54C6\u54CA\u54CD\u54CE\u54E0\u54EA\u54EC\u54EF\u54F6\u54FC\u54FE\u54FF\u5500\u5501\u5505\u5508\u5509\u550C\u550D\u550E\u5515\u552A\u552B\u5532\u5535\u5536\u553B\u553C\u553D\u5541\u5547\u5549\u554A\u554D\u5550\u5551\u5558\u555A\u555B\u555E\u5560\u5561\u5564\u5566\u557F\u5581\u5582\u5586\u5588\u558E\u558F\u5591\u5592\u5593\u5594\u5597\u55A3\u55A4\u55AD\u55B2\u55BF\u55C1\u55C3\u55C6\u55C9\u55CB\u55CC\u55CE\u55D1\u55D2"], + ["8fb6a1", "\u55D3\u55D7\u55D8\u55DB\u55DE\u55E2\u55E9\u55F6\u55FF\u5605\u5608\u560A\u560D", 5, "\u5619\u562C\u5630\u5633\u5635\u5637\u5639\u563B\u563C\u563D\u563F\u5640\u5641\u5643\u5644\u5646\u5649\u564B\u564D\u564F\u5654\u565E\u5660\u5661\u5662\u5663\u5666\u5669\u566D\u566F\u5671\u5672\u5675\u5684\u5685\u5688\u568B\u568C\u5695\u5699\u569A\u569D\u569E\u569F\u56A6\u56A7\u56A8\u56A9\u56AB\u56AC\u56AD\u56B1\u56B3\u56B7\u56BE\u56C5\u56C9\u56CA\u56CB\u56CF\u56D0\u56CC\u56CD\u56D9\u56DC\u56DD\u56DF\u56E1\u56E4", 4, "\u56F1\u56EB\u56ED"], + ["8fb7a1", "\u56F6\u56F7\u5701\u5702\u5707\u570A\u570C\u5711\u5715\u571A\u571B\u571D\u5720\u5722\u5723\u5724\u5725\u5729\u572A\u572C\u572E\u572F\u5733\u5734\u573D\u573E\u573F\u5745\u5746\u574C\u574D\u5752\u5762\u5765\u5767\u5768\u576B\u576D", 4, "\u5773\u5774\u5775\u5777\u5779\u577A\u577B\u577C\u577E\u5781\u5783\u578C\u5794\u5797\u5799\u579A\u579C\u579D\u579E\u579F\u57A1\u5795\u57A7\u57A8\u57A9\u57AC\u57B8\u57BD\u57C7\u57C8\u57CC\u57CF\u57D5\u57DD\u57DE\u57E4\u57E6\u57E7\u57E9\u57ED\u57F0\u57F5\u57F6\u57F8\u57FD\u57FE\u57FF\u5803\u5804\u5808\u5809\u57E1"], + ["8fb8a1", "\u580C\u580D\u581B\u581E\u581F\u5820\u5826\u5827\u582D\u5832\u5839\u583F\u5849\u584C\u584D\u584F\u5850\u5855\u585F\u5861\u5864\u5867\u5868\u5878\u587C\u587F\u5880\u5881\u5887\u5888\u5889\u588A\u588C\u588D\u588F\u5890\u5894\u5896\u589D\u58A0\u58A1\u58A2\u58A6\u58A9\u58B1\u58B2\u58C4\u58BC\u58C2\u58C8\u58CD\u58CE\u58D0\u58D2\u58D4\u58D6\u58DA\u58DD\u58E1\u58E2\u58E9\u58F3\u5905\u5906\u590B\u590C\u5912\u5913\u5914\u8641\u591D\u5921\u5923\u5924\u5928\u592F\u5930\u5933\u5935\u5936\u593F\u5943\u5946\u5952\u5953\u5959\u595B\u595D\u595E\u595F\u5961\u5963\u596B\u596D"], + ["8fb9a1", "\u596F\u5972\u5975\u5976\u5979\u597B\u597C\u598B\u598C\u598E\u5992\u5995\u5997\u599F\u59A4\u59A7\u59AD\u59AE\u59AF\u59B0\u59B3\u59B7\u59BA\u59BC\u59C1\u59C3\u59C4\u59C8\u59CA\u59CD\u59D2\u59DD\u59DE\u59DF\u59E3\u59E4\u59E7\u59EE\u59EF\u59F1\u59F2\u59F4\u59F7\u5A00\u5A04\u5A0C\u5A0D\u5A0E\u5A12\u5A13\u5A1E\u5A23\u5A24\u5A27\u5A28\u5A2A\u5A2D\u5A30\u5A44\u5A45\u5A47\u5A48\u5A4C\u5A50\u5A55\u5A5E\u5A63\u5A65\u5A67\u5A6D\u5A77\u5A7A\u5A7B\u5A7E\u5A8B\u5A90\u5A93\u5A96\u5A99\u5A9C\u5A9E\u5A9F\u5AA0\u5AA2\u5AA7\u5AAC\u5AB1\u5AB2\u5AB3\u5AB5\u5AB8\u5ABA\u5ABB\u5ABF"], + ["8fbaa1", "\u5AC4\u5AC6\u5AC8\u5ACF\u5ADA\u5ADC\u5AE0\u5AE5\u5AEA\u5AEE\u5AF5\u5AF6\u5AFD\u5B00\u5B01\u5B08\u5B17\u5B34\u5B19\u5B1B\u5B1D\u5B21\u5B25\u5B2D\u5B38\u5B41\u5B4B\u5B4C\u5B52\u5B56\u5B5E\u5B68\u5B6E\u5B6F\u5B7C\u5B7D\u5B7E\u5B7F\u5B81\u5B84\u5B86\u5B8A\u5B8E\u5B90\u5B91\u5B93\u5B94\u5B96\u5BA8\u5BA9\u5BAC\u5BAD\u5BAF\u5BB1\u5BB2\u5BB7\u5BBA\u5BBC\u5BC0\u5BC1\u5BCD\u5BCF\u5BD6", 4, "\u5BE0\u5BEF\u5BF1\u5BF4\u5BFD\u5C0C\u5C17\u5C1E\u5C1F\u5C23\u5C26\u5C29\u5C2B\u5C2C\u5C2E\u5C30\u5C32\u5C35\u5C36\u5C59\u5C5A\u5C5C\u5C62\u5C63\u5C67\u5C68\u5C69"], + ["8fbba1", "\u5C6D\u5C70\u5C74\u5C75\u5C7A\u5C7B\u5C7C\u5C7D\u5C87\u5C88\u5C8A\u5C8F\u5C92\u5C9D\u5C9F\u5CA0\u5CA2\u5CA3\u5CA6\u5CAA\u5CB2\u5CB4\u5CB5\u5CBA\u5CC9\u5CCB\u5CD2\u5CDD\u5CD7\u5CEE\u5CF1\u5CF2\u5CF4\u5D01\u5D06\u5D0D\u5D12\u5D2B\u5D23\u5D24\u5D26\u5D27\u5D31\u5D34\u5D39\u5D3D\u5D3F\u5D42\u5D43\u5D46\u5D48\u5D55\u5D51\u5D59\u5D4A\u5D5F\u5D60\u5D61\u5D62\u5D64\u5D6A\u5D6D\u5D70\u5D79\u5D7A\u5D7E\u5D7F\u5D81\u5D83\u5D88\u5D8A\u5D92\u5D93\u5D94\u5D95\u5D99\u5D9B\u5D9F\u5DA0\u5DA7\u5DAB\u5DB0\u5DB4\u5DB8\u5DB9\u5DC3\u5DC7\u5DCB\u5DD0\u5DCE\u5DD8\u5DD9\u5DE0\u5DE4"], + ["8fbca1", "\u5DE9\u5DF8\u5DF9\u5E00\u5E07\u5E0D\u5E12\u5E14\u5E15\u5E18\u5E1F\u5E20\u5E2E\u5E28\u5E32\u5E35\u5E3E\u5E4B\u5E50\u5E49\u5E51\u5E56\u5E58\u5E5B\u5E5C\u5E5E\u5E68\u5E6A", 4, "\u5E70\u5E80\u5E8B\u5E8E\u5EA2\u5EA4\u5EA5\u5EA8\u5EAA\u5EAC\u5EB1\u5EB3\u5EBD\u5EBE\u5EBF\u5EC6\u5ECC\u5ECB\u5ECE\u5ED1\u5ED2\u5ED4\u5ED5\u5EDC\u5EDE\u5EE5\u5EEB\u5F02\u5F06\u5F07\u5F08\u5F0E\u5F19\u5F1C\u5F1D\u5F21\u5F22\u5F23\u5F24\u5F28\u5F2B\u5F2C\u5F2E\u5F30\u5F34\u5F36\u5F3B\u5F3D\u5F3F\u5F40\u5F44\u5F45\u5F47\u5F4D\u5F50\u5F54\u5F58\u5F5B\u5F60\u5F63\u5F64\u5F67"], + ["8fbda1", "\u5F6F\u5F72\u5F74\u5F75\u5F78\u5F7A\u5F7D\u5F7E\u5F89\u5F8D\u5F8F\u5F96\u5F9C\u5F9D\u5FA2\u5FA7\u5FAB\u5FA4\u5FAC\u5FAF\u5FB0\u5FB1\u5FB8\u5FC4\u5FC7\u5FC8\u5FC9\u5FCB\u5FD0", 4, "\u5FDE\u5FE1\u5FE2\u5FE8\u5FE9\u5FEA\u5FEC\u5FED\u5FEE\u5FEF\u5FF2\u5FF3\u5FF6\u5FFA\u5FFC\u6007\u600A\u600D\u6013\u6014\u6017\u6018\u601A\u601F\u6024\u602D\u6033\u6035\u6040\u6047\u6048\u6049\u604C\u6051\u6054\u6056\u6057\u605D\u6061\u6067\u6071\u607E\u607F\u6082\u6086\u6088\u608A\u608E\u6091\u6093\u6095\u6098\u609D\u609E\u60A2\u60A4\u60A5\u60A8\u60B0\u60B1\u60B7"], + ["8fbea1", "\u60BB\u60BE\u60C2\u60C4\u60C8\u60C9\u60CA\u60CB\u60CE\u60CF\u60D4\u60D5\u60D9\u60DB\u60DD\u60DE\u60E2\u60E5\u60F2\u60F5\u60F8\u60FC\u60FD\u6102\u6107\u610A\u610C\u6110", 4, "\u6116\u6117\u6119\u611C\u611E\u6122\u612A\u612B\u6130\u6131\u6135\u6136\u6137\u6139\u6141\u6145\u6146\u6149\u615E\u6160\u616C\u6172\u6178\u617B\u617C\u617F\u6180\u6181\u6183\u6184\u618B\u618D\u6192\u6193\u6197\u6198\u619C\u619D\u619F\u61A0\u61A5\u61A8\u61AA\u61AD\u61B8\u61B9\u61BC\u61C0\u61C1\u61C2\u61CE\u61CF\u61D5\u61DC\u61DD\u61DE\u61DF\u61E1\u61E2\u61E7\u61E9\u61E5"], + ["8fbfa1", "\u61EC\u61ED\u61EF\u6201\u6203\u6204\u6207\u6213\u6215\u621C\u6220\u6222\u6223\u6227\u6229\u622B\u6239\u623D\u6242\u6243\u6244\u6246\u624C\u6250\u6251\u6252\u6254\u6256\u625A\u625C\u6264\u626D\u626F\u6273\u627A\u627D\u628D\u628E\u628F\u6290\u62A6\u62A8\u62B3\u62B6\u62B7\u62BA\u62BE\u62BF\u62C4\u62CE\u62D5\u62D6\u62DA\u62EA\u62F2\u62F4\u62FC\u62FD\u6303\u6304\u630A\u630B\u630D\u6310\u6313\u6316\u6318\u6329\u632A\u632D\u6335\u6336\u6339\u633C\u6341\u6342\u6343\u6344\u6346\u634A\u634B\u634E\u6352\u6353\u6354\u6358\u635B\u6365\u6366\u636C\u636D\u6371\u6374\u6375"], + ["8fc0a1", "\u6378\u637C\u637D\u637F\u6382\u6384\u6387\u638A\u6390\u6394\u6395\u6399\u639A\u639E\u63A4\u63A6\u63AD\u63AE\u63AF\u63BD\u63C1\u63C5\u63C8\u63CE\u63D1\u63D3\u63D4\u63D5\u63DC\u63E0\u63E5\u63EA\u63EC\u63F2\u63F3\u63F5\u63F8\u63F9\u6409\u640A\u6410\u6412\u6414\u6418\u641E\u6420\u6422\u6424\u6425\u6429\u642A\u642F\u6430\u6435\u643D\u643F\u644B\u644F\u6451\u6452\u6453\u6454\u645A\u645B\u645C\u645D\u645F\u6460\u6461\u6463\u646D\u6473\u6474\u647B\u647D\u6485\u6487\u648F\u6490\u6491\u6498\u6499\u649B\u649D\u649F\u64A1\u64A3\u64A6\u64A8\u64AC\u64B3\u64BD\u64BE\u64BF"], + ["8fc1a1", "\u64C4\u64C9\u64CA\u64CB\u64CC\u64CE\u64D0\u64D1\u64D5\u64D7\u64E4\u64E5\u64E9\u64EA\u64ED\u64F0\u64F5\u64F7\u64FB\u64FF\u6501\u6504\u6508\u6509\u650A\u650F\u6513\u6514\u6516\u6519\u651B\u651E\u651F\u6522\u6526\u6529\u652E\u6531\u653A\u653C\u653D\u6543\u6547\u6549\u6550\u6552\u6554\u655F\u6560\u6567\u656B\u657A\u657D\u6581\u6585\u658A\u6592\u6595\u6598\u659D\u65A0\u65A3\u65A6\u65AE\u65B2\u65B3\u65B4\u65BF\u65C2\u65C8\u65C9\u65CE\u65D0\u65D4\u65D6\u65D8\u65DF\u65F0\u65F2\u65F4\u65F5\u65F9\u65FE\u65FF\u6600\u6604\u6608\u6609\u660D\u6611\u6612\u6615\u6616\u661D"], + ["8fc2a1", "\u661E\u6621\u6622\u6623\u6624\u6626\u6629\u662A\u662B\u662C\u662E\u6630\u6631\u6633\u6639\u6637\u6640\u6645\u6646\u664A\u664C\u6651\u664E\u6657\u6658\u6659\u665B\u665C\u6660\u6661\u66FB\u666A\u666B\u666C\u667E\u6673\u6675\u667F\u6677\u6678\u6679\u667B\u6680\u667C\u668B\u668C\u668D\u6690\u6692\u6699\u669A\u669B\u669C\u669F\u66A0\u66A4\u66AD\u66B1\u66B2\u66B5\u66BB\u66BF\u66C0\u66C2\u66C3\u66C8\u66CC\u66CE\u66CF\u66D4\u66DB\u66DF\u66E8\u66EB\u66EC\u66EE\u66FA\u6705\u6707\u670E\u6713\u6719\u671C\u6720\u6722\u6733\u673E\u6745\u6747\u6748\u674C\u6754\u6755\u675D"], + ["8fc3a1", "\u6766\u676C\u676E\u6774\u6776\u677B\u6781\u6784\u678E\u678F\u6791\u6793\u6796\u6798\u6799\u679B\u67B0\u67B1\u67B2\u67B5\u67BB\u67BC\u67BD\u67F9\u67C0\u67C2\u67C3\u67C5\u67C8\u67C9\u67D2\u67D7\u67D9\u67DC\u67E1\u67E6\u67F0\u67F2\u67F6\u67F7\u6852\u6814\u6819\u681D\u681F\u6828\u6827\u682C\u682D\u682F\u6830\u6831\u6833\u683B\u683F\u6844\u6845\u684A\u684C\u6855\u6857\u6858\u685B\u686B\u686E", 4, "\u6875\u6879\u687A\u687B\u687C\u6882\u6884\u6886\u6888\u6896\u6898\u689A\u689C\u68A1\u68A3\u68A5\u68A9\u68AA\u68AE\u68B2\u68BB\u68C5\u68C8\u68CC\u68CF"], + ["8fc4a1", "\u68D0\u68D1\u68D3\u68D6\u68D9\u68DC\u68DD\u68E5\u68E8\u68EA\u68EB\u68EC\u68ED\u68F0\u68F1\u68F5\u68F6\u68FB\u68FC\u68FD\u6906\u6909\u690A\u6910\u6911\u6913\u6916\u6917\u6931\u6933\u6935\u6938\u693B\u6942\u6945\u6949\u694E\u6957\u695B\u6963\u6964\u6965\u6966\u6968\u6969\u696C\u6970\u6971\u6972\u697A\u697B\u697F\u6980\u698D\u6992\u6996\u6998\u69A1\u69A5\u69A6\u69A8\u69AB\u69AD\u69AF\u69B7\u69B8\u69BA\u69BC\u69C5\u69C8\u69D1\u69D6\u69D7\u69E2\u69E5\u69EE\u69EF\u69F1\u69F3\u69F5\u69FE\u6A00\u6A01\u6A03\u6A0F\u6A11\u6A15\u6A1A\u6A1D\u6A20\u6A24\u6A28\u6A30\u6A32"], + ["8fc5a1", "\u6A34\u6A37\u6A3B\u6A3E\u6A3F\u6A45\u6A46\u6A49\u6A4A\u6A4E\u6A50\u6A51\u6A52\u6A55\u6A56\u6A5B\u6A64\u6A67\u6A6A\u6A71\u6A73\u6A7E\u6A81\u6A83\u6A86\u6A87\u6A89\u6A8B\u6A91\u6A9B\u6A9D\u6A9E\u6A9F\u6AA5\u6AAB\u6AAF\u6AB0\u6AB1\u6AB4\u6ABD\u6ABE\u6ABF\u6AC6\u6AC9\u6AC8\u6ACC\u6AD0\u6AD4\u6AD5\u6AD6\u6ADC\u6ADD\u6AE4\u6AE7\u6AEC\u6AF0\u6AF1\u6AF2\u6AFC\u6AFD\u6B02\u6B03\u6B06\u6B07\u6B09\u6B0F\u6B10\u6B11\u6B17\u6B1B\u6B1E\u6B24\u6B28\u6B2B\u6B2C\u6B2F\u6B35\u6B36\u6B3B\u6B3F\u6B46\u6B4A\u6B4D\u6B52\u6B56\u6B58\u6B5D\u6B60\u6B67\u6B6B\u6B6E\u6B70\u6B75\u6B7D"], + ["8fc6a1", "\u6B7E\u6B82\u6B85\u6B97\u6B9B\u6B9F\u6BA0\u6BA2\u6BA3\u6BA8\u6BA9\u6BAC\u6BAD\u6BAE\u6BB0\u6BB8\u6BB9\u6BBD\u6BBE\u6BC3\u6BC4\u6BC9\u6BCC\u6BD6\u6BDA\u6BE1\u6BE3\u6BE6\u6BE7\u6BEE\u6BF1\u6BF7\u6BF9\u6BFF\u6C02\u6C04\u6C05\u6C09\u6C0D\u6C0E\u6C10\u6C12\u6C19\u6C1F\u6C26\u6C27\u6C28\u6C2C\u6C2E\u6C33\u6C35\u6C36\u6C3A\u6C3B\u6C3F\u6C4A\u6C4B\u6C4D\u6C4F\u6C52\u6C54\u6C59\u6C5B\u6C5C\u6C6B\u6C6D\u6C6F\u6C74\u6C76\u6C78\u6C79\u6C7B\u6C85\u6C86\u6C87\u6C89\u6C94\u6C95\u6C97\u6C98\u6C9C\u6C9F\u6CB0\u6CB2\u6CB4\u6CC2\u6CC6\u6CCD\u6CCF\u6CD0\u6CD1\u6CD2\u6CD4\u6CD6"], + ["8fc7a1", "\u6CDA\u6CDC\u6CE0\u6CE7\u6CE9\u6CEB\u6CEC\u6CEE\u6CF2\u6CF4\u6D04\u6D07\u6D0A\u6D0E\u6D0F\u6D11\u6D13\u6D1A\u6D26\u6D27\u6D28\u6C67\u6D2E\u6D2F\u6D31\u6D39\u6D3C\u6D3F\u6D57\u6D5E\u6D5F\u6D61\u6D65\u6D67\u6D6F\u6D70\u6D7C\u6D82\u6D87\u6D91\u6D92\u6D94\u6D96\u6D97\u6D98\u6DAA\u6DAC\u6DB4\u6DB7\u6DB9\u6DBD\u6DBF\u6DC4\u6DC8\u6DCA\u6DCE\u6DCF\u6DD6\u6DDB\u6DDD\u6DDF\u6DE0\u6DE2\u6DE5\u6DE9\u6DEF\u6DF0\u6DF4\u6DF6\u6DFC\u6E00\u6E04\u6E1E\u6E22\u6E27\u6E32\u6E36\u6E39\u6E3B\u6E3C\u6E44\u6E45\u6E48\u6E49\u6E4B\u6E4F\u6E51\u6E52\u6E53\u6E54\u6E57\u6E5C\u6E5D\u6E5E"], + ["8fc8a1", "\u6E62\u6E63\u6E68\u6E73\u6E7B\u6E7D\u6E8D\u6E93\u6E99\u6EA0\u6EA7\u6EAD\u6EAE\u6EB1\u6EB3\u6EBB\u6EBF\u6EC0\u6EC1\u6EC3\u6EC7\u6EC8\u6ECA\u6ECD\u6ECE\u6ECF\u6EEB\u6EED\u6EEE\u6EF9\u6EFB\u6EFD\u6F04\u6F08\u6F0A\u6F0C\u6F0D\u6F16\u6F18\u6F1A\u6F1B\u6F26\u6F29\u6F2A\u6F2F\u6F30\u6F33\u6F36\u6F3B\u6F3C\u6F2D\u6F4F\u6F51\u6F52\u6F53\u6F57\u6F59\u6F5A\u6F5D\u6F5E\u6F61\u6F62\u6F68\u6F6C\u6F7D\u6F7E\u6F83\u6F87\u6F88\u6F8B\u6F8C\u6F8D\u6F90\u6F92\u6F93\u6F94\u6F96\u6F9A\u6F9F\u6FA0\u6FA5\u6FA6\u6FA7\u6FA8\u6FAE\u6FAF\u6FB0\u6FB5\u6FB6\u6FBC\u6FC5\u6FC7\u6FC8\u6FCA"], + ["8fc9a1", "\u6FDA\u6FDE\u6FE8\u6FE9\u6FF0\u6FF5\u6FF9\u6FFC\u6FFD\u7000\u7005\u7006\u7007\u700D\u7017\u7020\u7023\u702F\u7034\u7037\u7039\u703C\u7043\u7044\u7048\u7049\u704A\u704B\u7054\u7055\u705D\u705E\u704E\u7064\u7065\u706C\u706E\u7075\u7076\u707E\u7081\u7085\u7086\u7094", 4, "\u709B\u70A4\u70AB\u70B0\u70B1\u70B4\u70B7\u70CA\u70D1\u70D3\u70D4\u70D5\u70D6\u70D8\u70DC\u70E4\u70FA\u7103", 4, "\u710B\u710C\u710F\u711E\u7120\u712B\u712D\u712F\u7130\u7131\u7138\u7141\u7145\u7146\u7147\u714A\u714B\u7150\u7152\u7157\u715A\u715C\u715E\u7160"], + ["8fcaa1", "\u7168\u7179\u7180\u7185\u7187\u718C\u7192\u719A\u719B\u71A0\u71A2\u71AF\u71B0\u71B2\u71B3\u71BA\u71BF\u71C0\u71C1\u71C4\u71CB\u71CC\u71D3\u71D6\u71D9\u71DA\u71DC\u71F8\u71FE\u7200\u7207\u7208\u7209\u7213\u7217\u721A\u721D\u721F\u7224\u722B\u722F\u7234\u7238\u7239\u7241\u7242\u7243\u7245\u724E\u724F\u7250\u7253\u7255\u7256\u725A\u725C\u725E\u7260\u7263\u7268\u726B\u726E\u726F\u7271\u7277\u7278\u727B\u727C\u727F\u7284\u7289\u728D\u728E\u7293\u729B\u72A8\u72AD\u72AE\u72B1\u72B4\u72BE\u72C1\u72C7\u72C9\u72CC\u72D5\u72D6\u72D8\u72DF\u72E5\u72F3\u72F4\u72FA\u72FB"], + ["8fcba1", "\u72FE\u7302\u7304\u7305\u7307\u730B\u730D\u7312\u7313\u7318\u7319\u731E\u7322\u7324\u7327\u7328\u732C\u7331\u7332\u7335\u733A\u733B\u733D\u7343\u734D\u7350\u7352\u7356\u7358\u735D\u735E\u735F\u7360\u7366\u7367\u7369\u736B\u736C\u736E\u736F\u7371\u7377\u7379\u737C\u7380\u7381\u7383\u7385\u7386\u738E\u7390\u7393\u7395\u7397\u7398\u739C\u739E\u739F\u73A0\u73A2\u73A5\u73A6\u73AA\u73AB\u73AD\u73B5\u73B7\u73B9\u73BC\u73BD\u73BF\u73C5\u73C6\u73C9\u73CB\u73CC\u73CF\u73D2\u73D3\u73D6\u73D9\u73DD\u73E1\u73E3\u73E6\u73E7\u73E9\u73F4\u73F5\u73F7\u73F9\u73FA\u73FB\u73FD"], + ["8fcca1", "\u73FF\u7400\u7401\u7404\u7407\u740A\u7411\u741A\u741B\u7424\u7426\u7428", 9, "\u7439\u7440\u7443\u7444\u7446\u7447\u744B\u744D\u7451\u7452\u7457\u745D\u7462\u7466\u7467\u7468\u746B\u746D\u746E\u7471\u7472\u7480\u7481\u7485\u7486\u7487\u7489\u748F\u7490\u7491\u7492\u7498\u7499\u749A\u749C\u749F\u74A0\u74A1\u74A3\u74A6\u74A8\u74A9\u74AA\u74AB\u74AE\u74AF\u74B1\u74B2\u74B5\u74B9\u74BB\u74BF\u74C8\u74C9\u74CC\u74D0\u74D3\u74D8\u74DA\u74DB\u74DE\u74DF\u74E4\u74E8\u74EA\u74EB\u74EF\u74F4\u74FA\u74FB\u74FC\u74FF\u7506"], + ["8fcda1", "\u7512\u7516\u7517\u7520\u7521\u7524\u7527\u7529\u752A\u752F\u7536\u7539\u753D\u753E\u753F\u7540\u7543\u7547\u7548\u754E\u7550\u7552\u7557\u755E\u755F\u7561\u756F\u7571\u7579", 5, "\u7581\u7585\u7590\u7592\u7593\u7595\u7599\u759C\u75A2\u75A4\u75B4\u75BA\u75BF\u75C0\u75C1\u75C4\u75C6\u75CC\u75CE\u75CF\u75D7\u75DC\u75DF\u75E0\u75E1\u75E4\u75E7\u75EC\u75EE\u75EF\u75F1\u75F9\u7600\u7602\u7603\u7604\u7607\u7608\u760A\u760C\u760F\u7612\u7613\u7615\u7616\u7619\u761B\u761C\u761D\u761E\u7623\u7625\u7626\u7629\u762D\u7632\u7633\u7635\u7638\u7639"], + ["8fcea1", "\u763A\u763C\u764A\u7640\u7641\u7643\u7644\u7645\u7649\u764B\u7655\u7659\u765F\u7664\u7665\u766D\u766E\u766F\u7671\u7674\u7681\u7685\u768C\u768D\u7695\u769B\u769C\u769D\u769F\u76A0\u76A2", 6, "\u76AA\u76AD\u76BD\u76C1\u76C5\u76C9\u76CB\u76CC\u76CE\u76D4\u76D9\u76E0\u76E6\u76E8\u76EC\u76F0\u76F1\u76F6\u76F9\u76FC\u7700\u7706\u770A\u770E\u7712\u7714\u7715\u7717\u7719\u771A\u771C\u7722\u7728\u772D\u772E\u772F\u7734\u7735\u7736\u7739\u773D\u773E\u7742\u7745\u7746\u774A\u774D\u774E\u774F\u7752\u7756\u7757\u775C\u775E\u775F\u7760\u7762"], + ["8fcfa1", "\u7764\u7767\u776A\u776C\u7770\u7772\u7773\u7774\u777A\u777D\u7780\u7784\u778C\u778D\u7794\u7795\u7796\u779A\u779F\u77A2\u77A7\u77AA\u77AE\u77AF\u77B1\u77B5\u77BE\u77C3\u77C9\u77D1\u77D2\u77D5\u77D9\u77DE\u77DF\u77E0\u77E4\u77E6\u77EA\u77EC\u77F0\u77F1\u77F4\u77F8\u77FB\u7805\u7806\u7809\u780D\u780E\u7811\u781D\u7821\u7822\u7823\u782D\u782E\u7830\u7835\u7837\u7843\u7844\u7847\u7848\u784C\u784E\u7852\u785C\u785E\u7860\u7861\u7863\u7864\u7868\u786A\u786E\u787A\u787E\u788A\u788F\u7894\u7898\u78A1\u789D\u789E\u789F\u78A4\u78A8\u78AC\u78AD\u78B0\u78B1\u78B2\u78B3"], + ["8fd0a1", "\u78BB\u78BD\u78BF\u78C7\u78C8\u78C9\u78CC\u78CE\u78D2\u78D3\u78D5\u78D6\u78E4\u78DB\u78DF\u78E0\u78E1\u78E6\u78EA\u78F2\u78F3\u7900\u78F6\u78F7\u78FA\u78FB\u78FF\u7906\u790C\u7910\u791A\u791C\u791E\u791F\u7920\u7925\u7927\u7929\u792D\u7931\u7934\u7935\u793B\u793D\u793F\u7944\u7945\u7946\u794A\u794B\u794F\u7951\u7954\u7958\u795B\u795C\u7967\u7969\u796B\u7972\u7979\u797B\u797C\u797E\u798B\u798C\u7991\u7993\u7994\u7995\u7996\u7998\u799B\u799C\u79A1\u79A8\u79A9\u79AB\u79AF\u79B1\u79B4\u79B8\u79BB\u79C2\u79C4\u79C7\u79C8\u79CA\u79CF\u79D4\u79D6\u79DA\u79DD\u79DE"], + ["8fd1a1", "\u79E0\u79E2\u79E5\u79EA\u79EB\u79ED\u79F1\u79F8\u79FC\u7A02\u7A03\u7A07\u7A09\u7A0A\u7A0C\u7A11\u7A15\u7A1B\u7A1E\u7A21\u7A27\u7A2B\u7A2D\u7A2F\u7A30\u7A34\u7A35\u7A38\u7A39\u7A3A\u7A44\u7A45\u7A47\u7A48\u7A4C\u7A55\u7A56\u7A59\u7A5C\u7A5D\u7A5F\u7A60\u7A65\u7A67\u7A6A\u7A6D\u7A75\u7A78\u7A7E\u7A80\u7A82\u7A85\u7A86\u7A8A\u7A8B\u7A90\u7A91\u7A94\u7A9E\u7AA0\u7AA3\u7AAC\u7AB3\u7AB5\u7AB9\u7ABB\u7ABC\u7AC6\u7AC9\u7ACC\u7ACE\u7AD1\u7ADB\u7AE8\u7AE9\u7AEB\u7AEC\u7AF1\u7AF4\u7AFB\u7AFD\u7AFE\u7B07\u7B14\u7B1F\u7B23\u7B27\u7B29\u7B2A\u7B2B\u7B2D\u7B2E\u7B2F\u7B30"], + ["8fd2a1", "\u7B31\u7B34\u7B3D\u7B3F\u7B40\u7B41\u7B47\u7B4E\u7B55\u7B60\u7B64\u7B66\u7B69\u7B6A\u7B6D\u7B6F\u7B72\u7B73\u7B77\u7B84\u7B89\u7B8E\u7B90\u7B91\u7B96\u7B9B\u7B9E\u7BA0\u7BA5\u7BAC\u7BAF\u7BB0\u7BB2\u7BB5\u7BB6\u7BBA\u7BBB\u7BBC\u7BBD\u7BC2\u7BC5\u7BC8\u7BCA\u7BD4\u7BD6\u7BD7\u7BD9\u7BDA\u7BDB\u7BE8\u7BEA\u7BF2\u7BF4\u7BF5\u7BF8\u7BF9\u7BFA\u7BFC\u7BFE\u7C01\u7C02\u7C03\u7C04\u7C06\u7C09\u7C0B\u7C0C\u7C0E\u7C0F\u7C19\u7C1B\u7C20\u7C25\u7C26\u7C28\u7C2C\u7C31\u7C33\u7C34\u7C36\u7C39\u7C3A\u7C46\u7C4A\u7C55\u7C51\u7C52\u7C53\u7C59", 5], + ["8fd3a1", "\u7C61\u7C63\u7C67\u7C69\u7C6D\u7C6E\u7C70\u7C72\u7C79\u7C7C\u7C7D\u7C86\u7C87\u7C8F\u7C94\u7C9E\u7CA0\u7CA6\u7CB0\u7CB6\u7CB7\u7CBA\u7CBB\u7CBC\u7CBF\u7CC4\u7CC7\u7CC8\u7CC9\u7CCD\u7CCF\u7CD3\u7CD4\u7CD5\u7CD7\u7CD9\u7CDA\u7CDD\u7CE6\u7CE9\u7CEB\u7CF5\u7D03\u7D07\u7D08\u7D09\u7D0F\u7D11\u7D12\u7D13\u7D16\u7D1D\u7D1E\u7D23\u7D26\u7D2A\u7D2D\u7D31\u7D3C\u7D3D\u7D3E\u7D40\u7D41\u7D47\u7D48\u7D4D\u7D51\u7D53\u7D57\u7D59\u7D5A\u7D5C\u7D5D\u7D65\u7D67\u7D6A\u7D70\u7D78\u7D7A\u7D7B\u7D7F\u7D81\u7D82\u7D83\u7D85\u7D86\u7D88\u7D8B\u7D8C\u7D8D\u7D91\u7D96\u7D97\u7D9D"], + ["8fd4a1", "\u7D9E\u7DA6\u7DA7\u7DAA\u7DB3\u7DB6\u7DB7\u7DB9\u7DC2", 4, "\u7DCC\u7DCD\u7DCE\u7DD7\u7DD9\u7E00\u7DE2\u7DE5\u7DE6\u7DEA\u7DEB\u7DED\u7DF1\u7DF5\u7DF6\u7DF9\u7DFA\u7E08\u7E10\u7E11\u7E15\u7E17\u7E1C\u7E1D\u7E20\u7E27\u7E28\u7E2C\u7E2D\u7E2F\u7E33\u7E36\u7E3F\u7E44\u7E45\u7E47\u7E4E\u7E50\u7E52\u7E58\u7E5F\u7E61\u7E62\u7E65\u7E6B\u7E6E\u7E6F\u7E73\u7E78\u7E7E\u7E81\u7E86\u7E87\u7E8A\u7E8D\u7E91\u7E95\u7E98\u7E9A\u7E9D\u7E9E\u7F3C\u7F3B\u7F3D\u7F3E\u7F3F\u7F43\u7F44\u7F47\u7F4F\u7F52\u7F53\u7F5B\u7F5C\u7F5D\u7F61\u7F63\u7F64\u7F65\u7F66\u7F6D"], + ["8fd5a1", "\u7F71\u7F7D\u7F7E\u7F7F\u7F80\u7F8B\u7F8D\u7F8F\u7F90\u7F91\u7F96\u7F97\u7F9C\u7FA1\u7FA2\u7FA6\u7FAA\u7FAD\u7FB4\u7FBC\u7FBF\u7FC0\u7FC3\u7FC8\u7FCE\u7FCF\u7FDB\u7FDF\u7FE3\u7FE5\u7FE8\u7FEC\u7FEE\u7FEF\u7FF2\u7FFA\u7FFD\u7FFE\u7FFF\u8007\u8008\u800A\u800D\u800E\u800F\u8011\u8013\u8014\u8016\u801D\u801E\u801F\u8020\u8024\u8026\u802C\u802E\u8030\u8034\u8035\u8037\u8039\u803A\u803C\u803E\u8040\u8044\u8060\u8064\u8066\u806D\u8071\u8075\u8081\u8088\u808E\u809C\u809E\u80A6\u80A7\u80AB\u80B8\u80B9\u80C8\u80CD\u80CF\u80D2\u80D4\u80D5\u80D7\u80D8\u80E0\u80ED\u80EE"], + ["8fd6a1", "\u80F0\u80F2\u80F3\u80F6\u80F9\u80FA\u80FE\u8103\u810B\u8116\u8117\u8118\u811C\u811E\u8120\u8124\u8127\u812C\u8130\u8135\u813A\u813C\u8145\u8147\u814A\u814C\u8152\u8157\u8160\u8161\u8167\u8168\u8169\u816D\u816F\u8177\u8181\u8190\u8184\u8185\u8186\u818B\u818E\u8196\u8198\u819B\u819E\u81A2\u81AE\u81B2\u81B4\u81BB\u81CB\u81C3\u81C5\u81CA\u81CE\u81CF\u81D5\u81D7\u81DB\u81DD\u81DE\u81E1\u81E4\u81EB\u81EC\u81F0\u81F1\u81F2\u81F5\u81F6\u81F8\u81F9\u81FD\u81FF\u8200\u8203\u820F\u8213\u8214\u8219\u821A\u821D\u8221\u8222\u8228\u8232\u8234\u823A\u8243\u8244\u8245\u8246"], + ["8fd7a1", "\u824B\u824E\u824F\u8251\u8256\u825C\u8260\u8263\u8267\u826D\u8274\u827B\u827D\u827F\u8280\u8281\u8283\u8284\u8287\u8289\u828A\u828E\u8291\u8294\u8296\u8298\u829A\u829B\u82A0\u82A1\u82A3\u82A4\u82A7\u82A8\u82A9\u82AA\u82AE\u82B0\u82B2\u82B4\u82B7\u82BA\u82BC\u82BE\u82BF\u82C6\u82D0\u82D5\u82DA\u82E0\u82E2\u82E4\u82E8\u82EA\u82ED\u82EF\u82F6\u82F7\u82FD\u82FE\u8300\u8301\u8307\u8308\u830A\u830B\u8354\u831B\u831D\u831E\u831F\u8321\u8322\u832C\u832D\u832E\u8330\u8333\u8337\u833A\u833C\u833D\u8342\u8343\u8344\u8347\u834D\u834E\u8351\u8355\u8356\u8357\u8370\u8378"], + ["8fd8a1", "\u837D\u837F\u8380\u8382\u8384\u8386\u838D\u8392\u8394\u8395\u8398\u8399\u839B\u839C\u839D\u83A6\u83A7\u83A9\u83AC\u83BE\u83BF\u83C0\u83C7\u83C9\u83CF\u83D0\u83D1\u83D4\u83DD\u8353\u83E8\u83EA\u83F6\u83F8\u83F9\u83FC\u8401\u8406\u840A\u840F\u8411\u8415\u8419\u83AD\u842F\u8439\u8445\u8447\u8448\u844A\u844D\u844F\u8451\u8452\u8456\u8458\u8459\u845A\u845C\u8460\u8464\u8465\u8467\u846A\u8470\u8473\u8474\u8476\u8478\u847C\u847D\u8481\u8485\u8492\u8493\u8495\u849E\u84A6\u84A8\u84A9\u84AA\u84AF\u84B1\u84B4\u84BA\u84BD\u84BE\u84C0\u84C2\u84C7\u84C8\u84CC\u84CF\u84D3"], + ["8fd9a1", "\u84DC\u84E7\u84EA\u84EF\u84F0\u84F1\u84F2\u84F7\u8532\u84FA\u84FB\u84FD\u8502\u8503\u8507\u850C\u850E\u8510\u851C\u851E\u8522\u8523\u8524\u8525\u8527\u852A\u852B\u852F\u8533\u8534\u8536\u853F\u8546\u854F", 4, "\u8556\u8559\u855C", 6, "\u8564\u856B\u856F\u8579\u857A\u857B\u857D\u857F\u8581\u8585\u8586\u8589\u858B\u858C\u858F\u8593\u8598\u859D\u859F\u85A0\u85A2\u85A5\u85A7\u85B4\u85B6\u85B7\u85B8\u85BC\u85BD\u85BE\u85BF\u85C2\u85C7\u85CA\u85CB\u85CE\u85AD\u85D8\u85DA\u85DF\u85E0\u85E6\u85E8\u85ED\u85F3\u85F6\u85FC"], + ["8fdaa1", "\u85FF\u8600\u8604\u8605\u860D\u860E\u8610\u8611\u8612\u8618\u8619\u861B\u861E\u8621\u8627\u8629\u8636\u8638\u863A\u863C\u863D\u8640\u8642\u8646\u8652\u8653\u8656\u8657\u8658\u8659\u865D\u8660", 4, "\u8669\u866C\u866F\u8675\u8676\u8677\u867A\u868D\u8691\u8696\u8698\u869A\u869C\u86A1\u86A6\u86A7\u86A8\u86AD\u86B1\u86B3\u86B4\u86B5\u86B7\u86B8\u86B9\u86BF\u86C0\u86C1\u86C3\u86C5\u86D1\u86D2\u86D5\u86D7\u86DA\u86DC\u86E0\u86E3\u86E5\u86E7\u8688\u86FA\u86FC\u86FD\u8704\u8705\u8707\u870B\u870E\u870F\u8710\u8713\u8714\u8719\u871E\u871F\u8721\u8723"], + ["8fdba1", "\u8728\u872E\u872F\u8731\u8732\u8739\u873A\u873C\u873D\u873E\u8740\u8743\u8745\u874D\u8758\u875D\u8761\u8764\u8765\u876F\u8771\u8772\u877B\u8783", 6, "\u878B\u878C\u8790\u8793\u8795\u8797\u8798\u8799\u879E\u87A0\u87A3\u87A7\u87AC\u87AD\u87AE\u87B1\u87B5\u87BE\u87BF\u87C1\u87C8\u87C9\u87CA\u87CE\u87D5\u87D6\u87D9\u87DA\u87DC\u87DF\u87E2\u87E3\u87E4\u87EA\u87EB\u87ED\u87F1\u87F3\u87F8\u87FA\u87FF\u8801\u8803\u8806\u8809\u880A\u880B\u8810\u8819\u8812\u8813\u8814\u8818\u881A\u881B\u881C\u881E\u881F\u8828\u882D\u882E\u8830\u8832\u8835"], + ["8fdca1", "\u883A\u883C\u8841\u8843\u8845\u8848\u8849\u884A\u884B\u884E\u8851\u8855\u8856\u8858\u885A\u885C\u885F\u8860\u8864\u8869\u8871\u8879\u887B\u8880\u8898\u889A\u889B\u889C\u889F\u88A0\u88A8\u88AA\u88BA\u88BD\u88BE\u88C0\u88CA", 4, "\u88D1\u88D2\u88D3\u88DB\u88DE\u88E7\u88EF\u88F0\u88F1\u88F5\u88F7\u8901\u8906\u890D\u890E\u890F\u8915\u8916\u8918\u8919\u891A\u891C\u8920\u8926\u8927\u8928\u8930\u8931\u8932\u8935\u8939\u893A\u893E\u8940\u8942\u8945\u8946\u8949\u894F\u8952\u8957\u895A\u895B\u895C\u8961\u8962\u8963\u896B\u896E\u8970\u8973\u8975\u897A"], + ["8fdda1", "\u897B\u897C\u897D\u8989\u898D\u8990\u8994\u8995\u899B\u899C\u899F\u89A0\u89A5\u89B0\u89B4\u89B5\u89B6\u89B7\u89BC\u89D4", 4, "\u89E5\u89E9\u89EB\u89ED\u89F1\u89F3\u89F6\u89F9\u89FD\u89FF\u8A04\u8A05\u8A07\u8A0F\u8A11\u8A12\u8A14\u8A15\u8A1E\u8A20\u8A22\u8A24\u8A26\u8A2B\u8A2C\u8A2F\u8A35\u8A37\u8A3D\u8A3E\u8A40\u8A43\u8A45\u8A47\u8A49\u8A4D\u8A4E\u8A53\u8A56\u8A57\u8A58\u8A5C\u8A5D\u8A61\u8A65\u8A67\u8A75\u8A76\u8A77\u8A79\u8A7A\u8A7B\u8A7E\u8A7F\u8A80\u8A83\u8A86\u8A8B\u8A8F\u8A90\u8A92\u8A96\u8A97\u8A99\u8A9F\u8AA7\u8AA9\u8AAE\u8AAF\u8AB3"], + ["8fdea1", "\u8AB6\u8AB7\u8ABB\u8ABE\u8AC3\u8AC6\u8AC8\u8AC9\u8ACA\u8AD1\u8AD3\u8AD4\u8AD5\u8AD7\u8ADD\u8ADF\u8AEC\u8AF0\u8AF4\u8AF5\u8AF6\u8AFC\u8AFF\u8B05\u8B06\u8B0B\u8B11\u8B1C\u8B1E\u8B1F\u8B0A\u8B2D\u8B30\u8B37\u8B3C\u8B42", 4, "\u8B48\u8B52\u8B53\u8B54\u8B59\u8B4D\u8B5E\u8B63\u8B6D\u8B76\u8B78\u8B79\u8B7C\u8B7E\u8B81\u8B84\u8B85\u8B8B\u8B8D\u8B8F\u8B94\u8B95\u8B9C\u8B9E\u8B9F\u8C38\u8C39\u8C3D\u8C3E\u8C45\u8C47\u8C49\u8C4B\u8C4F\u8C51\u8C53\u8C54\u8C57\u8C58\u8C5B\u8C5D\u8C59\u8C63\u8C64\u8C66\u8C68\u8C69\u8C6D\u8C73\u8C75\u8C76\u8C7B\u8C7E\u8C86"], + ["8fdfa1", "\u8C87\u8C8B\u8C90\u8C92\u8C93\u8C99\u8C9B\u8C9C\u8CA4\u8CB9\u8CBA\u8CC5\u8CC6\u8CC9\u8CCB\u8CCF\u8CD6\u8CD5\u8CD9\u8CDD\u8CE1\u8CE8\u8CEC\u8CEF\u8CF0\u8CF2\u8CF5\u8CF7\u8CF8\u8CFE\u8CFF\u8D01\u8D03\u8D09\u8D12\u8D17\u8D1B\u8D65\u8D69\u8D6C\u8D6E\u8D7F\u8D82\u8D84\u8D88\u8D8D\u8D90\u8D91\u8D95\u8D9E\u8D9F\u8DA0\u8DA6\u8DAB\u8DAC\u8DAF\u8DB2\u8DB5\u8DB7\u8DB9\u8DBB\u8DC0\u8DC5\u8DC6\u8DC7\u8DC8\u8DCA\u8DCE\u8DD1\u8DD4\u8DD5\u8DD7\u8DD9\u8DE4\u8DE5\u8DE7\u8DEC\u8DF0\u8DBC\u8DF1\u8DF2\u8DF4\u8DFD\u8E01\u8E04\u8E05\u8E06\u8E0B\u8E11\u8E14\u8E16\u8E20\u8E21\u8E22"], + ["8fe0a1", "\u8E23\u8E26\u8E27\u8E31\u8E33\u8E36\u8E37\u8E38\u8E39\u8E3D\u8E40\u8E41\u8E4B\u8E4D\u8E4E\u8E4F\u8E54\u8E5B\u8E5C\u8E5D\u8E5E\u8E61\u8E62\u8E69\u8E6C\u8E6D\u8E6F\u8E70\u8E71\u8E79\u8E7A\u8E7B\u8E82\u8E83\u8E89\u8E90\u8E92\u8E95\u8E9A\u8E9B\u8E9D\u8E9E\u8EA2\u8EA7\u8EA9\u8EAD\u8EAE\u8EB3\u8EB5\u8EBA\u8EBB\u8EC0\u8EC1\u8EC3\u8EC4\u8EC7\u8ECF\u8ED1\u8ED4\u8EDC\u8EE8\u8EEE\u8EF0\u8EF1\u8EF7\u8EF9\u8EFA\u8EED\u8F00\u8F02\u8F07\u8F08\u8F0F\u8F10\u8F16\u8F17\u8F18\u8F1E\u8F20\u8F21\u8F23\u8F25\u8F27\u8F28\u8F2C\u8F2D\u8F2E\u8F34\u8F35\u8F36\u8F37\u8F3A\u8F40\u8F41"], + ["8fe1a1", "\u8F43\u8F47\u8F4F\u8F51", 4, "\u8F58\u8F5D\u8F5E\u8F65\u8F9D\u8FA0\u8FA1\u8FA4\u8FA5\u8FA6\u8FB5\u8FB6\u8FB8\u8FBE\u8FC0\u8FC1\u8FC6\u8FCA\u8FCB\u8FCD\u8FD0\u8FD2\u8FD3\u8FD5\u8FE0\u8FE3\u8FE4\u8FE8\u8FEE\u8FF1\u8FF5\u8FF6\u8FFB\u8FFE\u9002\u9004\u9008\u900C\u9018\u901B\u9028\u9029\u902F\u902A\u902C\u902D\u9033\u9034\u9037\u903F\u9043\u9044\u904C\u905B\u905D\u9062\u9066\u9067\u906C\u9070\u9074\u9079\u9085\u9088\u908B\u908C\u908E\u9090\u9095\u9097\u9098\u9099\u909B\u90A0\u90A1\u90A2\u90A5\u90B0\u90B2\u90B3\u90B4\u90B6\u90BD\u90CC\u90BE\u90C3"], + ["8fe2a1", "\u90C4\u90C5\u90C7\u90C8\u90D5\u90D7\u90D8\u90D9\u90DC\u90DD\u90DF\u90E5\u90D2\u90F6\u90EB\u90EF\u90F0\u90F4\u90FE\u90FF\u9100\u9104\u9105\u9106\u9108\u910D\u9110\u9114\u9116\u9117\u9118\u911A\u911C\u911E\u9120\u9125\u9122\u9123\u9127\u9129\u912E\u912F\u9131\u9134\u9136\u9137\u9139\u913A\u913C\u913D\u9143\u9147\u9148\u914F\u9153\u9157\u9159\u915A\u915B\u9161\u9164\u9167\u916D\u9174\u9179\u917A\u917B\u9181\u9183\u9185\u9186\u918A\u918E\u9191\u9193\u9194\u9195\u9198\u919E\u91A1\u91A6\u91A8\u91AC\u91AD\u91AE\u91B0\u91B1\u91B2\u91B3\u91B6\u91BB\u91BC\u91BD\u91BF"], + ["8fe3a1", "\u91C2\u91C3\u91C5\u91D3\u91D4\u91D7\u91D9\u91DA\u91DE\u91E4\u91E5\u91E9\u91EA\u91EC", 5, "\u91F7\u91F9\u91FB\u91FD\u9200\u9201\u9204\u9205\u9206\u9207\u9209\u920A\u920C\u9210\u9212\u9213\u9216\u9218\u921C\u921D\u9223\u9224\u9225\u9226\u9228\u922E\u922F\u9230\u9233\u9235\u9236\u9238\u9239\u923A\u923C\u923E\u9240\u9242\u9243\u9246\u9247\u924A\u924D\u924E\u924F\u9251\u9258\u9259\u925C\u925D\u9260\u9261\u9265\u9267\u9268\u9269\u926E\u926F\u9270\u9275", 4, "\u927B\u927C\u927D\u927F\u9288\u9289\u928A\u928D\u928E\u9292\u9297"], + ["8fe4a1", "\u9299\u929F\u92A0\u92A4\u92A5\u92A7\u92A8\u92AB\u92AF\u92B2\u92B6\u92B8\u92BA\u92BB\u92BC\u92BD\u92BF", 4, "\u92C5\u92C6\u92C7\u92C8\u92CB\u92CC\u92CD\u92CE\u92D0\u92D3\u92D5\u92D7\u92D8\u92D9\u92DC\u92DD\u92DF\u92E0\u92E1\u92E3\u92E5\u92E7\u92E8\u92EC\u92EE\u92F0\u92F9\u92FB\u92FF\u9300\u9302\u9308\u930D\u9311\u9314\u9315\u931C\u931D\u931E\u931F\u9321\u9324\u9325\u9327\u9329\u932A\u9333\u9334\u9336\u9337\u9347\u9348\u9349\u9350\u9351\u9352\u9355\u9357\u9358\u935A\u935E\u9364\u9365\u9367\u9369\u936A\u936D\u936F\u9370\u9371\u9373\u9374\u9376"], + ["8fe5a1", "\u937A\u937D\u937F\u9380\u9381\u9382\u9388\u938A\u938B\u938D\u938F\u9392\u9395\u9398\u939B\u939E\u93A1\u93A3\u93A4\u93A6\u93A8\u93AB\u93B4\u93B5\u93B6\u93BA\u93A9\u93C1\u93C4\u93C5\u93C6\u93C7\u93C9", 4, "\u93D3\u93D9\u93DC\u93DE\u93DF\u93E2\u93E6\u93E7\u93F9\u93F7\u93F8\u93FA\u93FB\u93FD\u9401\u9402\u9404\u9408\u9409\u940D\u940E\u940F\u9415\u9416\u9417\u941F\u942E\u942F\u9431\u9432\u9433\u9434\u943B\u943F\u943D\u9443\u9445\u9448\u944A\u944C\u9455\u9459\u945C\u945F\u9461\u9463\u9468\u946B\u946D\u946E\u946F\u9471\u9472\u9484\u9483\u9578\u9579"], + ["8fe6a1", "\u957E\u9584\u9588\u958C\u958D\u958E\u959D\u959E\u959F\u95A1\u95A6\u95A9\u95AB\u95AC\u95B4\u95B6\u95BA\u95BD\u95BF\u95C6\u95C8\u95C9\u95CB\u95D0\u95D1\u95D2\u95D3\u95D9\u95DA\u95DD\u95DE\u95DF\u95E0\u95E4\u95E6\u961D\u961E\u9622\u9624\u9625\u9626\u962C\u9631\u9633\u9637\u9638\u9639\u963A\u963C\u963D\u9641\u9652\u9654\u9656\u9657\u9658\u9661\u966E\u9674\u967B\u967C\u967E\u967F\u9681\u9682\u9683\u9684\u9689\u9691\u9696\u969A\u969D\u969F\u96A4\u96A5\u96A6\u96A9\u96AE\u96AF\u96B3\u96BA\u96CA\u96D2\u5DB2\u96D8\u96DA\u96DD\u96DE\u96DF\u96E9\u96EF\u96F1\u96FA\u9702"], + ["8fe7a1", "\u9703\u9705\u9709\u971A\u971B\u971D\u9721\u9722\u9723\u9728\u9731\u9733\u9741\u9743\u974A\u974E\u974F\u9755\u9757\u9758\u975A\u975B\u9763\u9767\u976A\u976E\u9773\u9776\u9777\u9778\u977B\u977D\u977F\u9780\u9789\u9795\u9796\u9797\u9799\u979A\u979E\u979F\u97A2\u97AC\u97AE\u97B1\u97B2\u97B5\u97B6\u97B8\u97B9\u97BA\u97BC\u97BE\u97BF\u97C1\u97C4\u97C5\u97C7\u97C9\u97CA\u97CC\u97CD\u97CE\u97D0\u97D1\u97D4\u97D7\u97D8\u97D9\u97DD\u97DE\u97E0\u97DB\u97E1\u97E4\u97EF\u97F1\u97F4\u97F7\u97F8\u97FA\u9807\u980A\u9819\u980D\u980E\u9814\u9816\u981C\u981E\u9820\u9823\u9826"], + ["8fe8a1", "\u982B\u982E\u982F\u9830\u9832\u9833\u9835\u9825\u983E\u9844\u9847\u984A\u9851\u9852\u9853\u9856\u9857\u9859\u985A\u9862\u9863\u9865\u9866\u986A\u986C\u98AB\u98AD\u98AE\u98B0\u98B4\u98B7\u98B8\u98BA\u98BB\u98BF\u98C2\u98C5\u98C8\u98CC\u98E1\u98E3\u98E5\u98E6\u98E7\u98EA\u98F3\u98F6\u9902\u9907\u9908\u9911\u9915\u9916\u9917\u991A\u991B\u991C\u991F\u9922\u9926\u9927\u992B\u9931", 4, "\u9939\u993A\u993B\u993C\u9940\u9941\u9946\u9947\u9948\u994D\u994E\u9954\u9958\u9959\u995B\u995C\u995E\u995F\u9960\u999B\u999D\u999F\u99A6\u99B0\u99B1\u99B2\u99B5"], + ["8fe9a1", "\u99B9\u99BA\u99BD\u99BF\u99C3\u99C9\u99D3\u99D4\u99D9\u99DA\u99DC\u99DE\u99E7\u99EA\u99EB\u99EC\u99F0\u99F4\u99F5\u99F9\u99FD\u99FE\u9A02\u9A03\u9A04\u9A0B\u9A0C\u9A10\u9A11\u9A16\u9A1E\u9A20\u9A22\u9A23\u9A24\u9A27\u9A2D\u9A2E\u9A33\u9A35\u9A36\u9A38\u9A47\u9A41\u9A44\u9A4A\u9A4B\u9A4C\u9A4E\u9A51\u9A54\u9A56\u9A5D\u9AAA\u9AAC\u9AAE\u9AAF\u9AB2\u9AB4\u9AB5\u9AB6\u9AB9\u9ABB\u9ABE\u9ABF\u9AC1\u9AC3\u9AC6\u9AC8\u9ACE\u9AD0\u9AD2\u9AD5\u9AD6\u9AD7\u9ADB\u9ADC\u9AE0\u9AE4\u9AE5\u9AE7\u9AE9\u9AEC\u9AF2\u9AF3\u9AF5\u9AF9\u9AFA\u9AFD\u9AFF", 4], + ["8feaa1", "\u9B04\u9B05\u9B08\u9B09\u9B0B\u9B0C\u9B0D\u9B0E\u9B10\u9B12\u9B16\u9B19\u9B1B\u9B1C\u9B20\u9B26\u9B2B\u9B2D\u9B33\u9B34\u9B35\u9B37\u9B39\u9B3A\u9B3D\u9B48\u9B4B\u9B4C\u9B55\u9B56\u9B57\u9B5B\u9B5E\u9B61\u9B63\u9B65\u9B66\u9B68\u9B6A", 4, "\u9B73\u9B75\u9B77\u9B78\u9B79\u9B7F\u9B80\u9B84\u9B85\u9B86\u9B87\u9B89\u9B8A\u9B8B\u9B8D\u9B8F\u9B90\u9B94\u9B9A\u9B9D\u9B9E\u9BA6\u9BA7\u9BA9\u9BAC\u9BB0\u9BB1\u9BB2\u9BB7\u9BB8\u9BBB\u9BBC\u9BBE\u9BBF\u9BC1\u9BC7\u9BC8\u9BCE\u9BD0\u9BD7\u9BD8\u9BDD\u9BDF\u9BE5\u9BE7\u9BEA\u9BEB\u9BEF\u9BF3\u9BF7\u9BF8"], + ["8feba1", "\u9BF9\u9BFA\u9BFD\u9BFF\u9C00\u9C02\u9C0B\u9C0F\u9C11\u9C16\u9C18\u9C19\u9C1A\u9C1C\u9C1E\u9C22\u9C23\u9C26", 4, "\u9C31\u9C35\u9C36\u9C37\u9C3D\u9C41\u9C43\u9C44\u9C45\u9C49\u9C4A\u9C4E\u9C4F\u9C50\u9C53\u9C54\u9C56\u9C58\u9C5B\u9C5D\u9C5E\u9C5F\u9C63\u9C69\u9C6A\u9C5C\u9C6B\u9C68\u9C6E\u9C70\u9C72\u9C75\u9C77\u9C7B\u9CE6\u9CF2\u9CF7\u9CF9\u9D0B\u9D02\u9D11\u9D17\u9D18\u9D1C\u9D1D\u9D1E\u9D2F\u9D30\u9D32\u9D33\u9D34\u9D3A\u9D3C\u9D45\u9D3D\u9D42\u9D43\u9D47\u9D4A\u9D53\u9D54\u9D5F\u9D63\u9D62\u9D65\u9D69\u9D6A\u9D6B\u9D70\u9D76\u9D77\u9D7B"], + ["8feca1", "\u9D7C\u9D7E\u9D83\u9D84\u9D86\u9D8A\u9D8D\u9D8E\u9D92\u9D93\u9D95\u9D96\u9D97\u9D98\u9DA1\u9DAA\u9DAC\u9DAE\u9DB1\u9DB5\u9DB9\u9DBC\u9DBF\u9DC3\u9DC7\u9DC9\u9DCA\u9DD4\u9DD5\u9DD6\u9DD7\u9DDA\u9DDE\u9DDF\u9DE0\u9DE5\u9DE7\u9DE9\u9DEB\u9DEE\u9DF0\u9DF3\u9DF4\u9DFE\u9E0A\u9E02\u9E07\u9E0E\u9E10\u9E11\u9E12\u9E15\u9E16\u9E19\u9E1C\u9E1D\u9E7A\u9E7B\u9E7C\u9E80\u9E82\u9E83\u9E84\u9E85\u9E87\u9E8E\u9E8F\u9E96\u9E98\u9E9B\u9E9E\u9EA4\u9EA8\u9EAC\u9EAE\u9EAF\u9EB0\u9EB3\u9EB4\u9EB5\u9EC6\u9EC8\u9ECB\u9ED5\u9EDF\u9EE4\u9EE7\u9EEC\u9EED\u9EEE\u9EF0\u9EF1\u9EF2\u9EF5"], + ["8feda1", "\u9EF8\u9EFF\u9F02\u9F03\u9F09\u9F0F\u9F10\u9F11\u9F12\u9F14\u9F16\u9F17\u9F19\u9F1A\u9F1B\u9F1F\u9F22\u9F26\u9F2A\u9F2B\u9F2F\u9F31\u9F32\u9F34\u9F37\u9F39\u9F3A\u9F3C\u9F3D\u9F3F\u9F41\u9F43", 4, "\u9F53\u9F55\u9F56\u9F57\u9F58\u9F5A\u9F5D\u9F5E\u9F68\u9F69\u9F6D", 4, "\u9F73\u9F75\u9F7A\u9F7D\u9F8F\u9F90\u9F91\u9F92\u9F94\u9F96\u9F97\u9F9E\u9FA1\u9FA2\u9FA3\u9FA5"] + ]; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tables/cp936.json +var require_cp936 = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tables/cp936.json"(exports2, module2) { + module2.exports = [ + ["0", "\0", 127, "\u20AC"], + ["8140", "\u4E02\u4E04\u4E05\u4E06\u4E0F\u4E12\u4E17\u4E1F\u4E20\u4E21\u4E23\u4E26\u4E29\u4E2E\u4E2F\u4E31\u4E33\u4E35\u4E37\u4E3C\u4E40\u4E41\u4E42\u4E44\u4E46\u4E4A\u4E51\u4E55\u4E57\u4E5A\u4E5B\u4E62\u4E63\u4E64\u4E65\u4E67\u4E68\u4E6A", 5, "\u4E72\u4E74", 9, "\u4E7F", 6, "\u4E87\u4E8A"], + ["8180", "\u4E90\u4E96\u4E97\u4E99\u4E9C\u4E9D\u4E9E\u4EA3\u4EAA\u4EAF\u4EB0\u4EB1\u4EB4\u4EB6\u4EB7\u4EB8\u4EB9\u4EBC\u4EBD\u4EBE\u4EC8\u4ECC\u4ECF\u4ED0\u4ED2\u4EDA\u4EDB\u4EDC\u4EE0\u4EE2\u4EE6\u4EE7\u4EE9\u4EED\u4EEE\u4EEF\u4EF1\u4EF4\u4EF8\u4EF9\u4EFA\u4EFC\u4EFE\u4F00\u4F02", 6, "\u4F0B\u4F0C\u4F12", 4, "\u4F1C\u4F1D\u4F21\u4F23\u4F28\u4F29\u4F2C\u4F2D\u4F2E\u4F31\u4F33\u4F35\u4F37\u4F39\u4F3B\u4F3E", 4, "\u4F44\u4F45\u4F47", 5, "\u4F52\u4F54\u4F56\u4F61\u4F62\u4F66\u4F68\u4F6A\u4F6B\u4F6D\u4F6E\u4F71\u4F72\u4F75\u4F77\u4F78\u4F79\u4F7A\u4F7D\u4F80\u4F81\u4F82\u4F85\u4F86\u4F87\u4F8A\u4F8C\u4F8E\u4F90\u4F92\u4F93\u4F95\u4F96\u4F98\u4F99\u4F9A\u4F9C\u4F9E\u4F9F\u4FA1\u4FA2"], + ["8240", "\u4FA4\u4FAB\u4FAD\u4FB0", 4, "\u4FB6", 8, "\u4FC0\u4FC1\u4FC2\u4FC6\u4FC7\u4FC8\u4FC9\u4FCB\u4FCC\u4FCD\u4FD2", 4, "\u4FD9\u4FDB\u4FE0\u4FE2\u4FE4\u4FE5\u4FE7\u4FEB\u4FEC\u4FF0\u4FF2\u4FF4\u4FF5\u4FF6\u4FF7\u4FF9\u4FFB\u4FFC\u4FFD\u4FFF", 11], + ["8280", "\u500B\u500E\u5010\u5011\u5013\u5015\u5016\u5017\u501B\u501D\u501E\u5020\u5022\u5023\u5024\u5027\u502B\u502F", 10, "\u503B\u503D\u503F\u5040\u5041\u5042\u5044\u5045\u5046\u5049\u504A\u504B\u504D\u5050", 4, "\u5056\u5057\u5058\u5059\u505B\u505D", 7, "\u5066", 5, "\u506D", 8, "\u5078\u5079\u507A\u507C\u507D\u5081\u5082\u5083\u5084\u5086\u5087\u5089\u508A\u508B\u508C\u508E", 20, "\u50A4\u50A6\u50AA\u50AB\u50AD", 4, "\u50B3", 6, "\u50BC"], + ["8340", "\u50BD", 17, "\u50D0", 5, "\u50D7\u50D8\u50D9\u50DB", 10, "\u50E8\u50E9\u50EA\u50EB\u50EF\u50F0\u50F1\u50F2\u50F4\u50F6", 4, "\u50FC", 9, "\u5108"], + ["8380", "\u5109\u510A\u510C", 5, "\u5113", 13, "\u5122", 28, "\u5142\u5147\u514A\u514C\u514E\u514F\u5150\u5152\u5153\u5157\u5158\u5159\u515B\u515D", 4, "\u5163\u5164\u5166\u5167\u5169\u516A\u516F\u5172\u517A\u517E\u517F\u5183\u5184\u5186\u5187\u518A\u518B\u518E\u518F\u5190\u5191\u5193\u5194\u5198\u519A\u519D\u519E\u519F\u51A1\u51A3\u51A6", 4, "\u51AD\u51AE\u51B4\u51B8\u51B9\u51BA\u51BE\u51BF\u51C1\u51C2\u51C3\u51C5\u51C8\u51CA\u51CD\u51CE\u51D0\u51D2", 5], + ["8440", "\u51D8\u51D9\u51DA\u51DC\u51DE\u51DF\u51E2\u51E3\u51E5", 5, "\u51EC\u51EE\u51F1\u51F2\u51F4\u51F7\u51FE\u5204\u5205\u5209\u520B\u520C\u520F\u5210\u5213\u5214\u5215\u521C\u521E\u521F\u5221\u5222\u5223\u5225\u5226\u5227\u522A\u522C\u522F\u5231\u5232\u5234\u5235\u523C\u523E\u5244", 5, "\u524B\u524E\u524F\u5252\u5253\u5255\u5257\u5258"], + ["8480", "\u5259\u525A\u525B\u525D\u525F\u5260\u5262\u5263\u5264\u5266\u5268\u526B\u526C\u526D\u526E\u5270\u5271\u5273", 9, "\u527E\u5280\u5283", 4, "\u5289", 6, "\u5291\u5292\u5294", 6, "\u529C\u52A4\u52A5\u52A6\u52A7\u52AE\u52AF\u52B0\u52B4", 9, "\u52C0\u52C1\u52C2\u52C4\u52C5\u52C6\u52C8\u52CA\u52CC\u52CD\u52CE\u52CF\u52D1\u52D3\u52D4\u52D5\u52D7\u52D9", 5, "\u52E0\u52E1\u52E2\u52E3\u52E5", 10, "\u52F1", 7, "\u52FB\u52FC\u52FD\u5301\u5302\u5303\u5304\u5307\u5309\u530A\u530B\u530C\u530E"], + ["8540", "\u5311\u5312\u5313\u5314\u5318\u531B\u531C\u531E\u531F\u5322\u5324\u5325\u5327\u5328\u5329\u532B\u532C\u532D\u532F", 9, "\u533C\u533D\u5340\u5342\u5344\u5346\u534B\u534C\u534D\u5350\u5354\u5358\u5359\u535B\u535D\u5365\u5368\u536A\u536C\u536D\u5372\u5376\u5379\u537B\u537C\u537D\u537E\u5380\u5381\u5383\u5387\u5388\u538A\u538E\u538F"], + ["8580", "\u5390", 4, "\u5396\u5397\u5399\u539B\u539C\u539E\u53A0\u53A1\u53A4\u53A7\u53AA\u53AB\u53AC\u53AD\u53AF", 6, "\u53B7\u53B8\u53B9\u53BA\u53BC\u53BD\u53BE\u53C0\u53C3", 4, "\u53CE\u53CF\u53D0\u53D2\u53D3\u53D5\u53DA\u53DC\u53DD\u53DE\u53E1\u53E2\u53E7\u53F4\u53FA\u53FE\u53FF\u5400\u5402\u5405\u5407\u540B\u5414\u5418\u5419\u541A\u541C\u5422\u5424\u5425\u542A\u5430\u5433\u5436\u5437\u543A\u543D\u543F\u5441\u5442\u5444\u5445\u5447\u5449\u544C\u544D\u544E\u544F\u5451\u545A\u545D", 4, "\u5463\u5465\u5467\u5469", 7, "\u5474\u5479\u547A\u547E\u547F\u5481\u5483\u5485\u5487\u5488\u5489\u548A\u548D\u5491\u5493\u5497\u5498\u549C\u549E\u549F\u54A0\u54A1"], + ["8640", "\u54A2\u54A5\u54AE\u54B0\u54B2\u54B5\u54B6\u54B7\u54B9\u54BA\u54BC\u54BE\u54C3\u54C5\u54CA\u54CB\u54D6\u54D8\u54DB\u54E0", 4, "\u54EB\u54EC\u54EF\u54F0\u54F1\u54F4", 5, "\u54FB\u54FE\u5500\u5502\u5503\u5504\u5505\u5508\u550A", 4, "\u5512\u5513\u5515", 5, "\u551C\u551D\u551E\u551F\u5521\u5525\u5526"], + ["8680", "\u5528\u5529\u552B\u552D\u5532\u5534\u5535\u5536\u5538\u5539\u553A\u553B\u553D\u5540\u5542\u5545\u5547\u5548\u554B", 4, "\u5551\u5552\u5553\u5554\u5557", 4, "\u555D\u555E\u555F\u5560\u5562\u5563\u5568\u5569\u556B\u556F", 5, "\u5579\u557A\u557D\u557F\u5585\u5586\u558C\u558D\u558E\u5590\u5592\u5593\u5595\u5596\u5597\u559A\u559B\u559E\u55A0", 6, "\u55A8", 8, "\u55B2\u55B4\u55B6\u55B8\u55BA\u55BC\u55BF", 4, "\u55C6\u55C7\u55C8\u55CA\u55CB\u55CE\u55CF\u55D0\u55D5\u55D7", 4, "\u55DE\u55E0\u55E2\u55E7\u55E9\u55ED\u55EE\u55F0\u55F1\u55F4\u55F6\u55F8", 4, "\u55FF\u5602\u5603\u5604\u5605"], + ["8740", "\u5606\u5607\u560A\u560B\u560D\u5610", 7, "\u5619\u561A\u561C\u561D\u5620\u5621\u5622\u5625\u5626\u5628\u5629\u562A\u562B\u562E\u562F\u5630\u5633\u5635\u5637\u5638\u563A\u563C\u563D\u563E\u5640", 11, "\u564F", 4, "\u5655\u5656\u565A\u565B\u565D", 4], + ["8780", "\u5663\u5665\u5666\u5667\u566D\u566E\u566F\u5670\u5672\u5673\u5674\u5675\u5677\u5678\u5679\u567A\u567D", 7, "\u5687", 6, "\u5690\u5691\u5692\u5694", 14, "\u56A4", 10, "\u56B0", 6, "\u56B8\u56B9\u56BA\u56BB\u56BD", 12, "\u56CB", 8, "\u56D5\u56D6\u56D8\u56D9\u56DC\u56E3\u56E5", 5, "\u56EC\u56EE\u56EF\u56F2\u56F3\u56F6\u56F7\u56F8\u56FB\u56FC\u5700\u5701\u5702\u5705\u5707\u570B", 6], + ["8840", "\u5712", 9, "\u571D\u571E\u5720\u5721\u5722\u5724\u5725\u5726\u5727\u572B\u5731\u5732\u5734", 4, "\u573C\u573D\u573F\u5741\u5743\u5744\u5745\u5746\u5748\u5749\u574B\u5752", 4, "\u5758\u5759\u5762\u5763\u5765\u5767\u576C\u576E\u5770\u5771\u5772\u5774\u5775\u5778\u5779\u577A\u577D\u577E\u577F\u5780"], + ["8880", "\u5781\u5787\u5788\u5789\u578A\u578D", 4, "\u5794", 6, "\u579C\u579D\u579E\u579F\u57A5\u57A8\u57AA\u57AC\u57AF\u57B0\u57B1\u57B3\u57B5\u57B6\u57B7\u57B9", 8, "\u57C4", 6, "\u57CC\u57CD\u57D0\u57D1\u57D3\u57D6\u57D7\u57DB\u57DC\u57DE\u57E1\u57E2\u57E3\u57E5", 7, "\u57EE\u57F0\u57F1\u57F2\u57F3\u57F5\u57F6\u57F7\u57FB\u57FC\u57FE\u57FF\u5801\u5803\u5804\u5805\u5808\u5809\u580A\u580C\u580E\u580F\u5810\u5812\u5813\u5814\u5816\u5817\u5818\u581A\u581B\u581C\u581D\u581F\u5822\u5823\u5825", 4, "\u582B", 4, "\u5831\u5832\u5833\u5834\u5836", 7], + ["8940", "\u583E", 5, "\u5845", 6, "\u584E\u584F\u5850\u5852\u5853\u5855\u5856\u5857\u5859", 4, "\u585F", 5, "\u5866", 4, "\u586D", 16, "\u587F\u5882\u5884\u5886\u5887\u5888\u588A\u588B\u588C"], + ["8980", "\u588D", 4, "\u5894", 4, "\u589B\u589C\u589D\u58A0", 7, "\u58AA", 17, "\u58BD\u58BE\u58BF\u58C0\u58C2\u58C3\u58C4\u58C6", 10, "\u58D2\u58D3\u58D4\u58D6", 13, "\u58E5", 5, "\u58ED\u58EF\u58F1\u58F2\u58F4\u58F5\u58F7\u58F8\u58FA", 7, "\u5903\u5905\u5906\u5908", 4, "\u590E\u5910\u5911\u5912\u5913\u5917\u5918\u591B\u591D\u591E\u5920\u5921\u5922\u5923\u5926\u5928\u592C\u5930\u5932\u5933\u5935\u5936\u593B"], + ["8a40", "\u593D\u593E\u593F\u5940\u5943\u5945\u5946\u594A\u594C\u594D\u5950\u5952\u5953\u5959\u595B", 4, "\u5961\u5963\u5964\u5966", 12, "\u5975\u5977\u597A\u597B\u597C\u597E\u597F\u5980\u5985\u5989\u598B\u598C\u598E\u598F\u5990\u5991\u5994\u5995\u5998\u599A\u599B\u599C\u599D\u599F\u59A0\u59A1\u59A2\u59A6"], + ["8a80", "\u59A7\u59AC\u59AD\u59B0\u59B1\u59B3", 5, "\u59BA\u59BC\u59BD\u59BF", 6, "\u59C7\u59C8\u59C9\u59CC\u59CD\u59CE\u59CF\u59D5\u59D6\u59D9\u59DB\u59DE", 4, "\u59E4\u59E6\u59E7\u59E9\u59EA\u59EB\u59ED", 11, "\u59FA\u59FC\u59FD\u59FE\u5A00\u5A02\u5A0A\u5A0B\u5A0D\u5A0E\u5A0F\u5A10\u5A12\u5A14\u5A15\u5A16\u5A17\u5A19\u5A1A\u5A1B\u5A1D\u5A1E\u5A21\u5A22\u5A24\u5A26\u5A27\u5A28\u5A2A", 6, "\u5A33\u5A35\u5A37", 4, "\u5A3D\u5A3E\u5A3F\u5A41", 4, "\u5A47\u5A48\u5A4B", 9, "\u5A56\u5A57\u5A58\u5A59\u5A5B", 5], + ["8b40", "\u5A61\u5A63\u5A64\u5A65\u5A66\u5A68\u5A69\u5A6B", 8, "\u5A78\u5A79\u5A7B\u5A7C\u5A7D\u5A7E\u5A80", 17, "\u5A93", 6, "\u5A9C", 13, "\u5AAB\u5AAC"], + ["8b80", "\u5AAD", 4, "\u5AB4\u5AB6\u5AB7\u5AB9", 4, "\u5ABF\u5AC0\u5AC3", 5, "\u5ACA\u5ACB\u5ACD", 4, "\u5AD3\u5AD5\u5AD7\u5AD9\u5ADA\u5ADB\u5ADD\u5ADE\u5ADF\u5AE2\u5AE4\u5AE5\u5AE7\u5AE8\u5AEA\u5AEC", 4, "\u5AF2", 22, "\u5B0A", 11, "\u5B18", 25, "\u5B33\u5B35\u5B36\u5B38", 7, "\u5B41", 6], + ["8c40", "\u5B48", 7, "\u5B52\u5B56\u5B5E\u5B60\u5B61\u5B67\u5B68\u5B6B\u5B6D\u5B6E\u5B6F\u5B72\u5B74\u5B76\u5B77\u5B78\u5B79\u5B7B\u5B7C\u5B7E\u5B7F\u5B82\u5B86\u5B8A\u5B8D\u5B8E\u5B90\u5B91\u5B92\u5B94\u5B96\u5B9F\u5BA7\u5BA8\u5BA9\u5BAC\u5BAD\u5BAE\u5BAF\u5BB1\u5BB2\u5BB7\u5BBA\u5BBB\u5BBC\u5BC0\u5BC1\u5BC3\u5BC8\u5BC9\u5BCA\u5BCB\u5BCD\u5BCE\u5BCF"], + ["8c80", "\u5BD1\u5BD4", 8, "\u5BE0\u5BE2\u5BE3\u5BE6\u5BE7\u5BE9", 4, "\u5BEF\u5BF1", 6, "\u5BFD\u5BFE\u5C00\u5C02\u5C03\u5C05\u5C07\u5C08\u5C0B\u5C0C\u5C0D\u5C0E\u5C10\u5C12\u5C13\u5C17\u5C19\u5C1B\u5C1E\u5C1F\u5C20\u5C21\u5C23\u5C26\u5C28\u5C29\u5C2A\u5C2B\u5C2D\u5C2E\u5C2F\u5C30\u5C32\u5C33\u5C35\u5C36\u5C37\u5C43\u5C44\u5C46\u5C47\u5C4C\u5C4D\u5C52\u5C53\u5C54\u5C56\u5C57\u5C58\u5C5A\u5C5B\u5C5C\u5C5D\u5C5F\u5C62\u5C64\u5C67", 6, "\u5C70\u5C72", 6, "\u5C7B\u5C7C\u5C7D\u5C7E\u5C80\u5C83", 4, "\u5C89\u5C8A\u5C8B\u5C8E\u5C8F\u5C92\u5C93\u5C95\u5C9D", 4, "\u5CA4", 4], + ["8d40", "\u5CAA\u5CAE\u5CAF\u5CB0\u5CB2\u5CB4\u5CB6\u5CB9\u5CBA\u5CBB\u5CBC\u5CBE\u5CC0\u5CC2\u5CC3\u5CC5", 5, "\u5CCC", 5, "\u5CD3", 5, "\u5CDA", 6, "\u5CE2\u5CE3\u5CE7\u5CE9\u5CEB\u5CEC\u5CEE\u5CEF\u5CF1", 9, "\u5CFC", 4], + ["8d80", "\u5D01\u5D04\u5D05\u5D08", 5, "\u5D0F", 4, "\u5D15\u5D17\u5D18\u5D19\u5D1A\u5D1C\u5D1D\u5D1F", 4, "\u5D25\u5D28\u5D2A\u5D2B\u5D2C\u5D2F", 4, "\u5D35", 7, "\u5D3F", 7, "\u5D48\u5D49\u5D4D", 10, "\u5D59\u5D5A\u5D5C\u5D5E", 10, "\u5D6A\u5D6D\u5D6E\u5D70\u5D71\u5D72\u5D73\u5D75", 12, "\u5D83", 21, "\u5D9A\u5D9B\u5D9C\u5D9E\u5D9F\u5DA0"], + ["8e40", "\u5DA1", 21, "\u5DB8", 12, "\u5DC6", 6, "\u5DCE", 12, "\u5DDC\u5DDF\u5DE0\u5DE3\u5DE4\u5DEA\u5DEC\u5DED"], + ["8e80", "\u5DF0\u5DF5\u5DF6\u5DF8", 4, "\u5DFF\u5E00\u5E04\u5E07\u5E09\u5E0A\u5E0B\u5E0D\u5E0E\u5E12\u5E13\u5E17\u5E1E", 7, "\u5E28", 4, "\u5E2F\u5E30\u5E32", 4, "\u5E39\u5E3A\u5E3E\u5E3F\u5E40\u5E41\u5E43\u5E46", 5, "\u5E4D", 6, "\u5E56", 4, "\u5E5C\u5E5D\u5E5F\u5E60\u5E63", 14, "\u5E75\u5E77\u5E79\u5E7E\u5E81\u5E82\u5E83\u5E85\u5E88\u5E89\u5E8C\u5E8D\u5E8E\u5E92\u5E98\u5E9B\u5E9D\u5EA1\u5EA2\u5EA3\u5EA4\u5EA8", 4, "\u5EAE", 4, "\u5EB4\u5EBA\u5EBB\u5EBC\u5EBD\u5EBF", 6], + ["8f40", "\u5EC6\u5EC7\u5EC8\u5ECB", 5, "\u5ED4\u5ED5\u5ED7\u5ED8\u5ED9\u5EDA\u5EDC", 11, "\u5EE9\u5EEB", 8, "\u5EF5\u5EF8\u5EF9\u5EFB\u5EFC\u5EFD\u5F05\u5F06\u5F07\u5F09\u5F0C\u5F0D\u5F0E\u5F10\u5F12\u5F14\u5F16\u5F19\u5F1A\u5F1C\u5F1D\u5F1E\u5F21\u5F22\u5F23\u5F24"], + ["8f80", "\u5F28\u5F2B\u5F2C\u5F2E\u5F30\u5F32", 6, "\u5F3B\u5F3D\u5F3E\u5F3F\u5F41", 14, "\u5F51\u5F54\u5F59\u5F5A\u5F5B\u5F5C\u5F5E\u5F5F\u5F60\u5F63\u5F65\u5F67\u5F68\u5F6B\u5F6E\u5F6F\u5F72\u5F74\u5F75\u5F76\u5F78\u5F7A\u5F7D\u5F7E\u5F7F\u5F83\u5F86\u5F8D\u5F8E\u5F8F\u5F91\u5F93\u5F94\u5F96\u5F9A\u5F9B\u5F9D\u5F9E\u5F9F\u5FA0\u5FA2", 5, "\u5FA9\u5FAB\u5FAC\u5FAF", 5, "\u5FB6\u5FB8\u5FB9\u5FBA\u5FBB\u5FBE", 4, "\u5FC7\u5FC8\u5FCA\u5FCB\u5FCE\u5FD3\u5FD4\u5FD5\u5FDA\u5FDB\u5FDC\u5FDE\u5FDF\u5FE2\u5FE3\u5FE5\u5FE6\u5FE8\u5FE9\u5FEC\u5FEF\u5FF0\u5FF2\u5FF3\u5FF4\u5FF6\u5FF7\u5FF9\u5FFA\u5FFC\u6007"], + ["9040", "\u6008\u6009\u600B\u600C\u6010\u6011\u6013\u6017\u6018\u601A\u601E\u601F\u6022\u6023\u6024\u602C\u602D\u602E\u6030", 4, "\u6036", 4, "\u603D\u603E\u6040\u6044", 6, "\u604C\u604E\u604F\u6051\u6053\u6054\u6056\u6057\u6058\u605B\u605C\u605E\u605F\u6060\u6061\u6065\u6066\u606E\u6071\u6072\u6074\u6075\u6077\u607E\u6080"], + ["9080", "\u6081\u6082\u6085\u6086\u6087\u6088\u608A\u608B\u608E\u608F\u6090\u6091\u6093\u6095\u6097\u6098\u6099\u609C\u609E\u60A1\u60A2\u60A4\u60A5\u60A7\u60A9\u60AA\u60AE\u60B0\u60B3\u60B5\u60B6\u60B7\u60B9\u60BA\u60BD", 7, "\u60C7\u60C8\u60C9\u60CC", 4, "\u60D2\u60D3\u60D4\u60D6\u60D7\u60D9\u60DB\u60DE\u60E1", 4, "\u60EA\u60F1\u60F2\u60F5\u60F7\u60F8\u60FB", 4, "\u6102\u6103\u6104\u6105\u6107\u610A\u610B\u610C\u6110", 4, "\u6116\u6117\u6118\u6119\u611B\u611C\u611D\u611E\u6121\u6122\u6125\u6128\u6129\u612A\u612C", 18, "\u6140", 6], + ["9140", "\u6147\u6149\u614B\u614D\u614F\u6150\u6152\u6153\u6154\u6156", 6, "\u615E\u615F\u6160\u6161\u6163\u6164\u6165\u6166\u6169", 6, "\u6171\u6172\u6173\u6174\u6176\u6178", 18, "\u618C\u618D\u618F", 4, "\u6195"], + ["9180", "\u6196", 6, "\u619E", 8, "\u61AA\u61AB\u61AD", 9, "\u61B8", 5, "\u61BF\u61C0\u61C1\u61C3", 4, "\u61C9\u61CC", 4, "\u61D3\u61D5", 16, "\u61E7", 13, "\u61F6", 8, "\u6200", 5, "\u6207\u6209\u6213\u6214\u6219\u621C\u621D\u621E\u6220\u6223\u6226\u6227\u6228\u6229\u622B\u622D\u622F\u6230\u6231\u6232\u6235\u6236\u6238", 4, "\u6242\u6244\u6245\u6246\u624A"], + ["9240", "\u624F\u6250\u6255\u6256\u6257\u6259\u625A\u625C", 6, "\u6264\u6265\u6268\u6271\u6272\u6274\u6275\u6277\u6278\u627A\u627B\u627D\u6281\u6282\u6283\u6285\u6286\u6287\u6288\u628B", 5, "\u6294\u6299\u629C\u629D\u629E\u62A3\u62A6\u62A7\u62A9\u62AA\u62AD\u62AE\u62AF\u62B0\u62B2\u62B3\u62B4\u62B6\u62B7\u62B8\u62BA\u62BE\u62C0\u62C1"], + ["9280", "\u62C3\u62CB\u62CF\u62D1\u62D5\u62DD\u62DE\u62E0\u62E1\u62E4\u62EA\u62EB\u62F0\u62F2\u62F5\u62F8\u62F9\u62FA\u62FB\u6300\u6303\u6304\u6305\u6306\u630A\u630B\u630C\u630D\u630F\u6310\u6312\u6313\u6314\u6315\u6317\u6318\u6319\u631C\u6326\u6327\u6329\u632C\u632D\u632E\u6330\u6331\u6333", 5, "\u633B\u633C\u633E\u633F\u6340\u6341\u6344\u6347\u6348\u634A\u6351\u6352\u6353\u6354\u6356", 7, "\u6360\u6364\u6365\u6366\u6368\u636A\u636B\u636C\u636F\u6370\u6372\u6373\u6374\u6375\u6378\u6379\u637C\u637D\u637E\u637F\u6381\u6383\u6384\u6385\u6386\u638B\u638D\u6391\u6393\u6394\u6395\u6397\u6399", 6, "\u63A1\u63A4\u63A6\u63AB\u63AF\u63B1\u63B2\u63B5\u63B6\u63B9\u63BB\u63BD\u63BF\u63C0"], + ["9340", "\u63C1\u63C2\u63C3\u63C5\u63C7\u63C8\u63CA\u63CB\u63CC\u63D1\u63D3\u63D4\u63D5\u63D7", 6, "\u63DF\u63E2\u63E4", 4, "\u63EB\u63EC\u63EE\u63EF\u63F0\u63F1\u63F3\u63F5\u63F7\u63F9\u63FA\u63FB\u63FC\u63FE\u6403\u6404\u6406", 4, "\u640D\u640E\u6411\u6412\u6415", 5, "\u641D\u641F\u6422\u6423\u6424"], + ["9380", "\u6425\u6427\u6428\u6429\u642B\u642E", 5, "\u6435", 4, "\u643B\u643C\u643E\u6440\u6442\u6443\u6449\u644B", 6, "\u6453\u6455\u6456\u6457\u6459", 4, "\u645F", 7, "\u6468\u646A\u646B\u646C\u646E", 9, "\u647B", 6, "\u6483\u6486\u6488", 8, "\u6493\u6494\u6497\u6498\u649A\u649B\u649C\u649D\u649F", 4, "\u64A5\u64A6\u64A7\u64A8\u64AA\u64AB\u64AF\u64B1\u64B2\u64B3\u64B4\u64B6\u64B9\u64BB\u64BD\u64BE\u64BF\u64C1\u64C3\u64C4\u64C6", 6, "\u64CF\u64D1\u64D3\u64D4\u64D5\u64D6\u64D9\u64DA"], + ["9440", "\u64DB\u64DC\u64DD\u64DF\u64E0\u64E1\u64E3\u64E5\u64E7", 24, "\u6501", 7, "\u650A", 7, "\u6513", 4, "\u6519", 8], + ["9480", "\u6522\u6523\u6524\u6526", 4, "\u652C\u652D\u6530\u6531\u6532\u6533\u6537\u653A\u653C\u653D\u6540", 4, "\u6546\u6547\u654A\u654B\u654D\u654E\u6550\u6552\u6553\u6554\u6557\u6558\u655A\u655C\u655F\u6560\u6561\u6564\u6565\u6567\u6568\u6569\u656A\u656D\u656E\u656F\u6571\u6573\u6575\u6576\u6578", 14, "\u6588\u6589\u658A\u658D\u658E\u658F\u6592\u6594\u6595\u6596\u6598\u659A\u659D\u659E\u65A0\u65A2\u65A3\u65A6\u65A8\u65AA\u65AC\u65AE\u65B1", 7, "\u65BA\u65BB\u65BE\u65BF\u65C0\u65C2\u65C7\u65C8\u65C9\u65CA\u65CD\u65D0\u65D1\u65D3\u65D4\u65D5\u65D8", 7, "\u65E1\u65E3\u65E4\u65EA\u65EB"], + ["9540", "\u65F2\u65F3\u65F4\u65F5\u65F8\u65F9\u65FB", 4, "\u6601\u6604\u6605\u6607\u6608\u6609\u660B\u660D\u6610\u6611\u6612\u6616\u6617\u6618\u661A\u661B\u661C\u661E\u6621\u6622\u6623\u6624\u6626\u6629\u662A\u662B\u662C\u662E\u6630\u6632\u6633\u6637", 4, "\u663D\u663F\u6640\u6642\u6644", 6, "\u664D\u664E\u6650\u6651\u6658"], + ["9580", "\u6659\u665B\u665C\u665D\u665E\u6660\u6662\u6663\u6665\u6667\u6669", 4, "\u6671\u6672\u6673\u6675\u6678\u6679\u667B\u667C\u667D\u667F\u6680\u6681\u6683\u6685\u6686\u6688\u6689\u668A\u668B\u668D\u668E\u668F\u6690\u6692\u6693\u6694\u6695\u6698", 4, "\u669E", 8, "\u66A9", 4, "\u66AF", 4, "\u66B5\u66B6\u66B7\u66B8\u66BA\u66BB\u66BC\u66BD\u66BF", 25, "\u66DA\u66DE", 7, "\u66E7\u66E8\u66EA", 5, "\u66F1\u66F5\u66F6\u66F8\u66FA\u66FB\u66FD\u6701\u6702\u6703"], + ["9640", "\u6704\u6705\u6706\u6707\u670C\u670E\u670F\u6711\u6712\u6713\u6716\u6718\u6719\u671A\u671C\u671E\u6720", 5, "\u6727\u6729\u672E\u6730\u6732\u6733\u6736\u6737\u6738\u6739\u673B\u673C\u673E\u673F\u6741\u6744\u6745\u6747\u674A\u674B\u674D\u6752\u6754\u6755\u6757", 4, "\u675D\u6762\u6763\u6764\u6766\u6767\u676B\u676C\u676E\u6771\u6774\u6776"], + ["9680", "\u6778\u6779\u677A\u677B\u677D\u6780\u6782\u6783\u6785\u6786\u6788\u678A\u678C\u678D\u678E\u678F\u6791\u6792\u6793\u6794\u6796\u6799\u679B\u679F\u67A0\u67A1\u67A4\u67A6\u67A9\u67AC\u67AE\u67B1\u67B2\u67B4\u67B9", 7, "\u67C2\u67C5", 9, "\u67D5\u67D6\u67D7\u67DB\u67DF\u67E1\u67E3\u67E4\u67E6\u67E7\u67E8\u67EA\u67EB\u67ED\u67EE\u67F2\u67F5", 7, "\u67FE\u6801\u6802\u6803\u6804\u6806\u680D\u6810\u6812\u6814\u6815\u6818", 4, "\u681E\u681F\u6820\u6822", 6, "\u682B", 6, "\u6834\u6835\u6836\u683A\u683B\u683F\u6847\u684B\u684D\u684F\u6852\u6856", 5], + ["9740", "\u685C\u685D\u685E\u685F\u686A\u686C", 7, "\u6875\u6878", 8, "\u6882\u6884\u6887", 7, "\u6890\u6891\u6892\u6894\u6895\u6896\u6898", 9, "\u68A3\u68A4\u68A5\u68A9\u68AA\u68AB\u68AC\u68AE\u68B1\u68B2\u68B4\u68B6\u68B7\u68B8"], + ["9780", "\u68B9", 6, "\u68C1\u68C3", 5, "\u68CA\u68CC\u68CE\u68CF\u68D0\u68D1\u68D3\u68D4\u68D6\u68D7\u68D9\u68DB", 4, "\u68E1\u68E2\u68E4", 9, "\u68EF\u68F2\u68F3\u68F4\u68F6\u68F7\u68F8\u68FB\u68FD\u68FE\u68FF\u6900\u6902\u6903\u6904\u6906", 4, "\u690C\u690F\u6911\u6913", 11, "\u6921\u6922\u6923\u6925", 7, "\u692E\u692F\u6931\u6932\u6933\u6935\u6936\u6937\u6938\u693A\u693B\u693C\u693E\u6940\u6941\u6943", 16, "\u6955\u6956\u6958\u6959\u695B\u695C\u695F"], + ["9840", "\u6961\u6962\u6964\u6965\u6967\u6968\u6969\u696A\u696C\u696D\u696F\u6970\u6972", 4, "\u697A\u697B\u697D\u697E\u697F\u6981\u6983\u6985\u698A\u698B\u698C\u698E", 5, "\u6996\u6997\u6999\u699A\u699D", 9, "\u69A9\u69AA\u69AC\u69AE\u69AF\u69B0\u69B2\u69B3\u69B5\u69B6\u69B8\u69B9\u69BA\u69BC\u69BD"], + ["9880", "\u69BE\u69BF\u69C0\u69C2", 7, "\u69CB\u69CD\u69CF\u69D1\u69D2\u69D3\u69D5", 5, "\u69DC\u69DD\u69DE\u69E1", 11, "\u69EE\u69EF\u69F0\u69F1\u69F3", 9, "\u69FE\u6A00", 9, "\u6A0B", 11, "\u6A19", 5, "\u6A20\u6A22", 5, "\u6A29\u6A2B\u6A2C\u6A2D\u6A2E\u6A30\u6A32\u6A33\u6A34\u6A36", 6, "\u6A3F", 4, "\u6A45\u6A46\u6A48", 7, "\u6A51", 6, "\u6A5A"], + ["9940", "\u6A5C", 4, "\u6A62\u6A63\u6A64\u6A66", 10, "\u6A72", 6, "\u6A7A\u6A7B\u6A7D\u6A7E\u6A7F\u6A81\u6A82\u6A83\u6A85", 8, "\u6A8F\u6A92", 4, "\u6A98", 7, "\u6AA1", 5], + ["9980", "\u6AA7\u6AA8\u6AAA\u6AAD", 114, "\u6B25\u6B26\u6B28", 6], + ["9a40", "\u6B2F\u6B30\u6B31\u6B33\u6B34\u6B35\u6B36\u6B38\u6B3B\u6B3C\u6B3D\u6B3F\u6B40\u6B41\u6B42\u6B44\u6B45\u6B48\u6B4A\u6B4B\u6B4D", 11, "\u6B5A", 7, "\u6B68\u6B69\u6B6B", 13, "\u6B7A\u6B7D\u6B7E\u6B7F\u6B80\u6B85\u6B88"], + ["9a80", "\u6B8C\u6B8E\u6B8F\u6B90\u6B91\u6B94\u6B95\u6B97\u6B98\u6B99\u6B9C", 4, "\u6BA2", 7, "\u6BAB", 7, "\u6BB6\u6BB8", 6, "\u6BC0\u6BC3\u6BC4\u6BC6", 4, "\u6BCC\u6BCE\u6BD0\u6BD1\u6BD8\u6BDA\u6BDC", 4, "\u6BE2", 7, "\u6BEC\u6BED\u6BEE\u6BF0\u6BF1\u6BF2\u6BF4\u6BF6\u6BF7\u6BF8\u6BFA\u6BFB\u6BFC\u6BFE", 6, "\u6C08", 4, "\u6C0E\u6C12\u6C17\u6C1C\u6C1D\u6C1E\u6C20\u6C23\u6C25\u6C2B\u6C2C\u6C2D\u6C31\u6C33\u6C36\u6C37\u6C39\u6C3A\u6C3B\u6C3C\u6C3E\u6C3F\u6C43\u6C44\u6C45\u6C48\u6C4B", 4, "\u6C51\u6C52\u6C53\u6C56\u6C58"], + ["9b40", "\u6C59\u6C5A\u6C62\u6C63\u6C65\u6C66\u6C67\u6C6B", 4, "\u6C71\u6C73\u6C75\u6C77\u6C78\u6C7A\u6C7B\u6C7C\u6C7F\u6C80\u6C84\u6C87\u6C8A\u6C8B\u6C8D\u6C8E\u6C91\u6C92\u6C95\u6C96\u6C97\u6C98\u6C9A\u6C9C\u6C9D\u6C9E\u6CA0\u6CA2\u6CA8\u6CAC\u6CAF\u6CB0\u6CB4\u6CB5\u6CB6\u6CB7\u6CBA\u6CC0\u6CC1\u6CC2\u6CC3\u6CC6\u6CC7\u6CC8\u6CCB\u6CCD\u6CCE\u6CCF\u6CD1\u6CD2\u6CD8"], + ["9b80", "\u6CD9\u6CDA\u6CDC\u6CDD\u6CDF\u6CE4\u6CE6\u6CE7\u6CE9\u6CEC\u6CED\u6CF2\u6CF4\u6CF9\u6CFF\u6D00\u6D02\u6D03\u6D05\u6D06\u6D08\u6D09\u6D0A\u6D0D\u6D0F\u6D10\u6D11\u6D13\u6D14\u6D15\u6D16\u6D18\u6D1C\u6D1D\u6D1F", 5, "\u6D26\u6D28\u6D29\u6D2C\u6D2D\u6D2F\u6D30\u6D34\u6D36\u6D37\u6D38\u6D3A\u6D3F\u6D40\u6D42\u6D44\u6D49\u6D4C\u6D50\u6D55\u6D56\u6D57\u6D58\u6D5B\u6D5D\u6D5F\u6D61\u6D62\u6D64\u6D65\u6D67\u6D68\u6D6B\u6D6C\u6D6D\u6D70\u6D71\u6D72\u6D73\u6D75\u6D76\u6D79\u6D7A\u6D7B\u6D7D", 4, "\u6D83\u6D84\u6D86\u6D87\u6D8A\u6D8B\u6D8D\u6D8F\u6D90\u6D92\u6D96", 4, "\u6D9C\u6DA2\u6DA5\u6DAC\u6DAD\u6DB0\u6DB1\u6DB3\u6DB4\u6DB6\u6DB7\u6DB9", 5, "\u6DC1\u6DC2\u6DC3\u6DC8\u6DC9\u6DCA"], + ["9c40", "\u6DCD\u6DCE\u6DCF\u6DD0\u6DD2\u6DD3\u6DD4\u6DD5\u6DD7\u6DDA\u6DDB\u6DDC\u6DDF\u6DE2\u6DE3\u6DE5\u6DE7\u6DE8\u6DE9\u6DEA\u6DED\u6DEF\u6DF0\u6DF2\u6DF4\u6DF5\u6DF6\u6DF8\u6DFA\u6DFD", 7, "\u6E06\u6E07\u6E08\u6E09\u6E0B\u6E0F\u6E12\u6E13\u6E15\u6E18\u6E19\u6E1B\u6E1C\u6E1E\u6E1F\u6E22\u6E26\u6E27\u6E28\u6E2A\u6E2C\u6E2E\u6E30\u6E31\u6E33\u6E35"], + ["9c80", "\u6E36\u6E37\u6E39\u6E3B", 7, "\u6E45", 7, "\u6E4F\u6E50\u6E51\u6E52\u6E55\u6E57\u6E59\u6E5A\u6E5C\u6E5D\u6E5E\u6E60", 10, "\u6E6C\u6E6D\u6E6F", 14, "\u6E80\u6E81\u6E82\u6E84\u6E87\u6E88\u6E8A", 4, "\u6E91", 6, "\u6E99\u6E9A\u6E9B\u6E9D\u6E9E\u6EA0\u6EA1\u6EA3\u6EA4\u6EA6\u6EA8\u6EA9\u6EAB\u6EAC\u6EAD\u6EAE\u6EB0\u6EB3\u6EB5\u6EB8\u6EB9\u6EBC\u6EBE\u6EBF\u6EC0\u6EC3\u6EC4\u6EC5\u6EC6\u6EC8\u6EC9\u6ECA\u6ECC\u6ECD\u6ECE\u6ED0\u6ED2\u6ED6\u6ED8\u6ED9\u6EDB\u6EDC\u6EDD\u6EE3\u6EE7\u6EEA", 5], + ["9d40", "\u6EF0\u6EF1\u6EF2\u6EF3\u6EF5\u6EF6\u6EF7\u6EF8\u6EFA", 7, "\u6F03\u6F04\u6F05\u6F07\u6F08\u6F0A", 4, "\u6F10\u6F11\u6F12\u6F16", 9, "\u6F21\u6F22\u6F23\u6F25\u6F26\u6F27\u6F28\u6F2C\u6F2E\u6F30\u6F32\u6F34\u6F35\u6F37", 6, "\u6F3F\u6F40\u6F41\u6F42"], + ["9d80", "\u6F43\u6F44\u6F45\u6F48\u6F49\u6F4A\u6F4C\u6F4E", 9, "\u6F59\u6F5A\u6F5B\u6F5D\u6F5F\u6F60\u6F61\u6F63\u6F64\u6F65\u6F67", 5, "\u6F6F\u6F70\u6F71\u6F73\u6F75\u6F76\u6F77\u6F79\u6F7B\u6F7D", 6, "\u6F85\u6F86\u6F87\u6F8A\u6F8B\u6F8F", 12, "\u6F9D\u6F9E\u6F9F\u6FA0\u6FA2", 4, "\u6FA8", 10, "\u6FB4\u6FB5\u6FB7\u6FB8\u6FBA", 5, "\u6FC1\u6FC3", 5, "\u6FCA", 6, "\u6FD3", 10, "\u6FDF\u6FE2\u6FE3\u6FE4\u6FE5"], + ["9e40", "\u6FE6", 7, "\u6FF0", 32, "\u7012", 7, "\u701C", 6, "\u7024", 6], + ["9e80", "\u702B", 9, "\u7036\u7037\u7038\u703A", 17, "\u704D\u704E\u7050", 13, "\u705F", 11, "\u706E\u7071\u7072\u7073\u7074\u7077\u7079\u707A\u707B\u707D\u7081\u7082\u7083\u7084\u7086\u7087\u7088\u708B\u708C\u708D\u708F\u7090\u7091\u7093\u7097\u7098\u709A\u709B\u709E", 12, "\u70B0\u70B2\u70B4\u70B5\u70B6\u70BA\u70BE\u70BF\u70C4\u70C5\u70C6\u70C7\u70C9\u70CB", 12, "\u70DA"], + ["9f40", "\u70DC\u70DD\u70DE\u70E0\u70E1\u70E2\u70E3\u70E5\u70EA\u70EE\u70F0", 6, "\u70F8\u70FA\u70FB\u70FC\u70FE", 10, "\u710B", 4, "\u7111\u7112\u7114\u7117\u711B", 10, "\u7127", 7, "\u7132\u7133\u7134"], + ["9f80", "\u7135\u7137", 13, "\u7146\u7147\u7148\u7149\u714B\u714D\u714F", 12, "\u715D\u715F", 4, "\u7165\u7169", 4, "\u716F\u7170\u7171\u7174\u7175\u7176\u7177\u7179\u717B\u717C\u717E", 5, "\u7185", 4, "\u718B\u718C\u718D\u718E\u7190\u7191\u7192\u7193\u7195\u7196\u7197\u719A", 4, "\u71A1", 6, "\u71A9\u71AA\u71AB\u71AD", 5, "\u71B4\u71B6\u71B7\u71B8\u71BA", 8, "\u71C4", 9, "\u71CF", 4], + ["a040", "\u71D6", 9, "\u71E1\u71E2\u71E3\u71E4\u71E6\u71E8", 5, "\u71EF", 9, "\u71FA", 11, "\u7207", 19], + ["a080", "\u721B\u721C\u721E", 9, "\u7229\u722B\u722D\u722E\u722F\u7232\u7233\u7234\u723A\u723C\u723E\u7240", 6, "\u7249\u724A\u724B\u724E\u724F\u7250\u7251\u7253\u7254\u7255\u7257\u7258\u725A\u725C\u725E\u7260\u7263\u7264\u7265\u7268\u726A\u726B\u726C\u726D\u7270\u7271\u7273\u7274\u7276\u7277\u7278\u727B\u727C\u727D\u7282\u7283\u7285", 4, "\u728C\u728E\u7290\u7291\u7293", 11, "\u72A0", 11, "\u72AE\u72B1\u72B2\u72B3\u72B5\u72BA", 6, "\u72C5\u72C6\u72C7\u72C9\u72CA\u72CB\u72CC\u72CF\u72D1\u72D3\u72D4\u72D5\u72D6\u72D8\u72DA\u72DB"], + ["a1a1", "\u3000\u3001\u3002\xB7\u02C9\u02C7\xA8\u3003\u3005\u2014\uFF5E\u2016\u2026\u2018\u2019\u201C\u201D\u3014\u3015\u3008", 7, "\u3016\u3017\u3010\u3011\xB1\xD7\xF7\u2236\u2227\u2228\u2211\u220F\u222A\u2229\u2208\u2237\u221A\u22A5\u2225\u2220\u2312\u2299\u222B\u222E\u2261\u224C\u2248\u223D\u221D\u2260\u226E\u226F\u2264\u2265\u221E\u2235\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFF04\xA4\uFFE0\uFFE1\u2030\xA7\u2116\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u203B\u2192\u2190\u2191\u2193\u3013"], + ["a2a1", "\u2170", 9], + ["a2b1", "\u2488", 19, "\u2474", 19, "\u2460", 9], + ["a2e5", "\u3220", 9], + ["a2f1", "\u2160", 11], + ["a3a1", "\uFF01\uFF02\uFF03\uFFE5\uFF05", 88, "\uFFE3"], + ["a4a1", "\u3041", 82], + ["a5a1", "\u30A1", 85], + ["a6a1", "\u0391", 16, "\u03A3", 6], + ["a6c1", "\u03B1", 16, "\u03C3", 6], + ["a6e0", "\uFE35\uFE36\uFE39\uFE3A\uFE3F\uFE40\uFE3D\uFE3E\uFE41\uFE42\uFE43\uFE44"], + ["a6ee", "\uFE3B\uFE3C\uFE37\uFE38\uFE31"], + ["a6f4", "\uFE33\uFE34"], + ["a7a1", "\u0410", 5, "\u0401\u0416", 25], + ["a7d1", "\u0430", 5, "\u0451\u0436", 25], + ["a840", "\u02CA\u02CB\u02D9\u2013\u2015\u2025\u2035\u2105\u2109\u2196\u2197\u2198\u2199\u2215\u221F\u2223\u2252\u2266\u2267\u22BF\u2550", 35, "\u2581", 6], + ["a880", "\u2588", 7, "\u2593\u2594\u2595\u25BC\u25BD\u25E2\u25E3\u25E4\u25E5\u2609\u2295\u3012\u301D\u301E"], + ["a8a1", "\u0101\xE1\u01CE\xE0\u0113\xE9\u011B\xE8\u012B\xED\u01D0\xEC\u014D\xF3\u01D2\xF2\u016B\xFA\u01D4\xF9\u01D6\u01D8\u01DA\u01DC\xFC\xEA\u0251"], + ["a8bd", "\u0144\u0148"], + ["a8c0", "\u0261"], + ["a8c5", "\u3105", 36], + ["a940", "\u3021", 8, "\u32A3\u338E\u338F\u339C\u339D\u339E\u33A1\u33C4\u33CE\u33D1\u33D2\u33D5\uFE30\uFFE2\uFFE4"], + ["a959", "\u2121\u3231"], + ["a95c", "\u2010"], + ["a960", "\u30FC\u309B\u309C\u30FD\u30FE\u3006\u309D\u309E\uFE49", 9, "\uFE54\uFE55\uFE56\uFE57\uFE59", 8], + ["a980", "\uFE62", 4, "\uFE68\uFE69\uFE6A\uFE6B"], + ["a996", "\u3007"], + ["a9a4", "\u2500", 75], + ["aa40", "\u72DC\u72DD\u72DF\u72E2", 5, "\u72EA\u72EB\u72F5\u72F6\u72F9\u72FD\u72FE\u72FF\u7300\u7302\u7304", 5, "\u730B\u730C\u730D\u730F\u7310\u7311\u7312\u7314\u7318\u7319\u731A\u731F\u7320\u7323\u7324\u7326\u7327\u7328\u732D\u732F\u7330\u7332\u7333\u7335\u7336\u733A\u733B\u733C\u733D\u7340", 8], + ["aa80", "\u7349\u734A\u734B\u734C\u734E\u734F\u7351\u7353\u7354\u7355\u7356\u7358", 7, "\u7361", 10, "\u736E\u7370\u7371"], + ["ab40", "\u7372", 11, "\u737F", 4, "\u7385\u7386\u7388\u738A\u738C\u738D\u738F\u7390\u7392\u7393\u7394\u7395\u7397\u7398\u7399\u739A\u739C\u739D\u739E\u73A0\u73A1\u73A3", 5, "\u73AA\u73AC\u73AD\u73B1\u73B4\u73B5\u73B6\u73B8\u73B9\u73BC\u73BD\u73BE\u73BF\u73C1\u73C3", 4], + ["ab80", "\u73CB\u73CC\u73CE\u73D2", 6, "\u73DA\u73DB\u73DC\u73DD\u73DF\u73E1\u73E2\u73E3\u73E4\u73E6\u73E8\u73EA\u73EB\u73EC\u73EE\u73EF\u73F0\u73F1\u73F3", 4], + ["ac40", "\u73F8", 10, "\u7404\u7407\u7408\u740B\u740C\u740D\u740E\u7411", 8, "\u741C", 5, "\u7423\u7424\u7427\u7429\u742B\u742D\u742F\u7431\u7432\u7437", 4, "\u743D\u743E\u743F\u7440\u7442", 11], + ["ac80", "\u744E", 6, "\u7456\u7458\u745D\u7460", 12, "\u746E\u746F\u7471", 4, "\u7478\u7479\u747A"], + ["ad40", "\u747B\u747C\u747D\u747F\u7482\u7484\u7485\u7486\u7488\u7489\u748A\u748C\u748D\u748F\u7491", 10, "\u749D\u749F", 7, "\u74AA", 15, "\u74BB", 12], + ["ad80", "\u74C8", 9, "\u74D3", 8, "\u74DD\u74DF\u74E1\u74E5\u74E7", 6, "\u74F0\u74F1\u74F2"], + ["ae40", "\u74F3\u74F5\u74F8", 6, "\u7500\u7501\u7502\u7503\u7505", 7, "\u750E\u7510\u7512\u7514\u7515\u7516\u7517\u751B\u751D\u751E\u7520", 4, "\u7526\u7527\u752A\u752E\u7534\u7536\u7539\u753C\u753D\u753F\u7541\u7542\u7543\u7544\u7546\u7547\u7549\u754A\u754D\u7550\u7551\u7552\u7553\u7555\u7556\u7557\u7558"], + ["ae80", "\u755D", 7, "\u7567\u7568\u7569\u756B", 6, "\u7573\u7575\u7576\u7577\u757A", 4, "\u7580\u7581\u7582\u7584\u7585\u7587"], + ["af40", "\u7588\u7589\u758A\u758C\u758D\u758E\u7590\u7593\u7595\u7598\u759B\u759C\u759E\u75A2\u75A6", 4, "\u75AD\u75B6\u75B7\u75BA\u75BB\u75BF\u75C0\u75C1\u75C6\u75CB\u75CC\u75CE\u75CF\u75D0\u75D1\u75D3\u75D7\u75D9\u75DA\u75DC\u75DD\u75DF\u75E0\u75E1\u75E5\u75E9\u75EC\u75ED\u75EE\u75EF\u75F2\u75F3\u75F5\u75F6\u75F7\u75F8\u75FA\u75FB\u75FD\u75FE\u7602\u7604\u7606\u7607"], + ["af80", "\u7608\u7609\u760B\u760D\u760E\u760F\u7611\u7612\u7613\u7614\u7616\u761A\u761C\u761D\u761E\u7621\u7623\u7627\u7628\u762C\u762E\u762F\u7631\u7632\u7636\u7637\u7639\u763A\u763B\u763D\u7641\u7642\u7644"], + ["b040", "\u7645", 6, "\u764E", 5, "\u7655\u7657", 4, "\u765D\u765F\u7660\u7661\u7662\u7664", 6, "\u766C\u766D\u766E\u7670", 7, "\u7679\u767A\u767C\u767F\u7680\u7681\u7683\u7685\u7689\u768A\u768C\u768D\u768F\u7690\u7692\u7694\u7695\u7697\u7698\u769A\u769B"], + ["b080", "\u769C", 7, "\u76A5", 8, "\u76AF\u76B0\u76B3\u76B5", 9, "\u76C0\u76C1\u76C3\u554A\u963F\u57C3\u6328\u54CE\u5509\u54C0\u7691\u764C\u853C\u77EE\u827E\u788D\u7231\u9698\u978D\u6C28\u5B89\u4FFA\u6309\u6697\u5CB8\u80FA\u6848\u80AE\u6602\u76CE\u51F9\u6556\u71AC\u7FF1\u8884\u50B2\u5965\u61CA\u6FB3\u82AD\u634C\u6252\u53ED\u5427\u7B06\u516B\u75A4\u5DF4\u62D4\u8DCB\u9776\u628A\u8019\u575D\u9738\u7F62\u7238\u767D\u67CF\u767E\u6446\u4F70\u8D25\u62DC\u7A17\u6591\u73ED\u642C\u6273\u822C\u9881\u677F\u7248\u626E\u62CC\u4F34\u74E3\u534A\u529E\u7ECA\u90A6\u5E2E\u6886\u699C\u8180\u7ED1\u68D2\u78C5\u868C\u9551\u508D\u8C24\u82DE\u80DE\u5305\u8912\u5265"], + ["b140", "\u76C4\u76C7\u76C9\u76CB\u76CC\u76D3\u76D5\u76D9\u76DA\u76DC\u76DD\u76DE\u76E0", 4, "\u76E6", 7, "\u76F0\u76F3\u76F5\u76F6\u76F7\u76FA\u76FB\u76FD\u76FF\u7700\u7702\u7703\u7705\u7706\u770A\u770C\u770E", 10, "\u771B\u771C\u771D\u771E\u7721\u7723\u7724\u7725\u7727\u772A\u772B"], + ["b180", "\u772C\u772E\u7730", 4, "\u7739\u773B\u773D\u773E\u773F\u7742\u7744\u7745\u7746\u7748", 7, "\u7752", 7, "\u775C\u8584\u96F9\u4FDD\u5821\u9971\u5B9D\u62B1\u62A5\u66B4\u8C79\u9C8D\u7206\u676F\u7891\u60B2\u5351\u5317\u8F88\u80CC\u8D1D\u94A1\u500D\u72C8\u5907\u60EB\u7119\u88AB\u5954\u82EF\u672C\u7B28\u5D29\u7EF7\u752D\u6CF5\u8E66\u8FF8\u903C\u9F3B\u6BD4\u9119\u7B14\u5F7C\u78A7\u84D6\u853D\u6BD5\u6BD9\u6BD6\u5E01\u5E87\u75F9\u95ED\u655D\u5F0A\u5FC5\u8F9F\u58C1\u81C2\u907F\u965B\u97AD\u8FB9\u7F16\u8D2C\u6241\u4FBF\u53D8\u535E\u8FA8\u8FA9\u8FAB\u904D\u6807\u5F6A\u8198\u8868\u9CD6\u618B\u522B\u762A\u5F6C\u658C\u6FD2\u6EE8\u5BBE\u6448\u5175\u51B0\u67C4\u4E19\u79C9\u997C\u70B3"], + ["b240", "\u775D\u775E\u775F\u7760\u7764\u7767\u7769\u776A\u776D", 11, "\u777A\u777B\u777C\u7781\u7782\u7783\u7786", 5, "\u778F\u7790\u7793", 11, "\u77A1\u77A3\u77A4\u77A6\u77A8\u77AB\u77AD\u77AE\u77AF\u77B1\u77B2\u77B4\u77B6", 4], + ["b280", "\u77BC\u77BE\u77C0", 12, "\u77CE", 8, "\u77D8\u77D9\u77DA\u77DD", 4, "\u77E4\u75C5\u5E76\u73BB\u83E0\u64AD\u62E8\u94B5\u6CE2\u535A\u52C3\u640F\u94C2\u7B94\u4F2F\u5E1B\u8236\u8116\u818A\u6E24\u6CCA\u9A73\u6355\u535C\u54FA\u8865\u57E0\u4E0D\u5E03\u6B65\u7C3F\u90E8\u6016\u64E6\u731C\u88C1\u6750\u624D\u8D22\u776C\u8E29\u91C7\u5F69\u83DC\u8521\u9910\u53C2\u8695\u6B8B\u60ED\u60E8\u707F\u82CD\u8231\u4ED3\u6CA7\u85CF\u64CD\u7CD9\u69FD\u66F9\u8349\u5395\u7B56\u4FA7\u518C\u6D4B\u5C42\u8E6D\u63D2\u53C9\u832C\u8336\u67E5\u78B4\u643D\u5BDF\u5C94\u5DEE\u8BE7\u62C6\u67F4\u8C7A\u6400\u63BA\u8749\u998B\u8C17\u7F20\u94F2\u4EA7\u9610\u98A4\u660C\u7316"], + ["b340", "\u77E6\u77E8\u77EA\u77EF\u77F0\u77F1\u77F2\u77F4\u77F5\u77F7\u77F9\u77FA\u77FB\u77FC\u7803", 5, "\u780A\u780B\u780E\u780F\u7810\u7813\u7815\u7819\u781B\u781E\u7820\u7821\u7822\u7824\u7828\u782A\u782B\u782E\u782F\u7831\u7832\u7833\u7835\u7836\u783D\u783F\u7841\u7842\u7843\u7844\u7846\u7848\u7849\u784A\u784B\u784D\u784F\u7851\u7853\u7854\u7858\u7859\u785A"], + ["b380", "\u785B\u785C\u785E", 11, "\u786F", 7, "\u7878\u7879\u787A\u787B\u787D", 6, "\u573A\u5C1D\u5E38\u957F\u507F\u80A0\u5382\u655E\u7545\u5531\u5021\u8D85\u6284\u949E\u671D\u5632\u6F6E\u5DE2\u5435\u7092\u8F66\u626F\u64A4\u63A3\u5F7B\u6F88\u90F4\u81E3\u8FB0\u5C18\u6668\u5FF1\u6C89\u9648\u8D81\u886C\u6491\u79F0\u57CE\u6A59\u6210\u5448\u4E58\u7A0B\u60E9\u6F84\u8BDA\u627F\u901E\u9A8B\u79E4\u5403\u75F4\u6301\u5319\u6C60\u8FDF\u5F1B\u9A70\u803B\u9F7F\u4F88\u5C3A\u8D64\u7FC5\u65A5\u70BD\u5145\u51B2\u866B\u5D07\u5BA0\u62BD\u916C\u7574\u8E0C\u7A20\u6101\u7B79\u4EC7\u7EF8\u7785\u4E11\u81ED\u521D\u51FA\u6A71\u53A8\u8E87\u9504\u96CF\u6EC1\u9664\u695A"], + ["b440", "\u7884\u7885\u7886\u7888\u788A\u788B\u788F\u7890\u7892\u7894\u7895\u7896\u7899\u789D\u789E\u78A0\u78A2\u78A4\u78A6\u78A8", 7, "\u78B5\u78B6\u78B7\u78B8\u78BA\u78BB\u78BC\u78BD\u78BF\u78C0\u78C2\u78C3\u78C4\u78C6\u78C7\u78C8\u78CC\u78CD\u78CE\u78CF\u78D1\u78D2\u78D3\u78D6\u78D7\u78D8\u78DA", 9], + ["b480", "\u78E4\u78E5\u78E6\u78E7\u78E9\u78EA\u78EB\u78ED", 4, "\u78F3\u78F5\u78F6\u78F8\u78F9\u78FB", 5, "\u7902\u7903\u7904\u7906", 6, "\u7840\u50A8\u77D7\u6410\u89E6\u5904\u63E3\u5DDD\u7A7F\u693D\u4F20\u8239\u5598\u4E32\u75AE\u7A97\u5E62\u5E8A\u95EF\u521B\u5439\u708A\u6376\u9524\u5782\u6625\u693F\u9187\u5507\u6DF3\u7EAF\u8822\u6233\u7EF0\u75B5\u8328\u78C1\u96CC\u8F9E\u6148\u74F7\u8BCD\u6B64\u523A\u8D50\u6B21\u806A\u8471\u56F1\u5306\u4ECE\u4E1B\u51D1\u7C97\u918B\u7C07\u4FC3\u8E7F\u7BE1\u7A9C\u6467\u5D14\u50AC\u8106\u7601\u7CB9\u6DEC\u7FE0\u6751\u5B58\u5BF8\u78CB\u64AE\u6413\u63AA\u632B\u9519\u642D\u8FBE\u7B54\u7629\u6253\u5927\u5446\u6B79\u50A3\u6234\u5E26\u6B86\u4EE3\u8D37\u888B\u5F85\u902E"], + ["b540", "\u790D", 5, "\u7914", 9, "\u791F", 4, "\u7925", 14, "\u7935", 4, "\u793D\u793F\u7942\u7943\u7944\u7945\u7947\u794A", 8, "\u7954\u7955\u7958\u7959\u7961\u7963"], + ["b580", "\u7964\u7966\u7969\u796A\u796B\u796C\u796E\u7970", 6, "\u7979\u797B", 4, "\u7982\u7983\u7986\u7987\u7988\u7989\u798B\u798C\u798D\u798E\u7990\u7991\u7992\u6020\u803D\u62C5\u4E39\u5355\u90F8\u63B8\u80C6\u65E6\u6C2E\u4F46\u60EE\u6DE1\u8BDE\u5F39\u86CB\u5F53\u6321\u515A\u8361\u6863\u5200\u6363\u8E48\u5012\u5C9B\u7977\u5BFC\u5230\u7A3B\u60BC\u9053\u76D7\u5FB7\u5F97\u7684\u8E6C\u706F\u767B\u7B49\u77AA\u51F3\u9093\u5824\u4F4E\u6EF4\u8FEA\u654C\u7B1B\u72C4\u6DA4\u7FDF\u5AE1\u62B5\u5E95\u5730\u8482\u7B2C\u5E1D\u5F1F\u9012\u7F14\u98A0\u6382\u6EC7\u7898\u70B9\u5178\u975B\u57AB\u7535\u4F43\u7538\u5E97\u60E6\u5960\u6DC0\u6BBF\u7889\u53FC\u96D5\u51CB\u5201\u6389\u540A\u9493\u8C03\u8DCC\u7239\u789F\u8776\u8FED\u8C0D\u53E0"], + ["b640", "\u7993", 6, "\u799B", 11, "\u79A8", 10, "\u79B4", 4, "\u79BC\u79BF\u79C2\u79C4\u79C5\u79C7\u79C8\u79CA\u79CC\u79CE\u79CF\u79D0\u79D3\u79D4\u79D6\u79D7\u79D9", 5, "\u79E0\u79E1\u79E2\u79E5\u79E8\u79EA"], + ["b680", "\u79EC\u79EE\u79F1", 6, "\u79F9\u79FA\u79FC\u79FE\u79FF\u7A01\u7A04\u7A05\u7A07\u7A08\u7A09\u7A0A\u7A0C\u7A0F", 4, "\u7A15\u7A16\u7A18\u7A19\u7A1B\u7A1C\u4E01\u76EF\u53EE\u9489\u9876\u9F0E\u952D\u5B9A\u8BA2\u4E22\u4E1C\u51AC\u8463\u61C2\u52A8\u680B\u4F97\u606B\u51BB\u6D1E\u515C\u6296\u6597\u9661\u8C46\u9017\u75D8\u90FD\u7763\u6BD2\u728A\u72EC\u8BFB\u5835\u7779\u8D4C\u675C\u9540\u809A\u5EA6\u6E21\u5992\u7AEF\u77ED\u953B\u6BB5\u65AD\u7F0E\u5806\u5151\u961F\u5BF9\u58A9\u5428\u8E72\u6566\u987F\u56E4\u949D\u76FE\u9041\u6387\u54C6\u591A\u593A\u579B\u8EB2\u6735\u8DFA\u8235\u5241\u60F0\u5815\u86FE\u5CE8\u9E45\u4FC4\u989D\u8BB9\u5A25\u6076\u5384\u627C\u904F\u9102\u997F\u6069\u800C\u513F\u8033\u5C14\u9975\u6D31\u4E8C"], + ["b740", "\u7A1D\u7A1F\u7A21\u7A22\u7A24", 14, "\u7A34\u7A35\u7A36\u7A38\u7A3A\u7A3E\u7A40", 5, "\u7A47", 9, "\u7A52", 4, "\u7A58", 16], + ["b780", "\u7A69", 6, "\u7A71\u7A72\u7A73\u7A75\u7A7B\u7A7C\u7A7D\u7A7E\u7A82\u7A85\u7A87\u7A89\u7A8A\u7A8B\u7A8C\u7A8E\u7A8F\u7A90\u7A93\u7A94\u7A99\u7A9A\u7A9B\u7A9E\u7AA1\u7AA2\u8D30\u53D1\u7F5A\u7B4F\u4F10\u4E4F\u9600\u6CD5\u73D0\u85E9\u5E06\u756A\u7FFB\u6A0A\u77FE\u9492\u7E41\u51E1\u70E6\u53CD\u8FD4\u8303\u8D29\u72AF\u996D\u6CDB\u574A\u82B3\u65B9\u80AA\u623F\u9632\u59A8\u4EFF\u8BBF\u7EBA\u653E\u83F2\u975E\u5561\u98DE\u80A5\u532A\u8BFD\u5420\u80BA\u5E9F\u6CB8\u8D39\u82AC\u915A\u5429\u6C1B\u5206\u7EB7\u575F\u711A\u6C7E\u7C89\u594B\u4EFD\u5FFF\u6124\u7CAA\u4E30\u5C01\u67AB\u8702\u5CF0\u950B\u98CE\u75AF\u70FD\u9022\u51AF\u7F1D\u8BBD\u5949\u51E4\u4F5B\u5426\u592B\u6577\u80A4\u5B75\u6276\u62C2\u8F90\u5E45\u6C1F\u7B26\u4F0F\u4FD8\u670D"], + ["b840", "\u7AA3\u7AA4\u7AA7\u7AA9\u7AAA\u7AAB\u7AAE", 4, "\u7AB4", 10, "\u7AC0", 10, "\u7ACC", 9, "\u7AD7\u7AD8\u7ADA\u7ADB\u7ADC\u7ADD\u7AE1\u7AE2\u7AE4\u7AE7", 5, "\u7AEE\u7AF0\u7AF1\u7AF2\u7AF3"], + ["b880", "\u7AF4", 4, "\u7AFB\u7AFC\u7AFE\u7B00\u7B01\u7B02\u7B05\u7B07\u7B09\u7B0C\u7B0D\u7B0E\u7B10\u7B12\u7B13\u7B16\u7B17\u7B18\u7B1A\u7B1C\u7B1D\u7B1F\u7B21\u7B22\u7B23\u7B27\u7B29\u7B2D\u6D6E\u6DAA\u798F\u88B1\u5F17\u752B\u629A\u8F85\u4FEF\u91DC\u65A7\u812F\u8151\u5E9C\u8150\u8D74\u526F\u8986\u8D4B\u590D\u5085\u4ED8\u961C\u7236\u8179\u8D1F\u5BCC\u8BA3\u9644\u5987\u7F1A\u5490\u5676\u560E\u8BE5\u6539\u6982\u9499\u76D6\u6E89\u5E72\u7518\u6746\u67D1\u7AFF\u809D\u8D76\u611F\u79C6\u6562\u8D63\u5188\u521A\u94A2\u7F38\u809B\u7EB2\u5C97\u6E2F\u6760\u7BD9\u768B\u9AD8\u818F\u7F94\u7CD5\u641E\u9550\u7A3F\u544A\u54E5\u6B4C\u6401\u6208\u9E3D\u80F3\u7599\u5272\u9769\u845B\u683C\u86E4\u9601\u9694\u94EC\u4E2A\u5404\u7ED9\u6839\u8DDF\u8015\u66F4\u5E9A\u7FB9"], + ["b940", "\u7B2F\u7B30\u7B32\u7B34\u7B35\u7B36\u7B37\u7B39\u7B3B\u7B3D\u7B3F", 5, "\u7B46\u7B48\u7B4A\u7B4D\u7B4E\u7B53\u7B55\u7B57\u7B59\u7B5C\u7B5E\u7B5F\u7B61\u7B63", 10, "\u7B6F\u7B70\u7B73\u7B74\u7B76\u7B78\u7B7A\u7B7C\u7B7D\u7B7F\u7B81\u7B82\u7B83\u7B84\u7B86", 6, "\u7B8E\u7B8F"], + ["b980", "\u7B91\u7B92\u7B93\u7B96\u7B98\u7B99\u7B9A\u7B9B\u7B9E\u7B9F\u7BA0\u7BA3\u7BA4\u7BA5\u7BAE\u7BAF\u7BB0\u7BB2\u7BB3\u7BB5\u7BB6\u7BB7\u7BB9", 7, "\u7BC2\u7BC3\u7BC4\u57C2\u803F\u6897\u5DE5\u653B\u529F\u606D\u9F9A\u4F9B\u8EAC\u516C\u5BAB\u5F13\u5DE9\u6C5E\u62F1\u8D21\u5171\u94A9\u52FE\u6C9F\u82DF\u72D7\u57A2\u6784\u8D2D\u591F\u8F9C\u83C7\u5495\u7B8D\u4F30\u6CBD\u5B64\u59D1\u9F13\u53E4\u86CA\u9AA8\u8C37\u80A1\u6545\u987E\u56FA\u96C7\u522E\u74DC\u5250\u5BE1\u6302\u8902\u4E56\u62D0\u602A\u68FA\u5173\u5B98\u51A0\u89C2\u7BA1\u9986\u7F50\u60EF\u704C\u8D2F\u5149\u5E7F\u901B\u7470\u89C4\u572D\u7845\u5F52\u9F9F\u95FA\u8F68\u9B3C\u8BE1\u7678\u6842\u67DC\u8DEA\u8D35\u523D\u8F8A\u6EDA\u68CD\u9505\u90ED\u56FD\u679C\u88F9\u8FC7\u54C8"], + ["ba40", "\u7BC5\u7BC8\u7BC9\u7BCA\u7BCB\u7BCD\u7BCE\u7BCF\u7BD0\u7BD2\u7BD4", 4, "\u7BDB\u7BDC\u7BDE\u7BDF\u7BE0\u7BE2\u7BE3\u7BE4\u7BE7\u7BE8\u7BE9\u7BEB\u7BEC\u7BED\u7BEF\u7BF0\u7BF2", 4, "\u7BF8\u7BF9\u7BFA\u7BFB\u7BFD\u7BFF", 7, "\u7C08\u7C09\u7C0A\u7C0D\u7C0E\u7C10", 5, "\u7C17\u7C18\u7C19"], + ["ba80", "\u7C1A", 4, "\u7C20", 5, "\u7C28\u7C29\u7C2B", 12, "\u7C39", 5, "\u7C42\u9AB8\u5B69\u6D77\u6C26\u4EA5\u5BB3\u9A87\u9163\u61A8\u90AF\u97E9\u542B\u6DB5\u5BD2\u51FD\u558A\u7F55\u7FF0\u64BC\u634D\u65F1\u61BE\u608D\u710A\u6C57\u6C49\u592F\u676D\u822A\u58D5\u568E\u8C6A\u6BEB\u90DD\u597D\u8017\u53F7\u6D69\u5475\u559D\u8377\u83CF\u6838\u79BE\u548C\u4F55\u5408\u76D2\u8C89\u9602\u6CB3\u6DB8\u8D6B\u8910\u9E64\u8D3A\u563F\u9ED1\u75D5\u5F88\u72E0\u6068\u54FC\u4EA8\u6A2A\u8861\u6052\u8F70\u54C4\u70D8\u8679\u9E3F\u6D2A\u5B8F\u5F18\u7EA2\u5589\u4FAF\u7334\u543C\u539A\u5019\u540E\u547C\u4E4E\u5FFD\u745A\u58F6\u846B\u80E1\u8774\u72D0\u7CCA\u6E56"], + ["bb40", "\u7C43", 9, "\u7C4E", 36, "\u7C75", 5, "\u7C7E", 9], + ["bb80", "\u7C88\u7C8A", 6, "\u7C93\u7C94\u7C96\u7C99\u7C9A\u7C9B\u7CA0\u7CA1\u7CA3\u7CA6\u7CA7\u7CA8\u7CA9\u7CAB\u7CAC\u7CAD\u7CAF\u7CB0\u7CB4", 4, "\u7CBA\u7CBB\u5F27\u864E\u552C\u62A4\u4E92\u6CAA\u6237\u82B1\u54D7\u534E\u733E\u6ED1\u753B\u5212\u5316\u8BDD\u69D0\u5F8A\u6000\u6DEE\u574F\u6B22\u73AF\u6853\u8FD8\u7F13\u6362\u60A3\u5524\u75EA\u8C62\u7115\u6DA3\u5BA6\u5E7B\u8352\u614C\u9EC4\u78FA\u8757\u7C27\u7687\u51F0\u60F6\u714C\u6643\u5E4C\u604D\u8C0E\u7070\u6325\u8F89\u5FBD\u6062\u86D4\u56DE\u6BC1\u6094\u6167\u5349\u60E0\u6666\u8D3F\u79FD\u4F1A\u70E9\u6C47\u8BB3\u8BF2\u7ED8\u8364\u660F\u5A5A\u9B42\u6D51\u6DF7\u8C41\u6D3B\u4F19\u706B\u83B7\u6216\u60D1\u970D\u8D27\u7978\u51FB\u573E\u57FA\u673A\u7578\u7A3D\u79EF\u7B95"], + ["bc40", "\u7CBF\u7CC0\u7CC2\u7CC3\u7CC4\u7CC6\u7CC9\u7CCB\u7CCE", 6, "\u7CD8\u7CDA\u7CDB\u7CDD\u7CDE\u7CE1", 6, "\u7CE9", 5, "\u7CF0", 7, "\u7CF9\u7CFA\u7CFC", 13, "\u7D0B", 5], + ["bc80", "\u7D11", 14, "\u7D21\u7D23\u7D24\u7D25\u7D26\u7D28\u7D29\u7D2A\u7D2C\u7D2D\u7D2E\u7D30", 6, "\u808C\u9965\u8FF9\u6FC0\u8BA5\u9E21\u59EC\u7EE9\u7F09\u5409\u6781\u68D8\u8F91\u7C4D\u96C6\u53CA\u6025\u75BE\u6C72\u5373\u5AC9\u7EA7\u6324\u51E0\u810A\u5DF1\u84DF\u6280\u5180\u5B63\u4F0E\u796D\u5242\u60B8\u6D4E\u5BC4\u5BC2\u8BA1\u8BB0\u65E2\u5FCC\u9645\u5993\u7EE7\u7EAA\u5609\u67B7\u5939\u4F73\u5BB6\u52A0\u835A\u988A\u8D3E\u7532\u94BE\u5047\u7A3C\u4EF7\u67B6\u9A7E\u5AC1\u6B7C\u76D1\u575A\u5C16\u7B3A\u95F4\u714E\u517C\u80A9\u8270\u5978\u7F04\u8327\u68C0\u67EC\u78B1\u7877\u62E3\u6361\u7B80\u4FED\u526A\u51CF\u8350\u69DB\u9274\u8DF5\u8D31\u89C1\u952E\u7BAD\u4EF6"], + ["bd40", "\u7D37", 54, "\u7D6F", 7], + ["bd80", "\u7D78", 32, "\u5065\u8230\u5251\u996F\u6E10\u6E85\u6DA7\u5EFA\u50F5\u59DC\u5C06\u6D46\u6C5F\u7586\u848B\u6868\u5956\u8BB2\u5320\u9171\u964D\u8549\u6912\u7901\u7126\u80F6\u4EA4\u90CA\u6D47\u9A84\u5A07\u56BC\u6405\u94F0\u77EB\u4FA5\u811A\u72E1\u89D2\u997A\u7F34\u7EDE\u527F\u6559\u9175\u8F7F\u8F83\u53EB\u7A96\u63ED\u63A5\u7686\u79F8\u8857\u9636\u622A\u52AB\u8282\u6854\u6770\u6377\u776B\u7AED\u6D01\u7ED3\u89E3\u59D0\u6212\u85C9\u82A5\u754C\u501F\u4ECB\u75A5\u8BEB\u5C4A\u5DFE\u7B4B\u65A4\u91D1\u4ECA\u6D25\u895F\u7D27\u9526\u4EC5\u8C28\u8FDB\u9773\u664B\u7981\u8FD1\u70EC\u6D78"], + ["be40", "\u7D99", 12, "\u7DA7", 6, "\u7DAF", 42], + ["be80", "\u7DDA", 32, "\u5C3D\u52B2\u8346\u5162\u830E\u775B\u6676\u9CB8\u4EAC\u60CA\u7CBE\u7CB3\u7ECF\u4E95\u8B66\u666F\u9888\u9759\u5883\u656C\u955C\u5F84\u75C9\u9756\u7ADF\u7ADE\u51C0\u70AF\u7A98\u63EA\u7A76\u7EA0\u7396\u97ED\u4E45\u7078\u4E5D\u9152\u53A9\u6551\u65E7\u81FC\u8205\u548E\u5C31\u759A\u97A0\u62D8\u72D9\u75BD\u5C45\u9A79\u83CA\u5C40\u5480\u77E9\u4E3E\u6CAE\u805A\u62D2\u636E\u5DE8\u5177\u8DDD\u8E1E\u952F\u4FF1\u53E5\u60E7\u70AC\u5267\u6350\u9E43\u5A1F\u5026\u7737\u5377\u7EE2\u6485\u652B\u6289\u6398\u5014\u7235\u89C9\u51B3\u8BC0\u7EDD\u5747\u83CC\u94A7\u519B\u541B\u5CFB"], + ["bf40", "\u7DFB", 62], + ["bf80", "\u7E3A\u7E3C", 4, "\u7E42", 4, "\u7E48", 21, "\u4FCA\u7AE3\u6D5A\u90E1\u9A8F\u5580\u5496\u5361\u54AF\u5F00\u63E9\u6977\u51EF\u6168\u520A\u582A\u52D8\u574E\u780D\u770B\u5EB7\u6177\u7CE0\u625B\u6297\u4EA2\u7095\u8003\u62F7\u70E4\u9760\u5777\u82DB\u67EF\u68F5\u78D5\u9897\u79D1\u58F3\u54B3\u53EF\u6E34\u514B\u523B\u5BA2\u8BFE\u80AF\u5543\u57A6\u6073\u5751\u542D\u7A7A\u6050\u5B54\u63A7\u62A0\u53E3\u6263\u5BC7\u67AF\u54ED\u7A9F\u82E6\u9177\u5E93\u88E4\u5938\u57AE\u630E\u8DE8\u80EF\u5757\u7B77\u4FA9\u5FEB\u5BBD\u6B3E\u5321\u7B50\u72C2\u6846\u77FF\u7736\u65F7\u51B5\u4E8F\u76D4\u5CBF\u7AA5\u8475\u594E\u9B41\u5080"], + ["c040", "\u7E5E", 35, "\u7E83", 23, "\u7E9C\u7E9D\u7E9E"], + ["c080", "\u7EAE\u7EB4\u7EBB\u7EBC\u7ED6\u7EE4\u7EEC\u7EF9\u7F0A\u7F10\u7F1E\u7F37\u7F39\u7F3B", 6, "\u7F43\u7F46", 9, "\u7F52\u7F53\u9988\u6127\u6E83\u5764\u6606\u6346\u56F0\u62EC\u6269\u5ED3\u9614\u5783\u62C9\u5587\u8721\u814A\u8FA3\u5566\u83B1\u6765\u8D56\u84DD\u5A6A\u680F\u62E6\u7BEE\u9611\u5170\u6F9C\u8C30\u63FD\u89C8\u61D2\u7F06\u70C2\u6EE5\u7405\u6994\u72FC\u5ECA\u90CE\u6717\u6D6A\u635E\u52B3\u7262\u8001\u4F6C\u59E5\u916A\u70D9\u6D9D\u52D2\u4E50\u96F7\u956D\u857E\u78CA\u7D2F\u5121\u5792\u64C2\u808B\u7C7B\u6CEA\u68F1\u695E\u51B7\u5398\u68A8\u7281\u9ECE\u7BF1\u72F8\u79BB\u6F13\u7406\u674E\u91CC\u9CA4\u793C\u8389\u8354\u540F\u6817\u4E3D\u5389\u52B1\u783E\u5386\u5229\u5088\u4F8B\u4FD0"], + ["c140", "\u7F56\u7F59\u7F5B\u7F5C\u7F5D\u7F5E\u7F60\u7F63", 4, "\u7F6B\u7F6C\u7F6D\u7F6F\u7F70\u7F73\u7F75\u7F76\u7F77\u7F78\u7F7A\u7F7B\u7F7C\u7F7D\u7F7F\u7F80\u7F82", 7, "\u7F8B\u7F8D\u7F8F", 4, "\u7F95", 4, "\u7F9B\u7F9C\u7FA0\u7FA2\u7FA3\u7FA5\u7FA6\u7FA8", 6, "\u7FB1"], + ["c180", "\u7FB3", 4, "\u7FBA\u7FBB\u7FBE\u7FC0\u7FC2\u7FC3\u7FC4\u7FC6\u7FC7\u7FC8\u7FC9\u7FCB\u7FCD\u7FCF", 4, "\u7FD6\u7FD7\u7FD9", 5, "\u7FE2\u7FE3\u75E2\u7ACB\u7C92\u6CA5\u96B6\u529B\u7483\u54E9\u4FE9\u8054\u83B2\u8FDE\u9570\u5EC9\u601C\u6D9F\u5E18\u655B\u8138\u94FE\u604B\u70BC\u7EC3\u7CAE\u51C9\u6881\u7CB1\u826F\u4E24\u8F86\u91CF\u667E\u4EAE\u8C05\u64A9\u804A\u50DA\u7597\u71CE\u5BE5\u8FBD\u6F66\u4E86\u6482\u9563\u5ED6\u6599\u5217\u88C2\u70C8\u52A3\u730E\u7433\u6797\u78F7\u9716\u4E34\u90BB\u9CDE\u6DCB\u51DB\u8D41\u541D\u62CE\u73B2\u83F1\u96F6\u9F84\u94C3\u4F36\u7F9A\u51CC\u7075\u9675\u5CAD\u9886\u53E6\u4EE4\u6E9C\u7409\u69B4\u786B\u998F\u7559\u5218\u7624\u6D41\u67F3\u516D\u9F99\u804B\u5499\u7B3C\u7ABF"], + ["c240", "\u7FE4\u7FE7\u7FE8\u7FEA\u7FEB\u7FEC\u7FED\u7FEF\u7FF2\u7FF4", 6, "\u7FFD\u7FFE\u7FFF\u8002\u8007\u8008\u8009\u800A\u800E\u800F\u8011\u8013\u801A\u801B\u801D\u801E\u801F\u8021\u8023\u8024\u802B", 5, "\u8032\u8034\u8039\u803A\u803C\u803E\u8040\u8041\u8044\u8045\u8047\u8048\u8049\u804E\u804F\u8050\u8051\u8053\u8055\u8056\u8057"], + ["c280", "\u8059\u805B", 13, "\u806B", 5, "\u8072", 11, "\u9686\u5784\u62E2\u9647\u697C\u5A04\u6402\u7BD3\u6F0F\u964B\u82A6\u5362\u9885\u5E90\u7089\u63B3\u5364\u864F\u9C81\u9E93\u788C\u9732\u8DEF\u8D42\u9E7F\u6F5E\u7984\u5F55\u9646\u622E\u9A74\u5415\u94DD\u4FA3\u65C5\u5C65\u5C61\u7F15\u8651\u6C2F\u5F8B\u7387\u6EE4\u7EFF\u5CE6\u631B\u5B6A\u6EE6\u5375\u4E71\u63A0\u7565\u62A1\u8F6E\u4F26\u4ED1\u6CA6\u7EB6\u8BBA\u841D\u87BA\u7F57\u903B\u9523\u7BA9\u9AA1\u88F8\u843D\u6D1B\u9A86\u7EDC\u5988\u9EBB\u739B\u7801\u8682\u9A6C\u9A82\u561B\u5417\u57CB\u4E70\u9EA6\u5356\u8FC8\u8109\u7792\u9992\u86EE\u6EE1\u8513\u66FC\u6162\u6F2B"], + ["c340", "\u807E\u8081\u8082\u8085\u8088\u808A\u808D", 5, "\u8094\u8095\u8097\u8099\u809E\u80A3\u80A6\u80A7\u80A8\u80AC\u80B0\u80B3\u80B5\u80B6\u80B8\u80B9\u80BB\u80C5\u80C7", 4, "\u80CF", 6, "\u80D8\u80DF\u80E0\u80E2\u80E3\u80E6\u80EE\u80F5\u80F7\u80F9\u80FB\u80FE\u80FF\u8100\u8101\u8103\u8104\u8105\u8107\u8108\u810B"], + ["c380", "\u810C\u8115\u8117\u8119\u811B\u811C\u811D\u811F", 12, "\u812D\u812E\u8130\u8133\u8134\u8135\u8137\u8139", 4, "\u813F\u8C29\u8292\u832B\u76F2\u6C13\u5FD9\u83BD\u732B\u8305\u951A\u6BDB\u77DB\u94C6\u536F\u8302\u5192\u5E3D\u8C8C\u8D38\u4E48\u73AB\u679A\u6885\u9176\u9709\u7164\u6CA1\u7709\u5A92\u9541\u6BCF\u7F8E\u6627\u5BD0\u59B9\u5A9A\u95E8\u95F7\u4EEC\u840C\u8499\u6AAC\u76DF\u9530\u731B\u68A6\u5B5F\u772F\u919A\u9761\u7CDC\u8FF7\u8C1C\u5F25\u7C73\u79D8\u89C5\u6CCC\u871C\u5BC6\u5E42\u68C9\u7720\u7EF5\u5195\u514D\u52C9\u5A29\u7F05\u9762\u82D7\u63CF\u7784\u85D0\u79D2\u6E3A\u5E99\u5999\u8511\u706D\u6C11\u62BF\u76BF\u654F\u60AF\u95FD\u660E\u879F\u9E23\u94ED\u540D\u547D\u8C2C\u6478"], + ["c440", "\u8140", 5, "\u8147\u8149\u814D\u814E\u814F\u8152\u8156\u8157\u8158\u815B", 4, "\u8161\u8162\u8163\u8164\u8166\u8168\u816A\u816B\u816C\u816F\u8172\u8173\u8175\u8176\u8177\u8178\u8181\u8183", 4, "\u8189\u818B\u818C\u818D\u818E\u8190\u8192", 5, "\u8199\u819A\u819E", 4, "\u81A4\u81A5"], + ["c480", "\u81A7\u81A9\u81AB", 7, "\u81B4", 5, "\u81BC\u81BD\u81BE\u81BF\u81C4\u81C5\u81C7\u81C8\u81C9\u81CB\u81CD", 6, "\u6479\u8611\u6A21\u819C\u78E8\u6469\u9B54\u62B9\u672B\u83AB\u58A8\u9ED8\u6CAB\u6F20\u5BDE\u964C\u8C0B\u725F\u67D0\u62C7\u7261\u4EA9\u59C6\u6BCD\u5893\u66AE\u5E55\u52DF\u6155\u6728\u76EE\u7766\u7267\u7A46\u62FF\u54EA\u5450\u94A0\u90A3\u5A1C\u7EB3\u6C16\u4E43\u5976\u8010\u5948\u5357\u7537\u96BE\u56CA\u6320\u8111\u607C\u95F9\u6DD6\u5462\u9981\u5185\u5AE9\u80FD\u59AE\u9713\u502A\u6CE5\u5C3C\u62DF\u4F60\u533F\u817B\u9006\u6EBA\u852B\u62C8\u5E74\u78BE\u64B5\u637B\u5FF5\u5A18\u917F\u9E1F\u5C3F\u634F\u8042\u5B7D\u556E\u954A\u954D\u6D85\u60A8\u67E0\u72DE\u51DD\u5B81"], + ["c540", "\u81D4", 14, "\u81E4\u81E5\u81E6\u81E8\u81E9\u81EB\u81EE", 4, "\u81F5", 5, "\u81FD\u81FF\u8203\u8207", 4, "\u820E\u820F\u8211\u8213\u8215", 5, "\u821D\u8220\u8224\u8225\u8226\u8227\u8229\u822E\u8232\u823A\u823C\u823D\u823F"], + ["c580", "\u8240\u8241\u8242\u8243\u8245\u8246\u8248\u824A\u824C\u824D\u824E\u8250", 7, "\u8259\u825B\u825C\u825D\u825E\u8260", 7, "\u8269\u62E7\u6CDE\u725B\u626D\u94AE\u7EBD\u8113\u6D53\u519C\u5F04\u5974\u52AA\u6012\u5973\u6696\u8650\u759F\u632A\u61E6\u7CEF\u8BFA\u54E6\u6B27\u9E25\u6BB4\u85D5\u5455\u5076\u6CA4\u556A\u8DB4\u722C\u5E15\u6015\u7436\u62CD\u6392\u724C\u5F98\u6E43\u6D3E\u6500\u6F58\u76D8\u78D0\u76FC\u7554\u5224\u53DB\u4E53\u5E9E\u65C1\u802A\u80D6\u629B\u5486\u5228\u70AE\u888D\u8DD1\u6CE1\u5478\u80DA\u57F9\u88F4\u8D54\u966A\u914D\u4F69\u6C9B\u55B7\u76C6\u7830\u62A8\u70F9\u6F8E\u5F6D\u84EC\u68DA\u787C\u7BF7\u81A8\u670B\u9E4F\u6367\u78B0\u576F\u7812\u9739\u6279\u62AB\u5288\u7435\u6BD7"], + ["c640", "\u826A\u826B\u826C\u826D\u8271\u8275\u8276\u8277\u8278\u827B\u827C\u8280\u8281\u8283\u8285\u8286\u8287\u8289\u828C\u8290\u8293\u8294\u8295\u8296\u829A\u829B\u829E\u82A0\u82A2\u82A3\u82A7\u82B2\u82B5\u82B6\u82BA\u82BB\u82BC\u82BF\u82C0\u82C2\u82C3\u82C5\u82C6\u82C9\u82D0\u82D6\u82D9\u82DA\u82DD\u82E2\u82E7\u82E8\u82E9\u82EA\u82EC\u82ED\u82EE\u82F0\u82F2\u82F3\u82F5\u82F6\u82F8"], + ["c680", "\u82FA\u82FC", 4, "\u830A\u830B\u830D\u8310\u8312\u8313\u8316\u8318\u8319\u831D", 9, "\u8329\u832A\u832E\u8330\u8332\u8337\u833B\u833D\u5564\u813E\u75B2\u76AE\u5339\u75DE\u50FB\u5C41\u8B6C\u7BC7\u504F\u7247\u9A97\u98D8\u6F02\u74E2\u7968\u6487\u77A5\u62FC\u9891\u8D2B\u54C1\u8058\u4E52\u576A\u82F9\u840D\u5E73\u51ED\u74F6\u8BC4\u5C4F\u5761\u6CFC\u9887\u5A46\u7834\u9B44\u8FEB\u7C95\u5256\u6251\u94FA\u4EC6\u8386\u8461\u83E9\u84B2\u57D4\u6734\u5703\u666E\u6D66\u8C31\u66DD\u7011\u671F\u6B3A\u6816\u621A\u59BB\u4E03\u51C4\u6F06\u67D2\u6C8F\u5176\u68CB\u5947\u6B67\u7566\u5D0E\u8110\u9F50\u65D7\u7948\u7941\u9A91\u8D77\u5C82\u4E5E\u4F01\u542F\u5951\u780C\u5668\u6C14\u8FC4\u5F03\u6C7D\u6CE3\u8BAB\u6390"], + ["c740", "\u833E\u833F\u8341\u8342\u8344\u8345\u8348\u834A", 4, "\u8353\u8355", 4, "\u835D\u8362\u8370", 6, "\u8379\u837A\u837E", 6, "\u8387\u8388\u838A\u838B\u838C\u838D\u838F\u8390\u8391\u8394\u8395\u8396\u8397\u8399\u839A\u839D\u839F\u83A1", 6, "\u83AC\u83AD\u83AE"], + ["c780", "\u83AF\u83B5\u83BB\u83BE\u83BF\u83C2\u83C3\u83C4\u83C6\u83C8\u83C9\u83CB\u83CD\u83CE\u83D0\u83D1\u83D2\u83D3\u83D5\u83D7\u83D9\u83DA\u83DB\u83DE\u83E2\u83E3\u83E4\u83E6\u83E7\u83E8\u83EB\u83EC\u83ED\u6070\u6D3D\u7275\u6266\u948E\u94C5\u5343\u8FC1\u7B7E\u4EDF\u8C26\u4E7E\u9ED4\u94B1\u94B3\u524D\u6F5C\u9063\u6D45\u8C34\u5811\u5D4C\u6B20\u6B49\u67AA\u545B\u8154\u7F8C\u5899\u8537\u5F3A\u62A2\u6A47\u9539\u6572\u6084\u6865\u77A7\u4E54\u4FA8\u5DE7\u9798\u64AC\u7FD8\u5CED\u4FCF\u7A8D\u5207\u8304\u4E14\u602F\u7A83\u94A6\u4FB5\u4EB2\u79E6\u7434\u52E4\u82B9\u64D2\u79BD\u5BDD\u6C81\u9752\u8F7B\u6C22\u503E\u537F\u6E05\u64CE\u6674\u6C30\u60C5\u9877\u8BF7\u5E86\u743C\u7A77\u79CB\u4E18\u90B1\u7403\u6C42\u56DA\u914B\u6CC5\u8D8B\u533A\u86C6\u66F2\u8EAF\u5C48\u9A71\u6E20"], + ["c840", "\u83EE\u83EF\u83F3", 4, "\u83FA\u83FB\u83FC\u83FE\u83FF\u8400\u8402\u8405\u8407\u8408\u8409\u840A\u8410\u8412", 5, "\u8419\u841A\u841B\u841E", 5, "\u8429", 7, "\u8432", 5, "\u8439\u843A\u843B\u843E", 7, "\u8447\u8448\u8449"], + ["c880", "\u844A", 6, "\u8452", 4, "\u8458\u845D\u845E\u845F\u8460\u8462\u8464", 4, "\u846A\u846E\u846F\u8470\u8472\u8474\u8477\u8479\u847B\u847C\u53D6\u5A36\u9F8B\u8DA3\u53BB\u5708\u98A7\u6743\u919B\u6CC9\u5168\u75CA\u62F3\u72AC\u5238\u529D\u7F3A\u7094\u7638\u5374\u9E4A\u69B7\u786E\u96C0\u88D9\u7FA4\u7136\u71C3\u5189\u67D3\u74E4\u58E4\u6518\u56B7\u8BA9\u9976\u6270\u7ED5\u60F9\u70ED\u58EC\u4EC1\u4EBA\u5FCD\u97E7\u4EFB\u8BA4\u5203\u598A\u7EAB\u6254\u4ECD\u65E5\u620E\u8338\u84C9\u8363\u878D\u7194\u6EB6\u5BB9\u7ED2\u5197\u63C9\u67D4\u8089\u8339\u8815\u5112\u5B7A\u5982\u8FB1\u4E73\u6C5D\u5165\u8925\u8F6F\u962E\u854A\u745E\u9510\u95F0\u6DA6\u82E5\u5F31\u6492\u6D12\u8428\u816E\u9CC3\u585E\u8D5B\u4E09\u53C1"], + ["c940", "\u847D", 4, "\u8483\u8484\u8485\u8486\u848A\u848D\u848F", 7, "\u8498\u849A\u849B\u849D\u849E\u849F\u84A0\u84A2", 12, "\u84B0\u84B1\u84B3\u84B5\u84B6\u84B7\u84BB\u84BC\u84BE\u84C0\u84C2\u84C3\u84C5\u84C6\u84C7\u84C8\u84CB\u84CC\u84CE\u84CF\u84D2\u84D4\u84D5\u84D7"], + ["c980", "\u84D8", 4, "\u84DE\u84E1\u84E2\u84E4\u84E7", 4, "\u84ED\u84EE\u84EF\u84F1", 10, "\u84FD\u84FE\u8500\u8501\u8502\u4F1E\u6563\u6851\u55D3\u4E27\u6414\u9A9A\u626B\u5AC2\u745F\u8272\u6DA9\u68EE\u50E7\u838E\u7802\u6740\u5239\u6C99\u7EB1\u50BB\u5565\u715E\u7B5B\u6652\u73CA\u82EB\u6749\u5C71\u5220\u717D\u886B\u95EA\u9655\u64C5\u8D61\u81B3\u5584\u6C55\u6247\u7F2E\u5892\u4F24\u5546\u8D4F\u664C\u4E0A\u5C1A\u88F3\u68A2\u634E\u7A0D\u70E7\u828D\u52FA\u97F6\u5C11\u54E8\u90B5\u7ECD\u5962\u8D4A\u86C7\u820C\u820D\u8D66\u6444\u5C04\u6151\u6D89\u793E\u8BBE\u7837\u7533\u547B\u4F38\u8EAB\u6DF1\u5A20\u7EC5\u795E\u6C88\u5BA1\u5A76\u751A\u80BE\u614E\u6E17\u58F0\u751F\u7525\u7272\u5347\u7EF3"], + ["ca40", "\u8503", 8, "\u850D\u850E\u850F\u8510\u8512\u8514\u8515\u8516\u8518\u8519\u851B\u851C\u851D\u851E\u8520\u8522", 8, "\u852D", 9, "\u853E", 4, "\u8544\u8545\u8546\u8547\u854B", 10], + ["ca80", "\u8557\u8558\u855A\u855B\u855C\u855D\u855F", 4, "\u8565\u8566\u8567\u8569", 8, "\u8573\u8575\u8576\u8577\u8578\u857C\u857D\u857F\u8580\u8581\u7701\u76DB\u5269\u80DC\u5723\u5E08\u5931\u72EE\u65BD\u6E7F\u8BD7\u5C38\u8671\u5341\u77F3\u62FE\u65F6\u4EC0\u98DF\u8680\u5B9E\u8BC6\u53F2\u77E2\u4F7F\u5C4E\u9A76\u59CB\u5F0F\u793A\u58EB\u4E16\u67FF\u4E8B\u62ED\u8A93\u901D\u52BF\u662F\u55DC\u566C\u9002\u4ED5\u4F8D\u91CA\u9970\u6C0F\u5E02\u6043\u5BA4\u89C6\u8BD5\u6536\u624B\u9996\u5B88\u5BFF\u6388\u552E\u53D7\u7626\u517D\u852C\u67A2\u68B3\u6B8A\u6292\u8F93\u53D4\u8212\u6DD1\u758F\u4E66\u8D4E\u5B70\u719F\u85AF\u6691\u66D9\u7F72\u8700\u9ECD\u9F20\u5C5E\u672F\u8FF0\u6811\u675F\u620D\u7AD6\u5885\u5EB6\u6570\u6F31"], + ["cb40", "\u8582\u8583\u8586\u8588", 6, "\u8590", 10, "\u859D", 6, "\u85A5\u85A6\u85A7\u85A9\u85AB\u85AC\u85AD\u85B1", 5, "\u85B8\u85BA", 6, "\u85C2", 6, "\u85CA", 4, "\u85D1\u85D2"], + ["cb80", "\u85D4\u85D6", 5, "\u85DD", 6, "\u85E5\u85E6\u85E7\u85E8\u85EA", 14, "\u6055\u5237\u800D\u6454\u8870\u7529\u5E05\u6813\u62F4\u971C\u53CC\u723D\u8C01\u6C34\u7761\u7A0E\u542E\u77AC\u987A\u821C\u8BF4\u7855\u6714\u70C1\u65AF\u6495\u5636\u601D\u79C1\u53F8\u4E1D\u6B7B\u8086\u5BFA\u55E3\u56DB\u4F3A\u4F3C\u9972\u5DF3\u677E\u8038\u6002\u9882\u9001\u5B8B\u8BBC\u8BF5\u641C\u8258\u64DE\u55FD\u82CF\u9165\u4FD7\u7D20\u901F\u7C9F\u50F3\u5851\u6EAF\u5BBF\u8BC9\u8083\u9178\u849C\u7B97\u867D\u968B\u968F\u7EE5\u9AD3\u788E\u5C81\u7A57\u9042\u96A7\u795F\u5B59\u635F\u7B0B\u84D1\u68AD\u5506\u7F29\u7410\u7D22\u9501\u6240\u584C\u4ED6\u5B83\u5979\u5854"], + ["cc40", "\u85F9\u85FA\u85FC\u85FD\u85FE\u8600", 4, "\u8606", 10, "\u8612\u8613\u8614\u8615\u8617", 15, "\u8628\u862A", 13, "\u8639\u863A\u863B\u863D\u863E\u863F\u8640"], + ["cc80", "\u8641", 11, "\u8652\u8653\u8655", 4, "\u865B\u865C\u865D\u865F\u8660\u8661\u8663", 7, "\u736D\u631E\u8E4B\u8E0F\u80CE\u82D4\u62AC\u53F0\u6CF0\u915E\u592A\u6001\u6C70\u574D\u644A\u8D2A\u762B\u6EE9\u575B\u6A80\u75F0\u6F6D\u8C2D\u8C08\u5766\u6BEF\u8892\u78B3\u63A2\u53F9\u70AD\u6C64\u5858\u642A\u5802\u68E0\u819B\u5510\u7CD6\u5018\u8EBA\u6DCC\u8D9F\u70EB\u638F\u6D9B\u6ED4\u7EE6\u8404\u6843\u9003\u6DD8\u9676\u8BA8\u5957\u7279\u85E4\u817E\u75BC\u8A8A\u68AF\u5254\u8E22\u9511\u63D0\u9898\u8E44\u557C\u4F53\u66FF\u568F\u60D5\u6D95\u5243\u5C49\u5929\u6DFB\u586B\u7530\u751C\u606C\u8214\u8146\u6311\u6761\u8FE2\u773A\u8DF3\u8D34\u94C1\u5E16\u5385\u542C\u70C3"], + ["cd40", "\u866D\u866F\u8670\u8672", 6, "\u8683", 6, "\u868E", 4, "\u8694\u8696", 5, "\u869E", 4, "\u86A5\u86A6\u86AB\u86AD\u86AE\u86B2\u86B3\u86B7\u86B8\u86B9\u86BB", 4, "\u86C1\u86C2\u86C3\u86C5\u86C8\u86CC\u86CD\u86D2\u86D3\u86D5\u86D6\u86D7\u86DA\u86DC"], + ["cd80", "\u86DD\u86E0\u86E1\u86E2\u86E3\u86E5\u86E6\u86E7\u86E8\u86EA\u86EB\u86EC\u86EF\u86F5\u86F6\u86F7\u86FA\u86FB\u86FC\u86FD\u86FF\u8701\u8704\u8705\u8706\u870B\u870C\u870E\u870F\u8710\u8711\u8714\u8716\u6C40\u5EF7\u505C\u4EAD\u5EAD\u633A\u8247\u901A\u6850\u916E\u77B3\u540C\u94DC\u5F64\u7AE5\u6876\u6345\u7B52\u7EDF\u75DB\u5077\u6295\u5934\u900F\u51F8\u79C3\u7A81\u56FE\u5F92\u9014\u6D82\u5C60\u571F\u5410\u5154\u6E4D\u56E2\u63A8\u9893\u817F\u8715\u892A\u9000\u541E\u5C6F\u81C0\u62D6\u6258\u8131\u9E35\u9640\u9A6E\u9A7C\u692D\u59A5\u62D3\u553E\u6316\u54C7\u86D9\u6D3C\u5A03\u74E6\u889C\u6B6A\u5916\u8C4C\u5F2F\u6E7E\u73A9\u987D\u4E38\u70F7\u5B8C\u7897\u633D\u665A\u7696\u60CB\u5B9B\u5A49\u4E07\u8155\u6C6A\u738B\u4EA1\u6789\u7F51\u5F80\u65FA\u671B\u5FD8\u5984\u5A01"], + ["ce40", "\u8719\u871B\u871D\u871F\u8720\u8724\u8726\u8727\u8728\u872A\u872B\u872C\u872D\u872F\u8730\u8732\u8733\u8735\u8736\u8738\u8739\u873A\u873C\u873D\u8740", 6, "\u874A\u874B\u874D\u874F\u8750\u8751\u8752\u8754\u8755\u8756\u8758\u875A", 5, "\u8761\u8762\u8766", 7, "\u876F\u8771\u8772\u8773\u8775"], + ["ce80", "\u8777\u8778\u8779\u877A\u877F\u8780\u8781\u8784\u8786\u8787\u8789\u878A\u878C\u878E", 4, "\u8794\u8795\u8796\u8798", 6, "\u87A0", 4, "\u5DCD\u5FAE\u5371\u97E6\u8FDD\u6845\u56F4\u552F\u60DF\u4E3A\u6F4D\u7EF4\u82C7\u840E\u59D4\u4F1F\u4F2A\u5C3E\u7EAC\u672A\u851A\u5473\u754F\u80C3\u5582\u9B4F\u4F4D\u6E2D\u8C13\u5C09\u6170\u536B\u761F\u6E29\u868A\u6587\u95FB\u7EB9\u543B\u7A33\u7D0A\u95EE\u55E1\u7FC1\u74EE\u631D\u8717\u6DA1\u7A9D\u6211\u65A1\u5367\u63E1\u6C83\u5DEB\u545C\u94A8\u4E4C\u6C61\u8BEC\u5C4B\u65E0\u829C\u68A7\u543E\u5434\u6BCB\u6B66\u4E94\u6342\u5348\u821E\u4F0D\u4FAE\u575E\u620A\u96FE\u6664\u7269\u52FF\u52A1\u609F\u8BEF\u6614\u7199\u6790\u897F\u7852\u77FD\u6670\u563B\u5438\u9521\u727A"], + ["cf40", "\u87A5\u87A6\u87A7\u87A9\u87AA\u87AE\u87B0\u87B1\u87B2\u87B4\u87B6\u87B7\u87B8\u87B9\u87BB\u87BC\u87BE\u87BF\u87C1", 4, "\u87C7\u87C8\u87C9\u87CC", 4, "\u87D4", 6, "\u87DC\u87DD\u87DE\u87DF\u87E1\u87E2\u87E3\u87E4\u87E6\u87E7\u87E8\u87E9\u87EB\u87EC\u87ED\u87EF", 9], + ["cf80", "\u87FA\u87FB\u87FC\u87FD\u87FF\u8800\u8801\u8802\u8804", 5, "\u880B", 7, "\u8814\u8817\u8818\u8819\u881A\u881C", 4, "\u8823\u7A00\u606F\u5E0C\u6089\u819D\u5915\u60DC\u7184\u70EF\u6EAA\u6C50\u7280\u6A84\u88AD\u5E2D\u4E60\u5AB3\u559C\u94E3\u6D17\u7CFB\u9699\u620F\u7EC6\u778E\u867E\u5323\u971E\u8F96\u6687\u5CE1\u4FA0\u72ED\u4E0B\u53A6\u590F\u5413\u6380\u9528\u5148\u4ED9\u9C9C\u7EA4\u54B8\u8D24\u8854\u8237\u95F2\u6D8E\u5F26\u5ACC\u663E\u9669\u73B0\u732E\u53BF\u817A\u9985\u7FA1\u5BAA\u9677\u9650\u7EBF\u76F8\u53A2\u9576\u9999\u7BB1\u8944\u6E58\u4E61\u7FD4\u7965\u8BE6\u60F3\u54CD\u4EAB\u9879\u5DF7\u6A61\u50CF\u5411\u8C61\u8427\u785D\u9704\u524A\u54EE\u56A3\u9500\u6D88\u5BB5\u6DC6\u6653"], + ["d040", "\u8824", 13, "\u8833", 5, "\u883A\u883B\u883D\u883E\u883F\u8841\u8842\u8843\u8846", 5, "\u884E", 5, "\u8855\u8856\u8858\u885A", 6, "\u8866\u8867\u886A\u886D\u886F\u8871\u8873\u8874\u8875\u8876\u8878\u8879\u887A"], + ["d080", "\u887B\u887C\u8880\u8883\u8886\u8887\u8889\u888A\u888C\u888E\u888F\u8890\u8891\u8893\u8894\u8895\u8897", 4, "\u889D", 4, "\u88A3\u88A5", 5, "\u5C0F\u5B5D\u6821\u8096\u5578\u7B11\u6548\u6954\u4E9B\u6B47\u874E\u978B\u534F\u631F\u643A\u90AA\u659C\u80C1\u8C10\u5199\u68B0\u5378\u87F9\u61C8\u6CC4\u6CFB\u8C22\u5C51\u85AA\u82AF\u950C\u6B23\u8F9B\u65B0\u5FFB\u5FC3\u4FE1\u8845\u661F\u8165\u7329\u60FA\u5174\u5211\u578B\u5F62\u90A2\u884C\u9192\u5E78\u674F\u6027\u59D3\u5144\u51F6\u80F8\u5308\u6C79\u96C4\u718A\u4F11\u4FEE\u7F9E\u673D\u55C5\u9508\u79C0\u8896\u7EE3\u589F\u620C\u9700\u865A\u5618\u987B\u5F90\u8BB8\u84C4\u9157\u53D9\u65ED\u5E8F\u755C\u6064\u7D6E\u5A7F\u7EEA\u7EED\u8F69\u55A7\u5BA3\u60AC\u65CB\u7384"], + ["d140", "\u88AC\u88AE\u88AF\u88B0\u88B2", 4, "\u88B8\u88B9\u88BA\u88BB\u88BD\u88BE\u88BF\u88C0\u88C3\u88C4\u88C7\u88C8\u88CA\u88CB\u88CC\u88CD\u88CF\u88D0\u88D1\u88D3\u88D6\u88D7\u88DA", 4, "\u88E0\u88E1\u88E6\u88E7\u88E9", 6, "\u88F2\u88F5\u88F6\u88F7\u88FA\u88FB\u88FD\u88FF\u8900\u8901\u8903", 5], + ["d180", "\u8909\u890B", 4, "\u8911\u8914", 4, "\u891C", 4, "\u8922\u8923\u8924\u8926\u8927\u8928\u8929\u892C\u892D\u892E\u892F\u8931\u8932\u8933\u8935\u8937\u9009\u7663\u7729\u7EDA\u9774\u859B\u5B66\u7A74\u96EA\u8840\u52CB\u718F\u5FAA\u65EC\u8BE2\u5BFB\u9A6F\u5DE1\u6B89\u6C5B\u8BAD\u8BAF\u900A\u8FC5\u538B\u62BC\u9E26\u9E2D\u5440\u4E2B\u82BD\u7259\u869C\u5D16\u8859\u6DAF\u96C5\u54D1\u4E9A\u8BB6\u7109\u54BD\u9609\u70DF\u6DF9\u76D0\u4E25\u7814\u8712\u5CA9\u5EF6\u8A00\u989C\u960E\u708E\u6CBF\u5944\u63A9\u773C\u884D\u6F14\u8273\u5830\u71D5\u538C\u781A\u96C1\u5501\u5F66\u7130\u5BB4\u8C1A\u9A8C\u6B83\u592E\u9E2F\u79E7\u6768\u626C\u4F6F\u75A1\u7F8A\u6D0B\u9633\u6C27\u4EF0\u75D2\u517B\u6837\u6F3E\u9080\u8170\u5996\u7476"], + ["d240", "\u8938", 8, "\u8942\u8943\u8945", 24, "\u8960", 5, "\u8967", 19, "\u897C"], + ["d280", "\u897D\u897E\u8980\u8982\u8984\u8985\u8987", 26, "\u6447\u5C27\u9065\u7A91\u8C23\u59DA\u54AC\u8200\u836F\u8981\u8000\u6930\u564E\u8036\u7237\u91CE\u51B6\u4E5F\u9875\u6396\u4E1A\u53F6\u66F3\u814B\u591C\u6DB2\u4E00\u58F9\u533B\u63D6\u94F1\u4F9D\u4F0A\u8863\u9890\u5937\u9057\u79FB\u4EEA\u80F0\u7591\u6C82\u5B9C\u59E8\u5F5D\u6905\u8681\u501A\u5DF2\u4E59\u77E3\u4EE5\u827A\u6291\u6613\u9091\u5C79\u4EBF\u5F79\u81C6\u9038\u8084\u75AB\u4EA6\u88D4\u610F\u6BC5\u5FC6\u4E49\u76CA\u6EA2\u8BE3\u8BAE\u8C0A\u8BD1\u5F02\u7FFC\u7FCC\u7ECE\u8335\u836B\u56E0\u6BB7\u97F3\u9634\u59FB\u541F\u94F6\u6DEB\u5BC5\u996E\u5C39\u5F15\u9690"], + ["d340", "\u89A2", 30, "\u89C3\u89CD\u89D3\u89D4\u89D5\u89D7\u89D8\u89D9\u89DB\u89DD\u89DF\u89E0\u89E1\u89E2\u89E4\u89E7\u89E8\u89E9\u89EA\u89EC\u89ED\u89EE\u89F0\u89F1\u89F2\u89F4", 6], + ["d380", "\u89FB", 4, "\u8A01", 5, "\u8A08", 21, "\u5370\u82F1\u6A31\u5A74\u9E70\u5E94\u7F28\u83B9\u8424\u8425\u8367\u8747\u8FCE\u8D62\u76C8\u5F71\u9896\u786C\u6620\u54DF\u62E5\u4F63\u81C3\u75C8\u5EB8\u96CD\u8E0A\u86F9\u548F\u6CF3\u6D8C\u6C38\u607F\u52C7\u7528\u5E7D\u4F18\u60A0\u5FE7\u5C24\u7531\u90AE\u94C0\u72B9\u6CB9\u6E38\u9149\u6709\u53CB\u53F3\u4F51\u91C9\u8BF1\u53C8\u5E7C\u8FC2\u6DE4\u4E8E\u76C2\u6986\u865E\u611A\u8206\u4F59\u4FDE\u903E\u9C7C\u6109\u6E1D\u6E14\u9685\u4E88\u5A31\u96E8\u4E0E\u5C7F\u79B9\u5B87\u8BED\u7FBD\u7389\u57DF\u828B\u90C1\u5401\u9047\u55BB\u5CEA\u5FA1\u6108\u6B32\u72F1\u80B2\u8A89"], + ["d440", "\u8A1E", 31, "\u8A3F", 8, "\u8A49", 21], + ["d480", "\u8A5F", 25, "\u8A7A", 6, "\u6D74\u5BD3\u88D5\u9884\u8C6B\u9A6D\u9E33\u6E0A\u51A4\u5143\u57A3\u8881\u539F\u63F4\u8F95\u56ED\u5458\u5706\u733F\u6E90\u7F18\u8FDC\u82D1\u613F\u6028\u9662\u66F0\u7EA6\u8D8A\u8DC3\u94A5\u5CB3\u7CA4\u6708\u60A6\u9605\u8018\u4E91\u90E7\u5300\u9668\u5141\u8FD0\u8574\u915D\u6655\u97F5\u5B55\u531D\u7838\u6742\u683D\u54C9\u707E\u5BB0\u8F7D\u518D\u5728\u54B1\u6512\u6682\u8D5E\u8D43\u810F\u846C\u906D\u7CDF\u51FF\u85FB\u67A3\u65E9\u6FA1\u86A4\u8E81\u566A\u9020\u7682\u7076\u71E5\u8D23\u62E9\u5219\u6CFD\u8D3C\u600E\u589E\u618E\u66FE\u8D60\u624E\u55B3\u6E23\u672D\u8F67"], + ["d540", "\u8A81", 7, "\u8A8B", 7, "\u8A94", 46], + ["d580", "\u8AC3", 32, "\u94E1\u95F8\u7728\u6805\u69A8\u548B\u4E4D\u70B8\u8BC8\u6458\u658B\u5B85\u7A84\u503A\u5BE8\u77BB\u6BE1\u8A79\u7C98\u6CBE\u76CF\u65A9\u8F97\u5D2D\u5C55\u8638\u6808\u5360\u6218\u7AD9\u6E5B\u7EFD\u6A1F\u7AE0\u5F70\u6F33\u5F20\u638C\u6DA8\u6756\u4E08\u5E10\u8D26\u4ED7\u80C0\u7634\u969C\u62DB\u662D\u627E\u6CBC\u8D75\u7167\u7F69\u5146\u8087\u53EC\u906E\u6298\u54F2\u86F0\u8F99\u8005\u9517\u8517\u8FD9\u6D59\u73CD\u659F\u771F\u7504\u7827\u81FB\u8D1E\u9488\u4FA6\u6795\u75B9\u8BCA\u9707\u632F\u9547\u9635\u84B8\u6323\u7741\u5F81\u72F0\u4E89\u6014\u6574\u62EF\u6B63\u653F"], + ["d640", "\u8AE4", 34, "\u8B08", 27], + ["d680", "\u8B24\u8B25\u8B27", 30, "\u5E27\u75C7\u90D1\u8BC1\u829D\u679D\u652F\u5431\u8718\u77E5\u80A2\u8102\u6C41\u4E4B\u7EC7\u804C\u76F4\u690D\u6B96\u6267\u503C\u4F84\u5740\u6307\u6B62\u8DBE\u53EA\u65E8\u7EB8\u5FD7\u631A\u63B7\u81F3\u81F4\u7F6E\u5E1C\u5CD9\u5236\u667A\u79E9\u7A1A\u8D28\u7099\u75D4\u6EDE\u6CBB\u7A92\u4E2D\u76C5\u5FE0\u949F\u8877\u7EC8\u79CD\u80BF\u91CD\u4EF2\u4F17\u821F\u5468\u5DDE\u6D32\u8BCC\u7CA5\u8F74\u8098\u5E1A\u5492\u76B1\u5B99\u663C\u9AA4\u73E0\u682A\u86DB\u6731\u732A\u8BF8\u8BDB\u9010\u7AF9\u70DB\u716E\u62C4\u77A9\u5631\u4E3B\u8457\u67F1\u52A9\u86C0\u8D2E\u94F8\u7B51"], + ["d740", "\u8B46", 31, "\u8B67", 4, "\u8B6D", 25], + ["d780", "\u8B87", 24, "\u8BAC\u8BB1\u8BBB\u8BC7\u8BD0\u8BEA\u8C09\u8C1E\u4F4F\u6CE8\u795D\u9A7B\u6293\u722A\u62FD\u4E13\u7816\u8F6C\u64B0\u8D5A\u7BC6\u6869\u5E84\u88C5\u5986\u649E\u58EE\u72B6\u690E\u9525\u8FFD\u8D58\u5760\u7F00\u8C06\u51C6\u6349\u62D9\u5353\u684C\u7422\u8301\u914C\u5544\u7740\u707C\u6D4A\u5179\u54A8\u8D44\u59FF\u6ECB\u6DC4\u5B5C\u7D2B\u4ED4\u7C7D\u6ED3\u5B50\u81EA\u6E0D\u5B57\u9B03\u68D5\u8E2A\u5B97\u7EFC\u603B\u7EB5\u90B9\u8D70\u594F\u63CD\u79DF\u8DB3\u5352\u65CF\u7956\u8BC5\u963B\u7EC4\u94BB\u7E82\u5634\u9189\u6700\u7F6A\u5C0A\u9075\u6628\u5DE6\u4F50\u67DE\u505A\u4F5C\u5750\u5EA7"], + ["d840", "\u8C38", 8, "\u8C42\u8C43\u8C44\u8C45\u8C48\u8C4A\u8C4B\u8C4D", 7, "\u8C56\u8C57\u8C58\u8C59\u8C5B", 5, "\u8C63", 6, "\u8C6C", 6, "\u8C74\u8C75\u8C76\u8C77\u8C7B", 6, "\u8C83\u8C84\u8C86\u8C87"], + ["d880", "\u8C88\u8C8B\u8C8D", 6, "\u8C95\u8C96\u8C97\u8C99", 20, "\u4E8D\u4E0C\u5140\u4E10\u5EFF\u5345\u4E15\u4E98\u4E1E\u9B32\u5B6C\u5669\u4E28\u79BA\u4E3F\u5315\u4E47\u592D\u723B\u536E\u6C10\u56DF\u80E4\u9997\u6BD3\u777E\u9F17\u4E36\u4E9F\u9F10\u4E5C\u4E69\u4E93\u8288\u5B5B\u556C\u560F\u4EC4\u538D\u539D\u53A3\u53A5\u53AE\u9765\u8D5D\u531A\u53F5\u5326\u532E\u533E\u8D5C\u5366\u5363\u5202\u5208\u520E\u522D\u5233\u523F\u5240\u524C\u525E\u5261\u525C\u84AF\u527D\u5282\u5281\u5290\u5293\u5182\u7F54\u4EBB\u4EC3\u4EC9\u4EC2\u4EE8\u4EE1\u4EEB\u4EDE\u4F1B\u4EF3\u4F22\u4F64\u4EF5\u4F25\u4F27\u4F09\u4F2B\u4F5E\u4F67\u6538\u4F5A\u4F5D"], + ["d940", "\u8CAE", 62], + ["d980", "\u8CED", 32, "\u4F5F\u4F57\u4F32\u4F3D\u4F76\u4F74\u4F91\u4F89\u4F83\u4F8F\u4F7E\u4F7B\u4FAA\u4F7C\u4FAC\u4F94\u4FE6\u4FE8\u4FEA\u4FC5\u4FDA\u4FE3\u4FDC\u4FD1\u4FDF\u4FF8\u5029\u504C\u4FF3\u502C\u500F\u502E\u502D\u4FFE\u501C\u500C\u5025\u5028\u507E\u5043\u5055\u5048\u504E\u506C\u507B\u50A5\u50A7\u50A9\u50BA\u50D6\u5106\u50ED\u50EC\u50E6\u50EE\u5107\u510B\u4EDD\u6C3D\u4F58\u4F65\u4FCE\u9FA0\u6C46\u7C74\u516E\u5DFD\u9EC9\u9998\u5181\u5914\u52F9\u530D\u8A07\u5310\u51EB\u5919\u5155\u4EA0\u5156\u4EB3\u886E\u88A4\u4EB5\u8114\u88D2\u7980\u5B34\u8803\u7FB8\u51AB\u51B1\u51BD\u51BC"], + ["da40", "\u8D0E", 14, "\u8D20\u8D51\u8D52\u8D57\u8D5F\u8D65\u8D68\u8D69\u8D6A\u8D6C\u8D6E\u8D6F\u8D71\u8D72\u8D78", 8, "\u8D82\u8D83\u8D86\u8D87\u8D88\u8D89\u8D8C", 4, "\u8D92\u8D93\u8D95", 9, "\u8DA0\u8DA1"], + ["da80", "\u8DA2\u8DA4", 12, "\u8DB2\u8DB6\u8DB7\u8DB9\u8DBB\u8DBD\u8DC0\u8DC1\u8DC2\u8DC5\u8DC7\u8DC8\u8DC9\u8DCA\u8DCD\u8DD0\u8DD2\u8DD3\u8DD4\u51C7\u5196\u51A2\u51A5\u8BA0\u8BA6\u8BA7\u8BAA\u8BB4\u8BB5\u8BB7\u8BC2\u8BC3\u8BCB\u8BCF\u8BCE\u8BD2\u8BD3\u8BD4\u8BD6\u8BD8\u8BD9\u8BDC\u8BDF\u8BE0\u8BE4\u8BE8\u8BE9\u8BEE\u8BF0\u8BF3\u8BF6\u8BF9\u8BFC\u8BFF\u8C00\u8C02\u8C04\u8C07\u8C0C\u8C0F\u8C11\u8C12\u8C14\u8C15\u8C16\u8C19\u8C1B\u8C18\u8C1D\u8C1F\u8C20\u8C21\u8C25\u8C27\u8C2A\u8C2B\u8C2E\u8C2F\u8C32\u8C33\u8C35\u8C36\u5369\u537A\u961D\u9622\u9621\u9631\u962A\u963D\u963C\u9642\u9649\u9654\u965F\u9667\u966C\u9672\u9674\u9688\u968D\u9697\u96B0\u9097\u909B\u909D\u9099\u90AC\u90A1\u90B4\u90B3\u90B6\u90BA"], + ["db40", "\u8DD5\u8DD8\u8DD9\u8DDC\u8DE0\u8DE1\u8DE2\u8DE5\u8DE6\u8DE7\u8DE9\u8DED\u8DEE\u8DF0\u8DF1\u8DF2\u8DF4\u8DF6\u8DFC\u8DFE", 6, "\u8E06\u8E07\u8E08\u8E0B\u8E0D\u8E0E\u8E10\u8E11\u8E12\u8E13\u8E15", 7, "\u8E20\u8E21\u8E24", 4, "\u8E2B\u8E2D\u8E30\u8E32\u8E33\u8E34\u8E36\u8E37\u8E38\u8E3B\u8E3C\u8E3E"], + ["db80", "\u8E3F\u8E43\u8E45\u8E46\u8E4C", 4, "\u8E53", 5, "\u8E5A", 11, "\u8E67\u8E68\u8E6A\u8E6B\u8E6E\u8E71\u90B8\u90B0\u90CF\u90C5\u90BE\u90D0\u90C4\u90C7\u90D3\u90E6\u90E2\u90DC\u90D7\u90DB\u90EB\u90EF\u90FE\u9104\u9122\u911E\u9123\u9131\u912F\u9139\u9143\u9146\u520D\u5942\u52A2\u52AC\u52AD\u52BE\u54FF\u52D0\u52D6\u52F0\u53DF\u71EE\u77CD\u5EF4\u51F5\u51FC\u9B2F\u53B6\u5F01\u755A\u5DEF\u574C\u57A9\u57A1\u587E\u58BC\u58C5\u58D1\u5729\u572C\u572A\u5733\u5739\u572E\u572F\u575C\u573B\u5742\u5769\u5785\u576B\u5786\u577C\u577B\u5768\u576D\u5776\u5773\u57AD\u57A4\u578C\u57B2\u57CF\u57A7\u57B4\u5793\u57A0\u57D5\u57D8\u57DA\u57D9\u57D2\u57B8\u57F4\u57EF\u57F8\u57E4\u57DD"], + ["dc40", "\u8E73\u8E75\u8E77", 4, "\u8E7D\u8E7E\u8E80\u8E82\u8E83\u8E84\u8E86\u8E88", 6, "\u8E91\u8E92\u8E93\u8E95", 6, "\u8E9D\u8E9F", 11, "\u8EAD\u8EAE\u8EB0\u8EB1\u8EB3", 6, "\u8EBB", 7], + ["dc80", "\u8EC3", 10, "\u8ECF", 21, "\u580B\u580D\u57FD\u57ED\u5800\u581E\u5819\u5844\u5820\u5865\u586C\u5881\u5889\u589A\u5880\u99A8\u9F19\u61FF\u8279\u827D\u827F\u828F\u828A\u82A8\u8284\u828E\u8291\u8297\u8299\u82AB\u82B8\u82BE\u82B0\u82C8\u82CA\u82E3\u8298\u82B7\u82AE\u82CB\u82CC\u82C1\u82A9\u82B4\u82A1\u82AA\u829F\u82C4\u82CE\u82A4\u82E1\u8309\u82F7\u82E4\u830F\u8307\u82DC\u82F4\u82D2\u82D8\u830C\u82FB\u82D3\u8311\u831A\u8306\u8314\u8315\u82E0\u82D5\u831C\u8351\u835B\u835C\u8308\u8392\u833C\u8334\u8331\u839B\u835E\u832F\u834F\u8347\u8343\u835F\u8340\u8317\u8360\u832D\u833A\u8333\u8366\u8365"], + ["dd40", "\u8EE5", 62], + ["dd80", "\u8F24", 32, "\u8368\u831B\u8369\u836C\u836A\u836D\u836E\u83B0\u8378\u83B3\u83B4\u83A0\u83AA\u8393\u839C\u8385\u837C\u83B6\u83A9\u837D\u83B8\u837B\u8398\u839E\u83A8\u83BA\u83BC\u83C1\u8401\u83E5\u83D8\u5807\u8418\u840B\u83DD\u83FD\u83D6\u841C\u8438\u8411\u8406\u83D4\u83DF\u840F\u8403\u83F8\u83F9\u83EA\u83C5\u83C0\u8426\u83F0\u83E1\u845C\u8451\u845A\u8459\u8473\u8487\u8488\u847A\u8489\u8478\u843C\u8446\u8469\u8476\u848C\u848E\u8431\u846D\u84C1\u84CD\u84D0\u84E6\u84BD\u84D3\u84CA\u84BF\u84BA\u84E0\u84A1\u84B9\u84B4\u8497\u84E5\u84E3\u850C\u750D\u8538\u84F0\u8539\u851F\u853A"], + ["de40", "\u8F45", 32, "\u8F6A\u8F80\u8F8C\u8F92\u8F9D\u8FA0\u8FA1\u8FA2\u8FA4\u8FA5\u8FA6\u8FA7\u8FAA\u8FAC\u8FAD\u8FAE\u8FAF\u8FB2\u8FB3\u8FB4\u8FB5\u8FB7\u8FB8\u8FBA\u8FBB\u8FBC\u8FBF\u8FC0\u8FC3\u8FC6"], + ["de80", "\u8FC9", 4, "\u8FCF\u8FD2\u8FD6\u8FD7\u8FDA\u8FE0\u8FE1\u8FE3\u8FE7\u8FEC\u8FEF\u8FF1\u8FF2\u8FF4\u8FF5\u8FF6\u8FFA\u8FFB\u8FFC\u8FFE\u8FFF\u9007\u9008\u900C\u900E\u9013\u9015\u9018\u8556\u853B\u84FF\u84FC\u8559\u8548\u8568\u8564\u855E\u857A\u77A2\u8543\u8572\u857B\u85A4\u85A8\u8587\u858F\u8579\u85AE\u859C\u8585\u85B9\u85B7\u85B0\u85D3\u85C1\u85DC\u85FF\u8627\u8605\u8629\u8616\u863C\u5EFE\u5F08\u593C\u5941\u8037\u5955\u595A\u5958\u530F\u5C22\u5C25\u5C2C\u5C34\u624C\u626A\u629F\u62BB\u62CA\u62DA\u62D7\u62EE\u6322\u62F6\u6339\u634B\u6343\u63AD\u63F6\u6371\u637A\u638E\u63B4\u636D\u63AC\u638A\u6369\u63AE\u63BC\u63F2\u63F8\u63E0\u63FF\u63C4\u63DE\u63CE\u6452\u63C6\u63BE\u6445\u6441\u640B\u641B\u6420\u640C\u6426\u6421\u645E\u6484\u646D\u6496"], + ["df40", "\u9019\u901C\u9023\u9024\u9025\u9027", 5, "\u9030", 4, "\u9037\u9039\u903A\u903D\u903F\u9040\u9043\u9045\u9046\u9048", 4, "\u904E\u9054\u9055\u9056\u9059\u905A\u905C", 5, "\u9064\u9066\u9067\u9069\u906A\u906B\u906C\u906F", 4, "\u9076", 6, "\u907E\u9081"], + ["df80", "\u9084\u9085\u9086\u9087\u9089\u908A\u908C", 4, "\u9092\u9094\u9096\u9098\u909A\u909C\u909E\u909F\u90A0\u90A4\u90A5\u90A7\u90A8\u90A9\u90AB\u90AD\u90B2\u90B7\u90BC\u90BD\u90BF\u90C0\u647A\u64B7\u64B8\u6499\u64BA\u64C0\u64D0\u64D7\u64E4\u64E2\u6509\u6525\u652E\u5F0B\u5FD2\u7519\u5F11\u535F\u53F1\u53FD\u53E9\u53E8\u53FB\u5412\u5416\u5406\u544B\u5452\u5453\u5454\u5456\u5443\u5421\u5457\u5459\u5423\u5432\u5482\u5494\u5477\u5471\u5464\u549A\u549B\u5484\u5476\u5466\u549D\u54D0\u54AD\u54C2\u54B4\u54D2\u54A7\u54A6\u54D3\u54D4\u5472\u54A3\u54D5\u54BB\u54BF\u54CC\u54D9\u54DA\u54DC\u54A9\u54AA\u54A4\u54DD\u54CF\u54DE\u551B\u54E7\u5520\u54FD\u5514\u54F3\u5522\u5523\u550F\u5511\u5527\u552A\u5567\u558F\u55B5\u5549\u556D\u5541\u5555\u553F\u5550\u553C"], + ["e040", "\u90C2\u90C3\u90C6\u90C8\u90C9\u90CB\u90CC\u90CD\u90D2\u90D4\u90D5\u90D6\u90D8\u90D9\u90DA\u90DE\u90DF\u90E0\u90E3\u90E4\u90E5\u90E9\u90EA\u90EC\u90EE\u90F0\u90F1\u90F2\u90F3\u90F5\u90F6\u90F7\u90F9\u90FA\u90FB\u90FC\u90FF\u9100\u9101\u9103\u9105", 19, "\u911A\u911B\u911C"], + ["e080", "\u911D\u911F\u9120\u9121\u9124", 10, "\u9130\u9132", 6, "\u913A", 8, "\u9144\u5537\u5556\u5575\u5576\u5577\u5533\u5530\u555C\u558B\u55D2\u5583\u55B1\u55B9\u5588\u5581\u559F\u557E\u55D6\u5591\u557B\u55DF\u55BD\u55BE\u5594\u5599\u55EA\u55F7\u55C9\u561F\u55D1\u55EB\u55EC\u55D4\u55E6\u55DD\u55C4\u55EF\u55E5\u55F2\u55F3\u55CC\u55CD\u55E8\u55F5\u55E4\u8F94\u561E\u5608\u560C\u5601\u5624\u5623\u55FE\u5600\u5627\u562D\u5658\u5639\u5657\u562C\u564D\u5662\u5659\u565C\u564C\u5654\u5686\u5664\u5671\u566B\u567B\u567C\u5685\u5693\u56AF\u56D4\u56D7\u56DD\u56E1\u56F5\u56EB\u56F9\u56FF\u5704\u570A\u5709\u571C\u5E0F\u5E19\u5E14\u5E11\u5E31\u5E3B\u5E3C"], + ["e140", "\u9145\u9147\u9148\u9151\u9153\u9154\u9155\u9156\u9158\u9159\u915B\u915C\u915F\u9160\u9166\u9167\u9168\u916B\u916D\u9173\u917A\u917B\u917C\u9180", 4, "\u9186\u9188\u918A\u918E\u918F\u9193", 6, "\u919C", 5, "\u91A4", 5, "\u91AB\u91AC\u91B0\u91B1\u91B2\u91B3\u91B6\u91B7\u91B8\u91B9\u91BB"], + ["e180", "\u91BC", 10, "\u91C8\u91CB\u91D0\u91D2", 9, "\u91DD", 8, "\u5E37\u5E44\u5E54\u5E5B\u5E5E\u5E61\u5C8C\u5C7A\u5C8D\u5C90\u5C96\u5C88\u5C98\u5C99\u5C91\u5C9A\u5C9C\u5CB5\u5CA2\u5CBD\u5CAC\u5CAB\u5CB1\u5CA3\u5CC1\u5CB7\u5CC4\u5CD2\u5CE4\u5CCB\u5CE5\u5D02\u5D03\u5D27\u5D26\u5D2E\u5D24\u5D1E\u5D06\u5D1B\u5D58\u5D3E\u5D34\u5D3D\u5D6C\u5D5B\u5D6F\u5D5D\u5D6B\u5D4B\u5D4A\u5D69\u5D74\u5D82\u5D99\u5D9D\u8C73\u5DB7\u5DC5\u5F73\u5F77\u5F82\u5F87\u5F89\u5F8C\u5F95\u5F99\u5F9C\u5FA8\u5FAD\u5FB5\u5FBC\u8862\u5F61\u72AD\u72B0\u72B4\u72B7\u72B8\u72C3\u72C1\u72CE\u72CD\u72D2\u72E8\u72EF\u72E9\u72F2\u72F4\u72F7\u7301\u72F3\u7303\u72FA"], + ["e240", "\u91E6", 62], + ["e280", "\u9225", 32, "\u72FB\u7317\u7313\u7321\u730A\u731E\u731D\u7315\u7322\u7339\u7325\u732C\u7338\u7331\u7350\u734D\u7357\u7360\u736C\u736F\u737E\u821B\u5925\u98E7\u5924\u5902\u9963\u9967", 5, "\u9974\u9977\u997D\u9980\u9984\u9987\u998A\u998D\u9990\u9991\u9993\u9994\u9995\u5E80\u5E91\u5E8B\u5E96\u5EA5\u5EA0\u5EB9\u5EB5\u5EBE\u5EB3\u8D53\u5ED2\u5ED1\u5EDB\u5EE8\u5EEA\u81BA\u5FC4\u5FC9\u5FD6\u5FCF\u6003\u5FEE\u6004\u5FE1\u5FE4\u5FFE\u6005\u6006\u5FEA\u5FED\u5FF8\u6019\u6035\u6026\u601B\u600F\u600D\u6029\u602B\u600A\u603F\u6021\u6078\u6079\u607B\u607A\u6042"], + ["e340", "\u9246", 45, "\u9275", 16], + ["e380", "\u9286", 7, "\u928F", 24, "\u606A\u607D\u6096\u609A\u60AD\u609D\u6083\u6092\u608C\u609B\u60EC\u60BB\u60B1\u60DD\u60D8\u60C6\u60DA\u60B4\u6120\u6126\u6115\u6123\u60F4\u6100\u610E\u612B\u614A\u6175\u61AC\u6194\u61A7\u61B7\u61D4\u61F5\u5FDD\u96B3\u95E9\u95EB\u95F1\u95F3\u95F5\u95F6\u95FC\u95FE\u9603\u9604\u9606\u9608\u960A\u960B\u960C\u960D\u960F\u9612\u9615\u9616\u9617\u9619\u961A\u4E2C\u723F\u6215\u6C35\u6C54\u6C5C\u6C4A\u6CA3\u6C85\u6C90\u6C94\u6C8C\u6C68\u6C69\u6C74\u6C76\u6C86\u6CA9\u6CD0\u6CD4\u6CAD\u6CF7\u6CF8\u6CF1\u6CD7\u6CB2\u6CE0\u6CD6\u6CFA\u6CEB\u6CEE\u6CB1\u6CD3\u6CEF\u6CFE"], + ["e440", "\u92A8", 5, "\u92AF", 24, "\u92C9", 31], + ["e480", "\u92E9", 32, "\u6D39\u6D27\u6D0C\u6D43\u6D48\u6D07\u6D04\u6D19\u6D0E\u6D2B\u6D4D\u6D2E\u6D35\u6D1A\u6D4F\u6D52\u6D54\u6D33\u6D91\u6D6F\u6D9E\u6DA0\u6D5E\u6D93\u6D94\u6D5C\u6D60\u6D7C\u6D63\u6E1A\u6DC7\u6DC5\u6DDE\u6E0E\u6DBF\u6DE0\u6E11\u6DE6\u6DDD\u6DD9\u6E16\u6DAB\u6E0C\u6DAE\u6E2B\u6E6E\u6E4E\u6E6B\u6EB2\u6E5F\u6E86\u6E53\u6E54\u6E32\u6E25\u6E44\u6EDF\u6EB1\u6E98\u6EE0\u6F2D\u6EE2\u6EA5\u6EA7\u6EBD\u6EBB\u6EB7\u6ED7\u6EB4\u6ECF\u6E8F\u6EC2\u6E9F\u6F62\u6F46\u6F47\u6F24\u6F15\u6EF9\u6F2F\u6F36\u6F4B\u6F74\u6F2A\u6F09\u6F29\u6F89\u6F8D\u6F8C\u6F78\u6F72\u6F7C\u6F7A\u6FD1"], + ["e540", "\u930A", 51, "\u933F", 10], + ["e580", "\u934A", 31, "\u936B\u6FC9\u6FA7\u6FB9\u6FB6\u6FC2\u6FE1\u6FEE\u6FDE\u6FE0\u6FEF\u701A\u7023\u701B\u7039\u7035\u704F\u705E\u5B80\u5B84\u5B95\u5B93\u5BA5\u5BB8\u752F\u9A9E\u6434\u5BE4\u5BEE\u8930\u5BF0\u8E47\u8B07\u8FB6\u8FD3\u8FD5\u8FE5\u8FEE\u8FE4\u8FE9\u8FE6\u8FF3\u8FE8\u9005\u9004\u900B\u9026\u9011\u900D\u9016\u9021\u9035\u9036\u902D\u902F\u9044\u9051\u9052\u9050\u9068\u9058\u9062\u905B\u66B9\u9074\u907D\u9082\u9088\u9083\u908B\u5F50\u5F57\u5F56\u5F58\u5C3B\u54AB\u5C50\u5C59\u5B71\u5C63\u5C66\u7FBC\u5F2A\u5F29\u5F2D\u8274\u5F3C\u9B3B\u5C6E\u5981\u5983\u598D\u59A9\u59AA\u59A3"], + ["e640", "\u936C", 34, "\u9390", 27], + ["e680", "\u93AC", 29, "\u93CB\u93CC\u93CD\u5997\u59CA\u59AB\u599E\u59A4\u59D2\u59B2\u59AF\u59D7\u59BE\u5A05\u5A06\u59DD\u5A08\u59E3\u59D8\u59F9\u5A0C\u5A09\u5A32\u5A34\u5A11\u5A23\u5A13\u5A40\u5A67\u5A4A\u5A55\u5A3C\u5A62\u5A75\u80EC\u5AAA\u5A9B\u5A77\u5A7A\u5ABE\u5AEB\u5AB2\u5AD2\u5AD4\u5AB8\u5AE0\u5AE3\u5AF1\u5AD6\u5AE6\u5AD8\u5ADC\u5B09\u5B17\u5B16\u5B32\u5B37\u5B40\u5C15\u5C1C\u5B5A\u5B65\u5B73\u5B51\u5B53\u5B62\u9A75\u9A77\u9A78\u9A7A\u9A7F\u9A7D\u9A80\u9A81\u9A85\u9A88\u9A8A\u9A90\u9A92\u9A93\u9A96\u9A98\u9A9B\u9A9C\u9A9D\u9A9F\u9AA0\u9AA2\u9AA3\u9AA5\u9AA7\u7E9F\u7EA1\u7EA3\u7EA5\u7EA8\u7EA9"], + ["e740", "\u93CE", 7, "\u93D7", 54], + ["e780", "\u940E", 32, "\u7EAD\u7EB0\u7EBE\u7EC0\u7EC1\u7EC2\u7EC9\u7ECB\u7ECC\u7ED0\u7ED4\u7ED7\u7EDB\u7EE0\u7EE1\u7EE8\u7EEB\u7EEE\u7EEF\u7EF1\u7EF2\u7F0D\u7EF6\u7EFA\u7EFB\u7EFE\u7F01\u7F02\u7F03\u7F07\u7F08\u7F0B\u7F0C\u7F0F\u7F11\u7F12\u7F17\u7F19\u7F1C\u7F1B\u7F1F\u7F21", 6, "\u7F2A\u7F2B\u7F2C\u7F2D\u7F2F", 4, "\u7F35\u5E7A\u757F\u5DDB\u753E\u9095\u738E\u7391\u73AE\u73A2\u739F\u73CF\u73C2\u73D1\u73B7\u73B3\u73C0\u73C9\u73C8\u73E5\u73D9\u987C\u740A\u73E9\u73E7\u73DE\u73BA\u73F2\u740F\u742A\u745B\u7426\u7425\u7428\u7430\u742E\u742C"], + ["e840", "\u942F", 14, "\u943F", 43, "\u946C\u946D\u946E\u946F"], + ["e880", "\u9470", 20, "\u9491\u9496\u9498\u94C7\u94CF\u94D3\u94D4\u94DA\u94E6\u94FB\u951C\u9520\u741B\u741A\u7441\u745C\u7457\u7455\u7459\u7477\u746D\u747E\u749C\u748E\u7480\u7481\u7487\u748B\u749E\u74A8\u74A9\u7490\u74A7\u74D2\u74BA\u97EA\u97EB\u97EC\u674C\u6753\u675E\u6748\u6769\u67A5\u6787\u676A\u6773\u6798\u67A7\u6775\u67A8\u679E\u67AD\u678B\u6777\u677C\u67F0\u6809\u67D8\u680A\u67E9\u67B0\u680C\u67D9\u67B5\u67DA\u67B3\u67DD\u6800\u67C3\u67B8\u67E2\u680E\u67C1\u67FD\u6832\u6833\u6860\u6861\u684E\u6862\u6844\u6864\u6883\u681D\u6855\u6866\u6841\u6867\u6840\u683E\u684A\u6849\u6829\u68B5\u688F\u6874\u6877\u6893\u686B\u68C2\u696E\u68FC\u691F\u6920\u68F9"], + ["e940", "\u9527\u9533\u953D\u9543\u9548\u954B\u9555\u955A\u9560\u956E\u9574\u9575\u9577", 7, "\u9580", 42], + ["e980", "\u95AB", 32, "\u6924\u68F0\u690B\u6901\u6957\u68E3\u6910\u6971\u6939\u6960\u6942\u695D\u6984\u696B\u6980\u6998\u6978\u6934\u69CC\u6987\u6988\u69CE\u6989\u6966\u6963\u6979\u699B\u69A7\u69BB\u69AB\u69AD\u69D4\u69B1\u69C1\u69CA\u69DF\u6995\u69E0\u698D\u69FF\u6A2F\u69ED\u6A17\u6A18\u6A65\u69F2\u6A44\u6A3E\u6AA0\u6A50\u6A5B\u6A35\u6A8E\u6A79\u6A3D\u6A28\u6A58\u6A7C\u6A91\u6A90\u6AA9\u6A97\u6AAB\u7337\u7352\u6B81\u6B82\u6B87\u6B84\u6B92\u6B93\u6B8D\u6B9A\u6B9B\u6BA1\u6BAA\u8F6B\u8F6D\u8F71\u8F72\u8F73\u8F75\u8F76\u8F78\u8F77\u8F79\u8F7A\u8F7C\u8F7E\u8F81\u8F82\u8F84\u8F87\u8F8B"], + ["ea40", "\u95CC", 27, "\u95EC\u95FF\u9607\u9613\u9618\u961B\u961E\u9620\u9623", 6, "\u962B\u962C\u962D\u962F\u9630\u9637\u9638\u9639\u963A\u963E\u9641\u9643\u964A\u964E\u964F\u9651\u9652\u9653\u9656\u9657"], + ["ea80", "\u9658\u9659\u965A\u965C\u965D\u965E\u9660\u9663\u9665\u9666\u966B\u966D", 4, "\u9673\u9678", 12, "\u9687\u9689\u968A\u8F8D\u8F8E\u8F8F\u8F98\u8F9A\u8ECE\u620B\u6217\u621B\u621F\u6222\u6221\u6225\u6224\u622C\u81E7\u74EF\u74F4\u74FF\u750F\u7511\u7513\u6534\u65EE\u65EF\u65F0\u660A\u6619\u6772\u6603\u6615\u6600\u7085\u66F7\u661D\u6634\u6631\u6636\u6635\u8006\u665F\u6654\u6641\u664F\u6656\u6661\u6657\u6677\u6684\u668C\u66A7\u669D\u66BE\u66DB\u66DC\u66E6\u66E9\u8D32\u8D33\u8D36\u8D3B\u8D3D\u8D40\u8D45\u8D46\u8D48\u8D49\u8D47\u8D4D\u8D55\u8D59\u89C7\u89CA\u89CB\u89CC\u89CE\u89CF\u89D0\u89D1\u726E\u729F\u725D\u7266\u726F\u727E\u727F\u7284\u728B\u728D\u728F\u7292\u6308\u6332\u63B0"], + ["eb40", "\u968C\u968E\u9691\u9692\u9693\u9695\u9696\u969A\u969B\u969D", 9, "\u96A8", 7, "\u96B1\u96B2\u96B4\u96B5\u96B7\u96B8\u96BA\u96BB\u96BF\u96C2\u96C3\u96C8\u96CA\u96CB\u96D0\u96D1\u96D3\u96D4\u96D6", 9, "\u96E1", 6, "\u96EB"], + ["eb80", "\u96EC\u96ED\u96EE\u96F0\u96F1\u96F2\u96F4\u96F5\u96F8\u96FA\u96FB\u96FC\u96FD\u96FF\u9702\u9703\u9705\u970A\u970B\u970C\u9710\u9711\u9712\u9714\u9715\u9717", 4, "\u971D\u971F\u9720\u643F\u64D8\u8004\u6BEA\u6BF3\u6BFD\u6BF5\u6BF9\u6C05\u6C07\u6C06\u6C0D\u6C15\u6C18\u6C19\u6C1A\u6C21\u6C29\u6C24\u6C2A\u6C32\u6535\u6555\u656B\u724D\u7252\u7256\u7230\u8662\u5216\u809F\u809C\u8093\u80BC\u670A\u80BD\u80B1\u80AB\u80AD\u80B4\u80B7\u80E7\u80E8\u80E9\u80EA\u80DB\u80C2\u80C4\u80D9\u80CD\u80D7\u6710\u80DD\u80EB\u80F1\u80F4\u80ED\u810D\u810E\u80F2\u80FC\u6715\u8112\u8C5A\u8136\u811E\u812C\u8118\u8132\u8148\u814C\u8153\u8174\u8159\u815A\u8171\u8160\u8169\u817C\u817D\u816D\u8167\u584D\u5AB5\u8188\u8182\u8191\u6ED5\u81A3\u81AA\u81CC\u6726\u81CA\u81BB"], + ["ec40", "\u9721", 8, "\u972B\u972C\u972E\u972F\u9731\u9733", 4, "\u973A\u973B\u973C\u973D\u973F", 18, "\u9754\u9755\u9757\u9758\u975A\u975C\u975D\u975F\u9763\u9764\u9766\u9767\u9768\u976A", 7], + ["ec80", "\u9772\u9775\u9777", 4, "\u977D", 7, "\u9786", 4, "\u978C\u978E\u978F\u9790\u9793\u9795\u9796\u9797\u9799", 4, "\u81C1\u81A6\u6B24\u6B37\u6B39\u6B43\u6B46\u6B59\u98D1\u98D2\u98D3\u98D5\u98D9\u98DA\u6BB3\u5F40\u6BC2\u89F3\u6590\u9F51\u6593\u65BC\u65C6\u65C4\u65C3\u65CC\u65CE\u65D2\u65D6\u7080\u709C\u7096\u709D\u70BB\u70C0\u70B7\u70AB\u70B1\u70E8\u70CA\u7110\u7113\u7116\u712F\u7131\u7173\u715C\u7168\u7145\u7172\u714A\u7178\u717A\u7198\u71B3\u71B5\u71A8\u71A0\u71E0\u71D4\u71E7\u71F9\u721D\u7228\u706C\u7118\u7166\u71B9\u623E\u623D\u6243\u6248\u6249\u793B\u7940\u7946\u7949\u795B\u795C\u7953\u795A\u7962\u7957\u7960\u796F\u7967\u797A\u7985\u798A\u799A\u79A7\u79B3\u5FD1\u5FD0"], + ["ed40", "\u979E\u979F\u97A1\u97A2\u97A4", 6, "\u97AC\u97AE\u97B0\u97B1\u97B3\u97B5", 46], + ["ed80", "\u97E4\u97E5\u97E8\u97EE", 4, "\u97F4\u97F7", 23, "\u603C\u605D\u605A\u6067\u6041\u6059\u6063\u60AB\u6106\u610D\u615D\u61A9\u619D\u61CB\u61D1\u6206\u8080\u807F\u6C93\u6CF6\u6DFC\u77F6\u77F8\u7800\u7809\u7817\u7818\u7811\u65AB\u782D\u781C\u781D\u7839\u783A\u783B\u781F\u783C\u7825\u782C\u7823\u7829\u784E\u786D\u7856\u7857\u7826\u7850\u7847\u784C\u786A\u789B\u7893\u789A\u7887\u789C\u78A1\u78A3\u78B2\u78B9\u78A5\u78D4\u78D9\u78C9\u78EC\u78F2\u7905\u78F4\u7913\u7924\u791E\u7934\u9F9B\u9EF9\u9EFB\u9EFC\u76F1\u7704\u770D\u76F9\u7707\u7708\u771A\u7722\u7719\u772D\u7726\u7735\u7738\u7750\u7751\u7747\u7743\u775A\u7768"], + ["ee40", "\u980F", 62], + ["ee80", "\u984E", 32, "\u7762\u7765\u777F\u778D\u777D\u7780\u778C\u7791\u779F\u77A0\u77B0\u77B5\u77BD\u753A\u7540\u754E\u754B\u7548\u755B\u7572\u7579\u7583\u7F58\u7F61\u7F5F\u8A48\u7F68\u7F74\u7F71\u7F79\u7F81\u7F7E\u76CD\u76E5\u8832\u9485\u9486\u9487\u948B\u948A\u948C\u948D\u948F\u9490\u9494\u9497\u9495\u949A\u949B\u949C\u94A3\u94A4\u94AB\u94AA\u94AD\u94AC\u94AF\u94B0\u94B2\u94B4\u94B6", 4, "\u94BC\u94BD\u94BF\u94C4\u94C8", 6, "\u94D0\u94D1\u94D2\u94D5\u94D6\u94D7\u94D9\u94D8\u94DB\u94DE\u94DF\u94E0\u94E2\u94E4\u94E5\u94E7\u94E8\u94EA"], + ["ef40", "\u986F", 5, "\u988B\u988E\u9892\u9895\u9899\u98A3\u98A8", 37, "\u98CF\u98D0\u98D4\u98D6\u98D7\u98DB\u98DC\u98DD\u98E0", 4], + ["ef80", "\u98E5\u98E6\u98E9", 30, "\u94E9\u94EB\u94EE\u94EF\u94F3\u94F4\u94F5\u94F7\u94F9\u94FC\u94FD\u94FF\u9503\u9502\u9506\u9507\u9509\u950A\u950D\u950E\u950F\u9512", 4, "\u9518\u951B\u951D\u951E\u951F\u9522\u952A\u952B\u9529\u952C\u9531\u9532\u9534\u9536\u9537\u9538\u953C\u953E\u953F\u9542\u9535\u9544\u9545\u9546\u9549\u954C\u954E\u954F\u9552\u9553\u9554\u9556\u9557\u9558\u9559\u955B\u955E\u955F\u955D\u9561\u9562\u9564", 8, "\u956F\u9571\u9572\u9573\u953A\u77E7\u77EC\u96C9\u79D5\u79ED\u79E3\u79EB\u7A06\u5D47\u7A03\u7A02\u7A1E\u7A14"], + ["f040", "\u9908", 4, "\u990E\u990F\u9911", 28, "\u992F", 26], + ["f080", "\u994A", 9, "\u9956", 12, "\u9964\u9966\u9973\u9978\u9979\u997B\u997E\u9982\u9983\u9989\u7A39\u7A37\u7A51\u9ECF\u99A5\u7A70\u7688\u768E\u7693\u7699\u76A4\u74DE\u74E0\u752C\u9E20\u9E22\u9E28", 4, "\u9E32\u9E31\u9E36\u9E38\u9E37\u9E39\u9E3A\u9E3E\u9E41\u9E42\u9E44\u9E46\u9E47\u9E48\u9E49\u9E4B\u9E4C\u9E4E\u9E51\u9E55\u9E57\u9E5A\u9E5B\u9E5C\u9E5E\u9E63\u9E66", 6, "\u9E71\u9E6D\u9E73\u7592\u7594\u7596\u75A0\u759D\u75AC\u75A3\u75B3\u75B4\u75B8\u75C4\u75B1\u75B0\u75C3\u75C2\u75D6\u75CD\u75E3\u75E8\u75E6\u75E4\u75EB\u75E7\u7603\u75F1\u75FC\u75FF\u7610\u7600\u7605\u760C\u7617\u760A\u7625\u7618\u7615\u7619"], + ["f140", "\u998C\u998E\u999A", 10, "\u99A6\u99A7\u99A9", 47], + ["f180", "\u99D9", 32, "\u761B\u763C\u7622\u7620\u7640\u762D\u7630\u763F\u7635\u7643\u763E\u7633\u764D\u765E\u7654\u765C\u7656\u766B\u766F\u7FCA\u7AE6\u7A78\u7A79\u7A80\u7A86\u7A88\u7A95\u7AA6\u7AA0\u7AAC\u7AA8\u7AAD\u7AB3\u8864\u8869\u8872\u887D\u887F\u8882\u88A2\u88C6\u88B7\u88BC\u88C9\u88E2\u88CE\u88E3\u88E5\u88F1\u891A\u88FC\u88E8\u88FE\u88F0\u8921\u8919\u8913\u891B\u890A\u8934\u892B\u8936\u8941\u8966\u897B\u758B\u80E5\u76B2\u76B4\u77DC\u8012\u8014\u8016\u801C\u8020\u8022\u8025\u8026\u8027\u8029\u8028\u8031\u800B\u8035\u8043\u8046\u804D\u8052\u8069\u8071\u8983\u9878\u9880\u9883"], + ["f240", "\u99FA", 62], + ["f280", "\u9A39", 32, "\u9889\u988C\u988D\u988F\u9894\u989A\u989B\u989E\u989F\u98A1\u98A2\u98A5\u98A6\u864D\u8654\u866C\u866E\u867F\u867A\u867C\u867B\u86A8\u868D\u868B\u86AC\u869D\u86A7\u86A3\u86AA\u8693\u86A9\u86B6\u86C4\u86B5\u86CE\u86B0\u86BA\u86B1\u86AF\u86C9\u86CF\u86B4\u86E9\u86F1\u86F2\u86ED\u86F3\u86D0\u8713\u86DE\u86F4\u86DF\u86D8\u86D1\u8703\u8707\u86F8\u8708\u870A\u870D\u8709\u8723\u873B\u871E\u8725\u872E\u871A\u873E\u8748\u8734\u8731\u8729\u8737\u873F\u8782\u8722\u877D\u877E\u877B\u8760\u8770\u874C\u876E\u878B\u8753\u8763\u877C\u8764\u8759\u8765\u8793\u87AF\u87A8\u87D2"], + ["f340", "\u9A5A", 17, "\u9A72\u9A83\u9A89\u9A8D\u9A8E\u9A94\u9A95\u9A99\u9AA6\u9AA9", 6, "\u9AB2\u9AB3\u9AB4\u9AB5\u9AB9\u9ABB\u9ABD\u9ABE\u9ABF\u9AC3\u9AC4\u9AC6", 4, "\u9ACD\u9ACE\u9ACF\u9AD0\u9AD2\u9AD4\u9AD5\u9AD6\u9AD7\u9AD9\u9ADA\u9ADB\u9ADC"], + ["f380", "\u9ADD\u9ADE\u9AE0\u9AE2\u9AE3\u9AE4\u9AE5\u9AE7\u9AE8\u9AE9\u9AEA\u9AEC\u9AEE\u9AF0", 8, "\u9AFA\u9AFC", 6, "\u9B04\u9B05\u9B06\u87C6\u8788\u8785\u87AD\u8797\u8783\u87AB\u87E5\u87AC\u87B5\u87B3\u87CB\u87D3\u87BD\u87D1\u87C0\u87CA\u87DB\u87EA\u87E0\u87EE\u8816\u8813\u87FE\u880A\u881B\u8821\u8839\u883C\u7F36\u7F42\u7F44\u7F45\u8210\u7AFA\u7AFD\u7B08\u7B03\u7B04\u7B15\u7B0A\u7B2B\u7B0F\u7B47\u7B38\u7B2A\u7B19\u7B2E\u7B31\u7B20\u7B25\u7B24\u7B33\u7B3E\u7B1E\u7B58\u7B5A\u7B45\u7B75\u7B4C\u7B5D\u7B60\u7B6E\u7B7B\u7B62\u7B72\u7B71\u7B90\u7BA6\u7BA7\u7BB8\u7BAC\u7B9D\u7BA8\u7B85\u7BAA\u7B9C\u7BA2\u7BAB\u7BB4\u7BD1\u7BC1\u7BCC\u7BDD\u7BDA\u7BE5\u7BE6\u7BEA\u7C0C\u7BFE\u7BFC\u7C0F\u7C16\u7C0B"], + ["f440", "\u9B07\u9B09", 5, "\u9B10\u9B11\u9B12\u9B14", 10, "\u9B20\u9B21\u9B22\u9B24", 10, "\u9B30\u9B31\u9B33", 7, "\u9B3D\u9B3E\u9B3F\u9B40\u9B46\u9B4A\u9B4B\u9B4C\u9B4E\u9B50\u9B52\u9B53\u9B55", 5], + ["f480", "\u9B5B", 32, "\u7C1F\u7C2A\u7C26\u7C38\u7C41\u7C40\u81FE\u8201\u8202\u8204\u81EC\u8844\u8221\u8222\u8223\u822D\u822F\u8228\u822B\u8238\u823B\u8233\u8234\u823E\u8244\u8249\u824B\u824F\u825A\u825F\u8268\u887E\u8885\u8888\u88D8\u88DF\u895E\u7F9D\u7F9F\u7FA7\u7FAF\u7FB0\u7FB2\u7C7C\u6549\u7C91\u7C9D\u7C9C\u7C9E\u7CA2\u7CB2\u7CBC\u7CBD\u7CC1\u7CC7\u7CCC\u7CCD\u7CC8\u7CC5\u7CD7\u7CE8\u826E\u66A8\u7FBF\u7FCE\u7FD5\u7FE5\u7FE1\u7FE6\u7FE9\u7FEE\u7FF3\u7CF8\u7D77\u7DA6\u7DAE\u7E47\u7E9B\u9EB8\u9EB4\u8D73\u8D84\u8D94\u8D91\u8DB1\u8D67\u8D6D\u8C47\u8C49\u914A\u9150\u914E\u914F\u9164"], + ["f540", "\u9B7C", 62], + ["f580", "\u9BBB", 32, "\u9162\u9161\u9170\u9169\u916F\u917D\u917E\u9172\u9174\u9179\u918C\u9185\u9190\u918D\u9191\u91A2\u91A3\u91AA\u91AD\u91AE\u91AF\u91B5\u91B4\u91BA\u8C55\u9E7E\u8DB8\u8DEB\u8E05\u8E59\u8E69\u8DB5\u8DBF\u8DBC\u8DBA\u8DC4\u8DD6\u8DD7\u8DDA\u8DDE\u8DCE\u8DCF\u8DDB\u8DC6\u8DEC\u8DF7\u8DF8\u8DE3\u8DF9\u8DFB\u8DE4\u8E09\u8DFD\u8E14\u8E1D\u8E1F\u8E2C\u8E2E\u8E23\u8E2F\u8E3A\u8E40\u8E39\u8E35\u8E3D\u8E31\u8E49\u8E41\u8E42\u8E51\u8E52\u8E4A\u8E70\u8E76\u8E7C\u8E6F\u8E74\u8E85\u8E8F\u8E94\u8E90\u8E9C\u8E9E\u8C78\u8C82\u8C8A\u8C85\u8C98\u8C94\u659B\u89D6\u89DE\u89DA\u89DC"], + ["f640", "\u9BDC", 62], + ["f680", "\u9C1B", 32, "\u89E5\u89EB\u89EF\u8A3E\u8B26\u9753\u96E9\u96F3\u96EF\u9706\u9701\u9708\u970F\u970E\u972A\u972D\u9730\u973E\u9F80\u9F83\u9F85", 5, "\u9F8C\u9EFE\u9F0B\u9F0D\u96B9\u96BC\u96BD\u96CE\u96D2\u77BF\u96E0\u928E\u92AE\u92C8\u933E\u936A\u93CA\u938F\u943E\u946B\u9C7F\u9C82\u9C85\u9C86\u9C87\u9C88\u7A23\u9C8B\u9C8E\u9C90\u9C91\u9C92\u9C94\u9C95\u9C9A\u9C9B\u9C9E", 5, "\u9CA5", 4, "\u9CAB\u9CAD\u9CAE\u9CB0", 7, "\u9CBA\u9CBB\u9CBC\u9CBD\u9CC4\u9CC5\u9CC6\u9CC7\u9CCA\u9CCB"], + ["f740", "\u9C3C", 62], + ["f780", "\u9C7B\u9C7D\u9C7E\u9C80\u9C83\u9C84\u9C89\u9C8A\u9C8C\u9C8F\u9C93\u9C96\u9C97\u9C98\u9C99\u9C9D\u9CAA\u9CAC\u9CAF\u9CB9\u9CBE", 4, "\u9CC8\u9CC9\u9CD1\u9CD2\u9CDA\u9CDB\u9CE0\u9CE1\u9CCC", 4, "\u9CD3\u9CD4\u9CD5\u9CD7\u9CD8\u9CD9\u9CDC\u9CDD\u9CDF\u9CE2\u977C\u9785\u9791\u9792\u9794\u97AF\u97AB\u97A3\u97B2\u97B4\u9AB1\u9AB0\u9AB7\u9E58\u9AB6\u9ABA\u9ABC\u9AC1\u9AC0\u9AC5\u9AC2\u9ACB\u9ACC\u9AD1\u9B45\u9B43\u9B47\u9B49\u9B48\u9B4D\u9B51\u98E8\u990D\u992E\u9955\u9954\u9ADF\u9AE1\u9AE6\u9AEF\u9AEB\u9AFB\u9AED\u9AF9\u9B08\u9B0F\u9B13\u9B1F\u9B23\u9EBD\u9EBE\u7E3B\u9E82\u9E87\u9E88\u9E8B\u9E92\u93D6\u9E9D\u9E9F\u9EDB\u9EDC\u9EDD\u9EE0\u9EDF\u9EE2\u9EE9\u9EE7\u9EE5\u9EEA\u9EEF\u9F22\u9F2C\u9F2F\u9F39\u9F37\u9F3D\u9F3E\u9F44"], + ["f840", "\u9CE3", 62], + ["f880", "\u9D22", 32], + ["f940", "\u9D43", 62], + ["f980", "\u9D82", 32], + ["fa40", "\u9DA3", 62], + ["fa80", "\u9DE2", 32], + ["fb40", "\u9E03", 27, "\u9E24\u9E27\u9E2E\u9E30\u9E34\u9E3B\u9E3C\u9E40\u9E4D\u9E50\u9E52\u9E53\u9E54\u9E56\u9E59\u9E5D\u9E5F\u9E60\u9E61\u9E62\u9E65\u9E6E\u9E6F\u9E72\u9E74", 9, "\u9E80"], + ["fb80", "\u9E81\u9E83\u9E84\u9E85\u9E86\u9E89\u9E8A\u9E8C", 5, "\u9E94", 8, "\u9E9E\u9EA0", 5, "\u9EA7\u9EA8\u9EA9\u9EAA"], + ["fc40", "\u9EAB", 8, "\u9EB5\u9EB6\u9EB7\u9EB9\u9EBA\u9EBC\u9EBF", 4, "\u9EC5\u9EC6\u9EC7\u9EC8\u9ECA\u9ECB\u9ECC\u9ED0\u9ED2\u9ED3\u9ED5\u9ED6\u9ED7\u9ED9\u9EDA\u9EDE\u9EE1\u9EE3\u9EE4\u9EE6\u9EE8\u9EEB\u9EEC\u9EED\u9EEE\u9EF0", 8, "\u9EFA\u9EFD\u9EFF", 6], + ["fc80", "\u9F06", 4, "\u9F0C\u9F0F\u9F11\u9F12\u9F14\u9F15\u9F16\u9F18\u9F1A", 5, "\u9F21\u9F23", 8, "\u9F2D\u9F2E\u9F30\u9F31"], + ["fd40", "\u9F32", 4, "\u9F38\u9F3A\u9F3C\u9F3F", 4, "\u9F45", 10, "\u9F52", 38], + ["fd80", "\u9F79", 5, "\u9F81\u9F82\u9F8D", 11, "\u9F9C\u9F9D\u9F9E\u9FA1", 4, "\uF92C\uF979\uF995\uF9E7\uF9F1"], + ["fe40", "\uFA0C\uFA0D\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA18\uFA1F\uFA20\uFA21\uFA23\uFA24\uFA27\uFA28\uFA29"] + ]; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tables/gbk-added.json +var require_gbk_added = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tables/gbk-added.json"(exports2, module2) { + module2.exports = [ + ["a140", "\uE4C6", 62], + ["a180", "\uE505", 32], + ["a240", "\uE526", 62], + ["a280", "\uE565", 32], + ["a2ab", "\uE766", 5], + ["a2e3", "\u20AC\uE76D"], + ["a2ef", "\uE76E\uE76F"], + ["a2fd", "\uE770\uE771"], + ["a340", "\uE586", 62], + ["a380", "\uE5C5", 31, "\u3000"], + ["a440", "\uE5E6", 62], + ["a480", "\uE625", 32], + ["a4f4", "\uE772", 10], + ["a540", "\uE646", 62], + ["a580", "\uE685", 32], + ["a5f7", "\uE77D", 7], + ["a640", "\uE6A6", 62], + ["a680", "\uE6E5", 32], + ["a6b9", "\uE785", 7], + ["a6d9", "\uE78D", 6], + ["a6ec", "\uE794\uE795"], + ["a6f3", "\uE796"], + ["a6f6", "\uE797", 8], + ["a740", "\uE706", 62], + ["a780", "\uE745", 32], + ["a7c2", "\uE7A0", 14], + ["a7f2", "\uE7AF", 12], + ["a896", "\uE7BC", 10], + ["a8bc", "\uE7C7"], + ["a8bf", "\u01F9"], + ["a8c1", "\uE7C9\uE7CA\uE7CB\uE7CC"], + ["a8ea", "\uE7CD", 20], + ["a958", "\uE7E2"], + ["a95b", "\uE7E3"], + ["a95d", "\uE7E4\uE7E5\uE7E6"], + ["a989", "\u303E\u2FF0", 11], + ["a997", "\uE7F4", 12], + ["a9f0", "\uE801", 14], + ["aaa1", "\uE000", 93], + ["aba1", "\uE05E", 93], + ["aca1", "\uE0BC", 93], + ["ada1", "\uE11A", 93], + ["aea1", "\uE178", 93], + ["afa1", "\uE1D6", 93], + ["d7fa", "\uE810", 4], + ["f8a1", "\uE234", 93], + ["f9a1", "\uE292", 93], + ["faa1", "\uE2F0", 93], + ["fba1", "\uE34E", 93], + ["fca1", "\uE3AC", 93], + ["fda1", "\uE40A", 93], + ["fe50", "\u2E81\uE816\uE817\uE818\u2E84\u3473\u3447\u2E88\u2E8B\uE81E\u359E\u361A\u360E\u2E8C\u2E97\u396E\u3918\uE826\u39CF\u39DF\u3A73\u39D0\uE82B\uE82C\u3B4E\u3C6E\u3CE0\u2EA7\uE831\uE832\u2EAA\u4056\u415F\u2EAE\u4337\u2EB3\u2EB6\u2EB7\uE83B\u43B1\u43AC\u2EBB\u43DD\u44D6\u4661\u464C\uE843"], + ["fe80", "\u4723\u4729\u477C\u478D\u2ECA\u4947\u497A\u497D\u4982\u4983\u4985\u4986\u499F\u499B\u49B7\u49B6\uE854\uE855\u4CA3\u4C9F\u4CA0\u4CA1\u4C77\u4CA2\u4D13", 6, "\u4DAE\uE864\uE468", 93] + ]; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +var require_gb18030_ranges = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json"(exports2, module2) { + module2.exports = { uChars: [128, 165, 169, 178, 184, 216, 226, 235, 238, 244, 248, 251, 253, 258, 276, 284, 300, 325, 329, 334, 364, 463, 465, 467, 469, 471, 473, 475, 477, 506, 594, 610, 712, 716, 730, 930, 938, 962, 970, 1026, 1104, 1106, 8209, 8215, 8218, 8222, 8231, 8241, 8244, 8246, 8252, 8365, 8452, 8454, 8458, 8471, 8482, 8556, 8570, 8596, 8602, 8713, 8720, 8722, 8726, 8731, 8737, 8740, 8742, 8748, 8751, 8760, 8766, 8777, 8781, 8787, 8802, 8808, 8816, 8854, 8858, 8870, 8896, 8979, 9322, 9372, 9548, 9588, 9616, 9622, 9634, 9652, 9662, 9672, 9676, 9680, 9702, 9735, 9738, 9793, 9795, 11906, 11909, 11913, 11917, 11928, 11944, 11947, 11951, 11956, 11960, 11964, 11979, 12284, 12292, 12312, 12319, 12330, 12351, 12436, 12447, 12535, 12543, 12586, 12842, 12850, 12964, 13200, 13215, 13218, 13253, 13263, 13267, 13270, 13384, 13428, 13727, 13839, 13851, 14617, 14703, 14801, 14816, 14964, 15183, 15471, 15585, 16471, 16736, 17208, 17325, 17330, 17374, 17623, 17997, 18018, 18212, 18218, 18301, 18318, 18760, 18811, 18814, 18820, 18823, 18844, 18848, 18872, 19576, 19620, 19738, 19887, 40870, 59244, 59336, 59367, 59413, 59417, 59423, 59431, 59437, 59443, 59452, 59460, 59478, 59493, 63789, 63866, 63894, 63976, 63986, 64016, 64018, 64021, 64025, 64034, 64037, 64042, 65074, 65093, 65107, 65112, 65127, 65132, 65375, 65510, 65536], gbChars: [0, 36, 38, 45, 50, 81, 89, 95, 96, 100, 103, 104, 105, 109, 126, 133, 148, 172, 175, 179, 208, 306, 307, 308, 309, 310, 311, 312, 313, 341, 428, 443, 544, 545, 558, 741, 742, 749, 750, 805, 819, 820, 7922, 7924, 7925, 7927, 7934, 7943, 7944, 7945, 7950, 8062, 8148, 8149, 8152, 8164, 8174, 8236, 8240, 8262, 8264, 8374, 8380, 8381, 8384, 8388, 8390, 8392, 8393, 8394, 8396, 8401, 8406, 8416, 8419, 8424, 8437, 8439, 8445, 8482, 8485, 8496, 8521, 8603, 8936, 8946, 9046, 9050, 9063, 9066, 9076, 9092, 9100, 9108, 9111, 9113, 9131, 9162, 9164, 9218, 9219, 11329, 11331, 11334, 11336, 11346, 11361, 11363, 11366, 11370, 11372, 11375, 11389, 11682, 11686, 11687, 11692, 11694, 11714, 11716, 11723, 11725, 11730, 11736, 11982, 11989, 12102, 12336, 12348, 12350, 12384, 12393, 12395, 12397, 12510, 12553, 12851, 12962, 12973, 13738, 13823, 13919, 13933, 14080, 14298, 14585, 14698, 15583, 15847, 16318, 16434, 16438, 16481, 16729, 17102, 17122, 17315, 17320, 17402, 17418, 17859, 17909, 17911, 17915, 17916, 17936, 17939, 17961, 18664, 18703, 18814, 18962, 19043, 33469, 33470, 33471, 33484, 33485, 33490, 33497, 33501, 33505, 33513, 33520, 33536, 33550, 37845, 37921, 37948, 38029, 38038, 38064, 38065, 38066, 38069, 38075, 38076, 38078, 39108, 39109, 39113, 39114, 39115, 39116, 39265, 39394, 189e3] }; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tables/cp949.json +var require_cp949 = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tables/cp949.json"(exports2, module2) { + module2.exports = [ + ["0", "\0", 127], + ["8141", "\uAC02\uAC03\uAC05\uAC06\uAC0B", 4, "\uAC18\uAC1E\uAC1F\uAC21\uAC22\uAC23\uAC25", 6, "\uAC2E\uAC32\uAC33\uAC34"], + ["8161", "\uAC35\uAC36\uAC37\uAC3A\uAC3B\uAC3D\uAC3E\uAC3F\uAC41", 9, "\uAC4C\uAC4E", 5, "\uAC55"], + ["8181", "\uAC56\uAC57\uAC59\uAC5A\uAC5B\uAC5D", 18, "\uAC72\uAC73\uAC75\uAC76\uAC79\uAC7B", 4, "\uAC82\uAC87\uAC88\uAC8D\uAC8E\uAC8F\uAC91\uAC92\uAC93\uAC95", 6, "\uAC9E\uACA2", 5, "\uACAB\uACAD\uACAE\uACB1", 6, "\uACBA\uACBE\uACBF\uACC0\uACC2\uACC3\uACC5\uACC6\uACC7\uACC9\uACCA\uACCB\uACCD", 7, "\uACD6\uACD8", 7, "\uACE2\uACE3\uACE5\uACE6\uACE9\uACEB\uACED\uACEE\uACF2\uACF4\uACF7", 4, "\uACFE\uACFF\uAD01\uAD02\uAD03\uAD05\uAD07", 4, "\uAD0E\uAD10\uAD12\uAD13"], + ["8241", "\uAD14\uAD15\uAD16\uAD17\uAD19\uAD1A\uAD1B\uAD1D\uAD1E\uAD1F\uAD21", 7, "\uAD2A\uAD2B\uAD2E", 5], + ["8261", "\uAD36\uAD37\uAD39\uAD3A\uAD3B\uAD3D", 6, "\uAD46\uAD48\uAD4A", 5, "\uAD51\uAD52\uAD53\uAD55\uAD56\uAD57"], + ["8281", "\uAD59", 7, "\uAD62\uAD64", 7, "\uAD6E\uAD6F\uAD71\uAD72\uAD77\uAD78\uAD79\uAD7A\uAD7E\uAD80\uAD83", 4, "\uAD8A\uAD8B\uAD8D\uAD8E\uAD8F\uAD91", 10, "\uAD9E", 5, "\uADA5", 17, "\uADB8", 7, "\uADC2\uADC3\uADC5\uADC6\uADC7\uADC9", 6, "\uADD2\uADD4", 7, "\uADDD\uADDE\uADDF\uADE1\uADE2\uADE3\uADE5", 18], + ["8341", "\uADFA\uADFB\uADFD\uADFE\uAE02", 5, "\uAE0A\uAE0C\uAE0E", 5, "\uAE15", 7], + ["8361", "\uAE1D", 18, "\uAE32\uAE33\uAE35\uAE36\uAE39\uAE3B\uAE3C"], + ["8381", "\uAE3D\uAE3E\uAE3F\uAE42\uAE44\uAE47\uAE48\uAE49\uAE4B\uAE4F\uAE51\uAE52\uAE53\uAE55\uAE57", 4, "\uAE5E\uAE62\uAE63\uAE64\uAE66\uAE67\uAE6A\uAE6B\uAE6D\uAE6E\uAE6F\uAE71", 6, "\uAE7A\uAE7E", 5, "\uAE86", 5, "\uAE8D", 46, "\uAEBF\uAEC1\uAEC2\uAEC3\uAEC5", 6, "\uAECE\uAED2", 5, "\uAEDA\uAEDB\uAEDD", 8], + ["8441", "\uAEE6\uAEE7\uAEE9\uAEEA\uAEEC\uAEEE", 5, "\uAEF5\uAEF6\uAEF7\uAEF9\uAEFA\uAEFB\uAEFD", 8], + ["8461", "\uAF06\uAF09\uAF0A\uAF0B\uAF0C\uAF0E\uAF0F\uAF11", 18], + ["8481", "\uAF24", 7, "\uAF2E\uAF2F\uAF31\uAF33\uAF35", 6, "\uAF3E\uAF40\uAF44\uAF45\uAF46\uAF47\uAF4A", 5, "\uAF51", 10, "\uAF5E", 5, "\uAF66", 18, "\uAF7A", 5, "\uAF81\uAF82\uAF83\uAF85\uAF86\uAF87\uAF89", 6, "\uAF92\uAF93\uAF94\uAF96", 5, "\uAF9D", 26, "\uAFBA\uAFBB\uAFBD\uAFBE"], + ["8541", "\uAFBF\uAFC1", 5, "\uAFCA\uAFCC\uAFCF", 4, "\uAFD5", 6, "\uAFDD", 4], + ["8561", "\uAFE2", 5, "\uAFEA", 5, "\uAFF2\uAFF3\uAFF5\uAFF6\uAFF7\uAFF9", 6, "\uB002\uB003"], + ["8581", "\uB005", 6, "\uB00D\uB00E\uB00F\uB011\uB012\uB013\uB015", 6, "\uB01E", 9, "\uB029", 26, "\uB046\uB047\uB049\uB04B\uB04D\uB04F\uB050\uB051\uB052\uB056\uB058\uB05A\uB05B\uB05C\uB05E", 29, "\uB07E\uB07F\uB081\uB082\uB083\uB085", 6, "\uB08E\uB090\uB092", 5, "\uB09B\uB09D\uB09E\uB0A3\uB0A4"], + ["8641", "\uB0A5\uB0A6\uB0A7\uB0AA\uB0B0\uB0B2\uB0B6\uB0B7\uB0B9\uB0BA\uB0BB\uB0BD", 6, "\uB0C6\uB0CA", 5, "\uB0D2"], + ["8661", "\uB0D3\uB0D5\uB0D6\uB0D7\uB0D9", 6, "\uB0E1\uB0E2\uB0E3\uB0E4\uB0E6", 10], + ["8681", "\uB0F1", 22, "\uB10A\uB10D\uB10E\uB10F\uB111\uB114\uB115\uB116\uB117\uB11A\uB11E", 4, "\uB126\uB127\uB129\uB12A\uB12B\uB12D", 6, "\uB136\uB13A", 5, "\uB142\uB143\uB145\uB146\uB147\uB149", 6, "\uB152\uB153\uB156\uB157\uB159\uB15A\uB15B\uB15D\uB15E\uB15F\uB161", 22, "\uB17A\uB17B\uB17D\uB17E\uB17F\uB181\uB183", 4, "\uB18A\uB18C\uB18E\uB18F\uB190\uB191\uB195\uB196\uB197\uB199\uB19A\uB19B\uB19D"], + ["8741", "\uB19E", 9, "\uB1A9", 15], + ["8761", "\uB1B9", 18, "\uB1CD\uB1CE\uB1CF\uB1D1\uB1D2\uB1D3\uB1D5"], + ["8781", "\uB1D6", 5, "\uB1DE\uB1E0", 7, "\uB1EA\uB1EB\uB1ED\uB1EE\uB1EF\uB1F1", 7, "\uB1FA\uB1FC\uB1FE", 5, "\uB206\uB207\uB209\uB20A\uB20D", 6, "\uB216\uB218\uB21A", 5, "\uB221", 18, "\uB235", 6, "\uB23D", 26, "\uB259\uB25A\uB25B\uB25D\uB25E\uB25F\uB261", 6, "\uB26A", 4], + ["8841", "\uB26F", 4, "\uB276", 5, "\uB27D", 6, "\uB286\uB287\uB288\uB28A", 4], + ["8861", "\uB28F\uB292\uB293\uB295\uB296\uB297\uB29B", 4, "\uB2A2\uB2A4\uB2A7\uB2A8\uB2A9\uB2AB\uB2AD\uB2AE\uB2AF\uB2B1\uB2B2\uB2B3\uB2B5\uB2B6\uB2B7"], + ["8881", "\uB2B8", 15, "\uB2CA\uB2CB\uB2CD\uB2CE\uB2CF\uB2D1\uB2D3", 4, "\uB2DA\uB2DC\uB2DE\uB2DF\uB2E0\uB2E1\uB2E3\uB2E7\uB2E9\uB2EA\uB2F0\uB2F1\uB2F2\uB2F6\uB2FC\uB2FD\uB2FE\uB302\uB303\uB305\uB306\uB307\uB309", 6, "\uB312\uB316", 5, "\uB31D", 54, "\uB357\uB359\uB35A\uB35D\uB360\uB361\uB362\uB363"], + ["8941", "\uB366\uB368\uB36A\uB36C\uB36D\uB36F\uB372\uB373\uB375\uB376\uB377\uB379", 6, "\uB382\uB386", 5, "\uB38D"], + ["8961", "\uB38E\uB38F\uB391\uB392\uB393\uB395", 10, "\uB3A2", 5, "\uB3A9\uB3AA\uB3AB\uB3AD"], + ["8981", "\uB3AE", 21, "\uB3C6\uB3C7\uB3C9\uB3CA\uB3CD\uB3CF\uB3D1\uB3D2\uB3D3\uB3D6\uB3D8\uB3DA\uB3DC\uB3DE\uB3DF\uB3E1\uB3E2\uB3E3\uB3E5\uB3E6\uB3E7\uB3E9", 18, "\uB3FD", 18, "\uB411", 6, "\uB419\uB41A\uB41B\uB41D\uB41E\uB41F\uB421", 6, "\uB42A\uB42C", 7, "\uB435", 15], + ["8a41", "\uB445", 10, "\uB452\uB453\uB455\uB456\uB457\uB459", 6, "\uB462\uB464\uB466"], + ["8a61", "\uB467", 4, "\uB46D", 18, "\uB481\uB482"], + ["8a81", "\uB483", 4, "\uB489", 19, "\uB49E", 5, "\uB4A5\uB4A6\uB4A7\uB4A9\uB4AA\uB4AB\uB4AD", 7, "\uB4B6\uB4B8\uB4BA", 5, "\uB4C1\uB4C2\uB4C3\uB4C5\uB4C6\uB4C7\uB4C9", 6, "\uB4D1\uB4D2\uB4D3\uB4D4\uB4D6", 5, "\uB4DE\uB4DF\uB4E1\uB4E2\uB4E5\uB4E7", 4, "\uB4EE\uB4F0\uB4F2", 5, "\uB4F9", 26, "\uB516\uB517\uB519\uB51A\uB51D"], + ["8b41", "\uB51E", 5, "\uB526\uB52B", 4, "\uB532\uB533\uB535\uB536\uB537\uB539", 6, "\uB542\uB546"], + ["8b61", "\uB547\uB548\uB549\uB54A\uB54E\uB54F\uB551\uB552\uB553\uB555", 6, "\uB55E\uB562", 8], + ["8b81", "\uB56B", 52, "\uB5A2\uB5A3\uB5A5\uB5A6\uB5A7\uB5A9\uB5AC\uB5AD\uB5AE\uB5AF\uB5B2\uB5B6", 4, "\uB5BE\uB5BF\uB5C1\uB5C2\uB5C3\uB5C5", 6, "\uB5CE\uB5D2", 5, "\uB5D9", 18, "\uB5ED", 18], + ["8c41", "\uB600", 15, "\uB612\uB613\uB615\uB616\uB617\uB619", 4], + ["8c61", "\uB61E", 6, "\uB626", 5, "\uB62D", 6, "\uB635", 5], + ["8c81", "\uB63B", 12, "\uB649", 26, "\uB665\uB666\uB667\uB669", 50, "\uB69E\uB69F\uB6A1\uB6A2\uB6A3\uB6A5", 5, "\uB6AD\uB6AE\uB6AF\uB6B0\uB6B2", 16], + ["8d41", "\uB6C3", 16, "\uB6D5", 8], + ["8d61", "\uB6DE", 17, "\uB6F1\uB6F2\uB6F3\uB6F5\uB6F6\uB6F7\uB6F9\uB6FA"], + ["8d81", "\uB6FB", 4, "\uB702\uB703\uB704\uB706", 33, "\uB72A\uB72B\uB72D\uB72E\uB731", 6, "\uB73A\uB73C", 7, "\uB745\uB746\uB747\uB749\uB74A\uB74B\uB74D", 6, "\uB756", 9, "\uB761\uB762\uB763\uB765\uB766\uB767\uB769", 6, "\uB772\uB774\uB776", 5, "\uB77E\uB77F\uB781\uB782\uB783\uB785", 6, "\uB78E\uB793\uB794\uB795\uB79A\uB79B\uB79D\uB79E"], + ["8e41", "\uB79F\uB7A1", 6, "\uB7AA\uB7AE", 5, "\uB7B6\uB7B7\uB7B9", 8], + ["8e61", "\uB7C2", 4, "\uB7C8\uB7CA", 19], + ["8e81", "\uB7DE", 13, "\uB7EE\uB7EF\uB7F1\uB7F2\uB7F3\uB7F5", 6, "\uB7FE\uB802", 4, "\uB80A\uB80B\uB80D\uB80E\uB80F\uB811", 6, "\uB81A\uB81C\uB81E", 5, "\uB826\uB827\uB829\uB82A\uB82B\uB82D", 6, "\uB836\uB83A", 5, "\uB841\uB842\uB843\uB845", 11, "\uB852\uB854", 7, "\uB85E\uB85F\uB861\uB862\uB863\uB865", 6, "\uB86E\uB870\uB872", 5, "\uB879\uB87A\uB87B\uB87D", 7], + ["8f41", "\uB885", 7, "\uB88E", 17], + ["8f61", "\uB8A0", 7, "\uB8A9", 6, "\uB8B1\uB8B2\uB8B3\uB8B5\uB8B6\uB8B7\uB8B9", 4], + ["8f81", "\uB8BE\uB8BF\uB8C2\uB8C4\uB8C6", 5, "\uB8CD\uB8CE\uB8CF\uB8D1\uB8D2\uB8D3\uB8D5", 7, "\uB8DE\uB8E0\uB8E2", 5, "\uB8EA\uB8EB\uB8ED\uB8EE\uB8EF\uB8F1", 6, "\uB8FA\uB8FC\uB8FE", 5, "\uB905", 18, "\uB919", 6, "\uB921", 26, "\uB93E\uB93F\uB941\uB942\uB943\uB945", 6, "\uB94D\uB94E\uB950\uB952", 5], + ["9041", "\uB95A\uB95B\uB95D\uB95E\uB95F\uB961", 6, "\uB96A\uB96C\uB96E", 5, "\uB976\uB977\uB979\uB97A\uB97B\uB97D"], + ["9061", "\uB97E", 5, "\uB986\uB988\uB98B\uB98C\uB98F", 15], + ["9081", "\uB99F", 12, "\uB9AE\uB9AF\uB9B1\uB9B2\uB9B3\uB9B5", 6, "\uB9BE\uB9C0\uB9C2", 5, "\uB9CA\uB9CB\uB9CD\uB9D3", 4, "\uB9DA\uB9DC\uB9DF\uB9E0\uB9E2\uB9E6\uB9E7\uB9E9\uB9EA\uB9EB\uB9ED", 6, "\uB9F6\uB9FB", 4, "\uBA02", 5, "\uBA09", 11, "\uBA16", 33, "\uBA3A\uBA3B\uBA3D\uBA3E\uBA3F\uBA41\uBA43\uBA44\uBA45\uBA46"], + ["9141", "\uBA47\uBA4A\uBA4C\uBA4F\uBA50\uBA51\uBA52\uBA56\uBA57\uBA59\uBA5A\uBA5B\uBA5D", 6, "\uBA66\uBA6A", 5], + ["9161", "\uBA72\uBA73\uBA75\uBA76\uBA77\uBA79", 9, "\uBA86\uBA88\uBA89\uBA8A\uBA8B\uBA8D", 5], + ["9181", "\uBA93", 20, "\uBAAA\uBAAD\uBAAE\uBAAF\uBAB1\uBAB3", 4, "\uBABA\uBABC\uBABE", 5, "\uBAC5\uBAC6\uBAC7\uBAC9", 14, "\uBADA", 33, "\uBAFD\uBAFE\uBAFF\uBB01\uBB02\uBB03\uBB05", 7, "\uBB0E\uBB10\uBB12", 5, "\uBB19\uBB1A\uBB1B\uBB1D\uBB1E\uBB1F\uBB21", 6], + ["9241", "\uBB28\uBB2A\uBB2C", 7, "\uBB37\uBB39\uBB3A\uBB3F", 4, "\uBB46\uBB48\uBB4A\uBB4B\uBB4C\uBB4E\uBB51\uBB52"], + ["9261", "\uBB53\uBB55\uBB56\uBB57\uBB59", 7, "\uBB62\uBB64", 7, "\uBB6D", 4], + ["9281", "\uBB72", 21, "\uBB89\uBB8A\uBB8B\uBB8D\uBB8E\uBB8F\uBB91", 18, "\uBBA5\uBBA6\uBBA7\uBBA9\uBBAA\uBBAB\uBBAD", 6, "\uBBB5\uBBB6\uBBB8", 7, "\uBBC1\uBBC2\uBBC3\uBBC5\uBBC6\uBBC7\uBBC9", 6, "\uBBD1\uBBD2\uBBD4", 35, "\uBBFA\uBBFB\uBBFD\uBBFE\uBC01"], + ["9341", "\uBC03", 4, "\uBC0A\uBC0E\uBC10\uBC12\uBC13\uBC19\uBC1A\uBC20\uBC21\uBC22\uBC23\uBC26\uBC28\uBC2A\uBC2B\uBC2C\uBC2E\uBC2F\uBC32\uBC33\uBC35"], + ["9361", "\uBC36\uBC37\uBC39", 6, "\uBC42\uBC46\uBC47\uBC48\uBC4A\uBC4B\uBC4E\uBC4F\uBC51", 8], + ["9381", "\uBC5A\uBC5B\uBC5C\uBC5E", 37, "\uBC86\uBC87\uBC89\uBC8A\uBC8D\uBC8F", 4, "\uBC96\uBC98\uBC9B", 4, "\uBCA2\uBCA3\uBCA5\uBCA6\uBCA9", 6, "\uBCB2\uBCB6", 5, "\uBCBE\uBCBF\uBCC1\uBCC2\uBCC3\uBCC5", 7, "\uBCCE\uBCD2\uBCD3\uBCD4\uBCD6\uBCD7\uBCD9\uBCDA\uBCDB\uBCDD", 22, "\uBCF7\uBCF9\uBCFA\uBCFB\uBCFD"], + ["9441", "\uBCFE", 5, "\uBD06\uBD08\uBD0A", 5, "\uBD11\uBD12\uBD13\uBD15", 8], + ["9461", "\uBD1E", 5, "\uBD25", 6, "\uBD2D", 12], + ["9481", "\uBD3A", 5, "\uBD41", 6, "\uBD4A\uBD4B\uBD4D\uBD4E\uBD4F\uBD51", 6, "\uBD5A", 9, "\uBD65\uBD66\uBD67\uBD69", 22, "\uBD82\uBD83\uBD85\uBD86\uBD8B", 4, "\uBD92\uBD94\uBD96\uBD97\uBD98\uBD9B\uBD9D", 6, "\uBDA5", 10, "\uBDB1", 6, "\uBDB9", 24], + ["9541", "\uBDD2\uBDD3\uBDD6\uBDD7\uBDD9\uBDDA\uBDDB\uBDDD", 11, "\uBDEA", 5, "\uBDF1"], + ["9561", "\uBDF2\uBDF3\uBDF5\uBDF6\uBDF7\uBDF9", 6, "\uBE01\uBE02\uBE04\uBE06", 5, "\uBE0E\uBE0F\uBE11\uBE12\uBE13"], + ["9581", "\uBE15", 6, "\uBE1E\uBE20", 35, "\uBE46\uBE47\uBE49\uBE4A\uBE4B\uBE4D\uBE4F", 4, "\uBE56\uBE58\uBE5C\uBE5D\uBE5E\uBE5F\uBE62\uBE63\uBE65\uBE66\uBE67\uBE69\uBE6B", 4, "\uBE72\uBE76", 4, "\uBE7E\uBE7F\uBE81\uBE82\uBE83\uBE85", 6, "\uBE8E\uBE92", 5, "\uBE9A", 13, "\uBEA9", 14], + ["9641", "\uBEB8", 23, "\uBED2\uBED3"], + ["9661", "\uBED5\uBED6\uBED9", 6, "\uBEE1\uBEE2\uBEE6", 5, "\uBEED", 8], + ["9681", "\uBEF6", 10, "\uBF02", 5, "\uBF0A", 13, "\uBF1A\uBF1E", 33, "\uBF42\uBF43\uBF45\uBF46\uBF47\uBF49", 6, "\uBF52\uBF53\uBF54\uBF56", 44], + ["9741", "\uBF83", 16, "\uBF95", 8], + ["9761", "\uBF9E", 17, "\uBFB1", 7], + ["9781", "\uBFB9", 11, "\uBFC6", 5, "\uBFCE\uBFCF\uBFD1\uBFD2\uBFD3\uBFD5", 6, "\uBFDD\uBFDE\uBFE0\uBFE2", 89, "\uC03D\uC03E\uC03F"], + ["9841", "\uC040", 16, "\uC052", 5, "\uC059\uC05A\uC05B"], + ["9861", "\uC05D\uC05E\uC05F\uC061", 6, "\uC06A", 15], + ["9881", "\uC07A", 21, "\uC092\uC093\uC095\uC096\uC097\uC099", 6, "\uC0A2\uC0A4\uC0A6", 5, "\uC0AE\uC0B1\uC0B2\uC0B7", 4, "\uC0BE\uC0C2\uC0C3\uC0C4\uC0C6\uC0C7\uC0CA\uC0CB\uC0CD\uC0CE\uC0CF\uC0D1", 6, "\uC0DA\uC0DE", 5, "\uC0E6\uC0E7\uC0E9\uC0EA\uC0EB\uC0ED", 6, "\uC0F6\uC0F8\uC0FA", 5, "\uC101\uC102\uC103\uC105\uC106\uC107\uC109", 6, "\uC111\uC112\uC113\uC114\uC116", 5, "\uC121\uC122\uC125\uC128\uC129\uC12A\uC12B\uC12E"], + ["9941", "\uC132\uC133\uC134\uC135\uC137\uC13A\uC13B\uC13D\uC13E\uC13F\uC141", 6, "\uC14A\uC14E", 5, "\uC156\uC157"], + ["9961", "\uC159\uC15A\uC15B\uC15D", 6, "\uC166\uC16A", 5, "\uC171\uC172\uC173\uC175\uC176\uC177\uC179\uC17A\uC17B"], + ["9981", "\uC17C", 8, "\uC186", 5, "\uC18F\uC191\uC192\uC193\uC195\uC197", 4, "\uC19E\uC1A0\uC1A2\uC1A3\uC1A4\uC1A6\uC1A7\uC1AA\uC1AB\uC1AD\uC1AE\uC1AF\uC1B1", 11, "\uC1BE", 5, "\uC1C5\uC1C6\uC1C7\uC1C9\uC1CA\uC1CB\uC1CD", 6, "\uC1D5\uC1D6\uC1D9", 6, "\uC1E1\uC1E2\uC1E3\uC1E5\uC1E6\uC1E7\uC1E9", 6, "\uC1F2\uC1F4", 7, "\uC1FE\uC1FF\uC201\uC202\uC203\uC205", 6, "\uC20E\uC210\uC212", 5, "\uC21A\uC21B\uC21D\uC21E\uC221\uC222\uC223"], + ["9a41", "\uC224\uC225\uC226\uC227\uC22A\uC22C\uC22E\uC230\uC233\uC235", 16], + ["9a61", "\uC246\uC247\uC249", 6, "\uC252\uC253\uC255\uC256\uC257\uC259", 6, "\uC261\uC262\uC263\uC264\uC266"], + ["9a81", "\uC267", 4, "\uC26E\uC26F\uC271\uC272\uC273\uC275", 6, "\uC27E\uC280\uC282", 5, "\uC28A", 5, "\uC291", 6, "\uC299\uC29A\uC29C\uC29E", 5, "\uC2A6\uC2A7\uC2A9\uC2AA\uC2AB\uC2AE", 5, "\uC2B6\uC2B8\uC2BA", 33, "\uC2DE\uC2DF\uC2E1\uC2E2\uC2E5", 5, "\uC2EE\uC2F0\uC2F2\uC2F3\uC2F4\uC2F5\uC2F7\uC2FA\uC2FD\uC2FE\uC2FF\uC301", 6, "\uC30A\uC30B\uC30E\uC30F"], + ["9b41", "\uC310\uC311\uC312\uC316\uC317\uC319\uC31A\uC31B\uC31D", 6, "\uC326\uC327\uC32A", 8], + ["9b61", "\uC333", 17, "\uC346", 7], + ["9b81", "\uC34E", 25, "\uC36A\uC36B\uC36D\uC36E\uC36F\uC371\uC373", 4, "\uC37A\uC37B\uC37E", 5, "\uC385\uC386\uC387\uC389\uC38A\uC38B\uC38D", 50, "\uC3C1", 22, "\uC3DA"], + ["9c41", "\uC3DB\uC3DD\uC3DE\uC3E1\uC3E3", 4, "\uC3EA\uC3EB\uC3EC\uC3EE", 5, "\uC3F6\uC3F7\uC3F9", 5], + ["9c61", "\uC3FF", 8, "\uC409", 6, "\uC411", 9], + ["9c81", "\uC41B", 8, "\uC425", 6, "\uC42D\uC42E\uC42F\uC431\uC432\uC433\uC435", 6, "\uC43E", 9, "\uC449", 26, "\uC466\uC467\uC469\uC46A\uC46B\uC46D", 6, "\uC476\uC477\uC478\uC47A", 5, "\uC481", 18, "\uC495", 6, "\uC49D", 12], + ["9d41", "\uC4AA", 13, "\uC4B9\uC4BA\uC4BB\uC4BD", 8], + ["9d61", "\uC4C6", 25], + ["9d81", "\uC4E0", 8, "\uC4EA", 5, "\uC4F2\uC4F3\uC4F5\uC4F6\uC4F7\uC4F9\uC4FB\uC4FC\uC4FD\uC4FE\uC502", 9, "\uC50D\uC50E\uC50F\uC511\uC512\uC513\uC515", 6, "\uC51D", 10, "\uC52A\uC52B\uC52D\uC52E\uC52F\uC531", 6, "\uC53A\uC53C\uC53E", 5, "\uC546\uC547\uC54B\uC54F\uC550\uC551\uC552\uC556\uC55A\uC55B\uC55C\uC55F\uC562\uC563\uC565\uC566\uC567\uC569", 6, "\uC572\uC576", 5, "\uC57E\uC57F\uC581\uC582\uC583\uC585\uC586\uC588\uC589\uC58A\uC58B\uC58E\uC590\uC592\uC593\uC594"], + ["9e41", "\uC596\uC599\uC59A\uC59B\uC59D\uC59E\uC59F\uC5A1", 7, "\uC5AA", 9, "\uC5B6"], + ["9e61", "\uC5B7\uC5BA\uC5BF", 4, "\uC5CB\uC5CD\uC5CF\uC5D2\uC5D3\uC5D5\uC5D6\uC5D7\uC5D9", 6, "\uC5E2\uC5E4\uC5E6\uC5E7"], + ["9e81", "\uC5E8\uC5E9\uC5EA\uC5EB\uC5EF\uC5F1\uC5F2\uC5F3\uC5F5\uC5F8\uC5F9\uC5FA\uC5FB\uC602\uC603\uC604\uC609\uC60A\uC60B\uC60D\uC60E\uC60F\uC611", 6, "\uC61A\uC61D", 6, "\uC626\uC627\uC629\uC62A\uC62B\uC62F\uC631\uC632\uC636\uC638\uC63A\uC63C\uC63D\uC63E\uC63F\uC642\uC643\uC645\uC646\uC647\uC649", 6, "\uC652\uC656", 5, "\uC65E\uC65F\uC661", 10, "\uC66D\uC66E\uC670\uC672", 5, "\uC67A\uC67B\uC67D\uC67E\uC67F\uC681", 6, "\uC68A\uC68C\uC68E", 5, "\uC696\uC697\uC699\uC69A\uC69B\uC69D", 6, "\uC6A6"], + ["9f41", "\uC6A8\uC6AA", 5, "\uC6B2\uC6B3\uC6B5\uC6B6\uC6B7\uC6BB", 4, "\uC6C2\uC6C4\uC6C6", 5, "\uC6CE"], + ["9f61", "\uC6CF\uC6D1\uC6D2\uC6D3\uC6D5", 6, "\uC6DE\uC6DF\uC6E2", 5, "\uC6EA\uC6EB\uC6ED\uC6EE\uC6EF\uC6F1\uC6F2"], + ["9f81", "\uC6F3", 4, "\uC6FA\uC6FB\uC6FC\uC6FE", 5, "\uC706\uC707\uC709\uC70A\uC70B\uC70D", 6, "\uC716\uC718\uC71A", 5, "\uC722\uC723\uC725\uC726\uC727\uC729", 6, "\uC732\uC734\uC736\uC738\uC739\uC73A\uC73B\uC73E\uC73F\uC741\uC742\uC743\uC745", 4, "\uC74B\uC74E\uC750\uC759\uC75A\uC75B\uC75D\uC75E\uC75F\uC761", 6, "\uC769\uC76A\uC76C", 7, "\uC776\uC777\uC779\uC77A\uC77B\uC77F\uC780\uC781\uC782\uC786\uC78B\uC78C\uC78D\uC78F\uC792\uC793\uC795\uC799\uC79B", 4, "\uC7A2\uC7A7", 4, "\uC7AE\uC7AF\uC7B1\uC7B2\uC7B3\uC7B5\uC7B6\uC7B7"], + ["a041", "\uC7B8\uC7B9\uC7BA\uC7BB\uC7BE\uC7C2", 5, "\uC7CA\uC7CB\uC7CD\uC7CF\uC7D1", 6, "\uC7D9\uC7DA\uC7DB\uC7DC"], + ["a061", "\uC7DE", 5, "\uC7E5\uC7E6\uC7E7\uC7E9\uC7EA\uC7EB\uC7ED", 13], + ["a081", "\uC7FB", 4, "\uC802\uC803\uC805\uC806\uC807\uC809\uC80B", 4, "\uC812\uC814\uC817", 4, "\uC81E\uC81F\uC821\uC822\uC823\uC825", 6, "\uC82E\uC830\uC832", 5, "\uC839\uC83A\uC83B\uC83D\uC83E\uC83F\uC841", 6, "\uC84A\uC84B\uC84E", 5, "\uC855", 26, "\uC872\uC873\uC875\uC876\uC877\uC879\uC87B", 4, "\uC882\uC884\uC888\uC889\uC88A\uC88E", 5, "\uC895", 7, "\uC89E\uC8A0\uC8A2\uC8A3\uC8A4"], + ["a141", "\uC8A5\uC8A6\uC8A7\uC8A9", 18, "\uC8BE\uC8BF\uC8C0\uC8C1"], + ["a161", "\uC8C2\uC8C3\uC8C5\uC8C6\uC8C7\uC8C9\uC8CA\uC8CB\uC8CD", 6, "\uC8D6\uC8D8\uC8DA", 5, "\uC8E2\uC8E3\uC8E5"], + ["a181", "\uC8E6", 14, "\uC8F6", 5, "\uC8FE\uC8FF\uC901\uC902\uC903\uC907", 4, "\uC90E\u3000\u3001\u3002\xB7\u2025\u2026\xA8\u3003\xAD\u2015\u2225\uFF3C\u223C\u2018\u2019\u201C\u201D\u3014\u3015\u3008", 9, "\xB1\xD7\xF7\u2260\u2264\u2265\u221E\u2234\xB0\u2032\u2033\u2103\u212B\uFFE0\uFFE1\uFFE5\u2642\u2640\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\xA7\u203B\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u2192\u2190\u2191\u2193\u2194\u3013\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229\u2227\u2228\uFFE2"], + ["a241", "\uC910\uC912", 5, "\uC919", 18], + ["a261", "\uC92D", 6, "\uC935", 18], + ["a281", "\uC948", 7, "\uC952\uC953\uC955\uC956\uC957\uC959", 6, "\uC962\uC964", 7, "\uC96D\uC96E\uC96F\u21D2\u21D4\u2200\u2203\xB4\uFF5E\u02C7\u02D8\u02DD\u02DA\u02D9\xB8\u02DB\xA1\xBF\u02D0\u222E\u2211\u220F\xA4\u2109\u2030\u25C1\u25C0\u25B7\u25B6\u2664\u2660\u2661\u2665\u2667\u2663\u2299\u25C8\u25A3\u25D0\u25D1\u2592\u25A4\u25A5\u25A8\u25A7\u25A6\u25A9\u2668\u260F\u260E\u261C\u261E\xB6\u2020\u2021\u2195\u2197\u2199\u2196\u2198\u266D\u2669\u266A\u266C\u327F\u321C\u2116\u33C7\u2122\u33C2\u33D8\u2121\u20AC\xAE"], + ["a341", "\uC971\uC972\uC973\uC975", 6, "\uC97D", 10, "\uC98A\uC98B\uC98D\uC98E\uC98F"], + ["a361", "\uC991", 6, "\uC99A\uC99C\uC99E", 16], + ["a381", "\uC9AF", 16, "\uC9C2\uC9C3\uC9C5\uC9C6\uC9C9\uC9CB", 4, "\uC9D2\uC9D4\uC9D7\uC9D8\uC9DB\uFF01", 58, "\uFFE6\uFF3D", 32, "\uFFE3"], + ["a441", "\uC9DE\uC9DF\uC9E1\uC9E3\uC9E5\uC9E6\uC9E8\uC9E9\uC9EA\uC9EB\uC9EE\uC9F2", 5, "\uC9FA\uC9FB\uC9FD\uC9FE\uC9FF\uCA01\uCA02\uCA03\uCA04"], + ["a461", "\uCA05\uCA06\uCA07\uCA0A\uCA0E", 5, "\uCA15\uCA16\uCA17\uCA19", 12], + ["a481", "\uCA26\uCA27\uCA28\uCA2A", 28, "\u3131", 93], + ["a541", "\uCA47", 4, "\uCA4E\uCA4F\uCA51\uCA52\uCA53\uCA55", 6, "\uCA5E\uCA62", 5, "\uCA69\uCA6A"], + ["a561", "\uCA6B", 17, "\uCA7E", 5, "\uCA85\uCA86"], + ["a581", "\uCA87", 16, "\uCA99", 14, "\u2170", 9], + ["a5b0", "\u2160", 9], + ["a5c1", "\u0391", 16, "\u03A3", 6], + ["a5e1", "\u03B1", 16, "\u03C3", 6], + ["a641", "\uCAA8", 19, "\uCABE\uCABF\uCAC1\uCAC2\uCAC3\uCAC5"], + ["a661", "\uCAC6", 5, "\uCACE\uCAD0\uCAD2\uCAD4\uCAD5\uCAD6\uCAD7\uCADA", 5, "\uCAE1", 6], + ["a681", "\uCAE8\uCAE9\uCAEA\uCAEB\uCAED", 6, "\uCAF5", 18, "\uCB09\uCB0A\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542\u2512\u2511\u251A\u2519\u2516\u2515\u250E\u250D\u251E\u251F\u2521\u2522\u2526\u2527\u2529\u252A\u252D\u252E\u2531\u2532\u2535\u2536\u2539\u253A\u253D\u253E\u2540\u2541\u2543", 7], + ["a741", "\uCB0B", 4, "\uCB11\uCB12\uCB13\uCB15\uCB16\uCB17\uCB19", 6, "\uCB22", 7], + ["a761", "\uCB2A", 22, "\uCB42\uCB43\uCB44"], + ["a781", "\uCB45\uCB46\uCB47\uCB4A\uCB4B\uCB4D\uCB4E\uCB4F\uCB51", 6, "\uCB5A\uCB5B\uCB5C\uCB5E", 5, "\uCB65", 7, "\u3395\u3396\u3397\u2113\u3398\u33C4\u33A3\u33A4\u33A5\u33A6\u3399", 9, "\u33CA\u338D\u338E\u338F\u33CF\u3388\u3389\u33C8\u33A7\u33A8\u33B0", 9, "\u3380", 4, "\u33BA", 5, "\u3390", 4, "\u2126\u33C0\u33C1\u338A\u338B\u338C\u33D6\u33C5\u33AD\u33AE\u33AF\u33DB\u33A9\u33AA\u33AB\u33AC\u33DD\u33D0\u33D3\u33C3\u33C9\u33DC\u33C6"], + ["a841", "\uCB6D", 10, "\uCB7A", 14], + ["a861", "\uCB89", 18, "\uCB9D", 6], + ["a881", "\uCBA4", 19, "\uCBB9", 11, "\xC6\xD0\xAA\u0126"], + ["a8a6", "\u0132"], + ["a8a8", "\u013F\u0141\xD8\u0152\xBA\xDE\u0166\u014A"], + ["a8b1", "\u3260", 27, "\u24D0", 25, "\u2460", 14, "\xBD\u2153\u2154\xBC\xBE\u215B\u215C\u215D\u215E"], + ["a941", "\uCBC5", 14, "\uCBD5", 10], + ["a961", "\uCBE0\uCBE1\uCBE2\uCBE3\uCBE5\uCBE6\uCBE8\uCBEA", 18], + ["a981", "\uCBFD", 14, "\uCC0E\uCC0F\uCC11\uCC12\uCC13\uCC15", 6, "\uCC1E\uCC1F\uCC20\uCC23\uCC24\xE6\u0111\xF0\u0127\u0131\u0133\u0138\u0140\u0142\xF8\u0153\xDF\xFE\u0167\u014B\u0149\u3200", 27, "\u249C", 25, "\u2474", 14, "\xB9\xB2\xB3\u2074\u207F\u2081\u2082\u2083\u2084"], + ["aa41", "\uCC25\uCC26\uCC2A\uCC2B\uCC2D\uCC2F\uCC31", 6, "\uCC3A\uCC3F", 4, "\uCC46\uCC47\uCC49\uCC4A\uCC4B\uCC4D\uCC4E"], + ["aa61", "\uCC4F", 4, "\uCC56\uCC5A", 5, "\uCC61\uCC62\uCC63\uCC65\uCC67\uCC69", 6, "\uCC71\uCC72"], + ["aa81", "\uCC73\uCC74\uCC76", 29, "\u3041", 82], + ["ab41", "\uCC94\uCC95\uCC96\uCC97\uCC9A\uCC9B\uCC9D\uCC9E\uCC9F\uCCA1", 6, "\uCCAA\uCCAE", 5, "\uCCB6\uCCB7\uCCB9"], + ["ab61", "\uCCBA\uCCBB\uCCBD", 6, "\uCCC6\uCCC8\uCCCA", 5, "\uCCD1\uCCD2\uCCD3\uCCD5", 5], + ["ab81", "\uCCDB", 8, "\uCCE5", 6, "\uCCED\uCCEE\uCCEF\uCCF1", 12, "\u30A1", 85], + ["ac41", "\uCCFE\uCCFF\uCD00\uCD02", 5, "\uCD0A\uCD0B\uCD0D\uCD0E\uCD0F\uCD11", 6, "\uCD1A\uCD1C\uCD1E\uCD1F\uCD20"], + ["ac61", "\uCD21\uCD22\uCD23\uCD25\uCD26\uCD27\uCD29\uCD2A\uCD2B\uCD2D", 11, "\uCD3A", 4], + ["ac81", "\uCD3F", 28, "\uCD5D\uCD5E\uCD5F\u0410", 5, "\u0401\u0416", 25], + ["acd1", "\u0430", 5, "\u0451\u0436", 25], + ["ad41", "\uCD61\uCD62\uCD63\uCD65", 6, "\uCD6E\uCD70\uCD72", 5, "\uCD79", 7], + ["ad61", "\uCD81", 6, "\uCD89", 10, "\uCD96\uCD97\uCD99\uCD9A\uCD9B\uCD9D\uCD9E\uCD9F"], + ["ad81", "\uCDA0\uCDA1\uCDA2\uCDA3\uCDA6\uCDA8\uCDAA", 5, "\uCDB1", 18, "\uCDC5"], + ["ae41", "\uCDC6", 5, "\uCDCD\uCDCE\uCDCF\uCDD1", 16], + ["ae61", "\uCDE2", 5, "\uCDE9\uCDEA\uCDEB\uCDED\uCDEE\uCDEF\uCDF1", 6, "\uCDFA\uCDFC\uCDFE", 4], + ["ae81", "\uCE03\uCE05\uCE06\uCE07\uCE09\uCE0A\uCE0B\uCE0D", 6, "\uCE15\uCE16\uCE17\uCE18\uCE1A", 5, "\uCE22\uCE23\uCE25\uCE26\uCE27\uCE29\uCE2A\uCE2B"], + ["af41", "\uCE2C\uCE2D\uCE2E\uCE2F\uCE32\uCE34\uCE36", 19], + ["af61", "\uCE4A", 13, "\uCE5A\uCE5B\uCE5D\uCE5E\uCE62", 5, "\uCE6A\uCE6C"], + ["af81", "\uCE6E", 5, "\uCE76\uCE77\uCE79\uCE7A\uCE7B\uCE7D", 6, "\uCE86\uCE88\uCE8A", 5, "\uCE92\uCE93\uCE95\uCE96\uCE97\uCE99"], + ["b041", "\uCE9A", 5, "\uCEA2\uCEA6", 5, "\uCEAE", 12], + ["b061", "\uCEBB", 5, "\uCEC2", 19], + ["b081", "\uCED6", 13, "\uCEE6\uCEE7\uCEE9\uCEEA\uCEED", 6, "\uCEF6\uCEFA", 5, "\uAC00\uAC01\uAC04\uAC07\uAC08\uAC09\uAC0A\uAC10", 7, "\uAC19", 4, "\uAC20\uAC24\uAC2C\uAC2D\uAC2F\uAC30\uAC31\uAC38\uAC39\uAC3C\uAC40\uAC4B\uAC4D\uAC54\uAC58\uAC5C\uAC70\uAC71\uAC74\uAC77\uAC78\uAC7A\uAC80\uAC81\uAC83\uAC84\uAC85\uAC86\uAC89\uAC8A\uAC8B\uAC8C\uAC90\uAC94\uAC9C\uAC9D\uAC9F\uACA0\uACA1\uACA8\uACA9\uACAA\uACAC\uACAF\uACB0\uACB8\uACB9\uACBB\uACBC\uACBD\uACC1\uACC4\uACC8\uACCC\uACD5\uACD7\uACE0\uACE1\uACE4\uACE7\uACE8\uACEA\uACEC\uACEF\uACF0\uACF1\uACF3\uACF5\uACF6\uACFC\uACFD\uAD00\uAD04\uAD06"], + ["b141", "\uCF02\uCF03\uCF05\uCF06\uCF07\uCF09", 6, "\uCF12\uCF14\uCF16", 5, "\uCF1D\uCF1E\uCF1F\uCF21\uCF22\uCF23"], + ["b161", "\uCF25", 6, "\uCF2E\uCF32", 5, "\uCF39", 11], + ["b181", "\uCF45", 14, "\uCF56\uCF57\uCF59\uCF5A\uCF5B\uCF5D", 6, "\uCF66\uCF68\uCF6A\uCF6B\uCF6C\uAD0C\uAD0D\uAD0F\uAD11\uAD18\uAD1C\uAD20\uAD29\uAD2C\uAD2D\uAD34\uAD35\uAD38\uAD3C\uAD44\uAD45\uAD47\uAD49\uAD50\uAD54\uAD58\uAD61\uAD63\uAD6C\uAD6D\uAD70\uAD73\uAD74\uAD75\uAD76\uAD7B\uAD7C\uAD7D\uAD7F\uAD81\uAD82\uAD88\uAD89\uAD8C\uAD90\uAD9C\uAD9D\uADA4\uADB7\uADC0\uADC1\uADC4\uADC8\uADD0\uADD1\uADD3\uADDC\uADE0\uADE4\uADF8\uADF9\uADFC\uADFF\uAE00\uAE01\uAE08\uAE09\uAE0B\uAE0D\uAE14\uAE30\uAE31\uAE34\uAE37\uAE38\uAE3A\uAE40\uAE41\uAE43\uAE45\uAE46\uAE4A\uAE4C\uAE4D\uAE4E\uAE50\uAE54\uAE56\uAE5C\uAE5D\uAE5F\uAE60\uAE61\uAE65\uAE68\uAE69\uAE6C\uAE70\uAE78"], + ["b241", "\uCF6D\uCF6E\uCF6F\uCF72\uCF73\uCF75\uCF76\uCF77\uCF79", 6, "\uCF81\uCF82\uCF83\uCF84\uCF86", 5, "\uCF8D"], + ["b261", "\uCF8E", 18, "\uCFA2", 5, "\uCFA9"], + ["b281", "\uCFAA", 5, "\uCFB1", 18, "\uCFC5", 6, "\uAE79\uAE7B\uAE7C\uAE7D\uAE84\uAE85\uAE8C\uAEBC\uAEBD\uAEBE\uAEC0\uAEC4\uAECC\uAECD\uAECF\uAED0\uAED1\uAED8\uAED9\uAEDC\uAEE8\uAEEB\uAEED\uAEF4\uAEF8\uAEFC\uAF07\uAF08\uAF0D\uAF10\uAF2C\uAF2D\uAF30\uAF32\uAF34\uAF3C\uAF3D\uAF3F\uAF41\uAF42\uAF43\uAF48\uAF49\uAF50\uAF5C\uAF5D\uAF64\uAF65\uAF79\uAF80\uAF84\uAF88\uAF90\uAF91\uAF95\uAF9C\uAFB8\uAFB9\uAFBC\uAFC0\uAFC7\uAFC8\uAFC9\uAFCB\uAFCD\uAFCE\uAFD4\uAFDC\uAFE8\uAFE9\uAFF0\uAFF1\uAFF4\uAFF8\uB000\uB001\uB004\uB00C\uB010\uB014\uB01C\uB01D\uB028\uB044\uB045\uB048\uB04A\uB04C\uB04E\uB053\uB054\uB055\uB057\uB059"], + ["b341", "\uCFCC", 19, "\uCFE2\uCFE3\uCFE5\uCFE6\uCFE7\uCFE9"], + ["b361", "\uCFEA", 5, "\uCFF2\uCFF4\uCFF6", 5, "\uCFFD\uCFFE\uCFFF\uD001\uD002\uD003\uD005", 5], + ["b381", "\uD00B", 5, "\uD012", 5, "\uD019", 19, "\uB05D\uB07C\uB07D\uB080\uB084\uB08C\uB08D\uB08F\uB091\uB098\uB099\uB09A\uB09C\uB09F\uB0A0\uB0A1\uB0A2\uB0A8\uB0A9\uB0AB", 4, "\uB0B1\uB0B3\uB0B4\uB0B5\uB0B8\uB0BC\uB0C4\uB0C5\uB0C7\uB0C8\uB0C9\uB0D0\uB0D1\uB0D4\uB0D8\uB0E0\uB0E5\uB108\uB109\uB10B\uB10C\uB110\uB112\uB113\uB118\uB119\uB11B\uB11C\uB11D\uB123\uB124\uB125\uB128\uB12C\uB134\uB135\uB137\uB138\uB139\uB140\uB141\uB144\uB148\uB150\uB151\uB154\uB155\uB158\uB15C\uB160\uB178\uB179\uB17C\uB180\uB182\uB188\uB189\uB18B\uB18D\uB192\uB193\uB194\uB198\uB19C\uB1A8\uB1CC\uB1D0\uB1D4\uB1DC\uB1DD"], + ["b441", "\uD02E", 5, "\uD036\uD037\uD039\uD03A\uD03B\uD03D", 6, "\uD046\uD048\uD04A", 5], + ["b461", "\uD051\uD052\uD053\uD055\uD056\uD057\uD059", 6, "\uD061", 10, "\uD06E\uD06F"], + ["b481", "\uD071\uD072\uD073\uD075", 6, "\uD07E\uD07F\uD080\uD082", 18, "\uB1DF\uB1E8\uB1E9\uB1EC\uB1F0\uB1F9\uB1FB\uB1FD\uB204\uB205\uB208\uB20B\uB20C\uB214\uB215\uB217\uB219\uB220\uB234\uB23C\uB258\uB25C\uB260\uB268\uB269\uB274\uB275\uB27C\uB284\uB285\uB289\uB290\uB291\uB294\uB298\uB299\uB29A\uB2A0\uB2A1\uB2A3\uB2A5\uB2A6\uB2AA\uB2AC\uB2B0\uB2B4\uB2C8\uB2C9\uB2CC\uB2D0\uB2D2\uB2D8\uB2D9\uB2DB\uB2DD\uB2E2\uB2E4\uB2E5\uB2E6\uB2E8\uB2EB", 4, "\uB2F3\uB2F4\uB2F5\uB2F7", 4, "\uB2FF\uB300\uB301\uB304\uB308\uB310\uB311\uB313\uB314\uB315\uB31C\uB354\uB355\uB356\uB358\uB35B\uB35C\uB35E\uB35F\uB364\uB365"], + ["b541", "\uD095", 14, "\uD0A6\uD0A7\uD0A9\uD0AA\uD0AB\uD0AD", 5], + ["b561", "\uD0B3\uD0B6\uD0B8\uD0BA", 5, "\uD0C2\uD0C3\uD0C5\uD0C6\uD0C7\uD0CA", 5, "\uD0D2\uD0D6", 4], + ["b581", "\uD0DB\uD0DE\uD0DF\uD0E1\uD0E2\uD0E3\uD0E5", 6, "\uD0EE\uD0F2", 5, "\uD0F9", 11, "\uB367\uB369\uB36B\uB36E\uB370\uB371\uB374\uB378\uB380\uB381\uB383\uB384\uB385\uB38C\uB390\uB394\uB3A0\uB3A1\uB3A8\uB3AC\uB3C4\uB3C5\uB3C8\uB3CB\uB3CC\uB3CE\uB3D0\uB3D4\uB3D5\uB3D7\uB3D9\uB3DB\uB3DD\uB3E0\uB3E4\uB3E8\uB3FC\uB410\uB418\uB41C\uB420\uB428\uB429\uB42B\uB434\uB450\uB451\uB454\uB458\uB460\uB461\uB463\uB465\uB46C\uB480\uB488\uB49D\uB4A4\uB4A8\uB4AC\uB4B5\uB4B7\uB4B9\uB4C0\uB4C4\uB4C8\uB4D0\uB4D5\uB4DC\uB4DD\uB4E0\uB4E3\uB4E4\uB4E6\uB4EC\uB4ED\uB4EF\uB4F1\uB4F8\uB514\uB515\uB518\uB51B\uB51C\uB524\uB525\uB527\uB528\uB529\uB52A\uB530\uB531\uB534\uB538"], + ["b641", "\uD105", 7, "\uD10E", 17], + ["b661", "\uD120", 15, "\uD132\uD133\uD135\uD136\uD137\uD139\uD13B\uD13C\uD13D\uD13E"], + ["b681", "\uD13F\uD142\uD146", 5, "\uD14E\uD14F\uD151\uD152\uD153\uD155", 6, "\uD15E\uD160\uD162", 5, "\uD169\uD16A\uD16B\uD16D\uB540\uB541\uB543\uB544\uB545\uB54B\uB54C\uB54D\uB550\uB554\uB55C\uB55D\uB55F\uB560\uB561\uB5A0\uB5A1\uB5A4\uB5A8\uB5AA\uB5AB\uB5B0\uB5B1\uB5B3\uB5B4\uB5B5\uB5BB\uB5BC\uB5BD\uB5C0\uB5C4\uB5CC\uB5CD\uB5CF\uB5D0\uB5D1\uB5D8\uB5EC\uB610\uB611\uB614\uB618\uB625\uB62C\uB634\uB648\uB664\uB668\uB69C\uB69D\uB6A0\uB6A4\uB6AB\uB6AC\uB6B1\uB6D4\uB6F0\uB6F4\uB6F8\uB700\uB701\uB705\uB728\uB729\uB72C\uB72F\uB730\uB738\uB739\uB73B\uB744\uB748\uB74C\uB754\uB755\uB760\uB764\uB768\uB770\uB771\uB773\uB775\uB77C\uB77D\uB780\uB784\uB78C\uB78D\uB78F\uB790\uB791\uB792\uB796\uB797"], + ["b741", "\uD16E", 13, "\uD17D", 6, "\uD185\uD186\uD187\uD189\uD18A"], + ["b761", "\uD18B", 20, "\uD1A2\uD1A3\uD1A5\uD1A6\uD1A7"], + ["b781", "\uD1A9", 6, "\uD1B2\uD1B4\uD1B6\uD1B7\uD1B8\uD1B9\uD1BB\uD1BD\uD1BE\uD1BF\uD1C1", 14, "\uB798\uB799\uB79C\uB7A0\uB7A8\uB7A9\uB7AB\uB7AC\uB7AD\uB7B4\uB7B5\uB7B8\uB7C7\uB7C9\uB7EC\uB7ED\uB7F0\uB7F4\uB7FC\uB7FD\uB7FF\uB800\uB801\uB807\uB808\uB809\uB80C\uB810\uB818\uB819\uB81B\uB81D\uB824\uB825\uB828\uB82C\uB834\uB835\uB837\uB838\uB839\uB840\uB844\uB851\uB853\uB85C\uB85D\uB860\uB864\uB86C\uB86D\uB86F\uB871\uB878\uB87C\uB88D\uB8A8\uB8B0\uB8B4\uB8B8\uB8C0\uB8C1\uB8C3\uB8C5\uB8CC\uB8D0\uB8D4\uB8DD\uB8DF\uB8E1\uB8E8\uB8E9\uB8EC\uB8F0\uB8F8\uB8F9\uB8FB\uB8FD\uB904\uB918\uB920\uB93C\uB93D\uB940\uB944\uB94C\uB94F\uB951\uB958\uB959\uB95C\uB960\uB968\uB969"], + ["b841", "\uD1D0", 7, "\uD1D9", 17], + ["b861", "\uD1EB", 8, "\uD1F5\uD1F6\uD1F7\uD1F9", 13], + ["b881", "\uD208\uD20A", 5, "\uD211", 24, "\uB96B\uB96D\uB974\uB975\uB978\uB97C\uB984\uB985\uB987\uB989\uB98A\uB98D\uB98E\uB9AC\uB9AD\uB9B0\uB9B4\uB9BC\uB9BD\uB9BF\uB9C1\uB9C8\uB9C9\uB9CC\uB9CE", 4, "\uB9D8\uB9D9\uB9DB\uB9DD\uB9DE\uB9E1\uB9E3\uB9E4\uB9E5\uB9E8\uB9EC\uB9F4\uB9F5\uB9F7\uB9F8\uB9F9\uB9FA\uBA00\uBA01\uBA08\uBA15\uBA38\uBA39\uBA3C\uBA40\uBA42\uBA48\uBA49\uBA4B\uBA4D\uBA4E\uBA53\uBA54\uBA55\uBA58\uBA5C\uBA64\uBA65\uBA67\uBA68\uBA69\uBA70\uBA71\uBA74\uBA78\uBA83\uBA84\uBA85\uBA87\uBA8C\uBAA8\uBAA9\uBAAB\uBAAC\uBAB0\uBAB2\uBAB8\uBAB9\uBABB\uBABD\uBAC4\uBAC8\uBAD8\uBAD9\uBAFC"], + ["b941", "\uD22A\uD22B\uD22E\uD22F\uD231\uD232\uD233\uD235", 6, "\uD23E\uD240\uD242", 5, "\uD249\uD24A\uD24B\uD24C"], + ["b961", "\uD24D", 14, "\uD25D", 6, "\uD265\uD266\uD267\uD268"], + ["b981", "\uD269", 22, "\uD282\uD283\uD285\uD286\uD287\uD289\uD28A\uD28B\uD28C\uBB00\uBB04\uBB0D\uBB0F\uBB11\uBB18\uBB1C\uBB20\uBB29\uBB2B\uBB34\uBB35\uBB36\uBB38\uBB3B\uBB3C\uBB3D\uBB3E\uBB44\uBB45\uBB47\uBB49\uBB4D\uBB4F\uBB50\uBB54\uBB58\uBB61\uBB63\uBB6C\uBB88\uBB8C\uBB90\uBBA4\uBBA8\uBBAC\uBBB4\uBBB7\uBBC0\uBBC4\uBBC8\uBBD0\uBBD3\uBBF8\uBBF9\uBBFC\uBBFF\uBC00\uBC02\uBC08\uBC09\uBC0B\uBC0C\uBC0D\uBC0F\uBC11\uBC14", 4, "\uBC1B", 4, "\uBC24\uBC25\uBC27\uBC29\uBC2D\uBC30\uBC31\uBC34\uBC38\uBC40\uBC41\uBC43\uBC44\uBC45\uBC49\uBC4C\uBC4D\uBC50\uBC5D\uBC84\uBC85\uBC88\uBC8B\uBC8C\uBC8E\uBC94\uBC95\uBC97"], + ["ba41", "\uD28D\uD28E\uD28F\uD292\uD293\uD294\uD296", 5, "\uD29D\uD29E\uD29F\uD2A1\uD2A2\uD2A3\uD2A5", 6, "\uD2AD"], + ["ba61", "\uD2AE\uD2AF\uD2B0\uD2B2", 5, "\uD2BA\uD2BB\uD2BD\uD2BE\uD2C1\uD2C3", 4, "\uD2CA\uD2CC", 5], + ["ba81", "\uD2D2\uD2D3\uD2D5\uD2D6\uD2D7\uD2D9\uD2DA\uD2DB\uD2DD", 6, "\uD2E6", 9, "\uD2F2\uD2F3\uD2F5\uD2F6\uD2F7\uD2F9\uD2FA\uBC99\uBC9A\uBCA0\uBCA1\uBCA4\uBCA7\uBCA8\uBCB0\uBCB1\uBCB3\uBCB4\uBCB5\uBCBC\uBCBD\uBCC0\uBCC4\uBCCD\uBCCF\uBCD0\uBCD1\uBCD5\uBCD8\uBCDC\uBCF4\uBCF5\uBCF6\uBCF8\uBCFC\uBD04\uBD05\uBD07\uBD09\uBD10\uBD14\uBD24\uBD2C\uBD40\uBD48\uBD49\uBD4C\uBD50\uBD58\uBD59\uBD64\uBD68\uBD80\uBD81\uBD84\uBD87\uBD88\uBD89\uBD8A\uBD90\uBD91\uBD93\uBD95\uBD99\uBD9A\uBD9C\uBDA4\uBDB0\uBDB8\uBDD4\uBDD5\uBDD8\uBDDC\uBDE9\uBDF0\uBDF4\uBDF8\uBE00\uBE03\uBE05\uBE0C\uBE0D\uBE10\uBE14\uBE1C\uBE1D\uBE1F\uBE44\uBE45\uBE48\uBE4C\uBE4E\uBE54\uBE55\uBE57\uBE59\uBE5A\uBE5B\uBE60\uBE61\uBE64"], + ["bb41", "\uD2FB", 4, "\uD302\uD304\uD306", 5, "\uD30F\uD311\uD312\uD313\uD315\uD317", 4, "\uD31E\uD322\uD323"], + ["bb61", "\uD324\uD326\uD327\uD32A\uD32B\uD32D\uD32E\uD32F\uD331", 6, "\uD33A\uD33E", 5, "\uD346\uD347\uD348\uD349"], + ["bb81", "\uD34A", 31, "\uBE68\uBE6A\uBE70\uBE71\uBE73\uBE74\uBE75\uBE7B\uBE7C\uBE7D\uBE80\uBE84\uBE8C\uBE8D\uBE8F\uBE90\uBE91\uBE98\uBE99\uBEA8\uBED0\uBED1\uBED4\uBED7\uBED8\uBEE0\uBEE3\uBEE4\uBEE5\uBEEC\uBF01\uBF08\uBF09\uBF18\uBF19\uBF1B\uBF1C\uBF1D\uBF40\uBF41\uBF44\uBF48\uBF50\uBF51\uBF55\uBF94\uBFB0\uBFC5\uBFCC\uBFCD\uBFD0\uBFD4\uBFDC\uBFDF\uBFE1\uC03C\uC051\uC058\uC05C\uC060\uC068\uC069\uC090\uC091\uC094\uC098\uC0A0\uC0A1\uC0A3\uC0A5\uC0AC\uC0AD\uC0AF\uC0B0\uC0B3\uC0B4\uC0B5\uC0B6\uC0BC\uC0BD\uC0BF\uC0C0\uC0C1\uC0C5\uC0C8\uC0C9\uC0CC\uC0D0\uC0D8\uC0D9\uC0DB\uC0DC\uC0DD\uC0E4"], + ["bc41", "\uD36A", 17, "\uD37E\uD37F\uD381\uD382\uD383\uD385\uD386\uD387"], + ["bc61", "\uD388\uD389\uD38A\uD38B\uD38E\uD392", 5, "\uD39A\uD39B\uD39D\uD39E\uD39F\uD3A1", 6, "\uD3AA\uD3AC\uD3AE"], + ["bc81", "\uD3AF", 4, "\uD3B5\uD3B6\uD3B7\uD3B9\uD3BA\uD3BB\uD3BD", 6, "\uD3C6\uD3C7\uD3CA", 5, "\uD3D1", 5, "\uC0E5\uC0E8\uC0EC\uC0F4\uC0F5\uC0F7\uC0F9\uC100\uC104\uC108\uC110\uC115\uC11C", 4, "\uC123\uC124\uC126\uC127\uC12C\uC12D\uC12F\uC130\uC131\uC136\uC138\uC139\uC13C\uC140\uC148\uC149\uC14B\uC14C\uC14D\uC154\uC155\uC158\uC15C\uC164\uC165\uC167\uC168\uC169\uC170\uC174\uC178\uC185\uC18C\uC18D\uC18E\uC190\uC194\uC196\uC19C\uC19D\uC19F\uC1A1\uC1A5\uC1A8\uC1A9\uC1AC\uC1B0\uC1BD\uC1C4\uC1C8\uC1CC\uC1D4\uC1D7\uC1D8\uC1E0\uC1E4\uC1E8\uC1F0\uC1F1\uC1F3\uC1FC\uC1FD\uC200\uC204\uC20C\uC20D\uC20F\uC211\uC218\uC219\uC21C\uC21F\uC220\uC228\uC229\uC22B\uC22D"], + ["bd41", "\uD3D7\uD3D9", 7, "\uD3E2\uD3E4", 7, "\uD3EE\uD3EF\uD3F1\uD3F2\uD3F3\uD3F5\uD3F6\uD3F7"], + ["bd61", "\uD3F8\uD3F9\uD3FA\uD3FB\uD3FE\uD400\uD402", 5, "\uD409", 13], + ["bd81", "\uD417", 5, "\uD41E", 25, "\uC22F\uC231\uC232\uC234\uC248\uC250\uC251\uC254\uC258\uC260\uC265\uC26C\uC26D\uC270\uC274\uC27C\uC27D\uC27F\uC281\uC288\uC289\uC290\uC298\uC29B\uC29D\uC2A4\uC2A5\uC2A8\uC2AC\uC2AD\uC2B4\uC2B5\uC2B7\uC2B9\uC2DC\uC2DD\uC2E0\uC2E3\uC2E4\uC2EB\uC2EC\uC2ED\uC2EF\uC2F1\uC2F6\uC2F8\uC2F9\uC2FB\uC2FC\uC300\uC308\uC309\uC30C\uC30D\uC313\uC314\uC315\uC318\uC31C\uC324\uC325\uC328\uC329\uC345\uC368\uC369\uC36C\uC370\uC372\uC378\uC379\uC37C\uC37D\uC384\uC388\uC38C\uC3C0\uC3D8\uC3D9\uC3DC\uC3DF\uC3E0\uC3E2\uC3E8\uC3E9\uC3ED\uC3F4\uC3F5\uC3F8\uC408\uC410\uC424\uC42C\uC430"], + ["be41", "\uD438", 7, "\uD441\uD442\uD443\uD445", 14], + ["be61", "\uD454", 7, "\uD45D\uD45E\uD45F\uD461\uD462\uD463\uD465", 7, "\uD46E\uD470\uD471\uD472"], + ["be81", "\uD473", 4, "\uD47A\uD47B\uD47D\uD47E\uD481\uD483", 4, "\uD48A\uD48C\uD48E", 5, "\uD495", 8, "\uC434\uC43C\uC43D\uC448\uC464\uC465\uC468\uC46C\uC474\uC475\uC479\uC480\uC494\uC49C\uC4B8\uC4BC\uC4E9\uC4F0\uC4F1\uC4F4\uC4F8\uC4FA\uC4FF\uC500\uC501\uC50C\uC510\uC514\uC51C\uC528\uC529\uC52C\uC530\uC538\uC539\uC53B\uC53D\uC544\uC545\uC548\uC549\uC54A\uC54C\uC54D\uC54E\uC553\uC554\uC555\uC557\uC558\uC559\uC55D\uC55E\uC560\uC561\uC564\uC568\uC570\uC571\uC573\uC574\uC575\uC57C\uC57D\uC580\uC584\uC587\uC58C\uC58D\uC58F\uC591\uC595\uC597\uC598\uC59C\uC5A0\uC5A9\uC5B4\uC5B5\uC5B8\uC5B9\uC5BB\uC5BC\uC5BD\uC5BE\uC5C4", 6, "\uC5CC\uC5CE"], + ["bf41", "\uD49E", 10, "\uD4AA", 14], + ["bf61", "\uD4B9", 18, "\uD4CD\uD4CE\uD4CF\uD4D1\uD4D2\uD4D3\uD4D5"], + ["bf81", "\uD4D6", 5, "\uD4DD\uD4DE\uD4E0", 7, "\uD4E9\uD4EA\uD4EB\uD4ED\uD4EE\uD4EF\uD4F1", 6, "\uD4F9\uD4FA\uD4FC\uC5D0\uC5D1\uC5D4\uC5D8\uC5E0\uC5E1\uC5E3\uC5E5\uC5EC\uC5ED\uC5EE\uC5F0\uC5F4\uC5F6\uC5F7\uC5FC", 5, "\uC605\uC606\uC607\uC608\uC60C\uC610\uC618\uC619\uC61B\uC61C\uC624\uC625\uC628\uC62C\uC62D\uC62E\uC630\uC633\uC634\uC635\uC637\uC639\uC63B\uC640\uC641\uC644\uC648\uC650\uC651\uC653\uC654\uC655\uC65C\uC65D\uC660\uC66C\uC66F\uC671\uC678\uC679\uC67C\uC680\uC688\uC689\uC68B\uC68D\uC694\uC695\uC698\uC69C\uC6A4\uC6A5\uC6A7\uC6A9\uC6B0\uC6B1\uC6B4\uC6B8\uC6B9\uC6BA\uC6C0\uC6C1\uC6C3\uC6C5\uC6CC\uC6CD\uC6D0\uC6D4\uC6DC\uC6DD\uC6E0\uC6E1\uC6E8"], + ["c041", "\uD4FE", 5, "\uD505\uD506\uD507\uD509\uD50A\uD50B\uD50D", 6, "\uD516\uD518", 5], + ["c061", "\uD51E", 25], + ["c081", "\uD538\uD539\uD53A\uD53B\uD53E\uD53F\uD541\uD542\uD543\uD545", 6, "\uD54E\uD550\uD552", 5, "\uD55A\uD55B\uD55D\uD55E\uD55F\uD561\uD562\uD563\uC6E9\uC6EC\uC6F0\uC6F8\uC6F9\uC6FD\uC704\uC705\uC708\uC70C\uC714\uC715\uC717\uC719\uC720\uC721\uC724\uC728\uC730\uC731\uC733\uC735\uC737\uC73C\uC73D\uC740\uC744\uC74A\uC74C\uC74D\uC74F\uC751", 7, "\uC75C\uC760\uC768\uC76B\uC774\uC775\uC778\uC77C\uC77D\uC77E\uC783\uC784\uC785\uC787\uC788\uC789\uC78A\uC78E\uC790\uC791\uC794\uC796\uC797\uC798\uC79A\uC7A0\uC7A1\uC7A3\uC7A4\uC7A5\uC7A6\uC7AC\uC7AD\uC7B0\uC7B4\uC7BC\uC7BD\uC7BF\uC7C0\uC7C1\uC7C8\uC7C9\uC7CC\uC7CE\uC7D0\uC7D8\uC7DD\uC7E4\uC7E8\uC7EC\uC800\uC801\uC804\uC808\uC80A"], + ["c141", "\uD564\uD566\uD567\uD56A\uD56C\uD56E", 5, "\uD576\uD577\uD579\uD57A\uD57B\uD57D", 6, "\uD586\uD58A\uD58B"], + ["c161", "\uD58C\uD58D\uD58E\uD58F\uD591", 19, "\uD5A6\uD5A7"], + ["c181", "\uD5A8", 31, "\uC810\uC811\uC813\uC815\uC816\uC81C\uC81D\uC820\uC824\uC82C\uC82D\uC82F\uC831\uC838\uC83C\uC840\uC848\uC849\uC84C\uC84D\uC854\uC870\uC871\uC874\uC878\uC87A\uC880\uC881\uC883\uC885\uC886\uC887\uC88B\uC88C\uC88D\uC894\uC89D\uC89F\uC8A1\uC8A8\uC8BC\uC8BD\uC8C4\uC8C8\uC8CC\uC8D4\uC8D5\uC8D7\uC8D9\uC8E0\uC8E1\uC8E4\uC8F5\uC8FC\uC8FD\uC900\uC904\uC905\uC906\uC90C\uC90D\uC90F\uC911\uC918\uC92C\uC934\uC950\uC951\uC954\uC958\uC960\uC961\uC963\uC96C\uC970\uC974\uC97C\uC988\uC989\uC98C\uC990\uC998\uC999\uC99B\uC99D\uC9C0\uC9C1\uC9C4\uC9C7\uC9C8\uC9CA\uC9D0\uC9D1\uC9D3"], + ["c241", "\uD5CA\uD5CB\uD5CD\uD5CE\uD5CF\uD5D1\uD5D3", 4, "\uD5DA\uD5DC\uD5DE", 5, "\uD5E6\uD5E7\uD5E9\uD5EA\uD5EB\uD5ED\uD5EE"], + ["c261", "\uD5EF", 4, "\uD5F6\uD5F8\uD5FA", 5, "\uD602\uD603\uD605\uD606\uD607\uD609", 6, "\uD612"], + ["c281", "\uD616", 5, "\uD61D\uD61E\uD61F\uD621\uD622\uD623\uD625", 7, "\uD62E", 9, "\uD63A\uD63B\uC9D5\uC9D6\uC9D9\uC9DA\uC9DC\uC9DD\uC9E0\uC9E2\uC9E4\uC9E7\uC9EC\uC9ED\uC9EF\uC9F0\uC9F1\uC9F8\uC9F9\uC9FC\uCA00\uCA08\uCA09\uCA0B\uCA0C\uCA0D\uCA14\uCA18\uCA29\uCA4C\uCA4D\uCA50\uCA54\uCA5C\uCA5D\uCA5F\uCA60\uCA61\uCA68\uCA7D\uCA84\uCA98\uCABC\uCABD\uCAC0\uCAC4\uCACC\uCACD\uCACF\uCAD1\uCAD3\uCAD8\uCAD9\uCAE0\uCAEC\uCAF4\uCB08\uCB10\uCB14\uCB18\uCB20\uCB21\uCB41\uCB48\uCB49\uCB4C\uCB50\uCB58\uCB59\uCB5D\uCB64\uCB78\uCB79\uCB9C\uCBB8\uCBD4\uCBE4\uCBE7\uCBE9\uCC0C\uCC0D\uCC10\uCC14\uCC1C\uCC1D\uCC21\uCC22\uCC27\uCC28\uCC29\uCC2C\uCC2E\uCC30\uCC38\uCC39\uCC3B"], + ["c341", "\uD63D\uD63E\uD63F\uD641\uD642\uD643\uD644\uD646\uD647\uD64A\uD64C\uD64E\uD64F\uD650\uD652\uD653\uD656\uD657\uD659\uD65A\uD65B\uD65D", 4], + ["c361", "\uD662", 4, "\uD668\uD66A", 5, "\uD672\uD673\uD675", 11], + ["c381", "\uD681\uD682\uD684\uD686", 5, "\uD68E\uD68F\uD691\uD692\uD693\uD695", 7, "\uD69E\uD6A0\uD6A2", 5, "\uD6A9\uD6AA\uCC3C\uCC3D\uCC3E\uCC44\uCC45\uCC48\uCC4C\uCC54\uCC55\uCC57\uCC58\uCC59\uCC60\uCC64\uCC66\uCC68\uCC70\uCC75\uCC98\uCC99\uCC9C\uCCA0\uCCA8\uCCA9\uCCAB\uCCAC\uCCAD\uCCB4\uCCB5\uCCB8\uCCBC\uCCC4\uCCC5\uCCC7\uCCC9\uCCD0\uCCD4\uCCE4\uCCEC\uCCF0\uCD01\uCD08\uCD09\uCD0C\uCD10\uCD18\uCD19\uCD1B\uCD1D\uCD24\uCD28\uCD2C\uCD39\uCD5C\uCD60\uCD64\uCD6C\uCD6D\uCD6F\uCD71\uCD78\uCD88\uCD94\uCD95\uCD98\uCD9C\uCDA4\uCDA5\uCDA7\uCDA9\uCDB0\uCDC4\uCDCC\uCDD0\uCDE8\uCDEC\uCDF0\uCDF8\uCDF9\uCDFB\uCDFD\uCE04\uCE08\uCE0C\uCE14\uCE19\uCE20\uCE21\uCE24\uCE28\uCE30\uCE31\uCE33\uCE35"], + ["c441", "\uD6AB\uD6AD\uD6AE\uD6AF\uD6B1", 7, "\uD6BA\uD6BC", 7, "\uD6C6\uD6C7\uD6C9\uD6CA\uD6CB"], + ["c461", "\uD6CD\uD6CE\uD6CF\uD6D0\uD6D2\uD6D3\uD6D5\uD6D6\uD6D8\uD6DA", 5, "\uD6E1\uD6E2\uD6E3\uD6E5\uD6E6\uD6E7\uD6E9", 4], + ["c481", "\uD6EE\uD6EF\uD6F1\uD6F2\uD6F3\uD6F4\uD6F6", 5, "\uD6FE\uD6FF\uD701\uD702\uD703\uD705", 11, "\uD712\uD713\uD714\uCE58\uCE59\uCE5C\uCE5F\uCE60\uCE61\uCE68\uCE69\uCE6B\uCE6D\uCE74\uCE75\uCE78\uCE7C\uCE84\uCE85\uCE87\uCE89\uCE90\uCE91\uCE94\uCE98\uCEA0\uCEA1\uCEA3\uCEA4\uCEA5\uCEAC\uCEAD\uCEC1\uCEE4\uCEE5\uCEE8\uCEEB\uCEEC\uCEF4\uCEF5\uCEF7\uCEF8\uCEF9\uCF00\uCF01\uCF04\uCF08\uCF10\uCF11\uCF13\uCF15\uCF1C\uCF20\uCF24\uCF2C\uCF2D\uCF2F\uCF30\uCF31\uCF38\uCF54\uCF55\uCF58\uCF5C\uCF64\uCF65\uCF67\uCF69\uCF70\uCF71\uCF74\uCF78\uCF80\uCF85\uCF8C\uCFA1\uCFA8\uCFB0\uCFC4\uCFE0\uCFE1\uCFE4\uCFE8\uCFF0\uCFF1\uCFF3\uCFF5\uCFFC\uD000\uD004\uD011\uD018\uD02D\uD034\uD035\uD038\uD03C"], + ["c541", "\uD715\uD716\uD717\uD71A\uD71B\uD71D\uD71E\uD71F\uD721", 6, "\uD72A\uD72C\uD72E", 5, "\uD736\uD737\uD739"], + ["c561", "\uD73A\uD73B\uD73D", 6, "\uD745\uD746\uD748\uD74A", 5, "\uD752\uD753\uD755\uD75A", 4], + ["c581", "\uD75F\uD762\uD764\uD766\uD767\uD768\uD76A\uD76B\uD76D\uD76E\uD76F\uD771\uD772\uD773\uD775", 6, "\uD77E\uD77F\uD780\uD782", 5, "\uD78A\uD78B\uD044\uD045\uD047\uD049\uD050\uD054\uD058\uD060\uD06C\uD06D\uD070\uD074\uD07C\uD07D\uD081\uD0A4\uD0A5\uD0A8\uD0AC\uD0B4\uD0B5\uD0B7\uD0B9\uD0C0\uD0C1\uD0C4\uD0C8\uD0C9\uD0D0\uD0D1\uD0D3\uD0D4\uD0D5\uD0DC\uD0DD\uD0E0\uD0E4\uD0EC\uD0ED\uD0EF\uD0F0\uD0F1\uD0F8\uD10D\uD130\uD131\uD134\uD138\uD13A\uD140\uD141\uD143\uD144\uD145\uD14C\uD14D\uD150\uD154\uD15C\uD15D\uD15F\uD161\uD168\uD16C\uD17C\uD184\uD188\uD1A0\uD1A1\uD1A4\uD1A8\uD1B0\uD1B1\uD1B3\uD1B5\uD1BA\uD1BC\uD1C0\uD1D8\uD1F4\uD1F8\uD207\uD209\uD210\uD22C\uD22D\uD230\uD234\uD23C\uD23D\uD23F\uD241\uD248\uD25C"], + ["c641", "\uD78D\uD78E\uD78F\uD791", 6, "\uD79A\uD79C\uD79E", 5], + ["c6a1", "\uD264\uD280\uD281\uD284\uD288\uD290\uD291\uD295\uD29C\uD2A0\uD2A4\uD2AC\uD2B1\uD2B8\uD2B9\uD2BC\uD2BF\uD2C0\uD2C2\uD2C8\uD2C9\uD2CB\uD2D4\uD2D8\uD2DC\uD2E4\uD2E5\uD2F0\uD2F1\uD2F4\uD2F8\uD300\uD301\uD303\uD305\uD30C\uD30D\uD30E\uD310\uD314\uD316\uD31C\uD31D\uD31F\uD320\uD321\uD325\uD328\uD329\uD32C\uD330\uD338\uD339\uD33B\uD33C\uD33D\uD344\uD345\uD37C\uD37D\uD380\uD384\uD38C\uD38D\uD38F\uD390\uD391\uD398\uD399\uD39C\uD3A0\uD3A8\uD3A9\uD3AB\uD3AD\uD3B4\uD3B8\uD3BC\uD3C4\uD3C5\uD3C8\uD3C9\uD3D0\uD3D8\uD3E1\uD3E3\uD3EC\uD3ED\uD3F0\uD3F4\uD3FC\uD3FD\uD3FF\uD401"], + ["c7a1", "\uD408\uD41D\uD440\uD444\uD45C\uD460\uD464\uD46D\uD46F\uD478\uD479\uD47C\uD47F\uD480\uD482\uD488\uD489\uD48B\uD48D\uD494\uD4A9\uD4CC\uD4D0\uD4D4\uD4DC\uD4DF\uD4E8\uD4EC\uD4F0\uD4F8\uD4FB\uD4FD\uD504\uD508\uD50C\uD514\uD515\uD517\uD53C\uD53D\uD540\uD544\uD54C\uD54D\uD54F\uD551\uD558\uD559\uD55C\uD560\uD565\uD568\uD569\uD56B\uD56D\uD574\uD575\uD578\uD57C\uD584\uD585\uD587\uD588\uD589\uD590\uD5A5\uD5C8\uD5C9\uD5CC\uD5D0\uD5D2\uD5D8\uD5D9\uD5DB\uD5DD\uD5E4\uD5E5\uD5E8\uD5EC\uD5F4\uD5F5\uD5F7\uD5F9\uD600\uD601\uD604\uD608\uD610\uD611\uD613\uD614\uD615\uD61C\uD620"], + ["c8a1", "\uD624\uD62D\uD638\uD639\uD63C\uD640\uD645\uD648\uD649\uD64B\uD64D\uD651\uD654\uD655\uD658\uD65C\uD667\uD669\uD670\uD671\uD674\uD683\uD685\uD68C\uD68D\uD690\uD694\uD69D\uD69F\uD6A1\uD6A8\uD6AC\uD6B0\uD6B9\uD6BB\uD6C4\uD6C5\uD6C8\uD6CC\uD6D1\uD6D4\uD6D7\uD6D9\uD6E0\uD6E4\uD6E8\uD6F0\uD6F5\uD6FC\uD6FD\uD700\uD704\uD711\uD718\uD719\uD71C\uD720\uD728\uD729\uD72B\uD72D\uD734\uD735\uD738\uD73C\uD744\uD747\uD749\uD750\uD751\uD754\uD756\uD757\uD758\uD759\uD760\uD761\uD763\uD765\uD769\uD76C\uD770\uD774\uD77C\uD77D\uD781\uD788\uD789\uD78C\uD790\uD798\uD799\uD79B\uD79D"], + ["caa1", "\u4F3D\u4F73\u5047\u50F9\u52A0\u53EF\u5475\u54E5\u5609\u5AC1\u5BB6\u6687\u67B6\u67B7\u67EF\u6B4C\u73C2\u75C2\u7A3C\u82DB\u8304\u8857\u8888\u8A36\u8CC8\u8DCF\u8EFB\u8FE6\u99D5\u523B\u5374\u5404\u606A\u6164\u6BBC\u73CF\u811A\u89BA\u89D2\u95A3\u4F83\u520A\u58BE\u5978\u59E6\u5E72\u5E79\u61C7\u63C0\u6746\u67EC\u687F\u6F97\u764E\u770B\u78F5\u7A08\u7AFF\u7C21\u809D\u826E\u8271\u8AEB\u9593\u4E6B\u559D\u66F7\u6E34\u78A3\u7AED\u845B\u8910\u874E\u97A8\u52D8\u574E\u582A\u5D4C\u611F\u61BE\u6221\u6562\u67D1\u6A44\u6E1B\u7518\u75B3\u76E3\u77B0\u7D3A\u90AF\u9451\u9452\u9F95"], + ["cba1", "\u5323\u5CAC\u7532\u80DB\u9240\u9598\u525B\u5808\u59DC\u5CA1\u5D17\u5EB7\u5F3A\u5F4A\u6177\u6C5F\u757A\u7586\u7CE0\u7D73\u7DB1\u7F8C\u8154\u8221\u8591\u8941\u8B1B\u92FC\u964D\u9C47\u4ECB\u4EF7\u500B\u51F1\u584F\u6137\u613E\u6168\u6539\u69EA\u6F11\u75A5\u7686\u76D6\u7B87\u82A5\u84CB\uF900\u93A7\u958B\u5580\u5BA2\u5751\uF901\u7CB3\u7FB9\u91B5\u5028\u53BB\u5C45\u5DE8\u62D2\u636E\u64DA\u64E7\u6E20\u70AC\u795B\u8DDD\u8E1E\uF902\u907D\u9245\u92F8\u4E7E\u4EF6\u5065\u5DFE\u5EFA\u6106\u6957\u8171\u8654\u8E47\u9375\u9A2B\u4E5E\u5091\u6770\u6840\u5109\u528D\u5292\u6AA2"], + ["cca1", "\u77BC\u9210\u9ED4\u52AB\u602F\u8FF2\u5048\u61A9\u63ED\u64CA\u683C\u6A84\u6FC0\u8188\u89A1\u9694\u5805\u727D\u72AC\u7504\u7D79\u7E6D\u80A9\u898B\u8B74\u9063\u9D51\u6289\u6C7A\u6F54\u7D50\u7F3A\u8A23\u517C\u614A\u7B9D\u8B19\u9257\u938C\u4EAC\u4FD3\u501E\u50BE\u5106\u52C1\u52CD\u537F\u5770\u5883\u5E9A\u5F91\u6176\u61AC\u64CE\u656C\u666F\u66BB\u66F4\u6897\u6D87\u7085\u70F1\u749F\u74A5\u74CA\u75D9\u786C\u78EC\u7ADF\u7AF6\u7D45\u7D93\u8015\u803F\u811B\u8396\u8B66\u8F15\u9015\u93E1\u9803\u9838\u9A5A\u9BE8\u4FC2\u5553\u583A\u5951\u5B63\u5C46\u60B8\u6212\u6842\u68B0"], + ["cda1", "\u68E8\u6EAA\u754C\u7678\u78CE\u7A3D\u7CFB\u7E6B\u7E7C\u8A08\u8AA1\u8C3F\u968E\u9DC4\u53E4\u53E9\u544A\u5471\u56FA\u59D1\u5B64\u5C3B\u5EAB\u62F7\u6537\u6545\u6572\u66A0\u67AF\u69C1\u6CBD\u75FC\u7690\u777E\u7A3F\u7F94\u8003\u80A1\u818F\u82E6\u82FD\u83F0\u85C1\u8831\u88B4\u8AA5\uF903\u8F9C\u932E\u96C7\u9867\u9AD8\u9F13\u54ED\u659B\u66F2\u688F\u7A40\u8C37\u9D60\u56F0\u5764\u5D11\u6606\u68B1\u68CD\u6EFE\u7428\u889E\u9BE4\u6C68\uF904\u9AA8\u4F9B\u516C\u5171\u529F\u5B54\u5DE5\u6050\u606D\u62F1\u63A7\u653B\u73D9\u7A7A\u86A3\u8CA2\u978F\u4E32\u5BE1\u6208\u679C\u74DC"], + ["cea1", "\u79D1\u83D3\u8A87\u8AB2\u8DE8\u904E\u934B\u9846\u5ED3\u69E8\u85FF\u90ED\uF905\u51A0\u5B98\u5BEC\u6163\u68FA\u6B3E\u704C\u742F\u74D8\u7BA1\u7F50\u83C5\u89C0\u8CAB\u95DC\u9928\u522E\u605D\u62EC\u9002\u4F8A\u5149\u5321\u58D9\u5EE3\u66E0\u6D38\u709A\u72C2\u73D6\u7B50\u80F1\u945B\u5366\u639B\u7F6B\u4E56\u5080\u584A\u58DE\u602A\u6127\u62D0\u69D0\u9B41\u5B8F\u7D18\u80B1\u8F5F\u4EA4\u50D1\u54AC\u55AC\u5B0C\u5DA0\u5DE7\u652A\u654E\u6821\u6A4B\u72E1\u768E\u77EF\u7D5E\u7FF9\u81A0\u854E\u86DF\u8F03\u8F4E\u90CA\u9903\u9A55\u9BAB\u4E18\u4E45\u4E5D\u4EC7\u4FF1\u5177\u52FE"], + ["cfa1", "\u5340\u53E3\u53E5\u548E\u5614\u5775\u57A2\u5BC7\u5D87\u5ED0\u61FC\u62D8\u6551\u67B8\u67E9\u69CB\u6B50\u6BC6\u6BEC\u6C42\u6E9D\u7078\u72D7\u7396\u7403\u77BF\u77E9\u7A76\u7D7F\u8009\u81FC\u8205\u820A\u82DF\u8862\u8B33\u8CFC\u8EC0\u9011\u90B1\u9264\u92B6\u99D2\u9A45\u9CE9\u9DD7\u9F9C\u570B\u5C40\u83CA\u97A0\u97AB\u9EB4\u541B\u7A98\u7FA4\u88D9\u8ECD\u90E1\u5800\u5C48\u6398\u7A9F\u5BAE\u5F13\u7A79\u7AAE\u828E\u8EAC\u5026\u5238\u52F8\u5377\u5708\u62F3\u6372\u6B0A\u6DC3\u7737\u53A5\u7357\u8568\u8E76\u95D5\u673A\u6AC3\u6F70\u8A6D\u8ECC\u994B\uF906\u6677\u6B78\u8CB4"], + ["d0a1", "\u9B3C\uF907\u53EB\u572D\u594E\u63C6\u69FB\u73EA\u7845\u7ABA\u7AC5\u7CFE\u8475\u898F\u8D73\u9035\u95A8\u52FB\u5747\u7547\u7B60\u83CC\u921E\uF908\u6A58\u514B\u524B\u5287\u621F\u68D8\u6975\u9699\u50C5\u52A4\u52E4\u61C3\u65A4\u6839\u69FF\u747E\u7B4B\u82B9\u83EB\u89B2\u8B39\u8FD1\u9949\uF909\u4ECA\u5997\u64D2\u6611\u6A8E\u7434\u7981\u79BD\u82A9\u887E\u887F\u895F\uF90A\u9326\u4F0B\u53CA\u6025\u6271\u6C72\u7D1A\u7D66\u4E98\u5162\u77DC\u80AF\u4F01\u4F0E\u5176\u5180\u55DC\u5668\u573B\u57FA\u57FC\u5914\u5947\u5993\u5BC4\u5C90\u5D0E\u5DF1\u5E7E\u5FCC\u6280\u65D7\u65E3"], + ["d1a1", "\u671E\u671F\u675E\u68CB\u68C4\u6A5F\u6B3A\u6C23\u6C7D\u6C82\u6DC7\u7398\u7426\u742A\u7482\u74A3\u7578\u757F\u7881\u78EF\u7941\u7947\u7948\u797A\u7B95\u7D00\u7DBA\u7F88\u8006\u802D\u808C\u8A18\u8B4F\u8C48\u8D77\u9321\u9324\u98E2\u9951\u9A0E\u9A0F\u9A65\u9E92\u7DCA\u4F76\u5409\u62EE\u6854\u91D1\u55AB\u513A\uF90B\uF90C\u5A1C\u61E6\uF90D\u62CF\u62FF\uF90E", 5, "\u90A3\uF914", 4, "\u8AFE\uF919\uF91A\uF91B\uF91C\u6696\uF91D\u7156\uF91E\uF91F\u96E3\uF920\u634F\u637A\u5357\uF921\u678F\u6960\u6E73\uF922\u7537\uF923\uF924\uF925"], + ["d2a1", "\u7D0D\uF926\uF927\u8872\u56CA\u5A18\uF928", 4, "\u4E43\uF92D\u5167\u5948\u67F0\u8010\uF92E\u5973\u5E74\u649A\u79CA\u5FF5\u606C\u62C8\u637B\u5BE7\u5BD7\u52AA\uF92F\u5974\u5F29\u6012\uF930\uF931\uF932\u7459\uF933", 5, "\u99D1\uF939", 10, "\u6FC3\uF944\uF945\u81BF\u8FB2\u60F1\uF946\uF947\u8166\uF948\uF949\u5C3F\uF94A", 7, "\u5AE9\u8A25\u677B\u7D10\uF952", 5, "\u80FD\uF958\uF959\u5C3C\u6CE5\u533F\u6EBA\u591A\u8336"], + ["d3a1", "\u4E39\u4EB6\u4F46\u55AE\u5718\u58C7\u5F56\u65B7\u65E6\u6A80\u6BB5\u6E4D\u77ED\u7AEF\u7C1E\u7DDE\u86CB\u8892\u9132\u935B\u64BB\u6FBE\u737A\u75B8\u9054\u5556\u574D\u61BA\u64D4\u66C7\u6DE1\u6E5B\u6F6D\u6FB9\u75F0\u8043\u81BD\u8541\u8983\u8AC7\u8B5A\u931F\u6C93\u7553\u7B54\u8E0F\u905D\u5510\u5802\u5858\u5E62\u6207\u649E\u68E0\u7576\u7CD6\u87B3\u9EE8\u4EE3\u5788\u576E\u5927\u5C0D\u5CB1\u5E36\u5F85\u6234\u64E1\u73B3\u81FA\u888B\u8CB8\u968A\u9EDB\u5B85\u5FB7\u60B3\u5012\u5200\u5230\u5716\u5835\u5857\u5C0E\u5C60\u5CF6\u5D8B\u5EA6\u5F92\u60BC\u6311\u6389\u6417\u6843"], + ["d4a1", "\u68F9\u6AC2\u6DD8\u6E21\u6ED4\u6FE4\u71FE\u76DC\u7779\u79B1\u7A3B\u8404\u89A9\u8CED\u8DF3\u8E48\u9003\u9014\u9053\u90FD\u934D\u9676\u97DC\u6BD2\u7006\u7258\u72A2\u7368\u7763\u79BF\u7BE4\u7E9B\u8B80\u58A9\u60C7\u6566\u65FD\u66BE\u6C8C\u711E\u71C9\u8C5A\u9813\u4E6D\u7A81\u4EDD\u51AC\u51CD\u52D5\u540C\u61A7\u6771\u6850\u68DF\u6D1E\u6F7C\u75BC\u77B3\u7AE5\u80F4\u8463\u9285\u515C\u6597\u675C\u6793\u75D8\u7AC7\u8373\uF95A\u8C46\u9017\u982D\u5C6F\u81C0\u829A\u9041\u906F\u920D\u5F97\u5D9D\u6A59\u71C8\u767B\u7B49\u85E4\u8B04\u9127\u9A30\u5587\u61F6\uF95B\u7669\u7F85"], + ["d5a1", "\u863F\u87BA\u88F8\u908F\uF95C\u6D1B\u70D9\u73DE\u7D61\u843D\uF95D\u916A\u99F1\uF95E\u4E82\u5375\u6B04\u6B12\u703E\u721B\u862D\u9E1E\u524C\u8FA3\u5D50\u64E5\u652C\u6B16\u6FEB\u7C43\u7E9C\u85CD\u8964\u89BD\u62C9\u81D8\u881F\u5ECA\u6717\u6D6A\u72FC\u7405\u746F\u8782\u90DE\u4F86\u5D0D\u5FA0\u840A\u51B7\u63A0\u7565\u4EAE\u5006\u5169\u51C9\u6881\u6A11\u7CAE\u7CB1\u7CE7\u826F\u8AD2\u8F1B\u91CF\u4FB6\u5137\u52F5\u5442\u5EEC\u616E\u623E\u65C5\u6ADA\u6FFE\u792A\u85DC\u8823\u95AD\u9A62\u9A6A\u9E97\u9ECE\u529B\u66C6\u6B77\u701D\u792B\u8F62\u9742\u6190\u6200\u6523\u6F23"], + ["d6a1", "\u7149\u7489\u7DF4\u806F\u84EE\u8F26\u9023\u934A\u51BD\u5217\u52A3\u6D0C\u70C8\u88C2\u5EC9\u6582\u6BAE\u6FC2\u7C3E\u7375\u4EE4\u4F36\u56F9\uF95F\u5CBA\u5DBA\u601C\u73B2\u7B2D\u7F9A\u7FCE\u8046\u901E\u9234\u96F6\u9748\u9818\u9F61\u4F8B\u6FA7\u79AE\u91B4\u96B7\u52DE\uF960\u6488\u64C4\u6AD3\u6F5E\u7018\u7210\u76E7\u8001\u8606\u865C\u8DEF\u8F05\u9732\u9B6F\u9DFA\u9E75\u788C\u797F\u7DA0\u83C9\u9304\u9E7F\u9E93\u8AD6\u58DF\u5F04\u6727\u7027\u74CF\u7C60\u807E\u5121\u7028\u7262\u78CA\u8CC2\u8CDA\u8CF4\u96F7\u4E86\u50DA\u5BEE\u5ED6\u6599\u71CE\u7642\u77AD\u804A\u84FC"], + ["d7a1", "\u907C\u9B27\u9F8D\u58D8\u5A41\u5C62\u6A13\u6DDA\u6F0F\u763B\u7D2F\u7E37\u851E\u8938\u93E4\u964B\u5289\u65D2\u67F3\u69B4\u6D41\u6E9C\u700F\u7409\u7460\u7559\u7624\u786B\u8B2C\u985E\u516D\u622E\u9678\u4F96\u502B\u5D19\u6DEA\u7DB8\u8F2A\u5F8B\u6144\u6817\uF961\u9686\u52D2\u808B\u51DC\u51CC\u695E\u7A1C\u7DBE\u83F1\u9675\u4FDA\u5229\u5398\u540F\u550E\u5C65\u60A7\u674E\u68A8\u6D6C\u7281\u72F8\u7406\u7483\uF962\u75E2\u7C6C\u7F79\u7FB8\u8389\u88CF\u88E1\u91CC\u91D0\u96E2\u9BC9\u541D\u6F7E\u71D0\u7498\u85FA\u8EAA\u96A3\u9C57\u9E9F\u6797\u6DCB\u7433\u81E8\u9716\u782C"], + ["d8a1", "\u7ACB\u7B20\u7C92\u6469\u746A\u75F2\u78BC\u78E8\u99AC\u9B54\u9EBB\u5BDE\u5E55\u6F20\u819C\u83AB\u9088\u4E07\u534D\u5A29\u5DD2\u5F4E\u6162\u633D\u6669\u66FC\u6EFF\u6F2B\u7063\u779E\u842C\u8513\u883B\u8F13\u9945\u9C3B\u551C\u62B9\u672B\u6CAB\u8309\u896A\u977A\u4EA1\u5984\u5FD8\u5FD9\u671B\u7DB2\u7F54\u8292\u832B\u83BD\u8F1E\u9099\u57CB\u59B9\u5A92\u5BD0\u6627\u679A\u6885\u6BCF\u7164\u7F75\u8CB7\u8CE3\u9081\u9B45\u8108\u8C8A\u964C\u9A40\u9EA5\u5B5F\u6C13\u731B\u76F2\u76DF\u840C\u51AA\u8993\u514D\u5195\u52C9\u68C9\u6C94\u7704\u7720\u7DBF\u7DEC\u9762\u9EB5\u6EC5"], + ["d9a1", "\u8511\u51A5\u540D\u547D\u660E\u669D\u6927\u6E9F\u76BF\u7791\u8317\u84C2\u879F\u9169\u9298\u9CF4\u8882\u4FAE\u5192\u52DF\u59C6\u5E3D\u6155\u6478\u6479\u66AE\u67D0\u6A21\u6BCD\u6BDB\u725F\u7261\u7441\u7738\u77DB\u8017\u82BC\u8305\u8B00\u8B28\u8C8C\u6728\u6C90\u7267\u76EE\u7766\u7A46\u9DA9\u6B7F\u6C92\u5922\u6726\u8499\u536F\u5893\u5999\u5EDF\u63CF\u6634\u6773\u6E3A\u732B\u7AD7\u82D7\u9328\u52D9\u5DEB\u61AE\u61CB\u620A\u62C7\u64AB\u65E0\u6959\u6B66\u6BCB\u7121\u73F7\u755D\u7E46\u821E\u8302\u856A\u8AA3\u8CBF\u9727\u9D61\u58A8\u9ED8\u5011\u520E\u543B\u554F\u6587"], + ["daa1", "\u6C76\u7D0A\u7D0B\u805E\u868A\u9580\u96EF\u52FF\u6C95\u7269\u5473\u5A9A\u5C3E\u5D4B\u5F4C\u5FAE\u672A\u68B6\u6963\u6E3C\u6E44\u7709\u7C73\u7F8E\u8587\u8B0E\u8FF7\u9761\u9EF4\u5CB7\u60B6\u610D\u61AB\u654F\u65FB\u65FC\u6C11\u6CEF\u739F\u73C9\u7DE1\u9594\u5BC6\u871C\u8B10\u525D\u535A\u62CD\u640F\u64B2\u6734\u6A38\u6CCA\u73C0\u749E\u7B94\u7C95\u7E1B\u818A\u8236\u8584\u8FEB\u96F9\u99C1\u4F34\u534A\u53CD\u53DB\u62CC\u642C\u6500\u6591\u69C3\u6CEE\u6F58\u73ED\u7554\u7622\u76E4\u76FC\u78D0\u78FB\u792C\u7D46\u822C\u87E0\u8FD4\u9812\u98EF\u52C3\u62D4\u64A5\u6E24\u6F51"], + ["dba1", "\u767C\u8DCB\u91B1\u9262\u9AEE\u9B43\u5023\u508D\u574A\u59A8\u5C28\u5E47\u5F77\u623F\u653E\u65B9\u65C1\u6609\u678B\u699C\u6EC2\u78C5\u7D21\u80AA\u8180\u822B\u82B3\u84A1\u868C\u8A2A\u8B17\u90A6\u9632\u9F90\u500D\u4FF3\uF963\u57F9\u5F98\u62DC\u6392\u676F\u6E43\u7119\u76C3\u80CC\u80DA\u88F4\u88F5\u8919\u8CE0\u8F29\u914D\u966A\u4F2F\u4F70\u5E1B\u67CF\u6822\u767D\u767E\u9B44\u5E61\u6A0A\u7169\u71D4\u756A\uF964\u7E41\u8543\u85E9\u98DC\u4F10\u7B4F\u7F70\u95A5\u51E1\u5E06\u68B5\u6C3E\u6C4E\u6CDB\u72AF\u7BC4\u8303\u6CD5\u743A\u50FB\u5288\u58C1\u64D8\u6A97\u74A7\u7656"], + ["dca1", "\u78A7\u8617\u95E2\u9739\uF965\u535E\u5F01\u8B8A\u8FA8\u8FAF\u908A\u5225\u77A5\u9C49\u9F08\u4E19\u5002\u5175\u5C5B\u5E77\u661E\u663A\u67C4\u68C5\u70B3\u7501\u75C5\u79C9\u7ADD\u8F27\u9920\u9A08\u4FDD\u5821\u5831\u5BF6\u666E\u6B65\u6D11\u6E7A\u6F7D\u73E4\u752B\u83E9\u88DC\u8913\u8B5C\u8F14\u4F0F\u50D5\u5310\u535C\u5B93\u5FA9\u670D\u798F\u8179\u832F\u8514\u8907\u8986\u8F39\u8F3B\u99A5\u9C12\u672C\u4E76\u4FF8\u5949\u5C01\u5CEF\u5CF0\u6367\u68D2\u70FD\u71A2\u742B\u7E2B\u84EC\u8702\u9022\u92D2\u9CF3\u4E0D\u4ED8\u4FEF\u5085\u5256\u526F\u5426\u5490\u57E0\u592B\u5A66"], + ["dda1", "\u5B5A\u5B75\u5BCC\u5E9C\uF966\u6276\u6577\u65A7\u6D6E\u6EA5\u7236\u7B26\u7C3F\u7F36\u8150\u8151\u819A\u8240\u8299\u83A9\u8A03\u8CA0\u8CE6\u8CFB\u8D74\u8DBA\u90E8\u91DC\u961C\u9644\u99D9\u9CE7\u5317\u5206\u5429\u5674\u58B3\u5954\u596E\u5FFF\u61A4\u626E\u6610\u6C7E\u711A\u76C6\u7C89\u7CDE\u7D1B\u82AC\u8CC1\u96F0\uF967\u4F5B\u5F17\u5F7F\u62C2\u5D29\u670B\u68DA\u787C\u7E43\u9D6C\u4E15\u5099\u5315\u532A\u5351\u5983\u5A62\u5E87\u60B2\u618A\u6249\u6279\u6590\u6787\u69A7\u6BD4\u6BD6\u6BD7\u6BD8\u6CB8\uF968\u7435\u75FA\u7812\u7891\u79D5\u79D8\u7C83\u7DCB\u7FE1\u80A5"], + ["dea1", "\u813E\u81C2\u83F2\u871A\u88E8\u8AB9\u8B6C\u8CBB\u9119\u975E\u98DB\u9F3B\u56AC\u5B2A\u5F6C\u658C\u6AB3\u6BAF\u6D5C\u6FF1\u7015\u725D\u73AD\u8CA7\u8CD3\u983B\u6191\u6C37\u8058\u9A01\u4E4D\u4E8B\u4E9B\u4ED5\u4F3A\u4F3C\u4F7F\u4FDF\u50FF\u53F2\u53F8\u5506\u55E3\u56DB\u58EB\u5962\u5A11\u5BEB\u5BFA\u5C04\u5DF3\u5E2B\u5F99\u601D\u6368\u659C\u65AF\u67F6\u67FB\u68AD\u6B7B\u6C99\u6CD7\u6E23\u7009\u7345\u7802\u793E\u7940\u7960\u79C1\u7BE9\u7D17\u7D72\u8086\u820D\u838E\u84D1\u86C7\u88DF\u8A50\u8A5E\u8B1D\u8CDC\u8D66\u8FAD\u90AA\u98FC\u99DF\u9E9D\u524A\uF969\u6714\uF96A"], + ["dfa1", "\u5098\u522A\u5C71\u6563\u6C55\u73CA\u7523\u759D\u7B97\u849C\u9178\u9730\u4E77\u6492\u6BBA\u715E\u85A9\u4E09\uF96B\u6749\u68EE\u6E17\u829F\u8518\u886B\u63F7\u6F81\u9212\u98AF\u4E0A\u50B7\u50CF\u511F\u5546\u55AA\u5617\u5B40\u5C19\u5CE0\u5E38\u5E8A\u5EA0\u5EC2\u60F3\u6851\u6A61\u6E58\u723D\u7240\u72C0\u76F8\u7965\u7BB1\u7FD4\u88F3\u89F4\u8A73\u8C61\u8CDE\u971C\u585E\u74BD\u8CFD\u55C7\uF96C\u7A61\u7D22\u8272\u7272\u751F\u7525\uF96D\u7B19\u5885\u58FB\u5DBC\u5E8F\u5EB6\u5F90\u6055\u6292\u637F\u654D\u6691\u66D9\u66F8\u6816\u68F2\u7280\u745E\u7B6E\u7D6E\u7DD6\u7F72"], + ["e0a1", "\u80E5\u8212\u85AF\u897F\u8A93\u901D\u92E4\u9ECD\u9F20\u5915\u596D\u5E2D\u60DC\u6614\u6673\u6790\u6C50\u6DC5\u6F5F\u77F3\u78A9\u84C6\u91CB\u932B\u4ED9\u50CA\u5148\u5584\u5B0B\u5BA3\u6247\u657E\u65CB\u6E32\u717D\u7401\u7444\u7487\u74BF\u766C\u79AA\u7DDA\u7E55\u7FA8\u817A\u81B3\u8239\u861A\u87EC\u8A75\u8DE3\u9078\u9291\u9425\u994D\u9BAE\u5368\u5C51\u6954\u6CC4\u6D29\u6E2B\u820C\u859B\u893B\u8A2D\u8AAA\u96EA\u9F67\u5261\u66B9\u6BB2\u7E96\u87FE\u8D0D\u9583\u965D\u651D\u6D89\u71EE\uF96E\u57CE\u59D3\u5BAC\u6027\u60FA\u6210\u661F\u665F\u7329\u73F9\u76DB\u7701\u7B6C"], + ["e1a1", "\u8056\u8072\u8165\u8AA0\u9192\u4E16\u52E2\u6B72\u6D17\u7A05\u7B39\u7D30\uF96F\u8CB0\u53EC\u562F\u5851\u5BB5\u5C0F\u5C11\u5DE2\u6240\u6383\u6414\u662D\u68B3\u6CBC\u6D88\u6EAF\u701F\u70A4\u71D2\u7526\u758F\u758E\u7619\u7B11\u7BE0\u7C2B\u7D20\u7D39\u852C\u856D\u8607\u8A34\u900D\u9061\u90B5\u92B7\u97F6\u9A37\u4FD7\u5C6C\u675F\u6D91\u7C9F\u7E8C\u8B16\u8D16\u901F\u5B6B\u5DFD\u640D\u84C0\u905C\u98E1\u7387\u5B8B\u609A\u677E\u6DDE\u8A1F\u8AA6\u9001\u980C\u5237\uF970\u7051\u788E\u9396\u8870\u91D7\u4FEE\u53D7\u55FD\u56DA\u5782\u58FD\u5AC2\u5B88\u5CAB\u5CC0\u5E25\u6101"], + ["e2a1", "\u620D\u624B\u6388\u641C\u6536\u6578\u6A39\u6B8A\u6C34\u6D19\u6F31\u71E7\u72E9\u7378\u7407\u74B2\u7626\u7761\u79C0\u7A57\u7AEA\u7CB9\u7D8F\u7DAC\u7E61\u7F9E\u8129\u8331\u8490\u84DA\u85EA\u8896\u8AB0\u8B90\u8F38\u9042\u9083\u916C\u9296\u92B9\u968B\u96A7\u96A8\u96D6\u9700\u9808\u9996\u9AD3\u9B1A\u53D4\u587E\u5919\u5B70\u5BBF\u6DD1\u6F5A\u719F\u7421\u74B9\u8085\u83FD\u5DE1\u5F87\u5FAA\u6042\u65EC\u6812\u696F\u6A53\u6B89\u6D35\u6DF3\u73E3\u76FE\u77AC\u7B4D\u7D14\u8123\u821C\u8340\u84F4\u8563\u8A62\u8AC4\u9187\u931E\u9806\u99B4\u620C\u8853\u8FF0\u9265\u5D07\u5D27"], + ["e3a1", "\u5D69\u745F\u819D\u8768\u6FD5\u62FE\u7FD2\u8936\u8972\u4E1E\u4E58\u50E7\u52DD\u5347\u627F\u6607\u7E69\u8805\u965E\u4F8D\u5319\u5636\u59CB\u5AA4\u5C38\u5C4E\u5C4D\u5E02\u5F11\u6043\u65BD\u662F\u6642\u67BE\u67F4\u731C\u77E2\u793A\u7FC5\u8494\u84CD\u8996\u8A66\u8A69\u8AE1\u8C55\u8C7A\u57F4\u5BD4\u5F0F\u606F\u62ED\u690D\u6B96\u6E5C\u7184\u7BD2\u8755\u8B58\u8EFE\u98DF\u98FE\u4F38\u4F81\u4FE1\u547B\u5A20\u5BB8\u613C\u65B0\u6668\u71FC\u7533\u795E\u7D33\u814E\u81E3\u8398\u85AA\u85CE\u8703\u8A0A\u8EAB\u8F9B\uF971\u8FC5\u5931\u5BA4\u5BE6\u6089\u5BE9\u5C0B\u5FC3\u6C81"], + ["e4a1", "\uF972\u6DF1\u700B\u751A\u82AF\u8AF6\u4EC0\u5341\uF973\u96D9\u6C0F\u4E9E\u4FC4\u5152\u555E\u5A25\u5CE8\u6211\u7259\u82BD\u83AA\u86FE\u8859\u8A1D\u963F\u96C5\u9913\u9D09\u9D5D\u580A\u5CB3\u5DBD\u5E44\u60E1\u6115\u63E1\u6A02\u6E25\u9102\u9354\u984E\u9C10\u9F77\u5B89\u5CB8\u6309\u664F\u6848\u773C\u96C1\u978D\u9854\u9B9F\u65A1\u8B01\u8ECB\u95BC\u5535\u5CA9\u5DD6\u5EB5\u6697\u764C\u83F4\u95C7\u58D3\u62BC\u72CE\u9D28\u4EF0\u592E\u600F\u663B\u6B83\u79E7\u9D26\u5393\u54C0\u57C3\u5D16\u611B\u66D6\u6DAF\u788D\u827E\u9698\u9744\u5384\u627C\u6396\u6DB2\u7E0A\u814B\u984D"], + ["e5a1", "\u6AFB\u7F4C\u9DAF\u9E1A\u4E5F\u503B\u51B6\u591C\u60F9\u63F6\u6930\u723A\u8036\uF974\u91CE\u5F31\uF975\uF976\u7D04\u82E5\u846F\u84BB\u85E5\u8E8D\uF977\u4F6F\uF978\uF979\u58E4\u5B43\u6059\u63DA\u6518\u656D\u6698\uF97A\u694A\u6A23\u6D0B\u7001\u716C\u75D2\u760D\u79B3\u7A70\uF97B\u7F8A\uF97C\u8944\uF97D\u8B93\u91C0\u967D\uF97E\u990A\u5704\u5FA1\u65BC\u6F01\u7600\u79A6\u8A9E\u99AD\u9B5A\u9F6C\u5104\u61B6\u6291\u6A8D\u81C6\u5043\u5830\u5F66\u7109\u8A00\u8AFA\u5B7C\u8616\u4FFA\u513C\u56B4\u5944\u63A9\u6DF9\u5DAA\u696D\u5186\u4E88\u4F59\uF97F\uF980\uF981\u5982\uF982"], + ["e6a1", "\uF983\u6B5F\u6C5D\uF984\u74B5\u7916\uF985\u8207\u8245\u8339\u8F3F\u8F5D\uF986\u9918\uF987\uF988\uF989\u4EA6\uF98A\u57DF\u5F79\u6613\uF98B\uF98C\u75AB\u7E79\u8B6F\uF98D\u9006\u9A5B\u56A5\u5827\u59F8\u5A1F\u5BB4\uF98E\u5EF6\uF98F\uF990\u6350\u633B\uF991\u693D\u6C87\u6CBF\u6D8E\u6D93\u6DF5\u6F14\uF992\u70DF\u7136\u7159\uF993\u71C3\u71D5\uF994\u784F\u786F\uF995\u7B75\u7DE3\uF996\u7E2F\uF997\u884D\u8EDF\uF998\uF999\uF99A\u925B\uF99B\u9CF6\uF99C\uF99D\uF99E\u6085\u6D85\uF99F\u71B1\uF9A0\uF9A1\u95B1\u53AD\uF9A2\uF9A3\uF9A4\u67D3\uF9A5\u708E\u7130\u7430\u8276\u82D2"], + ["e7a1", "\uF9A6\u95BB\u9AE5\u9E7D\u66C4\uF9A7\u71C1\u8449\uF9A8\uF9A9\u584B\uF9AA\uF9AB\u5DB8\u5F71\uF9AC\u6620\u668E\u6979\u69AE\u6C38\u6CF3\u6E36\u6F41\u6FDA\u701B\u702F\u7150\u71DF\u7370\uF9AD\u745B\uF9AE\u74D4\u76C8\u7A4E\u7E93\uF9AF\uF9B0\u82F1\u8A60\u8FCE\uF9B1\u9348\uF9B2\u9719\uF9B3\uF9B4\u4E42\u502A\uF9B5\u5208\u53E1\u66F3\u6C6D\u6FCA\u730A\u777F\u7A62\u82AE\u85DD\u8602\uF9B6\u88D4\u8A63\u8B7D\u8C6B\uF9B7\u92B3\uF9B8\u9713\u9810\u4E94\u4F0D\u4FC9\u50B2\u5348\u543E\u5433\u55DA\u5862\u58BA\u5967\u5A1B\u5BE4\u609F\uF9B9\u61CA\u6556\u65FF\u6664\u68A7\u6C5A\u6FB3"], + ["e8a1", "\u70CF\u71AC\u7352\u7B7D\u8708\u8AA4\u9C32\u9F07\u5C4B\u6C83\u7344\u7389\u923A\u6EAB\u7465\u761F\u7A69\u7E15\u860A\u5140\u58C5\u64C1\u74EE\u7515\u7670\u7FC1\u9095\u96CD\u9954\u6E26\u74E6\u7AA9\u7AAA\u81E5\u86D9\u8778\u8A1B\u5A49\u5B8C\u5B9B\u68A1\u6900\u6D63\u73A9\u7413\u742C\u7897\u7DE9\u7FEB\u8118\u8155\u839E\u8C4C\u962E\u9811\u66F0\u5F80\u65FA\u6789\u6C6A\u738B\u502D\u5A03\u6B6A\u77EE\u5916\u5D6C\u5DCD\u7325\u754F\uF9BA\uF9BB\u50E5\u51F9\u582F\u592D\u5996\u59DA\u5BE5\uF9BC\uF9BD\u5DA2\u62D7\u6416\u6493\u64FE\uF9BE\u66DC\uF9BF\u6A48\uF9C0\u71FF\u7464\uF9C1"], + ["e9a1", "\u7A88\u7AAF\u7E47\u7E5E\u8000\u8170\uF9C2\u87EF\u8981\u8B20\u9059\uF9C3\u9080\u9952\u617E\u6B32\u6D74\u7E1F\u8925\u8FB1\u4FD1\u50AD\u5197\u52C7\u57C7\u5889\u5BB9\u5EB8\u6142\u6995\u6D8C\u6E67\u6EB6\u7194\u7462\u7528\u752C\u8073\u8338\u84C9\u8E0A\u9394\u93DE\uF9C4\u4E8E\u4F51\u5076\u512A\u53C8\u53CB\u53F3\u5B87\u5BD3\u5C24\u611A\u6182\u65F4\u725B\u7397\u7440\u76C2\u7950\u7991\u79B9\u7D06\u7FBD\u828B\u85D5\u865E\u8FC2\u9047\u90F5\u91EA\u9685\u96E8\u96E9\u52D6\u5F67\u65ED\u6631\u682F\u715C\u7A36\u90C1\u980A\u4E91\uF9C5\u6A52\u6B9E\u6F90\u7189\u8018\u82B8\u8553"], + ["eaa1", "\u904B\u9695\u96F2\u97FB\u851A\u9B31\u4E90\u718A\u96C4\u5143\u539F\u54E1\u5713\u5712\u57A3\u5A9B\u5AC4\u5BC3\u6028\u613F\u63F4\u6C85\u6D39\u6E72\u6E90\u7230\u733F\u7457\u82D1\u8881\u8F45\u9060\uF9C6\u9662\u9858\u9D1B\u6708\u8D8A\u925E\u4F4D\u5049\u50DE\u5371\u570D\u59D4\u5A01\u5C09\u6170\u6690\u6E2D\u7232\u744B\u7DEF\u80C3\u840E\u8466\u853F\u875F\u885B\u8918\u8B02\u9055\u97CB\u9B4F\u4E73\u4F91\u5112\u516A\uF9C7\u552F\u55A9\u5B7A\u5BA5\u5E7C\u5E7D\u5EBE\u60A0\u60DF\u6108\u6109\u63C4\u6538\u6709\uF9C8\u67D4\u67DA\uF9C9\u6961\u6962\u6CB9\u6D27\uF9CA\u6E38\uF9CB"], + ["eba1", "\u6FE1\u7336\u7337\uF9CC\u745C\u7531\uF9CD\u7652\uF9CE\uF9CF\u7DAD\u81FE\u8438\u88D5\u8A98\u8ADB\u8AED\u8E30\u8E42\u904A\u903E\u907A\u9149\u91C9\u936E\uF9D0\uF9D1\u5809\uF9D2\u6BD3\u8089\u80B2\uF9D3\uF9D4\u5141\u596B\u5C39\uF9D5\uF9D6\u6F64\u73A7\u80E4\u8D07\uF9D7\u9217\u958F\uF9D8\uF9D9\uF9DA\uF9DB\u807F\u620E\u701C\u7D68\u878D\uF9DC\u57A0\u6069\u6147\u6BB7\u8ABE\u9280\u96B1\u4E59\u541F\u6DEB\u852D\u9670\u97F3\u98EE\u63D6\u6CE3\u9091\u51DD\u61C9\u81BA\u9DF9\u4F9D\u501A\u5100\u5B9C\u610F\u61FF\u64EC\u6905\u6BC5\u7591\u77E3\u7FA9\u8264\u858F\u87FB\u8863\u8ABC"], + ["eca1", "\u8B70\u91AB\u4E8C\u4EE5\u4F0A\uF9DD\uF9DE\u5937\u59E8\uF9DF\u5DF2\u5F1B\u5F5B\u6021\uF9E0\uF9E1\uF9E2\uF9E3\u723E\u73E5\uF9E4\u7570\u75CD\uF9E5\u79FB\uF9E6\u800C\u8033\u8084\u82E1\u8351\uF9E7\uF9E8\u8CBD\u8CB3\u9087\uF9E9\uF9EA\u98F4\u990C\uF9EB\uF9EC\u7037\u76CA\u7FCA\u7FCC\u7FFC\u8B1A\u4EBA\u4EC1\u5203\u5370\uF9ED\u54BD\u56E0\u59FB\u5BC5\u5F15\u5FCD\u6E6E\uF9EE\uF9EF\u7D6A\u8335\uF9F0\u8693\u8A8D\uF9F1\u976D\u9777\uF9F2\uF9F3\u4E00\u4F5A\u4F7E\u58F9\u65E5\u6EA2\u9038\u93B0\u99B9\u4EFB\u58EC\u598A\u59D9\u6041\uF9F4\uF9F5\u7A14\uF9F6\u834F\u8CC3\u5165\u5344"], + ["eda1", "\uF9F7\uF9F8\uF9F9\u4ECD\u5269\u5B55\u82BF\u4ED4\u523A\u54A8\u59C9\u59FF\u5B50\u5B57\u5B5C\u6063\u6148\u6ECB\u7099\u716E\u7386\u74F7\u75B5\u78C1\u7D2B\u8005\u81EA\u8328\u8517\u85C9\u8AEE\u8CC7\u96CC\u4F5C\u52FA\u56BC\u65AB\u6628\u707C\u70B8\u7235\u7DBD\u828D\u914C\u96C0\u9D72\u5B71\u68E7\u6B98\u6F7A\u76DE\u5C91\u66AB\u6F5B\u7BB4\u7C2A\u8836\u96DC\u4E08\u4ED7\u5320\u5834\u58BB\u58EF\u596C\u5C07\u5E33\u5E84\u5F35\u638C\u66B2\u6756\u6A1F\u6AA3\u6B0C\u6F3F\u7246\uF9FA\u7350\u748B\u7AE0\u7CA7\u8178\u81DF\u81E7\u838A\u846C\u8523\u8594\u85CF\u88DD\u8D13\u91AC\u9577"], + ["eea1", "\u969C\u518D\u54C9\u5728\u5BB0\u624D\u6750\u683D\u6893\u6E3D\u6ED3\u707D\u7E21\u88C1\u8CA1\u8F09\u9F4B\u9F4E\u722D\u7B8F\u8ACD\u931A\u4F47\u4F4E\u5132\u5480\u59D0\u5E95\u62B5\u6775\u696E\u6A17\u6CAE\u6E1A\u72D9\u732A\u75BD\u7BB8\u7D35\u82E7\u83F9\u8457\u85F7\u8A5B\u8CAF\u8E87\u9019\u90B8\u96CE\u9F5F\u52E3\u540A\u5AE1\u5BC2\u6458\u6575\u6EF4\u72C4\uF9FB\u7684\u7A4D\u7B1B\u7C4D\u7E3E\u7FDF\u837B\u8B2B\u8CCA\u8D64\u8DE1\u8E5F\u8FEA\u8FF9\u9069\u93D1\u4F43\u4F7A\u50B3\u5168\u5178\u524D\u526A\u5861\u587C\u5960\u5C08\u5C55\u5EDB\u609B\u6230\u6813\u6BBF\u6C08\u6FB1"], + ["efa1", "\u714E\u7420\u7530\u7538\u7551\u7672\u7B4C\u7B8B\u7BAD\u7BC6\u7E8F\u8A6E\u8F3E\u8F49\u923F\u9293\u9322\u942B\u96FB\u985A\u986B\u991E\u5207\u622A\u6298\u6D59\u7664\u7ACA\u7BC0\u7D76\u5360\u5CBE\u5E97\u6F38\u70B9\u7C98\u9711\u9B8E\u9EDE\u63A5\u647A\u8776\u4E01\u4E95\u4EAD\u505C\u5075\u5448\u59C3\u5B9A\u5E40\u5EAD\u5EF7\u5F81\u60C5\u633A\u653F\u6574\u65CC\u6676\u6678\u67FE\u6968\u6A89\u6B63\u6C40\u6DC0\u6DE8\u6E1F\u6E5E\u701E\u70A1\u738E\u73FD\u753A\u775B\u7887\u798E\u7A0B\u7A7D\u7CBE\u7D8E\u8247\u8A02\u8AEA\u8C9E\u912D\u914A\u91D8\u9266\u92CC\u9320\u9706\u9756"], + ["f0a1", "\u975C\u9802\u9F0E\u5236\u5291\u557C\u5824\u5E1D\u5F1F\u608C\u63D0\u68AF\u6FDF\u796D\u7B2C\u81CD\u85BA\u88FD\u8AF8\u8E44\u918D\u9664\u969B\u973D\u984C\u9F4A\u4FCE\u5146\u51CB\u52A9\u5632\u5F14\u5F6B\u63AA\u64CD\u65E9\u6641\u66FA\u66F9\u671D\u689D\u68D7\u69FD\u6F15\u6F6E\u7167\u71E5\u722A\u74AA\u773A\u7956\u795A\u79DF\u7A20\u7A95\u7C97\u7CDF\u7D44\u7E70\u8087\u85FB\u86A4\u8A54\u8ABF\u8D99\u8E81\u9020\u906D\u91E3\u963B\u96D5\u9CE5\u65CF\u7C07\u8DB3\u93C3\u5B58\u5C0A\u5352\u62D9\u731D\u5027\u5B97\u5F9E\u60B0\u616B\u68D5\u6DD9\u742E\u7A2E\u7D42\u7D9C\u7E31\u816B"], + ["f1a1", "\u8E2A\u8E35\u937E\u9418\u4F50\u5750\u5DE6\u5EA7\u632B\u7F6A\u4E3B\u4F4F\u4F8F\u505A\u59DD\u80C4\u546A\u5468\u55FE\u594F\u5B99\u5DDE\u5EDA\u665D\u6731\u67F1\u682A\u6CE8\u6D32\u6E4A\u6F8D\u70B7\u73E0\u7587\u7C4C\u7D02\u7D2C\u7DA2\u821F\u86DB\u8A3B\u8A85\u8D70\u8E8A\u8F33\u9031\u914E\u9152\u9444\u99D0\u7AF9\u7CA5\u4FCA\u5101\u51C6\u57C8\u5BEF\u5CFB\u6659\u6A3D\u6D5A\u6E96\u6FEC\u710C\u756F\u7AE3\u8822\u9021\u9075\u96CB\u99FF\u8301\u4E2D\u4EF2\u8846\u91CD\u537D\u6ADB\u696B\u6C41\u847A\u589E\u618E\u66FE\u62EF\u70DD\u7511\u75C7\u7E52\u84B8\u8B49\u8D08\u4E4B\u53EA"], + ["f2a1", "\u54AB\u5730\u5740\u5FD7\u6301\u6307\u646F\u652F\u65E8\u667A\u679D\u67B3\u6B62\u6C60\u6C9A\u6F2C\u77E5\u7825\u7949\u7957\u7D19\u80A2\u8102\u81F3\u829D\u82B7\u8718\u8A8C\uF9FC\u8D04\u8DBE\u9072\u76F4\u7A19\u7A37\u7E54\u8077\u5507\u55D4\u5875\u632F\u6422\u6649\u664B\u686D\u699B\u6B84\u6D25\u6EB1\u73CD\u7468\u74A1\u755B\u75B9\u76E1\u771E\u778B\u79E6\u7E09\u7E1D\u81FB\u852F\u8897\u8A3A\u8CD1\u8EEB\u8FB0\u9032\u93AD\u9663\u9673\u9707\u4F84\u53F1\u59EA\u5AC9\u5E19\u684E\u74C6\u75BE\u79E9\u7A92\u81A3\u86ED\u8CEA\u8DCC\u8FED\u659F\u6715\uF9FD\u57F7\u6F57\u7DDD\u8F2F"], + ["f3a1", "\u93F6\u96C6\u5FB5\u61F2\u6F84\u4E14\u4F98\u501F\u53C9\u55DF\u5D6F\u5DEE\u6B21\u6B64\u78CB\u7B9A\uF9FE\u8E49\u8ECA\u906E\u6349\u643E\u7740\u7A84\u932F\u947F\u9F6A\u64B0\u6FAF\u71E6\u74A8\u74DA\u7AC4\u7C12\u7E82\u7CB2\u7E98\u8B9A\u8D0A\u947D\u9910\u994C\u5239\u5BDF\u64E6\u672D\u7D2E\u50ED\u53C3\u5879\u6158\u6159\u61FA\u65AC\u7AD9\u8B92\u8B96\u5009\u5021\u5275\u5531\u5A3C\u5EE0\u5F70\u6134\u655E\u660C\u6636\u66A2\u69CD\u6EC4\u6F32\u7316\u7621\u7A93\u8139\u8259\u83D6\u84BC\u50B5\u57F0\u5BC0\u5BE8\u5F69\u63A1\u7826\u7DB5\u83DC\u8521\u91C7\u91F5\u518A\u67F5\u7B56"], + ["f4a1", "\u8CAC\u51C4\u59BB\u60BD\u8655\u501C\uF9FF\u5254\u5C3A\u617D\u621A\u62D3\u64F2\u65A5\u6ECC\u7620\u810A\u8E60\u965F\u96BB\u4EDF\u5343\u5598\u5929\u5DDD\u64C5\u6CC9\u6DFA\u7394\u7A7F\u821B\u85A6\u8CE4\u8E10\u9077\u91E7\u95E1\u9621\u97C6\u51F8\u54F2\u5586\u5FB9\u64A4\u6F88\u7DB4\u8F1F\u8F4D\u9435\u50C9\u5C16\u6CBE\u6DFB\u751B\u77BB\u7C3D\u7C64\u8A79\u8AC2\u581E\u59BE\u5E16\u6377\u7252\u758A\u776B\u8ADC\u8CBC\u8F12\u5EF3\u6674\u6DF8\u807D\u83C1\u8ACB\u9751\u9BD6\uFA00\u5243\u66FF\u6D95\u6EEF\u7DE0\u8AE6\u902E\u905E\u9AD4\u521D\u527F\u54E8\u6194\u6284\u62DB\u68A2"], + ["f5a1", "\u6912\u695A\u6A35\u7092\u7126\u785D\u7901\u790E\u79D2\u7A0D\u8096\u8278\u82D5\u8349\u8549\u8C82\u8D85\u9162\u918B\u91AE\u4FC3\u56D1\u71ED\u77D7\u8700\u89F8\u5BF8\u5FD6\u6751\u90A8\u53E2\u585A\u5BF5\u60A4\u6181\u6460\u7E3D\u8070\u8525\u9283\u64AE\u50AC\u5D14\u6700\u589C\u62BD\u63A8\u690E\u6978\u6A1E\u6E6B\u76BA\u79CB\u82BB\u8429\u8ACF\u8DA8\u8FFD\u9112\u914B\u919C\u9310\u9318\u939A\u96DB\u9A36\u9C0D\u4E11\u755C\u795D\u7AFA\u7B51\u7BC9\u7E2E\u84C4\u8E59\u8E74\u8EF8\u9010\u6625\u693F\u7443\u51FA\u672E\u9EDC\u5145\u5FE0\u6C96\u87F2\u885D\u8877\u60B4\u81B5\u8403"], + ["f6a1", "\u8D05\u53D6\u5439\u5634\u5A36\u5C31\u708A\u7FE0\u805A\u8106\u81ED\u8DA3\u9189\u9A5F\u9DF2\u5074\u4EC4\u53A0\u60FB\u6E2C\u5C64\u4F88\u5024\u55E4\u5CD9\u5E5F\u6065\u6894\u6CBB\u6DC4\u71BE\u75D4\u75F4\u7661\u7A1A\u7A49\u7DC7\u7DFB\u7F6E\u81F4\u86A9\u8F1C\u96C9\u99B3\u9F52\u5247\u52C5\u98ED\u89AA\u4E03\u67D2\u6F06\u4FB5\u5BE2\u6795\u6C88\u6D78\u741B\u7827\u91DD\u937C\u87C4\u79E4\u7A31\u5FEB\u4ED6\u54A4\u553E\u58AE\u59A5\u60F0\u6253\u62D6\u6736\u6955\u8235\u9640\u99B1\u99DD\u502C\u5353\u5544\u577C\uFA01\u6258\uFA02\u64E2\u666B\u67DD\u6FC1\u6FEF\u7422\u7438\u8A17"], + ["f7a1", "\u9438\u5451\u5606\u5766\u5F48\u619A\u6B4E\u7058\u70AD\u7DBB\u8A95\u596A\u812B\u63A2\u7708\u803D\u8CAA\u5854\u642D\u69BB\u5B95\u5E11\u6E6F\uFA03\u8569\u514C\u53F0\u592A\u6020\u614B\u6B86\u6C70\u6CF0\u7B1E\u80CE\u82D4\u8DC6\u90B0\u98B1\uFA04\u64C7\u6FA4\u6491\u6504\u514E\u5410\u571F\u8A0E\u615F\u6876\uFA05\u75DB\u7B52\u7D71\u901A\u5806\u69CC\u817F\u892A\u9000\u9839\u5078\u5957\u59AC\u6295\u900F\u9B2A\u615D\u7279\u95D6\u5761\u5A46\u5DF4\u628A\u64AD\u64FA\u6777\u6CE2\u6D3E\u722C\u7436\u7834\u7F77\u82AD\u8DDB\u9817\u5224\u5742\u677F\u7248\u74E3\u8CA9\u8FA6\u9211"], + ["f8a1", "\u962A\u516B\u53ED\u634C\u4F69\u5504\u6096\u6557\u6C9B\u6D7F\u724C\u72FD\u7A17\u8987\u8C9D\u5F6D\u6F8E\u70F9\u81A8\u610E\u4FBF\u504F\u6241\u7247\u7BC7\u7DE8\u7FE9\u904D\u97AD\u9A19\u8CB6\u576A\u5E73\u67B0\u840D\u8A55\u5420\u5B16\u5E63\u5EE2\u5F0A\u6583\u80BA\u853D\u9589\u965B\u4F48\u5305\u530D\u530F\u5486\u54FA\u5703\u5E03\u6016\u629B\u62B1\u6355\uFA06\u6CE1\u6D66\u75B1\u7832\u80DE\u812F\u82DE\u8461\u84B2\u888D\u8912\u900B\u92EA\u98FD\u9B91\u5E45\u66B4\u66DD\u7011\u7206\uFA07\u4FF5\u527D\u5F6A\u6153\u6753\u6A19\u6F02\u74E2\u7968\u8868\u8C79\u98C7\u98C4\u9A43"], + ["f9a1", "\u54C1\u7A1F\u6953\u8AF7\u8C4A\u98A8\u99AE\u5F7C\u62AB\u75B2\u76AE\u88AB\u907F\u9642\u5339\u5F3C\u5FC5\u6CCC\u73CC\u7562\u758B\u7B46\u82FE\u999D\u4E4F\u903C\u4E0B\u4F55\u53A6\u590F\u5EC8\u6630\u6CB3\u7455\u8377\u8766\u8CC0\u9050\u971E\u9C15\u58D1\u5B78\u8650\u8B14\u9DB4\u5BD2\u6068\u608D\u65F1\u6C57\u6F22\u6FA3\u701A\u7F55\u7FF0\u9591\u9592\u9650\u97D3\u5272\u8F44\u51FD\u542B\u54B8\u5563\u558A\u6ABB\u6DB5\u7DD8\u8266\u929C\u9677\u9E79\u5408\u54C8\u76D2\u86E4\u95A4\u95D4\u965C\u4EA2\u4F09\u59EE\u5AE6\u5DF7\u6052\u6297\u676D\u6841\u6C86\u6E2F\u7F38\u809B\u822A"], + ["faa1", "\uFA08\uFA09\u9805\u4EA5\u5055\u54B3\u5793\u595A\u5B69\u5BB3\u61C8\u6977\u6D77\u7023\u87F9\u89E3\u8A72\u8AE7\u9082\u99ED\u9AB8\u52BE\u6838\u5016\u5E78\u674F\u8347\u884C\u4EAB\u5411\u56AE\u73E6\u9115\u97FF\u9909\u9957\u9999\u5653\u589F\u865B\u8A31\u61B2\u6AF6\u737B\u8ED2\u6B47\u96AA\u9A57\u5955\u7200\u8D6B\u9769\u4FD4\u5CF4\u5F26\u61F8\u665B\u6CEB\u70AB\u7384\u73B9\u73FE\u7729\u774D\u7D43\u7D62\u7E23\u8237\u8852\uFA0A\u8CE2\u9249\u986F\u5B51\u7A74\u8840\u9801\u5ACC\u4FE0\u5354\u593E\u5CFD\u633E\u6D79\u72F9\u8105\u8107\u83A2\u92CF\u9830\u4EA8\u5144\u5211\u578B"], + ["fba1", "\u5F62\u6CC2\u6ECE\u7005\u7050\u70AF\u7192\u73E9\u7469\u834A\u87A2\u8861\u9008\u90A2\u93A3\u99A8\u516E\u5F57\u60E0\u6167\u66B3\u8559\u8E4A\u91AF\u978B\u4E4E\u4E92\u547C\u58D5\u58FA\u597D\u5CB5\u5F27\u6236\u6248\u660A\u6667\u6BEB\u6D69\u6DCF\u6E56\u6EF8\u6F94\u6FE0\u6FE9\u705D\u72D0\u7425\u745A\u74E0\u7693\u795C\u7CCA\u7E1E\u80E1\u82A6\u846B\u84BF\u864E\u865F\u8774\u8B77\u8C6A\u93AC\u9800\u9865\u60D1\u6216\u9177\u5A5A\u660F\u6DF7\u6E3E\u743F\u9B42\u5FFD\u60DA\u7B0F\u54C4\u5F18\u6C5E\u6CD3\u6D2A\u70D8\u7D05\u8679\u8A0C\u9D3B\u5316\u548C\u5B05\u6A3A\u706B\u7575"], + ["fca1", "\u798D\u79BE\u82B1\u83EF\u8A71\u8B41\u8CA8\u9774\uFA0B\u64F4\u652B\u78BA\u78BB\u7A6B\u4E38\u559A\u5950\u5BA6\u5E7B\u60A3\u63DB\u6B61\u6665\u6853\u6E19\u7165\u74B0\u7D08\u9084\u9A69\u9C25\u6D3B\u6ED1\u733E\u8C41\u95CA\u51F0\u5E4C\u5FA8\u604D\u60F6\u6130\u614C\u6643\u6644\u69A5\u6CC1\u6E5F\u6EC9\u6F62\u714C\u749C\u7687\u7BC1\u7C27\u8352\u8757\u9051\u968D\u9EC3\u532F\u56DE\u5EFB\u5F8A\u6062\u6094\u61F7\u6666\u6703\u6A9C\u6DEE\u6FAE\u7070\u736A\u7E6A\u81BE\u8334\u86D4\u8AA8\u8CC4\u5283\u7372\u5B96\u6A6B\u9404\u54EE\u5686\u5B5D\u6548\u6585\u66C9\u689F\u6D8D\u6DC6"], + ["fda1", "\u723B\u80B4\u9175\u9A4D\u4FAF\u5019\u539A\u540E\u543C\u5589\u55C5\u5E3F\u5F8C\u673D\u7166\u73DD\u9005\u52DB\u52F3\u5864\u58CE\u7104\u718F\u71FB\u85B0\u8A13\u6688\u85A8\u55A7\u6684\u714A\u8431\u5349\u5599\u6BC1\u5F59\u5FBD\u63EE\u6689\u7147\u8AF1\u8F1D\u9EBE\u4F11\u643A\u70CB\u7566\u8667\u6064\u8B4E\u9DF8\u5147\u51F6\u5308\u6D36\u80F8\u9ED1\u6615\u6B23\u7098\u75D5\u5403\u5C79\u7D07\u8A16\u6B20\u6B3D\u6B46\u5438\u6070\u6D3D\u7FD5\u8208\u50D6\u51DE\u559C\u566B\u56CD\u59EC\u5B09\u5E0C\u6199\u6198\u6231\u665E\u66E6\u7199\u71B9\u71BA\u72A7\u79A7\u7A00\u7FB2\u8A70"] + ]; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tables/cp950.json +var require_cp950 = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tables/cp950.json"(exports2, module2) { + module2.exports = [ + ["0", "\0", 127], + ["a140", "\u3000\uFF0C\u3001\u3002\uFF0E\u2027\uFF1B\uFF1A\uFF1F\uFF01\uFE30\u2026\u2025\uFE50\uFE51\uFE52\xB7\uFE54\uFE55\uFE56\uFE57\uFF5C\u2013\uFE31\u2014\uFE33\u2574\uFE34\uFE4F\uFF08\uFF09\uFE35\uFE36\uFF5B\uFF5D\uFE37\uFE38\u3014\u3015\uFE39\uFE3A\u3010\u3011\uFE3B\uFE3C\u300A\u300B\uFE3D\uFE3E\u3008\u3009\uFE3F\uFE40\u300C\u300D\uFE41\uFE42\u300E\u300F\uFE43\uFE44\uFE59\uFE5A"], + ["a1a1", "\uFE5B\uFE5C\uFE5D\uFE5E\u2018\u2019\u201C\u201D\u301D\u301E\u2035\u2032\uFF03\uFF06\uFF0A\u203B\xA7\u3003\u25CB\u25CF\u25B3\u25B2\u25CE\u2606\u2605\u25C7\u25C6\u25A1\u25A0\u25BD\u25BC\u32A3\u2105\xAF\uFFE3\uFF3F\u02CD\uFE49\uFE4A\uFE4D\uFE4E\uFE4B\uFE4C\uFE5F\uFE60\uFE61\uFF0B\uFF0D\xD7\xF7\xB1\u221A\uFF1C\uFF1E\uFF1D\u2266\u2267\u2260\u221E\u2252\u2261\uFE62", 4, "\uFF5E\u2229\u222A\u22A5\u2220\u221F\u22BF\u33D2\u33D1\u222B\u222E\u2235\u2234\u2640\u2642\u2295\u2299\u2191\u2193\u2190\u2192\u2196\u2197\u2199\u2198\u2225\u2223\uFF0F"], + ["a240", "\uFF3C\u2215\uFE68\uFF04\uFFE5\u3012\uFFE0\uFFE1\uFF05\uFF20\u2103\u2109\uFE69\uFE6A\uFE6B\u33D5\u339C\u339D\u339E\u33CE\u33A1\u338E\u338F\u33C4\xB0\u5159\u515B\u515E\u515D\u5161\u5163\u55E7\u74E9\u7CCE\u2581", 7, "\u258F\u258E\u258D\u258C\u258B\u258A\u2589\u253C\u2534\u252C\u2524\u251C\u2594\u2500\u2502\u2595\u250C\u2510\u2514\u2518\u256D"], + ["a2a1", "\u256E\u2570\u256F\u2550\u255E\u256A\u2561\u25E2\u25E3\u25E5\u25E4\u2571\u2572\u2573\uFF10", 9, "\u2160", 9, "\u3021", 8, "\u5341\u5344\u5345\uFF21", 25, "\uFF41", 21], + ["a340", "\uFF57\uFF58\uFF59\uFF5A\u0391", 16, "\u03A3", 6, "\u03B1", 16, "\u03C3", 6, "\u3105", 10], + ["a3a1", "\u3110", 25, "\u02D9\u02C9\u02CA\u02C7\u02CB"], + ["a3e1", "\u20AC"], + ["a440", "\u4E00\u4E59\u4E01\u4E03\u4E43\u4E5D\u4E86\u4E8C\u4EBA\u513F\u5165\u516B\u51E0\u5200\u5201\u529B\u5315\u5341\u535C\u53C8\u4E09\u4E0B\u4E08\u4E0A\u4E2B\u4E38\u51E1\u4E45\u4E48\u4E5F\u4E5E\u4E8E\u4EA1\u5140\u5203\u52FA\u5343\u53C9\u53E3\u571F\u58EB\u5915\u5927\u5973\u5B50\u5B51\u5B53\u5BF8\u5C0F\u5C22\u5C38\u5C71\u5DDD\u5DE5\u5DF1\u5DF2\u5DF3\u5DFE\u5E72\u5EFE\u5F0B\u5F13\u624D"], + ["a4a1", "\u4E11\u4E10\u4E0D\u4E2D\u4E30\u4E39\u4E4B\u5C39\u4E88\u4E91\u4E95\u4E92\u4E94\u4EA2\u4EC1\u4EC0\u4EC3\u4EC6\u4EC7\u4ECD\u4ECA\u4ECB\u4EC4\u5143\u5141\u5167\u516D\u516E\u516C\u5197\u51F6\u5206\u5207\u5208\u52FB\u52FE\u52FF\u5316\u5339\u5348\u5347\u5345\u535E\u5384\u53CB\u53CA\u53CD\u58EC\u5929\u592B\u592A\u592D\u5B54\u5C11\u5C24\u5C3A\u5C6F\u5DF4\u5E7B\u5EFF\u5F14\u5F15\u5FC3\u6208\u6236\u624B\u624E\u652F\u6587\u6597\u65A4\u65B9\u65E5\u66F0\u6708\u6728\u6B20\u6B62\u6B79\u6BCB\u6BD4\u6BDB\u6C0F\u6C34\u706B\u722A\u7236\u723B\u7247\u7259\u725B\u72AC\u738B\u4E19"], + ["a540", "\u4E16\u4E15\u4E14\u4E18\u4E3B\u4E4D\u4E4F\u4E4E\u4EE5\u4ED8\u4ED4\u4ED5\u4ED6\u4ED7\u4EE3\u4EE4\u4ED9\u4EDE\u5145\u5144\u5189\u518A\u51AC\u51F9\u51FA\u51F8\u520A\u52A0\u529F\u5305\u5306\u5317\u531D\u4EDF\u534A\u5349\u5361\u5360\u536F\u536E\u53BB\u53EF\u53E4\u53F3\u53EC\u53EE\u53E9\u53E8\u53FC\u53F8\u53F5\u53EB\u53E6\u53EA\u53F2\u53F1\u53F0\u53E5\u53ED\u53FB\u56DB\u56DA\u5916"], + ["a5a1", "\u592E\u5931\u5974\u5976\u5B55\u5B83\u5C3C\u5DE8\u5DE7\u5DE6\u5E02\u5E03\u5E73\u5E7C\u5F01\u5F18\u5F17\u5FC5\u620A\u6253\u6254\u6252\u6251\u65A5\u65E6\u672E\u672C\u672A\u672B\u672D\u6B63\u6BCD\u6C11\u6C10\u6C38\u6C41\u6C40\u6C3E\u72AF\u7384\u7389\u74DC\u74E6\u7518\u751F\u7528\u7529\u7530\u7531\u7532\u7533\u758B\u767D\u76AE\u76BF\u76EE\u77DB\u77E2\u77F3\u793A\u79BE\u7A74\u7ACB\u4E1E\u4E1F\u4E52\u4E53\u4E69\u4E99\u4EA4\u4EA6\u4EA5\u4EFF\u4F09\u4F19\u4F0A\u4F15\u4F0D\u4F10\u4F11\u4F0F\u4EF2\u4EF6\u4EFB\u4EF0\u4EF3\u4EFD\u4F01\u4F0B\u5149\u5147\u5146\u5148\u5168"], + ["a640", "\u5171\u518D\u51B0\u5217\u5211\u5212\u520E\u5216\u52A3\u5308\u5321\u5320\u5370\u5371\u5409\u540F\u540C\u540A\u5410\u5401\u540B\u5404\u5411\u540D\u5408\u5403\u540E\u5406\u5412\u56E0\u56DE\u56DD\u5733\u5730\u5728\u572D\u572C\u572F\u5729\u5919\u591A\u5937\u5938\u5984\u5978\u5983\u597D\u5979\u5982\u5981\u5B57\u5B58\u5B87\u5B88\u5B85\u5B89\u5BFA\u5C16\u5C79\u5DDE\u5E06\u5E76\u5E74"], + ["a6a1", "\u5F0F\u5F1B\u5FD9\u5FD6\u620E\u620C\u620D\u6210\u6263\u625B\u6258\u6536\u65E9\u65E8\u65EC\u65ED\u66F2\u66F3\u6709\u673D\u6734\u6731\u6735\u6B21\u6B64\u6B7B\u6C16\u6C5D\u6C57\u6C59\u6C5F\u6C60\u6C50\u6C55\u6C61\u6C5B\u6C4D\u6C4E\u7070\u725F\u725D\u767E\u7AF9\u7C73\u7CF8\u7F36\u7F8A\u7FBD\u8001\u8003\u800C\u8012\u8033\u807F\u8089\u808B\u808C\u81E3\u81EA\u81F3\u81FC\u820C\u821B\u821F\u826E\u8272\u827E\u866B\u8840\u884C\u8863\u897F\u9621\u4E32\u4EA8\u4F4D\u4F4F\u4F47\u4F57\u4F5E\u4F34\u4F5B\u4F55\u4F30\u4F50\u4F51\u4F3D\u4F3A\u4F38\u4F43\u4F54\u4F3C\u4F46\u4F63"], + ["a740", "\u4F5C\u4F60\u4F2F\u4F4E\u4F36\u4F59\u4F5D\u4F48\u4F5A\u514C\u514B\u514D\u5175\u51B6\u51B7\u5225\u5224\u5229\u522A\u5228\u52AB\u52A9\u52AA\u52AC\u5323\u5373\u5375\u541D\u542D\u541E\u543E\u5426\u544E\u5427\u5446\u5443\u5433\u5448\u5442\u541B\u5429\u544A\u5439\u543B\u5438\u542E\u5435\u5436\u5420\u543C\u5440\u5431\u542B\u541F\u542C\u56EA\u56F0\u56E4\u56EB\u574A\u5751\u5740\u574D"], + ["a7a1", "\u5747\u574E\u573E\u5750\u574F\u573B\u58EF\u593E\u599D\u5992\u59A8\u599E\u59A3\u5999\u5996\u598D\u59A4\u5993\u598A\u59A5\u5B5D\u5B5C\u5B5A\u5B5B\u5B8C\u5B8B\u5B8F\u5C2C\u5C40\u5C41\u5C3F\u5C3E\u5C90\u5C91\u5C94\u5C8C\u5DEB\u5E0C\u5E8F\u5E87\u5E8A\u5EF7\u5F04\u5F1F\u5F64\u5F62\u5F77\u5F79\u5FD8\u5FCC\u5FD7\u5FCD\u5FF1\u5FEB\u5FF8\u5FEA\u6212\u6211\u6284\u6297\u6296\u6280\u6276\u6289\u626D\u628A\u627C\u627E\u6279\u6273\u6292\u626F\u6298\u626E\u6295\u6293\u6291\u6286\u6539\u653B\u6538\u65F1\u66F4\u675F\u674E\u674F\u6750\u6751\u675C\u6756\u675E\u6749\u6746\u6760"], + ["a840", "\u6753\u6757\u6B65\u6BCF\u6C42\u6C5E\u6C99\u6C81\u6C88\u6C89\u6C85\u6C9B\u6C6A\u6C7A\u6C90\u6C70\u6C8C\u6C68\u6C96\u6C92\u6C7D\u6C83\u6C72\u6C7E\u6C74\u6C86\u6C76\u6C8D\u6C94\u6C98\u6C82\u7076\u707C\u707D\u7078\u7262\u7261\u7260\u72C4\u72C2\u7396\u752C\u752B\u7537\u7538\u7682\u76EF\u77E3\u79C1\u79C0\u79BF\u7A76\u7CFB\u7F55\u8096\u8093\u809D\u8098\u809B\u809A\u80B2\u826F\u8292"], + ["a8a1", "\u828B\u828D\u898B\u89D2\u8A00\u8C37\u8C46\u8C55\u8C9D\u8D64\u8D70\u8DB3\u8EAB\u8ECA\u8F9B\u8FB0\u8FC2\u8FC6\u8FC5\u8FC4\u5DE1\u9091\u90A2\u90AA\u90A6\u90A3\u9149\u91C6\u91CC\u9632\u962E\u9631\u962A\u962C\u4E26\u4E56\u4E73\u4E8B\u4E9B\u4E9E\u4EAB\u4EAC\u4F6F\u4F9D\u4F8D\u4F73\u4F7F\u4F6C\u4F9B\u4F8B\u4F86\u4F83\u4F70\u4F75\u4F88\u4F69\u4F7B\u4F96\u4F7E\u4F8F\u4F91\u4F7A\u5154\u5152\u5155\u5169\u5177\u5176\u5178\u51BD\u51FD\u523B\u5238\u5237\u523A\u5230\u522E\u5236\u5241\u52BE\u52BB\u5352\u5354\u5353\u5351\u5366\u5377\u5378\u5379\u53D6\u53D4\u53D7\u5473\u5475"], + ["a940", "\u5496\u5478\u5495\u5480\u547B\u5477\u5484\u5492\u5486\u547C\u5490\u5471\u5476\u548C\u549A\u5462\u5468\u548B\u547D\u548E\u56FA\u5783\u5777\u576A\u5769\u5761\u5766\u5764\u577C\u591C\u5949\u5947\u5948\u5944\u5954\u59BE\u59BB\u59D4\u59B9\u59AE\u59D1\u59C6\u59D0\u59CD\u59CB\u59D3\u59CA\u59AF\u59B3\u59D2\u59C5\u5B5F\u5B64\u5B63\u5B97\u5B9A\u5B98\u5B9C\u5B99\u5B9B\u5C1A\u5C48\u5C45"], + ["a9a1", "\u5C46\u5CB7\u5CA1\u5CB8\u5CA9\u5CAB\u5CB1\u5CB3\u5E18\u5E1A\u5E16\u5E15\u5E1B\u5E11\u5E78\u5E9A\u5E97\u5E9C\u5E95\u5E96\u5EF6\u5F26\u5F27\u5F29\u5F80\u5F81\u5F7F\u5F7C\u5FDD\u5FE0\u5FFD\u5FF5\u5FFF\u600F\u6014\u602F\u6035\u6016\u602A\u6015\u6021\u6027\u6029\u602B\u601B\u6216\u6215\u623F\u623E\u6240\u627F\u62C9\u62CC\u62C4\u62BF\u62C2\u62B9\u62D2\u62DB\u62AB\u62D3\u62D4\u62CB\u62C8\u62A8\u62BD\u62BC\u62D0\u62D9\u62C7\u62CD\u62B5\u62DA\u62B1\u62D8\u62D6\u62D7\u62C6\u62AC\u62CE\u653E\u65A7\u65BC\u65FA\u6614\u6613\u660C\u6606\u6602\u660E\u6600\u660F\u6615\u660A"], + ["aa40", "\u6607\u670D\u670B\u676D\u678B\u6795\u6771\u679C\u6773\u6777\u6787\u679D\u6797\u676F\u6770\u677F\u6789\u677E\u6790\u6775\u679A\u6793\u677C\u676A\u6772\u6B23\u6B66\u6B67\u6B7F\u6C13\u6C1B\u6CE3\u6CE8\u6CF3\u6CB1\u6CCC\u6CE5\u6CB3\u6CBD\u6CBE\u6CBC\u6CE2\u6CAB\u6CD5\u6CD3\u6CB8\u6CC4\u6CB9\u6CC1\u6CAE\u6CD7\u6CC5\u6CF1\u6CBF\u6CBB\u6CE1\u6CDB\u6CCA\u6CAC\u6CEF\u6CDC\u6CD6\u6CE0"], + ["aaa1", "\u7095\u708E\u7092\u708A\u7099\u722C\u722D\u7238\u7248\u7267\u7269\u72C0\u72CE\u72D9\u72D7\u72D0\u73A9\u73A8\u739F\u73AB\u73A5\u753D\u759D\u7599\u759A\u7684\u76C2\u76F2\u76F4\u77E5\u77FD\u793E\u7940\u7941\u79C9\u79C8\u7A7A\u7A79\u7AFA\u7CFE\u7F54\u7F8C\u7F8B\u8005\u80BA\u80A5\u80A2\u80B1\u80A1\u80AB\u80A9\u80B4\u80AA\u80AF\u81E5\u81FE\u820D\u82B3\u829D\u8299\u82AD\u82BD\u829F\u82B9\u82B1\u82AC\u82A5\u82AF\u82B8\u82A3\u82B0\u82BE\u82B7\u864E\u8671\u521D\u8868\u8ECB\u8FCE\u8FD4\u8FD1\u90B5\u90B8\u90B1\u90B6\u91C7\u91D1\u9577\u9580\u961C\u9640\u963F\u963B\u9644"], + ["ab40", "\u9642\u96B9\u96E8\u9752\u975E\u4E9F\u4EAD\u4EAE\u4FE1\u4FB5\u4FAF\u4FBF\u4FE0\u4FD1\u4FCF\u4FDD\u4FC3\u4FB6\u4FD8\u4FDF\u4FCA\u4FD7\u4FAE\u4FD0\u4FC4\u4FC2\u4FDA\u4FCE\u4FDE\u4FB7\u5157\u5192\u5191\u51A0\u524E\u5243\u524A\u524D\u524C\u524B\u5247\u52C7\u52C9\u52C3\u52C1\u530D\u5357\u537B\u539A\u53DB\u54AC\u54C0\u54A8\u54CE\u54C9\u54B8\u54A6\u54B3\u54C7\u54C2\u54BD\u54AA\u54C1"], + ["aba1", "\u54C4\u54C8\u54AF\u54AB\u54B1\u54BB\u54A9\u54A7\u54BF\u56FF\u5782\u578B\u57A0\u57A3\u57A2\u57CE\u57AE\u5793\u5955\u5951\u594F\u594E\u5950\u59DC\u59D8\u59FF\u59E3\u59E8\u5A03\u59E5\u59EA\u59DA\u59E6\u5A01\u59FB\u5B69\u5BA3\u5BA6\u5BA4\u5BA2\u5BA5\u5C01\u5C4E\u5C4F\u5C4D\u5C4B\u5CD9\u5CD2\u5DF7\u5E1D\u5E25\u5E1F\u5E7D\u5EA0\u5EA6\u5EFA\u5F08\u5F2D\u5F65\u5F88\u5F85\u5F8A\u5F8B\u5F87\u5F8C\u5F89\u6012\u601D\u6020\u6025\u600E\u6028\u604D\u6070\u6068\u6062\u6046\u6043\u606C\u606B\u606A\u6064\u6241\u62DC\u6316\u6309\u62FC\u62ED\u6301\u62EE\u62FD\u6307\u62F1\u62F7"], + ["ac40", "\u62EF\u62EC\u62FE\u62F4\u6311\u6302\u653F\u6545\u65AB\u65BD\u65E2\u6625\u662D\u6620\u6627\u662F\u661F\u6628\u6631\u6624\u66F7\u67FF\u67D3\u67F1\u67D4\u67D0\u67EC\u67B6\u67AF\u67F5\u67E9\u67EF\u67C4\u67D1\u67B4\u67DA\u67E5\u67B8\u67CF\u67DE\u67F3\u67B0\u67D9\u67E2\u67DD\u67D2\u6B6A\u6B83\u6B86\u6BB5\u6BD2\u6BD7\u6C1F\u6CC9\u6D0B\u6D32\u6D2A\u6D41\u6D25\u6D0C\u6D31\u6D1E\u6D17"], + ["aca1", "\u6D3B\u6D3D\u6D3E\u6D36\u6D1B\u6CF5\u6D39\u6D27\u6D38\u6D29\u6D2E\u6D35\u6D0E\u6D2B\u70AB\u70BA\u70B3\u70AC\u70AF\u70AD\u70B8\u70AE\u70A4\u7230\u7272\u726F\u7274\u72E9\u72E0\u72E1\u73B7\u73CA\u73BB\u73B2\u73CD\u73C0\u73B3\u751A\u752D\u754F\u754C\u754E\u754B\u75AB\u75A4\u75A5\u75A2\u75A3\u7678\u7686\u7687\u7688\u76C8\u76C6\u76C3\u76C5\u7701\u76F9\u76F8\u7709\u770B\u76FE\u76FC\u7707\u77DC\u7802\u7814\u780C\u780D\u7946\u7949\u7948\u7947\u79B9\u79BA\u79D1\u79D2\u79CB\u7A7F\u7A81\u7AFF\u7AFD\u7C7D\u7D02\u7D05\u7D00\u7D09\u7D07\u7D04\u7D06\u7F38\u7F8E\u7FBF\u8004"], + ["ad40", "\u8010\u800D\u8011\u8036\u80D6\u80E5\u80DA\u80C3\u80C4\u80CC\u80E1\u80DB\u80CE\u80DE\u80E4\u80DD\u81F4\u8222\u82E7\u8303\u8305\u82E3\u82DB\u82E6\u8304\u82E5\u8302\u8309\u82D2\u82D7\u82F1\u8301\u82DC\u82D4\u82D1\u82DE\u82D3\u82DF\u82EF\u8306\u8650\u8679\u867B\u867A\u884D\u886B\u8981\u89D4\u8A08\u8A02\u8A03\u8C9E\u8CA0\u8D74\u8D73\u8DB4\u8ECD\u8ECC\u8FF0\u8FE6\u8FE2\u8FEA\u8FE5"], + ["ada1", "\u8FED\u8FEB\u8FE4\u8FE8\u90CA\u90CE\u90C1\u90C3\u914B\u914A\u91CD\u9582\u9650\u964B\u964C\u964D\u9762\u9769\u97CB\u97ED\u97F3\u9801\u98A8\u98DB\u98DF\u9996\u9999\u4E58\u4EB3\u500C\u500D\u5023\u4FEF\u5026\u5025\u4FF8\u5029\u5016\u5006\u503C\u501F\u501A\u5012\u5011\u4FFA\u5000\u5014\u5028\u4FF1\u5021\u500B\u5019\u5018\u4FF3\u4FEE\u502D\u502A\u4FFE\u502B\u5009\u517C\u51A4\u51A5\u51A2\u51CD\u51CC\u51C6\u51CB\u5256\u525C\u5254\u525B\u525D\u532A\u537F\u539F\u539D\u53DF\u54E8\u5510\u5501\u5537\u54FC\u54E5\u54F2\u5506\u54FA\u5514\u54E9\u54ED\u54E1\u5509\u54EE\u54EA"], + ["ae40", "\u54E6\u5527\u5507\u54FD\u550F\u5703\u5704\u57C2\u57D4\u57CB\u57C3\u5809\u590F\u5957\u5958\u595A\u5A11\u5A18\u5A1C\u5A1F\u5A1B\u5A13\u59EC\u5A20\u5A23\u5A29\u5A25\u5A0C\u5A09\u5B6B\u5C58\u5BB0\u5BB3\u5BB6\u5BB4\u5BAE\u5BB5\u5BB9\u5BB8\u5C04\u5C51\u5C55\u5C50\u5CED\u5CFD\u5CFB\u5CEA\u5CE8\u5CF0\u5CF6\u5D01\u5CF4\u5DEE\u5E2D\u5E2B\u5EAB\u5EAD\u5EA7\u5F31\u5F92\u5F91\u5F90\u6059"], + ["aea1", "\u6063\u6065\u6050\u6055\u606D\u6069\u606F\u6084\u609F\u609A\u608D\u6094\u608C\u6085\u6096\u6247\u62F3\u6308\u62FF\u634E\u633E\u632F\u6355\u6342\u6346\u634F\u6349\u633A\u6350\u633D\u632A\u632B\u6328\u634D\u634C\u6548\u6549\u6599\u65C1\u65C5\u6642\u6649\u664F\u6643\u6652\u664C\u6645\u6641\u66F8\u6714\u6715\u6717\u6821\u6838\u6848\u6846\u6853\u6839\u6842\u6854\u6829\u68B3\u6817\u684C\u6851\u683D\u67F4\u6850\u6840\u683C\u6843\u682A\u6845\u6813\u6818\u6841\u6B8A\u6B89\u6BB7\u6C23\u6C27\u6C28\u6C26\u6C24\u6CF0\u6D6A\u6D95\u6D88\u6D87\u6D66\u6D78\u6D77\u6D59\u6D93"], + ["af40", "\u6D6C\u6D89\u6D6E\u6D5A\u6D74\u6D69\u6D8C\u6D8A\u6D79\u6D85\u6D65\u6D94\u70CA\u70D8\u70E4\u70D9\u70C8\u70CF\u7239\u7279\u72FC\u72F9\u72FD\u72F8\u72F7\u7386\u73ED\u7409\u73EE\u73E0\u73EA\u73DE\u7554\u755D\u755C\u755A\u7559\u75BE\u75C5\u75C7\u75B2\u75B3\u75BD\u75BC\u75B9\u75C2\u75B8\u768B\u76B0\u76CA\u76CD\u76CE\u7729\u771F\u7720\u7728\u77E9\u7830\u7827\u7838\u781D\u7834\u7837"], + ["afa1", "\u7825\u782D\u7820\u781F\u7832\u7955\u7950\u7960\u795F\u7956\u795E\u795D\u7957\u795A\u79E4\u79E3\u79E7\u79DF\u79E6\u79E9\u79D8\u7A84\u7A88\u7AD9\u7B06\u7B11\u7C89\u7D21\u7D17\u7D0B\u7D0A\u7D20\u7D22\u7D14\u7D10\u7D15\u7D1A\u7D1C\u7D0D\u7D19\u7D1B\u7F3A\u7F5F\u7F94\u7FC5\u7FC1\u8006\u8018\u8015\u8019\u8017\u803D\u803F\u80F1\u8102\u80F0\u8105\u80ED\u80F4\u8106\u80F8\u80F3\u8108\u80FD\u810A\u80FC\u80EF\u81ED\u81EC\u8200\u8210\u822A\u822B\u8228\u822C\u82BB\u832B\u8352\u8354\u834A\u8338\u8350\u8349\u8335\u8334\u834F\u8332\u8339\u8336\u8317\u8340\u8331\u8328\u8343"], + ["b040", "\u8654\u868A\u86AA\u8693\u86A4\u86A9\u868C\u86A3\u869C\u8870\u8877\u8881\u8882\u887D\u8879\u8A18\u8A10\u8A0E\u8A0C\u8A15\u8A0A\u8A17\u8A13\u8A16\u8A0F\u8A11\u8C48\u8C7A\u8C79\u8CA1\u8CA2\u8D77\u8EAC\u8ED2\u8ED4\u8ECF\u8FB1\u9001\u9006\u8FF7\u9000\u8FFA\u8FF4\u9003\u8FFD\u9005\u8FF8\u9095\u90E1\u90DD\u90E2\u9152\u914D\u914C\u91D8\u91DD\u91D7\u91DC\u91D9\u9583\u9662\u9663\u9661"], + ["b0a1", "\u965B\u965D\u9664\u9658\u965E\u96BB\u98E2\u99AC\u9AA8\u9AD8\u9B25\u9B32\u9B3C\u4E7E\u507A\u507D\u505C\u5047\u5043\u504C\u505A\u5049\u5065\u5076\u504E\u5055\u5075\u5074\u5077\u504F\u500F\u506F\u506D\u515C\u5195\u51F0\u526A\u526F\u52D2\u52D9\u52D8\u52D5\u5310\u530F\u5319\u533F\u5340\u533E\u53C3\u66FC\u5546\u556A\u5566\u5544\u555E\u5561\u5543\u554A\u5531\u5556\u554F\u5555\u552F\u5564\u5538\u552E\u555C\u552C\u5563\u5533\u5541\u5557\u5708\u570B\u5709\u57DF\u5805\u580A\u5806\u57E0\u57E4\u57FA\u5802\u5835\u57F7\u57F9\u5920\u5962\u5A36\u5A41\u5A49\u5A66\u5A6A\u5A40"], + ["b140", "\u5A3C\u5A62\u5A5A\u5A46\u5A4A\u5B70\u5BC7\u5BC5\u5BC4\u5BC2\u5BBF\u5BC6\u5C09\u5C08\u5C07\u5C60\u5C5C\u5C5D\u5D07\u5D06\u5D0E\u5D1B\u5D16\u5D22\u5D11\u5D29\u5D14\u5D19\u5D24\u5D27\u5D17\u5DE2\u5E38\u5E36\u5E33\u5E37\u5EB7\u5EB8\u5EB6\u5EB5\u5EBE\u5F35\u5F37\u5F57\u5F6C\u5F69\u5F6B\u5F97\u5F99\u5F9E\u5F98\u5FA1\u5FA0\u5F9C\u607F\u60A3\u6089\u60A0\u60A8\u60CB\u60B4\u60E6\u60BD"], + ["b1a1", "\u60C5\u60BB\u60B5\u60DC\u60BC\u60D8\u60D5\u60C6\u60DF\u60B8\u60DA\u60C7\u621A\u621B\u6248\u63A0\u63A7\u6372\u6396\u63A2\u63A5\u6377\u6367\u6398\u63AA\u6371\u63A9\u6389\u6383\u639B\u636B\u63A8\u6384\u6388\u6399\u63A1\u63AC\u6392\u638F\u6380\u637B\u6369\u6368\u637A\u655D\u6556\u6551\u6559\u6557\u555F\u654F\u6558\u6555\u6554\u659C\u659B\u65AC\u65CF\u65CB\u65CC\u65CE\u665D\u665A\u6664\u6668\u6666\u665E\u66F9\u52D7\u671B\u6881\u68AF\u68A2\u6893\u68B5\u687F\u6876\u68B1\u68A7\u6897\u68B0\u6883\u68C4\u68AD\u6886\u6885\u6894\u689D\u68A8\u689F\u68A1\u6882\u6B32\u6BBA"], + ["b240", "\u6BEB\u6BEC\u6C2B\u6D8E\u6DBC\u6DF3\u6DD9\u6DB2\u6DE1\u6DCC\u6DE4\u6DFB\u6DFA\u6E05\u6DC7\u6DCB\u6DAF\u6DD1\u6DAE\u6DDE\u6DF9\u6DB8\u6DF7\u6DF5\u6DC5\u6DD2\u6E1A\u6DB5\u6DDA\u6DEB\u6DD8\u6DEA\u6DF1\u6DEE\u6DE8\u6DC6\u6DC4\u6DAA\u6DEC\u6DBF\u6DE6\u70F9\u7109\u710A\u70FD\u70EF\u723D\u727D\u7281\u731C\u731B\u7316\u7313\u7319\u7387\u7405\u740A\u7403\u7406\u73FE\u740D\u74E0\u74F6"], + ["b2a1", "\u74F7\u751C\u7522\u7565\u7566\u7562\u7570\u758F\u75D4\u75D5\u75B5\u75CA\u75CD\u768E\u76D4\u76D2\u76DB\u7737\u773E\u773C\u7736\u7738\u773A\u786B\u7843\u784E\u7965\u7968\u796D\u79FB\u7A92\u7A95\u7B20\u7B28\u7B1B\u7B2C\u7B26\u7B19\u7B1E\u7B2E\u7C92\u7C97\u7C95\u7D46\u7D43\u7D71\u7D2E\u7D39\u7D3C\u7D40\u7D30\u7D33\u7D44\u7D2F\u7D42\u7D32\u7D31\u7F3D\u7F9E\u7F9A\u7FCC\u7FCE\u7FD2\u801C\u804A\u8046\u812F\u8116\u8123\u812B\u8129\u8130\u8124\u8202\u8235\u8237\u8236\u8239\u838E\u839E\u8398\u8378\u83A2\u8396\u83BD\u83AB\u8392\u838A\u8393\u8389\u83A0\u8377\u837B\u837C"], + ["b340", "\u8386\u83A7\u8655\u5F6A\u86C7\u86C0\u86B6\u86C4\u86B5\u86C6\u86CB\u86B1\u86AF\u86C9\u8853\u889E\u8888\u88AB\u8892\u8896\u888D\u888B\u8993\u898F\u8A2A\u8A1D\u8A23\u8A25\u8A31\u8A2D\u8A1F\u8A1B\u8A22\u8C49\u8C5A\u8CA9\u8CAC\u8CAB\u8CA8\u8CAA\u8CA7\u8D67\u8D66\u8DBE\u8DBA\u8EDB\u8EDF\u9019\u900D\u901A\u9017\u9023\u901F\u901D\u9010\u9015\u901E\u9020\u900F\u9022\u9016\u901B\u9014"], + ["b3a1", "\u90E8\u90ED\u90FD\u9157\u91CE\u91F5\u91E6\u91E3\u91E7\u91ED\u91E9\u9589\u966A\u9675\u9673\u9678\u9670\u9674\u9676\u9677\u966C\u96C0\u96EA\u96E9\u7AE0\u7ADF\u9802\u9803\u9B5A\u9CE5\u9E75\u9E7F\u9EA5\u9EBB\u50A2\u508D\u5085\u5099\u5091\u5080\u5096\u5098\u509A\u6700\u51F1\u5272\u5274\u5275\u5269\u52DE\u52DD\u52DB\u535A\u53A5\u557B\u5580\u55A7\u557C\u558A\u559D\u5598\u5582\u559C\u55AA\u5594\u5587\u558B\u5583\u55B3\u55AE\u559F\u553E\u55B2\u559A\u55BB\u55AC\u55B1\u557E\u5589\u55AB\u5599\u570D\u582F\u582A\u5834\u5824\u5830\u5831\u5821\u581D\u5820\u58F9\u58FA\u5960"], + ["b440", "\u5A77\u5A9A\u5A7F\u5A92\u5A9B\u5AA7\u5B73\u5B71\u5BD2\u5BCC\u5BD3\u5BD0\u5C0A\u5C0B\u5C31\u5D4C\u5D50\u5D34\u5D47\u5DFD\u5E45\u5E3D\u5E40\u5E43\u5E7E\u5ECA\u5EC1\u5EC2\u5EC4\u5F3C\u5F6D\u5FA9\u5FAA\u5FA8\u60D1\u60E1\u60B2\u60B6\u60E0\u611C\u6123\u60FA\u6115\u60F0\u60FB\u60F4\u6168\u60F1\u610E\u60F6\u6109\u6100\u6112\u621F\u6249\u63A3\u638C\u63CF\u63C0\u63E9\u63C9\u63C6\u63CD"], + ["b4a1", "\u63D2\u63E3\u63D0\u63E1\u63D6\u63ED\u63EE\u6376\u63F4\u63EA\u63DB\u6452\u63DA\u63F9\u655E\u6566\u6562\u6563\u6591\u6590\u65AF\u666E\u6670\u6674\u6676\u666F\u6691\u667A\u667E\u6677\u66FE\u66FF\u671F\u671D\u68FA\u68D5\u68E0\u68D8\u68D7\u6905\u68DF\u68F5\u68EE\u68E7\u68F9\u68D2\u68F2\u68E3\u68CB\u68CD\u690D\u6912\u690E\u68C9\u68DA\u696E\u68FB\u6B3E\u6B3A\u6B3D\u6B98\u6B96\u6BBC\u6BEF\u6C2E\u6C2F\u6C2C\u6E2F\u6E38\u6E54\u6E21\u6E32\u6E67\u6E4A\u6E20\u6E25\u6E23\u6E1B\u6E5B\u6E58\u6E24\u6E56\u6E6E\u6E2D\u6E26\u6E6F\u6E34\u6E4D\u6E3A\u6E2C\u6E43\u6E1D\u6E3E\u6ECB"], + ["b540", "\u6E89\u6E19\u6E4E\u6E63\u6E44\u6E72\u6E69\u6E5F\u7119\u711A\u7126\u7130\u7121\u7136\u716E\u711C\u724C\u7284\u7280\u7336\u7325\u7334\u7329\u743A\u742A\u7433\u7422\u7425\u7435\u7436\u7434\u742F\u741B\u7426\u7428\u7525\u7526\u756B\u756A\u75E2\u75DB\u75E3\u75D9\u75D8\u75DE\u75E0\u767B\u767C\u7696\u7693\u76B4\u76DC\u774F\u77ED\u785D\u786C\u786F\u7A0D\u7A08\u7A0B\u7A05\u7A00\u7A98"], + ["b5a1", "\u7A97\u7A96\u7AE5\u7AE3\u7B49\u7B56\u7B46\u7B50\u7B52\u7B54\u7B4D\u7B4B\u7B4F\u7B51\u7C9F\u7CA5\u7D5E\u7D50\u7D68\u7D55\u7D2B\u7D6E\u7D72\u7D61\u7D66\u7D62\u7D70\u7D73\u5584\u7FD4\u7FD5\u800B\u8052\u8085\u8155\u8154\u814B\u8151\u814E\u8139\u8146\u813E\u814C\u8153\u8174\u8212\u821C\u83E9\u8403\u83F8\u840D\u83E0\u83C5\u840B\u83C1\u83EF\u83F1\u83F4\u8457\u840A\u83F0\u840C\u83CC\u83FD\u83F2\u83CA\u8438\u840E\u8404\u83DC\u8407\u83D4\u83DF\u865B\u86DF\u86D9\u86ED\u86D4\u86DB\u86E4\u86D0\u86DE\u8857\u88C1\u88C2\u88B1\u8983\u8996\u8A3B\u8A60\u8A55\u8A5E\u8A3C\u8A41"], + ["b640", "\u8A54\u8A5B\u8A50\u8A46\u8A34\u8A3A\u8A36\u8A56\u8C61\u8C82\u8CAF\u8CBC\u8CB3\u8CBD\u8CC1\u8CBB\u8CC0\u8CB4\u8CB7\u8CB6\u8CBF\u8CB8\u8D8A\u8D85\u8D81\u8DCE\u8DDD\u8DCB\u8DDA\u8DD1\u8DCC\u8DDB\u8DC6\u8EFB\u8EF8\u8EFC\u8F9C\u902E\u9035\u9031\u9038\u9032\u9036\u9102\u90F5\u9109\u90FE\u9163\u9165\u91CF\u9214\u9215\u9223\u9209\u921E\u920D\u9210\u9207\u9211\u9594\u958F\u958B\u9591"], + ["b6a1", "\u9593\u9592\u958E\u968A\u968E\u968B\u967D\u9685\u9686\u968D\u9672\u9684\u96C1\u96C5\u96C4\u96C6\u96C7\u96EF\u96F2\u97CC\u9805\u9806\u9808\u98E7\u98EA\u98EF\u98E9\u98F2\u98ED\u99AE\u99AD\u9EC3\u9ECD\u9ED1\u4E82\u50AD\u50B5\u50B2\u50B3\u50C5\u50BE\u50AC\u50B7\u50BB\u50AF\u50C7\u527F\u5277\u527D\u52DF\u52E6\u52E4\u52E2\u52E3\u532F\u55DF\u55E8\u55D3\u55E6\u55CE\u55DC\u55C7\u55D1\u55E3\u55E4\u55EF\u55DA\u55E1\u55C5\u55C6\u55E5\u55C9\u5712\u5713\u585E\u5851\u5858\u5857\u585A\u5854\u586B\u584C\u586D\u584A\u5862\u5852\u584B\u5967\u5AC1\u5AC9\u5ACC\u5ABE\u5ABD\u5ABC"], + ["b740", "\u5AB3\u5AC2\u5AB2\u5D69\u5D6F\u5E4C\u5E79\u5EC9\u5EC8\u5F12\u5F59\u5FAC\u5FAE\u611A\u610F\u6148\u611F\u60F3\u611B\u60F9\u6101\u6108\u614E\u614C\u6144\u614D\u613E\u6134\u6127\u610D\u6106\u6137\u6221\u6222\u6413\u643E\u641E\u642A\u642D\u643D\u642C\u640F\u641C\u6414\u640D\u6436\u6416\u6417\u6406\u656C\u659F\u65B0\u6697\u6689\u6687\u6688\u6696\u6684\u6698\u668D\u6703\u6994\u696D"], + ["b7a1", "\u695A\u6977\u6960\u6954\u6975\u6930\u6982\u694A\u6968\u696B\u695E\u6953\u6979\u6986\u695D\u6963\u695B\u6B47\u6B72\u6BC0\u6BBF\u6BD3\u6BFD\u6EA2\u6EAF\u6ED3\u6EB6\u6EC2\u6E90\u6E9D\u6EC7\u6EC5\u6EA5\u6E98\u6EBC\u6EBA\u6EAB\u6ED1\u6E96\u6E9C\u6EC4\u6ED4\u6EAA\u6EA7\u6EB4\u714E\u7159\u7169\u7164\u7149\u7167\u715C\u716C\u7166\u714C\u7165\u715E\u7146\u7168\u7156\u723A\u7252\u7337\u7345\u733F\u733E\u746F\u745A\u7455\u745F\u745E\u7441\u743F\u7459\u745B\u745C\u7576\u7578\u7600\u75F0\u7601\u75F2\u75F1\u75FA\u75FF\u75F4\u75F3\u76DE\u76DF\u775B\u776B\u7766\u775E\u7763"], + ["b840", "\u7779\u776A\u776C\u775C\u7765\u7768\u7762\u77EE\u788E\u78B0\u7897\u7898\u788C\u7889\u787C\u7891\u7893\u787F\u797A\u797F\u7981\u842C\u79BD\u7A1C\u7A1A\u7A20\u7A14\u7A1F\u7A1E\u7A9F\u7AA0\u7B77\u7BC0\u7B60\u7B6E\u7B67\u7CB1\u7CB3\u7CB5\u7D93\u7D79\u7D91\u7D81\u7D8F\u7D5B\u7F6E\u7F69\u7F6A\u7F72\u7FA9\u7FA8\u7FA4\u8056\u8058\u8086\u8084\u8171\u8170\u8178\u8165\u816E\u8173\u816B"], + ["b8a1", "\u8179\u817A\u8166\u8205\u8247\u8482\u8477\u843D\u8431\u8475\u8466\u846B\u8449\u846C\u845B\u843C\u8435\u8461\u8463\u8469\u846D\u8446\u865E\u865C\u865F\u86F9\u8713\u8708\u8707\u8700\u86FE\u86FB\u8702\u8703\u8706\u870A\u8859\u88DF\u88D4\u88D9\u88DC\u88D8\u88DD\u88E1\u88CA\u88D5\u88D2\u899C\u89E3\u8A6B\u8A72\u8A73\u8A66\u8A69\u8A70\u8A87\u8A7C\u8A63\u8AA0\u8A71\u8A85\u8A6D\u8A62\u8A6E\u8A6C\u8A79\u8A7B\u8A3E\u8A68\u8C62\u8C8A\u8C89\u8CCA\u8CC7\u8CC8\u8CC4\u8CB2\u8CC3\u8CC2\u8CC5\u8DE1\u8DDF\u8DE8\u8DEF\u8DF3\u8DFA\u8DEA\u8DE4\u8DE6\u8EB2\u8F03\u8F09\u8EFE\u8F0A"], + ["b940", "\u8F9F\u8FB2\u904B\u904A\u9053\u9042\u9054\u903C\u9055\u9050\u9047\u904F\u904E\u904D\u9051\u903E\u9041\u9112\u9117\u916C\u916A\u9169\u91C9\u9237\u9257\u9238\u923D\u9240\u923E\u925B\u924B\u9264\u9251\u9234\u9249\u924D\u9245\u9239\u923F\u925A\u9598\u9698\u9694\u9695\u96CD\u96CB\u96C9\u96CA\u96F7\u96FB\u96F9\u96F6\u9756\u9774\u9776\u9810\u9811\u9813\u980A\u9812\u980C\u98FC\u98F4"], + ["b9a1", "\u98FD\u98FE\u99B3\u99B1\u99B4\u9AE1\u9CE9\u9E82\u9F0E\u9F13\u9F20\u50E7\u50EE\u50E5\u50D6\u50ED\u50DA\u50D5\u50CF\u50D1\u50F1\u50CE\u50E9\u5162\u51F3\u5283\u5282\u5331\u53AD\u55FE\u5600\u561B\u5617\u55FD\u5614\u5606\u5609\u560D\u560E\u55F7\u5616\u561F\u5608\u5610\u55F6\u5718\u5716\u5875\u587E\u5883\u5893\u588A\u5879\u5885\u587D\u58FD\u5925\u5922\u5924\u596A\u5969\u5AE1\u5AE6\u5AE9\u5AD7\u5AD6\u5AD8\u5AE3\u5B75\u5BDE\u5BE7\u5BE1\u5BE5\u5BE6\u5BE8\u5BE2\u5BE4\u5BDF\u5C0D\u5C62\u5D84\u5D87\u5E5B\u5E63\u5E55\u5E57\u5E54\u5ED3\u5ED6\u5F0A\u5F46\u5F70\u5FB9\u6147"], + ["ba40", "\u613F\u614B\u6177\u6162\u6163\u615F\u615A\u6158\u6175\u622A\u6487\u6458\u6454\u64A4\u6478\u645F\u647A\u6451\u6467\u6434\u646D\u647B\u6572\u65A1\u65D7\u65D6\u66A2\u66A8\u669D\u699C\u69A8\u6995\u69C1\u69AE\u69D3\u69CB\u699B\u69B7\u69BB\u69AB\u69B4\u69D0\u69CD\u69AD\u69CC\u69A6\u69C3\u69A3\u6B49\u6B4C\u6C33\u6F33\u6F14\u6EFE\u6F13\u6EF4\u6F29\u6F3E\u6F20\u6F2C\u6F0F\u6F02\u6F22"], + ["baa1", "\u6EFF\u6EEF\u6F06\u6F31\u6F38\u6F32\u6F23\u6F15\u6F2B\u6F2F\u6F88\u6F2A\u6EEC\u6F01\u6EF2\u6ECC\u6EF7\u7194\u7199\u717D\u718A\u7184\u7192\u723E\u7292\u7296\u7344\u7350\u7464\u7463\u746A\u7470\u746D\u7504\u7591\u7627\u760D\u760B\u7609\u7613\u76E1\u76E3\u7784\u777D\u777F\u7761\u78C1\u789F\u78A7\u78B3\u78A9\u78A3\u798E\u798F\u798D\u7A2E\u7A31\u7AAA\u7AA9\u7AED\u7AEF\u7BA1\u7B95\u7B8B\u7B75\u7B97\u7B9D\u7B94\u7B8F\u7BB8\u7B87\u7B84\u7CB9\u7CBD\u7CBE\u7DBB\u7DB0\u7D9C\u7DBD\u7DBE\u7DA0\u7DCA\u7DB4\u7DB2\u7DB1\u7DBA\u7DA2\u7DBF\u7DB5\u7DB8\u7DAD\u7DD2\u7DC7\u7DAC"], + ["bb40", "\u7F70\u7FE0\u7FE1\u7FDF\u805E\u805A\u8087\u8150\u8180\u818F\u8188\u818A\u817F\u8182\u81E7\u81FA\u8207\u8214\u821E\u824B\u84C9\u84BF\u84C6\u84C4\u8499\u849E\u84B2\u849C\u84CB\u84B8\u84C0\u84D3\u8490\u84BC\u84D1\u84CA\u873F\u871C\u873B\u8722\u8725\u8734\u8718\u8755\u8737\u8729\u88F3\u8902\u88F4\u88F9\u88F8\u88FD\u88E8\u891A\u88EF\u8AA6\u8A8C\u8A9E\u8AA3\u8A8D\u8AA1\u8A93\u8AA4"], + ["bba1", "\u8AAA\u8AA5\u8AA8\u8A98\u8A91\u8A9A\u8AA7\u8C6A\u8C8D\u8C8C\u8CD3\u8CD1\u8CD2\u8D6B\u8D99\u8D95\u8DFC\u8F14\u8F12\u8F15\u8F13\u8FA3\u9060\u9058\u905C\u9063\u9059\u905E\u9062\u905D\u905B\u9119\u9118\u911E\u9175\u9178\u9177\u9174\u9278\u9280\u9285\u9298\u9296\u927B\u9293\u929C\u92A8\u927C\u9291\u95A1\u95A8\u95A9\u95A3\u95A5\u95A4\u9699\u969C\u969B\u96CC\u96D2\u9700\u977C\u9785\u97F6\u9817\u9818\u98AF\u98B1\u9903\u9905\u990C\u9909\u99C1\u9AAF\u9AB0\u9AE6\u9B41\u9B42\u9CF4\u9CF6\u9CF3\u9EBC\u9F3B\u9F4A\u5104\u5100\u50FB\u50F5\u50F9\u5102\u5108\u5109\u5105\u51DC"], + ["bc40", "\u5287\u5288\u5289\u528D\u528A\u52F0\u53B2\u562E\u563B\u5639\u5632\u563F\u5634\u5629\u5653\u564E\u5657\u5674\u5636\u562F\u5630\u5880\u589F\u589E\u58B3\u589C\u58AE\u58A9\u58A6\u596D\u5B09\u5AFB\u5B0B\u5AF5\u5B0C\u5B08\u5BEE\u5BEC\u5BE9\u5BEB\u5C64\u5C65\u5D9D\u5D94\u5E62\u5E5F\u5E61\u5EE2\u5EDA\u5EDF\u5EDD\u5EE3\u5EE0\u5F48\u5F71\u5FB7\u5FB5\u6176\u6167\u616E\u615D\u6155\u6182"], + ["bca1", "\u617C\u6170\u616B\u617E\u61A7\u6190\u61AB\u618E\u61AC\u619A\u61A4\u6194\u61AE\u622E\u6469\u646F\u6479\u649E\u64B2\u6488\u6490\u64B0\u64A5\u6493\u6495\u64A9\u6492\u64AE\u64AD\u64AB\u649A\u64AC\u6499\u64A2\u64B3\u6575\u6577\u6578\u66AE\u66AB\u66B4\u66B1\u6A23\u6A1F\u69E8\u6A01\u6A1E\u6A19\u69FD\u6A21\u6A13\u6A0A\u69F3\u6A02\u6A05\u69ED\u6A11\u6B50\u6B4E\u6BA4\u6BC5\u6BC6\u6F3F\u6F7C\u6F84\u6F51\u6F66\u6F54\u6F86\u6F6D\u6F5B\u6F78\u6F6E\u6F8E\u6F7A\u6F70\u6F64\u6F97\u6F58\u6ED5\u6F6F\u6F60\u6F5F\u719F\u71AC\u71B1\u71A8\u7256\u729B\u734E\u7357\u7469\u748B\u7483"], + ["bd40", "\u747E\u7480\u757F\u7620\u7629\u761F\u7624\u7626\u7621\u7622\u769A\u76BA\u76E4\u778E\u7787\u778C\u7791\u778B\u78CB\u78C5\u78BA\u78CA\u78BE\u78D5\u78BC\u78D0\u7A3F\u7A3C\u7A40\u7A3D\u7A37\u7A3B\u7AAF\u7AAE\u7BAD\u7BB1\u7BC4\u7BB4\u7BC6\u7BC7\u7BC1\u7BA0\u7BCC\u7CCA\u7DE0\u7DF4\u7DEF\u7DFB\u7DD8\u7DEC\u7DDD\u7DE8\u7DE3\u7DDA\u7DDE\u7DE9\u7D9E\u7DD9\u7DF2\u7DF9\u7F75\u7F77\u7FAF"], + ["bda1", "\u7FE9\u8026\u819B\u819C\u819D\u81A0\u819A\u8198\u8517\u853D\u851A\u84EE\u852C\u852D\u8513\u8511\u8523\u8521\u8514\u84EC\u8525\u84FF\u8506\u8782\u8774\u8776\u8760\u8766\u8778\u8768\u8759\u8757\u874C\u8753\u885B\u885D\u8910\u8907\u8912\u8913\u8915\u890A\u8ABC\u8AD2\u8AC7\u8AC4\u8A95\u8ACB\u8AF8\u8AB2\u8AC9\u8AC2\u8ABF\u8AB0\u8AD6\u8ACD\u8AB6\u8AB9\u8ADB\u8C4C\u8C4E\u8C6C\u8CE0\u8CDE\u8CE6\u8CE4\u8CEC\u8CED\u8CE2\u8CE3\u8CDC\u8CEA\u8CE1\u8D6D\u8D9F\u8DA3\u8E2B\u8E10\u8E1D\u8E22\u8E0F\u8E29\u8E1F\u8E21\u8E1E\u8EBA\u8F1D\u8F1B\u8F1F\u8F29\u8F26\u8F2A\u8F1C\u8F1E"], + ["be40", "\u8F25\u9069\u906E\u9068\u906D\u9077\u9130\u912D\u9127\u9131\u9187\u9189\u918B\u9183\u92C5\u92BB\u92B7\u92EA\u92AC\u92E4\u92C1\u92B3\u92BC\u92D2\u92C7\u92F0\u92B2\u95AD\u95B1\u9704\u9706\u9707\u9709\u9760\u978D\u978B\u978F\u9821\u982B\u981C\u98B3\u990A\u9913\u9912\u9918\u99DD\u99D0\u99DF\u99DB\u99D1\u99D5\u99D2\u99D9\u9AB7\u9AEE\u9AEF\u9B27\u9B45\u9B44\u9B77\u9B6F\u9D06\u9D09"], + ["bea1", "\u9D03\u9EA9\u9EBE\u9ECE\u58A8\u9F52\u5112\u5118\u5114\u5110\u5115\u5180\u51AA\u51DD\u5291\u5293\u52F3\u5659\u566B\u5679\u5669\u5664\u5678\u566A\u5668\u5665\u5671\u566F\u566C\u5662\u5676\u58C1\u58BE\u58C7\u58C5\u596E\u5B1D\u5B34\u5B78\u5BF0\u5C0E\u5F4A\u61B2\u6191\u61A9\u618A\u61CD\u61B6\u61BE\u61CA\u61C8\u6230\u64C5\u64C1\u64CB\u64BB\u64BC\u64DA\u64C4\u64C7\u64C2\u64CD\u64BF\u64D2\u64D4\u64BE\u6574\u66C6\u66C9\u66B9\u66C4\u66C7\u66B8\u6A3D\u6A38\u6A3A\u6A59\u6A6B\u6A58\u6A39\u6A44\u6A62\u6A61\u6A4B\u6A47\u6A35\u6A5F\u6A48\u6B59\u6B77\u6C05\u6FC2\u6FB1\u6FA1"], + ["bf40", "\u6FC3\u6FA4\u6FC1\u6FA7\u6FB3\u6FC0\u6FB9\u6FB6\u6FA6\u6FA0\u6FB4\u71BE\u71C9\u71D0\u71D2\u71C8\u71D5\u71B9\u71CE\u71D9\u71DC\u71C3\u71C4\u7368\u749C\u74A3\u7498\u749F\u749E\u74E2\u750C\u750D\u7634\u7638\u763A\u76E7\u76E5\u77A0\u779E\u779F\u77A5\u78E8\u78DA\u78EC\u78E7\u79A6\u7A4D\u7A4E\u7A46\u7A4C\u7A4B\u7ABA\u7BD9\u7C11\u7BC9\u7BE4\u7BDB\u7BE1\u7BE9\u7BE6\u7CD5\u7CD6\u7E0A"], + ["bfa1", "\u7E11\u7E08\u7E1B\u7E23\u7E1E\u7E1D\u7E09\u7E10\u7F79\u7FB2\u7FF0\u7FF1\u7FEE\u8028\u81B3\u81A9\u81A8\u81FB\u8208\u8258\u8259\u854A\u8559\u8548\u8568\u8569\u8543\u8549\u856D\u856A\u855E\u8783\u879F\u879E\u87A2\u878D\u8861\u892A\u8932\u8925\u892B\u8921\u89AA\u89A6\u8AE6\u8AFA\u8AEB\u8AF1\u8B00\u8ADC\u8AE7\u8AEE\u8AFE\u8B01\u8B02\u8AF7\u8AED\u8AF3\u8AF6\u8AFC\u8C6B\u8C6D\u8C93\u8CF4\u8E44\u8E31\u8E34\u8E42\u8E39\u8E35\u8F3B\u8F2F\u8F38\u8F33\u8FA8\u8FA6\u9075\u9074\u9078\u9072\u907C\u907A\u9134\u9192\u9320\u9336\u92F8\u9333\u932F\u9322\u92FC\u932B\u9304\u931A"], + ["c040", "\u9310\u9326\u9321\u9315\u932E\u9319\u95BB\u96A7\u96A8\u96AA\u96D5\u970E\u9711\u9716\u970D\u9713\u970F\u975B\u975C\u9766\u9798\u9830\u9838\u983B\u9837\u982D\u9839\u9824\u9910\u9928\u991E\u991B\u9921\u991A\u99ED\u99E2\u99F1\u9AB8\u9ABC\u9AFB\u9AED\u9B28\u9B91\u9D15\u9D23\u9D26\u9D28\u9D12\u9D1B\u9ED8\u9ED4\u9F8D\u9F9C\u512A\u511F\u5121\u5132\u52F5\u568E\u5680\u5690\u5685\u5687"], + ["c0a1", "\u568F\u58D5\u58D3\u58D1\u58CE\u5B30\u5B2A\u5B24\u5B7A\u5C37\u5C68\u5DBC\u5DBA\u5DBD\u5DB8\u5E6B\u5F4C\u5FBD\u61C9\u61C2\u61C7\u61E6\u61CB\u6232\u6234\u64CE\u64CA\u64D8\u64E0\u64F0\u64E6\u64EC\u64F1\u64E2\u64ED\u6582\u6583\u66D9\u66D6\u6A80\u6A94\u6A84\u6AA2\u6A9C\u6ADB\u6AA3\u6A7E\u6A97\u6A90\u6AA0\u6B5C\u6BAE\u6BDA\u6C08\u6FD8\u6FF1\u6FDF\u6FE0\u6FDB\u6FE4\u6FEB\u6FEF\u6F80\u6FEC\u6FE1\u6FE9\u6FD5\u6FEE\u6FF0\u71E7\u71DF\u71EE\u71E6\u71E5\u71ED\u71EC\u71F4\u71E0\u7235\u7246\u7370\u7372\u74A9\u74B0\u74A6\u74A8\u7646\u7642\u764C\u76EA\u77B3\u77AA\u77B0\u77AC"], + ["c140", "\u77A7\u77AD\u77EF\u78F7\u78FA\u78F4\u78EF\u7901\u79A7\u79AA\u7A57\u7ABF\u7C07\u7C0D\u7BFE\u7BF7\u7C0C\u7BE0\u7CE0\u7CDC\u7CDE\u7CE2\u7CDF\u7CD9\u7CDD\u7E2E\u7E3E\u7E46\u7E37\u7E32\u7E43\u7E2B\u7E3D\u7E31\u7E45\u7E41\u7E34\u7E39\u7E48\u7E35\u7E3F\u7E2F\u7F44\u7FF3\u7FFC\u8071\u8072\u8070\u806F\u8073\u81C6\u81C3\u81BA\u81C2\u81C0\u81BF\u81BD\u81C9\u81BE\u81E8\u8209\u8271\u85AA"], + ["c1a1", "\u8584\u857E\u859C\u8591\u8594\u85AF\u859B\u8587\u85A8\u858A\u8667\u87C0\u87D1\u87B3\u87D2\u87C6\u87AB\u87BB\u87BA\u87C8\u87CB\u893B\u8936\u8944\u8938\u893D\u89AC\u8B0E\u8B17\u8B19\u8B1B\u8B0A\u8B20\u8B1D\u8B04\u8B10\u8C41\u8C3F\u8C73\u8CFA\u8CFD\u8CFC\u8CF8\u8CFB\u8DA8\u8E49\u8E4B\u8E48\u8E4A\u8F44\u8F3E\u8F42\u8F45\u8F3F\u907F\u907D\u9084\u9081\u9082\u9080\u9139\u91A3\u919E\u919C\u934D\u9382\u9328\u9375\u934A\u9365\u934B\u9318\u937E\u936C\u935B\u9370\u935A\u9354\u95CA\u95CB\u95CC\u95C8\u95C6\u96B1\u96B8\u96D6\u971C\u971E\u97A0\u97D3\u9846\u98B6\u9935\u9A01"], + ["c240", "\u99FF\u9BAE\u9BAB\u9BAA\u9BAD\u9D3B\u9D3F\u9E8B\u9ECF\u9EDE\u9EDC\u9EDD\u9EDB\u9F3E\u9F4B\u53E2\u5695\u56AE\u58D9\u58D8\u5B38\u5F5D\u61E3\u6233\u64F4\u64F2\u64FE\u6506\u64FA\u64FB\u64F7\u65B7\u66DC\u6726\u6AB3\u6AAC\u6AC3\u6ABB\u6AB8\u6AC2\u6AAE\u6AAF\u6B5F\u6B78\u6BAF\u7009\u700B\u6FFE\u7006\u6FFA\u7011\u700F\u71FB\u71FC\u71FE\u71F8\u7377\u7375\u74A7\u74BF\u7515\u7656\u7658"], + ["c2a1", "\u7652\u77BD\u77BF\u77BB\u77BC\u790E\u79AE\u7A61\u7A62\u7A60\u7AC4\u7AC5\u7C2B\u7C27\u7C2A\u7C1E\u7C23\u7C21\u7CE7\u7E54\u7E55\u7E5E\u7E5A\u7E61\u7E52\u7E59\u7F48\u7FF9\u7FFB\u8077\u8076\u81CD\u81CF\u820A\u85CF\u85A9\u85CD\u85D0\u85C9\u85B0\u85BA\u85B9\u85A6\u87EF\u87EC\u87F2\u87E0\u8986\u89B2\u89F4\u8B28\u8B39\u8B2C\u8B2B\u8C50\u8D05\u8E59\u8E63\u8E66\u8E64\u8E5F\u8E55\u8EC0\u8F49\u8F4D\u9087\u9083\u9088\u91AB\u91AC\u91D0\u9394\u938A\u9396\u93A2\u93B3\u93AE\u93AC\u93B0\u9398\u939A\u9397\u95D4\u95D6\u95D0\u95D5\u96E2\u96DC\u96D9\u96DB\u96DE\u9724\u97A3\u97A6"], + ["c340", "\u97AD\u97F9\u984D\u984F\u984C\u984E\u9853\u98BA\u993E\u993F\u993D\u992E\u99A5\u9A0E\u9AC1\u9B03\u9B06\u9B4F\u9B4E\u9B4D\u9BCA\u9BC9\u9BFD\u9BC8\u9BC0\u9D51\u9D5D\u9D60\u9EE0\u9F15\u9F2C\u5133\u56A5\u58DE\u58DF\u58E2\u5BF5\u9F90\u5EEC\u61F2\u61F7\u61F6\u61F5\u6500\u650F\u66E0\u66DD\u6AE5\u6ADD\u6ADA\u6AD3\u701B\u701F\u7028\u701A\u701D\u7015\u7018\u7206\u720D\u7258\u72A2\u7378"], + ["c3a1", "\u737A\u74BD\u74CA\u74E3\u7587\u7586\u765F\u7661\u77C7\u7919\u79B1\u7A6B\u7A69\u7C3E\u7C3F\u7C38\u7C3D\u7C37\u7C40\u7E6B\u7E6D\u7E79\u7E69\u7E6A\u7F85\u7E73\u7FB6\u7FB9\u7FB8\u81D8\u85E9\u85DD\u85EA\u85D5\u85E4\u85E5\u85F7\u87FB\u8805\u880D\u87F9\u87FE\u8960\u895F\u8956\u895E\u8B41\u8B5C\u8B58\u8B49\u8B5A\u8B4E\u8B4F\u8B46\u8B59\u8D08\u8D0A\u8E7C\u8E72\u8E87\u8E76\u8E6C\u8E7A\u8E74\u8F54\u8F4E\u8FAD\u908A\u908B\u91B1\u91AE\u93E1\u93D1\u93DF\u93C3\u93C8\u93DC\u93DD\u93D6\u93E2\u93CD\u93D8\u93E4\u93D7\u93E8\u95DC\u96B4\u96E3\u972A\u9727\u9761\u97DC\u97FB\u985E"], + ["c440", "\u9858\u985B\u98BC\u9945\u9949\u9A16\u9A19\u9B0D\u9BE8\u9BE7\u9BD6\u9BDB\u9D89\u9D61\u9D72\u9D6A\u9D6C\u9E92\u9E97\u9E93\u9EB4\u52F8\u56A8\u56B7\u56B6\u56B4\u56BC\u58E4\u5B40\u5B43\u5B7D\u5BF6\u5DC9\u61F8\u61FA\u6518\u6514\u6519\u66E6\u6727\u6AEC\u703E\u7030\u7032\u7210\u737B\u74CF\u7662\u7665\u7926\u792A\u792C\u792B\u7AC7\u7AF6\u7C4C\u7C43\u7C4D\u7CEF\u7CF0\u8FAE\u7E7D\u7E7C"], + ["c4a1", "\u7E82\u7F4C\u8000\u81DA\u8266\u85FB\u85F9\u8611\u85FA\u8606\u860B\u8607\u860A\u8814\u8815\u8964\u89BA\u89F8\u8B70\u8B6C\u8B66\u8B6F\u8B5F\u8B6B\u8D0F\u8D0D\u8E89\u8E81\u8E85\u8E82\u91B4\u91CB\u9418\u9403\u93FD\u95E1\u9730\u98C4\u9952\u9951\u99A8\u9A2B\u9A30\u9A37\u9A35\u9C13\u9C0D\u9E79\u9EB5\u9EE8\u9F2F\u9F5F\u9F63\u9F61\u5137\u5138\u56C1\u56C0\u56C2\u5914\u5C6C\u5DCD\u61FC\u61FE\u651D\u651C\u6595\u66E9\u6AFB\u6B04\u6AFA\u6BB2\u704C\u721B\u72A7\u74D6\u74D4\u7669\u77D3\u7C50\u7E8F\u7E8C\u7FBC\u8617\u862D\u861A\u8823\u8822\u8821\u881F\u896A\u896C\u89BD\u8B74"], + ["c540", "\u8B77\u8B7D\u8D13\u8E8A\u8E8D\u8E8B\u8F5F\u8FAF\u91BA\u942E\u9433\u9435\u943A\u9438\u9432\u942B\u95E2\u9738\u9739\u9732\u97FF\u9867\u9865\u9957\u9A45\u9A43\u9A40\u9A3E\u9ACF\u9B54\u9B51\u9C2D\u9C25\u9DAF\u9DB4\u9DC2\u9DB8\u9E9D\u9EEF\u9F19\u9F5C\u9F66\u9F67\u513C\u513B\u56C8\u56CA\u56C9\u5B7F\u5DD4\u5DD2\u5F4E\u61FF\u6524\u6B0A\u6B61\u7051\u7058\u7380\u74E4\u758A\u766E\u766C"], + ["c5a1", "\u79B3\u7C60\u7C5F\u807E\u807D\u81DF\u8972\u896F\u89FC\u8B80\u8D16\u8D17\u8E91\u8E93\u8F61\u9148\u9444\u9451\u9452\u973D\u973E\u97C3\u97C1\u986B\u9955\u9A55\u9A4D\u9AD2\u9B1A\u9C49\u9C31\u9C3E\u9C3B\u9DD3\u9DD7\u9F34\u9F6C\u9F6A\u9F94\u56CC\u5DD6\u6200\u6523\u652B\u652A\u66EC\u6B10\u74DA\u7ACA\u7C64\u7C63\u7C65\u7E93\u7E96\u7E94\u81E2\u8638\u863F\u8831\u8B8A\u9090\u908F\u9463\u9460\u9464\u9768\u986F\u995C\u9A5A\u9A5B\u9A57\u9AD3\u9AD4\u9AD1\u9C54\u9C57\u9C56\u9DE5\u9E9F\u9EF4\u56D1\u58E9\u652C\u705E\u7671\u7672\u77D7\u7F50\u7F88\u8836\u8839\u8862\u8B93\u8B92"], + ["c640", "\u8B96\u8277\u8D1B\u91C0\u946A\u9742\u9748\u9744\u97C6\u9870\u9A5F\u9B22\u9B58\u9C5F\u9DF9\u9DFA\u9E7C\u9E7D\u9F07\u9F77\u9F72\u5EF3\u6B16\u7063\u7C6C\u7C6E\u883B\u89C0\u8EA1\u91C1\u9472\u9470\u9871\u995E\u9AD6\u9B23\u9ECC\u7064\u77DA\u8B9A\u9477\u97C9\u9A62\u9A65\u7E9C\u8B9C\u8EAA\u91C5\u947D\u947E\u947C\u9C77\u9C78\u9EF7\u8C54\u947F\u9E1A\u7228\u9A6A\u9B31\u9E1B\u9E1E\u7C72"], + ["c940", "\u4E42\u4E5C\u51F5\u531A\u5382\u4E07\u4E0C\u4E47\u4E8D\u56D7\uFA0C\u5C6E\u5F73\u4E0F\u5187\u4E0E\u4E2E\u4E93\u4EC2\u4EC9\u4EC8\u5198\u52FC\u536C\u53B9\u5720\u5903\u592C\u5C10\u5DFF\u65E1\u6BB3\u6BCC\u6C14\u723F\u4E31\u4E3C\u4EE8\u4EDC\u4EE9\u4EE1\u4EDD\u4EDA\u520C\u531C\u534C\u5722\u5723\u5917\u592F\u5B81\u5B84\u5C12\u5C3B\u5C74\u5C73\u5E04\u5E80\u5E82\u5FC9\u6209\u6250\u6C15"], + ["c9a1", "\u6C36\u6C43\u6C3F\u6C3B\u72AE\u72B0\u738A\u79B8\u808A\u961E\u4F0E\u4F18\u4F2C\u4EF5\u4F14\u4EF1\u4F00\u4EF7\u4F08\u4F1D\u4F02\u4F05\u4F22\u4F13\u4F04\u4EF4\u4F12\u51B1\u5213\u5209\u5210\u52A6\u5322\u531F\u534D\u538A\u5407\u56E1\u56DF\u572E\u572A\u5734\u593C\u5980\u597C\u5985\u597B\u597E\u5977\u597F\u5B56\u5C15\u5C25\u5C7C\u5C7A\u5C7B\u5C7E\u5DDF\u5E75\u5E84\u5F02\u5F1A\u5F74\u5FD5\u5FD4\u5FCF\u625C\u625E\u6264\u6261\u6266\u6262\u6259\u6260\u625A\u6265\u65EF\u65EE\u673E\u6739\u6738\u673B\u673A\u673F\u673C\u6733\u6C18\u6C46\u6C52\u6C5C\u6C4F\u6C4A\u6C54\u6C4B"], + ["ca40", "\u6C4C\u7071\u725E\u72B4\u72B5\u738E\u752A\u767F\u7A75\u7F51\u8278\u827C\u8280\u827D\u827F\u864D\u897E\u9099\u9097\u9098\u909B\u9094\u9622\u9624\u9620\u9623\u4F56\u4F3B\u4F62\u4F49\u4F53\u4F64\u4F3E\u4F67\u4F52\u4F5F\u4F41\u4F58\u4F2D\u4F33\u4F3F\u4F61\u518F\u51B9\u521C\u521E\u5221\u52AD\u52AE\u5309\u5363\u5372\u538E\u538F\u5430\u5437\u542A\u5454\u5445\u5419\u541C\u5425\u5418"], + ["caa1", "\u543D\u544F\u5441\u5428\u5424\u5447\u56EE\u56E7\u56E5\u5741\u5745\u574C\u5749\u574B\u5752\u5906\u5940\u59A6\u5998\u59A0\u5997\u598E\u59A2\u5990\u598F\u59A7\u59A1\u5B8E\u5B92\u5C28\u5C2A\u5C8D\u5C8F\u5C88\u5C8B\u5C89\u5C92\u5C8A\u5C86\u5C93\u5C95\u5DE0\u5E0A\u5E0E\u5E8B\u5E89\u5E8C\u5E88\u5E8D\u5F05\u5F1D\u5F78\u5F76\u5FD2\u5FD1\u5FD0\u5FED\u5FE8\u5FEE\u5FF3\u5FE1\u5FE4\u5FE3\u5FFA\u5FEF\u5FF7\u5FFB\u6000\u5FF4\u623A\u6283\u628C\u628E\u628F\u6294\u6287\u6271\u627B\u627A\u6270\u6281\u6288\u6277\u627D\u6272\u6274\u6537\u65F0\u65F4\u65F3\u65F2\u65F5\u6745\u6747"], + ["cb40", "\u6759\u6755\u674C\u6748\u675D\u674D\u675A\u674B\u6BD0\u6C19\u6C1A\u6C78\u6C67\u6C6B\u6C84\u6C8B\u6C8F\u6C71\u6C6F\u6C69\u6C9A\u6C6D\u6C87\u6C95\u6C9C\u6C66\u6C73\u6C65\u6C7B\u6C8E\u7074\u707A\u7263\u72BF\u72BD\u72C3\u72C6\u72C1\u72BA\u72C5\u7395\u7397\u7393\u7394\u7392\u753A\u7539\u7594\u7595\u7681\u793D\u8034\u8095\u8099\u8090\u8092\u809C\u8290\u828F\u8285\u828E\u8291\u8293"], + ["cba1", "\u828A\u8283\u8284\u8C78\u8FC9\u8FBF\u909F\u90A1\u90A5\u909E\u90A7\u90A0\u9630\u9628\u962F\u962D\u4E33\u4F98\u4F7C\u4F85\u4F7D\u4F80\u4F87\u4F76\u4F74\u4F89\u4F84\u4F77\u4F4C\u4F97\u4F6A\u4F9A\u4F79\u4F81\u4F78\u4F90\u4F9C\u4F94\u4F9E\u4F92\u4F82\u4F95\u4F6B\u4F6E\u519E\u51BC\u51BE\u5235\u5232\u5233\u5246\u5231\u52BC\u530A\u530B\u533C\u5392\u5394\u5487\u547F\u5481\u5491\u5482\u5488\u546B\u547A\u547E\u5465\u546C\u5474\u5466\u548D\u546F\u5461\u5460\u5498\u5463\u5467\u5464\u56F7\u56F9\u576F\u5772\u576D\u576B\u5771\u5770\u5776\u5780\u5775\u577B\u5773\u5774\u5762"], + ["cc40", "\u5768\u577D\u590C\u5945\u59B5\u59BA\u59CF\u59CE\u59B2\u59CC\u59C1\u59B6\u59BC\u59C3\u59D6\u59B1\u59BD\u59C0\u59C8\u59B4\u59C7\u5B62\u5B65\u5B93\u5B95\u5C44\u5C47\u5CAE\u5CA4\u5CA0\u5CB5\u5CAF\u5CA8\u5CAC\u5C9F\u5CA3\u5CAD\u5CA2\u5CAA\u5CA7\u5C9D\u5CA5\u5CB6\u5CB0\u5CA6\u5E17\u5E14\u5E19\u5F28\u5F22\u5F23\u5F24\u5F54\u5F82\u5F7E\u5F7D\u5FDE\u5FE5\u602D\u6026\u6019\u6032\u600B"], + ["cca1", "\u6034\u600A\u6017\u6033\u601A\u601E\u602C\u6022\u600D\u6010\u602E\u6013\u6011\u600C\u6009\u601C\u6214\u623D\u62AD\u62B4\u62D1\u62BE\u62AA\u62B6\u62CA\u62AE\u62B3\u62AF\u62BB\u62A9\u62B0\u62B8\u653D\u65A8\u65BB\u6609\u65FC\u6604\u6612\u6608\u65FB\u6603\u660B\u660D\u6605\u65FD\u6611\u6610\u66F6\u670A\u6785\u676C\u678E\u6792\u6776\u677B\u6798\u6786\u6784\u6774\u678D\u678C\u677A\u679F\u6791\u6799\u6783\u677D\u6781\u6778\u6779\u6794\u6B25\u6B80\u6B7E\u6BDE\u6C1D\u6C93\u6CEC\u6CEB\u6CEE\u6CD9\u6CB6\u6CD4\u6CAD\u6CE7\u6CB7\u6CD0\u6CC2\u6CBA\u6CC3\u6CC6\u6CED\u6CF2"], + ["cd40", "\u6CD2\u6CDD\u6CB4\u6C8A\u6C9D\u6C80\u6CDE\u6CC0\u6D30\u6CCD\u6CC7\u6CB0\u6CF9\u6CCF\u6CE9\u6CD1\u7094\u7098\u7085\u7093\u7086\u7084\u7091\u7096\u7082\u709A\u7083\u726A\u72D6\u72CB\u72D8\u72C9\u72DC\u72D2\u72D4\u72DA\u72CC\u72D1\u73A4\u73A1\u73AD\u73A6\u73A2\u73A0\u73AC\u739D\u74DD\u74E8\u753F\u7540\u753E\u758C\u7598\u76AF\u76F3\u76F1\u76F0\u76F5\u77F8\u77FC\u77F9\u77FB\u77FA"], + ["cda1", "\u77F7\u7942\u793F\u79C5\u7A78\u7A7B\u7AFB\u7C75\u7CFD\u8035\u808F\u80AE\u80A3\u80B8\u80B5\u80AD\u8220\u82A0\u82C0\u82AB\u829A\u8298\u829B\u82B5\u82A7\u82AE\u82BC\u829E\u82BA\u82B4\u82A8\u82A1\u82A9\u82C2\u82A4\u82C3\u82B6\u82A2\u8670\u866F\u866D\u866E\u8C56\u8FD2\u8FCB\u8FD3\u8FCD\u8FD6\u8FD5\u8FD7\u90B2\u90B4\u90AF\u90B3\u90B0\u9639\u963D\u963C\u963A\u9643\u4FCD\u4FC5\u4FD3\u4FB2\u4FC9\u4FCB\u4FC1\u4FD4\u4FDC\u4FD9\u4FBB\u4FB3\u4FDB\u4FC7\u4FD6\u4FBA\u4FC0\u4FB9\u4FEC\u5244\u5249\u52C0\u52C2\u533D\u537C\u5397\u5396\u5399\u5398\u54BA\u54A1\u54AD\u54A5\u54CF"], + ["ce40", "\u54C3\u830D\u54B7\u54AE\u54D6\u54B6\u54C5\u54C6\u54A0\u5470\u54BC\u54A2\u54BE\u5472\u54DE\u54B0\u57B5\u579E\u579F\u57A4\u578C\u5797\u579D\u579B\u5794\u5798\u578F\u5799\u57A5\u579A\u5795\u58F4\u590D\u5953\u59E1\u59DE\u59EE\u5A00\u59F1\u59DD\u59FA\u59FD\u59FC\u59F6\u59E4\u59F2\u59F7\u59DB\u59E9\u59F3\u59F5\u59E0\u59FE\u59F4\u59ED\u5BA8\u5C4C\u5CD0\u5CD8\u5CCC\u5CD7\u5CCB\u5CDB"], + ["cea1", "\u5CDE\u5CDA\u5CC9\u5CC7\u5CCA\u5CD6\u5CD3\u5CD4\u5CCF\u5CC8\u5CC6\u5CCE\u5CDF\u5CF8\u5DF9\u5E21\u5E22\u5E23\u5E20\u5E24\u5EB0\u5EA4\u5EA2\u5E9B\u5EA3\u5EA5\u5F07\u5F2E\u5F56\u5F86\u6037\u6039\u6054\u6072\u605E\u6045\u6053\u6047\u6049\u605B\u604C\u6040\u6042\u605F\u6024\u6044\u6058\u6066\u606E\u6242\u6243\u62CF\u630D\u630B\u62F5\u630E\u6303\u62EB\u62F9\u630F\u630C\u62F8\u62F6\u6300\u6313\u6314\u62FA\u6315\u62FB\u62F0\u6541\u6543\u65AA\u65BF\u6636\u6621\u6632\u6635\u661C\u6626\u6622\u6633\u662B\u663A\u661D\u6634\u6639\u662E\u670F\u6710\u67C1\u67F2\u67C8\u67BA"], + ["cf40", "\u67DC\u67BB\u67F8\u67D8\u67C0\u67B7\u67C5\u67EB\u67E4\u67DF\u67B5\u67CD\u67B3\u67F7\u67F6\u67EE\u67E3\u67C2\u67B9\u67CE\u67E7\u67F0\u67B2\u67FC\u67C6\u67ED\u67CC\u67AE\u67E6\u67DB\u67FA\u67C9\u67CA\u67C3\u67EA\u67CB\u6B28\u6B82\u6B84\u6BB6\u6BD6\u6BD8\u6BE0\u6C20\u6C21\u6D28\u6D34\u6D2D\u6D1F\u6D3C\u6D3F\u6D12\u6D0A\u6CDA\u6D33\u6D04\u6D19\u6D3A\u6D1A\u6D11\u6D00\u6D1D\u6D42"], + ["cfa1", "\u6D01\u6D18\u6D37\u6D03\u6D0F\u6D40\u6D07\u6D20\u6D2C\u6D08\u6D22\u6D09\u6D10\u70B7\u709F\u70BE\u70B1\u70B0\u70A1\u70B4\u70B5\u70A9\u7241\u7249\u724A\u726C\u7270\u7273\u726E\u72CA\u72E4\u72E8\u72EB\u72DF\u72EA\u72E6\u72E3\u7385\u73CC\u73C2\u73C8\u73C5\u73B9\u73B6\u73B5\u73B4\u73EB\u73BF\u73C7\u73BE\u73C3\u73C6\u73B8\u73CB\u74EC\u74EE\u752E\u7547\u7548\u75A7\u75AA\u7679\u76C4\u7708\u7703\u7704\u7705\u770A\u76F7\u76FB\u76FA\u77E7\u77E8\u7806\u7811\u7812\u7805\u7810\u780F\u780E\u7809\u7803\u7813\u794A\u794C\u794B\u7945\u7944\u79D5\u79CD\u79CF\u79D6\u79CE\u7A80"], + ["d040", "\u7A7E\u7AD1\u7B00\u7B01\u7C7A\u7C78\u7C79\u7C7F\u7C80\u7C81\u7D03\u7D08\u7D01\u7F58\u7F91\u7F8D\u7FBE\u8007\u800E\u800F\u8014\u8037\u80D8\u80C7\u80E0\u80D1\u80C8\u80C2\u80D0\u80C5\u80E3\u80D9\u80DC\u80CA\u80D5\u80C9\u80CF\u80D7\u80E6\u80CD\u81FF\u8221\u8294\u82D9\u82FE\u82F9\u8307\u82E8\u8300\u82D5\u833A\u82EB\u82D6\u82F4\u82EC\u82E1\u82F2\u82F5\u830C\u82FB\u82F6\u82F0\u82EA"], + ["d0a1", "\u82E4\u82E0\u82FA\u82F3\u82ED\u8677\u8674\u867C\u8673\u8841\u884E\u8867\u886A\u8869\u89D3\u8A04\u8A07\u8D72\u8FE3\u8FE1\u8FEE\u8FE0\u90F1\u90BD\u90BF\u90D5\u90C5\u90BE\u90C7\u90CB\u90C8\u91D4\u91D3\u9654\u964F\u9651\u9653\u964A\u964E\u501E\u5005\u5007\u5013\u5022\u5030\u501B\u4FF5\u4FF4\u5033\u5037\u502C\u4FF6\u4FF7\u5017\u501C\u5020\u5027\u5035\u502F\u5031\u500E\u515A\u5194\u5193\u51CA\u51C4\u51C5\u51C8\u51CE\u5261\u525A\u5252\u525E\u525F\u5255\u5262\u52CD\u530E\u539E\u5526\u54E2\u5517\u5512\u54E7\u54F3\u54E4\u551A\u54FF\u5504\u5508\u54EB\u5511\u5505\u54F1"], + ["d140", "\u550A\u54FB\u54F7\u54F8\u54E0\u550E\u5503\u550B\u5701\u5702\u57CC\u5832\u57D5\u57D2\u57BA\u57C6\u57BD\u57BC\u57B8\u57B6\u57BF\u57C7\u57D0\u57B9\u57C1\u590E\u594A\u5A19\u5A16\u5A2D\u5A2E\u5A15\u5A0F\u5A17\u5A0A\u5A1E\u5A33\u5B6C\u5BA7\u5BAD\u5BAC\u5C03\u5C56\u5C54\u5CEC\u5CFF\u5CEE\u5CF1\u5CF7\u5D00\u5CF9\u5E29\u5E28\u5EA8\u5EAE\u5EAA\u5EAC\u5F33\u5F30\u5F67\u605D\u605A\u6067"], + ["d1a1", "\u6041\u60A2\u6088\u6080\u6092\u6081\u609D\u6083\u6095\u609B\u6097\u6087\u609C\u608E\u6219\u6246\u62F2\u6310\u6356\u632C\u6344\u6345\u6336\u6343\u63E4\u6339\u634B\u634A\u633C\u6329\u6341\u6334\u6358\u6354\u6359\u632D\u6347\u6333\u635A\u6351\u6338\u6357\u6340\u6348\u654A\u6546\u65C6\u65C3\u65C4\u65C2\u664A\u665F\u6647\u6651\u6712\u6713\u681F\u681A\u6849\u6832\u6833\u683B\u684B\u684F\u6816\u6831\u681C\u6835\u682B\u682D\u682F\u684E\u6844\u6834\u681D\u6812\u6814\u6826\u6828\u682E\u684D\u683A\u6825\u6820\u6B2C\u6B2F\u6B2D\u6B31\u6B34\u6B6D\u8082\u6B88\u6BE6\u6BE4"], + ["d240", "\u6BE8\u6BE3\u6BE2\u6BE7\u6C25\u6D7A\u6D63\u6D64\u6D76\u6D0D\u6D61\u6D92\u6D58\u6D62\u6D6D\u6D6F\u6D91\u6D8D\u6DEF\u6D7F\u6D86\u6D5E\u6D67\u6D60\u6D97\u6D70\u6D7C\u6D5F\u6D82\u6D98\u6D2F\u6D68\u6D8B\u6D7E\u6D80\u6D84\u6D16\u6D83\u6D7B\u6D7D\u6D75\u6D90\u70DC\u70D3\u70D1\u70DD\u70CB\u7F39\u70E2\u70D7\u70D2\u70DE\u70E0\u70D4\u70CD\u70C5\u70C6\u70C7\u70DA\u70CE\u70E1\u7242\u7278"], + ["d2a1", "\u7277\u7276\u7300\u72FA\u72F4\u72FE\u72F6\u72F3\u72FB\u7301\u73D3\u73D9\u73E5\u73D6\u73BC\u73E7\u73E3\u73E9\u73DC\u73D2\u73DB\u73D4\u73DD\u73DA\u73D7\u73D8\u73E8\u74DE\u74DF\u74F4\u74F5\u7521\u755B\u755F\u75B0\u75C1\u75BB\u75C4\u75C0\u75BF\u75B6\u75BA\u768A\u76C9\u771D\u771B\u7710\u7713\u7712\u7723\u7711\u7715\u7719\u771A\u7722\u7727\u7823\u782C\u7822\u7835\u782F\u7828\u782E\u782B\u7821\u7829\u7833\u782A\u7831\u7954\u795B\u794F\u795C\u7953\u7952\u7951\u79EB\u79EC\u79E0\u79EE\u79ED\u79EA\u79DC\u79DE\u79DD\u7A86\u7A89\u7A85\u7A8B\u7A8C\u7A8A\u7A87\u7AD8\u7B10"], + ["d340", "\u7B04\u7B13\u7B05\u7B0F\u7B08\u7B0A\u7B0E\u7B09\u7B12\u7C84\u7C91\u7C8A\u7C8C\u7C88\u7C8D\u7C85\u7D1E\u7D1D\u7D11\u7D0E\u7D18\u7D16\u7D13\u7D1F\u7D12\u7D0F\u7D0C\u7F5C\u7F61\u7F5E\u7F60\u7F5D\u7F5B\u7F96\u7F92\u7FC3\u7FC2\u7FC0\u8016\u803E\u8039\u80FA\u80F2\u80F9\u80F5\u8101\u80FB\u8100\u8201\u822F\u8225\u8333\u832D\u8344\u8319\u8351\u8325\u8356\u833F\u8341\u8326\u831C\u8322"], + ["d3a1", "\u8342\u834E\u831B\u832A\u8308\u833C\u834D\u8316\u8324\u8320\u8337\u832F\u8329\u8347\u8345\u834C\u8353\u831E\u832C\u834B\u8327\u8348\u8653\u8652\u86A2\u86A8\u8696\u868D\u8691\u869E\u8687\u8697\u8686\u868B\u869A\u8685\u86A5\u8699\u86A1\u86A7\u8695\u8698\u868E\u869D\u8690\u8694\u8843\u8844\u886D\u8875\u8876\u8872\u8880\u8871\u887F\u886F\u8883\u887E\u8874\u887C\u8A12\u8C47\u8C57\u8C7B\u8CA4\u8CA3\u8D76\u8D78\u8DB5\u8DB7\u8DB6\u8ED1\u8ED3\u8FFE\u8FF5\u9002\u8FFF\u8FFB\u9004\u8FFC\u8FF6\u90D6\u90E0\u90D9\u90DA\u90E3\u90DF\u90E5\u90D8\u90DB\u90D7\u90DC\u90E4\u9150"], + ["d440", "\u914E\u914F\u91D5\u91E2\u91DA\u965C\u965F\u96BC\u98E3\u9ADF\u9B2F\u4E7F\u5070\u506A\u5061\u505E\u5060\u5053\u504B\u505D\u5072\u5048\u504D\u5041\u505B\u504A\u5062\u5015\u5045\u505F\u5069\u506B\u5063\u5064\u5046\u5040\u506E\u5073\u5057\u5051\u51D0\u526B\u526D\u526C\u526E\u52D6\u52D3\u532D\u539C\u5575\u5576\u553C\u554D\u5550\u5534\u552A\u5551\u5562\u5536\u5535\u5530\u5552\u5545"], + ["d4a1", "\u550C\u5532\u5565\u554E\u5539\u5548\u552D\u553B\u5540\u554B\u570A\u5707\u57FB\u5814\u57E2\u57F6\u57DC\u57F4\u5800\u57ED\u57FD\u5808\u57F8\u580B\u57F3\u57CF\u5807\u57EE\u57E3\u57F2\u57E5\u57EC\u57E1\u580E\u57FC\u5810\u57E7\u5801\u580C\u57F1\u57E9\u57F0\u580D\u5804\u595C\u5A60\u5A58\u5A55\u5A67\u5A5E\u5A38\u5A35\u5A6D\u5A50\u5A5F\u5A65\u5A6C\u5A53\u5A64\u5A57\u5A43\u5A5D\u5A52\u5A44\u5A5B\u5A48\u5A8E\u5A3E\u5A4D\u5A39\u5A4C\u5A70\u5A69\u5A47\u5A51\u5A56\u5A42\u5A5C\u5B72\u5B6E\u5BC1\u5BC0\u5C59\u5D1E\u5D0B\u5D1D\u5D1A\u5D20\u5D0C\u5D28\u5D0D\u5D26\u5D25\u5D0F"], + ["d540", "\u5D30\u5D12\u5D23\u5D1F\u5D2E\u5E3E\u5E34\u5EB1\u5EB4\u5EB9\u5EB2\u5EB3\u5F36\u5F38\u5F9B\u5F96\u5F9F\u608A\u6090\u6086\u60BE\u60B0\u60BA\u60D3\u60D4\u60CF\u60E4\u60D9\u60DD\u60C8\u60B1\u60DB\u60B7\u60CA\u60BF\u60C3\u60CD\u60C0\u6332\u6365\u638A\u6382\u637D\u63BD\u639E\u63AD\u639D\u6397\u63AB\u638E\u636F\u6387\u6390\u636E\u63AF\u6375\u639C\u636D\u63AE\u637C\u63A4\u633B\u639F"], + ["d5a1", "\u6378\u6385\u6381\u6391\u638D\u6370\u6553\u65CD\u6665\u6661\u665B\u6659\u665C\u6662\u6718\u6879\u6887\u6890\u689C\u686D\u686E\u68AE\u68AB\u6956\u686F\u68A3\u68AC\u68A9\u6875\u6874\u68B2\u688F\u6877\u6892\u687C\u686B\u6872\u68AA\u6880\u6871\u687E\u689B\u6896\u688B\u68A0\u6889\u68A4\u6878\u687B\u6891\u688C\u688A\u687D\u6B36\u6B33\u6B37\u6B38\u6B91\u6B8F\u6B8D\u6B8E\u6B8C\u6C2A\u6DC0\u6DAB\u6DB4\u6DB3\u6E74\u6DAC\u6DE9\u6DE2\u6DB7\u6DF6\u6DD4\u6E00\u6DC8\u6DE0\u6DDF\u6DD6\u6DBE\u6DE5\u6DDC\u6DDD\u6DDB\u6DF4\u6DCA\u6DBD\u6DED\u6DF0\u6DBA\u6DD5\u6DC2\u6DCF\u6DC9"], + ["d640", "\u6DD0\u6DF2\u6DD3\u6DFD\u6DD7\u6DCD\u6DE3\u6DBB\u70FA\u710D\u70F7\u7117\u70F4\u710C\u70F0\u7104\u70F3\u7110\u70FC\u70FF\u7106\u7113\u7100\u70F8\u70F6\u710B\u7102\u710E\u727E\u727B\u727C\u727F\u731D\u7317\u7307\u7311\u7318\u730A\u7308\u72FF\u730F\u731E\u7388\u73F6\u73F8\u73F5\u7404\u7401\u73FD\u7407\u7400\u73FA\u73FC\u73FF\u740C\u740B\u73F4\u7408\u7564\u7563\u75CE\u75D2\u75CF"], + ["d6a1", "\u75CB\u75CC\u75D1\u75D0\u768F\u7689\u76D3\u7739\u772F\u772D\u7731\u7732\u7734\u7733\u773D\u7725\u773B\u7735\u7848\u7852\u7849\u784D\u784A\u784C\u7826\u7845\u7850\u7964\u7967\u7969\u796A\u7963\u796B\u7961\u79BB\u79FA\u79F8\u79F6\u79F7\u7A8F\u7A94\u7A90\u7B35\u7B47\u7B34\u7B25\u7B30\u7B22\u7B24\u7B33\u7B18\u7B2A\u7B1D\u7B31\u7B2B\u7B2D\u7B2F\u7B32\u7B38\u7B1A\u7B23\u7C94\u7C98\u7C96\u7CA3\u7D35\u7D3D\u7D38\u7D36\u7D3A\u7D45\u7D2C\u7D29\u7D41\u7D47\u7D3E\u7D3F\u7D4A\u7D3B\u7D28\u7F63\u7F95\u7F9C\u7F9D\u7F9B\u7FCA\u7FCB\u7FCD\u7FD0\u7FD1\u7FC7\u7FCF\u7FC9\u801F"], + ["d740", "\u801E\u801B\u8047\u8043\u8048\u8118\u8125\u8119\u811B\u812D\u811F\u812C\u811E\u8121\u8115\u8127\u811D\u8122\u8211\u8238\u8233\u823A\u8234\u8232\u8274\u8390\u83A3\u83A8\u838D\u837A\u8373\u83A4\u8374\u838F\u8381\u8395\u8399\u8375\u8394\u83A9\u837D\u8383\u838C\u839D\u839B\u83AA\u838B\u837E\u83A5\u83AF\u8388\u8397\u83B0\u837F\u83A6\u8387\u83AE\u8376\u839A\u8659\u8656\u86BF\u86B7"], + ["d7a1", "\u86C2\u86C1\u86C5\u86BA\u86B0\u86C8\u86B9\u86B3\u86B8\u86CC\u86B4\u86BB\u86BC\u86C3\u86BD\u86BE\u8852\u8889\u8895\u88A8\u88A2\u88AA\u889A\u8891\u88A1\u889F\u8898\u88A7\u8899\u889B\u8897\u88A4\u88AC\u888C\u8893\u888E\u8982\u89D6\u89D9\u89D5\u8A30\u8A27\u8A2C\u8A1E\u8C39\u8C3B\u8C5C\u8C5D\u8C7D\u8CA5\u8D7D\u8D7B\u8D79\u8DBC\u8DC2\u8DB9\u8DBF\u8DC1\u8ED8\u8EDE\u8EDD\u8EDC\u8ED7\u8EE0\u8EE1\u9024\u900B\u9011\u901C\u900C\u9021\u90EF\u90EA\u90F0\u90F4\u90F2\u90F3\u90D4\u90EB\u90EC\u90E9\u9156\u9158\u915A\u9153\u9155\u91EC\u91F4\u91F1\u91F3\u91F8\u91E4\u91F9\u91EA"], + ["d840", "\u91EB\u91F7\u91E8\u91EE\u957A\u9586\u9588\u967C\u966D\u966B\u9671\u966F\u96BF\u976A\u9804\u98E5\u9997\u509B\u5095\u5094\u509E\u508B\u50A3\u5083\u508C\u508E\u509D\u5068\u509C\u5092\u5082\u5087\u515F\u51D4\u5312\u5311\u53A4\u53A7\u5591\u55A8\u55A5\u55AD\u5577\u5645\u55A2\u5593\u5588\u558F\u55B5\u5581\u55A3\u5592\u55A4\u557D\u558C\u55A6\u557F\u5595\u55A1\u558E\u570C\u5829\u5837"], + ["d8a1", "\u5819\u581E\u5827\u5823\u5828\u57F5\u5848\u5825\u581C\u581B\u5833\u583F\u5836\u582E\u5839\u5838\u582D\u582C\u583B\u5961\u5AAF\u5A94\u5A9F\u5A7A\u5AA2\u5A9E\u5A78\u5AA6\u5A7C\u5AA5\u5AAC\u5A95\u5AAE\u5A37\u5A84\u5A8A\u5A97\u5A83\u5A8B\u5AA9\u5A7B\u5A7D\u5A8C\u5A9C\u5A8F\u5A93\u5A9D\u5BEA\u5BCD\u5BCB\u5BD4\u5BD1\u5BCA\u5BCE\u5C0C\u5C30\u5D37\u5D43\u5D6B\u5D41\u5D4B\u5D3F\u5D35\u5D51\u5D4E\u5D55\u5D33\u5D3A\u5D52\u5D3D\u5D31\u5D59\u5D42\u5D39\u5D49\u5D38\u5D3C\u5D32\u5D36\u5D40\u5D45\u5E44\u5E41\u5F58\u5FA6\u5FA5\u5FAB\u60C9\u60B9\u60CC\u60E2\u60CE\u60C4\u6114"], + ["d940", "\u60F2\u610A\u6116\u6105\u60F5\u6113\u60F8\u60FC\u60FE\u60C1\u6103\u6118\u611D\u6110\u60FF\u6104\u610B\u624A\u6394\u63B1\u63B0\u63CE\u63E5\u63E8\u63EF\u63C3\u649D\u63F3\u63CA\u63E0\u63F6\u63D5\u63F2\u63F5\u6461\u63DF\u63BE\u63DD\u63DC\u63C4\u63D8\u63D3\u63C2\u63C7\u63CC\u63CB\u63C8\u63F0\u63D7\u63D9\u6532\u6567\u656A\u6564\u655C\u6568\u6565\u658C\u659D\u659E\u65AE\u65D0\u65D2"], + ["d9a1", "\u667C\u666C\u667B\u6680\u6671\u6679\u666A\u6672\u6701\u690C\u68D3\u6904\u68DC\u692A\u68EC\u68EA\u68F1\u690F\u68D6\u68F7\u68EB\u68E4\u68F6\u6913\u6910\u68F3\u68E1\u6907\u68CC\u6908\u6970\u68B4\u6911\u68EF\u68C6\u6914\u68F8\u68D0\u68FD\u68FC\u68E8\u690B\u690A\u6917\u68CE\u68C8\u68DD\u68DE\u68E6\u68F4\u68D1\u6906\u68D4\u68E9\u6915\u6925\u68C7\u6B39\u6B3B\u6B3F\u6B3C\u6B94\u6B97\u6B99\u6B95\u6BBD\u6BF0\u6BF2\u6BF3\u6C30\u6DFC\u6E46\u6E47\u6E1F\u6E49\u6E88\u6E3C\u6E3D\u6E45\u6E62\u6E2B\u6E3F\u6E41\u6E5D\u6E73\u6E1C\u6E33\u6E4B\u6E40\u6E51\u6E3B\u6E03\u6E2E\u6E5E"], + ["da40", "\u6E68\u6E5C\u6E61\u6E31\u6E28\u6E60\u6E71\u6E6B\u6E39\u6E22\u6E30\u6E53\u6E65\u6E27\u6E78\u6E64\u6E77\u6E55\u6E79\u6E52\u6E66\u6E35\u6E36\u6E5A\u7120\u711E\u712F\u70FB\u712E\u7131\u7123\u7125\u7122\u7132\u711F\u7128\u713A\u711B\u724B\u725A\u7288\u7289\u7286\u7285\u728B\u7312\u730B\u7330\u7322\u7331\u7333\u7327\u7332\u732D\u7326\u7323\u7335\u730C\u742E\u742C\u7430\u742B\u7416"], + ["daa1", "\u741A\u7421\u742D\u7431\u7424\u7423\u741D\u7429\u7420\u7432\u74FB\u752F\u756F\u756C\u75E7\u75DA\u75E1\u75E6\u75DD\u75DF\u75E4\u75D7\u7695\u7692\u76DA\u7746\u7747\u7744\u774D\u7745\u774A\u774E\u774B\u774C\u77DE\u77EC\u7860\u7864\u7865\u785C\u786D\u7871\u786A\u786E\u7870\u7869\u7868\u785E\u7862\u7974\u7973\u7972\u7970\u7A02\u7A0A\u7A03\u7A0C\u7A04\u7A99\u7AE6\u7AE4\u7B4A\u7B3B\u7B44\u7B48\u7B4C\u7B4E\u7B40\u7B58\u7B45\u7CA2\u7C9E\u7CA8\u7CA1\u7D58\u7D6F\u7D63\u7D53\u7D56\u7D67\u7D6A\u7D4F\u7D6D\u7D5C\u7D6B\u7D52\u7D54\u7D69\u7D51\u7D5F\u7D4E\u7F3E\u7F3F\u7F65"], + ["db40", "\u7F66\u7FA2\u7FA0\u7FA1\u7FD7\u8051\u804F\u8050\u80FE\u80D4\u8143\u814A\u8152\u814F\u8147\u813D\u814D\u813A\u81E6\u81EE\u81F7\u81F8\u81F9\u8204\u823C\u823D\u823F\u8275\u833B\u83CF\u83F9\u8423\u83C0\u83E8\u8412\u83E7\u83E4\u83FC\u83F6\u8410\u83C6\u83C8\u83EB\u83E3\u83BF\u8401\u83DD\u83E5\u83D8\u83FF\u83E1\u83CB\u83CE\u83D6\u83F5\u83C9\u8409\u840F\u83DE\u8411\u8406\u83C2\u83F3"], + ["dba1", "\u83D5\u83FA\u83C7\u83D1\u83EA\u8413\u83C3\u83EC\u83EE\u83C4\u83FB\u83D7\u83E2\u841B\u83DB\u83FE\u86D8\u86E2\u86E6\u86D3\u86E3\u86DA\u86EA\u86DD\u86EB\u86DC\u86EC\u86E9\u86D7\u86E8\u86D1\u8848\u8856\u8855\u88BA\u88D7\u88B9\u88B8\u88C0\u88BE\u88B6\u88BC\u88B7\u88BD\u88B2\u8901\u88C9\u8995\u8998\u8997\u89DD\u89DA\u89DB\u8A4E\u8A4D\u8A39\u8A59\u8A40\u8A57\u8A58\u8A44\u8A45\u8A52\u8A48\u8A51\u8A4A\u8A4C\u8A4F\u8C5F\u8C81\u8C80\u8CBA\u8CBE\u8CB0\u8CB9\u8CB5\u8D84\u8D80\u8D89\u8DD8\u8DD3\u8DCD\u8DC7\u8DD6\u8DDC\u8DCF\u8DD5\u8DD9\u8DC8\u8DD7\u8DC5\u8EEF\u8EF7\u8EFA"], + ["dc40", "\u8EF9\u8EE6\u8EEE\u8EE5\u8EF5\u8EE7\u8EE8\u8EF6\u8EEB\u8EF1\u8EEC\u8EF4\u8EE9\u902D\u9034\u902F\u9106\u912C\u9104\u90FF\u90FC\u9108\u90F9\u90FB\u9101\u9100\u9107\u9105\u9103\u9161\u9164\u915F\u9162\u9160\u9201\u920A\u9225\u9203\u921A\u9226\u920F\u920C\u9200\u9212\u91FF\u91FD\u9206\u9204\u9227\u9202\u921C\u9224\u9219\u9217\u9205\u9216\u957B\u958D\u958C\u9590\u9687\u967E\u9688"], + ["dca1", "\u9689\u9683\u9680\u96C2\u96C8\u96C3\u96F1\u96F0\u976C\u9770\u976E\u9807\u98A9\u98EB\u9CE6\u9EF9\u4E83\u4E84\u4EB6\u50BD\u50BF\u50C6\u50AE\u50C4\u50CA\u50B4\u50C8\u50C2\u50B0\u50C1\u50BA\u50B1\u50CB\u50C9\u50B6\u50B8\u51D7\u527A\u5278\u527B\u527C\u55C3\u55DB\u55CC\u55D0\u55CB\u55CA\u55DD\u55C0\u55D4\u55C4\u55E9\u55BF\u55D2\u558D\u55CF\u55D5\u55E2\u55D6\u55C8\u55F2\u55CD\u55D9\u55C2\u5714\u5853\u5868\u5864\u584F\u584D\u5849\u586F\u5855\u584E\u585D\u5859\u5865\u585B\u583D\u5863\u5871\u58FC\u5AC7\u5AC4\u5ACB\u5ABA\u5AB8\u5AB1\u5AB5\u5AB0\u5ABF\u5AC8\u5ABB\u5AC6"], + ["dd40", "\u5AB7\u5AC0\u5ACA\u5AB4\u5AB6\u5ACD\u5AB9\u5A90\u5BD6\u5BD8\u5BD9\u5C1F\u5C33\u5D71\u5D63\u5D4A\u5D65\u5D72\u5D6C\u5D5E\u5D68\u5D67\u5D62\u5DF0\u5E4F\u5E4E\u5E4A\u5E4D\u5E4B\u5EC5\u5ECC\u5EC6\u5ECB\u5EC7\u5F40\u5FAF\u5FAD\u60F7\u6149\u614A\u612B\u6145\u6136\u6132\u612E\u6146\u612F\u614F\u6129\u6140\u6220\u9168\u6223\u6225\u6224\u63C5\u63F1\u63EB\u6410\u6412\u6409\u6420\u6424"], + ["dda1", "\u6433\u6443\u641F\u6415\u6418\u6439\u6437\u6422\u6423\u640C\u6426\u6430\u6428\u6441\u6435\u642F\u640A\u641A\u6440\u6425\u6427\u640B\u63E7\u641B\u642E\u6421\u640E\u656F\u6592\u65D3\u6686\u668C\u6695\u6690\u668B\u668A\u6699\u6694\u6678\u6720\u6966\u695F\u6938\u694E\u6962\u6971\u693F\u6945\u696A\u6939\u6942\u6957\u6959\u697A\u6948\u6949\u6935\u696C\u6933\u693D\u6965\u68F0\u6978\u6934\u6969\u6940\u696F\u6944\u6976\u6958\u6941\u6974\u694C\u693B\u694B\u6937\u695C\u694F\u6951\u6932\u6952\u692F\u697B\u693C\u6B46\u6B45\u6B43\u6B42\u6B48\u6B41\u6B9B\uFA0D\u6BFB\u6BFC"], + ["de40", "\u6BF9\u6BF7\u6BF8\u6E9B\u6ED6\u6EC8\u6E8F\u6EC0\u6E9F\u6E93\u6E94\u6EA0\u6EB1\u6EB9\u6EC6\u6ED2\u6EBD\u6EC1\u6E9E\u6EC9\u6EB7\u6EB0\u6ECD\u6EA6\u6ECF\u6EB2\u6EBE\u6EC3\u6EDC\u6ED8\u6E99\u6E92\u6E8E\u6E8D\u6EA4\u6EA1\u6EBF\u6EB3\u6ED0\u6ECA\u6E97\u6EAE\u6EA3\u7147\u7154\u7152\u7163\u7160\u7141\u715D\u7162\u7172\u7178\u716A\u7161\u7142\u7158\u7143\u714B\u7170\u715F\u7150\u7153"], + ["dea1", "\u7144\u714D\u715A\u724F\u728D\u728C\u7291\u7290\u728E\u733C\u7342\u733B\u733A\u7340\u734A\u7349\u7444\u744A\u744B\u7452\u7451\u7457\u7440\u744F\u7450\u744E\u7442\u7446\u744D\u7454\u74E1\u74FF\u74FE\u74FD\u751D\u7579\u7577\u6983\u75EF\u760F\u7603\u75F7\u75FE\u75FC\u75F9\u75F8\u7610\u75FB\u75F6\u75ED\u75F5\u75FD\u7699\u76B5\u76DD\u7755\u775F\u7760\u7752\u7756\u775A\u7769\u7767\u7754\u7759\u776D\u77E0\u7887\u789A\u7894\u788F\u7884\u7895\u7885\u7886\u78A1\u7883\u7879\u7899\u7880\u7896\u787B\u797C\u7982\u797D\u7979\u7A11\u7A18\u7A19\u7A12\u7A17\u7A15\u7A22\u7A13"], + ["df40", "\u7A1B\u7A10\u7AA3\u7AA2\u7A9E\u7AEB\u7B66\u7B64\u7B6D\u7B74\u7B69\u7B72\u7B65\u7B73\u7B71\u7B70\u7B61\u7B78\u7B76\u7B63\u7CB2\u7CB4\u7CAF\u7D88\u7D86\u7D80\u7D8D\u7D7F\u7D85\u7D7A\u7D8E\u7D7B\u7D83\u7D7C\u7D8C\u7D94\u7D84\u7D7D\u7D92\u7F6D\u7F6B\u7F67\u7F68\u7F6C\u7FA6\u7FA5\u7FA7\u7FDB\u7FDC\u8021\u8164\u8160\u8177\u815C\u8169\u815B\u8162\u8172\u6721\u815E\u8176\u8167\u816F"], + ["dfa1", "\u8144\u8161\u821D\u8249\u8244\u8240\u8242\u8245\u84F1\u843F\u8456\u8476\u8479\u848F\u848D\u8465\u8451\u8440\u8486\u8467\u8430\u844D\u847D\u845A\u8459\u8474\u8473\u845D\u8507\u845E\u8437\u843A\u8434\u847A\u8443\u8478\u8432\u8445\u8429\u83D9\u844B\u842F\u8442\u842D\u845F\u8470\u8439\u844E\u844C\u8452\u846F\u84C5\u848E\u843B\u8447\u8436\u8433\u8468\u847E\u8444\u842B\u8460\u8454\u846E\u8450\u870B\u8704\u86F7\u870C\u86FA\u86D6\u86F5\u874D\u86F8\u870E\u8709\u8701\u86F6\u870D\u8705\u88D6\u88CB\u88CD\u88CE\u88DE\u88DB\u88DA\u88CC\u88D0\u8985\u899B\u89DF\u89E5\u89E4"], + ["e040", "\u89E1\u89E0\u89E2\u89DC\u89E6\u8A76\u8A86\u8A7F\u8A61\u8A3F\u8A77\u8A82\u8A84\u8A75\u8A83\u8A81\u8A74\u8A7A\u8C3C\u8C4B\u8C4A\u8C65\u8C64\u8C66\u8C86\u8C84\u8C85\u8CCC\u8D68\u8D69\u8D91\u8D8C\u8D8E\u8D8F\u8D8D\u8D93\u8D94\u8D90\u8D92\u8DF0\u8DE0\u8DEC\u8DF1\u8DEE\u8DD0\u8DE9\u8DE3\u8DE2\u8DE7\u8DF2\u8DEB\u8DF4\u8F06\u8EFF\u8F01\u8F00\u8F05\u8F07\u8F08\u8F02\u8F0B\u9052\u903F"], + ["e0a1", "\u9044\u9049\u903D\u9110\u910D\u910F\u9111\u9116\u9114\u910B\u910E\u916E\u916F\u9248\u9252\u9230\u923A\u9266\u9233\u9265\u925E\u9283\u922E\u924A\u9246\u926D\u926C\u924F\u9260\u9267\u926F\u9236\u9261\u9270\u9231\u9254\u9263\u9250\u9272\u924E\u9253\u924C\u9256\u9232\u959F\u959C\u959E\u959B\u9692\u9693\u9691\u9697\u96CE\u96FA\u96FD\u96F8\u96F5\u9773\u9777\u9778\u9772\u980F\u980D\u980E\u98AC\u98F6\u98F9\u99AF\u99B2\u99B0\u99B5\u9AAD\u9AAB\u9B5B\u9CEA\u9CED\u9CE7\u9E80\u9EFD\u50E6\u50D4\u50D7\u50E8\u50F3\u50DB\u50EA\u50DD\u50E4\u50D3\u50EC\u50F0\u50EF\u50E3\u50E0"], + ["e140", "\u51D8\u5280\u5281\u52E9\u52EB\u5330\u53AC\u5627\u5615\u560C\u5612\u55FC\u560F\u561C\u5601\u5613\u5602\u55FA\u561D\u5604\u55FF\u55F9\u5889\u587C\u5890\u5898\u5886\u5881\u587F\u5874\u588B\u587A\u5887\u5891\u588E\u5876\u5882\u5888\u587B\u5894\u588F\u58FE\u596B\u5ADC\u5AEE\u5AE5\u5AD5\u5AEA\u5ADA\u5AED\u5AEB\u5AF3\u5AE2\u5AE0\u5ADB\u5AEC\u5ADE\u5ADD\u5AD9\u5AE8\u5ADF\u5B77\u5BE0"], + ["e1a1", "\u5BE3\u5C63\u5D82\u5D80\u5D7D\u5D86\u5D7A\u5D81\u5D77\u5D8A\u5D89\u5D88\u5D7E\u5D7C\u5D8D\u5D79\u5D7F\u5E58\u5E59\u5E53\u5ED8\u5ED1\u5ED7\u5ECE\u5EDC\u5ED5\u5ED9\u5ED2\u5ED4\u5F44\u5F43\u5F6F\u5FB6\u612C\u6128\u6141\u615E\u6171\u6173\u6152\u6153\u6172\u616C\u6180\u6174\u6154\u617A\u615B\u6165\u613B\u616A\u6161\u6156\u6229\u6227\u622B\u642B\u644D\u645B\u645D\u6474\u6476\u6472\u6473\u647D\u6475\u6466\u64A6\u644E\u6482\u645E\u645C\u644B\u6453\u6460\u6450\u647F\u643F\u646C\u646B\u6459\u6465\u6477\u6573\u65A0\u66A1\u66A0\u669F\u6705\u6704\u6722\u69B1\u69B6\u69C9"], + ["e240", "\u69A0\u69CE\u6996\u69B0\u69AC\u69BC\u6991\u6999\u698E\u69A7\u698D\u69A9\u69BE\u69AF\u69BF\u69C4\u69BD\u69A4\u69D4\u69B9\u69CA\u699A\u69CF\u69B3\u6993\u69AA\u69A1\u699E\u69D9\u6997\u6990\u69C2\u69B5\u69A5\u69C6\u6B4A\u6B4D\u6B4B\u6B9E\u6B9F\u6BA0\u6BC3\u6BC4\u6BFE\u6ECE\u6EF5\u6EF1\u6F03\u6F25\u6EF8\u6F37\u6EFB\u6F2E\u6F09\u6F4E\u6F19\u6F1A\u6F27\u6F18\u6F3B\u6F12\u6EED\u6F0A"], + ["e2a1", "\u6F36\u6F73\u6EF9\u6EEE\u6F2D\u6F40\u6F30\u6F3C\u6F35\u6EEB\u6F07\u6F0E\u6F43\u6F05\u6EFD\u6EF6\u6F39\u6F1C\u6EFC\u6F3A\u6F1F\u6F0D\u6F1E\u6F08\u6F21\u7187\u7190\u7189\u7180\u7185\u7182\u718F\u717B\u7186\u7181\u7197\u7244\u7253\u7297\u7295\u7293\u7343\u734D\u7351\u734C\u7462\u7473\u7471\u7475\u7472\u7467\u746E\u7500\u7502\u7503\u757D\u7590\u7616\u7608\u760C\u7615\u7611\u760A\u7614\u76B8\u7781\u777C\u7785\u7782\u776E\u7780\u776F\u777E\u7783\u78B2\u78AA\u78B4\u78AD\u78A8\u787E\u78AB\u789E\u78A5\u78A0\u78AC\u78A2\u78A4\u7998\u798A\u798B\u7996\u7995\u7994\u7993"], + ["e340", "\u7997\u7988\u7992\u7990\u7A2B\u7A4A\u7A30\u7A2F\u7A28\u7A26\u7AA8\u7AAB\u7AAC\u7AEE\u7B88\u7B9C\u7B8A\u7B91\u7B90\u7B96\u7B8D\u7B8C\u7B9B\u7B8E\u7B85\u7B98\u5284\u7B99\u7BA4\u7B82\u7CBB\u7CBF\u7CBC\u7CBA\u7DA7\u7DB7\u7DC2\u7DA3\u7DAA\u7DC1\u7DC0\u7DC5\u7D9D\u7DCE\u7DC4\u7DC6\u7DCB\u7DCC\u7DAF\u7DB9\u7D96\u7DBC\u7D9F\u7DA6\u7DAE\u7DA9\u7DA1\u7DC9\u7F73\u7FE2\u7FE3\u7FE5\u7FDE"], + ["e3a1", "\u8024\u805D\u805C\u8189\u8186\u8183\u8187\u818D\u818C\u818B\u8215\u8497\u84A4\u84A1\u849F\u84BA\u84CE\u84C2\u84AC\u84AE\u84AB\u84B9\u84B4\u84C1\u84CD\u84AA\u849A\u84B1\u84D0\u849D\u84A7\u84BB\u84A2\u8494\u84C7\u84CC\u849B\u84A9\u84AF\u84A8\u84D6\u8498\u84B6\u84CF\u84A0\u84D7\u84D4\u84D2\u84DB\u84B0\u8491\u8661\u8733\u8723\u8728\u876B\u8740\u872E\u871E\u8721\u8719\u871B\u8743\u872C\u8741\u873E\u8746\u8720\u8732\u872A\u872D\u873C\u8712\u873A\u8731\u8735\u8742\u8726\u8727\u8738\u8724\u871A\u8730\u8711\u88F7\u88E7\u88F1\u88F2\u88FA\u88FE\u88EE\u88FC\u88F6\u88FB"], + ["e440", "\u88F0\u88EC\u88EB\u899D\u89A1\u899F\u899E\u89E9\u89EB\u89E8\u8AAB\u8A99\u8A8B\u8A92\u8A8F\u8A96\u8C3D\u8C68\u8C69\u8CD5\u8CCF\u8CD7\u8D96\u8E09\u8E02\u8DFF\u8E0D\u8DFD\u8E0A\u8E03\u8E07\u8E06\u8E05\u8DFE\u8E00\u8E04\u8F10\u8F11\u8F0E\u8F0D\u9123\u911C\u9120\u9122\u911F\u911D\u911A\u9124\u9121\u911B\u917A\u9172\u9179\u9173\u92A5\u92A4\u9276\u929B\u927A\u92A0\u9294\u92AA\u928D"], + ["e4a1", "\u92A6\u929A\u92AB\u9279\u9297\u927F\u92A3\u92EE\u928E\u9282\u9295\u92A2\u927D\u9288\u92A1\u928A\u9286\u928C\u9299\u92A7\u927E\u9287\u92A9\u929D\u928B\u922D\u969E\u96A1\u96FF\u9758\u977D\u977A\u977E\u9783\u9780\u9782\u977B\u9784\u9781\u977F\u97CE\u97CD\u9816\u98AD\u98AE\u9902\u9900\u9907\u999D\u999C\u99C3\u99B9\u99BB\u99BA\u99C2\u99BD\u99C7\u9AB1\u9AE3\u9AE7\u9B3E\u9B3F\u9B60\u9B61\u9B5F\u9CF1\u9CF2\u9CF5\u9EA7\u50FF\u5103\u5130\u50F8\u5106\u5107\u50F6\u50FE\u510B\u510C\u50FD\u510A\u528B\u528C\u52F1\u52EF\u5648\u5642\u564C\u5635\u5641\u564A\u5649\u5646\u5658"], + ["e540", "\u565A\u5640\u5633\u563D\u562C\u563E\u5638\u562A\u563A\u571A\u58AB\u589D\u58B1\u58A0\u58A3\u58AF\u58AC\u58A5\u58A1\u58FF\u5AFF\u5AF4\u5AFD\u5AF7\u5AF6\u5B03\u5AF8\u5B02\u5AF9\u5B01\u5B07\u5B05\u5B0F\u5C67\u5D99\u5D97\u5D9F\u5D92\u5DA2\u5D93\u5D95\u5DA0\u5D9C\u5DA1\u5D9A\u5D9E\u5E69\u5E5D\u5E60\u5E5C\u7DF3\u5EDB\u5EDE\u5EE1\u5F49\u5FB2\u618B\u6183\u6179\u61B1\u61B0\u61A2\u6189"], + ["e5a1", "\u619B\u6193\u61AF\u61AD\u619F\u6192\u61AA\u61A1\u618D\u6166\u61B3\u622D\u646E\u6470\u6496\u64A0\u6485\u6497\u649C\u648F\u648B\u648A\u648C\u64A3\u649F\u6468\u64B1\u6498\u6576\u657A\u6579\u657B\u65B2\u65B3\u66B5\u66B0\u66A9\u66B2\u66B7\u66AA\u66AF\u6A00\u6A06\u6A17\u69E5\u69F8\u6A15\u69F1\u69E4\u6A20\u69FF\u69EC\u69E2\u6A1B\u6A1D\u69FE\u6A27\u69F2\u69EE\u6A14\u69F7\u69E7\u6A40\u6A08\u69E6\u69FB\u6A0D\u69FC\u69EB\u6A09\u6A04\u6A18\u6A25\u6A0F\u69F6\u6A26\u6A07\u69F4\u6A16\u6B51\u6BA5\u6BA3\u6BA2\u6BA6\u6C01\u6C00\u6BFF\u6C02\u6F41\u6F26\u6F7E\u6F87\u6FC6\u6F92"], + ["e640", "\u6F8D\u6F89\u6F8C\u6F62\u6F4F\u6F85\u6F5A\u6F96\u6F76\u6F6C\u6F82\u6F55\u6F72\u6F52\u6F50\u6F57\u6F94\u6F93\u6F5D\u6F00\u6F61\u6F6B\u6F7D\u6F67\u6F90\u6F53\u6F8B\u6F69\u6F7F\u6F95\u6F63\u6F77\u6F6A\u6F7B\u71B2\u71AF\u719B\u71B0\u71A0\u719A\u71A9\u71B5\u719D\u71A5\u719E\u71A4\u71A1\u71AA\u719C\u71A7\u71B3\u7298\u729A\u7358\u7352\u735E\u735F\u7360\u735D\u735B\u7361\u735A\u7359"], + ["e6a1", "\u7362\u7487\u7489\u748A\u7486\u7481\u747D\u7485\u7488\u747C\u7479\u7508\u7507\u757E\u7625\u761E\u7619\u761D\u761C\u7623\u761A\u7628\u761B\u769C\u769D\u769E\u769B\u778D\u778F\u7789\u7788\u78CD\u78BB\u78CF\u78CC\u78D1\u78CE\u78D4\u78C8\u78C3\u78C4\u78C9\u799A\u79A1\u79A0\u799C\u79A2\u799B\u6B76\u7A39\u7AB2\u7AB4\u7AB3\u7BB7\u7BCB\u7BBE\u7BAC\u7BCE\u7BAF\u7BB9\u7BCA\u7BB5\u7CC5\u7CC8\u7CCC\u7CCB\u7DF7\u7DDB\u7DEA\u7DE7\u7DD7\u7DE1\u7E03\u7DFA\u7DE6\u7DF6\u7DF1\u7DF0\u7DEE\u7DDF\u7F76\u7FAC\u7FB0\u7FAD\u7FED\u7FEB\u7FEA\u7FEC\u7FE6\u7FE8\u8064\u8067\u81A3\u819F"], + ["e740", "\u819E\u8195\u81A2\u8199\u8197\u8216\u824F\u8253\u8252\u8250\u824E\u8251\u8524\u853B\u850F\u8500\u8529\u850E\u8509\u850D\u851F\u850A\u8527\u851C\u84FB\u852B\u84FA\u8508\u850C\u84F4\u852A\u84F2\u8515\u84F7\u84EB\u84F3\u84FC\u8512\u84EA\u84E9\u8516\u84FE\u8528\u851D\u852E\u8502\u84FD\u851E\u84F6\u8531\u8526\u84E7\u84E8\u84F0\u84EF\u84F9\u8518\u8520\u8530\u850B\u8519\u852F\u8662"], + ["e7a1", "\u8756\u8763\u8764\u8777\u87E1\u8773\u8758\u8754\u875B\u8752\u8761\u875A\u8751\u875E\u876D\u876A\u8750\u874E\u875F\u875D\u876F\u876C\u877A\u876E\u875C\u8765\u874F\u877B\u8775\u8762\u8767\u8769\u885A\u8905\u890C\u8914\u890B\u8917\u8918\u8919\u8906\u8916\u8911\u890E\u8909\u89A2\u89A4\u89A3\u89ED\u89F0\u89EC\u8ACF\u8AC6\u8AB8\u8AD3\u8AD1\u8AD4\u8AD5\u8ABB\u8AD7\u8ABE\u8AC0\u8AC5\u8AD8\u8AC3\u8ABA\u8ABD\u8AD9\u8C3E\u8C4D\u8C8F\u8CE5\u8CDF\u8CD9\u8CE8\u8CDA\u8CDD\u8CE7\u8DA0\u8D9C\u8DA1\u8D9B\u8E20\u8E23\u8E25\u8E24\u8E2E\u8E15\u8E1B\u8E16\u8E11\u8E19\u8E26\u8E27"], + ["e840", "\u8E14\u8E12\u8E18\u8E13\u8E1C\u8E17\u8E1A\u8F2C\u8F24\u8F18\u8F1A\u8F20\u8F23\u8F16\u8F17\u9073\u9070\u906F\u9067\u906B\u912F\u912B\u9129\u912A\u9132\u9126\u912E\u9185\u9186\u918A\u9181\u9182\u9184\u9180\u92D0\u92C3\u92C4\u92C0\u92D9\u92B6\u92CF\u92F1\u92DF\u92D8\u92E9\u92D7\u92DD\u92CC\u92EF\u92C2\u92E8\u92CA\u92C8\u92CE\u92E6\u92CD\u92D5\u92C9\u92E0\u92DE\u92E7\u92D1\u92D3"], + ["e8a1", "\u92B5\u92E1\u92C6\u92B4\u957C\u95AC\u95AB\u95AE\u95B0\u96A4\u96A2\u96D3\u9705\u9708\u9702\u975A\u978A\u978E\u9788\u97D0\u97CF\u981E\u981D\u9826\u9829\u9828\u9820\u981B\u9827\u98B2\u9908\u98FA\u9911\u9914\u9916\u9917\u9915\u99DC\u99CD\u99CF\u99D3\u99D4\u99CE\u99C9\u99D6\u99D8\u99CB\u99D7\u99CC\u9AB3\u9AEC\u9AEB\u9AF3\u9AF2\u9AF1\u9B46\u9B43\u9B67\u9B74\u9B71\u9B66\u9B76\u9B75\u9B70\u9B68\u9B64\u9B6C\u9CFC\u9CFA\u9CFD\u9CFF\u9CF7\u9D07\u9D00\u9CF9\u9CFB\u9D08\u9D05\u9D04\u9E83\u9ED3\u9F0F\u9F10\u511C\u5113\u5117\u511A\u5111\u51DE\u5334\u53E1\u5670\u5660\u566E"], + ["e940", "\u5673\u5666\u5663\u566D\u5672\u565E\u5677\u571C\u571B\u58C8\u58BD\u58C9\u58BF\u58BA\u58C2\u58BC\u58C6\u5B17\u5B19\u5B1B\u5B21\u5B14\u5B13\u5B10\u5B16\u5B28\u5B1A\u5B20\u5B1E\u5BEF\u5DAC\u5DB1\u5DA9\u5DA7\u5DB5\u5DB0\u5DAE\u5DAA\u5DA8\u5DB2\u5DAD\u5DAF\u5DB4\u5E67\u5E68\u5E66\u5E6F\u5EE9\u5EE7\u5EE6\u5EE8\u5EE5\u5F4B\u5FBC\u619D\u61A8\u6196\u61C5\u61B4\u61C6\u61C1\u61CC\u61BA"], + ["e9a1", "\u61BF\u61B8\u618C\u64D7\u64D6\u64D0\u64CF\u64C9\u64BD\u6489\u64C3\u64DB\u64F3\u64D9\u6533\u657F\u657C\u65A2\u66C8\u66BE\u66C0\u66CA\u66CB\u66CF\u66BD\u66BB\u66BA\u66CC\u6723\u6A34\u6A66\u6A49\u6A67\u6A32\u6A68\u6A3E\u6A5D\u6A6D\u6A76\u6A5B\u6A51\u6A28\u6A5A\u6A3B\u6A3F\u6A41\u6A6A\u6A64\u6A50\u6A4F\u6A54\u6A6F\u6A69\u6A60\u6A3C\u6A5E\u6A56\u6A55\u6A4D\u6A4E\u6A46\u6B55\u6B54\u6B56\u6BA7\u6BAA\u6BAB\u6BC8\u6BC7\u6C04\u6C03\u6C06\u6FAD\u6FCB\u6FA3\u6FC7\u6FBC\u6FCE\u6FC8\u6F5E\u6FC4\u6FBD\u6F9E\u6FCA\u6FA8\u7004\u6FA5\u6FAE\u6FBA\u6FAC\u6FAA\u6FCF\u6FBF\u6FB8"], + ["ea40", "\u6FA2\u6FC9\u6FAB\u6FCD\u6FAF\u6FB2\u6FB0\u71C5\u71C2\u71BF\u71B8\u71D6\u71C0\u71C1\u71CB\u71D4\u71CA\u71C7\u71CF\u71BD\u71D8\u71BC\u71C6\u71DA\u71DB\u729D\u729E\u7369\u7366\u7367\u736C\u7365\u736B\u736A\u747F\u749A\u74A0\u7494\u7492\u7495\u74A1\u750B\u7580\u762F\u762D\u7631\u763D\u7633\u763C\u7635\u7632\u7630\u76BB\u76E6\u779A\u779D\u77A1\u779C\u779B\u77A2\u77A3\u7795\u7799"], + ["eaa1", "\u7797\u78DD\u78E9\u78E5\u78EA\u78DE\u78E3\u78DB\u78E1\u78E2\u78ED\u78DF\u78E0\u79A4\u7A44\u7A48\u7A47\u7AB6\u7AB8\u7AB5\u7AB1\u7AB7\u7BDE\u7BE3\u7BE7\u7BDD\u7BD5\u7BE5\u7BDA\u7BE8\u7BF9\u7BD4\u7BEA\u7BE2\u7BDC\u7BEB\u7BD8\u7BDF\u7CD2\u7CD4\u7CD7\u7CD0\u7CD1\u7E12\u7E21\u7E17\u7E0C\u7E1F\u7E20\u7E13\u7E0E\u7E1C\u7E15\u7E1A\u7E22\u7E0B\u7E0F\u7E16\u7E0D\u7E14\u7E25\u7E24\u7F43\u7F7B\u7F7C\u7F7A\u7FB1\u7FEF\u802A\u8029\u806C\u81B1\u81A6\u81AE\u81B9\u81B5\u81AB\u81B0\u81AC\u81B4\u81B2\u81B7\u81A7\u81F2\u8255\u8256\u8257\u8556\u8545\u856B\u854D\u8553\u8561\u8558"], + ["eb40", "\u8540\u8546\u8564\u8541\u8562\u8544\u8551\u8547\u8563\u853E\u855B\u8571\u854E\u856E\u8575\u8555\u8567\u8560\u858C\u8566\u855D\u8554\u8565\u856C\u8663\u8665\u8664\u879B\u878F\u8797\u8793\u8792\u8788\u8781\u8796\u8798\u8779\u8787\u87A3\u8785\u8790\u8791\u879D\u8784\u8794\u879C\u879A\u8789\u891E\u8926\u8930\u892D\u892E\u8927\u8931\u8922\u8929\u8923\u892F\u892C\u891F\u89F1\u8AE0"], + ["eba1", "\u8AE2\u8AF2\u8AF4\u8AF5\u8ADD\u8B14\u8AE4\u8ADF\u8AF0\u8AC8\u8ADE\u8AE1\u8AE8\u8AFF\u8AEF\u8AFB\u8C91\u8C92\u8C90\u8CF5\u8CEE\u8CF1\u8CF0\u8CF3\u8D6C\u8D6E\u8DA5\u8DA7\u8E33\u8E3E\u8E38\u8E40\u8E45\u8E36\u8E3C\u8E3D\u8E41\u8E30\u8E3F\u8EBD\u8F36\u8F2E\u8F35\u8F32\u8F39\u8F37\u8F34\u9076\u9079\u907B\u9086\u90FA\u9133\u9135\u9136\u9193\u9190\u9191\u918D\u918F\u9327\u931E\u9308\u931F\u9306\u930F\u937A\u9338\u933C\u931B\u9323\u9312\u9301\u9346\u932D\u930E\u930D\u92CB\u931D\u92FA\u9325\u9313\u92F9\u92F7\u9334\u9302\u9324\u92FF\u9329\u9339\u9335\u932A\u9314\u930C"], + ["ec40", "\u930B\u92FE\u9309\u9300\u92FB\u9316\u95BC\u95CD\u95BE\u95B9\u95BA\u95B6\u95BF\u95B5\u95BD\u96A9\u96D4\u970B\u9712\u9710\u9799\u9797\u9794\u97F0\u97F8\u9835\u982F\u9832\u9924\u991F\u9927\u9929\u999E\u99EE\u99EC\u99E5\u99E4\u99F0\u99E3\u99EA\u99E9\u99E7\u9AB9\u9ABF\u9AB4\u9ABB\u9AF6\u9AFA\u9AF9\u9AF7\u9B33\u9B80\u9B85\u9B87\u9B7C\u9B7E\u9B7B\u9B82\u9B93\u9B92\u9B90\u9B7A\u9B95"], + ["eca1", "\u9B7D\u9B88\u9D25\u9D17\u9D20\u9D1E\u9D14\u9D29\u9D1D\u9D18\u9D22\u9D10\u9D19\u9D1F\u9E88\u9E86\u9E87\u9EAE\u9EAD\u9ED5\u9ED6\u9EFA\u9F12\u9F3D\u5126\u5125\u5122\u5124\u5120\u5129\u52F4\u5693\u568C\u568D\u5686\u5684\u5683\u567E\u5682\u567F\u5681\u58D6\u58D4\u58CF\u58D2\u5B2D\u5B25\u5B32\u5B23\u5B2C\u5B27\u5B26\u5B2F\u5B2E\u5B7B\u5BF1\u5BF2\u5DB7\u5E6C\u5E6A\u5FBE\u5FBB\u61C3\u61B5\u61BC\u61E7\u61E0\u61E5\u61E4\u61E8\u61DE\u64EF\u64E9\u64E3\u64EB\u64E4\u64E8\u6581\u6580\u65B6\u65DA\u66D2\u6A8D\u6A96\u6A81\u6AA5\u6A89\u6A9F\u6A9B\u6AA1\u6A9E\u6A87\u6A93\u6A8E"], + ["ed40", "\u6A95\u6A83\u6AA8\u6AA4\u6A91\u6A7F\u6AA6\u6A9A\u6A85\u6A8C\u6A92\u6B5B\u6BAD\u6C09\u6FCC\u6FA9\u6FF4\u6FD4\u6FE3\u6FDC\u6FED\u6FE7\u6FE6\u6FDE\u6FF2\u6FDD\u6FE2\u6FE8\u71E1\u71F1\u71E8\u71F2\u71E4\u71F0\u71E2\u7373\u736E\u736F\u7497\u74B2\u74AB\u7490\u74AA\u74AD\u74B1\u74A5\u74AF\u7510\u7511\u7512\u750F\u7584\u7643\u7648\u7649\u7647\u76A4\u76E9\u77B5\u77AB\u77B2\u77B7\u77B6"], + ["eda1", "\u77B4\u77B1\u77A8\u77F0\u78F3\u78FD\u7902\u78FB\u78FC\u78F2\u7905\u78F9\u78FE\u7904\u79AB\u79A8\u7A5C\u7A5B\u7A56\u7A58\u7A54\u7A5A\u7ABE\u7AC0\u7AC1\u7C05\u7C0F\u7BF2\u7C00\u7BFF\u7BFB\u7C0E\u7BF4\u7C0B\u7BF3\u7C02\u7C09\u7C03\u7C01\u7BF8\u7BFD\u7C06\u7BF0\u7BF1\u7C10\u7C0A\u7CE8\u7E2D\u7E3C\u7E42\u7E33\u9848\u7E38\u7E2A\u7E49\u7E40\u7E47\u7E29\u7E4C\u7E30\u7E3B\u7E36\u7E44\u7E3A\u7F45\u7F7F\u7F7E\u7F7D\u7FF4\u7FF2\u802C\u81BB\u81C4\u81CC\u81CA\u81C5\u81C7\u81BC\u81E9\u825B\u825A\u825C\u8583\u8580\u858F\u85A7\u8595\u85A0\u858B\u85A3\u857B\u85A4\u859A\u859E"], + ["ee40", "\u8577\u857C\u8589\u85A1\u857A\u8578\u8557\u858E\u8596\u8586\u858D\u8599\u859D\u8581\u85A2\u8582\u8588\u8585\u8579\u8576\u8598\u8590\u859F\u8668\u87BE\u87AA\u87AD\u87C5\u87B0\u87AC\u87B9\u87B5\u87BC\u87AE\u87C9\u87C3\u87C2\u87CC\u87B7\u87AF\u87C4\u87CA\u87B4\u87B6\u87BF\u87B8\u87BD\u87DE\u87B2\u8935\u8933\u893C\u893E\u8941\u8952\u8937\u8942\u89AD\u89AF\u89AE\u89F2\u89F3\u8B1E"], + ["eea1", "\u8B18\u8B16\u8B11\u8B05\u8B0B\u8B22\u8B0F\u8B12\u8B15\u8B07\u8B0D\u8B08\u8B06\u8B1C\u8B13\u8B1A\u8C4F\u8C70\u8C72\u8C71\u8C6F\u8C95\u8C94\u8CF9\u8D6F\u8E4E\u8E4D\u8E53\u8E50\u8E4C\u8E47\u8F43\u8F40\u9085\u907E\u9138\u919A\u91A2\u919B\u9199\u919F\u91A1\u919D\u91A0\u93A1\u9383\u93AF\u9364\u9356\u9347\u937C\u9358\u935C\u9376\u9349\u9350\u9351\u9360\u936D\u938F\u934C\u936A\u9379\u9357\u9355\u9352\u934F\u9371\u9377\u937B\u9361\u935E\u9363\u9367\u9380\u934E\u9359\u95C7\u95C0\u95C9\u95C3\u95C5\u95B7\u96AE\u96B0\u96AC\u9720\u971F\u9718\u971D\u9719\u979A\u97A1\u979C"], + ["ef40", "\u979E\u979D\u97D5\u97D4\u97F1\u9841\u9844\u984A\u9849\u9845\u9843\u9925\u992B\u992C\u992A\u9933\u9932\u992F\u992D\u9931\u9930\u9998\u99A3\u99A1\u9A02\u99FA\u99F4\u99F7\u99F9\u99F8\u99F6\u99FB\u99FD\u99FE\u99FC\u9A03\u9ABE\u9AFE\u9AFD\u9B01\u9AFC\u9B48\u9B9A\u9BA8\u9B9E\u9B9B\u9BA6\u9BA1\u9BA5\u9BA4\u9B86\u9BA2\u9BA0\u9BAF\u9D33\u9D41\u9D67\u9D36\u9D2E\u9D2F\u9D31\u9D38\u9D30"], + ["efa1", "\u9D45\u9D42\u9D43\u9D3E\u9D37\u9D40\u9D3D\u7FF5\u9D2D\u9E8A\u9E89\u9E8D\u9EB0\u9EC8\u9EDA\u9EFB\u9EFF\u9F24\u9F23\u9F22\u9F54\u9FA0\u5131\u512D\u512E\u5698\u569C\u5697\u569A\u569D\u5699\u5970\u5B3C\u5C69\u5C6A\u5DC0\u5E6D\u5E6E\u61D8\u61DF\u61ED\u61EE\u61F1\u61EA\u61F0\u61EB\u61D6\u61E9\u64FF\u6504\u64FD\u64F8\u6501\u6503\u64FC\u6594\u65DB\u66DA\u66DB\u66D8\u6AC5\u6AB9\u6ABD\u6AE1\u6AC6\u6ABA\u6AB6\u6AB7\u6AC7\u6AB4\u6AAD\u6B5E\u6BC9\u6C0B\u7007\u700C\u700D\u7001\u7005\u7014\u700E\u6FFF\u7000\u6FFB\u7026\u6FFC\u6FF7\u700A\u7201\u71FF\u71F9\u7203\u71FD\u7376"], + ["f040", "\u74B8\u74C0\u74B5\u74C1\u74BE\u74B6\u74BB\u74C2\u7514\u7513\u765C\u7664\u7659\u7650\u7653\u7657\u765A\u76A6\u76BD\u76EC\u77C2\u77BA\u78FF\u790C\u7913\u7914\u7909\u7910\u7912\u7911\u79AD\u79AC\u7A5F\u7C1C\u7C29\u7C19\u7C20\u7C1F\u7C2D\u7C1D\u7C26\u7C28\u7C22\u7C25\u7C30\u7E5C\u7E50\u7E56\u7E63\u7E58\u7E62\u7E5F\u7E51\u7E60\u7E57\u7E53\u7FB5\u7FB3\u7FF7\u7FF8\u8075\u81D1\u81D2"], + ["f0a1", "\u81D0\u825F\u825E\u85B4\u85C6\u85C0\u85C3\u85C2\u85B3\u85B5\u85BD\u85C7\u85C4\u85BF\u85CB\u85CE\u85C8\u85C5\u85B1\u85B6\u85D2\u8624\u85B8\u85B7\u85BE\u8669\u87E7\u87E6\u87E2\u87DB\u87EB\u87EA\u87E5\u87DF\u87F3\u87E4\u87D4\u87DC\u87D3\u87ED\u87D8\u87E3\u87A4\u87D7\u87D9\u8801\u87F4\u87E8\u87DD\u8953\u894B\u894F\u894C\u8946\u8950\u8951\u8949\u8B2A\u8B27\u8B23\u8B33\u8B30\u8B35\u8B47\u8B2F\u8B3C\u8B3E\u8B31\u8B25\u8B37\u8B26\u8B36\u8B2E\u8B24\u8B3B\u8B3D\u8B3A\u8C42\u8C75\u8C99\u8C98\u8C97\u8CFE\u8D04\u8D02\u8D00\u8E5C\u8E62\u8E60\u8E57\u8E56\u8E5E\u8E65\u8E67"], + ["f140", "\u8E5B\u8E5A\u8E61\u8E5D\u8E69\u8E54\u8F46\u8F47\u8F48\u8F4B\u9128\u913A\u913B\u913E\u91A8\u91A5\u91A7\u91AF\u91AA\u93B5\u938C\u9392\u93B7\u939B\u939D\u9389\u93A7\u938E\u93AA\u939E\u93A6\u9395\u9388\u9399\u939F\u938D\u93B1\u9391\u93B2\u93A4\u93A8\u93B4\u93A3\u93A5\u95D2\u95D3\u95D1\u96B3\u96D7\u96DA\u5DC2\u96DF\u96D8\u96DD\u9723\u9722\u9725\u97AC\u97AE\u97A8\u97AB\u97A4\u97AA"], + ["f1a1", "\u97A2\u97A5\u97D7\u97D9\u97D6\u97D8\u97FA\u9850\u9851\u9852\u98B8\u9941\u993C\u993A\u9A0F\u9A0B\u9A09\u9A0D\u9A04\u9A11\u9A0A\u9A05\u9A07\u9A06\u9AC0\u9ADC\u9B08\u9B04\u9B05\u9B29\u9B35\u9B4A\u9B4C\u9B4B\u9BC7\u9BC6\u9BC3\u9BBF\u9BC1\u9BB5\u9BB8\u9BD3\u9BB6\u9BC4\u9BB9\u9BBD\u9D5C\u9D53\u9D4F\u9D4A\u9D5B\u9D4B\u9D59\u9D56\u9D4C\u9D57\u9D52\u9D54\u9D5F\u9D58\u9D5A\u9E8E\u9E8C\u9EDF\u9F01\u9F00\u9F16\u9F25\u9F2B\u9F2A\u9F29\u9F28\u9F4C\u9F55\u5134\u5135\u5296\u52F7\u53B4\u56AB\u56AD\u56A6\u56A7\u56AA\u56AC\u58DA\u58DD\u58DB\u5912\u5B3D\u5B3E\u5B3F\u5DC3\u5E70"], + ["f240", "\u5FBF\u61FB\u6507\u6510\u650D\u6509\u650C\u650E\u6584\u65DE\u65DD\u66DE\u6AE7\u6AE0\u6ACC\u6AD1\u6AD9\u6ACB\u6ADF\u6ADC\u6AD0\u6AEB\u6ACF\u6ACD\u6ADE\u6B60\u6BB0\u6C0C\u7019\u7027\u7020\u7016\u702B\u7021\u7022\u7023\u7029\u7017\u7024\u701C\u702A\u720C\u720A\u7207\u7202\u7205\u72A5\u72A6\u72A4\u72A3\u72A1\u74CB\u74C5\u74B7\u74C3\u7516\u7660\u77C9\u77CA\u77C4\u77F1\u791D\u791B"], + ["f2a1", "\u7921\u791C\u7917\u791E\u79B0\u7A67\u7A68\u7C33\u7C3C\u7C39\u7C2C\u7C3B\u7CEC\u7CEA\u7E76\u7E75\u7E78\u7E70\u7E77\u7E6F\u7E7A\u7E72\u7E74\u7E68\u7F4B\u7F4A\u7F83\u7F86\u7FB7\u7FFD\u7FFE\u8078\u81D7\u81D5\u8264\u8261\u8263\u85EB\u85F1\u85ED\u85D9\u85E1\u85E8\u85DA\u85D7\u85EC\u85F2\u85F8\u85D8\u85DF\u85E3\u85DC\u85D1\u85F0\u85E6\u85EF\u85DE\u85E2\u8800\u87FA\u8803\u87F6\u87F7\u8809\u880C\u880B\u8806\u87FC\u8808\u87FF\u880A\u8802\u8962\u895A\u895B\u8957\u8961\u895C\u8958\u895D\u8959\u8988\u89B7\u89B6\u89F6\u8B50\u8B48\u8B4A\u8B40\u8B53\u8B56\u8B54\u8B4B\u8B55"], + ["f340", "\u8B51\u8B42\u8B52\u8B57\u8C43\u8C77\u8C76\u8C9A\u8D06\u8D07\u8D09\u8DAC\u8DAA\u8DAD\u8DAB\u8E6D\u8E78\u8E73\u8E6A\u8E6F\u8E7B\u8EC2\u8F52\u8F51\u8F4F\u8F50\u8F53\u8FB4\u9140\u913F\u91B0\u91AD\u93DE\u93C7\u93CF\u93C2\u93DA\u93D0\u93F9\u93EC\u93CC\u93D9\u93A9\u93E6\u93CA\u93D4\u93EE\u93E3\u93D5\u93C4\u93CE\u93C0\u93D2\u93E7\u957D\u95DA\u95DB\u96E1\u9729\u972B\u972C\u9728\u9726"], + ["f3a1", "\u97B3\u97B7\u97B6\u97DD\u97DE\u97DF\u985C\u9859\u985D\u9857\u98BF\u98BD\u98BB\u98BE\u9948\u9947\u9943\u99A6\u99A7\u9A1A\u9A15\u9A25\u9A1D\u9A24\u9A1B\u9A22\u9A20\u9A27\u9A23\u9A1E\u9A1C\u9A14\u9AC2\u9B0B\u9B0A\u9B0E\u9B0C\u9B37\u9BEA\u9BEB\u9BE0\u9BDE\u9BE4\u9BE6\u9BE2\u9BF0\u9BD4\u9BD7\u9BEC\u9BDC\u9BD9\u9BE5\u9BD5\u9BE1\u9BDA\u9D77\u9D81\u9D8A\u9D84\u9D88\u9D71\u9D80\u9D78\u9D86\u9D8B\u9D8C\u9D7D\u9D6B\u9D74\u9D75\u9D70\u9D69\u9D85\u9D73\u9D7B\u9D82\u9D6F\u9D79\u9D7F\u9D87\u9D68\u9E94\u9E91\u9EC0\u9EFC\u9F2D\u9F40\u9F41\u9F4D\u9F56\u9F57\u9F58\u5337\u56B2"], + ["f440", "\u56B5\u56B3\u58E3\u5B45\u5DC6\u5DC7\u5EEE\u5EEF\u5FC0\u5FC1\u61F9\u6517\u6516\u6515\u6513\u65DF\u66E8\u66E3\u66E4\u6AF3\u6AF0\u6AEA\u6AE8\u6AF9\u6AF1\u6AEE\u6AEF\u703C\u7035\u702F\u7037\u7034\u7031\u7042\u7038\u703F\u703A\u7039\u7040\u703B\u7033\u7041\u7213\u7214\u72A8\u737D\u737C\u74BA\u76AB\u76AA\u76BE\u76ED\u77CC\u77CE\u77CF\u77CD\u77F2\u7925\u7923\u7927\u7928\u7924\u7929"], + ["f4a1", "\u79B2\u7A6E\u7A6C\u7A6D\u7AF7\u7C49\u7C48\u7C4A\u7C47\u7C45\u7CEE\u7E7B\u7E7E\u7E81\u7E80\u7FBA\u7FFF\u8079\u81DB\u81D9\u820B\u8268\u8269\u8622\u85FF\u8601\u85FE\u861B\u8600\u85F6\u8604\u8609\u8605\u860C\u85FD\u8819\u8810\u8811\u8817\u8813\u8816\u8963\u8966\u89B9\u89F7\u8B60\u8B6A\u8B5D\u8B68\u8B63\u8B65\u8B67\u8B6D\u8DAE\u8E86\u8E88\u8E84\u8F59\u8F56\u8F57\u8F55\u8F58\u8F5A\u908D\u9143\u9141\u91B7\u91B5\u91B2\u91B3\u940B\u9413\u93FB\u9420\u940F\u9414\u93FE\u9415\u9410\u9428\u9419\u940D\u93F5\u9400\u93F7\u9407\u940E\u9416\u9412\u93FA\u9409\u93F8\u940A\u93FF"], + ["f540", "\u93FC\u940C\u93F6\u9411\u9406\u95DE\u95E0\u95DF\u972E\u972F\u97B9\u97BB\u97FD\u97FE\u9860\u9862\u9863\u985F\u98C1\u98C2\u9950\u994E\u9959\u994C\u994B\u9953\u9A32\u9A34\u9A31\u9A2C\u9A2A\u9A36\u9A29\u9A2E\u9A38\u9A2D\u9AC7\u9ACA\u9AC6\u9B10\u9B12\u9B11\u9C0B\u9C08\u9BF7\u9C05\u9C12\u9BF8\u9C40\u9C07\u9C0E\u9C06\u9C17\u9C14\u9C09\u9D9F\u9D99\u9DA4\u9D9D\u9D92\u9D98\u9D90\u9D9B"], + ["f5a1", "\u9DA0\u9D94\u9D9C\u9DAA\u9D97\u9DA1\u9D9A\u9DA2\u9DA8\u9D9E\u9DA3\u9DBF\u9DA9\u9D96\u9DA6\u9DA7\u9E99\u9E9B\u9E9A\u9EE5\u9EE4\u9EE7\u9EE6\u9F30\u9F2E\u9F5B\u9F60\u9F5E\u9F5D\u9F59\u9F91\u513A\u5139\u5298\u5297\u56C3\u56BD\u56BE\u5B48\u5B47\u5DCB\u5DCF\u5EF1\u61FD\u651B\u6B02\u6AFC\u6B03\u6AF8\u6B00\u7043\u7044\u704A\u7048\u7049\u7045\u7046\u721D\u721A\u7219\u737E\u7517\u766A\u77D0\u792D\u7931\u792F\u7C54\u7C53\u7CF2\u7E8A\u7E87\u7E88\u7E8B\u7E86\u7E8D\u7F4D\u7FBB\u8030\u81DD\u8618\u862A\u8626\u861F\u8623\u861C\u8619\u8627\u862E\u8621\u8620\u8629\u861E\u8625"], + ["f640", "\u8829\u881D\u881B\u8820\u8824\u881C\u882B\u884A\u896D\u8969\u896E\u896B\u89FA\u8B79\u8B78\u8B45\u8B7A\u8B7B\u8D10\u8D14\u8DAF\u8E8E\u8E8C\u8F5E\u8F5B\u8F5D\u9146\u9144\u9145\u91B9\u943F\u943B\u9436\u9429\u943D\u943C\u9430\u9439\u942A\u9437\u942C\u9440\u9431\u95E5\u95E4\u95E3\u9735\u973A\u97BF\u97E1\u9864\u98C9\u98C6\u98C0\u9958\u9956\u9A39\u9A3D\u9A46\u9A44\u9A42\u9A41\u9A3A"], + ["f6a1", "\u9A3F\u9ACD\u9B15\u9B17\u9B18\u9B16\u9B3A\u9B52\u9C2B\u9C1D\u9C1C\u9C2C\u9C23\u9C28\u9C29\u9C24\u9C21\u9DB7\u9DB6\u9DBC\u9DC1\u9DC7\u9DCA\u9DCF\u9DBE\u9DC5\u9DC3\u9DBB\u9DB5\u9DCE\u9DB9\u9DBA\u9DAC\u9DC8\u9DB1\u9DAD\u9DCC\u9DB3\u9DCD\u9DB2\u9E7A\u9E9C\u9EEB\u9EEE\u9EED\u9F1B\u9F18\u9F1A\u9F31\u9F4E\u9F65\u9F64\u9F92\u4EB9\u56C6\u56C5\u56CB\u5971\u5B4B\u5B4C\u5DD5\u5DD1\u5EF2\u6521\u6520\u6526\u6522\u6B0B\u6B08\u6B09\u6C0D\u7055\u7056\u7057\u7052\u721E\u721F\u72A9\u737F\u74D8\u74D5\u74D9\u74D7\u766D\u76AD\u7935\u79B4\u7A70\u7A71\u7C57\u7C5C\u7C59\u7C5B\u7C5A"], + ["f740", "\u7CF4\u7CF1\u7E91\u7F4F\u7F87\u81DE\u826B\u8634\u8635\u8633\u862C\u8632\u8636\u882C\u8828\u8826\u882A\u8825\u8971\u89BF\u89BE\u89FB\u8B7E\u8B84\u8B82\u8B86\u8B85\u8B7F\u8D15\u8E95\u8E94\u8E9A\u8E92\u8E90\u8E96\u8E97\u8F60\u8F62\u9147\u944C\u9450\u944A\u944B\u944F\u9447\u9445\u9448\u9449\u9446\u973F\u97E3\u986A\u9869\u98CB\u9954\u995B\u9A4E\u9A53\u9A54\u9A4C\u9A4F\u9A48\u9A4A"], + ["f7a1", "\u9A49\u9A52\u9A50\u9AD0\u9B19\u9B2B\u9B3B\u9B56\u9B55\u9C46\u9C48\u9C3F\u9C44\u9C39\u9C33\u9C41\u9C3C\u9C37\u9C34\u9C32\u9C3D\u9C36\u9DDB\u9DD2\u9DDE\u9DDA\u9DCB\u9DD0\u9DDC\u9DD1\u9DDF\u9DE9\u9DD9\u9DD8\u9DD6\u9DF5\u9DD5\u9DDD\u9EB6\u9EF0\u9F35\u9F33\u9F32\u9F42\u9F6B\u9F95\u9FA2\u513D\u5299\u58E8\u58E7\u5972\u5B4D\u5DD8\u882F\u5F4F\u6201\u6203\u6204\u6529\u6525\u6596\u66EB\u6B11\u6B12\u6B0F\u6BCA\u705B\u705A\u7222\u7382\u7381\u7383\u7670\u77D4\u7C67\u7C66\u7E95\u826C\u863A\u8640\u8639\u863C\u8631\u863B\u863E\u8830\u8832\u882E\u8833\u8976\u8974\u8973\u89FE"], + ["f840", "\u8B8C\u8B8E\u8B8B\u8B88\u8C45\u8D19\u8E98\u8F64\u8F63\u91BC\u9462\u9455\u945D\u9457\u945E\u97C4\u97C5\u9800\u9A56\u9A59\u9B1E\u9B1F\u9B20\u9C52\u9C58\u9C50\u9C4A\u9C4D\u9C4B\u9C55\u9C59\u9C4C\u9C4E\u9DFB\u9DF7\u9DEF\u9DE3\u9DEB\u9DF8\u9DE4\u9DF6\u9DE1\u9DEE\u9DE6\u9DF2\u9DF0\u9DE2\u9DEC\u9DF4\u9DF3\u9DE8\u9DED\u9EC2\u9ED0\u9EF2\u9EF3\u9F06\u9F1C\u9F38\u9F37\u9F36\u9F43\u9F4F"], + ["f8a1", "\u9F71\u9F70\u9F6E\u9F6F\u56D3\u56CD\u5B4E\u5C6D\u652D\u66ED\u66EE\u6B13\u705F\u7061\u705D\u7060\u7223\u74DB\u74E5\u77D5\u7938\u79B7\u79B6\u7C6A\u7E97\u7F89\u826D\u8643\u8838\u8837\u8835\u884B\u8B94\u8B95\u8E9E\u8E9F\u8EA0\u8E9D\u91BE\u91BD\u91C2\u946B\u9468\u9469\u96E5\u9746\u9743\u9747\u97C7\u97E5\u9A5E\u9AD5\u9B59\u9C63\u9C67\u9C66\u9C62\u9C5E\u9C60\u9E02\u9DFE\u9E07\u9E03\u9E06\u9E05\u9E00\u9E01\u9E09\u9DFF\u9DFD\u9E04\u9EA0\u9F1E\u9F46\u9F74\u9F75\u9F76\u56D4\u652E\u65B8\u6B18\u6B19\u6B17\u6B1A\u7062\u7226\u72AA\u77D8\u77D9\u7939\u7C69\u7C6B\u7CF6\u7E9A"], + ["f940", "\u7E98\u7E9B\u7E99\u81E0\u81E1\u8646\u8647\u8648\u8979\u897A\u897C\u897B\u89FF\u8B98\u8B99\u8EA5\u8EA4\u8EA3\u946E\u946D\u946F\u9471\u9473\u9749\u9872\u995F\u9C68\u9C6E\u9C6D\u9E0B\u9E0D\u9E10\u9E0F\u9E12\u9E11\u9EA1\u9EF5\u9F09\u9F47\u9F78\u9F7B\u9F7A\u9F79\u571E\u7066\u7C6F\u883C\u8DB2\u8EA6\u91C3\u9474\u9478\u9476\u9475\u9A60\u9C74\u9C73\u9C71\u9C75\u9E14\u9E13\u9EF6\u9F0A"], + ["f9a1", "\u9FA4\u7068\u7065\u7CF7\u866A\u883E\u883D\u883F\u8B9E\u8C9C\u8EA9\u8EC9\u974B\u9873\u9874\u98CC\u9961\u99AB\u9A64\u9A66\u9A67\u9B24\u9E15\u9E17\u9F48\u6207\u6B1E\u7227\u864C\u8EA8\u9482\u9480\u9481\u9A69\u9A68\u9B2E\u9E19\u7229\u864B\u8B9F\u9483\u9C79\u9EB7\u7675\u9A6B\u9C7A\u9E1D\u7069\u706A\u9EA4\u9F7E\u9F49\u9F98\u7881\u92B9\u88CF\u58BB\u6052\u7CA7\u5AFA\u2554\u2566\u2557\u2560\u256C\u2563\u255A\u2569\u255D\u2552\u2564\u2555\u255E\u256A\u2561\u2558\u2567\u255B\u2553\u2565\u2556\u255F\u256B\u2562\u2559\u2568\u255C\u2551\u2550\u256D\u256E\u2570\u256F\u2593"] + ]; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tables/big5-added.json +var require_big5_added = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tables/big5-added.json"(exports2, module2) { + module2.exports = [ + ["8740", "\u43F0\u4C32\u4603\u45A6\u4578\u{27267}\u4D77\u45B3\u{27CB1}\u4CE2\u{27CC5}\u3B95\u4736\u4744\u4C47\u4C40\u{242BF}\u{23617}\u{27352}\u{26E8B}\u{270D2}\u4C57\u{2A351}\u474F\u45DA\u4C85\u{27C6C}\u4D07\u4AA4\u46A1\u{26B23}\u7225\u{25A54}\u{21A63}\u{23E06}\u{23F61}\u664D\u56FB"], + ["8767", "\u7D95\u591D\u{28BB9}\u3DF4\u9734\u{27BEF}\u5BDB\u{21D5E}\u5AA4\u3625\u{29EB0}\u5AD1\u5BB7\u5CFC\u676E\u8593\u{29945}\u7461\u749D\u3875\u{21D53}\u{2369E}\u{26021}\u3EEC"], + ["87a1", "\u{258DE}\u3AF5\u7AFC\u9F97\u{24161}\u{2890D}\u{231EA}\u{20A8A}\u{2325E}\u430A\u8484\u9F96\u942F\u4930\u8613\u5896\u974A\u9218\u79D0\u7A32\u6660\u6A29\u889D\u744C\u7BC5\u6782\u7A2C\u524F\u9046\u34E6\u73C4\u{25DB9}\u74C6\u9FC7\u57B3\u492F\u544C\u4131\u{2368E}\u5818\u7A72\u{27B65}\u8B8F\u46AE\u{26E88}\u4181\u{25D99}\u7BAE\u{224BC}\u9FC8\u{224C1}\u{224C9}\u{224CC}\u9FC9\u8504\u{235BB}\u40B4\u9FCA\u44E1\u{2ADFF}\u62C1\u706E\u9FCB"], + ["8840", "\u31C0", 4, "\u{2010C}\u31C5\u{200D1}\u{200CD}\u31C6\u31C7\u{200CB}\u{21FE8}\u31C8\u{200CA}\u31C9\u31CA\u31CB\u31CC\u{2010E}\u31CD\u31CE\u0100\xC1\u01CD\xC0\u0112\xC9\u011A\xC8\u014C\xD3\u01D1\xD2\u0FFF\xCA\u0304\u1EBE\u0FFF\xCA\u030C\u1EC0\xCA\u0101\xE1\u01CE\xE0\u0251\u0113\xE9\u011B\xE8\u012B\xED\u01D0\xEC\u014D\xF3\u01D2\xF2\u016B\xFA\u01D4\xF9\u01D6\u01D8\u01DA"], + ["88a1", "\u01DC\xFC\u0FFF\xEA\u0304\u1EBF\u0FFF\xEA\u030C\u1EC1\xEA\u0261\u23DA\u23DB"], + ["8940", "\u{2A3A9}\u{21145}"], + ["8943", "\u650A"], + ["8946", "\u4E3D\u6EDD\u9D4E\u91DF"], + ["894c", "\u{27735}\u6491\u4F1A\u4F28\u4FA8\u5156\u5174\u519C\u51E4\u52A1\u52A8\u533B\u534E\u53D1\u53D8\u56E2\u58F0\u5904\u5907\u5932\u5934\u5B66\u5B9E\u5B9F\u5C9A\u5E86\u603B\u6589\u67FE\u6804\u6865\u6D4E\u70BC\u7535\u7EA4\u7EAC\u7EBA\u7EC7\u7ECF\u7EDF\u7F06\u7F37\u827A\u82CF\u836F\u89C6\u8BBE\u8BE2\u8F66\u8F67\u8F6E"], + ["89a1", "\u7411\u7CFC\u7DCD\u6946\u7AC9\u5227"], + ["89ab", "\u918C\u78B8\u915E\u80BC"], + ["89b0", "\u8D0B\u80F6\u{209E7}"], + ["89b5", "\u809F\u9EC7\u4CCD\u9DC9\u9E0C\u4C3E\u{29DF6}\u{2700E}\u9E0A\u{2A133}\u35C1"], + ["89c1", "\u6E9A\u823E\u7519"], + ["89c5", "\u4911\u9A6C\u9A8F\u9F99\u7987\u{2846C}\u{21DCA}\u{205D0}\u{22AE6}\u4E24\u4E81\u4E80\u4E87\u4EBF\u4EEB\u4F37\u344C\u4FBD\u3E48\u5003\u5088\u347D\u3493\u34A5\u5186\u5905\u51DB\u51FC\u5205\u4E89\u5279\u5290\u5327\u35C7\u53A9\u3551\u53B0\u3553\u53C2\u5423\u356D\u3572\u3681\u5493\u54A3\u54B4\u54B9\u54D0\u54EF\u5518\u5523\u5528\u3598\u553F\u35A5\u35BF\u55D7\u35C5"], + ["8a40", "\u{27D84}\u5525"], + ["8a43", "\u{20C42}\u{20D15}\u{2512B}\u5590\u{22CC6}\u39EC\u{20341}\u8E46\u{24DB8}\u{294E5}\u4053\u{280BE}\u777A\u{22C38}\u3A34\u47D5\u{2815D}\u{269F2}\u{24DEA}\u64DD\u{20D7C}\u{20FB4}\u{20CD5}\u{210F4}\u648D\u8E7E\u{20E96}\u{20C0B}\u{20F64}\u{22CA9}\u{28256}\u{244D3}"], + ["8a64", "\u{20D46}\u{29A4D}\u{280E9}\u47F4\u{24EA7}\u{22CC2}\u9AB2\u3A67\u{295F4}\u3FED\u3506\u{252C7}\u{297D4}\u{278C8}\u{22D44}\u9D6E\u9815"], + ["8a76", "\u43D9\u{260A5}\u64B4\u54E3\u{22D4C}\u{22BCA}\u{21077}\u39FB\u{2106F}"], + ["8aa1", "\u{266DA}\u{26716}\u{279A0}\u64EA\u{25052}\u{20C43}\u8E68\u{221A1}\u{28B4C}\u{20731}"], + ["8aac", "\u480B\u{201A9}\u3FFA\u5873\u{22D8D}"], + ["8ab2", "\u{245C8}\u{204FC}\u{26097}\u{20F4C}\u{20D96}\u5579\u40BB\u43BA"], + ["8abb", "\u4AB4\u{22A66}\u{2109D}\u81AA\u98F5\u{20D9C}\u6379\u39FE\u{22775}\u8DC0\u56A1\u647C\u3E43"], + ["8ac9", "\u{2A601}\u{20E09}\u{22ACF}\u{22CC9}"], + ["8ace", "\u{210C8}\u{239C2}\u3992\u3A06\u{2829B}\u3578\u{25E49}\u{220C7}\u5652\u{20F31}\u{22CB2}\u{29720}\u34BC\u6C3D\u{24E3B}"], + ["8adf", "\u{27574}\u{22E8B}\u{22208}\u{2A65B}\u{28CCD}\u{20E7A}\u{20C34}\u{2681C}\u7F93\u{210CF}\u{22803}\u{22939}\u35FB\u{251E3}\u{20E8C}\u{20F8D}\u{20EAA}\u3F93\u{20F30}\u{20D47}\u{2114F}\u{20E4C}"], + ["8af6", "\u{20EAB}\u{20BA9}\u{20D48}\u{210C0}\u{2113D}\u3FF9\u{22696}\u6432\u{20FAD}"], + ["8b40", "\u{233F4}\u{27639}\u{22BCE}\u{20D7E}\u{20D7F}\u{22C51}\u{22C55}\u3A18\u{20E98}\u{210C7}\u{20F2E}\u{2A632}\u{26B50}\u{28CD2}\u{28D99}\u{28CCA}\u95AA\u54CC\u82C4\u55B9"], + ["8b55", "\u{29EC3}\u9C26\u9AB6\u{2775E}\u{22DEE}\u7140\u816D\u80EC\u5C1C\u{26572}\u8134\u3797\u535F\u{280BD}\u91B6\u{20EFA}\u{20E0F}\u{20E77}\u{20EFB}\u35DD\u{24DEB}\u3609\u{20CD6}\u56AF\u{227B5}\u{210C9}\u{20E10}\u{20E78}\u{21078}\u{21148}\u{28207}\u{21455}\u{20E79}\u{24E50}\u{22DA4}\u5A54\u{2101D}\u{2101E}\u{210F5}\u{210F6}\u579C\u{20E11}"], + ["8ba1", "\u{27694}\u{282CD}\u{20FB5}\u{20E7B}\u{2517E}\u3703\u{20FB6}\u{21180}\u{252D8}\u{2A2BD}\u{249DA}\u{2183A}\u{24177}\u{2827C}\u5899\u5268\u361A\u{2573D}\u7BB2\u5B68\u4800\u4B2C\u9F27\u49E7\u9C1F\u9B8D\u{25B74}\u{2313D}\u55FB\u35F2\u5689\u4E28\u5902\u{21BC1}\u{2F878}\u9751\u{20086}\u4E5B\u4EBB\u353E\u5C23\u5F51\u5FC4\u38FA\u624C\u6535\u6B7A\u6C35\u6C3A\u706C\u722B\u4E2C\u72AD\u{248E9}\u7F52\u793B\u7CF9\u7F53\u{2626A}\u34C1"], + ["8bde", "\u{2634B}\u8002\u8080\u{26612}\u{26951}\u535D\u8864\u89C1\u{278B2}\u8BA0\u8D1D\u9485\u9578\u957F\u95E8\u{28E0F}\u97E6\u9875\u98CE\u98DE\u9963\u{29810}\u9C7C\u9E1F\u9EC4\u6B6F\uF907\u4E37\u{20087}\u961D\u6237\u94A2"], + ["8c40", "\u503B\u6DFE\u{29C73}\u9FA6\u3DC9\u888F\u{2414E}\u7077\u5CF5\u4B20\u{251CD}\u3559\u{25D30}\u6122\u{28A32}\u8FA7\u91F6\u7191\u6719\u73BA\u{23281}\u{2A107}\u3C8B\u{21980}\u4B10\u78E4\u7402\u51AE\u{2870F}\u4009\u6A63\u{2A2BA}\u4223\u860F\u{20A6F}\u7A2A\u{29947}\u{28AEA}\u9755\u704D\u5324\u{2207E}\u93F4\u76D9\u{289E3}\u9FA7\u77DD\u4EA3\u4FF0\u50BC\u4E2F\u4F17\u9FA8\u5434\u7D8B\u5892\u58D0\u{21DB6}\u5E92\u5E99\u5FC2\u{22712}\u658B"], + ["8ca1", "\u{233F9}\u6919\u6A43\u{23C63}\u6CFF"], + ["8ca7", "\u7200\u{24505}\u738C\u3EDB\u{24A13}\u5B15\u74B9\u8B83\u{25CA4}\u{25695}\u7A93\u7BEC\u7CC3\u7E6C\u82F8\u8597\u9FA9\u8890\u9FAA\u8EB9\u9FAB\u8FCF\u855F\u99E0\u9221\u9FAC\u{28DB9}\u{2143F}\u4071\u42A2\u5A1A"], + ["8cc9", "\u9868\u676B\u4276\u573D"], + ["8cce", "\u85D6\u{2497B}\u82BF\u{2710D}\u4C81\u{26D74}\u5D7B\u{26B15}\u{26FBE}\u9FAD\u9FAE\u5B96\u9FAF\u66E7\u7E5B\u6E57\u79CA\u3D88\u44C3\u{23256}\u{22796}\u439A\u4536"], + ["8ce6", "\u5CD5\u{23B1A}\u8AF9\u5C78\u3D12\u{23551}\u5D78\u9FB2\u7157\u4558\u{240EC}\u{21E23}\u4C77\u3978\u344A\u{201A4}\u{26C41}\u8ACC\u4FB4\u{20239}\u59BF\u816C\u9856\u{298FA}\u5F3B"], + ["8d40", "\u{20B9F}"], + ["8d42", "\u{221C1}\u{2896D}\u4102\u46BB\u{29079}\u3F07\u9FB3\u{2A1B5}\u40F8\u37D6\u46F7\u{26C46}\u417C\u{286B2}\u{273FF}\u456D\u38D4\u{2549A}\u4561\u451B\u4D89\u4C7B\u4D76\u45EA\u3FC8\u{24B0F}\u3661\u44DE\u44BD\u41ED\u5D3E\u5D48\u5D56\u3DFC\u380F\u5DA4\u5DB9\u3820\u3838\u5E42\u5EBD\u5F25\u5F83\u3908\u3914\u393F\u394D\u60D7\u613D\u5CE5\u3989\u61B7\u61B9\u61CF\u39B8\u622C\u6290\u62E5\u6318\u39F8\u56B1"], + ["8da1", "\u3A03\u63E2\u63FB\u6407\u645A\u3A4B\u64C0\u5D15\u5621\u9F9F\u3A97\u6586\u3ABD\u65FF\u6653\u3AF2\u6692\u3B22\u6716\u3B42\u67A4\u6800\u3B58\u684A\u6884\u3B72\u3B71\u3B7B\u6909\u6943\u725C\u6964\u699F\u6985\u3BBC\u69D6\u3BDD\u6A65\u6A74\u6A71\u6A82\u3BEC\u6A99\u3BF2\u6AAB\u6AB5\u6AD4\u6AF6\u6B81\u6BC1\u6BEA\u6C75\u6CAA\u3CCB\u6D02\u6D06\u6D26\u6D81\u3CEF\u6DA4\u6DB1\u6E15\u6E18\u6E29\u6E86\u{289C0}\u6EBB\u6EE2\u6EDA\u9F7F\u6EE8\u6EE9\u6F24\u6F34\u3D46\u{23F41}\u6F81\u6FBE\u3D6A\u3D75\u71B7\u5C99\u3D8A\u702C\u3D91\u7050\u7054\u706F\u707F\u7089\u{20325}\u43C1\u35F1\u{20ED8}"], + ["8e40", "\u{23ED7}\u57BE\u{26ED3}\u713E\u{257E0}\u364E\u69A2\u{28BE9}\u5B74\u7A49\u{258E1}\u{294D9}\u7A65\u7A7D\u{259AC}\u7ABB\u7AB0\u7AC2\u7AC3\u71D1\u{2648D}\u41CA\u7ADA\u7ADD\u7AEA\u41EF\u54B2\u{25C01}\u7B0B\u7B55\u7B29\u{2530E}\u{25CFE}\u7BA2\u7B6F\u839C\u{25BB4}\u{26C7F}\u7BD0\u8421\u7B92\u7BB8\u{25D20}\u3DAD\u{25C65}\u8492\u7BFA\u7C06\u7C35\u{25CC1}\u7C44\u7C83\u{24882}\u7CA6\u667D\u{24578}\u7CC9\u7CC7\u7CE6\u7C74\u7CF3\u7CF5\u7CCE"], + ["8ea1", "\u7E67\u451D\u{26E44}\u7D5D\u{26ED6}\u748D\u7D89\u7DAB\u7135\u7DB3\u7DD2\u{24057}\u{26029}\u7DE4\u3D13\u7DF5\u{217F9}\u7DE5\u{2836D}\u7E1D\u{26121}\u{2615A}\u7E6E\u7E92\u432B\u946C\u7E27\u7F40\u7F41\u7F47\u7936\u{262D0}\u99E1\u7F97\u{26351}\u7FA3\u{21661}\u{20068}\u455C\u{23766}\u4503\u{2833A}\u7FFA\u{26489}\u8005\u8008\u801D\u8028\u802F\u{2A087}\u{26CC3}\u803B\u803C\u8061\u{22714}\u4989\u{26626}\u{23DE3}\u{266E8}\u6725\u80A7\u{28A48}\u8107\u811A\u58B0\u{226F6}\u6C7F\u{26498}\u{24FB8}\u64E7\u{2148A}\u8218\u{2185E}\u6A53\u{24A65}\u{24A95}\u447A\u8229\u{20B0D}\u{26A52}\u{23D7E}\u4FF9\u{214FD}\u84E2\u8362\u{26B0A}\u{249A7}\u{23530}\u{21773}\u{23DF8}\u82AA\u691B\u{2F994}\u41DB"], + ["8f40", "\u854B\u82D0\u831A\u{20E16}\u{217B4}\u36C1\u{2317D}\u{2355A}\u827B\u82E2\u8318\u{23E8B}\u{26DA3}\u{26B05}\u{26B97}\u{235CE}\u3DBF\u831D\u55EC\u8385\u450B\u{26DA5}\u83AC\u83C1\u83D3\u347E\u{26ED4}\u6A57\u855A\u3496\u{26E42}\u{22EEF}\u8458\u{25BE4}\u8471\u3DD3\u44E4\u6AA7\u844A\u{23CB5}\u7958\u84A8\u{26B96}\u{26E77}\u{26E43}\u84DE\u840F\u8391\u44A0\u8493\u84E4\u{25C91}\u4240\u{25CC0}\u4543\u8534\u5AF2\u{26E99}\u4527\u8573\u4516\u67BF\u8616"], + ["8fa1", "\u{28625}\u{2863B}\u85C1\u{27088}\u8602\u{21582}\u{270CD}\u{2F9B2}\u456A\u8628\u3648\u{218A2}\u53F7\u{2739A}\u867E\u8771\u{2A0F8}\u87EE\u{22C27}\u87B1\u87DA\u880F\u5661\u866C\u6856\u460F\u8845\u8846\u{275E0}\u{23DB9}\u{275E4}\u885E\u889C\u465B\u88B4\u88B5\u63C1\u88C5\u7777\u{2770F}\u8987\u898A\u89A6\u89A9\u89A7\u89BC\u{28A25}\u89E7\u{27924}\u{27ABD}\u8A9C\u7793\u91FE\u8A90\u{27A59}\u7AE9\u{27B3A}\u{23F8F}\u4713\u{27B38}\u717C\u8B0C\u8B1F\u{25430}\u{25565}\u8B3F\u8B4C\u8B4D\u8AA9\u{24A7A}\u8B90\u8B9B\u8AAF\u{216DF}\u4615\u884F\u8C9B\u{27D54}\u{27D8F}\u{2F9D4}\u3725\u{27D53}\u8CD6\u{27D98}\u{27DBD}\u8D12\u8D03\u{21910}\u8CDB\u705C\u8D11\u{24CC9}\u3ED0\u8D77"], + ["9040", "\u8DA9\u{28002}\u{21014}\u{2498A}\u3B7C\u{281BC}\u{2710C}\u7AE7\u8EAD\u8EB6\u8EC3\u92D4\u8F19\u8F2D\u{28365}\u{28412}\u8FA5\u9303\u{2A29F}\u{20A50}\u8FB3\u492A\u{289DE}\u{2853D}\u{23DBB}\u5EF8\u{23262}\u8FF9\u{2A014}\u{286BC}\u{28501}\u{22325}\u3980\u{26ED7}\u9037\u{2853C}\u{27ABE}\u9061\u{2856C}\u{2860B}\u90A8\u{28713}\u90C4\u{286E6}\u90AE\u90FD\u9167\u3AF0\u91A9\u91C4\u7CAC\u{28933}\u{21E89}\u920E\u6C9F\u9241\u9262\u{255B9}\u92B9\u{28AC6}\u{23C9B}\u{28B0C}\u{255DB}"], + ["90a1", "\u{20D31}\u932C\u936B\u{28AE1}\u{28BEB}\u708F\u5AC3\u{28AE2}\u{28AE5}\u4965\u9244\u{28BEC}\u{28C39}\u{28BFF}\u9373\u945B\u8EBC\u9585\u95A6\u9426\u95A0\u6FF6\u42B9\u{2267A}\u{286D8}\u{2127C}\u{23E2E}\u49DF\u6C1C\u967B\u9696\u416C\u96A3\u{26ED5}\u61DA\u96B6\u78F5\u{28AE0}\u96BD\u53CC\u49A1\u{26CB8}\u{20274}\u{26410}\u{290AF}\u{290E5}\u{24AD1}\u{21915}\u{2330A}\u9731\u8642\u9736\u4A0F\u453D\u4585\u{24AE9}\u7075\u5B41\u971B\u975C\u{291D5}\u9757\u5B4A\u{291EB}\u975F\u9425\u50D0\u{230B7}\u{230BC}\u9789\u979F\u97B1\u97BE\u97C0\u97D2\u97E0\u{2546C}\u97EE\u741C\u{29433}\u97FF\u97F5\u{2941D}\u{2797A}\u4AD1\u9834\u9833\u984B\u9866\u3B0E\u{27175}\u3D51\u{20630}\u{2415C}"], + ["9140", "\u{25706}\u98CA\u98B7\u98C8\u98C7\u4AFF\u{26D27}\u{216D3}\u55B0\u98E1\u98E6\u98EC\u9378\u9939\u{24A29}\u4B72\u{29857}\u{29905}\u99F5\u9A0C\u9A3B\u9A10\u9A58\u{25725}\u36C4\u{290B1}\u{29BD5}\u9AE0\u9AE2\u{29B05}\u9AF4\u4C0E\u9B14\u9B2D\u{28600}\u5034\u9B34\u{269A8}\u38C3\u{2307D}\u9B50\u9B40\u{29D3E}\u5A45\u{21863}\u9B8E\u{2424B}\u9C02\u9BFF\u9C0C\u{29E68}\u9DD4\u{29FB7}\u{2A192}\u{2A1AB}\u{2A0E1}\u{2A123}\u{2A1DF}\u9D7E\u9D83\u{2A134}\u9E0E\u6888"], + ["91a1", "\u9DC4\u{2215B}\u{2A193}\u{2A220}\u{2193B}\u{2A233}\u9D39\u{2A0B9}\u{2A2B4}\u9E90\u9E95\u9E9E\u9EA2\u4D34\u9EAA\u9EAF\u{24364}\u9EC1\u3B60\u39E5\u3D1D\u4F32\u37BE\u{28C2B}\u9F02\u9F08\u4B96\u9424\u{26DA2}\u9F17\u9F16\u9F39\u569F\u568A\u9F45\u99B8\u{2908B}\u97F2\u847F\u9F62\u9F69\u7ADC\u9F8E\u7216\u4BBE\u{24975}\u{249BB}\u7177\u{249F8}\u{24348}\u{24A51}\u739E\u{28BDA}\u{218FA}\u799F\u{2897E}\u{28E36}\u9369\u93F3\u{28A44}\u92EC\u9381\u93CB\u{2896C}\u{244B9}\u7217\u3EEB\u7772\u7A43\u70D0\u{24473}\u{243F8}\u717E\u{217EF}\u70A3\u{218BE}\u{23599}\u3EC7\u{21885}\u{2542F}\u{217F8}\u3722\u{216FB}\u{21839}\u36E1\u{21774}\u{218D1}\u{25F4B}\u3723\u{216C0}\u575B\u{24A25}\u{213FE}\u{212A8}"], + ["9240", "\u{213C6}\u{214B6}\u8503\u{236A6}\u8503\u8455\u{24994}\u{27165}\u{23E31}\u{2555C}\u{23EFB}\u{27052}\u44F4\u{236EE}\u{2999D}\u{26F26}\u67F9\u3733\u3C15\u3DE7\u586C\u{21922}\u6810\u4057\u{2373F}\u{240E1}\u{2408B}\u{2410F}\u{26C21}\u54CB\u569E\u{266B1}\u5692\u{20FDF}\u{20BA8}\u{20E0D}\u93C6\u{28B13}\u939C\u4EF8\u512B\u3819\u{24436}\u4EBC\u{20465}\u{2037F}\u4F4B\u4F8A\u{25651}\u5A68\u{201AB}\u{203CB}\u3999\u{2030A}\u{20414}\u3435\u4F29\u{202C0}\u{28EB3}\u{20275}\u8ADA\u{2020C}\u4E98"], + ["92a1", "\u50CD\u510D\u4FA2\u4F03\u{24A0E}\u{23E8A}\u4F42\u502E\u506C\u5081\u4FCC\u4FE5\u5058\u50FC\u5159\u515B\u515D\u515E\u6E76\u{23595}\u{23E39}\u{23EBF}\u6D72\u{21884}\u{23E89}\u51A8\u51C3\u{205E0}\u44DD\u{204A3}\u{20492}\u{20491}\u8D7A\u{28A9C}\u{2070E}\u5259\u52A4\u{20873}\u52E1\u936E\u467A\u718C\u{2438C}\u{20C20}\u{249AC}\u{210E4}\u69D1\u{20E1D}\u7479\u3EDE\u7499\u7414\u7456\u7398\u4B8E\u{24ABC}\u{2408D}\u53D0\u3584\u720F\u{240C9}\u55B4\u{20345}\u54CD\u{20BC6}\u571D\u925D\u96F4\u9366\u57DD\u578D\u577F\u363E\u58CB\u5A99\u{28A46}\u{216FA}\u{2176F}\u{21710}\u5A2C\u59B8\u928F\u5A7E\u5ACF\u5A12\u{25946}\u{219F3}\u{21861}\u{24295}\u36F5\u6D05\u7443\u5A21\u{25E83}"], + ["9340", "\u5A81\u{28BD7}\u{20413}\u93E0\u748C\u{21303}\u7105\u4972\u9408\u{289FB}\u93BD\u37A0\u5C1E\u5C9E\u5E5E\u5E48\u{21996}\u{2197C}\u{23AEE}\u5ECD\u5B4F\u{21903}\u{21904}\u3701\u{218A0}\u36DD\u{216FE}\u36D3\u812A\u{28A47}\u{21DBA}\u{23472}\u{289A8}\u5F0C\u5F0E\u{21927}\u{217AB}\u5A6B\u{2173B}\u5B44\u8614\u{275FD}\u8860\u607E\u{22860}\u{2262B}\u5FDB\u3EB8\u{225AF}\u{225BE}\u{29088}\u{26F73}\u61C0\u{2003E}\u{20046}\u{2261B}\u6199\u6198\u6075\u{22C9B}\u{22D07}\u{246D4}\u{2914D}"], + ["93a1", "\u6471\u{24665}\u{22B6A}\u3A29\u{22B22}\u{23450}\u{298EA}\u{22E78}\u6337\u{2A45B}\u64B6\u6331\u63D1\u{249E3}\u{22D67}\u62A4\u{22CA1}\u643B\u656B\u6972\u3BF4\u{2308E}\u{232AD}\u{24989}\u{232AB}\u550D\u{232E0}\u{218D9}\u{2943F}\u66CE\u{23289}\u{231B3}\u3AE0\u4190\u{25584}\u{28B22}\u{2558F}\u{216FC}\u{2555B}\u{25425}\u78EE\u{23103}\u{2182A}\u{23234}\u3464\u{2320F}\u{23182}\u{242C9}\u668E\u{26D24}\u666B\u4B93\u6630\u{27870}\u{21DEB}\u6663\u{232D2}\u{232E1}\u661E\u{25872}\u38D1\u{2383A}\u{237BC}\u3B99\u{237A2}\u{233FE}\u74D0\u3B96\u678F\u{2462A}\u68B6\u681E\u3BC4\u6ABE\u3863\u{237D5}\u{24487}\u6A33\u6A52\u6AC9\u6B05\u{21912}\u6511\u6898\u6A4C\u3BD7\u6A7A\u6B57\u{23FC0}\u{23C9A}\u93A0\u92F2\u{28BEA}\u{28ACB}"], + ["9440", "\u9289\u{2801E}\u{289DC}\u9467\u6DA5\u6F0B\u{249EC}\u6D67\u{23F7F}\u3D8F\u6E04\u{2403C}\u5A3D\u6E0A\u5847\u6D24\u7842\u713B\u{2431A}\u{24276}\u70F1\u7250\u7287\u7294\u{2478F}\u{24725}\u5179\u{24AA4}\u{205EB}\u747A\u{23EF8}\u{2365F}\u{24A4A}\u{24917}\u{25FE1}\u3F06\u3EB1\u{24ADF}\u{28C23}\u{23F35}\u60A7\u3EF3\u74CC\u743C\u9387\u7437\u449F\u{26DEA}\u4551\u7583\u3F63\u{24CD9}\u{24D06}\u3F58\u7555\u7673\u{2A5C6}\u3B19\u7468\u{28ACC}\u{249AB}\u{2498E}\u3AFB"], + ["94a1", "\u3DCD\u{24A4E}\u3EFF\u{249C5}\u{248F3}\u91FA\u5732\u9342\u{28AE3}\u{21864}\u50DF\u{25221}\u{251E7}\u7778\u{23232}\u770E\u770F\u777B\u{24697}\u{23781}\u3A5E\u{248F0}\u7438\u749B\u3EBF\u{24ABA}\u{24AC7}\u40C8\u{24A96}\u{261AE}\u9307\u{25581}\u781E\u788D\u7888\u78D2\u73D0\u7959\u{27741}\u{256E3}\u410E\u799B\u8496\u79A5\u6A2D\u{23EFA}\u7A3A\u79F4\u416E\u{216E6}\u4132\u9235\u79F1\u{20D4C}\u{2498C}\u{20299}\u{23DBA}\u{2176E}\u3597\u556B\u3570\u36AA\u{201D4}\u{20C0D}\u7AE2\u5A59\u{226F5}\u{25AAF}\u{25A9C}\u5A0D\u{2025B}\u78F0\u5A2A\u{25BC6}\u7AFE\u41F9\u7C5D\u7C6D\u4211\u{25BB3}\u{25EBC}\u{25EA6}\u7CCD\u{249F9}\u{217B0}\u7C8E\u7C7C\u7CAE\u6AB2\u7DDC\u7E07\u7DD3\u7F4E\u{26261}"], + ["9540", "\u{2615C}\u{27B48}\u7D97\u{25E82}\u426A\u{26B75}\u{20916}\u67D6\u{2004E}\u{235CF}\u57C4\u{26412}\u{263F8}\u{24962}\u7FDD\u7B27\u{2082C}\u{25AE9}\u{25D43}\u7B0C\u{25E0E}\u99E6\u8645\u9A63\u6A1C\u{2343F}\u39E2\u{249F7}\u{265AD}\u9A1F\u{265A0}\u8480\u{27127}\u{26CD1}\u44EA\u8137\u4402\u80C6\u8109\u8142\u{267B4}\u98C3\u{26A42}\u8262\u8265\u{26A51}\u8453\u{26DA7}\u8610\u{2721B}\u5A86\u417F\u{21840}\u5B2B\u{218A1}\u5AE4\u{218D8}\u86A0\u{2F9BC}\u{23D8F}\u882D\u{27422}\u5A02"], + ["95a1", "\u886E\u4F45\u8887\u88BF\u88E6\u8965\u894D\u{25683}\u8954\u{27785}\u{27784}\u{28BF5}\u{28BD9}\u{28B9C}\u{289F9}\u3EAD\u84A3\u46F5\u46CF\u37F2\u8A3D\u8A1C\u{29448}\u5F4D\u922B\u{24284}\u65D4\u7129\u70C4\u{21845}\u9D6D\u8C9F\u8CE9\u{27DDC}\u599A\u77C3\u59F0\u436E\u36D4\u8E2A\u8EA7\u{24C09}\u8F30\u8F4A\u42F4\u6C58\u6FBB\u{22321}\u489B\u6F79\u6E8B\u{217DA}\u9BE9\u36B5\u{2492F}\u90BB\u9097\u5571\u4906\u91BB\u9404\u{28A4B}\u4062\u{28AFC}\u9427\u{28C1D}\u{28C3B}\u84E5\u8A2B\u9599\u95A7\u9597\u9596\u{28D34}\u7445\u3EC2\u{248FF}\u{24A42}\u{243EA}\u3EE7\u{23225}\u968F\u{28EE7}\u{28E66}\u{28E65}\u3ECC\u{249ED}\u{24A78}\u{23FEE}\u7412\u746B\u3EFC\u9741\u{290B0}"], + ["9640", "\u6847\u4A1D\u{29093}\u{257DF}\u975D\u9368\u{28989}\u{28C26}\u{28B2F}\u{263BE}\u92BA\u5B11\u8B69\u493C\u73F9\u{2421B}\u979B\u9771\u9938\u{20F26}\u5DC1\u{28BC5}\u{24AB2}\u981F\u{294DA}\u92F6\u{295D7}\u91E5\u44C0\u{28B50}\u{24A67}\u{28B64}\u98DC\u{28A45}\u3F00\u922A\u4925\u8414\u993B\u994D\u{27B06}\u3DFD\u999B\u4B6F\u99AA\u9A5C\u{28B65}\u{258C8}\u6A8F\u9A21\u5AFE\u9A2F\u{298F1}\u4B90\u{29948}\u99BC\u4BBD\u4B97\u937D\u5872\u{21302}\u5822\u{249B8}"], + ["96a1", "\u{214E8}\u7844\u{2271F}\u{23DB8}\u68C5\u3D7D\u9458\u3927\u6150\u{22781}\u{2296B}\u6107\u9C4F\u9C53\u9C7B\u9C35\u9C10\u9B7F\u9BCF\u{29E2D}\u9B9F\u{2A1F5}\u{2A0FE}\u9D21\u4CAE\u{24104}\u9E18\u4CB0\u9D0C\u{2A1B4}\u{2A0ED}\u{2A0F3}\u{2992F}\u9DA5\u84BD\u{26E12}\u{26FDF}\u{26B82}\u85FC\u4533\u{26DA4}\u{26E84}\u{26DF0}\u8420\u85EE\u{26E00}\u{237D7}\u{26064}\u79E2\u{2359C}\u{23640}\u492D\u{249DE}\u3D62\u93DB\u92BE\u9348\u{202BF}\u78B9\u9277\u944D\u4FE4\u3440\u9064\u{2555D}\u783D\u7854\u78B6\u784B\u{21757}\u{231C9}\u{24941}\u369A\u4F72\u6FDA\u6FD9\u701E\u701E\u5414\u{241B5}\u57BB\u58F3\u578A\u9D16\u57D7\u7134\u34AF\u{241AC}\u71EB\u{26C40}\u{24F97}\u5B28\u{217B5}\u{28A49}"], + ["9740", "\u610C\u5ACE\u5A0B\u42BC\u{24488}\u372C\u4B7B\u{289FC}\u93BB\u93B8\u{218D6}\u{20F1D}\u8472\u{26CC0}\u{21413}\u{242FA}\u{22C26}\u{243C1}\u5994\u{23DB7}\u{26741}\u7DA8\u{2615B}\u{260A4}\u{249B9}\u{2498B}\u{289FA}\u92E5\u73E2\u3EE9\u74B4\u{28B63}\u{2189F}\u3EE1\u{24AB3}\u6AD8\u73F3\u73FB\u3ED6\u{24A3E}\u{24A94}\u{217D9}\u{24A66}\u{203A7}\u{21424}\u{249E5}\u7448\u{24916}\u70A5\u{24976}\u9284\u73E6\u935F\u{204FE}\u9331\u{28ACE}\u{28A16}\u9386\u{28BE7}\u{255D5}\u4935\u{28A82}\u716B"], + ["97a1", "\u{24943}\u{20CFF}\u56A4\u{2061A}\u{20BEB}\u{20CB8}\u5502\u79C4\u{217FA}\u7DFE\u{216C2}\u{24A50}\u{21852}\u452E\u9401\u370A\u{28AC0}\u{249AD}\u59B0\u{218BF}\u{21883}\u{27484}\u5AA1\u36E2\u{23D5B}\u36B0\u925F\u5A79\u{28A81}\u{21862}\u9374\u3CCD\u{20AB4}\u4A96\u398A\u50F4\u3D69\u3D4C\u{2139C}\u7175\u42FB\u{28218}\u6E0F\u{290E4}\u44EB\u6D57\u{27E4F}\u7067\u6CAF\u3CD6\u{23FED}\u{23E2D}\u6E02\u6F0C\u3D6F\u{203F5}\u7551\u36BC\u34C8\u4680\u3EDA\u4871\u59C4\u926E\u493E\u8F41\u{28C1C}\u{26BC0}\u5812\u57C8\u36D6\u{21452}\u70FE\u{24362}\u{24A71}\u{22FE3}\u{212B0}\u{223BD}\u68B9\u6967\u{21398}\u{234E5}\u{27BF4}\u{236DF}\u{28A83}\u{237D6}\u{233FA}\u{24C9F}\u6A1A\u{236AD}\u{26CB7}\u843E\u44DF\u44CE"], + ["9840", "\u{26D26}\u{26D51}\u{26C82}\u{26FDE}\u6F17\u{27109}\u833D\u{2173A}\u83ED\u{26C80}\u{27053}\u{217DB}\u5989\u5A82\u{217B3}\u5A61\u5A71\u{21905}\u{241FC}\u372D\u59EF\u{2173C}\u36C7\u718E\u9390\u669A\u{242A5}\u5A6E\u5A2B\u{24293}\u6A2B\u{23EF9}\u{27736}\u{2445B}\u{242CA}\u711D\u{24259}\u{289E1}\u4FB0\u{26D28}\u5CC2\u{244CE}\u{27E4D}\u{243BD}\u6A0C\u{24256}\u{21304}\u70A6\u7133\u{243E9}\u3DA5\u6CDF\u{2F825}\u{24A4F}\u7E65\u59EB\u5D2F\u3DF3\u5F5C\u{24A5D}\u{217DF}\u7DA4\u8426"], + ["98a1", "\u5485\u{23AFA}\u{23300}\u{20214}\u577E\u{208D5}\u{20619}\u3FE5\u{21F9E}\u{2A2B6}\u7003\u{2915B}\u5D70\u738F\u7CD3\u{28A59}\u{29420}\u4FC8\u7FE7\u72CD\u7310\u{27AF4}\u7338\u7339\u{256F6}\u7341\u7348\u3EA9\u{27B18}\u906C\u71F5\u{248F2}\u73E1\u81F6\u3ECA\u770C\u3ED1\u6CA2\u56FD\u7419\u741E\u741F\u3EE2\u3EF0\u3EF4\u3EFA\u74D3\u3F0E\u3F53\u7542\u756D\u7572\u758D\u3F7C\u75C8\u75DC\u3FC0\u764D\u3FD7\u7674\u3FDC\u767A\u{24F5C}\u7188\u5623\u8980\u5869\u401D\u7743\u4039\u6761\u4045\u35DB\u7798\u406A\u406F\u5C5E\u77BE\u77CB\u58F2\u7818\u70B9\u781C\u40A8\u7839\u7847\u7851\u7866\u8448\u{25535}\u7933\u6803\u7932\u4103"], + ["9940", "\u4109\u7991\u7999\u8FBB\u7A06\u8FBC\u4167\u7A91\u41B2\u7ABC\u8279\u41C4\u7ACF\u7ADB\u41CF\u4E21\u7B62\u7B6C\u7B7B\u7C12\u7C1B\u4260\u427A\u7C7B\u7C9C\u428C\u7CB8\u4294\u7CED\u8F93\u70C0\u{20CCF}\u7DCF\u7DD4\u7DD0\u7DFD\u7FAE\u7FB4\u729F\u4397\u8020\u8025\u7B39\u802E\u8031\u8054\u3DCC\u57B4\u70A0\u80B7\u80E9\u43ED\u810C\u732A\u810E\u8112\u7560\u8114\u4401\u3B39\u8156\u8159\u815A"], + ["99a1", "\u4413\u583A\u817C\u8184\u4425\u8193\u442D\u81A5\u57EF\u81C1\u81E4\u8254\u448F\u82A6\u8276\u82CA\u82D8\u82FF\u44B0\u8357\u9669\u698A\u8405\u70F5\u8464\u60E3\u8488\u4504\u84BE\u84E1\u84F8\u8510\u8538\u8552\u453B\u856F\u8570\u85E0\u4577\u8672\u8692\u86B2\u86EF\u9645\u878B\u4606\u4617\u88AE\u88FF\u8924\u8947\u8991\u{27967}\u8A29\u8A38\u8A94\u8AB4\u8C51\u8CD4\u8CF2\u8D1C\u4798\u585F\u8DC3\u47ED\u4EEE\u8E3A\u55D8\u5754\u8E71\u55F5\u8EB0\u4837\u8ECE\u8EE2\u8EE4\u8EED\u8EF2\u8FB7\u8FC1\u8FCA\u8FCC\u9033\u99C4\u48AD\u98E0\u9213\u491E\u9228\u9258\u926B\u92B1\u92AE\u92BF"], + ["9a40", "\u92E3\u92EB\u92F3\u92F4\u92FD\u9343\u9384\u93AD\u4945\u4951\u9EBF\u9417\u5301\u941D\u942D\u943E\u496A\u9454\u9479\u952D\u95A2\u49A7\u95F4\u9633\u49E5\u67A0\u4A24\u9740\u4A35\u97B2\u97C2\u5654\u4AE4\u60E8\u98B9\u4B19\u98F1\u5844\u990E\u9919\u51B4\u991C\u9937\u9942\u995D\u9962\u4B70\u99C5\u4B9D\u9A3C\u9B0F\u7A83\u9B69\u9B81\u9BDD\u9BF1\u9BF4\u4C6D\u9C20\u376F\u{21BC2}\u9D49\u9C3A"], + ["9aa1", "\u9EFE\u5650\u9D93\u9DBD\u9DC0\u9DFC\u94F6\u8FB6\u9E7B\u9EAC\u9EB1\u9EBD\u9EC6\u94DC\u9EE2\u9EF1\u9EF8\u7AC8\u9F44\u{20094}\u{202B7}\u{203A0}\u691A\u94C3\u59AC\u{204D7}\u5840\u94C1\u37B9\u{205D5}\u{20615}\u{20676}\u{216BA}\u5757\u7173\u{20AC2}\u{20ACD}\u{20BBF}\u546A\u{2F83B}\u{20BCB}\u549E\u{20BFB}\u{20C3B}\u{20C53}\u{20C65}\u{20C7C}\u60E7\u{20C8D}\u567A\u{20CB5}\u{20CDD}\u{20CED}\u{20D6F}\u{20DB2}\u{20DC8}\u6955\u9C2F\u87A5\u{20E04}\u{20E0E}\u{20ED7}\u{20F90}\u{20F2D}\u{20E73}\u5C20\u{20FBC}\u5E0B\u{2105C}\u{2104F}\u{21076}\u671E\u{2107B}\u{21088}\u{21096}\u3647\u{210BF}\u{210D3}\u{2112F}\u{2113B}\u5364\u84AD\u{212E3}\u{21375}\u{21336}\u8B81\u{21577}\u{21619}\u{217C3}\u{217C7}\u4E78\u70BB\u{2182D}\u{2196A}"], + ["9b40", "\u{21A2D}\u{21A45}\u{21C2A}\u{21C70}\u{21CAC}\u{21EC8}\u62C3\u{21ED5}\u{21F15}\u7198\u6855\u{22045}\u69E9\u36C8\u{2227C}\u{223D7}\u{223FA}\u{2272A}\u{22871}\u{2294F}\u82FD\u{22967}\u{22993}\u{22AD5}\u89A5\u{22AE8}\u8FA0\u{22B0E}\u97B8\u{22B3F}\u9847\u9ABD\u{22C4C}"], + ["9b62", "\u{22C88}\u{22CB7}\u{25BE8}\u{22D08}\u{22D12}\u{22DB7}\u{22D95}\u{22E42}\u{22F74}\u{22FCC}\u{23033}\u{23066}\u{2331F}\u{233DE}\u5FB1\u6648\u66BF\u{27A79}\u{23567}\u{235F3}\u7201\u{249BA}\u77D7\u{2361A}\u{23716}\u7E87\u{20346}\u58B5\u670E"], + ["9ba1", "\u6918\u{23AA7}\u{27657}\u{25FE2}\u{23E11}\u{23EB9}\u{275FE}\u{2209A}\u48D0\u4AB8\u{24119}\u{28A9A}\u{242EE}\u{2430D}\u{2403B}\u{24334}\u{24396}\u{24A45}\u{205CA}\u51D2\u{20611}\u599F\u{21EA8}\u3BBE\u{23CFF}\u{24404}\u{244D6}\u5788\u{24674}\u399B\u{2472F}\u{285E8}\u{299C9}\u3762\u{221C3}\u8B5E\u{28B4E}\u99D6\u{24812}\u{248FB}\u{24A15}\u7209\u{24AC0}\u{20C78}\u5965\u{24EA5}\u{24F86}\u{20779}\u8EDA\u{2502C}\u528F\u573F\u7171\u{25299}\u{25419}\u{23F4A}\u{24AA7}\u55BC\u{25446}\u{2546E}\u{26B52}\u91D4\u3473\u{2553F}\u{27632}\u{2555E}\u4718\u{25562}\u{25566}\u{257C7}\u{2493F}\u{2585D}\u5066\u34FB\u{233CC}\u60DE\u{25903}\u477C\u{28948}\u{25AAE}\u{25B89}\u{25C06}\u{21D90}\u57A1\u7151\u6FB6\u{26102}\u{27C12}\u9056\u{261B2}\u{24F9A}\u8B62\u{26402}\u{2644A}"], + ["9c40", "\u5D5B\u{26BF7}\u8F36\u{26484}\u{2191C}\u8AEA\u{249F6}\u{26488}\u{23FEF}\u{26512}\u4BC0\u{265BF}\u{266B5}\u{2271B}\u9465\u{257E1}\u6195\u5A27\u{2F8CD}\u4FBB\u56B9\u{24521}\u{266FC}\u4E6A\u{24934}\u9656\u6D8F\u{26CBD}\u3618\u8977\u{26799}\u{2686E}\u{26411}\u{2685E}\u71DF\u{268C7}\u7B42\u{290C0}\u{20A11}\u{26926}\u9104\u{26939}\u7A45\u9DF0\u{269FA}\u9A26\u{26A2D}\u365F\u{26469}\u{20021}\u7983\u{26A34}\u{26B5B}\u5D2C\u{23519}\u83CF\u{26B9D}\u46D0\u{26CA4}\u753B\u8865\u{26DAE}\u58B6"], + ["9ca1", "\u371C\u{2258D}\u{2704B}\u{271CD}\u3C54\u{27280}\u{27285}\u9281\u{2217A}\u{2728B}\u9330\u{272E6}\u{249D0}\u6C39\u949F\u{27450}\u{20EF8}\u8827\u88F5\u{22926}\u{28473}\u{217B1}\u6EB8\u{24A2A}\u{21820}\u39A4\u36B9\u5C10\u79E3\u453F\u66B6\u{29CAD}\u{298A4}\u8943\u{277CC}\u{27858}\u56D6\u40DF\u{2160A}\u39A1\u{2372F}\u{280E8}\u{213C5}\u71AD\u8366\u{279DD}\u{291A8}\u5A67\u4CB7\u{270AF}\u{289AB}\u{279FD}\u{27A0A}\u{27B0B}\u{27D66}\u{2417A}\u7B43\u797E\u{28009}\u6FB5\u{2A2DF}\u6A03\u{28318}\u53A2\u{26E07}\u93BF\u6836\u975D\u{2816F}\u{28023}\u{269B5}\u{213ED}\u{2322F}\u{28048}\u5D85\u{28C30}\u{28083}\u5715\u9823\u{28949}\u5DAB\u{24988}\u65BE\u69D5\u53D2\u{24AA5}\u{23F81}\u3C11\u6736\u{28090}\u{280F4}\u{2812E}\u{21FA1}\u{2814F}"], + ["9d40", "\u{28189}\u{281AF}\u{2821A}\u{28306}\u{2832F}\u{2838A}\u35CA\u{28468}\u{286AA}\u48FA\u63E6\u{28956}\u7808\u9255\u{289B8}\u43F2\u{289E7}\u43DF\u{289E8}\u{28B46}\u{28BD4}\u59F8\u{28C09}\u8F0B\u{28FC5}\u{290EC}\u7B51\u{29110}\u{2913C}\u3DF7\u{2915E}\u{24ACA}\u8FD0\u728F\u568B\u{294E7}\u{295E9}\u{295B0}\u{295B8}\u{29732}\u{298D1}\u{29949}\u{2996A}\u{299C3}\u{29A28}\u{29B0E}\u{29D5A}\u{29D9B}\u7E9F\u{29EF8}\u{29F23}\u4CA4\u9547\u{2A293}\u71A2\u{2A2FF}\u4D91\u9012\u{2A5CB}\u4D9C\u{20C9C}\u8FBE\u55C1"], + ["9da1", "\u8FBA\u{224B0}\u8FB9\u{24A93}\u4509\u7E7F\u6F56\u6AB1\u4EEA\u34E4\u{28B2C}\u{2789D}\u373A\u8E80\u{217F5}\u{28024}\u{28B6C}\u{28B99}\u{27A3E}\u{266AF}\u3DEB\u{27655}\u{23CB7}\u{25635}\u{25956}\u4E9A\u{25E81}\u{26258}\u56BF\u{20E6D}\u8E0E\u5B6D\u{23E88}\u{24C9E}\u63DE\u62D0\u{217F6}\u{2187B}\u6530\u562D\u{25C4A}\u541A\u{25311}\u3DC6\u{29D98}\u4C7D\u5622\u561E\u7F49\u{25ED8}\u5975\u{23D40}\u8770\u4E1C\u{20FEA}\u{20D49}\u{236BA}\u8117\u9D5E\u8D18\u763B\u9C45\u764E\u77B9\u9345\u5432\u8148\u82F7\u5625\u8132\u8418\u80BD\u55EA\u7962\u5643\u5416\u{20E9D}\u35CE\u5605\u55F1\u66F1\u{282E2}\u362D\u7534\u55F0\u55BA\u5497\u5572\u{20C41}\u{20C96}\u5ED0\u{25148}\u{20E76}\u{22C62}"], + ["9e40", "\u{20EA2}\u9EAB\u7D5A\u55DE\u{21075}\u629D\u976D\u5494\u8CCD\u71F6\u9176\u63FC\u63B9\u63FE\u5569\u{22B43}\u9C72\u{22EB3}\u519A\u34DF\u{20DA7}\u51A7\u544D\u551E\u5513\u7666\u8E2D\u{2688A}\u75B1\u80B6\u8804\u8786\u88C7\u81B6\u841C\u{210C1}\u44EC\u7304\u{24706}\u5B90\u830B\u{26893}\u567B\u{226F4}\u{27D2F}\u{241A3}\u{27D73}\u{26ED0}\u{272B6}\u9170\u{211D9}\u9208\u{23CFC}\u{2A6A9}\u{20EAC}\u{20EF9}\u7266\u{21CA2}\u474E\u{24FC2}\u{27FF9}\u{20FEB}\u40FA"], + ["9ea1", "\u9C5D\u651F\u{22DA0}\u48F3\u{247E0}\u{29D7C}\u{20FEC}\u{20E0A}\u6062\u{275A3}\u{20FED}"], + ["9ead", "\u{26048}\u{21187}\u71A3\u7E8E\u9D50\u4E1A\u4E04\u3577\u5B0D\u6CB2\u5367\u36AC\u39DC\u537D\u36A5\u{24618}\u589A\u{24B6E}\u822D\u544B\u57AA\u{25A95}\u{20979}"], + ["9ec5", "\u3A52\u{22465}\u7374\u{29EAC}\u4D09\u9BED\u{23CFE}\u{29F30}\u4C5B\u{24FA9}\u{2959E}\u{29FDE}\u845C\u{23DB6}\u{272B2}\u{267B3}\u{23720}\u632E\u7D25\u{23EF7}\u{23E2C}\u3A2A\u9008\u52CC\u3E74\u367A\u45E9\u{2048E}\u7640\u5AF0\u{20EB6}\u787A\u{27F2E}\u58A7\u40BF\u567C\u9B8B\u5D74\u7654\u{2A434}\u9E85\u4CE1\u75F9\u37FB\u6119\u{230DA}\u{243F2}"], + ["9ef5", "\u565D\u{212A9}\u57A7\u{24963}\u{29E06}\u5234\u{270AE}\u35AD\u6C4A\u9D7C"], + ["9f40", "\u7C56\u9B39\u57DE\u{2176C}\u5C53\u64D3\u{294D0}\u{26335}\u{27164}\u86AD\u{20D28}\u{26D22}\u{24AE2}\u{20D71}"], + ["9f4f", "\u51FE\u{21F0F}\u5D8E\u9703\u{21DD1}\u9E81\u904C\u7B1F\u9B02\u5CD1\u7BA3\u6268\u6335\u9AFF\u7BCF\u9B2A\u7C7E\u9B2E\u7C42\u7C86\u9C15\u7BFC\u9B09\u9F17\u9C1B\u{2493E}\u9F5A\u5573\u5BC3\u4FFD\u9E98\u4FF2\u5260\u3E06\u52D1\u5767\u5056\u59B7\u5E12\u97C8\u9DAB\u8F5C\u5469\u97B4\u9940\u97BA\u532C\u6130"], + ["9fa1", "\u692C\u53DA\u9C0A\u9D02\u4C3B\u9641\u6980\u50A6\u7546\u{2176D}\u99DA\u5273"], + ["9fae", "\u9159\u9681\u915C"], + ["9fb2", "\u9151\u{28E97}\u637F\u{26D23}\u6ACA\u5611\u918E\u757A\u6285\u{203FC}\u734F\u7C70\u{25C21}\u{23CFD}"], + ["9fc1", "\u{24919}\u76D6\u9B9D\u4E2A\u{20CD4}\u83BE\u8842"], + ["9fc9", "\u5C4A\u69C0\u50ED\u577A\u521F\u5DF5\u4ECE\u6C31\u{201F2}\u4F39\u549C\u54DA\u529A\u8D82\u35FE\u5F0C\u35F3"], + ["9fdb", "\u6B52\u917C\u9FA5\u9B97\u982E\u98B4\u9ABA\u9EA8\u9E84\u717A\u7B14"], + ["9fe7", "\u6BFA\u8818\u7F78"], + ["9feb", "\u5620\u{2A64A}\u8E77\u9F53"], + ["9ff0", "\u8DD4\u8E4F\u9E1C\u8E01\u6282\u{2837D}\u8E28\u8E75\u7AD3\u{24A77}\u7A3E\u78D8\u6CEA\u8A67\u7607"], + ["a040", "\u{28A5A}\u9F26\u6CCE\u87D6\u75C3\u{2A2B2}\u7853\u{2F840}\u8D0C\u72E2\u7371\u8B2D\u7302\u74F1\u8CEB\u{24ABB}\u862F\u5FBA\u88A0\u44B7"], + ["a055", "\u{2183B}\u{26E05}"], + ["a058", "\u8A7E\u{2251B}"], + ["a05b", "\u60FD\u7667\u9AD7\u9D44\u936E\u9B8F\u87F5"], + ["a063", "\u880F\u8CF7\u732C\u9721\u9BB0\u35D6\u72B2\u4C07\u7C51\u994A\u{26159}\u6159\u4C04\u9E96\u617D"], + ["a073", "\u575F\u616F\u62A6\u6239\u62CE\u3A5C\u61E2\u53AA\u{233F5}\u6364\u6802\u35D2"], + ["a0a1", "\u5D57\u{28BC2}\u8FDA\u{28E39}"], + ["a0a6", "\u50D9\u{21D46}\u7906\u5332\u9638\u{20F3B}\u4065"], + ["a0ae", "\u77FE"], + ["a0b0", "\u7CC2\u{25F1A}\u7CDA\u7A2D\u8066\u8063\u7D4D\u7505\u74F2\u8994\u821A\u670C\u8062\u{27486}\u805B\u74F0\u8103\u7724\u8989\u{267CC}\u7553\u{26ED1}\u87A9\u87CE\u81C8\u878C\u8A49\u8CAD\u8B43\u772B\u74F8\u84DA\u3635\u69B2\u8DA6"], + ["a0d4", "\u89A9\u7468\u6DB9\u87C1\u{24011}\u74E7\u3DDB\u7176\u60A4\u619C\u3CD1\u7162\u6077"], + ["a0e2", "\u7F71\u{28B2D}\u7250\u60E9\u4B7E\u5220\u3C18\u{23CC7}\u{25ED7}\u{27656}\u{25531}\u{21944}\u{212FE}\u{29903}\u{26DDC}\u{270AD}\u5CC1\u{261AD}\u{28A0F}\u{23677}\u{200EE}\u{26846}\u{24F0E}\u4562\u5B1F\u{2634C}\u9F50\u9EA6\u{2626B}"], + ["a3c0", "\u2400", 31, "\u2421"], + ["c6a1", "\u2460", 9, "\u2474", 9, "\u2170", 9, "\u4E36\u4E3F\u4E85\u4EA0\u5182\u5196\u51AB\u52F9\u5338\u5369\u53B6\u590A\u5B80\u5DDB\u2F33\u5E7F\u5EF4\u5F50\u5F61\u6534\u65E0\u7592\u7676\u8FB5\u96B6\xA8\u02C6\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\uFF3B\uFF3D\u273D\u3041", 23], + ["c740", "\u3059", 58, "\u30A1\u30A2\u30A3\u30A4"], + ["c7a1", "\u30A5", 81, "\u0410", 5, "\u0401\u0416", 4], + ["c840", "\u041B", 26, "\u0451\u0436", 25, "\u21E7\u21B8\u21B9\u31CF\u{200CC}\u4E5A\u{2008A}\u5202\u4491"], + ["c8a1", "\u9FB0\u5188\u9FB1\u{27607}"], + ["c8cd", "\uFFE2\uFFE4\uFF07\uFF02\u3231\u2116\u2121\u309B\u309C\u2E80\u2E84\u2E86\u2E87\u2E88\u2E8A\u2E8C\u2E8D\u2E95\u2E9C\u2E9D\u2EA5\u2EA7\u2EAA\u2EAC\u2EAE\u2EB6\u2EBC\u2EBE\u2EC6\u2ECA\u2ECC\u2ECD\u2ECF\u2ED6\u2ED7\u2EDE\u2EE3"], + ["c8f5", "\u0283\u0250\u025B\u0254\u0275\u0153\xF8\u014B\u028A\u026A"], + ["f9fe", "\uFFED"], + ["fa40", "\u{20547}\u92DB\u{205DF}\u{23FC5}\u854C\u42B5\u73EF\u51B5\u3649\u{24942}\u{289E4}\u9344\u{219DB}\u82EE\u{23CC8}\u783C\u6744\u62DF\u{24933}\u{289AA}\u{202A0}\u{26BB3}\u{21305}\u4FAB\u{224ED}\u5008\u{26D29}\u{27A84}\u{23600}\u{24AB1}\u{22513}\u5029\u{2037E}\u5FA4\u{20380}\u{20347}\u6EDB\u{2041F}\u507D\u5101\u347A\u510E\u986C\u3743\u8416\u{249A4}\u{20487}\u5160\u{233B4}\u516A\u{20BFF}\u{220FC}\u{202E5}\u{22530}\u{2058E}\u{23233}\u{21983}\u5B82\u877D\u{205B3}\u{23C99}\u51B2\u51B8"], + ["faa1", "\u9D34\u51C9\u51CF\u51D1\u3CDC\u51D3\u{24AA6}\u51B3\u51E2\u5342\u51ED\u83CD\u693E\u{2372D}\u5F7B\u520B\u5226\u523C\u52B5\u5257\u5294\u52B9\u52C5\u7C15\u8542\u52E0\u860D\u{26B13}\u5305\u{28ADE}\u5549\u6ED9\u{23F80}\u{20954}\u{23FEC}\u5333\u5344\u{20BE2}\u6CCB\u{21726}\u681B\u73D5\u604A\u3EAA\u38CC\u{216E8}\u71DD\u44A2\u536D\u5374\u{286AB}\u537E\u537F\u{21596}\u{21613}\u77E6\u5393\u{28A9B}\u53A0\u53AB\u53AE\u73A7\u{25772}\u3F59\u739C\u53C1\u53C5\u6C49\u4E49\u57FE\u53D9\u3AAB\u{20B8F}\u53E0\u{23FEB}\u{22DA3}\u53F6\u{20C77}\u5413\u7079\u552B\u6657\u6D5B\u546D\u{26B53}\u{20D74}\u555D\u548F\u54A4\u47A6\u{2170D}\u{20EDD}\u3DB4\u{20D4D}"], + ["fb40", "\u{289BC}\u{22698}\u5547\u4CED\u542F\u7417\u5586\u55A9\u5605\u{218D7}\u{2403A}\u4552\u{24435}\u66B3\u{210B4}\u5637\u66CD\u{2328A}\u66A4\u66AD\u564D\u564F\u78F1\u56F1\u9787\u53FE\u5700\u56EF\u56ED\u{28B66}\u3623\u{2124F}\u5746\u{241A5}\u6C6E\u708B\u5742\u36B1\u{26C7E}\u57E6\u{21416}\u5803\u{21454}\u{24363}\u5826\u{24BF5}\u585C\u58AA\u3561\u58E0\u58DC\u{2123C}\u58FB\u5BFF\u5743\u{2A150}\u{24278}\u93D3\u35A1\u591F\u68A6\u36C3\u6E59"], + ["fba1", "\u{2163E}\u5A24\u5553\u{21692}\u8505\u59C9\u{20D4E}\u{26C81}\u{26D2A}\u{217DC}\u59D9\u{217FB}\u{217B2}\u{26DA6}\u6D71\u{21828}\u{216D5}\u59F9\u{26E45}\u5AAB\u5A63\u36E6\u{249A9}\u5A77\u3708\u5A96\u7465\u5AD3\u{26FA1}\u{22554}\u3D85\u{21911}\u3732\u{216B8}\u5E83\u52D0\u5B76\u6588\u5B7C\u{27A0E}\u4004\u485D\u{20204}\u5BD5\u6160\u{21A34}\u{259CC}\u{205A5}\u5BF3\u5B9D\u4D10\u5C05\u{21B44}\u5C13\u73CE\u5C14\u{21CA5}\u{26B28}\u5C49\u48DD\u5C85\u5CE9\u5CEF\u5D8B\u{21DF9}\u{21E37}\u5D10\u5D18\u5D46\u{21EA4}\u5CBA\u5DD7\u82FC\u382D\u{24901}\u{22049}\u{22173}\u8287\u3836\u3BC2\u5E2E\u6A8A\u5E75\u5E7A\u{244BC}\u{20CD3}\u53A6\u4EB7\u5ED0\u53A8\u{21771}\u5E09\u5EF4\u{28482}"], + ["fc40", "\u5EF9\u5EFB\u38A0\u5EFC\u683E\u941B\u5F0D\u{201C1}\u{2F894}\u3ADE\u48AE\u{2133A}\u5F3A\u{26888}\u{223D0}\u5F58\u{22471}\u5F63\u97BD\u{26E6E}\u5F72\u9340\u{28A36}\u5FA7\u5DB6\u3D5F\u{25250}\u{21F6A}\u{270F8}\u{22668}\u91D6\u{2029E}\u{28A29}\u6031\u6685\u{21877}\u3963\u3DC7\u3639\u5790\u{227B4}\u7971\u3E40\u609E\u60A4\u60B3\u{24982}\u{2498F}\u{27A53}\u74A4\u50E1\u5AA0\u6164\u8424\u6142\u{2F8A6}\u{26ED2}\u6181\u51F4\u{20656}\u6187\u5BAA\u{23FB7}"], + ["fca1", "\u{2285F}\u61D3\u{28B9D}\u{2995D}\u61D0\u3932\u{22980}\u{228C1}\u6023\u615C\u651E\u638B\u{20118}\u62C5\u{21770}\u62D5\u{22E0D}\u636C\u{249DF}\u3A17\u6438\u63F8\u{2138E}\u{217FC}\u6490\u6F8A\u{22E36}\u9814\u{2408C}\u{2571D}\u64E1\u64E5\u947B\u3A66\u643A\u3A57\u654D\u6F16\u{24A28}\u{24A23}\u6585\u656D\u655F\u{2307E}\u65B5\u{24940}\u4B37\u65D1\u40D8\u{21829}\u65E0\u65E3\u5FDF\u{23400}\u6618\u{231F7}\u{231F8}\u6644\u{231A4}\u{231A5}\u664B\u{20E75}\u6667\u{251E6}\u6673\u6674\u{21E3D}\u{23231}\u{285F4}\u{231C8}\u{25313}\u77C5\u{228F7}\u99A4\u6702\u{2439C}\u{24A21}\u3B2B\u69FA\u{237C2}\u675E\u6767\u6762\u{241CD}\u{290ED}\u67D7\u44E9\u6822\u6E50\u923C\u6801\u{233E6}\u{26DA0}\u685D"], + ["fd40", "\u{2346F}\u69E1\u6A0B\u{28ADF}\u6973\u68C3\u{235CD}\u6901\u6900\u3D32\u3A01\u{2363C}\u3B80\u67AC\u6961\u{28A4A}\u42FC\u6936\u6998\u3BA1\u{203C9}\u8363\u5090\u69F9\u{23659}\u{2212A}\u6A45\u{23703}\u6A9D\u3BF3\u67B1\u6AC8\u{2919C}\u3C0D\u6B1D\u{20923}\u60DE\u6B35\u6B74\u{227CD}\u6EB5\u{23ADB}\u{203B5}\u{21958}\u3740\u5421\u{23B5A}\u6BE1\u{23EFC}\u6BDC\u6C37\u{2248B}\u{248F1}\u{26B51}\u6C5A\u8226\u6C79\u{23DBC}\u44C5\u{23DBD}\u{241A4}\u{2490C}\u{24900}"], + ["fda1", "\u{23CC9}\u36E5\u3CEB\u{20D32}\u9B83\u{231F9}\u{22491}\u7F8F\u6837\u{26D25}\u{26DA1}\u{26DEB}\u6D96\u6D5C\u6E7C\u6F04\u{2497F}\u{24085}\u{26E72}\u8533\u{26F74}\u51C7\u6C9C\u6E1D\u842E\u{28B21}\u6E2F\u{23E2F}\u7453\u{23F82}\u79CC\u6E4F\u5A91\u{2304B}\u6FF8\u370D\u6F9D\u{23E30}\u6EFA\u{21497}\u{2403D}\u4555\u93F0\u6F44\u6F5C\u3D4E\u6F74\u{29170}\u3D3B\u6F9F\u{24144}\u6FD3\u{24091}\u{24155}\u{24039}\u{23FF0}\u{23FB4}\u{2413F}\u51DF\u{24156}\u{24157}\u{24140}\u{261DD}\u704B\u707E\u70A7\u7081\u70CC\u70D5\u70D6\u70DF\u4104\u3DE8\u71B4\u7196\u{24277}\u712B\u7145\u5A88\u714A\u716E\u5C9C\u{24365}\u714F\u9362\u{242C1}\u712C\u{2445A}\u{24A27}\u{24A22}\u71BA\u{28BE8}\u70BD\u720E"], + ["fe40", "\u9442\u7215\u5911\u9443\u7224\u9341\u{25605}\u722E\u7240\u{24974}\u68BD\u7255\u7257\u3E55\u{23044}\u680D\u6F3D\u7282\u732A\u732B\u{24823}\u{2882B}\u48ED\u{28804}\u7328\u732E\u73CF\u73AA\u{20C3A}\u{26A2E}\u73C9\u7449\u{241E2}\u{216E7}\u{24A24}\u6623\u36C5\u{249B7}\u{2498D}\u{249FB}\u73F7\u7415\u6903\u{24A26}\u7439\u{205C3}\u3ED7\u745C\u{228AD}\u7460\u{28EB2}\u7447\u73E4\u7476\u83B9\u746C\u3730\u7474\u93F1\u6A2C\u7482\u4953\u{24A8C}"], + ["fea1", "\u{2415F}\u{24A79}\u{28B8F}\u5B46\u{28C03}\u{2189E}\u74C8\u{21988}\u750E\u74E9\u751E\u{28ED9}\u{21A4B}\u5BD7\u{28EAC}\u9385\u754D\u754A\u7567\u756E\u{24F82}\u3F04\u{24D13}\u758E\u745D\u759E\u75B4\u7602\u762C\u7651\u764F\u766F\u7676\u{263F5}\u7690\u81EF\u37F8\u{26911}\u{2690E}\u76A1\u76A5\u76B7\u76CC\u{26F9F}\u8462\u{2509D}\u{2517D}\u{21E1C}\u771E\u7726\u7740\u64AF\u{25220}\u7758\u{232AC}\u77AF\u{28964}\u{28968}\u{216C1}\u77F4\u7809\u{21376}\u{24A12}\u68CA\u78AF\u78C7\u78D3\u96A5\u792E\u{255E0}\u78D7\u7934\u78B1\u{2760C}\u8FB8\u8884\u{28B2B}\u{26083}\u{2261C}\u7986\u8900\u6902\u7980\u{25857}\u799D\u{27B39}\u793C\u79A9\u6E2A\u{27126}\u3EA8\u79C6\u{2910D}\u79D4"] + ]; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/dbcs-data.js +var require_dbcs_data = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/dbcs-data.js"(exports2, module2) { + "use strict"; + module2.exports = { + // == Japanese/ShiftJIS ==================================================== + // All japanese encodings are based on JIS X set of standards: + // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. + // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. + // Has several variations in 1978, 1983, 1990 and 1997. + // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. + // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. + // 2 planes, first is superset of 0208, second - revised 0212. + // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) + // Byte encodings are: + // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte + // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. + // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. + // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. + // 0x00-0x7F - lower part of 0201 + // 0x8E, 0xA1-0xDF - upper part of 0201 + // (0xA1-0xFE)x2 - 0208 plane (94x94). + // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). + // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. + // Used as-is in ISO2022 family. + // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, + // 0201-1976 Roman, 0208-1978, 0208-1983. + // * ISO2022-JP-1: Adds esc seq for 0212-1990. + // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. + // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. + // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. + // + // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. + // + // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html + "shiftjis": { + type: "_dbcs", + table: function() { + return require_shiftjis(); + }, + encodeAdd: { "\xA5": 92, "\u203E": 126 }, + encodeSkipVals: [{ from: 60736, to: 63808 }] + }, + "csshiftjis": "shiftjis", + "mskanji": "shiftjis", + "sjis": "shiftjis", + "windows31j": "shiftjis", + "ms31j": "shiftjis", + "xsjis": "shiftjis", + "windows932": "shiftjis", + "ms932": "shiftjis", + "932": "shiftjis", + "cp932": "shiftjis", + "eucjp": { + type: "_dbcs", + table: function() { + return require_eucjp(); + }, + encodeAdd: { "\xA5": 92, "\u203E": 126 } + }, + // TODO: KDDI extension to Shift_JIS + // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. + // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. + // == Chinese/GBK ========================================================== + // http://en.wikipedia.org/wiki/GBK + // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder + // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 + "gb2312": "cp936", + "gb231280": "cp936", + "gb23121980": "cp936", + "csgb2312": "cp936", + "csiso58gb231280": "cp936", + "euccn": "cp936", + // Microsoft's CP936 is a subset and approximation of GBK. + "windows936": "cp936", + "ms936": "cp936", + "936": "cp936", + "cp936": { + type: "_dbcs", + table: function() { + return require_cp936(); + } + }, + // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. + "gbk": { + type: "_dbcs", + table: function() { + return require_cp936().concat(require_gbk_added()); + } + }, + "xgbk": "gbk", + "isoir58": "gbk", + // GB18030 is an algorithmic extension of GBK. + // Main source: https://www.w3.org/TR/encoding/#gbk-encoder + // http://icu-project.org/docs/papers/gb18030.html + // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml + // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 + "gb18030": { + type: "_dbcs", + table: function() { + return require_cp936().concat(require_gbk_added()); + }, + gb18030: function() { + return require_gb18030_ranges(); + }, + encodeSkipVals: [128], + encodeAdd: { "\u20AC": 41699 } + }, + "chinese": "gb18030", + // == Korean =============================================================== + // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. + "windows949": "cp949", + "ms949": "cp949", + "949": "cp949", + "cp949": { + type: "_dbcs", + table: function() { + return require_cp949(); + } + }, + "cseuckr": "cp949", + "csksc56011987": "cp949", + "euckr": "cp949", + "isoir149": "cp949", + "korean": "cp949", + "ksc56011987": "cp949", + "ksc56011989": "cp949", + "ksc5601": "cp949", + // == Big5/Taiwan/Hong Kong ================================================ + // There are lots of tables for Big5 and cp950. Please see the following links for history: + // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html + // Variations, in roughly number of defined chars: + // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT + // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ + // * Big5-2003 (Taiwan standard) almost superset of cp950. + // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. + // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. + // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. + // Plus, it has 4 combining sequences. + // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 + // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. + // Implementations are not consistent within browsers; sometimes labeled as just big5. + // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. + // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 + // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. + // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt + // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt + // + // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder + // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. + "windows950": "cp950", + "ms950": "cp950", + "950": "cp950", + "cp950": { + type: "_dbcs", + table: function() { + return require_cp950(); + } + }, + // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. + "big5": "big5hkscs", + "big5hkscs": { + type: "_dbcs", + table: function() { + return require_cp950().concat(require_big5_added()); + }, + encodeSkipVals: [41676] + }, + "cnbig5": "big5hkscs", + "csbig5": "big5hkscs", + "xxbig5": "big5hkscs" + }; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/index.js +var require_encodings = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/index.js"(exports2, module2) { + "use strict"; + var modules = [ + require_internal(), + require_utf16(), + require_utf7(), + require_sbcs_codec(), + require_sbcs_data(), + require_sbcs_data_generated(), + require_dbcs_codec(), + require_dbcs_data() + ]; + for (i = 0; i < modules.length; i++) { + module2 = modules[i]; + for (enc in module2) + if (Object.prototype.hasOwnProperty.call(module2, enc)) + exports2[enc] = module2[enc]; + } + var module2; + var enc; + var i; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/lib/streams.js +var require_streams = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/lib/streams.js"(exports2, module2) { + "use strict"; + var Buffer2 = require("buffer").Buffer; + var Transform = require("stream").Transform; + module2.exports = function(iconv) { + iconv.encodeStream = function encodeStream(encoding, options) { + return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); + }; + iconv.decodeStream = function decodeStream(encoding, options) { + return new IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); + }; + iconv.supportsStreams = true; + iconv.IconvLiteEncoderStream = IconvLiteEncoderStream; + iconv.IconvLiteDecoderStream = IconvLiteDecoderStream; + iconv._collect = IconvLiteDecoderStream.prototype.collect; + }; + function IconvLiteEncoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.decodeStrings = false; + Transform.call(this, options); + } + IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteEncoderStream } + }); + IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { + if (typeof chunk != "string") + return done(new Error("Iconv encoding stream needs strings as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res); + done(); + } catch (e) { + done(e); + } + }; + IconvLiteEncoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res); + done(); + } catch (e) { + done(e); + } + }; + IconvLiteEncoderStream.prototype.collect = function(cb) { + var chunks = []; + this.on("error", cb); + this.on("data", function(chunk) { + chunks.push(chunk); + }); + this.on("end", function() { + cb(null, Buffer2.concat(chunks)); + }); + return this; + }; + function IconvLiteDecoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.encoding = this.encoding = "utf8"; + Transform.call(this, options); + } + IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteDecoderStream } + }); + IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { + if (!Buffer2.isBuffer(chunk)) + return done(new Error("Iconv decoding stream needs buffers as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res, this.encoding); + done(); + } catch (e) { + done(e); + } + }; + IconvLiteDecoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res, this.encoding); + done(); + } catch (e) { + done(e); + } + }; + IconvLiteDecoderStream.prototype.collect = function(cb) { + var res = ""; + this.on("error", cb); + this.on("data", function(chunk) { + res += chunk; + }); + this.on("end", function() { + cb(null, res); + }); + return this; + }; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/lib/extend-node.js +var require_extend_node = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/lib/extend-node.js"(exports2, module2) { + "use strict"; + var Buffer2 = require("buffer").Buffer; + module2.exports = function(iconv) { + var original = void 0; + iconv.supportsNodeEncodingsExtension = !(Buffer2.from || new Buffer2(0) instanceof Uint8Array); + iconv.extendNodeEncodings = function extendNodeEncodings() { + if (original) return; + original = {}; + if (!iconv.supportsNodeEncodingsExtension) { + console.error("ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node"); + console.error("See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility"); + return; + } + var nodeNativeEncodings = { + "hex": true, + "utf8": true, + "utf-8": true, + "ascii": true, + "binary": true, + "base64": true, + "ucs2": true, + "ucs-2": true, + "utf16le": true, + "utf-16le": true + }; + Buffer2.isNativeEncoding = function(enc) { + return enc && nodeNativeEncodings[enc.toLowerCase()]; + }; + var SlowBuffer = require("buffer").SlowBuffer; + original.SlowBufferToString = SlowBuffer.prototype.toString; + SlowBuffer.prototype.toString = function(encoding, start, end) { + encoding = String(encoding || "utf8").toLowerCase(); + if (Buffer2.isNativeEncoding(encoding)) + return original.SlowBufferToString.call(this, encoding, start, end); + if (typeof start == "undefined") start = 0; + if (typeof end == "undefined") end = this.length; + return iconv.decode(this.slice(start, end), encoding); + }; + original.SlowBufferWrite = SlowBuffer.prototype.write; + SlowBuffer.prototype.write = function(string, offset, length, encoding) { + if (isFinite(offset)) { + if (!isFinite(length)) { + encoding = length; + length = void 0; + } + } else { + var swap = encoding; + encoding = offset; + offset = length; + length = swap; + } + offset = +offset || 0; + var remaining = this.length - offset; + if (!length) { + length = remaining; + } else { + length = +length; + if (length > remaining) { + length = remaining; + } + } + encoding = String(encoding || "utf8").toLowerCase(); + if (Buffer2.isNativeEncoding(encoding)) + return original.SlowBufferWrite.call(this, string, offset, length, encoding); + if (string.length > 0 && (length < 0 || offset < 0)) + throw new RangeError("attempt to write beyond buffer bounds"); + var buf = iconv.encode(string, encoding); + if (buf.length < length) length = buf.length; + buf.copy(this, offset, 0, length); + return length; + }; + original.BufferIsEncoding = Buffer2.isEncoding; + Buffer2.isEncoding = function(encoding) { + return Buffer2.isNativeEncoding(encoding) || iconv.encodingExists(encoding); + }; + original.BufferByteLength = Buffer2.byteLength; + Buffer2.byteLength = SlowBuffer.byteLength = function(str, encoding) { + encoding = String(encoding || "utf8").toLowerCase(); + if (Buffer2.isNativeEncoding(encoding)) + return original.BufferByteLength.call(this, str, encoding); + return iconv.encode(str, encoding).length; + }; + original.BufferToString = Buffer2.prototype.toString; + Buffer2.prototype.toString = function(encoding, start, end) { + encoding = String(encoding || "utf8").toLowerCase(); + if (Buffer2.isNativeEncoding(encoding)) + return original.BufferToString.call(this, encoding, start, end); + if (typeof start == "undefined") start = 0; + if (typeof end == "undefined") end = this.length; + return iconv.decode(this.slice(start, end), encoding); + }; + original.BufferWrite = Buffer2.prototype.write; + Buffer2.prototype.write = function(string, offset, length, encoding) { + var _offset = offset, _length = length, _encoding = encoding; + if (isFinite(offset)) { + if (!isFinite(length)) { + encoding = length; + length = void 0; + } + } else { + var swap = encoding; + encoding = offset; + offset = length; + length = swap; + } + encoding = String(encoding || "utf8").toLowerCase(); + if (Buffer2.isNativeEncoding(encoding)) + return original.BufferWrite.call(this, string, _offset, _length, _encoding); + offset = +offset || 0; + var remaining = this.length - offset; + if (!length) { + length = remaining; + } else { + length = +length; + if (length > remaining) { + length = remaining; + } + } + if (string.length > 0 && (length < 0 || offset < 0)) + throw new RangeError("attempt to write beyond buffer bounds"); + var buf = iconv.encode(string, encoding); + if (buf.length < length) length = buf.length; + buf.copy(this, offset, 0, length); + return length; + }; + if (iconv.supportsStreams) { + var Readable = require("stream").Readable; + original.ReadableSetEncoding = Readable.prototype.setEncoding; + Readable.prototype.setEncoding = function setEncoding(enc, options) { + this._readableState.decoder = iconv.getDecoder(enc, options); + this._readableState.encoding = enc; + }; + Readable.prototype.collect = iconv._collect; + } + }; + iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() { + if (!iconv.supportsNodeEncodingsExtension) + return; + if (!original) + throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called."); + delete Buffer2.isNativeEncoding; + var SlowBuffer = require("buffer").SlowBuffer; + SlowBuffer.prototype.toString = original.SlowBufferToString; + SlowBuffer.prototype.write = original.SlowBufferWrite; + Buffer2.isEncoding = original.BufferIsEncoding; + Buffer2.byteLength = original.BufferByteLength; + Buffer2.prototype.toString = original.BufferToString; + Buffer2.prototype.write = original.BufferWrite; + if (iconv.supportsStreams) { + var Readable = require("stream").Readable; + Readable.prototype.setEncoding = original.ReadableSetEncoding; + delete Readable.prototype.collect; + } + original = void 0; + }; + }; + } +}); + +// ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/lib/index.js +var require_lib2 = __commonJS({ + "../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/lib/index.js"(exports2, module2) { + "use strict"; + var Buffer2 = require_safer().Buffer; + var bomHandling = require_bom_handling(); + var iconv = module2.exports; + iconv.encodings = null; + iconv.defaultCharUnicode = "\uFFFD"; + iconv.defaultCharSingleByte = "?"; + iconv.encode = function encode(str, encoding, options) { + str = "" + (str || ""); + var encoder = iconv.getEncoder(encoding, options); + var res = encoder.write(str); + var trail = encoder.end(); + return trail && trail.length > 0 ? Buffer2.concat([res, trail]) : res; + }; + iconv.decode = function decode(buf, encoding, options) { + if (typeof buf === "string") { + if (!iconv.skipDecodeWarning) { + console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"); + iconv.skipDecodeWarning = true; + } + buf = Buffer2.from("" + (buf || ""), "binary"); + } + var decoder = iconv.getDecoder(encoding, options); + var res = decoder.write(buf); + var trail = decoder.end(); + return trail ? res + trail : res; + }; + iconv.encodingExists = function encodingExists(enc) { + try { + iconv.getCodec(enc); + return true; + } catch (e) { + return false; + } + }; + iconv.toEncoding = iconv.encode; + iconv.fromEncoding = iconv.decode; + iconv._codecDataCache = {}; + iconv.getCodec = function getCodec(encoding) { + if (!iconv.encodings) + iconv.encodings = require_encodings(); + var enc = iconv._canonicalizeEncoding(encoding); + var codecOptions = {}; + while (true) { + var codec = iconv._codecDataCache[enc]; + if (codec) + return codec; + var codecDef = iconv.encodings[enc]; + switch (typeof codecDef) { + case "string": + enc = codecDef; + break; + case "object": + for (var key in codecDef) + codecOptions[key] = codecDef[key]; + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; + enc = codecDef.type; + break; + case "function": + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; + codec = new codecDef(codecOptions, iconv); + iconv._codecDataCache[codecOptions.encodingName] = codec; + return codec; + default: + throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '" + enc + "')"); + } + } + }; + iconv._canonicalizeEncoding = function(encoding) { + return ("" + encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); + }; + iconv.getEncoder = function getEncoder(encoding, options) { + var codec = iconv.getCodec(encoding), encoder = new codec.encoder(options, codec); + if (codec.bomAware && options && options.addBOM) + encoder = new bomHandling.PrependBOM(encoder, options); + return encoder; + }; + iconv.getDecoder = function getDecoder(encoding, options) { + var codec = iconv.getCodec(encoding), decoder = new codec.decoder(options, codec); + if (codec.bomAware && !(options && options.stripBOM === false)) + decoder = new bomHandling.StripBOM(decoder, options); + return decoder; + }; + var nodeVer = typeof process !== "undefined" && process.versions && process.versions.node; + if (nodeVer) { + nodeVerArr = nodeVer.split(".").map(Number); + if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) { + require_streams()(iconv); + } + require_extend_node()(iconv); + } + var nodeVerArr; + if (false) { + console.error("iconv-lite warning: javascript files use encoding different from utf-8. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); + } + } +}); + +// ../../node_modules/.pnpm/unpipe@1.0.0/node_modules/unpipe/index.js +var require_unpipe = __commonJS({ + "../../node_modules/.pnpm/unpipe@1.0.0/node_modules/unpipe/index.js"(exports2, module2) { + "use strict"; + module2.exports = unpipe; + function hasPipeDataListeners(stream) { + var listeners = stream.listeners("data"); + for (var i = 0; i < listeners.length; i++) { + if (listeners[i].name === "ondata") { + return true; + } + } + return false; + } + function unpipe(stream) { + if (!stream) { + throw new TypeError("argument stream is required"); + } + if (typeof stream.unpipe === "function") { + stream.unpipe(); + return; + } + if (!hasPipeDataListeners(stream)) { + return; + } + var listener; + var listeners = stream.listeners("close"); + for (var i = 0; i < listeners.length; i++) { + listener = listeners[i]; + if (listener.name !== "cleanup" && listener.name !== "onclose") { + continue; + } + listener.call(stream); + } + } + } +}); + +// ../../node_modules/.pnpm/raw-body@2.5.3/node_modules/raw-body/index.js +var require_raw_body = __commonJS({ + "../../node_modules/.pnpm/raw-body@2.5.3/node_modules/raw-body/index.js"(exports2, module2) { + "use strict"; + var asyncHooks = tryRequireAsyncHooks(); + var bytes = require_bytes(); + var createError = require_http_errors(); + var iconv = require_lib2(); + var unpipe = require_unpipe(); + module2.exports = getRawBody; + var ICONV_ENCODING_MESSAGE_REGEXP = /^Encoding not recognized: /; + function getDecoder(encoding) { + if (!encoding) return null; + try { + return iconv.getDecoder(encoding); + } catch (e) { + if (!ICONV_ENCODING_MESSAGE_REGEXP.test(e.message)) throw e; + throw createError(415, "specified encoding unsupported", { + encoding, + type: "encoding.unsupported" + }); + } + } + function getRawBody(stream, options, callback) { + var done = callback; + var opts = options || {}; + if (stream === void 0) { + throw new TypeError("argument stream is required"); + } else if (typeof stream !== "object" || stream === null || typeof stream.on !== "function") { + throw new TypeError("argument stream must be a stream"); + } + if (options === true || typeof options === "string") { + opts = { + encoding: options + }; + } + if (typeof options === "function") { + done = options; + opts = {}; + } + if (done !== void 0 && typeof done !== "function") { + throw new TypeError("argument callback must be a function"); + } + if (!done && !global.Promise) { + throw new TypeError("argument callback is required"); + } + var encoding = opts.encoding !== true ? opts.encoding : "utf-8"; + var limit = bytes.parse(opts.limit); + var length = opts.length != null && !isNaN(opts.length) ? parseInt(opts.length, 10) : null; + if (done) { + return readStream(stream, encoding, length, limit, wrap(done)); + } + return new Promise(function executor(resolve, reject) { + readStream(stream, encoding, length, limit, function onRead(err, buf) { + if (err) return reject(err); + resolve(buf); + }); + }); + } + function halt(stream) { + unpipe(stream); + if (typeof stream.pause === "function") { + stream.pause(); + } + } + function readStream(stream, encoding, length, limit, callback) { + var complete = false; + var sync = true; + if (limit !== null && length !== null && length > limit) { + return done(createError(413, "request entity too large", { + expected: length, + length, + limit, + type: "entity.too.large" + })); + } + var state = stream._readableState; + if (stream._decoder || state && (state.encoding || state.decoder)) { + return done(createError(500, "stream encoding should not be set", { + type: "stream.encoding.set" + })); + } + if (typeof stream.readable !== "undefined" && !stream.readable) { + return done(createError(500, "stream is not readable", { + type: "stream.not.readable" + })); + } + var received = 0; + var decoder; + try { + decoder = getDecoder(encoding); + } catch (err) { + return done(err); + } + var buffer = decoder ? "" : []; + stream.on("aborted", onAborted); + stream.on("close", cleanup); + stream.on("data", onData); + stream.on("end", onEnd); + stream.on("error", onEnd); + sync = false; + function done() { + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + complete = true; + if (sync) { + process.nextTick(invokeCallback); + } else { + invokeCallback(); + } + function invokeCallback() { + cleanup(); + if (args[0]) { + halt(stream); + } + callback.apply(null, args); + } + } + function onAborted() { + if (complete) return; + done(createError(400, "request aborted", { + code: "ECONNABORTED", + expected: length, + length, + received, + type: "request.aborted" + })); + } + function onData(chunk) { + if (complete) return; + received += chunk.length; + if (limit !== null && received > limit) { + done(createError(413, "request entity too large", { + limit, + received, + type: "entity.too.large" + })); + } else if (decoder) { + buffer += decoder.write(chunk); + } else { + buffer.push(chunk); + } + } + function onEnd(err) { + if (complete) return; + if (err) return done(err); + if (length !== null && received !== length) { + done(createError(400, "request size did not match content length", { + expected: length, + length, + received, + type: "request.size.invalid" + })); + } else { + var string = decoder ? buffer + (decoder.end() || "") : Buffer.concat(buffer); + done(null, string); + } + } + function cleanup() { + buffer = null; + stream.removeListener("aborted", onAborted); + stream.removeListener("data", onData); + stream.removeListener("end", onEnd); + stream.removeListener("error", onEnd); + stream.removeListener("close", cleanup); + } + } + function tryRequireAsyncHooks() { + try { + return require("async_hooks"); + } catch (e) { + return {}; + } + } + function wrap(fn) { + var res; + if (asyncHooks.AsyncResource) { + res = new asyncHooks.AsyncResource(fn.name || "bound-anonymous-fn"); + } + if (!res || !res.runInAsyncScope) { + return fn; + } + return res.runInAsyncScope.bind(res, fn, null); + } + } +}); + +// ../../node_modules/.pnpm/ee-first@1.1.1/node_modules/ee-first/index.js +var require_ee_first = __commonJS({ + "../../node_modules/.pnpm/ee-first@1.1.1/node_modules/ee-first/index.js"(exports2, module2) { + "use strict"; + module2.exports = first; + function first(stuff, done) { + if (!Array.isArray(stuff)) + throw new TypeError("arg must be an array of [ee, events...] arrays"); + var cleanups = []; + for (var i = 0; i < stuff.length; i++) { + var arr = stuff[i]; + if (!Array.isArray(arr) || arr.length < 2) + throw new TypeError("each array member must be [ee, events...]"); + var ee = arr[0]; + for (var j = 1; j < arr.length; j++) { + var event = arr[j]; + var fn = listener(event, callback); + ee.on(event, fn); + cleanups.push({ + ee, + event, + fn + }); + } + } + function callback() { + cleanup(); + done.apply(null, arguments); + } + function cleanup() { + var x; + for (var i2 = 0; i2 < cleanups.length; i2++) { + x = cleanups[i2]; + x.ee.removeListener(x.event, x.fn); + } + } + function thunk(fn2) { + done = fn2; + } + thunk.cancel = cleanup; + return thunk; + } + function listener(event, done) { + return function onevent(arg1) { + var args = new Array(arguments.length); + var ee = this; + var err = event === "error" ? arg1 : null; + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + done(err, ee, event, args); + }; + } + } +}); + +// ../../node_modules/.pnpm/on-finished@2.4.1/node_modules/on-finished/index.js +var require_on_finished = __commonJS({ + "../../node_modules/.pnpm/on-finished@2.4.1/node_modules/on-finished/index.js"(exports2, module2) { + "use strict"; + module2.exports = onFinished; + module2.exports.isFinished = isFinished; + var asyncHooks = tryRequireAsyncHooks(); + var first = require_ee_first(); + var defer = typeof setImmediate === "function" ? setImmediate : function(fn) { + process.nextTick(fn.bind.apply(fn, arguments)); + }; + function onFinished(msg, listener) { + if (isFinished(msg) !== false) { + defer(listener, null, msg); + return msg; + } + attachListener(msg, wrap(listener)); + return msg; + } + function isFinished(msg) { + var socket = msg.socket; + if (typeof msg.finished === "boolean") { + return Boolean(msg.finished || socket && !socket.writable); + } + if (typeof msg.complete === "boolean") { + return Boolean(msg.upgrade || !socket || !socket.readable || msg.complete && !msg.readable); + } + return void 0; + } + function attachFinishedListener(msg, callback) { + var eeMsg; + var eeSocket; + var finished = false; + function onFinish(error) { + eeMsg.cancel(); + eeSocket.cancel(); + finished = true; + callback(error); + } + eeMsg = eeSocket = first([[msg, "end", "finish"]], onFinish); + function onSocket(socket) { + msg.removeListener("socket", onSocket); + if (finished) return; + if (eeMsg !== eeSocket) return; + eeSocket = first([[socket, "error", "close"]], onFinish); + } + if (msg.socket) { + onSocket(msg.socket); + return; + } + msg.on("socket", onSocket); + if (msg.socket === void 0) { + patchAssignSocket(msg, onSocket); + } + } + function attachListener(msg, listener) { + var attached = msg.__onFinished; + if (!attached || !attached.queue) { + attached = msg.__onFinished = createListener(msg); + attachFinishedListener(msg, attached); + } + attached.queue.push(listener); + } + function createListener(msg) { + function listener(err) { + if (msg.__onFinished === listener) msg.__onFinished = null; + if (!listener.queue) return; + var queue = listener.queue; + listener.queue = null; + for (var i = 0; i < queue.length; i++) { + queue[i](err, msg); + } + } + listener.queue = []; + return listener; + } + function patchAssignSocket(res, callback) { + var assignSocket = res.assignSocket; + if (typeof assignSocket !== "function") return; + res.assignSocket = function _assignSocket(socket) { + assignSocket.call(this, socket); + callback(socket); + }; + } + function tryRequireAsyncHooks() { + try { + return require("async_hooks"); + } catch (e) { + return {}; + } + } + function wrap(fn) { + var res; + if (asyncHooks.AsyncResource) { + res = new asyncHooks.AsyncResource(fn.name || "bound-anonymous-fn"); + } + if (!res || !res.runInAsyncScope) { + return fn; + } + return res.runInAsyncScope.bind(res, fn, null); + } + } +}); + +// ../../node_modules/.pnpm/body-parser@1.20.4/node_modules/body-parser/lib/read.js +var require_read = __commonJS({ + "../../node_modules/.pnpm/body-parser@1.20.4/node_modules/body-parser/lib/read.js"(exports2, module2) { + "use strict"; + var createError = require_http_errors(); + var destroy = require_destroy(); + var getBody = require_raw_body(); + var iconv = require_lib2(); + var onFinished = require_on_finished(); + var unpipe = require_unpipe(); + var zlib = require("zlib"); + module2.exports = read; + function read(req, res, next, parse2, debug, options) { + var length; + var opts = options; + var stream; + req._body = true; + var encoding = opts.encoding !== null ? opts.encoding : null; + var verify = opts.verify; + try { + stream = contentstream(req, debug, opts.inflate); + length = stream.length; + stream.length = void 0; + } catch (err) { + return next(err); + } + opts.length = length; + opts.encoding = verify ? null : encoding; + if (opts.encoding === null && encoding !== null && !iconv.encodingExists(encoding)) { + return next(createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', { + charset: encoding.toLowerCase(), + type: "charset.unsupported" + })); + } + debug("read body"); + getBody(stream, opts, function(error, body) { + if (error) { + var _error; + if (error.type === "encoding.unsupported") { + _error = createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', { + charset: encoding.toLowerCase(), + type: "charset.unsupported" + }); + } else { + _error = createError(400, error); + } + if (stream !== req) { + unpipe(req); + destroy(stream, true); + } + dump(req, function onfinished() { + next(createError(400, _error)); + }); + return; + } + if (verify) { + try { + debug("verify body"); + verify(req, res, body, encoding); + } catch (err) { + next(createError(403, err, { + body, + type: err.type || "entity.verify.failed" + })); + return; + } + } + var str = body; + try { + debug("parse body"); + str = typeof body !== "string" && encoding !== null ? iconv.decode(body, encoding) : body; + req.body = parse2(str); + } catch (err) { + next(createError(400, err, { + body: str, + type: err.type || "entity.parse.failed" + })); + return; + } + next(); + }); + } + function contentstream(req, debug, inflate) { + var encoding = (req.headers["content-encoding"] || "identity").toLowerCase(); + var length = req.headers["content-length"]; + var stream; + debug('content-encoding "%s"', encoding); + if (inflate === false && encoding !== "identity") { + throw createError(415, "content encoding unsupported", { + encoding, + type: "encoding.unsupported" + }); + } + switch (encoding) { + case "deflate": + stream = zlib.createInflate(); + debug("inflate body"); + req.pipe(stream); + break; + case "gzip": + stream = zlib.createGunzip(); + debug("gunzip body"); + req.pipe(stream); + break; + case "identity": + stream = req; + stream.length = length; + break; + default: + throw createError(415, 'unsupported content encoding "' + encoding + '"', { + encoding, + type: "encoding.unsupported" + }); + } + return stream; + } + function dump(req, callback) { + if (onFinished.isFinished(req)) { + callback(null); + } else { + onFinished(req, callback); + req.resume(); + } + } + } +}); + +// ../../node_modules/.pnpm/media-typer@0.3.0/node_modules/media-typer/index.js +var require_media_typer = __commonJS({ + "../../node_modules/.pnpm/media-typer@0.3.0/node_modules/media-typer/index.js"(exports2) { + var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g; + var textRegExp = /^[\u0020-\u007e\u0080-\u00ff]+$/; + var tokenRegExp = /^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/; + var qescRegExp = /\\([\u0000-\u007f])/g; + var quoteRegExp = /([\\"])/g; + var subtypeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/; + var typeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/; + var typeRegExp = /^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/; + exports2.format = format; + exports2.parse = parse2; + function format(obj2) { + if (!obj2 || typeof obj2 !== "object") { + throw new TypeError("argument obj is required"); + } + var parameters = obj2.parameters; + var subtype = obj2.subtype; + var suffix = obj2.suffix; + var type = obj2.type; + if (!type || !typeNameRegExp.test(type)) { + throw new TypeError("invalid type"); + } + if (!subtype || !subtypeNameRegExp.test(subtype)) { + throw new TypeError("invalid subtype"); + } + var string = type + "/" + subtype; + if (suffix) { + if (!typeNameRegExp.test(suffix)) { + throw new TypeError("invalid suffix"); + } + string += "+" + suffix; + } + if (parameters && typeof parameters === "object") { + var param; + var params = Object.keys(parameters).sort(); + for (var i = 0; i < params.length; i++) { + param = params[i]; + if (!tokenRegExp.test(param)) { + throw new TypeError("invalid parameter name"); + } + string += "; " + param + "=" + qstring(parameters[param]); + } + } + return string; + } + function parse2(string) { + if (!string) { + throw new TypeError("argument string is required"); + } + if (typeof string === "object") { + string = getcontenttype(string); + } + if (typeof string !== "string") { + throw new TypeError("argument string is required to be a string"); + } + var index = string.indexOf(";"); + var type = index !== -1 ? string.substr(0, index) : string; + var key; + var match; + var obj2 = splitType(type); + var params = {}; + var value; + paramRegExp.lastIndex = index; + while (match = paramRegExp.exec(string)) { + if (match.index !== index) { + throw new TypeError("invalid parameter format"); + } + index += match[0].length; + key = match[1].toLowerCase(); + value = match[2]; + if (value[0] === '"') { + value = value.substr(1, value.length - 2).replace(qescRegExp, "$1"); + } + params[key] = value; + } + if (index !== -1 && index !== string.length) { + throw new TypeError("invalid parameter format"); + } + obj2.parameters = params; + return obj2; + } + function getcontenttype(obj2) { + if (typeof obj2.getHeader === "function") { + return obj2.getHeader("content-type"); + } + if (typeof obj2.headers === "object") { + return obj2.headers && obj2.headers["content-type"]; + } + } + function qstring(val) { + var str = String(val); + if (tokenRegExp.test(str)) { + return str; + } + if (str.length > 0 && !textRegExp.test(str)) { + throw new TypeError("invalid parameter value"); + } + return '"' + str.replace(quoteRegExp, "\\$1") + '"'; + } + function splitType(string) { + var match = typeRegExp.exec(string.toLowerCase()); + if (!match) { + throw new TypeError("invalid media type"); + } + var type = match[1]; + var subtype = match[2]; + var suffix; + var index = subtype.lastIndexOf("+"); + if (index !== -1) { + suffix = subtype.substr(index + 1); + subtype = subtype.substr(0, index); + } + var obj2 = { + type, + subtype, + suffix + }; + return obj2; + } + } +}); + +// ../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/db.json +var require_db = __commonJS({ + "../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/db.json"(exports2, module2) { + module2.exports = { + "application/1d-interleaved-parityfec": { + source: "iana" + }, + "application/3gpdash-qoe-report+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/3gpp-ims+xml": { + source: "iana", + compressible: true + }, + "application/3gpphal+json": { + source: "iana", + compressible: true + }, + "application/3gpphalforms+json": { + source: "iana", + compressible: true + }, + "application/a2l": { + source: "iana" + }, + "application/ace+cbor": { + source: "iana" + }, + "application/activemessage": { + source: "iana" + }, + "application/activity+json": { + source: "iana", + compressible: true + }, + "application/alto-costmap+json": { + source: "iana", + compressible: true + }, + "application/alto-costmapfilter+json": { + source: "iana", + compressible: true + }, + "application/alto-directory+json": { + source: "iana", + compressible: true + }, + "application/alto-endpointcost+json": { + source: "iana", + compressible: true + }, + "application/alto-endpointcostparams+json": { + source: "iana", + compressible: true + }, + "application/alto-endpointprop+json": { + source: "iana", + compressible: true + }, + "application/alto-endpointpropparams+json": { + source: "iana", + compressible: true + }, + "application/alto-error+json": { + source: "iana", + compressible: true + }, + "application/alto-networkmap+json": { + source: "iana", + compressible: true + }, + "application/alto-networkmapfilter+json": { + source: "iana", + compressible: true + }, + "application/alto-updatestreamcontrol+json": { + source: "iana", + compressible: true + }, + "application/alto-updatestreamparams+json": { + source: "iana", + compressible: true + }, + "application/aml": { + source: "iana" + }, + "application/andrew-inset": { + source: "iana", + extensions: ["ez"] + }, + "application/applefile": { + source: "iana" + }, + "application/applixware": { + source: "apache", + extensions: ["aw"] + }, + "application/at+jwt": { + source: "iana" + }, + "application/atf": { + source: "iana" + }, + "application/atfx": { + source: "iana" + }, + "application/atom+xml": { + source: "iana", + compressible: true, + extensions: ["atom"] + }, + "application/atomcat+xml": { + source: "iana", + compressible: true, + extensions: ["atomcat"] + }, + "application/atomdeleted+xml": { + source: "iana", + compressible: true, + extensions: ["atomdeleted"] + }, + "application/atomicmail": { + source: "iana" + }, + "application/atomsvc+xml": { + source: "iana", + compressible: true, + extensions: ["atomsvc"] + }, + "application/atsc-dwd+xml": { + source: "iana", + compressible: true, + extensions: ["dwd"] + }, + "application/atsc-dynamic-event-message": { + source: "iana" + }, + "application/atsc-held+xml": { + source: "iana", + compressible: true, + extensions: ["held"] + }, + "application/atsc-rdt+json": { + source: "iana", + compressible: true + }, + "application/atsc-rsat+xml": { + source: "iana", + compressible: true, + extensions: ["rsat"] + }, + "application/atxml": { + source: "iana" + }, + "application/auth-policy+xml": { + source: "iana", + compressible: true + }, + "application/bacnet-xdd+zip": { + source: "iana", + compressible: false + }, + "application/batch-smtp": { + source: "iana" + }, + "application/bdoc": { + compressible: false, + extensions: ["bdoc"] + }, + "application/beep+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/calendar+json": { + source: "iana", + compressible: true + }, + "application/calendar+xml": { + source: "iana", + compressible: true, + extensions: ["xcs"] + }, + "application/call-completion": { + source: "iana" + }, + "application/cals-1840": { + source: "iana" + }, + "application/captive+json": { + source: "iana", + compressible: true + }, + "application/cbor": { + source: "iana" + }, + "application/cbor-seq": { + source: "iana" + }, + "application/cccex": { + source: "iana" + }, + "application/ccmp+xml": { + source: "iana", + compressible: true + }, + "application/ccxml+xml": { + source: "iana", + compressible: true, + extensions: ["ccxml"] + }, + "application/cdfx+xml": { + source: "iana", + compressible: true, + extensions: ["cdfx"] + }, + "application/cdmi-capability": { + source: "iana", + extensions: ["cdmia"] + }, + "application/cdmi-container": { + source: "iana", + extensions: ["cdmic"] + }, + "application/cdmi-domain": { + source: "iana", + extensions: ["cdmid"] + }, + "application/cdmi-object": { + source: "iana", + extensions: ["cdmio"] + }, + "application/cdmi-queue": { + source: "iana", + extensions: ["cdmiq"] + }, + "application/cdni": { + source: "iana" + }, + "application/cea": { + source: "iana" + }, + "application/cea-2018+xml": { + source: "iana", + compressible: true + }, + "application/cellml+xml": { + source: "iana", + compressible: true + }, + "application/cfw": { + source: "iana" + }, + "application/city+json": { + source: "iana", + compressible: true + }, + "application/clr": { + source: "iana" + }, + "application/clue+xml": { + source: "iana", + compressible: true + }, + "application/clue_info+xml": { + source: "iana", + compressible: true + }, + "application/cms": { + source: "iana" + }, + "application/cnrp+xml": { + source: "iana", + compressible: true + }, + "application/coap-group+json": { + source: "iana", + compressible: true + }, + "application/coap-payload": { + source: "iana" + }, + "application/commonground": { + source: "iana" + }, + "application/conference-info+xml": { + source: "iana", + compressible: true + }, + "application/cose": { + source: "iana" + }, + "application/cose-key": { + source: "iana" + }, + "application/cose-key-set": { + source: "iana" + }, + "application/cpl+xml": { + source: "iana", + compressible: true, + extensions: ["cpl"] + }, + "application/csrattrs": { + source: "iana" + }, + "application/csta+xml": { + source: "iana", + compressible: true + }, + "application/cstadata+xml": { + source: "iana", + compressible: true + }, + "application/csvm+json": { + source: "iana", + compressible: true + }, + "application/cu-seeme": { + source: "apache", + extensions: ["cu"] + }, + "application/cwt": { + source: "iana" + }, + "application/cybercash": { + source: "iana" + }, + "application/dart": { + compressible: true + }, + "application/dash+xml": { + source: "iana", + compressible: true, + extensions: ["mpd"] + }, + "application/dash-patch+xml": { + source: "iana", + compressible: true, + extensions: ["mpp"] + }, + "application/dashdelta": { + source: "iana" + }, + "application/davmount+xml": { + source: "iana", + compressible: true, + extensions: ["davmount"] + }, + "application/dca-rft": { + source: "iana" + }, + "application/dcd": { + source: "iana" + }, + "application/dec-dx": { + source: "iana" + }, + "application/dialog-info+xml": { + source: "iana", + compressible: true + }, + "application/dicom": { + source: "iana" + }, + "application/dicom+json": { + source: "iana", + compressible: true + }, + "application/dicom+xml": { + source: "iana", + compressible: true + }, + "application/dii": { + source: "iana" + }, + "application/dit": { + source: "iana" + }, + "application/dns": { + source: "iana" + }, + "application/dns+json": { + source: "iana", + compressible: true + }, + "application/dns-message": { + source: "iana" + }, + "application/docbook+xml": { + source: "apache", + compressible: true, + extensions: ["dbk"] + }, + "application/dots+cbor": { + source: "iana" + }, + "application/dskpp+xml": { + source: "iana", + compressible: true + }, + "application/dssc+der": { + source: "iana", + extensions: ["dssc"] + }, + "application/dssc+xml": { + source: "iana", + compressible: true, + extensions: ["xdssc"] + }, + "application/dvcs": { + source: "iana" + }, + "application/ecmascript": { + source: "iana", + compressible: true, + extensions: ["es", "ecma"] + }, + "application/edi-consent": { + source: "iana" + }, + "application/edi-x12": { + source: "iana", + compressible: false + }, + "application/edifact": { + source: "iana", + compressible: false + }, + "application/efi": { + source: "iana" + }, + "application/elm+json": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/elm+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.cap+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/emergencycalldata.comment+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.control+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.deviceinfo+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.ecall.msd": { + source: "iana" + }, + "application/emergencycalldata.providerinfo+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.serviceinfo+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.subscriberinfo+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.veds+xml": { + source: "iana", + compressible: true + }, + "application/emma+xml": { + source: "iana", + compressible: true, + extensions: ["emma"] + }, + "application/emotionml+xml": { + source: "iana", + compressible: true, + extensions: ["emotionml"] + }, + "application/encaprtp": { + source: "iana" + }, + "application/epp+xml": { + source: "iana", + compressible: true + }, + "application/epub+zip": { + source: "iana", + compressible: false, + extensions: ["epub"] + }, + "application/eshop": { + source: "iana" + }, + "application/exi": { + source: "iana", + extensions: ["exi"] + }, + "application/expect-ct-report+json": { + source: "iana", + compressible: true + }, + "application/express": { + source: "iana", + extensions: ["exp"] + }, + "application/fastinfoset": { + source: "iana" + }, + "application/fastsoap": { + source: "iana" + }, + "application/fdt+xml": { + source: "iana", + compressible: true, + extensions: ["fdt"] + }, + "application/fhir+json": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/fhir+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/fido.trusted-apps+json": { + compressible: true + }, + "application/fits": { + source: "iana" + }, + "application/flexfec": { + source: "iana" + }, + "application/font-sfnt": { + source: "iana" + }, + "application/font-tdpfr": { + source: "iana", + extensions: ["pfr"] + }, + "application/font-woff": { + source: "iana", + compressible: false + }, + "application/framework-attributes+xml": { + source: "iana", + compressible: true + }, + "application/geo+json": { + source: "iana", + compressible: true, + extensions: ["geojson"] + }, + "application/geo+json-seq": { + source: "iana" + }, + "application/geopackage+sqlite3": { + source: "iana" + }, + "application/geoxacml+xml": { + source: "iana", + compressible: true + }, + "application/gltf-buffer": { + source: "iana" + }, + "application/gml+xml": { + source: "iana", + compressible: true, + extensions: ["gml"] + }, + "application/gpx+xml": { + source: "apache", + compressible: true, + extensions: ["gpx"] + }, + "application/gxf": { + source: "apache", + extensions: ["gxf"] + }, + "application/gzip": { + source: "iana", + compressible: false, + extensions: ["gz"] + }, + "application/h224": { + source: "iana" + }, + "application/held+xml": { + source: "iana", + compressible: true + }, + "application/hjson": { + extensions: ["hjson"] + }, + "application/http": { + source: "iana" + }, + "application/hyperstudio": { + source: "iana", + extensions: ["stk"] + }, + "application/ibe-key-request+xml": { + source: "iana", + compressible: true + }, + "application/ibe-pkg-reply+xml": { + source: "iana", + compressible: true + }, + "application/ibe-pp-data": { + source: "iana" + }, + "application/iges": { + source: "iana" + }, + "application/im-iscomposing+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/index": { + source: "iana" + }, + "application/index.cmd": { + source: "iana" + }, + "application/index.obj": { + source: "iana" + }, + "application/index.response": { + source: "iana" + }, + "application/index.vnd": { + source: "iana" + }, + "application/inkml+xml": { + source: "iana", + compressible: true, + extensions: ["ink", "inkml"] + }, + "application/iotp": { + source: "iana" + }, + "application/ipfix": { + source: "iana", + extensions: ["ipfix"] + }, + "application/ipp": { + source: "iana" + }, + "application/isup": { + source: "iana" + }, + "application/its+xml": { + source: "iana", + compressible: true, + extensions: ["its"] + }, + "application/java-archive": { + source: "apache", + compressible: false, + extensions: ["jar", "war", "ear"] + }, + "application/java-serialized-object": { + source: "apache", + compressible: false, + extensions: ["ser"] + }, + "application/java-vm": { + source: "apache", + compressible: false, + extensions: ["class"] + }, + "application/javascript": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["js", "mjs"] + }, + "application/jf2feed+json": { + source: "iana", + compressible: true + }, + "application/jose": { + source: "iana" + }, + "application/jose+json": { + source: "iana", + compressible: true + }, + "application/jrd+json": { + source: "iana", + compressible: true + }, + "application/jscalendar+json": { + source: "iana", + compressible: true + }, + "application/json": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["json", "map"] + }, + "application/json-patch+json": { + source: "iana", + compressible: true + }, + "application/json-seq": { + source: "iana" + }, + "application/json5": { + extensions: ["json5"] + }, + "application/jsonml+json": { + source: "apache", + compressible: true, + extensions: ["jsonml"] + }, + "application/jwk+json": { + source: "iana", + compressible: true + }, + "application/jwk-set+json": { + source: "iana", + compressible: true + }, + "application/jwt": { + source: "iana" + }, + "application/kpml-request+xml": { + source: "iana", + compressible: true + }, + "application/kpml-response+xml": { + source: "iana", + compressible: true + }, + "application/ld+json": { + source: "iana", + compressible: true, + extensions: ["jsonld"] + }, + "application/lgr+xml": { + source: "iana", + compressible: true, + extensions: ["lgr"] + }, + "application/link-format": { + source: "iana" + }, + "application/load-control+xml": { + source: "iana", + compressible: true + }, + "application/lost+xml": { + source: "iana", + compressible: true, + extensions: ["lostxml"] + }, + "application/lostsync+xml": { + source: "iana", + compressible: true + }, + "application/lpf+zip": { + source: "iana", + compressible: false + }, + "application/lxf": { + source: "iana" + }, + "application/mac-binhex40": { + source: "iana", + extensions: ["hqx"] + }, + "application/mac-compactpro": { + source: "apache", + extensions: ["cpt"] + }, + "application/macwriteii": { + source: "iana" + }, + "application/mads+xml": { + source: "iana", + compressible: true, + extensions: ["mads"] + }, + "application/manifest+json": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["webmanifest"] + }, + "application/marc": { + source: "iana", + extensions: ["mrc"] + }, + "application/marcxml+xml": { + source: "iana", + compressible: true, + extensions: ["mrcx"] + }, + "application/mathematica": { + source: "iana", + extensions: ["ma", "nb", "mb"] + }, + "application/mathml+xml": { + source: "iana", + compressible: true, + extensions: ["mathml"] + }, + "application/mathml-content+xml": { + source: "iana", + compressible: true + }, + "application/mathml-presentation+xml": { + source: "iana", + compressible: true + }, + "application/mbms-associated-procedure-description+xml": { + source: "iana", + compressible: true + }, + "application/mbms-deregister+xml": { + source: "iana", + compressible: true + }, + "application/mbms-envelope+xml": { + source: "iana", + compressible: true + }, + "application/mbms-msk+xml": { + source: "iana", + compressible: true + }, + "application/mbms-msk-response+xml": { + source: "iana", + compressible: true + }, + "application/mbms-protection-description+xml": { + source: "iana", + compressible: true + }, + "application/mbms-reception-report+xml": { + source: "iana", + compressible: true + }, + "application/mbms-register+xml": { + source: "iana", + compressible: true + }, + "application/mbms-register-response+xml": { + source: "iana", + compressible: true + }, + "application/mbms-schedule+xml": { + source: "iana", + compressible: true + }, + "application/mbms-user-service-description+xml": { + source: "iana", + compressible: true + }, + "application/mbox": { + source: "iana", + extensions: ["mbox"] + }, + "application/media-policy-dataset+xml": { + source: "iana", + compressible: true, + extensions: ["mpf"] + }, + "application/media_control+xml": { + source: "iana", + compressible: true + }, + "application/mediaservercontrol+xml": { + source: "iana", + compressible: true, + extensions: ["mscml"] + }, + "application/merge-patch+json": { + source: "iana", + compressible: true + }, + "application/metalink+xml": { + source: "apache", + compressible: true, + extensions: ["metalink"] + }, + "application/metalink4+xml": { + source: "iana", + compressible: true, + extensions: ["meta4"] + }, + "application/mets+xml": { + source: "iana", + compressible: true, + extensions: ["mets"] + }, + "application/mf4": { + source: "iana" + }, + "application/mikey": { + source: "iana" + }, + "application/mipc": { + source: "iana" + }, + "application/missing-blocks+cbor-seq": { + source: "iana" + }, + "application/mmt-aei+xml": { + source: "iana", + compressible: true, + extensions: ["maei"] + }, + "application/mmt-usd+xml": { + source: "iana", + compressible: true, + extensions: ["musd"] + }, + "application/mods+xml": { + source: "iana", + compressible: true, + extensions: ["mods"] + }, + "application/moss-keys": { + source: "iana" + }, + "application/moss-signature": { + source: "iana" + }, + "application/mosskey-data": { + source: "iana" + }, + "application/mosskey-request": { + source: "iana" + }, + "application/mp21": { + source: "iana", + extensions: ["m21", "mp21"] + }, + "application/mp4": { + source: "iana", + extensions: ["mp4s", "m4p"] + }, + "application/mpeg4-generic": { + source: "iana" + }, + "application/mpeg4-iod": { + source: "iana" + }, + "application/mpeg4-iod-xmt": { + source: "iana" + }, + "application/mrb-consumer+xml": { + source: "iana", + compressible: true + }, + "application/mrb-publish+xml": { + source: "iana", + compressible: true + }, + "application/msc-ivr+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/msc-mixer+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/msword": { + source: "iana", + compressible: false, + extensions: ["doc", "dot"] + }, + "application/mud+json": { + source: "iana", + compressible: true + }, + "application/multipart-core": { + source: "iana" + }, + "application/mxf": { + source: "iana", + extensions: ["mxf"] + }, + "application/n-quads": { + source: "iana", + extensions: ["nq"] + }, + "application/n-triples": { + source: "iana", + extensions: ["nt"] + }, + "application/nasdata": { + source: "iana" + }, + "application/news-checkgroups": { + source: "iana", + charset: "US-ASCII" + }, + "application/news-groupinfo": { + source: "iana", + charset: "US-ASCII" + }, + "application/news-transmission": { + source: "iana" + }, + "application/nlsml+xml": { + source: "iana", + compressible: true + }, + "application/node": { + source: "iana", + extensions: ["cjs"] + }, + "application/nss": { + source: "iana" + }, + "application/oauth-authz-req+jwt": { + source: "iana" + }, + "application/oblivious-dns-message": { + source: "iana" + }, + "application/ocsp-request": { + source: "iana" + }, + "application/ocsp-response": { + source: "iana" + }, + "application/octet-stream": { + source: "iana", + compressible: false, + extensions: ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"] + }, + "application/oda": { + source: "iana", + extensions: ["oda"] + }, + "application/odm+xml": { + source: "iana", + compressible: true + }, + "application/odx": { + source: "iana" + }, + "application/oebps-package+xml": { + source: "iana", + compressible: true, + extensions: ["opf"] + }, + "application/ogg": { + source: "iana", + compressible: false, + extensions: ["ogx"] + }, + "application/omdoc+xml": { + source: "apache", + compressible: true, + extensions: ["omdoc"] + }, + "application/onenote": { + source: "apache", + extensions: ["onetoc", "onetoc2", "onetmp", "onepkg"] + }, + "application/opc-nodeset+xml": { + source: "iana", + compressible: true + }, + "application/oscore": { + source: "iana" + }, + "application/oxps": { + source: "iana", + extensions: ["oxps"] + }, + "application/p21": { + source: "iana" + }, + "application/p21+zip": { + source: "iana", + compressible: false + }, + "application/p2p-overlay+xml": { + source: "iana", + compressible: true, + extensions: ["relo"] + }, + "application/parityfec": { + source: "iana" + }, + "application/passport": { + source: "iana" + }, + "application/patch-ops-error+xml": { + source: "iana", + compressible: true, + extensions: ["xer"] + }, + "application/pdf": { + source: "iana", + compressible: false, + extensions: ["pdf"] + }, + "application/pdx": { + source: "iana" + }, + "application/pem-certificate-chain": { + source: "iana" + }, + "application/pgp-encrypted": { + source: "iana", + compressible: false, + extensions: ["pgp"] + }, + "application/pgp-keys": { + source: "iana", + extensions: ["asc"] + }, + "application/pgp-signature": { + source: "iana", + extensions: ["asc", "sig"] + }, + "application/pics-rules": { + source: "apache", + extensions: ["prf"] + }, + "application/pidf+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/pidf-diff+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/pkcs10": { + source: "iana", + extensions: ["p10"] + }, + "application/pkcs12": { + source: "iana" + }, + "application/pkcs7-mime": { + source: "iana", + extensions: ["p7m", "p7c"] + }, + "application/pkcs7-signature": { + source: "iana", + extensions: ["p7s"] + }, + "application/pkcs8": { + source: "iana", + extensions: ["p8"] + }, + "application/pkcs8-encrypted": { + source: "iana" + }, + "application/pkix-attr-cert": { + source: "iana", + extensions: ["ac"] + }, + "application/pkix-cert": { + source: "iana", + extensions: ["cer"] + }, + "application/pkix-crl": { + source: "iana", + extensions: ["crl"] + }, + "application/pkix-pkipath": { + source: "iana", + extensions: ["pkipath"] + }, + "application/pkixcmp": { + source: "iana", + extensions: ["pki"] + }, + "application/pls+xml": { + source: "iana", + compressible: true, + extensions: ["pls"] + }, + "application/poc-settings+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/postscript": { + source: "iana", + compressible: true, + extensions: ["ai", "eps", "ps"] + }, + "application/ppsp-tracker+json": { + source: "iana", + compressible: true + }, + "application/problem+json": { + source: "iana", + compressible: true + }, + "application/problem+xml": { + source: "iana", + compressible: true + }, + "application/provenance+xml": { + source: "iana", + compressible: true, + extensions: ["provx"] + }, + "application/prs.alvestrand.titrax-sheet": { + source: "iana" + }, + "application/prs.cww": { + source: "iana", + extensions: ["cww"] + }, + "application/prs.cyn": { + source: "iana", + charset: "7-BIT" + }, + "application/prs.hpub+zip": { + source: "iana", + compressible: false + }, + "application/prs.nprend": { + source: "iana" + }, + "application/prs.plucker": { + source: "iana" + }, + "application/prs.rdf-xml-crypt": { + source: "iana" + }, + "application/prs.xsf+xml": { + source: "iana", + compressible: true + }, + "application/pskc+xml": { + source: "iana", + compressible: true, + extensions: ["pskcxml"] + }, + "application/pvd+json": { + source: "iana", + compressible: true + }, + "application/qsig": { + source: "iana" + }, + "application/raml+yaml": { + compressible: true, + extensions: ["raml"] + }, + "application/raptorfec": { + source: "iana" + }, + "application/rdap+json": { + source: "iana", + compressible: true + }, + "application/rdf+xml": { + source: "iana", + compressible: true, + extensions: ["rdf", "owl"] + }, + "application/reginfo+xml": { + source: "iana", + compressible: true, + extensions: ["rif"] + }, + "application/relax-ng-compact-syntax": { + source: "iana", + extensions: ["rnc"] + }, + "application/remote-printing": { + source: "iana" + }, + "application/reputon+json": { + source: "iana", + compressible: true + }, + "application/resource-lists+xml": { + source: "iana", + compressible: true, + extensions: ["rl"] + }, + "application/resource-lists-diff+xml": { + source: "iana", + compressible: true, + extensions: ["rld"] + }, + "application/rfc+xml": { + source: "iana", + compressible: true + }, + "application/riscos": { + source: "iana" + }, + "application/rlmi+xml": { + source: "iana", + compressible: true + }, + "application/rls-services+xml": { + source: "iana", + compressible: true, + extensions: ["rs"] + }, + "application/route-apd+xml": { + source: "iana", + compressible: true, + extensions: ["rapd"] + }, + "application/route-s-tsid+xml": { + source: "iana", + compressible: true, + extensions: ["sls"] + }, + "application/route-usd+xml": { + source: "iana", + compressible: true, + extensions: ["rusd"] + }, + "application/rpki-ghostbusters": { + source: "iana", + extensions: ["gbr"] + }, + "application/rpki-manifest": { + source: "iana", + extensions: ["mft"] + }, + "application/rpki-publication": { + source: "iana" + }, + "application/rpki-roa": { + source: "iana", + extensions: ["roa"] + }, + "application/rpki-updown": { + source: "iana" + }, + "application/rsd+xml": { + source: "apache", + compressible: true, + extensions: ["rsd"] + }, + "application/rss+xml": { + source: "apache", + compressible: true, + extensions: ["rss"] + }, + "application/rtf": { + source: "iana", + compressible: true, + extensions: ["rtf"] + }, + "application/rtploopback": { + source: "iana" + }, + "application/rtx": { + source: "iana" + }, + "application/samlassertion+xml": { + source: "iana", + compressible: true + }, + "application/samlmetadata+xml": { + source: "iana", + compressible: true + }, + "application/sarif+json": { + source: "iana", + compressible: true + }, + "application/sarif-external-properties+json": { + source: "iana", + compressible: true + }, + "application/sbe": { + source: "iana" + }, + "application/sbml+xml": { + source: "iana", + compressible: true, + extensions: ["sbml"] + }, + "application/scaip+xml": { + source: "iana", + compressible: true + }, + "application/scim+json": { + source: "iana", + compressible: true + }, + "application/scvp-cv-request": { + source: "iana", + extensions: ["scq"] + }, + "application/scvp-cv-response": { + source: "iana", + extensions: ["scs"] + }, + "application/scvp-vp-request": { + source: "iana", + extensions: ["spq"] + }, + "application/scvp-vp-response": { + source: "iana", + extensions: ["spp"] + }, + "application/sdp": { + source: "iana", + extensions: ["sdp"] + }, + "application/secevent+jwt": { + source: "iana" + }, + "application/senml+cbor": { + source: "iana" + }, + "application/senml+json": { + source: "iana", + compressible: true + }, + "application/senml+xml": { + source: "iana", + compressible: true, + extensions: ["senmlx"] + }, + "application/senml-etch+cbor": { + source: "iana" + }, + "application/senml-etch+json": { + source: "iana", + compressible: true + }, + "application/senml-exi": { + source: "iana" + }, + "application/sensml+cbor": { + source: "iana" + }, + "application/sensml+json": { + source: "iana", + compressible: true + }, + "application/sensml+xml": { + source: "iana", + compressible: true, + extensions: ["sensmlx"] + }, + "application/sensml-exi": { + source: "iana" + }, + "application/sep+xml": { + source: "iana", + compressible: true + }, + "application/sep-exi": { + source: "iana" + }, + "application/session-info": { + source: "iana" + }, + "application/set-payment": { + source: "iana" + }, + "application/set-payment-initiation": { + source: "iana", + extensions: ["setpay"] + }, + "application/set-registration": { + source: "iana" + }, + "application/set-registration-initiation": { + source: "iana", + extensions: ["setreg"] + }, + "application/sgml": { + source: "iana" + }, + "application/sgml-open-catalog": { + source: "iana" + }, + "application/shf+xml": { + source: "iana", + compressible: true, + extensions: ["shf"] + }, + "application/sieve": { + source: "iana", + extensions: ["siv", "sieve"] + }, + "application/simple-filter+xml": { + source: "iana", + compressible: true + }, + "application/simple-message-summary": { + source: "iana" + }, + "application/simplesymbolcontainer": { + source: "iana" + }, + "application/sipc": { + source: "iana" + }, + "application/slate": { + source: "iana" + }, + "application/smil": { + source: "iana" + }, + "application/smil+xml": { + source: "iana", + compressible: true, + extensions: ["smi", "smil"] + }, + "application/smpte336m": { + source: "iana" + }, + "application/soap+fastinfoset": { + source: "iana" + }, + "application/soap+xml": { + source: "iana", + compressible: true + }, + "application/sparql-query": { + source: "iana", + extensions: ["rq"] + }, + "application/sparql-results+xml": { + source: "iana", + compressible: true, + extensions: ["srx"] + }, + "application/spdx+json": { + source: "iana", + compressible: true + }, + "application/spirits-event+xml": { + source: "iana", + compressible: true + }, + "application/sql": { + source: "iana" + }, + "application/srgs": { + source: "iana", + extensions: ["gram"] + }, + "application/srgs+xml": { + source: "iana", + compressible: true, + extensions: ["grxml"] + }, + "application/sru+xml": { + source: "iana", + compressible: true, + extensions: ["sru"] + }, + "application/ssdl+xml": { + source: "apache", + compressible: true, + extensions: ["ssdl"] + }, + "application/ssml+xml": { + source: "iana", + compressible: true, + extensions: ["ssml"] + }, + "application/stix+json": { + source: "iana", + compressible: true + }, + "application/swid+xml": { + source: "iana", + compressible: true, + extensions: ["swidtag"] + }, + "application/tamp-apex-update": { + source: "iana" + }, + "application/tamp-apex-update-confirm": { + source: "iana" + }, + "application/tamp-community-update": { + source: "iana" + }, + "application/tamp-community-update-confirm": { + source: "iana" + }, + "application/tamp-error": { + source: "iana" + }, + "application/tamp-sequence-adjust": { + source: "iana" + }, + "application/tamp-sequence-adjust-confirm": { + source: "iana" + }, + "application/tamp-status-query": { + source: "iana" + }, + "application/tamp-status-response": { + source: "iana" + }, + "application/tamp-update": { + source: "iana" + }, + "application/tamp-update-confirm": { + source: "iana" + }, + "application/tar": { + compressible: true + }, + "application/taxii+json": { + source: "iana", + compressible: true + }, + "application/td+json": { + source: "iana", + compressible: true + }, + "application/tei+xml": { + source: "iana", + compressible: true, + extensions: ["tei", "teicorpus"] + }, + "application/tetra_isi": { + source: "iana" + }, + "application/thraud+xml": { + source: "iana", + compressible: true, + extensions: ["tfi"] + }, + "application/timestamp-query": { + source: "iana" + }, + "application/timestamp-reply": { + source: "iana" + }, + "application/timestamped-data": { + source: "iana", + extensions: ["tsd"] + }, + "application/tlsrpt+gzip": { + source: "iana" + }, + "application/tlsrpt+json": { + source: "iana", + compressible: true + }, + "application/tnauthlist": { + source: "iana" + }, + "application/token-introspection+jwt": { + source: "iana" + }, + "application/toml": { + compressible: true, + extensions: ["toml"] + }, + "application/trickle-ice-sdpfrag": { + source: "iana" + }, + "application/trig": { + source: "iana", + extensions: ["trig"] + }, + "application/ttml+xml": { + source: "iana", + compressible: true, + extensions: ["ttml"] + }, + "application/tve-trigger": { + source: "iana" + }, + "application/tzif": { + source: "iana" + }, + "application/tzif-leap": { + source: "iana" + }, + "application/ubjson": { + compressible: false, + extensions: ["ubj"] + }, + "application/ulpfec": { + source: "iana" + }, + "application/urc-grpsheet+xml": { + source: "iana", + compressible: true + }, + "application/urc-ressheet+xml": { + source: "iana", + compressible: true, + extensions: ["rsheet"] + }, + "application/urc-targetdesc+xml": { + source: "iana", + compressible: true, + extensions: ["td"] + }, + "application/urc-uisocketdesc+xml": { + source: "iana", + compressible: true + }, + "application/vcard+json": { + source: "iana", + compressible: true + }, + "application/vcard+xml": { + source: "iana", + compressible: true + }, + "application/vemmi": { + source: "iana" + }, + "application/vividence.scriptfile": { + source: "apache" + }, + "application/vnd.1000minds.decision-model+xml": { + source: "iana", + compressible: true, + extensions: ["1km"] + }, + "application/vnd.3gpp-prose+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp-v2x-local-service-information": { + source: "iana" + }, + "application/vnd.3gpp.5gnas": { + source: "iana" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.bsf+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.gmop+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.gtpc": { + source: "iana" + }, + "application/vnd.3gpp.interworking-data": { + source: "iana" + }, + "application/vnd.3gpp.lpp": { + source: "iana" + }, + "application/vnd.3gpp.mc-signalling-ear": { + source: "iana" + }, + "application/vnd.3gpp.mcdata-affiliation-command+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcdata-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcdata-payload": { + source: "iana" + }, + "application/vnd.3gpp.mcdata-service-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcdata-signalling": { + source: "iana" + }, + "application/vnd.3gpp.mcdata-ue-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcdata-user-profile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-affiliation-command+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-floor-request+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-location-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-service-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-signed+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-ue-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-ue-init-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-user-profile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-affiliation-command+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-affiliation-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-location-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-service-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-transmission-request+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-ue-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-user-profile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mid-call+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.ngap": { + source: "iana" + }, + "application/vnd.3gpp.pfcp": { + source: "iana" + }, + "application/vnd.3gpp.pic-bw-large": { + source: "iana", + extensions: ["plb"] + }, + "application/vnd.3gpp.pic-bw-small": { + source: "iana", + extensions: ["psb"] + }, + "application/vnd.3gpp.pic-bw-var": { + source: "iana", + extensions: ["pvb"] + }, + "application/vnd.3gpp.s1ap": { + source: "iana" + }, + "application/vnd.3gpp.sms": { + source: "iana" + }, + "application/vnd.3gpp.sms+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.srvcc-ext+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.srvcc-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.state-and-event-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.ussd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp2.sms": { + source: "iana" + }, + "application/vnd.3gpp2.tcap": { + source: "iana", + extensions: ["tcap"] + }, + "application/vnd.3lightssoftware.imagescal": { + source: "iana" + }, + "application/vnd.3m.post-it-notes": { + source: "iana", + extensions: ["pwn"] + }, + "application/vnd.accpac.simply.aso": { + source: "iana", + extensions: ["aso"] + }, + "application/vnd.accpac.simply.imp": { + source: "iana", + extensions: ["imp"] + }, + "application/vnd.acucobol": { + source: "iana", + extensions: ["acu"] + }, + "application/vnd.acucorp": { + source: "iana", + extensions: ["atc", "acutc"] + }, + "application/vnd.adobe.air-application-installer-package+zip": { + source: "apache", + compressible: false, + extensions: ["air"] + }, + "application/vnd.adobe.flash.movie": { + source: "iana" + }, + "application/vnd.adobe.formscentral.fcdt": { + source: "iana", + extensions: ["fcdt"] + }, + "application/vnd.adobe.fxp": { + source: "iana", + extensions: ["fxp", "fxpl"] + }, + "application/vnd.adobe.partial-upload": { + source: "iana" + }, + "application/vnd.adobe.xdp+xml": { + source: "iana", + compressible: true, + extensions: ["xdp"] + }, + "application/vnd.adobe.xfdf": { + source: "iana", + extensions: ["xfdf"] + }, + "application/vnd.aether.imp": { + source: "iana" + }, + "application/vnd.afpc.afplinedata": { + source: "iana" + }, + "application/vnd.afpc.afplinedata-pagedef": { + source: "iana" + }, + "application/vnd.afpc.cmoca-cmresource": { + source: "iana" + }, + "application/vnd.afpc.foca-charset": { + source: "iana" + }, + "application/vnd.afpc.foca-codedfont": { + source: "iana" + }, + "application/vnd.afpc.foca-codepage": { + source: "iana" + }, + "application/vnd.afpc.modca": { + source: "iana" + }, + "application/vnd.afpc.modca-cmtable": { + source: "iana" + }, + "application/vnd.afpc.modca-formdef": { + source: "iana" + }, + "application/vnd.afpc.modca-mediummap": { + source: "iana" + }, + "application/vnd.afpc.modca-objectcontainer": { + source: "iana" + }, + "application/vnd.afpc.modca-overlay": { + source: "iana" + }, + "application/vnd.afpc.modca-pagesegment": { + source: "iana" + }, + "application/vnd.age": { + source: "iana", + extensions: ["age"] + }, + "application/vnd.ah-barcode": { + source: "iana" + }, + "application/vnd.ahead.space": { + source: "iana", + extensions: ["ahead"] + }, + "application/vnd.airzip.filesecure.azf": { + source: "iana", + extensions: ["azf"] + }, + "application/vnd.airzip.filesecure.azs": { + source: "iana", + extensions: ["azs"] + }, + "application/vnd.amadeus+json": { + source: "iana", + compressible: true + }, + "application/vnd.amazon.ebook": { + source: "apache", + extensions: ["azw"] + }, + "application/vnd.amazon.mobi8-ebook": { + source: "iana" + }, + "application/vnd.americandynamics.acc": { + source: "iana", + extensions: ["acc"] + }, + "application/vnd.amiga.ami": { + source: "iana", + extensions: ["ami"] + }, + "application/vnd.amundsen.maze+xml": { + source: "iana", + compressible: true + }, + "application/vnd.android.ota": { + source: "iana" + }, + "application/vnd.android.package-archive": { + source: "apache", + compressible: false, + extensions: ["apk"] + }, + "application/vnd.anki": { + source: "iana" + }, + "application/vnd.anser-web-certificate-issue-initiation": { + source: "iana", + extensions: ["cii"] + }, + "application/vnd.anser-web-funds-transfer-initiation": { + source: "apache", + extensions: ["fti"] + }, + "application/vnd.antix.game-component": { + source: "iana", + extensions: ["atx"] + }, + "application/vnd.apache.arrow.file": { + source: "iana" + }, + "application/vnd.apache.arrow.stream": { + source: "iana" + }, + "application/vnd.apache.thrift.binary": { + source: "iana" + }, + "application/vnd.apache.thrift.compact": { + source: "iana" + }, + "application/vnd.apache.thrift.json": { + source: "iana" + }, + "application/vnd.api+json": { + source: "iana", + compressible: true + }, + "application/vnd.aplextor.warrp+json": { + source: "iana", + compressible: true + }, + "application/vnd.apothekende.reservation+json": { + source: "iana", + compressible: true + }, + "application/vnd.apple.installer+xml": { + source: "iana", + compressible: true, + extensions: ["mpkg"] + }, + "application/vnd.apple.keynote": { + source: "iana", + extensions: ["key"] + }, + "application/vnd.apple.mpegurl": { + source: "iana", + extensions: ["m3u8"] + }, + "application/vnd.apple.numbers": { + source: "iana", + extensions: ["numbers"] + }, + "application/vnd.apple.pages": { + source: "iana", + extensions: ["pages"] + }, + "application/vnd.apple.pkpass": { + compressible: false, + extensions: ["pkpass"] + }, + "application/vnd.arastra.swi": { + source: "iana" + }, + "application/vnd.aristanetworks.swi": { + source: "iana", + extensions: ["swi"] + }, + "application/vnd.artisan+json": { + source: "iana", + compressible: true + }, + "application/vnd.artsquare": { + source: "iana" + }, + "application/vnd.astraea-software.iota": { + source: "iana", + extensions: ["iota"] + }, + "application/vnd.audiograph": { + source: "iana", + extensions: ["aep"] + }, + "application/vnd.autopackage": { + source: "iana" + }, + "application/vnd.avalon+json": { + source: "iana", + compressible: true + }, + "application/vnd.avistar+xml": { + source: "iana", + compressible: true + }, + "application/vnd.balsamiq.bmml+xml": { + source: "iana", + compressible: true, + extensions: ["bmml"] + }, + "application/vnd.balsamiq.bmpr": { + source: "iana" + }, + "application/vnd.banana-accounting": { + source: "iana" + }, + "application/vnd.bbf.usp.error": { + source: "iana" + }, + "application/vnd.bbf.usp.msg": { + source: "iana" + }, + "application/vnd.bbf.usp.msg+json": { + source: "iana", + compressible: true + }, + "application/vnd.bekitzur-stech+json": { + source: "iana", + compressible: true + }, + "application/vnd.bint.med-content": { + source: "iana" + }, + "application/vnd.biopax.rdf+xml": { + source: "iana", + compressible: true + }, + "application/vnd.blink-idb-value-wrapper": { + source: "iana" + }, + "application/vnd.blueice.multipass": { + source: "iana", + extensions: ["mpm"] + }, + "application/vnd.bluetooth.ep.oob": { + source: "iana" + }, + "application/vnd.bluetooth.le.oob": { + source: "iana" + }, + "application/vnd.bmi": { + source: "iana", + extensions: ["bmi"] + }, + "application/vnd.bpf": { + source: "iana" + }, + "application/vnd.bpf3": { + source: "iana" + }, + "application/vnd.businessobjects": { + source: "iana", + extensions: ["rep"] + }, + "application/vnd.byu.uapi+json": { + source: "iana", + compressible: true + }, + "application/vnd.cab-jscript": { + source: "iana" + }, + "application/vnd.canon-cpdl": { + source: "iana" + }, + "application/vnd.canon-lips": { + source: "iana" + }, + "application/vnd.capasystems-pg+json": { + source: "iana", + compressible: true + }, + "application/vnd.cendio.thinlinc.clientconf": { + source: "iana" + }, + "application/vnd.century-systems.tcp_stream": { + source: "iana" + }, + "application/vnd.chemdraw+xml": { + source: "iana", + compressible: true, + extensions: ["cdxml"] + }, + "application/vnd.chess-pgn": { + source: "iana" + }, + "application/vnd.chipnuts.karaoke-mmd": { + source: "iana", + extensions: ["mmd"] + }, + "application/vnd.ciedi": { + source: "iana" + }, + "application/vnd.cinderella": { + source: "iana", + extensions: ["cdy"] + }, + "application/vnd.cirpack.isdn-ext": { + source: "iana" + }, + "application/vnd.citationstyles.style+xml": { + source: "iana", + compressible: true, + extensions: ["csl"] + }, + "application/vnd.claymore": { + source: "iana", + extensions: ["cla"] + }, + "application/vnd.cloanto.rp9": { + source: "iana", + extensions: ["rp9"] + }, + "application/vnd.clonk.c4group": { + source: "iana", + extensions: ["c4g", "c4d", "c4f", "c4p", "c4u"] + }, + "application/vnd.cluetrust.cartomobile-config": { + source: "iana", + extensions: ["c11amc"] + }, + "application/vnd.cluetrust.cartomobile-config-pkg": { + source: "iana", + extensions: ["c11amz"] + }, + "application/vnd.coffeescript": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.document": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.document-template": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.presentation": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.presentation-template": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet-template": { + source: "iana" + }, + "application/vnd.collection+json": { + source: "iana", + compressible: true + }, + "application/vnd.collection.doc+json": { + source: "iana", + compressible: true + }, + "application/vnd.collection.next+json": { + source: "iana", + compressible: true + }, + "application/vnd.comicbook+zip": { + source: "iana", + compressible: false + }, + "application/vnd.comicbook-rar": { + source: "iana" + }, + "application/vnd.commerce-battelle": { + source: "iana" + }, + "application/vnd.commonspace": { + source: "iana", + extensions: ["csp"] + }, + "application/vnd.contact.cmsg": { + source: "iana", + extensions: ["cdbcmsg"] + }, + "application/vnd.coreos.ignition+json": { + source: "iana", + compressible: true + }, + "application/vnd.cosmocaller": { + source: "iana", + extensions: ["cmc"] + }, + "application/vnd.crick.clicker": { + source: "iana", + extensions: ["clkx"] + }, + "application/vnd.crick.clicker.keyboard": { + source: "iana", + extensions: ["clkk"] + }, + "application/vnd.crick.clicker.palette": { + source: "iana", + extensions: ["clkp"] + }, + "application/vnd.crick.clicker.template": { + source: "iana", + extensions: ["clkt"] + }, + "application/vnd.crick.clicker.wordbank": { + source: "iana", + extensions: ["clkw"] + }, + "application/vnd.criticaltools.wbs+xml": { + source: "iana", + compressible: true, + extensions: ["wbs"] + }, + "application/vnd.cryptii.pipe+json": { + source: "iana", + compressible: true + }, + "application/vnd.crypto-shade-file": { + source: "iana" + }, + "application/vnd.cryptomator.encrypted": { + source: "iana" + }, + "application/vnd.cryptomator.vault": { + source: "iana" + }, + "application/vnd.ctc-posml": { + source: "iana", + extensions: ["pml"] + }, + "application/vnd.ctct.ws+xml": { + source: "iana", + compressible: true + }, + "application/vnd.cups-pdf": { + source: "iana" + }, + "application/vnd.cups-postscript": { + source: "iana" + }, + "application/vnd.cups-ppd": { + source: "iana", + extensions: ["ppd"] + }, + "application/vnd.cups-raster": { + source: "iana" + }, + "application/vnd.cups-raw": { + source: "iana" + }, + "application/vnd.curl": { + source: "iana" + }, + "application/vnd.curl.car": { + source: "apache", + extensions: ["car"] + }, + "application/vnd.curl.pcurl": { + source: "apache", + extensions: ["pcurl"] + }, + "application/vnd.cyan.dean.root+xml": { + source: "iana", + compressible: true + }, + "application/vnd.cybank": { + source: "iana" + }, + "application/vnd.cyclonedx+json": { + source: "iana", + compressible: true + }, + "application/vnd.cyclonedx+xml": { + source: "iana", + compressible: true + }, + "application/vnd.d2l.coursepackage1p0+zip": { + source: "iana", + compressible: false + }, + "application/vnd.d3m-dataset": { + source: "iana" + }, + "application/vnd.d3m-problem": { + source: "iana" + }, + "application/vnd.dart": { + source: "iana", + compressible: true, + extensions: ["dart"] + }, + "application/vnd.data-vision.rdz": { + source: "iana", + extensions: ["rdz"] + }, + "application/vnd.datapackage+json": { + source: "iana", + compressible: true + }, + "application/vnd.dataresource+json": { + source: "iana", + compressible: true + }, + "application/vnd.dbf": { + source: "iana", + extensions: ["dbf"] + }, + "application/vnd.debian.binary-package": { + source: "iana" + }, + "application/vnd.dece.data": { + source: "iana", + extensions: ["uvf", "uvvf", "uvd", "uvvd"] + }, + "application/vnd.dece.ttml+xml": { + source: "iana", + compressible: true, + extensions: ["uvt", "uvvt"] + }, + "application/vnd.dece.unspecified": { + source: "iana", + extensions: ["uvx", "uvvx"] + }, + "application/vnd.dece.zip": { + source: "iana", + extensions: ["uvz", "uvvz"] + }, + "application/vnd.denovo.fcselayout-link": { + source: "iana", + extensions: ["fe_launch"] + }, + "application/vnd.desmume.movie": { + source: "iana" + }, + "application/vnd.dir-bi.plate-dl-nosuffix": { + source: "iana" + }, + "application/vnd.dm.delegation+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dna": { + source: "iana", + extensions: ["dna"] + }, + "application/vnd.document+json": { + source: "iana", + compressible: true + }, + "application/vnd.dolby.mlp": { + source: "apache", + extensions: ["mlp"] + }, + "application/vnd.dolby.mobile.1": { + source: "iana" + }, + "application/vnd.dolby.mobile.2": { + source: "iana" + }, + "application/vnd.doremir.scorecloud-binary-document": { + source: "iana" + }, + "application/vnd.dpgraph": { + source: "iana", + extensions: ["dpg"] + }, + "application/vnd.dreamfactory": { + source: "iana", + extensions: ["dfac"] + }, + "application/vnd.drive+json": { + source: "iana", + compressible: true + }, + "application/vnd.ds-keypoint": { + source: "apache", + extensions: ["kpxx"] + }, + "application/vnd.dtg.local": { + source: "iana" + }, + "application/vnd.dtg.local.flash": { + source: "iana" + }, + "application/vnd.dtg.local.html": { + source: "iana" + }, + "application/vnd.dvb.ait": { + source: "iana", + extensions: ["ait"] + }, + "application/vnd.dvb.dvbisl+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.dvbj": { + source: "iana" + }, + "application/vnd.dvb.esgcontainer": { + source: "iana" + }, + "application/vnd.dvb.ipdcdftnotifaccess": { + source: "iana" + }, + "application/vnd.dvb.ipdcesgaccess": { + source: "iana" + }, + "application/vnd.dvb.ipdcesgaccess2": { + source: "iana" + }, + "application/vnd.dvb.ipdcesgpdd": { + source: "iana" + }, + "application/vnd.dvb.ipdcroaming": { + source: "iana" + }, + "application/vnd.dvb.iptv.alfec-base": { + source: "iana" + }, + "application/vnd.dvb.iptv.alfec-enhancement": { + source: "iana" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-container+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-generic+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-init+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.pfr": { + source: "iana" + }, + "application/vnd.dvb.service": { + source: "iana", + extensions: ["svc"] + }, + "application/vnd.dxr": { + source: "iana" + }, + "application/vnd.dynageo": { + source: "iana", + extensions: ["geo"] + }, + "application/vnd.dzr": { + source: "iana" + }, + "application/vnd.easykaraoke.cdgdownload": { + source: "iana" + }, + "application/vnd.ecdis-update": { + source: "iana" + }, + "application/vnd.ecip.rlp": { + source: "iana" + }, + "application/vnd.eclipse.ditto+json": { + source: "iana", + compressible: true + }, + "application/vnd.ecowin.chart": { + source: "iana", + extensions: ["mag"] + }, + "application/vnd.ecowin.filerequest": { + source: "iana" + }, + "application/vnd.ecowin.fileupdate": { + source: "iana" + }, + "application/vnd.ecowin.series": { + source: "iana" + }, + "application/vnd.ecowin.seriesrequest": { + source: "iana" + }, + "application/vnd.ecowin.seriesupdate": { + source: "iana" + }, + "application/vnd.efi.img": { + source: "iana" + }, + "application/vnd.efi.iso": { + source: "iana" + }, + "application/vnd.emclient.accessrequest+xml": { + source: "iana", + compressible: true + }, + "application/vnd.enliven": { + source: "iana", + extensions: ["nml"] + }, + "application/vnd.enphase.envoy": { + source: "iana" + }, + "application/vnd.eprints.data+xml": { + source: "iana", + compressible: true + }, + "application/vnd.epson.esf": { + source: "iana", + extensions: ["esf"] + }, + "application/vnd.epson.msf": { + source: "iana", + extensions: ["msf"] + }, + "application/vnd.epson.quickanime": { + source: "iana", + extensions: ["qam"] + }, + "application/vnd.epson.salt": { + source: "iana", + extensions: ["slt"] + }, + "application/vnd.epson.ssf": { + source: "iana", + extensions: ["ssf"] + }, + "application/vnd.ericsson.quickcall": { + source: "iana" + }, + "application/vnd.espass-espass+zip": { + source: "iana", + compressible: false + }, + "application/vnd.eszigno3+xml": { + source: "iana", + compressible: true, + extensions: ["es3", "et3"] + }, + "application/vnd.etsi.aoc+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.asic-e+zip": { + source: "iana", + compressible: false + }, + "application/vnd.etsi.asic-s+zip": { + source: "iana", + compressible: false + }, + "application/vnd.etsi.cug+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvcommand+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvdiscovery+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvprofile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvsad-bc+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvsad-cod+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvservice+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvsync+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvueprofile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.mcid+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.mheg5": { + source: "iana" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.pstn+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.sci+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.simservs+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.timestamp-token": { + source: "iana" + }, + "application/vnd.etsi.tsl+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.tsl.der": { + source: "iana" + }, + "application/vnd.eu.kasparian.car+json": { + source: "iana", + compressible: true + }, + "application/vnd.eudora.data": { + source: "iana" + }, + "application/vnd.evolv.ecig.profile": { + source: "iana" + }, + "application/vnd.evolv.ecig.settings": { + source: "iana" + }, + "application/vnd.evolv.ecig.theme": { + source: "iana" + }, + "application/vnd.exstream-empower+zip": { + source: "iana", + compressible: false + }, + "application/vnd.exstream-package": { + source: "iana" + }, + "application/vnd.ezpix-album": { + source: "iana", + extensions: ["ez2"] + }, + "application/vnd.ezpix-package": { + source: "iana", + extensions: ["ez3"] + }, + "application/vnd.f-secure.mobile": { + source: "iana" + }, + "application/vnd.familysearch.gedcom+zip": { + source: "iana", + compressible: false + }, + "application/vnd.fastcopy-disk-image": { + source: "iana" + }, + "application/vnd.fdf": { + source: "iana", + extensions: ["fdf"] + }, + "application/vnd.fdsn.mseed": { + source: "iana", + extensions: ["mseed"] + }, + "application/vnd.fdsn.seed": { + source: "iana", + extensions: ["seed", "dataless"] + }, + "application/vnd.ffsns": { + source: "iana" + }, + "application/vnd.ficlab.flb+zip": { + source: "iana", + compressible: false + }, + "application/vnd.filmit.zfc": { + source: "iana" + }, + "application/vnd.fints": { + source: "iana" + }, + "application/vnd.firemonkeys.cloudcell": { + source: "iana" + }, + "application/vnd.flographit": { + source: "iana", + extensions: ["gph"] + }, + "application/vnd.fluxtime.clip": { + source: "iana", + extensions: ["ftc"] + }, + "application/vnd.font-fontforge-sfd": { + source: "iana" + }, + "application/vnd.framemaker": { + source: "iana", + extensions: ["fm", "frame", "maker", "book"] + }, + "application/vnd.frogans.fnc": { + source: "iana", + extensions: ["fnc"] + }, + "application/vnd.frogans.ltf": { + source: "iana", + extensions: ["ltf"] + }, + "application/vnd.fsc.weblaunch": { + source: "iana", + extensions: ["fsc"] + }, + "application/vnd.fujifilm.fb.docuworks": { + source: "iana" + }, + "application/vnd.fujifilm.fb.docuworks.binder": { + source: "iana" + }, + "application/vnd.fujifilm.fb.docuworks.container": { + source: "iana" + }, + "application/vnd.fujifilm.fb.jfi+xml": { + source: "iana", + compressible: true + }, + "application/vnd.fujitsu.oasys": { + source: "iana", + extensions: ["oas"] + }, + "application/vnd.fujitsu.oasys2": { + source: "iana", + extensions: ["oa2"] + }, + "application/vnd.fujitsu.oasys3": { + source: "iana", + extensions: ["oa3"] + }, + "application/vnd.fujitsu.oasysgp": { + source: "iana", + extensions: ["fg5"] + }, + "application/vnd.fujitsu.oasysprs": { + source: "iana", + extensions: ["bh2"] + }, + "application/vnd.fujixerox.art-ex": { + source: "iana" + }, + "application/vnd.fujixerox.art4": { + source: "iana" + }, + "application/vnd.fujixerox.ddd": { + source: "iana", + extensions: ["ddd"] + }, + "application/vnd.fujixerox.docuworks": { + source: "iana", + extensions: ["xdw"] + }, + "application/vnd.fujixerox.docuworks.binder": { + source: "iana", + extensions: ["xbd"] + }, + "application/vnd.fujixerox.docuworks.container": { + source: "iana" + }, + "application/vnd.fujixerox.hbpl": { + source: "iana" + }, + "application/vnd.fut-misnet": { + source: "iana" + }, + "application/vnd.futoin+cbor": { + source: "iana" + }, + "application/vnd.futoin+json": { + source: "iana", + compressible: true + }, + "application/vnd.fuzzysheet": { + source: "iana", + extensions: ["fzs"] + }, + "application/vnd.genomatix.tuxedo": { + source: "iana", + extensions: ["txd"] + }, + "application/vnd.gentics.grd+json": { + source: "iana", + compressible: true + }, + "application/vnd.geo+json": { + source: "iana", + compressible: true + }, + "application/vnd.geocube+xml": { + source: "iana", + compressible: true + }, + "application/vnd.geogebra.file": { + source: "iana", + extensions: ["ggb"] + }, + "application/vnd.geogebra.slides": { + source: "iana" + }, + "application/vnd.geogebra.tool": { + source: "iana", + extensions: ["ggt"] + }, + "application/vnd.geometry-explorer": { + source: "iana", + extensions: ["gex", "gre"] + }, + "application/vnd.geonext": { + source: "iana", + extensions: ["gxt"] + }, + "application/vnd.geoplan": { + source: "iana", + extensions: ["g2w"] + }, + "application/vnd.geospace": { + source: "iana", + extensions: ["g3w"] + }, + "application/vnd.gerber": { + source: "iana" + }, + "application/vnd.globalplatform.card-content-mgt": { + source: "iana" + }, + "application/vnd.globalplatform.card-content-mgt-response": { + source: "iana" + }, + "application/vnd.gmx": { + source: "iana", + extensions: ["gmx"] + }, + "application/vnd.google-apps.document": { + compressible: false, + extensions: ["gdoc"] + }, + "application/vnd.google-apps.presentation": { + compressible: false, + extensions: ["gslides"] + }, + "application/vnd.google-apps.spreadsheet": { + compressible: false, + extensions: ["gsheet"] + }, + "application/vnd.google-earth.kml+xml": { + source: "iana", + compressible: true, + extensions: ["kml"] + }, + "application/vnd.google-earth.kmz": { + source: "iana", + compressible: false, + extensions: ["kmz"] + }, + "application/vnd.gov.sk.e-form+xml": { + source: "iana", + compressible: true + }, + "application/vnd.gov.sk.e-form+zip": { + source: "iana", + compressible: false + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + source: "iana", + compressible: true + }, + "application/vnd.grafeq": { + source: "iana", + extensions: ["gqf", "gqs"] + }, + "application/vnd.gridmp": { + source: "iana" + }, + "application/vnd.groove-account": { + source: "iana", + extensions: ["gac"] + }, + "application/vnd.groove-help": { + source: "iana", + extensions: ["ghf"] + }, + "application/vnd.groove-identity-message": { + source: "iana", + extensions: ["gim"] + }, + "application/vnd.groove-injector": { + source: "iana", + extensions: ["grv"] + }, + "application/vnd.groove-tool-message": { + source: "iana", + extensions: ["gtm"] + }, + "application/vnd.groove-tool-template": { + source: "iana", + extensions: ["tpl"] + }, + "application/vnd.groove-vcard": { + source: "iana", + extensions: ["vcg"] + }, + "application/vnd.hal+json": { + source: "iana", + compressible: true + }, + "application/vnd.hal+xml": { + source: "iana", + compressible: true, + extensions: ["hal"] + }, + "application/vnd.handheld-entertainment+xml": { + source: "iana", + compressible: true, + extensions: ["zmm"] + }, + "application/vnd.hbci": { + source: "iana", + extensions: ["hbci"] + }, + "application/vnd.hc+json": { + source: "iana", + compressible: true + }, + "application/vnd.hcl-bireports": { + source: "iana" + }, + "application/vnd.hdt": { + source: "iana" + }, + "application/vnd.heroku+json": { + source: "iana", + compressible: true + }, + "application/vnd.hhe.lesson-player": { + source: "iana", + extensions: ["les"] + }, + "application/vnd.hl7cda+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.hl7v2+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.hp-hpgl": { + source: "iana", + extensions: ["hpgl"] + }, + "application/vnd.hp-hpid": { + source: "iana", + extensions: ["hpid"] + }, + "application/vnd.hp-hps": { + source: "iana", + extensions: ["hps"] + }, + "application/vnd.hp-jlyt": { + source: "iana", + extensions: ["jlt"] + }, + "application/vnd.hp-pcl": { + source: "iana", + extensions: ["pcl"] + }, + "application/vnd.hp-pclxl": { + source: "iana", + extensions: ["pclxl"] + }, + "application/vnd.httphone": { + source: "iana" + }, + "application/vnd.hydrostatix.sof-data": { + source: "iana", + extensions: ["sfd-hdstx"] + }, + "application/vnd.hyper+json": { + source: "iana", + compressible: true + }, + "application/vnd.hyper-item+json": { + source: "iana", + compressible: true + }, + "application/vnd.hyperdrive+json": { + source: "iana", + compressible: true + }, + "application/vnd.hzn-3d-crossword": { + source: "iana" + }, + "application/vnd.ibm.afplinedata": { + source: "iana" + }, + "application/vnd.ibm.electronic-media": { + source: "iana" + }, + "application/vnd.ibm.minipay": { + source: "iana", + extensions: ["mpy"] + }, + "application/vnd.ibm.modcap": { + source: "iana", + extensions: ["afp", "listafp", "list3820"] + }, + "application/vnd.ibm.rights-management": { + source: "iana", + extensions: ["irm"] + }, + "application/vnd.ibm.secure-container": { + source: "iana", + extensions: ["sc"] + }, + "application/vnd.iccprofile": { + source: "iana", + extensions: ["icc", "icm"] + }, + "application/vnd.ieee.1905": { + source: "iana" + }, + "application/vnd.igloader": { + source: "iana", + extensions: ["igl"] + }, + "application/vnd.imagemeter.folder+zip": { + source: "iana", + compressible: false + }, + "application/vnd.imagemeter.image+zip": { + source: "iana", + compressible: false + }, + "application/vnd.immervision-ivp": { + source: "iana", + extensions: ["ivp"] + }, + "application/vnd.immervision-ivu": { + source: "iana", + extensions: ["ivu"] + }, + "application/vnd.ims.imsccv1p1": { + source: "iana" + }, + "application/vnd.ims.imsccv1p2": { + source: "iana" + }, + "application/vnd.ims.imsccv1p3": { + source: "iana" + }, + "application/vnd.ims.lis.v2.result+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + source: "iana", + compressible: true + }, + "application/vnd.informedcontrol.rms+xml": { + source: "iana", + compressible: true + }, + "application/vnd.informix-visionary": { + source: "iana" + }, + "application/vnd.infotech.project": { + source: "iana" + }, + "application/vnd.infotech.project+xml": { + source: "iana", + compressible: true + }, + "application/vnd.innopath.wamp.notification": { + source: "iana" + }, + "application/vnd.insors.igm": { + source: "iana", + extensions: ["igm"] + }, + "application/vnd.intercon.formnet": { + source: "iana", + extensions: ["xpw", "xpx"] + }, + "application/vnd.intergeo": { + source: "iana", + extensions: ["i2g"] + }, + "application/vnd.intertrust.digibox": { + source: "iana" + }, + "application/vnd.intertrust.nncp": { + source: "iana" + }, + "application/vnd.intu.qbo": { + source: "iana", + extensions: ["qbo"] + }, + "application/vnd.intu.qfx": { + source: "iana", + extensions: ["qfx"] + }, + "application/vnd.iptc.g2.catalogitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.conceptitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.newsitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.newsmessage+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.packageitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.planningitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ipunplugged.rcprofile": { + source: "iana", + extensions: ["rcprofile"] + }, + "application/vnd.irepository.package+xml": { + source: "iana", + compressible: true, + extensions: ["irp"] + }, + "application/vnd.is-xpr": { + source: "iana", + extensions: ["xpr"] + }, + "application/vnd.isac.fcs": { + source: "iana", + extensions: ["fcs"] + }, + "application/vnd.iso11783-10+zip": { + source: "iana", + compressible: false + }, + "application/vnd.jam": { + source: "iana", + extensions: ["jam"] + }, + "application/vnd.japannet-directory-service": { + source: "iana" + }, + "application/vnd.japannet-jpnstore-wakeup": { + source: "iana" + }, + "application/vnd.japannet-payment-wakeup": { + source: "iana" + }, + "application/vnd.japannet-registration": { + source: "iana" + }, + "application/vnd.japannet-registration-wakeup": { + source: "iana" + }, + "application/vnd.japannet-setstore-wakeup": { + source: "iana" + }, + "application/vnd.japannet-verification": { + source: "iana" + }, + "application/vnd.japannet-verification-wakeup": { + source: "iana" + }, + "application/vnd.jcp.javame.midlet-rms": { + source: "iana", + extensions: ["rms"] + }, + "application/vnd.jisp": { + source: "iana", + extensions: ["jisp"] + }, + "application/vnd.joost.joda-archive": { + source: "iana", + extensions: ["joda"] + }, + "application/vnd.jsk.isdn-ngn": { + source: "iana" + }, + "application/vnd.kahootz": { + source: "iana", + extensions: ["ktz", "ktr"] + }, + "application/vnd.kde.karbon": { + source: "iana", + extensions: ["karbon"] + }, + "application/vnd.kde.kchart": { + source: "iana", + extensions: ["chrt"] + }, + "application/vnd.kde.kformula": { + source: "iana", + extensions: ["kfo"] + }, + "application/vnd.kde.kivio": { + source: "iana", + extensions: ["flw"] + }, + "application/vnd.kde.kontour": { + source: "iana", + extensions: ["kon"] + }, + "application/vnd.kde.kpresenter": { + source: "iana", + extensions: ["kpr", "kpt"] + }, + "application/vnd.kde.kspread": { + source: "iana", + extensions: ["ksp"] + }, + "application/vnd.kde.kword": { + source: "iana", + extensions: ["kwd", "kwt"] + }, + "application/vnd.kenameaapp": { + source: "iana", + extensions: ["htke"] + }, + "application/vnd.kidspiration": { + source: "iana", + extensions: ["kia"] + }, + "application/vnd.kinar": { + source: "iana", + extensions: ["kne", "knp"] + }, + "application/vnd.koan": { + source: "iana", + extensions: ["skp", "skd", "skt", "skm"] + }, + "application/vnd.kodak-descriptor": { + source: "iana", + extensions: ["sse"] + }, + "application/vnd.las": { + source: "iana" + }, + "application/vnd.las.las+json": { + source: "iana", + compressible: true + }, + "application/vnd.las.las+xml": { + source: "iana", + compressible: true, + extensions: ["lasxml"] + }, + "application/vnd.laszip": { + source: "iana" + }, + "application/vnd.leap+json": { + source: "iana", + compressible: true + }, + "application/vnd.liberty-request+xml": { + source: "iana", + compressible: true + }, + "application/vnd.llamagraphics.life-balance.desktop": { + source: "iana", + extensions: ["lbd"] + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + source: "iana", + compressible: true, + extensions: ["lbe"] + }, + "application/vnd.logipipe.circuit+zip": { + source: "iana", + compressible: false + }, + "application/vnd.loom": { + source: "iana" + }, + "application/vnd.lotus-1-2-3": { + source: "iana", + extensions: ["123"] + }, + "application/vnd.lotus-approach": { + source: "iana", + extensions: ["apr"] + }, + "application/vnd.lotus-freelance": { + source: "iana", + extensions: ["pre"] + }, + "application/vnd.lotus-notes": { + source: "iana", + extensions: ["nsf"] + }, + "application/vnd.lotus-organizer": { + source: "iana", + extensions: ["org"] + }, + "application/vnd.lotus-screencam": { + source: "iana", + extensions: ["scm"] + }, + "application/vnd.lotus-wordpro": { + source: "iana", + extensions: ["lwp"] + }, + "application/vnd.macports.portpkg": { + source: "iana", + extensions: ["portpkg"] + }, + "application/vnd.mapbox-vector-tile": { + source: "iana", + extensions: ["mvt"] + }, + "application/vnd.marlin.drm.actiontoken+xml": { + source: "iana", + compressible: true + }, + "application/vnd.marlin.drm.conftoken+xml": { + source: "iana", + compressible: true + }, + "application/vnd.marlin.drm.license+xml": { + source: "iana", + compressible: true + }, + "application/vnd.marlin.drm.mdcf": { + source: "iana" + }, + "application/vnd.mason+json": { + source: "iana", + compressible: true + }, + "application/vnd.maxar.archive.3tz+zip": { + source: "iana", + compressible: false + }, + "application/vnd.maxmind.maxmind-db": { + source: "iana" + }, + "application/vnd.mcd": { + source: "iana", + extensions: ["mcd"] + }, + "application/vnd.medcalcdata": { + source: "iana", + extensions: ["mc1"] + }, + "application/vnd.mediastation.cdkey": { + source: "iana", + extensions: ["cdkey"] + }, + "application/vnd.meridian-slingshot": { + source: "iana" + }, + "application/vnd.mfer": { + source: "iana", + extensions: ["mwf"] + }, + "application/vnd.mfmp": { + source: "iana", + extensions: ["mfm"] + }, + "application/vnd.micro+json": { + source: "iana", + compressible: true + }, + "application/vnd.micrografx.flo": { + source: "iana", + extensions: ["flo"] + }, + "application/vnd.micrografx.igx": { + source: "iana", + extensions: ["igx"] + }, + "application/vnd.microsoft.portable-executable": { + source: "iana" + }, + "application/vnd.microsoft.windows.thumbnail-cache": { + source: "iana" + }, + "application/vnd.miele+json": { + source: "iana", + compressible: true + }, + "application/vnd.mif": { + source: "iana", + extensions: ["mif"] + }, + "application/vnd.minisoft-hp3000-save": { + source: "iana" + }, + "application/vnd.mitsubishi.misty-guard.trustweb": { + source: "iana" + }, + "application/vnd.mobius.daf": { + source: "iana", + extensions: ["daf"] + }, + "application/vnd.mobius.dis": { + source: "iana", + extensions: ["dis"] + }, + "application/vnd.mobius.mbk": { + source: "iana", + extensions: ["mbk"] + }, + "application/vnd.mobius.mqy": { + source: "iana", + extensions: ["mqy"] + }, + "application/vnd.mobius.msl": { + source: "iana", + extensions: ["msl"] + }, + "application/vnd.mobius.plc": { + source: "iana", + extensions: ["plc"] + }, + "application/vnd.mobius.txf": { + source: "iana", + extensions: ["txf"] + }, + "application/vnd.mophun.application": { + source: "iana", + extensions: ["mpn"] + }, + "application/vnd.mophun.certificate": { + source: "iana", + extensions: ["mpc"] + }, + "application/vnd.motorola.flexsuite": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.adsi": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.fis": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.gotap": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.kmr": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.ttc": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.wem": { + source: "iana" + }, + "application/vnd.motorola.iprm": { + source: "iana" + }, + "application/vnd.mozilla.xul+xml": { + source: "iana", + compressible: true, + extensions: ["xul"] + }, + "application/vnd.ms-3mfdocument": { + source: "iana" + }, + "application/vnd.ms-artgalry": { + source: "iana", + extensions: ["cil"] + }, + "application/vnd.ms-asf": { + source: "iana" + }, + "application/vnd.ms-cab-compressed": { + source: "iana", + extensions: ["cab"] + }, + "application/vnd.ms-color.iccprofile": { + source: "apache" + }, + "application/vnd.ms-excel": { + source: "iana", + compressible: false, + extensions: ["xls", "xlm", "xla", "xlc", "xlt", "xlw"] + }, + "application/vnd.ms-excel.addin.macroenabled.12": { + source: "iana", + extensions: ["xlam"] + }, + "application/vnd.ms-excel.sheet.binary.macroenabled.12": { + source: "iana", + extensions: ["xlsb"] + }, + "application/vnd.ms-excel.sheet.macroenabled.12": { + source: "iana", + extensions: ["xlsm"] + }, + "application/vnd.ms-excel.template.macroenabled.12": { + source: "iana", + extensions: ["xltm"] + }, + "application/vnd.ms-fontobject": { + source: "iana", + compressible: true, + extensions: ["eot"] + }, + "application/vnd.ms-htmlhelp": { + source: "iana", + extensions: ["chm"] + }, + "application/vnd.ms-ims": { + source: "iana", + extensions: ["ims"] + }, + "application/vnd.ms-lrm": { + source: "iana", + extensions: ["lrm"] + }, + "application/vnd.ms-office.activex+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ms-officetheme": { + source: "iana", + extensions: ["thmx"] + }, + "application/vnd.ms-opentype": { + source: "apache", + compressible: true + }, + "application/vnd.ms-outlook": { + compressible: false, + extensions: ["msg"] + }, + "application/vnd.ms-package.obfuscated-opentype": { + source: "apache" + }, + "application/vnd.ms-pki.seccat": { + source: "apache", + extensions: ["cat"] + }, + "application/vnd.ms-pki.stl": { + source: "apache", + extensions: ["stl"] + }, + "application/vnd.ms-playready.initiator+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ms-powerpoint": { + source: "iana", + compressible: false, + extensions: ["ppt", "pps", "pot"] + }, + "application/vnd.ms-powerpoint.addin.macroenabled.12": { + source: "iana", + extensions: ["ppam"] + }, + "application/vnd.ms-powerpoint.presentation.macroenabled.12": { + source: "iana", + extensions: ["pptm"] + }, + "application/vnd.ms-powerpoint.slide.macroenabled.12": { + source: "iana", + extensions: ["sldm"] + }, + "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { + source: "iana", + extensions: ["ppsm"] + }, + "application/vnd.ms-powerpoint.template.macroenabled.12": { + source: "iana", + extensions: ["potm"] + }, + "application/vnd.ms-printdevicecapabilities+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ms-printing.printticket+xml": { + source: "apache", + compressible: true + }, + "application/vnd.ms-printschematicket+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ms-project": { + source: "iana", + extensions: ["mpp", "mpt"] + }, + "application/vnd.ms-tnef": { + source: "iana" + }, + "application/vnd.ms-windows.devicepairing": { + source: "iana" + }, + "application/vnd.ms-windows.nwprinting.oob": { + source: "iana" + }, + "application/vnd.ms-windows.printerpairing": { + source: "iana" + }, + "application/vnd.ms-windows.wsd.oob": { + source: "iana" + }, + "application/vnd.ms-wmdrm.lic-chlg-req": { + source: "iana" + }, + "application/vnd.ms-wmdrm.lic-resp": { + source: "iana" + }, + "application/vnd.ms-wmdrm.meter-chlg-req": { + source: "iana" + }, + "application/vnd.ms-wmdrm.meter-resp": { + source: "iana" + }, + "application/vnd.ms-word.document.macroenabled.12": { + source: "iana", + extensions: ["docm"] + }, + "application/vnd.ms-word.template.macroenabled.12": { + source: "iana", + extensions: ["dotm"] + }, + "application/vnd.ms-works": { + source: "iana", + extensions: ["wps", "wks", "wcm", "wdb"] + }, + "application/vnd.ms-wpl": { + source: "iana", + extensions: ["wpl"] + }, + "application/vnd.ms-xpsdocument": { + source: "iana", + compressible: false, + extensions: ["xps"] + }, + "application/vnd.msa-disk-image": { + source: "iana" + }, + "application/vnd.mseq": { + source: "iana", + extensions: ["mseq"] + }, + "application/vnd.msign": { + source: "iana" + }, + "application/vnd.multiad.creator": { + source: "iana" + }, + "application/vnd.multiad.creator.cif": { + source: "iana" + }, + "application/vnd.music-niff": { + source: "iana" + }, + "application/vnd.musician": { + source: "iana", + extensions: ["mus"] + }, + "application/vnd.muvee.style": { + source: "iana", + extensions: ["msty"] + }, + "application/vnd.mynfc": { + source: "iana", + extensions: ["taglet"] + }, + "application/vnd.nacamar.ybrid+json": { + source: "iana", + compressible: true + }, + "application/vnd.ncd.control": { + source: "iana" + }, + "application/vnd.ncd.reference": { + source: "iana" + }, + "application/vnd.nearst.inv+json": { + source: "iana", + compressible: true + }, + "application/vnd.nebumind.line": { + source: "iana" + }, + "application/vnd.nervana": { + source: "iana" + }, + "application/vnd.netfpx": { + source: "iana" + }, + "application/vnd.neurolanguage.nlu": { + source: "iana", + extensions: ["nlu"] + }, + "application/vnd.nimn": { + source: "iana" + }, + "application/vnd.nintendo.nitro.rom": { + source: "iana" + }, + "application/vnd.nintendo.snes.rom": { + source: "iana" + }, + "application/vnd.nitf": { + source: "iana", + extensions: ["ntf", "nitf"] + }, + "application/vnd.noblenet-directory": { + source: "iana", + extensions: ["nnd"] + }, + "application/vnd.noblenet-sealer": { + source: "iana", + extensions: ["nns"] + }, + "application/vnd.noblenet-web": { + source: "iana", + extensions: ["nnw"] + }, + "application/vnd.nokia.catalogs": { + source: "iana" + }, + "application/vnd.nokia.conml+wbxml": { + source: "iana" + }, + "application/vnd.nokia.conml+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.iptv.config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.isds-radio-presets": { + source: "iana" + }, + "application/vnd.nokia.landmark+wbxml": { + source: "iana" + }, + "application/vnd.nokia.landmark+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.landmarkcollection+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.n-gage.ac+xml": { + source: "iana", + compressible: true, + extensions: ["ac"] + }, + "application/vnd.nokia.n-gage.data": { + source: "iana", + extensions: ["ngdat"] + }, + "application/vnd.nokia.n-gage.symbian.install": { + source: "iana", + extensions: ["n-gage"] + }, + "application/vnd.nokia.ncd": { + source: "iana" + }, + "application/vnd.nokia.pcd+wbxml": { + source: "iana" + }, + "application/vnd.nokia.pcd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.radio-preset": { + source: "iana", + extensions: ["rpst"] + }, + "application/vnd.nokia.radio-presets": { + source: "iana", + extensions: ["rpss"] + }, + "application/vnd.novadigm.edm": { + source: "iana", + extensions: ["edm"] + }, + "application/vnd.novadigm.edx": { + source: "iana", + extensions: ["edx"] + }, + "application/vnd.novadigm.ext": { + source: "iana", + extensions: ["ext"] + }, + "application/vnd.ntt-local.content-share": { + source: "iana" + }, + "application/vnd.ntt-local.file-transfer": { + source: "iana" + }, + "application/vnd.ntt-local.ogw_remote-access": { + source: "iana" + }, + "application/vnd.ntt-local.sip-ta_remote": { + source: "iana" + }, + "application/vnd.ntt-local.sip-ta_tcp_stream": { + source: "iana" + }, + "application/vnd.oasis.opendocument.chart": { + source: "iana", + extensions: ["odc"] + }, + "application/vnd.oasis.opendocument.chart-template": { + source: "iana", + extensions: ["otc"] + }, + "application/vnd.oasis.opendocument.database": { + source: "iana", + extensions: ["odb"] + }, + "application/vnd.oasis.opendocument.formula": { + source: "iana", + extensions: ["odf"] + }, + "application/vnd.oasis.opendocument.formula-template": { + source: "iana", + extensions: ["odft"] + }, + "application/vnd.oasis.opendocument.graphics": { + source: "iana", + compressible: false, + extensions: ["odg"] + }, + "application/vnd.oasis.opendocument.graphics-template": { + source: "iana", + extensions: ["otg"] + }, + "application/vnd.oasis.opendocument.image": { + source: "iana", + extensions: ["odi"] + }, + "application/vnd.oasis.opendocument.image-template": { + source: "iana", + extensions: ["oti"] + }, + "application/vnd.oasis.opendocument.presentation": { + source: "iana", + compressible: false, + extensions: ["odp"] + }, + "application/vnd.oasis.opendocument.presentation-template": { + source: "iana", + extensions: ["otp"] + }, + "application/vnd.oasis.opendocument.spreadsheet": { + source: "iana", + compressible: false, + extensions: ["ods"] + }, + "application/vnd.oasis.opendocument.spreadsheet-template": { + source: "iana", + extensions: ["ots"] + }, + "application/vnd.oasis.opendocument.text": { + source: "iana", + compressible: false, + extensions: ["odt"] + }, + "application/vnd.oasis.opendocument.text-master": { + source: "iana", + extensions: ["odm"] + }, + "application/vnd.oasis.opendocument.text-template": { + source: "iana", + extensions: ["ott"] + }, + "application/vnd.oasis.opendocument.text-web": { + source: "iana", + extensions: ["oth"] + }, + "application/vnd.obn": { + source: "iana" + }, + "application/vnd.ocf+cbor": { + source: "iana" + }, + "application/vnd.oci.image.manifest.v1+json": { + source: "iana", + compressible: true + }, + "application/vnd.oftn.l10n+json": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.contentaccessdownload+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.cspg-hexbinary": { + source: "iana" + }, + "application/vnd.oipf.dae.svg+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.dae.xhtml+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.pae.gem": { + source: "iana" + }, + "application/vnd.oipf.spdiscovery+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.spdlist+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.ueprofile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.userprofile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.olpc-sugar": { + source: "iana", + extensions: ["xo"] + }, + "application/vnd.oma-scws-config": { + source: "iana" + }, + "application/vnd.oma-scws-http-request": { + source: "iana" + }, + "application/vnd.oma-scws-http-response": { + source: "iana" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.imd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.ltkm": { + source: "iana" + }, + "application/vnd.oma.bcast.notification+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.provisioningtrigger": { + source: "iana" + }, + "application/vnd.oma.bcast.sgboot": { + source: "iana" + }, + "application/vnd.oma.bcast.sgdd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.sgdu": { + source: "iana" + }, + "application/vnd.oma.bcast.simple-symbol-container": { + source: "iana" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.sprov+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.stkm": { + source: "iana" + }, + "application/vnd.oma.cab-address-book+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.cab-feature-handler+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.cab-pcc+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.cab-subs-invite+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.cab-user-prefs+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.dcd": { + source: "iana" + }, + "application/vnd.oma.dcdc": { + source: "iana" + }, + "application/vnd.oma.dd2+xml": { + source: "iana", + compressible: true, + extensions: ["dd2"] + }, + "application/vnd.oma.drm.risd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.group-usage-list+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.lwm2m+cbor": { + source: "iana" + }, + "application/vnd.oma.lwm2m+json": { + source: "iana", + compressible: true + }, + "application/vnd.oma.lwm2m+tlv": { + source: "iana" + }, + "application/vnd.oma.pal+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.final-report+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.groups+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.push": { + source: "iana" + }, + "application/vnd.oma.scidm.messages+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.xcap-directory+xml": { + source: "iana", + compressible: true + }, + "application/vnd.omads-email+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.omads-file+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.omads-folder+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.omaloc-supl-init": { + source: "iana" + }, + "application/vnd.onepager": { + source: "iana" + }, + "application/vnd.onepagertamp": { + source: "iana" + }, + "application/vnd.onepagertamx": { + source: "iana" + }, + "application/vnd.onepagertat": { + source: "iana" + }, + "application/vnd.onepagertatp": { + source: "iana" + }, + "application/vnd.onepagertatx": { + source: "iana" + }, + "application/vnd.openblox.game+xml": { + source: "iana", + compressible: true, + extensions: ["obgx"] + }, + "application/vnd.openblox.game-binary": { + source: "iana" + }, + "application/vnd.openeye.oeb": { + source: "iana" + }, + "application/vnd.openofficeorg.extension": { + source: "apache", + extensions: ["oxt"] + }, + "application/vnd.openstreetmap.data+xml": { + source: "iana", + compressible: true, + extensions: ["osm"] + }, + "application/vnd.opentimestamps.ots": { + source: "iana" + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": { + source: "iana", + compressible: false, + extensions: ["pptx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide": { + source: "iana", + extensions: ["sldx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { + source: "iana", + extensions: ["ppsx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.template": { + source: "iana", + extensions: ["potx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { + source: "iana", + compressible: false, + extensions: ["xlsx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { + source: "iana", + extensions: ["xltx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.vmldrawing": { + source: "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + source: "iana", + compressible: false, + extensions: ["docx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { + source: "iana", + extensions: ["dotx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-package.relationships+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oracle.resource+json": { + source: "iana", + compressible: true + }, + "application/vnd.orange.indata": { + source: "iana" + }, + "application/vnd.osa.netdeploy": { + source: "iana" + }, + "application/vnd.osgeo.mapguide.package": { + source: "iana", + extensions: ["mgp"] + }, + "application/vnd.osgi.bundle": { + source: "iana" + }, + "application/vnd.osgi.dp": { + source: "iana", + extensions: ["dp"] + }, + "application/vnd.osgi.subsystem": { + source: "iana", + extensions: ["esa"] + }, + "application/vnd.otps.ct-kip+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oxli.countgraph": { + source: "iana" + }, + "application/vnd.pagerduty+json": { + source: "iana", + compressible: true + }, + "application/vnd.palm": { + source: "iana", + extensions: ["pdb", "pqa", "oprc"] + }, + "application/vnd.panoply": { + source: "iana" + }, + "application/vnd.paos.xml": { + source: "iana" + }, + "application/vnd.patentdive": { + source: "iana" + }, + "application/vnd.patientecommsdoc": { + source: "iana" + }, + "application/vnd.pawaafile": { + source: "iana", + extensions: ["paw"] + }, + "application/vnd.pcos": { + source: "iana" + }, + "application/vnd.pg.format": { + source: "iana", + extensions: ["str"] + }, + "application/vnd.pg.osasli": { + source: "iana", + extensions: ["ei6"] + }, + "application/vnd.piaccess.application-licence": { + source: "iana" + }, + "application/vnd.picsel": { + source: "iana", + extensions: ["efif"] + }, + "application/vnd.pmi.widget": { + source: "iana", + extensions: ["wg"] + }, + "application/vnd.poc.group-advertisement+xml": { + source: "iana", + compressible: true + }, + "application/vnd.pocketlearn": { + source: "iana", + extensions: ["plf"] + }, + "application/vnd.powerbuilder6": { + source: "iana", + extensions: ["pbd"] + }, + "application/vnd.powerbuilder6-s": { + source: "iana" + }, + "application/vnd.powerbuilder7": { + source: "iana" + }, + "application/vnd.powerbuilder7-s": { + source: "iana" + }, + "application/vnd.powerbuilder75": { + source: "iana" + }, + "application/vnd.powerbuilder75-s": { + source: "iana" + }, + "application/vnd.preminet": { + source: "iana" + }, + "application/vnd.previewsystems.box": { + source: "iana", + extensions: ["box"] + }, + "application/vnd.proteus.magazine": { + source: "iana", + extensions: ["mgz"] + }, + "application/vnd.psfs": { + source: "iana" + }, + "application/vnd.publishare-delta-tree": { + source: "iana", + extensions: ["qps"] + }, + "application/vnd.pvi.ptid1": { + source: "iana", + extensions: ["ptid"] + }, + "application/vnd.pwg-multiplexed": { + source: "iana" + }, + "application/vnd.pwg-xhtml-print+xml": { + source: "iana", + compressible: true + }, + "application/vnd.qualcomm.brew-app-res": { + source: "iana" + }, + "application/vnd.quarantainenet": { + source: "iana" + }, + "application/vnd.quark.quarkxpress": { + source: "iana", + extensions: ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"] + }, + "application/vnd.quobject-quoxdocument": { + source: "iana" + }, + "application/vnd.radisys.moml+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit-conf+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit-conn+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit-stream+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-conf+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-base+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-group+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + source: "iana", + compressible: true + }, + "application/vnd.rainstor.data": { + source: "iana" + }, + "application/vnd.rapid": { + source: "iana" + }, + "application/vnd.rar": { + source: "iana", + extensions: ["rar"] + }, + "application/vnd.realvnc.bed": { + source: "iana", + extensions: ["bed"] + }, + "application/vnd.recordare.musicxml": { + source: "iana", + extensions: ["mxl"] + }, + "application/vnd.recordare.musicxml+xml": { + source: "iana", + compressible: true, + extensions: ["musicxml"] + }, + "application/vnd.renlearn.rlprint": { + source: "iana" + }, + "application/vnd.resilient.logic": { + source: "iana" + }, + "application/vnd.restful+json": { + source: "iana", + compressible: true + }, + "application/vnd.rig.cryptonote": { + source: "iana", + extensions: ["cryptonote"] + }, + "application/vnd.rim.cod": { + source: "apache", + extensions: ["cod"] + }, + "application/vnd.rn-realmedia": { + source: "apache", + extensions: ["rm"] + }, + "application/vnd.rn-realmedia-vbr": { + source: "apache", + extensions: ["rmvb"] + }, + "application/vnd.route66.link66+xml": { + source: "iana", + compressible: true, + extensions: ["link66"] + }, + "application/vnd.rs-274x": { + source: "iana" + }, + "application/vnd.ruckus.download": { + source: "iana" + }, + "application/vnd.s3sms": { + source: "iana" + }, + "application/vnd.sailingtracker.track": { + source: "iana", + extensions: ["st"] + }, + "application/vnd.sar": { + source: "iana" + }, + "application/vnd.sbm.cid": { + source: "iana" + }, + "application/vnd.sbm.mid2": { + source: "iana" + }, + "application/vnd.scribus": { + source: "iana" + }, + "application/vnd.sealed.3df": { + source: "iana" + }, + "application/vnd.sealed.csf": { + source: "iana" + }, + "application/vnd.sealed.doc": { + source: "iana" + }, + "application/vnd.sealed.eml": { + source: "iana" + }, + "application/vnd.sealed.mht": { + source: "iana" + }, + "application/vnd.sealed.net": { + source: "iana" + }, + "application/vnd.sealed.ppt": { + source: "iana" + }, + "application/vnd.sealed.tiff": { + source: "iana" + }, + "application/vnd.sealed.xls": { + source: "iana" + }, + "application/vnd.sealedmedia.softseal.html": { + source: "iana" + }, + "application/vnd.sealedmedia.softseal.pdf": { + source: "iana" + }, + "application/vnd.seemail": { + source: "iana", + extensions: ["see"] + }, + "application/vnd.seis+json": { + source: "iana", + compressible: true + }, + "application/vnd.sema": { + source: "iana", + extensions: ["sema"] + }, + "application/vnd.semd": { + source: "iana", + extensions: ["semd"] + }, + "application/vnd.semf": { + source: "iana", + extensions: ["semf"] + }, + "application/vnd.shade-save-file": { + source: "iana" + }, + "application/vnd.shana.informed.formdata": { + source: "iana", + extensions: ["ifm"] + }, + "application/vnd.shana.informed.formtemplate": { + source: "iana", + extensions: ["itp"] + }, + "application/vnd.shana.informed.interchange": { + source: "iana", + extensions: ["iif"] + }, + "application/vnd.shana.informed.package": { + source: "iana", + extensions: ["ipk"] + }, + "application/vnd.shootproof+json": { + source: "iana", + compressible: true + }, + "application/vnd.shopkick+json": { + source: "iana", + compressible: true + }, + "application/vnd.shp": { + source: "iana" + }, + "application/vnd.shx": { + source: "iana" + }, + "application/vnd.sigrok.session": { + source: "iana" + }, + "application/vnd.simtech-mindmapper": { + source: "iana", + extensions: ["twd", "twds"] + }, + "application/vnd.siren+json": { + source: "iana", + compressible: true + }, + "application/vnd.smaf": { + source: "iana", + extensions: ["mmf"] + }, + "application/vnd.smart.notebook": { + source: "iana" + }, + "application/vnd.smart.teacher": { + source: "iana", + extensions: ["teacher"] + }, + "application/vnd.snesdev-page-table": { + source: "iana" + }, + "application/vnd.software602.filler.form+xml": { + source: "iana", + compressible: true, + extensions: ["fo"] + }, + "application/vnd.software602.filler.form-xml-zip": { + source: "iana" + }, + "application/vnd.solent.sdkm+xml": { + source: "iana", + compressible: true, + extensions: ["sdkm", "sdkd"] + }, + "application/vnd.spotfire.dxp": { + source: "iana", + extensions: ["dxp"] + }, + "application/vnd.spotfire.sfs": { + source: "iana", + extensions: ["sfs"] + }, + "application/vnd.sqlite3": { + source: "iana" + }, + "application/vnd.sss-cod": { + source: "iana" + }, + "application/vnd.sss-dtf": { + source: "iana" + }, + "application/vnd.sss-ntf": { + source: "iana" + }, + "application/vnd.stardivision.calc": { + source: "apache", + extensions: ["sdc"] + }, + "application/vnd.stardivision.draw": { + source: "apache", + extensions: ["sda"] + }, + "application/vnd.stardivision.impress": { + source: "apache", + extensions: ["sdd"] + }, + "application/vnd.stardivision.math": { + source: "apache", + extensions: ["smf"] + }, + "application/vnd.stardivision.writer": { + source: "apache", + extensions: ["sdw", "vor"] + }, + "application/vnd.stardivision.writer-global": { + source: "apache", + extensions: ["sgl"] + }, + "application/vnd.stepmania.package": { + source: "iana", + extensions: ["smzip"] + }, + "application/vnd.stepmania.stepchart": { + source: "iana", + extensions: ["sm"] + }, + "application/vnd.street-stream": { + source: "iana" + }, + "application/vnd.sun.wadl+xml": { + source: "iana", + compressible: true, + extensions: ["wadl"] + }, + "application/vnd.sun.xml.calc": { + source: "apache", + extensions: ["sxc"] + }, + "application/vnd.sun.xml.calc.template": { + source: "apache", + extensions: ["stc"] + }, + "application/vnd.sun.xml.draw": { + source: "apache", + extensions: ["sxd"] + }, + "application/vnd.sun.xml.draw.template": { + source: "apache", + extensions: ["std"] + }, + "application/vnd.sun.xml.impress": { + source: "apache", + extensions: ["sxi"] + }, + "application/vnd.sun.xml.impress.template": { + source: "apache", + extensions: ["sti"] + }, + "application/vnd.sun.xml.math": { + source: "apache", + extensions: ["sxm"] + }, + "application/vnd.sun.xml.writer": { + source: "apache", + extensions: ["sxw"] + }, + "application/vnd.sun.xml.writer.global": { + source: "apache", + extensions: ["sxg"] + }, + "application/vnd.sun.xml.writer.template": { + source: "apache", + extensions: ["stw"] + }, + "application/vnd.sus-calendar": { + source: "iana", + extensions: ["sus", "susp"] + }, + "application/vnd.svd": { + source: "iana", + extensions: ["svd"] + }, + "application/vnd.swiftview-ics": { + source: "iana" + }, + "application/vnd.sycle+xml": { + source: "iana", + compressible: true + }, + "application/vnd.syft+json": { + source: "iana", + compressible: true + }, + "application/vnd.symbian.install": { + source: "apache", + extensions: ["sis", "sisx"] + }, + "application/vnd.syncml+xml": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["xsm"] + }, + "application/vnd.syncml.dm+wbxml": { + source: "iana", + charset: "UTF-8", + extensions: ["bdm"] + }, + "application/vnd.syncml.dm+xml": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["xdm"] + }, + "application/vnd.syncml.dm.notification": { + source: "iana" + }, + "application/vnd.syncml.dmddf+wbxml": { + source: "iana" + }, + "application/vnd.syncml.dmddf+xml": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["ddf"] + }, + "application/vnd.syncml.dmtnds+wbxml": { + source: "iana" + }, + "application/vnd.syncml.dmtnds+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.syncml.ds.notification": { + source: "iana" + }, + "application/vnd.tableschema+json": { + source: "iana", + compressible: true + }, + "application/vnd.tao.intent-module-archive": { + source: "iana", + extensions: ["tao"] + }, + "application/vnd.tcpdump.pcap": { + source: "iana", + extensions: ["pcap", "cap", "dmp"] + }, + "application/vnd.think-cell.ppttc+json": { + source: "iana", + compressible: true + }, + "application/vnd.tmd.mediaflex.api+xml": { + source: "iana", + compressible: true + }, + "application/vnd.tml": { + source: "iana" + }, + "application/vnd.tmobile-livetv": { + source: "iana", + extensions: ["tmo"] + }, + "application/vnd.tri.onesource": { + source: "iana" + }, + "application/vnd.trid.tpt": { + source: "iana", + extensions: ["tpt"] + }, + "application/vnd.triscape.mxs": { + source: "iana", + extensions: ["mxs"] + }, + "application/vnd.trueapp": { + source: "iana", + extensions: ["tra"] + }, + "application/vnd.truedoc": { + source: "iana" + }, + "application/vnd.ubisoft.webplayer": { + source: "iana" + }, + "application/vnd.ufdl": { + source: "iana", + extensions: ["ufd", "ufdl"] + }, + "application/vnd.uiq.theme": { + source: "iana", + extensions: ["utz"] + }, + "application/vnd.umajin": { + source: "iana", + extensions: ["umj"] + }, + "application/vnd.unity": { + source: "iana", + extensions: ["unityweb"] + }, + "application/vnd.uoml+xml": { + source: "iana", + compressible: true, + extensions: ["uoml"] + }, + "application/vnd.uplanet.alert": { + source: "iana" + }, + "application/vnd.uplanet.alert-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.bearer-choice": { + source: "iana" + }, + "application/vnd.uplanet.bearer-choice-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.cacheop": { + source: "iana" + }, + "application/vnd.uplanet.cacheop-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.channel": { + source: "iana" + }, + "application/vnd.uplanet.channel-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.list": { + source: "iana" + }, + "application/vnd.uplanet.list-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.listcmd": { + source: "iana" + }, + "application/vnd.uplanet.listcmd-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.signal": { + source: "iana" + }, + "application/vnd.uri-map": { + source: "iana" + }, + "application/vnd.valve.source.material": { + source: "iana" + }, + "application/vnd.vcx": { + source: "iana", + extensions: ["vcx"] + }, + "application/vnd.vd-study": { + source: "iana" + }, + "application/vnd.vectorworks": { + source: "iana" + }, + "application/vnd.vel+json": { + source: "iana", + compressible: true + }, + "application/vnd.verimatrix.vcas": { + source: "iana" + }, + "application/vnd.veritone.aion+json": { + source: "iana", + compressible: true + }, + "application/vnd.veryant.thin": { + source: "iana" + }, + "application/vnd.ves.encrypted": { + source: "iana" + }, + "application/vnd.vidsoft.vidconference": { + source: "iana" + }, + "application/vnd.visio": { + source: "iana", + extensions: ["vsd", "vst", "vss", "vsw"] + }, + "application/vnd.visionary": { + source: "iana", + extensions: ["vis"] + }, + "application/vnd.vividence.scriptfile": { + source: "iana" + }, + "application/vnd.vsf": { + source: "iana", + extensions: ["vsf"] + }, + "application/vnd.wap.sic": { + source: "iana" + }, + "application/vnd.wap.slc": { + source: "iana" + }, + "application/vnd.wap.wbxml": { + source: "iana", + charset: "UTF-8", + extensions: ["wbxml"] + }, + "application/vnd.wap.wmlc": { + source: "iana", + extensions: ["wmlc"] + }, + "application/vnd.wap.wmlscriptc": { + source: "iana", + extensions: ["wmlsc"] + }, + "application/vnd.webturbo": { + source: "iana", + extensions: ["wtb"] + }, + "application/vnd.wfa.dpp": { + source: "iana" + }, + "application/vnd.wfa.p2p": { + source: "iana" + }, + "application/vnd.wfa.wsc": { + source: "iana" + }, + "application/vnd.windows.devicepairing": { + source: "iana" + }, + "application/vnd.wmc": { + source: "iana" + }, + "application/vnd.wmf.bootstrap": { + source: "iana" + }, + "application/vnd.wolfram.mathematica": { + source: "iana" + }, + "application/vnd.wolfram.mathematica.package": { + source: "iana" + }, + "application/vnd.wolfram.player": { + source: "iana", + extensions: ["nbp"] + }, + "application/vnd.wordperfect": { + source: "iana", + extensions: ["wpd"] + }, + "application/vnd.wqd": { + source: "iana", + extensions: ["wqd"] + }, + "application/vnd.wrq-hp3000-labelled": { + source: "iana" + }, + "application/vnd.wt.stf": { + source: "iana", + extensions: ["stf"] + }, + "application/vnd.wv.csp+wbxml": { + source: "iana" + }, + "application/vnd.wv.csp+xml": { + source: "iana", + compressible: true + }, + "application/vnd.wv.ssp+xml": { + source: "iana", + compressible: true + }, + "application/vnd.xacml+json": { + source: "iana", + compressible: true + }, + "application/vnd.xara": { + source: "iana", + extensions: ["xar"] + }, + "application/vnd.xfdl": { + source: "iana", + extensions: ["xfdl"] + }, + "application/vnd.xfdl.webform": { + source: "iana" + }, + "application/vnd.xmi+xml": { + source: "iana", + compressible: true + }, + "application/vnd.xmpie.cpkg": { + source: "iana" + }, + "application/vnd.xmpie.dpkg": { + source: "iana" + }, + "application/vnd.xmpie.plan": { + source: "iana" + }, + "application/vnd.xmpie.ppkg": { + source: "iana" + }, + "application/vnd.xmpie.xlim": { + source: "iana" + }, + "application/vnd.yamaha.hv-dic": { + source: "iana", + extensions: ["hvd"] + }, + "application/vnd.yamaha.hv-script": { + source: "iana", + extensions: ["hvs"] + }, + "application/vnd.yamaha.hv-voice": { + source: "iana", + extensions: ["hvp"] + }, + "application/vnd.yamaha.openscoreformat": { + source: "iana", + extensions: ["osf"] + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + source: "iana", + compressible: true, + extensions: ["osfpvg"] + }, + "application/vnd.yamaha.remote-setup": { + source: "iana" + }, + "application/vnd.yamaha.smaf-audio": { + source: "iana", + extensions: ["saf"] + }, + "application/vnd.yamaha.smaf-phrase": { + source: "iana", + extensions: ["spf"] + }, + "application/vnd.yamaha.through-ngn": { + source: "iana" + }, + "application/vnd.yamaha.tunnel-udpencap": { + source: "iana" + }, + "application/vnd.yaoweme": { + source: "iana" + }, + "application/vnd.yellowriver-custom-menu": { + source: "iana", + extensions: ["cmp"] + }, + "application/vnd.youtube.yt": { + source: "iana" + }, + "application/vnd.zul": { + source: "iana", + extensions: ["zir", "zirz"] + }, + "application/vnd.zzazz.deck+xml": { + source: "iana", + compressible: true, + extensions: ["zaz"] + }, + "application/voicexml+xml": { + source: "iana", + compressible: true, + extensions: ["vxml"] + }, + "application/voucher-cms+json": { + source: "iana", + compressible: true + }, + "application/vq-rtcpxr": { + source: "iana" + }, + "application/wasm": { + source: "iana", + compressible: true, + extensions: ["wasm"] + }, + "application/watcherinfo+xml": { + source: "iana", + compressible: true, + extensions: ["wif"] + }, + "application/webpush-options+json": { + source: "iana", + compressible: true + }, + "application/whoispp-query": { + source: "iana" + }, + "application/whoispp-response": { + source: "iana" + }, + "application/widget": { + source: "iana", + extensions: ["wgt"] + }, + "application/winhlp": { + source: "apache", + extensions: ["hlp"] + }, + "application/wita": { + source: "iana" + }, + "application/wordperfect5.1": { + source: "iana" + }, + "application/wsdl+xml": { + source: "iana", + compressible: true, + extensions: ["wsdl"] + }, + "application/wspolicy+xml": { + source: "iana", + compressible: true, + extensions: ["wspolicy"] + }, + "application/x-7z-compressed": { + source: "apache", + compressible: false, + extensions: ["7z"] + }, + "application/x-abiword": { + source: "apache", + extensions: ["abw"] + }, + "application/x-ace-compressed": { + source: "apache", + extensions: ["ace"] + }, + "application/x-amf": { + source: "apache" + }, + "application/x-apple-diskimage": { + source: "apache", + extensions: ["dmg"] + }, + "application/x-arj": { + compressible: false, + extensions: ["arj"] + }, + "application/x-authorware-bin": { + source: "apache", + extensions: ["aab", "x32", "u32", "vox"] + }, + "application/x-authorware-map": { + source: "apache", + extensions: ["aam"] + }, + "application/x-authorware-seg": { + source: "apache", + extensions: ["aas"] + }, + "application/x-bcpio": { + source: "apache", + extensions: ["bcpio"] + }, + "application/x-bdoc": { + compressible: false, + extensions: ["bdoc"] + }, + "application/x-bittorrent": { + source: "apache", + extensions: ["torrent"] + }, + "application/x-blorb": { + source: "apache", + extensions: ["blb", "blorb"] + }, + "application/x-bzip": { + source: "apache", + compressible: false, + extensions: ["bz"] + }, + "application/x-bzip2": { + source: "apache", + compressible: false, + extensions: ["bz2", "boz"] + }, + "application/x-cbr": { + source: "apache", + extensions: ["cbr", "cba", "cbt", "cbz", "cb7"] + }, + "application/x-cdlink": { + source: "apache", + extensions: ["vcd"] + }, + "application/x-cfs-compressed": { + source: "apache", + extensions: ["cfs"] + }, + "application/x-chat": { + source: "apache", + extensions: ["chat"] + }, + "application/x-chess-pgn": { + source: "apache", + extensions: ["pgn"] + }, + "application/x-chrome-extension": { + extensions: ["crx"] + }, + "application/x-cocoa": { + source: "nginx", + extensions: ["cco"] + }, + "application/x-compress": { + source: "apache" + }, + "application/x-conference": { + source: "apache", + extensions: ["nsc"] + }, + "application/x-cpio": { + source: "apache", + extensions: ["cpio"] + }, + "application/x-csh": { + source: "apache", + extensions: ["csh"] + }, + "application/x-deb": { + compressible: false + }, + "application/x-debian-package": { + source: "apache", + extensions: ["deb", "udeb"] + }, + "application/x-dgc-compressed": { + source: "apache", + extensions: ["dgc"] + }, + "application/x-director": { + source: "apache", + extensions: ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"] + }, + "application/x-doom": { + source: "apache", + extensions: ["wad"] + }, + "application/x-dtbncx+xml": { + source: "apache", + compressible: true, + extensions: ["ncx"] + }, + "application/x-dtbook+xml": { + source: "apache", + compressible: true, + extensions: ["dtb"] + }, + "application/x-dtbresource+xml": { + source: "apache", + compressible: true, + extensions: ["res"] + }, + "application/x-dvi": { + source: "apache", + compressible: false, + extensions: ["dvi"] + }, + "application/x-envoy": { + source: "apache", + extensions: ["evy"] + }, + "application/x-eva": { + source: "apache", + extensions: ["eva"] + }, + "application/x-font-bdf": { + source: "apache", + extensions: ["bdf"] + }, + "application/x-font-dos": { + source: "apache" + }, + "application/x-font-framemaker": { + source: "apache" + }, + "application/x-font-ghostscript": { + source: "apache", + extensions: ["gsf"] + }, + "application/x-font-libgrx": { + source: "apache" + }, + "application/x-font-linux-psf": { + source: "apache", + extensions: ["psf"] + }, + "application/x-font-pcf": { + source: "apache", + extensions: ["pcf"] + }, + "application/x-font-snf": { + source: "apache", + extensions: ["snf"] + }, + "application/x-font-speedo": { + source: "apache" + }, + "application/x-font-sunos-news": { + source: "apache" + }, + "application/x-font-type1": { + source: "apache", + extensions: ["pfa", "pfb", "pfm", "afm"] + }, + "application/x-font-vfont": { + source: "apache" + }, + "application/x-freearc": { + source: "apache", + extensions: ["arc"] + }, + "application/x-futuresplash": { + source: "apache", + extensions: ["spl"] + }, + "application/x-gca-compressed": { + source: "apache", + extensions: ["gca"] + }, + "application/x-glulx": { + source: "apache", + extensions: ["ulx"] + }, + "application/x-gnumeric": { + source: "apache", + extensions: ["gnumeric"] + }, + "application/x-gramps-xml": { + source: "apache", + extensions: ["gramps"] + }, + "application/x-gtar": { + source: "apache", + extensions: ["gtar"] + }, + "application/x-gzip": { + source: "apache" + }, + "application/x-hdf": { + source: "apache", + extensions: ["hdf"] + }, + "application/x-httpd-php": { + compressible: true, + extensions: ["php"] + }, + "application/x-install-instructions": { + source: "apache", + extensions: ["install"] + }, + "application/x-iso9660-image": { + source: "apache", + extensions: ["iso"] + }, + "application/x-iwork-keynote-sffkey": { + extensions: ["key"] + }, + "application/x-iwork-numbers-sffnumbers": { + extensions: ["numbers"] + }, + "application/x-iwork-pages-sffpages": { + extensions: ["pages"] + }, + "application/x-java-archive-diff": { + source: "nginx", + extensions: ["jardiff"] + }, + "application/x-java-jnlp-file": { + source: "apache", + compressible: false, + extensions: ["jnlp"] + }, + "application/x-javascript": { + compressible: true + }, + "application/x-keepass2": { + extensions: ["kdbx"] + }, + "application/x-latex": { + source: "apache", + compressible: false, + extensions: ["latex"] + }, + "application/x-lua-bytecode": { + extensions: ["luac"] + }, + "application/x-lzh-compressed": { + source: "apache", + extensions: ["lzh", "lha"] + }, + "application/x-makeself": { + source: "nginx", + extensions: ["run"] + }, + "application/x-mie": { + source: "apache", + extensions: ["mie"] + }, + "application/x-mobipocket-ebook": { + source: "apache", + extensions: ["prc", "mobi"] + }, + "application/x-mpegurl": { + compressible: false + }, + "application/x-ms-application": { + source: "apache", + extensions: ["application"] + }, + "application/x-ms-shortcut": { + source: "apache", + extensions: ["lnk"] + }, + "application/x-ms-wmd": { + source: "apache", + extensions: ["wmd"] + }, + "application/x-ms-wmz": { + source: "apache", + extensions: ["wmz"] + }, + "application/x-ms-xbap": { + source: "apache", + extensions: ["xbap"] + }, + "application/x-msaccess": { + source: "apache", + extensions: ["mdb"] + }, + "application/x-msbinder": { + source: "apache", + extensions: ["obd"] + }, + "application/x-mscardfile": { + source: "apache", + extensions: ["crd"] + }, + "application/x-msclip": { + source: "apache", + extensions: ["clp"] + }, + "application/x-msdos-program": { + extensions: ["exe"] + }, + "application/x-msdownload": { + source: "apache", + extensions: ["exe", "dll", "com", "bat", "msi"] + }, + "application/x-msmediaview": { + source: "apache", + extensions: ["mvb", "m13", "m14"] + }, + "application/x-msmetafile": { + source: "apache", + extensions: ["wmf", "wmz", "emf", "emz"] + }, + "application/x-msmoney": { + source: "apache", + extensions: ["mny"] + }, + "application/x-mspublisher": { + source: "apache", + extensions: ["pub"] + }, + "application/x-msschedule": { + source: "apache", + extensions: ["scd"] + }, + "application/x-msterminal": { + source: "apache", + extensions: ["trm"] + }, + "application/x-mswrite": { + source: "apache", + extensions: ["wri"] + }, + "application/x-netcdf": { + source: "apache", + extensions: ["nc", "cdf"] + }, + "application/x-ns-proxy-autoconfig": { + compressible: true, + extensions: ["pac"] + }, + "application/x-nzb": { + source: "apache", + extensions: ["nzb"] + }, + "application/x-perl": { + source: "nginx", + extensions: ["pl", "pm"] + }, + "application/x-pilot": { + source: "nginx", + extensions: ["prc", "pdb"] + }, + "application/x-pkcs12": { + source: "apache", + compressible: false, + extensions: ["p12", "pfx"] + }, + "application/x-pkcs7-certificates": { + source: "apache", + extensions: ["p7b", "spc"] + }, + "application/x-pkcs7-certreqresp": { + source: "apache", + extensions: ["p7r"] + }, + "application/x-pki-message": { + source: "iana" + }, + "application/x-rar-compressed": { + source: "apache", + compressible: false, + extensions: ["rar"] + }, + "application/x-redhat-package-manager": { + source: "nginx", + extensions: ["rpm"] + }, + "application/x-research-info-systems": { + source: "apache", + extensions: ["ris"] + }, + "application/x-sea": { + source: "nginx", + extensions: ["sea"] + }, + "application/x-sh": { + source: "apache", + compressible: true, + extensions: ["sh"] + }, + "application/x-shar": { + source: "apache", + extensions: ["shar"] + }, + "application/x-shockwave-flash": { + source: "apache", + compressible: false, + extensions: ["swf"] + }, + "application/x-silverlight-app": { + source: "apache", + extensions: ["xap"] + }, + "application/x-sql": { + source: "apache", + extensions: ["sql"] + }, + "application/x-stuffit": { + source: "apache", + compressible: false, + extensions: ["sit"] + }, + "application/x-stuffitx": { + source: "apache", + extensions: ["sitx"] + }, + "application/x-subrip": { + source: "apache", + extensions: ["srt"] + }, + "application/x-sv4cpio": { + source: "apache", + extensions: ["sv4cpio"] + }, + "application/x-sv4crc": { + source: "apache", + extensions: ["sv4crc"] + }, + "application/x-t3vm-image": { + source: "apache", + extensions: ["t3"] + }, + "application/x-tads": { + source: "apache", + extensions: ["gam"] + }, + "application/x-tar": { + source: "apache", + compressible: true, + extensions: ["tar"] + }, + "application/x-tcl": { + source: "apache", + extensions: ["tcl", "tk"] + }, + "application/x-tex": { + source: "apache", + extensions: ["tex"] + }, + "application/x-tex-tfm": { + source: "apache", + extensions: ["tfm"] + }, + "application/x-texinfo": { + source: "apache", + extensions: ["texinfo", "texi"] + }, + "application/x-tgif": { + source: "apache", + extensions: ["obj"] + }, + "application/x-ustar": { + source: "apache", + extensions: ["ustar"] + }, + "application/x-virtualbox-hdd": { + compressible: true, + extensions: ["hdd"] + }, + "application/x-virtualbox-ova": { + compressible: true, + extensions: ["ova"] + }, + "application/x-virtualbox-ovf": { + compressible: true, + extensions: ["ovf"] + }, + "application/x-virtualbox-vbox": { + compressible: true, + extensions: ["vbox"] + }, + "application/x-virtualbox-vbox-extpack": { + compressible: false, + extensions: ["vbox-extpack"] + }, + "application/x-virtualbox-vdi": { + compressible: true, + extensions: ["vdi"] + }, + "application/x-virtualbox-vhd": { + compressible: true, + extensions: ["vhd"] + }, + "application/x-virtualbox-vmdk": { + compressible: true, + extensions: ["vmdk"] + }, + "application/x-wais-source": { + source: "apache", + extensions: ["src"] + }, + "application/x-web-app-manifest+json": { + compressible: true, + extensions: ["webapp"] + }, + "application/x-www-form-urlencoded": { + source: "iana", + compressible: true + }, + "application/x-x509-ca-cert": { + source: "iana", + extensions: ["der", "crt", "pem"] + }, + "application/x-x509-ca-ra-cert": { + source: "iana" + }, + "application/x-x509-next-ca-cert": { + source: "iana" + }, + "application/x-xfig": { + source: "apache", + extensions: ["fig"] + }, + "application/x-xliff+xml": { + source: "apache", + compressible: true, + extensions: ["xlf"] + }, + "application/x-xpinstall": { + source: "apache", + compressible: false, + extensions: ["xpi"] + }, + "application/x-xz": { + source: "apache", + extensions: ["xz"] + }, + "application/x-zmachine": { + source: "apache", + extensions: ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"] + }, + "application/x400-bp": { + source: "iana" + }, + "application/xacml+xml": { + source: "iana", + compressible: true + }, + "application/xaml+xml": { + source: "apache", + compressible: true, + extensions: ["xaml"] + }, + "application/xcap-att+xml": { + source: "iana", + compressible: true, + extensions: ["xav"] + }, + "application/xcap-caps+xml": { + source: "iana", + compressible: true, + extensions: ["xca"] + }, + "application/xcap-diff+xml": { + source: "iana", + compressible: true, + extensions: ["xdf"] + }, + "application/xcap-el+xml": { + source: "iana", + compressible: true, + extensions: ["xel"] + }, + "application/xcap-error+xml": { + source: "iana", + compressible: true + }, + "application/xcap-ns+xml": { + source: "iana", + compressible: true, + extensions: ["xns"] + }, + "application/xcon-conference-info+xml": { + source: "iana", + compressible: true + }, + "application/xcon-conference-info-diff+xml": { + source: "iana", + compressible: true + }, + "application/xenc+xml": { + source: "iana", + compressible: true, + extensions: ["xenc"] + }, + "application/xhtml+xml": { + source: "iana", + compressible: true, + extensions: ["xhtml", "xht"] + }, + "application/xhtml-voice+xml": { + source: "apache", + compressible: true + }, + "application/xliff+xml": { + source: "iana", + compressible: true, + extensions: ["xlf"] + }, + "application/xml": { + source: "iana", + compressible: true, + extensions: ["xml", "xsl", "xsd", "rng"] + }, + "application/xml-dtd": { + source: "iana", + compressible: true, + extensions: ["dtd"] + }, + "application/xml-external-parsed-entity": { + source: "iana" + }, + "application/xml-patch+xml": { + source: "iana", + compressible: true + }, + "application/xmpp+xml": { + source: "iana", + compressible: true + }, + "application/xop+xml": { + source: "iana", + compressible: true, + extensions: ["xop"] + }, + "application/xproc+xml": { + source: "apache", + compressible: true, + extensions: ["xpl"] + }, + "application/xslt+xml": { + source: "iana", + compressible: true, + extensions: ["xsl", "xslt"] + }, + "application/xspf+xml": { + source: "apache", + compressible: true, + extensions: ["xspf"] + }, + "application/xv+xml": { + source: "iana", + compressible: true, + extensions: ["mxml", "xhvml", "xvml", "xvm"] + }, + "application/yang": { + source: "iana", + extensions: ["yang"] + }, + "application/yang-data+json": { + source: "iana", + compressible: true + }, + "application/yang-data+xml": { + source: "iana", + compressible: true + }, + "application/yang-patch+json": { + source: "iana", + compressible: true + }, + "application/yang-patch+xml": { + source: "iana", + compressible: true + }, + "application/yin+xml": { + source: "iana", + compressible: true, + extensions: ["yin"] + }, + "application/zip": { + source: "iana", + compressible: false, + extensions: ["zip"] + }, + "application/zlib": { + source: "iana" + }, + "application/zstd": { + source: "iana" + }, + "audio/1d-interleaved-parityfec": { + source: "iana" + }, + "audio/32kadpcm": { + source: "iana" + }, + "audio/3gpp": { + source: "iana", + compressible: false, + extensions: ["3gpp"] + }, + "audio/3gpp2": { + source: "iana" + }, + "audio/aac": { + source: "iana" + }, + "audio/ac3": { + source: "iana" + }, + "audio/adpcm": { + source: "apache", + extensions: ["adp"] + }, + "audio/amr": { + source: "iana", + extensions: ["amr"] + }, + "audio/amr-wb": { + source: "iana" + }, + "audio/amr-wb+": { + source: "iana" + }, + "audio/aptx": { + source: "iana" + }, + "audio/asc": { + source: "iana" + }, + "audio/atrac-advanced-lossless": { + source: "iana" + }, + "audio/atrac-x": { + source: "iana" + }, + "audio/atrac3": { + source: "iana" + }, + "audio/basic": { + source: "iana", + compressible: false, + extensions: ["au", "snd"] + }, + "audio/bv16": { + source: "iana" + }, + "audio/bv32": { + source: "iana" + }, + "audio/clearmode": { + source: "iana" + }, + "audio/cn": { + source: "iana" + }, + "audio/dat12": { + source: "iana" + }, + "audio/dls": { + source: "iana" + }, + "audio/dsr-es201108": { + source: "iana" + }, + "audio/dsr-es202050": { + source: "iana" + }, + "audio/dsr-es202211": { + source: "iana" + }, + "audio/dsr-es202212": { + source: "iana" + }, + "audio/dv": { + source: "iana" + }, + "audio/dvi4": { + source: "iana" + }, + "audio/eac3": { + source: "iana" + }, + "audio/encaprtp": { + source: "iana" + }, + "audio/evrc": { + source: "iana" + }, + "audio/evrc-qcp": { + source: "iana" + }, + "audio/evrc0": { + source: "iana" + }, + "audio/evrc1": { + source: "iana" + }, + "audio/evrcb": { + source: "iana" + }, + "audio/evrcb0": { + source: "iana" + }, + "audio/evrcb1": { + source: "iana" + }, + "audio/evrcnw": { + source: "iana" + }, + "audio/evrcnw0": { + source: "iana" + }, + "audio/evrcnw1": { + source: "iana" + }, + "audio/evrcwb": { + source: "iana" + }, + "audio/evrcwb0": { + source: "iana" + }, + "audio/evrcwb1": { + source: "iana" + }, + "audio/evs": { + source: "iana" + }, + "audio/flexfec": { + source: "iana" + }, + "audio/fwdred": { + source: "iana" + }, + "audio/g711-0": { + source: "iana" + }, + "audio/g719": { + source: "iana" + }, + "audio/g722": { + source: "iana" + }, + "audio/g7221": { + source: "iana" + }, + "audio/g723": { + source: "iana" + }, + "audio/g726-16": { + source: "iana" + }, + "audio/g726-24": { + source: "iana" + }, + "audio/g726-32": { + source: "iana" + }, + "audio/g726-40": { + source: "iana" + }, + "audio/g728": { + source: "iana" + }, + "audio/g729": { + source: "iana" + }, + "audio/g7291": { + source: "iana" + }, + "audio/g729d": { + source: "iana" + }, + "audio/g729e": { + source: "iana" + }, + "audio/gsm": { + source: "iana" + }, + "audio/gsm-efr": { + source: "iana" + }, + "audio/gsm-hr-08": { + source: "iana" + }, + "audio/ilbc": { + source: "iana" + }, + "audio/ip-mr_v2.5": { + source: "iana" + }, + "audio/isac": { + source: "apache" + }, + "audio/l16": { + source: "iana" + }, + "audio/l20": { + source: "iana" + }, + "audio/l24": { + source: "iana", + compressible: false + }, + "audio/l8": { + source: "iana" + }, + "audio/lpc": { + source: "iana" + }, + "audio/melp": { + source: "iana" + }, + "audio/melp1200": { + source: "iana" + }, + "audio/melp2400": { + source: "iana" + }, + "audio/melp600": { + source: "iana" + }, + "audio/mhas": { + source: "iana" + }, + "audio/midi": { + source: "apache", + extensions: ["mid", "midi", "kar", "rmi"] + }, + "audio/mobile-xmf": { + source: "iana", + extensions: ["mxmf"] + }, + "audio/mp3": { + compressible: false, + extensions: ["mp3"] + }, + "audio/mp4": { + source: "iana", + compressible: false, + extensions: ["m4a", "mp4a"] + }, + "audio/mp4a-latm": { + source: "iana" + }, + "audio/mpa": { + source: "iana" + }, + "audio/mpa-robust": { + source: "iana" + }, + "audio/mpeg": { + source: "iana", + compressible: false, + extensions: ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"] + }, + "audio/mpeg4-generic": { + source: "iana" + }, + "audio/musepack": { + source: "apache" + }, + "audio/ogg": { + source: "iana", + compressible: false, + extensions: ["oga", "ogg", "spx", "opus"] + }, + "audio/opus": { + source: "iana" + }, + "audio/parityfec": { + source: "iana" + }, + "audio/pcma": { + source: "iana" + }, + "audio/pcma-wb": { + source: "iana" + }, + "audio/pcmu": { + source: "iana" + }, + "audio/pcmu-wb": { + source: "iana" + }, + "audio/prs.sid": { + source: "iana" + }, + "audio/qcelp": { + source: "iana" + }, + "audio/raptorfec": { + source: "iana" + }, + "audio/red": { + source: "iana" + }, + "audio/rtp-enc-aescm128": { + source: "iana" + }, + "audio/rtp-midi": { + source: "iana" + }, + "audio/rtploopback": { + source: "iana" + }, + "audio/rtx": { + source: "iana" + }, + "audio/s3m": { + source: "apache", + extensions: ["s3m"] + }, + "audio/scip": { + source: "iana" + }, + "audio/silk": { + source: "apache", + extensions: ["sil"] + }, + "audio/smv": { + source: "iana" + }, + "audio/smv-qcp": { + source: "iana" + }, + "audio/smv0": { + source: "iana" + }, + "audio/sofa": { + source: "iana" + }, + "audio/sp-midi": { + source: "iana" + }, + "audio/speex": { + source: "iana" + }, + "audio/t140c": { + source: "iana" + }, + "audio/t38": { + source: "iana" + }, + "audio/telephone-event": { + source: "iana" + }, + "audio/tetra_acelp": { + source: "iana" + }, + "audio/tetra_acelp_bb": { + source: "iana" + }, + "audio/tone": { + source: "iana" + }, + "audio/tsvcis": { + source: "iana" + }, + "audio/uemclip": { + source: "iana" + }, + "audio/ulpfec": { + source: "iana" + }, + "audio/usac": { + source: "iana" + }, + "audio/vdvi": { + source: "iana" + }, + "audio/vmr-wb": { + source: "iana" + }, + "audio/vnd.3gpp.iufp": { + source: "iana" + }, + "audio/vnd.4sb": { + source: "iana" + }, + "audio/vnd.audiokoz": { + source: "iana" + }, + "audio/vnd.celp": { + source: "iana" + }, + "audio/vnd.cisco.nse": { + source: "iana" + }, + "audio/vnd.cmles.radio-events": { + source: "iana" + }, + "audio/vnd.cns.anp1": { + source: "iana" + }, + "audio/vnd.cns.inf1": { + source: "iana" + }, + "audio/vnd.dece.audio": { + source: "iana", + extensions: ["uva", "uvva"] + }, + "audio/vnd.digital-winds": { + source: "iana", + extensions: ["eol"] + }, + "audio/vnd.dlna.adts": { + source: "iana" + }, + "audio/vnd.dolby.heaac.1": { + source: "iana" + }, + "audio/vnd.dolby.heaac.2": { + source: "iana" + }, + "audio/vnd.dolby.mlp": { + source: "iana" + }, + "audio/vnd.dolby.mps": { + source: "iana" + }, + "audio/vnd.dolby.pl2": { + source: "iana" + }, + "audio/vnd.dolby.pl2x": { + source: "iana" + }, + "audio/vnd.dolby.pl2z": { + source: "iana" + }, + "audio/vnd.dolby.pulse.1": { + source: "iana" + }, + "audio/vnd.dra": { + source: "iana", + extensions: ["dra"] + }, + "audio/vnd.dts": { + source: "iana", + extensions: ["dts"] + }, + "audio/vnd.dts.hd": { + source: "iana", + extensions: ["dtshd"] + }, + "audio/vnd.dts.uhd": { + source: "iana" + }, + "audio/vnd.dvb.file": { + source: "iana" + }, + "audio/vnd.everad.plj": { + source: "iana" + }, + "audio/vnd.hns.audio": { + source: "iana" + }, + "audio/vnd.lucent.voice": { + source: "iana", + extensions: ["lvp"] + }, + "audio/vnd.ms-playready.media.pya": { + source: "iana", + extensions: ["pya"] + }, + "audio/vnd.nokia.mobile-xmf": { + source: "iana" + }, + "audio/vnd.nortel.vbk": { + source: "iana" + }, + "audio/vnd.nuera.ecelp4800": { + source: "iana", + extensions: ["ecelp4800"] + }, + "audio/vnd.nuera.ecelp7470": { + source: "iana", + extensions: ["ecelp7470"] + }, + "audio/vnd.nuera.ecelp9600": { + source: "iana", + extensions: ["ecelp9600"] + }, + "audio/vnd.octel.sbc": { + source: "iana" + }, + "audio/vnd.presonus.multitrack": { + source: "iana" + }, + "audio/vnd.qcelp": { + source: "iana" + }, + "audio/vnd.rhetorex.32kadpcm": { + source: "iana" + }, + "audio/vnd.rip": { + source: "iana", + extensions: ["rip"] + }, + "audio/vnd.rn-realaudio": { + compressible: false + }, + "audio/vnd.sealedmedia.softseal.mpeg": { + source: "iana" + }, + "audio/vnd.vmx.cvsd": { + source: "iana" + }, + "audio/vnd.wave": { + compressible: false + }, + "audio/vorbis": { + source: "iana", + compressible: false + }, + "audio/vorbis-config": { + source: "iana" + }, + "audio/wav": { + compressible: false, + extensions: ["wav"] + }, + "audio/wave": { + compressible: false, + extensions: ["wav"] + }, + "audio/webm": { + source: "apache", + compressible: false, + extensions: ["weba"] + }, + "audio/x-aac": { + source: "apache", + compressible: false, + extensions: ["aac"] + }, + "audio/x-aiff": { + source: "apache", + extensions: ["aif", "aiff", "aifc"] + }, + "audio/x-caf": { + source: "apache", + compressible: false, + extensions: ["caf"] + }, + "audio/x-flac": { + source: "apache", + extensions: ["flac"] + }, + "audio/x-m4a": { + source: "nginx", + extensions: ["m4a"] + }, + "audio/x-matroska": { + source: "apache", + extensions: ["mka"] + }, + "audio/x-mpegurl": { + source: "apache", + extensions: ["m3u"] + }, + "audio/x-ms-wax": { + source: "apache", + extensions: ["wax"] + }, + "audio/x-ms-wma": { + source: "apache", + extensions: ["wma"] + }, + "audio/x-pn-realaudio": { + source: "apache", + extensions: ["ram", "ra"] + }, + "audio/x-pn-realaudio-plugin": { + source: "apache", + extensions: ["rmp"] + }, + "audio/x-realaudio": { + source: "nginx", + extensions: ["ra"] + }, + "audio/x-tta": { + source: "apache" + }, + "audio/x-wav": { + source: "apache", + extensions: ["wav"] + }, + "audio/xm": { + source: "apache", + extensions: ["xm"] + }, + "chemical/x-cdx": { + source: "apache", + extensions: ["cdx"] + }, + "chemical/x-cif": { + source: "apache", + extensions: ["cif"] + }, + "chemical/x-cmdf": { + source: "apache", + extensions: ["cmdf"] + }, + "chemical/x-cml": { + source: "apache", + extensions: ["cml"] + }, + "chemical/x-csml": { + source: "apache", + extensions: ["csml"] + }, + "chemical/x-pdb": { + source: "apache" + }, + "chemical/x-xyz": { + source: "apache", + extensions: ["xyz"] + }, + "font/collection": { + source: "iana", + extensions: ["ttc"] + }, + "font/otf": { + source: "iana", + compressible: true, + extensions: ["otf"] + }, + "font/sfnt": { + source: "iana" + }, + "font/ttf": { + source: "iana", + compressible: true, + extensions: ["ttf"] + }, + "font/woff": { + source: "iana", + extensions: ["woff"] + }, + "font/woff2": { + source: "iana", + extensions: ["woff2"] + }, + "image/aces": { + source: "iana", + extensions: ["exr"] + }, + "image/apng": { + compressible: false, + extensions: ["apng"] + }, + "image/avci": { + source: "iana", + extensions: ["avci"] + }, + "image/avcs": { + source: "iana", + extensions: ["avcs"] + }, + "image/avif": { + source: "iana", + compressible: false, + extensions: ["avif"] + }, + "image/bmp": { + source: "iana", + compressible: true, + extensions: ["bmp"] + }, + "image/cgm": { + source: "iana", + extensions: ["cgm"] + }, + "image/dicom-rle": { + source: "iana", + extensions: ["drle"] + }, + "image/emf": { + source: "iana", + extensions: ["emf"] + }, + "image/fits": { + source: "iana", + extensions: ["fits"] + }, + "image/g3fax": { + source: "iana", + extensions: ["g3"] + }, + "image/gif": { + source: "iana", + compressible: false, + extensions: ["gif"] + }, + "image/heic": { + source: "iana", + extensions: ["heic"] + }, + "image/heic-sequence": { + source: "iana", + extensions: ["heics"] + }, + "image/heif": { + source: "iana", + extensions: ["heif"] + }, + "image/heif-sequence": { + source: "iana", + extensions: ["heifs"] + }, + "image/hej2k": { + source: "iana", + extensions: ["hej2"] + }, + "image/hsj2": { + source: "iana", + extensions: ["hsj2"] + }, + "image/ief": { + source: "iana", + extensions: ["ief"] + }, + "image/jls": { + source: "iana", + extensions: ["jls"] + }, + "image/jp2": { + source: "iana", + compressible: false, + extensions: ["jp2", "jpg2"] + }, + "image/jpeg": { + source: "iana", + compressible: false, + extensions: ["jpeg", "jpg", "jpe"] + }, + "image/jph": { + source: "iana", + extensions: ["jph"] + }, + "image/jphc": { + source: "iana", + extensions: ["jhc"] + }, + "image/jpm": { + source: "iana", + compressible: false, + extensions: ["jpm"] + }, + "image/jpx": { + source: "iana", + compressible: false, + extensions: ["jpx", "jpf"] + }, + "image/jxr": { + source: "iana", + extensions: ["jxr"] + }, + "image/jxra": { + source: "iana", + extensions: ["jxra"] + }, + "image/jxrs": { + source: "iana", + extensions: ["jxrs"] + }, + "image/jxs": { + source: "iana", + extensions: ["jxs"] + }, + "image/jxsc": { + source: "iana", + extensions: ["jxsc"] + }, + "image/jxsi": { + source: "iana", + extensions: ["jxsi"] + }, + "image/jxss": { + source: "iana", + extensions: ["jxss"] + }, + "image/ktx": { + source: "iana", + extensions: ["ktx"] + }, + "image/ktx2": { + source: "iana", + extensions: ["ktx2"] + }, + "image/naplps": { + source: "iana" + }, + "image/pjpeg": { + compressible: false + }, + "image/png": { + source: "iana", + compressible: false, + extensions: ["png"] + }, + "image/prs.btif": { + source: "iana", + extensions: ["btif"] + }, + "image/prs.pti": { + source: "iana", + extensions: ["pti"] + }, + "image/pwg-raster": { + source: "iana" + }, + "image/sgi": { + source: "apache", + extensions: ["sgi"] + }, + "image/svg+xml": { + source: "iana", + compressible: true, + extensions: ["svg", "svgz"] + }, + "image/t38": { + source: "iana", + extensions: ["t38"] + }, + "image/tiff": { + source: "iana", + compressible: false, + extensions: ["tif", "tiff"] + }, + "image/tiff-fx": { + source: "iana", + extensions: ["tfx"] + }, + "image/vnd.adobe.photoshop": { + source: "iana", + compressible: true, + extensions: ["psd"] + }, + "image/vnd.airzip.accelerator.azv": { + source: "iana", + extensions: ["azv"] + }, + "image/vnd.cns.inf2": { + source: "iana" + }, + "image/vnd.dece.graphic": { + source: "iana", + extensions: ["uvi", "uvvi", "uvg", "uvvg"] + }, + "image/vnd.djvu": { + source: "iana", + extensions: ["djvu", "djv"] + }, + "image/vnd.dvb.subtitle": { + source: "iana", + extensions: ["sub"] + }, + "image/vnd.dwg": { + source: "iana", + extensions: ["dwg"] + }, + "image/vnd.dxf": { + source: "iana", + extensions: ["dxf"] + }, + "image/vnd.fastbidsheet": { + source: "iana", + extensions: ["fbs"] + }, + "image/vnd.fpx": { + source: "iana", + extensions: ["fpx"] + }, + "image/vnd.fst": { + source: "iana", + extensions: ["fst"] + }, + "image/vnd.fujixerox.edmics-mmr": { + source: "iana", + extensions: ["mmr"] + }, + "image/vnd.fujixerox.edmics-rlc": { + source: "iana", + extensions: ["rlc"] + }, + "image/vnd.globalgraphics.pgb": { + source: "iana" + }, + "image/vnd.microsoft.icon": { + source: "iana", + compressible: true, + extensions: ["ico"] + }, + "image/vnd.mix": { + source: "iana" + }, + "image/vnd.mozilla.apng": { + source: "iana" + }, + "image/vnd.ms-dds": { + compressible: true, + extensions: ["dds"] + }, + "image/vnd.ms-modi": { + source: "iana", + extensions: ["mdi"] + }, + "image/vnd.ms-photo": { + source: "apache", + extensions: ["wdp"] + }, + "image/vnd.net-fpx": { + source: "iana", + extensions: ["npx"] + }, + "image/vnd.pco.b16": { + source: "iana", + extensions: ["b16"] + }, + "image/vnd.radiance": { + source: "iana" + }, + "image/vnd.sealed.png": { + source: "iana" + }, + "image/vnd.sealedmedia.softseal.gif": { + source: "iana" + }, + "image/vnd.sealedmedia.softseal.jpg": { + source: "iana" + }, + "image/vnd.svf": { + source: "iana" + }, + "image/vnd.tencent.tap": { + source: "iana", + extensions: ["tap"] + }, + "image/vnd.valve.source.texture": { + source: "iana", + extensions: ["vtf"] + }, + "image/vnd.wap.wbmp": { + source: "iana", + extensions: ["wbmp"] + }, + "image/vnd.xiff": { + source: "iana", + extensions: ["xif"] + }, + "image/vnd.zbrush.pcx": { + source: "iana", + extensions: ["pcx"] + }, + "image/webp": { + source: "apache", + extensions: ["webp"] + }, + "image/wmf": { + source: "iana", + extensions: ["wmf"] + }, + "image/x-3ds": { + source: "apache", + extensions: ["3ds"] + }, + "image/x-cmu-raster": { + source: "apache", + extensions: ["ras"] + }, + "image/x-cmx": { + source: "apache", + extensions: ["cmx"] + }, + "image/x-freehand": { + source: "apache", + extensions: ["fh", "fhc", "fh4", "fh5", "fh7"] + }, + "image/x-icon": { + source: "apache", + compressible: true, + extensions: ["ico"] + }, + "image/x-jng": { + source: "nginx", + extensions: ["jng"] + }, + "image/x-mrsid-image": { + source: "apache", + extensions: ["sid"] + }, + "image/x-ms-bmp": { + source: "nginx", + compressible: true, + extensions: ["bmp"] + }, + "image/x-pcx": { + source: "apache", + extensions: ["pcx"] + }, + "image/x-pict": { + source: "apache", + extensions: ["pic", "pct"] + }, + "image/x-portable-anymap": { + source: "apache", + extensions: ["pnm"] + }, + "image/x-portable-bitmap": { + source: "apache", + extensions: ["pbm"] + }, + "image/x-portable-graymap": { + source: "apache", + extensions: ["pgm"] + }, + "image/x-portable-pixmap": { + source: "apache", + extensions: ["ppm"] + }, + "image/x-rgb": { + source: "apache", + extensions: ["rgb"] + }, + "image/x-tga": { + source: "apache", + extensions: ["tga"] + }, + "image/x-xbitmap": { + source: "apache", + extensions: ["xbm"] + }, + "image/x-xcf": { + compressible: false + }, + "image/x-xpixmap": { + source: "apache", + extensions: ["xpm"] + }, + "image/x-xwindowdump": { + source: "apache", + extensions: ["xwd"] + }, + "message/cpim": { + source: "iana" + }, + "message/delivery-status": { + source: "iana" + }, + "message/disposition-notification": { + source: "iana", + extensions: [ + "disposition-notification" + ] + }, + "message/external-body": { + source: "iana" + }, + "message/feedback-report": { + source: "iana" + }, + "message/global": { + source: "iana", + extensions: ["u8msg"] + }, + "message/global-delivery-status": { + source: "iana", + extensions: ["u8dsn"] + }, + "message/global-disposition-notification": { + source: "iana", + extensions: ["u8mdn"] + }, + "message/global-headers": { + source: "iana", + extensions: ["u8hdr"] + }, + "message/http": { + source: "iana", + compressible: false + }, + "message/imdn+xml": { + source: "iana", + compressible: true + }, + "message/news": { + source: "iana" + }, + "message/partial": { + source: "iana", + compressible: false + }, + "message/rfc822": { + source: "iana", + compressible: true, + extensions: ["eml", "mime"] + }, + "message/s-http": { + source: "iana" + }, + "message/sip": { + source: "iana" + }, + "message/sipfrag": { + source: "iana" + }, + "message/tracking-status": { + source: "iana" + }, + "message/vnd.si.simp": { + source: "iana" + }, + "message/vnd.wfa.wsc": { + source: "iana", + extensions: ["wsc"] + }, + "model/3mf": { + source: "iana", + extensions: ["3mf"] + }, + "model/e57": { + source: "iana" + }, + "model/gltf+json": { + source: "iana", + compressible: true, + extensions: ["gltf"] + }, + "model/gltf-binary": { + source: "iana", + compressible: true, + extensions: ["glb"] + }, + "model/iges": { + source: "iana", + compressible: false, + extensions: ["igs", "iges"] + }, + "model/mesh": { + source: "iana", + compressible: false, + extensions: ["msh", "mesh", "silo"] + }, + "model/mtl": { + source: "iana", + extensions: ["mtl"] + }, + "model/obj": { + source: "iana", + extensions: ["obj"] + }, + "model/step": { + source: "iana" + }, + "model/step+xml": { + source: "iana", + compressible: true, + extensions: ["stpx"] + }, + "model/step+zip": { + source: "iana", + compressible: false, + extensions: ["stpz"] + }, + "model/step-xml+zip": { + source: "iana", + compressible: false, + extensions: ["stpxz"] + }, + "model/stl": { + source: "iana", + extensions: ["stl"] + }, + "model/vnd.collada+xml": { + source: "iana", + compressible: true, + extensions: ["dae"] + }, + "model/vnd.dwf": { + source: "iana", + extensions: ["dwf"] + }, + "model/vnd.flatland.3dml": { + source: "iana" + }, + "model/vnd.gdl": { + source: "iana", + extensions: ["gdl"] + }, + "model/vnd.gs-gdl": { + source: "apache" + }, + "model/vnd.gs.gdl": { + source: "iana" + }, + "model/vnd.gtw": { + source: "iana", + extensions: ["gtw"] + }, + "model/vnd.moml+xml": { + source: "iana", + compressible: true + }, + "model/vnd.mts": { + source: "iana", + extensions: ["mts"] + }, + "model/vnd.opengex": { + source: "iana", + extensions: ["ogex"] + }, + "model/vnd.parasolid.transmit.binary": { + source: "iana", + extensions: ["x_b"] + }, + "model/vnd.parasolid.transmit.text": { + source: "iana", + extensions: ["x_t"] + }, + "model/vnd.pytha.pyox": { + source: "iana" + }, + "model/vnd.rosette.annotated-data-model": { + source: "iana" + }, + "model/vnd.sap.vds": { + source: "iana", + extensions: ["vds"] + }, + "model/vnd.usdz+zip": { + source: "iana", + compressible: false, + extensions: ["usdz"] + }, + "model/vnd.valve.source.compiled-map": { + source: "iana", + extensions: ["bsp"] + }, + "model/vnd.vtu": { + source: "iana", + extensions: ["vtu"] + }, + "model/vrml": { + source: "iana", + compressible: false, + extensions: ["wrl", "vrml"] + }, + "model/x3d+binary": { + source: "apache", + compressible: false, + extensions: ["x3db", "x3dbz"] + }, + "model/x3d+fastinfoset": { + source: "iana", + extensions: ["x3db"] + }, + "model/x3d+vrml": { + source: "apache", + compressible: false, + extensions: ["x3dv", "x3dvz"] + }, + "model/x3d+xml": { + source: "iana", + compressible: true, + extensions: ["x3d", "x3dz"] + }, + "model/x3d-vrml": { + source: "iana", + extensions: ["x3dv"] + }, + "multipart/alternative": { + source: "iana", + compressible: false + }, + "multipart/appledouble": { + source: "iana" + }, + "multipart/byteranges": { + source: "iana" + }, + "multipart/digest": { + source: "iana" + }, + "multipart/encrypted": { + source: "iana", + compressible: false + }, + "multipart/form-data": { + source: "iana", + compressible: false + }, + "multipart/header-set": { + source: "iana" + }, + "multipart/mixed": { + source: "iana" + }, + "multipart/multilingual": { + source: "iana" + }, + "multipart/parallel": { + source: "iana" + }, + "multipart/related": { + source: "iana", + compressible: false + }, + "multipart/report": { + source: "iana" + }, + "multipart/signed": { + source: "iana", + compressible: false + }, + "multipart/vnd.bint.med-plus": { + source: "iana" + }, + "multipart/voice-message": { + source: "iana" + }, + "multipart/x-mixed-replace": { + source: "iana" + }, + "text/1d-interleaved-parityfec": { + source: "iana" + }, + "text/cache-manifest": { + source: "iana", + compressible: true, + extensions: ["appcache", "manifest"] + }, + "text/calendar": { + source: "iana", + extensions: ["ics", "ifb"] + }, + "text/calender": { + compressible: true + }, + "text/cmd": { + compressible: true + }, + "text/coffeescript": { + extensions: ["coffee", "litcoffee"] + }, + "text/cql": { + source: "iana" + }, + "text/cql-expression": { + source: "iana" + }, + "text/cql-identifier": { + source: "iana" + }, + "text/css": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["css"] + }, + "text/csv": { + source: "iana", + compressible: true, + extensions: ["csv"] + }, + "text/csv-schema": { + source: "iana" + }, + "text/directory": { + source: "iana" + }, + "text/dns": { + source: "iana" + }, + "text/ecmascript": { + source: "iana" + }, + "text/encaprtp": { + source: "iana" + }, + "text/enriched": { + source: "iana" + }, + "text/fhirpath": { + source: "iana" + }, + "text/flexfec": { + source: "iana" + }, + "text/fwdred": { + source: "iana" + }, + "text/gff3": { + source: "iana" + }, + "text/grammar-ref-list": { + source: "iana" + }, + "text/html": { + source: "iana", + compressible: true, + extensions: ["html", "htm", "shtml"] + }, + "text/jade": { + extensions: ["jade"] + }, + "text/javascript": { + source: "iana", + compressible: true + }, + "text/jcr-cnd": { + source: "iana" + }, + "text/jsx": { + compressible: true, + extensions: ["jsx"] + }, + "text/less": { + compressible: true, + extensions: ["less"] + }, + "text/markdown": { + source: "iana", + compressible: true, + extensions: ["markdown", "md"] + }, + "text/mathml": { + source: "nginx", + extensions: ["mml"] + }, + "text/mdx": { + compressible: true, + extensions: ["mdx"] + }, + "text/mizar": { + source: "iana" + }, + "text/n3": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["n3"] + }, + "text/parameters": { + source: "iana", + charset: "UTF-8" + }, + "text/parityfec": { + source: "iana" + }, + "text/plain": { + source: "iana", + compressible: true, + extensions: ["txt", "text", "conf", "def", "list", "log", "in", "ini"] + }, + "text/provenance-notation": { + source: "iana", + charset: "UTF-8" + }, + "text/prs.fallenstein.rst": { + source: "iana" + }, + "text/prs.lines.tag": { + source: "iana", + extensions: ["dsc"] + }, + "text/prs.prop.logic": { + source: "iana" + }, + "text/raptorfec": { + source: "iana" + }, + "text/red": { + source: "iana" + }, + "text/rfc822-headers": { + source: "iana" + }, + "text/richtext": { + source: "iana", + compressible: true, + extensions: ["rtx"] + }, + "text/rtf": { + source: "iana", + compressible: true, + extensions: ["rtf"] + }, + "text/rtp-enc-aescm128": { + source: "iana" + }, + "text/rtploopback": { + source: "iana" + }, + "text/rtx": { + source: "iana" + }, + "text/sgml": { + source: "iana", + extensions: ["sgml", "sgm"] + }, + "text/shaclc": { + source: "iana" + }, + "text/shex": { + source: "iana", + extensions: ["shex"] + }, + "text/slim": { + extensions: ["slim", "slm"] + }, + "text/spdx": { + source: "iana", + extensions: ["spdx"] + }, + "text/strings": { + source: "iana" + }, + "text/stylus": { + extensions: ["stylus", "styl"] + }, + "text/t140": { + source: "iana" + }, + "text/tab-separated-values": { + source: "iana", + compressible: true, + extensions: ["tsv"] + }, + "text/troff": { + source: "iana", + extensions: ["t", "tr", "roff", "man", "me", "ms"] + }, + "text/turtle": { + source: "iana", + charset: "UTF-8", + extensions: ["ttl"] + }, + "text/ulpfec": { + source: "iana" + }, + "text/uri-list": { + source: "iana", + compressible: true, + extensions: ["uri", "uris", "urls"] + }, + "text/vcard": { + source: "iana", + compressible: true, + extensions: ["vcard"] + }, + "text/vnd.a": { + source: "iana" + }, + "text/vnd.abc": { + source: "iana" + }, + "text/vnd.ascii-art": { + source: "iana" + }, + "text/vnd.curl": { + source: "iana", + extensions: ["curl"] + }, + "text/vnd.curl.dcurl": { + source: "apache", + extensions: ["dcurl"] + }, + "text/vnd.curl.mcurl": { + source: "apache", + extensions: ["mcurl"] + }, + "text/vnd.curl.scurl": { + source: "apache", + extensions: ["scurl"] + }, + "text/vnd.debian.copyright": { + source: "iana", + charset: "UTF-8" + }, + "text/vnd.dmclientscript": { + source: "iana" + }, + "text/vnd.dvb.subtitle": { + source: "iana", + extensions: ["sub"] + }, + "text/vnd.esmertec.theme-descriptor": { + source: "iana", + charset: "UTF-8" + }, + "text/vnd.familysearch.gedcom": { + source: "iana", + extensions: ["ged"] + }, + "text/vnd.ficlab.flt": { + source: "iana" + }, + "text/vnd.fly": { + source: "iana", + extensions: ["fly"] + }, + "text/vnd.fmi.flexstor": { + source: "iana", + extensions: ["flx"] + }, + "text/vnd.gml": { + source: "iana" + }, + "text/vnd.graphviz": { + source: "iana", + extensions: ["gv"] + }, + "text/vnd.hans": { + source: "iana" + }, + "text/vnd.hgl": { + source: "iana" + }, + "text/vnd.in3d.3dml": { + source: "iana", + extensions: ["3dml"] + }, + "text/vnd.in3d.spot": { + source: "iana", + extensions: ["spot"] + }, + "text/vnd.iptc.newsml": { + source: "iana" + }, + "text/vnd.iptc.nitf": { + source: "iana" + }, + "text/vnd.latex-z": { + source: "iana" + }, + "text/vnd.motorola.reflex": { + source: "iana" + }, + "text/vnd.ms-mediapackage": { + source: "iana" + }, + "text/vnd.net2phone.commcenter.command": { + source: "iana" + }, + "text/vnd.radisys.msml-basic-layout": { + source: "iana" + }, + "text/vnd.senx.warpscript": { + source: "iana" + }, + "text/vnd.si.uricatalogue": { + source: "iana" + }, + "text/vnd.sosi": { + source: "iana" + }, + "text/vnd.sun.j2me.app-descriptor": { + source: "iana", + charset: "UTF-8", + extensions: ["jad"] + }, + "text/vnd.trolltech.linguist": { + source: "iana", + charset: "UTF-8" + }, + "text/vnd.wap.si": { + source: "iana" + }, + "text/vnd.wap.sl": { + source: "iana" + }, + "text/vnd.wap.wml": { + source: "iana", + extensions: ["wml"] + }, + "text/vnd.wap.wmlscript": { + source: "iana", + extensions: ["wmls"] + }, + "text/vtt": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["vtt"] + }, + "text/x-asm": { + source: "apache", + extensions: ["s", "asm"] + }, + "text/x-c": { + source: "apache", + extensions: ["c", "cc", "cxx", "cpp", "h", "hh", "dic"] + }, + "text/x-component": { + source: "nginx", + extensions: ["htc"] + }, + "text/x-fortran": { + source: "apache", + extensions: ["f", "for", "f77", "f90"] + }, + "text/x-gwt-rpc": { + compressible: true + }, + "text/x-handlebars-template": { + extensions: ["hbs"] + }, + "text/x-java-source": { + source: "apache", + extensions: ["java"] + }, + "text/x-jquery-tmpl": { + compressible: true + }, + "text/x-lua": { + extensions: ["lua"] + }, + "text/x-markdown": { + compressible: true, + extensions: ["mkd"] + }, + "text/x-nfo": { + source: "apache", + extensions: ["nfo"] + }, + "text/x-opml": { + source: "apache", + extensions: ["opml"] + }, + "text/x-org": { + compressible: true, + extensions: ["org"] + }, + "text/x-pascal": { + source: "apache", + extensions: ["p", "pas"] + }, + "text/x-processing": { + compressible: true, + extensions: ["pde"] + }, + "text/x-sass": { + extensions: ["sass"] + }, + "text/x-scss": { + extensions: ["scss"] + }, + "text/x-setext": { + source: "apache", + extensions: ["etx"] + }, + "text/x-sfv": { + source: "apache", + extensions: ["sfv"] + }, + "text/x-suse-ymp": { + compressible: true, + extensions: ["ymp"] + }, + "text/x-uuencode": { + source: "apache", + extensions: ["uu"] + }, + "text/x-vcalendar": { + source: "apache", + extensions: ["vcs"] + }, + "text/x-vcard": { + source: "apache", + extensions: ["vcf"] + }, + "text/xml": { + source: "iana", + compressible: true, + extensions: ["xml"] + }, + "text/xml-external-parsed-entity": { + source: "iana" + }, + "text/yaml": { + compressible: true, + extensions: ["yaml", "yml"] + }, + "video/1d-interleaved-parityfec": { + source: "iana" + }, + "video/3gpp": { + source: "iana", + extensions: ["3gp", "3gpp"] + }, + "video/3gpp-tt": { + source: "iana" + }, + "video/3gpp2": { + source: "iana", + extensions: ["3g2"] + }, + "video/av1": { + source: "iana" + }, + "video/bmpeg": { + source: "iana" + }, + "video/bt656": { + source: "iana" + }, + "video/celb": { + source: "iana" + }, + "video/dv": { + source: "iana" + }, + "video/encaprtp": { + source: "iana" + }, + "video/ffv1": { + source: "iana" + }, + "video/flexfec": { + source: "iana" + }, + "video/h261": { + source: "iana", + extensions: ["h261"] + }, + "video/h263": { + source: "iana", + extensions: ["h263"] + }, + "video/h263-1998": { + source: "iana" + }, + "video/h263-2000": { + source: "iana" + }, + "video/h264": { + source: "iana", + extensions: ["h264"] + }, + "video/h264-rcdo": { + source: "iana" + }, + "video/h264-svc": { + source: "iana" + }, + "video/h265": { + source: "iana" + }, + "video/iso.segment": { + source: "iana", + extensions: ["m4s"] + }, + "video/jpeg": { + source: "iana", + extensions: ["jpgv"] + }, + "video/jpeg2000": { + source: "iana" + }, + "video/jpm": { + source: "apache", + extensions: ["jpm", "jpgm"] + }, + "video/jxsv": { + source: "iana" + }, + "video/mj2": { + source: "iana", + extensions: ["mj2", "mjp2"] + }, + "video/mp1s": { + source: "iana" + }, + "video/mp2p": { + source: "iana" + }, + "video/mp2t": { + source: "iana", + extensions: ["ts"] + }, + "video/mp4": { + source: "iana", + compressible: false, + extensions: ["mp4", "mp4v", "mpg4"] + }, + "video/mp4v-es": { + source: "iana" + }, + "video/mpeg": { + source: "iana", + compressible: false, + extensions: ["mpeg", "mpg", "mpe", "m1v", "m2v"] + }, + "video/mpeg4-generic": { + source: "iana" + }, + "video/mpv": { + source: "iana" + }, + "video/nv": { + source: "iana" + }, + "video/ogg": { + source: "iana", + compressible: false, + extensions: ["ogv"] + }, + "video/parityfec": { + source: "iana" + }, + "video/pointer": { + source: "iana" + }, + "video/quicktime": { + source: "iana", + compressible: false, + extensions: ["qt", "mov"] + }, + "video/raptorfec": { + source: "iana" + }, + "video/raw": { + source: "iana" + }, + "video/rtp-enc-aescm128": { + source: "iana" + }, + "video/rtploopback": { + source: "iana" + }, + "video/rtx": { + source: "iana" + }, + "video/scip": { + source: "iana" + }, + "video/smpte291": { + source: "iana" + }, + "video/smpte292m": { + source: "iana" + }, + "video/ulpfec": { + source: "iana" + }, + "video/vc1": { + source: "iana" + }, + "video/vc2": { + source: "iana" + }, + "video/vnd.cctv": { + source: "iana" + }, + "video/vnd.dece.hd": { + source: "iana", + extensions: ["uvh", "uvvh"] + }, + "video/vnd.dece.mobile": { + source: "iana", + extensions: ["uvm", "uvvm"] + }, + "video/vnd.dece.mp4": { + source: "iana" + }, + "video/vnd.dece.pd": { + source: "iana", + extensions: ["uvp", "uvvp"] + }, + "video/vnd.dece.sd": { + source: "iana", + extensions: ["uvs", "uvvs"] + }, + "video/vnd.dece.video": { + source: "iana", + extensions: ["uvv", "uvvv"] + }, + "video/vnd.directv.mpeg": { + source: "iana" + }, + "video/vnd.directv.mpeg-tts": { + source: "iana" + }, + "video/vnd.dlna.mpeg-tts": { + source: "iana" + }, + "video/vnd.dvb.file": { + source: "iana", + extensions: ["dvb"] + }, + "video/vnd.fvt": { + source: "iana", + extensions: ["fvt"] + }, + "video/vnd.hns.video": { + source: "iana" + }, + "video/vnd.iptvforum.1dparityfec-1010": { + source: "iana" + }, + "video/vnd.iptvforum.1dparityfec-2005": { + source: "iana" + }, + "video/vnd.iptvforum.2dparityfec-1010": { + source: "iana" + }, + "video/vnd.iptvforum.2dparityfec-2005": { + source: "iana" + }, + "video/vnd.iptvforum.ttsavc": { + source: "iana" + }, + "video/vnd.iptvforum.ttsmpeg2": { + source: "iana" + }, + "video/vnd.motorola.video": { + source: "iana" + }, + "video/vnd.motorola.videop": { + source: "iana" + }, + "video/vnd.mpegurl": { + source: "iana", + extensions: ["mxu", "m4u"] + }, + "video/vnd.ms-playready.media.pyv": { + source: "iana", + extensions: ["pyv"] + }, + "video/vnd.nokia.interleaved-multimedia": { + source: "iana" + }, + "video/vnd.nokia.mp4vr": { + source: "iana" + }, + "video/vnd.nokia.videovoip": { + source: "iana" + }, + "video/vnd.objectvideo": { + source: "iana" + }, + "video/vnd.radgamettools.bink": { + source: "iana" + }, + "video/vnd.radgamettools.smacker": { + source: "iana" + }, + "video/vnd.sealed.mpeg1": { + source: "iana" + }, + "video/vnd.sealed.mpeg4": { + source: "iana" + }, + "video/vnd.sealed.swf": { + source: "iana" + }, + "video/vnd.sealedmedia.softseal.mov": { + source: "iana" + }, + "video/vnd.uvvu.mp4": { + source: "iana", + extensions: ["uvu", "uvvu"] + }, + "video/vnd.vivo": { + source: "iana", + extensions: ["viv"] + }, + "video/vnd.youtube.yt": { + source: "iana" + }, + "video/vp8": { + source: "iana" + }, + "video/vp9": { + source: "iana" + }, + "video/webm": { + source: "apache", + compressible: false, + extensions: ["webm"] + }, + "video/x-f4v": { + source: "apache", + extensions: ["f4v"] + }, + "video/x-fli": { + source: "apache", + extensions: ["fli"] + }, + "video/x-flv": { + source: "apache", + compressible: false, + extensions: ["flv"] + }, + "video/x-m4v": { + source: "apache", + extensions: ["m4v"] + }, + "video/x-matroska": { + source: "apache", + compressible: false, + extensions: ["mkv", "mk3d", "mks"] + }, + "video/x-mng": { + source: "apache", + extensions: ["mng"] + }, + "video/x-ms-asf": { + source: "apache", + extensions: ["asf", "asx"] + }, + "video/x-ms-vob": { + source: "apache", + extensions: ["vob"] + }, + "video/x-ms-wm": { + source: "apache", + extensions: ["wm"] + }, + "video/x-ms-wmv": { + source: "apache", + compressible: false, + extensions: ["wmv"] + }, + "video/x-ms-wmx": { + source: "apache", + extensions: ["wmx"] + }, + "video/x-ms-wvx": { + source: "apache", + extensions: ["wvx"] + }, + "video/x-msvideo": { + source: "apache", + extensions: ["avi"] + }, + "video/x-sgi-movie": { + source: "apache", + extensions: ["movie"] + }, + "video/x-smv": { + source: "apache", + extensions: ["smv"] + }, + "x-conference/x-cooltalk": { + source: "apache", + extensions: ["ice"] + }, + "x-shader/x-fragment": { + compressible: true + }, + "x-shader/x-vertex": { + compressible: true + } + }; + } +}); + +// ../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/index.js +var require_mime_db = __commonJS({ + "../../node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/index.js"(exports2, module2) { + module2.exports = require_db(); + } +}); + +// ../../node_modules/.pnpm/mime-types@2.1.35/node_modules/mime-types/index.js +var require_mime_types = __commonJS({ + "../../node_modules/.pnpm/mime-types@2.1.35/node_modules/mime-types/index.js"(exports2) { + "use strict"; + var db = require_mime_db(); + var extname = require("path").extname; + var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/; + var TEXT_TYPE_REGEXP = /^text\//i; + exports2.charset = charset; + exports2.charsets = { lookup: charset }; + exports2.contentType = contentType; + exports2.extension = extension; + exports2.extensions = /* @__PURE__ */ Object.create(null); + exports2.lookup = lookup; + exports2.types = /* @__PURE__ */ Object.create(null); + populateMaps(exports2.extensions, exports2.types); + function charset(type) { + if (!type || typeof type !== "string") { + return false; + } + var match = EXTRACT_TYPE_REGEXP.exec(type); + var mime = match && db[match[1].toLowerCase()]; + if (mime && mime.charset) { + return mime.charset; + } + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return "UTF-8"; + } + return false; + } + function contentType(str) { + if (!str || typeof str !== "string") { + return false; + } + var mime = str.indexOf("/") === -1 ? exports2.lookup(str) : str; + if (!mime) { + return false; + } + if (mime.indexOf("charset") === -1) { + var charset2 = exports2.charset(mime); + if (charset2) mime += "; charset=" + charset2.toLowerCase(); + } + return mime; + } + function extension(type) { + if (!type || typeof type !== "string") { + return false; + } + var match = EXTRACT_TYPE_REGEXP.exec(type); + var exts = match && exports2.extensions[match[1].toLowerCase()]; + if (!exts || !exts.length) { + return false; + } + return exts[0]; + } + function lookup(path) { + if (!path || typeof path !== "string") { + return false; + } + var extension2 = extname("x." + path).toLowerCase().substr(1); + if (!extension2) { + return false; + } + return exports2.types[extension2] || false; + } + function populateMaps(extensions, types) { + var preference = ["nginx", "apache", void 0, "iana"]; + Object.keys(db).forEach(function forEachMimeType(type) { + var mime = db[type]; + var exts = mime.extensions; + if (!exts || !exts.length) { + return; + } + extensions[type] = exts; + for (var i = 0; i < exts.length; i++) { + var extension2 = exts[i]; + if (types[extension2]) { + var from = preference.indexOf(db[types[extension2]].source); + var to = preference.indexOf(mime.source); + if (types[extension2] !== "application/octet-stream" && (from > to || from === to && types[extension2].substr(0, 12) === "application/")) { + continue; + } + } + types[extension2] = type; + } + }); + } + } +}); + +// ../../node_modules/.pnpm/type-is@1.6.18/node_modules/type-is/index.js +var require_type_is = __commonJS({ + "../../node_modules/.pnpm/type-is@1.6.18/node_modules/type-is/index.js"(exports2, module2) { + "use strict"; + var typer = require_media_typer(); + var mime = require_mime_types(); + module2.exports = typeofrequest; + module2.exports.is = typeis; + module2.exports.hasBody = hasbody; + module2.exports.normalize = normalize; + module2.exports.match = mimeMatch; + function typeis(value, types_) { + var i; + var types = types_; + var val = tryNormalizeType(value); + if (!val) { + return false; + } + if (types && !Array.isArray(types)) { + types = new Array(arguments.length - 1); + for (i = 0; i < types.length; i++) { + types[i] = arguments[i + 1]; + } + } + if (!types || !types.length) { + return val; + } + var type; + for (i = 0; i < types.length; i++) { + if (mimeMatch(normalize(type = types[i]), val)) { + return type[0] === "+" || type.indexOf("*") !== -1 ? val : type; + } + } + return false; + } + function hasbody(req) { + return req.headers["transfer-encoding"] !== void 0 || !isNaN(req.headers["content-length"]); + } + function typeofrequest(req, types_) { + var types = types_; + if (!hasbody(req)) { + return null; + } + if (arguments.length > 2) { + types = new Array(arguments.length - 1); + for (var i = 0; i < types.length; i++) { + types[i] = arguments[i + 1]; + } + } + var value = req.headers["content-type"]; + return typeis(value, types); + } + function normalize(type) { + if (typeof type !== "string") { + return false; + } + switch (type) { + case "urlencoded": + return "application/x-www-form-urlencoded"; + case "multipart": + return "multipart/*"; + } + if (type[0] === "+") { + return "*/*" + type; + } + return type.indexOf("/") === -1 ? mime.lookup(type) : type; + } + function mimeMatch(expected, actual) { + if (expected === false) { + return false; + } + var actualParts = actual.split("/"); + var expectedParts = expected.split("/"); + if (actualParts.length !== 2 || expectedParts.length !== 2) { + return false; + } + if (expectedParts[0] !== "*" && expectedParts[0] !== actualParts[0]) { + return false; + } + if (expectedParts[1].substr(0, 2) === "*+") { + return expectedParts[1].length <= actualParts[1].length + 1 && expectedParts[1].substr(1) === actualParts[1].substr(1 - expectedParts[1].length); + } + if (expectedParts[1] !== "*" && expectedParts[1] !== actualParts[1]) { + return false; + } + return true; + } + function normalizeType(value) { + var type = typer.parse(value); + type.parameters = void 0; + return typer.format(type); + } + function tryNormalizeType(value) { + if (!value) { + return null; + } + try { + return normalizeType(value); + } catch (err) { + return null; + } + } + } +}); + +// ../../node_modules/.pnpm/body-parser@1.20.4/node_modules/body-parser/lib/types/json.js +var require_json = __commonJS({ + "../../node_modules/.pnpm/body-parser@1.20.4/node_modules/body-parser/lib/types/json.js"(exports2, module2) { + "use strict"; + var bytes = require_bytes(); + var contentType = require_content_type(); + var createError = require_http_errors(); + var debug = require_src()("body-parser:json"); + var read = require_read(); + var typeis = require_type_is(); + module2.exports = json; + var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d])/; + var JSON_SYNTAX_CHAR = "#"; + var JSON_SYNTAX_REGEXP = /#+/g; + function json(options) { + var opts = options || {}; + var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit; + var inflate = opts.inflate !== false; + var reviver = opts.reviver; + var strict = opts.strict !== false; + var type = opts.type || "application/json"; + var verify = opts.verify || false; + if (verify !== false && typeof verify !== "function") { + throw new TypeError("option verify must be function"); + } + var shouldParse = typeof type !== "function" ? typeChecker(type) : type; + function parse2(body) { + if (body.length === 0) { + return {}; + } + if (strict) { + var first = firstchar(body); + if (first !== "{" && first !== "[") { + debug("strict violation"); + throw createStrictSyntaxError(body, first); + } + } + try { + debug("parse json"); + return JSON.parse(body, reviver); + } catch (e) { + throw normalizeJsonSyntaxError(e, { + message: e.message, + stack: e.stack + }); + } + } + return function jsonParser(req, res, next) { + if (req._body) { + debug("body already parsed"); + next(); + return; + } + req.body = req.body || {}; + if (!typeis.hasBody(req)) { + debug("skip empty body"); + next(); + return; + } + debug("content-type %j", req.headers["content-type"]); + if (!shouldParse(req)) { + debug("skip parsing"); + next(); + return; + } + var charset = getCharset(req) || "utf-8"; + if (charset.slice(0, 4) !== "utf-") { + debug("invalid charset"); + next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', { + charset, + type: "charset.unsupported" + })); + return; + } + read(req, res, next, parse2, debug, { + encoding: charset, + inflate, + limit, + verify + }); + }; + } + function createStrictSyntaxError(str, char) { + var index = str.indexOf(char); + var partial = ""; + if (index !== -1) { + partial = str.substring(0, index) + JSON_SYNTAX_CHAR; + for (var i = index + 1; i < str.length; i++) { + partial += JSON_SYNTAX_CHAR; + } + } + try { + JSON.parse(partial); + throw new SyntaxError("strict violation"); + } catch (e) { + return normalizeJsonSyntaxError(e, { + message: e.message.replace(JSON_SYNTAX_REGEXP, function(placeholder) { + return str.substring(index, index + placeholder.length); + }), + stack: e.stack + }); + } + } + function firstchar(str) { + var match = FIRST_CHAR_REGEXP.exec(str); + return match ? match[1] : void 0; + } + function getCharset(req) { + try { + return (contentType.parse(req).parameters.charset || "").toLowerCase(); + } catch (e) { + return void 0; + } + } + function normalizeJsonSyntaxError(error, obj2) { + var keys = Object.getOwnPropertyNames(error); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key !== "stack" && key !== "message") { + delete error[key]; + } + } + error.stack = obj2.stack.replace(error.message, obj2.message); + error.message = obj2.message; + return error; + } + function typeChecker(type) { + return function checkType(req) { + return Boolean(typeis(req, type)); + }; + } + } +}); + +// ../../node_modules/.pnpm/body-parser@1.20.4/node_modules/body-parser/lib/types/raw.js +var require_raw = __commonJS({ + "../../node_modules/.pnpm/body-parser@1.20.4/node_modules/body-parser/lib/types/raw.js"(exports2, module2) { + "use strict"; + var bytes = require_bytes(); + var debug = require_src()("body-parser:raw"); + var read = require_read(); + var typeis = require_type_is(); + module2.exports = raw; + function raw(options) { + var opts = options || {}; + var inflate = opts.inflate !== false; + var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit; + var type = opts.type || "application/octet-stream"; + var verify = opts.verify || false; + if (verify !== false && typeof verify !== "function") { + throw new TypeError("option verify must be function"); + } + var shouldParse = typeof type !== "function" ? typeChecker(type) : type; + function parse2(buf) { + return buf; + } + return function rawParser(req, res, next) { + if (req._body) { + debug("body already parsed"); + next(); + return; + } + req.body = req.body || {}; + if (!typeis.hasBody(req)) { + debug("skip empty body"); + next(); + return; + } + debug("content-type %j", req.headers["content-type"]); + if (!shouldParse(req)) { + debug("skip parsing"); + next(); + return; + } + read(req, res, next, parse2, debug, { + encoding: null, + inflate, + limit, + verify + }); + }; + } + function typeChecker(type) { + return function checkType(req) { + return Boolean(typeis(req, type)); + }; + } + } +}); + +// ../../node_modules/.pnpm/body-parser@1.20.4/node_modules/body-parser/lib/types/text.js +var require_text = __commonJS({ + "../../node_modules/.pnpm/body-parser@1.20.4/node_modules/body-parser/lib/types/text.js"(exports2, module2) { + "use strict"; + var bytes = require_bytes(); + var contentType = require_content_type(); + var debug = require_src()("body-parser:text"); + var read = require_read(); + var typeis = require_type_is(); + module2.exports = text; + function text(options) { + var opts = options || {}; + var defaultCharset = opts.defaultCharset || "utf-8"; + var inflate = opts.inflate !== false; + var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit; + var type = opts.type || "text/plain"; + var verify = opts.verify || false; + if (verify !== false && typeof verify !== "function") { + throw new TypeError("option verify must be function"); + } + var shouldParse = typeof type !== "function" ? typeChecker(type) : type; + function parse2(buf) { + return buf; + } + return function textParser(req, res, next) { + if (req._body) { + debug("body already parsed"); + next(); + return; + } + req.body = req.body || {}; + if (!typeis.hasBody(req)) { + debug("skip empty body"); + next(); + return; + } + debug("content-type %j", req.headers["content-type"]); + if (!shouldParse(req)) { + debug("skip parsing"); + next(); + return; + } + var charset = getCharset(req) || defaultCharset; + read(req, res, next, parse2, debug, { + encoding: charset, + inflate, + limit, + verify + }); + }; + } + function getCharset(req) { + try { + return (contentType.parse(req).parameters.charset || "").toLowerCase(); + } catch (e) { + return void 0; + } + } + function typeChecker(type) { + return function checkType(req) { + return Boolean(typeis(req, type)); + }; + } + } +}); + +// ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js +var require_type = __commonJS({ + "../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(exports2, module2) { + "use strict"; + module2.exports = TypeError; + } +}); + +// ../../node_modules/.pnpm/object-inspect@1.13.4/node_modules/object-inspect/util.inspect.js +var require_util_inspect = __commonJS({ + "../../node_modules/.pnpm/object-inspect@1.13.4/node_modules/object-inspect/util.inspect.js"(exports2, module2) { + module2.exports = require("util").inspect; + } +}); + +// ../../node_modules/.pnpm/object-inspect@1.13.4/node_modules/object-inspect/index.js +var require_object_inspect = __commonJS({ + "../../node_modules/.pnpm/object-inspect@1.13.4/node_modules/object-inspect/index.js"(exports2, module2) { + var hasMap = typeof Map === "function" && Map.prototype; + var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null; + var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null; + var mapForEach = hasMap && Map.prototype.forEach; + var hasSet = typeof Set === "function" && Set.prototype; + var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null; + var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null; + var setForEach = hasSet && Set.prototype.forEach; + var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype; + var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; + var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype; + var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; + var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype; + var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; + var booleanValueOf = Boolean.prototype.valueOf; + var objectToString = Object.prototype.toString; + var functionToString = Function.prototype.toString; + var $match = String.prototype.match; + var $slice = String.prototype.slice; + var $replace = String.prototype.replace; + var $toUpperCase = String.prototype.toUpperCase; + var $toLowerCase = String.prototype.toLowerCase; + var $test = RegExp.prototype.test; + var $concat = Array.prototype.concat; + var $join = Array.prototype.join; + var $arrSlice = Array.prototype.slice; + var $floor = Math.floor; + var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null; + var gOPS = Object.getOwnPropertySymbols; + var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null; + var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object"; + var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null; + var isEnumerable = Object.prototype.propertyIsEnumerable; + var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) { + return O.__proto__; + } : null); + function addNumericSeparator(num, str) { + if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) { + return str; + } + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num === "number") { + var int = num < 0 ? -$floor(-num) : $floor(num); + if (int !== num) { + var intStr = String(int); + var dec = $slice.call(str, intStr.length + 1); + return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, ""); + } + } + return $replace.call(str, sepRegex, "$&_"); + } + var utilInspect = require_util_inspect(); + var inspectCustom = utilInspect.custom; + var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; + var quotes = { + __proto__: null, + "double": '"', + single: "'" + }; + var quoteREs = { + __proto__: null, + "double": /(["\\])/g, + single: /(['\\])/g + }; + module2.exports = function inspect_(obj2, options, depth, seen) { + var opts = options || {}; + if (has(opts, "quoteStyle") && !has(quotes, opts.quoteStyle)) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); + } + if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) { + throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); + } + var customInspect = has(opts, "customInspect") ? opts.customInspect : true; + if (typeof customInspect !== "boolean" && customInspect !== "symbol") { + throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`"); + } + if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) { + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + } + if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + } + var numericSeparator = opts.numericSeparator; + if (typeof obj2 === "undefined") { + return "undefined"; + } + if (obj2 === null) { + return "null"; + } + if (typeof obj2 === "boolean") { + return obj2 ? "true" : "false"; + } + if (typeof obj2 === "string") { + return inspectString(obj2, opts); + } + if (typeof obj2 === "number") { + if (obj2 === 0) { + return Infinity / obj2 > 0 ? "0" : "-0"; + } + var str = String(obj2); + return numericSeparator ? addNumericSeparator(obj2, str) : str; + } + if (typeof obj2 === "bigint") { + var bigIntStr = String(obj2) + "n"; + return numericSeparator ? addNumericSeparator(obj2, bigIntStr) : bigIntStr; + } + var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth; + if (typeof depth === "undefined") { + depth = 0; + } + if (depth >= maxDepth && maxDepth > 0 && typeof obj2 === "object") { + return isArray(obj2) ? "[Array]" : "[Object]"; + } + var indent = getIndent(opts, depth); + if (typeof seen === "undefined") { + seen = []; + } else if (indexOf(seen, obj2) >= 0) { + return "[Circular]"; + } + function inspect(value, from, noIndent) { + if (from) { + seen = $arrSlice.call(seen); + seen.push(from); + } + if (noIndent) { + var newOpts = { + depth: opts.depth + }; + if (has(opts, "quoteStyle")) { + newOpts.quoteStyle = opts.quoteStyle; + } + return inspect_(value, newOpts, depth + 1, seen); + } + return inspect_(value, opts, depth + 1, seen); + } + if (typeof obj2 === "function" && !isRegExp(obj2)) { + var name = nameOf(obj2); + var keys = arrObjKeys(obj2, inspect); + return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : ""); + } + if (isSymbol(obj2)) { + var symString = hasShammedSymbols ? $replace.call(String(obj2), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj2); + return typeof obj2 === "object" && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement(obj2)) { + var s = "<" + $toLowerCase.call(String(obj2.nodeName)); + var attrs = obj2.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts); + } + s += ">"; + if (obj2.childNodes && obj2.childNodes.length) { + s += "..."; + } + s += ""; + return s; + } + if (isArray(obj2)) { + if (obj2.length === 0) { + return "[]"; + } + var xs = arrObjKeys(obj2, inspect); + if (indent && !singleLineValues(xs)) { + return "[" + indentedJoin(xs, indent) + "]"; + } + return "[ " + $join.call(xs, ", ") + " ]"; + } + if (isError2(obj2)) { + var parts = arrObjKeys(obj2, inspect); + if (!("cause" in Error.prototype) && "cause" in obj2 && !isEnumerable.call(obj2, "cause")) { + return "{ [" + String(obj2) + "] " + $join.call($concat.call("[cause]: " + inspect(obj2.cause), parts), ", ") + " }"; + } + if (parts.length === 0) { + return "[" + String(obj2) + "]"; + } + return "{ [" + String(obj2) + "] " + $join.call(parts, ", ") + " }"; + } + if (typeof obj2 === "object" && customInspect) { + if (inspectSymbol && typeof obj2[inspectSymbol] === "function" && utilInspect) { + return utilInspect(obj2, { depth: maxDepth - depth }); + } else if (customInspect !== "symbol" && typeof obj2.inspect === "function") { + return obj2.inspect(); + } + } + if (isMap(obj2)) { + var mapParts = []; + if (mapForEach) { + mapForEach.call(obj2, function(value, key) { + mapParts.push(inspect(key, obj2, true) + " => " + inspect(value, obj2)); + }); + } + return collectionOf("Map", mapSize.call(obj2), mapParts, indent); + } + if (isSet(obj2)) { + var setParts = []; + if (setForEach) { + setForEach.call(obj2, function(value) { + setParts.push(inspect(value, obj2)); + }); + } + return collectionOf("Set", setSize.call(obj2), setParts, indent); + } + if (isWeakMap(obj2)) { + return weakCollectionOf("WeakMap"); + } + if (isWeakSet(obj2)) { + return weakCollectionOf("WeakSet"); + } + if (isWeakRef(obj2)) { + return weakCollectionOf("WeakRef"); + } + if (isNumber(obj2)) { + return markBoxed(inspect(Number(obj2))); + } + if (isBigInt(obj2)) { + return markBoxed(inspect(bigIntValueOf.call(obj2))); + } + if (isBoolean(obj2)) { + return markBoxed(booleanValueOf.call(obj2)); + } + if (isString(obj2)) { + return markBoxed(inspect(String(obj2))); + } + if (typeof window !== "undefined" && obj2 === window) { + return "{ [object Window] }"; + } + if (typeof globalThis !== "undefined" && obj2 === globalThis || typeof global !== "undefined" && obj2 === global) { + return "{ [object globalThis] }"; + } + if (!isDate(obj2) && !isRegExp(obj2)) { + var ys = arrObjKeys(obj2, inspect); + var isPlainObject = gPO ? gPO(obj2) === Object.prototype : obj2 instanceof Object || obj2.constructor === Object; + var protoTag = obj2 instanceof Object ? "" : "null prototype"; + var stringTag = !isPlainObject && toStringTag && Object(obj2) === obj2 && toStringTag in obj2 ? $slice.call(toStr(obj2), 8, -1) : protoTag ? "Object" : ""; + var constructorTag = isPlainObject || typeof obj2.constructor !== "function" ? "" : obj2.constructor.name ? obj2.constructor.name + " " : ""; + var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : ""); + if (ys.length === 0) { + return tag + "{}"; + } + if (indent) { + return tag + "{" + indentedJoin(ys, indent) + "}"; + } + return tag + "{ " + $join.call(ys, ", ") + " }"; + } + return String(obj2); + }; + function wrapQuotes(s, defaultStyle, opts) { + var style = opts.quoteStyle || defaultStyle; + var quoteChar = quotes[style]; + return quoteChar + s + quoteChar; + } + function quote(s) { + return $replace.call(String(s), /"/g, """); + } + function canTrustToString(obj2) { + return !toStringTag || !(typeof obj2 === "object" && (toStringTag in obj2 || typeof obj2[toStringTag] !== "undefined")); + } + function isArray(obj2) { + return toStr(obj2) === "[object Array]" && canTrustToString(obj2); + } + function isDate(obj2) { + return toStr(obj2) === "[object Date]" && canTrustToString(obj2); + } + function isRegExp(obj2) { + return toStr(obj2) === "[object RegExp]" && canTrustToString(obj2); + } + function isError2(obj2) { + return toStr(obj2) === "[object Error]" && canTrustToString(obj2); + } + function isString(obj2) { + return toStr(obj2) === "[object String]" && canTrustToString(obj2); + } + function isNumber(obj2) { + return toStr(obj2) === "[object Number]" && canTrustToString(obj2); + } + function isBoolean(obj2) { + return toStr(obj2) === "[object Boolean]" && canTrustToString(obj2); + } + function isSymbol(obj2) { + if (hasShammedSymbols) { + return obj2 && typeof obj2 === "object" && obj2 instanceof Symbol; + } + if (typeof obj2 === "symbol") { + return true; + } + if (!obj2 || typeof obj2 !== "object" || !symToString) { + return false; + } + try { + symToString.call(obj2); + return true; + } catch (e) { + } + return false; + } + function isBigInt(obj2) { + if (!obj2 || typeof obj2 !== "object" || !bigIntValueOf) { + return false; + } + try { + bigIntValueOf.call(obj2); + return true; + } catch (e) { + } + return false; + } + var hasOwn = Object.prototype.hasOwnProperty || function(key) { + return key in this; + }; + function has(obj2, key) { + return hasOwn.call(obj2, key); + } + function toStr(obj2) { + return objectToString.call(obj2); + } + function nameOf(f) { + if (f.name) { + return f.name; + } + var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); + if (m) { + return m[1]; + } + return null; + } + function indexOf(xs, x) { + if (xs.indexOf) { + return xs.indexOf(x); + } + for (var i = 0, l2 = xs.length; i < l2; i++) { + if (xs[i] === x) { + return i; + } + } + return -1; + } + function isMap(x) { + if (!mapSize || !x || typeof x !== "object") { + return false; + } + try { + mapSize.call(x); + try { + setSize.call(x); + } catch (s) { + return true; + } + return x instanceof Map; + } catch (e) { + } + return false; + } + function isWeakMap(x) { + if (!weakMapHas || !x || typeof x !== "object") { + return false; + } + try { + weakMapHas.call(x, weakMapHas); + try { + weakSetHas.call(x, weakSetHas); + } catch (s) { + return true; + } + return x instanceof WeakMap; + } catch (e) { + } + return false; + } + function isWeakRef(x) { + if (!weakRefDeref || !x || typeof x !== "object") { + return false; + } + try { + weakRefDeref.call(x); + return true; + } catch (e) { + } + return false; + } + function isSet(x) { + if (!setSize || !x || typeof x !== "object") { + return false; + } + try { + setSize.call(x); + try { + mapSize.call(x); + } catch (m) { + return true; + } + return x instanceof Set; + } catch (e) { + } + return false; + } + function isWeakSet(x) { + if (!weakSetHas || !x || typeof x !== "object") { + return false; + } + try { + weakSetHas.call(x, weakSetHas); + try { + weakMapHas.call(x, weakMapHas); + } catch (s) { + return true; + } + return x instanceof WeakSet; + } catch (e) { + } + return false; + } + function isElement(x) { + if (!x || typeof x !== "object") { + return false; + } + if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) { + return true; + } + return typeof x.nodeName === "string" && typeof x.getAttribute === "function"; + } + function inspectString(str, opts) { + if (str.length > opts.maxStringLength) { + var remaining = str.length - opts.maxStringLength; + var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : ""); + return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; + } + var quoteRE = quoteREs[opts.quoteStyle || "single"]; + quoteRE.lastIndex = 0; + var s = $replace.call($replace.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s, "single", opts); + } + function lowbyte(c) { + var n = c.charCodeAt(0); + var x = { + 8: "b", + 9: "t", + 10: "n", + 12: "f", + 13: "r" + }[n]; + if (x) { + return "\\" + x; + } + return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16)); + } + function markBoxed(str) { + return "Object(" + str + ")"; + } + function weakCollectionOf(type) { + return type + " { ? }"; + } + function collectionOf(type, size, entries, indent) { + var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", "); + return type + " (" + size + ") {" + joinedEntries + "}"; + } + function singleLineValues(xs) { + for (var i = 0; i < xs.length; i++) { + if (indexOf(xs[i], "\n") >= 0) { + return false; + } + } + return true; + } + function getIndent(opts, depth) { + var baseIndent; + if (opts.indent === " ") { + baseIndent = " "; + } else if (typeof opts.indent === "number" && opts.indent > 0) { + baseIndent = $join.call(Array(opts.indent + 1), " "); + } else { + return null; + } + return { + base: baseIndent, + prev: $join.call(Array(depth + 1), baseIndent) + }; + } + function indentedJoin(xs, indent) { + if (xs.length === 0) { + return ""; + } + var lineJoiner = "\n" + indent.prev + indent.base; + return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev; + } + function arrObjKeys(obj2, inspect) { + var isArr = isArray(obj2); + var xs = []; + if (isArr) { + xs.length = obj2.length; + for (var i = 0; i < obj2.length; i++) { + xs[i] = has(obj2, i) ? inspect(obj2[i], obj2) : ""; + } + } + var syms = typeof gOPS === "function" ? gOPS(obj2) : []; + var symMap; + if (hasShammedSymbols) { + symMap = {}; + for (var k = 0; k < syms.length; k++) { + symMap["$" + syms[k]] = syms[k]; + } + } + for (var key in obj2) { + if (!has(obj2, key)) { + continue; + } + if (isArr && String(Number(key)) === key && key < obj2.length) { + continue; + } + if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) { + continue; + } else if ($test.call(/[^\w$]/, key)) { + xs.push(inspect(key, obj2) + ": " + inspect(obj2[key], obj2)); + } else { + xs.push(key + ": " + inspect(obj2[key], obj2)); + } + } + if (typeof gOPS === "function") { + for (var j = 0; j < syms.length; j++) { + if (isEnumerable.call(obj2, syms[j])) { + xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj2[syms[j]], obj2)); + } + } + } + return xs; + } + } +}); + +// ../../node_modules/.pnpm/side-channel-list@1.0.1/node_modules/side-channel-list/index.js +var require_side_channel_list = __commonJS({ + "../../node_modules/.pnpm/side-channel-list@1.0.1/node_modules/side-channel-list/index.js"(exports2, module2) { + "use strict"; + var inspect = require_object_inspect(); + var $TypeError = require_type(); + var listGetNode = function(list, key, isDelete) { + var prev = list; + var curr; + for (; (curr = prev.next) != null; prev = curr) { + if (curr.key === key) { + prev.next = curr.next; + if (!isDelete) { + curr.next = /** @type {NonNullable} */ + list.next; + list.next = curr; + } + return curr; + } + } + }; + var listGet = function(objects, key) { + if (!objects) { + return void 0; + } + var node = listGetNode(objects, key); + return node && node.value; + }; + var listSet = function(objects, key, value) { + var node = listGetNode(objects, key); + if (node) { + node.value = value; + } else { + objects.next = /** @type {import('./list.d.ts').ListNode} */ + { + // eslint-disable-line no-param-reassign, no-extra-parens + key, + next: objects.next, + value + }; + } + }; + var listHas = function(objects, key) { + if (!objects) { + return false; + } + return !!listGetNode(objects, key); + }; + var listDelete = function(objects, key) { + if (objects) { + return listGetNode(objects, key, true); + } + }; + module2.exports = function getSideChannelList() { + var $o; + var channel = { + assert: function(key) { + if (!channel.has(key)) { + throw new $TypeError("Side channel does not contain " + inspect(key)); + } + }, + "delete": function(key) { + var deletedNode = listDelete($o, key); + if (deletedNode && $o && !$o.next) { + $o = void 0; + } + return !!deletedNode; + }, + get: function(key) { + return listGet($o, key); + }, + has: function(key) { + return listHas($o, key); + }, + set: function(key, value) { + if (!$o) { + $o = { + next: void 0 + }; + } + listSet( + /** @type {NonNullable} */ + $o, + key, + value + ); + } + }; + return channel; + }; + } +}); + +// ../../node_modules/.pnpm/es-object-atoms@1.1.2/node_modules/es-object-atoms/index.js +var require_es_object_atoms = __commonJS({ + "../../node_modules/.pnpm/es-object-atoms@1.1.2/node_modules/es-object-atoms/index.js"(exports2, module2) { + "use strict"; + module2.exports = Object; + } +}); + +// ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js +var require_es_errors = __commonJS({ + "../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(exports2, module2) { + "use strict"; + module2.exports = Error; + } +}); + +// ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js +var require_eval = __commonJS({ + "../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(exports2, module2) { + "use strict"; + module2.exports = EvalError; + } +}); + +// ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js +var require_range2 = __commonJS({ + "../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(exports2, module2) { + "use strict"; + module2.exports = RangeError; + } +}); + +// ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js +var require_ref = __commonJS({ + "../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(exports2, module2) { + "use strict"; + module2.exports = ReferenceError; + } +}); + +// ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js +var require_syntax = __commonJS({ + "../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(exports2, module2) { + "use strict"; + module2.exports = SyntaxError; + } +}); + +// ../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js +var require_uri = __commonJS({ + "../../node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(exports2, module2) { + "use strict"; + module2.exports = URIError; + } +}); + +// ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js +var require_abs = __commonJS({ + "../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js"(exports2, module2) { + "use strict"; + module2.exports = Math.abs; + } +}); + +// ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js +var require_floor = __commonJS({ + "../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js"(exports2, module2) { + "use strict"; + module2.exports = Math.floor; + } +}); + +// ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js +var require_max3 = __commonJS({ + "../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js"(exports2, module2) { + "use strict"; + module2.exports = Math.max; + } +}); + +// ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js +var require_min2 = __commonJS({ + "../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js"(exports2, module2) { + "use strict"; + module2.exports = Math.min; + } +}); + +// ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js +var require_pow = __commonJS({ + "../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js"(exports2, module2) { + "use strict"; + module2.exports = Math.pow; + } +}); + +// ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js +var require_round = __commonJS({ + "../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js"(exports2, module2) { + "use strict"; + module2.exports = Math.round; + } +}); + +// ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js +var require_isNaN = __commonJS({ + "../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js"(exports2, module2) { + "use strict"; + module2.exports = Number.isNaN || function isNaN2(a) { + return a !== a; + }; + } +}); + +// ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js +var require_sign = __commonJS({ + "../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js"(exports2, module2) { + "use strict"; + var $isNaN = require_isNaN(); + module2.exports = function sign(number) { + if ($isNaN(number) || number === 0) { + return number; + } + return number < 0 ? -1 : 1; + }; + } +}); + +// ../../node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js +var require_gOPD = __commonJS({ + "../../node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js"(exports2, module2) { + "use strict"; + module2.exports = Object.getOwnPropertyDescriptor; + } +}); + +// ../../node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js +var require_gopd = __commonJS({ + "../../node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js"(exports2, module2) { + "use strict"; + var $gOPD = require_gOPD(); + if ($gOPD) { + try { + $gOPD([], "length"); + } catch (e) { + $gOPD = null; + } + } + module2.exports = $gOPD; + } +}); + +// ../../node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js +var require_es_define_property = __commonJS({ + "../../node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js"(exports2, module2) { + "use strict"; + var $defineProperty = Object.defineProperty || false; + if ($defineProperty) { + try { + $defineProperty({}, "a", { value: 1 }); + } catch (e) { + $defineProperty = false; + } + } + module2.exports = $defineProperty; + } +}); + +// ../../node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js +var require_shams = __commonJS({ + "../../node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js"(exports2, module2) { + "use strict"; + module2.exports = function hasSymbols() { + if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") { + return false; + } + if (typeof Symbol.iterator === "symbol") { + return true; + } + var obj2 = {}; + var sym = Symbol("test"); + var symObj = Object(sym); + if (typeof sym === "string") { + return false; + } + if (Object.prototype.toString.call(sym) !== "[object Symbol]") { + return false; + } + if (Object.prototype.toString.call(symObj) !== "[object Symbol]") { + return false; + } + var symVal = 42; + obj2[sym] = symVal; + for (var _2 in obj2) { + return false; + } + if (typeof Object.keys === "function" && Object.keys(obj2).length !== 0) { + return false; + } + if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj2).length !== 0) { + return false; + } + var syms = Object.getOwnPropertySymbols(obj2); + if (syms.length !== 1 || syms[0] !== sym) { + return false; + } + if (!Object.prototype.propertyIsEnumerable.call(obj2, sym)) { + return false; + } + if (typeof Object.getOwnPropertyDescriptor === "function") { + var descriptor = ( + /** @type {PropertyDescriptor} */ + Object.getOwnPropertyDescriptor(obj2, sym) + ); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { + return false; + } + } + return true; + }; + } +}); + +// ../../node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js +var require_has_symbols = __commonJS({ + "../../node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js"(exports2, module2) { + "use strict"; + var origSymbol = typeof Symbol !== "undefined" && Symbol; + var hasSymbolSham = require_shams(); + module2.exports = function hasNativeSymbols() { + if (typeof origSymbol !== "function") { + return false; + } + if (typeof Symbol !== "function") { + return false; + } + if (typeof origSymbol("foo") !== "symbol") { + return false; + } + if (typeof Symbol("bar") !== "symbol") { + return false; + } + return hasSymbolSham(); + }; + } +}); + +// ../../node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js +var require_Reflect_getPrototypeOf = __commonJS({ + "../../node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js"(exports2, module2) { + "use strict"; + module2.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null; + } +}); + +// ../../node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js +var require_Object_getPrototypeOf = __commonJS({ + "../../node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js"(exports2, module2) { + "use strict"; + var $Object = require_es_object_atoms(); + module2.exports = $Object.getPrototypeOf || null; + } +}); + +// ../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js +var require_implementation = __commonJS({ + "../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports2, module2) { + "use strict"; + var ERROR_MESSAGE = "Function.prototype.bind called on incompatible "; + var toStr = Object.prototype.toString; + var max = Math.max; + var funcType = "[object Function]"; + var concatty = function concatty2(a, b) { + var arr = []; + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + return arr; + }; + var slicy = function slicy2(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; + }; + var joiny = function(arr, joiner) { + var str = ""; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; + }; + module2.exports = function bind(that) { + var target = this; + if (typeof target !== "function" || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + var bound; + var binder = function() { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + }; + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = "$" + i; + } + bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder); + if (target.prototype) { + var Empty = function Empty2() { + }; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + return bound; + }; + } +}); + +// ../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js +var require_function_bind = __commonJS({ + "../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports2, module2) { + "use strict"; + var implementation = require_implementation(); + module2.exports = Function.prototype.bind || implementation; + } +}); + +// ../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js +var require_functionCall = __commonJS({ + "../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js"(exports2, module2) { + "use strict"; + module2.exports = Function.prototype.call; + } +}); + +// ../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js +var require_functionApply = __commonJS({ + "../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js"(exports2, module2) { + "use strict"; + module2.exports = Function.prototype.apply; + } +}); + +// ../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js +var require_reflectApply = __commonJS({ + "../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js"(exports2, module2) { + "use strict"; + module2.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply; + } +}); + +// ../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js +var require_actualApply = __commonJS({ + "../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js"(exports2, module2) { + "use strict"; + var bind = require_function_bind(); + var $apply = require_functionApply(); + var $call = require_functionCall(); + var $reflectApply = require_reflectApply(); + module2.exports = $reflectApply || bind.call($call, $apply); + } +}); + +// ../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js +var require_call_bind_apply_helpers = __commonJS({ + "../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js"(exports2, module2) { + "use strict"; + var bind = require_function_bind(); + var $TypeError = require_type(); + var $call = require_functionCall(); + var $actualApply = require_actualApply(); + module2.exports = function callBindBasic(args) { + if (args.length < 1 || typeof args[0] !== "function") { + throw new $TypeError("a function is required"); + } + return $actualApply(bind, $call, args); + }; + } +}); + +// ../../node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js +var require_get2 = __commonJS({ + "../../node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js"(exports2, module2) { + "use strict"; + var callBind = require_call_bind_apply_helpers(); + var gOPD = require_gopd(); + var hasProtoAccessor; + try { + hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ + [].__proto__ === Array.prototype; + } catch (e) { + if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") { + throw e; + } + } + var desc = !!hasProtoAccessor && gOPD && gOPD( + Object.prototype, + /** @type {keyof typeof Object.prototype} */ + "__proto__" + ); + var $Object = Object; + var $getPrototypeOf = $Object.getPrototypeOf; + module2.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? ( + /** @type {import('./get')} */ + function getDunder(value) { + return $getPrototypeOf(value == null ? value : $Object(value)); + } + ) : false; + } +}); + +// ../../node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js +var require_get_proto = __commonJS({ + "../../node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js"(exports2, module2) { + "use strict"; + var reflectGetProto = require_Reflect_getPrototypeOf(); + var originalGetProto = require_Object_getPrototypeOf(); + var getDunderProto = require_get2(); + module2.exports = reflectGetProto ? function getProto(O) { + return reflectGetProto(O); + } : originalGetProto ? function getProto(O) { + if (!O || typeof O !== "object" && typeof O !== "function") { + throw new TypeError("getProto: not an object"); + } + return originalGetProto(O); + } : getDunderProto ? function getProto(O) { + return getDunderProto(O); + } : null; + } +}); + +// ../../node_modules/.pnpm/hasown@2.0.4/node_modules/hasown/index.js +var require_hasown = __commonJS({ + "../../node_modules/.pnpm/hasown@2.0.4/node_modules/hasown/index.js"(exports2, module2) { + "use strict"; + var call = Function.prototype.call; + var $hasOwn = Object.prototype.hasOwnProperty; + var bind = require_function_bind(); + module2.exports = bind.call(call, $hasOwn); + } +}); + +// ../../node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js +var require_get_intrinsic = __commonJS({ + "../../node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js"(exports2, module2) { + "use strict"; + var undefined2; + var $Object = require_es_object_atoms(); + var $Error = require_es_errors(); + var $EvalError = require_eval(); + var $RangeError = require_range2(); + var $ReferenceError = require_ref(); + var $SyntaxError = require_syntax(); + var $TypeError = require_type(); + var $URIError = require_uri(); + var abs = require_abs(); + var floor = require_floor(); + var max = require_max3(); + var min = require_min2(); + var pow = require_pow(); + var round = require_round(); + var sign = require_sign(); + var $Function = Function; + var getEvalledConstructor = function(expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")(); + } catch (e) { + } + }; + var $gOPD = require_gopd(); + var $defineProperty = require_es_define_property(); + var throwTypeError = function() { + throw new $TypeError(); + }; + var ThrowTypeError = $gOPD ? (function() { + try { + arguments.callee; + return throwTypeError; + } catch (calleeThrows) { + try { + return $gOPD(arguments, "callee").get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + })() : throwTypeError; + var hasSymbols = require_has_symbols()(); + var getProto = require_get_proto(); + var $ObjectGPO = require_Object_getPrototypeOf(); + var $ReflectGPO = require_Reflect_getPrototypeOf(); + var $apply = require_functionApply(); + var $call = require_functionCall(); + var needsEval = {}; + var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array); + var INTRINSICS = { + __proto__: null, + "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError, + "%Array%": Array, + "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer, + "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2, + "%AsyncFromSyncIteratorPrototype%": undefined2, + "%AsyncFunction%": needsEval, + "%AsyncGenerator%": needsEval, + "%AsyncGeneratorFunction%": needsEval, + "%AsyncIteratorPrototype%": needsEval, + "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics, + "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt, + "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array, + "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array, + "%Boolean%": Boolean, + "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView, + "%Date%": Date, + "%decodeURI%": decodeURI, + "%decodeURIComponent%": decodeURIComponent, + "%encodeURI%": encodeURI, + "%encodeURIComponent%": encodeURIComponent, + "%Error%": $Error, + "%eval%": eval, + // eslint-disable-line no-eval + "%EvalError%": $EvalError, + "%Float16Array%": typeof Float16Array === "undefined" ? undefined2 : Float16Array, + "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array, + "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array, + "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry, + "%Function%": $Function, + "%GeneratorFunction%": needsEval, + "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array, + "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array, + "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array, + "%isFinite%": isFinite, + "%isNaN%": isNaN, + "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2, + "%JSON%": typeof JSON === "object" ? JSON : undefined2, + "%Map%": typeof Map === "undefined" ? undefined2 : Map, + "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()), + "%Math%": Math, + "%Number%": Number, + "%Object%": $Object, + "%Object.getOwnPropertyDescriptor%": $gOPD, + "%parseFloat%": parseFloat, + "%parseInt%": parseInt, + "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise, + "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy, + "%RangeError%": $RangeError, + "%ReferenceError%": $ReferenceError, + "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect, + "%RegExp%": RegExp, + "%Set%": typeof Set === "undefined" ? undefined2 : Set, + "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()), + "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer, + "%String%": String, + "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2, + "%Symbol%": hasSymbols ? Symbol : undefined2, + "%SyntaxError%": $SyntaxError, + "%ThrowTypeError%": ThrowTypeError, + "%TypedArray%": TypedArray, + "%TypeError%": $TypeError, + "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array, + "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray, + "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array, + "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array, + "%URIError%": $URIError, + "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap, + "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef, + "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet, + "%Function.prototype.call%": $call, + "%Function.prototype.apply%": $apply, + "%Object.defineProperty%": $defineProperty, + "%Object.getPrototypeOf%": $ObjectGPO, + "%Math.abs%": abs, + "%Math.floor%": floor, + "%Math.max%": max, + "%Math.min%": min, + "%Math.pow%": pow, + "%Math.round%": round, + "%Math.sign%": sign, + "%Reflect.getPrototypeOf%": $ReflectGPO + }; + if (getProto) { + try { + null.error; + } catch (e) { + errorProto = getProto(getProto(e)); + INTRINSICS["%Error.prototype%"] = errorProto; + } + } + var errorProto; + var doEval = function doEval2(name) { + var value; + if (name === "%AsyncFunction%") { + value = getEvalledConstructor("async function () {}"); + } else if (name === "%GeneratorFunction%") { + value = getEvalledConstructor("function* () {}"); + } else if (name === "%AsyncGeneratorFunction%") { + value = getEvalledConstructor("async function* () {}"); + } else if (name === "%AsyncGenerator%") { + var fn = doEval2("%AsyncGeneratorFunction%"); + if (fn) { + value = fn.prototype; + } + } else if (name === "%AsyncIteratorPrototype%") { + var gen = doEval2("%AsyncGenerator%"); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + INTRINSICS[name] = value; + return value; + }; + var LEGACY_ALIASES = { + __proto__: null, + "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], + "%ArrayPrototype%": ["Array", "prototype"], + "%ArrayProto_entries%": ["Array", "prototype", "entries"], + "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], + "%ArrayProto_keys%": ["Array", "prototype", "keys"], + "%ArrayProto_values%": ["Array", "prototype", "values"], + "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], + "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], + "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], + "%BooleanPrototype%": ["Boolean", "prototype"], + "%DataViewPrototype%": ["DataView", "prototype"], + "%DatePrototype%": ["Date", "prototype"], + "%ErrorPrototype%": ["Error", "prototype"], + "%EvalErrorPrototype%": ["EvalError", "prototype"], + "%Float32ArrayPrototype%": ["Float32Array", "prototype"], + "%Float64ArrayPrototype%": ["Float64Array", "prototype"], + "%FunctionPrototype%": ["Function", "prototype"], + "%Generator%": ["GeneratorFunction", "prototype"], + "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], + "%Int8ArrayPrototype%": ["Int8Array", "prototype"], + "%Int16ArrayPrototype%": ["Int16Array", "prototype"], + "%Int32ArrayPrototype%": ["Int32Array", "prototype"], + "%JSONParse%": ["JSON", "parse"], + "%JSONStringify%": ["JSON", "stringify"], + "%MapPrototype%": ["Map", "prototype"], + "%NumberPrototype%": ["Number", "prototype"], + "%ObjectPrototype%": ["Object", "prototype"], + "%ObjProto_toString%": ["Object", "prototype", "toString"], + "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], + "%PromisePrototype%": ["Promise", "prototype"], + "%PromiseProto_then%": ["Promise", "prototype", "then"], + "%Promise_all%": ["Promise", "all"], + "%Promise_reject%": ["Promise", "reject"], + "%Promise_resolve%": ["Promise", "resolve"], + "%RangeErrorPrototype%": ["RangeError", "prototype"], + "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], + "%RegExpPrototype%": ["RegExp", "prototype"], + "%SetPrototype%": ["Set", "prototype"], + "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], + "%StringPrototype%": ["String", "prototype"], + "%SymbolPrototype%": ["Symbol", "prototype"], + "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], + "%TypedArrayPrototype%": ["TypedArray", "prototype"], + "%TypeErrorPrototype%": ["TypeError", "prototype"], + "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], + "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], + "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], + "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], + "%URIErrorPrototype%": ["URIError", "prototype"], + "%WeakMapPrototype%": ["WeakMap", "prototype"], + "%WeakSetPrototype%": ["WeakSet", "prototype"] + }; + var bind = require_function_bind(); + var hasOwn = require_hasown(); + var $concat = bind.call($call, Array.prototype.concat); + var $spliceApply = bind.call($apply, Array.prototype.splice); + var $replace = bind.call($call, String.prototype.replace); + var $strSlice = bind.call($call, String.prototype.slice); + var $exec = bind.call($call, RegExp.prototype.exec); + var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; + var reEscapeChar = /\\(\\)?/g; + var stringToPath = function stringToPath2(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === "%" && last !== "%") { + throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`"); + } else if (last === "%" && first !== "%") { + throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`"); + } + var result = []; + $replace(string, rePropName, function(match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match; + }); + return result; + }; + var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = "%" + alias[0] + "%"; + } + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === "undefined" && !allowMissing) { + throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!"); + } + return { + alias, + name: intrinsicName, + value + }; + } + throw new $SyntaxError("intrinsic " + name + " does not exist!"); + }; + module2.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== "string" || name.length === 0) { + throw new $TypeError("intrinsic name must be a non-empty string"); + } + if (arguments.length > 1 && typeof allowMissing !== "boolean") { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ""; + var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) { + throw new $SyntaxError("property names with quotes must have matching quotes"); + } + if (part === "constructor" || !isOwn) { + skipFurtherCaching = true; + } + intrinsicBaseName += "." + part; + intrinsicRealName = "%" + intrinsicBaseName + "%"; + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available."); + } + return void undefined2; + } + if ($gOPD && i + 1 >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + if (isOwn && "get" in desc && !("originalValue" in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; + }; + } +}); + +// ../../node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js +var require_call_bound = __commonJS({ + "../../node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var callBindBasic = require_call_bind_apply_helpers(); + var $indexOf = callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]); + module2.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = ( + /** @type {(this: unknown, ...args: unknown[]) => unknown} */ + GetIntrinsic(name, !!allowMissing) + ); + if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) { + return callBindBasic( + /** @type {const} */ + [intrinsic] + ); + } + return intrinsic; + }; + } +}); + +// ../../node_modules/.pnpm/side-channel-map@1.0.1/node_modules/side-channel-map/index.js +var require_side_channel_map = __commonJS({ + "../../node_modules/.pnpm/side-channel-map@1.0.1/node_modules/side-channel-map/index.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var callBound = require_call_bound(); + var inspect = require_object_inspect(); + var $TypeError = require_type(); + var $Map = GetIntrinsic("%Map%", true); + var $mapGet = callBound("Map.prototype.get", true); + var $mapSet = callBound("Map.prototype.set", true); + var $mapHas = callBound("Map.prototype.has", true); + var $mapDelete = callBound("Map.prototype.delete", true); + var $mapSize = callBound("Map.prototype.size", true); + module2.exports = !!$Map && /** @type {Exclude} */ + function getSideChannelMap() { + var $m; + var channel = { + assert: function(key) { + if (!channel.has(key)) { + throw new $TypeError("Side channel does not contain " + inspect(key)); + } + }, + "delete": function(key) { + if ($m) { + var result = $mapDelete($m, key); + if ($mapSize($m) === 0) { + $m = void 0; + } + return result; + } + return false; + }, + get: function(key) { + if ($m) { + return $mapGet($m, key); + } + }, + has: function(key) { + if ($m) { + return $mapHas($m, key); + } + return false; + }, + set: function(key, value) { + if (!$m) { + $m = new $Map(); + } + $mapSet($m, key, value); + } + }; + return channel; + }; + } +}); + +// ../../node_modules/.pnpm/side-channel-weakmap@1.0.2/node_modules/side-channel-weakmap/index.js +var require_side_channel_weakmap = __commonJS({ + "../../node_modules/.pnpm/side-channel-weakmap@1.0.2/node_modules/side-channel-weakmap/index.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var callBound = require_call_bound(); + var inspect = require_object_inspect(); + var getSideChannelMap = require_side_channel_map(); + var $TypeError = require_type(); + var $WeakMap = GetIntrinsic("%WeakMap%", true); + var $weakMapGet = callBound("WeakMap.prototype.get", true); + var $weakMapSet = callBound("WeakMap.prototype.set", true); + var $weakMapHas = callBound("WeakMap.prototype.has", true); + var $weakMapDelete = callBound("WeakMap.prototype.delete", true); + module2.exports = $WeakMap ? ( + /** @type {Exclude} */ + function getSideChannelWeakMap() { + var $wm; + var $m; + var channel = { + assert: function(key) { + if (!channel.has(key)) { + throw new $TypeError("Side channel does not contain " + inspect(key)); + } + }, + "delete": function(key) { + if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { + if ($wm) { + return $weakMapDelete($wm, key); + } + } else if (getSideChannelMap) { + if ($m) { + return $m["delete"](key); + } + } + return false; + }, + get: function(key) { + if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { + if ($wm) { + return $weakMapGet($wm, key); + } + } + return $m && $m.get(key); + }, + has: function(key) { + if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { + if ($wm) { + return $weakMapHas($wm, key); + } + } + return !!$m && $m.has(key); + }, + set: function(key, value) { + if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { + if (!$wm) { + $wm = new $WeakMap(); + } + $weakMapSet($wm, key, value); + } else if (getSideChannelMap) { + if (!$m) { + $m = getSideChannelMap(); + } + $m.set(key, value); + } + } + }; + return channel; + } + ) : getSideChannelMap; + } +}); + +// ../../node_modules/.pnpm/side-channel@1.1.1/node_modules/side-channel/index.js +var require_side_channel = __commonJS({ + "../../node_modules/.pnpm/side-channel@1.1.1/node_modules/side-channel/index.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var inspect = require_object_inspect(); + var getSideChannelList = require_side_channel_list(); + var getSideChannelMap = require_side_channel_map(); + var getSideChannelWeakMap = require_side_channel_weakmap(); + var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList; + module2.exports = function getSideChannel() { + var $channelData; + var channel = { + assert: function(key) { + if (!channel.has(key)) { + var keyDesc = key && Object(key) === key ? "the given object key" : inspect(key); + throw new $TypeError("Side channel does not contain " + keyDesc); + } + }, + "delete": function(key) { + return !!$channelData && $channelData["delete"](key); + }, + get: function(key) { + return $channelData && $channelData.get(key); + }, + has: function(key) { + return !!$channelData && $channelData.has(key); + }, + set: function(key, value) { + if (!$channelData) { + $channelData = makeChannel(); + } + $channelData.set(key, value); + } + }; + return channel; + }; + } +}); + +// ../../node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/formats.js +var require_formats = __commonJS({ + "../../node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/formats.js"(exports2, module2) { + "use strict"; + var replace = String.prototype.replace; + var percentTwenties = /%20/g; + var Format = { + RFC1738: "RFC1738", + RFC3986: "RFC3986" + }; + module2.exports = { + "default": Format.RFC3986, + formatters: { + RFC1738: function(value) { + return replace.call(value, percentTwenties, "+"); + }, + RFC3986: function(value) { + return String(value); + } + }, + RFC1738: Format.RFC1738, + RFC3986: Format.RFC3986 + }; + } +}); + +// ../../node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/utils.js +var require_utils10 = __commonJS({ + "../../node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/utils.js"(exports2, module2) { + "use strict"; + var formats = require_formats(); + var getSideChannel = require_side_channel(); + var has = Object.prototype.hasOwnProperty; + var isArray = Array.isArray; + var overflowChannel = getSideChannel(); + var markOverflow = function markOverflow2(obj2, maxIndex) { + overflowChannel.set(obj2, maxIndex); + return obj2; + }; + var isOverflow = function isOverflow2(obj2) { + return overflowChannel.has(obj2); + }; + var getMaxIndex = function getMaxIndex2(obj2) { + return overflowChannel.get(obj2); + }; + var setMaxIndex = function setMaxIndex2(obj2, maxIndex) { + overflowChannel.set(obj2, maxIndex); + }; + var hexTable = (function() { + var array = []; + for (var i = 0; i < 256; ++i) { + array[array.length] = "%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase(); + } + return array; + })(); + var compactQueue = function compactQueue2(queue) { + while (queue.length > 1) { + var item = queue.pop(); + var obj2 = item.obj[item.prop]; + if (isArray(obj2)) { + var compacted = []; + for (var j = 0; j < obj2.length; ++j) { + if (typeof obj2[j] !== "undefined") { + compacted[compacted.length] = obj2[j]; + } + } + item.obj[item.prop] = compacted; + } + } + }; + var arrayToObject = function arrayToObject2(source, options) { + var obj2 = options && options.plainObjects ? { __proto__: null } : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== "undefined") { + obj2[i] = source[i]; + } + } + return obj2; + }; + var merge = function merge2(target, source, options) { + if (!source) { + return target; + } + if (typeof source !== "object" && typeof source !== "function") { + if (isArray(target)) { + var nextIndex = target.length; + if (options && typeof options.arrayLimit === "number" && nextIndex > options.arrayLimit) { + return markOverflow(arrayToObject(target.concat(source), options), nextIndex); + } + target[nextIndex] = source; + } else if (target && typeof target === "object") { + if (isOverflow(target)) { + var newIndex = getMaxIndex(target) + 1; + target[newIndex] = source; + setMaxIndex(target, newIndex); + } else if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) { + target[source] = true; + } + } else { + return [target, source]; + } + return target; + } + if (!target || typeof target !== "object") { + if (isOverflow(source)) { + var sourceKeys = Object.keys(source); + var result = options && options.plainObjects ? { __proto__: null, 0: target } : { 0: target }; + for (var m = 0; m < sourceKeys.length; m++) { + var oldKey = parseInt(sourceKeys[m], 10); + result[oldKey + 1] = source[sourceKeys[m]]; + } + return markOverflow(result, getMaxIndex(source) + 1); + } + var combined = [target].concat(source); + if (options && typeof options.arrayLimit === "number" && combined.length > options.arrayLimit) { + return markOverflow(arrayToObject(combined, options), combined.length - 1); + } + return combined; + } + var mergeTarget = target; + if (isArray(target) && !isArray(source)) { + mergeTarget = arrayToObject(target, options); + } + if (isArray(target) && isArray(source)) { + source.forEach(function(item, i) { + if (has.call(target, i)) { + var targetItem = target[i]; + if (targetItem && typeof targetItem === "object" && item && typeof item === "object") { + target[i] = merge2(targetItem, item, options); + } else { + target[target.length] = item; + } + } else { + target[i] = item; + } + }); + return target; + } + return Object.keys(source).reduce(function(acc, key) { + var value = source[key]; + if (has.call(acc, key)) { + acc[key] = merge2(acc[key], value, options); + } else { + acc[key] = value; + } + if (isOverflow(source) && !isOverflow(acc)) { + markOverflow(acc, getMaxIndex(source)); + } + if (isOverflow(acc)) { + var keyNum = parseInt(key, 10); + if (String(keyNum) === key && keyNum >= 0 && keyNum > getMaxIndex(acc)) { + setMaxIndex(acc, keyNum); + } + } + return acc; + }, mergeTarget); + }; + var assign = function assignSingleSource(target, source) { + return Object.keys(source).reduce(function(acc, key) { + acc[key] = source[key]; + return acc; + }, target); + }; + var decode = function(str, defaultDecoder, charset) { + var strWithoutPlus = str.replace(/\+/g, " "); + if (charset === "iso-8859-1") { + return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); + } + try { + return decodeURIComponent(strWithoutPlus); + } catch (e) { + return strWithoutPlus; + } + }; + var limit = 1024; + var encode = function encode2(str, defaultEncoder, charset, kind, format) { + if (str.length === 0) { + return str; + } + var string = str; + if (typeof str === "symbol") { + string = Symbol.prototype.toString.call(str); + } else if (typeof str !== "string") { + string = String(str); + } + if (charset === "iso-8859-1") { + return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) { + return "%26%23" + parseInt($0.slice(2), 16) + "%3B"; + }); + } + var out = ""; + for (var j = 0; j < string.length; j += limit) { + var segment = string.length >= limit ? string.slice(j, j + limit) : string; + var arr = []; + for (var i = 0; i < segment.length; ++i) { + var c = segment.charCodeAt(i); + if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats.RFC1738 && (c === 40 || c === 41)) { + arr[arr.length] = segment.charAt(i); + continue; + } + if (c < 128) { + arr[arr.length] = hexTable[c]; + continue; + } + if (c < 2048) { + arr[arr.length] = hexTable[192 | c >> 6] + hexTable[128 | c & 63]; + continue; + } + if (c < 55296 || c >= 57344) { + arr[arr.length] = hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]; + continue; + } + i += 1; + c = 65536 + ((c & 1023) << 10 | segment.charCodeAt(i) & 1023); + arr[arr.length] = hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]; + } + out += arr.join(""); + } + return out; + }; + var compact = function compact2(value) { + var queue = [{ obj: { o: value }, prop: "o" }]; + var refs = []; + for (var i = 0; i < queue.length; ++i) { + var item = queue[i]; + var obj2 = item.obj[item.prop]; + var keys = Object.keys(obj2); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + var val = obj2[key]; + if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) { + queue[queue.length] = { obj: obj2, prop: key }; + refs[refs.length] = val; + } + } + } + compactQueue(queue); + return value; + }; + var isRegExp = function isRegExp2(obj2) { + return Object.prototype.toString.call(obj2) === "[object RegExp]"; + }; + var isBuffer = function isBuffer2(obj2) { + if (!obj2 || typeof obj2 !== "object") { + return false; + } + return !!(obj2.constructor && obj2.constructor.isBuffer && obj2.constructor.isBuffer(obj2)); + }; + var combine = function combine2(a, b, arrayLimit, plainObjects) { + if (isOverflow(a)) { + var newIndex = getMaxIndex(a) + 1; + a[newIndex] = b; + setMaxIndex(a, newIndex); + return a; + } + var result = [].concat(a, b); + if (result.length > arrayLimit) { + return markOverflow(arrayToObject(result, { plainObjects }), result.length - 1); + } + return result; + }; + var maybeMap = function maybeMap2(val, fn) { + if (isArray(val)) { + var mapped = []; + for (var i = 0; i < val.length; i += 1) { + mapped[mapped.length] = fn(val[i]); + } + return mapped; + } + return fn(val); + }; + module2.exports = { + arrayToObject, + assign, + combine, + compact, + decode, + encode, + isBuffer, + isOverflow, + isRegExp, + markOverflow, + maybeMap, + merge + }; + } +}); + +// ../../node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/stringify.js +var require_stringify = __commonJS({ + "../../node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/stringify.js"(exports2, module2) { + "use strict"; + var getSideChannel = require_side_channel(); + var utils = require_utils10(); + var formats = require_formats(); + var has = Object.prototype.hasOwnProperty; + var arrayPrefixGenerators = { + brackets: function brackets(prefix) { + return prefix + "[]"; + }, + comma: "comma", + indices: function indices(prefix, key) { + return prefix + "[" + key + "]"; + }, + repeat: function repeat(prefix) { + return prefix; + } + }; + var isArray = Array.isArray; + var push = Array.prototype.push; + var pushToArray = function(arr, valueOrArray) { + push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); + }; + var toISO = Date.prototype.toISOString; + var defaultFormat = formats["default"]; + var defaults = { + addQueryPrefix: false, + allowDots: false, + allowEmptyArrays: false, + arrayFormat: "indices", + charset: "utf-8", + charsetSentinel: false, + commaRoundTrip: false, + delimiter: "&", + encode: true, + encodeDotInKeys: false, + encoder: utils.encode, + encodeValuesOnly: false, + filter: void 0, + format: defaultFormat, + formatter: formats.formatters[defaultFormat], + // deprecated + indices: false, + serializeDate: function serializeDate(date) { + return toISO.call(date); + }, + skipNulls: false, + strictNullHandling: false + }; + var isNonNullishPrimitive = function isNonNullishPrimitive2(v) { + return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint"; + }; + var sentinel = {}; + var stringify2 = function stringify3(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) { + var obj2 = object; + var tmpSc = sideChannel; + var step = 0; + var findFlag = false; + while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) { + var pos = tmpSc.get(object); + step += 1; + if (typeof pos !== "undefined") { + if (pos === step) { + throw new RangeError("Cyclic object value"); + } else { + findFlag = true; + } + } + if (typeof tmpSc.get(sentinel) === "undefined") { + step = 0; + } + } + if (typeof filter === "function") { + obj2 = filter(prefix, obj2); + } else if (obj2 instanceof Date) { + obj2 = serializeDate(obj2); + } else if (generateArrayPrefix === "comma" && isArray(obj2)) { + obj2 = utils.maybeMap(obj2, function(value2) { + if (value2 instanceof Date) { + return serializeDate(value2); + } + return value2; + }); + } + if (obj2 === null) { + if (strictNullHandling) { + return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format) : prefix; + } + obj2 = ""; + } + if (isNonNullishPrimitive(obj2) || utils.isBuffer(obj2)) { + if (encoder) { + var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, "key", format); + return [formatter(keyValue) + "=" + formatter(encoder(obj2, defaults.encoder, charset, "value", format))]; + } + return [formatter(prefix) + "=" + formatter(String(obj2))]; + } + var values = []; + if (typeof obj2 === "undefined") { + return values; + } + var objKeys; + if (generateArrayPrefix === "comma" && isArray(obj2)) { + if (encodeValuesOnly && encoder) { + obj2 = utils.maybeMap(obj2, encoder); + } + objKeys = [{ value: obj2.length > 0 ? obj2.join(",") || null : void 0 }]; + } else if (isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj2); + objKeys = sort ? keys.sort(sort) : keys; + } + var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, "%2E") : String(prefix); + var adjustedPrefix = commaRoundTrip && isArray(obj2) && obj2.length === 1 ? encodedPrefix + "[]" : encodedPrefix; + if (allowEmptyArrays && isArray(obj2) && obj2.length === 0) { + return adjustedPrefix + "[]"; + } + for (var j = 0; j < objKeys.length; ++j) { + var key = objKeys[j]; + var value = typeof key === "object" && key && typeof key.value !== "undefined" ? key.value : obj2[key]; + if (skipNulls && value === null) { + continue; + } + var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, "%2E") : String(key); + var keyPrefix = isArray(obj2) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + encodedKey : "[" + encodedKey + "]"); + sideChannel.set(object, step); + var valueSideChannel = getSideChannel(); + valueSideChannel.set(sentinel, sideChannel); + pushToArray(values, stringify3( + value, + keyPrefix, + generateArrayPrefix, + commaRoundTrip, + allowEmptyArrays, + strictNullHandling, + skipNulls, + encodeDotInKeys, + generateArrayPrefix === "comma" && encodeValuesOnly && isArray(obj2) ? null : encoder, + filter, + sort, + allowDots, + serializeDate, + format, + formatter, + encodeValuesOnly, + charset, + valueSideChannel + )); + } + return values; + }; + var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) { + if (!opts) { + return defaults; + } + if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") { + throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided"); + } + if (typeof opts.encodeDotInKeys !== "undefined" && typeof opts.encodeDotInKeys !== "boolean") { + throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided"); + } + if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") { + throw new TypeError("Encoder has to be a function."); + } + var charset = opts.charset || defaults.charset; + if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") { + throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); + } + var format = formats["default"]; + if (typeof opts.format !== "undefined") { + if (!has.call(formats.formatters, opts.format)) { + throw new TypeError("Unknown format option provided."); + } + format = opts.format; + } + var formatter = formats.formatters[format]; + var filter = defaults.filter; + if (typeof opts.filter === "function" || isArray(opts.filter)) { + filter = opts.filter; + } + var arrayFormat; + if (opts.arrayFormat in arrayPrefixGenerators) { + arrayFormat = opts.arrayFormat; + } else if ("indices" in opts) { + arrayFormat = opts.indices ? "indices" : "repeat"; + } else { + arrayFormat = defaults.arrayFormat; + } + if ("commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") { + throw new TypeError("`commaRoundTrip` must be a boolean, or absent"); + } + var allowDots = typeof opts.allowDots === "undefined" ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; + return { + addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults.addQueryPrefix, + allowDots, + allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays, + arrayFormat, + charset, + charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel, + commaRoundTrip: !!opts.commaRoundTrip, + delimiter: typeof opts.delimiter === "undefined" ? defaults.delimiter : opts.delimiter, + encode: typeof opts.encode === "boolean" ? opts.encode : defaults.encode, + encodeDotInKeys: typeof opts.encodeDotInKeys === "boolean" ? opts.encodeDotInKeys : defaults.encodeDotInKeys, + encoder: typeof opts.encoder === "function" ? opts.encoder : defaults.encoder, + encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults.encodeValuesOnly, + filter, + format, + formatter, + serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults.serializeDate, + skipNulls: typeof opts.skipNulls === "boolean" ? opts.skipNulls : defaults.skipNulls, + sort: typeof opts.sort === "function" ? opts.sort : null, + strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling + }; + }; + module2.exports = function(object, opts) { + var obj2 = object; + var options = normalizeStringifyOptions(opts); + var objKeys; + var filter; + if (typeof options.filter === "function") { + filter = options.filter; + obj2 = filter("", obj2); + } else if (isArray(options.filter)) { + filter = options.filter; + objKeys = filter; + } + var keys = []; + if (typeof obj2 !== "object" || obj2 === null) { + return ""; + } + var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat]; + var commaRoundTrip = generateArrayPrefix === "comma" && options.commaRoundTrip; + if (!objKeys) { + objKeys = Object.keys(obj2); + } + if (options.sort) { + objKeys.sort(options.sort); + } + var sideChannel = getSideChannel(); + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + var value = obj2[key]; + if (options.skipNulls && value === null) { + continue; + } + pushToArray(keys, stringify2( + value, + key, + generateArrayPrefix, + commaRoundTrip, + options.allowEmptyArrays, + options.strictNullHandling, + options.skipNulls, + options.encodeDotInKeys, + options.encode ? options.encoder : null, + options.filter, + options.sort, + options.allowDots, + options.serializeDate, + options.format, + options.formatter, + options.encodeValuesOnly, + options.charset, + sideChannel + )); + } + var joined = keys.join(options.delimiter); + var prefix = options.addQueryPrefix === true ? "?" : ""; + if (options.charsetSentinel) { + if (options.charset === "iso-8859-1") { + prefix += "utf8=%26%2310003%3B&"; + } else { + prefix += "utf8=%E2%9C%93&"; + } + } + return joined.length > 0 ? prefix + joined : ""; + }; + } +}); + +// ../../node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/parse.js +var require_parse2 = __commonJS({ + "../../node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/parse.js"(exports2, module2) { + "use strict"; + var utils = require_utils10(); + var has = Object.prototype.hasOwnProperty; + var isArray = Array.isArray; + var defaults = { + allowDots: false, + allowEmptyArrays: false, + allowPrototypes: false, + allowSparse: false, + arrayLimit: 20, + charset: "utf-8", + charsetSentinel: false, + comma: false, + decodeDotInKeys: false, + decoder: utils.decode, + delimiter: "&", + depth: 5, + duplicates: "combine", + ignoreQueryPrefix: false, + interpretNumericEntities: false, + parameterLimit: 1e3, + parseArrays: true, + plainObjects: false, + strictDepth: false, + strictNullHandling: false, + throwOnLimitExceeded: false + }; + var interpretNumericEntities = function(str) { + return str.replace(/&#(\d+);/g, function($0, numberStr) { + return String.fromCharCode(parseInt(numberStr, 10)); + }); + }; + var parseArrayValue = function(val, options, currentArrayLength) { + if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) { + return val.split(","); + } + if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) { + throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array."); + } + return val; + }; + var isoSentinel = "utf8=%26%2310003%3B"; + var charsetSentinel = "utf8=%E2%9C%93"; + var parseValues = function parseQueryStringValues(str, options) { + var obj2 = { __proto__: null }; + var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str; + cleanStr = cleanStr.replace(/%5B/gi, "[").replace(/%5D/gi, "]"); + var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit; + var parts = cleanStr.split( + options.delimiter, + options.throwOnLimitExceeded ? limit + 1 : limit + ); + if (options.throwOnLimitExceeded && parts.length > limit) { + throw new RangeError("Parameter limit exceeded. Only " + limit + " parameter" + (limit === 1 ? "" : "s") + " allowed."); + } + var skipIndex = -1; + var i; + var charset = options.charset; + if (options.charsetSentinel) { + for (i = 0; i < parts.length; ++i) { + if (parts[i].indexOf("utf8=") === 0) { + if (parts[i] === charsetSentinel) { + charset = "utf-8"; + } else if (parts[i] === isoSentinel) { + charset = "iso-8859-1"; + } + skipIndex = i; + i = parts.length; + } + } + } + for (i = 0; i < parts.length; ++i) { + if (i === skipIndex) { + continue; + } + var part = parts[i]; + var bracketEqualsPos = part.indexOf("]="); + var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1; + var key; + var val; + if (pos === -1) { + key = options.decoder(part, defaults.decoder, charset, "key"); + val = options.strictNullHandling ? null : ""; + } else { + key = options.decoder(part.slice(0, pos), defaults.decoder, charset, "key"); + if (key !== null) { + val = utils.maybeMap( + parseArrayValue( + part.slice(pos + 1), + options, + isArray(obj2[key]) ? obj2[key].length : 0 + ), + function(encodedVal) { + return options.decoder(encodedVal, defaults.decoder, charset, "value"); + } + ); + } + } + if (val && options.interpretNumericEntities && charset === "iso-8859-1") { + val = interpretNumericEntities(String(val)); + } + if (part.indexOf("[]=") > -1) { + val = isArray(val) ? [val] : val; + } + if (options.comma && isArray(val) && val.length > options.arrayLimit) { + if (options.throwOnLimitExceeded) { + throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array."); + } + val = utils.combine([], val, options.arrayLimit, options.plainObjects); + } + if (key !== null) { + var existing = has.call(obj2, key); + if (existing && options.duplicates === "combine") { + obj2[key] = utils.combine( + obj2[key], + val, + options.arrayLimit, + options.plainObjects + ); + } else if (!existing || options.duplicates === "last") { + obj2[key] = val; + } + } + } + return obj2; + }; + var parseObject = function(chain, val, options, valuesParsed) { + var currentArrayLength = 0; + if (chain.length > 0 && chain[chain.length - 1] === "[]") { + var parentKey = chain.slice(0, -1).join(""); + currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0; + } + var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength); + for (var i = chain.length - 1; i >= 0; --i) { + var obj2; + var root = chain[i]; + if (root === "[]" && options.parseArrays) { + if (utils.isOverflow(leaf)) { + obj2 = leaf; + } else { + obj2 = options.allowEmptyArrays && (leaf === "" || options.strictNullHandling && leaf === null) ? [] : utils.combine( + [], + leaf, + options.arrayLimit, + options.plainObjects + ); + } + } else { + obj2 = options.plainObjects ? { __proto__: null } : {}; + var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root; + var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, ".") : cleanRoot; + var index = parseInt(decodedRoot, 10); + var isValidArrayIndex = !isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && options.parseArrays; + if (!options.parseArrays && decodedRoot === "") { + obj2 = { 0: leaf }; + } else if (isValidArrayIndex && index < options.arrayLimit) { + obj2 = []; + obj2[index] = leaf; + } else if (isValidArrayIndex && options.throwOnLimitExceeded) { + throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array."); + } else if (isValidArrayIndex) { + obj2[index] = leaf; + utils.markOverflow(obj2, index); + } else if (decodedRoot !== "__proto__") { + obj2[decodedRoot] = leaf; + } + } + leaf = obj2; + } + return leaf; + }; + var splitKeyIntoSegments = function splitKeyIntoSegments2(givenKey, options) { + var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey; + if (options.depth <= 0) { + if (!options.plainObjects && has.call(Object.prototype, key)) { + if (!options.allowPrototypes) { + return; + } + } + return [key]; + } + var brackets = /(\[[^[\]]*])/; + var child = /(\[[^[\]]*])/g; + var segment = brackets.exec(key); + var parent = segment ? key.slice(0, segment.index) : key; + var keys = []; + if (parent) { + if (!options.plainObjects && has.call(Object.prototype, parent)) { + if (!options.allowPrototypes) { + return; + } + } + keys[keys.length] = parent; + } + var i = 0; + while ((segment = child.exec(key)) !== null && i < options.depth) { + i += 1; + var segmentContent = segment[1].slice(1, -1); + if (!options.plainObjects && has.call(Object.prototype, segmentContent)) { + if (!options.allowPrototypes) { + return; + } + } + keys[keys.length] = segment[1]; + } + if (segment) { + if (options.strictDepth === true) { + throw new RangeError("Input depth exceeded depth option of " + options.depth + " and strictDepth is true"); + } + keys[keys.length] = "[" + key.slice(segment.index) + "]"; + } + return keys; + }; + var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { + if (!givenKey) { + return; + } + var keys = splitKeyIntoSegments(givenKey, options); + if (!keys) { + return; + } + return parseObject(keys, val, options, valuesParsed); + }; + var normalizeParseOptions = function normalizeParseOptions2(opts) { + if (!opts) { + return defaults; + } + if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") { + throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided"); + } + if (typeof opts.decodeDotInKeys !== "undefined" && typeof opts.decodeDotInKeys !== "boolean") { + throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided"); + } + if (opts.decoder !== null && typeof opts.decoder !== "undefined" && typeof opts.decoder !== "function") { + throw new TypeError("Decoder has to be a function."); + } + if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") { + throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); + } + if (typeof opts.throwOnLimitExceeded !== "undefined" && typeof opts.throwOnLimitExceeded !== "boolean") { + throw new TypeError("`throwOnLimitExceeded` option must be a boolean"); + } + var charset = typeof opts.charset === "undefined" ? defaults.charset : opts.charset; + var duplicates = typeof opts.duplicates === "undefined" ? defaults.duplicates : opts.duplicates; + if (duplicates !== "combine" && duplicates !== "first" && duplicates !== "last") { + throw new TypeError("The duplicates option must be either combine, first, or last"); + } + var allowDots = typeof opts.allowDots === "undefined" ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; + return { + allowDots, + allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays, + allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults.allowPrototypes, + allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults.allowSparse, + arrayLimit: typeof opts.arrayLimit === "number" ? opts.arrayLimit : defaults.arrayLimit, + charset, + charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel, + comma: typeof opts.comma === "boolean" ? opts.comma : defaults.comma, + decodeDotInKeys: typeof opts.decodeDotInKeys === "boolean" ? opts.decodeDotInKeys : defaults.decodeDotInKeys, + decoder: typeof opts.decoder === "function" ? opts.decoder : defaults.decoder, + delimiter: typeof opts.delimiter === "string" || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, + // eslint-disable-next-line no-implicit-coercion, no-extra-parens + depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults.depth, + duplicates, + ignoreQueryPrefix: opts.ignoreQueryPrefix === true, + interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults.interpretNumericEntities, + parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults.parameterLimit, + parseArrays: opts.parseArrays !== false, + plainObjects: typeof opts.plainObjects === "boolean" ? opts.plainObjects : defaults.plainObjects, + strictDepth: typeof opts.strictDepth === "boolean" ? !!opts.strictDepth : defaults.strictDepth, + strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling, + throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === "boolean" ? opts.throwOnLimitExceeded : false + }; + }; + module2.exports = function(str, opts) { + var options = normalizeParseOptions(opts); + if (str === "" || str === null || typeof str === "undefined") { + return options.plainObjects ? { __proto__: null } : {}; + } + var tempObj = typeof str === "string" ? parseValues(str, options) : str; + var obj2 = options.plainObjects ? { __proto__: null } : {}; + var keys = Object.keys(tempObj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var newObj = parseKeys(key, tempObj[key], options, typeof str === "string"); + obj2 = utils.merge(obj2, newObj, options); + } + if (options.allowSparse === true) { + return obj2; + } + return utils.compact(obj2); + }; + } +}); + +// ../../node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/index.js +var require_lib3 = __commonJS({ + "../../node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/index.js"(exports2, module2) { + "use strict"; + var stringify2 = require_stringify(); + var parse2 = require_parse2(); + var formats = require_formats(); + module2.exports = { + formats, + parse: parse2, + stringify: stringify2 + }; + } +}); + +// ../../node_modules/.pnpm/body-parser@1.20.4/node_modules/body-parser/lib/types/urlencoded.js +var require_urlencoded = __commonJS({ + "../../node_modules/.pnpm/body-parser@1.20.4/node_modules/body-parser/lib/types/urlencoded.js"(exports2, module2) { + "use strict"; + var bytes = require_bytes(); + var contentType = require_content_type(); + var createError = require_http_errors(); + var debug = require_src()("body-parser:urlencoded"); + var deprecate = require_depd()("body-parser"); + var read = require_read(); + var typeis = require_type_is(); + module2.exports = urlencoded; + var parsers = /* @__PURE__ */ Object.create(null); + function urlencoded(options) { + var opts = options || {}; + if (opts.extended === void 0) { + deprecate("undefined extended: provide extended option"); + } + var extended = opts.extended !== false; + var inflate = opts.inflate !== false; + var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit; + var type = opts.type || "application/x-www-form-urlencoded"; + var verify = opts.verify || false; + if (verify !== false && typeof verify !== "function") { + throw new TypeError("option verify must be function"); + } + var queryparse = extended ? extendedparser(opts) : simpleparser(opts); + var shouldParse = typeof type !== "function" ? typeChecker(type) : type; + function parse2(body) { + return body.length ? queryparse(body) : {}; + } + return function urlencodedParser(req, res, next) { + if (req._body) { + debug("body already parsed"); + next(); + return; + } + req.body = req.body || {}; + if (!typeis.hasBody(req)) { + debug("skip empty body"); + next(); + return; + } + debug("content-type %j", req.headers["content-type"]); + if (!shouldParse(req)) { + debug("skip parsing"); + next(); + return; + } + var charset = getCharset(req) || "utf-8"; + if (charset !== "utf-8") { + debug("invalid charset"); + next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', { + charset, + type: "charset.unsupported" + })); + return; + } + read(req, res, next, parse2, debug, { + debug, + encoding: charset, + inflate, + limit, + verify + }); + }; + } + function extendedparser(options) { + var parameterLimit = options.parameterLimit !== void 0 ? options.parameterLimit : 1e3; + var depth = options.depth !== void 0 ? options.depth : 32; + var parse2 = parser("qs"); + if (isNaN(parameterLimit) || parameterLimit < 1) { + throw new TypeError("option parameterLimit must be a positive number"); + } + if (isNaN(depth) || depth < 0) { + throw new TypeError("option depth must be a zero or a positive number"); + } + if (isFinite(parameterLimit)) { + parameterLimit = parameterLimit | 0; + } + return function queryparse(body) { + var paramCount = parameterCount(body, parameterLimit); + if (paramCount === void 0) { + debug("too many parameters"); + throw createError(413, "too many parameters", { + type: "parameters.too.many" + }); + } + var arrayLimit = Math.max(100, paramCount); + debug("parse extended urlencoding"); + try { + return parse2(body, { + allowPrototypes: true, + arrayLimit, + depth, + strictDepth: true, + parameterLimit + }); + } catch (err) { + if (err instanceof RangeError) { + throw createError(400, "The input exceeded the depth", { + type: "querystring.parse.rangeError" + }); + } else { + throw err; + } + } + }; + } + function getCharset(req) { + try { + return (contentType.parse(req).parameters.charset || "").toLowerCase(); + } catch (e) { + return void 0; + } + } + function parameterCount(body, limit) { + var count = 0; + var index = 0; + while ((index = body.indexOf("&", index)) !== -1) { + count++; + index++; + if (count === limit) { + return void 0; + } + } + return count; + } + function parser(name) { + var mod = parsers[name]; + if (mod !== void 0) { + return mod.parse; + } + switch (name) { + case "qs": + mod = require_lib3(); + break; + case "querystring": + mod = require("querystring"); + break; + } + parsers[name] = mod; + return mod.parse; + } + function simpleparser(options) { + var parameterLimit = options.parameterLimit !== void 0 ? options.parameterLimit : 1e3; + var parse2 = parser("querystring"); + if (isNaN(parameterLimit) || parameterLimit < 1) { + throw new TypeError("option parameterLimit must be a positive number"); + } + if (isFinite(parameterLimit)) { + parameterLimit = parameterLimit | 0; + } + return function queryparse(body) { + var paramCount = parameterCount(body, parameterLimit); + if (paramCount === void 0) { + debug("too many parameters"); + throw createError(413, "too many parameters", { + type: "parameters.too.many" + }); + } + debug("parse urlencoding"); + return parse2(body, void 0, void 0, { maxKeys: parameterLimit }); + }; + } + function typeChecker(type) { + return function checkType(req) { + return Boolean(typeis(req, type)); + }; + } + } +}); + +// ../../node_modules/.pnpm/body-parser@1.20.4/node_modules/body-parser/index.js +var require_body_parser = __commonJS({ + "../../node_modules/.pnpm/body-parser@1.20.4/node_modules/body-parser/index.js"(exports2, module2) { + "use strict"; + var deprecate = require_depd()("body-parser"); + var parsers = /* @__PURE__ */ Object.create(null); + exports2 = module2.exports = deprecate.function( + bodyParser, + "bodyParser: use individual json/urlencoded middlewares" + ); + Object.defineProperty(exports2, "json", { + configurable: true, + enumerable: true, + get: createParserGetter("json") + }); + Object.defineProperty(exports2, "raw", { + configurable: true, + enumerable: true, + get: createParserGetter("raw") + }); + Object.defineProperty(exports2, "text", { + configurable: true, + enumerable: true, + get: createParserGetter("text") + }); + Object.defineProperty(exports2, "urlencoded", { + configurable: true, + enumerable: true, + get: createParserGetter("urlencoded") + }); + function bodyParser(options) { + var opts = Object.create(options || null, { + type: { + configurable: true, + enumerable: true, + value: void 0, + writable: true + } + }); + var _urlencoded = exports2.urlencoded(opts); + var _json = exports2.json(opts); + return function bodyParser2(req, res, next) { + _json(req, res, function(err) { + if (err) return next(err); + _urlencoded(req, res, next); + }); + }; + } + function createParserGetter(name) { + return function get() { + return loadParser(name); + }; + } + function loadParser(parserName) { + var parser = parsers[parserName]; + if (parser !== void 0) { + return parser; + } + switch (parserName) { + case "json": + parser = require_json(); + break; + case "raw": + parser = require_raw(); + break; + case "text": + parser = require_text(); + break; + case "urlencoded": + parser = require_urlencoded(); + break; + } + return parsers[parserName] = parser; + } + } +}); + +// ../../node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js +var require_object_assign = __commonJS({ + "../../node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js"(exports2, module2) { + "use strict"; + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; + function toObject(val) { + if (val === null || val === void 0) { + throw new TypeError("Object.assign cannot be called with null or undefined"); + } + return Object(val); + } + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + var test1 = new String("abc"); + test1[5] = "de"; + if (Object.getOwnPropertyNames(test1)[0] === "5") { + return false; + } + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2["_" + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function(n) { + return test2[n]; + }); + if (order2.join("") !== "0123456789") { + return false; + } + var test3 = {}; + "abcdefghijklmnopqrst".split("").forEach(function(letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") { + return false; + } + return true; + } catch (err) { + return false; + } + } + module2.exports = shouldUseNative() ? Object.assign : function(target, source) { + var from; + var to = toObject(target); + var symbols; + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + return to; + }; + } +}); + +// ../../node_modules/.pnpm/vary@1.1.2/node_modules/vary/index.js +var require_vary = __commonJS({ + "../../node_modules/.pnpm/vary@1.1.2/node_modules/vary/index.js"(exports2, module2) { + "use strict"; + module2.exports = vary; + module2.exports.append = append; + var FIELD_NAME_REGEXP = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/; + function append(header, field) { + if (typeof header !== "string") { + throw new TypeError("header argument is required"); + } + if (!field) { + throw new TypeError("field argument is required"); + } + var fields = !Array.isArray(field) ? parse2(String(field)) : field; + for (var j = 0; j < fields.length; j++) { + if (!FIELD_NAME_REGEXP.test(fields[j])) { + throw new TypeError("field argument contains an invalid header name"); + } + } + if (header === "*") { + return header; + } + var val = header; + var vals = parse2(header.toLowerCase()); + if (fields.indexOf("*") !== -1 || vals.indexOf("*") !== -1) { + return "*"; + } + for (var i = 0; i < fields.length; i++) { + var fld = fields[i].toLowerCase(); + if (vals.indexOf(fld) === -1) { + vals.push(fld); + val = val ? val + ", " + fields[i] : fields[i]; + } + } + return val; + } + function parse2(header) { + var end = 0; + var list = []; + var start = 0; + for (var i = 0, len = header.length; i < len; i++) { + switch (header.charCodeAt(i)) { + case 32: + if (start === end) { + start = end = i + 1; + } + break; + case 44: + list.push(header.substring(start, end)); + start = end = i + 1; + break; + default: + end = i + 1; + break; + } + } + list.push(header.substring(start, end)); + return list; + } + function vary(res, field) { + if (!res || !res.getHeader || !res.setHeader) { + throw new TypeError("res argument is required"); + } + var val = res.getHeader("Vary") || ""; + var header = Array.isArray(val) ? val.join(", ") : String(val); + if (val = append(header, field)) { + res.setHeader("Vary", val); + } + } + } +}); + +// ../../node_modules/.pnpm/cors@2.8.5/node_modules/cors/lib/index.js +var require_lib4 = __commonJS({ + "../../node_modules/.pnpm/cors@2.8.5/node_modules/cors/lib/index.js"(exports2, module2) { + (function() { + "use strict"; + var assign = require_object_assign(); + var vary = require_vary(); + var defaults = { + origin: "*", + methods: "GET,HEAD,PUT,PATCH,POST,DELETE", + preflightContinue: false, + optionsSuccessStatus: 204 + }; + function isString(s) { + return typeof s === "string" || s instanceof String; + } + function isOriginAllowed(origin, allowedOrigin) { + if (Array.isArray(allowedOrigin)) { + for (var i = 0; i < allowedOrigin.length; ++i) { + if (isOriginAllowed(origin, allowedOrigin[i])) { + return true; + } + } + return false; + } else if (isString(allowedOrigin)) { + return origin === allowedOrigin; + } else if (allowedOrigin instanceof RegExp) { + return allowedOrigin.test(origin); + } else { + return !!allowedOrigin; + } + } + function configureOrigin(options, req) { + var requestOrigin = req.headers.origin, headers = [], isAllowed; + if (!options.origin || options.origin === "*") { + headers.push([{ + key: "Access-Control-Allow-Origin", + value: "*" + }]); + } else if (isString(options.origin)) { + headers.push([{ + key: "Access-Control-Allow-Origin", + value: options.origin + }]); + headers.push([{ + key: "Vary", + value: "Origin" + }]); + } else { + isAllowed = isOriginAllowed(requestOrigin, options.origin); + headers.push([{ + key: "Access-Control-Allow-Origin", + value: isAllowed ? requestOrigin : false + }]); + headers.push([{ + key: "Vary", + value: "Origin" + }]); + } + return headers; + } + function configureMethods(options) { + var methods = options.methods; + if (methods.join) { + methods = options.methods.join(","); + } + return { + key: "Access-Control-Allow-Methods", + value: methods + }; + } + function configureCredentials(options) { + if (options.credentials === true) { + return { + key: "Access-Control-Allow-Credentials", + value: "true" + }; + } + return null; + } + function configureAllowedHeaders(options, req) { + var allowedHeaders = options.allowedHeaders || options.headers; + var headers = []; + if (!allowedHeaders) { + allowedHeaders = req.headers["access-control-request-headers"]; + headers.push([{ + key: "Vary", + value: "Access-Control-Request-Headers" + }]); + } else if (allowedHeaders.join) { + allowedHeaders = allowedHeaders.join(","); + } + if (allowedHeaders && allowedHeaders.length) { + headers.push([{ + key: "Access-Control-Allow-Headers", + value: allowedHeaders + }]); + } + return headers; + } + function configureExposedHeaders(options) { + var headers = options.exposedHeaders; + if (!headers) { + return null; + } else if (headers.join) { + headers = headers.join(","); + } + if (headers && headers.length) { + return { + key: "Access-Control-Expose-Headers", + value: headers + }; + } + return null; + } + function configureMaxAge(options) { + var maxAge = (typeof options.maxAge === "number" || options.maxAge) && options.maxAge.toString(); + if (maxAge && maxAge.length) { + return { + key: "Access-Control-Max-Age", + value: maxAge + }; + } + return null; + } + function applyHeaders(headers, res) { + for (var i = 0, n = headers.length; i < n; i++) { + var header = headers[i]; + if (header) { + if (Array.isArray(header)) { + applyHeaders(header, res); + } else if (header.key === "Vary" && header.value) { + vary(res, header.value); + } else if (header.value) { + res.setHeader(header.key, header.value); + } + } + } + } + function cors(options, req, res, next) { + var headers = [], method = req.method && req.method.toUpperCase && req.method.toUpperCase(); + if (method === "OPTIONS") { + headers.push(configureOrigin(options, req)); + headers.push(configureCredentials(options, req)); + headers.push(configureMethods(options, req)); + headers.push(configureAllowedHeaders(options, req)); + headers.push(configureMaxAge(options, req)); + headers.push(configureExposedHeaders(options, req)); + applyHeaders(headers, res); + if (options.preflightContinue) { + next(); + } else { + res.statusCode = options.optionsSuccessStatus; + res.setHeader("Content-Length", "0"); + res.end(); + } + } else { + headers.push(configureOrigin(options, req)); + headers.push(configureCredentials(options, req)); + headers.push(configureExposedHeaders(options, req)); + applyHeaders(headers, res); + next(); + } + } + function middlewareWrapper(o) { + var optionsCallback = null; + if (typeof o === "function") { + optionsCallback = o; + } else { + optionsCallback = function(req, cb) { + cb(null, o); + }; + } + return function corsMiddleware(req, res, next) { + optionsCallback(req, function(err, options) { + if (err) { + next(err); + } else { + var corsOptions = assign({}, defaults, options); + var originCallback = null; + if (corsOptions.origin && typeof corsOptions.origin === "function") { + originCallback = corsOptions.origin; + } else if (corsOptions.origin) { + originCallback = function(origin, cb) { + cb(null, corsOptions.origin); + }; + } + if (originCallback) { + originCallback(req.headers.origin, function(err2, origin) { + if (err2 || !origin) { + next(err2); + } else { + corsOptions.origin = origin; + cors(corsOptions, req, res, next); + } + }); + } else { + next(); + } + } + }); + }; + } + module2.exports = middlewareWrapper; + })(); + } +}); + +// ../../node_modules/.pnpm/merge-descriptors@1.0.3/node_modules/merge-descriptors/index.js +var require_merge_descriptors = __commonJS({ + "../../node_modules/.pnpm/merge-descriptors@1.0.3/node_modules/merge-descriptors/index.js"(exports2, module2) { + "use strict"; + module2.exports = merge; + var hasOwnProperty = Object.prototype.hasOwnProperty; + function merge(dest, src, redefine) { + if (!dest) { + throw new TypeError("argument dest is required"); + } + if (!src) { + throw new TypeError("argument src is required"); + } + if (redefine === void 0) { + redefine = true; + } + Object.getOwnPropertyNames(src).forEach(function forEachOwnPropertyName(name) { + if (!redefine && hasOwnProperty.call(dest, name)) { + return; + } + var descriptor = Object.getOwnPropertyDescriptor(src, name); + Object.defineProperty(dest, name, descriptor); + }); + return dest; + } + } +}); + +// ../../node_modules/.pnpm/encodeurl@2.0.0/node_modules/encodeurl/index.js +var require_encodeurl = __commonJS({ + "../../node_modules/.pnpm/encodeurl@2.0.0/node_modules/encodeurl/index.js"(exports2, module2) { + "use strict"; + module2.exports = encodeUrl; + var ENCODE_CHARS_REGEXP = /(?:[^\x21\x23-\x3B\x3D\x3F-\x5F\x61-\x7A\x7C\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g; + var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g; + var UNMATCHED_SURROGATE_PAIR_REPLACE = "$1\uFFFD$2"; + function encodeUrl(url) { + return String(url).replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE).replace(ENCODE_CHARS_REGEXP, encodeURI); + } + } +}); + +// ../../node_modules/.pnpm/escape-html@1.0.3/node_modules/escape-html/index.js +var require_escape_html = __commonJS({ + "../../node_modules/.pnpm/escape-html@1.0.3/node_modules/escape-html/index.js"(exports2, module2) { + "use strict"; + var matchHtmlRegExp = /["'&<>]/; + module2.exports = escapeHtml; + function escapeHtml(string) { + var str = "" + string; + var match = matchHtmlRegExp.exec(str); + if (!match) { + return str; + } + var escape2; + var html = ""; + var index = 0; + var lastIndex = 0; + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + escape2 = """; + break; + case 38: + escape2 = "&"; + break; + case 39: + escape2 = "'"; + break; + case 60: + escape2 = "<"; + break; + case 62: + escape2 = ">"; + break; + default: + continue; + } + if (lastIndex !== index) { + html += str.substring(lastIndex, index); + } + lastIndex = index + 1; + html += escape2; + } + return lastIndex !== index ? html + str.substring(lastIndex, index) : html; + } + } +}); + +// ../../node_modules/.pnpm/parseurl@1.3.3/node_modules/parseurl/index.js +var require_parseurl = __commonJS({ + "../../node_modules/.pnpm/parseurl@1.3.3/node_modules/parseurl/index.js"(exports2, module2) { + "use strict"; + var url = require("url"); + var parse2 = url.parse; + var Url = url.Url; + module2.exports = parseurl; + module2.exports.original = originalurl; + function parseurl(req) { + var url2 = req.url; + if (url2 === void 0) { + return void 0; + } + var parsed = req._parsedUrl; + if (fresh(url2, parsed)) { + return parsed; + } + parsed = fastparse(url2); + parsed._raw = url2; + return req._parsedUrl = parsed; + } + function originalurl(req) { + var url2 = req.originalUrl; + if (typeof url2 !== "string") { + return parseurl(req); + } + var parsed = req._parsedOriginalUrl; + if (fresh(url2, parsed)) { + return parsed; + } + parsed = fastparse(url2); + parsed._raw = url2; + return req._parsedOriginalUrl = parsed; + } + function fastparse(str) { + if (typeof str !== "string" || str.charCodeAt(0) !== 47) { + return parse2(str); + } + var pathname = str; + var query = null; + var search = null; + for (var i = 1; i < str.length; i++) { + switch (str.charCodeAt(i)) { + case 63: + if (search === null) { + pathname = str.substring(0, i); + query = str.substring(i + 1); + search = str.substring(i); + } + break; + case 9: + /* \t */ + case 10: + /* \n */ + case 12: + /* \f */ + case 13: + /* \r */ + case 32: + /* */ + case 35: + /* # */ + case 160: + case 65279: + return parse2(str); + } + } + var url2 = Url !== void 0 ? new Url() : {}; + url2.path = str; + url2.href = str; + url2.pathname = pathname; + if (search !== null) { + url2.query = query; + url2.search = search; + } + return url2; + } + function fresh(url2, parsedUrl) { + return typeof parsedUrl === "object" && parsedUrl !== null && (Url === void 0 || parsedUrl instanceof Url) && parsedUrl._raw === url2; + } + } +}); + +// ../../node_modules/.pnpm/finalhandler@1.3.2/node_modules/finalhandler/index.js +var require_finalhandler = __commonJS({ + "../../node_modules/.pnpm/finalhandler@1.3.2/node_modules/finalhandler/index.js"(exports2, module2) { + "use strict"; + var debug = require_src()("finalhandler"); + var encodeUrl = require_encodeurl(); + var escapeHtml = require_escape_html(); + var onFinished = require_on_finished(); + var parseUrl = require_parseurl(); + var statuses = require_statuses(); + var unpipe = require_unpipe(); + var DOUBLE_SPACE_REGEXP = /\x20{2}/g; + var NEWLINE_REGEXP = /\n/g; + var defer = typeof setImmediate === "function" ? setImmediate : function(fn) { + process.nextTick(fn.bind.apply(fn, arguments)); + }; + var isFinished = onFinished.isFinished; + function createHtmlDocument(message) { + var body = escapeHtml(message).replace(NEWLINE_REGEXP, "
").replace(DOUBLE_SPACE_REGEXP, "  "); + return '\n\n\n\nError\n\n\n
' + body + "
\n\n\n"; + } + module2.exports = finalhandler; + function finalhandler(req, res, options) { + var opts = options || {}; + var env3 = opts.env || process.env.NODE_ENV || "development"; + var onerror = opts.onerror; + return function(err) { + var headers; + var msg; + var status; + if (!err && headersSent(res)) { + debug("cannot 404 after headers sent"); + return; + } + if (err) { + status = getErrorStatusCode(err); + if (status === void 0) { + status = getResponseStatusCode(res); + } else { + headers = getErrorHeaders(err); + } + msg = getErrorMessage(err, status, env3); + } else { + status = 404; + msg = "Cannot " + req.method + " " + encodeUrl(getResourceName(req)); + } + debug("default %s", status); + if (err && onerror) { + defer(onerror, err, req, res); + } + if (headersSent(res)) { + debug("cannot %d after headers sent", status); + if (req.socket) { + req.socket.destroy(); + } + return; + } + send(req, res, status, headers, msg); + }; + } + function getErrorHeaders(err) { + if (!err.headers || typeof err.headers !== "object") { + return void 0; + } + var headers = /* @__PURE__ */ Object.create(null); + var keys = Object.keys(err.headers); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + headers[key] = err.headers[key]; + } + return headers; + } + function getErrorMessage(err, status, env3) { + var msg; + if (env3 !== "production") { + msg = err.stack; + if (!msg && typeof err.toString === "function") { + msg = err.toString(); + } + } + return msg || statuses.message[status]; + } + function getErrorStatusCode(err) { + if (typeof err.status === "number" && err.status >= 400 && err.status < 600) { + return err.status; + } + if (typeof err.statusCode === "number" && err.statusCode >= 400 && err.statusCode < 600) { + return err.statusCode; + } + return void 0; + } + function getResourceName(req) { + try { + return parseUrl.original(req).pathname; + } catch (e) { + return "resource"; + } + } + function getResponseStatusCode(res) { + var status = res.statusCode; + if (typeof status !== "number" || status < 400 || status > 599) { + status = 500; + } + return status; + } + function headersSent(res) { + return typeof res.headersSent !== "boolean" ? Boolean(res._header) : res.headersSent; + } + function send(req, res, status, headers, message) { + function write() { + var body = createHtmlDocument(message); + res.statusCode = status; + if (req.httpVersionMajor < 2) { + res.statusMessage = statuses.message[status]; + } + res.removeHeader("Content-Encoding"); + res.removeHeader("Content-Language"); + res.removeHeader("Content-Range"); + setHeaders(res, headers); + res.setHeader("Content-Security-Policy", "default-src 'none'"); + res.setHeader("X-Content-Type-Options", "nosniff"); + res.setHeader("Content-Type", "text/html; charset=utf-8"); + res.setHeader("Content-Length", Buffer.byteLength(body, "utf8")); + if (req.method === "HEAD") { + res.end(); + return; + } + res.end(body, "utf8"); + } + if (isFinished(req)) { + write(); + return; + } + unpipe(req); + onFinished(req, write); + req.resume(); + } + function setHeaders(res, headers) { + if (!headers) { + return; + } + var keys = Object.keys(headers); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + res.setHeader(key, headers[key]); + } + } + } +}); + +// ../../node_modules/.pnpm/array-flatten@1.1.1/node_modules/array-flatten/array-flatten.js +var require_array_flatten = __commonJS({ + "../../node_modules/.pnpm/array-flatten@1.1.1/node_modules/array-flatten/array-flatten.js"(exports2, module2) { + "use strict"; + module2.exports = arrayFlatten; + function flattenWithDepth(array, result, depth) { + for (var i = 0; i < array.length; i++) { + var value = array[i]; + if (depth > 0 && Array.isArray(value)) { + flattenWithDepth(value, result, depth - 1); + } else { + result.push(value); + } + } + return result; + } + function flattenForever(array, result) { + for (var i = 0; i < array.length; i++) { + var value = array[i]; + if (Array.isArray(value)) { + flattenForever(value, result); + } else { + result.push(value); + } + } + return result; + } + function arrayFlatten(array, depth) { + if (depth == null) { + return flattenForever(array, []); + } + return flattenWithDepth(array, [], depth); + } + } +}); + +// ../../node_modules/.pnpm/path-to-regexp@0.1.13/node_modules/path-to-regexp/index.js +var require_path_to_regexp2 = __commonJS({ + "../../node_modules/.pnpm/path-to-regexp@0.1.13/node_modules/path-to-regexp/index.js"(exports2, module2) { + module2.exports = pathToRegexp; + var MATCHING_GROUP_REGEXP = /\\.|\((?:\?<(.*?)>)?(?!\?)/g; + function pathToRegexp(path, keys, options) { + options = options || {}; + keys = keys || []; + var strict = options.strict; + var end = options.end !== false; + var flags = options.sensitive ? "" : "i"; + var lookahead = options.lookahead !== false; + var extraOffset = 0; + var keysOffset = keys.length; + var i = 0; + var name = 0; + var pos = 0; + var backtrack = ""; + var m; + if (path instanceof RegExp) { + while (m = MATCHING_GROUP_REGEXP.exec(path.source)) { + if (m[0][0] === "\\") continue; + keys.push({ + name: m[1] || name++, + optional: false, + offset: m.index + }); + } + return path; + } + if (Array.isArray(path)) { + path = path.map(function(value) { + return pathToRegexp(value, keys, options).source; + }); + return new RegExp(path.join("|"), flags); + } + if (typeof path !== "string") { + throw new TypeError("path must be a string, array of strings, or regular expression"); + } + path = path.replace( + /\\.|(\/)?(\.)?:(\w+)(\(.*?\))?(\*)?(\?)?|[.*]|\/\(/g, + function(match, slash, format, key, capture, star, optional, offset) { + if (match[0] === "\\") { + backtrack += match; + pos += 2; + return match; + } + if (match === ".") { + backtrack += "\\."; + extraOffset += 1; + pos += 1; + return "\\."; + } + if (slash || format) { + backtrack = ""; + } else { + backtrack += path.slice(pos, offset); + } + pos = offset + match.length; + if (match === "*") { + backtrack = ""; + extraOffset += 3; + return "(.*)"; + } + if (match === "/(") { + backtrack += "/"; + extraOffset += 2; + return "/(?:"; + } + slash = slash || ""; + format = format ? "\\." : ""; + optional = optional || ""; + capture = capture ? capture.replace(/\\.|\*/, function(m2) { + return m2 === "*" ? "(.*)" : m2; + }) : backtrack ? "((?:(?!/|" + backtrack + ").)+?)" : "([^/" + format + "]+?)"; + keys.push({ + name: key, + optional: !!optional, + offset: offset + extraOffset + }); + var result = "(?:" + format + slash + capture + (star ? "((?:[/" + format + "].+?)?)" : "") + ")" + optional; + backtrack = ""; + extraOffset += result.length - match.length; + return result; + } + ); + while (m = MATCHING_GROUP_REGEXP.exec(path)) { + if (m[0][0] === "\\") continue; + if (keysOffset + i === keys.length || keys[keysOffset + i].offset > m.index) { + keys.splice(keysOffset + i, 0, { + name: name++, + // Unnamed matching groups must be consistently linear. + optional: false, + offset: m.index + }); + } + i++; + } + path += strict ? "" : path[path.length - 1] === "/" ? "?" : "/?"; + if (end) { + path += "$"; + } else if (path[path.length - 1] !== "/") { + path += lookahead ? "(?=/|$)" : "(?:/|$)"; + } + return new RegExp("^" + path, flags); + } + } +}); + +// ../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/router/layer.js +var require_layer = __commonJS({ + "../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/router/layer.js"(exports2, module2) { + "use strict"; + var pathRegexp = require_path_to_regexp2(); + var debug = require_src()("express:router:layer"); + var hasOwnProperty = Object.prototype.hasOwnProperty; + module2.exports = Layer; + function Layer(path, options, fn) { + if (!(this instanceof Layer)) { + return new Layer(path, options, fn); + } + debug("new %o", path); + var opts = options || {}; + this.handle = fn; + this.name = fn.name || ""; + this.params = void 0; + this.path = void 0; + this.regexp = pathRegexp(path, this.keys = [], opts); + this.regexp.fast_star = path === "*"; + this.regexp.fast_slash = path === "/" && opts.end === false; + } + Layer.prototype.handle_error = function handle_error(error, req, res, next) { + var fn = this.handle; + if (fn.length !== 4) { + return next(error); + } + try { + fn(error, req, res, next); + } catch (err) { + next(err); + } + }; + Layer.prototype.handle_request = function handle(req, res, next) { + var fn = this.handle; + if (fn.length > 3) { + return next(); + } + try { + fn(req, res, next); + } catch (err) { + next(err); + } + }; + Layer.prototype.match = function match(path) { + var match2; + if (path != null) { + if (this.regexp.fast_slash) { + this.params = {}; + this.path = ""; + return true; + } + if (this.regexp.fast_star) { + this.params = { "0": decode_param(path) }; + this.path = path; + return true; + } + match2 = this.regexp.exec(path); + } + if (!match2) { + this.params = void 0; + this.path = void 0; + return false; + } + this.params = {}; + this.path = match2[0]; + var keys = this.keys; + var params = this.params; + for (var i = 1; i < match2.length; i++) { + var key = keys[i - 1]; + var prop = key.name; + var val = decode_param(match2[i]); + if (val !== void 0 || !hasOwnProperty.call(params, prop)) { + params[prop] = val; + } + } + return true; + }; + function decode_param(val) { + if (typeof val !== "string" || val.length === 0) { + return val; + } + try { + return decodeURIComponent(val); + } catch (err) { + if (err instanceof URIError) { + err.message = "Failed to decode param '" + val + "'"; + err.status = err.statusCode = 400; + } + throw err; + } + } + } +}); + +// ../../node_modules/.pnpm/methods@1.1.2/node_modules/methods/index.js +var require_methods = __commonJS({ + "../../node_modules/.pnpm/methods@1.1.2/node_modules/methods/index.js"(exports2, module2) { + "use strict"; + var http = require("http"); + module2.exports = getCurrentNodeMethods() || getBasicNodeMethods(); + function getCurrentNodeMethods() { + return http.METHODS && http.METHODS.map(function lowerCaseMethod(method) { + return method.toLowerCase(); + }); + } + function getBasicNodeMethods() { + return [ + "get", + "post", + "put", + "head", + "delete", + "options", + "trace", + "copy", + "lock", + "mkcol", + "move", + "purge", + "propfind", + "proppatch", + "unlock", + "report", + "mkactivity", + "checkout", + "merge", + "m-search", + "notify", + "subscribe", + "unsubscribe", + "patch", + "search", + "connect" + ]; + } + } +}); + +// ../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/router/route.js +var require_route = __commonJS({ + "../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/router/route.js"(exports2, module2) { + "use strict"; + var debug = require_src()("express:router:route"); + var flatten = require_array_flatten(); + var Layer = require_layer(); + var methods = require_methods(); + var slice = Array.prototype.slice; + var toString2 = Object.prototype.toString; + module2.exports = Route; + function Route(path) { + this.path = path; + this.stack = []; + debug("new %o", path); + this.methods = {}; + } + Route.prototype._handles_method = function _handles_method(method) { + if (this.methods._all) { + return true; + } + var name = typeof method === "string" ? method.toLowerCase() : method; + if (name === "head" && !this.methods["head"]) { + name = "get"; + } + return Boolean(this.methods[name]); + }; + Route.prototype._options = function _options() { + var methods2 = Object.keys(this.methods); + if (this.methods.get && !this.methods.head) { + methods2.push("head"); + } + for (var i = 0; i < methods2.length; i++) { + methods2[i] = methods2[i].toUpperCase(); + } + return methods2; + }; + Route.prototype.dispatch = function dispatch(req, res, done) { + var idx = 0; + var stack = this.stack; + var sync = 0; + if (stack.length === 0) { + return done(); + } + var method = typeof req.method === "string" ? req.method.toLowerCase() : req.method; + if (method === "head" && !this.methods["head"]) { + method = "get"; + } + req.route = this; + next(); + function next(err) { + if (err && err === "route") { + return done(); + } + if (err && err === "router") { + return done(err); + } + if (++sync > 100) { + return setImmediate(next, err); + } + var layer = stack[idx++]; + if (!layer) { + return done(err); + } + if (layer.method && layer.method !== method) { + next(err); + } else if (err) { + layer.handle_error(err, req, res, next); + } else { + layer.handle_request(req, res, next); + } + sync = 0; + } + }; + Route.prototype.all = function all() { + var handles = flatten(slice.call(arguments)); + for (var i = 0; i < handles.length; i++) { + var handle = handles[i]; + if (typeof handle !== "function") { + var type = toString2.call(handle); + var msg = "Route.all() requires a callback function but got a " + type; + throw new TypeError(msg); + } + var layer = Layer("/", {}, handle); + layer.method = void 0; + this.methods._all = true; + this.stack.push(layer); + } + return this; + }; + methods.forEach(function(method) { + Route.prototype[method] = function() { + var handles = flatten(slice.call(arguments)); + for (var i = 0; i < handles.length; i++) { + var handle = handles[i]; + if (typeof handle !== "function") { + var type = toString2.call(handle); + var msg = "Route." + method + "() requires a callback function but got a " + type; + throw new Error(msg); + } + debug("%s %o", method, this.path); + var layer = Layer("/", {}, handle); + layer.method = method; + this.methods[method] = true; + this.stack.push(layer); + } + return this; + }; + }); + } +}); + +// ../../node_modules/.pnpm/utils-merge@1.0.1/node_modules/utils-merge/index.js +var require_utils_merge = __commonJS({ + "../../node_modules/.pnpm/utils-merge@1.0.1/node_modules/utils-merge/index.js"(exports2, module2) { + exports2 = module2.exports = function(a, b) { + if (a && b) { + for (var key in b) { + a[key] = b[key]; + } + } + return a; + }; + } +}); + +// ../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/router/index.js +var require_router = __commonJS({ + "../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/router/index.js"(exports2, module2) { + "use strict"; + var Route = require_route(); + var Layer = require_layer(); + var methods = require_methods(); + var mixin = require_utils_merge(); + var debug = require_src()("express:router"); + var deprecate = require_depd()("express"); + var flatten = require_array_flatten(); + var parseUrl = require_parseurl(); + var setPrototypeOf = require_setprototypeof(); + var objectRegExp = /^\[object (\S+)\]$/; + var slice = Array.prototype.slice; + var toString2 = Object.prototype.toString; + var proto = module2.exports = function(options) { + var opts = options || {}; + function router(req, res, next) { + router.handle(req, res, next); + } + setPrototypeOf(router, proto); + router.params = {}; + router._params = []; + router.caseSensitive = opts.caseSensitive; + router.mergeParams = opts.mergeParams; + router.strict = opts.strict; + router.stack = []; + return router; + }; + proto.param = function param(name, fn) { + if (typeof name === "function") { + deprecate("router.param(fn): Refactor to use path params"); + this._params.push(name); + return; + } + var params = this._params; + var len = params.length; + var ret2; + if (name[0] === ":") { + deprecate("router.param(" + JSON.stringify(name) + ", fn): Use router.param(" + JSON.stringify(name.slice(1)) + ", fn) instead"); + name = name.slice(1); + } + for (var i = 0; i < len; ++i) { + if (ret2 = params[i](name, fn)) { + fn = ret2; + } + } + if ("function" !== typeof fn) { + throw new Error("invalid param() call for " + name + ", got " + fn); + } + (this.params[name] = this.params[name] || []).push(fn); + return this; + }; + proto.handle = function handle(req, res, out) { + var self2 = this; + debug("dispatching %s %s", req.method, req.url); + var idx = 0; + var protohost = getProtohost(req.url) || ""; + var removed = ""; + var slashAdded = false; + var sync = 0; + var paramcalled = {}; + var options = []; + var stack = self2.stack; + var parentParams = req.params; + var parentUrl = req.baseUrl || ""; + var done = restore(out, req, "baseUrl", "next", "params"); + req.next = next; + if (req.method === "OPTIONS") { + done = wrap(done, function(old, err) { + if (err || options.length === 0) return old(err); + sendOptionsResponse(res, options, old); + }); + } + req.baseUrl = parentUrl; + req.originalUrl = req.originalUrl || req.url; + next(); + function next(err) { + var layerError = err === "route" ? null : err; + if (slashAdded) { + req.url = req.url.slice(1); + slashAdded = false; + } + if (removed.length !== 0) { + req.baseUrl = parentUrl; + req.url = protohost + removed + req.url.slice(protohost.length); + removed = ""; + } + if (layerError === "router") { + setImmediate(done, null); + return; + } + if (idx >= stack.length) { + setImmediate(done, layerError); + return; + } + if (++sync > 100) { + return setImmediate(next, err); + } + var path = getPathname(req); + if (path == null) { + return done(layerError); + } + var layer; + var match; + var route; + while (match !== true && idx < stack.length) { + layer = stack[idx++]; + match = matchLayer(layer, path); + route = layer.route; + if (typeof match !== "boolean") { + layerError = layerError || match; + } + if (match !== true) { + continue; + } + if (!route) { + continue; + } + if (layerError) { + match = false; + continue; + } + var method = req.method; + var has_method = route._handles_method(method); + if (!has_method && method === "OPTIONS") { + appendMethods(options, route._options()); + } + if (!has_method && method !== "HEAD") { + match = false; + } + } + if (match !== true) { + return done(layerError); + } + if (route) { + req.route = route; + } + req.params = self2.mergeParams ? mergeParams(layer.params, parentParams) : layer.params; + var layerPath = layer.path; + self2.process_params(layer, paramcalled, req, res, function(err2) { + if (err2) { + next(layerError || err2); + } else if (route) { + layer.handle_request(req, res, next); + } else { + trim_prefix(layer, layerError, layerPath, path); + } + sync = 0; + }); + } + function trim_prefix(layer, layerError, layerPath, path) { + if (layerPath.length !== 0) { + if (layerPath !== path.slice(0, layerPath.length)) { + next(layerError); + return; + } + var c = path[layerPath.length]; + if (c && c !== "/" && c !== ".") return next(layerError); + debug("trim prefix (%s) from url %s", layerPath, req.url); + removed = layerPath; + req.url = protohost + req.url.slice(protohost.length + removed.length); + if (!protohost && req.url[0] !== "/") { + req.url = "/" + req.url; + slashAdded = true; + } + req.baseUrl = parentUrl + (removed[removed.length - 1] === "/" ? removed.substring(0, removed.length - 1) : removed); + } + debug("%s %s : %s", layer.name, layerPath, req.originalUrl); + if (layerError) { + layer.handle_error(layerError, req, res, next); + } else { + layer.handle_request(req, res, next); + } + } + }; + proto.process_params = function process_params(layer, called, req, res, done) { + var params = this.params; + var keys = layer.keys; + if (!keys || keys.length === 0) { + return done(); + } + var i = 0; + var name; + var paramIndex = 0; + var key; + var paramVal; + var paramCallbacks; + var paramCalled; + function param(err) { + if (err) { + return done(err); + } + if (i >= keys.length) { + return done(); + } + paramIndex = 0; + key = keys[i++]; + name = key.name; + paramVal = req.params[name]; + paramCallbacks = params[name]; + paramCalled = called[name]; + if (paramVal === void 0 || !paramCallbacks) { + return param(); + } + if (paramCalled && (paramCalled.match === paramVal || paramCalled.error && paramCalled.error !== "route")) { + req.params[name] = paramCalled.value; + return param(paramCalled.error); + } + called[name] = paramCalled = { + error: null, + match: paramVal, + value: paramVal + }; + paramCallback(); + } + function paramCallback(err) { + var fn = paramCallbacks[paramIndex++]; + paramCalled.value = req.params[key.name]; + if (err) { + paramCalled.error = err; + param(err); + return; + } + if (!fn) return param(); + try { + fn(req, res, paramCallback, paramVal, key.name); + } catch (e) { + paramCallback(e); + } + } + param(); + }; + proto.use = function use(fn) { + var offset = 0; + var path = "/"; + if (typeof fn !== "function") { + var arg = fn; + while (Array.isArray(arg) && arg.length !== 0) { + arg = arg[0]; + } + if (typeof arg !== "function") { + offset = 1; + path = fn; + } + } + var callbacks = flatten(slice.call(arguments, offset)); + if (callbacks.length === 0) { + throw new TypeError("Router.use() requires a middleware function"); + } + for (var i = 0; i < callbacks.length; i++) { + var fn = callbacks[i]; + if (typeof fn !== "function") { + throw new TypeError("Router.use() requires a middleware function but got a " + gettype(fn)); + } + debug("use %o %s", path, fn.name || ""); + var layer = new Layer(path, { + sensitive: this.caseSensitive, + strict: false, + end: false + }, fn); + layer.route = void 0; + this.stack.push(layer); + } + return this; + }; + proto.route = function route(path) { + var route2 = new Route(path); + var layer = new Layer(path, { + sensitive: this.caseSensitive, + strict: this.strict, + end: true + }, route2.dispatch.bind(route2)); + layer.route = route2; + this.stack.push(layer); + return route2; + }; + methods.concat("all").forEach(function(method) { + proto[method] = function(path) { + var route = this.route(path); + route[method].apply(route, slice.call(arguments, 1)); + return this; + }; + }); + function appendMethods(list, addition) { + for (var i = 0; i < addition.length; i++) { + var method = addition[i]; + if (list.indexOf(method) === -1) { + list.push(method); + } + } + } + function getPathname(req) { + try { + return parseUrl(req).pathname; + } catch (err) { + return void 0; + } + } + function getProtohost(url) { + if (typeof url !== "string" || url.length === 0 || url[0] === "/") { + return void 0; + } + var searchIndex = url.indexOf("?"); + var pathLength = searchIndex !== -1 ? searchIndex : url.length; + var fqdnIndex = url.slice(0, pathLength).indexOf("://"); + return fqdnIndex !== -1 ? url.substring(0, url.indexOf("/", 3 + fqdnIndex)) : void 0; + } + function gettype(obj2) { + var type = typeof obj2; + if (type !== "object") { + return type; + } + return toString2.call(obj2).replace(objectRegExp, "$1"); + } + function matchLayer(layer, path) { + try { + return layer.match(path); + } catch (err) { + return err; + } + } + function mergeParams(params, parent) { + if (typeof parent !== "object" || !parent) { + return params; + } + var obj2 = mixin({}, parent); + if (!(0 in params) || !(0 in parent)) { + return mixin(obj2, params); + } + var i = 0; + var o = 0; + while (i in params) { + i++; + } + while (o in parent) { + o++; + } + for (i--; i >= 0; i--) { + params[i + o] = params[i]; + if (i < o) { + delete params[i]; + } + } + return mixin(obj2, params); + } + function restore(fn, obj2) { + var props = new Array(arguments.length - 2); + var vals = new Array(arguments.length - 2); + for (var i = 0; i < props.length; i++) { + props[i] = arguments[i + 2]; + vals[i] = obj2[props[i]]; + } + return function() { + for (var i2 = 0; i2 < props.length; i2++) { + obj2[props[i2]] = vals[i2]; + } + return fn.apply(this, arguments); + }; + } + function sendOptionsResponse(res, options, next) { + try { + var body = options.join(","); + res.set("Allow", body); + res.send(body); + } catch (err) { + next(err); + } + } + function wrap(old, fn) { + return function proxy() { + var args = new Array(arguments.length + 1); + args[0] = old; + for (var i = 0, len = arguments.length; i < len; i++) { + args[i + 1] = arguments[i]; + } + fn.apply(this, args); + }; + } + } +}); + +// ../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/middleware/init.js +var require_init = __commonJS({ + "../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/middleware/init.js"(exports2) { + "use strict"; + var setPrototypeOf = require_setprototypeof(); + exports2.init = function(app) { + return function expressInit(req, res, next) { + if (app.enabled("x-powered-by")) res.setHeader("X-Powered-By", "Express"); + req.res = res; + res.req = req; + req.next = next; + setPrototypeOf(req, app.request); + setPrototypeOf(res, app.response); + res.locals = res.locals || /* @__PURE__ */ Object.create(null); + next(); + }; + }; + } +}); + +// ../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/middleware/query.js +var require_query = __commonJS({ + "../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/middleware/query.js"(exports2, module2) { + "use strict"; + var merge = require_utils_merge(); + var parseUrl = require_parseurl(); + var qs = require_lib3(); + module2.exports = function query(options) { + var opts = merge({}, options); + var queryparse = qs.parse; + if (typeof options === "function") { + queryparse = options; + opts = void 0; + } + if (opts !== void 0 && opts.allowPrototypes === void 0) { + opts.allowPrototypes = true; + } + return function query2(req, res, next) { + if (!req.query) { + var val = parseUrl(req).query; + req.query = queryparse(val, opts); + } + next(); + }; + }; + } +}); + +// ../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/view.js +var require_view = __commonJS({ + "../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/view.js"(exports2, module2) { + "use strict"; + var debug = require_src()("express:view"); + var path = require("path"); + var fs = require("fs"); + var dirname = path.dirname; + var basename = path.basename; + var extname = path.extname; + var join = path.join; + var resolve = path.resolve; + module2.exports = View; + function View(name, options) { + var opts = options || {}; + this.defaultEngine = opts.defaultEngine; + this.ext = extname(name); + this.name = name; + this.root = opts.root; + if (!this.ext && !this.defaultEngine) { + throw new Error("No default engine was specified and no extension was provided."); + } + var fileName = name; + if (!this.ext) { + this.ext = this.defaultEngine[0] !== "." ? "." + this.defaultEngine : this.defaultEngine; + fileName += this.ext; + } + if (!opts.engines[this.ext]) { + var mod = this.ext.slice(1); + debug('require "%s"', mod); + var fn = require(mod).__express; + if (typeof fn !== "function") { + throw new Error('Module "' + mod + '" does not provide a view engine.'); + } + opts.engines[this.ext] = fn; + } + this.engine = opts.engines[this.ext]; + this.path = this.lookup(fileName); + } + View.prototype.lookup = function lookup(name) { + var path2; + var roots = [].concat(this.root); + debug('lookup "%s"', name); + for (var i = 0; i < roots.length && !path2; i++) { + var root = roots[i]; + var loc = resolve(root, name); + var dir = dirname(loc); + var file2 = basename(loc); + path2 = this.resolve(dir, file2); + } + return path2; + }; + View.prototype.render = function render(options, callback) { + debug('render "%s"', this.path); + this.engine(this.path, options, callback); + }; + View.prototype.resolve = function resolve2(dir, file2) { + var ext = this.ext; + var path2 = join(dir, file2); + var stat = tryStat(path2); + if (stat && stat.isFile()) { + return path2; + } + path2 = join(dir, basename(file2, ext), "index" + ext); + stat = tryStat(path2); + if (stat && stat.isFile()) { + return path2; + } + }; + function tryStat(path2) { + debug('stat "%s"', path2); + try { + return fs.statSync(path2); + } catch (e) { + return void 0; + } + } + } +}); + +// ../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js +var require_safe_buffer = __commonJS({ + "../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js"(exports2, module2) { + var buffer = require("buffer"); + var Buffer2 = buffer.Buffer; + function copyProps(src, dst) { + for (var key in src) { + dst[key] = src[key]; + } + } + if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) { + module2.exports = buffer; + } else { + copyProps(buffer, exports2); + exports2.Buffer = SafeBuffer; + } + function SafeBuffer(arg, encodingOrOffset, length) { + return Buffer2(arg, encodingOrOffset, length); + } + SafeBuffer.prototype = Object.create(Buffer2.prototype); + copyProps(Buffer2, SafeBuffer); + SafeBuffer.from = function(arg, encodingOrOffset, length) { + if (typeof arg === "number") { + throw new TypeError("Argument must not be a number"); + } + return Buffer2(arg, encodingOrOffset, length); + }; + SafeBuffer.alloc = function(size, fill, encoding) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + var buf = Buffer2(size); + if (fill !== void 0) { + if (typeof encoding === "string") { + buf.fill(fill, encoding); + } else { + buf.fill(fill); + } + } else { + buf.fill(0); + } + return buf; + }; + SafeBuffer.allocUnsafe = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return Buffer2(size); + }; + SafeBuffer.allocUnsafeSlow = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return buffer.SlowBuffer(size); + }; + } +}); + +// ../../node_modules/.pnpm/content-disposition@0.5.4/node_modules/content-disposition/index.js +var require_content_disposition = __commonJS({ + "../../node_modules/.pnpm/content-disposition@0.5.4/node_modules/content-disposition/index.js"(exports2, module2) { + "use strict"; + module2.exports = contentDisposition; + module2.exports.parse = parse2; + var basename = require("path").basename; + var Buffer2 = require_safe_buffer().Buffer; + var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g; + var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/; + var HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g; + var NON_LATIN1_REGEXP = /[^\x20-\x7e\xa0-\xff]/g; + var QESC_REGEXP = /\\([\u0000-\u007f])/g; + var QUOTE_REGEXP = /([\\"])/g; + var PARAM_REGEXP = /;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g; + var TEXT_REGEXP = /^[\x20-\x7e\x80-\xff]+$/; + var TOKEN_REGEXP = /^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/; + var EXT_VALUE_REGEXP = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/; + var DISPOSITION_TYPE_REGEXP = /^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/; + function contentDisposition(filename, options) { + var opts = options || {}; + var type = opts.type || "attachment"; + var params = createparams(filename, opts.fallback); + return format(new ContentDisposition(type, params)); + } + function createparams(filename, fallback) { + if (filename === void 0) { + return; + } + var params = {}; + if (typeof filename !== "string") { + throw new TypeError("filename must be a string"); + } + if (fallback === void 0) { + fallback = true; + } + if (typeof fallback !== "string" && typeof fallback !== "boolean") { + throw new TypeError("fallback must be a string or boolean"); + } + if (typeof fallback === "string" && NON_LATIN1_REGEXP.test(fallback)) { + throw new TypeError("fallback must be ISO-8859-1 string"); + } + var name = basename(filename); + var isQuotedString = TEXT_REGEXP.test(name); + var fallbackName = typeof fallback !== "string" ? fallback && getlatin1(name) : basename(fallback); + var hasFallback = typeof fallbackName === "string" && fallbackName !== name; + if (hasFallback || !isQuotedString || HEX_ESCAPE_REGEXP.test(name)) { + params["filename*"] = name; + } + if (isQuotedString || hasFallback) { + params.filename = hasFallback ? fallbackName : name; + } + return params; + } + function format(obj2) { + var parameters = obj2.parameters; + var type = obj2.type; + if (!type || typeof type !== "string" || !TOKEN_REGEXP.test(type)) { + throw new TypeError("invalid type"); + } + var string = String(type).toLowerCase(); + if (parameters && typeof parameters === "object") { + var param; + var params = Object.keys(parameters).sort(); + for (var i = 0; i < params.length; i++) { + param = params[i]; + var val = param.substr(-1) === "*" ? ustring(parameters[param]) : qstring(parameters[param]); + string += "; " + param + "=" + val; + } + } + return string; + } + function decodefield(str) { + var match = EXT_VALUE_REGEXP.exec(str); + if (!match) { + throw new TypeError("invalid extended field value"); + } + var charset = match[1].toLowerCase(); + var encoded = match[2]; + var value; + var binary = encoded.replace(HEX_ESCAPE_REPLACE_REGEXP, pdecode); + switch (charset) { + case "iso-8859-1": + value = getlatin1(binary); + break; + case "utf-8": + value = Buffer2.from(binary, "binary").toString("utf8"); + break; + default: + throw new TypeError("unsupported charset in extended field"); + } + return value; + } + function getlatin1(val) { + return String(val).replace(NON_LATIN1_REGEXP, "?"); + } + function parse2(string) { + if (!string || typeof string !== "string") { + throw new TypeError("argument string is required"); + } + var match = DISPOSITION_TYPE_REGEXP.exec(string); + if (!match) { + throw new TypeError("invalid type format"); + } + var index = match[0].length; + var type = match[1].toLowerCase(); + var key; + var names = []; + var params = {}; + var value; + index = PARAM_REGEXP.lastIndex = match[0].substr(-1) === ";" ? index - 1 : index; + while (match = PARAM_REGEXP.exec(string)) { + if (match.index !== index) { + throw new TypeError("invalid parameter format"); + } + index += match[0].length; + key = match[1].toLowerCase(); + value = match[2]; + if (names.indexOf(key) !== -1) { + throw new TypeError("invalid duplicate parameter"); + } + names.push(key); + if (key.indexOf("*") + 1 === key.length) { + key = key.slice(0, -1); + value = decodefield(value); + params[key] = value; + continue; + } + if (typeof params[key] === "string") { + continue; + } + if (value[0] === '"') { + value = value.substr(1, value.length - 2).replace(QESC_REGEXP, "$1"); + } + params[key] = value; + } + if (index !== -1 && index !== string.length) { + throw new TypeError("invalid parameter format"); + } + return new ContentDisposition(type, params); + } + function pdecode(str, hex) { + return String.fromCharCode(parseInt(hex, 16)); + } + function pencode(char) { + return "%" + String(char).charCodeAt(0).toString(16).toUpperCase(); + } + function qstring(val) { + var str = String(val); + return '"' + str.replace(QUOTE_REGEXP, "\\$1") + '"'; + } + function ustring(val) { + var str = String(val); + var encoded = encodeURIComponent(str).replace(ENCODE_URL_ATTR_CHAR_REGEXP, pencode); + return "UTF-8''" + encoded; + } + function ContentDisposition(type, parameters) { + this.type = type; + this.parameters = parameters; + } + } +}); + +// ../../node_modules/.pnpm/etag@1.8.1/node_modules/etag/index.js +var require_etag = __commonJS({ + "../../node_modules/.pnpm/etag@1.8.1/node_modules/etag/index.js"(exports2, module2) { + "use strict"; + module2.exports = etag; + var crypto5 = require("crypto"); + var Stats = require("fs").Stats; + var toString2 = Object.prototype.toString; + function entitytag(entity) { + if (entity.length === 0) { + return '"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"'; + } + var hash = crypto5.createHash("sha1").update(entity, "utf8").digest("base64").substring(0, 27); + var len = typeof entity === "string" ? Buffer.byteLength(entity, "utf8") : entity.length; + return '"' + len.toString(16) + "-" + hash + '"'; + } + function etag(entity, options) { + if (entity == null) { + throw new TypeError("argument entity is required"); + } + var isStats = isstats(entity); + var weak = options && typeof options.weak === "boolean" ? options.weak : isStats; + if (!isStats && typeof entity !== "string" && !Buffer.isBuffer(entity)) { + throw new TypeError("argument entity must be string, Buffer, or fs.Stats"); + } + var tag = isStats ? stattag(entity) : entitytag(entity); + return weak ? "W/" + tag : tag; + } + function isstats(obj2) { + if (typeof Stats === "function" && obj2 instanceof Stats) { + return true; + } + return obj2 && typeof obj2 === "object" && "ctime" in obj2 && toString2.call(obj2.ctime) === "[object Date]" && "mtime" in obj2 && toString2.call(obj2.mtime) === "[object Date]" && "ino" in obj2 && typeof obj2.ino === "number" && "size" in obj2 && typeof obj2.size === "number"; + } + function stattag(stat) { + var mtime = stat.mtime.getTime().toString(16); + var size = stat.size.toString(16); + return '"' + size + "-" + mtime + '"'; + } + } +}); + +// ../../node_modules/.pnpm/fresh@0.5.2/node_modules/fresh/index.js +var require_fresh = __commonJS({ + "../../node_modules/.pnpm/fresh@0.5.2/node_modules/fresh/index.js"(exports2, module2) { + "use strict"; + var CACHE_CONTROL_NO_CACHE_REGEXP = /(?:^|,)\s*?no-cache\s*?(?:,|$)/; + module2.exports = fresh; + function fresh(reqHeaders, resHeaders) { + var modifiedSince = reqHeaders["if-modified-since"]; + var noneMatch = reqHeaders["if-none-match"]; + if (!modifiedSince && !noneMatch) { + return false; + } + var cacheControl = reqHeaders["cache-control"]; + if (cacheControl && CACHE_CONTROL_NO_CACHE_REGEXP.test(cacheControl)) { + return false; + } + if (noneMatch && noneMatch !== "*") { + var etag = resHeaders["etag"]; + if (!etag) { + return false; + } + var etagStale = true; + var matches = parseTokenList(noneMatch); + for (var i = 0; i < matches.length; i++) { + var match = matches[i]; + if (match === etag || match === "W/" + etag || "W/" + match === etag) { + etagStale = false; + break; + } + } + if (etagStale) { + return false; + } + } + if (modifiedSince) { + var lastModified = resHeaders["last-modified"]; + var modifiedStale = !lastModified || !(parseHttpDate(lastModified) <= parseHttpDate(modifiedSince)); + if (modifiedStale) { + return false; + } + } + return true; + } + function parseHttpDate(date) { + var timestamp = date && Date.parse(date); + return typeof timestamp === "number" ? timestamp : NaN; + } + function parseTokenList(str) { + var end = 0; + var list = []; + var start = 0; + for (var i = 0, len = str.length; i < len; i++) { + switch (str.charCodeAt(i)) { + case 32: + if (start === end) { + start = end = i + 1; + } + break; + case 44: + list.push(str.substring(start, end)); + start = end = i + 1; + break; + default: + end = i + 1; + break; + } + } + list.push(str.substring(start, end)); + return list; + } + } +}); + +// ../../node_modules/.pnpm/mime@1.6.0/node_modules/mime/types.json +var require_types3 = __commonJS({ + "../../node_modules/.pnpm/mime@1.6.0/node_modules/mime/types.json"(exports2, module2) { + module2.exports = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomsvc+xml": ["atomsvc"], "application/bdoc": ["bdoc"], "application/ccxml+xml": ["ccxml"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["ecma"], "application/emma+xml": ["emma"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/font-tdpfr": ["pfr"], "application/font-woff": [], "application/font-woff2": [], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/prs.cww": ["cww"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/vnd.3gpp.pic-bw-large": ["plb"], "application/vnd.3gpp.pic-bw-small": ["psb"], "application/vnd.3gpp.pic-bw-var": ["pvb"], "application/vnd.3gpp2.tcap": ["tcap"], "application/vnd.3m.post-it-notes": ["pwn"], "application/vnd.accpac.simply.aso": ["aso"], "application/vnd.accpac.simply.imp": ["imp"], "application/vnd.acucobol": ["acu"], "application/vnd.acucorp": ["atc", "acutc"], "application/vnd.adobe.air-application-installer-package+zip": ["air"], "application/vnd.adobe.formscentral.fcdt": ["fcdt"], "application/vnd.adobe.fxp": ["fxp", "fxpl"], "application/vnd.adobe.xdp+xml": ["xdp"], "application/vnd.adobe.xfdf": ["xfdf"], "application/vnd.ahead.space": ["ahead"], "application/vnd.airzip.filesecure.azf": ["azf"], "application/vnd.airzip.filesecure.azs": ["azs"], "application/vnd.amazon.ebook": ["azw"], "application/vnd.americandynamics.acc": ["acc"], "application/vnd.amiga.ami": ["ami"], "application/vnd.android.package-archive": ["apk"], "application/vnd.anser-web-certificate-issue-initiation": ["cii"], "application/vnd.anser-web-funds-transfer-initiation": ["fti"], "application/vnd.antix.game-component": ["atx"], "application/vnd.apple.installer+xml": ["mpkg"], "application/vnd.apple.mpegurl": ["m3u8"], "application/vnd.apple.pkpass": ["pkpass"], "application/vnd.aristanetworks.swi": ["swi"], "application/vnd.astraea-software.iota": ["iota"], "application/vnd.audiograph": ["aep"], "application/vnd.blueice.multipass": ["mpm"], "application/vnd.bmi": ["bmi"], "application/vnd.businessobjects": ["rep"], "application/vnd.chemdraw+xml": ["cdxml"], "application/vnd.chipnuts.karaoke-mmd": ["mmd"], "application/vnd.cinderella": ["cdy"], "application/vnd.claymore": ["cla"], "application/vnd.cloanto.rp9": ["rp9"], "application/vnd.clonk.c4group": ["c4g", "c4d", "c4f", "c4p", "c4u"], "application/vnd.cluetrust.cartomobile-config": ["c11amc"], "application/vnd.cluetrust.cartomobile-config-pkg": ["c11amz"], "application/vnd.commonspace": ["csp"], "application/vnd.contact.cmsg": ["cdbcmsg"], "application/vnd.cosmocaller": ["cmc"], "application/vnd.crick.clicker": ["clkx"], "application/vnd.crick.clicker.keyboard": ["clkk"], "application/vnd.crick.clicker.palette": ["clkp"], "application/vnd.crick.clicker.template": ["clkt"], "application/vnd.crick.clicker.wordbank": ["clkw"], "application/vnd.criticaltools.wbs+xml": ["wbs"], "application/vnd.ctc-posml": ["pml"], "application/vnd.cups-ppd": ["ppd"], "application/vnd.curl.car": ["car"], "application/vnd.curl.pcurl": ["pcurl"], "application/vnd.dart": ["dart"], "application/vnd.data-vision.rdz": ["rdz"], "application/vnd.dece.data": ["uvf", "uvvf", "uvd", "uvvd"], "application/vnd.dece.ttml+xml": ["uvt", "uvvt"], "application/vnd.dece.unspecified": ["uvx", "uvvx"], "application/vnd.dece.zip": ["uvz", "uvvz"], "application/vnd.denovo.fcselayout-link": ["fe_launch"], "application/vnd.dna": ["dna"], "application/vnd.dolby.mlp": ["mlp"], "application/vnd.dpgraph": ["dpg"], "application/vnd.dreamfactory": ["dfac"], "application/vnd.ds-keypoint": ["kpxx"], "application/vnd.dvb.ait": ["ait"], "application/vnd.dvb.service": ["svc"], "application/vnd.dynageo": ["geo"], "application/vnd.ecowin.chart": ["mag"], "application/vnd.enliven": ["nml"], "application/vnd.epson.esf": ["esf"], "application/vnd.epson.msf": ["msf"], "application/vnd.epson.quickanime": ["qam"], "application/vnd.epson.salt": ["slt"], "application/vnd.epson.ssf": ["ssf"], "application/vnd.eszigno3+xml": ["es3", "et3"], "application/vnd.ezpix-album": ["ez2"], "application/vnd.ezpix-package": ["ez3"], "application/vnd.fdf": ["fdf"], "application/vnd.fdsn.mseed": ["mseed"], "application/vnd.fdsn.seed": ["seed", "dataless"], "application/vnd.flographit": ["gph"], "application/vnd.fluxtime.clip": ["ftc"], "application/vnd.framemaker": ["fm", "frame", "maker", "book"], "application/vnd.frogans.fnc": ["fnc"], "application/vnd.frogans.ltf": ["ltf"], "application/vnd.fsc.weblaunch": ["fsc"], "application/vnd.fujitsu.oasys": ["oas"], "application/vnd.fujitsu.oasys2": ["oa2"], "application/vnd.fujitsu.oasys3": ["oa3"], "application/vnd.fujitsu.oasysgp": ["fg5"], "application/vnd.fujitsu.oasysprs": ["bh2"], "application/vnd.fujixerox.ddd": ["ddd"], "application/vnd.fujixerox.docuworks": ["xdw"], "application/vnd.fujixerox.docuworks.binder": ["xbd"], "application/vnd.fuzzysheet": ["fzs"], "application/vnd.genomatix.tuxedo": ["txd"], "application/vnd.geogebra.file": ["ggb"], "application/vnd.geogebra.tool": ["ggt"], "application/vnd.geometry-explorer": ["gex", "gre"], "application/vnd.geonext": ["gxt"], "application/vnd.geoplan": ["g2w"], "application/vnd.geospace": ["g3w"], "application/vnd.gmx": ["gmx"], "application/vnd.google-apps.document": ["gdoc"], "application/vnd.google-apps.presentation": ["gslides"], "application/vnd.google-apps.spreadsheet": ["gsheet"], "application/vnd.google-earth.kml+xml": ["kml"], "application/vnd.google-earth.kmz": ["kmz"], "application/vnd.grafeq": ["gqf", "gqs"], "application/vnd.groove-account": ["gac"], "application/vnd.groove-help": ["ghf"], "application/vnd.groove-identity-message": ["gim"], "application/vnd.groove-injector": ["grv"], "application/vnd.groove-tool-message": ["gtm"], "application/vnd.groove-tool-template": ["tpl"], "application/vnd.groove-vcard": ["vcg"], "application/vnd.hal+xml": ["hal"], "application/vnd.handheld-entertainment+xml": ["zmm"], "application/vnd.hbci": ["hbci"], "application/vnd.hhe.lesson-player": ["les"], "application/vnd.hp-hpgl": ["hpgl"], "application/vnd.hp-hpid": ["hpid"], "application/vnd.hp-hps": ["hps"], "application/vnd.hp-jlyt": ["jlt"], "application/vnd.hp-pcl": ["pcl"], "application/vnd.hp-pclxl": ["pclxl"], "application/vnd.hydrostatix.sof-data": ["sfd-hdstx"], "application/vnd.ibm.minipay": ["mpy"], "application/vnd.ibm.modcap": ["afp", "listafp", "list3820"], "application/vnd.ibm.rights-management": ["irm"], "application/vnd.ibm.secure-container": ["sc"], "application/vnd.iccprofile": ["icc", "icm"], "application/vnd.igloader": ["igl"], "application/vnd.immervision-ivp": ["ivp"], "application/vnd.immervision-ivu": ["ivu"], "application/vnd.insors.igm": ["igm"], "application/vnd.intercon.formnet": ["xpw", "xpx"], "application/vnd.intergeo": ["i2g"], "application/vnd.intu.qbo": ["qbo"], "application/vnd.intu.qfx": ["qfx"], "application/vnd.ipunplugged.rcprofile": ["rcprofile"], "application/vnd.irepository.package+xml": ["irp"], "application/vnd.is-xpr": ["xpr"], "application/vnd.isac.fcs": ["fcs"], "application/vnd.jam": ["jam"], "application/vnd.jcp.javame.midlet-rms": ["rms"], "application/vnd.jisp": ["jisp"], "application/vnd.joost.joda-archive": ["joda"], "application/vnd.kahootz": ["ktz", "ktr"], "application/vnd.kde.karbon": ["karbon"], "application/vnd.kde.kchart": ["chrt"], "application/vnd.kde.kformula": ["kfo"], "application/vnd.kde.kivio": ["flw"], "application/vnd.kde.kontour": ["kon"], "application/vnd.kde.kpresenter": ["kpr", "kpt"], "application/vnd.kde.kspread": ["ksp"], "application/vnd.kde.kword": ["kwd", "kwt"], "application/vnd.kenameaapp": ["htke"], "application/vnd.kidspiration": ["kia"], "application/vnd.kinar": ["kne", "knp"], "application/vnd.koan": ["skp", "skd", "skt", "skm"], "application/vnd.kodak-descriptor": ["sse"], "application/vnd.las.las+xml": ["lasxml"], "application/vnd.llamagraphics.life-balance.desktop": ["lbd"], "application/vnd.llamagraphics.life-balance.exchange+xml": ["lbe"], "application/vnd.lotus-1-2-3": ["123"], "application/vnd.lotus-approach": ["apr"], "application/vnd.lotus-freelance": ["pre"], "application/vnd.lotus-notes": ["nsf"], "application/vnd.lotus-organizer": ["org"], "application/vnd.lotus-screencam": ["scm"], "application/vnd.lotus-wordpro": ["lwp"], "application/vnd.macports.portpkg": ["portpkg"], "application/vnd.mcd": ["mcd"], "application/vnd.medcalcdata": ["mc1"], "application/vnd.mediastation.cdkey": ["cdkey"], "application/vnd.mfer": ["mwf"], "application/vnd.mfmp": ["mfm"], "application/vnd.micrografx.flo": ["flo"], "application/vnd.micrografx.igx": ["igx"], "application/vnd.mif": ["mif"], "application/vnd.mobius.daf": ["daf"], "application/vnd.mobius.dis": ["dis"], "application/vnd.mobius.mbk": ["mbk"], "application/vnd.mobius.mqy": ["mqy"], "application/vnd.mobius.msl": ["msl"], "application/vnd.mobius.plc": ["plc"], "application/vnd.mobius.txf": ["txf"], "application/vnd.mophun.application": ["mpn"], "application/vnd.mophun.certificate": ["mpc"], "application/vnd.mozilla.xul+xml": ["xul"], "application/vnd.ms-artgalry": ["cil"], "application/vnd.ms-cab-compressed": ["cab"], "application/vnd.ms-excel": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"], "application/vnd.ms-excel.addin.macroenabled.12": ["xlam"], "application/vnd.ms-excel.sheet.binary.macroenabled.12": ["xlsb"], "application/vnd.ms-excel.sheet.macroenabled.12": ["xlsm"], "application/vnd.ms-excel.template.macroenabled.12": ["xltm"], "application/vnd.ms-fontobject": ["eot"], "application/vnd.ms-htmlhelp": ["chm"], "application/vnd.ms-ims": ["ims"], "application/vnd.ms-lrm": ["lrm"], "application/vnd.ms-officetheme": ["thmx"], "application/vnd.ms-outlook": ["msg"], "application/vnd.ms-pki.seccat": ["cat"], "application/vnd.ms-pki.stl": ["stl"], "application/vnd.ms-powerpoint": ["ppt", "pps", "pot"], "application/vnd.ms-powerpoint.addin.macroenabled.12": ["ppam"], "application/vnd.ms-powerpoint.presentation.macroenabled.12": ["pptm"], "application/vnd.ms-powerpoint.slide.macroenabled.12": ["sldm"], "application/vnd.ms-powerpoint.slideshow.macroenabled.12": ["ppsm"], "application/vnd.ms-powerpoint.template.macroenabled.12": ["potm"], "application/vnd.ms-project": ["mpp", "mpt"], "application/vnd.ms-word.document.macroenabled.12": ["docm"], "application/vnd.ms-word.template.macroenabled.12": ["dotm"], "application/vnd.ms-works": ["wps", "wks", "wcm", "wdb"], "application/vnd.ms-wpl": ["wpl"], "application/vnd.ms-xpsdocument": ["xps"], "application/vnd.mseq": ["mseq"], "application/vnd.musician": ["mus"], "application/vnd.muvee.style": ["msty"], "application/vnd.mynfc": ["taglet"], "application/vnd.neurolanguage.nlu": ["nlu"], "application/vnd.nitf": ["ntf", "nitf"], "application/vnd.noblenet-directory": ["nnd"], "application/vnd.noblenet-sealer": ["nns"], "application/vnd.noblenet-web": ["nnw"], "application/vnd.nokia.n-gage.data": ["ngdat"], "application/vnd.nokia.n-gage.symbian.install": ["n-gage"], "application/vnd.nokia.radio-preset": ["rpst"], "application/vnd.nokia.radio-presets": ["rpss"], "application/vnd.novadigm.edm": ["edm"], "application/vnd.novadigm.edx": ["edx"], "application/vnd.novadigm.ext": ["ext"], "application/vnd.oasis.opendocument.chart": ["odc"], "application/vnd.oasis.opendocument.chart-template": ["otc"], "application/vnd.oasis.opendocument.database": ["odb"], "application/vnd.oasis.opendocument.formula": ["odf"], "application/vnd.oasis.opendocument.formula-template": ["odft"], "application/vnd.oasis.opendocument.graphics": ["odg"], "application/vnd.oasis.opendocument.graphics-template": ["otg"], "application/vnd.oasis.opendocument.image": ["odi"], "application/vnd.oasis.opendocument.image-template": ["oti"], "application/vnd.oasis.opendocument.presentation": ["odp"], "application/vnd.oasis.opendocument.presentation-template": ["otp"], "application/vnd.oasis.opendocument.spreadsheet": ["ods"], "application/vnd.oasis.opendocument.spreadsheet-template": ["ots"], "application/vnd.oasis.opendocument.text": ["odt"], "application/vnd.oasis.opendocument.text-master": ["odm"], "application/vnd.oasis.opendocument.text-template": ["ott"], "application/vnd.oasis.opendocument.text-web": ["oth"], "application/vnd.olpc-sugar": ["xo"], "application/vnd.oma.dd2+xml": ["dd2"], "application/vnd.openofficeorg.extension": ["oxt"], "application/vnd.openxmlformats-officedocument.presentationml.presentation": ["pptx"], "application/vnd.openxmlformats-officedocument.presentationml.slide": ["sldx"], "application/vnd.openxmlformats-officedocument.presentationml.slideshow": ["ppsx"], "application/vnd.openxmlformats-officedocument.presentationml.template": ["potx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ["xlsx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.template": ["xltx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.document": ["docx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.template": ["dotx"], "application/vnd.osgeo.mapguide.package": ["mgp"], "application/vnd.osgi.dp": ["dp"], "application/vnd.osgi.subsystem": ["esa"], "application/vnd.palm": ["pdb", "pqa", "oprc"], "application/vnd.pawaafile": ["paw"], "application/vnd.pg.format": ["str"], "application/vnd.pg.osasli": ["ei6"], "application/vnd.picsel": ["efif"], "application/vnd.pmi.widget": ["wg"], "application/vnd.pocketlearn": ["plf"], "application/vnd.powerbuilder6": ["pbd"], "application/vnd.previewsystems.box": ["box"], "application/vnd.proteus.magazine": ["mgz"], "application/vnd.publishare-delta-tree": ["qps"], "application/vnd.pvi.ptid1": ["ptid"], "application/vnd.quark.quarkxpress": ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"], "application/vnd.realvnc.bed": ["bed"], "application/vnd.recordare.musicxml": ["mxl"], "application/vnd.recordare.musicxml+xml": ["musicxml"], "application/vnd.rig.cryptonote": ["cryptonote"], "application/vnd.rim.cod": ["cod"], "application/vnd.rn-realmedia": ["rm"], "application/vnd.rn-realmedia-vbr": ["rmvb"], "application/vnd.route66.link66+xml": ["link66"], "application/vnd.sailingtracker.track": ["st"], "application/vnd.seemail": ["see"], "application/vnd.sema": ["sema"], "application/vnd.semd": ["semd"], "application/vnd.semf": ["semf"], "application/vnd.shana.informed.formdata": ["ifm"], "application/vnd.shana.informed.formtemplate": ["itp"], "application/vnd.shana.informed.interchange": ["iif"], "application/vnd.shana.informed.package": ["ipk"], "application/vnd.simtech-mindmapper": ["twd", "twds"], "application/vnd.smaf": ["mmf"], "application/vnd.smart.teacher": ["teacher"], "application/vnd.solent.sdkm+xml": ["sdkm", "sdkd"], "application/vnd.spotfire.dxp": ["dxp"], "application/vnd.spotfire.sfs": ["sfs"], "application/vnd.stardivision.calc": ["sdc"], "application/vnd.stardivision.draw": ["sda"], "application/vnd.stardivision.impress": ["sdd"], "application/vnd.stardivision.math": ["smf"], "application/vnd.stardivision.writer": ["sdw", "vor"], "application/vnd.stardivision.writer-global": ["sgl"], "application/vnd.stepmania.package": ["smzip"], "application/vnd.stepmania.stepchart": ["sm"], "application/vnd.sun.wadl+xml": ["wadl"], "application/vnd.sun.xml.calc": ["sxc"], "application/vnd.sun.xml.calc.template": ["stc"], "application/vnd.sun.xml.draw": ["sxd"], "application/vnd.sun.xml.draw.template": ["std"], "application/vnd.sun.xml.impress": ["sxi"], "application/vnd.sun.xml.impress.template": ["sti"], "application/vnd.sun.xml.math": ["sxm"], "application/vnd.sun.xml.writer": ["sxw"], "application/vnd.sun.xml.writer.global": ["sxg"], "application/vnd.sun.xml.writer.template": ["stw"], "application/vnd.sus-calendar": ["sus", "susp"], "application/vnd.svd": ["svd"], "application/vnd.symbian.install": ["sis", "sisx"], "application/vnd.syncml+xml": ["xsm"], "application/vnd.syncml.dm+wbxml": ["bdm"], "application/vnd.syncml.dm+xml": ["xdm"], "application/vnd.tao.intent-module-archive": ["tao"], "application/vnd.tcpdump.pcap": ["pcap", "cap", "dmp"], "application/vnd.tmobile-livetv": ["tmo"], "application/vnd.trid.tpt": ["tpt"], "application/vnd.triscape.mxs": ["mxs"], "application/vnd.trueapp": ["tra"], "application/vnd.ufdl": ["ufd", "ufdl"], "application/vnd.uiq.theme": ["utz"], "application/vnd.umajin": ["umj"], "application/vnd.unity": ["unityweb"], "application/vnd.uoml+xml": ["uoml"], "application/vnd.vcx": ["vcx"], "application/vnd.visio": ["vsd", "vst", "vss", "vsw"], "application/vnd.visionary": ["vis"], "application/vnd.vsf": ["vsf"], "application/vnd.wap.wbxml": ["wbxml"], "application/vnd.wap.wmlc": ["wmlc"], "application/vnd.wap.wmlscriptc": ["wmlsc"], "application/vnd.webturbo": ["wtb"], "application/vnd.wolfram.player": ["nbp"], "application/vnd.wordperfect": ["wpd"], "application/vnd.wqd": ["wqd"], "application/vnd.wt.stf": ["stf"], "application/vnd.xara": ["xar"], "application/vnd.xfdl": ["xfdl"], "application/vnd.yamaha.hv-dic": ["hvd"], "application/vnd.yamaha.hv-script": ["hvs"], "application/vnd.yamaha.hv-voice": ["hvp"], "application/vnd.yamaha.openscoreformat": ["osf"], "application/vnd.yamaha.openscoreformat.osfpvg+xml": ["osfpvg"], "application/vnd.yamaha.smaf-audio": ["saf"], "application/vnd.yamaha.smaf-phrase": ["spf"], "application/vnd.yellowriver-custom-menu": ["cmp"], "application/vnd.zul": ["zir", "zirz"], "application/vnd.zzazz.deck+xml": ["zaz"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/x-7z-compressed": ["7z"], "application/x-abiword": ["abw"], "application/x-ace-compressed": ["ace"], "application/x-apple-diskimage": [], "application/x-arj": ["arj"], "application/x-authorware-bin": ["aab", "x32", "u32", "vox"], "application/x-authorware-map": ["aam"], "application/x-authorware-seg": ["aas"], "application/x-bcpio": ["bcpio"], "application/x-bdoc": [], "application/x-bittorrent": ["torrent"], "application/x-blorb": ["blb", "blorb"], "application/x-bzip": ["bz"], "application/x-bzip2": ["bz2", "boz"], "application/x-cbr": ["cbr", "cba", "cbt", "cbz", "cb7"], "application/x-cdlink": ["vcd"], "application/x-cfs-compressed": ["cfs"], "application/x-chat": ["chat"], "application/x-chess-pgn": ["pgn"], "application/x-chrome-extension": ["crx"], "application/x-cocoa": ["cco"], "application/x-conference": ["nsc"], "application/x-cpio": ["cpio"], "application/x-csh": ["csh"], "application/x-debian-package": ["udeb"], "application/x-dgc-compressed": ["dgc"], "application/x-director": ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"], "application/x-doom": ["wad"], "application/x-dtbncx+xml": ["ncx"], "application/x-dtbook+xml": ["dtb"], "application/x-dtbresource+xml": ["res"], "application/x-dvi": ["dvi"], "application/x-envoy": ["evy"], "application/x-eva": ["eva"], "application/x-font-bdf": ["bdf"], "application/x-font-ghostscript": ["gsf"], "application/x-font-linux-psf": ["psf"], "application/x-font-pcf": ["pcf"], "application/x-font-snf": ["snf"], "application/x-font-type1": ["pfa", "pfb", "pfm", "afm"], "application/x-freearc": ["arc"], "application/x-futuresplash": ["spl"], "application/x-gca-compressed": ["gca"], "application/x-glulx": ["ulx"], "application/x-gnumeric": ["gnumeric"], "application/x-gramps-xml": ["gramps"], "application/x-gtar": ["gtar"], "application/x-hdf": ["hdf"], "application/x-httpd-php": ["php"], "application/x-install-instructions": ["install"], "application/x-iso9660-image": [], "application/x-java-archive-diff": ["jardiff"], "application/x-java-jnlp-file": ["jnlp"], "application/x-latex": ["latex"], "application/x-lua-bytecode": ["luac"], "application/x-lzh-compressed": ["lzh", "lha"], "application/x-makeself": ["run"], "application/x-mie": ["mie"], "application/x-mobipocket-ebook": ["prc", "mobi"], "application/x-ms-application": ["application"], "application/x-ms-shortcut": ["lnk"], "application/x-ms-wmd": ["wmd"], "application/x-ms-wmz": ["wmz"], "application/x-ms-xbap": ["xbap"], "application/x-msaccess": ["mdb"], "application/x-msbinder": ["obd"], "application/x-mscardfile": ["crd"], "application/x-msclip": ["clp"], "application/x-msdos-program": [], "application/x-msdownload": ["com", "bat"], "application/x-msmediaview": ["mvb", "m13", "m14"], "application/x-msmetafile": ["wmf", "emf", "emz"], "application/x-msmoney": ["mny"], "application/x-mspublisher": ["pub"], "application/x-msschedule": ["scd"], "application/x-msterminal": ["trm"], "application/x-mswrite": ["wri"], "application/x-netcdf": ["nc", "cdf"], "application/x-ns-proxy-autoconfig": ["pac"], "application/x-nzb": ["nzb"], "application/x-perl": ["pl", "pm"], "application/x-pilot": [], "application/x-pkcs12": ["p12", "pfx"], "application/x-pkcs7-certificates": ["p7b", "spc"], "application/x-pkcs7-certreqresp": ["p7r"], "application/x-rar-compressed": ["rar"], "application/x-redhat-package-manager": ["rpm"], "application/x-research-info-systems": ["ris"], "application/x-sea": ["sea"], "application/x-sh": ["sh"], "application/x-shar": ["shar"], "application/x-shockwave-flash": ["swf"], "application/x-silverlight-app": ["xap"], "application/x-sql": ["sql"], "application/x-stuffit": ["sit"], "application/x-stuffitx": ["sitx"], "application/x-subrip": ["srt"], "application/x-sv4cpio": ["sv4cpio"], "application/x-sv4crc": ["sv4crc"], "application/x-t3vm-image": ["t3"], "application/x-tads": ["gam"], "application/x-tar": ["tar"], "application/x-tcl": ["tcl", "tk"], "application/x-tex": ["tex"], "application/x-tex-tfm": ["tfm"], "application/x-texinfo": ["texinfo", "texi"], "application/x-tgif": ["obj"], "application/x-ustar": ["ustar"], "application/x-virtualbox-hdd": ["hdd"], "application/x-virtualbox-ova": ["ova"], "application/x-virtualbox-ovf": ["ovf"], "application/x-virtualbox-vbox": ["vbox"], "application/x-virtualbox-vbox-extpack": ["vbox-extpack"], "application/x-virtualbox-vdi": ["vdi"], "application/x-virtualbox-vhd": ["vhd"], "application/x-virtualbox-vmdk": ["vmdk"], "application/x-wais-source": ["src"], "application/x-web-app-manifest+json": ["webapp"], "application/x-x509-ca-cert": ["der", "crt", "pem"], "application/x-xfig": ["fig"], "application/x-xliff+xml": ["xlf"], "application/x-xpinstall": ["xpi"], "application/x-xz": ["xz"], "application/x-zmachine": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"], "application/xaml+xml": ["xaml"], "application/xcap-diff+xml": ["xdf"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": [], "audio/adpcm": ["adp"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mp3": [], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/vnd.dece.audio": ["uva", "uvva"], "audio/vnd.digital-winds": ["eol"], "audio/vnd.dra": ["dra"], "audio/vnd.dts": ["dts"], "audio/vnd.dts.hd": ["dtshd"], "audio/vnd.lucent.voice": ["lvp"], "audio/vnd.ms-playready.media.pya": ["pya"], "audio/vnd.nuera.ecelp4800": ["ecelp4800"], "audio/vnd.nuera.ecelp7470": ["ecelp7470"], "audio/vnd.nuera.ecelp9600": ["ecelp9600"], "audio/vnd.rip": ["rip"], "audio/wav": ["wav"], "audio/wave": [], "audio/webm": ["weba"], "audio/x-aac": ["aac"], "audio/x-aiff": ["aif", "aiff", "aifc"], "audio/x-caf": ["caf"], "audio/x-flac": ["flac"], "audio/x-m4a": [], "audio/x-matroska": ["mka"], "audio/x-mpegurl": ["m3u"], "audio/x-ms-wax": ["wax"], "audio/x-ms-wma": ["wma"], "audio/x-pn-realaudio": ["ram", "ra"], "audio/x-pn-realaudio-plugin": ["rmp"], "audio/x-realaudio": [], "audio/x-wav": [], "audio/xm": ["xm"], "chemical/x-cdx": ["cdx"], "chemical/x-cif": ["cif"], "chemical/x-cmdf": ["cmdf"], "chemical/x-cml": ["cml"], "chemical/x-csml": ["csml"], "chemical/x-xyz": ["xyz"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/apng": ["apng"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/ief": ["ief"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/ktx": ["ktx"], "image/png": ["png"], "image/prs.btif": ["btif"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/tiff": ["tiff", "tif"], "image/vnd.adobe.photoshop": ["psd"], "image/vnd.dece.graphic": ["uvi", "uvvi", "uvg", "uvvg"], "image/vnd.djvu": ["djvu", "djv"], "image/vnd.dvb.subtitle": [], "image/vnd.dwg": ["dwg"], "image/vnd.dxf": ["dxf"], "image/vnd.fastbidsheet": ["fbs"], "image/vnd.fpx": ["fpx"], "image/vnd.fst": ["fst"], "image/vnd.fujixerox.edmics-mmr": ["mmr"], "image/vnd.fujixerox.edmics-rlc": ["rlc"], "image/vnd.ms-modi": ["mdi"], "image/vnd.ms-photo": ["wdp"], "image/vnd.net-fpx": ["npx"], "image/vnd.wap.wbmp": ["wbmp"], "image/vnd.xiff": ["xif"], "image/webp": ["webp"], "image/x-3ds": ["3ds"], "image/x-cmu-raster": ["ras"], "image/x-cmx": ["cmx"], "image/x-freehand": ["fh", "fhc", "fh4", "fh5", "fh7"], "image/x-icon": ["ico"], "image/x-jng": ["jng"], "image/x-mrsid-image": ["sid"], "image/x-ms-bmp": [], "image/x-pcx": ["pcx"], "image/x-pict": ["pic", "pct"], "image/x-portable-anymap": ["pnm"], "image/x-portable-bitmap": ["pbm"], "image/x-portable-graymap": ["pgm"], "image/x-portable-pixmap": ["ppm"], "image/x-rgb": ["rgb"], "image/x-tga": ["tga"], "image/x-xbitmap": ["xbm"], "image/x-xpixmap": ["xpm"], "image/x-xwindowdump": ["xwd"], "message/rfc822": ["eml", "mime"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/vnd.collada+xml": ["dae"], "model/vnd.dwf": ["dwf"], "model/vnd.gdl": ["gdl"], "model/vnd.gtw": ["gtw"], "model/vnd.mts": ["mts"], "model/vnd.vtu": ["vtu"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["x3db", "x3dbz"], "model/x3d+vrml": ["x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/hjson": ["hjson"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/prs.lines.tag": ["dsc"], "text/richtext": ["rtx"], "text/rtf": [], "text/sgml": ["sgml", "sgm"], "text/slim": ["slim", "slm"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vnd.curl": ["curl"], "text/vnd.curl.dcurl": ["dcurl"], "text/vnd.curl.mcurl": ["mcurl"], "text/vnd.curl.scurl": ["scurl"], "text/vnd.dvb.subtitle": ["sub"], "text/vnd.fly": ["fly"], "text/vnd.fmi.flexstor": ["flx"], "text/vnd.graphviz": ["gv"], "text/vnd.in3d.3dml": ["3dml"], "text/vnd.in3d.spot": ["spot"], "text/vnd.sun.j2me.app-descriptor": ["jad"], "text/vnd.wap.wml": ["wml"], "text/vnd.wap.wmlscript": ["wmls"], "text/vtt": ["vtt"], "text/x-asm": ["s", "asm"], "text/x-c": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"], "text/x-component": ["htc"], "text/x-fortran": ["f", "for", "f77", "f90"], "text/x-handlebars-template": ["hbs"], "text/x-java-source": ["java"], "text/x-lua": ["lua"], "text/x-markdown": ["mkd"], "text/x-nfo": ["nfo"], "text/x-opml": ["opml"], "text/x-org": [], "text/x-pascal": ["p", "pas"], "text/x-processing": ["pde"], "text/x-sass": ["sass"], "text/x-scss": ["scss"], "text/x-setext": ["etx"], "text/x-sfv": ["sfv"], "text/x-suse-ymp": ["ymp"], "text/x-uuencode": ["uu"], "text/x-vcalendar": ["vcs"], "text/x-vcard": ["vcf"], "text/xml": [], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/jpeg": ["jpgv"], "video/jpm": ["jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/vnd.dece.hd": ["uvh", "uvvh"], "video/vnd.dece.mobile": ["uvm", "uvvm"], "video/vnd.dece.pd": ["uvp", "uvvp"], "video/vnd.dece.sd": ["uvs", "uvvs"], "video/vnd.dece.video": ["uvv", "uvvv"], "video/vnd.dvb.file": ["dvb"], "video/vnd.fvt": ["fvt"], "video/vnd.mpegurl": ["mxu", "m4u"], "video/vnd.ms-playready.media.pyv": ["pyv"], "video/vnd.uvvu.mp4": ["uvu", "uvvu"], "video/vnd.vivo": ["viv"], "video/webm": ["webm"], "video/x-f4v": ["f4v"], "video/x-fli": ["fli"], "video/x-flv": ["flv"], "video/x-m4v": ["m4v"], "video/x-matroska": ["mkv", "mk3d", "mks"], "video/x-mng": ["mng"], "video/x-ms-asf": ["asf", "asx"], "video/x-ms-vob": ["vob"], "video/x-ms-wm": ["wm"], "video/x-ms-wmv": ["wmv"], "video/x-ms-wmx": ["wmx"], "video/x-ms-wvx": ["wvx"], "video/x-msvideo": ["avi"], "video/x-sgi-movie": ["movie"], "video/x-smv": ["smv"], "x-conference/x-cooltalk": ["ice"] }; + } +}); + +// ../../node_modules/.pnpm/mime@1.6.0/node_modules/mime/mime.js +var require_mime = __commonJS({ + "../../node_modules/.pnpm/mime@1.6.0/node_modules/mime/mime.js"(exports2, module2) { + var path = require("path"); + var fs = require("fs"); + function Mime() { + this.types = /* @__PURE__ */ Object.create(null); + this.extensions = /* @__PURE__ */ Object.create(null); + } + Mime.prototype.define = function(map) { + for (var type in map) { + var exts = map[type]; + for (var i = 0; i < exts.length; i++) { + if (process.env.DEBUG_MIME && this.types[exts[i]]) { + console.warn((this._loading || "define()").replace(/.*\//, ""), 'changes "' + exts[i] + '" extension type from ' + this.types[exts[i]] + " to " + type); + } + this.types[exts[i]] = type; + } + if (!this.extensions[type]) { + this.extensions[type] = exts[0]; + } + } + }; + Mime.prototype.load = function(file2) { + this._loading = file2; + var map = {}, content = fs.readFileSync(file2, "ascii"), lines = content.split(/[\r\n]+/); + lines.forEach(function(line) { + var fields = line.replace(/\s*#.*|^\s*|\s*$/g, "").split(/\s+/); + map[fields.shift()] = fields; + }); + this.define(map); + this._loading = null; + }; + Mime.prototype.lookup = function(path2, fallback) { + var ext = path2.replace(/^.*[\.\/\\]/, "").toLowerCase(); + return this.types[ext] || fallback || this.default_type; + }; + Mime.prototype.extension = function(mimeType) { + var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase(); + return this.extensions[type]; + }; + var mime = new Mime(); + mime.define(require_types3()); + mime.default_type = mime.lookup("bin"); + mime.Mime = Mime; + mime.charsets = { + lookup: function(mimeType, fallback) { + return /^text\/|^application\/(javascript|json)/.test(mimeType) ? "UTF-8" : fallback; + } + }; + module2.exports = mime; + } +}); + +// ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js +var require_ms2 = __commonJS({ + "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports2, module2) { + var s = 1e3; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var w = d * 7; + var y = d * 365.25; + module2.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === "string" && val.length > 0) { + return parse2(val); + } else if (type === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) + ); + }; + function parse2(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || "ms").toLowerCase(); + switch (type) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return n * y; + case "weeks": + case "week": + case "w": + return n * w; + case "days": + case "day": + case "d": + return n * d; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return n * h; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return n * m; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return n * s; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return n; + default: + return void 0; + } + } + function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + "d"; + } + if (msAbs >= h) { + return Math.round(ms / h) + "h"; + } + if (msAbs >= m) { + return Math.round(ms / m) + "m"; + } + if (msAbs >= s) { + return Math.round(ms / s) + "s"; + } + return ms + "ms"; + } + function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, "day"); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, "hour"); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, "minute"); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, "second"); + } + return ms + " ms"; + } + function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); + } + } +}); + +// ../../node_modules/.pnpm/range-parser@1.2.1/node_modules/range-parser/index.js +var require_range_parser = __commonJS({ + "../../node_modules/.pnpm/range-parser@1.2.1/node_modules/range-parser/index.js"(exports2, module2) { + "use strict"; + module2.exports = rangeParser; + function rangeParser(size, str, options) { + if (typeof str !== "string") { + throw new TypeError("argument str must be a string"); + } + var index = str.indexOf("="); + if (index === -1) { + return -2; + } + var arr = str.slice(index + 1).split(","); + var ranges = []; + ranges.type = str.slice(0, index); + for (var i = 0; i < arr.length; i++) { + var range = arr[i].split("-"); + var start = parseInt(range[0], 10); + var end = parseInt(range[1], 10); + if (isNaN(start)) { + start = size - end; + end = size - 1; + } else if (isNaN(end)) { + end = size - 1; + } + if (end > size - 1) { + end = size - 1; + } + if (isNaN(start) || isNaN(end) || start > end || start < 0) { + continue; + } + ranges.push({ + start, + end + }); + } + if (ranges.length < 1) { + return -1; + } + return options && options.combine ? combineRanges(ranges) : ranges; + } + function combineRanges(ranges) { + var ordered = ranges.map(mapWithIndex).sort(sortByRangeStart); + for (var j = 0, i = 1; i < ordered.length; i++) { + var range = ordered[i]; + var current = ordered[j]; + if (range.start > current.end + 1) { + ordered[++j] = range; + } else if (range.end > current.end) { + current.end = range.end; + current.index = Math.min(current.index, range.index); + } + } + ordered.length = j + 1; + var combined = ordered.sort(sortByRangeIndex).map(mapWithoutIndex); + combined.type = ranges.type; + return combined; + } + function mapWithIndex(range, index) { + return { + start: range.start, + end: range.end, + index + }; + } + function mapWithoutIndex(range) { + return { + start: range.start, + end: range.end + }; + } + function sortByRangeIndex(a, b) { + return a.index - b.index; + } + function sortByRangeStart(a, b) { + return a.start - b.start; + } + } +}); + +// ../../node_modules/.pnpm/send@0.19.2/node_modules/send/index.js +var require_send = __commonJS({ + "../../node_modules/.pnpm/send@0.19.2/node_modules/send/index.js"(exports2, module2) { + "use strict"; + var createError = require_http_errors(); + var debug = require_src()("send"); + var deprecate = require_depd()("send"); + var destroy = require_destroy(); + var encodeUrl = require_encodeurl(); + var escapeHtml = require_escape_html(); + var etag = require_etag(); + var fresh = require_fresh(); + var fs = require("fs"); + var mime = require_mime(); + var ms = require_ms2(); + var onFinished = require_on_finished(); + var parseRange = require_range_parser(); + var path = require("path"); + var statuses = require_statuses(); + var Stream = require("stream"); + var util2 = require("util"); + var extname = path.extname; + var join = path.join; + var normalize = path.normalize; + var resolve = path.resolve; + var sep = path.sep; + var BYTES_RANGE_REGEXP = /^ *bytes=/; + var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1e3; + var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/; + module2.exports = send; + module2.exports.mime = mime; + function send(req, path2, options) { + return new SendStream(req, path2, options); + } + function SendStream(req, path2, options) { + Stream.call(this); + var opts = options || {}; + this.options = opts; + this.path = path2; + this.req = req; + this._acceptRanges = opts.acceptRanges !== void 0 ? Boolean(opts.acceptRanges) : true; + this._cacheControl = opts.cacheControl !== void 0 ? Boolean(opts.cacheControl) : true; + this._etag = opts.etag !== void 0 ? Boolean(opts.etag) : true; + this._dotfiles = opts.dotfiles !== void 0 ? opts.dotfiles : "ignore"; + if (this._dotfiles !== "ignore" && this._dotfiles !== "allow" && this._dotfiles !== "deny") { + throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"'); + } + this._hidden = Boolean(opts.hidden); + if (opts.hidden !== void 0) { + deprecate("hidden: use dotfiles: '" + (this._hidden ? "allow" : "ignore") + "' instead"); + } + if (opts.dotfiles === void 0) { + this._dotfiles = void 0; + } + this._extensions = opts.extensions !== void 0 ? normalizeList(opts.extensions, "extensions option") : []; + this._immutable = opts.immutable !== void 0 ? Boolean(opts.immutable) : false; + this._index = opts.index !== void 0 ? normalizeList(opts.index, "index option") : ["index.html"]; + this._lastModified = opts.lastModified !== void 0 ? Boolean(opts.lastModified) : true; + this._maxage = opts.maxAge || opts.maxage; + this._maxage = typeof this._maxage === "string" ? ms(this._maxage) : Number(this._maxage); + this._maxage = !isNaN(this._maxage) ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) : 0; + this._root = opts.root ? resolve(opts.root) : null; + if (!this._root && opts.from) { + this.from(opts.from); + } + } + util2.inherits(SendStream, Stream); + SendStream.prototype.etag = deprecate.function(function etag2(val) { + this._etag = Boolean(val); + debug("etag %s", this._etag); + return this; + }, "send.etag: pass etag as option"); + SendStream.prototype.hidden = deprecate.function(function hidden(val) { + this._hidden = Boolean(val); + this._dotfiles = void 0; + debug("hidden %s", this._hidden); + return this; + }, "send.hidden: use dotfiles option"); + SendStream.prototype.index = deprecate.function(function index(paths) { + var index2 = !paths ? [] : normalizeList(paths, "paths argument"); + debug("index %o", paths); + this._index = index2; + return this; + }, "send.index: pass index as option"); + SendStream.prototype.root = function root(path2) { + this._root = resolve(String(path2)); + debug("root %s", this._root); + return this; + }; + SendStream.prototype.from = deprecate.function( + SendStream.prototype.root, + "send.from: pass root as option" + ); + SendStream.prototype.root = deprecate.function( + SendStream.prototype.root, + "send.root: pass root as option" + ); + SendStream.prototype.maxage = deprecate.function(function maxage(maxAge) { + this._maxage = typeof maxAge === "string" ? ms(maxAge) : Number(maxAge); + this._maxage = !isNaN(this._maxage) ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) : 0; + debug("max-age %d", this._maxage); + return this; + }, "send.maxage: pass maxAge as option"); + SendStream.prototype.error = function error(status, err) { + if (hasListeners(this, "error")) { + return this.emit("error", createHttpError(status, err)); + } + var res = this.res; + var msg = statuses.message[status] || String(status); + var doc = createHtmlDocument("Error", escapeHtml(msg)); + clearHeaders(res); + if (err && err.headers) { + setHeaders(res, err.headers); + } + res.statusCode = status; + res.setHeader("Content-Type", "text/html; charset=UTF-8"); + res.setHeader("Content-Length", Buffer.byteLength(doc)); + res.setHeader("Content-Security-Policy", "default-src 'none'"); + res.setHeader("X-Content-Type-Options", "nosniff"); + res.end(doc); + }; + SendStream.prototype.hasTrailingSlash = function hasTrailingSlash() { + return this.path[this.path.length - 1] === "/"; + }; + SendStream.prototype.isConditionalGET = function isConditionalGET() { + return this.req.headers["if-match"] || this.req.headers["if-unmodified-since"] || this.req.headers["if-none-match"] || this.req.headers["if-modified-since"]; + }; + SendStream.prototype.isPreconditionFailure = function isPreconditionFailure() { + var req = this.req; + var res = this.res; + var match = req.headers["if-match"]; + if (match) { + var etag2 = res.getHeader("ETag"); + return !etag2 || match !== "*" && parseTokenList(match).every(function(match2) { + return match2 !== etag2 && match2 !== "W/" + etag2 && "W/" + match2 !== etag2; + }); + } + var unmodifiedSince = parseHttpDate(req.headers["if-unmodified-since"]); + if (!isNaN(unmodifiedSince)) { + var lastModified = parseHttpDate(res.getHeader("Last-Modified")); + return isNaN(lastModified) || lastModified > unmodifiedSince; + } + return false; + }; + SendStream.prototype.removeContentHeaderFields = function removeContentHeaderFields() { + var res = this.res; + res.removeHeader("Content-Encoding"); + res.removeHeader("Content-Language"); + res.removeHeader("Content-Length"); + res.removeHeader("Content-Range"); + res.removeHeader("Content-Type"); + }; + SendStream.prototype.notModified = function notModified() { + var res = this.res; + debug("not modified"); + this.removeContentHeaderFields(); + res.statusCode = 304; + res.end(); + }; + SendStream.prototype.headersAlreadySent = function headersAlreadySent() { + var err = new Error("Can't set headers after they are sent."); + debug("headers already sent"); + this.error(500, err); + }; + SendStream.prototype.isCachable = function isCachable() { + var statusCode = this.res.statusCode; + return statusCode >= 200 && statusCode < 300 || statusCode === 304; + }; + SendStream.prototype.onStatError = function onStatError(error) { + switch (error.code) { + case "ENAMETOOLONG": + case "ENOENT": + case "ENOTDIR": + this.error(404, error); + break; + default: + this.error(500, error); + break; + } + }; + SendStream.prototype.isFresh = function isFresh() { + return fresh(this.req.headers, { + etag: this.res.getHeader("ETag"), + "last-modified": this.res.getHeader("Last-Modified") + }); + }; + SendStream.prototype.isRangeFresh = function isRangeFresh() { + var ifRange = this.req.headers["if-range"]; + if (!ifRange) { + return true; + } + if (ifRange.indexOf('"') !== -1) { + var etag2 = this.res.getHeader("ETag"); + return Boolean(etag2 && ifRange.indexOf(etag2) !== -1); + } + var lastModified = this.res.getHeader("Last-Modified"); + return parseHttpDate(lastModified) <= parseHttpDate(ifRange); + }; + SendStream.prototype.redirect = function redirect(path2) { + var res = this.res; + if (hasListeners(this, "directory")) { + this.emit("directory", res, path2); + return; + } + if (this.hasTrailingSlash()) { + this.error(403); + return; + } + var loc = encodeUrl(collapseLeadingSlashes(this.path + "/")); + var doc = createHtmlDocument("Redirecting", "Redirecting to " + escapeHtml(loc)); + res.statusCode = 301; + res.setHeader("Content-Type", "text/html; charset=UTF-8"); + res.setHeader("Content-Length", Buffer.byteLength(doc)); + res.setHeader("Content-Security-Policy", "default-src 'none'"); + res.setHeader("X-Content-Type-Options", "nosniff"); + res.setHeader("Location", loc); + res.end(doc); + }; + SendStream.prototype.pipe = function pipe(res) { + var root = this._root; + this.res = res; + var path2 = decode(this.path); + if (path2 === -1) { + this.error(400); + return res; + } + if (~path2.indexOf("\0")) { + this.error(400); + return res; + } + var parts; + if (root !== null) { + if (path2) { + path2 = normalize("." + sep + path2); + } + if (UP_PATH_REGEXP.test(path2)) { + debug('malicious path "%s"', path2); + this.error(403); + return res; + } + parts = path2.split(sep); + path2 = normalize(join(root, path2)); + } else { + if (UP_PATH_REGEXP.test(path2)) { + debug('malicious path "%s"', path2); + this.error(403); + return res; + } + parts = normalize(path2).split(sep); + path2 = resolve(path2); + } + if (containsDotFile(parts)) { + var access = this._dotfiles; + if (access === void 0) { + access = parts[parts.length - 1][0] === "." ? this._hidden ? "allow" : "ignore" : "allow"; + } + debug('%s dotfile "%s"', access, path2); + switch (access) { + case "allow": + break; + case "deny": + this.error(403); + return res; + case "ignore": + default: + this.error(404); + return res; + } + } + if (this._index.length && this.hasTrailingSlash()) { + this.sendIndex(path2); + return res; + } + this.sendFile(path2); + return res; + }; + SendStream.prototype.send = function send2(path2, stat) { + var len = stat.size; + var options = this.options; + var opts = {}; + var res = this.res; + var req = this.req; + var ranges = req.headers.range; + var offset = options.start || 0; + if (headersSent(res)) { + this.headersAlreadySent(); + return; + } + debug('pipe "%s"', path2); + this.setHeader(path2, stat); + this.type(path2); + if (this.isConditionalGET()) { + if (this.isPreconditionFailure()) { + this.error(412); + return; + } + if (this.isCachable() && this.isFresh()) { + this.notModified(); + return; + } + } + len = Math.max(0, len - offset); + if (options.end !== void 0) { + var bytes = options.end - offset + 1; + if (len > bytes) len = bytes; + } + if (this._acceptRanges && BYTES_RANGE_REGEXP.test(ranges)) { + ranges = parseRange(len, ranges, { + combine: true + }); + if (!this.isRangeFresh()) { + debug("range stale"); + ranges = -2; + } + if (ranges === -1) { + debug("range unsatisfiable"); + res.setHeader("Content-Range", contentRange("bytes", len)); + return this.error(416, { + headers: { "Content-Range": res.getHeader("Content-Range") } + }); + } + if (ranges !== -2 && ranges.length === 1) { + debug("range %j", ranges); + res.statusCode = 206; + res.setHeader("Content-Range", contentRange("bytes", len, ranges[0])); + offset += ranges[0].start; + len = ranges[0].end - ranges[0].start + 1; + } + } + for (var prop in options) { + opts[prop] = options[prop]; + } + opts.start = offset; + opts.end = Math.max(offset, offset + len - 1); + res.setHeader("Content-Length", len); + if (req.method === "HEAD") { + res.end(); + return; + } + this.stream(path2, opts); + }; + SendStream.prototype.sendFile = function sendFile(path2) { + var i = 0; + var self2 = this; + debug('stat "%s"', path2); + fs.stat(path2, function onstat(err, stat) { + if (err && err.code === "ENOENT" && !extname(path2) && path2[path2.length - 1] !== sep) { + return next(err); + } + if (err) return self2.onStatError(err); + if (stat.isDirectory()) return self2.redirect(path2); + self2.emit("file", path2, stat); + self2.send(path2, stat); + }); + function next(err) { + if (self2._extensions.length <= i) { + return err ? self2.onStatError(err) : self2.error(404); + } + var p = path2 + "." + self2._extensions[i++]; + debug('stat "%s"', p); + fs.stat(p, function(err2, stat) { + if (err2) return next(err2); + if (stat.isDirectory()) return next(); + self2.emit("file", p, stat); + self2.send(p, stat); + }); + } + }; + SendStream.prototype.sendIndex = function sendIndex(path2) { + var i = -1; + var self2 = this; + function next(err) { + if (++i >= self2._index.length) { + if (err) return self2.onStatError(err); + return self2.error(404); + } + var p = join(path2, self2._index[i]); + debug('stat "%s"', p); + fs.stat(p, function(err2, stat) { + if (err2) return next(err2); + if (stat.isDirectory()) return next(); + self2.emit("file", p, stat); + self2.send(p, stat); + }); + } + next(); + }; + SendStream.prototype.stream = function stream(path2, options) { + var self2 = this; + var res = this.res; + var stream2 = fs.createReadStream(path2, options); + this.emit("stream", stream2); + stream2.pipe(res); + function cleanup() { + destroy(stream2, true); + } + onFinished(res, cleanup); + stream2.on("error", function onerror(err) { + cleanup(); + self2.onStatError(err); + }); + stream2.on("end", function onend() { + self2.emit("end"); + }); + }; + SendStream.prototype.type = function type(path2) { + var res = this.res; + if (res.getHeader("Content-Type")) return; + var type2 = mime.lookup(path2); + if (!type2) { + debug("no content-type"); + return; + } + var charset = mime.charsets.lookup(type2); + debug("content-type %s", type2); + res.setHeader("Content-Type", type2 + (charset ? "; charset=" + charset : "")); + }; + SendStream.prototype.setHeader = function setHeader(path2, stat) { + var res = this.res; + this.emit("headers", res, path2, stat); + if (this._acceptRanges && !res.getHeader("Accept-Ranges")) { + debug("accept ranges"); + res.setHeader("Accept-Ranges", "bytes"); + } + if (this._cacheControl && !res.getHeader("Cache-Control")) { + var cacheControl = "public, max-age=" + Math.floor(this._maxage / 1e3); + if (this._immutable) { + cacheControl += ", immutable"; + } + debug("cache-control %s", cacheControl); + res.setHeader("Cache-Control", cacheControl); + } + if (this._lastModified && !res.getHeader("Last-Modified")) { + var modified = stat.mtime.toUTCString(); + debug("modified %s", modified); + res.setHeader("Last-Modified", modified); + } + if (this._etag && !res.getHeader("ETag")) { + var val = etag(stat); + debug("etag %s", val); + res.setHeader("ETag", val); + } + }; + function clearHeaders(res) { + var headers = getHeaderNames(res); + for (var i = 0; i < headers.length; i++) { + res.removeHeader(headers[i]); + } + } + function collapseLeadingSlashes(str) { + for (var i = 0; i < str.length; i++) { + if (str[i] !== "/") { + break; + } + } + return i > 1 ? "/" + str.substr(i) : str; + } + function containsDotFile(parts) { + for (var i = 0; i < parts.length; i++) { + var part = parts[i]; + if (part.length > 1 && part[0] === ".") { + return true; + } + } + return false; + } + function contentRange(type, size, range) { + return type + " " + (range ? range.start + "-" + range.end : "*") + "/" + size; + } + function createHtmlDocument(title, body) { + return '\n\n\n\n' + title + "\n\n\n
" + body + "
\n\n\n"; + } + function createHttpError(status, err) { + if (!err) { + return createError(status); + } + return err instanceof Error ? createError(status, err, { expose: false }) : createError(status, err); + } + function decode(path2) { + try { + return decodeURIComponent(path2); + } catch (err) { + return -1; + } + } + function getHeaderNames(res) { + return typeof res.getHeaderNames !== "function" ? Object.keys(res._headers || {}) : res.getHeaderNames(); + } + function hasListeners(emitter, type) { + var count = typeof emitter.listenerCount !== "function" ? emitter.listeners(type).length : emitter.listenerCount(type); + return count > 0; + } + function headersSent(res) { + return typeof res.headersSent !== "boolean" ? Boolean(res._header) : res.headersSent; + } + function normalizeList(val, name) { + var list = [].concat(val || []); + for (var i = 0; i < list.length; i++) { + if (typeof list[i] !== "string") { + throw new TypeError(name + " must be array of strings or false"); + } + } + return list; + } + function parseHttpDate(date) { + var timestamp = date && Date.parse(date); + return typeof timestamp === "number" ? timestamp : NaN; + } + function parseTokenList(str) { + var end = 0; + var list = []; + var start = 0; + for (var i = 0, len = str.length; i < len; i++) { + switch (str.charCodeAt(i)) { + case 32: + if (start === end) { + start = end = i + 1; + } + break; + case 44: + if (start !== end) { + list.push(str.substring(start, end)); + } + start = end = i + 1; + break; + default: + end = i + 1; + break; + } + } + if (start !== end) { + list.push(str.substring(start, end)); + } + return list; + } + function setHeaders(res, headers) { + var keys = Object.keys(headers); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + res.setHeader(key, headers[key]); + } + } + } +}); + +// ../../node_modules/.pnpm/forwarded@0.2.0/node_modules/forwarded/index.js +var require_forwarded = __commonJS({ + "../../node_modules/.pnpm/forwarded@0.2.0/node_modules/forwarded/index.js"(exports2, module2) { + "use strict"; + module2.exports = forwarded; + function forwarded(req) { + if (!req) { + throw new TypeError("argument req is required"); + } + var proxyAddrs = parse2(req.headers["x-forwarded-for"] || ""); + var socketAddr = getSocketAddr(req); + var addrs = [socketAddr].concat(proxyAddrs); + return addrs; + } + function getSocketAddr(req) { + return req.socket ? req.socket.remoteAddress : req.connection.remoteAddress; + } + function parse2(header) { + var end = header.length; + var list = []; + var start = header.length; + for (var i = header.length - 1; i >= 0; i--) { + switch (header.charCodeAt(i)) { + case 32: + if (start === end) { + start = end = i; + } + break; + case 44: + if (start !== end) { + list.push(header.substring(start, end)); + } + start = end = i; + break; + default: + start = i; + break; + } + } + if (start !== end) { + list.push(header.substring(start, end)); + } + return list; + } + } +}); + +// ../../node_modules/.pnpm/ipaddr.js@1.9.1/node_modules/ipaddr.js/lib/ipaddr.js +var require_ipaddr = __commonJS({ + "../../node_modules/.pnpm/ipaddr.js@1.9.1/node_modules/ipaddr.js/lib/ipaddr.js"(exports2, module2) { + (function() { + var expandIPv6, ipaddr, ipv4Part, ipv4Regexes, ipv6Part, ipv6Regexes, matchCIDR, root, zoneIndex; + ipaddr = {}; + root = this; + if (typeof module2 !== "undefined" && module2 !== null && module2.exports) { + module2.exports = ipaddr; + } else { + root["ipaddr"] = ipaddr; + } + matchCIDR = function(first, second, partSize, cidrBits) { + var part, shift; + if (first.length !== second.length) { + throw new Error("ipaddr: cannot match CIDR for objects with different lengths"); + } + part = 0; + while (cidrBits > 0) { + shift = partSize - cidrBits; + if (shift < 0) { + shift = 0; + } + if (first[part] >> shift !== second[part] >> shift) { + return false; + } + cidrBits -= partSize; + part += 1; + } + return true; + }; + ipaddr.subnetMatch = function(address, rangeList, defaultName) { + var k, len, rangeName, rangeSubnets, subnet; + if (defaultName == null) { + defaultName = "unicast"; + } + for (rangeName in rangeList) { + rangeSubnets = rangeList[rangeName]; + if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) { + rangeSubnets = [rangeSubnets]; + } + for (k = 0, len = rangeSubnets.length; k < len; k++) { + subnet = rangeSubnets[k]; + if (address.kind() === subnet[0].kind()) { + if (address.match.apply(address, subnet)) { + return rangeName; + } + } + } + } + return defaultName; + }; + ipaddr.IPv4 = (function() { + function IPv4(octets) { + var k, len, octet; + if (octets.length !== 4) { + throw new Error("ipaddr: ipv4 octet count should be 4"); + } + for (k = 0, len = octets.length; k < len; k++) { + octet = octets[k]; + if (!(0 <= octet && octet <= 255)) { + throw new Error("ipaddr: ipv4 octet should fit in 8 bits"); + } + } + this.octets = octets; + } + IPv4.prototype.kind = function() { + return "ipv4"; + }; + IPv4.prototype.toString = function() { + return this.octets.join("."); + }; + IPv4.prototype.toNormalizedString = function() { + return this.toString(); + }; + IPv4.prototype.toByteArray = function() { + return this.octets.slice(0); + }; + IPv4.prototype.match = function(other, cidrRange) { + var ref; + if (cidrRange === void 0) { + ref = other, other = ref[0], cidrRange = ref[1]; + } + if (other.kind() !== "ipv4") { + throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one"); + } + return matchCIDR(this.octets, other.octets, 8, cidrRange); + }; + IPv4.prototype.SpecialRanges = { + unspecified: [[new IPv4([0, 0, 0, 0]), 8]], + broadcast: [[new IPv4([255, 255, 255, 255]), 32]], + multicast: [[new IPv4([224, 0, 0, 0]), 4]], + linkLocal: [[new IPv4([169, 254, 0, 0]), 16]], + loopback: [[new IPv4([127, 0, 0, 0]), 8]], + carrierGradeNat: [[new IPv4([100, 64, 0, 0]), 10]], + "private": [[new IPv4([10, 0, 0, 0]), 8], [new IPv4([172, 16, 0, 0]), 12], [new IPv4([192, 168, 0, 0]), 16]], + reserved: [[new IPv4([192, 0, 0, 0]), 24], [new IPv4([192, 0, 2, 0]), 24], [new IPv4([192, 88, 99, 0]), 24], [new IPv4([198, 51, 100, 0]), 24], [new IPv4([203, 0, 113, 0]), 24], [new IPv4([240, 0, 0, 0]), 4]] + }; + IPv4.prototype.range = function() { + return ipaddr.subnetMatch(this, this.SpecialRanges); + }; + IPv4.prototype.toIPv4MappedAddress = function() { + return ipaddr.IPv6.parse("::ffff:" + this.toString()); + }; + IPv4.prototype.prefixLengthFromSubnetMask = function() { + var cidr, i, k, octet, stop, zeros, zerotable; + zerotable = { + 0: 8, + 128: 7, + 192: 6, + 224: 5, + 240: 4, + 248: 3, + 252: 2, + 254: 1, + 255: 0 + }; + cidr = 0; + stop = false; + for (i = k = 3; k >= 0; i = k += -1) { + octet = this.octets[i]; + if (octet in zerotable) { + zeros = zerotable[octet]; + if (stop && zeros !== 0) { + return null; + } + if (zeros !== 8) { + stop = true; + } + cidr += zeros; + } else { + return null; + } + } + return 32 - cidr; + }; + return IPv4; + })(); + ipv4Part = "(0?\\d+|0x[a-f0-9]+)"; + ipv4Regexes = { + fourOctet: new RegExp("^" + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "$", "i"), + longValue: new RegExp("^" + ipv4Part + "$", "i") + }; + ipaddr.IPv4.parser = function(string) { + var match, parseIntAuto, part, shift, value; + parseIntAuto = function(string2) { + if (string2[0] === "0" && string2[1] !== "x") { + return parseInt(string2, 8); + } else { + return parseInt(string2); + } + }; + if (match = string.match(ipv4Regexes.fourOctet)) { + return (function() { + var k, len, ref, results; + ref = match.slice(1, 6); + results = []; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + results.push(parseIntAuto(part)); + } + return results; + })(); + } else if (match = string.match(ipv4Regexes.longValue)) { + value = parseIntAuto(match[1]); + if (value > 4294967295 || value < 0) { + throw new Error("ipaddr: address outside defined range"); + } + return (function() { + var k, results; + results = []; + for (shift = k = 0; k <= 24; shift = k += 8) { + results.push(value >> shift & 255); + } + return results; + })().reverse(); + } else { + return null; + } + }; + ipaddr.IPv6 = (function() { + function IPv6(parts, zoneId) { + var i, k, l2, len, part, ref; + if (parts.length === 16) { + this.parts = []; + for (i = k = 0; k <= 14; i = k += 2) { + this.parts.push(parts[i] << 8 | parts[i + 1]); + } + } else if (parts.length === 8) { + this.parts = parts; + } else { + throw new Error("ipaddr: ipv6 part count should be 8 or 16"); + } + ref = this.parts; + for (l2 = 0, len = ref.length; l2 < len; l2++) { + part = ref[l2]; + if (!(0 <= part && part <= 65535)) { + throw new Error("ipaddr: ipv6 part should fit in 16 bits"); + } + } + if (zoneId) { + this.zoneId = zoneId; + } + } + IPv6.prototype.kind = function() { + return "ipv6"; + }; + IPv6.prototype.toString = function() { + return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/, "::"); + }; + IPv6.prototype.toRFC5952String = function() { + var bestMatchIndex, bestMatchLength, match, regex, string; + regex = /((^|:)(0(:|$)){2,})/g; + string = this.toNormalizedString(); + bestMatchIndex = 0; + bestMatchLength = -1; + while (match = regex.exec(string)) { + if (match[0].length > bestMatchLength) { + bestMatchIndex = match.index; + bestMatchLength = match[0].length; + } + } + if (bestMatchLength < 0) { + return string; + } + return string.substring(0, bestMatchIndex) + "::" + string.substring(bestMatchIndex + bestMatchLength); + }; + IPv6.prototype.toByteArray = function() { + var bytes, k, len, part, ref; + bytes = []; + ref = this.parts; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + bytes.push(part >> 8); + bytes.push(part & 255); + } + return bytes; + }; + IPv6.prototype.toNormalizedString = function() { + var addr, part, suffix; + addr = (function() { + var k, len, ref, results; + ref = this.parts; + results = []; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + results.push(part.toString(16)); + } + return results; + }).call(this).join(":"); + suffix = ""; + if (this.zoneId) { + suffix = "%" + this.zoneId; + } + return addr + suffix; + }; + IPv6.prototype.toFixedLengthString = function() { + var addr, part, suffix; + addr = (function() { + var k, len, ref, results; + ref = this.parts; + results = []; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + results.push(part.toString(16).padStart(4, "0")); + } + return results; + }).call(this).join(":"); + suffix = ""; + if (this.zoneId) { + suffix = "%" + this.zoneId; + } + return addr + suffix; + }; + IPv6.prototype.match = function(other, cidrRange) { + var ref; + if (cidrRange === void 0) { + ref = other, other = ref[0], cidrRange = ref[1]; + } + if (other.kind() !== "ipv6") { + throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one"); + } + return matchCIDR(this.parts, other.parts, 16, cidrRange); + }; + IPv6.prototype.SpecialRanges = { + unspecified: [new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128], + linkLocal: [new IPv6([65152, 0, 0, 0, 0, 0, 0, 0]), 10], + multicast: [new IPv6([65280, 0, 0, 0, 0, 0, 0, 0]), 8], + loopback: [new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128], + uniqueLocal: [new IPv6([64512, 0, 0, 0, 0, 0, 0, 0]), 7], + ipv4Mapped: [new IPv6([0, 0, 0, 0, 0, 65535, 0, 0]), 96], + rfc6145: [new IPv6([0, 0, 0, 0, 65535, 0, 0, 0]), 96], + rfc6052: [new IPv6([100, 65435, 0, 0, 0, 0, 0, 0]), 96], + "6to4": [new IPv6([8194, 0, 0, 0, 0, 0, 0, 0]), 16], + teredo: [new IPv6([8193, 0, 0, 0, 0, 0, 0, 0]), 32], + reserved: [[new IPv6([8193, 3512, 0, 0, 0, 0, 0, 0]), 32]] + }; + IPv6.prototype.range = function() { + return ipaddr.subnetMatch(this, this.SpecialRanges); + }; + IPv6.prototype.isIPv4MappedAddress = function() { + return this.range() === "ipv4Mapped"; + }; + IPv6.prototype.toIPv4Address = function() { + var high, low, ref; + if (!this.isIPv4MappedAddress()) { + throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4"); + } + ref = this.parts.slice(-2), high = ref[0], low = ref[1]; + return new ipaddr.IPv4([high >> 8, high & 255, low >> 8, low & 255]); + }; + IPv6.prototype.prefixLengthFromSubnetMask = function() { + var cidr, i, k, part, stop, zeros, zerotable; + zerotable = { + 0: 16, + 32768: 15, + 49152: 14, + 57344: 13, + 61440: 12, + 63488: 11, + 64512: 10, + 65024: 9, + 65280: 8, + 65408: 7, + 65472: 6, + 65504: 5, + 65520: 4, + 65528: 3, + 65532: 2, + 65534: 1, + 65535: 0 + }; + cidr = 0; + stop = false; + for (i = k = 7; k >= 0; i = k += -1) { + part = this.parts[i]; + if (part in zerotable) { + zeros = zerotable[part]; + if (stop && zeros !== 0) { + return null; + } + if (zeros !== 16) { + stop = true; + } + cidr += zeros; + } else { + return null; + } + } + return 128 - cidr; + }; + return IPv6; + })(); + ipv6Part = "(?:[0-9a-f]+::?)+"; + zoneIndex = "%[0-9a-z]{1,}"; + ipv6Regexes = { + zoneIndex: new RegExp(zoneIndex, "i"), + "native": new RegExp("^(::)?(" + ipv6Part + ")?([0-9a-f]+)?(::)?(" + zoneIndex + ")?$", "i"), + transitional: new RegExp("^((?:" + ipv6Part + ")|(?:::)(?:" + ipv6Part + ")?)" + (ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part) + ("(" + zoneIndex + ")?$"), "i") + }; + expandIPv6 = function(string, parts) { + var colonCount, lastColon, part, replacement, replacementCount, zoneId; + if (string.indexOf("::") !== string.lastIndexOf("::")) { + return null; + } + zoneId = (string.match(ipv6Regexes["zoneIndex"]) || [])[0]; + if (zoneId) { + zoneId = zoneId.substring(1); + string = string.replace(/%.+$/, ""); + } + colonCount = 0; + lastColon = -1; + while ((lastColon = string.indexOf(":", lastColon + 1)) >= 0) { + colonCount++; + } + if (string.substr(0, 2) === "::") { + colonCount--; + } + if (string.substr(-2, 2) === "::") { + colonCount--; + } + if (colonCount > parts) { + return null; + } + replacementCount = parts - colonCount; + replacement = ":"; + while (replacementCount--) { + replacement += "0:"; + } + string = string.replace("::", replacement); + if (string[0] === ":") { + string = string.slice(1); + } + if (string[string.length - 1] === ":") { + string = string.slice(0, -1); + } + parts = (function() { + var k, len, ref, results; + ref = string.split(":"); + results = []; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + results.push(parseInt(part, 16)); + } + return results; + })(); + return { + parts, + zoneId + }; + }; + ipaddr.IPv6.parser = function(string) { + var addr, k, len, match, octet, octets, zoneId; + if (ipv6Regexes["native"].test(string)) { + return expandIPv6(string, 8); + } else if (match = string.match(ipv6Regexes["transitional"])) { + zoneId = match[6] || ""; + addr = expandIPv6(match[1].slice(0, -1) + zoneId, 6); + if (addr.parts) { + octets = [parseInt(match[2]), parseInt(match[3]), parseInt(match[4]), parseInt(match[5])]; + for (k = 0, len = octets.length; k < len; k++) { + octet = octets[k]; + if (!(0 <= octet && octet <= 255)) { + return null; + } + } + addr.parts.push(octets[0] << 8 | octets[1]); + addr.parts.push(octets[2] << 8 | octets[3]); + return { + parts: addr.parts, + zoneId: addr.zoneId + }; + } + } + return null; + }; + ipaddr.IPv4.isIPv4 = ipaddr.IPv6.isIPv6 = function(string) { + return this.parser(string) !== null; + }; + ipaddr.IPv4.isValid = function(string) { + var e; + try { + new this(this.parser(string)); + return true; + } catch (error1) { + e = error1; + return false; + } + }; + ipaddr.IPv4.isValidFourPartDecimal = function(string) { + if (ipaddr.IPv4.isValid(string) && string.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/)) { + return true; + } else { + return false; + } + }; + ipaddr.IPv6.isValid = function(string) { + var addr, e; + if (typeof string === "string" && string.indexOf(":") === -1) { + return false; + } + try { + addr = this.parser(string); + new this(addr.parts, addr.zoneId); + return true; + } catch (error1) { + e = error1; + return false; + } + }; + ipaddr.IPv4.parse = function(string) { + var parts; + parts = this.parser(string); + if (parts === null) { + throw new Error("ipaddr: string is not formatted like ip address"); + } + return new this(parts); + }; + ipaddr.IPv6.parse = function(string) { + var addr; + addr = this.parser(string); + if (addr.parts === null) { + throw new Error("ipaddr: string is not formatted like ip address"); + } + return new this(addr.parts, addr.zoneId); + }; + ipaddr.IPv4.parseCIDR = function(string) { + var maskLength, match, parsed; + if (match = string.match(/^(.+)\/(\d+)$/)) { + maskLength = parseInt(match[2]); + if (maskLength >= 0 && maskLength <= 32) { + parsed = [this.parse(match[1]), maskLength]; + Object.defineProperty(parsed, "toString", { + value: function() { + return this.join("/"); + } + }); + return parsed; + } + } + throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range"); + }; + ipaddr.IPv4.subnetMaskFromPrefixLength = function(prefix) { + var filledOctetCount, j, octets; + prefix = parseInt(prefix); + if (prefix < 0 || prefix > 32) { + throw new Error("ipaddr: invalid IPv4 prefix length"); + } + octets = [0, 0, 0, 0]; + j = 0; + filledOctetCount = Math.floor(prefix / 8); + while (j < filledOctetCount) { + octets[j] = 255; + j++; + } + if (filledOctetCount < 4) { + octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - prefix % 8; + } + return new this(octets); + }; + ipaddr.IPv4.broadcastAddressFromCIDR = function(string) { + var cidr, error, i, ipInterfaceOctets, octets, subnetMaskOctets; + try { + cidr = this.parseCIDR(string); + ipInterfaceOctets = cidr[0].toByteArray(); + subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); + octets = []; + i = 0; + while (i < 4) { + octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255); + i++; + } + return new this(octets); + } catch (error1) { + error = error1; + throw new Error("ipaddr: the address does not have IPv4 CIDR format"); + } + }; + ipaddr.IPv4.networkAddressFromCIDR = function(string) { + var cidr, error, i, ipInterfaceOctets, octets, subnetMaskOctets; + try { + cidr = this.parseCIDR(string); + ipInterfaceOctets = cidr[0].toByteArray(); + subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); + octets = []; + i = 0; + while (i < 4) { + octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10)); + i++; + } + return new this(octets); + } catch (error1) { + error = error1; + throw new Error("ipaddr: the address does not have IPv4 CIDR format"); + } + }; + ipaddr.IPv6.parseCIDR = function(string) { + var maskLength, match, parsed; + if (match = string.match(/^(.+)\/(\d+)$/)) { + maskLength = parseInt(match[2]); + if (maskLength >= 0 && maskLength <= 128) { + parsed = [this.parse(match[1]), maskLength]; + Object.defineProperty(parsed, "toString", { + value: function() { + return this.join("/"); + } + }); + return parsed; + } + } + throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range"); + }; + ipaddr.isValid = function(string) { + return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string); + }; + ipaddr.parse = function(string) { + if (ipaddr.IPv6.isValid(string)) { + return ipaddr.IPv6.parse(string); + } else if (ipaddr.IPv4.isValid(string)) { + return ipaddr.IPv4.parse(string); + } else { + throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format"); + } + }; + ipaddr.parseCIDR = function(string) { + var e; + try { + return ipaddr.IPv6.parseCIDR(string); + } catch (error1) { + e = error1; + try { + return ipaddr.IPv4.parseCIDR(string); + } catch (error12) { + e = error12; + throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format"); + } + } + }; + ipaddr.fromByteArray = function(bytes) { + var length; + length = bytes.length; + if (length === 4) { + return new ipaddr.IPv4(bytes); + } else if (length === 16) { + return new ipaddr.IPv6(bytes); + } else { + throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address"); + } + }; + ipaddr.process = function(string) { + var addr; + addr = this.parse(string); + if (addr.kind() === "ipv6" && addr.isIPv4MappedAddress()) { + return addr.toIPv4Address(); + } else { + return addr; + } + }; + }).call(exports2); + } +}); + +// ../../node_modules/.pnpm/proxy-addr@2.0.7/node_modules/proxy-addr/index.js +var require_proxy_addr = __commonJS({ + "../../node_modules/.pnpm/proxy-addr@2.0.7/node_modules/proxy-addr/index.js"(exports2, module2) { + "use strict"; + module2.exports = proxyaddr; + module2.exports.all = alladdrs; + module2.exports.compile = compile; + var forwarded = require_forwarded(); + var ipaddr = require_ipaddr(); + var DIGIT_REGEXP = /^[0-9]+$/; + var isip = ipaddr.isValid; + var parseip = ipaddr.parse; + var IP_RANGES = { + linklocal: ["169.254.0.0/16", "fe80::/10"], + loopback: ["127.0.0.1/8", "::1/128"], + uniquelocal: ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "fc00::/7"] + }; + function alladdrs(req, trust) { + var addrs = forwarded(req); + if (!trust) { + return addrs; + } + if (typeof trust !== "function") { + trust = compile(trust); + } + for (var i = 0; i < addrs.length - 1; i++) { + if (trust(addrs[i], i)) continue; + addrs.length = i + 1; + } + return addrs; + } + function compile(val) { + if (!val) { + throw new TypeError("argument is required"); + } + var trust; + if (typeof val === "string") { + trust = [val]; + } else if (Array.isArray(val)) { + trust = val.slice(); + } else { + throw new TypeError("unsupported trust argument"); + } + for (var i = 0; i < trust.length; i++) { + val = trust[i]; + if (!Object.prototype.hasOwnProperty.call(IP_RANGES, val)) { + continue; + } + val = IP_RANGES[val]; + trust.splice.apply(trust, [i, 1].concat(val)); + i += val.length - 1; + } + return compileTrust(compileRangeSubnets(trust)); + } + function compileRangeSubnets(arr) { + var rangeSubnets = new Array(arr.length); + for (var i = 0; i < arr.length; i++) { + rangeSubnets[i] = parseipNotation(arr[i]); + } + return rangeSubnets; + } + function compileTrust(rangeSubnets) { + var len = rangeSubnets.length; + return len === 0 ? trustNone : len === 1 ? trustSingle(rangeSubnets[0]) : trustMulti(rangeSubnets); + } + function parseipNotation(note) { + var pos = note.lastIndexOf("/"); + var str = pos !== -1 ? note.substring(0, pos) : note; + if (!isip(str)) { + throw new TypeError("invalid IP address: " + str); + } + var ip = parseip(str); + if (pos === -1 && ip.kind() === "ipv6" && ip.isIPv4MappedAddress()) { + ip = ip.toIPv4Address(); + } + var max = ip.kind() === "ipv6" ? 128 : 32; + var range = pos !== -1 ? note.substring(pos + 1, note.length) : null; + if (range === null) { + range = max; + } else if (DIGIT_REGEXP.test(range)) { + range = parseInt(range, 10); + } else if (ip.kind() === "ipv4" && isip(range)) { + range = parseNetmask(range); + } else { + range = null; + } + if (range <= 0 || range > max) { + throw new TypeError("invalid range on address: " + note); + } + return [ip, range]; + } + function parseNetmask(netmask) { + var ip = parseip(netmask); + var kind = ip.kind(); + return kind === "ipv4" ? ip.prefixLengthFromSubnetMask() : null; + } + function proxyaddr(req, trust) { + if (!req) { + throw new TypeError("req argument is required"); + } + if (!trust) { + throw new TypeError("trust argument is required"); + } + var addrs = alladdrs(req, trust); + var addr = addrs[addrs.length - 1]; + return addr; + } + function trustNone() { + return false; + } + function trustMulti(subnets) { + return function trust(addr) { + if (!isip(addr)) return false; + var ip = parseip(addr); + var ipconv; + var kind = ip.kind(); + for (var i = 0; i < subnets.length; i++) { + var subnet = subnets[i]; + var subnetip = subnet[0]; + var subnetkind = subnetip.kind(); + var subnetrange = subnet[1]; + var trusted = ip; + if (kind !== subnetkind) { + if (subnetkind === "ipv4" && !ip.isIPv4MappedAddress()) { + continue; + } + if (!ipconv) { + ipconv = subnetkind === "ipv4" ? ip.toIPv4Address() : ip.toIPv4MappedAddress(); + } + trusted = ipconv; + } + if (trusted.match(subnetip, subnetrange)) { + return true; + } + } + return false; + }; + } + function trustSingle(subnet) { + var subnetip = subnet[0]; + var subnetkind = subnetip.kind(); + var subnetisipv4 = subnetkind === "ipv4"; + var subnetrange = subnet[1]; + return function trust(addr) { + if (!isip(addr)) return false; + var ip = parseip(addr); + var kind = ip.kind(); + if (kind !== subnetkind) { + if (subnetisipv4 && !ip.isIPv4MappedAddress()) { + return false; + } + ip = subnetisipv4 ? ip.toIPv4Address() : ip.toIPv4MappedAddress(); + } + return ip.match(subnetip, subnetrange); + }; + } + } +}); + +// ../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/utils.js +var require_utils11 = __commonJS({ + "../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/utils.js"(exports2) { + "use strict"; + var Buffer2 = require_safe_buffer().Buffer; + var contentDisposition = require_content_disposition(); + var contentType = require_content_type(); + var deprecate = require_depd()("express"); + var flatten = require_array_flatten(); + var mime = require_send().mime; + var etag = require_etag(); + var proxyaddr = require_proxy_addr(); + var qs = require_lib3(); + var querystring = require("querystring"); + exports2.etag = createETagGenerator({ weak: false }); + exports2.wetag = createETagGenerator({ weak: true }); + exports2.isAbsolute = function(path) { + if ("/" === path[0]) return true; + if (":" === path[1] && ("\\" === path[2] || "/" === path[2])) return true; + if ("\\\\" === path.substring(0, 2)) return true; + }; + exports2.flatten = deprecate.function( + flatten, + "utils.flatten: use array-flatten npm module instead" + ); + exports2.normalizeType = function(type) { + return ~type.indexOf("/") ? acceptParams(type) : { value: mime.lookup(type), params: {} }; + }; + exports2.normalizeTypes = function(types) { + var ret2 = []; + for (var i = 0; i < types.length; ++i) { + ret2.push(exports2.normalizeType(types[i])); + } + return ret2; + }; + exports2.contentDisposition = deprecate.function( + contentDisposition, + "utils.contentDisposition: use content-disposition npm module instead" + ); + function acceptParams(str) { + var parts = str.split(/ *; */); + var ret2 = { value: parts[0], quality: 1, params: {} }; + for (var i = 1; i < parts.length; ++i) { + var pms = parts[i].split(/ *= */); + if ("q" === pms[0]) { + ret2.quality = parseFloat(pms[1]); + } else { + ret2.params[pms[0]] = pms[1]; + } + } + return ret2; + } + exports2.compileETag = function(val) { + var fn; + if (typeof val === "function") { + return val; + } + switch (val) { + case true: + case "weak": + fn = exports2.wetag; + break; + case false: + break; + case "strong": + fn = exports2.etag; + break; + default: + throw new TypeError("unknown value for etag function: " + val); + } + return fn; + }; + exports2.compileQueryParser = function compileQueryParser(val) { + var fn; + if (typeof val === "function") { + return val; + } + switch (val) { + case true: + case "simple": + fn = querystring.parse; + break; + case false: + fn = newObject; + break; + case "extended": + fn = parseExtendedQueryString; + break; + default: + throw new TypeError("unknown value for query parser function: " + val); + } + return fn; + }; + exports2.compileTrust = function(val) { + if (typeof val === "function") return val; + if (val === true) { + return function() { + return true; + }; + } + if (typeof val === "number") { + return function(a, i) { + return i < val; + }; + } + if (typeof val === "string") { + val = val.split(",").map(function(v) { + return v.trim(); + }); + } + return proxyaddr.compile(val || []); + }; + exports2.setCharset = function setCharset(type, charset) { + if (!type || !charset) { + return type; + } + var parsed = contentType.parse(type); + parsed.parameters.charset = charset; + return contentType.format(parsed); + }; + function createETagGenerator(options) { + return function generateETag(body, encoding) { + var buf = !Buffer2.isBuffer(body) ? Buffer2.from(body, encoding) : body; + return etag(buf, options); + }; + } + function parseExtendedQueryString(str) { + return qs.parse(str, { + allowPrototypes: true + }); + } + function newObject() { + return {}; + } + } +}); + +// ../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/application.js +var require_application = __commonJS({ + "../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/application.js"(exports2, module2) { + "use strict"; + var finalhandler = require_finalhandler(); + var Router = require_router(); + var methods = require_methods(); + var middleware = require_init(); + var query = require_query(); + var debug = require_src()("express:application"); + var View = require_view(); + var http = require("http"); + var compileETag = require_utils11().compileETag; + var compileQueryParser = require_utils11().compileQueryParser; + var compileTrust = require_utils11().compileTrust; + var deprecate = require_depd()("express"); + var flatten = require_array_flatten(); + var merge = require_utils_merge(); + var resolve = require("path").resolve; + var setPrototypeOf = require_setprototypeof(); + var hasOwnProperty = Object.prototype.hasOwnProperty; + var slice = Array.prototype.slice; + var app = exports2 = module2.exports = {}; + var trustProxyDefaultSymbol = "@@symbol:trust_proxy_default"; + app.init = function init() { + this.cache = {}; + this.engines = {}; + this.settings = {}; + this.defaultConfiguration(); + }; + app.defaultConfiguration = function defaultConfiguration() { + var env3 = process.env.NODE_ENV || "development"; + this.enable("x-powered-by"); + this.set("etag", "weak"); + this.set("env", env3); + this.set("query parser", "extended"); + this.set("subdomain offset", 2); + this.set("trust proxy", false); + Object.defineProperty(this.settings, trustProxyDefaultSymbol, { + configurable: true, + value: true + }); + debug("booting in %s mode", env3); + this.on("mount", function onmount(parent) { + if (this.settings[trustProxyDefaultSymbol] === true && typeof parent.settings["trust proxy fn"] === "function") { + delete this.settings["trust proxy"]; + delete this.settings["trust proxy fn"]; + } + setPrototypeOf(this.request, parent.request); + setPrototypeOf(this.response, parent.response); + setPrototypeOf(this.engines, parent.engines); + setPrototypeOf(this.settings, parent.settings); + }); + this.locals = /* @__PURE__ */ Object.create(null); + this.mountpath = "/"; + this.locals.settings = this.settings; + this.set("view", View); + this.set("views", resolve("views")); + this.set("jsonp callback name", "callback"); + if (env3 === "production") { + this.enable("view cache"); + } + Object.defineProperty(this, "router", { + get: function() { + throw new Error("'app.router' is deprecated!\nPlease see the 3.x to 4.x migration guide for details on how to update your app."); + } + }); + }; + app.lazyrouter = function lazyrouter() { + if (!this._router) { + this._router = new Router({ + caseSensitive: this.enabled("case sensitive routing"), + strict: this.enabled("strict routing") + }); + this._router.use(query(this.get("query parser fn"))); + this._router.use(middleware.init(this)); + } + }; + app.handle = function handle(req, res, callback) { + var router = this._router; + var done = callback || finalhandler(req, res, { + env: this.get("env"), + onerror: logerror.bind(this) + }); + if (!router) { + debug("no routes defined on app"); + done(); + return; + } + router.handle(req, res, done); + }; + app.use = function use(fn) { + var offset = 0; + var path = "/"; + if (typeof fn !== "function") { + var arg = fn; + while (Array.isArray(arg) && arg.length !== 0) { + arg = arg[0]; + } + if (typeof arg !== "function") { + offset = 1; + path = fn; + } + } + var fns = flatten(slice.call(arguments, offset)); + if (fns.length === 0) { + throw new TypeError("app.use() requires a middleware function"); + } + this.lazyrouter(); + var router = this._router; + fns.forEach(function(fn2) { + if (!fn2 || !fn2.handle || !fn2.set) { + return router.use(path, fn2); + } + debug(".use app under %s", path); + fn2.mountpath = path; + fn2.parent = this; + router.use(path, function mounted_app(req, res, next) { + var orig = req.app; + fn2.handle(req, res, function(err) { + setPrototypeOf(req, orig.request); + setPrototypeOf(res, orig.response); + next(err); + }); + }); + fn2.emit("mount", this); + }, this); + return this; + }; + app.route = function route(path) { + this.lazyrouter(); + return this._router.route(path); + }; + app.engine = function engine(ext, fn) { + if (typeof fn !== "function") { + throw new Error("callback function required"); + } + var extension = ext[0] !== "." ? "." + ext : ext; + this.engines[extension] = fn; + return this; + }; + app.param = function param(name, fn) { + this.lazyrouter(); + if (Array.isArray(name)) { + for (var i = 0; i < name.length; i++) { + this.param(name[i], fn); + } + return this; + } + this._router.param(name, fn); + return this; + }; + app.set = function set(setting, val) { + if (arguments.length === 1) { + var settings = this.settings; + while (settings && settings !== Object.prototype) { + if (hasOwnProperty.call(settings, setting)) { + return settings[setting]; + } + settings = Object.getPrototypeOf(settings); + } + return void 0; + } + debug('set "%s" to %o', setting, val); + this.settings[setting] = val; + switch (setting) { + case "etag": + this.set("etag fn", compileETag(val)); + break; + case "query parser": + this.set("query parser fn", compileQueryParser(val)); + break; + case "trust proxy": + this.set("trust proxy fn", compileTrust(val)); + Object.defineProperty(this.settings, trustProxyDefaultSymbol, { + configurable: true, + value: false + }); + break; + } + return this; + }; + app.path = function path() { + return this.parent ? this.parent.path() + this.mountpath : ""; + }; + app.enabled = function enabled(setting) { + return Boolean(this.set(setting)); + }; + app.disabled = function disabled(setting) { + return !this.set(setting); + }; + app.enable = function enable(setting) { + return this.set(setting, true); + }; + app.disable = function disable(setting) { + return this.set(setting, false); + }; + methods.forEach(function(method) { + app[method] = function(path) { + if (method === "get" && arguments.length === 1) { + return this.set(path); + } + this.lazyrouter(); + var route = this._router.route(path); + route[method].apply(route, slice.call(arguments, 1)); + return this; + }; + }); + app.all = function all(path) { + this.lazyrouter(); + var route = this._router.route(path); + var args = slice.call(arguments, 1); + for (var i = 0; i < methods.length; i++) { + route[methods[i]].apply(route, args); + } + return this; + }; + app.del = deprecate.function(app.delete, "app.del: Use app.delete instead"); + app.render = function render(name, options, callback) { + var cache = this.cache; + var done = callback; + var engines = this.engines; + var opts = options; + var renderOptions = {}; + var view; + if (typeof options === "function") { + done = options; + opts = {}; + } + merge(renderOptions, this.locals); + if (opts._locals) { + merge(renderOptions, opts._locals); + } + merge(renderOptions, opts); + if (renderOptions.cache == null) { + renderOptions.cache = this.enabled("view cache"); + } + if (renderOptions.cache) { + view = cache[name]; + } + if (!view) { + var View2 = this.get("view"); + view = new View2(name, { + defaultEngine: this.get("view engine"), + root: this.get("views"), + engines + }); + if (!view.path) { + var dirs = Array.isArray(view.root) && view.root.length > 1 ? 'directories "' + view.root.slice(0, -1).join('", "') + '" or "' + view.root[view.root.length - 1] + '"' : 'directory "' + view.root + '"'; + var err = new Error('Failed to lookup view "' + name + '" in views ' + dirs); + err.view = view; + return done(err); + } + if (renderOptions.cache) { + cache[name] = view; + } + } + tryRender(view, renderOptions, done); + }; + app.listen = function listen() { + var server = http.createServer(this); + return server.listen.apply(server, arguments); + }; + function logerror(err) { + if (this.get("env") !== "test") console.error(err.stack || err.toString()); + } + function tryRender(view, options, callback) { + try { + view.render(options, callback); + } catch (err) { + callback(err); + } + } + } +}); + +// ../../node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/lib/charset.js +var require_charset = __commonJS({ + "../../node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/lib/charset.js"(exports2, module2) { + "use strict"; + module2.exports = preferredCharsets; + module2.exports.preferredCharsets = preferredCharsets; + var simpleCharsetRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/; + function parseAcceptCharset(accept) { + var accepts = accept.split(","); + for (var i = 0, j = 0; i < accepts.length; i++) { + var charset = parseCharset(accepts[i].trim(), i); + if (charset) { + accepts[j++] = charset; + } + } + accepts.length = j; + return accepts; + } + function parseCharset(str, i) { + var match = simpleCharsetRegExp.exec(str); + if (!match) return null; + var charset = match[1]; + var q = 1; + if (match[2]) { + var params = match[2].split(";"); + for (var j = 0; j < params.length; j++) { + var p = params[j].trim().split("="); + if (p[0] === "q") { + q = parseFloat(p[1]); + break; + } + } + } + return { + charset, + q, + i + }; + } + function getCharsetPriority(charset, accepted, index) { + var priority = { o: -1, q: 0, s: 0 }; + for (var i = 0; i < accepted.length; i++) { + var spec = specify(charset, accepted[i], index); + if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { + priority = spec; + } + } + return priority; + } + function specify(charset, spec, index) { + var s = 0; + if (spec.charset.toLowerCase() === charset.toLowerCase()) { + s |= 1; + } else if (spec.charset !== "*") { + return null; + } + return { + i: index, + o: spec.i, + q: spec.q, + s + }; + } + function preferredCharsets(accept, provided) { + var accepts = parseAcceptCharset(accept === void 0 ? "*" : accept || ""); + if (!provided) { + return accepts.filter(isQuality).sort(compareSpecs).map(getFullCharset); + } + var priorities = provided.map(function getPriority(type, index) { + return getCharsetPriority(type, accepts, index); + }); + return priorities.filter(isQuality).sort(compareSpecs).map(function getCharset(priority) { + return provided[priorities.indexOf(priority)]; + }); + } + function compareSpecs(a, b) { + return b.q - a.q || b.s - a.s || a.o - b.o || a.i - b.i || 0; + } + function getFullCharset(spec) { + return spec.charset; + } + function isQuality(spec) { + return spec.q > 0; + } + } +}); + +// ../../node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/lib/encoding.js +var require_encoding = __commonJS({ + "../../node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/lib/encoding.js"(exports2, module2) { + "use strict"; + module2.exports = preferredEncodings; + module2.exports.preferredEncodings = preferredEncodings; + var simpleEncodingRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/; + function parseAcceptEncoding(accept) { + var accepts = accept.split(","); + var hasIdentity = false; + var minQuality = 1; + for (var i = 0, j = 0; i < accepts.length; i++) { + var encoding = parseEncoding(accepts[i].trim(), i); + if (encoding) { + accepts[j++] = encoding; + hasIdentity = hasIdentity || specify("identity", encoding); + minQuality = Math.min(minQuality, encoding.q || 1); + } + } + if (!hasIdentity) { + accepts[j++] = { + encoding: "identity", + q: minQuality, + i + }; + } + accepts.length = j; + return accepts; + } + function parseEncoding(str, i) { + var match = simpleEncodingRegExp.exec(str); + if (!match) return null; + var encoding = match[1]; + var q = 1; + if (match[2]) { + var params = match[2].split(";"); + for (var j = 0; j < params.length; j++) { + var p = params[j].trim().split("="); + if (p[0] === "q") { + q = parseFloat(p[1]); + break; + } + } + } + return { + encoding, + q, + i + }; + } + function getEncodingPriority(encoding, accepted, index) { + var priority = { o: -1, q: 0, s: 0 }; + for (var i = 0; i < accepted.length; i++) { + var spec = specify(encoding, accepted[i], index); + if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { + priority = spec; + } + } + return priority; + } + function specify(encoding, spec, index) { + var s = 0; + if (spec.encoding.toLowerCase() === encoding.toLowerCase()) { + s |= 1; + } else if (spec.encoding !== "*") { + return null; + } + return { + i: index, + o: spec.i, + q: spec.q, + s + }; + } + function preferredEncodings(accept, provided) { + var accepts = parseAcceptEncoding(accept || ""); + if (!provided) { + return accepts.filter(isQuality).sort(compareSpecs).map(getFullEncoding); + } + var priorities = provided.map(function getPriority(type, index) { + return getEncodingPriority(type, accepts, index); + }); + return priorities.filter(isQuality).sort(compareSpecs).map(function getEncoding(priority) { + return provided[priorities.indexOf(priority)]; + }); + } + function compareSpecs(a, b) { + return b.q - a.q || b.s - a.s || a.o - b.o || a.i - b.i || 0; + } + function getFullEncoding(spec) { + return spec.encoding; + } + function isQuality(spec) { + return spec.q > 0; + } + } +}); + +// ../../node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/lib/language.js +var require_language = __commonJS({ + "../../node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/lib/language.js"(exports2, module2) { + "use strict"; + module2.exports = preferredLanguages; + module2.exports.preferredLanguages = preferredLanguages; + var simpleLanguageRegExp = /^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/; + function parseAcceptLanguage(accept) { + var accepts = accept.split(","); + for (var i = 0, j = 0; i < accepts.length; i++) { + var language = parseLanguage(accepts[i].trim(), i); + if (language) { + accepts[j++] = language; + } + } + accepts.length = j; + return accepts; + } + function parseLanguage(str, i) { + var match = simpleLanguageRegExp.exec(str); + if (!match) return null; + var prefix = match[1]; + var suffix = match[2]; + var full = prefix; + if (suffix) full += "-" + suffix; + var q = 1; + if (match[3]) { + var params = match[3].split(";"); + for (var j = 0; j < params.length; j++) { + var p = params[j].split("="); + if (p[0] === "q") q = parseFloat(p[1]); + } + } + return { + prefix, + suffix, + q, + i, + full + }; + } + function getLanguagePriority(language, accepted, index) { + var priority = { o: -1, q: 0, s: 0 }; + for (var i = 0; i < accepted.length; i++) { + var spec = specify(language, accepted[i], index); + if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { + priority = spec; + } + } + return priority; + } + function specify(language, spec, index) { + var p = parseLanguage(language); + if (!p) return null; + var s = 0; + if (spec.full.toLowerCase() === p.full.toLowerCase()) { + s |= 4; + } else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) { + s |= 2; + } else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) { + s |= 1; + } else if (spec.full !== "*") { + return null; + } + return { + i: index, + o: spec.i, + q: spec.q, + s + }; + } + function preferredLanguages(accept, provided) { + var accepts = parseAcceptLanguage(accept === void 0 ? "*" : accept || ""); + if (!provided) { + return accepts.filter(isQuality).sort(compareSpecs).map(getFullLanguage); + } + var priorities = provided.map(function getPriority(type, index) { + return getLanguagePriority(type, accepts, index); + }); + return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) { + return provided[priorities.indexOf(priority)]; + }); + } + function compareSpecs(a, b) { + return b.q - a.q || b.s - a.s || a.o - b.o || a.i - b.i || 0; + } + function getFullLanguage(spec) { + return spec.full; + } + function isQuality(spec) { + return spec.q > 0; + } + } +}); + +// ../../node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/lib/mediaType.js +var require_mediaType = __commonJS({ + "../../node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/lib/mediaType.js"(exports2, module2) { + "use strict"; + module2.exports = preferredMediaTypes; + module2.exports.preferredMediaTypes = preferredMediaTypes; + var simpleMediaTypeRegExp = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/; + function parseAccept(accept) { + var accepts = splitMediaTypes(accept); + for (var i = 0, j = 0; i < accepts.length; i++) { + var mediaType = parseMediaType(accepts[i].trim(), i); + if (mediaType) { + accepts[j++] = mediaType; + } + } + accepts.length = j; + return accepts; + } + function parseMediaType(str, i) { + var match = simpleMediaTypeRegExp.exec(str); + if (!match) return null; + var params = /* @__PURE__ */ Object.create(null); + var q = 1; + var subtype = match[2]; + var type = match[1]; + if (match[3]) { + var kvps = splitParameters(match[3]).map(splitKeyValuePair); + for (var j = 0; j < kvps.length; j++) { + var pair = kvps[j]; + var key = pair[0].toLowerCase(); + var val = pair[1]; + var value = val && val[0] === '"' && val[val.length - 1] === '"' ? val.substr(1, val.length - 2) : val; + if (key === "q") { + q = parseFloat(value); + break; + } + params[key] = value; + } + } + return { + type, + subtype, + params, + q, + i + }; + } + function getMediaTypePriority(type, accepted, index) { + var priority = { o: -1, q: 0, s: 0 }; + for (var i = 0; i < accepted.length; i++) { + var spec = specify(type, accepted[i], index); + if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { + priority = spec; + } + } + return priority; + } + function specify(type, spec, index) { + var p = parseMediaType(type); + var s = 0; + if (!p) { + return null; + } + if (spec.type.toLowerCase() == p.type.toLowerCase()) { + s |= 4; + } else if (spec.type != "*") { + return null; + } + if (spec.subtype.toLowerCase() == p.subtype.toLowerCase()) { + s |= 2; + } else if (spec.subtype != "*") { + return null; + } + var keys = Object.keys(spec.params); + if (keys.length > 0) { + if (keys.every(function(k) { + return spec.params[k] == "*" || (spec.params[k] || "").toLowerCase() == (p.params[k] || "").toLowerCase(); + })) { + s |= 1; + } else { + return null; + } + } + return { + i: index, + o: spec.i, + q: spec.q, + s + }; + } + function preferredMediaTypes(accept, provided) { + var accepts = parseAccept(accept === void 0 ? "*/*" : accept || ""); + if (!provided) { + return accepts.filter(isQuality).sort(compareSpecs).map(getFullType); + } + var priorities = provided.map(function getPriority(type, index) { + return getMediaTypePriority(type, accepts, index); + }); + return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) { + return provided[priorities.indexOf(priority)]; + }); + } + function compareSpecs(a, b) { + return b.q - a.q || b.s - a.s || a.o - b.o || a.i - b.i || 0; + } + function getFullType(spec) { + return spec.type + "/" + spec.subtype; + } + function isQuality(spec) { + return spec.q > 0; + } + function quoteCount(string) { + var count = 0; + var index = 0; + while ((index = string.indexOf('"', index)) !== -1) { + count++; + index++; + } + return count; + } + function splitKeyValuePair(str) { + var index = str.indexOf("="); + var key; + var val; + if (index === -1) { + key = str; + } else { + key = str.substr(0, index); + val = str.substr(index + 1); + } + return [key, val]; + } + function splitMediaTypes(accept) { + var accepts = accept.split(","); + for (var i = 1, j = 0; i < accepts.length; i++) { + if (quoteCount(accepts[j]) % 2 == 0) { + accepts[++j] = accepts[i]; + } else { + accepts[j] += "," + accepts[i]; + } + } + accepts.length = j + 1; + return accepts; + } + function splitParameters(str) { + var parameters = str.split(";"); + for (var i = 1, j = 0; i < parameters.length; i++) { + if (quoteCount(parameters[j]) % 2 == 0) { + parameters[++j] = parameters[i]; + } else { + parameters[j] += ";" + parameters[i]; + } + } + parameters.length = j + 1; + for (var i = 0; i < parameters.length; i++) { + parameters[i] = parameters[i].trim(); + } + return parameters; + } + } +}); + +// ../../node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/index.js +var require_negotiator = __commonJS({ + "../../node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/index.js"(exports2, module2) { + "use strict"; + var preferredCharsets = require_charset(); + var preferredEncodings = require_encoding(); + var preferredLanguages = require_language(); + var preferredMediaTypes = require_mediaType(); + module2.exports = Negotiator; + module2.exports.Negotiator = Negotiator; + function Negotiator(request) { + if (!(this instanceof Negotiator)) { + return new Negotiator(request); + } + this.request = request; + } + Negotiator.prototype.charset = function charset(available) { + var set = this.charsets(available); + return set && set[0]; + }; + Negotiator.prototype.charsets = function charsets(available) { + return preferredCharsets(this.request.headers["accept-charset"], available); + }; + Negotiator.prototype.encoding = function encoding(available) { + var set = this.encodings(available); + return set && set[0]; + }; + Negotiator.prototype.encodings = function encodings(available) { + return preferredEncodings(this.request.headers["accept-encoding"], available); + }; + Negotiator.prototype.language = function language(available) { + var set = this.languages(available); + return set && set[0]; + }; + Negotiator.prototype.languages = function languages(available) { + return preferredLanguages(this.request.headers["accept-language"], available); + }; + Negotiator.prototype.mediaType = function mediaType(available) { + var set = this.mediaTypes(available); + return set && set[0]; + }; + Negotiator.prototype.mediaTypes = function mediaTypes(available) { + return preferredMediaTypes(this.request.headers.accept, available); + }; + Negotiator.prototype.preferredCharset = Negotiator.prototype.charset; + Negotiator.prototype.preferredCharsets = Negotiator.prototype.charsets; + Negotiator.prototype.preferredEncoding = Negotiator.prototype.encoding; + Negotiator.prototype.preferredEncodings = Negotiator.prototype.encodings; + Negotiator.prototype.preferredLanguage = Negotiator.prototype.language; + Negotiator.prototype.preferredLanguages = Negotiator.prototype.languages; + Negotiator.prototype.preferredMediaType = Negotiator.prototype.mediaType; + Negotiator.prototype.preferredMediaTypes = Negotiator.prototype.mediaTypes; + } +}); + +// ../../node_modules/.pnpm/accepts@1.3.8/node_modules/accepts/index.js +var require_accepts = __commonJS({ + "../../node_modules/.pnpm/accepts@1.3.8/node_modules/accepts/index.js"(exports2, module2) { + "use strict"; + var Negotiator = require_negotiator(); + var mime = require_mime_types(); + module2.exports = Accepts; + function Accepts(req) { + if (!(this instanceof Accepts)) { + return new Accepts(req); + } + this.headers = req.headers; + this.negotiator = new Negotiator(req); + } + Accepts.prototype.type = Accepts.prototype.types = function(types_) { + var types = types_; + if (types && !Array.isArray(types)) { + types = new Array(arguments.length); + for (var i = 0; i < types.length; i++) { + types[i] = arguments[i]; + } + } + if (!types || types.length === 0) { + return this.negotiator.mediaTypes(); + } + if (!this.headers.accept) { + return types[0]; + } + var mimes = types.map(extToMime); + var accepts = this.negotiator.mediaTypes(mimes.filter(validMime)); + var first = accepts[0]; + return first ? types[mimes.indexOf(first)] : false; + }; + Accepts.prototype.encoding = Accepts.prototype.encodings = function(encodings_) { + var encodings = encodings_; + if (encodings && !Array.isArray(encodings)) { + encodings = new Array(arguments.length); + for (var i = 0; i < encodings.length; i++) { + encodings[i] = arguments[i]; + } + } + if (!encodings || encodings.length === 0) { + return this.negotiator.encodings(); + } + return this.negotiator.encodings(encodings)[0] || false; + }; + Accepts.prototype.charset = Accepts.prototype.charsets = function(charsets_) { + var charsets = charsets_; + if (charsets && !Array.isArray(charsets)) { + charsets = new Array(arguments.length); + for (var i = 0; i < charsets.length; i++) { + charsets[i] = arguments[i]; + } + } + if (!charsets || charsets.length === 0) { + return this.negotiator.charsets(); + } + return this.negotiator.charsets(charsets)[0] || false; + }; + Accepts.prototype.lang = Accepts.prototype.langs = Accepts.prototype.language = Accepts.prototype.languages = function(languages_) { + var languages = languages_; + if (languages && !Array.isArray(languages)) { + languages = new Array(arguments.length); + for (var i = 0; i < languages.length; i++) { + languages[i] = arguments[i]; + } + } + if (!languages || languages.length === 0) { + return this.negotiator.languages(); + } + return this.negotiator.languages(languages)[0] || false; + }; + function extToMime(type) { + return type.indexOf("/") === -1 ? mime.lookup(type) : type; + } + function validMime(type) { + return typeof type === "string"; + } + } +}); + +// ../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/request.js +var require_request = __commonJS({ + "../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/request.js"(exports2, module2) { + "use strict"; + var accepts = require_accepts(); + var deprecate = require_depd()("express"); + var isIP = require("net").isIP; + var typeis = require_type_is(); + var http = require("http"); + var fresh = require_fresh(); + var parseRange = require_range_parser(); + var parse2 = require_parseurl(); + var proxyaddr = require_proxy_addr(); + var req = Object.create(http.IncomingMessage.prototype); + module2.exports = req; + req.get = req.header = function header(name) { + if (!name) { + throw new TypeError("name argument is required to req.get"); + } + if (typeof name !== "string") { + throw new TypeError("name must be a string to req.get"); + } + var lc = name.toLowerCase(); + switch (lc) { + case "referer": + case "referrer": + return this.headers.referrer || this.headers.referer; + default: + return this.headers[lc]; + } + }; + req.accepts = function() { + var accept = accepts(this); + return accept.types.apply(accept, arguments); + }; + req.acceptsEncodings = function() { + var accept = accepts(this); + return accept.encodings.apply(accept, arguments); + }; + req.acceptsEncoding = deprecate.function( + req.acceptsEncodings, + "req.acceptsEncoding: Use acceptsEncodings instead" + ); + req.acceptsCharsets = function() { + var accept = accepts(this); + return accept.charsets.apply(accept, arguments); + }; + req.acceptsCharset = deprecate.function( + req.acceptsCharsets, + "req.acceptsCharset: Use acceptsCharsets instead" + ); + req.acceptsLanguages = function() { + var accept = accepts(this); + return accept.languages.apply(accept, arguments); + }; + req.acceptsLanguage = deprecate.function( + req.acceptsLanguages, + "req.acceptsLanguage: Use acceptsLanguages instead" + ); + req.range = function range(size, options) { + var range2 = this.get("Range"); + if (!range2) return; + return parseRange(size, range2, options); + }; + req.param = function param(name, defaultValue) { + var params = this.params || {}; + var body = this.body || {}; + var query = this.query || {}; + var args = arguments.length === 1 ? "name" : "name, default"; + deprecate("req.param(" + args + "): Use req.params, req.body, or req.query instead"); + if (null != params[name] && params.hasOwnProperty(name)) return params[name]; + if (null != body[name]) return body[name]; + if (null != query[name]) return query[name]; + return defaultValue; + }; + req.is = function is(types) { + var arr = types; + if (!Array.isArray(types)) { + arr = new Array(arguments.length); + for (var i = 0; i < arr.length; i++) { + arr[i] = arguments[i]; + } + } + return typeis(this, arr); + }; + defineGetter(req, "protocol", function protocol() { + var proto = this.connection.encrypted ? "https" : "http"; + var trust = this.app.get("trust proxy fn"); + if (!trust(this.connection.remoteAddress, 0)) { + return proto; + } + var header = this.get("X-Forwarded-Proto") || proto; + var index = header.indexOf(","); + return index !== -1 ? header.substring(0, index).trim() : header.trim(); + }); + defineGetter(req, "secure", function secure() { + return this.protocol === "https"; + }); + defineGetter(req, "ip", function ip() { + var trust = this.app.get("trust proxy fn"); + return proxyaddr(this, trust); + }); + defineGetter(req, "ips", function ips() { + var trust = this.app.get("trust proxy fn"); + var addrs = proxyaddr.all(this, trust); + addrs.reverse().pop(); + return addrs; + }); + defineGetter(req, "subdomains", function subdomains() { + var hostname = this.hostname; + if (!hostname) return []; + var offset = this.app.get("subdomain offset"); + var subdomains2 = !isIP(hostname) ? hostname.split(".").reverse() : [hostname]; + return subdomains2.slice(offset); + }); + defineGetter(req, "path", function path() { + return parse2(this).pathname; + }); + defineGetter(req, "hostname", function hostname() { + var trust = this.app.get("trust proxy fn"); + var host = this.get("X-Forwarded-Host"); + if (!host || !trust(this.connection.remoteAddress, 0)) { + host = this.get("Host"); + } else if (host.indexOf(",") !== -1) { + host = host.substring(0, host.indexOf(",")).trimRight(); + } + if (!host) return; + var offset = host[0] === "[" ? host.indexOf("]") + 1 : 0; + var index = host.indexOf(":", offset); + return index !== -1 ? host.substring(0, index) : host; + }); + defineGetter(req, "host", deprecate.function(function host() { + return this.hostname; + }, "req.host: Use req.hostname instead")); + defineGetter(req, "fresh", function() { + var method = this.method; + var res = this.res; + var status = res.statusCode; + if ("GET" !== method && "HEAD" !== method) return false; + if (status >= 200 && status < 300 || 304 === status) { + return fresh(this.headers, { + "etag": res.get("ETag"), + "last-modified": res.get("Last-Modified") + }); + } + return false; + }); + defineGetter(req, "stale", function stale() { + return !this.fresh; + }); + defineGetter(req, "xhr", function xhr() { + var val = this.get("X-Requested-With") || ""; + return val.toLowerCase() === "xmlhttprequest"; + }); + function defineGetter(obj2, name, getter) { + Object.defineProperty(obj2, name, { + configurable: true, + enumerable: true, + get: getter + }); + } + } +}); + +// ../../node_modules/.pnpm/cookie-signature@1.0.7/node_modules/cookie-signature/index.js +var require_cookie_signature = __commonJS({ + "../../node_modules/.pnpm/cookie-signature@1.0.7/node_modules/cookie-signature/index.js"(exports2) { + var crypto5 = require("crypto"); + exports2.sign = function(val, secret) { + if ("string" !== typeof val) throw new TypeError("Cookie value must be provided as a string."); + if (null == secret) throw new TypeError("Secret key must be provided."); + return val + "." + crypto5.createHmac("sha256", secret).update(val).digest("base64").replace(/\=+$/, ""); + }; + exports2.unsign = function(val, secret) { + if ("string" !== typeof val) throw new TypeError("Signed cookie string must be provided."); + if (null == secret) throw new TypeError("Secret key must be provided."); + var str = val.slice(0, val.lastIndexOf(".")), mac = exports2.sign(str, secret); + return sha12(mac) == sha12(val) ? str : false; + }; + function sha12(str) { + return crypto5.createHash("sha1").update(str).digest("hex"); + } + } +}); + +// ../../node_modules/.pnpm/cookie@0.7.2/node_modules/cookie/index.js +var require_cookie = __commonJS({ + "../../node_modules/.pnpm/cookie@0.7.2/node_modules/cookie/index.js"(exports2) { + "use strict"; + exports2.parse = parse2; + exports2.serialize = serialize; + var __toString = Object.prototype.toString; + var __hasOwnProperty = Object.prototype.hasOwnProperty; + var cookieNameRegExp = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/; + var cookieValueRegExp = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/; + var domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i; + var pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/; + function parse2(str, opt) { + if (typeof str !== "string") { + throw new TypeError("argument str must be a string"); + } + var obj2 = {}; + var len = str.length; + if (len < 2) return obj2; + var dec = opt && opt.decode || decode; + var index = 0; + var eqIdx = 0; + var endIdx = 0; + do { + eqIdx = str.indexOf("=", index); + if (eqIdx === -1) break; + endIdx = str.indexOf(";", index); + if (endIdx === -1) { + endIdx = len; + } else if (eqIdx > endIdx) { + index = str.lastIndexOf(";", eqIdx - 1) + 1; + continue; + } + var keyStartIdx = startIndex(str, index, eqIdx); + var keyEndIdx = endIndex(str, eqIdx, keyStartIdx); + var key = str.slice(keyStartIdx, keyEndIdx); + if (!__hasOwnProperty.call(obj2, key)) { + var valStartIdx = startIndex(str, eqIdx + 1, endIdx); + var valEndIdx = endIndex(str, endIdx, valStartIdx); + if (str.charCodeAt(valStartIdx) === 34 && str.charCodeAt(valEndIdx - 1) === 34) { + valStartIdx++; + valEndIdx--; + } + var val = str.slice(valStartIdx, valEndIdx); + obj2[key] = tryDecode(val, dec); + } + index = endIdx + 1; + } while (index < len); + return obj2; + } + function startIndex(str, index, max) { + do { + var code = str.charCodeAt(index); + if (code !== 32 && code !== 9) return index; + } while (++index < max); + return max; + } + function endIndex(str, index, min) { + while (index > min) { + var code = str.charCodeAt(--index); + if (code !== 32 && code !== 9) return index + 1; + } + return min; + } + function serialize(name, val, opt) { + var enc = opt && opt.encode || encodeURIComponent; + if (typeof enc !== "function") { + throw new TypeError("option encode is invalid"); + } + if (!cookieNameRegExp.test(name)) { + throw new TypeError("argument name is invalid"); + } + var value = enc(val); + if (!cookieValueRegExp.test(value)) { + throw new TypeError("argument val is invalid"); + } + var str = name + "=" + value; + if (!opt) return str; + if (null != opt.maxAge) { + var maxAge = Math.floor(opt.maxAge); + if (!isFinite(maxAge)) { + throw new TypeError("option maxAge is invalid"); + } + str += "; Max-Age=" + maxAge; + } + if (opt.domain) { + if (!domainValueRegExp.test(opt.domain)) { + throw new TypeError("option domain is invalid"); + } + str += "; Domain=" + opt.domain; + } + if (opt.path) { + if (!pathValueRegExp.test(opt.path)) { + throw new TypeError("option path is invalid"); + } + str += "; Path=" + opt.path; + } + if (opt.expires) { + var expires = opt.expires; + if (!isDate(expires) || isNaN(expires.valueOf())) { + throw new TypeError("option expires is invalid"); + } + str += "; Expires=" + expires.toUTCString(); + } + if (opt.httpOnly) { + str += "; HttpOnly"; + } + if (opt.secure) { + str += "; Secure"; + } + if (opt.partitioned) { + str += "; Partitioned"; + } + if (opt.priority) { + var priority = typeof opt.priority === "string" ? opt.priority.toLowerCase() : opt.priority; + switch (priority) { + case "low": + str += "; Priority=Low"; + break; + case "medium": + str += "; Priority=Medium"; + break; + case "high": + str += "; Priority=High"; + break; + default: + throw new TypeError("option priority is invalid"); + } + } + if (opt.sameSite) { + var sameSite = typeof opt.sameSite === "string" ? opt.sameSite.toLowerCase() : opt.sameSite; + switch (sameSite) { + case true: + str += "; SameSite=Strict"; + break; + case "lax": + str += "; SameSite=Lax"; + break; + case "strict": + str += "; SameSite=Strict"; + break; + case "none": + str += "; SameSite=None"; + break; + default: + throw new TypeError("option sameSite is invalid"); + } + } + return str; + } + function decode(str) { + return str.indexOf("%") !== -1 ? decodeURIComponent(str) : str; + } + function isDate(val) { + return __toString.call(val) === "[object Date]"; + } + function tryDecode(str, decode2) { + try { + return decode2(str); + } catch (e) { + return str; + } + } + } +}); + +// ../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/response.js +var require_response = __commonJS({ + "../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/response.js"(exports2, module2) { + "use strict"; + var Buffer2 = require_safe_buffer().Buffer; + var contentDisposition = require_content_disposition(); + var createError = require_http_errors(); + var deprecate = require_depd()("express"); + var encodeUrl = require_encodeurl(); + var escapeHtml = require_escape_html(); + var http = require("http"); + var isAbsolute = require_utils11().isAbsolute; + var onFinished = require_on_finished(); + var path = require("path"); + var statuses = require_statuses(); + var merge = require_utils_merge(); + var sign = require_cookie_signature().sign; + var normalizeType = require_utils11().normalizeType; + var normalizeTypes = require_utils11().normalizeTypes; + var setCharset = require_utils11().setCharset; + var cookie = require_cookie(); + var send = require_send(); + var extname = path.extname; + var mime = send.mime; + var resolve = path.resolve; + var vary = require_vary(); + var res = Object.create(http.ServerResponse.prototype); + module2.exports = res; + var charsetRegExp = /;\s*charset\s*=/; + res.status = function status(code) { + if ((typeof code === "string" || Math.floor(code) !== code) && code > 99 && code < 1e3) { + deprecate("res.status(" + JSON.stringify(code) + "): use res.status(" + Math.floor(code) + ") instead"); + } + this.statusCode = code; + return this; + }; + res.links = function(links) { + var link = this.get("Link") || ""; + if (link) link += ", "; + return this.set("Link", link + Object.keys(links).map(function(rel) { + return "<" + links[rel] + '>; rel="' + rel + '"'; + }).join(", ")); + }; + res.send = function send2(body) { + var chunk = body; + var encoding; + var req = this.req; + var type; + var app = this.app; + if (arguments.length === 2) { + if (typeof arguments[0] !== "number" && typeof arguments[1] === "number") { + deprecate("res.send(body, status): Use res.status(status).send(body) instead"); + this.statusCode = arguments[1]; + } else { + deprecate("res.send(status, body): Use res.status(status).send(body) instead"); + this.statusCode = arguments[0]; + chunk = arguments[1]; + } + } + if (typeof chunk === "number" && arguments.length === 1) { + if (!this.get("Content-Type")) { + this.type("txt"); + } + deprecate("res.send(status): Use res.sendStatus(status) instead"); + this.statusCode = chunk; + chunk = statuses.message[chunk]; + } + switch (typeof chunk) { + // string defaulting to html + case "string": + if (!this.get("Content-Type")) { + this.type("html"); + } + break; + case "boolean": + case "number": + case "object": + if (chunk === null) { + chunk = ""; + } else if (Buffer2.isBuffer(chunk)) { + if (!this.get("Content-Type")) { + this.type("bin"); + } + } else { + return this.json(chunk); + } + break; + } + if (typeof chunk === "string") { + encoding = "utf8"; + type = this.get("Content-Type"); + if (typeof type === "string") { + this.set("Content-Type", setCharset(type, "utf-8")); + } + } + var etagFn = app.get("etag fn"); + var generateETag = !this.get("ETag") && typeof etagFn === "function"; + var len; + if (chunk !== void 0) { + if (Buffer2.isBuffer(chunk)) { + len = chunk.length; + } else if (!generateETag && chunk.length < 1e3) { + len = Buffer2.byteLength(chunk, encoding); + } else { + chunk = Buffer2.from(chunk, encoding); + encoding = void 0; + len = chunk.length; + } + this.set("Content-Length", len); + } + var etag; + if (generateETag && len !== void 0) { + if (etag = etagFn(chunk, encoding)) { + this.set("ETag", etag); + } + } + if (req.fresh) this.statusCode = 304; + if (204 === this.statusCode || 304 === this.statusCode) { + this.removeHeader("Content-Type"); + this.removeHeader("Content-Length"); + this.removeHeader("Transfer-Encoding"); + chunk = ""; + } + if (this.statusCode === 205) { + this.set("Content-Length", "0"); + this.removeHeader("Transfer-Encoding"); + chunk = ""; + } + if (req.method === "HEAD") { + this.end(); + } else { + this.end(chunk, encoding); + } + return this; + }; + res.json = function json(obj2) { + var val = obj2; + if (arguments.length === 2) { + if (typeof arguments[1] === "number") { + deprecate("res.json(obj, status): Use res.status(status).json(obj) instead"); + this.statusCode = arguments[1]; + } else { + deprecate("res.json(status, obj): Use res.status(status).json(obj) instead"); + this.statusCode = arguments[0]; + val = arguments[1]; + } + } + var app = this.app; + var escape2 = app.get("json escape"); + var replacer = app.get("json replacer"); + var spaces = app.get("json spaces"); + var body = stringify2(val, replacer, spaces, escape2); + if (!this.get("Content-Type")) { + this.set("Content-Type", "application/json"); + } + return this.send(body); + }; + res.jsonp = function jsonp(obj2) { + var val = obj2; + if (arguments.length === 2) { + if (typeof arguments[1] === "number") { + deprecate("res.jsonp(obj, status): Use res.status(status).jsonp(obj) instead"); + this.statusCode = arguments[1]; + } else { + deprecate("res.jsonp(status, obj): Use res.status(status).jsonp(obj) instead"); + this.statusCode = arguments[0]; + val = arguments[1]; + } + } + var app = this.app; + var escape2 = app.get("json escape"); + var replacer = app.get("json replacer"); + var spaces = app.get("json spaces"); + var body = stringify2(val, replacer, spaces, escape2); + var callback = this.req.query[app.get("jsonp callback name")]; + if (!this.get("Content-Type")) { + this.set("X-Content-Type-Options", "nosniff"); + this.set("Content-Type", "application/json"); + } + if (Array.isArray(callback)) { + callback = callback[0]; + } + if (typeof callback === "string" && callback.length !== 0) { + this.set("X-Content-Type-Options", "nosniff"); + this.set("Content-Type", "text/javascript"); + callback = callback.replace(/[^\[\]\w$.]/g, ""); + if (body === void 0) { + body = ""; + } else if (typeof body === "string") { + body = body.replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029"); + } + body = "/**/ typeof " + callback + " === 'function' && " + callback + "(" + body + ");"; + } + return this.send(body); + }; + res.sendStatus = function sendStatus(statusCode) { + var body = statuses.message[statusCode] || String(statusCode); + this.statusCode = statusCode; + this.type("txt"); + return this.send(body); + }; + res.sendFile = function sendFile(path2, options, callback) { + var done = callback; + var req = this.req; + var res2 = this; + var next = req.next; + var opts = options || {}; + if (!path2) { + throw new TypeError("path argument is required to res.sendFile"); + } + if (typeof path2 !== "string") { + throw new TypeError("path must be a string to res.sendFile"); + } + if (typeof options === "function") { + done = options; + opts = {}; + } + if (!opts.root && !isAbsolute(path2)) { + throw new TypeError("path must be absolute or specify root to res.sendFile"); + } + var pathname = encodeURI(path2); + var file2 = send(req, pathname, opts); + sendfile(res2, file2, opts, function(err) { + if (done) return done(err); + if (err && err.code === "EISDIR") return next(); + if (err && err.code !== "ECONNABORTED" && err.syscall !== "write") { + next(err); + } + }); + }; + res.sendfile = function(path2, options, callback) { + var done = callback; + var req = this.req; + var res2 = this; + var next = req.next; + var opts = options || {}; + if (typeof options === "function") { + done = options; + opts = {}; + } + var file2 = send(req, path2, opts); + sendfile(res2, file2, opts, function(err) { + if (done) return done(err); + if (err && err.code === "EISDIR") return next(); + if (err && err.code !== "ECONNABORTED" && err.syscall !== "write") { + next(err); + } + }); + }; + res.sendfile = deprecate.function( + res.sendfile, + "res.sendfile: Use res.sendFile instead" + ); + res.download = function download(path2, filename, options, callback) { + var done = callback; + var name = filename; + var opts = options || null; + if (typeof filename === "function") { + done = filename; + name = null; + opts = null; + } else if (typeof options === "function") { + done = options; + opts = null; + } + if (typeof filename === "object" && (typeof options === "function" || options === void 0)) { + name = null; + opts = filename; + } + var headers = { + "Content-Disposition": contentDisposition(name || path2) + }; + if (opts && opts.headers) { + var keys = Object.keys(opts.headers); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key.toLowerCase() !== "content-disposition") { + headers[key] = opts.headers[key]; + } + } + } + opts = Object.create(opts); + opts.headers = headers; + var fullPath = !opts.root ? resolve(path2) : path2; + return this.sendFile(fullPath, opts, done); + }; + res.contentType = res.type = function contentType(type) { + var ct = type.indexOf("/") === -1 ? mime.lookup(type) : type; + return this.set("Content-Type", ct); + }; + res.format = function(obj2) { + var req = this.req; + var next = req.next; + var keys = Object.keys(obj2).filter(function(v) { + return v !== "default"; + }); + var key = keys.length > 0 ? req.accepts(keys) : false; + this.vary("Accept"); + if (key) { + this.set("Content-Type", normalizeType(key).value); + obj2[key](req, this, next); + } else if (obj2.default) { + obj2.default(req, this, next); + } else { + next(createError(406, { + types: normalizeTypes(keys).map(function(o) { + return o.value; + }) + })); + } + return this; + }; + res.attachment = function attachment(filename) { + if (filename) { + this.type(extname(filename)); + } + this.set("Content-Disposition", contentDisposition(filename)); + return this; + }; + res.append = function append(field, val) { + var prev = this.get(field); + var value = val; + if (prev) { + value = Array.isArray(prev) ? prev.concat(val) : Array.isArray(val) ? [prev].concat(val) : [prev, val]; + } + return this.set(field, value); + }; + res.set = res.header = function header(field, val) { + if (arguments.length === 2) { + var value = Array.isArray(val) ? val.map(String) : String(val); + if (field.toLowerCase() === "content-type") { + if (Array.isArray(value)) { + throw new TypeError("Content-Type cannot be set to an Array"); + } + if (!charsetRegExp.test(value)) { + var charset = mime.charsets.lookup(value.split(";")[0]); + if (charset) value += "; charset=" + charset.toLowerCase(); + } + } + this.setHeader(field, value); + } else { + for (var key in field) { + this.set(key, field[key]); + } + } + return this; + }; + res.get = function(field) { + return this.getHeader(field); + }; + res.clearCookie = function clearCookie(name, options) { + if (options) { + if (options.maxAge) { + deprecate('res.clearCookie: Passing "options.maxAge" is deprecated. In v5.0.0 of Express, this option will be ignored, as res.clearCookie will automatically set cookies to expire immediately. Please update your code to omit this option.'); + } + if (options.expires) { + deprecate('res.clearCookie: Passing "options.expires" is deprecated. In v5.0.0 of Express, this option will be ignored, as res.clearCookie will automatically set cookies to expire immediately. Please update your code to omit this option.'); + } + } + var opts = merge({ expires: /* @__PURE__ */ new Date(1), path: "/" }, options); + return this.cookie(name, "", opts); + }; + res.cookie = function(name, value, options) { + var opts = merge({}, options); + var secret = this.req.secret; + var signed = opts.signed; + if (signed && !secret) { + throw new Error('cookieParser("secret") required for signed cookies'); + } + var val = typeof value === "object" ? "j:" + JSON.stringify(value) : String(value); + if (signed) { + val = "s:" + sign(val, secret); + } + if (opts.maxAge != null) { + var maxAge = opts.maxAge - 0; + if (!isNaN(maxAge)) { + opts.expires = new Date(Date.now() + maxAge); + opts.maxAge = Math.floor(maxAge / 1e3); + } + } + if (opts.path == null) { + opts.path = "/"; + } + this.append("Set-Cookie", cookie.serialize(name, String(val), opts)); + return this; + }; + res.location = function location(url) { + var loc; + if (url === "back") { + deprecate('res.location("back"): use res.location(req.get("Referrer") || "/") and refer to https://dub.sh/security-redirect for best practices'); + loc = this.req.get("Referrer") || "/"; + } else { + loc = String(url); + } + return this.set("Location", encodeUrl(loc)); + }; + res.redirect = function redirect(url) { + var address = url; + var body; + var status = 302; + if (arguments.length === 2) { + if (typeof arguments[0] === "number") { + status = arguments[0]; + address = arguments[1]; + } else { + deprecate("res.redirect(url, status): Use res.redirect(status, url) instead"); + status = arguments[1]; + } + } + address = this.location(address).get("Location"); + this.format({ + text: function() { + body = statuses.message[status] + ". Redirecting to " + address; + }, + html: function() { + var u = escapeHtml(address); + body = "

" + statuses.message[status] + ". Redirecting to " + u + "

"; + }, + default: function() { + body = ""; + } + }); + this.statusCode = status; + this.set("Content-Length", Buffer2.byteLength(body)); + if (this.req.method === "HEAD") { + this.end(); + } else { + this.end(body); + } + }; + res.vary = function(field) { + if (!field || Array.isArray(field) && !field.length) { + deprecate("res.vary(): Provide a field name"); + return this; + } + vary(this, field); + return this; + }; + res.render = function render(view, options, callback) { + var app = this.req.app; + var done = callback; + var opts = options || {}; + var req = this.req; + var self2 = this; + if (typeof options === "function") { + done = options; + opts = {}; + } + opts._locals = self2.locals; + done = done || function(err, str) { + if (err) return req.next(err); + self2.send(str); + }; + app.render(view, opts, done); + }; + function sendfile(res2, file2, options, callback) { + var done = false; + var streaming; + function onaborted() { + if (done) return; + done = true; + var err = new Error("Request aborted"); + err.code = "ECONNABORTED"; + callback(err); + } + function ondirectory() { + if (done) return; + done = true; + var err = new Error("EISDIR, read"); + err.code = "EISDIR"; + callback(err); + } + function onerror(err) { + if (done) return; + done = true; + callback(err); + } + function onend() { + if (done) return; + done = true; + callback(); + } + function onfile() { + streaming = false; + } + function onfinish(err) { + if (err && err.code === "ECONNRESET") return onaborted(); + if (err) return onerror(err); + if (done) return; + setImmediate(function() { + if (streaming !== false && !done) { + onaborted(); + return; + } + if (done) return; + done = true; + callback(); + }); + } + function onstream() { + streaming = true; + } + file2.on("directory", ondirectory); + file2.on("end", onend); + file2.on("error", onerror); + file2.on("file", onfile); + file2.on("stream", onstream); + onFinished(res2, onfinish); + if (options.headers) { + file2.on("headers", function headers(res3) { + var obj2 = options.headers; + var keys = Object.keys(obj2); + for (var i = 0; i < keys.length; i++) { + var k = keys[i]; + res3.setHeader(k, obj2[k]); + } + }); + } + file2.pipe(res2); + } + function stringify2(value, replacer, spaces, escape2) { + var json = replacer || spaces ? JSON.stringify(value, replacer, spaces) : JSON.stringify(value); + if (escape2 && typeof json === "string") { + json = json.replace(/[<>&]/g, function(c) { + switch (c.charCodeAt(0)) { + case 60: + return "\\u003c"; + case 62: + return "\\u003e"; + case 38: + return "\\u0026"; + /* istanbul ignore next: unreachable default */ + default: + return c; + } + }); + } + return json; + } + } +}); + +// ../../node_modules/.pnpm/serve-static@1.16.3/node_modules/serve-static/index.js +var require_serve_static = __commonJS({ + "../../node_modules/.pnpm/serve-static@1.16.3/node_modules/serve-static/index.js"(exports2, module2) { + "use strict"; + var encodeUrl = require_encodeurl(); + var escapeHtml = require_escape_html(); + var parseUrl = require_parseurl(); + var resolve = require("path").resolve; + var send = require_send(); + var url = require("url"); + module2.exports = serveStatic; + module2.exports.mime = send.mime; + function serveStatic(root, options) { + if (!root) { + throw new TypeError("root path required"); + } + if (typeof root !== "string") { + throw new TypeError("root path must be a string"); + } + var opts = Object.create(options || null); + var fallthrough = opts.fallthrough !== false; + var redirect = opts.redirect !== false; + var setHeaders = opts.setHeaders; + if (setHeaders && typeof setHeaders !== "function") { + throw new TypeError("option setHeaders must be function"); + } + opts.maxage = opts.maxage || opts.maxAge || 0; + opts.root = resolve(root); + var onDirectory = redirect ? createRedirectDirectoryListener() : createNotFoundDirectoryListener(); + return function serveStatic2(req, res, next) { + if (req.method !== "GET" && req.method !== "HEAD") { + if (fallthrough) { + return next(); + } + res.statusCode = 405; + res.setHeader("Allow", "GET, HEAD"); + res.setHeader("Content-Length", "0"); + res.end(); + return; + } + var forwardError = !fallthrough; + var originalUrl = parseUrl.original(req); + var path = parseUrl(req).pathname; + if (path === "/" && originalUrl.pathname.substr(-1) !== "/") { + path = ""; + } + var stream = send(req, path, opts); + stream.on("directory", onDirectory); + if (setHeaders) { + stream.on("headers", setHeaders); + } + if (fallthrough) { + stream.on("file", function onFile() { + forwardError = true; + }); + } + stream.on("error", function error(err) { + if (forwardError || !(err.statusCode < 500)) { + next(err); + return; + } + next(); + }); + stream.pipe(res); + }; + } + function collapseLeadingSlashes(str) { + for (var i = 0; i < str.length; i++) { + if (str.charCodeAt(i) !== 47) { + break; + } + } + return i > 1 ? "/" + str.substr(i) : str; + } + function createHtmlDocument(title, body) { + return '\n\n\n\n' + title + "\n\n\n
" + body + "
\n\n\n"; + } + function createNotFoundDirectoryListener() { + return function notFound() { + this.error(404); + }; + } + function createRedirectDirectoryListener() { + return function redirect(res) { + if (this.hasTrailingSlash()) { + this.error(404); + return; + } + var originalUrl = parseUrl.original(this.req); + originalUrl.path = null; + originalUrl.pathname = collapseLeadingSlashes(originalUrl.pathname + "/"); + var loc = encodeUrl(url.format(originalUrl)); + var doc = createHtmlDocument("Redirecting", "Redirecting to " + escapeHtml(loc)); + res.statusCode = 301; + res.setHeader("Content-Type", "text/html; charset=UTF-8"); + res.setHeader("Content-Length", Buffer.byteLength(doc)); + res.setHeader("Content-Security-Policy", "default-src 'none'"); + res.setHeader("X-Content-Type-Options", "nosniff"); + res.setHeader("Location", loc); + res.end(doc); + }; + } + } +}); + +// ../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/express.js +var require_express = __commonJS({ + "../../node_modules/.pnpm/express@4.22.1/node_modules/express/lib/express.js"(exports2, module2) { + "use strict"; + var bodyParser = require_body_parser(); + var EventEmitter = require("events").EventEmitter; + var mixin = require_merge_descriptors(); + var proto = require_application(); + var Route = require_route(); + var Router = require_router(); + var req = require_request(); + var res = require_response(); + exports2 = module2.exports = createApplication; + function createApplication() { + var app = function(req2, res2, next) { + app.handle(req2, res2, next); + }; + mixin(app, EventEmitter.prototype, false); + mixin(app, proto, false); + app.request = Object.create(req, { + app: { configurable: true, enumerable: true, writable: true, value: app } + }); + app.response = Object.create(res, { + app: { configurable: true, enumerable: true, writable: true, value: app } + }); + app.init(); + return app; + } + exports2.application = proto; + exports2.request = req; + exports2.response = res; + exports2.Route = Route; + exports2.Router = Router; + exports2.json = bodyParser.json; + exports2.query = require_query(); + exports2.raw = bodyParser.raw; + exports2.static = require_serve_static(); + exports2.text = bodyParser.text; + exports2.urlencoded = bodyParser.urlencoded; + var removedMiddlewares = [ + "bodyParser", + "compress", + "cookieSession", + "session", + "logger", + "cookieParser", + "favicon", + "responseTime", + "errorHandler", + "timeout", + "methodOverride", + "vhost", + "csrf", + "directory", + "limit", + "multipart", + "staticCache" + ]; + removedMiddlewares.forEach(function(name) { + Object.defineProperty(exports2, name, { + get: function() { + throw new Error("Most middleware (like " + name + ") is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware."); + }, + configurable: true + }); + }); + } +}); + +// ../../node_modules/.pnpm/express@4.22.1/node_modules/express/index.js +var require_express2 = __commonJS({ + "../../node_modules/.pnpm/express@4.22.1/node_modules/express/index.js"(exports2, module2) { + "use strict"; + module2.exports = require_express(); + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/adapters/utils/get-body-parser-options.util.js +var require_get_body_parser_options_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/adapters/utils/get-body-parser-options.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyParserOptions = getBodyParserOptions; + var rawBodyParser = (req, _res, buffer) => { + if (Buffer.isBuffer(buffer)) { + req.rawBody = buffer; + } + return true; + }; + function getBodyParserOptions(rawBody, options) { + let parserOptions = options || {}; + if (rawBody === true) { + parserOptions = { + ...parserOptions, + verify: rawBodyParser + }; + } + return parserOptions; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/adapters/express-adapter.js +var require_express_adapter = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/adapters/express-adapter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ExpressAdapter = void 0; + var common_12 = require_common(); + var shared_utils_1 = require_shared_utils(); + var http_adapter_1 = require_http_adapter(); + var router_method_factory_1 = require_router_method_factory(); + var body_parser_1 = require_body_parser(); + var bodyparser = require_body_parser(); + var cors = require_lib4(); + var express = require_express2(); + var http = require("http"); + var https = require("https"); + var stream_1 = require("stream"); + var get_body_parser_options_util_1 = require_get_body_parser_options_util(); + var ExpressAdapter = class _ExpressAdapter extends http_adapter_1.AbstractHttpAdapter { + constructor(instance) { + super(instance || express()); + this.routerMethodFactory = new router_method_factory_1.RouterMethodFactory(); + this.logger = new common_12.Logger(_ExpressAdapter.name); + this.openConnections = /* @__PURE__ */ new Set(); + } + reply(response, body, statusCode) { + if (statusCode) { + response.status(statusCode); + } + if ((0, shared_utils_1.isNil)(body)) { + return response.send(); + } + if (body instanceof common_12.StreamableFile) { + const streamHeaders = body.getHeaders(); + if (response.getHeader("Content-Type") === void 0 && streamHeaders.type !== void 0) { + response.setHeader("Content-Type", streamHeaders.type); + } + if (response.getHeader("Content-Disposition") === void 0 && streamHeaders.disposition !== void 0) { + response.setHeader("Content-Disposition", streamHeaders.disposition); + } + if (response.getHeader("Content-Length") === void 0 && streamHeaders.length !== void 0) { + response.setHeader("Content-Length", streamHeaders.length); + } + return (0, stream_1.pipeline)(body.getStream().once("error", (err) => { + body.errorHandler(err, response); + }), response, (err) => { + if (err) { + body.errorLogger(err); + } + }); + } + const responseContentType = response.getHeader("Content-Type"); + if (typeof responseContentType === "string" && !responseContentType.startsWith("application/json") && body?.statusCode >= common_12.HttpStatus.BAD_REQUEST) { + this.logger.warn("Content-Type doesn't match Reply body, you might need a custom ExceptionFilter for non-JSON responses"); + response.setHeader("Content-Type", "application/json"); + } + return (0, shared_utils_1.isObject)(body) ? response.json(body) : response.send(String(body)); + } + status(response, statusCode) { + return response.status(statusCode); + } + end(response, message) { + return response.end(message); + } + render(response, view, options) { + return response.render(view, options); + } + redirect(response, statusCode, url) { + return response.redirect(statusCode, url); + } + setErrorHandler(handler, prefix) { + return this.use(handler); + } + setNotFoundHandler(handler, prefix) { + return this.use(handler); + } + isHeadersSent(response) { + return response.headersSent; + } + getHeader(response, name) { + return response.get(name); + } + setHeader(response, name, value) { + return response.set(name, value); + } + appendHeader(response, name, value) { + return response.append(name, value); + } + listen(port, ...args) { + return this.httpServer.listen(port, ...args); + } + close() { + this.closeOpenConnections(); + if (!this.httpServer) { + return void 0; + } + return new Promise((resolve) => this.httpServer.close(resolve)); + } + set(...args) { + return this.instance.set(...args); + } + enable(...args) { + return this.instance.enable(...args); + } + disable(...args) { + return this.instance.disable(...args); + } + engine(...args) { + return this.instance.engine(...args); + } + useStaticAssets(path, options) { + if (options && options.prefix) { + return this.use(options.prefix, express.static(path, options)); + } + return this.use(express.static(path, options)); + } + setBaseViewsDir(path) { + return this.set("views", path); + } + setViewEngine(engine) { + return this.set("view engine", engine); + } + getRequestHostname(request) { + return request.hostname; + } + getRequestMethod(request) { + return request.method; + } + getRequestUrl(request) { + return request.originalUrl; + } + enableCors(options) { + return this.use(cors(options)); + } + createMiddlewareFactory(requestMethod) { + return this.routerMethodFactory.get(this.instance, requestMethod).bind(this.instance); + } + initHttpServer(options) { + const isHttpsEnabled = options && options.httpsOptions; + if (isHttpsEnabled) { + this.httpServer = https.createServer(options.httpsOptions, this.getInstance()); + } else { + this.httpServer = http.createServer(this.getInstance()); + } + if (options?.forceCloseConnections) { + this.trackOpenConnections(); + } + } + registerParserMiddleware(prefix, rawBody) { + const bodyParserJsonOptions = (0, get_body_parser_options_util_1.getBodyParserOptions)(rawBody); + const bodyParserUrlencodedOptions = (0, get_body_parser_options_util_1.getBodyParserOptions)(rawBody, { + extended: true + }); + const parserMiddleware = { + jsonParser: (0, body_parser_1.json)(bodyParserJsonOptions), + urlencodedParser: (0, body_parser_1.urlencoded)(bodyParserUrlencodedOptions) + }; + Object.keys(parserMiddleware).filter((parser) => !this.isMiddlewareApplied(parser)).forEach((parserKey) => this.use(parserMiddleware[parserKey])); + } + useBodyParser(type, rawBody, options) { + const parserOptions = (0, get_body_parser_options_util_1.getBodyParserOptions)(rawBody, options); + const parser = bodyparser[type](parserOptions); + this.use(parser); + return this; + } + setLocal(key, value) { + this.instance.locals[key] = value; + return this; + } + getType() { + return "express"; + } + applyVersionFilter(handler, version2, versioningOptions) { + const callNextHandler = (req, res, next) => { + if (!next) { + throw new common_12.InternalServerErrorException("HTTP adapter does not support filtering on version"); + } + return next(); + }; + if (version2 === common_12.VERSION_NEUTRAL || // URL Versioning is done via the path, so the filter continues forward + versioningOptions.type === common_12.VersioningType.URI) { + const handlerForNoVersioning = (req, res, next) => handler(req, res, next); + return handlerForNoVersioning; + } + if (versioningOptions.type === common_12.VersioningType.CUSTOM) { + const handlerForCustomVersioning = (req, res, next) => { + const extractedVersion = versioningOptions.extractor(req); + if (Array.isArray(version2)) { + if (Array.isArray(extractedVersion) && version2.filter((v) => extractedVersion.includes(v)).length) { + return handler(req, res, next); + } + if ((0, shared_utils_1.isString)(extractedVersion) && version2.includes(extractedVersion)) { + return handler(req, res, next); + } + } else if ((0, shared_utils_1.isString)(version2)) { + if (Array.isArray(extractedVersion) && extractedVersion.includes(version2)) { + return handler(req, res, next); + } + if ((0, shared_utils_1.isString)(extractedVersion) && version2 === extractedVersion) { + return handler(req, res, next); + } + } + return callNextHandler(req, res, next); + }; + return handlerForCustomVersioning; + } + if (versioningOptions.type === common_12.VersioningType.MEDIA_TYPE) { + const handlerForMediaTypeVersioning = (req, res, next) => { + const MEDIA_TYPE_HEADER = "Accept"; + const acceptHeaderValue = req.headers?.[MEDIA_TYPE_HEADER] || req.headers?.[MEDIA_TYPE_HEADER.toLowerCase()]; + const acceptHeaderVersionParameter = acceptHeaderValue ? acceptHeaderValue.split(";")[1] : void 0; + if ((0, shared_utils_1.isUndefined)(acceptHeaderVersionParameter)) { + if (Array.isArray(version2)) { + if (version2.includes(common_12.VERSION_NEUTRAL)) { + return handler(req, res, next); + } + } + } else { + const headerVersion = acceptHeaderVersionParameter.split(versioningOptions.key)[1]; + if (Array.isArray(version2)) { + if (version2.includes(headerVersion)) { + return handler(req, res, next); + } + } else if ((0, shared_utils_1.isString)(version2)) { + if (version2 === headerVersion) { + return handler(req, res, next); + } + } + } + return callNextHandler(req, res, next); + }; + return handlerForMediaTypeVersioning; + } + if (versioningOptions.type === common_12.VersioningType.HEADER) { + const handlerForHeaderVersioning = (req, res, next) => { + const customHeaderVersionParameter = req.headers?.[versioningOptions.header] || req.headers?.[versioningOptions.header.toLowerCase()]; + if ((0, shared_utils_1.isUndefined)(customHeaderVersionParameter)) { + if (Array.isArray(version2)) { + if (version2.includes(common_12.VERSION_NEUTRAL)) { + return handler(req, res, next); + } + } + } else { + if (Array.isArray(version2)) { + if (version2.includes(customHeaderVersionParameter)) { + return handler(req, res, next); + } + } else if ((0, shared_utils_1.isString)(version2)) { + if (version2 === customHeaderVersionParameter) { + return handler(req, res, next); + } + } + } + return callNextHandler(req, res, next); + }; + return handlerForHeaderVersioning; + } + } + trackOpenConnections() { + this.httpServer.on("connection", (socket) => { + this.openConnections.add(socket); + socket.on("close", () => this.openConnections.delete(socket)); + }); + } + closeOpenConnections() { + for (const socket of this.openConnections) { + socket.destroy(); + this.openConnections.delete(socket); + } + } + isMiddlewareApplied(name) { + const app = this.getInstance(); + return !!app._router && !!app._router.stack && (0, shared_utils_1.isFunction)(app._router.stack.filter) && app._router.stack.some((layer) => layer && layer.handle && layer.handle.name === name); + } + }; + exports2.ExpressAdapter = ExpressAdapter; + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/adapters/index.js +var require_adapters2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/adapters/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_express_adapter(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/interfaces/nest-express-application.interface.js +var require_nest_express_application_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/interfaces/nest-express-application.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/interfaces/nest-express-body-parser.interface.js +var require_nest_express_body_parser_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/interfaces/nest-express-body-parser.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/interfaces/index.js +var require_interfaces5 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/interfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_nest_express_application_interface(), exports2); + tslib_1.__exportStar(require_nest_express_body_parser_interface(), exports2); + } +}); + +// ../../node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/utils.js +var require_utils12 = __commonJS({ + "../../node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/utils.js"(exports2, module2) { + "use strict"; + function parseContentType(str) { + if (str.length === 0) + return; + const params = /* @__PURE__ */ Object.create(null); + let i = 0; + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + if (code !== 47 || i === 0) + return; + break; + } + } + if (i === str.length) + return; + const type = str.slice(0, i).toLowerCase(); + const subtypeStart = ++i; + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + if (i === subtypeStart) + return; + if (parseContentTypeParams(str, i, params) === void 0) + return; + break; + } + } + if (i === subtypeStart) + return; + const subtype = str.slice(subtypeStart, i).toLowerCase(); + return { type, subtype, params }; + } + function parseContentTypeParams(str, i, params) { + while (i < str.length) { + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code !== 32 && code !== 9) + break; + } + if (i === str.length) + break; + if (str.charCodeAt(i++) !== 59) + return; + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code !== 32 && code !== 9) + break; + } + if (i === str.length) + return; + let name; + const nameStart = i; + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + if (code !== 61) + return; + break; + } + } + if (i === str.length) + return; + name = str.slice(nameStart, i); + ++i; + if (i === str.length) + return; + let value = ""; + let valueStart; + if (str.charCodeAt(i) === 34) { + valueStart = ++i; + let escaping = false; + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code === 92) { + if (escaping) { + valueStart = i; + escaping = false; + } else { + value += str.slice(valueStart, i); + escaping = true; + } + continue; + } + if (code === 34) { + if (escaping) { + valueStart = i; + escaping = false; + continue; + } + value += str.slice(valueStart, i); + break; + } + if (escaping) { + valueStart = i - 1; + escaping = false; + } + if (QDTEXT[code] !== 1) + return; + } + if (i === str.length) + return; + ++i; + } else { + valueStart = i; + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + if (i === valueStart) + return; + break; + } + } + value = str.slice(valueStart, i); + } + name = name.toLowerCase(); + if (params[name] === void 0) + params[name] = value; + } + return params; + } + function parseDisposition(str, defDecoder) { + if (str.length === 0) + return; + const params = /* @__PURE__ */ Object.create(null); + let i = 0; + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + if (parseDispositionParams(str, i, params, defDecoder) === void 0) + return; + break; + } + } + const type = str.slice(0, i).toLowerCase(); + return { type, params }; + } + function parseDispositionParams(str, i, params, defDecoder) { + while (i < str.length) { + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code !== 32 && code !== 9) + break; + } + if (i === str.length) + break; + if (str.charCodeAt(i++) !== 59) + return; + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code !== 32 && code !== 9) + break; + } + if (i === str.length) + return; + let name; + const nameStart = i; + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + if (code === 61) + break; + return; + } + } + if (i === str.length) + return; + let value = ""; + let valueStart; + let charset; + name = str.slice(nameStart, i); + if (name.charCodeAt(name.length - 1) === 42) { + const charsetStart = ++i; + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (CHARSET[code] !== 1) { + if (code !== 39) + return; + break; + } + } + if (i === str.length) + return; + charset = str.slice(charsetStart, i); + ++i; + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code === 39) + break; + } + if (i === str.length) + return; + ++i; + if (i === str.length) + return; + valueStart = i; + let encode = 0; + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (EXTENDED_VALUE[code] !== 1) { + if (code === 37) { + let hexUpper; + let hexLower; + if (i + 2 < str.length && (hexUpper = HEX_VALUES[str.charCodeAt(i + 1)]) !== -1 && (hexLower = HEX_VALUES[str.charCodeAt(i + 2)]) !== -1) { + const byteVal = (hexUpper << 4) + hexLower; + value += str.slice(valueStart, i); + value += String.fromCharCode(byteVal); + i += 2; + valueStart = i + 1; + if (byteVal >= 128) + encode = 2; + else if (encode === 0) + encode = 1; + continue; + } + return; + } + break; + } + } + value += str.slice(valueStart, i); + value = convertToUTF8(value, charset, encode); + if (value === void 0) + return; + } else { + ++i; + if (i === str.length) + return; + if (str.charCodeAt(i) === 34) { + valueStart = ++i; + let escaping = false; + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code === 92) { + if (escaping) { + valueStart = i; + escaping = false; + } else { + value += str.slice(valueStart, i); + escaping = true; + } + continue; + } + if (code === 34) { + if (escaping) { + valueStart = i; + escaping = false; + continue; + } + value += str.slice(valueStart, i); + break; + } + if (escaping) { + valueStart = i - 1; + escaping = false; + } + if (QDTEXT[code] !== 1) + return; + } + if (i === str.length) + return; + ++i; + } else { + valueStart = i; + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + if (i === valueStart) + return; + break; + } + } + value = str.slice(valueStart, i); + } + value = defDecoder(value, 2); + if (value === void 0) + return; + } + name = name.toLowerCase(); + if (params[name] === void 0) + params[name] = value; + } + return params; + } + function getDecoder(charset) { + let lc; + while (true) { + switch (charset) { + case "utf-8": + case "utf8": + return decoders.utf8; + case "latin1": + case "ascii": + // TODO: Make these a separate, strict decoder? + case "us-ascii": + case "iso-8859-1": + case "iso8859-1": + case "iso88591": + case "iso_8859-1": + case "windows-1252": + case "iso_8859-1:1987": + case "cp1252": + case "x-cp1252": + return decoders.latin1; + case "utf16le": + case "utf-16le": + case "ucs2": + case "ucs-2": + return decoders.utf16le; + case "base64": + return decoders.base64; + default: + if (lc === void 0) { + lc = true; + charset = charset.toLowerCase(); + continue; + } + return decoders.other.bind(charset); + } + } + } + var decoders = { + utf8: (data, hint) => { + if (data.length === 0) + return ""; + if (typeof data === "string") { + if (hint < 2) + return data; + data = Buffer.from(data, "latin1"); + } + return data.utf8Slice(0, data.length); + }, + latin1: (data, hint) => { + if (data.length === 0) + return ""; + if (typeof data === "string") + return data; + return data.latin1Slice(0, data.length); + }, + utf16le: (data, hint) => { + if (data.length === 0) + return ""; + if (typeof data === "string") + data = Buffer.from(data, "latin1"); + return data.ucs2Slice(0, data.length); + }, + base64: (data, hint) => { + if (data.length === 0) + return ""; + if (typeof data === "string") + data = Buffer.from(data, "latin1"); + return data.base64Slice(0, data.length); + }, + other: (data, hint) => { + if (data.length === 0) + return ""; + if (typeof data === "string") + data = Buffer.from(data, "latin1"); + try { + const decoder = new TextDecoder(exports2); + return decoder.decode(data); + } catch { + } + } + }; + function convertToUTF8(data, charset, hint) { + const decode = getDecoder(charset); + if (decode) + return decode(data, hint); + } + function basename(path) { + if (typeof path !== "string") + return ""; + for (let i = path.length - 1; i >= 0; --i) { + switch (path.charCodeAt(i)) { + case 47: + // '/' + case 92: + path = path.slice(i + 1); + return path === ".." || path === "." ? "" : path; + } + } + return path === ".." || path === "." ? "" : path; + } + var TOKEN = [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]; + var QDTEXT = [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ]; + var CHARSET = [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]; + var EXTENDED_VALUE = [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]; + var HEX_VALUES = [ + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + 10, + 11, + 12, + 13, + 14, + 15, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + 10, + 11, + 12, + 13, + 14, + 15, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 + ]; + module2.exports = { + basename, + convertToUTF8, + getDecoder, + parseContentType, + parseDisposition + }; + } +}); + +// ../../node_modules/.pnpm/streamsearch@1.1.0/node_modules/streamsearch/lib/sbmh.js +var require_sbmh = __commonJS({ + "../../node_modules/.pnpm/streamsearch@1.1.0/node_modules/streamsearch/lib/sbmh.js"(exports2, module2) { + "use strict"; + function memcmp(buf1, pos1, buf2, pos2, num) { + for (let i = 0; i < num; ++i) { + if (buf1[pos1 + i] !== buf2[pos2 + i]) + return false; + } + return true; + } + var SBMH = class { + constructor(needle, cb) { + if (typeof cb !== "function") + throw new Error("Missing match callback"); + if (typeof needle === "string") + needle = Buffer.from(needle); + else if (!Buffer.isBuffer(needle)) + throw new Error(`Expected Buffer for needle, got ${typeof needle}`); + const needleLen = needle.length; + this.maxMatches = Infinity; + this.matches = 0; + this._cb = cb; + this._lookbehindSize = 0; + this._needle = needle; + this._bufPos = 0; + this._lookbehind = Buffer.allocUnsafe(needleLen); + this._occ = [ + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen, + needleLen + ]; + if (needleLen > 1) { + for (let i = 0; i < needleLen - 1; ++i) + this._occ[needle[i]] = needleLen - 1 - i; + } + } + reset() { + this.matches = 0; + this._lookbehindSize = 0; + this._bufPos = 0; + } + push(chunk, pos) { + let result; + if (!Buffer.isBuffer(chunk)) + chunk = Buffer.from(chunk, "latin1"); + const chunkLen = chunk.length; + this._bufPos = pos || 0; + while (result !== chunkLen && this.matches < this.maxMatches) + result = feed(this, chunk); + return result; + } + destroy() { + const lbSize = this._lookbehindSize; + if (lbSize) + this._cb(false, this._lookbehind, 0, lbSize, false); + this.reset(); + } + }; + function feed(self2, data) { + const len = data.length; + const needle = self2._needle; + const needleLen = needle.length; + let pos = -self2._lookbehindSize; + const lastNeedleCharPos = needleLen - 1; + const lastNeedleChar = needle[lastNeedleCharPos]; + const end = len - needleLen; + const occ = self2._occ; + const lookbehind = self2._lookbehind; + if (pos < 0) { + while (pos < 0 && pos <= end) { + const nextPos = pos + lastNeedleCharPos; + const ch = nextPos < 0 ? lookbehind[self2._lookbehindSize + nextPos] : data[nextPos]; + if (ch === lastNeedleChar && matchNeedle(self2, data, pos, lastNeedleCharPos)) { + self2._lookbehindSize = 0; + ++self2.matches; + if (pos > -self2._lookbehindSize) + self2._cb(true, lookbehind, 0, self2._lookbehindSize + pos, false); + else + self2._cb(true, void 0, 0, 0, true); + return self2._bufPos = pos + needleLen; + } + pos += occ[ch]; + } + while (pos < 0 && !matchNeedle(self2, data, pos, len - pos)) + ++pos; + if (pos < 0) { + const bytesToCutOff = self2._lookbehindSize + pos; + if (bytesToCutOff > 0) { + self2._cb(false, lookbehind, 0, bytesToCutOff, false); + } + self2._lookbehindSize -= bytesToCutOff; + lookbehind.copy(lookbehind, 0, bytesToCutOff, self2._lookbehindSize); + lookbehind.set(data, self2._lookbehindSize); + self2._lookbehindSize += len; + self2._bufPos = len; + return len; + } + self2._cb(false, lookbehind, 0, self2._lookbehindSize, false); + self2._lookbehindSize = 0; + } + pos += self2._bufPos; + const firstNeedleChar = needle[0]; + while (pos <= end) { + const ch = data[pos + lastNeedleCharPos]; + if (ch === lastNeedleChar && data[pos] === firstNeedleChar && memcmp(needle, 0, data, pos, lastNeedleCharPos)) { + ++self2.matches; + if (pos > 0) + self2._cb(true, data, self2._bufPos, pos, true); + else + self2._cb(true, void 0, 0, 0, true); + return self2._bufPos = pos + needleLen; + } + pos += occ[ch]; + } + while (pos < len) { + if (data[pos] !== firstNeedleChar || !memcmp(data, pos, needle, 0, len - pos)) { + ++pos; + continue; + } + data.copy(lookbehind, 0, pos, len); + self2._lookbehindSize = len - pos; + break; + } + if (pos > 0) + self2._cb(false, data, self2._bufPos, pos < len ? pos : len, true); + self2._bufPos = len; + return len; + } + function matchNeedle(self2, data, pos, len) { + const lb = self2._lookbehind; + const lbSize = self2._lookbehindSize; + const needle = self2._needle; + for (let i = 0; i < len; ++i, ++pos) { + const ch = pos < 0 ? lb[lbSize + pos] : data[pos]; + if (ch !== needle[i]) + return false; + } + return true; + } + module2.exports = SBMH; + } +}); + +// ../../node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/types/multipart.js +var require_multipart = __commonJS({ + "../../node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/types/multipart.js"(exports2, module2) { + "use strict"; + var { Readable, Writable } = require("stream"); + var StreamSearch = require_sbmh(); + var { + basename, + convertToUTF8, + getDecoder, + parseContentType, + parseDisposition + } = require_utils12(); + var BUF_CRLF = Buffer.from("\r\n"); + var BUF_CR = Buffer.from("\r"); + var BUF_DASH = Buffer.from("-"); + function noop() { + } + var MAX_HEADER_PAIRS = 2e3; + var MAX_HEADER_SIZE = 16 * 1024; + var HPARSER_NAME = 0; + var HPARSER_PRE_OWS = 1; + var HPARSER_VALUE = 2; + var HeaderParser = class { + constructor(cb) { + this.header = /* @__PURE__ */ Object.create(null); + this.pairCount = 0; + this.byteCount = 0; + this.state = HPARSER_NAME; + this.name = ""; + this.value = ""; + this.crlf = 0; + this.cb = cb; + } + reset() { + this.header = /* @__PURE__ */ Object.create(null); + this.pairCount = 0; + this.byteCount = 0; + this.state = HPARSER_NAME; + this.name = ""; + this.value = ""; + this.crlf = 0; + } + push(chunk, pos, end) { + let start = pos; + while (pos < end) { + switch (this.state) { + case HPARSER_NAME: { + let done = false; + for (; pos < end; ++pos) { + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + const code = chunk[pos]; + if (TOKEN[code] !== 1) { + if (code !== 58) + return -1; + this.name += chunk.latin1Slice(start, pos); + if (this.name.length === 0) + return -1; + ++pos; + done = true; + this.state = HPARSER_PRE_OWS; + break; + } + } + if (!done) { + this.name += chunk.latin1Slice(start, pos); + break; + } + } + case HPARSER_PRE_OWS: { + let done = false; + for (; pos < end; ++pos) { + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + const code = chunk[pos]; + if (code !== 32 && code !== 9) { + start = pos; + done = true; + this.state = HPARSER_VALUE; + break; + } + } + if (!done) + break; + } + case HPARSER_VALUE: + switch (this.crlf) { + case 0: + for (; pos < end; ++pos) { + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + const code = chunk[pos]; + if (FIELD_VCHAR[code] !== 1) { + if (code !== 13) + return -1; + ++this.crlf; + break; + } + } + this.value += chunk.latin1Slice(start, pos++); + break; + case 1: + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + if (chunk[pos++] !== 10) + return -1; + ++this.crlf; + break; + case 2: { + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + const code = chunk[pos]; + if (code === 32 || code === 9) { + start = pos; + this.crlf = 0; + } else { + if (++this.pairCount < MAX_HEADER_PAIRS) { + this.name = this.name.toLowerCase(); + if (this.header[this.name] === void 0) + this.header[this.name] = [this.value]; + else + this.header[this.name].push(this.value); + } + if (code === 13) { + ++this.crlf; + ++pos; + } else { + start = pos; + this.crlf = 0; + this.state = HPARSER_NAME; + this.name = ""; + this.value = ""; + } + } + break; + } + case 3: { + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + if (chunk[pos++] !== 10) + return -1; + const header = this.header; + this.reset(); + this.cb(header); + return pos; + } + } + break; + } + } + return pos; + } + }; + var FileStream = class extends Readable { + constructor(opts, owner) { + super(opts); + this.truncated = false; + this._readcb = null; + this.once("end", () => { + this._read(); + if (--owner._fileEndsLeft === 0 && owner._finalcb) { + const cb = owner._finalcb; + owner._finalcb = null; + process.nextTick(cb); + } + }); + } + _read(n) { + const cb = this._readcb; + if (cb) { + this._readcb = null; + cb(); + } + } + }; + var ignoreData = { + push: (chunk, pos) => { + }, + destroy: () => { + } + }; + function callAndUnsetCb(self2, err) { + const cb = self2._writecb; + self2._writecb = null; + if (err) + self2.destroy(err); + else if (cb) + cb(); + } + function nullDecoder(val, hint) { + return val; + } + var Multipart = class extends Writable { + constructor(cfg) { + const streamOpts = { + autoDestroy: true, + emitClose: true, + highWaterMark: typeof cfg.highWaterMark === "number" ? cfg.highWaterMark : void 0 + }; + super(streamOpts); + if (!cfg.conType.params || typeof cfg.conType.params.boundary !== "string") + throw new Error("Multipart: Boundary not found"); + const boundary = cfg.conType.params.boundary; + const paramDecoder = typeof cfg.defParamCharset === "string" && cfg.defParamCharset ? getDecoder(cfg.defParamCharset) : nullDecoder; + const defCharset = cfg.defCharset || "utf8"; + const preservePath = cfg.preservePath; + const fileOpts = { + autoDestroy: true, + emitClose: true, + highWaterMark: typeof cfg.fileHwm === "number" ? cfg.fileHwm : void 0 + }; + const limits = cfg.limits; + const fieldSizeLimit = limits && typeof limits.fieldSize === "number" ? limits.fieldSize : 1 * 1024 * 1024; + const fileSizeLimit = limits && typeof limits.fileSize === "number" ? limits.fileSize : Infinity; + const filesLimit = limits && typeof limits.files === "number" ? limits.files : Infinity; + const fieldsLimit = limits && typeof limits.fields === "number" ? limits.fields : Infinity; + const partsLimit = limits && typeof limits.parts === "number" ? limits.parts : Infinity; + let parts = -1; + let fields = 0; + let files = 0; + let skipPart = false; + this._fileEndsLeft = 0; + this._fileStream = void 0; + this._complete = false; + let fileSize = 0; + let field; + let fieldSize = 0; + let partCharset; + let partEncoding; + let partType; + let partName; + let partTruncated = false; + let hitFilesLimit = false; + let hitFieldsLimit = false; + this._hparser = null; + const hparser = new HeaderParser((header) => { + this._hparser = null; + skipPart = false; + partType = "text/plain"; + partCharset = defCharset; + partEncoding = "7bit"; + partName = void 0; + partTruncated = false; + let filename; + if (!header["content-disposition"]) { + skipPart = true; + return; + } + const disp = parseDisposition( + header["content-disposition"][0], + paramDecoder + ); + if (!disp || disp.type !== "form-data") { + skipPart = true; + return; + } + if (disp.params) { + if (disp.params.name) + partName = disp.params.name; + if (disp.params["filename*"]) + filename = disp.params["filename*"]; + else if (disp.params.filename) + filename = disp.params.filename; + if (filename !== void 0 && !preservePath) + filename = basename(filename); + } + if (header["content-type"]) { + const conType = parseContentType(header["content-type"][0]); + if (conType) { + partType = `${conType.type}/${conType.subtype}`; + if (conType.params && typeof conType.params.charset === "string") + partCharset = conType.params.charset.toLowerCase(); + } + } + if (header["content-transfer-encoding"]) + partEncoding = header["content-transfer-encoding"][0].toLowerCase(); + if (partType === "application/octet-stream" || filename !== void 0) { + if (files === filesLimit) { + if (!hitFilesLimit) { + hitFilesLimit = true; + this.emit("filesLimit"); + } + skipPart = true; + return; + } + ++files; + if (this.listenerCount("file") === 0) { + skipPart = true; + return; + } + fileSize = 0; + this._fileStream = new FileStream(fileOpts, this); + ++this._fileEndsLeft; + this.emit( + "file", + partName, + this._fileStream, + { + filename, + encoding: partEncoding, + mimeType: partType + } + ); + } else { + if (fields === fieldsLimit) { + if (!hitFieldsLimit) { + hitFieldsLimit = true; + this.emit("fieldsLimit"); + } + skipPart = true; + return; + } + ++fields; + if (this.listenerCount("field") === 0) { + skipPart = true; + return; + } + field = []; + fieldSize = 0; + } + }); + let matchPostBoundary = 0; + const ssCb = (isMatch, data, start, end, isDataSafe) => { + retrydata: + while (data) { + if (this._hparser !== null) { + const ret2 = this._hparser.push(data, start, end); + if (ret2 === -1) { + this._hparser = null; + hparser.reset(); + this.emit("error", new Error("Malformed part header")); + break; + } + start = ret2; + } + if (start === end) + break; + if (matchPostBoundary !== 0) { + if (matchPostBoundary === 1) { + switch (data[start]) { + case 45: + matchPostBoundary = 2; + ++start; + break; + case 13: + matchPostBoundary = 3; + ++start; + break; + default: + matchPostBoundary = 0; + } + if (start === end) + return; + } + if (matchPostBoundary === 2) { + matchPostBoundary = 0; + if (data[start] === 45) { + this._complete = true; + this._bparser = ignoreData; + return; + } + const writecb = this._writecb; + this._writecb = noop; + ssCb(false, BUF_DASH, 0, 1, false); + this._writecb = writecb; + } else if (matchPostBoundary === 3) { + matchPostBoundary = 0; + if (data[start] === 10) { + ++start; + if (parts >= partsLimit) + break; + this._hparser = hparser; + if (start === end) + break; + continue retrydata; + } else { + const writecb = this._writecb; + this._writecb = noop; + ssCb(false, BUF_CR, 0, 1, false); + this._writecb = writecb; + } + } + } + if (!skipPart) { + if (this._fileStream) { + let chunk; + const actualLen = Math.min(end - start, fileSizeLimit - fileSize); + if (!isDataSafe) { + chunk = Buffer.allocUnsafe(actualLen); + data.copy(chunk, 0, start, start + actualLen); + } else { + chunk = data.slice(start, start + actualLen); + } + fileSize += chunk.length; + if (fileSize === fileSizeLimit) { + if (chunk.length > 0) + this._fileStream.push(chunk); + this._fileStream.emit("limit"); + this._fileStream.truncated = true; + skipPart = true; + } else if (!this._fileStream.push(chunk)) { + if (this._writecb) + this._fileStream._readcb = this._writecb; + this._writecb = null; + } + } else if (field !== void 0) { + let chunk; + const actualLen = Math.min( + end - start, + fieldSizeLimit - fieldSize + ); + if (!isDataSafe) { + chunk = Buffer.allocUnsafe(actualLen); + data.copy(chunk, 0, start, start + actualLen); + } else { + chunk = data.slice(start, start + actualLen); + } + fieldSize += actualLen; + field.push(chunk); + if (fieldSize === fieldSizeLimit) { + skipPart = true; + partTruncated = true; + } + } + } + break; + } + if (isMatch) { + matchPostBoundary = 1; + if (this._fileStream) { + this._fileStream.push(null); + this._fileStream = null; + } else if (field !== void 0) { + let data2; + switch (field.length) { + case 0: + data2 = ""; + break; + case 1: + data2 = convertToUTF8(field[0], partCharset, 0); + break; + default: + data2 = convertToUTF8( + Buffer.concat(field, fieldSize), + partCharset, + 0 + ); + } + field = void 0; + fieldSize = 0; + this.emit( + "field", + partName, + data2, + { + nameTruncated: false, + valueTruncated: partTruncated, + encoding: partEncoding, + mimeType: partType + } + ); + } + if (++parts === partsLimit) + this.emit("partsLimit"); + } + }; + this._bparser = new StreamSearch(`\r +--${boundary}`, ssCb); + this._writecb = null; + this._finalcb = null; + this.write(BUF_CRLF); + } + static detect(conType) { + return conType.type === "multipart" && conType.subtype === "form-data"; + } + _write(chunk, enc, cb) { + this._writecb = cb; + this._bparser.push(chunk, 0); + if (this._writecb) + callAndUnsetCb(this); + } + _destroy(err, cb) { + this._hparser = null; + this._bparser = ignoreData; + if (!err) + err = checkEndState(this); + const fileStream = this._fileStream; + if (fileStream) { + this._fileStream = null; + fileStream.destroy(err); + } + cb(err); + } + _final(cb) { + this._bparser.destroy(); + if (!this._complete) + return cb(new Error("Unexpected end of form")); + if (this._fileEndsLeft) + this._finalcb = finalcb.bind(null, this, cb); + else + finalcb(this, cb); + } + }; + function finalcb(self2, cb, err) { + if (err) + return cb(err); + err = checkEndState(self2); + cb(err); + } + function checkEndState(self2) { + if (self2._hparser) + return new Error("Malformed part header"); + const fileStream = self2._fileStream; + if (fileStream) { + self2._fileStream = null; + fileStream.destroy(new Error("Unexpected end of file")); + } + if (!self2._complete) + return new Error("Unexpected end of form"); + } + var TOKEN = [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]; + var FIELD_VCHAR = [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ]; + module2.exports = Multipart; + } +}); + +// ../../node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/types/urlencoded.js +var require_urlencoded2 = __commonJS({ + "../../node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/types/urlencoded.js"(exports2, module2) { + "use strict"; + var { Writable } = require("stream"); + var { getDecoder } = require_utils12(); + var URLEncoded = class extends Writable { + constructor(cfg) { + const streamOpts = { + autoDestroy: true, + emitClose: true, + highWaterMark: typeof cfg.highWaterMark === "number" ? cfg.highWaterMark : void 0 + }; + super(streamOpts); + let charset = cfg.defCharset || "utf8"; + if (cfg.conType.params && typeof cfg.conType.params.charset === "string") + charset = cfg.conType.params.charset; + this.charset = charset; + const limits = cfg.limits; + this.fieldSizeLimit = limits && typeof limits.fieldSize === "number" ? limits.fieldSize : 1 * 1024 * 1024; + this.fieldsLimit = limits && typeof limits.fields === "number" ? limits.fields : Infinity; + this.fieldNameSizeLimit = limits && typeof limits.fieldNameSize === "number" ? limits.fieldNameSize : 100; + this._inKey = true; + this._keyTrunc = false; + this._valTrunc = false; + this._bytesKey = 0; + this._bytesVal = 0; + this._fields = 0; + this._key = ""; + this._val = ""; + this._byte = -2; + this._lastPos = 0; + this._encode = 0; + this._decoder = getDecoder(charset); + } + static detect(conType) { + return conType.type === "application" && conType.subtype === "x-www-form-urlencoded"; + } + _write(chunk, enc, cb) { + if (this._fields >= this.fieldsLimit) + return cb(); + let i = 0; + const len = chunk.length; + this._lastPos = 0; + if (this._byte !== -2) { + i = readPctEnc(this, chunk, i, len); + if (i === -1) + return cb(new Error("Malformed urlencoded form")); + if (i >= len) + return cb(); + if (this._inKey) + ++this._bytesKey; + else + ++this._bytesVal; + } + main: + while (i < len) { + if (this._inKey) { + i = skipKeyBytes(this, chunk, i, len); + while (i < len) { + switch (chunk[i]) { + case 61: + if (this._lastPos < i) + this._key += chunk.latin1Slice(this._lastPos, i); + this._lastPos = ++i; + this._key = this._decoder(this._key, this._encode); + this._encode = 0; + this._inKey = false; + continue main; + case 38: + if (this._lastPos < i) + this._key += chunk.latin1Slice(this._lastPos, i); + this._lastPos = ++i; + this._key = this._decoder(this._key, this._encode); + this._encode = 0; + if (this._bytesKey > 0) { + this.emit( + "field", + this._key, + "", + { + nameTruncated: this._keyTrunc, + valueTruncated: false, + encoding: this.charset, + mimeType: "text/plain" + } + ); + } + this._key = ""; + this._val = ""; + this._keyTrunc = false; + this._valTrunc = false; + this._bytesKey = 0; + this._bytesVal = 0; + if (++this._fields >= this.fieldsLimit) { + this.emit("fieldsLimit"); + return cb(); + } + continue; + case 43: + if (this._lastPos < i) + this._key += chunk.latin1Slice(this._lastPos, i); + this._key += " "; + this._lastPos = i + 1; + break; + case 37: + if (this._encode === 0) + this._encode = 1; + if (this._lastPos < i) + this._key += chunk.latin1Slice(this._lastPos, i); + this._lastPos = i + 1; + this._byte = -1; + i = readPctEnc(this, chunk, i + 1, len); + if (i === -1) + return cb(new Error("Malformed urlencoded form")); + if (i >= len) + return cb(); + ++this._bytesKey; + i = skipKeyBytes(this, chunk, i, len); + continue; + } + ++i; + ++this._bytesKey; + i = skipKeyBytes(this, chunk, i, len); + } + if (this._lastPos < i) + this._key += chunk.latin1Slice(this._lastPos, i); + } else { + i = skipValBytes(this, chunk, i, len); + while (i < len) { + switch (chunk[i]) { + case 38: + if (this._lastPos < i) + this._val += chunk.latin1Slice(this._lastPos, i); + this._lastPos = ++i; + this._inKey = true; + this._val = this._decoder(this._val, this._encode); + this._encode = 0; + if (this._bytesKey > 0 || this._bytesVal > 0) { + this.emit( + "field", + this._key, + this._val, + { + nameTruncated: this._keyTrunc, + valueTruncated: this._valTrunc, + encoding: this.charset, + mimeType: "text/plain" + } + ); + } + this._key = ""; + this._val = ""; + this._keyTrunc = false; + this._valTrunc = false; + this._bytesKey = 0; + this._bytesVal = 0; + if (++this._fields >= this.fieldsLimit) { + this.emit("fieldsLimit"); + return cb(); + } + continue main; + case 43: + if (this._lastPos < i) + this._val += chunk.latin1Slice(this._lastPos, i); + this._val += " "; + this._lastPos = i + 1; + break; + case 37: + if (this._encode === 0) + this._encode = 1; + if (this._lastPos < i) + this._val += chunk.latin1Slice(this._lastPos, i); + this._lastPos = i + 1; + this._byte = -1; + i = readPctEnc(this, chunk, i + 1, len); + if (i === -1) + return cb(new Error("Malformed urlencoded form")); + if (i >= len) + return cb(); + ++this._bytesVal; + i = skipValBytes(this, chunk, i, len); + continue; + } + ++i; + ++this._bytesVal; + i = skipValBytes(this, chunk, i, len); + } + if (this._lastPos < i) + this._val += chunk.latin1Slice(this._lastPos, i); + } + } + cb(); + } + _final(cb) { + if (this._byte !== -2) + return cb(new Error("Malformed urlencoded form")); + if (!this._inKey || this._bytesKey > 0 || this._bytesVal > 0) { + if (this._inKey) + this._key = this._decoder(this._key, this._encode); + else + this._val = this._decoder(this._val, this._encode); + this.emit( + "field", + this._key, + this._val, + { + nameTruncated: this._keyTrunc, + valueTruncated: this._valTrunc, + encoding: this.charset, + mimeType: "text/plain" + } + ); + } + cb(); + } + }; + function readPctEnc(self2, chunk, pos, len) { + if (pos >= len) + return len; + if (self2._byte === -1) { + const hexUpper = HEX_VALUES[chunk[pos++]]; + if (hexUpper === -1) + return -1; + if (hexUpper >= 8) + self2._encode = 2; + if (pos < len) { + const hexLower = HEX_VALUES[chunk[pos++]]; + if (hexLower === -1) + return -1; + if (self2._inKey) + self2._key += String.fromCharCode((hexUpper << 4) + hexLower); + else + self2._val += String.fromCharCode((hexUpper << 4) + hexLower); + self2._byte = -2; + self2._lastPos = pos; + } else { + self2._byte = hexUpper; + } + } else { + const hexLower = HEX_VALUES[chunk[pos++]]; + if (hexLower === -1) + return -1; + if (self2._inKey) + self2._key += String.fromCharCode((self2._byte << 4) + hexLower); + else + self2._val += String.fromCharCode((self2._byte << 4) + hexLower); + self2._byte = -2; + self2._lastPos = pos; + } + return pos; + } + function skipKeyBytes(self2, chunk, pos, len) { + if (self2._bytesKey > self2.fieldNameSizeLimit) { + if (!self2._keyTrunc) { + if (self2._lastPos < pos) + self2._key += chunk.latin1Slice(self2._lastPos, pos - 1); + } + self2._keyTrunc = true; + for (; pos < len; ++pos) { + const code = chunk[pos]; + if (code === 61 || code === 38) + break; + ++self2._bytesKey; + } + self2._lastPos = pos; + } + return pos; + } + function skipValBytes(self2, chunk, pos, len) { + if (self2._bytesVal > self2.fieldSizeLimit) { + if (!self2._valTrunc) { + if (self2._lastPos < pos) + self2._val += chunk.latin1Slice(self2._lastPos, pos - 1); + } + self2._valTrunc = true; + for (; pos < len; ++pos) { + if (chunk[pos] === 38) + break; + ++self2._bytesVal; + } + self2._lastPos = pos; + } + return pos; + } + var HEX_VALUES = [ + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + 10, + 11, + 12, + 13, + 14, + 15, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + 10, + 11, + 12, + 13, + 14, + 15, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 + ]; + module2.exports = URLEncoded; + } +}); + +// ../../node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/index.js +var require_lib5 = __commonJS({ + "../../node_modules/.pnpm/busboy@1.6.0/node_modules/busboy/lib/index.js"(exports2, module2) { + "use strict"; + var { parseContentType } = require_utils12(); + function getInstance(cfg) { + const headers = cfg.headers; + const conType = parseContentType(headers["content-type"]); + if (!conType) + throw new Error("Malformed content type"); + for (const type of TYPES) { + const matched = type.detect(conType); + if (!matched) + continue; + const instanceCfg = { + limits: cfg.limits, + headers, + conType, + highWaterMark: void 0, + fileHwm: void 0, + defCharset: void 0, + defParamCharset: void 0, + preservePath: false + }; + if (cfg.highWaterMark) + instanceCfg.highWaterMark = cfg.highWaterMark; + if (cfg.fileHwm) + instanceCfg.fileHwm = cfg.fileHwm; + instanceCfg.defCharset = cfg.defCharset; + instanceCfg.defParamCharset = cfg.defParamCharset; + instanceCfg.preservePath = cfg.preservePath; + return new type(instanceCfg); + } + throw new Error(`Unsupported content type: ${headers["content-type"]}`); + } + var TYPES = [ + require_multipart(), + require_urlencoded2() + ].filter(function(typemod) { + return typeof typemod.detect === "function"; + }); + module2.exports = (cfg) => { + if (typeof cfg !== "object" || cfg === null) + cfg = {}; + if (typeof cfg.headers !== "object" || cfg.headers === null || typeof cfg.headers["content-type"] !== "string") { + throw new Error("Missing Content-Type"); + } + return getInstance(cfg); + }; + } +}); + +// ../../node_modules/.pnpm/xtend@4.0.2/node_modules/xtend/immutable.js +var require_immutable = __commonJS({ + "../../node_modules/.pnpm/xtend@4.0.2/node_modules/xtend/immutable.js"(exports2, module2) { + module2.exports = extend; + var hasOwnProperty = Object.prototype.hasOwnProperty; + function extend() { + var target = {}; + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + } + } +}); + +// ../../node_modules/.pnpm/append-field@1.0.0/node_modules/append-field/lib/parse-path.js +var require_parse_path = __commonJS({ + "../../node_modules/.pnpm/append-field@1.0.0/node_modules/append-field/lib/parse-path.js"(exports2, module2) { + var reFirstKey = /^[^\[]*/; + var reDigitPath = /^\[(\d+)\]/; + var reNormalPath = /^\[([^\]]+)\]/; + function parsePath(key) { + function failure() { + return [{ type: "object", key, last: true }]; + } + var firstKey = reFirstKey.exec(key)[0]; + if (!firstKey) return failure(); + var len = key.length; + var pos = firstKey.length; + var tail = { type: "object", key: firstKey }; + var steps = [tail]; + while (pos < len) { + var m; + if (key[pos] === "[" && key[pos + 1] === "]") { + pos += 2; + tail.append = true; + if (pos !== len) return failure(); + continue; + } + m = reDigitPath.exec(key.substring(pos)); + if (m !== null) { + pos += m[0].length; + tail.nextType = "array"; + tail = { type: "array", key: parseInt(m[1], 10) }; + steps.push(tail); + continue; + } + m = reNormalPath.exec(key.substring(pos)); + if (m !== null) { + pos += m[0].length; + tail.nextType = "object"; + tail = { type: "object", key: m[1] }; + steps.push(tail); + continue; + } + return failure(); + } + tail.last = true; + return steps; + } + module2.exports = parsePath; + } +}); + +// ../../node_modules/.pnpm/append-field@1.0.0/node_modules/append-field/lib/set-value.js +var require_set_value = __commonJS({ + "../../node_modules/.pnpm/append-field@1.0.0/node_modules/append-field/lib/set-value.js"(exports2, module2) { + function valueType(value) { + if (value === void 0) return "undefined"; + if (Array.isArray(value)) return "array"; + if (typeof value === "object") return "object"; + return "scalar"; + } + function setLastValue(context, step, currentValue, entryValue) { + switch (valueType(currentValue)) { + case "undefined": + if (step.append) { + context[step.key] = [entryValue]; + } else { + context[step.key] = entryValue; + } + break; + case "array": + context[step.key].push(entryValue); + break; + case "object": + return setLastValue(currentValue, { type: "object", key: "", last: true }, currentValue[""], entryValue); + case "scalar": + context[step.key] = [context[step.key], entryValue]; + break; + } + return context; + } + function setValue(context, step, currentValue, entryValue) { + if (step.last) return setLastValue(context, step, currentValue, entryValue); + var obj2; + switch (valueType(currentValue)) { + case "undefined": + if (step.nextType === "array") { + context[step.key] = []; + } else { + context[step.key] = /* @__PURE__ */ Object.create(null); + } + return context[step.key]; + case "object": + return context[step.key]; + case "array": + if (step.nextType === "array") { + return currentValue; + } + obj2 = /* @__PURE__ */ Object.create(null); + context[step.key] = obj2; + currentValue.forEach(function(item, i) { + if (item !== void 0) obj2["" + i] = item; + }); + return obj2; + case "scalar": + obj2 = /* @__PURE__ */ Object.create(null); + obj2[""] = currentValue; + context[step.key] = obj2; + return obj2; + } + } + module2.exports = setValue; + } +}); + +// ../../node_modules/.pnpm/append-field@1.0.0/node_modules/append-field/index.js +var require_append_field = __commonJS({ + "../../node_modules/.pnpm/append-field@1.0.0/node_modules/append-field/index.js"(exports2, module2) { + var parsePath = require_parse_path(); + var setValue = require_set_value(); + function appendField(store, key, value) { + var steps = parsePath(key); + steps.reduce(function(context, step) { + return setValue(context, step, context[step.key], value); + }, store); + } + module2.exports = appendField; + } +}); + +// ../../node_modules/.pnpm/multer@2.0.2/node_modules/multer/lib/counter.js +var require_counter = __commonJS({ + "../../node_modules/.pnpm/multer@2.0.2/node_modules/multer/lib/counter.js"(exports2, module2) { + var EventEmitter = require("events").EventEmitter; + function Counter() { + EventEmitter.call(this); + this.value = 0; + } + Counter.prototype = Object.create(EventEmitter.prototype); + Counter.prototype.increment = function increment() { + this.value++; + }; + Counter.prototype.decrement = function decrement() { + if (--this.value === 0) this.emit("zero"); + }; + Counter.prototype.isZero = function isZero() { + return this.value === 0; + }; + Counter.prototype.onceZero = function onceZero(fn) { + if (this.isZero()) return fn(); + this.once("zero", fn); + }; + module2.exports = Counter; + } +}); + +// ../../node_modules/.pnpm/multer@2.0.2/node_modules/multer/lib/multer-error.js +var require_multer_error = __commonJS({ + "../../node_modules/.pnpm/multer@2.0.2/node_modules/multer/lib/multer-error.js"(exports2, module2) { + var util2 = require("util"); + var errorMessages = { + LIMIT_PART_COUNT: "Too many parts", + LIMIT_FILE_SIZE: "File too large", + LIMIT_FILE_COUNT: "Too many files", + LIMIT_FIELD_KEY: "Field name too long", + LIMIT_FIELD_VALUE: "Field value too long", + LIMIT_FIELD_COUNT: "Too many fields", + LIMIT_UNEXPECTED_FILE: "Unexpected field", + MISSING_FIELD_NAME: "Field name missing" + }; + function MulterError(code, field) { + Error.captureStackTrace(this, this.constructor); + this.name = this.constructor.name; + this.message = errorMessages[code]; + this.code = code; + if (field) this.field = field; + } + util2.inherits(MulterError, Error); + module2.exports = MulterError; + } +}); + +// ../../node_modules/.pnpm/multer@2.0.2/node_modules/multer/lib/file-appender.js +var require_file_appender = __commonJS({ + "../../node_modules/.pnpm/multer@2.0.2/node_modules/multer/lib/file-appender.js"(exports2, module2) { + var objectAssign = require_object_assign(); + function arrayRemove(arr, item) { + var idx = arr.indexOf(item); + if (~idx) arr.splice(idx, 1); + } + function FileAppender(strategy, req) { + this.strategy = strategy; + this.req = req; + switch (strategy) { + case "NONE": + break; + case "VALUE": + break; + case "ARRAY": + req.files = []; + break; + case "OBJECT": + req.files = /* @__PURE__ */ Object.create(null); + break; + default: + throw new Error("Unknown file strategy: " + strategy); + } + } + FileAppender.prototype.insertPlaceholder = function(file2) { + var placeholder = { + fieldname: file2.fieldname + }; + switch (this.strategy) { + case "NONE": + break; + case "VALUE": + break; + case "ARRAY": + this.req.files.push(placeholder); + break; + case "OBJECT": + if (this.req.files[file2.fieldname]) { + this.req.files[file2.fieldname].push(placeholder); + } else { + this.req.files[file2.fieldname] = [placeholder]; + } + break; + } + return placeholder; + }; + FileAppender.prototype.removePlaceholder = function(placeholder) { + switch (this.strategy) { + case "NONE": + break; + case "VALUE": + break; + case "ARRAY": + arrayRemove(this.req.files, placeholder); + break; + case "OBJECT": + if (this.req.files[placeholder.fieldname].length === 1) { + delete this.req.files[placeholder.fieldname]; + } else { + arrayRemove(this.req.files[placeholder.fieldname], placeholder); + } + break; + } + }; + FileAppender.prototype.replacePlaceholder = function(placeholder, file2) { + if (this.strategy === "VALUE") { + this.req.file = file2; + return; + } + delete placeholder.fieldname; + objectAssign(placeholder, file2); + }; + module2.exports = FileAppender; + } +}); + +// ../../node_modules/.pnpm/multer@2.0.2/node_modules/multer/lib/remove-uploaded-files.js +var require_remove_uploaded_files = __commonJS({ + "../../node_modules/.pnpm/multer@2.0.2/node_modules/multer/lib/remove-uploaded-files.js"(exports2, module2) { + function removeUploadedFiles(uploadedFiles, remove, cb) { + var length = uploadedFiles.length; + var errors = []; + if (length === 0) return cb(null, errors); + function handleFile(idx) { + var file2 = uploadedFiles[idx]; + remove(file2, function(err) { + if (err) { + err.file = file2; + err.field = file2.fieldname; + errors.push(err); + } + if (idx < length - 1) { + handleFile(idx + 1); + } else { + cb(null, errors); + } + }); + } + handleFile(0); + } + module2.exports = removeUploadedFiles; + } +}); + +// ../../node_modules/.pnpm/multer@2.0.2/node_modules/multer/lib/make-middleware.js +var require_make_middleware = __commonJS({ + "../../node_modules/.pnpm/multer@2.0.2/node_modules/multer/lib/make-middleware.js"(exports2, module2) { + var is = require_type_is(); + var Busboy = require_lib5(); + var extend = require_immutable(); + var appendField = require_append_field(); + var Counter = require_counter(); + var MulterError = require_multer_error(); + var FileAppender = require_file_appender(); + var removeUploadedFiles = require_remove_uploaded_files(); + function drainStream(stream) { + stream.on("readable", () => { + while (stream.read() !== null) { + } + }); + } + function makeMiddleware(setup) { + return function multerMiddleware(req, res, next) { + if (!is(req, ["multipart"])) return next(); + var options = setup(); + var limits = options.limits; + var storage = options.storage; + var fileFilter = options.fileFilter; + var fileStrategy = options.fileStrategy; + var preservePath = options.preservePath; + req.body = /* @__PURE__ */ Object.create(null); + req.on("error", function(err) { + abortWithError(err); + }); + var busboy; + try { + busboy = Busboy({ headers: req.headers, limits, preservePath }); + } catch (err) { + return next(err); + } + var appender = new FileAppender(fileStrategy, req); + var isDone = false; + var readFinished = false; + var errorOccured = false; + var pendingWrites = new Counter(); + var uploadedFiles = []; + function done(err) { + if (isDone) return; + isDone = true; + req.unpipe(busboy); + drainStream(req); + req.resume(); + setImmediate(() => { + busboy.removeAllListeners(); + }); + next(err); + } + function indicateDone() { + if (readFinished && pendingWrites.isZero() && !errorOccured) done(); + } + function abortWithError(uploadError) { + if (errorOccured) return; + errorOccured = true; + pendingWrites.onceZero(function() { + function remove(file2, cb) { + storage._removeFile(req, file2, cb); + } + removeUploadedFiles(uploadedFiles, remove, function(err, storageErrors) { + if (err) return done(err); + uploadError.storageErrors = storageErrors; + done(uploadError); + }); + }); + } + function abortWithCode(code, optionalField) { + abortWithError(new MulterError(code, optionalField)); + } + busboy.on("field", function(fieldname, value, { nameTruncated, valueTruncated }) { + if (fieldname == null) return abortWithCode("MISSING_FIELD_NAME"); + if (nameTruncated) return abortWithCode("LIMIT_FIELD_KEY"); + if (valueTruncated) return abortWithCode("LIMIT_FIELD_VALUE", fieldname); + if (limits && Object.prototype.hasOwnProperty.call(limits, "fieldNameSize")) { + if (fieldname.length > limits.fieldNameSize) return abortWithCode("LIMIT_FIELD_KEY"); + } + appendField(req.body, fieldname, value); + }); + busboy.on("file", function(fieldname, fileStream, { filename, encoding, mimeType }) { + var pendingWritesIncremented = false; + fileStream.on("error", function(err) { + if (pendingWritesIncremented) { + pendingWrites.decrement(); + } + abortWithError(err); + }); + if (fieldname == null) return abortWithCode("MISSING_FIELD_NAME"); + if (!filename) return fileStream.resume(); + if (limits && Object.prototype.hasOwnProperty.call(limits, "fieldNameSize")) { + if (fieldname.length > limits.fieldNameSize) return abortWithCode("LIMIT_FIELD_KEY"); + } + var file2 = { + fieldname, + originalname: filename, + encoding, + mimetype: mimeType + }; + var placeholder = appender.insertPlaceholder(file2); + fileFilter(req, file2, function(err, includeFile) { + if (err) { + appender.removePlaceholder(placeholder); + return abortWithError(err); + } + if (!includeFile) { + appender.removePlaceholder(placeholder); + return fileStream.resume(); + } + var aborting = false; + pendingWritesIncremented = true; + pendingWrites.increment(); + Object.defineProperty(file2, "stream", { + configurable: true, + enumerable: false, + value: fileStream + }); + fileStream.on("limit", function() { + aborting = true; + abortWithCode("LIMIT_FILE_SIZE", fieldname); + }); + storage._handleFile(req, file2, function(err2, info) { + if (aborting) { + appender.removePlaceholder(placeholder); + uploadedFiles.push(extend(file2, info)); + return pendingWrites.decrement(); + } + if (err2) { + appender.removePlaceholder(placeholder); + pendingWrites.decrement(); + return abortWithError(err2); + } + var fileInfo = extend(file2, info); + appender.replacePlaceholder(placeholder, fileInfo); + uploadedFiles.push(fileInfo); + pendingWrites.decrement(); + indicateDone(); + }); + }); + }); + busboy.on("error", function(err) { + abortWithError(err); + }); + busboy.on("partsLimit", function() { + abortWithCode("LIMIT_PART_COUNT"); + }); + busboy.on("filesLimit", function() { + abortWithCode("LIMIT_FILE_COUNT"); + }); + busboy.on("fieldsLimit", function() { + abortWithCode("LIMIT_FIELD_COUNT"); + }); + busboy.on("close", function() { + readFinished = true; + indicateDone(); + }); + req.pipe(busboy); + }; + } + module2.exports = makeMiddleware; + } +}); + +// ../../node_modules/.pnpm/mkdirp@0.5.6/node_modules/mkdirp/index.js +var require_mkdirp = __commonJS({ + "../../node_modules/.pnpm/mkdirp@0.5.6/node_modules/mkdirp/index.js"(exports2, module2) { + var path = require("path"); + var fs = require("fs"); + var _0777 = parseInt("0777", 8); + module2.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; + function mkdirP(p, opts, f, made) { + if (typeof opts === "function") { + f = opts; + opts = {}; + } else if (!opts || typeof opts !== "object") { + opts = { mode: opts }; + } + var mode = opts.mode; + var xfs = opts.fs || fs; + if (mode === void 0) { + mode = _0777; + } + if (!made) made = null; + var cb = f || /* istanbul ignore next */ + function() { + }; + p = path.resolve(p); + xfs.mkdir(p, mode, function(er) { + if (!er) { + made = made || p; + return cb(null, made); + } + switch (er.code) { + case "ENOENT": + if (path.dirname(p) === p) return cb(er); + mkdirP(path.dirname(p), opts, function(er2, made2) { + if (er2) cb(er2, made2); + else mkdirP(p, opts, cb, made2); + }); + break; + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + xfs.stat(p, function(er2, stat) { + if (er2 || !stat.isDirectory()) cb(er, made); + else cb(null, made); + }); + break; + } + }); + } + mkdirP.sync = function sync(p, opts, made) { + if (!opts || typeof opts !== "object") { + opts = { mode: opts }; + } + var mode = opts.mode; + var xfs = opts.fs || fs; + if (mode === void 0) { + mode = _0777; + } + if (!made) made = null; + p = path.resolve(p); + try { + xfs.mkdirSync(p, mode); + made = made || p; + } catch (err0) { + switch (err0.code) { + case "ENOENT": + made = sync(path.dirname(p), opts, made); + sync(p, opts, made); + break; + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + var stat; + try { + stat = xfs.statSync(p); + } catch (err1) { + throw err0; + } + if (!stat.isDirectory()) throw err0; + break; + } + } + return made; + }; + } +}); + +// ../../node_modules/.pnpm/multer@2.0.2/node_modules/multer/storage/disk.js +var require_disk = __commonJS({ + "../../node_modules/.pnpm/multer@2.0.2/node_modules/multer/storage/disk.js"(exports2, module2) { + var fs = require("fs"); + var os2 = require("os"); + var path = require("path"); + var crypto5 = require("crypto"); + var mkdirp = require_mkdirp(); + function getFilename(req, file2, cb) { + crypto5.randomBytes(16, function(err, raw) { + cb(err, err ? void 0 : raw.toString("hex")); + }); + } + function getDestination(req, file2, cb) { + cb(null, os2.tmpdir()); + } + function DiskStorage(opts) { + this.getFilename = opts.filename || getFilename; + if (typeof opts.destination === "string") { + mkdirp.sync(opts.destination); + this.getDestination = function($0, $1, cb) { + cb(null, opts.destination); + }; + } else { + this.getDestination = opts.destination || getDestination; + } + } + DiskStorage.prototype._handleFile = function _handleFile(req, file2, cb) { + var that = this; + that.getDestination(req, file2, function(err, destination) { + if (err) return cb(err); + that.getFilename(req, file2, function(err2, filename) { + if (err2) return cb(err2); + var finalPath = path.join(destination, filename); + var outStream = fs.createWriteStream(finalPath); + file2.stream.pipe(outStream); + outStream.on("error", cb); + outStream.on("finish", function() { + cb(null, { + destination, + filename, + path: finalPath, + size: outStream.bytesWritten + }); + }); + }); + }); + }; + DiskStorage.prototype._removeFile = function _removeFile(req, file2, cb) { + var path2 = file2.path; + delete file2.destination; + delete file2.filename; + delete file2.path; + fs.unlink(path2, cb); + }; + module2.exports = function(opts) { + return new DiskStorage(opts); + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/stream.js +var require_stream = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) { + module2.exports = require("stream"); + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/buffer_list.js +var require_buffer_list = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports2, module2) { + "use strict"; + function ownKeys2(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? ownKeys2(Object(source), true).forEach(function(key) { + _defineProperty(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys2(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; + } + function _defineProperty(obj2, key, value) { + key = _toPropertyKey(key); + if (key in obj2) { + Object.defineProperty(obj2, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj2[key] = value; + } + return obj2; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, "prototype", { writable: false }); + return Constructor; + } + function _toPropertyKey(arg) { + var key = _toPrimitive(arg, "string"); + return typeof key === "symbol" ? key : String(key); + } + function _toPrimitive(input, hint) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + if (prim !== void 0) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (hint === "string" ? String : Number)(input); + } + var _require = require("buffer"); + var Buffer2 = _require.Buffer; + var _require2 = require("util"); + var inspect = _require2.inspect; + var custom = inspect && inspect.custom || "inspect"; + function copyBuffer(src, target, offset) { + Buffer2.prototype.copy.call(src, target, offset); + } + module2.exports = /* @__PURE__ */ (function() { + function BufferList() { + _classCallCheck(this, BufferList); + this.head = null; + this.tail = null; + this.length = 0; + } + _createClass(BufferList, [{ + key: "push", + value: function push(v) { + var entry = { + data: v, + next: null + }; + if (this.length > 0) this.tail.next = entry; + else this.head = entry; + this.tail = entry; + ++this.length; + } + }, { + key: "unshift", + value: function unshift(v) { + var entry = { + data: v, + next: this.head + }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + } + }, { + key: "shift", + value: function shift() { + if (this.length === 0) return; + var ret2 = this.head.data; + if (this.length === 1) this.head = this.tail = null; + else this.head = this.head.next; + --this.length; + return ret2; + } + }, { + key: "clear", + value: function clear() { + this.head = this.tail = null; + this.length = 0; + } + }, { + key: "join", + value: function join(s) { + if (this.length === 0) return ""; + var p = this.head; + var ret2 = "" + p.data; + while (p = p.next) ret2 += s + p.data; + return ret2; + } + }, { + key: "concat", + value: function concat(n) { + if (this.length === 0) return Buffer2.alloc(0); + var ret2 = Buffer2.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret2, i); + i += p.data.length; + p = p.next; + } + return ret2; + } + // Consumes a specified amount of bytes or characters from the buffered data. + }, { + key: "consume", + value: function consume(n, hasStrings) { + var ret2; + if (n < this.head.data.length) { + ret2 = this.head.data.slice(0, n); + this.head.data = this.head.data.slice(n); + } else if (n === this.head.data.length) { + ret2 = this.shift(); + } else { + ret2 = hasStrings ? this._getString(n) : this._getBuffer(n); + } + return ret2; + } + }, { + key: "first", + value: function first() { + return this.head.data; + } + // Consumes a specified amount of characters from the buffered data. + }, { + key: "_getString", + value: function _getString(n) { + var p = this.head; + var c = 1; + var ret2 = p.data; + n -= ret2.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret2 += str; + else ret2 += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) this.head = p.next; + else this.head = this.tail = null; + } else { + this.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + this.length -= c; + return ret2; + } + // Consumes a specified amount of bytes from the buffered data. + }, { + key: "_getBuffer", + value: function _getBuffer(n) { + var ret2 = Buffer2.allocUnsafe(n); + var p = this.head; + var c = 1; + p.data.copy(ret2); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret2, ret2.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) this.head = p.next; + else this.head = this.tail = null; + } else { + this.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + this.length -= c; + return ret2; + } + // Make sure the linked list only shows the minimal necessary information. + }, { + key: custom, + value: function value(_2, options) { + return inspect(this, _objectSpread(_objectSpread({}, options), {}, { + // Only inspect one level. + depth: 0, + // It should not recurse. + customInspect: false + })); + } + }]); + return BufferList; + })(); + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/destroy.js +var require_destroy2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) { + "use strict"; + function destroy(err, cb) { + var _this = this; + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err) { + if (!this._writableState) { + process.nextTick(emitErrorNT, this, err); + } else if (!this._writableState.errorEmitted) { + this._writableState.errorEmitted = true; + process.nextTick(emitErrorNT, this, err); + } + } + return this; + } + if (this._readableState) { + this._readableState.destroyed = true; + } + if (this._writableState) { + this._writableState.destroyed = true; + } + this._destroy(err || null, function(err2) { + if (!cb && err2) { + if (!_this._writableState) { + process.nextTick(emitErrorAndCloseNT, _this, err2); + } else if (!_this._writableState.errorEmitted) { + _this._writableState.errorEmitted = true; + process.nextTick(emitErrorAndCloseNT, _this, err2); + } else { + process.nextTick(emitCloseNT, _this); + } + } else if (cb) { + process.nextTick(emitCloseNT, _this); + cb(err2); + } else { + process.nextTick(emitCloseNT, _this); + } + }); + return this; + } + function emitErrorAndCloseNT(self2, err) { + emitErrorNT(self2, err); + emitCloseNT(self2); + } + function emitCloseNT(self2) { + if (self2._writableState && !self2._writableState.emitClose) return; + if (self2._readableState && !self2._readableState.emitClose) return; + self2.emit("close"); + } + function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finalCalled = false; + this._writableState.prefinished = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } + } + function emitErrorNT(self2, err) { + self2.emit("error", err); + } + function errorOrDestroy(stream, err) { + var rState = stream._readableState; + var wState = stream._writableState; + if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err); + else stream.emit("error", err); + } + module2.exports = { + destroy, + undestroy, + errorOrDestroy + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors.js +var require_errors = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors.js"(exports2, module2) { + "use strict"; + var codes = {}; + function createErrorType(code, message, Base) { + if (!Base) { + Base = Error; + } + function getMessage(arg1, arg2, arg3) { + if (typeof message === "string") { + return message; + } else { + return message(arg1, arg2, arg3); + } + } + class NodeError extends Base { + constructor(arg1, arg2, arg3) { + super(getMessage(arg1, arg2, arg3)); + } + } + NodeError.prototype.name = Base.name; + NodeError.prototype.code = code; + codes[code] = NodeError; + } + function oneOf(expected, thing) { + if (Array.isArray(expected)) { + const len = expected.length; + expected = expected.map((i) => String(i)); + if (len > 2) { + return `one of ${thing} ${expected.slice(0, len - 1).join(", ")}, or ` + expected[len - 1]; + } else if (len === 2) { + return `one of ${thing} ${expected[0]} or ${expected[1]}`; + } else { + return `of ${thing} ${expected[0]}`; + } + } else { + return `of ${thing} ${String(expected)}`; + } + } + function startsWith(str, search, pos) { + return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; + } + function endsWith(str, search, this_len) { + if (this_len === void 0 || this_len > str.length) { + this_len = str.length; + } + return str.substring(this_len - search.length, this_len) === search; + } + function includes(str, search, start) { + if (typeof start !== "number") { + start = 0; + } + if (start + search.length > str.length) { + return false; + } else { + return str.indexOf(search, start) !== -1; + } + } + createErrorType("ERR_INVALID_OPT_VALUE", function(name, value) { + return 'The value "' + value + '" is invalid for option "' + name + '"'; + }, TypeError); + createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) { + let determiner; + if (typeof expected === "string" && startsWith(expected, "not ")) { + determiner = "must not be"; + expected = expected.replace(/^not /, ""); + } else { + determiner = "must be"; + } + let msg; + if (endsWith(name, " argument")) { + msg = `The ${name} ${determiner} ${oneOf(expected, "type")}`; + } else { + const type = includes(name, ".") ? "property" : "argument"; + msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, "type")}`; + } + msg += `. Received type ${typeof actual}`; + return msg; + }, TypeError); + createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"); + createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name) { + return "The " + name + " method is not implemented"; + }); + createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close"); + createErrorType("ERR_STREAM_DESTROYED", function(name) { + return "Cannot call " + name + " after a stream was destroyed"; + }); + createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"); + createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"); + createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end"); + createErrorType("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError); + createErrorType("ERR_UNKNOWN_ENCODING", function(arg) { + return "Unknown encoding: " + arg; + }, TypeError); + createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"); + module2.exports.codes = codes; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/state.js +var require_state = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/state.js"(exports2, module2) { + "use strict"; + var ERR_INVALID_OPT_VALUE = require_errors().codes.ERR_INVALID_OPT_VALUE; + function highWaterMarkFrom(options, isDuplex, duplexKey) { + return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; + } + function getHighWaterMark(state, options, duplexKey, isDuplex) { + var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); + if (hwm != null) { + if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { + var name = isDuplex ? duplexKey : "highWaterMark"; + throw new ERR_INVALID_OPT_VALUE(name, hwm); + } + return Math.floor(hwm); + } + return state.objectMode ? 16 : 16 * 1024; + } + module2.exports = { + getHighWaterMark + }; + } +}); + +// ../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js +var require_node2 = __commonJS({ + "../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js"(exports2, module2) { + module2.exports = require("util").deprecate; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_writable.js +var require_stream_writable = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) { + "use strict"; + module2.exports = Writable; + function CorkedRequest(state) { + var _this = this; + this.next = null; + this.entry = null; + this.finish = function() { + onCorkedFinish(_this, state); + }; + } + var Duplex; + Writable.WritableState = WritableState; + var internalUtil = { + deprecate: require_node2() + }; + var Stream = require_stream(); + var Buffer2 = require("buffer").Buffer; + var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer2.from(chunk); + } + function _isUint8Array(obj2) { + return Buffer2.isBuffer(obj2) || obj2 instanceof OurUint8Array; + } + var destroyImpl = require_destroy2(); + var _require = require_state(); + var getHighWaterMark = _require.getHighWaterMark; + var _require$codes = require_errors().codes; + var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE; + var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; + var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK; + var ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE; + var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; + var ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES; + var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END; + var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; + var errorOrDestroy = destroyImpl.errorOrDestroy; + require_inherits()(Writable, Stream); + function nop() { + } + function WritableState(options, stream, isDuplex) { + Duplex = Duplex || require_stream_duplex(); + options = options || {}; + if (typeof isDuplex !== "boolean") isDuplex = stream instanceof Duplex; + this.objectMode = !!options.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + this.highWaterMark = getHighWaterMark(this, options, "writableHighWaterMark", isDuplex); + this.finalCalled = false; + this.needDrain = false; + this.ending = false; + this.ended = false; + this.finished = false; + this.destroyed = false; + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + this.defaultEncoding = options.defaultEncoding || "utf8"; + this.length = 0; + this.writing = false; + this.corked = 0; + this.sync = true; + this.bufferProcessing = false; + this.onwrite = function(er) { + onwrite(stream, er); + }; + this.writecb = null; + this.writelen = 0; + this.bufferedRequest = null; + this.lastBufferedRequest = null; + this.pendingcb = 0; + this.prefinished = false; + this.errorEmitted = false; + this.emitClose = options.emitClose !== false; + this.autoDestroy = !!options.autoDestroy; + this.bufferedRequestCount = 0; + this.corkedRequestsFree = new CorkedRequest(this); + } + WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; + }; + (function() { + try { + Object.defineProperty(WritableState.prototype, "buffer", { + get: internalUtil.deprecate(function writableStateBufferGetter() { + return this.getBuffer(); + }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") + }); + } catch (_2) { + } + })(); + var realHasInstance; + if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function value(object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + return object && object._writableState instanceof WritableState; + } + }); + } else { + realHasInstance = function realHasInstance2(object) { + return object instanceof this; + }; + } + function Writable(options) { + Duplex = Duplex || require_stream_duplex(); + var isDuplex = this instanceof Duplex; + if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); + this._writableState = new WritableState(options, this, isDuplex); + this.writable = true; + if (options) { + if (typeof options.write === "function") this._write = options.write; + if (typeof options.writev === "function") this._writev = options.writev; + if (typeof options.destroy === "function") this._destroy = options.destroy; + if (typeof options.final === "function") this._final = options.final; + } + Stream.call(this); + } + Writable.prototype.pipe = function() { + errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); + }; + function writeAfterEnd(stream, cb) { + var er = new ERR_STREAM_WRITE_AFTER_END(); + errorOrDestroy(stream, er); + process.nextTick(cb, er); + } + function validChunk(stream, state, chunk, cb) { + var er; + if (chunk === null) { + er = new ERR_STREAM_NULL_VALUES(); + } else if (typeof chunk !== "string" && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer"], chunk); + } + if (er) { + errorOrDestroy(stream, er); + process.nextTick(cb, er); + return false; + } + return true; + } + Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret2 = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + if (isBuf && !Buffer2.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (isBuf) encoding = "buffer"; + else if (!encoding) encoding = state.defaultEncoding; + if (typeof cb !== "function") cb = nop; + if (state.ending) writeAfterEnd(this, cb); + else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret2 = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + return ret2; + }; + Writable.prototype.cork = function() { + this._writableState.corked++; + }; + Writable.prototype.uncork = function() { + var state = this._writableState; + if (state.corked) { + state.corked--; + if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } + }; + Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + if (typeof encoding === "string") encoding = encoding.toLowerCase(); + if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); + this._writableState.defaultEncoding = encoding; + return this; + }; + Object.defineProperty(Writable.prototype, "writableBuffer", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } + }); + function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") { + chunk = Buffer2.from(chunk, encoding); + } + return chunk; + } + Object.defineProperty(Writable.prototype, "writableHighWaterMark", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } + }); + function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = "buffer"; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + state.length += len; + var ret2 = state.length < state.highWaterMark; + if (!ret2) state.needDrain = true; + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk, + encoding, + isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + return ret2; + } + function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED("write")); + else if (writev) stream._writev(chunk, state.onwrite); + else stream._write(chunk, encoding, state.onwrite); + state.sync = false; + } + function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) { + process.nextTick(cb, er); + process.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); + } else { + cb(er); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); + finishMaybe(stream, state); + } + } + function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; + } + function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + if (typeof cb !== "function") throw new ERR_MULTIPLE_CALLBACK(); + onwriteStateUpdate(state); + if (er) onwriteError(stream, state, sync, er, cb); + else { + var finished = needFinish(state) || stream.destroyed; + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + if (sync) { + process.nextTick(afterWrite, stream, state, finished, cb); + } else { + afterWrite(stream, state, finished, cb); + } + } + } + function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); + } + function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit("drain"); + } + } + function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + if (stream._writev && entry && entry.next) { + var l2 = state.bufferedRequestCount; + var buffer = new Array(l2); + var holder = state.corkedRequestsFree; + holder.entry = entry; + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + doWrite(stream, state, true, state.length, buffer, "", holder.finish); + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + if (state.writing) { + break; + } + } + if (entry === null) state.lastBufferedRequest = null; + } + state.bufferedRequest = entry; + state.bufferProcessing = false; + } + Writable.prototype._write = function(chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()")); + }; + Writable.prototype._writev = null; + Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + if (typeof chunk === "function") { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (chunk !== null && chunk !== void 0) this.write(chunk, encoding); + if (state.corked) { + state.corked = 1; + this.uncork(); + } + if (!state.ending) endWritable(this, state, cb); + return this; + }; + Object.defineProperty(Writable.prototype, "writableLength", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.length; + } + }); + function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; + } + function callFinal(stream, state) { + stream._final(function(err) { + state.pendingcb--; + if (err) { + errorOrDestroy(stream, err); + } + state.prefinished = true; + stream.emit("prefinish"); + finishMaybe(stream, state); + }); + } + function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === "function" && !state.destroyed) { + state.pendingcb++; + state.finalCalled = true; + process.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit("prefinish"); + } + } + } + function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit("finish"); + if (state.autoDestroy) { + var rState = stream._readableState; + if (!rState || rState.autoDestroy && rState.endEmitted) { + stream.destroy(); + } + } + } + } + return need; + } + function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) process.nextTick(cb); + else stream.once("finish", cb); + } + state.ended = true; + stream.writable = false; + } + function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + state.corkedRequestsFree.next = corkReq; + } + Object.defineProperty(Writable.prototype, "destroyed", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._writableState === void 0) { + return false; + } + return this._writableState.destroyed; + }, + set: function set(value) { + if (!this._writableState) { + return; + } + this._writableState.destroyed = value; + } + }); + Writable.prototype.destroy = destroyImpl.destroy; + Writable.prototype._undestroy = destroyImpl.undestroy; + Writable.prototype._destroy = function(err, cb) { + cb(err); + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_duplex.js +var require_stream_duplex = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) { + "use strict"; + var objectKeys = Object.keys || function(obj2) { + var keys2 = []; + for (var key in obj2) keys2.push(key); + return keys2; + }; + module2.exports = Duplex; + var Readable = require_stream_readable(); + var Writable = require_stream_writable(); + require_inherits()(Duplex, Readable); + { + keys = objectKeys(Writable.prototype); + for (v = 0; v < keys.length; v++) { + method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } + } + var keys; + var method; + var v; + function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + Readable.call(this, options); + Writable.call(this, options); + this.allowHalfOpen = true; + if (options) { + if (options.readable === false) this.readable = false; + if (options.writable === false) this.writable = false; + if (options.allowHalfOpen === false) { + this.allowHalfOpen = false; + this.once("end", onend); + } + } + } + Object.defineProperty(Duplex.prototype, "writableHighWaterMark", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } + }); + Object.defineProperty(Duplex.prototype, "writableBuffer", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } + }); + Object.defineProperty(Duplex.prototype, "writableLength", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.length; + } + }); + function onend() { + if (this._writableState.ended) return; + process.nextTick(onEndNT, this); + } + function onEndNT(self2) { + self2.end(); + } + Object.defineProperty(Duplex.prototype, "destroyed", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._readableState === void 0 || this._writableState === void 0) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function set(value) { + if (this._readableState === void 0 || this._writableState === void 0) { + return; + } + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } + }); + } +}); + +// ../../node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js +var require_string_decoder = __commonJS({ + "../../node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js"(exports2) { + "use strict"; + var Buffer2 = require_safe_buffer().Buffer; + var isEncoding = Buffer2.isEncoding || function(encoding) { + encoding = "" + encoding; + switch (encoding && encoding.toLowerCase()) { + case "hex": + case "utf8": + case "utf-8": + case "ascii": + case "binary": + case "base64": + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + case "raw": + return true; + default: + return false; + } + }; + function _normalizeEncoding(enc) { + if (!enc) return "utf8"; + var retried; + while (true) { + switch (enc) { + case "utf8": + case "utf-8": + return "utf8"; + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return "utf16le"; + case "latin1": + case "binary": + return "latin1"; + case "base64": + case "ascii": + case "hex": + return enc; + default: + if (retried) return; + enc = ("" + enc).toLowerCase(); + retried = true; + } + } + } + function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== "string" && (Buffer2.isEncoding === isEncoding || !isEncoding(enc))) throw new Error("Unknown encoding: " + enc); + return nenc || enc; + } + exports2.StringDecoder = StringDecoder; + function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case "utf16le": + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case "utf8": + this.fillLast = utf8FillLast; + nb = 4; + break; + case "base64": + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; + } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = Buffer2.allocUnsafe(nb); + } + StringDecoder.prototype.write = function(buf) { + if (buf.length === 0) return ""; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === void 0) return ""; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; + } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ""; + }; + StringDecoder.prototype.end = utf8End; + StringDecoder.prototype.text = utf8Text; + StringDecoder.prototype.fillLast = function(buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; + }; + function utf8CheckByte(byte) { + if (byte <= 127) return 0; + else if (byte >> 5 === 6) return 2; + else if (byte >> 4 === 14) return 3; + else if (byte >> 3 === 30) return 4; + return byte >> 6 === 2 ? -1 : -2; + } + function utf8CheckIncomplete(self2, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self2.lastNeed = nb - 1; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self2.lastNeed = nb - 2; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0; + else self2.lastNeed = nb - 3; + } + return nb; + } + return 0; + } + function utf8CheckExtraBytes(self2, buf, p) { + if ((buf[0] & 192) !== 128) { + self2.lastNeed = 0; + return "\uFFFD"; + } + if (self2.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 192) !== 128) { + self2.lastNeed = 1; + return "\uFFFD"; + } + if (self2.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 192) !== 128) { + self2.lastNeed = 2; + return "\uFFFD"; + } + } + } + } + function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== void 0) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; + } + function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString("utf8", i); + this.lastTotal = total; + var end = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end); + return buf.toString("utf8", i, end); + } + function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) return r + "\uFFFD"; + return r; + } + function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString("utf16le", i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 55296 && c <= 56319) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; + } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString("utf16le", i, buf.length - 1); + } + function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) { + var end = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString("utf16le", 0, end); + } + return r; + } + function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString("base64", i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; + } else { + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + } + return buf.toString("base64", i, buf.length - n); + } + function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) return r + this.lastChar.toString("base64", 0, 3 - this.lastNeed); + return r; + } + function simpleWrite(buf) { + return buf.toString(this.encoding); + } + function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ""; + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +var require_end_of_stream = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) { + "use strict"; + var ERR_STREAM_PREMATURE_CLOSE = require_errors().codes.ERR_STREAM_PREMATURE_CLOSE; + function once(callback) { + var called = false; + return function() { + if (called) return; + called = true; + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + callback.apply(this, args); + }; + } + function noop() { + } + function isRequest(stream) { + return stream.setHeader && typeof stream.abort === "function"; + } + function eos(stream, opts, callback) { + if (typeof opts === "function") return eos(stream, null, opts); + if (!opts) opts = {}; + callback = once(callback || noop); + var readable = opts.readable || opts.readable !== false && stream.readable; + var writable = opts.writable || opts.writable !== false && stream.writable; + var onlegacyfinish = function onlegacyfinish2() { + if (!stream.writable) onfinish(); + }; + var writableEnded = stream._writableState && stream._writableState.finished; + var onfinish = function onfinish2() { + writable = false; + writableEnded = true; + if (!readable) callback.call(stream); + }; + var readableEnded = stream._readableState && stream._readableState.endEmitted; + var onend = function onend2() { + readable = false; + readableEnded = true; + if (!writable) callback.call(stream); + }; + var onerror = function onerror2(err) { + callback.call(stream, err); + }; + var onclose = function onclose2() { + var err; + if (readable && !readableEnded) { + if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } + if (writable && !writableEnded) { + if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } + }; + var onrequest = function onrequest2() { + stream.req.on("finish", onfinish); + }; + if (isRequest(stream)) { + stream.on("complete", onfinish); + stream.on("abort", onclose); + if (stream.req) onrequest(); + else stream.on("request", onrequest); + } else if (writable && !stream._writableState) { + stream.on("end", onlegacyfinish); + stream.on("close", onlegacyfinish); + } + stream.on("end", onend); + stream.on("finish", onfinish); + if (opts.error !== false) stream.on("error", onerror); + stream.on("close", onclose); + return function() { + stream.removeListener("complete", onfinish); + stream.removeListener("abort", onclose); + stream.removeListener("request", onrequest); + if (stream.req) stream.req.removeListener("finish", onfinish); + stream.removeListener("end", onlegacyfinish); + stream.removeListener("close", onlegacyfinish); + stream.removeListener("finish", onfinish); + stream.removeListener("end", onend); + stream.removeListener("error", onerror); + stream.removeListener("close", onclose); + }; + } + module2.exports = eos; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/async_iterator.js +var require_async_iterator = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports2, module2) { + "use strict"; + var _Object$setPrototypeO; + function _defineProperty(obj2, key, value) { + key = _toPropertyKey(key); + if (key in obj2) { + Object.defineProperty(obj2, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj2[key] = value; + } + return obj2; + } + function _toPropertyKey(arg) { + var key = _toPrimitive(arg, "string"); + return typeof key === "symbol" ? key : String(key); + } + function _toPrimitive(input, hint) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + if (prim !== void 0) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (hint === "string" ? String : Number)(input); + } + var finished = require_end_of_stream(); + var kLastResolve = Symbol("lastResolve"); + var kLastReject = Symbol("lastReject"); + var kError = Symbol("error"); + var kEnded = Symbol("ended"); + var kLastPromise = Symbol("lastPromise"); + var kHandlePromise = Symbol("handlePromise"); + var kStream = Symbol("stream"); + function createIterResult(value, done) { + return { + value, + done + }; + } + function readAndResolve(iter) { + var resolve = iter[kLastResolve]; + if (resolve !== null) { + var data = iter[kStream].read(); + if (data !== null) { + iter[kLastPromise] = null; + iter[kLastResolve] = null; + iter[kLastReject] = null; + resolve(createIterResult(data, false)); + } + } + } + function onReadable(iter) { + process.nextTick(readAndResolve, iter); + } + function wrapForNext(lastPromise, iter) { + return function(resolve, reject) { + lastPromise.then(function() { + if (iter[kEnded]) { + resolve(createIterResult(void 0, true)); + return; + } + iter[kHandlePromise](resolve, reject); + }, reject); + }; + } + var AsyncIteratorPrototype = Object.getPrototypeOf(function() { + }); + var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { + get stream() { + return this[kStream]; + }, + next: function next() { + var _this = this; + var error = this[kError]; + if (error !== null) { + return Promise.reject(error); + } + if (this[kEnded]) { + return Promise.resolve(createIterResult(void 0, true)); + } + if (this[kStream].destroyed) { + return new Promise(function(resolve, reject) { + process.nextTick(function() { + if (_this[kError]) { + reject(_this[kError]); + } else { + resolve(createIterResult(void 0, true)); + } + }); + }); + } + var lastPromise = this[kLastPromise]; + var promise; + if (lastPromise) { + promise = new Promise(wrapForNext(lastPromise, this)); + } else { + var data = this[kStream].read(); + if (data !== null) { + return Promise.resolve(createIterResult(data, false)); + } + promise = new Promise(this[kHandlePromise]); + } + this[kLastPromise] = promise; + return promise; + } + }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function() { + return this; + }), _defineProperty(_Object$setPrototypeO, "return", function _return() { + var _this2 = this; + return new Promise(function(resolve, reject) { + _this2[kStream].destroy(null, function(err) { + if (err) { + reject(err); + return; + } + resolve(createIterResult(void 0, true)); + }); + }); + }), _Object$setPrototypeO), AsyncIteratorPrototype); + var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator2(stream) { + var _Object$create; + var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { + value: stream, + writable: true + }), _defineProperty(_Object$create, kLastResolve, { + value: null, + writable: true + }), _defineProperty(_Object$create, kLastReject, { + value: null, + writable: true + }), _defineProperty(_Object$create, kError, { + value: null, + writable: true + }), _defineProperty(_Object$create, kEnded, { + value: stream._readableState.endEmitted, + writable: true + }), _defineProperty(_Object$create, kHandlePromise, { + value: function value(resolve, reject) { + var data = iterator[kStream].read(); + if (data) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + resolve(createIterResult(data, false)); + } else { + iterator[kLastResolve] = resolve; + iterator[kLastReject] = reject; + } + }, + writable: true + }), _Object$create)); + iterator[kLastPromise] = null; + finished(stream, function(err) { + if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") { + var reject = iterator[kLastReject]; + if (reject !== null) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + reject(err); + } + iterator[kError] = err; + return; + } + var resolve = iterator[kLastResolve]; + if (resolve !== null) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + resolve(createIterResult(void 0, true)); + } + iterator[kEnded] = true; + }); + stream.on("readable", onReadable.bind(null, iterator)); + return iterator; + }; + module2.exports = createReadableStreamAsyncIterator; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from.js +var require_from2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) { + "use strict"; + function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } + } + function _asyncToGenerator(fn) { + return function() { + var self2 = this, args = arguments; + return new Promise(function(resolve, reject) { + var gen = fn.apply(self2, args); + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + _next(void 0); + }); + }; + } + function ownKeys2(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? ownKeys2(Object(source), true).forEach(function(key) { + _defineProperty(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys2(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; + } + function _defineProperty(obj2, key, value) { + key = _toPropertyKey(key); + if (key in obj2) { + Object.defineProperty(obj2, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj2[key] = value; + } + return obj2; + } + function _toPropertyKey(arg) { + var key = _toPrimitive(arg, "string"); + return typeof key === "symbol" ? key : String(key); + } + function _toPrimitive(input, hint) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + if (prim !== void 0) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (hint === "string" ? String : Number)(input); + } + var ERR_INVALID_ARG_TYPE = require_errors().codes.ERR_INVALID_ARG_TYPE; + function from(Readable, iterable, opts) { + var iterator; + if (iterable && typeof iterable.next === "function") { + iterator = iterable; + } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator](); + else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator](); + else throw new ERR_INVALID_ARG_TYPE("iterable", ["Iterable"], iterable); + var readable = new Readable(_objectSpread({ + objectMode: true + }, opts)); + var reading = false; + readable._read = function() { + if (!reading) { + reading = true; + next(); + } + }; + function next() { + return _next2.apply(this, arguments); + } + function _next2() { + _next2 = _asyncToGenerator(function* () { + try { + var _yield$iterator$next = yield iterator.next(), value = _yield$iterator$next.value, done = _yield$iterator$next.done; + if (done) { + readable.push(null); + } else if (readable.push(yield value)) { + next(); + } else { + reading = false; + } + } catch (err) { + readable.destroy(err); + } + }); + return _next2.apply(this, arguments); + } + return readable; + } + module2.exports = from; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js +var require_stream_readable = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) { + "use strict"; + module2.exports = Readable; + var Duplex; + Readable.ReadableState = ReadableState; + var EE = require("events").EventEmitter; + var EElistenerCount = function EElistenerCount2(emitter, type) { + return emitter.listeners(type).length; + }; + var Stream = require_stream(); + var Buffer2 = require("buffer").Buffer; + var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer2.from(chunk); + } + function _isUint8Array(obj2) { + return Buffer2.isBuffer(obj2) || obj2 instanceof OurUint8Array; + } + var debugUtil = require("util"); + var debug; + if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog("stream"); + } else { + debug = function debug2() { + }; + } + var BufferList = require_buffer_list(); + var destroyImpl = require_destroy2(); + var _require = require_state(); + var getHighWaterMark = _require.getHighWaterMark; + var _require$codes = require_errors().codes; + var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE; + var ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF; + var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; + var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; + var StringDecoder; + var createReadableStreamAsyncIterator; + var from; + require_inherits()(Readable, Stream); + var errorOrDestroy = destroyImpl.errorOrDestroy; + var kProxyEvents = ["error", "close", "destroy", "pause", "resume"]; + function prependListener(emitter, event, fn) { + if (typeof emitter.prependListener === "function") return emitter.prependListener(event, fn); + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn); + else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn); + else emitter._events[event] = [fn, emitter._events[event]]; + } + function ReadableState(options, stream, isDuplex) { + Duplex = Duplex || require_stream_duplex(); + options = options || {}; + if (typeof isDuplex !== "boolean") isDuplex = stream instanceof Duplex; + this.objectMode = !!options.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + this.highWaterMark = getHighWaterMark(this, options, "readableHighWaterMark", isDuplex); + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + this.sync = true; + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + this.paused = true; + this.emitClose = options.emitClose !== false; + this.autoDestroy = !!options.autoDestroy; + this.destroyed = false; + this.defaultEncoding = options.defaultEncoding || "utf8"; + this.awaitDrain = 0; + this.readingMore = false; + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } + } + function Readable(options) { + Duplex = Duplex || require_stream_duplex(); + if (!(this instanceof Readable)) return new Readable(options); + var isDuplex = this instanceof Duplex; + this._readableState = new ReadableState(options, this, isDuplex); + this.readable = true; + if (options) { + if (typeof options.read === "function") this._read = options.read; + if (typeof options.destroy === "function") this._destroy = options.destroy; + } + Stream.call(this); + } + Object.defineProperty(Readable.prototype, "destroyed", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._readableState === void 0) { + return false; + } + return this._readableState.destroyed; + }, + set: function set(value) { + if (!this._readableState) { + return; + } + this._readableState.destroyed = value; + } + }); + Readable.prototype.destroy = destroyImpl.destroy; + Readable.prototype._undestroy = destroyImpl.undestroy; + Readable.prototype._destroy = function(err, cb) { + cb(err); + }; + Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + if (!state.objectMode) { + if (typeof chunk === "string") { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer2.from(chunk, encoding); + encoding = ""; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); + }; + Readable.prototype.unshift = function(chunk) { + return readableAddChunk(this, chunk, null, true, false); + }; + function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + debug("readableAddChunk", chunk); + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + errorOrDestroy(stream, er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (addToFront) { + if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT()); + else addChunk(stream, state, chunk, true); + } else if (state.ended) { + errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); + } else if (state.destroyed) { + return false; + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false); + else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + maybeReadMore(stream, state); + } + } + return !state.ended && (state.length < state.highWaterMark || state.length === 0); + } + function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + state.awaitDrain = 0; + stream.emit("data", chunk); + } else { + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk); + else state.buffer.push(chunk); + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); + } + function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer", "Uint8Array"], chunk); + } + return er; + } + Readable.prototype.isPaused = function() { + return this._readableState.flowing === false; + }; + Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder; + var decoder = new StringDecoder(enc); + this._readableState.decoder = decoder; + this._readableState.encoding = this._readableState.decoder.encoding; + var p = this._readableState.buffer.head; + var content = ""; + while (p !== null) { + content += decoder.write(p.data); + p = p.next; + } + this._readableState.buffer.clear(); + if (content !== "") this._readableState.buffer.push(content); + this._readableState.length = content.length; + return this; + }; + var MAX_HWM = 1073741824; + function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; + } + function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + if (state.flowing && state.length) return state.buffer.head.data.length; + else return state.length; + } + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; + } + Readable.prototype.read = function(n) { + debug("read", n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + if (n !== 0) state.emittedReadable = false; + if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { + debug("read: emitReadable", state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this); + else emitReadable(this); + return null; + } + n = howMuchToRead(n, state); + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + var doRead = state.needReadable; + debug("need readable", doRead); + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug("length less than watermark", doRead); + } + if (state.ended || state.reading) { + doRead = false; + debug("reading or ended", doRead); + } else if (doRead) { + debug("do read"); + state.reading = true; + state.sync = true; + if (state.length === 0) state.needReadable = true; + this._read(state.highWaterMark); + state.sync = false; + if (!state.reading) n = howMuchToRead(nOrig, state); + } + var ret2; + if (n > 0) ret2 = fromList(n, state); + else ret2 = null; + if (ret2 === null) { + state.needReadable = state.length <= state.highWaterMark; + n = 0; + } else { + state.length -= n; + state.awaitDrain = 0; + } + if (state.length === 0) { + if (!state.ended) state.needReadable = true; + if (nOrig !== n && state.ended) endReadable(this); + } + if (ret2 !== null) this.emit("data", ret2); + return ret2; + }; + function onEofChunk(stream, state) { + debug("onEofChunk"); + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + if (state.sync) { + emitReadable(stream); + } else { + state.needReadable = false; + if (!state.emittedReadable) { + state.emittedReadable = true; + emitReadable_(stream); + } + } + } + function emitReadable(stream) { + var state = stream._readableState; + debug("emitReadable", state.needReadable, state.emittedReadable); + state.needReadable = false; + if (!state.emittedReadable) { + debug("emitReadable", state.flowing); + state.emittedReadable = true; + process.nextTick(emitReadable_, stream); + } + } + function emitReadable_(stream) { + var state = stream._readableState; + debug("emitReadable_", state.destroyed, state.length, state.ended); + if (!state.destroyed && (state.length || state.ended)) { + stream.emit("readable"); + state.emittedReadable = false; + } + state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; + flow(stream); + } + function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(maybeReadMore_, stream, state); + } + } + function maybeReadMore_(stream, state) { + while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { + var len = state.length; + debug("maybeReadMore read 0"); + stream.read(0); + if (len === state.length) + break; + } + state.readingMore = false; + } + Readable.prototype._read = function(n) { + errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED("_read()")); + }; + Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug("pipe count=%d opts=%j", state.pipesCount, pipeOpts); + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) process.nextTick(endFn); + else src.once("end", endFn); + dest.on("unpipe", onunpipe); + function onunpipe(readable, unpipeInfo) { + debug("onunpipe"); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + function onend() { + debug("onend"); + dest.end(); + } + var ondrain = pipeOnDrain(src); + dest.on("drain", ondrain); + var cleanedUp = false; + function cleanup() { + debug("cleanup"); + dest.removeListener("close", onclose); + dest.removeListener("finish", onfinish); + dest.removeListener("drain", ondrain); + dest.removeListener("error", onerror); + dest.removeListener("unpipe", onunpipe); + src.removeListener("end", onend); + src.removeListener("end", unpipe); + src.removeListener("data", ondata); + cleanedUp = true; + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + src.on("data", ondata); + function ondata(chunk) { + debug("ondata"); + var ret2 = dest.write(chunk); + debug("dest.write", ret2); + if (ret2 === false) { + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug("false write response, pause", state.awaitDrain); + state.awaitDrain++; + } + src.pause(); + } + } + function onerror(er) { + debug("onerror", er); + unpipe(); + dest.removeListener("error", onerror); + if (EElistenerCount(dest, "error") === 0) errorOrDestroy(dest, er); + } + prependListener(dest, "error", onerror); + function onclose() { + dest.removeListener("finish", onfinish); + unpipe(); + } + dest.once("close", onclose); + function onfinish() { + debug("onfinish"); + dest.removeListener("close", onclose); + unpipe(); + } + dest.once("finish", onfinish); + function unpipe() { + debug("unpipe"); + src.unpipe(dest); + } + dest.emit("pipe", src); + if (!state.flowing) { + debug("pipe resume"); + src.resume(); + } + return dest; + }; + function pipeOnDrain(src) { + return function pipeOnDrainFunctionResult() { + var state = src._readableState; + debug("pipeOnDrain", state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, "data")) { + state.flowing = true; + flow(src); + } + }; + } + Readable.prototype.unpipe = function(dest) { + var state = this._readableState; + var unpipeInfo = { + hasUnpiped: false + }; + if (state.pipesCount === 0) return this; + if (state.pipesCount === 1) { + if (dest && dest !== state.pipes) return this; + if (!dest) dest = state.pipes; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit("unpipe", this, unpipeInfo); + return this; + } + if (!dest) { + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + for (var i = 0; i < len; i++) dests[i].emit("unpipe", this, { + hasUnpiped: false + }); + return this; + } + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + dest.emit("unpipe", this, unpipeInfo); + return this; + }; + Readable.prototype.on = function(ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + var state = this._readableState; + if (ev === "data") { + state.readableListening = this.listenerCount("readable") > 0; + if (state.flowing !== false) this.resume(); + } else if (ev === "readable") { + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.flowing = false; + state.emittedReadable = false; + debug("on readable", state.length, state.reading); + if (state.length) { + emitReadable(this); + } else if (!state.reading) { + process.nextTick(nReadingNextTick, this); + } + } + } + return res; + }; + Readable.prototype.addListener = Readable.prototype.on; + Readable.prototype.removeListener = function(ev, fn) { + var res = Stream.prototype.removeListener.call(this, ev, fn); + if (ev === "readable") { + process.nextTick(updateReadableListening, this); + } + return res; + }; + Readable.prototype.removeAllListeners = function(ev) { + var res = Stream.prototype.removeAllListeners.apply(this, arguments); + if (ev === "readable" || ev === void 0) { + process.nextTick(updateReadableListening, this); + } + return res; + }; + function updateReadableListening(self2) { + var state = self2._readableState; + state.readableListening = self2.listenerCount("readable") > 0; + if (state.resumeScheduled && !state.paused) { + state.flowing = true; + } else if (self2.listenerCount("data") > 0) { + self2.resume(); + } + } + function nReadingNextTick(self2) { + debug("readable nexttick read 0"); + self2.read(0); + } + Readable.prototype.resume = function() { + var state = this._readableState; + if (!state.flowing) { + debug("resume"); + state.flowing = !state.readableListening; + resume(this, state); + } + state.paused = false; + return this; + }; + function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + process.nextTick(resume_, stream, state); + } + } + function resume_(stream, state) { + debug("resume", state.reading); + if (!state.reading) { + stream.read(0); + } + state.resumeScheduled = false; + stream.emit("resume"); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); + } + Readable.prototype.pause = function() { + debug("call pause flowing=%j", this._readableState.flowing); + if (this._readableState.flowing !== false) { + debug("pause"); + this._readableState.flowing = false; + this.emit("pause"); + } + this._readableState.paused = true; + return this; + }; + function flow(stream) { + var state = stream._readableState; + debug("flow", state.flowing); + while (state.flowing && stream.read() !== null) ; + } + Readable.prototype.wrap = function(stream) { + var _this = this; + var state = this._readableState; + var paused = false; + stream.on("end", function() { + debug("wrapped end"); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); + } + _this.push(null); + }); + stream.on("data", function(chunk) { + debug("wrapped data"); + if (state.decoder) chunk = state.decoder.write(chunk); + if (state.objectMode && (chunk === null || chunk === void 0)) return; + else if (!state.objectMode && (!chunk || !chunk.length)) return; + var ret2 = _this.push(chunk); + if (!ret2) { + paused = true; + stream.pause(); + } + }); + for (var i in stream) { + if (this[i] === void 0 && typeof stream[i] === "function") { + this[i] = /* @__PURE__ */ (function methodWrap(method) { + return function methodWrapReturnFunction() { + return stream[method].apply(stream, arguments); + }; + })(i); + } + } + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + this._read = function(n2) { + debug("wrapped _read", n2); + if (paused) { + paused = false; + stream.resume(); + } + }; + return this; + }; + if (typeof Symbol === "function") { + Readable.prototype[Symbol.asyncIterator] = function() { + if (createReadableStreamAsyncIterator === void 0) { + createReadableStreamAsyncIterator = require_async_iterator(); + } + return createReadableStreamAsyncIterator(this); + }; + } + Object.defineProperty(Readable.prototype, "readableHighWaterMark", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.highWaterMark; + } + }); + Object.defineProperty(Readable.prototype, "readableBuffer", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState && this._readableState.buffer; + } + }); + Object.defineProperty(Readable.prototype, "readableFlowing", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.flowing; + }, + set: function set(state) { + if (this._readableState) { + this._readableState.flowing = state; + } + } + }); + Readable._fromList = fromList; + Object.defineProperty(Readable.prototype, "readableLength", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.length; + } + }); + function fromList(n, state) { + if (state.length === 0) return null; + var ret2; + if (state.objectMode) ret2 = state.buffer.shift(); + else if (!n || n >= state.length) { + if (state.decoder) ret2 = state.buffer.join(""); + else if (state.buffer.length === 1) ret2 = state.buffer.first(); + else ret2 = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + ret2 = state.buffer.consume(n, state.decoder); + } + return ret2; + } + function endReadable(stream) { + var state = stream._readableState; + debug("endReadable", state.endEmitted); + if (!state.endEmitted) { + state.ended = true; + process.nextTick(endReadableNT, state, stream); + } + } + function endReadableNT(state, stream) { + debug("endReadableNT", state.endEmitted, state.length); + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit("end"); + if (state.autoDestroy) { + var wState = stream._writableState; + if (!wState || wState.autoDestroy && wState.finished) { + stream.destroy(); + } + } + } + } + if (typeof Symbol === "function") { + Readable.from = function(iterable, opts) { + if (from === void 0) { + from = require_from2(); + } + return from(Readable, iterable, opts); + }; + } + function indexOf(xs, x) { + for (var i = 0, l2 = xs.length; i < l2; i++) { + if (xs[i] === x) return i; + } + return -1; + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_transform.js +var require_stream_transform = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_transform.js"(exports2, module2) { + "use strict"; + module2.exports = Transform; + var _require$codes = require_errors().codes; + var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; + var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK; + var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING; + var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; + var Duplex = require_stream_duplex(); + require_inherits()(Transform, Duplex); + function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + var cb = ts.writecb; + if (cb === null) { + return this.emit("error", new ERR_MULTIPLE_CALLBACK()); + } + ts.writechunk = null; + ts.writecb = null; + if (data != null) + this.push(data); + cb(er); + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } + } + function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + Duplex.call(this, options); + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + this._readableState.needReadable = true; + this._readableState.sync = false; + if (options) { + if (typeof options.transform === "function") this._transform = options.transform; + if (typeof options.flush === "function") this._flush = options.flush; + } + this.on("prefinish", prefinish); + } + function prefinish() { + var _this = this; + if (typeof this._flush === "function" && !this._readableState.destroyed) { + this._flush(function(er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } + } + Transform.prototype.push = function(chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); + }; + Transform.prototype._transform = function(chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()")); + }; + Transform.prototype._write = function(chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } + }; + Transform.prototype._read = function(n) { + var ts = this._transformState; + if (ts.writechunk !== null && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + ts.needTransform = true; + } + }; + Transform.prototype._destroy = function(err, cb) { + Duplex.prototype._destroy.call(this, err, function(err2) { + cb(err2); + }); + }; + function done(stream, er, data) { + if (er) return stream.emit("error", er); + if (data != null) + stream.push(data); + if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); + if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); + return stream.push(null); + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_passthrough.js +var require_stream_passthrough = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_passthrough.js"(exports2, module2) { + "use strict"; + module2.exports = PassThrough; + var Transform = require_stream_transform(); + require_inherits()(PassThrough, Transform); + function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + Transform.call(this, options); + } + PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/pipeline.js +var require_pipeline = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) { + "use strict"; + var eos; + function once(callback) { + var called = false; + return function() { + if (called) return; + called = true; + callback.apply(void 0, arguments); + }; + } + var _require$codes = require_errors().codes; + var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS; + var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; + function noop(err) { + if (err) throw err; + } + function isRequest(stream) { + return stream.setHeader && typeof stream.abort === "function"; + } + function destroyer(stream, reading, writing, callback) { + callback = once(callback); + var closed = false; + stream.on("close", function() { + closed = true; + }); + if (eos === void 0) eos = require_end_of_stream(); + eos(stream, { + readable: reading, + writable: writing + }, function(err) { + if (err) return callback(err); + closed = true; + callback(); + }); + var destroyed = false; + return function(err) { + if (closed) return; + if (destroyed) return; + destroyed = true; + if (isRequest(stream)) return stream.abort(); + if (typeof stream.destroy === "function") return stream.destroy(); + callback(err || new ERR_STREAM_DESTROYED("pipe")); + }; + } + function call(fn) { + fn(); + } + function pipe(from, to) { + return from.pipe(to); + } + function popCallback(streams) { + if (!streams.length) return noop; + if (typeof streams[streams.length - 1] !== "function") return noop; + return streams.pop(); + } + function pipeline() { + for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { + streams[_key] = arguments[_key]; + } + var callback = popCallback(streams); + if (Array.isArray(streams[0])) streams = streams[0]; + if (streams.length < 2) { + throw new ERR_MISSING_ARGS("streams"); + } + var error; + var destroys = streams.map(function(stream, i) { + var reading = i < streams.length - 1; + var writing = i > 0; + return destroyer(stream, reading, writing, function(err) { + if (!error) error = err; + if (err) destroys.forEach(call); + if (reading) return; + destroys.forEach(call); + callback(error); + }); + }); + return streams.reduce(pipe); + } + module2.exports = pipeline; + } +}); + +// ../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable.js +var require_readable = __commonJS({ + "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable.js"(exports2, module2) { + var Stream = require("stream"); + if (process.env.READABLE_STREAM === "disable" && Stream) { + module2.exports = Stream.Readable; + Object.assign(module2.exports, Stream); + module2.exports.Stream = Stream; + } else { + exports2 = module2.exports = require_stream_readable(); + exports2.Stream = Stream || exports2; + exports2.Readable = exports2; + exports2.Writable = require_stream_writable(); + exports2.Duplex = require_stream_duplex(); + exports2.Transform = require_stream_transform(); + exports2.PassThrough = require_stream_passthrough(); + exports2.finished = require_end_of_stream(); + exports2.pipeline = require_pipeline(); + } + } +}); + +// ../../node_modules/.pnpm/buffer-from@1.1.2/node_modules/buffer-from/index.js +var require_buffer_from = __commonJS({ + "../../node_modules/.pnpm/buffer-from@1.1.2/node_modules/buffer-from/index.js"(exports2, module2) { + var toString2 = Object.prototype.toString; + var isModern = typeof Buffer !== "undefined" && typeof Buffer.alloc === "function" && typeof Buffer.allocUnsafe === "function" && typeof Buffer.from === "function"; + function isArrayBuffer(input) { + return toString2.call(input).slice(8, -1) === "ArrayBuffer"; + } + function fromArrayBuffer(obj2, byteOffset, length) { + byteOffset >>>= 0; + var maxLength = obj2.byteLength - byteOffset; + if (maxLength < 0) { + throw new RangeError("'offset' is out of bounds"); + } + if (length === void 0) { + length = maxLength; + } else { + length >>>= 0; + if (length > maxLength) { + throw new RangeError("'length' is out of bounds"); + } + } + return isModern ? Buffer.from(obj2.slice(byteOffset, byteOffset + length)) : new Buffer(new Uint8Array(obj2.slice(byteOffset, byteOffset + length))); + } + function fromString(string, encoding) { + if (typeof encoding !== "string" || encoding === "") { + encoding = "utf8"; + } + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding'); + } + return isModern ? Buffer.from(string, encoding) : new Buffer(string, encoding); + } + function bufferFrom(value, encodingOrOffset, length) { + if (typeof value === "number") { + throw new TypeError('"value" argument must not be a number'); + } + if (isArrayBuffer(value)) { + return fromArrayBuffer(value, encodingOrOffset, length); + } + if (typeof value === "string") { + return fromString(value, encodingOrOffset); + } + return isModern ? Buffer.from(value) : new Buffer(value); + } + module2.exports = bufferFrom; + } +}); + +// ../../node_modules/.pnpm/typedarray@0.0.6/node_modules/typedarray/index.js +var require_typedarray = __commonJS({ + "../../node_modules/.pnpm/typedarray@0.0.6/node_modules/typedarray/index.js"(exports2) { + var undefined2 = void 0; + var MAX_ARRAY_LENGTH = 1e5; + var ECMAScript = /* @__PURE__ */ (function() { + var opts = Object.prototype.toString, ophop = Object.prototype.hasOwnProperty; + return { + // Class returns internal [[Class]] property, used to avoid cross-frame instanceof issues: + Class: function(v) { + return opts.call(v).replace(/^\[object *|\]$/g, ""); + }, + HasProperty: function(o, p) { + return p in o; + }, + HasOwnProperty: function(o, p) { + return ophop.call(o, p); + }, + IsCallable: function(o) { + return typeof o === "function"; + }, + ToInt32: function(v) { + return v >> 0; + }, + ToUint32: function(v) { + return v >>> 0; + } + }; + })(); + var LN2 = Math.LN2; + var abs = Math.abs; + var floor = Math.floor; + var log = Math.log; + var min = Math.min; + var pow = Math.pow; + var round = Math.round; + function configureProperties(obj2) { + if (getOwnPropNames && defineProp) { + var props = getOwnPropNames(obj2), i; + for (i = 0; i < props.length; i += 1) { + defineProp(obj2, props[i], { + value: obj2[props[i]], + writable: false, + enumerable: false, + configurable: false + }); + } + } + } + var defineProp; + if (Object.defineProperty && (function() { + try { + Object.defineProperty({}, "x", {}); + return true; + } catch (e) { + return false; + } + })()) { + defineProp = Object.defineProperty; + } else { + defineProp = function(o, p, desc) { + if (!o === Object(o)) throw new TypeError("Object.defineProperty called on non-object"); + if (ECMAScript.HasProperty(desc, "get") && Object.prototype.__defineGetter__) { + Object.prototype.__defineGetter__.call(o, p, desc.get); + } + if (ECMAScript.HasProperty(desc, "set") && Object.prototype.__defineSetter__) { + Object.prototype.__defineSetter__.call(o, p, desc.set); + } + if (ECMAScript.HasProperty(desc, "value")) { + o[p] = desc.value; + } + return o; + }; + } + var getOwnPropNames = Object.getOwnPropertyNames || function(o) { + if (o !== Object(o)) throw new TypeError("Object.getOwnPropertyNames called on non-object"); + var props = [], p; + for (p in o) { + if (ECMAScript.HasOwnProperty(o, p)) { + props.push(p); + } + } + return props; + }; + function makeArrayAccessors(obj2) { + if (!defineProp) { + return; + } + if (obj2.length > MAX_ARRAY_LENGTH) throw new RangeError("Array too large for polyfill"); + function makeArrayAccessor(index) { + defineProp(obj2, index, { + "get": function() { + return obj2._getter(index); + }, + "set": function(v) { + obj2._setter(index, v); + }, + enumerable: true, + configurable: false + }); + } + var i; + for (i = 0; i < obj2.length; i += 1) { + makeArrayAccessor(i); + } + } + function as_signed(value, bits) { + var s = 32 - bits; + return value << s >> s; + } + function as_unsigned(value, bits) { + var s = 32 - bits; + return value << s >>> s; + } + function packI8(n) { + return [n & 255]; + } + function unpackI8(bytes) { + return as_signed(bytes[0], 8); + } + function packU8(n) { + return [n & 255]; + } + function unpackU8(bytes) { + return as_unsigned(bytes[0], 8); + } + function packU8Clamped(n) { + n = round(Number(n)); + return [n < 0 ? 0 : n > 255 ? 255 : n & 255]; + } + function packI16(n) { + return [n >> 8 & 255, n & 255]; + } + function unpackI16(bytes) { + return as_signed(bytes[0] << 8 | bytes[1], 16); + } + function packU16(n) { + return [n >> 8 & 255, n & 255]; + } + function unpackU16(bytes) { + return as_unsigned(bytes[0] << 8 | bytes[1], 16); + } + function packI32(n) { + return [n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, n & 255]; + } + function unpackI32(bytes) { + return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); + } + function packU32(n) { + return [n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, n & 255]; + } + function unpackU32(bytes) { + return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); + } + function packIEEE754(v, ebits, fbits) { + var bias = (1 << ebits - 1) - 1, s, e, f, ln, i, bits, str, bytes; + function roundToEven(n) { + var w = floor(n), f2 = n - w; + if (f2 < 0.5) + return w; + if (f2 > 0.5) + return w + 1; + return w % 2 ? w + 1 : w; + } + if (v !== v) { + e = (1 << ebits) - 1; + f = pow(2, fbits - 1); + s = 0; + } else if (v === Infinity || v === -Infinity) { + e = (1 << ebits) - 1; + f = 0; + s = v < 0 ? 1 : 0; + } else if (v === 0) { + e = 0; + f = 0; + s = 1 / v === -Infinity ? 1 : 0; + } else { + s = v < 0; + v = abs(v); + if (v >= pow(2, 1 - bias)) { + e = min(floor(log(v) / LN2), 1023); + f = roundToEven(v / pow(2, e) * pow(2, fbits)); + if (f / pow(2, fbits) >= 2) { + e = e + 1; + f = 1; + } + if (e > bias) { + e = (1 << ebits) - 1; + f = 0; + } else { + e = e + bias; + f = f - pow(2, fbits); + } + } else { + e = 0; + f = roundToEven(v / pow(2, 1 - bias - fbits)); + } + } + bits = []; + for (i = fbits; i; i -= 1) { + bits.push(f % 2 ? 1 : 0); + f = floor(f / 2); + } + for (i = ebits; i; i -= 1) { + bits.push(e % 2 ? 1 : 0); + e = floor(e / 2); + } + bits.push(s ? 1 : 0); + bits.reverse(); + str = bits.join(""); + bytes = []; + while (str.length) { + bytes.push(parseInt(str.substring(0, 8), 2)); + str = str.substring(8); + } + return bytes; + } + function unpackIEEE754(bytes, ebits, fbits) { + var bits = [], i, j, b, str, bias, s, e, f; + for (i = bytes.length; i; i -= 1) { + b = bytes[i - 1]; + for (j = 8; j; j -= 1) { + bits.push(b % 2 ? 1 : 0); + b = b >> 1; + } + } + bits.reverse(); + str = bits.join(""); + bias = (1 << ebits - 1) - 1; + s = parseInt(str.substring(0, 1), 2) ? -1 : 1; + e = parseInt(str.substring(1, 1 + ebits), 2); + f = parseInt(str.substring(1 + ebits), 2); + if (e === (1 << ebits) - 1) { + return f !== 0 ? NaN : s * Infinity; + } else if (e > 0) { + return s * pow(2, e - bias) * (1 + f / pow(2, fbits)); + } else if (f !== 0) { + return s * pow(2, -(bias - 1)) * (f / pow(2, fbits)); + } else { + return s < 0 ? -0 : 0; + } + } + function unpackF64(b) { + return unpackIEEE754(b, 11, 52); + } + function packF64(v) { + return packIEEE754(v, 11, 52); + } + function unpackF32(b) { + return unpackIEEE754(b, 8, 23); + } + function packF32(v) { + return packIEEE754(v, 8, 23); + } + (function() { + var ArrayBuffer2 = function ArrayBuffer3(length) { + length = ECMAScript.ToInt32(length); + if (length < 0) throw new RangeError("ArrayBuffer size is not a small enough positive integer"); + this.byteLength = length; + this._bytes = []; + this._bytes.length = length; + var i; + for (i = 0; i < this.byteLength; i += 1) { + this._bytes[i] = 0; + } + configureProperties(this); + }; + exports2.ArrayBuffer = exports2.ArrayBuffer || ArrayBuffer2; + var ArrayBufferView = function ArrayBufferView2() { + }; + function makeConstructor(bytesPerElement, pack, unpack) { + var ctor; + ctor = function(buffer, byteOffset, length) { + var array, sequence, i, s; + if (!arguments.length || typeof arguments[0] === "number") { + this.length = ECMAScript.ToInt32(arguments[0]); + if (length < 0) throw new RangeError("ArrayBufferView size is not a small enough positive integer"); + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + this.buffer = new ArrayBuffer2(this.byteLength); + this.byteOffset = 0; + } else if (typeof arguments[0] === "object" && arguments[0].constructor === ctor) { + array = arguments[0]; + this.length = array.length; + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + this.buffer = new ArrayBuffer2(this.byteLength); + this.byteOffset = 0; + for (i = 0; i < this.length; i += 1) { + this._setter(i, array._getter(i)); + } + } else if (typeof arguments[0] === "object" && !(arguments[0] instanceof ArrayBuffer2 || ECMAScript.Class(arguments[0]) === "ArrayBuffer")) { + sequence = arguments[0]; + this.length = ECMAScript.ToUint32(sequence.length); + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + this.buffer = new ArrayBuffer2(this.byteLength); + this.byteOffset = 0; + for (i = 0; i < this.length; i += 1) { + s = sequence[i]; + this._setter(i, Number(s)); + } + } else if (typeof arguments[0] === "object" && (arguments[0] instanceof ArrayBuffer2 || ECMAScript.Class(arguments[0]) === "ArrayBuffer")) { + this.buffer = buffer; + this.byteOffset = ECMAScript.ToUint32(byteOffset); + if (this.byteOffset > this.buffer.byteLength) { + throw new RangeError("byteOffset out of range"); + } + if (this.byteOffset % this.BYTES_PER_ELEMENT) { + throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size."); + } + if (arguments.length < 3) { + this.byteLength = this.buffer.byteLength - this.byteOffset; + if (this.byteLength % this.BYTES_PER_ELEMENT) { + throw new RangeError("length of buffer minus byteOffset not a multiple of the element size"); + } + this.length = this.byteLength / this.BYTES_PER_ELEMENT; + } else { + this.length = ECMAScript.ToUint32(length); + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + } + if (this.byteOffset + this.byteLength > this.buffer.byteLength) { + throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); + } + } else { + throw new TypeError("Unexpected argument type(s)"); + } + this.constructor = ctor; + configureProperties(this); + makeArrayAccessors(this); + }; + ctor.prototype = new ArrayBufferView(); + ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement; + ctor.prototype._pack = pack; + ctor.prototype._unpack = unpack; + ctor.BYTES_PER_ELEMENT = bytesPerElement; + ctor.prototype._getter = function(index) { + if (arguments.length < 1) throw new SyntaxError("Not enough arguments"); + index = ECMAScript.ToUint32(index); + if (index >= this.length) { + return undefined2; + } + var bytes = [], i, o; + for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; i < this.BYTES_PER_ELEMENT; i += 1, o += 1) { + bytes.push(this.buffer._bytes[o]); + } + return this._unpack(bytes); + }; + ctor.prototype.get = ctor.prototype._getter; + ctor.prototype._setter = function(index, value) { + if (arguments.length < 2) throw new SyntaxError("Not enough arguments"); + index = ECMAScript.ToUint32(index); + if (index >= this.length) { + return undefined2; + } + var bytes = this._pack(value), i, o; + for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; i < this.BYTES_PER_ELEMENT; i += 1, o += 1) { + this.buffer._bytes[o] = bytes[i]; + } + }; + ctor.prototype.set = function(index, value) { + if (arguments.length < 1) throw new SyntaxError("Not enough arguments"); + var array, sequence, offset, len, i, s, d, byteOffset, byteLength, tmp; + if (typeof arguments[0] === "object" && arguments[0].constructor === this.constructor) { + array = arguments[0]; + offset = ECMAScript.ToUint32(arguments[1]); + if (offset + array.length > this.length) { + throw new RangeError("Offset plus length of array is out of range"); + } + byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT; + byteLength = array.length * this.BYTES_PER_ELEMENT; + if (array.buffer === this.buffer) { + tmp = []; + for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) { + tmp[i] = array.buffer._bytes[s]; + } + for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) { + this.buffer._bytes[d] = tmp[i]; + } + } else { + for (i = 0, s = array.byteOffset, d = byteOffset; i < byteLength; i += 1, s += 1, d += 1) { + this.buffer._bytes[d] = array.buffer._bytes[s]; + } + } + } else if (typeof arguments[0] === "object" && typeof arguments[0].length !== "undefined") { + sequence = arguments[0]; + len = ECMAScript.ToUint32(sequence.length); + offset = ECMAScript.ToUint32(arguments[1]); + if (offset + len > this.length) { + throw new RangeError("Offset plus length of array is out of range"); + } + for (i = 0; i < len; i += 1) { + s = sequence[i]; + this._setter(offset + i, Number(s)); + } + } else { + throw new TypeError("Unexpected argument type(s)"); + } + }; + ctor.prototype.subarray = function(start, end) { + function clamp(v, min2, max) { + return v < min2 ? min2 : v > max ? max : v; + } + start = ECMAScript.ToInt32(start); + end = ECMAScript.ToInt32(end); + if (arguments.length < 1) { + start = 0; + } + if (arguments.length < 2) { + end = this.length; + } + if (start < 0) { + start = this.length + start; + } + if (end < 0) { + end = this.length + end; + } + start = clamp(start, 0, this.length); + end = clamp(end, 0, this.length); + var len = end - start; + if (len < 0) { + len = 0; + } + return new this.constructor( + this.buffer, + this.byteOffset + start * this.BYTES_PER_ELEMENT, + len + ); + }; + return ctor; + } + var Int8Array2 = makeConstructor(1, packI8, unpackI8); + var Uint8Array2 = makeConstructor(1, packU8, unpackU8); + var Uint8ClampedArray2 = makeConstructor(1, packU8Clamped, unpackU8); + var Int16Array2 = makeConstructor(2, packI16, unpackI16); + var Uint16Array2 = makeConstructor(2, packU16, unpackU16); + var Int32Array2 = makeConstructor(4, packI32, unpackI32); + var Uint32Array2 = makeConstructor(4, packU32, unpackU32); + var Float32Array2 = makeConstructor(4, packF32, unpackF32); + var Float64Array2 = makeConstructor(8, packF64, unpackF64); + exports2.Int8Array = exports2.Int8Array || Int8Array2; + exports2.Uint8Array = exports2.Uint8Array || Uint8Array2; + exports2.Uint8ClampedArray = exports2.Uint8ClampedArray || Uint8ClampedArray2; + exports2.Int16Array = exports2.Int16Array || Int16Array2; + exports2.Uint16Array = exports2.Uint16Array || Uint16Array2; + exports2.Int32Array = exports2.Int32Array || Int32Array2; + exports2.Uint32Array = exports2.Uint32Array || Uint32Array2; + exports2.Float32Array = exports2.Float32Array || Float32Array2; + exports2.Float64Array = exports2.Float64Array || Float64Array2; + })(); + (function() { + function r(array, index) { + return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index]; + } + var IS_BIG_ENDIAN = (function() { + var u16array = new exports2.Uint16Array([4660]), u8array = new exports2.Uint8Array(u16array.buffer); + return r(u8array, 0) === 18; + })(); + var DataView2 = function DataView3(buffer, byteOffset, byteLength) { + if (arguments.length === 0) { + buffer = new exports2.ArrayBuffer(0); + } else if (!(buffer instanceof exports2.ArrayBuffer || ECMAScript.Class(buffer) === "ArrayBuffer")) { + throw new TypeError("TypeError"); + } + this.buffer = buffer || new exports2.ArrayBuffer(0); + this.byteOffset = ECMAScript.ToUint32(byteOffset); + if (this.byteOffset > this.buffer.byteLength) { + throw new RangeError("byteOffset out of range"); + } + if (arguments.length < 3) { + this.byteLength = this.buffer.byteLength - this.byteOffset; + } else { + this.byteLength = ECMAScript.ToUint32(byteLength); + } + if (this.byteOffset + this.byteLength > this.buffer.byteLength) { + throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); + } + configureProperties(this); + }; + function makeGetter(arrayType) { + return function(byteOffset, littleEndian) { + byteOffset = ECMAScript.ToUint32(byteOffset); + if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { + throw new RangeError("Array index out of range"); + } + byteOffset += this.byteOffset; + var uint8Array = new exports2.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT), bytes = [], i; + for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { + bytes.push(r(uint8Array, i)); + } + if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { + bytes.reverse(); + } + return r(new arrayType(new exports2.Uint8Array(bytes).buffer), 0); + }; + } + DataView2.prototype.getUint8 = makeGetter(exports2.Uint8Array); + DataView2.prototype.getInt8 = makeGetter(exports2.Int8Array); + DataView2.prototype.getUint16 = makeGetter(exports2.Uint16Array); + DataView2.prototype.getInt16 = makeGetter(exports2.Int16Array); + DataView2.prototype.getUint32 = makeGetter(exports2.Uint32Array); + DataView2.prototype.getInt32 = makeGetter(exports2.Int32Array); + DataView2.prototype.getFloat32 = makeGetter(exports2.Float32Array); + DataView2.prototype.getFloat64 = makeGetter(exports2.Float64Array); + function makeSetter(arrayType) { + return function(byteOffset, value, littleEndian) { + byteOffset = ECMAScript.ToUint32(byteOffset); + if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { + throw new RangeError("Array index out of range"); + } + var typeArray = new arrayType([value]), byteArray = new exports2.Uint8Array(typeArray.buffer), bytes = [], i, byteView; + for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { + bytes.push(r(byteArray, i)); + } + if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { + bytes.reverse(); + } + byteView = new exports2.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT); + byteView.set(bytes); + }; + } + DataView2.prototype.setUint8 = makeSetter(exports2.Uint8Array); + DataView2.prototype.setInt8 = makeSetter(exports2.Int8Array); + DataView2.prototype.setUint16 = makeSetter(exports2.Uint16Array); + DataView2.prototype.setInt16 = makeSetter(exports2.Int16Array); + DataView2.prototype.setUint32 = makeSetter(exports2.Uint32Array); + DataView2.prototype.setInt32 = makeSetter(exports2.Int32Array); + DataView2.prototype.setFloat32 = makeSetter(exports2.Float32Array); + DataView2.prototype.setFloat64 = makeSetter(exports2.Float64Array); + exports2.DataView = exports2.DataView || DataView2; + })(); + } +}); + +// ../../node_modules/.pnpm/concat-stream@2.0.0/node_modules/concat-stream/index.js +var require_concat_stream = __commonJS({ + "../../node_modules/.pnpm/concat-stream@2.0.0/node_modules/concat-stream/index.js"(exports2, module2) { + var Writable = require_readable().Writable; + var inherits2 = require_inherits(); + var bufferFrom = require_buffer_from(); + if (typeof Uint8Array === "undefined") { + U8 = require_typedarray().Uint8Array; + } else { + U8 = Uint8Array; + } + var U8; + function ConcatStream(opts, cb) { + if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb); + if (typeof opts === "function") { + cb = opts; + opts = {}; + } + if (!opts) opts = {}; + var encoding = opts.encoding; + var shouldInferEncoding = false; + if (!encoding) { + shouldInferEncoding = true; + } else { + encoding = String(encoding).toLowerCase(); + if (encoding === "u8" || encoding === "uint8") { + encoding = "uint8array"; + } + } + Writable.call(this, { objectMode: true }); + this.encoding = encoding; + this.shouldInferEncoding = shouldInferEncoding; + if (cb) this.on("finish", function() { + cb(this.getBody()); + }); + this.body = []; + } + module2.exports = ConcatStream; + inherits2(ConcatStream, Writable); + ConcatStream.prototype._write = function(chunk, enc, next) { + this.body.push(chunk); + next(); + }; + ConcatStream.prototype.inferEncoding = function(buff) { + var firstBuffer = buff === void 0 ? this.body[0] : buff; + if (Buffer.isBuffer(firstBuffer)) return "buffer"; + if (typeof Uint8Array !== "undefined" && firstBuffer instanceof Uint8Array) return "uint8array"; + if (Array.isArray(firstBuffer)) return "array"; + if (typeof firstBuffer === "string") return "string"; + if (Object.prototype.toString.call(firstBuffer) === "[object Object]") return "object"; + return "buffer"; + }; + ConcatStream.prototype.getBody = function() { + if (!this.encoding && this.body.length === 0) return []; + if (this.shouldInferEncoding) this.encoding = this.inferEncoding(); + if (this.encoding === "array") return arrayConcat(this.body); + if (this.encoding === "string") return stringConcat(this.body); + if (this.encoding === "buffer") return bufferConcat(this.body); + if (this.encoding === "uint8array") return u8Concat(this.body); + return this.body; + }; + function isArrayish(arr) { + return /Array\]$/.test(Object.prototype.toString.call(arr)); + } + function isBufferish(p) { + return typeof p === "string" || isArrayish(p) || p && typeof p.subarray === "function"; + } + function stringConcat(parts) { + var strings = []; + var needsToString = false; + for (var i = 0; i < parts.length; i++) { + var p = parts[i]; + if (typeof p === "string") { + strings.push(p); + } else if (Buffer.isBuffer(p)) { + strings.push(p); + } else if (isBufferish(p)) { + strings.push(bufferFrom(p)); + } else { + strings.push(bufferFrom(String(p))); + } + } + if (Buffer.isBuffer(parts[0])) { + strings = Buffer.concat(strings); + strings = strings.toString("utf8"); + } else { + strings = strings.join(""); + } + return strings; + } + function bufferConcat(parts) { + var bufs = []; + for (var i = 0; i < parts.length; i++) { + var p = parts[i]; + if (Buffer.isBuffer(p)) { + bufs.push(p); + } else if (isBufferish(p)) { + bufs.push(bufferFrom(p)); + } else { + bufs.push(bufferFrom(String(p))); + } + } + return Buffer.concat(bufs); + } + function arrayConcat(parts) { + var res = []; + for (var i = 0; i < parts.length; i++) { + res.push.apply(res, parts[i]); + } + return res; + } + function u8Concat(parts) { + var len = 0; + for (var i = 0; i < parts.length; i++) { + if (typeof parts[i] === "string") { + parts[i] = bufferFrom(parts[i]); + } + len += parts[i].length; + } + var u8 = new U8(len); + for (var i = 0, offset = 0; i < parts.length; i++) { + var part = parts[i]; + for (var j = 0; j < part.length; j++) { + u8[offset++] = part[j]; + } + } + return u8; + } + } +}); + +// ../../node_modules/.pnpm/multer@2.0.2/node_modules/multer/storage/memory.js +var require_memory = __commonJS({ + "../../node_modules/.pnpm/multer@2.0.2/node_modules/multer/storage/memory.js"(exports2, module2) { + var concat = require_concat_stream(); + function MemoryStorage(opts) { + } + MemoryStorage.prototype._handleFile = function _handleFile(req, file2, cb) { + file2.stream.pipe(concat({ encoding: "buffer" }, function(data) { + cb(null, { + buffer: data, + size: data.length + }); + })); + }; + MemoryStorage.prototype._removeFile = function _removeFile(req, file2, cb) { + delete file2.buffer; + cb(null); + }; + module2.exports = function(opts) { + return new MemoryStorage(opts); + }; + } +}); + +// ../../node_modules/.pnpm/multer@2.0.2/node_modules/multer/index.js +var require_multer = __commonJS({ + "../../node_modules/.pnpm/multer@2.0.2/node_modules/multer/index.js"(exports2, module2) { + var makeMiddleware = require_make_middleware(); + var diskStorage = require_disk(); + var memoryStorage = require_memory(); + var MulterError = require_multer_error(); + function allowAll(req, file2, cb) { + cb(null, true); + } + function Multer(options) { + if (options.storage) { + this.storage = options.storage; + } else if (options.dest) { + this.storage = diskStorage({ destination: options.dest }); + } else { + this.storage = memoryStorage(); + } + this.limits = options.limits; + this.preservePath = options.preservePath; + this.fileFilter = options.fileFilter || allowAll; + } + Multer.prototype._makeMiddleware = function(fields, fileStrategy) { + function setup() { + var fileFilter = this.fileFilter; + var filesLeft = /* @__PURE__ */ Object.create(null); + fields.forEach(function(field) { + if (typeof field.maxCount === "number") { + filesLeft[field.name] = field.maxCount; + } else { + filesLeft[field.name] = Infinity; + } + }); + function wrappedFileFilter(req, file2, cb) { + if ((filesLeft[file2.fieldname] || 0) <= 0) { + return cb(new MulterError("LIMIT_UNEXPECTED_FILE", file2.fieldname)); + } + filesLeft[file2.fieldname] -= 1; + fileFilter(req, file2, cb); + } + return { + limits: this.limits, + preservePath: this.preservePath, + storage: this.storage, + fileFilter: wrappedFileFilter, + fileStrategy + }; + } + return makeMiddleware(setup.bind(this)); + }; + Multer.prototype.single = function(name) { + return this._makeMiddleware([{ name, maxCount: 1 }], "VALUE"); + }; + Multer.prototype.array = function(name, maxCount) { + return this._makeMiddleware([{ name, maxCount }], "ARRAY"); + }; + Multer.prototype.fields = function(fields) { + return this._makeMiddleware(fields, "OBJECT"); + }; + Multer.prototype.none = function() { + return this._makeMiddleware([], "NONE"); + }; + Multer.prototype.any = function() { + function setup() { + return { + limits: this.limits, + preservePath: this.preservePath, + storage: this.storage, + fileFilter: this.fileFilter, + fileStrategy: "ARRAY" + }; + } + return makeMiddleware(setup.bind(this)); + }; + function multer(options) { + if (options === void 0) { + return new Multer({}); + } + if (typeof options === "object" && options !== null) { + return new Multer(options); + } + throw new TypeError("Expected object for argument options"); + } + module2.exports = multer; + module2.exports.diskStorage = diskStorage; + module2.exports.memoryStorage = memoryStorage; + module2.exports.MulterError = MulterError; + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/files.constants.js +var require_files_constants = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/files.constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MULTER_MODULE_OPTIONS = void 0; + exports2.MULTER_MODULE_OPTIONS = "MULTER_MODULE_OPTIONS"; + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/multer/multer.constants.js +var require_multer_constants = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/multer/multer.constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.busboyExceptions = exports2.multerExceptions = void 0; + exports2.multerExceptions = { + // from https://github.com/expressjs/multer/blob/master/lib/multer-error.js + LIMIT_PART_COUNT: "Too many parts", + LIMIT_FILE_SIZE: "File too large", + LIMIT_FILE_COUNT: "Too many files", + LIMIT_FIELD_KEY: "Field name too long", + LIMIT_FIELD_VALUE: "Field value too long", + LIMIT_FIELD_COUNT: "Too many fields", + LIMIT_UNEXPECTED_FILE: "Unexpected field", + MISSING_FIELD_NAME: "Field name missing" + }; + exports2.busboyExceptions = { + // from https://github.com/mscdex/busboy/blob/master/lib/types/multipart.js + MULTIPART_BOUNDARY_NOT_FOUND: "Multipart: Boundary not found", + MULTIPART_MALFORMED_PART_HEADER: "Malformed part header", + MULTIPART_UNEXPECTED_END_OF_FORM: "Unexpected end of form", + MULTIPART_UNEXPECTED_END_OF_FILE: "Unexpected end of file" + }; + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/multer/multer.utils.js +var require_multer_utils = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/multer/multer.utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.transformException = transformException; + var common_12 = require_common(); + var multer_constants_1 = require_multer_constants(); + function transformException(error) { + if (!error || error instanceof common_12.HttpException) { + return error; + } + switch (error.message) { + case multer_constants_1.multerExceptions.LIMIT_FILE_SIZE: + return new common_12.PayloadTooLargeException(error.message); + case multer_constants_1.multerExceptions.LIMIT_FILE_COUNT: + case multer_constants_1.multerExceptions.LIMIT_FIELD_KEY: + case multer_constants_1.multerExceptions.LIMIT_FIELD_VALUE: + case multer_constants_1.multerExceptions.LIMIT_FIELD_COUNT: + case multer_constants_1.multerExceptions.LIMIT_UNEXPECTED_FILE: + case multer_constants_1.multerExceptions.LIMIT_PART_COUNT: + case multer_constants_1.multerExceptions.MISSING_FIELD_NAME: + return new common_12.BadRequestException(error.message); + case multer_constants_1.busboyExceptions.MULTIPART_BOUNDARY_NOT_FOUND: + return new common_12.BadRequestException(error.message); + case multer_constants_1.busboyExceptions.MULTIPART_MALFORMED_PART_HEADER: + case multer_constants_1.busboyExceptions.MULTIPART_UNEXPECTED_END_OF_FORM: + case multer_constants_1.busboyExceptions.MULTIPART_UNEXPECTED_END_OF_FILE: + return new common_12.BadRequestException(`Multipart: ${error.message}`); + } + return error; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/interceptors/any-files.interceptor.js +var require_any_files_interceptor = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/interceptors/any-files.interceptor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnyFilesInterceptor = AnyFilesInterceptor; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var common_12 = require_common(); + var multer = require_multer(); + var files_constants_1 = require_files_constants(); + var multer_utils_1 = require_multer_utils(); + function AnyFilesInterceptor(localOptions) { + let MixinInterceptor = class MixinInterceptor { + constructor(options = {}) { + this.multer = multer({ + ...options, + ...localOptions + }); + } + async intercept(context, next) { + const ctx = context.switchToHttp(); + await new Promise((resolve, reject) => this.multer.any()(ctx.getRequest(), ctx.getResponse(), (err) => { + if (err) { + const error = (0, multer_utils_1.transformException)(err); + return reject(error); + } + resolve(); + })); + return next.handle(); + } + }; + MixinInterceptor = tslib_1.__decorate([ + tslib_1.__param(0, (0, common_12.Optional)()), + tslib_1.__param(0, (0, common_12.Inject)(files_constants_1.MULTER_MODULE_OPTIONS)), + tslib_1.__metadata("design:paramtypes", [Object]) + ], MixinInterceptor); + const Interceptor = (0, common_12.mixin)(MixinInterceptor); + return Interceptor; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/interceptors/file-fields.interceptor.js +var require_file_fields_interceptor = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/interceptors/file-fields.interceptor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FileFieldsInterceptor = FileFieldsInterceptor; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var common_12 = require_common(); + var multer = require_multer(); + var files_constants_1 = require_files_constants(); + var multer_utils_1 = require_multer_utils(); + function FileFieldsInterceptor(uploadFields, localOptions) { + let MixinInterceptor = class MixinInterceptor { + constructor(options = {}) { + this.multer = multer({ + ...options, + ...localOptions + }); + } + async intercept(context, next) { + const ctx = context.switchToHttp(); + await new Promise((resolve, reject) => this.multer.fields(uploadFields)(ctx.getRequest(), ctx.getResponse(), (err) => { + if (err) { + const error = (0, multer_utils_1.transformException)(err); + return reject(error); + } + resolve(); + })); + return next.handle(); + } + }; + MixinInterceptor = tslib_1.__decorate([ + tslib_1.__param(0, (0, common_12.Optional)()), + tslib_1.__param(0, (0, common_12.Inject)(files_constants_1.MULTER_MODULE_OPTIONS)), + tslib_1.__metadata("design:paramtypes", [Object]) + ], MixinInterceptor); + const Interceptor = (0, common_12.mixin)(MixinInterceptor); + return Interceptor; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/interceptors/file.interceptor.js +var require_file_interceptor = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/interceptors/file.interceptor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FileInterceptor = FileInterceptor; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var common_12 = require_common(); + var multer = require_multer(); + var files_constants_1 = require_files_constants(); + var multer_utils_1 = require_multer_utils(); + function FileInterceptor(fieldName, localOptions) { + let MixinInterceptor = class MixinInterceptor { + constructor(options = {}) { + this.multer = multer({ + ...options, + ...localOptions + }); + } + async intercept(context, next) { + const ctx = context.switchToHttp(); + await new Promise((resolve, reject) => this.multer.single(fieldName)(ctx.getRequest(), ctx.getResponse(), (err) => { + if (err) { + const error = (0, multer_utils_1.transformException)(err); + return reject(error); + } + resolve(); + })); + return next.handle(); + } + }; + MixinInterceptor = tslib_1.__decorate([ + tslib_1.__param(0, (0, common_12.Optional)()), + tslib_1.__param(0, (0, common_12.Inject)(files_constants_1.MULTER_MODULE_OPTIONS)), + tslib_1.__metadata("design:paramtypes", [Object]) + ], MixinInterceptor); + const Interceptor = (0, common_12.mixin)(MixinInterceptor); + return Interceptor; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/interceptors/files.interceptor.js +var require_files_interceptor = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/interceptors/files.interceptor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FilesInterceptor = FilesInterceptor; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var common_12 = require_common(); + var multer = require_multer(); + var files_constants_1 = require_files_constants(); + var multer_utils_1 = require_multer_utils(); + function FilesInterceptor(fieldName, maxCount, localOptions) { + let MixinInterceptor = class MixinInterceptor { + constructor(options = {}) { + this.multer = multer({ + ...options, + ...localOptions + }); + } + async intercept(context, next) { + const ctx = context.switchToHttp(); + await new Promise((resolve, reject) => this.multer.array(fieldName, maxCount)(ctx.getRequest(), ctx.getResponse(), (err) => { + if (err) { + const error = (0, multer_utils_1.transformException)(err); + return reject(error); + } + resolve(); + })); + return next.handle(); + } + }; + MixinInterceptor = tslib_1.__decorate([ + tslib_1.__param(0, (0, common_12.Optional)()), + tslib_1.__param(0, (0, common_12.Inject)(files_constants_1.MULTER_MODULE_OPTIONS)), + tslib_1.__metadata("design:paramtypes", [Object]) + ], MixinInterceptor); + const Interceptor = (0, common_12.mixin)(MixinInterceptor); + return Interceptor; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/interceptors/no-files.interceptor.js +var require_no_files_interceptor = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/interceptors/no-files.interceptor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NoFilesInterceptor = NoFilesInterceptor; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var common_12 = require_common(); + var multer = require_multer(); + var files_constants_1 = require_files_constants(); + var multer_utils_1 = require_multer_utils(); + function NoFilesInterceptor(localOptions) { + let MixinInterceptor = class MixinInterceptor { + constructor(options = {}) { + this.multer = multer({ + ...options, + ...localOptions + }); + } + async intercept(context, next) { + const ctx = context.switchToHttp(); + await new Promise((resolve, reject) => this.multer.none()(ctx.getRequest(), ctx.getResponse(), (err) => { + if (err) { + const error = (0, multer_utils_1.transformException)(err); + return reject(error); + } + resolve(); + })); + return next.handle(); + } + }; + MixinInterceptor = tslib_1.__decorate([ + tslib_1.__param(0, (0, common_12.Optional)()), + tslib_1.__param(0, (0, common_12.Inject)(files_constants_1.MULTER_MODULE_OPTIONS)), + tslib_1.__metadata("design:paramtypes", [Object]) + ], MixinInterceptor); + const Interceptor = (0, common_12.mixin)(MixinInterceptor); + return Interceptor; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/interceptors/index.js +var require_interceptors2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/interceptors/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_any_files_interceptor(), exports2); + tslib_1.__exportStar(require_file_fields_interceptor(), exports2); + tslib_1.__exportStar(require_file_interceptor(), exports2); + tslib_1.__exportStar(require_files_interceptor(), exports2); + tslib_1.__exportStar(require_no_files_interceptor(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/interfaces/files-upload-module.interface.js +var require_files_upload_module_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/interfaces/files-upload-module.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/interfaces/index.js +var require_interfaces6 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/interfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_files_upload_module_interface(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/multer.constants.js +var require_multer_constants2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/multer.constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MULTER_MODULE_ID = void 0; + exports2.MULTER_MODULE_ID = "MULTER_MODULE_ID"; + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/multer.module.js +var require_multer_module = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/multer.module.js"(exports2) { + "use strict"; + var MulterModule_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MulterModule = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var common_12 = require_common(); + var random_string_generator_util_1 = require_random_string_generator_util(); + var files_constants_1 = require_files_constants(); + var multer_constants_1 = require_multer_constants2(); + var MulterModule = MulterModule_1 = class MulterModule { + static register(options = {}) { + return { + module: MulterModule_1, + providers: [ + { provide: files_constants_1.MULTER_MODULE_OPTIONS, useFactory: () => options }, + { + provide: multer_constants_1.MULTER_MODULE_ID, + useValue: (0, random_string_generator_util_1.randomStringGenerator)() + } + ], + exports: [files_constants_1.MULTER_MODULE_OPTIONS] + }; + } + static registerAsync(options) { + return { + module: MulterModule_1, + imports: options.imports, + providers: [ + ...this.createAsyncProviders(options), + { + provide: multer_constants_1.MULTER_MODULE_ID, + useValue: (0, random_string_generator_util_1.randomStringGenerator)() + } + ], + exports: [files_constants_1.MULTER_MODULE_OPTIONS] + }; + } + static createAsyncProviders(options) { + if (options.useExisting || options.useFactory) { + return [this.createAsyncOptionsProvider(options)]; + } + return [ + this.createAsyncOptionsProvider(options), + { + provide: options.useClass, + useClass: options.useClass + } + ]; + } + static createAsyncOptionsProvider(options) { + if (options.useFactory) { + return { + provide: files_constants_1.MULTER_MODULE_OPTIONS, + useFactory: options.useFactory, + inject: options.inject || [] + }; + } + return { + provide: files_constants_1.MULTER_MODULE_OPTIONS, + useFactory: async (optionsFactory) => optionsFactory.createMulterOptions(), + inject: [options.useExisting || options.useClass] + }; + } + }; + exports2.MulterModule = MulterModule; + exports2.MulterModule = MulterModule = MulterModule_1 = tslib_1.__decorate([ + (0, common_12.Module)({}) + ], MulterModule); + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/index.js +var require_multer2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/multer/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_interceptors2(), exports2); + tslib_1.__exportStar(require_interfaces6(), exports2); + tslib_1.__exportStar(require_multer_module(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/index.js +var require_platform_express = __commonJS({ + "../../node_modules/.pnpm/@nestjs+platform-express@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validat_3e645l3ehqiqb6yhgcfsxu7f44/node_modules/@nestjs/platform-express/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_adapters2(), exports2); + tslib_1.__exportStar(require_interfaces5(), exports2); + tslib_1.__exportStar(require_multer2(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/nest-factory.js +var require_nest_factory = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/nest-factory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NestFactory = exports2.NestFactoryStatic = void 0; + var logger_service_1 = require_logger_service(); + var load_package_util_1 = require_load_package_util(); + var shared_utils_1 = require_shared_utils(); + var application_config_1 = require_application_config(); + var constants_1 = require_constants4(); + var exceptions_zone_1 = require_exceptions_zone(); + var load_adapter_1 = require_load_adapter(); + var rethrow_1 = require_rethrow(); + var container_1 = require_container2(); + var injector_1 = require_injector(); + var instance_loader_1 = require_instance_loader(); + var graph_inspector_1 = require_graph_inspector(); + var noop_graph_inspector_1 = require_noop_graph_inspector(); + var uuid_factory_1 = require_uuid_factory(); + var metadata_scanner_1 = require_metadata_scanner(); + var nest_application_1 = require_nest_application(); + var nest_application_context_1 = require_nest_application_context(); + var scanner_1 = require_scanner(); + var NestFactoryStatic = class { + constructor() { + this.logger = new logger_service_1.Logger("NestFactory", { + timestamp: true + }); + this.abortOnError = true; + this.autoFlushLogs = false; + } + async create(moduleCls, serverOrOptions, options) { + const [httpServer, appOptions] = this.isHttpServer(serverOrOptions) ? [serverOrOptions, options] : [this.createHttpAdapter(), serverOrOptions]; + const applicationConfig = new application_config_1.ApplicationConfig(); + const container = new container_1.NestContainer(applicationConfig); + const graphInspector = this.createGraphInspector(appOptions, container); + this.setAbortOnError(serverOrOptions, options); + this.registerLoggerConfiguration(appOptions); + await this.initialize(moduleCls, container, graphInspector, applicationConfig, appOptions, httpServer); + const instance = new nest_application_1.NestApplication(container, httpServer, applicationConfig, graphInspector, appOptions); + const target = this.createNestInstance(instance); + return this.createAdapterProxy(target, httpServer); + } + /** + * Creates an instance of NestMicroservice. + * + * @param moduleCls Entry (root) application module class + * @param options Optional microservice configuration + * + * @returns A promise that, when resolved, + * contains a reference to the NestMicroservice instance. + */ + async createMicroservice(moduleCls, options) { + const { NestMicroservice } = (0, load_package_util_1.loadPackage)("@nestjs/microservices", "NestFactory", () => require("@nestjs/microservices")); + const applicationConfig = new application_config_1.ApplicationConfig(); + const container = new container_1.NestContainer(applicationConfig); + const graphInspector = this.createGraphInspector(options, container); + this.setAbortOnError(options); + this.registerLoggerConfiguration(options); + await this.initialize(moduleCls, container, graphInspector, applicationConfig, options); + return this.createNestInstance(new NestMicroservice(container, options, graphInspector, applicationConfig)); + } + /** + * Creates an instance of NestApplicationContext. + * + * @param moduleCls Entry (root) application module class + * @param options Optional Nest application configuration + * + * @returns A promise that, when resolved, + * contains a reference to the NestApplicationContext instance. + */ + async createApplicationContext(moduleCls, options) { + const applicationConfig = new application_config_1.ApplicationConfig(); + const container = new container_1.NestContainer(applicationConfig); + const graphInspector = this.createGraphInspector(options, container); + this.setAbortOnError(options); + this.registerLoggerConfiguration(options); + await this.initialize(moduleCls, container, graphInspector, applicationConfig, options); + const modules = container.getModules().values(); + const root = modules.next().value; + const context = this.createNestInstance(new nest_application_context_1.NestApplicationContext(container, options, root)); + if (this.autoFlushLogs) { + context.flushLogsOnOverride(); + } + return context.init(); + } + createNestInstance(instance) { + return this.createProxy(instance); + } + async initialize(module3, container, graphInspector, config = new application_config_1.ApplicationConfig(), options = {}, httpServer = null) { + uuid_factory_1.UuidFactory.mode = options.snapshot ? uuid_factory_1.UuidFactoryMode.Deterministic : uuid_factory_1.UuidFactoryMode.Random; + const injector = new injector_1.Injector({ preview: options.preview }); + const instanceLoader = new instance_loader_1.InstanceLoader(container, injector, graphInspector); + const metadataScanner = new metadata_scanner_1.MetadataScanner(); + const dependenciesScanner = new scanner_1.DependenciesScanner(container, metadataScanner, graphInspector, config); + container.setHttpAdapter(httpServer); + const teardown = this.abortOnError === false ? rethrow_1.rethrow : void 0; + await httpServer?.init(); + try { + this.logger.log(constants_1.MESSAGES.APPLICATION_START); + await exceptions_zone_1.ExceptionsZone.asyncRun(async () => { + await dependenciesScanner.scan(module3); + await instanceLoader.createInstancesOfDependencies(); + dependenciesScanner.applyApplicationProviders(); + }, teardown, this.autoFlushLogs); + } catch (e) { + this.handleInitializationError(e); + } + } + handleInitializationError(err) { + if (this.abortOnError) { + process.abort(); + } + (0, rethrow_1.rethrow)(err); + } + createProxy(target) { + const proxy = this.createExceptionProxy(); + return new Proxy(target, { + get: proxy, + set: proxy + }); + } + createExceptionProxy() { + return (receiver, prop) => { + if (!(prop in receiver)) { + return; + } + if ((0, shared_utils_1.isFunction)(receiver[prop])) { + return this.createExceptionZone(receiver, prop); + } + return receiver[prop]; + }; + } + createExceptionZone(receiver, prop) { + const teardown = this.abortOnError === false ? rethrow_1.rethrow : void 0; + return (...args) => { + let result; + exceptions_zone_1.ExceptionsZone.run(() => { + result = receiver[prop](...args); + }, teardown, this.autoFlushLogs); + return result; + }; + } + registerLoggerConfiguration(options) { + if (!options) { + return; + } + const { logger, bufferLogs, autoFlushLogs } = options; + if (logger !== true && !(0, shared_utils_1.isNil)(logger)) { + logger_service_1.Logger.overrideLogger(logger); + } + if (bufferLogs) { + logger_service_1.Logger.attachBuffer(); + } + this.autoFlushLogs = autoFlushLogs ?? true; + } + createHttpAdapter(httpServer) { + const { ExpressAdapter } = (0, load_adapter_1.loadAdapter)("@nestjs/platform-express", "HTTP", () => require_platform_express()); + return new ExpressAdapter(httpServer); + } + isHttpServer(serverOrOptions) { + return !!(serverOrOptions && serverOrOptions.patch); + } + setAbortOnError(serverOrOptions, options) { + this.abortOnError = this.isHttpServer(serverOrOptions) ? !(options && options.abortOnError === false) : !(serverOrOptions && serverOrOptions.abortOnError === false); + } + createAdapterProxy(app, adapter) { + const proxy = new Proxy(app, { + get: (receiver, prop) => { + const mapToProxy = (result) => { + return result instanceof Promise ? result.then(mapToProxy) : result instanceof nest_application_1.NestApplication ? proxy : result; + }; + if (!(prop in receiver) && prop in adapter) { + return (...args) => { + const result = this.createExceptionZone(adapter, prop)(...args); + return mapToProxy(result); + }; + } + if ((0, shared_utils_1.isFunction)(receiver[prop])) { + return (...args) => { + const result = receiver[prop](...args); + return mapToProxy(result); + }; + } + return receiver[prop]; + } + }); + return proxy; + } + createGraphInspector(appOptions, container) { + return appOptions?.snapshot ? new graph_inspector_1.GraphInspector(container) : noop_graph_inspector_1.NoopGraphInspector; + } + }; + exports2.NestFactoryStatic = NestFactoryStatic; + exports2.NestFactory = new NestFactoryStatic(); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/assign-to-object.util.js +var require_assign_to_object_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/assign-to-object.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.assignToObject = assignToObject; + function assignToObject(target, source) { + Object.defineProperties(target, Object.keys(source).reduce((descriptors, key) => { + descriptors[key] = Object.getOwnPropertyDescriptor(source, key); + return descriptors; + }, /* @__PURE__ */ Object.create(null))); + return target; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/constants.js +var require_constants7 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.REPL_INITIALIZED_MESSAGE = void 0; + exports2.REPL_INITIALIZED_MESSAGE = "REPL initialized"; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/repl-function.js +var require_repl_function = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/repl-function.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ReplFunction = void 0; + var cli_colors_util_1 = require_cli_colors_util(); + var ReplFunction = class { + constructor(ctx) { + this.ctx = ctx; + this.logger = ctx.logger; + } + /** + * @returns A message displayed by calling `.help` + */ + makeHelpMessage() { + const { description, name, signature } = this.fnDefinition; + const fnSignatureWithName = `${name}${signature}`; + return `${cli_colors_util_1.clc.yellow(description)} +${cli_colors_util_1.clc.magentaBright("Interface:")} ${cli_colors_util_1.clc.bold(fnSignatureWithName)} +`; + } + }; + exports2.ReplFunction = ReplFunction; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/native-functions/help-repl-fn.js +var require_help_repl_fn = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/native-functions/help-repl-fn.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HelpReplFn = void 0; + var iterare_1 = require_lib(); + var cli_colors_util_1 = require_cli_colors_util(); + var repl_function_1 = require_repl_function(); + var HelpReplFn = class _HelpReplFn extends repl_function_1.ReplFunction { + constructor() { + super(...arguments); + this.fnDefinition = { + name: "help", + signature: "() => void", + description: "Display all available REPL native functions." + }; + } + action() { + const sortedNativeFunctions = (0, iterare_1.iterate)(this.ctx.nativeFunctions).map(([, nativeFunction]) => nativeFunction.fnDefinition).toArray().sort((a, b) => a.name < b.name ? -1 : 1); + this.ctx.writeToStdout(`You can call ${cli_colors_util_1.clc.bold(".help")} on any function listed below (e.g.: ${cli_colors_util_1.clc.bold("help.help")}): + +` + sortedNativeFunctions.map(_HelpReplFn.buildHelpMessage).join("\n") + // Without the following LF the last item won't be displayed + "\n"); + } + }; + exports2.HelpReplFn = HelpReplFn; + HelpReplFn.buildHelpMessage = ({ name, description }) => cli_colors_util_1.clc.cyanBright(name) + (description ? ` ${cli_colors_util_1.clc.bold("-")} ${description}` : ""); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/native-functions/get-relp-fn.js +var require_get_relp_fn = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/native-functions/get-relp-fn.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GetReplFn = void 0; + var repl_function_1 = require_repl_function(); + var GetReplFn = class extends repl_function_1.ReplFunction { + constructor() { + super(...arguments); + this.fnDefinition = { + name: "get", + signature: "(token: InjectionToken) => any", + description: "Retrieves an instance of either injectable or controller, otherwise, throws exception.", + aliases: ["$"] + }; + } + action(token) { + return this.ctx.app.get(token); + } + }; + exports2.GetReplFn = GetReplFn; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/native-functions/resolve-repl-fn.js +var require_resolve_repl_fn = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/native-functions/resolve-repl-fn.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ResolveReplFn = void 0; + var repl_function_1 = require_repl_function(); + var ResolveReplFn = class extends repl_function_1.ReplFunction { + constructor() { + super(...arguments); + this.fnDefinition = { + name: "resolve", + description: "Resolves transient or request-scoped instance of either injectable or controller, otherwise, throws exception.", + signature: "(token: InjectionToken, contextId: any) => Promise" + }; + } + action(token, contextId) { + return this.ctx.app.resolve(token, contextId); + } + }; + exports2.ResolveReplFn = ResolveReplFn; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/native-functions/select-relp-fn.js +var require_select_relp_fn = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/native-functions/select-relp-fn.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SelectReplFn = void 0; + var repl_function_1 = require_repl_function(); + var SelectReplFn = class extends repl_function_1.ReplFunction { + constructor() { + super(...arguments); + this.fnDefinition = { + name: "select", + description: "Allows navigating through the modules tree, for example, to pull out a specific instance from the selected module.", + signature: "(token: DynamicModule | ClassRef) => INestApplicationContext" + }; + } + action(token) { + return this.ctx.app.select(token); + } + }; + exports2.SelectReplFn = SelectReplFn; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/native-functions/debug-repl-fn.js +var require_debug_repl_fn = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/native-functions/debug-repl-fn.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DebugReplFn = void 0; + var cli_colors_util_1 = require_cli_colors_util(); + var repl_function_1 = require_repl_function(); + var DebugReplFn = class extends repl_function_1.ReplFunction { + constructor() { + super(...arguments); + this.fnDefinition = { + name: "debug", + description: 'Print all registered modules as a list together with their controllers and providers.\nIf the argument is passed in, for example, "debug(MyModule)" then it will only print components of this specific module.', + signature: "(moduleCls?: ClassRef | string) => void" + }; + } + action(moduleCls) { + this.ctx.writeToStdout("\n"); + if (moduleCls) { + const token = typeof moduleCls === "function" ? moduleCls.name : moduleCls; + const moduleEntry = this.ctx.debugRegistry[token]; + if (!moduleEntry) { + return this.logger.error(`"${token}" has not been found in the modules registry`); + } + this.printCtrlsAndProviders(token, moduleEntry); + } else { + Object.keys(this.ctx.debugRegistry).forEach((moduleKey) => { + this.printCtrlsAndProviders(moduleKey, this.ctx.debugRegistry[moduleKey]); + }); + } + this.ctx.writeToStdout("\n"); + } + printCtrlsAndProviders(moduleName, moduleDebugEntry) { + this.ctx.writeToStdout(`${cli_colors_util_1.clc.green(moduleName)}: +`); + this.printCollection("controllers", moduleDebugEntry["controllers"]); + this.printCollection("providers", moduleDebugEntry["providers"]); + } + printCollection(title, collectionValue) { + const collectionEntries = Object.keys(collectionValue); + if (collectionEntries.length <= 0) { + return; + } + this.ctx.writeToStdout(` ${cli_colors_util_1.clc.yellow(`- ${title}`)}: +`); + collectionEntries.forEach((provider) => this.ctx.writeToStdout(` ${cli_colors_util_1.clc.green("\u25FB")} ${provider} +`)); + } + }; + exports2.DebugReplFn = DebugReplFn; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/native-functions/methods-repl-fn.js +var require_methods_repl_fn = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/native-functions/methods-repl-fn.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MethodsReplFn = void 0; + var cli_colors_util_1 = require_cli_colors_util(); + var metadata_scanner_1 = require_metadata_scanner(); + var repl_function_1 = require_repl_function(); + var MethodsReplFn = class extends repl_function_1.ReplFunction { + constructor() { + super(...arguments); + this.fnDefinition = { + name: "methods", + description: "Display all public methods available on a given provider or controller.", + signature: "(token: ClassRef | string) => void" + }; + this.metadataScanner = new metadata_scanner_1.MetadataScanner(); + } + action(token) { + const proto = typeof token !== "function" ? Object.getPrototypeOf(this.ctx.app.get(token)) : token?.prototype; + const methods = this.metadataScanner.getAllMethodNames(proto); + this.ctx.writeToStdout("\n"); + this.ctx.writeToStdout(`${cli_colors_util_1.clc.green("Methods")}: +`); + methods.forEach((methodName) => this.ctx.writeToStdout(` ${cli_colors_util_1.clc.yellow("\u25FB")} ${methodName} +`)); + this.ctx.writeToStdout("\n"); + } + }; + exports2.MethodsReplFn = MethodsReplFn; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/native-functions/index.js +var require_native_functions = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/native-functions/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_help_repl_fn(), exports2); + tslib_1.__exportStar(require_get_relp_fn(), exports2); + tslib_1.__exportStar(require_resolve_repl_fn(), exports2); + tslib_1.__exportStar(require_select_relp_fn(), exports2); + tslib_1.__exportStar(require_debug_repl_fn(), exports2); + tslib_1.__exportStar(require_methods_repl_fn(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/repl-context.js +var require_repl_context = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/repl-context.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ReplContext = void 0; + var common_12 = require_common(); + var application_config_1 = require_application_config(); + var injector_1 = require_injector2(); + var internal_core_module_1 = require_internal_core_module(); + var native_functions_1 = require_native_functions(); + var ReplContext = class _ReplContext { + constructor(app, nativeFunctionsClassRefs) { + this.app = app; + this.logger = new common_12.Logger(_ReplContext.name); + this.debugRegistry = {}; + this.globalScope = /* @__PURE__ */ Object.create(null); + this.nativeFunctions = /* @__PURE__ */ new Map(); + this.container = app.container; + this.initializeContext(); + this.initializeNativeFunctions(nativeFunctionsClassRefs || []); + } + writeToStdout(text) { + process.stdout.write(text); + } + initializeContext() { + const modules = this.container.getModules(); + modules.forEach((moduleRef) => { + let moduleName = moduleRef.metatype.name; + if (moduleName === internal_core_module_1.InternalCoreModule.name) { + return; + } + if (this.globalScope[moduleName]) { + moduleName += ` (${moduleRef.token})`; + } + this.introspectCollection(moduleRef, moduleName, "providers"); + this.introspectCollection(moduleRef, moduleName, "controllers"); + Object.defineProperty(this.globalScope, moduleName, { + value: moduleRef.metatype, + configurable: false, + enumerable: true + }); + }); + } + introspectCollection(moduleRef, moduleKey, collection) { + const moduleDebugEntry = {}; + moduleRef[collection].forEach(({ token }) => { + const stringifiedToken = this.stringifyToken(token); + if (stringifiedToken === application_config_1.ApplicationConfig.name || stringifiedToken === moduleRef.metatype.name) { + return; + } + if (!this.globalScope[stringifiedToken]) { + Object.defineProperty(this.globalScope, stringifiedToken, { + value: token, + configurable: false, + enumerable: true + }); + } + if (stringifiedToken === injector_1.ModuleRef.name) { + return; + } + moduleDebugEntry[stringifiedToken] = token; + }); + this.debugRegistry[moduleKey] = { + ...this.debugRegistry?.[moduleKey], + [collection]: moduleDebugEntry + }; + } + stringifyToken(token) { + return typeof token !== "string" ? typeof token === "function" ? token.name : token?.toString() : `"${token}"`; + } + addNativeFunction(NativeFunctionRef) { + const nativeFunction = new NativeFunctionRef(this); + const nativeFunctions = [nativeFunction]; + this.nativeFunctions.set(nativeFunction.fnDefinition.name, nativeFunction); + nativeFunction.fnDefinition.aliases?.forEach((aliasName) => { + const aliasNativeFunction = Object.create(nativeFunction); + aliasNativeFunction.fnDefinition = { + name: aliasName, + description: aliasNativeFunction.fnDefinition.description, + signature: aliasNativeFunction.fnDefinition.signature + }; + this.nativeFunctions.set(aliasName, aliasNativeFunction); + nativeFunctions.push(aliasNativeFunction); + }); + return nativeFunctions; + } + registerFunctionIntoGlobalScope(nativeFunction) { + this.globalScope[nativeFunction.fnDefinition.name] = nativeFunction.action.bind(nativeFunction); + const functionBoundRef = this.globalScope[nativeFunction.fnDefinition.name]; + Object.defineProperty(functionBoundRef, "help", { + enumerable: false, + configurable: false, + get: () => ( + // Dynamically builds the help message as will unlikely to be called + // several times. + this.writeToStdout(nativeFunction.makeHelpMessage()) + ) + }); + } + initializeNativeFunctions(nativeFunctionsClassRefs) { + const builtInFunctionsClassRefs = [ + native_functions_1.HelpReplFn, + native_functions_1.GetReplFn, + native_functions_1.ResolveReplFn, + native_functions_1.SelectReplFn, + native_functions_1.DebugReplFn, + native_functions_1.MethodsReplFn + ]; + builtInFunctionsClassRefs.concat(nativeFunctionsClassRefs).forEach((NativeFunction) => { + const nativeFunctions = this.addNativeFunction(NativeFunction); + nativeFunctions.forEach((nativeFunction) => { + this.registerFunctionIntoGlobalScope(nativeFunction); + }); + }); + } + }; + exports2.ReplContext = ReplContext; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/repl-logger.js +var require_repl_logger = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/repl-logger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ReplLogger = void 0; + var common_12 = require_common(); + var nest_application_1 = require_nest_application(); + var router_explorer_1 = require_router_explorer(); + var routes_resolver_1 = require_routes_resolver(); + var ReplLogger = class _ReplLogger extends common_12.ConsoleLogger { + log(_message, context) { + if (_ReplLogger.ignoredContexts.includes(context)) { + return; + } + return super.log.apply(this, Array.from(arguments)); + } + }; + exports2.ReplLogger = ReplLogger; + ReplLogger.ignoredContexts = [ + routes_resolver_1.RoutesResolver.name, + router_explorer_1.RouterExplorer.name, + nest_application_1.NestApplication.name + ]; + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/repl-native-commands.js +var require_repl_native_commands = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/repl-native-commands.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defineDefaultCommandsOnRepl = defineDefaultCommandsOnRepl; + function listAllCommands(replServer) { + Object.keys(replServer.commands).sort().forEach((name) => { + const cmd = replServer.commands[name]; + if (cmd) { + replServer.output.write(`${name} ${cmd.help || ""} +`); + } + }); + } + function defineDefaultCommandsOnRepl(replServer) { + replServer.defineCommand("help", { + help: "Show REPL options", + action(name) { + this.clearBufferedCommand(); + if (name) { + const nativeCommandOrFunction = this.commands[name] || this.context[name]; + const helpMessage = nativeCommandOrFunction?.help; + if (helpMessage) { + this.output.write(`${helpMessage} +`); + } + } else { + listAllCommands(this); + this.output.write("\n\n"); + this.context.help(); + this.output.write("\nPress Ctrl+C to abort current expression, Ctrl+D to exit the REPL\n"); + } + this.displayPrompt(); + } + }); + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/repl.js +var require_repl = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/repl.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.repl = repl; + var common_12 = require_common(); + var cli_colors_util_1 = require_cli_colors_util(); + var nest_factory_1 = require_nest_factory(); + var assign_to_object_util_1 = require_assign_to_object_util(); + var constants_1 = require_constants7(); + var repl_context_1 = require_repl_context(); + var repl_logger_1 = require_repl_logger(); + var repl_native_commands_1 = require_repl_native_commands(); + async function repl(module3, replOptions = {}) { + const app = await nest_factory_1.NestFactory.createApplicationContext(module3, { + abortOnError: false, + logger: new repl_logger_1.ReplLogger() + }); + await app.init(); + const replContext = new repl_context_1.ReplContext(app); + common_12.Logger.log(constants_1.REPL_INITIALIZED_MESSAGE); + const _repl = await Promise.resolve().then(() => require("repl")); + const replServer = _repl.start({ + prompt: cli_colors_util_1.clc.green("> "), + ignoreUndefined: true, + ...replOptions + }); + (0, assign_to_object_util_1.assignToObject)(replServer.context, replContext.globalScope); + (0, repl_native_commands_1.defineDefaultCommandsOnRepl)(replServer); + return replServer; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/index.js +var require_repl2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/repl/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_repl(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/interfaces/routes.interface.js +var require_routes_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/interfaces/routes.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/interfaces/index.js +var require_interfaces7 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/interfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_routes_interface(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/request/index.js +var require_request2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/request/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.REQUEST = void 0; + var request_constants_1 = require_request_constants(); + Object.defineProperty(exports2, "REQUEST", { enumerable: true, get: function() { + return request_constants_1.REQUEST; + } }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/index.js +var require_router2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/router/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RouterModule = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_interfaces7(), exports2); + tslib_1.__exportStar(require_request2(), exports2); + var router_module_1 = require_router_module(); + Object.defineProperty(exports2, "RouterModule", { enumerable: true, get: function() { + return router_module_1.RouterModule; + } }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/index.js +var require_core3 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+core@10.4.22_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_re_wv7sonobpk6cc2m3n6ev6bfqdu/node_modules/@nestjs/core/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NestFactory = exports2.APP_PIPE = exports2.APP_INTERCEPTOR = exports2.APP_GUARD = exports2.APP_FILTER = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + require_Reflect(); + tslib_1.__exportStar(require_adapters(), exports2); + tslib_1.__exportStar(require_application_config(), exports2); + var constants_1 = require_constants4(); + Object.defineProperty(exports2, "APP_FILTER", { enumerable: true, get: function() { + return constants_1.APP_FILTER; + } }); + Object.defineProperty(exports2, "APP_GUARD", { enumerable: true, get: function() { + return constants_1.APP_GUARD; + } }); + Object.defineProperty(exports2, "APP_INTERCEPTOR", { enumerable: true, get: function() { + return constants_1.APP_INTERCEPTOR; + } }); + Object.defineProperty(exports2, "APP_PIPE", { enumerable: true, get: function() { + return constants_1.APP_PIPE; + } }); + tslib_1.__exportStar(require_discovery(), exports2); + tslib_1.__exportStar(require_exceptions2(), exports2); + tslib_1.__exportStar(require_helpers(), exports2); + tslib_1.__exportStar(require_injector2(), exports2); + tslib_1.__exportStar(require_inspector(), exports2); + tslib_1.__exportStar(require_metadata_scanner(), exports2); + tslib_1.__exportStar(require_middleware2(), exports2); + tslib_1.__exportStar(require_nest_application(), exports2); + tslib_1.__exportStar(require_nest_application_context(), exports2); + var nest_factory_1 = require_nest_factory(); + Object.defineProperty(exports2, "NestFactory", { enumerable: true, get: function() { + return nest_factory_1.NestFactory; + } }); + tslib_1.__exportStar(require_repl2(), exports2); + tslib_1.__exportStar(require_router2(), exports2); + tslib_1.__exportStar(require_services2(), exports2); + } +}); + +// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js +var require_lodash = __commonJS({ + "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js"(exports2, module2) { + (function() { + var undefined2; + var VERSION = "4.17.21"; + var LARGE_ARRAY_SIZE = 200; + var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`"; + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + var MAX_MEMOIZE_SIZE = 500; + var PLACEHOLDER = "__lodash_placeholder__"; + var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; + var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; + var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512; + var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = "..."; + var HOT_COUNT = 800, HOT_SPAN = 16; + var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3; + var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN = 0 / 0; + var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + var wrapFlags = [ + ["ary", WRAP_ARY_FLAG], + ["bind", WRAP_BIND_FLAG], + ["bindKey", WRAP_BIND_KEY_FLAG], + ["curry", WRAP_CURRY_FLAG], + ["curryRight", WRAP_CURRY_RIGHT_FLAG], + ["flip", WRAP_FLIP_FLAG], + ["partial", WRAP_PARTIAL_FLAG], + ["partialRight", WRAP_PARTIAL_RIGHT_FLAG], + ["rearg", WRAP_REARG_FLAG] + ]; + var argsTag = "[object Arguments]", arrayTag = "[object Array]", asyncTag = "[object AsyncFunction]", boolTag = "[object Boolean]", dateTag = "[object Date]", domExcTag = "[object DOMException]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", nullTag = "[object Null]", objectTag = "[object Object]", promiseTag = "[object Promise]", proxyTag = "[object Proxy]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", undefinedTag = "[object Undefined]", weakMapTag = "[object WeakMap]", weakSetTag = "[object WeakSet]"; + var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]"; + var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g; + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source); + var reTrimStart = /^\s+/; + var reWhitespace = /\s/; + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /; + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; + var reEscapeChar = /\\(\\)?/g; + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + var reFlags = /\w*$/; + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + var reIsBinary = /^0b[01]+$/i; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var reIsOctal = /^0o[0-7]+$/i; + var reIsUint = /^(?:0|[1-9]\d*)$/; + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + var reNoMatch = /($^)/; + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\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", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + var rsApos = "['\u2019]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d"; + var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")", rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")"; + var reApos = RegExp(rsApos, "g"); + var reComboMark = RegExp(rsCombo, "g"); + var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g"); + var reUnicodeWord = RegExp([ + rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")", + rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")", + rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower, + rsUpper + "+" + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join("|"), "g"); + var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]"); + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + var contextProps = [ + "Array", + "Buffer", + "DataView", + "Date", + "Error", + "Float32Array", + "Float64Array", + "Function", + "Int8Array", + "Int16Array", + "Int32Array", + "Map", + "Math", + "Object", + "Promise", + "RegExp", + "Set", + "String", + "Symbol", + "TypeError", + "Uint8Array", + "Uint8ClampedArray", + "Uint16Array", + "Uint32Array", + "WeakMap", + "_", + "clearTimeout", + "isFinite", + "parseInt", + "setTimeout" + ]; + var templateCounter = -1; + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; + var deburredLetters = { + // Latin-1 Supplement block. + "\xC0": "A", + "\xC1": "A", + "\xC2": "A", + "\xC3": "A", + "\xC4": "A", + "\xC5": "A", + "\xE0": "a", + "\xE1": "a", + "\xE2": "a", + "\xE3": "a", + "\xE4": "a", + "\xE5": "a", + "\xC7": "C", + "\xE7": "c", + "\xD0": "D", + "\xF0": "d", + "\xC8": "E", + "\xC9": "E", + "\xCA": "E", + "\xCB": "E", + "\xE8": "e", + "\xE9": "e", + "\xEA": "e", + "\xEB": "e", + "\xCC": "I", + "\xCD": "I", + "\xCE": "I", + "\xCF": "I", + "\xEC": "i", + "\xED": "i", + "\xEE": "i", + "\xEF": "i", + "\xD1": "N", + "\xF1": "n", + "\xD2": "O", + "\xD3": "O", + "\xD4": "O", + "\xD5": "O", + "\xD6": "O", + "\xD8": "O", + "\xF2": "o", + "\xF3": "o", + "\xF4": "o", + "\xF5": "o", + "\xF6": "o", + "\xF8": "o", + "\xD9": "U", + "\xDA": "U", + "\xDB": "U", + "\xDC": "U", + "\xF9": "u", + "\xFA": "u", + "\xFB": "u", + "\xFC": "u", + "\xDD": "Y", + "\xFD": "y", + "\xFF": "y", + "\xC6": "Ae", + "\xE6": "ae", + "\xDE": "Th", + "\xFE": "th", + "\xDF": "ss", + // Latin Extended-A block. + "\u0100": "A", + "\u0102": "A", + "\u0104": "A", + "\u0101": "a", + "\u0103": "a", + "\u0105": "a", + "\u0106": "C", + "\u0108": "C", + "\u010A": "C", + "\u010C": "C", + "\u0107": "c", + "\u0109": "c", + "\u010B": "c", + "\u010D": "c", + "\u010E": "D", + "\u0110": "D", + "\u010F": "d", + "\u0111": "d", + "\u0112": "E", + "\u0114": "E", + "\u0116": "E", + "\u0118": "E", + "\u011A": "E", + "\u0113": "e", + "\u0115": "e", + "\u0117": "e", + "\u0119": "e", + "\u011B": "e", + "\u011C": "G", + "\u011E": "G", + "\u0120": "G", + "\u0122": "G", + "\u011D": "g", + "\u011F": "g", + "\u0121": "g", + "\u0123": "g", + "\u0124": "H", + "\u0126": "H", + "\u0125": "h", + "\u0127": "h", + "\u0128": "I", + "\u012A": "I", + "\u012C": "I", + "\u012E": "I", + "\u0130": "I", + "\u0129": "i", + "\u012B": "i", + "\u012D": "i", + "\u012F": "i", + "\u0131": "i", + "\u0134": "J", + "\u0135": "j", + "\u0136": "K", + "\u0137": "k", + "\u0138": "k", + "\u0139": "L", + "\u013B": "L", + "\u013D": "L", + "\u013F": "L", + "\u0141": "L", + "\u013A": "l", + "\u013C": "l", + "\u013E": "l", + "\u0140": "l", + "\u0142": "l", + "\u0143": "N", + "\u0145": "N", + "\u0147": "N", + "\u014A": "N", + "\u0144": "n", + "\u0146": "n", + "\u0148": "n", + "\u014B": "n", + "\u014C": "O", + "\u014E": "O", + "\u0150": "O", + "\u014D": "o", + "\u014F": "o", + "\u0151": "o", + "\u0154": "R", + "\u0156": "R", + "\u0158": "R", + "\u0155": "r", + "\u0157": "r", + "\u0159": "r", + "\u015A": "S", + "\u015C": "S", + "\u015E": "S", + "\u0160": "S", + "\u015B": "s", + "\u015D": "s", + "\u015F": "s", + "\u0161": "s", + "\u0162": "T", + "\u0164": "T", + "\u0166": "T", + "\u0163": "t", + "\u0165": "t", + "\u0167": "t", + "\u0168": "U", + "\u016A": "U", + "\u016C": "U", + "\u016E": "U", + "\u0170": "U", + "\u0172": "U", + "\u0169": "u", + "\u016B": "u", + "\u016D": "u", + "\u016F": "u", + "\u0171": "u", + "\u0173": "u", + "\u0174": "W", + "\u0175": "w", + "\u0176": "Y", + "\u0177": "y", + "\u0178": "Y", + "\u0179": "Z", + "\u017B": "Z", + "\u017D": "Z", + "\u017A": "z", + "\u017C": "z", + "\u017E": "z", + "\u0132": "IJ", + "\u0133": "ij", + "\u0152": "Oe", + "\u0153": "oe", + "\u0149": "'n", + "\u017F": "s" + }; + var htmlEscapes = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'" + }; + var htmlUnescapes = { + "&": "&", + "<": "<", + ">": ">", + """: '"', + "'": "'" + }; + var stringEscapes = { + "\\": "\\", + "'": "'", + "\n": "n", + "\r": "r", + "\u2028": "u2028", + "\u2029": "u2029" + }; + var freeParseFloat = parseFloat, freeParseInt = parseInt; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var freeProcess = moduleExports && freeGlobal.process; + var nodeUtil = (function() { + try { + var types = freeModule && freeModule.require && freeModule.require("util").types; + if (types) { + return types; + } + return freeProcess && freeProcess.binding && freeProcess.binding("util"); + } catch (e) { + } + })(); + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + function arrayEach(array, iteratee) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + function arrayEvery(array, predicate) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + function arrayFilter(array, predicate) { + var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + function arrayIncludesWith(array, value, comparator) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + function arrayMap(array, iteratee) { + var index = -1, length = array == null ? 0 : array.length, result = Array(length); + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + function arrayPush(array, values) { + var index = -1, length = values.length, offset = array.length; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + function arraySome(array, predicate) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + var asciiSize = baseProperty("length"); + function asciiToArray(string) { + return string.split(""); + } + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection2) { + if (predicate(value, key, collection2)) { + result = key; + return false; + } + }); + return result; + } + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, index = fromIndex + (fromRight ? 1 : -1); + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + function baseIndexOf(array, value, fromIndex) { + return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); + } + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + function baseIsNaN(value) { + return value !== value; + } + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? baseSum(array, iteratee) / length : NAN; + } + function baseProperty(key) { + return function(object) { + return object == null ? undefined2 : object[key]; + }; + } + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined2 : object[key]; + }; + } + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection2) { + accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection2); + }); + return accumulator; + } + function baseSortBy(array, comparer) { + var length = array.length; + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + function baseSum(array, iteratee) { + var result, index = -1, length = array.length; + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined2) { + result = result === undefined2 ? current : result + current; + } + } + return result; + } + function baseTimes(n, iteratee) { + var index = -1, result = Array(n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + function baseTrim(string) { + return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string; + } + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + function cacheHas(cache, key) { + return cache.has(key); + } + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, length = strSymbols.length; + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) { + } + return index; + } + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) { + } + return index; + } + function countHolders(array, placeholder) { + var length = array.length, result = 0; + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + var deburrLetter = basePropertyOf(deburredLetters); + var escapeHtmlChar = basePropertyOf(htmlEscapes); + function escapeStringChar(chr) { + return "\\" + stringEscapes[chr]; + } + function getValue(object, key) { + return object == null ? undefined2 : object[key]; + } + function hasUnicode(string) { + return reHasUnicode.test(string); + } + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + function iteratorToArray(iterator) { + var data, result = []; + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + function mapToArray(map) { + var index = -1, result = Array(map.size); + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + function replaceHolders(array, placeholder) { + var index = -1, length = array.length, resIndex = 0, result = []; + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + function setToArray(set) { + var index = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + function setToPairs(set) { + var index = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + function stringSize(string) { + return hasUnicode(string) ? unicodeSize(string) : asciiSize(string); + } + function stringToArray(string) { + return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string); + } + function trimmedEndIndex(string) { + var index = string.length; + while (index-- && reWhitespace.test(string.charAt(index))) { + } + return index; + } + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + var runInContext = (function runInContext2(context) { + context = context == null ? root : _2.defaults(root.Object(), context, _2.pick(root, contextProps)); + var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError2 = context.TypeError; + var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype; + var coreJsData = context["__core-js_shared__"]; + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var idCounter = 0; + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + })(); + var nativeObjectToString = objectProto.toString; + var objectCtorString = funcToString.call(Object2); + var oldDash = root._; + var reIsNative = RegExp2( + "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + var Buffer2 = moduleExports ? context.Buffer : undefined2, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined2, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined2, symIterator = Symbol2 ? Symbol2.iterator : undefined2, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined2; + var defineProperty = (function() { + try { + var func = getNative(Object2, "defineProperty"); + func({}, "", {}); + return func; + } catch (e) { + } + })(); + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined2, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse; + var DataView2 = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap2 = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create"); + var metaMap = WeakMap2 && new WeakMap2(); + var realNames = {}; + var dataViewCtorString = toSource(DataView2), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2); + var symbolProto = Symbol2 ? Symbol2.prototype : undefined2, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined2, symbolToString = symbolProto ? symbolProto.toString : undefined2; + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, "__wrapped__")) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + var baseCreate = /* @__PURE__ */ (function() { + function object() { + } + return function(proto) { + if (!isObject2(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result2 = new object(); + object.prototype = undefined2; + return result2; + }; + })(); + function baseLodash() { + } + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined2; + } + lodash.templateSettings = { + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + "escape": reEscape, + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + "evaluate": reEvaluate, + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + "interpolate": reInterpolate, + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + "variable": "", + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + "imports": { + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + "_": lodash + } + }; + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + function lazyClone() { + var result2 = new LazyWrapper(this.__wrapped__); + result2.__actions__ = copyArray(this.__actions__); + result2.__dir__ = this.__dir__; + result2.__filtered__ = this.__filtered__; + result2.__iteratees__ = copyArray(this.__iteratees__); + result2.__takeCount__ = this.__takeCount__; + result2.__views__ = copyArray(this.__views__); + return result2; + } + function lazyReverse() { + if (this.__filtered__) { + var result2 = new LazyWrapper(this); + result2.__dir__ = -1; + result2.__filtered__ = true; + } else { + result2 = this.clone(); + result2.__dir__ *= -1; + } + return result2; + } + function lazyValue() { + var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__); + if (!isArr || !isRight && arrLength == length && takeCount == length) { + return baseWrapperValue(array, this.__actions__); + } + var result2 = []; + outer: + while (length-- && resIndex < takeCount) { + index += dir; + var iterIndex = -1, value = array[index]; + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed = iteratee2(value); + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result2[resIndex++] = value; + } + return result2; + } + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + function Hash(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + function hashDelete(key) { + var result2 = this.has(key) && delete this.__data__[key]; + this.size -= result2 ? 1 : 0; + return result2; + } + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result2 = data[key]; + return result2 === HASH_UNDEFINED ? undefined2 : result2; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined2; + } + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined2 : hasOwnProperty.call(data, key); + } + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === undefined2 ? HASH_UNDEFINED : value; + return this; + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + function ListCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? undefined2 : data[index][1]; + } + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + function MapCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function mapCacheClear() { + this.size = 0; + this.__data__ = { + "hash": new Hash(), + "map": new (Map2 || ListCache)(), + "string": new Hash() + }; + } + function mapCacheDelete(key) { + var result2 = getMapData(this, key)["delete"](key); + this.size -= result2 ? 1 : 0; + return result2; + } + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + function mapCacheSet(key, value) { + var data = getMapData(this, key), size2 = data.size; + data.set(key, value); + this.size += data.size == size2 ? 0 : 1; + return this; + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + function SetCache(values2) { + var index = -1, length = values2 == null ? 0 : values2.length; + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values2[index]); + } + } + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + function setCacheHas(value) { + return this.__data__.has(value); + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + function stackDelete(key) { + var data = this.__data__, result2 = data["delete"](key); + this.size = data.size; + return result2; + } + function stackGet(key) { + return this.__data__.get(key); + } + function stackHas(key) { + return this.__data__.has(key); + } + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + Stack.prototype.clear = stackClear; + Stack.prototype["delete"] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length, String2) : [], length = result2.length; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode. + (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. + isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. + isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. + isIndex(key, length)))) { + result2.push(key); + } + } + return result2; + } + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined2; + } + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + function assignMergeValue(object, key, value) { + if (value !== undefined2 && !eq(object[key], value) || value === undefined2 && !(key in object)) { + baseAssignValue(object, key, value); + } + } + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined2 && !(key in object)) { + baseAssignValue(object, key, value); + } + } + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + function baseAggregator(collection, setter, iteratee2, accumulator) { + baseEach(collection, function(value, key, collection2) { + setter(accumulator, value, iteratee2(value), collection2); + }); + return accumulator; + } + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + function baseAssignValue(object, key, value) { + if (key == "__proto__" && defineProperty) { + defineProperty(object, key, { + "configurable": true, + "enumerable": true, + "value": value, + "writable": true + }); + } else { + object[key] = value; + } + } + function baseAt(object, paths) { + var index = -1, length = paths.length, result2 = Array2(length), skip = object == null; + while (++index < length) { + result2[index] = skip ? undefined2 : get(object, paths[index]); + } + return result2; + } + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined2) { + number = number <= upper ? number : upper; + } + if (lower !== undefined2) { + number = number >= lower ? number : lower; + } + } + return number; + } + function baseClone(value, bitmask, customizer, key, object, stack) { + var result2, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; + if (customizer) { + result2 = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result2 !== undefined2) { + return result2; + } + if (!isObject2(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result2 = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result2); + } + } else { + var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || isFunc && !object) { + result2 = isFlat || isFunc ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat ? copySymbolsIn(value, baseAssignIn(result2, value)) : copySymbols(value, baseAssign(result2, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result2 = initCloneByTag(value, tag, isDeep); + } + } + stack || (stack = new Stack()); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result2); + if (isSet(value)) { + value.forEach(function(subValue) { + result2.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key2) { + result2.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); + }); + } + var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys; + var props = isArr ? undefined2 : keysFunc(value); + arrayEach(props || value, function(subValue, key2) { + if (props) { + key2 = subValue; + subValue = value[key2]; + } + assignValue(result2, key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); + }); + return result2; + } + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; + } + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object2(object); + while (length--) { + var key = props[length], predicate = source[key], value = object[key]; + if (value === undefined2 && !(key in object) || !predicate(value)) { + return false; + } + } + return true; + } + function baseDelay(func, wait, args) { + if (typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + return setTimeout2(function() { + func.apply(undefined2, args); + }, wait); + } + function baseDifference(array, values2, iteratee2, comparator) { + var index = -1, includes2 = arrayIncludes, isCommon = true, length = array.length, result2 = [], valuesLength = values2.length; + if (!length) { + return result2; + } + if (iteratee2) { + values2 = arrayMap(values2, baseUnary(iteratee2)); + } + if (comparator) { + includes2 = arrayIncludesWith; + isCommon = false; + } else if (values2.length >= LARGE_ARRAY_SIZE) { + includes2 = cacheHas; + isCommon = false; + values2 = new SetCache(values2); + } + outer: + while (++index < length) { + var value = array[index], computed = iteratee2 == null ? value : iteratee2(value); + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values2[valuesIndex] === computed) { + continue outer; + } + } + result2.push(value); + } else if (!includes2(values2, computed, comparator)) { + result2.push(value); + } + } + return result2; + } + var baseEach = createBaseEach(baseForOwn); + var baseEachRight = createBaseEach(baseForOwnRight, true); + function baseEvery(collection, predicate) { + var result2 = true; + baseEach(collection, function(value, index, collection2) { + result2 = !!predicate(value, index, collection2); + return result2; + }); + return result2; + } + function baseExtremum(array, iteratee2, comparator) { + var index = -1, length = array.length; + while (++index < length) { + var value = array[index], current = iteratee2(value); + if (current != null && (computed === undefined2 ? current === current && !isSymbol(current) : comparator(current, computed))) { + var computed = current, result2 = value; + } + } + return result2; + } + function baseFill(array, value, start, end) { + var length = array.length; + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : length + start; + } + end = end === undefined2 || end > length ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + function baseFilter(collection, predicate) { + var result2 = []; + baseEach(collection, function(value, index, collection2) { + if (predicate(value, index, collection2)) { + result2.push(value); + } + }); + return result2; + } + function baseFlatten(array, depth, predicate, isStrict, result2) { + var index = -1, length = array.length; + predicate || (predicate = isFlattenable); + result2 || (result2 = []); + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + baseFlatten(value, depth - 1, predicate, isStrict, result2); + } else { + arrayPush(result2, value); + } + } else if (!isStrict) { + result2[result2.length] = value; + } + } + return result2; + } + var baseFor = createBaseFor(); + var baseForRight = createBaseFor(true); + function baseForOwn(object, iteratee2) { + return object && baseFor(object, iteratee2, keys); + } + function baseForOwnRight(object, iteratee2) { + return object && baseForRight(object, iteratee2, keys); + } + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); + } + function baseGet(object, path) { + path = castPath(path, object); + var index = 0, length = path.length; + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return index && index == length ? object : undefined2; + } + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result2 = keysFunc(object); + return isArray(object) ? result2 : arrayPush(result2, symbolsFunc(object)); + } + function baseGetTag(value) { + if (value == null) { + return value === undefined2 ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object2(value) ? getRawTag(value) : objectToString(value); + } + function baseGt(value, other) { + return value > other; + } + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + function baseHasIn(object, key) { + return object != null && key in Object2(object); + } + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + function baseIntersection(arrays, iteratee2, comparator) { + var includes2 = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array2(othLength), maxLength = Infinity, result2 = []; + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee2) { + array = arrayMap(array, baseUnary(iteratee2)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined2; + } + array = arrays[0]; + var index = -1, seen = caches[0]; + outer: + while (++index < length && result2.length < maxLength) { + var value = array[index], computed = iteratee2 ? iteratee2(value) : value; + value = comparator || value !== 0 ? value : 0; + if (!(seen ? cacheHas(seen, computed) : includes2(result2, computed, comparator))) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache ? cacheHas(cache, computed) : includes2(arrays[othIndex], computed, comparator))) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result2.push(value); + } + } + return result2; + } + function baseInverter(object, setter, iteratee2, accumulator) { + baseForOwn(object, function(value, key, object2) { + setter(accumulator, iteratee2(value), key, object2); + }); + return accumulator; + } + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined2 : apply(func, object, args); + } + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__"); + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, length = index, noCustomizer = !customizer; + if (object == null) { + return !length; + } + object = Object2(object); + while (index--) { + var data = matchData[index]; + if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], objValue = object[key], srcValue = data[1]; + if (noCustomizer && data[2]) { + if (objValue === undefined2 && !(key in object)) { + return false; + } + } else { + var stack = new Stack(); + if (customizer) { + var result2 = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result2 === undefined2 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result2)) { + return false; + } + } + } + return true; + } + function baseIsNative(value) { + if (!isObject2(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + function baseIteratee(value) { + if (typeof value == "function") { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == "object") { + return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); + } + return property(value); + } + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result2 = []; + for (var key in Object2(object)) { + if (hasOwnProperty.call(object, key) && key != "constructor") { + result2.push(key); + } + } + return result2; + } + function baseKeysIn(object) { + if (!isObject2(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), result2 = []; + for (var key in object) { + if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) { + result2.push(key); + } + } + return result2; + } + function baseLt(value, other) { + return value < other; + } + function baseMap(collection, iteratee2) { + var index = -1, result2 = isArrayLike(collection) ? Array2(collection.length) : []; + baseEach(collection, function(value, key, collection2) { + result2[++index] = iteratee2(value, key, collection2); + }); + return result2; + } + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return objValue === undefined2 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack()); + if (isObject2(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } else { + var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined2; + if (newValue === undefined2) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); + } + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue); + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : undefined2; + var isCommon = newValue === undefined2; + if (isCommon) { + var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue); + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } else { + newValue = []; + } + } else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } else if (!isObject2(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } else { + isCommon = false; + } + } + if (isCommon) { + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack["delete"](srcValue); + } + assignMergeValue(object, key, newValue); + } + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined2; + } + function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee2) { + if (isArray(iteratee2)) { + return function(value) { + return baseGet(value, iteratee2.length === 1 ? iteratee2[0] : iteratee2); + }; + } + return iteratee2; + }); + } else { + iteratees = [identity]; + } + var index = -1; + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + var result2 = baseMap(collection, function(value, key, collection2) { + var criteria = arrayMap(iteratees, function(iteratee2) { + return iteratee2(value); + }); + return { "criteria": criteria, "index": ++index, "value": value }; + }); + return baseSortBy(result2, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); + } + function basePickBy(object, paths, predicate) { + var index = -1, length = paths.length, result2 = {}; + while (++index < length) { + var path = paths[index], value = baseGet(object, path); + if (predicate(value, path)) { + baseSet(result2, castPath(path, object), value); + } + } + return result2; + } + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + function basePullAll(array, values2, iteratee2, comparator) { + var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf, index = -1, length = values2.length, seen = array; + if (array === values2) { + values2 = copyArray(values2); + } + if (iteratee2) { + seen = arrayMap(array, baseUnary(iteratee2)); + } + while (++index < length) { + var fromIndex = 0, value = values2[index], computed = iteratee2 ? iteratee2(value) : value; + while ((fromIndex = indexOf2(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, lastIndex = length - 1; + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + function baseRange(start, end, step, fromRight) { + var index = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result2 = Array2(length); + while (length--) { + result2[fromRight ? length : ++index] = start; + start += step; + } + return result2; + } + function baseRepeat(string, n) { + var result2 = ""; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result2; + } + do { + if (n % 2) { + result2 += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + return result2; + } + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ""); + } + function baseSample(collection) { + return arraySample(values(collection)); + } + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + function baseSet(object, path, value, customizer) { + if (!isObject2(object)) { + return object; + } + path = castPath(path, object); + var index = -1, length = path.length, lastIndex = length - 1, nested = object; + while (nested != null && ++index < length) { + var key = toKey(path[index]), newValue = value; + if (key === "__proto__" || key === "constructor" || key === "prototype") { + return object; + } + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined2; + if (newValue === undefined2) { + newValue = isObject2(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {}; + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, "toString", { + "configurable": true, + "enumerable": false, + "value": constant(string), + "writable": true + }); + }; + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + function baseSlice(array, start, end) { + var index = -1, length = array.length; + if (start < 0) { + start = -start > length ? 0 : length + start; + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : end - start >>> 0; + start >>>= 0; + var result2 = Array2(length); + while (++index < length) { + result2[index] = array[index + start]; + } + return result2; + } + function baseSome(collection, predicate) { + var result2; + baseEach(collection, function(value, index, collection2) { + result2 = predicate(value, index, collection2); + return !result2; + }); + return !!result2; + } + function baseSortedIndex(array, value, retHighest) { + var low = 0, high = array == null ? low : array.length; + if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = low + high >>> 1, computed = array[mid]; + if (computed !== null && !isSymbol(computed) && (retHighest ? computed <= value : computed < value)) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + function baseSortedIndexBy(array, value, iteratee2, retHighest) { + var low = 0, high = array == null ? 0 : array.length; + if (high === 0) { + return 0; + } + value = iteratee2(value); + var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined2; + while (low < high) { + var mid = nativeFloor((low + high) / 2), computed = iteratee2(array[mid]), othIsDefined = computed !== undefined2, othIsNull = computed === null, othIsReflexive = computed === computed, othIsSymbol = isSymbol(computed); + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? computed <= value : computed < value; + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + function baseSortedUniq(array, iteratee2) { + var index = -1, length = array.length, resIndex = 0, result2 = []; + while (++index < length) { + var value = array[index], computed = iteratee2 ? iteratee2(value) : value; + if (!index || !eq(computed, seen)) { + var seen = computed; + result2[resIndex++] = value === 0 ? 0 : value; + } + } + return result2; + } + function baseToNumber(value) { + if (typeof value == "number") { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + function baseToString(value) { + if (typeof value == "string") { + return value; + } + if (isArray(value)) { + return arrayMap(value, baseToString) + ""; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ""; + } + var result2 = value + ""; + return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2; + } + function baseUniq(array, iteratee2, comparator) { + var index = -1, includes2 = arrayIncludes, length = array.length, isCommon = true, result2 = [], seen = result2; + if (comparator) { + isCommon = false; + includes2 = arrayIncludesWith; + } else if (length >= LARGE_ARRAY_SIZE) { + var set2 = iteratee2 ? null : createSet(array); + if (set2) { + return setToArray(set2); + } + isCommon = false; + includes2 = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee2 ? [] : result2; + } + outer: + while (++index < length) { + var value = array[index], computed = iteratee2 ? iteratee2(value) : value; + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee2) { + seen.push(computed); + } + result2.push(value); + } else if (!includes2(seen, computed, comparator)) { + if (seen !== result2) { + seen.push(computed); + } + result2.push(value); + } + } + return result2; + } + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, index = fromRight ? length : -1; + while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) { + } + return isDrop ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index); + } + function baseWrapperValue(value, actions) { + var result2 = value; + if (result2 instanceof LazyWrapper) { + result2 = result2.value(); + } + return arrayReduce(actions, function(result3, action) { + return action.func.apply(action.thisArg, arrayPush([result3], action.args)); + }, result2); + } + function baseXor(arrays, iteratee2, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, result2 = Array2(length); + while (++index < length) { + var array = arrays[index], othIndex = -1; + while (++othIndex < length) { + if (othIndex != index) { + result2[index] = baseDifference(result2[index] || array, arrays[othIndex], iteratee2, comparator); + } + } + } + return baseUniq(baseFlatten(result2, 1), iteratee2, comparator); + } + function baseZipObject(props, values2, assignFunc) { + var index = -1, length = props.length, valsLength = values2.length, result2 = {}; + while (++index < length) { + var value = index < valsLength ? values2[index] : undefined2; + assignFunc(result2, props[index], value); + } + return result2; + } + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + function castFunction(value) { + return typeof value == "function" ? value : identity; + } + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString2(value)); + } + var castRest = baseRest; + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined2 ? length : end; + return !start && end >= length ? array : baseSlice(array, start, end); + } + var clearTimeout2 = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, result2 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + buffer.copy(result2); + return result2; + } + function cloneArrayBuffer(arrayBuffer) { + var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array2(result2).set(new Uint8Array2(arrayBuffer)); + return result2; + } + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + function cloneRegExp(regexp) { + var result2 = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result2.lastIndex = regexp.lastIndex; + return result2; + } + function cloneSymbol(symbol) { + return symbolValueOf ? Object2(symbolValueOf.call(symbol)) : {}; + } + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined2, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value); + var othIsDefined = other !== undefined2, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other); + if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) { + return 1; + } + if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) { + return -1; + } + } + return 0; + } + function compareMultiple(object, other, orders) { + var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length; + while (++index < length) { + var result2 = compareAscending(objCriteria[index], othCriteria[index]); + if (result2) { + if (index >= ordersLength) { + return result2; + } + var order = orders[index]; + return result2 * (order == "desc" ? -1 : 1); + } + } + return object.index - other.index; + } + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(leftLength + rangeLength), isUncurried = !isCurried; + while (++leftIndex < leftLength) { + result2[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result2[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result2[leftIndex++] = args[argsIndex++]; + } + return result2; + } + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(rangeLength + rightLength), isUncurried = !isCurried; + while (++argsIndex < rangeLength) { + result2[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result2[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result2[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result2; + } + function copyArray(source, array) { + var index = -1, length = source.length; + array || (array = Array2(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + var index = -1, length = props.length; + while (++index < length) { + var key = props[index]; + var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined2; + if (newValue === undefined2) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + function createAggregator(setter, initializer) { + return function(collection, iteratee2) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {}; + return func(collection, setter, getIteratee(iteratee2, 2), accumulator); + }; + } + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined2, guard = length > 2 ? sources[2] : undefined2; + customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : undefined2; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined2 : customizer; + length = 1; + } + object = Object2(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee2) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee2); + } + var length = collection.length, index = fromRight ? length : -1, iterable = Object2(collection); + while (fromRight ? index-- : ++index < length) { + if (iteratee2(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + function createBaseFor(fromRight) { + return function(object, iteratee2, keysFunc) { + var index = -1, iterable = Object2(object), props = keysFunc(object), length = props.length; + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee2(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); + function wrapper() { + var fn = this && this !== root && this instanceof wrapper ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + function createCaseFirst(methodName) { + return function(string) { + string = toString2(string); + var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined2; + var chr = strSymbols ? strSymbols[0] : string.charAt(0); + var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1); + return chr[methodName]() + trailing; + }; + } + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, "")), callback, ""); + }; + } + function createCtor(Ctor) { + return function() { + var args = arguments; + switch (args.length) { + case 0: + return new Ctor(); + case 1: + return new Ctor(args[0]); + case 2: + return new Ctor(args[0], args[1]); + case 3: + return new Ctor(args[0], args[1], args[2]); + case 4: + return new Ctor(args[0], args[1], args[2], args[3]); + case 5: + return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: + return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: + return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args); + return isObject2(result2) ? result2 : thisBinding; + }; + } + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + function wrapper() { + var length = arguments.length, args = Array2(length), index = length, placeholder = getHolder(wrapper); + while (index--) { + args[index] = arguments[index]; + } + var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder); + length -= holders.length; + if (length < arity) { + return createRecurry( + func, + bitmask, + createHybrid, + wrapper.placeholder, + undefined2, + args, + holders, + undefined2, + undefined2, + arity - length + ); + } + var fn = this && this !== root && this instanceof wrapper ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object2(collection); + if (!isArrayLike(collection)) { + var iteratee2 = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { + return iteratee2(iterable[key], key, iterable); + }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee2 ? collection[index] : index] : undefined2; + }; + } + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru; + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == "wrapper") { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined2; + if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func); + } + } + return function() { + var args = arguments, value = args[0]; + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index2 = 0, result2 = length ? funcs[index2].apply(this, args) : value; + while (++index2 < length) { + result2 = funcs[index2].call(this, result2); + } + return result2; + }; + }); + } + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined2 : createCtor(func); + function wrapper() { + var length = arguments.length, args = Array2(length), index = length; + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, + bitmask, + createHybrid, + wrapper.placeholder, + thisArg, + args, + newHolders, + argPos, + ary2, + arity - length + ); + } + var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func; + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary2 < length) { + args.length = ary2; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + function createInverter(setter, toIteratee) { + return function(object, iteratee2) { + return baseInverter(object, setter, toIteratee(iteratee2), {}); + }; + } + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result2; + if (value === undefined2 && other === undefined2) { + return defaultValue; + } + if (value !== undefined2) { + result2 = value; + } + if (other !== undefined2) { + if (result2 === undefined2) { + return other; + } + if (typeof value == "string" || typeof other == "string") { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result2 = operator(value, other); + } + return result2; + }; + } + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee2) { + return apply(iteratee2, thisArg, args); + }); + }); + }); + } + function createPadding(length, chars) { + chars = chars === undefined2 ? " " : baseToString(chars); + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result2 = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) ? castSlice(stringToArray(result2), 0, length).join("") : result2.slice(0, length); + } + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); + function wrapper() { + var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array2(leftLength + argsLength), fn = this && this !== root && this instanceof wrapper ? Ctor : func; + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != "number" && isIterateeCall(start, end, step)) { + end = step = undefined2; + } + start = toFinite(start); + if (end === undefined2) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined2 ? start < end ? 1 : -1 : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == "string" && typeof other == "string")) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary2, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined2, newHoldersRight = isCurry ? undefined2 : holders, newPartials = isCurry ? partials : undefined2, newPartialsRight = isCurry ? undefined2 : partials; + bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG; + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, + bitmask, + thisArg, + newPartials, + newHolders, + newPartialsRight, + newHoldersRight, + argPos, + ary2, + arity + ]; + var result2 = wrapFunc.apply(undefined2, newData); + if (isLaziable(func)) { + setData(result2, newData); + } + result2.placeholder = placeholder; + return setWrapToString(result2, func, bitmask); + } + function createRound(methodName) { + var func = Math2[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + var pair = (toString2(number) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision)); + pair = (toString2(value) + "e").split("e"); + return +(pair[0] + "e" + (+pair[1] - precision)); + } + return func(number); + }; + } + var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values2) { + return new Set2(values2); + }; + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary2, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined2; + } + ary2 = ary2 === undefined2 ? ary2 : nativeMax(toInteger(ary2), 0); + arity = arity === undefined2 ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, holdersRight = holders; + partials = holders = undefined2; + } + var data = isBindKey ? undefined2 : getData(func); + var newData = [ + func, + bitmask, + thisArg, + partials, + holders, + partialsRight, + holdersRight, + argPos, + ary2, + arity + ]; + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined2 ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0); + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result2 = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result2 = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result2 = createPartial(func, bitmask, thisArg, partials); + } else { + result2 = createHybrid.apply(undefined2, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result2, newData), func, bitmask); + } + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined2 || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) { + return srcValue; + } + return objValue; + } + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject2(objValue) && isObject2(srcValue)) { + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined2, customDefaultsMerge, stack); + stack["delete"](srcValue); + } + return objValue; + } + function customOmitClone(value) { + return isPlainObject(value) ? undefined2 : value; + } + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, result2 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined2; + stack.set(array, other); + stack.set(other, array); + while (++index < arrLength) { + var arrValue = array[index], othValue = other[index]; + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined2) { + if (compared) { + continue; + } + result2 = false; + break; + } + if (seen) { + if (!arraySome(other, function(othValue2, othIndex) { + if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result2 = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + result2 = false; + break; + } + } + stack["delete"](array); + stack["delete"](other); + return result2; + } + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) { + return false; + } + return true; + case boolTag: + case dateTag: + case numberTag: + return eq(+object, +other); + case errorTag: + return object.name == other.name && object.message == other.message; + case regexpTag: + case stringTag: + return object == other + ""; + case mapTag: + var convert = mapToArray; + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + if (object.size != other.size && !isPartial) { + return false; + } + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + stack.set(object, other); + var result2 = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack["delete"](object); + return result2; + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result2 = true; + stack.set(object, other); + stack.set(other, object); + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], othValue = other[key]; + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); + } + if (!(compared === undefined2 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { + result2 = false; + break; + } + skipCtor || (skipCtor = key == "constructor"); + } + if (result2 && !skipCtor) { + var objCtor = object.constructor, othCtor = other.constructor; + if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { + result2 = false; + } + } + stack["delete"](object); + stack["delete"](other); + return result2; + } + function flatRest(func) { + return setToString(overRest(func, undefined2, flatten), func + ""); + } + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + function getFuncName(func) { + var result2 = func.name + "", array = realNames[result2], length = hasOwnProperty.call(realNames, result2) ? array.length : 0; + while (length--) { + var data = array[length], otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result2; + } + function getHolder(func) { + var object = hasOwnProperty.call(lodash, "placeholder") ? lodash : func; + return object.placeholder; + } + function getIteratee() { + var result2 = lodash.iteratee || iteratee; + result2 = result2 === iteratee ? baseIteratee : result2; + return arguments.length ? result2(arguments[0], arguments[1]) : result2; + } + function getMapData(map2, key) { + var data = map2.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + function getMatchData(object) { + var result2 = keys(object), length = result2.length; + while (length--) { + var key = result2[length], value = object[key]; + result2[length] = [key, value, isStrictComparable(value)]; + } + return result2; + } + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined2; + } + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; + try { + value[symToStringTag] = undefined2; + var unmasked = true; + } catch (e) { + } + var result2 = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result2; + } + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object2(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result2 = []; + while (object) { + arrayPush(result2, getSymbols(object)); + object = getPrototype(object); + } + return result2; + }; + var getTag = baseGetTag; + if (DataView2 && getTag(new DataView2(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) { + getTag = function(value) { + var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined2, ctorString = Ctor ? toSource(Ctor) : ""; + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + case mapCtorString: + return mapTag; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag; + case weakMapCtorString: + return weakMapTag; + } + } + return result2; + }; + } + function getView(start, end, transforms) { + var index = -1, length = transforms.length; + while (++index < length) { + var data = transforms[index], size2 = data.size; + switch (data.type) { + case "drop": + start += size2; + break; + case "dropRight": + end -= size2; + break; + case "take": + end = nativeMin(end, start + size2); + break; + case "takeRight": + start = nativeMax(start, end - size2); + break; + } + } + return { "start": start, "end": end }; + } + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + var index = -1, length = path.length, result2 = false; + while (++index < length) { + var key = toKey(path[index]); + if (!(result2 = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result2 || ++index != length) { + return result2; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); + } + function initCloneArray(array) { + var length = array.length, result2 = new array.constructor(length); + if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) { + result2.index = array.index; + result2.input = array.input; + } + return result2; + } + function initCloneObject(object) { + return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {}; + } + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + case boolTag: + case dateTag: + return new Ctor(+object); + case dataViewTag: + return cloneDataView(object, isDeep); + case float32Tag: + case float64Tag: + case int8Tag: + case int16Tag: + case int32Tag: + case uint8Tag: + case uint8ClampedTag: + case uint16Tag: + case uint32Tag: + return cloneTypedArray(object, isDeep); + case mapTag: + return new Ctor(); + case numberTag: + case stringTag: + return new Ctor(object); + case regexpTag: + return cloneRegExp(object); + case setTag: + return new Ctor(); + case symbolTag: + return cloneSymbol(object); + } + } + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex]; + details = details.join(length > 2 ? ", " : " "); + return source.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n"); + } + function isFlattenable(value) { + return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); + } + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + function isIterateeCall(value, index, object) { + if (!isObject2(object)) { + return false; + } + var type = typeof index; + if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) { + return eq(object[index], value); + } + return false; + } + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object2(object); + } + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + function isLaziable(func) { + var funcName = getFuncName(func), other = lodash[funcName]; + if (typeof other != "function" || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + var isMaskable = coreJsData ? isFunction : stubFalse; + function isPrototype(value) { + var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; + return value === proto; + } + function isStrictComparable(value) { + return value === value && !isObject2(value); + } + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && (srcValue !== undefined2 || key in Object2(object)); + }; + } + function memoizeCapped(func) { + var result2 = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + var cache = result2.cache; + return result2; + } + function mergeData(data, source) { + var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG; + if (!(isCommon || isCombo)) { + return data; + } + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + value = source[7]; + if (value) { + data[7] = value; + } + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + if (data[9] == null) { + data[9] = source[9]; + } + data[0] = source[0]; + data[1] = newBitmask; + return data; + } + function nativeKeysIn(object) { + var result2 = []; + if (object != null) { + for (var key in Object2(object)) { + result2.push(key); + } + } + return result2; + } + function objectToString(value) { + return nativeObjectToString.call(value); + } + function overRest(func, start, transform2) { + start = nativeMax(start === undefined2 ? func.length - 1 : start, 0); + return function() { + var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array2(length); + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array2(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform2(array); + return apply(func, this, otherArgs); + }; + } + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + function reorder(array, indexes) { + var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array); + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined2; + } + return array; + } + function safeGet(object, key) { + if (key === "constructor" && typeof object[key] === "function") { + return; + } + if (key == "__proto__") { + return; + } + return object[key]; + } + var setData = shortOut(baseSetData); + var setTimeout2 = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + var setToString = shortOut(baseSetToString); + function setWrapToString(wrapper, reference, bitmask) { + var source = reference + ""; + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + function shortOut(func) { + var count = 0, lastCalled = 0; + return function() { + var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined2, arguments); + }; + } + function shuffleSelf(array, size2) { + var index = -1, length = array.length, lastIndex = length - 1; + size2 = size2 === undefined2 ? length : size2; + while (++index < size2) { + var rand = baseRandom(index, lastIndex), value = array[rand]; + array[rand] = array[index]; + array[index] = value; + } + array.length = size2; + return array; + } + var stringToPath = memoizeCapped(function(string) { + var result2 = []; + if (string.charCodeAt(0) === 46) { + result2.push(""); + } + string.replace(rePropName, function(match, number, quote, subString) { + result2.push(quote ? subString.replace(reEscapeChar, "$1") : number || match); + }); + return result2; + }); + function toKey(value) { + if (typeof value == "string" || isSymbol(value)) { + return value; + } + var result2 = value + ""; + return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2; + } + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = "_." + pair[0]; + if (bitmask & pair[1] && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result2 = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result2.__actions__ = copyArray(wrapper.__actions__); + result2.__index__ = wrapper.__index__; + result2.__values__ = wrapper.__values__; + return result2; + } + function chunk(array, size2, guard) { + if (guard ? isIterateeCall(array, size2, guard) : size2 === undefined2) { + size2 = 1; + } else { + size2 = nativeMax(toInteger(size2), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size2 < 1) { + return []; + } + var index = 0, resIndex = 0, result2 = Array2(nativeCeil(length / size2)); + while (index < length) { + result2[resIndex++] = baseSlice(array, index, index += size2); + } + return result2; + } + function compact(array) { + var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result2 = []; + while (++index < length) { + var value = array[index]; + if (value) { + result2[resIndex++] = value; + } + } + return result2; + } + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array2(length - 1), array = arguments[0], index = length; + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + var difference = baseRest(function(array, values2) { + return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true)) : []; + }); + var differenceBy = baseRest(function(array, values2) { + var iteratee2 = last(values2); + if (isArrayLikeObject(iteratee2)) { + iteratee2 = undefined2; + } + return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)) : []; + }); + var differenceWith = baseRest(function(array, values2) { + var comparator = last(values2); + if (isArrayLikeObject(comparator)) { + comparator = undefined2; + } + return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), undefined2, comparator) : []; + }); + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined2 ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined2 ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + function dropRightWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true, true) : []; + } + function dropWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true) : []; + } + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != "number" && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined2) { + index = toInteger(fromIndex); + index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined2 ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + function fromPairs(pairs) { + var index = -1, length = pairs == null ? 0 : pairs.length, result2 = {}; + while (++index < length) { + var pair = pairs[index]; + result2[pair[0]] = pair[1]; + } + return result2; + } + function head(array) { + return array && array.length ? array[0] : undefined2; + } + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : []; + }); + var intersectionBy = baseRest(function(arrays) { + var iteratee2 = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); + if (iteratee2 === last(mapped)) { + iteratee2 = undefined2; + } else { + mapped.pop(); + } + return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, getIteratee(iteratee2, 2)) : []; + }); + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); + comparator = typeof comparator == "function" ? comparator : undefined2; + if (comparator) { + mapped.pop(); + } + return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : []; + }); + function join(array, separator) { + return array == null ? "" : nativeJoin.call(array, separator); + } + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined2; + } + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined2) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value ? strictLastIndexOf(array, value, index) : baseFindIndex(array, baseIsNaN, index, true); + } + function nth(array, n) { + return array && array.length ? baseNth(array, toInteger(n)) : undefined2; + } + var pull = baseRest(pullAll); + function pullAll(array, values2) { + return array && array.length && values2 && values2.length ? basePullAll(array, values2) : array; + } + function pullAllBy(array, values2, iteratee2) { + return array && array.length && values2 && values2.length ? basePullAll(array, values2, getIteratee(iteratee2, 2)) : array; + } + function pullAllWith(array, values2, comparator) { + return array && array.length && values2 && values2.length ? basePullAll(array, values2, undefined2, comparator) : array; + } + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, result2 = baseAt(array, indexes); + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); + return result2; + }); + function remove(array, predicate) { + var result2 = []; + if (!(array && array.length)) { + return result2; + } + var index = -1, indexes = [], length = array.length; + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result2.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result2; + } + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != "number" && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } else { + start = start == null ? 0 : toInteger(start); + end = end === undefined2 ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + function sortedIndexBy(array, value, iteratee2) { + return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2)); + } + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + function sortedLastIndexBy(array, value, iteratee2) { + return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2), true); + } + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + function sortedUniq(array) { + return array && array.length ? baseSortedUniq(array) : []; + } + function sortedUniqBy(array, iteratee2) { + return array && array.length ? baseSortedUniq(array, getIteratee(iteratee2, 2)) : []; + } + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = guard || n === undefined2 ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined2 ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + function takeRightWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), false, true) : []; + } + function takeWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : []; + } + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + var unionBy = baseRest(function(arrays) { + var iteratee2 = last(arrays); + if (isArrayLikeObject(iteratee2)) { + iteratee2 = undefined2; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)); + }); + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == "function" ? comparator : undefined2; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined2, comparator); + }); + function uniq(array) { + return array && array.length ? baseUniq(array) : []; + } + function uniqBy(array, iteratee2) { + return array && array.length ? baseUniq(array, getIteratee(iteratee2, 2)) : []; + } + function uniqWith(array, comparator) { + comparator = typeof comparator == "function" ? comparator : undefined2; + return array && array.length ? baseUniq(array, undefined2, comparator) : []; + } + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); + } + function unzipWith(array, iteratee2) { + if (!(array && array.length)) { + return []; + } + var result2 = unzip(array); + if (iteratee2 == null) { + return result2; + } + return arrayMap(result2, function(group) { + return apply(iteratee2, undefined2, group); + }); + } + var without = baseRest(function(array, values2) { + return isArrayLikeObject(array) ? baseDifference(array, values2) : []; + }); + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + var xorBy = baseRest(function(arrays) { + var iteratee2 = last(arrays); + if (isArrayLikeObject(iteratee2)) { + iteratee2 = undefined2; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee2, 2)); + }); + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == "function" ? comparator : undefined2; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined2, comparator); + }); + var zip = baseRest(unzip); + function zipObject(props, values2) { + return baseZipObject(props || [], values2 || [], assignValue); + } + function zipObjectDeep(props, values2) { + return baseZipObject(props || [], values2 || [], baseSet); + } + var zipWith = baseRest(function(arrays) { + var length = arrays.length, iteratee2 = length > 1 ? arrays[length - 1] : undefined2; + iteratee2 = typeof iteratee2 == "function" ? (arrays.pop(), iteratee2) : undefined2; + return unzipWith(arrays, iteratee2); + }); + function chain(value) { + var result2 = lodash(value); + result2.__chain__ = true; + return result2; + } + function tap(value, interceptor) { + interceptor(value); + return value; + } + function thru(value, interceptor) { + return interceptor(value); + } + var wrapperAt = flatRest(function(paths) { + var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object) { + return baseAt(object, paths); + }; + if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + "func": thru, + "args": [interceptor], + "thisArg": undefined2 + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined2); + } + return array; + }); + }); + function wrapperChain() { + return chain(this); + } + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + function wrapperNext() { + if (this.__values__ === undefined2) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, value = done ? undefined2 : this.__values__[this.__index__++]; + return { "done": done, "value": value }; + } + function wrapperToIterator() { + return this; + } + function wrapperPlant(value) { + var result2, parent2 = this; + while (parent2 instanceof baseLodash) { + var clone2 = wrapperClone(parent2); + clone2.__index__ = 0; + clone2.__values__ = undefined2; + if (result2) { + previous.__wrapped__ = clone2; + } else { + result2 = clone2; + } + var previous = clone2; + parent2 = parent2.__wrapped__; + } + previous.__wrapped__ = value; + return result2; + } + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + "func": thru, + "args": [reverse], + "thisArg": undefined2 + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + var countBy = createAggregator(function(result2, value, key) { + if (hasOwnProperty.call(result2, key)) { + ++result2[key]; + } else { + baseAssignValue(result2, key, 1); + } + }); + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined2; + } + return func(collection, getIteratee(predicate, 3)); + } + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + var find = createFind(findIndex); + var findLast = createFind(findLastIndex); + function flatMap(collection, iteratee2) { + return baseFlatten(map(collection, iteratee2), 1); + } + function flatMapDeep(collection, iteratee2) { + return baseFlatten(map(collection, iteratee2), INFINITY); + } + function flatMapDepth(collection, iteratee2, depth) { + depth = depth === undefined2 ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee2), depth); + } + function forEach(collection, iteratee2) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee2, 3)); + } + function forEachRight(collection, iteratee2) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee2, 3)); + } + var groupBy = createAggregator(function(result2, value, key) { + if (hasOwnProperty.call(result2, key)) { + result2[key].push(value); + } else { + baseAssignValue(result2, key, [value]); + } + }); + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0; + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1; + } + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, isFunc = typeof path == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : []; + baseEach(collection, function(value) { + result2[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result2; + }); + var keyBy = createAggregator(function(result2, value, key) { + baseAssignValue(result2, key, value); + }); + function map(collection, iteratee2) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee2, 3)); + } + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined2 : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + var partition = createAggregator(function(result2, value, key) { + result2[key ? 0 : 1].push(value); + }, function() { + return [[], []]; + }); + function reduce(collection, iteratee2, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3; + return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEach); + } + function reduceRight(collection, iteratee2, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, initAccum = arguments.length < 3; + return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEachRight); + } + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + function sampleSize(collection, n, guard) { + if (guard ? isIterateeCall(collection, n, guard) : n === undefined2) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined2; + } + return func(collection, getIteratee(predicate, 3)); + } + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + var now = ctxNow || function() { + return root.Date.now(); + }; + function after(n, func) { + if (typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + function ary(func, n, guard) { + n = guard ? undefined2 : n; + n = func && n == null ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined2, undefined2, undefined2, undefined2, n); + } + function before(n, func) { + var result2; + if (typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result2 = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined2; + } + return result2; + }; + } + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + function curry(func, arity, guard) { + arity = guard ? undefined2 : arity; + var result2 = createWrap(func, WRAP_CURRY_FLAG, undefined2, undefined2, undefined2, undefined2, undefined2, arity); + result2.placeholder = curry.placeholder; + return result2; + } + function curryRight(func, arity, guard) { + arity = guard ? undefined2 : arity; + var result2 = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined2, undefined2, undefined2, undefined2, undefined2, arity); + result2.placeholder = curryRight.placeholder; + return result2; + } + function debounce(func, wait, options) { + var lastArgs, lastThis, maxWait, result2, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; + if (typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject2(options)) { + leading = !!options.leading; + maxing = "maxWait" in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = "trailing" in options ? !!options.trailing : trailing; + } + function invokeFunc(time) { + var args = lastArgs, thisArg = lastThis; + lastArgs = lastThis = undefined2; + lastInvokeTime = time; + result2 = func.apply(thisArg, args); + return result2; + } + function leadingEdge(time) { + lastInvokeTime = time; + timerId = setTimeout2(timerExpired, wait); + return leading ? invokeFunc(time) : result2; + } + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall; + return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; + } + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; + return lastCallTime === undefined2 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; + } + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + timerId = setTimeout2(timerExpired, remainingWait(time)); + } + function trailingEdge(time) { + timerId = undefined2; + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined2; + return result2; + } + function cancel() { + if (timerId !== undefined2) { + clearTimeout2(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined2; + } + function flush() { + return timerId === undefined2 ? result2 : trailingEdge(now()); + } + function debounced() { + var time = now(), isInvoking = shouldInvoke(time); + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + if (isInvoking) { + if (timerId === undefined2) { + return leadingEdge(lastCallTime); + } + if (maxing) { + clearTimeout2(timerId); + timerId = setTimeout2(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined2) { + timerId = setTimeout2(timerExpired, wait); + } + return result2; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + function memoize(func, resolver) { + if (typeof func != "function" || resolver != null && typeof resolver != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; + if (cache.has(key)) { + return cache.get(key); + } + var result2 = func.apply(this, args); + memoized.cache = cache.set(key, result2) || cache; + return result2; + }; + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; + } + memoize.Cache = MapCache; + function negate(predicate) { + if (typeof predicate != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: + return !predicate.call(this); + case 1: + return !predicate.call(this, args[0]); + case 2: + return !predicate.call(this, args[0], args[1]); + case 3: + return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + function once(func) { + return before(2, func); + } + var overArgs = castRest(function(func, transforms) { + transforms = transforms.length == 1 && isArray(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, length = nativeMin(args.length, funcsLength); + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined2, partials, holders); + }); + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined2, partials, holders); + }); + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined2, undefined2, undefined2, indexes); + }); + function rest(func, start) { + if (typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + start = start === undefined2 ? start : toInteger(start); + return baseRest(func, start); + } + function spread(func, start) { + if (typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], otherArgs = castSlice(args, 0, start); + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + function throttle(func, wait, options) { + var leading = true, trailing = true; + if (typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + if (isObject2(options)) { + leading = "leading" in options ? !!options.leading : leading; + trailing = "trailing" in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + "leading": leading, + "maxWait": wait, + "trailing": trailing + }); + } + function unary(func) { + return ary(func, 1); + } + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + function cloneWith(value, customizer) { + customizer = typeof customizer == "function" ? customizer : undefined2; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == "function" ? customizer : undefined2; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + function eq(value, other) { + return value === other || value !== value && other !== other; + } + var gt = createRelationalOperation(baseGt); + var gte = createRelationalOperation(function(value, other) { + return value >= other; + }); + var isArguments = baseIsArguments(/* @__PURE__ */ (function() { + return arguments; + })()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee"); + }; + var isArray = Array2.isArray; + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + function isBoolean(value) { + return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag; + } + var isBuffer = nativeIsBuffer || stubFalse; + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + function isEqual(value, other) { + return baseIsEqual(value, other); + } + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == "function" ? customizer : undefined2; + var result2 = customizer ? customizer(value, other) : undefined2; + return result2 === undefined2 ? baseIsEqual(value, other, undefined2, customizer) : !!result2; + } + function isError2(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject(value); + } + function isFinite2(value) { + return typeof value == "number" && nativeIsFinite(value); + } + function isFunction(value) { + if (!isObject2(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + function isInteger(value) { + return typeof value == "number" && value == toInteger(value); + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject2(value) { + var type = typeof value; + return value != null && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return value != null && typeof value == "object"; + } + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == "function" ? customizer : undefined2; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + function isNaN2(value) { + return isNumber(value) && value != +value; + } + function isNative(value) { + if (isMaskable(value)) { + throw new Error2(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + function isNull(value) { + return value === null; + } + function isNil(value) { + return value == null; + } + function isNumber(value) { + return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag; + } + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; + } + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + function isString(value) { + return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag; + } + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag; + } + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + function isUndefined(value) { + return value === undefined2; + } + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + var lt = createRelationalOperation(baseLt); + var lte = createRelationalOperation(function(value, other) { + return value <= other; + }); + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values; + return func(value); + } + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + function toInteger(value) { + var result2 = toFinite(value), remainder = result2 % 1; + return result2 === result2 ? remainder ? result2 - remainder : result2 : 0; + } + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + function toNumber(value) { + if (typeof value == "number") { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject2(value)) { + var other = typeof value.valueOf == "function" ? value.valueOf() : value; + value = isObject2(other) ? other + "" : other; + } + if (typeof value != "string") { + return value === 0 ? value : +value; + } + value = baseTrim(value); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; + } + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + function toSafeInteger(value) { + return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0; + } + function toString2(value) { + return value == null ? "" : baseToString(value); + } + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); + }); + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + var at = flatRest(baseAt); + function create(prototype, properties) { + var result2 = baseCreate(prototype); + return properties == null ? result2 : baseAssign(result2, properties); + } + var defaults = baseRest(function(object, sources) { + object = Object2(object); + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined2; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + if (value === undefined2 || eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) { + object[key] = source[key]; + } + } + } + return object; + }); + var defaultsDeep = baseRest(function(args) { + args.push(undefined2, customDefaultsMerge); + return apply(mergeWith, undefined2, args); + }); + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + function forIn(object, iteratee2) { + return object == null ? object : baseFor(object, getIteratee(iteratee2, 3), keysIn); + } + function forInRight(object, iteratee2) { + return object == null ? object : baseForRight(object, getIteratee(iteratee2, 3), keysIn); + } + function forOwn(object, iteratee2) { + return object && baseForOwn(object, getIteratee(iteratee2, 3)); + } + function forOwnRight(object, iteratee2) { + return object && baseForOwnRight(object, getIteratee(iteratee2, 3)); + } + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + function get(object, path, defaultValue) { + var result2 = object == null ? undefined2 : baseGet(object, path); + return result2 === undefined2 ? defaultValue : result2; + } + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + var invert = createInverter(function(result2, value, key) { + if (value != null && typeof value.toString != "function") { + value = nativeObjectToString.call(value); + } + result2[value] = key; + }, constant(identity)); + var invertBy = createInverter(function(result2, value, key) { + if (value != null && typeof value.toString != "function") { + value = nativeObjectToString.call(value); + } + if (hasOwnProperty.call(result2, value)) { + result2[value].push(key); + } else { + result2[value] = [key]; + } + }, getIteratee); + var invoke = baseRest(baseInvoke); + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + function mapKeys(object, iteratee2) { + var result2 = {}; + iteratee2 = getIteratee(iteratee2, 3); + baseForOwn(object, function(value, key, object2) { + baseAssignValue(result2, iteratee2(value, key, object2), value); + }); + return result2; + } + function mapValues(object, iteratee2) { + var result2 = {}; + iteratee2 = getIteratee(iteratee2, 3); + baseForOwn(object, function(value, key, object2) { + baseAssignValue(result2, key, iteratee2(value, key, object2)); + }); + return result2; + } + var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + var omit = flatRest(function(object, paths) { + var result2 = {}; + if (object == null) { + return result2; + } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result2); + if (isDeep) { + result2 = baseClone(result2, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); + } + var length = paths.length; + while (length--) { + baseUnset(result2, paths[length]); + } + return result2; + }); + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); + } + function result(object, path, defaultValue) { + path = castPath(path, object); + var index = -1, length = path.length; + if (!length) { + length = 1; + object = undefined2; + } + while (++index < length) { + var value = object == null ? undefined2 : object[toKey(path[index])]; + if (value === undefined2) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + function setWith(object, path, value, customizer) { + customizer = typeof customizer == "function" ? customizer : undefined2; + return object == null ? object : baseSet(object, path, value, customizer); + } + var toPairs = createToPairs(keys); + var toPairsIn = createToPairs(keysIn); + function transform(object, iteratee2, accumulator) { + var isArr = isArray(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object); + iteratee2 = getIteratee(iteratee2, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor() : []; + } else if (isObject2(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object2) { + return iteratee2(accumulator, value, index, object2); + }); + return accumulator; + } + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == "function" ? customizer : undefined2; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + function clamp(number, lower, upper) { + if (upper === undefined2) { + upper = lower; + lower = undefined2; + } + if (upper !== undefined2) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined2) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined2) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + function random(lower, upper, floating) { + if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined2; + } + if (floating === undefined2) { + if (typeof upper == "boolean") { + floating = upper; + upper = undefined2; + } else if (typeof lower == "boolean") { + floating = lower; + lower = undefined2; + } + } + if (lower === undefined2 && upper === undefined2) { + lower = 0; + upper = 1; + } else { + lower = toFinite(lower); + if (upper === undefined2) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin(lower + rand * (upper - lower + freeParseFloat("1e-" + ((rand + "").length - 1))), upper); + } + return baseRandom(lower, upper); + } + var camelCase = createCompounder(function(result2, word, index) { + word = word.toLowerCase(); + return result2 + (index ? capitalize(word) : word); + }); + function capitalize(string) { + return upperFirst(toString2(string).toLowerCase()); + } + function deburr(string) { + string = toString2(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ""); + } + function endsWith(string, target, position) { + string = toString2(string); + target = baseToString(target); + var length = string.length; + position = position === undefined2 ? length : baseClamp(toInteger(position), 0, length); + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + function escape2(string) { + string = toString2(string); + return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string; + } + function escapeRegExp(string) { + string = toString2(string); + return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string; + } + var kebabCase = createCompounder(function(result2, word, index) { + return result2 + (index ? "-" : "") + word.toLowerCase(); + }); + var lowerCase = createCompounder(function(result2, word, index) { + return result2 + (index ? " " : "") + word.toLowerCase(); + }); + var lowerFirst = createCaseFirst("toLowerCase"); + function pad(string, length, chars) { + string = toString2(string); + length = toInteger(length); + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars); + } + function padEnd(string, length, chars) { + string = toString2(string); + length = toInteger(length); + var strLength = length ? stringSize(string) : 0; + return length && strLength < length ? string + createPadding(length - strLength, chars) : string; + } + function padStart(string, length, chars) { + string = toString2(string); + length = toInteger(length); + var strLength = length ? stringSize(string) : 0; + return length && strLength < length ? createPadding(length - strLength, chars) + string : string; + } + function parseInt2(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString2(string).replace(reTrimStart, ""), radix || 0); + } + function repeat(string, n, guard) { + if (guard ? isIterateeCall(string, n, guard) : n === undefined2) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString2(string), n); + } + function replace() { + var args = arguments, string = toString2(args[0]); + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + var snakeCase = createCompounder(function(result2, word, index) { + return result2 + (index ? "_" : "") + word.toLowerCase(); + }); + function split(string, separator, limit) { + if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) { + separator = limit = undefined2; + } + limit = limit === undefined2 ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString2(string); + if (string && (typeof separator == "string" || separator != null && !isRegExp(separator))) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + var startCase = createCompounder(function(result2, word, index) { + return result2 + (index ? " " : "") + upperFirst(word); + }); + function startsWith(string, target, position) { + string = toString2(string); + position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length); + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + function template(string, options, guard) { + var settings = lodash.templateSettings; + if (guard && isIterateeCall(string, options, guard)) { + options = undefined2; + } + string = toString2(string); + options = assignInWith({}, options, settings, customDefaultsAssignIn); + var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys); + var isEscaping, isEvaluating, index = 0, interpolate = options.interpolate || reNoMatch, source = "__p += '"; + var reDelimiters = RegExp2( + (options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$", + "g" + ); + var sourceURL = "//# sourceURL=" + (hasOwnProperty.call(options, "sourceURL") ? (options.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++templateCounter + "]") + "\n"; + string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { + interpolateValue || (interpolateValue = esTemplateValue); + source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar); + if (escapeValue) { + isEscaping = true; + source += "' +\n__e(" + escapeValue + ") +\n'"; + } + if (evaluateValue) { + isEvaluating = true; + source += "';\n" + evaluateValue + ";\n__p += '"; + } + if (interpolateValue) { + source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; + } + index = offset + match.length; + return match; + }); + source += "';\n"; + var variable = hasOwnProperty.call(options, "variable") && options.variable; + if (!variable) { + source = "with (obj) {\n" + source + "\n}\n"; + } else if (reForbiddenIdentifierChars.test(variable)) { + throw new Error2(INVALID_TEMPL_VAR_ERROR_TEXT); + } + source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;"); + source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}"; + var result2 = attempt(function() { + return Function2(importsKeys, sourceURL + "return " + source).apply(undefined2, importsValues); + }); + result2.source = source; + if (isError2(result2)) { + throw result2; + } + return result2; + } + function toLower(value) { + return toString2(value).toLowerCase(); + } + function toUpper(value) { + return toString2(value).toUpperCase(); + } + function trim(string, chars, guard) { + string = toString2(string); + if (string && (guard || chars === undefined2)) { + return baseTrim(string); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1; + return castSlice(strSymbols, start, end).join(""); + } + function trimEnd(string, chars, guard) { + string = toString2(string); + if (string && (guard || chars === undefined2)) { + return string.slice(0, trimmedEndIndex(string) + 1); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; + return castSlice(strSymbols, 0, end).join(""); + } + function trimStart(string, chars, guard) { + string = toString2(string); + if (string && (guard || chars === undefined2)) { + return string.replace(reTrimStart, ""); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), start = charsStartIndex(strSymbols, stringToArray(chars)); + return castSlice(strSymbols, start).join(""); + } + function truncate(string, options) { + var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION; + if (isObject2(options)) { + var separator = "separator" in options ? options.separator : separator; + length = "length" in options ? toInteger(options.length) : length; + omission = "omission" in options ? baseToString(options.omission) : omission; + } + string = toString2(string); + var strLength = string.length; + if (hasUnicode(string)) { + var strSymbols = stringToArray(string); + strLength = strSymbols.length; + } + if (length >= strLength) { + return string; + } + var end = length - stringSize(omission); + if (end < 1) { + return omission; + } + var result2 = strSymbols ? castSlice(strSymbols, 0, end).join("") : string.slice(0, end); + if (separator === undefined2) { + return result2 + omission; + } + if (strSymbols) { + end += result2.length - end; + } + if (isRegExp(separator)) { + if (string.slice(end).search(separator)) { + var match, substring = result2; + if (!separator.global) { + separator = RegExp2(separator.source, toString2(reFlags.exec(separator)) + "g"); + } + separator.lastIndex = 0; + while (match = separator.exec(substring)) { + var newEnd = match.index; + } + result2 = result2.slice(0, newEnd === undefined2 ? end : newEnd); + } + } else if (string.indexOf(baseToString(separator), end) != end) { + var index = result2.lastIndexOf(separator); + if (index > -1) { + result2 = result2.slice(0, index); + } + } + return result2 + omission; + } + function unescape2(string) { + string = toString2(string); + return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string; + } + var upperCase = createCompounder(function(result2, word, index) { + return result2 + (index ? " " : "") + word.toUpperCase(); + }); + var upperFirst = createCaseFirst("toUpperCase"); + function words(string, pattern, guard) { + string = toString2(string); + pattern = guard ? undefined2 : pattern; + if (pattern === undefined2) { + return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); + } + return string.match(pattern) || []; + } + var attempt = baseRest(function(func, args) { + try { + return apply(func, undefined2, args); + } catch (e) { + return isError2(e) ? e : new Error2(e); + } + }); + var bindAll = flatRest(function(object, methodNames) { + arrayEach(methodNames, function(key) { + key = toKey(key); + baseAssignValue(object, key, bind(object[key], object)); + }); + return object; + }); + function cond(pairs) { + var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee(); + pairs = !length ? [] : arrayMap(pairs, function(pair) { + if (typeof pair[1] != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + return [toIteratee(pair[0]), pair[1]]; + }); + return baseRest(function(args) { + var index = -1; + while (++index < length) { + var pair = pairs[index]; + if (apply(pair[0], this, args)) { + return apply(pair[1], this, args); + } + } + }); + } + function conforms(source) { + return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); + } + function constant(value) { + return function() { + return value; + }; + } + function defaultTo(value, defaultValue) { + return value == null || value !== value ? defaultValue : value; + } + var flow = createFlow(); + var flowRight = createFlow(true); + function identity(value) { + return value; + } + function iteratee(func) { + return baseIteratee(typeof func == "function" ? func : baseClone(func, CLONE_DEEP_FLAG)); + } + function matches(source) { + return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); + } + function matchesProperty(path, srcValue) { + return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); + } + var method = baseRest(function(path, args) { + return function(object) { + return baseInvoke(object, path, args); + }; + }); + var methodOf = baseRest(function(object, args) { + return function(path) { + return baseInvoke(object, path, args); + }; + }); + function mixin(object, source, options) { + var props = keys(source), methodNames = baseFunctions(source, props); + if (options == null && !(isObject2(source) && (methodNames.length || !props.length))) { + options = source; + source = object; + object = this; + methodNames = baseFunctions(source, keys(source)); + } + var chain2 = !(isObject2(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object); + arrayEach(methodNames, function(methodName) { + var func = source[methodName]; + object[methodName] = func; + if (isFunc) { + object.prototype[methodName] = function() { + var chainAll = this.__chain__; + if (chain2 || chainAll) { + var result2 = object(this.__wrapped__), actions = result2.__actions__ = copyArray(this.__actions__); + actions.push({ "func": func, "args": arguments, "thisArg": object }); + result2.__chain__ = chainAll; + return result2; + } + return func.apply(object, arrayPush([this.value()], arguments)); + }; + } + }); + return object; + } + function noConflict() { + if (root._ === this) { + root._ = oldDash; + } + return this; + } + function noop() { + } + function nthArg(n) { + n = toInteger(n); + return baseRest(function(args) { + return baseNth(args, n); + }); + } + var over = createOver(arrayMap); + var overEvery = createOver(arrayEvery); + var overSome = createOver(arraySome); + function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); + } + function propertyOf(object) { + return function(path) { + return object == null ? undefined2 : baseGet(object, path); + }; + } + var range = createRange(); + var rangeRight = createRange(true); + function stubArray() { + return []; + } + function stubFalse() { + return false; + } + function stubObject() { + return {}; + } + function stubString() { + return ""; + } + function stubTrue() { + return true; + } + function times(n, iteratee2) { + n = toInteger(n); + if (n < 1 || n > MAX_SAFE_INTEGER) { + return []; + } + var index = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH); + iteratee2 = getIteratee(iteratee2); + n -= MAX_ARRAY_LENGTH; + var result2 = baseTimes(length, iteratee2); + while (++index < n) { + iteratee2(index); + } + return result2; + } + function toPath(value) { + if (isArray(value)) { + return arrayMap(value, toKey); + } + return isSymbol(value) ? [value] : copyArray(stringToPath(toString2(value))); + } + function uniqueId(prefix) { + var id = ++idCounter; + return toString2(prefix) + id; + } + var add = createMathOperation(function(augend, addend) { + return augend + addend; + }, 0); + var ceil = createRound("ceil"); + var divide = createMathOperation(function(dividend, divisor) { + return dividend / divisor; + }, 1); + var floor = createRound("floor"); + function max(array) { + return array && array.length ? baseExtremum(array, identity, baseGt) : undefined2; + } + function maxBy(array, iteratee2) { + return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseGt) : undefined2; + } + function mean(array) { + return baseMean(array, identity); + } + function meanBy(array, iteratee2) { + return baseMean(array, getIteratee(iteratee2, 2)); + } + function min(array) { + return array && array.length ? baseExtremum(array, identity, baseLt) : undefined2; + } + function minBy(array, iteratee2) { + return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseLt) : undefined2; + } + var multiply = createMathOperation(function(multiplier, multiplicand) { + return multiplier * multiplicand; + }, 1); + var round = createRound("round"); + var subtract = createMathOperation(function(minuend, subtrahend) { + return minuend - subtrahend; + }, 0); + function sum(array) { + return array && array.length ? baseSum(array, identity) : 0; + } + function sumBy(array, iteratee2) { + return array && array.length ? baseSum(array, getIteratee(iteratee2, 2)) : 0; + } + lodash.after = after; + lodash.ary = ary; + lodash.assign = assign; + lodash.assignIn = assignIn; + lodash.assignInWith = assignInWith; + lodash.assignWith = assignWith; + lodash.at = at; + lodash.before = before; + lodash.bind = bind; + lodash.bindAll = bindAll; + lodash.bindKey = bindKey; + lodash.castArray = castArray; + lodash.chain = chain; + lodash.chunk = chunk; + lodash.compact = compact; + lodash.concat = concat; + lodash.cond = cond; + lodash.conforms = conforms; + lodash.constant = constant; + lodash.countBy = countBy; + lodash.create = create; + lodash.curry = curry; + lodash.curryRight = curryRight; + lodash.debounce = debounce; + lodash.defaults = defaults; + lodash.defaultsDeep = defaultsDeep; + lodash.defer = defer; + lodash.delay = delay; + lodash.difference = difference; + lodash.differenceBy = differenceBy; + lodash.differenceWith = differenceWith; + lodash.drop = drop; + lodash.dropRight = dropRight; + lodash.dropRightWhile = dropRightWhile; + lodash.dropWhile = dropWhile; + lodash.fill = fill; + lodash.filter = filter; + lodash.flatMap = flatMap; + lodash.flatMapDeep = flatMapDeep; + lodash.flatMapDepth = flatMapDepth; + lodash.flatten = flatten; + lodash.flattenDeep = flattenDeep; + lodash.flattenDepth = flattenDepth; + lodash.flip = flip; + lodash.flow = flow; + lodash.flowRight = flowRight; + lodash.fromPairs = fromPairs; + lodash.functions = functions; + lodash.functionsIn = functionsIn; + lodash.groupBy = groupBy; + lodash.initial = initial; + lodash.intersection = intersection; + lodash.intersectionBy = intersectionBy; + lodash.intersectionWith = intersectionWith; + lodash.invert = invert; + lodash.invertBy = invertBy; + lodash.invokeMap = invokeMap; + lodash.iteratee = iteratee; + lodash.keyBy = keyBy; + lodash.keys = keys; + lodash.keysIn = keysIn; + lodash.map = map; + lodash.mapKeys = mapKeys; + lodash.mapValues = mapValues; + lodash.matches = matches; + lodash.matchesProperty = matchesProperty; + lodash.memoize = memoize; + lodash.merge = merge; + lodash.mergeWith = mergeWith; + lodash.method = method; + lodash.methodOf = methodOf; + lodash.mixin = mixin; + lodash.negate = negate; + lodash.nthArg = nthArg; + lodash.omit = omit; + lodash.omitBy = omitBy; + lodash.once = once; + lodash.orderBy = orderBy; + lodash.over = over; + lodash.overArgs = overArgs; + lodash.overEvery = overEvery; + lodash.overSome = overSome; + lodash.partial = partial; + lodash.partialRight = partialRight; + lodash.partition = partition; + lodash.pick = pick; + lodash.pickBy = pickBy; + lodash.property = property; + lodash.propertyOf = propertyOf; + lodash.pull = pull; + lodash.pullAll = pullAll; + lodash.pullAllBy = pullAllBy; + lodash.pullAllWith = pullAllWith; + lodash.pullAt = pullAt; + lodash.range = range; + lodash.rangeRight = rangeRight; + lodash.rearg = rearg; + lodash.reject = reject; + lodash.remove = remove; + lodash.rest = rest; + lodash.reverse = reverse; + lodash.sampleSize = sampleSize; + lodash.set = set; + lodash.setWith = setWith; + lodash.shuffle = shuffle; + lodash.slice = slice; + lodash.sortBy = sortBy; + lodash.sortedUniq = sortedUniq; + lodash.sortedUniqBy = sortedUniqBy; + lodash.split = split; + lodash.spread = spread; + lodash.tail = tail; + lodash.take = take; + lodash.takeRight = takeRight; + lodash.takeRightWhile = takeRightWhile; + lodash.takeWhile = takeWhile; + lodash.tap = tap; + lodash.throttle = throttle; + lodash.thru = thru; + lodash.toArray = toArray; + lodash.toPairs = toPairs; + lodash.toPairsIn = toPairsIn; + lodash.toPath = toPath; + lodash.toPlainObject = toPlainObject; + lodash.transform = transform; + lodash.unary = unary; + lodash.union = union; + lodash.unionBy = unionBy; + lodash.unionWith = unionWith; + lodash.uniq = uniq; + lodash.uniqBy = uniqBy; + lodash.uniqWith = uniqWith; + lodash.unset = unset; + lodash.unzip = unzip; + lodash.unzipWith = unzipWith; + lodash.update = update; + lodash.updateWith = updateWith; + lodash.values = values; + lodash.valuesIn = valuesIn; + lodash.without = without; + lodash.words = words; + lodash.wrap = wrap; + lodash.xor = xor; + lodash.xorBy = xorBy; + lodash.xorWith = xorWith; + lodash.zip = zip; + lodash.zipObject = zipObject; + lodash.zipObjectDeep = zipObjectDeep; + lodash.zipWith = zipWith; + lodash.entries = toPairs; + lodash.entriesIn = toPairsIn; + lodash.extend = assignIn; + lodash.extendWith = assignInWith; + mixin(lodash, lodash); + lodash.add = add; + lodash.attempt = attempt; + lodash.camelCase = camelCase; + lodash.capitalize = capitalize; + lodash.ceil = ceil; + lodash.clamp = clamp; + lodash.clone = clone; + lodash.cloneDeep = cloneDeep; + lodash.cloneDeepWith = cloneDeepWith; + lodash.cloneWith = cloneWith; + lodash.conformsTo = conformsTo; + lodash.deburr = deburr; + lodash.defaultTo = defaultTo; + lodash.divide = divide; + lodash.endsWith = endsWith; + lodash.eq = eq; + lodash.escape = escape2; + lodash.escapeRegExp = escapeRegExp; + lodash.every = every; + lodash.find = find; + lodash.findIndex = findIndex; + lodash.findKey = findKey; + lodash.findLast = findLast; + lodash.findLastIndex = findLastIndex; + lodash.findLastKey = findLastKey; + lodash.floor = floor; + lodash.forEach = forEach; + lodash.forEachRight = forEachRight; + lodash.forIn = forIn; + lodash.forInRight = forInRight; + lodash.forOwn = forOwn; + lodash.forOwnRight = forOwnRight; + lodash.get = get; + lodash.gt = gt; + lodash.gte = gte; + lodash.has = has; + lodash.hasIn = hasIn; + lodash.head = head; + lodash.identity = identity; + lodash.includes = includes; + lodash.indexOf = indexOf; + lodash.inRange = inRange; + lodash.invoke = invoke; + lodash.isArguments = isArguments; + lodash.isArray = isArray; + lodash.isArrayBuffer = isArrayBuffer; + lodash.isArrayLike = isArrayLike; + lodash.isArrayLikeObject = isArrayLikeObject; + lodash.isBoolean = isBoolean; + lodash.isBuffer = isBuffer; + lodash.isDate = isDate; + lodash.isElement = isElement; + lodash.isEmpty = isEmpty; + lodash.isEqual = isEqual; + lodash.isEqualWith = isEqualWith; + lodash.isError = isError2; + lodash.isFinite = isFinite2; + lodash.isFunction = isFunction; + lodash.isInteger = isInteger; + lodash.isLength = isLength; + lodash.isMap = isMap; + lodash.isMatch = isMatch; + lodash.isMatchWith = isMatchWith; + lodash.isNaN = isNaN2; + lodash.isNative = isNative; + lodash.isNil = isNil; + lodash.isNull = isNull; + lodash.isNumber = isNumber; + lodash.isObject = isObject2; + lodash.isObjectLike = isObjectLike; + lodash.isPlainObject = isPlainObject; + lodash.isRegExp = isRegExp; + lodash.isSafeInteger = isSafeInteger; + lodash.isSet = isSet; + lodash.isString = isString; + lodash.isSymbol = isSymbol; + lodash.isTypedArray = isTypedArray; + lodash.isUndefined = isUndefined; + lodash.isWeakMap = isWeakMap; + lodash.isWeakSet = isWeakSet; + lodash.join = join; + lodash.kebabCase = kebabCase; + lodash.last = last; + lodash.lastIndexOf = lastIndexOf; + lodash.lowerCase = lowerCase; + lodash.lowerFirst = lowerFirst; + lodash.lt = lt; + lodash.lte = lte; + lodash.max = max; + lodash.maxBy = maxBy; + lodash.mean = mean; + lodash.meanBy = meanBy; + lodash.min = min; + lodash.minBy = minBy; + lodash.stubArray = stubArray; + lodash.stubFalse = stubFalse; + lodash.stubObject = stubObject; + lodash.stubString = stubString; + lodash.stubTrue = stubTrue; + lodash.multiply = multiply; + lodash.nth = nth; + lodash.noConflict = noConflict; + lodash.noop = noop; + lodash.now = now; + lodash.pad = pad; + lodash.padEnd = padEnd; + lodash.padStart = padStart; + lodash.parseInt = parseInt2; + lodash.random = random; + lodash.reduce = reduce; + lodash.reduceRight = reduceRight; + lodash.repeat = repeat; + lodash.replace = replace; + lodash.result = result; + lodash.round = round; + lodash.runInContext = runInContext2; + lodash.sample = sample; + lodash.size = size; + lodash.snakeCase = snakeCase; + lodash.some = some; + lodash.sortedIndex = sortedIndex; + lodash.sortedIndexBy = sortedIndexBy; + lodash.sortedIndexOf = sortedIndexOf; + lodash.sortedLastIndex = sortedLastIndex; + lodash.sortedLastIndexBy = sortedLastIndexBy; + lodash.sortedLastIndexOf = sortedLastIndexOf; + lodash.startCase = startCase; + lodash.startsWith = startsWith; + lodash.subtract = subtract; + lodash.sum = sum; + lodash.sumBy = sumBy; + lodash.template = template; + lodash.times = times; + lodash.toFinite = toFinite; + lodash.toInteger = toInteger; + lodash.toLength = toLength; + lodash.toLower = toLower; + lodash.toNumber = toNumber; + lodash.toSafeInteger = toSafeInteger; + lodash.toString = toString2; + lodash.toUpper = toUpper; + lodash.trim = trim; + lodash.trimEnd = trimEnd; + lodash.trimStart = trimStart; + lodash.truncate = truncate; + lodash.unescape = unescape2; + lodash.uniqueId = uniqueId; + lodash.upperCase = upperCase; + lodash.upperFirst = upperFirst; + lodash.each = forEach; + lodash.eachRight = forEachRight; + lodash.first = head; + mixin(lodash, (function() { + var source = {}; + baseForOwn(lodash, function(func, methodName) { + if (!hasOwnProperty.call(lodash.prototype, methodName)) { + source[methodName] = func; + } + }); + return source; + })(), { "chain": false }); + lodash.VERSION = VERSION; + arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) { + lodash[methodName].placeholder = lodash; + }); + arrayEach(["drop", "take"], function(methodName, index) { + LazyWrapper.prototype[methodName] = function(n) { + n = n === undefined2 ? 1 : nativeMax(toInteger(n), 0); + var result2 = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone(); + if (result2.__filtered__) { + result2.__takeCount__ = nativeMin(n, result2.__takeCount__); + } else { + result2.__views__.push({ + "size": nativeMin(n, MAX_ARRAY_LENGTH), + "type": methodName + (result2.__dir__ < 0 ? "Right" : "") + }); + } + return result2; + }; + LazyWrapper.prototype[methodName + "Right"] = function(n) { + return this.reverse()[methodName](n).reverse(); + }; + }); + arrayEach(["filter", "map", "takeWhile"], function(methodName, index) { + var type = index + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG; + LazyWrapper.prototype[methodName] = function(iteratee2) { + var result2 = this.clone(); + result2.__iteratees__.push({ + "iteratee": getIteratee(iteratee2, 3), + "type": type + }); + result2.__filtered__ = result2.__filtered__ || isFilter; + return result2; + }; + }); + arrayEach(["head", "last"], function(methodName, index) { + var takeName = "take" + (index ? "Right" : ""); + LazyWrapper.prototype[methodName] = function() { + return this[takeName](1).value()[0]; + }; + }); + arrayEach(["initial", "tail"], function(methodName, index) { + var dropName = "drop" + (index ? "" : "Right"); + LazyWrapper.prototype[methodName] = function() { + return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1); + }; + }); + LazyWrapper.prototype.compact = function() { + return this.filter(identity); + }; + LazyWrapper.prototype.find = function(predicate) { + return this.filter(predicate).head(); + }; + LazyWrapper.prototype.findLast = function(predicate) { + return this.reverse().find(predicate); + }; + LazyWrapper.prototype.invokeMap = baseRest(function(path, args) { + if (typeof path == "function") { + return new LazyWrapper(this); + } + return this.map(function(value) { + return baseInvoke(value, path, args); + }); + }); + LazyWrapper.prototype.reject = function(predicate) { + return this.filter(negate(getIteratee(predicate))); + }; + LazyWrapper.prototype.slice = function(start, end) { + start = toInteger(start); + var result2 = this; + if (result2.__filtered__ && (start > 0 || end < 0)) { + return new LazyWrapper(result2); + } + if (start < 0) { + result2 = result2.takeRight(-start); + } else if (start) { + result2 = result2.drop(start); + } + if (end !== undefined2) { + end = toInteger(end); + result2 = end < 0 ? result2.dropRight(-end) : result2.take(end - start); + } + return result2; + }; + LazyWrapper.prototype.takeRightWhile = function(predicate) { + return this.reverse().takeWhile(predicate).reverse(); + }; + LazyWrapper.prototype.toArray = function() { + return this.take(MAX_ARRAY_LENGTH); + }; + baseForOwn(LazyWrapper.prototype, function(func, methodName) { + var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), isTaker = /^(?:head|last)$/.test(methodName), lodashFunc = lodash[isTaker ? "take" + (methodName == "last" ? "Right" : "") : methodName], retUnwrapped = isTaker || /^find/.test(methodName); + if (!lodashFunc) { + return; + } + lodash.prototype[methodName] = function() { + var value = this.__wrapped__, args = isTaker ? [1] : arguments, isLazy = value instanceof LazyWrapper, iteratee2 = args[0], useLazy = isLazy || isArray(value); + var interceptor = function(value2) { + var result3 = lodashFunc.apply(lodash, arrayPush([value2], args)); + return isTaker && chainAll ? result3[0] : result3; + }; + if (useLazy && checkIteratee && typeof iteratee2 == "function" && iteratee2.length != 1) { + isLazy = useLazy = false; + } + var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid; + if (!retUnwrapped && useLazy) { + value = onlyLazy ? value : new LazyWrapper(this); + var result2 = func.apply(value, args); + result2.__actions__.push({ "func": thru, "args": [interceptor], "thisArg": undefined2 }); + return new LodashWrapper(result2, chainAll); + } + if (isUnwrapped && onlyLazy) { + return func.apply(this, args); + } + result2 = this.thru(interceptor); + return isUnwrapped ? isTaker ? result2.value()[0] : result2.value() : result2; + }; + }); + arrayEach(["pop", "push", "shift", "sort", "splice", "unshift"], function(methodName) { + var func = arrayProto[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? "tap" : "thru", retUnwrapped = /^(?:pop|shift)$/.test(methodName); + lodash.prototype[methodName] = function() { + var args = arguments; + if (retUnwrapped && !this.__chain__) { + var value = this.value(); + return func.apply(isArray(value) ? value : [], args); + } + return this[chainName](function(value2) { + return func.apply(isArray(value2) ? value2 : [], args); + }); + }; + }); + baseForOwn(LazyWrapper.prototype, function(func, methodName) { + var lodashFunc = lodash[methodName]; + if (lodashFunc) { + var key = lodashFunc.name + ""; + if (!hasOwnProperty.call(realNames, key)) { + realNames[key] = []; + } + realNames[key].push({ "name": methodName, "func": lodashFunc }); + } + }); + realNames[createHybrid(undefined2, WRAP_BIND_KEY_FLAG).name] = [{ + "name": "wrapper", + "func": undefined2 + }]; + LazyWrapper.prototype.clone = lazyClone; + LazyWrapper.prototype.reverse = lazyReverse; + LazyWrapper.prototype.value = lazyValue; + lodash.prototype.at = wrapperAt; + lodash.prototype.chain = wrapperChain; + lodash.prototype.commit = wrapperCommit; + lodash.prototype.next = wrapperNext; + lodash.prototype.plant = wrapperPlant; + lodash.prototype.reverse = wrapperReverse; + lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; + lodash.prototype.first = lodash.prototype.head; + if (symIterator) { + lodash.prototype[symIterator] = wrapperToIterator; + } + return lodash; + }); + var _2 = runInContext(); + if (typeof define == "function" && typeof define.amd == "object" && define.amd) { + root._ = _2; + define(function() { + return _2; + }); + } else if (freeModule) { + (freeModule.exports = _2)._ = _2; + freeExports._ = _2; + } else { + root._ = _2; + } + }).call(exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/constants.js +var require_constants8 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DECORATORS = exports2.DECORATORS_PREFIX = void 0; + exports2.DECORATORS_PREFIX = "swagger"; + exports2.DECORATORS = { + API_OPERATION: `${exports2.DECORATORS_PREFIX}/apiOperation`, + API_RESPONSE: `${exports2.DECORATORS_PREFIX}/apiResponse`, + API_PRODUCES: `${exports2.DECORATORS_PREFIX}/apiProduces`, + API_CONSUMES: `${exports2.DECORATORS_PREFIX}/apiConsumes`, + API_TAGS: `${exports2.DECORATORS_PREFIX}/apiUseTags`, + API_PARAMETERS: `${exports2.DECORATORS_PREFIX}/apiParameters`, + API_HEADERS: `${exports2.DECORATORS_PREFIX}/apiHeaders`, + API_MODEL_PROPERTIES: `${exports2.DECORATORS_PREFIX}/apiModelProperties`, + API_MODEL_PROPERTIES_ARRAY: `${exports2.DECORATORS_PREFIX}/apiModelPropertiesArray`, + API_SECURITY: `${exports2.DECORATORS_PREFIX}/apiSecurity`, + API_EXCLUDE_ENDPOINT: `${exports2.DECORATORS_PREFIX}/apiExcludeEndpoint`, + API_EXCLUDE_CONTROLLER: `${exports2.DECORATORS_PREFIX}/apiExcludeController`, + API_EXTRA_MODELS: `${exports2.DECORATORS_PREFIX}/apiExtraModels`, + API_EXTENSION: `${exports2.DECORATORS_PREFIX}/apiExtension` + }; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/extend-metadata.util.js +var require_extend_metadata_util2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/extend-metadata.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.extendMetadata = void 0; + require_Reflect(); + function extendMetadata(metadata, metakey, target) { + const existingMetadata = Reflect.getMetadata(metakey, target); + if (!existingMetadata) { + return metadata; + } + return existingMetadata.concat(metadata); + } + exports2.extendMetadata = extendMetadata; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-security.decorator.js +var require_api_security_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-security.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiSecurity = void 0; + var lodash_1 = require_lodash(); + var constants_1 = require_constants8(); + var extend_metadata_util_1 = require_extend_metadata_util2(); + function ApiSecurity(name, requirements = []) { + let metadata; + if ((0, lodash_1.isString)(name)) { + metadata = [{ [name]: requirements }]; + } else { + metadata = [name]; + } + return (target, key, descriptor) => { + if (descriptor) { + metadata = (0, extend_metadata_util_1.extendMetadata)(metadata, constants_1.DECORATORS.API_SECURITY, descriptor.value); + Reflect.defineMetadata(constants_1.DECORATORS.API_SECURITY, metadata, descriptor.value); + return descriptor; + } + metadata = (0, extend_metadata_util_1.extendMetadata)(metadata, constants_1.DECORATORS.API_SECURITY, target); + Reflect.defineMetadata(constants_1.DECORATORS.API_SECURITY, metadata, target); + return target; + }; + } + exports2.ApiSecurity = ApiSecurity; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-basic.decorator.js +var require_api_basic_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-basic.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiBasicAuth = void 0; + var api_security_decorator_1 = require_api_security_decorator(); + function ApiBasicAuth(name = "basic") { + return (0, api_security_decorator_1.ApiSecurity)(name); + } + exports2.ApiBasicAuth = ApiBasicAuth; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-bearer.decorator.js +var require_api_bearer_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-bearer.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiBearerAuth = void 0; + var api_security_decorator_1 = require_api_security_decorator(); + function ApiBearerAuth(name = "bearer") { + return (0, api_security_decorator_1.ApiSecurity)(name); + } + exports2.ApiBearerAuth = ApiBearerAuth; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/enum.utils.js +var require_enum_utils = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/enum.utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isEnumMetadata = exports2.isEnumDefined = exports2.isEnumArray = exports2.addEnumSchema = exports2.addEnumArraySchema = exports2.getEnumType = exports2.getEnumValues = void 0; + var lodash_1 = require_lodash(); + function getEnumValues(enumType) { + if (typeof enumType === "function") { + return getEnumValues(enumType()); + } + if (Array.isArray(enumType)) { + return enumType; + } + if (typeof enumType !== "object") { + return []; + } + const numericValues = Object.values(enumType).filter((value) => typeof value === "number").map((value) => value.toString()); + return Object.keys(enumType).filter((key) => !numericValues.includes(key)).map((key) => enumType[key]); + } + exports2.getEnumValues = getEnumValues; + function getEnumType(values) { + const hasString = values.filter(lodash_1.isString).length > 0; + return hasString ? "string" : "number"; + } + exports2.getEnumType = getEnumType; + function addEnumArraySchema(paramDefinition, decoratorOptions) { + const paramSchema = paramDefinition.schema || {}; + paramDefinition.schema = paramSchema; + paramSchema.type = "array"; + delete paramDefinition.isArray; + const enumValues = getEnumValues(decoratorOptions.enum); + paramSchema.items = { + type: getEnumType(enumValues), + enum: enumValues + }; + if (decoratorOptions.enumName) { + paramDefinition.enumName = decoratorOptions.enumName; + } + } + exports2.addEnumArraySchema = addEnumArraySchema; + function addEnumSchema(paramDefinition, decoratorOptions) { + const paramSchema = paramDefinition.schema || {}; + const enumValues = getEnumValues(decoratorOptions.enum); + paramDefinition.schema = paramSchema; + paramSchema.enum = enumValues; + paramSchema.type = getEnumType(enumValues); + if (decoratorOptions.enumName) { + paramDefinition.enumName = decoratorOptions.enumName; + } + } + exports2.addEnumSchema = addEnumSchema; + var isEnumArray = (obj2) => obj2.isArray && obj2.enum; + exports2.isEnumArray = isEnumArray; + var isEnumDefined = (obj2) => obj2.enum; + exports2.isEnumDefined = isEnumDefined; + var isEnumMetadata = (metadata) => { + var _a; + return metadata.enum || metadata.isArray && ((_a = metadata.items) === null || _a === void 0 ? void 0 : _a["enum"]); + }; + exports2.isEnumMetadata = isEnumMetadata; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/plugin/plugin-constants.js +var require_plugin_constants = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/plugin/plugin-constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.METADATA_FACTORY_NAME = exports2.OPENAPI_PACKAGE_NAME = exports2.OPENAPI_NAMESPACE = void 0; + exports2.OPENAPI_NAMESPACE = "openapi"; + exports2.OPENAPI_PACKAGE_NAME = "@nestjs/swagger"; + exports2.METADATA_FACTORY_NAME = "_OPENAPI_METADATA_FACTORY"; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/helpers.js +var require_helpers2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getTypeIsArrayTuple = exports2.createParamDecorator = exports2.createMixedDecorator = exports2.createPropertyDecorator = exports2.createClassDecorator = exports2.createMethodDecorator = void 0; + var lodash_1 = require_lodash(); + var constants_1 = require_constants8(); + var plugin_constants_1 = require_plugin_constants(); + var constants_2 = require_constants(); + var shared_utils_1 = require_shared_utils(); + function createMethodDecorator(metakey, metadata, { overrideExisting } = { overrideExisting: true }) { + return (target, key, descriptor) => { + if (typeof metadata === "object") { + const prevValue = Reflect.getMetadata(metakey, descriptor.value); + if (prevValue && !overrideExisting) { + return descriptor; + } + Reflect.defineMetadata(metakey, Object.assign(Object.assign({}, prevValue), metadata), descriptor.value); + return descriptor; + } + Reflect.defineMetadata(metakey, metadata, descriptor.value); + return descriptor; + }; + } + exports2.createMethodDecorator = createMethodDecorator; + function createClassDecorator(metakey, metadata = []) { + return (target) => { + const prevValue = Reflect.getMetadata(metakey, target) || []; + Reflect.defineMetadata(metakey, [...prevValue, ...metadata], target); + return target; + }; + } + exports2.createClassDecorator = createClassDecorator; + function createPropertyDecorator(metakey, metadata, overrideExisting = true) { + return (target, propertyKey) => { + var _a, _b, _c, _d; + const properties = Reflect.getMetadata(constants_1.DECORATORS.API_MODEL_PROPERTIES_ARRAY, target) || []; + const key = `:${propertyKey}`; + if (!properties.includes(key)) { + Reflect.defineMetadata(constants_1.DECORATORS.API_MODEL_PROPERTIES_ARRAY, [...properties, `:${propertyKey}`], target); + } + const existingMetadata = Reflect.getMetadata(metakey, target, propertyKey); + if (existingMetadata) { + const newMetadata = (0, lodash_1.pickBy)(metadata, (0, lodash_1.negate)(lodash_1.isUndefined)); + const metadataToSave = overrideExisting ? Object.assign(Object.assign({}, existingMetadata), newMetadata) : Object.assign(Object.assign({}, newMetadata), existingMetadata); + Reflect.defineMetadata(metakey, metadataToSave, target, propertyKey); + } else { + const type = (_d = (_c = (_b = (_a = target === null || target === void 0 ? void 0 : target.constructor) === null || _a === void 0 ? void 0 : _a[plugin_constants_1.METADATA_FACTORY_NAME]) === null || _b === void 0 ? void 0 : _b.call(_a)[propertyKey]) === null || _c === void 0 ? void 0 : _c.type) !== null && _d !== void 0 ? _d : Reflect.getMetadata("design:type", target, propertyKey); + Reflect.defineMetadata(metakey, Object.assign({ type }, (0, lodash_1.pickBy)(metadata, (0, lodash_1.negate)(lodash_1.isUndefined))), target, propertyKey); + } + }; + } + exports2.createPropertyDecorator = createPropertyDecorator; + function createMixedDecorator(metakey, metadata) { + return (target, key, descriptor) => { + if (descriptor) { + let metadatas; + if (Array.isArray(metadata)) { + const previousMetadata = Reflect.getMetadata(metakey, descriptor.value) || []; + metadatas = [...previousMetadata, ...metadata]; + } else { + const previousMetadata = Reflect.getMetadata(metakey, descriptor.value) || {}; + metadatas = Object.assign(Object.assign({}, previousMetadata), metadata); + } + Reflect.defineMetadata(metakey, metadatas, descriptor.value); + return descriptor; + } + Reflect.defineMetadata(metakey, metadata, target); + return target; + }; + } + exports2.createMixedDecorator = createMixedDecorator; + function createParamDecorator(metadata, initial) { + return (target, key, descriptor) => { + const paramOptions = Object.assign(Object.assign({}, initial), (0, lodash_1.pickBy)(metadata, (0, lodash_1.negate)(lodash_1.isUndefined))); + if (descriptor) { + const parameters = Reflect.getMetadata(constants_1.DECORATORS.API_PARAMETERS, descriptor.value) || []; + Reflect.defineMetadata(constants_1.DECORATORS.API_PARAMETERS, [...parameters, paramOptions], descriptor.value); + return descriptor; + } + if (typeof target === "object") { + return target; + } + const propertyKeys = Object.getOwnPropertyNames(target.prototype); + for (const propertyKey of propertyKeys) { + if ((0, shared_utils_1.isConstructor)(propertyKey)) { + continue; + } + const methodDescriptor = Object.getOwnPropertyDescriptor(target.prototype, propertyKey); + if (!methodDescriptor) { + continue; + } + const isApiMethod = Reflect.hasMetadata(constants_2.METHOD_METADATA, methodDescriptor.value); + if (!isApiMethod) { + continue; + } + const parameters = Reflect.getMetadata(constants_1.DECORATORS.API_PARAMETERS, methodDescriptor.value) || []; + Reflect.defineMetadata(constants_1.DECORATORS.API_PARAMETERS, [...parameters, paramOptions], methodDescriptor.value); + } + }; + } + exports2.createParamDecorator = createParamDecorator; + function getTypeIsArrayTuple(input, isArrayFlag) { + if (!input) { + return [input, isArrayFlag]; + } + if (isArrayFlag) { + return [input, isArrayFlag]; + } + const isInputArray = (0, lodash_1.isArray)(input); + const type = isInputArray ? input[0] : input; + return [type, isInputArray]; + } + exports2.getTypeIsArrayTuple = getTypeIsArrayTuple; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-body.decorator.js +var require_api_body_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-body.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiBody = void 0; + var lodash_1 = require_lodash(); + var enum_utils_1 = require_enum_utils(); + var helpers_1 = require_helpers2(); + var defaultBodyMetadata = { + type: String, + required: true + }; + function ApiBody(options) { + const [type, isArray] = (0, helpers_1.getTypeIsArrayTuple)(options.type, options.isArray); + const param = Object.assign(Object.assign({ in: "body" }, (0, lodash_1.omit)(options, "enum")), { + type, + isArray + }); + if ((0, enum_utils_1.isEnumArray)(options)) { + (0, enum_utils_1.addEnumArraySchema)(param, options); + } else if ((0, enum_utils_1.isEnumDefined)(options)) { + (0, enum_utils_1.addEnumSchema)(param, options); + } + return (0, helpers_1.createParamDecorator)(param, defaultBodyMetadata); + } + exports2.ApiBody = ApiBody; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-consumes.decorator.js +var require_api_consumes_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-consumes.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiConsumes = void 0; + var constants_1 = require_constants8(); + var helpers_1 = require_helpers2(); + function ApiConsumes(...mimeTypes) { + return (0, helpers_1.createMixedDecorator)(constants_1.DECORATORS.API_CONSUMES, mimeTypes); + } + exports2.ApiConsumes = ApiConsumes; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-cookie.decorator.js +var require_api_cookie_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-cookie.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiCookieAuth = void 0; + var api_security_decorator_1 = require_api_security_decorator(); + function ApiCookieAuth(name = "cookie") { + return (0, api_security_decorator_1.ApiSecurity)(name); + } + exports2.ApiCookieAuth = ApiCookieAuth; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-exclude-endpoint.decorator.js +var require_api_exclude_endpoint_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-exclude-endpoint.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiExcludeEndpoint = void 0; + var constants_1 = require_constants8(); + var helpers_1 = require_helpers2(); + function ApiExcludeEndpoint(disable = true) { + return (0, helpers_1.createMethodDecorator)(constants_1.DECORATORS.API_EXCLUDE_ENDPOINT, { + disable + }); + } + exports2.ApiExcludeEndpoint = ApiExcludeEndpoint; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-exclude-controller.decorator.js +var require_api_exclude_controller_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-exclude-controller.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiExcludeController = void 0; + var constants_1 = require_constants8(); + var helpers_1 = require_helpers2(); + function ApiExcludeController(disable = true) { + return (0, helpers_1.createClassDecorator)(constants_1.DECORATORS.API_EXCLUDE_CONTROLLER, [disable]); + } + exports2.ApiExcludeController = ApiExcludeController; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-extra-models.decorator.js +var require_api_extra_models_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-extra-models.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiExtraModels = void 0; + var constants_1 = require_constants8(); + function ApiExtraModels(...models) { + return (target, key, descriptor) => { + if (descriptor) { + const extraModels2 = Reflect.getMetadata(constants_1.DECORATORS.API_EXTRA_MODELS, descriptor.value) || []; + Reflect.defineMetadata(constants_1.DECORATORS.API_EXTRA_MODELS, [...extraModels2, ...models], descriptor.value); + return descriptor; + } + const extraModels = Reflect.getMetadata(constants_1.DECORATORS.API_EXTRA_MODELS, target) || []; + Reflect.defineMetadata(constants_1.DECORATORS.API_EXTRA_MODELS, [...extraModels, ...models], target); + return target; + }; + } + exports2.ApiExtraModels = ApiExtraModels; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-header.decorator.js +var require_api_header_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-header.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiHeaders = exports2.ApiHeader = void 0; + var lodash_1 = require_lodash(); + var constants_1 = require_constants8(); + var enum_utils_1 = require_enum_utils(); + var helpers_1 = require_helpers2(); + var defaultHeaderOptions = { + name: "" + }; + function ApiHeader(options) { + const param = (0, lodash_1.pickBy)({ + name: (0, lodash_1.isNil)(options.name) ? defaultHeaderOptions.name : options.name, + in: "header", + description: options.description, + required: options.required, + examples: options.examples, + schema: Object.assign({ type: "string" }, options.schema || {}) + }, (0, lodash_1.negate)(lodash_1.isUndefined)); + if (options.enum) { + const enumValues = (0, enum_utils_1.getEnumValues)(options.enum); + param.schema = { + enum: enumValues, + type: (0, enum_utils_1.getEnumType)(enumValues) + }; + } + return (target, key, descriptor) => { + if (descriptor) { + return (0, helpers_1.createParamDecorator)(param, defaultHeaderOptions)(target, key, descriptor); + } + return (0, helpers_1.createClassDecorator)(constants_1.DECORATORS.API_HEADERS, [param])(target); + }; + } + exports2.ApiHeader = ApiHeader; + var ApiHeaders = (headers) => { + return (target, key, descriptor) => { + headers.forEach((options) => ApiHeader(options)(target, key, descriptor)); + }; + }; + exports2.ApiHeaders = ApiHeaders; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-hide-property.decorator.js +var require_api_hide_property_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-hide-property.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiHideProperty = void 0; + function ApiHideProperty() { + return (target, propertyKey) => { + }; + } + exports2.ApiHideProperty = ApiHideProperty; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-oauth2.decorator.js +var require_api_oauth2_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-oauth2.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiOAuth2 = void 0; + var api_security_decorator_1 = require_api_security_decorator(); + function ApiOAuth2(scopes, name = "oauth2") { + return (0, api_security_decorator_1.ApiSecurity)(name, scopes); + } + exports2.ApiOAuth2 = ApiOAuth2; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-operation.decorator.js +var require_api_operation_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-operation.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiOperation = void 0; + var lodash_1 = require_lodash(); + var constants_1 = require_constants8(); + var helpers_1 = require_helpers2(); + var defaultOperationOptions = { + summary: "" + }; + function ApiOperation(options, { overrideExisting } = { overrideExisting: true }) { + return (0, helpers_1.createMethodDecorator)(constants_1.DECORATORS.API_OPERATION, (0, lodash_1.pickBy)(Object.assign(Object.assign({}, defaultOperationOptions), options), (0, lodash_1.negate)(lodash_1.isUndefined)), { overrideExisting }); + } + exports2.ApiOperation = ApiOperation; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-param.decorator.js +var require_api_param_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-param.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiParam = void 0; + var lodash_1 = require_lodash(); + var enum_utils_1 = require_enum_utils(); + var helpers_1 = require_helpers2(); + var defaultParamOptions = { + name: "", + required: true + }; + function ApiParam(options) { + const param = Object.assign({ name: (0, lodash_1.isNil)(options.name) ? defaultParamOptions.name : options.name, in: "path" }, (0, lodash_1.omit)(options, "enum")); + if ((0, enum_utils_1.isEnumDefined)(options)) { + (0, enum_utils_1.addEnumSchema)(param, options); + } + return (0, helpers_1.createParamDecorator)(param, defaultParamOptions); + } + exports2.ApiParam = ApiParam; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-produces.decorator.js +var require_api_produces_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-produces.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiProduces = void 0; + var constants_1 = require_constants8(); + var helpers_1 = require_helpers2(); + function ApiProduces(...mimeTypes) { + return (0, helpers_1.createMixedDecorator)(constants_1.DECORATORS.API_PRODUCES, mimeTypes); + } + exports2.ApiProduces = ApiProduces; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-property.decorator.js +var require_api_property_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-property.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiResponseProperty = exports2.ApiPropertyOptional = exports2.createApiPropertyDecorator = exports2.ApiProperty = void 0; + var constants_1 = require_constants8(); + var enum_utils_1 = require_enum_utils(); + var helpers_1 = require_helpers2(); + var isEnumArray = (obj2) => obj2.isArray && !!obj2.enum; + function ApiProperty(options = {}) { + return createApiPropertyDecorator(options); + } + exports2.ApiProperty = ApiProperty; + function createApiPropertyDecorator(options = {}, overrideExisting = true) { + const [type, isArray] = (0, helpers_1.getTypeIsArrayTuple)(options.type, options.isArray); + options = Object.assign(Object.assign({}, options), { + type, + isArray + }); + if (isEnumArray(options)) { + options.type = "array"; + const enumValues = (0, enum_utils_1.getEnumValues)(options.enum); + options.items = { + type: (0, enum_utils_1.getEnumType)(enumValues), + enum: enumValues + }; + delete options.enum; + } else if (options.enum) { + const enumValues = (0, enum_utils_1.getEnumValues)(options.enum); + options.enum = enumValues; + options.type = (0, enum_utils_1.getEnumType)(enumValues); + } + if (Array.isArray(options.type)) { + options.type = "array"; + options.items = { + type: "array", + items: { + type: options.type[0] + } + }; + } + return (0, helpers_1.createPropertyDecorator)(constants_1.DECORATORS.API_MODEL_PROPERTIES, options, overrideExisting); + } + exports2.createApiPropertyDecorator = createApiPropertyDecorator; + function ApiPropertyOptional(options = {}) { + return ApiProperty(Object.assign(Object.assign({}, options), { required: false })); + } + exports2.ApiPropertyOptional = ApiPropertyOptional; + function ApiResponseProperty(options = {}) { + return ApiProperty(Object.assign({ readOnly: true }, options)); + } + exports2.ApiResponseProperty = ApiResponseProperty; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-query.decorator.js +var require_api_query_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-query.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiQuery = void 0; + var lodash_1 = require_lodash(); + var enum_utils_1 = require_enum_utils(); + var helpers_1 = require_helpers2(); + var defaultQueryOptions = { + name: "", + required: true + }; + function ApiQuery(options) { + const apiQueryMetadata = options; + const [type, isArray] = (0, helpers_1.getTypeIsArrayTuple)(apiQueryMetadata.type, apiQueryMetadata.isArray); + const param = Object.assign(Object.assign({ name: (0, lodash_1.isNil)(options.name) ? defaultQueryOptions.name : options.name, in: "query" }, (0, lodash_1.omit)(options, "enum")), { type }); + if ((0, enum_utils_1.isEnumArray)(options)) { + (0, enum_utils_1.addEnumArraySchema)(param, options); + } else if ((0, enum_utils_1.isEnumDefined)(options)) { + (0, enum_utils_1.addEnumSchema)(param, options); + } + if (isArray) { + param.isArray = isArray; + } + return (0, helpers_1.createParamDecorator)(param, defaultQueryOptions); + } + exports2.ApiQuery = ApiQuery; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-response.decorator.js +var require_api_response_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-response.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiDefaultResponse = exports2.ApiHttpVersionNotSupportedResponse = exports2.ApiGatewayTimeoutResponse = exports2.ApiServiceUnavailableResponse = exports2.ApiBadGatewayResponse = exports2.ApiNotImplementedResponse = exports2.ApiInternalServerErrorResponse = exports2.ApiTooManyRequestsResponse = exports2.ApiPreconditionRequiredResponse = exports2.ApiFailedDependencyResponse = exports2.ApiUnprocessableEntityResponse = exports2.ApiMisdirectedResponse = exports2.ApiIAmATeapotResponse = exports2.ApiExpectationFailedResponse = exports2.ApiRequestedRangeNotSatisfiableResponse = exports2.ApiUnsupportedMediaTypeResponse = exports2.ApiUriTooLongResponse = exports2.ApiPayloadTooLargeResponse = exports2.ApiPreconditionFailedResponse = exports2.ApiLengthRequiredResponse = exports2.ApiGoneResponse = exports2.ApiConflictResponse = exports2.ApiRequestTimeoutResponse = exports2.ApiProxyAuthenticationRequiredResponse = exports2.ApiNotAcceptableResponse = exports2.ApiMethodNotAllowedResponse = exports2.ApiNotFoundResponse = exports2.ApiForbiddenResponse = exports2.ApiPaymentRequiredResponse = exports2.ApiUnauthorizedResponse = exports2.ApiBadRequestResponse = exports2.ApiPermanentRedirectResponse = exports2.ApiTemporaryRedirectResponse = exports2.ApiNotModifiedResponse = exports2.ApiSeeOtherResponse = exports2.ApiFoundResponse = exports2.ApiMovedPermanentlyResponse = exports2.ApiAmbiguousResponse = exports2.ApiPartialContentResponse = exports2.ApiResetContentResponse = exports2.ApiNoContentResponse = exports2.ApiNonAuthoritativeInformationResponse = exports2.ApiAcceptedResponse = exports2.ApiCreatedResponse = exports2.ApiOkResponse = exports2.ApiEarlyhintsResponse = exports2.ApiProcessingResponse = exports2.ApiSwitchingProtocolsResponse = exports2.ApiContinueResponse = exports2.ApiResponse = void 0; + var common_12 = require_common(); + var lodash_1 = require_lodash(); + var constants_1 = require_constants8(); + var helpers_1 = require_helpers2(); + function ApiResponse(options, { overrideExisting } = { overrideExisting: true }) { + const [type, isArray] = (0, helpers_1.getTypeIsArrayTuple)(options.type, options.isArray); + options.type = type; + options.isArray = isArray; + options.description = options.description ? options.description : ""; + const groupedMetadata = { + [options.status || "default"]: (0, lodash_1.omit)(options, "status") + }; + return (target, key, descriptor) => { + if (descriptor) { + const responses2 = Reflect.getMetadata(constants_1.DECORATORS.API_RESPONSE, descriptor.value); + if (responses2 && !overrideExisting) { + return descriptor; + } + Reflect.defineMetadata(constants_1.DECORATORS.API_RESPONSE, Object.assign(Object.assign({}, responses2), groupedMetadata), descriptor.value); + return descriptor; + } + const responses = Reflect.getMetadata(constants_1.DECORATORS.API_RESPONSE, target); + if (responses && !overrideExisting) { + return descriptor; + } + Reflect.defineMetadata(constants_1.DECORATORS.API_RESPONSE, Object.assign(Object.assign({}, responses), groupedMetadata), target); + return target; + }; + } + exports2.ApiResponse = ApiResponse; + var decorators = {}; + var statusList = Object.keys(common_12.HttpStatus).filter((key) => !isNaN(Number(common_12.HttpStatus[key]))).map((key) => { + const functionName = key.split("_").map((strToken) => `${strToken[0].toUpperCase()}${strToken.slice(1).toLowerCase()}`).join(""); + return { + code: Number(common_12.HttpStatus[key]), + functionName: `Api${functionName}Response` + }; + }); + statusList.forEach(({ code, functionName }) => { + decorators[functionName] = function(options = {}) { + return ApiResponse(Object.assign(Object.assign({}, options), { status: code })); + }; + }); + exports2.ApiContinueResponse = decorators.ApiContinueResponse, exports2.ApiSwitchingProtocolsResponse = decorators.ApiSwitchingProtocolsResponse, exports2.ApiProcessingResponse = decorators.ApiProcessingResponse, exports2.ApiEarlyhintsResponse = decorators.ApiEarlyhintsResponse, exports2.ApiOkResponse = decorators.ApiOkResponse, exports2.ApiCreatedResponse = decorators.ApiCreatedResponse, exports2.ApiAcceptedResponse = decorators.ApiAcceptedResponse, exports2.ApiNonAuthoritativeInformationResponse = decorators.ApiNonAuthoritativeInformationResponse, exports2.ApiNoContentResponse = decorators.ApiNoContentResponse, exports2.ApiResetContentResponse = decorators.ApiResetContentResponse, exports2.ApiPartialContentResponse = decorators.ApiPartialContentResponse, exports2.ApiAmbiguousResponse = decorators.ApiAmbiguousResponse, exports2.ApiMovedPermanentlyResponse = decorators.ApiMovedPermanentlyResponse, exports2.ApiFoundResponse = decorators.ApiFoundResponse, exports2.ApiSeeOtherResponse = decorators.ApiSeeOtherResponse, exports2.ApiNotModifiedResponse = decorators.ApiNotModifiedResponse, exports2.ApiTemporaryRedirectResponse = decorators.ApiTemporaryRedirectResponse, exports2.ApiPermanentRedirectResponse = decorators.ApiPermanentRedirectResponse, exports2.ApiBadRequestResponse = decorators.ApiBadRequestResponse, exports2.ApiUnauthorizedResponse = decorators.ApiUnauthorizedResponse, exports2.ApiPaymentRequiredResponse = decorators.ApiPaymentRequiredResponse, exports2.ApiForbiddenResponse = decorators.ApiForbiddenResponse, exports2.ApiNotFoundResponse = decorators.ApiNotFoundResponse, exports2.ApiMethodNotAllowedResponse = decorators.ApiMethodNotAllowedResponse, exports2.ApiNotAcceptableResponse = decorators.ApiNotAcceptableResponse, exports2.ApiProxyAuthenticationRequiredResponse = decorators.ApiProxyAuthenticationRequiredResponse, exports2.ApiRequestTimeoutResponse = decorators.ApiRequestTimeoutResponse, exports2.ApiConflictResponse = decorators.ApiConflictResponse, exports2.ApiGoneResponse = decorators.ApiGoneResponse, exports2.ApiLengthRequiredResponse = decorators.ApiLengthRequiredResponse, exports2.ApiPreconditionFailedResponse = decorators.ApiPreconditionFailedResponse, exports2.ApiPayloadTooLargeResponse = decorators.ApiPayloadTooLargeResponse, exports2.ApiUriTooLongResponse = decorators.ApiUriTooLongResponse, exports2.ApiUnsupportedMediaTypeResponse = decorators.ApiUnsupportedMediaTypeResponse, exports2.ApiRequestedRangeNotSatisfiableResponse = decorators.ApiRequestedRangeNotSatisfiableResponse, exports2.ApiExpectationFailedResponse = decorators.ApiExpectationFailedResponse, exports2.ApiIAmATeapotResponse = decorators.ApiIAmATeapotResponse, exports2.ApiMisdirectedResponse = decorators.ApiMisdirectedResponse, exports2.ApiUnprocessableEntityResponse = decorators.ApiUnprocessableEntityResponse, exports2.ApiFailedDependencyResponse = decorators.ApiFailedDependencyResponse, exports2.ApiPreconditionRequiredResponse = decorators.ApiPreconditionRequiredResponse, exports2.ApiTooManyRequestsResponse = decorators.ApiTooManyRequestsResponse, exports2.ApiInternalServerErrorResponse = decorators.ApiInternalServerErrorResponse, exports2.ApiNotImplementedResponse = decorators.ApiNotImplementedResponse, exports2.ApiBadGatewayResponse = decorators.ApiBadGatewayResponse, exports2.ApiServiceUnavailableResponse = decorators.ApiServiceUnavailableResponse, exports2.ApiGatewayTimeoutResponse = decorators.ApiGatewayTimeoutResponse, exports2.ApiHttpVersionNotSupportedResponse = decorators.ApiHttpVersionNotSupportedResponse; + var ApiDefaultResponse = (options = {}) => ApiResponse(Object.assign(Object.assign({}, options), { status: "default" })); + exports2.ApiDefaultResponse = ApiDefaultResponse; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-use-tags.decorator.js +var require_api_use_tags_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-use-tags.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiTags = void 0; + var constants_1 = require_constants8(); + var helpers_1 = require_helpers2(); + function ApiTags(...tags) { + return (0, helpers_1.createMixedDecorator)(constants_1.DECORATORS.API_TAGS, tags); + } + exports2.ApiTags = ApiTags; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-extension.decorator.js +var require_api_extension_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/api-extension.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiExtension = void 0; + var constants_1 = require_constants8(); + var helpers_1 = require_helpers2(); + var lodash_1 = require_lodash(); + function ApiExtension(extensionKey, extensionProperties) { + if (!extensionKey.startsWith("x-")) { + throw new Error("Extension key is not prefixed. Please ensure you prefix it with `x-`."); + } + const extensionObject = { + [extensionKey]: (0, lodash_1.clone)(extensionProperties) + }; + return (0, helpers_1.createMixedDecorator)(constants_1.DECORATORS.API_EXTENSION, extensionObject); + } + exports2.ApiExtension = ApiExtension; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/index.js +var require_decorators5 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/decorators/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ApiResponseProperty = exports2.ApiPropertyOptional = exports2.ApiProperty = void 0; + __exportStar2(require_api_basic_decorator(), exports2); + __exportStar2(require_api_bearer_decorator(), exports2); + __exportStar2(require_api_body_decorator(), exports2); + __exportStar2(require_api_consumes_decorator(), exports2); + __exportStar2(require_api_cookie_decorator(), exports2); + __exportStar2(require_api_exclude_endpoint_decorator(), exports2); + __exportStar2(require_api_exclude_controller_decorator(), exports2); + __exportStar2(require_api_extra_models_decorator(), exports2); + __exportStar2(require_api_header_decorator(), exports2); + __exportStar2(require_api_hide_property_decorator(), exports2); + __exportStar2(require_api_oauth2_decorator(), exports2); + __exportStar2(require_api_operation_decorator(), exports2); + __exportStar2(require_api_param_decorator(), exports2); + __exportStar2(require_api_produces_decorator(), exports2); + var api_property_decorator_1 = require_api_property_decorator(); + Object.defineProperty(exports2, "ApiProperty", { enumerable: true, get: function() { + return api_property_decorator_1.ApiProperty; + } }); + Object.defineProperty(exports2, "ApiPropertyOptional", { enumerable: true, get: function() { + return api_property_decorator_1.ApiPropertyOptional; + } }); + Object.defineProperty(exports2, "ApiResponseProperty", { enumerable: true, get: function() { + return api_property_decorator_1.ApiResponseProperty; + } }); + __exportStar2(require_api_query_decorator(), exports2); + __exportStar2(require_api_response_decorator(), exports2); + __exportStar2(require_api_security_decorator(), exports2); + __exportStar2(require_api_use_tags_decorator(), exports2); + __exportStar2(require_api_extension_decorator(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/fixtures/document.base.js +var require_document_base = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/fixtures/document.base.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildDocumentBase = void 0; + var buildDocumentBase = () => ({ + openapi: "3.0.0", + info: { + title: "", + description: "", + version: "1.0.0", + contact: {} + }, + tags: [], + servers: [], + components: {} + }); + exports2.buildDocumentBase = buildDocumentBase; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/storages/global-parameters.storage.js +var require_global_parameters_storage = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/storages/global-parameters.storage.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GlobalParametersStorage = exports2.GlobalParametersStorageHost = void 0; + var GlobalParametersStorageHost = class { + constructor() { + this.parameters = new Array(); + } + add(...parameters) { + this.parameters.push(...parameters); + } + getAll() { + return this.parameters; + } + clear() { + this.parameters = []; + } + }; + exports2.GlobalParametersStorageHost = GlobalParametersStorageHost; + var globalRef = global; + exports2.GlobalParametersStorage = globalRef.SwaggerGlobalParametersStorage || (globalRef.SwaggerGlobalParametersStorage = new GlobalParametersStorageHost()); + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/document-builder.js +var require_document_builder = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/document-builder.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DocumentBuilder = void 0; + var common_12 = require_common(); + var lodash_1 = require_lodash(); + var document_base_1 = require_document_base(); + var global_parameters_storage_1 = require_global_parameters_storage(); + var DocumentBuilder = class _DocumentBuilder { + constructor() { + this.logger = new common_12.Logger(_DocumentBuilder.name); + this.document = (0, document_base_1.buildDocumentBase)(); + } + setTitle(title) { + this.document.info.title = title; + return this; + } + setDescription(description) { + this.document.info.description = description; + return this; + } + setVersion(version2) { + this.document.info.version = version2; + return this; + } + setTermsOfService(termsOfService) { + this.document.info.termsOfService = termsOfService; + return this; + } + setContact(name, url, email) { + this.document.info.contact = { name, url, email }; + return this; + } + setLicense(name, url) { + this.document.info.license = { name, url }; + return this; + } + addServer(url, description, variables) { + this.document.servers.push({ url, description, variables }); + return this; + } + setExternalDoc(description, url) { + this.document.externalDocs = { description, url }; + return this; + } + setBasePath(path) { + this.logger.warn('The "setBasePath" method has been deprecated. Now, a global prefix is populated automatically. If you want to ignore it, take a look here: https://docs.nestjs.com/recipes/swagger#global-prefix. Alternatively, you can use "addServer" method to set up multiple different paths.'); + return this; + } + addTag(name, description = "", externalDocs) { + this.document.tags = this.document.tags.concat((0, lodash_1.pickBy)({ + name, + description, + externalDocs + }, (0, lodash_1.negate)(lodash_1.isUndefined))); + return this; + } + addExtension(extensionKey, extensionProperties) { + if (!extensionKey.startsWith("x-")) { + throw new Error("Extension key is not prefixed. Please ensure you prefix it with `x-`."); + } + this.document[extensionKey] = (0, lodash_1.clone)(extensionProperties); + return this; + } + addSecurity(name, options) { + this.document.components.securitySchemes = Object.assign(Object.assign({}, this.document.components.securitySchemes || {}), { [name]: options }); + return this; + } + addGlobalParameters(...parameters) { + global_parameters_storage_1.GlobalParametersStorage.add(...parameters); + return this; + } + addSecurityRequirements(name, requirements = []) { + let securityRequirement; + if ((0, lodash_1.isString)(name)) { + securityRequirement = { [name]: requirements }; + } else { + securityRequirement = name; + } + this.document.security = (this.document.security || []).concat(Object.assign({}, securityRequirement)); + return this; + } + addBearerAuth(options = { + type: "http" + }, name = "bearer") { + this.addSecurity(name, Object.assign({ scheme: "bearer", bearerFormat: "JWT" }, options)); + return this; + } + addOAuth2(options = { + type: "oauth2" + }, name = "oauth2") { + this.addSecurity(name, Object.assign({ type: "oauth2", flows: {} }, options)); + return this; + } + addApiKey(options = { + type: "apiKey" + }, name = "api_key") { + this.addSecurity(name, Object.assign({ type: "apiKey", in: "header", name }, options)); + return this; + } + addBasicAuth(options = { + type: "http" + }, name = "basic") { + this.addSecurity(name, Object.assign({ type: "http", scheme: "basic" }, options)); + return this; + } + addCookieAuth(cookieName = "connect.sid", options = { + type: "apiKey" + }, securityName = "cookie") { + this.addSecurity(securityName, Object.assign({ type: "apiKey", in: "cookie", name: cookieName }, options)); + return this; + } + build() { + return this.document; + } + }; + exports2.DocumentBuilder = DocumentBuilder; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/interfaces/swagger-custom-options.interface.js +var require_swagger_custom_options_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/interfaces/swagger-custom-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/interfaces/swagger-document-options.interface.js +var require_swagger_document_options_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/interfaces/swagger-document-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/interfaces/index.js +var require_interfaces8 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/interfaces/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_swagger_custom_options_interface(), exports2); + __exportStar2(require_swagger_document_options_interface(), exports2); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/common.js +var require_common2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/common.js"(exports2, module2) { + "use strict"; + function isNothing(subject) { + return typeof subject === "undefined" || subject === null; + } + function isObject2(subject) { + return typeof subject === "object" && subject !== null; + } + function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + return [sequence]; + } + function extend(target, source) { + var index, length, key, sourceKeys; + if (source) { + sourceKeys = Object.keys(source); + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + return target; + } + function repeat(string, count) { + var result = "", cycle; + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + return result; + } + function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; + } + module2.exports.isNothing = isNothing; + module2.exports.isObject = isObject2; + module2.exports.toArray = toArray; + module2.exports.repeat = repeat; + module2.exports.isNegativeZero = isNegativeZero; + module2.exports.extend = extend; + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/exception.js +var require_exception = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/exception.js"(exports2, module2) { + "use strict"; + function formatError(exception, compact) { + var where = "", message = exception.reason || "(unknown reason)"; + if (!exception.mark) return message; + if (exception.mark.name) { + where += 'in "' + exception.mark.name + '" '; + } + where += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")"; + if (!compact && exception.mark.snippet) { + where += "\n\n" + exception.mark.snippet; + } + return message + " " + where; + } + function YAMLException(reason, mark) { + Error.call(this); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = new Error().stack || ""; + } + } + YAMLException.prototype = Object.create(Error.prototype); + YAMLException.prototype.constructor = YAMLException; + YAMLException.prototype.toString = function toString2(compact) { + return this.name + ": " + formatError(this, compact); + }; + module2.exports = YAMLException; + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/snippet.js +var require_snippet = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/snippet.js"(exports2, module2) { + "use strict"; + var common = require_common2(); + function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { + var head = ""; + var tail = ""; + var maxHalfLength = Math.floor(maxLineLength / 2) - 1; + if (position - lineStart > maxHalfLength) { + head = " ... "; + lineStart = position - maxHalfLength + head.length; + } + if (lineEnd - position > maxHalfLength) { + tail = " ..."; + lineEnd = position + maxHalfLength - tail.length; + } + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail, + pos: position - lineStart + head.length + // relative position + }; + } + function padStart(string, max) { + return common.repeat(" ", max - string.length) + string; + } + function makeSnippet(mark, options) { + options = Object.create(options || null); + if (!mark.buffer) return null; + if (!options.maxLength) options.maxLength = 79; + if (typeof options.indent !== "number") options.indent = 1; + if (typeof options.linesBefore !== "number") options.linesBefore = 3; + if (typeof options.linesAfter !== "number") options.linesAfter = 2; + var re = /\r?\n|\r|\0/g; + var lineStarts = [0]; + var lineEnds = []; + var match; + var foundLineNo = -1; + while (match = re.exec(mark.buffer)) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + if (mark.position <= match.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; + } + } + if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; + var result = "", i, line; + var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + for (i = 1; i <= options.linesBefore; i++) { + if (foundLineNo - i < 0) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo - i], + lineEnds[foundLineNo - i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), + maxLineLength + ); + result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result; + } + line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n"; + result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n"; + for (i = 1; i <= options.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo + i], + lineEnds[foundLineNo + i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), + maxLineLength + ); + result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line.str + "\n"; + } + return result.replace(/\n$/, ""); + } + module2.exports = makeSnippet; + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type.js +var require_type2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type.js"(exports2, module2) { + "use strict"; + var YAMLException = require_exception(); + var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases(map) { + var result = {}; + if (map !== null) { + Object.keys(map).forEach(function(style) { + map[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + } + return result; + } + function Type(tag, options) { + options = options || {}; + Object.keys(options).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + this.options = options; + this.tag = tag; + this.kind = options["kind"] || null; + this.resolve = options["resolve"] || function() { + return true; + }; + this.construct = options["construct"] || function(data) { + return data; + }; + this.instanceOf = options["instanceOf"] || null; + this.predicate = options["predicate"] || null; + this.represent = options["represent"] || null; + this.representName = options["representName"] || null; + this.defaultStyle = options["defaultStyle"] || null; + this.multi = options["multi"] || false; + this.styleAliases = compileStyleAliases(options["styleAliases"] || null); + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } + } + module2.exports = Type; + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema.js +var require_schema = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema.js"(exports2, module2) { + "use strict"; + var YAMLException = require_exception(); + var Type = require_type2(); + function compileList(schema, name) { + var result = []; + schema[name].forEach(function(currentType) { + var newIndex = result.length; + result.forEach(function(previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) { + newIndex = previousIndex; + } + }); + result[newIndex] = currentType; + }); + return result; + } + function compileMap() { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index, length; + function collectType(type) { + if (type.multi) { + result.multi[type.kind].push(type); + result.multi["fallback"].push(type); + } else { + result[type.kind][type.tag] = result["fallback"][type.tag] = type; + } + } + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; + } + function Schema(definition) { + return this.extend(definition); + } + Schema.prototype.extend = function extend(definition) { + var implicit = []; + var explicit = []; + if (definition instanceof Type) { + explicit.push(definition); + } else if (Array.isArray(definition)) { + explicit = explicit.concat(definition); + } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + if (definition.implicit) implicit = implicit.concat(definition.implicit); + if (definition.explicit) explicit = explicit.concat(definition.explicit); + } else { + throw new YAMLException("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); + } + implicit.forEach(function(type) { + if (!(type instanceof Type)) { + throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + if (type.loadKind && type.loadKind !== "scalar") { + throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + } + if (type.multi) { + throw new YAMLException("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); + } + }); + explicit.forEach(function(type) { + if (!(type instanceof Type)) { + throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + }); + var result = Object.create(Schema.prototype); + result.implicit = (this.implicit || []).concat(implicit); + result.explicit = (this.explicit || []).concat(explicit); + result.compiledImplicit = compileList(result, "implicit"); + result.compiledExplicit = compileList(result, "explicit"); + result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); + return result; + }; + module2.exports = Schema; + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/str.js +var require_str = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/str.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + module2.exports = new Type("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return data !== null ? data : ""; + } + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/seq.js +var require_seq = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/seq.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + module2.exports = new Type("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return data !== null ? data : []; + } + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/map.js +var require_map3 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/map.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + module2.exports = new Type("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return data !== null ? data : {}; + } + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/failsafe.js +var require_failsafe = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/failsafe.js"(exports2, module2) { + "use strict"; + var Schema = require_schema(); + module2.exports = new Schema({ + explicit: [ + require_str(), + require_seq(), + require_map3() + ] + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/null.js +var require_null = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/null.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + function resolveYamlNull(data) { + if (data === null) return true; + var max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); + } + function constructYamlNull() { + return null; + } + function isNull(object) { + return object === null; + } + module2.exports = new Type("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + }, + empty: function() { + return ""; + } + }, + defaultStyle: "lowercase" + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/bool.js +var require_bool = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/bool.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + function resolveYamlBoolean(data) { + if (data === null) return false; + var max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); + } + function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; + } + function isBoolean(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; + } + module2.exports = new Type("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function(object) { + return object ? "true" : "false"; + }, + uppercase: function(object) { + return object ? "TRUE" : "FALSE"; + }, + camelcase: function(object) { + return object ? "True" : "False"; + } + }, + defaultStyle: "lowercase" + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/int.js +var require_int = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/int.js"(exports2, module2) { + "use strict"; + var common = require_common2(); + var Type = require_type2(); + function isHexCode(c) { + return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102; + } + function isOctCode(c) { + return 48 <= c && c <= 55; + } + function isDecCode(c) { + return 48 <= c && c <= 57; + } + function resolveYamlInteger(data) { + if (data === null) return false; + var max = data.length, index = 0, hasDigits = false, ch; + if (!max) return false; + ch = data[index]; + if (ch === "-" || ch === "+") { + ch = data[++index]; + } + if (ch === "0") { + if (index + 1 === max) return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (ch !== "0" && ch !== "1") return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "x") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "o") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + } + if (ch === "_") return false; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + if (!hasDigits || ch === "_") return false; + return true; + } + function constructYamlInteger(data) { + var value = data, sign = 1, ch; + if (value.indexOf("_") !== -1) { + value = value.replace(/_/g, ""); + } + ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") sign = -1; + value = value.slice(1); + ch = value[0]; + } + if (value === "0") return 0; + if (ch === "0") { + if (value[1] === "b") return sign * parseInt(value.slice(2), 2); + if (value[1] === "x") return sign * parseInt(value.slice(2), 16); + if (value[1] === "o") return sign * parseInt(value.slice(2), 8); + } + return sign * parseInt(value, 10); + } + function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); + } + module2.exports = new Type("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function(obj2) { + return obj2 >= 0 ? "0b" + obj2.toString(2) : "-0b" + obj2.toString(2).slice(1); + }, + octal: function(obj2) { + return obj2 >= 0 ? "0o" + obj2.toString(8) : "-0o" + obj2.toString(8).slice(1); + }, + decimal: function(obj2) { + return obj2.toString(10); + }, + /* eslint-disable max-len */ + hexadecimal: function(obj2) { + return obj2 >= 0 ? "0x" + obj2.toString(16).toUpperCase() : "-0x" + obj2.toString(16).toUpperCase().slice(1); + } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/float.js +var require_float = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/float.js"(exports2, module2) { + "use strict"; + var common = require_common2(); + var Type = require_type2(); + var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" + ); + function resolveYamlFloat(data) { + if (data === null) return false; + if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === "_") { + return false; + } + return true; + } + function constructYamlFloat(data) { + var value, sign; + value = data.replace(/_/g, "").toLowerCase(); + sign = value[0] === "-" ? -1 : 1; + if ("+-".indexOf(value[0]) >= 0) { + value = value.slice(1); + } + if (value === ".inf") { + return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + } else if (value === ".nan") { + return NaN; + } + return sign * parseFloat(value, 10); + } + var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + function representYamlFloat(object, style) { + var res; + if (isNaN(object)) { + switch (style) { + case "lowercase": + return ".nan"; + case "uppercase": + return ".NAN"; + case "camelcase": + return ".NaN"; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return ".inf"; + case "uppercase": + return ".INF"; + case "camelcase": + return ".Inf"; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return "-.inf"; + case "uppercase": + return "-.INF"; + case "camelcase": + return "-.Inf"; + } + } else if (common.isNegativeZero(object)) { + return "-0.0"; + } + res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; + } + function isFloat(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); + } + module2.exports = new Type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/json.js +var require_json2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/json.js"(exports2, module2) { + "use strict"; + module2.exports = require_failsafe().extend({ + implicit: [ + require_null(), + require_bool(), + require_int(), + require_float() + ] + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/core.js +var require_core4 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/core.js"(exports2, module2) { + "use strict"; + module2.exports = require_json2(); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/timestamp.js +var require_timestamp2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/timestamp.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + var YAML_DATE_REGEXP = new RegExp( + "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" + ); + var YAML_TIMESTAMP_REGEXP = new RegExp( + "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$" + ); + function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; + } + function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + if (match === null) throw new Error("Date resolve error"); + year = +match[1]; + month = +match[2] - 1; + day = +match[3]; + if (!match[4]) { + return new Date(Date.UTC(year, month, day)); + } + hour = +match[4]; + minute = +match[5]; + second = +match[6]; + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { + fraction += "0"; + } + fraction = +fraction; + } + if (match[9]) { + tz_hour = +match[10]; + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 6e4; + if (match[9] === "-") delta = -delta; + } + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) date.setTime(date.getTime() - delta); + return date; + } + function representYamlTimestamp(object) { + return object.toISOString(); + } + module2.exports = new Type("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/merge.js +var require_merge4 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/merge.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + function resolveYamlMerge(data) { + return data === "<<" || data === null; + } + module2.exports = new Type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/binary.js +var require_binary = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/binary.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary(data) { + if (data === null) return false; + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + if (code > 64) continue; + if (code < 0) return false; + bitlen += 6; + } + return bitlen % 8 === 0; + } + function constructYamlBinary(data) { + var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = []; + for (idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map.indexOf(input.charAt(idx)); + } + tailbits = max % 4 * 6; + if (tailbits === 0) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } else if (tailbits === 18) { + result.push(bits >> 10 & 255); + result.push(bits >> 2 & 255); + } else if (tailbits === 12) { + result.push(bits >> 4 & 255); + } + return new Uint8Array(result); + } + function representYamlBinary(object) { + var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + tail = max % 3; + if (tail === 0) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } else if (tail === 2) { + result += map[bits >> 10 & 63]; + result += map[bits >> 4 & 63]; + result += map[bits << 2 & 63]; + result += map[64]; + } else if (tail === 1) { + result += map[bits >> 2 & 63]; + result += map[bits << 4 & 63]; + result += map[64]; + result += map[64]; + } + return result; + } + function isBinary(obj2) { + return Object.prototype.toString.call(obj2) === "[object Uint8Array]"; + } + module2.exports = new Type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/omap.js +var require_omap = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/omap.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var _toString = Object.prototype.toString; + function resolveYamlOmap(data) { + if (data === null) return true; + var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data; + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + if (_toString.call(pair) !== "[object Object]") return false; + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + if (!pairHasKey) return false; + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + return true; + } + function constructYamlOmap(data) { + return data !== null ? data : []; + } + module2.exports = new Type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/pairs.js +var require_pairs2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/pairs.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + var _toString = Object.prototype.toString; + function resolveYamlPairs(data) { + if (data === null) return true; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + if (_toString.call(pair) !== "[object Object]") return false; + keys = Object.keys(pair); + if (keys.length !== 1) return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; + } + function constructYamlPairs(data) { + if (data === null) return []; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; + } + module2.exports = new Type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/set.js +var require_set2 = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/set.js"(exports2, module2) { + "use strict"; + var Type = require_type2(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + function resolveYamlSet(data) { + if (data === null) return true; + var key, object = data; + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; + } + } + return true; + } + function constructYamlSet(data) { + return data !== null ? data : {}; + } + module2.exports = new Type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/default.js +var require_default = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/default.js"(exports2, module2) { + "use strict"; + module2.exports = require_core4().extend({ + implicit: [ + require_timestamp2(), + require_merge4() + ], + explicit: [ + require_binary(), + require_omap(), + require_pairs2(), + require_set2() + ] + }); + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/loader.js +var require_loader = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/loader.js"(exports2, module2) { + "use strict"; + var common = require_common2(); + var YAMLException = require_exception(); + var makeSnippet = require_snippet(); + var DEFAULT_SCHEMA = require_default(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CONTEXT_FLOW_IN = 1; + var CONTEXT_FLOW_OUT = 2; + var CONTEXT_BLOCK_IN = 3; + var CONTEXT_BLOCK_OUT = 4; + var CHOMPING_CLIP = 1; + var CHOMPING_STRIP = 2; + var CHOMPING_KEEP = 3; + var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; + var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + function _class(obj2) { + return Object.prototype.toString.call(obj2); + } + function is_EOL(c) { + return c === 10 || c === 13; + } + function is_WHITE_SPACE(c) { + return c === 9 || c === 32; + } + function is_WS_OR_EOL(c) { + return c === 9 || c === 32 || c === 10 || c === 13; + } + function is_FLOW_INDICATOR(c) { + return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; + } + function fromHexCode(c) { + var lc; + if (48 <= c && c <= 57) { + return c - 48; + } + lc = c | 32; + if (97 <= lc && lc <= 102) { + return lc - 97 + 10; + } + return -1; + } + function escapedHexLen(c) { + if (c === 120) { + return 2; + } + if (c === 117) { + return 4; + } + if (c === 85) { + return 8; + } + return 0; + } + function fromDecimalCode(c) { + if (48 <= c && c <= 57) { + return c - 48; + } + return -1; + } + function simpleEscapeSequence(c) { + return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; + } + function charFromCodepoint(c) { + if (c <= 65535) { + return String.fromCharCode(c); + } + return String.fromCharCode( + (c - 65536 >> 10) + 55296, + (c - 65536 & 1023) + 56320 + ); + } + var simpleEscapeCheck = new Array(256); + var simpleEscapeMap = new Array(256); + for (i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); + } + var i; + function State(input, options) { + this.input = input; + this.filename = options["filename"] || null; + this.schema = options["schema"] || DEFAULT_SCHEMA; + this.onWarning = options["onWarning"] || null; + this.legacy = options["legacy"] || false; + this.json = options["json"] || false; + this.listener = options["listener"] || null; + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + this.firstTabInLine = -1; + this.documents = []; + } + function generateError(state, message) { + var mark = { + name: state.filename, + buffer: state.input.slice(0, -1), + // omit trailing \0 + position: state.position, + line: state.line, + column: state.position - state.lineStart + }; + mark.snippet = makeSnippet(mark); + return new YAMLException(message, mark); + } + function throwError(state, message) { + throw generateError(state, message); + } + function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } + } + var directiveHandlers = { + YAML: function handleYamlDirective(state, name, args) { + var match, major, minor; + if (state.version !== null) { + throwError(state, "duplication of %YAML directive"); + } + if (args.length !== 1) { + throwError(state, "YAML directive accepts exactly one argument"); + } + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (match === null) { + throwError(state, "ill-formed argument of the YAML directive"); + } + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + if (major !== 1) { + throwError(state, "unacceptable YAML version of the document"); + } + state.version = args[0]; + state.checkLineBreaks = minor < 2; + if (minor !== 1 && minor !== 2) { + throwWarning(state, "unsupported YAML version of the document"); + } + }, + TAG: function handleTagDirective(state, name, args) { + var handle, prefix; + if (args.length !== 2) { + throwError(state, "TAG directive accepts exactly two arguments"); + } + handle = args[0]; + prefix = args[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); + } + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); + } + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError(state, "tag prefix is malformed: " + prefix); + } + state.tagMap[handle] = prefix; + } + }; + function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + if (start < end) { + _result = state.input.slice(start, end); + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 9 || 32 <= _character && _character <= 1114111)) { + throwError(state, "expected valid JSON character"); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, "the stream contains non-printable characters"); + } + state.result += _result; + } + } + function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + if (!common.isObject(source)) { + throwError(state, "cannot merge mappings; the provided source object is unacceptable"); + } + sourceKeys = Object.keys(source); + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } + } + function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { + var index, quantity; + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, "nested arrays are not supported inside keys"); + } + if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") { + keyNode[index] = "[object Object]"; + } + } + } + if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") { + keyNode = "[object Object]"; + } + keyNode = String(keyNode); + if (_result === null) { + _result = {}; + } + if (keyTag === "tag:yaml.org,2002:merge") { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.lineStart = startLineStart || state.lineStart; + state.position = startPos || state.position; + throwError(state, "duplicated mapping key"); + } + if (keyNode === "__proto__") { + Object.defineProperty(_result, keyNode, { + configurable: true, + enumerable: true, + writable: true, + value: valueNode + }); + } else { + _result[keyNode] = valueNode; + } + delete overridableKeys[keyNode]; + } + return _result; + } + function readLineBreak(state) { + var ch; + ch = state.input.charCodeAt(state.position); + if (ch === 10) { + state.position++; + } else if (ch === 13) { + state.position++; + if (state.input.charCodeAt(state.position) === 10) { + state.position++; + } + } else { + throwError(state, "a line break is expected"); + } + state.line += 1; + state.lineStart = state.position; + state.firstTabInLine = -1; + } + function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + if (ch === 9 && state.firstTabInLine === -1) { + state.firstTabInLine = state.position; + } + ch = state.input.charCodeAt(++state.position); + } + if (allowComments && ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 10 && ch !== 13 && ch !== 0); + } + if (is_EOL(ch)) { + readLineBreak(state); + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + while (ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, "deficient indentation"); + } + return lineBreaks; + } + function testDocumentSeparator(state) { + var _position = state.position, ch; + ch = state.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) { + _position += 3; + ch = state.input.charCodeAt(_position); + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + return false; + } + function writeFoldedLines(state, count) { + if (count === 1) { + state.result += " "; + } else if (count > 1) { + state.result += common.repeat("\n", count - 1); + } + } + function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch; + ch = state.input.charCodeAt(state.position); + if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) { + return false; + } + if (ch === 63 || ch === 45) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + state.kind = "scalar"; + state.result = ""; + captureStart = captureEnd = state.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + } else if (ch === 35) { + preceding = state.input.charCodeAt(state.position - 1); + if (is_WS_OR_EOL(preceding)) { + break; + } + } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, captureEnd, false); + if (state.result) { + return true; + } + state.kind = _kind; + state.result = _result; + return false; + } + function readSingleQuotedScalar(state, nodeIndent) { + var ch, captureStart, captureEnd; + ch = state.input.charCodeAt(state.position); + if (ch !== 39) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 39) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (ch === 39) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, "unexpected end of the document within a single quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + } + } + throwError(state, "unexpected end of the stream within a single quoted scalar"); + } + function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, captureEnd, hexLength, hexResult, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 34) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 34) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + } else if (ch === 92) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + } else { + throwError(state, "expected hexadecimal character"); + } + } + state.result += charFromCodepoint(hexResult); + state.position++; + } else { + throwError(state, "unknown escape sequence"); + } + captureStart = captureEnd = state.position; + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, "unexpected end of the document within a double quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + } + } + throwError(state, "unexpected end of the stream within a double quoted scalar"); + } + function readFlowCollection(state, nodeIndent) { + var readNext = true, _line, _lineStart, _pos, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = []; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = {}; + } else { + return false; + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(++state.position); + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? "mapping" : "sequence"; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, "missed comma between flow collection entries"); + } else if (ch === 44) { + throwError(state, "expected the node content, but found ','"); + } + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + _line = state.line; + _lineStart = state.lineStart; + _pos = state.position; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if ((isExplicitPair || state.line === _line) && ch === 58) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + } else { + _result.push(keyNode); + } + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === 44) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + throwError(state, "unexpected end of the stream within a flow collection"); + } + function readBlockScalar(state, nodeIndent) { + var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 124) { + folding = false; + } else if (ch === 62) { + folding = true; + } else { + return false; + } + state.kind = "scalar"; + state.result = ""; + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + if (ch === 43 || ch === 45) { + if (CHOMPING_CLIP === chomping) { + chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, "repeat of a chomping mode identifier"); + } + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, "repeat of an indentation width identifier"); + } + } else { + break; + } + } + if (is_WHITE_SPACE(ch)) { + do { + ch = state.input.charCodeAt(++state.position); + } while (is_WHITE_SPACE(ch)); + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (!is_EOL(ch) && ch !== 0); + } + } + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + ch = state.input.charCodeAt(state.position); + while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + if (is_EOL(ch)) { + emptyLines++; + continue; + } + if (state.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { + state.result += "\n"; + } + } + break; + } + if (folding) { + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat("\n", emptyLines + 1); + } else if (emptyLines === 0) { + if (didReadContent) { + state.result += " "; + } + } else { + state.result += common.repeat("\n", emptyLines); + } + } else { + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + while (!is_EOL(ch) && ch !== 0) { + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, state.position, false); + } + return true; + } + function readBlockSequence(state, nodeIndent) { + var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch; + if (state.firstTabInLine !== -1) return false; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, "tab characters must not be used in indentation"); + } + if (ch !== 45) { + break; + } + following = state.input.charCodeAt(state.position + 1); + if (!is_WS_OR_EOL(following)) { + break; + } + detected = true; + state.position++; + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { + throwError(state, "bad indentation of a sequence entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "sequence"; + state.result = _result; + return true; + } + return false; + } + function readBlockMapping(state, nodeIndent, flowIndent) { + var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; + if (state.firstTabInLine !== -1) return false; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (!atExplicitKey && state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, "tab characters must not be used in indentation"); + } + following = state.input.charCodeAt(state.position + 1); + _line = state.line; + if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { + if (ch === 63) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + atExplicitKey = false; + allowCompact = true; + } else { + throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); + } + state.position += 1; + ch = following; + } else { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + break; + } + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 58) { + ch = state.input.charCodeAt(++state.position); + if (!is_WS_OR_EOL(ch)) { + throwError(state, "a whitespace character is expected after the key-value separator within a block mapping"); + } + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + } else if (detected) { + throwError(state, "can not read an implicit mapping pair; a colon is missed"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else if (detected) { + throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } + if (state.line === _line || state.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + } + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { + throwError(state, "bad indentation of a mapping entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "mapping"; + state.result = _result; + } + return detected; + } + function readTagProperty(state) { + var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 33) return false; + if (state.tag !== null) { + throwError(state, "duplication of a tag property"); + } + ch = state.input.charCodeAt(++state.position); + if (ch === 60) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; + ch = state.input.charCodeAt(++state.position); + } else { + tagHandle = "!"; + } + _position = state.position; + if (isVerbatim) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && ch !== 62); + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, "unexpected end of the stream within a verbatim tag"); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + if (ch === 33) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, "named tag handle cannot contain such characters"); + } + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, "tag suffix cannot contain exclamation marks"); + } + } + ch = state.input.charCodeAt(++state.position); + } + tagName = state.input.slice(_position, state.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, "tag suffix cannot contain flow indicator characters"); + } + } + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, "tag name cannot contain such characters: " + tagName); + } + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state, "tag name is malformed: " + tagName); + } + if (isVerbatim) { + state.tag = tagName; + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + } else if (tagHandle === "!") { + state.tag = "!" + tagName; + } else if (tagHandle === "!!") { + state.tag = "tag:yaml.org,2002:" + tagName; + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + return true; + } + function readAnchorProperty(state) { + var _position, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 38) return false; + if (state.anchor !== null) { + throwError(state, "duplication of an anchor property"); + } + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError(state, "name of an anchor node must contain at least one character"); + } + state.anchor = state.input.slice(_position, state.position); + return true; + } + function readAlias(state) { + var _position, alias, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 42) return false; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError(state, "name of an alias node must contain at least one character"); + } + alias = state.input.slice(_position, state.position); + if (!_hasOwnProperty.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; + } + function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type, flowIndent, blockIndent; + if (state.listener !== null) { + state.listener("open", state); + } + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + blockIndent = state.position - state.lineStart; + if (indentStatus === 1) { + if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + } else if (readAlias(state)) { + hasContent = true; + if (state.tag !== null || state.anchor !== null) { + throwError(state, "alias node should not have any properties"); + } + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + if (state.tag === null) { + state.tag = "?"; + } + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + if (state.tag === null) { + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } else if (state.tag === "?") { + if (state.result !== null && state.kind !== "scalar") { + throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + if (type.resolve(state.result)) { + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (state.tag !== "!") { + if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) { + type = state.typeMap[state.kind || "fallback"][state.tag]; + } else { + type = null; + typeList = state.typeMap.multi[state.kind || "fallback"]; + for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { + if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type = typeList[typeIndex]; + break; + } + } + } + if (!type) { + throwError(state, "unknown tag !<" + state.tag + ">"); + } + if (state.result !== null && type.kind !== state.kind) { + throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + if (!type.resolve(state.result, state.tag)) { + throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); + } else { + state.result = type.construct(state.result, state.tag); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } + if (state.listener !== null) { + state.listener("close", state); + } + return state.tag !== null || state.anchor !== null || hasContent; + } + function readDocument(state) { + var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = /* @__PURE__ */ Object.create(null); + state.anchorMap = /* @__PURE__ */ Object.create(null); + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if (state.lineIndent > 0 || ch !== 37) { + break; + } + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + if (directiveName.length < 1) { + throwError(state, "directive name must not be less than one character in length"); + } + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && !is_EOL(ch)); + break; + } + if (is_EOL(ch)) break; + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveArgs.push(state.input.slice(_position, state.position)); + } + if (ch !== 0) readLineBreak(state); + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + skipSeparationSpace(state, true, -1); + if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } else if (hasDirectives) { + throwError(state, "directives end mark is expected"); + } + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, "non-ASCII line breaks are interpreted as content"); + } + state.documents.push(state.result); + if (state.position === state.lineStart && testDocumentSeparator(state)) { + if (state.input.charCodeAt(state.position) === 46) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + if (state.position < state.length - 1) { + throwError(state, "end of the stream or a document separator is expected"); + } else { + return; + } + } + function loadDocuments(input, options) { + input = String(input); + options = options || {}; + if (input.length !== 0) { + if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { + input += "\n"; + } + if (input.charCodeAt(0) === 65279) { + input = input.slice(1); + } + } + var state = new State(input, options); + var nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, "null byte is not allowed in input"); + } + state.input += "\0"; + while (state.input.charCodeAt(state.position) === 32) { + state.lineIndent += 1; + state.position += 1; + } + while (state.position < state.length - 1) { + readDocument(state); + } + return state.documents; + } + function loadAll(input, iterator, options) { + if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") { + options = iterator; + iterator = null; + } + var documents = loadDocuments(input, options); + if (typeof iterator !== "function") { + return documents; + } + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } + } + function load(input, options) { + var documents = loadDocuments(input, options); + if (documents.length === 0) { + return void 0; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException("expected a single document in the stream, but found more"); + } + module2.exports.loadAll = loadAll; + module2.exports.load = load; + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/dumper.js +var require_dumper = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/dumper.js"(exports2, module2) { + "use strict"; + var common = require_common2(); + var YAMLException = require_exception(); + var DEFAULT_SCHEMA = require_default(); + var _toString = Object.prototype.toString; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CHAR_BOM = 65279; + var CHAR_TAB = 9; + var CHAR_LINE_FEED = 10; + var CHAR_CARRIAGE_RETURN = 13; + var CHAR_SPACE = 32; + var CHAR_EXCLAMATION = 33; + var CHAR_DOUBLE_QUOTE = 34; + var CHAR_SHARP = 35; + var CHAR_PERCENT = 37; + var CHAR_AMPERSAND = 38; + var CHAR_SINGLE_QUOTE = 39; + var CHAR_ASTERISK = 42; + var CHAR_COMMA = 44; + var CHAR_MINUS = 45; + var CHAR_COLON = 58; + var CHAR_EQUALS = 61; + var CHAR_GREATER_THAN = 62; + var CHAR_QUESTION = 63; + var CHAR_COMMERCIAL_AT = 64; + var CHAR_LEFT_SQUARE_BRACKET = 91; + var CHAR_RIGHT_SQUARE_BRACKET = 93; + var CHAR_GRAVE_ACCENT = 96; + var CHAR_LEFT_CURLY_BRACKET = 123; + var CHAR_VERTICAL_LINE = 124; + var CHAR_RIGHT_CURLY_BRACKET = 125; + var ESCAPE_SEQUENCES = {}; + ESCAPE_SEQUENCES[0] = "\\0"; + ESCAPE_SEQUENCES[7] = "\\a"; + ESCAPE_SEQUENCES[8] = "\\b"; + ESCAPE_SEQUENCES[9] = "\\t"; + ESCAPE_SEQUENCES[10] = "\\n"; + ESCAPE_SEQUENCES[11] = "\\v"; + ESCAPE_SEQUENCES[12] = "\\f"; + ESCAPE_SEQUENCES[13] = "\\r"; + ESCAPE_SEQUENCES[27] = "\\e"; + ESCAPE_SEQUENCES[34] = '\\"'; + ESCAPE_SEQUENCES[92] = "\\\\"; + ESCAPE_SEQUENCES[133] = "\\N"; + ESCAPE_SEQUENCES[160] = "\\_"; + ESCAPE_SEQUENCES[8232] = "\\L"; + ESCAPE_SEQUENCES[8233] = "\\P"; + var DEPRECATED_BOOLEANS_SYNTAX = [ + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" + ]; + var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; + function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + if (map === null) return {}; + result = {}; + keys = Object.keys(map); + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + if (tag.slice(0, 2) === "!!") { + tag = "tag:yaml.org,2002:" + tag.slice(2); + } + type = schema.compiledTypeMap["fallback"][tag]; + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + result[tag] = style; + } + return result; + } + function encodeHex(character) { + var string, handle, length; + string = character.toString(16).toUpperCase(); + if (character <= 255) { + handle = "x"; + length = 2; + } else if (character <= 65535) { + handle = "u"; + length = 4; + } else if (character <= 4294967295) { + handle = "U"; + length = 8; + } else { + throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF"); + } + return "\\" + handle + common.repeat("0", length - string.length) + string; + } + var QUOTING_TYPE_SINGLE = 1; + var QUOTING_TYPE_DOUBLE = 2; + function State(options) { + this.schema = options["schema"] || DEFAULT_SCHEMA; + this.indent = Math.max(1, options["indent"] || 2); + this.noArrayIndent = options["noArrayIndent"] || false; + this.skipInvalid = options["skipInvalid"] || false; + this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"]; + this.styleMap = compileStyleMap(this.schema, options["styles"] || null); + this.sortKeys = options["sortKeys"] || false; + this.lineWidth = options["lineWidth"] || 80; + this.noRefs = options["noRefs"] || false; + this.noCompatMode = options["noCompatMode"] || false; + this.condenseFlow = options["condenseFlow"] || false; + this.quotingType = options["quotingType"] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; + this.forceQuotes = options["forceQuotes"] || false; + this.replacer = typeof options["replacer"] === "function" ? options["replacer"] : null; + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + this.tag = null; + this.result = ""; + this.duplicates = []; + this.usedDuplicates = null; + } + function indentString(string, spaces) { + var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length; + while (position < length) { + next = string.indexOf("\n", position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + if (line.length && line !== "\n") result += ind; + result += line; + } + return result; + } + function generateNextLine(state, level) { + return "\n" + common.repeat(" ", state.indent * level); + } + function testImplicitResolving(state, str) { + var index, length, type; + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + if (type.resolve(str)) { + return true; + } + } + return false; + } + function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; + } + function isPrintable(c) { + return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== CHAR_BOM || 65536 <= c && c <= 1114111; + } + function isNsCharOrWhitespace(c) { + return isPrintable(c) && c !== CHAR_BOM && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED; + } + function isPlainSafe(c, prev, inblock) { + var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); + var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); + return ( + // ns-plain-safe + (inblock ? ( + // c = flow-in + cIsNsCharOrWhitespace + ) : cIsNsCharOrWhitespace && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && c !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar + ); + } + function isPlainSafeFirst(c) { + return isPrintable(c) && c !== CHAR_BOM && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT; + } + function isPlainSafeLast(c) { + return !isWhitespace(c) && c !== CHAR_COLON; + } + function codePointAt(string, pos) { + var first = string.charCodeAt(pos), second; + if (first >= 55296 && first <= 56319 && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 56320 && second <= 57343) { + return (first - 55296) * 1024 + second - 56320 + 65536; + } + } + return first; + } + function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); + } + var STYLE_PLAIN = 1; + var STYLE_SINGLE = 2; + var STYLE_LITERAL = 3; + var STYLE_FOLDED = 4; + var STYLE_DOUBLE = 5; + function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) { + var i; + var char = 0; + var prevChar = null; + var hasLineBreak = false; + var hasFoldableLine = false; + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; + var plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1)); + if (singleLineOnly || forceQuotes) { + for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + } else { + for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || // Foldable line = too long, and not more-indented. + i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "); + } + if (!hasLineBreak && !hasFoldableLine) { + if (plain && !forceQuotes && !testAmbiguousType(string)) { + return STYLE_PLAIN; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + if (!forceQuotes) { + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + function writeScalar(state, string, level, iskey, inblock) { + state.dump = (function() { + if (string.length === 0) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; + } + if (!state.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'"; + } + } + var indent = state.indent * Math.max(1, level); + var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel; + function testAmbiguity(string2) { + return testImplicitResolving(state, string2); + } + switch (chooseScalarStyle( + string, + singleLineOnly, + state.indent, + lineWidth, + testAmbiguity, + state.quotingType, + state.forceQuotes && !iskey, + inblock + )) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return "|" + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException("impossible error: invalid scalar style"); + } + })(); + } + function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ""; + var clip = string[string.length - 1] === "\n"; + var keep = clip && (string[string.length - 2] === "\n" || string === "\n"); + var chomp = keep ? "+" : clip ? "" : "-"; + return indentIndicator + chomp + "\n"; + } + function dropEndingNewline(string) { + return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; + } + function foldString(string, width) { + var lineRe = /(\n+)([^\n]*)/g; + var result = (function() { + var nextLF = string.indexOf("\n"); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + })(); + var prevMoreIndented = string[0] === "\n" || string[0] === " "; + var moreIndented; + var match; + while (match = lineRe.exec(string)) { + var prefix = match[1], line = match[2]; + moreIndented = line[0] === " "; + result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); + prevMoreIndented = moreIndented; + } + return result; + } + function foldLine(line, width) { + if (line === "" || line[0] === " ") return line; + var breakRe = / [^ ]/g; + var match; + var start = 0, end, curr = 0, next = 0; + var result = ""; + while (match = breakRe.exec(line)) { + next = match.index; + if (next - start > width) { + end = curr > start ? curr : next; + result += "\n" + line.slice(start, end); + start = end + 1; + } + curr = next; + } + result += "\n"; + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + "\n" + line.slice(curr + 1); + } else { + result += line.slice(start); + } + return result.slice(1); + } + function escapeString(string) { + var result = ""; + var char = 0; + var escapeSeq; + for (var i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + escapeSeq = ESCAPE_SEQUENCES[char]; + if (!escapeSeq && isPrintable(char)) { + result += string[i]; + if (char >= 65536) result += string[i + 1]; + } else { + result += escapeSeq || encodeHex(char); + } + } + return result; + } + function writeFlowSequence(state, level, object) { + var _result = "", _tag = state.tag, index, length, value; + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + if (writeNode(state, level, value, false, false) || typeof value === "undefined" && writeNode(state, level, null, false, false)) { + if (_result !== "") _result += "," + (!state.condenseFlow ? " " : ""); + _result += state.dump; + } + } + state.tag = _tag; + state.dump = "[" + _result + "]"; + } + function writeBlockSequence(state, level, object, compact) { + var _result = "", _tag = state.tag, index, length, value; + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + if (writeNode(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state, level + 1, null, true, true, false, true)) { + if (!compact || _result !== "") { + _result += generateNextLine(state, level); + } + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += "-"; + } else { + _result += "- "; + } + _result += state.dump; + } + } + state.tag = _tag; + state.dump = _result || "[]"; + } + function writeFlowMapping(state, level, object) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer; + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (_result !== "") pairBuffer += ", "; + if (state.condenseFlow) pairBuffer += '"'; + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + if (!writeNode(state, level, objectKey, false, false)) { + continue; + } + if (state.dump.length > 1024) pairBuffer += "? "; + pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " "); + if (!writeNode(state, level, objectValue, false, false)) { + continue; + } + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = "{" + _result + "}"; + } + function writeBlockMapping(state, level, object, compact) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer; + if (state.sortKeys === true) { + objectKeyList.sort(); + } else if (typeof state.sortKeys === "function") { + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + throw new YAMLException("sortKeys must be a boolean or a function"); + } + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (!compact || _result !== "") { + pairBuffer += generateNextLine(state, level); + } + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; + } + explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024; + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += "?"; + } else { + pairBuffer += "? "; + } + } + pairBuffer += state.dump; + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; + } + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ":"; + } else { + pairBuffer += ": "; + } + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = _result || "{}"; + } + function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + typeList = explicit ? state.explicitTypes : state.implicitTypes; + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) { + if (explicit) { + if (type.multi && type.representName) { + state.tag = type.representName(object); + } else { + state.tag = type.tag; + } + } else { + state.tag = "?"; + } + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + if (_toString.call(type.represent) === "[object Function]") { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException("!<" + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + state.dump = _result; + } + return true; + } + } + return false; + } + function writeNode(state, level, object, block, compact, iskey, isblockseq) { + state.tag = null; + state.dump = object; + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + var type = _toString.call(state.dump); + var inblock = block; + var tagStr; + if (block) { + block = state.flowLevel < 0 || state.flowLevel > level; + } + var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate; + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) { + compact = false; + } + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = "*ref_" + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === "[object Object]") { + if (block && Object.keys(state.dump).length !== 0) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if (type === "[object Array]") { + if (block && state.dump.length !== 0) { + if (state.noArrayIndent && !isblockseq && level > 0) { + writeBlockSequence(state, level - 1, state.dump, compact); + } else { + writeBlockSequence(state, level, state.dump, compact); + } + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, level, state.dump); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if (type === "[object String]") { + if (state.tag !== "?") { + writeScalar(state, state.dump, level, iskey, inblock); + } + } else if (type === "[object Undefined]") { + return false; + } else { + if (state.skipInvalid) return false; + throw new YAMLException("unacceptable kind of an object to dump " + type); + } + if (state.tag !== null && state.tag !== "?") { + tagStr = encodeURI( + state.tag[0] === "!" ? state.tag.slice(1) : state.tag + ).replace(/!/g, "%21"); + if (state.tag[0] === "!") { + tagStr = "!" + tagStr; + } else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") { + tagStr = "!!" + tagStr.slice(18); + } else { + tagStr = "!<" + tagStr + ">"; + } + state.dump = tagStr + " " + state.dump; + } + } + return true; + } + function getDuplicateReferences(object, state) { + var objects = [], duplicatesIndexes = [], index, length; + inspectNode(object, objects, duplicatesIndexes); + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); + } + function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, index, length; + if (object !== null && typeof object === "object") { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } + } + function dump(input, options) { + options = options || {}; + var state = new State(options); + if (!state.noRefs) getDuplicateReferences(input, state); + var value = input; + if (state.replacer) { + value = state.replacer.call({ "": value }, "", value); + } + if (writeNode(state, 0, value, true, true)) return state.dump + "\n"; + return ""; + } + module2.exports.dump = dump; + } +}); + +// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/index.js +var require_js_yaml = __commonJS({ + "../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/index.js"(exports2, module2) { + "use strict"; + var loader = require_loader(); + var dumper = require_dumper(); + function renamed(from, to) { + return function() { + throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default."); + }; + } + module2.exports.Type = require_type2(); + module2.exports.Schema = require_schema(); + module2.exports.FAILSAFE_SCHEMA = require_failsafe(); + module2.exports.JSON_SCHEMA = require_json2(); + module2.exports.CORE_SCHEMA = require_core4(); + module2.exports.DEFAULT_SCHEMA = require_default(); + module2.exports.load = loader.load; + module2.exports.loadAll = loader.loadAll; + module2.exports.dump = dumper.dump; + module2.exports.YAMLException = require_exception(); + module2.exports.types = { + binary: require_binary(), + float: require_float(), + map: require_map3(), + null: require_null(), + pairs: require_pairs2(), + set: require_set2(), + timestamp: require_timestamp2(), + bool: require_bool(), + int: require_int(), + merge: require_merge4(), + omap: require_omap(), + seq: require_seq(), + str: require_str() + }; + module2.exports.safeLoad = renamed("safeLoad", "load"); + module2.exports.safeLoadAll = renamed("safeLoadAll", "loadAll"); + module2.exports.safeDump = renamed("safeDump", "dump"); + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/plugin/metadata-loader.js +var require_metadata_loader = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/plugin/metadata-loader.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MetadataLoader = void 0; + var plugin_constants_1 = require_plugin_constants(); + var MetadataLoader = class _MetadataLoader { + static addRefreshHook(hook) { + return _MetadataLoader.refreshHooks.push(hook); + } + load(metadata) { + return __awaiter2(this, void 0, void 0, function* () { + const pkgMetadata = metadata["@nestjs/swagger"]; + if (!pkgMetadata) { + return; + } + const { models, controllers } = pkgMetadata; + if (models) { + yield this.applyMetadata(models); + } + if (controllers) { + yield this.applyMetadata(controllers); + } + this.runHooks(); + }); + } + applyMetadata(meta) { + return __awaiter2(this, void 0, void 0, function* () { + const loadPromises = meta.map(([fileImport, fileMeta]) => __awaiter2(this, void 0, void 0, function* () { + const fileRef = yield fileImport; + Object.keys(fileMeta).map((key) => { + const clsRef = fileRef[key]; + clsRef[plugin_constants_1.METADATA_FACTORY_NAME] = () => fileMeta[key]; + }); + })); + yield Promise.all(loadPromises); + }); + } + runHooks() { + _MetadataLoader.refreshHooks.forEach((hook) => hook()); + } + }; + exports2.MetadataLoader = MetadataLoader; + MetadataLoader.refreshHooks = new Array(); + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/model-properties-accessor.js +var require_model_properties_accessor = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/model-properties-accessor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ModelPropertiesAccessor = void 0; + var shared_utils_1 = require_shared_utils(); + require_Reflect(); + var constants_1 = require_constants8(); + var api_property_decorator_1 = require_api_property_decorator(); + var plugin_constants_1 = require_plugin_constants(); + var ModelPropertiesAccessor = class { + getModelProperties(prototype) { + const properties = Reflect.getMetadata(constants_1.DECORATORS.API_MODEL_PROPERTIES_ARRAY, prototype) || []; + return properties.filter(shared_utils_1.isString).filter((key) => key.charAt(0) === ":" && !(0, shared_utils_1.isFunction)(prototype[key])).map((key) => key.slice(1)); + } + applyMetadataFactory(prototype) { + const classPrototype = prototype; + do { + if (!prototype.constructor) { + return; + } + if (!prototype.constructor[plugin_constants_1.METADATA_FACTORY_NAME]) { + continue; + } + const metadata = prototype.constructor[plugin_constants_1.METADATA_FACTORY_NAME](); + const properties = Object.keys(metadata); + properties.forEach((key) => { + (0, api_property_decorator_1.createApiPropertyDecorator)(metadata[key], false)(classPrototype, key); + }); + } while ((prototype = Reflect.getPrototypeOf(prototype)) && prototype !== Object.prototype && prototype); + } + }; + exports2.ModelPropertiesAccessor = ModelPropertiesAccessor; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-extra-models.explorer.js +var require_api_extra_models_explorer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-extra-models.explorer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exploreApiExtraModelsMetadata = exports2.exploreGlobalApiExtraModelsMetadata = void 0; + var constants_1 = require_constants8(); + var exploreGlobalApiExtraModelsMetadata = (metatype) => { + const extraModels = Reflect.getMetadata(constants_1.DECORATORS.API_EXTRA_MODELS, metatype); + return extraModels || []; + }; + exports2.exploreGlobalApiExtraModelsMetadata = exploreGlobalApiExtraModelsMetadata; + var exploreApiExtraModelsMetadata = (instance, prototype, method) => Reflect.getMetadata(constants_1.DECORATORS.API_EXTRA_MODELS, method) || []; + exports2.exploreApiExtraModelsMetadata = exploreApiExtraModelsMetadata; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/get-schema-path.util.js +var require_get_schema_path_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/get-schema-path.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.refs = exports2.getSchemaPath = void 0; + var shared_utils_1 = require_shared_utils(); + function getSchemaPath(model) { + const modelName = (0, shared_utils_1.isString)(model) ? model : model && model.name; + return `#/components/schemas/${modelName}`; + } + exports2.getSchemaPath = getSchemaPath; + function refs(...models) { + return models.map((item) => ({ + $ref: getSchemaPath(item.name) + })); + } + exports2.refs = refs; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/index.js +var require_utils13 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_get_schema_path_util(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/is-body-parameter.util.js +var require_is_body_parameter_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/is-body-parameter.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBodyParameter = void 0; + function isBodyParameter(param) { + return param.in === "body"; + } + exports2.isBodyParameter = isBodyParameter; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/constants.js +var require_constants9 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BUILT_IN_TYPES = void 0; + exports2.BUILT_IN_TYPES = [String, Boolean, Number, Object, Array]; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/is-built-in-type.util.js +var require_is_built_in_type_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/is-built-in-type.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBuiltInType = void 0; + var lodash_1 = require_lodash(); + var constants_1 = require_constants9(); + function isBuiltInType(type) { + return (0, lodash_1.isFunction)(type) && constants_1.BUILT_IN_TYPES.some((item) => item === type); + } + exports2.isBuiltInType = isBuiltInType; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/is-date-ctor.util.js +var require_is_date_ctor_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/is-date-ctor.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isDateCtor = void 0; + function isDateCtor(type) { + return type === Date; + } + exports2.isDateCtor = isDateCtor; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js +var require_schema_object_factory = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SchemaObjectFactory = void 0; + var shared_utils_1 = require_shared_utils(); + var lodash_1 = require_lodash(); + var constants_1 = require_constants8(); + var helpers_1 = require_helpers2(); + var api_extra_models_explorer_1 = require_api_extra_models_explorer(); + var utils_1 = require_utils13(); + var enum_utils_1 = require_enum_utils(); + var is_body_parameter_util_1 = require_is_body_parameter_util(); + var is_built_in_type_util_1 = require_is_built_in_type_util(); + var is_date_ctor_util_1 = require_is_date_ctor_util(); + var SchemaObjectFactory = class { + constructor(modelPropertiesAccessor, swaggerTypesMapper) { + this.modelPropertiesAccessor = modelPropertiesAccessor; + this.swaggerTypesMapper = swaggerTypesMapper; + } + createFromModel(parameters, schemas) { + const parameterObjects = parameters.map((param) => { + if (this.isLazyTypeFunc(param.type)) { + [param.type, param.isArray] = (0, helpers_1.getTypeIsArrayTuple)(param.type(), void 0); + } + if (!(0, is_body_parameter_util_1.isBodyParameter)(param) && param.enumName) { + return this.createEnumParam(param, schemas); + } + if (this.isPrimitiveType(param.type)) { + return param; + } + if (this.isArrayCtor(param.type)) { + return this.mapArrayCtorParam(param); + } + if (!(0, is_body_parameter_util_1.isBodyParameter)(param)) { + return this.createQueryOrParamSchema(param, schemas); + } + const modelName = this.exploreModelSchema(param.type, schemas); + const name = param.name || modelName; + const schema = Object.assign(Object.assign({}, param.schema || {}), { $ref: (0, utils_1.getSchemaPath)(modelName) }); + const isArray = param.isArray; + param = (0, lodash_1.omit)(param, "isArray"); + if (isArray) { + return Object.assign(Object.assign({}, param), { name, schema: { + type: "array", + items: schema + } }); + } + return Object.assign(Object.assign({}, param), { + name, + schema + }); + }); + return (0, lodash_1.flatten)(parameterObjects); + } + createQueryOrParamSchema(param, schemas) { + if ((0, is_date_ctor_util_1.isDateCtor)(param.type)) { + return Object.assign(Object.assign({ format: "date-time" }, param), { type: "string" }); + } + if (this.isBigInt(param.type)) { + return Object.assign(Object.assign({ format: "int64" }, param), { type: "integer" }); + } + if ((0, lodash_1.isFunction)(param.type)) { + const propertiesWithType = this.extractPropertiesFromType(param.type, schemas); + if (!propertiesWithType) { + return param; + } + return propertiesWithType.map((property) => { + var _a, _b; + const parameterObject = Object.assign(Object.assign({}, (0, lodash_1.omit)(property, "enumName")), { in: (_a = param.in) !== null && _a !== void 0 ? _a : "query", required: (_b = property.required) !== null && _b !== void 0 ? _b : true }); + return parameterObject; + }); + } + return param; + } + extractPropertiesFromType(type, schemas, pendingSchemasRefs = []) { + const { prototype } = type; + if (!prototype) { + return; + } + const extraModels = (0, api_extra_models_explorer_1.exploreGlobalApiExtraModelsMetadata)(type); + extraModels.forEach((item) => this.exploreModelSchema(item, schemas, pendingSchemasRefs)); + this.modelPropertiesAccessor.applyMetadataFactory(prototype); + const modelProperties = this.modelPropertiesAccessor.getModelProperties(prototype); + const propertiesWithType = modelProperties.map((key) => { + const property = this.mergePropertyWithMetadata(key, prototype, schemas, pendingSchemasRefs); + const schemaCombinators = ["oneOf", "anyOf", "allOf"]; + let keyOfCombinators = ""; + if (schemaCombinators.some((_key) => { + keyOfCombinators = _key; + return _key in property; + })) { + if (((property === null || property === void 0 ? void 0 : property.type) === "array" || property.isArray) && keyOfCombinators) { + property.items = {}; + property.items[keyOfCombinators] = property[keyOfCombinators]; + delete property[keyOfCombinators]; + } else { + delete property.type; + } + } + return property; + }); + return propertiesWithType; + } + exploreModelSchema(type, schemas, pendingSchemasRefs = []) { + if (this.isLazyTypeFunc(type)) { + type = type(); + } + const propertiesWithType = this.extractPropertiesFromType(type, schemas, pendingSchemasRefs); + if (!propertiesWithType) { + return ""; + } + const extensionProperties = Reflect.getMetadata(constants_1.DECORATORS.API_EXTENSION, type) || {}; + const typeDefinition = Object.assign({ type: "object", properties: (0, lodash_1.mapValues)((0, lodash_1.keyBy)(propertiesWithType, "name"), (property) => (0, lodash_1.omit)(property, ["name", "isArray", "required", "enumName"])) }, extensionProperties); + const typeDefinitionRequiredFields = propertiesWithType.filter((property) => property.required != false).map((property) => property.name); + if (typeDefinitionRequiredFields.length > 0) { + typeDefinition["required"] = typeDefinitionRequiredFields; + } + schemas[type.name] = typeDefinition; + return type.name; + } + mergePropertyWithMetadata(key, prototype, schemas, pendingSchemaRefs, metadata) { + if (!metadata) { + metadata = Reflect.getMetadata(constants_1.DECORATORS.API_MODEL_PROPERTIES, prototype, key) || {}; + } + if (this.isLazyTypeFunc(metadata.type)) { + metadata.type = metadata.type(); + [metadata.type, metadata.isArray] = (0, helpers_1.getTypeIsArrayTuple)(metadata.type, metadata.isArray); + } + if (Array.isArray(metadata.type)) { + return this.createFromNestedArray(key, metadata, schemas, pendingSchemaRefs); + } + return this.createSchemaMetadata(key, metadata, schemas, pendingSchemaRefs); + } + createEnumParam(param, schemas) { + var _a, _b, _c, _d, _e; + const enumName = param.enumName; + const $ref = (0, utils_1.getSchemaPath)(enumName); + if (!(enumName in schemas)) { + const _enum = param.enum ? param.enum : param.schema ? param.schema["items"] ? param.schema["items"]["enum"] : param.schema["enum"] : param.isArray && param.items ? param.items.enum : void 0; + schemas[enumName] = Object.assign({ type: (_d = param.isArray ? (_b = (_a = param.schema) === null || _a === void 0 ? void 0 : _a["items"]) === null || _b === void 0 ? void 0 : _b["type"] : (_c = param.schema) === null || _c === void 0 ? void 0 : _c["type"]) !== null && _d !== void 0 ? _d : "string", enum: _enum }, param["x-enumNames"] ? { "x-enumNames": param["x-enumNames"] } : {}); + } + param.schema = param.isArray || ((_e = param.schema) === null || _e === void 0 ? void 0 : _e["items"]) ? { type: "array", items: { $ref } } : { $ref }; + return (0, lodash_1.omit)(param, ["isArray", "items", "enumName", "enum", "x-enumNames"]); + } + createEnumSchemaType(key, metadata, schemas) { + var _a; + if (!metadata.enumName) { + return Object.assign(Object.assign({}, metadata), { name: metadata.name || key }); + } + const enumName = metadata.enumName; + const $ref = (0, utils_1.getSchemaPath)(enumName); + const additionalParams = ["description", "deprecated", "default"]; + const additionalFields = additionalParams.reduce((acc, param) => Object.assign(Object.assign({}, acc), metadata[param] && { [param]: metadata[param] }), {}); + const enumType = (_a = metadata.isArray ? metadata.items["type"] : metadata.type) !== null && _a !== void 0 ? _a : "string"; + schemas[enumName] = Object.assign(Object.assign({ type: enumType }, additionalFields), { enum: metadata.isArray && metadata.items ? metadata.items["enum"] : metadata.enum }); + const _schemaObject = Object.assign(Object.assign({}, metadata), { name: metadata.name || key, type: metadata.isArray ? "array" : "string" }); + const refHost = metadata.isArray ? { items: { $ref } } : { $ref }; + const paramObject = Object.assign(Object.assign({}, _schemaObject), refHost); + const pathsToOmit = ["enum", "enumName", ...additionalParams]; + if (!metadata.isArray) { + pathsToOmit.push("type"); + } + return (0, lodash_1.omit)(paramObject, pathsToOmit); + } + createNotBuiltInTypeReference(key, metadata, trueMetadataType, schemas, pendingSchemaRefs) { + if ((0, shared_utils_1.isUndefined)(trueMetadataType)) { + throw new Error(`A circular dependency has been detected (property key: "${key}"). Please, make sure that each side of a bidirectional relationships are using lazy resolvers ("type: () => ClassType").`); + } + let schemaObjectName = trueMetadataType.name; + if (!(schemaObjectName in schemas) && !pendingSchemaRefs.includes(schemaObjectName)) { + schemaObjectName = this.exploreModelSchema(trueMetadataType, schemas, [...pendingSchemaRefs, schemaObjectName]); + } + const $ref = (0, utils_1.getSchemaPath)(schemaObjectName); + if (metadata.isArray) { + return this.transformToArraySchemaProperty(metadata, key, { $ref }); + } + const keysToRemove = ["type", "isArray", "required", "name"]; + const validMetadataObject = (0, lodash_1.omit)(metadata, keysToRemove); + const extraMetadataKeys = Object.keys(validMetadataObject); + if (extraMetadataKeys.length > 0) { + return Object.assign(Object.assign({ name: metadata.name || key, required: metadata.required }, validMetadataObject), { allOf: [{ $ref }] }); + } + return { + name: metadata.name || key, + required: metadata.required, + $ref + }; + } + transformToArraySchemaProperty(metadata, key, type) { + const keysToRemove = ["type", "enum"]; + const [movedProperties, keysToMove] = this.extractPropertyModifiers(metadata); + const schemaHost = Object.assign(Object.assign({}, (0, lodash_1.omit)(metadata, [...keysToRemove, ...keysToMove])), { name: metadata.name || key, type: "array", items: (0, lodash_1.isString)(type) ? Object.assign({ type }, movedProperties) : Object.assign(Object.assign({}, type), movedProperties) }); + schemaHost.items = (0, lodash_1.omitBy)(schemaHost.items, shared_utils_1.isUndefined); + return schemaHost; + } + mapArrayCtorParam(param) { + return Object.assign(Object.assign({}, (0, lodash_1.omit)(param, "type")), { schema: { + type: "array", + items: { + type: "string" + } + } }); + } + createFromObjectLiteral(key, literalObj, schemas) { + const objLiteralKeys = Object.keys(literalObj); + const properties = {}; + objLiteralKeys.forEach((key2) => { + const propertyCompilerMetadata = literalObj[key2]; + if ((0, enum_utils_1.isEnumArray)(propertyCompilerMetadata)) { + propertyCompilerMetadata.type = "array"; + const enumValues = (0, enum_utils_1.getEnumValues)(propertyCompilerMetadata.enum); + propertyCompilerMetadata.items = { + type: (0, enum_utils_1.getEnumType)(enumValues), + enum: enumValues + }; + delete propertyCompilerMetadata.enum; + } else if (propertyCompilerMetadata.enum) { + const enumValues = (0, enum_utils_1.getEnumValues)(propertyCompilerMetadata.enum); + propertyCompilerMetadata.enum = enumValues; + propertyCompilerMetadata.type = (0, enum_utils_1.getEnumType)(enumValues); + } + const propertyMetadata = this.mergePropertyWithMetadata(key2, Object, schemas, [], propertyCompilerMetadata); + const keysToRemove = ["isArray", "name"]; + const validMetadataObject = (0, lodash_1.omit)(propertyMetadata, keysToRemove); + properties[key2] = validMetadataObject; + }); + return { + name: key, + type: "object", + properties + }; + } + createFromNestedArray(key, metadata, schemas, pendingSchemaRefs) { + const recurse = (type) => { + if (!Array.isArray(type)) { + const schemaMetadata = this.createSchemaMetadata(key, metadata, schemas, pendingSchemaRefs, type); + return (0, lodash_1.omit)(schemaMetadata, ["isArray", "name"]); + } + return { + name: key, + type: "array", + items: recurse(type[0]) + }; + }; + return recurse(metadata.type); + } + createSchemaMetadata(key, metadata, schemas, pendingSchemaRefs, nestedArrayType) { + const typeRef = nestedArrayType || metadata.type; + if (this.isObjectLiteral(typeRef)) { + return this.createFromObjectLiteral(key, typeRef, schemas); + } + if ((0, lodash_1.isString)(typeRef)) { + if ((0, enum_utils_1.isEnumMetadata)(metadata)) { + return this.createEnumSchemaType(key, metadata, schemas); + } + if (metadata.isArray) { + return this.transformToArraySchemaProperty(metadata, key, typeRef); + } + return Object.assign(Object.assign({}, metadata), { name: metadata.name || key }); + } + if ((0, is_date_ctor_util_1.isDateCtor)(typeRef)) { + if (metadata.isArray) { + return this.transformToArraySchemaProperty(metadata, key, { + format: metadata.format || "date-time", + type: "string" + }); + } + return Object.assign(Object.assign({ format: "date-time" }, metadata), { type: "string", name: metadata.name || key }); + } + if (this.isBigInt(typeRef)) { + return Object.assign(Object.assign({ format: "int64" }, metadata), { type: "integer", name: metadata.name || key }); + } + if (!(0, is_built_in_type_util_1.isBuiltInType)(typeRef)) { + return this.createNotBuiltInTypeReference(key, metadata, typeRef, schemas, pendingSchemaRefs); + } + const typeName = this.getTypeName(typeRef); + const itemType = this.swaggerTypesMapper.mapTypeToOpenAPIType(typeName); + if (metadata.isArray) { + return this.transformToArraySchemaProperty(metadata, key, { + type: itemType + }); + } else if (itemType === "array") { + const defaultOnArray = "string"; + return this.transformToArraySchemaProperty(metadata, key, { + type: defaultOnArray + }); + } + return Object.assign(Object.assign({}, metadata), { name: metadata.name || key, type: itemType }); + } + isArrayCtor(type) { + return type === Array; + } + isPrimitiveType(type) { + return (0, lodash_1.isFunction)(type) && [String, Boolean, Number].some((item) => item === type); + } + isLazyTypeFunc(type) { + return (0, lodash_1.isFunction)(type) && type.name == "type"; + } + getTypeName(type) { + return type && (0, lodash_1.isFunction)(type) ? type.name : type; + } + isObjectLiteral(obj2) { + if (typeof obj2 !== "object" || !obj2) { + return false; + } + const hasOwnProp = Object.prototype.hasOwnProperty; + let objPrototype = obj2; + while (Object.getPrototypeOf(objPrototype = Object.getPrototypeOf(objPrototype)) !== null) + ; + for (const prop in obj2) { + if (!hasOwnProp.call(obj2, prop) && !hasOwnProp.call(objPrototype, prop)) { + return false; + } + } + return Object.getPrototypeOf(obj2) === objPrototype; + } + isBigInt(type) { + return type === BigInt; + } + extractPropertyModifiers(metadata) { + const modifierKeys = [ + "format", + "maximum", + "maxLength", + "minimum", + "minLength", + "pattern" + ]; + return [(0, lodash_1.pick)(metadata, modifierKeys), modifierKeys]; + } + }; + exports2.SchemaObjectFactory = SchemaObjectFactory; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/swagger-types-mapper.js +var require_swagger_types_mapper = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/swagger-types-mapper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SwaggerTypesMapper = void 0; + var lodash_1 = require_lodash(); + var SwaggerTypesMapper = class { + constructor() { + this.keysToRemove = [ + "type", + "isArray", + "enum", + "enumName", + "items", + "$ref", + ...this.getSchemaOptionsKeys() + ]; + } + mapParamTypes(parameters) { + return parameters.map((param) => { + if (this.hasSchemaDefinition(param)) { + return this.omitParamKeys(param); + } + const { type } = param; + const typeName = type && (0, lodash_1.isFunction)(type) ? this.mapTypeToOpenAPIType(type.name) : this.mapTypeToOpenAPIType(type); + const paramWithTypeMetadata = (0, lodash_1.omitBy)(Object.assign(Object.assign({}, param), { type: typeName }), lodash_1.isUndefined); + if (this.isEnumArrayType(paramWithTypeMetadata)) { + return this.mapEnumArrayType(paramWithTypeMetadata, this.keysToRemove); + } else if (paramWithTypeMetadata.isArray) { + return this.mapArrayType(paramWithTypeMetadata, this.keysToRemove); + } + return Object.assign(Object.assign({}, (0, lodash_1.omit)(param, this.keysToRemove)), { schema: (0, lodash_1.omitBy)(Object.assign(Object.assign(Object.assign({}, this.getSchemaOptions(param)), param.schema || {}), { enum: paramWithTypeMetadata.enum, type: paramWithTypeMetadata.type, $ref: paramWithTypeMetadata.$ref }), lodash_1.isUndefined) }); + }); + } + mapTypeToOpenAPIType(type) { + if (!(type && type.charAt)) { + return; + } + return type.charAt(0).toLowerCase() + type.slice(1); + } + mapEnumArrayType(param, keysToRemove) { + return Object.assign(Object.assign({}, (0, lodash_1.omit)(param, keysToRemove)), { schema: Object.assign(Object.assign({}, this.getSchemaOptions(param)), { type: "array", items: param.items }) }); + } + mapArrayType(param, keysToRemove) { + const items = param.items || (0, lodash_1.omitBy)(Object.assign(Object.assign({}, param.schema || {}), { enum: param.enum, type: this.mapTypeToOpenAPIType(param.type) }), lodash_1.isUndefined); + return Object.assign(Object.assign({}, (0, lodash_1.omit)(param, keysToRemove)), { schema: Object.assign(Object.assign({}, this.getSchemaOptions(param)), { type: "array", items }) }); + } + getSchemaOptions(param) { + const schemaKeys = this.getSchemaOptionsKeys(); + const optionsObject = schemaKeys.reduce((acc, key) => Object.assign(Object.assign({}, acc), { [key]: param[key] }), {}); + return (0, lodash_1.omitBy)(optionsObject, lodash_1.isUndefined); + } + isEnumArrayType(param) { + return param.isArray && param.items && param.items.enum; + } + hasSchemaDefinition(param) { + return !!param.schema; + } + omitParamKeys(param) { + return (0, lodash_1.omit)(param, this.keysToRemove); + } + getSchemaOptionsKeys() { + return [ + "properties", + "patternProperties", + "additionalProperties", + "minimum", + "maximum", + "maxProperties", + "minItems", + "minProperties", + "maxItems", + "minLength", + "maxLength", + "exclusiveMaximum", + "exclusiveMinimum", + "uniqueItems", + "title", + "format", + "pattern", + "nullable", + "default", + "example" + ]; + } + }; + exports2.SwaggerTypesMapper = SwaggerTypesMapper; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-exclude-controller.explorer.js +var require_api_exclude_controller_explorer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-exclude-controller.explorer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exploreApiExcludeControllerMetadata = void 0; + var constants_1 = require_constants8(); + var exploreApiExcludeControllerMetadata = (metatype) => { + var _a; + return ((_a = Reflect.getMetadata(constants_1.DECORATORS.API_EXCLUDE_CONTROLLER, metatype)) === null || _a === void 0 ? void 0 : _a[0]) === true; + }; + exports2.exploreApiExcludeControllerMetadata = exploreApiExcludeControllerMetadata; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-exclude-endpoint.explorer.js +var require_api_exclude_endpoint_explorer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-exclude-endpoint.explorer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exploreApiExcludeEndpointMetadata = void 0; + var constants_1 = require_constants8(); + var exploreApiExcludeEndpointMetadata = (instance, prototype, method) => Reflect.getMetadata(constants_1.DECORATORS.API_EXCLUDE_ENDPOINT, method); + exports2.exploreApiExcludeEndpointMetadata = exploreApiExcludeEndpointMetadata; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-headers.explorer.js +var require_api_headers_explorer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-headers.explorer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exploreGlobalApiHeaderMetadata = void 0; + var constants_1 = require_constants8(); + var exploreGlobalApiHeaderMetadata = (metatype) => { + const headers = Reflect.getMetadata(constants_1.DECORATORS.API_HEADERS, metatype); + return headers ? { root: { parameters: headers }, depth: 1 } : void 0; + }; + exports2.exploreGlobalApiHeaderMetadata = exploreGlobalApiHeaderMetadata; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-operation.explorer.js +var require_api_operation_explorer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-operation.explorer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exploreApiOperationMetadata = void 0; + var constants_1 = require_constants8(); + var api_operation_decorator_1 = require_api_operation_decorator(); + var plugin_constants_1 = require_plugin_constants(); + var exploreApiOperationMetadata = (instance, prototype, method) => { + applyMetadataFactory(prototype, instance); + return Reflect.getMetadata(constants_1.DECORATORS.API_OPERATION, method); + }; + exports2.exploreApiOperationMetadata = exploreApiOperationMetadata; + function applyMetadataFactory(prototype, instance) { + const classPrototype = prototype; + do { + if (!prototype.constructor) { + return; + } + if (!prototype.constructor[plugin_constants_1.METADATA_FACTORY_NAME]) { + continue; + } + const metadata = prototype.constructor[plugin_constants_1.METADATA_FACTORY_NAME](); + const methodKeys = Object.keys(metadata).filter((key) => typeof instance[key] === "function"); + methodKeys.forEach((key) => { + const operationMeta = {}; + const { summary, deprecated, tags } = metadata[key]; + applyIfNotNil(operationMeta, "summary", summary); + applyIfNotNil(operationMeta, "deprecated", deprecated); + applyIfNotNil(operationMeta, "tags", tags); + if (Object.keys(operationMeta).length === 0) { + return; + } + (0, api_operation_decorator_1.ApiOperation)(operationMeta, { overrideExisting: false })(classPrototype, key, Object.getOwnPropertyDescriptor(classPrototype, key)); + }); + } while ((prototype = Reflect.getPrototypeOf(prototype)) && prototype !== Object.prototype && prototype); + } + function applyIfNotNil(target, key, value) { + if (value !== void 0 && value !== null) { + target[key] = value; + } + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/reverse-object-keys.util.js +var require_reverse_object_keys_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/reverse-object-keys.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.reverseObjectKeys = void 0; + function reverseObjectKeys(originalObject) { + const reversedObject = {}; + const keys = Object.keys(originalObject).reverse(); + for (const key of keys) { + reversedObject[key] = originalObject[key]; + } + return reversedObject; + } + exports2.reverseObjectKeys = reverseObjectKeys; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/parameter-metadata-accessor.js +var require_parameter_metadata_accessor = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/parameter-metadata-accessor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ParameterMetadataAccessor = void 0; + var constants_1 = require_constants(); + var route_paramtypes_enum_1 = require_route_paramtypes_enum(); + var lodash_1 = require_lodash(); + var reverse_object_keys_util_1 = require_reverse_object_keys_util(); + var PARAM_TOKEN_PLACEHOLDER = "placeholder"; + var ParameterMetadataAccessor = class { + explore(instance, prototype, method) { + const types = Reflect.getMetadata(constants_1.PARAMTYPES_METADATA, instance, method.name); + const routeArgsMetadata = Reflect.getMetadata(constants_1.ROUTE_ARGS_METADATA, instance.constructor, method.name) || {}; + const parametersWithType = (0, lodash_1.mapValues)((0, reverse_object_keys_util_1.reverseObjectKeys)(routeArgsMetadata), (param) => ({ + type: types[param.index], + name: param.data, + required: true + })); + const excludePredicate = (val) => val.in === PARAM_TOKEN_PLACEHOLDER || val.name && val.in === "body"; + const parameters = (0, lodash_1.omitBy)((0, lodash_1.mapValues)(parametersWithType, (val, key) => Object.assign(Object.assign({}, val), { in: this.mapParamType(key) })), excludePredicate); + return !(0, lodash_1.isEmpty)(parameters) ? parameters : void 0; + } + mapParamType(key) { + const keyPair = key.split(":"); + switch (Number(keyPair[0])) { + case route_paramtypes_enum_1.RouteParamtypes.BODY: + return "body"; + case route_paramtypes_enum_1.RouteParamtypes.PARAM: + return "path"; + case route_paramtypes_enum_1.RouteParamtypes.QUERY: + return "query"; + case route_paramtypes_enum_1.RouteParamtypes.HEADERS: + return "header"; + default: + return PARAM_TOKEN_PLACEHOLDER; + } + } + }; + exports2.ParameterMetadataAccessor = ParameterMetadataAccessor; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/parameters-metadata-mapper.js +var require_parameters_metadata_mapper = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/parameters-metadata-mapper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ParametersMetadataMapper = void 0; + var shared_utils_1 = require_shared_utils(); + var lodash_1 = require_lodash(); + var constants_1 = require_constants8(); + var is_body_parameter_util_1 = require_is_body_parameter_util(); + var ParametersMetadataMapper = class { + constructor(modelPropertiesAccessor) { + this.modelPropertiesAccessor = modelPropertiesAccessor; + } + transformModelToProperties(parameters) { + const properties = (0, lodash_1.flatMap)(parameters, (param) => { + if (!param || param.type === Object || !param.type) { + return void 0; + } + if (param.name) { + return param; + } + if ((0, is_body_parameter_util_1.isBodyParameter)(param)) { + const isCtor = param.type && (0, shared_utils_1.isFunction)(param.type); + const name = isCtor ? param.type.name : param.type; + return Object.assign(Object.assign({}, param), { name }); + } + const { prototype } = param.type; + this.modelPropertiesAccessor.applyMetadataFactory(prototype); + const modelProperties = this.modelPropertiesAccessor.getModelProperties(prototype); + return modelProperties.map((key) => this.mergeImplicitWithExplicit(key, prototype, param)); + }); + return properties.filter(lodash_1.identity); + } + mergeImplicitWithExplicit(key, prototype, param) { + const reflectedParam = Reflect.getMetadata(constants_1.DECORATORS.API_MODEL_PROPERTIES, prototype, key) || {}; + return Object.assign(Object.assign(Object.assign({}, param), reflectedParam), { name: reflectedParam.name || key }); + } + }; + exports2.ParametersMetadataMapper = ParametersMetadataMapper; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-parameters.explorer.js +var require_api_parameters_explorer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-parameters.explorer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exploreApiParametersMetadata = void 0; + var lodash_1 = require_lodash(); + var constants_1 = require_constants8(); + var model_properties_accessor_1 = require_model_properties_accessor(); + var parameter_metadata_accessor_1 = require_parameter_metadata_accessor(); + var parameters_metadata_mapper_1 = require_parameters_metadata_mapper(); + var schema_object_factory_1 = require_schema_object_factory(); + var swagger_types_mapper_1 = require_swagger_types_mapper(); + var global_parameters_storage_1 = require_global_parameters_storage(); + var parameterMetadataAccessor = new parameter_metadata_accessor_1.ParameterMetadataAccessor(); + var modelPropertiesAccessor = new model_properties_accessor_1.ModelPropertiesAccessor(); + var parametersMetadataMapper = new parameters_metadata_mapper_1.ParametersMetadataMapper(modelPropertiesAccessor); + var swaggerTypesMapper = new swagger_types_mapper_1.SwaggerTypesMapper(); + var schemaObjectFactory = new schema_object_factory_1.SchemaObjectFactory(modelPropertiesAccessor, swaggerTypesMapper); + var exploreApiParametersMetadata = (schemas, instance, prototype, method) => { + const explicitParameters = Reflect.getMetadata(constants_1.DECORATORS.API_PARAMETERS, method); + const globalParameters = global_parameters_storage_1.GlobalParametersStorage.getAll(); + const parametersMetadata = parameterMetadataAccessor.explore(instance, prototype, method); + const noExplicitAndGlobalMetadata = (0, lodash_1.isNil)(explicitParameters) && (0, lodash_1.isNil)(globalParameters); + if (noExplicitAndGlobalMetadata && (0, lodash_1.isNil)(parametersMetadata)) { + return void 0; + } + const reflectedParametersAsProperties = parametersMetadataMapper.transformModelToProperties(parametersMetadata || {}); + let properties = reflectedParametersAsProperties; + if (!noExplicitAndGlobalMetadata) { + const mergeImplicitAndExplicit = (item) => (0, lodash_1.assign)(item, (0, lodash_1.find)(explicitParameters, ["name", item.name])); + properties = removeBodyMetadataIfExplicitExists(properties, explicitParameters); + properties = (0, lodash_1.map)(properties, mergeImplicitAndExplicit); + properties = (0, lodash_1.unionWith)(properties, explicitParameters, globalParameters, (arrVal, othVal) => { + return arrVal.name === othVal.name && arrVal.in === othVal.in; + }); + } + const paramsWithDefinitions = schemaObjectFactory.createFromModel(properties, schemas); + const parameters = swaggerTypesMapper.mapParamTypes(paramsWithDefinitions); + return parameters ? { parameters } : void 0; + }; + exports2.exploreApiParametersMetadata = exploreApiParametersMetadata; + function removeBodyMetadataIfExplicitExists(properties, explicitParams) { + const isBodyReflected = (0, lodash_1.some)(properties, (p) => p.in === "body"); + const isBodyDefinedExplicitly = (0, lodash_1.some)(explicitParams, (p) => p.in === "body"); + if (isBodyReflected && isBodyDefinedExplicitly) { + return (0, lodash_1.omitBy)(properties, (p) => p.in === "body"); + } + return properties; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/mimetype-content-wrapper.js +var require_mimetype_content_wrapper = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/mimetype-content-wrapper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MimetypeContentWrapper = void 0; + function removeUndefinedKeys(obj2) { + Object.entries(obj2).forEach(([key, value]) => { + if (value === void 0) { + delete obj2[key]; + } + }); + return obj2; + } + var MimetypeContentWrapper = class { + wrap(mimetype, obj2) { + const content = mimetype.reduce((acc, item) => Object.assign(Object.assign({}, acc), { [item]: removeUndefinedKeys(obj2) }), {}); + return { content }; + } + }; + exports2.MimetypeContentWrapper = MimetypeContentWrapper; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/response-object-mapper.js +var require_response_object_mapper = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/response-object-mapper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ResponseObjectMapper = void 0; + var lodash_1 = require_lodash(); + var utils_1 = require_utils13(); + var mimetype_content_wrapper_1 = require_mimetype_content_wrapper(); + var ResponseObjectMapper = class { + constructor() { + this.mimetypeContentWrapper = new mimetype_content_wrapper_1.MimetypeContentWrapper(); + } + toArrayRefObject(response, name, produces) { + return Object.assign(Object.assign({}, response), this.mimetypeContentWrapper.wrap(produces, { + schema: { + type: "array", + items: { + $ref: (0, utils_1.getSchemaPath)(name) + } + }, + example: response.example + })); + } + toRefObject(response, name, produces) { + return Object.assign(Object.assign({}, response), this.mimetypeContentWrapper.wrap(produces, { + schema: { + $ref: (0, utils_1.getSchemaPath)(name) + }, + example: response.example + })); + } + wrapSchemaWithContent(response, produces) { + if (!response.schema && !response.example) { + return response; + } + const content = this.mimetypeContentWrapper.wrap(produces, { + schema: response.schema, + example: response.example + }); + return Object.assign(Object.assign({}, (0, lodash_1.omit)(response, ["schema", "example"])), content); + } + }; + exports2.ResponseObjectMapper = ResponseObjectMapper; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/response-object-factory.js +var require_response_object_factory = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/services/response-object-factory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ResponseObjectFactory = void 0; + var lodash_1 = require_lodash(); + var is_built_in_type_util_1 = require_is_built_in_type_util(); + var mimetype_content_wrapper_1 = require_mimetype_content_wrapper(); + var model_properties_accessor_1 = require_model_properties_accessor(); + var response_object_mapper_1 = require_response_object_mapper(); + var schema_object_factory_1 = require_schema_object_factory(); + var swagger_types_mapper_1 = require_swagger_types_mapper(); + var ResponseObjectFactory = class { + constructor() { + this.mimetypeContentWrapper = new mimetype_content_wrapper_1.MimetypeContentWrapper(); + this.modelPropertiesAccessor = new model_properties_accessor_1.ModelPropertiesAccessor(); + this.swaggerTypesMapper = new swagger_types_mapper_1.SwaggerTypesMapper(); + this.schemaObjectFactory = new schema_object_factory_1.SchemaObjectFactory(this.modelPropertiesAccessor, this.swaggerTypesMapper); + this.responseObjectMapper = new response_object_mapper_1.ResponseObjectMapper(); + } + create(response, produces, schemas) { + const { type, isArray } = response; + response = (0, lodash_1.omit)(response, ["isArray"]); + if (!type) { + return this.responseObjectMapper.wrapSchemaWithContent(response, produces); + } + if ((0, is_built_in_type_util_1.isBuiltInType)(type)) { + const typeName = type && (0, lodash_1.isFunction)(type) ? type.name : type; + const swaggerType = this.swaggerTypesMapper.mapTypeToOpenAPIType(typeName); + if (isArray) { + const content2 = this.mimetypeContentWrapper.wrap(produces, { + schema: { + type: "array", + items: { + type: swaggerType + } + } + }); + return Object.assign(Object.assign({}, response), content2); + } + const content = this.mimetypeContentWrapper.wrap(produces, { + schema: { + type: swaggerType + } + }); + return Object.assign(Object.assign({}, response), content); + } + const name = this.schemaObjectFactory.exploreModelSchema(type, schemas); + if (isArray) { + return this.responseObjectMapper.toArrayRefObject(response, name, produces); + } + return this.responseObjectMapper.toRefObject(response, name, produces); + } + }; + exports2.ResponseObjectFactory = ResponseObjectFactory; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/merge-and-uniq.util.js +var require_merge_and_uniq_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/merge-and-uniq.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mergeAndUniq = void 0; + var lodash_1 = require_lodash(); + function mergeAndUniq(a = [], b = []) { + return (0, lodash_1.uniq)((0, lodash_1.merge)(a, b)); + } + exports2.mergeAndUniq = mergeAndUniq; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-response.explorer.js +var require_api_response_explorer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-response.explorer.js"(exports2) { + "use strict"; + var __rest2 = exports2 && exports2.__rest || function(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exploreApiResponseMetadata = exports2.exploreGlobalApiResponseMetadata = void 0; + var common_12 = require_common(); + var constants_1 = require_constants(); + var shared_utils_1 = require_shared_utils(); + var lodash_1 = require_lodash(); + var constants_2 = require_constants8(); + var decorators_1 = require_decorators5(); + var plugin_constants_1 = require_plugin_constants(); + var response_object_factory_1 = require_response_object_factory(); + var merge_and_uniq_util_1 = require_merge_and_uniq_util(); + var responseObjectFactory = new response_object_factory_1.ResponseObjectFactory(); + var exploreGlobalApiResponseMetadata = (schemas, metatype) => { + const responses = Reflect.getMetadata(constants_2.DECORATORS.API_RESPONSE, metatype); + const produces = Reflect.getMetadata(constants_2.DECORATORS.API_PRODUCES, metatype); + return responses ? { + responses: mapResponsesToSwaggerResponses(responses, schemas, produces) + } : void 0; + }; + exports2.exploreGlobalApiResponseMetadata = exploreGlobalApiResponseMetadata; + var exploreApiResponseMetadata = (schemas, instance, prototype, method) => { + applyMetadataFactory(prototype, instance); + const responses = Reflect.getMetadata(constants_2.DECORATORS.API_RESPONSE, method); + if (responses) { + const classProduces = Reflect.getMetadata(constants_2.DECORATORS.API_PRODUCES, prototype); + const methodProduces = Reflect.getMetadata(constants_2.DECORATORS.API_PRODUCES, method); + const produces = (0, merge_and_uniq_util_1.mergeAndUniq)((0, lodash_1.get)(classProduces, "produces"), methodProduces); + return mapResponsesToSwaggerResponses(responses, schemas, produces); + } + const status = getStatusCode(method); + if (status) { + return { [status]: { description: "" } }; + } + return void 0; + }; + exports2.exploreApiResponseMetadata = exploreApiResponseMetadata; + var getStatusCode = (method) => { + const status = Reflect.getMetadata(constants_1.HTTP_CODE_METADATA, method); + if (status) { + return status; + } + const requestMethod = Reflect.getMetadata(constants_1.METHOD_METADATA, method); + switch (requestMethod) { + case common_12.RequestMethod.POST: + return common_12.HttpStatus.CREATED; + default: + return common_12.HttpStatus.OK; + } + }; + var omitParamType = (param) => (0, lodash_1.omit)(param, "type"); + var mapResponsesToSwaggerResponses = (responses, schemas, produces = ["application/json"]) => { + produces = (0, shared_utils_1.isEmpty)(produces) ? ["application/json"] : produces; + const openApiResponses = (0, lodash_1.mapValues)(responses, (response) => responseObjectFactory.create(response, produces, schemas)); + return (0, lodash_1.mapValues)(openApiResponses, omitParamType); + }; + function applyMetadataFactory(prototype, instance) { + const classPrototype = prototype; + do { + if (!prototype.constructor) { + return; + } + if (!prototype.constructor[plugin_constants_1.METADATA_FACTORY_NAME]) { + continue; + } + const metadata = prototype.constructor[plugin_constants_1.METADATA_FACTORY_NAME](); + const methodKeys = Object.keys(metadata).filter((key) => typeof instance[key] === "function"); + methodKeys.forEach((key) => { + const _a = metadata[key], { summary, deprecated, tags } = _a, meta = __rest2(_a, ["summary", "deprecated", "tags"]); + if (Object.keys(meta).length === 0) { + return; + } + if (meta.status === void 0) { + meta.status = getStatusCode(instance[key]); + } + (0, decorators_1.ApiResponse)(meta, { overrideExisting: false })(classPrototype, key, Object.getOwnPropertyDescriptor(classPrototype, key)); + }); + } while ((prototype = Reflect.getPrototypeOf(prototype)) && prototype !== Object.prototype && prototype); + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-security.explorer.js +var require_api_security_explorer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-security.explorer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exploreApiSecurityMetadata = exports2.exploreGlobalApiSecurityMetadata = void 0; + var constants_1 = require_constants8(); + var exploreGlobalApiSecurityMetadata = (metatype) => { + const security = Reflect.getMetadata(constants_1.DECORATORS.API_SECURITY, metatype); + return security ? { security } : void 0; + }; + exports2.exploreGlobalApiSecurityMetadata = exploreGlobalApiSecurityMetadata; + var exploreApiSecurityMetadata = (instance, prototype, method) => { + return Reflect.getMetadata(constants_1.DECORATORS.API_SECURITY, method); + }; + exports2.exploreApiSecurityMetadata = exploreApiSecurityMetadata; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-use-tags.explorer.js +var require_api_use_tags_explorer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/explorers/api-use-tags.explorer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exploreApiTagsMetadata = exports2.exploreGlobalApiTagsMetadata = void 0; + var constants_1 = require_constants8(); + var exploreGlobalApiTagsMetadata = (metatype) => { + const tags = Reflect.getMetadata(constants_1.DECORATORS.API_TAGS, metatype); + return tags ? { tags } : void 0; + }; + exports2.exploreGlobalApiTagsMetadata = exploreGlobalApiTagsMetadata; + var exploreApiTagsMetadata = (instance, prototype, method) => Reflect.getMetadata(constants_1.DECORATORS.API_TAGS, method); + exports2.exploreApiTagsMetadata = exploreApiTagsMetadata; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/swagger-explorer.js +var require_swagger_explorer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/swagger-explorer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SwaggerExplorer = void 0; + var common_12 = require_common(); + var constants_1 = require_constants(); + var interfaces_1 = require_interfaces(); + var shared_utils_1 = require_shared_utils(); + var core_12 = require_core3(); + var route_path_factory_1 = require_route_path_factory(); + var lodash_1 = require_lodash(); + var pathToRegexp = require_path_to_regexp(); + var constants_2 = require_constants8(); + var api_exclude_controller_explorer_1 = require_api_exclude_controller_explorer(); + var api_exclude_endpoint_explorer_1 = require_api_exclude_endpoint_explorer(); + var api_extra_models_explorer_1 = require_api_extra_models_explorer(); + var api_headers_explorer_1 = require_api_headers_explorer(); + var api_operation_explorer_1 = require_api_operation_explorer(); + var api_parameters_explorer_1 = require_api_parameters_explorer(); + var api_response_explorer_1 = require_api_response_explorer(); + var api_security_explorer_1 = require_api_security_explorer(); + var api_use_tags_explorer_1 = require_api_use_tags_explorer(); + var mimetype_content_wrapper_1 = require_mimetype_content_wrapper(); + var is_body_parameter_util_1 = require_is_body_parameter_util(); + var merge_and_uniq_util_1 = require_merge_and_uniq_util(); + var SwaggerExplorer = class { + constructor(schemaObjectFactory) { + this.schemaObjectFactory = schemaObjectFactory; + this.mimetypeContentWrapper = new mimetype_content_wrapper_1.MimetypeContentWrapper(); + this.metadataScanner = new core_12.MetadataScanner(); + this.schemas = {}; + this.operationIdFactory = (controllerKey, methodKey) => controllerKey ? `${controllerKey}_${methodKey}` : methodKey; + } + exploreController(wrapper, applicationConfig, modulePath, globalPrefix, operationIdFactory) { + this.routePathFactory = new route_path_factory_1.RoutePathFactory(applicationConfig); + if (operationIdFactory) { + this.operationIdFactory = operationIdFactory; + } + const { instance, metatype } = wrapper; + const prototype = Object.getPrototypeOf(instance); + const documentResolvers = { + root: [ + this.exploreRoutePathAndMethod, + api_operation_explorer_1.exploreApiOperationMetadata, + api_parameters_explorer_1.exploreApiParametersMetadata.bind(null, this.schemas) + ], + security: [api_security_explorer_1.exploreApiSecurityMetadata], + tags: [api_use_tags_explorer_1.exploreApiTagsMetadata], + responses: [api_response_explorer_1.exploreApiResponseMetadata.bind(null, this.schemas)] + }; + return this.generateDenormalizedDocument(metatype, prototype, instance, documentResolvers, applicationConfig, modulePath, globalPrefix); + } + getSchemas() { + return this.schemas; + } + generateDenormalizedDocument(metatype, prototype, instance, documentResolvers, applicationConfig, modulePath, globalPrefix) { + const self2 = this; + const excludeController = (0, api_exclude_controller_explorer_1.exploreApiExcludeControllerMetadata)(metatype); + if (excludeController) { + return []; + } + const globalMetadata = this.exploreGlobalMetadata(metatype); + const ctrlExtraModels = (0, api_extra_models_explorer_1.exploreGlobalApiExtraModelsMetadata)(metatype); + this.registerExtraModels(ctrlExtraModels); + const denormalizedPaths = this.metadataScanner.scanFromPrototype(instance, prototype, (name) => { + const targetCallback = prototype[name]; + const excludeEndpoint = (0, api_exclude_endpoint_explorer_1.exploreApiExcludeEndpointMetadata)(instance, prototype, targetCallback); + if (excludeEndpoint && excludeEndpoint.disable) { + return; + } + const ctrlExtraModels2 = (0, api_extra_models_explorer_1.exploreApiExtraModelsMetadata)(instance, prototype, targetCallback); + this.registerExtraModels(ctrlExtraModels2); + const methodMetadata = (0, lodash_1.mapValues)(documentResolvers, (explorers) => explorers.reduce((metadata, fn) => { + const exploredMetadata = fn.call(self2, instance, prototype, targetCallback, metatype, globalPrefix, modulePath, applicationConfig); + if (!exploredMetadata) { + return metadata; + } + if (!(0, lodash_1.isArray)(exploredMetadata)) { + if (Array.isArray(metadata)) { + return metadata.map((item) => Object.assign(Object.assign({}, item), exploredMetadata)); + } + return Object.assign(Object.assign({}, metadata), exploredMetadata); + } + return (0, lodash_1.isArray)(metadata) ? [...metadata, ...exploredMetadata] : exploredMetadata; + }, {})); + if (Array.isArray(methodMetadata.root)) { + return methodMetadata.root.map((endpointMetadata) => { + endpointMetadata = (0, lodash_1.cloneDeep)(Object.assign(Object.assign({}, methodMetadata), { root: endpointMetadata })); + const mergedMethodMetadata2 = this.mergeMetadata(globalMetadata, (0, lodash_1.omitBy)(endpointMetadata, lodash_1.isEmpty)); + return this.migrateOperationSchema(Object.assign(Object.assign({ responses: {} }, (0, lodash_1.omit)(globalMetadata, "chunks")), mergedMethodMetadata2), prototype, targetCallback); + }); + } + const mergedMethodMetadata = this.mergeMetadata(globalMetadata, (0, lodash_1.omitBy)(methodMetadata, lodash_1.isEmpty)); + return [ + this.migrateOperationSchema(Object.assign(Object.assign({ responses: {} }, (0, lodash_1.omit)(globalMetadata, "chunks")), mergedMethodMetadata), prototype, targetCallback) + ]; + }); + return (0, lodash_1.flatten)(denormalizedPaths).filter((path) => { + var _a; + return (_a = path.root) === null || _a === void 0 ? void 0 : _a.path; + }); + } + exploreGlobalMetadata(metatype) { + const globalExplorers = [ + api_use_tags_explorer_1.exploreGlobalApiTagsMetadata, + api_security_explorer_1.exploreGlobalApiSecurityMetadata, + api_response_explorer_1.exploreGlobalApiResponseMetadata.bind(null, this.schemas), + api_headers_explorer_1.exploreGlobalApiHeaderMetadata + ]; + const globalMetadata = globalExplorers.map((explorer) => explorer.call(explorer, metatype)).filter((val) => !(0, shared_utils_1.isUndefined)(val)).reduce((curr, next) => { + if (next.depth) { + return Object.assign(Object.assign({}, curr), { chunks: (curr.chunks || []).concat(next) }); + } + return Object.assign(Object.assign({}, curr), next); + }, {}); + return globalMetadata; + } + exploreRoutePathAndMethod(instance, prototype, method, metatype, globalPrefix, modulePath, applicationConfig) { + const methodPath = Reflect.getMetadata(constants_1.PATH_METADATA, method); + if ((0, shared_utils_1.isUndefined)(methodPath)) { + return void 0; + } + const requestMethod = Reflect.getMetadata(constants_1.METHOD_METADATA, method); + const methodVersion = Reflect.getMetadata(constants_1.VERSION_METADATA, method); + const versioningOptions = applicationConfig.getVersioning(); + const controllerVersion = this.getVersionMetadata(metatype, versioningOptions); + const versionOrVersions = methodVersion !== null && methodVersion !== void 0 ? methodVersion : controllerVersion; + const versions = this.getRoutePathVersions(versionOrVersions, versioningOptions); + const allRoutePaths = this.routePathFactory.create({ + methodPath, + methodVersion, + modulePath, + globalPrefix, + controllerVersion, + ctrlPath: this.reflectControllerPath(metatype), + versioningOptions: applicationConfig.getVersioning() + }, requestMethod); + return (0, lodash_1.flatten)(allRoutePaths.map((routePath) => { + const fullPath = this.validateRoutePath(routePath); + const apiExtension = Reflect.getMetadata(constants_2.DECORATORS.API_EXTENSION, method); + if (requestMethod === common_12.RequestMethod.ALL) { + const validMethods = Object.values(common_12.RequestMethod).filter((meth) => meth !== "ALL" && typeof meth === "string"); + return validMethods.map((meth) => Object.assign({ method: meth.toLowerCase(), path: fullPath === "" ? "/" : fullPath, operationId: `${this.getOperationId(instance, method)}_${meth.toLowerCase()}` }, apiExtension)); + } + const pathVersion = versions.find((v) => fullPath.includes(`/${v}/`)); + return Object.assign({ method: common_12.RequestMethod[requestMethod].toLowerCase(), path: fullPath === "" ? "/" : fullPath, operationId: this.getOperationId(instance, method, pathVersion) }, apiExtension); + })); + } + getOperationId(instance, method, version2) { + var _a; + return this.operationIdFactory(((_a = instance.constructor) === null || _a === void 0 ? void 0 : _a.name) || "", method.name, version2); + } + getRoutePathVersions(versionValue, versioningOptions) { + let versions = []; + if (!versionValue || (versioningOptions === null || versioningOptions === void 0 ? void 0 : versioningOptions.type) !== common_12.VersioningType.URI) { + return versions; + } + if (Array.isArray(versionValue)) { + versions = versionValue.filter((v) => v !== interfaces_1.VERSION_NEUTRAL); + } else if (versionValue !== interfaces_1.VERSION_NEUTRAL) { + versions = [versionValue]; + } + const prefix = this.routePathFactory.getVersionPrefix(versioningOptions); + versions = versions.map((v) => `${prefix}${v}`); + return versions; + } + reflectControllerPath(metatype) { + return Reflect.getMetadata(constants_1.PATH_METADATA, metatype); + } + validateRoutePath(path) { + if ((0, shared_utils_1.isUndefined)(path)) { + return ""; + } + if (Array.isArray(path)) { + path = (0, lodash_1.head)(path); + } + let pathWithParams = ""; + for (const item of pathToRegexp.parse(path)) { + pathWithParams += (0, shared_utils_1.isString)(item) ? item : `${item.prefix}{${item.name}}`; + } + return pathWithParams === "/" ? "" : (0, shared_utils_1.addLeadingSlash)(pathWithParams); + } + mergeMetadata(globalMetadata, methodMetadata) { + if (methodMetadata.root && !methodMetadata.root.parameters) { + methodMetadata.root.parameters = []; + } + const deepMerge = (metadata) => (value, key) => { + if (!metadata[key]) { + return value; + } + const globalValue = metadata[key]; + if (metadata.depth) { + return this.deepMergeMetadata(globalValue, value, metadata.depth); + } + return this.mergeValues(globalValue, value); + }; + if (globalMetadata.chunks) { + const { chunks } = globalMetadata; + chunks.forEach((chunk) => { + methodMetadata = (0, lodash_1.mapValues)(methodMetadata, deepMerge(chunk)); + }); + } + return (0, lodash_1.mapValues)(methodMetadata, deepMerge(globalMetadata)); + } + deepMergeMetadata(globalValue, methodValue, maxDepth, currentDepthLevel = 0) { + if (currentDepthLevel === maxDepth) { + return this.mergeValues(globalValue, methodValue); + } + return (0, lodash_1.mapValues)(methodValue, (value, key) => { + if (key in globalValue) { + return this.deepMergeMetadata(globalValue[key], methodValue[key], maxDepth, currentDepthLevel + 1); + } + return value; + }); + } + mergeValues(globalValue, methodValue) { + if (!(0, lodash_1.isArray)(globalValue)) { + return Object.assign(Object.assign({}, globalValue), methodValue); + } + return [...globalValue, ...methodValue]; + } + migrateOperationSchema(document2, prototype, method) { + const parametersObject = (0, lodash_1.get)(document2, "root.parameters"); + const requestBodyIndex = (parametersObject || []).findIndex(is_body_parameter_util_1.isBodyParameter); + if (requestBodyIndex < 0) { + return document2; + } + const requestBody = parametersObject[requestBodyIndex]; + parametersObject.splice(requestBodyIndex, 1); + const classConsumes = Reflect.getMetadata(constants_2.DECORATORS.API_CONSUMES, prototype); + const methodConsumes = Reflect.getMetadata(constants_2.DECORATORS.API_CONSUMES, method); + let consumes = (0, merge_and_uniq_util_1.mergeAndUniq)(classConsumes, methodConsumes); + consumes = (0, lodash_1.isEmpty)(consumes) ? ["application/json"] : consumes; + const keysToRemove = ["schema", "in", "name", "examples"]; + document2.root.requestBody = Object.assign(Object.assign({}, (0, lodash_1.omit)(requestBody, keysToRemove)), this.mimetypeContentWrapper.wrap(consumes, (0, lodash_1.pick)(requestBody, ["schema", "examples"]))); + return document2; + } + registerExtraModels(extraModels) { + extraModels.forEach((item) => this.schemaObjectFactory.exploreModelSchema(item, this.schemas)); + } + getVersionMetadata(metatype, versioningOptions) { + var _a; + if ((versioningOptions === null || versioningOptions === void 0 ? void 0 : versioningOptions.type) === common_12.VersioningType.URI) { + return (_a = Reflect.getMetadata(constants_1.VERSION_METADATA, metatype)) !== null && _a !== void 0 ? _a : versioningOptions.defaultVersion; + } + } + }; + exports2.SwaggerExplorer = SwaggerExplorer; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/swagger-transformer.js +var require_swagger_transformer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/swagger-transformer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SwaggerTransformer = void 0; + var lodash_1 = require_lodash(); + var SwaggerTransformer = class { + normalizePaths(denormalizedDoc) { + const roots = (0, lodash_1.filter)(denormalizedDoc, (r) => r.root); + const groupedByPath = (0, lodash_1.groupBy)(roots, ({ root }) => root.path); + const paths = (0, lodash_1.mapValues)(groupedByPath, (routes) => { + const keyByMethod = (0, lodash_1.keyBy)(routes, ({ root }) => root.method); + return (0, lodash_1.mapValues)(keyByMethod, (route) => { + return Object.assign(Object.assign({}, (0, lodash_1.omit)(route.root, ["method", "path"])), (0, lodash_1.omit)(route, "root")); + }); + }); + return { + paths + }; + } + unescapeColonsInPath(app, moduleRoutes) { + const httpAdapter = app.getHttpAdapter(); + const usingFastify = httpAdapter && httpAdapter.getType() === "fastify"; + const unescapeColon = usingFastify ? (path) => path.replace(/:\{([^}]+)\}/g, ":$1") : (path) => path.replace(/\[:\]/g, ":"); + return moduleRoutes.map((moduleRoute) => Object.assign(Object.assign({}, moduleRoute), { root: Object.assign(Object.assign({}, moduleRoute.root), { path: unescapeColon(moduleRoute.root.path) }) })); + } + }; + exports2.SwaggerTransformer = SwaggerTransformer; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/get-global-prefix.js +var require_get_global_prefix = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/get-global-prefix.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getGlobalPrefix = void 0; + function getGlobalPrefix(app) { + const internalConfigRef = app.config; + return internalConfigRef && internalConfigRef.getGlobalPrefix() || ""; + } + exports2.getGlobalPrefix = getGlobalPrefix; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/strip-last-slash.util.js +var require_strip_last_slash_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/strip-last-slash.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stripLastSlash = void 0; + function stripLastSlash(path) { + return path && path[path.length - 1] === "/" ? path.slice(0, path.length - 1) : path; + } + exports2.stripLastSlash = stripLastSlash; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/swagger-scanner.js +var require_swagger_scanner = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/swagger-scanner.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SwaggerScanner = void 0; + var constants_1 = require_constants(); + var lodash_1 = require_lodash(); + var model_properties_accessor_1 = require_model_properties_accessor(); + var schema_object_factory_1 = require_schema_object_factory(); + var swagger_types_mapper_1 = require_swagger_types_mapper(); + var swagger_explorer_1 = require_swagger_explorer(); + var swagger_transformer_1 = require_swagger_transformer(); + var get_global_prefix_1 = require_get_global_prefix(); + var strip_last_slash_util_1 = require_strip_last_slash_util(); + var SwaggerScanner = class { + constructor() { + this.transformer = new swagger_transformer_1.SwaggerTransformer(); + this.schemaObjectFactory = new schema_object_factory_1.SchemaObjectFactory(new model_properties_accessor_1.ModelPropertiesAccessor(), new swagger_types_mapper_1.SwaggerTypesMapper()); + this.explorer = new swagger_explorer_1.SwaggerExplorer(this.schemaObjectFactory); + } + scanApplication(app, options) { + const { deepScanRoutes, include: includedModules = [], extraModels = [], ignoreGlobalPrefix = false, operationIdFactory } = options; + const container = app.container; + const internalConfigRef = app.config; + const modules = this.getModules(container.getModules(), includedModules); + const globalPrefix = !ignoreGlobalPrefix ? (0, strip_last_slash_util_1.stripLastSlash)((0, get_global_prefix_1.getGlobalPrefix)(app)) : ""; + const denormalizedPaths = modules.map(({ controllers, metatype, imports }) => { + let result = []; + if (deepScanRoutes) { + const isGlobal = (module3) => !container.isGlobalModule(module3); + Array.from(imports.values()).filter(isGlobal).forEach(({ metatype: metatype2, controllers: controllers2 }) => { + const modulePath2 = this.getModulePathMetadata(container, metatype2); + result = result.concat(this.scanModuleControllers(controllers2, modulePath2, globalPrefix, internalConfigRef, operationIdFactory)); + }); + } + const modulePath = this.getModulePathMetadata(container, metatype); + result = result.concat(this.scanModuleControllers(controllers, modulePath, globalPrefix, internalConfigRef, operationIdFactory)); + return this.transformer.unescapeColonsInPath(app, result); + }); + const schemas = this.explorer.getSchemas(); + this.addExtraModels(schemas, extraModels); + return Object.assign(Object.assign({}, this.transformer.normalizePaths((0, lodash_1.flatten)(denormalizedPaths))), { components: { + schemas + } }); + } + scanModuleControllers(controller, modulePath, globalPrefix, applicationConfig, operationIdFactory) { + const denormalizedArray = [...controller.values()].map((ctrl) => this.explorer.exploreController(ctrl, applicationConfig, modulePath, globalPrefix, operationIdFactory)); + return (0, lodash_1.flatten)(denormalizedArray); + } + getModules(modulesContainer, include) { + if (!include || (0, lodash_1.isEmpty)(include)) { + return [...modulesContainer.values()]; + } + return [...modulesContainer.values()].filter(({ metatype }) => include.some((item) => item === metatype)); + } + addExtraModels(schemas, extraModels) { + extraModels.forEach((item) => { + this.schemaObjectFactory.exploreModelSchema(item, schemas); + }); + } + getModulePathMetadata(container, metatype) { + const modulesContainer = container.getModules(); + const modulePath = Reflect.getMetadata(constants_1.MODULE_PATH + modulesContainer.applicationId, metatype); + return modulePath !== null && modulePath !== void 0 ? modulePath : Reflect.getMetadata(constants_1.MODULE_PATH, metatype); + } + }; + exports2.SwaggerScanner = SwaggerScanner; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/swagger-ui/constants.js +var require_constants10 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/swagger-ui/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.jsTemplateString = exports2.htmlTemplateString = exports2.favIconHtml = void 0; + exports2.favIconHtml = ''; + exports2.htmlTemplateString = ` + + + + + + <% title %> + + <% favIconString %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +<% customJs %> +<% customJsStr %> +<% customCssUrl %> + + + + +`; + exports2.jsTemplateString = ` +window.onload = function() { + // Build a system + let url = window.location.search.match(/url=([^&]+)/); + if (url && url.length > 1) { + url = decodeURIComponent(url[1]); + } else { + url = window.location.origin; + } + <% swaggerOptions %> + url = options.swaggerUrl || url + let urls = options.swaggerUrls + let customOptions = options.customOptions + let spec1 = options.swaggerDoc + let swaggerOptions = { + spec: spec1, + url: url, + urls: urls, + dom_id: '#swagger-ui', + deepLinking: true, + presets: [ + SwaggerUIBundle.presets.apis, + SwaggerUIStandalonePreset + ], + plugins: [ + SwaggerUIBundle.plugins.DownloadUrl + ], + layout: "StandaloneLayout" + } + for (let attrname in customOptions) { + swaggerOptions[attrname] = customOptions[attrname]; + } + let ui = SwaggerUIBundle(swaggerOptions) + + if (customOptions.initOAuth) { + ui.initOAuth(customOptions.initOAuth) + } + + if (customOptions.authAction) { + ui.authActions.authorize(customOptions.authAction) + } + + window.ui = ui +} +`; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/swagger-ui/helpers.js +var require_helpers3 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/swagger-ui/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildJSInitOptions = void 0; + function buildJSInitOptions(initOptions) { + const functionPlaceholder = "____FUNCTION_PLACEHOLDER____"; + const fns = []; + let json = JSON.stringify(initOptions, (key, value) => { + if (typeof value === "function") { + fns.push(value); + return functionPlaceholder; + } + return value; + }, 2); + json = json.replace(new RegExp('"' + functionPlaceholder + '"', "g"), () => fns.shift()); + return `let options = ${json};`; + } + exports2.buildJSInitOptions = buildJSInitOptions; + } +}); + +// ../../node_modules/.pnpm/swagger-ui-dist@5.17.14/node_modules/swagger-ui-dist/absolute-path.js +var require_absolute_path = __commonJS({ + "../../node_modules/.pnpm/swagger-ui-dist@5.17.14/node_modules/swagger-ui-dist/absolute-path.js"(exports2, module2) { + var getAbsoluteFSPath = function() { + if (typeof module2 !== "undefined" && module2.exports) { + return require("path").resolve(__dirname); + } + throw new Error("getAbsoluteFSPath can only be called within a Nodejs environment"); + }; + module2.exports = getAbsoluteFSPath; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/swagger-ui/swagger-ui.js +var require_swagger_ui = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/swagger-ui/swagger-ui.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildSwaggerHTML = exports2.getSwaggerAssetsAbsoluteFSPath = exports2.buildSwaggerInitJS = void 0; + var constants_1 = require_constants10(); + var helpers_1 = require_helpers3(); + function buildSwaggerInitJS(swaggerDoc, customOptions = {}) { + const { swaggerOptions = {}, swaggerUrl } = customOptions; + const swaggerInitOptions = { + swaggerDoc, + swaggerUrl, + customOptions: swaggerOptions + }; + const jsInitOptions = (0, helpers_1.buildJSInitOptions)(swaggerInitOptions); + return constants_1.jsTemplateString.replace("<% swaggerOptions %>", jsInitOptions); + } + exports2.buildSwaggerInitJS = buildSwaggerInitJS; + var swaggerAssetsAbsoluteFSPath; + function getSwaggerAssetsAbsoluteFSPath() { + if (!swaggerAssetsAbsoluteFSPath) { + swaggerAssetsAbsoluteFSPath = require_absolute_path()(); + } + return swaggerAssetsAbsoluteFSPath; + } + exports2.getSwaggerAssetsAbsoluteFSPath = getSwaggerAssetsAbsoluteFSPath; + function toExternalScriptTag(url) { + return ``; + } + function toInlineScriptTag(jsCode) { + return ``; + } + function toExternalStylesheetTag(url) { + return ``; + } + function toTags(customCode, toScript) { + if (!customCode) { + return ""; + } + if (typeof customCode === "string") { + return toScript(customCode); + } else { + return customCode.map(toScript).join("\n"); + } + } + function buildSwaggerHTML(baseUrl, customOptions = {}) { + const { customCss = "", customJs = "", customJsStr = "", customfavIcon = false, customSiteTitle = "Swagger UI", customCssUrl = "", explorer = false } = customOptions; + const favIconString = customfavIcon ? `` : constants_1.favIconHtml; + const explorerCss = explorer ? "" : ".swagger-ui .topbar .download-url-wrapper { display: none }"; + return constants_1.htmlTemplateString.replace("<% customCss %>", customCss).replace("<% explorerCss %>", explorerCss).replace("<% favIconString %>", favIconString).replace(/<% baseUrl %>/g, baseUrl).replace("<% customJs %>", toTags(customJs, toExternalScriptTag)).replace("<% customJsStr %>", toTags(customJsStr, toInlineScriptTag)).replace("<% customCssUrl %>", toTags(customCssUrl, toExternalStylesheetTag)).replace("<% title %>", customSiteTitle); + } + exports2.buildSwaggerHTML = buildSwaggerHTML; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/swagger-ui/index.js +var require_swagger_ui2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/swagger-ui/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_swagger_ui(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/assign-two-levels-deep.js +var require_assign_two_levels_deep = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/assign-two-levels-deep.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.assignTwoLevelsDeep = void 0; + function assignTwoLevelsDeep(_dest, ...args) { + const dest = _dest; + for (const arg of args) { + for (const [key, value] of Object.entries(arg !== null && arg !== void 0 ? arg : {})) { + dest[key] = Object.assign(Object.assign({}, dest[key]), value); + } + } + return dest; + } + exports2.assignTwoLevelsDeep = assignTwoLevelsDeep; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/normalize-rel-path.js +var require_normalize_rel_path = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/normalize-rel-path.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.normalizeRelPath = void 0; + function normalizeRelPath(input) { + const output = input.replace(/\/\/+/g, "/"); + return output; + } + exports2.normalizeRelPath = normalizeRelPath; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/resolve-path.util.js +var require_resolve_path_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/resolve-path.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolvePath = void 0; + var pathLib = require("path"); + function resolvePath(path) { + return path ? pathLib.resolve(path) : path; + } + exports2.resolvePath = resolvePath; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/validate-global-prefix.util.js +var require_validate_global_prefix_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/validate-global-prefix.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validateGlobalPrefix = void 0; + var validateGlobalPrefix = (globalPrefix) => globalPrefix && !globalPrefix.match(/^(\/?)$/); + exports2.validateGlobalPrefix = validateGlobalPrefix; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/validate-path.util.js +var require_validate_path_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/utils/validate-path.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validatePath = void 0; + var validatePath = (inputPath) => inputPath.charAt(0) !== "/" ? "/" + inputPath : inputPath; + exports2.validatePath = validatePath; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/swagger-module.js +var require_swagger_module = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/swagger-module.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SwaggerModule = void 0; + var jsyaml = require_js_yaml(); + var metadata_loader_1 = require_metadata_loader(); + var swagger_scanner_1 = require_swagger_scanner(); + var swagger_ui_1 = require_swagger_ui2(); + var assign_two_levels_deep_1 = require_assign_two_levels_deep(); + var get_global_prefix_1 = require_get_global_prefix(); + var normalize_rel_path_1 = require_normalize_rel_path(); + var resolve_path_util_1 = require_resolve_path_util(); + var validate_global_prefix_util_1 = require_validate_global_prefix_util(); + var validate_path_util_1 = require_validate_path_util(); + var SwaggerModule = class _SwaggerModule { + static createDocument(app, config, options = {}) { + const swaggerScanner = new swagger_scanner_1.SwaggerScanner(); + const document2 = swaggerScanner.scanApplication(app, options); + document2.components = (0, assign_two_levels_deep_1.assignTwoLevelsDeep)({}, config.components, document2.components); + return Object.assign(Object.assign({ openapi: "3.0.0", paths: {} }, config), document2); + } + static loadPluginMetadata(metadataFn) { + return __awaiter2(this, void 0, void 0, function* () { + const metadata = yield metadataFn(); + return this.metadataLoader.load(metadata); + }); + } + static serveStatic(finalPath, app, customStaticPath) { + const httpAdapter = app.getHttpAdapter(); + const swaggerAssetsPath = customStaticPath ? (0, resolve_path_util_1.resolvePath)(customStaticPath) : (0, swagger_ui_1.getSwaggerAssetsAbsoluteFSPath)(); + if (httpAdapter && httpAdapter.getType() === "fastify") { + app.useStaticAssets({ + root: swaggerAssetsPath, + prefix: finalPath, + decorateReply: false + }); + } else { + app.useStaticAssets(swaggerAssetsPath, { + prefix: finalPath + }); + } + } + static serveDocuments(finalPath, urlLastSubdirectory, httpAdapter, documentOrFactory, options) { + let document2; + const getBuiltDocument = () => { + if (!document2) { + document2 = typeof documentOrFactory === "function" ? documentOrFactory() : documentOrFactory; + } + return document2; + }; + if (options.swaggerUiEnabled) { + this.serveSwaggerUi(finalPath, urlLastSubdirectory, httpAdapter, getBuiltDocument, options.swaggerOptions); + } + this.serveDefinitions(httpAdapter, getBuiltDocument, options); + } + static serveSwaggerUi(finalPath, urlLastSubdirectory, httpAdapter, getBuiltDocument, swaggerOptions) { + const baseUrlForSwaggerUI = (0, normalize_rel_path_1.normalizeRelPath)(`./${urlLastSubdirectory}/`); + let swaggerUiHtml; + let swaggerUiInitJS; + httpAdapter.get((0, normalize_rel_path_1.normalizeRelPath)(`${finalPath}/swagger-ui-init.js`), (req, res) => { + res.type("application/javascript"); + const document2 = getBuiltDocument(); + if (swaggerOptions.patchDocumentOnRequest) { + const documentToSerialize = swaggerOptions.patchDocumentOnRequest(req, res, document2); + const swaggerInitJsPerRequest = (0, swagger_ui_1.buildSwaggerInitJS)(documentToSerialize, swaggerOptions); + return res.send(swaggerInitJsPerRequest); + } + if (!swaggerUiInitJS) { + swaggerUiInitJS = (0, swagger_ui_1.buildSwaggerInitJS)(document2, swaggerOptions); + } + res.send(swaggerUiInitJS); + }); + try { + httpAdapter.get((0, normalize_rel_path_1.normalizeRelPath)(`${finalPath}/${urlLastSubdirectory}/swagger-ui-init.js`), (req, res) => { + res.type("application/javascript"); + const document2 = getBuiltDocument(); + if (swaggerOptions.patchDocumentOnRequest) { + const documentToSerialize = swaggerOptions.patchDocumentOnRequest(req, res, document2); + const swaggerInitJsPerRequest = (0, swagger_ui_1.buildSwaggerInitJS)(documentToSerialize, swaggerOptions); + return res.send(swaggerInitJsPerRequest); + } + if (!swaggerUiInitJS) { + swaggerUiInitJS = (0, swagger_ui_1.buildSwaggerInitJS)(document2, swaggerOptions); + } + res.send(swaggerUiInitJS); + }); + } catch (err) { + } + httpAdapter.get(finalPath, (_2, res) => { + res.type("text/html"); + if (!swaggerUiHtml) { + swaggerUiHtml = (0, swagger_ui_1.buildSwaggerHTML)(baseUrlForSwaggerUI, swaggerOptions); + } + res.send(swaggerUiHtml); + }); + try { + httpAdapter.get((0, normalize_rel_path_1.normalizeRelPath)(`${finalPath}/`), (_2, res) => { + res.type("text/html"); + if (!swaggerUiHtml) { + swaggerUiHtml = (0, swagger_ui_1.buildSwaggerHTML)(baseUrlForSwaggerUI, swaggerOptions); + } + res.send(swaggerUiHtml); + }); + } catch (err) { + } + } + static serveDefinitions(httpAdapter, getBuiltDocument, options) { + httpAdapter.get((0, normalize_rel_path_1.normalizeRelPath)(options.jsonDocumentUrl), (req, res) => { + res.type("application/json"); + const document2 = getBuiltDocument(); + const documentToSerialize = options.swaggerOptions.patchDocumentOnRequest ? options.swaggerOptions.patchDocumentOnRequest(req, res, document2) : document2; + res.send(JSON.stringify(documentToSerialize)); + }); + httpAdapter.get((0, normalize_rel_path_1.normalizeRelPath)(options.yamlDocumentUrl), (req, res) => { + res.type("text/yaml"); + const document2 = getBuiltDocument(); + const documentToSerialize = options.swaggerOptions.patchDocumentOnRequest ? options.swaggerOptions.patchDocumentOnRequest(req, res, document2) : document2; + const yamlDocument = jsyaml.dump(documentToSerialize, { + skipInvalid: true, + noRefs: true + }); + res.send(yamlDocument); + }); + } + static setup(path, app, documentOrFactory, options) { + var _a; + const globalPrefix = (0, get_global_prefix_1.getGlobalPrefix)(app); + const finalPath = (0, validate_path_util_1.validatePath)((options === null || options === void 0 ? void 0 : options.useGlobalPrefix) && (0, validate_global_prefix_util_1.validateGlobalPrefix)(globalPrefix) ? `${globalPrefix}${(0, validate_path_util_1.validatePath)(path)}` : path); + const urlLastSubdirectory = finalPath.split("/").slice(-1).pop() || ""; + const validatedGlobalPrefix = (options === null || options === void 0 ? void 0 : options.useGlobalPrefix) && (0, validate_global_prefix_util_1.validateGlobalPrefix)(globalPrefix) ? (0, validate_path_util_1.validatePath)(globalPrefix) : ""; + const finalJSONDocumentPath = (options === null || options === void 0 ? void 0 : options.jsonDocumentUrl) ? `${validatedGlobalPrefix}${(0, validate_path_util_1.validatePath)(options.jsonDocumentUrl)}` : `${finalPath}-json`; + const finalYAMLDocumentPath = (options === null || options === void 0 ? void 0 : options.yamlDocumentUrl) ? `${validatedGlobalPrefix}${(0, validate_path_util_1.validatePath)(options.yamlDocumentUrl)}` : `${finalPath}-yaml`; + const swaggerUiEnabled = (_a = options === null || options === void 0 ? void 0 : options.swaggerUiEnabled) !== null && _a !== void 0 ? _a : true; + const httpAdapter = app.getHttpAdapter(); + _SwaggerModule.serveDocuments(finalPath, urlLastSubdirectory, httpAdapter, documentOrFactory, { + swaggerUiEnabled, + jsonDocumentUrl: finalJSONDocumentPath, + yamlDocumentUrl: finalYAMLDocumentPath, + swaggerOptions: options || {} + }); + if (swaggerUiEnabled) { + _SwaggerModule.serveStatic(finalPath, app, options === null || options === void 0 ? void 0 : options.customSwaggerUiPath); + const serveStaticSlashEndingPath = `${finalPath}/${urlLastSubdirectory}`; + if (serveStaticSlashEndingPath !== finalPath) { + _SwaggerModule.serveStatic(serveStaticSlashEndingPath, app); + } + } + } + }; + exports2.SwaggerModule = SwaggerModule; + SwaggerModule.metadataLoader = new metadata_loader_1.MetadataLoader(); + } +}); + +// ../../node_modules/.pnpm/@nestjs+mapped-types@2.0.5_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_emyi4n5ntieiyd2rins2vzdote/node_modules/@nestjs/mapped-types/dist/type-helpers.utils.js +var require_type_helpers_utils = __commonJS({ + "../../node_modules/.pnpm/@nestjs+mapped-types@2.0.5_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_emyi4n5ntieiyd2rins2vzdote/node_modules/@nestjs/mapped-types/dist/type-helpers.utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.inheritPropertyInitializers = exports2.inheritTransformationMetadata = exports2.inheritValidationMetadata = exports2.applyValidateIfDefinedDecorator = exports2.applyIsOptionalDecorator = void 0; + var common_12 = require_common(); + var logger = new common_12.Logger("MappedTypes"); + function applyIsOptionalDecorator(targetClass, propertyKey) { + if (!isClassValidatorAvailable()) { + return; + } + const classValidator = require_cjs(); + const decoratorFactory = classValidator.IsOptional(); + decoratorFactory(targetClass.prototype, propertyKey); + } + exports2.applyIsOptionalDecorator = applyIsOptionalDecorator; + function applyValidateIfDefinedDecorator(targetClass, propertyKey) { + if (!isClassValidatorAvailable()) { + return; + } + const classValidator = require_cjs(); + const decoratorFactory = classValidator.ValidateIf((_2, value) => value !== void 0); + decoratorFactory(targetClass.prototype, propertyKey); + } + exports2.applyValidateIfDefinedDecorator = applyValidateIfDefinedDecorator; + function inheritValidationMetadata(parentClass, targetClass, isPropertyInherited) { + if (!isClassValidatorAvailable()) { + return; + } + try { + const classValidator = require_cjs(); + const metadataStorage = classValidator.getMetadataStorage ? classValidator.getMetadataStorage() : classValidator.getFromContainer(classValidator.MetadataStorage); + const getTargetValidationMetadatasArgs = [parentClass, null, false, false]; + const targetMetadata = metadataStorage.getTargetValidationMetadatas(...getTargetValidationMetadatasArgs); + return targetMetadata.filter(({ propertyName }) => !isPropertyInherited || isPropertyInherited(propertyName)).map((value) => { + const originalType = Reflect.getMetadata("design:type", parentClass.prototype, value.propertyName); + if (originalType) { + Reflect.defineMetadata("design:type", originalType, targetClass.prototype, value.propertyName); + } + metadataStorage.addValidationMetadata({ + ...value, + target: targetClass + }); + return value.propertyName; + }); + } catch (err) { + logger.error(`Validation ("class-validator") metadata cannot be inherited for "${parentClass.name}" class.`); + logger.error(err); + } + } + exports2.inheritValidationMetadata = inheritValidationMetadata; + function inheritTransformationMetadata(parentClass, targetClass, isPropertyInherited) { + if (!isClassTransformerAvailable()) { + return; + } + try { + const transformMetadataKeys = [ + "_excludeMetadatas", + "_exposeMetadatas", + "_transformMetadatas", + "_typeMetadatas" + ]; + transformMetadataKeys.forEach((key) => inheritTransformerMetadata(key, parentClass, targetClass, isPropertyInherited)); + } catch (err) { + logger.error(`Transformer ("class-transformer") metadata cannot be inherited for "${parentClass.name}" class.`); + logger.error(err); + } + } + exports2.inheritTransformationMetadata = inheritTransformationMetadata; + function inheritTransformerMetadata(key, parentClass, targetClass, isPropertyInherited) { + let classTransformer; + try { + classTransformer = require_storage(); + } catch { + classTransformer = require_storage(); + } + const metadataStorage = classTransformer.defaultMetadataStorage; + while (parentClass && parentClass !== Object) { + if (metadataStorage[key].has(parentClass)) { + const metadataMap = metadataStorage[key]; + const parentMetadata = metadataMap.get(parentClass); + const targetMetadataEntries = Array.from(parentMetadata.entries()).filter(([key2]) => !isPropertyInherited || isPropertyInherited(key2)).map(([key2, metadata]) => { + if (Array.isArray(metadata)) { + const targetMetadata = metadata.map((item) => ({ + ...item, + target: targetClass + })); + return [key2, targetMetadata]; + } + return [key2, { ...metadata, target: targetClass }]; + }); + if (metadataMap.has(targetClass)) { + const existingRules = metadataMap.get(targetClass).entries(); + const mergeMap = /* @__PURE__ */ new Map(); + [existingRules, targetMetadataEntries].forEach((entries) => { + for (const [valueKey, value] of entries) { + if (mergeMap.has(valueKey)) { + const parentValue = mergeMap.get(valueKey); + if (Array.isArray(parentValue)) { + parentValue.push(...Array.isArray(value) ? value : [value]); + } + } else { + mergeMap.set(valueKey, value); + } + } + }); + metadataMap.set(targetClass, mergeMap); + } else { + metadataMap.set(targetClass, new Map(targetMetadataEntries)); + } + } + parentClass = Object.getPrototypeOf(parentClass); + } + } + function isClassValidatorAvailable() { + try { + require_cjs(); + return true; + } catch { + return false; + } + } + function isClassTransformerAvailable() { + try { + require_cjs2(); + return true; + } catch { + return false; + } + } + function inheritPropertyInitializers(target, sourceClass, isPropertyInherited = (key) => true) { + try { + const tempInstance = new sourceClass(); + const propertyNames = Object.getOwnPropertyNames(tempInstance); + propertyNames.filter((propertyName) => typeof tempInstance[propertyName] !== "undefined" && typeof target[propertyName] === "undefined").filter((propertyName) => isPropertyInherited(propertyName)).forEach((propertyName) => { + target[propertyName] = tempInstance[propertyName]; + }); + } catch { + } + } + exports2.inheritPropertyInitializers = inheritPropertyInitializers; + } +}); + +// ../../node_modules/.pnpm/@nestjs+mapped-types@2.0.5_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_emyi4n5ntieiyd2rins2vzdote/node_modules/@nestjs/mapped-types/dist/intersection-type.helper.js +var require_intersection_type_helper = __commonJS({ + "../../node_modules/.pnpm/@nestjs+mapped-types@2.0.5_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_emyi4n5ntieiyd2rins2vzdote/node_modules/@nestjs/mapped-types/dist/intersection-type.helper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IntersectionType = void 0; + var type_helpers_utils_1 = require_type_helpers_utils(); + function IntersectionType(...classRefs) { + class IntersectionClassType { + constructor() { + classRefs.forEach((classRef) => { + (0, type_helpers_utils_1.inheritPropertyInitializers)(this, classRef); + }); + } + } + classRefs.forEach((classRef) => { + (0, type_helpers_utils_1.inheritValidationMetadata)(classRef, IntersectionClassType); + (0, type_helpers_utils_1.inheritTransformationMetadata)(classRef, IntersectionClassType); + }); + const intersectedNames = classRefs.reduce((prev, ref) => prev + ref.name, ""); + Object.defineProperty(IntersectionClassType, "name", { + value: `Intersection${intersectedNames}` + }); + return IntersectionClassType; + } + exports2.IntersectionType = IntersectionType; + } +}); + +// ../../node_modules/.pnpm/@nestjs+mapped-types@2.0.5_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_emyi4n5ntieiyd2rins2vzdote/node_modules/@nestjs/mapped-types/dist/mapped-type.interface.js +var require_mapped_type_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+mapped-types@2.0.5_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_emyi4n5ntieiyd2rins2vzdote/node_modules/@nestjs/mapped-types/dist/mapped-type.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+mapped-types@2.0.5_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_emyi4n5ntieiyd2rins2vzdote/node_modules/@nestjs/mapped-types/dist/omit-type.helper.js +var require_omit_type_helper = __commonJS({ + "../../node_modules/.pnpm/@nestjs+mapped-types@2.0.5_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_emyi4n5ntieiyd2rins2vzdote/node_modules/@nestjs/mapped-types/dist/omit-type.helper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OmitType = void 0; + var type_helpers_utils_1 = require_type_helpers_utils(); + function OmitType(classRef, keys) { + const isInheritedPredicate = (propertyKey) => !keys.includes(propertyKey); + class OmitClassType { + constructor() { + (0, type_helpers_utils_1.inheritPropertyInitializers)(this, classRef, isInheritedPredicate); + } + } + (0, type_helpers_utils_1.inheritValidationMetadata)(classRef, OmitClassType, isInheritedPredicate); + (0, type_helpers_utils_1.inheritTransformationMetadata)(classRef, OmitClassType, isInheritedPredicate); + return OmitClassType; + } + exports2.OmitType = OmitType; + } +}); + +// ../../node_modules/.pnpm/@nestjs+mapped-types@2.0.5_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_emyi4n5ntieiyd2rins2vzdote/node_modules/@nestjs/mapped-types/dist/partial-type.helper.js +var require_partial_type_helper = __commonJS({ + "../../node_modules/.pnpm/@nestjs+mapped-types@2.0.5_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_emyi4n5ntieiyd2rins2vzdote/node_modules/@nestjs/mapped-types/dist/partial-type.helper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PartialType = void 0; + var type_helpers_utils_1 = require_type_helpers_utils(); + function PartialType(classRef, options = {}) { + class PartialClassType { + constructor() { + (0, type_helpers_utils_1.inheritPropertyInitializers)(this, classRef); + } + } + const propertyKeys = (0, type_helpers_utils_1.inheritValidationMetadata)(classRef, PartialClassType); + (0, type_helpers_utils_1.inheritTransformationMetadata)(classRef, PartialClassType); + if (propertyKeys) { + propertyKeys.forEach((key) => { + options.skipNullProperties === false ? (0, type_helpers_utils_1.applyValidateIfDefinedDecorator)(PartialClassType, key) : (0, type_helpers_utils_1.applyIsOptionalDecorator)(PartialClassType, key); + }); + } + Object.defineProperty(PartialClassType, "name", { + value: `Partial${classRef.name}` + }); + return PartialClassType; + } + exports2.PartialType = PartialType; + } +}); + +// ../../node_modules/.pnpm/@nestjs+mapped-types@2.0.5_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_emyi4n5ntieiyd2rins2vzdote/node_modules/@nestjs/mapped-types/dist/pick-type.helper.js +var require_pick_type_helper = __commonJS({ + "../../node_modules/.pnpm/@nestjs+mapped-types@2.0.5_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_emyi4n5ntieiyd2rins2vzdote/node_modules/@nestjs/mapped-types/dist/pick-type.helper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PickType = void 0; + var type_helpers_utils_1 = require_type_helpers_utils(); + function PickType(classRef, keys) { + const isInheritedPredicate = (propertyKey) => keys.includes(propertyKey); + class PickClassType { + constructor() { + (0, type_helpers_utils_1.inheritPropertyInitializers)(this, classRef, isInheritedPredicate); + } + } + (0, type_helpers_utils_1.inheritValidationMetadata)(classRef, PickClassType, isInheritedPredicate); + (0, type_helpers_utils_1.inheritTransformationMetadata)(classRef, PickClassType, isInheritedPredicate); + return PickClassType; + } + exports2.PickType = PickType; + } +}); + +// ../../node_modules/.pnpm/@nestjs+mapped-types@2.0.5_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_emyi4n5ntieiyd2rins2vzdote/node_modules/@nestjs/mapped-types/dist/index.js +var require_dist3 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+mapped-types@2.0.5_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_emyi4n5ntieiyd2rins2vzdote/node_modules/@nestjs/mapped-types/dist/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.inheritValidationMetadata = exports2.inheritTransformationMetadata = exports2.inheritPropertyInitializers = exports2.applyValidateIfDefinedDecorator = exports2.applyIsOptionalDecorator = void 0; + __exportStar2(require_intersection_type_helper(), exports2); + __exportStar2(require_mapped_type_interface(), exports2); + __exportStar2(require_omit_type_helper(), exports2); + __exportStar2(require_partial_type_helper(), exports2); + __exportStar2(require_pick_type_helper(), exports2); + var type_helpers_utils_1 = require_type_helpers_utils(); + Object.defineProperty(exports2, "applyIsOptionalDecorator", { enumerable: true, get: function() { + return type_helpers_utils_1.applyIsOptionalDecorator; + } }); + Object.defineProperty(exports2, "applyValidateIfDefinedDecorator", { enumerable: true, get: function() { + return type_helpers_utils_1.applyValidateIfDefinedDecorator; + } }); + Object.defineProperty(exports2, "inheritPropertyInitializers", { enumerable: true, get: function() { + return type_helpers_utils_1.inheritPropertyInitializers; + } }); + Object.defineProperty(exports2, "inheritTransformationMetadata", { enumerable: true, get: function() { + return type_helpers_utils_1.inheritTransformationMetadata; + } }); + Object.defineProperty(exports2, "inheritValidationMetadata", { enumerable: true, get: function() { + return type_helpers_utils_1.inheritValidationMetadata; + } }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+mapped-types@2.0.5_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_emyi4n5ntieiyd2rins2vzdote/node_modules/@nestjs/mapped-types/index.js +var require_mapped_types = __commonJS({ + "../../node_modules/.pnpm/@nestjs+mapped-types@2.0.5_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_emyi4n5ntieiyd2rins2vzdote/node_modules/@nestjs/mapped-types/index.js"(exports2) { + "use strict"; + function __export2(m) { + for (var p in m) if (!exports2.hasOwnProperty(p)) exports2[p] = m[p]; + } + exports2.__esModule = true; + __export2(require_dist3()); + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/type-helpers/mapped-types.utils.js +var require_mapped_types_utils = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/type-helpers/mapped-types.utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.clonePluginMetadataFactory = void 0; + var lodash_1 = require_lodash(); + var plugin_constants_1 = require_plugin_constants(); + function clonePluginMetadataFactory(target, parent, transformFn = lodash_1.identity) { + let targetMetadata = {}; + do { + if (!parent.constructor) { + return; + } + if (!parent.constructor[plugin_constants_1.METADATA_FACTORY_NAME]) { + continue; + } + const parentMetadata = parent.constructor[plugin_constants_1.METADATA_FACTORY_NAME](); + targetMetadata = Object.assign(Object.assign({}, parentMetadata), targetMetadata); + } while ((parent = Reflect.getPrototypeOf(parent)) && parent !== Object.prototype && parent); + targetMetadata = transformFn(targetMetadata); + if (target[plugin_constants_1.METADATA_FACTORY_NAME]) { + const originalFactory = target[plugin_constants_1.METADATA_FACTORY_NAME]; + target[plugin_constants_1.METADATA_FACTORY_NAME] = () => { + const originalMetadata = originalFactory(); + return Object.assign(Object.assign({}, originalMetadata), targetMetadata); + }; + } else { + target[plugin_constants_1.METADATA_FACTORY_NAME] = () => targetMetadata; + } + } + exports2.clonePluginMetadataFactory = clonePluginMetadataFactory; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/type-helpers/intersection-type.helper.js +var require_intersection_type_helper2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/type-helpers/intersection-type.helper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IntersectionType = void 0; + var mapped_types_1 = require_mapped_types(); + var constants_1 = require_constants8(); + var decorators_1 = require_decorators5(); + var metadata_loader_1 = require_metadata_loader(); + var model_properties_accessor_1 = require_model_properties_accessor(); + var mapped_types_utils_1 = require_mapped_types_utils(); + var modelPropertiesAccessor = new model_properties_accessor_1.ModelPropertiesAccessor(); + function IntersectionType(...classRefs) { + class IntersectionClassType { + constructor() { + classRefs.forEach((classRef) => { + (0, mapped_types_1.inheritPropertyInitializers)(this, classRef); + }); + } + } + classRefs.forEach((classRef) => { + const fields = modelPropertiesAccessor.getModelProperties(classRef.prototype); + (0, mapped_types_1.inheritValidationMetadata)(classRef, IntersectionClassType); + (0, mapped_types_1.inheritTransformationMetadata)(classRef, IntersectionClassType); + function applyFields(fields2) { + (0, mapped_types_utils_1.clonePluginMetadataFactory)(IntersectionClassType, classRef.prototype); + fields2.forEach((propertyKey) => { + const metadata = Reflect.getMetadata(constants_1.DECORATORS.API_MODEL_PROPERTIES, classRef.prototype, propertyKey); + const decoratorFactory = (0, decorators_1.ApiProperty)(metadata); + decoratorFactory(IntersectionClassType.prototype, propertyKey); + }); + } + applyFields(fields); + metadata_loader_1.MetadataLoader.addRefreshHook(() => { + const fields2 = modelPropertiesAccessor.getModelProperties(classRef.prototype); + applyFields(fields2); + }); + }); + const intersectedNames = classRefs.reduce((prev, ref) => prev + ref.name, ""); + Object.defineProperty(IntersectionClassType, "name", { + value: `Intersection${intersectedNames}` + }); + return IntersectionClassType; + } + exports2.IntersectionType = IntersectionType; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/type-helpers/omit-type.helper.js +var require_omit_type_helper2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/type-helpers/omit-type.helper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OmitType = void 0; + var mapped_types_1 = require_mapped_types(); + var lodash_1 = require_lodash(); + var constants_1 = require_constants8(); + var decorators_1 = require_decorators5(); + var metadata_loader_1 = require_metadata_loader(); + var model_properties_accessor_1 = require_model_properties_accessor(); + var mapped_types_utils_1 = require_mapped_types_utils(); + var modelPropertiesAccessor = new model_properties_accessor_1.ModelPropertiesAccessor(); + function OmitType(classRef, keys) { + const fields = modelPropertiesAccessor.getModelProperties(classRef.prototype).filter((item) => !keys.includes(item)); + const isInheritedPredicate = (propertyKey) => !keys.includes(propertyKey); + class OmitTypeClass { + constructor() { + (0, mapped_types_1.inheritPropertyInitializers)(this, classRef, isInheritedPredicate); + } + } + (0, mapped_types_1.inheritValidationMetadata)(classRef, OmitTypeClass, isInheritedPredicate); + (0, mapped_types_1.inheritTransformationMetadata)(classRef, OmitTypeClass, isInheritedPredicate); + function applyFields(fields2) { + (0, mapped_types_utils_1.clonePluginMetadataFactory)(OmitTypeClass, classRef.prototype, (metadata) => (0, lodash_1.omit)(metadata, keys)); + fields2.forEach((propertyKey) => { + const metadata = Reflect.getMetadata(constants_1.DECORATORS.API_MODEL_PROPERTIES, classRef.prototype, propertyKey); + const decoratorFactory = (0, decorators_1.ApiProperty)(metadata); + decoratorFactory(OmitTypeClass.prototype, propertyKey); + }); + } + applyFields(fields); + metadata_loader_1.MetadataLoader.addRefreshHook(() => { + const fields2 = modelPropertiesAccessor.getModelProperties(classRef.prototype).filter((item) => !keys.includes(item)); + applyFields(fields2); + }); + return OmitTypeClass; + } + exports2.OmitType = OmitType; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/type-helpers/partial-type.helper.js +var require_partial_type_helper2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/type-helpers/partial-type.helper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PartialType = void 0; + var mapped_types_1 = require_mapped_types(); + var lodash_1 = require_lodash(); + var constants_1 = require_constants8(); + var decorators_1 = require_decorators5(); + var metadata_loader_1 = require_metadata_loader(); + var plugin_constants_1 = require_plugin_constants(); + var model_properties_accessor_1 = require_model_properties_accessor(); + var mapped_types_utils_1 = require_mapped_types_utils(); + var modelPropertiesAccessor = new model_properties_accessor_1.ModelPropertiesAccessor(); + function PartialType(classRef, options = {}) { + const applyPartialDecoratorFn = options.skipNullProperties === false ? mapped_types_1.applyValidateIfDefinedDecorator : mapped_types_1.applyIsOptionalDecorator; + const fields = modelPropertiesAccessor.getModelProperties(classRef.prototype); + class PartialTypeClass { + constructor() { + (0, mapped_types_1.inheritPropertyInitializers)(this, classRef); + } + } + const keysWithValidationConstraints = (0, mapped_types_1.inheritValidationMetadata)(classRef, PartialTypeClass); + if (keysWithValidationConstraints) { + keysWithValidationConstraints.filter((key) => !fields.includes(key)).forEach((key) => applyPartialDecoratorFn(PartialTypeClass, key)); + } + (0, mapped_types_1.inheritTransformationMetadata)(classRef, PartialTypeClass); + function applyFields(fields2) { + (0, mapped_types_utils_1.clonePluginMetadataFactory)(PartialTypeClass, classRef.prototype, (metadata) => (0, lodash_1.mapValues)(metadata, (item) => Object.assign(Object.assign({}, item), { required: false }))); + if (PartialTypeClass[plugin_constants_1.METADATA_FACTORY_NAME]) { + const pluginFields = Object.keys(PartialTypeClass[plugin_constants_1.METADATA_FACTORY_NAME]()); + pluginFields.forEach((key) => applyPartialDecoratorFn(PartialTypeClass, key)); + } + fields2.forEach((key) => { + const metadata = Reflect.getMetadata(constants_1.DECORATORS.API_MODEL_PROPERTIES, classRef.prototype, key) || {}; + const decoratorFactory = (0, decorators_1.ApiProperty)(Object.assign(Object.assign({}, metadata), { required: false })); + decoratorFactory(PartialTypeClass.prototype, key); + applyPartialDecoratorFn(PartialTypeClass, key); + }); + } + applyFields(fields); + metadata_loader_1.MetadataLoader.addRefreshHook(() => { + const fields2 = modelPropertiesAccessor.getModelProperties(classRef.prototype); + applyFields(fields2); + }); + return PartialTypeClass; + } + exports2.PartialType = PartialType; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/type-helpers/pick-type.helper.js +var require_pick_type_helper2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/type-helpers/pick-type.helper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PickType = void 0; + var mapped_types_1 = require_mapped_types(); + var lodash_1 = require_lodash(); + var constants_1 = require_constants8(); + var decorators_1 = require_decorators5(); + var metadata_loader_1 = require_metadata_loader(); + var model_properties_accessor_1 = require_model_properties_accessor(); + var mapped_types_utils_1 = require_mapped_types_utils(); + var modelPropertiesAccessor = new model_properties_accessor_1.ModelPropertiesAccessor(); + function PickType(classRef, keys) { + const fields = modelPropertiesAccessor.getModelProperties(classRef.prototype).filter((item) => keys.includes(item)); + const isInheritedPredicate = (propertyKey) => keys.includes(propertyKey); + class PickTypeClass { + constructor() { + (0, mapped_types_1.inheritPropertyInitializers)(this, classRef, isInheritedPredicate); + } + } + (0, mapped_types_1.inheritValidationMetadata)(classRef, PickTypeClass, isInheritedPredicate); + (0, mapped_types_1.inheritTransformationMetadata)(classRef, PickTypeClass, isInheritedPredicate); + function applyFields(fields2) { + (0, mapped_types_utils_1.clonePluginMetadataFactory)(PickTypeClass, classRef.prototype, (metadata) => (0, lodash_1.pick)(metadata, keys)); + fields2.forEach((propertyKey) => { + const metadata = Reflect.getMetadata(constants_1.DECORATORS.API_MODEL_PROPERTIES, classRef.prototype, propertyKey); + const decoratorFactory = (0, decorators_1.ApiProperty)(metadata); + decoratorFactory(PickTypeClass.prototype, propertyKey); + }); + } + applyFields(fields); + metadata_loader_1.MetadataLoader.addRefreshHook(() => { + const fields2 = modelPropertiesAccessor.getModelProperties(classRef.prototype).filter((item) => keys.includes(item)); + applyFields(fields2); + }); + return PickTypeClass; + } + exports2.PickType = PickType; + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/type-helpers/index.js +var require_type_helpers = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/type-helpers/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_intersection_type_helper2(), exports2); + __exportStar2(require_omit_type_helper2(), exports2); + __exportStar2(require_partial_type_helper2(), exports2); + __exportStar2(require_pick_type_helper2(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/index.js +var require_dist4 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/dist/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + require_Reflect(); + __exportStar2(require_decorators5(), exports2); + __exportStar2(require_document_builder(), exports2); + __exportStar2(require_interfaces8(), exports2); + __exportStar2(require_swagger_module(), exports2); + __exportStar2(require_type_helpers(), exports2); + __exportStar2(require_utils13(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/index.js +var require_swagger = __commonJS({ + "../../node_modules/.pnpm/@nestjs+swagger@7.4.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_l2qr66rg7lciapeoubxx2adjte/node_modules/@nestjs/swagger/index.js"(exports2) { + "use strict"; + function __export2(m) { + for (var p in m) if (!exports2.hasOwnProperty(p)) exports2[p] = m[p]; + } + exports2.__esModule = true; + __export2(require_dist4()); + } +}); + +// ../../node_modules/.pnpm/helmet@7.2.0/node_modules/helmet/index.cjs +var require_helmet = __commonJS({ + "../../node_modules/.pnpm/helmet@7.2.0/node_modules/helmet/index.cjs"(exports2, module2) { + "use strict"; + Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); + var dangerouslyDisableDefaultSrc = Symbol("dangerouslyDisableDefaultSrc"); + var DEFAULT_DIRECTIVES = { + "default-src": ["'self'"], + "base-uri": ["'self'"], + "font-src": ["'self'", "https:", "data:"], + "form-action": ["'self'"], + "frame-ancestors": ["'self'"], + "img-src": ["'self'", "data:"], + "object-src": ["'none'"], + "script-src": ["'self'"], + "script-src-attr": ["'none'"], + "style-src": ["'self'", "https:", "'unsafe-inline'"], + "upgrade-insecure-requests": [] + }; + var SHOULD_BE_QUOTED = /* @__PURE__ */ new Set(["none", "self", "strict-dynamic", "report-sample", "inline-speculation-rules", "unsafe-inline", "unsafe-eval", "unsafe-hashes", "wasm-unsafe-eval"]); + var getDefaultDirectives = () => Object.assign({}, DEFAULT_DIRECTIVES); + var dashify = (str) => str.replace(/[A-Z]/g, (capitalLetter) => "-" + capitalLetter.toLowerCase()); + var isDirectiveValueInvalid = (directiveValue) => /;|,/.test(directiveValue); + var shouldDirectiveValueEntryBeQuoted = (directiveValueEntry) => SHOULD_BE_QUOTED.has(directiveValueEntry) || directiveValueEntry.startsWith("nonce-") || directiveValueEntry.startsWith("sha256-") || directiveValueEntry.startsWith("sha384-") || directiveValueEntry.startsWith("sha512-"); + var warnIfDirectiveValueEntryShouldBeQuoted = (value) => { + if (shouldDirectiveValueEntryBeQuoted(value)) { + console.warn(`Content-Security-Policy got directive value \`${value}\` which should be single-quoted and changed to \`'${value}'\`. This will be an error in future versions of Helmet.`); + } + }; + var has = (obj2, key) => Object.prototype.hasOwnProperty.call(obj2, key); + function normalizeDirectives(options) { + const defaultDirectives = getDefaultDirectives(); + const { useDefaults = true, directives: rawDirectives = defaultDirectives } = options; + const result = /* @__PURE__ */ new Map(); + const directiveNamesSeen = /* @__PURE__ */ new Set(); + const directivesExplicitlyDisabled = /* @__PURE__ */ new Set(); + for (const rawDirectiveName in rawDirectives) { + if (!has(rawDirectives, rawDirectiveName)) { + continue; + } + if (rawDirectiveName.length === 0 || /[^a-zA-Z0-9-]/.test(rawDirectiveName)) { + throw new Error(`Content-Security-Policy received an invalid directive name ${JSON.stringify(rawDirectiveName)}`); + } + const directiveName = dashify(rawDirectiveName); + if (directiveNamesSeen.has(directiveName)) { + throw new Error(`Content-Security-Policy received a duplicate directive ${JSON.stringify(directiveName)}`); + } + directiveNamesSeen.add(directiveName); + const rawDirectiveValue = rawDirectives[rawDirectiveName]; + let directiveValue; + if (rawDirectiveValue === null) { + if (directiveName === "default-src") { + throw new Error("Content-Security-Policy needs a default-src but it was set to `null`. If you really want to disable it, set it to `contentSecurityPolicy.dangerouslyDisableDefaultSrc`."); + } + directivesExplicitlyDisabled.add(directiveName); + continue; + } else if (typeof rawDirectiveValue === "string") { + directiveValue = [rawDirectiveValue]; + } else if (!rawDirectiveValue) { + throw new Error(`Content-Security-Policy received an invalid directive value for ${JSON.stringify(directiveName)}`); + } else if (rawDirectiveValue === dangerouslyDisableDefaultSrc) { + if (directiveName === "default-src") { + directivesExplicitlyDisabled.add("default-src"); + continue; + } else { + throw new Error(`Content-Security-Policy: tried to disable ${JSON.stringify(directiveName)} as if it were default-src; simply omit the key`); + } + } else { + directiveValue = rawDirectiveValue; + } + for (const element of directiveValue) { + if (typeof element === "string") { + if (isDirectiveValueInvalid(element)) { + throw new Error(`Content-Security-Policy received an invalid directive value for ${JSON.stringify(directiveName)}`); + } + warnIfDirectiveValueEntryShouldBeQuoted(element); + } + } + result.set(directiveName, directiveValue); + } + if (useDefaults) { + Object.entries(defaultDirectives).forEach(([defaultDirectiveName, defaultDirectiveValue]) => { + if (!result.has(defaultDirectiveName) && !directivesExplicitlyDisabled.has(defaultDirectiveName)) { + result.set(defaultDirectiveName, defaultDirectiveValue); + } + }); + } + if (!result.size) { + throw new Error("Content-Security-Policy has no directives. Either set some or disable the header"); + } + if (!result.has("default-src") && !directivesExplicitlyDisabled.has("default-src")) { + throw new Error("Content-Security-Policy needs a default-src but none was provided. If you really want to disable it, set it to `contentSecurityPolicy.dangerouslyDisableDefaultSrc`."); + } + return result; + } + function getHeaderValue(req, res, normalizedDirectives) { + let err; + const result = []; + normalizedDirectives.forEach((rawDirectiveValue, directiveName) => { + let directiveValue = ""; + for (const element of rawDirectiveValue) { + if (typeof element === "function") { + const newElement = element(req, res); + warnIfDirectiveValueEntryShouldBeQuoted(newElement); + directiveValue += " " + newElement; + } else { + directiveValue += " " + element; + } + } + if (!directiveValue) { + result.push(directiveName); + } else if (isDirectiveValueInvalid(directiveValue)) { + err = new Error(`Content-Security-Policy received an invalid directive value for ${JSON.stringify(directiveName)}`); + } else { + result.push(`${directiveName}${directiveValue}`); + } + }); + return err ? err : result.join(";"); + } + var contentSecurityPolicy = function contentSecurityPolicy2(options = {}) { + const headerName = options.reportOnly ? "Content-Security-Policy-Report-Only" : "Content-Security-Policy"; + const normalizedDirectives = normalizeDirectives(options); + return function contentSecurityPolicyMiddleware(req, res, next) { + const result = getHeaderValue(req, res, normalizedDirectives); + if (result instanceof Error) { + next(result); + } else { + res.setHeader(headerName, result); + next(); + } + }; + }; + contentSecurityPolicy.getDefaultDirectives = getDefaultDirectives; + contentSecurityPolicy.dangerouslyDisableDefaultSrc = dangerouslyDisableDefaultSrc; + var ALLOWED_POLICIES$2 = /* @__PURE__ */ new Set(["require-corp", "credentialless", "unsafe-none"]); + function getHeaderValueFromOptions$6({ policy = "require-corp" }) { + if (ALLOWED_POLICIES$2.has(policy)) { + return policy; + } else { + throw new Error(`Cross-Origin-Embedder-Policy does not support the ${JSON.stringify(policy)} policy`); + } + } + function crossOriginEmbedderPolicy(options = {}) { + const headerValue = getHeaderValueFromOptions$6(options); + return function crossOriginEmbedderPolicyMiddleware(_req, res, next) { + res.setHeader("Cross-Origin-Embedder-Policy", headerValue); + next(); + }; + } + var ALLOWED_POLICIES$1 = /* @__PURE__ */ new Set(["same-origin", "same-origin-allow-popups", "unsafe-none"]); + function getHeaderValueFromOptions$5({ policy = "same-origin" }) { + if (ALLOWED_POLICIES$1.has(policy)) { + return policy; + } else { + throw new Error(`Cross-Origin-Opener-Policy does not support the ${JSON.stringify(policy)} policy`); + } + } + function crossOriginOpenerPolicy(options = {}) { + const headerValue = getHeaderValueFromOptions$5(options); + return function crossOriginOpenerPolicyMiddleware(_req, res, next) { + res.setHeader("Cross-Origin-Opener-Policy", headerValue); + next(); + }; + } + var ALLOWED_POLICIES = /* @__PURE__ */ new Set(["same-origin", "same-site", "cross-origin"]); + function getHeaderValueFromOptions$4({ policy = "same-origin" }) { + if (ALLOWED_POLICIES.has(policy)) { + return policy; + } else { + throw new Error(`Cross-Origin-Resource-Policy does not support the ${JSON.stringify(policy)} policy`); + } + } + function crossOriginResourcePolicy(options = {}) { + const headerValue = getHeaderValueFromOptions$4(options); + return function crossOriginResourcePolicyMiddleware(_req, res, next) { + res.setHeader("Cross-Origin-Resource-Policy", headerValue); + next(); + }; + } + function originAgentCluster() { + return function originAgentClusterMiddleware(_req, res, next) { + res.setHeader("Origin-Agent-Cluster", "?1"); + next(); + }; + } + var ALLOWED_TOKENS = /* @__PURE__ */ new Set(["no-referrer", "no-referrer-when-downgrade", "same-origin", "origin", "strict-origin", "origin-when-cross-origin", "strict-origin-when-cross-origin", "unsafe-url", ""]); + function getHeaderValueFromOptions$3({ policy = ["no-referrer"] }) { + const tokens = typeof policy === "string" ? [policy] : policy; + if (tokens.length === 0) { + throw new Error("Referrer-Policy received no policy tokens"); + } + const tokensSeen = /* @__PURE__ */ new Set(); + tokens.forEach((token) => { + if (!ALLOWED_TOKENS.has(token)) { + throw new Error(`Referrer-Policy received an unexpected policy token ${JSON.stringify(token)}`); + } else if (tokensSeen.has(token)) { + throw new Error(`Referrer-Policy received a duplicate policy token ${JSON.stringify(token)}`); + } + tokensSeen.add(token); + }); + return tokens.join(","); + } + function referrerPolicy(options = {}) { + const headerValue = getHeaderValueFromOptions$3(options); + return function referrerPolicyMiddleware(_req, res, next) { + res.setHeader("Referrer-Policy", headerValue); + next(); + }; + } + var DEFAULT_MAX_AGE = 180 * 24 * 60 * 60; + function parseMaxAge(value = DEFAULT_MAX_AGE) { + if (value >= 0 && Number.isFinite(value)) { + return Math.floor(value); + } else { + throw new Error(`Strict-Transport-Security: ${JSON.stringify(value)} is not a valid value for maxAge. Please choose a positive integer.`); + } + } + function getHeaderValueFromOptions$2(options) { + if ("maxage" in options) { + throw new Error("Strict-Transport-Security received an unsupported property, `maxage`. Did you mean to pass `maxAge`?"); + } + if ("includeSubdomains" in options) { + console.warn('Strict-Transport-Security middleware should use `includeSubDomains` instead of `includeSubdomains`. (The correct one has an uppercase "D".)'); + } + const directives = [`max-age=${parseMaxAge(options.maxAge)}`]; + if (options.includeSubDomains === void 0 || options.includeSubDomains) { + directives.push("includeSubDomains"); + } + if (options.preload) { + directives.push("preload"); + } + return directives.join("; "); + } + function strictTransportSecurity(options = {}) { + const headerValue = getHeaderValueFromOptions$2(options); + return function strictTransportSecurityMiddleware(_req, res, next) { + res.setHeader("Strict-Transport-Security", headerValue); + next(); + }; + } + function xContentTypeOptions() { + return function xContentTypeOptionsMiddleware(_req, res, next) { + res.setHeader("X-Content-Type-Options", "nosniff"); + next(); + }; + } + function xDnsPrefetchControl(options = {}) { + const headerValue = options.allow ? "on" : "off"; + return function xDnsPrefetchControlMiddleware(_req, res, next) { + res.setHeader("X-DNS-Prefetch-Control", headerValue); + next(); + }; + } + function xDownloadOptions() { + return function xDownloadOptionsMiddleware(_req, res, next) { + res.setHeader("X-Download-Options", "noopen"); + next(); + }; + } + function getHeaderValueFromOptions$1({ action = "sameorigin" }) { + const normalizedAction = typeof action === "string" ? action.toUpperCase() : action; + switch (normalizedAction) { + case "SAME-ORIGIN": + return "SAMEORIGIN"; + case "DENY": + case "SAMEORIGIN": + return normalizedAction; + default: + throw new Error(`X-Frame-Options received an invalid action ${JSON.stringify(action)}`); + } + } + function xFrameOptions(options = {}) { + const headerValue = getHeaderValueFromOptions$1(options); + return function xFrameOptionsMiddleware(_req, res, next) { + res.setHeader("X-Frame-Options", headerValue); + next(); + }; + } + var ALLOWED_PERMITTED_POLICIES = /* @__PURE__ */ new Set(["none", "master-only", "by-content-type", "all"]); + function getHeaderValueFromOptions({ permittedPolicies = "none" }) { + if (ALLOWED_PERMITTED_POLICIES.has(permittedPolicies)) { + return permittedPolicies; + } else { + throw new Error(`X-Permitted-Cross-Domain-Policies does not support ${JSON.stringify(permittedPolicies)}`); + } + } + function xPermittedCrossDomainPolicies(options = {}) { + const headerValue = getHeaderValueFromOptions(options); + return function xPermittedCrossDomainPoliciesMiddleware(_req, res, next) { + res.setHeader("X-Permitted-Cross-Domain-Policies", headerValue); + next(); + }; + } + function xPoweredBy() { + return function xPoweredByMiddleware(_req, res, next) { + res.removeHeader("X-Powered-By"); + next(); + }; + } + function xXssProtection() { + return function xXssProtectionMiddleware(_req, res, next) { + res.setHeader("X-XSS-Protection", "0"); + next(); + }; + } + function getMiddlewareFunctionsFromOptions(options) { + var _a, _b, _c, _d, _e, _f, _g, _h; + const result = []; + switch (options.contentSecurityPolicy) { + case void 0: + case true: + result.push(contentSecurityPolicy()); + break; + case false: + break; + default: + result.push(contentSecurityPolicy(options.contentSecurityPolicy)); + break; + } + switch (options.crossOriginEmbedderPolicy) { + case void 0: + case false: + break; + case true: + result.push(crossOriginEmbedderPolicy()); + break; + default: + result.push(crossOriginEmbedderPolicy(options.crossOriginEmbedderPolicy)); + break; + } + switch (options.crossOriginOpenerPolicy) { + case void 0: + case true: + result.push(crossOriginOpenerPolicy()); + break; + case false: + break; + default: + result.push(crossOriginOpenerPolicy(options.crossOriginOpenerPolicy)); + break; + } + switch (options.crossOriginResourcePolicy) { + case void 0: + case true: + result.push(crossOriginResourcePolicy()); + break; + case false: + break; + default: + result.push(crossOriginResourcePolicy(options.crossOriginResourcePolicy)); + break; + } + switch (options.originAgentCluster) { + case void 0: + case true: + result.push(originAgentCluster()); + break; + case false: + break; + default: + console.warn("Origin-Agent-Cluster does not take options. Remove the property to silence this warning."); + result.push(originAgentCluster()); + break; + } + switch (options.referrerPolicy) { + case void 0: + case true: + result.push(referrerPolicy()); + break; + case false: + break; + default: + result.push(referrerPolicy(options.referrerPolicy)); + break; + } + if ("strictTransportSecurity" in options && "hsts" in options) { + throw new Error("Strict-Transport-Security option was specified twice. Remove `hsts` to silence this warning."); + } + const strictTransportSecurityOption = (_a = options.strictTransportSecurity) !== null && _a !== void 0 ? _a : options.hsts; + switch (strictTransportSecurityOption) { + case void 0: + case true: + result.push(strictTransportSecurity()); + break; + case false: + break; + default: + result.push(strictTransportSecurity(strictTransportSecurityOption)); + break; + } + if ("xContentTypeOptions" in options && "noSniff" in options) { + throw new Error("X-Content-Type-Options option was specified twice. Remove `noSniff` to silence this warning."); + } + const xContentTypeOptionsOption = (_b = options.xContentTypeOptions) !== null && _b !== void 0 ? _b : options.noSniff; + switch (xContentTypeOptionsOption) { + case void 0: + case true: + result.push(xContentTypeOptions()); + break; + case false: + break; + default: + console.warn("X-Content-Type-Options does not take options. Remove the property to silence this warning."); + result.push(xContentTypeOptions()); + break; + } + if ("xDnsPrefetchControl" in options && "dnsPrefetchControl" in options) { + throw new Error("X-DNS-Prefetch-Control option was specified twice. Remove `dnsPrefetchControl` to silence this warning."); + } + const xDnsPrefetchControlOption = (_c = options.xDnsPrefetchControl) !== null && _c !== void 0 ? _c : options.dnsPrefetchControl; + switch (xDnsPrefetchControlOption) { + case void 0: + case true: + result.push(xDnsPrefetchControl()); + break; + case false: + break; + default: + result.push(xDnsPrefetchControl(xDnsPrefetchControlOption)); + break; + } + if ("xDownloadOptions" in options && "ieNoOpen" in options) { + throw new Error("X-Download-Options option was specified twice. Remove `ieNoOpen` to silence this warning."); + } + const xDownloadOptionsOption = (_d = options.xDownloadOptions) !== null && _d !== void 0 ? _d : options.ieNoOpen; + switch (xDownloadOptionsOption) { + case void 0: + case true: + result.push(xDownloadOptions()); + break; + case false: + break; + default: + console.warn("X-Download-Options does not take options. Remove the property to silence this warning."); + result.push(xDownloadOptions()); + break; + } + if ("xFrameOptions" in options && "frameguard" in options) { + throw new Error("X-Frame-Options option was specified twice. Remove `frameguard` to silence this warning."); + } + const xFrameOptionsOption = (_e = options.xFrameOptions) !== null && _e !== void 0 ? _e : options.frameguard; + switch (xFrameOptionsOption) { + case void 0: + case true: + result.push(xFrameOptions()); + break; + case false: + break; + default: + result.push(xFrameOptions(xFrameOptionsOption)); + break; + } + if ("xPermittedCrossDomainPolicies" in options && "permittedCrossDomainPolicies" in options) { + throw new Error("X-Permitted-Cross-Domain-Policies option was specified twice. Remove `permittedCrossDomainPolicies` to silence this warning."); + } + const xPermittedCrossDomainPoliciesOption = (_f = options.xPermittedCrossDomainPolicies) !== null && _f !== void 0 ? _f : options.permittedCrossDomainPolicies; + switch (xPermittedCrossDomainPoliciesOption) { + case void 0: + case true: + result.push(xPermittedCrossDomainPolicies()); + break; + case false: + break; + default: + result.push(xPermittedCrossDomainPolicies(xPermittedCrossDomainPoliciesOption)); + break; + } + if ("xPoweredBy" in options && "hidePoweredBy" in options) { + throw new Error("X-Powered-By option was specified twice. Remove `hidePoweredBy` to silence this warning."); + } + const xPoweredByOption = (_g = options.xPoweredBy) !== null && _g !== void 0 ? _g : options.hidePoweredBy; + switch (xPoweredByOption) { + case void 0: + case true: + result.push(xPoweredBy()); + break; + case false: + break; + default: + console.warn("X-Powered-By does not take options. Remove the property to silence this warning."); + result.push(xPoweredBy()); + break; + } + if ("xXssProtection" in options && "xssFilter" in options) { + throw new Error("X-XSS-Protection option was specified twice. Remove `xssFilter` to silence this warning."); + } + const xXssProtectionOption = (_h = options.xXssProtection) !== null && _h !== void 0 ? _h : options.xssFilter; + switch (xXssProtectionOption) { + case void 0: + case true: + result.push(xXssProtection()); + break; + case false: + break; + default: + console.warn("X-XSS-Protection does not take options. Remove the property to silence this warning."); + result.push(xXssProtection()); + break; + } + return result; + } + var helmet = Object.assign( + function helmet2(options = {}) { + var _a; + if (((_a = options.constructor) === null || _a === void 0 ? void 0 : _a.name) === "IncomingMessage") { + throw new Error("It appears you have done something like `app.use(helmet)`, but it should be `app.use(helmet())`."); + } + const middlewareFunctions = getMiddlewareFunctionsFromOptions(options); + return function helmetMiddleware(req, res, next) { + let middlewareIndex = 0; + (function internalNext(err) { + if (err) { + next(err); + return; + } + const middlewareFunction = middlewareFunctions[middlewareIndex]; + if (middlewareFunction) { + middlewareIndex++; + middlewareFunction(req, res, internalNext); + } else { + next(); + } + })(); + }; + }, + { + contentSecurityPolicy, + crossOriginEmbedderPolicy, + crossOriginOpenerPolicy, + crossOriginResourcePolicy, + originAgentCluster, + referrerPolicy, + strictTransportSecurity, + xContentTypeOptions, + xDnsPrefetchControl, + xDownloadOptions, + xFrameOptions, + xPermittedCrossDomainPolicies, + xPoweredBy, + xXssProtection, + // Legacy aliases + dnsPrefetchControl: xDnsPrefetchControl, + xssFilter: xXssProtection, + permittedCrossDomainPolicies: xPermittedCrossDomainPolicies, + ieNoOpen: xDownloadOptions, + noSniff: xContentTypeOptions, + frameguard: xFrameOptions, + hidePoweredBy: xPoweredBy, + hsts: strictTransportSecurity + } + ); + exports2.contentSecurityPolicy = contentSecurityPolicy; + exports2.crossOriginEmbedderPolicy = crossOriginEmbedderPolicy; + exports2.crossOriginOpenerPolicy = crossOriginOpenerPolicy; + exports2.crossOriginResourcePolicy = crossOriginResourcePolicy; + exports2.default = helmet; + exports2.dnsPrefetchControl = xDnsPrefetchControl; + exports2.frameguard = xFrameOptions; + exports2.hidePoweredBy = xPoweredBy; + exports2.hsts = strictTransportSecurity; + exports2.ieNoOpen = xDownloadOptions; + exports2.noSniff = xContentTypeOptions; + exports2.originAgentCluster = originAgentCluster; + exports2.permittedCrossDomainPolicies = xPermittedCrossDomainPolicies; + exports2.referrerPolicy = referrerPolicy; + exports2.strictTransportSecurity = strictTransportSecurity; + exports2.xContentTypeOptions = xContentTypeOptions; + exports2.xDnsPrefetchControl = xDnsPrefetchControl; + exports2.xDownloadOptions = xDownloadOptions; + exports2.xFrameOptions = xFrameOptions; + exports2.xPermittedCrossDomainPolicies = xPermittedCrossDomainPolicies; + exports2.xPoweredBy = xPoweredBy; + exports2.xXssProtection = xXssProtection; + exports2.xssFilter = xXssProtection; + module2.exports = exports2.default; + module2.exports.default = module2.exports; + } +}); + +// ../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/bull.messages.js +var require_bull_messages = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/bull.messages.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NO_QUEUE_FOUND = void 0; + var NO_QUEUE_FOUND = (name) => name ? `No Queue was found with the given name (${name}). Check your configuration.` : "No Queue was found. Check your configuration."; + exports2.NO_QUEUE_FOUND = NO_QUEUE_FOUND; + } +}); + +// ../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/bull.tokens.js +var require_bull_tokens = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/bull.tokens.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.JOB_REF = void 0; + var core_12 = require_core3(); + exports2.JOB_REF = core_12.REQUEST; + } +}); + +// ../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/errors/missing-shared-bull-config.error.js +var require_missing_shared_bull_config_error = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/errors/missing-shared-bull-config.error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MissingBullSharedConfigurationError = void 0; + var MissingBullSharedConfigurationError = class extends Error { + constructor(configKey, queueName) { + super(`Configuration "${configKey}" referenced from the "Queue(${queueName})" options does not exist.`); + } + }; + exports2.MissingBullSharedConfigurationError = MissingBullSharedConfigurationError; + } +}); + +// ../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/errors/index.js +var require_errors2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/errors/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_missing_shared_bull_config_error(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/helpers/create-conditional-dep-holder.helper.js +var require_create_conditional_dep_holder_helper = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/helpers/create-conditional-dep-holder.helper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createConditionalDepHolder = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var common_12 = require_common(); + var missing_shared_bull_config_error_1 = require_missing_shared_bull_config_error(); + function createConditionalDepHolder(depToken, optionalDep, errorFactory = (caller) => new missing_shared_bull_config_error_1.MissingBullSharedConfigurationError(depToken, caller)) { + let ConditionalDepHolder = class ConditionalDepHolder { + constructor(_dependencyRef) { + this._dependencyRef = _dependencyRef; + } + getDependencyRef(caller) { + if (depToken !== optionalDep && !this._dependencyRef) { + throw errorFactory(caller); + } + return this._dependencyRef; + } + }; + ConditionalDepHolder = tslib_1.__decorate([ + tslib_1.__param(0, (0, common_12.Optional)()), + tslib_1.__param(0, (0, common_12.Inject)(depToken)), + tslib_1.__metadata("design:paramtypes", [Object]) + ], ConditionalDepHolder); + return (0, common_12.mixin)(ConditionalDepHolder); + } + exports2.createConditionalDepHolder = createConditionalDepHolder; + } +}); + +// ../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/helpers/index.js +var require_helpers4 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/helpers/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_create_conditional_dep_holder_helper(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/utils/get-queue-token.util.js +var require_get_queue_token_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/utils/get-queue-token.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getQueueToken = void 0; + function getQueueToken(name) { + return name ? `BullQueue_${name}` : "BullQueue_default"; + } + exports2.getQueueToken = getQueueToken; + } +}); + +// ../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/utils/index.js +var require_utils14 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/utils/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_get_queue_token_util(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/index.js +var require_dist5 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bull-shared@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.1_s3pmlsdkelnxdcebkm32asyrty/node_modules/@nestjs/bull-shared/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_bull_messages(), exports2); + tslib_1.__exportStar(require_bull_tokens(), exports2); + tslib_1.__exportStar(require_errors2(), exports2); + tslib_1.__exportStar(require_helpers4(), exports2); + tslib_1.__exportStar(require_utils14(), exports2); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/async-fifo-queue.js +var require_async_fifo_queue = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/async-fifo-queue.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AsyncFifoQueue = void 0; + var Node = class { + constructor(value) { + this.value = void 0; + this.next = null; + this.value = value; + } + }; + var LinkedList = class { + constructor() { + this.length = 0; + this.head = null; + this.tail = null; + } + push(value) { + const newNode = new Node(value); + if (!this.length) { + this.head = newNode; + } else { + this.tail.next = newNode; + } + this.tail = newNode; + this.length += 1; + return newNode; + } + shift() { + if (!this.length) { + return null; + } else { + const head = this.head; + this.head = this.head.next; + this.length -= 1; + return head; + } + } + }; + var AsyncFifoQueue = class { + constructor(ignoreErrors = false) { + this.ignoreErrors = ignoreErrors; + this.queue = new LinkedList(); + this.pending = /* @__PURE__ */ new Set(); + this.newPromise(); + } + /** + * Adds a promise to the queue. When it resolves, its value is enqueued + * and, if a consumer is waiting via {@link fetch}, the next pending + * promise is resolved with the value. + * + * @param promise - The asynchronous operation to add to the queue. + */ + add(promise) { + this.pending.add(promise); + promise.then((data) => { + this.pending.delete(promise); + if (this.queue.length === 0) { + this.resolvePromise(data); + } + this.queue.push(data); + }).catch((err) => { + if (this.ignoreErrors) { + this.queue.push(void 0); + } + this.pending.delete(promise); + this.rejectPromise(err); + }); + } + /** + * Waits for all currently pending promises to settle. + * + * @returns A promise that resolves once every in-flight promise has resolved. + */ + async waitAll() { + await Promise.all(this.pending); + } + /** + * Returns the total number of items currently tracked by the queue, + * including both pending (in-flight) promises and resolved items that + * have not yet been fetched. + * + * @returns The sum of pending and queued items. + */ + numTotal() { + return this.pending.size + this.queue.length; + } + /** + * Returns the number of promises that are still pending (in-flight). + * + * @returns The number of unresolved promises currently in the queue. + */ + numPending() { + return this.pending.size; + } + /** + * Returns the number of items that have already resolved but have not + * yet been fetched by a consumer. + * + * @returns The number of resolved items waiting to be consumed. + */ + numQueued() { + return this.queue.length; + } + resolvePromise(data) { + this.resolve(data); + this.newPromise(); + } + rejectPromise(err) { + this.reject(err); + this.newPromise(); + } + newPromise() { + this.nextPromise = new Promise((resolve, reject) => { + this.resolve = resolve; + this.reject = reject; + }); + } + async wait() { + return this.nextPromise; + } + /** + * Fetches the next resolved item from the queue in FIFO order. If no + * items are currently resolved but pending promises exist, it waits + * until the next one resolves. + * + * @returns The next resolved value, or `undefined` if there are no + * pending or queued items. + */ + async fetch() { + var _a; + if (this.pending.size === 0 && this.queue.length === 0) { + return; + } + while (this.queue.length === 0) { + try { + await this.wait(); + } catch (err) { + if (!this.ignoreErrors) { + console.error("Unexpected Error in AsyncFifoQueue", err); + } + } + } + return (_a = this.queue.shift()) === null || _a === void 0 ? void 0 : _a.value; + } + }; + exports2.AsyncFifoQueue = AsyncFifoQueue; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/backoffs.js +var require_backoffs = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/backoffs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Backoffs = void 0; + var Backoffs = class { + static normalize(backoff) { + if (Number.isFinite(backoff)) { + return { + type: "fixed", + delay: backoff + }; + } else if (backoff) { + return backoff; + } + } + static calculate(backoff, attemptsMade, err, job, customStrategy) { + if (backoff) { + const strategy = lookupStrategy(backoff, customStrategy); + return strategy(attemptsMade, backoff.type, err, job); + } + } + }; + exports2.Backoffs = Backoffs; + Backoffs.builtinStrategies = { + fixed: function(delay, jitter = 0) { + return function() { + if (jitter > 0) { + const minDelay = delay * (1 - jitter); + return Math.floor(Math.random() * delay * jitter + minDelay); + } else { + return delay; + } + }; + }, + exponential: function(delay, jitter = 0) { + return function(attemptsMade) { + if (jitter > 0) { + const maxDelay = Math.round(Math.pow(2, attemptsMade - 1) * delay); + const minDelay = maxDelay * (1 - jitter); + return Math.floor(Math.random() * maxDelay * jitter + minDelay); + } else { + return Math.round(Math.pow(2, attemptsMade - 1) * delay); + } + }; + } + }; + function lookupStrategy(backoff, customStrategy) { + if (backoff.type in Backoffs.builtinStrategies) { + return Backoffs.builtinStrategies[backoff.type](backoff.delay, backoff.jitter); + } else if (customStrategy) { + return customStrategy; + } else { + throw new Error(`Unknown backoff strategy ${backoff.type}. + If a custom backoff strategy is used, specify it when the queue is created.`); + } + } + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/enums/child-command.js +var require_child_command = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/enums/child-command.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ChildCommand = void 0; + var ChildCommand; + (function(ChildCommand2) { + ChildCommand2[ChildCommand2["Init"] = 0] = "Init"; + ChildCommand2[ChildCommand2["Start"] = 1] = "Start"; + ChildCommand2[ChildCommand2["Stop"] = 2] = "Stop"; + ChildCommand2[ChildCommand2["GetChildrenValuesResponse"] = 3] = "GetChildrenValuesResponse"; + ChildCommand2[ChildCommand2["GetIgnoredChildrenFailuresResponse"] = 4] = "GetIgnoredChildrenFailuresResponse"; + ChildCommand2[ChildCommand2["GetDependenciesCountResponse"] = 5] = "GetDependenciesCountResponse"; + ChildCommand2[ChildCommand2["MoveToWaitingChildrenResponse"] = 6] = "MoveToWaitingChildrenResponse"; + ChildCommand2[ChildCommand2["Cancel"] = 7] = "Cancel"; + ChildCommand2[ChildCommand2["GetDependenciesResponse"] = 8] = "GetDependenciesResponse"; + })(ChildCommand || (exports2.ChildCommand = ChildCommand = {})); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/enums/error-code.js +var require_error_code = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/enums/error-code.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ErrorCode = void 0; + var ErrorCode; + (function(ErrorCode2) { + ErrorCode2[ErrorCode2["JobNotExist"] = -1] = "JobNotExist"; + ErrorCode2[ErrorCode2["JobLockNotExist"] = -2] = "JobLockNotExist"; + ErrorCode2[ErrorCode2["JobNotInState"] = -3] = "JobNotInState"; + ErrorCode2[ErrorCode2["JobPendingChildren"] = -4] = "JobPendingChildren"; + ErrorCode2[ErrorCode2["ParentJobNotExist"] = -5] = "ParentJobNotExist"; + ErrorCode2[ErrorCode2["JobLockMismatch"] = -6] = "JobLockMismatch"; + ErrorCode2[ErrorCode2["ParentJobCannotBeReplaced"] = -7] = "ParentJobCannotBeReplaced"; + ErrorCode2[ErrorCode2["JobBelongsToJobScheduler"] = -8] = "JobBelongsToJobScheduler"; + ErrorCode2[ErrorCode2["JobHasFailedChildren"] = -9] = "JobHasFailedChildren"; + ErrorCode2[ErrorCode2["SchedulerJobIdCollision"] = -10] = "SchedulerJobIdCollision"; + ErrorCode2[ErrorCode2["SchedulerJobSlotsBusy"] = -11] = "SchedulerJobSlotsBusy"; + })(ErrorCode || (exports2.ErrorCode = ErrorCode = {})); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/enums/parent-command.js +var require_parent_command = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/enums/parent-command.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ParentCommand = void 0; + var ParentCommand; + (function(ParentCommand2) { + ParentCommand2[ParentCommand2["Completed"] = 0] = "Completed"; + ParentCommand2[ParentCommand2["Error"] = 1] = "Error"; + ParentCommand2[ParentCommand2["Failed"] = 2] = "Failed"; + ParentCommand2[ParentCommand2["InitFailed"] = 3] = "InitFailed"; + ParentCommand2[ParentCommand2["InitCompleted"] = 4] = "InitCompleted"; + ParentCommand2[ParentCommand2["Log"] = 5] = "Log"; + ParentCommand2[ParentCommand2["MoveToDelayed"] = 6] = "MoveToDelayed"; + ParentCommand2[ParentCommand2["MoveToWait"] = 7] = "MoveToWait"; + ParentCommand2[ParentCommand2["Progress"] = 8] = "Progress"; + ParentCommand2[ParentCommand2["Update"] = 9] = "Update"; + ParentCommand2[ParentCommand2["GetChildrenValues"] = 10] = "GetChildrenValues"; + ParentCommand2[ParentCommand2["GetIgnoredChildrenFailures"] = 11] = "GetIgnoredChildrenFailures"; + ParentCommand2[ParentCommand2["GetDependenciesCount"] = 12] = "GetDependenciesCount"; + ParentCommand2[ParentCommand2["MoveToWaitingChildren"] = 13] = "MoveToWaitingChildren"; + ParentCommand2[ParentCommand2["GetDependencies"] = 14] = "GetDependencies"; + })(ParentCommand || (exports2.ParentCommand = ParentCommand = {})); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/enums/metrics-time.js +var require_metrics_time = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/enums/metrics-time.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MetricsTime = void 0; + var MetricsTime; + (function(MetricsTime2) { + MetricsTime2[MetricsTime2["ONE_MINUTE"] = 1] = "ONE_MINUTE"; + MetricsTime2[MetricsTime2["FIVE_MINUTES"] = 5] = "FIVE_MINUTES"; + MetricsTime2[MetricsTime2["FIFTEEN_MINUTES"] = 15] = "FIFTEEN_MINUTES"; + MetricsTime2[MetricsTime2["THIRTY_MINUTES"] = 30] = "THIRTY_MINUTES"; + MetricsTime2[MetricsTime2["ONE_HOUR"] = 60] = "ONE_HOUR"; + MetricsTime2[MetricsTime2["ONE_WEEK"] = 10080] = "ONE_WEEK"; + MetricsTime2[MetricsTime2["TWO_WEEKS"] = 20160] = "TWO_WEEKS"; + MetricsTime2[MetricsTime2["ONE_MONTH"] = 80640] = "ONE_MONTH"; + })(MetricsTime || (exports2.MetricsTime = MetricsTime = {})); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/enums/telemetry-attributes.js +var require_telemetry_attributes = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/enums/telemetry-attributes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SpanKind = exports2.MetricNames = exports2.TelemetryAttributes = void 0; + var TelemetryAttributes; + (function(TelemetryAttributes2) { + TelemetryAttributes2["QueueName"] = "bullmq.queue.name"; + TelemetryAttributes2["QueueOperation"] = "bullmq.queue.operation"; + TelemetryAttributes2["BulkCount"] = "bullmq.job.bulk.count"; + TelemetryAttributes2["BulkNames"] = "bullmq.job.bulk.names"; + TelemetryAttributes2["JobName"] = "bullmq.job.name"; + TelemetryAttributes2["JobId"] = "bullmq.job.id"; + TelemetryAttributes2["JobKey"] = "bullmq.job.key"; + TelemetryAttributes2["JobIds"] = "bullmq.job.ids"; + TelemetryAttributes2["JobAttemptsMade"] = "bullmq.job.attempts.made"; + TelemetryAttributes2["DeduplicationKey"] = "bullmq.job.deduplication.key"; + TelemetryAttributes2["JobOptions"] = "bullmq.job.options"; + TelemetryAttributes2["JobProgress"] = "bullmq.job.progress"; + TelemetryAttributes2["QueueDrainDelay"] = "bullmq.queue.drain.delay"; + TelemetryAttributes2["QueueGrace"] = "bullmq.queue.grace"; + TelemetryAttributes2["QueueCleanLimit"] = "bullmq.queue.clean.limit"; + TelemetryAttributes2["QueueRateLimit"] = "bullmq.queue.rate.limit"; + TelemetryAttributes2["JobType"] = "bullmq.job.type"; + TelemetryAttributes2["QueueOptions"] = "bullmq.queue.options"; + TelemetryAttributes2["QueueEventMaxLength"] = "bullmq.queue.event.max.length"; + TelemetryAttributes2["QueueJobsState"] = "bullmq.queue.jobs.state"; + TelemetryAttributes2["WorkerOptions"] = "bullmq.worker.options"; + TelemetryAttributes2["WorkerName"] = "bullmq.worker.name"; + TelemetryAttributes2["WorkerId"] = "bullmq.worker.id"; + TelemetryAttributes2["WorkerRateLimit"] = "bullmq.worker.rate.limit"; + TelemetryAttributes2["WorkerDoNotWaitActive"] = "bullmq.worker.do.not.wait.active"; + TelemetryAttributes2["WorkerForceClose"] = "bullmq.worker.force.close"; + TelemetryAttributes2["WorkerStalledJobs"] = "bullmq.worker.stalled.jobs"; + TelemetryAttributes2["WorkerFailedJobs"] = "bullmq.worker.failed.jobs"; + TelemetryAttributes2["WorkerJobsToExtendLocks"] = "bullmq.worker.jobs.to.extend.locks"; + TelemetryAttributes2["JobFinishedTimestamp"] = "bullmq.job.finished.timestamp"; + TelemetryAttributes2["JobAttemptFinishedTimestamp"] = "bullmq.job.attempt_finished_timestamp"; + TelemetryAttributes2["JobProcessedTimestamp"] = "bullmq.job.processed.timestamp"; + TelemetryAttributes2["JobResult"] = "bullmq.job.result"; + TelemetryAttributes2["JobFailedReason"] = "bullmq.job.failed.reason"; + TelemetryAttributes2["FlowName"] = "bullmq.flow.name"; + TelemetryAttributes2["JobSchedulerId"] = "bullmq.job.scheduler.id"; + TelemetryAttributes2["JobStatus"] = "bullmq.job.status"; + TelemetryAttributes2["JobState"] = "bullmq.job.state"; + })(TelemetryAttributes || (exports2.TelemetryAttributes = TelemetryAttributes = {})); + var MetricNames; + (function(MetricNames2) { + MetricNames2["QueueJobsCount"] = "bullmq.queue.jobs"; + MetricNames2["JobsCompleted"] = "bullmq.jobs.completed"; + MetricNames2["JobsFailed"] = "bullmq.jobs.failed"; + MetricNames2["JobsDelayed"] = "bullmq.jobs.delayed"; + MetricNames2["JobsRetried"] = "bullmq.jobs.retried"; + MetricNames2["JobsWaiting"] = "bullmq.jobs.waiting"; + MetricNames2["JobsWaitingChildren"] = "bullmq.jobs.waiting_children"; + MetricNames2["JobDuration"] = "bullmq.job.duration"; + })(MetricNames || (exports2.MetricNames = MetricNames = {})); + var SpanKind; + (function(SpanKind2) { + SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL"; + SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER"; + SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT"; + SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER"; + SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER"; + })(SpanKind || (exports2.SpanKind = SpanKind = {})); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/enums/index.js +var require_enums3 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/enums/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_child_command(), exports2); + tslib_1.__exportStar(require_error_code(), exports2); + tslib_1.__exportStar(require_parent_command(), exports2); + tslib_1.__exportStar(require_metrics_time(), exports2); + tslib_1.__exportStar(require_telemetry_attributes(), exports2); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/child.js +var require_child = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/child.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Child = void 0; + var child_process_1 = require("child_process"); + var net_1 = require("net"); + var worker_threads_1 = require("worker_threads"); + var enums_1 = require_enums3(); + var events_1 = require("events"); + var exitCodesErrors = { + 1: "Uncaught Fatal Exception", + 2: "Unused", + 3: "Internal JavaScript Parse Error", + 4: "Internal JavaScript Evaluation Failure", + 5: "Fatal Error", + 6: "Non-function Internal Exception Handler", + 7: "Internal Exception Handler Run-Time Failure", + 8: "Unused", + 9: "Invalid Argument", + 10: "Internal JavaScript Run-Time Failure", + 12: "Invalid Debug Argument", + 13: "Unfinished Top-Level Await" + }; + var Child = class extends events_1.EventEmitter { + constructor(mainFile, processFile, opts = { + useWorkerThreads: false + }) { + super(); + this.mainFile = mainFile; + this.processFile = processFile; + this.opts = opts; + this._exitCode = null; + this._signalCode = null; + this._killed = false; + } + get pid() { + if (this.childProcess) { + return this.childProcess.pid; + } else if (this.worker) { + return Math.abs(this.worker.threadId); + } else { + throw new Error("No child process or worker thread"); + } + } + get exitCode() { + return this._exitCode; + } + get signalCode() { + return this._signalCode; + } + get killed() { + if (this.childProcess) { + return this.childProcess.killed; + } + return this._killed; + } + async init() { + var _a, _b; + const execArgv = await convertExecArgv(process.execArgv); + let parent; + if (this.opts.useWorkerThreads) { + this.worker = parent = new worker_threads_1.Worker(this.mainFile, Object.assign({ execArgv, stdin: true, stdout: true, stderr: true }, this.opts.workerThreadsOptions ? this.opts.workerThreadsOptions : {})); + } else { + this.childProcess = parent = (0, child_process_1.fork)(this.mainFile, [], Object.assign({ execArgv, stdio: "pipe" }, this.opts.workerForkOptions ? this.opts.workerForkOptions : {})); + } + parent.on("exit", (exitCode, signalCode) => { + this._exitCode = exitCode; + signalCode = typeof signalCode === "undefined" ? null : signalCode; + this._signalCode = signalCode; + this._killed = true; + this.emit("exit", exitCode, signalCode); + parent.removeAllListeners(); + this.removeAllListeners(); + }); + parent.on("error", (...args) => this.emit("error", ...args)); + parent.on("message", (...args) => this.emit("message", ...args)); + parent.on("close", (...args) => this.emit("close", ...args)); + (_a = parent.stdout) === null || _a === void 0 ? void 0 : _a.pipe(process.stdout); + (_b = parent.stderr) === null || _b === void 0 ? void 0 : _b.pipe(process.stderr); + await this.initChild(); + } + async send(msg) { + return new Promise((resolve, reject) => { + if (this.childProcess) { + this.childProcess.send(msg, (err) => { + if (err) { + reject(err); + } else { + resolve(); + } + }); + } else if (this.worker) { + resolve(this.worker.postMessage(msg)); + } else { + resolve(); + } + }); + } + killProcess(signal = "SIGKILL") { + if (this.childProcess) { + this.childProcess.kill(signal); + } else if (this.worker) { + this.worker.terminate(); + } + } + async kill(signal = "SIGKILL", timeoutMs) { + if (this.hasProcessExited()) { + return; + } + const onExit = onExitOnce(this.childProcess || this.worker); + this.killProcess(signal); + if (timeoutMs !== void 0 && (timeoutMs === 0 || isFinite(timeoutMs))) { + const timeoutHandle = setTimeout(() => { + if (!this.hasProcessExited()) { + this.killProcess("SIGKILL"); + } + }, timeoutMs); + await onExit; + clearTimeout(timeoutHandle); + } + await onExit; + } + async initChild() { + const onComplete = new Promise((resolve, reject) => { + const onMessageHandler = (msg) => { + if (!Object.values(enums_1.ParentCommand).includes(msg.cmd)) { + return; + } + if (msg.cmd === enums_1.ParentCommand.InitCompleted) { + resolve(); + } else if (msg.cmd === enums_1.ParentCommand.InitFailed) { + const err = new Error(); + err.stack = msg.err.stack; + err.message = msg.err.message; + reject(err); + } + this.off("message", onMessageHandler); + this.off("close", onCloseHandler); + }; + const onCloseHandler = (code, signal) => { + if (code > 128) { + code -= 128; + } + const msg = exitCodesErrors[code] || `Unknown exit code ${code}`; + reject(new Error(`Error initializing child: ${msg} and signal ${signal}`)); + this.off("message", onMessageHandler); + this.off("close", onCloseHandler); + }; + this.on("message", onMessageHandler); + this.on("close", onCloseHandler); + }); + await this.send({ + cmd: enums_1.ChildCommand.Init, + value: this.processFile + }); + await onComplete; + } + hasProcessExited() { + return !!(this.exitCode !== null || this.signalCode); + } + }; + exports2.Child = Child; + function onExitOnce(child) { + return new Promise((resolve) => { + child.once("exit", () => resolve()); + }); + } + var getFreePort = async () => { + return new Promise((resolve) => { + const server = (0, net_1.createServer)(); + server.listen(0, () => { + const { port } = server.address(); + server.close(() => resolve(port)); + }); + }); + }; + var convertExecArgv = async (execArgv) => { + const standard = []; + const convertedArgs = []; + for (let i = 0; i < execArgv.length; i++) { + const arg = execArgv[i]; + if (arg.indexOf("--inspect") === -1) { + standard.push(arg); + } else { + const argName = arg.split("=")[0]; + const port = await getFreePort(); + convertedArgs.push(`${argName}=${port}`); + } + } + return standard.concat(convertedArgs); + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/child-pool.js +var require_child_pool = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/child-pool.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ChildPool = void 0; + var path = require("path"); + var child_1 = require_child(); + var CHILD_KILL_TIMEOUT = 3e4; + var supportCJS = () => { + return typeof require === "function" && typeof module2 === "object" && typeof module2.exports === "object"; + }; + var ChildPool = class { + constructor({ mainFile = supportCJS() ? path.join(process.cwd(), "dist/cjs/classes/main.js") : path.join(process.cwd(), "dist/esm/classes/main.js"), useWorkerThreads, workerForkOptions, workerThreadsOptions }) { + this.retained = {}; + this.free = {}; + this.opts = { + mainFile, + useWorkerThreads, + workerForkOptions, + workerThreadsOptions + }; + } + async retain(processFile) { + let child = this.getFree(processFile).pop(); + if (child) { + this.retained[child.pid] = child; + return child; + } + child = new child_1.Child(this.opts.mainFile, processFile, { + useWorkerThreads: this.opts.useWorkerThreads, + workerForkOptions: this.opts.workerForkOptions, + workerThreadsOptions: this.opts.workerThreadsOptions + }); + child.on("exit", this.remove.bind(this, child)); + try { + await child.init(); + if (child.exitCode !== null || child.signalCode !== null) { + throw new Error("Child exited before it could be retained"); + } + this.retained[child.pid] = child; + return child; + } catch (err) { + console.error(err); + if (child.childProcess || child.worker) { + try { + this.kill(child, "SIGKILL").catch((killErr) => { + console.error("Failed to kill child after init error:", killErr); + }); + } catch (killErr) { + console.error("Failed to kill child after init error:", killErr); + } + } + throw err; + } + } + release(child) { + delete this.retained[child.pid]; + this.getFree(child.processFile).push(child); + } + remove(child) { + delete this.retained[child.pid]; + const free = this.getFree(child.processFile); + const childIndex = free.indexOf(child); + if (childIndex > -1) { + free.splice(childIndex, 1); + } + } + async kill(child, signal = "SIGKILL") { + this.remove(child); + return child.kill(signal, CHILD_KILL_TIMEOUT); + } + async clean() { + const children = Object.values(this.retained).concat(this.getAllFree()); + this.retained = {}; + this.free = {}; + await Promise.all(children.map((c) => this.kill(c, "SIGTERM"))); + } + getFree(id) { + return this.free[id] = this.free[id] || []; + } + getAllFree() { + return Object.values(this.free).reduce((first, second) => first.concat(second), []); + } + }; + exports2.ChildPool = ChildPool; + } +}); + +// ../../node_modules/.pnpm/node-abort-controller@3.1.1/node_modules/node-abort-controller/index.js +var require_node_abort_controller = __commonJS({ + "../../node_modules/.pnpm/node-abort-controller@3.1.1/node_modules/node-abort-controller/index.js"(exports2, module2) { + var { EventEmitter } = require("events"); + var AbortSignal = class { + constructor() { + this.eventEmitter = new EventEmitter(); + this.onabort = null; + this.aborted = false; + this.reason = void 0; + } + toString() { + return "[object AbortSignal]"; + } + get [Symbol.toStringTag]() { + return "AbortSignal"; + } + removeEventListener(name, handler) { + this.eventEmitter.removeListener(name, handler); + } + addEventListener(name, handler) { + this.eventEmitter.on(name, handler); + } + dispatchEvent(type) { + const event = { type, target: this }; + const handlerName = `on${type}`; + if (typeof this[handlerName] === "function") this[handlerName](event); + this.eventEmitter.emit(type, event); + } + throwIfAborted() { + if (this.aborted) { + throw this.reason; + } + } + static abort(reason) { + const controller = new AbortController(); + controller.abort(); + return controller.signal; + } + static timeout(time) { + const controller = new AbortController(); + setTimeout(() => controller.abort(new Error("TimeoutError")), time); + return controller.signal; + } + }; + var AbortController = class { + constructor() { + this.signal = new AbortSignal(); + } + abort(reason) { + if (this.signal.aborted) return; + this.signal.aborted = true; + if (reason) this.signal.reason = reason; + else this.signal.reason = new Error("AbortError"); + this.signal.dispatchEvent("abort"); + } + toString() { + return "[object AbortController]"; + } + get [Symbol.toStringTag]() { + return "AbortController"; + } + }; + module2.exports = { AbortController, AbortSignal }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/abort-controller.js +var require_abort_controller = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/abort-controller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortController = void 0; + var node_abort_controller_1 = require_node_abort_controller(); + var AbortControllerImpl; + if (globalThis.AbortController) { + AbortControllerImpl = globalThis.AbortController; + } else { + AbortControllerImpl = node_abort_controller_1.AbortController; + } + var AbortController = class extends AbortControllerImpl { + }; + exports2.AbortController = AbortController; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/utils/defaults.js +var require_defaults = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/utils/defaults.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaults = void 0; + var IS_UNSIGNED_INTEGER = /^(?:0|[1-9]\d*)$/; + function isNil(value) { + return value == null; + } + function eq(value, other) { + return value === other || Number.isNaN(value) && Number.isNaN(other); + } + function isLength(value) { + return Number.isSafeInteger(value) && value >= 0; + } + function isArrayLike(value) { + return value != null && typeof value !== "function" && isLength(value.length); + } + function isObject2(value) { + return value !== null && (typeof value === "object" || typeof value === "function"); + } + function isIndex(value, length = Number.MAX_SAFE_INTEGER) { + switch (typeof value) { + case "number": + return Number.isInteger(value) && value >= 0 && value < length; + case "symbol": + return false; + case "string": + return IS_UNSIGNED_INTEGER.test(value); + } + } + function isIterateeCall(value, index, object) { + if (!isObject2(object)) { + return false; + } + if (typeof index === "number" && isArrayLike(object) && isIndex(index) && index < object.length || typeof index === "string" && index in object) { + return eq(object[index], value); + } + return false; + } + function defaults(object, ...sources) { + object = Object(object); + const objectProto = Object.prototype; + let length = sources.length; + const guard = length > 2 ? sources[2] : void 0; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + for (let i = 0; i < length; i++) { + if (isNil(sources[i])) { + continue; + } + const source = sources[i]; + for (const key in source) { + const value = object[key]; + if (value === void 0 || !objectProto.hasOwnProperty.call(object, key) && eq(value, objectProto[key])) { + object[key] = source[key]; + } + } + } + return object; + } + exports2.defaults = defaults; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/utils/isArguments.js +var require_isArguments2 = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/utils/isArguments.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isArguments = void 0; + function getTag(value) { + if (value == null) { + return value === void 0 ? "[object Undefined]" : "[object Null]"; + } + return Object.prototype.toString.call(value); + } + function isArguments(value) { + return value !== null && typeof value === "object" && getTag(value) === "[object Arguments]"; + } + exports2.isArguments = isArguments; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/utils/lodash.js +var require_lodash2 = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/utils/lodash.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.noop = void 0; + function noop() { + } + exports2.noop = noop; + __exportStar2(require_defaults(), exports2); + __exportStar2(require_isArguments2(), exports2); + } +}); + +// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js +var require_common3 = __commonJS({ + "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js"(exports2, module2) { + function setup(env3) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require_ms2(); + createDebug.destroy = destroy; + Object.keys(env3).forEach((key) => { + createDebug[key] = env3[key]; + }); + createDebug.names = []; + createDebug.skips = []; + createDebug.formatters = {}; + function selectColor(namespace) { + let hash = 0; + for (let i = 0; i < namespace.length; i++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; + } + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + function debug(...args) { + if (!debug.enabled) { + return; + } + const self2 = debug; + const curr = Number(/* @__PURE__ */ new Date()); + const ms = curr - (prevTime || curr); + self2.diff = ms; + self2.prev = prevTime; + self2.curr = curr; + prevTime = curr; + args[0] = createDebug.coerce(args[0]); + if (typeof args[0] !== "string") { + args.unshift("%O"); + } + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + if (match === "%%") { + return "%"; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === "function") { + const val = args[index]; + match = formatter.call(self2, val); + args.splice(index, 1); + index--; + } + return match; + }); + createDebug.formatArgs.call(self2, args); + const logFn = self2.log || createDebug.log; + logFn.apply(self2, args); + } + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; + Object.defineProperty(debug, "enabled", { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + return enabledCache; + }, + set: (v) => { + enableOverride = v; + } + }); + if (typeof createDebug.init === "function") { + createDebug.init(debug); + } + return debug; + } + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + createDebug.names = []; + createDebug.skips = []; + const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean); + for (const ns of split) { + if (ns[0] === "-") { + createDebug.skips.push(ns.slice(1)); + } else { + createDebug.names.push(ns); + } + } + } + function matchesTemplate(search, template) { + let searchIndex = 0; + let templateIndex = 0; + let starIndex = -1; + let matchIndex = 0; + while (searchIndex < search.length) { + if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) { + if (template[templateIndex] === "*") { + starIndex = templateIndex; + matchIndex = searchIndex; + templateIndex++; + } else { + searchIndex++; + templateIndex++; + } + } else if (starIndex !== -1) { + templateIndex = starIndex + 1; + matchIndex++; + searchIndex = matchIndex; + } else { + return false; + } + } + while (templateIndex < template.length && template[templateIndex] === "*") { + templateIndex++; + } + return templateIndex === template.length; + } + function disable() { + const namespaces = [ + ...createDebug.names, + ...createDebug.skips.map((namespace) => "-" + namespace) + ].join(","); + createDebug.enable(""); + return namespaces; + } + function enabled(name) { + for (const skip of createDebug.skips) { + if (matchesTemplate(name, skip)) { + return false; + } + } + for (const ns of createDebug.names) { + if (matchesTemplate(name, ns)) { + return true; + } + } + return false; + } + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + function destroy() { + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + createDebug.enable(createDebug.load()); + return createDebug; + } + module2.exports = setup; + } +}); + +// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js +var require_browser2 = __commonJS({ + "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js"(exports2, module2) { + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.storage = localstorage(); + exports2.destroy = /* @__PURE__ */ (() => { + let warned = false; + return () => { + if (!warned) { + warned = true; + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + }; + })(); + exports2.colors = [ + "#0000CC", + "#0000FF", + "#0033CC", + "#0033FF", + "#0066CC", + "#0066FF", + "#0099CC", + "#0099FF", + "#00CC00", + "#00CC33", + "#00CC66", + "#00CC99", + "#00CCCC", + "#00CCFF", + "#3300CC", + "#3300FF", + "#3333CC", + "#3333FF", + "#3366CC", + "#3366FF", + "#3399CC", + "#3399FF", + "#33CC00", + "#33CC33", + "#33CC66", + "#33CC99", + "#33CCCC", + "#33CCFF", + "#6600CC", + "#6600FF", + "#6633CC", + "#6633FF", + "#66CC00", + "#66CC33", + "#9900CC", + "#9900FF", + "#9933CC", + "#9933FF", + "#99CC00", + "#99CC33", + "#CC0000", + "#CC0033", + "#CC0066", + "#CC0099", + "#CC00CC", + "#CC00FF", + "#CC3300", + "#CC3333", + "#CC3366", + "#CC3399", + "#CC33CC", + "#CC33FF", + "#CC6600", + "#CC6633", + "#CC9900", + "#CC9933", + "#CCCC00", + "#CCCC33", + "#FF0000", + "#FF0033", + "#FF0066", + "#FF0099", + "#FF00CC", + "#FF00FF", + "#FF3300", + "#FF3333", + "#FF3366", + "#FF3399", + "#FF33CC", + "#FF33FF", + "#FF6600", + "#FF6633", + "#FF9900", + "#FF9933", + "#FFCC00", + "#FFCC33" + ]; + function useColors() { + if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { + return true; + } + if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + let m; + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 + typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker + typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + } + function formatArgs(args) { + args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); + if (!this.useColors) { + return; + } + const c = "color: " + this.color; + args.splice(1, 0, c, "color: inherit"); + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, (match) => { + if (match === "%%") { + return; + } + index++; + if (match === "%c") { + lastC = index; + } + }); + args.splice(lastC, 0, c); + } + exports2.log = console.debug || console.log || (() => { + }); + function save(namespaces) { + try { + if (namespaces) { + exports2.storage.setItem("debug", namespaces); + } else { + exports2.storage.removeItem("debug"); + } + } catch (error) { + } + } + function load() { + let r; + try { + r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG"); + } catch (error) { + } + if (!r && typeof process !== "undefined" && "env" in process) { + r = process.env.DEBUG; + } + return r; + } + function localstorage() { + try { + return localStorage; + } catch (error) { + } + } + module2.exports = require_common3()(exports2); + var { formatters } = module2.exports; + formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (error) { + return "[UnexpectedJSONParseError]: " + error.message; + } + }; + } +}); + +// ../../node_modules/.pnpm/supports-color@10.2.2/node_modules/supports-color/index.js +var supports_color_exports = {}; +__export(supports_color_exports, { + createSupportsColor: () => createSupportsColor, + default: () => supports_color_default +}); +function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) { + const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; + const position = argv.indexOf(prefix + flag); + const terminatorPosition = argv.indexOf("--"); + return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); +} +function envForceColor() { + if (!("FORCE_COLOR" in env2)) { + return; + } + if (env2.FORCE_COLOR === "true") { + return 1; + } + if (env2.FORCE_COLOR === "false") { + return 0; + } + if (env2.FORCE_COLOR.length === 0) { + return 1; + } + const level = Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3); + if (![0, 1, 2, 3].includes(level)) { + return; + } + return level; +} +function translateLevel(level) { + if (level === 0) { + return false; + } + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} +function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) { + const noFlagForceColor = envForceColor(); + if (noFlagForceColor !== void 0) { + flagForceColor = noFlagForceColor; + } + const forceColor = sniffFlags ? flagForceColor : noFlagForceColor; + if (forceColor === 0) { + return 0; + } + if (sniffFlags) { + if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { + return 3; + } + if (hasFlag("color=256")) { + return 2; + } + } + if ("TF_BUILD" in env2 && "AGENT_NAME" in env2) { + return 1; + } + if (haveStream && !streamIsTTY && forceColor === void 0) { + return 0; + } + const min = forceColor || 0; + if (env2.TERM === "dumb") { + return min; + } + if (import_node_process.default.platform === "win32") { + const osRelease = import_node_os.default.release().split("."); + if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + return 1; + } + if ("CI" in env2) { + if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env2)) { + return 3; + } + if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") { + return 1; + } + return min; + } + if ("TEAMCITY_VERSION" in env2) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0; + } + if (env2.COLORTERM === "truecolor") { + return 3; + } + if (env2.TERM === "xterm-kitty") { + return 3; + } + if (env2.TERM === "xterm-ghostty") { + return 3; + } + if (env2.TERM === "wezterm") { + return 3; + } + if ("TERM_PROGRAM" in env2) { + const version2 = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + switch (env2.TERM_PROGRAM) { + case "iTerm.app": { + return version2 >= 3 ? 3 : 2; + } + case "Apple_Terminal": { + return 2; + } + } + } + if (/-256(color)?$/i.test(env2.TERM)) { + return 2; + } + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) { + return 1; + } + if ("COLORTERM" in env2) { + return 1; + } + return min; +} +function createSupportsColor(stream, options = {}) { + const level = _supportsColor(stream, { + streamIsTTY: stream && stream.isTTY, + ...options + }); + return translateLevel(level); +} +var import_node_process, import_node_os, import_node_tty, env2, flagForceColor, supportsColor, supports_color_default; +var init_supports_color = __esm({ + "../../node_modules/.pnpm/supports-color@10.2.2/node_modules/supports-color/index.js"() { + import_node_process = __toESM(require("node:process"), 1); + import_node_os = __toESM(require("node:os"), 1); + import_node_tty = __toESM(require("node:tty"), 1); + ({ env: env2 } = import_node_process.default); + if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { + flagForceColor = 0; + } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { + flagForceColor = 1; + } + supportsColor = { + stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }), + stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) }) + }; + supports_color_default = supportsColor; + } +}); + +// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js +var require_node3 = __commonJS({ + "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js"(exports2, module2) { + var tty2 = require("tty"); + var util2 = require("util"); + exports2.init = init; + exports2.log = log; + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.destroy = util2.deprecate( + () => { + }, + "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." + ); + exports2.colors = [6, 2, 3, 4, 5, 1]; + try { + const supportsColor2 = (init_supports_color(), __toCommonJS(supports_color_exports)); + if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) { + exports2.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } + } catch (error) { + } + exports2.inspectOpts = Object.keys(process.env).filter((key) => { + return /^debug_/i.test(key); + }).reduce((obj2, key) => { + const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_2, k) => { + return k.toUpperCase(); + }); + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; + } else { + val = Number(val); + } + obj2[prop] = val; + return obj2; + }, {}); + function useColors() { + return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty2.isatty(process.stderr.fd); + } + function formatArgs(args) { + const { namespace: name, useColors: useColors2 } = this; + if (useColors2) { + const c = this.color; + const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); + const prefix = ` ${colorCode};1m${name} \x1B[0m`; + args[0] = prefix + args[0].split("\n").join("\n" + prefix); + args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m"); + } else { + args[0] = getDate() + name + " " + args[0]; + } + } + function getDate() { + if (exports2.inspectOpts.hideDate) { + return ""; + } + return (/* @__PURE__ */ new Date()).toISOString() + " "; + } + function log(...args) { + return process.stderr.write(util2.formatWithOptions(exports2.inspectOpts, ...args) + "\n"); + } + function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + delete process.env.DEBUG; + } + } + function load() { + return process.env.DEBUG; + } + function init(debug) { + debug.inspectOpts = {}; + const keys = Object.keys(exports2.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; + } + } + module2.exports = require_common3()(exports2); + var { formatters } = module2.exports; + formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util2.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); + }; + formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util2.inspect(v, this.inspectOpts); + }; + } +}); + +// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js +var require_src2 = __commonJS({ + "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js"(exports2, module2) { + if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { + module2.exports = require_browser2(); + } else { + module2.exports = require_node3(); + } + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/utils/debug.js +var require_debug2 = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/utils/debug.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.genRedactedString = exports2.getStringValue = exports2.MAX_ARGUMENT_LENGTH = void 0; + var debug_1 = require_src2(); + var MAX_ARGUMENT_LENGTH = 200; + exports2.MAX_ARGUMENT_LENGTH = MAX_ARGUMENT_LENGTH; + var NAMESPACE_PREFIX = "ioredis"; + function getStringValue(v) { + if (v === null) { + return; + } + switch (typeof v) { + case "boolean": + return; + case "number": + return; + case "object": + if (Buffer.isBuffer(v)) { + return v.toString("hex"); + } + if (Array.isArray(v)) { + return v.join(","); + } + try { + return JSON.stringify(v); + } catch (e) { + return; + } + case "string": + return v; + } + } + exports2.getStringValue = getStringValue; + function genRedactedString(str, maxLen) { + const { length } = str; + return length <= maxLen ? str : str.slice(0, maxLen) + ' ... '; + } + exports2.genRedactedString = genRedactedString; + function genDebugFunction(namespace) { + const fn = (0, debug_1.default)(`${NAMESPACE_PREFIX}:${namespace}`); + function wrappedDebug(...args) { + if (!fn.enabled) { + return; + } + for (let i = 1; i < args.length; i++) { + const str = getStringValue(args[i]); + if (typeof str === "string" && str.length > MAX_ARGUMENT_LENGTH) { + args[i] = genRedactedString(str, MAX_ARGUMENT_LENGTH); + } + } + return fn.apply(null, args); + } + Object.defineProperties(wrappedDebug, { + namespace: { + get() { + return fn.namespace; + } + }, + enabled: { + get() { + return fn.enabled; + } + }, + destroy: { + get() { + return fn.destroy; + } + }, + log: { + get() { + return fn.log; + }, + set(l2) { + fn.log = l2; + } + } + }); + return wrappedDebug; + } + exports2.default = genDebugFunction; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/constants/TLSProfiles.js +var require_TLSProfiles = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/constants/TLSProfiles.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var RedisCloudCA = `-----BEGIN CERTIFICATE----- +MIIDTzCCAjegAwIBAgIJAKSVpiDswLcwMA0GCSqGSIb3DQEBBQUAMD4xFjAUBgNV +BAoMDUdhcmFudGlhIERhdGExJDAiBgNVBAMMG1NTTCBDZXJ0aWZpY2F0aW9uIEF1 +dGhvcml0eTAeFw0xMzEwMDExMjE0NTVaFw0yMzA5MjkxMjE0NTVaMD4xFjAUBgNV +BAoMDUdhcmFudGlhIERhdGExJDAiBgNVBAMMG1NTTCBDZXJ0aWZpY2F0aW9uIEF1 +dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALZqkh/DczWP +JnxnHLQ7QL0T4B4CDKWBKCcisriGbA6ZePWVNo4hfKQC6JrzfR+081NeD6VcWUiz +rmd+jtPhIY4c+WVQYm5PKaN6DT1imYdxQw7aqO5j2KUCEh/cznpLxeSHoTxlR34E +QwF28Wl3eg2vc5ct8LjU3eozWVk3gb7alx9mSA2SgmuX5lEQawl++rSjsBStemY2 +BDwOpAMXIrdEyP/cVn8mkvi/BDs5M5G+09j0gfhyCzRWMQ7Hn71u1eolRxwVxgi3 +TMn+/vTaFSqxKjgck6zuAYjBRPaHe7qLxHNr1So/Mc9nPy+3wHebFwbIcnUojwbp +4nctkWbjb2cCAwEAAaNQME4wHQYDVR0OBBYEFP1whtcrydmW3ZJeuSoKZIKjze3w +MB8GA1UdIwQYMBaAFP1whtcrydmW3ZJeuSoKZIKjze3wMAwGA1UdEwQFMAMBAf8w +DQYJKoZIhvcNAQEFBQADggEBAG2erXhwRAa7+ZOBs0B6X57Hwyd1R4kfmXcs0rta +lbPpvgULSiB+TCbf3EbhJnHGyvdCY1tvlffLjdA7HJ0PCOn+YYLBA0pTU/dyvrN6 +Su8NuS5yubnt9mb13nDGYo1rnt0YRfxN+8DM3fXIVr038A30UlPX2Ou1ExFJT0MZ +uFKY6ZvLdI6/1cbgmguMlAhM+DhKyV6Sr5699LM3zqeI816pZmlREETYkGr91q7k +BpXJu/dtHaGxg1ZGu6w/PCsYGUcECWENYD4VQPd8N32JjOfu6vEgoEAwfPP+3oGp +Z4m3ewACcWOAenqflb+cQYC4PsF7qbXDmRaWrbKntOlZ3n0= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIGMTCCBBmgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwajELMAkGA1UEBhMCVVMx +CzAJBgNVBAgMAkNBMQswCQYDVQQHDAJDQTESMBAGA1UECgwJUmVkaXNMYWJzMS0w +KwYDVQQDDCRSZWRpc0xhYnMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcN +MTgwMjI1MTUzNzM3WhcNMjgwMjIzMTUzNzM3WjBfMQswCQYDVQQGEwJVUzELMAkG +A1UECAwCQ0ExEjAQBgNVBAoMCVJlZGlzTGFiczEvMC0GA1UEAwwmUkNQIEludGVy +bWVkaWF0ZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA +A4ICDwAwggIKAoICAQDf9dqbxc8Bq7Ctq9rWcxrGNKKHivqLAFpPq02yLPx6fsOv +Tq7GsDChAYBBc4v7Y2Ap9RD5Vs3dIhEANcnolf27QwrG9RMnnvzk8pCvp1o6zSU4 +VuOE1W66/O1/7e2rVxyrnTcP7UgK43zNIXu7+tiAqWsO92uSnuMoGPGpeaUm1jym +hjWKtkAwDFSqvHY+XL5qDVBEjeUe+WHkYUg40cAXjusAqgm2hZt29c2wnVrxW25W +P0meNlzHGFdA2AC5z54iRiqj57dTfBTkHoBczQxcyw6hhzxZQ4e5I5zOKjXXEhZN +r0tA3YC14CTabKRus/JmZieyZzRgEy2oti64tmLYTqSlAD78pRL40VNoaSYetXLw +hhNsXCHgWaY6d5bLOc/aIQMAV5oLvZQKvuXAF1IDmhPA+bZbpWipp0zagf1P1H3s +UzsMdn2KM0ejzgotbtNlj5TcrVwpmvE3ktvUAuA+hi3FkVx1US+2Gsp5x4YOzJ7u +P1WPk6ShF0JgnJH2ILdj6kttTWwFzH17keSFICWDfH/+kM+k7Y1v3EXMQXE7y0T9 +MjvJskz6d/nv+sQhY04xt64xFMGTnZjlJMzfQNi7zWFLTZnDD0lPowq7l3YiPoTT +t5Xky83lu0KZsZBo0WlWaDG00gLVdtRgVbcuSWxpi5BdLb1kRab66JptWjxwXQID +AQABo4HrMIHoMDoGA1UdHwQzMDEwL6AtoCuGKWh0dHBzOi8vcmwtY2Etc2VydmVy +LnJlZGlzbGFicy5jb20vdjEvY3JsMEYGCCsGAQUFBwEBBDowODA2BggrBgEFBQcw +AYYqaHR0cHM6Ly9ybC1jYS1zZXJ2ZXIucmVkaXNsYWJzLmNvbS92MS9vY3NwMB0G +A1UdDgQWBBQHar5OKvQUpP2qWt6mckzToeCOHDAfBgNVHSMEGDAWgBQi42wH6hM4 +L2sujEvLM0/u8lRXTzASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIB +hjANBgkqhkiG9w0BAQsFAAOCAgEAirEn/iTsAKyhd+pu2W3Z5NjCko4NPU0EYUbr +AP7+POK2rzjIrJO3nFYQ/LLuC7KCXG+2qwan2SAOGmqWst13Y+WHp44Kae0kaChW +vcYLXXSoGQGC8QuFSNUdaeg3RbMDYFT04dOkqufeWVccoHVxyTSg9eD8LZuHn5jw +7QDLiEECBmIJHk5Eeo2TAZrx4Yx6ufSUX5HeVjlAzqwtAqdt99uCJ/EL8bgpWbe+ +XoSpvUv0SEC1I1dCAhCKAvRlIOA6VBcmzg5Am12KzkqTul12/VEFIgzqu0Zy2Jbc +AUPrYVu/+tOGXQaijy7YgwH8P8n3s7ZeUa1VABJHcxrxYduDDJBLZi+MjheUDaZ1 +jQRHYevI2tlqeSBqdPKG4zBY5lS0GiAlmuze5oENt0P3XboHoZPHiqcK3VECgTVh +/BkJcuudETSJcZDmQ8YfoKfBzRQNg2sv/hwvUv73Ss51Sco8GEt2lD8uEdib1Q6z +zDT5lXJowSzOD5ZA9OGDjnSRL+2riNtKWKEqvtEG3VBJoBzu9GoxbAc7wIZLxmli +iF5a/Zf5X+UXD3s4TMmy6C4QZJpAA2egsSQCnraWO2ULhh7iXMysSkF/nzVfZn43 +iqpaB8++9a37hWq14ZmOv0TJIDz//b2+KC4VFXWQ5W5QC6whsjT+OlG4p5ZYG0jo +616pxqo= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIFujCCA6KgAwIBAgIJAJ1aTT1lu2ScMA0GCSqGSIb3DQEBCwUAMGoxCzAJBgNV +BAYTAlVTMQswCQYDVQQIDAJDQTELMAkGA1UEBwwCQ0ExEjAQBgNVBAoMCVJlZGlz +TGFiczEtMCsGA1UEAwwkUmVkaXNMYWJzIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9y +aXR5MB4XDTE4MDIyNTE1MjA0MloXDTM4MDIyMDE1MjA0MlowajELMAkGA1UEBhMC +VVMxCzAJBgNVBAgMAkNBMQswCQYDVQQHDAJDQTESMBAGA1UECgwJUmVkaXNMYWJz +MS0wKwYDVQQDDCRSZWRpc0xhYnMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkw +ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDLEjXy7YrbN5Waau5cd6g1 +G5C2tMmeTpZ0duFAPxNU4oE3RHS5gGiok346fUXuUxbZ6QkuzeN2/2Z+RmRcJhQY +Dm0ZgdG4x59An1TJfnzKKoWj8ISmoHS/TGNBdFzXV7FYNLBuqZouqePI6ReC6Qhl +pp45huV32Q3a6IDrrvx7Wo5ZczEQeFNbCeCOQYNDdTmCyEkHqc2AGo8eoIlSTutT +ULOC7R5gzJVTS0e1hesQ7jmqHjbO+VQS1NAL4/5K6cuTEqUl+XhVhPdLWBXJQ5ag +54qhX4v+ojLzeU1R/Vc6NjMvVtptWY6JihpgplprN0Yh2556ewcXMeturcKgXfGJ +xeYzsjzXerEjrVocX5V8BNrg64NlifzTMKNOOv4fVZszq1SIHR8F9ROrqiOdh8iC +JpUbLpXH9hWCSEO6VRMB2xJoKu3cgl63kF30s77x7wLFMEHiwsQRKxooE1UhgS9K +2sO4TlQ1eWUvFvHSTVDQDlGQ6zu4qjbOpb3Q8bQwoK+ai2alkXVR4Ltxe9QlgYK3 +StsnPhruzZGA0wbXdpw0bnM+YdlEm5ffSTpNIfgHeaa7Dtb801FtA71ZlH7A6TaI +SIQuUST9EKmv7xrJyx0W1pGoPOLw5T029aTjnICSLdtV9bLwysrLhIYG5bnPq78B +cS+jZHFGzD7PUVGQD01nOQIDAQABo2MwYTAdBgNVHQ4EFgQUIuNsB+oTOC9rLoxL +yzNP7vJUV08wHwYDVR0jBBgwFoAUIuNsB+oTOC9rLoxLyzNP7vJUV08wDwYDVR0T +AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggIBAHfg +z5pMNUAKdMzK1aS1EDdK9yKz4qicILz5czSLj1mC7HKDRy8cVADUxEICis++CsCu +rYOvyCVergHQLREcxPq4rc5Nq1uj6J6649NEeh4WazOOjL4ZfQ1jVznMbGy+fJm3 +3Hoelv6jWRG9iqeJZja7/1s6YC6bWymI/OY1e4wUKeNHAo+Vger7MlHV+RuabaX+ +hSJ8bJAM59NCM7AgMTQpJCncrcdLeceYniGy5Q/qt2b5mJkQVkIdy4TPGGB+AXDJ +D0q3I/JDRkDUFNFdeW0js7fHdsvCR7O3tJy5zIgEV/o/BCkmJVtuwPYOrw/yOlKj +TY/U7ATAx9VFF6/vYEOMYSmrZlFX+98L6nJtwDqfLB5VTltqZ4H/KBxGE3IRSt9l +FXy40U+LnXzhhW+7VBAvyYX8GEXhHkKU8Gqk1xitrqfBXY74xKgyUSTolFSfFVgj +mcM/X4K45bka+qpkj7Kfv/8D4j6aZekwhN2ly6hhC1SmQ8qjMjpG/mrWOSSHZFmf +ybu9iD2AYHeIOkshIl6xYIa++Q/00/vs46IzAbQyriOi0XxlSMMVtPx0Q3isp+ji +n8Mq9eOuxYOEQ4of8twUkUDd528iwGtEdwf0Q01UyT84S62N8AySl1ZBKXJz6W4F +UhWfa/HQYOAPDdEjNgnVwLI23b8t0TozyCWw7q8h +-----END CERTIFICATE----- + +-----BEGIN CERTIFICATE----- +MIIEjzCCA3egAwIBAgIQe55B/ALCKJDZtdNT8kD6hTANBgkqhkiG9w0BAQsFADBM +MSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xv +YmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjAeFw0yMjAxMjYxMjAwMDBaFw0y +NTAxMjYwMDAwMDBaMFgxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWdu +IG52LXNhMS4wLAYDVQQDEyVHbG9iYWxTaWduIEF0bGFzIFIzIE9WIFRMUyBDQSAy +MDIyIFEyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmGmg1LW9b7Lf +8zDD83yBDTEkt+FOxKJZqF4veWc5KZsQj9HfnUS2e5nj/E+JImlGPsQuoiosLuXD +BVBNAMcUFa11buFMGMeEMwiTmCXoXRrXQmH0qjpOfKgYc5gHG3BsRGaRrf7VR4eg +ofNMG9wUBw4/g/TT7+bQJdA4NfE7Y4d5gEryZiBGB/swaX6Jp/8MF4TgUmOWmalK +dZCKyb4sPGQFRTtElk67F7vU+wdGcrcOx1tDcIB0ncjLPMnaFicagl+daWGsKqTh +counQb6QJtYHa91KvCfKWocMxQ7OIbB5UARLPmC4CJ1/f8YFm35ebfzAeULYdGXu +jE9CLor0OwIDAQABo4IBXzCCAVswDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQG +CCsGAQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQW +BBSH5Zq7a7B/t95GfJWkDBpA8HHqdjAfBgNVHSMEGDAWgBSP8Et/qC5FJK5NUPpj +move4t0bvDB7BggrBgEFBQcBAQRvMG0wLgYIKwYBBQUHMAGGImh0dHA6Ly9vY3Nw +Mi5nbG9iYWxzaWduLmNvbS9yb290cjMwOwYIKwYBBQUHMAKGL2h0dHA6Ly9zZWN1 +cmUuZ2xvYmFsc2lnbi5jb20vY2FjZXJ0L3Jvb3QtcjMuY3J0MDYGA1UdHwQvMC0w +K6ApoCeGJWh0dHA6Ly9jcmwuZ2xvYmFsc2lnbi5jb20vcm9vdC1yMy5jcmwwIQYD +VR0gBBowGDAIBgZngQwBAgIwDAYKKwYBBAGgMgoBAjANBgkqhkiG9w0BAQsFAAOC +AQEAKRic9/f+nmhQU/wz04APZLjgG5OgsuUOyUEZjKVhNGDwxGTvKhyXGGAMW2B/ +3bRi+aElpXwoxu3pL6fkElbX3B0BeS5LoDtxkyiVEBMZ8m+sXbocwlPyxrPbX6mY +0rVIvnuUeBH8X0L5IwfpNVvKnBIilTbcebfHyXkPezGwz7E1yhUULjJFm2bt0SdX +y+4X/WeiiYIv+fTVgZZgl+/2MKIsu/qdBJc3f3TvJ8nz+Eax1zgZmww+RSQWeOj3 +15Iw6Z5FX+NwzY/Ab+9PosR5UosSeq+9HhtaxZttXG1nVh+avYPGYddWmiMT90J5 +ZgKnO/Fx2hBgTxhOTMYaD312kg== +-----END CERTIFICATE----- + +-----BEGIN CERTIFICATE----- +MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G +A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp +Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4 +MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG +A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8 +RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT +gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm +KPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd +QQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ +XriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw +DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o +LkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU +RUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp +jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK +6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX +mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs +Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH +WD9f +-----END CERTIFICATE-----`; + var TLSProfiles = { + RedisCloudFixed: { ca: RedisCloudCA }, + RedisCloudFlexible: { ca: RedisCloudCA } + }; + exports2.default = TLSProfiles; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/utils/index.js +var require_utils15 = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/utils/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.noop = exports2.isArguments = exports2.defaults = exports2.Debug = exports2.getPackageMeta = exports2.zipMap = exports2.CONNECTION_CLOSED_ERROR_MSG = exports2.shuffle = exports2.sample = exports2.resolveTLSProfile = exports2.parseURL = exports2.optimizeErrorStack = exports2.toArg = exports2.convertMapToArray = exports2.convertObjectToArray = exports2.timeout = exports2.packObject = exports2.isInt = exports2.wrapMultiResult = exports2.convertBufferToString = void 0; + var fs_1 = require("fs"); + var path_12 = require("path"); + var lodash_1 = require_lodash2(); + Object.defineProperty(exports2, "defaults", { enumerable: true, get: function() { + return lodash_1.defaults; + } }); + Object.defineProperty(exports2, "isArguments", { enumerable: true, get: function() { + return lodash_1.isArguments; + } }); + Object.defineProperty(exports2, "noop", { enumerable: true, get: function() { + return lodash_1.noop; + } }); + var debug_1 = require_debug2(); + exports2.Debug = debug_1.default; + var TLSProfiles_1 = require_TLSProfiles(); + function convertBufferToString(value, encoding) { + if (value instanceof Buffer) { + return value.toString(encoding); + } + if (Array.isArray(value)) { + const length = value.length; + const res = Array(length); + for (let i = 0; i < length; ++i) { + res[i] = value[i] instanceof Buffer && encoding === "utf8" ? value[i].toString() : convertBufferToString(value[i], encoding); + } + return res; + } + return value; + } + exports2.convertBufferToString = convertBufferToString; + function wrapMultiResult(arr) { + if (!arr) { + return null; + } + const result = []; + const length = arr.length; + for (let i = 0; i < length; ++i) { + const item = arr[i]; + if (item instanceof Error) { + result.push([item]); + } else { + result.push([null, item]); + } + } + return result; + } + exports2.wrapMultiResult = wrapMultiResult; + function isInt(value) { + const x = parseFloat(value); + return !isNaN(value) && (x | 0) === x; + } + exports2.isInt = isInt; + function packObject(array) { + const result = {}; + const length = array.length; + for (let i = 1; i < length; i += 2) { + result[array[i - 1]] = array[i]; + } + return result; + } + exports2.packObject = packObject; + function timeout(callback, timeout2) { + let timer = null; + const run = function() { + if (timer) { + clearTimeout(timer); + timer = null; + callback.apply(this, arguments); + } + }; + timer = setTimeout(run, timeout2, new Error("timeout")); + return run; + } + exports2.timeout = timeout; + function convertObjectToArray(obj2) { + const result = []; + const keys = Object.keys(obj2); + for (let i = 0, l2 = keys.length; i < l2; i++) { + result.push(keys[i], obj2[keys[i]]); + } + return result; + } + exports2.convertObjectToArray = convertObjectToArray; + function convertMapToArray(map) { + const result = []; + let pos = 0; + map.forEach(function(value, key) { + result[pos] = key; + result[pos + 1] = value; + pos += 2; + }); + return result; + } + exports2.convertMapToArray = convertMapToArray; + function toArg(arg) { + if (arg === null || typeof arg === "undefined") { + return ""; + } + return String(arg); + } + exports2.toArg = toArg; + function optimizeErrorStack(error, friendlyStack, filterPath) { + const stacks = friendlyStack.split("\n"); + let lines = ""; + let i; + for (i = 1; i < stacks.length; ++i) { + if (stacks[i].indexOf(filterPath) === -1) { + break; + } + } + for (let j = i; j < stacks.length; ++j) { + lines += "\n" + stacks[j]; + } + if (error.stack) { + const pos = error.stack.indexOf("\n"); + error.stack = error.stack.slice(0, pos) + lines; + } + return error; + } + exports2.optimizeErrorStack = optimizeErrorStack; + function parseURL(url) { + if (isInt(url)) { + return { port: url }; + } + const rawUrl = url; + const hasProtocol = /^rediss?:\/\//i.test(rawUrl); + const isProtocolRelative = rawUrl.startsWith("//"); + if (rawUrl[0] === "/" && !isProtocolRelative) { + const qIdx = rawUrl.indexOf("?"); + const result2 = { + path: qIdx === -1 ? rawUrl : rawUrl.slice(0, qIdx) + }; + if (qIdx !== -1) { + const options2 = {}; + const params = new URLSearchParams(rawUrl.slice(qIdx + 1)); + params.forEach((value, key) => { + options2[key] = parseURLQueryItem(key, value); + }); + (0, lodash_1.defaults)(result2, options2); + } + return result2; + } + let parsed; + if (hasProtocol) { + parsed = new URL(rawUrl); + } else if (isProtocolRelative) { + parsed = new URL("redis:" + rawUrl); + } else { + parsed = new URL("redis://" + rawUrl); + } + const options = {}; + parsed.searchParams.forEach((value, key) => { + options[key] = parseURLQueryItem(key, value); + }); + const result = {}; + if (parsed.username || parsed.password) { + result.username = decodeURIComponent(parsed.username); + result.password = decodeURIComponent(parsed.password); + } + if (parsed.pathname && parsed.pathname !== "/") { + if (hasProtocol || isProtocolRelative) { + if (parsed.pathname.length > 1) { + result.db = parsed.pathname.slice(1); + } + } else { + result.path = parsed.pathname; + } + } + if (parsed.hostname) { + result.host = parsed.hostname.replace(/^\[|\]$/g, ""); + } + if (parsed.port) { + result.port = parsed.port; + } + (0, lodash_1.defaults)(result, options); + return result; + } + exports2.parseURL = parseURL; + function parseURLQueryItem(key, value) { + if (key === "family") { + const intFamily = Number.parseInt(value, 10); + if (!Number.isNaN(intFamily)) { + return intFamily; + } + } + return value; + } + function resolveTLSProfile(options) { + let tls = options === null || options === void 0 ? void 0 : options.tls; + if (typeof tls === "string") + tls = { profile: tls }; + const profile = TLSProfiles_1.default[tls === null || tls === void 0 ? void 0 : tls.profile]; + if (profile) { + tls = Object.assign({}, profile, tls); + delete tls.profile; + options = Object.assign({}, options, { tls }); + } + return options; + } + exports2.resolveTLSProfile = resolveTLSProfile; + function sample(array, from = 0) { + const length = array.length; + if (from >= length) { + return null; + } + return array[from + Math.floor(Math.random() * (length - from))]; + } + exports2.sample = sample; + function shuffle(array) { + let counter = array.length; + while (counter > 0) { + const index = Math.floor(Math.random() * counter); + counter--; + [array[counter], array[index]] = [array[index], array[counter]]; + } + return array; + } + exports2.shuffle = shuffle; + exports2.CONNECTION_CLOSED_ERROR_MSG = "Connection is closed."; + function zipMap(keys, values) { + const map = /* @__PURE__ */ new Map(); + keys.forEach((key, index) => { + map.set(key, values[index]); + }); + return map; + } + exports2.zipMap = zipMap; + var cachedPackageMeta = null; + async function getPackageMeta() { + if (cachedPackageMeta) { + return cachedPackageMeta; + } + try { + const filePath = (0, path_12.resolve)(__dirname, "..", "..", "package.json"); + const data = await fs_1.promises.readFile(filePath, "utf8"); + const parsed = JSON.parse(data); + cachedPackageMeta = { + version: parsed.version + }; + return cachedPackageMeta; + } catch (err) { + cachedPackageMeta = { + version: "error-fetching-version" + }; + return cachedPackageMeta; + } + } + exports2.getPackageMeta = getPackageMeta; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/errors/connection-closed-error.js +var require_connection_closed_error = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/errors/connection-closed-error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ConnectionClosedError = void 0; + var ConnectionClosedError = class extends Error { + constructor(message, cause) { + super(message !== null && message !== void 0 ? message : "Connection is closed"); + this.cause = cause; + this.name = "ConnectionClosedError"; + Object.setPrototypeOf(this, new.target.prototype); + } + }; + exports2.ConnectionClosedError = ConnectionClosedError; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js +var require_constants11 = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js"(exports2, module2) { + "use strict"; + var SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ + 9007199254740991; + var MAX_SAFE_COMPONENT_LENGTH = 16; + var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; + var RELEASE_TYPES = [ + "major", + "premajor", + "minor", + "preminor", + "patch", + "prepatch", + "prerelease" + ]; + module2.exports = { + MAX_LENGTH, + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_SAFE_INTEGER, + RELEASE_TYPES, + SEMVER_SPEC_VERSION, + FLAG_INCLUDE_PRERELEASE: 1, + FLAG_LOOSE: 2 + }; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js +var require_debug3 = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js"(exports2, module2) { + "use strict"; + var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { + }; + module2.exports = debug; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js +var require_re = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js"(exports2, module2) { + "use strict"; + var { + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_LENGTH + } = require_constants11(); + var debug = require_debug3(); + exports2 = module2.exports = {}; + var re = exports2.re = []; + var safeRe = exports2.safeRe = []; + var src = exports2.src = []; + var safeSrc = exports2.safeSrc = []; + var t = exports2.t = {}; + var R = 0; + var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; + var safeRegexReplacements = [ + ["\\s", 1], + ["\\d", MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] + ]; + var makeSafeRegex = (value) => { + for (const [token, max] of safeRegexReplacements) { + value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`); + } + return value; + }; + var createToken = (name, value, isGlobal) => { + const safe = makeSafeRegex(value); + const index = R++; + debug(name, index, value); + t[name] = index; + src[index] = value; + safeSrc[index] = safe; + re[index] = new RegExp(value, isGlobal ? "g" : void 0); + safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); + }; + createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); + createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); + createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); + createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); + createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`); + createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); + createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); + createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); + createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); + createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); + createToken("FULL", `^${src[t.FULLPLAIN]}$`); + createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); + createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); + createToken("GTLT", "((?:<|>)?=?)"); + createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); + createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); + createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); + createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`); + createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`); + createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`); + createToken("COERCERTL", src[t.COERCE], true); + createToken("COERCERTLFULL", src[t.COERCEFULL], true); + createToken("LONETILDE", "(?:~>?)"); + createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); + exports2.tildeTrimReplace = "$1~"; + createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); + createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("LONECARET", "(?:\\^)"); + createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); + exports2.caretTrimReplace = "$1^"; + createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); + createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); + createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); + createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); + exports2.comparatorTrimReplace = "$1$2$3"; + createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); + createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); + createToken("STAR", "(<|>)?=?\\s*\\*"); + createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); + createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js +var require_parse_options = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js"(exports2, module2) { + "use strict"; + var looseOption = Object.freeze({ loose: true }); + var emptyOpts = Object.freeze({}); + var parseOptions = (options) => { + if (!options) { + return emptyOpts; + } + if (typeof options !== "object") { + return looseOption; + } + return options; + }; + module2.exports = parseOptions; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js +var require_identifiers = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js"(exports2, module2) { + "use strict"; + var numeric = /^[0-9]+$/; + var compareIdentifiers = (a, b) => { + if (typeof a === "number" && typeof b === "number") { + return a === b ? 0 : a < b ? -1 : 1; + } + const anum = numeric.test(a); + const bnum = numeric.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + }; + var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); + module2.exports = { + compareIdentifiers, + rcompareIdentifiers + }; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js +var require_semver = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js"(exports2, module2) { + "use strict"; + var debug = require_debug3(); + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants11(); + var { safeRe: re, t } = require_re(); + var parseOptions = require_parse_options(); + var { compareIdentifiers } = require_identifiers(); + var isPrereleaseIdentifier = (prerelease, identifier) => { + const identifiers = identifier.split("."); + if (identifiers.length > prerelease.length) { + return false; + } + for (let i = 0; i < identifiers.length; i++) { + if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) { + return false; + } + } + return true; + }; + var SemVer = class _SemVer { + constructor(version2, options) { + options = parseOptions(options); + if (version2 instanceof _SemVer) { + if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) { + return version2; + } else { + version2 = version2.version; + } + } else if (typeof version2 !== "string") { + throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`); + } + if (version2.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ); + } + debug("SemVer", version2, options); + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + const m = version2.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); + if (!m) { + throw new TypeError(`Invalid Version: ${version2}`); + } + this.raw = version2; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError("Invalid major version"); + } + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError("Invalid minor version"); + } + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError("Invalid patch version"); + } + if (!m[4]) { + this.prerelease = []; + } else { + this.prerelease = m[4].split(".").map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num; + } + } + return id; + }); + } + this.build = m[5] ? m[5].split(".") : []; + this.format(); + } + format() { + this.version = `${this.major}.${this.minor}.${this.patch}`; + if (this.prerelease.length) { + this.version += `-${this.prerelease.join(".")}`; + } + return this.version; + } + toString() { + return this.version; + } + compare(other) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof _SemVer)) { + if (typeof other === "string" && other === this.version) { + return 0; + } + other = new _SemVer(other, this.options); + } + if (other.version === this.version) { + return 0; + } + return this.compareMain(other) || this.comparePre(other); + } + compareMain(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); + } + if (this.major < other.major) { + return -1; + } + if (this.major > other.major) { + return 1; + } + if (this.minor < other.minor) { + return -1; + } + if (this.minor > other.minor) { + return 1; + } + if (this.patch < other.patch) { + return -1; + } + if (this.patch > other.patch) { + return 1; + } + return 0; + } + comparePre(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); + } + if (this.prerelease.length && !other.prerelease.length) { + return -1; + } else if (!this.prerelease.length && other.prerelease.length) { + return 1; + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0; + } + let i = 0; + do { + const a = this.prerelease[i]; + const b = other.prerelease[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + compareBuild(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); + } + let i = 0; + do { + const a = this.build[i]; + const b = other.build[i]; + debug("build compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + inc(release, identifier, identifierBase) { + if (release.startsWith("pre")) { + if (!identifier && identifierBase === false) { + throw new Error("invalid increment argument: identifier is empty"); + } + if (identifier) { + const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]); + if (!match || match[1] !== identifier) { + throw new Error(`invalid identifier: ${identifier}`); + } + } + } + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier, identifierBase); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier, identifierBase); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier, identifierBase); + this.inc("pre", identifier, identifierBase); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case "prerelease": + if (this.prerelease.length === 0) { + this.inc("patch", identifier, identifierBase); + } + this.inc("pre", identifier, identifierBase); + break; + case "release": + if (this.prerelease.length === 0) { + throw new Error(`version ${this.raw} is not a prerelease`); + } + this.prerelease.length = 0; + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { + this.major++; + } + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++; + } + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) { + this.patch++; + } + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. + case "pre": { + const base = Number(identifierBase) ? 1 : 0; + if (this.prerelease.length === 0) { + this.prerelease = [base]; + } else { + let i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === "number") { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) { + if (identifier === this.prerelease.join(".") && identifierBase === false) { + throw new Error("invalid increment argument: identifier already exists"); + } + this.prerelease.push(base); + } + } + if (identifier) { + let prerelease = [identifier, base]; + if (identifierBase === false) { + prerelease = [identifier]; + } + if (isPrereleaseIdentifier(this.prerelease, identifier)) { + const prereleaseBase = this.prerelease[identifier.split(".").length]; + if (isNaN(prereleaseBase)) { + this.prerelease = prerelease; + } + } else { + this.prerelease = prerelease; + } + } + break; + } + default: + throw new Error(`invalid increment argument: ${release}`); + } + this.raw = this.format(); + if (this.build.length) { + this.raw += `+${this.build.join(".")}`; + } + return this; + } + }; + module2.exports = SemVer; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js +var require_parse3 = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var parse2 = (version2, options, throwErrors = false) => { + if (version2 instanceof SemVer) { + return version2; + } + try { + return new SemVer(version2, options); + } catch (er) { + if (!throwErrors) { + return null; + } + throw er; + } + }; + module2.exports = parse2; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js +var require_valid = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js"(exports2, module2) { + "use strict"; + var parse2 = require_parse3(); + var valid = (version2, options) => { + const v = parse2(version2, options); + return v ? v.version : null; + }; + module2.exports = valid; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js +var require_clean = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js"(exports2, module2) { + "use strict"; + var parse2 = require_parse3(); + var clean = (version2, options) => { + const s = parse2(version2.trim().replace(/^[=v]+/, ""), options); + return s ? s.version : null; + }; + module2.exports = clean; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js +var require_inc = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var inc = (version2, release, options, identifier, identifierBase) => { + if (typeof options === "string") { + identifierBase = identifier; + identifier = options; + options = void 0; + } + try { + return new SemVer( + version2 instanceof SemVer ? version2.version : version2, + options + ).inc(release, identifier, identifierBase).version; + } catch (er) { + return null; + } + }; + module2.exports = inc; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js +var require_diff = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js"(exports2, module2) { + "use strict"; + var parse2 = require_parse3(); + var diff = (version1, version2) => { + const v12 = parse2(version1, null, true); + const v2 = parse2(version2, null, true); + const comparison = v12.compare(v2); + if (comparison === 0) { + return null; + } + const v1Higher = comparison > 0; + const highVersion = v1Higher ? v12 : v2; + const lowVersion = v1Higher ? v2 : v12; + const highHasPre = !!highVersion.prerelease.length; + const lowHasPre = !!lowVersion.prerelease.length; + if (lowHasPre && !highHasPre) { + if (!lowVersion.patch && !lowVersion.minor) { + return "major"; + } + if (lowVersion.compareMain(highVersion) === 0) { + if (lowVersion.minor && !lowVersion.patch) { + return "minor"; + } + return "patch"; + } + } + const prefix = highHasPre ? "pre" : ""; + if (v12.major !== v2.major) { + return prefix + "major"; + } + if (v12.minor !== v2.minor) { + return prefix + "minor"; + } + if (v12.patch !== v2.patch) { + return prefix + "patch"; + } + return "prerelease"; + }; + module2.exports = diff; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js +var require_major = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var major = (a, loose) => new SemVer(a, loose).major; + module2.exports = major; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js +var require_minor = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var minor = (a, loose) => new SemVer(a, loose).minor; + module2.exports = minor; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js +var require_patch = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var patch = (a, loose) => new SemVer(a, loose).patch; + module2.exports = patch; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js +var require_prerelease = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js"(exports2, module2) { + "use strict"; + var parse2 = require_parse3(); + var prerelease = (version2, options) => { + const parsed = parse2(version2, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + }; + module2.exports = prerelease; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js +var require_compare = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); + module2.exports = compare; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js +var require_rcompare = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var rcompare = (a, b, loose) => compare(b, a, loose); + module2.exports = rcompare; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js +var require_compare_loose = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var compareLoose = (a, b) => compare(a, b, true); + module2.exports = compareLoose; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js +var require_compare_build = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose); + const versionB = new SemVer(b, loose); + return versionA.compare(versionB) || versionA.compareBuild(versionB); + }; + module2.exports = compareBuild; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js +var require_sort = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js"(exports2, module2) { + "use strict"; + var compareBuild = require_compare_build(); + var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)); + module2.exports = sort; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js +var require_rsort = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js"(exports2, module2) { + "use strict"; + var compareBuild = require_compare_build(); + var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)); + module2.exports = rsort; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js +var require_gt = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var gt = (a, b, loose) => compare(a, b, loose) > 0; + module2.exports = gt; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js +var require_lt = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var lt = (a, b, loose) => compare(a, b, loose) < 0; + module2.exports = lt; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js +var require_eq2 = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var eq = (a, b, loose) => compare(a, b, loose) === 0; + module2.exports = eq; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js +var require_neq = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var neq = (a, b, loose) => compare(a, b, loose) !== 0; + module2.exports = neq; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js +var require_gte = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var gte = (a, b, loose) => compare(a, b, loose) >= 0; + module2.exports = gte; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js +var require_lte = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var lte = (a, b, loose) => compare(a, b, loose) <= 0; + module2.exports = lte; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js +var require_cmp = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js"(exports2, module2) { + "use strict"; + var eq = require_eq2(); + var neq = require_neq(); + var gt = require_gt(); + var gte = require_gte(); + var lt = require_lt(); + var lte = require_lte(); + var cmp = (a, op, b, loose) => { + switch (op) { + case "===": + if (typeof a === "object") { + a = a.version; + } + if (typeof b === "object") { + b = b.version; + } + return a === b; + case "!==": + if (typeof a === "object") { + a = a.version; + } + if (typeof b === "object") { + b = b.version; + } + return a !== b; + case "": + case "=": + case "==": + return eq(a, b, loose); + case "!=": + return neq(a, b, loose); + case ">": + return gt(a, b, loose); + case ">=": + return gte(a, b, loose); + case "<": + return lt(a, b, loose); + case "<=": + return lte(a, b, loose); + default: + throw new TypeError(`Invalid operator: ${op}`); + } + }; + module2.exports = cmp; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js +var require_coerce = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var parse2 = require_parse3(); + var { safeRe: re, t } = require_re(); + var coerce = (version2, options) => { + if (version2 instanceof SemVer) { + return version2; + } + if (typeof version2 === "number") { + version2 = String(version2); + } + if (typeof version2 !== "string") { + return null; + } + options = options || {}; + let match = null; + if (!options.rtl) { + match = version2.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]); + } else { + const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]; + let next; + while ((next = coerceRtlRegex.exec(version2)) && (!match || match.index + match[0].length !== version2.length)) { + if (!match || next.index + next[0].length !== match.index + match[0].length) { + match = next; + } + coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length; + } + coerceRtlRegex.lastIndex = -1; + } + if (match === null) { + return null; + } + const major = match[2]; + const minor = match[3] || "0"; + const patch = match[4] || "0"; + const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ""; + const build = options.includePrerelease && match[6] ? `+${match[6]}` : ""; + return parse2(`${major}.${minor}.${patch}${prerelease}${build}`, options); + }; + module2.exports = coerce; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js +var require_truncate = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js"(exports2, module2) { + "use strict"; + var parse2 = require_parse3(); + var constants = require_constants11(); + var SemVer = require_semver(); + var truncate = (version2, truncation, options) => { + if (!constants.RELEASE_TYPES.includes(truncation)) { + return null; + } + const clonedVersion = cloneInputVersion(version2, options); + return clonedVersion && doTruncation(clonedVersion, truncation); + }; + var cloneInputVersion = (version2, options) => { + const versionStringToParse = version2 instanceof SemVer ? version2.version : version2; + return parse2(versionStringToParse, options); + }; + var doTruncation = (version2, truncation) => { + if (isPrerelease(truncation)) { + return version2.version; + } + version2.prerelease = []; + switch (truncation) { + case "major": + version2.minor = 0; + version2.patch = 0; + break; + case "minor": + version2.patch = 0; + break; + } + return version2.format(); + }; + var isPrerelease = (type) => { + return type.startsWith("pre"); + }; + module2.exports = truncate; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js +var require_lrucache = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js"(exports2, module2) { + "use strict"; + var LRUCache = class { + constructor() { + this.max = 1e3; + this.map = /* @__PURE__ */ new Map(); + } + get(key) { + const value = this.map.get(key); + if (value === void 0) { + return void 0; + } else { + this.map.delete(key); + this.map.set(key, value); + return value; + } + } + delete(key) { + return this.map.delete(key); + } + set(key, value) { + const deleted = this.delete(key); + if (!deleted && value !== void 0) { + if (this.map.size >= this.max) { + const firstKey = this.map.keys().next().value; + this.delete(firstKey); + } + this.map.set(key, value); + } + return this; + } + }; + module2.exports = LRUCache; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js +var require_range3 = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js"(exports2, module2) { + "use strict"; + var SPACE_CHARACTERS = /\s+/g; + var Range = class _Range { + constructor(range, options) { + options = parseOptions(options); + if (range instanceof _Range) { + if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { + return range; + } else { + return new _Range(range.raw, options); + } + } + if (range instanceof Comparator) { + this.raw = range.value; + this.set = [[range]]; + this.formatted = void 0; + return this; + } + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + this.raw = range.trim().replace(SPACE_CHARACTERS, " "); + this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${this.raw}`); + } + if (this.set.length > 1) { + const first = this.set[0]; + this.set = this.set.filter((c) => !isNullSet(c[0])); + if (this.set.length === 0) { + this.set = [first]; + } else if (this.set.length > 1) { + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c]; + break; + } + } + } + } + this.formatted = void 0; + } + get range() { + if (this.formatted === void 0) { + this.formatted = ""; + for (let i = 0; i < this.set.length; i++) { + if (i > 0) { + this.formatted += "||"; + } + const comps = this.set[i]; + for (let k = 0; k < comps.length; k++) { + if (k > 0) { + this.formatted += " "; + } + this.formatted += comps[k].toString().trim(); + } + } + } + return this.formatted; + } + format() { + return this.range; + } + toString() { + return this.range; + } + parseRange(range) { + range = range.replace(BUILDSTRIPRE, ""); + const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE); + const memoKey = memoOpts + ":" + range; + const cached = cache.get(memoKey); + if (cached) { + return cached; + } + const loose = this.options.loose; + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); + debug("hyphen replace", range); + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); + debug("comparator trim", range); + range = range.replace(re[t.TILDETRIM], tildeTrimReplace); + debug("tilde trim", range); + range = range.replace(re[t.CARETTRIM], caretTrimReplace); + debug("caret trim", range); + let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); + if (loose) { + rangeList = rangeList.filter((comp) => { + debug("loose invalid filter", comp, this.options); + return !!comp.match(re[t.COMPARATORLOOSE]); + }); + } + debug("range list", rangeList); + const rangeMap = /* @__PURE__ */ new Map(); + const comparators = rangeList.map((comp) => new Comparator(comp, this.options)); + for (const comp of comparators) { + if (isNullSet(comp)) { + return [comp]; + } + rangeMap.set(comp.value, comp); + } + if (rangeMap.size > 1 && rangeMap.has("")) { + rangeMap.delete(""); + } + const result = [...rangeMap.values()]; + cache.set(memoKey, result); + return result; + } + intersects(range, options) { + if (!(range instanceof _Range)) { + throw new TypeError("a Range is required"); + } + return this.set.some((thisComparators) => { + return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { + return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + } + // if ANY of the sets match ALL of its comparators, then pass + test(version2) { + if (!version2) { + return false; + } + if (typeof version2 === "string") { + try { + version2 = new SemVer(version2, this.options); + } catch (er) { + return false; + } + } + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version2, this.options)) { + return true; + } + } + return false; + } + }; + module2.exports = Range; + var LRU = require_lrucache(); + var cache = new LRU(); + var parseOptions = require_parse_options(); + var Comparator = require_comparator(); + var debug = require_debug3(); + var SemVer = require_semver(); + var { + safeRe: re, + src, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace + } = require_re(); + var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants11(); + var BUILDSTRIPRE = new RegExp(src[t.BUILD], "g"); + var isNullSet = (c) => c.value === "<0.0.0-0"; + var isAny = (c) => c.value === ""; + var isSatisfiable = (comparators, options) => { + let result = true; + const remainingComparators = comparators.slice(); + let testComparator = remainingComparators.pop(); + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options); + }); + testComparator = remainingComparators.pop(); + } + return result; + }; + var parseComparator = (comp, options) => { + comp = comp.replace(re[t.BUILD], ""); + debug("comp", comp, options); + comp = replaceCarets(comp, options); + debug("caret", comp); + comp = replaceTildes(comp, options); + debug("tildes", comp); + comp = replaceXRanges(comp, options); + debug("xrange", comp); + comp = replaceStars(comp, options); + debug("stars", comp); + return comp; + }; + var isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; + var invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p); + var replaceTildes = (comp, options) => { + return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "); + }; + var replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; + const z = options.includePrerelease ? "-0" : ""; + return comp.replace(r, (_2, M, m, p, pr) => { + debug("tilde", comp, _2, M, m, p, pr); + let ret2; + if (isX(M)) { + ret2 = ""; + } else if (isX(m)) { + ret2 = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; + } else if (isX(p)) { + ret2 = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; + } else if (pr) { + debug("replaceTilde pr", pr); + ret2 = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } else { + ret2 = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; + } + debug("tilde return", ret2); + return ret2; + }); + }; + var replaceCarets = (comp, options) => { + return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" "); + }; + var replaceCaret = (comp, options) => { + debug("caret", comp, options); + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; + const z = options.includePrerelease ? "-0" : ""; + return comp.replace(r, (_2, M, m, p, pr) => { + debug("caret", comp, _2, M, m, p, pr); + let ret2; + if (isX(M)) { + ret2 = ""; + } else if (isX(m)) { + ret2 = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; + } else if (isX(p)) { + if (M === "0") { + ret2 = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; + } else { + ret2 = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; + } + } else if (pr) { + debug("replaceCaret pr", pr); + if (M === "0") { + if (m === "0") { + ret2 = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; + } else { + ret2 = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } + } else { + ret2 = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; + } + } else { + debug("no pr"); + if (M === "0") { + if (m === "0") { + ret2 = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`; + } else { + ret2 = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; + } + } else { + ret2 = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; + } + } + debug("caret return", ret2); + return ret2; + }); + }; + var replaceXRanges = (comp, options) => { + debug("replaceXRanges", comp, options); + return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" "); + }; + var replaceXRange = (comp, options) => { + comp = comp.trim(); + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; + return comp.replace(r, (ret2, gtlt, M, m, p, pr) => { + debug("xRange", comp, ret2, gtlt, M, m, p, pr); + if (invalidXRangeOrder(M, m, p)) { + return comp; + } + const xM = isX(M); + const xm = xM || isX(m); + const xp = xm || isX(p); + const anyX = xp; + if (gtlt === "=" && anyX) { + gtlt = ""; + } + pr = options.includePrerelease ? "-0" : ""; + if (xM) { + if (gtlt === ">" || gtlt === "<") { + ret2 = "<0.0.0-0"; + } else { + ret2 = "*"; + } + } else if (gtlt && anyX) { + if (xm) { + m = 0; + } + p = 0; + if (gtlt === ">") { + gtlt = ">="; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else { + m = +m + 1; + p = 0; + } + } else if (gtlt === "<=") { + gtlt = "<"; + if (xm) { + M = +M + 1; + } else { + m = +m + 1; + } + } + if (gtlt === "<") { + pr = "-0"; + } + ret2 = `${gtlt + M}.${m}.${p}${pr}`; + } else if (xm) { + ret2 = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; + } else if (xp) { + ret2 = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; + } + debug("xRange return", ret2); + return ret2; + }); + }; + var replaceStars = (comp, options) => { + debug("replaceStars", comp, options); + return comp.trim().replace(re[t.STAR], ""); + }; + var replaceGTE0 = (comp, options) => { + debug("replaceGTE0", comp, options); + return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); + }; + var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => { + if (isX(fM)) { + from = ""; + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? "-0" : ""}`; + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; + } else if (fpr) { + from = `>=${from}`; + } else { + from = `>=${from}${incPr ? "-0" : ""}`; + } + if (isX(tM)) { + to = ""; + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0`; + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0`; + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}`; + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0`; + } else { + to = `<=${to}`; + } + return `${from} ${to}`.trim(); + }; + var testSet = (set, version2, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version2)) { + return false; + } + } + if (version2.prerelease.length && !options.includePrerelease) { + for (let i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === Comparator.ANY) { + continue; + } + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver; + if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) { + return true; + } + } + } + return false; + } + return true; + }; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js +var require_comparator = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js"(exports2, module2) { + "use strict"; + var ANY = Symbol("SemVer ANY"); + var Comparator = class _Comparator { + static get ANY() { + return ANY; + } + constructor(comp, options) { + options = parseOptions(options); + if (comp instanceof _Comparator) { + if (comp.loose === !!options.loose) { + return comp; + } else { + comp = comp.value; + } + } + comp = comp.trim().split(/\s+/).join(" "); + debug("comparator", comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) { + this.value = ""; + } else { + this.value = this.operator + this.semver.version; + } + debug("comp", this); + } + parse(comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + const m = comp.match(r); + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`); + } + this.operator = m[1] !== void 0 ? m[1] : ""; + if (this.operator === "=") { + this.operator = ""; + } + if (!m[2]) { + this.semver = ANY; + } else { + this.semver = new SemVer(m[2], this.options.loose); + } + } + toString() { + return this.value; + } + test(version2) { + debug("Comparator.test", version2, this.options.loose); + if (this.semver === ANY || version2 === ANY) { + return true; + } + if (typeof version2 === "string") { + try { + version2 = new SemVer(version2, this.options); + } catch (er) { + return false; + } + } + return cmp(version2, this.operator, this.semver, this.options); + } + intersects(comp, options) { + if (!(comp instanceof _Comparator)) { + throw new TypeError("a Comparator is required"); + } + if (this.operator === "") { + if (this.value === "") { + return true; + } + return new Range(comp.value, options).test(this.value); + } else if (comp.operator === "") { + if (comp.value === "") { + return true; + } + return new Range(this.value, options).test(comp.semver); + } + options = parseOptions(options); + if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) { + return false; + } + if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) { + return false; + } + if (this.operator.startsWith(">") && comp.operator.startsWith(">")) { + return true; + } + if (this.operator.startsWith("<") && comp.operator.startsWith("<")) { + return true; + } + if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) { + return true; + } + if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) { + return true; + } + if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) { + return true; + } + return false; + } + }; + module2.exports = Comparator; + var parseOptions = require_parse_options(); + var { safeRe: re, t } = require_re(); + var cmp = require_cmp(); + var debug = require_debug3(); + var SemVer = require_semver(); + var Range = require_range3(); + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js +var require_satisfies = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js"(exports2, module2) { + "use strict"; + var Range = require_range3(); + var satisfies = (version2, range, options) => { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + return range.test(version2); + }; + module2.exports = satisfies; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js +var require_to_comparators = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js"(exports2, module2) { + "use strict"; + var Range = require_range3(); + var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); + module2.exports = toComparators; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js +var require_max_satisfying = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var Range = require_range3(); + var maxSatisfying = (versions, range, options) => { + let max = null; + let maxSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; + }; + module2.exports = maxSatisfying; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js +var require_min_satisfying = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var Range = require_range3(); + var minSatisfying = (versions, range, options) => { + let min = null; + let minSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!min || minSV.compare(v) === 1) { + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; + }; + module2.exports = minSatisfying; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js +var require_min_version = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var Range = require_range3(); + var gt = require_gt(); + var minVersion = (range, loose) => { + range = new Range(range, loose); + let minver = new SemVer("0.0.0"); + if (range.test(minver)) { + return minver; + } + minver = new SemVer("0.0.0-0"); + if (range.test(minver)) { + return minver; + } + minver = null; + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let setMin = null; + comparators.forEach((comparator) => { + const compver = new SemVer(comparator.semver.version); + switch (comparator.operator) { + case ">": + if (compver.prerelease.length === 0) { + compver.patch++; + } else { + compver.prerelease.push(0); + } + compver.raw = compver.format(); + /* fallthrough */ + case "": + case ">=": + if (!setMin || gt(compver, setMin)) { + setMin = compver; + } + break; + case "<": + case "<=": + break; + /* istanbul ignore next */ + default: + throw new Error(`Unexpected operation: ${comparator.operator}`); + } + }); + if (setMin && (!minver || gt(minver, setMin))) { + minver = setMin; + } + } + if (minver && range.test(minver)) { + return minver; + } + return null; + }; + module2.exports = minVersion; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js +var require_valid2 = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js"(exports2, module2) { + "use strict"; + var Range = require_range3(); + var validRange = (range, options) => { + try { + return new Range(range, options).range || "*"; + } catch (er) { + return null; + } + }; + module2.exports = validRange; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js +var require_outside = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var Range = require_range3(); + var satisfies = require_satisfies(); + var gt = require_gt(); + var lt = require_lt(); + var lte = require_lte(); + var gte = require_gte(); + var outside = (version2, range, hilo, options) => { + version2 = new SemVer(version2, options); + range = new Range(range, options); + let gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case ">": + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = ">"; + ecomp = ">="; + break; + case "<": + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = "<"; + ecomp = "<="; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + if (satisfies(version2, range, options)) { + return false; + } + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let high = null; + let low = null; + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator(">=0.0.0"); + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator; + } + }); + if (high.operator === comp || high.operator === ecomp) { + return false; + } + if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version2, low.semver)) { + return false; + } + } + return true; + }; + module2.exports = outside; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js +var require_gtr = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js"(exports2, module2) { + "use strict"; + var outside = require_outside(); + var gtr = (version2, range, options) => outside(version2, range, ">", options); + module2.exports = gtr; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js +var require_ltr = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js"(exports2, module2) { + "use strict"; + var outside = require_outside(); + var ltr = (version2, range, options) => outside(version2, range, "<", options); + module2.exports = ltr; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js +var require_intersects = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js"(exports2, module2) { + "use strict"; + var Range = require_range3(); + var intersects = (r1, r2, options) => { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2, options); + }; + module2.exports = intersects; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js +var require_simplify = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js"(exports2, module2) { + "use strict"; + var satisfies = require_satisfies(); + var compare = require_compare(); + module2.exports = (versions, range, options) => { + const set = []; + let first = null; + let prev = null; + const v = versions.sort((a, b) => compare(a, b, options)); + for (const version2 of v) { + const included = satisfies(version2, range, options); + if (included) { + prev = version2; + if (!first) { + first = version2; + } + } else { + if (prev) { + set.push([first, prev]); + } + prev = null; + first = null; + } + } + if (first) { + set.push([first, null]); + } + const ranges = []; + for (const [min, max] of set) { + if (min === max) { + ranges.push(min); + } else if (!max && min === v[0]) { + ranges.push("*"); + } else if (!max) { + ranges.push(`>=${min}`); + } else if (min === v[0]) { + ranges.push(`<=${max}`); + } else { + ranges.push(`${min} - ${max}`); + } + } + const simplified = ranges.join(" || "); + const original = typeof range.raw === "string" ? range.raw : String(range); + return simplified.length < original.length ? simplified : range; + }; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js +var require_subset = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js"(exports2, module2) { + "use strict"; + var Range = require_range3(); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var satisfies = require_satisfies(); + var compare = require_compare(); + var subset = (sub, dom, options = {}) => { + if (sub === dom) { + return true; + } + sub = new Range(sub, options); + dom = new Range(dom, options); + let sawNonNull = false; + OUTER: for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options); + sawNonNull = sawNonNull || isSub !== null; + if (isSub) { + continue OUTER; + } + } + if (sawNonNull) { + return false; + } + } + return true; + }; + var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")]; + var minimumVersion = [new Comparator(">=0.0.0")]; + var simpleSubset = (sub, dom, options) => { + if (sub === dom) { + return true; + } + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) { + return true; + } else if (options.includePrerelease) { + sub = minimumVersionWithPreRelease; + } else { + sub = minimumVersion; + } + } + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) { + return true; + } else { + dom = minimumVersion; + } + } + const eqSet = /* @__PURE__ */ new Set(); + let gt, lt; + for (const c of sub) { + if (c.operator === ">" || c.operator === ">=") { + gt = higherGT(gt, c, options); + } else if (c.operator === "<" || c.operator === "<=") { + lt = lowerLT(lt, c, options); + } else { + eqSet.add(c.semver); + } + } + if (eqSet.size > 1) { + return null; + } + let gtltComp; + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options); + if (gtltComp > 0) { + return null; + } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) { + return null; + } + } + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) { + return null; + } + if (lt && !satisfies(eq, String(lt), options)) { + return null; + } + for (const c of dom) { + if (!satisfies(eq, String(c), options)) { + return false; + } + } + return true; + } + let higher, lower; + let hasDomLT, hasDomGT; + let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false; + let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false; + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false; + } + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; + hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; + if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false; + } + } + if (c.operator === ">" || c.operator === ">=") { + higher = higherGT(gt, c, options); + if (higher === c && higher !== gt) { + return false; + } + } else if (gt.operator === ">=" && !c.test(gt.semver)) { + return false; + } + } + if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false; + } + } + if (c.operator === "<" || c.operator === "<=") { + lower = lowerLT(lt, c, options); + if (lower === c && lower !== lt) { + return false; + } + } else if (lt.operator === "<=" && !c.test(lt.semver)) { + return false; + } + } + if (!c.operator && (lt || gt) && gtltComp !== 0) { + return false; + } + } + if (gt && hasDomLT && !lt && gtltComp !== 0) { + return false; + } + if (lt && hasDomGT && !gt && gtltComp !== 0) { + return false; + } + if (needDomGTPre || needDomLTPre) { + return false; + } + return true; + }; + var higherGT = (a, b, options) => { + if (!a) { + return b; + } + const comp = compare(a.semver, b.semver, options); + return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a; + }; + var lowerLT = (a, b, options) => { + if (!a) { + return b; + } + const comp = compare(a.semver, b.semver, options); + return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a; + }; + module2.exports = subset; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js +var require_semver2 = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js"(exports2, module2) { + "use strict"; + var internalRe = require_re(); + var constants = require_constants11(); + var SemVer = require_semver(); + var identifiers = require_identifiers(); + var parse2 = require_parse3(); + var valid = require_valid(); + var clean = require_clean(); + var inc = require_inc(); + var diff = require_diff(); + var major = require_major(); + var minor = require_minor(); + var patch = require_patch(); + var prerelease = require_prerelease(); + var compare = require_compare(); + var rcompare = require_rcompare(); + var compareLoose = require_compare_loose(); + var compareBuild = require_compare_build(); + var sort = require_sort(); + var rsort = require_rsort(); + var gt = require_gt(); + var lt = require_lt(); + var eq = require_eq2(); + var neq = require_neq(); + var gte = require_gte(); + var lte = require_lte(); + var cmp = require_cmp(); + var coerce = require_coerce(); + var truncate = require_truncate(); + var Comparator = require_comparator(); + var Range = require_range3(); + var satisfies = require_satisfies(); + var toComparators = require_to_comparators(); + var maxSatisfying = require_max_satisfying(); + var minSatisfying = require_min_satisfying(); + var minVersion = require_min_version(); + var validRange = require_valid2(); + var outside = require_outside(); + var gtr = require_gtr(); + var ltr = require_ltr(); + var intersects = require_intersects(); + var simplifyRange = require_simplify(); + var subset = require_subset(); + module2.exports = { + parse: parse2, + valid, + clean, + inc, + diff, + major, + minor, + patch, + prerelease, + compare, + rcompare, + compareLoose, + compareBuild, + sort, + rsort, + gt, + lt, + eq, + neq, + gte, + lte, + cmp, + coerce, + truncate, + Comparator, + Range, + satisfies, + toComparators, + maxSatisfying, + minSatisfying, + minVersion, + validRange, + outside, + gtr, + ltr, + intersects, + simplifyRange, + subset, + SemVer, + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, + RELEASE_TYPES: constants.RELEASE_TYPES, + compareIdentifiers: identifiers.compareIdentifiers, + rcompareIdentifiers: identifiers.rcompareIdentifiers + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/utils/index.js +var require_utils16 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/utils/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QUEUE_EVENT_SUFFIX = exports2.toString = exports2.errorToJSON = exports2.parseObjectValues = exports2.isRedisVersionLowerThan = exports2.childSend = exports2.asyncSend = exports2.DELAY_TIME_1 = exports2.DELAY_TIME_5 = exports2.clientCommandMessageReg = exports2.optsEncodeMap = exports2.optsDecodeMap = exports2.errorObject = void 0; + exports2.tryCatch = tryCatch2; + exports2.lengthInUtf8Bytes = lengthInUtf8Bytes; + exports2.isEmpty = isEmpty; + exports2.array2obj = array2obj; + exports2.objectToFlatArray = objectToFlatArray; + exports2.delay = delay; + exports2.forwardConnectionError = forwardConnectionError; + exports2.increaseMaxListeners = increaseMaxListeners; + exports2.invertObject = invertObject; + exports2.isRedisInstance = isRedisInstance; + exports2.isRedisCluster = isRedisCluster; + exports2.decreaseMaxListeners = decreaseMaxListeners; + exports2.removeAllQueueData = removeAllQueueData; + exports2.getParentKey = getParentKey; + exports2.isNotConnectionError = isNotConnectionError; + exports2.removeUndefinedFields = removeUndefinedFields; + exports2.trace = trace; + exports2.randomUUID = randomUUID; + var crypto_1 = require("crypto"); + var utils_1 = require_utils15(); + var connection_closed_error_1 = require_connection_closed_error(); + var semver = require_semver2(); + var enums_1 = require_enums3(); + exports2.errorObject = { value: null }; + function tryCatch2(fn, ctx, args) { + try { + return fn.apply(ctx, args); + } catch (e) { + exports2.errorObject.value = e; + return exports2.errorObject; + } + } + function lengthInUtf8Bytes(str) { + return Buffer.byteLength(str, "utf8"); + } + function isEmpty(obj2) { + for (const key in obj2) { + if (Object.prototype.hasOwnProperty.call(obj2, key)) { + return false; + } + } + return true; + } + function array2obj(arr) { + const obj2 = {}; + for (let i = 0; i < arr.length; i += 2) { + obj2[arr[i]] = arr[i + 1]; + } + return obj2; + } + function objectToFlatArray(obj2) { + const arr = []; + for (const key in obj2) { + if (Object.prototype.hasOwnProperty.call(obj2, key) && obj2[key] !== void 0) { + arr[arr.length] = key; + arr[arr.length] = obj2[key]; + } + } + return arr; + } + function delay(ms, abortController) { + return new Promise((resolve) => { + let timeout; + const callback = () => { + abortController === null || abortController === void 0 ? void 0 : abortController.signal.removeEventListener("abort", callback); + clearTimeout(timeout); + resolve(); + }; + timeout = setTimeout(callback, ms); + abortController === null || abortController === void 0 ? void 0 : abortController.signal.addEventListener("abort", callback); + }); + } + function forwardConnectionError(emitter, connection) { + connection.on("error", (error) => { + if (emitter.listenerCount("error") > 0) { + emitter.emit("error", error); + } + }); + } + function increaseMaxListeners(emitter, count) { + const maxListeners = emitter.getMaxListeners(); + emitter.setMaxListeners(maxListeners + count); + } + function invertObject(obj2) { + return Object.entries(obj2).reduce((result, [key, value]) => { + result[value] = key; + return result; + }, {}); + } + exports2.optsDecodeMap = { + de: "deduplication", + fpof: "failParentOnFailure", + cpof: "continueParentOnFailure", + idof: "ignoreDependencyOnFailure", + kl: "keepLogs", + rdof: "removeDependencyOnFailure" + }; + exports2.optsEncodeMap = Object.assign(Object.assign({}, invertObject(exports2.optsDecodeMap)), { + /*/ Legacy for backwards compatibility */ + debounce: "de" + }); + function isRedisInstance(obj2) { + if (!obj2) { + return false; + } + const redisApi = ["connect", "disconnect", "duplicate"]; + return redisApi.every((name) => typeof obj2[name] === "function"); + } + function isRedisCluster(obj2) { + return isRedisInstance(obj2) && !!obj2.isCluster; + } + function decreaseMaxListeners(emitter, count) { + increaseMaxListeners(emitter, -count); + } + async function removeAllQueueData(client, queueName, prefix = process.env.BULLMQ_TEST_PREFIX || "bull") { + if (client.isCluster) { + return false; + } + const pattern = `${prefix}:${queueName}:*`; + const pendingOperations = []; + await new Promise((resolve, reject) => { + const stream = client.scanStream({ + match: pattern + }); + stream.on("data", (keys) => { + if (keys.length) { + const pipeline = client.pipeline(); + keys.forEach((key) => { + pipeline.del(key); + }); + const execPromise = pipeline.exec().catch((error) => { + reject(error); + throw error; + }); + pendingOperations.push(execPromise); + } + }); + stream.on("end", () => resolve()); + stream.on("error", (error) => reject(error)); + }); + await Promise.all(pendingOperations); + try { + await client.quit(); + } catch (error) { + if (isNotConnectionError(error)) { + throw error; + } + } + } + function getParentKey(opts) { + if (opts) { + return `${opts.queue}:${opts.id}`; + } + } + exports2.clientCommandMessageReg = /ERR unknown command ['`]\s*client\s*['`]/; + exports2.DELAY_TIME_5 = 5e3; + exports2.DELAY_TIME_1 = 100; + function isNotConnectionError(error) { + if (error instanceof connection_closed_error_1.ConnectionClosedError) { + return false; + } + const { code, message: errorMessage } = error; + return errorMessage !== utils_1.CONNECTION_CLOSED_ERROR_MSG && !errorMessage.includes("ECONNREFUSED") && code !== "ECONNREFUSED"; + } + var asyncSend = (proc, msg) => { + return new Promise((resolve, reject) => { + if (typeof proc.send === "function") { + proc.send(msg, (err) => { + if (err) { + reject(err); + } else { + resolve(); + } + }); + } else if (typeof proc.postMessage === "function") { + resolve(proc.postMessage(msg)); + } else { + resolve(); + } + }); + }; + exports2.asyncSend = asyncSend; + var childSend = (proc, msg) => (0, exports2.asyncSend)(proc, msg); + exports2.childSend = childSend; + var isRedisVersionLowerThan = (currentVersion, minimumVersion, currentDatabaseType, desiredDatabaseType = "redis") => { + if (currentDatabaseType === desiredDatabaseType) { + const version2 = semver.valid(semver.coerce(currentVersion)); + return semver.lt(version2, minimumVersion); + } + return false; + }; + exports2.isRedisVersionLowerThan = isRedisVersionLowerThan; + var parseObjectValues = (obj2) => { + const accumulator = {}; + for (const value of Object.entries(obj2)) { + accumulator[value[0]] = JSON.parse(value[1]); + } + return accumulator; + }; + exports2.parseObjectValues = parseObjectValues; + var getCircularReplacer = (rootReference) => { + const references = /* @__PURE__ */ new WeakSet(); + references.add(rootReference); + return (_2, value) => { + if (typeof value === "object" && value !== null) { + if (references.has(value)) { + return "[Circular]"; + } + references.add(value); + } + return value; + }; + }; + var errorToJSON = (value) => { + const error = {}; + Object.getOwnPropertyNames(value).forEach(function(propName) { + error[propName] = value[propName]; + }); + return JSON.parse(JSON.stringify(error, getCircularReplacer(value))); + }; + exports2.errorToJSON = errorToJSON; + var INFINITY = 1 / 0; + var toString2 = (value) => { + if (value == null) { + return ""; + } + if (typeof value === "string") { + return value; + } + if (Array.isArray(value)) { + return `${value.map((other) => other == null ? other : (0, exports2.toString)(other))}`; + } + if (typeof value == "symbol" || Object.prototype.toString.call(value) == "[object Symbol]") { + return value.toString(); + } + const result = `${value}`; + return result === "0" && 1 / value === -INFINITY ? "-0" : result; + }; + exports2.toString = toString2; + exports2.QUEUE_EVENT_SUFFIX = ":qe"; + function removeUndefinedFields(obj2) { + const newObj = {}; + for (const key in obj2) { + if (obj2[key] !== void 0) { + newObj[key] = obj2[key]; + } + } + return newObj; + } + async function trace(telemetry, spanKind, queueName, operation, destination, callback, srcPropagationMetadata) { + if (!telemetry) { + return callback(); + } else { + const { tracer, contextManager } = telemetry; + const currentContext = contextManager.active(); + let parentContext; + if (srcPropagationMetadata) { + parentContext = contextManager.fromMetadata(currentContext, srcPropagationMetadata); + } + const spanName = destination ? `${operation} ${destination}` : operation; + const span = tracer.startSpan(spanName, { + kind: spanKind + }, parentContext); + try { + span.setAttributes({ + [enums_1.TelemetryAttributes.QueueName]: queueName, + [enums_1.TelemetryAttributes.QueueOperation]: operation + }); + let messageContext; + let dstPropagationMetadata; + if (spanKind === enums_1.SpanKind.CONSUMER && parentContext) { + messageContext = span.setSpanOnContext(parentContext); + } else { + messageContext = span.setSpanOnContext(currentContext); + } + if (callback.length == 2) { + dstPropagationMetadata = contextManager.getMetadata(messageContext); + } + return await contextManager.with(messageContext, () => callback(span, dstPropagationMetadata)); + } catch (err) { + span.recordException(err); + throw err; + } finally { + span.end(); + } + } + } + function randomUUID() { + if (typeof crypto_1.randomUUID === "function") { + return (0, crypto_1.randomUUID)(); + } + const bytes = (0, crypto_1.randomBytes)(16); + bytes[6] = bytes[6] & 15 | 64; + bytes[8] = bytes[8] & 63 | 128; + return [ + bytes.toString("hex", 0, 4), + bytes.toString("hex", 4, 6), + bytes.toString("hex", 6, 8), + bytes.toString("hex", 8, 10), + bytes.toString("hex", 10, 16) + ].join("-"); + } + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/child-processor.js +var require_child_processor = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/child-processor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ChildProcessor = void 0; + var abort_controller_1 = require_abort_controller(); + var enums_1 = require_enums3(); + var utils_1 = require_utils16(); + var ChildStatus; + (function(ChildStatus2) { + ChildStatus2[ChildStatus2["Idle"] = 0] = "Idle"; + ChildStatus2[ChildStatus2["Started"] = 1] = "Started"; + ChildStatus2[ChildStatus2["Terminating"] = 2] = "Terminating"; + ChildStatus2[ChildStatus2["Errored"] = 3] = "Errored"; + })(ChildStatus || (ChildStatus = {})); + var RESPONSE_TIMEOUT = process.env.NODE_ENV === "test" ? 500 : 5e3; + var ChildProcessor = class { + constructor(send, receiver) { + this.send = send; + this.receiver = receiver; + } + async init(processorFile) { + var _a; + let processor; + try { + const { default: processorFn } = await import(processorFile); + processor = processorFn; + if (processor.default) { + processor = processor.default; + } + if (typeof processor !== "function") { + throw new Error("No function is exported in processor file"); + } + } catch (err) { + this.status = ChildStatus.Errored; + try { + await this.send({ + cmd: enums_1.ParentCommand.InitFailed, + err: (0, utils_1.errorToJSON)(err) + }); + } finally { + process.exit((_a = process.exitCode) !== null && _a !== void 0 ? _a : 1); + } + } + const origProcessor = processor; + processor = function(job, token, signal) { + try { + return Promise.resolve(origProcessor(job, token, signal)); + } catch (err) { + return Promise.reject(err); + } + }; + this.processor = processor; + this.status = ChildStatus.Idle; + await this.send({ + cmd: enums_1.ParentCommand.InitCompleted + }); + } + async start(jobJson, token) { + if (this.status !== ChildStatus.Idle) { + return this.send({ + cmd: enums_1.ParentCommand.Error, + err: (0, utils_1.errorToJSON)(new Error("cannot start a not idling child process")) + }); + } + this.status = ChildStatus.Started; + this.abortController = new abort_controller_1.AbortController(); + this.currentJobPromise = (async () => { + try { + const job = this.wrapJob(jobJson, this.send); + const result = await this.processor(job, token, this.abortController.signal); + await this.send({ + cmd: enums_1.ParentCommand.Completed, + value: typeof result === "undefined" ? null : result + }); + } catch (err) { + await this.send({ + cmd: enums_1.ParentCommand.Failed, + value: (0, utils_1.errorToJSON)(!err.message ? new Error(err) : err) + }); + } finally { + this.status = ChildStatus.Idle; + this.currentJobPromise = void 0; + this.abortController = void 0; + } + })(); + } + /** + * Cancels the currently running job by aborting its signal. + * @param reason - Optional reason for the cancellation + */ + cancel(reason) { + if (this.abortController) { + this.abortController.abort(reason); + } + } + async stop() { + } + async waitForCurrentJobAndExit() { + this.status = ChildStatus.Terminating; + try { + await this.currentJobPromise; + } finally { + process.exit(process.exitCode || 0); + } + } + /** + * Enhance the given job argument with some functions + * that can be called from the sandboxed job processor. + * + * Note, the `job` argument is a JSON deserialized message + * from the main node process to this forked child process, + * the functions on the original job object are not in tact. + * The wrapped job adds back some of those original functions. + */ + wrapJob(job, send) { + const wrappedJob = Object.assign(Object.assign({}, job), { + queueQualifiedName: job.queueQualifiedName, + data: JSON.parse(job.data || "{}"), + opts: job.opts, + returnValue: JSON.parse(job.returnvalue || "{}"), + /* + * Proxy `updateProgress` function, should works as `progress` function. + */ + async updateProgress(progress) { + this.progress = progress; + await send({ + cmd: enums_1.ParentCommand.Progress, + value: progress + }); + }, + /* + * Proxy job `log` function. + */ + log: async (row) => { + await send({ + cmd: enums_1.ParentCommand.Log, + value: row + }); + }, + /* + * Proxy `moveToDelayed` function. + */ + moveToDelayed: async (timestamp, token) => { + await send({ + cmd: enums_1.ParentCommand.MoveToDelayed, + value: { timestamp, token } + }); + }, + /* + * Proxy `moveToWait` function. + */ + moveToWait: async (token) => { + await send({ + cmd: enums_1.ParentCommand.MoveToWait, + value: { token } + }); + }, + /* + * Proxy `moveToWaitingChildren` function. + */ + moveToWaitingChildren: async (token, opts) => { + const requestId = Math.random().toString(36).substring(2, 15); + await send({ + requestId, + cmd: enums_1.ParentCommand.MoveToWaitingChildren, + value: { token, opts } + }); + return waitResponse(requestId, this.receiver, RESPONSE_TIMEOUT, "moveToWaitingChildren"); + }, + /* + * Proxy `updateData` function. + */ + updateData: async (data) => { + await send({ + cmd: enums_1.ParentCommand.Update, + value: data + }); + wrappedJob.data = data; + }, + /** + * Proxy `getChildrenValues` function. + */ + getChildrenValues: async () => { + const requestId = Math.random().toString(36).substring(2, 15); + await send({ + requestId, + cmd: enums_1.ParentCommand.GetChildrenValues + }); + return waitResponse(requestId, this.receiver, RESPONSE_TIMEOUT, "getChildrenValues"); + }, + /** + * Proxy `getIgnoredChildrenFailures` function. + * + * This method sends a request to retrieve the failures of ignored children + * and waits for a response from the parent process. + * + * @returns - A promise that resolves with the ignored children failures. + * The exact structure of the returned data depends on the parent process implementation. + */ + getIgnoredChildrenFailures: async () => { + const requestId = Math.random().toString(36).substring(2, 15); + await send({ + requestId, + cmd: enums_1.ParentCommand.GetIgnoredChildrenFailures + }); + return waitResponse(requestId, this.receiver, RESPONSE_TIMEOUT, "getIgnoredChildrenFailures"); + }, + /** + * Proxy `getDependenciesCount` function. + */ + getDependenciesCount: async (opts) => { + const requestId = Math.random().toString(36).substring(2, 15); + await send({ + requestId, + cmd: enums_1.ParentCommand.GetDependenciesCount, + value: opts + }); + return waitResponse(requestId, this.receiver, RESPONSE_TIMEOUT, "getDependenciesCount"); + }, + /** + * Proxy `getDependencies` function. + */ + getDependencies: async (opts) => { + const requestId = Math.random().toString(36).substring(2, 15); + await send({ + requestId, + cmd: enums_1.ParentCommand.GetDependencies, + value: opts + }); + return waitResponse(requestId, this.receiver, RESPONSE_TIMEOUT, "getDependencies"); + } + }); + return wrappedJob; + } + }; + exports2.ChildProcessor = ChildProcessor; + var waitResponse = async (requestId, receiver, timeout, cmd) => { + return new Promise((resolve, reject) => { + const listener = (msg) => { + if (msg.requestId === requestId) { + resolve(msg.value); + receiver.off("message", listener); + } + }; + receiver.on("message", listener); + setTimeout(() => { + receiver.off("message", listener); + reject(new Error(`TimeoutError: ${cmd} timed out in (${timeout}ms)`)); + }, timeout); + }); + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/errors/delayed-error.js +var require_delayed_error = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/errors/delayed-error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DelayedError = exports2.DELAYED_ERROR = void 0; + exports2.DELAYED_ERROR = "bullmq:movedToDelayed"; + var DelayedError = class extends Error { + constructor(message = exports2.DELAYED_ERROR) { + super(message); + this.name = this.constructor.name; + Object.setPrototypeOf(this, new.target.prototype); + } + }; + exports2.DelayedError = DelayedError; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/errors/rate-limit-error.js +var require_rate_limit_error = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/errors/rate-limit-error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RateLimitError = exports2.RATE_LIMIT_ERROR = void 0; + exports2.RATE_LIMIT_ERROR = "bullmq:rateLimitExceeded"; + var RateLimitError = class extends Error { + constructor(message = exports2.RATE_LIMIT_ERROR) { + super(message); + this.name = this.constructor.name; + Object.setPrototypeOf(this, new.target.prototype); + } + }; + exports2.RateLimitError = RateLimitError; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/errors/unrecoverable-error.js +var require_unrecoverable_error = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/errors/unrecoverable-error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UnrecoverableError = exports2.UNRECOVERABLE_ERROR = void 0; + exports2.UNRECOVERABLE_ERROR = "bullmq:unrecoverable"; + var UnrecoverableError = class extends Error { + constructor(message = exports2.UNRECOVERABLE_ERROR) { + super(message); + this.name = this.constructor.name; + Object.setPrototypeOf(this, new.target.prototype); + } + }; + exports2.UnrecoverableError = UnrecoverableError; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/errors/waiting-children-error.js +var require_waiting_children_error = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/errors/waiting-children-error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WaitingChildrenError = exports2.WAITING_CHILDREN_ERROR = void 0; + exports2.WAITING_CHILDREN_ERROR = "bullmq:movedToWaitingChildren"; + var WaitingChildrenError = class extends Error { + constructor(message = exports2.WAITING_CHILDREN_ERROR) { + super(message); + this.name = this.constructor.name; + Object.setPrototypeOf(this, new.target.prototype); + } + }; + exports2.WaitingChildrenError = WaitingChildrenError; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/errors/waiting-error.js +var require_waiting_error = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/errors/waiting-error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WaitingError = exports2.WAITING_ERROR = void 0; + exports2.WAITING_ERROR = "bullmq:movedToWait"; + var WaitingError = class extends Error { + constructor(message = exports2.WAITING_ERROR) { + super(message); + this.name = this.constructor.name; + Object.setPrototypeOf(this, new.target.prototype); + } + }; + exports2.WaitingError = WaitingError; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/errors/index.js +var require_errors3 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/errors/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_connection_closed_error(), exports2); + tslib_1.__exportStar(require_delayed_error(), exports2); + tslib_1.__exportStar(require_rate_limit_error(), exports2); + tslib_1.__exportStar(require_unrecoverable_error(), exports2); + tslib_1.__exportStar(require_waiting_children_error(), exports2); + tslib_1.__exportStar(require_waiting_error(), exports2); + } +}); + +// ../../node_modules/.pnpm/msgpackr@2.0.5/node_modules/msgpackr/dist/node.cjs +var require_node4 = __commonJS({ + "../../node_modules/.pnpm/msgpackr@2.0.5/node_modules/msgpackr/dist/node.cjs"(exports2) { + "use strict"; + var stream = require("stream"); + var module$1 = require("module"); + var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null; + var decoder; + try { + decoder = new TextDecoder(); + } catch (error) { + } + var src; + var srcEnd; + var position$1 = 0; + var EMPTY_ARRAY = []; + var strings = EMPTY_ARRAY; + var stringPosition = 0; + var currentUnpackr = {}; + var currentStructures; + var srcString; + var srcStringStart = 0; + var srcStringEnd = 0; + var bundledStrings$1; + var referenceMap; + var currentExtensions = []; + var dataView; + var defaultOptions = { + useRecords: false, + mapsAsObjects: true + }; + var C1Type = class { + }; + var C1 = new C1Type(); + C1.name = "MessagePack 0xC1"; + var sequentialMode = false; + var inlineObjectReadThreshold = 2; + var Unpackr = class _Unpackr { + constructor(options) { + if (options) { + if (options.useRecords === false && options.mapsAsObjects === void 0) + options.mapsAsObjects = true; + if (options.sequential && options.trusted !== false) { + options.trusted = true; + if (!options.structures && options.useRecords != false) { + options.structures = []; + if (!options.maxSharedStructures) + options.maxSharedStructures = 0; + } + } + if (options.structures) + options.structures.sharedLength = options.structures.length; + else if (options.getStructures) { + (options.structures = []).uninitialized = true; + options.structures.sharedLength = 0; + } + if (options.int64AsNumber) { + options.int64AsType = "number"; + } + } + Object.assign(this, options); + } + unpack(source, options) { + if (src) { + return saveState(() => { + clearSource(); + return this ? this.unpack(source, options) : _Unpackr.prototype.unpack.call(defaultOptions, source, options); + }); + } + if (!source.buffer && source.constructor === ArrayBuffer) + source = typeof Buffer !== "undefined" ? Buffer.from(source) : new Uint8Array(source); + if (typeof options === "object") { + srcEnd = options.end || source.length; + position$1 = options.start || 0; + } else { + position$1 = 0; + srcEnd = options > -1 ? options : source.length; + } + stringPosition = 0; + srcStringEnd = 0; + srcString = null; + strings = EMPTY_ARRAY; + bundledStrings$1 = null; + src = source; + try { + dataView = source.dataView || (source.dataView = new DataView(source.buffer, source.byteOffset, source.byteLength)); + } catch (error) { + src = null; + if (source instanceof Uint8Array) + throw error; + throw new Error("Source must be a Uint8Array or Buffer but was a " + (source && typeof source == "object" ? source.constructor.name : typeof source)); + } + if (this instanceof _Unpackr) { + currentUnpackr = this; + if (this.structures) { + currentStructures = this.structures; + return checkedRead(options); + } else if (!currentStructures || currentStructures.length > 0) { + currentStructures = []; + } + } else { + currentUnpackr = defaultOptions; + if (!currentStructures || currentStructures.length > 0) + currentStructures = []; + } + return checkedRead(options); + } + unpackMultiple(source, forEach) { + let values, lastPosition = 0; + try { + sequentialMode = true; + let size = source.length; + let value = this ? this.unpack(source, size) : defaultUnpackr.unpack(source, size); + if (forEach) { + if (forEach(value, lastPosition, position$1) === false) return; + while (position$1 < size) { + lastPosition = position$1; + if (forEach(checkedRead(), lastPosition, position$1) === false) { + return; + } + } + } else { + values = [value]; + while (position$1 < size) { + lastPosition = position$1; + values.push(checkedRead()); + } + return values; + } + } catch (error) { + error.lastPosition = lastPosition; + error.values = values; + throw error; + } finally { + sequentialMode = false; + clearSource(); + } + } + _mergeStructures(loadedStructures, existingStructures) { + if (this._onLoadedStructures) + loadedStructures = this._onLoadedStructures(loadedStructures); + loadedStructures = loadedStructures || []; + if (Object.isFrozen(loadedStructures)) + loadedStructures = loadedStructures.map((structure) => structure.slice(0)); + for (let i = 0, l2 = loadedStructures.length; i < l2; i++) { + let structure = loadedStructures[i]; + if (structure) { + structure.isShared = true; + if (i >= 32) + structure.highByte = i - 32 >> 5; + } + } + loadedStructures.sharedLength = loadedStructures.length; + for (let id in existingStructures || []) { + if (id >= 0) { + let structure = loadedStructures[id]; + let existing = existingStructures[id]; + if (existing) { + if (structure) + (loadedStructures.restoreStructures || (loadedStructures.restoreStructures = []))[id] = structure; + loadedStructures[id] = existing; + } + } + } + return this.structures = loadedStructures; + } + decode(source, options) { + return this.unpack(source, options); + } + }; + function checkedRead(options) { + try { + if (!currentUnpackr.trusted && !sequentialMode) { + let sharedLength = currentStructures.sharedLength || 0; + if (sharedLength < currentStructures.length) + currentStructures.length = sharedLength; + } + let result; + if (currentUnpackr._readStruct && src[position$1] < 64 && src[position$1] >= 32) { + result = currentUnpackr._readStruct(src, position$1, srcEnd); + src = null; + if (!(options && options.lazy) && result) + result = result.toJSON(); + position$1 = srcEnd; + } else + result = read(); + if (bundledStrings$1) { + position$1 = bundledStrings$1.postBundlePosition; + bundledStrings$1 = null; + } + if (sequentialMode) + currentStructures.restoreStructures = null; + if (position$1 == srcEnd) { + if (currentStructures && currentStructures.restoreStructures) + restoreStructures(); + currentStructures = null; + src = null; + if (referenceMap) + referenceMap = null; + } else if (position$1 > srcEnd) { + throw new Error("Unexpected end of MessagePack data"); + } else if (!sequentialMode) { + let jsonView; + try { + jsonView = JSON.stringify(result, (_2, value) => typeof value === "bigint" ? `${value}n` : value).slice(0, 100); + } catch (error) { + jsonView = "(JSON view not available " + error + ")"; + } + throw new Error("Data read, but end of buffer not reached " + jsonView); + } + return result; + } catch (error) { + if (currentStructures && currentStructures.restoreStructures) + restoreStructures(); + clearSource(); + if (error instanceof RangeError || error.message.startsWith("Unexpected end of buffer") || position$1 > srcEnd) { + error.incomplete = true; + } + throw error; + } + } + function restoreStructures() { + for (let id in currentStructures.restoreStructures) { + currentStructures[id] = currentStructures.restoreStructures[id]; + } + currentStructures.restoreStructures = null; + } + function read() { + let token = src[position$1++]; + if (token < 160) { + if (token < 128) { + if (token < 64) + return token; + else { + let structure = currentStructures[token & 63] || currentUnpackr.getStructures && loadStructures()[token & 63]; + if (structure) { + if (!structure.read) { + structure.read = createStructureReader(structure, token & 63); + } + return structure.read(); + } else + return token; + } + } else if (token < 144) { + token -= 128; + if (currentUnpackr.mapsAsObjects) { + let object = {}; + for (let i = 0; i < token; i++) { + let key = readKey(); + if (key === "__proto__") + key = "__proto_"; + object[key] = read(); + } + return object; + } else { + let map = /* @__PURE__ */ new Map(); + for (let i = 0; i < token; i++) { + map.set(read(), read()); + } + return map; + } + } else { + token -= 144; + let array = new Array(token); + for (let i = 0; i < token; i++) { + array[i] = read(); + } + if (currentUnpackr.freezeData) + return Object.freeze(array); + return array; + } + } else if (token < 192) { + let length = token - 160; + if (srcStringEnd >= position$1) { + return srcString.slice(position$1 - srcStringStart, (position$1 += length) - srcStringStart); + } + if (srcStringEnd == 0 && srcEnd < 140) { + let string = length < 16 ? shortStringInJS(length) : longStringInJS(length); + if (string != null) + return string; + } + return readFixedString(length); + } else { + let value; + switch (token) { + case 192: + return null; + case 193: + if (bundledStrings$1) { + value = read(); + if (value > 0) + return bundledStrings$1[1].slice(bundledStrings$1.position1, bundledStrings$1.position1 += value); + else + return bundledStrings$1[0].slice(bundledStrings$1.position0, bundledStrings$1.position0 -= value); + } + return C1; + // "never-used", return special object to denote that + case 194: + return false; + case 195: + return true; + case 196: + value = src[position$1++]; + if (value === void 0) + throw new Error("Unexpected end of buffer"); + return readBin(value); + case 197: + value = dataView.getUint16(position$1); + position$1 += 2; + return readBin(value); + case 198: + value = dataView.getUint32(position$1); + position$1 += 4; + return readBin(value); + case 199: + return readExt(src[position$1++]); + case 200: + value = dataView.getUint16(position$1); + position$1 += 2; + return readExt(value); + case 201: + value = dataView.getUint32(position$1); + position$1 += 4; + return readExt(value); + case 202: + value = dataView.getFloat32(position$1); + if (currentUnpackr.useFloat32 > 2) { + let multiplier = mult10[(src[position$1] & 127) << 1 | src[position$1 + 1] >> 7]; + position$1 += 4; + return (multiplier * value + (value > 0 ? 0.5 : -0.5) >> 0) / multiplier; + } + position$1 += 4; + return value; + case 203: + value = dataView.getFloat64(position$1); + position$1 += 8; + return value; + // uint handlers + case 204: + return src[position$1++]; + case 205: + value = dataView.getUint16(position$1); + position$1 += 2; + return value; + case 206: + value = dataView.getUint32(position$1); + position$1 += 4; + return value; + case 207: + if (currentUnpackr.int64AsType === "number") { + value = dataView.getUint32(position$1) * 4294967296; + value += dataView.getUint32(position$1 + 4); + } else if (currentUnpackr.int64AsType === "string") { + value = dataView.getBigUint64(position$1).toString(); + } else if (currentUnpackr.int64AsType === "auto") { + value = dataView.getBigUint64(position$1); + if (value <= BigInt(2) << BigInt(52)) value = Number(value); + } else + value = dataView.getBigUint64(position$1); + position$1 += 8; + return value; + // int handlers + case 208: + return dataView.getInt8(position$1++); + case 209: + value = dataView.getInt16(position$1); + position$1 += 2; + return value; + case 210: + value = dataView.getInt32(position$1); + position$1 += 4; + return value; + case 211: + if (currentUnpackr.int64AsType === "number") { + value = dataView.getInt32(position$1) * 4294967296; + value += dataView.getUint32(position$1 + 4); + } else if (currentUnpackr.int64AsType === "string") { + value = dataView.getBigInt64(position$1).toString(); + } else if (currentUnpackr.int64AsType === "auto") { + value = dataView.getBigInt64(position$1); + if (value >= BigInt(-2) << BigInt(52) && value <= BigInt(2) << BigInt(52)) value = Number(value); + } else + value = dataView.getBigInt64(position$1); + position$1 += 8; + return value; + case 212: + value = src[position$1++]; + if (value == 114) { + return recordDefinition(src[position$1++] & 63); + } else { + let extension = currentExtensions[value]; + if (extension) { + if (extension.read) { + position$1++; + return extension.read(read()); + } else if (extension.noBuffer) { + position$1++; + return extension(); + } else + return extension(src.subarray(position$1, ++position$1)); + } else + throw new Error("Unknown extension " + value); + } + case 213: + value = src[position$1]; + if (value == 114) { + position$1++; + return recordDefinition(src[position$1++] & 63, src[position$1++]); + } else + return readExt(2); + case 214: + return readExt(4); + case 215: + return readExt(8); + case 216: + return readExt(16); + case 217: + value = src[position$1++]; + if (srcStringEnd >= position$1) { + return srcString.slice(position$1 - srcStringStart, (position$1 += value) - srcStringStart); + } + return readString8(value); + case 218: + value = dataView.getUint16(position$1); + position$1 += 2; + if (srcStringEnd >= position$1) { + return srcString.slice(position$1 - srcStringStart, (position$1 += value) - srcStringStart); + } + return readString16(value); + case 219: + value = dataView.getUint32(position$1); + position$1 += 4; + if (srcStringEnd >= position$1) { + return srcString.slice(position$1 - srcStringStart, (position$1 += value) - srcStringStart); + } + return readString32(value); + case 220: + value = dataView.getUint16(position$1); + position$1 += 2; + return readArray(value); + case 221: + value = dataView.getUint32(position$1); + position$1 += 4; + return readArray(value); + case 222: + value = dataView.getUint16(position$1); + position$1 += 2; + return readMap(value); + case 223: + value = dataView.getUint32(position$1); + position$1 += 4; + return readMap(value); + default: + if (token >= 224) + return token - 256; + if (token === void 0) { + let error = new Error("Unexpected end of MessagePack data"); + error.incomplete = true; + throw error; + } + throw new Error("Unknown MessagePack token " + token); + } + } + } + var validName = /^[a-zA-Z_$][a-zA-Z\d_$]*$/; + function createStructureReader(structure, firstId) { + function readObject() { + if (readObject.count++ > inlineObjectReadThreshold) { + let optimizedReadObject; + try { + optimizedReadObject = structure.read = new Function("r", "return function(){return " + (currentUnpackr.freezeData ? "Object.freeze" : "") + "({" + structure.map((key) => key === "__proto__" ? "__proto_:r()" : validName.test(key) ? key + ":r()" : "[" + JSON.stringify(key) + "]:r()").join(",") + "})}")(read); + } catch (error) { + inlineObjectReadThreshold = Infinity; + return readObject(); + } + structure.read0 = optimizedReadObject; + if (structure.highByte === 0) + structure.read = createSecondByteReader(firstId, structure.read); + return optimizedReadObject(); + } + let object = {}; + for (let i = 0, l2 = structure.length; i < l2; i++) { + let key = structure[i]; + if (key === "__proto__") + key = "__proto_"; + object[key] = read(); + } + if (currentUnpackr.freezeData) + return Object.freeze(object); + return object; + } + readObject.count = 0; + structure.read0 = readObject; + if (structure.highByte === 0) { + return createSecondByteReader(firstId, readObject); + } + return readObject; + } + var createSecondByteReader = (firstId, read0) => { + return function() { + let highByte = src[position$1++]; + if (highByte === 0) + return read0(); + let id = firstId < 32 ? -(firstId + (highByte << 5)) : firstId + (highByte << 5); + let structure = currentStructures[id] || loadStructures()[id]; + if (!structure) { + throw new Error("Record id is not defined for " + id); + } + if (!structure.read) + structure.read = createStructureReader(structure, firstId); + return structure.read(); + }; + }; + function loadStructures() { + let loadedStructures = saveState(() => { + src = null; + return currentUnpackr.getStructures(); + }); + return currentStructures = currentUnpackr._mergeStructures(loadedStructures, currentStructures); + } + var readFixedString = readStringJS; + var readString8 = readStringJS; + var readString16 = readStringJS; + var readString32 = readStringJS; + exports2.isNativeAccelerationEnabled = false; + function setExtractor(extractStrings) { + exports2.isNativeAccelerationEnabled = true; + readFixedString = readString(1); + readString8 = readString(2); + readString16 = readString(3); + readString32 = readString(5); + function readString(headerLength) { + return function readString2(length) { + let string = strings[stringPosition++]; + if (string == null) { + if (bundledStrings$1) + return readStringJS(length); + let byteOffset = src.byteOffset; + let extraction = extractStrings(position$1 - headerLength + byteOffset, srcEnd + byteOffset, src.buffer); + if (typeof extraction == "string") { + string = extraction; + strings = EMPTY_ARRAY; + } else { + strings = extraction; + stringPosition = 1; + srcStringEnd = 1; + string = strings[0]; + if (string === void 0) + throw new Error("Unexpected end of buffer"); + } + } + let srcStringLength = string.length; + if (srcStringLength <= length) { + position$1 += length; + return string; + } + srcString = string; + srcStringStart = position$1; + srcStringEnd = position$1 + srcStringLength; + position$1 += length; + return string.slice(0, length); + }; + } + } + function readStringJS(length) { + let result; + if (length < 16) { + if (result = shortStringInJS(length)) + return result; + } + if (length > 64 && decoder) + return decoder.decode(src.subarray(position$1, position$1 += length)); + const end = position$1 + length; + const units = []; + result = ""; + while (position$1 < end) { + const byte1 = src[position$1++]; + if ((byte1 & 128) === 0) { + units.push(byte1); + } else if ((byte1 & 224) === 192) { + if (byte1 < 194 || position$1 >= end || (src[position$1] & 192) !== 128) { + units.push(65533); + } else { + const byte2 = src[position$1++] & 63; + units.push((byte1 & 31) << 6 | byte2); + } + } else if ((byte1 & 240) === 224) { + const byte2 = position$1 < end ? src[position$1] : 0; + if (position$1 >= end || (byte2 & 192) !== 128 || byte1 === 224 && byte2 < 160 || byte1 === 237 && byte2 >= 160) { + units.push(65533); + } else { + position$1++; + if (position$1 >= end || (src[position$1] & 192) !== 128) { + units.push(65533); + } else { + const byte3 = src[position$1++] & 63; + units.push((byte1 & 31) << 12 | (byte2 & 63) << 6 | byte3); + } + } + } else if ((byte1 & 248) === 240) { + const byte2 = position$1 < end ? src[position$1] : 0; + if (byte1 > 244 || position$1 >= end || (byte2 & 192) !== 128 || byte1 === 240 && byte2 < 144 || byte1 === 244 && byte2 >= 144) { + units.push(65533); + } else { + position$1++; + if (position$1 >= end || (src[position$1] & 192) !== 128) { + units.push(65533); + } else { + const byte3 = src[position$1++] & 63; + if (position$1 >= end || (src[position$1] & 192) !== 128) { + units.push(65533); + } else { + const byte4 = src[position$1++] & 63; + let unit = (byte1 & 7) << 18 | (byte2 & 63) << 12 | byte3 << 6 | byte4; + unit -= 65536; + units.push(unit >>> 10 & 1023 | 55296); + units.push(56320 | unit & 1023); + } + } + } + } else { + units.push(65533); + } + if (units.length >= 4096) { + result += fromCharCode.apply(String, units); + units.length = 0; + } + } + if (units.length > 0) { + result += fromCharCode.apply(String, units); + } + return result; + } + function readArray(length) { + let array = new Array(length); + for (let i = 0; i < length; i++) { + array[i] = read(); + } + if (currentUnpackr.freezeData) + return Object.freeze(array); + return array; + } + function readMap(length) { + if (currentUnpackr.mapsAsObjects) { + let object = {}; + for (let i = 0; i < length; i++) { + let key = readKey(); + if (key === "__proto__") + key = "__proto_"; + object[key] = read(); + } + return object; + } else { + let map = /* @__PURE__ */ new Map(); + for (let i = 0; i < length; i++) { + map.set(read(), read()); + } + return map; + } + } + var fromCharCode = String.fromCharCode; + function longStringInJS(length) { + let start = position$1; + let bytes = new Array(length); + for (let i = 0; i < length; i++) { + const byte = src[position$1++]; + if ((byte & 128) > 0) { + position$1 = start; + return; + } + bytes[i] = byte; + } + return fromCharCode.apply(String, bytes); + } + function shortStringInJS(length) { + if (length < 4) { + if (length < 2) { + if (length === 0) + return ""; + else { + let a = src[position$1++]; + if ((a & 128) > 1) { + position$1 -= 1; + return; + } + return fromCharCode(a); + } + } else { + let a = src[position$1++]; + let b = src[position$1++]; + if ((a & 128) > 0 || (b & 128) > 0) { + position$1 -= 2; + return; + } + if (length < 3) + return fromCharCode(a, b); + let c = src[position$1++]; + if ((c & 128) > 0) { + position$1 -= 3; + return; + } + return fromCharCode(a, b, c); + } + } else { + let a = src[position$1++]; + let b = src[position$1++]; + let c = src[position$1++]; + let d = src[position$1++]; + if ((a & 128) > 0 || (b & 128) > 0 || (c & 128) > 0 || (d & 128) > 0) { + position$1 -= 4; + return; + } + if (length < 6) { + if (length === 4) + return fromCharCode(a, b, c, d); + else { + let e = src[position$1++]; + if ((e & 128) > 0) { + position$1 -= 5; + return; + } + return fromCharCode(a, b, c, d, e); + } + } else if (length < 8) { + let e = src[position$1++]; + let f = src[position$1++]; + if ((e & 128) > 0 || (f & 128) > 0) { + position$1 -= 6; + return; + } + if (length < 7) + return fromCharCode(a, b, c, d, e, f); + let g = src[position$1++]; + if ((g & 128) > 0) { + position$1 -= 7; + return; + } + return fromCharCode(a, b, c, d, e, f, g); + } else { + let e = src[position$1++]; + let f = src[position$1++]; + let g = src[position$1++]; + let h = src[position$1++]; + if ((e & 128) > 0 || (f & 128) > 0 || (g & 128) > 0 || (h & 128) > 0) { + position$1 -= 8; + return; + } + if (length < 10) { + if (length === 8) + return fromCharCode(a, b, c, d, e, f, g, h); + else { + let i = src[position$1++]; + if ((i & 128) > 0) { + position$1 -= 9; + return; + } + return fromCharCode(a, b, c, d, e, f, g, h, i); + } + } else if (length < 12) { + let i = src[position$1++]; + let j = src[position$1++]; + if ((i & 128) > 0 || (j & 128) > 0) { + position$1 -= 10; + return; + } + if (length < 11) + return fromCharCode(a, b, c, d, e, f, g, h, i, j); + let k = src[position$1++]; + if ((k & 128) > 0) { + position$1 -= 11; + return; + } + return fromCharCode(a, b, c, d, e, f, g, h, i, j, k); + } else { + let i = src[position$1++]; + let j = src[position$1++]; + let k = src[position$1++]; + let l2 = src[position$1++]; + if ((i & 128) > 0 || (j & 128) > 0 || (k & 128) > 0 || (l2 & 128) > 0) { + position$1 -= 12; + return; + } + if (length < 14) { + if (length === 12) + return fromCharCode(a, b, c, d, e, f, g, h, i, j, k, l2); + else { + let m = src[position$1++]; + if ((m & 128) > 0) { + position$1 -= 13; + return; + } + return fromCharCode(a, b, c, d, e, f, g, h, i, j, k, l2, m); + } + } else { + let m = src[position$1++]; + let n = src[position$1++]; + if ((m & 128) > 0 || (n & 128) > 0) { + position$1 -= 14; + return; + } + if (length < 15) + return fromCharCode(a, b, c, d, e, f, g, h, i, j, k, l2, m, n); + let o = src[position$1++]; + if ((o & 128) > 0) { + position$1 -= 15; + return; + } + return fromCharCode(a, b, c, d, e, f, g, h, i, j, k, l2, m, n, o); + } + } + } + } + } + function readOnlyJSString() { + let token = src[position$1++]; + let length; + if (token < 192) { + length = token - 160; + } else { + switch (token) { + case 217: + length = src[position$1++]; + break; + case 218: + length = dataView.getUint16(position$1); + position$1 += 2; + break; + case 219: + length = dataView.getUint32(position$1); + position$1 += 4; + break; + default: + throw new Error("Expected string"); + } + } + return readStringJS(length); + } + function readBin(length) { + return currentUnpackr.copyBuffers ? ( + // specifically use the copying slice (not the node one) + Uint8Array.prototype.slice.call(src, position$1, position$1 += length) + ) : src.subarray(position$1, position$1 += length); + } + function readExt(length) { + let type = src[position$1++]; + if (currentExtensions[type]) { + let end; + return currentExtensions[type](src.subarray(position$1, end = position$1 += length), (readPosition) => { + position$1 = readPosition; + try { + return read(); + } finally { + position$1 = end; + } + }); + } else + throw new Error("Unknown extension type " + type); + } + var keyCache = new Array(4096); + function readKey() { + let length = src[position$1++]; + if (length >= 160 && length < 192) { + length = length - 160; + if (srcStringEnd >= position$1) + return srcString.slice(position$1 - srcStringStart, (position$1 += length) - srcStringStart); + else if (!(srcStringEnd == 0 && srcEnd < 180)) + return readFixedString(length); + } else { + position$1--; + return asSafeString(read()); + } + let key = (length << 5 ^ (length > 1 ? dataView.getUint16(position$1) : length > 0 ? src[position$1] : 0)) & 4095; + let entry = keyCache[key]; + let checkPosition = position$1; + let end = position$1 + length - 3; + let chunk; + let i = 0; + if (entry && entry.bytes == length) { + while (checkPosition < end) { + chunk = dataView.getUint32(checkPosition); + if (chunk != entry[i++]) { + checkPosition = 1879048192; + break; + } + checkPosition += 4; + } + end += 3; + while (checkPosition < end) { + chunk = src[checkPosition++]; + if (chunk != entry[i++]) { + checkPosition = 1879048192; + break; + } + } + if (checkPosition === end) { + position$1 = checkPosition; + return entry.string; + } + end -= 3; + checkPosition = position$1; + } + entry = []; + keyCache[key] = entry; + entry.bytes = length; + while (checkPosition < end) { + chunk = dataView.getUint32(checkPosition); + entry.push(chunk); + checkPosition += 4; + } + end += 3; + while (checkPosition < end) { + chunk = src[checkPosition++]; + entry.push(chunk); + } + let string = length < 16 ? shortStringInJS(length) : longStringInJS(length); + if (string != null) + return entry.string = string; + return entry.string = readFixedString(length); + } + function asSafeString(property) { + if (typeof property === "string") return property; + if (typeof property === "number" || typeof property === "boolean" || typeof property === "bigint") return property.toString(); + if (property == null) return property + ""; + if (currentUnpackr.allowArraysInMapKeys && Array.isArray(property) && property.flat().every((item) => ["string", "number", "boolean", "bigint"].includes(typeof item))) { + return property.flat().toString(); + } + throw new Error(`Invalid property type for record: ${typeof property}`); + } + var recordDefinition = (id, highByte) => { + let structure = read().map(asSafeString); + let firstByte = id; + if (highByte !== void 0) { + id = id < 32 ? -((highByte << 5) + id) : (highByte << 5) + id; + structure.highByte = highByte; + } + let existingStructure = currentStructures[id]; + if (existingStructure && (existingStructure.isShared || sequentialMode)) { + (currentStructures.restoreStructures || (currentStructures.restoreStructures = []))[id] = existingStructure; + } + currentStructures[id] = structure; + structure.read = createStructureReader(structure, firstByte); + return (structure.read0 || structure.read)(); + }; + currentExtensions[0] = () => { + }; + currentExtensions[0].noBuffer = true; + currentExtensions[66] = (data) => { + let headLength = data.byteLength % 8 || 8; + let head = BigInt(data[0] & 128 ? data[0] - 256 : data[0]); + for (let i = 1; i < headLength; i++) { + head <<= BigInt(8); + head += BigInt(data[i]); + } + if (data.byteLength !== headLength) { + let view = new DataView(data.buffer, data.byteOffset, data.byteLength); + let decode2 = (start, end) => { + let length = end - start; + if (length <= 40) { + let out = view.getBigUint64(start); + for (let i = start + 8; i < end; i += 8) { + out <<= BigInt(64); + out |= view.getBigUint64(i); + } + return out; + } + let middle = start + (length >> 4 << 3); + let left = decode2(start, middle); + let right = decode2(middle, end); + return left << BigInt((end - middle) * 8) | right; + }; + head = head << BigInt((view.byteLength - headLength) * 8) | decode2(headLength, view.byteLength); + } + return head; + }; + var errors = { + Error, + EvalError, + RangeError, + ReferenceError, + SyntaxError, + TypeError, + URIError, + AggregateError: typeof AggregateError === "function" ? AggregateError : null + }; + currentExtensions[101] = () => { + let data = read(); + if (!errors[data[0]]) { + let error = Error(data[1], { cause: data[2] }); + error.name = data[0]; + return error; + } + return errors[data[0]](data[1], { cause: data[2] }); + }; + currentExtensions[105] = (data) => { + if (currentUnpackr.structuredClone === false) throw new Error("Structured clone extension is disabled"); + let id = dataView.getUint32(position$1 - 4); + if (!referenceMap) + referenceMap = /* @__PURE__ */ new Map(); + let token = src[position$1]; + let target2; + if (token >= 144 && token < 160 || token == 220 || token == 221) + target2 = []; + else if (token >= 128 && token < 144 || token == 222 || token == 223) + target2 = /* @__PURE__ */ new Map(); + else if ((token >= 199 && token <= 201 || token >= 212 && token <= 216) && src[position$1 + 1] === 115) + target2 = /* @__PURE__ */ new Set(); + else + target2 = {}; + let refEntry = { target: target2 }; + referenceMap.set(id, refEntry); + let targetProperties = read(); + if (!refEntry.used) { + return refEntry.target = targetProperties; + } else { + Object.assign(target2, targetProperties); + } + if (target2 instanceof Map) + for (let [k, v] of targetProperties.entries()) target2.set(k, v); + if (target2 instanceof Set) + for (let i of Array.from(targetProperties)) target2.add(i); + return target2; + }; + currentExtensions[112] = (data) => { + if (currentUnpackr.structuredClone === false) throw new Error("Structured clone extension is disabled"); + let id = dataView.getUint32(position$1 - 4); + let refEntry = referenceMap.get(id); + refEntry.used = true; + return refEntry.target; + }; + currentExtensions[115] = () => new Set(read()); + var typedArrays = ["Int8", "Uint8", "Uint8Clamped", "Int16", "Uint16", "Int32", "Uint32", "Float32", "Float64", "BigInt64", "BigUint64"].map((type) => type + "Array"); + var glbl = typeof globalThis === "object" ? globalThis : window; + currentExtensions[116] = (data) => { + let typeCode = data[0]; + let buffer = Uint8Array.prototype.slice.call(data, 1).buffer; + let typedArrayName = typedArrays[typeCode]; + if (!typedArrayName) { + if (typeCode === 16) return buffer; + if (typeCode === 17) return new DataView(buffer); + throw new Error("Could not find typed array for code " + typeCode); + } + return new glbl[typedArrayName](buffer); + }; + currentExtensions[120] = () => { + let data = read(); + return new RegExp(data[0], data[1]); + }; + var TEMP_BUNDLE = []; + currentExtensions[98] = (data) => { + let dataSize = (data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3]; + let dataPosition = position$1; + position$1 += dataSize - data.length; + bundledStrings$1 = TEMP_BUNDLE; + bundledStrings$1 = [readOnlyJSString(), readOnlyJSString()]; + bundledStrings$1.position0 = 0; + bundledStrings$1.position1 = 0; + bundledStrings$1.postBundlePosition = position$1; + position$1 = dataPosition; + return read(); + }; + currentExtensions[255] = (data) => { + if (data.length == 4) + return new Date((data[0] * 16777216 + (data[1] << 16) + (data[2] << 8) + data[3]) * 1e3); + else if (data.length == 8) + return new Date( + ((data[0] << 22) + (data[1] << 14) + (data[2] << 6) + (data[3] >> 2)) / 1e6 + ((data[3] & 3) * 4294967296 + data[4] * 16777216 + (data[5] << 16) + (data[6] << 8) + data[7]) * 1e3 + ); + else if (data.length == 12) + return new Date( + ((data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3]) / 1e6 + ((data[4] & 128 ? -281474976710656 : 0) + data[6] * 1099511627776 + data[7] * 4294967296 + data[8] * 16777216 + (data[9] << 16) + (data[10] << 8) + data[11]) * 1e3 + ); + else + return /* @__PURE__ */ new Date("invalid"); + }; + function saveState(callback) { + if (currentUnpackr && currentUnpackr._onSaveState) + currentUnpackr._onSaveState(); + let savedSrcEnd = srcEnd; + let savedPosition = position$1; + let savedStringPosition = stringPosition; + let savedSrcStringStart = srcStringStart; + let savedSrcStringEnd = srcStringEnd; + let savedSrcString = srcString; + let savedStrings = strings; + let savedReferenceMap = referenceMap; + let savedBundledStrings = bundledStrings$1; + let savedSrc = new Uint8Array(src.slice(0, srcEnd)); + let savedStructures = currentStructures; + let savedStructuresContents = currentStructures.slice(0, currentStructures.length); + let savedPackr = currentUnpackr; + let savedSequentialMode = sequentialMode; + let value = callback(); + srcEnd = savedSrcEnd; + position$1 = savedPosition; + stringPosition = savedStringPosition; + srcStringStart = savedSrcStringStart; + srcStringEnd = savedSrcStringEnd; + srcString = savedSrcString; + strings = savedStrings; + referenceMap = savedReferenceMap; + bundledStrings$1 = savedBundledStrings; + src = savedSrc; + sequentialMode = savedSequentialMode; + currentStructures = savedStructures; + currentStructures.splice(0, currentStructures.length, ...savedStructuresContents); + currentUnpackr = savedPackr; + dataView = new DataView(src.buffer, src.byteOffset, src.byteLength); + return value; + } + function clearSource() { + src = null; + referenceMap = null; + currentStructures = null; + } + function addExtension$1(extension) { + if (extension.unpack) + currentExtensions[extension.type] = extension.unpack; + else + currentExtensions[extension.type] = extension; + } + var mult10 = new Array(147); + for (let i = 0; i < 256; i++) { + mult10[i] = +("1e" + Math.floor(45.15 - i * 0.30103)); + } + var Decoder = Unpackr; + var defaultUnpackr = new Unpackr({ useRecords: false }); + var unpack = defaultUnpackr.unpack; + var unpackMultiple = defaultUnpackr.unpackMultiple; + var decode = defaultUnpackr.unpack; + var FLOAT32_OPTIONS = { + NEVER: 0, + ALWAYS: 1, + DECIMAL_ROUND: 3, + DECIMAL_FIT: 4 + }; + var f32Array = new Float32Array(1); + var u8Array = new Uint8Array(f32Array.buffer, 0, 4); + function roundFloat32(float32Number) { + f32Array[0] = float32Number; + let multiplier = mult10[(u8Array[3] & 127) << 1 | u8Array[2] >> 7]; + return (multiplier * float32Number + (float32Number > 0 ? 0.5 : -0.5) >> 0) / multiplier; + } + Unpackr.SUPPORTS_STRUCT_HOOKS = true; + var textEncoder; + try { + textEncoder = new TextEncoder(); + } catch (error) { + } + var extensions; + var extensionClasses; + var hasNodeBuffer = typeof Buffer !== "undefined"; + var ByteArrayAllocate = hasNodeBuffer ? function(length) { + return Buffer.allocUnsafeSlow(length); + } : Uint8Array; + var ByteArray = hasNodeBuffer ? Buffer : Uint8Array; + var MAX_BUFFER_SIZE = hasNodeBuffer ? 4294967296 : 2144337920; + var target; + var keysTarget; + var targetView; + var position = 0; + var safeEnd; + var bundledStrings = null; + var MAX_BUNDLE_SIZE = 21760; + var hasNonLatin = /[\u0080-\uFFFF]/; + var RECORD_SYMBOL = Symbol("record-id"); + var Packr = class extends Unpackr { + constructor(options) { + super(options); + this.offset = 0; + let start; + let hasSharedUpdate; + let structures; + let referenceMap2; + let encodeUtf8 = ByteArray.prototype.utf8Write ? function(string, position2) { + return target.utf8Write(string, position2, target.byteLength - position2); + } : textEncoder && textEncoder.encodeInto ? function(string, position2) { + return textEncoder.encodeInto(string, target.subarray(position2)).written; + } : false; + let packr = this; + if (!options) + options = {}; + let isSequential = options && options.sequential; + let hasSharedStructures = options.structures || options.saveStructures; + let maxSharedStructures = options.maxSharedStructures; + if (maxSharedStructures == null) + maxSharedStructures = hasSharedStructures ? 32 : 0; + if (maxSharedStructures > 8160) + throw new Error("Maximum maxSharedStructure is 8160"); + if (options.structuredClone && options.moreTypes == void 0) { + this.moreTypes = true; + } + let maxOwnStructures = options.maxOwnStructures; + if (maxOwnStructures == null) + maxOwnStructures = hasSharedStructures ? 32 : 64; + if (!this.structures && options.useRecords != false) + this.structures = []; + let useTwoByteRecords = maxSharedStructures > 32 || maxOwnStructures + maxSharedStructures > 64; + let sharedLimitId = maxSharedStructures + 64; + let maxStructureId = maxSharedStructures + maxOwnStructures + 64; + if (maxStructureId > 8256) { + throw new Error("Maximum maxSharedStructure + maxOwnStructure is 8192"); + } + let recordIdsToRemove = []; + let transitionsCount = 0; + let serializationsSinceTransitionRebuild = 0; + this.pack = this.encode = function(value, encodeOptions) { + if (!target) { + target = new ByteArrayAllocate(8192); + targetView = target.dataView || (target.dataView = new DataView(target.buffer, 0, 8192)); + position = 0; + } + safeEnd = target.length - 10; + if (safeEnd - position < 2048) { + target = new ByteArrayAllocate(target.length); + targetView = target.dataView || (target.dataView = new DataView(target.buffer, 0, target.length)); + safeEnd = target.length - 10; + position = 0; + } else + position = position + 7 & 2147483640; + start = position; + if (encodeOptions & RESERVE_START_SPACE) position += encodeOptions & 255; + referenceMap2 = packr.structuredClone ? /* @__PURE__ */ new Map() : null; + if (packr.bundleStrings && typeof value !== "string") { + bundledStrings = []; + bundledStrings.size = Infinity; + } else + bundledStrings = null; + structures = packr.structures; + if (structures) { + if (structures.uninitialized) + structures = packr._mergeStructures(packr.getStructures()); + let sharedLength = structures.sharedLength || 0; + if (sharedLength > maxSharedStructures) { + throw new Error("Shared structures is larger than maximum shared structures, try increasing maxSharedStructures to " + structures.sharedLength); + } + if (!structures.transitions) { + structures.transitions = /* @__PURE__ */ Object.create(null); + for (let i = 0; i < sharedLength; i++) { + let keys = structures[i]; + if (!keys) + continue; + let nextTransition, transition = structures.transitions; + for (let j = 0, l2 = keys.length; j < l2; j++) { + let key = keys[j]; + nextTransition = transition[key]; + if (!nextTransition) { + nextTransition = transition[key] = /* @__PURE__ */ Object.create(null); + } + transition = nextTransition; + } + transition[RECORD_SYMBOL] = i + 64; + } + this.lastNamedStructuresLength = sharedLength; + } + if (!isSequential) { + structures.nextId = sharedLength + 64; + } + } + if (hasSharedUpdate) + hasSharedUpdate = false; + let encodingError; + try { + if (packr._writeStruct && value && typeof value === "object") { + if (value.constructor === Object) writeStruct(value); + else if (value.constructor !== Map && !Array.isArray(value) && !extensionClasses.some((extClass) => value instanceof extClass)) { + writeStruct(value.toJSON ? value.toJSON() : value); + } else pack2(value); + } else + pack2(value); + let lastBundle = bundledStrings; + if (bundledStrings) + writeBundles(start, pack2, 0); + if (referenceMap2 && referenceMap2.idsToInsert) { + let idsToInsert = referenceMap2.idsToInsert.sort((a, b) => a.offset > b.offset ? 1 : -1); + let i = idsToInsert.length; + let incrementPosition = -1; + while (lastBundle && i > 0) { + let insertionPoint = idsToInsert[--i].offset + start; + if (insertionPoint < lastBundle.stringsPosition + start && incrementPosition === -1) + incrementPosition = 0; + if (insertionPoint > lastBundle.position + start) { + if (incrementPosition >= 0) + incrementPosition += 6; + } else { + if (incrementPosition >= 0) { + targetView.setUint32( + lastBundle.position + start, + targetView.getUint32(lastBundle.position + start) + incrementPosition + ); + incrementPosition = -1; + } + lastBundle = lastBundle.previous; + i++; + } + } + if (incrementPosition >= 0 && lastBundle) { + targetView.setUint32( + lastBundle.position + start, + targetView.getUint32(lastBundle.position + start) + incrementPosition + ); + } + position += idsToInsert.length * 6; + if (position > safeEnd) + makeRoom(position); + packr.offset = position; + let serialized = insertIds(target.subarray(start, position), idsToInsert); + referenceMap2 = null; + return serialized; + } + packr.offset = position; + if (encodeOptions & REUSE_BUFFER_MODE) { + target.start = start; + target.end = position; + return target; + } + return target.subarray(start, position); + } catch (error) { + encodingError = error; + throw error; + } finally { + if (structures) { + resetStructures(); + if (hasSharedUpdate && packr.saveStructures) { + let sharedLength = structures.sharedLength || 0; + let returnBuffer = target.subarray(start, position); + let newSharedData = (packr._prepareStructures || prepareStructures)(structures, packr); + if (!encodingError) { + if (packr.saveStructures(newSharedData, newSharedData.isCompatible) === false) { + structures.uninitialized = true; + return packr.pack(value, encodeOptions); + } + packr.lastNamedStructuresLength = sharedLength; + if (target.length > 1073741824) target = null; + return returnBuffer; + } + } + } + if (target.length > 1073741824) target = null; + if (encodeOptions & RESET_BUFFER_MODE) + position = start; + } + }; + const resetStructures = () => { + if (serializationsSinceTransitionRebuild < 10) + serializationsSinceTransitionRebuild++; + let sharedLength = structures.sharedLength || 0; + if (structures.length > sharedLength && !isSequential) + structures.length = sharedLength; + if (transitionsCount > 1e4) { + structures.transitions = null; + serializationsSinceTransitionRebuild = 0; + transitionsCount = 0; + if (recordIdsToRemove.length > 0) + recordIdsToRemove = []; + } else if (recordIdsToRemove.length > 0 && !isSequential) { + for (let i = 0, l2 = recordIdsToRemove.length; i < l2; i++) { + recordIdsToRemove[i][RECORD_SYMBOL] = 0; + } + recordIdsToRemove = []; + } + }; + const packArray = (value) => { + var length = value.length; + if (length < 16) { + target[position++] = 144 | length; + } else if (length < 65536) { + target[position++] = 220; + target[position++] = length >> 8; + target[position++] = length & 255; + } else { + target[position++] = 221; + targetView.setUint32(position, length); + position += 4; + } + for (let i = 0; i < length; i++) { + pack2(value[i]); + } + }; + const pack2 = (value) => { + if (position > safeEnd) + target = makeRoom(position); + var type = typeof value; + var length; + if (type === "string") { + let strLength = value.length; + if (bundledStrings && strLength >= 4 && strLength < 4096) { + if ((bundledStrings.size += strLength) > MAX_BUNDLE_SIZE) { + let extStart; + let maxBytes2 = (bundledStrings[0] ? bundledStrings[0].length * 3 + bundledStrings[1].length : 0) + 10; + if (position + maxBytes2 > safeEnd) + target = makeRoom(position + maxBytes2); + let lastBundle; + if (bundledStrings.position) { + lastBundle = bundledStrings; + target[position] = 200; + position += 3; + target[position++] = 98; + extStart = position - start; + position += 4; + writeBundles(start, pack2, 0); + targetView.setUint16(extStart + start - 3, position - start - extStart); + } else { + target[position++] = 214; + target[position++] = 98; + extStart = position - start; + position += 4; + } + bundledStrings = ["", ""]; + bundledStrings.previous = lastBundle; + bundledStrings.size = 0; + bundledStrings.position = extStart; + } + let twoByte = hasNonLatin.test(value); + bundledStrings[twoByte ? 0 : 1] += value; + target[position++] = 193; + pack2(twoByte ? -strLength : strLength); + return; + } + let headerSize; + if (strLength < 32) { + headerSize = 1; + } else if (strLength < 256) { + headerSize = 2; + } else if (strLength < 65536) { + headerSize = 3; + } else { + headerSize = 5; + } + let maxBytes = strLength * 3; + if (position + maxBytes > safeEnd) + target = makeRoom(position + maxBytes); + if (strLength < 64 || !encodeUtf8) { + let i, c1, c2, strPosition = position + headerSize; + for (i = 0; i < strLength; i++) { + c1 = value.charCodeAt(i); + if (c1 < 128) { + target[strPosition++] = c1; + } else if (c1 < 2048) { + target[strPosition++] = c1 >> 6 | 192; + target[strPosition++] = c1 & 63 | 128; + } else if ((c1 & 64512) === 55296 && ((c2 = value.charCodeAt(i + 1)) & 64512) === 56320) { + c1 = 65536 + ((c1 & 1023) << 10) + (c2 & 1023); + i++; + target[strPosition++] = c1 >> 18 | 240; + target[strPosition++] = c1 >> 12 & 63 | 128; + target[strPosition++] = c1 >> 6 & 63 | 128; + target[strPosition++] = c1 & 63 | 128; + } else { + target[strPosition++] = c1 >> 12 | 224; + target[strPosition++] = c1 >> 6 & 63 | 128; + target[strPosition++] = c1 & 63 | 128; + } + } + length = strPosition - position - headerSize; + } else { + length = encodeUtf8(value, position + headerSize); + } + if (length < 32) { + target[position++] = 160 | length; + } else if (length < 256) { + if (headerSize < 2) { + target.copyWithin(position + 2, position + 1, position + 1 + length); + } + target[position++] = 217; + target[position++] = length; + } else if (length < 65536) { + if (headerSize < 3) { + target.copyWithin(position + 3, position + 2, position + 2 + length); + } + target[position++] = 218; + target[position++] = length >> 8; + target[position++] = length & 255; + } else { + if (headerSize < 5) { + target.copyWithin(position + 5, position + 3, position + 3 + length); + } + target[position++] = 219; + targetView.setUint32(position, length); + position += 4; + } + position += length; + } else if (type === "number") { + if (value >>> 0 === value) { + if (value < 32 || value < 128 && this.useRecords === false || value < 64 && !this._writeStruct) { + target[position++] = value; + } else if (value < 256) { + target[position++] = 204; + target[position++] = value; + } else if (value < 65536) { + target[position++] = 205; + target[position++] = value >> 8; + target[position++] = value & 255; + } else { + target[position++] = 206; + targetView.setUint32(position, value); + position += 4; + } + } else if (value >> 0 === value) { + if (value >= -32) { + target[position++] = 256 + value; + } else if (value >= -128) { + target[position++] = 208; + target[position++] = value + 256; + } else if (value >= -32768) { + target[position++] = 209; + targetView.setInt16(position, value); + position += 2; + } else { + target[position++] = 210; + targetView.setInt32(position, value); + position += 4; + } + } else { + let useFloat32; + if ((useFloat32 = this.useFloat32) > 0 && value < 4294967296 && value >= -2147483648) { + target[position++] = 202; + targetView.setFloat32(position, value); + let xShifted; + if (useFloat32 < 4 || // this checks for rounding of numbers that were encoded in 32-bit float to nearest significant decimal digit that could be preserved + (xShifted = value * mult10[(target[position] & 127) << 1 | target[position + 1] >> 7]) >> 0 === xShifted) { + position += 4; + return; + } else + position--; + } + target[position++] = 203; + targetView.setFloat64(position, value); + position += 8; + } + } else if (type === "object" || type === "function") { + if (!value) + target[position++] = 192; + else { + if (referenceMap2) { + let referee = referenceMap2.get(value); + if (referee) { + if (!referee.id) { + let idsToInsert = referenceMap2.idsToInsert || (referenceMap2.idsToInsert = []); + referee.id = idsToInsert.push(referee); + } + target[position++] = 214; + target[position++] = 112; + targetView.setUint32(position, referee.id); + position += 4; + return; + } else + referenceMap2.set(value, { offset: position - start }); + } + let constructor = value.constructor; + if (constructor === Object) { + writeObject(value); + } else if (constructor === Array) { + packArray(value); + } else if (constructor === Map) { + if (this.mapAsEmptyObject) target[position++] = 128; + else { + length = value.size; + if (length < 16) { + target[position++] = 128 | length; + } else if (length < 65536) { + target[position++] = 222; + target[position++] = length >> 8; + target[position++] = length & 255; + } else { + target[position++] = 223; + targetView.setUint32(position, length); + position += 4; + } + for (let [key, entryValue] of value) { + pack2(key); + pack2(entryValue); + } + } + } else { + for (let i = 0, l2 = extensions.length; i < l2; i++) { + let extensionClass = extensionClasses[i]; + if (value instanceof extensionClass) { + let extension = extensions[i]; + if (extension.write) { + if (extension.type) { + target[position++] = 212; + target[position++] = extension.type; + target[position++] = 0; + } + let writeResult = extension.write.call(this, value); + if (writeResult === value) { + if (Array.isArray(value)) { + packArray(value); + } else { + writeObject(value); + } + } else { + pack2(writeResult); + } + return; + } + let currentTarget = target; + let currentTargetView = targetView; + let currentPosition = position; + target = null; + let result; + try { + result = extension.pack.call(this, value, (size) => { + target = currentTarget; + currentTarget = null; + position += size; + if (position > safeEnd) + makeRoom(position); + return { + target, + targetView, + position: position - size + }; + }, pack2); + } finally { + if (currentTarget) { + target = currentTarget; + targetView = currentTargetView; + position = currentPosition; + safeEnd = target.length - 10; + } + } + if (result) { + if (result.length + position > safeEnd) + makeRoom(result.length + position); + position = writeExtensionData(result, target, position, extension.type); + } + return; + } + } + if (Array.isArray(value)) { + packArray(value); + } else { + if (value.toJSON) { + const json = value.toJSON(); + if (json !== value) + return pack2(json); + } + if (type === "function") + return pack2(this.writeFunction && this.writeFunction(value)); + writeObject(value); + } + } + } + } else if (type === "boolean") { + target[position++] = value ? 195 : 194; + } else if (type === "bigint") { + if (value < 9223372036854776e3 && value >= -9223372036854776e3) { + target[position++] = 211; + targetView.setBigInt64(position, value); + } else if (value < 18446744073709552e3 && value > 0) { + target[position++] = 207; + targetView.setBigUint64(position, value); + } else { + if (this.largeBigIntToFloat) { + target[position++] = 203; + targetView.setFloat64(position, Number(value)); + } else if (this.largeBigIntToString) { + return pack2(value.toString()); + } else if (this.useBigIntExtension || this.moreTypes) { + let empty = value < 0 ? BigInt(-1) : BigInt(0); + let array; + if (value >> BigInt(65536) === empty) { + let mask = BigInt(18446744073709552e3) - BigInt(1); + let chunks = []; + while (true) { + chunks.push(value & mask); + if (value >> BigInt(63) === empty) break; + value >>= BigInt(64); + } + array = new Uint8Array(new BigUint64Array(chunks).buffer); + array.reverse(); + } else { + let invert = value < 0; + let string = (invert ? ~value : value).toString(16); + if (string.length % 2) { + string = "0" + string; + } else if (parseInt(string.charAt(0), 16) >= 8) { + string = "00" + string; + } + if (hasNodeBuffer) { + array = Buffer.from(string, "hex"); + } else { + array = new Uint8Array(string.length / 2); + for (let i = 0; i < array.length; i++) { + array[i] = parseInt(string.slice(i * 2, i * 2 + 2), 16); + } + } + if (invert) { + for (let i = 0; i < array.length; i++) array[i] = ~array[i]; + } + } + if (array.length + position > safeEnd) + makeRoom(array.length + position); + position = writeExtensionData(array, target, position, 66); + return; + } else { + throw new RangeError(value + " was too large to fit in MessagePack 64-bit integer format, use useBigIntExtension, or set largeBigIntToFloat to convert to float-64, or set largeBigIntToString to convert to string"); + } + } + position += 8; + } else if (type === "undefined") { + if (this.encodeUndefinedAsNil) + target[position++] = 192; + else { + target[position++] = 212; + target[position++] = 0; + target[position++] = 0; + } + } else { + throw new Error("Unknown type: " + type); + } + }; + const writePlainObject = this.variableMapSize || this.coercibleKeyAsNumber || this.skipValues ? (object) => { + let keys; + if (this.skipValues) { + keys = []; + for (let key2 in object) { + if ((typeof object.hasOwnProperty !== "function" || object.hasOwnProperty(key2)) && !this.skipValues.includes(object[key2])) + keys.push(key2); + } + } else { + keys = Object.keys(object); + } + let length = keys.length; + if (length < 16) { + target[position++] = 128 | length; + } else if (length < 65536) { + target[position++] = 222; + target[position++] = length >> 8; + target[position++] = length & 255; + } else { + target[position++] = 223; + targetView.setUint32(position, length); + position += 4; + } + let key; + if (this.coercibleKeyAsNumber) { + for (let i = 0; i < length; i++) { + key = keys[i]; + let num = Number(key); + pack2(isNaN(num) ? key : num); + pack2(object[key]); + } + } else { + for (let i = 0; i < length; i++) { + pack2(key = keys[i]); + pack2(object[key]); + } + } + } : (object) => { + target[position++] = 222; + let objectOffset = position - start; + position += 2; + let size = 0; + for (let key in object) { + if (typeof object.hasOwnProperty !== "function" || object.hasOwnProperty(key)) { + pack2(key); + pack2(object[key]); + size++; + } + } + if (size > 65535) { + throw new Error('Object is too large to serialize with fast 16-bit map size, use the "variableMapSize" option to serialize this object'); + } + target[objectOffset++ + start] = size >> 8; + target[objectOffset + start] = size & 255; + }; + const writeRecord = this.useRecords === false ? writePlainObject : options.progressiveRecords && !useTwoByteRecords ? ( + // this is about 2% faster for highly stable structures, since it only requires one for-in loop (but much more expensive when new structure needs to be written) + (object) => { + let nextTransition, transition = structures.transitions || (structures.transitions = /* @__PURE__ */ Object.create(null)); + let objectOffset = position++ - start; + let wroteKeys; + for (let key in object) { + if (typeof object.hasOwnProperty !== "function" || object.hasOwnProperty(key)) { + nextTransition = transition[key]; + if (nextTransition) + transition = nextTransition; + else { + let keys = Object.keys(object); + let lastTransition = transition; + transition = structures.transitions; + let newTransitions = 0; + for (let i = 0, l2 = keys.length; i < l2; i++) { + let key2 = keys[i]; + nextTransition = transition[key2]; + if (!nextTransition) { + nextTransition = transition[key2] = /* @__PURE__ */ Object.create(null); + newTransitions++; + } + transition = nextTransition; + } + if (objectOffset + start + 1 == position) { + position--; + newRecord(transition, keys, newTransitions); + } else + insertNewRecord(transition, keys, objectOffset, newTransitions); + wroteKeys = true; + transition = lastTransition[key]; + } + pack2(object[key]); + } + } + if (!wroteKeys) { + let recordId = transition[RECORD_SYMBOL]; + if (recordId) + target[objectOffset + start] = recordId; + else + insertNewRecord(transition, Object.keys(object), objectOffset, 0); + } + } + ) : (object) => { + let nextTransition, transition = structures.transitions || (structures.transitions = /* @__PURE__ */ Object.create(null)); + let newTransitions = 0; + for (let key in object) if (typeof object.hasOwnProperty !== "function" || object.hasOwnProperty(key)) { + nextTransition = transition[key]; + if (!nextTransition) { + nextTransition = transition[key] = /* @__PURE__ */ Object.create(null); + newTransitions++; + } + transition = nextTransition; + } + let recordId = transition[RECORD_SYMBOL]; + if (recordId) { + if (recordId >= 96 && useTwoByteRecords) { + target[position++] = ((recordId -= 96) & 31) + 96; + target[position++] = recordId >> 5; + } else + target[position++] = recordId; + } else { + newRecord(transition, transition.__keys__ || Object.keys(object), newTransitions); + } + for (let key in object) + if (typeof object.hasOwnProperty !== "function" || object.hasOwnProperty(key)) { + pack2(object[key]); + } + }; + const checkUseRecords = typeof this.useRecords == "function" && this.useRecords; + const writeObject = checkUseRecords ? (object) => { + checkUseRecords(object) ? writeRecord(object) : writePlainObject(object); + } : writeRecord; + const writeStruct = (object) => { + let newPosition = packr._writeStruct(object, target, start, position, structures, makeRoom, (value, newPosition2, notifySharedUpdate) => { + if (notifySharedUpdate) + return hasSharedUpdate = true; + position = newPosition2; + let startTarget = target; + pack2(value); + resetStructures(); + if (startTarget !== target) { + return { position, targetView, target }; + } + return position; + }); + if (newPosition === 0) + return writeObject(object); + position = newPosition; + }; + const makeRoom = (end) => { + let newSize; + if (end > 16777216) { + if (end - start > MAX_BUFFER_SIZE) + throw new Error("Packed buffer would be larger than maximum buffer size"); + newSize = Math.min( + MAX_BUFFER_SIZE, + Math.round(Math.max((end - start) * (end > 67108864 ? 1.25 : 2), 4194304) / 4096) * 4096 + ); + } else + newSize = (Math.max(end - start << 2, target.length - 1) >> 12) + 1 << 12; + let newBuffer = new ByteArrayAllocate(newSize); + targetView = newBuffer.dataView || (newBuffer.dataView = new DataView(newBuffer.buffer, 0, newSize)); + end = Math.min(end, target.length); + if (target.copy) + target.copy(newBuffer, 0, start, end); + else + newBuffer.set(target.slice(start, end)); + position -= start; + start = 0; + safeEnd = newBuffer.length - 10; + return target = newBuffer; + }; + const newRecord = (transition, keys, newTransitions) => { + let recordId = structures.nextId; + if (!recordId) + recordId = 64; + if (recordId < sharedLimitId && this.shouldShareStructure && !this.shouldShareStructure(keys)) { + recordId = structures.nextOwnId; + if (!(recordId < maxStructureId)) + recordId = sharedLimitId; + structures.nextOwnId = recordId + 1; + } else { + if (recordId >= maxStructureId) + recordId = sharedLimitId; + structures.nextId = recordId + 1; + } + let highByte = keys.highByte = recordId >= 96 && useTwoByteRecords ? recordId - 96 >> 5 : -1; + transition[RECORD_SYMBOL] = recordId; + transition.__keys__ = keys; + structures[recordId - 64] = keys; + if (recordId < sharedLimitId) { + keys.isShared = true; + structures.sharedLength = recordId - 63; + hasSharedUpdate = true; + if (highByte >= 0) { + target[position++] = (recordId & 31) + 96; + target[position++] = highByte; + } else { + target[position++] = recordId; + } + } else { + if (highByte >= 0) { + target[position++] = 213; + target[position++] = 114; + target[position++] = (recordId & 31) + 96; + target[position++] = highByte; + } else { + target[position++] = 212; + target[position++] = 114; + target[position++] = recordId; + } + if (newTransitions) + transitionsCount += serializationsSinceTransitionRebuild * newTransitions; + if (recordIdsToRemove.length >= maxOwnStructures) + recordIdsToRemove.shift()[RECORD_SYMBOL] = 0; + recordIdsToRemove.push(transition); + pack2(keys); + } + }; + const insertNewRecord = (transition, keys, insertionOffset, newTransitions) => { + let mainTarget = target; + let mainPosition = position; + let mainSafeEnd = safeEnd; + let mainStart = start; + target = keysTarget; + position = 0; + start = 0; + if (!target) + keysTarget = target = new ByteArrayAllocate(8192); + safeEnd = target.length - 10; + newRecord(transition, keys, newTransitions); + keysTarget = target; + let keysPosition = position; + target = mainTarget; + position = mainPosition; + safeEnd = mainSafeEnd; + start = mainStart; + if (keysPosition > 1) { + let newEnd = position + keysPosition - 1; + if (newEnd > safeEnd) + makeRoom(newEnd); + let insertionPosition = insertionOffset + start; + target.copyWithin(insertionPosition + keysPosition, insertionPosition + 1, position); + target.set(keysTarget.slice(0, keysPosition), insertionPosition); + position = newEnd; + } else { + target[insertionOffset + start] = keysTarget[0]; + } + }; + } + useBuffer(buffer) { + target = buffer; + target.dataView || (target.dataView = new DataView(target.buffer, target.byteOffset, target.byteLength)); + targetView = target.dataView; + position = 0; + } + set position(value) { + position = value; + } + get position() { + return position; + } + clearSharedData() { + if (this.structures) + this.structures = []; + if (this.typedStructs) + this.typedStructs = []; + } + }; + extensionClasses = [Date, Set, Error, RegExp, ArrayBuffer, Object.getPrototypeOf(Uint8Array.prototype).constructor, DataView, C1Type]; + extensions = [{ + pack(date, allocateForWrite, pack2) { + let seconds = date.getTime() / 1e3; + if ((this.useTimestamp32 || date.getMilliseconds() === 0) && seconds >= 0 && seconds < 4294967296) { + let { target: target2, targetView: targetView2, position: position2 } = allocateForWrite(6); + target2[position2++] = 214; + target2[position2++] = 255; + targetView2.setUint32(position2, seconds); + } else if (seconds > 0 && seconds < 4294967296) { + let { target: target2, targetView: targetView2, position: position2 } = allocateForWrite(10); + target2[position2++] = 215; + target2[position2++] = 255; + targetView2.setUint32(position2, date.getMilliseconds() * 4e6 + (seconds / 1e3 / 4294967296 >> 0)); + targetView2.setUint32(position2 + 4, seconds); + } else if (isNaN(seconds)) { + if (this.onInvalidDate) { + allocateForWrite(0); + return pack2(this.onInvalidDate()); + } + let { target: target2, targetView: targetView2, position: position2 } = allocateForWrite(3); + target2[position2++] = 212; + target2[position2++] = 255; + target2[position2++] = 255; + } else { + let { target: target2, targetView: targetView2, position: position2 } = allocateForWrite(15); + target2[position2++] = 199; + target2[position2++] = 12; + target2[position2++] = 255; + targetView2.setUint32(position2, date.getMilliseconds() * 1e6); + targetView2.setBigInt64(position2 + 4, BigInt(Math.floor(seconds))); + } + } + }, { + pack(set, allocateForWrite, pack2) { + if (this.setAsEmptyObject) { + allocateForWrite(0); + return pack2({}); + } + let array = Array.from(set); + let { target: target2, position: position2 } = allocateForWrite(this.moreTypes ? 3 : 0); + if (this.moreTypes) { + target2[position2++] = 212; + target2[position2++] = 115; + target2[position2++] = 0; + } + pack2(array); + } + }, { + pack(error, allocateForWrite, pack2) { + let { target: target2, position: position2 } = allocateForWrite(this.moreTypes ? 3 : 0); + if (this.moreTypes) { + target2[position2++] = 212; + target2[position2++] = 101; + target2[position2++] = 0; + } + pack2([error.name, error.message, error.cause]); + } + }, { + pack(regex, allocateForWrite, pack2) { + let { target: target2, position: position2 } = allocateForWrite(this.moreTypes ? 3 : 0); + if (this.moreTypes) { + target2[position2++] = 212; + target2[position2++] = 120; + target2[position2++] = 0; + } + pack2([regex.source, regex.flags]); + } + }, { + pack(arrayBuffer, allocateForWrite) { + if (this.moreTypes) + writeExtBuffer(arrayBuffer, 16, allocateForWrite); + else + writeBuffer(hasNodeBuffer ? Buffer.from(arrayBuffer) : new Uint8Array(arrayBuffer), allocateForWrite); + } + }, { + pack(typedArray, allocateForWrite) { + let constructor = typedArray.constructor; + if (constructor !== ByteArray && this.moreTypes) + writeExtBuffer(typedArray, typedArrays.indexOf(constructor.name), allocateForWrite); + else + writeBuffer(typedArray, allocateForWrite); + } + }, { + pack(arrayBuffer, allocateForWrite) { + if (this.moreTypes) + writeExtBuffer(arrayBuffer, 17, allocateForWrite); + else + writeBuffer(hasNodeBuffer ? Buffer.from(arrayBuffer) : new Uint8Array(arrayBuffer), allocateForWrite); + } + }, { + pack(c1, allocateForWrite) { + let { target: target2, position: position2 } = allocateForWrite(1); + target2[position2] = 193; + } + }]; + function writeExtBuffer(typedArray, type, allocateForWrite, encode2) { + let length = typedArray.byteLength; + if (length + 1 < 256) { + var { target: target2, position: position2 } = allocateForWrite(4 + length); + target2[position2++] = 199; + target2[position2++] = length + 1; + } else if (length + 1 < 65536) { + var { target: target2, position: position2 } = allocateForWrite(5 + length); + target2[position2++] = 200; + target2[position2++] = length + 1 >> 8; + target2[position2++] = length + 1 & 255; + } else { + var { target: target2, position: position2, targetView: targetView2 } = allocateForWrite(7 + length); + target2[position2++] = 201; + targetView2.setUint32(position2, length + 1); + position2 += 4; + } + target2[position2++] = 116; + target2[position2++] = type; + if (!typedArray.buffer) typedArray = new Uint8Array(typedArray); + target2.set(new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength), position2); + } + function writeBuffer(buffer, allocateForWrite) { + let length = buffer.byteLength; + var target2, position2; + if (length < 256) { + var { target: target2, position: position2 } = allocateForWrite(length + 2); + target2[position2++] = 196; + target2[position2++] = length; + } else if (length < 65536) { + var { target: target2, position: position2 } = allocateForWrite(length + 3); + target2[position2++] = 197; + target2[position2++] = length >> 8; + target2[position2++] = length & 255; + } else { + var { target: target2, position: position2, targetView: targetView2 } = allocateForWrite(length + 5); + target2[position2++] = 198; + targetView2.setUint32(position2, length); + position2 += 4; + } + target2.set(buffer, position2); + } + function writeExtensionData(result, target2, position2, type) { + let length = result.length; + switch (length) { + case 1: + target2[position2++] = 212; + break; + case 2: + target2[position2++] = 213; + break; + case 4: + target2[position2++] = 214; + break; + case 8: + target2[position2++] = 215; + break; + case 16: + target2[position2++] = 216; + break; + default: + if (length < 256) { + target2[position2++] = 199; + target2[position2++] = length; + } else if (length < 65536) { + target2[position2++] = 200; + target2[position2++] = length >> 8; + target2[position2++] = length & 255; + } else { + target2[position2++] = 201; + target2[position2++] = length >> 24; + target2[position2++] = length >> 16 & 255; + target2[position2++] = length >> 8 & 255; + target2[position2++] = length & 255; + } + } + target2[position2++] = type; + target2.set(result, position2); + position2 += length; + return position2; + } + function insertIds(serialized, idsToInsert) { + let nextId; + let distanceToMove = idsToInsert.length * 6; + let lastEnd = serialized.length - distanceToMove; + while (nextId = idsToInsert.pop()) { + let offset = nextId.offset; + let id = nextId.id; + serialized.copyWithin(offset + distanceToMove, offset, lastEnd); + distanceToMove -= 6; + let position2 = offset + distanceToMove; + serialized[position2++] = 214; + serialized[position2++] = 105; + serialized[position2++] = id >> 24; + serialized[position2++] = id >> 16 & 255; + serialized[position2++] = id >> 8 & 255; + serialized[position2++] = id & 255; + lastEnd = offset; + } + return serialized; + } + function writeBundles(start, pack2, incrementPosition) { + if (bundledStrings.length > 0) { + targetView.setUint32(bundledStrings.position + start, position + incrementPosition - bundledStrings.position - start); + bundledStrings.stringsPosition = position - start; + let writeStrings = bundledStrings; + bundledStrings = null; + pack2(writeStrings[0]); + pack2(writeStrings[1]); + } + } + function addExtension(extension) { + if (extension.Class) { + if (!extension.pack && !extension.write) + throw new Error("Extension has no pack or write function"); + if (extension.pack && !extension.type) + throw new Error("Extension has no type (numeric code to identify the extension)"); + extensionClasses.unshift(extension.Class); + extensions.unshift(extension); + } + addExtension$1(extension); + } + function prepareStructures(structures, packr) { + structures.isCompatible = (existingStructures) => { + let compatible = !existingStructures || (packr.lastNamedStructuresLength || 0) === existingStructures.length; + if (!compatible) + packr._mergeStructures(existingStructures); + return compatible; + }; + return structures; + } + Packr.SUPPORTS_STRUCT_HOOKS = true; + var defaultPackr = new Packr({ useRecords: false }); + var pack = defaultPackr.pack; + var encode = defaultPackr.pack; + var Encoder = Packr; + var { NEVER, ALWAYS, DECIMAL_ROUND, DECIMAL_FIT } = FLOAT32_OPTIONS; + var REUSE_BUFFER_MODE = 512; + var RESET_BUFFER_MODE = 1024; + var RESERVE_START_SPACE = 2048; + var PackrStream = class extends stream.Transform { + constructor(options) { + if (!options) + options = {}; + options.writableObjectMode = true; + super(options); + options.sequential = true; + this.packr = options.packr || new Packr(options); + } + _transform(value, encoding, callback) { + this.push(this.packr.pack(value)); + callback(); + } + }; + var UnpackrStream = class extends stream.Transform { + constructor(options) { + if (!options) + options = {}; + options.objectMode = true; + super(options); + options.structures = []; + this.maxIncompleteBufferSize = options.maxIncompleteBufferSize !== void 0 ? options.maxIncompleteBufferSize : 67108864; + this.unpackr = options.unpackr || new Unpackr(options); + } + _transform(chunk, encoding, callback) { + if (this.incompleteBuffer) { + chunk = Buffer.concat([this.incompleteBuffer, chunk]); + this.incompleteBuffer = null; + } + let values; + try { + values = this.unpackr.unpackMultiple(chunk); + } catch (error) { + if (error.incomplete) { + let incompleteBuffer = chunk.slice(error.lastPosition); + if (incompleteBuffer.length > this.maxIncompleteBufferSize) { + this.incompleteBuffer = null; + return callback(new Error("Maximum incomplete buffer size exceeded")); + } + this.incompleteBuffer = incompleteBuffer; + values = error.values; + } else { + return callback(error); + } + } + for (let value of values || []) { + if (value === null) + value = this.getNullValue(); + this.push(value); + } + callback(); + } + getNullValue() { + return Symbol.for(null); + } + }; + function packIter(objectIterator, options = {}) { + if (!objectIterator || typeof objectIterator !== "object") { + throw new Error("first argument must be an Iterable, Async Iterable, or a Promise for an Async Iterable"); + } else if (typeof objectIterator[Symbol.iterator] === "function") { + return packIterSync(objectIterator, options); + } else if (typeof objectIterator.then === "function" || typeof objectIterator[Symbol.asyncIterator] === "function") { + return packIterAsync(objectIterator, options); + } else { + throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a Promise"); + } + } + function* packIterSync(objectIterator, options) { + const packr = new Packr(options); + for (const value of objectIterator) { + yield packr.pack(value); + } + } + async function* packIterAsync(objectIterator, options) { + const packr = new Packr(options); + for await (const value of objectIterator) { + yield packr.pack(value); + } + } + function unpackIter(bufferIterator, options = {}) { + if (!bufferIterator || typeof bufferIterator !== "object") { + throw new Error("first argument must be an Iterable, Async Iterable, Iterator, Async Iterator, or a promise"); + } + const unpackr = new Unpackr(options); + let incomplete; + const parser = (chunk) => { + let yields; + if (incomplete) { + chunk = Buffer.concat([incomplete, chunk]); + incomplete = void 0; + } + try { + yields = unpackr.unpackMultiple(chunk); + } catch (err) { + if (err.incomplete) { + incomplete = chunk.slice(err.lastPosition); + yields = err.values; + } else { + throw err; + } + } + return yields; + }; + if (typeof bufferIterator[Symbol.iterator] === "function") { + return (function* iter() { + for (const value of bufferIterator) { + yield* parser(value); + } + })(); + } else if (typeof bufferIterator[Symbol.asyncIterator] === "function") { + return (async function* iter() { + for await (const value of bufferIterator) { + yield* parser(value); + } + })(); + } + } + var decodeIter = unpackIter; + var encodeIter = packIter; + var useRecords = false; + var mapsAsObjects = true; + var nativeAccelerationDisabled = process.env.MSGPACKR_NATIVE_ACCELERATION_DISABLED !== void 0 && process.env.MSGPACKR_NATIVE_ACCELERATION_DISABLED.toLowerCase() === "true"; + if (!nativeAccelerationDisabled) { + let extractor; + try { + if (typeof require == "function") + extractor = require("msgpackr-extract"); + else + extractor = module$1.createRequire(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("node.cjs", document.baseURI).href)("msgpackr-extract"); + if (extractor) + setExtractor(extractor.extractStrings); + } catch (error) { + } + } + exports2.ALWAYS = ALWAYS; + exports2.C1 = C1; + exports2.DECIMAL_FIT = DECIMAL_FIT; + exports2.DECIMAL_ROUND = DECIMAL_ROUND; + exports2.Decoder = Decoder; + exports2.DecoderStream = UnpackrStream; + exports2.Encoder = Encoder; + exports2.EncoderStream = PackrStream; + exports2.FLOAT32_OPTIONS = FLOAT32_OPTIONS; + exports2.NEVER = NEVER; + exports2.Packr = Packr; + exports2.PackrStream = PackrStream; + exports2.RESERVE_START_SPACE = RESERVE_START_SPACE; + exports2.RESET_BUFFER_MODE = RESET_BUFFER_MODE; + exports2.REUSE_BUFFER_MODE = REUSE_BUFFER_MODE; + exports2.Unpackr = Unpackr; + exports2.UnpackrStream = UnpackrStream; + exports2.addExtension = addExtension; + exports2.clearSource = clearSource; + exports2.decode = decode; + exports2.decodeIter = decodeIter; + exports2.encode = encode; + exports2.encodeIter = encodeIter; + exports2.mapsAsObjects = mapsAsObjects; + exports2.pack = pack; + exports2.roundFloat32 = roundFloat32; + exports2.unpack = unpack; + exports2.unpackMultiple = unpackMultiple; + exports2.useRecords = useRecords; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/version.js +var require_version = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/version.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.version = void 0; + exports2.version = "5.81.4"; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/scripts.js +var require_scripts = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/scripts.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Scripts = void 0; + exports2.raw2NextJobData = raw2NextJobData; + var msgpackr_1 = require_node4(); + var packer = new msgpackr_1.Packr({ + useRecords: false, + encodeUndefinedAsNil: true + }); + var pack = packer.pack; + var enums_1 = require_enums3(); + var utils_1 = require_utils16(); + var version_1 = require_version(); + var errors_1 = require_errors3(); + var GET_JOBS_MAX_BACKFILL_ITERATIONS = 5; + var Scripts = class { + constructor(queue) { + this.queue = queue; + this.version = version_1.version; + const queueKeys = this.queue.keys; + this.moveToFinishedKeys = [ + queueKeys.wait, + queueKeys.active, + queueKeys.prioritized, + queueKeys.events, + queueKeys.stalled, + queueKeys.limiter, + queueKeys.delayed, + queueKeys.paused, + queueKeys.meta, + queueKeys.pc, + void 0, + void 0, + void 0, + void 0 + ]; + } + /** + * Executes a registered Lua script on the given Redis client, resolving the + * versioned command name (e.g. `addJob:`) so the script + * belonging to the current BullMQ version is invoked. + * + * @param client - The Redis client or pipeline/transaction on which to run the command. + * @param commandName - The base name of the Lua script (without version suffix). + * @param args - Positional arguments forwarded to the Lua script (keys followed by argv). + * @returns The raw result produced by the Lua script. + * + * @private + */ + execCommand(client, commandName, args) { + const commandNameWithVersion = `${commandName}:${this.version}`; + return client.runCommand(commandNameWithVersion, args); + } + /** + * Checks whether a job with the given id is present in a Redis list + * (e.g. the wait or active list). Uses `LPOS` on Redis \>= 6.0.6, and + * falls back to a Lua script on older versions. + * + * @param listKey - The Redis list key to search. + * @param jobId - The job id to look up in the list. + * @returns `true` if the job is found in the list, `false` otherwise. + * + * @private + */ + async isJobInList(listKey, jobId) { + const client = await this.queue.client; + let result; + if ((0, utils_1.isRedisVersionLowerThan)(this.queue.redisVersion, "6.0.6", this.queue.databaseType)) { + result = await this.execCommand(client, "isJobInList", [listKey, jobId]); + } else { + result = await client.lpos(listKey, jobId); + } + return Number.isInteger(result); + } + addDelayedJobArgs(job, encodedOpts, args) { + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.marker, + queueKeys.meta, + queueKeys.id, + queueKeys.delayed, + queueKeys.completed, + queueKeys.events + ]; + keys.push(pack(args), job.data, encodedOpts); + return keys; + } + addDelayedJob(client, job, encodedOpts, args) { + const argsList = this.addDelayedJobArgs(job, encodedOpts, args); + return this.execCommand(client, "addDelayedJob", argsList); + } + addPrioritizedJobArgs(job, encodedOpts, args) { + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.marker, + queueKeys.meta, + queueKeys.id, + queueKeys.prioritized, + queueKeys.delayed, + queueKeys.completed, + queueKeys.active, + queueKeys.events, + queueKeys.pc + ]; + keys.push(pack(args), job.data, encodedOpts); + return keys; + } + addPrioritizedJob(client, job, encodedOpts, args) { + const argsList = this.addPrioritizedJobArgs(job, encodedOpts, args); + return this.execCommand(client, "addPrioritizedJob", argsList); + } + addParentJobArgs(job, encodedOpts, args) { + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.meta, + queueKeys.id, + queueKeys.delayed, + queueKeys["waiting-children"], + queueKeys.completed, + queueKeys.events + ]; + keys.push(pack(args), job.data, encodedOpts); + return keys; + } + addParentJob(client, job, encodedOpts, args) { + const argsList = this.addParentJobArgs(job, encodedOpts, args); + return this.execCommand(client, "addParentJob", argsList); + } + addStandardJobArgs(job, encodedOpts, args) { + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.wait, + queueKeys.paused, + queueKeys.meta, + queueKeys.id, + queueKeys.completed, + queueKeys.delayed, + queueKeys.active, + queueKeys.events, + queueKeys.marker + ]; + keys.push(pack(args), job.data, encodedOpts); + return keys; + } + addStandardJob(client, job, encodedOpts, args) { + const argsList = this.addStandardJobArgs(job, encodedOpts, args); + return this.execCommand(client, "addStandardJob", argsList); + } + async addJob(client, job, opts, jobId, parentKeyOpts = {}) { + const queueKeys = this.queue.keys; + const parent = job.parent; + const args = [ + queueKeys[""], + typeof jobId !== "undefined" ? jobId : "", + job.name, + job.timestamp, + job.parentKey || null, + parentKeyOpts.parentDependenciesKey || null, + parent, + job.repeatJobKey, + job.deduplicationId ? `${queueKeys.de}:${job.deduplicationId}` : null + ]; + let encodedOpts; + if (opts.repeat) { + const repeat = Object.assign({}, opts.repeat); + if (repeat.startDate) { + repeat.startDate = +new Date(repeat.startDate); + } + if (repeat.endDate) { + repeat.endDate = +new Date(repeat.endDate); + } + encodedOpts = pack(Object.assign(Object.assign({}, opts), { repeat })); + } else { + encodedOpts = pack(opts); + } + let result; + if (parentKeyOpts.addToWaitingChildren) { + result = await this.addParentJob(client, job, encodedOpts, args); + } else if (typeof opts.delay == "number" && opts.delay > 0) { + result = await this.addDelayedJob(client, job, encodedOpts, args); + } else if (opts.priority) { + result = await this.addPrioritizedJob(client, job, encodedOpts, args); + } else { + result = await this.addStandardJob(client, job, encodedOpts, args); + } + if (result < 0) { + throw this.finishedErrors({ + code: result, + parentKey: parentKeyOpts.parentKey, + command: "addJob" + }); + } + return result; + } + pauseArgs(pause) { + let src = "wait", dst = "paused"; + if (!pause) { + src = "paused"; + dst = "wait"; + } + const keys = [src, dst, "meta", "prioritized"].map((name) => this.queue.toKey(name)); + keys.push(this.queue.keys.events, this.queue.keys.delayed, this.queue.keys.marker); + const args = [pause ? "paused" : "resumed"]; + return keys.concat(args); + } + async pause(pause) { + const client = await this.queue.client; + const args = this.pauseArgs(pause); + return this.execCommand(client, "pause", args); + } + addRepeatableJobArgs(customKey, nextMillis, opts, legacyCustomKey) { + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.repeat, + queueKeys.delayed + ]; + const args = [ + nextMillis, + pack(opts), + legacyCustomKey, + customKey, + queueKeys[""] + ]; + return keys.concat(args); + } + /** + * Adds (or updates) a repeatable job entry in the repeat zset and stores + * its repeat options under the corresponding repeat hash. If a previous + * delayed iteration for this repeat key exists, it is cleaned up so the + * next iteration can be scheduled separately when the job is created. + * + * @param customKey - The current repeat key identifying this repeatable job. + * @param nextMillis - The timestamp (ms since epoch) for the next run. + * @param opts - Repeatable options (cron/every pattern, tz, limit, etc.). + * @param legacyCustomKey - The previous/legacy repeat key, used for migration and cleanup. + * @returns The repeatable job key that was stored (either `customKey` or, + * for backwards-compatible entries, `legacyCustomKey`). The actual delayed + * iteration is scheduled later when the job for `nextMillis` is created. + * + * @private + */ + async addRepeatableJob(customKey, nextMillis, opts, legacyCustomKey) { + const client = await this.queue.client; + const args = this.addRepeatableJobArgs(customKey, nextMillis, opts, legacyCustomKey); + return this.execCommand(client, "addRepeatableJob", args); + } + /** + * Removes a deduplication key from Redis so that a new job with the same + * deduplication id can be enqueued again. The key is only removed if it + * currently maps to the provided `jobId`, preventing races between + * producers and finishing jobs. + * + * @param deduplicationId - The deduplication id whose key should be cleared. + * @param jobId - The id of the job that currently owns the dedup key. + * @returns `1` if the key was removed, `0` otherwise. + * + * @private + */ + async removeDeduplicationKey(deduplicationId, jobId) { + const client = await this.queue.client; + const queueKeys = this.queue.keys; + const keys = [`${queueKeys.de}:${deduplicationId}`]; + const args = [jobId]; + return this.execCommand(client, "removeDeduplicationKey", keys.concat(args)); + } + /** + * Registers a job scheduler and enqueues its next delayed iteration. + * The scheduler stores the template data/options so subsequent iterations + * can be produced automatically based on the repeat options. + * + * @param jobSchedulerId - The id that uniquely identifies this scheduler. + * @param nextMillis - Timestamp (ms since epoch) for the next iteration. + * @param templateData - Serialized template data reused for every iteration. + * @param templateOpts - Redis-encoded job options applied to every iteration. + * @param opts - Repeat options describing the scheduling pattern. + * @param delayedJobOpts - Options applied to the next delayed job that is produced. + * @param producerId - Optional id of the job that produced this iteration, used to prevent duplicates. + * @returns A tuple of `[jobId, delay]`, where `delay` is the computed delay in milliseconds + * for the next iteration. When `delay` is `0`, the job is enqueued immediately. + * @throws An error resolved from `finishedErrors` when the Lua script returns a negative status code. + * + * @private + */ + async addJobScheduler(jobSchedulerId, nextMillis, templateData, templateOpts, opts, delayedJobOpts, producerId) { + const client = await this.queue.client; + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.repeat, + queueKeys.delayed, + queueKeys.wait, + queueKeys.paused, + queueKeys.meta, + queueKeys.prioritized, + queueKeys.marker, + queueKeys.id, + queueKeys.events, + queueKeys.pc, + queueKeys.active + ]; + const args = [ + nextMillis, + pack(opts), + jobSchedulerId, + templateData, + pack(templateOpts), + pack(delayedJobOpts), + Date.now(), + queueKeys[""], + producerId ? this.queue.toKey(producerId) : "" + ]; + const result = await this.execCommand(client, "addJobScheduler", keys.concat(args)); + if (typeof result === "number" && result < 0) { + throw this.finishedErrors({ + code: result, + command: "addJobScheduler" + }); + } + return result; + } + async updateRepeatableJobMillis(client, customKey, nextMillis, legacyCustomKey) { + const args = [ + this.queue.keys.repeat, + nextMillis, + customKey, + legacyCustomKey + ]; + return this.execCommand(client, "updateRepeatableJobMillis", args); + } + async updateJobSchedulerNextMillis(jobSchedulerId, nextMillis, templateData, delayedJobOpts, producerId) { + const client = await this.queue.client; + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.repeat, + queueKeys.delayed, + queueKeys.wait, + queueKeys.paused, + queueKeys.meta, + queueKeys.prioritized, + queueKeys.marker, + queueKeys.id, + queueKeys.events, + queueKeys.pc, + producerId ? this.queue.toKey(producerId) : "", + queueKeys.active + ]; + const args = [ + nextMillis, + jobSchedulerId, + templateData, + pack(delayedJobOpts), + Date.now(), + queueKeys[""], + producerId + ]; + return this.execCommand(client, "updateJobScheduler", keys.concat(args)); + } + removeRepeatableArgs(legacyRepeatJobId, repeatConcatOptions, repeatJobKey) { + const queueKeys = this.queue.keys; + const keys = [queueKeys.repeat, queueKeys.delayed, queueKeys.events]; + const args = [ + legacyRepeatJobId, + this.getRepeatConcatOptions(repeatConcatOptions, repeatJobKey), + repeatJobKey, + queueKeys[""] + ]; + return keys.concat(args); + } + // TODO: remove this check in next breaking change + getRepeatConcatOptions(repeatConcatOptions, repeatJobKey) { + if (repeatJobKey && repeatJobKey.split(":").length > 2) { + return repeatJobKey; + } + return repeatConcatOptions; + } + async removeRepeatable(legacyRepeatJobId, repeatConcatOptions, repeatJobKey) { + const client = await this.queue.client; + const args = this.removeRepeatableArgs(legacyRepeatJobId, repeatConcatOptions, repeatJobKey); + return this.execCommand(client, "removeRepeatable", args); + } + async removeJobScheduler(jobSchedulerId) { + const client = await this.queue.client; + const queueKeys = this.queue.keys; + const keys = [queueKeys.repeat, queueKeys.delayed, queueKeys.events]; + const args = [jobSchedulerId, queueKeys[""]]; + return this.execCommand(client, "removeJobScheduler", keys.concat(args)); + } + removeArgs(jobId, removeChildren) { + const keys = [jobId, "repeat"].map((name) => this.queue.toKey(name)); + const args = [jobId, removeChildren ? 1 : 0, this.queue.toKey("")]; + return keys.concat(args); + } + async remove(jobId, removeChildren) { + const client = await this.queue.client; + const args = this.removeArgs(jobId, removeChildren); + const result = await this.execCommand(client, "removeJob", args); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "removeJob" + }); + } + return result; + } + async removeUnprocessedChildren(jobId) { + const client = await this.queue.client; + const args = [ + this.queue.toKey(jobId), + this.queue.keys.meta, + this.queue.toKey(""), + jobId + ]; + await this.execCommand(client, "removeUnprocessedChildren", args); + } + async extendLock(jobId, token, duration, client) { + client = client || await this.queue.client; + const args = [ + this.queue.toKey(jobId) + ":lock", + this.queue.keys.stalled, + token, + duration, + jobId + ]; + return this.execCommand(client, "extendLock", args); + } + async extendLocks(jobIds, tokens, duration) { + const client = await this.queue.client; + const args = [ + this.queue.keys.stalled, + this.queue.toKey(""), + pack(tokens), + pack(jobIds), + duration + ]; + return this.execCommand(client, "extendLocks", args); + } + async updateData(job, data) { + const client = await this.queue.client; + const keys = [this.queue.toKey(job.id)]; + const dataJson = JSON.stringify(data); + const result = await this.execCommand(client, "updateData", keys.concat([dataJson])); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId: job.id, + command: "updateData" + }); + } + } + async updateProgress(jobId, progress) { + const client = await this.queue.client; + const keys = [ + this.queue.toKey(jobId), + this.queue.keys.events, + this.queue.keys.meta + ]; + const progressJson = JSON.stringify(progress); + const result = await this.execCommand(client, "updateProgress", keys.concat([jobId, progressJson])); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "updateProgress" + }); + } + } + async addLog(jobId, logRow, keepLogs) { + const client = await this.queue.client; + const keys = [ + this.queue.toKey(jobId), + this.queue.toKey(jobId) + ":logs" + ]; + const result = await this.execCommand(client, "addLog", keys.concat([jobId, logRow, keepLogs ? keepLogs : ""])); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "addLog" + }); + } + return result; + } + moveToFinishedArgs(job, val, propVal, shouldRemove, target, token, timestamp, fetchNext = true, fieldsToUpdate) { + var _a, _b, _c, _d, _e, _f, _g; + const queueKeys = this.queue.keys; + const opts = this.queue.opts; + const workerKeepJobs = target === "completed" ? opts.removeOnComplete : opts.removeOnFail; + const metricsKey = this.queue.toKey(`metrics:${target}`); + const keys = this.moveToFinishedKeys; + keys[10] = queueKeys[target]; + keys[11] = this.queue.toKey((_a = job.id) !== null && _a !== void 0 ? _a : ""); + keys[12] = metricsKey; + keys[13] = this.queue.keys.marker; + const keepJobs = this.getKeepJobs(shouldRemove, workerKeepJobs); + const args = [ + job.id, + timestamp, + propVal, + typeof val === "undefined" ? "null" : val, + target, + !fetchNext || this.queue.closing ? 0 : 1, + queueKeys[""], + pack({ + token, + name: opts.name, + keepJobs, + limiter: opts.limiter, + lockDuration: opts.lockDuration, + attempts: job.opts.attempts, + maxMetricsSize: ((_b = opts.metrics) === null || _b === void 0 ? void 0 : _b.maxDataPoints) ? (_c = opts.metrics) === null || _c === void 0 ? void 0 : _c.maxDataPoints : "", + fpof: !!((_d = job.opts) === null || _d === void 0 ? void 0 : _d.failParentOnFailure), + cpof: !!((_e = job.opts) === null || _e === void 0 ? void 0 : _e.continueParentOnFailure), + idof: !!((_f = job.opts) === null || _f === void 0 ? void 0 : _f.ignoreDependencyOnFailure), + rdof: !!((_g = job.opts) === null || _g === void 0 ? void 0 : _g.removeDependencyOnFailure) + }), + fieldsToUpdate ? pack((0, utils_1.objectToFlatArray)(fieldsToUpdate)) : void 0 + ]; + return keys.concat(args); + } + getKeepJobs(shouldRemove, workerKeepJobs) { + if (typeof shouldRemove === "undefined") { + return workerKeepJobs || { count: shouldRemove ? 0 : -1 }; + } + return typeof shouldRemove === "object" ? shouldRemove : typeof shouldRemove === "number" ? { count: shouldRemove } : { count: shouldRemove ? 0 : -1 }; + } + async moveToFinished(jobId, args) { + const client = await this.queue.client; + const result = await this.execCommand(client, "moveToFinished", args); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "moveToFinished", + state: "active" + }); + } else { + if (typeof result !== "undefined") { + return raw2NextJobData(result); + } + } + } + drainArgs(delayed) { + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.wait, + queueKeys.paused, + queueKeys.delayed, + queueKeys.prioritized, + queueKeys.repeat + ]; + const args = [queueKeys[""], delayed ? "1" : "0"]; + return keys.concat(args); + } + async drain(delayed) { + const client = await this.queue.client; + const args = this.drainArgs(delayed); + return this.execCommand(client, "drain", args); + } + removeChildDependencyArgs(jobId, parentKey) { + const queueKeys = this.queue.keys; + const keys = [queueKeys[""]]; + const args = [this.queue.toKey(jobId), parentKey]; + return keys.concat(args); + } + async removeChildDependency(jobId, parentKey) { + const client = await this.queue.client; + const args = this.removeChildDependencyArgs(jobId, parentKey); + const result = await this.execCommand(client, "removeChildDependency", args); + switch (result) { + case 0: + return true; + case 1: + return false; + default: + throw this.finishedErrors({ + code: result, + jobId, + parentKey, + command: "removeChildDependency" + }); + } + } + getRangesArgs(types, start, end, asc) { + const queueKeys = this.queue.keys; + const transformedTypes = types.map((type) => { + return type === "waiting" ? "wait" : type; + }); + const keys = [queueKeys[""]]; + const args = [start, end, asc ? "1" : "0", ...transformedTypes]; + return keys.concat(args); + } + async getRanges(types, start = 0, end = 1, asc = false) { + const client = await this.queue.client; + const args = this.getRangesArgs(types, start, end, asc); + return await this.execCommand(client, "getRanges", args); + } + getJobsArgs(types, start, end, asc) { + const queueKeys = this.queue.keys; + const transformedTypes = [ + ...new Set(types.map((type) => type === "waiting" ? "wait" : type)) + ]; + const keys = [queueKeys[""]]; + const args = [ + start, + end, + asc ? "1" : "0", + GET_JOBS_MAX_BACKFILL_ITERATIONS, + ...transformedTypes + ]; + return keys.concat(args); + } + /** + * Fetches job ids and their job hashes for the provided states in a single + * script, skipping ids whose job hash is missing (for example the deprecated + * wait list marker or jobs removed after their id was read). Each returned + * entry is a `[jobId, jobHashFields]` tuple grouped per requested type. + */ + async getJobs(types, start = 0, end = -1, asc = false) { + const client = await this.queue.client; + const args = this.getJobsArgs(types, start, end, asc); + return await this.execCommand(client, "getJobs", args); + } + getCountsArgs(types) { + const queueKeys = this.queue.keys; + const transformedTypes = types.map((type) => { + return type === "waiting" ? "wait" : type; + }); + const keys = [queueKeys[""]]; + const args = [...transformedTypes]; + return keys.concat(args); + } + async getCounts(types) { + const client = await this.queue.client; + const args = this.getCountsArgs(types); + return await this.execCommand(client, "getCounts", args); + } + getCountsPerPriorityArgs(priorities) { + const keys = [ + this.queue.keys.wait, + this.queue.keys.paused, + this.queue.keys.meta, + this.queue.keys.prioritized + ]; + const args = priorities; + return keys.concat(args); + } + async getCountsPerPriority(priorities) { + const client = await this.queue.client; + const args = this.getCountsPerPriorityArgs(priorities); + return await this.execCommand(client, "getCountsPerPriority", args); + } + getDependencyCountsArgs(jobId, types) { + const keys = [ + `${jobId}:processed`, + `${jobId}:dependencies`, + `${jobId}:failed`, + `${jobId}:unsuccessful` + ].map((name) => { + return this.queue.toKey(name); + }); + const args = types; + return keys.concat(args); + } + async getDependencyCounts(jobId, types) { + const client = await this.queue.client; + const args = this.getDependencyCountsArgs(jobId, types); + return await this.execCommand(client, "getDependencyCounts", args); + } + moveToCompletedArgs(job, returnvalue, removeOnComplete, token, fetchNext = false) { + const timestamp = Date.now(); + return this.moveToFinishedArgs(job, returnvalue, "returnvalue", removeOnComplete, "completed", token, timestamp, fetchNext); + } + moveToFailedArgs(job, failedReason, removeOnFailed, token, fetchNext = false, fieldsToUpdate) { + const timestamp = Date.now(); + return this.moveToFinishedArgs(job, failedReason, "failedReason", removeOnFailed, "failed", token, timestamp, fetchNext, fieldsToUpdate); + } + async isFinished(jobId, returnValue = false) { + const client = await this.queue.client; + const keys = ["completed", "failed", jobId].map((key) => { + return this.queue.toKey(key); + }); + return this.execCommand(client, "isFinished", keys.concat([jobId, returnValue ? "1" : ""])); + } + async getState(jobId) { + const client = await this.queue.client; + const keys = [ + "completed", + "failed", + "delayed", + "active", + "wait", + "paused", + "waiting-children", + "prioritized" + ].map((key) => { + return this.queue.toKey(key); + }); + if ((0, utils_1.isRedisVersionLowerThan)(this.queue.redisVersion, "6.0.6", this.queue.databaseType)) { + return this.execCommand(client, "getState", keys.concat([jobId])); + } + return this.execCommand(client, "getStateV2", keys.concat([jobId])); + } + /** + * Change delay of a delayed job. + * + * Reschedules a delayed job by setting a new delay from the current time. + * For example, calling changeDelay(5000) will reschedule the job to execute + * 5000 milliseconds (5 seconds) from now, regardless of the original delay. + * + * @param jobId - the ID of the job to change the delay for. + * @param delay - milliseconds from now when the job should be processed. + * @returns delay in milliseconds. + * @throws JobNotExist + * This exception is thrown if jobId is missing. + * @throws JobNotInState + * This exception is thrown if job is not in delayed state. + */ + async changeDelay(jobId, delay) { + const client = await this.queue.client; + const args = this.changeDelayArgs(jobId, delay); + const result = await this.execCommand(client, "changeDelay", args); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "changeDelay", + state: "delayed" + }); + } + } + changeDelayArgs(jobId, delay) { + const timestamp = Date.now(); + const keys = [ + this.queue.keys.delayed, + this.queue.keys.meta, + this.queue.keys.marker, + this.queue.keys.events + ]; + return keys.concat([ + delay, + JSON.stringify(timestamp), + jobId, + this.queue.toKey(jobId) + ]); + } + async changePriority(jobId, priority = 0, lifo = false) { + const client = await this.queue.client; + const args = this.changePriorityArgs(jobId, priority, lifo); + const result = await this.execCommand(client, "changePriority", args); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "changePriority" + }); + } + } + changePriorityArgs(jobId, priority = 0, lifo = false) { + const keys = [ + this.queue.keys.wait, + this.queue.keys.paused, + this.queue.keys.meta, + this.queue.keys.prioritized, + this.queue.keys.active, + this.queue.keys.pc, + this.queue.keys.marker + ]; + return keys.concat([priority, this.queue.toKey(""), jobId, lifo ? 1 : 0]); + } + moveToDelayedArgs(jobId, timestamp, token, delay, opts = {}) { + const queueKeys = this.queue.keys; + const workerOpts = this.queue.opts; + const keys = [ + queueKeys.marker, + queueKeys.active, + queueKeys.prioritized, + queueKeys.delayed, + this.queue.toKey(jobId), + queueKeys.events, + queueKeys.meta, + queueKeys.stalled, + queueKeys.wait, + queueKeys.limiter, + queueKeys.paused, + queueKeys.pc + ]; + const fetchNext = opts.fetchNext && !this.queue.closing ? 1 : 0; + return keys.concat([ + this.queue.keys[""], + timestamp, + jobId, + token, + delay, + opts.skipAttempt ? "1" : "0", + opts.fieldsToUpdate ? pack((0, utils_1.objectToFlatArray)(opts.fieldsToUpdate)) : void 0, + fetchNext, + fetchNext ? pack({ + token, + lockDuration: workerOpts.lockDuration, + limiter: workerOpts.limiter, + name: workerOpts.name + }) : void 0 + ]); + } + moveToWaitingChildrenArgs(jobId, token, opts) { + const timestamp = Date.now(); + const childKey = (0, utils_1.getParentKey)(opts.child); + const keys = [ + "active", + "waiting-children", + jobId, + `${jobId}:dependencies`, + `${jobId}:unsuccessful`, + "stalled", + "events" + ].map((name) => { + return this.queue.toKey(name); + }); + return keys.concat([ + token, + childKey !== null && childKey !== void 0 ? childKey : "", + JSON.stringify(timestamp), + jobId, + this.queue.toKey("") + ]); + } + isMaxedArgs() { + const queueKeys = this.queue.keys; + const keys = [queueKeys.meta, queueKeys.active]; + return keys; + } + async isMaxed() { + const client = await this.queue.client; + const args = this.isMaxedArgs(); + return !!await this.execCommand(client, "isMaxed", args); + } + async moveToDelayed(jobId, timestamp, delay, token = "0", opts = {}) { + const client = await this.queue.client; + const args = this.moveToDelayedArgs(jobId, timestamp, token, delay, opts); + const result = await this.execCommand(client, "moveToDelayed", args); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "moveToDelayed", + state: "active" + }); + } else if (typeof result !== "undefined") { + return raw2NextJobData(result); + } + } + /** + * Move parent job to waiting-children state. + * + * @returns true if job is successfully moved, false if there are pending dependencies. + * @throws JobNotExist + * This exception is thrown if jobId is missing. + * @throws JobLockNotExist + * This exception is thrown if job lock is missing. + * @throws JobNotInState + * This exception is thrown if job is not in active state. + */ + async moveToWaitingChildren(jobId, token, opts = {}) { + const client = await this.queue.client; + const args = this.moveToWaitingChildrenArgs(jobId, token, opts); + const result = await this.execCommand(client, "moveToWaitingChildren", args); + switch (result) { + case 0: + return true; + case 1: + return false; + default: + throw this.finishedErrors({ + code: result, + jobId, + command: "moveToWaitingChildren", + state: "active" + }); + } + } + getRateLimitTtlArgs(maxJobs) { + const keys = [ + this.queue.keys.limiter, + this.queue.keys.meta + ]; + return keys.concat([maxJobs !== null && maxJobs !== void 0 ? maxJobs : "0"]); + } + async getRateLimitTtl(maxJobs) { + const client = await this.queue.client; + const args = this.getRateLimitTtlArgs(maxJobs); + return this.execCommand(client, "getRateLimitTtl", args); + } + /** + * Remove jobs in a specific state. + * + * @returns Id jobs from the deleted records. + */ + async cleanJobsInSet(set, timestamp, limit = 0) { + const client = await this.queue.client; + return this.execCommand(client, "cleanJobsInSet", [ + this.queue.toKey(set), + this.queue.toKey("events"), + this.queue.toKey("repeat"), + this.queue.toKey(""), + timestamp, + limit, + set + ]); + } + getJobSchedulerArgs(id) { + const keys = [this.queue.keys.repeat]; + return keys.concat([id]); + } + async getJobScheduler(id) { + const client = await this.queue.client; + const args = this.getJobSchedulerArgs(id); + return this.execCommand(client, "getJobScheduler", args); + } + retryJobArgs(jobId, lifo, token, opts = {}) { + const keys = [ + this.queue.keys.active, + this.queue.keys.wait, + this.queue.keys.paused, + this.queue.toKey(jobId), + this.queue.keys.meta, + this.queue.keys.events, + this.queue.keys.delayed, + this.queue.keys.prioritized, + this.queue.keys.pc, + this.queue.keys.marker, + this.queue.keys.stalled + ]; + const pushCmd = (lifo ? "R" : "L") + "PUSH"; + return keys.concat([ + this.queue.toKey(""), + Date.now(), + pushCmd, + jobId, + token, + opts.fieldsToUpdate ? pack((0, utils_1.objectToFlatArray)(opts.fieldsToUpdate)) : void 0 + ]); + } + async retryJob(jobId, lifo, token = "0", opts = {}) { + const client = await this.queue.client; + const args = this.retryJobArgs(jobId, lifo, token, opts); + const result = await this.execCommand(client, "retryJob", args); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "retryJob", + state: "active" + }); + } + } + moveJobsToWaitArgs(state, count, timestamp) { + const keys = [ + this.queue.toKey(""), + this.queue.keys.events, + this.queue.toKey(state), + this.queue.toKey("wait"), + this.queue.toKey("paused"), + this.queue.keys.meta, + this.queue.keys.active, + this.queue.keys.marker + ]; + const args = [count, timestamp, state]; + return keys.concat(args); + } + async retryJobs(state = "failed", count = 1e3, timestamp = (/* @__PURE__ */ new Date()).getTime()) { + const client = await this.queue.client; + const args = this.moveJobsToWaitArgs(state, count, timestamp); + return this.execCommand(client, "moveJobsToWait", args); + } + async promoteJobs(count = 1e3) { + const client = await this.queue.client; + const args = this.moveJobsToWaitArgs("delayed", count, Number.MAX_VALUE); + return this.execCommand(client, "moveJobsToWait", args); + } + /** + * Attempts to reprocess a job + * + * @param job - The job to reprocess + * @param state - The expected job state. If the job is not found + * on the provided state, then it's not reprocessed. Supported states: 'failed', 'completed' + * + * @returns A promise that resolves when the job has been successfully moved to the wait queue. + * @throws Will throw an error with a code property indicating the failure reason: + * - code 0: Job does not exist + * - code -1: Job is currently locked and can't be retried + * - code -2: Job was not found in the expected set + */ + async reprocessJob(job, state, opts = {}) { + const client = await this.queue.client; + const keys = [ + this.queue.toKey(job.id), + this.queue.keys.events, + this.queue.toKey(state), + this.queue.keys.wait, + this.queue.keys.meta, + this.queue.keys.paused, + this.queue.keys.active, + this.queue.keys.marker + ]; + const args = [ + job.id, + (job.opts.lifo ? "R" : "L") + "PUSH", + state === "failed" ? "failedReason" : "returnvalue", + state, + opts.resetAttemptsMade ? "1" : "0", + opts.resetAttemptsStarted ? "1" : "0" + ]; + const result = await this.execCommand(client, "reprocessJob", keys.concat(args)); + switch (result) { + case 1: + return; + default: + throw this.finishedErrors({ + code: result, + jobId: job.id, + command: "reprocessJob", + state + }); + } + } + async getMetrics(type, start = 0, end = -1) { + const client = await this.queue.client; + const keys = [ + this.queue.toKey(`metrics:${type}`), + this.queue.toKey(`metrics:${type}:data`) + ]; + const args = [start, end]; + const result = await this.execCommand(client, "getMetrics", keys.concat(args)); + return result; + } + async moveToActive(client, token, name) { + const opts = this.queue.opts; + const queueKeys = this.queue.keys; + const keys = [ + queueKeys.wait, + queueKeys.active, + queueKeys.prioritized, + queueKeys.events, + queueKeys.stalled, + queueKeys.limiter, + queueKeys.delayed, + queueKeys.paused, + queueKeys.meta, + queueKeys.pc, + queueKeys.marker + ]; + const args = [ + queueKeys[""], + Date.now(), + pack({ + token, + lockDuration: opts.lockDuration, + limiter: opts.limiter, + name + }) + ]; + const result = await this.execCommand(client, "moveToActive", keys.concat(args)); + return raw2NextJobData(result); + } + async promote(jobId) { + const client = await this.queue.client; + const keys = [ + this.queue.keys.delayed, + this.queue.keys.wait, + this.queue.keys.paused, + this.queue.keys.meta, + this.queue.keys.prioritized, + this.queue.keys.active, + this.queue.keys.pc, + this.queue.keys.events, + this.queue.keys.marker + ]; + const args = [this.queue.toKey(""), jobId]; + const code = await this.execCommand(client, "promote", keys.concat(args)); + if (code < 0) { + throw this.finishedErrors({ + code, + jobId, + command: "promote", + state: "delayed" + }); + } + } + moveStalledJobsToWaitArgs() { + const opts = this.queue.opts; + const keys = [ + this.queue.keys.stalled, + this.queue.keys.wait, + this.queue.keys.active, + this.queue.keys["stalled-check"], + this.queue.keys.meta, + this.queue.keys.paused, + this.queue.keys.marker, + this.queue.keys.events, + this.queue.keys.repeat + ]; + const args = [ + opts.maxStalledCount, + this.queue.toKey(""), + Date.now(), + opts.stalledInterval + ]; + return keys.concat(args); + } + /** + * Looks for unlocked jobs in the active queue. + * + * The job was being worked on, but the worker process died and it failed to renew the lock. + * We call these jobs 'stalled'. This is the most common case. We resolve these by moving them + * back to wait to be re-processed. To prevent jobs from cycling endlessly between active and wait, + * (e.g. if the job handler keeps crashing), + * we limit the number stalled job recoveries to settings.maxStalledCount. + */ + async moveStalledJobsToWait() { + const client = await this.queue.client; + const args = this.moveStalledJobsToWaitArgs(); + return this.execCommand(client, "moveStalledJobsToWait", args); + } + /** + * Moves a job back from Active to Wait. + * This script is used when a job has been manually rate limited and needs + * to be moved back to wait from active status. + * + * @param client - Redis client + * @param jobId - Job id + * @returns + */ + async moveJobFromActiveToWait(jobId, token = "0") { + const client = await this.queue.client; + const keys = [ + this.queue.keys.active, + this.queue.keys.wait, + this.queue.keys.stalled, + this.queue.keys.paused, + this.queue.keys.meta, + this.queue.keys.limiter, + this.queue.keys.prioritized, + this.queue.keys.marker, + this.queue.keys.events + ]; + const args = [jobId, token, this.queue.toKey(jobId)]; + const result = await this.execCommand(client, "moveJobFromActiveToWait", keys.concat(args)); + if (result < 0) { + throw this.finishedErrors({ + code: result, + jobId, + command: "moveJobFromActiveToWait", + state: "active" + }); + } + return result; + } + async obliterate(opts) { + const client = await this.queue.client; + const keys = [ + this.queue.keys.meta, + this.queue.toKey("") + ]; + const args = [opts.count, opts.force ? "force" : null]; + const result = await this.execCommand(client, "obliterate", keys.concat(args)); + if (result < 0) { + switch (result) { + case -1: + throw new Error("Cannot obliterate non-paused queue"); + case -2: + throw new Error("Cannot obliterate queue with active jobs"); + } + } + return result; + } + /** + * Paginate a set or hash keys. + * @param opts - options to define the pagination behaviour + * + */ + async paginate(key, opts) { + const client = await this.queue.client; + const keys = [key]; + const maxIterations = 5; + const pageSize = opts.end >= 0 ? opts.end - opts.start + 1 : Infinity; + let cursor = "0", offset = 0, items, total, rawJobs, page = [], jobs = []; + do { + const args = [ + opts.start + page.length, + opts.end, + cursor, + offset, + maxIterations + ]; + if (opts.fetchJobs) { + args.push(1); + } + [cursor, offset, items, total, rawJobs] = await this.execCommand(client, "paginate", keys.concat(args)); + page = page.concat(items); + if (rawJobs && rawJobs.length) { + jobs = jobs.concat(rawJobs.map(utils_1.array2obj)); + } + } while (cursor != "0" && page.length < pageSize); + if (page.length && Array.isArray(page[0])) { + const result = []; + for (let index = 0; index < page.length; index++) { + const [id, value] = page[index]; + try { + result.push({ id, v: JSON.parse(value) }); + } catch (err) { + result.push({ id, err: err.message }); + } + } + return { + cursor, + items: result, + total, + jobs + }; + } else { + return { + cursor, + items: page.map((item) => ({ id: item })), + total, + jobs + }; + } + } + finishedErrors({ code, jobId, parentKey, command, state }) { + let error; + switch (code) { + case enums_1.ErrorCode.JobNotExist: + error = new Error(`Missing key for job ${jobId}. ${command}`); + break; + case enums_1.ErrorCode.JobLockNotExist: + error = new Error(`Missing lock for job ${jobId}. ${command}`); + break; + case enums_1.ErrorCode.JobNotInState: + error = new Error(`Job ${jobId} is not in the ${state} state. ${command}`); + break; + case enums_1.ErrorCode.JobPendingChildren: + error = new Error(`Job ${jobId} has pending dependencies. ${command}`); + break; + case enums_1.ErrorCode.ParentJobNotExist: + error = new Error(`Missing key for parent job ${parentKey}. ${command}`); + break; + case enums_1.ErrorCode.JobLockMismatch: + error = new Error(`Lock mismatch for job ${jobId}. Cmd ${command} from ${state}`); + break; + case enums_1.ErrorCode.ParentJobCannotBeReplaced: + error = new Error(`The parent job ${parentKey} cannot be replaced. ${command}`); + break; + case enums_1.ErrorCode.JobBelongsToJobScheduler: + error = new Error(`Job ${jobId} belongs to a job scheduler and cannot be removed directly. ${command}`); + break; + case enums_1.ErrorCode.JobHasFailedChildren: + error = new errors_1.UnrecoverableError(`Cannot complete job ${jobId} because it has at least one failed child. ${command}`); + break; + case enums_1.ErrorCode.SchedulerJobIdCollision: + error = new Error(`Cannot create job scheduler iteration - job ID already exists. ${command}`); + break; + case enums_1.ErrorCode.SchedulerJobSlotsBusy: + error = new Error(`Cannot create job scheduler iteration - current and next time slots already have jobs. ${command}`); + break; + default: + error = new Error(`Unknown code ${code} error for ${jobId}. ${command}`); + } + error.code = code; + return error; + } + async removeOrphanedJobs(candidateJobIds, stateKeySuffixes, jobSubKeySuffixes) { + const client = await this.queue.client; + const args = [ + this.queue.toKey(""), + stateKeySuffixes.length, + ...stateKeySuffixes, + jobSubKeySuffixes.length, + ...jobSubKeySuffixes, + ...candidateJobIds + ]; + return this.execCommand(client, "removeOrphanedJobs", args); + } + }; + exports2.Scripts = Scripts; + function raw2NextJobData(raw) { + if (raw) { + const result = [null, raw[1], raw[2], raw[3]]; + if (raw[0]) { + result[0] = (0, utils_1.array2obj)(raw[0]); + } + return result; + } + return []; + } + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/utils/create-scripts.js +var require_create_scripts = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/utils/create-scripts.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createScripts = void 0; + var scripts_1 = require_scripts(); + var createScripts = (queue) => { + return new scripts_1.Scripts({ + keys: queue.keys, + client: queue.client, + get redisVersion() { + return queue.redisVersion; + }, + toKey: queue.toKey, + opts: queue.opts, + closing: queue.closing, + databaseType: queue.databaseType + }); + }; + exports2.createScripts = createScripts; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/job.js +var require_job = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/job.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Job = exports2.PRIORITY_LIMIT = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var util_1 = require("util"); + var utils_1 = require_utils16(); + var create_scripts_1 = require_create_scripts(); + var backoffs_1 = require_backoffs(); + var unrecoverable_error_1 = require_unrecoverable_error(); + var enums_1 = require_enums3(); + var logger = (0, util_1.debuglog)("bull"); + exports2.PRIORITY_LIMIT = 2 ** 21 - 1; + var Job = class _Job { + constructor(queue, name, data, opts = {}, id) { + this.queue = queue; + this.name = name; + this.data = data; + this.opts = opts; + this.id = id; + this.progress = 0; + this.returnvalue = null; + this.stacktrace = null; + this.delay = 0; + this.priority = 0; + this.attemptsStarted = 0; + this.attemptsMade = 0; + this.stalledCounter = 0; + const _a = this.opts, { repeatJobKey } = _a, restOpts = tslib_1.__rest(_a, ["repeatJobKey"]); + this.opts = Object.assign({ + attempts: 0 + }, restOpts); + this.delay = this.opts.delay; + this.priority = this.opts.priority || 0; + this.repeatJobKey = repeatJobKey; + this.timestamp = opts.timestamp ? opts.timestamp : Date.now(); + this.opts.backoff = backoffs_1.Backoffs.normalize(opts.backoff); + this.parentKey = (0, utils_1.getParentKey)(opts.parent); + if (opts.parent) { + this.parent = { id: opts.parent.id, queueKey: opts.parent.queue }; + if (opts.failParentOnFailure) { + this.parent.fpof = true; + } + if (opts.removeDependencyOnFailure) { + this.parent.rdof = true; + } + if (opts.ignoreDependencyOnFailure) { + this.parent.idof = true; + } + if (opts.continueParentOnFailure) { + this.parent.cpof = true; + } + } + this.debounceId = opts.debounce ? opts.debounce.id : void 0; + this.deduplicationId = opts.deduplication ? opts.deduplication.id : this.debounceId; + this.toKey = queue.toKey.bind(queue); + this.createScripts(); + this.queueQualifiedName = queue.qualifiedName; + } + /** + * Creates a new job and adds it to the queue. + * + * @param queue - the queue where to add the job. + * @param name - the name of the job. + * @param data - the payload of the job. It will be serialized with + * `JSON.stringify` before being stored in Redis, so it must be + * JSON-serializable. Class instances are flattened to plain objects and + * lose their prototype methods on the worker side; see the + * {@link Job} class for details. + * @param opts - the options bag for this job. + * @returns The created Job instance + */ + static async create(queue, name, data, opts) { + const client = await queue.client; + const job = new this(queue, name, data, opts, opts && opts.jobId); + job.id = await job.addJob(client, { + parentKey: job.parentKey, + parentDependenciesKey: job.parentKey ? `${job.parentKey}:dependencies` : "" + }); + return job; + } + /** + * Creates a bulk of jobs and adds them atomically to the given queue. + * + * @param queue - the queue where to add the jobs. + * @param jobs - an array of jobs to be added to the queue. + * @returns The created Job instances + */ + static async createBulk(queue, jobs) { + const client = await queue.client; + const jobInstances = jobs.map((job) => { + var _a; + return new this(queue, job.name, job.data, job.opts, (_a = job.opts) === null || _a === void 0 ? void 0 : _a.jobId); + }); + const pipeline = client.pipeline(); + for (const job of jobInstances) { + job.addJob(pipeline, { + parentKey: job.parentKey, + parentDependenciesKey: job.parentKey ? `${job.parentKey}:dependencies` : "" + }); + } + const results = await pipeline.exec(); + for (let index = 0; index < results.length; ++index) { + const [err, id] = results[index]; + if (err) { + throw err; + } + jobInstances[index].id = id; + } + return jobInstances; + } + /** + * Instantiates a Job from a JobJsonRaw object (coming from a deserialized JSON object) + * + * @param queue - the queue where the job belongs to. + * @param json - the plain object containing the job. + * @param jobId - an optional job id (overrides the id coming from the JSON object) + * @returns A Job instance reconstructed from the JSON data + */ + static fromJSON(queue, json, jobId) { + const data = JSON.parse(json.data || "{}"); + const opts = _Job.optsFromJSON(json.opts); + const job = new this(queue, json.name, data, opts, json.id || jobId); + job.progress = JSON.parse(json.progress || "0"); + job.delay = parseInt(json.delay); + job.priority = parseInt(json.priority); + job.timestamp = parseInt(json.timestamp); + if (json.finishedOn) { + job.finishedOn = parseInt(json.finishedOn); + } + if (json.processedOn) { + job.processedOn = parseInt(json.processedOn); + } + if (json.rjk) { + job.repeatJobKey = json.rjk; + } + if (json.deid) { + job.debounceId = json.deid; + job.deduplicationId = json.deid; + } + if (json.failedReason) { + job.failedReason = json.failedReason; + } + job.attemptsStarted = parseInt(json.ats || "0"); + job.attemptsMade = parseInt(json.attemptsMade || json.atm || "0"); + job.stalledCounter = parseInt(json.stc || "0"); + if (json.defa) { + job.deferredFailure = json.defa; + } + job.stacktrace = getTraces(json.stacktrace); + if (typeof json.returnvalue === "string") { + job.returnvalue = getReturnValue(json.returnvalue); + } + if (json.parentKey) { + job.parentKey = json.parentKey; + } else { + job.parentKey = void 0; + } + if (json.parent) { + job.parent = JSON.parse(json.parent); + } else { + job.parent = void 0; + } + if (json.pb) { + job.processedBy = json.pb; + } + if (json.nrjid) { + job.nextRepeatableJobId = json.nrjid; + } + return job; + } + createScripts() { + var _a; + this.scripts = (_a = this.queue.scripts) !== null && _a !== void 0 ? _a : (0, create_scripts_1.createScripts)(this.queue); + } + static optsFromJSON(rawOpts, optsDecode = utils_1.optsDecodeMap) { + const opts = JSON.parse(rawOpts || "{}"); + const optionEntries = Object.entries(opts); + const options = {}; + for (const item of optionEntries) { + const [attributeName, value] = item; + if (optsDecode[attributeName]) { + options[optsDecode[attributeName]] = value; + } else { + if (attributeName === "tm") { + options.telemetry = Object.assign(Object.assign({}, options.telemetry), { metadata: value }); + } else if (attributeName === "omc") { + options.telemetry = Object.assign(Object.assign({}, options.telemetry), { omitContext: value }); + } else { + options[attributeName] = value; + } + } + } + return options; + } + /** + * Fetches a Job from the queue given the passed job id. + * + * @param queue - the queue where the job belongs to. + * @param jobId - the job id. + * @returns + */ + static async fromId(queue, jobId) { + if (jobId) { + const client = await queue.client; + const jobData = await client.hgetall(queue.toKey(jobId)); + return (0, utils_1.isEmpty)(jobData) ? void 0 : this.fromJSON(queue, jobData, jobId); + } + } + /** + * addJobLog + * + * @param queue - A minimal queue instance + * @param jobId - Job id + * @param logRow - String with a row of log data to be logged + * @param keepLogs - The optional amount of log entries to preserve + * + * @returns The total number of log entries for this job so far. + */ + static addJobLog(queue, jobId, logRow, keepLogs) { + var _a; + const scripts = (_a = queue.scripts) !== null && _a !== void 0 ? _a : (0, create_scripts_1.createScripts)(queue); + return scripts.addLog(jobId, logRow, keepLogs); + } + toJSON() { + const _a = this, { queue, scripts } = _a, withoutQueueAndScripts = tslib_1.__rest(_a, ["queue", "scripts"]); + return withoutQueueAndScripts; + } + /** + * Prepares a job to be serialized for storage in Redis. + * @returns + */ + asJSON() { + return (0, utils_1.removeUndefinedFields)({ + id: this.id, + name: this.name, + data: JSON.stringify(typeof this.data === "undefined" ? {} : this.data), + opts: _Job.optsAsJSON(this.opts), + parent: this.parent ? Object.assign({}, this.parent) : void 0, + parentKey: this.parentKey, + progress: this.progress, + attemptsMade: this.attemptsMade, + attemptsStarted: this.attemptsStarted, + stalledCounter: this.stalledCounter, + finishedOn: this.finishedOn, + processedOn: this.processedOn, + timestamp: this.timestamp, + failedReason: JSON.stringify(this.failedReason), + stacktrace: JSON.stringify(this.stacktrace), + debounceId: this.debounceId, + deduplicationId: this.deduplicationId, + repeatJobKey: this.repeatJobKey, + returnvalue: JSON.stringify(this.returnvalue), + nrjid: this.nextRepeatableJobId + }); + } + static optsAsJSON(opts = {}, optsEncode = utils_1.optsEncodeMap) { + const optionEntries = Object.entries(opts); + const options = {}; + for (const [attributeName, value] of optionEntries) { + if (typeof value === "undefined") { + continue; + } + if (attributeName in optsEncode) { + const compressableAttribute = attributeName; + const key = optsEncode[compressableAttribute]; + options[key] = value; + } else { + if (attributeName === "telemetry") { + if (value.metadata !== void 0) { + options.tm = value.metadata; + } + if (value.omitContext !== void 0) { + options.omc = value.omitContext; + } + } else { + options[attributeName] = value; + } + } + } + return options; + } + /** + * Prepares a job to be passed to Sandbox. + * @returns + */ + asJSONSandbox() { + return Object.assign(Object.assign({}, this.asJSON()), { queueName: this.queueName, queueQualifiedName: this.queueQualifiedName, prefix: this.prefix }); + } + /** + * Updates a job's data + * + * @param data - the data that will replace the current jobs data. + */ + updateData(data) { + this.data = data; + return this.scripts.updateData(this, data); + } + /** + * Updates a job's progress + * + * @param progress - number or object to be saved as progress. + */ + async updateProgress(progress) { + this.progress = progress; + await this.scripts.updateProgress(this.id, progress); + this.queue.emit("progress", this, progress); + } + /** + * Logs one row of log data. + * + * @param logRow - string with log data to be logged. + * @returns The total number of log entries for this job so far. + */ + async log(logRow) { + return _Job.addJobLog(this.queue, this.id, logRow, this.opts.keepLogs); + } + /** + * Removes child dependency from parent when child is not yet finished + * + * @returns True if the relationship existed and if it was removed. + */ + async removeChildDependency() { + const childDependencyIsRemoved = await this.scripts.removeChildDependency(this.id, this.parentKey); + if (childDependencyIsRemoved) { + this.parent = void 0; + this.parentKey = void 0; + return true; + } + return false; + } + /** + * Clears job's logs + * + * @param keepLogs - the amount of log entries to preserve + */ + async clearLogs(keepLogs) { + const client = await this.queue.client; + const logsKey = this.toKey(this.id) + ":logs"; + if (keepLogs) { + await client.ltrim(logsKey, -keepLogs, -1); + } else { + await client.del(logsKey); + } + } + /** + * Completely remove the job from the queue. + * Note, this call will throw an exception if the job + * is being processed when the call is performed. + * + * @param opts - Options to remove a job + */ + async remove({ removeChildren = true } = {}) { + await this.queue.waitUntilReady(); + const queue = this.queue; + const job = this; + const removed = await this.scripts.remove(job.id, removeChildren); + if (removed) { + queue.emit("removed", job); + } else { + throw new Error(`Job ${this.id} could not be removed because it is locked by another worker`); + } + } + /** + * Remove all children from this job that are not yet processed, + * in other words that are in any other state than completed, failed or active. + * + * @remarks + * - Jobs with locks (most likely active) are ignored. + * - This method can be slow if the number of children is large (\> 1000). + */ + async removeUnprocessedChildren() { + const jobId = this.id; + await this.scripts.removeUnprocessedChildren(jobId); + } + /** + * Extend the lock for this job. + * + * @param token - unique token for the lock + * @param duration - lock duration in milliseconds + */ + extendLock(token, duration) { + return this.scripts.extendLock(this.id, token, duration); + } + /** + * Moves a job to the completed queue. + * Returned job to be used with Queue.prototype.nextJobFromJobData. + * + * @param returnValue - The jobs success message. + * @param token - Worker token used to acquire completed job. + * @param fetchNext - True when wanting to fetch the next job. + * @returns Returns the jobData of the next job in the waiting queue or void. + */ + async moveToCompleted(returnValue, token, fetchNext = true) { + return this.queue.trace(enums_1.SpanKind.INTERNAL, "complete", this.queue.name, async (span) => { + this.setSpanJobAttributes(span); + await this.queue.waitUntilReady(); + this.returnvalue = returnValue || void 0; + const stringifiedReturnValue = (0, utils_1.tryCatch)(JSON.stringify, JSON, [ + returnValue + ]); + if (stringifiedReturnValue === utils_1.errorObject) { + throw utils_1.errorObject.value; + } + const args = this.scripts.moveToCompletedArgs(this, stringifiedReturnValue, this.opts.removeOnComplete, token, fetchNext); + const result = await this.scripts.moveToFinished(this.id, args); + this.finishedOn = args[this.scripts.moveToFinishedKeys.length + 1]; + this.attemptsMade += 1; + this.recordJobMetrics("completed"); + return result; + }); + } + /** + * Moves a job to the wait or prioritized state. + * + * @param token - Worker token used to acquire completed job. + * @returns Returns pttl. + */ + async moveToWait(token) { + const result = await this.scripts.moveJobFromActiveToWait(this.id, token); + this.recordJobMetrics("waiting"); + return result; + } + async shouldRetryJob(err) { + if (this.attemptsMade + 1 < this.opts.attempts && !this.discarded && !(err instanceof unrecoverable_error_1.UnrecoverableError || err.name == "UnrecoverableError")) { + const opts = this.queue.opts; + const delay = await backoffs_1.Backoffs.calculate(this.opts.backoff, this.attemptsMade + 1, err, this, opts.settings && opts.settings.backoffStrategy); + return [delay == -1 ? false : true, delay == -1 ? 0 : delay]; + } else { + return [false, 0]; + } + } + /** + * Moves a job to the failed queue. + * + * @param err - the jobs error message. + * @param token - token to check job is locked by current worker + * @param fetchNext - true when wanting to fetch the next job + * @returns Returns the jobData of the next job in the waiting queue or void. + */ + async moveToFailed(err, token, fetchNext = false) { + this.failedReason = err === null || err === void 0 ? void 0 : err.message; + const [shouldRetry, retryDelay] = await this.shouldRetryJob(err); + return this.queue.trace(enums_1.SpanKind.INTERNAL, this.getSpanOperation(shouldRetry, retryDelay), this.queue.name, async (span, dstPropagationMetadata) => { + var _a, _b; + this.setSpanJobAttributes(span); + let tm; + if (!((_b = (_a = this.opts) === null || _a === void 0 ? void 0 : _a.telemetry) === null || _b === void 0 ? void 0 : _b.omitContext) && dstPropagationMetadata) { + tm = dstPropagationMetadata; + } + let result; + this.updateStacktrace(err); + const fieldsToUpdate = { + failedReason: this.failedReason, + stacktrace: JSON.stringify(this.stacktrace), + tm + }; + let finishedOn; + if (shouldRetry) { + if (retryDelay) { + result = await this.scripts.moveToDelayed(this.id, Date.now(), retryDelay, token, { fieldsToUpdate, fetchNext }); + this.recordJobMetrics("delayed"); + } else { + result = await this.scripts.retryJob(this.id, this.opts.lifo, token, { + fieldsToUpdate + }); + this.recordJobMetrics("retried"); + } + } else { + const args = this.scripts.moveToFailedArgs(this, this.failedReason, this.opts.removeOnFail, token, fetchNext, fieldsToUpdate); + result = await this.scripts.moveToFinished(this.id, args); + finishedOn = args[this.scripts.moveToFinishedKeys.length + 1]; + this.recordJobMetrics("failed"); + } + if (finishedOn && typeof finishedOn === "number") { + this.finishedOn = finishedOn; + } + if (retryDelay && typeof retryDelay === "number") { + this.delay = retryDelay; + } + this.attemptsMade += 1; + return result; + }); + } + getSpanOperation(shouldRetry, retryDelay) { + if (shouldRetry) { + if (retryDelay) { + return "delay"; + } + return "retry"; + } + return "fail"; + } + /** + * Records job metrics if a meter is configured in telemetry options. + * + * @param state - The job state + */ + recordJobMetrics(state) { + var _a, _b; + const meter = (_b = (_a = this.queue.opts) === null || _a === void 0 ? void 0 : _a.telemetry) === null || _b === void 0 ? void 0 : _b.meter; + if (!meter) { + return; + } + const attributes = { + [enums_1.TelemetryAttributes.QueueName]: this.queue.name, + [enums_1.TelemetryAttributes.JobName]: this.name, + [enums_1.TelemetryAttributes.JobStatus]: state, + [enums_1.TelemetryAttributes.JobState]: state + }; + const statusToCounterName = { + completed: enums_1.MetricNames.JobsCompleted, + failed: enums_1.MetricNames.JobsFailed, + delayed: enums_1.MetricNames.JobsDelayed, + retried: enums_1.MetricNames.JobsRetried, + waiting: enums_1.MetricNames.JobsWaiting, + "waiting-children": enums_1.MetricNames.JobsWaitingChildren + }; + const counterName = statusToCounterName[state]; + const counter = meter.createCounter(counterName, { + description: `Number of jobs ${state}`, + unit: "1" + }); + counter.add(1, attributes); + if (this.processedOn) { + const duration = Date.now() - this.processedOn; + const histogram = meter.createHistogram(enums_1.MetricNames.JobDuration, { + description: "Job processing duration", + unit: "ms" + }); + histogram.record(duration, attributes); + } + } + /** + * @returns true if the job has completed. + */ + isCompleted() { + return this.isInZSet("completed"); + } + /** + * @returns true if the job has failed. + */ + isFailed() { + return this.isInZSet("failed"); + } + /** + * @returns true if the job is delayed. + */ + isDelayed() { + return this.isInZSet("delayed"); + } + /** + * @returns true if the job is waiting for children. + */ + isWaitingChildren() { + return this.isInZSet("waiting-children"); + } + /** + * @returns true of the job is active. + */ + isActive() { + return this.isInList("active"); + } + /** + * @returns true if the job is waiting. + */ + async isWaiting() { + return await this.isInList("wait") || await this.isInList("paused"); + } + /** + * @returns the queue name this job belongs to. + */ + get queueName() { + return this.queue.name; + } + /** + * @returns the prefix that is used. + */ + get prefix() { + return this.queue.opts.prefix; + } + /** + * Get current state. + * + * @returns Returns one of these values: + * 'completed', 'failed', 'delayed', 'active', 'waiting', 'waiting-children', 'unknown'. + */ + getState() { + return this.scripts.getState(this.id); + } + /** + * Change delay of a delayed job. + * + * Reschedules a delayed job by setting a new delay from the current time. + * For example, calling changeDelay(5000) will reschedule the job to execute + * 5000 milliseconds (5 seconds) from now, regardless of the original delay. + * + * @param delay - milliseconds from now when the job should be processed. + * @returns void + * @throws JobNotExist + * This exception is thrown if jobId is missing. + * @throws JobNotInState + * This exception is thrown if job is not in delayed state. + */ + async changeDelay(delay) { + await this.scripts.changeDelay(this.id, delay); + this.delay = delay; + } + /** + * Change job priority. + * + * @param opts - options containing priority and lifo values. + * @returns void + */ + async changePriority(opts) { + await this.scripts.changePriority(this.id, opts.priority, opts.lifo); + this.priority = opts.priority || 0; + } + /** + * Get this jobs children result values if any. + * + * @returns Object mapping children job keys with their values. + */ + async getChildrenValues() { + const client = await this.queue.client; + const result = await client.hgetall(this.toKey(`${this.id}:processed`)); + if (result) { + return (0, utils_1.parseObjectValues)(result); + } + } + /** + * Retrieves the failures of child jobs that were explicitly ignored while using ignoreDependencyOnFailure option. + * This method is useful for inspecting which child jobs were intentionally ignored when an error occurred. + * @see {@link https://docs.bullmq.io/guide/flows/ignore-dependency} + * + * @returns Object mapping children job keys with their failure values. + */ + async getIgnoredChildrenFailures() { + const client = await this.queue.client; + return client.hgetall(this.toKey(`${this.id}:failed`)); + } + /** + * Get job's children failure values that were ignored if any. + * + * @deprecated This method is deprecated and will be removed in v6. Use getIgnoredChildrenFailures instead. + * + * @returns Object mapping children job keys with their failure values. + */ + async getFailedChildrenValues() { + const client = await this.queue.client; + return client.hgetall(this.toKey(`${this.id}:failed`)); + } + /** + * Get children job keys if this job is a parent and has children. + * @remarks + * Count options before Redis v7.2 works as expected with any quantity of entries + * on processed/unprocessed dependencies, since v7.2 you must consider that count + * won't have any effect until processed/unprocessed dependencies have a length + * greater than 127 + * @see {@link https://redis.io/docs/management/optimization/memory-optimization/#redis--72} + * @see {@link https://docs.bullmq.io/guide/flows#getters} + * @returns dependencies separated by processed, unprocessed, ignored and failed. + */ + async getDependencies(opts = {}) { + const client = await this.queue.client; + const multi = client.pipeline(); + if (!opts.processed && !opts.unprocessed && !opts.ignored && !opts.failed) { + multi.hgetall(this.toKey(`${this.id}:processed`)); + multi.smembers(this.toKey(`${this.id}:dependencies`)); + multi.hgetall(this.toKey(`${this.id}:failed`)); + multi.zrange(this.toKey(`${this.id}:unsuccessful`), 0, -1); + const [[err1, processed], [err2, unprocessed], [err3, ignored], [err4, failed]] = await multi.exec(); + return { + processed: (0, utils_1.parseObjectValues)(processed), + unprocessed, + failed, + ignored + }; + } else { + const defaultOpts = { + cursor: 0, + count: 20 + }; + const childrenResultOrder = []; + if (opts.processed) { + childrenResultOrder.push("processed"); + const processedOpts = Object.assign(Object.assign({}, defaultOpts), opts.processed); + multi.hscan(this.toKey(`${this.id}:processed`), processedOpts.cursor, { + COUNT: processedOpts.count + }); + } + if (opts.unprocessed) { + childrenResultOrder.push("unprocessed"); + const unprocessedOpts = Object.assign(Object.assign({}, defaultOpts), opts.unprocessed); + multi.sscan(this.toKey(`${this.id}:dependencies`), unprocessedOpts.cursor, { COUNT: unprocessedOpts.count }); + } + if (opts.ignored) { + childrenResultOrder.push("ignored"); + const ignoredOpts = Object.assign(Object.assign({}, defaultOpts), opts.ignored); + multi.hscan(this.toKey(`${this.id}:failed`), ignoredOpts.cursor, { + COUNT: ignoredOpts.count + }); + } + let failedCursor; + if (opts.failed) { + childrenResultOrder.push("failed"); + const failedOpts = Object.assign(Object.assign({}, defaultOpts), opts.failed); + failedCursor = failedOpts.cursor + failedOpts.count; + multi.zrange(this.toKey(`${this.id}:unsuccessful`), failedOpts.cursor, failedOpts.count - 1); + } + const results = await multi.exec(); + let processedCursor, processed, unprocessedCursor, unprocessed, failed, ignoredCursor, ignored; + childrenResultOrder.forEach((key, index) => { + switch (key) { + case "processed": { + processedCursor = results[index][1][0]; + const rawProcessed = results[index][1][1]; + const transformedProcessed = {}; + for (let ind = 0; ind < rawProcessed.length; ++ind) { + if (ind % 2) { + transformedProcessed[rawProcessed[ind - 1]] = JSON.parse(rawProcessed[ind]); + } + } + processed = transformedProcessed; + break; + } + case "failed": { + failed = results[index][1]; + break; + } + case "ignored": { + ignoredCursor = results[index][1][0]; + const rawIgnored = results[index][1][1]; + const transformedIgnored = {}; + for (let ind = 0; ind < rawIgnored.length; ++ind) { + if (ind % 2) { + transformedIgnored[rawIgnored[ind - 1]] = rawIgnored[ind]; + } + } + ignored = transformedIgnored; + break; + } + case "unprocessed": { + unprocessedCursor = results[index][1][0]; + unprocessed = results[index][1][1]; + break; + } + } + }); + return Object.assign(Object.assign(Object.assign(Object.assign({}, processedCursor ? { + processed, + nextProcessedCursor: Number(processedCursor) + } : {}), ignoredCursor ? { + ignored, + nextIgnoredCursor: Number(ignoredCursor) + } : {}), failedCursor ? { + failed, + nextFailedCursor: failedCursor + } : {}), unprocessedCursor ? { unprocessed, nextUnprocessedCursor: Number(unprocessedCursor) } : {}); + } + } + /** + * Get children job counts if this job is a parent and has children. + * + * @returns dependencies count separated by processed, unprocessed, ignored and failed. + */ + async getDependenciesCount(opts = {}) { + const types = []; + Object.entries(opts).forEach(([key, value]) => { + if (value) { + types.push(key); + } + }); + const finalTypes = types.length ? types : ["processed", "unprocessed", "ignored", "failed"]; + const responses = await this.scripts.getDependencyCounts(this.id, finalTypes); + const counts = {}; + responses.forEach((res, index) => { + counts[`${finalTypes[index]}`] = res || 0; + }); + return counts; + } + /** + * Returns a promise the resolves when the job has completed (containing the return value of the job), + * or rejects when the job has failed (containing the failedReason). + * + * @param queueEvents - Instance of QueueEvents. + * @param ttl - Time in milliseconds to wait for job to finish before timing out. + */ + async waitUntilFinished(queueEvents, ttl) { + await this.queue.waitUntilReady(); + const jobId = this.id; + return new Promise(async (resolve, reject) => { + let timeout; + if (ttl) { + timeout = setTimeout(() => onFailed( + /* eslint-disable max-len */ + `Job wait ${this.name} timed out before finishing, no finish notification arrived after ${ttl}ms (id=${jobId})` + ), ttl); + } + function onCompleted(args) { + removeListeners(); + resolve(args.returnvalue); + } + function onFailed(args) { + removeListeners(); + reject(new Error(args.failedReason || args)); + } + const completedEvent = `completed:${jobId}`; + const failedEvent = `failed:${jobId}`; + queueEvents.on(completedEvent, onCompleted); + queueEvents.on(failedEvent, onFailed); + this.queue.on("closing", onFailed); + const removeListeners = () => { + clearInterval(timeout); + queueEvents.removeListener(completedEvent, onCompleted); + queueEvents.removeListener(failedEvent, onFailed); + this.queue.removeListener("closing", onFailed); + }; + await queueEvents.waitUntilReady(); + const [status, result] = await this.scripts.isFinished(jobId, true); + const finished = status != 0; + if (finished) { + if (status == -1 || status == 2) { + onFailed({ failedReason: result }); + } else { + onCompleted({ returnvalue: getReturnValue(result) }); + } + } + }); + } + /** + * Moves the job to the delay set. + * + * @param timestamp - timestamp when the job should be moved back to "wait" + * @param token - token to check job is locked by current worker + * @returns + */ + async moveToDelayed(timestamp, token) { + const now = Date.now(); + const delay = timestamp - now; + const finalDelay = delay > 0 ? delay : 0; + await this.scripts.moveToDelayed(this.id, now, finalDelay, token, { + skipAttempt: true + }); + this.delay = finalDelay; + this.recordJobMetrics("delayed"); + } + /** + * Moves the job to the waiting-children set. + * + * @param token - Token to check job is locked by current worker + * @param opts - The options bag for moving a job to waiting-children. + * @returns true if the job was moved + */ + async moveToWaitingChildren(token, opts = {}) { + const movedToWaitingChildren = await this.scripts.moveToWaitingChildren(this.id, token, opts); + if (movedToWaitingChildren) { + this.recordJobMetrics("waiting-children"); + } + return movedToWaitingChildren; + } + /** + * Promotes a delayed job so that it starts to be processed as soon as possible. + */ + async promote() { + const jobId = this.id; + await this.scripts.promote(jobId); + this.delay = 0; + } + /** + * Attempts to retry the job. Only a job that has failed or completed can be retried. + * + * @param state - completed / failed + * @param opts - options to retry a job + * @returns A promise that resolves when the job has been successfully moved to the wait queue. + * The queue emits a waiting event when the job is successfully moved. + * @throws Will throw an error if the job does not exist, is locked, or is not in the expected state. + */ + async retry(state = "failed", opts = {}) { + await this.scripts.reprocessJob(this, state, opts); + this.failedReason = null; + this.finishedOn = null; + this.processedOn = null; + this.returnvalue = null; + if (opts.resetAttemptsMade) { + this.attemptsMade = 0; + } + if (opts.resetAttemptsStarted) { + this.attemptsStarted = 0; + } + } + /** + * Marks a job to not be retried if it fails (even if attempts has been configured) + * @deprecated use UnrecoverableError + */ + discard() { + this.discarded = true; + } + async isInZSet(set) { + const client = await this.queue.client; + const score = await client.zscore(this.queue.toKey(set), this.id); + return score !== null; + } + async isInList(list) { + return this.scripts.isJobInList(this.queue.toKey(list), this.id); + } + /** + * Adds the job to Redis. + * + * @param client - The Redis client to use for adding the job. + * @param parentOpts - Options for the parent-child relationship. + * @returns The job ID + */ + addJob(client, parentOpts) { + const jobData = this.asJSON(); + this.validateOptions(jobData); + return this.scripts.addJob(client, jobData, jobData.opts, this.id, parentOpts); + } + /** + * Removes a deduplication key if job is still the cause of deduplication. + * @returns true if the deduplication key was removed. + */ + async removeDeduplicationKey() { + if (this.deduplicationId) { + const result = await this.scripts.removeDeduplicationKey(this.deduplicationId, this.id); + return result > 0; + } + return false; + } + validateOptions(jobData) { + var _a, _b, _c, _d, _e, _f, _g, _h; + const exclusiveOptions = [ + "removeDependencyOnFailure", + "failParentOnFailure", + "continueParentOnFailure", + "ignoreDependencyOnFailure" + ]; + const exceedLimit = this.opts.sizeLimit && (0, utils_1.lengthInUtf8Bytes)(jobData.data) > this.opts.sizeLimit; + if (exceedLimit) { + throw new Error(`The size of job ${this.name} exceeds the limit ${this.opts.sizeLimit} bytes`); + } + if (this.opts.delay && this.opts.repeat && !((_a = this.opts.repeat) === null || _a === void 0 ? void 0 : _a.count)) { + throw new Error(`Delay and repeat options cannot be used together`); + } + const enabledExclusiveOptions = exclusiveOptions.filter((opt) => this.opts[opt]); + if (enabledExclusiveOptions.length > 1) { + const optionsList = enabledExclusiveOptions.join(", "); + throw new Error(`The following options cannot be used together: ${optionsList}`); + } + if ((_b = this.opts) === null || _b === void 0 ? void 0 : _b.jobId) { + if (`${parseInt(this.opts.jobId, 10)}` === ((_c = this.opts) === null || _c === void 0 ? void 0 : _c.jobId)) { + throw new Error("Custom Id cannot be integers"); + } + if (((_d = this.opts) === null || _d === void 0 ? void 0 : _d.jobId.includes(":")) && ((_f = (_e = this.opts) === null || _e === void 0 ? void 0 : _e.jobId) === null || _f === void 0 ? void 0 : _f.split(":").length) !== 3) { + throw new Error("Custom Id cannot contain :"); + } + } + if (this.opts.priority) { + if (Math.trunc(this.opts.priority) !== this.opts.priority) { + throw new Error(`Priority should not be float`); + } + if (this.opts.priority > exports2.PRIORITY_LIMIT) { + throw new Error(`Priority should be between 0 and ${exports2.PRIORITY_LIMIT}`); + } + } + if (this.opts.deduplication) { + if (!((_g = this.opts.deduplication) === null || _g === void 0 ? void 0 : _g.id)) { + throw new Error("Deduplication id must be provided"); + } + if (this.parentKey) { + throw new Error("Deduplication and parent options cannot be used together"); + } + } + if (this.opts.debounce) { + if (!((_h = this.opts.debounce) === null || _h === void 0 ? void 0 : _h.id)) { + throw new Error("Debounce id must be provided"); + } + if (this.parentKey) { + throw new Error("Debounce and parent options cannot be used together"); + } + } + if (typeof this.opts.backoff === "object" && typeof this.opts.backoff.jitter === "number") { + if (this.opts.backoff.jitter < 0 || this.opts.backoff.jitter > 1) { + throw new Error(`Jitter should be between 0 and 1`); + } + } + } + updateStacktrace(err) { + this.stacktrace = this.stacktrace || []; + if (err === null || err === void 0 ? void 0 : err.stack) { + this.stacktrace.push(err.stack); + if (this.opts.stackTraceLimit === 0) { + this.stacktrace = []; + } else if (this.opts.stackTraceLimit) { + this.stacktrace = this.stacktrace.slice(-this.opts.stackTraceLimit); + } + } + } + setSpanJobAttributes(span) { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.JobName]: this.name, + [enums_1.TelemetryAttributes.JobId]: this.id + }); + } + }; + exports2.Job = Job; + function getTraces(stacktrace) { + if (!stacktrace) { + return []; + } + const traces = (0, utils_1.tryCatch)(JSON.parse, JSON, [stacktrace]); + if (traces === utils_1.errorObject || !(traces instanceof Array)) { + return []; + } else { + return traces; + } + } + function getReturnValue(_value) { + const value = (0, utils_1.tryCatch)(JSON.parse, JSON, [_value]); + if (value !== utils_1.errorObject) { + return value; + } else { + logger("corrupted returnvalue: " + _value, value); + } + } + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/queue-keys.js +var require_queue_keys = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/queue-keys.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QueueKeys = void 0; + var QueueKeys = class { + constructor(prefix = "bull") { + this.prefix = prefix; + } + getKeys(name) { + const keys = {}; + [ + "", + "active", + "wait", + "waiting-children", + "paused", + "id", + "delayed", + "prioritized", + "stalled-check", + "completed", + "failed", + "stalled", + "repeat", + "limiter", + "meta", + "events", + "pc", + // priority counter key + "marker", + // marker key + "de" + // deduplication key + ].forEach((key) => { + keys[key] = this.toKey(name, key); + }); + return keys; + } + toKey(name, type) { + return `${this.getQueueQualifiedName(name)}:${type}`; + } + getQueueQualifiedName(name) { + return `${this.prefix}:${name}`; + } + }; + exports2.QueueKeys = QueueKeys; + } +}); + +// ../../node_modules/.pnpm/@ioredis+commands@1.10.0/node_modules/@ioredis/commands/built/commands.json +var require_commands = __commonJS({ + "../../node_modules/.pnpm/@ioredis+commands@1.10.0/node_modules/@ioredis/commands/built/commands.json"(exports2, module2) { + module2.exports = { + vadd: { + arity: -5, + flags: [ + "write", + "denyoom", + "module" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + vcard: { + arity: 2, + flags: [ + "readonly", + "module", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + vdim: { + arity: 2, + flags: [ + "readonly", + "module", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + vemb: { + arity: -3, + flags: [ + "readonly", + "module", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + vgetattr: { + arity: 3, + flags: [ + "readonly", + "module", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + vinfo: { + arity: 2, + flags: [ + "readonly", + "module", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + vismember: { + arity: 3, + flags: [ + "readonly", + "module" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + vlinks: { + arity: -3, + flags: [ + "readonly", + "module", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + vrandmember: { + arity: -2, + flags: [ + "readonly", + "module" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + vrange: { + arity: -4, + flags: [ + "readonly", + "module" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + vrem: { + arity: 3, + flags: [ + "write", + "module" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + vsetattr: { + arity: 4, + flags: [ + "write", + "module", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + vsim: { + arity: -4, + flags: [ + "readonly", + "module" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + acl: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + append: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + arcount: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + ardel: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + ardelrange: { + arity: -4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + arget: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + argetrange: { + arity: 4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + argrep: { + arity: -6, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + arinfo: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + arinsert: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + arlastitems: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + arlen: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + armget: { + arity: -3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + armset: { + arity: -4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + arnext: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + arop: { + arity: -5, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + arring: { + arity: -4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + arscan: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + arseek: { + arity: 3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + arset: { + arity: -4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + asking: { + arity: 1, + flags: [ + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + auth: { + arity: -2, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "no_auth", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + bgrewriteaof: { + arity: 1, + flags: [ + "admin", + "noscript", + "no_async_loading" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + bgsave: { + arity: -1, + flags: [ + "admin", + "noscript", + "no_async_loading" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + bitcount: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + bitfield: { + arity: -2, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + bitfield_ro: { + arity: -2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + bitop: { + arity: -4, + flags: [ + "write", + "denyoom" + ], + keyStart: 2, + keyStop: -1, + step: 1 + }, + bitpos: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + blmove: { + arity: 6, + flags: [ + "write", + "denyoom", + "noscript", + "blocking" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + blmpop: { + arity: -5, + flags: [ + "write", + "blocking", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + blpop: { + arity: -3, + flags: [ + "write", + "noscript", + "blocking" + ], + keyStart: 1, + keyStop: -2, + step: 1 + }, + brpop: { + arity: -3, + flags: [ + "write", + "noscript", + "blocking" + ], + keyStart: 1, + keyStop: -2, + step: 1 + }, + brpoplpush: { + arity: 4, + flags: [ + "write", + "denyoom", + "noscript", + "blocking" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + bzmpop: { + arity: -5, + flags: [ + "write", + "blocking", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + bzpopmax: { + arity: -3, + flags: [ + "write", + "noscript", + "blocking", + "fast" + ], + keyStart: 1, + keyStop: -2, + step: 1 + }, + bzpopmin: { + arity: -3, + flags: [ + "write", + "noscript", + "blocking", + "fast" + ], + keyStart: 1, + keyStop: -2, + step: 1 + }, + client: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + cluster: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + command: { + arity: -1, + flags: [ + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + config: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + copy: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + dbsize: { + arity: 1, + flags: [ + "readonly", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + debug: { + arity: -2, + flags: [ + "admin", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + decr: { + arity: 2, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + decrby: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + del: { + arity: -2, + flags: [ + "write" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + discard: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + dump: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + echo: { + arity: 2, + flags: [ + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + eval: { + arity: -3, + flags: [ + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + eval_ro: { + arity: -3, + flags: [ + "readonly", + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + evalsha: { + arity: -3, + flags: [ + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + evalsha_ro: { + arity: -3, + flags: [ + "readonly", + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + exec: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "skip_slowlog" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + exists: { + arity: -2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + expire: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + expireat: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + expiretime: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + failover: { + arity: -1, + flags: [ + "admin", + "noscript", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + fcall: { + arity: -3, + flags: [ + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + fcall_ro: { + arity: -3, + flags: [ + "readonly", + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + flushall: { + arity: -1, + flags: [ + "write" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + flushdb: { + arity: -1, + flags: [ + "write" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + function: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + geoadd: { + arity: -5, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + geodist: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + geohash: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + geopos: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + georadius: { + arity: -6, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + georadius_ro: { + arity: -6, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + georadiusbymember: { + arity: -5, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + georadiusbymember_ro: { + arity: -5, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + geosearch: { + arity: -7, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + geosearchstore: { + arity: -8, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + get: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + getbit: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + getdel: { + arity: 2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + getex: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + getrange: { + arity: 4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + getset: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hdel: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hello: { + arity: -1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "no_auth", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + hexists: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hexpire: { + arity: -6, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hexpireat: { + arity: -6, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hexpiretime: { + arity: -5, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hget: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hgetall: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hgetdel: { + arity: -5, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hgetex: { + arity: -5, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hincrby: { + arity: 4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hincrbyfloat: { + arity: 4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hkeys: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hlen: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hmget: { + arity: -3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hmset: { + arity: -4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hpersist: { + arity: -5, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hpexpire: { + arity: -6, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hpexpireat: { + arity: -6, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hpexpiretime: { + arity: -5, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hpttl: { + arity: -5, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hrandfield: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hscan: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hset: { + arity: -4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hsetex: { + arity: -6, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hsetnx: { + arity: 4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hstrlen: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + httl: { + arity: -5, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hvals: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + incr: { + arity: 2, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + incrby: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + incrbyfloat: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + increx: { + arity: -2, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + info: { + arity: -1, + flags: [ + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + keys: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + lastsave: { + arity: 1, + flags: [ + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + latency: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + lcs: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + lindex: { + arity: 3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + linsert: { + arity: 5, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + llen: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lmove: { + arity: 5, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + lmpop: { + arity: -4, + flags: [ + "write", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + lolwut: { + arity: -1, + flags: [ + "readonly", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + lpop: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lpos: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lpush: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lpushx: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lrange: { + arity: 4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lrem: { + arity: 4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lset: { + arity: 4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + ltrim: { + arity: 4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + memory: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + mget: { + arity: -2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + migrate: { + arity: -6, + flags: [ + "write", + "movablekeys" + ], + keyStart: 3, + keyStop: 3, + step: 1 + }, + module: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + monitor: { + arity: 1, + flags: [ + "admin", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + move: { + arity: 3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + mset: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 2 + }, + msetex: { + arity: -4, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + msetnx: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 2 + }, + multi: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + object: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + persist: { + arity: 2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + pexpire: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + pexpireat: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + pexpiretime: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + pfadd: { + arity: -2, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + pfcount: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + pfdebug: { + arity: 3, + flags: [ + "write", + "denyoom", + "admin" + ], + keyStart: 2, + keyStop: 2, + step: 1 + }, + pfmerge: { + arity: -2, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + pfselftest: { + arity: 1, + flags: [ + "admin" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + ping: { + arity: -1, + flags: [ + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + psetex: { + arity: 4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + psubscribe: { + arity: -2, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + psync: { + arity: -3, + flags: [ + "admin", + "noscript", + "no_async_loading", + "no_multi" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + pttl: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + publish: { + arity: 3, + flags: [ + "pubsub", + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + pubsub: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + punsubscribe: { + arity: -1, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + quit: { + arity: -1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "no_auth", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + randomkey: { + arity: 1, + flags: [ + "readonly" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + readonly: { + arity: 1, + flags: [ + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + readwrite: { + arity: 1, + flags: [ + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + rename: { + arity: 3, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + renamenx: { + arity: 3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + replconf: { + arity: -1, + flags: [ + "admin", + "noscript", + "loading", + "stale", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + replicaof: { + arity: 3, + flags: [ + "admin", + "noscript", + "stale", + "no_async_loading" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + reset: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "no_auth", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + restore: { + arity: -4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + "restore-asking": { + arity: -4, + flags: [ + "write", + "denyoom", + "asking" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + role: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + rpop: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + rpoplpush: { + arity: 3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + rpush: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + rpushx: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + sadd: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + save: { + arity: 1, + flags: [ + "admin", + "noscript", + "no_async_loading", + "no_multi" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + scan: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + scard: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + script: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + sdiff: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + sdiffstore: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + select: { + arity: 2, + flags: [ + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + set: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + setbit: { + arity: 4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + setex: { + arity: 4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + setnx: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + setrange: { + arity: 4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + shutdown: { + arity: -1, + flags: [ + "admin", + "noscript", + "loading", + "stale", + "no_multi", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + sinter: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + sintercard: { + arity: -3, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + sinterstore: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + sismember: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + slaveof: { + arity: 3, + flags: [ + "admin", + "noscript", + "stale", + "no_async_loading" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + slowlog: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + smembers: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + smismember: { + arity: -3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + smove: { + arity: 4, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + sort: { + arity: -2, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + sort_ro: { + arity: -2, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + spop: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + spublish: { + arity: 3, + flags: [ + "pubsub", + "loading", + "stale", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + srandmember: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + srem: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + sscan: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + ssubscribe: { + arity: -2, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + strlen: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + subscribe: { + arity: -2, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + substr: { + arity: 4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + sunion: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + sunionstore: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + sunsubscribe: { + arity: -1, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + swapdb: { + arity: 3, + flags: [ + "write", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + sync: { + arity: 1, + flags: [ + "admin", + "noscript", + "no_async_loading", + "no_multi" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + time: { + arity: 1, + flags: [ + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + touch: { + arity: -2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + ttl: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + type: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + unlink: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + unsubscribe: { + arity: -1, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + unwatch: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + wait: { + arity: 3, + flags: [ + "noscript" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + watch: { + arity: -2, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "allow_busy" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + xack: { + arity: -4, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xadd: { + arity: -5, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xautoclaim: { + arity: -6, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xclaim: { + arity: -6, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xdel: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xdelex: { + arity: -5, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xgroup: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + xinfo: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + xlen: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xnack: { + arity: -7, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xpending: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xrange: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xread: { + arity: -4, + flags: [ + "readonly", + "blocking", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + xreadgroup: { + arity: -7, + flags: [ + "write", + "blocking", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + xrevrange: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xsetid: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xtrim: { + arity: -4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zadd: { + arity: -4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zcard: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zcount: { + arity: 4, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zdiff: { + arity: -3, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + zdiffstore: { + arity: -4, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zincrby: { + arity: 4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zinter: { + arity: -3, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + zintercard: { + arity: -3, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + zinterstore: { + arity: -4, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zlexcount: { + arity: 4, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zmpop: { + arity: -4, + flags: [ + "write", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + zmscore: { + arity: -3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zpopmax: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zpopmin: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrandmember: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrange: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrangebylex: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrangebyscore: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrangestore: { + arity: -5, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + zrank: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrem: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zremrangebylex: { + arity: 4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zremrangebyrank: { + arity: 4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zremrangebyscore: { + arity: 4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrevrange: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrevrangebylex: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrevrangebyscore: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrevrank: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zscan: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zscore: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zunion: { + arity: -3, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + zunionstore: { + arity: -4, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + } + }; + } +}); + +// ../../node_modules/.pnpm/@ioredis+commands@1.10.0/node_modules/@ioredis/commands/built/index.js +var require_built = __commonJS({ + "../../node_modules/.pnpm/@ioredis+commands@1.10.0/node_modules/@ioredis/commands/built/index.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getKeyIndexes = exports2.hasFlag = exports2.exists = exports2.list = void 0; + var commands_json_1 = __importDefault2(require_commands()); + exports2.list = Object.keys(commands_json_1.default); + var flags = {}; + exports2.list.forEach((commandName) => { + flags[commandName] = commands_json_1.default[commandName].flags.reduce(function(flags2, flag) { + flags2[flag] = true; + return flags2; + }, {}); + }); + function exists(commandName, options) { + commandName = (options === null || options === void 0 ? void 0 : options.caseInsensitive) ? String(commandName).toLowerCase() : commandName; + return Boolean(commands_json_1.default[commandName]); + } + exports2.exists = exists; + function hasFlag2(commandName, flag, options) { + commandName = (options === null || options === void 0 ? void 0 : options.nameCaseInsensitive) ? String(commandName).toLowerCase() : commandName; + if (!flags[commandName]) { + throw new Error("Unknown command " + commandName); + } + return Boolean(flags[commandName][flag]); + } + exports2.hasFlag = hasFlag2; + function getKeyIndexes(commandName, args, options) { + commandName = (options === null || options === void 0 ? void 0 : options.nameCaseInsensitive) ? String(commandName).toLowerCase() : commandName; + const command = commands_json_1.default[commandName]; + if (!command) { + throw new Error("Unknown command " + commandName); + } + if (!Array.isArray(args)) { + throw new Error("Expect args to be an array"); + } + const keys = []; + const parseExternalKey = Boolean(options && options.parseExternalKey); + const takeDynamicKeys = (args2, startIndex) => { + const keys2 = []; + const keyStop = Number(args2[startIndex]); + for (let i = 0; i < keyStop; i++) { + keys2.push(i + startIndex + 1); + } + return keys2; + }; + const takeKeyAfterToken = (args2, startIndex, token) => { + for (let i = startIndex; i < args2.length - 1; i += 1) { + if (String(args2[i]).toLowerCase() === token.toLowerCase()) { + return i + 1; + } + } + return null; + }; + switch (commandName) { + case "zunionstore": + case "zinterstore": + case "zdiffstore": + keys.push(0, ...takeDynamicKeys(args, 1)); + break; + case "eval": + case "evalsha": + case "eval_ro": + case "evalsha_ro": + case "fcall": + case "fcall_ro": + case "blmpop": + case "bzmpop": + keys.push(...takeDynamicKeys(args, 1)); + break; + case "sintercard": + case "lmpop": + case "zunion": + case "zinter": + case "zmpop": + case "zintercard": + case "zdiff": { + keys.push(...takeDynamicKeys(args, 0)); + break; + } + case "msetex": { + const numKeys = Number(args[0]); + for (let i = 0; i < numKeys; i++) { + keys.push(1 + i * 2); + } + break; + } + case "georadius": { + keys.push(0); + const storeKey = takeKeyAfterToken(args, 5, "STORE"); + if (storeKey) + keys.push(storeKey); + const distKey = takeKeyAfterToken(args, 5, "STOREDIST"); + if (distKey) + keys.push(distKey); + break; + } + case "georadiusbymember": { + keys.push(0); + const storeKey = takeKeyAfterToken(args, 4, "STORE"); + if (storeKey) + keys.push(storeKey); + const distKey = takeKeyAfterToken(args, 4, "STOREDIST"); + if (distKey) + keys.push(distKey); + break; + } + case "sort": + case "sort_ro": + keys.push(0); + for (let i = 1; i < args.length - 1; i++) { + let arg = args[i]; + if (typeof arg !== "string") { + continue; + } + const directive = arg.toUpperCase(); + if (directive === "GET") { + i += 1; + arg = args[i]; + if (arg !== "#") { + if (parseExternalKey) { + keys.push([i, getExternalKeyNameLength(arg)]); + } else { + keys.push(i); + } + } + } else if (directive === "BY") { + i += 1; + if (parseExternalKey) { + keys.push([i, getExternalKeyNameLength(args[i])]); + } else { + keys.push(i); + } + } else if (directive === "STORE") { + i += 1; + keys.push(i); + } + } + break; + case "migrate": + if (args[2] === "") { + for (let i = 5; i < args.length - 1; i++) { + const arg = args[i]; + if (typeof arg === "string" && arg.toUpperCase() === "KEYS") { + for (let j = i + 1; j < args.length; j++) { + keys.push(j); + } + break; + } + } + } else { + keys.push(2); + } + break; + case "xreadgroup": + case "xread": + for (let i = commandName === "xread" ? 0 : 3; i < args.length - 1; i++) { + if (String(args[i]).toUpperCase() === "STREAMS") { + for (let j = i + 1; j <= i + (args.length - 1 - i) / 2; j++) { + keys.push(j); + } + break; + } + } + break; + default: + if (command.step > 0) { + const keyStart = command.keyStart - 1; + const keyStop = command.keyStop > 0 ? command.keyStop : args.length + command.keyStop + 1; + for (let i = keyStart; i < keyStop; i += command.step) { + keys.push(i); + } + } + break; + } + return keys; + } + exports2.getKeyIndexes = getKeyIndexes; + function getExternalKeyNameLength(key) { + if (typeof key !== "string") { + key = String(key); + } + const hashPos = key.indexOf("->"); + return hashPos === -1 ? key.length : hashPos; + } + } +}); + +// ../../node_modules/.pnpm/standard-as-callback@2.1.0/node_modules/standard-as-callback/built/utils.js +var require_utils17 = __commonJS({ + "../../node_modules/.pnpm/standard-as-callback@2.1.0/node_modules/standard-as-callback/built/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tryCatch = exports2.errorObj = void 0; + exports2.errorObj = { e: {} }; + var tryCatchTarget2; + function tryCatcher2(err, val) { + try { + const target = tryCatchTarget2; + tryCatchTarget2 = null; + return target.apply(this, arguments); + } catch (e) { + exports2.errorObj.e = e; + return exports2.errorObj; + } + } + function tryCatch2(fn) { + tryCatchTarget2 = fn; + return tryCatcher2; + } + exports2.tryCatch = tryCatch2; + } +}); + +// ../../node_modules/.pnpm/standard-as-callback@2.1.0/node_modules/standard-as-callback/built/index.js +var require_built2 = __commonJS({ + "../../node_modules/.pnpm/standard-as-callback@2.1.0/node_modules/standard-as-callback/built/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils_1 = require_utils17(); + function throwLater(e) { + setTimeout(function() { + throw e; + }, 0); + } + function asCallback(promise, nodeback, options) { + if (typeof nodeback === "function") { + promise.then((val) => { + let ret2; + if (options !== void 0 && Object(options).spread && Array.isArray(val)) { + ret2 = utils_1.tryCatch(nodeback).apply(void 0, [null].concat(val)); + } else { + ret2 = val === void 0 ? utils_1.tryCatch(nodeback)(null) : utils_1.tryCatch(nodeback)(null, val); + } + if (ret2 === utils_1.errorObj) { + throwLater(ret2.e); + } + }, (cause) => { + if (!cause) { + const newReason = new Error(cause + ""); + Object.assign(newReason, { cause }); + cause = newReason; + } + const ret2 = utils_1.tryCatch(nodeback)(cause); + if (ret2 === utils_1.errorObj) { + throwLater(ret2.e); + } + }); + } + return promise; + } + exports2.default = asCallback; + } +}); + +// ../../node_modules/.pnpm/redis-errors@1.2.0/node_modules/redis-errors/lib/old.js +var require_old = __commonJS({ + "../../node_modules/.pnpm/redis-errors@1.2.0/node_modules/redis-errors/lib/old.js"(exports2, module2) { + "use strict"; + var assert = require("assert"); + var util2 = require("util"); + function RedisError(message) { + Object.defineProperty(this, "message", { + value: message || "", + configurable: true, + writable: true + }); + Error.captureStackTrace(this, this.constructor); + } + util2.inherits(RedisError, Error); + Object.defineProperty(RedisError.prototype, "name", { + value: "RedisError", + configurable: true, + writable: true + }); + function ParserError(message, buffer, offset) { + assert(buffer); + assert.strictEqual(typeof offset, "number"); + Object.defineProperty(this, "message", { + value: message || "", + configurable: true, + writable: true + }); + const tmp = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + Error.captureStackTrace(this, this.constructor); + Error.stackTraceLimit = tmp; + this.offset = offset; + this.buffer = buffer; + } + util2.inherits(ParserError, RedisError); + Object.defineProperty(ParserError.prototype, "name", { + value: "ParserError", + configurable: true, + writable: true + }); + function ReplyError(message) { + Object.defineProperty(this, "message", { + value: message || "", + configurable: true, + writable: true + }); + const tmp = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + Error.captureStackTrace(this, this.constructor); + Error.stackTraceLimit = tmp; + } + util2.inherits(ReplyError, RedisError); + Object.defineProperty(ReplyError.prototype, "name", { + value: "ReplyError", + configurable: true, + writable: true + }); + function AbortError(message) { + Object.defineProperty(this, "message", { + value: message || "", + configurable: true, + writable: true + }); + Error.captureStackTrace(this, this.constructor); + } + util2.inherits(AbortError, RedisError); + Object.defineProperty(AbortError.prototype, "name", { + value: "AbortError", + configurable: true, + writable: true + }); + function InterruptError(message) { + Object.defineProperty(this, "message", { + value: message || "", + configurable: true, + writable: true + }); + Error.captureStackTrace(this, this.constructor); + } + util2.inherits(InterruptError, AbortError); + Object.defineProperty(InterruptError.prototype, "name", { + value: "InterruptError", + configurable: true, + writable: true + }); + module2.exports = { + RedisError, + ParserError, + ReplyError, + AbortError, + InterruptError + }; + } +}); + +// ../../node_modules/.pnpm/redis-errors@1.2.0/node_modules/redis-errors/lib/modern.js +var require_modern = __commonJS({ + "../../node_modules/.pnpm/redis-errors@1.2.0/node_modules/redis-errors/lib/modern.js"(exports2, module2) { + "use strict"; + var assert = require("assert"); + var RedisError = class extends Error { + get name() { + return this.constructor.name; + } + }; + var ParserError = class extends RedisError { + constructor(message, buffer, offset) { + assert(buffer); + assert.strictEqual(typeof offset, "number"); + const tmp = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + super(message); + Error.stackTraceLimit = tmp; + this.offset = offset; + this.buffer = buffer; + } + get name() { + return this.constructor.name; + } + }; + var ReplyError = class extends RedisError { + constructor(message) { + const tmp = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + super(message); + Error.stackTraceLimit = tmp; + } + get name() { + return this.constructor.name; + } + }; + var AbortError = class extends RedisError { + get name() { + return this.constructor.name; + } + }; + var InterruptError = class extends AbortError { + get name() { + return this.constructor.name; + } + }; + module2.exports = { + RedisError, + ParserError, + ReplyError, + AbortError, + InterruptError + }; + } +}); + +// ../../node_modules/.pnpm/redis-errors@1.2.0/node_modules/redis-errors/index.js +var require_redis_errors = __commonJS({ + "../../node_modules/.pnpm/redis-errors@1.2.0/node_modules/redis-errors/index.js"(exports2, module2) { + "use strict"; + var Errors = process.version.charCodeAt(1) < 55 && process.version.charCodeAt(2) === 46 ? require_old() : require_modern(); + module2.exports = Errors; + } +}); + +// ../../node_modules/.pnpm/cluster-key-slot@1.1.1/node_modules/cluster-key-slot/lib/index.js +var require_lib6 = __commonJS({ + "../../node_modules/.pnpm/cluster-key-slot@1.1.1/node_modules/cluster-key-slot/lib/index.js"(exports2, module2) { + var lookup = [ + 0, + 4129, + 8258, + 12387, + 16516, + 20645, + 24774, + 28903, + 33032, + 37161, + 41290, + 45419, + 49548, + 53677, + 57806, + 61935, + 4657, + 528, + 12915, + 8786, + 21173, + 17044, + 29431, + 25302, + 37689, + 33560, + 45947, + 41818, + 54205, + 50076, + 62463, + 58334, + 9314, + 13379, + 1056, + 5121, + 25830, + 29895, + 17572, + 21637, + 42346, + 46411, + 34088, + 38153, + 58862, + 62927, + 50604, + 54669, + 13907, + 9842, + 5649, + 1584, + 30423, + 26358, + 22165, + 18100, + 46939, + 42874, + 38681, + 34616, + 63455, + 59390, + 55197, + 51132, + 18628, + 22757, + 26758, + 30887, + 2112, + 6241, + 10242, + 14371, + 51660, + 55789, + 59790, + 63919, + 35144, + 39273, + 43274, + 47403, + 23285, + 19156, + 31415, + 27286, + 6769, + 2640, + 14899, + 10770, + 56317, + 52188, + 64447, + 60318, + 39801, + 35672, + 47931, + 43802, + 27814, + 31879, + 19684, + 23749, + 11298, + 15363, + 3168, + 7233, + 60846, + 64911, + 52716, + 56781, + 44330, + 48395, + 36200, + 40265, + 32407, + 28342, + 24277, + 20212, + 15891, + 11826, + 7761, + 3696, + 65439, + 61374, + 57309, + 53244, + 48923, + 44858, + 40793, + 36728, + 37256, + 33193, + 45514, + 41451, + 53516, + 49453, + 61774, + 57711, + 4224, + 161, + 12482, + 8419, + 20484, + 16421, + 28742, + 24679, + 33721, + 37784, + 41979, + 46042, + 49981, + 54044, + 58239, + 62302, + 689, + 4752, + 8947, + 13010, + 16949, + 21012, + 25207, + 29270, + 46570, + 42443, + 38312, + 34185, + 62830, + 58703, + 54572, + 50445, + 13538, + 9411, + 5280, + 1153, + 29798, + 25671, + 21540, + 17413, + 42971, + 47098, + 34713, + 38840, + 59231, + 63358, + 50973, + 55100, + 9939, + 14066, + 1681, + 5808, + 26199, + 30326, + 17941, + 22068, + 55628, + 51565, + 63758, + 59695, + 39368, + 35305, + 47498, + 43435, + 22596, + 18533, + 30726, + 26663, + 6336, + 2273, + 14466, + 10403, + 52093, + 56156, + 60223, + 64286, + 35833, + 39896, + 43963, + 48026, + 19061, + 23124, + 27191, + 31254, + 2801, + 6864, + 10931, + 14994, + 64814, + 60687, + 56684, + 52557, + 48554, + 44427, + 40424, + 36297, + 31782, + 27655, + 23652, + 19525, + 15522, + 11395, + 7392, + 3265, + 61215, + 65342, + 53085, + 57212, + 44955, + 49082, + 36825, + 40952, + 28183, + 32310, + 20053, + 24180, + 11923, + 16050, + 3793, + 7920 + ]; + var toUTF8Array = function toUTF8Array2(str) { + var char; + var i = 0; + var p = 0; + var utf8 = []; + var len = str.length; + for (; i < len; i++) { + char = str.charCodeAt(i); + if (char < 128) { + utf8[p++] = char; + } else if (char < 2048) { + utf8[p++] = char >> 6 | 192; + utf8[p++] = char & 63 | 128; + } else if ((char & 64512) === 55296 && i + 1 < str.length && (str.charCodeAt(i + 1) & 64512) === 56320) { + char = 65536 + ((char & 1023) << 10) + (str.charCodeAt(++i) & 1023); + utf8[p++] = char >> 18 | 240; + utf8[p++] = char >> 12 & 63 | 128; + utf8[p++] = char >> 6 & 63 | 128; + utf8[p++] = char & 63 | 128; + } else { + utf8[p++] = char >> 12 | 224; + utf8[p++] = char >> 6 & 63 | 128; + utf8[p++] = char & 63 | 128; + } + } + return utf8; + }; + var generate = module2.exports = function generate2(str) { + var char; + var i = 0; + var start = -1; + var result = 0; + var resultHash = 0; + var utf8 = typeof str === "string" ? toUTF8Array(str) : str; + var len = utf8.length; + while (i < len) { + char = utf8[i++]; + if (start === -1) { + if (char === 123) { + start = i; + } + } else if (char !== 125) { + resultHash = lookup[(char ^ resultHash >> 8) & 255] ^ resultHash << 8; + } else if (i - 1 !== start) { + return resultHash & 16383; + } + result = lookup[(char ^ result >> 8) & 255] ^ result << 8; + } + return result & 16383; + }; + module2.exports.generateMulti = function generateMulti(keys) { + var i = 1; + var len = keys.length; + var base = generate(keys[0]); + while (i < len) { + if (generate(keys[i++]) !== base) return -1; + } + return base; + }; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/utils/argumentParsers.js +var require_argumentParsers = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/utils/argumentParsers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.parseBlockOption = exports2.parseSecondsArgument = void 0; + var parseNumberArgument = (arg) => { + if (typeof arg === "number") { + return arg; + } + if (Buffer.isBuffer(arg)) { + return parseNumberArgument(arg.toString()); + } + if (typeof arg === "string") { + const value = Number(arg); + return Number.isFinite(value) ? value : void 0; + } + return void 0; + }; + var parseStringArgument = (arg) => { + if (typeof arg === "string") { + return arg; + } + if (Buffer.isBuffer(arg)) { + return arg.toString(); + } + return void 0; + }; + var parseSecondsArgument = (arg) => { + const value = parseNumberArgument(arg); + if (value === void 0) { + return void 0; + } + if (value <= 0) { + return 0; + } + return value * 1e3; + }; + exports2.parseSecondsArgument = parseSecondsArgument; + var parseBlockOption = (args) => { + for (let i = 0; i < args.length; i++) { + const token = parseStringArgument(args[i]); + if (token && token.toLowerCase() === "block") { + const duration = parseNumberArgument(args[i + 1]); + if (duration === void 0) { + return void 0; + } + if (duration <= 0) { + return 0; + } + return duration; + } + } + return null; + }; + exports2.parseBlockOption = parseBlockOption; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/Command.js +var require_Command = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/Command.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var commands_1 = require_built(); + var calculateSlot = require_lib6(); + var standard_as_callback_1 = require_built2(); + var utils_1 = require_utils15(); + var argumentParsers_1 = require_argumentParsers(); + var Command = class _Command { + /** + * Creates an instance of Command. + * @param name Command name + * @param args An array of command arguments + * @param options + * @param callback The callback that handles the response. + * If omit, the response will be handled via Promise + */ + constructor(name, args = [], options = {}, callback) { + this.name = name; + this.inTransaction = false; + this.isTraced = false; + this.isResolved = false; + this.transformed = false; + this.replyEncoding = options.replyEncoding; + this.errorStack = options.errorStack; + this.args = args.flat(); + this.callback = callback; + this.initPromise(); + if (options.keyPrefix) { + const isBufferKeyPrefix = options.keyPrefix instanceof Buffer; + let keyPrefixBuffer = isBufferKeyPrefix ? options.keyPrefix : null; + this._iterateKeys((key) => { + if (key instanceof Buffer) { + if (keyPrefixBuffer === null) { + keyPrefixBuffer = Buffer.from(options.keyPrefix); + } + return Buffer.concat([keyPrefixBuffer, key]); + } else if (isBufferKeyPrefix) { + return Buffer.concat([options.keyPrefix, Buffer.from(String(key))]); + } + return options.keyPrefix + key; + }); + } + if (options.readOnly) { + this.isReadOnly = true; + } + } + /** + * Check whether the command has the flag + */ + static checkFlag(flagName, commandName) { + commandName = commandName.toLowerCase(); + return !!this.getFlagMap()[flagName][commandName]; + } + static setArgumentTransformer(name, func) { + this._transformer.argument[name] = func; + } + static setReplyTransformer(name, func) { + this._transformer.reply[name] = func; + } + static getFlagMap() { + if (!this.flagMap) { + this.flagMap = Object.keys(_Command.FLAGS).reduce((map, flagName) => { + map[flagName] = {}; + _Command.FLAGS[flagName].forEach((commandName) => { + map[flagName][commandName] = true; + }); + return map; + }, {}); + } + return this.flagMap; + } + getSlot() { + if (typeof this.slot === "undefined") { + const key = this.getKeys()[0]; + this.slot = key == null ? null : calculateSlot(key); + } + return this.slot; + } + getKeys() { + return this._iterateKeys(); + } + /** + * Convert command to writable buffer or string + */ + toWritable(_socket) { + let result; + const commandStr = "*" + (this.args.length + 1) + "\r\n$" + Buffer.byteLength(this.name) + "\r\n" + this.name + "\r\n"; + if (this.bufferMode) { + const buffers = new MixedBuffers(); + buffers.push(commandStr); + for (let i = 0; i < this.args.length; ++i) { + const arg = this.args[i]; + if (arg instanceof Buffer) { + if (arg.length === 0) { + buffers.push("$0\r\n\r\n"); + } else { + buffers.push("$" + arg.length + "\r\n"); + buffers.push(arg); + buffers.push("\r\n"); + } + } else { + buffers.push("$" + Buffer.byteLength(arg) + "\r\n" + arg + "\r\n"); + } + } + result = buffers.toBuffer(); + } else { + result = commandStr; + for (let i = 0; i < this.args.length; ++i) { + const arg = this.args[i]; + result += "$" + Buffer.byteLength(arg) + "\r\n" + arg + "\r\n"; + } + } + return result; + } + stringifyArguments() { + for (let i = 0; i < this.args.length; ++i) { + const arg = this.args[i]; + if (typeof arg === "string") { + } else if (arg instanceof Buffer) { + this.bufferMode = true; + } else { + this.args[i] = (0, utils_1.toArg)(arg); + } + } + } + /** + * Convert buffer/buffer[] to string/string[], + * and apply reply transformer. + */ + transformReply(result) { + if (this.replyEncoding) { + result = (0, utils_1.convertBufferToString)(result, this.replyEncoding); + } + const transformer = _Command._transformer.reply[this.name]; + if (transformer) { + result = transformer(result); + } + return result; + } + /** + * Set the wait time before terminating the attempt to execute a command + * and generating an error. + */ + setTimeout(ms) { + if (!this._commandTimeoutTimer) { + this._commandTimeoutTimer = setTimeout(() => { + if (!this.isResolved) { + this.reject(new Error("Command timed out")); + } + }, ms); + } + } + /** + * Set a timeout for blocking commands. + * When the timeout expires, the command resolves with null (matching Redis behavior). + * This handles the case of undetectable network failures (e.g., docker network disconnect) + * where the TCP connection becomes a zombie and no close event fires. + */ + setBlockingTimeout(ms) { + if (ms <= 0) { + return; + } + if (this._blockingTimeoutTimer) { + clearTimeout(this._blockingTimeoutTimer); + this._blockingTimeoutTimer = void 0; + } + const now = Date.now(); + if (this._blockingDeadline === void 0) { + this._blockingDeadline = now + ms; + } + const remaining = this._blockingDeadline - now; + if (remaining <= 0) { + this.resolve(null); + return; + } + this._blockingTimeoutTimer = setTimeout(() => { + if (this.isResolved) { + this._blockingTimeoutTimer = void 0; + return; + } + this._blockingTimeoutTimer = void 0; + this.resolve(null); + }, remaining); + } + /** + * Extract the blocking timeout from the command arguments. + * + * @returns The timeout in seconds, null for indefinite blocking (timeout of 0), + * or undefined if this is not a blocking command + */ + extractBlockingTimeout() { + const args = this.args; + if (!args || args.length === 0) { + return void 0; + } + const name = this.name.toLowerCase(); + if (_Command.checkFlag("LAST_ARG_TIMEOUT_COMMANDS", name)) { + return (0, argumentParsers_1.parseSecondsArgument)(args[args.length - 1]); + } + if (_Command.checkFlag("FIRST_ARG_TIMEOUT_COMMANDS", name)) { + return (0, argumentParsers_1.parseSecondsArgument)(args[0]); + } + if (_Command.checkFlag("BLOCK_OPTION_COMMANDS", name)) { + return (0, argumentParsers_1.parseBlockOption)(args); + } + return void 0; + } + /** + * Clear the command and blocking timers + */ + _clearTimers() { + const existingTimer = this._commandTimeoutTimer; + if (existingTimer) { + clearTimeout(existingTimer); + delete this._commandTimeoutTimer; + } + const blockingTimer = this._blockingTimeoutTimer; + if (blockingTimer) { + clearTimeout(blockingTimer); + delete this._blockingTimeoutTimer; + } + } + initPromise() { + const promise = new Promise((resolve, reject) => { + if (!this.transformed) { + this.transformed = true; + const transformer = _Command._transformer.argument[this.name]; + if (transformer) { + this.args = transformer(this.args); + } + this.stringifyArguments(); + } + this.resolve = this._convertValue(resolve); + this.reject = (err) => { + this._clearTimers(); + if (this.errorStack) { + reject((0, utils_1.optimizeErrorStack)(err, this.errorStack.stack, __dirname)); + } else { + reject(err); + } + }; + }); + this.promise = (0, standard_as_callback_1.default)(promise, this.callback); + } + /** + * Iterate through the command arguments that are considered keys. + */ + _iterateKeys(transform = (key) => key) { + if (typeof this.keys === "undefined") { + this.keys = []; + if ((0, commands_1.exists)(this.name, { caseInsensitive: true })) { + const keyIndexes = (0, commands_1.getKeyIndexes)(this.name, this.args, { + nameCaseInsensitive: true + }); + for (const index of keyIndexes) { + this.args[index] = transform(this.args[index]); + this.keys.push(this.args[index]); + } + } + } + return this.keys; + } + /** + * Convert the value from buffer to the target encoding. + */ + _convertValue(resolve) { + return (value) => { + try { + this._clearTimers(); + resolve(this.transformReply(value)); + this.isResolved = true; + } catch (err) { + this.reject(err); + } + return this.promise; + }; + } + }; + exports2.default = Command; + Command.FLAGS = { + VALID_IN_SUBSCRIBER_MODE: [ + "subscribe", + "psubscribe", + "unsubscribe", + "punsubscribe", + "ssubscribe", + "sunsubscribe", + "ping", + "quit" + ], + VALID_IN_MONITOR_MODE: ["monitor", "auth"], + ENTER_SUBSCRIBER_MODE: ["subscribe", "psubscribe", "ssubscribe"], + EXIT_SUBSCRIBER_MODE: ["unsubscribe", "punsubscribe", "sunsubscribe"], + WILL_DISCONNECT: ["quit"], + HANDSHAKE_COMMANDS: ["auth", "select", "client", "readonly", "info"], + IGNORE_RECONNECT_ON_ERROR: ["client"], + BLOCKING_COMMANDS: [ + "blpop", + "brpop", + "brpoplpush", + "blmove", + "bzpopmin", + "bzpopmax", + "bzmpop", + "blmpop", + "xread", + "xreadgroup" + ], + LAST_ARG_TIMEOUT_COMMANDS: [ + "blpop", + "brpop", + "brpoplpush", + "blmove", + "bzpopmin", + "bzpopmax" + ], + FIRST_ARG_TIMEOUT_COMMANDS: ["bzmpop", "blmpop"], + BLOCK_OPTION_COMMANDS: ["xread", "xreadgroup"] + }; + Command._transformer = { + argument: {}, + reply: {} + }; + var msetArgumentTransformer = function(args) { + if (args.length === 1) { + if (args[0] instanceof Map) { + return (0, utils_1.convertMapToArray)(args[0]); + } + if (typeof args[0] === "object" && args[0] !== null) { + return (0, utils_1.convertObjectToArray)(args[0]); + } + } + return args; + }; + var hsetArgumentTransformer = function(args) { + if (args.length === 2) { + if (args[1] instanceof Map) { + return [args[0]].concat((0, utils_1.convertMapToArray)(args[1])); + } + if (typeof args[1] === "object" && args[1] !== null) { + return [args[0]].concat((0, utils_1.convertObjectToArray)(args[1])); + } + } + return args; + }; + Command.setArgumentTransformer("mset", msetArgumentTransformer); + Command.setArgumentTransformer("msetnx", msetArgumentTransformer); + Command.setArgumentTransformer("hset", hsetArgumentTransformer); + Command.setArgumentTransformer("hmset", hsetArgumentTransformer); + Command.setReplyTransformer("hgetall", function(result) { + if (Array.isArray(result)) { + const obj2 = {}; + for (let i = 0; i < result.length; i += 2) { + const key = result[i]; + const value = result[i + 1]; + if (key in obj2) { + Object.defineProperty(obj2, key, { + value, + configurable: true, + enumerable: true, + writable: true + }); + } else { + obj2[key] = value; + } + } + return obj2; + } + return result; + }); + var MixedBuffers = class { + constructor() { + this.length = 0; + this.items = []; + } + push(x) { + this.length += Buffer.byteLength(x); + this.items.push(x); + } + toBuffer() { + const result = Buffer.allocUnsafe(this.length); + let offset = 0; + for (const item of this.items) { + const length = Buffer.byteLength(item); + Buffer.isBuffer(item) ? item.copy(result, offset) : result.write(item, offset, length); + offset += length; + } + return result; + } + }; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/errors/ClusterAllFailedError.js +var require_ClusterAllFailedError = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/errors/ClusterAllFailedError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var redis_errors_1 = require_redis_errors(); + var ClusterAllFailedError = class extends redis_errors_1.RedisError { + constructor(message, lastNodeError) { + super(message); + this.lastNodeError = lastNodeError; + Error.captureStackTrace(this, this.constructor); + } + get name() { + return this.constructor.name; + } + }; + exports2.default = ClusterAllFailedError; + ClusterAllFailedError.defaultMessage = "Failed to refresh slots cache."; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/ScanStream.js +var require_ScanStream = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/ScanStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var stream_1 = require("stream"); + var ScanStream = class extends stream_1.Readable { + constructor(opt) { + super(opt); + this.opt = opt; + this._redisCursor = "0"; + this._redisDrained = false; + } + _read() { + if (this._redisDrained) { + this.push(null); + return; + } + const args = [this._redisCursor]; + if (this.opt.key) { + args.unshift(this.opt.key); + } + if (this.opt.match) { + args.push("MATCH", this.opt.match); + } + if (this.opt.type) { + args.push("TYPE", this.opt.type); + } + if (this.opt.count) { + args.push("COUNT", String(this.opt.count)); + } + if (this.opt.noValues) { + args.push("NOVALUES"); + } + this.opt.redis[this.opt.command](args, (err, res) => { + if (err) { + this.emit("error", err); + return; + } + this._redisCursor = res[0] instanceof Buffer ? res[0].toString() : res[0]; + if (this._redisCursor === "0") { + this._redisDrained = true; + } + this.push(res[1]); + }); + } + close() { + this._redisDrained = true; + } + }; + exports2.default = ScanStream; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/autoPipelining.js +var require_autoPipelining = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/autoPipelining.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.executeWithAutoPipelining = exports2.getFirstValueInFlattenedArray = exports2.shouldUseAutoPipelining = exports2.notAllowedAutoPipelineCommands = exports2.kCallbacks = exports2.kExec = void 0; + var lodash_1 = require_lodash2(); + var calculateSlot = require_lib6(); + var standard_as_callback_1 = require_built2(); + var commands_1 = require_built(); + exports2.kExec = Symbol("exec"); + exports2.kCallbacks = Symbol("callbacks"); + exports2.notAllowedAutoPipelineCommands = [ + "auth", + "info", + "script", + "quit", + "cluster", + "pipeline", + "multi", + "subscribe", + "psubscribe", + "unsubscribe", + "unpsubscribe", + "select", + "client" + ]; + function executeAutoPipeline(client, slotKey) { + if (client._runningAutoPipelines.has(slotKey)) { + return; + } + if (!client._autoPipelines.has(slotKey)) { + return; + } + client._runningAutoPipelines.add(slotKey); + const pipeline = client._autoPipelines.get(slotKey); + client._autoPipelines.delete(slotKey); + const callbacks = pipeline[exports2.kCallbacks]; + pipeline[exports2.kCallbacks] = null; + pipeline.exec(function(err, results) { + client._runningAutoPipelines.delete(slotKey); + if (err) { + for (let i = 0; i < callbacks.length; i++) { + process.nextTick(callbacks[i], err); + } + } else { + for (let i = 0; i < callbacks.length; i++) { + process.nextTick(callbacks[i], ...results[i]); + } + } + if (client._autoPipelines.has(slotKey)) { + executeAutoPipeline(client, slotKey); + } + }); + } + function shouldUseAutoPipelining(client, functionName, commandName) { + return functionName && client.options.enableAutoPipelining && !client.isPipeline && !exports2.notAllowedAutoPipelineCommands.includes(commandName) && !client.options.autoPipeliningIgnoredCommands.includes(commandName); + } + exports2.shouldUseAutoPipelining = shouldUseAutoPipelining; + function getFirstValueInFlattenedArray(args) { + for (let i = 0; i < args.length; i++) { + const arg = args[i]; + if (typeof arg === "string") { + return arg; + } else if (Array.isArray(arg) || (0, lodash_1.isArguments)(arg)) { + if (arg.length === 0) { + continue; + } + return arg[0]; + } + const flattened = [arg].flat(); + if (flattened.length > 0) { + return flattened[0]; + } + } + return void 0; + } + exports2.getFirstValueInFlattenedArray = getFirstValueInFlattenedArray; + function getFirstKeyForCommand(commandName, args) { + if ((0, commands_1.exists)(commandName, { caseInsensitive: true })) { + const flattenedArgs = args.flat(); + const keyIndexes = (0, commands_1.getKeyIndexes)(commandName, flattenedArgs, { + nameCaseInsensitive: true + }); + if (keyIndexes.length) { + return flattenedArgs[keyIndexes[0]]; + } + } + return getFirstValueInFlattenedArray(args); + } + function executeWithAutoPipelining(client, functionName, commandName, args, callback) { + if (client.isCluster && !client.slots.length) { + if (client.status === "wait") + client.connect().catch(lodash_1.noop); + return (0, standard_as_callback_1.default)(new Promise(function(resolve, reject) { + client.delayUntilReady((err) => { + if (err) { + reject(err); + return; + } + executeWithAutoPipelining(client, functionName, commandName, args, null).then(resolve, reject); + }); + }), callback); + } + const prefix = client.options.keyPrefix || ""; + let slotKey = client.isCluster ? client.slots[calculateSlot(`${prefix}${getFirstKeyForCommand(commandName, args)}`)].join(",") : "main"; + if (client.isCluster && client.options.scaleReads !== "master") { + const isReadOnly = (0, commands_1.exists)(commandName) && (0, commands_1.hasFlag)(commandName, "readonly"); + slotKey += isReadOnly ? ":read" : ":write"; + } + if (!client._autoPipelines.has(slotKey)) { + const pipeline2 = client.pipeline(); + pipeline2[exports2.kExec] = false; + pipeline2[exports2.kCallbacks] = []; + client._autoPipelines.set(slotKey, pipeline2); + } + const pipeline = client._autoPipelines.get(slotKey); + if (!pipeline[exports2.kExec]) { + pipeline[exports2.kExec] = true; + setImmediate(executeAutoPipeline, client, slotKey); + } + const autoPipelinePromise = new Promise(function(resolve, reject) { + pipeline[exports2.kCallbacks].push(function(err, value) { + if (err) { + reject(err); + return; + } + resolve(value); + }); + if (functionName === "call") { + args.unshift(commandName); + } + pipeline[functionName](...args); + }); + return (0, standard_as_callback_1.default)(autoPipelinePromise, callback); + } + exports2.executeWithAutoPipelining = executeWithAutoPipelining; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/Script.js +var require_Script = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/Script.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var crypto_1 = require("crypto"); + var Command_1 = require_Command(); + var standard_as_callback_1 = require_built2(); + var Script = class { + constructor(lua, numberOfKeys = null, keyPrefix = "", readOnly = false) { + this.lua = lua; + this.numberOfKeys = numberOfKeys; + this.keyPrefix = keyPrefix; + this.readOnly = readOnly; + this.sha = (0, crypto_1.createHash)("sha1").update(lua).digest("hex"); + const sha = this.sha; + const socketHasScriptLoaded = /* @__PURE__ */ new WeakSet(); + this.Command = class CustomScriptCommand extends Command_1.default { + toWritable(socket) { + const origReject = this.reject; + this.reject = (err) => { + if (err.message.indexOf("NOSCRIPT") !== -1) { + socketHasScriptLoaded.delete(socket); + } + origReject.call(this, err); + }; + if (!socketHasScriptLoaded.has(socket)) { + socketHasScriptLoaded.add(socket); + this.name = "eval"; + this.args[0] = lua; + } else if (this.name === "eval") { + this.name = "evalsha"; + this.args[0] = sha; + } + return super.toWritable(socket); + } + }; + } + execute(container, args, options, callback) { + if (typeof this.numberOfKeys === "number") { + args.unshift(this.numberOfKeys); + } + if (this.keyPrefix) { + options.keyPrefix = this.keyPrefix; + } + if (this.readOnly) { + options.readOnly = true; + } + const evalsha = new this.Command("evalsha", [this.sha, ...args], options); + evalsha.promise = evalsha.promise.catch((err) => { + if (err.message.indexOf("NOSCRIPT") === -1) { + throw err; + } + const resend = new this.Command("evalsha", [this.sha, ...args], options); + const client = container.isPipeline ? container.redis : container; + return client.sendCommand(resend); + }); + (0, standard_as_callback_1.default)(evalsha.promise, callback); + return container.sendCommand(evalsha); + } + }; + exports2.default = Script; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/utils/Commander.js +var require_Commander = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/utils/Commander.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var commands_1 = require_built(); + var autoPipelining_1 = require_autoPipelining(); + var Command_1 = require_Command(); + var Script_1 = require_Script(); + var Commander = class { + constructor() { + this.options = {}; + this.scriptsSet = {}; + this.addedBuiltinSet = /* @__PURE__ */ new Set(); + } + /** + * Return supported builtin commands + */ + getBuiltinCommands() { + return commands.slice(0); + } + /** + * Create a builtin command + */ + createBuiltinCommand(commandName) { + return { + string: generateFunction(null, commandName, "utf8"), + buffer: generateFunction(null, commandName, null) + }; + } + /** + * Create add builtin command + */ + addBuiltinCommand(commandName) { + this.addedBuiltinSet.add(commandName); + this[commandName] = generateFunction(commandName, commandName, "utf8"); + this[commandName + "Buffer"] = generateFunction(commandName + "Buffer", commandName, null); + } + /** + * Define a custom command using lua script + */ + defineCommand(name, definition) { + const script = new Script_1.default(definition.lua, definition.numberOfKeys, this.options.keyPrefix, definition.readOnly); + this.scriptsSet[name] = script; + this[name] = generateScriptingFunction(name, name, script, "utf8"); + this[name + "Buffer"] = generateScriptingFunction(name + "Buffer", name, script, null); + } + /** + * @ignore + */ + sendCommand(command, stream, node) { + throw new Error('"sendCommand" is not implemented'); + } + }; + var commands = commands_1.list.filter((command) => command !== "monitor"); + commands.push("sentinel"); + commands.forEach(function(commandName) { + Commander.prototype[commandName] = generateFunction(commandName, commandName, "utf8"); + Commander.prototype[commandName + "Buffer"] = generateFunction(commandName + "Buffer", commandName, null); + }); + Commander.prototype.call = generateFunction("call", "utf8"); + Commander.prototype.callBuffer = generateFunction("callBuffer", null); + Commander.prototype.send_command = Commander.prototype.call; + function generateFunction(functionName, _commandName, _encoding) { + if (typeof _encoding === "undefined") { + _encoding = _commandName; + _commandName = null; + } + return function(...args) { + const commandName = _commandName || args.shift(); + let callback = args[args.length - 1]; + if (typeof callback === "function") { + args.pop(); + } else { + callback = void 0; + } + const options = { + errorStack: this.options.showFriendlyErrorStack ? new Error() : void 0, + keyPrefix: this.options.keyPrefix, + replyEncoding: _encoding + }; + if (!(0, autoPipelining_1.shouldUseAutoPipelining)(this, functionName, commandName)) { + return this.sendCommand( + // @ts-expect-error + new Command_1.default(commandName, args, options, callback) + ); + } + return (0, autoPipelining_1.executeWithAutoPipelining)( + this, + functionName, + commandName, + // @ts-expect-error + args, + callback + ); + }; + } + function generateScriptingFunction(functionName, commandName, script, encoding) { + return function(...args) { + const callback = typeof args[args.length - 1] === "function" ? args.pop() : void 0; + const options = { + replyEncoding: encoding + }; + if (this.options.showFriendlyErrorStack) { + options.errorStack = new Error(); + } + if (!(0, autoPipelining_1.shouldUseAutoPipelining)(this, functionName, commandName)) { + return script.execute(this, args, options, callback); + } + return (0, autoPipelining_1.executeWithAutoPipelining)(this, functionName, commandName, args, callback); + }; + } + exports2.default = Commander; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/Pipeline.js +var require_Pipeline = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/Pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var calculateSlot = require_lib6(); + var commands_1 = require_built(); + var standard_as_callback_1 = require_built2(); + var util_1 = require("util"); + var Command_1 = require_Command(); + var buffer_1 = require("buffer"); + var utils_1 = require_utils15(); + var Commander_1 = require_Commander(); + function generateMultiWithNodes(redis, keys) { + const slot = calculateSlot(keys[0]); + const target = redis._groupsBySlot[slot]; + for (let i = 1; i < keys.length; i++) { + if (redis._groupsBySlot[calculateSlot(keys[i])] !== target) { + return -1; + } + } + return slot; + } + var Pipeline = class extends Commander_1.default { + constructor(redis) { + super(); + this.redis = redis; + this.isPipeline = true; + this.replyPending = 0; + this._queue = []; + this._result = []; + this._transactions = 0; + this._shaToScript = {}; + this.isCluster = this.redis.constructor.name === "Cluster" || this.redis.isCluster; + this.options = redis.options; + Object.keys(redis.scriptsSet).forEach((name) => { + const script = redis.scriptsSet[name]; + this._shaToScript[script.sha] = script; + this[name] = redis[name]; + this[name + "Buffer"] = redis[name + "Buffer"]; + }); + redis.addedBuiltinSet.forEach((name) => { + this[name] = redis[name]; + this[name + "Buffer"] = redis[name + "Buffer"]; + }); + this.promise = new Promise((resolve, reject) => { + this.resolve = resolve; + this.reject = reject; + }); + const _this = this; + Object.defineProperty(this, "length", { + get: function() { + return _this._queue.length; + } + }); + } + fillResult(value, position) { + if (this._queue[position].name === "exec" && Array.isArray(value[1])) { + const execLength = value[1].length; + for (let i = 0; i < execLength; i++) { + if (value[1][i] instanceof Error) { + continue; + } + const cmd = this._queue[position - (execLength - i)]; + try { + value[1][i] = cmd.transformReply(value[1][i]); + } catch (err) { + value[1][i] = err; + } + } + } + this._result[position] = value; + if (--this.replyPending) { + return; + } + if (this.isCluster) { + let retriable = true; + let commonError; + for (let i = 0; i < this._result.length; ++i) { + const error = this._result[i][0]; + const command = this._queue[i]; + if (error) { + if (command.name === "exec" && error.message === "EXECABORT Transaction discarded because of previous errors.") { + continue; + } + if (!commonError) { + commonError = { + name: error.name, + message: error.message + }; + } else if (commonError.name !== error.name || commonError.message !== error.message) { + retriable = false; + break; + } + } else if (!command.inTransaction) { + const isReadOnly = (0, commands_1.exists)(command.name, { caseInsensitive: true }) && (0, commands_1.hasFlag)(command.name, "readonly", { nameCaseInsensitive: true }); + if (!isReadOnly) { + retriable = false; + break; + } + } + } + if (commonError && retriable) { + const _this = this; + const errv = commonError.message.split(" "); + const queue = this._queue; + let inTransaction = false; + this._queue = []; + for (let i = 0; i < queue.length; ++i) { + if (errv[0] === "ASK" && !inTransaction && queue[i].name !== "asking" && (!queue[i - 1] || queue[i - 1].name !== "asking")) { + const asking = new Command_1.default("asking"); + asking.ignore = true; + this.sendCommand(asking); + } + queue[i].initPromise(); + this.sendCommand(queue[i]); + inTransaction = queue[i].inTransaction; + } + let matched = true; + if (typeof this.leftRedirections === "undefined") { + this.leftRedirections = {}; + } + const exec = function() { + _this.exec(); + }; + const cluster = this.redis; + cluster.handleError(commonError, this.leftRedirections, { + moved: function(_slot, key) { + _this.preferKey = key; + if (cluster.slots[errv[1]]) { + if (cluster.slots[errv[1]][0] !== key) { + cluster.slots[errv[1]] = [key]; + } + } else { + cluster.slots[errv[1]] = [key]; + } + cluster._groupsBySlot[errv[1]] = cluster._groupsIds[cluster.slots[errv[1]].join(";")]; + cluster.refreshSlotsCache(); + _this.exec(); + }, + ask: function(_slot, key) { + _this.preferKey = key; + _this.exec(); + }, + tryagain: exec, + clusterDown: exec, + connectionClosed: exec, + maxRedirections: () => { + matched = false; + }, + defaults: () => { + matched = false; + } + }); + if (matched) { + return; + } + } + } + let ignoredCount = 0; + for (let i = 0; i < this._queue.length - ignoredCount; ++i) { + if (this._queue[i + ignoredCount].ignore) { + ignoredCount += 1; + } + this._result[i] = this._result[i + ignoredCount]; + } + this.resolve(this._result.slice(0, this._result.length - ignoredCount)); + } + sendCommand(command) { + if (this._transactions > 0) { + command.inTransaction = true; + } + const position = this._queue.length; + command.pipelineIndex = position; + command.promise.then((result) => { + this.fillResult([null, result], position); + }).catch((error) => { + this.fillResult([error], position); + }); + this._queue.push(command); + return this; + } + addBatch(commands) { + let command, commandName, args; + for (let i = 0; i < commands.length; ++i) { + command = commands[i]; + commandName = command[0]; + args = command.slice(1); + this[commandName].apply(this, args); + } + return this; + } + }; + exports2.default = Pipeline; + var multi = Pipeline.prototype.multi; + Pipeline.prototype.multi = function() { + this._transactions += 1; + return multi.apply(this, arguments); + }; + var execBuffer = Pipeline.prototype.execBuffer; + Pipeline.prototype.execBuffer = (0, util_1.deprecate)(function() { + if (this._transactions > 0) { + this._transactions -= 1; + } + return execBuffer.apply(this, arguments); + }, "Pipeline#execBuffer: Use Pipeline#exec instead"); + Pipeline.prototype.exec = function(callback) { + if (this.isCluster && !this.redis.slots.length) { + if (this.redis.status === "wait") + this.redis.connect().catch(utils_1.noop); + if (callback && !this.nodeifiedPromise) { + this.nodeifiedPromise = true; + (0, standard_as_callback_1.default)(this.promise, callback); + } + this.redis.delayUntilReady((err) => { + if (err) { + this.reject(err); + return; + } + this.exec(callback); + }); + return this.promise; + } + if (this._transactions > 0) { + this._transactions -= 1; + return execBuffer.apply(this, arguments); + } + if (!this.nodeifiedPromise) { + this.nodeifiedPromise = true; + (0, standard_as_callback_1.default)(this.promise, callback); + } + if (!this._queue.length) { + this.resolve([]); + } + let pipelineSlot; + if (this.isCluster) { + const sampleKeys = []; + for (let i = 0; i < this._queue.length; i++) { + const keys = this._queue[i].getKeys(); + if (keys.length) { + sampleKeys.push(keys[0]); + } + if (keys.length && calculateSlot.generateMulti(keys) < 0) { + this.reject(new Error("All the keys in a pipeline command should belong to the same slot")); + return this.promise; + } + } + if (sampleKeys.length) { + pipelineSlot = generateMultiWithNodes(this.redis, sampleKeys); + if (pipelineSlot < 0) { + this.reject(new Error("All keys in the pipeline should belong to the same slots allocation group")); + return this.promise; + } + } else { + pipelineSlot = Math.random() * 16384 | 0; + } + } + const _this = this; + execPipeline(); + return this.promise; + function execPipeline() { + let writePending = _this.replyPending = _this._queue.length; + let node; + if (_this.isCluster) { + node = { + slot: pipelineSlot, + redis: _this.redis.connectionPool.nodes.all[_this.preferKey] + }; + } + let data = ""; + let buffers; + const stream = { + isPipeline: true, + destination: _this.isCluster ? node : { redis: _this.redis }, + write(writable) { + if (typeof writable !== "string") { + if (!buffers) { + buffers = []; + } + if (data) { + buffers.push(Buffer.from(data, "utf8")); + data = ""; + } + buffers.push(writable); + } else { + if (data.length + writable.length >= buffer_1.constants.MAX_STRING_LENGTH) { + if (!buffers) { + buffers = []; + } + if (data) { + buffers.push(Buffer.from(data, "utf8")); + data = ""; + } + } + data += writable; + } + if (!--writePending) { + if (buffers) { + if (data) { + buffers.push(Buffer.from(data, "utf8")); + } + stream.destination.redis.stream.write(Buffer.concat(buffers)); + } else { + stream.destination.redis.stream.write(data); + } + writePending = _this._queue.length; + data = ""; + buffers = void 0; + } + } + }; + for (let i = 0; i < _this._queue.length; ++i) { + _this.redis.sendCommand(_this._queue[i], stream, node); + } + return _this.promise; + } + }; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/tracing.js +var require_tracing = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/tracing.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.traceConnect = exports2.traceBatch = exports2.traceCommand = exports2.sanitizeArgs = void 0; + var SERIALIZATION_SUBSETS = [ + { regex: /^ECHO/i, args: 0 }, + { + regex: /^(LPUSH|MSET|PFA|PUBLISH|RPUSH|SADD|SET|SPUBLISH|XADD|ZADD)/i, + args: 1 + }, + { regex: /^(HSET|HMSET|LSET|LINSERT)/i, args: 2 }, + { + regex: /^(ACL|BIT|B[LRZ]|CLIENT|CLUSTER|CONFIG|COMMAND|DECR|DEL|EVAL|EX|FUNCTION|GEO|GET|HINCR|HMGET|HSCAN|INCR|L[TRLM]|MEMORY|P[EFISTU]|RPOP|S[CDIMORSU]|XACK|X[CDGILPRT]|Z[CDILMPRS])/i, + args: -1 + } + ]; + function sanitizeArgs(commandName, args) { + let allowedArgCount = 0; + for (const subset of SERIALIZATION_SUBSETS) { + if (subset.regex.test(commandName)) { + allowedArgCount = subset.args; + break; + } + } + if (allowedArgCount === -1) { + return args.map((a) => String(a)); + } + const result = []; + for (let i = 0; i < args.length; i++) { + if (i < allowedArgCount) { + result.push(String(args[i])); + } else { + result.push("?"); + } + } + return result; + } + exports2.sanitizeArgs = sanitizeArgs; + var dc = (() => { + try { + return "getBuiltinModule" in process ? process.getBuiltinModule("node:diagnostics_channel") : require("node:diagnostics_channel"); + } catch { + return void 0; + } + })(); + var hasTracingChannel = dc && typeof dc.tracingChannel === "function"; + var commandChannel = hasTracingChannel ? dc.tracingChannel("ioredis:command") : void 0; + var batchChannel = hasTracingChannel ? dc.tracingChannel("ioredis:batch") : void 0; + var connectChannel = hasTracingChannel ? dc.tracingChannel("ioredis:connect") : void 0; + function shouldTrace(channel) { + return !!channel && channel.hasSubscribers !== false; + } + var noop = () => { + }; + function traceCommand(fn, contextFactory) { + if (!shouldTrace(commandChannel)) + return fn(); + const traced = commandChannel.tracePromise(fn, contextFactory()); + traced.catch(noop); + return traced; + } + exports2.traceCommand = traceCommand; + function traceBatch(fn, contextFactory) { + if (!shouldTrace(batchChannel)) + return fn(); + const traced = batchChannel.tracePromise(fn, contextFactory()); + traced.catch(noop); + return traced; + } + exports2.traceBatch = traceBatch; + function traceConnect(fn, contextFactory) { + if (!shouldTrace(connectChannel)) + return fn(); + return connectChannel.tracePromise(fn, contextFactory()); + } + exports2.traceConnect = traceConnect; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/transaction.js +var require_transaction = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/transaction.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.addTransactionSupport = void 0; + var utils_1 = require_utils15(); + var standard_as_callback_1 = require_built2(); + var Pipeline_1 = require_Pipeline(); + var tracing_1 = require_tracing(); + function addTransactionSupport(redis) { + redis.pipeline = function(commands) { + const pipeline = new Pipeline_1.default(this); + if (Array.isArray(commands)) { + pipeline.addBatch(commands); + } + return pipeline; + }; + const { multi } = redis; + redis.multi = function(commands, options) { + if (typeof options === "undefined" && !Array.isArray(commands)) { + options = commands; + commands = null; + } + if (options && options.pipeline === false) { + return multi.call(this); + } + const pipeline = new Pipeline_1.default(this); + pipeline.multi(); + if (Array.isArray(commands)) { + pipeline.addBatch(commands); + } + const exec2 = pipeline.exec; + pipeline.exec = function(callback) { + if (this.isCluster && !this.redis.slots.length) { + if (this.redis.status === "wait") + this.redis.connect().catch(utils_1.noop); + return (0, standard_as_callback_1.default)(new Promise((resolve, reject) => { + this.redis.delayUntilReady((err) => { + if (err) { + reject(err); + return; + } + this.exec(pipeline).then(resolve, reject); + }); + }), callback); + } + if (this._transactions > 0) { + exec2.call(pipeline); + } + if (this.nodeifiedPromise) { + return exec2.call(pipeline); + } + const batchSize = Math.max(pipeline.length - 2, 0); + const execAndUnwrap = () => exec2.call(pipeline).then(function(result) { + const execResult = result[result.length - 1]; + if (typeof execResult === "undefined") { + throw new Error("Pipeline cannot be used to send any commands when the `exec()` has been called on it."); + } + if (execResult[0]) { + execResult[0].previousErrors = []; + for (let i = 0; i < result.length - 1; ++i) { + if (result[i][0]) { + execResult[0].previousErrors.push(result[i][0]); + } + } + throw execResult[0]; + } + return (0, utils_1.wrapMultiResult)(execResult[1]); + }); + const promise = "_buildBatchContext" in this.redis ? (0, tracing_1.traceBatch)(execAndUnwrap, () => this.redis._buildBatchContext(batchSize)) : execAndUnwrap(); + return (0, standard_as_callback_1.default)(promise, callback); + }; + const { execBuffer } = pipeline; + pipeline.execBuffer = function(callback) { + if (this._transactions > 0) { + execBuffer.call(pipeline); + } + return pipeline.exec(callback); + }; + return pipeline; + }; + const { exec } = redis; + redis.exec = function(callback) { + return (0, standard_as_callback_1.default)(exec.call(this).then(function(results) { + if (Array.isArray(results)) { + results = (0, utils_1.wrapMultiResult)(results); + } + return results; + }), callback); + }; + } + exports2.addTransactionSupport = addTransactionSupport; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/utils/applyMixin.js +var require_applyMixin = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/utils/applyMixin.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function applyMixin(derivedConstructor, mixinConstructor) { + Object.getOwnPropertyNames(mixinConstructor.prototype).forEach((name) => { + Object.defineProperty(derivedConstructor.prototype, name, Object.getOwnPropertyDescriptor(mixinConstructor.prototype, name)); + }); + } + exports2.default = applyMixin; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/cluster/ClusterOptions.js +var require_ClusterOptions = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/cluster/ClusterOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_CLUSTER_OPTIONS = void 0; + var dns_1 = require("dns"); + exports2.DEFAULT_CLUSTER_OPTIONS = { + clusterRetryStrategy: (times) => Math.min(100 + times * 2, 2e3), + clusterNodeRetryStrategy: null, + enableOfflineQueue: true, + enableReadyCheck: true, + scaleReads: "master", + maxRedirections: 16, + retryDelayOnMoved: 0, + retryDelayOnFailover: 100, + retryDelayOnClusterDown: 100, + retryDelayOnTryAgain: 100, + slotsRefreshTimeout: 1e3, + useSRVRecords: false, + resolveSrv: dns_1.resolveSrv, + dnsLookup: dns_1.lookup, + enableAutoPipelining: false, + autoPipeliningIgnoredCommands: [], + shardedSubscribers: false + }; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/cluster/util.js +var require_util2 = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/cluster/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getConnectionName = exports2.weightSrvRecords = exports2.groupSrvRecords = exports2.getUniqueHostnamesFromOptions = exports2.normalizeNodeOptions = exports2.nodeKeyToRedisOptions = exports2.getNodeKey = void 0; + var utils_1 = require_utils15(); + var net_1 = require("net"); + function getNodeKey(node) { + node.port = node.port || 6379; + node.host = node.host || "127.0.0.1"; + return node.host + ":" + node.port; + } + exports2.getNodeKey = getNodeKey; + function nodeKeyToRedisOptions(nodeKey) { + const portIndex = nodeKey.lastIndexOf(":"); + if (portIndex === -1) { + throw new Error(`Invalid node key ${nodeKey}`); + } + return { + host: nodeKey.slice(0, portIndex), + port: Number(nodeKey.slice(portIndex + 1)) + }; + } + exports2.nodeKeyToRedisOptions = nodeKeyToRedisOptions; + function normalizeNodeOptions(nodes) { + return nodes.map((node) => { + const options = {}; + if (typeof node === "object") { + Object.assign(options, node); + } else if (typeof node === "string") { + Object.assign(options, (0, utils_1.parseURL)(node)); + } else if (typeof node === "number") { + options.port = node; + } else { + throw new Error("Invalid argument " + node); + } + if (typeof options.port === "string") { + options.port = parseInt(options.port, 10); + } + delete options.db; + if (!options.port) { + options.port = 6379; + } + if (!options.host) { + options.host = "127.0.0.1"; + } + return (0, utils_1.resolveTLSProfile)(options); + }); + } + exports2.normalizeNodeOptions = normalizeNodeOptions; + function getUniqueHostnamesFromOptions(nodes) { + const uniqueHostsMap = {}; + nodes.forEach((node) => { + uniqueHostsMap[node.host] = true; + }); + return Object.keys(uniqueHostsMap).filter((host) => !(0, net_1.isIP)(host)); + } + exports2.getUniqueHostnamesFromOptions = getUniqueHostnamesFromOptions; + function groupSrvRecords(records) { + const recordsByPriority = {}; + for (const record of records) { + if (!recordsByPriority.hasOwnProperty(record.priority)) { + recordsByPriority[record.priority] = { + totalWeight: record.weight, + records: [record] + }; + } else { + recordsByPriority[record.priority].totalWeight += record.weight; + recordsByPriority[record.priority].records.push(record); + } + } + return recordsByPriority; + } + exports2.groupSrvRecords = groupSrvRecords; + function weightSrvRecords(recordsGroup) { + if (recordsGroup.records.length === 1) { + recordsGroup.totalWeight = 0; + return recordsGroup.records.shift(); + } + const random = Math.floor(Math.random() * (recordsGroup.totalWeight + recordsGroup.records.length)); + let total = 0; + for (const [i, record] of recordsGroup.records.entries()) { + total += 1 + record.weight; + if (total > random) { + recordsGroup.totalWeight -= record.weight; + recordsGroup.records.splice(i, 1); + return record; + } + } + } + exports2.weightSrvRecords = weightSrvRecords; + function getConnectionName(component, nodeConnectionName) { + const prefix = `ioredis-cluster(${component})`; + return nodeConnectionName ? `${prefix}:${nodeConnectionName}` : prefix; + } + exports2.getConnectionName = getConnectionName; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/cluster/ClusterSubscriber.js +var require_ClusterSubscriber = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/cluster/ClusterSubscriber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require_util2(); + var utils_1 = require_utils15(); + var Redis_1 = require_Redis(); + var debug = (0, utils_1.Debug)("cluster:subscriber"); + var ClusterSubscriber = class { + constructor(connectionPool, emitter, isSharded = false) { + this.connectionPool = connectionPool; + this.emitter = emitter; + this.isSharded = isSharded; + this.started = false; + this.subscriber = null; + this.slotRange = []; + this.onSubscriberEnd = () => { + if (!this.started) { + debug("subscriber has disconnected, but ClusterSubscriber is not started, so not reconnecting."); + return; + } + debug("subscriber has disconnected, selecting a new one..."); + this.selectSubscriber(); + }; + this.connectionPool.on("-node", (_2, key) => { + if (!this.started || !this.subscriber) { + return; + } + if ((0, util_1.getNodeKey)(this.subscriber.options) === key) { + debug("subscriber has left, selecting a new one..."); + this.selectSubscriber(); + } + }); + this.connectionPool.on("+node", () => { + if (!this.started || this.subscriber) { + return; + } + debug("a new node is discovered and there is no subscriber, selecting a new one..."); + this.selectSubscriber(); + }); + } + getInstance() { + return this.subscriber; + } + /** + * Associate this subscriber to a specific slot range. + * + * Returns the range or an empty array if the slot range couldn't be associated. + * + * BTW: This is more for debugging and testing purposes. + * + * @param range + */ + associateSlotRange(range) { + if (this.isSharded) { + this.slotRange = range; + } + return this.slotRange; + } + start() { + this.started = true; + this.selectSubscriber(); + debug("started"); + } + stop() { + this.started = false; + if (this.subscriber) { + this.subscriber.disconnect(); + this.subscriber = null; + } + } + isStarted() { + return this.started; + } + selectSubscriber() { + const lastActiveSubscriber = this.lastActiveSubscriber; + if (lastActiveSubscriber) { + lastActiveSubscriber.off("end", this.onSubscriberEnd); + lastActiveSubscriber.disconnect(); + } + if (this.subscriber) { + this.subscriber.off("end", this.onSubscriberEnd); + this.subscriber.disconnect(); + } + const sampleNode = (0, utils_1.sample)(this.connectionPool.getNodes()); + if (!sampleNode) { + debug("selecting subscriber failed since there is no node discovered in the cluster yet"); + this.subscriber = null; + return; + } + const { options } = sampleNode; + debug("selected a subscriber %s:%s", options.host, options.port); + let connectionPrefix = "subscriber"; + if (this.isSharded) + connectionPrefix = "ssubscriber"; + this.subscriber = new Redis_1.default({ + port: options.port, + host: options.host, + username: options.username, + password: options.password, + enableReadyCheck: true, + connectionName: (0, util_1.getConnectionName)(connectionPrefix, options.connectionName), + lazyConnect: true, + tls: options.tls, + // Don't try to reconnect the subscriber connection. If the connection fails + // we will get an end event (handled below), at which point we'll pick a new + // node from the pool and try to connect to that as the subscriber connection. + retryStrategy: null + }); + this.subscriber.on("error", utils_1.noop); + this.subscriber.on("moved", () => { + this.emitter.emit("forceRefresh"); + }); + this.subscriber.once("end", this.onSubscriberEnd); + const previousChannels = { subscribe: [], psubscribe: [], ssubscribe: [] }; + if (lastActiveSubscriber) { + const condition = lastActiveSubscriber.condition || lastActiveSubscriber.prevCondition; + if (condition && condition.subscriber) { + previousChannels.subscribe = condition.subscriber.channels("subscribe"); + previousChannels.psubscribe = condition.subscriber.channels("psubscribe"); + previousChannels.ssubscribe = condition.subscriber.channels("ssubscribe"); + } + } + if (previousChannels.subscribe.length || previousChannels.psubscribe.length || previousChannels.ssubscribe.length) { + let pending = 0; + for (const type of ["subscribe", "psubscribe", "ssubscribe"]) { + const channels = previousChannels[type]; + if (channels.length == 0) { + continue; + } + debug("%s %d channels", type, channels.length); + if (type === "ssubscribe") { + for (const channel of channels) { + pending += 1; + this.subscriber[type](channel).then(() => { + if (!--pending) { + this.lastActiveSubscriber = this.subscriber; + } + }).catch(() => { + debug("failed to ssubscribe to channel: %s", channel); + }); + } + } else { + pending += 1; + this.subscriber[type](channels).then(() => { + if (!--pending) { + this.lastActiveSubscriber = this.subscriber; + } + }).catch(() => { + debug("failed to %s %d channels", type, channels.length); + }); + } + } + } else { + this.lastActiveSubscriber = this.subscriber; + } + for (const event of [ + "message", + "messageBuffer" + ]) { + this.subscriber.on(event, (arg1, arg2) => { + this.emitter.emit(event, arg1, arg2); + }); + } + for (const event of ["pmessage", "pmessageBuffer"]) { + this.subscriber.on(event, (arg1, arg2, arg3) => { + this.emitter.emit(event, arg1, arg2, arg3); + }); + } + if (this.isSharded == true) { + for (const event of [ + "smessage", + "smessageBuffer" + ]) { + this.subscriber.on(event, (arg1, arg2) => { + this.emitter.emit(event, arg1, arg2); + }); + } + } + } + }; + exports2.default = ClusterSubscriber; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/cluster/ConnectionPool.js +var require_ConnectionPool = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/cluster/ConnectionPool.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var events_1 = require("events"); + var utils_1 = require_utils15(); + var util_1 = require_util2(); + var Redis_1 = require_Redis(); + var debug = (0, utils_1.Debug)("cluster:connectionPool"); + var ConnectionPool = class extends events_1.EventEmitter { + constructor(redisOptions, clusterNodeRetryStrategy = null) { + super(); + this.redisOptions = redisOptions; + this.clusterNodeRetryStrategy = clusterNodeRetryStrategy; + this.nodes = { + all: {}, + master: {}, + slave: {} + }; + this.specifiedOptions = {}; + } + getNodes(role = "all") { + const nodes = this.nodes[role]; + return Object.keys(nodes).map((key) => nodes[key]); + } + getInstanceByKey(key) { + return this.nodes.all[key]; + } + getSampleInstance(role) { + const keys = Object.keys(this.nodes[role]); + const sampleKey = (0, utils_1.sample)(keys); + return this.nodes[role][sampleKey]; + } + /** + * Add a master node to the pool + * @param node + */ + addMasterNode(node) { + const key = (0, util_1.getNodeKey)(node.options); + const redis = this.createRedisFromOptions(node, node.options.readOnly); + if (!node.options.readOnly) { + this.nodes.all[key] = redis; + this.nodes.master[key] = redis; + return true; + } + return false; + } + /** + * Creates a Redis connection instance from the node options + * @param node + * @param readOnly + */ + createRedisFromOptions(node, readOnly) { + const redis = new Redis_1.default((0, utils_1.defaults)({ + // By default, never try to reconnect when a node is lost, + // instead, waiting for a `MOVED` error and fetching slots again. + // When `clusterNodeRetryStrategy` is set, use it to allow + // reconnection (e.g. for replica nodes that restart without + // any slot changes). + retryStrategy: typeof this.clusterNodeRetryStrategy === "function" ? this.clusterNodeRetryStrategy : null, + // Offline queue should be enabled so that + // we don't need to wait for the `ready` event + // before sending commands to the node. + enableOfflineQueue: true, + readOnly + }, node, this.redisOptions, { lazyConnect: true })); + return redis; + } + /** + * Find or create a connection to the node + */ + findOrCreate(node, readOnly = false) { + const key = (0, util_1.getNodeKey)(node); + readOnly = Boolean(readOnly); + if (this.specifiedOptions[key]) { + Object.assign(node, this.specifiedOptions[key]); + } else { + this.specifiedOptions[key] = node; + } + let redis; + if (this.nodes.all[key]) { + redis = this.nodes.all[key]; + if (redis.options.readOnly !== readOnly) { + redis.options.readOnly = readOnly; + debug("Change role of %s to %s", key, readOnly ? "slave" : "master"); + redis[readOnly ? "readonly" : "readwrite"]().catch(utils_1.noop); + if (readOnly) { + delete this.nodes.master[key]; + this.nodes.slave[key] = redis; + } else { + delete this.nodes.slave[key]; + this.nodes.master[key] = redis; + } + } + } else { + debug("Connecting to %s as %s", key, readOnly ? "slave" : "master"); + redis = this.createRedisFromOptions(node, readOnly); + this.nodes.all[key] = redis; + this.nodes[readOnly ? "slave" : "master"][key] = redis; + redis.once("end", () => { + this.removeNode(key); + this.emit("-node", redis, key); + if (!Object.keys(this.nodes.all).length) { + this.emit("drain"); + } + }); + this.emit("+node", redis, key); + redis.on("error", (error) => { + this.emit("nodeError", error, key); + }); + } + return redis; + } + /** + * Reset the pool with a set of nodes. + * The old node will be removed. + */ + reset(nodes) { + debug("Reset with %O", nodes); + const newNodes = {}; + nodes.forEach((node) => { + const key = (0, util_1.getNodeKey)(node); + if (!(node.readOnly && newNodes[key])) { + newNodes[key] = node; + } + }); + Object.keys(this.nodes.all).forEach((key) => { + if (!newNodes[key]) { + debug("Disconnect %s because the node does not hold any slot", key); + this.nodes.all[key].disconnect(); + this.removeNode(key); + } + }); + Object.keys(newNodes).forEach((key) => { + const node = newNodes[key]; + this.findOrCreate(node, node.readOnly); + }); + } + /** + * Remove a node from the pool. + */ + removeNode(key) { + const { nodes } = this; + if (nodes.all[key]) { + debug("Remove %s from the pool", key); + delete nodes.all[key]; + } + delete nodes.master[key]; + delete nodes.slave[key]; + } + }; + exports2.default = ConnectionPool; + } +}); + +// ../../node_modules/.pnpm/denque@2.1.0/node_modules/denque/index.js +var require_denque = __commonJS({ + "../../node_modules/.pnpm/denque@2.1.0/node_modules/denque/index.js"(exports2, module2) { + "use strict"; + function Denque(array, options) { + var options = options || {}; + this._capacity = options.capacity; + this._head = 0; + this._tail = 0; + if (Array.isArray(array)) { + this._fromArray(array); + } else { + this._capacityMask = 3; + this._list = new Array(4); + } + } + Denque.prototype.peekAt = function peekAt(index) { + var i = index; + if (i !== (i | 0)) { + return void 0; + } + var len = this.size(); + if (i >= len || i < -len) return void 0; + if (i < 0) i += len; + i = this._head + i & this._capacityMask; + return this._list[i]; + }; + Denque.prototype.get = function get(i) { + return this.peekAt(i); + }; + Denque.prototype.peek = function peek() { + if (this._head === this._tail) return void 0; + return this._list[this._head]; + }; + Denque.prototype.peekFront = function peekFront() { + return this.peek(); + }; + Denque.prototype.peekBack = function peekBack() { + return this.peekAt(-1); + }; + Object.defineProperty(Denque.prototype, "length", { + get: function length() { + return this.size(); + } + }); + Denque.prototype.size = function size() { + if (this._head === this._tail) return 0; + if (this._head < this._tail) return this._tail - this._head; + else return this._capacityMask + 1 - (this._head - this._tail); + }; + Denque.prototype.unshift = function unshift(item) { + if (arguments.length === 0) return this.size(); + var len = this._list.length; + this._head = this._head - 1 + len & this._capacityMask; + this._list[this._head] = item; + if (this._tail === this._head) this._growArray(); + if (this._capacity && this.size() > this._capacity) this.pop(); + if (this._head < this._tail) return this._tail - this._head; + else return this._capacityMask + 1 - (this._head - this._tail); + }; + Denque.prototype.shift = function shift() { + var head = this._head; + if (head === this._tail) return void 0; + var item = this._list[head]; + this._list[head] = void 0; + this._head = head + 1 & this._capacityMask; + if (head < 2 && this._tail > 1e4 && this._tail <= this._list.length >>> 2) this._shrinkArray(); + return item; + }; + Denque.prototype.push = function push(item) { + if (arguments.length === 0) return this.size(); + var tail = this._tail; + this._list[tail] = item; + this._tail = tail + 1 & this._capacityMask; + if (this._tail === this._head) { + this._growArray(); + } + if (this._capacity && this.size() > this._capacity) { + this.shift(); + } + if (this._head < this._tail) return this._tail - this._head; + else return this._capacityMask + 1 - (this._head - this._tail); + }; + Denque.prototype.pop = function pop() { + var tail = this._tail; + if (tail === this._head) return void 0; + var len = this._list.length; + this._tail = tail - 1 + len & this._capacityMask; + var item = this._list[this._tail]; + this._list[this._tail] = void 0; + if (this._head < 2 && tail > 1e4 && tail <= len >>> 2) this._shrinkArray(); + return item; + }; + Denque.prototype.removeOne = function removeOne(index) { + var i = index; + if (i !== (i | 0)) { + return void 0; + } + if (this._head === this._tail) return void 0; + var size = this.size(); + var len = this._list.length; + if (i >= size || i < -size) return void 0; + if (i < 0) i += size; + i = this._head + i & this._capacityMask; + var item = this._list[i]; + var k; + if (index < size / 2) { + for (k = index; k > 0; k--) { + this._list[i] = this._list[i = i - 1 + len & this._capacityMask]; + } + this._list[i] = void 0; + this._head = this._head + 1 + len & this._capacityMask; + } else { + for (k = size - 1 - index; k > 0; k--) { + this._list[i] = this._list[i = i + 1 + len & this._capacityMask]; + } + this._list[i] = void 0; + this._tail = this._tail - 1 + len & this._capacityMask; + } + return item; + }; + Denque.prototype.remove = function remove(index, count) { + var i = index; + var removed; + var del_count = count; + if (i !== (i | 0)) { + return void 0; + } + if (this._head === this._tail) return void 0; + var size = this.size(); + var len = this._list.length; + if (i >= size || i < -size || count < 1) return void 0; + if (i < 0) i += size; + if (count === 1 || !count) { + removed = new Array(1); + removed[0] = this.removeOne(i); + return removed; + } + if (i === 0 && i + count >= size) { + removed = this.toArray(); + this.clear(); + return removed; + } + if (i + count > size) count = size - i; + var k; + removed = new Array(count); + for (k = 0; k < count; k++) { + removed[k] = this._list[this._head + i + k & this._capacityMask]; + } + i = this._head + i & this._capacityMask; + if (index + count === size) { + this._tail = this._tail - count + len & this._capacityMask; + for (k = count; k > 0; k--) { + this._list[i = i + 1 + len & this._capacityMask] = void 0; + } + return removed; + } + if (index === 0) { + this._head = this._head + count + len & this._capacityMask; + for (k = count - 1; k > 0; k--) { + this._list[i = i + 1 + len & this._capacityMask] = void 0; + } + return removed; + } + if (i < size / 2) { + this._head = this._head + index + count + len & this._capacityMask; + for (k = index; k > 0; k--) { + this.unshift(this._list[i = i - 1 + len & this._capacityMask]); + } + i = this._head - 1 + len & this._capacityMask; + while (del_count > 0) { + this._list[i = i - 1 + len & this._capacityMask] = void 0; + del_count--; + } + if (index < 0) this._tail = i; + } else { + this._tail = i; + i = i + count + len & this._capacityMask; + for (k = size - (count + index); k > 0; k--) { + this.push(this._list[i++]); + } + i = this._tail; + while (del_count > 0) { + this._list[i = i + 1 + len & this._capacityMask] = void 0; + del_count--; + } + } + if (this._head < 2 && this._tail > 1e4 && this._tail <= len >>> 2) this._shrinkArray(); + return removed; + }; + Denque.prototype.splice = function splice(index, count) { + var i = index; + if (i !== (i | 0)) { + return void 0; + } + var size = this.size(); + if (i < 0) i += size; + if (i > size) return void 0; + if (arguments.length > 2) { + var k; + var temp; + var removed; + var arg_len = arguments.length; + var len = this._list.length; + var arguments_index = 2; + if (!size || i < size / 2) { + temp = new Array(i); + for (k = 0; k < i; k++) { + temp[k] = this._list[this._head + k & this._capacityMask]; + } + if (count === 0) { + removed = []; + if (i > 0) { + this._head = this._head + i + len & this._capacityMask; + } + } else { + removed = this.remove(i, count); + this._head = this._head + i + len & this._capacityMask; + } + while (arg_len > arguments_index) { + this.unshift(arguments[--arg_len]); + } + for (k = i; k > 0; k--) { + this.unshift(temp[k - 1]); + } + } else { + temp = new Array(size - (i + count)); + var leng = temp.length; + for (k = 0; k < leng; k++) { + temp[k] = this._list[this._head + i + count + k & this._capacityMask]; + } + if (count === 0) { + removed = []; + if (i != size) { + this._tail = this._head + i + len & this._capacityMask; + } + } else { + removed = this.remove(i, count); + this._tail = this._tail - leng + len & this._capacityMask; + } + while (arguments_index < arg_len) { + this.push(arguments[arguments_index++]); + } + for (k = 0; k < leng; k++) { + this.push(temp[k]); + } + } + return removed; + } else { + return this.remove(i, count); + } + }; + Denque.prototype.clear = function clear() { + this._list = new Array(this._list.length); + this._head = 0; + this._tail = 0; + }; + Denque.prototype.isEmpty = function isEmpty() { + return this._head === this._tail; + }; + Denque.prototype.toArray = function toArray() { + return this._copyArray(false); + }; + Denque.prototype._fromArray = function _fromArray(array) { + var length = array.length; + var capacity = this._nextPowerOf2(length); + this._list = new Array(capacity); + this._capacityMask = capacity - 1; + this._tail = length; + for (var i = 0; i < length; i++) this._list[i] = array[i]; + }; + Denque.prototype._copyArray = function _copyArray(fullCopy, size) { + var src = this._list; + var capacity = src.length; + var length = this.length; + size = size | length; + if (size == length && this._head < this._tail) { + return this._list.slice(this._head, this._tail); + } + var dest = new Array(size); + var k = 0; + var i; + if (fullCopy || this._head > this._tail) { + for (i = this._head; i < capacity; i++) dest[k++] = src[i]; + for (i = 0; i < this._tail; i++) dest[k++] = src[i]; + } else { + for (i = this._head; i < this._tail; i++) dest[k++] = src[i]; + } + return dest; + }; + Denque.prototype._growArray = function _growArray() { + if (this._head != 0) { + var newList = this._copyArray(true, this._list.length << 1); + this._tail = this._list.length; + this._head = 0; + this._list = newList; + } else { + this._tail = this._list.length; + this._list.length <<= 1; + } + this._capacityMask = this._capacityMask << 1 | 1; + }; + Denque.prototype._shrinkArray = function _shrinkArray() { + this._list.length >>>= 1; + this._capacityMask >>>= 1; + }; + Denque.prototype._nextPowerOf2 = function _nextPowerOf2(num) { + var log2 = Math.log(num) / Math.log(2); + var nextPow2 = 1 << log2 + 1; + return Math.max(nextPow2, 4); + }; + module2.exports = Denque; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/cluster/DelayQueue.js +var require_DelayQueue = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/cluster/DelayQueue.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils_1 = require_utils15(); + var Deque = require_denque(); + var debug = (0, utils_1.Debug)("delayqueue"); + var DelayQueue = class { + constructor() { + this.queues = {}; + this.timeouts = {}; + } + /** + * Add a new item to the queue + * + * @param bucket bucket name + * @param item function that will run later + * @param options + */ + push(bucket, item, options) { + const callback = options.callback || process.nextTick; + if (!this.queues[bucket]) { + this.queues[bucket] = new Deque(); + } + const queue = this.queues[bucket]; + queue.push(item); + if (!this.timeouts[bucket]) { + this.timeouts[bucket] = setTimeout(() => { + callback(() => { + this.timeouts[bucket] = null; + this.execute(bucket); + }); + }, options.timeout); + } + } + execute(bucket) { + const queue = this.queues[bucket]; + if (!queue) { + return; + } + const { length } = queue; + if (!length) { + return; + } + debug("send %d commands in %s queue", length, bucket); + this.queues[bucket] = null; + while (queue.length > 0) { + queue.shift()(); + } + } + }; + exports2.default = DelayQueue; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/cluster/ShardedSubscriber.js +var require_ShardedSubscriber = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/cluster/ShardedSubscriber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require_util2(); + var utils_1 = require_utils15(); + var Redis_1 = require_Redis(); + var debug = (0, utils_1.Debug)("cluster:subscriberGroup:shardedSubscriber"); + var SubscriberStatus = { + IDLE: "idle", + STARTING: "starting", + CONNECTED: "connected", + STOPPING: "stopping", + ENDED: "ended" + }; + var ALLOWED_STATUS_UPDATES = { + [SubscriberStatus.IDLE]: [ + SubscriberStatus.STARTING, + SubscriberStatus.STOPPING, + SubscriberStatus.ENDED + ], + [SubscriberStatus.STARTING]: [ + SubscriberStatus.CONNECTED, + SubscriberStatus.STOPPING, + SubscriberStatus.ENDED + ], + [SubscriberStatus.CONNECTED]: [ + SubscriberStatus.STOPPING, + SubscriberStatus.ENDED + ], + [SubscriberStatus.STOPPING]: [SubscriberStatus.ENDED], + [SubscriberStatus.ENDED]: [] + }; + var ShardedSubscriber = class { + constructor(emitter, options, redisOptions) { + var _a; + this.emitter = emitter; + this.status = SubscriberStatus.IDLE; + this.instance = null; + this.connectPromise = null; + this.messageListeners = /* @__PURE__ */ new Map(); + this.onEnd = () => { + this.updateStatus(SubscriberStatus.ENDED); + this.emitter.emit("-node", this.instance, this.nodeKey); + }; + this.onError = (error) => { + this.emitter.emit("nodeError", error, this.nodeKey); + }; + this.onMoved = () => { + this.emitter.emit("moved"); + }; + this.instance = new Redis_1.default((0, utils_1.defaults)({ + enableReadyCheck: false, + enableOfflineQueue: true, + connectionName: (0, util_1.getConnectionName)("ssubscriber", options.connectionName), + /** + * Disable auto reconnection for subscribers. + * The ClusterSubscriberGroup will handle the reconnection. + */ + retryStrategy: null, + lazyConnect: true + }, options, redisOptions)); + this.lazyConnect = (_a = redisOptions === null || redisOptions === void 0 ? void 0 : redisOptions.lazyConnect) !== null && _a !== void 0 ? _a : true; + this.nodeKey = (0, util_1.getNodeKey)(options); + this.instance.on("end", this.onEnd); + this.instance.on("error", this.onError); + this.instance.on("moved", this.onMoved); + for (const event of ["smessage", "smessageBuffer"]) { + const listener = (...args) => { + this.emitter.emit(event, ...args); + }; + this.messageListeners.set(event, listener); + this.instance.on(event, listener); + } + } + async start() { + if (this.connectPromise) { + return this.connectPromise; + } + if (this.status === SubscriberStatus.STARTING || this.status === SubscriberStatus.CONNECTED) { + return; + } + if (this.status === SubscriberStatus.ENDED || !this.instance) { + throw new Error(`Sharded subscriber ${this.nodeKey} cannot be restarted once ended.`); + } + this.updateStatus(SubscriberStatus.STARTING); + this.connectPromise = this.instance.connect(); + try { + await this.connectPromise; + this.updateStatus(SubscriberStatus.CONNECTED); + } catch (err) { + this.updateStatus(SubscriberStatus.ENDED); + throw err; + } finally { + this.connectPromise = null; + } + } + stop() { + this.updateStatus(SubscriberStatus.STOPPING); + if (this.instance) { + this.instance.disconnect(); + this.instance.removeAllListeners(); + this.messageListeners.clear(); + this.instance = null; + } + this.updateStatus(SubscriberStatus.ENDED); + debug("stopped %s", this.nodeKey); + } + isStarted() { + return [ + SubscriberStatus.CONNECTED, + SubscriberStatus.STARTING + ].includes(this.status); + } + get subscriberStatus() { + return this.status; + } + isHealthy() { + return (this.status === SubscriberStatus.IDLE || this.status === SubscriberStatus.CONNECTED || this.status === SubscriberStatus.STARTING) && this.instance !== null; + } + getInstance() { + return this.instance; + } + getNodeKey() { + return this.nodeKey; + } + isLazyConnect() { + return this.lazyConnect; + } + updateStatus(nextStatus) { + if (this.status === nextStatus) { + return; + } + if (!ALLOWED_STATUS_UPDATES[this.status].includes(nextStatus)) { + debug("Invalid status transition for %s: %s -> %s", this.nodeKey, this.status, nextStatus); + return; + } + this.status = nextStatus; + } + }; + exports2.default = ShardedSubscriber; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/cluster/ClusterSubscriberGroup.js +var require_ClusterSubscriberGroup = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/cluster/ClusterSubscriberGroup.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils_1 = require_utils15(); + var util_1 = require_util2(); + var calculateSlot = require_lib6(); + var ShardedSubscriber_1 = require_ShardedSubscriber(); + var debug = (0, utils_1.Debug)("cluster:subscriberGroup"); + var ClusterSubscriberGroup = class _ClusterSubscriberGroup { + /** + * Register callbacks + * + * @param cluster + */ + constructor(subscriberGroupEmitter, options) { + this.subscriberGroupEmitter = subscriberGroupEmitter; + this.options = options; + this.shardedSubscribers = /* @__PURE__ */ new Map(); + this.clusterSlots = []; + this.subscriberToSlotsIndex = /* @__PURE__ */ new Map(); + this.channels = /* @__PURE__ */ new Map(); + this.failedAttemptsByNode = /* @__PURE__ */ new Map(); + this.isResetting = false; + this.pendingReset = null; + this.handleSubscriberConnectFailed = (error, nodeKey) => { + const currentAttempts = this.failedAttemptsByNode.get(nodeKey) || 0; + const failedAttempts = currentAttempts + 1; + this.failedAttemptsByNode.set(nodeKey, failedAttempts); + const attempts = Math.min(failedAttempts, _ClusterSubscriberGroup.MAX_RETRY_ATTEMPTS); + const backoff = Math.min(_ClusterSubscriberGroup.BASE_BACKOFF_MS * 2 ** attempts, _ClusterSubscriberGroup.MAX_BACKOFF_MS); + const jitter = Math.floor((Math.random() - 0.5) * (backoff * 0.5)); + const delay = Math.max(0, backoff + jitter); + debug("Failed to connect subscriber for %s. Refreshing slots in %dms", nodeKey, delay); + this.subscriberGroupEmitter.emit("subscriberConnectFailed", { + delay, + error + }); + }; + this.handleSubscriberConnectSucceeded = (nodeKey) => { + this.failedAttemptsByNode.delete(nodeKey); + }; + } + /** + * Get the responsible subscriber. + * + * @param slot + */ + getResponsibleSubscriber(slot) { + const nodeKey = this.clusterSlots[slot][0]; + const sub = this.shardedSubscribers.get(nodeKey); + if (sub && sub.subscriberStatus === "idle") { + sub.start().then(() => { + this.handleSubscriberConnectSucceeded(sub.getNodeKey()); + }).catch((err) => { + this.handleSubscriberConnectFailed(err, sub.getNodeKey()); + }); + } + return sub; + } + /** + * Adds a channel for which this subscriber group is responsible + * + * @param channels + */ + addChannels(channels) { + const slot = calculateSlot(channels[0]); + for (const c of channels) { + if (calculateSlot(c) !== slot) { + return -1; + } + } + const currChannels = this.channels.get(slot); + if (!currChannels) { + this.channels.set(slot, channels); + } else { + this.channels.set(slot, currChannels.concat(channels)); + } + return Array.from(this.channels.values()).reduce((sum, array) => sum + array.length, 0); + } + /** + * Removes channels for which the subscriber group is responsible by optionally unsubscribing + * @param channels + */ + removeChannels(channels) { + const slot = calculateSlot(channels[0]); + for (const c of channels) { + if (calculateSlot(c) !== slot) { + return -1; + } + } + const slotChannels = this.channels.get(slot); + if (slotChannels) { + const updatedChannels = slotChannels.filter((c) => !channels.includes(c)); + this.channels.set(slot, updatedChannels); + } + return Array.from(this.channels.values()).reduce((sum, array) => sum + array.length, 0); + } + /** + * Disconnect all subscribers and clear some of the internal state. + */ + stop() { + for (const s of this.shardedSubscribers.values()) { + s.stop(); + } + this.pendingReset = null; + this.shardedSubscribers.clear(); + this.subscriberToSlotsIndex.clear(); + } + /** + * Start all not yet started subscribers + */ + start() { + const startPromises = []; + for (const s of this.shardedSubscribers.values()) { + if (this.shouldStartSubscriber(s)) { + startPromises.push(s.start().then(() => { + this.handleSubscriberConnectSucceeded(s.getNodeKey()); + }).catch((err) => { + this.handleSubscriberConnectFailed(err, s.getNodeKey()); + })); + this.subscriberGroupEmitter.emit("+subscriber"); + } + } + return Promise.all(startPromises); + } + /** + * Resets the subscriber group by disconnecting all subscribers that are no longer needed and connecting new ones. + */ + async reset(clusterSlots, clusterNodes) { + if (this.isResetting) { + this.pendingReset = { slots: clusterSlots, nodes: clusterNodes }; + return; + } + this.isResetting = true; + try { + const hasTopologyChanged = this._refreshSlots(clusterSlots); + const hasFailedSubscribers = this.hasUnhealthySubscribers(); + if (!hasTopologyChanged && !hasFailedSubscribers) { + debug("No topology change detected or failed subscribers. Skipping reset."); + return; + } + for (const [nodeKey, shardedSubscriber] of this.shardedSubscribers) { + if ( + // If the subscriber is still responsible for a slot range and is healthy then keep it + this.subscriberToSlotsIndex.has(nodeKey) && shardedSubscriber.isHealthy() + ) { + debug("Skipping deleting subscriber for %s", nodeKey); + continue; + } + debug("Removing subscriber for %s", nodeKey); + shardedSubscriber.stop(); + this.shardedSubscribers.delete(nodeKey); + this.subscriberGroupEmitter.emit("-subscriber"); + } + const startPromises = []; + for (const [nodeKey, _2] of this.subscriberToSlotsIndex) { + const existingSubscriber = this.shardedSubscribers.get(nodeKey); + if (existingSubscriber && existingSubscriber.isHealthy()) { + debug("Skipping creating new subscriber for %s", nodeKey); + if (!existingSubscriber.isStarted() && this.shouldStartSubscriber(existingSubscriber)) { + startPromises.push(existingSubscriber.start().then(() => { + this.handleSubscriberConnectSucceeded(nodeKey); + }).catch((error) => { + this.handleSubscriberConnectFailed(error, nodeKey); + })); + } + continue; + } + if (existingSubscriber && !existingSubscriber.isHealthy()) { + debug("Replacing subscriber for %s", nodeKey); + existingSubscriber.stop(); + this.shardedSubscribers.delete(nodeKey); + this.subscriberGroupEmitter.emit("-subscriber"); + } + debug("Creating new subscriber for %s", nodeKey); + const redis = clusterNodes.find((node) => { + return (0, util_1.getNodeKey)(node.options) === nodeKey; + }); + if (!redis) { + debug("Failed to find node for key %s", nodeKey); + continue; + } + const sub = new ShardedSubscriber_1.default(this.subscriberGroupEmitter, redis.options, this.options.redisOptions); + this.shardedSubscribers.set(nodeKey, sub); + if (this.shouldStartSubscriber(sub)) { + startPromises.push(sub.start().then(() => { + this.handleSubscriberConnectSucceeded(nodeKey); + }).catch((error) => { + this.handleSubscriberConnectFailed(error, nodeKey); + })); + } + this.subscriberGroupEmitter.emit("+subscriber"); + } + await Promise.all(startPromises); + this._resubscribe(); + this.subscriberGroupEmitter.emit("subscribersReady"); + } finally { + this.isResetting = false; + if (this.pendingReset) { + const { slots, nodes } = this.pendingReset; + this.pendingReset = null; + await this.reset(slots, nodes); + } + } + } + /** + * Refreshes the subscriber-related slot ranges + * + * Returns false if no refresh was needed + * + * @param targetSlots + */ + _refreshSlots(targetSlots) { + if (this._slotsAreEqual(targetSlots) && this.subscriberToSlotsIndex.size > 0) { + debug("Nothing to refresh because the new cluster map is equal to the previous one."); + return false; + } + debug("Refreshing the slots of the subscriber group."); + this.subscriberToSlotsIndex = /* @__PURE__ */ new Map(); + for (let slot = 0; slot < targetSlots.length; slot++) { + const node = targetSlots[slot][0]; + if (!this.subscriberToSlotsIndex.has(node)) { + this.subscriberToSlotsIndex.set(node, []); + } + this.subscriberToSlotsIndex.get(node).push(Number(slot)); + } + this.clusterSlots = JSON.parse(JSON.stringify(targetSlots)); + return true; + } + /** + * Resubscribes to the previous channels + * + * @private + */ + _resubscribe() { + if (this.shardedSubscribers) { + this.shardedSubscribers.forEach((s, nodeKey) => { + const subscriberSlots = this.subscriberToSlotsIndex.get(nodeKey); + if (subscriberSlots) { + subscriberSlots.forEach((ss) => { + const redis = s.getInstance(); + const channels = this.channels.get(ss); + if (channels && channels.length > 0) { + if (!redis || redis.status === "end") { + return; + } + if (redis.status === "ready") { + redis.ssubscribe(...channels).catch((err) => { + debug("Failed to ssubscribe on node %s: %s", nodeKey, err); + }); + } else { + redis.once("ready", () => { + redis.ssubscribe(...channels).catch((err) => { + debug("Failed to ssubscribe on node %s: %s", nodeKey, err); + }); + }); + } + } + }); + } + }); + } + } + /** + * Deep equality of the cluster slots objects + * + * @param other + * @private + */ + _slotsAreEqual(other) { + if (this.clusterSlots === void 0) { + return false; + } else { + return JSON.stringify(this.clusterSlots) === JSON.stringify(other); + } + } + /** + * Checks if any subscribers are in an unhealthy state. + * + * A subscriber is considered unhealthy if: + * - It exists but is not started (failed/disconnected) + * - It's missing entirely for a node that should have one + * + * @returns true if any subscribers need to be recreated + */ + hasUnhealthySubscribers() { + const hasFailedSubscribers = Array.from(this.shardedSubscribers.values()).some((sub) => !sub.isHealthy()); + const hasMissingSubscribers = Array.from(this.subscriberToSlotsIndex.keys()).some((nodeKey) => !this.shardedSubscribers.has(nodeKey)); + return hasFailedSubscribers || hasMissingSubscribers; + } + shouldStartSubscriber(sub) { + if (sub.isStarted()) { + return false; + } + if (!sub.isLazyConnect()) { + return true; + } + const subscriberSlots = this.subscriberToSlotsIndex.get(sub.getNodeKey()); + if (!subscriberSlots) { + return false; + } + return subscriberSlots.some((slot) => { + const channels = this.channels.get(slot); + return Boolean(channels && channels.length > 0); + }); + } + }; + exports2.default = ClusterSubscriberGroup; + ClusterSubscriberGroup.MAX_RETRY_ATTEMPTS = 10; + ClusterSubscriberGroup.MAX_BACKOFF_MS = 2e3; + ClusterSubscriberGroup.BASE_BACKOFF_MS = 100; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/cluster/index.js +var require_cluster = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/cluster/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var commands_1 = require_built(); + var events_1 = require("events"); + var redis_errors_1 = require_redis_errors(); + var standard_as_callback_1 = require_built2(); + var Command_1 = require_Command(); + var ClusterAllFailedError_1 = require_ClusterAllFailedError(); + var Redis_1 = require_Redis(); + var ScanStream_1 = require_ScanStream(); + var transaction_1 = require_transaction(); + var utils_1 = require_utils15(); + var applyMixin_1 = require_applyMixin(); + var Commander_1 = require_Commander(); + var ClusterOptions_1 = require_ClusterOptions(); + var ClusterSubscriber_1 = require_ClusterSubscriber(); + var ConnectionPool_1 = require_ConnectionPool(); + var DelayQueue_1 = require_DelayQueue(); + var util_1 = require_util2(); + var Deque = require_denque(); + var ClusterSubscriberGroup_1 = require_ClusterSubscriberGroup(); + var debug = (0, utils_1.Debug)("cluster"); + var REJECT_OVERWRITTEN_COMMANDS = /* @__PURE__ */ new WeakSet(); + var Cluster = class _Cluster extends Commander_1.default { + /** + * Creates an instance of Cluster. + */ + //TODO: Add an option that enables or disables sharded PubSub + constructor(startupNodes, options = {}) { + var _a; + super(); + this.slots = []; + this._groupsIds = {}; + this._groupsBySlot = Array(16384); + this.isCluster = true; + this.retryAttempts = 0; + this.delayQueue = new DelayQueue_1.default(); + this.offlineQueue = new Deque(); + this.isRefreshing = false; + this._refreshSlotsCacheCallbacks = []; + this._autoPipelines = /* @__PURE__ */ new Map(); + this._runningAutoPipelines = /* @__PURE__ */ new Set(); + this._readyDelayedCallbacks = []; + this.connectionEpoch = 0; + events_1.EventEmitter.call(this); + this.startupNodes = startupNodes; + this.options = (0, utils_1.defaults)({}, options, ClusterOptions_1.DEFAULT_CLUSTER_OPTIONS, this.options); + if (this.options.shardedSubscribers) { + this.createShardedSubscriberGroup(); + } + if (this.options.redisOptions && this.options.redisOptions.keyPrefix && !this.options.keyPrefix) { + this.options.keyPrefix = this.options.redisOptions.keyPrefix; + } + if (typeof this.options.scaleReads !== "function" && ["all", "master", "slave"].indexOf(this.options.scaleReads) === -1) { + throw new Error('Invalid option scaleReads "' + this.options.scaleReads + '". Expected "all", "master", "slave" or a custom function'); + } + this.connectionPool = new ConnectionPool_1.default((_a = this.options.redisOptions) !== null && _a !== void 0 ? _a : {}, this.options.clusterNodeRetryStrategy); + this.connectionPool.on("-node", (redis, key) => { + this.emit("-node", redis); + }); + this.connectionPool.on("+node", (redis) => { + this.emit("+node", redis); + }); + this.connectionPool.on("drain", () => { + this.setStatus("close"); + }); + this.connectionPool.on("nodeError", (error, key) => { + this.emit("node error", error, key); + }); + this.subscriber = new ClusterSubscriber_1.default(this.connectionPool, this); + if (this.options.scripts) { + Object.entries(this.options.scripts).forEach(([name, definition]) => { + this.defineCommand(name, definition); + }); + } + if (this.options.lazyConnect) { + this.setStatus("wait"); + } else { + this.connect().catch((err) => { + debug("connecting failed: %s", err); + }); + } + } + /** + * Connect to a cluster + */ + connect() { + return new Promise((resolve, reject) => { + if (this.status === "connecting" || this.status === "connect" || this.status === "ready") { + reject(new Error("Redis is already connecting/connected")); + return; + } + const epoch = ++this.connectionEpoch; + this.setStatus("connecting"); + this.resolveStartupNodeHostnames().then((nodes) => { + if (this.connectionEpoch !== epoch) { + debug("discard connecting after resolving startup nodes because epoch not match: %d != %d", epoch, this.connectionEpoch); + reject(new redis_errors_1.RedisError("Connection is discarded because a new connection is made")); + return; + } + if (this.status !== "connecting") { + debug("discard connecting after resolving startup nodes because the status changed to %s", this.status); + reject(new redis_errors_1.RedisError("Connection is aborted")); + return; + } + this.connectionPool.reset(nodes); + if (this.options.shardedSubscribers) { + this.shardedSubscribers.reset(this.slots, this.connectionPool.getNodes("all")).catch((err) => { + debug("Error while starting subscribers: %s", err); + }); + } + const readyHandler = () => { + this.setStatus("ready"); + this.retryAttempts = 0; + this.executeOfflineCommands(); + this.resetNodesRefreshInterval(); + resolve(); + }; + let closeListener = void 0; + const refreshListener = () => { + this.invokeReadyDelayedCallbacks(void 0); + this.removeListener("close", closeListener); + this.manuallyClosing = false; + this.setStatus("connect"); + if (this.options.enableReadyCheck) { + this.readyCheck((err, fail) => { + if (err || fail) { + debug("Ready check failed (%s). Reconnecting...", err || fail); + if (this.status === "connect") { + this.disconnect(true); + } + } else { + readyHandler(); + } + }); + } else { + readyHandler(); + } + }; + closeListener = () => { + const error = new Error("None of startup nodes is available"); + this.removeListener("refresh", refreshListener); + this.invokeReadyDelayedCallbacks(error); + reject(error); + }; + this.once("refresh", refreshListener); + this.once("close", closeListener); + this.once("close", this.handleCloseEvent.bind(this)); + this.refreshSlotsCache((err) => { + if (err && err.message === ClusterAllFailedError_1.default.defaultMessage) { + Redis_1.default.prototype.silentEmit.call(this, "error", err); + this.connectionPool.reset([]); + } + }); + this.subscriber.start(); + if (this.options.shardedSubscribers) { + this.shardedSubscribers.start().catch((err) => { + debug("Error while starting subscribers: %s", err); + }); + } + }).catch((err) => { + this.setStatus("close"); + this.handleCloseEvent(err); + this.invokeReadyDelayedCallbacks(err); + reject(err); + }); + }); + } + /** + * Disconnect from every node in the cluster. + */ + disconnect(reconnect = false) { + const status = this.status; + this.setStatus("disconnecting"); + if (!reconnect) { + this.manuallyClosing = true; + } + if (this.reconnectTimeout && !reconnect) { + clearTimeout(this.reconnectTimeout); + this.reconnectTimeout = null; + debug("Canceled reconnecting attempts"); + } + this.clearNodesRefreshInterval(); + this.subscriber.stop(); + if (this.options.shardedSubscribers) { + this.shardedSubscribers.stop(); + } + if (status === "wait") { + this.setStatus("close"); + this.handleCloseEvent(); + } else { + this.connectionPool.reset([]); + } + } + /** + * Quit the cluster gracefully. + */ + quit(callback) { + const status = this.status; + this.setStatus("disconnecting"); + this.manuallyClosing = true; + if (this.reconnectTimeout) { + clearTimeout(this.reconnectTimeout); + this.reconnectTimeout = null; + } + this.clearNodesRefreshInterval(); + this.subscriber.stop(); + if (this.options.shardedSubscribers) { + this.shardedSubscribers.stop(); + } + if (status === "wait") { + const ret2 = (0, standard_as_callback_1.default)(Promise.resolve("OK"), callback); + setImmediate(function() { + this.setStatus("close"); + this.handleCloseEvent(); + }.bind(this)); + return ret2; + } + return (0, standard_as_callback_1.default)(Promise.all(this.nodes().map((node) => node.quit().catch((err) => { + if (err.message === utils_1.CONNECTION_CLOSED_ERROR_MSG) { + return "OK"; + } + throw err; + }))).then(() => "OK"), callback); + } + /** + * Create a new instance with the same startup nodes and options as the current one. + * + * @example + * ```js + * var cluster = new Redis.Cluster([{ host: "127.0.0.1", port: "30001" }]); + * var anotherCluster = cluster.duplicate(); + * ``` + */ + duplicate(overrideStartupNodes = [], overrideOptions = {}) { + const startupNodes = overrideStartupNodes.length > 0 ? overrideStartupNodes : this.startupNodes.slice(0); + const options = Object.assign({}, this.options, overrideOptions); + return new _Cluster(startupNodes, options); + } + /** + * Get nodes with the specified role + */ + nodes(role = "all") { + if (role !== "all" && role !== "master" && role !== "slave") { + throw new Error('Invalid role "' + role + '". Expected "all", "master" or "slave"'); + } + return this.connectionPool.getNodes(role); + } + /** + * This is needed in order not to install a listener for each auto pipeline + * + * @ignore + */ + delayUntilReady(callback) { + this._readyDelayedCallbacks.push(callback); + } + /** + * Get the number of commands queued in automatic pipelines. + * + * This is not available (and returns 0) until the cluster is connected and slots information have been received. + */ + get autoPipelineQueueSize() { + let queued = 0; + for (const pipeline of this._autoPipelines.values()) { + queued += pipeline.length; + } + return queued; + } + /** + * Refresh the slot cache + * + * @ignore + */ + refreshSlotsCache(callback) { + if (callback) { + this._refreshSlotsCacheCallbacks.push(callback); + } + if (this.isRefreshing) { + return; + } + this.isRefreshing = true; + const _this = this; + const wrapper = (error) => { + this.isRefreshing = false; + for (const callback2 of this._refreshSlotsCacheCallbacks) { + callback2(error); + } + this._refreshSlotsCacheCallbacks = []; + }; + const nodes = (0, utils_1.shuffle)(this.connectionPool.getNodes()); + let lastNodeError = null; + function tryNode(index) { + if (index === nodes.length) { + const error = new ClusterAllFailedError_1.default(ClusterAllFailedError_1.default.defaultMessage, lastNodeError); + return wrapper(error); + } + const node = nodes[index]; + const key = `${node.options.host}:${node.options.port}`; + debug("getting slot cache from %s", key); + _this.getInfoFromNode(node, function(err) { + switch (_this.status) { + case "close": + case "end": + return wrapper(new Error("Cluster is disconnected.")); + case "disconnecting": + return wrapper(new Error("Cluster is disconnecting.")); + } + if (err) { + _this.emit("node error", err, key); + lastNodeError = err; + tryNode(index + 1); + } else { + _this.emit("refresh"); + wrapper(); + } + }); + } + tryNode(0); + } + /** + * @ignore + */ + sendCommand(command, stream, node) { + if (this.status === "wait") { + this.connect().catch(utils_1.noop); + } + if (this.status === "end") { + command.reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG)); + return command.promise; + } + let to = this.options.scaleReads; + if (to !== "master") { + const isCommandReadOnly = command.isReadOnly || (0, commands_1.exists)(command.name) && (0, commands_1.hasFlag)(command.name, "readonly"); + if (!isCommandReadOnly) { + to = "master"; + } + } + let targetSlot = node ? node.slot : command.getSlot(); + const ttl = {}; + const _this = this; + if (!node && !REJECT_OVERWRITTEN_COMMANDS.has(command)) { + REJECT_OVERWRITTEN_COMMANDS.add(command); + const reject = command.reject; + command.reject = function(err) { + const partialTry = tryConnection.bind(null, true); + _this.handleError(err, ttl, { + moved: function(slot, key) { + debug("command %s is moved to %s", command.name, key); + targetSlot = Number(slot); + if (_this.slots[slot]) { + _this.slots[slot][0] = key; + } else { + _this.slots[slot] = [key]; + } + _this._groupsBySlot[slot] = _this._groupsIds[_this.slots[slot].join(";")]; + _this.connectionPool.findOrCreate(_this.natMapper(key)); + tryConnection(); + debug("refreshing slot caches... (triggered by MOVED error)"); + _this.refreshSlotsCache(); + }, + ask: function(slot, key) { + debug("command %s is required to ask %s:%s", command.name, key); + const mapped = _this.natMapper(key); + _this.connectionPool.findOrCreate(mapped); + tryConnection(false, `${mapped.host}:${mapped.port}`); + }, + tryagain: partialTry, + clusterDown: partialTry, + connectionClosed: partialTry, + maxRedirections: function(redirectionError) { + reject.call(command, redirectionError); + }, + defaults: function() { + reject.call(command, err); + } + }); + }; + } + tryConnection(); + function tryConnection(random, asking) { + if (_this.status === "end") { + command.reject(new redis_errors_1.AbortError("Cluster is ended.")); + return; + } + let redis; + if (_this.status === "ready" || command.name === "cluster") { + if (node && node.redis) { + redis = node.redis; + } else if (Command_1.default.checkFlag("ENTER_SUBSCRIBER_MODE", command.name) || Command_1.default.checkFlag("EXIT_SUBSCRIBER_MODE", command.name)) { + if (_this.options.shardedSubscribers && (command.name == "ssubscribe" || command.name == "sunsubscribe")) { + const sub = _this.shardedSubscribers.getResponsibleSubscriber(targetSlot); + if (!sub) { + command.reject(new redis_errors_1.AbortError(`No sharded subscriber for slot: ${targetSlot}`)); + return; + } + let status = -1; + if (command.name == "ssubscribe") { + status = _this.shardedSubscribers.addChannels(command.getKeys()); + } + if (command.name == "sunsubscribe") { + status = _this.shardedSubscribers.removeChannels(command.getKeys()); + } + if (status !== -1) { + redis = sub.getInstance(); + } else { + command.reject(new redis_errors_1.AbortError("Possible CROSSSLOT error: All channels must hash to the same slot")); + } + } else { + redis = _this.subscriber.getInstance(); + } + if (!redis) { + command.reject(new redis_errors_1.AbortError("No subscriber for the cluster")); + return; + } + } else { + if (!random) { + if (typeof targetSlot === "number" && _this.slots[targetSlot]) { + const nodeKeys = _this.slots[targetSlot]; + if (typeof to === "function") { + const nodes = nodeKeys.map(function(key) { + return _this.connectionPool.getInstanceByKey(key); + }); + redis = to(nodes, command); + if (Array.isArray(redis)) { + redis = (0, utils_1.sample)(redis); + } + if (!redis) { + redis = nodes[0]; + } + } else { + let key; + if (to === "all") { + key = (0, utils_1.sample)(nodeKeys); + } else if (to === "slave" && nodeKeys.length > 1) { + key = (0, utils_1.sample)(nodeKeys, 1); + } else { + key = nodeKeys[0]; + } + redis = _this.connectionPool.getInstanceByKey(key); + } + } + if (asking) { + redis = _this.connectionPool.getInstanceByKey(asking); + redis.asking(); + } + } + if (!redis) { + redis = (typeof to === "function" ? null : _this.connectionPool.getSampleInstance(to)) || _this.connectionPool.getSampleInstance("all"); + } + if (redis && !_this.options.enableOfflineQueue && redis.status !== "ready" && redis.status !== "wait") { + command.reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG)); + return; + } + } + if (node && !node.redis) { + node.redis = redis; + } + } + if (!redis && _this.options.enableOfflineQueue) { + _this.offlineQueue.push({ + command, + stream, + node + }); + return; + } + if (!redis) { + command.reject(new Error("Cluster isn't ready and enableOfflineQueue options is false")); + return; + } + redis.sendCommand(command, stream); + } + return command.promise; + } + sscanStream(key, options) { + return this.createScanStream("sscan", { key, options }); + } + sscanBufferStream(key, options) { + return this.createScanStream("sscanBuffer", { key, options }); + } + hscanStream(key, options) { + return this.createScanStream("hscan", { key, options }); + } + hscanBufferStream(key, options) { + return this.createScanStream("hscanBuffer", { key, options }); + } + zscanStream(key, options) { + return this.createScanStream("zscan", { key, options }); + } + zscanBufferStream(key, options) { + return this.createScanStream("zscanBuffer", { key, options }); + } + /** + * @ignore + */ + handleError(error, ttl, handlers) { + if (typeof ttl.value === "undefined") { + ttl.value = this.options.maxRedirections; + } else { + ttl.value -= 1; + } + if (ttl.value <= 0) { + handlers.maxRedirections(new Error("Too many Cluster redirections. Last error: " + error)); + return; + } + const errv = error.message.split(" "); + if (errv[0] === "MOVED") { + const timeout = this.options.retryDelayOnMoved; + if (timeout && typeof timeout === "number") { + this.delayQueue.push("moved", handlers.moved.bind(null, errv[1], errv[2]), { timeout }); + } else { + handlers.moved(errv[1], errv[2]); + } + } else if (errv[0] === "ASK") { + handlers.ask(errv[1], errv[2]); + } else if (errv[0] === "TRYAGAIN") { + this.delayQueue.push("tryagain", handlers.tryagain, { + timeout: this.options.retryDelayOnTryAgain + }); + } else if (errv[0] === "CLUSTERDOWN" && this.options.retryDelayOnClusterDown > 0) { + this.delayQueue.push("clusterdown", handlers.connectionClosed, { + timeout: this.options.retryDelayOnClusterDown, + callback: this.refreshSlotsCache.bind(this) + }); + } else if (error.message === utils_1.CONNECTION_CLOSED_ERROR_MSG && this.options.retryDelayOnFailover > 0 && this.status === "ready") { + this.delayQueue.push("failover", handlers.connectionClosed, { + timeout: this.options.retryDelayOnFailover, + callback: this.refreshSlotsCache.bind(this) + }); + } else { + handlers.defaults(); + } + } + resetOfflineQueue() { + this.offlineQueue = new Deque(); + } + clearNodesRefreshInterval() { + if (this.slotsTimer) { + clearTimeout(this.slotsTimer); + this.slotsTimer = null; + } + } + resetNodesRefreshInterval() { + if (this.slotsTimer || !this.options.slotsRefreshInterval) { + return; + } + const nextRound = () => { + this.slotsTimer = setTimeout(() => { + debug('refreshing slot caches... (triggered by "slotsRefreshInterval" option)'); + this.refreshSlotsCache(() => { + nextRound(); + }); + }, this.options.slotsRefreshInterval); + }; + nextRound(); + } + /** + * Change cluster instance's status + */ + setStatus(status) { + debug("status: %s -> %s", this.status || "[empty]", status); + this.status = status; + process.nextTick(() => { + this.emit(status); + }); + } + /** + * Called when closed to check whether a reconnection should be made + */ + handleCloseEvent(reason) { + var _a; + if (reason) { + debug("closed because %s", reason); + } + let retryDelay; + if (!this.manuallyClosing && typeof this.options.clusterRetryStrategy === "function") { + retryDelay = this.options.clusterRetryStrategy.call(this, ++this.retryAttempts, reason); + } + if (typeof retryDelay === "number") { + this.setStatus("reconnecting"); + this.reconnectTimeout = setTimeout(() => { + this.reconnectTimeout = null; + debug("Cluster is disconnected. Retrying after %dms", retryDelay); + this.connect().catch(function(err) { + debug("Got error %s when reconnecting. Ignoring...", err); + }); + }, retryDelay); + } else { + if (this.options.shardedSubscribers) { + (_a = this.subscriberGroupEmitter) === null || _a === void 0 ? void 0 : _a.removeAllListeners(); + } + this.setStatus("end"); + this.flushQueue(new Error("None of startup nodes is available")); + } + } + /** + * Flush offline queue with error. + */ + flushQueue(error) { + let item; + while (item = this.offlineQueue.shift()) { + item.command.reject(error); + } + } + executeOfflineCommands() { + if (this.offlineQueue.length) { + debug("send %d commands in offline queue", this.offlineQueue.length); + const offlineQueue = this.offlineQueue; + this.resetOfflineQueue(); + let item; + while (item = offlineQueue.shift()) { + this.sendCommand(item.command, item.stream, item.node); + } + } + } + natMapper(nodeKey) { + const key = typeof nodeKey === "string" ? nodeKey : `${nodeKey.host}:${nodeKey.port}`; + let mapped = null; + if (this.options.natMap && typeof this.options.natMap === "function") { + mapped = this.options.natMap(key); + } else if (this.options.natMap && typeof this.options.natMap === "object") { + mapped = this.options.natMap[key]; + } + if (mapped) { + debug("NAT mapping %s -> %O", key, mapped); + return Object.assign({}, mapped); + } + return typeof nodeKey === "string" ? (0, util_1.nodeKeyToRedisOptions)(nodeKey) : nodeKey; + } + getInfoFromNode(redis, callback) { + if (!redis) { + return callback(new Error("Node is disconnected")); + } + const duplicatedConnection = redis.duplicate({ + enableOfflineQueue: true, + enableReadyCheck: false, + retryStrategy: null, + connectionName: (0, util_1.getConnectionName)("refresher", this.options.redisOptions && this.options.redisOptions.connectionName) + }); + duplicatedConnection.on("error", utils_1.noop); + duplicatedConnection.cluster("SLOTS", (0, utils_1.timeout)((err, result) => { + duplicatedConnection.disconnect(); + if (err) { + debug("error encountered running CLUSTER.SLOTS: %s", err); + return callback(err); + } + if (this.status === "disconnecting" || this.status === "close" || this.status === "end") { + debug("ignore CLUSTER.SLOTS results (count: %d) since cluster status is %s", result.length, this.status); + callback(); + return; + } + const nodes = []; + debug("cluster slots result count: %d", result.length); + for (let i = 0; i < result.length; ++i) { + const items = result[i]; + const slotRangeStart = items[0]; + const slotRangeEnd = items[1]; + const keys = []; + for (let j2 = 2; j2 < items.length; j2++) { + if (!items[j2][0]) { + continue; + } + const node = this.natMapper({ + host: items[j2][0], + port: items[j2][1] + }); + node.readOnly = j2 !== 2; + nodes.push(node); + keys.push(node.host + ":" + node.port); + } + debug("cluster slots result [%d]: slots %d~%d served by %s", i, slotRangeStart, slotRangeEnd, keys); + for (let slot = slotRangeStart; slot <= slotRangeEnd; slot++) { + this.slots[slot] = keys; + } + } + this._groupsIds = /* @__PURE__ */ Object.create(null); + let j = 0; + for (let i = 0; i < 16384; i++) { + const target = (this.slots[i] || []).join(";"); + if (!target.length) { + this._groupsBySlot[i] = void 0; + continue; + } + if (!this._groupsIds[target]) { + this._groupsIds[target] = ++j; + } + this._groupsBySlot[i] = this._groupsIds[target]; + } + this.connectionPool.reset(nodes); + if (this.options.shardedSubscribers) { + this.shardedSubscribers.reset(this.slots, this.connectionPool.getNodes("all")).catch((err2) => { + debug("Error while starting subscribers: %s", err2); + }); + } + callback(); + }, this.options.slotsRefreshTimeout)); + } + invokeReadyDelayedCallbacks(err) { + for (const c of this._readyDelayedCallbacks) { + process.nextTick(c, err); + } + this._readyDelayedCallbacks = []; + } + /** + * Check whether Cluster is able to process commands + */ + readyCheck(callback) { + this.cluster("INFO", (err, res) => { + if (err) { + return callback(err); + } + if (typeof res !== "string") { + return callback(); + } + let state; + const lines = res.split("\r\n"); + for (let i = 0; i < lines.length; ++i) { + const parts = lines[i].split(":"); + if (parts[0] === "cluster_state") { + state = parts[1]; + break; + } + } + if (state === "fail") { + debug("cluster state not ok (%s)", state); + callback(null, state); + } else { + callback(); + } + }); + } + resolveSrv(hostname) { + return new Promise((resolve, reject) => { + this.options.resolveSrv(hostname, (err, records) => { + if (err) { + return reject(err); + } + const self2 = this, groupedRecords = (0, util_1.groupSrvRecords)(records), sortedKeys = Object.keys(groupedRecords).sort((a, b) => parseInt(a) - parseInt(b)); + function tryFirstOne(err2) { + if (!sortedKeys.length) { + return reject(err2); + } + const key = sortedKeys[0], group = groupedRecords[key], record = (0, util_1.weightSrvRecords)(group); + if (!group.records.length) { + sortedKeys.shift(); + } + self2.dnsLookup(record.name).then((host) => resolve({ + host, + port: record.port + }), tryFirstOne); + } + tryFirstOne(); + }); + }); + } + dnsLookup(hostname) { + return new Promise((resolve, reject) => { + this.options.dnsLookup(hostname, (err, address) => { + if (err) { + debug("failed to resolve hostname %s to IP: %s", hostname, err.message); + reject(err); + } else { + debug("resolved hostname %s to IP %s", hostname, address); + resolve(address); + } + }); + }); + } + /** + * Normalize startup nodes, and resolving hostnames to IPs. + * + * This process happens every time when #connect() is called since + * #startupNodes and DNS records may chanage. + */ + async resolveStartupNodeHostnames() { + if (!Array.isArray(this.startupNodes) || this.startupNodes.length === 0) { + throw new Error("`startupNodes` should contain at least one node."); + } + const startupNodes = (0, util_1.normalizeNodeOptions)(this.startupNodes); + const hostnames = (0, util_1.getUniqueHostnamesFromOptions)(startupNodes); + if (hostnames.length === 0) { + return startupNodes; + } + const configs = await Promise.all(hostnames.map((this.options.useSRVRecords ? this.resolveSrv : this.dnsLookup).bind(this))); + const hostnameToConfig = (0, utils_1.zipMap)(hostnames, configs); + return startupNodes.map((node) => { + const config = hostnameToConfig.get(node.host); + if (!config) { + return node; + } + if (this.options.useSRVRecords) { + return Object.assign({}, node, config); + } + return Object.assign({}, node, { host: config }); + }); + } + createScanStream(command, { key, options = {} }) { + return new ScanStream_1.default({ + objectMode: true, + key, + redis: this, + command, + ...options + }); + } + createShardedSubscriberGroup() { + this.subscriberGroupEmitter = new events_1.EventEmitter(); + this.shardedSubscribers = new ClusterSubscriberGroup_1.default(this.subscriberGroupEmitter, this.options); + const refreshSlotsCacheCallback = (err) => { + if (err instanceof ClusterAllFailedError_1.default) { + this.disconnect(true); + } + }; + this.subscriberGroupEmitter.on("-node", (redis, nodeKey) => { + this.emit("-node", redis, nodeKey); + this.refreshSlotsCache(refreshSlotsCacheCallback); + }); + this.subscriberGroupEmitter.on("subscriberConnectFailed", ({ delay, error }) => { + this.emit("error", error); + setTimeout(() => { + this.refreshSlotsCache(refreshSlotsCacheCallback); + }, delay); + }); + this.subscriberGroupEmitter.on("moved", () => { + this.refreshSlotsCache(refreshSlotsCacheCallback); + }); + this.subscriberGroupEmitter.on("-subscriber", () => { + this.emit("-subscriber"); + }); + this.subscriberGroupEmitter.on("+subscriber", () => { + this.emit("+subscriber"); + }); + this.subscriberGroupEmitter.on("nodeError", (error, nodeKey) => { + this.emit("nodeError", error, nodeKey); + }); + this.subscriberGroupEmitter.on("subscribersReady", () => { + this.emit("subscribersReady"); + }); + for (const event of ["smessage", "smessageBuffer"]) { + this.subscriberGroupEmitter.on(event, (arg1, arg2, arg3) => { + this.emit(event, arg1, arg2, arg3); + }); + } + } + }; + (0, applyMixin_1.default)(Cluster, events_1.EventEmitter); + (0, transaction_1.addTransactionSupport)(Cluster.prototype); + exports2.default = Cluster; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/connectors/AbstractConnector.js +var require_AbstractConnector = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/connectors/AbstractConnector.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils_1 = require_utils15(); + var debug = (0, utils_1.Debug)("AbstractConnector"); + var AbstractConnector = class { + constructor(disconnectTimeout) { + this.connecting = false; + this.disconnectTimeout = disconnectTimeout; + } + check(info) { + return true; + } + disconnect() { + this.connecting = false; + if (this.stream) { + const stream = this.stream; + const timeout = setTimeout(() => { + debug("stream %s:%s still open, destroying it", stream.remoteAddress, stream.remotePort); + stream.destroy(); + }, this.disconnectTimeout); + stream.on("close", () => clearTimeout(timeout)); + stream.end(); + } + } + }; + exports2.default = AbstractConnector; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/connectors/StandaloneConnector.js +var require_StandaloneConnector = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/connectors/StandaloneConnector.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var net_1 = require("net"); + var tls_1 = require("tls"); + var utils_1 = require_utils15(); + var AbstractConnector_1 = require_AbstractConnector(); + var StandaloneConnector = class extends AbstractConnector_1.default { + constructor(options) { + super(options.disconnectTimeout); + this.options = options; + } + connect(_2) { + const { options } = this; + this.connecting = true; + let connectionOptions; + if ("path" in options && options.path) { + connectionOptions = { + path: options.path + }; + } else { + connectionOptions = {}; + if ("port" in options && options.port != null) { + connectionOptions.port = options.port; + } + if ("host" in options && options.host != null) { + connectionOptions.host = options.host; + } + if ("family" in options && options.family != null) { + connectionOptions.family = options.family; + } + } + if (options.tls) { + Object.assign(connectionOptions, options.tls); + } + return new Promise((resolve, reject) => { + process.nextTick(() => { + if (!this.connecting) { + reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG)); + return; + } + try { + if (options.tls) { + this.stream = (0, tls_1.connect)(connectionOptions); + } else { + this.stream = (0, net_1.createConnection)(connectionOptions); + } + } catch (err) { + reject(err); + return; + } + this.stream.once("error", (err) => { + this.firstError = err; + }); + resolve(this.stream); + }); + }); + } + }; + exports2.default = StandaloneConnector; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/connectors/SentinelConnector/SentinelIterator.js +var require_SentinelIterator = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/connectors/SentinelConnector/SentinelIterator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function isSentinelEql(a, b) { + return (a.host || "127.0.0.1") === (b.host || "127.0.0.1") && (a.port || 26379) === (b.port || 26379); + } + var SentinelIterator = class { + constructor(sentinels) { + this.cursor = 0; + this.sentinels = sentinels.slice(0); + } + next() { + const done = this.cursor >= this.sentinels.length; + return { done, value: done ? void 0 : this.sentinels[this.cursor++] }; + } + reset(moveCurrentEndpointToFirst) { + if (moveCurrentEndpointToFirst && this.sentinels.length > 1 && this.cursor !== 1) { + this.sentinels.unshift(...this.sentinels.splice(this.cursor - 1)); + } + this.cursor = 0; + } + add(sentinel) { + for (let i = 0; i < this.sentinels.length; i++) { + if (isSentinelEql(sentinel, this.sentinels[i])) { + return false; + } + } + this.sentinels.push(sentinel); + return true; + } + toString() { + return `${JSON.stringify(this.sentinels)} @${this.cursor}`; + } + }; + exports2.default = SentinelIterator; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/connectors/SentinelConnector/FailoverDetector.js +var require_FailoverDetector = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/connectors/SentinelConnector/FailoverDetector.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FailoverDetector = void 0; + var utils_1 = require_utils15(); + var debug = (0, utils_1.Debug)("FailoverDetector"); + var CHANNEL_NAME = "+switch-master"; + var FailoverDetector = class { + // sentinels can't be used for regular commands after this + constructor(connector, sentinels) { + this.isDisconnected = false; + this.connector = connector; + this.sentinels = sentinels; + } + cleanup() { + this.isDisconnected = true; + for (const sentinel of this.sentinels) { + sentinel.client.disconnect(); + } + } + async subscribe() { + debug("Starting FailoverDetector"); + const promises = []; + for (const sentinel of this.sentinels) { + const promise = sentinel.client.subscribe(CHANNEL_NAME).catch((err) => { + debug("Failed to subscribe to failover messages on sentinel %s:%s (%s)", sentinel.address.host || "127.0.0.1", sentinel.address.port || 26739, err.message); + }); + promises.push(promise); + sentinel.client.on("message", (channel) => { + if (!this.isDisconnected && channel === CHANNEL_NAME) { + this.disconnect(); + } + }); + } + await Promise.all(promises); + } + disconnect() { + this.isDisconnected = true; + debug("Failover detected, disconnecting"); + this.connector.disconnect(); + } + }; + exports2.FailoverDetector = FailoverDetector; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/connectors/SentinelConnector/index.js +var require_SentinelConnector = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/connectors/SentinelConnector/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SentinelIterator = void 0; + var net_1 = require("net"); + var utils_1 = require_utils15(); + var tls_1 = require("tls"); + var SentinelIterator_1 = require_SentinelIterator(); + exports2.SentinelIterator = SentinelIterator_1.default; + var AbstractConnector_1 = require_AbstractConnector(); + var Redis_1 = require_Redis(); + var FailoverDetector_1 = require_FailoverDetector(); + var debug = (0, utils_1.Debug)("SentinelConnector"); + var SentinelConnector = class extends AbstractConnector_1.default { + constructor(options) { + super(options.disconnectTimeout); + this.options = options; + this.emitter = null; + this.failoverDetector = null; + if (!this.options.sentinels.length) { + throw new Error("Requires at least one sentinel to connect to."); + } + if (!this.options.name) { + throw new Error("Requires the name of master."); + } + this.sentinelIterator = new SentinelIterator_1.default(this.options.sentinels); + } + check(info) { + const roleMatches = !info.role || this.options.role === info.role; + if (!roleMatches) { + debug("role invalid, expected %s, but got %s", this.options.role, info.role); + this.sentinelIterator.next(); + this.sentinelIterator.next(); + this.sentinelIterator.reset(true); + } + return roleMatches; + } + disconnect() { + super.disconnect(); + if (this.failoverDetector) { + this.failoverDetector.cleanup(); + } + } + connect(eventEmitter) { + this.connecting = true; + this.retryAttempts = 0; + let lastError; + const connectToNext = async () => { + const endpoint = this.sentinelIterator.next(); + if (endpoint.done) { + this.sentinelIterator.reset(false); + const retryDelay = typeof this.options.sentinelRetryStrategy === "function" ? this.options.sentinelRetryStrategy(++this.retryAttempts) : null; + let errorMsg = typeof retryDelay !== "number" ? "All sentinels are unreachable and retry is disabled." : `All sentinels are unreachable. Retrying from scratch after ${retryDelay}ms.`; + if (lastError) { + errorMsg += ` Last error: ${lastError.message}`; + } + debug(errorMsg); + const error = new Error(errorMsg); + if (typeof retryDelay === "number") { + eventEmitter("error", error); + await new Promise((resolve) => setTimeout(resolve, retryDelay)); + return connectToNext(); + } else { + throw error; + } + } + let resolved = null; + let err = null; + try { + resolved = await this.resolve(endpoint.value); + } catch (error) { + err = error; + } + if (!this.connecting) { + throw new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG); + } + const endpointAddress = endpoint.value.host + ":" + endpoint.value.port; + if (resolved) { + debug("resolved: %s:%s from sentinel %s", resolved.host, resolved.port, endpointAddress); + if (this.options.enableTLSForSentinelMode && this.options.tls) { + Object.assign(resolved, this.options.tls); + this.stream = (0, tls_1.connect)(resolved); + this.stream.once("secureConnect", this.initFailoverDetector.bind(this)); + } else { + this.stream = (0, net_1.createConnection)(resolved); + this.stream.once("connect", this.initFailoverDetector.bind(this)); + } + this.stream.once("error", (err2) => { + this.firstError = err2; + }); + return this.stream; + } else { + const errorMsg = err ? "failed to connect to sentinel " + endpointAddress + " because " + err.message : "connected to sentinel " + endpointAddress + " successfully, but got an invalid reply: " + resolved; + debug(errorMsg); + eventEmitter("sentinelError", new Error(errorMsg)); + if (err) { + lastError = err; + } + return connectToNext(); + } + }; + return connectToNext(); + } + async updateSentinels(client) { + if (!this.options.updateSentinels) { + return; + } + const result = await client.sentinel("sentinels", this.options.name); + if (!Array.isArray(result)) { + return; + } + result.map(utils_1.packObject).forEach((sentinel) => { + const flags = sentinel.flags ? sentinel.flags.split(",") : []; + if (flags.indexOf("disconnected") === -1 && sentinel.ip && sentinel.port) { + const endpoint = this.sentinelNatResolve(addressResponseToAddress(sentinel)); + if (this.sentinelIterator.add(endpoint)) { + debug("adding sentinel %s:%s", endpoint.host, endpoint.port); + } + } + }); + debug("Updated internal sentinels: %s", this.sentinelIterator); + } + async resolveMaster(client) { + const result = await client.sentinel("get-master-addr-by-name", this.options.name); + await this.updateSentinels(client); + return this.sentinelNatResolve(Array.isArray(result) ? { host: result[0], port: Number(result[1]) } : null); + } + async resolveSlave(client) { + const result = await client.sentinel("slaves", this.options.name); + if (!Array.isArray(result)) { + return null; + } + const availableSlaves = result.map(utils_1.packObject).filter((slave) => slave.flags && !slave.flags.match(/(disconnected|s_down|o_down)/)); + return this.sentinelNatResolve(selectPreferredSentinel(availableSlaves, this.options.preferredSlaves)); + } + sentinelNatResolve(item) { + if (!item || !this.options.natMap) + return item; + const key = `${item.host}:${item.port}`; + let result = item; + if (typeof this.options.natMap === "function") { + result = this.options.natMap(key) || item; + } else if (typeof this.options.natMap === "object") { + result = this.options.natMap[key] || item; + } + return result; + } + connectToSentinel(endpoint, options) { + const redis = new Redis_1.default({ + port: endpoint.port || 26379, + host: endpoint.host, + username: this.options.sentinelUsername || null, + password: this.options.sentinelPassword || null, + family: endpoint.family || // @ts-expect-error + ("path" in this.options && this.options.path ? void 0 : ( + // @ts-expect-error + this.options.family + )), + tls: this.options.sentinelTLS, + retryStrategy: null, + enableReadyCheck: false, + connectTimeout: this.options.connectTimeout, + commandTimeout: this.options.sentinelCommandTimeout, + ...options + }); + return redis; + } + async resolve(endpoint) { + const client = this.connectToSentinel(endpoint); + client.on("error", noop); + try { + if (this.options.role === "slave") { + return await this.resolveSlave(client); + } else { + return await this.resolveMaster(client); + } + } finally { + client.disconnect(); + } + } + async initFailoverDetector() { + var _a; + if (!this.options.failoverDetector) { + return; + } + this.sentinelIterator.reset(true); + const sentinels = []; + while (sentinels.length < this.options.sentinelMaxConnections) { + const { done, value } = this.sentinelIterator.next(); + if (done) { + break; + } + const client = this.connectToSentinel(value, { + lazyConnect: true, + retryStrategy: this.options.sentinelReconnectStrategy + }); + client.on("reconnecting", () => { + var _a2; + (_a2 = this.emitter) === null || _a2 === void 0 ? void 0 : _a2.emit("sentinelReconnecting"); + }); + sentinels.push({ address: value, client }); + } + this.sentinelIterator.reset(false); + if (this.failoverDetector) { + this.failoverDetector.cleanup(); + } + this.failoverDetector = new FailoverDetector_1.FailoverDetector(this, sentinels); + await this.failoverDetector.subscribe(); + (_a = this.emitter) === null || _a === void 0 ? void 0 : _a.emit("failoverSubscribed"); + } + }; + exports2.default = SentinelConnector; + function selectPreferredSentinel(availableSlaves, preferredSlaves) { + if (availableSlaves.length === 0) { + return null; + } + let selectedSlave; + if (typeof preferredSlaves === "function") { + selectedSlave = preferredSlaves(availableSlaves); + } else if (preferredSlaves !== null && typeof preferredSlaves === "object") { + const preferredSlavesArray = Array.isArray(preferredSlaves) ? preferredSlaves : [preferredSlaves]; + preferredSlavesArray.sort((a, b) => { + if (!a.prio) { + a.prio = 1; + } + if (!b.prio) { + b.prio = 1; + } + if (a.prio < b.prio) { + return -1; + } + if (a.prio > b.prio) { + return 1; + } + return 0; + }); + for (let p = 0; p < preferredSlavesArray.length; p++) { + for (let a = 0; a < availableSlaves.length; a++) { + const slave = availableSlaves[a]; + if (slave.ip === preferredSlavesArray[p].ip) { + if (slave.port === preferredSlavesArray[p].port) { + selectedSlave = slave; + break; + } + } + } + if (selectedSlave) { + break; + } + } + } + if (!selectedSlave) { + selectedSlave = (0, utils_1.sample)(availableSlaves); + } + return addressResponseToAddress(selectedSlave); + } + function addressResponseToAddress(input) { + return { host: input.ip, port: Number(input.port) }; + } + function noop() { + } + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/connectors/index.js +var require_connectors = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/connectors/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SentinelConnector = exports2.StandaloneConnector = void 0; + var StandaloneConnector_1 = require_StandaloneConnector(); + exports2.StandaloneConnector = StandaloneConnector_1.default; + var SentinelConnector_1 = require_SentinelConnector(); + exports2.SentinelConnector = SentinelConnector_1.default; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/errors/MaxRetriesPerRequestError.js +var require_MaxRetriesPerRequestError = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/errors/MaxRetriesPerRequestError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var redis_errors_1 = require_redis_errors(); + var MaxRetriesPerRequestError = class extends redis_errors_1.AbortError { + constructor(maxRetriesPerRequest) { + const message = `Reached the max retries per request limit (which is ${maxRetriesPerRequest}). Refer to "maxRetriesPerRequest" option for details.`; + super(message); + Error.captureStackTrace(this, this.constructor); + } + get name() { + return this.constructor.name; + } + }; + exports2.default = MaxRetriesPerRequestError; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/errors/index.js +var require_errors4 = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/errors/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MaxRetriesPerRequestError = void 0; + var MaxRetriesPerRequestError_1 = require_MaxRetriesPerRequestError(); + exports2.MaxRetriesPerRequestError = MaxRetriesPerRequestError_1.default; + } +}); + +// ../../node_modules/.pnpm/redis-parser@3.0.0/node_modules/redis-parser/lib/parser.js +var require_parser = __commonJS({ + "../../node_modules/.pnpm/redis-parser@3.0.0/node_modules/redis-parser/lib/parser.js"(exports2, module2) { + "use strict"; + var Buffer2 = require("buffer").Buffer; + var StringDecoder = require("string_decoder").StringDecoder; + var decoder = new StringDecoder(); + var errors = require_redis_errors(); + var ReplyError = errors.ReplyError; + var ParserError = errors.ParserError; + var bufferPool = Buffer2.allocUnsafe(32 * 1024); + var bufferOffset = 0; + var interval = null; + var counter = 0; + var notDecreased = 0; + function parseSimpleNumbers(parser) { + const length = parser.buffer.length - 1; + var offset = parser.offset; + var number = 0; + var sign = 1; + if (parser.buffer[offset] === 45) { + sign = -1; + offset++; + } + while (offset < length) { + const c1 = parser.buffer[offset++]; + if (c1 === 13) { + parser.offset = offset + 1; + return sign * number; + } + number = number * 10 + (c1 - 48); + } + } + function parseStringNumbers(parser) { + const length = parser.buffer.length - 1; + var offset = parser.offset; + var number = 0; + var res = ""; + if (parser.buffer[offset] === 45) { + res += "-"; + offset++; + } + while (offset < length) { + var c1 = parser.buffer[offset++]; + if (c1 === 13) { + parser.offset = offset + 1; + if (number !== 0) { + res += number; + } + return res; + } else if (number > 429496728) { + res += number * 10 + (c1 - 48); + number = 0; + } else if (c1 === 48 && number === 0) { + res += 0; + } else { + number = number * 10 + (c1 - 48); + } + } + } + function parseSimpleString(parser) { + const start = parser.offset; + const buffer = parser.buffer; + const length = buffer.length - 1; + var offset = start; + while (offset < length) { + if (buffer[offset++] === 13) { + parser.offset = offset + 1; + if (parser.optionReturnBuffers === true) { + return parser.buffer.slice(start, offset - 1); + } + return parser.buffer.toString("utf8", start, offset - 1); + } + } + } + function parseLength(parser) { + const length = parser.buffer.length - 1; + var offset = parser.offset; + var number = 0; + while (offset < length) { + const c1 = parser.buffer[offset++]; + if (c1 === 13) { + parser.offset = offset + 1; + return number; + } + number = number * 10 + (c1 - 48); + } + } + function parseInteger(parser) { + if (parser.optionStringNumbers === true) { + return parseStringNumbers(parser); + } + return parseSimpleNumbers(parser); + } + function parseBulkString(parser) { + const length = parseLength(parser); + if (length === void 0) { + return; + } + if (length < 0) { + return null; + } + const offset = parser.offset + length; + if (offset + 2 > parser.buffer.length) { + parser.bigStrSize = offset + 2; + parser.totalChunkSize = parser.buffer.length; + parser.bufferCache.push(parser.buffer); + return; + } + const start = parser.offset; + parser.offset = offset + 2; + if (parser.optionReturnBuffers === true) { + return parser.buffer.slice(start, offset); + } + return parser.buffer.toString("utf8", start, offset); + } + function parseError(parser) { + var string = parseSimpleString(parser); + if (string !== void 0) { + if (parser.optionReturnBuffers === true) { + string = string.toString(); + } + return new ReplyError(string); + } + } + function handleError(parser, type) { + const err = new ParserError( + "Protocol error, got " + JSON.stringify(String.fromCharCode(type)) + " as reply type byte", + JSON.stringify(parser.buffer), + parser.offset + ); + parser.buffer = null; + parser.returnFatalError(err); + } + function parseArray(parser) { + const length = parseLength(parser); + if (length === void 0) { + return; + } + if (length < 0) { + return null; + } + const responses = new Array(length); + return parseArrayElements(parser, responses, 0); + } + function pushArrayCache(parser, array, pos) { + parser.arrayCache.push(array); + parser.arrayPos.push(pos); + } + function parseArrayChunks(parser) { + const tmp = parser.arrayCache.pop(); + var pos = parser.arrayPos.pop(); + if (parser.arrayCache.length) { + const res = parseArrayChunks(parser); + if (res === void 0) { + pushArrayCache(parser, tmp, pos); + return; + } + tmp[pos++] = res; + } + return parseArrayElements(parser, tmp, pos); + } + function parseArrayElements(parser, responses, i) { + const bufferLength = parser.buffer.length; + while (i < responses.length) { + const offset = parser.offset; + if (parser.offset >= bufferLength) { + pushArrayCache(parser, responses, i); + return; + } + const response = parseType(parser, parser.buffer[parser.offset++]); + if (response === void 0) { + if (!(parser.arrayCache.length || parser.bufferCache.length)) { + parser.offset = offset; + } + pushArrayCache(parser, responses, i); + return; + } + responses[i] = response; + i++; + } + return responses; + } + function parseType(parser, type) { + switch (type) { + case 36: + return parseBulkString(parser); + case 43: + return parseSimpleString(parser); + case 42: + return parseArray(parser); + case 58: + return parseInteger(parser); + case 45: + return parseError(parser); + default: + return handleError(parser, type); + } + } + function decreaseBufferPool() { + if (bufferPool.length > 50 * 1024) { + if (counter === 1 || notDecreased > counter * 2) { + const minSliceLen = Math.floor(bufferPool.length / 10); + const sliceLength = minSliceLen < bufferOffset ? bufferOffset : minSliceLen; + bufferOffset = 0; + bufferPool = bufferPool.slice(sliceLength, bufferPool.length); + } else { + notDecreased++; + counter--; + } + } else { + clearInterval(interval); + counter = 0; + notDecreased = 0; + interval = null; + } + } + function resizeBuffer(length) { + if (bufferPool.length < length + bufferOffset) { + const multiplier = length > 1024 * 1024 * 75 ? 2 : 3; + if (bufferOffset > 1024 * 1024 * 111) { + bufferOffset = 1024 * 1024 * 50; + } + bufferPool = Buffer2.allocUnsafe(length * multiplier + bufferOffset); + bufferOffset = 0; + counter++; + if (interval === null) { + interval = setInterval(decreaseBufferPool, 50); + } + } + } + function concatBulkString(parser) { + const list = parser.bufferCache; + const oldOffset = parser.offset; + var chunks = list.length; + var offset = parser.bigStrSize - parser.totalChunkSize; + parser.offset = offset; + if (offset <= 2) { + if (chunks === 2) { + return list[0].toString("utf8", oldOffset, list[0].length + offset - 2); + } + chunks--; + offset = list[list.length - 2].length + offset; + } + var res = decoder.write(list[0].slice(oldOffset)); + for (var i = 1; i < chunks - 1; i++) { + res += decoder.write(list[i]); + } + res += decoder.end(list[i].slice(0, offset - 2)); + return res; + } + function concatBulkBuffer(parser) { + const list = parser.bufferCache; + const oldOffset = parser.offset; + const length = parser.bigStrSize - oldOffset - 2; + var chunks = list.length; + var offset = parser.bigStrSize - parser.totalChunkSize; + parser.offset = offset; + if (offset <= 2) { + if (chunks === 2) { + return list[0].slice(oldOffset, list[0].length + offset - 2); + } + chunks--; + offset = list[list.length - 2].length + offset; + } + resizeBuffer(length); + const start = bufferOffset; + list[0].copy(bufferPool, start, oldOffset, list[0].length); + bufferOffset += list[0].length - oldOffset; + for (var i = 1; i < chunks - 1; i++) { + list[i].copy(bufferPool, bufferOffset); + bufferOffset += list[i].length; + } + list[i].copy(bufferPool, bufferOffset, 0, offset - 2); + bufferOffset += offset - 2; + return bufferPool.slice(start, bufferOffset); + } + var JavascriptRedisParser = class { + /** + * Javascript Redis Parser constructor + * @param {{returnError: Function, returnReply: Function, returnFatalError?: Function, returnBuffers: boolean, stringNumbers: boolean }} options + * @constructor + */ + constructor(options) { + if (!options) { + throw new TypeError("Options are mandatory."); + } + if (typeof options.returnError !== "function" || typeof options.returnReply !== "function") { + throw new TypeError("The returnReply and returnError options have to be functions."); + } + this.setReturnBuffers(!!options.returnBuffers); + this.setStringNumbers(!!options.stringNumbers); + this.returnError = options.returnError; + this.returnFatalError = options.returnFatalError || options.returnError; + this.returnReply = options.returnReply; + this.reset(); + } + /** + * Reset the parser values to the initial state + * + * @returns {undefined} + */ + reset() { + this.offset = 0; + this.buffer = null; + this.bigStrSize = 0; + this.totalChunkSize = 0; + this.bufferCache = []; + this.arrayCache = []; + this.arrayPos = []; + } + /** + * Set the returnBuffers option + * + * @param {boolean} returnBuffers + * @returns {undefined} + */ + setReturnBuffers(returnBuffers) { + if (typeof returnBuffers !== "boolean") { + throw new TypeError("The returnBuffers argument has to be a boolean"); + } + this.optionReturnBuffers = returnBuffers; + } + /** + * Set the stringNumbers option + * + * @param {boolean} stringNumbers + * @returns {undefined} + */ + setStringNumbers(stringNumbers) { + if (typeof stringNumbers !== "boolean") { + throw new TypeError("The stringNumbers argument has to be a boolean"); + } + this.optionStringNumbers = stringNumbers; + } + /** + * Parse the redis buffer + * @param {Buffer} buffer + * @returns {undefined} + */ + execute(buffer) { + if (this.buffer === null) { + this.buffer = buffer; + this.offset = 0; + } else if (this.bigStrSize === 0) { + const oldLength = this.buffer.length; + const remainingLength = oldLength - this.offset; + const newBuffer = Buffer2.allocUnsafe(remainingLength + buffer.length); + this.buffer.copy(newBuffer, 0, this.offset, oldLength); + buffer.copy(newBuffer, remainingLength, 0, buffer.length); + this.buffer = newBuffer; + this.offset = 0; + if (this.arrayCache.length) { + const arr = parseArrayChunks(this); + if (arr === void 0) { + return; + } + this.returnReply(arr); + } + } else if (this.totalChunkSize + buffer.length >= this.bigStrSize) { + this.bufferCache.push(buffer); + var tmp = this.optionReturnBuffers ? concatBulkBuffer(this) : concatBulkString(this); + this.bigStrSize = 0; + this.bufferCache = []; + this.buffer = buffer; + if (this.arrayCache.length) { + this.arrayCache[0][this.arrayPos[0]++] = tmp; + tmp = parseArrayChunks(this); + if (tmp === void 0) { + return; + } + } + this.returnReply(tmp); + } else { + this.bufferCache.push(buffer); + this.totalChunkSize += buffer.length; + return; + } + while (this.offset < this.buffer.length) { + const offset = this.offset; + const type = this.buffer[this.offset++]; + const response = parseType(this, type); + if (response === void 0) { + if (!(this.arrayCache.length || this.bufferCache.length)) { + this.offset = offset; + } + return; + } + if (type === 45) { + this.returnError(response); + } else { + this.returnReply(response); + } + } + this.buffer = null; + } + }; + module2.exports = JavascriptRedisParser; + } +}); + +// ../../node_modules/.pnpm/redis-parser@3.0.0/node_modules/redis-parser/index.js +var require_redis_parser = __commonJS({ + "../../node_modules/.pnpm/redis-parser@3.0.0/node_modules/redis-parser/index.js"(exports2, module2) { + "use strict"; + module2.exports = require_parser(); + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/SubscriptionSet.js +var require_SubscriptionSet = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/SubscriptionSet.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var SubscriptionSet = class { + constructor() { + this.set = { + subscribe: {}, + psubscribe: {}, + ssubscribe: {} + }; + } + add(set, channel) { + this.set[mapSet(set)][channel] = true; + } + del(set, channel) { + delete this.set[mapSet(set)][channel]; + } + channels(set) { + return Object.keys(this.set[mapSet(set)]); + } + isEmpty() { + return this.channels("subscribe").length === 0 && this.channels("psubscribe").length === 0 && this.channels("ssubscribe").length === 0; + } + }; + exports2.default = SubscriptionSet; + function mapSet(set) { + if (set === "unsubscribe") { + return "subscribe"; + } + if (set === "punsubscribe") { + return "psubscribe"; + } + if (set === "sunsubscribe") { + return "ssubscribe"; + } + return set; + } + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/DataHandler.js +var require_DataHandler = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/DataHandler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Command_1 = require_Command(); + var utils_1 = require_utils15(); + var RedisParser = require_redis_parser(); + var SubscriptionSet_1 = require_SubscriptionSet(); + var debug = (0, utils_1.Debug)("dataHandler"); + var DataHandler = class { + constructor(redis, parserOptions) { + this.redis = redis; + const parser = new RedisParser({ + stringNumbers: parserOptions.stringNumbers, + returnBuffers: true, + returnError: (err) => { + this.returnError(err); + }, + returnFatalError: (err) => { + this.returnFatalError(err); + }, + returnReply: (reply) => { + this.returnReply(reply); + } + }); + redis.stream.prependListener("data", (data) => { + parser.execute(data); + }); + redis.stream.resume(); + } + returnFatalError(err) { + err.message += ". Please report this."; + this.redis.recoverFromFatalError(err, err, { offlineQueue: false }); + } + returnError(err) { + const item = this.shiftCommand(err); + if (!item) { + return; + } + err.command = { + name: item.command.name, + args: item.command.args + }; + if (item.command.name == "ssubscribe" && err.message.includes("MOVED")) { + this.redis.emit("moved"); + return; + } + this.redis.handleReconnection(err, item); + } + returnReply(reply) { + if (this.handleMonitorReply(reply)) { + return; + } + if (this.handleSubscriberReply(reply)) { + return; + } + const item = this.shiftCommand(reply); + if (!item) { + return; + } + if (Command_1.default.checkFlag("ENTER_SUBSCRIBER_MODE", item.command.name)) { + this.redis.condition.subscriber = new SubscriptionSet_1.default(); + this.redis.condition.subscriber.add(item.command.name, reply[1].toString()); + if (!fillSubCommand(item.command, reply[2])) { + this.redis.commandQueue.unshift(item); + } + } else if (Command_1.default.checkFlag("EXIT_SUBSCRIBER_MODE", item.command.name)) { + if (!fillUnsubCommand(item.command, reply[2])) { + this.redis.commandQueue.unshift(item); + } + } else { + item.command.resolve(reply); + } + } + handleSubscriberReply(reply) { + if (!this.redis.condition.subscriber) { + return false; + } + const replyType = Array.isArray(reply) ? reply[0].toString() : null; + debug('receive reply "%s" in subscriber mode', replyType); + switch (replyType) { + case "message": + if (this.redis.listeners("message").length > 0) { + this.redis.emit("message", reply[1].toString(), reply[2] ? reply[2].toString() : ""); + } + this.redis.emit("messageBuffer", reply[1], reply[2]); + break; + case "pmessage": { + const pattern = reply[1].toString(); + if (this.redis.listeners("pmessage").length > 0) { + this.redis.emit("pmessage", pattern, reply[2].toString(), reply[3].toString()); + } + this.redis.emit("pmessageBuffer", pattern, reply[2], reply[3]); + break; + } + case "smessage": { + if (this.redis.listeners("smessage").length > 0) { + this.redis.emit("smessage", reply[1].toString(), reply[2] ? reply[2].toString() : ""); + } + this.redis.emit("smessageBuffer", reply[1], reply[2]); + break; + } + case "ssubscribe": + case "subscribe": + case "psubscribe": { + const channel = reply[1].toString(); + this.redis.condition.subscriber.add(replyType, channel); + const item = this.shiftCommand(reply); + if (!item) { + return; + } + if (!fillSubCommand(item.command, reply[2])) { + this.redis.commandQueue.unshift(item); + } + break; + } + case "sunsubscribe": + case "unsubscribe": + case "punsubscribe": { + const channel = reply[1] ? reply[1].toString() : null; + if (channel) { + this.redis.condition.subscriber.del(replyType, channel); + } + const count = reply[2]; + if (Number(count) === 0) { + this.redis.condition.subscriber = false; + } + const item = this.shiftCommand(reply); + if (!item) { + return; + } + if (!fillUnsubCommand(item.command, count)) { + this.redis.commandQueue.unshift(item); + } + break; + } + default: { + const item = this.shiftCommand(reply); + if (!item) { + return; + } + item.command.resolve(reply); + } + } + return true; + } + handleMonitorReply(reply) { + if (this.redis.status !== "monitoring") { + return false; + } + const replyStr = reply.toString(); + if (replyStr === "OK") { + return false; + } + const len = replyStr.indexOf(" "); + const timestamp = replyStr.slice(0, len); + const argIndex = replyStr.indexOf('"'); + const args = replyStr.slice(argIndex + 1, -1).split('" "').map((elem) => elem.replace(/\\"/g, '"')); + const dbAndSource = replyStr.slice(len + 2, argIndex - 2).split(" "); + this.redis.emit("monitor", timestamp, args, dbAndSource[1], dbAndSource[0]); + return true; + } + shiftCommand(reply) { + const item = this.redis.commandQueue.shift(); + if (!item) { + const message = "Command queue state error. If you can reproduce this, please report it."; + const error = new Error(message + (reply instanceof Error ? ` Last error: ${reply.message}` : ` Last reply: ${reply.toString()}`)); + this.redis.emit("error", error); + return null; + } + return item; + } + }; + exports2.default = DataHandler; + var remainingRepliesMap = /* @__PURE__ */ new WeakMap(); + function fillSubCommand(command, count) { + let remainingReplies = remainingRepliesMap.has(command) ? remainingRepliesMap.get(command) : command.args.length; + remainingReplies -= 1; + if (remainingReplies <= 0) { + command.resolve(count); + remainingRepliesMap.delete(command); + return true; + } + remainingRepliesMap.set(command, remainingReplies); + return false; + } + function fillUnsubCommand(command, count) { + let remainingReplies = remainingRepliesMap.has(command) ? remainingRepliesMap.get(command) : command.args.length; + if (remainingReplies === 0) { + if (Number(count) === 0) { + remainingRepliesMap.delete(command); + command.resolve(count); + return true; + } + return false; + } + remainingReplies -= 1; + if (remainingReplies <= 0) { + command.resolve(count); + return true; + } + remainingRepliesMap.set(command, remainingReplies); + return false; + } + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/redis/event_handler.js +var require_event_handler = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/redis/event_handler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readyHandler = exports2.errorHandler = exports2.closeHandler = exports2.connectHandler = void 0; + var redis_errors_1 = require_redis_errors(); + var Command_1 = require_Command(); + var errors_1 = require_errors4(); + var utils_1 = require_utils15(); + var DataHandler_1 = require_DataHandler(); + var debug = (0, utils_1.Debug)("connection"); + function connectHandler(self2) { + return function() { + var _a; + self2.setStatus("connect"); + self2.resetCommandQueue(); + let flushed = false; + const { connectionEpoch } = self2; + if (self2.condition.auth) { + self2.auth(self2.condition.auth, function(err) { + if (connectionEpoch !== self2.connectionEpoch) { + return; + } + if (err) { + if (err.message.indexOf("no password is set") !== -1) { + console.warn("[WARN] Redis server does not require a password, but a password was supplied."); + } else if (err.message.indexOf("without any password configured for the default user") !== -1) { + console.warn("[WARN] This Redis server's `default` user does not require a password, but a password was supplied"); + } else if (err.message.indexOf("wrong number of arguments for 'auth' command") !== -1) { + console.warn(`[ERROR] The server returned "wrong number of arguments for 'auth' command". You are probably passing both username and password to Redis version 5 or below. You should only pass the 'password' option for Redis version 5 and under.`); + } else { + flushed = true; + self2.recoverFromFatalError(err, err); + } + } + }); + } + if (self2.condition.select) { + self2.select(self2.condition.select).catch((err) => { + self2.silentEmit("error", err); + }); + } + new DataHandler_1.default(self2, { + stringNumbers: self2.options.stringNumbers + }); + const clientCommandPromises = []; + if (self2.options.connectionName) { + debug("set the connection name [%s]", self2.options.connectionName); + clientCommandPromises.push(self2.client("setname", self2.options.connectionName).catch(utils_1.noop)); + } + if (!self2.options.disableClientInfo) { + debug("set the client info"); + clientCommandPromises.push((0, utils_1.getPackageMeta)().then((packageMeta) => { + return self2.client("SETINFO", "LIB-VER", packageMeta.version).catch(utils_1.noop); + }).catch(utils_1.noop)); + clientCommandPromises.push(self2.client("SETINFO", "LIB-NAME", ((_a = self2.options) === null || _a === void 0 ? void 0 : _a.clientInfoTag) ? `ioredis(${self2.options.clientInfoTag})` : "ioredis").catch(utils_1.noop)); + } + Promise.all(clientCommandPromises).catch(utils_1.noop).finally(() => { + if (!self2.options.enableReadyCheck) { + exports2.readyHandler(self2)(); + } + if (self2.options.enableReadyCheck) { + self2._readyCheck(function(err, info) { + if (connectionEpoch !== self2.connectionEpoch) { + return; + } + if (err) { + if (!flushed) { + self2.recoverFromFatalError(new Error("Ready check failed: " + err.message), err); + } + } else { + if (self2.connector.check(info)) { + exports2.readyHandler(self2)(); + } else { + self2.disconnect(true); + } + } + }); + } + }); + }; + } + exports2.connectHandler = connectHandler; + function abortError(command) { + const err = new redis_errors_1.AbortError("Command aborted due to connection close"); + err.command = { + name: command.name, + args: command.args + }; + return err; + } + function abortIncompletePipelines(commandQueue) { + var _a; + let expectedIndex = 0; + for (let i = 0; i < commandQueue.length; ) { + const command = (_a = commandQueue.peekAt(i)) === null || _a === void 0 ? void 0 : _a.command; + const pipelineIndex = command.pipelineIndex; + if (pipelineIndex === void 0 || pipelineIndex === 0) { + expectedIndex = 0; + } + if (pipelineIndex !== void 0 && pipelineIndex !== expectedIndex++) { + commandQueue.remove(i, 1); + command.reject(abortError(command)); + continue; + } + i++; + } + } + function abortTransactionFragments(commandQueue) { + var _a; + for (let i = 0; i < commandQueue.length; ) { + const command = (_a = commandQueue.peekAt(i)) === null || _a === void 0 ? void 0 : _a.command; + if (command.name === "multi") { + break; + } + if (command.name === "exec") { + commandQueue.remove(i, 1); + command.reject(abortError(command)); + break; + } + if (command.inTransaction) { + commandQueue.remove(i, 1); + command.reject(abortError(command)); + } else { + i++; + } + } + } + function closeHandler(self2) { + return function() { + const prevStatus = self2.status; + self2.setStatus("close"); + if (self2.commandQueue.length) { + abortIncompletePipelines(self2.commandQueue); + } + if (self2.offlineQueue.length) { + abortTransactionFragments(self2.offlineQueue); + } + if (prevStatus === "ready") { + if (!self2.prevCondition) { + self2.prevCondition = self2.condition; + } + if (self2.commandQueue.length) { + self2.prevCommandQueue = self2.commandQueue; + } + } + if (self2.manuallyClosing) { + self2.manuallyClosing = false; + debug("skip reconnecting since the connection is manually closed."); + return close(); + } + if (typeof self2.options.retryStrategy !== "function") { + debug("skip reconnecting because `retryStrategy` is not a function"); + return close(); + } + const retryDelay = self2.options.retryStrategy(++self2.retryAttempts); + if (typeof retryDelay !== "number") { + debug("skip reconnecting because `retryStrategy` doesn't return a number"); + return close(); + } + debug("reconnect in %sms", retryDelay); + self2.setStatus("reconnecting", retryDelay); + self2.reconnectTimeout = setTimeout(function() { + self2.reconnectTimeout = null; + self2.connect().catch(utils_1.noop); + }, retryDelay); + const { maxRetriesPerRequest } = self2.options; + if (typeof maxRetriesPerRequest === "number") { + if (maxRetriesPerRequest < 0) { + debug("maxRetriesPerRequest is negative, ignoring..."); + } else { + const remainder = self2.retryAttempts % (maxRetriesPerRequest + 1); + if (remainder === 0) { + debug("reach maxRetriesPerRequest limitation, flushing command queue..."); + self2.flushQueue(new errors_1.MaxRetriesPerRequestError(maxRetriesPerRequest)); + } + } + } + }; + function close() { + self2.setStatus("end"); + self2.flushQueue(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG)); + } + } + exports2.closeHandler = closeHandler; + function errorHandler(self2) { + return function(error) { + debug("error: %s", error); + self2.silentEmit("error", error); + }; + } + exports2.errorHandler = errorHandler; + function readyHandler(self2) { + return function() { + self2.setStatus("ready"); + self2.retryAttempts = 0; + if (self2.options.monitor) { + self2.call("monitor").then(() => self2.setStatus("monitoring"), (error) => self2.emit("error", error)); + const { sendCommand } = self2; + self2.sendCommand = function(command) { + if (Command_1.default.checkFlag("VALID_IN_MONITOR_MODE", command.name)) { + return sendCommand.call(self2, command); + } + command.reject(new Error("Connection is in monitoring mode, can't process commands.")); + return command.promise; + }; + self2.once("close", function() { + delete self2.sendCommand; + }); + return; + } + const finalSelect = self2.prevCondition ? self2.prevCondition.select : self2.condition.select; + if (self2.options.readOnly) { + debug("set the connection to readonly mode"); + self2.readonly().catch(utils_1.noop); + } + if (self2.prevCondition) { + const condition = self2.prevCondition; + self2.prevCondition = null; + if (condition.subscriber && self2.options.autoResubscribe) { + if (self2.condition.select !== finalSelect) { + debug("connect to db [%d]", finalSelect); + self2.select(finalSelect); + } + const subscribeChannels = condition.subscriber.channels("subscribe"); + if (subscribeChannels.length) { + debug("subscribe %d channels", subscribeChannels.length); + self2.subscribe(subscribeChannels); + } + const psubscribeChannels = condition.subscriber.channels("psubscribe"); + if (psubscribeChannels.length) { + debug("psubscribe %d channels", psubscribeChannels.length); + self2.psubscribe(psubscribeChannels); + } + const ssubscribeChannels = condition.subscriber.channels("ssubscribe"); + if (ssubscribeChannels.length) { + debug("ssubscribe %s", ssubscribeChannels.length); + for (const channel of ssubscribeChannels) { + self2.ssubscribe(channel); + } + } + } + } + if (self2.prevCommandQueue) { + if (self2.options.autoResendUnfulfilledCommands) { + debug("resend %d unfulfilled commands", self2.prevCommandQueue.length); + while (self2.prevCommandQueue.length > 0) { + const item = self2.prevCommandQueue.shift(); + if (item.select !== self2.condition.select && item.command.name !== "select") { + self2.select(item.select); + } + self2.sendCommand(item.command, item.stream); + } + } else { + self2.prevCommandQueue = null; + } + } + if (self2.offlineQueue.length) { + debug("send %d commands in offline queue", self2.offlineQueue.length); + const offlineQueue = self2.offlineQueue; + self2.resetOfflineQueue(); + while (offlineQueue.length > 0) { + const item = offlineQueue.shift(); + if (item.select !== self2.condition.select && item.command.name !== "select") { + self2.select(item.select); + } + self2.sendCommand(item.command, item.stream); + } + } + if (self2.condition.select !== finalSelect) { + debug("connect to db [%d]", finalSelect); + self2.select(finalSelect); + } + }; + } + exports2.readyHandler = readyHandler; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/redis/RedisOptions.js +var require_RedisOptions = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/redis/RedisOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_REDIS_OPTIONS = void 0; + exports2.DEFAULT_REDIS_OPTIONS = { + // Connection + port: 6379, + host: "localhost", + family: 0, + connectTimeout: 1e4, + disconnectTimeout: 2e3, + retryStrategy: function(times) { + return Math.min(times * 50, 2e3); + }, + keepAlive: 0, + noDelay: true, + connectionName: null, + disableClientInfo: false, + clientInfoTag: void 0, + // Sentinel + sentinels: null, + name: null, + role: "master", + sentinelRetryStrategy: function(times) { + return Math.min(times * 10, 1e3); + }, + sentinelReconnectStrategy: function() { + return 6e4; + }, + natMap: null, + enableTLSForSentinelMode: false, + updateSentinels: true, + failoverDetector: false, + // Status + username: null, + password: null, + db: 0, + // Others + enableOfflineQueue: true, + enableReadyCheck: true, + autoResubscribe: true, + autoResendUnfulfilledCommands: true, + lazyConnect: false, + keyPrefix: "", + reconnectOnError: null, + readOnly: false, + stringNumbers: false, + maxRetriesPerRequest: 20, + maxLoadingRetryTime: 1e4, + enableAutoPipelining: false, + autoPipeliningIgnoredCommands: [], + sentinelMaxConnections: 10, + blockingTimeoutGrace: 100 + }; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/Redis.js +var require_Redis = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/Redis.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var commands_1 = require_built(); + var events_1 = require("events"); + var standard_as_callback_1 = require_built2(); + var cluster_1 = require_cluster(); + var Command_1 = require_Command(); + var connectors_1 = require_connectors(); + var SentinelConnector_1 = require_SentinelConnector(); + var eventHandler = require_event_handler(); + var RedisOptions_1 = require_RedisOptions(); + var ScanStream_1 = require_ScanStream(); + var transaction_1 = require_transaction(); + var utils_1 = require_utils15(); + var tracing_1 = require_tracing(); + var applyMixin_1 = require_applyMixin(); + var Commander_1 = require_Commander(); + var lodash_1 = require_lodash2(); + var Deque = require_denque(); + var debug = (0, utils_1.Debug)("redis"); + var Redis = class _Redis extends Commander_1.default { + constructor(arg1, arg2, arg3) { + super(); + this.status = "wait"; + this.isCluster = false; + this.reconnectTimeout = null; + this.connectionEpoch = 0; + this.retryAttempts = 0; + this.manuallyClosing = false; + this._autoPipelines = /* @__PURE__ */ new Map(); + this._runningAutoPipelines = /* @__PURE__ */ new Set(); + this.parseOptions(arg1, arg2, arg3); + events_1.EventEmitter.call(this); + this.resetCommandQueue(); + this.resetOfflineQueue(); + if (this.options.Connector) { + this.connector = new this.options.Connector(this.options); + } else if (this.options.sentinels) { + const sentinelConnector = new SentinelConnector_1.default(this.options); + sentinelConnector.emitter = this; + this.connector = sentinelConnector; + } else { + this.connector = new connectors_1.StandaloneConnector(this.options); + } + if (this.options.scripts) { + Object.entries(this.options.scripts).forEach(([name, definition]) => { + this.defineCommand(name, definition); + }); + } + if (this.options.lazyConnect) { + this.setStatus("wait"); + } else { + this.connect().catch(lodash_1.noop); + } + } + /** + * Create a Redis instance. + * This is the same as `new Redis()` but is included for compatibility with node-redis. + */ + static createClient(...args) { + return new _Redis(...args); + } + get autoPipelineQueueSize() { + let queued = 0; + for (const pipeline of this._autoPipelines.values()) { + queued += pipeline.length; + } + return queued; + } + /** + * Create a connection to Redis. + * This method will be invoked automatically when creating a new Redis instance + * unless `lazyConnect: true` is passed. + * + * When calling this method manually, a Promise is returned, which will + * be resolved when the connection status is ready. The promise can reject + * if the connection fails, times out, or if Redis is already connecting/connected. + */ + connect(callback) { + const promise = (0, tracing_1.traceConnect)(() => this._connect(), () => { + const { address, port } = this._getServerAddress(); + return { + serverAddress: address, + serverPort: port, + connectionEpoch: this.connectionEpoch + }; + }); + return (0, standard_as_callback_1.default)(promise, callback); + } + _connect() { + return new Promise((resolve, reject) => { + if (this.status === "connecting" || this.status === "connect" || this.status === "ready") { + reject(new Error("Redis is already connecting/connected")); + return; + } + this.connectionEpoch += 1; + this.setStatus("connecting"); + const { options } = this; + this.condition = { + select: options.db, + auth: options.username ? [options.username, options.password] : options.password, + subscriber: false + }; + const _this = this; + (0, standard_as_callback_1.default)(this.connector.connect(function(type, err) { + _this.silentEmit(type, err); + }), function(err, stream) { + if (err) { + _this.flushQueue(err); + _this.silentEmit("error", err); + reject(err); + _this.setStatus("end"); + return; + } + let CONNECT_EVENT = options.tls ? "secureConnect" : "connect"; + if ("sentinels" in options && options.sentinels && !options.enableTLSForSentinelMode) { + CONNECT_EVENT = "connect"; + } + _this.stream = stream; + if (options.noDelay) { + stream.setNoDelay(true); + } + if (typeof options.keepAlive === "number") { + if (stream.connecting) { + stream.once(CONNECT_EVENT, () => { + stream.setKeepAlive(true, options.keepAlive); + }); + } else { + stream.setKeepAlive(true, options.keepAlive); + } + } + if (stream.connecting) { + stream.once(CONNECT_EVENT, eventHandler.connectHandler(_this)); + if (options.connectTimeout) { + let connectTimeoutCleared = false; + stream.setTimeout(options.connectTimeout, function() { + if (connectTimeoutCleared) { + return; + } + stream.setTimeout(0); + stream.destroy(); + const err2 = new Error("connect ETIMEDOUT"); + err2.errorno = "ETIMEDOUT"; + err2.code = "ETIMEDOUT"; + err2.syscall = "connect"; + eventHandler.errorHandler(_this)(err2); + }); + stream.once(CONNECT_EVENT, function() { + connectTimeoutCleared = true; + stream.setTimeout(0); + }); + } + } else if (stream.destroyed) { + const firstError = _this.connector.firstError; + if (firstError) { + process.nextTick(() => { + eventHandler.errorHandler(_this)(firstError); + }); + } + process.nextTick(eventHandler.closeHandler(_this)); + } else { + process.nextTick(eventHandler.connectHandler(_this)); + } + if (!stream.destroyed) { + stream.once("error", eventHandler.errorHandler(_this)); + stream.once("close", eventHandler.closeHandler(_this)); + } + const connectionReadyHandler = function() { + _this.removeListener("close", connectionCloseHandler); + resolve(); + }; + var connectionCloseHandler = function() { + _this.removeListener("ready", connectionReadyHandler); + reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG)); + }; + _this.once("ready", connectionReadyHandler); + _this.once("close", connectionCloseHandler); + }); + }); + } + /** + * Disconnect from Redis. + * + * This method closes the connection immediately, + * and may lose some pending replies that haven't written to client. + * If you want to wait for the pending replies, use Redis#quit instead. + */ + disconnect(reconnect = false) { + if (!reconnect) { + this.manuallyClosing = true; + } + if (this.reconnectTimeout && !reconnect) { + clearTimeout(this.reconnectTimeout); + this.reconnectTimeout = null; + } + if (this.status === "wait") { + eventHandler.closeHandler(this)(); + } else { + this.connector.disconnect(); + } + } + /** + * Disconnect from Redis. + * + * @deprecated + */ + end() { + this.disconnect(); + } + /** + * Create a new instance with the same options as the current one. + * + * @example + * ```js + * var redis = new Redis(6380); + * var anotherRedis = redis.duplicate(); + * ``` + */ + duplicate(override) { + return new _Redis({ ...this.options, ...override }); + } + /** + * Mode of the connection. + * + * One of `"normal"`, `"subscriber"`, or `"monitor"`. When the connection is + * not in `"normal"` mode, certain commands are not allowed. + */ + get mode() { + var _a; + return this.options.monitor ? "monitor" : ((_a = this.condition) === null || _a === void 0 ? void 0 : _a.subscriber) ? "subscriber" : "normal"; + } + /** + * Listen for all requests received by the server in real time. + * + * This command will create a new connection to Redis and send a + * MONITOR command via the new connection in order to avoid disturbing + * the current connection. + * + * @param callback The callback function. If omit, a promise will be returned. + * @example + * ```js + * var redis = new Redis(); + * redis.monitor(function (err, monitor) { + * // Entering monitoring mode. + * monitor.on('monitor', function (time, args, source, database) { + * console.log(time + ": " + util.inspect(args)); + * }); + * }); + * + * // supports promise as well as other commands + * redis.monitor().then(function (monitor) { + * monitor.on('monitor', function (time, args, source, database) { + * console.log(time + ": " + util.inspect(args)); + * }); + * }); + * ``` + */ + monitor(callback) { + const monitorInstance = this.duplicate({ + monitor: true, + lazyConnect: false + }); + return (0, standard_as_callback_1.default)(new Promise(function(resolve, reject) { + monitorInstance.once("error", reject); + monitorInstance.once("monitoring", function() { + resolve(monitorInstance); + }); + }), callback); + } + /** + * Send a command to Redis + * + * This method is used internally and in most cases you should not + * use it directly. If you need to send a command that is not supported + * by the library, you can use the `call` method: + * + * ```js + * const redis = new Redis(); + * + * redis.call('set', 'foo', 'bar'); + * // or + * redis.call(['set', 'foo', 'bar']); + * ``` + * + * @ignore + */ + sendCommand(command, stream) { + var _a, _b; + if (this.status === "wait") { + this.connect().catch(lodash_1.noop); + } + if (this.status === "end") { + command.reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG)); + return command.promise; + } + if (((_a = this.condition) === null || _a === void 0 ? void 0 : _a.subscriber) && !Command_1.default.checkFlag("VALID_IN_SUBSCRIBER_MODE", command.name)) { + command.reject(new Error("Connection in subscriber mode, only subscriber commands may be used")); + return command.promise; + } + if (typeof this.options.commandTimeout === "number") { + command.setTimeout(this.options.commandTimeout); + } + const blockingTimeout = this.getBlockingTimeoutInMs(command); + let writable = this.status === "ready" || !stream && this.status === "connect" && (0, commands_1.exists)(command.name, { caseInsensitive: true }) && ((0, commands_1.hasFlag)(command.name, "loading", { nameCaseInsensitive: true }) || Command_1.default.checkFlag("HANDSHAKE_COMMANDS", command.name)); + if (!this.stream) { + writable = false; + } else if (!this.stream.writable) { + writable = false; + } else if (this.stream._writableState && this.stream._writableState.ended) { + writable = false; + } + if (!writable) { + if (!this.options.enableOfflineQueue) { + command.reject(new Error("Stream isn't writeable and enableOfflineQueue options is false")); + return command.promise; + } + if (command.name === "quit" && this.offlineQueue.length === 0) { + this.disconnect(); + command.resolve(Buffer.from("OK")); + return command.promise; + } + if (debug.enabled) { + debug("queue command[%s]: %d -> %s(%o)", this._getDescription(), this.condition.select, command.name, command.args); + } + this.offlineQueue.push({ + command, + stream, + select: this.condition.select + }); + if (Command_1.default.checkFlag("BLOCKING_COMMANDS", command.name)) { + const offlineTimeout = this.getConfiguredBlockingTimeout(); + if (offlineTimeout !== void 0) { + command.setBlockingTimeout(offlineTimeout); + } + } + } else { + if (debug.enabled) { + debug("write command[%s]: %d -> %s(%o)", this._getDescription(), (_b = this.condition) === null || _b === void 0 ? void 0 : _b.select, command.name, command.args); + } + if (stream) { + if ("isPipeline" in stream && stream.isPipeline) { + stream.write(command.toWritable(stream.destination.redis.stream)); + } else { + stream.write(command.toWritable(stream)); + } + } else { + this.stream.write(command.toWritable(this.stream)); + } + this.commandQueue.push({ + command, + stream, + select: this.condition.select + }); + if (blockingTimeout !== void 0) { + command.setBlockingTimeout(blockingTimeout); + } + if (Command_1.default.checkFlag("WILL_DISCONNECT", command.name)) { + this.manuallyClosing = true; + } + if (this.options.socketTimeout !== void 0 && this.socketTimeoutTimer === void 0) { + this.setSocketTimeout(); + } + } + if (command.name === "select" && (0, utils_1.isInt)(command.args[0])) { + const db = parseInt(command.args[0], 10); + if (this.condition.select !== db) { + this.condition.select = db; + this.emit("select", db); + debug("switch to db [%d]", this.condition.select); + } + } + if (!writable || command.isTraced) { + return command.promise; + } + command.isTraced = true; + return (0, tracing_1.traceCommand)(() => command.promise, () => this._buildCommandContext(command)); + } + getBlockingTimeoutInMs(command) { + var _a; + if (!Command_1.default.checkFlag("BLOCKING_COMMANDS", command.name)) { + return void 0; + } + const configuredTimeout = this.getConfiguredBlockingTimeout(); + if (configuredTimeout === void 0) { + return void 0; + } + const timeout = command.extractBlockingTimeout(); + if (typeof timeout === "number") { + if (timeout > 0) { + return timeout + ((_a = this.options.blockingTimeoutGrace) !== null && _a !== void 0 ? _a : RedisOptions_1.DEFAULT_REDIS_OPTIONS.blockingTimeoutGrace); + } + return configuredTimeout; + } + if (timeout === null) { + return configuredTimeout; + } + return void 0; + } + getConfiguredBlockingTimeout() { + if (typeof this.options.blockingTimeout === "number" && this.options.blockingTimeout > 0) { + return this.options.blockingTimeout; + } + return void 0; + } + setSocketTimeout() { + this.socketTimeoutTimer = setTimeout(() => { + this.stream.destroy(new Error(`Socket timeout. Expecting data, but didn't receive any in ${this.options.socketTimeout}ms.`)); + this.socketTimeoutTimer = void 0; + }, this.options.socketTimeout); + this.stream.once("data", () => { + clearTimeout(this.socketTimeoutTimer); + this.socketTimeoutTimer = void 0; + if (this.commandQueue.length === 0) + return; + this.setSocketTimeout(); + }); + } + scanStream(options) { + return this.createScanStream("scan", { options }); + } + scanBufferStream(options) { + return this.createScanStream("scanBuffer", { options }); + } + sscanStream(key, options) { + return this.createScanStream("sscan", { key, options }); + } + sscanBufferStream(key, options) { + return this.createScanStream("sscanBuffer", { key, options }); + } + hscanStream(key, options) { + return this.createScanStream("hscan", { key, options }); + } + hscanBufferStream(key, options) { + return this.createScanStream("hscanBuffer", { key, options }); + } + zscanStream(key, options) { + return this.createScanStream("zscan", { key, options }); + } + zscanBufferStream(key, options) { + return this.createScanStream("zscanBuffer", { key, options }); + } + /** + * Emit only when there's at least one listener. + * + * @ignore + */ + silentEmit(eventName, arg) { + let error; + if (eventName === "error") { + error = arg; + if (this.status === "end") { + return; + } + if (this.manuallyClosing) { + if (error instanceof Error && (error.message === utils_1.CONNECTION_CLOSED_ERROR_MSG || // @ts-expect-error + error.syscall === "connect" || // @ts-expect-error + error.syscall === "read")) { + return; + } + } + } + if (this.listeners(eventName).length > 0) { + return this.emit.apply(this, arguments); + } + if (error && error instanceof Error) { + console.error("[ioredis] Unhandled error event:", error.stack); + } + return false; + } + /** + * @ignore + */ + recoverFromFatalError(_commandError, err, options) { + this.flushQueue(err, options); + this.silentEmit("error", err); + this.disconnect(true); + } + /** + * @ignore + */ + handleReconnection(err, item) { + var _a; + let needReconnect = false; + if (this.options.reconnectOnError && !Command_1.default.checkFlag("IGNORE_RECONNECT_ON_ERROR", item.command.name)) { + needReconnect = this.options.reconnectOnError(err); + } + switch (needReconnect) { + case 1: + case true: + if (this.status !== "reconnecting") { + this.disconnect(true); + } + item.command.reject(err); + break; + case 2: + if (this.status !== "reconnecting") { + this.disconnect(true); + } + if (((_a = this.condition) === null || _a === void 0 ? void 0 : _a.select) !== item.select && item.command.name !== "select") { + this.select(item.select); + } + this.sendCommand(item.command); + break; + default: + item.command.reject(err); + } + } + /** + * @ignore + */ + _getServerAddress() { + if ("path" in this.options && this.options.path) { + return { address: this.options.path, port: void 0 }; + } + return { + address: "host" in this.options && this.options.host || "localhost", + port: "port" in this.options && this.options.port || 6379 + }; + } + _buildCommandContext(command) { + var _a, _b, _c; + const { address, port } = this._getServerAddress(); + return { + command: command.name, + args: (0, tracing_1.sanitizeArgs)(command.name, command.args), + database: (_c = (_b = (_a = this.condition) === null || _a === void 0 ? void 0 : _a.select) !== null && _b !== void 0 ? _b : this.options.db) !== null && _c !== void 0 ? _c : 0, + serverAddress: address, + serverPort: port + }; + } + _buildBatchContext(batchSize) { + var _a, _b, _c; + const { address, port } = this._getServerAddress(); + return { + batchMode: "MULTI", + batchSize, + database: (_c = (_b = (_a = this.condition) === null || _a === void 0 ? void 0 : _a.select) !== null && _b !== void 0 ? _b : this.options.db) !== null && _c !== void 0 ? _c : 0, + serverAddress: address, + serverPort: port + }; + } + /** + * Get description of the connection. Used for debugging. + */ + _getDescription() { + let description; + if ("path" in this.options && this.options.path) { + description = this.options.path; + } else if (this.stream && this.stream.remoteAddress && this.stream.remotePort) { + description = this.stream.remoteAddress + ":" + this.stream.remotePort; + } else if ("host" in this.options && this.options.host) { + description = this.options.host + ":" + this.options.port; + } else { + description = ""; + } + if (this.options.connectionName) { + description += ` (${this.options.connectionName})`; + } + return description; + } + resetCommandQueue() { + this.commandQueue = new Deque(); + } + resetOfflineQueue() { + this.offlineQueue = new Deque(); + } + parseOptions(...args) { + const options = {}; + let isTls = false; + for (let i = 0; i < args.length; ++i) { + const arg = args[i]; + if (arg === null || typeof arg === "undefined") { + continue; + } + if (typeof arg === "object") { + (0, lodash_1.defaults)(options, arg); + } else if (typeof arg === "string") { + (0, lodash_1.defaults)(options, (0, utils_1.parseURL)(arg)); + if (arg.startsWith("rediss://")) { + isTls = true; + } + } else if (typeof arg === "number") { + options.port = arg; + } else { + throw new Error("Invalid argument " + arg); + } + } + if (isTls) { + (0, lodash_1.defaults)(options, { tls: true }); + } + (0, lodash_1.defaults)(options, _Redis.defaultOptions); + if (typeof options.port === "string") { + options.port = parseInt(options.port, 10); + } + if (typeof options.db === "string") { + options.db = parseInt(options.db, 10); + } + this.options = (0, utils_1.resolveTLSProfile)(options); + } + /** + * Change instance's status + */ + setStatus(status, arg) { + if (debug.enabled) { + debug("status[%s]: %s -> %s", this._getDescription(), this.status || "[empty]", status); + } + this.status = status; + process.nextTick(this.emit.bind(this, status, arg)); + } + createScanStream(command, { key, options = {} }) { + return new ScanStream_1.default({ + objectMode: true, + key, + redis: this, + command, + ...options + }); + } + /** + * Flush offline queue and command queue with error. + * + * @param error The error object to send to the commands + * @param options options + */ + flushQueue(error, options) { + options = (0, lodash_1.defaults)({}, options, { + offlineQueue: true, + commandQueue: true + }); + let item; + if (options.offlineQueue) { + while (item = this.offlineQueue.shift()) { + item.command.reject(error); + } + } + if (options.commandQueue) { + if (this.commandQueue.length > 0) { + if (this.stream) { + this.stream.removeAllListeners("data"); + } + while (item = this.commandQueue.shift()) { + item.command.reject(error); + } + } + } + } + /** + * Check whether Redis has finished loading the persistent data and is able to + * process commands. + */ + _readyCheck(callback) { + const _this = this; + this.info(function(err, res) { + if (err) { + if (err.message && err.message.includes("NOPERM")) { + console.warn(`Skipping the ready check because INFO command fails: "${err.message}". You can disable ready check with "enableReadyCheck". More: https://github.com/luin/ioredis/wiki/Disable-ready-check.`); + return callback(null, {}); + } + return callback(err); + } + if (typeof res !== "string") { + return callback(null, res); + } + const info = {}; + const lines = res.split("\r\n"); + for (let i = 0; i < lines.length; ++i) { + const [fieldName, ...fieldValueParts] = lines[i].split(":"); + const fieldValue = fieldValueParts.join(":"); + if (fieldValue) { + info[fieldName] = fieldValue; + } + } + if (!info.loading || info.loading === "0") { + callback(null, info); + } else { + const loadingEtaMs = (info.loading_eta_seconds || 1) * 1e3; + const retryTime = _this.options.maxLoadingRetryTime && _this.options.maxLoadingRetryTime < loadingEtaMs ? _this.options.maxLoadingRetryTime : loadingEtaMs; + debug("Redis server still loading, trying again in " + retryTime + "ms"); + setTimeout(function() { + _this._readyCheck(callback); + }, retryTime); + } + }).catch(lodash_1.noop); + } + }; + Redis.Cluster = cluster_1.default; + Redis.Command = Command_1.default; + Redis.defaultOptions = RedisOptions_1.DEFAULT_REDIS_OPTIONS; + (0, applyMixin_1.default)(Redis, events_1.EventEmitter); + (0, transaction_1.addTransactionSupport)(Redis.prototype); + exports2.default = Redis; + } +}); + +// ../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/index.js +var require_built3 = __commonJS({ + "../../node_modules/.pnpm/ioredis@5.11.1/node_modules/ioredis/built/index.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.print = exports2.ReplyError = exports2.SentinelIterator = exports2.SentinelConnector = exports2.AbstractConnector = exports2.Pipeline = exports2.ScanStream = exports2.Command = exports2.Cluster = exports2.Redis = exports2.default = void 0; + exports2 = module2.exports = require_Redis().default; + var Redis_1 = require_Redis(); + Object.defineProperty(exports2, "default", { enumerable: true, get: function() { + return Redis_1.default; + } }); + var Redis_2 = require_Redis(); + Object.defineProperty(exports2, "Redis", { enumerable: true, get: function() { + return Redis_2.default; + } }); + var cluster_1 = require_cluster(); + Object.defineProperty(exports2, "Cluster", { enumerable: true, get: function() { + return cluster_1.default; + } }); + var Command_1 = require_Command(); + Object.defineProperty(exports2, "Command", { enumerable: true, get: function() { + return Command_1.default; + } }); + var ScanStream_1 = require_ScanStream(); + Object.defineProperty(exports2, "ScanStream", { enumerable: true, get: function() { + return ScanStream_1.default; + } }); + var Pipeline_1 = require_Pipeline(); + Object.defineProperty(exports2, "Pipeline", { enumerable: true, get: function() { + return Pipeline_1.default; + } }); + var AbstractConnector_1 = require_AbstractConnector(); + Object.defineProperty(exports2, "AbstractConnector", { enumerable: true, get: function() { + return AbstractConnector_1.default; + } }); + var SentinelConnector_1 = require_SentinelConnector(); + Object.defineProperty(exports2, "SentinelConnector", { enumerable: true, get: function() { + return SentinelConnector_1.default; + } }); + Object.defineProperty(exports2, "SentinelIterator", { enumerable: true, get: function() { + return SentinelConnector_1.SentinelIterator; + } }); + exports2.ReplyError = require_redis_errors().ReplyError; + Object.defineProperty(exports2, "Promise", { + get() { + console.warn("ioredis v5 does not support plugging third-party Promise library anymore. Native Promise will be used."); + return Promise; + }, + set(_lib) { + console.warn("ioredis v5 does not support plugging third-party Promise library anymore. Native Promise will be used."); + } + }); + function print(err, reply) { + if (err) { + console.log("Error: " + err); + } else { + console.log("Reply: " + reply); + } + } + exports2.print = print; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/addDelayedJob-6.js +var require_addDelayedJob_6 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/addDelayedJob-6.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.addDelayedJob = void 0; + var content = `--[[ + Adds a delayed job to the queue by doing the following: + - Increases the job counter if needed. + - Creates a new job key with the job data. + - computes timestamp. + - adds to delayed zset. + - Emits a global event 'delayed' if the job is delayed. + Input: + KEYS[1] 'marker', + KEYS[2] 'meta' + KEYS[3] 'id' + KEYS[4] 'delayed' + KEYS[5] 'completed' + KEYS[6] events stream key + ARGV[1] msgpacked arguments array + [1] key prefix, + [2] custom id (use custom instead of one generated automatically) + [3] name + [4] timestamp + [5] parentKey? + [6] parent dependencies key. + [7] parent? {id, queueKey} + [8] repeat job key + [9] deduplication key + ARGV[2] Json stringified job data + ARGV[3] msgpacked options + Output: + jobId - OK + -5 - Missing parent key +]] +local metaKey = KEYS[2] +local idKey = KEYS[3] +local delayedKey = KEYS[4] +local completedKey = KEYS[5] +local eventsKey = KEYS[6] +local jobId +local jobIdKey +local rcall = redis.call +local args = cmsgpack.unpack(ARGV[1]) +local data = ARGV[2] +local parentKey = args[5] +local parent = args[7] +local repeatJobKey = args[8] +local deduplicationKey = args[9] +local parentData +-- Includes +--[[ + Adds a delayed job to the queue by doing the following: + - Creates a new job key with the job data. + - adds to delayed zset. + - Emits a global event 'delayed' if the job is delayed. +]] +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Bake in the job id first 12 bits into the timestamp + to guarantee correct execution order of delayed jobs + (up to 4096 jobs per given timestamp or 4096 jobs apart per timestamp) + WARNING: Jobs that are so far apart that they wrap around will cause FIFO to fail +]] +local function getDelayedScore(delayedKey, timestamp, delay) + local delayedTimestamp = (delay > 0 and (tonumber(timestamp) + delay)) or tonumber(timestamp) + local minScore = delayedTimestamp * 0x1000 + local maxScore = (delayedTimestamp + 1 ) * 0x1000 - 1 + local result = rcall("ZREVRANGEBYSCORE", delayedKey, maxScore, + minScore, "WITHSCORES","LIMIT", 0, 1) + if #result then + local currentMaxScore = tonumber(result[2]) + if currentMaxScore ~= nil then + if currentMaxScore >= maxScore then + return maxScore, delayedTimestamp + else + return currentMaxScore + 1, delayedTimestamp + end + end + end + return minScore, delayedTimestamp +end +local function addDelayedJob(jobId, delayedKey, eventsKey, timestamp, + maxEvents, markerKey, delay) + local score, delayedTimestamp = getDelayedScore(delayedKey, timestamp, tonumber(delay)) + rcall("ZADD", delayedKey, score, jobId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "delayed", + "jobId", jobId, "delay", delayedTimestamp) + -- mark that a delayed job is available + addDelayMarkerIfNeeded(markerKey, delayedKey) +end +--[[ + Function to debounce a job. +]] +-- Includes +--[[ + Function to deduplicate a job. +]] +--[[ + Function to set the deduplication key for a job. + Uses TTL from deduplication opts if provided. +]] +local function setDeduplicationKey(deduplicationKey, jobId, deduplicationOpts) + local ttl = deduplicationOpts and deduplicationOpts['ttl'] + if ttl and ttl > 0 then + rcall('SET', deduplicationKey, jobId, 'PX', ttl) + else + rcall('SET', deduplicationKey, jobId) + end +end +--[[ + Function to store a deduplicated next job if the existing job is active + and keepLastIfActive is set. When the active job finishes, the stored + proto-job is used to create a real job in the queue. + Returns true if the proto-job was stored, false otherwise. +]] +--[[ + Function to check if an item belongs to a list. +]] +local function checkItemInList(list, item) + for _, v in pairs(list) do + if v == item then + return 1 + end + end + return nil +end +local function storeDeduplicatedNextJob(deduplicationOpts, currentDebounceJobId, prefix, + deduplicationId, jobName, jobData, fullOpts, eventsKey, maxEvents, jobId, + parentKey, parentData, parentDependenciesKey, repeatJobKey) + if deduplicationOpts['keepLastIfActive'] and currentDebounceJobId then + local activeKey = prefix .. "active" + local activeItems = rcall('LRANGE', activeKey, 0, -1) + if checkItemInList(activeItems, currentDebounceJobId) then + local deduplicationNextKey = prefix .. "dn:" .. deduplicationId + local fields = {'name', jobName, 'data', jobData, 'opts', cjson.encode(fullOpts), + 'jid', jobId} + if parentKey then + fields[#fields+1] = 'pk' + fields[#fields+1] = parentKey + end + if parentData then + fields[#fields+1] = 'pd' + fields[#fields+1] = parentData + end + if parentDependenciesKey then + fields[#fields+1] = 'pdk' + fields[#fields+1] = parentDependenciesKey + end + if repeatJobKey then + fields[#fields+1] = 'rjk' + fields[#fields+1] = repeatJobKey + end + rcall('DEL', deduplicationNextKey) + rcall('HSET', deduplicationNextKey, unpack(fields)) + -- Ensure the dedup key does not expire while the job is active, + -- so subsequent adds always hit the dedup path and never bypass + -- the active-check because of a TTL expiry. + local deduplicationKey = prefix .. "de:" .. deduplicationId + rcall('PERSIST', deduplicationKey) + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return true + end + end + return false +end +local function deduplicateJobWithoutReplace(deduplicationId, deduplicationOpts, jobId, deduplicationKey, + eventsKey, maxEvents, prefix, jobName, jobData, fullOpts, + parentKey, parentData, parentDependenciesKey, repeatJobKey) + local ttl = deduplicationOpts['ttl'] + local deduplicationKeyExists + if ttl and ttl > 0 then + if deduplicationOpts['extend'] then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if currentDebounceJobId then + if storeDeduplicatedNextJob(deduplicationOpts, currentDebounceJobId, prefix, + deduplicationId, jobName, jobData, fullOpts, eventsKey, maxEvents, jobId, + parentKey, parentData, parentDependenciesKey, repeatJobKey) then + return currentDebounceJobId + end + if deduplicationOpts['keepLastIfActive'] then + rcall('SET', deduplicationKey, currentDebounceJobId) + else + setDeduplicationKey(deduplicationKey, currentDebounceJobId, deduplicationOpts) + end + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", + "jobId", currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return currentDebounceJobId + else + if deduplicationOpts['keepLastIfActive'] then + rcall('SET', deduplicationKey, jobId) + else + setDeduplicationKey(deduplicationKey, jobId, deduplicationOpts) + end + return + end + else + if deduplicationOpts['keepLastIfActive'] then + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'NX') + else + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'PX', ttl, 'NX') + end + end + else + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'NX') + end + if deduplicationKeyExists then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if storeDeduplicatedNextJob(deduplicationOpts, currentDebounceJobId, prefix, + deduplicationId, jobName, jobData, fullOpts, eventsKey, maxEvents, jobId, + parentKey, parentData, parentDependenciesKey, repeatJobKey) then + return currentDebounceJobId + end + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return currentDebounceJobId + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +local function removeDelayedJob(delayedKey, deduplicationKey, eventsKey, maxEvents, currentDeduplicatedJobId, + jobId, deduplicationId, prefix) + if rcall("ZREM", delayedKey, currentDeduplicatedJobId) > 0 then + removeJobKeys(prefix .. currentDeduplicatedJobId) + rcall("XADD", eventsKey, "*", "event", "removed", "jobId", currentDeduplicatedJobId, + "prev", "delayed") + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + jobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + jobId, "deduplicationId", deduplicationId, "deduplicatedJobId", currentDeduplicatedJobId) + return true + end + return false +end +local function deduplicateJob(deduplicationOpts, jobId, delayedKey, deduplicationKey, eventsKey, maxEvents, + prefix, jobName, jobData, fullOpts, parentKey, parentData, parentDependenciesKey, repeatJobKey) + local deduplicationId = deduplicationOpts and deduplicationOpts['id'] + if deduplicationId then + if deduplicationOpts['replace'] then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if currentDebounceJobId then + local isRemoved = removeDelayedJob(delayedKey, deduplicationKey, eventsKey, maxEvents, + currentDebounceJobId, jobId, deduplicationId, prefix) + if isRemoved then + if deduplicationOpts['keepLastIfActive'] then + rcall('SET', deduplicationKey, jobId) + else + local ttl = deduplicationOpts['ttl'] + if not deduplicationOpts['extend'] and ttl and ttl > 0 then + rcall('SET', deduplicationKey, jobId, 'KEEPTTL') + else + setDeduplicationKey(deduplicationKey, jobId, deduplicationOpts) + end + end + return + else + storeDeduplicatedNextJob(deduplicationOpts, currentDebounceJobId, prefix, + deduplicationId, jobName, jobData, fullOpts, eventsKey, maxEvents, jobId, + parentKey, parentData, parentDependenciesKey, repeatJobKey) + return currentDebounceJobId + end + else + if deduplicationOpts['keepLastIfActive'] then + rcall('SET', deduplicationKey, jobId) + else + setDeduplicationKey(deduplicationKey, jobId, deduplicationOpts) + end + return + end + else + return deduplicateJobWithoutReplace(deduplicationId, deduplicationOpts, + jobId, deduplicationKey, eventsKey, maxEvents, prefix, jobName, jobData, fullOpts, + parentKey, parentData, parentDependenciesKey, repeatJobKey) + end + end +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to handle the case when job is duplicated. +]] +-- Includes +--[[ + This function is used to update the parent's dependencies if the job + is already completed and about to be ignored. The parent must get its + dependencies updated to avoid the parent job being stuck forever in + the waiting-children state. +]] +-- Includes +--[[ + Validate and move or add dependencies to parent. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) + if no pending dependencies. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) if needed. +]] +-- Includes +--[[ + Move parent to a wait status (wait, prioritized or delayed) +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check if queue is paused or maxed + (since an empty list and !EXISTS are not really the same). +]] +local function isQueuePausedOrMaxed(queueMetaKey, activeKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency") + if queueAttributes[1] then + return true + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + return activeCount >= tonumber(queueAttributes[2]) + end + end + return false +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + local parentWaitKey = parentQueueKey .. ":wait" + local parentPausedKey = parentQueueKey .. ":paused" + local parentActiveKey = parentQueueKey .. ":active" + local parentMetaKey = parentQueueKey .. ":meta" + local parentMarkerKey = parentQueueKey .. ":marker" + local jobAttributes = rcall("HMGET", parentKey, "priority", "delay") + local priority = tonumber(jobAttributes[1]) or 0 + local delay = tonumber(jobAttributes[2]) or 0 + if delay > 0 then + local delayedTimestamp = tonumber(timestamp) + delay + local score = delayedTimestamp * 0x1000 + local parentDelayedKey = parentQueueKey .. ":delayed" + rcall("ZADD", parentDelayedKey, score, parentId) + rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed", "jobId", parentId, "delay", + delayedTimestamp) + addDelayMarkerIfNeeded(parentMarkerKey, parentDelayedKey) + else + if priority == 0 then + local parentTarget, isParentPausedOrMaxed = getTargetQueueList(parentMetaKey, parentActiveKey, + parentWaitKey, parentPausedKey) + addJobInTargetList(parentTarget, parentMarkerKey, "RPUSH", isParentPausedOrMaxed, parentId) + else + local isPausedOrMaxed = isQueuePausedOrMaxed(parentMetaKey, parentActiveKey) + addJobWithPriority(parentMarkerKey, parentQueueKey .. ":prioritized", priority, parentId, + parentQueueKey .. ":pc", isPausedOrMaxed) + end + rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting", "jobId", parentId, "prev", + "waiting-children") + end +end +local function moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + if rcall("EXISTS", parentKey) == 1 then + local parentWaitingChildrenKey = parentQueueKey .. ":waiting-children" + if rcall("ZSCORE", parentWaitingChildrenKey, parentId) then + rcall("ZREM", parentWaitingChildrenKey, parentId) + moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + end + end +end +local function moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, + parentId, timestamp) + local doNotHavePendingDependencies = rcall("SCARD", parentDependenciesKey) == 0 + if doNotHavePendingDependencies then + moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + end +end +local function updateParentDepsIfNeeded(parentKey, parentQueueKey, parentDependenciesKey, + parentId, jobIdKey, returnvalue, timestamp ) + local processedSet = parentKey .. ":processed" + rcall("HSET", processedSet, jobIdKey, returnvalue) + moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, parentId, timestamp) +end +local function updateExistingJobsParent(parentKey, parent, parentData, + parentDependenciesKey, completedKey, + jobIdKey, jobId, timestamp) + if parentKey ~= nil then + if rcall("ZSCORE", completedKey, jobId) then + local returnvalue = rcall("HGET", jobIdKey, "returnvalue") + updateParentDepsIfNeeded(parentKey, parent['queueKey'], + parentDependenciesKey, parent['id'], + jobIdKey, returnvalue, timestamp) + else + if parentDependenciesKey ~= nil then + rcall("SADD", parentDependenciesKey, jobIdKey) + end + end + rcall("HMSET", jobIdKey, "parentKey", parentKey, "parent", parentData) + end +end +local function handleDuplicatedJob(jobKey, jobId, currentParentKey, currentParent, + parentData, parentDependenciesKey, completedKey, eventsKey, maxEvents, timestamp) + local existedParentKey = rcall("HGET", jobKey, "parentKey") + if not existedParentKey or existedParentKey == currentParentKey then + updateExistingJobsParent(currentParentKey, currentParent, parentData, + parentDependenciesKey, completedKey, jobKey, + jobId, timestamp) + else + if currentParentKey ~= nil and currentParentKey ~= existedParentKey + and (rcall("EXISTS", existedParentKey) == 1) then + return -7 + end + end + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", + "duplicated", "jobId", jobId) + return jobId .. "" -- convert to string +end +--[[ + Function to store a job +]] +local function storeJob(eventsKey, jobIdKey, jobId, name, data, opts, timestamp, + parentKey, parentData, repeatJobKey) + local jsonOpts = cjson.encode(opts) + local delay = opts['delay'] or 0 + local priority = opts['priority'] or 0 + local debounceId = opts['de'] and opts['de']['id'] + local optionalValues = {} + if parentKey ~= nil then + table.insert(optionalValues, "parentKey") + table.insert(optionalValues, parentKey) + table.insert(optionalValues, "parent") + table.insert(optionalValues, parentData) + end + if repeatJobKey then + table.insert(optionalValues, "rjk") + table.insert(optionalValues, repeatJobKey) + end + if debounceId then + table.insert(optionalValues, "deid") + table.insert(optionalValues, debounceId) + end + rcall("HMSET", jobIdKey, "name", name, "data", data, "opts", jsonOpts, + "timestamp", timestamp, "delay", delay, "priority", priority, + unpack(optionalValues)) + rcall("XADD", eventsKey, "*", "event", "added", "jobId", jobId, "name", name) + return delay, priority +end +if parentKey ~= nil then + if rcall("EXISTS", parentKey) ~= 1 then return -5 end + parentData = cjson.encode(parent) +end +local jobCounter = rcall("INCR", idKey) +local maxEvents = getOrSetMaxEvents(metaKey) +local opts = cmsgpack.unpack(ARGV[3]) +local parentDependenciesKey = args[6] +local timestamp = args[4] +if args[2] == "" then + jobId = jobCounter .. "" -- convert to string + jobIdKey = args[1] .. jobId +else + jobId = args[2] + jobIdKey = args[1] .. jobId + if rcall("EXISTS", jobIdKey) == 1 then + return handleDuplicatedJob(jobIdKey, jobId, parentKey, parent, + parentData, parentDependenciesKey, completedKey, eventsKey, + maxEvents, timestamp) + end +end +local deduplicationJobId = deduplicateJob(opts['de'], jobId, delayedKey, deduplicationKey, + eventsKey, maxEvents, args[1], args[3], ARGV[2], opts, + parentKey, parentData, parentDependenciesKey, repeatJobKey) +if deduplicationJobId then + return deduplicationJobId +end +local delay, priority = storeJob(eventsKey, jobIdKey, jobId, args[3], ARGV[2], + opts, timestamp, parentKey, parentData, repeatJobKey) +addDelayedJob(jobId, delayedKey, eventsKey, timestamp, maxEvents, KEYS[1], delay) +-- Check if this job is a child of another job, if so add it to the parents dependencies +if parentDependenciesKey ~= nil then + rcall("SADD", parentDependenciesKey, jobIdKey) +end +return jobId +`; + exports2.addDelayedJob = { + name: "addDelayedJob", + content, + keys: 6 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/addJobScheduler-11.js +var require_addJobScheduler_11 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/addJobScheduler-11.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.addJobScheduler = void 0; + var content = `--[[ + Adds a job scheduler, i.e. a job factory that creates jobs based on a given schedule (repeat options). + Input: + KEYS[1] 'repeat' key + KEYS[2] 'delayed' key + KEYS[3] 'wait' key + KEYS[4] 'paused' key + KEYS[5] 'meta' key + KEYS[6] 'prioritized' key + KEYS[7] 'marker' key + KEYS[8] 'id' key + KEYS[9] 'events' key + KEYS[10] 'pc' priority counter + KEYS[11] 'active' key + ARGV[1] next milliseconds + ARGV[2] msgpacked options + [1] name + [2] tz? + [3] pattern? + [4] endDate? + [5] every? + ARGV[3] jobs scheduler id + ARGV[4] Json stringified template data + ARGV[5] mspacked template opts + ARGV[6] msgpacked delayed opts + ARGV[7] timestamp + ARGV[8] prefix key + ARGV[9] producer key + Output: + repeatableKey - OK +]] local rcall = redis.call +local repeatKey = KEYS[1] +local delayedKey = KEYS[2] +local waitKey = KEYS[3] +local pausedKey = KEYS[4] +local metaKey = KEYS[5] +local prioritizedKey = KEYS[6] +local eventsKey = KEYS[9] +local nextMillis = ARGV[1] +local jobSchedulerId = ARGV[3] +local templateOpts = cmsgpack.unpack(ARGV[5]) +local now = tonumber(ARGV[7]) +local prefixKey = ARGV[8] +local jobOpts = cmsgpack.unpack(ARGV[6]) +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Shared helper to store a job and enqueue it into the appropriate list/set. + Handles delayed, prioritized, and standard (LIFO/FIFO) jobs. + Emits the appropriate event after enqueuing ("delayed" or "waiting"). + Returns delay, priority from storeJob. +]] +-- Includes +--[[ + Adds a delayed job to the queue by doing the following: + - Creates a new job key with the job data. + - adds to delayed zset. + - Emits a global event 'delayed' if the job is delayed. +]] +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Bake in the job id first 12 bits into the timestamp + to guarantee correct execution order of delayed jobs + (up to 4096 jobs per given timestamp or 4096 jobs apart per timestamp) + WARNING: Jobs that are so far apart that they wrap around will cause FIFO to fail +]] +local function getDelayedScore(delayedKey, timestamp, delay) + local delayedTimestamp = (delay > 0 and (tonumber(timestamp) + delay)) or tonumber(timestamp) + local minScore = delayedTimestamp * 0x1000 + local maxScore = (delayedTimestamp + 1 ) * 0x1000 - 1 + local result = rcall("ZREVRANGEBYSCORE", delayedKey, maxScore, + minScore, "WITHSCORES","LIMIT", 0, 1) + if #result then + local currentMaxScore = tonumber(result[2]) + if currentMaxScore ~= nil then + if currentMaxScore >= maxScore then + return maxScore, delayedTimestamp + else + return currentMaxScore + 1, delayedTimestamp + end + end + end + return minScore, delayedTimestamp +end +local function addDelayedJob(jobId, delayedKey, eventsKey, timestamp, + maxEvents, markerKey, delay) + local score, delayedTimestamp = getDelayedScore(delayedKey, timestamp, tonumber(delay)) + rcall("ZADD", delayedKey, score, jobId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "delayed", + "jobId", jobId, "delay", delayedTimestamp) + -- mark that a delayed job is available + addDelayMarkerIfNeeded(markerKey, delayedKey) +end +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +--[[ + Function to store a job +]] +local function storeJob(eventsKey, jobIdKey, jobId, name, data, opts, timestamp, + parentKey, parentData, repeatJobKey) + local jsonOpts = cjson.encode(opts) + local delay = opts['delay'] or 0 + local priority = opts['priority'] or 0 + local debounceId = opts['de'] and opts['de']['id'] + local optionalValues = {} + if parentKey ~= nil then + table.insert(optionalValues, "parentKey") + table.insert(optionalValues, parentKey) + table.insert(optionalValues, "parent") + table.insert(optionalValues, parentData) + end + if repeatJobKey then + table.insert(optionalValues, "rjk") + table.insert(optionalValues, repeatJobKey) + end + if debounceId then + table.insert(optionalValues, "deid") + table.insert(optionalValues, debounceId) + end + rcall("HMSET", jobIdKey, "name", name, "data", data, "opts", jsonOpts, + "timestamp", timestamp, "delay", delay, "priority", priority, + unpack(optionalValues)) + rcall("XADD", eventsKey, "*", "event", "added", "jobId", jobId, "name", name) + return delay, priority +end +local function storeAndEnqueueJob(eventsKey, jobIdKey, jobId, name, data, opts, + timestamp, parentKey, parentData, repeatJobKey, maxEvents, + waitKey, pausedKey, activeKey, metaKey, prioritizedKey, + priorityCounterKey, delayedKey, markerKey) + local delay, priority = storeJob(eventsKey, jobIdKey, jobId, name, data, + opts, timestamp, parentKey, parentData, repeatJobKey) + if delay ~= 0 and delayedKey then + addDelayedJob(jobId, delayedKey, eventsKey, timestamp, maxEvents, markerKey, delay) + else + local target, isPausedOrMaxed = getTargetQueueList(metaKey, activeKey, waitKey, pausedKey) + if priority > 0 then + addJobWithPriority(markerKey, prioritizedKey, priority, jobId, + priorityCounterKey, isPausedOrMaxed) + else + local pushCmd = opts['lifo'] and 'RPUSH' or 'LPUSH' + addJobInTargetList(target, markerKey, pushCmd, isPausedOrMaxed, jobId) + end + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "waiting", + "jobId", jobId) + end + return delay, priority +end +local function addJobFromScheduler(jobKey, jobId, opts, waitKey, pausedKey, activeKey, metaKey, + prioritizedKey, priorityCounter, delayedKey, markerKey, eventsKey, name, maxEvents, timestamp, + data, jobSchedulerId, repeatDelay) + opts['delay'] = repeatDelay + opts['jobId'] = jobId + storeAndEnqueueJob(eventsKey, jobKey, jobId, name, data, opts, + timestamp, nil, nil, jobSchedulerId, maxEvents, + waitKey, pausedKey, activeKey, metaKey, prioritizedKey, + priorityCounter, delayedKey, markerKey) +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function isQueuePaused(queueMetaKey) + return rcall("HEXISTS", queueMetaKey, "paused") == 1 +end +--[[ + Function to remove job. +]] +-- Includes +--[[ + Function to remove deduplication key if needed + when a job is being removed. +]] +local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey, + jobId, deduplicationId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + rcall("DEL", deduplicationKey) + -- Also clean up any pending dedup-next data for this dedup ID + rcall("DEL", prefixKey .. "dn:" .. deduplicationId) + return 1 + end + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +local function removeJob(jobId, hard, baseKey, shouldRemoveDeduplicationKey) + local jobKey = baseKey .. jobId + removeParentDependencyKey(jobKey, hard, nil, baseKey) + if shouldRemoveDeduplicationKey then + local deduplicationId = rcall("HGET", jobKey, "deid") + removeDeduplicationKeyIfNeededOnRemoval(baseKey, jobId, deduplicationId) + end + removeJobKeys(jobKey) +end +--[[ + Function to store a job scheduler +]] +local function storeJobScheduler(schedulerId, schedulerKey, repeatKey, nextMillis, opts, + templateData, templateOpts) + rcall("ZADD", repeatKey, nextMillis, schedulerId) + local optionalValues = {} + if opts['tz'] then + table.insert(optionalValues, "tz") + table.insert(optionalValues, opts['tz']) + end + if opts['limit'] then + table.insert(optionalValues, "limit") + table.insert(optionalValues, opts['limit']) + end + if opts['pattern'] then + table.insert(optionalValues, "pattern") + table.insert(optionalValues, opts['pattern']) + end + if opts['startDate'] then + table.insert(optionalValues, "startDate") + table.insert(optionalValues, opts['startDate']) + end + if opts['endDate'] then + table.insert(optionalValues, "endDate") + table.insert(optionalValues, opts['endDate']) + end + if opts['every'] then + table.insert(optionalValues, "every") + table.insert(optionalValues, opts['every']) + end + if opts['offset'] then + table.insert(optionalValues, "offset") + table.insert(optionalValues, opts['offset']) + else + local offset = rcall("HGET", schedulerKey, "offset") + if offset then + table.insert(optionalValues, "offset") + table.insert(optionalValues, tonumber(offset)) + end + end + local jsonTemplateOpts = cjson.encode(templateOpts) + if jsonTemplateOpts and jsonTemplateOpts ~= '{}' then + table.insert(optionalValues, "opts") + table.insert(optionalValues, jsonTemplateOpts) + end + if templateData and templateData ~= '{}' then + table.insert(optionalValues, "data") + table.insert(optionalValues, templateData) + end + table.insert(optionalValues, "ic") + table.insert(optionalValues, rcall("HGET", schedulerKey, "ic") or 1) + rcall("DEL", schedulerKey) -- remove all attributes and then re-insert new ones + rcall("HMSET", schedulerKey, "name", opts['name'], unpack(optionalValues)) +end +local function getJobSchedulerEveryNextMillis(prevMillis, every, now, offset, startDate) + offset = tonumber(offset) + local nextMillis + if not prevMillis then + if startDate then + -- Assuming startDate is passed as milliseconds from JavaScript + nextMillis = tonumber(startDate) + nextMillis = nextMillis > now and nextMillis or now + else + if offset and offset > 0 then + -- Align to the next slot that respects the offset + nextMillis = math.floor(now / every) * every + offset + if nextMillis <= now then + nextMillis = nextMillis + every + end + else + nextMillis = now + end + end + else + nextMillis = prevMillis + every + -- check if we may have missed some iterations + if nextMillis < now then + -- Use the same offset-aware alignment as the initial branch + -- above so a non-zero offset is preserved across catch-ups + -- instead of being flattened to (slot + every). When the + -- aligned slot is itself still in the past, advance by one + -- full interval; otherwise the aligned slot is the next + -- iteration. + local aligned = math.floor(now / every) * every + (offset or 0) + if aligned <= now then + nextMillis = aligned + every + else + nextMillis = aligned + end + end + end + if not offset or offset == 0 then + local timeSlot = math.floor(nextMillis / every) * every; + offset = nextMillis - timeSlot; + end + -- Return a tuple nextMillis, offset + return math.floor(nextMillis), math.floor(offset) +end +-- If we are overriding a repeatable job we must delete the delayed job for +-- the next iteration. +local schedulerKey = repeatKey .. ":" .. jobSchedulerId +local maxEvents = getOrSetMaxEvents(metaKey) +local templateData = ARGV[4] +local prevMillis = rcall("ZSCORE", repeatKey, jobSchedulerId) +if prevMillis then + prevMillis = tonumber(prevMillis) +end +local schedulerOpts = cmsgpack.unpack(ARGV[2]) +local every = schedulerOpts['every'] +-- For backwards compatibility we also check the offset from the job itself. +-- could be removed in future major versions. +local jobOffset = jobOpts['repeat'] and jobOpts['repeat']['offset'] or 0 +local offset = schedulerOpts['offset'] or jobOffset or 0 +local newOffset = offset +local updatedEvery = false +if every then + -- if we changed the 'every' value we need to reset millis to nil + local millis = prevMillis + if prevMillis then + local prevEvery = tonumber(rcall("HGET", schedulerKey, "every")) + if prevEvery ~= every then + millis = nil + updatedEvery = true + end + end + local startDate = schedulerOpts['startDate'] + nextMillis, newOffset = getJobSchedulerEveryNextMillis(millis, every, now, offset, startDate) +end +local function removeJobFromScheduler(prefixKey, delayedKey, prioritizedKey, waitKey, pausedKey, jobId, metaKey, + eventsKey) + if rcall("ZSCORE", delayedKey, jobId) then + removeJob(jobId, true, prefixKey, true --[[remove debounce key]] ) + rcall("ZREM", delayedKey, jobId) + return true + elseif rcall("ZSCORE", prioritizedKey, jobId) then + removeJob(jobId, true, prefixKey, true --[[remove debounce key]] ) + rcall("ZREM", prioritizedKey, jobId) + return true + else + local pausedOrWaitKey = waitKey + if isQueuePaused(metaKey) then + pausedOrWaitKey = pausedKey + end + if rcall("LREM", pausedOrWaitKey, 1, jobId) > 0 then + removeJob(jobId, true, prefixKey, true --[[remove debounce key]] ) + return true + end + end + return false +end +local removedPrevJob = false +if prevMillis then + local currentJobId = "repeat:" .. jobSchedulerId .. ":" .. prevMillis + local currentJobKey = schedulerKey .. ":" .. prevMillis + -- In theory it should always exist the currentJobKey if there is a prevMillis unless something has + -- gone really wrong. + if rcall("EXISTS", currentJobKey) == 1 then + removedPrevJob = removeJobFromScheduler(prefixKey, delayedKey, prioritizedKey, waitKey, pausedKey, currentJobId, + metaKey, eventsKey) + end +end +if removedPrevJob then + -- The jobs has been removed and we want to replace it, so lets use the same millis. + if every and not updatedEvery then + nextMillis = prevMillis + end +else + -- Special case where no job was removed, and we need to add the next iteration. + schedulerOpts['offset'] = newOffset +end +-- Check for job ID collision with existing jobs (in any state) +local jobId = "repeat:" .. jobSchedulerId .. ":" .. nextMillis +local jobKey = prefixKey .. jobId +-- If there's already a job with this ID, in a state +-- that is not updatable (active, completed, failed) we must +-- handle the collision +local hasCollision = false +if rcall("EXISTS", jobKey) == 1 then + if every then + -- For 'every' case: walk forward through subsequent slots + -- until we find a free one. Stale completed/failed jobs from + -- a previous scheduler under the same id can occupy several + -- consecutive slots (issue #3063), so a single retry is not + -- enough. The scan is bounded so we don't spin if the + -- scheduler is genuinely contested. + local maxSlotScans = 32 + local slotsScanned = 0 + local jobExists + repeat + nextMillis = nextMillis + every + jobId = "repeat:" .. jobSchedulerId .. ":" .. nextMillis + jobKey = prefixKey .. jobId + slotsScanned = slotsScanned + 1 + jobExists = rcall("EXISTS", jobKey) + until jobExists == 0 or slotsScanned >= maxSlotScans + if jobExists == 1 then + -- Every scanned slot still has a job, return error code + return -11 -- SchedulerJobSlotsBusy + end + else + hasCollision = true + end +end +local delay = nextMillis - now +-- Fast Clamp delay to minimum of 0 +if delay < 0 then + delay = 0 +end +local nextJobKey = schedulerKey .. ":" .. nextMillis +if not hasCollision or removedPrevJob then + -- jobId already calculated above during collision check + storeJobScheduler(jobSchedulerId, schedulerKey, repeatKey, nextMillis, schedulerOpts, templateData, templateOpts) + rcall("INCR", KEYS[8]) + addJobFromScheduler(nextJobKey, jobId, jobOpts, waitKey, pausedKey, KEYS[11], metaKey, prioritizedKey, KEYS[10], + delayedKey, KEYS[7], eventsKey, schedulerOpts['name'], maxEvents, now, templateData, jobSchedulerId, delay) +elseif hasCollision then + -- For 'pattern' case: return error code + return -10 -- SchedulerJobIdCollision +end +if ARGV[9] ~= "" then + rcall("HSET", ARGV[9], "nrjid", jobId) +end +return {jobId .. "", delay} +`; + exports2.addJobScheduler = { + name: "addJobScheduler", + content, + keys: 11 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/addLog-2.js +var require_addLog_2 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/addLog-2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.addLog = void 0; + var content = `--[[ + Add job log + Input: + KEYS[1] job id key + KEYS[2] job logs key + ARGV[1] id + ARGV[2] log + ARGV[3] keepLogs + Output: + -1 - Missing job. +]] +local rcall = redis.call +if rcall("EXISTS", KEYS[1]) == 1 then -- // Make sure job exists + local logCount = rcall("RPUSH", KEYS[2], ARGV[2]) + if ARGV[3] ~= '' then + local keepLogs = tonumber(ARGV[3]) + rcall("LTRIM", KEYS[2], -keepLogs, -1) + return math.min(keepLogs, logCount) + end + return logCount +else + return -1 +end +`; + exports2.addLog = { + name: "addLog", + content, + keys: 2 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/addParentJob-6.js +var require_addParentJob_6 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/addParentJob-6.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.addParentJob = void 0; + var content = `--[[ + Adds a parent job to the queue by doing the following: + - Increases the job counter if needed. + - Creates a new job key with the job data. + - adds the job to the waiting-children zset + Input: + KEYS[1] 'meta' + KEYS[2] 'id' + KEYS[3] 'delayed' + KEYS[4] 'waiting-children' + KEYS[5] 'completed' + KEYS[6] events stream key + ARGV[1] msgpacked arguments array + [1] key prefix, + [2] custom id (will not generate one automatically) + [3] name + [4] timestamp + [5] parentKey? + [6] parent dependencies key. + [7] parent? {id, queueKey} + [8] repeat job key + [9] deduplication key + ARGV[2] Json stringified job data + ARGV[3] msgpacked options + Output: + jobId - OK + -5 - Missing parent key +]] +local metaKey = KEYS[1] +local idKey = KEYS[2] +local delayedKey = KEYS[3] +local completedKey = KEYS[5] +local eventsKey = KEYS[6] +local jobId +local jobIdKey +local rcall = redis.call +local args = cmsgpack.unpack(ARGV[1]) +local data = ARGV[2] +local opts = cmsgpack.unpack(ARGV[3]) +local parentKey = args[5] +local parent = args[7] +local repeatJobKey = args[8] +local deduplicationKey = args[9] +local parentData +-- Includes +--[[ + Function to deduplicate a job. +]] +--[[ + Function to set the deduplication key for a job. + Uses TTL from deduplication opts if provided. +]] +local function setDeduplicationKey(deduplicationKey, jobId, deduplicationOpts) + local ttl = deduplicationOpts and deduplicationOpts['ttl'] + if ttl and ttl > 0 then + rcall('SET', deduplicationKey, jobId, 'PX', ttl) + else + rcall('SET', deduplicationKey, jobId) + end +end +--[[ + Function to store a deduplicated next job if the existing job is active + and keepLastIfActive is set. When the active job finishes, the stored + proto-job is used to create a real job in the queue. + Returns true if the proto-job was stored, false otherwise. +]] +--[[ + Function to check if an item belongs to a list. +]] +local function checkItemInList(list, item) + for _, v in pairs(list) do + if v == item then + return 1 + end + end + return nil +end +local function storeDeduplicatedNextJob(deduplicationOpts, currentDebounceJobId, prefix, + deduplicationId, jobName, jobData, fullOpts, eventsKey, maxEvents, jobId, + parentKey, parentData, parentDependenciesKey, repeatJobKey) + if deduplicationOpts['keepLastIfActive'] and currentDebounceJobId then + local activeKey = prefix .. "active" + local activeItems = rcall('LRANGE', activeKey, 0, -1) + if checkItemInList(activeItems, currentDebounceJobId) then + local deduplicationNextKey = prefix .. "dn:" .. deduplicationId + local fields = {'name', jobName, 'data', jobData, 'opts', cjson.encode(fullOpts), + 'jid', jobId} + if parentKey then + fields[#fields+1] = 'pk' + fields[#fields+1] = parentKey + end + if parentData then + fields[#fields+1] = 'pd' + fields[#fields+1] = parentData + end + if parentDependenciesKey then + fields[#fields+1] = 'pdk' + fields[#fields+1] = parentDependenciesKey + end + if repeatJobKey then + fields[#fields+1] = 'rjk' + fields[#fields+1] = repeatJobKey + end + rcall('DEL', deduplicationNextKey) + rcall('HSET', deduplicationNextKey, unpack(fields)) + -- Ensure the dedup key does not expire while the job is active, + -- so subsequent adds always hit the dedup path and never bypass + -- the active-check because of a TTL expiry. + local deduplicationKey = prefix .. "de:" .. deduplicationId + rcall('PERSIST', deduplicationKey) + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return true + end + end + return false +end +local function deduplicateJobWithoutReplace(deduplicationId, deduplicationOpts, jobId, deduplicationKey, + eventsKey, maxEvents, prefix, jobName, jobData, fullOpts, + parentKey, parentData, parentDependenciesKey, repeatJobKey) + local ttl = deduplicationOpts['ttl'] + local deduplicationKeyExists + if ttl and ttl > 0 then + if deduplicationOpts['extend'] then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if currentDebounceJobId then + if storeDeduplicatedNextJob(deduplicationOpts, currentDebounceJobId, prefix, + deduplicationId, jobName, jobData, fullOpts, eventsKey, maxEvents, jobId, + parentKey, parentData, parentDependenciesKey, repeatJobKey) then + return currentDebounceJobId + end + if deduplicationOpts['keepLastIfActive'] then + rcall('SET', deduplicationKey, currentDebounceJobId) + else + setDeduplicationKey(deduplicationKey, currentDebounceJobId, deduplicationOpts) + end + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", + "jobId", currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return currentDebounceJobId + else + if deduplicationOpts['keepLastIfActive'] then + rcall('SET', deduplicationKey, jobId) + else + setDeduplicationKey(deduplicationKey, jobId, deduplicationOpts) + end + return + end + else + if deduplicationOpts['keepLastIfActive'] then + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'NX') + else + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'PX', ttl, 'NX') + end + end + else + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'NX') + end + if deduplicationKeyExists then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if storeDeduplicatedNextJob(deduplicationOpts, currentDebounceJobId, prefix, + deduplicationId, jobName, jobData, fullOpts, eventsKey, maxEvents, jobId, + parentKey, parentData, parentDependenciesKey, repeatJobKey) then + return currentDebounceJobId + end + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return currentDebounceJobId + end +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to handle the case when job is duplicated. +]] +-- Includes +--[[ + This function is used to update the parent's dependencies if the job + is already completed and about to be ignored. The parent must get its + dependencies updated to avoid the parent job being stuck forever in + the waiting-children state. +]] +-- Includes +--[[ + Validate and move or add dependencies to parent. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) + if no pending dependencies. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) if needed. +]] +-- Includes +--[[ + Move parent to a wait status (wait, prioritized or delayed) +]] +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check if queue is paused or maxed + (since an empty list and !EXISTS are not really the same). +]] +local function isQueuePausedOrMaxed(queueMetaKey, activeKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency") + if queueAttributes[1] then + return true + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + return activeCount >= tonumber(queueAttributes[2]) + end + end + return false +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + local parentWaitKey = parentQueueKey .. ":wait" + local parentPausedKey = parentQueueKey .. ":paused" + local parentActiveKey = parentQueueKey .. ":active" + local parentMetaKey = parentQueueKey .. ":meta" + local parentMarkerKey = parentQueueKey .. ":marker" + local jobAttributes = rcall("HMGET", parentKey, "priority", "delay") + local priority = tonumber(jobAttributes[1]) or 0 + local delay = tonumber(jobAttributes[2]) or 0 + if delay > 0 then + local delayedTimestamp = tonumber(timestamp) + delay + local score = delayedTimestamp * 0x1000 + local parentDelayedKey = parentQueueKey .. ":delayed" + rcall("ZADD", parentDelayedKey, score, parentId) + rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed", "jobId", parentId, "delay", + delayedTimestamp) + addDelayMarkerIfNeeded(parentMarkerKey, parentDelayedKey) + else + if priority == 0 then + local parentTarget, isParentPausedOrMaxed = getTargetQueueList(parentMetaKey, parentActiveKey, + parentWaitKey, parentPausedKey) + addJobInTargetList(parentTarget, parentMarkerKey, "RPUSH", isParentPausedOrMaxed, parentId) + else + local isPausedOrMaxed = isQueuePausedOrMaxed(parentMetaKey, parentActiveKey) + addJobWithPriority(parentMarkerKey, parentQueueKey .. ":prioritized", priority, parentId, + parentQueueKey .. ":pc", isPausedOrMaxed) + end + rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting", "jobId", parentId, "prev", + "waiting-children") + end +end +local function moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + if rcall("EXISTS", parentKey) == 1 then + local parentWaitingChildrenKey = parentQueueKey .. ":waiting-children" + if rcall("ZSCORE", parentWaitingChildrenKey, parentId) then + rcall("ZREM", parentWaitingChildrenKey, parentId) + moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + end + end +end +local function moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, + parentId, timestamp) + local doNotHavePendingDependencies = rcall("SCARD", parentDependenciesKey) == 0 + if doNotHavePendingDependencies then + moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + end +end +local function updateParentDepsIfNeeded(parentKey, parentQueueKey, parentDependenciesKey, + parentId, jobIdKey, returnvalue, timestamp ) + local processedSet = parentKey .. ":processed" + rcall("HSET", processedSet, jobIdKey, returnvalue) + moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, parentId, timestamp) +end +local function updateExistingJobsParent(parentKey, parent, parentData, + parentDependenciesKey, completedKey, + jobIdKey, jobId, timestamp) + if parentKey ~= nil then + if rcall("ZSCORE", completedKey, jobId) then + local returnvalue = rcall("HGET", jobIdKey, "returnvalue") + updateParentDepsIfNeeded(parentKey, parent['queueKey'], + parentDependenciesKey, parent['id'], + jobIdKey, returnvalue, timestamp) + else + if parentDependenciesKey ~= nil then + rcall("SADD", parentDependenciesKey, jobIdKey) + end + end + rcall("HMSET", jobIdKey, "parentKey", parentKey, "parent", parentData) + end +end +local function handleDuplicatedJob(jobKey, jobId, currentParentKey, currentParent, + parentData, parentDependenciesKey, completedKey, eventsKey, maxEvents, timestamp) + local existedParentKey = rcall("HGET", jobKey, "parentKey") + if not existedParentKey or existedParentKey == currentParentKey then + updateExistingJobsParent(currentParentKey, currentParent, parentData, + parentDependenciesKey, completedKey, jobKey, + jobId, timestamp) + else + if currentParentKey ~= nil and currentParentKey ~= existedParentKey + and (rcall("EXISTS", existedParentKey) == 1) then + return -7 + end + end + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", + "duplicated", "jobId", jobId) + return jobId .. "" -- convert to string +end +--[[ + Function to store a job +]] +local function storeJob(eventsKey, jobIdKey, jobId, name, data, opts, timestamp, + parentKey, parentData, repeatJobKey) + local jsonOpts = cjson.encode(opts) + local delay = opts['delay'] or 0 + local priority = opts['priority'] or 0 + local debounceId = opts['de'] and opts['de']['id'] + local optionalValues = {} + if parentKey ~= nil then + table.insert(optionalValues, "parentKey") + table.insert(optionalValues, parentKey) + table.insert(optionalValues, "parent") + table.insert(optionalValues, parentData) + end + if repeatJobKey then + table.insert(optionalValues, "rjk") + table.insert(optionalValues, repeatJobKey) + end + if debounceId then + table.insert(optionalValues, "deid") + table.insert(optionalValues, debounceId) + end + rcall("HMSET", jobIdKey, "name", name, "data", data, "opts", jsonOpts, + "timestamp", timestamp, "delay", delay, "priority", priority, + unpack(optionalValues)) + rcall("XADD", eventsKey, "*", "event", "added", "jobId", jobId, "name", name) + return delay, priority +end +if parentKey ~= nil then + if rcall("EXISTS", parentKey) ~= 1 then return -5 end + parentData = cjson.encode(parent) +end +local jobCounter = rcall("INCR", idKey) +local maxEvents = getOrSetMaxEvents(metaKey) +local parentDependenciesKey = args[6] +local timestamp = args[4] +if args[2] == "" then + jobId = jobCounter .. "" -- convert to string + jobIdKey = args[1] .. jobId +else + jobId = args[2] + jobIdKey = args[1] .. jobId + if rcall("EXISTS", jobIdKey) == 1 then + return handleDuplicatedJob(jobIdKey, jobId, parentKey, parent, + parentData, parentDependenciesKey, completedKey, eventsKey, + maxEvents, timestamp) + end +end +local deduplicationId = opts['de'] and opts['de']['id'] +if deduplicationId then + local deduplicationJobId = deduplicateJobWithoutReplace(deduplicationId, opts['de'], + jobId, deduplicationKey, eventsKey, maxEvents, args[1], args[3], ARGV[2], opts, + parentKey, parentData, parentDependenciesKey, repeatJobKey) + if deduplicationJobId then + return deduplicationJobId + end +end +-- Store the job. +storeJob(eventsKey, jobIdKey, jobId, args[3], ARGV[2], opts, timestamp, + parentKey, parentData, repeatJobKey) +local waitChildrenKey = KEYS[4] +rcall("ZADD", waitChildrenKey, timestamp, jobId) +rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", + "waiting-children", "jobId", jobId) +-- Check if this job is a child of another job, if so add it to the parents dependencies +if parentDependenciesKey ~= nil then + rcall("SADD", parentDependenciesKey, jobIdKey) +end +return jobId +`; + exports2.addParentJob = { + name: "addParentJob", + content, + keys: 6 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/addPrioritizedJob-9.js +var require_addPrioritizedJob_9 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/addPrioritizedJob-9.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.addPrioritizedJob = void 0; + var content = `--[[ + Adds a prioritized job to the queue by doing the following: + - Increases the job counter if needed. + - Creates a new job key with the job data. + - Adds the job to the "added" list so that workers gets notified. + Input: + KEYS[1] 'marker', + KEYS[2] 'meta' + KEYS[3] 'id' + KEYS[4] 'prioritized' + KEYS[5] 'delayed' + KEYS[6] 'completed' + KEYS[7] 'active' + KEYS[8] events stream key + KEYS[9] 'pc' priority counter + ARGV[1] msgpacked arguments array + [1] key prefix, + [2] custom id (will not generate one automatically) + [3] name + [4] timestamp + [5] parentKey? + [6] parent dependencies key. + [7] parent? {id, queueKey} + [8] repeat job key + [9] deduplication key + ARGV[2] Json stringified job data + ARGV[3] msgpacked options + Output: + jobId - OK + -5 - Missing parent key +]] +local metaKey = KEYS[2] +local idKey = KEYS[3] +local priorityKey = KEYS[4] +local completedKey = KEYS[6] +local activeKey = KEYS[7] +local eventsKey = KEYS[8] +local priorityCounterKey = KEYS[9] +local jobId +local jobIdKey +local rcall = redis.call +local args = cmsgpack.unpack(ARGV[1]) +local data = ARGV[2] +local opts = cmsgpack.unpack(ARGV[3]) +local parentKey = args[5] +local parent = args[7] +local repeatJobKey = args[8] +local deduplicationKey = args[9] +local parentData +-- Includes +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to debounce a job. +]] +-- Includes +--[[ + Function to deduplicate a job. +]] +--[[ + Function to set the deduplication key for a job. + Uses TTL from deduplication opts if provided. +]] +local function setDeduplicationKey(deduplicationKey, jobId, deduplicationOpts) + local ttl = deduplicationOpts and deduplicationOpts['ttl'] + if ttl and ttl > 0 then + rcall('SET', deduplicationKey, jobId, 'PX', ttl) + else + rcall('SET', deduplicationKey, jobId) + end +end +--[[ + Function to store a deduplicated next job if the existing job is active + and keepLastIfActive is set. When the active job finishes, the stored + proto-job is used to create a real job in the queue. + Returns true if the proto-job was stored, false otherwise. +]] +--[[ + Function to check if an item belongs to a list. +]] +local function checkItemInList(list, item) + for _, v in pairs(list) do + if v == item then + return 1 + end + end + return nil +end +local function storeDeduplicatedNextJob(deduplicationOpts, currentDebounceJobId, prefix, + deduplicationId, jobName, jobData, fullOpts, eventsKey, maxEvents, jobId, + parentKey, parentData, parentDependenciesKey, repeatJobKey) + if deduplicationOpts['keepLastIfActive'] and currentDebounceJobId then + local activeKey = prefix .. "active" + local activeItems = rcall('LRANGE', activeKey, 0, -1) + if checkItemInList(activeItems, currentDebounceJobId) then + local deduplicationNextKey = prefix .. "dn:" .. deduplicationId + local fields = {'name', jobName, 'data', jobData, 'opts', cjson.encode(fullOpts), + 'jid', jobId} + if parentKey then + fields[#fields+1] = 'pk' + fields[#fields+1] = parentKey + end + if parentData then + fields[#fields+1] = 'pd' + fields[#fields+1] = parentData + end + if parentDependenciesKey then + fields[#fields+1] = 'pdk' + fields[#fields+1] = parentDependenciesKey + end + if repeatJobKey then + fields[#fields+1] = 'rjk' + fields[#fields+1] = repeatJobKey + end + rcall('DEL', deduplicationNextKey) + rcall('HSET', deduplicationNextKey, unpack(fields)) + -- Ensure the dedup key does not expire while the job is active, + -- so subsequent adds always hit the dedup path and never bypass + -- the active-check because of a TTL expiry. + local deduplicationKey = prefix .. "de:" .. deduplicationId + rcall('PERSIST', deduplicationKey) + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return true + end + end + return false +end +local function deduplicateJobWithoutReplace(deduplicationId, deduplicationOpts, jobId, deduplicationKey, + eventsKey, maxEvents, prefix, jobName, jobData, fullOpts, + parentKey, parentData, parentDependenciesKey, repeatJobKey) + local ttl = deduplicationOpts['ttl'] + local deduplicationKeyExists + if ttl and ttl > 0 then + if deduplicationOpts['extend'] then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if currentDebounceJobId then + if storeDeduplicatedNextJob(deduplicationOpts, currentDebounceJobId, prefix, + deduplicationId, jobName, jobData, fullOpts, eventsKey, maxEvents, jobId, + parentKey, parentData, parentDependenciesKey, repeatJobKey) then + return currentDebounceJobId + end + if deduplicationOpts['keepLastIfActive'] then + rcall('SET', deduplicationKey, currentDebounceJobId) + else + setDeduplicationKey(deduplicationKey, currentDebounceJobId, deduplicationOpts) + end + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", + "jobId", currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return currentDebounceJobId + else + if deduplicationOpts['keepLastIfActive'] then + rcall('SET', deduplicationKey, jobId) + else + setDeduplicationKey(deduplicationKey, jobId, deduplicationOpts) + end + return + end + else + if deduplicationOpts['keepLastIfActive'] then + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'NX') + else + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'PX', ttl, 'NX') + end + end + else + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'NX') + end + if deduplicationKeyExists then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if storeDeduplicatedNextJob(deduplicationOpts, currentDebounceJobId, prefix, + deduplicationId, jobName, jobData, fullOpts, eventsKey, maxEvents, jobId, + parentKey, parentData, parentDependenciesKey, repeatJobKey) then + return currentDebounceJobId + end + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return currentDebounceJobId + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +local function removeDelayedJob(delayedKey, deduplicationKey, eventsKey, maxEvents, currentDeduplicatedJobId, + jobId, deduplicationId, prefix) + if rcall("ZREM", delayedKey, currentDeduplicatedJobId) > 0 then + removeJobKeys(prefix .. currentDeduplicatedJobId) + rcall("XADD", eventsKey, "*", "event", "removed", "jobId", currentDeduplicatedJobId, + "prev", "delayed") + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + jobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + jobId, "deduplicationId", deduplicationId, "deduplicatedJobId", currentDeduplicatedJobId) + return true + end + return false +end +local function deduplicateJob(deduplicationOpts, jobId, delayedKey, deduplicationKey, eventsKey, maxEvents, + prefix, jobName, jobData, fullOpts, parentKey, parentData, parentDependenciesKey, repeatJobKey) + local deduplicationId = deduplicationOpts and deduplicationOpts['id'] + if deduplicationId then + if deduplicationOpts['replace'] then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if currentDebounceJobId then + local isRemoved = removeDelayedJob(delayedKey, deduplicationKey, eventsKey, maxEvents, + currentDebounceJobId, jobId, deduplicationId, prefix) + if isRemoved then + if deduplicationOpts['keepLastIfActive'] then + rcall('SET', deduplicationKey, jobId) + else + local ttl = deduplicationOpts['ttl'] + if not deduplicationOpts['extend'] and ttl and ttl > 0 then + rcall('SET', deduplicationKey, jobId, 'KEEPTTL') + else + setDeduplicationKey(deduplicationKey, jobId, deduplicationOpts) + end + end + return + else + storeDeduplicatedNextJob(deduplicationOpts, currentDebounceJobId, prefix, + deduplicationId, jobName, jobData, fullOpts, eventsKey, maxEvents, jobId, + parentKey, parentData, parentDependenciesKey, repeatJobKey) + return currentDebounceJobId + end + else + if deduplicationOpts['keepLastIfActive'] then + rcall('SET', deduplicationKey, jobId) + else + setDeduplicationKey(deduplicationKey, jobId, deduplicationOpts) + end + return + end + else + return deduplicateJobWithoutReplace(deduplicationId, deduplicationOpts, + jobId, deduplicationKey, eventsKey, maxEvents, prefix, jobName, jobData, fullOpts, + parentKey, parentData, parentDependenciesKey, repeatJobKey) + end + end +end +--[[ + Function to store a job +]] +local function storeJob(eventsKey, jobIdKey, jobId, name, data, opts, timestamp, + parentKey, parentData, repeatJobKey) + local jsonOpts = cjson.encode(opts) + local delay = opts['delay'] or 0 + local priority = opts['priority'] or 0 + local debounceId = opts['de'] and opts['de']['id'] + local optionalValues = {} + if parentKey ~= nil then + table.insert(optionalValues, "parentKey") + table.insert(optionalValues, parentKey) + table.insert(optionalValues, "parent") + table.insert(optionalValues, parentData) + end + if repeatJobKey then + table.insert(optionalValues, "rjk") + table.insert(optionalValues, repeatJobKey) + end + if debounceId then + table.insert(optionalValues, "deid") + table.insert(optionalValues, debounceId) + end + rcall("HMSET", jobIdKey, "name", name, "data", data, "opts", jsonOpts, + "timestamp", timestamp, "delay", delay, "priority", priority, + unpack(optionalValues)) + rcall("XADD", eventsKey, "*", "event", "added", "jobId", jobId, "name", name) + return delay, priority +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to handle the case when job is duplicated. +]] +-- Includes +--[[ + This function is used to update the parent's dependencies if the job + is already completed and about to be ignored. The parent must get its + dependencies updated to avoid the parent job being stuck forever in + the waiting-children state. +]] +-- Includes +--[[ + Validate and move or add dependencies to parent. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) + if no pending dependencies. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) if needed. +]] +-- Includes +--[[ + Move parent to a wait status (wait, prioritized or delayed) +]] +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check if queue is paused or maxed + (since an empty list and !EXISTS are not really the same). +]] +local function isQueuePausedOrMaxed(queueMetaKey, activeKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency") + if queueAttributes[1] then + return true + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + return activeCount >= tonumber(queueAttributes[2]) + end + end + return false +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + local parentWaitKey = parentQueueKey .. ":wait" + local parentPausedKey = parentQueueKey .. ":paused" + local parentActiveKey = parentQueueKey .. ":active" + local parentMetaKey = parentQueueKey .. ":meta" + local parentMarkerKey = parentQueueKey .. ":marker" + local jobAttributes = rcall("HMGET", parentKey, "priority", "delay") + local priority = tonumber(jobAttributes[1]) or 0 + local delay = tonumber(jobAttributes[2]) or 0 + if delay > 0 then + local delayedTimestamp = tonumber(timestamp) + delay + local score = delayedTimestamp * 0x1000 + local parentDelayedKey = parentQueueKey .. ":delayed" + rcall("ZADD", parentDelayedKey, score, parentId) + rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed", "jobId", parentId, "delay", + delayedTimestamp) + addDelayMarkerIfNeeded(parentMarkerKey, parentDelayedKey) + else + if priority == 0 then + local parentTarget, isParentPausedOrMaxed = getTargetQueueList(parentMetaKey, parentActiveKey, + parentWaitKey, parentPausedKey) + addJobInTargetList(parentTarget, parentMarkerKey, "RPUSH", isParentPausedOrMaxed, parentId) + else + local isPausedOrMaxed = isQueuePausedOrMaxed(parentMetaKey, parentActiveKey) + addJobWithPriority(parentMarkerKey, parentQueueKey .. ":prioritized", priority, parentId, + parentQueueKey .. ":pc", isPausedOrMaxed) + end + rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting", "jobId", parentId, "prev", + "waiting-children") + end +end +local function moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + if rcall("EXISTS", parentKey) == 1 then + local parentWaitingChildrenKey = parentQueueKey .. ":waiting-children" + if rcall("ZSCORE", parentWaitingChildrenKey, parentId) then + rcall("ZREM", parentWaitingChildrenKey, parentId) + moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + end + end +end +local function moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, + parentId, timestamp) + local doNotHavePendingDependencies = rcall("SCARD", parentDependenciesKey) == 0 + if doNotHavePendingDependencies then + moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + end +end +local function updateParentDepsIfNeeded(parentKey, parentQueueKey, parentDependenciesKey, + parentId, jobIdKey, returnvalue, timestamp ) + local processedSet = parentKey .. ":processed" + rcall("HSET", processedSet, jobIdKey, returnvalue) + moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, parentId, timestamp) +end +local function updateExistingJobsParent(parentKey, parent, parentData, + parentDependenciesKey, completedKey, + jobIdKey, jobId, timestamp) + if parentKey ~= nil then + if rcall("ZSCORE", completedKey, jobId) then + local returnvalue = rcall("HGET", jobIdKey, "returnvalue") + updateParentDepsIfNeeded(parentKey, parent['queueKey'], + parentDependenciesKey, parent['id'], + jobIdKey, returnvalue, timestamp) + else + if parentDependenciesKey ~= nil then + rcall("SADD", parentDependenciesKey, jobIdKey) + end + end + rcall("HMSET", jobIdKey, "parentKey", parentKey, "parent", parentData) + end +end +local function handleDuplicatedJob(jobKey, jobId, currentParentKey, currentParent, + parentData, parentDependenciesKey, completedKey, eventsKey, maxEvents, timestamp) + local existedParentKey = rcall("HGET", jobKey, "parentKey") + if not existedParentKey or existedParentKey == currentParentKey then + updateExistingJobsParent(currentParentKey, currentParent, parentData, + parentDependenciesKey, completedKey, jobKey, + jobId, timestamp) + else + if currentParentKey ~= nil and currentParentKey ~= existedParentKey + and (rcall("EXISTS", existedParentKey) == 1) then + return -7 + end + end + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", + "duplicated", "jobId", jobId) + return jobId .. "" -- convert to string +end +if parentKey ~= nil then + if rcall("EXISTS", parentKey) ~= 1 then return -5 end + parentData = cjson.encode(parent) +end +local jobCounter = rcall("INCR", idKey) +local maxEvents = getOrSetMaxEvents(metaKey) +local parentDependenciesKey = args[6] +local timestamp = args[4] +if args[2] == "" then + jobId = jobCounter .. "" -- convert to string + jobIdKey = args[1] .. jobId +else + jobId = args[2] + jobIdKey = args[1] .. jobId + if rcall("EXISTS", jobIdKey) == 1 then + return handleDuplicatedJob(jobIdKey, jobId, parentKey, parent, + parentData, parentDependenciesKey, completedKey, eventsKey, + maxEvents, timestamp) + end +end +local deduplicationJobId = deduplicateJob(opts['de'], jobId, KEYS[5], + deduplicationKey, eventsKey, maxEvents, args[1], args[3], ARGV[2], opts, + parentKey, parentData, parentDependenciesKey, repeatJobKey) +if deduplicationJobId then + return deduplicationJobId +end +-- Store the job. +local delay, priority = storeJob(eventsKey, jobIdKey, jobId, args[3], ARGV[2], + opts, timestamp, parentKey, parentData, + repeatJobKey) +-- Add the job to the prioritized set +local isPausedOrMaxed = isQueuePausedOrMaxed(metaKey, activeKey) +addJobWithPriority( KEYS[1], priorityKey, priority, jobId, priorityCounterKey, isPausedOrMaxed) +-- Emit waiting event +rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "waiting", + "jobId", jobId) +-- Check if this job is a child of another job, if so add it to the parents dependencies +if parentDependenciesKey ~= nil then + rcall("SADD", parentDependenciesKey, jobIdKey) +end +return jobId +`; + exports2.addPrioritizedJob = { + name: "addPrioritizedJob", + content, + keys: 9 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/addRepeatableJob-2.js +var require_addRepeatableJob_2 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/addRepeatableJob-2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.addRepeatableJob = void 0; + var content = `--[[ + Adds a repeatable job + Input: + KEYS[1] 'repeat' key + KEYS[2] 'delayed' key + ARGV[1] next milliseconds + ARGV[2] msgpacked options + [1] name + [2] tz? + [3] pattern? + [4] endDate? + [5] every? + ARGV[3] legacy custom key TODO: remove this logic in next breaking change + ARGV[4] custom key + ARGV[5] prefix key + Output: + repeatableKey - OK +]] +local rcall = redis.call +local repeatKey = KEYS[1] +local delayedKey = KEYS[2] +local nextMillis = ARGV[1] +local legacyCustomKey = ARGV[3] +local customKey = ARGV[4] +local prefixKey = ARGV[5] +-- Includes +--[[ + Function to remove job. +]] +-- Includes +--[[ + Function to remove deduplication key if needed + when a job is being removed. +]] +local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey, + jobId, deduplicationId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + rcall("DEL", deduplicationKey) + -- Also clean up any pending dedup-next data for this dedup ID + rcall("DEL", prefixKey .. "dn:" .. deduplicationId) + return 1 + end + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +local function removeJob(jobId, hard, baseKey, shouldRemoveDeduplicationKey) + local jobKey = baseKey .. jobId + removeParentDependencyKey(jobKey, hard, nil, baseKey) + if shouldRemoveDeduplicationKey then + local deduplicationId = rcall("HGET", jobKey, "deid") + removeDeduplicationKeyIfNeededOnRemoval(baseKey, jobId, deduplicationId) + end + removeJobKeys(jobKey) +end +local function storeRepeatableJob(repeatKey, customKey, nextMillis, rawOpts) + rcall("ZADD", repeatKey, nextMillis, customKey) + local opts = cmsgpack.unpack(rawOpts) + local optionalValues = {} + if opts['tz'] then + table.insert(optionalValues, "tz") + table.insert(optionalValues, opts['tz']) + end + if opts['pattern'] then + table.insert(optionalValues, "pattern") + table.insert(optionalValues, opts['pattern']) + end + if opts['endDate'] then + table.insert(optionalValues, "endDate") + table.insert(optionalValues, opts['endDate']) + end + if opts['every'] then + table.insert(optionalValues, "every") + table.insert(optionalValues, opts['every']) + end + rcall("HMSET", repeatKey .. ":" .. customKey, "name", opts['name'], + unpack(optionalValues)) + return customKey +end +-- If we are overriding a repeatable job we must delete the delayed job for +-- the next iteration. +local prevMillis = rcall("ZSCORE", repeatKey, customKey) +if prevMillis then + local delayedJobId = "repeat:" .. customKey .. ":" .. prevMillis + local nextDelayedJobId = repeatKey .. ":" .. customKey .. ":" .. nextMillis + if rcall("ZSCORE", delayedKey, delayedJobId) + and rcall("EXISTS", nextDelayedJobId) ~= 1 then + removeJob(delayedJobId, true, prefixKey, true --[[remove debounce key]]) + rcall("ZREM", delayedKey, delayedJobId) + end +end +-- Keep backwards compatibility with old repeatable jobs (<= 3.0.0) +if rcall("ZSCORE", repeatKey, legacyCustomKey) ~= false then + return storeRepeatableJob(repeatKey, legacyCustomKey, nextMillis, ARGV[2]) +end +return storeRepeatableJob(repeatKey, customKey, nextMillis, ARGV[2]) +`; + exports2.addRepeatableJob = { + name: "addRepeatableJob", + content, + keys: 2 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/addStandardJob-9.js +var require_addStandardJob_9 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/addStandardJob-9.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.addStandardJob = void 0; + var content = `--[[ + Adds a job to the queue by doing the following: + - Increases the job counter if needed. + - Creates a new job key with the job data. + - if delayed: + - computes timestamp. + - adds to delayed zset. + - Emits a global event 'delayed' if the job is delayed. + - if not delayed + - Adds the jobId to the wait/paused list in one of three ways: + - LIFO + - FIFO + - prioritized. + - Adds the job to the "added" list so that workers gets notified. + Input: + KEYS[1] 'wait', + KEYS[2] 'paused' + KEYS[3] 'meta' + KEYS[4] 'id' + KEYS[5] 'completed' + KEYS[6] 'delayed' + KEYS[7] 'active' + KEYS[8] events stream key + KEYS[9] marker key + ARGV[1] msgpacked arguments array + [1] key prefix, + [2] custom id (will not generate one automatically) + [3] name + [4] timestamp + [5] parentKey? + [6] parent dependencies key. + [7] parent? {id, queueKey} + [8] repeat job key + [9] deduplication key + ARGV[2] Json stringified job data + ARGV[3] msgpacked options + Output: + jobId - OK + -5 - Missing parent key +]] +local eventsKey = KEYS[8] +local jobId +local jobIdKey +local rcall = redis.call +local args = cmsgpack.unpack(ARGV[1]) +local data = ARGV[2] +local opts = cmsgpack.unpack(ARGV[3]) +local parentKey = args[5] +local parent = args[7] +local repeatJobKey = args[8] +local deduplicationKey = args[9] +local parentData +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to debounce a job. +]] +-- Includes +--[[ + Function to deduplicate a job. +]] +--[[ + Function to set the deduplication key for a job. + Uses TTL from deduplication opts if provided. +]] +local function setDeduplicationKey(deduplicationKey, jobId, deduplicationOpts) + local ttl = deduplicationOpts and deduplicationOpts['ttl'] + if ttl and ttl > 0 then + rcall('SET', deduplicationKey, jobId, 'PX', ttl) + else + rcall('SET', deduplicationKey, jobId) + end +end +--[[ + Function to store a deduplicated next job if the existing job is active + and keepLastIfActive is set. When the active job finishes, the stored + proto-job is used to create a real job in the queue. + Returns true if the proto-job was stored, false otherwise. +]] +--[[ + Function to check if an item belongs to a list. +]] +local function checkItemInList(list, item) + for _, v in pairs(list) do + if v == item then + return 1 + end + end + return nil +end +local function storeDeduplicatedNextJob(deduplicationOpts, currentDebounceJobId, prefix, + deduplicationId, jobName, jobData, fullOpts, eventsKey, maxEvents, jobId, + parentKey, parentData, parentDependenciesKey, repeatJobKey) + if deduplicationOpts['keepLastIfActive'] and currentDebounceJobId then + local activeKey = prefix .. "active" + local activeItems = rcall('LRANGE', activeKey, 0, -1) + if checkItemInList(activeItems, currentDebounceJobId) then + local deduplicationNextKey = prefix .. "dn:" .. deduplicationId + local fields = {'name', jobName, 'data', jobData, 'opts', cjson.encode(fullOpts), + 'jid', jobId} + if parentKey then + fields[#fields+1] = 'pk' + fields[#fields+1] = parentKey + end + if parentData then + fields[#fields+1] = 'pd' + fields[#fields+1] = parentData + end + if parentDependenciesKey then + fields[#fields+1] = 'pdk' + fields[#fields+1] = parentDependenciesKey + end + if repeatJobKey then + fields[#fields+1] = 'rjk' + fields[#fields+1] = repeatJobKey + end + rcall('DEL', deduplicationNextKey) + rcall('HSET', deduplicationNextKey, unpack(fields)) + -- Ensure the dedup key does not expire while the job is active, + -- so subsequent adds always hit the dedup path and never bypass + -- the active-check because of a TTL expiry. + local deduplicationKey = prefix .. "de:" .. deduplicationId + rcall('PERSIST', deduplicationKey) + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return true + end + end + return false +end +local function deduplicateJobWithoutReplace(deduplicationId, deduplicationOpts, jobId, deduplicationKey, + eventsKey, maxEvents, prefix, jobName, jobData, fullOpts, + parentKey, parentData, parentDependenciesKey, repeatJobKey) + local ttl = deduplicationOpts['ttl'] + local deduplicationKeyExists + if ttl and ttl > 0 then + if deduplicationOpts['extend'] then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if currentDebounceJobId then + if storeDeduplicatedNextJob(deduplicationOpts, currentDebounceJobId, prefix, + deduplicationId, jobName, jobData, fullOpts, eventsKey, maxEvents, jobId, + parentKey, parentData, parentDependenciesKey, repeatJobKey) then + return currentDebounceJobId + end + if deduplicationOpts['keepLastIfActive'] then + rcall('SET', deduplicationKey, currentDebounceJobId) + else + setDeduplicationKey(deduplicationKey, currentDebounceJobId, deduplicationOpts) + end + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", + "jobId", currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return currentDebounceJobId + else + if deduplicationOpts['keepLastIfActive'] then + rcall('SET', deduplicationKey, jobId) + else + setDeduplicationKey(deduplicationKey, jobId, deduplicationOpts) + end + return + end + else + if deduplicationOpts['keepLastIfActive'] then + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'NX') + else + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'PX', ttl, 'NX') + end + end + else + deduplicationKeyExists = not rcall('SET', deduplicationKey, jobId, 'NX') + end + if deduplicationKeyExists then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if storeDeduplicatedNextJob(deduplicationOpts, currentDebounceJobId, prefix, + deduplicationId, jobName, jobData, fullOpts, eventsKey, maxEvents, jobId, + parentKey, parentData, parentDependenciesKey, repeatJobKey) then + return currentDebounceJobId + end + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + currentDebounceJobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + currentDebounceJobId, "deduplicationId", deduplicationId, "deduplicatedJobId", jobId) + return currentDebounceJobId + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +local function removeDelayedJob(delayedKey, deduplicationKey, eventsKey, maxEvents, currentDeduplicatedJobId, + jobId, deduplicationId, prefix) + if rcall("ZREM", delayedKey, currentDeduplicatedJobId) > 0 then + removeJobKeys(prefix .. currentDeduplicatedJobId) + rcall("XADD", eventsKey, "*", "event", "removed", "jobId", currentDeduplicatedJobId, + "prev", "delayed") + -- TODO remove debounced event in next breaking change + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "debounced", "jobId", + jobId, "debounceId", deduplicationId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "deduplicated", "jobId", + jobId, "deduplicationId", deduplicationId, "deduplicatedJobId", currentDeduplicatedJobId) + return true + end + return false +end +local function deduplicateJob(deduplicationOpts, jobId, delayedKey, deduplicationKey, eventsKey, maxEvents, + prefix, jobName, jobData, fullOpts, parentKey, parentData, parentDependenciesKey, repeatJobKey) + local deduplicationId = deduplicationOpts and deduplicationOpts['id'] + if deduplicationId then + if deduplicationOpts['replace'] then + local currentDebounceJobId = rcall('GET', deduplicationKey) + if currentDebounceJobId then + local isRemoved = removeDelayedJob(delayedKey, deduplicationKey, eventsKey, maxEvents, + currentDebounceJobId, jobId, deduplicationId, prefix) + if isRemoved then + if deduplicationOpts['keepLastIfActive'] then + rcall('SET', deduplicationKey, jobId) + else + local ttl = deduplicationOpts['ttl'] + if not deduplicationOpts['extend'] and ttl and ttl > 0 then + rcall('SET', deduplicationKey, jobId, 'KEEPTTL') + else + setDeduplicationKey(deduplicationKey, jobId, deduplicationOpts) + end + end + return + else + storeDeduplicatedNextJob(deduplicationOpts, currentDebounceJobId, prefix, + deduplicationId, jobName, jobData, fullOpts, eventsKey, maxEvents, jobId, + parentKey, parentData, parentDependenciesKey, repeatJobKey) + return currentDebounceJobId + end + else + if deduplicationOpts['keepLastIfActive'] then + rcall('SET', deduplicationKey, jobId) + else + setDeduplicationKey(deduplicationKey, jobId, deduplicationOpts) + end + return + end + else + return deduplicateJobWithoutReplace(deduplicationId, deduplicationOpts, + jobId, deduplicationKey, eventsKey, maxEvents, prefix, jobName, jobData, fullOpts, + parentKey, parentData, parentDependenciesKey, repeatJobKey) + end + end +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +--[[ + Function to handle the case when job is duplicated. +]] +-- Includes +--[[ + This function is used to update the parent's dependencies if the job + is already completed and about to be ignored. The parent must get its + dependencies updated to avoid the parent job being stuck forever in + the waiting-children state. +]] +-- Includes +--[[ + Validate and move or add dependencies to parent. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) + if no pending dependencies. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) if needed. +]] +-- Includes +--[[ + Move parent to a wait status (wait, prioritized or delayed) +]] +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check if queue is paused or maxed + (since an empty list and !EXISTS are not really the same). +]] +local function isQueuePausedOrMaxed(queueMetaKey, activeKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency") + if queueAttributes[1] then + return true + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + return activeCount >= tonumber(queueAttributes[2]) + end + end + return false +end +local function moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + local parentWaitKey = parentQueueKey .. ":wait" + local parentPausedKey = parentQueueKey .. ":paused" + local parentActiveKey = parentQueueKey .. ":active" + local parentMetaKey = parentQueueKey .. ":meta" + local parentMarkerKey = parentQueueKey .. ":marker" + local jobAttributes = rcall("HMGET", parentKey, "priority", "delay") + local priority = tonumber(jobAttributes[1]) or 0 + local delay = tonumber(jobAttributes[2]) or 0 + if delay > 0 then + local delayedTimestamp = tonumber(timestamp) + delay + local score = delayedTimestamp * 0x1000 + local parentDelayedKey = parentQueueKey .. ":delayed" + rcall("ZADD", parentDelayedKey, score, parentId) + rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed", "jobId", parentId, "delay", + delayedTimestamp) + addDelayMarkerIfNeeded(parentMarkerKey, parentDelayedKey) + else + if priority == 0 then + local parentTarget, isParentPausedOrMaxed = getTargetQueueList(parentMetaKey, parentActiveKey, + parentWaitKey, parentPausedKey) + addJobInTargetList(parentTarget, parentMarkerKey, "RPUSH", isParentPausedOrMaxed, parentId) + else + local isPausedOrMaxed = isQueuePausedOrMaxed(parentMetaKey, parentActiveKey) + addJobWithPriority(parentMarkerKey, parentQueueKey .. ":prioritized", priority, parentId, + parentQueueKey .. ":pc", isPausedOrMaxed) + end + rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting", "jobId", parentId, "prev", + "waiting-children") + end +end +local function moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + if rcall("EXISTS", parentKey) == 1 then + local parentWaitingChildrenKey = parentQueueKey .. ":waiting-children" + if rcall("ZSCORE", parentWaitingChildrenKey, parentId) then + rcall("ZREM", parentWaitingChildrenKey, parentId) + moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + end + end +end +local function moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, + parentId, timestamp) + local doNotHavePendingDependencies = rcall("SCARD", parentDependenciesKey) == 0 + if doNotHavePendingDependencies then + moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + end +end +local function updateParentDepsIfNeeded(parentKey, parentQueueKey, parentDependenciesKey, + parentId, jobIdKey, returnvalue, timestamp ) + local processedSet = parentKey .. ":processed" + rcall("HSET", processedSet, jobIdKey, returnvalue) + moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, parentId, timestamp) +end +local function updateExistingJobsParent(parentKey, parent, parentData, + parentDependenciesKey, completedKey, + jobIdKey, jobId, timestamp) + if parentKey ~= nil then + if rcall("ZSCORE", completedKey, jobId) then + local returnvalue = rcall("HGET", jobIdKey, "returnvalue") + updateParentDepsIfNeeded(parentKey, parent['queueKey'], + parentDependenciesKey, parent['id'], + jobIdKey, returnvalue, timestamp) + else + if parentDependenciesKey ~= nil then + rcall("SADD", parentDependenciesKey, jobIdKey) + end + end + rcall("HMSET", jobIdKey, "parentKey", parentKey, "parent", parentData) + end +end +local function handleDuplicatedJob(jobKey, jobId, currentParentKey, currentParent, + parentData, parentDependenciesKey, completedKey, eventsKey, maxEvents, timestamp) + local existedParentKey = rcall("HGET", jobKey, "parentKey") + if not existedParentKey or existedParentKey == currentParentKey then + updateExistingJobsParent(currentParentKey, currentParent, parentData, + parentDependenciesKey, completedKey, jobKey, + jobId, timestamp) + else + if currentParentKey ~= nil and currentParentKey ~= existedParentKey + and (rcall("EXISTS", existedParentKey) == 1) then + return -7 + end + end + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", + "duplicated", "jobId", jobId) + return jobId .. "" -- convert to string +end +--[[ + Function to store a job +]] +local function storeJob(eventsKey, jobIdKey, jobId, name, data, opts, timestamp, + parentKey, parentData, repeatJobKey) + local jsonOpts = cjson.encode(opts) + local delay = opts['delay'] or 0 + local priority = opts['priority'] or 0 + local debounceId = opts['de'] and opts['de']['id'] + local optionalValues = {} + if parentKey ~= nil then + table.insert(optionalValues, "parentKey") + table.insert(optionalValues, parentKey) + table.insert(optionalValues, "parent") + table.insert(optionalValues, parentData) + end + if repeatJobKey then + table.insert(optionalValues, "rjk") + table.insert(optionalValues, repeatJobKey) + end + if debounceId then + table.insert(optionalValues, "deid") + table.insert(optionalValues, debounceId) + end + rcall("HMSET", jobIdKey, "name", name, "data", data, "opts", jsonOpts, + "timestamp", timestamp, "delay", delay, "priority", priority, + unpack(optionalValues)) + rcall("XADD", eventsKey, "*", "event", "added", "jobId", jobId, "name", name) + return delay, priority +end +if parentKey ~= nil then + if rcall("EXISTS", parentKey) ~= 1 then return -5 end + parentData = cjson.encode(parent) +end +local jobCounter = rcall("INCR", KEYS[4]) +local metaKey = KEYS[3] +local maxEvents = getOrSetMaxEvents(metaKey) +local parentDependenciesKey = args[6] +local timestamp = args[4] +if args[2] == "" then + jobId = jobCounter .. "" -- convert to string + jobIdKey = args[1] .. jobId +else + jobId = args[2] + jobIdKey = args[1] .. jobId + if rcall("EXISTS", jobIdKey) == 1 then + return handleDuplicatedJob(jobIdKey, jobId, parentKey, parent, + parentData, parentDependenciesKey, KEYS[5], eventsKey, + maxEvents, timestamp) + end +end +local deduplicationJobId = deduplicateJob(opts['de'], jobId, KEYS[6], + deduplicationKey, eventsKey, maxEvents, args[1], args[3], ARGV[2], opts, + parentKey, parentData, parentDependenciesKey, repeatJobKey) +if deduplicationJobId then + return deduplicationJobId +end +-- Store the job. +storeJob(eventsKey, jobIdKey, jobId, args[3], ARGV[2], opts, timestamp, + parentKey, parentData, repeatJobKey) +local target, isPausedOrMaxed = getTargetQueueList(metaKey, KEYS[7], KEYS[1], KEYS[2]) +-- LIFO or FIFO +local pushCmd = opts['lifo'] and 'RPUSH' or 'LPUSH' +addJobInTargetList(target, KEYS[9], pushCmd, isPausedOrMaxed, jobId) +-- Emit waiting event +rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "waiting", + "jobId", jobId) +-- Check if this job is a child of another job, if so add it to the parents dependencies +if parentDependenciesKey ~= nil then + rcall("SADD", parentDependenciesKey, jobIdKey) +end +return jobId +`; + exports2.addStandardJob = { + name: "addStandardJob", + content, + keys: 9 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/changeDelay-4.js +var require_changeDelay_4 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/changeDelay-4.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.changeDelay = void 0; + var content = `--[[ + Change job delay when it is in delayed set. + Input: + KEYS[1] delayed key + KEYS[2] meta key + KEYS[3] marker key + KEYS[4] events stream + ARGV[1] delay + ARGV[2] timestamp + ARGV[3] the id of the job + ARGV[4] job key + Output: + 0 - OK + -1 - Missing job. + -3 - Job not in delayed set. + Events: + - delayed key. +]] +local rcall = redis.call +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Bake in the job id first 12 bits into the timestamp + to guarantee correct execution order of delayed jobs + (up to 4096 jobs per given timestamp or 4096 jobs apart per timestamp) + WARNING: Jobs that are so far apart that they wrap around will cause FIFO to fail +]] +local function getDelayedScore(delayedKey, timestamp, delay) + local delayedTimestamp = (delay > 0 and (tonumber(timestamp) + delay)) or tonumber(timestamp) + local minScore = delayedTimestamp * 0x1000 + local maxScore = (delayedTimestamp + 1 ) * 0x1000 - 1 + local result = rcall("ZREVRANGEBYSCORE", delayedKey, maxScore, + minScore, "WITHSCORES","LIMIT", 0, 1) + if #result then + local currentMaxScore = tonumber(result[2]) + if currentMaxScore ~= nil then + if currentMaxScore >= maxScore then + return maxScore, delayedTimestamp + else + return currentMaxScore + 1, delayedTimestamp + end + end + end + return minScore, delayedTimestamp +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +if rcall("EXISTS", ARGV[4]) == 1 then + local jobId = ARGV[3] + local delay = tonumber(ARGV[1]) + local score, delayedTimestamp = getDelayedScore(KEYS[1], ARGV[2], delay) + local numRemovedElements = rcall("ZREM", KEYS[1], jobId) + if numRemovedElements < 1 then + return -3 + end + rcall("HSET", ARGV[4], "delay", delay) + rcall("ZADD", KEYS[1], score, jobId) + local maxEvents = getOrSetMaxEvents(KEYS[2]) + rcall("XADD", KEYS[4], "MAXLEN", "~", maxEvents, "*", "event", "delayed", + "jobId", jobId, "delay", delayedTimestamp) + -- mark that a delayed job is available + addDelayMarkerIfNeeded(KEYS[3], KEYS[1]) + return 0 +else + return -1 +end`; + exports2.changeDelay = { + name: "changeDelay", + content, + keys: 4 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/changePriority-7.js +var require_changePriority_7 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/changePriority-7.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.changePriority = void 0; + var content = `--[[ + Change job priority + Input: + KEYS[1] 'wait', + KEYS[2] 'paused' + KEYS[3] 'meta' + KEYS[4] 'prioritized' + KEYS[5] 'active' + KEYS[6] 'pc' priority counter + KEYS[7] 'marker' + ARGV[1] priority value + ARGV[2] prefix key + ARGV[3] job id + ARGV[4] lifo + Output: + 0 - OK + -1 - Missing job +]] +local jobId = ARGV[3] +local jobKey = ARGV[2] .. jobId +local priority = tonumber(ARGV[1]) +local rcall = redis.call +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +--[[ + Function to push back job considering priority in front of same prioritized jobs. +]] +local function pushBackJobWithPriority(prioritizedKey, priority, jobId) + -- in order to put it at front of same prioritized jobs + -- we consider prioritized counter as 0 + local score = priority * 0x100000000 + rcall("ZADD", prioritizedKey, score, jobId) +end +local function reAddJobWithNewPriority( prioritizedKey, markerKey, targetKey, + priorityCounter, lifo, priority, jobId, isPausedOrMaxed) + if priority == 0 then + local pushCmd = lifo and 'RPUSH' or 'LPUSH' + addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + else + if lifo then + pushBackJobWithPriority(prioritizedKey, priority, jobId) + else + addJobWithPriority(markerKey, prioritizedKey, priority, jobId, + priorityCounter, isPausedOrMaxed) + end + end +end +if rcall("EXISTS", jobKey) == 1 then + local metaKey = KEYS[3] + local target, isPausedOrMaxed = getTargetQueueList(metaKey, KEYS[5], KEYS[1], KEYS[2]) + local prioritizedKey = KEYS[4] + local priorityCounterKey = KEYS[6] + local markerKey = KEYS[7] + -- Re-add with the new priority + if rcall("ZREM", prioritizedKey, jobId) > 0 then + reAddJobWithNewPriority( prioritizedKey, markerKey, target, + priorityCounterKey, ARGV[4] == '1', priority, jobId, isPausedOrMaxed) + elseif rcall("LREM", target, -1, jobId) > 0 then + reAddJobWithNewPriority( prioritizedKey, markerKey, target, + priorityCounterKey, ARGV[4] == '1', priority, jobId, isPausedOrMaxed) + end + rcall("HSET", jobKey, "priority", priority) + return 0 +else + return -1 +end +`; + exports2.changePriority = { + name: "changePriority", + content, + keys: 7 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/cleanJobsInSet-3.js +var require_cleanJobsInSet_3 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/cleanJobsInSet-3.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cleanJobsInSet = void 0; + var content = `--[[ + Remove jobs from the specific set. + Input: + KEYS[1] set key, + KEYS[2] events stream key + KEYS[3] repeat key + ARGV[1] jobKey prefix + ARGV[2] timestamp + ARGV[3] limit the number of jobs to be removed. 0 is unlimited + ARGV[4] set name, can be any of 'wait', 'active', 'paused', 'delayed', 'completed', or 'failed' +]] +local rcall = redis.call +local repeatKey = KEYS[3] +local rangeStart = 0 +local rangeEnd = -1 +local limit = tonumber(ARGV[3]) +-- If we're only deleting _n_ items, avoid retrieving all items +-- for faster performance +-- +-- Start from the tail of the list, since that's where oldest elements +-- are generally added for FIFO lists +if limit > 0 then + rangeStart = -1 - limit + 1 + rangeEnd = -1 +end +-- Includes +--[[ + Function to clean job list. + Returns jobIds and deleted count number. +]] +-- Includes +--[[ + Function to get the latest saved timestamp. +]] +local function getTimestamp(jobKey, attributes) + if #attributes == 1 then + return rcall("HGET", jobKey, attributes[1]) + end + local jobTs + for _, ts in ipairs(rcall("HMGET", jobKey, unpack(attributes))) do + if (ts) then + jobTs = ts + break + end + end + return jobTs +end +--[[ + Function to check if the job belongs to a job scheduler and + current delayed job matches with jobId +]] +local function isJobSchedulerJob(jobId, jobKey, jobSchedulersKey) + local repeatJobKey = rcall("HGET", jobKey, "rjk") + if repeatJobKey then + local prevMillis = rcall("ZSCORE", jobSchedulersKey, repeatJobKey) + if prevMillis then + local currentDelayedJobId = "repeat:" .. repeatJobKey .. ":" .. prevMillis + return jobId == currentDelayedJobId + end + end + return false +end +--[[ + Function to remove job. +]] +-- Includes +--[[ + Function to remove deduplication key if needed + when a job is being removed. +]] +local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey, + jobId, deduplicationId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + rcall("DEL", deduplicationKey) + -- Also clean up any pending dedup-next data for this dedup ID + rcall("DEL", prefixKey .. "dn:" .. deduplicationId) + return 1 + end + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +local function removeJob(jobId, hard, baseKey, shouldRemoveDeduplicationKey) + local jobKey = baseKey .. jobId + removeParentDependencyKey(jobKey, hard, nil, baseKey) + if shouldRemoveDeduplicationKey then + local deduplicationId = rcall("HGET", jobKey, "deid") + removeDeduplicationKeyIfNeededOnRemoval(baseKey, jobId, deduplicationId) + end + removeJobKeys(jobKey) +end +local function cleanList(listKey, jobKeyPrefix, rangeStart, rangeEnd, + timestamp, isWaiting, jobSchedulersKey) + local jobs = rcall("LRANGE", listKey, rangeStart, rangeEnd) + local deleted = {} + local deletedCount = 0 + local jobTS + local deletionMarker = '' + local jobIdsLen = #jobs + for i, job in ipairs(jobs) do + if limit > 0 and deletedCount >= limit then + break + end + local jobKey = jobKeyPrefix .. job + if (isWaiting or rcall("EXISTS", jobKey .. ":lock") == 0) and + not isJobSchedulerJob(job, jobKey, jobSchedulersKey) then + -- Find the right timestamp of the job to compare to maxTimestamp: + -- * finishedOn says when the job was completed, but it isn't set unless the job has actually completed + -- * processedOn represents when the job was last attempted, but it doesn't get populated until + -- the job is first tried + -- * timestamp is the original job submission time + -- Fetch all three of these (in that order) and use the first one that is set so that we'll leave jobs + -- that have been active within the grace period: + jobTS = getTimestamp(jobKey, {"finishedOn", "processedOn", "timestamp"}) + if (not jobTS or jobTS <= timestamp) then + -- replace the entry with a deletion marker; the actual deletion will + -- occur at the end of the script + rcall("LSET", listKey, rangeEnd - jobIdsLen + i, deletionMarker) + removeJob(job, true, jobKeyPrefix, true --[[remove debounce key]]) + deletedCount = deletedCount + 1 + table.insert(deleted, job) + end + end + end + rcall("LREM", listKey, 0, deletionMarker) + return {deleted, deletedCount} +end +--[[ + Function to clean job set. + Returns jobIds and deleted count number. +]] +-- Includes +--[[ + Function to loop in batches. + Just a bit of warning, some commands as ZREM + could receive a maximum of 7000 parameters per call. +]] +local function batches(n, batchSize) + local i = 0 + return function() + local from = i * batchSize + 1 + i = i + 1 + if (from <= n) then + local to = math.min(from + batchSize - 1, n) + return from, to + end + end +end +--[[ + We use ZRANGEBYSCORE to make the case where we're deleting a limited number + of items in a sorted set only run a single iteration. If we simply used + ZRANGE, we may take a long time traversing through jobs that are within the + grace period. +]] +local function getJobsInZset(zsetKey, rangeEnd, limit) + if limit > 0 then + return rcall("ZRANGEBYSCORE", zsetKey, 0, rangeEnd, "LIMIT", 0, limit) + else + return rcall("ZRANGEBYSCORE", zsetKey, 0, rangeEnd) + end +end +local function cleanSet( + setKey, + jobKeyPrefix, + rangeEnd, + timestamp, + limit, + attributes, + isFinished, + jobSchedulersKey) + local jobs = getJobsInZset(setKey, rangeEnd, limit) + local deleted = {} + local deletedCount = 0 + local jobTS + for i, job in ipairs(jobs) do + if limit > 0 and deletedCount >= limit then + break + end + local jobKey = jobKeyPrefix .. job + -- Extract a Job Scheduler Id from jobId ("repeat:job-scheduler-id:millis") + -- and check if it is in the scheduled jobs + if not (jobSchedulersKey and isJobSchedulerJob(job, jobKey, jobSchedulersKey)) then + if isFinished then + removeJob(job, true, jobKeyPrefix, true --[[remove debounce key]] ) + deletedCount = deletedCount + 1 + table.insert(deleted, job) + else + -- * finishedOn says when the job was completed, but it isn't set unless the job has actually completed + jobTS = getTimestamp(jobKey, attributes) + if (not jobTS or jobTS <= timestamp) then + removeJob(job, true, jobKeyPrefix, true --[[remove debounce key]] ) + deletedCount = deletedCount + 1 + table.insert(deleted, job) + end + end + end + end + if (#deleted > 0) then + for from, to in batches(#deleted, 7000) do + rcall("ZREM", setKey, unpack(deleted, from, to)) + end + end + return {deleted, deletedCount} +end +local result +if ARGV[4] == "active" then + result = cleanList(KEYS[1], ARGV[1], rangeStart, rangeEnd, ARGV[2], false --[[ hasFinished ]], + repeatKey) +elseif ARGV[4] == "delayed" then + rangeEnd = "+inf" + result = cleanSet(KEYS[1], ARGV[1], rangeEnd, ARGV[2], limit, + {"processedOn", "timestamp"}, false --[[ hasFinished ]], repeatKey) +elseif ARGV[4] == "prioritized" then + rangeEnd = "+inf" + result = cleanSet(KEYS[1], ARGV[1], rangeEnd, ARGV[2], limit, + {"timestamp"}, false --[[ hasFinished ]], repeatKey) +elseif ARGV[4] == "wait" or ARGV[4] == "paused" then + result = cleanList(KEYS[1], ARGV[1], rangeStart, rangeEnd, ARGV[2], true --[[ hasFinished ]], + repeatKey) +else + rangeEnd = ARGV[2] + -- No need to pass repeat key as in that moment job won't be related to a job scheduler + result = cleanSet(KEYS[1], ARGV[1], rangeEnd, ARGV[2], limit, + {"finishedOn"}, true --[[ hasFinished ]]) +end +rcall("XADD", KEYS[2], "*", "event", "cleaned", "count", result[2]) +return result[1] +`; + exports2.cleanJobsInSet = { + name: "cleanJobsInSet", + content, + keys: 3 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/drain-5.js +var require_drain_5 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/drain-5.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.drain = void 0; + var content = `--[[ + Drains the queue, removes all jobs that are waiting + or delayed, but not active, completed or failed + Input: + KEYS[1] 'wait', + KEYS[2] 'paused' + KEYS[3] 'delayed' + KEYS[4] 'prioritized' + KEYS[5] 'jobschedulers' (repeat) + ARGV[1] queue key prefix + ARGV[2] should clean delayed jobs +]] +local rcall = redis.call +local queueBaseKey = ARGV[1] +--[[ + Functions to remove jobs. +]] +-- Includes +--[[ + Function to filter out jobs to ignore from a table. +]] +local function filterOutJobsToIgnore(jobs, jobsToIgnore) + local filteredJobs = {} + for i = 1, #jobs do + if not jobsToIgnore[jobs[i]] then + table.insert(filteredJobs, jobs[i]) + end + end + return filteredJobs +end +--[[ + Functions to remove jobs. +]] +-- Includes +--[[ + Function to remove job. +]] +-- Includes +--[[ + Function to remove deduplication key if needed + when a job is being removed. +]] +local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey, + jobId, deduplicationId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + rcall("DEL", deduplicationKey) + -- Also clean up any pending dedup-next data for this dedup ID + rcall("DEL", prefixKey .. "dn:" .. deduplicationId) + return 1 + end + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +local function removeJob(jobId, hard, baseKey, shouldRemoveDeduplicationKey) + local jobKey = baseKey .. jobId + removeParentDependencyKey(jobKey, hard, nil, baseKey) + if shouldRemoveDeduplicationKey then + local deduplicationId = rcall("HGET", jobKey, "deid") + removeDeduplicationKeyIfNeededOnRemoval(baseKey, jobId, deduplicationId) + end + removeJobKeys(jobKey) +end +local function removeJobs(keys, hard, baseKey, max) + for i, key in ipairs(keys) do + removeJob(key, hard, baseKey, true --[[remove debounce key]]) + end + return max - #keys +end +local function getListItems(keyName, max) + return rcall('LRANGE', keyName, 0, max - 1) +end +local function removeListJobs(keyName, hard, baseKey, max, jobsToIgnore) + local jobs = getListItems(keyName, max) + if jobsToIgnore then + jobs = filterOutJobsToIgnore(jobs, jobsToIgnore) + end + local count = removeJobs(jobs, hard, baseKey, max) + rcall("LTRIM", keyName, #jobs, -1) + return count +end +-- Includes +--[[ + Function to loop in batches. + Just a bit of warning, some commands as ZREM + could receive a maximum of 7000 parameters per call. +]] +local function batches(n, batchSize) + local i = 0 + return function() + local from = i * batchSize + 1 + i = i + 1 + if (from <= n) then + local to = math.min(from + batchSize - 1, n) + return from, to + end + end +end +--[[ + Function to get ZSet items. +]] +local function getZSetItems(keyName, max) + return rcall('ZRANGE', keyName, 0, max - 1) +end +local function removeZSetJobs(keyName, hard, baseKey, max, jobsToIgnore) + local jobs = getZSetItems(keyName, max) + if jobsToIgnore then + jobs = filterOutJobsToIgnore(jobs, jobsToIgnore) + end + local count = removeJobs(jobs, hard, baseKey, max) + if(#jobs > 0) then + for from, to in batches(#jobs, 7000) do + rcall("ZREM", keyName, unpack(jobs, from, to)) + end + end + return count +end +-- We must not remove delayed jobs if they are associated to a job scheduler. +local scheduledJobs = {} +local jobSchedulers = rcall("ZRANGE", KEYS[5], 0, -1, "WITHSCORES") +-- For every job scheduler, get the current delayed job id. +for i = 1, #jobSchedulers, 2 do + local jobSchedulerId = jobSchedulers[i] + local jobSchedulerMillis = jobSchedulers[i + 1] + local delayedJobId = "repeat:" .. jobSchedulerId .. ":" .. jobSchedulerMillis + scheduledJobs[delayedJobId] = true +end +removeListJobs(KEYS[1], true, queueBaseKey, 0, scheduledJobs) -- wait +removeListJobs(KEYS[2], true, queueBaseKey, 0, scheduledJobs) -- paused +if ARGV[2] == "1" then + removeZSetJobs(KEYS[3], true, queueBaseKey, 0, scheduledJobs) -- delayed +end +removeZSetJobs(KEYS[4], true, queueBaseKey, 0, scheduledJobs) -- prioritized +`; + exports2.drain = { + name: "drain", + content, + keys: 5 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/extendLock-2.js +var require_extendLock_2 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/extendLock-2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.extendLock = void 0; + var content = `--[[ + Extend lock and removes the job from the stalled set. + Input: + KEYS[1] 'lock', + KEYS[2] 'stalled' + ARGV[1] token + ARGV[2] lock duration in milliseconds + ARGV[3] jobid + Output: + "1" if lock extended successfully. +]] +local rcall = redis.call +if rcall("GET", KEYS[1]) == ARGV[1] then + -- if rcall("SET", KEYS[1], ARGV[1], "PX", ARGV[2], "XX") then + if rcall("SET", KEYS[1], ARGV[1], "PX", ARGV[2]) then + rcall("SREM", KEYS[2], ARGV[3]) + return 1 + end +end +return 0 +`; + exports2.extendLock = { + name: "extendLock", + content, + keys: 2 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/extendLocks-1.js +var require_extendLocks_1 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/extendLocks-1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.extendLocks = void 0; + var content = `--[[ + Extend locks for multiple jobs and remove them from the stalled set if successful. + Return the list of job IDs for which the operation failed. + KEYS[1] = stalled key + ARGV[1] = baseKey + ARGV[2] = tokens + ARGV[3] = jobIds + ARGV[4] = lockDuration (ms) + Output: + An array of failed job IDs. If empty, all succeeded. +]] +local rcall = redis.call +local stalledKey = KEYS[1] +local baseKey = ARGV[1] +local tokens = cmsgpack.unpack(ARGV[2]) +local jobIds = cmsgpack.unpack(ARGV[3]) +local lockDuration = ARGV[4] +local jobCount = #jobIds +local failedJobs = {} +for i = 1, jobCount, 1 do + local lockKey = baseKey .. jobIds[i] .. ':lock' + local jobId = jobIds[i] + local token = tokens[i] + local currentToken = rcall("GET", lockKey) + if currentToken then + if currentToken == token then + local setResult = rcall("SET", lockKey, token, "PX", lockDuration) + if setResult then + rcall("SREM", stalledKey, jobId) + else + table.insert(failedJobs, jobId) + end + else + table.insert(failedJobs, jobId) + end + else + table.insert(failedJobs, jobId) + end +end +return failedJobs +`; + exports2.extendLocks = { + name: "extendLocks", + content, + keys: 1 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getCounts-1.js +var require_getCounts_1 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getCounts-1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCounts = void 0; + var content = `--[[ + Get counts per provided states + Input: + KEYS[1] 'prefix' + ARGV[1...] types +]] +local rcall = redis.call; +local prefix = KEYS[1] +local results = {} +for i = 1, #ARGV do + local stateKey = prefix .. ARGV[i] + if ARGV[i] == "wait" or ARGV[i] == "paused" then + -- Markers in waitlist DEPRECATED in v5: Remove in v6. + local marker = rcall("LINDEX", stateKey, -1) + if marker and string.sub(marker, 1, 2) == "0:" then + local count = rcall("LLEN", stateKey) + if count > 1 then + rcall("RPOP", stateKey) + results[#results+1] = count-1 + else + results[#results+1] = 0 + end + else + results[#results+1] = rcall("LLEN", stateKey) + end + elseif ARGV[i] == "active" then + results[#results+1] = rcall("LLEN", stateKey) + else + results[#results+1] = rcall("ZCARD", stateKey) + end +end +return results +`; + exports2.getCounts = { + name: "getCounts", + content, + keys: 1 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getCountsPerPriority-4.js +var require_getCountsPerPriority_4 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getCountsPerPriority-4.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCountsPerPriority = void 0; + var content = `--[[ + Get counts per provided states + Input: + KEYS[1] wait key + KEYS[2] paused key + KEYS[3] meta key + KEYS[4] prioritized key + ARGV[1...] priorities +]] +local rcall = redis.call +local results = {} +local waitKey = KEYS[1] +local pausedKey = KEYS[2] +local prioritizedKey = KEYS[4] +-- Includes +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function isQueuePaused(queueMetaKey) + return rcall("HEXISTS", queueMetaKey, "paused") == 1 +end +for i = 1, #ARGV do + local priority = tonumber(ARGV[i]) + if priority == 0 then + if isQueuePaused(KEYS[3]) then + results[#results+1] = rcall("LLEN", pausedKey) + else + results[#results+1] = rcall("LLEN", waitKey) + end + else + results[#results+1] = rcall("ZCOUNT", prioritizedKey, + priority * 0x100000000, (priority + 1) * 0x100000000 - 1) + end +end +return results +`; + exports2.getCountsPerPriority = { + name: "getCountsPerPriority", + content, + keys: 4 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getDependencyCounts-4.js +var require_getDependencyCounts_4 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getDependencyCounts-4.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDependencyCounts = void 0; + var content = `--[[ + Get counts per child states + Input: + KEYS[1] processed key + KEYS[2] unprocessed key + KEYS[3] ignored key + KEYS[4] failed key + ARGV[1...] types +]] +local rcall = redis.call; +local processedKey = KEYS[1] +local unprocessedKey = KEYS[2] +local ignoredKey = KEYS[3] +local failedKey = KEYS[4] +local results = {} +for i = 1, #ARGV do + if ARGV[i] == "processed" then + results[#results+1] = rcall("HLEN", processedKey) + elseif ARGV[i] == "unprocessed" then + results[#results+1] = rcall("SCARD", unprocessedKey) + elseif ARGV[i] == "ignored" then + results[#results+1] = rcall("HLEN", ignoredKey) + else + results[#results+1] = rcall("ZCARD", failedKey) + end +end +return results +`; + exports2.getDependencyCounts = { + name: "getDependencyCounts", + content, + keys: 4 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getJobScheduler-1.js +var require_getJobScheduler_1 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getJobScheduler-1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getJobScheduler = void 0; + var content = `--[[ + Get job scheduler record. + Input: + KEYS[1] 'repeat' key + ARGV[1] id +]] +local rcall = redis.call +local jobSchedulerKey = KEYS[1] .. ":" .. ARGV[1] +local score = rcall("ZSCORE", KEYS[1], ARGV[1]) +if score then + return {rcall("HGETALL", jobSchedulerKey), score} -- get job data +end +return {nil, nil} +`; + exports2.getJobScheduler = { + name: "getJobScheduler", + content, + keys: 1 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getJobs-1.js +var require_getJobs_1 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getJobs-1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getJobs = void 0; + var content = `--[[ + Get jobs (id + data) for the provided states. + Job ids and their hashes are read in the same script so that ids whose hash + disappears after the id is read (but before the job is loaded) do not appear + in the result set. Ids without a job hash (for example the deprecated wait + list marker entry stored in the list) are skipped. For bounded ranges the + script iterates forward using the range offset as a cursor to backfill + skipped ids, preserving the requested page size when possible. + Input: + KEYS[1] 'prefix' + ARGV[1] start + ARGV[2] end + ARGV[3] asc ('1' | '0') + ARGV[4] max iterations (backfill bound) + ARGV[5...] types + Output: + results grouped per requested type; each entry is a + {jobId, {field, value, ...}} tuple +]] +local rcall = redis.call +local prefix = KEYS[1] +local rangeStart = tonumber(ARGV[1]) +local rangeEnd = tonumber(ARGV[2]) +local asc = ARGV[3] == "1" +local max_iterations = tonumber(ARGV[4]) +local results = {} +local function isListType(stateType) + return stateType == "wait" or stateType == "paused" or stateType == "active" +end +-- Fetch a slice of ids for the given state respecting the requested order. +local function fetchIds(stateKey, stateType, sliceStart, sliceEnd, listLength) + if isListType(stateType) then + if asc then + local modifiedRangeStart + local modifiedRangeEnd + if sliceStart == -1 then + modifiedRangeStart = 0 + else + modifiedRangeStart = -(sliceStart + 1) + end + if sliceEnd == -1 then + modifiedRangeEnd = 0 + else + modifiedRangeEnd = -(sliceEnd + 1) + end + -- Ascending list slices use negative indexes. When the whole window is + -- beyond the list length Redis clamps both indexes to 0 and LRANGE would + -- return the head element, so guard against out-of-range slices with LLEN. + if listLength ~= nil and sliceStart >= 0 and sliceEnd >= 0 and sliceStart >= listLength then + return {} + end + local ids = rcall("LRANGE", stateKey, modifiedRangeEnd, modifiedRangeStart) + local reversed = {} + for i = #ids, 1, -1 do + reversed[#reversed + 1] = ids[i] + end + return reversed + else + return rcall("LRANGE", stateKey, sliceStart, sliceEnd) + end + else + if asc then + return rcall("ZRANGE", stateKey, sliceStart, sliceEnd) + else + return rcall("ZREVRANGE", stateKey, sliceStart, sliceEnd) + end + end +end +-- Fetch the job hash for an id and append it when present. +local function appendJob(entries, jobId) + local jobData = rcall("HGETALL", prefix .. jobId) + if #jobData > 0 then + entries[#entries + 1] = {jobId, jobData} + end +end +local function cleanupDeprecatedMarker(stateKey, stateType) + if stateType == "wait" or stateType == "paused" then + local marker = rcall("LINDEX", stateKey, -1) + if marker and string.sub(marker, 1, 2) == "0:" then + local count = rcall("LLEN", stateKey) + if count > 1 then + rcall("RPOP", stateKey) + return count - 1 + end + return 0 + end + end +end +local function collectJobs(stateKey, stateType) + local entries = {} + local listLength + local cleanedListLength = cleanupDeprecatedMarker(stateKey, stateType) + if asc and isListType(stateType) and rangeStart >= 0 and rangeEnd >= 0 then + if cleanedListLength ~= nil then + listLength = cleanedListLength + else + listLength = rcall("LLEN", stateKey) + end + end + -- Unbounded or negative ranges: fetch the exact window and skip missing ids. + if rangeStart < 0 or rangeEnd < 0 then + local ids = fetchIds(stateKey, stateType, rangeStart, rangeEnd, listLength) + for i = 1, #ids do + appendJob(entries, ids[i]) + end + return entries + end + -- Bounded range: iterate forward to backfill skipped ids. + local needed = rangeEnd - rangeStart + 1 + local cursor = rangeStart + local iterations = 0 + while #entries < needed and iterations < max_iterations do + local ids = fetchIds(stateKey, stateType, cursor, cursor + needed - 1, listLength) + if #ids == 0 then + break + end + for i = 1, #ids do + if #entries >= needed then + break + end + appendJob(entries, ids[i]) + end + cursor = cursor + #ids + iterations = iterations + 1 + end + return entries +end +for i = 5, #ARGV do + local stateType = ARGV[i] + local stateKey = prefix .. stateType + results[#results + 1] = collectJobs(stateKey, stateType) +end +return results +`; + exports2.getJobs = { + name: "getJobs", + content, + keys: 1 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getMetrics-2.js +var require_getMetrics_2 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getMetrics-2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getMetrics = void 0; + var content = `--[[ + Get metrics + Input: + KEYS[1] 'metrics' key + KEYS[2] 'metrics data' key + ARGV[1] start index + ARGV[2] end index +]] +local rcall = redis.call; +local metricsKey = KEYS[1] +local dataKey = KEYS[2] +local metrics = rcall("HMGET", metricsKey, "count", "prevTS", "prevCount") +local data = rcall("LRANGE", dataKey, tonumber(ARGV[1]), tonumber(ARGV[2])) +local numPoints = rcall("LLEN", dataKey) +return {metrics, data, numPoints} +`; + exports2.getMetrics = { + name: "getMetrics", + content, + keys: 2 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getRanges-1.js +var require_getRanges_1 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getRanges-1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRanges = void 0; + var content = `--[[ + Get job ids per provided states + Input: + KEYS[1] 'prefix' + ARGV[1] start + ARGV[2] end + ARGV[3] asc + ARGV[4...] types +]] +local rcall = redis.call +local prefix = KEYS[1] +local rangeStart = tonumber(ARGV[1]) +local rangeEnd = tonumber(ARGV[2]) +local asc = ARGV[3] +local results = {} +local function getRangeInList(listKey, asc, rangeStart, rangeEnd, results) + if asc == "1" then + local modifiedRangeStart + local modifiedRangeEnd + if rangeStart == -1 then + modifiedRangeStart = 0 + else + modifiedRangeStart = -(rangeStart + 1) + end + if rangeEnd == -1 then + modifiedRangeEnd = 0 + else + modifiedRangeEnd = -(rangeEnd + 1) + end + results[#results+1] = rcall("LRANGE", listKey, + modifiedRangeEnd, + modifiedRangeStart) + else + results[#results+1] = rcall("LRANGE", listKey, rangeStart, rangeEnd) + end +end +for i = 4, #ARGV do + local stateKey = prefix .. ARGV[i] + if ARGV[i] == "wait" or ARGV[i] == "paused" then + -- Markers in waitlist DEPRECATED in v5: Remove in v6. + local marker = rcall("LINDEX", stateKey, -1) + if marker and string.sub(marker, 1, 2) == "0:" then + local count = rcall("LLEN", stateKey) + if count > 1 then + rcall("RPOP", stateKey) + getRangeInList(stateKey, asc, rangeStart, rangeEnd, results) + else + results[#results+1] = {} + end + else + getRangeInList(stateKey, asc, rangeStart, rangeEnd, results) + end + elseif ARGV[i] == "active" then + getRangeInList(stateKey, asc, rangeStart, rangeEnd, results) + else + if asc == "1" then + results[#results+1] = rcall("ZRANGE", stateKey, rangeStart, rangeEnd) + else + results[#results+1] = rcall("ZREVRANGE", stateKey, rangeStart, rangeEnd) + end + end +end +return results +`; + exports2.getRanges = { + name: "getRanges", + content, + keys: 1 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getRateLimitTtl-2.js +var require_getRateLimitTtl_2 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getRateLimitTtl-2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRateLimitTtl = void 0; + var content = `--[[ + Get rate limit ttl + Input: + KEYS[1] 'limiter' + KEYS[2] 'meta' + ARGV[1] maxJobs +]] +local rcall = redis.call +-- Includes +--[[ + Function to get current rate limit ttl. +]] +local function getRateLimitTTL(maxJobs, rateLimiterKey) + if maxJobs and maxJobs <= tonumber(rcall("GET", rateLimiterKey) or 0) then + local pttl = rcall("PTTL", rateLimiterKey) + if pttl == 0 then + rcall("DEL", rateLimiterKey) + end + if pttl > 0 then + return pttl + end + end + return 0 +end +local rateLimiterKey = KEYS[1] +if ARGV[1] ~= "0" then + return getRateLimitTTL(tonumber(ARGV[1]), rateLimiterKey) +else + local rateLimitMax = rcall("HGET", KEYS[2], "max") + if rateLimitMax then + return getRateLimitTTL(tonumber(rateLimitMax), rateLimiterKey) + end + return rcall("PTTL", rateLimiterKey) +end +`; + exports2.getRateLimitTtl = { + name: "getRateLimitTtl", + content, + keys: 2 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getState-8.js +var require_getState_8 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getState-8.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getState = void 0; + var content = `--[[ + Get a job state + Input: + KEYS[1] 'completed' key, + KEYS[2] 'failed' key + KEYS[3] 'delayed' key + KEYS[4] 'active' key + KEYS[5] 'wait' key + KEYS[6] 'paused' key + KEYS[7] 'waiting-children' key + KEYS[8] 'prioritized' key + ARGV[1] job id + Output: + 'completed' + 'failed' + 'delayed' + 'active' + 'prioritized' + 'waiting' + 'waiting-children' + 'unknown' +]] +local rcall = redis.call +if rcall("ZSCORE", KEYS[1], ARGV[1]) then + return "completed" +end +if rcall("ZSCORE", KEYS[2], ARGV[1]) then + return "failed" +end +if rcall("ZSCORE", KEYS[3], ARGV[1]) then + return "delayed" +end +if rcall("ZSCORE", KEYS[8], ARGV[1]) then + return "prioritized" +end +-- Includes +--[[ + Function to check if an item belongs to a list. +]] +local function checkItemInList(list, item) + for _, v in pairs(list) do + if v == item then + return 1 + end + end + return nil +end +local active_items = rcall("LRANGE", KEYS[4] , 0, -1) +if checkItemInList(active_items, ARGV[1]) ~= nil then + return "active" +end +local wait_items = rcall("LRANGE", KEYS[5] , 0, -1) +if checkItemInList(wait_items, ARGV[1]) ~= nil then + return "waiting" +end +local paused_items = rcall("LRANGE", KEYS[6] , 0, -1) +if checkItemInList(paused_items, ARGV[1]) ~= nil then + return "waiting" +end +if rcall("ZSCORE", KEYS[7], ARGV[1]) then + return "waiting-children" +end +return "unknown" +`; + exports2.getState = { + name: "getState", + content, + keys: 8 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getStateV2-8.js +var require_getStateV2_8 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/getStateV2-8.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getStateV2 = void 0; + var content = `--[[ + Get a job state + Input: + KEYS[1] 'completed' key, + KEYS[2] 'failed' key + KEYS[3] 'delayed' key + KEYS[4] 'active' key + KEYS[5] 'wait' key + KEYS[6] 'paused' key + KEYS[7] 'waiting-children' key + KEYS[8] 'prioritized' key + ARGV[1] job id + Output: + 'completed' + 'failed' + 'delayed' + 'active' + 'waiting' + 'waiting-children' + 'unknown' +]] +local rcall = redis.call +if rcall("ZSCORE", KEYS[1], ARGV[1]) then + return "completed" +end +if rcall("ZSCORE", KEYS[2], ARGV[1]) then + return "failed" +end +if rcall("ZSCORE", KEYS[3], ARGV[1]) then + return "delayed" +end +if rcall("ZSCORE", KEYS[8], ARGV[1]) then + return "prioritized" +end +if rcall("LPOS", KEYS[4] , ARGV[1]) then + return "active" +end +if rcall("LPOS", KEYS[5] , ARGV[1]) then + return "waiting" +end +if rcall("LPOS", KEYS[6] , ARGV[1]) then + return "waiting" +end +if rcall("ZSCORE", KEYS[7] , ARGV[1]) then + return "waiting-children" +end +return "unknown" +`; + exports2.getStateV2 = { + name: "getStateV2", + content, + keys: 8 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/isFinished-3.js +var require_isFinished_3 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/isFinished-3.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isFinished = void 0; + var content = `--[[ + Checks if a job is finished (.i.e. is in the completed or failed set) + Input: + KEYS[1] completed key + KEYS[2] failed key + KEYS[3] job key + ARGV[1] job id + ARGV[2] return value? + Output: + 0 - Not finished. + 1 - Completed. + 2 - Failed. + -1 - Missing job. +]] +local rcall = redis.call +if rcall("EXISTS", KEYS[3]) ~= 1 then + if ARGV[2] == "1" then + return {-1,"Missing key for job " .. KEYS[3] .. ". isFinished"} + end + return -1 +end +if rcall("ZSCORE", KEYS[1], ARGV[1]) then + if ARGV[2] == "1" then + local returnValue = rcall("HGET", KEYS[3], "returnvalue") + return {1,returnValue} + end + return 1 +end +if rcall("ZSCORE", KEYS[2], ARGV[1]) then + if ARGV[2] == "1" then + local failedReason = rcall("HGET", KEYS[3], "failedReason") + return {2,failedReason} + end + return 2 +end +if ARGV[2] == "1" then + return {0} +end +return 0 +`; + exports2.isFinished = { + name: "isFinished", + content, + keys: 3 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/isJobInList-1.js +var require_isJobInList_1 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/isJobInList-1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isJobInList = void 0; + var content = `--[[ + Checks if job is in a given list. + Input: + KEYS[1] + ARGV[1] + Output: + 1 if element found in the list. +]] +-- Includes +--[[ + Function to check if an item belongs to a list. +]] +local function checkItemInList(list, item) + for _, v in pairs(list) do + if v == item then + return 1 + end + end + return nil +end +local items = redis.call("LRANGE", KEYS[1] , 0, -1) +return checkItemInList(items, ARGV[1]) +`; + exports2.isJobInList = { + name: "isJobInList", + content, + keys: 1 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/isMaxed-2.js +var require_isMaxed_2 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/isMaxed-2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isMaxed = void 0; + var content = `--[[ + Checks if queue is maxed. + Input: + KEYS[1] meta key + KEYS[2] active key + Output: + 1 if element found in the list. +]] +local rcall = redis.call +-- Includes +--[[ + Function to check if queue is maxed or not. +]] +local function isQueueMaxed(queueMetaKey, activeKey) + local maxConcurrency = rcall("HGET", queueMetaKey, "concurrency") + if maxConcurrency then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(maxConcurrency) then + return true + end + end + return false +end +return isQueueMaxed(KEYS[1], KEYS[2]) +`; + exports2.isMaxed = { + name: "isMaxed", + content, + keys: 2 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/moveJobFromActiveToWait-9.js +var require_moveJobFromActiveToWait_9 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/moveJobFromActiveToWait-9.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.moveJobFromActiveToWait = void 0; + var content = `--[[ + Function to move job from active state to wait. + Input: + KEYS[1] active key + KEYS[2] wait key + KEYS[3] stalled key + KEYS[4] paused key + KEYS[5] meta key + KEYS[6] limiter key + KEYS[7] prioritized key + KEYS[8] marker key + KEYS[9] event key + ARGV[1] job id + ARGV[2] lock token + ARGV[3] job id key +]] +local rcall = redis.call +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to push back job considering priority in front of same prioritized jobs. +]] +local function pushBackJobWithPriority(prioritizedKey, priority, jobId) + -- in order to put it at front of same prioritized jobs + -- we consider prioritized counter as 0 + local score = priority * 0x100000000 + rcall("ZADD", prioritizedKey, score, jobId) +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function removeLock(jobKey, stalledKey, token, jobId) + if token ~= "0" then + local lockKey = jobKey .. ':lock' + local lockToken = rcall("GET", lockKey) + if lockToken == token then + rcall("DEL", lockKey) + rcall("SREM", stalledKey, jobId) + else + if lockToken then + -- Lock exists but token does not match + return -6 + else + -- Lock is missing completely + return -2 + end + end + end + return 0 +end +local jobId = ARGV[1] +local token = ARGV[2] +local jobKey = ARGV[3] +if rcall("EXISTS", jobKey) == 0 then + return -1 +end +local errorCode = removeLock(jobKey, KEYS[3], token, jobId) +if errorCode < 0 then + return errorCode +end +local metaKey = KEYS[5] +local removed = rcall("LREM", KEYS[1], 1, jobId) +if removed > 0 then + local target, isPausedOrMaxed = getTargetQueueList(metaKey, KEYS[1], KEYS[2], KEYS[4]) + local priority = tonumber(rcall("HGET", ARGV[3], "priority")) or 0 + if priority > 0 then + pushBackJobWithPriority(KEYS[7], priority, jobId) + else + addJobInTargetList(target, KEYS[8], "RPUSH", isPausedOrMaxed, jobId) + end + local maxEvents = getOrSetMaxEvents(metaKey) + -- Emit waiting event + rcall("XADD", KEYS[9], "MAXLEN", "~", maxEvents, "*", "event", "waiting", + "jobId", jobId, "prev", "active") +end +local pttl = rcall("PTTL", KEYS[6]) +if pttl > 0 then + return pttl +else + return 0 +end +`; + exports2.moveJobFromActiveToWait = { + name: "moveJobFromActiveToWait", + content, + keys: 9 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/moveJobsToWait-8.js +var require_moveJobsToWait_8 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/moveJobsToWait-8.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.moveJobsToWait = void 0; + var content = `--[[ + Move completed, failed or delayed jobs to wait. + Note: Does not support jobs with priorities. + Input: + KEYS[1] base key + KEYS[2] events stream + KEYS[3] state key (failed, completed, delayed) + KEYS[4] 'wait' + KEYS[5] 'paused' + KEYS[6] 'meta' + KEYS[7] 'active' + KEYS[8] 'marker' + ARGV[1] count + ARGV[2] timestamp + ARGV[3] prev state + Output: + 1 means the operation is not completed + 0 means the operation is completed +]] +local maxCount = tonumber(ARGV[1]) +local timestamp = tonumber(ARGV[2]) +local rcall = redis.call; +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +--[[ + Function to loop in batches. + Just a bit of warning, some commands as ZREM + could receive a maximum of 7000 parameters per call. +]] +local function batches(n, batchSize) + local i = 0 + return function() + local from = i * batchSize + 1 + i = i + 1 + if (from <= n) then + local to = math.min(from + batchSize - 1, n) + return from, to + end + end +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local metaKey = KEYS[6] +local target, isPausedOrMaxed = getTargetQueueList(metaKey, KEYS[7], KEYS[4], KEYS[5]) +local jobs = rcall('ZRANGEBYSCORE', KEYS[3], 0, timestamp, 'LIMIT', 0, maxCount) +if (#jobs > 0) then + if ARGV[3] == "failed" then + for i, key in ipairs(jobs) do + local jobKey = KEYS[1] .. key + rcall("HDEL", jobKey, "finishedOn", "processedOn", "failedReason") + end + elseif ARGV[3] == "completed" then + for i, key in ipairs(jobs) do + local jobKey = KEYS[1] .. key + rcall("HDEL", jobKey, "finishedOn", "processedOn", "returnvalue") + end + end + local maxEvents = getOrSetMaxEvents(metaKey) + for i, key in ipairs(jobs) do + -- Emit waiting event + rcall("XADD", KEYS[2], "MAXLEN", "~", maxEvents, "*", "event", + "waiting", "jobId", key, "prev", ARGV[3]); + end + for from, to in batches(#jobs, 7000) do + rcall("ZREM", KEYS[3], unpack(jobs, from, to)) + rcall("LPUSH", target, unpack(jobs, from, to)) + end + addBaseMarkerIfNeeded(KEYS[8], isPausedOrMaxed) +end +maxCount = maxCount - #jobs +if (maxCount <= 0) then return 1 end +return 0 +`; + exports2.moveJobsToWait = { + name: "moveJobsToWait", + content, + keys: 8 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/moveStalledJobsToWait-9.js +var require_moveStalledJobsToWait_9 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/moveStalledJobsToWait-9.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.moveStalledJobsToWait = void 0; + var content = `--[[ + Move stalled jobs to wait. + Input: + KEYS[1] 'stalled' (SET) + KEYS[2] 'wait', (LIST) + KEYS[3] 'active', (LIST) + KEYS[4] 'stalled-check', (KEY) + KEYS[5] 'meta', (KEY) + KEYS[6] 'paused', (LIST) + KEYS[7] 'marker' + KEYS[8] 'event stream' (STREAM) + KEYS[9] 'repeat' key + ARGV[1] Max stalled job count + ARGV[2] queue.toKey('') + ARGV[3] timestamp + ARGV[4] max check time + Events: + 'stalled' with stalled job id. +]] +local rcall = redis.call +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to loop in batches. + Just a bit of warning, some commands as ZREM + could receive a maximum of 7000 parameters per call. +]] +local function batches(n, batchSize) + local i = 0 + return function() + local from = i * batchSize + 1 + i = i + 1 + if (from <= n) then + local to = math.min(from + batchSize - 1, n) + return from, to + end + end +end +--[[ + Function to move job to wait to be picked up by a waiting worker. +]] +-- Includes +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function moveJobToWait(metaKey, activeKey, waitKey, pausedKey, markerKey, eventStreamKey, + jobId, pushCmd) + local target, isPausedOrMaxed = getTargetQueueList(metaKey, activeKey, waitKey, pausedKey) + addJobInTargetList(target, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall("XADD", eventStreamKey, "*", "event", "waiting", "jobId", jobId, 'prev', 'active') +end +--[[ + Function to trim events, default 10000. +]] +-- Includes +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +local function trimEvents(metaKey, eventStreamKey) + local maxEvents = getOrSetMaxEvents(metaKey) + if maxEvents then + rcall("XTRIM", eventStreamKey, "MAXLEN", "~", maxEvents) + else + rcall("XTRIM", eventStreamKey, "MAXLEN", "~", 10000) + end +end +local stalledKey = KEYS[1] +local waitKey = KEYS[2] +local activeKey = KEYS[3] +local stalledCheckKey = KEYS[4] +local metaKey = KEYS[5] +local pausedKey = KEYS[6] +local markerKey = KEYS[7] +local eventStreamKey = KEYS[8] +local repeatKey = KEYS[9] +local maxStalledJobCount = tonumber(ARGV[1]) +local queueKeyPrefix = ARGV[2] +local timestamp = ARGV[3] +local maxCheckTime = ARGV[4] +if rcall("EXISTS", stalledCheckKey) == 1 then + return {} +end +rcall("SET", stalledCheckKey, timestamp, "PX", maxCheckTime) +-- Trim events before emitting them to avoid trimming events emitted in this script +trimEvents(metaKey, eventStreamKey) +-- Move all stalled jobs to wait +local stalling = rcall('SMEMBERS', stalledKey) +local stalled = {} +if (#stalling > 0) then + rcall('DEL', stalledKey) + -- Remove from active list + for i, jobId in ipairs(stalling) do + -- Markers in waitlist DEPRECATED in v5: Remove in v6. + if string.sub(jobId, 1, 2) == "0:" then + -- If the jobId is a delay marker ID we just remove it. + rcall("LREM", activeKey, 1, jobId) + else + local jobKey = queueKeyPrefix .. jobId + -- Check that the lock is also missing, then we can handle this job as really stalled. + if (rcall("EXISTS", jobKey .. ":lock") == 0) then + -- Remove from the active queue. + local removed = rcall("LREM", activeKey, 1, jobId) + if (removed > 0) then + -- If this job has been stalled too many times, such as if it crashes the worker, then fail it. + local stalledCount = rcall("HINCRBY", jobKey, "stc", 1) + -- Check if this is a repeatable job by looking at job options + local jobSchedulerId = rcall("HGET", jobKey, "rjk") + local isRepeatableJob = false + if jobSchedulerId then + local schedulerKey = repeatKey .. ":" .. jobSchedulerId + if rcall("EXISTS", schedulerKey) == 1 then + isRepeatableJob = true + else + -- TODO: remove this check in v6, as it is only needed for legacy repeatable jobs + -- that stored the scheduler id in the job key but did not create the scheduler hash key + local prevMillis = rcall("ZSCORE", repeatKey, jobSchedulerId) + if prevMillis then + isRepeatableJob = true + end + end + end + -- Only fail job if it exceeds stall limit AND is not a repeatable job + if stalledCount > maxStalledJobCount and not isRepeatableJob then + local failedReason = "job stalled more than allowable limit" + rcall("HSET", jobKey, "defa", failedReason) + end + moveJobToWait(metaKey, activeKey, waitKey, pausedKey, markerKey, eventStreamKey, jobId, + "RPUSH") + -- Emit the stalled event + rcall("XADD", eventStreamKey, "*", "event", "stalled", "jobId", jobId) + table.insert(stalled, jobId) + end + end + end + end +end +-- Mark potentially stalled jobs +local active = rcall('LRANGE', activeKey, 0, -1) +if (#active > 0) then + for from, to in batches(#active, 7000) do + rcall('SADD', stalledKey, unpack(active, from, to)) + end +end +return stalled +`; + exports2.moveStalledJobsToWait = { + name: "moveStalledJobsToWait", + content, + keys: 9 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/moveToActive-11.js +var require_moveToActive_11 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/moveToActive-11.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.moveToActive = void 0; + var content = `--[[ + Move next job to be processed to active, lock it and fetch its data. The job + may be delayed, in that case we need to move it to the delayed set instead. + This operation guarantees that the worker owns the job during the lock + expiration time. The worker is responsible of keeping the lock fresh + so that no other worker picks this job again. + Input: + KEYS[1] wait key + KEYS[2] active key + KEYS[3] prioritized key + KEYS[4] stream events key + KEYS[5] stalled key + -- Rate limiting + KEYS[6] rate limiter key + KEYS[7] delayed key + -- Delayed jobs + KEYS[8] paused key + KEYS[9] meta key + KEYS[10] pc priority counter + -- Marker + KEYS[11] marker key + -- Arguments + ARGV[1] key prefix + ARGV[2] timestamp + ARGV[3] opts + opts - token - lock token + opts - lockDuration + opts - limiter + opts - name - worker name +]] +local rcall = redis.call +local waitKey = KEYS[1] +local activeKey = KEYS[2] +local eventStreamKey = KEYS[4] +local rateLimiterKey = KEYS[6] +local delayedKey = KEYS[7] +local opts = cmsgpack.unpack(ARGV[3]) +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +--[[ + Function to get current rate limit ttl. +]] +local function getRateLimitTTL(maxJobs, rateLimiterKey) + if maxJobs and maxJobs <= tonumber(rcall("GET", rateLimiterKey) or 0) then + local pttl = rcall("PTTL", rateLimiterKey) + if pttl == 0 then + rcall("DEL", rateLimiterKey) + end + if pttl > 0 then + return pttl + end + end + return 0 +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +--[[ + Function to move job from prioritized state to active. +]] +local function moveJobFromPrioritizedToActive(priorityKey, activeKey, priorityCounterKey) + local prioritizedJob = rcall("ZPOPMIN", priorityKey) + if #prioritizedJob > 0 then + rcall("LPUSH", activeKey, prioritizedJob[1]) + return prioritizedJob[1] + else + rcall("DEL", priorityCounterKey) + end +end +--[[ + Function to move job from wait state to active. + Input: + opts - token - lock token + opts - lockDuration + opts - limiter +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function prepareJobForProcessing(keyPrefix, rateLimiterKey, eventStreamKey, + jobId, processedOn, maxJobs, limiterDuration, markerKey, opts) + local jobKey = keyPrefix .. jobId + -- Check if we need to perform rate limiting. + if maxJobs then + local jobCounter = tonumber(rcall("INCR", rateLimiterKey)) + if jobCounter == 1 then + local integerDuration = math.floor(math.abs(limiterDuration)) + rcall("PEXPIRE", rateLimiterKey, integerDuration) + end + end + -- get a lock + if opts['token'] ~= "0" then + local lockKey = jobKey .. ':lock' + rcall("SET", lockKey, opts['token'], "PX", opts['lockDuration']) + end + local optionalValues = {} + if opts['name'] then + -- Set "processedBy" field to the worker name + table.insert(optionalValues, "pb") + table.insert(optionalValues, opts['name']) + end + rcall("XADD", eventStreamKey, "*", "event", "active", "jobId", jobId, "prev", "waiting") + rcall("HMSET", jobKey, "processedOn", processedOn, unpack(optionalValues)) + rcall("HINCRBY", jobKey, "ats", 1) + addBaseMarkerIfNeeded(markerKey, false) + -- rate limit delay must be 0 in this case to prevent adding more delay + -- when job that is moved to active needs to be processed + return {rcall("HGETALL", jobKey), jobId, 0, 0} -- get job data +end +--[[ + Updates the delay set, by moving delayed jobs that should + be processed now to "wait". + Events: + 'waiting' +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +-- Try to get as much as 1000 jobs at once +local function promoteDelayedJobs(delayedKey, markerKey, targetKey, prioritizedKey, + eventStreamKey, prefix, timestamp, priorityCounterKey, isPaused) + local jobs = rcall("ZRANGEBYSCORE", delayedKey, 0, (timestamp + 1) * 0x1000 - 1, "LIMIT", 0, 1000) + if (#jobs > 0) then + rcall("ZREM", delayedKey, unpack(jobs)) + for _, jobId in ipairs(jobs) do + local jobKey = prefix .. jobId + local priority = + tonumber(rcall("HGET", jobKey, "priority")) or 0 + if priority == 0 then + -- LIFO or FIFO + rcall("LPUSH", targetKey, jobId) + else + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + end + -- Emit waiting event + rcall("XADD", eventStreamKey, "*", "event", "waiting", "jobId", + jobId, "prev", "delayed") + rcall("HSET", jobKey, "delay", 0) + end + addBaseMarkerIfNeeded(markerKey, isPaused) + end +end +local target, isPausedOrMaxed, rateLimitMax, rateLimitDuration = getTargetQueueList(KEYS[9], + activeKey, waitKey, KEYS[8]) +-- Check if there are delayed jobs that we can move to wait. +local markerKey = KEYS[11] +promoteDelayedJobs(delayedKey, markerKey, target, KEYS[3], eventStreamKey, ARGV[1], + ARGV[2], KEYS[10], isPausedOrMaxed) +local maxJobs = tonumber(rateLimitMax or (opts['limiter'] and opts['limiter']['max'])) +local expireTime = getRateLimitTTL(maxJobs, rateLimiterKey) +-- Check if we are rate limited first. +if expireTime > 0 then return {0, 0, expireTime, 0} end +-- paused or maxed queue +if isPausedOrMaxed then return {0, 0, 0, 0} end +local limiterDuration = (opts['limiter'] and opts['limiter']['duration']) or rateLimitDuration +-- no job ID, try non-blocking move from wait to active +local jobId = rcall("RPOPLPUSH", waitKey, activeKey) +-- Markers in waitlist DEPRECATED in v5: Will be completely removed in v6. +if jobId and string.sub(jobId, 1, 2) == "0:" then + rcall("LREM", activeKey, 1, jobId) + jobId = rcall("RPOPLPUSH", waitKey, activeKey) +end +if jobId then + return prepareJobForProcessing(ARGV[1], rateLimiterKey, eventStreamKey, jobId, ARGV[2], + maxJobs, limiterDuration, markerKey, opts) +else + jobId = moveJobFromPrioritizedToActive(KEYS[3], activeKey, KEYS[10]) + if jobId then + return prepareJobForProcessing(ARGV[1], rateLimiterKey, eventStreamKey, jobId, ARGV[2], + maxJobs, limiterDuration, markerKey, opts) + end +end +-- Return the timestamp for the next delayed job if any. +local nextTimestamp = getNextDelayedTimestamp(delayedKey) +if nextTimestamp ~= nil then return {0, 0, 0, nextTimestamp} end +return {0, 0, 0, 0} +`; + exports2.moveToActive = { + name: "moveToActive", + content, + keys: 11 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/moveToDelayed-12.js +var require_moveToDelayed_12 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/moveToDelayed-12.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.moveToDelayed = void 0; + var content = `--[[ + Moves job from active to delayed set. + Input: + KEYS[1] marker key + KEYS[2] active key + KEYS[3] prioritized key + KEYS[4] delayed key + KEYS[5] job key + KEYS[6] events stream + KEYS[7] meta key + KEYS[8] stalled key + KEYS[9] wait key + KEYS[10] rate limiter key + KEYS[11] paused key + KEYS[12] pc priority counter + ARGV[1] key prefix + ARGV[2] timestamp + ARGV[3] the id of the job + ARGV[4] queue token + ARGV[5] delay value + ARGV[6] skip attempt + ARGV[7] optional job fields to update + ARGV[8] fetch next? + ARGV[9] opts + Output: + 0 - OK + -1 - Missing job. + -3 - Job not in active set. + Events: + - delayed key. +]] +local rcall = redis.call +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Function to fetch the next job to process. + Tries to get the next job to avoid an extra roundtrip if the queue is + not closing and not rate limited. + Input: + waitKey - wait list key + activeKey - active list key + prioritizedKey - prioritized sorted set key + eventStreamKey - event stream key + rateLimiterKey - rate limiter key + delayedKey - delayed sorted set key + pausedKey - paused list key + metaKey - meta hash key + pcKey - priority counter key + markerKey - marker key + prefix - keys prefix + timestamp - current timestamp + opts - options table: + token (required) - lock token used when locking jobs + lockDuration (required) - lock duration for acquired jobs + limiter (optional) - rate limiter options table (e.g. { max = number }) +]] +-- Includes +--[[ + Function to get current rate limit ttl. +]] +local function getRateLimitTTL(maxJobs, rateLimiterKey) + if maxJobs and maxJobs <= tonumber(rcall("GET", rateLimiterKey) or 0) then + local pttl = rcall("PTTL", rateLimiterKey) + if pttl == 0 then + rcall("DEL", rateLimiterKey) + end + if pttl > 0 then + return pttl + end + end + return 0 +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +--[[ + Function to move job from prioritized state to active. +]] +local function moveJobFromPrioritizedToActive(priorityKey, activeKey, priorityCounterKey) + local prioritizedJob = rcall("ZPOPMIN", priorityKey) + if #prioritizedJob > 0 then + rcall("LPUSH", activeKey, prioritizedJob[1]) + return prioritizedJob[1] + else + rcall("DEL", priorityCounterKey) + end +end +--[[ + Function to move job from wait state to active. + Input: + opts - token - lock token + opts - lockDuration + opts - limiter +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function prepareJobForProcessing(keyPrefix, rateLimiterKey, eventStreamKey, + jobId, processedOn, maxJobs, limiterDuration, markerKey, opts) + local jobKey = keyPrefix .. jobId + -- Check if we need to perform rate limiting. + if maxJobs then + local jobCounter = tonumber(rcall("INCR", rateLimiterKey)) + if jobCounter == 1 then + local integerDuration = math.floor(math.abs(limiterDuration)) + rcall("PEXPIRE", rateLimiterKey, integerDuration) + end + end + -- get a lock + if opts['token'] ~= "0" then + local lockKey = jobKey .. ':lock' + rcall("SET", lockKey, opts['token'], "PX", opts['lockDuration']) + end + local optionalValues = {} + if opts['name'] then + -- Set "processedBy" field to the worker name + table.insert(optionalValues, "pb") + table.insert(optionalValues, opts['name']) + end + rcall("XADD", eventStreamKey, "*", "event", "active", "jobId", jobId, "prev", "waiting") + rcall("HMSET", jobKey, "processedOn", processedOn, unpack(optionalValues)) + rcall("HINCRBY", jobKey, "ats", 1) + addBaseMarkerIfNeeded(markerKey, false) + -- rate limit delay must be 0 in this case to prevent adding more delay + -- when job that is moved to active needs to be processed + return {rcall("HGETALL", jobKey), jobId, 0, 0} -- get job data +end +--[[ + Updates the delay set, by moving delayed jobs that should + be processed now to "wait". + Events: + 'waiting' +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +-- Try to get as much as 1000 jobs at once +local function promoteDelayedJobs(delayedKey, markerKey, targetKey, prioritizedKey, + eventStreamKey, prefix, timestamp, priorityCounterKey, isPaused) + local jobs = rcall("ZRANGEBYSCORE", delayedKey, 0, (timestamp + 1) * 0x1000 - 1, "LIMIT", 0, 1000) + if (#jobs > 0) then + rcall("ZREM", delayedKey, unpack(jobs)) + for _, jobId in ipairs(jobs) do + local jobKey = prefix .. jobId + local priority = + tonumber(rcall("HGET", jobKey, "priority")) or 0 + if priority == 0 then + -- LIFO or FIFO + rcall("LPUSH", targetKey, jobId) + else + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + end + -- Emit waiting event + rcall("XADD", eventStreamKey, "*", "event", "waiting", "jobId", + jobId, "prev", "delayed") + rcall("HSET", jobKey, "delay", 0) + end + addBaseMarkerIfNeeded(markerKey, isPaused) + end +end +local function fetchNextJob(waitKey, activeKey, prioritizedKey, eventStreamKey, + rateLimiterKey, delayedKey, pausedKey, metaKey, pcKey, markerKey, prefix, + timestamp, opts) + local target, isPausedOrMaxed, rateLimitMax, rateLimitDuration = + getTargetQueueList(metaKey, activeKey, waitKey, pausedKey) + -- Check if there are delayed jobs that can be promoted + promoteDelayedJobs(delayedKey, markerKey, target, prioritizedKey, + eventStreamKey, prefix, timestamp, pcKey, isPausedOrMaxed) + local maxJobs = tonumber(rateLimitMax or (opts['limiter'] and opts['limiter']['max'])) + -- Check if we are rate limited first. + local expireTime = getRateLimitTTL(maxJobs, rateLimiterKey) + if expireTime > 0 then + return {0, 0, expireTime, 0} + end + -- paused or maxed queue + if isPausedOrMaxed then + return {0, 0, 0, 0} + end + local limiterDuration = (opts['limiter'] and opts['limiter']['duration']) or rateLimitDuration + local jobId = rcall("RPOPLPUSH", waitKey, activeKey) + if jobId then + -- Markers in waitlist DEPRECATED in v5: Remove in v6. + if string.sub(jobId, 1, 2) == "0:" then + rcall("LREM", activeKey, 1, jobId) + -- If jobId is special ID 0:delay (delay greater than 0), then there is no job to process + -- but if ID is 0:0, then there is at least 1 prioritized job to process + if jobId == "0:0" then + jobId = moveJobFromPrioritizedToActive(prioritizedKey, activeKey, pcKey) + return prepareJobForProcessing(prefix, rateLimiterKey, + eventStreamKey, jobId, timestamp, maxJobs, + limiterDuration, markerKey, opts) + end + else + return prepareJobForProcessing(prefix, rateLimiterKey, + eventStreamKey, jobId, timestamp, maxJobs, + limiterDuration, markerKey, opts) + end + else + jobId = moveJobFromPrioritizedToActive(prioritizedKey, activeKey, pcKey) + if jobId then + return prepareJobForProcessing(prefix, rateLimiterKey, + eventStreamKey, jobId, timestamp, maxJobs, + limiterDuration, markerKey, opts) + end + end + -- Return the timestamp for the next delayed job if any. + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- The result is guaranteed to be positive, since the + -- ZRANGEBYSCORE command would have return a job otherwise. + return {0, 0, 0, nextTimestamp} + end +end +--[[ + Bake in the job id first 12 bits into the timestamp + to guarantee correct execution order of delayed jobs + (up to 4096 jobs per given timestamp or 4096 jobs apart per timestamp) + WARNING: Jobs that are so far apart that they wrap around will cause FIFO to fail +]] +local function getDelayedScore(delayedKey, timestamp, delay) + local delayedTimestamp = (delay > 0 and (tonumber(timestamp) + delay)) or tonumber(timestamp) + local minScore = delayedTimestamp * 0x1000 + local maxScore = (delayedTimestamp + 1 ) * 0x1000 - 1 + local result = rcall("ZREVRANGEBYSCORE", delayedKey, maxScore, + minScore, "WITHSCORES","LIMIT", 0, 1) + if #result then + local currentMaxScore = tonumber(result[2]) + if currentMaxScore ~= nil then + if currentMaxScore >= maxScore then + return maxScore, delayedTimestamp + else + return currentMaxScore + 1, delayedTimestamp + end + end + end + return minScore, delayedTimestamp +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +local function removeLock(jobKey, stalledKey, token, jobId) + if token ~= "0" then + local lockKey = jobKey .. ':lock' + local lockToken = rcall("GET", lockKey) + if lockToken == token then + rcall("DEL", lockKey) + rcall("SREM", stalledKey, jobId) + else + if lockToken then + -- Lock exists but token does not match + return -6 + else + -- Lock is missing completely + return -2 + end + end + end + return 0 +end +--[[ + Function to update a bunch of fields in a job. +]] +local function updateJobFields(jobKey, msgpackedFields) + if msgpackedFields and #msgpackedFields > 0 then + local fieldsToUpdate = cmsgpack.unpack(msgpackedFields) + if fieldsToUpdate then + rcall("HMSET", jobKey, unpack(fieldsToUpdate)) + end + end +end +local jobKey = KEYS[5] +local markerKey = KEYS[1] +local metaKey = KEYS[7] +local token = ARGV[4] +if rcall("EXISTS", jobKey) == 1 then + local errorCode = removeLock(jobKey, KEYS[8], token, ARGV[3]) + if errorCode < 0 then + return errorCode + end + updateJobFields(jobKey, ARGV[7]) + local delayedKey = KEYS[4] + local jobId = ARGV[3] + local delay = tonumber(ARGV[5]) + local numRemovedElements = rcall("LREM", KEYS[2], -1, jobId) + if numRemovedElements < 1 then return -3 end + local score, delayedTimestamp = getDelayedScore(delayedKey, ARGV[2], delay) + if ARGV[6] == "0" then + rcall("HINCRBY", jobKey, "atm", 1) + end + rcall("HSET", jobKey, "delay", ARGV[5]) + local maxEvents = getOrSetMaxEvents(metaKey) + rcall("ZADD", delayedKey, score, jobId) + rcall("XADD", KEYS[6], "MAXLEN", "~", maxEvents, "*", "event", "delayed", + "jobId", jobId, "delay", delayedTimestamp) + -- Try to get next job to avoid an extra roundtrip if the queue is not closing, + -- and not rate limited. + if (ARGV[8] == "1") then + local opts = cmsgpack.unpack(ARGV[9]) + local result = fetchNextJob(KEYS[9], KEYS[2], KEYS[3], KEYS[6], + KEYS[10], KEYS[4], KEYS[11], metaKey, KEYS[12], markerKey, + ARGV[1], ARGV[2], opts) + if result and type(result[1]) == "table" then + return result + end + end + -- Check if we need to push a marker job to wake up sleeping workers. + addDelayMarkerIfNeeded(markerKey, delayedKey) + return 0 +else + return -1 +end +`; + exports2.moveToDelayed = { + name: "moveToDelayed", + content, + keys: 12 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/moveToFinished-14.js +var require_moveToFinished_14 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/moveToFinished-14.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.moveToFinished = void 0; + var content = `--[[ + Move job from active to a finished status (completed or failed) + A job can only be moved to completed if it was active. + The job must be locked before it can be moved to a finished status, + and the lock must be released in this script. + Input: + KEYS[1] wait key + KEYS[2] active key + KEYS[3] prioritized key + KEYS[4] event stream key + KEYS[5] stalled key + -- Rate limiting + KEYS[6] rate limiter key + KEYS[7] delayed key + KEYS[8] paused key + KEYS[9] meta key + KEYS[10] pc priority counter + KEYS[11] completed/failed key + KEYS[12] jobId key + KEYS[13] metrics key + KEYS[14] marker key + ARGV[1] jobId + ARGV[2] timestamp + ARGV[3] msg property returnvalue / failedReason + ARGV[4] return value / failed reason + ARGV[5] target (completed/failed) + ARGV[6] fetch next? + ARGV[7] keys prefix + ARGV[8] opts + ARGV[9] job fields to update + opts - token - lock token + opts - keepJobs + opts - lockDuration - lock duration in milliseconds + opts - attempts max attempts + opts - maxMetricsSize + opts - fpof - fail parent on fail + opts - cpof - continue parent on fail + opts - idof - ignore dependency on fail + opts - rdof - remove dependency on fail + opts - name - worker name + Output: + 0 OK + -1 Missing key. + -2 Missing lock. + -3 Job not in active set + -4 Job has pending children + -6 Lock is not owned by this client + -9 Job has failed children + Events: + 'completed/failed' +]] +local rcall = redis.call +--- Includes +--[[ + Functions to collect metrics based on a current and previous count of jobs. + Granularity is fixed at 1 minute. +]] +--[[ + Function to loop in batches. + Just a bit of warning, some commands as ZREM + could receive a maximum of 7000 parameters per call. +]] +local function batches(n, batchSize) + local i = 0 + return function() + local from = i * batchSize + 1 + i = i + 1 + if (from <= n) then + local to = math.min(from + batchSize - 1, n) + return from, to + end + end +end +local function collectMetrics(metaKey, dataPointsList, maxDataPoints, + timestamp) + -- Increment current count + local count = rcall("HINCRBY", metaKey, "count", 1) - 1 + -- Compute how many data points we need to add to the list, N. + local prevTS = rcall("HGET", metaKey, "prevTS") + if not prevTS then + -- If prevTS is nil, set it to the current timestamp + rcall("HSET", metaKey, "prevTS", timestamp, "prevCount", 0) + return + end + local N = math.min(math.floor(timestamp / 60000) - math.floor(prevTS / 60000), tonumber(maxDataPoints)) + if N > 0 then + local delta = count - rcall("HGET", metaKey, "prevCount") + -- If N > 1, add N-1 zeros to the list + if N > 1 then + local points = {} + points[1] = delta + for i = 2, N do + points[i] = 0 + end + for from, to in batches(#points, 7000) do + rcall("LPUSH", dataPointsList, unpack(points, from, to)) + end + else + -- LPUSH delta to the list + rcall("LPUSH", dataPointsList, delta) + end + -- LTRIM to keep list to its max size + rcall("LTRIM", dataPointsList, 0, maxDataPoints - 1) + -- update prev count with current count + rcall("HSET", metaKey, "prevCount", count, "prevTS", timestamp) + end +end +--[[ + Function to fetch the next job to process. + Tries to get the next job to avoid an extra roundtrip if the queue is + not closing and not rate limited. + Input: + waitKey - wait list key + activeKey - active list key + prioritizedKey - prioritized sorted set key + eventStreamKey - event stream key + rateLimiterKey - rate limiter key + delayedKey - delayed sorted set key + pausedKey - paused list key + metaKey - meta hash key + pcKey - priority counter key + markerKey - marker key + prefix - keys prefix + timestamp - current timestamp + opts - options table: + token (required) - lock token used when locking jobs + lockDuration (required) - lock duration for acquired jobs + limiter (optional) - rate limiter options table (e.g. { max = number }) +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +--[[ + Function to get current rate limit ttl. +]] +local function getRateLimitTTL(maxJobs, rateLimiterKey) + if maxJobs and maxJobs <= tonumber(rcall("GET", rateLimiterKey) or 0) then + local pttl = rcall("PTTL", rateLimiterKey) + if pttl == 0 then + rcall("DEL", rateLimiterKey) + end + if pttl > 0 then + return pttl + end + end + return 0 +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +--[[ + Function to move job from prioritized state to active. +]] +local function moveJobFromPrioritizedToActive(priorityKey, activeKey, priorityCounterKey) + local prioritizedJob = rcall("ZPOPMIN", priorityKey) + if #prioritizedJob > 0 then + rcall("LPUSH", activeKey, prioritizedJob[1]) + return prioritizedJob[1] + else + rcall("DEL", priorityCounterKey) + end +end +--[[ + Function to move job from wait state to active. + Input: + opts - token - lock token + opts - lockDuration + opts - limiter +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function prepareJobForProcessing(keyPrefix, rateLimiterKey, eventStreamKey, + jobId, processedOn, maxJobs, limiterDuration, markerKey, opts) + local jobKey = keyPrefix .. jobId + -- Check if we need to perform rate limiting. + if maxJobs then + local jobCounter = tonumber(rcall("INCR", rateLimiterKey)) + if jobCounter == 1 then + local integerDuration = math.floor(math.abs(limiterDuration)) + rcall("PEXPIRE", rateLimiterKey, integerDuration) + end + end + -- get a lock + if opts['token'] ~= "0" then + local lockKey = jobKey .. ':lock' + rcall("SET", lockKey, opts['token'], "PX", opts['lockDuration']) + end + local optionalValues = {} + if opts['name'] then + -- Set "processedBy" field to the worker name + table.insert(optionalValues, "pb") + table.insert(optionalValues, opts['name']) + end + rcall("XADD", eventStreamKey, "*", "event", "active", "jobId", jobId, "prev", "waiting") + rcall("HMSET", jobKey, "processedOn", processedOn, unpack(optionalValues)) + rcall("HINCRBY", jobKey, "ats", 1) + addBaseMarkerIfNeeded(markerKey, false) + -- rate limit delay must be 0 in this case to prevent adding more delay + -- when job that is moved to active needs to be processed + return {rcall("HGETALL", jobKey), jobId, 0, 0} -- get job data +end +--[[ + Updates the delay set, by moving delayed jobs that should + be processed now to "wait". + Events: + 'waiting' +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +-- Try to get as much as 1000 jobs at once +local function promoteDelayedJobs(delayedKey, markerKey, targetKey, prioritizedKey, + eventStreamKey, prefix, timestamp, priorityCounterKey, isPaused) + local jobs = rcall("ZRANGEBYSCORE", delayedKey, 0, (timestamp + 1) * 0x1000 - 1, "LIMIT", 0, 1000) + if (#jobs > 0) then + rcall("ZREM", delayedKey, unpack(jobs)) + for _, jobId in ipairs(jobs) do + local jobKey = prefix .. jobId + local priority = + tonumber(rcall("HGET", jobKey, "priority")) or 0 + if priority == 0 then + -- LIFO or FIFO + rcall("LPUSH", targetKey, jobId) + else + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + end + -- Emit waiting event + rcall("XADD", eventStreamKey, "*", "event", "waiting", "jobId", + jobId, "prev", "delayed") + rcall("HSET", jobKey, "delay", 0) + end + addBaseMarkerIfNeeded(markerKey, isPaused) + end +end +local function fetchNextJob(waitKey, activeKey, prioritizedKey, eventStreamKey, + rateLimiterKey, delayedKey, pausedKey, metaKey, pcKey, markerKey, prefix, + timestamp, opts) + local target, isPausedOrMaxed, rateLimitMax, rateLimitDuration = + getTargetQueueList(metaKey, activeKey, waitKey, pausedKey) + -- Check if there are delayed jobs that can be promoted + promoteDelayedJobs(delayedKey, markerKey, target, prioritizedKey, + eventStreamKey, prefix, timestamp, pcKey, isPausedOrMaxed) + local maxJobs = tonumber(rateLimitMax or (opts['limiter'] and opts['limiter']['max'])) + -- Check if we are rate limited first. + local expireTime = getRateLimitTTL(maxJobs, rateLimiterKey) + if expireTime > 0 then + return {0, 0, expireTime, 0} + end + -- paused or maxed queue + if isPausedOrMaxed then + return {0, 0, 0, 0} + end + local limiterDuration = (opts['limiter'] and opts['limiter']['duration']) or rateLimitDuration + local jobId = rcall("RPOPLPUSH", waitKey, activeKey) + if jobId then + -- Markers in waitlist DEPRECATED in v5: Remove in v6. + if string.sub(jobId, 1, 2) == "0:" then + rcall("LREM", activeKey, 1, jobId) + -- If jobId is special ID 0:delay (delay greater than 0), then there is no job to process + -- but if ID is 0:0, then there is at least 1 prioritized job to process + if jobId == "0:0" then + jobId = moveJobFromPrioritizedToActive(prioritizedKey, activeKey, pcKey) + return prepareJobForProcessing(prefix, rateLimiterKey, + eventStreamKey, jobId, timestamp, maxJobs, + limiterDuration, markerKey, opts) + end + else + return prepareJobForProcessing(prefix, rateLimiterKey, + eventStreamKey, jobId, timestamp, maxJobs, + limiterDuration, markerKey, opts) + end + else + jobId = moveJobFromPrioritizedToActive(prioritizedKey, activeKey, pcKey) + if jobId then + return prepareJobForProcessing(prefix, rateLimiterKey, + eventStreamKey, jobId, timestamp, maxJobs, + limiterDuration, markerKey, opts) + end + end + -- Return the timestamp for the next delayed job if any. + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- The result is guaranteed to be positive, since the + -- ZRANGEBYSCORE command would have return a job otherwise. + return {0, 0, 0, nextTimestamp} + end +end +--[[ + Function to recursively move from waitingChildren to failed. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) + if no pending dependencies. +]] +-- Includes +--[[ + Validate and move parent to a wait status (waiting, delayed or prioritized) if needed. +]] +-- Includes +--[[ + Move parent to a wait status (wait, prioritized or delayed) +]] +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Function to check if queue is paused or maxed + (since an empty list and !EXISTS are not really the same). +]] +local function isQueuePausedOrMaxed(queueMetaKey, activeKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency") + if queueAttributes[1] then + return true + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + return activeCount >= tonumber(queueAttributes[2]) + end + end + return false +end +local function moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + local parentWaitKey = parentQueueKey .. ":wait" + local parentPausedKey = parentQueueKey .. ":paused" + local parentActiveKey = parentQueueKey .. ":active" + local parentMetaKey = parentQueueKey .. ":meta" + local parentMarkerKey = parentQueueKey .. ":marker" + local jobAttributes = rcall("HMGET", parentKey, "priority", "delay") + local priority = tonumber(jobAttributes[1]) or 0 + local delay = tonumber(jobAttributes[2]) or 0 + if delay > 0 then + local delayedTimestamp = tonumber(timestamp) + delay + local score = delayedTimestamp * 0x1000 + local parentDelayedKey = parentQueueKey .. ":delayed" + rcall("ZADD", parentDelayedKey, score, parentId) + rcall("XADD", parentQueueKey .. ":events", "*", "event", "delayed", "jobId", parentId, "delay", + delayedTimestamp) + addDelayMarkerIfNeeded(parentMarkerKey, parentDelayedKey) + else + if priority == 0 then + local parentTarget, isParentPausedOrMaxed = getTargetQueueList(parentMetaKey, parentActiveKey, + parentWaitKey, parentPausedKey) + addJobInTargetList(parentTarget, parentMarkerKey, "RPUSH", isParentPausedOrMaxed, parentId) + else + local isPausedOrMaxed = isQueuePausedOrMaxed(parentMetaKey, parentActiveKey) + addJobWithPriority(parentMarkerKey, parentQueueKey .. ":prioritized", priority, parentId, + parentQueueKey .. ":pc", isPausedOrMaxed) + end + rcall("XADD", parentQueueKey .. ":events", "*", "event", "waiting", "jobId", parentId, "prev", + "waiting-children") + end +end +local function moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + if rcall("EXISTS", parentKey) == 1 then + local parentWaitingChildrenKey = parentQueueKey .. ":waiting-children" + if rcall("ZSCORE", parentWaitingChildrenKey, parentId) then + rcall("ZREM", parentWaitingChildrenKey, parentId) + moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + end + end +end +local function moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, + parentId, timestamp) + local doNotHavePendingDependencies = rcall("SCARD", parentDependenciesKey) == 0 + if doNotHavePendingDependencies then + moveParentToWaitIfNeeded(parentQueueKey, parentKey, parentId, timestamp) + end +end +local handleChildFailureAndMoveParentToWait = function (parentQueueKey, parentKey, parentId, jobIdKey, timestamp) + if rcall("EXISTS", parentKey) == 1 then + local parentWaitingChildrenKey = parentQueueKey .. ":waiting-children" + local parentDelayedKey = parentQueueKey .. ":delayed" + local parentWaitingChildrenOrDelayedKey + if rcall("ZSCORE", parentWaitingChildrenKey, parentId) then + parentWaitingChildrenOrDelayedKey = parentWaitingChildrenKey + elseif rcall("ZSCORE", parentDelayedKey, parentId) then + parentWaitingChildrenOrDelayedKey = parentDelayedKey + rcall("HSET", parentKey, "delay", 0) + end + if parentWaitingChildrenOrDelayedKey then + rcall("ZREM", parentWaitingChildrenOrDelayedKey, parentId) + local deferredFailure = "child " .. jobIdKey .. " failed" + rcall("HSET", parentKey, "defa", deferredFailure) + moveParentToWait(parentQueueKey, parentKey, parentId, timestamp) + else + if not rcall("ZSCORE", parentQueueKey .. ":failed", parentId) then + local deferredFailure = "child " .. jobIdKey .. " failed" + rcall("HSET", parentKey, "defa", deferredFailure) + end + end + end +end +local moveChildFromDependenciesIfNeeded = function (rawParentData, childKey, failedReason, timestamp) + if rawParentData then + local parentData = cjson.decode(rawParentData) + local parentKey = parentData['queueKey'] .. ':' .. parentData['id'] + local parentDependenciesChildrenKey = parentKey .. ":dependencies" + if parentData['fpof'] then + if rcall("SREM", parentDependenciesChildrenKey, childKey) == 1 then + local parentUnsuccessfulChildrenKey = parentKey .. ":unsuccessful" + rcall("ZADD", parentUnsuccessfulChildrenKey, timestamp, childKey) + handleChildFailureAndMoveParentToWait( + parentData['queueKey'], + parentKey, + parentData['id'], + childKey, + timestamp + ) + end + elseif parentData['cpof'] then + if rcall("SREM", parentDependenciesChildrenKey, childKey) == 1 then + local parentFailedChildrenKey = parentKey .. ":failed" + rcall("HSET", parentFailedChildrenKey, childKey, failedReason) + moveParentToWaitIfNeeded(parentData['queueKey'], parentKey, parentData['id'], timestamp) + end + elseif parentData['idof'] or parentData['rdof'] then + if rcall("SREM", parentDependenciesChildrenKey, childKey) == 1 then + moveParentToWaitIfNoPendingDependencies(parentData['queueKey'], parentDependenciesChildrenKey, + parentKey, parentData['id'], timestamp) + if parentData['idof'] then + local parentFailedChildrenKey = parentKey .. ":failed" + rcall("HSET", parentFailedChildrenKey, childKey, failedReason) + end + end + end + end +end +--[[ + Function to remove deduplication key if needed + when a job is moved to completed or failed states. +]] +local function removeDeduplicationKeyIfNeededOnFinalization(prefixKey, + deduplicationId, jobId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local pttl = rcall("PTTL", deduplicationKey) + if pttl == 0 then + return rcall("DEL", deduplicationKey) + end + if pttl == -1 then + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + return rcall("DEL", deduplicationKey) + end + end + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +--[[ + Functions to remove jobs by max age. +]] +-- Includes +--[[ + Function to remove job. +]] +-- Includes +--[[ + Function to remove deduplication key if needed + when a job is being removed. +]] +local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey, + jobId, deduplicationId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + rcall("DEL", deduplicationKey) + -- Also clean up any pending dedup-next data for this dedup ID + rcall("DEL", prefixKey .. "dn:" .. deduplicationId) + return 1 + end + end +end +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +local function removeJob(jobId, hard, baseKey, shouldRemoveDeduplicationKey) + local jobKey = baseKey .. jobId + removeParentDependencyKey(jobKey, hard, nil, baseKey) + if shouldRemoveDeduplicationKey then + local deduplicationId = rcall("HGET", jobKey, "deid") + removeDeduplicationKeyIfNeededOnRemoval(baseKey, jobId, deduplicationId) + end + removeJobKeys(jobKey) +end +local function removeJobsByMaxAge(timestamp, maxAge, targetSet, prefix, maxLimit) + local start = timestamp - maxAge * 1000 + local jobIds = rcall("ZREVRANGEBYSCORE", targetSet, start, "-inf", "LIMIT", 0, maxLimit) + for i, jobId in ipairs(jobIds) do + removeJob(jobId, false, prefix, false --[[remove debounce key]]) + end + if #jobIds > 0 then + if #jobIds < maxLimit then + rcall("ZREMRANGEBYSCORE", targetSet, "-inf", start) + else + for from, to in batches(#jobIds, 7000) do + rcall("ZREM", targetSet, unpack(jobIds, from, to)) + end + end + end +end +--[[ + Functions to remove jobs by max count. +]] +-- Includes +local function removeJobsByMaxCount(maxCount, targetSet, prefix) + local start = maxCount + local jobIds = rcall("ZREVRANGE", targetSet, start, -1) + for i, jobId in ipairs(jobIds) do + removeJob(jobId, false, prefix, false --[[remove debounce key]]) + end + rcall("ZREMRANGEBYRANK", targetSet, 0, -(maxCount + 1)) +end +local function removeLock(jobKey, stalledKey, token, jobId) + if token ~= "0" then + local lockKey = jobKey .. ':lock' + local lockToken = rcall("GET", lockKey) + if lockToken == token then + rcall("DEL", lockKey) + rcall("SREM", stalledKey, jobId) + else + if lockToken then + -- Lock exists but token does not match + return -6 + else + -- Lock is missing completely + return -2 + end + end + end + return 0 +end +--[[ + Function to create a new job from stored dedup-next data + when a deduplicated job with keepLastIfActive finishes. + At most one next job is created per deduplication ID. + Multiple triggers while active overwrite the dedup-next data, + so only the latest data is used. +]] +-- Includes +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to set the deduplication key for a job. + Uses TTL from deduplication opts if provided. +]] +local function setDeduplicationKey(deduplicationKey, jobId, deduplicationOpts) + local ttl = deduplicationOpts and deduplicationOpts['ttl'] + if ttl and ttl > 0 then + rcall('SET', deduplicationKey, jobId, 'PX', ttl) + else + rcall('SET', deduplicationKey, jobId) + end +end +--[[ + Shared helper to store a job and enqueue it into the appropriate list/set. + Handles delayed, prioritized, and standard (LIFO/FIFO) jobs. + Emits the appropriate event after enqueuing ("delayed" or "waiting"). + Returns delay, priority from storeJob. +]] +-- Includes +--[[ + Adds a delayed job to the queue by doing the following: + - Creates a new job key with the job data. + - adds to delayed zset. + - Emits a global event 'delayed' if the job is delayed. +]] +-- Includes +--[[ + Bake in the job id first 12 bits into the timestamp + to guarantee correct execution order of delayed jobs + (up to 4096 jobs per given timestamp or 4096 jobs apart per timestamp) + WARNING: Jobs that are so far apart that they wrap around will cause FIFO to fail +]] +local function getDelayedScore(delayedKey, timestamp, delay) + local delayedTimestamp = (delay > 0 and (tonumber(timestamp) + delay)) or tonumber(timestamp) + local minScore = delayedTimestamp * 0x1000 + local maxScore = (delayedTimestamp + 1 ) * 0x1000 - 1 + local result = rcall("ZREVRANGEBYSCORE", delayedKey, maxScore, + minScore, "WITHSCORES","LIMIT", 0, 1) + if #result then + local currentMaxScore = tonumber(result[2]) + if currentMaxScore ~= nil then + if currentMaxScore >= maxScore then + return maxScore, delayedTimestamp + else + return currentMaxScore + 1, delayedTimestamp + end + end + end + return minScore, delayedTimestamp +end +local function addDelayedJob(jobId, delayedKey, eventsKey, timestamp, + maxEvents, markerKey, delay) + local score, delayedTimestamp = getDelayedScore(delayedKey, timestamp, tonumber(delay)) + rcall("ZADD", delayedKey, score, jobId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "delayed", + "jobId", jobId, "delay", delayedTimestamp) + -- mark that a delayed job is available + addDelayMarkerIfNeeded(markerKey, delayedKey) +end +--[[ + Function to store a job +]] +local function storeJob(eventsKey, jobIdKey, jobId, name, data, opts, timestamp, + parentKey, parentData, repeatJobKey) + local jsonOpts = cjson.encode(opts) + local delay = opts['delay'] or 0 + local priority = opts['priority'] or 0 + local debounceId = opts['de'] and opts['de']['id'] + local optionalValues = {} + if parentKey ~= nil then + table.insert(optionalValues, "parentKey") + table.insert(optionalValues, parentKey) + table.insert(optionalValues, "parent") + table.insert(optionalValues, parentData) + end + if repeatJobKey then + table.insert(optionalValues, "rjk") + table.insert(optionalValues, repeatJobKey) + end + if debounceId then + table.insert(optionalValues, "deid") + table.insert(optionalValues, debounceId) + end + rcall("HMSET", jobIdKey, "name", name, "data", data, "opts", jsonOpts, + "timestamp", timestamp, "delay", delay, "priority", priority, + unpack(optionalValues)) + rcall("XADD", eventsKey, "*", "event", "added", "jobId", jobId, "name", name) + return delay, priority +end +local function storeAndEnqueueJob(eventsKey, jobIdKey, jobId, name, data, opts, + timestamp, parentKey, parentData, repeatJobKey, maxEvents, + waitKey, pausedKey, activeKey, metaKey, prioritizedKey, + priorityCounterKey, delayedKey, markerKey) + local delay, priority = storeJob(eventsKey, jobIdKey, jobId, name, data, + opts, timestamp, parentKey, parentData, repeatJobKey) + if delay ~= 0 and delayedKey then + addDelayedJob(jobId, delayedKey, eventsKey, timestamp, maxEvents, markerKey, delay) + else + local target, isPausedOrMaxed = getTargetQueueList(metaKey, activeKey, waitKey, pausedKey) + if priority > 0 then + addJobWithPriority(markerKey, prioritizedKey, priority, jobId, + priorityCounterKey, isPausedOrMaxed) + else + local pushCmd = opts['lifo'] and 'RPUSH' or 'LPUSH' + addJobInTargetList(target, markerKey, pushCmd, isPausedOrMaxed, jobId) + end + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "waiting", + "jobId", jobId) + end + return delay, priority +end +local function requeueDeduplicatedJob(prefix, deduplicationId, eventStreamKey, + metaKey, activeKey, waitKey, pausedKey, markerKey, prioritizedKey, + priorityCounterKey, delayedKey, timestamp) + local deduplicationNextKey = prefix .. "dn:" .. deduplicationId + if rcall("EXISTS", deduplicationNextKey) == 1 then + local nextData = rcall("HMGET", deduplicationNextKey, + "name", "data", "opts", "pk", "pd", "pdk", "rjk", "jid") + -- Always increment the counter to keep it monotonic + local nextId = rcall("INCR", prefix .. "id") .. "" + local storedJobId = nextData[8] -- index 8 = "jid" (8th field in the HMGET call above) + local newJobId + if storedJobId then + newJobId = storedJobId + else + newJobId = nextId + end + local newJobIdKey = prefix .. newJobId + local newOpts = cjson.decode(nextData[3]) + local deduplicationKey = prefix .. "de:" .. deduplicationId + local parentKey = nextData[4] or nil + local parentData = nextData[5] or nil + local parentDependenciesKey = nextData[6] or nil + local repeatJobKey = nextData[7] or nil + -- Set dedup key for the new job (without TTL when keepLastIfActive, + -- so the key outlives the job's active duration) + local deOpts = newOpts['de'] + if deOpts and deOpts['keepLastIfActive'] then + rcall('SET', deduplicationKey, newJobId) + else + setDeduplicationKey(deduplicationKey, newJobId, deOpts) + end + -- Store and enqueue using the shared helper (handles priority/lifo/delayed) + local maxEvents = getOrSetMaxEvents(metaKey) + storeAndEnqueueJob(eventStreamKey, newJobIdKey, newJobId, nextData[1], nextData[2], + newOpts, timestamp, parentKey, parentData, repeatJobKey, maxEvents, + waitKey, pausedKey, activeKey, metaKey, prioritizedKey, + priorityCounterKey, delayedKey, markerKey) + -- Register as child dependency if the job has a parent + if parentDependenciesKey then + rcall("SADD", parentDependenciesKey, newJobIdKey) + end + -- Only delete the dedup-next hash after the job is fully created, + -- so that if any step above errors, the data is not permanently lost. + rcall("DEL", deduplicationNextKey) + end +end +--[[ + Function to trim events, default 10000. +]] +-- Includes +local function trimEvents(metaKey, eventStreamKey) + local maxEvents = getOrSetMaxEvents(metaKey) + if maxEvents then + rcall("XTRIM", eventStreamKey, "MAXLEN", "~", maxEvents) + else + rcall("XTRIM", eventStreamKey, "MAXLEN", "~", 10000) + end +end +--[[ + Validate and move or add dependencies to parent. +]] +-- Includes +local function updateParentDepsIfNeeded(parentKey, parentQueueKey, parentDependenciesKey, + parentId, jobIdKey, returnvalue, timestamp ) + local processedSet = parentKey .. ":processed" + rcall("HSET", processedSet, jobIdKey, returnvalue) + moveParentToWaitIfNoPendingDependencies(parentQueueKey, parentDependenciesKey, parentKey, parentId, timestamp) +end +--[[ + Function to update a bunch of fields in a job. +]] +local function updateJobFields(jobKey, msgpackedFields) + if msgpackedFields and #msgpackedFields > 0 then + local fieldsToUpdate = cmsgpack.unpack(msgpackedFields) + if fieldsToUpdate then + rcall("HMSET", jobKey, unpack(fieldsToUpdate)) + end + end +end +local jobIdKey = KEYS[12] +if rcall("EXISTS", jobIdKey) == 1 then -- Make sure job exists + -- Make sure it does not have pending dependencies + -- It must happen before removing lock + if ARGV[5] == "completed" then + if rcall("SCARD", jobIdKey .. ":dependencies") ~= 0 then + return -4 + end + if rcall("ZCARD", jobIdKey .. ":unsuccessful") ~= 0 then + return -9 + end + end + local opts = cmsgpack.unpack(ARGV[8]) + local token = opts['token'] + local errorCode = removeLock(jobIdKey, KEYS[5], token, ARGV[1]) + if errorCode < 0 then + return errorCode + end + updateJobFields(jobIdKey, ARGV[9]); + local attempts = opts['attempts'] + local maxMetricsSize = opts['maxMetricsSize'] + local maxCount = opts['keepJobs']['count'] + local maxAge = opts['keepJobs']['age'] + local maxLimit = opts['keepJobs']['limit'] or 1000 + local jobAttributes = rcall("HMGET", jobIdKey, "parentKey", "parent", "deid") + local parentKey = jobAttributes[1] or "" + local parentId = "" + local parentQueueKey = "" + if jobAttributes[2] then -- TODO: need to revisit this logic if it's still needed + local jsonDecodedParent = cjson.decode(jobAttributes[2]) + parentId = jsonDecodedParent['id'] + parentQueueKey = jsonDecodedParent['queueKey'] + end + local jobId = ARGV[1] + local timestamp = ARGV[2] + -- Remove from active list (if not active we shall return error) + local numRemovedElements = rcall("LREM", KEYS[2], -1, jobId) + if (numRemovedElements < 1) then + return -3 + end + local eventStreamKey = KEYS[4] + local metaKey = KEYS[9] + -- Trim events before emitting them to avoid trimming events emitted in this script + trimEvents(metaKey, eventStreamKey) + local prefix = ARGV[7] + removeDeduplicationKeyIfNeededOnFinalization(prefix, jobAttributes[3], jobId) + -- Check if there is requeue data for this dedup ID (keepLastIfActive mode) + if jobAttributes[3] then + requeueDeduplicatedJob(prefix, jobAttributes[3], eventStreamKey, + metaKey, KEYS[2], KEYS[1], KEYS[8], KEYS[14], KEYS[3], KEYS[10], + KEYS[7], timestamp) + end + -- If job has a parent we need to + -- 1) remove this job id from parents dependencies + -- 2) move the job Id to parent "processed" set + -- 3) push the results into parent "results" list + -- 4) if parent's dependencies is empty, then move parent to "wait/paused". Note it may be a different queue!. + if parentId == "" and parentKey ~= "" then + parentId = getJobIdFromKey(parentKey) + parentQueueKey = getJobKeyPrefix(parentKey, ":" .. parentId) + end + if parentId ~= "" then + if ARGV[5] == "completed" then + local dependenciesSet = parentKey .. ":dependencies" + if rcall("SREM", dependenciesSet, jobIdKey) == 1 then + updateParentDepsIfNeeded(parentKey, parentQueueKey, dependenciesSet, parentId, jobIdKey, ARGV[4], + timestamp) + end + else + moveChildFromDependenciesIfNeeded(jobAttributes[2], jobIdKey, ARGV[4], timestamp) + end + end + local attemptsMade = rcall("HINCRBY", jobIdKey, "atm", 1) + -- Remove job? + if maxCount ~= 0 then + local targetSet = KEYS[11] + -- Add to complete/failed set + rcall("ZADD", targetSet, timestamp, jobId) + rcall("HSET", jobIdKey, ARGV[3], ARGV[4], "finishedOn", timestamp) + -- "returnvalue" / "failedReason" and "finishedOn" + if ARGV[5] == "failed" then + rcall("HDEL", jobIdKey, "defa") + end + -- Remove old jobs? + if maxAge ~= nil then + removeJobsByMaxAge(timestamp, maxAge, targetSet, prefix, maxLimit) + end + if maxCount ~= nil and maxCount > 0 then + removeJobsByMaxCount(maxCount, targetSet, prefix) + end + else + removeJobKeys(jobIdKey) + if parentKey ~= "" then + -- TODO: when a child is removed when finished, result or failure in parent + -- must not be deleted, those value references should be deleted when the parent + -- is deleted + removeParentDependencyKey(jobIdKey, false, parentKey, jobAttributes[3]) + end + end + rcall("XADD", eventStreamKey, "*", "event", ARGV[5], "jobId", jobId, ARGV[3], ARGV[4], "prev", "active") + if ARGV[5] == "failed" then + if tonumber(attemptsMade) >= tonumber(attempts) then + rcall("XADD", eventStreamKey, "*", "event", "retries-exhausted", "jobId", jobId, "attemptsMade", + attemptsMade) + end + end + -- Collect metrics + if maxMetricsSize ~= "" then + collectMetrics(KEYS[13], KEYS[13] .. ':data', maxMetricsSize, timestamp) + end + -- Try to get next job to avoid an extra roundtrip if the queue is not closing, + -- and not rate limited. + if (ARGV[6] == "1") then + local result = fetchNextJob(KEYS[1], KEYS[2], KEYS[3], eventStreamKey, + KEYS[6], KEYS[7], KEYS[8], metaKey, KEYS[10], KEYS[14], prefix, + timestamp, opts) + if result then + return result + end + end + local waitLen = rcall("LLEN", KEYS[1]) + if waitLen == 0 then + local activeLen = rcall("LLEN", KEYS[2]) + if activeLen == 0 then + local prioritizedLen = rcall("ZCARD", KEYS[3]) + if prioritizedLen == 0 then + rcall("XADD", eventStreamKey, "*", "event", "drained") + end + end + end + return 0 +else + return -1 +end +`; + exports2.moveToFinished = { + name: "moveToFinished", + content, + keys: 14 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/moveToWaitingChildren-7.js +var require_moveToWaitingChildren_7 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/moveToWaitingChildren-7.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.moveToWaitingChildren = void 0; + var content = `--[[ + Moves job from active to waiting children set. + Input: + KEYS[1] active key + KEYS[2] wait-children key + KEYS[3] job key + KEYS[4] job dependencies key + KEYS[5] job unsuccessful key + KEYS[6] stalled key + KEYS[7] events key + ARGV[1] token + ARGV[2] child key + ARGV[3] timestamp + ARGV[4] jobId + ARGV[5] prefix + Output: + 0 - OK + 1 - There are not pending dependencies. + -1 - Missing job. + -2 - Missing lock + -3 - Job not in active set + -9 - Job has failed children +]] +local rcall = redis.call +local activeKey = KEYS[1] +local waitingChildrenKey = KEYS[2] +local jobKey = KEYS[3] +local jobDependenciesKey = KEYS[4] +local jobUnsuccessfulKey = KEYS[5] +local stalledKey = KEYS[6] +local eventStreamKey = KEYS[7] +local token = ARGV[1] +local timestamp = ARGV[3] +local jobId = ARGV[4] +--- Includes +local function removeLock(jobKey, stalledKey, token, jobId) + if token ~= "0" then + local lockKey = jobKey .. ':lock' + local lockToken = rcall("GET", lockKey) + if lockToken == token then + rcall("DEL", lockKey) + rcall("SREM", stalledKey, jobId) + else + if lockToken then + -- Lock exists but token does not match + return -6 + else + -- Lock is missing completely + return -2 + end + end + end + return 0 +end +local function removeJobFromActive(activeKey, stalledKey, jobKey, jobId, + token) + local errorCode = removeLock(jobKey, stalledKey, token, jobId) + if errorCode < 0 then + return errorCode + end + local numRemovedElements = rcall("LREM", activeKey, -1, jobId) + if numRemovedElements < 1 then + return -3 + end + return 0 +end +local function moveToWaitingChildren(activeKey, waitingChildrenKey, stalledKey, eventStreamKey, + jobKey, jobId, timestamp, token) + local errorCode = removeJobFromActive(activeKey, stalledKey, jobKey, jobId, token) + if errorCode < 0 then + return errorCode + end + local score = tonumber(timestamp) + rcall("ZADD", waitingChildrenKey, score, jobId) + rcall("XADD", eventStreamKey, "*", "event", "waiting-children", "jobId", jobId, 'prev', 'active') + return 0 +end +if rcall("EXISTS", jobKey) == 1 then + if rcall("ZCARD", jobUnsuccessfulKey) ~= 0 then + return -9 + else + if ARGV[2] ~= "" then + if rcall("SISMEMBER", jobDependenciesKey, ARGV[2]) ~= 0 then + return moveToWaitingChildren(activeKey, waitingChildrenKey, stalledKey, eventStreamKey, + jobKey, jobId, timestamp, token) + end + return 1 + else + if rcall("SCARD", jobDependenciesKey) ~= 0 then + return moveToWaitingChildren(activeKey, waitingChildrenKey, stalledKey, eventStreamKey, + jobKey, jobId, timestamp, token) + end + return 1 + end + end +end +return -1 +`; + exports2.moveToWaitingChildren = { + name: "moveToWaitingChildren", + content, + keys: 7 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/obliterate-2.js +var require_obliterate_2 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/obliterate-2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.obliterate = void 0; + var content = `--[[ + Completely obliterates a queue and all of its contents + This command completely destroys a queue including all of its jobs, current or past + leaving no trace of its existence. Since this script needs to iterate to find all the job + keys, consider that this call may be slow for very large queues. + The queue needs to be "paused" or it will return an error + If the queue has currently active jobs then the script by default will return error, + however this behaviour can be overridden using the 'force' option. + Input: + KEYS[1] meta + KEYS[2] base + ARGV[1] count + ARGV[2] force +]] +local maxCount = tonumber(ARGV[1]) +local baseKey = KEYS[2] +local rcall = redis.call +-- Includes +--[[ + Functions to remove jobs. +]] +-- Includes +--[[ + Function to remove job. +]] +-- Includes +--[[ + Function to remove deduplication key if needed + when a job is being removed. +]] +local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey, + jobId, deduplicationId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + rcall("DEL", deduplicationKey) + -- Also clean up any pending dedup-next data for this dedup ID + rcall("DEL", prefixKey .. "dn:" .. deduplicationId) + return 1 + end + end +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +local function removeJob(jobId, hard, baseKey, shouldRemoveDeduplicationKey) + local jobKey = baseKey .. jobId + removeParentDependencyKey(jobKey, hard, nil, baseKey) + if shouldRemoveDeduplicationKey then + local deduplicationId = rcall("HGET", jobKey, "deid") + removeDeduplicationKeyIfNeededOnRemoval(baseKey, jobId, deduplicationId) + end + removeJobKeys(jobKey) +end +local function removeJobs(keys, hard, baseKey, max) + for i, key in ipairs(keys) do + removeJob(key, hard, baseKey, true --[[remove debounce key]]) + end + return max - #keys +end +--[[ + Functions to remove jobs. +]] +-- Includes +--[[ + Function to filter out jobs to ignore from a table. +]] +local function filterOutJobsToIgnore(jobs, jobsToIgnore) + local filteredJobs = {} + for i = 1, #jobs do + if not jobsToIgnore[jobs[i]] then + table.insert(filteredJobs, jobs[i]) + end + end + return filteredJobs +end +local function getListItems(keyName, max) + return rcall('LRANGE', keyName, 0, max - 1) +end +local function removeListJobs(keyName, hard, baseKey, max, jobsToIgnore) + local jobs = getListItems(keyName, max) + if jobsToIgnore then + jobs = filterOutJobsToIgnore(jobs, jobsToIgnore) + end + local count = removeJobs(jobs, hard, baseKey, max) + rcall("LTRIM", keyName, #jobs, -1) + return count +end +-- Includes +--[[ + Function to loop in batches. + Just a bit of warning, some commands as ZREM + could receive a maximum of 7000 parameters per call. +]] +local function batches(n, batchSize) + local i = 0 + return function() + local from = i * batchSize + 1 + i = i + 1 + if (from <= n) then + local to = math.min(from + batchSize - 1, n) + return from, to + end + end +end +--[[ + Function to get ZSet items. +]] +local function getZSetItems(keyName, max) + return rcall('ZRANGE', keyName, 0, max - 1) +end +local function removeZSetJobs(keyName, hard, baseKey, max, jobsToIgnore) + local jobs = getZSetItems(keyName, max) + if jobsToIgnore then + jobs = filterOutJobsToIgnore(jobs, jobsToIgnore) + end + local count = removeJobs(jobs, hard, baseKey, max) + if(#jobs > 0) then + for from, to in batches(#jobs, 7000) do + rcall("ZREM", keyName, unpack(jobs, from, to)) + end + end + return count +end +local function removeLockKeys(keys) + for i, key in ipairs(keys) do + rcall("DEL", baseKey .. key .. ':lock') + end +end +-- 1) Check if paused, if not return with error. +if rcall("HEXISTS", KEYS[1], "paused") ~= 1 then + return -1 -- Error, NotPaused +end +-- 2) Check if there are active jobs, if there are and not "force" return error. +local activeKey = baseKey .. 'active' +local activeJobs = getListItems(activeKey, maxCount) +if (#activeJobs > 0) then + if(ARGV[2] == "") then + return -2 -- Error, ExistActiveJobs + end +end +removeLockKeys(activeJobs) +maxCount = removeJobs(activeJobs, true, baseKey, maxCount) +rcall("LTRIM", activeKey, #activeJobs, -1) +if(maxCount <= 0) then + return 1 +end +local delayedKey = baseKey .. 'delayed' +maxCount = removeZSetJobs(delayedKey, true, baseKey, maxCount) +if(maxCount <= 0) then + return 1 +end +local repeatKey = baseKey .. 'repeat' +local repeatJobsIds = getZSetItems(repeatKey, maxCount) +for i, key in ipairs(repeatJobsIds) do + local jobKey = repeatKey .. ":" .. key + rcall("DEL", jobKey) +end +if(#repeatJobsIds > 0) then + for from, to in batches(#repeatJobsIds, 7000) do + rcall("ZREM", repeatKey, unpack(repeatJobsIds, from, to)) + end +end +maxCount = maxCount - #repeatJobsIds +if(maxCount <= 0) then + return 1 +end +local completedKey = baseKey .. 'completed' +maxCount = removeZSetJobs(completedKey, true, baseKey, maxCount) +if(maxCount <= 0) then + return 1 +end +local pausedKey = baseKey .. 'paused' +maxCount = removeListJobs(pausedKey, true, baseKey, maxCount) +if(maxCount <= 0) then + return 1 +end +local prioritizedKey = baseKey .. 'prioritized' +maxCount = removeZSetJobs(prioritizedKey, true, baseKey, maxCount) +if(maxCount <= 0) then + return 1 +end +local failedKey = baseKey .. 'failed' +maxCount = removeZSetJobs(failedKey, true, baseKey, maxCount) +if(maxCount <= 0) then + return 1 +end +if(maxCount > 0) then + rcall("DEL", + baseKey .. 'events', + baseKey .. 'delay', + baseKey .. 'stalled-check', + baseKey .. 'stalled', + baseKey .. 'id', + baseKey .. 'pc', + baseKey .. 'marker', + baseKey .. 'meta', + baseKey .. 'metrics:completed', + baseKey .. 'metrics:completed:data', + baseKey .. 'metrics:failed', + baseKey .. 'metrics:failed:data') + return 0 +else + return 1 +end +`; + exports2.obliterate = { + name: "obliterate", + content, + keys: 2 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/paginate-1.js +var require_paginate_1 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/paginate-1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.paginate = void 0; + var content = `--[[ + Paginate a set or hash + Input: + KEYS[1] key pointing to the set or hash to be paginated. + ARGV[1] page start offset + ARGV[2] page end offset (-1 for all the elements) + ARGV[3] cursor + ARGV[4] offset + ARGV[5] max iterations + ARGV[6] fetch jobs? + Output: + [cursor, offset, items, numItems] +]] +local rcall = redis.call +-- Includes +--[[ + Function to achieve pagination for a set or hash. + This function simulates pagination in the most efficient way possible + for a set using sscan or hscan. + The main limitation is that sets are not order preserving, so the + pagination is not stable. This means that if the set is modified + between pages, the same element may appear in different pages. +]] -- Maximum number of elements to be returned by sscan per iteration. +local maxCount = 100 +-- Finds the cursor, and returns the first elements available for the requested page. +local function findPage(key, command, pageStart, pageSize, cursor, offset, + maxIterations, fetchJobs) + local items = {} + local jobs = {} + local iterations = 0 + repeat + -- Iterate over the set using sscan/hscan. + local result = rcall(command, key, cursor, "COUNT", maxCount) + cursor = result[1] + local members = result[2] + local step = 1 + if command == "HSCAN" then + step = 2 + end + if #members == 0 then + -- If the result is empty, we can return the result. + return cursor, offset, items, jobs + end + local chunkStart = offset + local chunkEnd = offset + #members / step + local pageEnd = pageStart + pageSize + if chunkEnd < pageStart then + -- If the chunk is before the page, we can skip it. + offset = chunkEnd + elseif chunkStart > pageEnd then + -- If the chunk is after the page, we can return the result. + return cursor, offset, items, jobs + else + -- If the chunk is overlapping the page, we need to add the elements to the result. + for i = 1, #members, step do + if offset >= pageEnd then + return cursor, offset, items, jobs + end + if offset >= pageStart then + local index = #items + 1 + if fetchJobs ~= nil then + jobs[#jobs+1] = rcall("HGETALL", members[i]) + end + if step == 2 then + items[index] = {members[i], members[i + 1]} + else + items[index] = members[i] + end + end + offset = offset + 1 + end + end + iterations = iterations + 1 + until cursor == "0" or iterations >= maxIterations + return cursor, offset, items, jobs +end +local key = KEYS[1] +local scanCommand = "SSCAN" +local countCommand = "SCARD" +local type = rcall("TYPE", key)["ok"] +if type == "none" then + return {0, 0, {}, 0} +elseif type == "hash" then + scanCommand = "HSCAN" + countCommand = "HLEN" +elseif type ~= "set" then + return + redis.error_reply("Pagination is only supported for sets and hashes.") +end +local numItems = rcall(countCommand, key) +local startOffset = tonumber(ARGV[1]) +local endOffset = tonumber(ARGV[2]) +if endOffset == -1 then + endOffset = numItems +end +local pageSize = (endOffset - startOffset) + 1 +local cursor, offset, items, jobs = findPage(key, scanCommand, startOffset, + pageSize, ARGV[3], tonumber(ARGV[4]), + tonumber(ARGV[5]), ARGV[6]) +return {cursor, offset, items, numItems, jobs} +`; + exports2.paginate = { + name: "paginate", + content, + keys: 1 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/pause-7.js +var require_pause_7 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/pause-7.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pause = void 0; + var content = `--[[ + Pauses or resumes a queue globally. + Input: + KEYS[1] 'wait' or 'paused' + KEYS[2] 'paused' or 'wait' + KEYS[3] 'meta' + KEYS[4] 'prioritized' + KEYS[5] events stream key + KEYS[6] 'delayed' + KEYS[7] 'marker' + ARGV[1] 'paused' or 'resumed' + Event: + publish paused or resumed event. +]] +local rcall = redis.call +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +local markerKey = KEYS[7] +local hasJobs = rcall("EXISTS", KEYS[1]) == 1 +--TODO: check this logic to be reused when changing a delay +if hasJobs then rcall("RENAME", KEYS[1], KEYS[2]) end +if ARGV[1] == "paused" then + rcall("HSET", KEYS[3], "paused", 1) + rcall("DEL", markerKey) +else + rcall("HDEL", KEYS[3], "paused") + if hasJobs or rcall("ZCARD", KEYS[4]) > 0 then + -- Add marker if there are waiting or priority jobs + rcall("ZADD", markerKey, 0, "0") + else + addDelayMarkerIfNeeded(markerKey, KEYS[6]) + end +end +rcall("XADD", KEYS[5], "*", "event", ARGV[1]); +`; + exports2.pause = { + name: "pause", + content, + keys: 7 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/promote-9.js +var require_promote_9 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/promote-9.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.promote = void 0; + var content = `--[[ + Promotes a job that is currently "delayed" to the "waiting" state + Input: + KEYS[1] 'delayed' + KEYS[2] 'wait' + KEYS[3] 'paused' + KEYS[4] 'meta' + KEYS[5] 'prioritized' + KEYS[6] 'active' + KEYS[7] 'pc' priority counter + KEYS[8] 'event stream' + KEYS[9] 'marker' + ARGV[1] queue.toKey('') + ARGV[2] jobId + Output: + 0 - OK + -3 - Job not in delayed zset. + Events: + 'waiting' +]] +local rcall = redis.call +local jobId = ARGV[2] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +if rcall("ZREM", KEYS[1], jobId) == 1 then + local jobKey = ARGV[1] .. jobId + local priority = tonumber(rcall("HGET", jobKey, "priority")) or 0 + local metaKey = KEYS[4] + local markerKey = KEYS[9] + -- Remove delayed "marker" from the wait list if there is any. + -- Since we are adding a job we do not need the marker anymore. + -- Markers in waitlist DEPRECATED in v5: Remove in v6. + local target, isPausedOrMaxed = getTargetQueueList(metaKey, KEYS[6], KEYS[2], KEYS[3]) + local marker = rcall("LINDEX", target, 0) + if marker and string.sub(marker, 1, 2) == "0:" then rcall("LPOP", target) end + if priority == 0 then + -- LIFO or FIFO + addJobInTargetList(target, markerKey, "LPUSH", isPausedOrMaxed, jobId) + else + addJobWithPriority(markerKey, KEYS[5], priority, jobId, KEYS[7], isPausedOrMaxed) + end + rcall("XADD", KEYS[8], "*", "event", "waiting", "jobId", jobId, "prev", + "delayed"); + rcall("HSET", jobKey, "delay", 0) + return 0 +else + return -3 +end +`; + exports2.promote = { + name: "promote", + content, + keys: 9 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/releaseLock-1.js +var require_releaseLock_1 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/releaseLock-1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.releaseLock = void 0; + var content = `--[[ + Release lock + Input: + KEYS[1] 'lock', + ARGV[1] token + ARGV[2] lock duration in milliseconds + Output: + "OK" if lock extended successfully. +]] +local rcall = redis.call +if rcall("GET", KEYS[1]) == ARGV[1] then + return rcall("DEL", KEYS[1]) +else + return 0 +end +`; + exports2.releaseLock = { + name: "releaseLock", + content, + keys: 1 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/removeChildDependency-1.js +var require_removeChildDependency_1 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/removeChildDependency-1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removeChildDependency = void 0; + var content = `--[[ + Break parent-child dependency by removing + child reference from parent + Input: + KEYS[1] 'key' prefix, + ARGV[1] job key + ARGV[2] parent key + Output: + 0 - OK + 1 - There is not relationship. + -1 - Missing job key + -5 - Missing parent key +]] +local rcall = redis.call +local jobKey = ARGV[1] +local parentKey = ARGV[2] +-- Includes +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +if rcall("EXISTS", jobKey) ~= 1 then return -1 end +if rcall("EXISTS", parentKey) ~= 1 then return -5 end +if removeParentDependencyKey(jobKey, false, parentKey, KEYS[1], nil) then + rcall("HDEL", jobKey, "parentKey", "parent") + return 0 +else + return 1 +end`; + exports2.removeChildDependency = { + name: "removeChildDependency", + content, + keys: 1 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/removeDeduplicationKey-1.js +var require_removeDeduplicationKey_1 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/removeDeduplicationKey-1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removeDeduplicationKey = void 0; + var content = `--[[ + Remove deduplication key if it matches the job id. + Input: + KEYS[1] deduplication key + ARGV[1] job id + Output: + 0 - false + 1 - true +]] +local rcall = redis.call +local deduplicationKey = KEYS[1] +local jobId = ARGV[1] +local currentJobId = rcall('GET', deduplicationKey) +if currentJobId and currentJobId == jobId then + return rcall("DEL", deduplicationKey) +end +return 0 +`; + exports2.removeDeduplicationKey = { + name: "removeDeduplicationKey", + content, + keys: 1 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/removeJob-2.js +var require_removeJob_2 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/removeJob-2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removeJob = void 0; + var content = `--[[ + Remove a job from all the statuses it may be in as well as all its data. + In order to be able to remove a job, it cannot be active. + Input: + KEYS[1] jobKey + KEYS[2] repeat key + ARGV[1] jobId + ARGV[2] remove children + ARGV[3] queue prefix + Events: + 'removed' +]] +local rcall = redis.call +-- Includes +--[[ + Function to check if the job belongs to a job scheduler and + current delayed job matches with jobId +]] +local function isJobSchedulerJob(jobId, jobKey, jobSchedulersKey) + local repeatJobKey = rcall("HGET", jobKey, "rjk") + if repeatJobKey then + local prevMillis = rcall("ZSCORE", jobSchedulersKey, repeatJobKey) + if prevMillis then + local currentDelayedJobId = "repeat:" .. repeatJobKey .. ":" .. prevMillis + return jobId == currentDelayedJobId + end + end + return false +end +--[[ + Function to recursively check if there are no locks + on the jobs to be removed. + returns: + boolean +]] +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +local function isLocked( prefix, jobId, removeChildren) + local jobKey = prefix .. jobId; + -- Check if this job is locked + local lockKey = jobKey .. ':lock' + local lock = rcall("GET", lockKey) + if not lock then + if removeChildren == "1" then + local dependencies = rcall("SMEMBERS", jobKey .. ":dependencies") + if (#dependencies > 0) then + for i, childJobKey in ipairs(dependencies) do + -- We need to get the jobId for this job. + local childJobId = getJobIdFromKey(childJobKey) + local childJobPrefix = getJobKeyPrefix(childJobKey, childJobId) + local result = isLocked( childJobPrefix, childJobId, removeChildren ) + if result then + return true + end + end + end + end + return false + end + return true +end +--[[ + Remove a job from all the statuses it may be in as well as all its data, + including its children. Active children can be ignored. + Events: + 'removed' +]] +local rcall = redis.call +-- Includes +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to remove deduplication key if needed + when a job is being removed. +]] +local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey, + jobId, deduplicationId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + rcall("DEL", deduplicationKey) + -- Also clean up any pending dedup-next data for this dedup ID + rcall("DEL", prefixKey .. "dn:" .. deduplicationId) + return 1 + end + end +end +--[[ + Function to remove from any state. + returns: + prev state +]] +local function removeJobFromAnyState( prefix, jobId) + -- We start with the ZSCORE checks, since they have O(1) complexity + if rcall("ZSCORE", prefix .. "completed", jobId) then + rcall("ZREM", prefix .. "completed", jobId) + return "completed" + elseif rcall("ZSCORE", prefix .. "waiting-children", jobId) then + rcall("ZREM", prefix .. "waiting-children", jobId) + return "waiting-children" + elseif rcall("ZSCORE", prefix .. "delayed", jobId) then + rcall("ZREM", prefix .. "delayed", jobId) + return "delayed" + elseif rcall("ZSCORE", prefix .. "failed", jobId) then + rcall("ZREM", prefix .. "failed", jobId) + return "failed" + elseif rcall("ZSCORE", prefix .. "prioritized", jobId) then + rcall("ZREM", prefix .. "prioritized", jobId) + return "prioritized" + -- We remove only 1 element from the list, since we assume they are not added multiple times + elseif rcall("LREM", prefix .. "wait", 1, jobId) == 1 then + return "wait" + elseif rcall("LREM", prefix .. "paused", 1, jobId) == 1 then + return "paused" + elseif rcall("LREM", prefix .. "active", 1, jobId) == 1 then + return "active" + end + return "unknown" +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +local removeJobChildren +local removeJobWithChildren +removeJobChildren = function(prefix, jobKey, options) + -- Check if this job has children + -- If so, we are going to try to remove the children recursively in a depth-first way + -- because if some job is locked, we must exit with an error. + if not options.ignoreProcessed then + local processed = rcall("HGETALL", jobKey .. ":processed") + if #processed > 0 then + for i = 1, #processed, 2 do + local childJobId = getJobIdFromKey(processed[i]) + local childJobPrefix = getJobKeyPrefix(processed[i], childJobId) + removeJobWithChildren(childJobPrefix, childJobId, jobKey, options) + end + end + local failed = rcall("HGETALL", jobKey .. ":failed") + if #failed > 0 then + for i = 1, #failed, 2 do + local childJobId = getJobIdFromKey(failed[i]) + local childJobPrefix = getJobKeyPrefix(failed[i], childJobId) + removeJobWithChildren(childJobPrefix, childJobId, jobKey, options) + end + end + local unsuccessful = rcall("ZRANGE", jobKey .. ":unsuccessful", 0, -1) + if #unsuccessful > 0 then + for i = 1, #unsuccessful, 1 do + local childJobId = getJobIdFromKey(unsuccessful[i]) + local childJobPrefix = getJobKeyPrefix(unsuccessful[i], childJobId) + removeJobWithChildren(childJobPrefix, childJobId, jobKey, options) + end + end + end + local dependencies = rcall("SMEMBERS", jobKey .. ":dependencies") + if #dependencies > 0 then + for i, childJobKey in ipairs(dependencies) do + local childJobId = getJobIdFromKey(childJobKey) + local childJobPrefix = getJobKeyPrefix(childJobKey, childJobId) + removeJobWithChildren(childJobPrefix, childJobId, jobKey, options) + end + end +end +removeJobWithChildren = function(prefix, jobId, parentKey, options) + local jobKey = prefix .. jobId + if options.ignoreLocked then + if isLocked(prefix, jobId) then + return + end + end + -- Check if job is in the failed zset + local failedSet = prefix .. "failed" + if not (options.ignoreProcessed and rcall("ZSCORE", failedSet, jobId)) then + removeParentDependencyKey(jobKey, false, parentKey, nil) + if options.removeChildren then + removeJobChildren(prefix, jobKey, options) + end + local prev = removeJobFromAnyState(prefix, jobId) + local deduplicationId = rcall("HGET", jobKey, "deid") + removeDeduplicationKeyIfNeededOnRemoval(prefix, jobId, deduplicationId) + if removeJobKeys(jobKey) > 0 then + local metaKey = prefix .. "meta" + local maxEvents = getOrSetMaxEvents(metaKey) + rcall("XADD", prefix .. "events", "MAXLEN", "~", maxEvents, "*", "event", "removed", + "jobId", jobId, "prev", prev) + end + end +end +local jobId = ARGV[1] +local shouldRemoveChildren = ARGV[2] +local prefix = ARGV[3] +local jobKey = KEYS[1] +local repeatKey = KEYS[2] +if isJobSchedulerJob(jobId, jobKey, repeatKey) then + return -8 +end +if not isLocked(prefix, jobId, shouldRemoveChildren) then + local options = { + removeChildren = shouldRemoveChildren == "1", + ignoreProcessed = false, + ignoreLocked = false + } + removeJobWithChildren(prefix, jobId, nil, options) + return 1 +end +return 0 +`; + exports2.removeJob = { + name: "removeJob", + content, + keys: 2 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/removeJobScheduler-3.js +var require_removeJobScheduler_3 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/removeJobScheduler-3.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removeJobScheduler = void 0; + var content = `--[[ + Removes a job scheduler and its next scheduled job. + Input: + KEYS[1] job schedulers key + KEYS[2] delayed jobs key + KEYS[3] events key + ARGV[1] job scheduler id + ARGV[2] prefix key + Output: + 0 - OK + 1 - Missing repeat job + Events: + 'removed' +]] +local rcall = redis.call +-- Includes +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +local jobSchedulerId = ARGV[1] +local prefix = ARGV[2] +local millis = rcall("ZSCORE", KEYS[1], jobSchedulerId) +if millis then + -- Delete next programmed job. + local delayedJobId = "repeat:" .. jobSchedulerId .. ":" .. millis + if(rcall("ZREM", KEYS[2], delayedJobId) == 1) then + removeJobKeys(prefix .. delayedJobId) + rcall("XADD", KEYS[3], "*", "event", "removed", "jobId", delayedJobId, "prev", "delayed") + end +end +if(rcall("ZREM", KEYS[1], jobSchedulerId) == 1) then + rcall("DEL", KEYS[1] .. ":" .. jobSchedulerId) + return 0 +end +return 1 +`; + exports2.removeJobScheduler = { + name: "removeJobScheduler", + content, + keys: 3 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/removeOrphanedJobs-1.js +var require_removeOrphanedJobs_1 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/removeOrphanedJobs-1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removeOrphanedJobs = void 0; + var content = `--[[ + Removes orphaned job keys that exist in Redis but are not referenced + in any queue state set. Checks each candidate atomically. + Input: + KEYS[1] base prefix key including trailing colon (e.g. bull:queueName:) + ARGV[1] number of state key suffixes + ARGV[2 .. 1+N] state key suffixes (e.g. active, wait, completed, ...) + ARGV[2+N] number of job sub-key suffixes + ARGV[3+N .. 2+N+M] job sub-key suffixes (e.g. logs, dependencies, ...) + ARGV[3+N+M .. end] candidate job IDs to check + Output: + number of removed jobs +]] +local rcall = redis.call +local basePrefix = KEYS[1] +-- Parse state key suffixes and cache their full key names + types. +local stateKeyCount = tonumber(ARGV[1]) +local stateKeys = {} +local stateKeyTypes = {} +for i = 1, stateKeyCount do + local fullKey = basePrefix .. ARGV[1 + i] + stateKeys[i] = fullKey + stateKeyTypes[i] = rcall('TYPE', fullKey)['ok'] +end +-- Parse job sub-key suffixes. +local subKeyCountIdx = 2 + stateKeyCount +local subKeyCount = tonumber(ARGV[subKeyCountIdx]) +local subKeySuffixes = {} +for i = 1, subKeyCount do + subKeySuffixes[i] = ARGV[subKeyCountIdx + i] +end +-- Process candidate job IDs. +local candidateStart = subKeyCountIdx + subKeyCount + 1 +local removedCount = 0 +for c = candidateStart, #ARGV do + local jobId = ARGV[c] + local found = false + for i = 1, stateKeyCount do + local kt = stateKeyTypes[i] + if kt == 'list' then + if rcall('LPOS', stateKeys[i], jobId) then + found = true + break + end + elseif kt == 'zset' then + if rcall('ZSCORE', stateKeys[i], jobId) then + found = true + break + end + elseif kt == 'set' then + if rcall('SISMEMBER', stateKeys[i], jobId) == 1 then + found = true + break + end + end + end + if not found then + local jobKey = basePrefix .. jobId + local keysToDelete = { jobKey } + for _, suffix in ipairs(subKeySuffixes) do + keysToDelete[#keysToDelete + 1] = jobKey .. ':' .. suffix + end + rcall('DEL', unpack(keysToDelete)) + removedCount = removedCount + 1 + end +end +return removedCount +`; + exports2.removeOrphanedJobs = { + name: "removeOrphanedJobs", + content, + keys: 1 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/removeRepeatable-3.js +var require_removeRepeatable_3 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/removeRepeatable-3.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removeRepeatable = void 0; + var content = `--[[ + Removes a repeatable job + Input: + KEYS[1] repeat jobs key + KEYS[2] delayed jobs key + KEYS[3] events key + ARGV[1] old repeat job id + ARGV[2] options concat + ARGV[3] repeat job key + ARGV[4] prefix key + Output: + 0 - OK + 1 - Missing repeat job + Events: + 'removed' +]] +local rcall = redis.call +local millis = rcall("ZSCORE", KEYS[1], ARGV[2]) +-- Includes +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +-- legacy removal TODO: remove in next breaking change +if millis then + -- Delete next programmed job. + local repeatJobId = ARGV[1] .. millis + if(rcall("ZREM", KEYS[2], repeatJobId) == 1) then + removeJobKeys(ARGV[4] .. repeatJobId) + rcall("XADD", KEYS[3], "*", "event", "removed", "jobId", repeatJobId, "prev", "delayed"); + end +end +if(rcall("ZREM", KEYS[1], ARGV[2]) == 1) then + return 0 +end +-- new removal +millis = rcall("ZSCORE", KEYS[1], ARGV[3]) +if millis then + -- Delete next programmed job. + local repeatJobId = "repeat:" .. ARGV[3] .. ":" .. millis + if(rcall("ZREM", KEYS[2], repeatJobId) == 1) then + removeJobKeys(ARGV[4] .. repeatJobId) + rcall("XADD", KEYS[3], "*", "event", "removed", "jobId", repeatJobId, "prev", "delayed") + end +end +if(rcall("ZREM", KEYS[1], ARGV[3]) == 1) then + rcall("DEL", KEYS[1] .. ":" .. ARGV[3]) + return 0 +end +return 1 +`; + exports2.removeRepeatable = { + name: "removeRepeatable", + content, + keys: 3 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/removeUnprocessedChildren-2.js +var require_removeUnprocessedChildren_2 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/removeUnprocessedChildren-2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removeUnprocessedChildren = void 0; + var content = `--[[ + Remove a job from all the statuses it may be in as well as all its data. + In order to be able to remove a job, it cannot be active. + Input: + KEYS[1] jobKey + KEYS[2] meta key + ARGV[1] prefix + ARGV[2] jobId + Events: + 'removed' for every children removed +]] +-- Includes +--[[ + Remove a job from all the statuses it may be in as well as all its data, + including its children. Active children can be ignored. + Events: + 'removed' +]] +local rcall = redis.call +-- Includes +--[[ + Functions to destructure job key. + Just a bit of warning, these functions may be a bit slow and affect performance significantly. +]] +local getJobIdFromKey = function (jobKey) + return string.match(jobKey, ".*:(.*)") +end +local getJobKeyPrefix = function (jobKey, jobId) + return string.sub(jobKey, 0, #jobKey - #jobId) +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to check if the job belongs to a job scheduler and + current delayed job matches with jobId +]] +local function isJobSchedulerJob(jobId, jobKey, jobSchedulersKey) + local repeatJobKey = rcall("HGET", jobKey, "rjk") + if repeatJobKey then + local prevMillis = rcall("ZSCORE", jobSchedulersKey, repeatJobKey) + if prevMillis then + local currentDelayedJobId = "repeat:" .. repeatJobKey .. ":" .. prevMillis + return jobId == currentDelayedJobId + end + end + return false +end +--[[ + Function to remove deduplication key if needed + when a job is being removed. +]] +local function removeDeduplicationKeyIfNeededOnRemoval(prefixKey, + jobId, deduplicationId) + if deduplicationId then + local deduplicationKey = prefixKey .. "de:" .. deduplicationId + local currentJobId = rcall('GET', deduplicationKey) + if currentJobId and currentJobId == jobId then + rcall("DEL", deduplicationKey) + -- Also clean up any pending dedup-next data for this dedup ID + rcall("DEL", prefixKey .. "dn:" .. deduplicationId) + return 1 + end + end +end +--[[ + Function to remove from any state. + returns: + prev state +]] +local function removeJobFromAnyState( prefix, jobId) + -- We start with the ZSCORE checks, since they have O(1) complexity + if rcall("ZSCORE", prefix .. "completed", jobId) then + rcall("ZREM", prefix .. "completed", jobId) + return "completed" + elseif rcall("ZSCORE", prefix .. "waiting-children", jobId) then + rcall("ZREM", prefix .. "waiting-children", jobId) + return "waiting-children" + elseif rcall("ZSCORE", prefix .. "delayed", jobId) then + rcall("ZREM", prefix .. "delayed", jobId) + return "delayed" + elseif rcall("ZSCORE", prefix .. "failed", jobId) then + rcall("ZREM", prefix .. "failed", jobId) + return "failed" + elseif rcall("ZSCORE", prefix .. "prioritized", jobId) then + rcall("ZREM", prefix .. "prioritized", jobId) + return "prioritized" + -- We remove only 1 element from the list, since we assume they are not added multiple times + elseif rcall("LREM", prefix .. "wait", 1, jobId) == 1 then + return "wait" + elseif rcall("LREM", prefix .. "paused", 1, jobId) == 1 then + return "paused" + elseif rcall("LREM", prefix .. "active", 1, jobId) == 1 then + return "active" + end + return "unknown" +end +--[[ + Function to remove job keys. +]] +local function removeJobKeys(jobKey) + return rcall("DEL", jobKey, jobKey .. ':logs', jobKey .. ':dependencies', + jobKey .. ':processed', jobKey .. ':failed', jobKey .. ':unsuccessful') +end +--[[ + Check if this job has a parent. If so we will just remove it from + the parent child list, but if it is the last child we should move the parent to "wait/paused" + which requires code from "moveToFinished" +]] +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local function _moveParentToWait(parentPrefix, parentId, emitEvent) + local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active", + parentPrefix .. "wait", parentPrefix .. "paused") + addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId) + if emitEvent then + local parentEventStream = parentPrefix .. "events" + rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children") + end +end +local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId) + if parentKey then + local parentDependenciesKey = parentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(parentKey) + local parentPrefix = getJobKeyPrefix(parentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then -- remove parent in same queue + if parentPrefix == baseKey then + removeParentDependencyKey(parentKey, hard, nil, baseKey, nil) + removeJobKeys(parentKey) + if debounceId then + rcall("DEL", parentPrefix .. "de:" .. debounceId) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + else + local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid") + local missedParentKey = parentAttributes[1] + if( (type(missedParentKey) == "string") and missedParentKey ~= "" + and (rcall("EXISTS", missedParentKey) == 1)) then + local parentDependenciesKey = missedParentKey .. ":dependencies" + local result = rcall("SREM", parentDependenciesKey, jobKey) + if result > 0 then + local pendingDependencies = rcall("SCARD", parentDependenciesKey) + if pendingDependencies == 0 then + local parentId = getJobIdFromKey(missedParentKey) + local parentPrefix = getJobKeyPrefix(missedParentKey, parentId) + local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId) + if numRemovedElements == 1 then + if hard then + if parentPrefix == baseKey then + removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil) + removeJobKeys(missedParentKey) + if parentAttributes[2] then + rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2]) + end + else + _moveParentToWait(parentPrefix, parentId) + end + else + _moveParentToWait(parentPrefix, parentId, true) + end + end + end + return true + end + end + end + return false +end +--[[ + Function to recursively check if there are no locks + on the jobs to be removed. + returns: + boolean +]] +local function isLocked( prefix, jobId, removeChildren) + local jobKey = prefix .. jobId; + -- Check if this job is locked + local lockKey = jobKey .. ':lock' + local lock = rcall("GET", lockKey) + if not lock then + if removeChildren == "1" then + local dependencies = rcall("SMEMBERS", jobKey .. ":dependencies") + if (#dependencies > 0) then + for i, childJobKey in ipairs(dependencies) do + -- We need to get the jobId for this job. + local childJobId = getJobIdFromKey(childJobKey) + local childJobPrefix = getJobKeyPrefix(childJobKey, childJobId) + local result = isLocked( childJobPrefix, childJobId, removeChildren ) + if result then + return true + end + end + end + end + return false + end + return true +end +local removeJobChildren +local removeJobWithChildren +removeJobChildren = function(prefix, jobKey, options) + -- Check if this job has children + -- If so, we are going to try to remove the children recursively in a depth-first way + -- because if some job is locked, we must exit with an error. + if not options.ignoreProcessed then + local processed = rcall("HGETALL", jobKey .. ":processed") + if #processed > 0 then + for i = 1, #processed, 2 do + local childJobId = getJobIdFromKey(processed[i]) + local childJobPrefix = getJobKeyPrefix(processed[i], childJobId) + removeJobWithChildren(childJobPrefix, childJobId, jobKey, options) + end + end + local failed = rcall("HGETALL", jobKey .. ":failed") + if #failed > 0 then + for i = 1, #failed, 2 do + local childJobId = getJobIdFromKey(failed[i]) + local childJobPrefix = getJobKeyPrefix(failed[i], childJobId) + removeJobWithChildren(childJobPrefix, childJobId, jobKey, options) + end + end + local unsuccessful = rcall("ZRANGE", jobKey .. ":unsuccessful", 0, -1) + if #unsuccessful > 0 then + for i = 1, #unsuccessful, 1 do + local childJobId = getJobIdFromKey(unsuccessful[i]) + local childJobPrefix = getJobKeyPrefix(unsuccessful[i], childJobId) + removeJobWithChildren(childJobPrefix, childJobId, jobKey, options) + end + end + end + local dependencies = rcall("SMEMBERS", jobKey .. ":dependencies") + if #dependencies > 0 then + for i, childJobKey in ipairs(dependencies) do + local childJobId = getJobIdFromKey(childJobKey) + local childJobPrefix = getJobKeyPrefix(childJobKey, childJobId) + removeJobWithChildren(childJobPrefix, childJobId, jobKey, options) + end + end +end +removeJobWithChildren = function(prefix, jobId, parentKey, options) + local jobKey = prefix .. jobId + if options.ignoreLocked then + if isLocked(prefix, jobId) then + return + end + end + -- Check if job is in the failed zset + local failedSet = prefix .. "failed" + if not (options.ignoreProcessed and rcall("ZSCORE", failedSet, jobId)) then + removeParentDependencyKey(jobKey, false, parentKey, nil) + if options.removeChildren then + removeJobChildren(prefix, jobKey, options) + end + local prev = removeJobFromAnyState(prefix, jobId) + local deduplicationId = rcall("HGET", jobKey, "deid") + removeDeduplicationKeyIfNeededOnRemoval(prefix, jobId, deduplicationId) + if removeJobKeys(jobKey) > 0 then + local metaKey = prefix .. "meta" + local maxEvents = getOrSetMaxEvents(metaKey) + rcall("XADD", prefix .. "events", "MAXLEN", "~", maxEvents, "*", "event", "removed", + "jobId", jobId, "prev", prev) + end + end +end +local prefix = ARGV[1] +local jobId = ARGV[2] +local jobKey = KEYS[1] +local metaKey = KEYS[2] +local options = { + removeChildren = "1", + ignoreProcessed = true, + ignoreLocked = true +} +removeJobChildren(prefix, jobKey, options) +`; + exports2.removeUnprocessedChildren = { + name: "removeUnprocessedChildren", + content, + keys: 2 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/reprocessJob-8.js +var require_reprocessJob_8 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/reprocessJob-8.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.reprocessJob = void 0; + var content = `--[[ + Attempts to reprocess a job + Input: + KEYS[1] job key + KEYS[2] events stream + KEYS[3] job state + KEYS[4] wait key + KEYS[5] meta + KEYS[6] paused key + KEYS[7] active key + KEYS[8] marker key + ARGV[1] job.id + ARGV[2] (job.opts.lifo ? 'R' : 'L') + 'PUSH' + ARGV[3] propVal - failedReason/returnvalue + ARGV[4] prev state - failed/completed + ARGV[5] reset attemptsMade - "1" or "0" + ARGV[6] reset attemptsStarted - "1" or "0" + Output: + 1 means the operation was a success + -1 means the job does not exist + -3 means the job was not found in the expected set. +]] +local rcall = redis.call; +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +local jobKey = KEYS[1] +if rcall("EXISTS", jobKey) == 1 then + local jobId = ARGV[1] + if (rcall("ZREM", KEYS[3], jobId) == 1) then + local attributesToRemove = {} + if ARGV[5] == "1" then + table.insert(attributesToRemove, "atm") + end + if ARGV[6] == "1" then + table.insert(attributesToRemove, "ats") + end + rcall("HDEL", jobKey, "finishedOn", "processedOn", ARGV[3], unpack(attributesToRemove)) + local target, isPausedOrMaxed = getTargetQueueList(KEYS[5], KEYS[7], KEYS[4], KEYS[6]) + addJobInTargetList(target, KEYS[8], ARGV[2], isPausedOrMaxed, jobId) + local parentKey = rcall("HGET", jobKey, "parentKey") + if parentKey and rcall("EXISTS", parentKey) == 1 then + if ARGV[4] == "failed" then + if rcall("ZREM", parentKey .. ":unsuccessful", jobKey) == 1 or + rcall("HDEL", parentKey .. ":failed", jobKey) == 1 then + rcall("SADD", parentKey .. ":dependencies", jobKey) + end + else + if rcall("HDEL", parentKey .. ":processed", jobKey) == 1 then + rcall("SADD", parentKey .. ":dependencies", jobKey) + end + end + end + local maxEvents = getOrSetMaxEvents(KEYS[5]) + -- Emit waiting event + rcall("XADD", KEYS[2], "MAXLEN", "~", maxEvents, "*", "event", "waiting", + "jobId", jobId, "prev", ARGV[4]); + return 1 + else + return -3 + end +else + return -1 +end +`; + exports2.reprocessJob = { + name: "reprocessJob", + content, + keys: 8 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/retryJob-11.js +var require_retryJob_11 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/retryJob-11.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryJob = void 0; + var content = `--[[ + Retries a failed job by moving it back to the wait queue. + Input: + KEYS[1] 'active', + KEYS[2] 'wait' + KEYS[3] 'paused' + KEYS[4] job key + KEYS[5] 'meta' + KEYS[6] events stream + KEYS[7] delayed key + KEYS[8] prioritized key + KEYS[9] 'pc' priority counter + KEYS[10] 'marker' + KEYS[11] 'stalled' + ARGV[1] key prefix + ARGV[2] timestamp + ARGV[3] pushCmd + ARGV[4] jobId + ARGV[5] token + ARGV[6] optional job fields to update + Events: + 'waiting' + Output: + 0 - OK + -1 - Missing key + -2 - Missing lock + -3 - Job not in active set +]] +local rcall = redis.call +-- Includes +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +--[[ + Function to check if queue is paused or maxed + (since an empty list and !EXISTS are not really the same). +]] +local function isQueuePausedOrMaxed(queueMetaKey, activeKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency") + if queueAttributes[1] then + return true + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + return activeCount >= tonumber(queueAttributes[2]) + end + end + return false +end +--[[ + Updates the delay set, by moving delayed jobs that should + be processed now to "wait". + Events: + 'waiting' +]] +-- Includes +-- Try to get as much as 1000 jobs at once +local function promoteDelayedJobs(delayedKey, markerKey, targetKey, prioritizedKey, + eventStreamKey, prefix, timestamp, priorityCounterKey, isPaused) + local jobs = rcall("ZRANGEBYSCORE", delayedKey, 0, (timestamp + 1) * 0x1000 - 1, "LIMIT", 0, 1000) + if (#jobs > 0) then + rcall("ZREM", delayedKey, unpack(jobs)) + for _, jobId in ipairs(jobs) do + local jobKey = prefix .. jobId + local priority = + tonumber(rcall("HGET", jobKey, "priority")) or 0 + if priority == 0 then + -- LIFO or FIFO + rcall("LPUSH", targetKey, jobId) + else + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + end + -- Emit waiting event + rcall("XADD", eventStreamKey, "*", "event", "waiting", "jobId", + jobId, "prev", "delayed") + rcall("HSET", jobKey, "delay", 0) + end + addBaseMarkerIfNeeded(markerKey, isPaused) + end +end +local function removeLock(jobKey, stalledKey, token, jobId) + if token ~= "0" then + local lockKey = jobKey .. ':lock' + local lockToken = rcall("GET", lockKey) + if lockToken == token then + rcall("DEL", lockKey) + rcall("SREM", stalledKey, jobId) + else + if lockToken then + -- Lock exists but token does not match + return -6 + else + -- Lock is missing completely + return -2 + end + end + end + return 0 +end +--[[ + Function to update a bunch of fields in a job. +]] +local function updateJobFields(jobKey, msgpackedFields) + if msgpackedFields and #msgpackedFields > 0 then + local fieldsToUpdate = cmsgpack.unpack(msgpackedFields) + if fieldsToUpdate then + rcall("HMSET", jobKey, unpack(fieldsToUpdate)) + end + end +end +local target, isPausedOrMaxed = getTargetQueueList(KEYS[5], KEYS[1], KEYS[2], KEYS[3]) +local markerKey = KEYS[10] +-- Check if there are delayed jobs that we can move to wait. +-- test example: when there are delayed jobs between retries +promoteDelayedJobs(KEYS[7], markerKey, target, KEYS[8], KEYS[6], ARGV[1], ARGV[2], KEYS[9], isPausedOrMaxed) +local jobKey = KEYS[4] +if rcall("EXISTS", jobKey) == 1 then + local errorCode = removeLock(jobKey, KEYS[11], ARGV[5], ARGV[4]) + if errorCode < 0 then + return errorCode + end + updateJobFields(jobKey, ARGV[6]) + local numRemovedElements = rcall("LREM", KEYS[1], -1, ARGV[4]) + if (numRemovedElements < 1) then return -3 end + local priority = tonumber(rcall("HGET", jobKey, "priority")) or 0 + --need to re-evaluate after removing job from active + isPausedOrMaxed = isQueuePausedOrMaxed(KEYS[5], KEYS[1]) + -- Standard or priority add + if priority == 0 then + addJobInTargetList(target, markerKey, ARGV[3], isPausedOrMaxed, ARGV[4]) + else + addJobWithPriority(markerKey, KEYS[8], priority, ARGV[4], KEYS[9], isPausedOrMaxed) + end + rcall("HINCRBY", jobKey, "atm", 1) + local maxEvents = getOrSetMaxEvents(KEYS[5]) + -- Emit waiting event + rcall("XADD", KEYS[6], "MAXLEN", "~", maxEvents, "*", "event", "waiting", + "jobId", ARGV[4], "prev", "active") + return 0 +else + return -1 +end +`; + exports2.retryJob = { + name: "retryJob", + content, + keys: 11 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/saveStacktrace-1.js +var require_saveStacktrace_1 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/saveStacktrace-1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.saveStacktrace = void 0; + var content = `--[[ + Save stacktrace and failedReason. + Input: + KEYS[1] job key + ARGV[1] stacktrace + ARGV[2] failedReason + Output: + 0 - OK + -1 - Missing key +]] +local rcall = redis.call +if rcall("EXISTS", KEYS[1]) == 1 then + rcall("HMSET", KEYS[1], "stacktrace", ARGV[1], "failedReason", ARGV[2]) + return 0 +else + return -1 +end +`; + exports2.saveStacktrace = { + name: "saveStacktrace", + content, + keys: 1 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/updateData-1.js +var require_updateData_1 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/updateData-1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.updateData = void 0; + var content = `--[[ + Update job data + Input: + KEYS[1] Job id key + ARGV[1] data + Output: + 0 - OK + -1 - Missing job. +]] +local rcall = redis.call +if rcall("EXISTS",KEYS[1]) == 1 then -- // Make sure job exists + rcall("HSET", KEYS[1], "data", ARGV[1]) + return 0 +else + return -1 +end +`; + exports2.updateData = { + name: "updateData", + content, + keys: 1 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/updateJobScheduler-12.js +var require_updateJobScheduler_12 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/updateJobScheduler-12.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.updateJobScheduler = void 0; + var content = `--[[ + Updates a job scheduler and adds next delayed job + Input: + KEYS[1] 'repeat' key + KEYS[2] 'delayed' + KEYS[3] 'wait' key + KEYS[4] 'paused' key + KEYS[5] 'meta' + KEYS[6] 'prioritized' key + KEYS[7] 'marker', + KEYS[8] 'id' + KEYS[9] events stream key + KEYS[10] 'pc' priority counter + KEYS[11] producer key + KEYS[12] 'active' key + ARGV[1] next milliseconds + ARGV[2] jobs scheduler id + ARGV[3] Json stringified delayed data + ARGV[4] msgpacked delayed opts + ARGV[5] timestamp + ARGV[6] prefix key + ARGV[7] producer id + Output: + next delayed job id - OK +]] local rcall = redis.call +local repeatKey = KEYS[1] +local delayedKey = KEYS[2] +local waitKey = KEYS[3] +local pausedKey = KEYS[4] +local metaKey = KEYS[5] +local prioritizedKey = KEYS[6] +local nextMillis = tonumber(ARGV[1]) +local jobSchedulerId = ARGV[2] +local timestamp = tonumber(ARGV[5]) +local prefixKey = ARGV[6] +local producerId = ARGV[7] +local jobOpts = cmsgpack.unpack(ARGV[4]) +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Shared helper to store a job and enqueue it into the appropriate list/set. + Handles delayed, prioritized, and standard (LIFO/FIFO) jobs. + Emits the appropriate event after enqueuing ("delayed" or "waiting"). + Returns delay, priority from storeJob. +]] +-- Includes +--[[ + Adds a delayed job to the queue by doing the following: + - Creates a new job key with the job data. + - adds to delayed zset. + - Emits a global event 'delayed' if the job is delayed. +]] +-- Includes +--[[ + Add delay marker if needed. +]] +-- Includes +--[[ + Function to return the next delayed job timestamp. +]] +local function getNextDelayedTimestamp(delayedKey) + local result = rcall("ZRANGE", delayedKey, 0, 0, "WITHSCORES") + if #result then + local nextTimestamp = tonumber(result[2]) + if nextTimestamp ~= nil then + return nextTimestamp / 0x1000 + end + end +end +local function addDelayMarkerIfNeeded(markerKey, delayedKey) + local nextTimestamp = getNextDelayedTimestamp(delayedKey) + if nextTimestamp ~= nil then + -- Replace the score of the marker with the newest known + -- next timestamp. + rcall("ZADD", markerKey, nextTimestamp, "1") + end +end +--[[ + Bake in the job id first 12 bits into the timestamp + to guarantee correct execution order of delayed jobs + (up to 4096 jobs per given timestamp or 4096 jobs apart per timestamp) + WARNING: Jobs that are so far apart that they wrap around will cause FIFO to fail +]] +local function getDelayedScore(delayedKey, timestamp, delay) + local delayedTimestamp = (delay > 0 and (tonumber(timestamp) + delay)) or tonumber(timestamp) + local minScore = delayedTimestamp * 0x1000 + local maxScore = (delayedTimestamp + 1 ) * 0x1000 - 1 + local result = rcall("ZREVRANGEBYSCORE", delayedKey, maxScore, + minScore, "WITHSCORES","LIMIT", 0, 1) + if #result then + local currentMaxScore = tonumber(result[2]) + if currentMaxScore ~= nil then + if currentMaxScore >= maxScore then + return maxScore, delayedTimestamp + else + return currentMaxScore + 1, delayedTimestamp + end + end + end + return minScore, delayedTimestamp +end +local function addDelayedJob(jobId, delayedKey, eventsKey, timestamp, + maxEvents, markerKey, delay) + local score, delayedTimestamp = getDelayedScore(delayedKey, timestamp, tonumber(delay)) + rcall("ZADD", delayedKey, score, jobId) + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "delayed", + "jobId", jobId, "delay", delayedTimestamp) + -- mark that a delayed job is available + addDelayMarkerIfNeeded(markerKey, delayedKey) +end +--[[ + Function to add job in target list and add marker if needed. +]] +-- Includes +--[[ + Add marker if needed when a job is available. +]] +local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) + if not isPausedOrMaxed then + rcall("ZADD", markerKey, 0, "0") + end +end +local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId) + rcall(pushCmd, targetKey, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to add job considering priority. +]] +-- Includes +--[[ + Function to get priority score. +]] +local function getPriorityScore(priority, priorityCounterKey) + local prioCounter = rcall("INCR", priorityCounterKey) + return priority * 0x100000000 + prioCounter % 0x100000000 +end +local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey, + isPausedOrMaxed) + local score = getPriorityScore(priority, priorityCounterKey) + rcall("ZADD", prioritizedKey, score, jobId) + addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed) +end +--[[ + Function to check for the meta.paused key to decide if we are paused or not + (since an empty list and !EXISTS are not really the same). +]] +local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey) + local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency", "max", "duration") + if queueAttributes[1] then + return pausedKey, true, queueAttributes[3], queueAttributes[4] + else + if queueAttributes[2] then + local activeCount = rcall("LLEN", activeKey) + if activeCount >= tonumber(queueAttributes[2]) then + return waitKey, true, queueAttributes[3], queueAttributes[4] + else + return waitKey, false, queueAttributes[3], queueAttributes[4] + end + end + end + return waitKey, false, queueAttributes[3], queueAttributes[4] +end +--[[ + Function to store a job +]] +local function storeJob(eventsKey, jobIdKey, jobId, name, data, opts, timestamp, + parentKey, parentData, repeatJobKey) + local jsonOpts = cjson.encode(opts) + local delay = opts['delay'] or 0 + local priority = opts['priority'] or 0 + local debounceId = opts['de'] and opts['de']['id'] + local optionalValues = {} + if parentKey ~= nil then + table.insert(optionalValues, "parentKey") + table.insert(optionalValues, parentKey) + table.insert(optionalValues, "parent") + table.insert(optionalValues, parentData) + end + if repeatJobKey then + table.insert(optionalValues, "rjk") + table.insert(optionalValues, repeatJobKey) + end + if debounceId then + table.insert(optionalValues, "deid") + table.insert(optionalValues, debounceId) + end + rcall("HMSET", jobIdKey, "name", name, "data", data, "opts", jsonOpts, + "timestamp", timestamp, "delay", delay, "priority", priority, + unpack(optionalValues)) + rcall("XADD", eventsKey, "*", "event", "added", "jobId", jobId, "name", name) + return delay, priority +end +local function storeAndEnqueueJob(eventsKey, jobIdKey, jobId, name, data, opts, + timestamp, parentKey, parentData, repeatJobKey, maxEvents, + waitKey, pausedKey, activeKey, metaKey, prioritizedKey, + priorityCounterKey, delayedKey, markerKey) + local delay, priority = storeJob(eventsKey, jobIdKey, jobId, name, data, + opts, timestamp, parentKey, parentData, repeatJobKey) + if delay ~= 0 and delayedKey then + addDelayedJob(jobId, delayedKey, eventsKey, timestamp, maxEvents, markerKey, delay) + else + local target, isPausedOrMaxed = getTargetQueueList(metaKey, activeKey, waitKey, pausedKey) + if priority > 0 then + addJobWithPriority(markerKey, prioritizedKey, priority, jobId, + priorityCounterKey, isPausedOrMaxed) + else + local pushCmd = opts['lifo'] and 'RPUSH' or 'LPUSH' + addJobInTargetList(target, markerKey, pushCmd, isPausedOrMaxed, jobId) + end + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "waiting", + "jobId", jobId) + end + return delay, priority +end +local function addJobFromScheduler(jobKey, jobId, opts, waitKey, pausedKey, activeKey, metaKey, + prioritizedKey, priorityCounter, delayedKey, markerKey, eventsKey, name, maxEvents, timestamp, + data, jobSchedulerId, repeatDelay) + opts['delay'] = repeatDelay + opts['jobId'] = jobId + storeAndEnqueueJob(eventsKey, jobKey, jobId, name, data, opts, + timestamp, nil, nil, jobSchedulerId, maxEvents, + waitKey, pausedKey, activeKey, metaKey, prioritizedKey, + priorityCounter, delayedKey, markerKey) +end +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +local function getJobSchedulerEveryNextMillis(prevMillis, every, now, offset, startDate) + offset = tonumber(offset) + local nextMillis + if not prevMillis then + if startDate then + -- Assuming startDate is passed as milliseconds from JavaScript + nextMillis = tonumber(startDate) + nextMillis = nextMillis > now and nextMillis or now + else + if offset and offset > 0 then + -- Align to the next slot that respects the offset + nextMillis = math.floor(now / every) * every + offset + if nextMillis <= now then + nextMillis = nextMillis + every + end + else + nextMillis = now + end + end + else + nextMillis = prevMillis + every + -- check if we may have missed some iterations + if nextMillis < now then + -- Use the same offset-aware alignment as the initial branch + -- above so a non-zero offset is preserved across catch-ups + -- instead of being flattened to (slot + every). When the + -- aligned slot is itself still in the past, advance by one + -- full interval; otherwise the aligned slot is the next + -- iteration. + local aligned = math.floor(now / every) * every + (offset or 0) + if aligned <= now then + nextMillis = aligned + every + else + nextMillis = aligned + end + end + end + if not offset or offset == 0 then + local timeSlot = math.floor(nextMillis / every) * every; + offset = nextMillis - timeSlot; + end + -- Return a tuple nextMillis, offset + return math.floor(nextMillis), math.floor(offset) +end +local prevMillis = rcall("ZSCORE", repeatKey, jobSchedulerId) +-- Validate that scheduler exists. +-- If it does not exist we should not iterate anymore. +if prevMillis then + prevMillis = tonumber(prevMillis) + local schedulerKey = repeatKey .. ":" .. jobSchedulerId + local schedulerAttributes = rcall("HMGET", schedulerKey, "name", "data", "every", "startDate", "offset") + local every = tonumber(schedulerAttributes[3]) + local now = tonumber(timestamp) + -- If every is not found in scheduler attributes, try to get it from job options + if not every and jobOpts['repeat'] and jobOpts['repeat']['every'] then + every = tonumber(jobOpts['repeat']['every']) + end + if every then + local startDate = schedulerAttributes[4] + local jobOptsOffset = jobOpts['repeat'] and jobOpts['repeat']['offset'] or 0 + local offset = schedulerAttributes[5] or jobOptsOffset or 0 + local newOffset + nextMillis, newOffset = getJobSchedulerEveryNextMillis(prevMillis, every, now, offset, startDate) + if not offset then + rcall("HSET", schedulerKey, "offset", newOffset) + jobOpts['repeat']['offset'] = newOffset + end + end + local nextDelayedJobId = "repeat:" .. jobSchedulerId .. ":" .. nextMillis + local nextDelayedJobKey = schedulerKey .. ":" .. nextMillis + local currentDelayedJobId = "repeat:" .. jobSchedulerId .. ":" .. prevMillis + if producerId == currentDelayedJobId then + local eventsKey = KEYS[9] + local maxEvents = getOrSetMaxEvents(metaKey) + if rcall("EXISTS", nextDelayedJobKey) ~= 1 then + rcall("ZADD", repeatKey, nextMillis, jobSchedulerId) + rcall("HINCRBY", schedulerKey, "ic", 1) + rcall("INCR", KEYS[8]) + -- TODO: remove this workaround in next breaking change, + -- all job-schedulers must save job data + local templateData = schedulerAttributes[2] or ARGV[3] + if templateData and templateData ~= '{}' then + rcall("HSET", schedulerKey, "data", templateData) + end + local delay = nextMillis - now + -- Fast Clamp delay to minimum of 0 + if delay < 0 then + delay = 0 + end + jobOpts["delay"] = delay + addJobFromScheduler(nextDelayedJobKey, nextDelayedJobId, jobOpts, waitKey, pausedKey, KEYS[12], metaKey, + prioritizedKey, KEYS[10], delayedKey, KEYS[7], eventsKey, schedulerAttributes[1], maxEvents, ARGV[5], + templateData or '{}', jobSchedulerId, delay) + -- TODO: remove this workaround in next breaking change + if KEYS[11] ~= "" then + rcall("HSET", KEYS[11], "nrjid", nextDelayedJobId) + end + return nextDelayedJobId .. "" -- convert to string + else + rcall("XADD", eventsKey, "MAXLEN", "~", maxEvents, "*", "event", "duplicated", "jobId", nextDelayedJobId) + end + end +end +`; + exports2.updateJobScheduler = { + name: "updateJobScheduler", + content, + keys: 12 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/updateProgress-3.js +var require_updateProgress_3 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/updateProgress-3.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.updateProgress = void 0; + var content = `--[[ + Update job progress + Input: + KEYS[1] Job id key + KEYS[2] event stream key + KEYS[3] meta key + ARGV[1] id + ARGV[2] progress + Output: + 0 - OK + -1 - Missing job. + Event: + progress(jobId, progress) +]] +local rcall = redis.call +-- Includes +--[[ + Function to get max events value or set by default 10000. +]] +local function getOrSetMaxEvents(metaKey) + local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents") + if not maxEvents then + maxEvents = 10000 + rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents) + end + return maxEvents +end +if rcall("EXISTS", KEYS[1]) == 1 then -- // Make sure job exists + local maxEvents = getOrSetMaxEvents(KEYS[3]) + rcall("HSET", KEYS[1], "progress", ARGV[2]) + rcall("XADD", KEYS[2], "MAXLEN", "~", maxEvents, "*", "event", "progress", + "jobId", ARGV[1], "data", ARGV[2]); + return 0 +else + return -1 +end +`; + exports2.updateProgress = { + name: "updateProgress", + content, + keys: 3 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/updateRepeatableJobMillis-1.js +var require_updateRepeatableJobMillis_1 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/updateRepeatableJobMillis-1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.updateRepeatableJobMillis = void 0; + var content = `--[[ + Adds a repeatable job + Input: + KEYS[1] 'repeat' key + ARGV[1] next milliseconds + ARGV[2] custom key + ARGV[3] legacy custom key TODO: remove this logic in next breaking change + Output: + repeatableKey - OK +]] +local rcall = redis.call +local repeatKey = KEYS[1] +local nextMillis = ARGV[1] +local customKey = ARGV[2] +local legacyCustomKey = ARGV[3] +if rcall("ZSCORE", repeatKey, customKey) then + rcall("ZADD", repeatKey, nextMillis, customKey) + return customKey +elseif rcall("ZSCORE", repeatKey, legacyCustomKey) ~= false then + rcall("ZADD", repeatKey, nextMillis, legacyCustomKey) + return legacyCustomKey +end +return '' +`; + exports2.updateRepeatableJobMillis = { + name: "updateRepeatableJobMillis", + content, + keys: 1 + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/index.js +var require_scripts2 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/scripts/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_addDelayedJob_6(), exports2); + tslib_1.__exportStar(require_addJobScheduler_11(), exports2); + tslib_1.__exportStar(require_addLog_2(), exports2); + tslib_1.__exportStar(require_addParentJob_6(), exports2); + tslib_1.__exportStar(require_addPrioritizedJob_9(), exports2); + tslib_1.__exportStar(require_addRepeatableJob_2(), exports2); + tslib_1.__exportStar(require_addStandardJob_9(), exports2); + tslib_1.__exportStar(require_changeDelay_4(), exports2); + tslib_1.__exportStar(require_changePriority_7(), exports2); + tslib_1.__exportStar(require_cleanJobsInSet_3(), exports2); + tslib_1.__exportStar(require_drain_5(), exports2); + tslib_1.__exportStar(require_extendLock_2(), exports2); + tslib_1.__exportStar(require_extendLocks_1(), exports2); + tslib_1.__exportStar(require_getCounts_1(), exports2); + tslib_1.__exportStar(require_getCountsPerPriority_4(), exports2); + tslib_1.__exportStar(require_getDependencyCounts_4(), exports2); + tslib_1.__exportStar(require_getJobScheduler_1(), exports2); + tslib_1.__exportStar(require_getJobs_1(), exports2); + tslib_1.__exportStar(require_getMetrics_2(), exports2); + tslib_1.__exportStar(require_getRanges_1(), exports2); + tslib_1.__exportStar(require_getRateLimitTtl_2(), exports2); + tslib_1.__exportStar(require_getState_8(), exports2); + tslib_1.__exportStar(require_getStateV2_8(), exports2); + tslib_1.__exportStar(require_isFinished_3(), exports2); + tslib_1.__exportStar(require_isJobInList_1(), exports2); + tslib_1.__exportStar(require_isMaxed_2(), exports2); + tslib_1.__exportStar(require_moveJobFromActiveToWait_9(), exports2); + tslib_1.__exportStar(require_moveJobsToWait_8(), exports2); + tslib_1.__exportStar(require_moveStalledJobsToWait_9(), exports2); + tslib_1.__exportStar(require_moveToActive_11(), exports2); + tslib_1.__exportStar(require_moveToDelayed_12(), exports2); + tslib_1.__exportStar(require_moveToFinished_14(), exports2); + tslib_1.__exportStar(require_moveToWaitingChildren_7(), exports2); + tslib_1.__exportStar(require_obliterate_2(), exports2); + tslib_1.__exportStar(require_paginate_1(), exports2); + tslib_1.__exportStar(require_pause_7(), exports2); + tslib_1.__exportStar(require_promote_9(), exports2); + tslib_1.__exportStar(require_releaseLock_1(), exports2); + tslib_1.__exportStar(require_removeChildDependency_1(), exports2); + tslib_1.__exportStar(require_removeDeduplicationKey_1(), exports2); + tslib_1.__exportStar(require_removeJob_2(), exports2); + tslib_1.__exportStar(require_removeJobScheduler_3(), exports2); + tslib_1.__exportStar(require_removeOrphanedJobs_1(), exports2); + tslib_1.__exportStar(require_removeRepeatable_3(), exports2); + tslib_1.__exportStar(require_removeUnprocessedChildren_2(), exports2); + tslib_1.__exportStar(require_reprocessJob_8(), exports2); + tslib_1.__exportStar(require_retryJob_11(), exports2); + tslib_1.__exportStar(require_saveStacktrace_1(), exports2); + tslib_1.__exportStar(require_updateData_1(), exports2); + tslib_1.__exportStar(require_updateJobScheduler_12(), exports2); + tslib_1.__exportStar(require_updateProgress_3(), exports2); + tslib_1.__exportStar(require_updateRepeatableJobMillis_1(), exports2); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/ioredis-client.js +var require_ioredis_client = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/ioredis-client.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createIORedisClient = createIORedisClient; + exports2.isIRedisClient = isIRedisClient; + var proxyCache = /* @__PURE__ */ new WeakMap(); + function createIORedisClient(client) { + if (client.__bullmq_iredis === true) { + return client; + } + const cached = proxyCache.get(client); + if (cached) { + return cached; + } + const isCluster = client.isCluster === true; + const boundCache = /* @__PURE__ */ new Map(); + const overrides = /* @__PURE__ */ Object.create(null); + overrides.__bullmq_iredis = true; + overrides.isCluster = isCluster; + overrides.runCommand = (name, args) => { + return client[name](args); + }; + overrides.pipeline = (...args) => { + return augmentTransaction(client.pipeline(...args)); + }; + overrides.multi = (...args) => { + return augmentTransaction(client.multi(...args)); + }; + if (typeof client.duplicate === "function") { + overrides.duplicate = (opts) => { + var _a; + if (isCluster) { + const existingRedisOpts = ((_a = client.options) === null || _a === void 0 ? void 0 : _a.redisOptions) || {}; + const mergedRedisOpts = opts ? Object.assign(Object.assign({}, existingRedisOpts), opts) : existingRedisOpts; + return createIORedisClient(client.duplicate(void 0, { + redisOptions: mergedRedisOpts + })); + } + return createIORedisClient(client.duplicate(opts)); + }; + } + overrides.hset = (key, dataOrField, ...rest) => { + if (typeof dataOrField === "string") { + return client.hset(key, dataOrField, ...rest); + } + const args = [key]; + for (const [f, v] of Object.entries(dataOrField)) { + args.push(f, v); + } + return client.hset(...args); + }; + overrides.set = (key, value, optionsOrModifier, ...rest) => { + if (typeof optionsOrModifier === "string" || optionsOrModifier == null) { + return client.set(key, value, ...optionsOrModifier != null ? [optionsOrModifier, ...rest] : []); + } + const args = [key, value]; + if (optionsOrModifier.PX != null) { + args.push("PX", optionsOrModifier.PX); + } else if (optionsOrModifier.EX != null) { + args.push("EX", optionsOrModifier.EX); + } + return client.set(...args); + }; + overrides.zrange = (key, start, end, optionsOrStr, ...rest) => { + if (typeof optionsOrStr === "string") { + return client.zrange(key, start, end, optionsOrStr, ...rest); + } + if (optionsOrStr === null || optionsOrStr === void 0 ? void 0 : optionsOrStr.WITHSCORES) { + return client.zrange(key, start, end, "WITHSCORES"); + } + return client.zrange(key, start, end); + }; + overrides.zrevrange = (key, start, end, optionsOrStr, ...rest) => { + if (typeof optionsOrStr === "string") { + return client.zrevrange(key, start, end, optionsOrStr, ...rest); + } + if (optionsOrStr === null || optionsOrStr === void 0 ? void 0 : optionsOrStr.WITHSCORES) { + return client.zrevrange(key, start, end, "WITHSCORES"); + } + return client.zrevrange(key, start, end); + }; + overrides.xadd = (key, idOrModifier, fieldsOrArg, ...rest) => { + if (typeof fieldsOrArg === "string") { + return client.xadd(key, idOrModifier, fieldsOrArg, ...rest); + } + const options = rest[0]; + const args = [key]; + if ((options === null || options === void 0 ? void 0 : options.MAXLEN) != null) { + args.push("MAXLEN"); + if (options.approximate !== false) { + args.push("~"); + } + args.push(options.MAXLEN); + } + args.push(idOrModifier); + for (const [f, v] of Object.entries(fieldsOrArg)) { + args.push(f, v); + } + return client.xadd(...args); + }; + overrides.xread = (streamsOrModifier, ...rest) => { + if (typeof streamsOrModifier === "string") { + return client.xread(streamsOrModifier, ...rest); + } + const options = rest[0]; + const args = []; + if ((options === null || options === void 0 ? void 0 : options.BLOCK) != null) { + args.push("BLOCK", options.BLOCK); + } + if ((options === null || options === void 0 ? void 0 : options.COUNT) != null) { + args.push("COUNT", options.COUNT); + } + args.push("STREAMS"); + for (const s of streamsOrModifier) { + args.push(s.key); + } + for (const s of streamsOrModifier) { + args.push(s.id); + } + return client.xread(...args); + }; + overrides.xtrim = (key, strategy, thresholdOrApprox, ...rest) => { + if (typeof thresholdOrApprox === "string" || rest.length === 0) { + return client.xtrim(key, strategy, thresholdOrApprox, ...rest); + } + const options = rest[0]; + const args = [key, strategy]; + if ((options === null || options === void 0 ? void 0 : options.approximate) !== false) { + args.push("~"); + } + args.push(thresholdOrApprox); + return client.xtrim(...args); + }; + overrides.clientSetName = (name) => client.client("SETNAME", name); + overrides.clientList = () => client.client("LIST"); + overrides.scan = (cursor, ...rest) => { + if (rest.length === 0 || typeof rest[0] === "string" || typeof rest[0] === "function") { + return client.scan(cursor, ...rest); + } + const options = rest[0]; + const args = [cursor]; + if ((options === null || options === void 0 ? void 0 : options.MATCH) != null) { + args.push("MATCH", options.MATCH); + } + if ((options === null || options === void 0 ? void 0 : options.COUNT) != null) { + args.push("COUNT", options.COUNT); + } + return client.scan(...args); + }; + const proxy = new Proxy(client, { + get(target, prop) { + if (prop in overrides) { + return overrides[prop]; + } + const value = Reflect.get(target, prop, target); + if (typeof value !== "function") { + return value; + } + if (Object.prototype.hasOwnProperty.call(target, prop)) { + return value.bind(target); + } + const cachedBound = boundCache.get(prop); + if (cachedBound !== void 0) { + return cachedBound; + } + const bound = value.bind(target); + boundCache.set(prop, bound); + return bound; + }, + set(target, prop, value) { + if (prop in overrides) { + overrides[prop] = value; + return true; + } + boundCache.delete(prop); + return Reflect.set(target, prop, value); + }, + deleteProperty(target, prop) { + if (prop in overrides) { + return false; + } + boundCache.delete(prop); + return Reflect.deleteProperty(target, prop); + }, + has(target, prop) { + return prop in overrides || Reflect.has(target, prop); + } + }); + proxyCache.set(client, proxy); + return proxy; + } + function augmentTransaction(commander) { + const transaction = commander; + transaction.runCommand = function(name, args) { + transaction[name](args); + return transaction; + }; + const origHset = transaction.hset.bind(transaction); + transaction.hset = function(key, data) { + const args = [key]; + for (const [f, v] of Object.entries(data)) { + args.push(f, v); + } + origHset(...args); + return transaction; + }; + const origHscan = transaction.hscan.bind(transaction); + transaction.hscan = function(key, cursor, options) { + if ((options === null || options === void 0 ? void 0 : options.COUNT) != null) { + origHscan(key, cursor, "COUNT", options.COUNT); + } else { + origHscan(key, cursor); + } + return transaction; + }; + const origSscan = transaction.sscan.bind(transaction); + transaction.sscan = function(key, cursor, options) { + if ((options === null || options === void 0 ? void 0 : options.COUNT) != null) { + origSscan(key, cursor, "COUNT", options.COUNT); + } else { + origSscan(key, cursor); + } + return transaction; + }; + return transaction; + } + function isIRedisClient(obj2) { + if (!obj2 || typeof obj2 !== "object") { + return false; + } + if (obj2.__bullmq_iredis === true) { + return true; + } + return typeof obj2.runCommand === "function" && typeof obj2.defineCommand === "function" && typeof obj2.pipeline === "function" && typeof obj2.multi === "function" && typeof obj2.duplicate === "function" && typeof obj2.scanStream === "function" && typeof obj2.connect === "function" && typeof obj2.disconnect === "function" && typeof obj2.on === "function" && typeof obj2.status === "string" && typeof obj2.isCluster === "boolean"; + } + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/redis-connection.js +var require_redis_connection = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/redis-connection.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RedisConnection = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var events_1 = require("events"); + var ioredis_1 = require_built3(); + var utils_1 = require_utils15(); + var utils_2 = require_utils16(); + var version_1 = require_version(); + var scripts = require_scripts2(); + var ioredis_client_1 = require_ioredis_client(); + var connection_closed_error_1 = require_connection_closed_error(); + var overrideMessage = [ + "BullMQ: WARNING! Your redis options maxRetriesPerRequest must be null", + "and will be overridden by BullMQ." + ].join(" "); + var deprecationMessage = "BullMQ: Your redis options maxRetriesPerRequest must be null."; + var clusterReconnectPromise = Symbol("bullmqClusterReconnectPromise"); + var clusterPatchedForBlocking = Symbol("bullmqClusterPatchedForBlocking"); + var clusterOriginalBzpopmin = Symbol("bullmqClusterOriginalBzpopmin"); + var clusterWrappedBzpopmin = Symbol("bullmqClusterWrappedBzpopmin"); + var clusterPatchRefCount = Symbol("bullmqClusterPatchRefCount"); + var clusterClosingRefCount = Symbol("bullmqClusterClosingRefCount"); + var DEFAULT_CLUSTER_RECONNECT_TIMEOUT_MS = 3e4; + var RedisConnection = class _RedisConnection extends events_1.EventEmitter { + constructor(opts, extraOptions) { + super(); + this.extraOptions = extraOptions; + this.capabilities = { + canDoubleTimeout: false, + canBlockFor1Ms: true + }; + this.status = "initializing"; + this.dbType = "redis"; + this.packageVersion = version_1.version; + this.disabledBlockingClusterReconnect = false; + this.extraOptions = Object.assign({ shared: false, blocking: true, skipVersionCheck: false, skipWaitingForReady: false, clusterReconnectTimeoutMs: DEFAULT_CLUSTER_RECONNECT_TIMEOUT_MS }, extraOptions); + if (!(0, utils_2.isRedisInstance)(opts)) { + this.checkBlockingOptions(overrideMessage, opts); + this.opts = Object.assign({ port: 6379, host: "127.0.0.1", retryStrategy: function(times) { + return Math.max(Math.min(Math.exp(times), 2e4), 1e3); + } }, opts); + if (this.extraOptions.blocking) { + this.opts.maxRetriesPerRequest = null; + } + } else { + this._client = (0, ioredis_client_1.isIRedisClient)(opts) ? opts : (0, ioredis_client_1.createIORedisClient)(opts); + if (this._client.options.keyPrefix) { + throw new Error("BullMQ: ioredis does not support ioredis prefixes, use the prefix option instead."); + } + if (this._client.isCluster) { + this.opts = this._client.options.redisOptions; + } else { + this.opts = this._client.options; + } + this.checkBlockingOptions(deprecationMessage, this.opts, true); + } + this.skipVersionCheck = (extraOptions === null || extraOptions === void 0 ? void 0 : extraOptions.skipVersionCheck) || !!(this.opts && this.opts.skipVersionCheck); + this.handleClientError = (err) => { + this.emit("error", err); + }; + this.handleClientClose = () => { + this.emit("close"); + }; + this.handleClientReady = () => { + this.emit("ready"); + }; + this.initializing = this.init(); + this.initializing.catch((err) => this.emit("error", err)); + } + checkBlockingOptions(msg, options, throwError = false) { + if (this.extraOptions.blocking && options && options.maxRetriesPerRequest) { + if (throwError) { + throw new Error(msg); + } else { + console.error(msg); + } + } + } + /** + * Waits for a redis client to be ready. + * @param redis - client + */ + static async waitUntilReady(client) { + if (client.status === "ready") { + return; + } + if (client.status === "connect" && (0, utils_2.isRedisCluster)(client)) { + return; + } + if (client.status === "wait") { + return client.connect(); + } + if (client.status === "end") { + throw new connection_closed_error_1.ConnectionClosedError(utils_1.CONNECTION_CLOSED_ERROR_MSG); + } + let handleReady; + let handleEnd; + let handleError; + try { + await new Promise((resolve, reject) => { + let lastError; + handleError = (err) => { + lastError = err; + }; + handleReady = () => { + resolve(); + }; + handleEnd = () => { + if (client.status !== "end") { + reject(lastError || new connection_closed_error_1.ConnectionClosedError(utils_1.CONNECTION_CLOSED_ERROR_MSG)); + } else { + if (lastError) { + reject(lastError); + } else { + resolve(); + } + } + }; + (0, utils_2.increaseMaxListeners)(client, 3); + client.once("ready", handleReady); + client.on("end", handleEnd); + client.once("error", handleError); + }); + } finally { + client.removeListener("end", handleEnd); + client.removeListener("error", handleError); + client.removeListener("ready", handleReady); + (0, utils_2.decreaseMaxListeners)(client, 3); + } + } + get client() { + return this.initializing; + } + loadCommands(packageVersion, providedScripts) { + const finalScripts = providedScripts || scripts; + for (const property in finalScripts) { + const commandName = `${finalScripts[property].name}:${packageVersion}`; + if (!this._client[commandName]) { + this._client.defineCommand(commandName, { + numberOfKeys: finalScripts[property].keys, + lua: finalScripts[property].content + }); + } + } + } + async init() { + if (!this._client) { + if (_RedisConnection.clientFactory) { + this._client = _RedisConnection.clientFactory(this.opts); + } else { + const _a = this.opts, { url } = _a, rest = tslib_1.__rest(_a, ["url"]); + const ioredisClient = url ? new ioredis_1.default(url, rest) : new ioredis_1.default(rest); + this._client = (0, ioredis_client_1.createIORedisClient)(ioredisClient); + } + } + (0, utils_2.increaseMaxListeners)(this._client, 3); + this._client.on("error", this.handleClientError); + this._client.on("close", this.handleClientClose); + this._client.on("ready", this.handleClientReady); + this.patchBlockingClusterClient(); + if (!this.extraOptions.skipWaitingForReady) { + await _RedisConnection.waitUntilReady(this._client); + } + this.loadCommands(this.packageVersion); + if (this._client["status"] !== "end") { + const versionResult = await this.getRedisVersionAndType(); + this.version = versionResult.version; + this.dbType = versionResult.databaseType; + if (this.skipVersionCheck !== true && !this.closing) { + if ((0, utils_2.isRedisVersionLowerThan)(this.version, _RedisConnection.minimumVersion, this.dbType)) { + throw new Error(`Redis version needs to be greater or equal than ${_RedisConnection.minimumVersion} Current: ${this.version}`); + } + if ((0, utils_2.isRedisVersionLowerThan)(this.version, _RedisConnection.recommendedMinimumVersion, this.dbType)) { + console.warn(`It is highly recommended to use a minimum Redis version of ${_RedisConnection.recommendedMinimumVersion} + Current: ${this.version}`); + } + } + this.capabilities = { + canDoubleTimeout: !(0, utils_2.isRedisVersionLowerThan)(this.version, "6.0.0", this.dbType), + canBlockFor1Ms: !(0, utils_2.isRedisVersionLowerThan)(this.version, "7.0.8", this.dbType) + }; + this.status = "ready"; + } + return this._client; + } + patchBlockingClusterClient() { + var _a; + const client = this._client; + const blockingClient = client; + if (!this.extraOptions.blocking || !(0, utils_2.isRedisCluster)(client) || typeof blockingClient.bzpopmin !== "function") { + return; + } + const reconnectTimeoutMs = (_a = this.extraOptions.clusterReconnectTimeoutMs) !== null && _a !== void 0 ? _a : DEFAULT_CLUSTER_RECONNECT_TIMEOUT_MS; + blockingClient[clusterPatchRefCount] = (blockingClient[clusterPatchRefCount] || 0) + 1; + this.patchedBlockingClusterClient = blockingClient; + if (blockingClient[clusterPatchedForBlocking]) { + return; + } + const bzpopmin = blockingClient.bzpopmin; + const wrappedBzpopmin = async (...args) => { + await _RedisConnection.reconnectClusterIfNeeded(blockingClient, reconnectTimeoutMs); + try { + return await bzpopmin.apply(blockingClient, args); + } catch (error) { + const commandError = error; + if (_RedisConnection.shouldReconnectClusterAfterError(blockingClient, commandError)) { + try { + await _RedisConnection.reconnectCluster(blockingClient, reconnectTimeoutMs); + } catch (_a2) { + } + } + throw commandError; + } + }; + blockingClient[clusterOriginalBzpopmin] = bzpopmin; + blockingClient[clusterWrappedBzpopmin] = wrappedBzpopmin; + blockingClient[clusterPatchedForBlocking] = true; + blockingClient.bzpopmin = wrappedBzpopmin; + } + disableBlockingClusterReconnect() { + const client = this.patchedBlockingClusterClient; + if (!client || this.disabledBlockingClusterReconnect) { + return; + } + client[clusterClosingRefCount] = (client[clusterClosingRefCount] || 0) + 1; + this.disabledBlockingClusterReconnect = true; + } + releaseBlockingClusterClientPatch() { + const client = this.patchedBlockingClusterClient; + if (!client) { + return; + } + if (this.disabledBlockingClusterReconnect) { + const closingRefCount = (client[clusterClosingRefCount] || 1) - 1; + if (closingRefCount > 0) { + client[clusterClosingRefCount] = closingRefCount; + } else { + delete client[clusterClosingRefCount]; + } + this.disabledBlockingClusterReconnect = false; + } + const patchRefCount = (client[clusterPatchRefCount] || 1) - 1; + if (patchRefCount > 0) { + client[clusterPatchRefCount] = patchRefCount; + this.patchedBlockingClusterClient = void 0; + return; + } + if (client[clusterOriginalBzpopmin] && client.bzpopmin === client[clusterWrappedBzpopmin]) { + client.bzpopmin = client[clusterOriginalBzpopmin]; + } + delete client[clusterPatchRefCount]; + delete client[clusterClosingRefCount]; + delete client[clusterOriginalBzpopmin]; + delete client[clusterWrappedBzpopmin]; + delete client[clusterPatchedForBlocking]; + this.patchedBlockingClusterClient = void 0; + } + static isClusterWithEmptyNodes(client) { + return typeof client.nodes === "function" && client.nodes().length === 0; + } + static isReconnectingDisabled(client) { + const patchRefCount = client[clusterPatchRefCount] || 0; + const closingRefCount = client[clusterClosingRefCount] || 0; + return patchRefCount === 0 || closingRefCount >= patchRefCount || client.status === "end" || client.status === "closing"; + } + static async reconnectClusterIfNeeded(client, timeoutMs) { + if (!_RedisConnection.isReconnectingDisabled(client) && _RedisConnection.isClusterWithEmptyNodes(client)) { + await _RedisConnection.reconnectCluster(client, timeoutMs); + } + } + static shouldReconnectClusterAfterError(client, error) { + var _a, _b; + if (_RedisConnection.isReconnectingDisabled(client)) { + return false; + } + const message = [ + error.message, + (_a = error.cause) === null || _a === void 0 ? void 0 : _a.message, + (_b = error.lastNodeError) === null || _b === void 0 ? void 0 : _b.message + ].join(" "); + return _RedisConnection.isClusterWithEmptyNodes(client) || /Command timed out|Failed to refresh slots cache/i.test(message); + } + static async reconnectCluster(client, timeoutMs) { + if (_RedisConnection.isReconnectingDisabled(client)) { + return; + } + if (!client[clusterReconnectPromise]) { + client[clusterReconnectPromise] = _RedisConnection.connectClusterWithTimeout(client, timeoutMs).finally(() => { + client[clusterReconnectPromise] = null; + }); + } + await client[clusterReconnectPromise]; + } + // Disconnects and reconnects a cluster client, racing connect() against a + // hard cap so a hung reconnect cannot pin `clusterReconnectPromise` + // indefinitely. On timeout, the underlying connect() is left running + // (ioredis Cluster handles its own retry/state); we simply stop awaiting it. + // The next bzpopmin call's `reconnectClusterIfNeeded` check will trigger a + // fresh reconnect if the pool is still empty. + static async connectClusterWithTimeout(client, timeoutMs) { + client.disconnect(false); + let timeoutHandle; + try { + await Promise.race([ + client.connect(), + new Promise((_2, reject) => { + var _a; + timeoutHandle = setTimeout(() => { + reject(new connection_closed_error_1.ConnectionClosedError(`BullMQ: cluster reconnect timed out after ${timeoutMs}ms`)); + }, timeoutMs); + (_a = timeoutHandle.unref) === null || _a === void 0 ? void 0 : _a.call(timeoutHandle); + }) + ]); + } finally { + if (timeoutHandle) { + clearTimeout(timeoutHandle); + } + } + } + async disconnect(wait = true) { + const client = await this.client; + if (client.status !== "end") { + let _resolve, _reject; + if (!wait) { + return client.disconnect(); + } + const disconnecting = new Promise((resolve, reject) => { + (0, utils_2.increaseMaxListeners)(client, 2); + client.once("end", resolve); + client.once("error", reject); + _resolve = resolve; + _reject = reject; + }); + client.disconnect(); + try { + await disconnecting; + } finally { + (0, utils_2.decreaseMaxListeners)(client, 2); + client.removeListener("end", _resolve); + client.removeListener("error", _reject); + } + } + } + async reconnect() { + const client = await this.client; + for (; ; ) { + if (client.status === "ready" || client.status === "connect" && (0, utils_2.isRedisCluster)(client)) { + return; + } + if (client.status === "wait" || client.status === "end") { + return client.connect(); + } + try { + await _RedisConnection.waitUntilReady(client); + } catch (error) { + if (!["end", "connecting", "connect", "reconnecting"].includes(client.status)) { + throw error; + } + } + } + } + async close(force = false) { + var _a; + if (!this.closing) { + const status = this.status; + this.status = "closing"; + this.closing = true; + this.disableBlockingClusterReconnect(); + try { + if (status === "ready") { + await this.initializing; + } + if (!this.extraOptions.shared) { + if (status == "initializing" || force) { + this._client.disconnect(); + (_a = this.initializing) === null || _a === void 0 ? void 0 : _a.catch(() => { + }); + } else { + await this._client.quit(); + } + this._client["status"] = "end"; + } + } catch (error) { + if ((0, utils_2.isNotConnectionError)(error)) { + throw error; + } + } finally { + this.releaseBlockingClusterClientPatch(); + this._client.off("error", this.handleClientError); + this._client.off("close", this.handleClientClose); + this._client.off("ready", this.handleClientReady); + (0, utils_2.decreaseMaxListeners)(this._client, 3); + this.removeAllListeners(); + this.status = "closed"; + } + } + } + async getRedisVersionAndType() { + if (this.skipVersionCheck) { + return { + version: _RedisConnection.minimumVersion, + databaseType: "redis" + }; + } + const doc = await this._client.info(); + const redisPrefix = "redis_version:"; + const maxMemoryPolicyPrefix = "maxmemory_policy:"; + const lines = doc.split(/\r?\n/); + let redisVersion; + let databaseType = "redis"; + for (let i = 0; i < lines.length; i++) { + const line = lines[i]; + if (line.includes("dragonfly_version:") || line.includes("server:Dragonfly")) { + databaseType = "dragonfly"; + if (line.indexOf("dragonfly_version:") === 0) { + redisVersion = line.substr("dragonfly_version:".length); + } + } else if (line.includes("valkey_version:") || line.includes("server:Valkey")) { + databaseType = "valkey"; + if (line.indexOf("valkey_version:") === 0) { + redisVersion = line.substr("valkey_version:".length); + } + } else if (line.indexOf(redisPrefix) === 0) { + redisVersion = line.substr(redisPrefix.length); + if (databaseType === "redis") { + databaseType = "redis"; + } + } + if (line.indexOf(maxMemoryPolicyPrefix) === 0) { + const maxMemoryPolicy = line.substr(maxMemoryPolicyPrefix.length); + if (maxMemoryPolicy !== "noeviction") { + console.warn(`IMPORTANT! Eviction policy is ${maxMemoryPolicy}. It should be "noeviction"`); + } + } + } + if (!redisVersion) { + for (const line of lines) { + if (line.includes("version:")) { + const parts = line.split(":"); + if (parts.length >= 2) { + redisVersion = parts[1]; + break; + } + } + } + } + return { + version: redisVersion || _RedisConnection.minimumVersion, + databaseType + }; + } + get redisVersion() { + return this.version; + } + get databaseType() { + return this.dbType; + } + }; + exports2.RedisConnection = RedisConnection; + RedisConnection.minimumVersion = "5.0.0"; + RedisConnection.recommendedMinimumVersion = "6.2.0"; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/flow-producer.js +var require_flow_producer = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/flow-producer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FlowProducer = void 0; + var events_1 = require("events"); + var utils_1 = require_utils16(); + var create_scripts_1 = require_create_scripts(); + var job_1 = require_job(); + var queue_keys_1 = require_queue_keys(); + var redis_connection_1 = require_redis_connection(); + var enums_1 = require_enums3(); + var FlowProducer = class extends events_1.EventEmitter { + constructor(opts = { connection: {} }, Connection = redis_connection_1.RedisConnection) { + super(); + this.opts = opts; + this.queues = /* @__PURE__ */ new Map(); + this.opts = Object.assign({ prefix: "bull" }, opts); + this.connection = new Connection(opts.connection, { + shared: (0, utils_1.isRedisInstance)(opts.connection), + blocking: false, + skipVersionCheck: opts.skipVersionCheck, + skipWaitingForReady: opts.skipWaitingForReady + }); + (0, utils_1.forwardConnectionError)(this, this.connection); + this.connection.on("close", () => { + this.queues.clear(); + if (!this.closing) { + this.emit("ioredis:close"); + } + }); + this.queueKeys = new queue_keys_1.QueueKeys(opts.prefix); + if (opts === null || opts === void 0 ? void 0 : opts.telemetry) { + this.telemetry = opts.telemetry; + } + } + createScripts(queue) { + var _a; + return (_a = queue.scripts) !== null && _a !== void 0 ? _a : (0, create_scripts_1.createScripts)(queue); + } + emit(event, ...args) { + return super.emit(event, ...args); + } + off(eventName, listener) { + super.off(eventName, listener); + return this; + } + on(event, listener) { + super.on(event, listener); + return this; + } + once(event, listener) { + super.once(event, listener); + return this; + } + /** + * Returns a promise that resolves to a redis client. Normally used only by subclasses. + */ + get client() { + return this.connection.client; + } + /** + * Helper to easily extend Job class calls. + */ + get Job() { + return job_1.Job; + } + waitUntilReady() { + return this.client; + } + /** + * Adds a flow. + * + * This call would be atomic, either it fails and no jobs will + * be added to the queues, or it succeeds and all jobs will be added. + * + * @param flow - an object with a tree-like structure where children jobs + * will be processed before their parents. + * @param opts - options that will be applied to the flow object. + */ + async add(flow, opts) { + var _a; + if (this.closing) { + return; + } + const client = await this.connection.client; + const multi = client.multi(); + const parentOpts = (_a = flow === null || flow === void 0 ? void 0 : flow.opts) === null || _a === void 0 ? void 0 : _a.parent; + const parentKey = (0, utils_1.getParentKey)(parentOpts); + const parentDependenciesKey = parentKey ? `${parentKey}:dependencies` : void 0; + return (0, utils_1.trace)(this.telemetry, enums_1.SpanKind.PRODUCER, flow.queueName, "addFlow", flow.queueName, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.FlowName]: flow.name + }); + const jobsTree = await this.addNode({ + multi, + node: flow, + queuesOpts: opts === null || opts === void 0 ? void 0 : opts.queuesOptions, + parent: { + parentOpts, + parentDependenciesKey + } + }); + const results = await multi.exec(); + const [result] = results || []; + if (result) { + const [err, jobId] = result; + if (err) { + throw err; + } + if (typeof jobId === "number" && jobId < 0) { + throw this.toFlowError(jobId, parentKey); + } + if (typeof jobId === "string") { + jobsTree.job.id = jobId; + } else if (typeof jobId === "number") { + jobsTree.job.id = jobId.toString(); + } + } + return jobsTree; + }); + } + /** + * Get a flow. + * + * @param opts - an object with options for getting a JobNode. + */ + async getFlow(opts) { + if (this.closing) { + return; + } + const client = await this.connection.client; + const updatedOpts = Object.assign({ + depth: 10, + maxChildren: 20, + prefix: this.opts.prefix + }, opts); + const jobsTree = this.getNode(client, updatedOpts); + return jobsTree; + } + /** + * Adds multiple flows. + * + * A flow is a tree-like structure of jobs that depend on each other. + * Whenever the children of a given parent are completed, the parent + * will be processed, being able to access the children's result data. + * + * All Jobs can be in different queues, either children or parents. + * If a flow fails to be added, other flows in the batch may still be added. + * + * @param flows - an array of objects with a tree-like structure where children jobs + * will be processed before their parents. + */ + async addBulk(flows) { + if (this.closing) { + return; + } + const client = await this.connection.client; + const multi = client.multi(); + return (0, utils_1.trace)(this.telemetry, enums_1.SpanKind.PRODUCER, "", "addBulkFlows", "", async (span) => { + var _a, _b; + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.BulkCount]: flows.length, + [enums_1.TelemetryAttributes.BulkNames]: flows.map((flow) => flow.name).join(",") + }); + const jobsTrees = await this.addNodes(multi, flows); + const results = await multi.exec(); + for (let index = 0; index < jobsTrees.length; ++index) { + const result = results === null || results === void 0 ? void 0 : results[index]; + if (!result) { + continue; + } + const [err, jobId] = result; + if (err) { + throw err; + } + if (typeof jobId === "number" && jobId < 0) { + throw this.toFlowError(jobId, (0, utils_1.getParentKey)((_b = (_a = flows[index]) === null || _a === void 0 ? void 0 : _a.opts) === null || _b === void 0 ? void 0 : _b.parent)); + } + if (typeof jobId === "string") { + jobsTrees[index].job.id = jobId; + } else if (typeof jobId === "number") { + jobsTrees[index].job.id = jobId.toString(); + } + } + return jobsTrees; + }); + } + /** + * Add a node (job) of a flow to the queue. This method will recursively + * add all its children as well. Note that a given job can potentially be + * a parent and a child job at the same time depending on where it is located + * in the tree hierarchy. + * + * @param multi - IRedisTransaction + * @param node - the node representing a job to be added to some queue + * @param parent - parent data sent to children to create the "links" to their parent + * @returns + */ + async addNode({ multi, node, parent, queuesOpts }) { + var _a, _b; + const prefix = node.prefix || this.opts.prefix; + const queue = this.queueFromNode(node, new queue_keys_1.QueueKeys(prefix), prefix); + const queueOpts = queuesOpts && queuesOpts[node.queueName]; + const jobsOpts = (_a = queueOpts === null || queueOpts === void 0 ? void 0 : queueOpts.defaultJobOptions) !== null && _a !== void 0 ? _a : {}; + const jobId = ((_b = node.opts) === null || _b === void 0 ? void 0 : _b.jobId) || (0, utils_1.randomUUID)(); + return (0, utils_1.trace)(this.telemetry, enums_1.SpanKind.PRODUCER, node.queueName, "addNode", node.queueName, async (span, srcPropagationMetadata) => { + var _a2, _b2; + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.JobName]: node.name, + [enums_1.TelemetryAttributes.JobId]: jobId + }); + const opts = node.opts; + let telemetry = opts === null || opts === void 0 ? void 0 : opts.telemetry; + if (srcPropagationMetadata && opts) { + const omitContext = (_a2 = opts.telemetry) === null || _a2 === void 0 ? void 0 : _a2.omitContext; + const telemetryMetadata = ((_b2 = opts.telemetry) === null || _b2 === void 0 ? void 0 : _b2.metadata) || !omitContext && srcPropagationMetadata; + if (telemetryMetadata || omitContext) { + telemetry = { + metadata: telemetryMetadata, + omitContext + }; + } + } + const job = new this.Job(queue, node.name, node.data, Object.assign(Object.assign(Object.assign({}, jobsOpts), opts), { parent: parent === null || parent === void 0 ? void 0 : parent.parentOpts, telemetry }), jobId); + const parentKey = (0, utils_1.getParentKey)(parent === null || parent === void 0 ? void 0 : parent.parentOpts); + if (node.children && node.children.length > 0) { + const parentId = jobId; + const queueKeysParent = new queue_keys_1.QueueKeys(node.prefix || this.opts.prefix); + await job.addJob(multi, { + parentDependenciesKey: parent === null || parent === void 0 ? void 0 : parent.parentDependenciesKey, + addToWaitingChildren: true, + parentKey + }); + const parentDependenciesKey = `${queueKeysParent.toKey(node.queueName, parentId)}:dependencies`; + const children = await this.addChildren({ + multi, + nodes: node.children, + parent: { + parentOpts: { + id: parentId, + queue: queueKeysParent.getQueueQualifiedName(node.queueName) + }, + parentDependenciesKey + }, + queuesOpts + }); + return { job, children }; + } else { + await job.addJob(multi, { + parentDependenciesKey: parent === null || parent === void 0 ? void 0 : parent.parentDependenciesKey, + parentKey + }); + return { job }; + } + }); + } + /** + * Adds nodes (jobs) of multiple flows to the queue. This method will recursively + * add all its children as well. Note that a given job can potentially be + * a parent and a child job at the same time depending on where it is located + * in the tree hierarchy. + * + * @param multi - IRedisTransaction + * @param nodes - the nodes representing jobs to be added to some queue + * @returns + */ + addNodes(multi, nodes) { + return Promise.all(nodes.map((node) => { + var _a; + const parentOpts = (_a = node === null || node === void 0 ? void 0 : node.opts) === null || _a === void 0 ? void 0 : _a.parent; + const parentKey = (0, utils_1.getParentKey)(parentOpts); + const parentDependenciesKey = parentKey ? `${parentKey}:dependencies` : void 0; + return this.addNode({ + multi, + node, + parent: { + parentOpts, + parentDependenciesKey + } + }); + })); + } + async getNode(client, node) { + const queue = this.queueFromNode(node, new queue_keys_1.QueueKeys(node.prefix), node.prefix); + const job = await this.Job.fromId(queue, node.id); + if (job) { + const { processed = {}, unprocessed = [], failed = [], ignored = {} } = await job.getDependencies({ + failed: { + count: node.maxChildren + }, + processed: { + count: node.maxChildren + }, + unprocessed: { + count: node.maxChildren + }, + ignored: { + count: node.maxChildren + } + }); + const processedKeys = Object.keys(processed); + const ignoredKeys = Object.keys(ignored); + const childrenCount = processedKeys.length + unprocessed.length + ignoredKeys.length + failed.length; + const newDepth = node.depth - 1; + if (childrenCount > 0 && newDepth) { + const children = await this.getChildren(client, [...processedKeys, ...unprocessed, ...failed, ...ignoredKeys], newDepth, node.maxChildren); + return { job, children }; + } else { + return { job }; + } + } + } + addChildren({ multi, nodes, parent, queuesOpts }) { + return Promise.all(nodes.map((node) => this.addNode({ multi, node, parent, queuesOpts }))); + } + getChildren(client, childrenKeys, depth, maxChildren) { + const getChild = (key) => { + const [prefix, queueName, id] = key.split(":"); + return this.getNode(client, { + id, + queueName, + prefix, + depth, + maxChildren + }); + }; + return Promise.all([...childrenKeys.map(getChild)]); + } + /** + * Helper factory method that creates a queue-like object + * required to create jobs in any queue. + * + * @param node - The flow node containing the queue name and other job options. + * @param queueKeys - The queue keys helper used to resolve key names. + * @param prefix - The Redis key prefix used for the queue. + * @returns A queue-like object with the client, keys, and options needed to create jobs. + */ + queueFromNode(node, queueKeys, prefix) { + const cacheKey = `${prefix}:${node.queueName}`; + const cached = this.queues.get(cacheKey); + if (cached) { + return cached; + } + const flowProducer = this; + const queue = { + client: this.connection.client, + name: node.queueName, + keys: queueKeys.getKeys(node.queueName), + toKey: (type) => queueKeys.toKey(node.queueName, type), + opts: { prefix, connection: {} }, + qualifiedName: queueKeys.getQueueQualifiedName(node.queueName), + get closing() { + return flowProducer.closing; + }, + waitUntilReady: async () => this.connection.client, + removeListener: this.removeListener.bind(this), + emit: this.emit.bind(this), + on: this.on.bind(this), + get redisVersion() { + return flowProducer.connection.redisVersion; + }, + get databaseType() { + return flowProducer.connection.databaseType; + }, + trace: async () => { + } + }; + queue.scripts = this.createScripts(queue); + this.queues.set(cacheKey, queue); + return queue; + } + /** + * Translates numeric addJob Lua error codes returned by root flow exec. + * + * @param code - Numeric error code returned from Redis. + * @param parentKey - Parent key for contextual error messages. + */ + toFlowError(code, parentKey) { + let error; + switch (code) { + case enums_1.ErrorCode.ParentJobNotExist: + error = new Error(`Missing key for parent job ${parentKey}. addJob`); + break; + case enums_1.ErrorCode.ParentJobCannotBeReplaced: + error = new Error(`The parent job ${parentKey} cannot be replaced. addJob`); + break; + default: + error = new Error(`Unknown code ${code} error for addJob`); + } + error.code = code; + return error; + } + /** + * + * Closes the connection and returns a promise that resolves when the connection is closed. + */ + async close() { + if (!this.closing) { + this.queues.clear(); + this.closing = this.connection.close(); + } + await this.closing; + } + /** + * + * Force disconnects a connection. + */ + disconnect() { + return this.connection.disconnect(); + } + }; + exports2.FlowProducer = FlowProducer; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/node-redis-client.js +var require_node_redis_client = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/node-redis-client.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createNodeRedisClient = createNodeRedisClient; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var crypto_1 = require("crypto"); + var events_1 = require("events"); + var stream_1 = require("stream"); + var connection_closed_error_1 = require_connection_closed_error(); + function normalizeScriptArgs(args) { + return args.length === 1 && Array.isArray(args[0]) ? args[0] : args; + } + function isConnectionClosedError(err) { + return (err === null || err === void 0 ? void 0 : err.message) === "Disconnects client" || (err === null || err === void 0 ? void 0 : err.message) === "The client is closed" || (err === null || err === void 0 ? void 0 : err.message) === "Connection is closed."; + } + function createNodeRedisClient(client) { + return new NodeRedisAdapter(client); + } + var NodeRedisAdapter = class _NodeRedisAdapter extends events_1.EventEmitter { + /** + * Expose connection status using the vocabulary that + * {@link RedisConnection.waitUntilReady} expects: + * 'wait' → not yet connected, call connect() + * 'ready' → usable + * 'end' → permanently closed + */ + get status() { + if (this.statusOverride) { + return this.statusOverride; + } + if (this.raw.isReady) { + return "ready"; + } + if (this.raw.isOpen) { + return "connect"; + } + return this.hasConnected ? "end" : "wait"; + } + set status(val) { + if (val === "end") { + this.destroying = true; + if (this.raw.isOpen) { + try { + this.raw.quit().catch(() => { + }); + } catch (_a) { + } + } + } + this.statusOverride = val; + } + get options() { + var _a; + return (_a = this.raw.options) !== null && _a !== void 0 ? _a : {}; + } + set options(val) { + } + constructor(raw) { + super(); + this.raw = raw; + this.scripts = /* @__PURE__ */ new Map(); + this.hasConnected = false; + this.destroying = false; + this.isCluster = false; + raw.on("ready", () => { + this.hasConnected = true; + if (this.connectionName) { + this.raw.clientSetName(this.connectionName).then(() => this.emit("ready"), () => this.emit("ready")); + } else { + this.emit("ready"); + } + }); + raw.on("error", (err) => { + if (this.destroying && isConnectionClosedError(err)) { + return; + } + this.emit("error", err); + }); + raw.on("end", () => this.emit("close")); + raw.on("reconnecting", () => this.emit("reconnecting")); + if (!raw.isOpen) { + this.connectPromise = raw.connect().then(() => { + this.connectPromise = void 0; + }, (err) => { + this.connectPromise = void 0; + }); + } + } + // --------------------------------------------------------------- + // Connection lifecycle + // --------------------------------------------------------------- + async connect() { + if (this.connectPromise) { + return this.connectPromise; + } + if (!this.raw.isOpen) { + this.connectPromise = this.raw.connect().then(() => { + this.connectPromise = void 0; + }, (err) => { + this.connectPromise = void 0; + throw err; + }); + return this.connectPromise; + } + if (!this.raw.isReady) { + await new Promise((resolve, reject) => { + const onReady = () => { + cleanup(); + resolve(); + }; + const onError = (err) => { + cleanup(); + reject(err); + }; + const onEnd = () => { + cleanup(); + reject(new Error("Connection ended before ready event")); + }; + const cleanup = () => { + this.off("ready", onReady); + this.off("error", onError); + this.off("end", onEnd); + }; + this.once("ready", onReady); + this.once("error", onError); + this.once("end", onEnd); + }); + } + } + disconnect(reconnect = false) { + this.destroying = true; + if (!reconnect) { + this.statusOverride = "end"; + } + try { + if (this.raw.isOpen) { + this.raw.destroy(); + } + } catch (_a) { + } + this.emit("close"); + if (reconnect) { + this.statusOverride = void 0; + this.emit("reconnecting"); + this.connect().catch((err) => { + if (!isConnectionClosedError(err)) { + this.emit("error", err); + } + }).finally(() => { + this.destroying = false; + }); + } else { + this.emit("end"); + } + } + async quit() { + if (this.destroying || this.statusOverride === "end") { + setImmediate(() => { + this.emit("end"); + this.emit("close"); + }); + return "OK"; + } + this.destroying = true; + try { + if (this.raw.isOpen) { + try { + await this.raw.quit(); + } catch (_a) { + } + } + } catch (_b) { + } + this.statusOverride = "end"; + setImmediate(() => { + this.emit("end"); + this.emit("close"); + }); + return "OK"; + } + duplicate(...args) { + const dup = this.raw.duplicate(); + const adapter = new _NodeRedisAdapter(dup); + for (const [name, script] of this.scripts) { + adapter.scripts.set(name, script); + adapter[name] = (...args2) => adapter.runCommand(name, args2); + } + const opts = args[0]; + if (opts && typeof opts === "object" && opts.connectionName) { + adapter.connectionName = opts.connectionName; + } + return adapter; + } + // --------------------------------------------------------------- + // Lua script engine + // --------------------------------------------------------------- + defineCommand(name, definition) { + const sha = (0, crypto_1.createHash)("sha1").update(definition.lua).digest("hex"); + this.scripts.set(name, { + sha, + lua: definition.lua, + numberOfKeys: definition.numberOfKeys + }); + this[name] = (...args) => this.runCommand(name, args); + this.raw.scriptLoad(definition.lua).catch(() => { + }); + } + async runCommand(name, args) { + var _a, _b; + const script = this.scripts.get(name); + if (!script) { + throw new Error(`BullMQ: unknown command "${name}"`); + } + const commandArgs = normalizeScriptArgs(args); + const { sha, lua, numberOfKeys } = script; + const keys = commandArgs.slice(0, numberOfKeys).map(String); + const argv = commandArgs.slice(numberOfKeys).map((a) => { + if (Buffer.isBuffer(a)) { + return a; + } + if (a === void 0 || a === null) { + return ""; + } + return String(a); + }); + try { + return await this.raw.evalSha(sha, { keys, arguments: argv }); + } catch (err) { + if (this.destroying && isConnectionClosedError(err)) { + return null; + } + if (isConnectionClosedError(err)) { + throw new connection_closed_error_1.ConnectionClosedError(err.message, err); + } + if ((_b = (_a = err === null || err === void 0 ? void 0 : err.message) === null || _a === void 0 ? void 0 : _a.includes) === null || _b === void 0 ? void 0 : _b.call(_a, "NOSCRIPT")) { + try { + return await this.raw.eval(lua, { keys, arguments: argv }); + } catch (evalErr) { + if (this.destroying && isConnectionClosedError(evalErr)) { + return null; + } + if (isConnectionClosedError(evalErr)) { + throw new connection_closed_error_1.ConnectionClosedError(evalErr.message, evalErr); + } + throw evalErr; + } + } + throw err; + } + } + // --------------------------------------------------------------- + // Pipeline / Transaction + // --------------------------------------------------------------- + multi() { + return new NodeRedisTransaction(this.raw.multi(), this.scripts); + } + pipeline() { + return this.multi(); + } + // --------------------------------------------------------------- + // Hash commands + // --------------------------------------------------------------- + async hgetall(key) { + const result = await this.raw.hGetAll(key); + return result !== null && result !== void 0 ? result : {}; + } + async hget(key, field) { + var _a; + return (_a = await this.raw.hGet(key, field)) !== null && _a !== void 0 ? _a : null; + } + async hmget(key, ...fields) { + const result = await this.raw.hmGet(key, fields); + return result.map((v) => v !== null && v !== void 0 ? v : null); + } + async hset(key, dataOrField, ...rest) { + if (typeof dataOrField === "object") { + return await this.raw.hSet(key, dataOrField); + } + const record = {}; + record[dataOrField] = String(rest[0]); + for (let i = 1; i < rest.length; i += 2) { + record[String(rest[i])] = String(rest[i + 1]); + } + return await this.raw.hSet(key, record); + } + async hdel(key, ...fields) { + return await this.raw.hDel(key, fields); + } + async hexists(key, field) { + const exists = await this.raw.hExists(key, field); + return exists ? 1 : 0; + } + // --------------------------------------------------------------- + // String commands + // --------------------------------------------------------------- + async get(key) { + var _a; + return (_a = await this.raw.get(key)) !== null && _a !== void 0 ? _a : null; + } + async set(key, value, options) { + const opts = {}; + if ((options === null || options === void 0 ? void 0 : options.PX) != null) { + opts.PX = options.PX; + } else if ((options === null || options === void 0 ? void 0 : options.EX) != null) { + opts.EX = options.EX; + } + return await this.raw.set(key, String(value), opts); + } + async del(...keys) { + if (keys.length === 0) { + return 0; + } + return await this.raw.del(keys); + } + // --------------------------------------------------------------- + // Sorted set commands + // --------------------------------------------------------------- + async zrange(key, start, end, options) { + if (options === null || options === void 0 ? void 0 : options.WITHSCORES) { + const items = await this.raw.zRangeWithScores(key, start, end); + const flat = []; + for (const item of items) { + flat.push(item.value, String(item.score)); + } + return flat; + } + return await this.raw.zRange(key, start, end); + } + async zrevrange(key, start, end, options) { + if (options === null || options === void 0 ? void 0 : options.WITHSCORES) { + const items = await this.raw.zRangeWithScores(key, start, end, { + REV: true + }); + const flat = []; + for (const item of items) { + flat.push(item.value, String(item.score)); + } + return flat; + } + return await this.raw.zRange(key, start, end, { REV: true }); + } + async zcard(key) { + return await this.raw.zCard(key); + } + async zscore(key, member) { + const score = await this.raw.zScore(key, member); + return score != null ? String(score) : null; + } + // --------------------------------------------------------------- + // List commands + // --------------------------------------------------------------- + async lrange(key, start, end) { + return await this.raw.lRange(key, start, end); + } + async llen(key) { + return await this.raw.lLen(key); + } + async ltrim(key, start, end) { + await this.raw.lTrim(key, start, end); + return "OK"; + } + async lpos(key, value) { + var _a; + return (_a = await this.raw.lPos(key, value)) !== null && _a !== void 0 ? _a : null; + } + // --------------------------------------------------------------- + // Set commands + // --------------------------------------------------------------- + async smembers(key) { + return await this.raw.sMembers(key); + } + // --------------------------------------------------------------- + // Stream commands + // --------------------------------------------------------------- + async xadd(key, id, fields, options) { + const opts = {}; + if ((options === null || options === void 0 ? void 0 : options.MAXLEN) != null) { + opts.TRIM = { + strategy: "MAXLEN", + threshold: options.MAXLEN, + strategyModifier: options.approximate === false ? void 0 : "~" + }; + } + const strFields = {}; + for (const [k, v] of Object.entries(fields)) { + strFields[k] = String(v); + } + return await this.raw.xAdd(key, id, strFields, opts); + } + async xread(streams, options) { + const opts = {}; + if ((options === null || options === void 0 ? void 0 : options.BLOCK) != null) { + opts.BLOCK = options.BLOCK; + } + if ((options === null || options === void 0 ? void 0 : options.COUNT) != null) { + opts.COUNT = options.COUNT; + } + const streamArgs = streams.map((s) => ({ key: s.key, id: s.id })); + let result; + try { + result = await this.raw.xRead(streamArgs, opts); + } catch (err) { + if (this.destroying && isConnectionClosedError(err)) { + return null; + } + if (isConnectionClosedError(err)) { + throw new connection_closed_error_1.ConnectionClosedError(err.message, err); + } + throw err; + } + if (!result) { + return null; + } + return result.map((stream) => [ + stream.name, + stream.messages.map((msg) => [ + msg.id, + Object.entries(msg.message).flat() + ]) + ]); + } + async xtrim(key, strategy, threshold, options) { + const strategyModifier = (options === null || options === void 0 ? void 0 : options.approximate) === false ? void 0 : "~"; + return await this.raw.xTrim(key, strategy, threshold, { + strategyModifier + }); + } + // --------------------------------------------------------------- + // Blocking commands + // --------------------------------------------------------------- + async bzpopmin(key, timeout) { + let result; + try { + result = await this.raw.bzPopMin(key, timeout); + } catch (err) { + if (this.destroying && isConnectionClosedError(err)) { + return null; + } + if (isConnectionClosedError(err)) { + throw new connection_closed_error_1.ConnectionClosedError(err.message, err); + } + throw err; + } + if (!result) { + return null; + } + return [result.key, result.value, String(result.score)]; + } + // --------------------------------------------------------------- + // Server / admin commands + // --------------------------------------------------------------- + async info() { + return await this.raw.info(); + } + async clientSetName(name) { + return await this.raw.clientSetName(name); + } + async clientList() { + return await this.raw.sendCommand(["CLIENT", "LIST"]); + } + // --------------------------------------------------------------- + // Key scanning + // --------------------------------------------------------------- + async scan(cursor, options) { + const opts = {}; + if (options === null || options === void 0 ? void 0 : options.MATCH) { + opts.MATCH = options.MATCH; + } + if (options === null || options === void 0 ? void 0 : options.COUNT) { + opts.COUNT = options.COUNT; + } + const result = await this.raw.scan(String(cursor), opts); + return [String(result.cursor), result.keys]; + } + scanStream(options) { + const raw = this.raw; + const connectPromise = this.connectPromise; + const scanOpts = {}; + if (options.match) { + scanOpts.MATCH = options.match; + } + if (options.count) { + scanOpts.COUNT = options.count; + } + const readable = new stream_1.Readable({ + objectMode: true, + async read() { + var _a, e_1, _b, _c; + try { + if (connectPromise) { + await connectPromise; + } + try { + for (var _d = true, _e = tslib_1.__asyncValues(raw.scanIterator(scanOpts)), _f; _f = await _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const keys = _c; + if (!readable.push(Array.isArray(keys) ? keys : [keys])) { + return; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_d && !_a && (_b = _e.return)) await _b.call(_e); + } finally { + if (e_1) throw e_1.error; + } + } + readable.push(null); + } catch (err) { + readable.destroy(err); + } + } + }); + return readable; + } + // --------------------------------------------------------------- + // Extra Redis commands (not part of IRedisClient but used by tests + // and occasionally by user code that accesses the raw client). + // --------------------------------------------------------------- + async keys(pattern) { + return await this.raw.keys(pattern); + } + async exists(...keys) { + if (keys.length === 0) { + return 0; + } + return await this.raw.exists(keys); + } + async zadd(key, ...args) { + const members = []; + for (let i = 0; i < args.length; i += 2) { + members.push({ score: Number(args[i]), value: String(args[i + 1]) }); + } + return await this.raw.zAdd(key, members); + } + async zrem(key, ...members) { + return await this.raw.zRem(key, members); + } + async xlen(key) { + return await this.raw.xLen(key); + } + async xrevrange(key, end, start, ...rest) { + const opts = {}; + if (rest[0] === "COUNT") { + opts.COUNT = Number(rest[1]); + } + const result = await this.raw.xRevRange(key, end, start, opts); + return result.map((msg) => [ + msg.id, + Object.entries(msg.message).flat() + ]); + } + async sadd(key, ...members) { + return await this.raw.sAdd(key, members.map(String)); + } + async scard(key) { + return await this.raw.sCard(key); + } + async lpush(key, ...values) { + return await this.raw.lPush(key, values); + } + async rpop(key) { + return await this.raw.rPop(key); + } + async incr(key) { + return await this.raw.incr(key); + } + async incrby(key, increment) { + return await this.raw.incrBy(key, increment); + } + async flushall() { + return await this.raw.flushAll(); + } + }; + var NodeRedisTransaction = class { + constructor(raw, scripts) { + this.raw = raw; + this.scripts = scripts; + this.transformers = []; + } + addIdentityTransformer() { + this.transformers.push((v) => v); + } + hgetall(key) { + this.raw.hGetAll(key); + this.addIdentityTransformer(); + return this; + } + hset(key, data) { + this.raw.hSet(key, data); + this.addIdentityTransformer(); + return this; + } + hscan(key, cursor, options) { + const opts = {}; + if ((options === null || options === void 0 ? void 0 : options.COUNT) != null) { + opts.COUNT = options.COUNT; + } + this.raw.hScan(key, String(cursor), opts); + this.transformers.push((val) => { + if (!val) { + return ["0", []]; + } + const flat = []; + for (const entry of val.entries || []) { + flat.push(entry.field, entry.value); + } + return [String(val.cursor), flat]; + }); + return this; + } + smembers(key) { + this.raw.sMembers(key); + this.addIdentityTransformer(); + return this; + } + sscan(key, cursor, options) { + const opts = {}; + if ((options === null || options === void 0 ? void 0 : options.COUNT) != null) { + opts.COUNT = options.COUNT; + } + this.raw.sScan(key, String(cursor), opts); + this.transformers.push((val) => { + if (!val) { + return ["0", []]; + } + return [String(val.cursor), val.members || []]; + }); + return this; + } + zrange(key, start, end) { + this.raw.zRange(key, start, end); + this.addIdentityTransformer(); + return this; + } + lrange(key, start, end) { + this.raw.lRange(key, start, end); + this.addIdentityTransformer(); + return this; + } + llen(key) { + this.raw.lLen(key); + this.addIdentityTransformer(); + return this; + } + del(...keys) { + if (keys.length > 0) { + this.raw.del(keys); + this.addIdentityTransformer(); + } + return this; + } + runCommand(name, args) { + const script = this.scripts.get(name); + if (!script) { + throw new Error(`BullMQ: unknown command "${name}" in transaction`); + } + const commandArgs = normalizeScriptArgs(args); + const { sha, lua, numberOfKeys } = script; + const cmdKeys = commandArgs.slice(0, numberOfKeys).map(String); + const argv = commandArgs.slice(numberOfKeys).map((a) => { + if (Buffer.isBuffer(a)) { + return a; + } + if (a === void 0 || a === null) { + return ""; + } + return String(a); + }); + this.raw.evalSha(sha, { keys: cmdKeys, arguments: argv }); + this.addIdentityTransformer(); + return this; + } + async exec() { + const results = await this.raw.exec(); + if (!results) { + return null; + } + return results.map((result, i) => { + if (result instanceof Error) { + return [result, null]; + } + const transformer = this.transformers[i]; + const value = transformer ? transformer(result) : result; + return [null, value]; + }); + } + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/bun-redis-client.js +var require_bun_redis_client = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/bun-redis-client.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createBunRedisClient = createBunRedisClient; + var crypto_1 = require("crypto"); + var events_1 = require("events"); + var stream_1 = require("stream"); + var connection_closed_error_1 = require_connection_closed_error(); + function normalizeScriptArgs(args) { + return args.length === 1 && Array.isArray(args[0]) ? args[0] : args; + } + function isBunConnectionClosedError(err) { + var _a; + const msg = (_a = err === null || err === void 0 ? void 0 : err.message) !== null && _a !== void 0 ? _a : ""; + return msg === "Socket closed unexpectedly" || msg.startsWith("Connection closed") || msg === "Connection is closed." || msg === "Connection has failed"; + } + function normalizeStringCollection(reply) { + if (reply == null) { + return []; + } + if (Array.isArray(reply)) { + return reply.map(String); + } + if (reply instanceof Set) { + return Array.from(reply, (item) => String(item)); + } + return []; + } + function createBunRedisClient(client, opts) { + return new BunRedisAdapter(client, opts); + } + var BunRedisAdapter = class _BunRedisAdapter extends events_1.EventEmitter { + get status() { + if (this.statusOverride) { + return this.statusOverride; + } + if (this.closed) { + return "end"; + } + if (this.raw.connected) { + return "ready"; + } + return this.hasConnected ? "end" : "wait"; + } + set status(val) { + if (val === "end") { + this.closing = true; + this.closed = true; + } + this.statusOverride = val; + } + get options() { + return {}; + } + set options(_val) { + } + constructor(raw, opts) { + super(); + this.raw = raw; + this.scripts = /* @__PURE__ */ new Map(); + this.loadedScriptShas = /* @__PURE__ */ new Set(); + this.hasConnected = false; + this.closed = false; + this.closing = false; + this.reconnecting = false; + this.reconnectTimer = null; + this.reconnectAttempts = 0; + this.maxReconnectDelay = 2e4; + this.isCluster = false; + this._setupCallbacks(); + if (!(opts === null || opts === void 0 ? void 0 : opts.lazyConnect)) { + this.connect().catch(() => { + }); + } + } + /** + * Wire up Bun's callback-style events into EventEmitter and auto-reconnect. + */ + _setupCallbacks() { + this.raw.onconnect = () => { + this.hasConnected = true; + this.closed = false; + this.closing = false; + this.reconnecting = false; + this.reconnectAttempts = 0; + this.statusOverride = void 0; + this.loadedScriptShas.clear(); + if (this.connectionName) { + this.clientSetName(this.connectionName).then(() => this.emit("ready"), () => this.emit("ready")); + } else { + this.emit("ready"); + } + }; + this.raw.onclose = (error) => { + if (this.closing) { + this.closed = true; + this.emit("close"); + this.emit("end"); + return; + } + this.closed = true; + this.emit("close"); + if (error) { + this.emit("error", error); + } + this._scheduleReconnect(); + }; + } + /** + * Schedule a reconnection attempt with exponential backoff. + */ + _scheduleReconnect() { + if (this.closing || this.reconnecting) { + return; + } + this.reconnecting = true; + this.reconnectAttempts++; + const delay = Math.max(Math.min(Math.exp(this.reconnectAttempts) * 100, this.maxReconnectDelay), 1e3); + this.reconnectTimer = setTimeout(async () => { + this.reconnectTimer = null; + if (this.closing) { + this.reconnecting = false; + return; + } + try { + const BunRedisClient = this.raw.constructor; + const newRaw = new BunRedisClient(this.raw.url); + this.raw = newRaw; + this.closed = false; + this.connecting = void 0; + this._setupCallbacks(); + await newRaw.connect(); + } catch (_err) { + this.reconnecting = false; + if (!this.closing) { + this._scheduleReconnect(); + } + } + }, delay); + } + // --------------------------------------------------------------- + // Connection lifecycle + // --------------------------------------------------------------- + async connect() { + const replaceRaw = this.hasConnected && (this.closed || !this.raw.connected); + if (this.reconnectTimer) { + clearTimeout(this.reconnectTimer); + this.reconnectTimer = null; + } + this.reconnecting = false; + if (this.raw.connected && !replaceRaw) { + this.hasConnected = true; + this.closed = false; + this.closing = false; + this.statusOverride = void 0; + return; + } + if (!this.connecting) { + this.closed = false; + this.closing = false; + this.statusOverride = void 0; + if (replaceRaw) { + const BunRedisClient = this.raw.constructor; + this.raw = new BunRedisClient(this.raw.url); + this._setupCallbacks(); + } + this.connecting = this.raw.connect().then(() => { + this.hasConnected = true; + this.closed = false; + this.closing = false; + this.statusOverride = void 0; + }).finally(() => { + this.connecting = void 0; + }); + } + await this.connecting; + } + _closeRaw() { + if (this.reconnectTimer) { + clearTimeout(this.reconnectTimer); + this.reconnectTimer = null; + } + this.reconnecting = false; + const raw = this.raw; + raw.onconnect = () => { + }; + raw.onclose = () => { + }; + raw.onerror = () => { + }; + if (raw.connected) { + setImmediate(() => { + try { + if (raw.connected) { + raw.close(); + } + } catch (_err) { + } + }); + } + } + disconnect(reconnect) { + if (this.closed && !reconnect) { + return; + } + if (reconnect) { + this.closed = true; + this.statusOverride = void 0; + const raw = this.raw; + raw.onclose = () => { + }; + if (raw.connected) { + setImmediate(() => { + try { + if (raw.connected) { + raw.close(); + } + } catch (_err) { + } + }); + } + this.emit("close"); + this._scheduleReconnect(); + } else { + this.closing = true; + this.closed = true; + this.statusOverride = "end"; + this._closeRaw(); + this.emit("close"); + this.emit("end"); + } + } + async quit() { + if (this.closed) { + setImmediate(() => { + this.emit("end"); + this.emit("close"); + }); + return "OK"; + } + this.closing = true; + this.closed = true; + this.statusOverride = "end"; + this._closeRaw(); + setImmediate(() => { + this.emit("end"); + this.emit("close"); + }); + return "OK"; + } + duplicate(...args) { + const BunRedisClient = this.raw.constructor; + const dup = new BunRedisClient(this.raw.url); + const adapter = new _BunRedisAdapter(dup); + for (const [name, script] of this.scripts) { + adapter.scripts.set(name, script); + adapter[name] = (...a) => adapter.runCommand(name, a); + } + const opts = args[0]; + if (opts && typeof opts === "object" && opts.connectionName) { + adapter.connectionName = opts.connectionName; + } + return adapter; + } + // --------------------------------------------------------------- + // Lua script engine + // --------------------------------------------------------------- + defineCommand(name, definition) { + const sha = (0, crypto_1.createHash)("sha1").update(definition.lua).digest("hex"); + this.scripts.set(name, { + sha, + lua: definition.lua, + numberOfKeys: definition.numberOfKeys + }); + this[name] = (...args) => this.runCommand(name, args); + } + async runCommand(name, args) { + const script = this.scripts.get(name); + if (!script) { + throw new Error(`BullMQ: unknown command "${name}"`); + } + const commandArgs = normalizeScriptArgs(args); + const { sha, lua, numberOfKeys } = script; + const keys = commandArgs.slice(0, numberOfKeys).map(String); + const argv = commandArgs.slice(numberOfKeys).map((a) => { + if (Buffer.isBuffer(a)) { + return a; + } + if (a === void 0 || a === null) { + return ""; + } + return String(a); + }); + const evalArgs = [sha, String(keys.length), ...keys, ...argv]; + const execute = async () => { + var _a, _b; + try { + const result = await this.sendCommand("EVALSHA", evalArgs); + this.loadedScriptShas.add(sha); + return result; + } catch (err) { + if ((_b = (_a = err === null || err === void 0 ? void 0 : err.message) === null || _a === void 0 ? void 0 : _a.includes) === null || _b === void 0 ? void 0 : _b.call(_a, "NOSCRIPT")) { + const evalLuaArgs = [lua, String(keys.length), ...keys, ...argv]; + const result = await this.sendCommand("EVAL", evalLuaArgs); + this.loadedScriptShas.add(sha); + return result; + } + throw err; + } + }; + return execute(); + } + /** + * Ensure the given scripts are present in the server-side SCRIPT cache so + * that subsequent EVALSHA calls (e.g. inside a MULTI/EXEC) won't fail with + * NOSCRIPT. Each script is SCRIPT LOAD'd at most once per connection. + */ + async ensureScriptsLoaded(scripts) { + const toLoad = []; + const seen = /* @__PURE__ */ new Set(); + for (const s of scripts) { + if (this.loadedScriptShas.has(s.sha) || seen.has(s.sha)) { + continue; + } + seen.add(s.sha); + toLoad.push(s); + } + if (toLoad.length === 0) { + return; + } + await Promise.all(toLoad.map(async (s) => { + await this.sendCommand("SCRIPT", ["LOAD", s.lua]); + this.loadedScriptShas.add(s.sha); + })); + } + sendCommand(command, args) { + if (this.closing || this.closed) { + return Promise.reject(new connection_closed_error_1.ConnectionClosedError("Connection is closed")); + } + return this.raw.send(command, args).catch((err) => { + if (isBunConnectionClosedError(err)) { + if (this.closing || this.closed) { + return null; + } + return Promise.reject(new connection_closed_error_1.ConnectionClosedError(err.message, err)); + } + throw err; + }); + } + // --------------------------------------------------------------- + // Pipeline / Transaction + // --------------------------------------------------------------- + multi() { + return new BunRedisTransaction(this.raw, this.scripts, true, this); + } + pipeline() { + return new BunRedisTransaction(this.raw, this.scripts, false, this); + } + // --------------------------------------------------------------- + // Hash commands + // --------------------------------------------------------------- + async hgetall(key) { + const result = await this.sendCommand("HGETALL", [key]); + if (!result || Array.isArray(result) && result.length === 0) { + return {}; + } + if (Array.isArray(result)) { + const obj2 = {}; + for (let i = 0; i < result.length; i += 2) { + obj2[String(result[i])] = String(result[i + 1]); + } + return obj2; + } + return result; + } + async hget(key, field) { + const result = await this.sendCommand("HGET", [key, field]); + return result !== null && result !== void 0 ? result : null; + } + async hmget(key, ...fields) { + const result = await this.sendCommand("HMGET", [key, ...fields]); + return (result || []).map((v) => v !== null && v !== void 0 ? v : null); + } + async hset(key, dataOrField, ...rest) { + let args; + if (typeof dataOrField === "object") { + args = [key]; + for (const [k, v] of Object.entries(dataOrField)) { + args.push(k, String(v)); + } + } else { + args = [key, dataOrField, String(rest[0])]; + for (let i = 1; i < rest.length; i += 2) { + args.push(String(rest[i]), String(rest[i + 1])); + } + } + return await this.sendCommand("HSET", args); + } + async hdel(key, ...fields) { + return await this.sendCommand("HDEL", [key, ...fields]); + } + async hexists(key, field) { + const result = await this.sendCommand("HEXISTS", [key, field]); + return result === true || result === 1 ? 1 : 0; + } + // --------------------------------------------------------------- + // String commands + // --------------------------------------------------------------- + async get(key) { + const result = await this.sendCommand("GET", [key]); + return result !== null && result !== void 0 ? result : null; + } + async set(key, value, options) { + const args = [key, String(value)]; + if ((options === null || options === void 0 ? void 0 : options.PX) != null) { + args.push("PX", String(options.PX)); + } else if ((options === null || options === void 0 ? void 0 : options.EX) != null) { + args.push("EX", String(options.EX)); + } + return await this.sendCommand("SET", args); + } + async del(...keys) { + if (keys.length === 0) { + return 0; + } + return await this.sendCommand("DEL", keys); + } + // --------------------------------------------------------------- + // Sorted set commands + // --------------------------------------------------------------- + async zrange(key, start, end, options) { + const args = [key, String(start), String(end)]; + if (options === null || options === void 0 ? void 0 : options.WITHSCORES) { + args.push("WITHSCORES"); + } + const result = await this.sendCommand("ZRANGE", args); + if (!result) { + return []; + } + if ((options === null || options === void 0 ? void 0 : options.WITHSCORES) && result.length > 0 && Array.isArray(result[0])) { + return result.flatMap((pair) => [String(pair[0]), String(pair[1])]); + } + return result.map(String); + } + async zrevrange(key, start, end, options) { + const args = [key, String(start), String(end)]; + if (options === null || options === void 0 ? void 0 : options.WITHSCORES) { + args.push("WITHSCORES"); + } + args.push("REV"); + const result = await this.sendCommand("ZRANGE", args); + if (!result) { + return []; + } + if ((options === null || options === void 0 ? void 0 : options.WITHSCORES) && result.length > 0 && Array.isArray(result[0])) { + return result.flatMap((pair) => [String(pair[0]), String(pair[1])]); + } + return result.map(String); + } + async zcard(key) { + return await this.sendCommand("ZCARD", [key]); + } + async zscore(key, member) { + const score = await this.sendCommand("ZSCORE", [key, member]); + return score != null ? String(score) : null; + } + // --------------------------------------------------------------- + // List commands + // --------------------------------------------------------------- + async lrange(key, start, end) { + const result = await this.sendCommand("LRANGE", [ + key, + String(start), + String(end) + ]); + return (result || []).map(String); + } + async llen(key) { + return await this.sendCommand("LLEN", [key]); + } + async ltrim(key, start, end) { + await this.sendCommand("LTRIM", [key, String(start), String(end)]); + return "OK"; + } + async lpos(key, value) { + const result = await this.sendCommand("LPOS", [key, value]); + return result !== null && result !== void 0 ? result : null; + } + // --------------------------------------------------------------- + // Set commands + // --------------------------------------------------------------- + async smembers(key) { + const result = await this.sendCommand("SMEMBERS", [key]); + return normalizeStringCollection(result); + } + // --------------------------------------------------------------- + // Stream commands + // --------------------------------------------------------------- + async xadd(key, id, fields, options) { + const args = [key]; + if ((options === null || options === void 0 ? void 0 : options.MAXLEN) != null) { + args.push("MAXLEN"); + if (options.approximate !== false) { + args.push("~"); + } + args.push(String(options.MAXLEN)); + } + args.push(id); + for (const [k, v] of Object.entries(fields)) { + args.push(k, String(v)); + } + return await this.raw.send("XADD", args); + } + async xread(streams, options) { + const args = []; + if ((options === null || options === void 0 ? void 0 : options.COUNT) != null) { + args.push("COUNT", String(options.COUNT)); + } + if ((options === null || options === void 0 ? void 0 : options.BLOCK) != null) { + args.push("BLOCK", String(options.BLOCK)); + } + args.push("STREAMS"); + for (const s of streams) { + args.push(s.key); + } + for (const s of streams) { + args.push(s.id); + } + let result; + try { + result = await this.sendCommand("XREAD", args); + } catch (err) { + if (this.closing) { + return null; + } + throw err; + } + if (!result) { + return null; + } + if (Array.isArray(result)) { + return result.map((stream) => { + const streamName = String(stream[0]); + const entries = (stream[1] || []).map((entry) => { + const entryId = String(entry[0]); + const fields = (entry[1] || []).map(String); + return [entryId, fields]; + }); + return [streamName, entries]; + }); + } + return Object.entries(result).map(([streamName, rawEntries]) => { + const entries = (rawEntries || []).map((entry) => { + const entryId = String(entry[0]); + const fields = (entry[1] || []).map(String); + return [entryId, fields]; + }); + return [streamName, entries]; + }); + } + async xtrim(key, strategy, threshold, options) { + const args = [key, strategy]; + if ((options === null || options === void 0 ? void 0 : options.approximate) !== false) { + args.push("~"); + } + args.push(String(threshold)); + return await this.sendCommand("XTRIM", args); + } + // --------------------------------------------------------------- + // Blocking commands + // --------------------------------------------------------------- + async bzpopmin(key, timeout) { + let result; + try { + result = await this.sendCommand("BZPOPMIN", [key, String(timeout)]); + } catch (err) { + if (this.closing) { + return null; + } + throw err; + } + if (!result || result.length === 0) { + return null; + } + return [String(result[0]), String(result[1]), String(result[2])]; + } + // --------------------------------------------------------------- + // Server / admin commands + // --------------------------------------------------------------- + async info() { + return await this.sendCommand("INFO", []); + } + async clientSetName(name) { + return await this.sendCommand("CLIENT", ["SETNAME", name]); + } + async clientList() { + return await this.sendCommand("CLIENT", ["LIST"]); + } + // --------------------------------------------------------------- + // Key scanning + // --------------------------------------------------------------- + async scan(cursor, options) { + const args = [String(cursor)]; + if (options === null || options === void 0 ? void 0 : options.MATCH) { + args.push("MATCH", options.MATCH); + } + if (options === null || options === void 0 ? void 0 : options.COUNT) { + args.push("COUNT", String(options.COUNT)); + } + const result = await this.sendCommand("SCAN", args); + const keys = result[1]; + return [String(result[0]), Array.isArray(keys) ? keys.map(String) : []]; + } + scanStream(options) { + const adapter = this; + let cursor = "0"; + let started = false; + const readable = new stream_1.Readable({ + objectMode: true, + async read() { + if (started && cursor === "0") { + readable.push(null); + return; + } + started = true; + try { + while (true) { + const [nextCursor, keys] = await adapter.scan(cursor, { + MATCH: options.match, + COUNT: options.count + }); + cursor = nextCursor; + if (keys.length > 0) { + readable.push(keys); + if (cursor === "0") { + readable.push(null); + } + return; + } + if (cursor === "0") { + readable.push(null); + return; + } + } + } catch (err) { + readable.destroy(err); + } + } + }); + return readable; + } + // --------------------------------------------------------------- + // Extra Redis commands used by BullMQ internals + // --------------------------------------------------------------- + async keys(pattern) { + const result = await this.sendCommand("KEYS", [pattern]); + return (result || []).map(String); + } + async exists(...keys) { + if (keys.length === 0) { + return 0; + } + const result = await this.sendCommand("EXISTS", keys); + if (typeof result === "boolean") { + return result ? 1 : 0; + } + return result; + } + async zadd(key, ...args) { + const cmdArgs = [key]; + for (let i = 0; i < args.length; i += 2) { + cmdArgs.push(String(args[i]), String(args[i + 1])); + } + return await this.sendCommand("ZADD", cmdArgs); + } + async zrem(key, ...members) { + return await this.sendCommand("ZREM", [key, ...members]); + } + async xlen(key) { + return await this.sendCommand("XLEN", [key]); + } + async xrevrange(key, end, start, ...rest) { + const args = [key, end, start]; + if (rest[0] === "COUNT") { + args.push("COUNT", String(rest[1])); + } + const result = await this.sendCommand("XREVRANGE", args); + if (!result) { + return []; + } + return result.map((msg) => [ + String(msg[0]), + (msg[1] || []).map(String) + ]); + } + async sadd(key, ...members) { + return await this.sendCommand("SADD", [key, ...members.map(String)]); + } + async scard(key) { + return await this.sendCommand("SCARD", [key]); + } + async lpush(key, ...values) { + return await this.sendCommand("LPUSH", [key, ...values]); + } + async rpop(key) { + const result = await this.sendCommand("RPOP", [key]); + return result !== null && result !== void 0 ? result : null; + } + async incr(key) { + return await this.sendCommand("INCR", [key]); + } + async incrby(key, increment) { + return await this.sendCommand("INCRBY", [key, String(increment)]); + } + async flushall() { + return await this.sendCommand("FLUSHALL", []); + } + }; + var BunRedisTransaction = class { + constructor(raw, scripts, transactional, adapter) { + this.raw = raw; + this.scripts = scripts; + this.transactional = transactional; + this.adapter = adapter; + this.commands = []; + this.transformers = []; + this.scriptsToLoad = []; + } + addCommand(cmd, args, transformer) { + this.commands.push({ cmd, args }); + this.transformers.push(transformer || ((v) => v)); + } + hgetall(key) { + this.addCommand("HGETALL", [key], (val) => { + if (!val || Array.isArray(val) && val.length === 0) { + return {}; + } + if (Array.isArray(val)) { + const obj2 = {}; + for (let i = 0; i < val.length; i += 2) { + obj2[String(val[i])] = String(val[i + 1]); + } + return obj2; + } + return val; + }); + return this; + } + hset(key, data) { + const args = [key]; + for (const [k, v] of Object.entries(data)) { + args.push(k, String(v)); + } + this.addCommand("HSET", args); + return this; + } + hscan(key, cursor, options) { + const args = [key, String(cursor)]; + if ((options === null || options === void 0 ? void 0 : options.COUNT) != null) { + args.push("COUNT", String(options.COUNT)); + } + this.addCommand("HSCAN", args, (val) => { + if (!val) { + return ["0", []]; + } + if (Array.isArray(val)) { + return [String(val[0]), normalizeStringCollection(val[1])]; + } + return ["0", []]; + }); + return this; + } + smembers(key) { + this.addCommand("SMEMBERS", [key], (val) => normalizeStringCollection(val)); + return this; + } + sscan(key, cursor, options) { + const args = [key, String(cursor)]; + if ((options === null || options === void 0 ? void 0 : options.COUNT) != null) { + args.push("COUNT", String(options.COUNT)); + } + this.addCommand("SSCAN", args, (val) => { + if (!val) { + return ["0", []]; + } + if (Array.isArray(val)) { + return [String(val[0]), normalizeStringCollection(val[1])]; + } + return ["0", []]; + }); + return this; + } + zrange(key, start, end) { + this.addCommand("ZRANGE", [key, String(start), String(end)], (val) => Array.isArray(val) ? val.map(String) : []); + return this; + } + lrange(key, start, end) { + this.addCommand("LRANGE", [key, String(start), String(end)], (val) => Array.isArray(val) ? val.map(String) : []); + return this; + } + llen(key) { + this.addCommand("LLEN", [key]); + return this; + } + del(...keys) { + if (keys.length > 0) { + this.addCommand("DEL", keys); + } + return this; + } + runCommand(name, args) { + const script = this.scripts.get(name); + if (!script) { + throw new Error(`BullMQ: unknown command "${name}" in transaction`); + } + const commandArgs = normalizeScriptArgs(args); + const { sha, numberOfKeys } = script; + const cmdKeys = commandArgs.slice(0, numberOfKeys).map(String); + const argv = commandArgs.slice(numberOfKeys).map((a) => { + if (Buffer.isBuffer(a)) { + return a; + } + if (a === void 0 || a === null) { + return ""; + } + return String(a); + }); + this.scriptsToLoad.push(script); + this.addCommand("EVALSHA", [ + sha, + String(cmdKeys.length), + ...cmdKeys, + ...argv + ]); + return this; + } + async exec() { + if (this.commands.length === 0) { + return []; + } + if (this.scriptsToLoad.length > 0) { + await this.adapter.ensureScriptsLoaded(this.scriptsToLoad); + } + if (!this.transactional) { + const settled = await Promise.allSettled(this.commands.map(({ cmd, args }) => this.adapter.sendCommand(cmd, args))); + return settled.map((result, i) => { + if (result.status === "rejected") { + return [result.reason, null]; + } + const transformer = this.transformers[i]; + const value = transformer ? transformer(result.value) : result.value; + return [null, value]; + }); + } + const swallow = (_2) => { + }; + try { + this.raw.send("MULTI", []).catch(swallow); + for (const { cmd, args } of this.commands) { + this.raw.send(cmd, args).catch(swallow); + } + const results = await this.raw.send("EXEC", []); + if (!results) { + return null; + } + return results.map((result, i) => { + if (result instanceof Error) { + return [result, null]; + } + const transformer = this.transformers[i]; + const value = transformer ? transformer(result) : result; + return [null, value]; + }); + } catch (err) { + try { + await this.raw.send("DISCARD", []); + } catch (_a) { + } + throw err; + } + } + }; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/valkey-glide-client.js +var require_valkey_glide_client = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/valkey-glide-client.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createValkeyGlideClient = createValkeyGlideClient; + var crypto_1 = require("crypto"); + var events_1 = require("events"); + var stream_1 = require("stream"); + var connection_closed_error_1 = require_connection_closed_error(); + var GLIDE_STRING_DECODER = 1; + function createCompatibilityBatch() { + return { + commands: [], + customCommand(args) { + this.commands.push(args); + } + }; + } + function createGlideBatch(isAtomic) { + try { + const { Batch } = require("@valkey/valkey-glide"); + return typeof Batch === "function" ? new Batch(isAtomic) : null; + } catch (_a) { + return null; + } + } + function isBuffer(value) { + return Buffer.isBuffer(value); + } + function toGlideArg(value) { + if (isBuffer(value)) { + return value; + } + if (value === void 0 || value === null) { + return ""; + } + return String(value); + } + function toStringValue(value) { + if (isBuffer(value)) { + return value.toString(); + } + return String(value); + } + function isKeyValueArray(value) { + return Array.isArray(value) && value.every((item) => item && typeof item === "object" && "key" in item && "value" in item); + } + function normalizeScriptArgs(args) { + return args.length === 1 && Array.isArray(args[0]) ? args[0] : args; + } + function normalizeHashReply(reply) { + if (!reply) { + return {}; + } + if (isKeyValueArray(reply)) { + return reply.reduce((acc, item) => { + acc[toStringValue(item.key)] = toStringValue(item.value); + return acc; + }, {}); + } + if (reply instanceof Map) { + const out = {}; + for (const [key, value] of reply.entries()) { + out[toStringValue(key)] = toStringValue(value); + } + return out; + } + if (Array.isArray(reply)) { + const out = {}; + for (let i = 0; i < reply.length; i += 2) { + out[toStringValue(reply[i])] = toStringValue(reply[i + 1]); + } + return out; + } + if (typeof reply === "object") { + const out = {}; + for (const [key, value] of Object.entries(reply)) { + out[key] = toStringValue(value); + } + return out; + } + return {}; + } + function flattenFieldPairs(fields) { + if (!fields) { + return []; + } + if (Array.isArray(fields)) { + if (isKeyValueArray(fields)) { + return fields.flatMap((pair) => [ + toStringValue(pair.key), + toStringValue(pair.value) + ]); + } + if (fields.every((item) => Array.isArray(item) && item.length === 2)) { + return fields.flatMap((pair) => { + const [field, value] = pair; + return [toStringValue(field), toStringValue(value)]; + }); + } + return fields.map((item) => toStringValue(item)); + } + if (typeof fields === "object") { + return Object.entries(fields).flatMap(([field, value]) => [field, toStringValue(value)]); + } + return []; + } + function normalizeXReadReply(reply) { + if (!reply) { + return null; + } + if (Array.isArray(reply) && reply.every((stream) => Array.isArray(stream) && stream.length === 2 && typeof stream[0] !== "undefined" && Array.isArray(stream[1]))) { + return reply; + } + if (!isKeyValueArray(reply)) { + return reply; + } + return reply.map((streamEntry) => { + const streamName = toStringValue(streamEntry.key); + const messages = isKeyValueArray(streamEntry.value) ? streamEntry.value.map((message) => [ + toStringValue(message.key), + flattenFieldPairs(message.value) + ]) : []; + return [streamName, messages]; + }); + } + function normalizeScanReply(reply) { + if (Array.isArray(reply) && reply.length >= 2) { + const [cursor, keys] = reply; + const normalizedKeys = Array.isArray(keys) ? keys.map((key) => toStringValue(key)) : []; + return [toStringValue(cursor), normalizedKeys]; + } + if (reply && typeof reply === "object") { + const result = reply; + if (result.cursor !== void 0 && Array.isArray(result.keys)) { + return [ + toStringValue(result.cursor), + result.keys.map((key) => toStringValue(key)) + ]; + } + } + return ["0", []]; + } + function normalizeXRangeReply(reply) { + if (!reply) { + return []; + } + if (Array.isArray(reply) && reply.every((entry) => Array.isArray(entry) && entry.length === 2 && typeof entry[0] !== "undefined" && Array.isArray(entry[1]))) { + return reply.map(([id, fields]) => [ + toStringValue(id), + fields.map((field) => toStringValue(field)) + ]); + } + if (!isKeyValueArray(reply)) { + return []; + } + return reply.map((entry) => [ + toStringValue(entry.key), + flattenFieldPairs(entry.value) + ]); + } + function normalizeSortedSetReply(reply, withScores = false) { + if (!Array.isArray(reply)) { + return []; + } + if (!withScores) { + return reply.map((item) => toStringValue(item)); + } + if (isKeyValueArray(reply)) { + return reply.flatMap((entry) => [ + toStringValue(entry.key), + toStringValue(entry.value) + ]); + } + if (reply.every((item) => Array.isArray(item) && item.length >= 2 && item[0] !== void 0)) { + return reply.flatMap((item) => [ + toStringValue(item[0]), + toStringValue(item[1]) + ]); + } + return reply.map((item) => toStringValue(item)); + } + function isBlockingCommand(args) { + const [command, ...rest] = args; + const name = toStringValue(command).toUpperCase(); + if (name === "BZPOPMIN") { + return true; + } + if (name !== "XREAD") { + return false; + } + for (let i = 0; i < rest.length; i += 2) { + if (toStringValue(rest[i]).toUpperCase() === "BLOCK") { + return true; + } + } + return false; + } + function createValkeyGlideClient(client) { + return new ValkeyGlideAdapter(client); + } + var ValkeyGlideAdapter = class _ValkeyGlideAdapter extends events_1.EventEmitter { + constructor(rawOrPromise, connectionName) { + super(); + this.connectionName = connectionName; + this.scripts = /* @__PURE__ */ new Map(); + this.scriptsBySha = /* @__PURE__ */ new Map(); + this.scriptLoadPromises = /* @__PURE__ */ new Map(); + this.readyEmitted = false; + this.closed = false; + this.operationChain = Promise.resolve(); + this.activeBlockingCommands = 0; + if (rawOrPromise instanceof Promise) { + this.rawPromise = rawOrPromise; + void this.connect().catch((error) => this.emit("error", error)); + } else { + this.raw = rawOrPromise; + } + } + get status() { + if (this.statusOverride) { + return this.statusOverride; + } + if (this.closed) { + return "end"; + } + if (this.readyEmitted) { + return "ready"; + } + return "wait"; + } + set status(value) { + if (value === "end") { + this.disconnect(); + } + this.statusOverride = value; + } + get isCluster() { + var _a, _b, _c; + const name = (_c = (_b = (_a = this.raw) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : ""; + return name.includes("Cluster"); + } + get options() { + var _a, _b, _c, _d; + return (_d = (_b = (_a = this.raw) === null || _a === void 0 ? void 0 : _a.config) !== null && _b !== void 0 ? _b : (_c = this.raw) === null || _c === void 0 ? void 0 : _c.options) !== null && _d !== void 0 ? _d : {}; + } + set options(_value) { + } + ensureOpen() { + if (this.closed) { + throw new connection_closed_error_1.ConnectionClosedError(); + } + } + normalizeError(error) { + if (error instanceof connection_closed_error_1.ConnectionClosedError || error instanceof Error && error.name === "ClosingError") { + throw new connection_closed_error_1.ConnectionClosedError(error.message, error); + } + throw error; + } + async ensureRaw() { + if (this.raw) { + return this.raw; + } + if (!this.rawPromise) { + throw new Error("BullMQ: Valkey Glide client not initialized - missing raw client and client promise. Please report this as a bug."); + } + this.raw = await this.rawPromise; + return this.raw; + } + async runSerialized(fn) { + this.ensureOpen(); + const previous = this.operationChain; + let release; + this.operationChain = new Promise((resolve) => { + release = resolve; + }); + await previous; + this.ensureOpen(); + try { + const raw = await this.ensureRaw(); + this.ensureOpen(); + return await fn(raw); + } catch (error) { + this.normalizeError(error); + } finally { + release(); + } + } + async runRawCommand(args, options) { + const blockingCommand = isBlockingCommand(args); + return this.runSerialized(async (raw) => { + if (blockingCommand) { + this.activeBlockingCommands++; + } + try { + return await raw.customCommand(args, options); + } finally { + if (blockingCommand) { + this.activeBlockingCommands--; + } + } + }); + } + ensureScriptLoaded(script) { + let pendingLoad = this.scriptLoadPromises.get(script.sha); + if (!pendingLoad) { + pendingLoad = this.runRawCommand(["SCRIPT", "LOAD", script.lua]).then(() => { + }).catch(() => { + }); + this.scriptLoadPromises.set(script.sha, pendingLoad); + } + return pendingLoad; + } + async applyConnectionNameIfNeeded() { + if (!this.connectionName) { + return; + } + await this.runRawCommand(["CLIENT", "SETNAME", this.connectionName], { + decoder: GLIDE_STRING_DECODER + }); + } + async clearConnectionNameIfNeeded(raw) { + if (!this.connectionName) { + return; + } + try { + await raw.customCommand(["CLIENT", "SETNAME", ""], { + decoder: GLIDE_STRING_DECODER + }); + } catch (_a) { + } + } + async recreateRaw() { + var _a, _b; + const raw = await this.ensureRaw(); + const clientConstructor = raw.constructor; + const createClient = (_a = clientConstructor === null || clientConstructor === void 0 ? void 0 : clientConstructor.createClient) === null || _a === void 0 ? void 0 : _a.bind(clientConstructor); + const config = (_b = raw.config) !== null && _b !== void 0 ? _b : raw.options; + if (!createClient || !config) { + throw new Error("BullMQ: Cannot recreate Valkey Glide client: missing createClient() method or config object. Ensure the client was created via GlideClient.createClient() or GlideClusterClient.createClient()."); + } + this.raw = await createClient(config); + this.scriptLoadPromises.clear(); + } + async connect() { + if (this.connecting) { + return this.connecting; + } + this.connecting = (async () => { + if (this.closed && this.raw) { + await this.recreateRaw(); + } + this.closed = false; + this.statusOverride = void 0; + await this.ensureRaw(); + try { + await this.applyConnectionNameIfNeeded(); + } catch (error) { + if (this.closed && error instanceof connection_closed_error_1.ConnectionClosedError) { + return; + } + throw error; + } + if (this.closed) { + return; + } + this.readyEmitted = true; + this.emit("ready"); + })().finally(() => { + this.connecting = void 0; + }); + return this.connecting; + } + closeRaw() { + if (!this.closingPromise) { + const closeRaw = () => { + if (!this.raw) { + return; + } + try { + this.raw.close(); + } catch (_a) { + } + }; + this.closingPromise = (this.activeBlockingCommands > 0 ? Promise.resolve().then(closeRaw) : this.operationChain.catch(() => { + }).then(async () => { + if (!this.closed) { + return; + } + if (this.raw) { + await this.clearConnectionNameIfNeeded(this.raw); + } + closeRaw(); + })).finally(() => { + this.closingPromise = void 0; + }); + } + return this.closingPromise; + } + disconnect(reconnect = false) { + if (this.closed && !reconnect) { + return; + } + this.closed = true; + this.readyEmitted = false; + this.statusOverride = reconnect ? void 0 : "end"; + this.emit("close"); + if (reconnect) { + void this.closeRaw().then(() => { + this.emit("reconnecting"); + return this.connect(); + }).catch((error) => this.emit("error", error)); + return; + } + void this.closeRaw(); + this.emit("end"); + } + async quit() { + if (this.closed) { + setImmediate(() => { + this.emit("end"); + this.emit("close"); + }); + return "OK"; + } + this.closed = true; + this.readyEmitted = false; + this.statusOverride = "end"; + void this.closeRaw(); + setImmediate(() => { + this.emit("end"); + this.emit("close"); + }); + return "OK"; + } + duplicate(...args) { + var _a; + const options = (_a = args[0]) !== null && _a !== void 0 ? _a : {}; + const duplicated = (async () => { + var _a2, _b; + const raw = await this.ensureRaw(); + const clientConstructor = raw.constructor; + const createClient = (_a2 = clientConstructor === null || clientConstructor === void 0 ? void 0 : clientConstructor.createClient) === null || _a2 === void 0 ? void 0 : _a2.bind(clientConstructor); + const config = (_b = raw.config) !== null && _b !== void 0 ? _b : raw.options; + if (!createClient || !config) { + throw new Error("BullMQ: Cannot duplicate Valkey Glide client: missing createClient() or config. Ensure the client was created via GlideClient.createClient()/GlideClusterClient.createClient()."); + } + return createClient(config); + })(); + return new _ValkeyGlideAdapter(duplicated, options.connectionName); + } + defineCommand(name, definition) { + const sha = (0, crypto_1.createHash)("sha1").update(definition.lua).digest("hex"); + const script = { + sha, + lua: definition.lua, + numberOfKeys: definition.numberOfKeys + }; + this.scripts.set(name, script); + this.scriptsBySha.set(sha, script); + this[name] = (...args) => this.runCommand(name, args); + void this.ensureScriptLoaded(script); + } + async runCommand(name, args) { + const script = this.scripts.get(name); + if (!script) { + throw new Error(`BullMQ: command "${name}" is not defined. Use defineCommand() before runCommand().`); + } + const normalizedArgs = normalizeScriptArgs(args); + const keys = normalizedArgs.slice(0, script.numberOfKeys).map(toGlideArg); + const argv = normalizedArgs.slice(script.numberOfKeys).map(toGlideArg); + const evalShaArgs = [ + "EVALSHA", + script.sha, + String(script.numberOfKeys), + ...keys, + ...argv + ]; + try { + return await this.runRawCommand(evalShaArgs); + } catch (err) { + if (typeof (err === null || err === void 0 ? void 0 : err.message) === "string" && err.message.toLowerCase().includes("noscript")) { + return this.runRawCommand([ + "EVAL", + script.lua, + String(script.numberOfKeys), + ...keys, + ...argv + ]); + } + throw err; + } + } + multi() { + return new ValkeyGlideTransaction(this, this.scripts); + } + pipeline() { + return this.multi(); + } + async hgetall(key) { + return normalizeHashReply(await this.runRawCommand(["HGETALL", key])); + } + async hget(key, field) { + const value = await this.runRawCommand(["HGET", key, field]); + return value == null ? null : toStringValue(value); + } + async hmget(key, ...fields) { + const value = await this.runRawCommand(["HMGET", key, ...fields]); + return Array.isArray(value) ? value.map((item) => item == null ? null : toStringValue(item)) : []; + } + async hset(key, data) { + const args = ["HSET", key]; + for (const [field, value] of Object.entries(data)) { + args.push(field, toGlideArg(value)); + } + return Number(await this.runRawCommand(args)); + } + async hdel(key, ...fields) { + return Number(await this.runRawCommand(["HDEL", key, ...fields])); + } + async hexists(key, field) { + const result = await this.runRawCommand(["HEXISTS", key, field]); + if (typeof result === "boolean") { + return result ? 1 : 0; + } + return Number(result); + } + async get(key) { + const value = await this.runRawCommand(["GET", key]); + return value == null ? null : toStringValue(value); + } + async set(key, value, options) { + const args = ["SET", key, toGlideArg(value)]; + if ((options === null || options === void 0 ? void 0 : options.PX) != null) { + args.push("PX", String(options.PX)); + } else if ((options === null || options === void 0 ? void 0 : options.EX) != null) { + args.push("EX", String(options.EX)); + } + const result = await this.runRawCommand(args); + return result == null ? null : toStringValue(result); + } + async del(...keys) { + if (keys.length === 0) { + return 0; + } + return Number(await this.runRawCommand(["DEL", ...keys])); + } + async zrange(key, start, end, options) { + const args = ["ZRANGE", key, String(start), String(end)]; + if (options === null || options === void 0 ? void 0 : options.WITHSCORES) { + args.push("WITHSCORES"); + } + const result = await this.runRawCommand(args); + return normalizeSortedSetReply(result, options === null || options === void 0 ? void 0 : options.WITHSCORES); + } + async zrevrange(key, start, end, options) { + const args = ["ZREVRANGE", key, String(start), String(end)]; + if (options === null || options === void 0 ? void 0 : options.WITHSCORES) { + args.push("WITHSCORES"); + } + const result = await this.runRawCommand(args); + return normalizeSortedSetReply(result, options === null || options === void 0 ? void 0 : options.WITHSCORES); + } + async zcard(key) { + return Number(await this.runRawCommand(["ZCARD", key])); + } + async zscore(key, member) { + const result = await this.runRawCommand(["ZSCORE", key, member]); + return result == null ? null : toStringValue(result); + } + async lrange(key, start, end) { + const result = await this.runRawCommand([ + "LRANGE", + key, + String(start), + String(end) + ]); + return Array.isArray(result) ? result.map(toStringValue) : []; + } + async llen(key) { + return Number(await this.runRawCommand(["LLEN", key])); + } + async ltrim(key, start, end) { + const result = await this.runRawCommand([ + "LTRIM", + key, + String(start), + String(end) + ]); + return result == null ? "OK" : toStringValue(result); + } + async lpos(key, value) { + const result = await this.runRawCommand(["LPOS", key, value]); + return result == null ? null : Number(result); + } + async smembers(key) { + const result = await this.runRawCommand(["SMEMBERS", key]); + return Array.isArray(result) ? result.map(toStringValue) : []; + } + async xadd(key, id, fields, options) { + const args = ["XADD", key]; + if ((options === null || options === void 0 ? void 0 : options.MAXLEN) != null) { + args.push("MAXLEN"); + if (options.approximate !== false) { + args.push("~"); + } + args.push(String(options.MAXLEN)); + } + args.push(id); + for (const [field, value] of Object.entries(fields)) { + args.push(field, toGlideArg(value)); + } + return toStringValue(await this.runRawCommand(args)); + } + async xread(streams, options) { + const args = ["XREAD"]; + if ((options === null || options === void 0 ? void 0 : options.BLOCK) != null) { + args.push("BLOCK", String(options.BLOCK)); + } + if ((options === null || options === void 0 ? void 0 : options.COUNT) != null) { + args.push("COUNT", String(options.COUNT)); + } + args.push("STREAMS"); + for (const stream of streams) { + args.push(stream.key); + } + for (const stream of streams) { + args.push(stream.id); + } + return normalizeXReadReply(await this.runRawCommand(args)); + } + async xtrim(key, strategy, threshold, options) { + const args = ["XTRIM", key, strategy]; + if ((options === null || options === void 0 ? void 0 : options.approximate) !== false) { + args.push("~"); + } + args.push(String(threshold)); + return Number(await this.runRawCommand(args)); + } + async bzpopmin(key, timeout) { + const result = await this.runRawCommand(["BZPOPMIN", key, String(timeout)]); + if (!result) { + return null; + } + if (Array.isArray(result) && result.length >= 3) { + return [ + toStringValue(result[0]), + toStringValue(result[1]), + toStringValue(result[2]) + ]; + } + return null; + } + async info() { + return toStringValue(await this.runRawCommand(["INFO"])); + } + async clientSetName(name) { + return this.runRawCommand(["CLIENT", "SETNAME", name], { + decoder: GLIDE_STRING_DECODER + }); + } + async clientList() { + return toStringValue(await this.runRawCommand(["CLIENT", "LIST"], { + decoder: GLIDE_STRING_DECODER + })); + } + async scan(cursor, options) { + const args = ["SCAN", String(cursor)]; + if (options === null || options === void 0 ? void 0 : options.MATCH) { + args.push("MATCH", options.MATCH); + } + if ((options === null || options === void 0 ? void 0 : options.COUNT) != null) { + args.push("COUNT", String(options.COUNT)); + } + return normalizeScanReply(await this.runRawCommand(args)); + } + scanStream(options) { + let cursor = "0"; + let running = false; + const stream = new stream_1.Readable({ + objectMode: true, + read: () => { + if (running) { + return; + } + running = true; + (async () => { + do { + const [nextCursor, keys] = await this.scan(cursor, { + MATCH: options.match, + COUNT: options.count + }); + cursor = nextCursor; + if (keys.length > 0 && !stream.push(keys)) { + return; + } + } while (cursor !== "0"); + stream.push(null); + })().catch((err) => stream.destroy(err)).finally(() => { + running = false; + }); + } + }); + return stream; + } + async keys(pattern) { + const result = await this.runRawCommand(["KEYS", pattern]); + return Array.isArray(result) ? result.map(toStringValue) : []; + } + async exists(...keys) { + if (keys.length === 0) { + return 0; + } + const result = await this.runRawCommand(["EXISTS", ...keys]); + if (typeof result === "boolean") { + return result ? 1 : 0; + } + return Number(result); + } + async zadd(key, ...args) { + const commandArgs = ["ZADD", key]; + for (let i = 0; i < args.length; i += 2) { + commandArgs.push(toGlideArg(args[i]), toGlideArg(args[i + 1])); + } + return Number(await this.runRawCommand(commandArgs)); + } + async zrem(key, ...members) { + return Number(await this.runRawCommand(["ZREM", key, ...members])); + } + async xlen(key) { + return Number(await this.runRawCommand(["XLEN", key])); + } + async xrevrange(key, end, start, ...rest) { + const args = ["XREVRANGE", key, end, start]; + if (rest[0] === "COUNT") { + args.push("COUNT", toGlideArg(rest[1])); + } + return normalizeXRangeReply(await this.runRawCommand(args)); + } + async sadd(key, ...members) { + return Number(await this.runRawCommand([ + "SADD", + key, + ...members.map((member) => toGlideArg(member)) + ])); + } + async scard(key) { + return Number(await this.runRawCommand(["SCARD", key])); + } + async lpush(key, ...values) { + return Number(await this.runRawCommand(["LPUSH", key, ...values])); + } + async rpop(key) { + const result = await this.runRawCommand(["RPOP", key]); + return result == null ? null : toStringValue(result); + } + async incr(key) { + return Number(await this.runRawCommand(["INCR", key])); + } + async incrby(key, increment) { + return Number(await this.runRawCommand(["INCRBY", key, String(increment)])); + } + async flushall() { + const result = await this.runRawCommand(["FLUSHALL"]); + return result == null ? "OK" : toStringValue(result); + } + async execQueuedCommands(commands) { + const requiredScripts = commands.map((command) => String(command.args[0]).toUpperCase() === "EVALSHA" ? this.scriptsBySha.get(toStringValue(command.args[1])) : void 0).filter((script) => Boolean(script)); + if (requiredScripts.length > 0) { + await Promise.all(requiredScripts.map((script) => this.ensureScriptLoaded(script))); + } + return this.runSerialized(async (raw) => { + if (typeof raw.exec === "function") { + const nativeBatch = createGlideBatch(true); + const batch = nativeBatch !== null && nativeBatch !== void 0 ? nativeBatch : createCompatibilityBatch(); + if (batch) { + for (const command of commands) { + batch.customCommand(command.args); + } + let execResult; + try { + execResult = await raw.exec(batch, false); + } catch (err) { + if (nativeBatch) { + throw err; + } + execResult = null; + } + if (!execResult) { + if (nativeBatch) { + return null; + } + } else { + return execResult.map((value, index) => { + var _a; + if (value instanceof Error) { + return [value, null]; + } + const transform = (_a = commands[index]) === null || _a === void 0 ? void 0 : _a.transform; + return [null, transform ? transform(value) : value]; + }); + } + } + } + await raw.customCommand(["MULTI"]); + try { + for (const command of commands) { + await raw.customCommand(command.args, { + decoder: GLIDE_STRING_DECODER + }); + } + const execResult = await raw.customCommand(["EXEC"]); + if (!execResult) { + return null; + } + const results = Array.isArray(execResult) ? execResult : [execResult]; + return results.map((value, index) => { + var _a; + if (value instanceof Error) { + return [value, null]; + } + const transform = (_a = commands[index]) === null || _a === void 0 ? void 0 : _a.transform; + return [null, transform ? transform(value) : value]; + }); + } catch (err) { + try { + await raw.customCommand(["DISCARD"]); + } catch (_a) { + } + throw err; + } + }); + } + }; + var ValkeyGlideTransaction = class { + constructor(adapter, scripts) { + this.adapter = adapter; + this.scripts = scripts; + this.commands = []; + } + queueCommand(args, transform) { + this.commands.push({ args, transform }); + return this; + } + hgetall(key) { + return this.queueCommand(["HGETALL", key], normalizeHashReply); + } + hset(key, data) { + const args = ["HSET", key]; + for (const [field, value] of Object.entries(data)) { + args.push(field, toGlideArg(value)); + } + return this.queueCommand(args); + } + hscan(key, cursor, options) { + const args = ["HSCAN", key, String(cursor)]; + if ((options === null || options === void 0 ? void 0 : options.COUNT) != null) { + args.push("COUNT", String(options.COUNT)); + } + return this.queueCommand(args, (value) => { + if (Array.isArray(value) && value.length >= 2) { + return [toStringValue(value[0]), flattenFieldPairs(value[1])]; + } + return ["0", []]; + }); + } + smembers(key) { + return this.queueCommand(["SMEMBERS", key], (value) => Array.isArray(value) ? value.map((item) => toStringValue(item)) : []); + } + sscan(key, cursor, options) { + const args = ["SSCAN", key, String(cursor)]; + if ((options === null || options === void 0 ? void 0 : options.COUNT) != null) { + args.push("COUNT", String(options.COUNT)); + } + return this.queueCommand(args, (value) => { + if (Array.isArray(value) && value.length >= 2) { + const members = Array.isArray(value[1]) ? value[1].map((item) => toStringValue(item)) : []; + return [toStringValue(value[0]), members]; + } + return ["0", []]; + }); + } + zrange(key, start, end) { + return this.queueCommand(["ZRANGE", key, String(start), String(end)]); + } + lrange(key, start, end) { + return this.queueCommand(["LRANGE", key, String(start), String(end)]); + } + llen(key) { + return this.queueCommand(["LLEN", key]); + } + del(...keys) { + if (keys.length > 0) { + this.queueCommand(["DEL", ...keys]); + } + return this; + } + runCommand(name, args) { + const script = this.scripts.get(name); + if (!script) { + throw new Error(`BullMQ: command "${name}" is not defined. Use defineCommand() before adding it to transactions.`); + } + const normalizedArgs = normalizeScriptArgs(args); + const keys = normalizedArgs.slice(0, script.numberOfKeys).map(toGlideArg); + const argv = normalizedArgs.slice(script.numberOfKeys).map(toGlideArg); + return this.queueCommand([ + "EVALSHA", + script.sha, + String(script.numberOfKeys), + ...keys, + ...argv + ]); + } + exec() { + return this.adapter.execQueuedCommands(this.commands); + } + }; + } +}); + +// ../../node_modules/.pnpm/luxon@3.7.2/node_modules/luxon/build/node/luxon.js +var require_luxon = __commonJS({ + "../../node_modules/.pnpm/luxon@3.7.2/node_modules/luxon/build/node/luxon.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var LuxonError = class extends Error { + }; + var InvalidDateTimeError = class extends LuxonError { + constructor(reason) { + super(`Invalid DateTime: ${reason.toMessage()}`); + } + }; + var InvalidIntervalError = class extends LuxonError { + constructor(reason) { + super(`Invalid Interval: ${reason.toMessage()}`); + } + }; + var InvalidDurationError = class extends LuxonError { + constructor(reason) { + super(`Invalid Duration: ${reason.toMessage()}`); + } + }; + var ConflictingSpecificationError = class extends LuxonError { + }; + var InvalidUnitError = class extends LuxonError { + constructor(unit) { + super(`Invalid unit ${unit}`); + } + }; + var InvalidArgumentError = class extends LuxonError { + }; + var ZoneIsAbstractError = class extends LuxonError { + constructor() { + super("Zone is an abstract class"); + } + }; + var n = "numeric"; + var s = "short"; + var l2 = "long"; + var DATE_SHORT = { + year: n, + month: n, + day: n + }; + var DATE_MED = { + year: n, + month: s, + day: n + }; + var DATE_MED_WITH_WEEKDAY = { + year: n, + month: s, + day: n, + weekday: s + }; + var DATE_FULL = { + year: n, + month: l2, + day: n + }; + var DATE_HUGE = { + year: n, + month: l2, + day: n, + weekday: l2 + }; + var TIME_SIMPLE = { + hour: n, + minute: n + }; + var TIME_WITH_SECONDS = { + hour: n, + minute: n, + second: n + }; + var TIME_WITH_SHORT_OFFSET = { + hour: n, + minute: n, + second: n, + timeZoneName: s + }; + var TIME_WITH_LONG_OFFSET = { + hour: n, + minute: n, + second: n, + timeZoneName: l2 + }; + var TIME_24_SIMPLE = { + hour: n, + minute: n, + hourCycle: "h23" + }; + var TIME_24_WITH_SECONDS = { + hour: n, + minute: n, + second: n, + hourCycle: "h23" + }; + var TIME_24_WITH_SHORT_OFFSET = { + hour: n, + minute: n, + second: n, + hourCycle: "h23", + timeZoneName: s + }; + var TIME_24_WITH_LONG_OFFSET = { + hour: n, + minute: n, + second: n, + hourCycle: "h23", + timeZoneName: l2 + }; + var DATETIME_SHORT = { + year: n, + month: n, + day: n, + hour: n, + minute: n + }; + var DATETIME_SHORT_WITH_SECONDS = { + year: n, + month: n, + day: n, + hour: n, + minute: n, + second: n + }; + var DATETIME_MED = { + year: n, + month: s, + day: n, + hour: n, + minute: n + }; + var DATETIME_MED_WITH_SECONDS = { + year: n, + month: s, + day: n, + hour: n, + minute: n, + second: n + }; + var DATETIME_MED_WITH_WEEKDAY = { + year: n, + month: s, + day: n, + weekday: s, + hour: n, + minute: n + }; + var DATETIME_FULL = { + year: n, + month: l2, + day: n, + hour: n, + minute: n, + timeZoneName: s + }; + var DATETIME_FULL_WITH_SECONDS = { + year: n, + month: l2, + day: n, + hour: n, + minute: n, + second: n, + timeZoneName: s + }; + var DATETIME_HUGE = { + year: n, + month: l2, + day: n, + weekday: l2, + hour: n, + minute: n, + timeZoneName: l2 + }; + var DATETIME_HUGE_WITH_SECONDS = { + year: n, + month: l2, + day: n, + weekday: l2, + hour: n, + minute: n, + second: n, + timeZoneName: l2 + }; + var Zone = class { + /** + * The type of zone + * @abstract + * @type {string} + */ + get type() { + throw new ZoneIsAbstractError(); + } + /** + * The name of this zone. + * @abstract + * @type {string} + */ + get name() { + throw new ZoneIsAbstractError(); + } + /** + * The IANA name of this zone. + * Defaults to `name` if not overwritten by a subclass. + * @abstract + * @type {string} + */ + get ianaName() { + return this.name; + } + /** + * Returns whether the offset is known to be fixed for the whole year. + * @abstract + * @type {boolean} + */ + get isUniversal() { + throw new ZoneIsAbstractError(); + } + /** + * Returns the offset's common name (such as EST) at the specified timestamp + * @abstract + * @param {number} ts - Epoch milliseconds for which to get the name + * @param {Object} opts - Options to affect the format + * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'. + * @param {string} opts.locale - What locale to return the offset name in. + * @return {string} + */ + offsetName(ts, opts) { + throw new ZoneIsAbstractError(); + } + /** + * Returns the offset's value as a string + * @abstract + * @param {number} ts - Epoch milliseconds for which to get the offset + * @param {string} format - What style of offset to return. + * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively + * @return {string} + */ + formatOffset(ts, format) { + throw new ZoneIsAbstractError(); + } + /** + * Return the offset in minutes for this zone at the specified timestamp. + * @abstract + * @param {number} ts - Epoch milliseconds for which to compute the offset + * @return {number} + */ + offset(ts) { + throw new ZoneIsAbstractError(); + } + /** + * Return whether this Zone is equal to another zone + * @abstract + * @param {Zone} otherZone - the zone to compare + * @return {boolean} + */ + equals(otherZone) { + throw new ZoneIsAbstractError(); + } + /** + * Return whether this Zone is valid. + * @abstract + * @type {boolean} + */ + get isValid() { + throw new ZoneIsAbstractError(); + } + }; + var singleton$1 = null; + var SystemZone = class _SystemZone extends Zone { + /** + * Get a singleton instance of the local zone + * @return {SystemZone} + */ + static get instance() { + if (singleton$1 === null) { + singleton$1 = new _SystemZone(); + } + return singleton$1; + } + /** @override **/ + get type() { + return "system"; + } + /** @override **/ + get name() { + return new Intl.DateTimeFormat().resolvedOptions().timeZone; + } + /** @override **/ + get isUniversal() { + return false; + } + /** @override **/ + offsetName(ts, { + format, + locale + }) { + return parseZoneInfo(ts, format, locale); + } + /** @override **/ + formatOffset(ts, format) { + return formatOffset(this.offset(ts), format); + } + /** @override **/ + offset(ts) { + return -new Date(ts).getTimezoneOffset(); + } + /** @override **/ + equals(otherZone) { + return otherZone.type === "system"; + } + /** @override **/ + get isValid() { + return true; + } + }; + var dtfCache = /* @__PURE__ */ new Map(); + function makeDTF(zoneName) { + let dtf = dtfCache.get(zoneName); + if (dtf === void 0) { + dtf = new Intl.DateTimeFormat("en-US", { + hour12: false, + timeZone: zoneName, + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit", + second: "2-digit", + era: "short" + }); + dtfCache.set(zoneName, dtf); + } + return dtf; + } + var typeToPos = { + year: 0, + month: 1, + day: 2, + era: 3, + hour: 4, + minute: 5, + second: 6 + }; + function hackyOffset(dtf, date) { + const formatted = dtf.format(date).replace(/\u200E/g, ""), parsed = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(formatted), [, fMonth, fDay, fYear, fadOrBc, fHour, fMinute, fSecond] = parsed; + return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond]; + } + function partsOffset(dtf, date) { + const formatted = dtf.formatToParts(date); + const filled = []; + for (let i = 0; i < formatted.length; i++) { + const { + type, + value + } = formatted[i]; + const pos = typeToPos[type]; + if (type === "era") { + filled[pos] = value; + } else if (!isUndefined(pos)) { + filled[pos] = parseInt(value, 10); + } + } + return filled; + } + var ianaZoneCache = /* @__PURE__ */ new Map(); + var IANAZone = class _IANAZone extends Zone { + /** + * @param {string} name - Zone name + * @return {IANAZone} + */ + static create(name) { + let zone = ianaZoneCache.get(name); + if (zone === void 0) { + ianaZoneCache.set(name, zone = new _IANAZone(name)); + } + return zone; + } + /** + * Reset local caches. Should only be necessary in testing scenarios. + * @return {void} + */ + static resetCache() { + ianaZoneCache.clear(); + dtfCache.clear(); + } + /** + * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that. + * @param {string} s - The string to check validity on + * @example IANAZone.isValidSpecifier("America/New_York") //=> true + * @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false + * @deprecated For backward compatibility, this forwards to isValidZone, better use `isValidZone()` directly instead. + * @return {boolean} + */ + static isValidSpecifier(s2) { + return this.isValidZone(s2); + } + /** + * Returns whether the provided string identifies a real zone + * @param {string} zone - The string to check + * @example IANAZone.isValidZone("America/New_York") //=> true + * @example IANAZone.isValidZone("Fantasia/Castle") //=> false + * @example IANAZone.isValidZone("Sport~~blorp") //=> false + * @return {boolean} + */ + static isValidZone(zone) { + if (!zone) { + return false; + } + try { + new Intl.DateTimeFormat("en-US", { + timeZone: zone + }).format(); + return true; + } catch (e) { + return false; + } + } + constructor(name) { + super(); + this.zoneName = name; + this.valid = _IANAZone.isValidZone(name); + } + /** + * The type of zone. `iana` for all instances of `IANAZone`. + * @override + * @type {string} + */ + get type() { + return "iana"; + } + /** + * The name of this zone (i.e. the IANA zone name). + * @override + * @type {string} + */ + get name() { + return this.zoneName; + } + /** + * Returns whether the offset is known to be fixed for the whole year: + * Always returns false for all IANA zones. + * @override + * @type {boolean} + */ + get isUniversal() { + return false; + } + /** + * Returns the offset's common name (such as EST) at the specified timestamp + * @override + * @param {number} ts - Epoch milliseconds for which to get the name + * @param {Object} opts - Options to affect the format + * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'. + * @param {string} opts.locale - What locale to return the offset name in. + * @return {string} + */ + offsetName(ts, { + format, + locale + }) { + return parseZoneInfo(ts, format, locale, this.name); + } + /** + * Returns the offset's value as a string + * @override + * @param {number} ts - Epoch milliseconds for which to get the offset + * @param {string} format - What style of offset to return. + * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively + * @return {string} + */ + formatOffset(ts, format) { + return formatOffset(this.offset(ts), format); + } + /** + * Return the offset in minutes for this zone at the specified timestamp. + * @override + * @param {number} ts - Epoch milliseconds for which to compute the offset + * @return {number} + */ + offset(ts) { + if (!this.valid) return NaN; + const date = new Date(ts); + if (isNaN(date)) return NaN; + const dtf = makeDTF(this.name); + let [year, month, day, adOrBc, hour, minute, second] = dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date); + if (adOrBc === "BC") { + year = -Math.abs(year) + 1; + } + const adjustedHour = hour === 24 ? 0 : hour; + const asUTC = objToLocalTS({ + year, + month, + day, + hour: adjustedHour, + minute, + second, + millisecond: 0 + }); + let asTS = +date; + const over = asTS % 1e3; + asTS -= over >= 0 ? over : 1e3 + over; + return (asUTC - asTS) / (60 * 1e3); + } + /** + * Return whether this Zone is equal to another zone + * @override + * @param {Zone} otherZone - the zone to compare + * @return {boolean} + */ + equals(otherZone) { + return otherZone.type === "iana" && otherZone.name === this.name; + } + /** + * Return whether this Zone is valid. + * @override + * @type {boolean} + */ + get isValid() { + return this.valid; + } + }; + var intlLFCache = {}; + function getCachedLF(locString, opts = {}) { + const key = JSON.stringify([locString, opts]); + let dtf = intlLFCache[key]; + if (!dtf) { + dtf = new Intl.ListFormat(locString, opts); + intlLFCache[key] = dtf; + } + return dtf; + } + var intlDTCache = /* @__PURE__ */ new Map(); + function getCachedDTF(locString, opts = {}) { + const key = JSON.stringify([locString, opts]); + let dtf = intlDTCache.get(key); + if (dtf === void 0) { + dtf = new Intl.DateTimeFormat(locString, opts); + intlDTCache.set(key, dtf); + } + return dtf; + } + var intlNumCache = /* @__PURE__ */ new Map(); + function getCachedINF(locString, opts = {}) { + const key = JSON.stringify([locString, opts]); + let inf = intlNumCache.get(key); + if (inf === void 0) { + inf = new Intl.NumberFormat(locString, opts); + intlNumCache.set(key, inf); + } + return inf; + } + var intlRelCache = /* @__PURE__ */ new Map(); + function getCachedRTF(locString, opts = {}) { + const { + base, + ...cacheKeyOpts + } = opts; + const key = JSON.stringify([locString, cacheKeyOpts]); + let inf = intlRelCache.get(key); + if (inf === void 0) { + inf = new Intl.RelativeTimeFormat(locString, opts); + intlRelCache.set(key, inf); + } + return inf; + } + var sysLocaleCache = null; + function systemLocale() { + if (sysLocaleCache) { + return sysLocaleCache; + } else { + sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale; + return sysLocaleCache; + } + } + var intlResolvedOptionsCache = /* @__PURE__ */ new Map(); + function getCachedIntResolvedOptions(locString) { + let opts = intlResolvedOptionsCache.get(locString); + if (opts === void 0) { + opts = new Intl.DateTimeFormat(locString).resolvedOptions(); + intlResolvedOptionsCache.set(locString, opts); + } + return opts; + } + var weekInfoCache = /* @__PURE__ */ new Map(); + function getCachedWeekInfo(locString) { + let data = weekInfoCache.get(locString); + if (!data) { + const locale = new Intl.Locale(locString); + data = "getWeekInfo" in locale ? locale.getWeekInfo() : locale.weekInfo; + if (!("minimalDays" in data)) { + data = { + ...fallbackWeekSettings, + ...data + }; + } + weekInfoCache.set(locString, data); + } + return data; + } + function parseLocaleString(localeStr) { + const xIndex = localeStr.indexOf("-x-"); + if (xIndex !== -1) { + localeStr = localeStr.substring(0, xIndex); + } + const uIndex = localeStr.indexOf("-u-"); + if (uIndex === -1) { + return [localeStr]; + } else { + let options; + let selectedStr; + try { + options = getCachedDTF(localeStr).resolvedOptions(); + selectedStr = localeStr; + } catch (e) { + const smaller = localeStr.substring(0, uIndex); + options = getCachedDTF(smaller).resolvedOptions(); + selectedStr = smaller; + } + const { + numberingSystem, + calendar + } = options; + return [selectedStr, numberingSystem, calendar]; + } + } + function intlConfigString(localeStr, numberingSystem, outputCalendar) { + if (outputCalendar || numberingSystem) { + if (!localeStr.includes("-u-")) { + localeStr += "-u"; + } + if (outputCalendar) { + localeStr += `-ca-${outputCalendar}`; + } + if (numberingSystem) { + localeStr += `-nu-${numberingSystem}`; + } + return localeStr; + } else { + return localeStr; + } + } + function mapMonths(f) { + const ms = []; + for (let i = 1; i <= 12; i++) { + const dt = DateTime.utc(2009, i, 1); + ms.push(f(dt)); + } + return ms; + } + function mapWeekdays(f) { + const ms = []; + for (let i = 1; i <= 7; i++) { + const dt = DateTime.utc(2016, 11, 13 + i); + ms.push(f(dt)); + } + return ms; + } + function listStuff(loc, length, englishFn, intlFn) { + const mode = loc.listingMode(); + if (mode === "error") { + return null; + } else if (mode === "en") { + return englishFn(length); + } else { + return intlFn(length); + } + } + function supportsFastNumbers(loc) { + if (loc.numberingSystem && loc.numberingSystem !== "latn") { + return false; + } else { + return loc.numberingSystem === "latn" || !loc.locale || loc.locale.startsWith("en") || getCachedIntResolvedOptions(loc.locale).numberingSystem === "latn"; + } + } + var PolyNumberFormatter = class { + constructor(intl, forceSimple, opts) { + this.padTo = opts.padTo || 0; + this.floor = opts.floor || false; + const { + padTo, + floor, + ...otherOpts + } = opts; + if (!forceSimple || Object.keys(otherOpts).length > 0) { + const intlOpts = { + useGrouping: false, + ...opts + }; + if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo; + this.inf = getCachedINF(intl, intlOpts); + } + } + format(i) { + if (this.inf) { + const fixed = this.floor ? Math.floor(i) : i; + return this.inf.format(fixed); + } else { + const fixed = this.floor ? Math.floor(i) : roundTo(i, 3); + return padStart(fixed, this.padTo); + } + } + }; + var PolyDateFormatter = class { + constructor(dt, intl, opts) { + this.opts = opts; + this.originalZone = void 0; + let z = void 0; + if (this.opts.timeZone) { + this.dt = dt; + } else if (dt.zone.type === "fixed") { + const gmtOffset = -1 * (dt.offset / 60); + const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`; + if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) { + z = offsetZ; + this.dt = dt; + } else { + z = "UTC"; + this.dt = dt.offset === 0 ? dt : dt.setZone("UTC").plus({ + minutes: dt.offset + }); + this.originalZone = dt.zone; + } + } else if (dt.zone.type === "system") { + this.dt = dt; + } else if (dt.zone.type === "iana") { + this.dt = dt; + z = dt.zone.name; + } else { + z = "UTC"; + this.dt = dt.setZone("UTC").plus({ + minutes: dt.offset + }); + this.originalZone = dt.zone; + } + const intlOpts = { + ...this.opts + }; + intlOpts.timeZone = intlOpts.timeZone || z; + this.dtf = getCachedDTF(intl, intlOpts); + } + format() { + if (this.originalZone) { + return this.formatToParts().map(({ + value + }) => value).join(""); + } + return this.dtf.format(this.dt.toJSDate()); + } + formatToParts() { + const parts = this.dtf.formatToParts(this.dt.toJSDate()); + if (this.originalZone) { + return parts.map((part) => { + if (part.type === "timeZoneName") { + const offsetName = this.originalZone.offsetName(this.dt.ts, { + locale: this.dt.locale, + format: this.opts.timeZoneName + }); + return { + ...part, + value: offsetName + }; + } else { + return part; + } + }); + } + return parts; + } + resolvedOptions() { + return this.dtf.resolvedOptions(); + } + }; + var PolyRelFormatter = class { + constructor(intl, isEnglish, opts) { + this.opts = { + style: "long", + ...opts + }; + if (!isEnglish && hasRelative()) { + this.rtf = getCachedRTF(intl, opts); + } + } + format(count, unit) { + if (this.rtf) { + return this.rtf.format(count, unit); + } else { + return formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== "long"); + } + } + formatToParts(count, unit) { + if (this.rtf) { + return this.rtf.formatToParts(count, unit); + } else { + return []; + } + } + }; + var fallbackWeekSettings = { + firstDay: 1, + minimalDays: 4, + weekend: [6, 7] + }; + var Locale = class _Locale { + static fromOpts(opts) { + return _Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.weekSettings, opts.defaultToEN); + } + static create(locale, numberingSystem, outputCalendar, weekSettings, defaultToEN = false) { + const specifiedLocale = locale || Settings.defaultLocale; + const localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale()); + const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem; + const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar; + const weekSettingsR = validateWeekSettings(weekSettings) || Settings.defaultWeekSettings; + return new _Locale(localeR, numberingSystemR, outputCalendarR, weekSettingsR, specifiedLocale); + } + static resetCache() { + sysLocaleCache = null; + intlDTCache.clear(); + intlNumCache.clear(); + intlRelCache.clear(); + intlResolvedOptionsCache.clear(); + weekInfoCache.clear(); + } + static fromObject({ + locale, + numberingSystem, + outputCalendar, + weekSettings + } = {}) { + return _Locale.create(locale, numberingSystem, outputCalendar, weekSettings); + } + constructor(locale, numbering, outputCalendar, weekSettings, specifiedLocale) { + const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale); + this.locale = parsedLocale; + this.numberingSystem = numbering || parsedNumberingSystem || null; + this.outputCalendar = outputCalendar || parsedOutputCalendar || null; + this.weekSettings = weekSettings; + this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar); + this.weekdaysCache = { + format: {}, + standalone: {} + }; + this.monthsCache = { + format: {}, + standalone: {} + }; + this.meridiemCache = null; + this.eraCache = {}; + this.specifiedLocale = specifiedLocale; + this.fastNumbersCached = null; + } + get fastNumbers() { + if (this.fastNumbersCached == null) { + this.fastNumbersCached = supportsFastNumbers(this); + } + return this.fastNumbersCached; + } + listingMode() { + const isActuallyEn = this.isEnglish(); + const hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory"); + return isActuallyEn && hasNoWeirdness ? "en" : "intl"; + } + clone(alts) { + if (!alts || Object.getOwnPropertyNames(alts).length === 0) { + return this; + } else { + return _Locale.create(alts.locale || this.specifiedLocale, alts.numberingSystem || this.numberingSystem, alts.outputCalendar || this.outputCalendar, validateWeekSettings(alts.weekSettings) || this.weekSettings, alts.defaultToEN || false); + } + } + redefaultToEN(alts = {}) { + return this.clone({ + ...alts, + defaultToEN: true + }); + } + redefaultToSystem(alts = {}) { + return this.clone({ + ...alts, + defaultToEN: false + }); + } + months(length, format = false) { + return listStuff(this, length, months, () => { + const monthSpecialCase = this.intl === "ja" || this.intl.startsWith("ja-"); + format &= !monthSpecialCase; + const intl = format ? { + month: length, + day: "numeric" + } : { + month: length + }, formatStr = format ? "format" : "standalone"; + if (!this.monthsCache[formatStr][length]) { + const mapper = !monthSpecialCase ? (dt) => this.extract(dt, intl, "month") : (dt) => this.dtFormatter(dt, intl).format(); + this.monthsCache[formatStr][length] = mapMonths(mapper); + } + return this.monthsCache[formatStr][length]; + }); + } + weekdays(length, format = false) { + return listStuff(this, length, weekdays, () => { + const intl = format ? { + weekday: length, + year: "numeric", + month: "long", + day: "numeric" + } : { + weekday: length + }, formatStr = format ? "format" : "standalone"; + if (!this.weekdaysCache[formatStr][length]) { + this.weekdaysCache[formatStr][length] = mapWeekdays((dt) => this.extract(dt, intl, "weekday")); + } + return this.weekdaysCache[formatStr][length]; + }); + } + meridiems() { + return listStuff(this, void 0, () => meridiems, () => { + if (!this.meridiemCache) { + const intl = { + hour: "numeric", + hourCycle: "h12" + }; + this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map((dt) => this.extract(dt, intl, "dayperiod")); + } + return this.meridiemCache; + }); + } + eras(length) { + return listStuff(this, length, eras, () => { + const intl = { + era: length + }; + if (!this.eraCache[length]) { + this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map((dt) => this.extract(dt, intl, "era")); + } + return this.eraCache[length]; + }); + } + extract(dt, intlOpts, field) { + const df = this.dtFormatter(dt, intlOpts), results = df.formatToParts(), matching = results.find((m) => m.type.toLowerCase() === field); + return matching ? matching.value : null; + } + numberFormatter(opts = {}) { + return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts); + } + dtFormatter(dt, intlOpts = {}) { + return new PolyDateFormatter(dt, this.intl, intlOpts); + } + relFormatter(opts = {}) { + return new PolyRelFormatter(this.intl, this.isEnglish(), opts); + } + listFormatter(opts = {}) { + return getCachedLF(this.intl, opts); + } + isEnglish() { + return this.locale === "en" || this.locale.toLowerCase() === "en-us" || getCachedIntResolvedOptions(this.intl).locale.startsWith("en-us"); + } + getWeekSettings() { + if (this.weekSettings) { + return this.weekSettings; + } else if (!hasLocaleWeekInfo()) { + return fallbackWeekSettings; + } else { + return getCachedWeekInfo(this.locale); + } + } + getStartOfWeek() { + return this.getWeekSettings().firstDay; + } + getMinDaysInFirstWeek() { + return this.getWeekSettings().minimalDays; + } + getWeekendDays() { + return this.getWeekSettings().weekend; + } + equals(other) { + return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar; + } + toString() { + return `Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`; + } + }; + var singleton = null; + var FixedOffsetZone = class _FixedOffsetZone extends Zone { + /** + * Get a singleton instance of UTC + * @return {FixedOffsetZone} + */ + static get utcInstance() { + if (singleton === null) { + singleton = new _FixedOffsetZone(0); + } + return singleton; + } + /** + * Get an instance with a specified offset + * @param {number} offset - The offset in minutes + * @return {FixedOffsetZone} + */ + static instance(offset2) { + return offset2 === 0 ? _FixedOffsetZone.utcInstance : new _FixedOffsetZone(offset2); + } + /** + * Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6" + * @param {string} s - The offset string to parse + * @example FixedOffsetZone.parseSpecifier("UTC+6") + * @example FixedOffsetZone.parseSpecifier("UTC+06") + * @example FixedOffsetZone.parseSpecifier("UTC-6:00") + * @return {FixedOffsetZone} + */ + static parseSpecifier(s2) { + if (s2) { + const r = s2.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i); + if (r) { + return new _FixedOffsetZone(signedOffset(r[1], r[2])); + } + } + return null; + } + constructor(offset2) { + super(); + this.fixed = offset2; + } + /** + * The type of zone. `fixed` for all instances of `FixedOffsetZone`. + * @override + * @type {string} + */ + get type() { + return "fixed"; + } + /** + * The name of this zone. + * All fixed zones' names always start with "UTC" (plus optional offset) + * @override + * @type {string} + */ + get name() { + return this.fixed === 0 ? "UTC" : `UTC${formatOffset(this.fixed, "narrow")}`; + } + /** + * The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn` + * + * @override + * @type {string} + */ + get ianaName() { + if (this.fixed === 0) { + return "Etc/UTC"; + } else { + return `Etc/GMT${formatOffset(-this.fixed, "narrow")}`; + } + } + /** + * Returns the offset's common name at the specified timestamp. + * + * For fixed offset zones this equals to the zone name. + * @override + */ + offsetName() { + return this.name; + } + /** + * Returns the offset's value as a string + * @override + * @param {number} ts - Epoch milliseconds for which to get the offset + * @param {string} format - What style of offset to return. + * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively + * @return {string} + */ + formatOffset(ts, format) { + return formatOffset(this.fixed, format); + } + /** + * Returns whether the offset is known to be fixed for the whole year: + * Always returns true for all fixed offset zones. + * @override + * @type {boolean} + */ + get isUniversal() { + return true; + } + /** + * Return the offset in minutes for this zone at the specified timestamp. + * + * For fixed offset zones, this is constant and does not depend on a timestamp. + * @override + * @return {number} + */ + offset() { + return this.fixed; + } + /** + * Return whether this Zone is equal to another zone (i.e. also fixed and same offset) + * @override + * @param {Zone} otherZone - the zone to compare + * @return {boolean} + */ + equals(otherZone) { + return otherZone.type === "fixed" && otherZone.fixed === this.fixed; + } + /** + * Return whether this Zone is valid: + * All fixed offset zones are valid. + * @override + * @type {boolean} + */ + get isValid() { + return true; + } + }; + var InvalidZone = class extends Zone { + constructor(zoneName) { + super(); + this.zoneName = zoneName; + } + /** @override **/ + get type() { + return "invalid"; + } + /** @override **/ + get name() { + return this.zoneName; + } + /** @override **/ + get isUniversal() { + return false; + } + /** @override **/ + offsetName() { + return null; + } + /** @override **/ + formatOffset() { + return ""; + } + /** @override **/ + offset() { + return NaN; + } + /** @override **/ + equals() { + return false; + } + /** @override **/ + get isValid() { + return false; + } + }; + function normalizeZone(input, defaultZone2) { + if (isUndefined(input) || input === null) { + return defaultZone2; + } else if (input instanceof Zone) { + return input; + } else if (isString(input)) { + const lowered = input.toLowerCase(); + if (lowered === "default") return defaultZone2; + else if (lowered === "local" || lowered === "system") return SystemZone.instance; + else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance; + else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input); + } else if (isNumber(input)) { + return FixedOffsetZone.instance(input); + } else if (typeof input === "object" && "offset" in input && typeof input.offset === "function") { + return input; + } else { + return new InvalidZone(input); + } + } + var numberingSystems = { + arab: "[\u0660-\u0669]", + arabext: "[\u06F0-\u06F9]", + bali: "[\u1B50-\u1B59]", + beng: "[\u09E6-\u09EF]", + deva: "[\u0966-\u096F]", + fullwide: "[\uFF10-\uFF19]", + gujr: "[\u0AE6-\u0AEF]", + hanidec: "[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]", + khmr: "[\u17E0-\u17E9]", + knda: "[\u0CE6-\u0CEF]", + laoo: "[\u0ED0-\u0ED9]", + limb: "[\u1946-\u194F]", + mlym: "[\u0D66-\u0D6F]", + mong: "[\u1810-\u1819]", + mymr: "[\u1040-\u1049]", + orya: "[\u0B66-\u0B6F]", + tamldec: "[\u0BE6-\u0BEF]", + telu: "[\u0C66-\u0C6F]", + thai: "[\u0E50-\u0E59]", + tibt: "[\u0F20-\u0F29]", + latn: "\\d" + }; + var numberingSystemsUTF16 = { + arab: [1632, 1641], + arabext: [1776, 1785], + bali: [6992, 7001], + beng: [2534, 2543], + deva: [2406, 2415], + fullwide: [65296, 65303], + gujr: [2790, 2799], + khmr: [6112, 6121], + knda: [3302, 3311], + laoo: [3792, 3801], + limb: [6470, 6479], + mlym: [3430, 3439], + mong: [6160, 6169], + mymr: [4160, 4169], + orya: [2918, 2927], + tamldec: [3046, 3055], + telu: [3174, 3183], + thai: [3664, 3673], + tibt: [3872, 3881] + }; + var hanidecChars = numberingSystems.hanidec.replace(/[\[|\]]/g, "").split(""); + function parseDigits(str) { + let value = parseInt(str, 10); + if (isNaN(value)) { + value = ""; + for (let i = 0; i < str.length; i++) { + const code = str.charCodeAt(i); + if (str[i].search(numberingSystems.hanidec) !== -1) { + value += hanidecChars.indexOf(str[i]); + } else { + for (const key in numberingSystemsUTF16) { + const [min, max] = numberingSystemsUTF16[key]; + if (code >= min && code <= max) { + value += code - min; + } + } + } + } + return parseInt(value, 10); + } else { + return value; + } + } + var digitRegexCache = /* @__PURE__ */ new Map(); + function resetDigitRegexCache() { + digitRegexCache.clear(); + } + function digitRegex({ + numberingSystem + }, append = "") { + const ns = numberingSystem || "latn"; + let appendCache = digitRegexCache.get(ns); + if (appendCache === void 0) { + appendCache = /* @__PURE__ */ new Map(); + digitRegexCache.set(ns, appendCache); + } + let regex = appendCache.get(append); + if (regex === void 0) { + regex = new RegExp(`${numberingSystems[ns]}${append}`); + appendCache.set(append, regex); + } + return regex; + } + var now = () => Date.now(); + var defaultZone = "system"; + var defaultLocale = null; + var defaultNumberingSystem = null; + var defaultOutputCalendar = null; + var twoDigitCutoffYear = 60; + var throwOnInvalid; + var defaultWeekSettings = null; + var Settings = class { + /** + * Get the callback for returning the current timestamp. + * @type {function} + */ + static get now() { + return now; + } + /** + * Set the callback for returning the current timestamp. + * The function should return a number, which will be interpreted as an Epoch millisecond count + * @type {function} + * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future + * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time + */ + static set now(n2) { + now = n2; + } + /** + * Set the default time zone to create DateTimes in. Does not affect existing instances. + * Use the value "system" to reset this value to the system's time zone. + * @type {string} + */ + static set defaultZone(zone) { + defaultZone = zone; + } + /** + * Get the default time zone object currently used to create DateTimes. Does not affect existing instances. + * The default value is the system's time zone (the one set on the machine that runs this code). + * @type {Zone} + */ + static get defaultZone() { + return normalizeZone(defaultZone, SystemZone.instance); + } + /** + * Get the default locale to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static get defaultLocale() { + return defaultLocale; + } + /** + * Set the default locale to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static set defaultLocale(locale) { + defaultLocale = locale; + } + /** + * Get the default numbering system to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static get defaultNumberingSystem() { + return defaultNumberingSystem; + } + /** + * Set the default numbering system to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static set defaultNumberingSystem(numberingSystem) { + defaultNumberingSystem = numberingSystem; + } + /** + * Get the default output calendar to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static get defaultOutputCalendar() { + return defaultOutputCalendar; + } + /** + * Set the default output calendar to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static set defaultOutputCalendar(outputCalendar) { + defaultOutputCalendar = outputCalendar; + } + /** + * @typedef {Object} WeekSettings + * @property {number} firstDay + * @property {number} minimalDays + * @property {number[]} weekend + */ + /** + * @return {WeekSettings|null} + */ + static get defaultWeekSettings() { + return defaultWeekSettings; + } + /** + * Allows overriding the default locale week settings, i.e. the start of the week, the weekend and + * how many days are required in the first week of a year. + * Does not affect existing instances. + * + * @param {WeekSettings|null} weekSettings + */ + static set defaultWeekSettings(weekSettings) { + defaultWeekSettings = validateWeekSettings(weekSettings); + } + /** + * Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx. + * @type {number} + */ + static get twoDigitCutoffYear() { + return twoDigitCutoffYear; + } + /** + * Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx. + * @type {number} + * @example Settings.twoDigitCutoffYear = 0 // all 'yy' are interpreted as 20th century + * @example Settings.twoDigitCutoffYear = 99 // all 'yy' are interpreted as 21st century + * @example Settings.twoDigitCutoffYear = 50 // '49' -> 2049; '50' -> 1950 + * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50 + * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50 + */ + static set twoDigitCutoffYear(cutoffYear) { + twoDigitCutoffYear = cutoffYear % 100; + } + /** + * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals + * @type {boolean} + */ + static get throwOnInvalid() { + return throwOnInvalid; + } + /** + * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals + * @type {boolean} + */ + static set throwOnInvalid(t) { + throwOnInvalid = t; + } + /** + * Reset Luxon's global caches. Should only be necessary in testing scenarios. + * @return {void} + */ + static resetCaches() { + Locale.resetCache(); + IANAZone.resetCache(); + DateTime.resetCache(); + resetDigitRegexCache(); + } + }; + var Invalid = class { + constructor(reason, explanation) { + this.reason = reason; + this.explanation = explanation; + } + toMessage() { + if (this.explanation) { + return `${this.reason}: ${this.explanation}`; + } else { + return this.reason; + } + } + }; + var nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; + var leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]; + function unitOutOfRange(unit, value) { + return new Invalid("unit out of range", `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`); + } + function dayOfWeek(year, month, day) { + const d = new Date(Date.UTC(year, month - 1, day)); + if (year < 100 && year >= 0) { + d.setUTCFullYear(d.getUTCFullYear() - 1900); + } + const js = d.getUTCDay(); + return js === 0 ? 7 : js; + } + function computeOrdinal(year, month, day) { + return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1]; + } + function uncomputeOrdinal(year, ordinal) { + const table = isLeapYear(year) ? leapLadder : nonLeapLadder, month0 = table.findIndex((i) => i < ordinal), day = ordinal - table[month0]; + return { + month: month0 + 1, + day + }; + } + function isoWeekdayToLocal(isoWeekday, startOfWeek) { + return (isoWeekday - startOfWeek + 7) % 7 + 1; + } + function gregorianToWeek(gregObj, minDaysInFirstWeek = 4, startOfWeek = 1) { + const { + year, + month, + day + } = gregObj, ordinal = computeOrdinal(year, month, day), weekday = isoWeekdayToLocal(dayOfWeek(year, month, day), startOfWeek); + let weekNumber = Math.floor((ordinal - weekday + 14 - minDaysInFirstWeek) / 7), weekYear; + if (weekNumber < 1) { + weekYear = year - 1; + weekNumber = weeksInWeekYear(weekYear, minDaysInFirstWeek, startOfWeek); + } else if (weekNumber > weeksInWeekYear(year, minDaysInFirstWeek, startOfWeek)) { + weekYear = year + 1; + weekNumber = 1; + } else { + weekYear = year; + } + return { + weekYear, + weekNumber, + weekday, + ...timeObject(gregObj) + }; + } + function weekToGregorian(weekData, minDaysInFirstWeek = 4, startOfWeek = 1) { + const { + weekYear, + weekNumber, + weekday + } = weekData, weekdayOfJan4 = isoWeekdayToLocal(dayOfWeek(weekYear, 1, minDaysInFirstWeek), startOfWeek), yearInDays = daysInYear(weekYear); + let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 7 + minDaysInFirstWeek, year; + if (ordinal < 1) { + year = weekYear - 1; + ordinal += daysInYear(year); + } else if (ordinal > yearInDays) { + year = weekYear + 1; + ordinal -= daysInYear(weekYear); + } else { + year = weekYear; + } + const { + month, + day + } = uncomputeOrdinal(year, ordinal); + return { + year, + month, + day, + ...timeObject(weekData) + }; + } + function gregorianToOrdinal(gregData) { + const { + year, + month, + day + } = gregData; + const ordinal = computeOrdinal(year, month, day); + return { + year, + ordinal, + ...timeObject(gregData) + }; + } + function ordinalToGregorian(ordinalData) { + const { + year, + ordinal + } = ordinalData; + const { + month, + day + } = uncomputeOrdinal(year, ordinal); + return { + year, + month, + day, + ...timeObject(ordinalData) + }; + } + function usesLocalWeekValues(obj2, loc) { + const hasLocaleWeekData = !isUndefined(obj2.localWeekday) || !isUndefined(obj2.localWeekNumber) || !isUndefined(obj2.localWeekYear); + if (hasLocaleWeekData) { + const hasIsoWeekData = !isUndefined(obj2.weekday) || !isUndefined(obj2.weekNumber) || !isUndefined(obj2.weekYear); + if (hasIsoWeekData) { + throw new ConflictingSpecificationError("Cannot mix locale-based week fields with ISO-based week fields"); + } + if (!isUndefined(obj2.localWeekday)) obj2.weekday = obj2.localWeekday; + if (!isUndefined(obj2.localWeekNumber)) obj2.weekNumber = obj2.localWeekNumber; + if (!isUndefined(obj2.localWeekYear)) obj2.weekYear = obj2.localWeekYear; + delete obj2.localWeekday; + delete obj2.localWeekNumber; + delete obj2.localWeekYear; + return { + minDaysInFirstWeek: loc.getMinDaysInFirstWeek(), + startOfWeek: loc.getStartOfWeek() + }; + } else { + return { + minDaysInFirstWeek: 4, + startOfWeek: 1 + }; + } + } + function hasInvalidWeekData(obj2, minDaysInFirstWeek = 4, startOfWeek = 1) { + const validYear = isInteger(obj2.weekYear), validWeek = integerBetween(obj2.weekNumber, 1, weeksInWeekYear(obj2.weekYear, minDaysInFirstWeek, startOfWeek)), validWeekday = integerBetween(obj2.weekday, 1, 7); + if (!validYear) { + return unitOutOfRange("weekYear", obj2.weekYear); + } else if (!validWeek) { + return unitOutOfRange("week", obj2.weekNumber); + } else if (!validWeekday) { + return unitOutOfRange("weekday", obj2.weekday); + } else return false; + } + function hasInvalidOrdinalData(obj2) { + const validYear = isInteger(obj2.year), validOrdinal = integerBetween(obj2.ordinal, 1, daysInYear(obj2.year)); + if (!validYear) { + return unitOutOfRange("year", obj2.year); + } else if (!validOrdinal) { + return unitOutOfRange("ordinal", obj2.ordinal); + } else return false; + } + function hasInvalidGregorianData(obj2) { + const validYear = isInteger(obj2.year), validMonth = integerBetween(obj2.month, 1, 12), validDay = integerBetween(obj2.day, 1, daysInMonth(obj2.year, obj2.month)); + if (!validYear) { + return unitOutOfRange("year", obj2.year); + } else if (!validMonth) { + return unitOutOfRange("month", obj2.month); + } else if (!validDay) { + return unitOutOfRange("day", obj2.day); + } else return false; + } + function hasInvalidTimeData(obj2) { + const { + hour, + minute, + second, + millisecond + } = obj2; + const validHour = integerBetween(hour, 0, 23) || hour === 24 && minute === 0 && second === 0 && millisecond === 0, validMinute = integerBetween(minute, 0, 59), validSecond = integerBetween(second, 0, 59), validMillisecond = integerBetween(millisecond, 0, 999); + if (!validHour) { + return unitOutOfRange("hour", hour); + } else if (!validMinute) { + return unitOutOfRange("minute", minute); + } else if (!validSecond) { + return unitOutOfRange("second", second); + } else if (!validMillisecond) { + return unitOutOfRange("millisecond", millisecond); + } else return false; + } + function isUndefined(o) { + return typeof o === "undefined"; + } + function isNumber(o) { + return typeof o === "number"; + } + function isInteger(o) { + return typeof o === "number" && o % 1 === 0; + } + function isString(o) { + return typeof o === "string"; + } + function isDate(o) { + return Object.prototype.toString.call(o) === "[object Date]"; + } + function hasRelative() { + try { + return typeof Intl !== "undefined" && !!Intl.RelativeTimeFormat; + } catch (e) { + return false; + } + } + function hasLocaleWeekInfo() { + try { + return typeof Intl !== "undefined" && !!Intl.Locale && ("weekInfo" in Intl.Locale.prototype || "getWeekInfo" in Intl.Locale.prototype); + } catch (e) { + return false; + } + } + function maybeArray(thing) { + return Array.isArray(thing) ? thing : [thing]; + } + function bestBy(arr, by, compare) { + if (arr.length === 0) { + return void 0; + } + return arr.reduce((best, next) => { + const pair = [by(next), next]; + if (!best) { + return pair; + } else if (compare(best[0], pair[0]) === best[0]) { + return best; + } else { + return pair; + } + }, null)[1]; + } + function pick(obj2, keys) { + return keys.reduce((a, k) => { + a[k] = obj2[k]; + return a; + }, {}); + } + function hasOwnProperty(obj2, prop) { + return Object.prototype.hasOwnProperty.call(obj2, prop); + } + function validateWeekSettings(settings) { + if (settings == null) { + return null; + } else if (typeof settings !== "object") { + throw new InvalidArgumentError("Week settings must be an object"); + } else { + if (!integerBetween(settings.firstDay, 1, 7) || !integerBetween(settings.minimalDays, 1, 7) || !Array.isArray(settings.weekend) || settings.weekend.some((v) => !integerBetween(v, 1, 7))) { + throw new InvalidArgumentError("Invalid week settings"); + } + return { + firstDay: settings.firstDay, + minimalDays: settings.minimalDays, + weekend: Array.from(settings.weekend) + }; + } + } + function integerBetween(thing, bottom, top) { + return isInteger(thing) && thing >= bottom && thing <= top; + } + function floorMod(x, n2) { + return x - n2 * Math.floor(x / n2); + } + function padStart(input, n2 = 2) { + const isNeg = input < 0; + let padded; + if (isNeg) { + padded = "-" + ("" + -input).padStart(n2, "0"); + } else { + padded = ("" + input).padStart(n2, "0"); + } + return padded; + } + function parseInteger(string) { + if (isUndefined(string) || string === null || string === "") { + return void 0; + } else { + return parseInt(string, 10); + } + } + function parseFloating(string) { + if (isUndefined(string) || string === null || string === "") { + return void 0; + } else { + return parseFloat(string); + } + } + function parseMillis(fraction) { + if (isUndefined(fraction) || fraction === null || fraction === "") { + return void 0; + } else { + const f = parseFloat("0." + fraction) * 1e3; + return Math.floor(f); + } + } + function roundTo(number, digits, rounding = "round") { + const factor = 10 ** digits; + switch (rounding) { + case "expand": + return number > 0 ? Math.ceil(number * factor) / factor : Math.floor(number * factor) / factor; + case "trunc": + return Math.trunc(number * factor) / factor; + case "round": + return Math.round(number * factor) / factor; + case "floor": + return Math.floor(number * factor) / factor; + case "ceil": + return Math.ceil(number * factor) / factor; + default: + throw new RangeError(`Value rounding ${rounding} is out of range`); + } + } + function isLeapYear(year) { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); + } + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + function daysInMonth(year, month) { + const modMonth = floorMod(month - 1, 12) + 1, modYear = year + (month - modMonth) / 12; + if (modMonth === 2) { + return isLeapYear(modYear) ? 29 : 28; + } else { + return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1]; + } + } + function objToLocalTS(obj2) { + let d = Date.UTC(obj2.year, obj2.month - 1, obj2.day, obj2.hour, obj2.minute, obj2.second, obj2.millisecond); + if (obj2.year < 100 && obj2.year >= 0) { + d = new Date(d); + d.setUTCFullYear(obj2.year, obj2.month - 1, obj2.day); + } + return +d; + } + function firstWeekOffset(year, minDaysInFirstWeek, startOfWeek) { + const fwdlw = isoWeekdayToLocal(dayOfWeek(year, 1, minDaysInFirstWeek), startOfWeek); + return -fwdlw + minDaysInFirstWeek - 1; + } + function weeksInWeekYear(weekYear, minDaysInFirstWeek = 4, startOfWeek = 1) { + const weekOffset = firstWeekOffset(weekYear, minDaysInFirstWeek, startOfWeek); + const weekOffsetNext = firstWeekOffset(weekYear + 1, minDaysInFirstWeek, startOfWeek); + return (daysInYear(weekYear) - weekOffset + weekOffsetNext) / 7; + } + function untruncateYear(year) { + if (year > 99) { + return year; + } else return year > Settings.twoDigitCutoffYear ? 1900 + year : 2e3 + year; + } + function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) { + const date = new Date(ts), intlOpts = { + hourCycle: "h23", + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit" + }; + if (timeZone) { + intlOpts.timeZone = timeZone; + } + const modified = { + timeZoneName: offsetFormat, + ...intlOpts + }; + const parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find((m) => m.type.toLowerCase() === "timezonename"); + return parsed ? parsed.value : null; + } + function signedOffset(offHourStr, offMinuteStr) { + let offHour = parseInt(offHourStr, 10); + if (Number.isNaN(offHour)) { + offHour = 0; + } + const offMin = parseInt(offMinuteStr, 10) || 0, offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin; + return offHour * 60 + offMinSigned; + } + function asNumber(value) { + const numericValue = Number(value); + if (typeof value === "boolean" || value === "" || !Number.isFinite(numericValue)) throw new InvalidArgumentError(`Invalid unit value ${value}`); + return numericValue; + } + function normalizeObject(obj2, normalizer) { + const normalized = {}; + for (const u in obj2) { + if (hasOwnProperty(obj2, u)) { + const v = obj2[u]; + if (v === void 0 || v === null) continue; + normalized[normalizer(u)] = asNumber(v); + } + } + return normalized; + } + function formatOffset(offset2, format) { + const hours = Math.trunc(Math.abs(offset2 / 60)), minutes = Math.trunc(Math.abs(offset2 % 60)), sign = offset2 >= 0 ? "+" : "-"; + switch (format) { + case "short": + return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`; + case "narrow": + return `${sign}${hours}${minutes > 0 ? `:${minutes}` : ""}`; + case "techie": + return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`; + default: + throw new RangeError(`Value format ${format} is out of range for property format`); + } + } + function timeObject(obj2) { + return pick(obj2, ["hour", "minute", "second", "millisecond"]); + } + var monthsLong = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; + var monthsShort = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + var monthsNarrow = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"]; + function months(length) { + switch (length) { + case "narrow": + return [...monthsNarrow]; + case "short": + return [...monthsShort]; + case "long": + return [...monthsLong]; + case "numeric": + return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]; + case "2-digit": + return ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]; + default: + return null; + } + } + var weekdaysLong = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]; + var weekdaysShort = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]; + var weekdaysNarrow = ["M", "T", "W", "T", "F", "S", "S"]; + function weekdays(length) { + switch (length) { + case "narrow": + return [...weekdaysNarrow]; + case "short": + return [...weekdaysShort]; + case "long": + return [...weekdaysLong]; + case "numeric": + return ["1", "2", "3", "4", "5", "6", "7"]; + default: + return null; + } + } + var meridiems = ["AM", "PM"]; + var erasLong = ["Before Christ", "Anno Domini"]; + var erasShort = ["BC", "AD"]; + var erasNarrow = ["B", "A"]; + function eras(length) { + switch (length) { + case "narrow": + return [...erasNarrow]; + case "short": + return [...erasShort]; + case "long": + return [...erasLong]; + default: + return null; + } + } + function meridiemForDateTime(dt) { + return meridiems[dt.hour < 12 ? 0 : 1]; + } + function weekdayForDateTime(dt, length) { + return weekdays(length)[dt.weekday - 1]; + } + function monthForDateTime(dt, length) { + return months(length)[dt.month - 1]; + } + function eraForDateTime(dt, length) { + return eras(length)[dt.year < 0 ? 0 : 1]; + } + function formatRelativeTime(unit, count, numeric = "always", narrow = false) { + const units = { + years: ["year", "yr."], + quarters: ["quarter", "qtr."], + months: ["month", "mo."], + weeks: ["week", "wk."], + days: ["day", "day", "days"], + hours: ["hour", "hr."], + minutes: ["minute", "min."], + seconds: ["second", "sec."] + }; + const lastable = ["hours", "minutes", "seconds"].indexOf(unit) === -1; + if (numeric === "auto" && lastable) { + const isDay = unit === "days"; + switch (count) { + case 1: + return isDay ? "tomorrow" : `next ${units[unit][0]}`; + case -1: + return isDay ? "yesterday" : `last ${units[unit][0]}`; + case 0: + return isDay ? "today" : `this ${units[unit][0]}`; + } + } + const isInPast = Object.is(count, -0) || count < 0, fmtValue = Math.abs(count), singular = fmtValue === 1, lilUnits = units[unit], fmtUnit = narrow ? singular ? lilUnits[1] : lilUnits[2] || lilUnits[1] : singular ? units[unit][0] : unit; + return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`; + } + function stringifyTokens(splits, tokenToString) { + let s2 = ""; + for (const token of splits) { + if (token.literal) { + s2 += token.val; + } else { + s2 += tokenToString(token.val); + } + } + return s2; + } + var macroTokenToFormatOpts = { + D: DATE_SHORT, + DD: DATE_MED, + DDD: DATE_FULL, + DDDD: DATE_HUGE, + t: TIME_SIMPLE, + tt: TIME_WITH_SECONDS, + ttt: TIME_WITH_SHORT_OFFSET, + tttt: TIME_WITH_LONG_OFFSET, + T: TIME_24_SIMPLE, + TT: TIME_24_WITH_SECONDS, + TTT: TIME_24_WITH_SHORT_OFFSET, + TTTT: TIME_24_WITH_LONG_OFFSET, + f: DATETIME_SHORT, + ff: DATETIME_MED, + fff: DATETIME_FULL, + ffff: DATETIME_HUGE, + F: DATETIME_SHORT_WITH_SECONDS, + FF: DATETIME_MED_WITH_SECONDS, + FFF: DATETIME_FULL_WITH_SECONDS, + FFFF: DATETIME_HUGE_WITH_SECONDS + }; + var Formatter = class _Formatter { + static create(locale, opts = {}) { + return new _Formatter(locale, opts); + } + static parseFormat(fmt) { + let current = null, currentFull = "", bracketed = false; + const splits = []; + for (let i = 0; i < fmt.length; i++) { + const c = fmt.charAt(i); + if (c === "'") { + if (currentFull.length > 0 || bracketed) { + splits.push({ + literal: bracketed || /^\s+$/.test(currentFull), + val: currentFull === "" ? "'" : currentFull + }); + } + current = null; + currentFull = ""; + bracketed = !bracketed; + } else if (bracketed) { + currentFull += c; + } else if (c === current) { + currentFull += c; + } else { + if (currentFull.length > 0) { + splits.push({ + literal: /^\s+$/.test(currentFull), + val: currentFull + }); + } + currentFull = c; + current = c; + } + } + if (currentFull.length > 0) { + splits.push({ + literal: bracketed || /^\s+$/.test(currentFull), + val: currentFull + }); + } + return splits; + } + static macroTokenToFormatOpts(token) { + return macroTokenToFormatOpts[token]; + } + constructor(locale, formatOpts) { + this.opts = formatOpts; + this.loc = locale; + this.systemLoc = null; + } + formatWithSystemDefault(dt, opts) { + if (this.systemLoc === null) { + this.systemLoc = this.loc.redefaultToSystem(); + } + const df = this.systemLoc.dtFormatter(dt, { + ...this.opts, + ...opts + }); + return df.format(); + } + dtFormatter(dt, opts = {}) { + return this.loc.dtFormatter(dt, { + ...this.opts, + ...opts + }); + } + formatDateTime(dt, opts) { + return this.dtFormatter(dt, opts).format(); + } + formatDateTimeParts(dt, opts) { + return this.dtFormatter(dt, opts).formatToParts(); + } + formatInterval(interval, opts) { + const df = this.dtFormatter(interval.start, opts); + return df.dtf.formatRange(interval.start.toJSDate(), interval.end.toJSDate()); + } + resolvedOptions(dt, opts) { + return this.dtFormatter(dt, opts).resolvedOptions(); + } + num(n2, p = 0, signDisplay = void 0) { + if (this.opts.forceSimple) { + return padStart(n2, p); + } + const opts = { + ...this.opts + }; + if (p > 0) { + opts.padTo = p; + } + if (signDisplay) { + opts.signDisplay = signDisplay; + } + return this.loc.numberFormatter(opts).format(n2); + } + formatDateTimeFromString(dt, fmt) { + const knownEnglish = this.loc.listingMode() === "en", useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", string = (opts, extract) => this.loc.extract(dt, opts, extract), formatOffset2 = (opts) => { + if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) { + return "Z"; + } + return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : ""; + }, meridiem = () => knownEnglish ? meridiemForDateTime(dt) : string({ + hour: "numeric", + hourCycle: "h12" + }, "dayperiod"), month = (length, standalone) => knownEnglish ? monthForDateTime(dt, length) : string(standalone ? { + month: length + } : { + month: length, + day: "numeric" + }, "month"), weekday = (length, standalone) => knownEnglish ? weekdayForDateTime(dt, length) : string(standalone ? { + weekday: length + } : { + weekday: length, + month: "long", + day: "numeric" + }, "weekday"), maybeMacro = (token) => { + const formatOpts = _Formatter.macroTokenToFormatOpts(token); + if (formatOpts) { + return this.formatWithSystemDefault(dt, formatOpts); + } else { + return token; + } + }, era = (length) => knownEnglish ? eraForDateTime(dt, length) : string({ + era: length + }, "era"), tokenToString = (token) => { + switch (token) { + // ms + case "S": + return this.num(dt.millisecond); + case "u": + // falls through + case "SSS": + return this.num(dt.millisecond, 3); + // seconds + case "s": + return this.num(dt.second); + case "ss": + return this.num(dt.second, 2); + // fractional seconds + case "uu": + return this.num(Math.floor(dt.millisecond / 10), 2); + case "uuu": + return this.num(Math.floor(dt.millisecond / 100)); + // minutes + case "m": + return this.num(dt.minute); + case "mm": + return this.num(dt.minute, 2); + // hours + case "h": + return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12); + case "hh": + return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2); + case "H": + return this.num(dt.hour); + case "HH": + return this.num(dt.hour, 2); + // offset + case "Z": + return formatOffset2({ + format: "narrow", + allowZ: this.opts.allowZ + }); + case "ZZ": + return formatOffset2({ + format: "short", + allowZ: this.opts.allowZ + }); + case "ZZZ": + return formatOffset2({ + format: "techie", + allowZ: this.opts.allowZ + }); + case "ZZZZ": + return dt.zone.offsetName(dt.ts, { + format: "short", + locale: this.loc.locale + }); + case "ZZZZZ": + return dt.zone.offsetName(dt.ts, { + format: "long", + locale: this.loc.locale + }); + // zone + case "z": + return dt.zoneName; + // meridiems + case "a": + return meridiem(); + // dates + case "d": + return useDateTimeFormatter ? string({ + day: "numeric" + }, "day") : this.num(dt.day); + case "dd": + return useDateTimeFormatter ? string({ + day: "2-digit" + }, "day") : this.num(dt.day, 2); + // weekdays - standalone + case "c": + return this.num(dt.weekday); + case "ccc": + return weekday("short", true); + case "cccc": + return weekday("long", true); + case "ccccc": + return weekday("narrow", true); + // weekdays - format + case "E": + return this.num(dt.weekday); + case "EEE": + return weekday("short", false); + case "EEEE": + return weekday("long", false); + case "EEEEE": + return weekday("narrow", false); + // months - standalone + case "L": + return useDateTimeFormatter ? string({ + month: "numeric", + day: "numeric" + }, "month") : this.num(dt.month); + case "LL": + return useDateTimeFormatter ? string({ + month: "2-digit", + day: "numeric" + }, "month") : this.num(dt.month, 2); + case "LLL": + return month("short", true); + case "LLLL": + return month("long", true); + case "LLLLL": + return month("narrow", true); + // months - format + case "M": + return useDateTimeFormatter ? string({ + month: "numeric" + }, "month") : this.num(dt.month); + case "MM": + return useDateTimeFormatter ? string({ + month: "2-digit" + }, "month") : this.num(dt.month, 2); + case "MMM": + return month("short", false); + case "MMMM": + return month("long", false); + case "MMMMM": + return month("narrow", false); + // years + case "y": + return useDateTimeFormatter ? string({ + year: "numeric" + }, "year") : this.num(dt.year); + case "yy": + return useDateTimeFormatter ? string({ + year: "2-digit" + }, "year") : this.num(dt.year.toString().slice(-2), 2); + case "yyyy": + return useDateTimeFormatter ? string({ + year: "numeric" + }, "year") : this.num(dt.year, 4); + case "yyyyyy": + return useDateTimeFormatter ? string({ + year: "numeric" + }, "year") : this.num(dt.year, 6); + // eras + case "G": + return era("short"); + case "GG": + return era("long"); + case "GGGGG": + return era("narrow"); + case "kk": + return this.num(dt.weekYear.toString().slice(-2), 2); + case "kkkk": + return this.num(dt.weekYear, 4); + case "W": + return this.num(dt.weekNumber); + case "WW": + return this.num(dt.weekNumber, 2); + case "n": + return this.num(dt.localWeekNumber); + case "nn": + return this.num(dt.localWeekNumber, 2); + case "ii": + return this.num(dt.localWeekYear.toString().slice(-2), 2); + case "iiii": + return this.num(dt.localWeekYear, 4); + case "o": + return this.num(dt.ordinal); + case "ooo": + return this.num(dt.ordinal, 3); + case "q": + return this.num(dt.quarter); + case "qq": + return this.num(dt.quarter, 2); + case "X": + return this.num(Math.floor(dt.ts / 1e3)); + case "x": + return this.num(dt.ts); + default: + return maybeMacro(token); + } + }; + return stringifyTokens(_Formatter.parseFormat(fmt), tokenToString); + } + formatDurationFromString(dur, fmt) { + const invertLargest = this.opts.signMode === "negativeLargestOnly" ? -1 : 1; + const tokenToField = (token) => { + switch (token[0]) { + case "S": + return "milliseconds"; + case "s": + return "seconds"; + case "m": + return "minutes"; + case "h": + return "hours"; + case "d": + return "days"; + case "w": + return "weeks"; + case "M": + return "months"; + case "y": + return "years"; + default: + return null; + } + }, tokenToString = (lildur, info) => (token) => { + const mapped = tokenToField(token); + if (mapped) { + const inversionFactor = info.isNegativeDuration && mapped !== info.largestUnit ? invertLargest : 1; + let signDisplay; + if (this.opts.signMode === "negativeLargestOnly" && mapped !== info.largestUnit) { + signDisplay = "never"; + } else if (this.opts.signMode === "all") { + signDisplay = "always"; + } else { + signDisplay = "auto"; + } + return this.num(lildur.get(mapped) * inversionFactor, token.length, signDisplay); + } else { + return token; + } + }, tokens = _Formatter.parseFormat(fmt), realTokens = tokens.reduce((found, { + literal, + val + }) => literal ? found : found.concat(val), []), collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t) => t)), durationInfo = { + isNegativeDuration: collapsed < 0, + // this relies on "collapsed" being based on "shiftTo", which builds up the object + // in order + largestUnit: Object.keys(collapsed.values)[0] + }; + return stringifyTokens(tokens, tokenToString(collapsed, durationInfo)); + } + }; + var ianaRegex = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/; + function combineRegexes(...regexes) { + const full = regexes.reduce((f, r) => f + r.source, ""); + return RegExp(`^${full}$`); + } + function combineExtractors(...extractors) { + return (m) => extractors.reduce(([mergedVals, mergedZone, cursor], ex) => { + const [val, zone, next] = ex(m, cursor); + return [{ + ...mergedVals, + ...val + }, zone || mergedZone, next]; + }, [{}, null, 1]).slice(0, 2); + } + function parse2(s2, ...patterns) { + if (s2 == null) { + return [null, null]; + } + for (const [regex, extractor] of patterns) { + const m = regex.exec(s2); + if (m) { + return extractor(m); + } + } + return [null, null]; + } + function simpleParse(...keys) { + return (match2, cursor) => { + const ret2 = {}; + let i; + for (i = 0; i < keys.length; i++) { + ret2[keys[i]] = parseInteger(match2[cursor + i]); + } + return [ret2, null, cursor + i]; + }; + } + var offsetRegex = /(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/; + var isoExtendedZone = `(?:${offsetRegex.source}?(?:\\[(${ianaRegex.source})\\])?)?`; + var isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/; + var isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${isoExtendedZone}`); + var isoTimeExtensionRegex = RegExp(`(?:[Tt]${isoTimeRegex.source})?`); + var isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/; + var isoWeekRegex = /(\d{4})-?W(\d\d)(?:-?(\d))?/; + var isoOrdinalRegex = /(\d{4})-?(\d{3})/; + var extractISOWeekData = simpleParse("weekYear", "weekNumber", "weekDay"); + var extractISOOrdinalData = simpleParse("year", "ordinal"); + var sqlYmdRegex = /(\d{4})-(\d\d)-(\d\d)/; + var sqlTimeRegex = RegExp(`${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`); + var sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`); + function int(match2, pos, fallback) { + const m = match2[pos]; + return isUndefined(m) ? fallback : parseInteger(m); + } + function extractISOYmd(match2, cursor) { + const item = { + year: int(match2, cursor), + month: int(match2, cursor + 1, 1), + day: int(match2, cursor + 2, 1) + }; + return [item, null, cursor + 3]; + } + function extractISOTime(match2, cursor) { + const item = { + hours: int(match2, cursor, 0), + minutes: int(match2, cursor + 1, 0), + seconds: int(match2, cursor + 2, 0), + milliseconds: parseMillis(match2[cursor + 3]) + }; + return [item, null, cursor + 4]; + } + function extractISOOffset(match2, cursor) { + const local = !match2[cursor] && !match2[cursor + 1], fullOffset = signedOffset(match2[cursor + 1], match2[cursor + 2]), zone = local ? null : FixedOffsetZone.instance(fullOffset); + return [{}, zone, cursor + 3]; + } + function extractIANAZone(match2, cursor) { + const zone = match2[cursor] ? IANAZone.create(match2[cursor]) : null; + return [{}, zone, cursor + 1]; + } + var isoTimeOnly = RegExp(`^T?${isoTimeBaseRegex.source}$`); + var isoDuration = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/; + function extractISODuration(match2) { + const [s2, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] = match2; + const hasNegativePrefix = s2[0] === "-"; + const negativeSeconds = secondStr && secondStr[0] === "-"; + const maybeNegate = (num, force = false) => num !== void 0 && (force || num && hasNegativePrefix) ? -num : num; + return [{ + years: maybeNegate(parseFloating(yearStr)), + months: maybeNegate(parseFloating(monthStr)), + weeks: maybeNegate(parseFloating(weekStr)), + days: maybeNegate(parseFloating(dayStr)), + hours: maybeNegate(parseFloating(hourStr)), + minutes: maybeNegate(parseFloating(minuteStr)), + seconds: maybeNegate(parseFloating(secondStr), secondStr === "-0"), + milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds) + }]; + } + var obsOffsets = { + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60 + }; + function fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + const result = { + year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr), + month: monthsShort.indexOf(monthStr) + 1, + day: parseInteger(dayStr), + hour: parseInteger(hourStr), + minute: parseInteger(minuteStr) + }; + if (secondStr) result.second = parseInteger(secondStr); + if (weekdayStr) { + result.weekday = weekdayStr.length > 3 ? weekdaysLong.indexOf(weekdayStr) + 1 : weekdaysShort.indexOf(weekdayStr) + 1; + } + return result; + } + var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/; + function extractRFC2822(match2) { + const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr, obsOffset, milOffset, offHourStr, offMinuteStr] = match2, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); + let offset2; + if (obsOffset) { + offset2 = obsOffsets[obsOffset]; + } else if (milOffset) { + offset2 = 0; + } else { + offset2 = signedOffset(offHourStr, offMinuteStr); + } + return [result, new FixedOffsetZone(offset2)]; + } + function preprocessRFC2822(s2) { + return s2.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim(); + } + var rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/; + var rfc850 = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/; + var ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/; + function extractRFC1123Or850(match2) { + const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match2, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); + return [result, FixedOffsetZone.utcInstance]; + } + function extractASCII(match2) { + const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match2, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); + return [result, FixedOffsetZone.utcInstance]; + } + var isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex); + var isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex); + var isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex); + var isoTimeCombinedRegex = combineRegexes(isoTimeRegex); + var extractISOYmdTimeAndOffset = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset, extractIANAZone); + var extractISOWeekTimeAndOffset = combineExtractors(extractISOWeekData, extractISOTime, extractISOOffset, extractIANAZone); + var extractISOOrdinalDateAndTime = combineExtractors(extractISOOrdinalData, extractISOTime, extractISOOffset, extractIANAZone); + var extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone); + function parseISODate(s2) { + return parse2(s2, [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset], [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime], [isoTimeCombinedRegex, extractISOTimeAndOffset]); + } + function parseRFC2822Date(s2) { + return parse2(preprocessRFC2822(s2), [rfc2822, extractRFC2822]); + } + function parseHTTPDate(s2) { + return parse2(s2, [rfc1123, extractRFC1123Or850], [rfc850, extractRFC1123Or850], [ascii, extractASCII]); + } + function parseISODuration(s2) { + return parse2(s2, [isoDuration, extractISODuration]); + } + var extractISOTimeOnly = combineExtractors(extractISOTime); + function parseISOTimeOnly(s2) { + return parse2(s2, [isoTimeOnly, extractISOTimeOnly]); + } + var sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex); + var sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex); + var extractISOTimeOffsetAndIANAZone = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone); + function parseSQL(s2) { + return parse2(s2, [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]); + } + var INVALID$2 = "Invalid Duration"; + var lowOrderMatrix = { + weeks: { + days: 7, + hours: 7 * 24, + minutes: 7 * 24 * 60, + seconds: 7 * 24 * 60 * 60, + milliseconds: 7 * 24 * 60 * 60 * 1e3 + }, + days: { + hours: 24, + minutes: 24 * 60, + seconds: 24 * 60 * 60, + milliseconds: 24 * 60 * 60 * 1e3 + }, + hours: { + minutes: 60, + seconds: 60 * 60, + milliseconds: 60 * 60 * 1e3 + }, + minutes: { + seconds: 60, + milliseconds: 60 * 1e3 + }, + seconds: { + milliseconds: 1e3 + } + }; + var casualMatrix = { + years: { + quarters: 4, + months: 12, + weeks: 52, + days: 365, + hours: 365 * 24, + minutes: 365 * 24 * 60, + seconds: 365 * 24 * 60 * 60, + milliseconds: 365 * 24 * 60 * 60 * 1e3 + }, + quarters: { + months: 3, + weeks: 13, + days: 91, + hours: 91 * 24, + minutes: 91 * 24 * 60, + seconds: 91 * 24 * 60 * 60, + milliseconds: 91 * 24 * 60 * 60 * 1e3 + }, + months: { + weeks: 4, + days: 30, + hours: 30 * 24, + minutes: 30 * 24 * 60, + seconds: 30 * 24 * 60 * 60, + milliseconds: 30 * 24 * 60 * 60 * 1e3 + }, + ...lowOrderMatrix + }; + var daysInYearAccurate = 146097 / 400; + var daysInMonthAccurate = 146097 / 4800; + var accurateMatrix = { + years: { + quarters: 4, + months: 12, + weeks: daysInYearAccurate / 7, + days: daysInYearAccurate, + hours: daysInYearAccurate * 24, + minutes: daysInYearAccurate * 24 * 60, + seconds: daysInYearAccurate * 24 * 60 * 60, + milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1e3 + }, + quarters: { + months: 3, + weeks: daysInYearAccurate / 28, + days: daysInYearAccurate / 4, + hours: daysInYearAccurate * 24 / 4, + minutes: daysInYearAccurate * 24 * 60 / 4, + seconds: daysInYearAccurate * 24 * 60 * 60 / 4, + milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1e3 / 4 + }, + months: { + weeks: daysInMonthAccurate / 7, + days: daysInMonthAccurate, + hours: daysInMonthAccurate * 24, + minutes: daysInMonthAccurate * 24 * 60, + seconds: daysInMonthAccurate * 24 * 60 * 60, + milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1e3 + }, + ...lowOrderMatrix + }; + var orderedUnits$1 = ["years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds"]; + var reverseUnits = orderedUnits$1.slice(0).reverse(); + function clone$1(dur, alts, clear = false) { + const conf = { + values: clear ? alts.values : { + ...dur.values, + ...alts.values || {} + }, + loc: dur.loc.clone(alts.loc), + conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy, + matrix: alts.matrix || dur.matrix + }; + return new Duration(conf); + } + function durationToMillis(matrix, vals) { + var _vals$milliseconds; + let sum = (_vals$milliseconds = vals.milliseconds) != null ? _vals$milliseconds : 0; + for (const unit of reverseUnits.slice(1)) { + if (vals[unit]) { + sum += vals[unit] * matrix[unit]["milliseconds"]; + } + } + return sum; + } + function normalizeValues(matrix, vals) { + const factor = durationToMillis(matrix, vals) < 0 ? -1 : 1; + orderedUnits$1.reduceRight((previous, current) => { + if (!isUndefined(vals[current])) { + if (previous) { + const previousVal = vals[previous] * factor; + const conv = matrix[current][previous]; + const rollUp = Math.floor(previousVal / conv); + vals[current] += rollUp * factor; + vals[previous] -= rollUp * conv * factor; + } + return current; + } else { + return previous; + } + }, null); + orderedUnits$1.reduce((previous, current) => { + if (!isUndefined(vals[current])) { + if (previous) { + const fraction = vals[previous] % 1; + vals[previous] -= fraction; + vals[current] += fraction * matrix[previous][current]; + } + return current; + } else { + return previous; + } + }, null); + } + function removeZeroes(vals) { + const newVals = {}; + for (const [key, value] of Object.entries(vals)) { + if (value !== 0) { + newVals[key] = value; + } + } + return newVals; + } + var Duration = class _Duration { + /** + * @private + */ + constructor(config) { + const accurate = config.conversionAccuracy === "longterm" || false; + let matrix = accurate ? accurateMatrix : casualMatrix; + if (config.matrix) { + matrix = config.matrix; + } + this.values = config.values; + this.loc = config.loc || Locale.create(); + this.conversionAccuracy = accurate ? "longterm" : "casual"; + this.invalid = config.invalid || null; + this.matrix = matrix; + this.isLuxonDuration = true; + } + /** + * Create Duration from a number of milliseconds. + * @param {number} count of milliseconds + * @param {Object} opts - options for parsing + * @param {string} [opts.locale='en-US'] - the locale to use + * @param {string} opts.numberingSystem - the numbering system to use + * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use + * @return {Duration} + */ + static fromMillis(count, opts) { + return _Duration.fromObject({ + milliseconds: count + }, opts); + } + /** + * Create a Duration from a JavaScript object with keys like 'years' and 'hours'. + * If this object is empty then a zero milliseconds duration is returned. + * @param {Object} obj - the object to create the DateTime from + * @param {number} obj.years + * @param {number} obj.quarters + * @param {number} obj.months + * @param {number} obj.weeks + * @param {number} obj.days + * @param {number} obj.hours + * @param {number} obj.minutes + * @param {number} obj.seconds + * @param {number} obj.milliseconds + * @param {Object} [opts=[]] - options for creating this Duration + * @param {string} [opts.locale='en-US'] - the locale to use + * @param {string} opts.numberingSystem - the numbering system to use + * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use + * @param {string} [opts.matrix=Object] - the custom conversion system to use + * @return {Duration} + */ + static fromObject(obj2, opts = {}) { + if (obj2 == null || typeof obj2 !== "object") { + throw new InvalidArgumentError(`Duration.fromObject: argument expected to be an object, got ${obj2 === null ? "null" : typeof obj2}`); + } + return new _Duration({ + values: normalizeObject(obj2, _Duration.normalizeUnit), + loc: Locale.fromObject(opts), + conversionAccuracy: opts.conversionAccuracy, + matrix: opts.matrix + }); + } + /** + * Create a Duration from DurationLike. + * + * @param {Object | number | Duration} durationLike + * One of: + * - object with keys like 'years' and 'hours'. + * - number representing milliseconds + * - Duration instance + * @return {Duration} + */ + static fromDurationLike(durationLike) { + if (isNumber(durationLike)) { + return _Duration.fromMillis(durationLike); + } else if (_Duration.isDuration(durationLike)) { + return durationLike; + } else if (typeof durationLike === "object") { + return _Duration.fromObject(durationLike); + } else { + throw new InvalidArgumentError(`Unknown duration argument ${durationLike} of type ${typeof durationLike}`); + } + } + /** + * Create a Duration from an ISO 8601 duration string. + * @param {string} text - text to parse + * @param {Object} opts - options for parsing + * @param {string} [opts.locale='en-US'] - the locale to use + * @param {string} opts.numberingSystem - the numbering system to use + * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use + * @param {string} [opts.matrix=Object] - the preset conversion system to use + * @see https://en.wikipedia.org/wiki/ISO_8601#Durations + * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 } + * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 } + * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 } + * @return {Duration} + */ + static fromISO(text, opts) { + const [parsed] = parseISODuration(text); + if (parsed) { + return _Duration.fromObject(parsed, opts); + } else { + return _Duration.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`); + } + } + /** + * Create a Duration from an ISO 8601 time string. + * @param {string} text - text to parse + * @param {Object} opts - options for parsing + * @param {string} [opts.locale='en-US'] - the locale to use + * @param {string} opts.numberingSystem - the numbering system to use + * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use + * @param {string} [opts.matrix=Object] - the conversion system to use + * @see https://en.wikipedia.org/wiki/ISO_8601#Times + * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 } + * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } + * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } + * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } + * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } + * @return {Duration} + */ + static fromISOTime(text, opts) { + const [parsed] = parseISOTimeOnly(text); + if (parsed) { + return _Duration.fromObject(parsed, opts); + } else { + return _Duration.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`); + } + } + /** + * Create an invalid Duration. + * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent + * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information + * @return {Duration} + */ + static invalid(reason, explanation = null) { + if (!reason) { + throw new InvalidArgumentError("need to specify a reason the Duration is invalid"); + } + const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); + if (Settings.throwOnInvalid) { + throw new InvalidDurationError(invalid); + } else { + return new _Duration({ + invalid + }); + } + } + /** + * @private + */ + static normalizeUnit(unit) { + const normalized = { + year: "years", + years: "years", + quarter: "quarters", + quarters: "quarters", + month: "months", + months: "months", + week: "weeks", + weeks: "weeks", + day: "days", + days: "days", + hour: "hours", + hours: "hours", + minute: "minutes", + minutes: "minutes", + second: "seconds", + seconds: "seconds", + millisecond: "milliseconds", + milliseconds: "milliseconds" + }[unit ? unit.toLowerCase() : unit]; + if (!normalized) throw new InvalidUnitError(unit); + return normalized; + } + /** + * Check if an object is a Duration. Works across context boundaries + * @param {object} o + * @return {boolean} + */ + static isDuration(o) { + return o && o.isLuxonDuration || false; + } + /** + * Get the locale of a Duration, such 'en-GB' + * @type {string} + */ + get locale() { + return this.isValid ? this.loc.locale : null; + } + /** + * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration + * + * @type {string} + */ + get numberingSystem() { + return this.isValid ? this.loc.numberingSystem : null; + } + /** + * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens: + * * `S` for milliseconds + * * `s` for seconds + * * `m` for minutes + * * `h` for hours + * * `d` for days + * * `w` for weeks + * * `M` for months + * * `y` for years + * Notes: + * * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits + * * Tokens can be escaped by wrapping with single quotes. + * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting. + * @param {string} fmt - the format string + * @param {Object} opts - options + * @param {boolean} [opts.floor=true] - floor numerical values + * @param {'negative'|'all'|'negativeLargestOnly'} [opts.signMode=negative] - How to handle signs + * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2" + * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002" + * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000" + * @example Duration.fromObject({ days: 6, seconds: 2 }).toFormat("d s", { signMode: "all" }) //=> "+6 +2" + * @example Duration.fromObject({ days: -6, seconds: -2 }).toFormat("d s", { signMode: "all" }) //=> "-6 -2" + * @example Duration.fromObject({ days: -6, seconds: -2 }).toFormat("d s", { signMode: "negativeLargestOnly" }) //=> "-6 2" + * @return {string} + */ + toFormat(fmt, opts = {}) { + const fmtOpts = { + ...opts, + floor: opts.round !== false && opts.floor !== false + }; + return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID$2; + } + /** + * Returns a string representation of a Duration with all units included. + * To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options + * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`. + * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor. + * @param {boolean} [opts.showZeros=true] - Show all units previously used by the duration even if they are zero + * @example + * ```js + * var dur = Duration.fromObject({ months: 1, weeks: 0, hours: 5, minutes: 6 }) + * dur.toHuman() //=> '1 month, 0 weeks, 5 hours, 6 minutes' + * dur.toHuman({ listStyle: "long" }) //=> '1 month, 0 weeks, 5 hours, and 6 minutes' + * dur.toHuman({ unitDisplay: "short" }) //=> '1 mth, 0 wks, 5 hr, 6 min' + * dur.toHuman({ showZeros: false }) //=> '1 month, 5 hours, 6 minutes' + * ``` + */ + toHuman(opts = {}) { + if (!this.isValid) return INVALID$2; + const showZeros = opts.showZeros !== false; + const l3 = orderedUnits$1.map((unit) => { + const val = this.values[unit]; + if (isUndefined(val) || val === 0 && !showZeros) { + return null; + } + return this.loc.numberFormatter({ + style: "unit", + unitDisplay: "long", + ...opts, + unit: unit.slice(0, -1) + }).format(val); + }).filter((n2) => n2); + return this.loc.listFormatter({ + type: "conjunction", + style: opts.listStyle || "narrow", + ...opts + }).format(l3); + } + /** + * Returns a JavaScript object with this Duration's values. + * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 } + * @return {Object} + */ + toObject() { + if (!this.isValid) return {}; + return { + ...this.values + }; + } + /** + * Returns an ISO 8601-compliant string representation of this Duration. + * @see https://en.wikipedia.org/wiki/ISO_8601#Durations + * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S' + * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S' + * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M' + * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M' + * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S' + * @return {string} + */ + toISO() { + if (!this.isValid) return null; + let s2 = "P"; + if (this.years !== 0) s2 += this.years + "Y"; + if (this.months !== 0 || this.quarters !== 0) s2 += this.months + this.quarters * 3 + "M"; + if (this.weeks !== 0) s2 += this.weeks + "W"; + if (this.days !== 0) s2 += this.days + "D"; + if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) s2 += "T"; + if (this.hours !== 0) s2 += this.hours + "H"; + if (this.minutes !== 0) s2 += this.minutes + "M"; + if (this.seconds !== 0 || this.milliseconds !== 0) + s2 += roundTo(this.seconds + this.milliseconds / 1e3, 3) + "S"; + if (s2 === "P") s2 += "T0S"; + return s2; + } + /** + * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day. + * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours. + * @see https://en.wikipedia.org/wiki/ISO_8601#Times + * @param {Object} opts - options + * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 + * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 + * @param {boolean} [opts.includePrefix=false] - include the `T` prefix + * @param {string} [opts.format='extended'] - choose between the basic and extended format + * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000' + * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00' + * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00' + * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000' + * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000' + * @return {string} + */ + toISOTime(opts = {}) { + if (!this.isValid) return null; + const millis = this.toMillis(); + if (millis < 0 || millis >= 864e5) return null; + opts = { + suppressMilliseconds: false, + suppressSeconds: false, + includePrefix: false, + format: "extended", + ...opts, + includeOffset: false + }; + const dateTime = DateTime.fromMillis(millis, { + zone: "UTC" + }); + return dateTime.toISOTime(opts); + } + /** + * Returns an ISO 8601 representation of this Duration appropriate for use in JSON. + * @return {string} + */ + toJSON() { + return this.toISO(); + } + /** + * Returns an ISO 8601 representation of this Duration appropriate for use in debugging. + * @return {string} + */ + toString() { + return this.toISO(); + } + /** + * Returns a string representation of this Duration appropriate for the REPL. + * @return {string} + */ + [Symbol.for("nodejs.util.inspect.custom")]() { + if (this.isValid) { + return `Duration { values: ${JSON.stringify(this.values)} }`; + } else { + return `Duration { Invalid, reason: ${this.invalidReason} }`; + } + } + /** + * Returns an milliseconds value of this Duration. + * @return {number} + */ + toMillis() { + if (!this.isValid) return NaN; + return durationToMillis(this.matrix, this.values); + } + /** + * Returns an milliseconds value of this Duration. Alias of {@link toMillis} + * @return {number} + */ + valueOf() { + return this.toMillis(); + } + /** + * Make this Duration longer by the specified amount. Return a newly-constructed Duration. + * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() + * @return {Duration} + */ + plus(duration) { + if (!this.isValid) return this; + const dur = _Duration.fromDurationLike(duration), result = {}; + for (const k of orderedUnits$1) { + if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) { + result[k] = dur.get(k) + this.get(k); + } + } + return clone$1(this, { + values: result + }, true); + } + /** + * Make this Duration shorter by the specified amount. Return a newly-constructed Duration. + * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() + * @return {Duration} + */ + minus(duration) { + if (!this.isValid) return this; + const dur = _Duration.fromDurationLike(duration); + return this.plus(dur.negate()); + } + /** + * Scale this Duration by the specified amount. Return a newly-constructed Duration. + * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number. + * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 } + * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === "hours" ? x * 2 : x) //=> { hours: 2, minutes: 30 } + * @return {Duration} + */ + mapUnits(fn) { + if (!this.isValid) return this; + const result = {}; + for (const k of Object.keys(this.values)) { + result[k] = asNumber(fn(this.values[k], k)); + } + return clone$1(this, { + values: result + }, true); + } + /** + * Get the value of unit. + * @param {string} unit - a unit such as 'minute' or 'day' + * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2 + * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0 + * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3 + * @return {number} + */ + get(unit) { + return this[_Duration.normalizeUnit(unit)]; + } + /** + * "Set" the values of specified units. Return a newly-constructed Duration. + * @param {Object} values - a mapping of units to numbers + * @example dur.set({ years: 2017 }) + * @example dur.set({ hours: 8, minutes: 30 }) + * @return {Duration} + */ + set(values) { + if (!this.isValid) return this; + const mixed = { + ...this.values, + ...normalizeObject(values, _Duration.normalizeUnit) + }; + return clone$1(this, { + values: mixed + }); + } + /** + * "Set" the locale and/or numberingSystem. Returns a newly-constructed Duration. + * @example dur.reconfigure({ locale: 'en-GB' }) + * @return {Duration} + */ + reconfigure({ + locale, + numberingSystem, + conversionAccuracy, + matrix + } = {}) { + const loc = this.loc.clone({ + locale, + numberingSystem + }); + const opts = { + loc, + matrix, + conversionAccuracy + }; + return clone$1(this, opts); + } + /** + * Return the length of the duration in the specified unit. + * @param {string} unit - a unit such as 'minutes' or 'days' + * @example Duration.fromObject({years: 1}).as('days') //=> 365 + * @example Duration.fromObject({years: 1}).as('months') //=> 12 + * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5 + * @return {number} + */ + as(unit) { + return this.isValid ? this.shiftTo(unit).get(unit) : NaN; + } + /** + * Reduce this Duration to its canonical representation in its current units. + * Assuming the overall value of the Duration is positive, this means: + * - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example) + * - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise + * the overall value would be negative, see third example) + * - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example) + * + * If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`. + * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 } + * @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 } + * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 } + * @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 } + * @return {Duration} + */ + normalize() { + if (!this.isValid) return this; + const vals = this.toObject(); + normalizeValues(this.matrix, vals); + return clone$1(this, { + values: vals + }, true); + } + /** + * Rescale units to its largest representation + * @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 } + * @return {Duration} + */ + rescale() { + if (!this.isValid) return this; + const vals = removeZeroes(this.normalize().shiftToAll().toObject()); + return clone$1(this, { + values: vals + }, true); + } + /** + * Convert this Duration into its representation in a different set of units. + * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 } + * @return {Duration} + */ + shiftTo(...units) { + if (!this.isValid) return this; + if (units.length === 0) { + return this; + } + units = units.map((u) => _Duration.normalizeUnit(u)); + const built = {}, accumulated = {}, vals = this.toObject(); + let lastUnit; + for (const k of orderedUnits$1) { + if (units.indexOf(k) >= 0) { + lastUnit = k; + let own = 0; + for (const ak in accumulated) { + own += this.matrix[ak][k] * accumulated[ak]; + accumulated[ak] = 0; + } + if (isNumber(vals[k])) { + own += vals[k]; + } + const i = Math.trunc(own); + built[k] = i; + accumulated[k] = (own * 1e3 - i * 1e3) / 1e3; + } else if (isNumber(vals[k])) { + accumulated[k] = vals[k]; + } + } + for (const key in accumulated) { + if (accumulated[key] !== 0) { + built[lastUnit] += key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key]; + } + } + normalizeValues(this.matrix, built); + return clone$1(this, { + values: built + }, true); + } + /** + * Shift this Duration to all available units. + * Same as shiftTo("years", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds") + * @return {Duration} + */ + shiftToAll() { + if (!this.isValid) return this; + return this.shiftTo("years", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds"); + } + /** + * Return the negative of this Duration. + * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 } + * @return {Duration} + */ + negate() { + if (!this.isValid) return this; + const negated = {}; + for (const k of Object.keys(this.values)) { + negated[k] = this.values[k] === 0 ? 0 : -this.values[k]; + } + return clone$1(this, { + values: negated + }, true); + } + /** + * Removes all units with values equal to 0 from this Duration. + * @example Duration.fromObject({ years: 2, days: 0, hours: 0, minutes: 0 }).removeZeros().toObject() //=> { years: 2 } + * @return {Duration} + */ + removeZeros() { + if (!this.isValid) return this; + const vals = removeZeroes(this.values); + return clone$1(this, { + values: vals + }, true); + } + /** + * Get the years. + * @type {number} + */ + get years() { + return this.isValid ? this.values.years || 0 : NaN; + } + /** + * Get the quarters. + * @type {number} + */ + get quarters() { + return this.isValid ? this.values.quarters || 0 : NaN; + } + /** + * Get the months. + * @type {number} + */ + get months() { + return this.isValid ? this.values.months || 0 : NaN; + } + /** + * Get the weeks + * @type {number} + */ + get weeks() { + return this.isValid ? this.values.weeks || 0 : NaN; + } + /** + * Get the days. + * @type {number} + */ + get days() { + return this.isValid ? this.values.days || 0 : NaN; + } + /** + * Get the hours. + * @type {number} + */ + get hours() { + return this.isValid ? this.values.hours || 0 : NaN; + } + /** + * Get the minutes. + * @type {number} + */ + get minutes() { + return this.isValid ? this.values.minutes || 0 : NaN; + } + /** + * Get the seconds. + * @return {number} + */ + get seconds() { + return this.isValid ? this.values.seconds || 0 : NaN; + } + /** + * Get the milliseconds. + * @return {number} + */ + get milliseconds() { + return this.isValid ? this.values.milliseconds || 0 : NaN; + } + /** + * Returns whether the Duration is invalid. Invalid durations are returned by diff operations + * on invalid DateTimes or Intervals. + * @return {boolean} + */ + get isValid() { + return this.invalid === null; + } + /** + * Returns an error code if this Duration became invalid, or null if the Duration is valid + * @return {string} + */ + get invalidReason() { + return this.invalid ? this.invalid.reason : null; + } + /** + * Returns an explanation of why this Duration became invalid, or null if the Duration is valid + * @type {string} + */ + get invalidExplanation() { + return this.invalid ? this.invalid.explanation : null; + } + /** + * Equality check + * Two Durations are equal iff they have the same units and the same values for each unit. + * @param {Duration} other + * @return {boolean} + */ + equals(other) { + if (!this.isValid || !other.isValid) { + return false; + } + if (!this.loc.equals(other.loc)) { + return false; + } + function eq(v12, v2) { + if (v12 === void 0 || v12 === 0) return v2 === void 0 || v2 === 0; + return v12 === v2; + } + for (const u of orderedUnits$1) { + if (!eq(this.values[u], other.values[u])) { + return false; + } + } + return true; + } + }; + var INVALID$1 = "Invalid Interval"; + function validateStartEnd(start, end) { + if (!start || !start.isValid) { + return Interval.invalid("missing or invalid start"); + } else if (!end || !end.isValid) { + return Interval.invalid("missing or invalid end"); + } else if (end < start) { + return Interval.invalid("end before start", `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`); + } else { + return null; + } + } + var Interval = class _Interval { + /** + * @private + */ + constructor(config) { + this.s = config.start; + this.e = config.end; + this.invalid = config.invalid || null; + this.isLuxonInterval = true; + } + /** + * Create an invalid Interval. + * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent + * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information + * @return {Interval} + */ + static invalid(reason, explanation = null) { + if (!reason) { + throw new InvalidArgumentError("need to specify a reason the Interval is invalid"); + } + const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); + if (Settings.throwOnInvalid) { + throw new InvalidIntervalError(invalid); + } else { + return new _Interval({ + invalid + }); + } + } + /** + * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end. + * @param {DateTime|Date|Object} start + * @param {DateTime|Date|Object} end + * @return {Interval} + */ + static fromDateTimes(start, end) { + const builtStart = friendlyDateTime(start), builtEnd = friendlyDateTime(end); + const validateError = validateStartEnd(builtStart, builtEnd); + if (validateError == null) { + return new _Interval({ + start: builtStart, + end: builtEnd + }); + } else { + return validateError; + } + } + /** + * Create an Interval from a start DateTime and a Duration to extend to. + * @param {DateTime|Date|Object} start + * @param {Duration|Object|number} duration - the length of the Interval. + * @return {Interval} + */ + static after(start, duration) { + const dur = Duration.fromDurationLike(duration), dt = friendlyDateTime(start); + return _Interval.fromDateTimes(dt, dt.plus(dur)); + } + /** + * Create an Interval from an end DateTime and a Duration to extend backwards to. + * @param {DateTime|Date|Object} end + * @param {Duration|Object|number} duration - the length of the Interval. + * @return {Interval} + */ + static before(end, duration) { + const dur = Duration.fromDurationLike(duration), dt = friendlyDateTime(end); + return _Interval.fromDateTimes(dt.minus(dur), dt); + } + /** + * Create an Interval from an ISO 8601 string. + * Accepts `/`, `/`, and `/` formats. + * @param {string} text - the ISO string to parse + * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO} + * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + * @return {Interval} + */ + static fromISO(text, opts) { + const [s2, e] = (text || "").split("/", 2); + if (s2 && e) { + let start, startIsValid; + try { + start = DateTime.fromISO(s2, opts); + startIsValid = start.isValid; + } catch (e2) { + startIsValid = false; + } + let end, endIsValid; + try { + end = DateTime.fromISO(e, opts); + endIsValid = end.isValid; + } catch (e2) { + endIsValid = false; + } + if (startIsValid && endIsValid) { + return _Interval.fromDateTimes(start, end); + } + if (startIsValid) { + const dur = Duration.fromISO(e, opts); + if (dur.isValid) { + return _Interval.after(start, dur); + } + } else if (endIsValid) { + const dur = Duration.fromISO(s2, opts); + if (dur.isValid) { + return _Interval.before(end, dur); + } + } + } + return _Interval.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`); + } + /** + * Check if an object is an Interval. Works across context boundaries + * @param {object} o + * @return {boolean} + */ + static isInterval(o) { + return o && o.isLuxonInterval || false; + } + /** + * Returns the start of the Interval + * @type {DateTime} + */ + get start() { + return this.isValid ? this.s : null; + } + /** + * Returns the end of the Interval. This is the first instant which is not part of the interval + * (Interval is half-open). + * @type {DateTime} + */ + get end() { + return this.isValid ? this.e : null; + } + /** + * Returns the last DateTime included in the interval (since end is not part of the interval) + * @type {DateTime} + */ + get lastDateTime() { + return this.isValid ? this.e ? this.e.minus(1) : null : null; + } + /** + * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'. + * @type {boolean} + */ + get isValid() { + return this.invalidReason === null; + } + /** + * Returns an error code if this Interval is invalid, or null if the Interval is valid + * @type {string} + */ + get invalidReason() { + return this.invalid ? this.invalid.reason : null; + } + /** + * Returns an explanation of why this Interval became invalid, or null if the Interval is valid + * @type {string} + */ + get invalidExplanation() { + return this.invalid ? this.invalid.explanation : null; + } + /** + * Returns the length of the Interval in the specified unit. + * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in. + * @return {number} + */ + length(unit = "milliseconds") { + return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN; + } + /** + * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part. + * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day' + * asks 'what dates are included in this interval?', not 'how many days long is this interval?' + * @param {string} [unit='milliseconds'] - the unit of time to count. + * @param {Object} opts - options + * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime + * @return {number} + */ + count(unit = "milliseconds", opts) { + if (!this.isValid) return NaN; + const start = this.start.startOf(unit, opts); + let end; + if (opts != null && opts.useLocaleWeeks) { + end = this.end.reconfigure({ + locale: start.locale + }); + } else { + end = this.end; + } + end = end.startOf(unit, opts); + return Math.floor(end.diff(start, unit).get(unit)) + (end.valueOf() !== this.end.valueOf()); + } + /** + * Returns whether this Interval's start and end are both in the same unit of time + * @param {string} unit - the unit of time to check sameness on + * @return {boolean} + */ + hasSame(unit) { + return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false; + } + /** + * Return whether this Interval has the same start and end DateTimes. + * @return {boolean} + */ + isEmpty() { + return this.s.valueOf() === this.e.valueOf(); + } + /** + * Return whether this Interval's start is after the specified DateTime. + * @param {DateTime} dateTime + * @return {boolean} + */ + isAfter(dateTime) { + if (!this.isValid) return false; + return this.s > dateTime; + } + /** + * Return whether this Interval's end is before the specified DateTime. + * @param {DateTime} dateTime + * @return {boolean} + */ + isBefore(dateTime) { + if (!this.isValid) return false; + return this.e <= dateTime; + } + /** + * Return whether this Interval contains the specified DateTime. + * @param {DateTime} dateTime + * @return {boolean} + */ + contains(dateTime) { + if (!this.isValid) return false; + return this.s <= dateTime && this.e > dateTime; + } + /** + * "Sets" the start and/or end dates. Returns a newly-constructed Interval. + * @param {Object} values - the values to set + * @param {DateTime} values.start - the starting DateTime + * @param {DateTime} values.end - the ending DateTime + * @return {Interval} + */ + set({ + start, + end + } = {}) { + if (!this.isValid) return this; + return _Interval.fromDateTimes(start || this.s, end || this.e); + } + /** + * Split this Interval at each of the specified DateTimes + * @param {...DateTime} dateTimes - the unit of time to count. + * @return {Array} + */ + splitAt(...dateTimes) { + if (!this.isValid) return []; + const sorted = dateTimes.map(friendlyDateTime).filter((d) => this.contains(d)).sort((a, b) => a.toMillis() - b.toMillis()), results = []; + let { + s: s2 + } = this, i = 0; + while (s2 < this.e) { + const added = sorted[i] || this.e, next = +added > +this.e ? this.e : added; + results.push(_Interval.fromDateTimes(s2, next)); + s2 = next; + i += 1; + } + return results; + } + /** + * Split this Interval into smaller Intervals, each of the specified length. + * Left over time is grouped into a smaller interval + * @param {Duration|Object|number} duration - The length of each resulting interval. + * @return {Array} + */ + splitBy(duration) { + const dur = Duration.fromDurationLike(duration); + if (!this.isValid || !dur.isValid || dur.as("milliseconds") === 0) { + return []; + } + let { + s: s2 + } = this, idx = 1, next; + const results = []; + while (s2 < this.e) { + const added = this.start.plus(dur.mapUnits((x) => x * idx)); + next = +added > +this.e ? this.e : added; + results.push(_Interval.fromDateTimes(s2, next)); + s2 = next; + idx += 1; + } + return results; + } + /** + * Split this Interval into the specified number of smaller intervals. + * @param {number} numberOfParts - The number of Intervals to divide the Interval into. + * @return {Array} + */ + divideEqually(numberOfParts) { + if (!this.isValid) return []; + return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts); + } + /** + * Return whether this Interval overlaps with the specified Interval + * @param {Interval} other + * @return {boolean} + */ + overlaps(other) { + return this.e > other.s && this.s < other.e; + } + /** + * Return whether this Interval's end is adjacent to the specified Interval's start. + * @param {Interval} other + * @return {boolean} + */ + abutsStart(other) { + if (!this.isValid) return false; + return +this.e === +other.s; + } + /** + * Return whether this Interval's start is adjacent to the specified Interval's end. + * @param {Interval} other + * @return {boolean} + */ + abutsEnd(other) { + if (!this.isValid) return false; + return +other.e === +this.s; + } + /** + * Returns true if this Interval fully contains the specified Interval, specifically if the intersect (of this Interval and the other Interval) is equal to the other Interval; false otherwise. + * @param {Interval} other + * @return {boolean} + */ + engulfs(other) { + if (!this.isValid) return false; + return this.s <= other.s && this.e >= other.e; + } + /** + * Return whether this Interval has the same start and end as the specified Interval. + * @param {Interval} other + * @return {boolean} + */ + equals(other) { + if (!this.isValid || !other.isValid) { + return false; + } + return this.s.equals(other.s) && this.e.equals(other.e); + } + /** + * Return an Interval representing the intersection of this Interval and the specified Interval. + * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals. + * Returns null if the intersection is empty, meaning, the intervals don't intersect. + * @param {Interval} other + * @return {Interval} + */ + intersection(other) { + if (!this.isValid) return this; + const s2 = this.s > other.s ? this.s : other.s, e = this.e < other.e ? this.e : other.e; + if (s2 >= e) { + return null; + } else { + return _Interval.fromDateTimes(s2, e); + } + } + /** + * Return an Interval representing the union of this Interval and the specified Interval. + * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals. + * @param {Interval} other + * @return {Interval} + */ + union(other) { + if (!this.isValid) return this; + const s2 = this.s < other.s ? this.s : other.s, e = this.e > other.e ? this.e : other.e; + return _Interval.fromDateTimes(s2, e); + } + /** + * Merge an array of Intervals into an equivalent minimal set of Intervals. + * Combines overlapping and adjacent Intervals. + * The resulting array will contain the Intervals in ascending order, that is, starting with the earliest Interval + * and ending with the latest. + * + * @param {Array} intervals + * @return {Array} + */ + static merge(intervals) { + const [found, final] = intervals.sort((a, b) => a.s - b.s).reduce(([sofar, current], item) => { + if (!current) { + return [sofar, item]; + } else if (current.overlaps(item) || current.abutsStart(item)) { + return [sofar, current.union(item)]; + } else { + return [sofar.concat([current]), item]; + } + }, [[], null]); + if (final) { + found.push(final); + } + return found; + } + /** + * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals. + * @param {Array} intervals + * @return {Array} + */ + static xor(intervals) { + let start = null, currentCount = 0; + const results = [], ends = intervals.map((i) => [{ + time: i.s, + type: "s" + }, { + time: i.e, + type: "e" + }]), flattened = Array.prototype.concat(...ends), arr = flattened.sort((a, b) => a.time - b.time); + for (const i of arr) { + currentCount += i.type === "s" ? 1 : -1; + if (currentCount === 1) { + start = i.time; + } else { + if (start && +start !== +i.time) { + results.push(_Interval.fromDateTimes(start, i.time)); + } + start = null; + } + } + return _Interval.merge(results); + } + /** + * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals. + * @param {...Interval} intervals + * @return {Array} + */ + difference(...intervals) { + return _Interval.xor([this].concat(intervals)).map((i) => this.intersection(i)).filter((i) => i && !i.isEmpty()); + } + /** + * Returns a string representation of this Interval appropriate for debugging. + * @return {string} + */ + toString() { + if (!this.isValid) return INVALID$1; + return `[${this.s.toISO()} \u2013 ${this.e.toISO()})`; + } + /** + * Returns a string representation of this Interval appropriate for the REPL. + * @return {string} + */ + [Symbol.for("nodejs.util.inspect.custom")]() { + if (this.isValid) { + return `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`; + } else { + return `Interval { Invalid, reason: ${this.invalidReason} }`; + } + } + /** + * Returns a localized string representing this Interval. Accepts the same options as the + * Intl.DateTimeFormat constructor and any presets defined by Luxon, such as + * {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method + * is browser-specific, but in general it will return an appropriate representation of the + * Interval in the assigned locale. Defaults to the system's locale if no locale has been + * specified. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat + * @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or + * Intl.DateTimeFormat constructor options. + * @param {Object} opts - Options to override the configuration of the start DateTime. + * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022 + * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022 + * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022 + * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM + * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p + * @return {string} + */ + toLocaleString(formatOpts = DATE_SHORT, opts = {}) { + return this.isValid ? Formatter.create(this.s.loc.clone(opts), formatOpts).formatInterval(this) : INVALID$1; + } + /** + * Returns an ISO 8601-compliant string representation of this Interval. + * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + * @param {Object} opts - The same options as {@link DateTime#toISO} + * @return {string} + */ + toISO(opts) { + if (!this.isValid) return INVALID$1; + return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`; + } + /** + * Returns an ISO 8601-compliant string representation of date of this Interval. + * The time components are ignored. + * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + * @return {string} + */ + toISODate() { + if (!this.isValid) return INVALID$1; + return `${this.s.toISODate()}/${this.e.toISODate()}`; + } + /** + * Returns an ISO 8601-compliant string representation of time of this Interval. + * The date components are ignored. + * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + * @param {Object} opts - The same options as {@link DateTime#toISO} + * @return {string} + */ + toISOTime(opts) { + if (!this.isValid) return INVALID$1; + return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`; + } + /** + * Returns a string representation of this Interval formatted according to the specified format + * string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible + * formatting tool. + * @param {string} dateFormat - The format string. This string formats the start and end time. + * See {@link DateTime#toFormat} for details. + * @param {Object} opts - Options. + * @param {string} [opts.separator = ' – '] - A separator to place between the start and end + * representations. + * @return {string} + */ + toFormat(dateFormat, { + separator = " \u2013 " + } = {}) { + if (!this.isValid) return INVALID$1; + return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`; + } + /** + * Return a Duration representing the time spanned by this interval. + * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration. + * @param {Object} opts - options that affect the creation of the Duration + * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use + * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 } + * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 } + * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 } + * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 } + * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 } + * @return {Duration} + */ + toDuration(unit, opts) { + if (!this.isValid) { + return Duration.invalid(this.invalidReason); + } + return this.e.diff(this.s, unit, opts); + } + /** + * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes + * @param {function} mapFn + * @return {Interval} + * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC()) + * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 })) + */ + mapEndpoints(mapFn) { + return _Interval.fromDateTimes(mapFn(this.s), mapFn(this.e)); + } + }; + var Info = class { + /** + * Return whether the specified zone contains a DST. + * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone. + * @return {boolean} + */ + static hasDST(zone = Settings.defaultZone) { + const proto = DateTime.now().setZone(zone).set({ + month: 12 + }); + return !zone.isUniversal && proto.offset !== proto.set({ + month: 6 + }).offset; + } + /** + * Return whether the specified zone is a valid IANA specifier. + * @param {string} zone - Zone to check + * @return {boolean} + */ + static isValidIANAZone(zone) { + return IANAZone.isValidZone(zone); + } + /** + * Converts the input into a {@link Zone} instance. + * + * * If `input` is already a Zone instance, it is returned unchanged. + * * If `input` is a string containing a valid time zone name, a Zone instance + * with that name is returned. + * * If `input` is a string that doesn't refer to a known time zone, a Zone + * instance with {@link Zone#isValid} == false is returned. + * * If `input is a number, a Zone instance with the specified fixed offset + * in minutes is returned. + * * If `input` is `null` or `undefined`, the default zone is returned. + * @param {string|Zone|number} [input] - the value to be converted + * @return {Zone} + */ + static normalizeZone(input) { + return normalizeZone(input, Settings.defaultZone); + } + /** + * Get the weekday on which the week starts according to the given locale. + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.locObj=null] - an existing locale object to use + * @returns {number} the start of the week, 1 for Monday through 7 for Sunday + */ + static getStartOfWeek({ + locale = null, + locObj = null + } = {}) { + return (locObj || Locale.create(locale)).getStartOfWeek(); + } + /** + * Get the minimum number of days necessary in a week before it is considered part of the next year according + * to the given locale. + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.locObj=null] - an existing locale object to use + * @returns {number} + */ + static getMinimumDaysInFirstWeek({ + locale = null, + locObj = null + } = {}) { + return (locObj || Locale.create(locale)).getMinDaysInFirstWeek(); + } + /** + * Get the weekdays, which are considered the weekend according to the given locale + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.locObj=null] - an existing locale object to use + * @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday + */ + static getWeekendWeekdays({ + locale = null, + locObj = null + } = {}) { + return (locObj || Locale.create(locale)).getWeekendDays().slice(); + } + /** + * Return an array of standalone month names. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat + * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.numberingSystem=null] - the numbering system + * @param {string} [opts.locObj=null] - an existing locale object to use + * @param {string} [opts.outputCalendar='gregory'] - the calendar + * @example Info.months()[0] //=> 'January' + * @example Info.months('short')[0] //=> 'Jan' + * @example Info.months('numeric')[0] //=> '1' + * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.' + * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١' + * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I' + * @return {Array} + */ + static months(length = "long", { + locale = null, + numberingSystem = null, + locObj = null, + outputCalendar = "gregory" + } = {}) { + return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length); + } + /** + * Return an array of format month names. + * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that + * changes the string. + * See {@link Info#months} + * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.numberingSystem=null] - the numbering system + * @param {string} [opts.locObj=null] - an existing locale object to use + * @param {string} [opts.outputCalendar='gregory'] - the calendar + * @return {Array} + */ + static monthsFormat(length = "long", { + locale = null, + numberingSystem = null, + locObj = null, + outputCalendar = "gregory" + } = {}) { + return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length, true); + } + /** + * Return an array of standalone week names. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat + * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long". + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.numberingSystem=null] - the numbering system + * @param {string} [opts.locObj=null] - an existing locale object to use + * @example Info.weekdays()[0] //=> 'Monday' + * @example Info.weekdays('short')[0] //=> 'Mon' + * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.' + * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين' + * @return {Array} + */ + static weekdays(length = "long", { + locale = null, + numberingSystem = null, + locObj = null + } = {}) { + return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length); + } + /** + * Return an array of format week names. + * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that + * changes the string. + * See {@link Info#weekdays} + * @param {string} [length='long'] - the length of the month representation, such as "narrow", "short", "long". + * @param {Object} opts - options + * @param {string} [opts.locale=null] - the locale code + * @param {string} [opts.numberingSystem=null] - the numbering system + * @param {string} [opts.locObj=null] - an existing locale object to use + * @return {Array} + */ + static weekdaysFormat(length = "long", { + locale = null, + numberingSystem = null, + locObj = null + } = {}) { + return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length, true); + } + /** + * Return an array of meridiems. + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @example Info.meridiems() //=> [ 'AM', 'PM' ] + * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ] + * @return {Array} + */ + static meridiems({ + locale = null + } = {}) { + return Locale.create(locale).meridiems(); + } + /** + * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian. + * @param {string} [length='short'] - the length of the era representation, such as "short" or "long". + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @example Info.eras() //=> [ 'BC', 'AD' ] + * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ] + * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ] + * @return {Array} + */ + static eras(length = "short", { + locale = null + } = {}) { + return Locale.create(locale, null, "gregory").eras(length); + } + /** + * Return the set of available features in this environment. + * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case. + * Keys: + * * `relative`: whether this environment supports relative time formatting + * * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale + * @example Info.features() //=> { relative: false, localeWeek: true } + * @return {Object} + */ + static features() { + return { + relative: hasRelative(), + localeWeek: hasLocaleWeekInfo() + }; + } + }; + function dayDiff(earlier, later) { + const utcDayStart = (dt) => dt.toUTC(0, { + keepLocalTime: true + }).startOf("day").valueOf(), ms = utcDayStart(later) - utcDayStart(earlier); + return Math.floor(Duration.fromMillis(ms).as("days")); + } + function highOrderDiffs(cursor, later, units) { + const differs = [["years", (a, b) => b.year - a.year], ["quarters", (a, b) => b.quarter - a.quarter + (b.year - a.year) * 4], ["months", (a, b) => b.month - a.month + (b.year - a.year) * 12], ["weeks", (a, b) => { + const days = dayDiff(a, b); + return (days - days % 7) / 7; + }], ["days", dayDiff]]; + const results = {}; + const earlier = cursor; + let lowestOrder, highWater; + for (const [unit, differ] of differs) { + if (units.indexOf(unit) >= 0) { + lowestOrder = unit; + results[unit] = differ(cursor, later); + highWater = earlier.plus(results); + if (highWater > later) { + results[unit]--; + cursor = earlier.plus(results); + if (cursor > later) { + highWater = cursor; + results[unit]--; + cursor = earlier.plus(results); + } + } else { + cursor = highWater; + } + } + } + return [cursor, results, highWater, lowestOrder]; + } + function diff(earlier, later, units, opts) { + let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units); + const remainingMillis = later - cursor; + const lowerOrderUnits = units.filter((u) => ["hours", "minutes", "seconds", "milliseconds"].indexOf(u) >= 0); + if (lowerOrderUnits.length === 0) { + if (highWater < later) { + highWater = cursor.plus({ + [lowestOrder]: 1 + }); + } + if (highWater !== cursor) { + results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor); + } + } + const duration = Duration.fromObject(results, opts); + if (lowerOrderUnits.length > 0) { + return Duration.fromMillis(remainingMillis, opts).shiftTo(...lowerOrderUnits).plus(duration); + } else { + return duration; + } + } + var MISSING_FTP = "missing Intl.DateTimeFormat.formatToParts support"; + function intUnit(regex, post = (i) => i) { + return { + regex, + deser: ([s2]) => post(parseDigits(s2)) + }; + } + var NBSP = String.fromCharCode(160); + var spaceOrNBSP = `[ ${NBSP}]`; + var spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, "g"); + function fixListRegex(s2) { + return s2.replace(/\./g, "\\.?").replace(spaceOrNBSPRegExp, spaceOrNBSP); + } + function stripInsensitivities(s2) { + return s2.replace(/\./g, "").replace(spaceOrNBSPRegExp, " ").toLowerCase(); + } + function oneOf(strings, startIndex) { + if (strings === null) { + return null; + } else { + return { + regex: RegExp(strings.map(fixListRegex).join("|")), + deser: ([s2]) => strings.findIndex((i) => stripInsensitivities(s2) === stripInsensitivities(i)) + startIndex + }; + } + } + function offset(regex, groups) { + return { + regex, + deser: ([, h, m]) => signedOffset(h, m), + groups + }; + } + function simple(regex) { + return { + regex, + deser: ([s2]) => s2 + }; + } + function escapeToken(value) { + return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); + } + function unitForToken(token, loc) { + const one = digitRegex(loc), two = digitRegex(loc, "{2}"), three = digitRegex(loc, "{3}"), four = digitRegex(loc, "{4}"), six = digitRegex(loc, "{6}"), oneOrTwo = digitRegex(loc, "{1,2}"), oneToThree = digitRegex(loc, "{1,3}"), oneToSix = digitRegex(loc, "{1,6}"), oneToNine = digitRegex(loc, "{1,9}"), twoToFour = digitRegex(loc, "{2,4}"), fourToSix = digitRegex(loc, "{4,6}"), literal = (t) => ({ + regex: RegExp(escapeToken(t.val)), + deser: ([s2]) => s2, + literal: true + }), unitate = (t) => { + if (token.literal) { + return literal(t); + } + switch (t.val) { + // era + case "G": + return oneOf(loc.eras("short"), 0); + case "GG": + return oneOf(loc.eras("long"), 0); + // years + case "y": + return intUnit(oneToSix); + case "yy": + return intUnit(twoToFour, untruncateYear); + case "yyyy": + return intUnit(four); + case "yyyyy": + return intUnit(fourToSix); + case "yyyyyy": + return intUnit(six); + // months + case "M": + return intUnit(oneOrTwo); + case "MM": + return intUnit(two); + case "MMM": + return oneOf(loc.months("short", true), 1); + case "MMMM": + return oneOf(loc.months("long", true), 1); + case "L": + return intUnit(oneOrTwo); + case "LL": + return intUnit(two); + case "LLL": + return oneOf(loc.months("short", false), 1); + case "LLLL": + return oneOf(loc.months("long", false), 1); + // dates + case "d": + return intUnit(oneOrTwo); + case "dd": + return intUnit(two); + // ordinals + case "o": + return intUnit(oneToThree); + case "ooo": + return intUnit(three); + // time + case "HH": + return intUnit(two); + case "H": + return intUnit(oneOrTwo); + case "hh": + return intUnit(two); + case "h": + return intUnit(oneOrTwo); + case "mm": + return intUnit(two); + case "m": + return intUnit(oneOrTwo); + case "q": + return intUnit(oneOrTwo); + case "qq": + return intUnit(two); + case "s": + return intUnit(oneOrTwo); + case "ss": + return intUnit(two); + case "S": + return intUnit(oneToThree); + case "SSS": + return intUnit(three); + case "u": + return simple(oneToNine); + case "uu": + return simple(oneOrTwo); + case "uuu": + return intUnit(one); + // meridiem + case "a": + return oneOf(loc.meridiems(), 0); + // weekYear (k) + case "kkkk": + return intUnit(four); + case "kk": + return intUnit(twoToFour, untruncateYear); + // weekNumber (W) + case "W": + return intUnit(oneOrTwo); + case "WW": + return intUnit(two); + // weekdays + case "E": + case "c": + return intUnit(one); + case "EEE": + return oneOf(loc.weekdays("short", false), 1); + case "EEEE": + return oneOf(loc.weekdays("long", false), 1); + case "ccc": + return oneOf(loc.weekdays("short", true), 1); + case "cccc": + return oneOf(loc.weekdays("long", true), 1); + // offset/zone + case "Z": + case "ZZ": + return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2); + case "ZZZ": + return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2); + // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing + // because we don't have any way to figure out what they are + case "z": + return simple(/[a-z_+-/]{1,256}?/i); + // this special-case "token" represents a place where a macro-token expanded into a white-space literal + // in this case we accept any non-newline white-space + case " ": + return simple(/[^\S\n\r]/); + default: + return literal(t); + } + }; + const unit = unitate(token) || { + invalidReason: MISSING_FTP + }; + unit.token = token; + return unit; + } + var partTypeStyleToTokenVal = { + year: { + "2-digit": "yy", + numeric: "yyyyy" + }, + month: { + numeric: "M", + "2-digit": "MM", + short: "MMM", + long: "MMMM" + }, + day: { + numeric: "d", + "2-digit": "dd" + }, + weekday: { + short: "EEE", + long: "EEEE" + }, + dayperiod: "a", + dayPeriod: "a", + hour12: { + numeric: "h", + "2-digit": "hh" + }, + hour24: { + numeric: "H", + "2-digit": "HH" + }, + minute: { + numeric: "m", + "2-digit": "mm" + }, + second: { + numeric: "s", + "2-digit": "ss" + }, + timeZoneName: { + long: "ZZZZZ", + short: "ZZZ" + } + }; + function tokenForPart(part, formatOpts, resolvedOpts) { + const { + type, + value + } = part; + if (type === "literal") { + const isSpace = /^\s+$/.test(value); + return { + literal: !isSpace, + val: isSpace ? " " : value + }; + } + const style = formatOpts[type]; + let actualType = type; + if (type === "hour") { + if (formatOpts.hour12 != null) { + actualType = formatOpts.hour12 ? "hour12" : "hour24"; + } else if (formatOpts.hourCycle != null) { + if (formatOpts.hourCycle === "h11" || formatOpts.hourCycle === "h12") { + actualType = "hour12"; + } else { + actualType = "hour24"; + } + } else { + actualType = resolvedOpts.hour12 ? "hour12" : "hour24"; + } + } + let val = partTypeStyleToTokenVal[actualType]; + if (typeof val === "object") { + val = val[style]; + } + if (val) { + return { + literal: false, + val + }; + } + return void 0; + } + function buildRegex(units) { + const re = units.map((u) => u.regex).reduce((f, r) => `${f}(${r.source})`, ""); + return [`^${re}$`, units]; + } + function match(input, regex, handlers) { + const matches = input.match(regex); + if (matches) { + const all = {}; + let matchIndex = 1; + for (const i in handlers) { + if (hasOwnProperty(handlers, i)) { + const h = handlers[i], groups = h.groups ? h.groups + 1 : 1; + if (!h.literal && h.token) { + all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups)); + } + matchIndex += groups; + } + } + return [matches, all]; + } else { + return [matches, {}]; + } + } + function dateTimeFromMatches(matches) { + const toField = (token) => { + switch (token) { + case "S": + return "millisecond"; + case "s": + return "second"; + case "m": + return "minute"; + case "h": + case "H": + return "hour"; + case "d": + return "day"; + case "o": + return "ordinal"; + case "L": + case "M": + return "month"; + case "y": + return "year"; + case "E": + case "c": + return "weekday"; + case "W": + return "weekNumber"; + case "k": + return "weekYear"; + case "q": + return "quarter"; + default: + return null; + } + }; + let zone = null; + let specificOffset; + if (!isUndefined(matches.z)) { + zone = IANAZone.create(matches.z); + } + if (!isUndefined(matches.Z)) { + if (!zone) { + zone = new FixedOffsetZone(matches.Z); + } + specificOffset = matches.Z; + } + if (!isUndefined(matches.q)) { + matches.M = (matches.q - 1) * 3 + 1; + } + if (!isUndefined(matches.h)) { + if (matches.h < 12 && matches.a === 1) { + matches.h += 12; + } else if (matches.h === 12 && matches.a === 0) { + matches.h = 0; + } + } + if (matches.G === 0 && matches.y) { + matches.y = -matches.y; + } + if (!isUndefined(matches.u)) { + matches.S = parseMillis(matches.u); + } + const vals = Object.keys(matches).reduce((r, k) => { + const f = toField(k); + if (f) { + r[f] = matches[k]; + } + return r; + }, {}); + return [vals, zone, specificOffset]; + } + var dummyDateTimeCache = null; + function getDummyDateTime() { + if (!dummyDateTimeCache) { + dummyDateTimeCache = DateTime.fromMillis(1555555555555); + } + return dummyDateTimeCache; + } + function maybeExpandMacroToken(token, locale) { + if (token.literal) { + return token; + } + const formatOpts = Formatter.macroTokenToFormatOpts(token.val); + const tokens = formatOptsToTokens(formatOpts, locale); + if (tokens == null || tokens.includes(void 0)) { + return token; + } + return tokens; + } + function expandMacroTokens(tokens, locale) { + return Array.prototype.concat(...tokens.map((t) => maybeExpandMacroToken(t, locale))); + } + var TokenParser = class { + constructor(locale, format) { + this.locale = locale; + this.format = format; + this.tokens = expandMacroTokens(Formatter.parseFormat(format), locale); + this.units = this.tokens.map((t) => unitForToken(t, locale)); + this.disqualifyingUnit = this.units.find((t) => t.invalidReason); + if (!this.disqualifyingUnit) { + const [regexString, handlers] = buildRegex(this.units); + this.regex = RegExp(regexString, "i"); + this.handlers = handlers; + } + } + explainFromTokens(input) { + if (!this.isValid) { + return { + input, + tokens: this.tokens, + invalidReason: this.invalidReason + }; + } else { + const [rawMatches, matches] = match(input, this.regex, this.handlers), [result, zone, specificOffset] = matches ? dateTimeFromMatches(matches) : [null, null, void 0]; + if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) { + throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format"); + } + return { + input, + tokens: this.tokens, + regex: this.regex, + rawMatches, + matches, + result, + zone, + specificOffset + }; + } + } + get isValid() { + return !this.disqualifyingUnit; + } + get invalidReason() { + return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null; + } + }; + function explainFromTokens(locale, input, format) { + const parser = new TokenParser(locale, format); + return parser.explainFromTokens(input); + } + function parseFromTokens(locale, input, format) { + const { + result, + zone, + specificOffset, + invalidReason + } = explainFromTokens(locale, input, format); + return [result, zone, specificOffset, invalidReason]; + } + function formatOptsToTokens(formatOpts, locale) { + if (!formatOpts) { + return null; + } + const formatter = Formatter.create(locale, formatOpts); + const df = formatter.dtFormatter(getDummyDateTime()); + const parts = df.formatToParts(); + const resolvedOpts = df.resolvedOptions(); + return parts.map((p) => tokenForPart(p, formatOpts, resolvedOpts)); + } + var INVALID = "Invalid DateTime"; + var MAX_DATE = 864e13; + function unsupportedZone(zone) { + return new Invalid("unsupported zone", `the zone "${zone.name}" is not supported`); + } + function possiblyCachedWeekData(dt) { + if (dt.weekData === null) { + dt.weekData = gregorianToWeek(dt.c); + } + return dt.weekData; + } + function possiblyCachedLocalWeekData(dt) { + if (dt.localWeekData === null) { + dt.localWeekData = gregorianToWeek(dt.c, dt.loc.getMinDaysInFirstWeek(), dt.loc.getStartOfWeek()); + } + return dt.localWeekData; + } + function clone(inst, alts) { + const current = { + ts: inst.ts, + zone: inst.zone, + c: inst.c, + o: inst.o, + loc: inst.loc, + invalid: inst.invalid + }; + return new DateTime({ + ...current, + ...alts, + old: current + }); + } + function fixOffset(localTS, o, tz) { + let utcGuess = localTS - o * 60 * 1e3; + const o2 = tz.offset(utcGuess); + if (o === o2) { + return [utcGuess, o]; + } + utcGuess -= (o2 - o) * 60 * 1e3; + const o3 = tz.offset(utcGuess); + if (o2 === o3) { + return [utcGuess, o2]; + } + return [localTS - Math.min(o2, o3) * 60 * 1e3, Math.max(o2, o3)]; + } + function tsToObj(ts, offset2) { + ts += offset2 * 60 * 1e3; + const d = new Date(ts); + return { + year: d.getUTCFullYear(), + month: d.getUTCMonth() + 1, + day: d.getUTCDate(), + hour: d.getUTCHours(), + minute: d.getUTCMinutes(), + second: d.getUTCSeconds(), + millisecond: d.getUTCMilliseconds() + }; + } + function objToTS(obj2, offset2, zone) { + return fixOffset(objToLocalTS(obj2), offset2, zone); + } + function adjustTime(inst, dur) { + const oPre = inst.o, year = inst.c.year + Math.trunc(dur.years), month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, c = { + ...inst.c, + year, + month, + day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7 + }, millisToAdd = Duration.fromObject({ + years: dur.years - Math.trunc(dur.years), + quarters: dur.quarters - Math.trunc(dur.quarters), + months: dur.months - Math.trunc(dur.months), + weeks: dur.weeks - Math.trunc(dur.weeks), + days: dur.days - Math.trunc(dur.days), + hours: dur.hours, + minutes: dur.minutes, + seconds: dur.seconds, + milliseconds: dur.milliseconds + }).as("milliseconds"), localTS = objToLocalTS(c); + let [ts, o] = fixOffset(localTS, oPre, inst.zone); + if (millisToAdd !== 0) { + ts += millisToAdd; + o = inst.zone.offset(ts); + } + return { + ts, + o + }; + } + function parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) { + const { + setZone, + zone + } = opts; + if (parsed && Object.keys(parsed).length !== 0 || parsedZone) { + const interpretationZone = parsedZone || zone, inst = DateTime.fromObject(parsed, { + ...opts, + zone: interpretationZone, + specificOffset + }); + return setZone ? inst : inst.setZone(zone); + } else { + return DateTime.invalid(new Invalid("unparsable", `the input "${text}" can't be parsed as ${format}`)); + } + } + function toTechFormat(dt, format, allowZ = true) { + return dt.isValid ? Formatter.create(Locale.create("en-US"), { + allowZ, + forceSimple: true + }).formatDateTimeFromString(dt, format) : null; + } + function toISODate(o, extended, precision) { + const longFormat = o.c.year > 9999 || o.c.year < 0; + let c = ""; + if (longFormat && o.c.year >= 0) c += "+"; + c += padStart(o.c.year, longFormat ? 6 : 4); + if (precision === "year") return c; + if (extended) { + c += "-"; + c += padStart(o.c.month); + if (precision === "month") return c; + c += "-"; + } else { + c += padStart(o.c.month); + if (precision === "month") return c; + } + c += padStart(o.c.day); + return c; + } + function toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone, precision) { + let showSeconds = !suppressSeconds || o.c.millisecond !== 0 || o.c.second !== 0, c = ""; + switch (precision) { + case "day": + case "month": + case "year": + break; + default: + c += padStart(o.c.hour); + if (precision === "hour") break; + if (extended) { + c += ":"; + c += padStart(o.c.minute); + if (precision === "minute") break; + if (showSeconds) { + c += ":"; + c += padStart(o.c.second); + } + } else { + c += padStart(o.c.minute); + if (precision === "minute") break; + if (showSeconds) { + c += padStart(o.c.second); + } + } + if (precision === "second") break; + if (showSeconds && (!suppressMilliseconds || o.c.millisecond !== 0)) { + c += "."; + c += padStart(o.c.millisecond, 3); + } + } + if (includeOffset) { + if (o.isOffsetFixed && o.offset === 0 && !extendedZone) { + c += "Z"; + } else if (o.o < 0) { + c += "-"; + c += padStart(Math.trunc(-o.o / 60)); + c += ":"; + c += padStart(Math.trunc(-o.o % 60)); + } else { + c += "+"; + c += padStart(Math.trunc(o.o / 60)); + c += ":"; + c += padStart(Math.trunc(o.o % 60)); + } + } + if (extendedZone) { + c += "[" + o.zone.ianaName + "]"; + } + return c; + } + var defaultUnitValues = { + month: 1, + day: 1, + hour: 0, + minute: 0, + second: 0, + millisecond: 0 + }; + var defaultWeekUnitValues = { + weekNumber: 1, + weekday: 1, + hour: 0, + minute: 0, + second: 0, + millisecond: 0 + }; + var defaultOrdinalUnitValues = { + ordinal: 1, + hour: 0, + minute: 0, + second: 0, + millisecond: 0 + }; + var orderedUnits = ["year", "month", "day", "hour", "minute", "second", "millisecond"]; + var orderedWeekUnits = ["weekYear", "weekNumber", "weekday", "hour", "minute", "second", "millisecond"]; + var orderedOrdinalUnits = ["year", "ordinal", "hour", "minute", "second", "millisecond"]; + function normalizeUnit(unit) { + const normalized = { + year: "year", + years: "year", + month: "month", + months: "month", + day: "day", + days: "day", + hour: "hour", + hours: "hour", + minute: "minute", + minutes: "minute", + quarter: "quarter", + quarters: "quarter", + second: "second", + seconds: "second", + millisecond: "millisecond", + milliseconds: "millisecond", + weekday: "weekday", + weekdays: "weekday", + weeknumber: "weekNumber", + weeksnumber: "weekNumber", + weeknumbers: "weekNumber", + weekyear: "weekYear", + weekyears: "weekYear", + ordinal: "ordinal" + }[unit.toLowerCase()]; + if (!normalized) throw new InvalidUnitError(unit); + return normalized; + } + function normalizeUnitWithLocalWeeks(unit) { + switch (unit.toLowerCase()) { + case "localweekday": + case "localweekdays": + return "localWeekday"; + case "localweeknumber": + case "localweeknumbers": + return "localWeekNumber"; + case "localweekyear": + case "localweekyears": + return "localWeekYear"; + default: + return normalizeUnit(unit); + } + } + function guessOffsetForZone(zone) { + if (zoneOffsetTs === void 0) { + zoneOffsetTs = Settings.now(); + } + if (zone.type !== "iana") { + return zone.offset(zoneOffsetTs); + } + const zoneName = zone.name; + let offsetGuess = zoneOffsetGuessCache.get(zoneName); + if (offsetGuess === void 0) { + offsetGuess = zone.offset(zoneOffsetTs); + zoneOffsetGuessCache.set(zoneName, offsetGuess); + } + return offsetGuess; + } + function quickDT(obj2, opts) { + const zone = normalizeZone(opts.zone, Settings.defaultZone); + if (!zone.isValid) { + return DateTime.invalid(unsupportedZone(zone)); + } + const loc = Locale.fromObject(opts); + let ts, o; + if (!isUndefined(obj2.year)) { + for (const u of orderedUnits) { + if (isUndefined(obj2[u])) { + obj2[u] = defaultUnitValues[u]; + } + } + const invalid = hasInvalidGregorianData(obj2) || hasInvalidTimeData(obj2); + if (invalid) { + return DateTime.invalid(invalid); + } + const offsetProvis = guessOffsetForZone(zone); + [ts, o] = objToTS(obj2, offsetProvis, zone); + } else { + ts = Settings.now(); + } + return new DateTime({ + ts, + zone, + loc, + o + }); + } + function diffRelative(start, end, opts) { + const round = isUndefined(opts.round) ? true : opts.round, rounding = isUndefined(opts.rounding) ? "trunc" : opts.rounding, format = (c, unit) => { + c = roundTo(c, round || opts.calendary ? 0 : 2, opts.calendary ? "round" : rounding); + const formatter = end.loc.clone(opts).relFormatter(opts); + return formatter.format(c, unit); + }, differ = (unit) => { + if (opts.calendary) { + if (!end.hasSame(start, unit)) { + return end.startOf(unit).diff(start.startOf(unit), unit).get(unit); + } else return 0; + } else { + return end.diff(start, unit).get(unit); + } + }; + if (opts.unit) { + return format(differ(opts.unit), opts.unit); + } + for (const unit of opts.units) { + const count = differ(unit); + if (Math.abs(count) >= 1) { + return format(count, unit); + } + } + return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]); + } + function lastOpts(argList) { + let opts = {}, args; + if (argList.length > 0 && typeof argList[argList.length - 1] === "object") { + opts = argList[argList.length - 1]; + args = Array.from(argList).slice(0, argList.length - 1); + } else { + args = Array.from(argList); + } + return [opts, args]; + } + var zoneOffsetTs; + var zoneOffsetGuessCache = /* @__PURE__ */ new Map(); + var DateTime = class _DateTime { + /** + * @access private + */ + constructor(config) { + const zone = config.zone || Settings.defaultZone; + let invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null); + this.ts = isUndefined(config.ts) ? Settings.now() : config.ts; + let c = null, o = null; + if (!invalid) { + const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone); + if (unchanged) { + [c, o] = [config.old.c, config.old.o]; + } else { + const ot = isNumber(config.o) && !config.old ? config.o : zone.offset(this.ts); + c = tsToObj(this.ts, ot); + invalid = Number.isNaN(c.year) ? new Invalid("invalid input") : null; + c = invalid ? null : c; + o = invalid ? null : ot; + } + } + this._zone = zone; + this.loc = config.loc || Locale.create(); + this.invalid = invalid; + this.weekData = null; + this.localWeekData = null; + this.c = c; + this.o = o; + this.isLuxonDateTime = true; + } + // CONSTRUCT + /** + * Create a DateTime for the current instant, in the system's time zone. + * + * Use Settings to override these default values if needed. + * @example DateTime.now().toISO() //~> now in the ISO format + * @return {DateTime} + */ + static now() { + return new _DateTime({}); + } + /** + * Create a local DateTime + * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used + * @param {number} [month=1] - The month, 1-indexed + * @param {number} [day=1] - The day of the month, 1-indexed + * @param {number} [hour=0] - The hour of the day, in 24-hour time + * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 + * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 + * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 + * @example DateTime.local() //~> now + * @example DateTime.local({ zone: "America/New_York" }) //~> now, in US east coast time + * @example DateTime.local(2017) //~> 2017-01-01T00:00:00 + * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00 + * @example DateTime.local(2017, 3, 12, { locale: "fr" }) //~> 2017-03-12T00:00:00, with a French locale + * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00 + * @example DateTime.local(2017, 3, 12, 5, { zone: "utc" }) //~> 2017-03-12T05:00:00, in UTC + * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00 + * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10 + * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765 + * @return {DateTime} + */ + static local() { + const [opts, args] = lastOpts(arguments), [year, month, day, hour, minute, second, millisecond] = args; + return quickDT({ + year, + month, + day, + hour, + minute, + second, + millisecond + }, opts); + } + /** + * Create a DateTime in UTC + * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used + * @param {number} [month=1] - The month, 1-indexed + * @param {number} [day=1] - The day of the month + * @param {number} [hour=0] - The hour of the day, in 24-hour time + * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 + * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 + * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 + * @param {Object} options - configuration options for the DateTime + * @param {string} [options.locale] - a locale to set on the resulting DateTime instance + * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance + * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance + * @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance + * @example DateTime.utc() //~> now + * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z + * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z + * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z + * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z + * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z + * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: "fr" }) //~> 2017-03-12T05:45:00Z with a French locale + * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z + * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: "fr" }) //~> 2017-03-12T05:45:10.765Z with a French locale + * @return {DateTime} + */ + static utc() { + const [opts, args] = lastOpts(arguments), [year, month, day, hour, minute, second, millisecond] = args; + opts.zone = FixedOffsetZone.utcInstance; + return quickDT({ + year, + month, + day, + hour, + minute, + second, + millisecond + }, opts); + } + /** + * Create a DateTime from a JavaScript Date object. Uses the default zone. + * @param {Date} date - a JavaScript Date object + * @param {Object} options - configuration options for the DateTime + * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into + * @return {DateTime} + */ + static fromJSDate(date, options = {}) { + const ts = isDate(date) ? date.valueOf() : NaN; + if (Number.isNaN(ts)) { + return _DateTime.invalid("invalid input"); + } + const zoneToUse = normalizeZone(options.zone, Settings.defaultZone); + if (!zoneToUse.isValid) { + return _DateTime.invalid(unsupportedZone(zoneToUse)); + } + return new _DateTime({ + ts, + zone: zoneToUse, + loc: Locale.fromObject(options) + }); + } + /** + * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. + * @param {number} milliseconds - a number of milliseconds since 1970 UTC + * @param {Object} options - configuration options for the DateTime + * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into + * @param {string} [options.locale] - a locale to set on the resulting DateTime instance + * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance + * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance + * @return {DateTime} + */ + static fromMillis(milliseconds, options = {}) { + if (!isNumber(milliseconds)) { + throw new InvalidArgumentError(`fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`); + } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) { + return _DateTime.invalid("Timestamp out of range"); + } else { + return new _DateTime({ + ts: milliseconds, + zone: normalizeZone(options.zone, Settings.defaultZone), + loc: Locale.fromObject(options) + }); + } + } + /** + * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. + * @param {number} seconds - a number of seconds since 1970 UTC + * @param {Object} options - configuration options for the DateTime + * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into + * @param {string} [options.locale] - a locale to set on the resulting DateTime instance + * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance + * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance + * @return {DateTime} + */ + static fromSeconds(seconds, options = {}) { + if (!isNumber(seconds)) { + throw new InvalidArgumentError("fromSeconds requires a numerical input"); + } else { + return new _DateTime({ + ts: seconds * 1e3, + zone: normalizeZone(options.zone, Settings.defaultZone), + loc: Locale.fromObject(options) + }); + } + } + /** + * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults. + * @param {Object} obj - the object to create the DateTime from + * @param {number} obj.year - a year, such as 1987 + * @param {number} obj.month - a month, 1-12 + * @param {number} obj.day - a day of the month, 1-31, depending on the month + * @param {number} obj.ordinal - day of the year, 1-365 or 366 + * @param {number} obj.weekYear - an ISO week year + * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year + * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday + * @param {number} obj.localWeekYear - a week year, according to the locale + * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale + * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale + * @param {number} obj.hour - hour of the day, 0-23 + * @param {number} obj.minute - minute of the hour, 0-59 + * @param {number} obj.second - second of the minute, 0-59 + * @param {number} obj.millisecond - millisecond of the second, 0-999 + * @param {Object} opts - options for creating this DateTime + * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone() + * @param {string} [opts.locale='system\'s locale'] - a locale to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance + * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance + * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25' + * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01' + * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06 + * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }), + * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' }) + * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' }) + * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13' + * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: "en-US" }).toISODate() //=> '2021-12-26' + * @return {DateTime} + */ + static fromObject(obj2, opts = {}) { + obj2 = obj2 || {}; + const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone); + if (!zoneToUse.isValid) { + return _DateTime.invalid(unsupportedZone(zoneToUse)); + } + const loc = Locale.fromObject(opts); + const normalized = normalizeObject(obj2, normalizeUnitWithLocalWeeks); + const { + minDaysInFirstWeek, + startOfWeek + } = usesLocalWeekValues(normalized, loc); + const tsNow = Settings.now(), offsetProvis = !isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber; + if ((containsGregor || containsOrdinal) && definiteWeekDef) { + throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals"); + } + if (containsGregorMD && containsOrdinal) { + throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day"); + } + const useWeekData = definiteWeekDef || normalized.weekday && !containsGregor; + let units, defaultValues, objNow = tsToObj(tsNow, offsetProvis); + if (useWeekData) { + units = orderedWeekUnits; + defaultValues = defaultWeekUnitValues; + objNow = gregorianToWeek(objNow, minDaysInFirstWeek, startOfWeek); + } else if (containsOrdinal) { + units = orderedOrdinalUnits; + defaultValues = defaultOrdinalUnitValues; + objNow = gregorianToOrdinal(objNow); + } else { + units = orderedUnits; + defaultValues = defaultUnitValues; + } + let foundFirst = false; + for (const u of units) { + const v = normalized[u]; + if (!isUndefined(v)) { + foundFirst = true; + } else if (foundFirst) { + normalized[u] = defaultValues[u]; + } else { + normalized[u] = objNow[u]; + } + } + const higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized), invalid = higherOrderInvalid || hasInvalidTimeData(normalized); + if (invalid) { + return _DateTime.invalid(invalid); + } + const gregorian = useWeekData ? weekToGregorian(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? ordinalToGregorian(normalized) : normalized, [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse), inst = new _DateTime({ + ts: tsFinal, + zone: zoneToUse, + o: offsetFinal, + loc + }); + if (normalized.weekday && containsGregor && obj2.weekday !== inst.weekday) { + return _DateTime.invalid("mismatched weekday", `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`); + } + if (!inst.isValid) { + return _DateTime.invalid(inst.invalid); + } + return inst; + } + /** + * Create a DateTime from an ISO 8601 string + * @param {string} text - the ISO string + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone + * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one + * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance + * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance + * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance + * @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance + * @example DateTime.fromISO('2016-05-25T09:08:34.123') + * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00') + * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true}) + * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'}) + * @example DateTime.fromISO('2016-W05-4') + * @return {DateTime} + */ + static fromISO(text, opts = {}) { + const [vals, parsedZone] = parseISODate(text); + return parseDataToDateTime(vals, parsedZone, opts, "ISO 8601", text); + } + /** + * Create a DateTime from an RFC 2822 string + * @param {string} text - the RFC 2822 string + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. + * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one + * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance + * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance + * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT') + * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600') + * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z') + * @return {DateTime} + */ + static fromRFC2822(text, opts = {}) { + const [vals, parsedZone] = parseRFC2822Date(text); + return parseDataToDateTime(vals, parsedZone, opts, "RFC 2822", text); + } + /** + * Create a DateTime from an HTTP header date + * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 + * @param {string} text - the HTTP header date + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. + * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods. + * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance + * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance + * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT') + * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT') + * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994') + * @return {DateTime} + */ + static fromHTTP(text, opts = {}) { + const [vals, parsedZone] = parseHTTPDate(text); + return parseDataToDateTime(vals, parsedZone, opts, "HTTP", opts); + } + /** + * Create a DateTime from an input string and format string. + * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens). + * @param {string} text - the string to parse + * @param {string} fmt - the format the string is expected to be in (see the link below for the formats) + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone + * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one + * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale + * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system + * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @return {DateTime} + */ + static fromFormat(text, fmt, opts = {}) { + if (isUndefined(text) || isUndefined(fmt)) { + throw new InvalidArgumentError("fromFormat requires an input string and a format"); + } + const { + locale = null, + numberingSystem = null + } = opts, localeToUse = Locale.fromOpts({ + locale, + numberingSystem, + defaultToEN: true + }), [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt); + if (invalid) { + return _DateTime.invalid(invalid); + } else { + return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset); + } + } + /** + * @deprecated use fromFormat instead + */ + static fromString(text, fmt, opts = {}) { + return _DateTime.fromFormat(text, fmt, opts); + } + /** + * Create a DateTime from a SQL date, time, or datetime + * Defaults to en-US if no locale has been specified, regardless of the system's locale + * @param {string} text - the string to parse + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone + * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one + * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale + * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system + * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @example DateTime.fromSQL('2017-05-15') + * @example DateTime.fromSQL('2017-05-15 09:12:34') + * @example DateTime.fromSQL('2017-05-15 09:12:34.342') + * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00') + * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles') + * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true }) + * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' }) + * @example DateTime.fromSQL('09:12:34.342') + * @return {DateTime} + */ + static fromSQL(text, opts = {}) { + const [vals, parsedZone] = parseSQL(text); + return parseDataToDateTime(vals, parsedZone, opts, "SQL", text); + } + /** + * Create an invalid DateTime. + * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent. + * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information + * @return {DateTime} + */ + static invalid(reason, explanation = null) { + if (!reason) { + throw new InvalidArgumentError("need to specify a reason the DateTime is invalid"); + } + const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); + if (Settings.throwOnInvalid) { + throw new InvalidDateTimeError(invalid); + } else { + return new _DateTime({ + invalid + }); + } + } + /** + * Check if an object is an instance of DateTime. Works across context boundaries + * @param {object} o + * @return {boolean} + */ + static isDateTime(o) { + return o && o.isLuxonDateTime || false; + } + /** + * Produce the format string for a set of options + * @param formatOpts + * @param localeOpts + * @returns {string} + */ + static parseFormatForOpts(formatOpts, localeOpts = {}) { + const tokenList = formatOptsToTokens(formatOpts, Locale.fromObject(localeOpts)); + return !tokenList ? null : tokenList.map((t) => t ? t.val : null).join(""); + } + /** + * Produce the the fully expanded format token for the locale + * Does NOT quote characters, so quoted tokens will not round trip correctly + * @param fmt + * @param localeOpts + * @returns {string} + */ + static expandFormat(fmt, localeOpts = {}) { + const expanded = expandMacroTokens(Formatter.parseFormat(fmt), Locale.fromObject(localeOpts)); + return expanded.map((t) => t.val).join(""); + } + static resetCache() { + zoneOffsetTs = void 0; + zoneOffsetGuessCache.clear(); + } + // INFO + /** + * Get the value of unit. + * @param {string} unit - a unit such as 'minute' or 'day' + * @example DateTime.local(2017, 7, 4).get('month'); //=> 7 + * @example DateTime.local(2017, 7, 4).get('day'); //=> 4 + * @return {number} + */ + get(unit) { + return this[unit]; + } + /** + * Returns whether the DateTime is valid. Invalid DateTimes occur when: + * * The DateTime was created from invalid calendar information, such as the 13th month or February 30 + * * The DateTime was created by an operation on another invalid date + * @type {boolean} + */ + get isValid() { + return this.invalid === null; + } + /** + * Returns an error code if this DateTime is invalid, or null if the DateTime is valid + * @type {string} + */ + get invalidReason() { + return this.invalid ? this.invalid.reason : null; + } + /** + * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid + * @type {string} + */ + get invalidExplanation() { + return this.invalid ? this.invalid.explanation : null; + } + /** + * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime + * + * @type {string} + */ + get locale() { + return this.isValid ? this.loc.locale : null; + } + /** + * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime + * + * @type {string} + */ + get numberingSystem() { + return this.isValid ? this.loc.numberingSystem : null; + } + /** + * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime + * + * @type {string} + */ + get outputCalendar() { + return this.isValid ? this.loc.outputCalendar : null; + } + /** + * Get the time zone associated with this DateTime. + * @type {Zone} + */ + get zone() { + return this._zone; + } + /** + * Get the name of the time zone. + * @type {string} + */ + get zoneName() { + return this.isValid ? this.zone.name : null; + } + /** + * Get the year + * @example DateTime.local(2017, 5, 25).year //=> 2017 + * @type {number} + */ + get year() { + return this.isValid ? this.c.year : NaN; + } + /** + * Get the quarter + * @example DateTime.local(2017, 5, 25).quarter //=> 2 + * @type {number} + */ + get quarter() { + return this.isValid ? Math.ceil(this.c.month / 3) : NaN; + } + /** + * Get the month (1-12). + * @example DateTime.local(2017, 5, 25).month //=> 5 + * @type {number} + */ + get month() { + return this.isValid ? this.c.month : NaN; + } + /** + * Get the day of the month (1-30ish). + * @example DateTime.local(2017, 5, 25).day //=> 25 + * @type {number} + */ + get day() { + return this.isValid ? this.c.day : NaN; + } + /** + * Get the hour of the day (0-23). + * @example DateTime.local(2017, 5, 25, 9).hour //=> 9 + * @type {number} + */ + get hour() { + return this.isValid ? this.c.hour : NaN; + } + /** + * Get the minute of the hour (0-59). + * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30 + * @type {number} + */ + get minute() { + return this.isValid ? this.c.minute : NaN; + } + /** + * Get the second of the minute (0-59). + * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52 + * @type {number} + */ + get second() { + return this.isValid ? this.c.second : NaN; + } + /** + * Get the millisecond of the second (0-999). + * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654 + * @type {number} + */ + get millisecond() { + return this.isValid ? this.c.millisecond : NaN; + } + /** + * Get the week year + * @see https://en.wikipedia.org/wiki/ISO_week_date + * @example DateTime.local(2014, 12, 31).weekYear //=> 2015 + * @type {number} + */ + get weekYear() { + return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN; + } + /** + * Get the week number of the week year (1-52ish). + * @see https://en.wikipedia.org/wiki/ISO_week_date + * @example DateTime.local(2017, 5, 25).weekNumber //=> 21 + * @type {number} + */ + get weekNumber() { + return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN; + } + /** + * Get the day of the week. + * 1 is Monday and 7 is Sunday + * @see https://en.wikipedia.org/wiki/ISO_week_date + * @example DateTime.local(2014, 11, 31).weekday //=> 4 + * @type {number} + */ + get weekday() { + return this.isValid ? possiblyCachedWeekData(this).weekday : NaN; + } + /** + * Returns true if this date is on a weekend according to the locale, false otherwise + * @returns {boolean} + */ + get isWeekend() { + return this.isValid && this.loc.getWeekendDays().includes(this.weekday); + } + /** + * Get the day of the week according to the locale. + * 1 is the first day of the week and 7 is the last day of the week. + * If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1, + * @returns {number} + */ + get localWeekday() { + return this.isValid ? possiblyCachedLocalWeekData(this).weekday : NaN; + } + /** + * Get the week number of the week year according to the locale. Different locales assign week numbers differently, + * because the week can start on different days of the week (see localWeekday) and because a different number of days + * is required for a week to count as the first week of a year. + * @returns {number} + */ + get localWeekNumber() { + return this.isValid ? possiblyCachedLocalWeekData(this).weekNumber : NaN; + } + /** + * Get the week year according to the locale. Different locales assign week numbers (and therefor week years) + * differently, see localWeekNumber. + * @returns {number} + */ + get localWeekYear() { + return this.isValid ? possiblyCachedLocalWeekData(this).weekYear : NaN; + } + /** + * Get the ordinal (meaning the day of the year) + * @example DateTime.local(2017, 5, 25).ordinal //=> 145 + * @type {number|DateTime} + */ + get ordinal() { + return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN; + } + /** + * Get the human readable short month name, such as 'Oct'. + * Defaults to the system's locale if no locale has been specified + * @example DateTime.local(2017, 10, 30).monthShort //=> Oct + * @type {string} + */ + get monthShort() { + return this.isValid ? Info.months("short", { + locObj: this.loc + })[this.month - 1] : null; + } + /** + * Get the human readable long month name, such as 'October'. + * Defaults to the system's locale if no locale has been specified + * @example DateTime.local(2017, 10, 30).monthLong //=> October + * @type {string} + */ + get monthLong() { + return this.isValid ? Info.months("long", { + locObj: this.loc + })[this.month - 1] : null; + } + /** + * Get the human readable short weekday, such as 'Mon'. + * Defaults to the system's locale if no locale has been specified + * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon + * @type {string} + */ + get weekdayShort() { + return this.isValid ? Info.weekdays("short", { + locObj: this.loc + })[this.weekday - 1] : null; + } + /** + * Get the human readable long weekday, such as 'Monday'. + * Defaults to the system's locale if no locale has been specified + * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday + * @type {string} + */ + get weekdayLong() { + return this.isValid ? Info.weekdays("long", { + locObj: this.loc + })[this.weekday - 1] : null; + } + /** + * Get the UTC offset of this DateTime in minutes + * @example DateTime.now().offset //=> -240 + * @example DateTime.utc().offset //=> 0 + * @type {number} + */ + get offset() { + return this.isValid ? +this.o : NaN; + } + /** + * Get the short human name for the zone's current offset, for example "EST" or "EDT". + * Defaults to the system's locale if no locale has been specified + * @type {string} + */ + get offsetNameShort() { + if (this.isValid) { + return this.zone.offsetName(this.ts, { + format: "short", + locale: this.locale + }); + } else { + return null; + } + } + /** + * Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time". + * Defaults to the system's locale if no locale has been specified + * @type {string} + */ + get offsetNameLong() { + if (this.isValid) { + return this.zone.offsetName(this.ts, { + format: "long", + locale: this.locale + }); + } else { + return null; + } + } + /** + * Get whether this zone's offset ever changes, as in a DST. + * @type {boolean} + */ + get isOffsetFixed() { + return this.isValid ? this.zone.isUniversal : null; + } + /** + * Get whether the DateTime is in a DST. + * @type {boolean} + */ + get isInDST() { + if (this.isOffsetFixed) { + return false; + } else { + return this.offset > this.set({ + month: 1, + day: 1 + }).offset || this.offset > this.set({ + month: 5 + }).offset; + } + } + /** + * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC + * in this DateTime's zone. During DST changes local time can be ambiguous, for example + * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`. + * This method will return both possible DateTimes if this DateTime's local time is ambiguous. + * @returns {DateTime[]} + */ + getPossibleOffsets() { + if (!this.isValid || this.isOffsetFixed) { + return [this]; + } + const dayMs = 864e5; + const minuteMs = 6e4; + const localTS = objToLocalTS(this.c); + const oEarlier = this.zone.offset(localTS - dayMs); + const oLater = this.zone.offset(localTS + dayMs); + const o1 = this.zone.offset(localTS - oEarlier * minuteMs); + const o2 = this.zone.offset(localTS - oLater * minuteMs); + if (o1 === o2) { + return [this]; + } + const ts1 = localTS - o1 * minuteMs; + const ts2 = localTS - o2 * minuteMs; + const c1 = tsToObj(ts1, o1); + const c2 = tsToObj(ts2, o2); + if (c1.hour === c2.hour && c1.minute === c2.minute && c1.second === c2.second && c1.millisecond === c2.millisecond) { + return [clone(this, { + ts: ts1 + }), clone(this, { + ts: ts2 + })]; + } + return [this]; + } + /** + * Returns true if this DateTime is in a leap year, false otherwise + * @example DateTime.local(2016).isInLeapYear //=> true + * @example DateTime.local(2013).isInLeapYear //=> false + * @type {boolean} + */ + get isInLeapYear() { + return isLeapYear(this.year); + } + /** + * Returns the number of days in this DateTime's month + * @example DateTime.local(2016, 2).daysInMonth //=> 29 + * @example DateTime.local(2016, 3).daysInMonth //=> 31 + * @type {number} + */ + get daysInMonth() { + return daysInMonth(this.year, this.month); + } + /** + * Returns the number of days in this DateTime's year + * @example DateTime.local(2016).daysInYear //=> 366 + * @example DateTime.local(2013).daysInYear //=> 365 + * @type {number} + */ + get daysInYear() { + return this.isValid ? daysInYear(this.year) : NaN; + } + /** + * Returns the number of weeks in this DateTime's year + * @see https://en.wikipedia.org/wiki/ISO_week_date + * @example DateTime.local(2004).weeksInWeekYear //=> 53 + * @example DateTime.local(2013).weeksInWeekYear //=> 52 + * @type {number} + */ + get weeksInWeekYear() { + return this.isValid ? weeksInWeekYear(this.weekYear) : NaN; + } + /** + * Returns the number of weeks in this DateTime's local week year + * @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52 + * @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53 + * @type {number} + */ + get weeksInLocalWeekYear() { + return this.isValid ? weeksInWeekYear(this.localWeekYear, this.loc.getMinDaysInFirstWeek(), this.loc.getStartOfWeek()) : NaN; + } + /** + * Returns the resolved Intl options for this DateTime. + * This is useful in understanding the behavior of formatting methods + * @param {Object} opts - the same options as toLocaleString + * @return {Object} + */ + resolvedLocaleOptions(opts = {}) { + const { + locale, + numberingSystem, + calendar + } = Formatter.create(this.loc.clone(opts), opts).resolvedOptions(this); + return { + locale, + numberingSystem, + outputCalendar: calendar + }; + } + // TRANSFORM + /** + * "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime. + * + * Equivalent to {@link DateTime#setZone}('utc') + * @param {number} [offset=0] - optionally, an offset from UTC in minutes + * @param {Object} [opts={}] - options to pass to `setZone()` + * @return {DateTime} + */ + toUTC(offset2 = 0, opts = {}) { + return this.setZone(FixedOffsetZone.instance(offset2), opts); + } + /** + * "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime. + * + * Equivalent to `setZone('local')` + * @return {DateTime} + */ + toLocal() { + return this.setZone(Settings.defaultZone); + } + /** + * "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime. + * + * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones. + * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class. + * @param {Object} opts - options + * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this. + * @return {DateTime} + */ + setZone(zone, { + keepLocalTime = false, + keepCalendarTime = false + } = {}) { + zone = normalizeZone(zone, Settings.defaultZone); + if (zone.equals(this.zone)) { + return this; + } else if (!zone.isValid) { + return _DateTime.invalid(unsupportedZone(zone)); + } else { + let newTS = this.ts; + if (keepLocalTime || keepCalendarTime) { + const offsetGuess = zone.offset(this.ts); + const asObj = this.toObject(); + [newTS] = objToTS(asObj, offsetGuess, zone); + } + return clone(this, { + ts: newTS, + zone + }); + } + } + /** + * "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime. + * @param {Object} properties - the properties to set + * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' }) + * @return {DateTime} + */ + reconfigure({ + locale, + numberingSystem, + outputCalendar + } = {}) { + const loc = this.loc.clone({ + locale, + numberingSystem, + outputCalendar + }); + return clone(this, { + loc + }); + } + /** + * "Set" the locale. Returns a newly-constructed DateTime. + * Just a convenient alias for reconfigure({ locale }) + * @example DateTime.local(2017, 5, 25).setLocale('en-GB') + * @return {DateTime} + */ + setLocale(locale) { + return this.reconfigure({ + locale + }); + } + /** + * "Set" the values of specified units. Returns a newly-constructed DateTime. + * You can only set units with this method; for "setting" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}. + * + * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`. + * They cannot be mixed with ISO-week units like `weekday`. + * @param {Object} values - a mapping of units to numbers + * @example dt.set({ year: 2017 }) + * @example dt.set({ hour: 8, minute: 30 }) + * @example dt.set({ weekday: 5 }) + * @example dt.set({ year: 2005, ordinal: 234 }) + * @return {DateTime} + */ + set(values) { + if (!this.isValid) return this; + const normalized = normalizeObject(values, normalizeUnitWithLocalWeeks); + const { + minDaysInFirstWeek, + startOfWeek + } = usesLocalWeekValues(normalized, this.loc); + const settingWeekStuff = !isUndefined(normalized.weekYear) || !isUndefined(normalized.weekNumber) || !isUndefined(normalized.weekday), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber; + if ((containsGregor || containsOrdinal) && definiteWeekDef) { + throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals"); + } + if (containsGregorMD && containsOrdinal) { + throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day"); + } + let mixed; + if (settingWeekStuff) { + mixed = weekToGregorian({ + ...gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), + ...normalized + }, minDaysInFirstWeek, startOfWeek); + } else if (!isUndefined(normalized.ordinal)) { + mixed = ordinalToGregorian({ + ...gregorianToOrdinal(this.c), + ...normalized + }); + } else { + mixed = { + ...this.toObject(), + ...normalized + }; + if (isUndefined(normalized.day)) { + mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day); + } + } + const [ts, o] = objToTS(mixed, this.o, this.zone); + return clone(this, { + ts, + o + }); + } + /** + * Add a period of time to this DateTime and return the resulting DateTime + * + * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between. + * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() + * @example DateTime.now().plus(123) //~> in 123 milliseconds + * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes + * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow + * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday + * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min + * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min + * @return {DateTime} + */ + plus(duration) { + if (!this.isValid) return this; + const dur = Duration.fromDurationLike(duration); + return clone(this, adjustTime(this, dur)); + } + /** + * Subtract a period of time to this DateTime and return the resulting DateTime + * See {@link DateTime#plus} + * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() + @return {DateTime} + */ + minus(duration) { + if (!this.isValid) return this; + const dur = Duration.fromDurationLike(duration).negate(); + return clone(this, adjustTime(this, dur)); + } + /** + * "Set" this DateTime to the beginning of a unit of time. + * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'. + * @param {Object} opts - options + * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week + * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01' + * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01' + * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays + * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00' + * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00' + * @return {DateTime} + */ + startOf(unit, { + useLocaleWeeks = false + } = {}) { + if (!this.isValid) return this; + const o = {}, normalizedUnit = Duration.normalizeUnit(unit); + switch (normalizedUnit) { + case "years": + o.month = 1; + // falls through + case "quarters": + case "months": + o.day = 1; + // falls through + case "weeks": + case "days": + o.hour = 0; + // falls through + case "hours": + o.minute = 0; + // falls through + case "minutes": + o.second = 0; + // falls through + case "seconds": + o.millisecond = 0; + break; + } + if (normalizedUnit === "weeks") { + if (useLocaleWeeks) { + const startOfWeek = this.loc.getStartOfWeek(); + const { + weekday + } = this; + if (weekday < startOfWeek) { + o.weekNumber = this.weekNumber - 1; + } + o.weekday = startOfWeek; + } else { + o.weekday = 1; + } + } + if (normalizedUnit === "quarters") { + const q = Math.ceil(this.month / 3); + o.month = (q - 1) * 3 + 1; + } + return this.set(o); + } + /** + * "Set" this DateTime to the end (meaning the last millisecond) of a unit of time + * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'. + * @param {Object} opts - options + * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week + * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00' + * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00' + * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays + * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00' + * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00' + * @return {DateTime} + */ + endOf(unit, opts) { + return this.isValid ? this.plus({ + [unit]: 1 + }).startOf(unit, opts).minus(1) : this; + } + // OUTPUT + /** + * Returns a string representation of this DateTime formatted according to the specified format string. + * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens). + * Defaults to en-US if no locale has been specified, regardless of the system's locale. + * @param {string} fmt - the format string + * @param {Object} opts - opts to override the configuration options on this DateTime + * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22' + * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22' + * @example DateTime.now().toFormat('yyyy LLL dd', { locale: "fr" }) //=> '2017 avr. 22' + * @example DateTime.now().toFormat("HH 'hours and' mm 'minutes'") //=> '20 hours and 55 minutes' + * @return {string} + */ + toFormat(fmt, opts = {}) { + return this.isValid ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID; + } + /** + * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`. + * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation + * of the DateTime in the assigned locale. + * Defaults to the system's locale if no locale has been specified + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat + * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options + * @param {Object} opts - opts to override the configuration options on this DateTime + * @example DateTime.now().toLocaleString(); //=> 4/20/2017 + * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017' + * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017' + * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022' + * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM' + * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM' + * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20' + * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM' + * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32' + * @return {string} + */ + toLocaleString(formatOpts = DATE_SHORT, opts = {}) { + return this.isValid ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this) : INVALID; + } + /** + * Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output. + * Defaults to the system's locale if no locale has been specified + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts + * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`. + * @example DateTime.now().toLocaleParts(); //=> [ + * //=> { type: 'day', value: '25' }, + * //=> { type: 'literal', value: '/' }, + * //=> { type: 'month', value: '05' }, + * //=> { type: 'literal', value: '/' }, + * //=> { type: 'year', value: '1982' } + * //=> ] + */ + toLocaleParts(opts = {}) { + return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : []; + } + /** + * Returns an ISO 8601-compliant string representation of this DateTime + * @param {Object} opts - options + * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 + * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 + * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' + * @param {boolean} [opts.extendedZone=false] - add the time zone format extension + * @param {string} [opts.format='extended'] - choose between the basic and extended format + * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'years', 'months', 'days', 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0. + * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z' + * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00' + * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335' + * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400' + * @example DateTime.now().toISO({ precision: 'day' }) //=> '2017-04-22Z' + * @example DateTime.now().toISO({ precision: 'minute' }) //=> '2017-04-22T20:47Z' + * @return {string|null} + */ + toISO({ + format = "extended", + suppressSeconds = false, + suppressMilliseconds = false, + includeOffset = true, + extendedZone = false, + precision = "milliseconds" + } = {}) { + if (!this.isValid) { + return null; + } + precision = normalizeUnit(precision); + const ext = format === "extended"; + let c = toISODate(this, ext, precision); + if (orderedUnits.indexOf(precision) >= 3) c += "T"; + c += toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone, precision); + return c; + } + /** + * Returns an ISO 8601-compliant string representation of this DateTime's date component + * @param {Object} opts - options + * @param {string} [opts.format='extended'] - choose between the basic and extended format + * @param {string} [opts.precision='day'] - truncate output to desired precision: 'years', 'months', or 'days'. + * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25' + * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525' + * @example DateTime.utc(1982, 5, 25).toISODate({ precision: 'month' }) //=> '1982-05' + * @return {string|null} + */ + toISODate({ + format = "extended", + precision = "day" + } = {}) { + if (!this.isValid) { + return null; + } + return toISODate(this, format === "extended", normalizeUnit(precision)); + } + /** + * Returns an ISO 8601-compliant string representation of this DateTime's week date + * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2' + * @return {string} + */ + toISOWeekDate() { + return toTechFormat(this, "kkkk-'W'WW-c"); + } + /** + * Returns an ISO 8601-compliant string representation of this DateTime's time component + * @param {Object} opts - options + * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 + * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 + * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' + * @param {boolean} [opts.extendedZone=true] - add the time zone format extension + * @param {boolean} [opts.includePrefix=false] - include the `T` prefix + * @param {string} [opts.format='extended'] - choose between the basic and extended format + * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0. + * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z' + * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z' + * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z' + * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z' + * @example DateTime.utc().set({ hour: 7, minute: 34, second: 56 }).toISOTime({ precision: 'minute' }) //=> '07:34Z' + * @return {string} + */ + toISOTime({ + suppressMilliseconds = false, + suppressSeconds = false, + includeOffset = true, + includePrefix = false, + extendedZone = false, + format = "extended", + precision = "milliseconds" + } = {}) { + if (!this.isValid) { + return null; + } + precision = normalizeUnit(precision); + let c = includePrefix && orderedUnits.indexOf(precision) >= 3 ? "T" : ""; + return c + toISOTime(this, format === "extended", suppressSeconds, suppressMilliseconds, includeOffset, extendedZone, precision); + } + /** + * Returns an RFC 2822-compatible string representation of this DateTime + * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000' + * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400' + * @return {string} + */ + toRFC2822() { + return toTechFormat(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false); + } + /** + * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT. + * Specifically, the string conforms to RFC 1123. + * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 + * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT' + * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT' + * @return {string} + */ + toHTTP() { + return toTechFormat(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'"); + } + /** + * Returns a string representation of this DateTime appropriate for use in SQL Date + * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13' + * @return {string|null} + */ + toSQLDate() { + if (!this.isValid) { + return null; + } + return toISODate(this, true); + } + /** + * Returns a string representation of this DateTime appropriate for use in SQL Time + * @param {Object} opts - options + * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. + * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' + * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00' + * @example DateTime.utc().toSQL() //=> '05:15:16.345' + * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00' + * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345' + * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York' + * @return {string} + */ + toSQLTime({ + includeOffset = true, + includeZone = false, + includeOffsetSpace = true + } = {}) { + let fmt = "HH:mm:ss.SSS"; + if (includeZone || includeOffset) { + if (includeOffsetSpace) { + fmt += " "; + } + if (includeZone) { + fmt += "z"; + } else if (includeOffset) { + fmt += "ZZ"; + } + } + return toTechFormat(this, fmt, true); + } + /** + * Returns a string representation of this DateTime appropriate for use in SQL DateTime + * @param {Object} opts - options + * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. + * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' + * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00' + * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z' + * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00' + * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000' + * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York' + * @return {string} + */ + toSQL(opts = {}) { + if (!this.isValid) { + return null; + } + return `${this.toSQLDate()} ${this.toSQLTime(opts)}`; + } + /** + * Returns a string representation of this DateTime appropriate for debugging + * @return {string} + */ + toString() { + return this.isValid ? this.toISO() : INVALID; + } + /** + * Returns a string representation of this DateTime appropriate for the REPL. + * @return {string} + */ + [Symbol.for("nodejs.util.inspect.custom")]() { + if (this.isValid) { + return `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`; + } else { + return `DateTime { Invalid, reason: ${this.invalidReason} }`; + } + } + /** + * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis} + * @return {number} + */ + valueOf() { + return this.toMillis(); + } + /** + * Returns the epoch milliseconds of this DateTime. + * @return {number} + */ + toMillis() { + return this.isValid ? this.ts : NaN; + } + /** + * Returns the epoch seconds (including milliseconds in the fractional part) of this DateTime. + * @return {number} + */ + toSeconds() { + return this.isValid ? this.ts / 1e3 : NaN; + } + /** + * Returns the epoch seconds (as a whole number) of this DateTime. + * @return {number} + */ + toUnixInteger() { + return this.isValid ? Math.floor(this.ts / 1e3) : NaN; + } + /** + * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON. + * @return {string} + */ + toJSON() { + return this.toISO(); + } + /** + * Returns a BSON serializable equivalent to this DateTime. + * @return {Date} + */ + toBSON() { + return this.toJSDate(); + } + /** + * Returns a JavaScript object with this DateTime's year, month, day, and so on. + * @param opts - options for generating the object + * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output + * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 } + * @return {Object} + */ + toObject(opts = {}) { + if (!this.isValid) return {}; + const base = { + ...this.c + }; + if (opts.includeConfig) { + base.outputCalendar = this.outputCalendar; + base.numberingSystem = this.loc.numberingSystem; + base.locale = this.loc.locale; + } + return base; + } + /** + * Returns a JavaScript Date equivalent to this DateTime. + * @return {Date} + */ + toJSDate() { + return new Date(this.isValid ? this.ts : NaN); + } + // COMPARE + /** + * Return the difference between two DateTimes as a Duration. + * @param {DateTime} otherDateTime - the DateTime to compare this one to + * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration. + * @param {Object} opts - options that affect the creation of the Duration + * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use + * @example + * var i1 = DateTime.fromISO('1982-05-25T09:45'), + * i2 = DateTime.fromISO('1983-10-14T10:30'); + * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 } + * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 } + * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 } + * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 } + * @return {Duration} + */ + diff(otherDateTime, unit = "milliseconds", opts = {}) { + if (!this.isValid || !otherDateTime.isValid) { + return Duration.invalid("created by diffing an invalid DateTime"); + } + const durOpts = { + locale: this.locale, + numberingSystem: this.numberingSystem, + ...opts + }; + const units = maybeArray(unit).map(Duration.normalizeUnit), otherIsLater = otherDateTime.valueOf() > this.valueOf(), earlier = otherIsLater ? this : otherDateTime, later = otherIsLater ? otherDateTime : this, diffed = diff(earlier, later, units, durOpts); + return otherIsLater ? diffed.negate() : diffed; + } + /** + * Return the difference between this DateTime and right now. + * See {@link DateTime#diff} + * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration + * @param {Object} opts - options that affect the creation of the Duration + * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use + * @return {Duration} + */ + diffNow(unit = "milliseconds", opts = {}) { + return this.diff(_DateTime.now(), unit, opts); + } + /** + * Return an Interval spanning between this DateTime and another DateTime + * @param {DateTime} otherDateTime - the other end point of the Interval + * @return {Interval|DateTime} + */ + until(otherDateTime) { + return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this; + } + /** + * Return whether this DateTime is in the same unit of time as another DateTime. + * Higher-order units must also be identical for this function to return `true`. + * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed. + * @param {DateTime} otherDateTime - the other DateTime + * @param {string} unit - the unit of time to check sameness on + * @param {Object} opts - options + * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used + * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day + * @return {boolean} + */ + hasSame(otherDateTime, unit, opts) { + if (!this.isValid) return false; + const inputMs = otherDateTime.valueOf(); + const adjustedToZone = this.setZone(otherDateTime.zone, { + keepLocalTime: true + }); + return adjustedToZone.startOf(unit, opts) <= inputMs && inputMs <= adjustedToZone.endOf(unit, opts); + } + /** + * Equality check + * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid. + * To compare just the millisecond values, use `+dt1 === +dt2`. + * @param {DateTime} other - the other DateTime + * @return {boolean} + */ + equals(other) { + return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc); + } + /** + * Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your + * platform supports Intl.RelativeTimeFormat. Rounds towards zero by default. + * @param {Object} options - options that affect the output + * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now. + * @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow" + * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds" + * @param {boolean} [options.round=true] - whether to round the numbers in the output. + * @param {string} [options.rounding="trunc"] - rounding method to use when rounding the numbers in the output. Can be "trunc" (toward zero), "expand" (away from zero), "round", "floor", or "ceil". + * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding. + * @param {string} options.locale - override the locale of this DateTime + * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this + * @example DateTime.now().plus({ days: 1 }).toRelative() //=> "in 1 day" + * @example DateTime.now().setLocale("es").toRelative({ days: 1 }) //=> "dentro de 1 día" + * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: "fr" }) //=> "dans 23 heures" + * @example DateTime.now().minus({ days: 2 }).toRelative() //=> "2 days ago" + * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: "hours" }) //=> "48 hours ago" + * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> "1.5 days ago" + */ + toRelative(options = {}) { + if (!this.isValid) return null; + const base = options.base || _DateTime.fromObject({}, { + zone: this.zone + }), padding = options.padding ? this < base ? -options.padding : options.padding : 0; + let units = ["years", "months", "days", "hours", "minutes", "seconds"]; + let unit = options.unit; + if (Array.isArray(options.unit)) { + units = options.unit; + unit = void 0; + } + return diffRelative(base, this.plus(padding), { + ...options, + numeric: "always", + units, + unit + }); + } + /** + * Returns a string representation of this date relative to today, such as "yesterday" or "next month". + * Only internationalizes on platforms that supports Intl.RelativeTimeFormat. + * @param {Object} options - options that affect the output + * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now. + * @param {string} options.locale - override the locale of this DateTime + * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", or "days" + * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this + * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> "tomorrow" + * @example DateTime.now().setLocale("es").plus({ days: 1 }).toRelative() //=> ""mañana" + * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: "fr" }) //=> "demain" + * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago" + */ + toRelativeCalendar(options = {}) { + if (!this.isValid) return null; + return diffRelative(options.base || _DateTime.fromObject({}, { + zone: this.zone + }), this, { + ...options, + numeric: "auto", + units: ["years", "months", "days"], + calendary: true + }); + } + /** + * Return the min of several date times + * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum + * @return {DateTime} the min DateTime, or undefined if called with no argument + */ + static min(...dateTimes) { + if (!dateTimes.every(_DateTime.isDateTime)) { + throw new InvalidArgumentError("min requires all arguments be DateTimes"); + } + return bestBy(dateTimes, (i) => i.valueOf(), Math.min); + } + /** + * Return the max of several date times + * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum + * @return {DateTime} the max DateTime, or undefined if called with no argument + */ + static max(...dateTimes) { + if (!dateTimes.every(_DateTime.isDateTime)) { + throw new InvalidArgumentError("max requires all arguments be DateTimes"); + } + return bestBy(dateTimes, (i) => i.valueOf(), Math.max); + } + // MISC + /** + * Explain how a string would be parsed by fromFormat() + * @param {string} text - the string to parse + * @param {string} fmt - the format the string is expected to be in (see description) + * @param {Object} options - options taken by fromFormat() + * @return {Object} + */ + static fromFormatExplain(text, fmt, options = {}) { + const { + locale = null, + numberingSystem = null + } = options, localeToUse = Locale.fromOpts({ + locale, + numberingSystem, + defaultToEN: true + }); + return explainFromTokens(localeToUse, text, fmt); + } + /** + * @deprecated use fromFormatExplain instead + */ + static fromStringExplain(text, fmt, options = {}) { + return _DateTime.fromFormatExplain(text, fmt, options); + } + /** + * Build a parser for `fmt` using the given locale. This parser can be passed + * to {@link DateTime.fromFormatParser} to a parse a date in this format. This + * can be used to optimize cases where many dates need to be parsed in a + * specific format. + * + * @param {String} fmt - the format the string is expected to be in (see + * description) + * @param {Object} options - options used to set locale and numberingSystem + * for parser + * @returns {TokenParser} - opaque object to be used + */ + static buildFormatParser(fmt, options = {}) { + const { + locale = null, + numberingSystem = null + } = options, localeToUse = Locale.fromOpts({ + locale, + numberingSystem, + defaultToEN: true + }); + return new TokenParser(localeToUse, fmt); + } + /** + * Create a DateTime from an input string and format parser. + * + * The format parser must have been created with the same locale as this call. + * + * @param {String} text - the string to parse + * @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser} + * @param {Object} opts - options taken by fromFormat() + * @returns {DateTime} + */ + static fromFormatParser(text, formatParser, opts = {}) { + if (isUndefined(text) || isUndefined(formatParser)) { + throw new InvalidArgumentError("fromFormatParser requires an input string and a format parser"); + } + const { + locale = null, + numberingSystem = null + } = opts, localeToUse = Locale.fromOpts({ + locale, + numberingSystem, + defaultToEN: true + }); + if (!localeToUse.equals(formatParser.locale)) { + throw new InvalidArgumentError(`fromFormatParser called with a locale of ${localeToUse}, but the format parser was created for ${formatParser.locale}`); + } + const { + result, + zone, + specificOffset, + invalidReason + } = formatParser.explainFromTokens(text); + if (invalidReason) { + return _DateTime.invalid(invalidReason); + } else { + return parseDataToDateTime(result, zone, opts, `format ${formatParser.format}`, text, specificOffset); + } + } + // FORMAT PRESETS + /** + * {@link DateTime#toLocaleString} format like 10/14/1983 + * @type {Object} + */ + static get DATE_SHORT() { + return DATE_SHORT; + } + /** + * {@link DateTime#toLocaleString} format like 'Oct 14, 1983' + * @type {Object} + */ + static get DATE_MED() { + return DATE_MED; + } + /** + * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983' + * @type {Object} + */ + static get DATE_MED_WITH_WEEKDAY() { + return DATE_MED_WITH_WEEKDAY; + } + /** + * {@link DateTime#toLocaleString} format like 'October 14, 1983' + * @type {Object} + */ + static get DATE_FULL() { + return DATE_FULL; + } + /** + * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983' + * @type {Object} + */ + static get DATE_HUGE() { + return DATE_HUGE; + } + /** + * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get TIME_SIMPLE() { + return TIME_SIMPLE; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get TIME_WITH_SECONDS() { + return TIME_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is. + * @type {Object} + */ + static get TIME_WITH_SHORT_OFFSET() { + return TIME_WITH_SHORT_OFFSET; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is. + * @type {Object} + */ + static get TIME_WITH_LONG_OFFSET() { + return TIME_WITH_LONG_OFFSET; + } + /** + * {@link DateTime#toLocaleString} format like '09:30', always 24-hour. + * @type {Object} + */ + static get TIME_24_SIMPLE() { + return TIME_24_SIMPLE; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour. + * @type {Object} + */ + static get TIME_24_WITH_SECONDS() { + return TIME_24_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour. + * @type {Object} + */ + static get TIME_24_WITH_SHORT_OFFSET() { + return TIME_24_WITH_SHORT_OFFSET; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour. + * @type {Object} + */ + static get TIME_24_WITH_LONG_OFFSET() { + return TIME_24_WITH_LONG_OFFSET; + } + /** + * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_SHORT() { + return DATETIME_SHORT; + } + /** + * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_SHORT_WITH_SECONDS() { + return DATETIME_SHORT_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_MED() { + return DATETIME_MED; + } + /** + * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_MED_WITH_SECONDS() { + return DATETIME_MED_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_MED_WITH_WEEKDAY() { + return DATETIME_MED_WITH_WEEKDAY; + } + /** + * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_FULL() { + return DATETIME_FULL; + } + /** + * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_FULL_WITH_SECONDS() { + return DATETIME_FULL_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_HUGE() { + return DATETIME_HUGE; + } + /** + * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_HUGE_WITH_SECONDS() { + return DATETIME_HUGE_WITH_SECONDS; + } + }; + function friendlyDateTime(dateTimeish) { + if (DateTime.isDateTime(dateTimeish)) { + return dateTimeish; + } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) { + return DateTime.fromJSDate(dateTimeish); + } else if (dateTimeish && typeof dateTimeish === "object") { + return DateTime.fromObject(dateTimeish); + } else { + throw new InvalidArgumentError(`Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`); + } + } + var VERSION = "3.7.2"; + exports2.DateTime = DateTime; + exports2.Duration = Duration; + exports2.FixedOffsetZone = FixedOffsetZone; + exports2.IANAZone = IANAZone; + exports2.Info = Info; + exports2.Interval = Interval; + exports2.InvalidZone = InvalidZone; + exports2.Settings = Settings; + exports2.SystemZone = SystemZone; + exports2.VERSION = VERSION; + exports2.Zone = Zone; + } +}); + +// ../../node_modules/.pnpm/cron-parser@4.9.0/node_modules/cron-parser/lib/date.js +var require_date = __commonJS({ + "../../node_modules/.pnpm/cron-parser@4.9.0/node_modules/cron-parser/lib/date.js"(exports2, module2) { + "use strict"; + var luxon = require_luxon(); + CronDate.prototype.addYear = function() { + this._date = this._date.plus({ years: 1 }); + }; + CronDate.prototype.addMonth = function() { + this._date = this._date.plus({ months: 1 }).startOf("month"); + }; + CronDate.prototype.addDay = function() { + this._date = this._date.plus({ days: 1 }).startOf("day"); + }; + CronDate.prototype.addHour = function() { + var prev = this._date; + this._date = this._date.plus({ hours: 1 }).startOf("hour"); + if (this._date <= prev) { + this._date = this._date.plus({ hours: 1 }); + } + }; + CronDate.prototype.addMinute = function() { + var prev = this._date; + this._date = this._date.plus({ minutes: 1 }).startOf("minute"); + if (this._date < prev) { + this._date = this._date.plus({ hours: 1 }); + } + }; + CronDate.prototype.addSecond = function() { + var prev = this._date; + this._date = this._date.plus({ seconds: 1 }).startOf("second"); + if (this._date < prev) { + this._date = this._date.plus({ hours: 1 }); + } + }; + CronDate.prototype.subtractYear = function() { + this._date = this._date.minus({ years: 1 }); + }; + CronDate.prototype.subtractMonth = function() { + this._date = this._date.minus({ months: 1 }).endOf("month").startOf("second"); + }; + CronDate.prototype.subtractDay = function() { + this._date = this._date.minus({ days: 1 }).endOf("day").startOf("second"); + }; + CronDate.prototype.subtractHour = function() { + var prev = this._date; + this._date = this._date.minus({ hours: 1 }).endOf("hour").startOf("second"); + if (this._date >= prev) { + this._date = this._date.minus({ hours: 1 }); + } + }; + CronDate.prototype.subtractMinute = function() { + var prev = this._date; + this._date = this._date.minus({ minutes: 1 }).endOf("minute").startOf("second"); + if (this._date > prev) { + this._date = this._date.minus({ hours: 1 }); + } + }; + CronDate.prototype.subtractSecond = function() { + var prev = this._date; + this._date = this._date.minus({ seconds: 1 }).startOf("second"); + if (this._date > prev) { + this._date = this._date.minus({ hours: 1 }); + } + }; + CronDate.prototype.getDate = function() { + return this._date.day; + }; + CronDate.prototype.getFullYear = function() { + return this._date.year; + }; + CronDate.prototype.getDay = function() { + var weekday = this._date.weekday; + return weekday == 7 ? 0 : weekday; + }; + CronDate.prototype.getMonth = function() { + return this._date.month - 1; + }; + CronDate.prototype.getHours = function() { + return this._date.hour; + }; + CronDate.prototype.getMinutes = function() { + return this._date.minute; + }; + CronDate.prototype.getSeconds = function() { + return this._date.second; + }; + CronDate.prototype.getMilliseconds = function() { + return this._date.millisecond; + }; + CronDate.prototype.getTime = function() { + return this._date.valueOf(); + }; + CronDate.prototype.getUTCDate = function() { + return this._getUTC().day; + }; + CronDate.prototype.getUTCFullYear = function() { + return this._getUTC().year; + }; + CronDate.prototype.getUTCDay = function() { + var weekday = this._getUTC().weekday; + return weekday == 7 ? 0 : weekday; + }; + CronDate.prototype.getUTCMonth = function() { + return this._getUTC().month - 1; + }; + CronDate.prototype.getUTCHours = function() { + return this._getUTC().hour; + }; + CronDate.prototype.getUTCMinutes = function() { + return this._getUTC().minute; + }; + CronDate.prototype.getUTCSeconds = function() { + return this._getUTC().second; + }; + CronDate.prototype.toISOString = function() { + return this._date.toUTC().toISO(); + }; + CronDate.prototype.toJSON = function() { + return this._date.toJSON(); + }; + CronDate.prototype.setDate = function(d) { + this._date = this._date.set({ day: d }); + }; + CronDate.prototype.setFullYear = function(y) { + this._date = this._date.set({ year: y }); + }; + CronDate.prototype.setDay = function(d) { + this._date = this._date.set({ weekday: d }); + }; + CronDate.prototype.setMonth = function(m) { + this._date = this._date.set({ month: m + 1 }); + }; + CronDate.prototype.setHours = function(h) { + this._date = this._date.set({ hour: h }); + }; + CronDate.prototype.setMinutes = function(m) { + this._date = this._date.set({ minute: m }); + }; + CronDate.prototype.setSeconds = function(s) { + this._date = this._date.set({ second: s }); + }; + CronDate.prototype.setMilliseconds = function(s) { + this._date = this._date.set({ millisecond: s }); + }; + CronDate.prototype._getUTC = function() { + return this._date.toUTC(); + }; + CronDate.prototype.toString = function() { + return this.toDate().toString(); + }; + CronDate.prototype.toDate = function() { + return this._date.toJSDate(); + }; + CronDate.prototype.isLastDayOfMonth = function() { + var newDate = this._date.plus({ days: 1 }).startOf("day"); + return this._date.month !== newDate.month; + }; + CronDate.prototype.isLastWeekdayOfMonth = function() { + var newDate = this._date.plus({ days: 7 }).startOf("day"); + return this._date.month !== newDate.month; + }; + function CronDate(timestamp, tz) { + var dateOpts = { zone: tz }; + if (!timestamp) { + this._date = luxon.DateTime.local(); + } else if (timestamp instanceof CronDate) { + this._date = timestamp._date; + } else if (timestamp instanceof Date) { + this._date = luxon.DateTime.fromJSDate(timestamp, dateOpts); + } else if (typeof timestamp === "number") { + this._date = luxon.DateTime.fromMillis(timestamp, dateOpts); + } else if (typeof timestamp === "string") { + this._date = luxon.DateTime.fromISO(timestamp, dateOpts); + this._date.isValid || (this._date = luxon.DateTime.fromRFC2822(timestamp, dateOpts)); + this._date.isValid || (this._date = luxon.DateTime.fromSQL(timestamp, dateOpts)); + this._date.isValid || (this._date = luxon.DateTime.fromFormat(timestamp, "EEE, d MMM yyyy HH:mm:ss", dateOpts)); + } + if (!this._date || !this._date.isValid) { + throw new Error("CronDate: unhandled timestamp: " + JSON.stringify(timestamp)); + } + if (tz && tz !== this._date.zoneName) { + this._date = this._date.setZone(tz); + } + } + module2.exports = CronDate; + } +}); + +// ../../node_modules/.pnpm/cron-parser@4.9.0/node_modules/cron-parser/lib/field_compactor.js +var require_field_compactor = __commonJS({ + "../../node_modules/.pnpm/cron-parser@4.9.0/node_modules/cron-parser/lib/field_compactor.js"(exports2, module2) { + "use strict"; + function buildRange(item) { + return { + start: item, + count: 1 + }; + } + function completeRangeWithItem(range, item) { + range.end = item; + range.step = item - range.start; + range.count = 2; + } + function finalizeCurrentRange(results, currentRange, currentItemRange) { + if (currentRange) { + if (currentRange.count === 2) { + results.push(buildRange(currentRange.start)); + results.push(buildRange(currentRange.end)); + } else { + results.push(currentRange); + } + } + if (currentItemRange) { + results.push(currentItemRange); + } + } + function compactField(arr) { + var results = []; + var currentRange = void 0; + for (var i = 0; i < arr.length; i++) { + var currentItem = arr[i]; + if (typeof currentItem !== "number") { + finalizeCurrentRange(results, currentRange, buildRange(currentItem)); + currentRange = void 0; + } else if (!currentRange) { + currentRange = buildRange(currentItem); + } else if (currentRange.count === 1) { + completeRangeWithItem(currentRange, currentItem); + } else { + if (currentRange.step === currentItem - currentRange.end) { + currentRange.count++; + currentRange.end = currentItem; + } else if (currentRange.count === 2) { + results.push(buildRange(currentRange.start)); + currentRange = buildRange(currentRange.end); + completeRangeWithItem(currentRange, currentItem); + } else { + finalizeCurrentRange(results, currentRange); + currentRange = buildRange(currentItem); + } + } + } + finalizeCurrentRange(results, currentRange); + return results; + } + module2.exports = compactField; + } +}); + +// ../../node_modules/.pnpm/cron-parser@4.9.0/node_modules/cron-parser/lib/field_stringify.js +var require_field_stringify = __commonJS({ + "../../node_modules/.pnpm/cron-parser@4.9.0/node_modules/cron-parser/lib/field_stringify.js"(exports2, module2) { + "use strict"; + var compactField = require_field_compactor(); + function stringifyField(arr, min, max) { + var ranges = compactField(arr); + if (ranges.length === 1) { + var singleRange = ranges[0]; + var step = singleRange.step; + if (step === 1 && singleRange.start === min && singleRange.end === max) { + return "*"; + } + if (step !== 1 && singleRange.start === min && singleRange.end === max - step + 1) { + return "*/" + step; + } + } + var result = []; + for (var i = 0, l2 = ranges.length; i < l2; ++i) { + var range = ranges[i]; + if (range.count === 1) { + result.push(range.start); + continue; + } + var step = range.step; + if (range.step === 1) { + result.push(range.start + "-" + range.end); + continue; + } + var multiplier = range.start == 0 ? range.count - 1 : range.count; + if (range.step * multiplier > range.end) { + result = result.concat( + Array.from({ length: range.end - range.start + 1 }).map(function(_2, index) { + var value = range.start + index; + if ((value - range.start) % range.step === 0) { + return value; + } + return null; + }).filter(function(value) { + return value != null; + }) + ); + } else if (range.end === max - range.step + 1) { + result.push(range.start + "/" + range.step); + } else { + result.push(range.start + "-" + range.end + "/" + range.step); + } + } + return result.join(","); + } + module2.exports = stringifyField; + } +}); + +// ../../node_modules/.pnpm/cron-parser@4.9.0/node_modules/cron-parser/lib/expression.js +var require_expression = __commonJS({ + "../../node_modules/.pnpm/cron-parser@4.9.0/node_modules/cron-parser/lib/expression.js"(exports2, module2) { + "use strict"; + var CronDate = require_date(); + var stringifyField = require_field_stringify(); + var LOOP_LIMIT = 1e4; + function CronExpression(fields, options) { + this._options = options; + this._utc = options.utc || false; + this._tz = this._utc ? "UTC" : options.tz; + this._currentDate = new CronDate(options.currentDate, this._tz); + this._startDate = options.startDate ? new CronDate(options.startDate, this._tz) : null; + this._endDate = options.endDate ? new CronDate(options.endDate, this._tz) : null; + this._isIterator = options.iterator || false; + this._hasIterated = false; + this._nthDayOfWeek = options.nthDayOfWeek || 0; + this.fields = CronExpression._freezeFields(fields); + } + CronExpression.map = ["second", "minute", "hour", "dayOfMonth", "month", "dayOfWeek"]; + CronExpression.predefined = { + "@yearly": "0 0 1 1 *", + "@monthly": "0 0 1 * *", + "@weekly": "0 0 * * 0", + "@daily": "0 0 * * *", + "@hourly": "0 * * * *" + }; + CronExpression.constraints = [ + { min: 0, max: 59, chars: [] }, + // Second + { min: 0, max: 59, chars: [] }, + // Minute + { min: 0, max: 23, chars: [] }, + // Hour + { min: 1, max: 31, chars: ["L"] }, + // Day of month + { min: 1, max: 12, chars: [] }, + // Month + { min: 0, max: 7, chars: ["L"] } + // Day of week + ]; + CronExpression.daysInMonth = [ + 31, + 29, + 31, + 30, + 31, + 30, + 31, + 31, + 30, + 31, + 30, + 31 + ]; + CronExpression.aliases = { + month: { + jan: 1, + feb: 2, + mar: 3, + apr: 4, + may: 5, + jun: 6, + jul: 7, + aug: 8, + sep: 9, + oct: 10, + nov: 11, + dec: 12 + }, + dayOfWeek: { + sun: 0, + mon: 1, + tue: 2, + wed: 3, + thu: 4, + fri: 5, + sat: 6 + } + }; + CronExpression.parseDefaults = ["0", "*", "*", "*", "*", "*"]; + CronExpression.standardValidCharacters = /^[,*\d/-]+$/; + CronExpression.dayOfWeekValidCharacters = /^[?,*\dL#/-]+$/; + CronExpression.dayOfMonthValidCharacters = /^[?,*\dL/-]+$/; + CronExpression.validCharacters = { + second: CronExpression.standardValidCharacters, + minute: CronExpression.standardValidCharacters, + hour: CronExpression.standardValidCharacters, + dayOfMonth: CronExpression.dayOfMonthValidCharacters, + month: CronExpression.standardValidCharacters, + dayOfWeek: CronExpression.dayOfWeekValidCharacters + }; + CronExpression._isValidConstraintChar = function _isValidConstraintChar(constraints, value) { + if (typeof value !== "string") { + return false; + } + return constraints.chars.some(function(char) { + return value.indexOf(char) > -1; + }); + }; + CronExpression._parseField = function _parseField(field, value, constraints) { + switch (field) { + case "month": + case "dayOfWeek": + var aliases = CronExpression.aliases[field]; + value = value.replace(/[a-z]{3}/gi, function(match) { + match = match.toLowerCase(); + if (typeof aliases[match] !== "undefined") { + return aliases[match]; + } else { + throw new Error('Validation error, cannot resolve alias "' + match + '"'); + } + }); + break; + } + if (!CronExpression.validCharacters[field].test(value)) { + throw new Error("Invalid characters, got value: " + value); + } + if (value.indexOf("*") !== -1) { + value = value.replace(/\*/g, constraints.min + "-" + constraints.max); + } else if (value.indexOf("?") !== -1) { + value = value.replace(/\?/g, constraints.min + "-" + constraints.max); + } + function parseSequence(val) { + var stack = []; + function handleResult(result) { + if (result instanceof Array) { + for (var i2 = 0, c2 = result.length; i2 < c2; i2++) { + var value2 = result[i2]; + if (CronExpression._isValidConstraintChar(constraints, value2)) { + stack.push(value2); + continue; + } + if (typeof value2 !== "number" || Number.isNaN(value2) || value2 < constraints.min || value2 > constraints.max) { + throw new Error( + "Constraint error, got value " + value2 + " expected range " + constraints.min + "-" + constraints.max + ); + } + stack.push(value2); + } + } else { + if (CronExpression._isValidConstraintChar(constraints, result)) { + stack.push(result); + return; + } + var numResult = +result; + if (Number.isNaN(numResult) || numResult < constraints.min || numResult > constraints.max) { + throw new Error( + "Constraint error, got value " + result + " expected range " + constraints.min + "-" + constraints.max + ); + } + if (field === "dayOfWeek") { + numResult = numResult % 7; + } + stack.push(numResult); + } + } + var atoms = val.split(","); + if (!atoms.every(function(atom) { + return atom.length > 0; + })) { + throw new Error("Invalid list value format"); + } + if (atoms.length > 1) { + for (var i = 0, c = atoms.length; i < c; i++) { + handleResult(parseRepeat(atoms[i])); + } + } else { + handleResult(parseRepeat(val)); + } + stack.sort(CronExpression._sortCompareFn); + return stack; + } + function parseRepeat(val) { + var repeatInterval = 1; + var atoms = val.split("/"); + if (atoms.length > 2) { + throw new Error("Invalid repeat: " + val); + } + if (atoms.length > 1) { + if (atoms[0] == +atoms[0]) { + atoms = [atoms[0] + "-" + constraints.max, atoms[1]]; + } + return parseRange(atoms[0], atoms[atoms.length - 1]); + } + return parseRange(val, repeatInterval); + } + function parseRange(val, repeatInterval) { + var stack = []; + var atoms = val.split("-"); + if (atoms.length > 1) { + if (atoms.length < 2) { + return +val; + } + if (!atoms[0].length) { + if (!atoms[1].length) { + throw new Error("Invalid range: " + val); + } + return +val; + } + var min = +atoms[0]; + var max = +atoms[1]; + if (Number.isNaN(min) || Number.isNaN(max) || min < constraints.min || max > constraints.max) { + throw new Error( + "Constraint error, got range " + min + "-" + max + " expected range " + constraints.min + "-" + constraints.max + ); + } else if (min > max) { + throw new Error("Invalid range: " + val); + } + var repeatIndex = +repeatInterval; + if (Number.isNaN(repeatIndex) || repeatIndex <= 0) { + throw new Error("Constraint error, cannot repeat at every " + repeatIndex + " time."); + } + if (field === "dayOfWeek" && max % 7 === 0) { + stack.push(0); + } + for (var index = min, count = max; index <= count; index++) { + var exists = stack.indexOf(index) !== -1; + if (!exists && repeatIndex > 0 && repeatIndex % repeatInterval === 0) { + repeatIndex = 1; + stack.push(index); + } else { + repeatIndex++; + } + } + return stack; + } + return Number.isNaN(+val) ? val : +val; + } + return parseSequence(value); + }; + CronExpression._sortCompareFn = function(a, b) { + var aIsNumber = typeof a === "number"; + var bIsNumber = typeof b === "number"; + if (aIsNumber && bIsNumber) { + return a - b; + } + if (!aIsNumber && bIsNumber) { + return 1; + } + if (aIsNumber && !bIsNumber) { + return -1; + } + return a.localeCompare(b); + }; + CronExpression._handleMaxDaysInMonth = function(mappedFields) { + if (mappedFields.month.length === 1) { + var daysInMonth = CronExpression.daysInMonth[mappedFields.month[0] - 1]; + if (mappedFields.dayOfMonth[0] > daysInMonth) { + throw new Error("Invalid explicit day of month definition"); + } + return mappedFields.dayOfMonth.filter(function(dayOfMonth) { + return dayOfMonth === "L" ? true : dayOfMonth <= daysInMonth; + }).sort(CronExpression._sortCompareFn); + } + }; + CronExpression._freezeFields = function(fields) { + for (var i = 0, c = CronExpression.map.length; i < c; ++i) { + var field = CronExpression.map[i]; + var value = fields[field]; + fields[field] = Object.freeze(value); + } + return Object.freeze(fields); + }; + CronExpression.prototype._applyTimezoneShift = function(currentDate, dateMathVerb, method) { + if (method === "Month" || method === "Day") { + var prevTime = currentDate.getTime(); + currentDate[dateMathVerb + method](); + var currTime = currentDate.getTime(); + if (prevTime === currTime) { + if (currentDate.getMinutes() === 0 && currentDate.getSeconds() === 0) { + currentDate.addHour(); + } else if (currentDate.getMinutes() === 59 && currentDate.getSeconds() === 59) { + currentDate.subtractHour(); + } + } + } else { + var previousHour = currentDate.getHours(); + currentDate[dateMathVerb + method](); + var currentHour = currentDate.getHours(); + var diff = currentHour - previousHour; + if (diff === 2) { + if (this.fields.hour.length !== 24) { + this._dstStart = currentHour; + } + } else if (diff === 0 && currentDate.getMinutes() === 0 && currentDate.getSeconds() === 0) { + if (this.fields.hour.length !== 24) { + this._dstEnd = currentHour; + } + } + } + }; + CronExpression.prototype._findSchedule = function _findSchedule(reverse) { + function matchSchedule(value, sequence) { + for (var i = 0, c = sequence.length; i < c; i++) { + if (sequence[i] >= value) { + return sequence[i] === value; + } + } + return sequence[0] === value; + } + function isNthDayMatch(date, nthDayOfWeek) { + if (nthDayOfWeek < 6) { + if (date.getDate() < 8 && nthDayOfWeek === 1) { + return true; + } + var offset = date.getDate() % 7 ? 1 : 0; + var adjustedDate = date.getDate() - date.getDate() % 7; + var occurrence = Math.floor(adjustedDate / 7) + offset; + return occurrence === nthDayOfWeek; + } + return false; + } + function isLInExpressions(expressions) { + return expressions.length > 0 && expressions.some(function(expression) { + return typeof expression === "string" && expression.indexOf("L") >= 0; + }); + } + reverse = reverse || false; + var dateMathVerb = reverse ? "subtract" : "add"; + var currentDate = new CronDate(this._currentDate, this._tz); + var startDate = this._startDate; + var endDate = this._endDate; + var startTimestamp = currentDate.getTime(); + var stepCount = 0; + function isLastWeekdayOfMonthMatch(expressions) { + return expressions.some(function(expression) { + if (!isLInExpressions([expression])) { + return false; + } + var weekday = Number.parseInt(expression[0]) % 7; + if (Number.isNaN(weekday)) { + throw new Error("Invalid last weekday of the month expression: " + expression); + } + return currentDate.getDay() === weekday && currentDate.isLastWeekdayOfMonth(); + }); + } + while (stepCount < LOOP_LIMIT) { + stepCount++; + if (reverse) { + if (startDate && currentDate.getTime() - startDate.getTime() < 0) { + throw new Error("Out of the timespan range"); + } + } else { + if (endDate && endDate.getTime() - currentDate.getTime() < 0) { + throw new Error("Out of the timespan range"); + } + } + var dayOfMonthMatch = matchSchedule(currentDate.getDate(), this.fields.dayOfMonth); + if (isLInExpressions(this.fields.dayOfMonth)) { + dayOfMonthMatch = dayOfMonthMatch || currentDate.isLastDayOfMonth(); + } + var dayOfWeekMatch = matchSchedule(currentDate.getDay(), this.fields.dayOfWeek); + if (isLInExpressions(this.fields.dayOfWeek)) { + dayOfWeekMatch = dayOfWeekMatch || isLastWeekdayOfMonthMatch(this.fields.dayOfWeek); + } + var isDayOfMonthWildcardMatch = this.fields.dayOfMonth.length >= CronExpression.daysInMonth[currentDate.getMonth()]; + var isDayOfWeekWildcardMatch = this.fields.dayOfWeek.length === CronExpression.constraints[5].max - CronExpression.constraints[5].min + 1; + var currentHour = currentDate.getHours(); + if (!dayOfMonthMatch && (!dayOfWeekMatch || isDayOfWeekWildcardMatch)) { + this._applyTimezoneShift(currentDate, dateMathVerb, "Day"); + continue; + } + if (!isDayOfMonthWildcardMatch && isDayOfWeekWildcardMatch && !dayOfMonthMatch) { + this._applyTimezoneShift(currentDate, dateMathVerb, "Day"); + continue; + } + if (isDayOfMonthWildcardMatch && !isDayOfWeekWildcardMatch && !dayOfWeekMatch) { + this._applyTimezoneShift(currentDate, dateMathVerb, "Day"); + continue; + } + if (this._nthDayOfWeek > 0 && !isNthDayMatch(currentDate, this._nthDayOfWeek)) { + this._applyTimezoneShift(currentDate, dateMathVerb, "Day"); + continue; + } + if (!matchSchedule(currentDate.getMonth() + 1, this.fields.month)) { + this._applyTimezoneShift(currentDate, dateMathVerb, "Month"); + continue; + } + if (!matchSchedule(currentHour, this.fields.hour)) { + if (this._dstStart !== currentHour) { + this._dstStart = null; + this._applyTimezoneShift(currentDate, dateMathVerb, "Hour"); + continue; + } else if (!matchSchedule(currentHour - 1, this.fields.hour)) { + currentDate[dateMathVerb + "Hour"](); + continue; + } + } else if (this._dstEnd === currentHour) { + if (!reverse) { + this._dstEnd = null; + this._applyTimezoneShift(currentDate, "add", "Hour"); + continue; + } + } + if (!matchSchedule(currentDate.getMinutes(), this.fields.minute)) { + this._applyTimezoneShift(currentDate, dateMathVerb, "Minute"); + continue; + } + if (!matchSchedule(currentDate.getSeconds(), this.fields.second)) { + this._applyTimezoneShift(currentDate, dateMathVerb, "Second"); + continue; + } + if (startTimestamp === currentDate.getTime()) { + if (dateMathVerb === "add" || currentDate.getMilliseconds() === 0) { + this._applyTimezoneShift(currentDate, dateMathVerb, "Second"); + } else { + currentDate.setMilliseconds(0); + } + continue; + } + break; + } + if (stepCount >= LOOP_LIMIT) { + throw new Error("Invalid expression, loop limit exceeded"); + } + this._currentDate = new CronDate(currentDate, this._tz); + this._hasIterated = true; + return currentDate; + }; + CronExpression.prototype.next = function next() { + var schedule = this._findSchedule(); + if (this._isIterator) { + return { + value: schedule, + done: !this.hasNext() + }; + } + return schedule; + }; + CronExpression.prototype.prev = function prev() { + var schedule = this._findSchedule(true); + if (this._isIterator) { + return { + value: schedule, + done: !this.hasPrev() + }; + } + return schedule; + }; + CronExpression.prototype.hasNext = function() { + var current = this._currentDate; + var hasIterated = this._hasIterated; + try { + this._findSchedule(); + return true; + } catch (err) { + return false; + } finally { + this._currentDate = current; + this._hasIterated = hasIterated; + } + }; + CronExpression.prototype.hasPrev = function() { + var current = this._currentDate; + var hasIterated = this._hasIterated; + try { + this._findSchedule(true); + return true; + } catch (err) { + return false; + } finally { + this._currentDate = current; + this._hasIterated = hasIterated; + } + }; + CronExpression.prototype.iterate = function iterate(steps, callback) { + var dates = []; + if (steps >= 0) { + for (var i = 0, c = steps; i < c; i++) { + try { + var item = this.next(); + dates.push(item); + if (callback) { + callback(item, i); + } + } catch (err) { + break; + } + } + } else { + for (var i = 0, c = steps; i > c; i--) { + try { + var item = this.prev(); + dates.push(item); + if (callback) { + callback(item, i); + } + } catch (err) { + break; + } + } + } + return dates; + }; + CronExpression.prototype.reset = function reset(newDate) { + this._currentDate = new CronDate(newDate || this._options.currentDate); + }; + CronExpression.prototype.stringify = function stringify2(includeSeconds) { + var resultArr = []; + for (var i = includeSeconds ? 0 : 1, c = CronExpression.map.length; i < c; ++i) { + var field = CronExpression.map[i]; + var value = this.fields[field]; + var constraint = CronExpression.constraints[i]; + if (field === "dayOfMonth" && this.fields.month.length === 1) { + constraint = { min: 1, max: CronExpression.daysInMonth[this.fields.month[0] - 1] }; + } else if (field === "dayOfWeek") { + constraint = { min: 0, max: 6 }; + value = value[value.length - 1] === 7 ? value.slice(0, -1) : value; + } + resultArr.push(stringifyField(value, constraint.min, constraint.max)); + } + return resultArr.join(" "); + }; + CronExpression.parse = function parse2(expression, options) { + var self2 = this; + if (typeof options === "function") { + options = {}; + } + function parse3(expression2, options2) { + if (!options2) { + options2 = {}; + } + if (typeof options2.currentDate === "undefined") { + options2.currentDate = new CronDate(void 0, self2._tz); + } + if (CronExpression.predefined[expression2]) { + expression2 = CronExpression.predefined[expression2]; + } + var fields = []; + var atoms = (expression2 + "").trim().split(/\s+/); + if (atoms.length > 6) { + throw new Error("Invalid cron expression"); + } + var start = CronExpression.map.length - atoms.length; + for (var i = 0, c = CronExpression.map.length; i < c; ++i) { + var field = CronExpression.map[i]; + var value = atoms[atoms.length > c ? i : i - start]; + if (i < start || !value) { + fields.push( + CronExpression._parseField( + field, + CronExpression.parseDefaults[i], + CronExpression.constraints[i] + ) + ); + } else { + var val = field === "dayOfWeek" ? parseNthDay(value) : value; + fields.push( + CronExpression._parseField( + field, + val, + CronExpression.constraints[i] + ) + ); + } + } + var mappedFields = {}; + for (var i = 0, c = CronExpression.map.length; i < c; i++) { + var key = CronExpression.map[i]; + mappedFields[key] = fields[i]; + } + var dayOfMonth = CronExpression._handleMaxDaysInMonth(mappedFields); + mappedFields.dayOfMonth = dayOfMonth || mappedFields.dayOfMonth; + return new CronExpression(mappedFields, options2); + function parseNthDay(val2) { + var atoms2 = val2.split("#"); + if (atoms2.length > 1) { + var nthValue = +atoms2[atoms2.length - 1]; + if (/,/.test(val2)) { + throw new Error("Constraint error, invalid dayOfWeek `#` and `,` special characters are incompatible"); + } + if (/\//.test(val2)) { + throw new Error("Constraint error, invalid dayOfWeek `#` and `/` special characters are incompatible"); + } + if (/-/.test(val2)) { + throw new Error("Constraint error, invalid dayOfWeek `#` and `-` special characters are incompatible"); + } + if (atoms2.length > 2 || Number.isNaN(nthValue) || (nthValue < 1 || nthValue > 5)) { + throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)"); + } + options2.nthDayOfWeek = nthValue; + return atoms2[0]; + } + return val2; + } + } + return parse3(expression, options); + }; + CronExpression.fieldsToExpression = function fieldsToExpression(fields, options) { + function validateConstraints(field2, values2, constraints) { + if (!values2) { + throw new Error("Validation error, Field " + field2 + " is missing"); + } + if (values2.length === 0) { + throw new Error("Validation error, Field " + field2 + " contains no values"); + } + for (var i2 = 0, c2 = values2.length; i2 < c2; i2++) { + var value = values2[i2]; + if (CronExpression._isValidConstraintChar(constraints, value)) { + continue; + } + if (typeof value !== "number" || Number.isNaN(value) || value < constraints.min || value > constraints.max) { + throw new Error( + "Constraint error, got value " + value + " expected range " + constraints.min + "-" + constraints.max + ); + } + } + } + var mappedFields = {}; + for (var i = 0, c = CronExpression.map.length; i < c; ++i) { + var field = CronExpression.map[i]; + var values = fields[field]; + validateConstraints( + field, + values, + CronExpression.constraints[i] + ); + var copy = []; + var j = -1; + while (++j < values.length) { + copy[j] = values[j]; + } + values = copy.sort(CronExpression._sortCompareFn).filter(function(item, pos, ary) { + return !pos || item !== ary[pos - 1]; + }); + if (values.length !== copy.length) { + throw new Error("Validation error, Field " + field + " contains duplicate values"); + } + mappedFields[field] = values; + } + var dayOfMonth = CronExpression._handleMaxDaysInMonth(mappedFields); + mappedFields.dayOfMonth = dayOfMonth || mappedFields.dayOfMonth; + return new CronExpression(mappedFields, options || {}); + }; + module2.exports = CronExpression; + } +}); + +// ../../node_modules/.pnpm/cron-parser@4.9.0/node_modules/cron-parser/lib/parser.js +var require_parser2 = __commonJS({ + "../../node_modules/.pnpm/cron-parser@4.9.0/node_modules/cron-parser/lib/parser.js"(exports2, module2) { + "use strict"; + var CronExpression = require_expression(); + function CronParser() { + } + CronParser._parseEntry = function _parseEntry(entry) { + var atoms = entry.split(" "); + if (atoms.length === 6) { + return { + interval: CronExpression.parse(entry) + }; + } else if (atoms.length > 6) { + return { + interval: CronExpression.parse( + atoms.slice(0, 6).join(" ") + ), + command: atoms.slice(6, atoms.length) + }; + } else { + throw new Error("Invalid entry: " + entry); + } + }; + CronParser.parseExpression = function parseExpression(expression, options) { + return CronExpression.parse(expression, options); + }; + CronParser.fieldsToExpression = function fieldsToExpression(fields, options) { + return CronExpression.fieldsToExpression(fields, options); + }; + CronParser.parseString = function parseString(data) { + var blocks = data.split("\n"); + var response = { + variables: {}, + expressions: [], + errors: {} + }; + for (var i = 0, c = blocks.length; i < c; i++) { + var block = blocks[i]; + var matches = null; + var entry = block.trim(); + if (entry.length > 0) { + if (entry.match(/^#/)) { + continue; + } else if (matches = entry.match(/^(.*)=(.*)$/)) { + response.variables[matches[1]] = matches[2]; + } else { + var result = null; + try { + result = CronParser._parseEntry("0 " + entry); + response.expressions.push(result.interval); + } catch (err) { + response.errors[entry] = err; + } + } + } + } + return response; + }; + CronParser.parseFile = function parseFile(filePath, callback) { + require("fs").readFile(filePath, function(err, data) { + if (err) { + callback(err); + return; + } + return callback(null, CronParser.parseString(data.toString())); + }); + }; + module2.exports = CronParser; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/queue-base.js +var require_queue_base = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/queue-base.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QueueBase = void 0; + var events_1 = require("events"); + var utils_1 = require_utils16(); + var create_scripts_1 = require_create_scripts(); + var redis_connection_1 = require_redis_connection(); + var job_1 = require_job(); + var queue_keys_1 = require_queue_keys(); + var QueueBase = class extends events_1.EventEmitter { + /** + * + * @param name - The name of the queue. + * @param opts - Options for the queue. + * @param Connection - An optional "Connection" class used to instantiate a Connection. This is useful for + * testing with mockups and/or extending the Connection class and passing an alternate implementation. + */ + constructor(name, opts = { connection: {} }, Connection = redis_connection_1.RedisConnection, hasBlockingConnection = false) { + super(); + this.name = name; + this.opts = opts; + this.closed = false; + this.hasBlockingConnection = false; + this.hasBlockingConnection = hasBlockingConnection; + this.opts = Object.assign({ prefix: "bull" }, opts); + if (!name) { + throw new Error("Queue name must be provided"); + } + if (name.includes(":")) { + throw new Error("Queue name cannot contain :"); + } + this.connection = new Connection(opts.connection, { + shared: (0, utils_1.isRedisInstance)(opts.connection), + blocking: hasBlockingConnection, + skipVersionCheck: opts.skipVersionCheck, + skipWaitingForReady: opts.skipWaitingForReady + }); + (0, utils_1.forwardConnectionError)(this, this.connection); + this.connection.on("close", () => { + if (!this.closing) { + this.emit("ioredis:close"); + } + }); + const queueKeys = new queue_keys_1.QueueKeys(opts.prefix); + this.qualifiedName = queueKeys.getQueueQualifiedName(name); + this.keys = queueKeys.getKeys(name); + this.toKey = (type) => queueKeys.toKey(name, type); + this.createScripts(); + } + /** + * Returns a promise that resolves to a redis client. Normally used only by subclasses. + */ + get client() { + return this.connection.client; + } + createScripts() { + this.scripts = (0, create_scripts_1.createScripts)(this); + } + /** + * Returns the version of the Redis instance the client is connected to, + */ + get redisVersion() { + return this.connection.redisVersion; + } + /** + * Returns the database type of the Redis instance the client is connected to, + */ + get databaseType() { + return this.connection.databaseType; + } + /** + * Helper to easily extend Job class calls. + */ + get Job() { + return job_1.Job; + } + /** + * Emits an event. Normally used by subclasses to emit events. + * + * @param event - The emitted event. + * @param args - The arguments to pass to the event listeners. + * @returns True if the event had listeners, false otherwise. + */ + emit(event, ...args) { + try { + return super.emit(event, ...args); + } catch (err) { + try { + return super.emit("error", err); + } catch (err2) { + console.error(err2); + return false; + } + } + } + waitUntilReady() { + return this.client; + } + base64Name() { + return Buffer.from(this.name).toString("base64"); + } + clientName(suffix = "") { + const queueNameBase64 = this.base64Name(); + return `${this.opts.prefix}:${queueNameBase64}${suffix}`; + } + /** + * + * Closes the connection and returns a promise that resolves when the connection is closed. + */ + async close() { + if (!this.closing) { + this.closing = this.connection.close(); + } + await this.closing; + this.closed = true; + } + /** + * + * Force disconnects a connection. + */ + disconnect() { + return this.connection.disconnect(); + } + async checkConnectionError(fn, delayInMs = utils_1.DELAY_TIME_5) { + try { + return await fn(); + } catch (error) { + if ((0, utils_1.isNotConnectionError)(error)) { + this.emit("error", error); + } + if (!this.closing && delayInMs) { + await (0, utils_1.delay)(delayInMs); + } else { + return; + } + } + } + /** + * Wraps the code with telemetry and provides a span for configuration. + * + * @param spanKind - kind of the span: Producer, Consumer, Internal + * @param operation - operation name (such as add, process, etc) + * @param destination - destination name (normally the queue name) + * @param callback - code to wrap with telemetry + * @param srcPropagationMetadata - The source propagation metadata for telemetry context. + * @returns The result of the callback function. + */ + trace(spanKind, operation, destination, callback, srcPropagationMetadata) { + return (0, utils_1.trace)(this.opts.telemetry, spanKind, this.name, operation, destination, callback, srcPropagationMetadata); + } + }; + exports2.QueueBase = QueueBase; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/job-scheduler.js +var require_job_scheduler = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/job-scheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRepeatStrategy = exports2.JobScheduler = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var cron_parser_1 = require_parser2(); + var job_1 = require_job(); + var queue_base_1 = require_queue_base(); + var enums_1 = require_enums3(); + var utils_1 = require_utils16(); + var JobScheduler = class extends queue_base_1.QueueBase { + constructor(name, opts, Connection) { + super(name, opts, Connection); + this.repeatStrategy = opts.settings && opts.settings.repeatStrategy || exports2.defaultRepeatStrategy; + } + async upsertJobScheduler(jobSchedulerId, repeatOpts, jobName, jobData, opts, { override, producerId }) { + const { every, limit, pattern, offset } = repeatOpts; + if (pattern && every) { + throw new Error("Both .pattern and .every options are defined for this repeatable job"); + } + if (!pattern && !every) { + throw new Error("Either .pattern or .every options must be defined for this repeatable job"); + } + if (repeatOpts.immediately && repeatOpts.startDate) { + throw new Error("Both .immediately and .startDate options are defined for this repeatable job"); + } + if (repeatOpts.immediately && repeatOpts.every) { + console.warn("Using option immediately with every does not affect the job's schedule. Job will run immediately anyway."); + } + const iterationCount = repeatOpts.count ? repeatOpts.count + 1 : 1; + if (typeof repeatOpts.limit !== "undefined" && iterationCount > repeatOpts.limit) { + return; + } + let now = Date.now(); + const { endDate } = repeatOpts; + if (endDate && now > new Date(endDate).getTime()) { + return; + } + const prevMillis = opts.prevMillis || 0; + now = prevMillis < now ? now : prevMillis; + const { immediately } = repeatOpts, filteredRepeatOpts = tslib_1.__rest(repeatOpts, ["immediately"]); + let nextMillis; + const newOffset = every && offset ? offset : null; + if (pattern) { + nextMillis = await this.repeatStrategy(now, repeatOpts, jobName); + if (nextMillis < now) { + nextMillis = now; + } + } + if (nextMillis || every) { + return this.trace(enums_1.SpanKind.PRODUCER, "add", `${this.name}.${jobName}`, async (span, srcPropagationMetadata) => { + var _a, _b; + let telemetry = opts.telemetry; + if (srcPropagationMetadata) { + const omitContext = (_a = opts.telemetry) === null || _a === void 0 ? void 0 : _a.omitContext; + const telemetryMetadata = ((_b = opts.telemetry) === null || _b === void 0 ? void 0 : _b.metadata) || !omitContext && srcPropagationMetadata; + if (telemetryMetadata || omitContext) { + telemetry = { + metadata: telemetryMetadata, + omitContext + }; + } + } + const mergedOpts = this.getNextJobOpts(nextMillis, jobSchedulerId, Object.assign(Object.assign({}, opts), { repeat: filteredRepeatOpts, telemetry }), iterationCount, newOffset); + if (override) { + if (nextMillis < now) { + nextMillis = now; + } + const [jobId, delay] = await this.scripts.addJobScheduler(jobSchedulerId, nextMillis, JSON.stringify(typeof jobData === "undefined" ? {} : jobData), job_1.Job.optsAsJSON(opts), { + name: jobName, + startDate: repeatOpts.startDate ? new Date(repeatOpts.startDate).getTime() : void 0, + endDate: endDate ? new Date(endDate).getTime() : void 0, + tz: repeatOpts.tz, + pattern, + every, + limit, + offset: newOffset + }, job_1.Job.optsAsJSON(mergedOpts), producerId); + const numericDelay = typeof delay === "string" ? parseInt(delay, 10) : delay; + const job = new this.Job(this, jobName, jobData, Object.assign(Object.assign({}, mergedOpts), { delay: numericDelay }), jobId); + job.id = jobId; + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.JobSchedulerId]: jobSchedulerId, + [enums_1.TelemetryAttributes.JobId]: job.id + }); + return job; + } else { + const jobId = await this.scripts.updateJobSchedulerNextMillis(jobSchedulerId, nextMillis, JSON.stringify(typeof jobData === "undefined" ? {} : jobData), job_1.Job.optsAsJSON(mergedOpts), producerId); + if (jobId) { + const job = new this.Job(this, jobName, jobData, mergedOpts, jobId); + job.id = jobId; + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.JobSchedulerId]: jobSchedulerId, + [enums_1.TelemetryAttributes.JobId]: job.id + }); + return job; + } + } + }); + } + } + getNextJobOpts(nextMillis, jobSchedulerId, opts, currentCount, offset) { + var _a, _b; + const jobId = this.getSchedulerNextJobId({ + jobSchedulerId, + nextMillis + }); + const now = Date.now(); + const delay = nextMillis + offset - now; + const mergedOpts = Object.assign(Object.assign({}, opts), { jobId, delay: delay < 0 ? 0 : delay, timestamp: now, prevMillis: nextMillis, repeatJobKey: jobSchedulerId }); + mergedOpts.repeat = Object.assign(Object.assign({}, opts.repeat), { offset, count: currentCount, startDate: ((_a = opts.repeat) === null || _a === void 0 ? void 0 : _a.startDate) ? new Date(opts.repeat.startDate).getTime() : void 0, endDate: ((_b = opts.repeat) === null || _b === void 0 ? void 0 : _b.endDate) ? new Date(opts.repeat.endDate).getTime() : void 0 }); + return mergedOpts; + } + async removeJobScheduler(jobSchedulerId) { + return this.scripts.removeJobScheduler(jobSchedulerId); + } + async getSchedulerData(client, key, next) { + const jobData = await client.hgetall(this.toKey("repeat:" + key)); + return this.transformSchedulerData(key, jobData, next); + } + transformSchedulerData(key, jobData, next) { + if (jobData && Object.keys(jobData).length > 0) { + const jobSchedulerData = { + key, + name: jobData.name, + next + }; + if (jobData.ic) { + jobSchedulerData.iterationCount = parseInt(jobData.ic); + } + if (jobData.limit) { + jobSchedulerData.limit = parseInt(jobData.limit); + } + if (jobData.startDate) { + jobSchedulerData.startDate = parseInt(jobData.startDate); + } + if (jobData.endDate) { + jobSchedulerData.endDate = parseInt(jobData.endDate); + } + if (jobData.tz) { + jobSchedulerData.tz = jobData.tz; + } + if (jobData.pattern) { + jobSchedulerData.pattern = jobData.pattern; + } + if (jobData.every) { + jobSchedulerData.every = parseInt(jobData.every); + } + if (jobData.offset) { + jobSchedulerData.offset = parseInt(jobData.offset); + } + if (jobData.data || jobData.opts) { + jobSchedulerData.template = this.getTemplateFromJSON(jobData.data, jobData.opts); + } + return jobSchedulerData; + } + if (key.includes(":")) { + return this.keyToData(key, next); + } + } + keyToData(key, next) { + const data = key.split(":"); + const pattern = data.slice(4).join(":") || null; + return { + key, + name: data[0], + id: data[1] || null, + endDate: parseInt(data[2]) || null, + tz: data[3] || null, + pattern, + next + }; + } + /** + * Checks if a given id corresponds to a registered job scheduler. + * + * This is used to disambiguate between new job scheduler ids (which may + * contain any number of colon segments) and legacy repeatable job keys + * (which always contain 5+ colon segments). Relying purely on segment + * count is not safe because a user-provided jobSchedulerId may itself + * contain 5+ colon segments, which would otherwise be misclassified as + * a legacy repeatable key. + * + * We cannot use ZSCORE on the shared `repeat` sorted set because legacy + * repeatable jobs are stored in the same sorted set and would be reported + * as schedulers. Instead, we probe the per-id metadata hash (`repeat:`) + * for the `ic` (iteration count) field, which is written exclusively by + * `storeJobScheduler` and is never set by the legacy `addRepeatableJob` + * flow. + */ + async isJobScheduler(id) { + const client = await this.client; + const exists = await client.hexists(`${this.keys.repeat}:${id}`, "ic"); + return exists === 1; + } + async getScheduler(id) { + const [rawJobData, next] = await this.scripts.getJobScheduler(id); + return this.transformSchedulerData(id, rawJobData ? (0, utils_1.array2obj)(rawJobData) : null, next ? parseInt(next) : null); + } + getTemplateFromJSON(rawData, rawOpts) { + const template = {}; + if (rawData) { + template.data = JSON.parse(rawData); + } + if (rawOpts) { + template.opts = job_1.Job.optsFromJSON(rawOpts); + } + return template; + } + async getJobSchedulers(start = 0, end = -1, asc = false) { + const client = await this.client; + const jobSchedulersKey = this.keys.repeat; + const result = asc ? await client.zrange(jobSchedulersKey, start, end, { WITHSCORES: true }) : await client.zrevrange(jobSchedulersKey, start, end, { + WITHSCORES: true + }); + const jobs = []; + for (let i = 0; i < result.length; i += 2) { + jobs.push(this.getSchedulerData(client, result[i], parseInt(result[i + 1]))); + } + return Promise.all(jobs); + } + async getSchedulersCount() { + const jobSchedulersKey = this.keys.repeat; + const client = await this.client; + return client.zcard(jobSchedulersKey); + } + getSchedulerNextJobId({ nextMillis, jobSchedulerId }) { + return `repeat:${jobSchedulerId}:${nextMillis}`; + } + }; + exports2.JobScheduler = JobScheduler; + var defaultRepeatStrategy = (millis, opts) => { + const { pattern } = opts; + const dateFromMillis = new Date(millis); + const startDate = opts.startDate && new Date(opts.startDate); + const currentDate = startDate > dateFromMillis ? startDate : dateFromMillis; + const interval = (0, cron_parser_1.parseExpression)(pattern, Object.assign(Object.assign({}, opts), { currentDate })); + try { + if (opts.immediately) { + return (/* @__PURE__ */ new Date()).getTime(); + } else { + return interval.next().getTime(); + } + } catch (e) { + } + }; + exports2.defaultRepeatStrategy = defaultRepeatStrategy; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/lock-manager.js +var require_lock_manager = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/lock-manager.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LockManager = void 0; + var abort_controller_1 = require_abort_controller(); + var enums_1 = require_enums3(); + var LockManager = class { + constructor(worker, opts) { + this.worker = worker; + this.opts = opts; + this.trackedJobs = /* @__PURE__ */ new Map(); + this.closed = false; + } + /** + * Starts the lock manager timers for lock renewal. + */ + start() { + if (this.closed) { + return; + } + if (this.opts.lockRenewTime > 0) { + this.startLockExtenderTimer(); + } + } + async extendLocks(jobIds) { + await this.worker.trace(enums_1.SpanKind.INTERNAL, "extendLocks", this.worker.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.WorkerId]: this.opts.workerId, + [enums_1.TelemetryAttributes.WorkerName]: this.opts.workerName, + [enums_1.TelemetryAttributes.WorkerJobsToExtendLocks]: jobIds + }); + try { + const jobTokens = jobIds.map((id) => { + var _a; + return ((_a = this.trackedJobs.get(id)) === null || _a === void 0 ? void 0 : _a.token) || ""; + }); + const erroredJobIds = await this.worker.extendJobLocks(jobIds, jobTokens, this.opts.lockDuration); + if (erroredJobIds.length > 0) { + this.worker.emit("lockRenewalFailed", erroredJobIds); + for (const jobId of erroredJobIds) { + this.worker.emit("error", new Error(`could not renew lock for job ${jobId}`)); + } + } + const succeededJobIds = jobIds.filter((id) => !erroredJobIds.includes(id)); + if (succeededJobIds.length > 0) { + this.worker.emit("locksRenewed", { + count: succeededJobIds.length, + jobIds: succeededJobIds + }); + } + } catch (err) { + this.worker.emit("error", err); + } + }); + } + startLockExtenderTimer() { + clearTimeout(this.lockRenewalTimer); + if (!this.closed) { + this.lockRenewalTimer = setTimeout(async () => { + const now = Date.now(); + const jobsToExtend = []; + for (const jobId of this.trackedJobs.keys()) { + const tracked = this.trackedJobs.get(jobId); + const { ts, token, abortController } = tracked; + if (!ts) { + this.trackedJobs.set(jobId, { token, ts: now, abortController }); + continue; + } + if (ts + this.opts.lockRenewTime / 2 < now) { + this.trackedJobs.set(jobId, { token, ts: now, abortController }); + jobsToExtend.push(jobId); + } + } + if (jobsToExtend.length) { + await this.extendLocks(jobsToExtend); + } + this.startLockExtenderTimer(); + }, this.opts.lockRenewTime / 2); + } + } + /** + * Stops the lock manager and clears all timers. + */ + async close() { + if (this.closed) { + return; + } + this.closed = true; + if (this.lockRenewalTimer) { + clearTimeout(this.lockRenewalTimer); + this.lockRenewalTimer = void 0; + } + this.trackedJobs.clear(); + } + /** + * Adds a job to be tracked for lock renewal. + * Returns an AbortController if shouldCreateController is true, undefined otherwise. + */ + trackJob(jobId, token, ts, shouldCreateController = false) { + const abortController = shouldCreateController ? new abort_controller_1.AbortController() : void 0; + if (!this.closed && jobId) { + this.trackedJobs.set(jobId, { token, ts, abortController }); + } + return abortController; + } + /** + * Removes a job from lock renewal tracking. + */ + untrackJob(jobId) { + this.trackedJobs.delete(jobId); + } + /** + * Gets the number of jobs currently being tracked. + */ + getActiveJobCount() { + return this.trackedJobs.size; + } + /** + * Checks if the lock manager is running. + */ + isRunning() { + return !this.closed && this.lockRenewalTimer !== void 0; + } + /** + * Cancels a specific job by aborting its signal. + * @param jobId - The ID of the job to cancel + * @param reason - Optional reason for the cancellation + * @returns true if the job was found and cancelled, false otherwise + */ + cancelJob(jobId, reason) { + const tracked = this.trackedJobs.get(jobId); + if (tracked === null || tracked === void 0 ? void 0 : tracked.abortController) { + tracked.abortController.abort(reason); + return true; + } + return false; + } + /** + * Cancels all tracked jobs by aborting their signals. + * @param reason - Optional reason for the cancellation + */ + cancelAllJobs(reason) { + for (const tracked of this.trackedJobs.values()) { + if (tracked.abortController) { + tracked.abortController.abort(reason); + } + } + } + /** + * Gets a list of all tracked job IDs. + * @returns Array of job IDs currently being tracked + */ + getTrackedJobIds() { + return Array.from(this.trackedJobs.keys()); + } + }; + exports2.LockManager = LockManager; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/queue-events.js +var require_queue_events = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/queue-events.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QueueEvents = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var utils_1 = require_utils16(); + var queue_base_1 = require_queue_base(); + var ioredis_client_1 = require_ioredis_client(); + var QueueEvents = class extends queue_base_1.QueueBase { + constructor(name, _a = { + connection: {} + }, Connection) { + var { connection, autorun = true } = _a, opts = tslib_1.__rest(_a, ["connection", "autorun"]); + super(name, Object.assign(Object.assign({}, opts), { connection: (0, utils_1.isRedisInstance)(connection) ? ((0, ioredis_client_1.isIRedisClient)(connection) ? connection : (0, ioredis_client_1.createIORedisClient)(connection)).duplicate() : connection }), Connection, true); + this.running = false; + this.blocking = false; + this.opts = Object.assign({ + blockingTimeout: 1e4 + }, this.opts); + if (autorun) { + this.run().catch((error) => this.emit("error", error)); + } + } + emit(event, ...args) { + return super.emit(event, ...args); + } + off(eventName, listener) { + super.off(eventName, listener); + return this; + } + on(event, listener) { + super.on(event, listener); + return this; + } + once(event, listener) { + super.once(event, listener); + return this; + } + /** + * Manually starts running the event consumming loop. This shall be used if you do not + * use the default "autorun" option on the constructor. + */ + async run() { + if (!this.running) { + try { + this.running = true; + const client = await this.client; + try { + await client.clientSetName(this.clientName(utils_1.QUEUE_EVENT_SUFFIX)); + } catch (err) { + if (!utils_1.clientCommandMessageReg.test(err.message) && !this.closing) { + throw err; + } + } + await this.consumeEvents(client); + } catch (error) { + this.running = false; + throw error; + } + } else { + throw new Error("Queue Events is already running."); + } + } + async consumeEvents(client) { + const opts = this.opts; + const key = this.keys.events; + let id = opts.lastEventId || "$"; + while (!this.closing) { + this.blocking = true; + const data = await this.checkConnectionError(() => client.xread([{ key, id }], { BLOCK: opts.blockingTimeout })); + this.blocking = false; + if (data) { + const stream = data[0]; + const events = stream[1]; + for (let i = 0; i < events.length; i++) { + id = events[i][0]; + const args = (0, utils_1.array2obj)(events[i][1]); + switch (args.event) { + case "progress": + args.data = JSON.parse(args.data); + break; + case "completed": + args.returnvalue = JSON.parse(args.returnvalue); + break; + case "delayed": + args.delay = Number(args.delay); + break; + } + const { event } = args, restArgs = tslib_1.__rest(args, ["event"]); + if (event === "drained") { + this.emit(event, id); + } else { + this.emit(event, restArgs, id); + if (restArgs.jobId) { + this.emit(`${event}:${restArgs.jobId}`, restArgs, id); + } + } + } + } + } + } + /** + * Stops consuming events and close the underlying Redis connection if necessary. + * + * @returns + */ + async close() { + if (!this.closing) { + this.closing = (async () => { + try { + const client = await this.client; + client.disconnect(); + await this.connection.close(this.blocking); + } finally { + this.closed = true; + } + })(); + } + return this.closing; + } + }; + exports2.QueueEvents = QueueEvents; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/queue-events-producer.js +var require_queue_events_producer = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/queue-events-producer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QueueEventsProducer = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var queue_base_1 = require_queue_base(); + var QueueEventsProducer = class extends queue_base_1.QueueBase { + constructor(name, opts = { + connection: {} + }, Connection) { + super(name, Object.assign({ blockingConnection: false }, opts), Connection); + this.opts = opts; + } + /** + * Publish custom event to be processed in QueueEvents. + * @param argsObj - Event payload + * @param maxEvents - Max quantity of events to be saved + */ + async publishEvent(argsObj, maxEvents = 1e3) { + const client = await this.client; + const key = this.keys.events; + const { eventName } = argsObj, restArgs = tslib_1.__rest(argsObj, ["eventName"]); + const fields = Object.assign({ event: eventName }, restArgs); + await client.xadd(key, "*", fields, { + MAXLEN: maxEvents, + approximate: true + }); + } + /** + * Closes the connection and returns a promise that resolves when the connection is closed. + */ + async close() { + if (!this.closing) { + this.closing = this.connection.close(); + } + await this.closing; + } + }; + exports2.QueueEventsProducer = QueueEventsProducer; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/queue-getters.js +var require_queue_getters = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/queue-getters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QueueGetters = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var queue_base_1 = require_queue_base(); + var utils_1 = require_utils16(); + var enums_1 = require_enums3(); + function escapePrometheusLabelValue(value) { + return String(value).replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\n"); + } + var QueueGetters = class extends queue_base_1.QueueBase { + getJob(jobId) { + return this.Job.fromId(this, jobId); + } + commandByType(types, count, callback) { + return types.map((type) => { + type = type === "waiting" ? "wait" : type; + const key = this.toKey(type); + switch (type) { + case "completed": + case "failed": + case "delayed": + case "prioritized": + case "repeat": + case "waiting-children": + return callback(key, count ? "zcard" : "zrange"); + case "active": + case "wait": + case "paused": + return callback(key, count ? "llen" : "lrange"); + } + }); + } + sanitizeJobTypes(types) { + const currentTypes = typeof types === "string" ? [types] : types; + if (Array.isArray(currentTypes) && currentTypes.length > 0) { + const sanitizedTypes = [...currentTypes]; + if (sanitizedTypes.indexOf("waiting") !== -1) { + sanitizedTypes.push("paused"); + } + return [...new Set(sanitizedTypes)]; + } + return [ + "active", + "completed", + "delayed", + "failed", + "paused", + "prioritized", + "waiting", + "waiting-children" + ]; + } + /** + Returns the number of jobs waiting to be processed. This includes jobs that are + "waiting" or "delayed" or "prioritized" or "waiting-children". + */ + async count() { + const count = await this.getJobCountByTypes("waiting", "paused", "delayed", "prioritized", "waiting-children"); + return count; + } + /** + * Returns the time to live for a rate limited key in milliseconds. + * @param maxJobs - max jobs to be considered in rate limit state. If not passed + * it will return the remaining ttl without considering if max jobs is exceeded. + * @returns -2 if the key does not exist. + * -1 if the key exists but has no associated expire. + * @see {@link https://redis.io/commands/pttl/} + */ + async getRateLimitTtl(maxJobs) { + return this.scripts.getRateLimitTtl(maxJobs); + } + /** + * Get jobId that starts debounced state. + * @deprecated use getDeduplicationJobId method + * + * @param id - debounce identifier + */ + async getDebounceJobId(id) { + const client = await this.client; + return client.get(`${this.keys.de}:${id}`); + } + /** + * Get jobId from deduplicated state. + * + * @param id - deduplication identifier + */ + async getDeduplicationJobId(id) { + const client = await this.client; + return client.get(`${this.keys.de}:${id}`); + } + /** + * Get global concurrency value. + * Returns null in case no value is set. + */ + async getGlobalConcurrency() { + const client = await this.client; + const concurrency = await client.hget(this.keys.meta, "concurrency"); + if (concurrency) { + return Number(concurrency); + } + return null; + } + /** + * Get global rate limit values. + * Returns null in case no value is set. + */ + async getGlobalRateLimit() { + const client = await this.client; + const [max, duration] = await client.hmget(this.keys.meta, "max", "duration"); + if (max && duration) { + return { + max: Number(max), + duration: Number(duration) + }; + } + return null; + } + /** + * Job counts by type + * + * Queue#getJobCountByTypes('completed') =\> completed count + * Queue#getJobCountByTypes('completed', 'failed') =\> completed + failed count + * Queue#getJobCountByTypes('completed', 'waiting', 'failed') =\> completed + waiting + failed count + */ + async getJobCountByTypes(...types) { + const result = await this.getJobCounts(...types); + return Object.values(result).reduce((sum, count) => sum + count, 0); + } + /** + * Returns the job counts for each type specified or every list/set in the queue by default. + * @param types - the types of jobs to count. If not specified, it will return the counts for all types. + * @returns An object, key (type) and value (count) + */ + async getJobCounts(...types) { + const currentTypes = this.sanitizeJobTypes(types); + const responses = await this.scripts.getCounts(currentTypes); + const counts = {}; + responses.forEach((res, index) => { + counts[currentTypes[index]] = res || 0; + }); + return counts; + } + /** + * Records job counts as gauge metrics for telemetry purposes. + * Each job state count is recorded with the queue name and state as attributes. + * @param types - the types of jobs to count. If not specified, it will return the counts for all types. + * @returns An object, key (type) and value (count) + */ + async recordJobCountsMetric(...types) { + var _a; + const counts = await this.getJobCounts(...types); + const meter = (_a = this.opts.telemetry) === null || _a === void 0 ? void 0 : _a.meter; + if (meter && typeof meter.createGauge === "function") { + const gauge = meter.createGauge(enums_1.MetricNames.QueueJobsCount, { + description: "Number of jobs in the queue by state", + unit: "{jobs}" + }); + for (const [state, jobCount] of Object.entries(counts)) { + gauge.record(jobCount, { + [enums_1.TelemetryAttributes.QueueName]: this.name, + [enums_1.TelemetryAttributes.QueueJobsState]: state + }); + } + } + return counts; + } + /** + * Get current job state. + * + * @param jobId - job identifier. + * @returns Returns one of these values: + * 'completed', 'failed', 'delayed', 'active', 'waiting', 'waiting-children', 'unknown'. + */ + getJobState(jobId) { + return this.scripts.getState(jobId); + } + /** + * Get global queue configuration. + * + * @returns Returns the global queue configuration. + */ + async getMeta() { + const client = await this.client; + const config = await client.hgetall(this.keys.meta); + const { concurrency, max, duration, paused, "opts.maxLenEvents": maxLenEvents } = config, rest = tslib_1.__rest(config, ["concurrency", "max", "duration", "paused", "opts.maxLenEvents"]); + const parsedConfig = rest; + if (concurrency) { + parsedConfig["concurrency"] = Number(concurrency); + } + if (maxLenEvents) { + parsedConfig["maxLenEvents"] = Number(maxLenEvents); + } + if (max) { + parsedConfig["max"] = Number(max); + } + if (duration) { + parsedConfig["duration"] = Number(duration); + } + parsedConfig["paused"] = paused === "1"; + return parsedConfig; + } + /** + * @returns Returns the number of jobs in completed status. + */ + getCompletedCount() { + return this.getJobCountByTypes("completed"); + } + /** + * Returns the number of jobs in failed status. + */ + getFailedCount() { + return this.getJobCountByTypes("failed"); + } + /** + * Returns the number of jobs in delayed status. + */ + getDelayedCount() { + return this.getJobCountByTypes("delayed"); + } + /** + * Returns the number of jobs in active status. + */ + getActiveCount() { + return this.getJobCountByTypes("active"); + } + /** + * Returns the number of jobs in prioritized status. + */ + getPrioritizedCount() { + return this.getJobCountByTypes("prioritized"); + } + /** + * Returns the number of jobs per priority. + */ + async getCountsPerPriority(priorities) { + const uniquePriorities = [...new Set(priorities)]; + const responses = await this.scripts.getCountsPerPriority(uniquePriorities); + const counts = {}; + responses.forEach((res, index) => { + counts[`${uniquePriorities[index]}`] = res || 0; + }); + return counts; + } + /** + * Returns the number of jobs in waiting or paused statuses. + */ + getWaitingCount() { + return this.getJobCountByTypes("waiting"); + } + /** + * Returns the number of jobs in waiting-children status. + */ + getWaitingChildrenCount() { + return this.getJobCountByTypes("waiting-children"); + } + /** + * Returns the jobs that are in the "waiting" status. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + */ + getWaiting(start = 0, end = -1) { + return this.getJobs(["waiting"], start, end, true); + } + /** + * Returns the jobs that are in the "waiting-children" status. + * I.E. parent jobs that have at least one child that has not completed yet. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + */ + getWaitingChildren(start = 0, end = -1) { + return this.getJobs(["waiting-children"], start, end, true); + } + /** + * Returns the jobs that are in the "active" status. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + */ + getActive(start = 0, end = -1) { + return this.getJobs(["active"], start, end, true); + } + /** + * Returns the jobs that are in the "delayed" status. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + */ + getDelayed(start = 0, end = -1) { + return this.getJobs(["delayed"], start, end, true); + } + /** + * Returns the jobs that are in the "prioritized" status. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + */ + getPrioritized(start = 0, end = -1) { + return this.getJobs(["prioritized"], start, end, true); + } + /** + * Returns the jobs that are in the "completed" status. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + */ + getCompleted(start = 0, end = -1) { + return this.getJobs(["completed"], start, end, false); + } + /** + * Returns the jobs that are in the "failed" status. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + */ + getFailed(start = 0, end = -1) { + return this.getJobs(["failed"], start, end, false); + } + /** + * Returns the qualified job ids and the raw job data (if available) of the + * children jobs of the given parent job. + * It is possible to get either the already processed children, in this case + * an array of qualified job ids and their result values will be returned, + * or the pending children, in this case an array of qualified job ids will + * be returned. + * A qualified job id is a string representing the job id in a given queue, + * for example: "bull:myqueue:jobid". + * + * @param parentId - The id of the parent job + * @param type - "processed" | "pending" + * @param opts - Options for the query. + * + * @returns an object with the following shape: + * `{ items: { id: string, v?: any, err?: string } [], jobs: JobJsonRaw[], total: number}` + */ + async getDependencies(parentId, type, start, end) { + const key = this.toKey(type == "processed" ? `${parentId}:processed` : `${parentId}:dependencies`); + const { items, total, jobs } = await this.scripts.paginate(key, { + start, + end, + fetchJobs: true + }); + return { + items, + jobs, + total + }; + } + async getRanges(types, start = 0, end = 1, asc = false) { + const multiCommands = []; + this.commandByType(types, false, (key, command) => { + switch (command) { + case "lrange": + multiCommands.push("lrange"); + break; + case "zrange": + multiCommands.push("zrange"); + break; + } + }); + const responses = await this.scripts.getRanges(types, start, end, asc); + let results = []; + responses.forEach((response, index) => { + const result = response || []; + if (asc && multiCommands[index] === "lrange") { + results = results.concat(result.reverse()); + } else { + results = results.concat(result); + } + }); + return [...new Set(results)]; + } + /** + * Returns the jobs that are on the given statuses (note that JobType is synonym for job status) + * @param types - the statuses of the jobs to return. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + * @param asc - if true, the jobs will be returned in ascending order. + */ + async getJobs(types, start = 0, end = -1, asc = false) { + const currentTypes = this.sanitizeJobTypes(types); + const jobDataByType = await this.scripts.getJobs(currentTypes, start, end, asc); + return jobDataByType.reduce((jobs, jobData) => { + for (const [jobId, jobHashFields] of jobData || []) { + jobs.push(this.Job.fromJSON(this, (0, utils_1.array2obj)(jobHashFields), jobId)); + } + return jobs; + }, []); + } + /** + * Returns the logs for a given Job. + * @param jobId - the id of the job to get the logs for. + * @param start - zero based index from where to start returning jobs. + * @param end - zero based index where to stop returning jobs. + * @param asc - if true, the jobs will be returned in ascending order. + */ + async getJobLogs(jobId, start = 0, end = -1, asc = true) { + const client = await this.client; + const multi = client.multi(); + const logsKey = this.toKey(jobId + ":logs"); + if (asc) { + multi.lrange(logsKey, start, end); + } else { + multi.lrange(logsKey, -(end + 1), -(start + 1)); + } + multi.llen(logsKey); + const result = await multi.exec(); + if (!asc) { + result[0][1].reverse(); + } + return { + logs: result[0][1], + count: result[1][1] + }; + } + async baseGetClients(matcher) { + const client = await this.client; + try { + if (client.isCluster && typeof client.nodes === "function") { + const clusterNodes = client.nodes(); + const clientsPerNode = []; + for (let nodeIndex = 0; nodeIndex < clusterNodes.length; nodeIndex++) { + const node = clusterNodes[nodeIndex]; + const clients = typeof node.clientList === "function" ? await node.clientList() : await node.client("LIST"); + const list = this.parseClientList(clients, matcher); + clientsPerNode.push(list); + } + const clientsFromNodeWithMostConnections = clientsPerNode.reduce((prev, current) => { + return prev.length > current.length ? prev : current; + }, []); + return clientsFromNodeWithMostConnections; + } else { + const clients = await client.clientList(); + const list = this.parseClientList(clients, matcher); + return list; + } + } catch (err) { + if (!utils_1.clientCommandMessageReg.test(err.message)) { + throw err; + } + return [{ name: "GCP does not support client list" }]; + } + } + /** + * Get the worker list related to the queue. i.e. all the known + * workers that are available to process jobs for this queue. + * Note: GCP does not support SETNAME, so this call will not work + * + * @returns - Returns an array with workers info. + */ + getWorkers() { + const unnamedWorkerClientName = `${this.clientName()}`; + const namedWorkerClientName = `${this.clientName()}:w:`; + const matcher = (name) => name && (name === unnamedWorkerClientName || name.startsWith(namedWorkerClientName)); + return this.baseGetClients(matcher); + } + /** + * Returns the current count of workers for the queue. + * + * getWorkersCount(): Promise + * + */ + async getWorkersCount() { + const workers = await this.getWorkers(); + return workers.length; + } + /** + * Get queue events list related to the queue. + * Note: GCP does not support SETNAME, so this call will not work + * + * @deprecated do not use this method, it will be removed in the future. + * + * @returns - Returns an array with queue events info. + */ + async getQueueEvents() { + const clientName = `${this.clientName()}${utils_1.QUEUE_EVENT_SUFFIX}`; + return this.baseGetClients((name) => name === clientName); + } + /** + * Get queue metrics related to the queue. + * + * This method returns the gathered metrics for the queue. + * The metrics are represented as an array of job counts + * per unit of time (1 minute). + * + * @param start - Start point of the metrics, where 0 + * is the newest point to be returned. + * @param end - End point of the metrics, where -1 is the + * oldest point to be returned. + * + * @returns - Returns an object with queue metrics. + */ + async getMetrics(type, start = 0, end = -1) { + const [meta, data, count] = await this.scripts.getMetrics(type, start, end); + return { + meta: { + count: parseInt(meta[0] || "0", 10), + prevTS: parseInt(meta[1] || "0", 10), + prevCount: parseInt(meta[2] || "0", 10) + }, + data: data.map((point) => +point || 0), + count + }; + } + parseClientList(list, matcher) { + const lines = list.split(/\r?\n/); + const clients = []; + lines.forEach((line) => { + const client = {}; + const keyValues = line.split(" "); + keyValues.forEach(function(keyValue) { + const index = keyValue.indexOf("="); + const key = keyValue.substring(0, index); + const value = keyValue.substring(index + 1); + client[key] = value; + }); + const name = client["name"]; + if (matcher(name)) { + client["name"] = this.name; + client["rawname"] = name; + clients.push(client); + } + }); + return clients; + } + /** + * Export the metrics for the queue in the Prometheus format. + * Automatically exports all the counts returned by getJobCounts(). + * + * @returns - Returns a string with the metrics in the Prometheus format. + * + * @see {@link https://prometheus.io/docs/instrumenting/exposition_formats/} + * + **/ + async exportPrometheusMetrics(globalVariables) { + const counts = await this.getJobCounts(); + const metrics = []; + metrics.push("# HELP bullmq_job_count Number of jobs in the queue by state"); + metrics.push("# TYPE bullmq_job_count gauge"); + const escapedQueueName = escapePrometheusLabelValue(this.name); + const variables = !globalVariables ? "" : Object.keys(globalVariables).reduce((acc, curr) => `${acc}, ${curr}="${escapePrometheusLabelValue(globalVariables[curr])}"`, ""); + for (const [state, count] of Object.entries(counts)) { + metrics.push(`bullmq_job_count{queue="${escapedQueueName}", state="${state}"${variables}} ${count}`); + } + const [completedMetrics, failedMetrics] = await Promise.all([ + this.getMetrics("completed"), + this.getMetrics("failed") + ]); + metrics.push("# HELP bullmq_job_completed_total Total number of completed jobs"); + metrics.push("# TYPE bullmq_job_completed_total counter"); + metrics.push(`bullmq_job_completed_total{queue="${escapedQueueName}"${variables}} ${completedMetrics.meta.count}`); + metrics.push("# HELP bullmq_job_failed_total Total number of failed jobs"); + metrics.push("# TYPE bullmq_job_failed_total counter"); + metrics.push(`bullmq_job_failed_total{queue="${escapedQueueName}"${variables}} ${failedMetrics.meta.count}`); + return metrics.join("\n"); + } + }; + exports2.QueueGetters = QueueGetters; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/repeat.js +var require_repeat2 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/repeat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getNextMillis = exports2.Repeat = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var cron_parser_1 = require_parser2(); + var crypto_1 = require("crypto"); + var queue_base_1 = require_queue_base(); + var Repeat = class extends queue_base_1.QueueBase { + constructor(name, opts, Connection) { + super(name, opts, Connection); + this.repeatStrategy = opts.settings && opts.settings.repeatStrategy || exports2.getNextMillis; + this.repeatKeyHashAlgorithm = opts.settings && opts.settings.repeatKeyHashAlgorithm || "md5"; + } + async updateRepeatableJob(name, data, opts, { override }) { + var _a, _b; + const repeatOpts = Object.assign({}, opts.repeat); + (_a = repeatOpts.pattern) !== null && _a !== void 0 ? _a : repeatOpts.pattern = repeatOpts.cron; + delete repeatOpts.cron; + const iterationCount = repeatOpts.count ? repeatOpts.count + 1 : 1; + if (typeof repeatOpts.limit !== "undefined" && iterationCount > repeatOpts.limit) { + return; + } + let now = Date.now(); + const { endDate } = repeatOpts; + if (endDate && now > new Date(endDate).getTime()) { + return; + } + const prevMillis = opts.prevMillis || 0; + now = prevMillis < now ? now : prevMillis; + const nextMillis = await this.repeatStrategy(now, repeatOpts, name); + const { every, pattern } = repeatOpts; + const hasImmediately = Boolean((every || pattern) && repeatOpts.immediately); + const offset = hasImmediately && every ? now - nextMillis : void 0; + if (nextMillis) { + if (!prevMillis && opts.jobId) { + repeatOpts.jobId = opts.jobId; + } + const legacyRepeatKey = getRepeatConcatOptions(name, repeatOpts); + const newRepeatKey = (_b = opts.repeat.key) !== null && _b !== void 0 ? _b : this.hash(legacyRepeatKey); + let repeatJobKey; + if (override) { + repeatJobKey = await this.scripts.addRepeatableJob(newRepeatKey, nextMillis, { + name, + endDate: endDate ? new Date(endDate).getTime() : void 0, + tz: repeatOpts.tz, + pattern, + every + }, legacyRepeatKey); + } else { + const client = await this.client; + repeatJobKey = await this.scripts.updateRepeatableJobMillis(client, newRepeatKey, nextMillis, legacyRepeatKey); + } + const { immediately } = repeatOpts, filteredRepeatOpts = tslib_1.__rest(repeatOpts, ["immediately"]); + return this.createNextJob(name, nextMillis, repeatJobKey, Object.assign(Object.assign({}, opts), { repeat: Object.assign({ offset }, filteredRepeatOpts) }), data, iterationCount, hasImmediately); + } + } + async createNextJob(name, nextMillis, repeatJobKey, opts, data, currentCount, hasImmediately) { + const jobId = this.getRepeatJobKey(name, nextMillis, repeatJobKey, data); + const now = Date.now(); + const delay = nextMillis + (opts.repeat.offset ? opts.repeat.offset : 0) - now; + const mergedOpts = Object.assign(Object.assign({}, opts), { jobId, delay: delay < 0 || hasImmediately ? 0 : delay, timestamp: now, prevMillis: nextMillis, repeatJobKey }); + mergedOpts.repeat = Object.assign(Object.assign({}, opts.repeat), { count: currentCount }); + return this.Job.create(this, name, data, mergedOpts); + } + // TODO: remove legacy code in next breaking change + getRepeatJobKey(name, nextMillis, repeatJobKey, data) { + if (repeatJobKey.split(":").length > 2) { + return this.getRepeatJobId({ + name, + nextMillis, + namespace: this.hash(repeatJobKey), + jobId: data === null || data === void 0 ? void 0 : data.id + }); + } + return this.getRepeatDelayedJobId({ + customKey: repeatJobKey, + nextMillis + }); + } + async removeRepeatable(name, repeat, jobId) { + var _a; + const repeatConcatOptions = getRepeatConcatOptions(name, Object.assign(Object.assign({}, repeat), { jobId })); + const repeatJobKey = (_a = repeat.key) !== null && _a !== void 0 ? _a : this.hash(repeatConcatOptions); + const legacyRepeatJobId = this.getRepeatJobId({ + name, + nextMillis: "", + namespace: this.hash(repeatConcatOptions), + jobId: jobId !== null && jobId !== void 0 ? jobId : repeat.jobId, + key: repeat.key + }); + return this.scripts.removeRepeatable(legacyRepeatJobId, repeatConcatOptions, repeatJobKey); + } + async removeRepeatableByKey(repeatJobKey) { + const data = this.keyToData(repeatJobKey); + const legacyRepeatJobId = this.getRepeatJobId({ + name: data.name, + nextMillis: "", + namespace: this.hash(repeatJobKey), + jobId: data.id + }); + return this.scripts.removeRepeatable(legacyRepeatJobId, "", repeatJobKey); + } + async getRepeatableData(client, key, next) { + const jobData = await client.hgetall(this.toKey("repeat:" + key)); + if (jobData) { + return { + key, + name: jobData.name, + endDate: parseInt(jobData.endDate) || null, + tz: jobData.tz || null, + pattern: jobData.pattern || null, + every: jobData.every || null, + next + }; + } + return this.keyToData(key, next); + } + keyToData(key, next) { + const data = key.split(":"); + const pattern = data.slice(4).join(":") || null; + return { + key, + name: data[0], + id: data[1] || null, + endDate: parseInt(data[2]) || null, + tz: data[3] || null, + pattern, + next + }; + } + async getRepeatableJobs(start = 0, end = -1, asc = false) { + const client = await this.client; + const key = this.keys.repeat; + const result = asc ? await client.zrange(key, start, end, { WITHSCORES: true }) : await client.zrevrange(key, start, end, { WITHSCORES: true }); + const jobs = []; + for (let i = 0; i < result.length; i += 2) { + jobs.push(this.getRepeatableData(client, result[i], parseInt(result[i + 1]))); + } + return Promise.all(jobs); + } + async getRepeatableCount() { + const client = await this.client; + return client.zcard(this.toKey("repeat")); + } + hash(str) { + return (0, crypto_1.createHash)(this.repeatKeyHashAlgorithm).update(str).digest("hex"); + } + getRepeatDelayedJobId({ nextMillis, customKey }) { + return `repeat:${customKey}:${nextMillis}`; + } + getRepeatJobId({ name, nextMillis, namespace, jobId, key }) { + const checksum = key !== null && key !== void 0 ? key : this.hash(`${name}${jobId || ""}${namespace}`); + return `repeat:${checksum}:${nextMillis}`; + } + }; + exports2.Repeat = Repeat; + function getRepeatConcatOptions(name, repeat) { + const endDate = repeat.endDate ? new Date(repeat.endDate).getTime() : ""; + const tz = repeat.tz || ""; + const pattern = repeat.pattern; + const suffix = (pattern ? pattern : String(repeat.every)) || ""; + const jobId = repeat.jobId ? repeat.jobId : ""; + return `${name}:${jobId}:${endDate}:${tz}:${suffix}`; + } + var getNextMillis = (millis, opts) => { + const pattern = opts.pattern; + if (pattern && opts.every) { + throw new Error("Both .pattern and .every options are defined for this repeatable job"); + } + if (opts.every) { + return Math.floor(millis / opts.every) * opts.every + (opts.immediately ? 0 : opts.every); + } + const currentDate = opts.startDate && new Date(opts.startDate) > new Date(millis) ? new Date(opts.startDate) : new Date(millis); + const interval = (0, cron_parser_1.parseExpression)(pattern, Object.assign(Object.assign({}, opts), { currentDate })); + try { + if (opts.immediately) { + return (/* @__PURE__ */ new Date()).getTime(); + } else { + return interval.next().getTime(); + } + } catch (e) { + } + }; + exports2.getNextMillis = getNextMillis; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/queue.js +var require_queue2 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/queue.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Queue = void 0; + var job_1 = require_job(); + var queue_getters_1 = require_queue_getters(); + var repeat_1 = require_repeat2(); + var enums_1 = require_enums3(); + var job_scheduler_1 = require_job_scheduler(); + var version_1 = require_version(); + var utils_1 = require_utils16(); + var Queue = class extends queue_getters_1.QueueGetters { + constructor(name, opts, Connection) { + var _a; + super(name, Object.assign({}, opts), Connection); + this.token = (0, utils_1.randomUUID)(); + this.libName = "bullmq"; + this.jobsOpts = (_a = opts === null || opts === void 0 ? void 0 : opts.defaultJobOptions) !== null && _a !== void 0 ? _a : {}; + this.waitUntilReady().then((client) => { + if (!this.closing && !(opts === null || opts === void 0 ? void 0 : opts.skipMetasUpdate)) { + return client.hset(this.keys.meta, this.metaValues); + } + }).catch((err) => { + }); + } + emit(event, ...args) { + return super.emit(event, ...args); + } + off(eventName, listener) { + super.off(eventName, listener); + return this; + } + on(event, listener) { + super.on(event, listener); + return this; + } + once(event, listener) { + super.once(event, listener); + return this; + } + /** + * Returns this instance current default job options. + */ + get defaultJobOptions() { + return Object.assign({}, this.jobsOpts); + } + get metaValues() { + var _a, _b, _c, _d; + return { + "opts.maxLenEvents": (_d = (_c = (_b = (_a = this.opts) === null || _a === void 0 ? void 0 : _a.streams) === null || _b === void 0 ? void 0 : _b.events) === null || _c === void 0 ? void 0 : _c.maxLen) !== null && _d !== void 0 ? _d : 1e4, + version: `${this.libName}:${version_1.version}` + }; + } + /** + * Get library version. + * + * @returns the content of the meta.library field. + */ + async getVersion() { + const client = await this.client; + return await client.hget(this.keys.meta, "version"); + } + get repeat() { + return new Promise(async (resolve) => { + if (!this._repeat) { + this._repeat = new repeat_1.Repeat(this.name, Object.assign(Object.assign({}, this.opts), { connection: await this.client })); + this._repeat.on("error", this.emit.bind(this, "error")); + } + resolve(this._repeat); + }); + } + get jobScheduler() { + return new Promise(async (resolve) => { + if (!this._jobScheduler) { + this._jobScheduler = new job_scheduler_1.JobScheduler(this.name, Object.assign(Object.assign({}, this.opts), { connection: await this.client })); + this._jobScheduler.on("error", this.emit.bind(this, "error")); + } + resolve(this._jobScheduler); + }); + } + /** + * Enable and set global concurrency value. + * @param concurrency - Maximum number of simultaneous jobs that the workers can handle. + * For instance, setting this value to 1 ensures that no more than one job + * is processed at any given time. If this limit is not defined, there will be no + * restriction on the number of concurrent jobs. + */ + async setGlobalConcurrency(concurrency) { + const client = await this.client; + return client.hset(this.keys.meta, { concurrency }); + } + /** + * Enable and set rate limit. + * @param max - Max number of jobs to process in the time period specified in `duration` + * @param duration - Time in milliseconds. During this time, a maximum of `max` jobs will be processed. + */ + async setGlobalRateLimit(max, duration) { + const client = await this.client; + return client.hset(this.keys.meta, { max, duration }); + } + /** + * Remove global concurrency value. + */ + async removeGlobalConcurrency() { + const client = await this.client; + return client.hdel(this.keys.meta, "concurrency"); + } + /** + * Remove global rate limit values. + */ + async removeGlobalRateLimit() { + const client = await this.client; + return client.hdel(this.keys.meta, "max", "duration"); + } + /** + * Adds a new job to the queue. + * + * @param name - Name of the job to be added to the queue. + * @param data - Arbitrary data to append to the job. The value is + * serialized with `JSON.stringify` before being stored in Redis, so it + * must be JSON-serializable. The `DataType` type parameter describes the + * shape of this payload, not a runtime class: passing a class instance + * will store its enumerable own properties, but its prototype methods + * and getters/setters will not be available when a worker reads + * `job.data` back. Prefer plain objects, or implement `toJSON()` on + * the class to control how it is serialized. + * @param opts - Job options that affects how the job is going to be processed. + */ + async add(name, data, opts) { + return this.trace(enums_1.SpanKind.PRODUCER, "add", `${this.name}.${name}`, async (span, srcPropagationMetadata) => { + var _a; + if (srcPropagationMetadata && !((_a = opts === null || opts === void 0 ? void 0 : opts.telemetry) === null || _a === void 0 ? void 0 : _a.omitContext)) { + const telemetry = { + metadata: srcPropagationMetadata + }; + opts = Object.assign(Object.assign({}, opts), { telemetry }); + } + const job = await this.addJob(name, data, opts); + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.JobName]: name, + [enums_1.TelemetryAttributes.JobId]: job.id + }); + return job; + }); + } + /** + * addJob is a telemetry free version of the add method, useful in order to wrap it + * with custom telemetry on subclasses. + * + * @param name - Name of the job to be added to the queue. + * @param data - Arbitrary data to append to the job. + * @param opts - Job options that affects how the job is going to be processed. + * + * @returns Job + */ + async addJob(name, data, opts) { + if (opts && opts.repeat) { + if (opts.repeat.endDate) { + if (+new Date(opts.repeat.endDate) < Date.now()) { + throw new Error("End date must be greater than current timestamp"); + } + } + return (await this.repeat).updateRepeatableJob(name, data, Object.assign(Object.assign({}, this.jobsOpts), opts), { override: true }); + } else { + const jobId = opts === null || opts === void 0 ? void 0 : opts.jobId; + if (jobId == "0" || (jobId === null || jobId === void 0 ? void 0 : jobId.startsWith("0:"))) { + throw new Error("JobId cannot be '0' or start with 0:"); + } + const mergedOpts = Object.assign(Object.assign(Object.assign({}, this.jobsOpts), opts), { jobId }); + const job = await this.Job.create(this, name, data, mergedOpts); + this.emit("waiting", job); + return job; + } + } + /** + * Adds an array of jobs to the queue. This method may be faster than adding + * one job at a time in a sequence. + * + * @param jobs - The array of jobs to add to the queue. Each job is defined by 3 + * properties, 'name', 'data' and 'opts'. They follow the same signature as 'Queue.add', + * including the JSON-serialization caveat for `data` (class instances lose their + * prototype methods on the worker side). + */ + async addBulk(jobs) { + return this.trace(enums_1.SpanKind.PRODUCER, "addBulk", this.name, async (span, srcPropagationMetadata) => { + if (span) { + span.setAttributes({ + [enums_1.TelemetryAttributes.BulkNames]: jobs.map((job) => job.name), + [enums_1.TelemetryAttributes.BulkCount]: jobs.length + }); + } + return await this.Job.createBulk(this, jobs.map((job) => { + var _a, _b, _c, _d, _e, _f; + let telemetry = (_a = job.opts) === null || _a === void 0 ? void 0 : _a.telemetry; + if (srcPropagationMetadata) { + const omitContext = (_c = (_b = job.opts) === null || _b === void 0 ? void 0 : _b.telemetry) === null || _c === void 0 ? void 0 : _c.omitContext; + const telemetryMetadata = ((_e = (_d = job.opts) === null || _d === void 0 ? void 0 : _d.telemetry) === null || _e === void 0 ? void 0 : _e.metadata) || !omitContext && srcPropagationMetadata; + if (telemetryMetadata || omitContext) { + telemetry = { + metadata: telemetryMetadata, + omitContext + }; + } + } + const mergedOpts = Object.assign(Object.assign(Object.assign({}, this.jobsOpts), job.opts), { jobId: (_f = job.opts) === null || _f === void 0 ? void 0 : _f.jobId, telemetry }); + return { + name: job.name, + data: job.data, + opts: mergedOpts + }; + })); + }); + } + /** + * Upserts a scheduler. + * + * A scheduler is a job factory that creates jobs at a given interval. + * Upserting a scheduler will create a new job scheduler or update an existing one. + * It will also create the first job based on the repeat options and delayed accordingly. + * + * @param key - Unique key for the repeatable job meta. + * @param repeatOpts - Repeat options + * @param jobTemplate - Job template. If provided it will be used for all the jobs + * created by the scheduler. + * + * @returns The next job to be scheduled (would normally be in delayed state). + */ + async upsertJobScheduler(jobSchedulerId, repeatOpts, jobTemplate) { + var _a, _b; + if (repeatOpts.endDate) { + if (+new Date(repeatOpts.endDate) < Date.now()) { + throw new Error("End date must be greater than current timestamp"); + } + } + return (await this.jobScheduler).upsertJobScheduler(jobSchedulerId, repeatOpts, (_a = jobTemplate === null || jobTemplate === void 0 ? void 0 : jobTemplate.name) !== null && _a !== void 0 ? _a : jobSchedulerId, (_b = jobTemplate === null || jobTemplate === void 0 ? void 0 : jobTemplate.data) !== null && _b !== void 0 ? _b : {}, Object.assign(Object.assign({}, this.jobsOpts), jobTemplate === null || jobTemplate === void 0 ? void 0 : jobTemplate.opts), { override: true }); + } + /** + * Pauses the processing of this queue globally. + * + * We use an atomic RENAME operation on the wait queue. Since + * we have blocking calls with BRPOPLPUSH on the wait queue, as long as the queue + * is renamed to 'paused', no new jobs will be processed (the current ones + * will run until finalized). + * + * Adding jobs requires a LUA script to check first if the paused list exist + * and in that case it will add it there instead of the wait list. + */ + async pause() { + await this.trace(enums_1.SpanKind.INTERNAL, "pause", this.name, async () => { + await this.scripts.pause(true); + this.emit("paused"); + }); + } + /** + * Close the queue instance. + * + */ + async close() { + await this.trace(enums_1.SpanKind.INTERNAL, "close", this.name, async () => { + if (!this.closing) { + if (this._repeat) { + await this._repeat.close(); + } + } + await super.close(); + }); + } + /** + * Overrides the rate limit to be active for the next jobs. + * + * @param expireTimeMs - expire time in ms of this rate limit. + */ + async rateLimit(expireTimeMs) { + await this.trace(enums_1.SpanKind.INTERNAL, "rateLimit", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.QueueRateLimit]: expireTimeMs + }); + await this.client.then((client) => client.set(this.keys.limiter, Number.MAX_SAFE_INTEGER, { + PX: expireTimeMs + })); + }); + } + /** + * Resumes the processing of this queue globally. + * + * The method reverses the pause operation by resuming the processing of the + * queue. + */ + async resume() { + await this.trace(enums_1.SpanKind.INTERNAL, "resume", this.name, async () => { + await this.scripts.pause(false); + this.emit("resumed"); + }); + } + /** + * Returns true if the queue is currently paused. + */ + async isPaused() { + const client = await this.client; + const pausedKeyExists = await client.hexists(this.keys.meta, "paused"); + return pausedKeyExists === 1; + } + /** + * Returns true if the queue is currently maxed. + */ + isMaxed() { + return this.scripts.isMaxed(); + } + /** + * Get all repeatable meta jobs. + * + * @deprecated This method is deprecated and will be removed in v6. Use getJobSchedulers instead. + * + * @param start - Offset of first job to return. + * @param end - Offset of last job to return. + * @param asc - Determine the order in which jobs are returned based on their + * next execution time. + */ + async getRepeatableJobs(start, end, asc) { + return (await this.repeat).getRepeatableJobs(start, end, asc); + } + /** + * Get Job Scheduler by id + * + * @param id - identifier of scheduler. + */ + async getJobScheduler(id) { + return (await this.jobScheduler).getScheduler(id); + } + /** + * Get all Job Schedulers + * + * @param start - Offset of first scheduler to return. + * @param end - Offset of last scheduler to return. + * @param asc - Determine the order in which schedulers are returned based on their + * next execution time. + */ + async getJobSchedulers(start, end, asc) { + return (await this.jobScheduler).getJobSchedulers(start, end, asc); + } + /** + * + * Get the number of job schedulers. + * + * @returns The number of job schedulers. + */ + async getJobSchedulersCount() { + return (await this.jobScheduler).getSchedulersCount(); + } + /** + * Removes a repeatable job. + * + * Note: you need to use the exact same repeatOpts when deleting a repeatable job + * than when adding it. + * + * @deprecated This method is deprecated and will be removed in v6. Use removeJobScheduler instead. + * + * @see removeRepeatableByKey + * + * @param name - Job name + * @param repeatOpts - Repeat options + * @param jobId - Job id to remove. If not provided, all jobs with the same repeatOpts + * @returns + */ + async removeRepeatable(name, repeatOpts, jobId) { + return this.trace(enums_1.SpanKind.INTERNAL, "removeRepeatable", `${this.name}.${name}`, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.JobName]: name, + [enums_1.TelemetryAttributes.JobId]: jobId + }); + const repeat = await this.repeat; + const removed = await repeat.removeRepeatable(name, repeatOpts, jobId); + return !removed; + }); + } + /** + * + * Removes a job scheduler. + * + * @param jobSchedulerId - identifier of the job scheduler. + * + * @returns + */ + async removeJobScheduler(jobSchedulerId) { + const jobScheduler = await this.jobScheduler; + const removed = await jobScheduler.removeJobScheduler(jobSchedulerId); + return !removed; + } + /** + * Removes a debounce key. + * @deprecated use removeDeduplicationKey + * + * @param id - debounce identifier + */ + async removeDebounceKey(id) { + return this.trace(enums_1.SpanKind.INTERNAL, "removeDebounceKey", `${this.name}`, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.JobKey]: id + }); + const client = await this.client; + return await client.del(`${this.keys.de}:${id}`); + }); + } + /** + * Removes a deduplication key. + * + * @param id - identifier + */ + async removeDeduplicationKey(id) { + return this.trace(enums_1.SpanKind.INTERNAL, "removeDeduplicationKey", `${this.name}`, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.DeduplicationKey]: id + }); + const client = await this.client; + return client.del(`${this.keys.de}:${id}`); + }); + } + /** + * Removes rate limit key. + */ + async removeRateLimitKey() { + const client = await this.client; + return client.del(this.keys.limiter); + } + /** + * Removes a repeatable job by its key. Note that the key is the one used + * to store the repeatable job metadata and not one of the job iterations + * themselves. You can use "getRepeatableJobs" in order to get the keys. + * + * @see getRepeatableJobs + * + * @deprecated This method is deprecated and will be removed in v6. Use removeJobScheduler instead. + * + * @param repeatJobKey - To the repeatable job. + * @returns + */ + async removeRepeatableByKey(key) { + return this.trace(enums_1.SpanKind.INTERNAL, "removeRepeatableByKey", `${this.name}`, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.JobKey]: key + }); + const repeat = await this.repeat; + const removed = await repeat.removeRepeatableByKey(key); + return !removed; + }); + } + /** + * Removes the given job from the queue as well as all its + * dependencies. + * + * @param jobId - The id of the job to remove + * @param opts - Options to remove a job + * @returns 1 if it managed to remove the job or 0 if the job or + * any of its dependencies were locked. + */ + async remove(jobId, { removeChildren = true } = {}) { + return this.trace(enums_1.SpanKind.INTERNAL, "remove", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.JobId]: jobId, + [enums_1.TelemetryAttributes.JobOptions]: JSON.stringify({ + removeChildren + }) + }); + const code = await this.scripts.remove(jobId, removeChildren); + if (code === 1) { + this.emit("removed", jobId); + } + return code; + }); + } + /** + * Updates the given job's progress. + * + * @param jobId - The id of the job to update + * @param progress - Number or object to be saved as progress. + */ + async updateJobProgress(jobId, progress) { + await this.trace(enums_1.SpanKind.INTERNAL, "updateJobProgress", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.JobId]: jobId, + [enums_1.TelemetryAttributes.JobProgress]: JSON.stringify(progress) + }); + await this.scripts.updateProgress(jobId, progress); + this.emit("progress", jobId, progress); + }); + } + /** + * Logs one row of job's log data. + * + * @param jobId - The job id to log against. + * @param logRow - String with log data to be logged. + * @param keepLogs - Max number of log entries to keep (0 for unlimited). + * + * @returns The total number of log entries for this job so far. + */ + async addJobLog(jobId, logRow, keepLogs) { + return job_1.Job.addJobLog(this, jobId, logRow, keepLogs); + } + /** + * Drains the queue, i.e., removes all jobs that are waiting + * or delayed, but not active, completed or failed. + * + * @param delayed - Pass true if it should also clean the + * delayed jobs. + */ + async drain(delayed = false) { + await this.trace(enums_1.SpanKind.INTERNAL, "drain", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.QueueDrainDelay]: delayed + }); + await this.scripts.drain(delayed); + }); + } + /** + * Cleans jobs from a queue. Similar to drain but keeps jobs within a certain + * grace period. + * + * @param grace - The grace period in milliseconds + * @param limit - Max number of jobs to clean + * @param type - The type of job to clean + * Possible values are completed, wait, active, paused, delayed, failed. Defaults to completed. + * @returns Id jobs from the deleted records + */ + async clean(grace, limit, type = "completed") { + return this.trace(enums_1.SpanKind.INTERNAL, "clean", this.name, async (span) => { + const maxCount = limit || Infinity; + const maxCountPerCall = Math.min(1e4, maxCount); + const timestamp = Date.now() - grace; + let deletedCount = 0; + const deletedJobsIds = []; + const normalizedType = type === "waiting" ? "wait" : type; + while (deletedCount < maxCount) { + const jobsIds = await this.scripts.cleanJobsInSet(normalizedType, timestamp, maxCountPerCall); + this.emit("cleaned", jobsIds, normalizedType); + deletedCount += jobsIds.length; + deletedJobsIds.push(...jobsIds); + if (jobsIds.length < maxCountPerCall) { + break; + } + } + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.QueueGrace]: grace, + [enums_1.TelemetryAttributes.JobType]: type, + [enums_1.TelemetryAttributes.QueueCleanLimit]: maxCount, + [enums_1.TelemetryAttributes.JobIds]: deletedJobsIds + }); + return deletedJobsIds; + }); + } + /** + * Completely destroys the queue and all of its contents irreversibly. + * This method will *pause* the queue and requires that there are no + * active jobs. It is possible to bypass this requirement, i.e. not + * having active jobs using the "force" option. + * + * Note: This operation requires to iterate on all the jobs stored in the queue + * and can be slow for very large queues. + * + * @param opts - Obliterate options. + */ + async obliterate(opts) { + await this.trace(enums_1.SpanKind.INTERNAL, "obliterate", this.name, async () => { + await this.pause(); + let cursor = 0; + do { + cursor = await this.scripts.obliterate(Object.assign({ force: false, count: 1e3 }, opts)); + } while (cursor); + }); + } + /** + * Retry all the failed or completed jobs. + * + * @param opts - An object with the following properties: + * - count number to limit how many jobs will be moved to wait status per iteration, + * - state failed by default or completed. + * - timestamp from which timestamp to start moving jobs to wait status, default Date.now(). + * + * @returns + */ + async retryJobs(opts = {}) { + await this.trace(enums_1.SpanKind.PRODUCER, "retryJobs", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.QueueOptions]: JSON.stringify(opts) + }); + let cursor = 0; + do { + cursor = await this.scripts.retryJobs(opts.state, opts.count, opts.timestamp); + } while (cursor); + }); + } + /** + * Promote all the delayed jobs. + * + * @param opts - An object with the following properties: + * - count number to limit how many jobs will be moved to wait status per iteration + * + * @returns + */ + async promoteJobs(opts = {}) { + await this.trace(enums_1.SpanKind.INTERNAL, "promoteJobs", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.QueueOptions]: JSON.stringify(opts) + }); + let cursor = 0; + do { + cursor = await this.scripts.promoteJobs(opts.count); + } while (cursor); + }); + } + /** + * Trim the event stream to an approximately maxLength. + * + * @param maxLength - The approximate maximum length, or target length, of the event stream. + */ + async trimEvents(maxLength) { + return this.trace(enums_1.SpanKind.INTERNAL, "trimEvents", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.QueueEventMaxLength]: maxLength + }); + const client = await this.client; + return await client.xtrim(this.keys.events, "MAXLEN", maxLength, { + approximate: true + }); + }); + } + /** + * Delete old priority helper key. + */ + async removeDeprecatedPriorityKey() { + const client = await this.client; + return client.del(this.toKey("priority")); + } + /** + * Removes orphaned job keys that exist in Redis but are not referenced + * in any queue state set. + * + * Orphaned keys can occur in rare cases when the removal-by-max-age logic + * removes sorted-set entries without fully cleaning up the corresponding + * job hash data (a regression introduced in v5.66.6 via #3694). + * Under normal operation this method is + * **not needed** — it is provided only as a one-time migration helper for + * users who were affected by that specific bug and want to reclaim the + * leaked memory. + * + * The method uses a Lua script so that every check-and-delete cycle is + * atomic (per SCAN iteration). State keys are derived dynamically from + * the queue's key map and their Redis TYPE is checked at runtime, so newly + * introduced states are picked up automatically. + * + * @param count - Approximate number of keys to SCAN per iteration (default 1000). + * @param limit - Maximum number of orphaned jobs to remove (0 = unlimited). + * When set, the method returns as soon as the limit is reached. + * Users with a very large number of orphans can call this method + * in a loop: `while (await queue.removeOrphanedJobs(1000, 10000)) {}` + * @returns The total number of orphaned jobs that were removed. + */ + async removeOrphanedJobs(count = 1e3, limit = 0) { + const client = await this.client; + const knownSuffixes = new Set(Object.keys(this.keys)); + const stateKeySuffixes = Object.keys(this.keys).filter((s) => s !== ""); + const jobSubKeySuffixes = [ + "logs", + "dependencies", + "processed", + "failed", + "unsuccessful", + "lock" + ]; + const basePrefix = this.qualifiedName + ":"; + const scanPattern = basePrefix + "*"; + let totalRemoved = 0; + let cursor = "0"; + do { + const [nextCursor, keys] = await client.scan(cursor, { + MATCH: scanPattern, + COUNT: count + }); + cursor = nextCursor; + const candidateJobIds = /* @__PURE__ */ new Set(); + for (const key of keys) { + const suffix = key.slice(basePrefix.length); + if (knownSuffixes.has(suffix)) { + continue; + } + const colonIdx = suffix.indexOf(":"); + if (colonIdx !== -1) { + const prefixPart = suffix.slice(0, colonIdx); + if (knownSuffixes.has(prefixPart)) { + continue; + } + } + const jobId = colonIdx === -1 ? suffix : suffix.slice(0, colonIdx); + if (colonIdx !== -1) { + const subKey = suffix.slice(colonIdx + 1); + if (!jobSubKeySuffixes.includes(subKey)) { + continue; + } + } + candidateJobIds.add(jobId); + } + if (candidateJobIds.size === 0) { + continue; + } + const result = await this.scripts.removeOrphanedJobs([...candidateJobIds], stateKeySuffixes, jobSubKeySuffixes); + totalRemoved += result || 0; + if (limit > 0 && totalRemoved >= limit) { + break; + } + } while (cursor !== "0"); + return totalRemoved; + } + }; + exports2.Queue = Queue; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/sandbox.js +var require_sandbox = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/sandbox.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var enums_1 = require_enums3(); + var sandbox = (processFile, childPool) => { + return async function process3(job, token, signal) { + let child; + let msgHandler; + let exitHandler; + let abortHandler; + try { + const done = new Promise((resolve, reject) => { + const initChild = async () => { + try { + exitHandler = (exitCode, signal2) => { + reject(new Error("Unexpected exit code: " + exitCode + " signal: " + signal2)); + }; + child = await childPool.retain(processFile); + child.on("exit", exitHandler); + msgHandler = async (msg) => { + var _a, _b, _c, _d, _e, _f; + try { + switch (msg.cmd) { + case enums_1.ParentCommand.Completed: + resolve(msg.value); + break; + case enums_1.ParentCommand.Failed: + case enums_1.ParentCommand.Error: { + const err = new Error(); + Object.assign(err, (_a = msg.value) !== null && _a !== void 0 ? _a : msg.err); + reject(err); + break; + } + case enums_1.ParentCommand.Progress: + await job.updateProgress(msg.value); + break; + case enums_1.ParentCommand.Log: + await job.log(msg.value); + break; + case enums_1.ParentCommand.MoveToDelayed: + await job.moveToDelayed((_b = msg.value) === null || _b === void 0 ? void 0 : _b.timestamp, (_c = msg.value) === null || _c === void 0 ? void 0 : _c.token); + break; + case enums_1.ParentCommand.MoveToWait: + await job.moveToWait((_d = msg.value) === null || _d === void 0 ? void 0 : _d.token); + break; + case enums_1.ParentCommand.MoveToWaitingChildren: + { + const value = await job.moveToWaitingChildren((_e = msg.value) === null || _e === void 0 ? void 0 : _e.token, (_f = msg.value) === null || _f === void 0 ? void 0 : _f.opts); + child.send({ + requestId: msg.requestId, + cmd: enums_1.ChildCommand.MoveToWaitingChildrenResponse, + value + }); + } + break; + case enums_1.ParentCommand.Update: + await job.updateData(msg.value); + break; + case enums_1.ParentCommand.GetChildrenValues: + { + const value = await job.getChildrenValues(); + child.send({ + requestId: msg.requestId, + cmd: enums_1.ChildCommand.GetChildrenValuesResponse, + value + }); + } + break; + case enums_1.ParentCommand.GetIgnoredChildrenFailures: + { + const value = await job.getIgnoredChildrenFailures(); + child.send({ + requestId: msg.requestId, + cmd: enums_1.ChildCommand.GetIgnoredChildrenFailuresResponse, + value + }); + } + break; + case enums_1.ParentCommand.GetDependenciesCount: + { + const value = await job.getDependenciesCount(msg.value); + child.send({ + requestId: msg.requestId, + cmd: enums_1.ChildCommand.GetDependenciesCountResponse, + value + }); + } + break; + case enums_1.ParentCommand.GetDependencies: + { + const value = await job.getDependencies(msg.value); + child.send({ + requestId: msg.requestId, + cmd: enums_1.ChildCommand.GetDependenciesResponse, + value + }); + } + break; + } + } catch (err) { + reject(err); + } + }; + child.on("message", msgHandler); + child.send({ + cmd: enums_1.ChildCommand.Start, + job: job.asJSONSandbox(), + token + }); + if (signal) { + abortHandler = () => { + try { + child.send({ + cmd: enums_1.ChildCommand.Cancel, + value: signal.reason + }); + } catch (_a) { + } + }; + if (signal.aborted) { + abortHandler(); + } else { + signal.addEventListener("abort", abortHandler, { once: true }); + } + } + } catch (error) { + reject(error); + } + }; + initChild(); + }); + await done; + return done; + } finally { + if (signal && abortHandler) { + signal.removeEventListener("abort", abortHandler); + } + if (child) { + child.off("message", msgHandler); + child.off("exit", exitHandler); + if (child.exitCode === null && child.signalCode === null) { + childPool.release(child); + } + } + } + }; + }; + exports2.default = sandbox; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/worker.js +var require_worker = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/worker.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Worker = void 0; + var fs = require("fs"); + var url_1 = require("url"); + var path = require("path"); + var abort_controller_1 = require_abort_controller(); + var utils_1 = require_utils16(); + var queue_base_1 = require_queue_base(); + var repeat_1 = require_repeat2(); + var child_pool_1 = require_child_pool(); + var redis_connection_1 = require_redis_connection(); + var ioredis_client_1 = require_ioredis_client(); + var sandbox_1 = require_sandbox(); + var async_fifo_queue_1 = require_async_fifo_queue(); + var errors_1 = require_errors3(); + var enums_1 = require_enums3(); + var job_scheduler_1 = require_job_scheduler(); + var lock_manager_1 = require_lock_manager(); + var maximumBlockTimeout = 10; + var Worker = class extends queue_base_1.QueueBase { + static RateLimitError() { + return new errors_1.RateLimitError(); + } + constructor(name, processor, opts, Connection) { + super(name, Object.assign(Object.assign({ drainDelay: 5, concurrency: 1, lockDuration: 3e4, maximumRateLimitDelay: 3e4, maxStalledCount: 1, stalledInterval: 3e4, autorun: true, runRetryDelay: 15e3 }, opts), { blockingConnection: true }), Connection); + this.abortDelayController = null; + this.blockUntil = 0; + this.drained = false; + this.limitUntil = 0; + this.processorAcceptsSignal = false; + this.stalledCheckerRunning = false; + this.waiting = null; + this.running = false; + this.mainLoopRunning = null; + if (!opts || !opts.connection) { + throw new Error("Worker requires a connection"); + } + if (typeof this.opts.maxStalledCount !== "number" || this.opts.maxStalledCount < 0) { + throw new Error("maxStalledCount must be greater or equal than 0"); + } + if (typeof this.opts.maxStartedAttempts === "number" && this.opts.maxStartedAttempts < 0) { + throw new Error("maxStartedAttempts must be greater or equal than 0"); + } + if (typeof this.opts.stalledInterval !== "number" || this.opts.stalledInterval <= 0) { + throw new Error("stalledInterval must be greater than 0"); + } + if (typeof this.opts.drainDelay !== "number" || this.opts.drainDelay <= 0) { + throw new Error("drainDelay must be greater than 0"); + } + this.concurrency = this.opts.concurrency; + this.opts.lockRenewTime = this.opts.lockRenewTime || this.opts.lockDuration / 2; + this.id = (0, utils_1.randomUUID)(); + this.createLockManager(); + if (processor) { + if (typeof processor === "function") { + this.processFn = processor; + this.processorAcceptsSignal = processor.length >= 3; + } else { + if (processor instanceof url_1.URL) { + if (!fs.existsSync(processor)) { + throw new Error(`URL ${processor} does not exist in the local file system`); + } + processor = processor.href; + } else { + const supportedFileTypes = [".js", ".ts", ".flow", ".cjs", ".mjs"]; + const processorFile = processor + (supportedFileTypes.includes(path.extname(processor)) ? "" : ".js"); + if (!fs.existsSync(processorFile)) { + throw new Error(`File ${processorFile} does not exist`); + } + } + const dirname = path.dirname(module2.filename || __filename); + const workerThreadsMainFile = path.join(dirname, "main-worker.js"); + const spawnProcessMainFile = path.join(dirname, "main.js"); + let mainFilePath = this.opts.useWorkerThreads ? workerThreadsMainFile : spawnProcessMainFile; + try { + fs.statSync(mainFilePath); + } catch (_2) { + const mainFile = this.opts.useWorkerThreads ? "main-worker.js" : "main.js"; + mainFilePath = path.join(process.cwd(), `dist/cjs/classes/${mainFile}`); + fs.statSync(mainFilePath); + } + this.childPool = new child_pool_1.ChildPool({ + mainFile: mainFilePath, + useWorkerThreads: this.opts.useWorkerThreads, + workerForkOptions: this.opts.workerForkOptions, + workerThreadsOptions: this.opts.workerThreadsOptions + }); + this.createSandbox(processor); + this.processorAcceptsSignal = true; + } + if (this.opts.autorun) { + this.run().catch((error) => this.emit("error", error)); + } + } + const connectionName = this.clientName() + (this.opts.name ? `:w:${this.opts.name}` : ""); + this.blockingConnection = new redis_connection_1.RedisConnection((0, utils_1.isRedisInstance)(opts.connection) ? ((0, ioredis_client_1.isIRedisClient)(opts.connection) ? opts.connection : (0, ioredis_client_1.createIORedisClient)(opts.connection)).duplicate({ connectionName }) : Object.assign(Object.assign({}, opts.connection), { connectionName }), { + shared: false, + blocking: true, + skipVersionCheck: opts.skipVersionCheck + }); + (0, utils_1.forwardConnectionError)(this, this.blockingConnection); + this.blockingConnection.on("ready", () => setTimeout(() => this.emit("ready"), 0)); + } + /** + * Creates and configures the lock manager for processing jobs. + * This method can be overridden in subclasses to customize lock manager behavior. + */ + createLockManager() { + this.lockManager = new lock_manager_1.LockManager(this, { + lockRenewTime: this.opts.lockRenewTime, + lockDuration: this.opts.lockDuration, + workerId: this.id, + workerName: this.opts.name + }); + } + /** + * Creates and configures the sandbox for processing jobs. + * This method can be overridden in subclasses to customize sandbox behavior. + * + * @param processor - The processor file path, URL, or function to be sandboxed + */ + createSandbox(processor) { + this.processFn = (0, sandbox_1.default)(processor, this.childPool).bind(this); + } + /** + * Public accessor method for LockManager to extend locks. + * This delegates to the protected scripts object. + */ + async extendJobLocks(jobIds, tokens, duration) { + return this.scripts.extendLocks(jobIds, tokens, duration); + } + emit(event, ...args) { + return super.emit(event, ...args); + } + off(eventName, listener) { + super.off(eventName, listener); + return this; + } + on(event, listener) { + super.on(event, listener); + return this; + } + once(event, listener) { + super.once(event, listener); + return this; + } + callProcessJob(job, token, signal) { + return this.processFn(job, token, signal); + } + createJob(data, jobId) { + return this.Job.fromJSON(this, data, jobId); + } + /** + * + * Waits until the worker is ready to start processing jobs. + * In general only useful when writing tests. + * + */ + async waitUntilReady() { + await super.waitUntilReady(); + return this.blockingConnection.client; + } + /** + * Cancels a specific job currently being processed by this worker. + * The job's processor function will receive an abort signal. + * + * @param jobId - The ID of the job to cancel + * @param reason - Optional reason for the cancellation + * @returns true if the job was found and cancelled, false otherwise + */ + cancelJob(jobId, reason) { + return this.lockManager.cancelJob(jobId, reason); + } + /** + * Cancels all jobs currently being processed by this worker. + * All active job processor functions will receive abort signals. + * + * @param reason - Optional reason for the cancellation + */ + cancelAllJobs(reason) { + this.lockManager.cancelAllJobs(reason); + } + set concurrency(concurrency) { + if (typeof concurrency !== "number" || concurrency < 1 || !isFinite(concurrency)) { + throw new Error("concurrency must be a finite number greater than 0"); + } + this._concurrency = concurrency; + } + get concurrency() { + return this._concurrency; + } + get repeat() { + return new Promise(async (resolve) => { + if (!this._repeat) { + const connection = await this.client; + this._repeat = new repeat_1.Repeat(this.name, Object.assign(Object.assign({}, this.opts), { connection })); + this._repeat.on("error", this.emit.bind(this, "error")); + } + resolve(this._repeat); + }); + } + get jobScheduler() { + return new Promise(async (resolve) => { + if (!this._jobScheduler) { + const connection = await this.client; + this._jobScheduler = new job_scheduler_1.JobScheduler(this.name, Object.assign(Object.assign({}, this.opts), { connection })); + this._jobScheduler.on("error", this.emit.bind(this, "error")); + } + resolve(this._jobScheduler); + }); + } + async run() { + if (!this.processFn) { + throw new Error("No process function is defined."); + } + if (this.running) { + throw new Error("Worker is already running."); + } + try { + this.running = true; + if (this.closing || this.paused) { + return; + } + await this.startStalledCheckTimer(); + if (!this.opts.skipLockRenewal) { + this.lockManager.start(); + } + const client = await this.client; + const bclient = await this.blockingConnection.client; + this.mainLoopRunning = this.mainLoop(client, bclient); + await this.mainLoopRunning; + } finally { + this.running = false; + } + } + async waitForRateLimit() { + var _a; + const limitUntil = this.limitUntil; + if (limitUntil > Date.now()) { + (_a = this.abortDelayController) === null || _a === void 0 ? void 0 : _a.abort(); + this.abortDelayController = new abort_controller_1.AbortController(); + const delay = this.getRateLimitDelay(limitUntil - Date.now()); + await this.delay(delay, this.abortDelayController); + this.drained = false; + this.limitUntil = 0; + } + } + /** + * This is the main loop in BullMQ. Its goals are to fetch jobs from the queue + * as efficiently as possible, providing concurrency and minimal unnecessary calls + * to Redis. + */ + async mainLoop(client, bclient) { + const asyncFifoQueue = new async_fifo_queue_1.AsyncFifoQueue(); + let tokenPostfix = 0; + while (!this.closing && !this.paused || asyncFifoQueue.numTotal() > 0) { + while (!this.closing && !this.paused && !this.waiting && asyncFifoQueue.numTotal() < this._concurrency && !this.isRateLimited()) { + const token = `${this.id}:${tokenPostfix++}`; + const fetchedJob = this.retryIfFailed(() => this._getNextJob(client, bclient, token, { block: true }), { + delayInMs: this.opts.runRetryDelay, + onlyEmitError: true + }); + asyncFifoQueue.add(fetchedJob); + if (this.waiting && asyncFifoQueue.numTotal() > 1) { + break; + } + const job2 = await fetchedJob; + if (!job2 && asyncFifoQueue.numTotal() > 1) { + break; + } + if (this.blockUntil) { + break; + } + } + let job; + do { + job = await asyncFifoQueue.fetch(); + } while (!job && asyncFifoQueue.numQueued() > 0); + if (job) { + const token = job.token; + asyncFifoQueue.add(this.processJob(job, token, () => asyncFifoQueue.numTotal() <= this._concurrency)); + } else if (asyncFifoQueue.numQueued() === 0) { + await this.waitForRateLimit(); + } + } + } + /** + * Returns a promise that resolves to the next job in queue. + * @param token - worker token to be assigned to retrieved job + * @returns a Job or undefined if no job was available in the queue. + */ + async getNextJob(token, { block = true } = {}) { + let nextJob = await this.getTracedNextJob(token, { block }); + while (nextJob) { + const unrecoverableErrorMessage = this.getUnrecoverableErrorMessage(nextJob); + if (!unrecoverableErrorMessage) { + break; + } + await this.handleFailed(new errors_1.UnrecoverableError(unrecoverableErrorMessage), nextJob, token, () => false); + nextJob = await this.getTracedNextJob(token, { block }); + } + return nextJob; + } + async getTracedNextJob(token, { block = true } = {}) { + var _a, _b; + const nextJob = await this._getNextJob(await this.client, await this.blockingConnection.client, token, { block }); + return this.trace(enums_1.SpanKind.INTERNAL, "getNextJob", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.WorkerId]: this.id, + [enums_1.TelemetryAttributes.QueueName]: this.name, + [enums_1.TelemetryAttributes.WorkerName]: this.opts.name, + [enums_1.TelemetryAttributes.WorkerOptions]: JSON.stringify({ block }), + [enums_1.TelemetryAttributes.JobId]: nextJob === null || nextJob === void 0 ? void 0 : nextJob.id + }); + return nextJob; + }, (_b = (_a = nextJob === null || nextJob === void 0 ? void 0 : nextJob.opts) === null || _a === void 0 ? void 0 : _a.telemetry) === null || _b === void 0 ? void 0 : _b.metadata); + } + async _getNextJob(client, bclient, token, { block = true } = {}) { + if (this.paused) { + return; + } + if (this.closing) { + return; + } + let job; + if (this.drained && block && !this.limitUntil && !this.waiting) { + this.waiting = this.waitForJob(bclient, this.blockUntil); + try { + this.blockUntil = await this.waiting; + if (this.blockUntil <= 0 || this.blockUntil - Date.now() < 1) { + job = await this.moveToActive(client, token, this.opts.name); + } + } finally { + this.waiting = null; + } + } else { + if (!this.isRateLimited()) { + job = await this.moveToActive(client, token, this.opts.name); + } + } + return job; + } + /** + * Overrides the rate limit to be active for the next jobs. + * @deprecated This method is deprecated and will be removed in v6. Use queue.rateLimit method instead. + * @param expireTimeMs - expire time in ms of this rate limit. + */ + async rateLimit(expireTimeMs) { + await this.trace(enums_1.SpanKind.INTERNAL, "rateLimit", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.WorkerId]: this.id, + [enums_1.TelemetryAttributes.WorkerRateLimit]: expireTimeMs + }); + await this.client.then((client) => client.set(this.keys.limiter, Number.MAX_SAFE_INTEGER, { + PX: expireTimeMs + })); + }); + } + get minimumBlockTimeout() { + return this.blockingConnection.capabilities.canBlockFor1Ms ? ( + /* 1 millisecond is chosen because the granularity of our timestamps are milliseconds. + Obviously we can still process much faster than 1 job per millisecond but delays and rate limits + will never work with more accuracy than 1ms. */ + 1e-3 + ) : 2e-3; + } + isRateLimited() { + return this.limitUntil > Date.now(); + } + async moveToActive(client, token, name) { + const [jobData, id, rateLimitDelay, delayUntil] = await this.scripts.moveToActive(client, token, name); + this.updateDelays(rateLimitDelay, delayUntil); + return this.nextJobFromJobData(jobData, id, token); + } + async waitForJob(bclient, blockUntil) { + if (this.paused) { + return Infinity; + } + let timeout; + try { + if (!this.closing && !this.isRateLimited()) { + let blockTimeout = this.getBlockTimeout(blockUntil); + if (blockTimeout > 0) { + blockTimeout = this.blockingConnection.capabilities.canDoubleTimeout ? blockTimeout : Math.ceil(blockTimeout); + timeout = setTimeout(async () => { + bclient.disconnect(!this.closing); + }, blockTimeout * 1e3 + 1e3); + this.updateDelays(); + const result = await bclient.bzpopmin(this.keys.marker, blockTimeout); + if (result) { + const [, member, score] = result; + if (member) { + const newBlockUntil = parseInt(score); + if (blockUntil && newBlockUntil > blockUntil) { + return blockUntil; + } + return newBlockUntil; + } + } + } + return 0; + } + } catch (error) { + if ((0, utils_1.isNotConnectionError)(error)) { + this.emit("error", error); + } + if (!this.closing && bclient.status === "end") { + try { + await bclient.connect(); + } catch (reconnectError) { + if (bclient.status === "end" && (0, utils_1.isNotConnectionError)(reconnectError)) { + this.emit("error", reconnectError); + } + } + } + if (!this.closing) { + await this.delay(); + } + } finally { + clearTimeout(timeout); + } + return Infinity; + } + getBlockTimeout(blockUntil) { + const opts = this.opts; + if (blockUntil) { + const blockDelay = blockUntil - Date.now(); + if (blockDelay <= 0) { + return blockDelay; + } else if (blockDelay < this.minimumBlockTimeout * 1e3) { + return this.minimumBlockTimeout; + } else { + return Math.min(blockDelay / 1e3, maximumBlockTimeout); + } + } else { + return Math.max(opts.drainDelay, this.minimumBlockTimeout); + } + } + getRateLimitDelay(delay) { + return Math.min(delay, this.opts.maximumRateLimitDelay); + } + /** + * + * This function is exposed only for testing purposes. + */ + async delay(milliseconds, abortController) { + await (0, utils_1.delay)(milliseconds || utils_1.DELAY_TIME_1, abortController); + } + updateDelays(limitDelay = 0, delayUntil = 0) { + const clampedLimit = Math.max(limitDelay, 0); + if (clampedLimit > 0) { + this.limitUntil = Date.now() + clampedLimit; + } else { + this.limitUntil = 0; + } + this.blockUntil = Math.max(delayUntil, 0) || 0; + } + async nextJobFromJobData(jobData, jobId, token) { + if (!jobData) { + if (!this.drained) { + this.emit("drained"); + this.drained = true; + } + } else { + this.drained = false; + const job = this.createJob(jobData, jobId); + job.token = token; + try { + await this.retryIfFailed(async () => { + const hasRepeatJobKey = !!job.repeatJobKey; + const hasLegacyKeyShape = hasRepeatJobKey && job.repeatJobKey.split(":").length >= 5; + let isJobScheduler = hasRepeatJobKey && !hasLegacyKeyShape; + if (hasLegacyKeyShape) { + const jobScheduler = await this.jobScheduler; + isJobScheduler = await jobScheduler.isJobScheduler(job.repeatJobKey); + } + if (isJobScheduler) { + const jobScheduler = await this.jobScheduler; + await jobScheduler.upsertJobScheduler( + // Most of these arguments are not really needed + // anymore as we read them from the job scheduler itself + job.repeatJobKey, + job.opts.repeat, + job.name, + job.data, + job.opts, + { override: false, producerId: job.id } + ); + } else if (job.opts.repeat) { + const repeat = await this.repeat; + await repeat.updateRepeatableJob(job.name, job.data, job.opts, { + override: false + }); + } + }, { delayInMs: this.opts.runRetryDelay }); + } catch (err) { + const errorMessage = err instanceof Error ? err.message : String(err); + const schedulingError = new Error(`Failed to add repeatable job for next iteration: ${errorMessage}`); + this.emit("error", schedulingError); + return void 0; + } + this.emit("active", job, "waiting"); + return job; + } + } + async processJob(job, token, fetchNextCallback = () => true) { + var _a, _b; + const srcPropagationMetadata = (_b = (_a = job.opts) === null || _a === void 0 ? void 0 : _a.telemetry) === null || _b === void 0 ? void 0 : _b.metadata; + return this.trace(enums_1.SpanKind.CONSUMER, "process", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.WorkerId]: this.id, + [enums_1.TelemetryAttributes.WorkerName]: this.opts.name, + [enums_1.TelemetryAttributes.JobId]: job.id, + [enums_1.TelemetryAttributes.JobName]: job.name + }); + const abortController = this.lockManager.trackJob(job.id, token, job.processedOn, this.processorAcceptsSignal); + try { + const unrecoverableErrorMessage = this.getUnrecoverableErrorMessage(job); + if (unrecoverableErrorMessage) { + const failed = await this.retryIfFailed(() => { + this.lockManager.untrackJob(job.id); + return this.handleFailed(new errors_1.UnrecoverableError(unrecoverableErrorMessage), job, token, fetchNextCallback, span); + }, { delayInMs: this.opts.runRetryDelay, span }); + return failed; + } + const result = await this.callProcessJob(job, token, abortController ? abortController.signal : void 0); + return await this.retryIfFailed(() => { + this.lockManager.untrackJob(job.id); + return this.handleCompleted(result, job, token, fetchNextCallback, span); + }, { delayInMs: this.opts.runRetryDelay, span }); + } catch (err) { + const failed = await this.retryIfFailed(() => { + this.lockManager.untrackJob(job.id); + return this.handleFailed(err, job, token, fetchNextCallback, span); + }, { delayInMs: this.opts.runRetryDelay, span, onlyEmitError: true }); + return failed; + } finally { + this.lockManager.untrackJob(job.id); + const now = Date.now(); + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.JobFinishedTimestamp]: now, + [enums_1.TelemetryAttributes.JobAttemptFinishedTimestamp]: job.finishedOn || now, + [enums_1.TelemetryAttributes.JobProcessedTimestamp]: job.processedOn + }); + } + }, srcPropagationMetadata); + } + getUnrecoverableErrorMessage(job) { + if (job.deferredFailure) { + return job.deferredFailure; + } + if (this.opts.maxStartedAttempts && this.opts.maxStartedAttempts < job.attemptsStarted) { + return "job started more than allowable limit"; + } + } + async handleCompleted(result, job, token, fetchNextCallback = () => true, span) { + if (!this.connection.closing) { + const completed = await job.moveToCompleted(result, token, fetchNextCallback() && !(this.closing || this.paused)); + this.emit("completed", job, result, "active"); + span === null || span === void 0 ? void 0 : span.addEvent("job completed", { + [enums_1.TelemetryAttributes.JobResult]: JSON.stringify(result) + }); + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.JobAttemptsMade]: job.attemptsMade + }); + if (Array.isArray(completed)) { + const [jobData, jobId, rateLimitDelay, delayUntil] = completed; + this.updateDelays(rateLimitDelay, delayUntil); + return this.nextJobFromJobData(jobData, jobId, token); + } + } + } + async handleFailed(err, job, token, fetchNextCallback = () => true, span) { + if (!this.connection.closing) { + if (err.message === errors_1.RATE_LIMIT_ERROR) { + const rateLimitTtl = await this.moveLimitedBackToWait(job, token); + this.limitUntil = rateLimitTtl > 0 ? Date.now() + rateLimitTtl : 0; + return; + } + const fetchNext = fetchNextCallback() && !(this.closing || this.paused); + if (err instanceof errors_1.DelayedError || err.name == "DelayedError" || err instanceof errors_1.WaitingError || err.name == "WaitingError" || err instanceof errors_1.WaitingChildrenError || err.name == "WaitingChildrenError") { + if (!fetchNext) { + return; + } + const client = await this.client; + return this.moveToActive(client, token, this.opts.name); + } + const result = await job.moveToFailed(err, token, fetchNext); + this.emit("failed", job, err, "active"); + span === null || span === void 0 ? void 0 : span.addEvent("job failed", { + [enums_1.TelemetryAttributes.JobFailedReason]: err.message + }); + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.JobAttemptsMade]: job.attemptsMade + }); + if (Array.isArray(result)) { + const [jobData, jobId, rateLimitDelay, delayUntil] = result; + this.updateDelays(rateLimitDelay, delayUntil); + return this.nextJobFromJobData(jobData, jobId, token); + } + } + } + /** + * + * Pauses the processing of this queue only for this worker. + */ + async pause(doNotWaitActive) { + await this.trace(enums_1.SpanKind.INTERNAL, "pause", this.name, async (span) => { + var _a; + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.WorkerId]: this.id, + [enums_1.TelemetryAttributes.WorkerName]: this.opts.name, + [enums_1.TelemetryAttributes.WorkerDoNotWaitActive]: doNotWaitActive + }); + if (!this.paused) { + this.paused = true; + if (!doNotWaitActive) { + await this.whenCurrentJobsFinished(); + } + (_a = this.stalledCheckStopper) === null || _a === void 0 ? void 0 : _a.call(this); + this.emit("paused"); + } + }); + } + /** + * + * Resumes processing of this worker (if paused). + */ + resume() { + if (!this.running || this.paused) { + this.trace(enums_1.SpanKind.INTERNAL, "resume", this.name, (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.WorkerId]: this.id, + [enums_1.TelemetryAttributes.WorkerName]: this.opts.name + }); + this.paused = false; + if (!this.running) { + if (this.processFn) { + this.run(); + } + } else { + void this.startStalledCheckTimer().catch((err) => { + this.emit("error", err); + }); + } + this.emit("resumed"); + }).catch((err) => { + this.emit("error", err); + }); + } + } + /** + * + * Checks if worker is paused. + * + * @returns true if worker is paused, false otherwise. + */ + isPaused() { + return !!this.paused; + } + /** + * + * Checks if worker is currently running. + * + * @returns true if worker is running, false otherwise. + */ + isRunning() { + return this.running; + } + /** + * + * Closes the worker and related redis connections. + * + * This method waits for current jobs to finalize before returning. + * + * @param force - Use force boolean parameter if you do not want to wait for + * current jobs to be processed. When using telemetry, be mindful that it can + * interfere with the proper closure of spans, potentially preventing them from being exported. + * + * @returns Promise that resolves when the worker has been closed. + */ + async close(force = false) { + if (this.closing) { + return this.closing; + } + this.closing = (async () => { + await this.trace(enums_1.SpanKind.INTERNAL, "close", this.name, async (span) => { + var _a, _b; + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.WorkerId]: this.id, + [enums_1.TelemetryAttributes.WorkerName]: this.opts.name, + [enums_1.TelemetryAttributes.WorkerForceClose]: force + }); + this.emit("closing", "closing queue"); + (_a = this.abortDelayController) === null || _a === void 0 ? void 0 : _a.abort(); + const asyncCleanups = [ + () => { + return force || this.whenCurrentJobsFinished(false); + }, + () => this.lockManager.close(), + () => { + var _a2; + return (_a2 = this.childPool) === null || _a2 === void 0 ? void 0 : _a2.clean(); + }, + () => this.blockingConnection.close(force), + () => this.connection.close(force) + ]; + for (const cleanup of asyncCleanups) { + try { + await cleanup(); + } catch (err) { + this.emit("error", err); + } + } + (_b = this.stalledCheckStopper) === null || _b === void 0 ? void 0 : _b.call(this); + this.closed = true; + this.emit("closed"); + }); + })(); + return await this.closing; + } + /** + * + * Manually starts the stalled checker. + * The check will run once as soon as this method is called, and + * then every opts.stalledInterval milliseconds until the worker is closed. + * Note: Normally you do not need to call this method, since the stalled checker + * is automatically started when the worker starts processing jobs after + * calling run. However if you want to process the jobs manually you need + * to call this method to start the stalled checker. + * + * @see {@link https://docs.bullmq.io/patterns/manually-fetching-jobs} + */ + async startStalledCheckTimer() { + if (!this.opts.skipStalledCheck) { + if (!this.closing && !this.stalledCheckerRunning) { + await this.trace(enums_1.SpanKind.INTERNAL, "startStalledCheckTimer", this.name, async (span) => { + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.WorkerId]: this.id, + [enums_1.TelemetryAttributes.WorkerName]: this.opts.name + }); + this.stalledCheckerRunning = true; + this.stalledChecker().catch((err) => { + this.emit("error", err); + }).finally(() => { + this.stalledCheckerRunning = false; + }); + }); + } + } + } + async stalledChecker() { + while (!(this.closing || this.paused)) { + await this.checkConnectionError(() => this.moveStalledJobsToWait()); + await new Promise((resolve) => { + const timeout = setTimeout(resolve, this.opts.stalledInterval); + this.stalledCheckStopper = () => { + clearTimeout(timeout); + resolve(); + }; + }); + } + } + /** + * Returns a promise that resolves when active jobs are cleared + * + * @returns + */ + async whenCurrentJobsFinished(reconnect = true) { + if (this.mainLoopRunning) { + await this.blockingConnection.disconnect(true); + await this.mainLoopRunning; + } else { + reconnect = false; + } + reconnect && await this.blockingConnection.reconnect(); + } + async retryIfFailed(fn, opts) { + var _a; + let retry = 0; + const maxRetries = opts.maxRetries || Infinity; + do { + try { + return await fn(); + } catch (err) { + (_a = opts.span) === null || _a === void 0 ? void 0 : _a.recordException(err.message); + if ((0, utils_1.isNotConnectionError)(err)) { + if (!this.paused && !this.closing) { + this.emit("error", err); + } + if (opts.onlyEmitError) { + return; + } else { + throw err; + } + } else { + if (opts.delayInMs && !this.closing && !this.closed) { + await this.delay(opts.delayInMs, this.abortDelayController); + } + if (retry + 1 >= maxRetries) { + throw err; + } + } + } + } while (++retry < maxRetries); + } + async moveStalledJobsToWait() { + await this.trace(enums_1.SpanKind.INTERNAL, "moveStalledJobsToWait", this.name, async (span) => { + const stalled = await this.scripts.moveStalledJobsToWait(); + span === null || span === void 0 ? void 0 : span.setAttributes({ + [enums_1.TelemetryAttributes.WorkerId]: this.id, + [enums_1.TelemetryAttributes.WorkerName]: this.opts.name, + [enums_1.TelemetryAttributes.WorkerStalledJobs]: stalled + }); + stalled.forEach((jobId) => { + span === null || span === void 0 ? void 0 : span.addEvent("job stalled", { + [enums_1.TelemetryAttributes.JobId]: jobId + }); + this.emit("stalled", jobId, "active"); + }); + }); + } + moveLimitedBackToWait(job, token) { + return job.moveToWait(token); + } + }; + exports2.Worker = Worker; + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/index.js +var require_classes = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/classes/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_async_fifo_queue(), exports2); + tslib_1.__exportStar(require_backoffs(), exports2); + tslib_1.__exportStar(require_child(), exports2); + tslib_1.__exportStar(require_child_pool(), exports2); + tslib_1.__exportStar(require_child_processor(), exports2); + tslib_1.__exportStar(require_errors3(), exports2); + tslib_1.__exportStar(require_flow_producer(), exports2); + tslib_1.__exportStar(require_ioredis_client(), exports2); + tslib_1.__exportStar(require_node_redis_client(), exports2); + tslib_1.__exportStar(require_bun_redis_client(), exports2); + tslib_1.__exportStar(require_valkey_glide_client(), exports2); + tslib_1.__exportStar(require_job(), exports2); + tslib_1.__exportStar(require_job_scheduler(), exports2); + tslib_1.__exportStar(require_lock_manager(), exports2); + tslib_1.__exportStar(require_queue_base(), exports2); + tslib_1.__exportStar(require_queue_events(), exports2); + tslib_1.__exportStar(require_queue_events_producer(), exports2); + tslib_1.__exportStar(require_queue_getters(), exports2); + tslib_1.__exportStar(require_queue_keys(), exports2); + tslib_1.__exportStar(require_queue2(), exports2); + tslib_1.__exportStar(require_redis_connection(), exports2); + tslib_1.__exportStar(require_repeat2(), exports2); + tslib_1.__exportStar(require_sandbox(), exports2); + tslib_1.__exportStar(require_scripts(), exports2); + tslib_1.__exportStar(require_worker(), exports2); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/advanced-options.js +var require_advanced_options = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/advanced-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/backoff-options.js +var require_backoff_options = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/backoff-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/base-job-options.js +var require_base_job_options = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/base-job-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/child-message.js +var require_child_message = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/child-message.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/connection.js +var require_connection = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/connection.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/flow-job.js +var require_flow_job = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/flow-job.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/ioredis-events.js +var require_ioredis_events = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/ioredis-events.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/job-json.js +var require_job_json = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/job-json.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/job-scheduler-json.js +var require_job_scheduler_json = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/job-scheduler-json.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/lock-manager-worker-context.js +var require_lock_manager_worker_context = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/lock-manager-worker-context.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/metrics-options.js +var require_metrics_options = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/metrics-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/metrics.js +var require_metrics = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/metrics.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/minimal-job.js +var require_minimal_job = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/minimal-job.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/minimal-queue.js +var require_minimal_queue = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/minimal-queue.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/parent-message.js +var require_parent_message = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/parent-message.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/parent.js +var require_parent = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/parent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/parent-options.js +var require_parent_options = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/parent-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/queue-meta.js +var require_queue_meta = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/queue-meta.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/queue-options.js +var require_queue_options = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/queue-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ClientType = void 0; + var ClientType; + (function(ClientType2) { + ClientType2["blocking"] = "blocking"; + ClientType2["normal"] = "normal"; + })(ClientType || (exports2.ClientType = ClientType = {})); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/rate-limiter-options.js +var require_rate_limiter_options = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/rate-limiter-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/redis-client.js +var require_redis_client = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/redis-client.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/redis-options.js +var require_redis_options = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/redis-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/redis-streams.js +var require_redis_streams = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/redis-streams.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/repeatable-job.js +var require_repeatable_job = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/repeatable-job.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/repeatable-options.js +var require_repeatable_options = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/repeatable-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/repeat-options.js +var require_repeat_options = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/repeat-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/retry-options.js +var require_retry_options = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/retry-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/script-queue-context.js +var require_script_queue_context = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/script-queue-context.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/sandboxed-job-processor.js +var require_sandboxed_job_processor = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/sandboxed-job-processor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/sandboxed-job.js +var require_sandboxed_job = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/sandboxed-job.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/sandboxed-options.js +var require_sandboxed_options = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/sandboxed-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/worker-options.js +var require_worker_options = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/worker-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/telemetry.js +var require_telemetry = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/telemetry.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/receiver.js +var require_receiver = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/receiver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/index.js +var require_interfaces9 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/interfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_advanced_options(), exports2); + tslib_1.__exportStar(require_backoff_options(), exports2); + tslib_1.__exportStar(require_base_job_options(), exports2); + tslib_1.__exportStar(require_child_message(), exports2); + tslib_1.__exportStar(require_connection(), exports2); + tslib_1.__exportStar(require_flow_job(), exports2); + tslib_1.__exportStar(require_ioredis_events(), exports2); + tslib_1.__exportStar(require_job_json(), exports2); + tslib_1.__exportStar(require_job_scheduler_json(), exports2); + tslib_1.__exportStar(require_lock_manager_worker_context(), exports2); + tslib_1.__exportStar(require_metrics_options(), exports2); + tslib_1.__exportStar(require_metrics(), exports2); + tslib_1.__exportStar(require_minimal_job(), exports2); + tslib_1.__exportStar(require_minimal_queue(), exports2); + tslib_1.__exportStar(require_parent_message(), exports2); + tslib_1.__exportStar(require_parent(), exports2); + tslib_1.__exportStar(require_parent_options(), exports2); + tslib_1.__exportStar(require_queue_meta(), exports2); + tslib_1.__exportStar(require_queue_options(), exports2); + tslib_1.__exportStar(require_rate_limiter_options(), exports2); + tslib_1.__exportStar(require_redis_client(), exports2); + tslib_1.__exportStar(require_redis_options(), exports2); + tslib_1.__exportStar(require_redis_streams(), exports2); + tslib_1.__exportStar(require_repeatable_job(), exports2); + tslib_1.__exportStar(require_repeatable_options(), exports2); + tslib_1.__exportStar(require_repeat_options(), exports2); + tslib_1.__exportStar(require_retry_options(), exports2); + tslib_1.__exportStar(require_script_queue_context(), exports2); + tslib_1.__exportStar(require_sandboxed_job_processor(), exports2); + tslib_1.__exportStar(require_sandboxed_job(), exports2); + tslib_1.__exportStar(require_sandboxed_options(), exports2); + tslib_1.__exportStar(require_worker_options(), exports2); + tslib_1.__exportStar(require_telemetry(), exports2); + tslib_1.__exportStar(require_receiver(), exports2); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/backoff-strategy.js +var require_backoff_strategy = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/backoff-strategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/database-type.js +var require_database_type = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/database-type.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/deduplication-options.js +var require_deduplication_options = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/deduplication-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/finished-status.js +var require_finished_status = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/finished-status.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/job-json-sandbox.js +var require_job_json_sandbox = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/job-json-sandbox.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/job-options.js +var require_job_options = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/job-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/job-scheduler-template-options.js +var require_job_scheduler_template_options = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/job-scheduler-template-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/job-type.js +var require_job_type = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/job-type.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/job-progress.js +var require_job_progress = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/job-progress.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/repeat-strategy.js +var require_repeat_strategy = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/repeat-strategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/keep-jobs.js +var require_keep_jobs = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/keep-jobs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/index.js +var require_types4 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_backoff_strategy(), exports2); + tslib_1.__exportStar(require_database_type(), exports2); + tslib_1.__exportStar(require_deduplication_options(), exports2); + tslib_1.__exportStar(require_finished_status(), exports2); + tslib_1.__exportStar(require_job_json_sandbox(), exports2); + tslib_1.__exportStar(require_job_options(), exports2); + tslib_1.__exportStar(require_job_scheduler_template_options(), exports2); + tslib_1.__exportStar(require_job_type(), exports2); + tslib_1.__exportStar(require_job_progress(), exports2); + tslib_1.__exportStar(require_repeat_strategy(), exports2); + tslib_1.__exportStar(require_keep_jobs(), exports2); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/processor.js +var require_processor = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/types/processor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/index.js +var require_cjs4 = __commonJS({ + "../../node_modules/.pnpm/bullmq@5.81.4/node_modules/bullmq/dist/cjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_classes(), exports2); + tslib_1.__exportStar(require_enums3(), exports2); + tslib_1.__exportStar(require_interfaces9(), exports2); + tslib_1.__exportStar(require_types4(), exports2); + tslib_1.__exportStar(require_utils16(), exports2); + tslib_1.__exportStar(require_processor(), exports2); + tslib_1.__exportStar(require_create_scripts(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/bull.constants.js +var require_bull_constants = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/bull.constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BULL_EXTRA_OPTIONS_TOKEN = exports2.ON_WORKER_EVENT_METADATA = exports2.ON_QUEUE_EVENT_METADATA = exports2.QUEUE_EVENTS_LISTENER_METADATA = exports2.WORKER_METADATA = exports2.PROCESSOR_METADATA = void 0; + exports2.PROCESSOR_METADATA = "bullmq:processor_metadata"; + exports2.WORKER_METADATA = "bullmq:worker_metadata"; + exports2.QUEUE_EVENTS_LISTENER_METADATA = "bullmq:queue_events_listener_metadata"; + exports2.ON_QUEUE_EVENT_METADATA = "bullmq:queue_events_metadata"; + exports2.ON_WORKER_EVENT_METADATA = "bullmq:worker_events_metadata"; + exports2.BULL_EXTRA_OPTIONS_TOKEN = "BULLMQ_EXTRA_OPTIONS"; + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/bull-metadata.accessor.js +var require_bull_metadata_accessor = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/bull-metadata.accessor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BullMetadataAccessor = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var common_12 = require_common(); + var core_12 = require_core3(); + var bull_constants_1 = require_bull_constants(); + var BullMetadataAccessor = class BullMetadataAccessor { + constructor(reflector) { + this.reflector = reflector; + } + isProcessor(target) { + if (!target) { + return false; + } + return !!this.reflector.get(bull_constants_1.PROCESSOR_METADATA, target); + } + isQueueEventsListener(target) { + if (!target) { + return false; + } + return !!this.reflector.get(bull_constants_1.QUEUE_EVENTS_LISTENER_METADATA, target); + } + getProcessorMetadata(target) { + return this.reflector.get(bull_constants_1.PROCESSOR_METADATA, target); + } + getWorkerOptionsMetadata(target) { + return this.reflector.get(bull_constants_1.WORKER_METADATA, target) ?? {}; + } + getOnQueueEventMetadata(target) { + return this.reflector.get(bull_constants_1.ON_QUEUE_EVENT_METADATA, target); + } + getOnWorkerEventMetadata(target) { + return this.reflector.get(bull_constants_1.ON_WORKER_EVENT_METADATA, target); + } + getQueueEventsListenerMetadata(target) { + return this.reflector.get(bull_constants_1.QUEUE_EVENTS_LISTENER_METADATA, target); + } + }; + exports2.BullMetadataAccessor = BullMetadataAccessor; + exports2.BullMetadataAccessor = BullMetadataAccessor = tslib_1.__decorate([ + (0, common_12.Injectable)(), + tslib_1.__metadata("design:paramtypes", [core_12.Reflector]) + ], BullMetadataAccessor); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/bull.messages.js +var require_bull_messages2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/bull.messages.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NO_FLOW_PRODUCER_FOUND = exports2.NO_QUEUE_FOUND = void 0; + var NO_QUEUE_FOUND = (name) => name ? `No Queue was found with the given name (${name}). Check your configuration.` : "No Queue was found. Check your configuration."; + exports2.NO_QUEUE_FOUND = NO_QUEUE_FOUND; + var NO_FLOW_PRODUCER_FOUND = (name) => name ? `No Flow Producer was found with the given name (${name}). Check your configuration.` : "No Flow Producer was found. Check your configuration."; + exports2.NO_FLOW_PRODUCER_FOUND = NO_FLOW_PRODUCER_FOUND; + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/errors/invalid-processor-class.error.js +var require_invalid_processor_class_error = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/errors/invalid-processor-class.error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InvalidProcessorClassError = void 0; + var InvalidProcessorClassError = class extends Error { + constructor(className) { + super(`Processor class ("${className}") should inherit from the abstract "WorkerHost" class.`); + } + }; + exports2.InvalidProcessorClassError = InvalidProcessorClassError; + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/errors/invalid-queue-events-listener-class.error.js +var require_invalid_queue_events_listener_class_error = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/errors/invalid-queue-events-listener-class.error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InvalidQueueEventsListenerClassError = void 0; + var InvalidQueueEventsListenerClassError = class extends Error { + constructor(className) { + super(`Queue events listener class ("${className}") should inherit from the abstract "QueueEventsHost" class.`); + } + }; + exports2.InvalidQueueEventsListenerClassError = InvalidQueueEventsListenerClassError; + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/errors/index.js +var require_errors5 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/errors/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_invalid_processor_class_error(), exports2); + tslib_1.__exportStar(require_invalid_queue_events_listener_class_error(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/hosts/queue-events-host.class.js +var require_queue_events_host_class = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/hosts/queue-events-host.class.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QueueEventsHost = void 0; + var QueueEventsHost = class { + get queueEvents() { + if (!this._queueEvents) { + throw new Error('"QueueEvents" class has not yet been initialized. Make sure to interact with queue events instances after the "onModuleInit" lifecycle hook is triggered, for example, in the "onApplicationBootstrap" hook, or if "manualRegistration" is set to true make sure to call "BullRegistrar.register()"'); + } + return this._queueEvents; + } + onApplicationShutdown(signal) { + return this._queueEvents?.close(); + } + }; + exports2.QueueEventsHost = QueueEventsHost; + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/hosts/worker-host.class.js +var require_worker_host_class = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/hosts/worker-host.class.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WorkerHost = void 0; + var WorkerHost = class { + get worker() { + if (!this._worker) { + throw new Error('"Worker" has not yet been initialized. Make sure to interact with worker instances after the "onModuleInit" lifecycle hook is triggered for example, in the "onApplicationBootstrap" hook, or if "manualRegistration" is set to true make sure to call "BullRegistrar.register()"'); + } + return this._worker; + } + }; + exports2.WorkerHost = WorkerHost; + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/hosts/index.js +var require_hosts = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/hosts/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_queue_events_host_class(), exports2); + tslib_1.__exportStar(require_worker_host_class(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/utils/get-shared-config-token.util.js +var require_get_shared_config_token_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/utils/get-shared-config-token.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BULL_CONFIG_DEFAULT_TOKEN = void 0; + exports2.getSharedConfigToken = getSharedConfigToken; + exports2.BULL_CONFIG_DEFAULT_TOKEN = "BULLMQ_CONFIG(default)"; + function getSharedConfigToken(configKey) { + return configKey ? `BULLMQ_CONFIG(${configKey})` : exports2.BULL_CONFIG_DEFAULT_TOKEN; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/bull.explorer.js +var require_bull_explorer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/bull.explorer.js"(exports2) { + "use strict"; + var BullExplorer_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BullExplorer = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var bull_shared_1 = require_dist5(); + var common_12 = require_common(); + var core_12 = require_core3(); + var injector_1 = require_injector(); + var request_constants_1 = require_request_constants(); + var bullmq_1 = require_cjs4(); + var bull_metadata_accessor_1 = require_bull_metadata_accessor(); + var bull_messages_1 = require_bull_messages2(); + var errors_1 = require_errors5(); + var hosts_1 = require_hosts(); + var get_shared_config_token_util_1 = require_get_shared_config_token_util(); + var BullExplorer = BullExplorer_1 = class BullExplorer { + static set workerClass(cls) { + this._workerClass = cls; + } + constructor(moduleRef, discoveryService, metadataAccessor, metadataScanner) { + this.moduleRef = moduleRef; + this.discoveryService = discoveryService; + this.metadataAccessor = metadataAccessor; + this.metadataScanner = metadataScanner; + this.logger = new common_12.Logger("BullModule"); + this.injector = new injector_1.Injector(); + this.workers = []; + } + onApplicationShutdown(signal) { + return Promise.all(this.workers.map((worker) => worker.close())); + } + register() { + this.registerWorkers(); + this.registerQueueEventListeners(); + } + registerWorkers() { + const processors = this.discoveryService.getProviders().filter((wrapper) => this.metadataAccessor.isProcessor( + // NOTE: Regarding the ternary statement below, + // - The condition `!wrapper.metatype` is because when we use `useValue` + // the value of `wrapper.metatype` will be `null`. + // - The condition `wrapper.inject` is needed here because when we use + // `useFactory`, the value of `wrapper.metatype` will be the supplied + // factory function. + // For both cases, we should use `wrapper.instance.constructor` instead + // of `wrapper.metatype` to resolve processor's class properly. + // But since calling `wrapper.instance` could degrade overall performance + // we must defer it as much we can. But there's no other way to grab the + // right class that could be annotated with `@Processor()` decorator + // without using this property. + !wrapper.metatype || wrapper.inject ? wrapper.instance?.constructor : wrapper.metatype + )); + processors.forEach((wrapper) => { + const { instance, metatype } = wrapper; + const isRequestScoped = !wrapper.isDependencyTreeStatic(); + const { name: queueName, configKey } = this.metadataAccessor.getProcessorMetadata( + // NOTE: We are relying on `instance.constructor` to properly support + // `useValue` and `useFactory` providers besides `useClass`. + instance.constructor || metatype + ); + const queueToken = (0, bull_shared_1.getQueueToken)(queueName); + const queueOpts = this.getQueueOptions(queueToken, queueName, configKey); + if (!(instance instanceof hosts_1.WorkerHost)) { + throw new errors_1.InvalidProcessorClassError(instance.constructor?.name); + } else { + const workerOptions = this.metadataAccessor.getWorkerOptionsMetadata(instance.constructor); + this.handleProcessor(instance, queueName, queueOpts, wrapper.host, isRequestScoped, workerOptions); + } + this.registerWorkerEventListeners(wrapper); + }); + } + getQueueOptions(queueToken, queueName, configKey) { + try { + const queueRef = this.moduleRef.get(queueToken, { strict: false }); + return queueRef.opts ?? {}; + } catch (err) { + const sharedConfigToken = (0, get_shared_config_token_util_1.getSharedConfigToken)(configKey); + try { + return this.moduleRef.get(sharedConfigToken, { + strict: false + }); + } catch (err2) { + this.logger.error((0, bull_shared_1.NO_QUEUE_FOUND)(queueName)); + throw err2; + } + } + } + getFlowProducerOptions(flowProducerToken, name, configKey) { + try { + const flowProducerRef = this.moduleRef.get(flowProducerToken, { strict: false }); + return flowProducerRef.opts ?? {}; + } catch (err) { + const sharedConfigToken = (0, get_shared_config_token_util_1.getSharedConfigToken)(configKey); + try { + return this.moduleRef.get(sharedConfigToken, { + strict: false + }); + } catch (err2) { + this.logger.error((0, bull_messages_1.NO_FLOW_PRODUCER_FOUND)(name)); + throw err2; + } + } + } + handleProcessor(instance, queueName, queueOpts, moduleRef, isRequestScoped, options = {}) { + const methodKey = "process"; + let processor; + if (isRequestScoped) { + processor = async (...args) => { + const jobRef = args[0]; + const contextId = core_12.ContextIdFactory.getByRequest(jobRef); + if (this.moduleRef.registerRequestByContextId && !contextId[request_constants_1.REQUEST_CONTEXT_ID]) { + this.moduleRef.registerRequestByContextId(jobRef, contextId); + } + const contextInstance = await this.injector.loadPerContext(instance, moduleRef, moduleRef.providers, contextId); + return contextInstance[methodKey].call(contextInstance, ...args); + }; + } else { + processor = instance[methodKey].bind(instance); + } + const worker = new BullExplorer_1._workerClass(queueName, processor, { + connection: queueOpts.connection, + sharedConnection: queueOpts.sharedConnection, + prefix: queueOpts.prefix, + ...options + }); + instance._worker = worker; + this.workers.push(worker); + } + registerWorkerEventListeners(wrapper) { + const { instance } = wrapper; + this.metadataScanner.scanFromPrototype(instance, Object.getPrototypeOf(instance), (key) => { + const workerEventHandlerMetadata = this.metadataAccessor.getOnWorkerEventMetadata(instance[key]); + if (workerEventHandlerMetadata) { + this.handleWorkerEvents(key, wrapper, workerEventHandlerMetadata); + } + }); + } + handleWorkerEvents(key, wrapper, options) { + const { instance } = wrapper; + if (!wrapper.isDependencyTreeStatic()) { + this.logger.warn(`Warning! "${wrapper.name}" class is request-scoped and it defines an event listener ("${wrapper.name}#${key}"). Since event listeners cannot be registered on scoped providers, this handler will be ignored.`); + return; + } + instance.worker.on(options.eventName, instance[key].bind(instance)); + } + registerQueueEventListeners() { + const eventListeners = this.discoveryService.getProviders().filter((wrapper) => this.metadataAccessor.isQueueEventsListener( + // NOTE: Regarding the ternary statement below, + // - The condition `!wrapper.metatype` is because when we use `useValue` + // the value of `wrapper.metatype` will be `null`. + // - The condition `wrapper.inject` is needed here because when we use + // `useFactory`, the value of `wrapper.metatype` will be the supplied + // factory function. + // For both cases, we should use `wrapper.instance.constructor` instead + // of `wrapper.metatype` to resolve processor's class properly. + // But since calling `wrapper.instance` could degrade overall performance + // we must defer it as much we can. But there's no other way to grab the + // right class that could be annotated with `@Processor()` decorator + // without using this property. + !wrapper.metatype || wrapper.inject ? wrapper.instance?.constructor : wrapper.metatype + )); + eventListeners.forEach((wrapper) => { + const { instance, metatype } = wrapper; + if (!wrapper.isDependencyTreeStatic()) { + this.logger.warn(`Warning! "${wrapper.name}" class is request-scoped and it is flagged as an event listener. Since event listeners cannot be registered on scoped providers, this handler will be ignored.`); + return; + } + const { queueName, queueEventsOptions } = this.metadataAccessor.getQueueEventsListenerMetadata( + // NOTE: We are relying on `instance.constructor` to properly support + // `useValue` and `useFactory` providers besides `useClass`. + instance.constructor || metatype + ); + const queueToken = (0, bull_shared_1.getQueueToken)(queueName); + const queueOpts = this.getQueueOptions(queueToken, queueName); + if (!(instance instanceof hosts_1.QueueEventsHost)) { + throw new errors_1.InvalidQueueEventsListenerClassError(instance.constructor?.name); + } else { + const queueEventsInstance = new bullmq_1.QueueEvents(queueName, { + connection: queueOpts.connection, + prefix: queueOpts.prefix, + sharedConnection: queueOpts.sharedConnection, + ...queueEventsOptions + }); + instance._queueEvents = queueEventsInstance; + this.metadataScanner.scanFromPrototype(instance, Object.getPrototypeOf(instance), (key) => { + const queueEventHandlerMetadata = this.metadataAccessor.getOnQueueEventMetadata(instance[key]); + if (queueEventHandlerMetadata) { + this.handleQueueEvents(key, wrapper, queueEventsInstance, queueEventHandlerMetadata); + } + }); + } + }); + } + handleQueueEvents(key, wrapper, queueEventsInstance, options) { + const { eventName } = options; + const { instance } = wrapper; + queueEventsInstance.on(eventName, instance[key].bind(instance)); + } + }; + exports2.BullExplorer = BullExplorer; + BullExplorer._workerClass = bullmq_1.Worker; + exports2.BullExplorer = BullExplorer = BullExplorer_1 = tslib_1.__decorate([ + (0, common_12.Injectable)(), + tslib_1.__metadata("design:paramtypes", [ + core_12.ModuleRef, + core_12.DiscoveryService, + bull_metadata_accessor_1.BullMetadataAccessor, + core_12.MetadataScanner + ]) + ], BullExplorer); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/utils/get-flow-producer-token.util.js +var require_get_flow_producer_token_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/utils/get-flow-producer-token.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getFlowProducerToken = getFlowProducerToken; + function getFlowProducerToken(name) { + return name ? `BullFlowProducer_${name}` : "BullFlowProducer_default"; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/utils/get-flow-producer-options-token.util.js +var require_get_flow_producer_options_token_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/utils/get-flow-producer-options-token.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getFlowProducerOptionsToken = getFlowProducerOptionsToken; + function getFlowProducerOptionsToken(name) { + return name ? `BullMQFlowProducerOptions_${name}` : "BullMQFlowProducerOptions_default"; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/utils/get-queue-options-token.util.js +var require_get_queue_options_token_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/utils/get-queue-options-token.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getQueueOptionsToken = getQueueOptionsToken; + function getQueueOptionsToken(name) { + return name ? `BullMQQueueOptions_${name}` : "BullMQQueueOptions_default"; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/utils/index.js +var require_utils18 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/utils/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_get_flow_producer_token_util(), exports2); + tslib_1.__exportStar(require_get_flow_producer_options_token_util(), exports2); + tslib_1.__exportStar(require_get_queue_options_token_util(), exports2); + tslib_1.__exportStar(require_get_shared_config_token_util(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/utils/helpers.js +var require_helpers5 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/utils/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isProcessorCallback = isProcessorCallback; + exports2.isAdvancedProcessor = isAdvancedProcessor; + exports2.isSeparateProcessor = isSeparateProcessor; + exports2.isAdvancedSeparateProcessor = isAdvancedSeparateProcessor; + var url_1 = require("url"); + function isProcessorCallback(processor) { + return "function" === typeof processor; + } + function isAdvancedProcessor(processor) { + return "object" === typeof processor && !!processor.callback && isProcessorCallback(processor.callback); + } + function isSeparateProcessor(processor) { + return "string" === typeof processor || processor instanceof url_1.URL; + } + function isAdvancedSeparateProcessor(processor) { + return "object" === typeof processor && !!processor.path && isSeparateProcessor(processor.path); + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/bull.providers.js +var require_bull_providers = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/bull.providers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createQueueOptionProviders = createQueueOptionProviders; + exports2.createFlowProducerOptionProviders = createFlowProducerOptionProviders; + exports2.createQueueProviders = createQueueProviders; + exports2.createFlowProducerProviders = createFlowProducerProviders; + var bull_shared_1 = require_dist5(); + var common_12 = require_common(); + var utils_1 = require_utils18(); + var helpers_1 = require_helpers5(); + function createQueueAndWorkers(options, queueClass, workerClass) { + const queueName = options.name ?? "default"; + const queue = new queueClass(queueName, options); + let workerRefs = []; + if (options.processors) { + workerRefs = options.processors.map((processor) => { + if ((0, helpers_1.isAdvancedProcessor)(processor)) { + const { callback, ...processorOptions } = processor; + return new workerClass(queueName, callback, { + connection: options.connection, + sharedConnection: options.sharedConnection, + prefix: options.prefix, + ...processorOptions + }); + } else if ((0, helpers_1.isAdvancedSeparateProcessor)(processor)) { + const { path, ...processorOptions } = processor; + return new workerClass(queueName, path, { + connection: options.connection, + sharedConnection: options.sharedConnection, + prefix: options.prefix, + ...processorOptions + }); + } else if ((0, helpers_1.isSeparateProcessor)(processor)) { + return new workerClass(queueName, processor, { + connection: options.connection, + sharedConnection: options.sharedConnection, + prefix: options.prefix + }); + } else if ((0, helpers_1.isProcessorCallback)(processor)) { + return new workerClass(queueName, processor, { + connection: options.connection, + sharedConnection: options.sharedConnection, + prefix: options.prefix + }); + } + }); + } + queue.onApplicationShutdown = async function() { + const closeWorkers = workerRefs.map((worker) => worker.close()); + await Promise.all(closeWorkers); + await this.close(); + if (options.forceDisconnectOnShutdown) { + if (this.connection?.status !== "closed" && this.disconnect) { + return this.disconnect(); + } + } + }; + return queue; + } + function createFlowProducers(options, flowProducerClass) { + const flowProducer = new flowProducerClass(options); + flowProducer.onApplicationShutdown = async function() { + await this.close(); + if (this.disconnect) { + return this.disconnect(); + } + }; + return flowProducer; + } + function createQueueOptionProviders(options) { + const providers = options.map((option) => { + const optionalSharedConfigHolder = (0, bull_shared_1.createConditionalDepHolder)((0, utils_1.getSharedConfigToken)(option.configKey), utils_1.BULL_CONFIG_DEFAULT_TOKEN); + return [ + optionalSharedConfigHolder, + { + provide: (0, utils_1.getQueueOptionsToken)(option.name), + useFactory: (optionalDepHolder) => { + return { + ...optionalDepHolder.getDependencyRef(option.name), + ...option + }; + }, + inject: [optionalSharedConfigHolder] + } + ]; + }); + return (0, common_12.flatten)(providers); + } + function createFlowProducerOptionProviders(options) { + const providers = options.map((option) => { + const optionalSharedConfigHolder = (0, bull_shared_1.createConditionalDepHolder)((0, utils_1.getSharedConfigToken)(option.configKey), utils_1.BULL_CONFIG_DEFAULT_TOKEN); + return [ + optionalSharedConfigHolder, + { + provide: (0, utils_1.getFlowProducerOptionsToken)(option.name), + useFactory: (optionalDepHolder) => { + return { + ...optionalDepHolder.getDependencyRef(option.name), + ...option + }; + }, + inject: [optionalSharedConfigHolder] + } + ]; + }); + return (0, common_12.flatten)(providers); + } + function createQueueProviders(options, queueClass, workerClass) { + const queueProviders = options.map((item) => ({ + provide: (0, bull_shared_1.getQueueToken)(item.name), + useFactory: (queueOptions) => { + const queueName = queueOptions.name || item.name; + return createQueueAndWorkers({ ...queueOptions, name: queueName }, queueClass, workerClass); + }, + inject: [(0, utils_1.getQueueOptionsToken)(item.name)] + })); + return queueProviders; + } + function createFlowProducerProviders(options, flowProducerClass) { + const flowProducerProviders = options.map((item) => ({ + provide: (0, utils_1.getFlowProducerToken)(item.name), + useFactory: (flowProducerOptions) => { + const flowProducerName = flowProducerOptions.name || item.name; + return createFlowProducers({ ...flowProducerOptions, name: flowProducerName }, flowProducerClass); + }, + inject: [(0, utils_1.getFlowProducerOptionsToken)(item.name)] + })); + return flowProducerProviders; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/bull.registrar.js +var require_bull_registrar = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/bull.registrar.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BullRegistrar = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var common_12 = require_common(); + var core_12 = require_core3(); + var bull_constants_1 = require_bull_constants(); + var bull_explorer_1 = require_bull_explorer(); + var BullRegistrar = class BullRegistrar { + constructor(moduleRef, bullExplorer) { + this.moduleRef = moduleRef; + this.bullExplorer = bullExplorer; + } + onModuleInit() { + const extraOptions = this.getModuleExtras(); + if (extraOptions?.manualRegistration) { + return; + } + this.register(); + } + register() { + return this.bullExplorer.register(); + } + getModuleExtras() { + try { + const extrasToken = bull_constants_1.BULL_EXTRA_OPTIONS_TOKEN; + return this.moduleRef.get(extrasToken, { + strict: false + }); + } catch { + return null; + } + } + }; + exports2.BullRegistrar = BullRegistrar; + exports2.BullRegistrar = BullRegistrar = tslib_1.__decorate([ + (0, common_12.Injectable)(), + tslib_1.__metadata("design:paramtypes", [ + core_12.ModuleRef, + bull_explorer_1.BullExplorer + ]) + ], BullRegistrar); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/bull.module.js +var require_bull_module = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/bull.module.js"(exports2) { + "use strict"; + var BullModule_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BullModule = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var bull_shared_1 = require_dist5(); + var common_12 = require_common(); + var core_12 = require_core3(); + var bullmq_1 = require_cjs4(); + var bull_metadata_accessor_1 = require_bull_metadata_accessor(); + var bull_constants_1 = require_bull_constants(); + var bull_explorer_1 = require_bull_explorer(); + var bull_providers_1 = require_bull_providers(); + var bull_registrar_1 = require_bull_registrar(); + var utils_1 = require_utils18(); + var BullModule = BullModule_1 = class BullModule { + /** + * Class to be used to create Bull queues. + * This configuration property can be used to instruct the "@nestjs/bullmq" + * package to use, for example, "QueuePro" class (from "BullMQ Pro"). + * @default Queue + */ + static set queueClass(cls) { + this._queueClass = cls; + } + /** + * Class to be used to create Bull flow producers. + * This configuration property can be used to instruct the "@nestjs/bullmq" + * package to use, for example, "FlowProducerPro" class (from "BullMQ Pro"). + * @default FlowProducer + */ + static set flowProducerClass(cls) { + this._flowProducerClass = cls; + } + /** + * Class to be used to create Bull workers. + * This configuration property can be used to instruct the "@nestjs/bullmq" + * package to use, for example, "WorkerPro" class (from "BullMQ Pro"). + * @default Worker + */ + static set workerClass(cls) { + bull_explorer_1.BullExplorer.workerClass = cls; + this._workerClass = cls; + } + /** + * Registers a globally available configuration for all queues + * or using a specified "configKey" (if passed). + * + * @param keyOrConfig a key under which the configuration should be available or a bull configuration object + * @param bullConfig bull configuration object + */ + static forRoot(keyOrConfig, bullConfig) { + const [configKey, sharedBullConfig] = typeof keyOrConfig === "string" ? [keyOrConfig, bullConfig] : [void 0, keyOrConfig]; + const { extraOptions, ...config } = sharedBullConfig; + const sharedBullConfigProvider = { + provide: (0, utils_1.getSharedConfigToken)(configKey), + useValue: config + }; + const extraOptionsProvider = { + provide: bull_constants_1.BULL_EXTRA_OPTIONS_TOKEN, + useValue: { ...extraOptions } + }; + return { + global: true, + module: BullModule_1, + providers: [sharedBullConfigProvider, extraOptionsProvider], + exports: [sharedBullConfigProvider, extraOptionsProvider] + }; + } + /** + * Registers a globally available configuration for all queues + * or using a specified "configKey" (if passed). + * + * @param keyOrAsyncConfig a key under which the configuration should be available or a bull configuration object + * @param asyncBullConfig shared bull configuration async factory + */ + static forRootAsync(keyOrAsyncConfig, asyncBullConfig) { + const [configKey, asyncSharedBullConfig] = typeof keyOrAsyncConfig === "string" ? [keyOrAsyncConfig, asyncBullConfig] : [void 0, keyOrAsyncConfig]; + const imports = this.getUniqImports([asyncSharedBullConfig]); + const providers = this.createAsyncSharedConfigurationProviders(configKey, asyncSharedBullConfig); + return { + global: true, + module: BullModule_1, + imports, + providers, + exports: providers + }; + } + static registerQueue(...options) { + const optionsArr = [].concat(options); + const queueProviders = (0, bull_providers_1.createQueueProviders)(optionsArr, this._queueClass, this._workerClass); + const queueOptionProviders = (0, bull_providers_1.createQueueOptionProviders)(optionsArr); + return { + module: BullModule_1, + imports: [BullModule_1.registerCore()], + providers: [...queueOptionProviders, ...queueProviders], + exports: queueProviders + }; + } + static registerQueueAsync(...options) { + const optionsArr = [].concat(options); + const queueProviders = (0, bull_providers_1.createQueueProviders)(optionsArr, this._queueClass, this._workerClass); + const imports = this.getUniqImports(optionsArr); + const asyncQueueOptionsProviders = options.map((queueOptions) => this.createAsyncProviders(queueOptions)).reduce((a, b) => a.concat(b), []); + const extraProviders = options.map((queueOptions) => queueOptions.extraProviders).filter((extraProviders2) => extraProviders2).reduce((a, b) => a.concat(b), []); + return { + imports: imports.concat(BullModule_1.registerCore()), + module: BullModule_1, + providers: [ + ...asyncQueueOptionsProviders, + ...queueProviders, + ...extraProviders + ], + exports: queueProviders + }; + } + static createAsyncProviders(options) { + const optionalSharedConfigHolder = (0, bull_shared_1.createConditionalDepHolder)((0, utils_1.getSharedConfigToken)(options.configKey), utils_1.BULL_CONFIG_DEFAULT_TOKEN); + if (options.useExisting || options.useFactory) { + return [ + optionalSharedConfigHolder, + this.createAsyncOptionsProvider(options, optionalSharedConfigHolder) + ]; + } + if (!options.useClass) { + return (0, bull_providers_1.createQueueOptionProviders)([options]); + } + const useClass = options.useClass; + return [ + optionalSharedConfigHolder, + this.createAsyncOptionsProvider(options, optionalSharedConfigHolder), + { + provide: useClass, + useClass + } + ]; + } + static createAsyncOptionsProvider(asyncOptions, optionalSharedConfigHolderRef) { + if (asyncOptions.useFactory) { + return { + provide: (0, utils_1.getQueueOptionsToken)(asyncOptions.name), + useFactory: async (optionalDepHolder, ...factoryArgs) => { + return { + ...optionalDepHolder.getDependencyRef(asyncOptions.name), + ...await asyncOptions.useFactory(...factoryArgs) + }; + }, + inject: [optionalSharedConfigHolderRef, ...asyncOptions.inject || []] + }; + } + const inject = [ + asyncOptions.useClass || asyncOptions.useExisting + ]; + return { + provide: (0, utils_1.getQueueOptionsToken)(asyncOptions.name), + useFactory: async (optionalDepHolder, optionsFactory) => { + return { + ...optionalDepHolder.getDependencyRef(asyncOptions.name), + ...await optionsFactory.createRegisterQueueOptions() + }; + }, + inject: [optionalSharedConfigHolderRef, ...inject] + }; + } + static registerFlowProducer(...options) { + const optionsArr = [].concat(options); + const flowProducerProviders = (0, bull_providers_1.createFlowProducerProviders)(optionsArr, this._flowProducerClass); + const flowProducerOptionProviders = (0, bull_providers_1.createFlowProducerOptionProviders)(optionsArr); + return { + module: BullModule_1, + imports: [BullModule_1.registerCore()], + providers: [...flowProducerOptionProviders, ...flowProducerProviders], + exports: flowProducerProviders + }; + } + static registerFlowProducerAsync(...options) { + const optionsArr = [].concat(options); + const flowProducerProviders = (0, bull_providers_1.createFlowProducerProviders)(optionsArr, this._flowProducerClass); + const imports = this.getUniqImports(optionsArr); + const asyncFlowProducerOptionsProviders = options.map((flowProducerOptions) => this.createAsyncFlowProducerProviders(flowProducerOptions)).reduce((a, b) => a.concat(b), []); + return { + imports: imports.concat(BullModule_1.registerCore()), + module: BullModule_1, + providers: [ + ...asyncFlowProducerOptionsProviders, + ...flowProducerProviders + ], + exports: flowProducerProviders + }; + } + static createAsyncFlowProducerProviders(options) { + const optionalSharedConfigHolder = (0, bull_shared_1.createConditionalDepHolder)((0, utils_1.getSharedConfigToken)(options.configKey), utils_1.BULL_CONFIG_DEFAULT_TOKEN); + if (options.useExisting || options.useFactory) { + return [ + optionalSharedConfigHolder, + this.createAsyncFlowProducerOptionsProvider(options, optionalSharedConfigHolder) + ]; + } + if (!options.useClass) { + return (0, bull_providers_1.createFlowProducerOptionProviders)([options]); + } + const useClass = options.useClass; + return [ + optionalSharedConfigHolder, + this.createAsyncFlowProducerOptionsProvider(options, optionalSharedConfigHolder), + { + provide: useClass, + useClass + } + ]; + } + static createAsyncFlowProducerOptionsProvider(asyncOptions, optionalSharedConfigHolderRef) { + if (asyncOptions.useFactory) { + return { + provide: (0, utils_1.getFlowProducerOptionsToken)(asyncOptions.name), + useFactory: async (optionalDepHolder, ...factoryArgs) => { + return { + ...optionalDepHolder.getDependencyRef(asyncOptions.name), + ...await asyncOptions.useFactory(...factoryArgs) + }; + }, + inject: [optionalSharedConfigHolderRef, ...asyncOptions.inject || []] + }; + } + const inject = [ + asyncOptions.useClass || asyncOptions.useExisting + ]; + return { + provide: (0, utils_1.getFlowProducerOptionsToken)(asyncOptions.name), + useFactory: async (optionalDepHolder, optionsFactory) => { + return { + ...optionalDepHolder.getDependencyRef(asyncOptions.name), + ...await optionsFactory.createRegisterQueueOptions() + }; + }, + inject: [optionalSharedConfigHolderRef, ...inject] + }; + } + static createAsyncSharedConfigurationProviders(configKey, options) { + const { extraOptions, ...config } = options; + const extraOptionsProvider = { + provide: bull_constants_1.BULL_EXTRA_OPTIONS_TOKEN, + useValue: { ...extraOptions } + }; + if (options.useExisting || options.useFactory) { + return [ + this.createAsyncSharedConfigurationProvider(configKey, config), + extraOptionsProvider + ]; + } + const useClass = config.useClass; + return [ + this.createAsyncSharedConfigurationProvider(configKey, config), + extraOptionsProvider, + { + provide: useClass, + useClass + } + ]; + } + static createAsyncSharedConfigurationProvider(configKey, options) { + if (options.useFactory) { + return { + provide: (0, utils_1.getSharedConfigToken)(configKey), + useFactory: options.useFactory, + inject: options.inject || [] + }; + } + const inject = [ + options.useClass || options.useExisting + ]; + return { + provide: (0, utils_1.getSharedConfigToken)(configKey), + useFactory: async (optionsFactory) => optionsFactory.createSharedConfiguration(), + inject + }; + } + static registerCore() { + return { + global: true, + module: BullModule_1, + imports: [core_12.DiscoveryModule], + providers: [bull_explorer_1.BullExplorer, bull_metadata_accessor_1.BullMetadataAccessor, bull_registrar_1.BullRegistrar], + exports: [bull_registrar_1.BullRegistrar] + }; + } + static getUniqImports(options) { + return options.map((option) => option.imports).reduce((acc, i) => acc.concat(i || []), []).filter((v, i, a) => a.indexOf(v) === i) || []; + } + }; + exports2.BullModule = BullModule; + BullModule._queueClass = bullmq_1.Queue; + BullModule._flowProducerClass = bullmq_1.FlowProducer; + BullModule._workerClass = bullmq_1.Worker; + exports2.BullModule = BullModule = BullModule_1 = tslib_1.__decorate([ + (0, common_12.Module)({}) + ], BullModule); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/bull.types.js +var require_bull_types = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/bull.types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/decorators/inject-flow-producer.decorator.js +var require_inject_flow_producer_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/decorators/inject-flow-producer.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InjectFlowProducer = void 0; + var common_12 = require_common(); + var utils_1 = require_utils18(); + var InjectFlowProducer = (name) => (0, common_12.Inject)((0, utils_1.getFlowProducerToken)(name)); + exports2.InjectFlowProducer = InjectFlowProducer; + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/decorators/inject-queue.decorator.js +var require_inject_queue_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/decorators/inject-queue.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InjectQueue = void 0; + var bull_shared_1 = require_dist5(); + var common_12 = require_common(); + var InjectQueue = (name) => (0, common_12.Inject)((0, bull_shared_1.getQueueToken)(name)); + exports2.InjectQueue = InjectQueue; + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/decorators/on-queue-event.decorator.js +var require_on_queue_event_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/decorators/on-queue-event.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OnQueueEvent = void 0; + var common_12 = require_common(); + var bull_constants_1 = require_bull_constants(); + var OnQueueEvent = (eventName) => (0, common_12.SetMetadata)(bull_constants_1.ON_QUEUE_EVENT_METADATA, { eventName }); + exports2.OnQueueEvent = OnQueueEvent; + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/decorators/on-worker-event.decorator.js +var require_on_worker_event_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/decorators/on-worker-event.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OnWorkerEvent = void 0; + var common_12 = require_common(); + var bull_constants_1 = require_bull_constants(); + var OnWorkerEvent = (eventName) => (0, common_12.SetMetadata)(bull_constants_1.ON_WORKER_EVENT_METADATA, { + eventName + }); + exports2.OnWorkerEvent = OnWorkerEvent; + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/decorators/processor.decorator.js +var require_processor_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/decorators/processor.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Processor = Processor; + var common_12 = require_common(); + var constants_1 = require_constants(); + var bull_constants_1 = require_bull_constants(); + function Processor(queueNameOrOptions, maybeWorkerOptions) { + const options = queueNameOrOptions && typeof queueNameOrOptions === "object" ? queueNameOrOptions : { name: queueNameOrOptions }; + return (target) => { + (0, common_12.SetMetadata)(constants_1.SCOPE_OPTIONS_METADATA, options)(target); + (0, common_12.SetMetadata)(bull_constants_1.PROCESSOR_METADATA, options)(target); + maybeWorkerOptions && (0, common_12.SetMetadata)(bull_constants_1.WORKER_METADATA, maybeWorkerOptions)(target); + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/decorators/queue-events-listener.decorator.js +var require_queue_events_listener_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/decorators/queue-events-listener.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QueueEventsListener = QueueEventsListener; + var common_12 = require_common(); + var bull_constants_1 = require_bull_constants(); + function QueueEventsListener(queueName, queueEventsOptions) { + return (target) => { + (0, common_12.SetMetadata)(bull_constants_1.QUEUE_EVENTS_LISTENER_METADATA, { + queueName, + queueEventsOptions + })(target); + }; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/decorators/index.js +var require_decorators6 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/decorators/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_inject_flow_producer_decorator(), exports2); + tslib_1.__exportStar(require_inject_queue_decorator(), exports2); + tslib_1.__exportStar(require_on_queue_event_decorator(), exports2); + tslib_1.__exportStar(require_on_worker_event_decorator(), exports2); + tslib_1.__exportStar(require_processor_decorator(), exports2); + tslib_1.__exportStar(require_queue_events_listener_decorator(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/interfaces/bull-processor.interfaces.js +var require_bull_processor_interfaces = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/interfaces/bull-processor.interfaces.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/interfaces/register-flow-options.interface.js +var require_register_flow_options_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/interfaces/register-flow-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/interfaces/register-queue-options.interface.js +var require_register_queue_options_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/interfaces/register-queue-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/interfaces/shared-bull-config.interface.js +var require_shared_bull_config_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/interfaces/shared-bull-config.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/interfaces/index.js +var require_interfaces10 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/interfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_bull_processor_interfaces(), exports2); + tslib_1.__exportStar(require_register_flow_options_interface(), exports2); + tslib_1.__exportStar(require_register_queue_options_interface(), exports2); + tslib_1.__exportStar(require_shared_bull_config_interface(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/index.js +var require_dist6 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+bullmq@10.2.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_r_gycypeyqd2jc2c6opvn277xo3q/node_modules/@nestjs/bullmq/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getQueueToken = exports2.JOB_REF = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var bull_shared_1 = require_dist5(); + Object.defineProperty(exports2, "JOB_REF", { enumerable: true, get: function() { + return bull_shared_1.JOB_REF; + } }); + Object.defineProperty(exports2, "getQueueToken", { enumerable: true, get: function() { + return bull_shared_1.getQueueToken; + } }); + tslib_1.__exportStar(require_bull_module(), exports2); + tslib_1.__exportStar(require_bull_registrar(), exports2); + tslib_1.__exportStar(require_bull_types(), exports2); + tslib_1.__exportStar(require_decorators6(), exports2); + tslib_1.__exportStar(require_hosts(), exports2); + tslib_1.__exportStar(require_interfaces10(), exports2); + tslib_1.__exportStar(require_utils18(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/enums/cron-expression.enum.js +var require_cron_expression_enum = __commonJS({ + "../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/enums/cron-expression.enum.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CronExpression = void 0; + var CronExpression; + (function(CronExpression2) { + CronExpression2["EVERY_SECOND"] = "* * * * * *"; + CronExpression2["EVERY_5_SECONDS"] = "*/5 * * * * *"; + CronExpression2["EVERY_10_SECONDS"] = "*/10 * * * * *"; + CronExpression2["EVERY_30_SECONDS"] = "*/30 * * * * *"; + CronExpression2["EVERY_MINUTE"] = "*/1 * * * *"; + CronExpression2["EVERY_5_MINUTES"] = "0 */5 * * * *"; + CronExpression2["EVERY_10_MINUTES"] = "0 */10 * * * *"; + CronExpression2["EVERY_30_MINUTES"] = "0 */30 * * * *"; + CronExpression2["EVERY_HOUR"] = "0 0-23/1 * * *"; + CronExpression2["EVERY_2_HOURS"] = "0 0-23/2 * * *"; + CronExpression2["EVERY_3_HOURS"] = "0 0-23/3 * * *"; + CronExpression2["EVERY_4_HOURS"] = "0 0-23/4 * * *"; + CronExpression2["EVERY_5_HOURS"] = "0 0-23/5 * * *"; + CronExpression2["EVERY_6_HOURS"] = "0 0-23/6 * * *"; + CronExpression2["EVERY_7_HOURS"] = "0 0-23/7 * * *"; + CronExpression2["EVERY_8_HOURS"] = "0 0-23/8 * * *"; + CronExpression2["EVERY_9_HOURS"] = "0 0-23/9 * * *"; + CronExpression2["EVERY_10_HOURS"] = "0 0-23/10 * * *"; + CronExpression2["EVERY_11_HOURS"] = "0 0-23/11 * * *"; + CronExpression2["EVERY_12_HOURS"] = "0 0-23/12 * * *"; + CronExpression2["EVERY_DAY_AT_1AM"] = "0 01 * * *"; + CronExpression2["EVERY_DAY_AT_2AM"] = "0 02 * * *"; + CronExpression2["EVERY_DAY_AT_3AM"] = "0 03 * * *"; + CronExpression2["EVERY_DAY_AT_4AM"] = "0 04 * * *"; + CronExpression2["EVERY_DAY_AT_5AM"] = "0 05 * * *"; + CronExpression2["EVERY_DAY_AT_6AM"] = "0 06 * * *"; + CronExpression2["EVERY_DAY_AT_7AM"] = "0 07 * * *"; + CronExpression2["EVERY_DAY_AT_8AM"] = "0 08 * * *"; + CronExpression2["EVERY_DAY_AT_9AM"] = "0 09 * * *"; + CronExpression2["EVERY_DAY_AT_10AM"] = "0 10 * * *"; + CronExpression2["EVERY_DAY_AT_11AM"] = "0 11 * * *"; + CronExpression2["EVERY_DAY_AT_NOON"] = "0 12 * * *"; + CronExpression2["EVERY_DAY_AT_1PM"] = "0 13 * * *"; + CronExpression2["EVERY_DAY_AT_2PM"] = "0 14 * * *"; + CronExpression2["EVERY_DAY_AT_3PM"] = "0 15 * * *"; + CronExpression2["EVERY_DAY_AT_4PM"] = "0 16 * * *"; + CronExpression2["EVERY_DAY_AT_5PM"] = "0 17 * * *"; + CronExpression2["EVERY_DAY_AT_6PM"] = "0 18 * * *"; + CronExpression2["EVERY_DAY_AT_7PM"] = "0 19 * * *"; + CronExpression2["EVERY_DAY_AT_8PM"] = "0 20 * * *"; + CronExpression2["EVERY_DAY_AT_9PM"] = "0 21 * * *"; + CronExpression2["EVERY_DAY_AT_10PM"] = "0 22 * * *"; + CronExpression2["EVERY_DAY_AT_11PM"] = "0 23 * * *"; + CronExpression2["EVERY_DAY_AT_MIDNIGHT"] = "0 0 * * *"; + CronExpression2["EVERY_WEEK"] = "0 0 * * 0"; + CronExpression2["EVERY_WEEKDAY"] = "0 0 * * 1-5"; + CronExpression2["EVERY_WEEKEND"] = "0 0 * * 6,0"; + CronExpression2["EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT"] = "0 0 1 * *"; + CronExpression2["EVERY_1ST_DAY_OF_MONTH_AT_NOON"] = "0 12 1 * *"; + CronExpression2["EVERY_2ND_HOUR"] = "0 */2 * * *"; + CronExpression2["EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM"] = "0 1-23/2 * * *"; + CronExpression2["EVERY_2ND_MONTH"] = "0 0 1 */2 *"; + CronExpression2["EVERY_QUARTER"] = "0 0 1 */3 *"; + CronExpression2["EVERY_6_MONTHS"] = "0 0 1 */6 *"; + CronExpression2["EVERY_YEAR"] = "0 0 1 1 *"; + CronExpression2["EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM"] = "0 */30 9-17 * * *"; + CronExpression2["EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM"] = "0 */30 9-18 * * *"; + CronExpression2["EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM"] = "0 */30 10-19 * * *"; + CronExpression2["MONDAY_TO_FRIDAY_AT_1AM"] = "0 0 01 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_2AM"] = "0 0 02 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_3AM"] = "0 0 03 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_4AM"] = "0 0 04 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_5AM"] = "0 0 05 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_6AM"] = "0 0 06 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_7AM"] = "0 0 07 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_8AM"] = "0 0 08 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_9AM"] = "0 0 09 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_09_30AM"] = "0 30 09 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_10AM"] = "0 0 10 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_11AM"] = "0 0 11 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_11_30AM"] = "0 30 11 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_12PM"] = "0 0 12 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_1PM"] = "0 0 13 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_2PM"] = "0 0 14 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_3PM"] = "0 0 15 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_4PM"] = "0 0 16 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_5PM"] = "0 0 17 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_6PM"] = "0 0 18 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_7PM"] = "0 0 19 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_8PM"] = "0 0 20 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_9PM"] = "0 0 21 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_10PM"] = "0 0 22 * * 1-5"; + CronExpression2["MONDAY_TO_FRIDAY_AT_11PM"] = "0 0 23 * * 1-5"; + })(CronExpression || (exports2.CronExpression = CronExpression = {})); + } +}); + +// ../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/enums/index.js +var require_enums4 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/enums/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CronExpression = void 0; + var cron_expression_enum_1 = require_cron_expression_enum(); + Object.defineProperty(exports2, "CronExpression", { enumerable: true, get: function() { + return cron_expression_enum_1.CronExpression; + } }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/enums/scheduler-type.enum.js +var require_scheduler_type_enum = __commonJS({ + "../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/enums/scheduler-type.enum.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SchedulerType = void 0; + var SchedulerType; + (function(SchedulerType2) { + SchedulerType2[SchedulerType2["CRON"] = 1] = "CRON"; + SchedulerType2[SchedulerType2["TIMEOUT"] = 2] = "TIMEOUT"; + SchedulerType2[SchedulerType2["INTERVAL"] = 3] = "INTERVAL"; + })(SchedulerType || (exports2.SchedulerType = SchedulerType = {})); + } +}); + +// ../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/schedule.constants.js +var require_schedule_constants = __commonJS({ + "../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/schedule.constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SCHEDULE_MODULE_OPTIONS = exports2.SCHEDULE_TIMEOUT_OPTIONS = exports2.SCHEDULE_INTERVAL_OPTIONS = exports2.SCHEDULE_CRON_OPTIONS = exports2.SCHEDULER_TYPE = exports2.SCHEDULER_NAME = void 0; + exports2.SCHEDULER_NAME = "SCHEDULER_NAME"; + exports2.SCHEDULER_TYPE = "SCHEDULER_TYPE"; + exports2.SCHEDULE_CRON_OPTIONS = "SCHEDULE_CRON_OPTIONS"; + exports2.SCHEDULE_INTERVAL_OPTIONS = "SCHEDULE_INTERVAL_OPTIONS"; + exports2.SCHEDULE_TIMEOUT_OPTIONS = "SCHEDULE_TIMEOUT_OPTIONS"; + exports2.SCHEDULE_MODULE_OPTIONS = "SCHEDULE_MODULE_OPTIONS"; + } +}); + +// ../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/decorators/cron.decorator.js +var require_cron_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/decorators/cron.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Cron = void 0; + var common_12 = require_common(); + var scheduler_type_enum_1 = require_scheduler_type_enum(); + var schedule_constants_1 = require_schedule_constants(); + function Cron(cronTime, options = {}) { + const name = options?.name; + return (0, common_12.applyDecorators)((0, common_12.SetMetadata)(schedule_constants_1.SCHEDULE_CRON_OPTIONS, { + ...options, + cronTime + }), (0, common_12.SetMetadata)(schedule_constants_1.SCHEDULER_NAME, name), (0, common_12.SetMetadata)(schedule_constants_1.SCHEDULER_TYPE, scheduler_type_enum_1.SchedulerType.CRON)); + } + exports2.Cron = Cron; + } +}); + +// ../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/decorators/interval.decorator.js +var require_interval_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/decorators/interval.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Interval = void 0; + var common_12 = require_common(); + var scheduler_type_enum_1 = require_scheduler_type_enum(); + var schedule_constants_1 = require_schedule_constants(); + function Interval(nameOrTimeout, timeout) { + const [name, intervalTimeout] = typeof nameOrTimeout === "string" ? [nameOrTimeout, timeout] : [void 0, nameOrTimeout]; + return (0, common_12.applyDecorators)((0, common_12.SetMetadata)(schedule_constants_1.SCHEDULE_INTERVAL_OPTIONS, { timeout: intervalTimeout }), (0, common_12.SetMetadata)(schedule_constants_1.SCHEDULER_NAME, name), (0, common_12.SetMetadata)(schedule_constants_1.SCHEDULER_TYPE, scheduler_type_enum_1.SchedulerType.INTERVAL)); + } + exports2.Interval = Interval; + } +}); + +// ../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/decorators/timeout.decorator.js +var require_timeout_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/decorators/timeout.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Timeout = void 0; + var common_12 = require_common(); + var scheduler_type_enum_1 = require_scheduler_type_enum(); + var schedule_constants_1 = require_schedule_constants(); + function Timeout(nameOrTimeout, timeout) { + const [name, timeoutValue] = typeof nameOrTimeout === "string" ? [nameOrTimeout, timeout] : [void 0, nameOrTimeout]; + return (0, common_12.applyDecorators)((0, common_12.SetMetadata)(schedule_constants_1.SCHEDULE_TIMEOUT_OPTIONS, { timeout: timeoutValue }), (0, common_12.SetMetadata)(schedule_constants_1.SCHEDULER_NAME, name), (0, common_12.SetMetadata)(schedule_constants_1.SCHEDULER_TYPE, scheduler_type_enum_1.SchedulerType.TIMEOUT)); + } + exports2.Timeout = Timeout; + } +}); + +// ../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/decorators/index.js +var require_decorators7 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/decorators/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_cron_decorator(), exports2); + __exportStar2(require_interval_decorator(), exports2); + __exportStar2(require_timeout_decorator(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/schedule-metadata.accessor.js +var require_schedule_metadata_accessor = __commonJS({ + "../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/schedule-metadata.accessor.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SchedulerMetadataAccessor = void 0; + var common_12 = require_common(); + var core_12 = require_core3(); + var schedule_constants_1 = require_schedule_constants(); + var SchedulerMetadataAccessor = class SchedulerMetadataAccessor { + constructor(reflector) { + this.reflector = reflector; + } + getSchedulerType(target) { + return this.getMetadata(schedule_constants_1.SCHEDULER_TYPE, target); + } + getSchedulerName(target) { + return this.getMetadata(schedule_constants_1.SCHEDULER_NAME, target); + } + getTimeoutMetadata(target) { + return this.getMetadata(schedule_constants_1.SCHEDULE_TIMEOUT_OPTIONS, target); + } + getIntervalMetadata(target) { + return this.getMetadata(schedule_constants_1.SCHEDULE_INTERVAL_OPTIONS, target); + } + getCronMetadata(target) { + return this.getMetadata(schedule_constants_1.SCHEDULE_CRON_OPTIONS, target); + } + getMetadata(key, target) { + const isObject2 = typeof target === "object" ? target !== null : typeof target === "function"; + return isObject2 ? this.reflector.get(key, target) : void 0; + } + }; + exports2.SchedulerMetadataAccessor = SchedulerMetadataAccessor; + exports2.SchedulerMetadataAccessor = SchedulerMetadataAccessor = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", [core_12.Reflector]) + ], SchedulerMetadataAccessor); + } +}); + +// ../../node_modules/.pnpm/luxon@3.5.0/node_modules/luxon/build/node/luxon.js +var require_luxon2 = __commonJS({ + "../../node_modules/.pnpm/luxon@3.5.0/node_modules/luxon/build/node/luxon.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var LuxonError = class extends Error { + }; + var InvalidDateTimeError = class extends LuxonError { + constructor(reason) { + super(`Invalid DateTime: ${reason.toMessage()}`); + } + }; + var InvalidIntervalError = class extends LuxonError { + constructor(reason) { + super(`Invalid Interval: ${reason.toMessage()}`); + } + }; + var InvalidDurationError = class extends LuxonError { + constructor(reason) { + super(`Invalid Duration: ${reason.toMessage()}`); + } + }; + var ConflictingSpecificationError = class extends LuxonError { + }; + var InvalidUnitError = class extends LuxonError { + constructor(unit) { + super(`Invalid unit ${unit}`); + } + }; + var InvalidArgumentError = class extends LuxonError { + }; + var ZoneIsAbstractError = class extends LuxonError { + constructor() { + super("Zone is an abstract class"); + } + }; + var n = "numeric"; + var s = "short"; + var l2 = "long"; + var DATE_SHORT = { + year: n, + month: n, + day: n + }; + var DATE_MED = { + year: n, + month: s, + day: n + }; + var DATE_MED_WITH_WEEKDAY = { + year: n, + month: s, + day: n, + weekday: s + }; + var DATE_FULL = { + year: n, + month: l2, + day: n + }; + var DATE_HUGE = { + year: n, + month: l2, + day: n, + weekday: l2 + }; + var TIME_SIMPLE = { + hour: n, + minute: n + }; + var TIME_WITH_SECONDS = { + hour: n, + minute: n, + second: n + }; + var TIME_WITH_SHORT_OFFSET = { + hour: n, + minute: n, + second: n, + timeZoneName: s + }; + var TIME_WITH_LONG_OFFSET = { + hour: n, + minute: n, + second: n, + timeZoneName: l2 + }; + var TIME_24_SIMPLE = { + hour: n, + minute: n, + hourCycle: "h23" + }; + var TIME_24_WITH_SECONDS = { + hour: n, + minute: n, + second: n, + hourCycle: "h23" + }; + var TIME_24_WITH_SHORT_OFFSET = { + hour: n, + minute: n, + second: n, + hourCycle: "h23", + timeZoneName: s + }; + var TIME_24_WITH_LONG_OFFSET = { + hour: n, + minute: n, + second: n, + hourCycle: "h23", + timeZoneName: l2 + }; + var DATETIME_SHORT = { + year: n, + month: n, + day: n, + hour: n, + minute: n + }; + var DATETIME_SHORT_WITH_SECONDS = { + year: n, + month: n, + day: n, + hour: n, + minute: n, + second: n + }; + var DATETIME_MED = { + year: n, + month: s, + day: n, + hour: n, + minute: n + }; + var DATETIME_MED_WITH_SECONDS = { + year: n, + month: s, + day: n, + hour: n, + minute: n, + second: n + }; + var DATETIME_MED_WITH_WEEKDAY = { + year: n, + month: s, + day: n, + weekday: s, + hour: n, + minute: n + }; + var DATETIME_FULL = { + year: n, + month: l2, + day: n, + hour: n, + minute: n, + timeZoneName: s + }; + var DATETIME_FULL_WITH_SECONDS = { + year: n, + month: l2, + day: n, + hour: n, + minute: n, + second: n, + timeZoneName: s + }; + var DATETIME_HUGE = { + year: n, + month: l2, + day: n, + weekday: l2, + hour: n, + minute: n, + timeZoneName: l2 + }; + var DATETIME_HUGE_WITH_SECONDS = { + year: n, + month: l2, + day: n, + weekday: l2, + hour: n, + minute: n, + second: n, + timeZoneName: l2 + }; + var Zone = class { + /** + * The type of zone + * @abstract + * @type {string} + */ + get type() { + throw new ZoneIsAbstractError(); + } + /** + * The name of this zone. + * @abstract + * @type {string} + */ + get name() { + throw new ZoneIsAbstractError(); + } + /** + * The IANA name of this zone. + * Defaults to `name` if not overwritten by a subclass. + * @abstract + * @type {string} + */ + get ianaName() { + return this.name; + } + /** + * Returns whether the offset is known to be fixed for the whole year. + * @abstract + * @type {boolean} + */ + get isUniversal() { + throw new ZoneIsAbstractError(); + } + /** + * Returns the offset's common name (such as EST) at the specified timestamp + * @abstract + * @param {number} ts - Epoch milliseconds for which to get the name + * @param {Object} opts - Options to affect the format + * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'. + * @param {string} opts.locale - What locale to return the offset name in. + * @return {string} + */ + offsetName(ts, opts) { + throw new ZoneIsAbstractError(); + } + /** + * Returns the offset's value as a string + * @abstract + * @param {number} ts - Epoch milliseconds for which to get the offset + * @param {string} format - What style of offset to return. + * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively + * @return {string} + */ + formatOffset(ts, format) { + throw new ZoneIsAbstractError(); + } + /** + * Return the offset in minutes for this zone at the specified timestamp. + * @abstract + * @param {number} ts - Epoch milliseconds for which to compute the offset + * @return {number} + */ + offset(ts) { + throw new ZoneIsAbstractError(); + } + /** + * Return whether this Zone is equal to another zone + * @abstract + * @param {Zone} otherZone - the zone to compare + * @return {boolean} + */ + equals(otherZone) { + throw new ZoneIsAbstractError(); + } + /** + * Return whether this Zone is valid. + * @abstract + * @type {boolean} + */ + get isValid() { + throw new ZoneIsAbstractError(); + } + }; + var singleton$1 = null; + var SystemZone = class _SystemZone extends Zone { + /** + * Get a singleton instance of the local zone + * @return {SystemZone} + */ + static get instance() { + if (singleton$1 === null) { + singleton$1 = new _SystemZone(); + } + return singleton$1; + } + /** @override **/ + get type() { + return "system"; + } + /** @override **/ + get name() { + return new Intl.DateTimeFormat().resolvedOptions().timeZone; + } + /** @override **/ + get isUniversal() { + return false; + } + /** @override **/ + offsetName(ts, { + format, + locale + }) { + return parseZoneInfo(ts, format, locale); + } + /** @override **/ + formatOffset(ts, format) { + return formatOffset(this.offset(ts), format); + } + /** @override **/ + offset(ts) { + return -new Date(ts).getTimezoneOffset(); + } + /** @override **/ + equals(otherZone) { + return otherZone.type === "system"; + } + /** @override **/ + get isValid() { + return true; + } + }; + var dtfCache = {}; + function makeDTF(zone) { + if (!dtfCache[zone]) { + dtfCache[zone] = new Intl.DateTimeFormat("en-US", { + hour12: false, + timeZone: zone, + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit", + second: "2-digit", + era: "short" + }); + } + return dtfCache[zone]; + } + var typeToPos = { + year: 0, + month: 1, + day: 2, + era: 3, + hour: 4, + minute: 5, + second: 6 + }; + function hackyOffset(dtf, date) { + const formatted = dtf.format(date).replace(/\u200E/g, ""), parsed = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(formatted), [, fMonth, fDay, fYear, fadOrBc, fHour, fMinute, fSecond] = parsed; + return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond]; + } + function partsOffset(dtf, date) { + const formatted = dtf.formatToParts(date); + const filled = []; + for (let i = 0; i < formatted.length; i++) { + const { + type, + value + } = formatted[i]; + const pos = typeToPos[type]; + if (type === "era") { + filled[pos] = value; + } else if (!isUndefined(pos)) { + filled[pos] = parseInt(value, 10); + } + } + return filled; + } + var ianaZoneCache = {}; + var IANAZone = class _IANAZone extends Zone { + /** + * @param {string} name - Zone name + * @return {IANAZone} + */ + static create(name) { + if (!ianaZoneCache[name]) { + ianaZoneCache[name] = new _IANAZone(name); + } + return ianaZoneCache[name]; + } + /** + * Reset local caches. Should only be necessary in testing scenarios. + * @return {void} + */ + static resetCache() { + ianaZoneCache = {}; + dtfCache = {}; + } + /** + * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that. + * @param {string} s - The string to check validity on + * @example IANAZone.isValidSpecifier("America/New_York") //=> true + * @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false + * @deprecated For backward compatibility, this forwards to isValidZone, better use `isValidZone()` directly instead. + * @return {boolean} + */ + static isValidSpecifier(s2) { + return this.isValidZone(s2); + } + /** + * Returns whether the provided string identifies a real zone + * @param {string} zone - The string to check + * @example IANAZone.isValidZone("America/New_York") //=> true + * @example IANAZone.isValidZone("Fantasia/Castle") //=> false + * @example IANAZone.isValidZone("Sport~~blorp") //=> false + * @return {boolean} + */ + static isValidZone(zone) { + if (!zone) { + return false; + } + try { + new Intl.DateTimeFormat("en-US", { + timeZone: zone + }).format(); + return true; + } catch (e) { + return false; + } + } + constructor(name) { + super(); + this.zoneName = name; + this.valid = _IANAZone.isValidZone(name); + } + /** + * The type of zone. `iana` for all instances of `IANAZone`. + * @override + * @type {string} + */ + get type() { + return "iana"; + } + /** + * The name of this zone (i.e. the IANA zone name). + * @override + * @type {string} + */ + get name() { + return this.zoneName; + } + /** + * Returns whether the offset is known to be fixed for the whole year: + * Always returns false for all IANA zones. + * @override + * @type {boolean} + */ + get isUniversal() { + return false; + } + /** + * Returns the offset's common name (such as EST) at the specified timestamp + * @override + * @param {number} ts - Epoch milliseconds for which to get the name + * @param {Object} opts - Options to affect the format + * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'. + * @param {string} opts.locale - What locale to return the offset name in. + * @return {string} + */ + offsetName(ts, { + format, + locale + }) { + return parseZoneInfo(ts, format, locale, this.name); + } + /** + * Returns the offset's value as a string + * @override + * @param {number} ts - Epoch milliseconds for which to get the offset + * @param {string} format - What style of offset to return. + * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively + * @return {string} + */ + formatOffset(ts, format) { + return formatOffset(this.offset(ts), format); + } + /** + * Return the offset in minutes for this zone at the specified timestamp. + * @override + * @param {number} ts - Epoch milliseconds for which to compute the offset + * @return {number} + */ + offset(ts) { + const date = new Date(ts); + if (isNaN(date)) return NaN; + const dtf = makeDTF(this.name); + let [year, month, day, adOrBc, hour, minute, second] = dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date); + if (adOrBc === "BC") { + year = -Math.abs(year) + 1; + } + const adjustedHour = hour === 24 ? 0 : hour; + const asUTC = objToLocalTS({ + year, + month, + day, + hour: adjustedHour, + minute, + second, + millisecond: 0 + }); + let asTS = +date; + const over = asTS % 1e3; + asTS -= over >= 0 ? over : 1e3 + over; + return (asUTC - asTS) / (60 * 1e3); + } + /** + * Return whether this Zone is equal to another zone + * @override + * @param {Zone} otherZone - the zone to compare + * @return {boolean} + */ + equals(otherZone) { + return otherZone.type === "iana" && otherZone.name === this.name; + } + /** + * Return whether this Zone is valid. + * @override + * @type {boolean} + */ + get isValid() { + return this.valid; + } + }; + var intlLFCache = {}; + function getCachedLF(locString, opts = {}) { + const key = JSON.stringify([locString, opts]); + let dtf = intlLFCache[key]; + if (!dtf) { + dtf = new Intl.ListFormat(locString, opts); + intlLFCache[key] = dtf; + } + return dtf; + } + var intlDTCache = {}; + function getCachedDTF(locString, opts = {}) { + const key = JSON.stringify([locString, opts]); + let dtf = intlDTCache[key]; + if (!dtf) { + dtf = new Intl.DateTimeFormat(locString, opts); + intlDTCache[key] = dtf; + } + return dtf; + } + var intlNumCache = {}; + function getCachedINF(locString, opts = {}) { + const key = JSON.stringify([locString, opts]); + let inf = intlNumCache[key]; + if (!inf) { + inf = new Intl.NumberFormat(locString, opts); + intlNumCache[key] = inf; + } + return inf; + } + var intlRelCache = {}; + function getCachedRTF(locString, opts = {}) { + const { + base, + ...cacheKeyOpts + } = opts; + const key = JSON.stringify([locString, cacheKeyOpts]); + let inf = intlRelCache[key]; + if (!inf) { + inf = new Intl.RelativeTimeFormat(locString, opts); + intlRelCache[key] = inf; + } + return inf; + } + var sysLocaleCache = null; + function systemLocale() { + if (sysLocaleCache) { + return sysLocaleCache; + } else { + sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale; + return sysLocaleCache; + } + } + var weekInfoCache = {}; + function getCachedWeekInfo(locString) { + let data = weekInfoCache[locString]; + if (!data) { + const locale = new Intl.Locale(locString); + data = "getWeekInfo" in locale ? locale.getWeekInfo() : locale.weekInfo; + weekInfoCache[locString] = data; + } + return data; + } + function parseLocaleString(localeStr) { + const xIndex = localeStr.indexOf("-x-"); + if (xIndex !== -1) { + localeStr = localeStr.substring(0, xIndex); + } + const uIndex = localeStr.indexOf("-u-"); + if (uIndex === -1) { + return [localeStr]; + } else { + let options; + let selectedStr; + try { + options = getCachedDTF(localeStr).resolvedOptions(); + selectedStr = localeStr; + } catch (e) { + const smaller = localeStr.substring(0, uIndex); + options = getCachedDTF(smaller).resolvedOptions(); + selectedStr = smaller; + } + const { + numberingSystem, + calendar + } = options; + return [selectedStr, numberingSystem, calendar]; + } + } + function intlConfigString(localeStr, numberingSystem, outputCalendar) { + if (outputCalendar || numberingSystem) { + if (!localeStr.includes("-u-")) { + localeStr += "-u"; + } + if (outputCalendar) { + localeStr += `-ca-${outputCalendar}`; + } + if (numberingSystem) { + localeStr += `-nu-${numberingSystem}`; + } + return localeStr; + } else { + return localeStr; + } + } + function mapMonths(f) { + const ms = []; + for (let i = 1; i <= 12; i++) { + const dt = DateTime.utc(2009, i, 1); + ms.push(f(dt)); + } + return ms; + } + function mapWeekdays(f) { + const ms = []; + for (let i = 1; i <= 7; i++) { + const dt = DateTime.utc(2016, 11, 13 + i); + ms.push(f(dt)); + } + return ms; + } + function listStuff(loc, length, englishFn, intlFn) { + const mode = loc.listingMode(); + if (mode === "error") { + return null; + } else if (mode === "en") { + return englishFn(length); + } else { + return intlFn(length); + } + } + function supportsFastNumbers(loc) { + if (loc.numberingSystem && loc.numberingSystem !== "latn") { + return false; + } else { + return loc.numberingSystem === "latn" || !loc.locale || loc.locale.startsWith("en") || new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === "latn"; + } + } + var PolyNumberFormatter = class { + constructor(intl, forceSimple, opts) { + this.padTo = opts.padTo || 0; + this.floor = opts.floor || false; + const { + padTo, + floor, + ...otherOpts + } = opts; + if (!forceSimple || Object.keys(otherOpts).length > 0) { + const intlOpts = { + useGrouping: false, + ...opts + }; + if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo; + this.inf = getCachedINF(intl, intlOpts); + } + } + format(i) { + if (this.inf) { + const fixed = this.floor ? Math.floor(i) : i; + return this.inf.format(fixed); + } else { + const fixed = this.floor ? Math.floor(i) : roundTo(i, 3); + return padStart(fixed, this.padTo); + } + } + }; + var PolyDateFormatter = class { + constructor(dt, intl, opts) { + this.opts = opts; + this.originalZone = void 0; + let z = void 0; + if (this.opts.timeZone) { + this.dt = dt; + } else if (dt.zone.type === "fixed") { + const gmtOffset = -1 * (dt.offset / 60); + const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`; + if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) { + z = offsetZ; + this.dt = dt; + } else { + z = "UTC"; + this.dt = dt.offset === 0 ? dt : dt.setZone("UTC").plus({ + minutes: dt.offset + }); + this.originalZone = dt.zone; + } + } else if (dt.zone.type === "system") { + this.dt = dt; + } else if (dt.zone.type === "iana") { + this.dt = dt; + z = dt.zone.name; + } else { + z = "UTC"; + this.dt = dt.setZone("UTC").plus({ + minutes: dt.offset + }); + this.originalZone = dt.zone; + } + const intlOpts = { + ...this.opts + }; + intlOpts.timeZone = intlOpts.timeZone || z; + this.dtf = getCachedDTF(intl, intlOpts); + } + format() { + if (this.originalZone) { + return this.formatToParts().map(({ + value + }) => value).join(""); + } + return this.dtf.format(this.dt.toJSDate()); + } + formatToParts() { + const parts = this.dtf.formatToParts(this.dt.toJSDate()); + if (this.originalZone) { + return parts.map((part) => { + if (part.type === "timeZoneName") { + const offsetName = this.originalZone.offsetName(this.dt.ts, { + locale: this.dt.locale, + format: this.opts.timeZoneName + }); + return { + ...part, + value: offsetName + }; + } else { + return part; + } + }); + } + return parts; + } + resolvedOptions() { + return this.dtf.resolvedOptions(); + } + }; + var PolyRelFormatter = class { + constructor(intl, isEnglish, opts) { + this.opts = { + style: "long", + ...opts + }; + if (!isEnglish && hasRelative()) { + this.rtf = getCachedRTF(intl, opts); + } + } + format(count, unit) { + if (this.rtf) { + return this.rtf.format(count, unit); + } else { + return formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== "long"); + } + } + formatToParts(count, unit) { + if (this.rtf) { + return this.rtf.formatToParts(count, unit); + } else { + return []; + } + } + }; + var fallbackWeekSettings = { + firstDay: 1, + minimalDays: 4, + weekend: [6, 7] + }; + var Locale = class _Locale { + static fromOpts(opts) { + return _Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.weekSettings, opts.defaultToEN); + } + static create(locale, numberingSystem, outputCalendar, weekSettings, defaultToEN = false) { + const specifiedLocale = locale || Settings.defaultLocale; + const localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale()); + const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem; + const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar; + const weekSettingsR = validateWeekSettings(weekSettings) || Settings.defaultWeekSettings; + return new _Locale(localeR, numberingSystemR, outputCalendarR, weekSettingsR, specifiedLocale); + } + static resetCache() { + sysLocaleCache = null; + intlDTCache = {}; + intlNumCache = {}; + intlRelCache = {}; + } + static fromObject({ + locale, + numberingSystem, + outputCalendar, + weekSettings + } = {}) { + return _Locale.create(locale, numberingSystem, outputCalendar, weekSettings); + } + constructor(locale, numbering, outputCalendar, weekSettings, specifiedLocale) { + const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale); + this.locale = parsedLocale; + this.numberingSystem = numbering || parsedNumberingSystem || null; + this.outputCalendar = outputCalendar || parsedOutputCalendar || null; + this.weekSettings = weekSettings; + this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar); + this.weekdaysCache = { + format: {}, + standalone: {} + }; + this.monthsCache = { + format: {}, + standalone: {} + }; + this.meridiemCache = null; + this.eraCache = {}; + this.specifiedLocale = specifiedLocale; + this.fastNumbersCached = null; + } + get fastNumbers() { + if (this.fastNumbersCached == null) { + this.fastNumbersCached = supportsFastNumbers(this); + } + return this.fastNumbersCached; + } + listingMode() { + const isActuallyEn = this.isEnglish(); + const hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory"); + return isActuallyEn && hasNoWeirdness ? "en" : "intl"; + } + clone(alts) { + if (!alts || Object.getOwnPropertyNames(alts).length === 0) { + return this; + } else { + return _Locale.create(alts.locale || this.specifiedLocale, alts.numberingSystem || this.numberingSystem, alts.outputCalendar || this.outputCalendar, validateWeekSettings(alts.weekSettings) || this.weekSettings, alts.defaultToEN || false); + } + } + redefaultToEN(alts = {}) { + return this.clone({ + ...alts, + defaultToEN: true + }); + } + redefaultToSystem(alts = {}) { + return this.clone({ + ...alts, + defaultToEN: false + }); + } + months(length, format = false) { + return listStuff(this, length, months, () => { + const intl = format ? { + month: length, + day: "numeric" + } : { + month: length + }, formatStr = format ? "format" : "standalone"; + if (!this.monthsCache[formatStr][length]) { + this.monthsCache[formatStr][length] = mapMonths((dt) => this.extract(dt, intl, "month")); + } + return this.monthsCache[formatStr][length]; + }); + } + weekdays(length, format = false) { + return listStuff(this, length, weekdays, () => { + const intl = format ? { + weekday: length, + year: "numeric", + month: "long", + day: "numeric" + } : { + weekday: length + }, formatStr = format ? "format" : "standalone"; + if (!this.weekdaysCache[formatStr][length]) { + this.weekdaysCache[formatStr][length] = mapWeekdays((dt) => this.extract(dt, intl, "weekday")); + } + return this.weekdaysCache[formatStr][length]; + }); + } + meridiems() { + return listStuff(this, void 0, () => meridiems, () => { + if (!this.meridiemCache) { + const intl = { + hour: "numeric", + hourCycle: "h12" + }; + this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map((dt) => this.extract(dt, intl, "dayperiod")); + } + return this.meridiemCache; + }); + } + eras(length) { + return listStuff(this, length, eras, () => { + const intl = { + era: length + }; + if (!this.eraCache[length]) { + this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map((dt) => this.extract(dt, intl, "era")); + } + return this.eraCache[length]; + }); + } + extract(dt, intlOpts, field) { + const df = this.dtFormatter(dt, intlOpts), results = df.formatToParts(), matching = results.find((m) => m.type.toLowerCase() === field); + return matching ? matching.value : null; + } + numberFormatter(opts = {}) { + return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts); + } + dtFormatter(dt, intlOpts = {}) { + return new PolyDateFormatter(dt, this.intl, intlOpts); + } + relFormatter(opts = {}) { + return new PolyRelFormatter(this.intl, this.isEnglish(), opts); + } + listFormatter(opts = {}) { + return getCachedLF(this.intl, opts); + } + isEnglish() { + return this.locale === "en" || this.locale.toLowerCase() === "en-us" || new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us"); + } + getWeekSettings() { + if (this.weekSettings) { + return this.weekSettings; + } else if (!hasLocaleWeekInfo()) { + return fallbackWeekSettings; + } else { + return getCachedWeekInfo(this.locale); + } + } + getStartOfWeek() { + return this.getWeekSettings().firstDay; + } + getMinDaysInFirstWeek() { + return this.getWeekSettings().minimalDays; + } + getWeekendDays() { + return this.getWeekSettings().weekend; + } + equals(other) { + return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar; + } + toString() { + return `Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`; + } + }; + var singleton = null; + var FixedOffsetZone = class _FixedOffsetZone extends Zone { + /** + * Get a singleton instance of UTC + * @return {FixedOffsetZone} + */ + static get utcInstance() { + if (singleton === null) { + singleton = new _FixedOffsetZone(0); + } + return singleton; + } + /** + * Get an instance with a specified offset + * @param {number} offset - The offset in minutes + * @return {FixedOffsetZone} + */ + static instance(offset2) { + return offset2 === 0 ? _FixedOffsetZone.utcInstance : new _FixedOffsetZone(offset2); + } + /** + * Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6" + * @param {string} s - The offset string to parse + * @example FixedOffsetZone.parseSpecifier("UTC+6") + * @example FixedOffsetZone.parseSpecifier("UTC+06") + * @example FixedOffsetZone.parseSpecifier("UTC-6:00") + * @return {FixedOffsetZone} + */ + static parseSpecifier(s2) { + if (s2) { + const r = s2.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i); + if (r) { + return new _FixedOffsetZone(signedOffset(r[1], r[2])); + } + } + return null; + } + constructor(offset2) { + super(); + this.fixed = offset2; + } + /** + * The type of zone. `fixed` for all instances of `FixedOffsetZone`. + * @override + * @type {string} + */ + get type() { + return "fixed"; + } + /** + * The name of this zone. + * All fixed zones' names always start with "UTC" (plus optional offset) + * @override + * @type {string} + */ + get name() { + return this.fixed === 0 ? "UTC" : `UTC${formatOffset(this.fixed, "narrow")}`; + } + /** + * The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn` + * + * @override + * @type {string} + */ + get ianaName() { + if (this.fixed === 0) { + return "Etc/UTC"; + } else { + return `Etc/GMT${formatOffset(-this.fixed, "narrow")}`; + } + } + /** + * Returns the offset's common name at the specified timestamp. + * + * For fixed offset zones this equals to the zone name. + * @override + */ + offsetName() { + return this.name; + } + /** + * Returns the offset's value as a string + * @override + * @param {number} ts - Epoch milliseconds for which to get the offset + * @param {string} format - What style of offset to return. + * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively + * @return {string} + */ + formatOffset(ts, format) { + return formatOffset(this.fixed, format); + } + /** + * Returns whether the offset is known to be fixed for the whole year: + * Always returns true for all fixed offset zones. + * @override + * @type {boolean} + */ + get isUniversal() { + return true; + } + /** + * Return the offset in minutes for this zone at the specified timestamp. + * + * For fixed offset zones, this is constant and does not depend on a timestamp. + * @override + * @return {number} + */ + offset() { + return this.fixed; + } + /** + * Return whether this Zone is equal to another zone (i.e. also fixed and same offset) + * @override + * @param {Zone} otherZone - the zone to compare + * @return {boolean} + */ + equals(otherZone) { + return otherZone.type === "fixed" && otherZone.fixed === this.fixed; + } + /** + * Return whether this Zone is valid: + * All fixed offset zones are valid. + * @override + * @type {boolean} + */ + get isValid() { + return true; + } + }; + var InvalidZone = class extends Zone { + constructor(zoneName) { + super(); + this.zoneName = zoneName; + } + /** @override **/ + get type() { + return "invalid"; + } + /** @override **/ + get name() { + return this.zoneName; + } + /** @override **/ + get isUniversal() { + return false; + } + /** @override **/ + offsetName() { + return null; + } + /** @override **/ + formatOffset() { + return ""; + } + /** @override **/ + offset() { + return NaN; + } + /** @override **/ + equals() { + return false; + } + /** @override **/ + get isValid() { + return false; + } + }; + function normalizeZone(input, defaultZone2) { + if (isUndefined(input) || input === null) { + return defaultZone2; + } else if (input instanceof Zone) { + return input; + } else if (isString(input)) { + const lowered = input.toLowerCase(); + if (lowered === "default") return defaultZone2; + else if (lowered === "local" || lowered === "system") return SystemZone.instance; + else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance; + else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input); + } else if (isNumber(input)) { + return FixedOffsetZone.instance(input); + } else if (typeof input === "object" && "offset" in input && typeof input.offset === "function") { + return input; + } else { + return new InvalidZone(input); + } + } + var numberingSystems = { + arab: "[\u0660-\u0669]", + arabext: "[\u06F0-\u06F9]", + bali: "[\u1B50-\u1B59]", + beng: "[\u09E6-\u09EF]", + deva: "[\u0966-\u096F]", + fullwide: "[\uFF10-\uFF19]", + gujr: "[\u0AE6-\u0AEF]", + hanidec: "[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]", + khmr: "[\u17E0-\u17E9]", + knda: "[\u0CE6-\u0CEF]", + laoo: "[\u0ED0-\u0ED9]", + limb: "[\u1946-\u194F]", + mlym: "[\u0D66-\u0D6F]", + mong: "[\u1810-\u1819]", + mymr: "[\u1040-\u1049]", + orya: "[\u0B66-\u0B6F]", + tamldec: "[\u0BE6-\u0BEF]", + telu: "[\u0C66-\u0C6F]", + thai: "[\u0E50-\u0E59]", + tibt: "[\u0F20-\u0F29]", + latn: "\\d" + }; + var numberingSystemsUTF16 = { + arab: [1632, 1641], + arabext: [1776, 1785], + bali: [6992, 7001], + beng: [2534, 2543], + deva: [2406, 2415], + fullwide: [65296, 65303], + gujr: [2790, 2799], + khmr: [6112, 6121], + knda: [3302, 3311], + laoo: [3792, 3801], + limb: [6470, 6479], + mlym: [3430, 3439], + mong: [6160, 6169], + mymr: [4160, 4169], + orya: [2918, 2927], + tamldec: [3046, 3055], + telu: [3174, 3183], + thai: [3664, 3673], + tibt: [3872, 3881] + }; + var hanidecChars = numberingSystems.hanidec.replace(/[\[|\]]/g, "").split(""); + function parseDigits(str) { + let value = parseInt(str, 10); + if (isNaN(value)) { + value = ""; + for (let i = 0; i < str.length; i++) { + const code = str.charCodeAt(i); + if (str[i].search(numberingSystems.hanidec) !== -1) { + value += hanidecChars.indexOf(str[i]); + } else { + for (const key in numberingSystemsUTF16) { + const [min, max] = numberingSystemsUTF16[key]; + if (code >= min && code <= max) { + value += code - min; + } + } + } + } + return parseInt(value, 10); + } else { + return value; + } + } + var digitRegexCache = {}; + function resetDigitRegexCache() { + digitRegexCache = {}; + } + function digitRegex({ + numberingSystem + }, append = "") { + const ns = numberingSystem || "latn"; + if (!digitRegexCache[ns]) { + digitRegexCache[ns] = {}; + } + if (!digitRegexCache[ns][append]) { + digitRegexCache[ns][append] = new RegExp(`${numberingSystems[ns]}${append}`); + } + return digitRegexCache[ns][append]; + } + var now = () => Date.now(); + var defaultZone = "system"; + var defaultLocale = null; + var defaultNumberingSystem = null; + var defaultOutputCalendar = null; + var twoDigitCutoffYear = 60; + var throwOnInvalid; + var defaultWeekSettings = null; + var Settings = class { + /** + * Get the callback for returning the current timestamp. + * @type {function} + */ + static get now() { + return now; + } + /** + * Set the callback for returning the current timestamp. + * The function should return a number, which will be interpreted as an Epoch millisecond count + * @type {function} + * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future + * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time + */ + static set now(n2) { + now = n2; + } + /** + * Set the default time zone to create DateTimes in. Does not affect existing instances. + * Use the value "system" to reset this value to the system's time zone. + * @type {string} + */ + static set defaultZone(zone) { + defaultZone = zone; + } + /** + * Get the default time zone object currently used to create DateTimes. Does not affect existing instances. + * The default value is the system's time zone (the one set on the machine that runs this code). + * @type {Zone} + */ + static get defaultZone() { + return normalizeZone(defaultZone, SystemZone.instance); + } + /** + * Get the default locale to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static get defaultLocale() { + return defaultLocale; + } + /** + * Set the default locale to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static set defaultLocale(locale) { + defaultLocale = locale; + } + /** + * Get the default numbering system to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static get defaultNumberingSystem() { + return defaultNumberingSystem; + } + /** + * Set the default numbering system to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static set defaultNumberingSystem(numberingSystem) { + defaultNumberingSystem = numberingSystem; + } + /** + * Get the default output calendar to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static get defaultOutputCalendar() { + return defaultOutputCalendar; + } + /** + * Set the default output calendar to create DateTimes with. Does not affect existing instances. + * @type {string} + */ + static set defaultOutputCalendar(outputCalendar) { + defaultOutputCalendar = outputCalendar; + } + /** + * @typedef {Object} WeekSettings + * @property {number} firstDay + * @property {number} minimalDays + * @property {number[]} weekend + */ + /** + * @return {WeekSettings|null} + */ + static get defaultWeekSettings() { + return defaultWeekSettings; + } + /** + * Allows overriding the default locale week settings, i.e. the start of the week, the weekend and + * how many days are required in the first week of a year. + * Does not affect existing instances. + * + * @param {WeekSettings|null} weekSettings + */ + static set defaultWeekSettings(weekSettings) { + defaultWeekSettings = validateWeekSettings(weekSettings); + } + /** + * Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx. + * @type {number} + */ + static get twoDigitCutoffYear() { + return twoDigitCutoffYear; + } + /** + * Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx. + * @type {number} + * @example Settings.twoDigitCutoffYear = 0 // all 'yy' are interpreted as 20th century + * @example Settings.twoDigitCutoffYear = 99 // all 'yy' are interpreted as 21st century + * @example Settings.twoDigitCutoffYear = 50 // '49' -> 2049; '50' -> 1950 + * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50 + * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50 + */ + static set twoDigitCutoffYear(cutoffYear) { + twoDigitCutoffYear = cutoffYear % 100; + } + /** + * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals + * @type {boolean} + */ + static get throwOnInvalid() { + return throwOnInvalid; + } + /** + * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals + * @type {boolean} + */ + static set throwOnInvalid(t) { + throwOnInvalid = t; + } + /** + * Reset Luxon's global caches. Should only be necessary in testing scenarios. + * @return {void} + */ + static resetCaches() { + Locale.resetCache(); + IANAZone.resetCache(); + DateTime.resetCache(); + resetDigitRegexCache(); + } + }; + var Invalid = class { + constructor(reason, explanation) { + this.reason = reason; + this.explanation = explanation; + } + toMessage() { + if (this.explanation) { + return `${this.reason}: ${this.explanation}`; + } else { + return this.reason; + } + } + }; + var nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; + var leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]; + function unitOutOfRange(unit, value) { + return new Invalid("unit out of range", `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`); + } + function dayOfWeek(year, month, day) { + const d = new Date(Date.UTC(year, month - 1, day)); + if (year < 100 && year >= 0) { + d.setUTCFullYear(d.getUTCFullYear() - 1900); + } + const js = d.getUTCDay(); + return js === 0 ? 7 : js; + } + function computeOrdinal(year, month, day) { + return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1]; + } + function uncomputeOrdinal(year, ordinal) { + const table = isLeapYear(year) ? leapLadder : nonLeapLadder, month0 = table.findIndex((i) => i < ordinal), day = ordinal - table[month0]; + return { + month: month0 + 1, + day + }; + } + function isoWeekdayToLocal(isoWeekday, startOfWeek) { + return (isoWeekday - startOfWeek + 7) % 7 + 1; + } + function gregorianToWeek(gregObj, minDaysInFirstWeek = 4, startOfWeek = 1) { + const { + year, + month, + day + } = gregObj, ordinal = computeOrdinal(year, month, day), weekday = isoWeekdayToLocal(dayOfWeek(year, month, day), startOfWeek); + let weekNumber = Math.floor((ordinal - weekday + 14 - minDaysInFirstWeek) / 7), weekYear; + if (weekNumber < 1) { + weekYear = year - 1; + weekNumber = weeksInWeekYear(weekYear, minDaysInFirstWeek, startOfWeek); + } else if (weekNumber > weeksInWeekYear(year, minDaysInFirstWeek, startOfWeek)) { + weekYear = year + 1; + weekNumber = 1; + } else { + weekYear = year; + } + return { + weekYear, + weekNumber, + weekday, + ...timeObject(gregObj) + }; + } + function weekToGregorian(weekData, minDaysInFirstWeek = 4, startOfWeek = 1) { + const { + weekYear, + weekNumber, + weekday + } = weekData, weekdayOfJan4 = isoWeekdayToLocal(dayOfWeek(weekYear, 1, minDaysInFirstWeek), startOfWeek), yearInDays = daysInYear(weekYear); + let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 7 + minDaysInFirstWeek, year; + if (ordinal < 1) { + year = weekYear - 1; + ordinal += daysInYear(year); + } else if (ordinal > yearInDays) { + year = weekYear + 1; + ordinal -= daysInYear(weekYear); + } else { + year = weekYear; + } + const { + month, + day + } = uncomputeOrdinal(year, ordinal); + return { + year, + month, + day, + ...timeObject(weekData) + }; + } + function gregorianToOrdinal(gregData) { + const { + year, + month, + day + } = gregData; + const ordinal = computeOrdinal(year, month, day); + return { + year, + ordinal, + ...timeObject(gregData) + }; + } + function ordinalToGregorian(ordinalData) { + const { + year, + ordinal + } = ordinalData; + const { + month, + day + } = uncomputeOrdinal(year, ordinal); + return { + year, + month, + day, + ...timeObject(ordinalData) + }; + } + function usesLocalWeekValues(obj2, loc) { + const hasLocaleWeekData = !isUndefined(obj2.localWeekday) || !isUndefined(obj2.localWeekNumber) || !isUndefined(obj2.localWeekYear); + if (hasLocaleWeekData) { + const hasIsoWeekData = !isUndefined(obj2.weekday) || !isUndefined(obj2.weekNumber) || !isUndefined(obj2.weekYear); + if (hasIsoWeekData) { + throw new ConflictingSpecificationError("Cannot mix locale-based week fields with ISO-based week fields"); + } + if (!isUndefined(obj2.localWeekday)) obj2.weekday = obj2.localWeekday; + if (!isUndefined(obj2.localWeekNumber)) obj2.weekNumber = obj2.localWeekNumber; + if (!isUndefined(obj2.localWeekYear)) obj2.weekYear = obj2.localWeekYear; + delete obj2.localWeekday; + delete obj2.localWeekNumber; + delete obj2.localWeekYear; + return { + minDaysInFirstWeek: loc.getMinDaysInFirstWeek(), + startOfWeek: loc.getStartOfWeek() + }; + } else { + return { + minDaysInFirstWeek: 4, + startOfWeek: 1 + }; + } + } + function hasInvalidWeekData(obj2, minDaysInFirstWeek = 4, startOfWeek = 1) { + const validYear = isInteger(obj2.weekYear), validWeek = integerBetween(obj2.weekNumber, 1, weeksInWeekYear(obj2.weekYear, minDaysInFirstWeek, startOfWeek)), validWeekday = integerBetween(obj2.weekday, 1, 7); + if (!validYear) { + return unitOutOfRange("weekYear", obj2.weekYear); + } else if (!validWeek) { + return unitOutOfRange("week", obj2.weekNumber); + } else if (!validWeekday) { + return unitOutOfRange("weekday", obj2.weekday); + } else return false; + } + function hasInvalidOrdinalData(obj2) { + const validYear = isInteger(obj2.year), validOrdinal = integerBetween(obj2.ordinal, 1, daysInYear(obj2.year)); + if (!validYear) { + return unitOutOfRange("year", obj2.year); + } else if (!validOrdinal) { + return unitOutOfRange("ordinal", obj2.ordinal); + } else return false; + } + function hasInvalidGregorianData(obj2) { + const validYear = isInteger(obj2.year), validMonth = integerBetween(obj2.month, 1, 12), validDay = integerBetween(obj2.day, 1, daysInMonth(obj2.year, obj2.month)); + if (!validYear) { + return unitOutOfRange("year", obj2.year); + } else if (!validMonth) { + return unitOutOfRange("month", obj2.month); + } else if (!validDay) { + return unitOutOfRange("day", obj2.day); + } else return false; + } + function hasInvalidTimeData(obj2) { + const { + hour, + minute, + second, + millisecond + } = obj2; + const validHour = integerBetween(hour, 0, 23) || hour === 24 && minute === 0 && second === 0 && millisecond === 0, validMinute = integerBetween(minute, 0, 59), validSecond = integerBetween(second, 0, 59), validMillisecond = integerBetween(millisecond, 0, 999); + if (!validHour) { + return unitOutOfRange("hour", hour); + } else if (!validMinute) { + return unitOutOfRange("minute", minute); + } else if (!validSecond) { + return unitOutOfRange("second", second); + } else if (!validMillisecond) { + return unitOutOfRange("millisecond", millisecond); + } else return false; + } + function isUndefined(o) { + return typeof o === "undefined"; + } + function isNumber(o) { + return typeof o === "number"; + } + function isInteger(o) { + return typeof o === "number" && o % 1 === 0; + } + function isString(o) { + return typeof o === "string"; + } + function isDate(o) { + return Object.prototype.toString.call(o) === "[object Date]"; + } + function hasRelative() { + try { + return typeof Intl !== "undefined" && !!Intl.RelativeTimeFormat; + } catch (e) { + return false; + } + } + function hasLocaleWeekInfo() { + try { + return typeof Intl !== "undefined" && !!Intl.Locale && ("weekInfo" in Intl.Locale.prototype || "getWeekInfo" in Intl.Locale.prototype); + } catch (e) { + return false; + } + } + function maybeArray(thing) { + return Array.isArray(thing) ? thing : [thing]; + } + function bestBy(arr, by, compare) { + if (arr.length === 0) { + return void 0; + } + return arr.reduce((best, next) => { + const pair = [by(next), next]; + if (!best) { + return pair; + } else if (compare(best[0], pair[0]) === best[0]) { + return best; + } else { + return pair; + } + }, null)[1]; + } + function pick(obj2, keys) { + return keys.reduce((a, k) => { + a[k] = obj2[k]; + return a; + }, {}); + } + function hasOwnProperty(obj2, prop) { + return Object.prototype.hasOwnProperty.call(obj2, prop); + } + function validateWeekSettings(settings) { + if (settings == null) { + return null; + } else if (typeof settings !== "object") { + throw new InvalidArgumentError("Week settings must be an object"); + } else { + if (!integerBetween(settings.firstDay, 1, 7) || !integerBetween(settings.minimalDays, 1, 7) || !Array.isArray(settings.weekend) || settings.weekend.some((v) => !integerBetween(v, 1, 7))) { + throw new InvalidArgumentError("Invalid week settings"); + } + return { + firstDay: settings.firstDay, + minimalDays: settings.minimalDays, + weekend: Array.from(settings.weekend) + }; + } + } + function integerBetween(thing, bottom, top) { + return isInteger(thing) && thing >= bottom && thing <= top; + } + function floorMod(x, n2) { + return x - n2 * Math.floor(x / n2); + } + function padStart(input, n2 = 2) { + const isNeg = input < 0; + let padded; + if (isNeg) { + padded = "-" + ("" + -input).padStart(n2, "0"); + } else { + padded = ("" + input).padStart(n2, "0"); + } + return padded; + } + function parseInteger(string) { + if (isUndefined(string) || string === null || string === "") { + return void 0; + } else { + return parseInt(string, 10); + } + } + function parseFloating(string) { + if (isUndefined(string) || string === null || string === "") { + return void 0; + } else { + return parseFloat(string); + } + } + function parseMillis(fraction) { + if (isUndefined(fraction) || fraction === null || fraction === "") { + return void 0; + } else { + const f = parseFloat("0." + fraction) * 1e3; + return Math.floor(f); + } + } + function roundTo(number, digits, towardZero = false) { + const factor = 10 ** digits, rounder = towardZero ? Math.trunc : Math.round; + return rounder(number * factor) / factor; + } + function isLeapYear(year) { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); + } + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + function daysInMonth(year, month) { + const modMonth = floorMod(month - 1, 12) + 1, modYear = year + (month - modMonth) / 12; + if (modMonth === 2) { + return isLeapYear(modYear) ? 29 : 28; + } else { + return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1]; + } + } + function objToLocalTS(obj2) { + let d = Date.UTC(obj2.year, obj2.month - 1, obj2.day, obj2.hour, obj2.minute, obj2.second, obj2.millisecond); + if (obj2.year < 100 && obj2.year >= 0) { + d = new Date(d); + d.setUTCFullYear(obj2.year, obj2.month - 1, obj2.day); + } + return +d; + } + function firstWeekOffset(year, minDaysInFirstWeek, startOfWeek) { + const fwdlw = isoWeekdayToLocal(dayOfWeek(year, 1, minDaysInFirstWeek), startOfWeek); + return -fwdlw + minDaysInFirstWeek - 1; + } + function weeksInWeekYear(weekYear, minDaysInFirstWeek = 4, startOfWeek = 1) { + const weekOffset = firstWeekOffset(weekYear, minDaysInFirstWeek, startOfWeek); + const weekOffsetNext = firstWeekOffset(weekYear + 1, minDaysInFirstWeek, startOfWeek); + return (daysInYear(weekYear) - weekOffset + weekOffsetNext) / 7; + } + function untruncateYear(year) { + if (year > 99) { + return year; + } else return year > Settings.twoDigitCutoffYear ? 1900 + year : 2e3 + year; + } + function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) { + const date = new Date(ts), intlOpts = { + hourCycle: "h23", + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit" + }; + if (timeZone) { + intlOpts.timeZone = timeZone; + } + const modified = { + timeZoneName: offsetFormat, + ...intlOpts + }; + const parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find((m) => m.type.toLowerCase() === "timezonename"); + return parsed ? parsed.value : null; + } + function signedOffset(offHourStr, offMinuteStr) { + let offHour = parseInt(offHourStr, 10); + if (Number.isNaN(offHour)) { + offHour = 0; + } + const offMin = parseInt(offMinuteStr, 10) || 0, offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin; + return offHour * 60 + offMinSigned; + } + function asNumber(value) { + const numericValue = Number(value); + if (typeof value === "boolean" || value === "" || Number.isNaN(numericValue)) throw new InvalidArgumentError(`Invalid unit value ${value}`); + return numericValue; + } + function normalizeObject(obj2, normalizer) { + const normalized = {}; + for (const u in obj2) { + if (hasOwnProperty(obj2, u)) { + const v = obj2[u]; + if (v === void 0 || v === null) continue; + normalized[normalizer(u)] = asNumber(v); + } + } + return normalized; + } + function formatOffset(offset2, format) { + const hours = Math.trunc(Math.abs(offset2 / 60)), minutes = Math.trunc(Math.abs(offset2 % 60)), sign = offset2 >= 0 ? "+" : "-"; + switch (format) { + case "short": + return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`; + case "narrow": + return `${sign}${hours}${minutes > 0 ? `:${minutes}` : ""}`; + case "techie": + return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`; + default: + throw new RangeError(`Value format ${format} is out of range for property format`); + } + } + function timeObject(obj2) { + return pick(obj2, ["hour", "minute", "second", "millisecond"]); + } + var monthsLong = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; + var monthsShort = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + var monthsNarrow = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"]; + function months(length) { + switch (length) { + case "narrow": + return [...monthsNarrow]; + case "short": + return [...monthsShort]; + case "long": + return [...monthsLong]; + case "numeric": + return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]; + case "2-digit": + return ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]; + default: + return null; + } + } + var weekdaysLong = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]; + var weekdaysShort = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]; + var weekdaysNarrow = ["M", "T", "W", "T", "F", "S", "S"]; + function weekdays(length) { + switch (length) { + case "narrow": + return [...weekdaysNarrow]; + case "short": + return [...weekdaysShort]; + case "long": + return [...weekdaysLong]; + case "numeric": + return ["1", "2", "3", "4", "5", "6", "7"]; + default: + return null; + } + } + var meridiems = ["AM", "PM"]; + var erasLong = ["Before Christ", "Anno Domini"]; + var erasShort = ["BC", "AD"]; + var erasNarrow = ["B", "A"]; + function eras(length) { + switch (length) { + case "narrow": + return [...erasNarrow]; + case "short": + return [...erasShort]; + case "long": + return [...erasLong]; + default: + return null; + } + } + function meridiemForDateTime(dt) { + return meridiems[dt.hour < 12 ? 0 : 1]; + } + function weekdayForDateTime(dt, length) { + return weekdays(length)[dt.weekday - 1]; + } + function monthForDateTime(dt, length) { + return months(length)[dt.month - 1]; + } + function eraForDateTime(dt, length) { + return eras(length)[dt.year < 0 ? 0 : 1]; + } + function formatRelativeTime(unit, count, numeric = "always", narrow = false) { + const units = { + years: ["year", "yr."], + quarters: ["quarter", "qtr."], + months: ["month", "mo."], + weeks: ["week", "wk."], + days: ["day", "day", "days"], + hours: ["hour", "hr."], + minutes: ["minute", "min."], + seconds: ["second", "sec."] + }; + const lastable = ["hours", "minutes", "seconds"].indexOf(unit) === -1; + if (numeric === "auto" && lastable) { + const isDay = unit === "days"; + switch (count) { + case 1: + return isDay ? "tomorrow" : `next ${units[unit][0]}`; + case -1: + return isDay ? "yesterday" : `last ${units[unit][0]}`; + case 0: + return isDay ? "today" : `this ${units[unit][0]}`; + } + } + const isInPast = Object.is(count, -0) || count < 0, fmtValue = Math.abs(count), singular = fmtValue === 1, lilUnits = units[unit], fmtUnit = narrow ? singular ? lilUnits[1] : lilUnits[2] || lilUnits[1] : singular ? units[unit][0] : unit; + return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`; + } + function stringifyTokens(splits, tokenToString) { + let s2 = ""; + for (const token of splits) { + if (token.literal) { + s2 += token.val; + } else { + s2 += tokenToString(token.val); + } + } + return s2; + } + var macroTokenToFormatOpts = { + D: DATE_SHORT, + DD: DATE_MED, + DDD: DATE_FULL, + DDDD: DATE_HUGE, + t: TIME_SIMPLE, + tt: TIME_WITH_SECONDS, + ttt: TIME_WITH_SHORT_OFFSET, + tttt: TIME_WITH_LONG_OFFSET, + T: TIME_24_SIMPLE, + TT: TIME_24_WITH_SECONDS, + TTT: TIME_24_WITH_SHORT_OFFSET, + TTTT: TIME_24_WITH_LONG_OFFSET, + f: DATETIME_SHORT, + ff: DATETIME_MED, + fff: DATETIME_FULL, + ffff: DATETIME_HUGE, + F: DATETIME_SHORT_WITH_SECONDS, + FF: DATETIME_MED_WITH_SECONDS, + FFF: DATETIME_FULL_WITH_SECONDS, + FFFF: DATETIME_HUGE_WITH_SECONDS + }; + var Formatter = class _Formatter { + static create(locale, opts = {}) { + return new _Formatter(locale, opts); + } + static parseFormat(fmt) { + let current = null, currentFull = "", bracketed = false; + const splits = []; + for (let i = 0; i < fmt.length; i++) { + const c = fmt.charAt(i); + if (c === "'") { + if (currentFull.length > 0) { + splits.push({ + literal: bracketed || /^\s+$/.test(currentFull), + val: currentFull + }); + } + current = null; + currentFull = ""; + bracketed = !bracketed; + } else if (bracketed) { + currentFull += c; + } else if (c === current) { + currentFull += c; + } else { + if (currentFull.length > 0) { + splits.push({ + literal: /^\s+$/.test(currentFull), + val: currentFull + }); + } + currentFull = c; + current = c; + } + } + if (currentFull.length > 0) { + splits.push({ + literal: bracketed || /^\s+$/.test(currentFull), + val: currentFull + }); + } + return splits; + } + static macroTokenToFormatOpts(token) { + return macroTokenToFormatOpts[token]; + } + constructor(locale, formatOpts) { + this.opts = formatOpts; + this.loc = locale; + this.systemLoc = null; + } + formatWithSystemDefault(dt, opts) { + if (this.systemLoc === null) { + this.systemLoc = this.loc.redefaultToSystem(); + } + const df = this.systemLoc.dtFormatter(dt, { + ...this.opts, + ...opts + }); + return df.format(); + } + dtFormatter(dt, opts = {}) { + return this.loc.dtFormatter(dt, { + ...this.opts, + ...opts + }); + } + formatDateTime(dt, opts) { + return this.dtFormatter(dt, opts).format(); + } + formatDateTimeParts(dt, opts) { + return this.dtFormatter(dt, opts).formatToParts(); + } + formatInterval(interval, opts) { + const df = this.dtFormatter(interval.start, opts); + return df.dtf.formatRange(interval.start.toJSDate(), interval.end.toJSDate()); + } + resolvedOptions(dt, opts) { + return this.dtFormatter(dt, opts).resolvedOptions(); + } + num(n2, p = 0) { + if (this.opts.forceSimple) { + return padStart(n2, p); + } + const opts = { + ...this.opts + }; + if (p > 0) { + opts.padTo = p; + } + return this.loc.numberFormatter(opts).format(n2); + } + formatDateTimeFromString(dt, fmt) { + const knownEnglish = this.loc.listingMode() === "en", useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", string = (opts, extract) => this.loc.extract(dt, opts, extract), formatOffset2 = (opts) => { + if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) { + return "Z"; + } + return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : ""; + }, meridiem = () => knownEnglish ? meridiemForDateTime(dt) : string({ + hour: "numeric", + hourCycle: "h12" + }, "dayperiod"), month = (length, standalone) => knownEnglish ? monthForDateTime(dt, length) : string(standalone ? { + month: length + } : { + month: length, + day: "numeric" + }, "month"), weekday = (length, standalone) => knownEnglish ? weekdayForDateTime(dt, length) : string(standalone ? { + weekday: length + } : { + weekday: length, + month: "long", + day: "numeric" + }, "weekday"), maybeMacro = (token) => { + const formatOpts = _Formatter.macroTokenToFormatOpts(token); + if (formatOpts) { + return this.formatWithSystemDefault(dt, formatOpts); + } else { + return token; + } + }, era = (length) => knownEnglish ? eraForDateTime(dt, length) : string({ + era: length + }, "era"), tokenToString = (token) => { + switch (token) { + // ms + case "S": + return this.num(dt.millisecond); + case "u": + // falls through + case "SSS": + return this.num(dt.millisecond, 3); + // seconds + case "s": + return this.num(dt.second); + case "ss": + return this.num(dt.second, 2); + // fractional seconds + case "uu": + return this.num(Math.floor(dt.millisecond / 10), 2); + case "uuu": + return this.num(Math.floor(dt.millisecond / 100)); + // minutes + case "m": + return this.num(dt.minute); + case "mm": + return this.num(dt.minute, 2); + // hours + case "h": + return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12); + case "hh": + return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2); + case "H": + return this.num(dt.hour); + case "HH": + return this.num(dt.hour, 2); + // offset + case "Z": + return formatOffset2({ + format: "narrow", + allowZ: this.opts.allowZ + }); + case "ZZ": + return formatOffset2({ + format: "short", + allowZ: this.opts.allowZ + }); + case "ZZZ": + return formatOffset2({ + format: "techie", + allowZ: this.opts.allowZ + }); + case "ZZZZ": + return dt.zone.offsetName(dt.ts, { + format: "short", + locale: this.loc.locale + }); + case "ZZZZZ": + return dt.zone.offsetName(dt.ts, { + format: "long", + locale: this.loc.locale + }); + // zone + case "z": + return dt.zoneName; + // meridiems + case "a": + return meridiem(); + // dates + case "d": + return useDateTimeFormatter ? string({ + day: "numeric" + }, "day") : this.num(dt.day); + case "dd": + return useDateTimeFormatter ? string({ + day: "2-digit" + }, "day") : this.num(dt.day, 2); + // weekdays - standalone + case "c": + return this.num(dt.weekday); + case "ccc": + return weekday("short", true); + case "cccc": + return weekday("long", true); + case "ccccc": + return weekday("narrow", true); + // weekdays - format + case "E": + return this.num(dt.weekday); + case "EEE": + return weekday("short", false); + case "EEEE": + return weekday("long", false); + case "EEEEE": + return weekday("narrow", false); + // months - standalone + case "L": + return useDateTimeFormatter ? string({ + month: "numeric", + day: "numeric" + }, "month") : this.num(dt.month); + case "LL": + return useDateTimeFormatter ? string({ + month: "2-digit", + day: "numeric" + }, "month") : this.num(dt.month, 2); + case "LLL": + return month("short", true); + case "LLLL": + return month("long", true); + case "LLLLL": + return month("narrow", true); + // months - format + case "M": + return useDateTimeFormatter ? string({ + month: "numeric" + }, "month") : this.num(dt.month); + case "MM": + return useDateTimeFormatter ? string({ + month: "2-digit" + }, "month") : this.num(dt.month, 2); + case "MMM": + return month("short", false); + case "MMMM": + return month("long", false); + case "MMMMM": + return month("narrow", false); + // years + case "y": + return useDateTimeFormatter ? string({ + year: "numeric" + }, "year") : this.num(dt.year); + case "yy": + return useDateTimeFormatter ? string({ + year: "2-digit" + }, "year") : this.num(dt.year.toString().slice(-2), 2); + case "yyyy": + return useDateTimeFormatter ? string({ + year: "numeric" + }, "year") : this.num(dt.year, 4); + case "yyyyyy": + return useDateTimeFormatter ? string({ + year: "numeric" + }, "year") : this.num(dt.year, 6); + // eras + case "G": + return era("short"); + case "GG": + return era("long"); + case "GGGGG": + return era("narrow"); + case "kk": + return this.num(dt.weekYear.toString().slice(-2), 2); + case "kkkk": + return this.num(dt.weekYear, 4); + case "W": + return this.num(dt.weekNumber); + case "WW": + return this.num(dt.weekNumber, 2); + case "n": + return this.num(dt.localWeekNumber); + case "nn": + return this.num(dt.localWeekNumber, 2); + case "ii": + return this.num(dt.localWeekYear.toString().slice(-2), 2); + case "iiii": + return this.num(dt.localWeekYear, 4); + case "o": + return this.num(dt.ordinal); + case "ooo": + return this.num(dt.ordinal, 3); + case "q": + return this.num(dt.quarter); + case "qq": + return this.num(dt.quarter, 2); + case "X": + return this.num(Math.floor(dt.ts / 1e3)); + case "x": + return this.num(dt.ts); + default: + return maybeMacro(token); + } + }; + return stringifyTokens(_Formatter.parseFormat(fmt), tokenToString); + } + formatDurationFromString(dur, fmt) { + const tokenToField = (token) => { + switch (token[0]) { + case "S": + return "millisecond"; + case "s": + return "second"; + case "m": + return "minute"; + case "h": + return "hour"; + case "d": + return "day"; + case "w": + return "week"; + case "M": + return "month"; + case "y": + return "year"; + default: + return null; + } + }, tokenToString = (lildur) => (token) => { + const mapped = tokenToField(token); + if (mapped) { + return this.num(lildur.get(mapped), token.length); + } else { + return token; + } + }, tokens = _Formatter.parseFormat(fmt), realTokens = tokens.reduce((found, { + literal, + val + }) => literal ? found : found.concat(val), []), collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t) => t)); + return stringifyTokens(tokens, tokenToString(collapsed)); + } + }; + var ianaRegex = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/; + function combineRegexes(...regexes) { + const full = regexes.reduce((f, r) => f + r.source, ""); + return RegExp(`^${full}$`); + } + function combineExtractors(...extractors) { + return (m) => extractors.reduce(([mergedVals, mergedZone, cursor], ex) => { + const [val, zone, next] = ex(m, cursor); + return [{ + ...mergedVals, + ...val + }, zone || mergedZone, next]; + }, [{}, null, 1]).slice(0, 2); + } + function parse2(s2, ...patterns) { + if (s2 == null) { + return [null, null]; + } + for (const [regex, extractor] of patterns) { + const m = regex.exec(s2); + if (m) { + return extractor(m); + } + } + return [null, null]; + } + function simpleParse(...keys) { + return (match2, cursor) => { + const ret2 = {}; + let i; + for (i = 0; i < keys.length; i++) { + ret2[keys[i]] = parseInteger(match2[cursor + i]); + } + return [ret2, null, cursor + i]; + }; + } + var offsetRegex = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/; + var isoExtendedZone = `(?:${offsetRegex.source}?(?:\\[(${ianaRegex.source})\\])?)?`; + var isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/; + var isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${isoExtendedZone}`); + var isoTimeExtensionRegex = RegExp(`(?:T${isoTimeRegex.source})?`); + var isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/; + var isoWeekRegex = /(\d{4})-?W(\d\d)(?:-?(\d))?/; + var isoOrdinalRegex = /(\d{4})-?(\d{3})/; + var extractISOWeekData = simpleParse("weekYear", "weekNumber", "weekDay"); + var extractISOOrdinalData = simpleParse("year", "ordinal"); + var sqlYmdRegex = /(\d{4})-(\d\d)-(\d\d)/; + var sqlTimeRegex = RegExp(`${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`); + var sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`); + function int(match2, pos, fallback) { + const m = match2[pos]; + return isUndefined(m) ? fallback : parseInteger(m); + } + function extractISOYmd(match2, cursor) { + const item = { + year: int(match2, cursor), + month: int(match2, cursor + 1, 1), + day: int(match2, cursor + 2, 1) + }; + return [item, null, cursor + 3]; + } + function extractISOTime(match2, cursor) { + const item = { + hours: int(match2, cursor, 0), + minutes: int(match2, cursor + 1, 0), + seconds: int(match2, cursor + 2, 0), + milliseconds: parseMillis(match2[cursor + 3]) + }; + return [item, null, cursor + 4]; + } + function extractISOOffset(match2, cursor) { + const local = !match2[cursor] && !match2[cursor + 1], fullOffset = signedOffset(match2[cursor + 1], match2[cursor + 2]), zone = local ? null : FixedOffsetZone.instance(fullOffset); + return [{}, zone, cursor + 3]; + } + function extractIANAZone(match2, cursor) { + const zone = match2[cursor] ? IANAZone.create(match2[cursor]) : null; + return [{}, zone, cursor + 1]; + } + var isoTimeOnly = RegExp(`^T?${isoTimeBaseRegex.source}$`); + var isoDuration = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/; + function extractISODuration(match2) { + const [s2, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] = match2; + const hasNegativePrefix = s2[0] === "-"; + const negativeSeconds = secondStr && secondStr[0] === "-"; + const maybeNegate = (num, force = false) => num !== void 0 && (force || num && hasNegativePrefix) ? -num : num; + return [{ + years: maybeNegate(parseFloating(yearStr)), + months: maybeNegate(parseFloating(monthStr)), + weeks: maybeNegate(parseFloating(weekStr)), + days: maybeNegate(parseFloating(dayStr)), + hours: maybeNegate(parseFloating(hourStr)), + minutes: maybeNegate(parseFloating(minuteStr)), + seconds: maybeNegate(parseFloating(secondStr), secondStr === "-0"), + milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds) + }]; + } + var obsOffsets = { + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60 + }; + function fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + const result = { + year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr), + month: monthsShort.indexOf(monthStr) + 1, + day: parseInteger(dayStr), + hour: parseInteger(hourStr), + minute: parseInteger(minuteStr) + }; + if (secondStr) result.second = parseInteger(secondStr); + if (weekdayStr) { + result.weekday = weekdayStr.length > 3 ? weekdaysLong.indexOf(weekdayStr) + 1 : weekdaysShort.indexOf(weekdayStr) + 1; + } + return result; + } + var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/; + function extractRFC2822(match2) { + const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr, obsOffset, milOffset, offHourStr, offMinuteStr] = match2, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); + let offset2; + if (obsOffset) { + offset2 = obsOffsets[obsOffset]; + } else if (milOffset) { + offset2 = 0; + } else { + offset2 = signedOffset(offHourStr, offMinuteStr); + } + return [result, new FixedOffsetZone(offset2)]; + } + function preprocessRFC2822(s2) { + return s2.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim(); + } + var rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/; + var rfc850 = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/; + var ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/; + function extractRFC1123Or850(match2) { + const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match2, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); + return [result, FixedOffsetZone.utcInstance]; + } + function extractASCII(match2) { + const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match2, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); + return [result, FixedOffsetZone.utcInstance]; + } + var isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex); + var isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex); + var isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex); + var isoTimeCombinedRegex = combineRegexes(isoTimeRegex); + var extractISOYmdTimeAndOffset = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset, extractIANAZone); + var extractISOWeekTimeAndOffset = combineExtractors(extractISOWeekData, extractISOTime, extractISOOffset, extractIANAZone); + var extractISOOrdinalDateAndTime = combineExtractors(extractISOOrdinalData, extractISOTime, extractISOOffset, extractIANAZone); + var extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone); + function parseISODate(s2) { + return parse2(s2, [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset], [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime], [isoTimeCombinedRegex, extractISOTimeAndOffset]); + } + function parseRFC2822Date(s2) { + return parse2(preprocessRFC2822(s2), [rfc2822, extractRFC2822]); + } + function parseHTTPDate(s2) { + return parse2(s2, [rfc1123, extractRFC1123Or850], [rfc850, extractRFC1123Or850], [ascii, extractASCII]); + } + function parseISODuration(s2) { + return parse2(s2, [isoDuration, extractISODuration]); + } + var extractISOTimeOnly = combineExtractors(extractISOTime); + function parseISOTimeOnly(s2) { + return parse2(s2, [isoTimeOnly, extractISOTimeOnly]); + } + var sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex); + var sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex); + var extractISOTimeOffsetAndIANAZone = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone); + function parseSQL(s2) { + return parse2(s2, [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]); + } + var INVALID$2 = "Invalid Duration"; + var lowOrderMatrix = { + weeks: { + days: 7, + hours: 7 * 24, + minutes: 7 * 24 * 60, + seconds: 7 * 24 * 60 * 60, + milliseconds: 7 * 24 * 60 * 60 * 1e3 + }, + days: { + hours: 24, + minutes: 24 * 60, + seconds: 24 * 60 * 60, + milliseconds: 24 * 60 * 60 * 1e3 + }, + hours: { + minutes: 60, + seconds: 60 * 60, + milliseconds: 60 * 60 * 1e3 + }, + minutes: { + seconds: 60, + milliseconds: 60 * 1e3 + }, + seconds: { + milliseconds: 1e3 + } + }; + var casualMatrix = { + years: { + quarters: 4, + months: 12, + weeks: 52, + days: 365, + hours: 365 * 24, + minutes: 365 * 24 * 60, + seconds: 365 * 24 * 60 * 60, + milliseconds: 365 * 24 * 60 * 60 * 1e3 + }, + quarters: { + months: 3, + weeks: 13, + days: 91, + hours: 91 * 24, + minutes: 91 * 24 * 60, + seconds: 91 * 24 * 60 * 60, + milliseconds: 91 * 24 * 60 * 60 * 1e3 + }, + months: { + weeks: 4, + days: 30, + hours: 30 * 24, + minutes: 30 * 24 * 60, + seconds: 30 * 24 * 60 * 60, + milliseconds: 30 * 24 * 60 * 60 * 1e3 + }, + ...lowOrderMatrix + }; + var daysInYearAccurate = 146097 / 400; + var daysInMonthAccurate = 146097 / 4800; + var accurateMatrix = { + years: { + quarters: 4, + months: 12, + weeks: daysInYearAccurate / 7, + days: daysInYearAccurate, + hours: daysInYearAccurate * 24, + minutes: daysInYearAccurate * 24 * 60, + seconds: daysInYearAccurate * 24 * 60 * 60, + milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1e3 + }, + quarters: { + months: 3, + weeks: daysInYearAccurate / 28, + days: daysInYearAccurate / 4, + hours: daysInYearAccurate * 24 / 4, + minutes: daysInYearAccurate * 24 * 60 / 4, + seconds: daysInYearAccurate * 24 * 60 * 60 / 4, + milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1e3 / 4 + }, + months: { + weeks: daysInMonthAccurate / 7, + days: daysInMonthAccurate, + hours: daysInMonthAccurate * 24, + minutes: daysInMonthAccurate * 24 * 60, + seconds: daysInMonthAccurate * 24 * 60 * 60, + milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1e3 + }, + ...lowOrderMatrix + }; + var orderedUnits$1 = ["years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds"]; + var reverseUnits = orderedUnits$1.slice(0).reverse(); + function clone$1(dur, alts, clear = false) { + const conf = { + values: clear ? alts.values : { + ...dur.values, + ...alts.values || {} + }, + loc: dur.loc.clone(alts.loc), + conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy, + matrix: alts.matrix || dur.matrix + }; + return new Duration(conf); + } + function durationToMillis(matrix, vals) { + var _vals$milliseconds; + let sum = (_vals$milliseconds = vals.milliseconds) != null ? _vals$milliseconds : 0; + for (const unit of reverseUnits.slice(1)) { + if (vals[unit]) { + sum += vals[unit] * matrix[unit]["milliseconds"]; + } + } + return sum; + } + function normalizeValues(matrix, vals) { + const factor = durationToMillis(matrix, vals) < 0 ? -1 : 1; + orderedUnits$1.reduceRight((previous, current) => { + if (!isUndefined(vals[current])) { + if (previous) { + const previousVal = vals[previous] * factor; + const conv = matrix[current][previous]; + const rollUp = Math.floor(previousVal / conv); + vals[current] += rollUp * factor; + vals[previous] -= rollUp * conv * factor; + } + return current; + } else { + return previous; + } + }, null); + orderedUnits$1.reduce((previous, current) => { + if (!isUndefined(vals[current])) { + if (previous) { + const fraction = vals[previous] % 1; + vals[previous] -= fraction; + vals[current] += fraction * matrix[previous][current]; + } + return current; + } else { + return previous; + } + }, null); + } + function removeZeroes(vals) { + const newVals = {}; + for (const [key, value] of Object.entries(vals)) { + if (value !== 0) { + newVals[key] = value; + } + } + return newVals; + } + var Duration = class _Duration { + /** + * @private + */ + constructor(config) { + const accurate = config.conversionAccuracy === "longterm" || false; + let matrix = accurate ? accurateMatrix : casualMatrix; + if (config.matrix) { + matrix = config.matrix; + } + this.values = config.values; + this.loc = config.loc || Locale.create(); + this.conversionAccuracy = accurate ? "longterm" : "casual"; + this.invalid = config.invalid || null; + this.matrix = matrix; + this.isLuxonDuration = true; + } + /** + * Create Duration from a number of milliseconds. + * @param {number} count of milliseconds + * @param {Object} opts - options for parsing + * @param {string} [opts.locale='en-US'] - the locale to use + * @param {string} opts.numberingSystem - the numbering system to use + * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use + * @return {Duration} + */ + static fromMillis(count, opts) { + return _Duration.fromObject({ + milliseconds: count + }, opts); + } + /** + * Create a Duration from a JavaScript object with keys like 'years' and 'hours'. + * If this object is empty then a zero milliseconds duration is returned. + * @param {Object} obj - the object to create the DateTime from + * @param {number} obj.years + * @param {number} obj.quarters + * @param {number} obj.months + * @param {number} obj.weeks + * @param {number} obj.days + * @param {number} obj.hours + * @param {number} obj.minutes + * @param {number} obj.seconds + * @param {number} obj.milliseconds + * @param {Object} [opts=[]] - options for creating this Duration + * @param {string} [opts.locale='en-US'] - the locale to use + * @param {string} opts.numberingSystem - the numbering system to use + * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use + * @param {string} [opts.matrix=Object] - the custom conversion system to use + * @return {Duration} + */ + static fromObject(obj2, opts = {}) { + if (obj2 == null || typeof obj2 !== "object") { + throw new InvalidArgumentError(`Duration.fromObject: argument expected to be an object, got ${obj2 === null ? "null" : typeof obj2}`); + } + return new _Duration({ + values: normalizeObject(obj2, _Duration.normalizeUnit), + loc: Locale.fromObject(opts), + conversionAccuracy: opts.conversionAccuracy, + matrix: opts.matrix + }); + } + /** + * Create a Duration from DurationLike. + * + * @param {Object | number | Duration} durationLike + * One of: + * - object with keys like 'years' and 'hours'. + * - number representing milliseconds + * - Duration instance + * @return {Duration} + */ + static fromDurationLike(durationLike) { + if (isNumber(durationLike)) { + return _Duration.fromMillis(durationLike); + } else if (_Duration.isDuration(durationLike)) { + return durationLike; + } else if (typeof durationLike === "object") { + return _Duration.fromObject(durationLike); + } else { + throw new InvalidArgumentError(`Unknown duration argument ${durationLike} of type ${typeof durationLike}`); + } + } + /** + * Create a Duration from an ISO 8601 duration string. + * @param {string} text - text to parse + * @param {Object} opts - options for parsing + * @param {string} [opts.locale='en-US'] - the locale to use + * @param {string} opts.numberingSystem - the numbering system to use + * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use + * @param {string} [opts.matrix=Object] - the preset conversion system to use + * @see https://en.wikipedia.org/wiki/ISO_8601#Durations + * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 } + * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 } + * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 } + * @return {Duration} + */ + static fromISO(text, opts) { + const [parsed] = parseISODuration(text); + if (parsed) { + return _Duration.fromObject(parsed, opts); + } else { + return _Duration.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`); + } + } + /** + * Create a Duration from an ISO 8601 time string. + * @param {string} text - text to parse + * @param {Object} opts - options for parsing + * @param {string} [opts.locale='en-US'] - the locale to use + * @param {string} opts.numberingSystem - the numbering system to use + * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use + * @param {string} [opts.matrix=Object] - the conversion system to use + * @see https://en.wikipedia.org/wiki/ISO_8601#Times + * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 } + * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } + * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } + * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } + * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 } + * @return {Duration} + */ + static fromISOTime(text, opts) { + const [parsed] = parseISOTimeOnly(text); + if (parsed) { + return _Duration.fromObject(parsed, opts); + } else { + return _Duration.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`); + } + } + /** + * Create an invalid Duration. + * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent + * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information + * @return {Duration} + */ + static invalid(reason, explanation = null) { + if (!reason) { + throw new InvalidArgumentError("need to specify a reason the Duration is invalid"); + } + const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); + if (Settings.throwOnInvalid) { + throw new InvalidDurationError(invalid); + } else { + return new _Duration({ + invalid + }); + } + } + /** + * @private + */ + static normalizeUnit(unit) { + const normalized = { + year: "years", + years: "years", + quarter: "quarters", + quarters: "quarters", + month: "months", + months: "months", + week: "weeks", + weeks: "weeks", + day: "days", + days: "days", + hour: "hours", + hours: "hours", + minute: "minutes", + minutes: "minutes", + second: "seconds", + seconds: "seconds", + millisecond: "milliseconds", + milliseconds: "milliseconds" + }[unit ? unit.toLowerCase() : unit]; + if (!normalized) throw new InvalidUnitError(unit); + return normalized; + } + /** + * Check if an object is a Duration. Works across context boundaries + * @param {object} o + * @return {boolean} + */ + static isDuration(o) { + return o && o.isLuxonDuration || false; + } + /** + * Get the locale of a Duration, such 'en-GB' + * @type {string} + */ + get locale() { + return this.isValid ? this.loc.locale : null; + } + /** + * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration + * + * @type {string} + */ + get numberingSystem() { + return this.isValid ? this.loc.numberingSystem : null; + } + /** + * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens: + * * `S` for milliseconds + * * `s` for seconds + * * `m` for minutes + * * `h` for hours + * * `d` for days + * * `w` for weeks + * * `M` for months + * * `y` for years + * Notes: + * * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits + * * Tokens can be escaped by wrapping with single quotes. + * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting. + * @param {string} fmt - the format string + * @param {Object} opts - options + * @param {boolean} [opts.floor=true] - floor numerical values + * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2" + * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002" + * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000" + * @return {string} + */ + toFormat(fmt, opts = {}) { + const fmtOpts = { + ...opts, + floor: opts.round !== false && opts.floor !== false + }; + return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID$2; + } + /** + * Returns a string representation of a Duration with all units included. + * To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options + * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`. + * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor. + * @example + * ```js + * var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 }) + * dur.toHuman() //=> '1 day, 5 hours, 6 minutes' + * dur.toHuman({ listStyle: "long" }) //=> '1 day, 5 hours, and 6 minutes' + * dur.toHuman({ unitDisplay: "short" }) //=> '1 day, 5 hr, 6 min' + * ``` + */ + toHuman(opts = {}) { + if (!this.isValid) return INVALID$2; + const l3 = orderedUnits$1.map((unit) => { + const val = this.values[unit]; + if (isUndefined(val)) { + return null; + } + return this.loc.numberFormatter({ + style: "unit", + unitDisplay: "long", + ...opts, + unit: unit.slice(0, -1) + }).format(val); + }).filter((n2) => n2); + return this.loc.listFormatter({ + type: "conjunction", + style: opts.listStyle || "narrow", + ...opts + }).format(l3); + } + /** + * Returns a JavaScript object with this Duration's values. + * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 } + * @return {Object} + */ + toObject() { + if (!this.isValid) return {}; + return { + ...this.values + }; + } + /** + * Returns an ISO 8601-compliant string representation of this Duration. + * @see https://en.wikipedia.org/wiki/ISO_8601#Durations + * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S' + * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S' + * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M' + * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M' + * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S' + * @return {string} + */ + toISO() { + if (!this.isValid) return null; + let s2 = "P"; + if (this.years !== 0) s2 += this.years + "Y"; + if (this.months !== 0 || this.quarters !== 0) s2 += this.months + this.quarters * 3 + "M"; + if (this.weeks !== 0) s2 += this.weeks + "W"; + if (this.days !== 0) s2 += this.days + "D"; + if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) s2 += "T"; + if (this.hours !== 0) s2 += this.hours + "H"; + if (this.minutes !== 0) s2 += this.minutes + "M"; + if (this.seconds !== 0 || this.milliseconds !== 0) + s2 += roundTo(this.seconds + this.milliseconds / 1e3, 3) + "S"; + if (s2 === "P") s2 += "T0S"; + return s2; + } + /** + * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day. + * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours. + * @see https://en.wikipedia.org/wiki/ISO_8601#Times + * @param {Object} opts - options + * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 + * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 + * @param {boolean} [opts.includePrefix=false] - include the `T` prefix + * @param {string} [opts.format='extended'] - choose between the basic and extended format + * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000' + * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00' + * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00' + * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000' + * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000' + * @return {string} + */ + toISOTime(opts = {}) { + if (!this.isValid) return null; + const millis = this.toMillis(); + if (millis < 0 || millis >= 864e5) return null; + opts = { + suppressMilliseconds: false, + suppressSeconds: false, + includePrefix: false, + format: "extended", + ...opts, + includeOffset: false + }; + const dateTime = DateTime.fromMillis(millis, { + zone: "UTC" + }); + return dateTime.toISOTime(opts); + } + /** + * Returns an ISO 8601 representation of this Duration appropriate for use in JSON. + * @return {string} + */ + toJSON() { + return this.toISO(); + } + /** + * Returns an ISO 8601 representation of this Duration appropriate for use in debugging. + * @return {string} + */ + toString() { + return this.toISO(); + } + /** + * Returns a string representation of this Duration appropriate for the REPL. + * @return {string} + */ + [Symbol.for("nodejs.util.inspect.custom")]() { + if (this.isValid) { + return `Duration { values: ${JSON.stringify(this.values)} }`; + } else { + return `Duration { Invalid, reason: ${this.invalidReason} }`; + } + } + /** + * Returns an milliseconds value of this Duration. + * @return {number} + */ + toMillis() { + if (!this.isValid) return NaN; + return durationToMillis(this.matrix, this.values); + } + /** + * Returns an milliseconds value of this Duration. Alias of {@link toMillis} + * @return {number} + */ + valueOf() { + return this.toMillis(); + } + /** + * Make this Duration longer by the specified amount. Return a newly-constructed Duration. + * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() + * @return {Duration} + */ + plus(duration) { + if (!this.isValid) return this; + const dur = _Duration.fromDurationLike(duration), result = {}; + for (const k of orderedUnits$1) { + if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) { + result[k] = dur.get(k) + this.get(k); + } + } + return clone$1(this, { + values: result + }, true); + } + /** + * Make this Duration shorter by the specified amount. Return a newly-constructed Duration. + * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() + * @return {Duration} + */ + minus(duration) { + if (!this.isValid) return this; + const dur = _Duration.fromDurationLike(duration); + return this.plus(dur.negate()); + } + /** + * Scale this Duration by the specified amount. Return a newly-constructed Duration. + * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number. + * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 } + * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === "hours" ? x * 2 : x) //=> { hours: 2, minutes: 30 } + * @return {Duration} + */ + mapUnits(fn) { + if (!this.isValid) return this; + const result = {}; + for (const k of Object.keys(this.values)) { + result[k] = asNumber(fn(this.values[k], k)); + } + return clone$1(this, { + values: result + }, true); + } + /** + * Get the value of unit. + * @param {string} unit - a unit such as 'minute' or 'day' + * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2 + * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0 + * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3 + * @return {number} + */ + get(unit) { + return this[_Duration.normalizeUnit(unit)]; + } + /** + * "Set" the values of specified units. Return a newly-constructed Duration. + * @param {Object} values - a mapping of units to numbers + * @example dur.set({ years: 2017 }) + * @example dur.set({ hours: 8, minutes: 30 }) + * @return {Duration} + */ + set(values) { + if (!this.isValid) return this; + const mixed = { + ...this.values, + ...normalizeObject(values, _Duration.normalizeUnit) + }; + return clone$1(this, { + values: mixed + }); + } + /** + * "Set" the locale and/or numberingSystem. Returns a newly-constructed Duration. + * @example dur.reconfigure({ locale: 'en-GB' }) + * @return {Duration} + */ + reconfigure({ + locale, + numberingSystem, + conversionAccuracy, + matrix + } = {}) { + const loc = this.loc.clone({ + locale, + numberingSystem + }); + const opts = { + loc, + matrix, + conversionAccuracy + }; + return clone$1(this, opts); + } + /** + * Return the length of the duration in the specified unit. + * @param {string} unit - a unit such as 'minutes' or 'days' + * @example Duration.fromObject({years: 1}).as('days') //=> 365 + * @example Duration.fromObject({years: 1}).as('months') //=> 12 + * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5 + * @return {number} + */ + as(unit) { + return this.isValid ? this.shiftTo(unit).get(unit) : NaN; + } + /** + * Reduce this Duration to its canonical representation in its current units. + * Assuming the overall value of the Duration is positive, this means: + * - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example) + * - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise + * the overall value would be negative, see third example) + * - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example) + * + * If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`. + * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 } + * @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 } + * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 } + * @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 } + * @return {Duration} + */ + normalize() { + if (!this.isValid) return this; + const vals = this.toObject(); + normalizeValues(this.matrix, vals); + return clone$1(this, { + values: vals + }, true); + } + /** + * Rescale units to its largest representation + * @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 } + * @return {Duration} + */ + rescale() { + if (!this.isValid) return this; + const vals = removeZeroes(this.normalize().shiftToAll().toObject()); + return clone$1(this, { + values: vals + }, true); + } + /** + * Convert this Duration into its representation in a different set of units. + * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 } + * @return {Duration} + */ + shiftTo(...units) { + if (!this.isValid) return this; + if (units.length === 0) { + return this; + } + units = units.map((u) => _Duration.normalizeUnit(u)); + const built = {}, accumulated = {}, vals = this.toObject(); + let lastUnit; + for (const k of orderedUnits$1) { + if (units.indexOf(k) >= 0) { + lastUnit = k; + let own = 0; + for (const ak in accumulated) { + own += this.matrix[ak][k] * accumulated[ak]; + accumulated[ak] = 0; + } + if (isNumber(vals[k])) { + own += vals[k]; + } + const i = Math.trunc(own); + built[k] = i; + accumulated[k] = (own * 1e3 - i * 1e3) / 1e3; + } else if (isNumber(vals[k])) { + accumulated[k] = vals[k]; + } + } + for (const key in accumulated) { + if (accumulated[key] !== 0) { + built[lastUnit] += key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key]; + } + } + normalizeValues(this.matrix, built); + return clone$1(this, { + values: built + }, true); + } + /** + * Shift this Duration to all available units. + * Same as shiftTo("years", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds") + * @return {Duration} + */ + shiftToAll() { + if (!this.isValid) return this; + return this.shiftTo("years", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds"); + } + /** + * Return the negative of this Duration. + * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 } + * @return {Duration} + */ + negate() { + if (!this.isValid) return this; + const negated = {}; + for (const k of Object.keys(this.values)) { + negated[k] = this.values[k] === 0 ? 0 : -this.values[k]; + } + return clone$1(this, { + values: negated + }, true); + } + /** + * Get the years. + * @type {number} + */ + get years() { + return this.isValid ? this.values.years || 0 : NaN; + } + /** + * Get the quarters. + * @type {number} + */ + get quarters() { + return this.isValid ? this.values.quarters || 0 : NaN; + } + /** + * Get the months. + * @type {number} + */ + get months() { + return this.isValid ? this.values.months || 0 : NaN; + } + /** + * Get the weeks + * @type {number} + */ + get weeks() { + return this.isValid ? this.values.weeks || 0 : NaN; + } + /** + * Get the days. + * @type {number} + */ + get days() { + return this.isValid ? this.values.days || 0 : NaN; + } + /** + * Get the hours. + * @type {number} + */ + get hours() { + return this.isValid ? this.values.hours || 0 : NaN; + } + /** + * Get the minutes. + * @type {number} + */ + get minutes() { + return this.isValid ? this.values.minutes || 0 : NaN; + } + /** + * Get the seconds. + * @return {number} + */ + get seconds() { + return this.isValid ? this.values.seconds || 0 : NaN; + } + /** + * Get the milliseconds. + * @return {number} + */ + get milliseconds() { + return this.isValid ? this.values.milliseconds || 0 : NaN; + } + /** + * Returns whether the Duration is invalid. Invalid durations are returned by diff operations + * on invalid DateTimes or Intervals. + * @return {boolean} + */ + get isValid() { + return this.invalid === null; + } + /** + * Returns an error code if this Duration became invalid, or null if the Duration is valid + * @return {string} + */ + get invalidReason() { + return this.invalid ? this.invalid.reason : null; + } + /** + * Returns an explanation of why this Duration became invalid, or null if the Duration is valid + * @type {string} + */ + get invalidExplanation() { + return this.invalid ? this.invalid.explanation : null; + } + /** + * Equality check + * Two Durations are equal iff they have the same units and the same values for each unit. + * @param {Duration} other + * @return {boolean} + */ + equals(other) { + if (!this.isValid || !other.isValid) { + return false; + } + if (!this.loc.equals(other.loc)) { + return false; + } + function eq(v12, v2) { + if (v12 === void 0 || v12 === 0) return v2 === void 0 || v2 === 0; + return v12 === v2; + } + for (const u of orderedUnits$1) { + if (!eq(this.values[u], other.values[u])) { + return false; + } + } + return true; + } + }; + var INVALID$1 = "Invalid Interval"; + function validateStartEnd(start, end) { + if (!start || !start.isValid) { + return Interval.invalid("missing or invalid start"); + } else if (!end || !end.isValid) { + return Interval.invalid("missing or invalid end"); + } else if (end < start) { + return Interval.invalid("end before start", `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`); + } else { + return null; + } + } + var Interval = class _Interval { + /** + * @private + */ + constructor(config) { + this.s = config.start; + this.e = config.end; + this.invalid = config.invalid || null; + this.isLuxonInterval = true; + } + /** + * Create an invalid Interval. + * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent + * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information + * @return {Interval} + */ + static invalid(reason, explanation = null) { + if (!reason) { + throw new InvalidArgumentError("need to specify a reason the Interval is invalid"); + } + const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); + if (Settings.throwOnInvalid) { + throw new InvalidIntervalError(invalid); + } else { + return new _Interval({ + invalid + }); + } + } + /** + * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end. + * @param {DateTime|Date|Object} start + * @param {DateTime|Date|Object} end + * @return {Interval} + */ + static fromDateTimes(start, end) { + const builtStart = friendlyDateTime(start), builtEnd = friendlyDateTime(end); + const validateError = validateStartEnd(builtStart, builtEnd); + if (validateError == null) { + return new _Interval({ + start: builtStart, + end: builtEnd + }); + } else { + return validateError; + } + } + /** + * Create an Interval from a start DateTime and a Duration to extend to. + * @param {DateTime|Date|Object} start + * @param {Duration|Object|number} duration - the length of the Interval. + * @return {Interval} + */ + static after(start, duration) { + const dur = Duration.fromDurationLike(duration), dt = friendlyDateTime(start); + return _Interval.fromDateTimes(dt, dt.plus(dur)); + } + /** + * Create an Interval from an end DateTime and a Duration to extend backwards to. + * @param {DateTime|Date|Object} end + * @param {Duration|Object|number} duration - the length of the Interval. + * @return {Interval} + */ + static before(end, duration) { + const dur = Duration.fromDurationLike(duration), dt = friendlyDateTime(end); + return _Interval.fromDateTimes(dt.minus(dur), dt); + } + /** + * Create an Interval from an ISO 8601 string. + * Accepts `/`, `/`, and `/` formats. + * @param {string} text - the ISO string to parse + * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO} + * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + * @return {Interval} + */ + static fromISO(text, opts) { + const [s2, e] = (text || "").split("/", 2); + if (s2 && e) { + let start, startIsValid; + try { + start = DateTime.fromISO(s2, opts); + startIsValid = start.isValid; + } catch (e2) { + startIsValid = false; + } + let end, endIsValid; + try { + end = DateTime.fromISO(e, opts); + endIsValid = end.isValid; + } catch (e2) { + endIsValid = false; + } + if (startIsValid && endIsValid) { + return _Interval.fromDateTimes(start, end); + } + if (startIsValid) { + const dur = Duration.fromISO(e, opts); + if (dur.isValid) { + return _Interval.after(start, dur); + } + } else if (endIsValid) { + const dur = Duration.fromISO(s2, opts); + if (dur.isValid) { + return _Interval.before(end, dur); + } + } + } + return _Interval.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`); + } + /** + * Check if an object is an Interval. Works across context boundaries + * @param {object} o + * @return {boolean} + */ + static isInterval(o) { + return o && o.isLuxonInterval || false; + } + /** + * Returns the start of the Interval + * @type {DateTime} + */ + get start() { + return this.isValid ? this.s : null; + } + /** + * Returns the end of the Interval + * @type {DateTime} + */ + get end() { + return this.isValid ? this.e : null; + } + /** + * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'. + * @type {boolean} + */ + get isValid() { + return this.invalidReason === null; + } + /** + * Returns an error code if this Interval is invalid, or null if the Interval is valid + * @type {string} + */ + get invalidReason() { + return this.invalid ? this.invalid.reason : null; + } + /** + * Returns an explanation of why this Interval became invalid, or null if the Interval is valid + * @type {string} + */ + get invalidExplanation() { + return this.invalid ? this.invalid.explanation : null; + } + /** + * Returns the length of the Interval in the specified unit. + * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in. + * @return {number} + */ + length(unit = "milliseconds") { + return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN; + } + /** + * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part. + * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day' + * asks 'what dates are included in this interval?', not 'how many days long is this interval?' + * @param {string} [unit='milliseconds'] - the unit of time to count. + * @param {Object} opts - options + * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime + * @return {number} + */ + count(unit = "milliseconds", opts) { + if (!this.isValid) return NaN; + const start = this.start.startOf(unit, opts); + let end; + if (opts != null && opts.useLocaleWeeks) { + end = this.end.reconfigure({ + locale: start.locale + }); + } else { + end = this.end; + } + end = end.startOf(unit, opts); + return Math.floor(end.diff(start, unit).get(unit)) + (end.valueOf() !== this.end.valueOf()); + } + /** + * Returns whether this Interval's start and end are both in the same unit of time + * @param {string} unit - the unit of time to check sameness on + * @return {boolean} + */ + hasSame(unit) { + return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false; + } + /** + * Return whether this Interval has the same start and end DateTimes. + * @return {boolean} + */ + isEmpty() { + return this.s.valueOf() === this.e.valueOf(); + } + /** + * Return whether this Interval's start is after the specified DateTime. + * @param {DateTime} dateTime + * @return {boolean} + */ + isAfter(dateTime) { + if (!this.isValid) return false; + return this.s > dateTime; + } + /** + * Return whether this Interval's end is before the specified DateTime. + * @param {DateTime} dateTime + * @return {boolean} + */ + isBefore(dateTime) { + if (!this.isValid) return false; + return this.e <= dateTime; + } + /** + * Return whether this Interval contains the specified DateTime. + * @param {DateTime} dateTime + * @return {boolean} + */ + contains(dateTime) { + if (!this.isValid) return false; + return this.s <= dateTime && this.e > dateTime; + } + /** + * "Sets" the start and/or end dates. Returns a newly-constructed Interval. + * @param {Object} values - the values to set + * @param {DateTime} values.start - the starting DateTime + * @param {DateTime} values.end - the ending DateTime + * @return {Interval} + */ + set({ + start, + end + } = {}) { + if (!this.isValid) return this; + return _Interval.fromDateTimes(start || this.s, end || this.e); + } + /** + * Split this Interval at each of the specified DateTimes + * @param {...DateTime} dateTimes - the unit of time to count. + * @return {Array} + */ + splitAt(...dateTimes) { + if (!this.isValid) return []; + const sorted = dateTimes.map(friendlyDateTime).filter((d) => this.contains(d)).sort((a, b) => a.toMillis() - b.toMillis()), results = []; + let { + s: s2 + } = this, i = 0; + while (s2 < this.e) { + const added = sorted[i] || this.e, next = +added > +this.e ? this.e : added; + results.push(_Interval.fromDateTimes(s2, next)); + s2 = next; + i += 1; + } + return results; + } + /** + * Split this Interval into smaller Intervals, each of the specified length. + * Left over time is grouped into a smaller interval + * @param {Duration|Object|number} duration - The length of each resulting interval. + * @return {Array} + */ + splitBy(duration) { + const dur = Duration.fromDurationLike(duration); + if (!this.isValid || !dur.isValid || dur.as("milliseconds") === 0) { + return []; + } + let { + s: s2 + } = this, idx = 1, next; + const results = []; + while (s2 < this.e) { + const added = this.start.plus(dur.mapUnits((x) => x * idx)); + next = +added > +this.e ? this.e : added; + results.push(_Interval.fromDateTimes(s2, next)); + s2 = next; + idx += 1; + } + return results; + } + /** + * Split this Interval into the specified number of smaller intervals. + * @param {number} numberOfParts - The number of Intervals to divide the Interval into. + * @return {Array} + */ + divideEqually(numberOfParts) { + if (!this.isValid) return []; + return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts); + } + /** + * Return whether this Interval overlaps with the specified Interval + * @param {Interval} other + * @return {boolean} + */ + overlaps(other) { + return this.e > other.s && this.s < other.e; + } + /** + * Return whether this Interval's end is adjacent to the specified Interval's start. + * @param {Interval} other + * @return {boolean} + */ + abutsStart(other) { + if (!this.isValid) return false; + return +this.e === +other.s; + } + /** + * Return whether this Interval's start is adjacent to the specified Interval's end. + * @param {Interval} other + * @return {boolean} + */ + abutsEnd(other) { + if (!this.isValid) return false; + return +other.e === +this.s; + } + /** + * Returns true if this Interval fully contains the specified Interval, specifically if the intersect (of this Interval and the other Interval) is equal to the other Interval; false otherwise. + * @param {Interval} other + * @return {boolean} + */ + engulfs(other) { + if (!this.isValid) return false; + return this.s <= other.s && this.e >= other.e; + } + /** + * Return whether this Interval has the same start and end as the specified Interval. + * @param {Interval} other + * @return {boolean} + */ + equals(other) { + if (!this.isValid || !other.isValid) { + return false; + } + return this.s.equals(other.s) && this.e.equals(other.e); + } + /** + * Return an Interval representing the intersection of this Interval and the specified Interval. + * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals. + * Returns null if the intersection is empty, meaning, the intervals don't intersect. + * @param {Interval} other + * @return {Interval} + */ + intersection(other) { + if (!this.isValid) return this; + const s2 = this.s > other.s ? this.s : other.s, e = this.e < other.e ? this.e : other.e; + if (s2 >= e) { + return null; + } else { + return _Interval.fromDateTimes(s2, e); + } + } + /** + * Return an Interval representing the union of this Interval and the specified Interval. + * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals. + * @param {Interval} other + * @return {Interval} + */ + union(other) { + if (!this.isValid) return this; + const s2 = this.s < other.s ? this.s : other.s, e = this.e > other.e ? this.e : other.e; + return _Interval.fromDateTimes(s2, e); + } + /** + * Merge an array of Intervals into a equivalent minimal set of Intervals. + * Combines overlapping and adjacent Intervals. + * @param {Array} intervals + * @return {Array} + */ + static merge(intervals) { + const [found, final] = intervals.sort((a, b) => a.s - b.s).reduce(([sofar, current], item) => { + if (!current) { + return [sofar, item]; + } else if (current.overlaps(item) || current.abutsStart(item)) { + return [sofar, current.union(item)]; + } else { + return [sofar.concat([current]), item]; + } + }, [[], null]); + if (final) { + found.push(final); + } + return found; + } + /** + * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals. + * @param {Array} intervals + * @return {Array} + */ + static xor(intervals) { + let start = null, currentCount = 0; + const results = [], ends = intervals.map((i) => [{ + time: i.s, + type: "s" + }, { + time: i.e, + type: "e" + }]), flattened = Array.prototype.concat(...ends), arr = flattened.sort((a, b) => a.time - b.time); + for (const i of arr) { + currentCount += i.type === "s" ? 1 : -1; + if (currentCount === 1) { + start = i.time; + } else { + if (start && +start !== +i.time) { + results.push(_Interval.fromDateTimes(start, i.time)); + } + start = null; + } + } + return _Interval.merge(results); + } + /** + * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals. + * @param {...Interval} intervals + * @return {Array} + */ + difference(...intervals) { + return _Interval.xor([this].concat(intervals)).map((i) => this.intersection(i)).filter((i) => i && !i.isEmpty()); + } + /** + * Returns a string representation of this Interval appropriate for debugging. + * @return {string} + */ + toString() { + if (!this.isValid) return INVALID$1; + return `[${this.s.toISO()} \u2013 ${this.e.toISO()})`; + } + /** + * Returns a string representation of this Interval appropriate for the REPL. + * @return {string} + */ + [Symbol.for("nodejs.util.inspect.custom")]() { + if (this.isValid) { + return `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`; + } else { + return `Interval { Invalid, reason: ${this.invalidReason} }`; + } + } + /** + * Returns a localized string representing this Interval. Accepts the same options as the + * Intl.DateTimeFormat constructor and any presets defined by Luxon, such as + * {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method + * is browser-specific, but in general it will return an appropriate representation of the + * Interval in the assigned locale. Defaults to the system's locale if no locale has been + * specified. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat + * @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or + * Intl.DateTimeFormat constructor options. + * @param {Object} opts - Options to override the configuration of the start DateTime. + * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022 + * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022 + * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022 + * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM + * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p + * @return {string} + */ + toLocaleString(formatOpts = DATE_SHORT, opts = {}) { + return this.isValid ? Formatter.create(this.s.loc.clone(opts), formatOpts).formatInterval(this) : INVALID$1; + } + /** + * Returns an ISO 8601-compliant string representation of this Interval. + * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + * @param {Object} opts - The same options as {@link DateTime#toISO} + * @return {string} + */ + toISO(opts) { + if (!this.isValid) return INVALID$1; + return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`; + } + /** + * Returns an ISO 8601-compliant string representation of date of this Interval. + * The time components are ignored. + * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + * @return {string} + */ + toISODate() { + if (!this.isValid) return INVALID$1; + return `${this.s.toISODate()}/${this.e.toISODate()}`; + } + /** + * Returns an ISO 8601-compliant string representation of time of this Interval. + * The date components are ignored. + * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals + * @param {Object} opts - The same options as {@link DateTime#toISO} + * @return {string} + */ + toISOTime(opts) { + if (!this.isValid) return INVALID$1; + return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`; + } + /** + * Returns a string representation of this Interval formatted according to the specified format + * string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible + * formatting tool. + * @param {string} dateFormat - The format string. This string formats the start and end time. + * See {@link DateTime#toFormat} for details. + * @param {Object} opts - Options. + * @param {string} [opts.separator = ' – '] - A separator to place between the start and end + * representations. + * @return {string} + */ + toFormat(dateFormat, { + separator = " \u2013 " + } = {}) { + if (!this.isValid) return INVALID$1; + return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`; + } + /** + * Return a Duration representing the time spanned by this interval. + * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration. + * @param {Object} opts - options that affect the creation of the Duration + * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use + * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 } + * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 } + * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 } + * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 } + * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 } + * @return {Duration} + */ + toDuration(unit, opts) { + if (!this.isValid) { + return Duration.invalid(this.invalidReason); + } + return this.e.diff(this.s, unit, opts); + } + /** + * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes + * @param {function} mapFn + * @return {Interval} + * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC()) + * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 })) + */ + mapEndpoints(mapFn) { + return _Interval.fromDateTimes(mapFn(this.s), mapFn(this.e)); + } + }; + var Info = class { + /** + * Return whether the specified zone contains a DST. + * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone. + * @return {boolean} + */ + static hasDST(zone = Settings.defaultZone) { + const proto = DateTime.now().setZone(zone).set({ + month: 12 + }); + return !zone.isUniversal && proto.offset !== proto.set({ + month: 6 + }).offset; + } + /** + * Return whether the specified zone is a valid IANA specifier. + * @param {string} zone - Zone to check + * @return {boolean} + */ + static isValidIANAZone(zone) { + return IANAZone.isValidZone(zone); + } + /** + * Converts the input into a {@link Zone} instance. + * + * * If `input` is already a Zone instance, it is returned unchanged. + * * If `input` is a string containing a valid time zone name, a Zone instance + * with that name is returned. + * * If `input` is a string that doesn't refer to a known time zone, a Zone + * instance with {@link Zone#isValid} == false is returned. + * * If `input is a number, a Zone instance with the specified fixed offset + * in minutes is returned. + * * If `input` is `null` or `undefined`, the default zone is returned. + * @param {string|Zone|number} [input] - the value to be converted + * @return {Zone} + */ + static normalizeZone(input) { + return normalizeZone(input, Settings.defaultZone); + } + /** + * Get the weekday on which the week starts according to the given locale. + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.locObj=null] - an existing locale object to use + * @returns {number} the start of the week, 1 for Monday through 7 for Sunday + */ + static getStartOfWeek({ + locale = null, + locObj = null + } = {}) { + return (locObj || Locale.create(locale)).getStartOfWeek(); + } + /** + * Get the minimum number of days necessary in a week before it is considered part of the next year according + * to the given locale. + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.locObj=null] - an existing locale object to use + * @returns {number} + */ + static getMinimumDaysInFirstWeek({ + locale = null, + locObj = null + } = {}) { + return (locObj || Locale.create(locale)).getMinDaysInFirstWeek(); + } + /** + * Get the weekdays, which are considered the weekend according to the given locale + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.locObj=null] - an existing locale object to use + * @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday + */ + static getWeekendWeekdays({ + locale = null, + locObj = null + } = {}) { + return (locObj || Locale.create(locale)).getWeekendDays().slice(); + } + /** + * Return an array of standalone month names. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat + * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.numberingSystem=null] - the numbering system + * @param {string} [opts.locObj=null] - an existing locale object to use + * @param {string} [opts.outputCalendar='gregory'] - the calendar + * @example Info.months()[0] //=> 'January' + * @example Info.months('short')[0] //=> 'Jan' + * @example Info.months('numeric')[0] //=> '1' + * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.' + * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١' + * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I' + * @return {Array} + */ + static months(length = "long", { + locale = null, + numberingSystem = null, + locObj = null, + outputCalendar = "gregory" + } = {}) { + return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length); + } + /** + * Return an array of format month names. + * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that + * changes the string. + * See {@link Info#months} + * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.numberingSystem=null] - the numbering system + * @param {string} [opts.locObj=null] - an existing locale object to use + * @param {string} [opts.outputCalendar='gregory'] - the calendar + * @return {Array} + */ + static monthsFormat(length = "long", { + locale = null, + numberingSystem = null, + locObj = null, + outputCalendar = "gregory" + } = {}) { + return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length, true); + } + /** + * Return an array of standalone week names. + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat + * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long". + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @param {string} [opts.numberingSystem=null] - the numbering system + * @param {string} [opts.locObj=null] - an existing locale object to use + * @example Info.weekdays()[0] //=> 'Monday' + * @example Info.weekdays('short')[0] //=> 'Mon' + * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.' + * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين' + * @return {Array} + */ + static weekdays(length = "long", { + locale = null, + numberingSystem = null, + locObj = null + } = {}) { + return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length); + } + /** + * Return an array of format week names. + * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that + * changes the string. + * See {@link Info#weekdays} + * @param {string} [length='long'] - the length of the month representation, such as "narrow", "short", "long". + * @param {Object} opts - options + * @param {string} [opts.locale=null] - the locale code + * @param {string} [opts.numberingSystem=null] - the numbering system + * @param {string} [opts.locObj=null] - an existing locale object to use + * @return {Array} + */ + static weekdaysFormat(length = "long", { + locale = null, + numberingSystem = null, + locObj = null + } = {}) { + return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length, true); + } + /** + * Return an array of meridiems. + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @example Info.meridiems() //=> [ 'AM', 'PM' ] + * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ] + * @return {Array} + */ + static meridiems({ + locale = null + } = {}) { + return Locale.create(locale).meridiems(); + } + /** + * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian. + * @param {string} [length='short'] - the length of the era representation, such as "short" or "long". + * @param {Object} opts - options + * @param {string} [opts.locale] - the locale code + * @example Info.eras() //=> [ 'BC', 'AD' ] + * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ] + * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ] + * @return {Array} + */ + static eras(length = "short", { + locale = null + } = {}) { + return Locale.create(locale, null, "gregory").eras(length); + } + /** + * Return the set of available features in this environment. + * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case. + * Keys: + * * `relative`: whether this environment supports relative time formatting + * * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale + * @example Info.features() //=> { relative: false, localeWeek: true } + * @return {Object} + */ + static features() { + return { + relative: hasRelative(), + localeWeek: hasLocaleWeekInfo() + }; + } + }; + function dayDiff(earlier, later) { + const utcDayStart = (dt) => dt.toUTC(0, { + keepLocalTime: true + }).startOf("day").valueOf(), ms = utcDayStart(later) - utcDayStart(earlier); + return Math.floor(Duration.fromMillis(ms).as("days")); + } + function highOrderDiffs(cursor, later, units) { + const differs = [["years", (a, b) => b.year - a.year], ["quarters", (a, b) => b.quarter - a.quarter + (b.year - a.year) * 4], ["months", (a, b) => b.month - a.month + (b.year - a.year) * 12], ["weeks", (a, b) => { + const days = dayDiff(a, b); + return (days - days % 7) / 7; + }], ["days", dayDiff]]; + const results = {}; + const earlier = cursor; + let lowestOrder, highWater; + for (const [unit, differ] of differs) { + if (units.indexOf(unit) >= 0) { + lowestOrder = unit; + results[unit] = differ(cursor, later); + highWater = earlier.plus(results); + if (highWater > later) { + results[unit]--; + cursor = earlier.plus(results); + if (cursor > later) { + highWater = cursor; + results[unit]--; + cursor = earlier.plus(results); + } + } else { + cursor = highWater; + } + } + } + return [cursor, results, highWater, lowestOrder]; + } + function diff(earlier, later, units, opts) { + let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units); + const remainingMillis = later - cursor; + const lowerOrderUnits = units.filter((u) => ["hours", "minutes", "seconds", "milliseconds"].indexOf(u) >= 0); + if (lowerOrderUnits.length === 0) { + if (highWater < later) { + highWater = cursor.plus({ + [lowestOrder]: 1 + }); + } + if (highWater !== cursor) { + results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor); + } + } + const duration = Duration.fromObject(results, opts); + if (lowerOrderUnits.length > 0) { + return Duration.fromMillis(remainingMillis, opts).shiftTo(...lowerOrderUnits).plus(duration); + } else { + return duration; + } + } + var MISSING_FTP = "missing Intl.DateTimeFormat.formatToParts support"; + function intUnit(regex, post = (i) => i) { + return { + regex, + deser: ([s2]) => post(parseDigits(s2)) + }; + } + var NBSP = String.fromCharCode(160); + var spaceOrNBSP = `[ ${NBSP}]`; + var spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, "g"); + function fixListRegex(s2) { + return s2.replace(/\./g, "\\.?").replace(spaceOrNBSPRegExp, spaceOrNBSP); + } + function stripInsensitivities(s2) { + return s2.replace(/\./g, "").replace(spaceOrNBSPRegExp, " ").toLowerCase(); + } + function oneOf(strings, startIndex) { + if (strings === null) { + return null; + } else { + return { + regex: RegExp(strings.map(fixListRegex).join("|")), + deser: ([s2]) => strings.findIndex((i) => stripInsensitivities(s2) === stripInsensitivities(i)) + startIndex + }; + } + } + function offset(regex, groups) { + return { + regex, + deser: ([, h, m]) => signedOffset(h, m), + groups + }; + } + function simple(regex) { + return { + regex, + deser: ([s2]) => s2 + }; + } + function escapeToken(value) { + return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); + } + function unitForToken(token, loc) { + const one = digitRegex(loc), two = digitRegex(loc, "{2}"), three = digitRegex(loc, "{3}"), four = digitRegex(loc, "{4}"), six = digitRegex(loc, "{6}"), oneOrTwo = digitRegex(loc, "{1,2}"), oneToThree = digitRegex(loc, "{1,3}"), oneToSix = digitRegex(loc, "{1,6}"), oneToNine = digitRegex(loc, "{1,9}"), twoToFour = digitRegex(loc, "{2,4}"), fourToSix = digitRegex(loc, "{4,6}"), literal = (t) => ({ + regex: RegExp(escapeToken(t.val)), + deser: ([s2]) => s2, + literal: true + }), unitate = (t) => { + if (token.literal) { + return literal(t); + } + switch (t.val) { + // era + case "G": + return oneOf(loc.eras("short"), 0); + case "GG": + return oneOf(loc.eras("long"), 0); + // years + case "y": + return intUnit(oneToSix); + case "yy": + return intUnit(twoToFour, untruncateYear); + case "yyyy": + return intUnit(four); + case "yyyyy": + return intUnit(fourToSix); + case "yyyyyy": + return intUnit(six); + // months + case "M": + return intUnit(oneOrTwo); + case "MM": + return intUnit(two); + case "MMM": + return oneOf(loc.months("short", true), 1); + case "MMMM": + return oneOf(loc.months("long", true), 1); + case "L": + return intUnit(oneOrTwo); + case "LL": + return intUnit(two); + case "LLL": + return oneOf(loc.months("short", false), 1); + case "LLLL": + return oneOf(loc.months("long", false), 1); + // dates + case "d": + return intUnit(oneOrTwo); + case "dd": + return intUnit(two); + // ordinals + case "o": + return intUnit(oneToThree); + case "ooo": + return intUnit(three); + // time + case "HH": + return intUnit(two); + case "H": + return intUnit(oneOrTwo); + case "hh": + return intUnit(two); + case "h": + return intUnit(oneOrTwo); + case "mm": + return intUnit(two); + case "m": + return intUnit(oneOrTwo); + case "q": + return intUnit(oneOrTwo); + case "qq": + return intUnit(two); + case "s": + return intUnit(oneOrTwo); + case "ss": + return intUnit(two); + case "S": + return intUnit(oneToThree); + case "SSS": + return intUnit(three); + case "u": + return simple(oneToNine); + case "uu": + return simple(oneOrTwo); + case "uuu": + return intUnit(one); + // meridiem + case "a": + return oneOf(loc.meridiems(), 0); + // weekYear (k) + case "kkkk": + return intUnit(four); + case "kk": + return intUnit(twoToFour, untruncateYear); + // weekNumber (W) + case "W": + return intUnit(oneOrTwo); + case "WW": + return intUnit(two); + // weekdays + case "E": + case "c": + return intUnit(one); + case "EEE": + return oneOf(loc.weekdays("short", false), 1); + case "EEEE": + return oneOf(loc.weekdays("long", false), 1); + case "ccc": + return oneOf(loc.weekdays("short", true), 1); + case "cccc": + return oneOf(loc.weekdays("long", true), 1); + // offset/zone + case "Z": + case "ZZ": + return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2); + case "ZZZ": + return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2); + // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing + // because we don't have any way to figure out what they are + case "z": + return simple(/[a-z_+-/]{1,256}?/i); + // this special-case "token" represents a place where a macro-token expanded into a white-space literal + // in this case we accept any non-newline white-space + case " ": + return simple(/[^\S\n\r]/); + default: + return literal(t); + } + }; + const unit = unitate(token) || { + invalidReason: MISSING_FTP + }; + unit.token = token; + return unit; + } + var partTypeStyleToTokenVal = { + year: { + "2-digit": "yy", + numeric: "yyyyy" + }, + month: { + numeric: "M", + "2-digit": "MM", + short: "MMM", + long: "MMMM" + }, + day: { + numeric: "d", + "2-digit": "dd" + }, + weekday: { + short: "EEE", + long: "EEEE" + }, + dayperiod: "a", + dayPeriod: "a", + hour12: { + numeric: "h", + "2-digit": "hh" + }, + hour24: { + numeric: "H", + "2-digit": "HH" + }, + minute: { + numeric: "m", + "2-digit": "mm" + }, + second: { + numeric: "s", + "2-digit": "ss" + }, + timeZoneName: { + long: "ZZZZZ", + short: "ZZZ" + } + }; + function tokenForPart(part, formatOpts, resolvedOpts) { + const { + type, + value + } = part; + if (type === "literal") { + const isSpace = /^\s+$/.test(value); + return { + literal: !isSpace, + val: isSpace ? " " : value + }; + } + const style = formatOpts[type]; + let actualType = type; + if (type === "hour") { + if (formatOpts.hour12 != null) { + actualType = formatOpts.hour12 ? "hour12" : "hour24"; + } else if (formatOpts.hourCycle != null) { + if (formatOpts.hourCycle === "h11" || formatOpts.hourCycle === "h12") { + actualType = "hour12"; + } else { + actualType = "hour24"; + } + } else { + actualType = resolvedOpts.hour12 ? "hour12" : "hour24"; + } + } + let val = partTypeStyleToTokenVal[actualType]; + if (typeof val === "object") { + val = val[style]; + } + if (val) { + return { + literal: false, + val + }; + } + return void 0; + } + function buildRegex(units) { + const re = units.map((u) => u.regex).reduce((f, r) => `${f}(${r.source})`, ""); + return [`^${re}$`, units]; + } + function match(input, regex, handlers) { + const matches = input.match(regex); + if (matches) { + const all = {}; + let matchIndex = 1; + for (const i in handlers) { + if (hasOwnProperty(handlers, i)) { + const h = handlers[i], groups = h.groups ? h.groups + 1 : 1; + if (!h.literal && h.token) { + all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups)); + } + matchIndex += groups; + } + } + return [matches, all]; + } else { + return [matches, {}]; + } + } + function dateTimeFromMatches(matches) { + const toField = (token) => { + switch (token) { + case "S": + return "millisecond"; + case "s": + return "second"; + case "m": + return "minute"; + case "h": + case "H": + return "hour"; + case "d": + return "day"; + case "o": + return "ordinal"; + case "L": + case "M": + return "month"; + case "y": + return "year"; + case "E": + case "c": + return "weekday"; + case "W": + return "weekNumber"; + case "k": + return "weekYear"; + case "q": + return "quarter"; + default: + return null; + } + }; + let zone = null; + let specificOffset; + if (!isUndefined(matches.z)) { + zone = IANAZone.create(matches.z); + } + if (!isUndefined(matches.Z)) { + if (!zone) { + zone = new FixedOffsetZone(matches.Z); + } + specificOffset = matches.Z; + } + if (!isUndefined(matches.q)) { + matches.M = (matches.q - 1) * 3 + 1; + } + if (!isUndefined(matches.h)) { + if (matches.h < 12 && matches.a === 1) { + matches.h += 12; + } else if (matches.h === 12 && matches.a === 0) { + matches.h = 0; + } + } + if (matches.G === 0 && matches.y) { + matches.y = -matches.y; + } + if (!isUndefined(matches.u)) { + matches.S = parseMillis(matches.u); + } + const vals = Object.keys(matches).reduce((r, k) => { + const f = toField(k); + if (f) { + r[f] = matches[k]; + } + return r; + }, {}); + return [vals, zone, specificOffset]; + } + var dummyDateTimeCache = null; + function getDummyDateTime() { + if (!dummyDateTimeCache) { + dummyDateTimeCache = DateTime.fromMillis(1555555555555); + } + return dummyDateTimeCache; + } + function maybeExpandMacroToken(token, locale) { + if (token.literal) { + return token; + } + const formatOpts = Formatter.macroTokenToFormatOpts(token.val); + const tokens = formatOptsToTokens(formatOpts, locale); + if (tokens == null || tokens.includes(void 0)) { + return token; + } + return tokens; + } + function expandMacroTokens(tokens, locale) { + return Array.prototype.concat(...tokens.map((t) => maybeExpandMacroToken(t, locale))); + } + var TokenParser = class { + constructor(locale, format) { + this.locale = locale; + this.format = format; + this.tokens = expandMacroTokens(Formatter.parseFormat(format), locale); + this.units = this.tokens.map((t) => unitForToken(t, locale)); + this.disqualifyingUnit = this.units.find((t) => t.invalidReason); + if (!this.disqualifyingUnit) { + const [regexString, handlers] = buildRegex(this.units); + this.regex = RegExp(regexString, "i"); + this.handlers = handlers; + } + } + explainFromTokens(input) { + if (!this.isValid) { + return { + input, + tokens: this.tokens, + invalidReason: this.invalidReason + }; + } else { + const [rawMatches, matches] = match(input, this.regex, this.handlers), [result, zone, specificOffset] = matches ? dateTimeFromMatches(matches) : [null, null, void 0]; + if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) { + throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format"); + } + return { + input, + tokens: this.tokens, + regex: this.regex, + rawMatches, + matches, + result, + zone, + specificOffset + }; + } + } + get isValid() { + return !this.disqualifyingUnit; + } + get invalidReason() { + return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null; + } + }; + function explainFromTokens(locale, input, format) { + const parser = new TokenParser(locale, format); + return parser.explainFromTokens(input); + } + function parseFromTokens(locale, input, format) { + const { + result, + zone, + specificOffset, + invalidReason + } = explainFromTokens(locale, input, format); + return [result, zone, specificOffset, invalidReason]; + } + function formatOptsToTokens(formatOpts, locale) { + if (!formatOpts) { + return null; + } + const formatter = Formatter.create(locale, formatOpts); + const df = formatter.dtFormatter(getDummyDateTime()); + const parts = df.formatToParts(); + const resolvedOpts = df.resolvedOptions(); + return parts.map((p) => tokenForPart(p, formatOpts, resolvedOpts)); + } + var INVALID = "Invalid DateTime"; + var MAX_DATE = 864e13; + function unsupportedZone(zone) { + return new Invalid("unsupported zone", `the zone "${zone.name}" is not supported`); + } + function possiblyCachedWeekData(dt) { + if (dt.weekData === null) { + dt.weekData = gregorianToWeek(dt.c); + } + return dt.weekData; + } + function possiblyCachedLocalWeekData(dt) { + if (dt.localWeekData === null) { + dt.localWeekData = gregorianToWeek(dt.c, dt.loc.getMinDaysInFirstWeek(), dt.loc.getStartOfWeek()); + } + return dt.localWeekData; + } + function clone(inst, alts) { + const current = { + ts: inst.ts, + zone: inst.zone, + c: inst.c, + o: inst.o, + loc: inst.loc, + invalid: inst.invalid + }; + return new DateTime({ + ...current, + ...alts, + old: current + }); + } + function fixOffset(localTS, o, tz) { + let utcGuess = localTS - o * 60 * 1e3; + const o2 = tz.offset(utcGuess); + if (o === o2) { + return [utcGuess, o]; + } + utcGuess -= (o2 - o) * 60 * 1e3; + const o3 = tz.offset(utcGuess); + if (o2 === o3) { + return [utcGuess, o2]; + } + return [localTS - Math.min(o2, o3) * 60 * 1e3, Math.max(o2, o3)]; + } + function tsToObj(ts, offset2) { + ts += offset2 * 60 * 1e3; + const d = new Date(ts); + return { + year: d.getUTCFullYear(), + month: d.getUTCMonth() + 1, + day: d.getUTCDate(), + hour: d.getUTCHours(), + minute: d.getUTCMinutes(), + second: d.getUTCSeconds(), + millisecond: d.getUTCMilliseconds() + }; + } + function objToTS(obj2, offset2, zone) { + return fixOffset(objToLocalTS(obj2), offset2, zone); + } + function adjustTime(inst, dur) { + const oPre = inst.o, year = inst.c.year + Math.trunc(dur.years), month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, c = { + ...inst.c, + year, + month, + day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7 + }, millisToAdd = Duration.fromObject({ + years: dur.years - Math.trunc(dur.years), + quarters: dur.quarters - Math.trunc(dur.quarters), + months: dur.months - Math.trunc(dur.months), + weeks: dur.weeks - Math.trunc(dur.weeks), + days: dur.days - Math.trunc(dur.days), + hours: dur.hours, + minutes: dur.minutes, + seconds: dur.seconds, + milliseconds: dur.milliseconds + }).as("milliseconds"), localTS = objToLocalTS(c); + let [ts, o] = fixOffset(localTS, oPre, inst.zone); + if (millisToAdd !== 0) { + ts += millisToAdd; + o = inst.zone.offset(ts); + } + return { + ts, + o + }; + } + function parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) { + const { + setZone, + zone + } = opts; + if (parsed && Object.keys(parsed).length !== 0 || parsedZone) { + const interpretationZone = parsedZone || zone, inst = DateTime.fromObject(parsed, { + ...opts, + zone: interpretationZone, + specificOffset + }); + return setZone ? inst : inst.setZone(zone); + } else { + return DateTime.invalid(new Invalid("unparsable", `the input "${text}" can't be parsed as ${format}`)); + } + } + function toTechFormat(dt, format, allowZ = true) { + return dt.isValid ? Formatter.create(Locale.create("en-US"), { + allowZ, + forceSimple: true + }).formatDateTimeFromString(dt, format) : null; + } + function toISODate(o, extended) { + const longFormat = o.c.year > 9999 || o.c.year < 0; + let c = ""; + if (longFormat && o.c.year >= 0) c += "+"; + c += padStart(o.c.year, longFormat ? 6 : 4); + if (extended) { + c += "-"; + c += padStart(o.c.month); + c += "-"; + c += padStart(o.c.day); + } else { + c += padStart(o.c.month); + c += padStart(o.c.day); + } + return c; + } + function toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone) { + let c = padStart(o.c.hour); + if (extended) { + c += ":"; + c += padStart(o.c.minute); + if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) { + c += ":"; + } + } else { + c += padStart(o.c.minute); + } + if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) { + c += padStart(o.c.second); + if (o.c.millisecond !== 0 || !suppressMilliseconds) { + c += "."; + c += padStart(o.c.millisecond, 3); + } + } + if (includeOffset) { + if (o.isOffsetFixed && o.offset === 0 && !extendedZone) { + c += "Z"; + } else if (o.o < 0) { + c += "-"; + c += padStart(Math.trunc(-o.o / 60)); + c += ":"; + c += padStart(Math.trunc(-o.o % 60)); + } else { + c += "+"; + c += padStart(Math.trunc(o.o / 60)); + c += ":"; + c += padStart(Math.trunc(o.o % 60)); + } + } + if (extendedZone) { + c += "[" + o.zone.ianaName + "]"; + } + return c; + } + var defaultUnitValues = { + month: 1, + day: 1, + hour: 0, + minute: 0, + second: 0, + millisecond: 0 + }; + var defaultWeekUnitValues = { + weekNumber: 1, + weekday: 1, + hour: 0, + minute: 0, + second: 0, + millisecond: 0 + }; + var defaultOrdinalUnitValues = { + ordinal: 1, + hour: 0, + minute: 0, + second: 0, + millisecond: 0 + }; + var orderedUnits = ["year", "month", "day", "hour", "minute", "second", "millisecond"]; + var orderedWeekUnits = ["weekYear", "weekNumber", "weekday", "hour", "minute", "second", "millisecond"]; + var orderedOrdinalUnits = ["year", "ordinal", "hour", "minute", "second", "millisecond"]; + function normalizeUnit(unit) { + const normalized = { + year: "year", + years: "year", + month: "month", + months: "month", + day: "day", + days: "day", + hour: "hour", + hours: "hour", + minute: "minute", + minutes: "minute", + quarter: "quarter", + quarters: "quarter", + second: "second", + seconds: "second", + millisecond: "millisecond", + milliseconds: "millisecond", + weekday: "weekday", + weekdays: "weekday", + weeknumber: "weekNumber", + weeksnumber: "weekNumber", + weeknumbers: "weekNumber", + weekyear: "weekYear", + weekyears: "weekYear", + ordinal: "ordinal" + }[unit.toLowerCase()]; + if (!normalized) throw new InvalidUnitError(unit); + return normalized; + } + function normalizeUnitWithLocalWeeks(unit) { + switch (unit.toLowerCase()) { + case "localweekday": + case "localweekdays": + return "localWeekday"; + case "localweeknumber": + case "localweeknumbers": + return "localWeekNumber"; + case "localweekyear": + case "localweekyears": + return "localWeekYear"; + default: + return normalizeUnit(unit); + } + } + function guessOffsetForZone(zone) { + if (!zoneOffsetGuessCache[zone]) { + if (zoneOffsetTs === void 0) { + zoneOffsetTs = Settings.now(); + } + zoneOffsetGuessCache[zone] = zone.offset(zoneOffsetTs); + } + return zoneOffsetGuessCache[zone]; + } + function quickDT(obj2, opts) { + const zone = normalizeZone(opts.zone, Settings.defaultZone); + if (!zone.isValid) { + return DateTime.invalid(unsupportedZone(zone)); + } + const loc = Locale.fromObject(opts); + let ts, o; + if (!isUndefined(obj2.year)) { + for (const u of orderedUnits) { + if (isUndefined(obj2[u])) { + obj2[u] = defaultUnitValues[u]; + } + } + const invalid = hasInvalidGregorianData(obj2) || hasInvalidTimeData(obj2); + if (invalid) { + return DateTime.invalid(invalid); + } + const offsetProvis = guessOffsetForZone(zone); + [ts, o] = objToTS(obj2, offsetProvis, zone); + } else { + ts = Settings.now(); + } + return new DateTime({ + ts, + zone, + loc, + o + }); + } + function diffRelative(start, end, opts) { + const round = isUndefined(opts.round) ? true : opts.round, format = (c, unit) => { + c = roundTo(c, round || opts.calendary ? 0 : 2, true); + const formatter = end.loc.clone(opts).relFormatter(opts); + return formatter.format(c, unit); + }, differ = (unit) => { + if (opts.calendary) { + if (!end.hasSame(start, unit)) { + return end.startOf(unit).diff(start.startOf(unit), unit).get(unit); + } else return 0; + } else { + return end.diff(start, unit).get(unit); + } + }; + if (opts.unit) { + return format(differ(opts.unit), opts.unit); + } + for (const unit of opts.units) { + const count = differ(unit); + if (Math.abs(count) >= 1) { + return format(count, unit); + } + } + return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]); + } + function lastOpts(argList) { + let opts = {}, args; + if (argList.length > 0 && typeof argList[argList.length - 1] === "object") { + opts = argList[argList.length - 1]; + args = Array.from(argList).slice(0, argList.length - 1); + } else { + args = Array.from(argList); + } + return [opts, args]; + } + var zoneOffsetTs; + var zoneOffsetGuessCache = {}; + var DateTime = class _DateTime { + /** + * @access private + */ + constructor(config) { + const zone = config.zone || Settings.defaultZone; + let invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null); + this.ts = isUndefined(config.ts) ? Settings.now() : config.ts; + let c = null, o = null; + if (!invalid) { + const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone); + if (unchanged) { + [c, o] = [config.old.c, config.old.o]; + } else { + const ot = isNumber(config.o) && !config.old ? config.o : zone.offset(this.ts); + c = tsToObj(this.ts, ot); + invalid = Number.isNaN(c.year) ? new Invalid("invalid input") : null; + c = invalid ? null : c; + o = invalid ? null : ot; + } + } + this._zone = zone; + this.loc = config.loc || Locale.create(); + this.invalid = invalid; + this.weekData = null; + this.localWeekData = null; + this.c = c; + this.o = o; + this.isLuxonDateTime = true; + } + // CONSTRUCT + /** + * Create a DateTime for the current instant, in the system's time zone. + * + * Use Settings to override these default values if needed. + * @example DateTime.now().toISO() //~> now in the ISO format + * @return {DateTime} + */ + static now() { + return new _DateTime({}); + } + /** + * Create a local DateTime + * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used + * @param {number} [month=1] - The month, 1-indexed + * @param {number} [day=1] - The day of the month, 1-indexed + * @param {number} [hour=0] - The hour of the day, in 24-hour time + * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 + * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 + * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 + * @example DateTime.local() //~> now + * @example DateTime.local({ zone: "America/New_York" }) //~> now, in US east coast time + * @example DateTime.local(2017) //~> 2017-01-01T00:00:00 + * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00 + * @example DateTime.local(2017, 3, 12, { locale: "fr" }) //~> 2017-03-12T00:00:00, with a French locale + * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00 + * @example DateTime.local(2017, 3, 12, 5, { zone: "utc" }) //~> 2017-03-12T05:00:00, in UTC + * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00 + * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10 + * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765 + * @return {DateTime} + */ + static local() { + const [opts, args] = lastOpts(arguments), [year, month, day, hour, minute, second, millisecond] = args; + return quickDT({ + year, + month, + day, + hour, + minute, + second, + millisecond + }, opts); + } + /** + * Create a DateTime in UTC + * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used + * @param {number} [month=1] - The month, 1-indexed + * @param {number} [day=1] - The day of the month + * @param {number} [hour=0] - The hour of the day, in 24-hour time + * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 + * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 + * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 + * @param {Object} options - configuration options for the DateTime + * @param {string} [options.locale] - a locale to set on the resulting DateTime instance + * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance + * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance + * @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance + * @example DateTime.utc() //~> now + * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z + * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z + * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z + * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z + * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z + * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: "fr" }) //~> 2017-03-12T05:45:00Z with a French locale + * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z + * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: "fr" }) //~> 2017-03-12T05:45:10.765Z with a French locale + * @return {DateTime} + */ + static utc() { + const [opts, args] = lastOpts(arguments), [year, month, day, hour, minute, second, millisecond] = args; + opts.zone = FixedOffsetZone.utcInstance; + return quickDT({ + year, + month, + day, + hour, + minute, + second, + millisecond + }, opts); + } + /** + * Create a DateTime from a JavaScript Date object. Uses the default zone. + * @param {Date} date - a JavaScript Date object + * @param {Object} options - configuration options for the DateTime + * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into + * @return {DateTime} + */ + static fromJSDate(date, options = {}) { + const ts = isDate(date) ? date.valueOf() : NaN; + if (Number.isNaN(ts)) { + return _DateTime.invalid("invalid input"); + } + const zoneToUse = normalizeZone(options.zone, Settings.defaultZone); + if (!zoneToUse.isValid) { + return _DateTime.invalid(unsupportedZone(zoneToUse)); + } + return new _DateTime({ + ts, + zone: zoneToUse, + loc: Locale.fromObject(options) + }); + } + /** + * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. + * @param {number} milliseconds - a number of milliseconds since 1970 UTC + * @param {Object} options - configuration options for the DateTime + * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into + * @param {string} [options.locale] - a locale to set on the resulting DateTime instance + * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance + * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance + * @return {DateTime} + */ + static fromMillis(milliseconds, options = {}) { + if (!isNumber(milliseconds)) { + throw new InvalidArgumentError(`fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`); + } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) { + return _DateTime.invalid("Timestamp out of range"); + } else { + return new _DateTime({ + ts: milliseconds, + zone: normalizeZone(options.zone, Settings.defaultZone), + loc: Locale.fromObject(options) + }); + } + } + /** + * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. + * @param {number} seconds - a number of seconds since 1970 UTC + * @param {Object} options - configuration options for the DateTime + * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into + * @param {string} [options.locale] - a locale to set on the resulting DateTime instance + * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance + * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance + * @return {DateTime} + */ + static fromSeconds(seconds, options = {}) { + if (!isNumber(seconds)) { + throw new InvalidArgumentError("fromSeconds requires a numerical input"); + } else { + return new _DateTime({ + ts: seconds * 1e3, + zone: normalizeZone(options.zone, Settings.defaultZone), + loc: Locale.fromObject(options) + }); + } + } + /** + * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults. + * @param {Object} obj - the object to create the DateTime from + * @param {number} obj.year - a year, such as 1987 + * @param {number} obj.month - a month, 1-12 + * @param {number} obj.day - a day of the month, 1-31, depending on the month + * @param {number} obj.ordinal - day of the year, 1-365 or 366 + * @param {number} obj.weekYear - an ISO week year + * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year + * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday + * @param {number} obj.localWeekYear - a week year, according to the locale + * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale + * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale + * @param {number} obj.hour - hour of the day, 0-23 + * @param {number} obj.minute - minute of the hour, 0-59 + * @param {number} obj.second - second of the minute, 0-59 + * @param {number} obj.millisecond - millisecond of the second, 0-999 + * @param {Object} opts - options for creating this DateTime + * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone() + * @param {string} [opts.locale='system\'s locale'] - a locale to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance + * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance + * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25' + * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01' + * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06 + * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }), + * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' }) + * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' }) + * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13' + * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: "en-US" }).toISODate() //=> '2021-12-26' + * @return {DateTime} + */ + static fromObject(obj2, opts = {}) { + obj2 = obj2 || {}; + const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone); + if (!zoneToUse.isValid) { + return _DateTime.invalid(unsupportedZone(zoneToUse)); + } + const loc = Locale.fromObject(opts); + const normalized = normalizeObject(obj2, normalizeUnitWithLocalWeeks); + const { + minDaysInFirstWeek, + startOfWeek + } = usesLocalWeekValues(normalized, loc); + const tsNow = Settings.now(), offsetProvis = !isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber; + if ((containsGregor || containsOrdinal) && definiteWeekDef) { + throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals"); + } + if (containsGregorMD && containsOrdinal) { + throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day"); + } + const useWeekData = definiteWeekDef || normalized.weekday && !containsGregor; + let units, defaultValues, objNow = tsToObj(tsNow, offsetProvis); + if (useWeekData) { + units = orderedWeekUnits; + defaultValues = defaultWeekUnitValues; + objNow = gregorianToWeek(objNow, minDaysInFirstWeek, startOfWeek); + } else if (containsOrdinal) { + units = orderedOrdinalUnits; + defaultValues = defaultOrdinalUnitValues; + objNow = gregorianToOrdinal(objNow); + } else { + units = orderedUnits; + defaultValues = defaultUnitValues; + } + let foundFirst = false; + for (const u of units) { + const v = normalized[u]; + if (!isUndefined(v)) { + foundFirst = true; + } else if (foundFirst) { + normalized[u] = defaultValues[u]; + } else { + normalized[u] = objNow[u]; + } + } + const higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized), invalid = higherOrderInvalid || hasInvalidTimeData(normalized); + if (invalid) { + return _DateTime.invalid(invalid); + } + const gregorian = useWeekData ? weekToGregorian(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? ordinalToGregorian(normalized) : normalized, [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse), inst = new _DateTime({ + ts: tsFinal, + zone: zoneToUse, + o: offsetFinal, + loc + }); + if (normalized.weekday && containsGregor && obj2.weekday !== inst.weekday) { + return _DateTime.invalid("mismatched weekday", `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`); + } + if (!inst.isValid) { + return _DateTime.invalid(inst.invalid); + } + return inst; + } + /** + * Create a DateTime from an ISO 8601 string + * @param {string} text - the ISO string + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone + * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one + * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance + * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance + * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance + * @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance + * @example DateTime.fromISO('2016-05-25T09:08:34.123') + * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00') + * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true}) + * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'}) + * @example DateTime.fromISO('2016-W05-4') + * @return {DateTime} + */ + static fromISO(text, opts = {}) { + const [vals, parsedZone] = parseISODate(text); + return parseDataToDateTime(vals, parsedZone, opts, "ISO 8601", text); + } + /** + * Create a DateTime from an RFC 2822 string + * @param {string} text - the RFC 2822 string + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. + * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one + * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance + * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance + * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT') + * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600') + * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z') + * @return {DateTime} + */ + static fromRFC2822(text, opts = {}) { + const [vals, parsedZone] = parseRFC2822Date(text); + return parseDataToDateTime(vals, parsedZone, opts, "RFC 2822", text); + } + /** + * Create a DateTime from an HTTP header date + * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 + * @param {string} text - the HTTP header date + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. + * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods. + * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance + * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance + * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT') + * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT') + * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994') + * @return {DateTime} + */ + static fromHTTP(text, opts = {}) { + const [vals, parsedZone] = parseHTTPDate(text); + return parseDataToDateTime(vals, parsedZone, opts, "HTTP", opts); + } + /** + * Create a DateTime from an input string and format string. + * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens). + * @param {string} text - the string to parse + * @param {string} fmt - the format the string is expected to be in (see the link below for the formats) + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone + * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one + * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale + * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system + * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @return {DateTime} + */ + static fromFormat(text, fmt, opts = {}) { + if (isUndefined(text) || isUndefined(fmt)) { + throw new InvalidArgumentError("fromFormat requires an input string and a format"); + } + const { + locale = null, + numberingSystem = null + } = opts, localeToUse = Locale.fromOpts({ + locale, + numberingSystem, + defaultToEN: true + }), [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt); + if (invalid) { + return _DateTime.invalid(invalid); + } else { + return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset); + } + } + /** + * @deprecated use fromFormat instead + */ + static fromString(text, fmt, opts = {}) { + return _DateTime.fromFormat(text, fmt, opts); + } + /** + * Create a DateTime from a SQL date, time, or datetime + * Defaults to en-US if no locale has been specified, regardless of the system's locale + * @param {string} text - the string to parse + * @param {Object} opts - options to affect the creation + * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone + * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one + * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale + * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system + * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance + * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance + * @example DateTime.fromSQL('2017-05-15') + * @example DateTime.fromSQL('2017-05-15 09:12:34') + * @example DateTime.fromSQL('2017-05-15 09:12:34.342') + * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00') + * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles') + * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true }) + * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' }) + * @example DateTime.fromSQL('09:12:34.342') + * @return {DateTime} + */ + static fromSQL(text, opts = {}) { + const [vals, parsedZone] = parseSQL(text); + return parseDataToDateTime(vals, parsedZone, opts, "SQL", text); + } + /** + * Create an invalid DateTime. + * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent. + * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information + * @return {DateTime} + */ + static invalid(reason, explanation = null) { + if (!reason) { + throw new InvalidArgumentError("need to specify a reason the DateTime is invalid"); + } + const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); + if (Settings.throwOnInvalid) { + throw new InvalidDateTimeError(invalid); + } else { + return new _DateTime({ + invalid + }); + } + } + /** + * Check if an object is an instance of DateTime. Works across context boundaries + * @param {object} o + * @return {boolean} + */ + static isDateTime(o) { + return o && o.isLuxonDateTime || false; + } + /** + * Produce the format string for a set of options + * @param formatOpts + * @param localeOpts + * @returns {string} + */ + static parseFormatForOpts(formatOpts, localeOpts = {}) { + const tokenList = formatOptsToTokens(formatOpts, Locale.fromObject(localeOpts)); + return !tokenList ? null : tokenList.map((t) => t ? t.val : null).join(""); + } + /** + * Produce the the fully expanded format token for the locale + * Does NOT quote characters, so quoted tokens will not round trip correctly + * @param fmt + * @param localeOpts + * @returns {string} + */ + static expandFormat(fmt, localeOpts = {}) { + const expanded = expandMacroTokens(Formatter.parseFormat(fmt), Locale.fromObject(localeOpts)); + return expanded.map((t) => t.val).join(""); + } + static resetCache() { + zoneOffsetTs = void 0; + zoneOffsetGuessCache = {}; + } + // INFO + /** + * Get the value of unit. + * @param {string} unit - a unit such as 'minute' or 'day' + * @example DateTime.local(2017, 7, 4).get('month'); //=> 7 + * @example DateTime.local(2017, 7, 4).get('day'); //=> 4 + * @return {number} + */ + get(unit) { + return this[unit]; + } + /** + * Returns whether the DateTime is valid. Invalid DateTimes occur when: + * * The DateTime was created from invalid calendar information, such as the 13th month or February 30 + * * The DateTime was created by an operation on another invalid date + * @type {boolean} + */ + get isValid() { + return this.invalid === null; + } + /** + * Returns an error code if this DateTime is invalid, or null if the DateTime is valid + * @type {string} + */ + get invalidReason() { + return this.invalid ? this.invalid.reason : null; + } + /** + * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid + * @type {string} + */ + get invalidExplanation() { + return this.invalid ? this.invalid.explanation : null; + } + /** + * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime + * + * @type {string} + */ + get locale() { + return this.isValid ? this.loc.locale : null; + } + /** + * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime + * + * @type {string} + */ + get numberingSystem() { + return this.isValid ? this.loc.numberingSystem : null; + } + /** + * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime + * + * @type {string} + */ + get outputCalendar() { + return this.isValid ? this.loc.outputCalendar : null; + } + /** + * Get the time zone associated with this DateTime. + * @type {Zone} + */ + get zone() { + return this._zone; + } + /** + * Get the name of the time zone. + * @type {string} + */ + get zoneName() { + return this.isValid ? this.zone.name : null; + } + /** + * Get the year + * @example DateTime.local(2017, 5, 25).year //=> 2017 + * @type {number} + */ + get year() { + return this.isValid ? this.c.year : NaN; + } + /** + * Get the quarter + * @example DateTime.local(2017, 5, 25).quarter //=> 2 + * @type {number} + */ + get quarter() { + return this.isValid ? Math.ceil(this.c.month / 3) : NaN; + } + /** + * Get the month (1-12). + * @example DateTime.local(2017, 5, 25).month //=> 5 + * @type {number} + */ + get month() { + return this.isValid ? this.c.month : NaN; + } + /** + * Get the day of the month (1-30ish). + * @example DateTime.local(2017, 5, 25).day //=> 25 + * @type {number} + */ + get day() { + return this.isValid ? this.c.day : NaN; + } + /** + * Get the hour of the day (0-23). + * @example DateTime.local(2017, 5, 25, 9).hour //=> 9 + * @type {number} + */ + get hour() { + return this.isValid ? this.c.hour : NaN; + } + /** + * Get the minute of the hour (0-59). + * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30 + * @type {number} + */ + get minute() { + return this.isValid ? this.c.minute : NaN; + } + /** + * Get the second of the minute (0-59). + * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52 + * @type {number} + */ + get second() { + return this.isValid ? this.c.second : NaN; + } + /** + * Get the millisecond of the second (0-999). + * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654 + * @type {number} + */ + get millisecond() { + return this.isValid ? this.c.millisecond : NaN; + } + /** + * Get the week year + * @see https://en.wikipedia.org/wiki/ISO_week_date + * @example DateTime.local(2014, 12, 31).weekYear //=> 2015 + * @type {number} + */ + get weekYear() { + return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN; + } + /** + * Get the week number of the week year (1-52ish). + * @see https://en.wikipedia.org/wiki/ISO_week_date + * @example DateTime.local(2017, 5, 25).weekNumber //=> 21 + * @type {number} + */ + get weekNumber() { + return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN; + } + /** + * Get the day of the week. + * 1 is Monday and 7 is Sunday + * @see https://en.wikipedia.org/wiki/ISO_week_date + * @example DateTime.local(2014, 11, 31).weekday //=> 4 + * @type {number} + */ + get weekday() { + return this.isValid ? possiblyCachedWeekData(this).weekday : NaN; + } + /** + * Returns true if this date is on a weekend according to the locale, false otherwise + * @returns {boolean} + */ + get isWeekend() { + return this.isValid && this.loc.getWeekendDays().includes(this.weekday); + } + /** + * Get the day of the week according to the locale. + * 1 is the first day of the week and 7 is the last day of the week. + * If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1, + * @returns {number} + */ + get localWeekday() { + return this.isValid ? possiblyCachedLocalWeekData(this).weekday : NaN; + } + /** + * Get the week number of the week year according to the locale. Different locales assign week numbers differently, + * because the week can start on different days of the week (see localWeekday) and because a different number of days + * is required for a week to count as the first week of a year. + * @returns {number} + */ + get localWeekNumber() { + return this.isValid ? possiblyCachedLocalWeekData(this).weekNumber : NaN; + } + /** + * Get the week year according to the locale. Different locales assign week numbers (and therefor week years) + * differently, see localWeekNumber. + * @returns {number} + */ + get localWeekYear() { + return this.isValid ? possiblyCachedLocalWeekData(this).weekYear : NaN; + } + /** + * Get the ordinal (meaning the day of the year) + * @example DateTime.local(2017, 5, 25).ordinal //=> 145 + * @type {number|DateTime} + */ + get ordinal() { + return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN; + } + /** + * Get the human readable short month name, such as 'Oct'. + * Defaults to the system's locale if no locale has been specified + * @example DateTime.local(2017, 10, 30).monthShort //=> Oct + * @type {string} + */ + get monthShort() { + return this.isValid ? Info.months("short", { + locObj: this.loc + })[this.month - 1] : null; + } + /** + * Get the human readable long month name, such as 'October'. + * Defaults to the system's locale if no locale has been specified + * @example DateTime.local(2017, 10, 30).monthLong //=> October + * @type {string} + */ + get monthLong() { + return this.isValid ? Info.months("long", { + locObj: this.loc + })[this.month - 1] : null; + } + /** + * Get the human readable short weekday, such as 'Mon'. + * Defaults to the system's locale if no locale has been specified + * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon + * @type {string} + */ + get weekdayShort() { + return this.isValid ? Info.weekdays("short", { + locObj: this.loc + })[this.weekday - 1] : null; + } + /** + * Get the human readable long weekday, such as 'Monday'. + * Defaults to the system's locale if no locale has been specified + * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday + * @type {string} + */ + get weekdayLong() { + return this.isValid ? Info.weekdays("long", { + locObj: this.loc + })[this.weekday - 1] : null; + } + /** + * Get the UTC offset of this DateTime in minutes + * @example DateTime.now().offset //=> -240 + * @example DateTime.utc().offset //=> 0 + * @type {number} + */ + get offset() { + return this.isValid ? +this.o : NaN; + } + /** + * Get the short human name for the zone's current offset, for example "EST" or "EDT". + * Defaults to the system's locale if no locale has been specified + * @type {string} + */ + get offsetNameShort() { + if (this.isValid) { + return this.zone.offsetName(this.ts, { + format: "short", + locale: this.locale + }); + } else { + return null; + } + } + /** + * Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time". + * Defaults to the system's locale if no locale has been specified + * @type {string} + */ + get offsetNameLong() { + if (this.isValid) { + return this.zone.offsetName(this.ts, { + format: "long", + locale: this.locale + }); + } else { + return null; + } + } + /** + * Get whether this zone's offset ever changes, as in a DST. + * @type {boolean} + */ + get isOffsetFixed() { + return this.isValid ? this.zone.isUniversal : null; + } + /** + * Get whether the DateTime is in a DST. + * @type {boolean} + */ + get isInDST() { + if (this.isOffsetFixed) { + return false; + } else { + return this.offset > this.set({ + month: 1, + day: 1 + }).offset || this.offset > this.set({ + month: 5 + }).offset; + } + } + /** + * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC + * in this DateTime's zone. During DST changes local time can be ambiguous, for example + * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`. + * This method will return both possible DateTimes if this DateTime's local time is ambiguous. + * @returns {DateTime[]} + */ + getPossibleOffsets() { + if (!this.isValid || this.isOffsetFixed) { + return [this]; + } + const dayMs = 864e5; + const minuteMs = 6e4; + const localTS = objToLocalTS(this.c); + const oEarlier = this.zone.offset(localTS - dayMs); + const oLater = this.zone.offset(localTS + dayMs); + const o1 = this.zone.offset(localTS - oEarlier * minuteMs); + const o2 = this.zone.offset(localTS - oLater * minuteMs); + if (o1 === o2) { + return [this]; + } + const ts1 = localTS - o1 * minuteMs; + const ts2 = localTS - o2 * minuteMs; + const c1 = tsToObj(ts1, o1); + const c2 = tsToObj(ts2, o2); + if (c1.hour === c2.hour && c1.minute === c2.minute && c1.second === c2.second && c1.millisecond === c2.millisecond) { + return [clone(this, { + ts: ts1 + }), clone(this, { + ts: ts2 + })]; + } + return [this]; + } + /** + * Returns true if this DateTime is in a leap year, false otherwise + * @example DateTime.local(2016).isInLeapYear //=> true + * @example DateTime.local(2013).isInLeapYear //=> false + * @type {boolean} + */ + get isInLeapYear() { + return isLeapYear(this.year); + } + /** + * Returns the number of days in this DateTime's month + * @example DateTime.local(2016, 2).daysInMonth //=> 29 + * @example DateTime.local(2016, 3).daysInMonth //=> 31 + * @type {number} + */ + get daysInMonth() { + return daysInMonth(this.year, this.month); + } + /** + * Returns the number of days in this DateTime's year + * @example DateTime.local(2016).daysInYear //=> 366 + * @example DateTime.local(2013).daysInYear //=> 365 + * @type {number} + */ + get daysInYear() { + return this.isValid ? daysInYear(this.year) : NaN; + } + /** + * Returns the number of weeks in this DateTime's year + * @see https://en.wikipedia.org/wiki/ISO_week_date + * @example DateTime.local(2004).weeksInWeekYear //=> 53 + * @example DateTime.local(2013).weeksInWeekYear //=> 52 + * @type {number} + */ + get weeksInWeekYear() { + return this.isValid ? weeksInWeekYear(this.weekYear) : NaN; + } + /** + * Returns the number of weeks in this DateTime's local week year + * @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52 + * @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53 + * @type {number} + */ + get weeksInLocalWeekYear() { + return this.isValid ? weeksInWeekYear(this.localWeekYear, this.loc.getMinDaysInFirstWeek(), this.loc.getStartOfWeek()) : NaN; + } + /** + * Returns the resolved Intl options for this DateTime. + * This is useful in understanding the behavior of formatting methods + * @param {Object} opts - the same options as toLocaleString + * @return {Object} + */ + resolvedLocaleOptions(opts = {}) { + const { + locale, + numberingSystem, + calendar + } = Formatter.create(this.loc.clone(opts), opts).resolvedOptions(this); + return { + locale, + numberingSystem, + outputCalendar: calendar + }; + } + // TRANSFORM + /** + * "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime. + * + * Equivalent to {@link DateTime#setZone}('utc') + * @param {number} [offset=0] - optionally, an offset from UTC in minutes + * @param {Object} [opts={}] - options to pass to `setZone()` + * @return {DateTime} + */ + toUTC(offset2 = 0, opts = {}) { + return this.setZone(FixedOffsetZone.instance(offset2), opts); + } + /** + * "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime. + * + * Equivalent to `setZone('local')` + * @return {DateTime} + */ + toLocal() { + return this.setZone(Settings.defaultZone); + } + /** + * "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime. + * + * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones. + * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class. + * @param {Object} opts - options + * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this. + * @return {DateTime} + */ + setZone(zone, { + keepLocalTime = false, + keepCalendarTime = false + } = {}) { + zone = normalizeZone(zone, Settings.defaultZone); + if (zone.equals(this.zone)) { + return this; + } else if (!zone.isValid) { + return _DateTime.invalid(unsupportedZone(zone)); + } else { + let newTS = this.ts; + if (keepLocalTime || keepCalendarTime) { + const offsetGuess = zone.offset(this.ts); + const asObj = this.toObject(); + [newTS] = objToTS(asObj, offsetGuess, zone); + } + return clone(this, { + ts: newTS, + zone + }); + } + } + /** + * "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime. + * @param {Object} properties - the properties to set + * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' }) + * @return {DateTime} + */ + reconfigure({ + locale, + numberingSystem, + outputCalendar + } = {}) { + const loc = this.loc.clone({ + locale, + numberingSystem, + outputCalendar + }); + return clone(this, { + loc + }); + } + /** + * "Set" the locale. Returns a newly-constructed DateTime. + * Just a convenient alias for reconfigure({ locale }) + * @example DateTime.local(2017, 5, 25).setLocale('en-GB') + * @return {DateTime} + */ + setLocale(locale) { + return this.reconfigure({ + locale + }); + } + /** + * "Set" the values of specified units. Returns a newly-constructed DateTime. + * You can only set units with this method; for "setting" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}. + * + * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`. + * They cannot be mixed with ISO-week units like `weekday`. + * @param {Object} values - a mapping of units to numbers + * @example dt.set({ year: 2017 }) + * @example dt.set({ hour: 8, minute: 30 }) + * @example dt.set({ weekday: 5 }) + * @example dt.set({ year: 2005, ordinal: 234 }) + * @return {DateTime} + */ + set(values) { + if (!this.isValid) return this; + const normalized = normalizeObject(values, normalizeUnitWithLocalWeeks); + const { + minDaysInFirstWeek, + startOfWeek + } = usesLocalWeekValues(normalized, this.loc); + const settingWeekStuff = !isUndefined(normalized.weekYear) || !isUndefined(normalized.weekNumber) || !isUndefined(normalized.weekday), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber; + if ((containsGregor || containsOrdinal) && definiteWeekDef) { + throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals"); + } + if (containsGregorMD && containsOrdinal) { + throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day"); + } + let mixed; + if (settingWeekStuff) { + mixed = weekToGregorian({ + ...gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), + ...normalized + }, minDaysInFirstWeek, startOfWeek); + } else if (!isUndefined(normalized.ordinal)) { + mixed = ordinalToGregorian({ + ...gregorianToOrdinal(this.c), + ...normalized + }); + } else { + mixed = { + ...this.toObject(), + ...normalized + }; + if (isUndefined(normalized.day)) { + mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day); + } + } + const [ts, o] = objToTS(mixed, this.o, this.zone); + return clone(this, { + ts, + o + }); + } + /** + * Add a period of time to this DateTime and return the resulting DateTime + * + * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between. + * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() + * @example DateTime.now().plus(123) //~> in 123 milliseconds + * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes + * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow + * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday + * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min + * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min + * @return {DateTime} + */ + plus(duration) { + if (!this.isValid) return this; + const dur = Duration.fromDurationLike(duration); + return clone(this, adjustTime(this, dur)); + } + /** + * Subtract a period of time to this DateTime and return the resulting DateTime + * See {@link DateTime#plus} + * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() + @return {DateTime} + */ + minus(duration) { + if (!this.isValid) return this; + const dur = Duration.fromDurationLike(duration).negate(); + return clone(this, adjustTime(this, dur)); + } + /** + * "Set" this DateTime to the beginning of a unit of time. + * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'. + * @param {Object} opts - options + * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week + * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01' + * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01' + * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays + * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00' + * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00' + * @return {DateTime} + */ + startOf(unit, { + useLocaleWeeks = false + } = {}) { + if (!this.isValid) return this; + const o = {}, normalizedUnit = Duration.normalizeUnit(unit); + switch (normalizedUnit) { + case "years": + o.month = 1; + // falls through + case "quarters": + case "months": + o.day = 1; + // falls through + case "weeks": + case "days": + o.hour = 0; + // falls through + case "hours": + o.minute = 0; + // falls through + case "minutes": + o.second = 0; + // falls through + case "seconds": + o.millisecond = 0; + break; + } + if (normalizedUnit === "weeks") { + if (useLocaleWeeks) { + const startOfWeek = this.loc.getStartOfWeek(); + const { + weekday + } = this; + if (weekday < startOfWeek) { + o.weekNumber = this.weekNumber - 1; + } + o.weekday = startOfWeek; + } else { + o.weekday = 1; + } + } + if (normalizedUnit === "quarters") { + const q = Math.ceil(this.month / 3); + o.month = (q - 1) * 3 + 1; + } + return this.set(o); + } + /** + * "Set" this DateTime to the end (meaning the last millisecond) of a unit of time + * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'. + * @param {Object} opts - options + * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week + * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00' + * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00' + * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays + * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00' + * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00' + * @return {DateTime} + */ + endOf(unit, opts) { + return this.isValid ? this.plus({ + [unit]: 1 + }).startOf(unit, opts).minus(1) : this; + } + // OUTPUT + /** + * Returns a string representation of this DateTime formatted according to the specified format string. + * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens). + * Defaults to en-US if no locale has been specified, regardless of the system's locale. + * @param {string} fmt - the format string + * @param {Object} opts - opts to override the configuration options on this DateTime + * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22' + * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22' + * @example DateTime.now().toFormat('yyyy LLL dd', { locale: "fr" }) //=> '2017 avr. 22' + * @example DateTime.now().toFormat("HH 'hours and' mm 'minutes'") //=> '20 hours and 55 minutes' + * @return {string} + */ + toFormat(fmt, opts = {}) { + return this.isValid ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID; + } + /** + * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`. + * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation + * of the DateTime in the assigned locale. + * Defaults to the system's locale if no locale has been specified + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat + * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options + * @param {Object} opts - opts to override the configuration options on this DateTime + * @example DateTime.now().toLocaleString(); //=> 4/20/2017 + * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017' + * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017' + * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022' + * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM' + * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM' + * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20' + * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM' + * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32' + * @return {string} + */ + toLocaleString(formatOpts = DATE_SHORT, opts = {}) { + return this.isValid ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this) : INVALID; + } + /** + * Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output. + * Defaults to the system's locale if no locale has been specified + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts + * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`. + * @example DateTime.now().toLocaleParts(); //=> [ + * //=> { type: 'day', value: '25' }, + * //=> { type: 'literal', value: '/' }, + * //=> { type: 'month', value: '05' }, + * //=> { type: 'literal', value: '/' }, + * //=> { type: 'year', value: '1982' } + * //=> ] + */ + toLocaleParts(opts = {}) { + return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : []; + } + /** + * Returns an ISO 8601-compliant string representation of this DateTime + * @param {Object} opts - options + * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 + * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 + * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' + * @param {boolean} [opts.extendedZone=false] - add the time zone format extension + * @param {string} [opts.format='extended'] - choose between the basic and extended format + * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z' + * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00' + * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335' + * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400' + * @return {string} + */ + toISO({ + format = "extended", + suppressSeconds = false, + suppressMilliseconds = false, + includeOffset = true, + extendedZone = false + } = {}) { + if (!this.isValid) { + return null; + } + const ext = format === "extended"; + let c = toISODate(this, ext); + c += "T"; + c += toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone); + return c; + } + /** + * Returns an ISO 8601-compliant string representation of this DateTime's date component + * @param {Object} opts - options + * @param {string} [opts.format='extended'] - choose between the basic and extended format + * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25' + * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525' + * @return {string} + */ + toISODate({ + format = "extended" + } = {}) { + if (!this.isValid) { + return null; + } + return toISODate(this, format === "extended"); + } + /** + * Returns an ISO 8601-compliant string representation of this DateTime's week date + * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2' + * @return {string} + */ + toISOWeekDate() { + return toTechFormat(this, "kkkk-'W'WW-c"); + } + /** + * Returns an ISO 8601-compliant string representation of this DateTime's time component + * @param {Object} opts - options + * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 + * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 + * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' + * @param {boolean} [opts.extendedZone=true] - add the time zone format extension + * @param {boolean} [opts.includePrefix=false] - include the `T` prefix + * @param {string} [opts.format='extended'] - choose between the basic and extended format + * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z' + * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z' + * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z' + * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z' + * @return {string} + */ + toISOTime({ + suppressMilliseconds = false, + suppressSeconds = false, + includeOffset = true, + includePrefix = false, + extendedZone = false, + format = "extended" + } = {}) { + if (!this.isValid) { + return null; + } + let c = includePrefix ? "T" : ""; + return c + toISOTime(this, format === "extended", suppressSeconds, suppressMilliseconds, includeOffset, extendedZone); + } + /** + * Returns an RFC 2822-compatible string representation of this DateTime + * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000' + * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400' + * @return {string} + */ + toRFC2822() { + return toTechFormat(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false); + } + /** + * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT. + * Specifically, the string conforms to RFC 1123. + * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 + * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT' + * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT' + * @return {string} + */ + toHTTP() { + return toTechFormat(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'"); + } + /** + * Returns a string representation of this DateTime appropriate for use in SQL Date + * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13' + * @return {string} + */ + toSQLDate() { + if (!this.isValid) { + return null; + } + return toISODate(this, true); + } + /** + * Returns a string representation of this DateTime appropriate for use in SQL Time + * @param {Object} opts - options + * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. + * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' + * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00' + * @example DateTime.utc().toSQL() //=> '05:15:16.345' + * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00' + * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345' + * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York' + * @return {string} + */ + toSQLTime({ + includeOffset = true, + includeZone = false, + includeOffsetSpace = true + } = {}) { + let fmt = "HH:mm:ss.SSS"; + if (includeZone || includeOffset) { + if (includeOffsetSpace) { + fmt += " "; + } + if (includeZone) { + fmt += "z"; + } else if (includeOffset) { + fmt += "ZZ"; + } + } + return toTechFormat(this, fmt, true); + } + /** + * Returns a string representation of this DateTime appropriate for use in SQL DateTime + * @param {Object} opts - options + * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. + * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' + * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00' + * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z' + * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00' + * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000' + * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York' + * @return {string} + */ + toSQL(opts = {}) { + if (!this.isValid) { + return null; + } + return `${this.toSQLDate()} ${this.toSQLTime(opts)}`; + } + /** + * Returns a string representation of this DateTime appropriate for debugging + * @return {string} + */ + toString() { + return this.isValid ? this.toISO() : INVALID; + } + /** + * Returns a string representation of this DateTime appropriate for the REPL. + * @return {string} + */ + [Symbol.for("nodejs.util.inspect.custom")]() { + if (this.isValid) { + return `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`; + } else { + return `DateTime { Invalid, reason: ${this.invalidReason} }`; + } + } + /** + * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis} + * @return {number} + */ + valueOf() { + return this.toMillis(); + } + /** + * Returns the epoch milliseconds of this DateTime. + * @return {number} + */ + toMillis() { + return this.isValid ? this.ts : NaN; + } + /** + * Returns the epoch seconds of this DateTime. + * @return {number} + */ + toSeconds() { + return this.isValid ? this.ts / 1e3 : NaN; + } + /** + * Returns the epoch seconds (as a whole number) of this DateTime. + * @return {number} + */ + toUnixInteger() { + return this.isValid ? Math.floor(this.ts / 1e3) : NaN; + } + /** + * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON. + * @return {string} + */ + toJSON() { + return this.toISO(); + } + /** + * Returns a BSON serializable equivalent to this DateTime. + * @return {Date} + */ + toBSON() { + return this.toJSDate(); + } + /** + * Returns a JavaScript object with this DateTime's year, month, day, and so on. + * @param opts - options for generating the object + * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output + * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 } + * @return {Object} + */ + toObject(opts = {}) { + if (!this.isValid) return {}; + const base = { + ...this.c + }; + if (opts.includeConfig) { + base.outputCalendar = this.outputCalendar; + base.numberingSystem = this.loc.numberingSystem; + base.locale = this.loc.locale; + } + return base; + } + /** + * Returns a JavaScript Date equivalent to this DateTime. + * @return {Date} + */ + toJSDate() { + return new Date(this.isValid ? this.ts : NaN); + } + // COMPARE + /** + * Return the difference between two DateTimes as a Duration. + * @param {DateTime} otherDateTime - the DateTime to compare this one to + * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration. + * @param {Object} opts - options that affect the creation of the Duration + * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use + * @example + * var i1 = DateTime.fromISO('1982-05-25T09:45'), + * i2 = DateTime.fromISO('1983-10-14T10:30'); + * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 } + * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 } + * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 } + * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 } + * @return {Duration} + */ + diff(otherDateTime, unit = "milliseconds", opts = {}) { + if (!this.isValid || !otherDateTime.isValid) { + return Duration.invalid("created by diffing an invalid DateTime"); + } + const durOpts = { + locale: this.locale, + numberingSystem: this.numberingSystem, + ...opts + }; + const units = maybeArray(unit).map(Duration.normalizeUnit), otherIsLater = otherDateTime.valueOf() > this.valueOf(), earlier = otherIsLater ? this : otherDateTime, later = otherIsLater ? otherDateTime : this, diffed = diff(earlier, later, units, durOpts); + return otherIsLater ? diffed.negate() : diffed; + } + /** + * Return the difference between this DateTime and right now. + * See {@link DateTime#diff} + * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration + * @param {Object} opts - options that affect the creation of the Duration + * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use + * @return {Duration} + */ + diffNow(unit = "milliseconds", opts = {}) { + return this.diff(_DateTime.now(), unit, opts); + } + /** + * Return an Interval spanning between this DateTime and another DateTime + * @param {DateTime} otherDateTime - the other end point of the Interval + * @return {Interval} + */ + until(otherDateTime) { + return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this; + } + /** + * Return whether this DateTime is in the same unit of time as another DateTime. + * Higher-order units must also be identical for this function to return `true`. + * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed. + * @param {DateTime} otherDateTime - the other DateTime + * @param {string} unit - the unit of time to check sameness on + * @param {Object} opts - options + * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used + * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day + * @return {boolean} + */ + hasSame(otherDateTime, unit, opts) { + if (!this.isValid) return false; + const inputMs = otherDateTime.valueOf(); + const adjustedToZone = this.setZone(otherDateTime.zone, { + keepLocalTime: true + }); + return adjustedToZone.startOf(unit, opts) <= inputMs && inputMs <= adjustedToZone.endOf(unit, opts); + } + /** + * Equality check + * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid. + * To compare just the millisecond values, use `+dt1 === +dt2`. + * @param {DateTime} other - the other DateTime + * @return {boolean} + */ + equals(other) { + return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc); + } + /** + * Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your + * platform supports Intl.RelativeTimeFormat. Rounds down by default. + * @param {Object} options - options that affect the output + * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now. + * @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow" + * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds" + * @param {boolean} [options.round=true] - whether to round the numbers in the output. + * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding. + * @param {string} options.locale - override the locale of this DateTime + * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this + * @example DateTime.now().plus({ days: 1 }).toRelative() //=> "in 1 day" + * @example DateTime.now().setLocale("es").toRelative({ days: 1 }) //=> "dentro de 1 día" + * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: "fr" }) //=> "dans 23 heures" + * @example DateTime.now().minus({ days: 2 }).toRelative() //=> "2 days ago" + * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: "hours" }) //=> "48 hours ago" + * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> "1.5 days ago" + */ + toRelative(options = {}) { + if (!this.isValid) return null; + const base = options.base || _DateTime.fromObject({}, { + zone: this.zone + }), padding = options.padding ? this < base ? -options.padding : options.padding : 0; + let units = ["years", "months", "days", "hours", "minutes", "seconds"]; + let unit = options.unit; + if (Array.isArray(options.unit)) { + units = options.unit; + unit = void 0; + } + return diffRelative(base, this.plus(padding), { + ...options, + numeric: "always", + units, + unit + }); + } + /** + * Returns a string representation of this date relative to today, such as "yesterday" or "next month". + * Only internationalizes on platforms that supports Intl.RelativeTimeFormat. + * @param {Object} options - options that affect the output + * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now. + * @param {string} options.locale - override the locale of this DateTime + * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", or "days" + * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this + * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> "tomorrow" + * @example DateTime.now().setLocale("es").plus({ days: 1 }).toRelative() //=> ""mañana" + * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: "fr" }) //=> "demain" + * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago" + */ + toRelativeCalendar(options = {}) { + if (!this.isValid) return null; + return diffRelative(options.base || _DateTime.fromObject({}, { + zone: this.zone + }), this, { + ...options, + numeric: "auto", + units: ["years", "months", "days"], + calendary: true + }); + } + /** + * Return the min of several date times + * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum + * @return {DateTime} the min DateTime, or undefined if called with no argument + */ + static min(...dateTimes) { + if (!dateTimes.every(_DateTime.isDateTime)) { + throw new InvalidArgumentError("min requires all arguments be DateTimes"); + } + return bestBy(dateTimes, (i) => i.valueOf(), Math.min); + } + /** + * Return the max of several date times + * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum + * @return {DateTime} the max DateTime, or undefined if called with no argument + */ + static max(...dateTimes) { + if (!dateTimes.every(_DateTime.isDateTime)) { + throw new InvalidArgumentError("max requires all arguments be DateTimes"); + } + return bestBy(dateTimes, (i) => i.valueOf(), Math.max); + } + // MISC + /** + * Explain how a string would be parsed by fromFormat() + * @param {string} text - the string to parse + * @param {string} fmt - the format the string is expected to be in (see description) + * @param {Object} options - options taken by fromFormat() + * @return {Object} + */ + static fromFormatExplain(text, fmt, options = {}) { + const { + locale = null, + numberingSystem = null + } = options, localeToUse = Locale.fromOpts({ + locale, + numberingSystem, + defaultToEN: true + }); + return explainFromTokens(localeToUse, text, fmt); + } + /** + * @deprecated use fromFormatExplain instead + */ + static fromStringExplain(text, fmt, options = {}) { + return _DateTime.fromFormatExplain(text, fmt, options); + } + /** + * Build a parser for `fmt` using the given locale. This parser can be passed + * to {@link DateTime.fromFormatParser} to a parse a date in this format. This + * can be used to optimize cases where many dates need to be parsed in a + * specific format. + * + * @param {String} fmt - the format the string is expected to be in (see + * description) + * @param {Object} options - options used to set locale and numberingSystem + * for parser + * @returns {TokenParser} - opaque object to be used + */ + static buildFormatParser(fmt, options = {}) { + const { + locale = null, + numberingSystem = null + } = options, localeToUse = Locale.fromOpts({ + locale, + numberingSystem, + defaultToEN: true + }); + return new TokenParser(localeToUse, fmt); + } + /** + * Create a DateTime from an input string and format parser. + * + * The format parser must have been created with the same locale as this call. + * + * @param {String} text - the string to parse + * @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser} + * @param {Object} opts - options taken by fromFormat() + * @returns {DateTime} + */ + static fromFormatParser(text, formatParser, opts = {}) { + if (isUndefined(text) || isUndefined(formatParser)) { + throw new InvalidArgumentError("fromFormatParser requires an input string and a format parser"); + } + const { + locale = null, + numberingSystem = null + } = opts, localeToUse = Locale.fromOpts({ + locale, + numberingSystem, + defaultToEN: true + }); + if (!localeToUse.equals(formatParser.locale)) { + throw new InvalidArgumentError(`fromFormatParser called with a locale of ${localeToUse}, but the format parser was created for ${formatParser.locale}`); + } + const { + result, + zone, + specificOffset, + invalidReason + } = formatParser.explainFromTokens(text); + if (invalidReason) { + return _DateTime.invalid(invalidReason); + } else { + return parseDataToDateTime(result, zone, opts, `format ${formatParser.format}`, text, specificOffset); + } + } + // FORMAT PRESETS + /** + * {@link DateTime#toLocaleString} format like 10/14/1983 + * @type {Object} + */ + static get DATE_SHORT() { + return DATE_SHORT; + } + /** + * {@link DateTime#toLocaleString} format like 'Oct 14, 1983' + * @type {Object} + */ + static get DATE_MED() { + return DATE_MED; + } + /** + * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983' + * @type {Object} + */ + static get DATE_MED_WITH_WEEKDAY() { + return DATE_MED_WITH_WEEKDAY; + } + /** + * {@link DateTime#toLocaleString} format like 'October 14, 1983' + * @type {Object} + */ + static get DATE_FULL() { + return DATE_FULL; + } + /** + * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983' + * @type {Object} + */ + static get DATE_HUGE() { + return DATE_HUGE; + } + /** + * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get TIME_SIMPLE() { + return TIME_SIMPLE; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get TIME_WITH_SECONDS() { + return TIME_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is. + * @type {Object} + */ + static get TIME_WITH_SHORT_OFFSET() { + return TIME_WITH_SHORT_OFFSET; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is. + * @type {Object} + */ + static get TIME_WITH_LONG_OFFSET() { + return TIME_WITH_LONG_OFFSET; + } + /** + * {@link DateTime#toLocaleString} format like '09:30', always 24-hour. + * @type {Object} + */ + static get TIME_24_SIMPLE() { + return TIME_24_SIMPLE; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour. + * @type {Object} + */ + static get TIME_24_WITH_SECONDS() { + return TIME_24_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour. + * @type {Object} + */ + static get TIME_24_WITH_SHORT_OFFSET() { + return TIME_24_WITH_SHORT_OFFSET; + } + /** + * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour. + * @type {Object} + */ + static get TIME_24_WITH_LONG_OFFSET() { + return TIME_24_WITH_LONG_OFFSET; + } + /** + * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_SHORT() { + return DATETIME_SHORT; + } + /** + * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_SHORT_WITH_SECONDS() { + return DATETIME_SHORT_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_MED() { + return DATETIME_MED; + } + /** + * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_MED_WITH_SECONDS() { + return DATETIME_MED_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_MED_WITH_WEEKDAY() { + return DATETIME_MED_WITH_WEEKDAY; + } + /** + * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_FULL() { + return DATETIME_FULL; + } + /** + * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_FULL_WITH_SECONDS() { + return DATETIME_FULL_WITH_SECONDS; + } + /** + * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_HUGE() { + return DATETIME_HUGE; + } + /** + * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is. + * @type {Object} + */ + static get DATETIME_HUGE_WITH_SECONDS() { + return DATETIME_HUGE_WITH_SECONDS; + } + }; + function friendlyDateTime(dateTimeish) { + if (DateTime.isDateTime(dateTimeish)) { + return dateTimeish; + } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) { + return DateTime.fromJSDate(dateTimeish); + } else if (dateTimeish && typeof dateTimeish === "object") { + return DateTime.fromObject(dateTimeish); + } else { + throw new InvalidArgumentError(`Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`); + } + } + var VERSION = "3.5.0"; + exports2.DateTime = DateTime; + exports2.Duration = Duration; + exports2.FixedOffsetZone = FixedOffsetZone; + exports2.IANAZone = IANAZone; + exports2.Info = Info; + exports2.Interval = Interval; + exports2.InvalidZone = InvalidZone; + exports2.Settings = Settings; + exports2.SystemZone = SystemZone; + exports2.VERSION = VERSION; + exports2.Zone = Zone; + } +}); + +// ../../node_modules/.pnpm/cron@3.2.1/node_modules/cron/dist/constants.js +var require_constants12 = __commonJS({ + "../../node_modules/.pnpm/cron@3.2.1/node_modules/cron/dist/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RE_RANGE = exports2.RE_WILDCARDS = exports2.PRESETS = exports2.TIME_UNITS_LEN = exports2.TIME_UNITS = exports2.TIME_UNITS_MAP = exports2.ALIASES = exports2.PARSE_DEFAULTS = exports2.MONTH_CONSTRAINTS = exports2.CONSTRAINTS = void 0; + exports2.CONSTRAINTS = Object.freeze({ + second: [0, 59], + minute: [0, 59], + hour: [0, 23], + dayOfMonth: [1, 31], + month: [1, 12], + dayOfWeek: [0, 7] + }); + exports2.MONTH_CONSTRAINTS = Object.freeze({ + 1: 31, + 2: 29, + 3: 31, + 4: 30, + 5: 31, + 6: 30, + 7: 31, + 8: 31, + 9: 30, + 10: 31, + 11: 30, + 12: 31 + }); + exports2.PARSE_DEFAULTS = Object.freeze({ + second: "0", + minute: "*", + hour: "*", + dayOfMonth: "*", + month: "*", + dayOfWeek: "*" + }); + exports2.ALIASES = Object.freeze({ + jan: 1, + feb: 2, + mar: 3, + apr: 4, + may: 5, + jun: 6, + jul: 7, + aug: 8, + sep: 9, + oct: 10, + nov: 11, + dec: 12, + sun: 0, + mon: 1, + tue: 2, + wed: 3, + thu: 4, + fri: 5, + sat: 6 + }); + exports2.TIME_UNITS_MAP = Object.freeze({ + SECOND: "second", + MINUTE: "minute", + HOUR: "hour", + DAY_OF_MONTH: "dayOfMonth", + MONTH: "month", + DAY_OF_WEEK: "dayOfWeek" + }); + exports2.TIME_UNITS = Object.freeze(Object.values(exports2.TIME_UNITS_MAP)); + exports2.TIME_UNITS_LEN = exports2.TIME_UNITS.length; + exports2.PRESETS = Object.freeze({ + "@yearly": "0 0 0 1 1 *", + "@monthly": "0 0 0 1 * *", + "@weekly": "0 0 0 * * 0", + "@daily": "0 0 0 * * *", + "@hourly": "0 0 * * * *", + "@minutely": "0 * * * * *", + "@secondly": "* * * * * *", + "@weekdays": "0 0 0 * * 1-5", + "@weekends": "0 0 0 * * 0,6" + }); + exports2.RE_WILDCARDS = /\*/g; + exports2.RE_RANGE = /^(\d+)(?:-(\d+))?(?:\/(\d+))?$/g; + } +}); + +// ../../node_modules/.pnpm/cron@3.2.1/node_modules/cron/dist/errors.js +var require_errors6 = __commonJS({ + "../../node_modules/.pnpm/cron@3.2.1/node_modules/cron/dist/errors.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ExclusiveParametersError = exports2.CronError = void 0; + var CronError = class extends Error { + }; + exports2.CronError = CronError; + var ExclusiveParametersError = class extends CronError { + constructor(param1, param2) { + super(`You can't specify both ${param1} and ${param2}`); + } + }; + exports2.ExclusiveParametersError = ExclusiveParametersError; + } +}); + +// ../../node_modules/.pnpm/cron@3.2.1/node_modules/cron/dist/utils.js +var require_utils19 = __commonJS({ + "../../node_modules/.pnpm/cron@3.2.1/node_modules/cron/dist/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRecordKeys = void 0; + var getRecordKeys = (record) => { + return Object.keys(record); + }; + exports2.getRecordKeys = getRecordKeys; + } +}); + +// ../../node_modules/.pnpm/cron@3.2.1/node_modules/cron/dist/time.js +var require_time = __commonJS({ + "../../node_modules/.pnpm/cron@3.2.1/node_modules/cron/dist/time.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CronTime = void 0; + var luxon_1 = require_luxon2(); + var constants_1 = require_constants12(); + var errors_1 = require_errors6(); + var utils_1 = require_utils19(); + var CronTime = class { + constructor(source, timeZone, utcOffset) { + this.realDate = false; + this.second = {}; + this.minute = {}; + this.hour = {}; + this.dayOfMonth = {}; + this.month = {}; + this.dayOfWeek = {}; + if (timeZone != null && utcOffset != null) { + throw new errors_1.ExclusiveParametersError("timeZone", "utcOffset"); + } + if (timeZone) { + const dt = luxon_1.DateTime.fromObject({}, { zone: timeZone }); + if (!dt.isValid) { + throw new errors_1.CronError("Invalid timezone."); + } + this.timeZone = timeZone; + } + if (utcOffset != null) { + this.utcOffset = utcOffset; + } + if (source instanceof Date || source instanceof luxon_1.DateTime) { + this.source = source instanceof Date ? luxon_1.DateTime.fromJSDate(source) : source; + this.realDate = true; + } else { + this.source = source; + this._parse(this.source); + this._verifyParse(); + } + } + _getWeekDay(date) { + return date.weekday === 7 ? 0 : date.weekday; + } + _verifyParse() { + const months = (0, utils_1.getRecordKeys)(this.month); + const daysOfMonth = (0, utils_1.getRecordKeys)(this.dayOfMonth); + let isOk = false; + let lastWrongMonth = null; + for (const m of months) { + const con = constants_1.MONTH_CONSTRAINTS[m]; + for (const day of daysOfMonth) { + if (day <= con) { + isOk = true; + } + } + if (!isOk) { + lastWrongMonth = m; + console.warn(`Month '${m}' is limited to '${con}' days.`); + } + } + if (!isOk && lastWrongMonth !== null) { + const notOkCon = constants_1.MONTH_CONSTRAINTS[lastWrongMonth]; + for (const notOkDay of daysOfMonth) { + if (notOkDay > notOkCon) { + delete this.dayOfMonth[notOkDay]; + const fixedDay = notOkDay % notOkCon; + this.dayOfMonth[fixedDay] = true; + } + } + } + } + sendAt(i) { + let date = this.realDate && this.source instanceof luxon_1.DateTime ? this.source : luxon_1.DateTime.local(); + if (this.timeZone) { + date = date.setZone(this.timeZone); + } + if (this.utcOffset !== void 0) { + const sign = this.utcOffset < 0 ? "-" : "+"; + const offsetHours = Math.trunc(this.utcOffset / 60); + const offsetHoursStr = String(Math.abs(offsetHours)).padStart(2, "0"); + const offsetMins = Math.abs(this.utcOffset - offsetHours * 60); + const offsetMinsStr = String(offsetMins).padStart(2, "0"); + const utcZone = `UTC${sign}${offsetHoursStr}:${offsetMinsStr}`; + date = date.setZone(utcZone); + if (!date.isValid) { + throw new errors_1.CronError("ERROR: You specified an invalid UTC offset."); + } + } + if (this.realDate) { + if (luxon_1.DateTime.local() > date) { + throw new errors_1.CronError("WARNING: Date in past. Will never be fired."); + } + return date; + } + if (i === void 0 || isNaN(i) || i < 0) { + return this.getNextDateFrom(date); + } else { + const dates = []; + for (; i > 0; i--) { + date = this.getNextDateFrom(date); + dates.push(date); + } + return dates; + } + } + getTimeout() { + return Math.max(-1, this.sendAt().toMillis() - luxon_1.DateTime.local().toMillis()); + } + toString() { + return this.toJSON().join(" "); + } + toJSON() { + return constants_1.TIME_UNITS.map((unit) => { + return this._wcOrAll(unit); + }); + } + getNextDateFrom(start, timeZone) { + var _a; + if (start instanceof Date) { + start = luxon_1.DateTime.fromJSDate(start); + } + let date = start; + const firstDate = start.toMillis(); + if (timeZone) { + date = date.setZone(timeZone); + } + if (!this.realDate) { + if (date.millisecond > 0) { + date = date.set({ millisecond: 0, second: date.second + 1 }); + } + } + if (!date.isValid) { + throw new errors_1.CronError("ERROR: You specified an invalid date."); + } + const maxMatch = luxon_1.DateTime.now().plus({ years: 8 }); + while (true) { + const diff = date.toMillis() - start.toMillis(); + if (date > maxMatch) { + throw new errors_1.CronError(`Something went wrong. No execution date was found in the next 8 years. + Please provide the following string if you would like to help debug: + Time Zone: ${(_a = timeZone === null || timeZone === void 0 ? void 0 : timeZone.toString()) !== null && _a !== void 0 ? _a : '""'} - Cron String: ${this.source.toString()} - UTC offset: ${date.offset} - current Date: ${luxon_1.DateTime.local().toString()}`); + } + if (!(date.month in this.month) && Object.keys(this.month).length !== 12) { + date = date.plus({ months: 1 }); + date = date.set({ day: 1, hour: 0, minute: 0, second: 0 }); + if (this._forwardDSTJump(0, 0, date)) { + const [isDone, newDate] = this._findPreviousDSTJump(date); + date = newDate; + if (isDone) + break; + } + continue; + } + if (!(date.day in this.dayOfMonth) && Object.keys(this.dayOfMonth).length !== 31 && !(this._getWeekDay(date) in this.dayOfWeek && Object.keys(this.dayOfWeek).length !== 7)) { + date = date.plus({ days: 1 }); + date = date.set({ hour: 0, minute: 0, second: 0 }); + if (this._forwardDSTJump(0, 0, date)) { + const [isDone, newDate] = this._findPreviousDSTJump(date); + date = newDate; + if (isDone) + break; + } + continue; + } + if (!(this._getWeekDay(date) in this.dayOfWeek) && Object.keys(this.dayOfWeek).length !== 7 && !(date.day in this.dayOfMonth && Object.keys(this.dayOfMonth).length !== 31)) { + date = date.plus({ days: 1 }); + date = date.set({ hour: 0, minute: 0, second: 0 }); + if (this._forwardDSTJump(0, 0, date)) { + const [isDone, newDate] = this._findPreviousDSTJump(date); + date = newDate; + if (isDone) + break; + } + continue; + } + if (!(date.hour in this.hour) && Object.keys(this.hour).length !== 24) { + const expectedHour = date.hour === 23 && diff > 864e5 ? 0 : date.hour + 1; + const expectedMinute = date.minute; + date = date.set({ hour: expectedHour }); + date = date.set({ minute: 0, second: 0 }); + if (this._forwardDSTJump(expectedHour, expectedMinute, date)) { + const [isDone, newDate] = this._findPreviousDSTJump(date); + date = newDate; + if (isDone) + break; + } + continue; + } + if (!(date.minute in this.minute) && Object.keys(this.minute).length !== 60) { + const expectedMinute = date.minute === 59 && diff > 36e5 ? 0 : date.minute + 1; + const expectedHour = date.hour + (expectedMinute === 60 ? 1 : 0); + date = date.set({ minute: expectedMinute }); + date = date.set({ second: 0 }); + if (this._forwardDSTJump(expectedHour, expectedMinute, date)) { + const [isDone, newDate] = this._findPreviousDSTJump(date); + date = newDate; + if (isDone) + break; + } + continue; + } + if (!(date.second in this.second) && Object.keys(this.second).length !== 60) { + const expectedSecond = date.second === 59 && diff > 6e4 ? 0 : date.second + 1; + const expectedMinute = date.minute + (expectedSecond === 60 ? 1 : 0); + const expectedHour = date.hour + (expectedMinute === 60 ? 1 : 0); + date = date.set({ second: expectedSecond }); + if (this._forwardDSTJump(expectedHour, expectedMinute, date)) { + const [isDone, newDate] = this._findPreviousDSTJump(date); + date = newDate; + if (isDone) + break; + } + continue; + } + if (date.toMillis() === firstDate) { + const expectedSecond = date.second + 1; + const expectedMinute = date.minute + (expectedSecond === 60 ? 1 : 0); + const expectedHour = date.hour + (expectedMinute === 60 ? 1 : 0); + date = date.set({ second: expectedSecond }); + if (this._forwardDSTJump(expectedHour, expectedMinute, date)) { + const [isDone, newDate] = this._findPreviousDSTJump(date); + date = newDate; + if (isDone) + break; + } + continue; + } + break; + } + return date; + } + _findPreviousDSTJump(date) { + var _a; + let expectedMinute, expectedHour, actualMinute, actualHour; + let maybeJumpingPoint = date; + const iterationLimit = 60 * 24; + let iteration = 0; + do { + if (++iteration > iterationLimit) { + throw new errors_1.CronError(`ERROR: This DST checking related function assumes the input DateTime (${(_a = date.toISO()) !== null && _a !== void 0 ? _a : date.toMillis()}) is within 24 hours of a DST jump.`); + } + expectedMinute = maybeJumpingPoint.minute - 1; + expectedHour = maybeJumpingPoint.hour; + if (expectedMinute < 0) { + expectedMinute += 60; + expectedHour = (expectedHour + 24 - 1) % 24; + } + maybeJumpingPoint = maybeJumpingPoint.minus({ minute: 1 }); + actualMinute = maybeJumpingPoint.minute; + actualHour = maybeJumpingPoint.hour; + } while (expectedMinute === actualMinute && expectedHour === actualHour); + const afterJumpingPoint = maybeJumpingPoint.plus({ minute: 1 }).set({ second: 0, millisecond: 0 }); + const beforeJumpingPoint = afterJumpingPoint.minus({ second: 1 }); + if (date.month + 1 in this.month && date.day in this.dayOfMonth && this._getWeekDay(date) in this.dayOfWeek) { + return [ + this._checkTimeInSkippedRange(beforeJumpingPoint, afterJumpingPoint), + afterJumpingPoint + ]; + } + return [false, afterJumpingPoint]; + } + _checkTimeInSkippedRange(beforeJumpingPoint, afterJumpingPoint) { + const startingMinute = (beforeJumpingPoint.minute + 1) % 60; + const startingHour = (beforeJumpingPoint.hour + (startingMinute === 0 ? 1 : 0)) % 24; + const hourRangeSize = afterJumpingPoint.hour - startingHour + 1; + const isHourJump = startingMinute === 0 && afterJumpingPoint.minute === 0; + if (hourRangeSize === 2 && isHourJump) { + return startingHour in this.hour; + } else if (hourRangeSize === 1) { + return startingHour in this.hour && this._checkTimeInSkippedRangeSingleHour(startingMinute, afterJumpingPoint.minute); + } else { + return this._checkTimeInSkippedRangeMultiHour(startingHour, startingMinute, afterJumpingPoint.hour, afterJumpingPoint.minute); + } + } + _checkTimeInSkippedRangeSingleHour(startMinute, endMinute) { + for (let minute = startMinute; minute < endMinute; ++minute) { + if (minute in this.minute) + return true; + } + return endMinute in this.minute && 0 in this.second; + } + _checkTimeInSkippedRangeMultiHour(startHour, startMinute, endHour, endMinute) { + if (startHour >= endHour) { + throw new errors_1.CronError(`ERROR: This DST checking related function assumes the forward jump starting hour (${startHour}) is less than the end hour (${endHour})`); + } + const firstHourMinuteRange = Array.from({ length: 60 - startMinute }, (_2, k) => startMinute + k); + const lastHourMinuteRange = Array.from({ length: endMinute }, (_2, k) => k); + const middleHourMinuteRange = Array.from({ length: 60 }, (_2, k) => k); + const selectRange = (forHour) => { + if (forHour === startHour) { + return firstHourMinuteRange; + } else if (forHour === endHour) { + return lastHourMinuteRange; + } else { + return middleHourMinuteRange; + } + }; + for (let hour = startHour; hour <= endHour; ++hour) { + if (!(hour in this.hour)) + continue; + const usingRange = selectRange(hour); + for (const minute of usingRange) { + if (minute in this.minute) + return true; + } + } + return endHour in this.hour && endMinute in this.minute && 0 in this.second; + } + _forwardDSTJump(expectedHour, expectedMinute, actualDate) { + const actualHour = actualDate.hour; + const actualMinute = actualDate.minute; + const didHoursJumped = expectedHour % 24 < actualHour; + const didMinutesJumped = expectedMinute % 60 < actualMinute; + return didHoursJumped || didMinutesJumped; + } + _wcOrAll(unit) { + if (this._hasAll(unit)) { + return "*"; + } + const all = []; + for (const time in this[unit]) { + all.push(time); + } + return all.join(","); + } + _hasAll(unit) { + const constraints = constants_1.CONSTRAINTS[unit]; + const low = constraints[0]; + const high = unit === constants_1.TIME_UNITS_MAP.DAY_OF_WEEK ? constraints[1] - 1 : constraints[1]; + for (let i = low, n = high; i < n; i++) { + if (!(i in this[unit])) { + return false; + } + } + return true; + } + _parse(source) { + var _a; + source = source.toLowerCase(); + if (Object.keys(constants_1.PRESETS).includes(source)) { + source = constants_1.PRESETS[source]; + } + source = source.replace(/[a-z]{1,3}/gi, (alias) => { + if (Object.keys(constants_1.ALIASES).includes(alias)) { + return constants_1.ALIASES[alias].toString(); + } + throw new errors_1.CronError(`Unknown alias: ${alias}`); + }); + const units = source.trim().split(/\s+/); + if (units.length < constants_1.TIME_UNITS_LEN - 1) { + throw new errors_1.CronError("Too few fields"); + } + if (units.length > constants_1.TIME_UNITS_LEN) { + throw new errors_1.CronError("Too many fields"); + } + const unitsLen = units.length; + for (const unit of constants_1.TIME_UNITS) { + const i = constants_1.TIME_UNITS.indexOf(unit); + const cur = (_a = units[i - (constants_1.TIME_UNITS_LEN - unitsLen)]) !== null && _a !== void 0 ? _a : constants_1.PARSE_DEFAULTS[unit]; + this._parseField(cur, unit); + } + } + _parseField(value, unit) { + const typeObj = this[unit]; + let pointer; + const constraints = constants_1.CONSTRAINTS[unit]; + const low = constraints[0]; + const high = constraints[1]; + const fields = value.split(","); + fields.forEach((field) => { + const wildcardIndex = field.indexOf("*"); + if (wildcardIndex !== -1 && wildcardIndex !== 0) { + throw new errors_1.CronError(`Field (${field}) has an invalid wildcard expression`); + } + }); + value = value.replace(constants_1.RE_WILDCARDS, `${low}-${high}`); + const allRanges = value.split(","); + for (const range of allRanges) { + const match = [...range.matchAll(constants_1.RE_RANGE)][0]; + if ((match === null || match === void 0 ? void 0 : match[1]) !== void 0) { + const [, mLower, mUpper, mStep] = match; + let lower = parseInt(mLower, 10); + let upper = mUpper !== void 0 ? parseInt(mUpper, 10) : void 0; + const wasStepDefined = mStep !== void 0; + const step = parseInt(mStep !== null && mStep !== void 0 ? mStep : "1", 10); + if (step === 0) { + throw new errors_1.CronError(`Field (${unit}) has a step of zero`); + } + if (upper !== void 0 && lower > upper) { + throw new errors_1.CronError(`Field (${unit}) has an invalid range`); + } + const isOutOfRange = lower < low || upper !== void 0 && upper > high || upper === void 0 && lower > high; + if (isOutOfRange) { + throw new errors_1.CronError(`Field value (${value}) is out of range`); + } + lower = Math.min(Math.max(low, ~~Math.abs(lower)), high); + if (upper !== void 0) { + upper = Math.min(high, ~~Math.abs(upper)); + } else { + upper = wasStepDefined ? high : lower; + } + pointer = lower; + do { + typeObj[pointer] = true; + pointer += step; + } while (pointer <= upper); + if (unit === "dayOfWeek") { + if (!typeObj[0] && !!typeObj[7]) + typeObj[0] = typeObj[7]; + delete typeObj[7]; + } + } else { + throw new errors_1.CronError(`Field (${unit}) cannot be parsed`); + } + } + } + }; + exports2.CronTime = CronTime; + } +}); + +// ../../node_modules/.pnpm/cron@3.2.1/node_modules/cron/dist/job.js +var require_job2 = __commonJS({ + "../../node_modules/.pnpm/cron@3.2.1/node_modules/cron/dist/job.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CronJob = void 0; + var child_process_1 = require("child_process"); + var errors_1 = require_errors6(); + var time_1 = require_time(); + var CronJob = class _CronJob { + constructor(cronTime, onTick, onComplete, start, timeZone, context, runOnInit, utcOffset, unrefTimeout) { + this.running = false; + this.unrefTimeout = false; + this.lastExecution = null; + this.runOnce = false; + this._callbacks = []; + this.context = context !== null && context !== void 0 ? context : this; + if (timeZone != null && utcOffset != null) { + throw new errors_1.ExclusiveParametersError("timeZone", "utcOffset"); + } + if (timeZone != null) { + this.cronTime = new time_1.CronTime(cronTime, timeZone, null); + } else if (utcOffset != null) { + this.cronTime = new time_1.CronTime(cronTime, null, utcOffset); + } else { + this.cronTime = new time_1.CronTime(cronTime, timeZone, utcOffset); + } + if (unrefTimeout != null) { + this.unrefTimeout = unrefTimeout; + } + if (onComplete != null) { + this.onComplete = this._fnWrap(onComplete); + } + if (this.cronTime.realDate) { + this.runOnce = true; + } + this.addCallback(this._fnWrap(onTick)); + if (runOnInit) { + this.lastExecution = /* @__PURE__ */ new Date(); + this.fireOnTick(); + } + if (start) + this.start(); + } + static from(params) { + if (params.timeZone != null && params.utcOffset != null) { + throw new errors_1.ExclusiveParametersError("timeZone", "utcOffset"); + } + if (params.timeZone != null) { + return new _CronJob(params.cronTime, params.onTick, params.onComplete, params.start, params.timeZone, params.context, params.runOnInit, params.utcOffset, params.unrefTimeout); + } else if (params.utcOffset != null) { + return new _CronJob(params.cronTime, params.onTick, params.onComplete, params.start, null, params.context, params.runOnInit, params.utcOffset, params.unrefTimeout); + } else { + return new _CronJob(params.cronTime, params.onTick, params.onComplete, params.start, params.timeZone, params.context, params.runOnInit, params.utcOffset, params.unrefTimeout); + } + } + _fnWrap(cmd) { + var _a, _b; + switch (typeof cmd) { + case "function": { + return cmd; + } + case "string": { + const [command, ...args] = cmd.split(" "); + return child_process_1.spawn.bind(void 0, command !== null && command !== void 0 ? command : cmd, args, {}); + } + case "object": { + return child_process_1.spawn.bind(void 0, cmd.command, (_a = cmd.args) !== null && _a !== void 0 ? _a : [], (_b = cmd.options) !== null && _b !== void 0 ? _b : {}); + } + } + } + addCallback(callback) { + if (typeof callback === "function") { + this._callbacks.push(callback); + } + } + setTime(time) { + if (!(time instanceof time_1.CronTime)) { + throw new errors_1.CronError("time must be an instance of CronTime."); + } + const wasRunning = this.running; + this.stop(); + this.cronTime = time; + if (time.realDate) + this.runOnce = true; + if (wasRunning) + this.start(); + } + nextDate() { + return this.cronTime.sendAt(); + } + fireOnTick() { + for (const callback of this._callbacks) { + void callback.call(this.context, this.onComplete); + } + } + nextDates(i) { + return this.cronTime.sendAt(i !== null && i !== void 0 ? i : 0); + } + start() { + if (this.running) { + return; + } + const MAXDELAY = 2147483647; + let timeout = this.cronTime.getTimeout(); + let remaining = 0; + let startTime; + const setCronTimeout = (t) => { + startTime = Date.now(); + this._timeout = setTimeout(callbackWrapper, t); + if (this.unrefTimeout && typeof this._timeout.unref === "function") { + this._timeout.unref(); + } + }; + const callbackWrapper = () => { + const diff = startTime + timeout - Date.now(); + if (diff > 0) { + let newTimeout = this.cronTime.getTimeout(); + if (newTimeout > diff) { + newTimeout = diff; + } + remaining += newTimeout; + } + if (remaining) { + if (remaining > MAXDELAY) { + remaining -= MAXDELAY; + timeout = MAXDELAY; + } else { + timeout = remaining; + remaining = 0; + } + setCronTimeout(timeout); + } else { + this.lastExecution = /* @__PURE__ */ new Date(); + this.running = false; + if (!this.runOnce) { + this.start(); + } + this.fireOnTick(); + } + }; + if (timeout >= 0) { + this.running = true; + if (timeout > MAXDELAY) { + remaining = timeout - MAXDELAY; + timeout = MAXDELAY; + } + setCronTimeout(timeout); + } else { + this.stop(); + } + } + lastDate() { + return this.lastExecution; + } + stop() { + if (this._timeout) + clearTimeout(this._timeout); + this.running = false; + if (typeof this.onComplete === "function") { + void this.onComplete.call(this.context); + } + } + }; + exports2.CronJob = CronJob; + } +}); + +// ../../node_modules/.pnpm/cron@3.2.1/node_modules/cron/dist/index.js +var require_dist7 = __commonJS({ + "../../node_modules/.pnpm/cron@3.2.1/node_modules/cron/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.timeout = exports2.sendAt = exports2.CronTime = exports2.CronJob = void 0; + var time_1 = require_time(); + var job_1 = require_job2(); + Object.defineProperty(exports2, "CronJob", { enumerable: true, get: function() { + return job_1.CronJob; + } }); + var time_2 = require_time(); + Object.defineProperty(exports2, "CronTime", { enumerable: true, get: function() { + return time_2.CronTime; + } }); + var sendAt = (cronTime) => new time_1.CronTime(cronTime).sendAt(); + exports2.sendAt = sendAt; + var timeout = (cronTime) => new time_1.CronTime(cronTime).getTimeout(); + exports2.timeout = timeout; + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/max.js +var require_max4 = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/max.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = "ffffffff-ffff-ffff-ffff-ffffffffffff"; + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/nil.js +var require_nil = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/nil.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = "00000000-0000-0000-0000-000000000000"; + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/regex.js +var require_regex = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/regex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i; + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/validate.js +var require_validate = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/validate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var regex_js_1 = require_regex(); + function validate2(uuid) { + return typeof uuid === "string" && regex_js_1.default.test(uuid); + } + exports2.default = validate2; + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/parse.js +var require_parse4 = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/parse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var validate_js_1 = require_validate(); + function parse2(uuid) { + if (!(0, validate_js_1.default)(uuid)) { + throw TypeError("Invalid UUID"); + } + let v; + return Uint8Array.of((v = parseInt(uuid.slice(0, 8), 16)) >>> 24, v >>> 16 & 255, v >>> 8 & 255, v & 255, (v = parseInt(uuid.slice(9, 13), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(14, 18), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(19, 23), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255, v / 4294967296 & 255, v >>> 24 & 255, v >>> 16 & 255, v >>> 8 & 255, v & 255); + } + exports2.default = parse2; + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/stringify.js +var require_stringify2 = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/stringify.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.unsafeStringify = unsafeStringify; + var validate_js_1 = require_validate(); + var byteToHex2 = []; + for (let i = 0; i < 256; ++i) { + byteToHex2.push((i + 256).toString(16).slice(1)); + } + function unsafeStringify(arr, offset = 0) { + return (byteToHex2[arr[offset + 0]] + byteToHex2[arr[offset + 1]] + byteToHex2[arr[offset + 2]] + byteToHex2[arr[offset + 3]] + "-" + byteToHex2[arr[offset + 4]] + byteToHex2[arr[offset + 5]] + "-" + byteToHex2[arr[offset + 6]] + byteToHex2[arr[offset + 7]] + "-" + byteToHex2[arr[offset + 8]] + byteToHex2[arr[offset + 9]] + "-" + byteToHex2[arr[offset + 10]] + byteToHex2[arr[offset + 11]] + byteToHex2[arr[offset + 12]] + byteToHex2[arr[offset + 13]] + byteToHex2[arr[offset + 14]] + byteToHex2[arr[offset + 15]]).toLowerCase(); + } + function stringify2(arr, offset = 0) { + const uuid = unsafeStringify(arr, offset); + if (!(0, validate_js_1.default)(uuid)) { + throw TypeError("Stringified UUID is invalid"); + } + return uuid; + } + exports2.default = stringify2; + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/rng.js +var require_rng = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/rng.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = rng2; + var crypto_1 = require("crypto"); + var rnds8Pool2 = new Uint8Array(256); + var poolPtr2 = rnds8Pool2.length; + function rng2() { + if (poolPtr2 > rnds8Pool2.length - 16) { + (0, crypto_1.randomFillSync)(rnds8Pool2); + poolPtr2 = 0; + } + return rnds8Pool2.slice(poolPtr2, poolPtr2 += 16); + } + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v1.js +var require_v1 = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.updateV1State = updateV1State; + var rng_js_1 = require_rng(); + var stringify_js_1 = require_stringify2(); + var _state = {}; + function v12(options, buf, offset) { + let bytes; + const isV6 = options?._v6 ?? false; + if (options) { + const optionsKeys = Object.keys(options); + if (optionsKeys.length === 1 && optionsKeys[0] === "_v6") { + options = void 0; + } + } + if (options) { + bytes = v1Bytes(options.random ?? options.rng?.() ?? (0, rng_js_1.default)(), options.msecs, options.nsecs, options.clockseq, options.node, buf, offset); + } else { + const now = Date.now(); + const rnds = (0, rng_js_1.default)(); + updateV1State(_state, now, rnds); + bytes = v1Bytes(rnds, _state.msecs, _state.nsecs, isV6 ? void 0 : _state.clockseq, isV6 ? void 0 : _state.node, buf, offset); + } + return buf ? bytes : (0, stringify_js_1.unsafeStringify)(bytes); + } + function updateV1State(state, now, rnds) { + state.msecs ??= -Infinity; + state.nsecs ??= 0; + if (now === state.msecs) { + state.nsecs++; + if (state.nsecs >= 1e4) { + state.node = void 0; + state.nsecs = 0; + } + } else if (now > state.msecs) { + state.nsecs = 0; + } else if (now < state.msecs) { + state.node = void 0; + } + if (!state.node) { + state.node = rnds.slice(10, 16); + state.node[0] |= 1; + state.clockseq = (rnds[8] << 8 | rnds[9]) & 16383; + } + state.msecs = now; + return state; + } + function v1Bytes(rnds, msecs, nsecs, clockseq, node, buf, offset = 0) { + if (!buf) { + buf = new Uint8Array(16); + offset = 0; + } + msecs ??= Date.now(); + nsecs ??= 0; + clockseq ??= (rnds[8] << 8 | rnds[9]) & 16383; + node ??= rnds.slice(10, 16); + msecs += 122192928e5; + const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; + buf[offset++] = tl >>> 24 & 255; + buf[offset++] = tl >>> 16 & 255; + buf[offset++] = tl >>> 8 & 255; + buf[offset++] = tl & 255; + const tmh = msecs / 4294967296 * 1e4 & 268435455; + buf[offset++] = tmh >>> 8 & 255; + buf[offset++] = tmh & 255; + buf[offset++] = tmh >>> 24 & 15 | 16; + buf[offset++] = tmh >>> 16 & 255; + buf[offset++] = clockseq >>> 8 | 128; + buf[offset++] = clockseq & 255; + for (let n = 0; n < 6; ++n) { + buf[offset++] = node[n]; + } + return buf; + } + exports2.default = v12; + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v1ToV6.js +var require_v1ToV6 = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v1ToV6.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = v1ToV6; + var parse_js_1 = require_parse4(); + var stringify_js_1 = require_stringify2(); + function v1ToV6(uuid) { + const v1Bytes = typeof uuid === "string" ? (0, parse_js_1.default)(uuid) : uuid; + const v6Bytes = _v1ToV6(v1Bytes); + return typeof uuid === "string" ? (0, stringify_js_1.unsafeStringify)(v6Bytes) : v6Bytes; + } + function _v1ToV6(v1Bytes) { + return Uint8Array.of((v1Bytes[6] & 15) << 4 | v1Bytes[7] >> 4 & 15, (v1Bytes[7] & 15) << 4 | (v1Bytes[4] & 240) >> 4, (v1Bytes[4] & 15) << 4 | (v1Bytes[5] & 240) >> 4, (v1Bytes[5] & 15) << 4 | (v1Bytes[0] & 240) >> 4, (v1Bytes[0] & 15) << 4 | (v1Bytes[1] & 240) >> 4, (v1Bytes[1] & 15) << 4 | (v1Bytes[2] & 240) >> 4, 96 | v1Bytes[2] & 15, v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]); + } + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/md5.js +var require_md5 = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/md5.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var crypto_1 = require("crypto"); + function md52(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return (0, crypto_1.createHash)("md5").update(bytes).digest(); + } + exports2.default = md52; + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v35.js +var require_v35 = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v35.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.URL = exports2.DNS = void 0; + exports2.stringToBytes = stringToBytes2; + exports2.default = v35; + var parse_js_1 = require_parse4(); + var stringify_js_1 = require_stringify2(); + function stringToBytes2(str) { + str = unescape(encodeURIComponent(str)); + const bytes = new Uint8Array(str.length); + for (let i = 0; i < str.length; ++i) { + bytes[i] = str.charCodeAt(i); + } + return bytes; + } + exports2.DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; + exports2.URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; + function v35(version2, hash, value, namespace, buf, offset) { + const valueBytes = typeof value === "string" ? stringToBytes2(value) : value; + const namespaceBytes = typeof namespace === "string" ? (0, parse_js_1.default)(namespace) : namespace; + if (typeof namespace === "string") { + namespace = (0, parse_js_1.default)(namespace); + } + if (namespace?.length !== 16) { + throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); + } + let bytes = new Uint8Array(16 + valueBytes.length); + bytes.set(namespaceBytes); + bytes.set(valueBytes, namespaceBytes.length); + bytes = hash(bytes); + bytes[6] = bytes[6] & 15 | version2; + bytes[8] = bytes[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + return buf; + } + return (0, stringify_js_1.unsafeStringify)(bytes); + } + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v3.js +var require_v3 = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v3.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.URL = exports2.DNS = void 0; + var md5_js_1 = require_md5(); + var v35_js_1 = require_v35(); + var v35_js_2 = require_v35(); + Object.defineProperty(exports2, "DNS", { enumerable: true, get: function() { + return v35_js_2.DNS; + } }); + Object.defineProperty(exports2, "URL", { enumerable: true, get: function() { + return v35_js_2.URL; + } }); + function v32(value, namespace, buf, offset) { + return (0, v35_js_1.default)(48, md5_js_1.default, value, namespace, buf, offset); + } + v32.DNS = v35_js_1.DNS; + v32.URL = v35_js_1.URL; + exports2.default = v32; + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/native.js +var require_native = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/native.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var crypto_1 = require("crypto"); + exports2.default = { randomUUID: crypto_1.randomUUID }; + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v4.js +var require_v4 = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v4.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var native_js_1 = require_native(); + var rng_js_1 = require_rng(); + var stringify_js_1 = require_stringify2(); + function v42(options, buf, offset) { + if (native_js_1.default.randomUUID && !buf && !options) { + return native_js_1.default.randomUUID(); + } + options = options || {}; + const rnds = options.random || (options.rng || rng_js_1.default)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + return buf; + } + return (0, stringify_js_1.unsafeStringify)(rnds); + } + exports2.default = v42; + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/sha1.js +var require_sha1 = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/sha1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var crypto_1 = require("crypto"); + function sha12(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return (0, crypto_1.createHash)("sha1").update(bytes).digest(); + } + exports2.default = sha12; + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v5.js +var require_v5 = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v5.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.URL = exports2.DNS = void 0; + var sha1_js_1 = require_sha1(); + var v35_js_1 = require_v35(); + var v35_js_2 = require_v35(); + Object.defineProperty(exports2, "DNS", { enumerable: true, get: function() { + return v35_js_2.DNS; + } }); + Object.defineProperty(exports2, "URL", { enumerable: true, get: function() { + return v35_js_2.URL; + } }); + function v52(value, namespace, buf, offset) { + return (0, v35_js_1.default)(80, sha1_js_1.default, value, namespace, buf, offset); + } + v52.DNS = v35_js_1.DNS; + v52.URL = v35_js_1.URL; + exports2.default = v52; + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v6.js +var require_v6 = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v6.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var stringify_js_1 = require_stringify2(); + var v1_js_1 = require_v1(); + var v1ToV6_js_1 = require_v1ToV6(); + function v6(options, buf, offset) { + options ??= {}; + offset ??= 0; + let bytes = (0, v1_js_1.default)({ ...options, _v6: true }, new Uint8Array(16)); + bytes = (0, v1ToV6_js_1.default)(bytes); + if (buf) { + for (let i = 0; i < 16; i++) { + buf[offset + i] = bytes[i]; + } + return buf; + } + return (0, stringify_js_1.unsafeStringify)(bytes); + } + exports2.default = v6; + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v6ToV1.js +var require_v6ToV1 = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v6ToV1.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = v6ToV1; + var parse_js_1 = require_parse4(); + var stringify_js_1 = require_stringify2(); + function v6ToV1(uuid) { + const v6Bytes = typeof uuid === "string" ? (0, parse_js_1.default)(uuid) : uuid; + const v1Bytes = _v6ToV1(v6Bytes); + return typeof uuid === "string" ? (0, stringify_js_1.unsafeStringify)(v1Bytes) : v1Bytes; + } + function _v6ToV1(v6Bytes) { + return Uint8Array.of((v6Bytes[3] & 15) << 4 | v6Bytes[4] >> 4 & 15, (v6Bytes[4] & 15) << 4 | (v6Bytes[5] & 240) >> 4, (v6Bytes[5] & 15) << 4 | v6Bytes[6] & 15, v6Bytes[7], (v6Bytes[1] & 15) << 4 | (v6Bytes[2] & 240) >> 4, (v6Bytes[2] & 15) << 4 | (v6Bytes[3] & 240) >> 4, 16 | (v6Bytes[0] & 240) >> 4, (v6Bytes[0] & 15) << 4 | (v6Bytes[1] & 240) >> 4, v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]); + } + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v7.js +var require_v7 = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/v7.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.updateV7State = updateV7State; + var rng_js_1 = require_rng(); + var stringify_js_1 = require_stringify2(); + var _state = {}; + function v7(options, buf, offset) { + let bytes; + if (options) { + bytes = v7Bytes(options.random ?? options.rng?.() ?? (0, rng_js_1.default)(), options.msecs, options.seq, buf, offset); + } else { + const now = Date.now(); + const rnds = (0, rng_js_1.default)(); + updateV7State(_state, now, rnds); + bytes = v7Bytes(rnds, _state.msecs, _state.seq, buf, offset); + } + return buf ? bytes : (0, stringify_js_1.unsafeStringify)(bytes); + } + function updateV7State(state, now, rnds) { + state.msecs ??= -Infinity; + state.seq ??= 0; + if (now > state.msecs) { + state.seq = rnds[6] << 23 | rnds[7] << 16 | rnds[8] << 8 | rnds[9]; + state.msecs = now; + } else { + state.seq = state.seq + 1 | 0; + if (state.seq === 0) { + state.msecs++; + } + } + return state; + } + function v7Bytes(rnds, msecs, seq, buf, offset = 0) { + if (!buf) { + buf = new Uint8Array(16); + offset = 0; + } + msecs ??= Date.now(); + seq ??= rnds[6] * 127 << 24 | rnds[7] << 16 | rnds[8] << 8 | rnds[9]; + buf[offset++] = msecs / 1099511627776 & 255; + buf[offset++] = msecs / 4294967296 & 255; + buf[offset++] = msecs / 16777216 & 255; + buf[offset++] = msecs / 65536 & 255; + buf[offset++] = msecs / 256 & 255; + buf[offset++] = msecs & 255; + buf[offset++] = 112 | seq >>> 28 & 15; + buf[offset++] = seq >>> 20 & 255; + buf[offset++] = 128 | seq >>> 14 & 63; + buf[offset++] = seq >>> 6 & 255; + buf[offset++] = seq << 2 & 255 | rnds[10] & 3; + buf[offset++] = rnds[11]; + buf[offset++] = rnds[12]; + buf[offset++] = rnds[13]; + buf[offset++] = rnds[14]; + buf[offset++] = rnds[15]; + return buf; + } + exports2.default = v7; + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/version.js +var require_version2 = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/version.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var validate_js_1 = require_validate(); + function version2(uuid) { + if (!(0, validate_js_1.default)(uuid)) { + throw TypeError("Invalid UUID"); + } + return parseInt(uuid.slice(14, 15), 16); + } + exports2.default = version2; + } +}); + +// ../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/index.js +var require_cjs5 = __commonJS({ + "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/cjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.version = exports2.validate = exports2.v7 = exports2.v6ToV1 = exports2.v6 = exports2.v5 = exports2.v4 = exports2.v3 = exports2.v1ToV6 = exports2.v1 = exports2.stringify = exports2.parse = exports2.NIL = exports2.MAX = void 0; + var max_js_1 = require_max4(); + Object.defineProperty(exports2, "MAX", { enumerable: true, get: function() { + return max_js_1.default; + } }); + var nil_js_1 = require_nil(); + Object.defineProperty(exports2, "NIL", { enumerable: true, get: function() { + return nil_js_1.default; + } }); + var parse_js_1 = require_parse4(); + Object.defineProperty(exports2, "parse", { enumerable: true, get: function() { + return parse_js_1.default; + } }); + var stringify_js_1 = require_stringify2(); + Object.defineProperty(exports2, "stringify", { enumerable: true, get: function() { + return stringify_js_1.default; + } }); + var v1_js_1 = require_v1(); + Object.defineProperty(exports2, "v1", { enumerable: true, get: function() { + return v1_js_1.default; + } }); + var v1ToV6_js_1 = require_v1ToV6(); + Object.defineProperty(exports2, "v1ToV6", { enumerable: true, get: function() { + return v1ToV6_js_1.default; + } }); + var v3_js_1 = require_v3(); + Object.defineProperty(exports2, "v3", { enumerable: true, get: function() { + return v3_js_1.default; + } }); + var v4_js_1 = require_v4(); + Object.defineProperty(exports2, "v4", { enumerable: true, get: function() { + return v4_js_1.default; + } }); + var v5_js_1 = require_v5(); + Object.defineProperty(exports2, "v5", { enumerable: true, get: function() { + return v5_js_1.default; + } }); + var v6_js_1 = require_v6(); + Object.defineProperty(exports2, "v6", { enumerable: true, get: function() { + return v6_js_1.default; + } }); + var v6ToV1_js_1 = require_v6ToV1(); + Object.defineProperty(exports2, "v6ToV1", { enumerable: true, get: function() { + return v6ToV1_js_1.default; + } }); + var v7_js_1 = require_v7(); + Object.defineProperty(exports2, "v7", { enumerable: true, get: function() { + return v7_js_1.default; + } }); + var validate_js_1 = require_validate(); + Object.defineProperty(exports2, "validate", { enumerable: true, get: function() { + return validate_js_1.default; + } }); + var version_js_1 = require_version2(); + Object.defineProperty(exports2, "version", { enumerable: true, get: function() { + return version_js_1.default; + } }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/schedule.messages.js +var require_schedule_messages = __commonJS({ + "../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/schedule.messages.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DUPLICATE_SCHEDULER = exports2.NO_SCHEDULER_FOUND = void 0; + var NO_SCHEDULER_FOUND = (schedulerName, name) => name ? `No ${schedulerName} was found with the given name (${name}). Check that you created one with a decorator or with the create API.` : `No ${schedulerName} was found. Check your configuration.`; + exports2.NO_SCHEDULER_FOUND = NO_SCHEDULER_FOUND; + var DUPLICATE_SCHEDULER = (schedulerName, name) => `${schedulerName} with the given name (${name}) already exists. Ignored.`; + exports2.DUPLICATE_SCHEDULER = DUPLICATE_SCHEDULER; + } +}); + +// ../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/scheduler.registry.js +var require_scheduler_registry = __commonJS({ + "../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/scheduler.registry.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var SchedulerRegistry_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SchedulerRegistry = void 0; + var common_12 = require_common(); + var schedule_messages_1 = require_schedule_messages(); + var SchedulerRegistry = SchedulerRegistry_1 = class SchedulerRegistry { + constructor() { + this.logger = new common_12.Logger(SchedulerRegistry_1.name); + this.cronJobs = /* @__PURE__ */ new Map(); + this.timeouts = /* @__PURE__ */ new Map(); + this.intervals = /* @__PURE__ */ new Map(); + } + doesExist(type, name) { + switch (type) { + case "cron": + return this.cronJobs.has(name); + case "interval": + return this.intervals.has(name); + case "timeout": + return this.timeouts.has(name); + default: + return false; + } + } + getCronJob(name) { + const ref = this.cronJobs.get(name); + if (!ref) { + throw new Error((0, schedule_messages_1.NO_SCHEDULER_FOUND)("Cron Job", name)); + } + return ref; + } + getInterval(name) { + const ref = this.intervals.get(name); + if (typeof ref === "undefined") { + throw new Error((0, schedule_messages_1.NO_SCHEDULER_FOUND)("Interval", name)); + } + return ref; + } + getTimeout(name) { + const ref = this.timeouts.get(name); + if (typeof ref === "undefined") { + throw new Error((0, schedule_messages_1.NO_SCHEDULER_FOUND)("Timeout", name)); + } + return ref; + } + addCronJob(name, job) { + const ref = this.cronJobs.get(name); + if (ref) { + throw new Error((0, schedule_messages_1.DUPLICATE_SCHEDULER)("Cron Job", name)); + } + job.fireOnTick = this.wrapFunctionInTryCatchBlocks(job.fireOnTick, job); + this.cronJobs.set(name, job); + } + addInterval(name, intervalId) { + const ref = this.intervals.get(name); + if (ref) { + throw new Error((0, schedule_messages_1.DUPLICATE_SCHEDULER)("Interval", name)); + } + this.intervals.set(name, intervalId); + } + addTimeout(name, timeoutId) { + const ref = this.timeouts.get(name); + if (ref) { + throw new Error((0, schedule_messages_1.DUPLICATE_SCHEDULER)("Timeout", name)); + } + this.timeouts.set(name, timeoutId); + } + getCronJobs() { + return this.cronJobs; + } + deleteCronJob(name) { + const cronJob = this.getCronJob(name); + cronJob.stop(); + this.cronJobs.delete(name); + } + getIntervals() { + return [...this.intervals.keys()]; + } + deleteInterval(name) { + const interval = this.getInterval(name); + clearInterval(interval); + this.intervals.delete(name); + } + getTimeouts() { + return [...this.timeouts.keys()]; + } + deleteTimeout(name) { + const timeout = this.getTimeout(name); + clearTimeout(timeout); + this.timeouts.delete(name); + } + wrapFunctionInTryCatchBlocks(methodRef, instance) { + return async (...args) => { + try { + await methodRef.call(instance, ...args); + } catch (error) { + this.logger.error(error); + } + }; + } + }; + exports2.SchedulerRegistry = SchedulerRegistry; + exports2.SchedulerRegistry = SchedulerRegistry = SchedulerRegistry_1 = __decorate2([ + (0, common_12.Injectable)() + ], SchedulerRegistry); + } +}); + +// ../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/scheduler.orchestrator.js +var require_scheduler_orchestrator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/scheduler.orchestrator.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SchedulerOrchestrator = void 0; + var common_12 = require_common(); + var cron_1 = require_dist7(); + var uuid_1 = require_cjs5(); + var scheduler_registry_1 = require_scheduler_registry(); + var SchedulerOrchestrator = class SchedulerOrchestrator { + constructor(schedulerRegistry) { + this.schedulerRegistry = schedulerRegistry; + this.cronJobs = {}; + this.timeouts = {}; + this.intervals = {}; + } + onApplicationBootstrap() { + this.mountTimeouts(); + this.mountIntervals(); + this.mountCron(); + } + onApplicationShutdown() { + this.clearTimeouts(); + this.clearIntervals(); + this.closeCronJobs(); + } + mountIntervals() { + const intervalKeys = Object.keys(this.intervals); + intervalKeys.forEach((key) => { + const options = this.intervals[key]; + const intervalRef = setInterval(options.target, options.timeout); + options.ref = intervalRef; + this.schedulerRegistry.addInterval(key, intervalRef); + }); + } + mountTimeouts() { + const timeoutKeys = Object.keys(this.timeouts); + timeoutKeys.forEach((key) => { + const options = this.timeouts[key]; + const timeoutRef = setTimeout(options.target, options.timeout); + options.ref = timeoutRef; + this.schedulerRegistry.addTimeout(key, timeoutRef); + }); + } + mountCron() { + const cronKeys = Object.keys(this.cronJobs); + cronKeys.forEach((key) => { + const { options, target } = this.cronJobs[key]; + const cronJob = cron_1.CronJob.from({ + ...options, + onTick: target, + start: !options.disabled + }); + this.cronJobs[key].ref = cronJob; + this.schedulerRegistry.addCronJob(key, cronJob); + }); + } + clearTimeouts() { + this.schedulerRegistry.getTimeouts().forEach((key) => this.schedulerRegistry.deleteTimeout(key)); + } + clearIntervals() { + this.schedulerRegistry.getIntervals().forEach((key) => this.schedulerRegistry.deleteInterval(key)); + } + closeCronJobs() { + Array.from(this.schedulerRegistry.getCronJobs().keys()).forEach((key) => this.schedulerRegistry.deleteCronJob(key)); + } + addTimeout(methodRef, timeout, name = (0, uuid_1.v4)()) { + this.timeouts[name] = { + target: methodRef, + timeout + }; + } + addInterval(methodRef, timeout, name = (0, uuid_1.v4)()) { + this.intervals[name] = { + target: methodRef, + timeout + }; + } + addCron(methodRef, options) { + const name = options.name || (0, uuid_1.v4)(); + this.cronJobs[name] = { + target: methodRef, + options + }; + } + }; + exports2.SchedulerOrchestrator = SchedulerOrchestrator; + exports2.SchedulerOrchestrator = SchedulerOrchestrator = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", [scheduler_registry_1.SchedulerRegistry]) + ], SchedulerOrchestrator); + } +}); + +// ../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/schedule.explorer.js +var require_schedule_explorer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/schedule.explorer.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ScheduleExplorer = void 0; + var common_12 = require_common(); + var core_12 = require_core3(); + var scheduler_type_enum_1 = require_scheduler_type_enum(); + var schedule_metadata_accessor_1 = require_schedule_metadata_accessor(); + var scheduler_orchestrator_1 = require_scheduler_orchestrator(); + var schedule_constants_1 = require_schedule_constants(); + var ScheduleExplorer = class ScheduleExplorer { + constructor(moduleOptions, schedulerOrchestrator, discoveryService, metadataAccessor, metadataScanner) { + this.moduleOptions = moduleOptions; + this.schedulerOrchestrator = schedulerOrchestrator; + this.discoveryService = discoveryService; + this.metadataAccessor = metadataAccessor; + this.metadataScanner = metadataScanner; + this.logger = new common_12.Logger("Scheduler"); + } + onModuleInit() { + this.explore(); + } + explore() { + const instanceWrappers = [ + ...this.discoveryService.getControllers(), + ...this.discoveryService.getProviders() + ]; + instanceWrappers.forEach((wrapper) => { + const { instance } = wrapper; + if (!instance || !Object.getPrototypeOf(instance)) { + return; + } + const processMethod = (name) => wrapper.isDependencyTreeStatic() ? this.lookupSchedulers(instance, name) : this.warnForNonStaticProviders(wrapper, instance, name); + if (!Reflect.has(this.metadataScanner, "getAllMethodNames")) { + this.metadataScanner.scanFromPrototype(instance, Object.getPrototypeOf(instance), processMethod); + return; + } + this.metadataScanner.getAllMethodNames(Object.getPrototypeOf(instance)).forEach(processMethod); + }); + } + lookupSchedulers(instance, key) { + const methodRef = instance[key]; + const metadata = this.metadataAccessor.getSchedulerType(methodRef); + switch (metadata) { + case scheduler_type_enum_1.SchedulerType.CRON: { + if (!this.moduleOptions.cronJobs) { + return; + } + const cronMetadata = this.metadataAccessor.getCronMetadata(methodRef); + const cronFn = this.wrapFunctionInTryCatchBlocks(methodRef, instance); + return this.schedulerOrchestrator.addCron(cronFn, cronMetadata); + } + case scheduler_type_enum_1.SchedulerType.TIMEOUT: { + if (!this.moduleOptions.timeouts) { + return; + } + const timeoutMetadata = this.metadataAccessor.getTimeoutMetadata(methodRef); + const name = this.metadataAccessor.getSchedulerName(methodRef); + const timeoutFn = this.wrapFunctionInTryCatchBlocks(methodRef, instance); + return this.schedulerOrchestrator.addTimeout(timeoutFn, timeoutMetadata.timeout, name); + } + case scheduler_type_enum_1.SchedulerType.INTERVAL: { + if (!this.moduleOptions.intervals) { + return; + } + const intervalMetadata = this.metadataAccessor.getIntervalMetadata(methodRef); + const name = this.metadataAccessor.getSchedulerName(methodRef); + const intervalFn = this.wrapFunctionInTryCatchBlocks(methodRef, instance); + return this.schedulerOrchestrator.addInterval(intervalFn, intervalMetadata.timeout, name); + } + } + } + warnForNonStaticProviders(wrapper, instance, key) { + const methodRef = instance[key]; + const metadata = this.metadataAccessor.getSchedulerType(methodRef); + switch (metadata) { + case scheduler_type_enum_1.SchedulerType.CRON: { + if (!this.moduleOptions.cronJobs) { + return; + } + this.logger.warn(`Cannot register cron job "${wrapper.name}@${key}" because it is defined in a non static provider.`); + break; + } + case scheduler_type_enum_1.SchedulerType.TIMEOUT: { + if (!this.moduleOptions.timeouts) { + return; + } + this.logger.warn(`Cannot register timeout "${wrapper.name}@${key}" because it is defined in a non static provider.`); + break; + } + case scheduler_type_enum_1.SchedulerType.INTERVAL: { + if (!this.moduleOptions.intervals) { + return; + } + this.logger.warn(`Cannot register interval "${wrapper.name}@${key}" because it is defined in a non static provider.`); + break; + } + } + } + wrapFunctionInTryCatchBlocks(methodRef, instance) { + return async (...args) => { + try { + await methodRef.call(instance, ...args); + } catch (error) { + this.logger.error(error); + } + }; + } + }; + exports2.ScheduleExplorer = ScheduleExplorer; + exports2.ScheduleExplorer = ScheduleExplorer = __decorate2([ + (0, common_12.Injectable)(), + __param2(0, (0, common_12.Inject)(schedule_constants_1.SCHEDULE_MODULE_OPTIONS)), + __metadata2("design:paramtypes", [ + Object, + scheduler_orchestrator_1.SchedulerOrchestrator, + core_12.DiscoveryService, + schedule_metadata_accessor_1.SchedulerMetadataAccessor, + core_12.MetadataScanner + ]) + ], ScheduleExplorer); + } +}); + +// ../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/schedule.module.js +var require_schedule_module = __commonJS({ + "../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/schedule.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var ScheduleModule_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ScheduleModule = void 0; + var common_12 = require_common(); + var core_12 = require_core3(); + var schedule_metadata_accessor_1 = require_schedule_metadata_accessor(); + var schedule_explorer_1 = require_schedule_explorer(); + var scheduler_orchestrator_1 = require_scheduler_orchestrator(); + var scheduler_registry_1 = require_scheduler_registry(); + var schedule_constants_1 = require_schedule_constants(); + var ScheduleModule = ScheduleModule_1 = class ScheduleModule { + static forRoot(options) { + const optionsWithDefaults = { + cronJobs: true, + intervals: true, + timeouts: true, + ...options + }; + return { + global: true, + module: ScheduleModule_1, + providers: [ + schedule_explorer_1.ScheduleExplorer, + scheduler_registry_1.SchedulerRegistry, + { + provide: schedule_constants_1.SCHEDULE_MODULE_OPTIONS, + useValue: optionsWithDefaults + } + ], + exports: [scheduler_registry_1.SchedulerRegistry] + }; + } + }; + exports2.ScheduleModule = ScheduleModule; + exports2.ScheduleModule = ScheduleModule = ScheduleModule_1 = __decorate2([ + (0, common_12.Module)({ + imports: [core_12.DiscoveryModule], + providers: [schedule_metadata_accessor_1.SchedulerMetadataAccessor, scheduler_orchestrator_1.SchedulerOrchestrator] + }) + ], ScheduleModule); + } +}); + +// ../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/index.js +var require_dist8 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/dist/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_enums4(), exports2); + __exportStar2(require_decorators7(), exports2); + __exportStar2(require_schedule_module(), exports2); + __exportStar2(require_scheduler_registry(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/index.js +var require_schedule = __commonJS({ + "../../node_modules/.pnpm/@nestjs+schedule@4.1.2_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4__y6t5hwnqwo2t64uhqci7xsp36m/node_modules/@nestjs/schedule/index.js"(exports2) { + "use strict"; + function __export2(m) { + for (var p in m) if (!exports2.hasOwnProperty(p)) exports2[p] = m[p]; + } + exports2.__esModule = true; + __export2(require_dist8()); + } +}); + +// ../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler-module-options.interface.js +var require_throttler_module_options_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler-module-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler-storage.interface.js +var require_throttler_storage_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler-storage.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ThrottlerStorage = void 0; + exports2.ThrottlerStorage = Symbol("ThrottlerStorage"); + } +}); + +// ../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler.constants.js +var require_throttler_constants = __commonJS({ + "../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler.constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.THROTTLER_SKIP = exports2.THROTTLER_OPTIONS = exports2.THROTTLER_KEY_GENERATOR = exports2.THROTTLER_TRACKER = exports2.THROTTLER_TTL = exports2.THROTTLER_LIMIT = void 0; + exports2.THROTTLER_LIMIT = "THROTTLER:LIMIT"; + exports2.THROTTLER_TTL = "THROTTLER:TTL"; + exports2.THROTTLER_TRACKER = "THROTTLER:TRACKER"; + exports2.THROTTLER_KEY_GENERATOR = "THROTTLER:KEY_GENERATOR"; + exports2.THROTTLER_OPTIONS = "THROTTLER:MODULE_OPTIONS"; + exports2.THROTTLER_SKIP = "THROTTLER:SKIP"; + } +}); + +// ../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler.service.js +var require_throttler_service = __commonJS({ + "../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler.service.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ThrottlerStorageService = void 0; + var common_12 = require_common(); + var ThrottlerStorageService = class ThrottlerStorageService { + constructor() { + this._storage = {}; + this.timeoutIds = []; + } + get storage() { + return this._storage; + } + getExpirationTime(key) { + return Math.floor((this.storage[key].expiresAt - Date.now()) / 1e3); + } + setExpirationTime(key, ttlMilliseconds) { + const timeoutId = setTimeout(() => { + this.storage[key].totalHits--; + clearTimeout(timeoutId); + this.timeoutIds = this.timeoutIds.filter((id) => id != timeoutId); + }, ttlMilliseconds); + this.timeoutIds.push(timeoutId); + } + async increment(key, ttl) { + const ttlMilliseconds = ttl; + if (!this.storage[key]) { + this.storage[key] = { totalHits: 0, expiresAt: Date.now() + ttlMilliseconds }; + } + let timeToExpire = this.getExpirationTime(key); + if (timeToExpire <= 0) { + this.storage[key].expiresAt = Date.now() + ttlMilliseconds; + timeToExpire = this.getExpirationTime(key); + } + this.storage[key].totalHits++; + this.setExpirationTime(key, ttlMilliseconds); + return { + totalHits: this.storage[key].totalHits, + timeToExpire + }; + } + onApplicationShutdown() { + this.timeoutIds.forEach(clearTimeout); + } + }; + exports2.ThrottlerStorageService = ThrottlerStorageService; + exports2.ThrottlerStorageService = ThrottlerStorageService = __decorate2([ + (0, common_12.Injectable)() + ], ThrottlerStorageService); + } +}); + +// ../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler.providers.js +var require_throttler_providers = __commonJS({ + "../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler.providers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getStorageToken = exports2.getOptionsToken = exports2.ThrottlerStorageProvider = exports2.createThrottlerProviders = void 0; + var throttler_storage_interface_1 = require_throttler_storage_interface(); + var throttler_constants_1 = require_throttler_constants(); + var throttler_service_1 = require_throttler_service(); + function createThrottlerProviders(options) { + return [ + { + provide: throttler_constants_1.THROTTLER_OPTIONS, + useValue: options + } + ]; + } + exports2.createThrottlerProviders = createThrottlerProviders; + exports2.ThrottlerStorageProvider = { + provide: throttler_storage_interface_1.ThrottlerStorage, + useFactory: (options) => { + return !Array.isArray(options) && options.storage ? options.storage : new throttler_service_1.ThrottlerStorageService(); + }, + inject: [throttler_constants_1.THROTTLER_OPTIONS] + }; + var getOptionsToken = () => throttler_constants_1.THROTTLER_OPTIONS; + exports2.getOptionsToken = getOptionsToken; + var getStorageToken = () => throttler_storage_interface_1.ThrottlerStorage; + exports2.getStorageToken = getStorageToken; + } +}); + +// ../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler.decorator.js +var require_throttler_decorator = __commonJS({ + "../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.InjectThrottlerStorage = exports2.InjectThrottlerOptions = exports2.SkipThrottle = exports2.Throttle = void 0; + var common_12 = require_common(); + var throttler_constants_1 = require_throttler_constants(); + var throttler_providers_1 = require_throttler_providers(); + function setThrottlerMetadata(target, options) { + for (const name in options) { + Reflect.defineMetadata(throttler_constants_1.THROTTLER_TTL + name, options[name].ttl, target); + Reflect.defineMetadata(throttler_constants_1.THROTTLER_LIMIT + name, options[name].limit, target); + Reflect.defineMetadata(throttler_constants_1.THROTTLER_TRACKER + name, options[name].getTracker, target); + Reflect.defineMetadata(throttler_constants_1.THROTTLER_KEY_GENERATOR + name, options[name].generateKey, target); + } + } + var Throttle = (options) => { + return (target, propertyKey, descriptor) => { + if (descriptor) { + setThrottlerMetadata(descriptor.value, options); + return descriptor; + } + setThrottlerMetadata(target, options); + return target; + }; + }; + exports2.Throttle = Throttle; + var SkipThrottle = (skip = { default: true }) => { + return (target, propertyKey, descriptor) => { + var _a; + const reflectionTarget = (_a = descriptor === null || descriptor === void 0 ? void 0 : descriptor.value) !== null && _a !== void 0 ? _a : target; + for (const key in skip) { + Reflect.defineMetadata(throttler_constants_1.THROTTLER_SKIP + key, skip[key], reflectionTarget); + } + return descriptor !== null && descriptor !== void 0 ? descriptor : target; + }; + }; + exports2.SkipThrottle = SkipThrottle; + var InjectThrottlerOptions = () => (0, common_12.Inject)((0, throttler_providers_1.getOptionsToken)()); + exports2.InjectThrottlerOptions = InjectThrottlerOptions; + var InjectThrottlerStorage = () => (0, common_12.Inject)((0, throttler_providers_1.getStorageToken)()); + exports2.InjectThrottlerStorage = InjectThrottlerStorage; + } +}); + +// ../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler.exception.js +var require_throttler_exception = __commonJS({ + "../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler.exception.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ThrottlerException = exports2.throttlerMessage = void 0; + var common_12 = require_common(); + exports2.throttlerMessage = "ThrottlerException: Too Many Requests"; + var ThrottlerException = class extends common_12.HttpException { + constructor(message) { + super(`${message || exports2.throttlerMessage}`, common_12.HttpStatus.TOO_MANY_REQUESTS); + } + }; + exports2.ThrottlerException = ThrottlerException; + } +}); + +// ../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/hash.js +var require_hash = __commonJS({ + "../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/hash.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.md5 = void 0; + var crypto5 = require("node:crypto"); + function md52(text) { + return crypto5.createHash("md5").update(text).digest("hex"); + } + exports2.md5 = md52; + } +}); + +// ../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler.guard.js +var require_throttler_guard = __commonJS({ + "../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler.guard.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ThrottlerGuard = void 0; + var common_12 = require_common(); + var core_12 = require_core3(); + var hash_1 = require_hash(); + var throttler_storage_interface_1 = require_throttler_storage_interface(); + var throttler_constants_1 = require_throttler_constants(); + var throttler_decorator_1 = require_throttler_decorator(); + var throttler_exception_1 = require_throttler_exception(); + var ThrottlerGuard = class ThrottlerGuard { + constructor(options, storageService, reflector) { + this.options = options; + this.storageService = storageService; + this.reflector = reflector; + this.headerPrefix = "X-RateLimit"; + this.errorMessage = throttler_exception_1.throttlerMessage; + } + async onModuleInit() { + var _a, _b; + var _c, _d; + this.throttlers = (Array.isArray(this.options) ? this.options : this.options.throttlers).sort((first, second) => { + if (typeof first.ttl === "function") { + return 1; + } + if (typeof second.ttl === "function") { + return 0; + } + return first.ttl - second.ttl; + }).map((opt) => { + var _a2; + return Object.assign(Object.assign({}, opt), { name: (_a2 = opt.name) !== null && _a2 !== void 0 ? _a2 : "default" }); + }); + if (Array.isArray(this.options)) { + this.commonOptions = {}; + } else { + this.commonOptions = { + skipIf: this.options.skipIf, + ignoreUserAgents: this.options.ignoreUserAgents, + getTracker: this.options.getTracker, + generateKey: this.options.generateKey + }; + } + (_a = (_c = this.commonOptions).getTracker) !== null && _a !== void 0 ? _a : _c.getTracker = this.getTracker.bind(this); + (_b = (_d = this.commonOptions).generateKey) !== null && _b !== void 0 ? _b : _d.generateKey = this.generateKey.bind(this); + } + async canActivate(context) { + const handler = context.getHandler(); + const classRef = context.getClass(); + if (await this.shouldSkip(context)) { + return true; + } + const continues = []; + for (const namedThrottler of this.throttlers) { + const skip = this.reflector.getAllAndOverride(throttler_constants_1.THROTTLER_SKIP + namedThrottler.name, [ + handler, + classRef + ]); + const skipIf = namedThrottler.skipIf || this.commonOptions.skipIf; + if (skip || (skipIf === null || skipIf === void 0 ? void 0 : skipIf(context))) { + continues.push(true); + continue; + } + const routeOrClassLimit = this.reflector.getAllAndOverride(throttler_constants_1.THROTTLER_LIMIT + namedThrottler.name, [handler, classRef]); + const routeOrClassTtl = this.reflector.getAllAndOverride(throttler_constants_1.THROTTLER_TTL + namedThrottler.name, [handler, classRef]); + const routeOrClassGetTracker = this.reflector.getAllAndOverride(throttler_constants_1.THROTTLER_TRACKER + namedThrottler.name, [handler, classRef]); + const routeOrClassGetKeyGenerator = this.reflector.getAllAndOverride(throttler_constants_1.THROTTLER_KEY_GENERATOR + namedThrottler.name, [handler, classRef]); + const limit = await this.resolveValue(context, routeOrClassLimit || namedThrottler.limit); + const ttl = await this.resolveValue(context, routeOrClassTtl || namedThrottler.ttl); + const getTracker = routeOrClassGetTracker || namedThrottler.getTracker || this.commonOptions.getTracker; + const generateKey = routeOrClassGetKeyGenerator || namedThrottler.generateKey || this.commonOptions.generateKey; + continues.push(await this.handleRequest(context, limit, ttl, namedThrottler, getTracker, generateKey)); + } + return continues.every((cont) => cont); + } + async shouldSkip(_context) { + return false; + } + async handleRequest(context, limit, ttl, throttler, getTracker, generateKey) { + var _a; + const { req, res } = this.getRequestResponse(context); + const ignoreUserAgents = (_a = throttler.ignoreUserAgents) !== null && _a !== void 0 ? _a : this.commonOptions.ignoreUserAgents; + if (Array.isArray(ignoreUserAgents)) { + for (const pattern of ignoreUserAgents) { + if (pattern.test(req.headers["user-agent"])) { + return true; + } + } + } + const tracker = await getTracker(req); + const key = generateKey(context, tracker, throttler.name); + const { totalHits, timeToExpire } = await this.storageService.increment(key, ttl); + const getThrottlerSuffix = (name) => name === "default" ? "" : `-${name}`; + if (totalHits > limit) { + res.header(`Retry-After${getThrottlerSuffix(throttler.name)}`, timeToExpire); + await this.throwThrottlingException(context, { + limit, + ttl, + key, + tracker, + totalHits, + timeToExpire + }); + } + res.header(`${this.headerPrefix}-Limit${getThrottlerSuffix(throttler.name)}`, limit); + res.header(`${this.headerPrefix}-Remaining${getThrottlerSuffix(throttler.name)}`, Math.max(0, limit - totalHits)); + res.header(`${this.headerPrefix}-Reset${getThrottlerSuffix(throttler.name)}`, timeToExpire); + return true; + } + async getTracker(req) { + return req.ip; + } + getRequestResponse(context) { + const http = context.switchToHttp(); + return { req: http.getRequest(), res: http.getResponse() }; + } + generateKey(context, suffix, name) { + const prefix = `${context.getClass().name}-${context.getHandler().name}-${name}`; + return (0, hash_1.md5)(`${prefix}-${suffix}`); + } + async throwThrottlingException(context, throttlerLimitDetail) { + throw new throttler_exception_1.ThrottlerException(await this.getErrorMessage(context, throttlerLimitDetail)); + } + async getErrorMessage(context, throttlerLimitDetail) { + if (!Array.isArray(this.options)) { + if (!this.options.errorMessage) + return this.errorMessage; + return typeof this.options.errorMessage === "function" ? this.options.errorMessage(context, throttlerLimitDetail) : this.options.errorMessage; + } + return this.errorMessage; + } + async resolveValue(context, resolvableValue) { + return typeof resolvableValue === "function" ? resolvableValue(context) : resolvableValue; + } + }; + exports2.ThrottlerGuard = ThrottlerGuard; + exports2.ThrottlerGuard = ThrottlerGuard = __decorate2([ + (0, common_12.Injectable)(), + __param2(0, (0, throttler_decorator_1.InjectThrottlerOptions)()), + __param2(1, (0, throttler_decorator_1.InjectThrottlerStorage)()), + __metadata2("design:paramtypes", [Object, Object, core_12.Reflector]) + ], ThrottlerGuard); + } +}); + +// ../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler.module.js +var require_throttler_module = __commonJS({ + "../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/throttler.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var ThrottlerModule_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ThrottlerModule = void 0; + var common_12 = require_common(); + var throttler_constants_1 = require_throttler_constants(); + var throttler_providers_1 = require_throttler_providers(); + var ThrottlerModule = ThrottlerModule_1 = class ThrottlerModule { + static forRoot(options = []) { + const providers = [...(0, throttler_providers_1.createThrottlerProviders)(options), throttler_providers_1.ThrottlerStorageProvider]; + return { + module: ThrottlerModule_1, + providers, + exports: providers + }; + } + static forRootAsync(options) { + const providers = [...this.createAsyncProviders(options), throttler_providers_1.ThrottlerStorageProvider]; + return { + module: ThrottlerModule_1, + imports: options.imports || [], + providers, + exports: providers + }; + } + static createAsyncProviders(options) { + if (options.useExisting || options.useFactory) { + return [this.createAsyncOptionsProvider(options)]; + } + return [ + this.createAsyncOptionsProvider(options), + { + provide: options.useClass, + useClass: options.useClass + } + ]; + } + static createAsyncOptionsProvider(options) { + if (options.useFactory) { + return { + provide: throttler_constants_1.THROTTLER_OPTIONS, + useFactory: options.useFactory, + inject: options.inject || [] + }; + } + return { + provide: throttler_constants_1.THROTTLER_OPTIONS, + useFactory: async (optionsFactory) => await optionsFactory.createThrottlerOptions(), + inject: [options.useExisting || options.useClass] + }; + } + }; + exports2.ThrottlerModule = ThrottlerModule; + exports2.ThrottlerModule = ThrottlerModule = ThrottlerModule_1 = __decorate2([ + (0, common_12.Global)(), + (0, common_12.Module)({}) + ], ThrottlerModule); + } +}); + +// ../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/utilities.js +var require_utilities = __commonJS({ + "../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/utilities.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.weeks = exports2.days = exports2.hours = exports2.minutes = exports2.seconds = void 0; + var seconds = (howMany) => howMany * 1e3; + exports2.seconds = seconds; + var minutes = (howMany) => 60 * howMany * (0, exports2.seconds)(1); + exports2.minutes = minutes; + var hours = (howMany) => 60 * howMany * (0, exports2.minutes)(1); + exports2.hours = hours; + var days = (howMany) => 24 * howMany * (0, exports2.hours)(1); + exports2.days = days; + var weeks = (howMany) => 7 * howMany * (0, exports2.days)(1); + exports2.weeks = weeks; + } +}); + +// ../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/index.js +var require_dist9 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+throttler@5.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_g3fvntb5tbxewxxtzhs5vyli4i/node_modules/@nestjs/throttler/dist/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getStorageToken = exports2.getOptionsToken = void 0; + __exportStar2(require_throttler_module_options_interface(), exports2); + __exportStar2(require_throttler_storage_interface(), exports2); + __exportStar2(require_throttler_decorator(), exports2); + __exportStar2(require_throttler_exception(), exports2); + __exportStar2(require_throttler_guard(), exports2); + __exportStar2(require_throttler_module(), exports2); + var throttler_providers_1 = require_throttler_providers(); + Object.defineProperty(exports2, "getOptionsToken", { enumerable: true, get: function() { + return throttler_providers_1.getOptionsToken; + } }); + Object.defineProperty(exports2, "getStorageToken", { enumerable: true, get: function() { + return throttler_providers_1.getStorageToken; + } }); + __exportStar2(require_throttler_service(), exports2); + __exportStar2(require_utilities(), exports2); + } +}); + +// dist/src/config/env.validation.js +var require_env_validation = __commonJS({ + "dist/src/config/env.validation.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.EnvironmentVariables = void 0; + exports2.validateEnv = validateEnv; + var class_transformer_1 = require_cjs2(); + var class_validator_1 = require_cjs(); + var Environment; + (function(Environment2) { + Environment2["Development"] = "development"; + Environment2["Production"] = "production"; + Environment2["Test"] = "test"; + })(Environment || (Environment = {})); + var EnvironmentVariables = class { + constructor() { + this.NODE_ENV = Environment.Development; + this.PORT = 3e3; + this.REDIS_HOST = "localhost"; + this.REDIS_PORT = 6379; + this.JWT_USER_EXPIRES_IN = "7d"; + this.JWT_ADMIN_ACCESS_EXPIRES_IN = "1h"; + this.JWT_ADMIN_REFRESH_EXPIRES_IN = "7d"; + this.RAYGAN_SMS_API_BASE_URL = "https://api.raygansms.com"; + this.SMS_DRIVER = "mock"; + this.STORAGE_DRIVER = "local"; + this.STORAGE_LOCAL_ROOT = "./uploads"; + this.STORAGE_PUBLIC_URL = "http://localhost:3000/uploads"; + this.CORS_ADMIN_ORIGIN = "http://localhost:5173"; + this.CORS_CLIENT_ORIGIN = "http://localhost:5174"; + } + }; + exports2.EnvironmentVariables = EnvironmentVariables; + __decorate2([ + (0, class_validator_1.IsEnum)(Environment), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "NODE_ENV", void 0); + __decorate2([ + (0, class_validator_1.IsNumber)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", Number) + ], EnvironmentVariables.prototype, "PORT", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "DATABASE_URL", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "REDIS_HOST", void 0); + __decorate2([ + (0, class_validator_1.IsNumber)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", Number) + ], EnvironmentVariables.prototype, "REDIS_PORT", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "REDIS_PASSWORD", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "JWT_USER_SECRET", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "JWT_USER_EXPIRES_IN", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "JWT_ADMIN_ACCESS_SECRET", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "JWT_ADMIN_ACCESS_EXPIRES_IN", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "JWT_ADMIN_REFRESH_SECRET", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "JWT_ADMIN_REFRESH_EXPIRES_IN", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "RAYGAN_SMS_USERNAME", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "RAYGAN_SMS_PASSWORD", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "RAYGAN_SMS_LINE_NUMBER", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "RAYGAN_SMS_API_BASE_URL", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "SMS_DRIVER", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "STORAGE_DRIVER", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "STORAGE_LOCAL_ROOT", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "STORAGE_PUBLIC_URL", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "CORS_ADMIN_ORIGIN", void 0); + __decorate2([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], EnvironmentVariables.prototype, "CORS_CLIENT_ORIGIN", void 0); + function validateEnv(config) { + const validatedConfig = (0, class_transformer_1.plainToInstance)(EnvironmentVariables, config, { + enableImplicitConversion: true + }); + const errors = (0, class_validator_1.validateSync)(validatedConfig, { skipMissingProperties: false }); + if (errors.length > 0) { + throw new Error(`Config validation error: ${errors.toString()}`); + } + return validatedConfig; + } + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/abstract.strategy.js +var require_abstract_strategy = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/abstract.strategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbstractStrategy = void 0; + var AbstractStrategy = class { + }; + exports2.AbstractStrategy = AbstractStrategy; + } +}); + +// ../../node_modules/.pnpm/pause@0.0.1/node_modules/pause/index.js +var require_pause = __commonJS({ + "../../node_modules/.pnpm/pause@0.0.1/node_modules/pause/index.js"(exports2, module2) { + module2.exports = function(obj2) { + var onData, onEnd, events = []; + obj2.on("data", onData = function(data, encoding) { + events.push(["data", data, encoding]); + }); + obj2.on("end", onEnd = function(data, encoding) { + events.push(["end", data, encoding]); + }); + return { + end: function() { + obj2.removeListener("data", onData); + obj2.removeListener("end", onEnd); + }, + resume: function() { + this.end(); + for (var i = 0, len = events.length; i < len; ++i) { + obj2.emit.apply(obj2, events[i]); + } + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/passport-strategy@1.0.0/node_modules/passport-strategy/lib/strategy.js +var require_strategy = __commonJS({ + "../../node_modules/.pnpm/passport-strategy@1.0.0/node_modules/passport-strategy/lib/strategy.js"(exports2, module2) { + function Strategy() { + } + Strategy.prototype.authenticate = function(req, options) { + throw new Error("Strategy#authenticate must be overridden by subclass"); + }; + module2.exports = Strategy; + } +}); + +// ../../node_modules/.pnpm/passport-strategy@1.0.0/node_modules/passport-strategy/lib/index.js +var require_lib7 = __commonJS({ + "../../node_modules/.pnpm/passport-strategy@1.0.0/node_modules/passport-strategy/lib/index.js"(exports2, module2) { + var Strategy = require_strategy(); + exports2 = module2.exports = Strategy; + exports2.Strategy = Strategy; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/strategies/session.js +var require_session = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/strategies/session.js"(exports2, module2) { + var pause = require_pause(); + var util2 = require("util"); + var Strategy = require_lib7(); + function SessionStrategy(options, deserializeUser) { + if (typeof options == "function") { + deserializeUser = options; + options = void 0; + } + options = options || {}; + Strategy.call(this); + this.name = "session"; + this._key = options.key || "passport"; + this._deserializeUser = deserializeUser; + } + util2.inherits(SessionStrategy, Strategy); + SessionStrategy.prototype.authenticate = function(req, options) { + if (!req.session) { + return this.error(new Error("Login sessions require session support. Did you forget to use `express-session` middleware?")); + } + options = options || {}; + var self2 = this, su; + if (req.session[this._key]) { + su = req.session[this._key].user; + } + if (su || su === 0) { + var paused = options.pauseStream ? pause(req) : null; + this._deserializeUser(su, req, function(err, user) { + if (err) { + return self2.error(err); + } + if (!user) { + delete req.session[self2._key].user; + } else { + var property = req._userProperty || "user"; + req[property] = user; + } + self2.pass(); + if (paused) { + paused.resume(); + } + }); + } else { + self2.pass(); + } + }; + module2.exports = SessionStrategy; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/sessionmanager.js +var require_sessionmanager = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/sessionmanager.js"(exports2, module2) { + var merge = require_utils_merge(); + function SessionManager(options, serializeUser) { + if (typeof options == "function") { + serializeUser = options; + options = void 0; + } + options = options || {}; + this._key = options.key || "passport"; + this._serializeUser = serializeUser; + } + SessionManager.prototype.logIn = function(req, user, options, cb) { + if (typeof options == "function") { + cb = options; + options = {}; + } + options = options || {}; + if (!req.session) { + return cb(new Error("Login sessions require session support. Did you forget to use `express-session` middleware?")); + } + var self2 = this; + var prevSession = req.session; + req.session.regenerate(function(err) { + if (err) { + return cb(err); + } + self2._serializeUser(user, req, function(err2, obj2) { + if (err2) { + return cb(err2); + } + if (options.keepSessionInfo) { + merge(req.session, prevSession); + } + if (!req.session[self2._key]) { + req.session[self2._key] = {}; + } + req.session[self2._key].user = obj2; + req.session.save(function(err3) { + if (err3) { + return cb(err3); + } + cb(); + }); + }); + }); + }; + SessionManager.prototype.logOut = function(req, options, cb) { + if (typeof options == "function") { + cb = options; + options = {}; + } + options = options || {}; + if (!req.session) { + return cb(new Error("Login sessions require session support. Did you forget to use `express-session` middleware?")); + } + var self2 = this; + if (req.session[this._key]) { + delete req.session[this._key].user; + } + var prevSession = req.session; + req.session.save(function(err) { + if (err) { + return cb(err); + } + req.session.regenerate(function(err2) { + if (err2) { + return cb(err2); + } + if (options.keepSessionInfo) { + merge(req.session, prevSession); + } + cb(); + }); + }); + }; + module2.exports = SessionManager; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/http/request.js +var require_request3 = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/http/request.js"(exports2, module2) { + var req = exports2 = module2.exports = {}; + req.login = req.logIn = function(user, options, done) { + if (typeof options == "function") { + done = options; + options = {}; + } + options = options || {}; + var property = this._userProperty || "user"; + var session = options.session === void 0 ? true : options.session; + this[property] = user; + if (session && this._sessionManager) { + if (typeof done != "function") { + throw new Error("req#login requires a callback function"); + } + var self2 = this; + this._sessionManager.logIn(this, user, options, function(err) { + if (err) { + self2[property] = null; + return done(err); + } + done(); + }); + } else { + done && done(); + } + }; + req.logout = req.logOut = function(options, done) { + if (typeof options == "function") { + done = options; + options = {}; + } + options = options || {}; + var property = this._userProperty || "user"; + this[property] = null; + if (this._sessionManager) { + if (typeof done != "function") { + throw new Error("req#logout requires a callback function"); + } + this._sessionManager.logOut(this, options, done); + } else { + done && done(); + } + }; + req.isAuthenticated = function() { + var property = this._userProperty || "user"; + return this[property] ? true : false; + }; + req.isUnauthenticated = function() { + return !this.isAuthenticated(); + }; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/middleware/initialize.js +var require_initialize = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/middleware/initialize.js"(exports2, module2) { + var IncomingMessageExt = require_request3(); + module2.exports = function initialize(passport, options) { + options = options || {}; + return function initialize2(req, res, next) { + req.login = req.logIn = req.logIn || IncomingMessageExt.logIn; + req.logout = req.logOut = req.logOut || IncomingMessageExt.logOut; + req.isAuthenticated = req.isAuthenticated || IncomingMessageExt.isAuthenticated; + req.isUnauthenticated = req.isUnauthenticated || IncomingMessageExt.isUnauthenticated; + req._sessionManager = passport._sm; + if (options.userProperty) { + req._userProperty = options.userProperty; + } + var compat = options.compat === void 0 ? true : options.compat; + if (compat) { + passport._userProperty = options.userProperty || "user"; + req._passport = {}; + req._passport.instance = passport; + } + next(); + }; + }; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/errors/authenticationerror.js +var require_authenticationerror = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/errors/authenticationerror.js"(exports2, module2) { + function AuthenticationError(message, status) { + Error.call(this); + Error.captureStackTrace(this, arguments.callee); + this.name = "AuthenticationError"; + this.message = message; + this.status = status || 401; + } + AuthenticationError.prototype.__proto__ = Error.prototype; + module2.exports = AuthenticationError; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/middleware/authenticate.js +var require_authenticate = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/middleware/authenticate.js"(exports2, module2) { + var http = require("http"); + var IncomingMessageExt = require_request3(); + var AuthenticationError = require_authenticationerror(); + module2.exports = function authenticate(passport, name, options, callback) { + if (typeof options == "function") { + callback = options; + options = {}; + } + options = options || {}; + var multi = true; + if (!Array.isArray(name)) { + name = [name]; + multi = false; + } + return function authenticate2(req, res, next) { + req.login = req.logIn = req.logIn || IncomingMessageExt.logIn; + req.logout = req.logOut = req.logOut || IncomingMessageExt.logOut; + req.isAuthenticated = req.isAuthenticated || IncomingMessageExt.isAuthenticated; + req.isUnauthenticated = req.isUnauthenticated || IncomingMessageExt.isUnauthenticated; + req._sessionManager = passport._sm; + var failures = []; + function allFailed() { + if (callback) { + if (!multi) { + return callback(null, false, failures[0].challenge, failures[0].status); + } else { + var challenges = failures.map(function(f) { + return f.challenge; + }); + var statuses = failures.map(function(f) { + return f.status; + }); + return callback(null, false, challenges, statuses); + } + } + var failure = failures[0] || {}, challenge = failure.challenge || {}, msg; + if (options.failureFlash) { + var flash = options.failureFlash; + if (typeof flash == "string") { + flash = { type: "error", message: flash }; + } + flash.type = flash.type || "error"; + var type = flash.type || challenge.type || "error"; + msg = flash.message || challenge.message || challenge; + if (typeof msg == "string") { + req.flash(type, msg); + } + } + if (options.failureMessage) { + msg = options.failureMessage; + if (typeof msg == "boolean") { + msg = challenge.message || challenge; + } + if (typeof msg == "string") { + req.session.messages = req.session.messages || []; + req.session.messages.push(msg); + } + } + if (options.failureRedirect) { + return res.redirect(options.failureRedirect); + } + var rchallenge = [], rstatus, status; + for (var j = 0, len = failures.length; j < len; j++) { + failure = failures[j]; + challenge = failure.challenge; + status = failure.status; + rstatus = rstatus || status; + if (typeof challenge == "string") { + rchallenge.push(challenge); + } + } + res.statusCode = rstatus || 401; + if (res.statusCode == 401 && rchallenge.length) { + res.setHeader("WWW-Authenticate", rchallenge); + } + if (options.failWithError) { + return next(new AuthenticationError(http.STATUS_CODES[res.statusCode], rstatus)); + } + res.end(http.STATUS_CODES[res.statusCode]); + } + (function attempt(i) { + var layer = name[i]; + if (!layer) { + return allFailed(); + } + var strategy, prototype; + if (typeof layer.authenticate == "function") { + strategy = layer; + } else { + prototype = passport._strategy(layer); + if (!prototype) { + return next(new Error('Unknown authentication strategy "' + layer + '"')); + } + strategy = Object.create(prototype); + } + strategy.success = function(user, info) { + if (callback) { + return callback(null, user, info); + } + info = info || {}; + var msg; + if (options.successFlash) { + var flash = options.successFlash; + if (typeof flash == "string") { + flash = { type: "success", message: flash }; + } + flash.type = flash.type || "success"; + var type = flash.type || info.type || "success"; + msg = flash.message || info.message || info; + if (typeof msg == "string") { + req.flash(type, msg); + } + } + if (options.successMessage) { + msg = options.successMessage; + if (typeof msg == "boolean") { + msg = info.message || info; + } + if (typeof msg == "string") { + req.session.messages = req.session.messages || []; + req.session.messages.push(msg); + } + } + if (options.assignProperty) { + req[options.assignProperty] = user; + if (options.authInfo !== false) { + passport.transformAuthInfo(info, req, function(err, tinfo) { + if (err) { + return next(err); + } + req.authInfo = tinfo; + next(); + }); + } else { + next(); + } + return; + } + req.logIn(user, options, function(err) { + if (err) { + return next(err); + } + function complete() { + if (options.successReturnToOrRedirect) { + var url = options.successReturnToOrRedirect; + if (req.session && req.session.returnTo) { + url = req.session.returnTo; + delete req.session.returnTo; + } + return res.redirect(url); + } + if (options.successRedirect) { + return res.redirect(options.successRedirect); + } + next(); + } + if (options.authInfo !== false) { + passport.transformAuthInfo(info, req, function(err2, tinfo) { + if (err2) { + return next(err2); + } + req.authInfo = tinfo; + complete(); + }); + } else { + complete(); + } + }); + }; + strategy.fail = function(challenge, status) { + if (typeof challenge == "number") { + status = challenge; + challenge = void 0; + } + failures.push({ challenge, status }); + attempt(i + 1); + }; + strategy.redirect = function(url, status) { + res.statusCode = status || 302; + res.setHeader("Location", url); + res.setHeader("Content-Length", "0"); + res.end(); + }; + strategy.pass = function() { + next(); + }; + strategy.error = function(err) { + if (callback) { + return callback(err); + } + next(err); + }; + strategy.authenticate(req, options); + })(0); + }; + }; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/framework/connect.js +var require_connect2 = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/framework/connect.js"(exports2, module2) { + var initialize = require_initialize(); + var authenticate = require_authenticate(); + exports2 = module2.exports = function() { + return { + initialize, + authenticate + }; + }; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/authenticator.js +var require_authenticator = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/authenticator.js"(exports2, module2) { + var SessionStrategy = require_session(); + var SessionManager = require_sessionmanager(); + function Authenticator() { + this._key = "passport"; + this._strategies = {}; + this._serializers = []; + this._deserializers = []; + this._infoTransformers = []; + this._framework = null; + this.init(); + } + Authenticator.prototype.init = function() { + this.framework(require_connect2()()); + this.use(new SessionStrategy({ key: this._key }, this.deserializeUser.bind(this))); + this._sm = new SessionManager({ key: this._key }, this.serializeUser.bind(this)); + }; + Authenticator.prototype.use = function(name, strategy) { + if (!strategy) { + strategy = name; + name = strategy.name; + } + if (!name) { + throw new Error("Authentication strategies must have a name"); + } + this._strategies[name] = strategy; + return this; + }; + Authenticator.prototype.unuse = function(name) { + delete this._strategies[name]; + return this; + }; + Authenticator.prototype.framework = function(fw) { + this._framework = fw; + return this; + }; + Authenticator.prototype.initialize = function(options) { + options = options || {}; + return this._framework.initialize(this, options); + }; + Authenticator.prototype.authenticate = function(strategy, options, callback) { + return this._framework.authenticate(this, strategy, options, callback); + }; + Authenticator.prototype.authorize = function(strategy, options, callback) { + options = options || {}; + options.assignProperty = "account"; + var fn = this._framework.authorize || this._framework.authenticate; + return fn(this, strategy, options, callback); + }; + Authenticator.prototype.session = function(options) { + return this.authenticate("session", options); + }; + Authenticator.prototype.serializeUser = function(fn, req, done) { + if (typeof fn === "function") { + return this._serializers.push(fn); + } + var user = fn; + if (typeof req === "function") { + done = req; + req = void 0; + } + var stack = this._serializers; + (function pass(i, err, obj2) { + if ("pass" === err) { + err = void 0; + } + if (err || obj2 || obj2 === 0) { + return done(err, obj2); + } + var layer = stack[i]; + if (!layer) { + return done(new Error("Failed to serialize user into session")); + } + function serialized(e, o) { + pass(i + 1, e, o); + } + try { + var arity = layer.length; + if (arity == 3) { + layer(req, user, serialized); + } else { + layer(user, serialized); + } + } catch (e) { + return done(e); + } + })(0); + }; + Authenticator.prototype.deserializeUser = function(fn, req, done) { + if (typeof fn === "function") { + return this._deserializers.push(fn); + } + var obj2 = fn; + if (typeof req === "function") { + done = req; + req = void 0; + } + var stack = this._deserializers; + (function pass(i, err, user) { + if ("pass" === err) { + err = void 0; + } + if (err || user) { + return done(err, user); + } + if (user === null || user === false) { + return done(null, false); + } + var layer = stack[i]; + if (!layer) { + return done(new Error("Failed to deserialize user out of session")); + } + function deserialized(e, u) { + pass(i + 1, e, u); + } + try { + var arity = layer.length; + if (arity == 3) { + layer(req, obj2, deserialized); + } else { + layer(obj2, deserialized); + } + } catch (e) { + return done(e); + } + })(0); + }; + Authenticator.prototype.transformAuthInfo = function(fn, req, done) { + if (typeof fn === "function") { + return this._infoTransformers.push(fn); + } + var info = fn; + if (typeof req === "function") { + done = req; + req = void 0; + } + var stack = this._infoTransformers; + (function pass(i, err, tinfo) { + if ("pass" === err) { + err = void 0; + } + if (err || tinfo) { + return done(err, tinfo); + } + var layer = stack[i]; + if (!layer) { + return done(null, info); + } + function transformed(e, t2) { + pass(i + 1, e, t2); + } + try { + var arity = layer.length; + if (arity == 1) { + var t = layer(info); + transformed(null, t); + } else if (arity == 3) { + layer(req, info, transformed); + } else { + layer(info, transformed); + } + } catch (e) { + return done(e); + } + })(0); + }; + Authenticator.prototype._strategy = function(name) { + return this._strategies[name]; + }; + module2.exports = Authenticator; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/index.js +var require_lib8 = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/index.js"(exports2, module2) { + var Passport = require_authenticator(); + var SessionStrategy = require_session(); + exports2 = module2.exports = new Passport(); + exports2.Passport = exports2.Authenticator = Passport; + exports2.Strategy = require_lib7(); + exports2.strategies = {}; + exports2.strategies.SessionStrategy = SessionStrategy; + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/auth-module.options.js +var require_auth_module_options = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/auth-module.options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AuthModuleOptions = void 0; + var AuthModuleOptions = class { + }; + exports2.AuthModuleOptions = AuthModuleOptions; + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/options.js +var require_options = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultOptions = void 0; + exports2.defaultOptions = { + session: false, + property: "user" + }; + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/utils/memoize.util.js +var require_memoize_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/utils/memoize.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.memoize = void 0; + var defaultKey = "default"; + function memoize(fn) { + const cache = {}; + return (...args) => { + const n = args[0] || defaultKey; + if (n in cache) { + return cache[n]; + } else { + const result = fn(n === defaultKey ? void 0 : n); + cache[n] = result; + return result; + } + }; + } + exports2.memoize = memoize; + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/auth.guard.js +var require_auth_guard = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/auth.guard.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AuthGuard = void 0; + var common_12 = require_common(); + var passport = require_lib8(); + var auth_module_options_1 = require_auth_module_options(); + var options_1 = require_options(); + var memoize_util_1 = require_memoize_util(); + exports2.AuthGuard = (0, memoize_util_1.memoize)(createAuthGuard); + var NO_STRATEGY_ERROR = `In order to use "defaultStrategy", please, ensure to import PassportModule in each place where AuthGuard() is being used. Otherwise, passport won't work correctly.`; + var authLogger = new common_12.Logger("AuthGuard"); + function createAuthGuard(type) { + let MixinAuthGuard = class MixinAuthGuard { + constructor(options) { + this.options = {}; + this.options = options ?? this.options; + if (!type && !this.options.defaultStrategy) { + authLogger.error(NO_STRATEGY_ERROR); + } + } + async canActivate(context) { + const options = { + ...options_1.defaultOptions, + ...this.options, + ...await this.getAuthenticateOptions(context) + }; + const [request, response] = [ + this.getRequest(context), + this.getResponse(context) + ]; + const passportFn = createPassportContext(request, response); + const user = await passportFn(type || this.options.defaultStrategy, options, (err, user2, info, status) => this.handleRequest(err, user2, info, context, status)); + request[options.property || options_1.defaultOptions.property] = user; + return true; + } + getRequest(context) { + return context.switchToHttp().getRequest(); + } + getResponse(context) { + return context.switchToHttp().getResponse(); + } + async logIn(request) { + const user = request[this.options.property || options_1.defaultOptions.property]; + await new Promise((resolve, reject) => request.logIn(user, this.options, (err) => err ? reject(err) : resolve())); + } + handleRequest(err, user, info, context, status) { + if (err || !user) { + throw err || new common_12.UnauthorizedException(); + } + return user; + } + getAuthenticateOptions(context) { + return void 0; + } + }; + __decorate2([ + (0, common_12.Optional)(), + (0, common_12.Inject)(auth_module_options_1.AuthModuleOptions), + __metadata2("design:type", auth_module_options_1.AuthModuleOptions) + ], MixinAuthGuard.prototype, "options", void 0); + MixinAuthGuard = __decorate2([ + __param2(0, (0, common_12.Optional)()), + __metadata2("design:paramtypes", [auth_module_options_1.AuthModuleOptions]) + ], MixinAuthGuard); + const guard = (0, common_12.mixin)(MixinAuthGuard); + return guard; + } + var createPassportContext = (request, response) => (type, options, callback) => new Promise((resolve, reject) => passport.authenticate(type, options, (err, user, info, status) => { + try { + request.authInfo = info; + return resolve(callback(err, user, info, status)); + } catch (err2) { + reject(err2); + } + })(request, response, (err) => err ? reject(err) : resolve())); + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/type.interface.js +var require_type_interface2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/type.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/index.js +var require_interfaces11 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_auth_module_options(), exports2); + __exportStar2(require_type_interface2(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport.module.js +var require_passport_module = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var PassportModule_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PassportModule = void 0; + var common_12 = require_common(); + var auth_module_options_1 = require_auth_module_options(); + var PassportModule = exports2.PassportModule = PassportModule_1 = class PassportModule { + static register(options) { + return { + module: PassportModule_1, + providers: [{ provide: auth_module_options_1.AuthModuleOptions, useValue: options }], + exports: [auth_module_options_1.AuthModuleOptions] + }; + } + static registerAsync(options) { + return { + module: PassportModule_1, + imports: options.imports || [], + providers: this.createAsyncProviders(options), + exports: [auth_module_options_1.AuthModuleOptions] + }; + } + static createAsyncProviders(options) { + if (options.useExisting || options.useFactory) { + return [this.createAsyncOptionsProvider(options)]; + } + return [ + this.createAsyncOptionsProvider(options), + { + provide: options.useClass, + useClass: options.useClass + } + ]; + } + static createAsyncOptionsProvider(options) { + if (options.useFactory) { + return { + provide: auth_module_options_1.AuthModuleOptions, + useFactory: options.useFactory, + inject: options.inject || [] + }; + } + return { + provide: auth_module_options_1.AuthModuleOptions, + useFactory: async (optionsFactory) => await optionsFactory.createAuthOptions(), + inject: [options.useExisting || options.useClass] + }; + } + }; + exports2.PassportModule = PassportModule = PassportModule_1 = __decorate2([ + (0, common_12.Module)({}) + ], PassportModule); + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport/passport.serializer.js +var require_passport_serializer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport/passport.serializer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PassportSerializer = void 0; + var passport = require_lib8(); + var PassportSerializer = class { + constructor() { + const passportInstance = this.getPassportInstance(); + passportInstance.serializeUser((user, done) => this.serializeUser(user, done)); + passportInstance.deserializeUser((payload, done) => this.deserializeUser(payload, done)); + } + getPassportInstance() { + return passport; + } + }; + exports2.PassportSerializer = PassportSerializer; + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport/passport.strategy.js +var require_passport_strategy = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport/passport.strategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PassportStrategy = void 0; + var passport = require_lib8(); + function PassportStrategy(Strategy, name, callbackArity) { + class MixinStrategy extends Strategy { + constructor(...args) { + const callback = async (...params) => { + const done = params[params.length - 1]; + try { + const validateResult = await this.validate(...params); + if (Array.isArray(validateResult)) { + done(null, ...validateResult); + } else { + done(null, validateResult); + } + } catch (err) { + done(err, null); + } + }; + if (callbackArity !== void 0) { + const validate2 = new.target?.prototype?.validate; + const arity = callbackArity === true ? validate2.length + 1 : callbackArity; + if (validate2) { + Object.defineProperty(callback, "length", { + value: arity + }); + } + } + super(...args, callback); + const passportInstance = this.getPassportInstance(); + if (name) { + passportInstance.use(name, this); + } else { + passportInstance.use(this); + } + } + getPassportInstance() { + return passport; + } + } + return MixinStrategy; + } + exports2.PassportStrategy = PassportStrategy; + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/index.js +var require_dist10 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_abstract_strategy(), exports2); + __exportStar2(require_auth_guard(), exports2); + __exportStar2(require_interfaces11(), exports2); + __exportStar2(require_passport_module(), exports2); + __exportStar2(require_passport_serializer(), exports2); + __exportStar2(require_passport_strategy(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/index.js +var require_passport = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/index.js"(exports2) { + "use strict"; + function __export2(m) { + for (var p in m) if (!exports2.hasOwnProperty(p)) exports2[p] = m[p]; + } + exports2.__esModule = true; + __export2(require_dist10()); + } +}); + +// dist/src/common/guards/jwt-admin.guard.js +var require_jwt_admin_guard = __commonJS({ + "dist/src/common/guards/jwt-admin.guard.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.JwtAdminGuard = void 0; + var common_12 = require_common(); + var passport_1 = require_passport(); + var JwtAdminGuard = class JwtAdminGuard extends (0, passport_1.AuthGuard)("jwt-admin") { + canActivate(context) { + return super.canActivate(context); + } + handleRequest(err, admin, info, context) { + if (err || !admin || admin.type !== "admin") { + throw err || new common_12.UnauthorizedException("UNAUTHORIZED_ADMIN"); + } + const request = context.switchToHttp().getRequest(); + request.admin = admin; + return admin; + } + }; + exports2.JwtAdminGuard = JwtAdminGuard; + exports2.JwtAdminGuard = JwtAdminGuard = __decorate2([ + (0, common_12.Injectable)() + ], JwtAdminGuard); + } +}); + +// dist/src/prisma/prisma.service.js +var require_prisma_service = __commonJS({ + "dist/src/prisma/prisma.service.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PrismaService = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var PrismaService = class PrismaService extends client_1.PrismaClient { + constructor() { + super({ + log: process.env.NODE_ENV === "development" ? ["warn", "error"] : ["error"] + }); + } + async onModuleInit() { + await this.$connect(); + } + async onModuleDestroy() { + await this.$disconnect(); + } + async enableShutdownHooks(app) { + process.on("beforeExit", async () => { + await app.close(); + }); + } + }; + exports2.PrismaService = PrismaService; + exports2.PrismaService = PrismaService = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", []) + ], PrismaService); + } +}); + +// dist/src/modules/admin-audit/admin-audit.service.js +var require_admin_audit_service = __commonJS({ + "dist/src/modules/admin-audit/admin-audit.service.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminAuditService = void 0; + var common_12 = require_common(); + var prisma_service_12 = require_prisma_service(); + var AdminAuditService = class AdminAuditService { + constructor(prisma) { + this.prisma = prisma; + } + async findAll(query) { + const page = Number(query.page) || 1; + const pageSize = Number(query.pageSize) || 20; + const skip = (page - 1) * pageSize; + const where = {}; + if (query.adminId) + where.adminId = query.adminId; + if (query.entityType) + where.entityType = query.entityType; + if (query.action) + where.action = { contains: query.action }; + if (query.from || query.to) { + where.createdAt = {}; + if (query.from) + where.createdAt.gte = new Date(query.from); + if (query.to) + where.createdAt.lte = new Date(query.to); + } + const [data, total] = await Promise.all([ + this.prisma.adminLog.findMany({ + where, + skip, + take: pageSize, + orderBy: { createdAt: "desc" }, + include: { + admin: { + select: { id: true, name: true, email: true, role: true } + } + } + }), + this.prisma.adminLog.count({ where }) + ]); + return { + data, + meta: { + page, + pageSize, + total, + totalPages: Math.ceil(total / pageSize) + } + }; + } + }; + exports2.AdminAuditService = AdminAuditService; + exports2.AdminAuditService = AdminAuditService = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", [prisma_service_12.PrismaService]) + ], AdminAuditService); + } +}); + +// dist/src/modules/admin-audit/admin-audit.controller.js +var require_admin_audit_controller = __commonJS({ + "dist/src/modules/admin-audit/admin-audit.controller.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminAuditController = void 0; + var common_12 = require_common(); + var swagger_12 = require_swagger(); + var jwt_admin_guard_1 = require_jwt_admin_guard(); + var admin_audit_service_1 = require_admin_audit_service(); + var AdminAuditController = class AdminAuditController { + constructor(auditService) { + this.auditService = auditService; + } + async findAll(query) { + return this.auditService.findAll(query); + } + }; + exports2.AdminAuditController = AdminAuditController; + __decorate2([ + (0, common_12.Get)(), + (0, swagger_12.ApiOperation)({ summary: "\u0645\u0634\u0627\u0647\u062F\u0647 \u062A\u0645\u0627\u0645 \u0644\u0627\u06AF\u200C\u0647\u0627\u06CC \u0628\u0627\u0632\u0631\u0633\u06CC \u0627\u0642\u062F\u0627\u0645\u0627\u062A \u0627\u062F\u0645\u06CC\u0646 \u0628\u0627 \u0641\u06CC\u0644\u062A\u0631" }), + (0, swagger_12.ApiQuery)({ name: "page", required: false }), + (0, swagger_12.ApiQuery)({ name: "pageSize", required: false }), + (0, swagger_12.ApiQuery)({ name: "adminId", required: false }), + (0, swagger_12.ApiQuery)({ name: "entityType", required: false }), + (0, swagger_12.ApiQuery)({ name: "action", required: false }), + (0, swagger_12.ApiQuery)({ name: "from", required: false }), + (0, swagger_12.ApiQuery)({ name: "to", required: false }), + __param2(0, (0, common_12.Query)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [Object]), + __metadata2("design:returntype", Promise) + ], AdminAuditController.prototype, "findAll", null); + exports2.AdminAuditController = AdminAuditController = __decorate2([ + (0, swagger_12.ApiTags)("Admin Audit Logs (\u0644\u0627\u06AF\u200C\u0647\u0627\u06CC \u0628\u0627\u0632\u0631\u0633\u06CC \u0645\u062F\u06CC\u0631\u0627\u0646)"), + (0, common_12.Controller)("admin/audit-logs"), + (0, common_12.UseGuards)(jwt_admin_guard_1.JwtAdminGuard), + (0, swagger_12.ApiBearerAuth)("AdminAuth"), + __metadata2("design:paramtypes", [admin_audit_service_1.AdminAuditService]) + ], AdminAuditController); + } +}); + +// dist/src/modules/admin-audit/admin-audit.module.js +var require_admin_audit_module = __commonJS({ + "dist/src/modules/admin-audit/admin-audit.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminAuditModule = void 0; + var common_12 = require_common(); + var admin_audit_controller_1 = require_admin_audit_controller(); + var admin_audit_service_1 = require_admin_audit_service(); + var AdminAuditModule = class AdminAuditModule { + }; + exports2.AdminAuditModule = AdminAuditModule; + exports2.AdminAuditModule = AdminAuditModule = __decorate2([ + (0, common_12.Module)({ + controllers: [admin_audit_controller_1.AdminAuditController], + providers: [admin_audit_service_1.AdminAuditService], + exports: [admin_audit_service_1.AdminAuditService] + }) + ], AdminAuditModule); + } +}); + +// ../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/dist/interfaces/jwt-module-options.interface.js +var require_jwt_module_options_interface = __commonJS({ + "../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/dist/interfaces/jwt-module-options.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.JwtSecretRequestType = void 0; + var JwtSecretRequestType; + (function(JwtSecretRequestType2) { + JwtSecretRequestType2[JwtSecretRequestType2["SIGN"] = 0] = "SIGN"; + JwtSecretRequestType2[JwtSecretRequestType2["VERIFY"] = 1] = "VERIFY"; + })(JwtSecretRequestType || (exports2.JwtSecretRequestType = JwtSecretRequestType = {})); + } +}); + +// ../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/dist/interfaces/index.js +var require_interfaces12 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/dist/interfaces/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_jwt_module_options_interface(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/dist/jwt.errors.js +var require_jwt_errors = __commonJS({ + "../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/dist/jwt.errors.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WrongSecretProviderError = void 0; + var WrongSecretProviderError = class extends Error { + }; + exports2.WrongSecretProviderError = WrongSecretProviderError; + } +}); + +// ../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/dist/jwt.constants.js +var require_jwt_constants = __commonJS({ + "../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/dist/jwt.constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.JWT_MODULE_OPTIONS = void 0; + exports2.JWT_MODULE_OPTIONS = "JWT_MODULE_OPTIONS"; + } +}); + +// ../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/dist/jwt.providers.js +var require_jwt_providers = __commonJS({ + "../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/dist/jwt.providers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createJwtProvider = void 0; + var jwt_constants_1 = require_jwt_constants(); + function createJwtProvider(options) { + return [{ provide: jwt_constants_1.JWT_MODULE_OPTIONS, useValue: options || {} }]; + } + exports2.createJwtProvider = createJwtProvider; + } +}); + +// ../../node_modules/.pnpm/jws@3.2.3/node_modules/jws/lib/data-stream.js +var require_data_stream = __commonJS({ + "../../node_modules/.pnpm/jws@3.2.3/node_modules/jws/lib/data-stream.js"(exports2, module2) { + var Buffer2 = require_safe_buffer().Buffer; + var Stream = require("stream"); + var util2 = require("util"); + function DataStream(data) { + this.buffer = null; + this.writable = true; + this.readable = true; + if (!data) { + this.buffer = Buffer2.alloc(0); + return this; + } + if (typeof data.pipe === "function") { + this.buffer = Buffer2.alloc(0); + data.pipe(this); + return this; + } + if (data.length || typeof data === "object") { + this.buffer = data; + this.writable = false; + process.nextTick(function() { + this.emit("end", data); + this.readable = false; + this.emit("close"); + }.bind(this)); + return this; + } + throw new TypeError("Unexpected data type (" + typeof data + ")"); + } + util2.inherits(DataStream, Stream); + DataStream.prototype.write = function write(data) { + this.buffer = Buffer2.concat([this.buffer, Buffer2.from(data)]); + this.emit("data", data); + }; + DataStream.prototype.end = function end(data) { + if (data) + this.write(data); + this.emit("end", data); + this.emit("close"); + this.writable = false; + this.readable = false; + }; + module2.exports = DataStream; + } +}); + +// ../../node_modules/.pnpm/ecdsa-sig-formatter@1.0.11/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js +var require_param_bytes_for_alg = __commonJS({ + "../../node_modules/.pnpm/ecdsa-sig-formatter@1.0.11/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js"(exports2, module2) { + "use strict"; + function getParamSize(keySize) { + var result = (keySize / 8 | 0) + (keySize % 8 === 0 ? 0 : 1); + return result; + } + var paramBytesForAlg = { + ES256: getParamSize(256), + ES384: getParamSize(384), + ES512: getParamSize(521) + }; + function getParamBytesForAlg(alg) { + var paramBytes = paramBytesForAlg[alg]; + if (paramBytes) { + return paramBytes; + } + throw new Error('Unknown algorithm "' + alg + '"'); + } + module2.exports = getParamBytesForAlg; + } +}); + +// ../../node_modules/.pnpm/ecdsa-sig-formatter@1.0.11/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js +var require_ecdsa_sig_formatter = __commonJS({ + "../../node_modules/.pnpm/ecdsa-sig-formatter@1.0.11/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js"(exports2, module2) { + "use strict"; + var Buffer2 = require_safe_buffer().Buffer; + var getParamBytesForAlg = require_param_bytes_for_alg(); + var MAX_OCTET = 128; + var CLASS_UNIVERSAL = 0; + var PRIMITIVE_BIT = 32; + var TAG_SEQ = 16; + var TAG_INT = 2; + var ENCODED_TAG_SEQ = TAG_SEQ | PRIMITIVE_BIT | CLASS_UNIVERSAL << 6; + var ENCODED_TAG_INT = TAG_INT | CLASS_UNIVERSAL << 6; + function base64Url(base64) { + return base64.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); + } + function signatureAsBuffer(signature) { + if (Buffer2.isBuffer(signature)) { + return signature; + } else if ("string" === typeof signature) { + return Buffer2.from(signature, "base64"); + } + throw new TypeError("ECDSA signature must be a Base64 string or a Buffer"); + } + function derToJose(signature, alg) { + signature = signatureAsBuffer(signature); + var paramBytes = getParamBytesForAlg(alg); + var maxEncodedParamLength = paramBytes + 1; + var inputLength = signature.length; + var offset = 0; + if (signature[offset++] !== ENCODED_TAG_SEQ) { + throw new Error('Could not find expected "seq"'); + } + var seqLength = signature[offset++]; + if (seqLength === (MAX_OCTET | 1)) { + seqLength = signature[offset++]; + } + if (inputLength - offset < seqLength) { + throw new Error('"seq" specified length of "' + seqLength + '", only "' + (inputLength - offset) + '" remaining'); + } + if (signature[offset++] !== ENCODED_TAG_INT) { + throw new Error('Could not find expected "int" for "r"'); + } + var rLength = signature[offset++]; + if (inputLength - offset - 2 < rLength) { + throw new Error('"r" specified length of "' + rLength + '", only "' + (inputLength - offset - 2) + '" available'); + } + if (maxEncodedParamLength < rLength) { + throw new Error('"r" specified length of "' + rLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); + } + var rOffset = offset; + offset += rLength; + if (signature[offset++] !== ENCODED_TAG_INT) { + throw new Error('Could not find expected "int" for "s"'); + } + var sLength = signature[offset++]; + if (inputLength - offset !== sLength) { + throw new Error('"s" specified length of "' + sLength + '", expected "' + (inputLength - offset) + '"'); + } + if (maxEncodedParamLength < sLength) { + throw new Error('"s" specified length of "' + sLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); + } + var sOffset = offset; + offset += sLength; + if (offset !== inputLength) { + throw new Error('Expected to consume entire buffer, but "' + (inputLength - offset) + '" bytes remain'); + } + var rPadding = paramBytes - rLength, sPadding = paramBytes - sLength; + var dst = Buffer2.allocUnsafe(rPadding + rLength + sPadding + sLength); + for (offset = 0; offset < rPadding; ++offset) { + dst[offset] = 0; + } + signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength); + offset = paramBytes; + for (var o = offset; offset < o + sPadding; ++offset) { + dst[offset] = 0; + } + signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength); + dst = dst.toString("base64"); + dst = base64Url(dst); + return dst; + } + function countPadding(buf, start, stop) { + var padding = 0; + while (start + padding < stop && buf[start + padding] === 0) { + ++padding; + } + var needsSign = buf[start + padding] >= MAX_OCTET; + if (needsSign) { + --padding; + } + return padding; + } + function joseToDer(signature, alg) { + signature = signatureAsBuffer(signature); + var paramBytes = getParamBytesForAlg(alg); + var signatureBytes = signature.length; + if (signatureBytes !== paramBytes * 2) { + throw new TypeError('"' + alg + '" signatures must be "' + paramBytes * 2 + '" bytes, saw "' + signatureBytes + '"'); + } + var rPadding = countPadding(signature, 0, paramBytes); + var sPadding = countPadding(signature, paramBytes, signature.length); + var rLength = paramBytes - rPadding; + var sLength = paramBytes - sPadding; + var rsBytes = 1 + 1 + rLength + 1 + 1 + sLength; + var shortLength = rsBytes < MAX_OCTET; + var dst = Buffer2.allocUnsafe((shortLength ? 2 : 3) + rsBytes); + var offset = 0; + dst[offset++] = ENCODED_TAG_SEQ; + if (shortLength) { + dst[offset++] = rsBytes; + } else { + dst[offset++] = MAX_OCTET | 1; + dst[offset++] = rsBytes & 255; + } + dst[offset++] = ENCODED_TAG_INT; + dst[offset++] = rLength; + if (rPadding < 0) { + dst[offset++] = 0; + offset += signature.copy(dst, offset, 0, paramBytes); + } else { + offset += signature.copy(dst, offset, rPadding, paramBytes); + } + dst[offset++] = ENCODED_TAG_INT; + dst[offset++] = sLength; + if (sPadding < 0) { + dst[offset++] = 0; + signature.copy(dst, offset, paramBytes); + } else { + signature.copy(dst, offset, paramBytes + sPadding); + } + return dst; + } + module2.exports = { + derToJose, + joseToDer + }; + } +}); + +// ../../node_modules/.pnpm/buffer-equal-constant-time@1.0.1/node_modules/buffer-equal-constant-time/index.js +var require_buffer_equal_constant_time = __commonJS({ + "../../node_modules/.pnpm/buffer-equal-constant-time@1.0.1/node_modules/buffer-equal-constant-time/index.js"(exports2, module2) { + "use strict"; + var Buffer2 = require("buffer").Buffer; + var SlowBuffer = require("buffer").SlowBuffer; + module2.exports = bufferEq; + function bufferEq(a, b) { + if (!Buffer2.isBuffer(a) || !Buffer2.isBuffer(b)) { + return false; + } + if (a.length !== b.length) { + return false; + } + var c = 0; + for (var i = 0; i < a.length; i++) { + c |= a[i] ^ b[i]; + } + return c === 0; + } + bufferEq.install = function() { + Buffer2.prototype.equal = SlowBuffer.prototype.equal = function equal(that) { + return bufferEq(this, that); + }; + }; + var origBufEqual = Buffer2.prototype.equal; + var origSlowBufEqual = SlowBuffer.prototype.equal; + bufferEq.restore = function() { + Buffer2.prototype.equal = origBufEqual; + SlowBuffer.prototype.equal = origSlowBufEqual; + }; + } +}); + +// ../../node_modules/.pnpm/jwa@1.4.2/node_modules/jwa/index.js +var require_jwa = __commonJS({ + "../../node_modules/.pnpm/jwa@1.4.2/node_modules/jwa/index.js"(exports2, module2) { + var Buffer2 = require_safe_buffer().Buffer; + var crypto5 = require("crypto"); + var formatEcdsa = require_ecdsa_sig_formatter(); + var util2 = require("util"); + var MSG_INVALID_ALGORITHM = '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".'; + var MSG_INVALID_SECRET = "secret must be a string or buffer"; + var MSG_INVALID_VERIFIER_KEY = "key must be a string or a buffer"; + var MSG_INVALID_SIGNER_KEY = "key must be a string, a buffer or an object"; + var supportsKeyObjects = typeof crypto5.createPublicKey === "function"; + if (supportsKeyObjects) { + MSG_INVALID_VERIFIER_KEY += " or a KeyObject"; + MSG_INVALID_SECRET += "or a KeyObject"; + } + function checkIsPublicKey(key) { + if (Buffer2.isBuffer(key)) { + return; + } + if (typeof key === "string") { + return; + } + if (!supportsKeyObjects) { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + if (typeof key !== "object") { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + if (typeof key.type !== "string") { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + if (typeof key.asymmetricKeyType !== "string") { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + if (typeof key.export !== "function") { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + } + function checkIsPrivateKey(key) { + if (Buffer2.isBuffer(key)) { + return; + } + if (typeof key === "string") { + return; + } + if (typeof key === "object") { + return; + } + throw typeError(MSG_INVALID_SIGNER_KEY); + } + function checkIsSecretKey(key) { + if (Buffer2.isBuffer(key)) { + return; + } + if (typeof key === "string") { + return key; + } + if (!supportsKeyObjects) { + throw typeError(MSG_INVALID_SECRET); + } + if (typeof key !== "object") { + throw typeError(MSG_INVALID_SECRET); + } + if (key.type !== "secret") { + throw typeError(MSG_INVALID_SECRET); + } + if (typeof key.export !== "function") { + throw typeError(MSG_INVALID_SECRET); + } + } + function fromBase64(base64) { + return base64.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); + } + function toBase64(base64url) { + base64url = base64url.toString(); + var padding = 4 - base64url.length % 4; + if (padding !== 4) { + for (var i = 0; i < padding; ++i) { + base64url += "="; + } + } + return base64url.replace(/\-/g, "+").replace(/_/g, "/"); + } + function typeError(template) { + var args = [].slice.call(arguments, 1); + var errMsg = util2.format.bind(util2, template).apply(null, args); + return new TypeError(errMsg); + } + function bufferOrString(obj2) { + return Buffer2.isBuffer(obj2) || typeof obj2 === "string"; + } + function normalizeInput(thing) { + if (!bufferOrString(thing)) + thing = JSON.stringify(thing); + return thing; + } + function createHmacSigner(bits) { + return function sign(thing, secret) { + checkIsSecretKey(secret); + thing = normalizeInput(thing); + var hmac = crypto5.createHmac("sha" + bits, secret); + var sig = (hmac.update(thing), hmac.digest("base64")); + return fromBase64(sig); + }; + } + var bufferEqual; + var timingSafeEqual = "timingSafeEqual" in crypto5 ? function timingSafeEqual2(a, b) { + if (a.byteLength !== b.byteLength) { + return false; + } + return crypto5.timingSafeEqual(a, b); + } : function timingSafeEqual2(a, b) { + if (!bufferEqual) { + bufferEqual = require_buffer_equal_constant_time(); + } + return bufferEqual(a, b); + }; + function createHmacVerifier(bits) { + return function verify(thing, signature, secret) { + var computedSig = createHmacSigner(bits)(thing, secret); + return timingSafeEqual(Buffer2.from(signature), Buffer2.from(computedSig)); + }; + } + function createKeySigner(bits) { + return function sign(thing, privateKey) { + checkIsPrivateKey(privateKey); + thing = normalizeInput(thing); + var signer = crypto5.createSign("RSA-SHA" + bits); + var sig = (signer.update(thing), signer.sign(privateKey, "base64")); + return fromBase64(sig); + }; + } + function createKeyVerifier(bits) { + return function verify(thing, signature, publicKey) { + checkIsPublicKey(publicKey); + thing = normalizeInput(thing); + signature = toBase64(signature); + var verifier = crypto5.createVerify("RSA-SHA" + bits); + verifier.update(thing); + return verifier.verify(publicKey, signature, "base64"); + }; + } + function createPSSKeySigner(bits) { + return function sign(thing, privateKey) { + checkIsPrivateKey(privateKey); + thing = normalizeInput(thing); + var signer = crypto5.createSign("RSA-SHA" + bits); + var sig = (signer.update(thing), signer.sign({ + key: privateKey, + padding: crypto5.constants.RSA_PKCS1_PSS_PADDING, + saltLength: crypto5.constants.RSA_PSS_SALTLEN_DIGEST + }, "base64")); + return fromBase64(sig); + }; + } + function createPSSKeyVerifier(bits) { + return function verify(thing, signature, publicKey) { + checkIsPublicKey(publicKey); + thing = normalizeInput(thing); + signature = toBase64(signature); + var verifier = crypto5.createVerify("RSA-SHA" + bits); + verifier.update(thing); + return verifier.verify({ + key: publicKey, + padding: crypto5.constants.RSA_PKCS1_PSS_PADDING, + saltLength: crypto5.constants.RSA_PSS_SALTLEN_DIGEST + }, signature, "base64"); + }; + } + function createECDSASigner(bits) { + var inner = createKeySigner(bits); + return function sign() { + var signature = inner.apply(null, arguments); + signature = formatEcdsa.derToJose(signature, "ES" + bits); + return signature; + }; + } + function createECDSAVerifer(bits) { + var inner = createKeyVerifier(bits); + return function verify(thing, signature, publicKey) { + signature = formatEcdsa.joseToDer(signature, "ES" + bits).toString("base64"); + var result = inner(thing, signature, publicKey); + return result; + }; + } + function createNoneSigner() { + return function sign() { + return ""; + }; + } + function createNoneVerifier() { + return function verify(thing, signature) { + return signature === ""; + }; + } + module2.exports = function jwa(algorithm) { + var signerFactories = { + hs: createHmacSigner, + rs: createKeySigner, + ps: createPSSKeySigner, + es: createECDSASigner, + none: createNoneSigner + }; + var verifierFactories = { + hs: createHmacVerifier, + rs: createKeyVerifier, + ps: createPSSKeyVerifier, + es: createECDSAVerifer, + none: createNoneVerifier + }; + var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/i); + if (!match) + throw typeError(MSG_INVALID_ALGORITHM, algorithm); + var algo = (match[1] || match[3]).toLowerCase(); + var bits = match[2]; + return { + sign: signerFactories[algo](bits), + verify: verifierFactories[algo](bits) + }; + }; + } +}); + +// ../../node_modules/.pnpm/jws@3.2.3/node_modules/jws/lib/tostring.js +var require_tostring = __commonJS({ + "../../node_modules/.pnpm/jws@3.2.3/node_modules/jws/lib/tostring.js"(exports2, module2) { + var Buffer2 = require("buffer").Buffer; + module2.exports = function toString2(obj2) { + if (typeof obj2 === "string") + return obj2; + if (typeof obj2 === "number" || Buffer2.isBuffer(obj2)) + return obj2.toString(); + return JSON.stringify(obj2); + }; + } +}); + +// ../../node_modules/.pnpm/jws@3.2.3/node_modules/jws/lib/sign-stream.js +var require_sign_stream = __commonJS({ + "../../node_modules/.pnpm/jws@3.2.3/node_modules/jws/lib/sign-stream.js"(exports2, module2) { + var Buffer2 = require_safe_buffer().Buffer; + var DataStream = require_data_stream(); + var jwa = require_jwa(); + var Stream = require("stream"); + var toString2 = require_tostring(); + var util2 = require("util"); + function base64url(string, encoding) { + return Buffer2.from(string, encoding).toString("base64").replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); + } + function jwsSecuredInput(header, payload, encoding) { + encoding = encoding || "utf8"; + var encodedHeader = base64url(toString2(header), "binary"); + var encodedPayload = base64url(toString2(payload), encoding); + return util2.format("%s.%s", encodedHeader, encodedPayload); + } + function jwsSign(opts) { + var header = opts.header; + var payload = opts.payload; + var secretOrKey = opts.secret || opts.privateKey; + var encoding = opts.encoding; + var algo = jwa(header.alg); + var securedInput = jwsSecuredInput(header, payload, encoding); + var signature = algo.sign(securedInput, secretOrKey); + return util2.format("%s.%s", securedInput, signature); + } + function SignStream(opts) { + var secret = opts.secret; + secret = secret == null ? opts.privateKey : secret; + secret = secret == null ? opts.key : secret; + if (/^hs/i.test(opts.header.alg) === true && secret == null) { + throw new TypeError("secret must be a string or buffer or a KeyObject"); + } + var secretStream = new DataStream(secret); + this.readable = true; + this.header = opts.header; + this.encoding = opts.encoding; + this.secret = this.privateKey = this.key = secretStream; + this.payload = new DataStream(opts.payload); + this.secret.once("close", function() { + if (!this.payload.writable && this.readable) + this.sign(); + }.bind(this)); + this.payload.once("close", function() { + if (!this.secret.writable && this.readable) + this.sign(); + }.bind(this)); + } + util2.inherits(SignStream, Stream); + SignStream.prototype.sign = function sign() { + try { + var signature = jwsSign({ + header: this.header, + payload: this.payload.buffer, + secret: this.secret.buffer, + encoding: this.encoding + }); + this.emit("done", signature); + this.emit("data", signature); + this.emit("end"); + this.readable = false; + return signature; + } catch (e) { + this.readable = false; + this.emit("error", e); + this.emit("close"); + } + }; + SignStream.sign = jwsSign; + module2.exports = SignStream; + } +}); + +// ../../node_modules/.pnpm/jws@3.2.3/node_modules/jws/lib/verify-stream.js +var require_verify_stream = __commonJS({ + "../../node_modules/.pnpm/jws@3.2.3/node_modules/jws/lib/verify-stream.js"(exports2, module2) { + var Buffer2 = require_safe_buffer().Buffer; + var DataStream = require_data_stream(); + var jwa = require_jwa(); + var Stream = require("stream"); + var toString2 = require_tostring(); + var util2 = require("util"); + var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/; + function isObject2(thing) { + return Object.prototype.toString.call(thing) === "[object Object]"; + } + function safeJsonParse(thing) { + if (isObject2(thing)) + return thing; + try { + return JSON.parse(thing); + } catch (e) { + return void 0; + } + } + function headerFromJWS(jwsSig) { + var encodedHeader = jwsSig.split(".", 1)[0]; + return safeJsonParse(Buffer2.from(encodedHeader, "base64").toString("binary")); + } + function securedInputFromJWS(jwsSig) { + return jwsSig.split(".", 2).join("."); + } + function signatureFromJWS(jwsSig) { + return jwsSig.split(".")[2]; + } + function payloadFromJWS(jwsSig, encoding) { + encoding = encoding || "utf8"; + var payload = jwsSig.split(".")[1]; + return Buffer2.from(payload, "base64").toString(encoding); + } + function isValidJws(string) { + return JWS_REGEX.test(string) && !!headerFromJWS(string); + } + function jwsVerify(jwsSig, algorithm, secretOrKey) { + if (!algorithm) { + var err = new Error("Missing algorithm parameter for jws.verify"); + err.code = "MISSING_ALGORITHM"; + throw err; + } + jwsSig = toString2(jwsSig); + var signature = signatureFromJWS(jwsSig); + var securedInput = securedInputFromJWS(jwsSig); + var algo = jwa(algorithm); + return algo.verify(securedInput, signature, secretOrKey); + } + function jwsDecode(jwsSig, opts) { + opts = opts || {}; + jwsSig = toString2(jwsSig); + if (!isValidJws(jwsSig)) + return null; + var header = headerFromJWS(jwsSig); + if (!header) + return null; + var payload = payloadFromJWS(jwsSig); + if (header.typ === "JWT" || opts.json) + payload = JSON.parse(payload, opts.encoding); + return { + header, + payload, + signature: signatureFromJWS(jwsSig) + }; + } + function VerifyStream(opts) { + opts = opts || {}; + var secretOrKey = opts.secret; + secretOrKey = secretOrKey == null ? opts.publicKey : secretOrKey; + secretOrKey = secretOrKey == null ? opts.key : secretOrKey; + if (/^hs/i.test(opts.algorithm) === true && secretOrKey == null) { + throw new TypeError("secret must be a string or buffer or a KeyObject"); + } + var secretStream = new DataStream(secretOrKey); + this.readable = true; + this.algorithm = opts.algorithm; + this.encoding = opts.encoding; + this.secret = this.publicKey = this.key = secretStream; + this.signature = new DataStream(opts.signature); + this.secret.once("close", function() { + if (!this.signature.writable && this.readable) + this.verify(); + }.bind(this)); + this.signature.once("close", function() { + if (!this.secret.writable && this.readable) + this.verify(); + }.bind(this)); + } + util2.inherits(VerifyStream, Stream); + VerifyStream.prototype.verify = function verify() { + try { + var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer); + var obj2 = jwsDecode(this.signature.buffer, this.encoding); + this.emit("done", valid, obj2); + this.emit("data", valid); + this.emit("end"); + this.readable = false; + return valid; + } catch (e) { + this.readable = false; + this.emit("error", e); + this.emit("close"); + } + }; + VerifyStream.decode = jwsDecode; + VerifyStream.isValid = isValidJws; + VerifyStream.verify = jwsVerify; + module2.exports = VerifyStream; + } +}); + +// ../../node_modules/.pnpm/jws@3.2.3/node_modules/jws/index.js +var require_jws = __commonJS({ + "../../node_modules/.pnpm/jws@3.2.3/node_modules/jws/index.js"(exports2) { + var SignStream = require_sign_stream(); + var VerifyStream = require_verify_stream(); + var ALGORITHMS = [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "PS256", + "PS384", + "PS512", + "ES256", + "ES384", + "ES512" + ]; + exports2.ALGORITHMS = ALGORITHMS; + exports2.sign = SignStream.sign; + exports2.verify = VerifyStream.verify; + exports2.decode = VerifyStream.decode; + exports2.isValid = VerifyStream.isValid; + exports2.createSign = function createSign(opts) { + return new SignStream(opts); + }; + exports2.createVerify = function createVerify(opts) { + return new VerifyStream(opts); + }; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/decode.js +var require_decode = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/decode.js"(exports2, module2) { + var jws = require_jws(); + module2.exports = function(jwt, options) { + options = options || {}; + var decoded = jws.decode(jwt, options); + if (!decoded) { + return null; + } + var payload = decoded.payload; + if (typeof payload === "string") { + try { + var obj2 = JSON.parse(payload); + if (obj2 !== null && typeof obj2 === "object") { + payload = obj2; + } + } catch (e) { + } + } + if (options.complete === true) { + return { + header: decoded.header, + payload, + signature: decoded.signature + }; + } + return payload; + }; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/JsonWebTokenError.js +var require_JsonWebTokenError = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/JsonWebTokenError.js"(exports2, module2) { + var JsonWebTokenError = function(message, error) { + Error.call(this, message); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + this.name = "JsonWebTokenError"; + this.message = message; + if (error) this.inner = error; + }; + JsonWebTokenError.prototype = Object.create(Error.prototype); + JsonWebTokenError.prototype.constructor = JsonWebTokenError; + module2.exports = JsonWebTokenError; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/NotBeforeError.js +var require_NotBeforeError = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/NotBeforeError.js"(exports2, module2) { + var JsonWebTokenError = require_JsonWebTokenError(); + var NotBeforeError = function(message, date) { + JsonWebTokenError.call(this, message); + this.name = "NotBeforeError"; + this.date = date; + }; + NotBeforeError.prototype = Object.create(JsonWebTokenError.prototype); + NotBeforeError.prototype.constructor = NotBeforeError; + module2.exports = NotBeforeError; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/TokenExpiredError.js +var require_TokenExpiredError = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/TokenExpiredError.js"(exports2, module2) { + var JsonWebTokenError = require_JsonWebTokenError(); + var TokenExpiredError = function(message, expiredAt) { + JsonWebTokenError.call(this, message); + this.name = "TokenExpiredError"; + this.expiredAt = expiredAt; + }; + TokenExpiredError.prototype = Object.create(JsonWebTokenError.prototype); + TokenExpiredError.prototype.constructor = TokenExpiredError; + module2.exports = TokenExpiredError; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/timespan.js +var require_timespan = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/timespan.js"(exports2, module2) { + var ms = require_ms2(); + module2.exports = function(time, iat) { + var timestamp = iat || Math.floor(Date.now() / 1e3); + if (typeof time === "string") { + var milliseconds = ms(time); + if (typeof milliseconds === "undefined") { + return; + } + return Math.floor(timestamp + milliseconds / 1e3); + } else if (typeof time === "number") { + return timestamp + time; + } else { + return; + } + }; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js +var require_asymmetricKeyDetailsSupported = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js"(exports2, module2) { + var semver = require_semver2(); + module2.exports = semver.satisfies(process.version, ">=15.7.0"); + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js +var require_rsaPssKeyDetailsSupported = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js"(exports2, module2) { + var semver = require_semver2(); + module2.exports = semver.satisfies(process.version, ">=16.9.0"); + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js +var require_validateAsymmetricKey = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js"(exports2, module2) { + var ASYMMETRIC_KEY_DETAILS_SUPPORTED = require_asymmetricKeyDetailsSupported(); + var RSA_PSS_KEY_DETAILS_SUPPORTED = require_rsaPssKeyDetailsSupported(); + var allowedAlgorithmsForKeys = { + "ec": ["ES256", "ES384", "ES512"], + "rsa": ["RS256", "PS256", "RS384", "PS384", "RS512", "PS512"], + "rsa-pss": ["PS256", "PS384", "PS512"] + }; + var allowedCurves = { + ES256: "prime256v1", + ES384: "secp384r1", + ES512: "secp521r1" + }; + module2.exports = function(algorithm, key) { + if (!algorithm || !key) return; + const keyType = key.asymmetricKeyType; + if (!keyType) return; + const allowedAlgorithms = allowedAlgorithmsForKeys[keyType]; + if (!allowedAlgorithms) { + throw new Error(`Unknown key type "${keyType}".`); + } + if (!allowedAlgorithms.includes(algorithm)) { + throw new Error(`"alg" parameter for "${keyType}" key type must be one of: ${allowedAlgorithms.join(", ")}.`); + } + if (ASYMMETRIC_KEY_DETAILS_SUPPORTED) { + switch (keyType) { + case "ec": + const keyCurve = key.asymmetricKeyDetails.namedCurve; + const allowedCurve = allowedCurves[algorithm]; + if (keyCurve !== allowedCurve) { + throw new Error(`"alg" parameter "${algorithm}" requires curve "${allowedCurve}".`); + } + break; + case "rsa-pss": + if (RSA_PSS_KEY_DETAILS_SUPPORTED) { + const length = parseInt(algorithm.slice(-3), 10); + const { hashAlgorithm, mgf1HashAlgorithm, saltLength } = key.asymmetricKeyDetails; + if (hashAlgorithm !== `sha${length}` || mgf1HashAlgorithm !== hashAlgorithm) { + throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${algorithm}.`); + } + if (saltLength !== void 0 && saltLength > length >> 3) { + throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${algorithm}.`); + } + } + break; + } + } + }; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/psSupported.js +var require_psSupported = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/lib/psSupported.js"(exports2, module2) { + var semver = require_semver2(); + module2.exports = semver.satisfies(process.version, "^6.12.0 || >=8.0.0"); + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/verify.js +var require_verify = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/verify.js"(exports2, module2) { + var JsonWebTokenError = require_JsonWebTokenError(); + var NotBeforeError = require_NotBeforeError(); + var TokenExpiredError = require_TokenExpiredError(); + var decode = require_decode(); + var timespan = require_timespan(); + var validateAsymmetricKey = require_validateAsymmetricKey(); + var PS_SUPPORTED = require_psSupported(); + var jws = require_jws(); + var { KeyObject, createSecretKey, createPublicKey } = require("crypto"); + var PUB_KEY_ALGS = ["RS256", "RS384", "RS512"]; + var EC_KEY_ALGS = ["ES256", "ES384", "ES512"]; + var RSA_KEY_ALGS = ["RS256", "RS384", "RS512"]; + var HS_ALGS = ["HS256", "HS384", "HS512"]; + if (PS_SUPPORTED) { + PUB_KEY_ALGS.splice(PUB_KEY_ALGS.length, 0, "PS256", "PS384", "PS512"); + RSA_KEY_ALGS.splice(RSA_KEY_ALGS.length, 0, "PS256", "PS384", "PS512"); + } + module2.exports = function(jwtString, secretOrPublicKey, options, callback) { + if (typeof options === "function" && !callback) { + callback = options; + options = {}; + } + if (!options) { + options = {}; + } + options = Object.assign({}, options); + let done; + if (callback) { + done = callback; + } else { + done = function(err, data) { + if (err) throw err; + return data; + }; + } + if (options.clockTimestamp && typeof options.clockTimestamp !== "number") { + return done(new JsonWebTokenError("clockTimestamp must be a number")); + } + if (options.nonce !== void 0 && (typeof options.nonce !== "string" || options.nonce.trim() === "")) { + return done(new JsonWebTokenError("nonce must be a non-empty string")); + } + if (options.allowInvalidAsymmetricKeyTypes !== void 0 && typeof options.allowInvalidAsymmetricKeyTypes !== "boolean") { + return done(new JsonWebTokenError("allowInvalidAsymmetricKeyTypes must be a boolean")); + } + const clockTimestamp = options.clockTimestamp || Math.floor(Date.now() / 1e3); + if (!jwtString) { + return done(new JsonWebTokenError("jwt must be provided")); + } + if (typeof jwtString !== "string") { + return done(new JsonWebTokenError("jwt must be a string")); + } + const parts = jwtString.split("."); + if (parts.length !== 3) { + return done(new JsonWebTokenError("jwt malformed")); + } + let decodedToken; + try { + decodedToken = decode(jwtString, { complete: true }); + } catch (err) { + return done(err); + } + if (!decodedToken) { + return done(new JsonWebTokenError("invalid token")); + } + const header = decodedToken.header; + let getSecret; + if (typeof secretOrPublicKey === "function") { + if (!callback) { + return done(new JsonWebTokenError("verify must be called asynchronous if secret or public key is provided as a callback")); + } + getSecret = secretOrPublicKey; + } else { + getSecret = function(header2, secretCallback) { + return secretCallback(null, secretOrPublicKey); + }; + } + return getSecret(header, function(err, secretOrPublicKey2) { + if (err) { + return done(new JsonWebTokenError("error in secret or public key callback: " + err.message)); + } + const hasSignature = parts[2].trim() !== ""; + if (!hasSignature && secretOrPublicKey2) { + return done(new JsonWebTokenError("jwt signature is required")); + } + if (hasSignature && !secretOrPublicKey2) { + return done(new JsonWebTokenError("secret or public key must be provided")); + } + if (!hasSignature && !options.algorithms) { + return done(new JsonWebTokenError('please specify "none" in "algorithms" to verify unsigned tokens')); + } + if (secretOrPublicKey2 != null && !(secretOrPublicKey2 instanceof KeyObject)) { + try { + secretOrPublicKey2 = createPublicKey(secretOrPublicKey2); + } catch (_2) { + try { + secretOrPublicKey2 = createSecretKey(typeof secretOrPublicKey2 === "string" ? Buffer.from(secretOrPublicKey2) : secretOrPublicKey2); + } catch (_3) { + return done(new JsonWebTokenError("secretOrPublicKey is not valid key material")); + } + } + } + if (!options.algorithms) { + if (secretOrPublicKey2.type === "secret") { + options.algorithms = HS_ALGS; + } else if (["rsa", "rsa-pss"].includes(secretOrPublicKey2.asymmetricKeyType)) { + options.algorithms = RSA_KEY_ALGS; + } else if (secretOrPublicKey2.asymmetricKeyType === "ec") { + options.algorithms = EC_KEY_ALGS; + } else { + options.algorithms = PUB_KEY_ALGS; + } + } + if (options.algorithms.indexOf(decodedToken.header.alg) === -1) { + return done(new JsonWebTokenError("invalid algorithm")); + } + if (header.alg.startsWith("HS") && secretOrPublicKey2.type !== "secret") { + return done(new JsonWebTokenError(`secretOrPublicKey must be a symmetric key when using ${header.alg}`)); + } else if (/^(?:RS|PS|ES)/.test(header.alg) && secretOrPublicKey2.type !== "public") { + return done(new JsonWebTokenError(`secretOrPublicKey must be an asymmetric key when using ${header.alg}`)); + } + if (!options.allowInvalidAsymmetricKeyTypes) { + try { + validateAsymmetricKey(header.alg, secretOrPublicKey2); + } catch (e) { + return done(e); + } + } + let valid; + try { + valid = jws.verify(jwtString, decodedToken.header.alg, secretOrPublicKey2); + } catch (e) { + return done(e); + } + if (!valid) { + return done(new JsonWebTokenError("invalid signature")); + } + const payload = decodedToken.payload; + if (typeof payload.nbf !== "undefined" && !options.ignoreNotBefore) { + if (typeof payload.nbf !== "number") { + return done(new JsonWebTokenError("invalid nbf value")); + } + if (payload.nbf > clockTimestamp + (options.clockTolerance || 0)) { + return done(new NotBeforeError("jwt not active", new Date(payload.nbf * 1e3))); + } + } + if (typeof payload.exp !== "undefined" && !options.ignoreExpiration) { + if (typeof payload.exp !== "number") { + return done(new JsonWebTokenError("invalid exp value")); + } + if (clockTimestamp >= payload.exp + (options.clockTolerance || 0)) { + return done(new TokenExpiredError("jwt expired", new Date(payload.exp * 1e3))); + } + } + if (options.audience) { + const audiences = Array.isArray(options.audience) ? options.audience : [options.audience]; + const target = Array.isArray(payload.aud) ? payload.aud : [payload.aud]; + const match = target.some(function(targetAudience) { + return audiences.some(function(audience) { + return audience instanceof RegExp ? audience.test(targetAudience) : audience === targetAudience; + }); + }); + if (!match) { + return done(new JsonWebTokenError("jwt audience invalid. expected: " + audiences.join(" or "))); + } + } + if (options.issuer) { + const invalid_issuer = typeof options.issuer === "string" && payload.iss !== options.issuer || Array.isArray(options.issuer) && options.issuer.indexOf(payload.iss) === -1; + if (invalid_issuer) { + return done(new JsonWebTokenError("jwt issuer invalid. expected: " + options.issuer)); + } + } + if (options.subject) { + if (payload.sub !== options.subject) { + return done(new JsonWebTokenError("jwt subject invalid. expected: " + options.subject)); + } + } + if (options.jwtid) { + if (payload.jti !== options.jwtid) { + return done(new JsonWebTokenError("jwt jwtid invalid. expected: " + options.jwtid)); + } + } + if (options.nonce) { + if (payload.nonce !== options.nonce) { + return done(new JsonWebTokenError("jwt nonce invalid. expected: " + options.nonce)); + } + } + if (options.maxAge) { + if (typeof payload.iat !== "number") { + return done(new JsonWebTokenError("iat required when maxAge is specified")); + } + const maxAgeTimestamp = timespan(options.maxAge, payload.iat); + if (typeof maxAgeTimestamp === "undefined") { + return done(new JsonWebTokenError('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); + } + if (clockTimestamp >= maxAgeTimestamp + (options.clockTolerance || 0)) { + return done(new TokenExpiredError("maxAge exceeded", new Date(maxAgeTimestamp * 1e3))); + } + } + if (options.complete === true) { + const signature = decodedToken.signature; + return done(null, { + header, + payload, + signature + }); + } + return done(null, payload); + }); + }; + } +}); + +// ../../node_modules/.pnpm/lodash.includes@4.3.0/node_modules/lodash.includes/index.js +var require_lodash3 = __commonJS({ + "../../node_modules/.pnpm/lodash.includes@4.3.0/node_modules/lodash.includes/index.js"(exports2, module2) { + var INFINITY = 1 / 0; + var MAX_SAFE_INTEGER = 9007199254740991; + var MAX_INTEGER = 17976931348623157e292; + var NAN = 0 / 0; + var argsTag = "[object Arguments]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var stringTag = "[object String]"; + var symbolTag = "[object Symbol]"; + var reTrim = /^\s+|\s+$/g; + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + var reIsBinary = /^0b[01]+$/i; + var reIsOctal = /^0o[0-7]+$/i; + var reIsUint = /^(?:0|[1-9]\d*)$/; + var freeParseInt = parseInt; + function arrayMap(array, iteratee) { + var index = -1, length = array ? array.length : 0, result = Array(length); + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, index = fromIndex + (fromRight ? 1 : -1); + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex(array, baseIsNaN, fromIndex); + } + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + function baseIsNaN(value) { + return value !== value; + } + function baseTimes(n, iteratee) { + var index = -1, result = Array(n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var objectToString = objectProto.toString; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var nativeKeys = overArg(Object.keys, Object); + var nativeMax = Math.max; + function arrayLikeKeys(value, inherited) { + var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : []; + var length = result.length, skipIndexes = !!length; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != "constructor") { + result.push(key); + } + } + return result; + } + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + function isPrototype(value) { + var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; + return value === proto; + } + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0; + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1; + } + function isArguments(value) { + return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag); + } + var isArray = Array.isArray; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + function isFunction(value) { + var tag = isObject2(value) ? objectToString.call(value) : ""; + return tag == funcTag || tag == genTag; + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isString(value) { + return typeof value == "string" || !isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag; + } + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; + } + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + function toInteger(value) { + var result = toFinite(value), remainder = result % 1; + return result === result ? remainder ? result - remainder : result : 0; + } + function toNumber(value) { + if (typeof value == "number") { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject2(value)) { + var other = typeof value.valueOf == "function" ? value.valueOf() : value; + value = isObject2(other) ? other + "" : other; + } + if (typeof value != "string") { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ""); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; + } + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + function values(object) { + return object ? baseValues(object, keys(object)) : []; + } + module2.exports = includes; + } +}); + +// ../../node_modules/.pnpm/lodash.isboolean@3.0.3/node_modules/lodash.isboolean/index.js +var require_lodash4 = __commonJS({ + "../../node_modules/.pnpm/lodash.isboolean@3.0.3/node_modules/lodash.isboolean/index.js"(exports2, module2) { + var boolTag = "[object Boolean]"; + var objectProto = Object.prototype; + var objectToString = objectProto.toString; + function isBoolean(value) { + return value === true || value === false || isObjectLike(value) && objectToString.call(value) == boolTag; + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + module2.exports = isBoolean; + } +}); + +// ../../node_modules/.pnpm/lodash.isinteger@4.0.4/node_modules/lodash.isinteger/index.js +var require_lodash5 = __commonJS({ + "../../node_modules/.pnpm/lodash.isinteger@4.0.4/node_modules/lodash.isinteger/index.js"(exports2, module2) { + var INFINITY = 1 / 0; + var MAX_INTEGER = 17976931348623157e292; + var NAN = 0 / 0; + var symbolTag = "[object Symbol]"; + var reTrim = /^\s+|\s+$/g; + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + var reIsBinary = /^0b[01]+$/i; + var reIsOctal = /^0o[0-7]+$/i; + var freeParseInt = parseInt; + var objectProto = Object.prototype; + var objectToString = objectProto.toString; + function isInteger(value) { + return typeof value == "number" && value == toInteger(value); + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; + } + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + function toInteger(value) { + var result = toFinite(value), remainder = result % 1; + return result === result ? remainder ? result - remainder : result : 0; + } + function toNumber(value) { + if (typeof value == "number") { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject2(value)) { + var other = typeof value.valueOf == "function" ? value.valueOf() : value; + value = isObject2(other) ? other + "" : other; + } + if (typeof value != "string") { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ""); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; + } + module2.exports = isInteger; + } +}); + +// ../../node_modules/.pnpm/lodash.isnumber@3.0.3/node_modules/lodash.isnumber/index.js +var require_lodash6 = __commonJS({ + "../../node_modules/.pnpm/lodash.isnumber@3.0.3/node_modules/lodash.isnumber/index.js"(exports2, module2) { + var numberTag = "[object Number]"; + var objectProto = Object.prototype; + var objectToString = objectProto.toString; + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isNumber(value) { + return typeof value == "number" || isObjectLike(value) && objectToString.call(value) == numberTag; + } + module2.exports = isNumber; + } +}); + +// ../../node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/index.js +var require_lodash7 = __commonJS({ + "../../node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/index.js"(exports2, module2) { + var objectTag = "[object Object]"; + function isHostObject(value) { + var result = false; + if (value != null && typeof value.toString != "function") { + try { + result = !!(value + ""); + } catch (e) { + } + } + return result; + } + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + var funcProto = Function.prototype; + var objectProto = Object.prototype; + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var objectCtorString = funcToString.call(Object); + var objectToString = objectProto.toString; + var getPrototype = overArg(Object.getPrototypeOf, Object); + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isPlainObject(value) { + if (!isObjectLike(value) || objectToString.call(value) != objectTag || isHostObject(value)) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; + } + module2.exports = isPlainObject; + } +}); + +// ../../node_modules/.pnpm/lodash.isstring@4.0.1/node_modules/lodash.isstring/index.js +var require_lodash8 = __commonJS({ + "../../node_modules/.pnpm/lodash.isstring@4.0.1/node_modules/lodash.isstring/index.js"(exports2, module2) { + var stringTag = "[object String]"; + var objectProto = Object.prototype; + var objectToString = objectProto.toString; + var isArray = Array.isArray; + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isString(value) { + return typeof value == "string" || !isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag; + } + module2.exports = isString; + } +}); + +// ../../node_modules/.pnpm/lodash.once@4.1.1/node_modules/lodash.once/index.js +var require_lodash9 = __commonJS({ + "../../node_modules/.pnpm/lodash.once@4.1.1/node_modules/lodash.once/index.js"(exports2, module2) { + var FUNC_ERROR_TEXT = "Expected a function"; + var INFINITY = 1 / 0; + var MAX_INTEGER = 17976931348623157e292; + var NAN = 0 / 0; + var symbolTag = "[object Symbol]"; + var reTrim = /^\s+|\s+$/g; + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + var reIsBinary = /^0b[01]+$/i; + var reIsOctal = /^0o[0-7]+$/i; + var freeParseInt = parseInt; + var objectProto = Object.prototype; + var objectToString = objectProto.toString; + function before(n, func) { + var result; + if (typeof func != "function") { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = void 0; + } + return result; + }; + } + function once(func) { + return before(2, func); + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; + } + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + function toInteger(value) { + var result = toFinite(value), remainder = result % 1; + return result === result ? remainder ? result - remainder : result : 0; + } + function toNumber(value) { + if (typeof value == "number") { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject2(value)) { + var other = typeof value.valueOf == "function" ? value.valueOf() : value; + value = isObject2(other) ? other + "" : other; + } + if (typeof value != "string") { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ""); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; + } + module2.exports = once; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/sign.js +var require_sign2 = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/sign.js"(exports2, module2) { + var timespan = require_timespan(); + var PS_SUPPORTED = require_psSupported(); + var validateAsymmetricKey = require_validateAsymmetricKey(); + var jws = require_jws(); + var includes = require_lodash3(); + var isBoolean = require_lodash4(); + var isInteger = require_lodash5(); + var isNumber = require_lodash6(); + var isPlainObject = require_lodash7(); + var isString = require_lodash8(); + var once = require_lodash9(); + var { KeyObject, createSecretKey, createPrivateKey } = require("crypto"); + var SUPPORTED_ALGS = ["RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "HS256", "HS384", "HS512", "none"]; + if (PS_SUPPORTED) { + SUPPORTED_ALGS.splice(3, 0, "PS256", "PS384", "PS512"); + } + var sign_options_schema = { + expiresIn: { isValid: function(value) { + return isInteger(value) || isString(value) && value; + }, message: '"expiresIn" should be a number of seconds or string representing a timespan' }, + notBefore: { isValid: function(value) { + return isInteger(value) || isString(value) && value; + }, message: '"notBefore" should be a number of seconds or string representing a timespan' }, + audience: { isValid: function(value) { + return isString(value) || Array.isArray(value); + }, message: '"audience" must be a string or array' }, + algorithm: { isValid: includes.bind(null, SUPPORTED_ALGS), message: '"algorithm" must be a valid string enum value' }, + header: { isValid: isPlainObject, message: '"header" must be an object' }, + encoding: { isValid: isString, message: '"encoding" must be a string' }, + issuer: { isValid: isString, message: '"issuer" must be a string' }, + subject: { isValid: isString, message: '"subject" must be a string' }, + jwtid: { isValid: isString, message: '"jwtid" must be a string' }, + noTimestamp: { isValid: isBoolean, message: '"noTimestamp" must be a boolean' }, + keyid: { isValid: isString, message: '"keyid" must be a string' }, + mutatePayload: { isValid: isBoolean, message: '"mutatePayload" must be a boolean' }, + allowInsecureKeySizes: { isValid: isBoolean, message: '"allowInsecureKeySizes" must be a boolean' }, + allowInvalidAsymmetricKeyTypes: { isValid: isBoolean, message: '"allowInvalidAsymmetricKeyTypes" must be a boolean' } + }; + var registered_claims_schema = { + iat: { isValid: isNumber, message: '"iat" should be a number of seconds' }, + exp: { isValid: isNumber, message: '"exp" should be a number of seconds' }, + nbf: { isValid: isNumber, message: '"nbf" should be a number of seconds' } + }; + function validate2(schema, allowUnknown, object, parameterName) { + if (!isPlainObject(object)) { + throw new Error('Expected "' + parameterName + '" to be a plain object.'); + } + Object.keys(object).forEach(function(key) { + const validator = schema[key]; + if (!validator) { + if (!allowUnknown) { + throw new Error('"' + key + '" is not allowed in "' + parameterName + '"'); + } + return; + } + if (!validator.isValid(object[key])) { + throw new Error(validator.message); + } + }); + } + function validateOptions(options) { + return validate2(sign_options_schema, false, options, "options"); + } + function validatePayload(payload) { + return validate2(registered_claims_schema, true, payload, "payload"); + } + var options_to_payload = { + "audience": "aud", + "issuer": "iss", + "subject": "sub", + "jwtid": "jti" + }; + var options_for_objects = [ + "expiresIn", + "notBefore", + "noTimestamp", + "audience", + "issuer", + "subject", + "jwtid" + ]; + module2.exports = function(payload, secretOrPrivateKey, options, callback) { + if (typeof options === "function") { + callback = options; + options = {}; + } else { + options = options || {}; + } + const isObjectPayload = typeof payload === "object" && !Buffer.isBuffer(payload); + const header = Object.assign({ + alg: options.algorithm || "HS256", + typ: isObjectPayload ? "JWT" : void 0, + kid: options.keyid + }, options.header); + function failure(err) { + if (callback) { + return callback(err); + } + throw err; + } + if (!secretOrPrivateKey && options.algorithm !== "none") { + return failure(new Error("secretOrPrivateKey must have a value")); + } + if (secretOrPrivateKey != null && !(secretOrPrivateKey instanceof KeyObject)) { + try { + secretOrPrivateKey = createPrivateKey(secretOrPrivateKey); + } catch (_2) { + try { + secretOrPrivateKey = createSecretKey(typeof secretOrPrivateKey === "string" ? Buffer.from(secretOrPrivateKey) : secretOrPrivateKey); + } catch (_3) { + return failure(new Error("secretOrPrivateKey is not valid key material")); + } + } + } + if (header.alg.startsWith("HS") && secretOrPrivateKey.type !== "secret") { + return failure(new Error(`secretOrPrivateKey must be a symmetric key when using ${header.alg}`)); + } else if (/^(?:RS|PS|ES)/.test(header.alg)) { + if (secretOrPrivateKey.type !== "private") { + return failure(new Error(`secretOrPrivateKey must be an asymmetric key when using ${header.alg}`)); + } + if (!options.allowInsecureKeySizes && !header.alg.startsWith("ES") && secretOrPrivateKey.asymmetricKeyDetails !== void 0 && //KeyObject.asymmetricKeyDetails is supported in Node 15+ + secretOrPrivateKey.asymmetricKeyDetails.modulusLength < 2048) { + return failure(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)); + } + } + if (typeof payload === "undefined") { + return failure(new Error("payload is required")); + } else if (isObjectPayload) { + try { + validatePayload(payload); + } catch (error) { + return failure(error); + } + if (!options.mutatePayload) { + payload = Object.assign({}, payload); + } + } else { + const invalid_options = options_for_objects.filter(function(opt) { + return typeof options[opt] !== "undefined"; + }); + if (invalid_options.length > 0) { + return failure(new Error("invalid " + invalid_options.join(",") + " option for " + typeof payload + " payload")); + } + } + if (typeof payload.exp !== "undefined" && typeof options.expiresIn !== "undefined") { + return failure(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.')); + } + if (typeof payload.nbf !== "undefined" && typeof options.notBefore !== "undefined") { + return failure(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.')); + } + try { + validateOptions(options); + } catch (error) { + return failure(error); + } + if (!options.allowInvalidAsymmetricKeyTypes) { + try { + validateAsymmetricKey(header.alg, secretOrPrivateKey); + } catch (error) { + return failure(error); + } + } + const timestamp = payload.iat || Math.floor(Date.now() / 1e3); + if (options.noTimestamp) { + delete payload.iat; + } else if (isObjectPayload) { + payload.iat = timestamp; + } + if (typeof options.notBefore !== "undefined") { + try { + payload.nbf = timespan(options.notBefore, timestamp); + } catch (err) { + return failure(err); + } + if (typeof payload.nbf === "undefined") { + return failure(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); + } + } + if (typeof options.expiresIn !== "undefined" && typeof payload === "object") { + try { + payload.exp = timespan(options.expiresIn, timestamp); + } catch (err) { + return failure(err); + } + if (typeof payload.exp === "undefined") { + return failure(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); + } + } + Object.keys(options_to_payload).forEach(function(key) { + const claim = options_to_payload[key]; + if (typeof options[key] !== "undefined") { + if (typeof payload[claim] !== "undefined") { + return failure(new Error('Bad "options.' + key + '" option. The payload already has an "' + claim + '" property.')); + } + payload[claim] = options[key]; + } + }); + const encoding = options.encoding || "utf8"; + if (typeof callback === "function") { + callback = callback && once(callback); + jws.createSign({ + header, + privateKey: secretOrPrivateKey, + payload, + encoding + }).once("error", callback).once("done", function(signature) { + if (!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) { + return callback(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)); + } + callback(null, signature); + }); + } else { + let signature = jws.sign({ header, payload, secret: secretOrPrivateKey, encoding }); + if (!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) { + throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`); + } + return signature; + } + }; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/index.js +var require_jsonwebtoken = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.2/node_modules/jsonwebtoken/index.js"(exports2, module2) { + module2.exports = { + decode: require_decode(), + verify: require_verify(), + sign: require_sign2(), + JsonWebTokenError: require_JsonWebTokenError(), + NotBeforeError: require_NotBeforeError(), + TokenExpiredError: require_TokenExpiredError() + }; + } +}); + +// ../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/dist/jwt.service.js +var require_jwt_service = __commonJS({ + "../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/dist/jwt.service.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.JwtService = void 0; + var common_12 = require_common(); + var jwt = require_jsonwebtoken(); + var interfaces_1 = require_interfaces12(); + var jwt_constants_1 = require_jwt_constants(); + var jwt_errors_1 = require_jwt_errors(); + var JwtService = class JwtService { + constructor(options = {}) { + this.options = options; + this.logger = new common_12.Logger("JwtService"); + } + sign(payload, options) { + const signOptions = this.mergeJwtOptions({ ...options }, "signOptions"); + const secret = this.getSecretKey(payload, options, "privateKey", interfaces_1.JwtSecretRequestType.SIGN); + if (secret instanceof Promise) { + secret.catch(() => { + }); + this.logger.warn('For async version of "secretOrKeyProvider", please use "signAsync".'); + throw new jwt_errors_1.WrongSecretProviderError(); + } + const allowedSignOptKeys = ["secret", "privateKey"]; + const signOptKeys = Object.keys(signOptions); + if (typeof payload === "string" && signOptKeys.some((k) => !allowedSignOptKeys.includes(k))) { + throw new Error("Payload as string is not allowed with the following sign options: " + signOptKeys.join(", ")); + } + return jwt.sign(payload, secret, signOptions); + } + signAsync(payload, options) { + const signOptions = this.mergeJwtOptions({ ...options }, "signOptions"); + const secret = this.getSecretKey(payload, options, "privateKey", interfaces_1.JwtSecretRequestType.SIGN); + const allowedSignOptKeys = ["secret", "privateKey"]; + const signOptKeys = Object.keys(signOptions); + if (typeof payload === "string" && signOptKeys.some((k) => !allowedSignOptKeys.includes(k))) { + throw new Error("Payload as string is not allowed with the following sign options: " + signOptKeys.join(", ")); + } + return new Promise((resolve, reject) => Promise.resolve().then(() => secret).then((scrt) => { + jwt.sign(payload, scrt, signOptions, (err, encoded) => err ? reject(err) : resolve(encoded)); + })); + } + verify(token, options) { + const verifyOptions = this.mergeJwtOptions({ ...options }, "verifyOptions"); + const secret = this.getSecretKey(token, options, "publicKey", interfaces_1.JwtSecretRequestType.VERIFY); + if (secret instanceof Promise) { + secret.catch(() => { + }); + this.logger.warn('For async version of "secretOrKeyProvider", please use "verifyAsync".'); + throw new jwt_errors_1.WrongSecretProviderError(); + } + return jwt.verify(token, secret, verifyOptions); + } + verifyAsync(token, options) { + const verifyOptions = this.mergeJwtOptions({ ...options }, "verifyOptions"); + const secret = this.getSecretKey(token, options, "publicKey", interfaces_1.JwtSecretRequestType.VERIFY); + return new Promise((resolve, reject) => Promise.resolve().then(() => secret).then((scrt) => { + jwt.verify(token, scrt, verifyOptions, (err, decoded) => err ? reject(err) : resolve(decoded)); + }).catch(reject)); + } + decode(token, options) { + return jwt.decode(token, options); + } + mergeJwtOptions(options, key) { + delete options.secret; + if (key === "signOptions") { + delete options.privateKey; + } else { + delete options.publicKey; + } + return options ? { + ...this.options[key] || {}, + ...options + } : this.options[key]; + } + overrideSecretFromOptions(secret) { + if (this.options.secretOrPrivateKey) { + this.logger.warn(`"secretOrPrivateKey" has been deprecated, please use the new explicit "secret" or use "secretOrKeyProvider" or "privateKey"/"publicKey" exclusively.`); + secret = this.options.secretOrPrivateKey; + } + return secret; + } + getSecretKey(token, options, key, secretRequestType) { + const secret = this.options.secretOrKeyProvider ? this.options.secretOrKeyProvider(secretRequestType, token, options) : options?.secret || this.options.secret || (key === "privateKey" ? options?.privateKey || this.options.privateKey : options?.publicKey || this.options.publicKey) || this.options[key]; + return secret instanceof Promise ? secret.then((sec) => this.overrideSecretFromOptions(sec)) : this.overrideSecretFromOptions(secret); + } + }; + exports2.JwtService = JwtService; + exports2.JwtService = JwtService = __decorate2([ + (0, common_12.Injectable)(), + __param2(0, (0, common_12.Optional)()), + __param2(0, (0, common_12.Inject)(jwt_constants_1.JWT_MODULE_OPTIONS)), + __metadata2("design:paramtypes", [Object]) + ], JwtService); + } +}); + +// ../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/dist/jwt.module.js +var require_jwt_module = __commonJS({ + "../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/dist/jwt.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var JwtModule_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.JwtModule = void 0; + var common_12 = require_common(); + var jwt_constants_1 = require_jwt_constants(); + var jwt_providers_1 = require_jwt_providers(); + var jwt_service_1 = require_jwt_service(); + var JwtModule = JwtModule_1 = class JwtModule { + static register(options) { + return { + module: JwtModule_1, + global: options.global, + providers: (0, jwt_providers_1.createJwtProvider)(options) + }; + } + static registerAsync(options) { + return { + module: JwtModule_1, + global: options.global, + imports: options.imports || [], + providers: [ + ...this.createAsyncProviders(options), + ...options.extraProviders ?? [] + ] + }; + } + static createAsyncProviders(options) { + if (options.useExisting || options.useFactory) { + return [this.createAsyncOptionsProvider(options)]; + } + return [ + this.createAsyncOptionsProvider(options), + { + provide: options.useClass, + useClass: options.useClass + } + ]; + } + static createAsyncOptionsProvider(options) { + if (options.useFactory) { + return { + provide: jwt_constants_1.JWT_MODULE_OPTIONS, + useFactory: options.useFactory, + inject: options.inject || [] + }; + } + return { + provide: jwt_constants_1.JWT_MODULE_OPTIONS, + useFactory: async (optionsFactory) => await optionsFactory.createJwtOptions(), + inject: [options.useExisting || options.useClass] + }; + } + }; + exports2.JwtModule = JwtModule; + exports2.JwtModule = JwtModule = JwtModule_1 = __decorate2([ + (0, common_12.Module)({ + providers: [jwt_service_1.JwtService], + exports: [jwt_service_1.JwtService] + }) + ], JwtModule); + } +}); + +// ../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/dist/index.js +var require_dist11 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/dist/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.JsonWebTokenError = exports2.NotBeforeError = exports2.TokenExpiredError = void 0; + __exportStar2(require_interfaces12(), exports2); + __exportStar2(require_jwt_errors(), exports2); + __exportStar2(require_jwt_module(), exports2); + __exportStar2(require_jwt_service(), exports2); + var jsonwebtoken_1 = require_jsonwebtoken(); + Object.defineProperty(exports2, "TokenExpiredError", { enumerable: true, get: function() { + return jsonwebtoken_1.TokenExpiredError; + } }); + Object.defineProperty(exports2, "NotBeforeError", { enumerable: true, get: function() { + return jsonwebtoken_1.NotBeforeError; + } }); + Object.defineProperty(exports2, "JsonWebTokenError", { enumerable: true, get: function() { + return jsonwebtoken_1.JsonWebTokenError; + } }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/index.js +var require_jwt = __commonJS({ + "../../node_modules/.pnpm/@nestjs+jwt@10.2.0_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_rckjpaoa6n2olcmw4itpv4i7uu/node_modules/@nestjs/jwt/index.js"(exports2) { + "use strict"; + function __export2(m) { + for (var p in m) if (!exports2.hasOwnProperty(p)) exports2[p] = m[p]; + } + exports2.__esModule = true; + __export2(require_dist11()); + } +}); + +// ../../node_modules/.pnpm/bcryptjs@3.0.3/node_modules/bcryptjs/umd/index.js +var require_umd = __commonJS({ + "../../node_modules/.pnpm/bcryptjs@3.0.3/node_modules/bcryptjs/umd/index.js"(exports2, module2) { + (function(global2, factory) { + function preferDefault(exports3) { + return exports3.default || exports3; + } + if (typeof define === "function" && define.amd) { + define(["crypto"], function(_crypto) { + var exports3 = {}; + factory(exports3, _crypto); + return preferDefault(exports3); + }); + } else if (typeof exports2 === "object") { + factory(exports2, require("crypto")); + if (typeof module2 === "object") module2.exports = preferDefault(exports2); + } else { + (function() { + var exports3 = {}; + factory(exports3, global2.crypto); + global2.bcrypt = preferDefault(exports3); + })(); + } + })( + typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : exports2, + function(_exports, _crypto) { + "use strict"; + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.compare = compare; + _exports.compareSync = compareSync; + _exports.decodeBase64 = decodeBase64; + _exports.default = void 0; + _exports.encodeBase64 = encodeBase64; + _exports.genSalt = genSalt; + _exports.genSaltSync = genSaltSync; + _exports.getRounds = getRounds; + _exports.getSalt = getSalt; + _exports.hash = hash; + _exports.hashSync = hashSync; + _exports.setRandomFallback = setRandomFallback; + _exports.truncates = truncates; + _crypto = _interopRequireDefault(_crypto); + function _interopRequireDefault(e) { + return e && e.__esModule ? e : { default: e }; + } + var randomFallback = null; + function randomBytes(len) { + try { + return crypto.getRandomValues(new Uint8Array(len)); + } catch { + } + try { + return _crypto.default.randomBytes(len); + } catch { + } + if (!randomFallback) { + throw Error( + "Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative" + ); + } + return randomFallback(len); + } + function setRandomFallback(random) { + randomFallback = random; + } + function genSaltSync(rounds, seed_length) { + rounds = rounds || GENSALT_DEFAULT_LOG2_ROUNDS; + if (typeof rounds !== "number") + throw Error( + "Illegal arguments: " + typeof rounds + ", " + typeof seed_length + ); + if (rounds < 4) rounds = 4; + else if (rounds > 31) rounds = 31; + var salt = []; + salt.push("$2b$"); + if (rounds < 10) salt.push("0"); + salt.push(rounds.toString()); + salt.push("$"); + salt.push(base64_encode(randomBytes(BCRYPT_SALT_LEN), BCRYPT_SALT_LEN)); + return salt.join(""); + } + function genSalt(rounds, seed_length, callback) { + if (typeof seed_length === "function") + callback = seed_length, seed_length = void 0; + if (typeof rounds === "function") + callback = rounds, rounds = void 0; + if (typeof rounds === "undefined") rounds = GENSALT_DEFAULT_LOG2_ROUNDS; + else if (typeof rounds !== "number") + throw Error("illegal arguments: " + typeof rounds); + function _async(callback2) { + nextTick(function() { + try { + callback2(null, genSaltSync(rounds)); + } catch (err) { + callback2(err); + } + }); + } + if (callback) { + if (typeof callback !== "function") + throw Error("Illegal callback: " + typeof callback); + _async(callback); + } else + return new Promise(function(resolve, reject) { + _async(function(err, res) { + if (err) { + reject(err); + return; + } + resolve(res); + }); + }); + } + function hashSync(password, salt) { + if (typeof salt === "undefined") salt = GENSALT_DEFAULT_LOG2_ROUNDS; + if (typeof salt === "number") salt = genSaltSync(salt); + if (typeof password !== "string" || typeof salt !== "string") + throw Error( + "Illegal arguments: " + typeof password + ", " + typeof salt + ); + return _hash(password, salt); + } + function hash(password, salt, callback, progressCallback) { + function _async(callback2) { + if (typeof password === "string" && typeof salt === "number") + genSalt(salt, function(err, salt2) { + _hash(password, salt2, callback2, progressCallback); + }); + else if (typeof password === "string" && typeof salt === "string") + _hash(password, salt, callback2, progressCallback); + else + nextTick( + callback2.bind( + this, + Error( + "Illegal arguments: " + typeof password + ", " + typeof salt + ) + ) + ); + } + if (callback) { + if (typeof callback !== "function") + throw Error("Illegal callback: " + typeof callback); + _async(callback); + } else + return new Promise(function(resolve, reject) { + _async(function(err, res) { + if (err) { + reject(err); + return; + } + resolve(res); + }); + }); + } + function safeStringCompare(known, unknown) { + var diff = known.length ^ unknown.length; + for (var i = 0; i < known.length; ++i) { + diff |= known.charCodeAt(i) ^ unknown.charCodeAt(i); + } + return diff === 0; + } + function compareSync(password, hash2) { + if (typeof password !== "string" || typeof hash2 !== "string") + throw Error( + "Illegal arguments: " + typeof password + ", " + typeof hash2 + ); + if (hash2.length !== 60) return false; + return safeStringCompare( + hashSync(password, hash2.substring(0, hash2.length - 31)), + hash2 + ); + } + function compare(password, hashValue, callback, progressCallback) { + function _async(callback2) { + if (typeof password !== "string" || typeof hashValue !== "string") { + nextTick( + callback2.bind( + this, + Error( + "Illegal arguments: " + typeof password + ", " + typeof hashValue + ) + ) + ); + return; + } + if (hashValue.length !== 60) { + nextTick(callback2.bind(this, null, false)); + return; + } + hash( + password, + hashValue.substring(0, 29), + function(err, comp) { + if (err) callback2(err); + else callback2(null, safeStringCompare(comp, hashValue)); + }, + progressCallback + ); + } + if (callback) { + if (typeof callback !== "function") + throw Error("Illegal callback: " + typeof callback); + _async(callback); + } else + return new Promise(function(resolve, reject) { + _async(function(err, res) { + if (err) { + reject(err); + return; + } + resolve(res); + }); + }); + } + function getRounds(hash2) { + if (typeof hash2 !== "string") + throw Error("Illegal arguments: " + typeof hash2); + return parseInt(hash2.split("$")[2], 10); + } + function getSalt(hash2) { + if (typeof hash2 !== "string") + throw Error("Illegal arguments: " + typeof hash2); + if (hash2.length !== 60) + throw Error("Illegal hash length: " + hash2.length + " != 60"); + return hash2.substring(0, 29); + } + function truncates(password) { + if (typeof password !== "string") + throw Error("Illegal arguments: " + typeof password); + return utf8Length(password) > 72; + } + var nextTick = typeof setImmediate === "function" ? setImmediate : typeof scheduler === "object" && typeof scheduler.postTask === "function" ? scheduler.postTask.bind(scheduler) : setTimeout; + function utf8Length(string) { + var len = 0, c = 0; + for (var i = 0; i < string.length; ++i) { + c = string.charCodeAt(i); + if (c < 128) len += 1; + else if (c < 2048) len += 2; + else if ((c & 64512) === 55296 && (string.charCodeAt(i + 1) & 64512) === 56320) { + ++i; + len += 4; + } else len += 3; + } + return len; + } + function utf8Array(string) { + var offset = 0, c1, c2; + var buffer = new Array(utf8Length(string)); + for (var i = 0, k = string.length; i < k; ++i) { + c1 = string.charCodeAt(i); + if (c1 < 128) { + buffer[offset++] = c1; + } else if (c1 < 2048) { + buffer[offset++] = c1 >> 6 | 192; + buffer[offset++] = c1 & 63 | 128; + } else if ((c1 & 64512) === 55296 && ((c2 = string.charCodeAt(i + 1)) & 64512) === 56320) { + c1 = 65536 + ((c1 & 1023) << 10) + (c2 & 1023); + ++i; + buffer[offset++] = c1 >> 18 | 240; + buffer[offset++] = c1 >> 12 & 63 | 128; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } else { + buffer[offset++] = c1 >> 12 | 224; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } + } + return buffer; + } + var BASE64_CODE = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split( + "" + ); + var BASE64_INDEX = [ + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + 0, + 1, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + -1, + -1, + -1, + -1, + -1, + -1, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + -1, + -1, + -1, + -1, + -1 + ]; + function base64_encode(b, len) { + var off = 0, rs = [], c1, c2; + if (len <= 0 || len > b.length) throw Error("Illegal len: " + len); + while (off < len) { + c1 = b[off++] & 255; + rs.push(BASE64_CODE[c1 >> 2 & 63]); + c1 = (c1 & 3) << 4; + if (off >= len) { + rs.push(BASE64_CODE[c1 & 63]); + break; + } + c2 = b[off++] & 255; + c1 |= c2 >> 4 & 15; + rs.push(BASE64_CODE[c1 & 63]); + c1 = (c2 & 15) << 2; + if (off >= len) { + rs.push(BASE64_CODE[c1 & 63]); + break; + } + c2 = b[off++] & 255; + c1 |= c2 >> 6 & 3; + rs.push(BASE64_CODE[c1 & 63]); + rs.push(BASE64_CODE[c2 & 63]); + } + return rs.join(""); + } + function base64_decode(s, len) { + var off = 0, slen = s.length, olen = 0, rs = [], c1, c2, c3, c4, o, code; + if (len <= 0) throw Error("Illegal len: " + len); + while (off < slen - 1 && olen < len) { + code = s.charCodeAt(off++); + c1 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + code = s.charCodeAt(off++); + c2 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + if (c1 == -1 || c2 == -1) break; + o = c1 << 2 >>> 0; + o |= (c2 & 48) >> 4; + rs.push(String.fromCharCode(o)); + if (++olen >= len || off >= slen) break; + code = s.charCodeAt(off++); + c3 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + if (c3 == -1) break; + o = (c2 & 15) << 4 >>> 0; + o |= (c3 & 60) >> 2; + rs.push(String.fromCharCode(o)); + if (++olen >= len || off >= slen) break; + code = s.charCodeAt(off++); + c4 = code < BASE64_INDEX.length ? BASE64_INDEX[code] : -1; + o = (c3 & 3) << 6 >>> 0; + o |= c4; + rs.push(String.fromCharCode(o)); + ++olen; + } + var res = []; + for (off = 0; off < olen; off++) res.push(rs[off].charCodeAt(0)); + return res; + } + var BCRYPT_SALT_LEN = 16; + var GENSALT_DEFAULT_LOG2_ROUNDS = 10; + var BLOWFISH_NUM_ROUNDS = 16; + var MAX_EXECUTION_TIME = 100; + var P_ORIG = [ + 608135816, + 2242054355, + 320440878, + 57701188, + 2752067618, + 698298832, + 137296536, + 3964562569, + 1160258022, + 953160567, + 3193202383, + 887688300, + 3232508343, + 3380367581, + 1065670069, + 3041331479, + 2450970073, + 2306472731 + ]; + var S_ORIG = [ + 3509652390, + 2564797868, + 805139163, + 3491422135, + 3101798381, + 1780907670, + 3128725573, + 4046225305, + 614570311, + 3012652279, + 134345442, + 2240740374, + 1667834072, + 1901547113, + 2757295779, + 4103290238, + 227898511, + 1921955416, + 1904987480, + 2182433518, + 2069144605, + 3260701109, + 2620446009, + 720527379, + 3318853667, + 677414384, + 3393288472, + 3101374703, + 2390351024, + 1614419982, + 1822297739, + 2954791486, + 3608508353, + 3174124327, + 2024746970, + 1432378464, + 3864339955, + 2857741204, + 1464375394, + 1676153920, + 1439316330, + 715854006, + 3033291828, + 289532110, + 2706671279, + 2087905683, + 3018724369, + 1668267050, + 732546397, + 1947742710, + 3462151702, + 2609353502, + 2950085171, + 1814351708, + 2050118529, + 680887927, + 999245976, + 1800124847, + 3300911131, + 1713906067, + 1641548236, + 4213287313, + 1216130144, + 1575780402, + 4018429277, + 3917837745, + 3693486850, + 3949271944, + 596196993, + 3549867205, + 258830323, + 2213823033, + 772490370, + 2760122372, + 1774776394, + 2652871518, + 566650946, + 4142492826, + 1728879713, + 2882767088, + 1783734482, + 3629395816, + 2517608232, + 2874225571, + 1861159788, + 326777828, + 3124490320, + 2130389656, + 2716951837, + 967770486, + 1724537150, + 2185432712, + 2364442137, + 1164943284, + 2105845187, + 998989502, + 3765401048, + 2244026483, + 1075463327, + 1455516326, + 1322494562, + 910128902, + 469688178, + 1117454909, + 936433444, + 3490320968, + 3675253459, + 1240580251, + 122909385, + 2157517691, + 634681816, + 4142456567, + 3825094682, + 3061402683, + 2540495037, + 79693498, + 3249098678, + 1084186820, + 1583128258, + 426386531, + 1761308591, + 1047286709, + 322548459, + 995290223, + 1845252383, + 2603652396, + 3431023940, + 2942221577, + 3202600964, + 3727903485, + 1712269319, + 422464435, + 3234572375, + 1170764815, + 3523960633, + 3117677531, + 1434042557, + 442511882, + 3600875718, + 1076654713, + 1738483198, + 4213154764, + 2393238008, + 3677496056, + 1014306527, + 4251020053, + 793779912, + 2902807211, + 842905082, + 4246964064, + 1395751752, + 1040244610, + 2656851899, + 3396308128, + 445077038, + 3742853595, + 3577915638, + 679411651, + 2892444358, + 2354009459, + 1767581616, + 3150600392, + 3791627101, + 3102740896, + 284835224, + 4246832056, + 1258075500, + 768725851, + 2589189241, + 3069724005, + 3532540348, + 1274779536, + 3789419226, + 2764799539, + 1660621633, + 3471099624, + 4011903706, + 913787905, + 3497959166, + 737222580, + 2514213453, + 2928710040, + 3937242737, + 1804850592, + 3499020752, + 2949064160, + 2386320175, + 2390070455, + 2415321851, + 4061277028, + 2290661394, + 2416832540, + 1336762016, + 1754252060, + 3520065937, + 3014181293, + 791618072, + 3188594551, + 3933548030, + 2332172193, + 3852520463, + 3043980520, + 413987798, + 3465142937, + 3030929376, + 4245938359, + 2093235073, + 3534596313, + 375366246, + 2157278981, + 2479649556, + 555357303, + 3870105701, + 2008414854, + 3344188149, + 4221384143, + 3956125452, + 2067696032, + 3594591187, + 2921233993, + 2428461, + 544322398, + 577241275, + 1471733935, + 610547355, + 4027169054, + 1432588573, + 1507829418, + 2025931657, + 3646575487, + 545086370, + 48609733, + 2200306550, + 1653985193, + 298326376, + 1316178497, + 3007786442, + 2064951626, + 458293330, + 2589141269, + 3591329599, + 3164325604, + 727753846, + 2179363840, + 146436021, + 1461446943, + 4069977195, + 705550613, + 3059967265, + 3887724982, + 4281599278, + 3313849956, + 1404054877, + 2845806497, + 146425753, + 1854211946, + 1266315497, + 3048417604, + 3681880366, + 3289982499, + 290971e4, + 1235738493, + 2632868024, + 2414719590, + 3970600049, + 1771706367, + 1449415276, + 3266420449, + 422970021, + 1963543593, + 2690192192, + 3826793022, + 1062508698, + 1531092325, + 1804592342, + 2583117782, + 2714934279, + 4024971509, + 1294809318, + 4028980673, + 1289560198, + 2221992742, + 1669523910, + 35572830, + 157838143, + 1052438473, + 1016535060, + 1802137761, + 1753167236, + 1386275462, + 3080475397, + 2857371447, + 1040679964, + 2145300060, + 2390574316, + 1461121720, + 2956646967, + 4031777805, + 4028374788, + 33600511, + 2920084762, + 1018524850, + 629373528, + 3691585981, + 3515945977, + 2091462646, + 2486323059, + 586499841, + 988145025, + 935516892, + 3367335476, + 2599673255, + 2839830854, + 265290510, + 3972581182, + 2759138881, + 3795373465, + 1005194799, + 847297441, + 406762289, + 1314163512, + 1332590856, + 1866599683, + 4127851711, + 750260880, + 613907577, + 1450815602, + 3165620655, + 3734664991, + 3650291728, + 3012275730, + 3704569646, + 1427272223, + 778793252, + 1343938022, + 2676280711, + 2052605720, + 1946737175, + 3164576444, + 3914038668, + 3967478842, + 3682934266, + 1661551462, + 3294938066, + 4011595847, + 840292616, + 3712170807, + 616741398, + 312560963, + 711312465, + 1351876610, + 322626781, + 1910503582, + 271666773, + 2175563734, + 1594956187, + 70604529, + 3617834859, + 1007753275, + 1495573769, + 4069517037, + 2549218298, + 2663038764, + 504708206, + 2263041392, + 3941167025, + 2249088522, + 1514023603, + 1998579484, + 1312622330, + 694541497, + 2582060303, + 2151582166, + 1382467621, + 776784248, + 2618340202, + 3323268794, + 2497899128, + 2784771155, + 503983604, + 4076293799, + 907881277, + 423175695, + 432175456, + 1378068232, + 4145222326, + 3954048622, + 3938656102, + 3820766613, + 2793130115, + 2977904593, + 26017576, + 3274890735, + 3194772133, + 1700274565, + 1756076034, + 4006520079, + 3677328699, + 720338349, + 1533947780, + 354530856, + 688349552, + 3973924725, + 1637815568, + 332179504, + 3949051286, + 53804574, + 2852348879, + 3044236432, + 1282449977, + 3583942155, + 3416972820, + 4006381244, + 1617046695, + 2628476075, + 3002303598, + 1686838959, + 431878346, + 2686675385, + 1700445008, + 1080580658, + 1009431731, + 832498133, + 3223435511, + 2605976345, + 2271191193, + 2516031870, + 1648197032, + 4164389018, + 2548247927, + 300782431, + 375919233, + 238389289, + 3353747414, + 2531188641, + 2019080857, + 1475708069, + 455242339, + 2609103871, + 448939670, + 3451063019, + 1395535956, + 2413381860, + 1841049896, + 1491858159, + 885456874, + 4264095073, + 4001119347, + 1565136089, + 3898914787, + 1108368660, + 540939232, + 1173283510, + 2745871338, + 3681308437, + 4207628240, + 3343053890, + 4016749493, + 1699691293, + 1103962373, + 3625875870, + 2256883143, + 3830138730, + 1031889488, + 3479347698, + 1535977030, + 4236805024, + 3251091107, + 2132092099, + 1774941330, + 1199868427, + 1452454533, + 157007616, + 2904115357, + 342012276, + 595725824, + 1480756522, + 206960106, + 497939518, + 591360097, + 863170706, + 2375253569, + 3596610801, + 1814182875, + 2094937945, + 3421402208, + 1082520231, + 3463918190, + 2785509508, + 435703966, + 3908032597, + 1641649973, + 2842273706, + 3305899714, + 1510255612, + 2148256476, + 2655287854, + 3276092548, + 4258621189, + 236887753, + 3681803219, + 274041037, + 1734335097, + 3815195456, + 3317970021, + 1899903192, + 1026095262, + 4050517792, + 356393447, + 2410691914, + 3873677099, + 3682840055, + 3913112168, + 2491498743, + 4132185628, + 2489919796, + 1091903735, + 1979897079, + 3170134830, + 3567386728, + 3557303409, + 857797738, + 1136121015, + 1342202287, + 507115054, + 2535736646, + 337727348, + 3213592640, + 1301675037, + 2528481711, + 1895095763, + 1721773893, + 3216771564, + 62756741, + 2142006736, + 835421444, + 2531993523, + 1442658625, + 3659876326, + 2882144922, + 676362277, + 1392781812, + 170690266, + 3921047035, + 1759253602, + 3611846912, + 1745797284, + 664899054, + 1329594018, + 3901205900, + 3045908486, + 2062866102, + 2865634940, + 3543621612, + 3464012697, + 1080764994, + 553557557, + 3656615353, + 3996768171, + 991055499, + 499776247, + 1265440854, + 648242737, + 3940784050, + 980351604, + 3713745714, + 1749149687, + 3396870395, + 4211799374, + 3640570775, + 1161844396, + 3125318951, + 1431517754, + 545492359, + 4268468663, + 3499529547, + 1437099964, + 2702547544, + 3433638243, + 2581715763, + 2787789398, + 1060185593, + 1593081372, + 2418618748, + 4260947970, + 69676912, + 2159744348, + 86519011, + 2512459080, + 3838209314, + 1220612927, + 3339683548, + 133810670, + 1090789135, + 1078426020, + 1569222167, + 845107691, + 3583754449, + 4072456591, + 1091646820, + 628848692, + 1613405280, + 3757631651, + 526609435, + 236106946, + 48312990, + 2942717905, + 3402727701, + 1797494240, + 859738849, + 992217954, + 4005476642, + 2243076622, + 3870952857, + 3732016268, + 765654824, + 3490871365, + 2511836413, + 1685915746, + 3888969200, + 1414112111, + 2273134842, + 3281911079, + 4080962846, + 172450625, + 2569994100, + 980381355, + 4109958455, + 2819808352, + 2716589560, + 2568741196, + 3681446669, + 3329971472, + 1835478071, + 660984891, + 3704678404, + 4045999559, + 3422617507, + 3040415634, + 1762651403, + 1719377915, + 3470491036, + 2693910283, + 3642056355, + 3138596744, + 1364962596, + 2073328063, + 1983633131, + 926494387, + 3423689081, + 2150032023, + 4096667949, + 1749200295, + 3328846651, + 309677260, + 2016342300, + 1779581495, + 3079819751, + 111262694, + 1274766160, + 443224088, + 298511866, + 1025883608, + 3806446537, + 1145181785, + 168956806, + 3641502830, + 3584813610, + 1689216846, + 3666258015, + 3200248200, + 1692713982, + 2646376535, + 4042768518, + 1618508792, + 1610833997, + 3523052358, + 4130873264, + 2001055236, + 3610705100, + 2202168115, + 4028541809, + 2961195399, + 1006657119, + 2006996926, + 3186142756, + 1430667929, + 3210227297, + 1314452623, + 4074634658, + 4101304120, + 2273951170, + 1399257539, + 3367210612, + 3027628629, + 1190975929, + 2062231137, + 2333990788, + 2221543033, + 2438960610, + 1181637006, + 548689776, + 2362791313, + 3372408396, + 3104550113, + 3145860560, + 296247880, + 1970579870, + 3078560182, + 3769228297, + 1714227617, + 3291629107, + 3898220290, + 166772364, + 1251581989, + 493813264, + 448347421, + 195405023, + 2709975567, + 677966185, + 3703036547, + 1463355134, + 2715995803, + 1338867538, + 1343315457, + 2802222074, + 2684532164, + 233230375, + 2599980071, + 2000651841, + 3277868038, + 1638401717, + 4028070440, + 3237316320, + 6314154, + 819756386, + 300326615, + 590932579, + 1405279636, + 3267499572, + 3150704214, + 2428286686, + 3959192993, + 3461946742, + 1862657033, + 1266418056, + 963775037, + 2089974820, + 2263052895, + 1917689273, + 448879540, + 3550394620, + 3981727096, + 150775221, + 3627908307, + 1303187396, + 508620638, + 2975983352, + 2726630617, + 1817252668, + 1876281319, + 1457606340, + 908771278, + 3720792119, + 3617206836, + 2455994898, + 1729034894, + 1080033504, + 976866871, + 3556439503, + 2881648439, + 1522871579, + 1555064734, + 1336096578, + 3548522304, + 2579274686, + 3574697629, + 3205460757, + 3593280638, + 3338716283, + 3079412587, + 564236357, + 2993598910, + 1781952180, + 1464380207, + 3163844217, + 3332601554, + 1699332808, + 1393555694, + 1183702653, + 3581086237, + 1288719814, + 691649499, + 2847557200, + 2895455976, + 3193889540, + 2717570544, + 1781354906, + 1676643554, + 2592534050, + 3230253752, + 1126444790, + 2770207658, + 2633158820, + 2210423226, + 2615765581, + 2414155088, + 3127139286, + 673620729, + 2805611233, + 1269405062, + 4015350505, + 3341807571, + 4149409754, + 1057255273, + 2012875353, + 2162469141, + 2276492801, + 2601117357, + 993977747, + 3918593370, + 2654263191, + 753973209, + 36408145, + 2530585658, + 25011837, + 3520020182, + 2088578344, + 530523599, + 2918365339, + 1524020338, + 1518925132, + 3760827505, + 3759777254, + 1202760957, + 3985898139, + 3906192525, + 674977740, + 4174734889, + 2031300136, + 2019492241, + 3983892565, + 4153806404, + 3822280332, + 352677332, + 2297720250, + 60907813, + 90501309, + 3286998549, + 1016092578, + 2535922412, + 2839152426, + 457141659, + 509813237, + 4120667899, + 652014361, + 1966332200, + 2975202805, + 55981186, + 2327461051, + 676427537, + 3255491064, + 2882294119, + 3433927263, + 1307055953, + 942726286, + 933058658, + 2468411793, + 3933900994, + 4215176142, + 1361170020, + 2001714738, + 2830558078, + 3274259782, + 1222529897, + 1679025792, + 2729314320, + 3714953764, + 1770335741, + 151462246, + 3013232138, + 1682292957, + 1483529935, + 471910574, + 1539241949, + 458788160, + 3436315007, + 1807016891, + 3718408830, + 978976581, + 1043663428, + 3165965781, + 1927990952, + 4200891579, + 2372276910, + 3208408903, + 3533431907, + 1412390302, + 2931980059, + 4132332400, + 1947078029, + 3881505623, + 4168226417, + 2941484381, + 1077988104, + 1320477388, + 886195818, + 18198404, + 3786409e3, + 2509781533, + 112762804, + 3463356488, + 1866414978, + 891333506, + 18488651, + 661792760, + 1628790961, + 3885187036, + 3141171499, + 876946877, + 2693282273, + 1372485963, + 791857591, + 2686433993, + 3759982718, + 3167212022, + 3472953795, + 2716379847, + 445679433, + 3561995674, + 3504004811, + 3574258232, + 54117162, + 3331405415, + 2381918588, + 3769707343, + 4154350007, + 1140177722, + 4074052095, + 668550556, + 3214352940, + 367459370, + 261225585, + 2610173221, + 4209349473, + 3468074219, + 3265815641, + 314222801, + 3066103646, + 3808782860, + 282218597, + 3406013506, + 3773591054, + 379116347, + 1285071038, + 846784868, + 2669647154, + 3771962079, + 3550491691, + 2305946142, + 453669953, + 1268987020, + 3317592352, + 3279303384, + 3744833421, + 2610507566, + 3859509063, + 266596637, + 3847019092, + 517658769, + 3462560207, + 3443424879, + 370717030, + 4247526661, + 2224018117, + 4143653529, + 4112773975, + 2788324899, + 2477274417, + 1456262402, + 2901442914, + 1517677493, + 1846949527, + 2295493580, + 3734397586, + 2176403920, + 1280348187, + 1908823572, + 3871786941, + 846861322, + 1172426758, + 3287448474, + 3383383037, + 1655181056, + 3139813346, + 901632758, + 1897031941, + 2986607138, + 3066810236, + 3447102507, + 1393639104, + 373351379, + 950779232, + 625454576, + 3124240540, + 4148612726, + 2007998917, + 544563296, + 2244738638, + 2330496472, + 2058025392, + 1291430526, + 424198748, + 50039436, + 29584100, + 3605783033, + 2429876329, + 2791104160, + 1057563949, + 3255363231, + 3075367218, + 3463963227, + 1469046755, + 985887462 + ]; + var C_ORIG = [ + 1332899944, + 1700884034, + 1701343084, + 1684370003, + 1668446532, + 1869963892 + ]; + function _encipher(lr, off, P, S) { + var n, l2 = lr[off], r = lr[off + 1]; + l2 ^= P[0]; + n = S[l2 >>> 24]; + n += S[256 | l2 >> 16 & 255]; + n ^= S[512 | l2 >> 8 & 255]; + n += S[768 | l2 & 255]; + r ^= n ^ P[1]; + n = S[r >>> 24]; + n += S[256 | r >> 16 & 255]; + n ^= S[512 | r >> 8 & 255]; + n += S[768 | r & 255]; + l2 ^= n ^ P[2]; + n = S[l2 >>> 24]; + n += S[256 | l2 >> 16 & 255]; + n ^= S[512 | l2 >> 8 & 255]; + n += S[768 | l2 & 255]; + r ^= n ^ P[3]; + n = S[r >>> 24]; + n += S[256 | r >> 16 & 255]; + n ^= S[512 | r >> 8 & 255]; + n += S[768 | r & 255]; + l2 ^= n ^ P[4]; + n = S[l2 >>> 24]; + n += S[256 | l2 >> 16 & 255]; + n ^= S[512 | l2 >> 8 & 255]; + n += S[768 | l2 & 255]; + r ^= n ^ P[5]; + n = S[r >>> 24]; + n += S[256 | r >> 16 & 255]; + n ^= S[512 | r >> 8 & 255]; + n += S[768 | r & 255]; + l2 ^= n ^ P[6]; + n = S[l2 >>> 24]; + n += S[256 | l2 >> 16 & 255]; + n ^= S[512 | l2 >> 8 & 255]; + n += S[768 | l2 & 255]; + r ^= n ^ P[7]; + n = S[r >>> 24]; + n += S[256 | r >> 16 & 255]; + n ^= S[512 | r >> 8 & 255]; + n += S[768 | r & 255]; + l2 ^= n ^ P[8]; + n = S[l2 >>> 24]; + n += S[256 | l2 >> 16 & 255]; + n ^= S[512 | l2 >> 8 & 255]; + n += S[768 | l2 & 255]; + r ^= n ^ P[9]; + n = S[r >>> 24]; + n += S[256 | r >> 16 & 255]; + n ^= S[512 | r >> 8 & 255]; + n += S[768 | r & 255]; + l2 ^= n ^ P[10]; + n = S[l2 >>> 24]; + n += S[256 | l2 >> 16 & 255]; + n ^= S[512 | l2 >> 8 & 255]; + n += S[768 | l2 & 255]; + r ^= n ^ P[11]; + n = S[r >>> 24]; + n += S[256 | r >> 16 & 255]; + n ^= S[512 | r >> 8 & 255]; + n += S[768 | r & 255]; + l2 ^= n ^ P[12]; + n = S[l2 >>> 24]; + n += S[256 | l2 >> 16 & 255]; + n ^= S[512 | l2 >> 8 & 255]; + n += S[768 | l2 & 255]; + r ^= n ^ P[13]; + n = S[r >>> 24]; + n += S[256 | r >> 16 & 255]; + n ^= S[512 | r >> 8 & 255]; + n += S[768 | r & 255]; + l2 ^= n ^ P[14]; + n = S[l2 >>> 24]; + n += S[256 | l2 >> 16 & 255]; + n ^= S[512 | l2 >> 8 & 255]; + n += S[768 | l2 & 255]; + r ^= n ^ P[15]; + n = S[r >>> 24]; + n += S[256 | r >> 16 & 255]; + n ^= S[512 | r >> 8 & 255]; + n += S[768 | r & 255]; + l2 ^= n ^ P[16]; + lr[off] = r ^ P[BLOWFISH_NUM_ROUNDS + 1]; + lr[off + 1] = l2; + return lr; + } + function _streamtoword(data, offp) { + for (var i = 0, word = 0; i < 4; ++i) + word = word << 8 | data[offp] & 255, offp = (offp + 1) % data.length; + return { + key: word, + offp + }; + } + function _key(key, P, S) { + var offset = 0, lr = [0, 0], plen = P.length, slen = S.length, sw; + for (var i = 0; i < plen; i++) + sw = _streamtoword(key, offset), offset = sw.offp, P[i] = P[i] ^ sw.key; + for (i = 0; i < plen; i += 2) + lr = _encipher(lr, 0, P, S), P[i] = lr[0], P[i + 1] = lr[1]; + for (i = 0; i < slen; i += 2) + lr = _encipher(lr, 0, P, S), S[i] = lr[0], S[i + 1] = lr[1]; + } + function _ekskey(data, key, P, S) { + var offp = 0, lr = [0, 0], plen = P.length, slen = S.length, sw; + for (var i = 0; i < plen; i++) + sw = _streamtoword(key, offp), offp = sw.offp, P[i] = P[i] ^ sw.key; + offp = 0; + for (i = 0; i < plen; i += 2) + sw = _streamtoword(data, offp), offp = sw.offp, lr[0] ^= sw.key, sw = _streamtoword(data, offp), offp = sw.offp, lr[1] ^= sw.key, lr = _encipher(lr, 0, P, S), P[i] = lr[0], P[i + 1] = lr[1]; + for (i = 0; i < slen; i += 2) + sw = _streamtoword(data, offp), offp = sw.offp, lr[0] ^= sw.key, sw = _streamtoword(data, offp), offp = sw.offp, lr[1] ^= sw.key, lr = _encipher(lr, 0, P, S), S[i] = lr[0], S[i + 1] = lr[1]; + } + function _crypt(b, salt, rounds, callback, progressCallback) { + var cdata = C_ORIG.slice(), clen = cdata.length, err; + if (rounds < 4 || rounds > 31) { + err = Error("Illegal number of rounds (4-31): " + rounds); + if (callback) { + nextTick(callback.bind(this, err)); + return; + } else throw err; + } + if (salt.length !== BCRYPT_SALT_LEN) { + err = Error( + "Illegal salt length: " + salt.length + " != " + BCRYPT_SALT_LEN + ); + if (callback) { + nextTick(callback.bind(this, err)); + return; + } else throw err; + } + rounds = 1 << rounds >>> 0; + var P, S, i = 0, j; + if (typeof Int32Array === "function") { + P = new Int32Array(P_ORIG); + S = new Int32Array(S_ORIG); + } else { + P = P_ORIG.slice(); + S = S_ORIG.slice(); + } + _ekskey(salt, b, P, S); + function next() { + if (progressCallback) progressCallback(i / rounds); + if (i < rounds) { + var start = Date.now(); + for (; i < rounds; ) { + i = i + 1; + _key(b, P, S); + _key(salt, P, S); + if (Date.now() - start > MAX_EXECUTION_TIME) break; + } + } else { + for (i = 0; i < 64; i++) + for (j = 0; j < clen >> 1; j++) _encipher(cdata, j << 1, P, S); + var ret2 = []; + for (i = 0; i < clen; i++) + ret2.push((cdata[i] >> 24 & 255) >>> 0), ret2.push((cdata[i] >> 16 & 255) >>> 0), ret2.push((cdata[i] >> 8 & 255) >>> 0), ret2.push((cdata[i] & 255) >>> 0); + if (callback) { + callback(null, ret2); + return; + } else return ret2; + } + if (callback) nextTick(next); + } + if (typeof callback !== "undefined") { + next(); + } else { + var res; + while (true) + if (typeof (res = next()) !== "undefined") return res || []; + } + } + function _hash(password, salt, callback, progressCallback) { + var err; + if (typeof password !== "string" || typeof salt !== "string") { + err = Error("Invalid string / salt: Not a string"); + if (callback) { + nextTick(callback.bind(this, err)); + return; + } else throw err; + } + var minor, offset; + if (salt.charAt(0) !== "$" || salt.charAt(1) !== "2") { + err = Error("Invalid salt version: " + salt.substring(0, 2)); + if (callback) { + nextTick(callback.bind(this, err)); + return; + } else throw err; + } + if (salt.charAt(2) === "$") + minor = String.fromCharCode(0), offset = 3; + else { + minor = salt.charAt(2); + if (minor !== "a" && minor !== "b" && minor !== "y" || salt.charAt(3) !== "$") { + err = Error("Invalid salt revision: " + salt.substring(2, 4)); + if (callback) { + nextTick(callback.bind(this, err)); + return; + } else throw err; + } + offset = 4; + } + if (salt.charAt(offset + 2) > "$") { + err = Error("Missing salt rounds"); + if (callback) { + nextTick(callback.bind(this, err)); + return; + } else throw err; + } + var r1 = parseInt(salt.substring(offset, offset + 1), 10) * 10, r2 = parseInt(salt.substring(offset + 1, offset + 2), 10), rounds = r1 + r2, real_salt = salt.substring(offset + 3, offset + 25); + password += minor >= "a" ? "\0" : ""; + var passwordb = utf8Array(password), saltb = base64_decode(real_salt, BCRYPT_SALT_LEN); + function finish(bytes) { + var res = []; + res.push("$2"); + if (minor >= "a") res.push(minor); + res.push("$"); + if (rounds < 10) res.push("0"); + res.push(rounds.toString()); + res.push("$"); + res.push(base64_encode(saltb, saltb.length)); + res.push(base64_encode(bytes, C_ORIG.length * 4 - 1)); + return res.join(""); + } + if (typeof callback == "undefined") + return finish(_crypt(passwordb, saltb, rounds)); + else { + _crypt( + passwordb, + saltb, + rounds, + function(err2, bytes) { + if (err2) callback(err2, null); + else callback(null, finish(bytes)); + }, + progressCallback + ); + } + } + function encodeBase64(bytes, length) { + return base64_encode(bytes, length); + } + function decodeBase64(string, length) { + return base64_decode(string, length); + } + var _default = _exports.default = { + setRandomFallback, + genSaltSync, + genSalt, + hashSync, + hash, + compareSync, + compare, + getRounds, + getSalt, + truncates, + encodeBase64, + decodeBase64 + }; + } + ); + } +}); + +// dist/src/modules/admin-auth/admin-auth.service.js +var require_admin_auth_service = __commonJS({ + "dist/src/modules/admin-auth/admin-auth.service.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var AdminAuthService_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminAuthService = void 0; + var common_12 = require_common(); + var config_12 = require_config2(); + var jwt_1 = require_jwt(); + var client_1 = require("@prisma/client"); + var bcrypt = require_umd(); + var prisma_service_12 = require_prisma_service(); + var AdminAuthService = AdminAuthService_1 = class AdminAuthService { + constructor(prisma, jwtService, configService) { + this.prisma = prisma; + this.jwtService = jwtService; + this.configService = configService; + this.logger = new common_12.Logger(AdminAuthService_1.name); + } + async onModuleInit() { + await this.seedDefaultSuperAdmin(); + } + async seedDefaultSuperAdmin() { + const adminCount = await this.prisma.admin.count(); + if (adminCount === 0) { + const email = "admin@luckywheel.local"; + const defaultPassword = "Admin@SecurePass2026"; + const passwordHash = await bcrypt.hash(defaultPassword, 10); + await this.prisma.admin.create({ + data: { + name: "\u0645\u062F\u06CC\u0631 \u0627\u0631\u0634\u062F \u0633\u0627\u0645\u0627\u0646\u0647", + email, + mobile: "09120000000", + passwordHash, + role: client_1.AdminRole.SUPER_ADMIN, + status: client_1.AdminStatus.ACTIVE + } + }); + this.logger.log(`[SEED] Default Super Admin created: ${email} / ${defaultPassword}`); + } + } + async login(dto) { + const { email, password } = dto; + const admin = await this.prisma.admin.findUnique({ + where: { email: email.toLowerCase() } + }); + if (!admin) { + throw new common_12.UnauthorizedException("\u0627\u06CC\u0645\u06CC\u0644 \u06CC\u0627 \u06A9\u0644\u0645\u0647 \u0639\u0628\u0648\u0631 \u0627\u0634\u062A\u0628\u0627\u0647 \u0627\u0633\u062A."); + } + if (admin.status !== client_1.AdminStatus.ACTIVE) { + throw new common_12.UnauthorizedException("\u062D\u0633\u0627\u0628 \u06A9\u0627\u0631\u0628\u0631\u06CC \u0645\u062F\u06CC\u0631\u06CC\u062A \u063A\u06CC\u0631\u0641\u0639\u0627\u0644 \u0627\u0633\u062A."); + } + const isMatch = await bcrypt.compare(password, admin.passwordHash); + if (!isMatch) { + throw new common_12.UnauthorizedException("\u0627\u06CC\u0645\u06CC\u0644 \u06CC\u0627 \u06A9\u0644\u0645\u0647 \u0639\u0628\u0648\u0631 \u0627\u0634\u062A\u0628\u0627\u0647 \u0627\u0633\u062A."); + } + const tokens = this.generateAdminTokens(admin); + return { + ...tokens, + admin: { + id: admin.id, + name: admin.name, + email: admin.email, + mobile: admin.mobile, + role: admin.role + } + }; + } + async refreshToken(dto) { + try { + const payload = this.jwtService.verify(dto.refreshToken, { + secret: this.configService.get("JWT_ADMIN_REFRESH_SECRET") + }); + if (payload.type !== "admin_refresh") { + throw new common_12.UnauthorizedException("INVALID_TOKEN_TYPE"); + } + const admin = await this.prisma.admin.findUnique({ + where: { id: payload.sub } + }); + if (!admin || admin.status !== client_1.AdminStatus.ACTIVE) { + throw new common_12.UnauthorizedException("ADMIN_NOT_FOUND_OR_DISABLED"); + } + const accessToken = this.jwtService.sign({ + sub: admin.id, + email: admin.email, + role: admin.role, + type: "admin" + }, { + secret: this.configService.get("JWT_ADMIN_ACCESS_SECRET"), + expiresIn: this.configService.get("JWT_ADMIN_ACCESS_EXPIRES_IN", "1h") + }); + return { + accessToken + }; + } catch { + throw new common_12.UnauthorizedException("Refresh token \u0645\u0646\u0642\u0636\u06CC \u0634\u062F\u0647 \u06CC\u0627 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A."); + } + } + generateAdminTokens(admin) { + const accessToken = this.jwtService.sign({ + sub: admin.id, + email: admin.email, + role: admin.role, + type: "admin" + }, { + secret: this.configService.get("JWT_ADMIN_ACCESS_SECRET"), + expiresIn: this.configService.get("JWT_ADMIN_ACCESS_EXPIRES_IN", "1h") + }); + const refreshToken = this.jwtService.sign({ + sub: admin.id, + type: "admin_refresh" + }, { + secret: this.configService.get("JWT_ADMIN_REFRESH_SECRET"), + expiresIn: this.configService.get("JWT_ADMIN_REFRESH_EXPIRES_IN", "7d") + }); + return { + accessToken, + refreshToken + }; + } + async updateProfile(adminId, dto) { + const dataToUpdate = {}; + if (dto.name) + dataToUpdate.name = dto.name.trim(); + if (dto.mobile) + dataToUpdate.mobile = dto.mobile.trim(); + if (dto.email) { + const emailLower = dto.email.toLowerCase().trim(); + const existing = await this.prisma.admin.findFirst({ + where: { email: emailLower, id: { not: adminId } } + }); + if (existing) { + throw new common_12.BadRequestException("\u0627\u06CC\u0646 \u0627\u06CC\u0645\u06CC\u0644 \u0642\u0628\u0644\u0627\u064B \u062A\u0648\u0633\u0637 \u0645\u062F\u06CC\u0631 \u062F\u06CC\u06AF\u0631\u06CC \u062B\u0628\u062A \u0634\u062F\u0647 \u0627\u0633\u062A."); + } + dataToUpdate.email = emailLower; + } + if (dto.password) { + dataToUpdate.passwordHash = await bcrypt.hash(dto.password, 10); + } + const updated = await this.prisma.admin.update({ + where: { id: adminId }, + data: dataToUpdate, + select: { + id: true, + name: true, + email: true, + mobile: true, + role: true, + status: true + } + }); + return updated; + } + }; + exports2.AdminAuthService = AdminAuthService; + exports2.AdminAuthService = AdminAuthService = AdminAuthService_1 = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", [ + prisma_service_12.PrismaService, + jwt_1.JwtService, + config_12.ConfigService + ]) + ], AdminAuthService); + } +}); + +// dist/src/modules/admin-auth/dto/admin-login.dto.js +var require_admin_login_dto = __commonJS({ + "dist/src/modules/admin-auth/dto/admin-login.dto.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminLoginDto = void 0; + var swagger_12 = require_swagger(); + var class_validator_1 = require_cjs(); + var AdminLoginDto = class { + }; + exports2.AdminLoginDto = AdminLoginDto; + __decorate2([ + (0, swagger_12.ApiProperty)({ + example: "admin@luckywheel.local", + description: "\u0627\u06CC\u0645\u06CC\u0644 \u0645\u062F\u06CC\u0631 \u0633\u06CC\u0633\u062A\u0645" + }), + (0, class_validator_1.IsEmail)({}, { message: "\u0641\u0631\u0645\u062A \u0627\u06CC\u0645\u06CC\u0644 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A" }), + (0, class_validator_1.IsNotEmpty)({ message: "\u0627\u06CC\u0645\u06CC\u0644 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + __metadata2("design:type", String) + ], AdminLoginDto.prototype, "email", void 0); + __decorate2([ + (0, swagger_12.ApiProperty)({ + example: "Admin@SecurePass2026", + description: "\u06A9\u0644\u0645\u0647 \u0639\u0628\u0648\u0631 \u0645\u062F\u06CC\u0631" + }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsNotEmpty)({ message: "\u06A9\u0644\u0645\u0647 \u0639\u0628\u0648\u0631 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + (0, class_validator_1.MinLength)(6, { message: "\u06A9\u0644\u0645\u0647 \u0639\u0628\u0648\u0631 \u0628\u0627\u06CC\u062F \u062D\u062F\u0627\u0642\u0644 \u06F6 \u06A9\u0627\u0631\u0627\u06A9\u062A\u0631 \u0628\u0627\u0634\u062F" }), + __metadata2("design:type", String) + ], AdminLoginDto.prototype, "password", void 0); + } +}); + +// dist/src/modules/admin-auth/dto/admin-refresh.dto.js +var require_admin_refresh_dto = __commonJS({ + "dist/src/modules/admin-auth/dto/admin-refresh.dto.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminRefreshDto = void 0; + var swagger_12 = require_swagger(); + var class_validator_1 = require_cjs(); + var AdminRefreshDto = class { + }; + exports2.AdminRefreshDto = AdminRefreshDto; + __decorate2([ + (0, swagger_12.ApiProperty)({ + description: "Refresh Token \u0627\u062F\u0645\u06CC\u0646" + }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsNotEmpty)({ message: "Refresh Token \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + __metadata2("design:type", String) + ], AdminRefreshDto.prototype, "refreshToken", void 0); + } +}); + +// dist/src/modules/admin-auth/dto/update-admin-profile.dto.js +var require_update_admin_profile_dto = __commonJS({ + "dist/src/modules/admin-auth/dto/update-admin-profile.dto.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UpdateAdminProfileDto = void 0; + var swagger_12 = require_swagger(); + var class_validator_1 = require_cjs(); + var UpdateAdminProfileDto = class { + }; + exports2.UpdateAdminProfileDto = UpdateAdminProfileDto; + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ description: "\u0646\u0627\u0645 \u0648 \u0646\u0627\u0645 \u062E\u0627\u0646\u0648\u0627\u062F\u06AF\u06CC \u0645\u062F\u06CC\u0631" }), + (0, class_validator_1.IsOptional)(), + (0, class_validator_1.IsString)(), + (0, class_validator_1.Length)(2, 50, { message: "\u0646\u0627\u0645 \u0628\u0627\u06CC\u062F \u0628\u06CC\u0646 \u06F2 \u062A\u0627 \u06F5\u06F0 \u06A9\u0627\u0631\u0627\u06A9\u062A\u0631 \u0628\u0627\u0634\u062F." }), + __metadata2("design:type", String) + ], UpdateAdminProfileDto.prototype, "name", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ description: "\u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0645\u062F\u06CC\u0631" }), + (0, class_validator_1.IsOptional)(), + (0, class_validator_1.IsString)(), + (0, class_validator_1.Matches)(/^09\d{9}$/, { message: "\u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0628\u0627\u06CC\u062F \u06F1\u06F1 \u0631\u0642\u0645 \u0648 \u0628\u0627 \u06F0\u06F9 \u0634\u0631\u0648\u0639 \u0634\u0648\u062F." }), + __metadata2("design:type", String) + ], UpdateAdminProfileDto.prototype, "mobile", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ description: "\u0627\u06CC\u0645\u06CC\u0644 \u0645\u062F\u06CC\u0631" }), + (0, class_validator_1.IsOptional)(), + (0, class_validator_1.IsEmail)({}, { message: "\u0641\u0631\u0645\u062A \u0627\u06CC\u0645\u06CC\u0644 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A." }), + __metadata2("design:type", String) + ], UpdateAdminProfileDto.prototype, "email", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ description: "\u06A9\u0644\u0645\u0647 \u0639\u0628\u0648\u0631 \u062C\u062F\u06CC\u062F (\u0627\u062E\u062A\u06CC\u0627\u0631\u06CC)" }), + (0, class_validator_1.IsOptional)(), + (0, class_validator_1.IsString)(), + (0, class_validator_1.Length)(6, 50, { message: "\u06A9\u0644\u0645\u0647 \u0639\u0628\u0648\u0631 \u0628\u0627\u06CC\u062F \u062D\u062F\u0627\u0642\u0644 \u06F6 \u06A9\u0627\u0631\u0627\u06A9\u062A\u0631 \u0628\u0627\u0634\u062F." }), + __metadata2("design:type", String) + ], UpdateAdminProfileDto.prototype, "password", void 0); + } +}); + +// dist/src/modules/admin-auth/admin-auth.controller.js +var require_admin_auth_controller = __commonJS({ + "dist/src/modules/admin-auth/admin-auth.controller.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminAuthController = void 0; + var common_12 = require_common(); + var swagger_12 = require_swagger(); + var throttler_1 = require_dist9(); + var jwt_admin_guard_1 = require_jwt_admin_guard(); + var admin_auth_service_1 = require_admin_auth_service(); + var admin_login_dto_1 = require_admin_login_dto(); + var admin_refresh_dto_1 = require_admin_refresh_dto(); + var update_admin_profile_dto_1 = require_update_admin_profile_dto(); + var AdminAuthController = class AdminAuthController { + constructor(adminAuthService) { + this.adminAuthService = adminAuthService; + } + async login(dto) { + return this.adminAuthService.login(dto); + } + async refresh(dto) { + return this.adminAuthService.refreshToken(dto); + } + async updateProfile(req, dto) { + return this.adminAuthService.updateProfile(req.user.id, dto); + } + async logout() { + return { success: true, message: "\u0628\u0627 \u0645\u0648\u0641\u0642\u06CC\u062A \u062E\u0627\u0631\u062C \u0634\u062F\u06CC\u062F." }; + } + }; + exports2.AdminAuthController = AdminAuthController; + __decorate2([ + (0, common_12.Post)("login"), + (0, common_12.HttpCode)(common_12.HttpStatus.OK), + (0, throttler_1.Throttle)({ default: { limit: 10, ttl: 9e5 } }), + (0, swagger_12.ApiOperation)({ summary: "\u0648\u0631\u0648\u062F \u0645\u062F\u06CC\u0631 \u0628\u0647 \u067E\u0646\u0644 \u0645\u062F\u06CC\u0631\u06CC\u062A \u0628\u0627 \u0627\u06CC\u0645\u06CC\u0644 \u0648 \u06A9\u0644\u0645\u0647 \u0639\u0628\u0648\u0631" }), + (0, swagger_12.ApiResponse)({ + status: 200, + description: "\u0648\u0631\u0648\u062F \u0645\u0648\u0641\u0642 \u0648 \u0635\u062F\u0648\u0631 Access Token \u0648 Refresh Token" + }), + __param2(0, (0, common_12.Body)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [admin_login_dto_1.AdminLoginDto]), + __metadata2("design:returntype", Promise) + ], AdminAuthController.prototype, "login", null); + __decorate2([ + (0, common_12.Post)("refresh"), + (0, common_12.HttpCode)(common_12.HttpStatus.OK), + (0, swagger_12.ApiOperation)({ summary: "\u062A\u0645\u062F\u06CC\u062F Access Token \u0628\u0627 \u0627\u0633\u062A\u0641\u0627\u062F\u0647 \u0627\u0632 Refresh Token" }), + __param2(0, (0, common_12.Body)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [admin_refresh_dto_1.AdminRefreshDto]), + __metadata2("design:returntype", Promise) + ], AdminAuthController.prototype, "refresh", null); + __decorate2([ + (0, common_12.Patch)("profile"), + (0, common_12.UseGuards)(jwt_admin_guard_1.JwtAdminGuard), + (0, common_12.HttpCode)(common_12.HttpStatus.OK), + (0, swagger_12.ApiBearerAuth)("AdminAuth"), + (0, swagger_12.ApiOperation)({ summary: "\u0648\u06CC\u0631\u0627\u06CC\u0634 \u0627\u0637\u0644\u0627\u0639\u0627\u062A \u062D\u0633\u0627\u0628 \u06A9\u0627\u0631\u0628\u0631\u06CC \u0645\u062F\u06CC\u0631 \u062C\u0627\u0631\u06CC" }), + __param2(0, (0, common_12.Req)()), + __param2(1, (0, common_12.Body)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [Object, update_admin_profile_dto_1.UpdateAdminProfileDto]), + __metadata2("design:returntype", Promise) + ], AdminAuthController.prototype, "updateProfile", null); + __decorate2([ + (0, common_12.Post)("logout"), + (0, common_12.UseGuards)(jwt_admin_guard_1.JwtAdminGuard), + (0, common_12.HttpCode)(common_12.HttpStatus.OK), + (0, swagger_12.ApiBearerAuth)("AdminAuth"), + (0, swagger_12.ApiOperation)({ summary: "\u062E\u0631\u0648\u062C \u0627\u0632 \u067E\u0646\u0644 \u0645\u062F\u06CC\u0631\u06CC\u062A" }), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", []), + __metadata2("design:returntype", Promise) + ], AdminAuthController.prototype, "logout", null); + exports2.AdminAuthController = AdminAuthController = __decorate2([ + (0, swagger_12.ApiTags)("Admin Auth (\u0645\u062F\u06CC\u0631\u06CC\u062A)"), + (0, common_12.Controller)("admin/auth"), + __metadata2("design:paramtypes", [admin_auth_service_1.AdminAuthService]) + ], AdminAuthController); + } +}); + +// ../../node_modules/.pnpm/passport-jwt@4.0.1/node_modules/passport-jwt/lib/auth_header.js +var require_auth_header = __commonJS({ + "../../node_modules/.pnpm/passport-jwt@4.0.1/node_modules/passport-jwt/lib/auth_header.js"(exports2, module2) { + "use strict"; + var re = /(\S+)\s+(\S+)/; + function parseAuthHeader(hdrValue) { + if (typeof hdrValue !== "string") { + return null; + } + var matches = hdrValue.match(re); + return matches && { scheme: matches[1], value: matches[2] }; + } + module2.exports = { + parse: parseAuthHeader + }; + } +}); + +// ../../node_modules/.pnpm/passport-jwt@4.0.1/node_modules/passport-jwt/lib/helpers/assign.js +var require_assign = __commonJS({ + "../../node_modules/.pnpm/passport-jwt@4.0.1/node_modules/passport-jwt/lib/helpers/assign.js"(exports2, module2) { + module2.exports = function(target, varArgs) { + if (target == null) { + throw new TypeError("Cannot convert undefined or null to object"); + } + var to = Object(target); + for (var index = 1; index < arguments.length; index++) { + var nextSource = arguments[index]; + if (nextSource != null) { + for (var nextKey in nextSource) { + if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { + to[nextKey] = nextSource[nextKey]; + } + } + } + } + return to; + }; + } +}); + +// ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/data-stream.js +var require_data_stream2 = __commonJS({ + "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/data-stream.js"(exports2, module2) { + var Buffer2 = require_safe_buffer().Buffer; + var Stream = require("stream"); + var util2 = require("util"); + function DataStream(data) { + this.buffer = null; + this.writable = true; + this.readable = true; + if (!data) { + this.buffer = Buffer2.alloc(0); + return this; + } + if (typeof data.pipe === "function") { + this.buffer = Buffer2.alloc(0); + data.pipe(this); + return this; + } + if (data.length || typeof data === "object") { + this.buffer = data; + this.writable = false; + process.nextTick(function() { + this.emit("end", data); + this.readable = false; + this.emit("close"); + }.bind(this)); + return this; + } + throw new TypeError("Unexpected data type (" + typeof data + ")"); + } + util2.inherits(DataStream, Stream); + DataStream.prototype.write = function write(data) { + this.buffer = Buffer2.concat([this.buffer, Buffer2.from(data)]); + this.emit("data", data); + }; + DataStream.prototype.end = function end(data) { + if (data) + this.write(data); + this.emit("end", data); + this.emit("close"); + this.writable = false; + this.readable = false; + }; + module2.exports = DataStream; + } +}); + +// ../../node_modules/.pnpm/jwa@2.0.1/node_modules/jwa/index.js +var require_jwa2 = __commonJS({ + "../../node_modules/.pnpm/jwa@2.0.1/node_modules/jwa/index.js"(exports2, module2) { + var Buffer2 = require_safe_buffer().Buffer; + var crypto5 = require("crypto"); + var formatEcdsa = require_ecdsa_sig_formatter(); + var util2 = require("util"); + var MSG_INVALID_ALGORITHM = '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".'; + var MSG_INVALID_SECRET = "secret must be a string or buffer"; + var MSG_INVALID_VERIFIER_KEY = "key must be a string or a buffer"; + var MSG_INVALID_SIGNER_KEY = "key must be a string, a buffer or an object"; + var supportsKeyObjects = typeof crypto5.createPublicKey === "function"; + if (supportsKeyObjects) { + MSG_INVALID_VERIFIER_KEY += " or a KeyObject"; + MSG_INVALID_SECRET += "or a KeyObject"; + } + function checkIsPublicKey(key) { + if (Buffer2.isBuffer(key)) { + return; + } + if (typeof key === "string") { + return; + } + if (!supportsKeyObjects) { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + if (typeof key !== "object") { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + if (typeof key.type !== "string") { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + if (typeof key.asymmetricKeyType !== "string") { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + if (typeof key.export !== "function") { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + } + function checkIsPrivateKey(key) { + if (Buffer2.isBuffer(key)) { + return; + } + if (typeof key === "string") { + return; + } + if (typeof key === "object") { + return; + } + throw typeError(MSG_INVALID_SIGNER_KEY); + } + function checkIsSecretKey(key) { + if (Buffer2.isBuffer(key)) { + return; + } + if (typeof key === "string") { + return key; + } + if (!supportsKeyObjects) { + throw typeError(MSG_INVALID_SECRET); + } + if (typeof key !== "object") { + throw typeError(MSG_INVALID_SECRET); + } + if (key.type !== "secret") { + throw typeError(MSG_INVALID_SECRET); + } + if (typeof key.export !== "function") { + throw typeError(MSG_INVALID_SECRET); + } + } + function fromBase64(base64) { + return base64.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); + } + function toBase64(base64url) { + base64url = base64url.toString(); + var padding = 4 - base64url.length % 4; + if (padding !== 4) { + for (var i = 0; i < padding; ++i) { + base64url += "="; + } + } + return base64url.replace(/\-/g, "+").replace(/_/g, "/"); + } + function typeError(template) { + var args = [].slice.call(arguments, 1); + var errMsg = util2.format.bind(util2, template).apply(null, args); + return new TypeError(errMsg); + } + function bufferOrString(obj2) { + return Buffer2.isBuffer(obj2) || typeof obj2 === "string"; + } + function normalizeInput(thing) { + if (!bufferOrString(thing)) + thing = JSON.stringify(thing); + return thing; + } + function createHmacSigner(bits) { + return function sign(thing, secret) { + checkIsSecretKey(secret); + thing = normalizeInput(thing); + var hmac = crypto5.createHmac("sha" + bits, secret); + var sig = (hmac.update(thing), hmac.digest("base64")); + return fromBase64(sig); + }; + } + var bufferEqual; + var timingSafeEqual = "timingSafeEqual" in crypto5 ? function timingSafeEqual2(a, b) { + if (a.byteLength !== b.byteLength) { + return false; + } + return crypto5.timingSafeEqual(a, b); + } : function timingSafeEqual2(a, b) { + if (!bufferEqual) { + bufferEqual = require_buffer_equal_constant_time(); + } + return bufferEqual(a, b); + }; + function createHmacVerifier(bits) { + return function verify(thing, signature, secret) { + var computedSig = createHmacSigner(bits)(thing, secret); + return timingSafeEqual(Buffer2.from(signature), Buffer2.from(computedSig)); + }; + } + function createKeySigner(bits) { + return function sign(thing, privateKey) { + checkIsPrivateKey(privateKey); + thing = normalizeInput(thing); + var signer = crypto5.createSign("RSA-SHA" + bits); + var sig = (signer.update(thing), signer.sign(privateKey, "base64")); + return fromBase64(sig); + }; + } + function createKeyVerifier(bits) { + return function verify(thing, signature, publicKey) { + checkIsPublicKey(publicKey); + thing = normalizeInput(thing); + signature = toBase64(signature); + var verifier = crypto5.createVerify("RSA-SHA" + bits); + verifier.update(thing); + return verifier.verify(publicKey, signature, "base64"); + }; + } + function createPSSKeySigner(bits) { + return function sign(thing, privateKey) { + checkIsPrivateKey(privateKey); + thing = normalizeInput(thing); + var signer = crypto5.createSign("RSA-SHA" + bits); + var sig = (signer.update(thing), signer.sign({ + key: privateKey, + padding: crypto5.constants.RSA_PKCS1_PSS_PADDING, + saltLength: crypto5.constants.RSA_PSS_SALTLEN_DIGEST + }, "base64")); + return fromBase64(sig); + }; + } + function createPSSKeyVerifier(bits) { + return function verify(thing, signature, publicKey) { + checkIsPublicKey(publicKey); + thing = normalizeInput(thing); + signature = toBase64(signature); + var verifier = crypto5.createVerify("RSA-SHA" + bits); + verifier.update(thing); + return verifier.verify({ + key: publicKey, + padding: crypto5.constants.RSA_PKCS1_PSS_PADDING, + saltLength: crypto5.constants.RSA_PSS_SALTLEN_DIGEST + }, signature, "base64"); + }; + } + function createECDSASigner(bits) { + var inner = createKeySigner(bits); + return function sign() { + var signature = inner.apply(null, arguments); + signature = formatEcdsa.derToJose(signature, "ES" + bits); + return signature; + }; + } + function createECDSAVerifer(bits) { + var inner = createKeyVerifier(bits); + return function verify(thing, signature, publicKey) { + signature = formatEcdsa.joseToDer(signature, "ES" + bits).toString("base64"); + var result = inner(thing, signature, publicKey); + return result; + }; + } + function createNoneSigner() { + return function sign() { + return ""; + }; + } + function createNoneVerifier() { + return function verify(thing, signature) { + return signature === ""; + }; + } + module2.exports = function jwa(algorithm) { + var signerFactories = { + hs: createHmacSigner, + rs: createKeySigner, + ps: createPSSKeySigner, + es: createECDSASigner, + none: createNoneSigner + }; + var verifierFactories = { + hs: createHmacVerifier, + rs: createKeyVerifier, + ps: createPSSKeyVerifier, + es: createECDSAVerifer, + none: createNoneVerifier + }; + var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/); + if (!match) + throw typeError(MSG_INVALID_ALGORITHM, algorithm); + var algo = (match[1] || match[3]).toLowerCase(); + var bits = match[2]; + return { + sign: signerFactories[algo](bits), + verify: verifierFactories[algo](bits) + }; + }; + } +}); + +// ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/tostring.js +var require_tostring2 = __commonJS({ + "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/tostring.js"(exports2, module2) { + var Buffer2 = require("buffer").Buffer; + module2.exports = function toString2(obj2) { + if (typeof obj2 === "string") + return obj2; + if (typeof obj2 === "number" || Buffer2.isBuffer(obj2)) + return obj2.toString(); + return JSON.stringify(obj2); + }; + } +}); + +// ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/sign-stream.js +var require_sign_stream2 = __commonJS({ + "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/sign-stream.js"(exports2, module2) { + var Buffer2 = require_safe_buffer().Buffer; + var DataStream = require_data_stream2(); + var jwa = require_jwa2(); + var Stream = require("stream"); + var toString2 = require_tostring2(); + var util2 = require("util"); + function base64url(string, encoding) { + return Buffer2.from(string, encoding).toString("base64").replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); + } + function jwsSecuredInput(header, payload, encoding) { + encoding = encoding || "utf8"; + var encodedHeader = base64url(toString2(header), "binary"); + var encodedPayload = base64url(toString2(payload), encoding); + return util2.format("%s.%s", encodedHeader, encodedPayload); + } + function jwsSign(opts) { + var header = opts.header; + var payload = opts.payload; + var secretOrKey = opts.secret || opts.privateKey; + var encoding = opts.encoding; + var algo = jwa(header.alg); + var securedInput = jwsSecuredInput(header, payload, encoding); + var signature = algo.sign(securedInput, secretOrKey); + return util2.format("%s.%s", securedInput, signature); + } + function SignStream(opts) { + var secret = opts.secret; + secret = secret == null ? opts.privateKey : secret; + secret = secret == null ? opts.key : secret; + if (/^hs/i.test(opts.header.alg) === true && secret == null) { + throw new TypeError("secret must be a string or buffer or a KeyObject"); + } + var secretStream = new DataStream(secret); + this.readable = true; + this.header = opts.header; + this.encoding = opts.encoding; + this.secret = this.privateKey = this.key = secretStream; + this.payload = new DataStream(opts.payload); + this.secret.once("close", function() { + if (!this.payload.writable && this.readable) + this.sign(); + }.bind(this)); + this.payload.once("close", function() { + if (!this.secret.writable && this.readable) + this.sign(); + }.bind(this)); + } + util2.inherits(SignStream, Stream); + SignStream.prototype.sign = function sign() { + try { + var signature = jwsSign({ + header: this.header, + payload: this.payload.buffer, + secret: this.secret.buffer, + encoding: this.encoding + }); + this.emit("done", signature); + this.emit("data", signature); + this.emit("end"); + this.readable = false; + return signature; + } catch (e) { + this.readable = false; + this.emit("error", e); + this.emit("close"); + } + }; + SignStream.sign = jwsSign; + module2.exports = SignStream; + } +}); + +// ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/verify-stream.js +var require_verify_stream2 = __commonJS({ + "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/verify-stream.js"(exports2, module2) { + var Buffer2 = require_safe_buffer().Buffer; + var DataStream = require_data_stream2(); + var jwa = require_jwa2(); + var Stream = require("stream"); + var toString2 = require_tostring2(); + var util2 = require("util"); + var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/; + function isObject2(thing) { + return Object.prototype.toString.call(thing) === "[object Object]"; + } + function safeJsonParse(thing) { + if (isObject2(thing)) + return thing; + try { + return JSON.parse(thing); + } catch (e) { + return void 0; + } + } + function headerFromJWS(jwsSig) { + var encodedHeader = jwsSig.split(".", 1)[0]; + return safeJsonParse(Buffer2.from(encodedHeader, "base64").toString("binary")); + } + function securedInputFromJWS(jwsSig) { + return jwsSig.split(".", 2).join("."); + } + function signatureFromJWS(jwsSig) { + return jwsSig.split(".")[2]; + } + function payloadFromJWS(jwsSig, encoding) { + encoding = encoding || "utf8"; + var payload = jwsSig.split(".")[1]; + return Buffer2.from(payload, "base64").toString(encoding); + } + function isValidJws(string) { + return JWS_REGEX.test(string) && !!headerFromJWS(string); + } + function jwsVerify(jwsSig, algorithm, secretOrKey) { + if (!algorithm) { + var err = new Error("Missing algorithm parameter for jws.verify"); + err.code = "MISSING_ALGORITHM"; + throw err; + } + jwsSig = toString2(jwsSig); + var signature = signatureFromJWS(jwsSig); + var securedInput = securedInputFromJWS(jwsSig); + var algo = jwa(algorithm); + return algo.verify(securedInput, signature, secretOrKey); + } + function jwsDecode(jwsSig, opts) { + opts = opts || {}; + jwsSig = toString2(jwsSig); + if (!isValidJws(jwsSig)) + return null; + var header = headerFromJWS(jwsSig); + if (!header) + return null; + var payload = payloadFromJWS(jwsSig); + if (header.typ === "JWT" || opts.json) + payload = JSON.parse(payload, opts.encoding); + return { + header, + payload, + signature: signatureFromJWS(jwsSig) + }; + } + function VerifyStream(opts) { + opts = opts || {}; + var secretOrKey = opts.secret; + secretOrKey = secretOrKey == null ? opts.publicKey : secretOrKey; + secretOrKey = secretOrKey == null ? opts.key : secretOrKey; + if (/^hs/i.test(opts.algorithm) === true && secretOrKey == null) { + throw new TypeError("secret must be a string or buffer or a KeyObject"); + } + var secretStream = new DataStream(secretOrKey); + this.readable = true; + this.algorithm = opts.algorithm; + this.encoding = opts.encoding; + this.secret = this.publicKey = this.key = secretStream; + this.signature = new DataStream(opts.signature); + this.secret.once("close", function() { + if (!this.signature.writable && this.readable) + this.verify(); + }.bind(this)); + this.signature.once("close", function() { + if (!this.secret.writable && this.readable) + this.verify(); + }.bind(this)); + } + util2.inherits(VerifyStream, Stream); + VerifyStream.prototype.verify = function verify() { + try { + var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer); + var obj2 = jwsDecode(this.signature.buffer, this.encoding); + this.emit("done", valid, obj2); + this.emit("data", valid); + this.emit("end"); + this.readable = false; + return valid; + } catch (e) { + this.readable = false; + this.emit("error", e); + this.emit("close"); + } + }; + VerifyStream.decode = jwsDecode; + VerifyStream.isValid = isValidJws; + VerifyStream.verify = jwsVerify; + module2.exports = VerifyStream; + } +}); + +// ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/index.js +var require_jws2 = __commonJS({ + "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/index.js"(exports2) { + var SignStream = require_sign_stream2(); + var VerifyStream = require_verify_stream2(); + var ALGORITHMS = [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "PS256", + "PS384", + "PS512", + "ES256", + "ES384", + "ES512" + ]; + exports2.ALGORITHMS = ALGORITHMS; + exports2.sign = SignStream.sign; + exports2.verify = VerifyStream.verify; + exports2.decode = VerifyStream.decode; + exports2.isValid = VerifyStream.isValid; + exports2.createSign = function createSign(opts) { + return new SignStream(opts); + }; + exports2.createVerify = function createVerify(opts) { + return new VerifyStream(opts); + }; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/decode.js +var require_decode2 = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/decode.js"(exports2, module2) { + var jws = require_jws2(); + module2.exports = function(jwt, options) { + options = options || {}; + var decoded = jws.decode(jwt, options); + if (!decoded) { + return null; + } + var payload = decoded.payload; + if (typeof payload === "string") { + try { + var obj2 = JSON.parse(payload); + if (obj2 !== null && typeof obj2 === "object") { + payload = obj2; + } + } catch (e) { + } + } + if (options.complete === true) { + return { + header: decoded.header, + payload, + signature: decoded.signature + }; + } + return payload; + }; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/JsonWebTokenError.js +var require_JsonWebTokenError2 = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/JsonWebTokenError.js"(exports2, module2) { + var JsonWebTokenError = function(message, error) { + Error.call(this, message); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + this.name = "JsonWebTokenError"; + this.message = message; + if (error) this.inner = error; + }; + JsonWebTokenError.prototype = Object.create(Error.prototype); + JsonWebTokenError.prototype.constructor = JsonWebTokenError; + module2.exports = JsonWebTokenError; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/NotBeforeError.js +var require_NotBeforeError2 = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/NotBeforeError.js"(exports2, module2) { + var JsonWebTokenError = require_JsonWebTokenError2(); + var NotBeforeError = function(message, date) { + JsonWebTokenError.call(this, message); + this.name = "NotBeforeError"; + this.date = date; + }; + NotBeforeError.prototype = Object.create(JsonWebTokenError.prototype); + NotBeforeError.prototype.constructor = NotBeforeError; + module2.exports = NotBeforeError; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/TokenExpiredError.js +var require_TokenExpiredError2 = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/TokenExpiredError.js"(exports2, module2) { + var JsonWebTokenError = require_JsonWebTokenError2(); + var TokenExpiredError = function(message, expiredAt) { + JsonWebTokenError.call(this, message); + this.name = "TokenExpiredError"; + this.expiredAt = expiredAt; + }; + TokenExpiredError.prototype = Object.create(JsonWebTokenError.prototype); + TokenExpiredError.prototype.constructor = TokenExpiredError; + module2.exports = TokenExpiredError; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/timespan.js +var require_timespan2 = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/timespan.js"(exports2, module2) { + var ms = require_ms2(); + module2.exports = function(time, iat) { + var timestamp = iat || Math.floor(Date.now() / 1e3); + if (typeof time === "string") { + var milliseconds = ms(time); + if (typeof milliseconds === "undefined") { + return; + } + return Math.floor(timestamp + milliseconds / 1e3); + } else if (typeof time === "number") { + return timestamp + time; + } else { + return; + } + }; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js +var require_asymmetricKeyDetailsSupported2 = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js"(exports2, module2) { + var semver = require_semver2(); + module2.exports = semver.satisfies(process.version, ">=15.7.0"); + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js +var require_rsaPssKeyDetailsSupported2 = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js"(exports2, module2) { + var semver = require_semver2(); + module2.exports = semver.satisfies(process.version, ">=16.9.0"); + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js +var require_validateAsymmetricKey2 = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js"(exports2, module2) { + var ASYMMETRIC_KEY_DETAILS_SUPPORTED = require_asymmetricKeyDetailsSupported2(); + var RSA_PSS_KEY_DETAILS_SUPPORTED = require_rsaPssKeyDetailsSupported2(); + var allowedAlgorithmsForKeys = { + "ec": ["ES256", "ES384", "ES512"], + "rsa": ["RS256", "PS256", "RS384", "PS384", "RS512", "PS512"], + "rsa-pss": ["PS256", "PS384", "PS512"] + }; + var allowedCurves = { + ES256: "prime256v1", + ES384: "secp384r1", + ES512: "secp521r1" + }; + module2.exports = function(algorithm, key) { + if (!algorithm || !key) return; + const keyType = key.asymmetricKeyType; + if (!keyType) return; + const allowedAlgorithms = allowedAlgorithmsForKeys[keyType]; + if (!allowedAlgorithms) { + throw new Error(`Unknown key type "${keyType}".`); + } + if (!allowedAlgorithms.includes(algorithm)) { + throw new Error(`"alg" parameter for "${keyType}" key type must be one of: ${allowedAlgorithms.join(", ")}.`); + } + if (ASYMMETRIC_KEY_DETAILS_SUPPORTED) { + switch (keyType) { + case "ec": + const keyCurve = key.asymmetricKeyDetails.namedCurve; + const allowedCurve = allowedCurves[algorithm]; + if (keyCurve !== allowedCurve) { + throw new Error(`"alg" parameter "${algorithm}" requires curve "${allowedCurve}".`); + } + break; + case "rsa-pss": + if (RSA_PSS_KEY_DETAILS_SUPPORTED) { + const length = parseInt(algorithm.slice(-3), 10); + const { hashAlgorithm, mgf1HashAlgorithm, saltLength } = key.asymmetricKeyDetails; + if (hashAlgorithm !== `sha${length}` || mgf1HashAlgorithm !== hashAlgorithm) { + throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${algorithm}.`); + } + if (saltLength !== void 0 && saltLength > length >> 3) { + throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${algorithm}.`); + } + } + break; + } + } + }; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/psSupported.js +var require_psSupported2 = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/psSupported.js"(exports2, module2) { + var semver = require_semver2(); + module2.exports = semver.satisfies(process.version, "^6.12.0 || >=8.0.0"); + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/verify.js +var require_verify2 = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/verify.js"(exports2, module2) { + var JsonWebTokenError = require_JsonWebTokenError2(); + var NotBeforeError = require_NotBeforeError2(); + var TokenExpiredError = require_TokenExpiredError2(); + var decode = require_decode2(); + var timespan = require_timespan2(); + var validateAsymmetricKey = require_validateAsymmetricKey2(); + var PS_SUPPORTED = require_psSupported2(); + var jws = require_jws2(); + var { KeyObject, createSecretKey, createPublicKey } = require("crypto"); + var PUB_KEY_ALGS = ["RS256", "RS384", "RS512"]; + var EC_KEY_ALGS = ["ES256", "ES384", "ES512"]; + var RSA_KEY_ALGS = ["RS256", "RS384", "RS512"]; + var HS_ALGS = ["HS256", "HS384", "HS512"]; + if (PS_SUPPORTED) { + PUB_KEY_ALGS.splice(PUB_KEY_ALGS.length, 0, "PS256", "PS384", "PS512"); + RSA_KEY_ALGS.splice(RSA_KEY_ALGS.length, 0, "PS256", "PS384", "PS512"); + } + module2.exports = function(jwtString, secretOrPublicKey, options, callback) { + if (typeof options === "function" && !callback) { + callback = options; + options = {}; + } + if (!options) { + options = {}; + } + options = Object.assign({}, options); + let done; + if (callback) { + done = callback; + } else { + done = function(err, data) { + if (err) throw err; + return data; + }; + } + if (options.clockTimestamp && typeof options.clockTimestamp !== "number") { + return done(new JsonWebTokenError("clockTimestamp must be a number")); + } + if (options.nonce !== void 0 && (typeof options.nonce !== "string" || options.nonce.trim() === "")) { + return done(new JsonWebTokenError("nonce must be a non-empty string")); + } + if (options.allowInvalidAsymmetricKeyTypes !== void 0 && typeof options.allowInvalidAsymmetricKeyTypes !== "boolean") { + return done(new JsonWebTokenError("allowInvalidAsymmetricKeyTypes must be a boolean")); + } + const clockTimestamp = options.clockTimestamp || Math.floor(Date.now() / 1e3); + if (!jwtString) { + return done(new JsonWebTokenError("jwt must be provided")); + } + if (typeof jwtString !== "string") { + return done(new JsonWebTokenError("jwt must be a string")); + } + const parts = jwtString.split("."); + if (parts.length !== 3) { + return done(new JsonWebTokenError("jwt malformed")); + } + let decodedToken; + try { + decodedToken = decode(jwtString, { complete: true }); + } catch (err) { + return done(err); + } + if (!decodedToken) { + return done(new JsonWebTokenError("invalid token")); + } + const header = decodedToken.header; + let getSecret; + if (typeof secretOrPublicKey === "function") { + if (!callback) { + return done(new JsonWebTokenError("verify must be called asynchronous if secret or public key is provided as a callback")); + } + getSecret = secretOrPublicKey; + } else { + getSecret = function(header2, secretCallback) { + return secretCallback(null, secretOrPublicKey); + }; + } + return getSecret(header, function(err, secretOrPublicKey2) { + if (err) { + return done(new JsonWebTokenError("error in secret or public key callback: " + err.message)); + } + const hasSignature = parts[2].trim() !== ""; + if (!hasSignature && secretOrPublicKey2) { + return done(new JsonWebTokenError("jwt signature is required")); + } + if (hasSignature && !secretOrPublicKey2) { + return done(new JsonWebTokenError("secret or public key must be provided")); + } + if (!hasSignature && !options.algorithms) { + return done(new JsonWebTokenError('please specify "none" in "algorithms" to verify unsigned tokens')); + } + if (secretOrPublicKey2 != null && !(secretOrPublicKey2 instanceof KeyObject)) { + try { + secretOrPublicKey2 = createPublicKey(secretOrPublicKey2); + } catch (_2) { + try { + secretOrPublicKey2 = createSecretKey(typeof secretOrPublicKey2 === "string" ? Buffer.from(secretOrPublicKey2) : secretOrPublicKey2); + } catch (_3) { + return done(new JsonWebTokenError("secretOrPublicKey is not valid key material")); + } + } + } + if (!options.algorithms) { + if (secretOrPublicKey2.type === "secret") { + options.algorithms = HS_ALGS; + } else if (["rsa", "rsa-pss"].includes(secretOrPublicKey2.asymmetricKeyType)) { + options.algorithms = RSA_KEY_ALGS; + } else if (secretOrPublicKey2.asymmetricKeyType === "ec") { + options.algorithms = EC_KEY_ALGS; + } else { + options.algorithms = PUB_KEY_ALGS; + } + } + if (options.algorithms.indexOf(decodedToken.header.alg) === -1) { + return done(new JsonWebTokenError("invalid algorithm")); + } + if (header.alg.startsWith("HS") && secretOrPublicKey2.type !== "secret") { + return done(new JsonWebTokenError(`secretOrPublicKey must be a symmetric key when using ${header.alg}`)); + } else if (/^(?:RS|PS|ES)/.test(header.alg) && secretOrPublicKey2.type !== "public") { + return done(new JsonWebTokenError(`secretOrPublicKey must be an asymmetric key when using ${header.alg}`)); + } + if (!options.allowInvalidAsymmetricKeyTypes) { + try { + validateAsymmetricKey(header.alg, secretOrPublicKey2); + } catch (e) { + return done(e); + } + } + let valid; + try { + valid = jws.verify(jwtString, decodedToken.header.alg, secretOrPublicKey2); + } catch (e) { + return done(e); + } + if (!valid) { + return done(new JsonWebTokenError("invalid signature")); + } + const payload = decodedToken.payload; + if (typeof payload.nbf !== "undefined" && !options.ignoreNotBefore) { + if (typeof payload.nbf !== "number") { + return done(new JsonWebTokenError("invalid nbf value")); + } + if (payload.nbf > clockTimestamp + (options.clockTolerance || 0)) { + return done(new NotBeforeError("jwt not active", new Date(payload.nbf * 1e3))); + } + } + if (typeof payload.exp !== "undefined" && !options.ignoreExpiration) { + if (typeof payload.exp !== "number") { + return done(new JsonWebTokenError("invalid exp value")); + } + if (clockTimestamp >= payload.exp + (options.clockTolerance || 0)) { + return done(new TokenExpiredError("jwt expired", new Date(payload.exp * 1e3))); + } + } + if (options.audience) { + const audiences = Array.isArray(options.audience) ? options.audience : [options.audience]; + const target = Array.isArray(payload.aud) ? payload.aud : [payload.aud]; + const match = target.some(function(targetAudience) { + return audiences.some(function(audience) { + return audience instanceof RegExp ? audience.test(targetAudience) : audience === targetAudience; + }); + }); + if (!match) { + return done(new JsonWebTokenError("jwt audience invalid. expected: " + audiences.join(" or "))); + } + } + if (options.issuer) { + const invalid_issuer = typeof options.issuer === "string" && payload.iss !== options.issuer || Array.isArray(options.issuer) && options.issuer.indexOf(payload.iss) === -1; + if (invalid_issuer) { + return done(new JsonWebTokenError("jwt issuer invalid. expected: " + options.issuer)); + } + } + if (options.subject) { + if (payload.sub !== options.subject) { + return done(new JsonWebTokenError("jwt subject invalid. expected: " + options.subject)); + } + } + if (options.jwtid) { + if (payload.jti !== options.jwtid) { + return done(new JsonWebTokenError("jwt jwtid invalid. expected: " + options.jwtid)); + } + } + if (options.nonce) { + if (payload.nonce !== options.nonce) { + return done(new JsonWebTokenError("jwt nonce invalid. expected: " + options.nonce)); + } + } + if (options.maxAge) { + if (typeof payload.iat !== "number") { + return done(new JsonWebTokenError("iat required when maxAge is specified")); + } + const maxAgeTimestamp = timespan(options.maxAge, payload.iat); + if (typeof maxAgeTimestamp === "undefined") { + return done(new JsonWebTokenError('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); + } + if (clockTimestamp >= maxAgeTimestamp + (options.clockTolerance || 0)) { + return done(new TokenExpiredError("maxAge exceeded", new Date(maxAgeTimestamp * 1e3))); + } + } + if (options.complete === true) { + const signature = decodedToken.signature; + return done(null, { + header, + payload, + signature + }); + } + return done(null, payload); + }); + }; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/sign.js +var require_sign3 = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/sign.js"(exports2, module2) { + var timespan = require_timespan2(); + var PS_SUPPORTED = require_psSupported2(); + var validateAsymmetricKey = require_validateAsymmetricKey2(); + var jws = require_jws2(); + var includes = require_lodash3(); + var isBoolean = require_lodash4(); + var isInteger = require_lodash5(); + var isNumber = require_lodash6(); + var isPlainObject = require_lodash7(); + var isString = require_lodash8(); + var once = require_lodash9(); + var { KeyObject, createSecretKey, createPrivateKey } = require("crypto"); + var SUPPORTED_ALGS = ["RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "HS256", "HS384", "HS512", "none"]; + if (PS_SUPPORTED) { + SUPPORTED_ALGS.splice(3, 0, "PS256", "PS384", "PS512"); + } + var sign_options_schema = { + expiresIn: { isValid: function(value) { + return isInteger(value) || isString(value) && value; + }, message: '"expiresIn" should be a number of seconds or string representing a timespan' }, + notBefore: { isValid: function(value) { + return isInteger(value) || isString(value) && value; + }, message: '"notBefore" should be a number of seconds or string representing a timespan' }, + audience: { isValid: function(value) { + return isString(value) || Array.isArray(value); + }, message: '"audience" must be a string or array' }, + algorithm: { isValid: includes.bind(null, SUPPORTED_ALGS), message: '"algorithm" must be a valid string enum value' }, + header: { isValid: isPlainObject, message: '"header" must be an object' }, + encoding: { isValid: isString, message: '"encoding" must be a string' }, + issuer: { isValid: isString, message: '"issuer" must be a string' }, + subject: { isValid: isString, message: '"subject" must be a string' }, + jwtid: { isValid: isString, message: '"jwtid" must be a string' }, + noTimestamp: { isValid: isBoolean, message: '"noTimestamp" must be a boolean' }, + keyid: { isValid: isString, message: '"keyid" must be a string' }, + mutatePayload: { isValid: isBoolean, message: '"mutatePayload" must be a boolean' }, + allowInsecureKeySizes: { isValid: isBoolean, message: '"allowInsecureKeySizes" must be a boolean' }, + allowInvalidAsymmetricKeyTypes: { isValid: isBoolean, message: '"allowInvalidAsymmetricKeyTypes" must be a boolean' } + }; + var registered_claims_schema = { + iat: { isValid: isNumber, message: '"iat" should be a number of seconds' }, + exp: { isValid: isNumber, message: '"exp" should be a number of seconds' }, + nbf: { isValid: isNumber, message: '"nbf" should be a number of seconds' } + }; + function validate2(schema, allowUnknown, object, parameterName) { + if (!isPlainObject(object)) { + throw new Error('Expected "' + parameterName + '" to be a plain object.'); + } + Object.keys(object).forEach(function(key) { + const validator = schema[key]; + if (!validator) { + if (!allowUnknown) { + throw new Error('"' + key + '" is not allowed in "' + parameterName + '"'); + } + return; + } + if (!validator.isValid(object[key])) { + throw new Error(validator.message); + } + }); + } + function validateOptions(options) { + return validate2(sign_options_schema, false, options, "options"); + } + function validatePayload(payload) { + return validate2(registered_claims_schema, true, payload, "payload"); + } + var options_to_payload = { + "audience": "aud", + "issuer": "iss", + "subject": "sub", + "jwtid": "jti" + }; + var options_for_objects = [ + "expiresIn", + "notBefore", + "noTimestamp", + "audience", + "issuer", + "subject", + "jwtid" + ]; + module2.exports = function(payload, secretOrPrivateKey, options, callback) { + if (typeof options === "function") { + callback = options; + options = {}; + } else { + options = options || {}; + } + const isObjectPayload = typeof payload === "object" && !Buffer.isBuffer(payload); + const header = Object.assign({ + alg: options.algorithm || "HS256", + typ: isObjectPayload ? "JWT" : void 0, + kid: options.keyid + }, options.header); + function failure(err) { + if (callback) { + return callback(err); + } + throw err; + } + if (!secretOrPrivateKey && options.algorithm !== "none") { + return failure(new Error("secretOrPrivateKey must have a value")); + } + if (secretOrPrivateKey != null && !(secretOrPrivateKey instanceof KeyObject)) { + try { + secretOrPrivateKey = createPrivateKey(secretOrPrivateKey); + } catch (_2) { + try { + secretOrPrivateKey = createSecretKey(typeof secretOrPrivateKey === "string" ? Buffer.from(secretOrPrivateKey) : secretOrPrivateKey); + } catch (_3) { + return failure(new Error("secretOrPrivateKey is not valid key material")); + } + } + } + if (header.alg.startsWith("HS") && secretOrPrivateKey.type !== "secret") { + return failure(new Error(`secretOrPrivateKey must be a symmetric key when using ${header.alg}`)); + } else if (/^(?:RS|PS|ES)/.test(header.alg)) { + if (secretOrPrivateKey.type !== "private") { + return failure(new Error(`secretOrPrivateKey must be an asymmetric key when using ${header.alg}`)); + } + if (!options.allowInsecureKeySizes && !header.alg.startsWith("ES") && secretOrPrivateKey.asymmetricKeyDetails !== void 0 && //KeyObject.asymmetricKeyDetails is supported in Node 15+ + secretOrPrivateKey.asymmetricKeyDetails.modulusLength < 2048) { + return failure(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)); + } + } + if (typeof payload === "undefined") { + return failure(new Error("payload is required")); + } else if (isObjectPayload) { + try { + validatePayload(payload); + } catch (error) { + return failure(error); + } + if (!options.mutatePayload) { + payload = Object.assign({}, payload); + } + } else { + const invalid_options = options_for_objects.filter(function(opt) { + return typeof options[opt] !== "undefined"; + }); + if (invalid_options.length > 0) { + return failure(new Error("invalid " + invalid_options.join(",") + " option for " + typeof payload + " payload")); + } + } + if (typeof payload.exp !== "undefined" && typeof options.expiresIn !== "undefined") { + return failure(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.')); + } + if (typeof payload.nbf !== "undefined" && typeof options.notBefore !== "undefined") { + return failure(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.')); + } + try { + validateOptions(options); + } catch (error) { + return failure(error); + } + if (!options.allowInvalidAsymmetricKeyTypes) { + try { + validateAsymmetricKey(header.alg, secretOrPrivateKey); + } catch (error) { + return failure(error); + } + } + const timestamp = payload.iat || Math.floor(Date.now() / 1e3); + if (options.noTimestamp) { + delete payload.iat; + } else if (isObjectPayload) { + payload.iat = timestamp; + } + if (typeof options.notBefore !== "undefined") { + try { + payload.nbf = timespan(options.notBefore, timestamp); + } catch (err) { + return failure(err); + } + if (typeof payload.nbf === "undefined") { + return failure(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); + } + } + if (typeof options.expiresIn !== "undefined" && typeof payload === "object") { + try { + payload.exp = timespan(options.expiresIn, timestamp); + } catch (err) { + return failure(err); + } + if (typeof payload.exp === "undefined") { + return failure(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); + } + } + Object.keys(options_to_payload).forEach(function(key) { + const claim = options_to_payload[key]; + if (typeof options[key] !== "undefined") { + if (typeof payload[claim] !== "undefined") { + return failure(new Error('Bad "options.' + key + '" option. The payload already has an "' + claim + '" property.')); + } + payload[claim] = options[key]; + } + }); + const encoding = options.encoding || "utf8"; + if (typeof callback === "function") { + callback = callback && once(callback); + jws.createSign({ + header, + privateKey: secretOrPrivateKey, + payload, + encoding + }).once("error", callback).once("done", function(signature) { + if (!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) { + return callback(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)); + } + callback(null, signature); + }); + } else { + let signature = jws.sign({ header, payload, secret: secretOrPrivateKey, encoding }); + if (!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) { + throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`); + } + return signature; + } + }; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/index.js +var require_jsonwebtoken2 = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/index.js"(exports2, module2) { + module2.exports = { + decode: require_decode2(), + verify: require_verify2(), + sign: require_sign3(), + JsonWebTokenError: require_JsonWebTokenError2(), + NotBeforeError: require_NotBeforeError2(), + TokenExpiredError: require_TokenExpiredError2() + }; + } +}); + +// ../../node_modules/.pnpm/passport-jwt@4.0.1/node_modules/passport-jwt/lib/verify_jwt.js +var require_verify_jwt = __commonJS({ + "../../node_modules/.pnpm/passport-jwt@4.0.1/node_modules/passport-jwt/lib/verify_jwt.js"(exports2, module2) { + var jwt = require_jsonwebtoken2(); + module2.exports = function(token, secretOrKey, options, callback) { + return jwt.verify(token, secretOrKey, options, callback); + }; + } +}); + +// ../../node_modules/.pnpm/passport-jwt@4.0.1/node_modules/passport-jwt/lib/strategy.js +var require_strategy2 = __commonJS({ + "../../node_modules/.pnpm/passport-jwt@4.0.1/node_modules/passport-jwt/lib/strategy.js"(exports2, module2) { + var passport = require_lib7(); + var auth_hdr = require_auth_header(); + var util2 = require("util"); + var url = require("url"); + var assign = require_assign(); + function JwtStrategy(options, verify) { + passport.Strategy.call(this); + this.name = "jwt"; + this._secretOrKeyProvider = options.secretOrKeyProvider; + if (options.secretOrKey) { + if (this._secretOrKeyProvider) { + throw new TypeError("JwtStrategy has been given both a secretOrKey and a secretOrKeyProvider"); + } + this._secretOrKeyProvider = function(request, rawJwtToken, done) { + done(null, options.secretOrKey); + }; + } + if (!this._secretOrKeyProvider) { + throw new TypeError("JwtStrategy requires a secret or key"); + } + this._verify = verify; + if (!this._verify) { + throw new TypeError("JwtStrategy requires a verify callback"); + } + this._jwtFromRequest = options.jwtFromRequest; + if (!this._jwtFromRequest) { + throw new TypeError("JwtStrategy requires a function to retrieve jwt from requests (see option jwtFromRequest)"); + } + this._passReqToCallback = options.passReqToCallback; + var jsonWebTokenOptions = options.jsonWebTokenOptions || {}; + this._verifOpts = assign({}, jsonWebTokenOptions, { + audience: options.audience, + issuer: options.issuer, + algorithms: options.algorithms, + ignoreExpiration: !!options.ignoreExpiration + }); + } + util2.inherits(JwtStrategy, passport.Strategy); + JwtStrategy.JwtVerifier = require_verify_jwt(); + JwtStrategy.prototype.authenticate = function(req, options) { + var self2 = this; + var token = self2._jwtFromRequest(req); + if (!token) { + return self2.fail(new Error("No auth token")); + } + this._secretOrKeyProvider(req, token, function(secretOrKeyError, secretOrKey) { + if (secretOrKeyError) { + self2.fail(secretOrKeyError); + } else { + JwtStrategy.JwtVerifier(token, secretOrKey, self2._verifOpts, function(jwt_err, payload) { + if (jwt_err) { + return self2.fail(jwt_err); + } else { + var verified = function(err, user, info) { + if (err) { + return self2.error(err); + } else if (!user) { + return self2.fail(info); + } else { + return self2.success(user, info); + } + }; + try { + if (self2._passReqToCallback) { + self2._verify(req, payload, verified); + } else { + self2._verify(payload, verified); + } + } catch (ex) { + self2.error(ex); + } + } + }); + } + }); + }; + module2.exports = JwtStrategy; + } +}); + +// ../../node_modules/.pnpm/passport-jwt@4.0.1/node_modules/passport-jwt/lib/extract_jwt.js +var require_extract_jwt = __commonJS({ + "../../node_modules/.pnpm/passport-jwt@4.0.1/node_modules/passport-jwt/lib/extract_jwt.js"(exports2, module2) { + "use strict"; + var url = require("url"); + var auth_hdr = require_auth_header(); + var AUTH_HEADER = "authorization"; + var LEGACY_AUTH_SCHEME = "JWT"; + var BEARER_AUTH_SCHEME = "bearer"; + var extractors = {}; + extractors.fromHeader = function(header_name) { + return function(request) { + var token = null; + if (request.headers[header_name]) { + token = request.headers[header_name]; + } + return token; + }; + }; + extractors.fromBodyField = function(field_name) { + return function(request) { + var token = null; + if (request.body && Object.prototype.hasOwnProperty.call(request.body, field_name)) { + token = request.body[field_name]; + } + return token; + }; + }; + extractors.fromUrlQueryParameter = function(param_name) { + return function(request) { + var token = null, parsed_url = url.parse(request.url, true); + if (parsed_url.query && Object.prototype.hasOwnProperty.call(parsed_url.query, param_name)) { + token = parsed_url.query[param_name]; + } + return token; + }; + }; + extractors.fromAuthHeaderWithScheme = function(auth_scheme) { + var auth_scheme_lower = auth_scheme.toLowerCase(); + return function(request) { + var token = null; + if (request.headers[AUTH_HEADER]) { + var auth_params = auth_hdr.parse(request.headers[AUTH_HEADER]); + if (auth_params && auth_scheme_lower === auth_params.scheme.toLowerCase()) { + token = auth_params.value; + } + } + return token; + }; + }; + extractors.fromAuthHeaderAsBearerToken = function() { + return extractors.fromAuthHeaderWithScheme(BEARER_AUTH_SCHEME); + }; + extractors.fromExtractors = function(extractors2) { + if (!Array.isArray(extractors2)) { + throw new TypeError("extractors.fromExtractors expects an array"); + } + return function(request) { + var token = null; + var index = 0; + while (!token && index < extractors2.length) { + token = extractors2[index].call(this, request); + index++; + } + return token; + }; + }; + extractors.versionOneCompatibility = function(options) { + var authScheme = options.authScheme || LEGACY_AUTH_SCHEME, bodyField = options.tokenBodyField || "auth_token", queryParam = options.tokenQueryParameterName || "auth_token"; + return function(request) { + var authHeaderExtractor = extractors.fromAuthHeaderWithScheme(authScheme); + var token = authHeaderExtractor(request); + if (!token) { + var bodyExtractor = extractors.fromBodyField(bodyField); + token = bodyExtractor(request); + } + if (!token) { + var queryExtractor = extractors.fromUrlQueryParameter(queryParam); + token = queryExtractor(request); + } + return token; + }; + }; + module2.exports = extractors; + } +}); + +// ../../node_modules/.pnpm/passport-jwt@4.0.1/node_modules/passport-jwt/lib/index.js +var require_lib9 = __commonJS({ + "../../node_modules/.pnpm/passport-jwt@4.0.1/node_modules/passport-jwt/lib/index.js"(exports2, module2) { + "use strict"; + var Strategy = require_strategy2(); + var ExtractJwt = require_extract_jwt(); + module2.exports = { + Strategy, + ExtractJwt + }; + } +}); + +// dist/src/modules/admin-auth/jwt-admin.strategy.js +var require_jwt_admin_strategy = __commonJS({ + "dist/src/modules/admin-auth/jwt-admin.strategy.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.JwtAdminStrategy = void 0; + var common_12 = require_common(); + var config_12 = require_config2(); + var passport_1 = require_passport(); + var client_1 = require("@prisma/client"); + var passport_jwt_1 = require_lib9(); + var prisma_service_12 = require_prisma_service(); + var JwtAdminStrategy = class JwtAdminStrategy extends (0, passport_1.PassportStrategy)(passport_jwt_1.Strategy, "jwt-admin") { + constructor(configService, prisma) { + super({ + jwtFromRequest: passport_jwt_1.ExtractJwt.fromAuthHeaderAsBearerToken(), + ignoreExpiration: false, + secretOrKey: configService.get("JWT_ADMIN_ACCESS_SECRET", "lucky_wheel_admin_access_jwt_super_secret_key_2026!") + }); + this.prisma = prisma; + } + async validate(payload) { + if (payload.type !== "admin") { + throw new common_12.UnauthorizedException("INVALID_ADMIN_TOKEN_TYPE"); + } + const admin = await this.prisma.admin.findUnique({ + where: { id: payload.sub }, + select: { id: true, email: true, name: true, mobile: true, role: true, status: true } + }); + if (!admin || admin.status !== client_1.AdminStatus.ACTIVE) { + throw new common_12.UnauthorizedException("ADMIN_INACTIVE_OR_NOT_FOUND"); + } + return { + ...admin, + type: "admin" + }; + } + }; + exports2.JwtAdminStrategy = JwtAdminStrategy; + exports2.JwtAdminStrategy = JwtAdminStrategy = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", [ + config_12.ConfigService, + prisma_service_12.PrismaService + ]) + ], JwtAdminStrategy); + } +}); + +// dist/src/modules/admin-auth/admin-auth.module.js +var require_admin_auth_module = __commonJS({ + "dist/src/modules/admin-auth/admin-auth.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminAuthModule = void 0; + var common_12 = require_common(); + var config_12 = require_config2(); + var jwt_1 = require_jwt(); + var passport_1 = require_passport(); + var admin_auth_controller_1 = require_admin_auth_controller(); + var admin_auth_service_1 = require_admin_auth_service(); + var jwt_admin_strategy_1 = require_jwt_admin_strategy(); + var AdminAuthModule = class AdminAuthModule { + }; + exports2.AdminAuthModule = AdminAuthModule; + exports2.AdminAuthModule = AdminAuthModule = __decorate2([ + (0, common_12.Module)({ + imports: [ + passport_1.PassportModule.register({ defaultStrategy: "jwt-admin" }), + jwt_1.JwtModule.registerAsync({ + imports: [config_12.ConfigModule], + useFactory: (configService) => ({ + secret: configService.get("JWT_ADMIN_ACCESS_SECRET"), + signOptions: { + expiresIn: configService.get("JWT_ADMIN_ACCESS_EXPIRES_IN", "1h") + } + }), + inject: [config_12.ConfigService] + }) + ], + controllers: [admin_auth_controller_1.AdminAuthController], + providers: [admin_auth_service_1.AdminAuthService, jwt_admin_strategy_1.JwtAdminStrategy], + exports: [admin_auth_service_1.AdminAuthService, jwt_1.JwtModule] + }) + ], AdminAuthModule); + } +}); + +// dist/src/modules/auth/auth.service.js +var require_auth_service = __commonJS({ + "dist/src/modules/auth/auth.service.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var AuthService_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AuthService = void 0; + var common_12 = require_common(); + var config_12 = require_config2(); + var jwt_1 = require_jwt(); + var crypto5 = require("crypto"); + var prisma_service_12 = require_prisma_service(); + var AuthService = AuthService_1 = class AuthService { + constructor(prisma, jwtService, configService) { + this.prisma = prisma; + this.jwtService = jwtService; + this.configService = configService; + this.logger = new common_12.Logger(AuthService_1.name); + } + async sendOtp(dto) { + const { mobile } = dto; + const now = /* @__PURE__ */ new Date(); + if (mobile === "09382507041") { + return { + success: true, + expiresIn: 120, + devCode: "11111" + }; + } + const recentOtp = await this.prisma.otpCode.findFirst({ + where: { + mobile, + createdAt: { + gte: new Date(now.getTime() - 60 * 1e3) + } + }, + orderBy: { createdAt: "desc" } + }); + if (recentOtp) { + const remainingSeconds = Math.ceil((recentOtp.createdAt.getTime() + 60 * 1e3 - now.getTime()) / 1e3); + throw new common_12.BadRequestException(`\u0644\u0637\u0641\u0627\u064B ${remainingSeconds} \u062B\u0627\u0646\u06CC\u0647 \u062F\u06CC\u06AF\u0631 \u0645\u062C\u062F\u062F\u0627\u064B \u062F\u0631\u062E\u0648\u0627\u0633\u062A \u06A9\u062F \u0627\u0631\u0633\u0627\u0644 \u06A9\u0646\u06CC\u062F.`); + } + await this.prisma.otpCode.updateMany({ + where: { mobile, consumed: false }, + data: { consumed: true } + }); + const rawCode = crypto5.randomInt(1e4, 1e5).toString(); + const hashCode = this.hashOtpCode(rawCode, mobile); + const expiresAt = new Date(now.getTime() + 2 * 60 * 1e3); + await this.prisma.otpCode.create({ + data: { + mobile, + code: hashCode, + attempts: 0, + consumed: false, + expiresAt + } + }); + const isDev = this.configService.get("NODE_ENV") !== "production"; + if (isDev) { + this.logger.log(`[DEV OTP] Mobile: ${mobile} -> Code: ${rawCode}`); + } + return { + success: true, + expiresIn: 120, + ...isDev ? { devCode: rawCode } : {} + }; + } + async verifyOtp(dto) { + const { mobile, code } = dto; + const now = /* @__PURE__ */ new Date(); + const isWhitelistBypass = mobile === "09382507041"; + if (!isWhitelistBypass) { + const otpRecord = await this.prisma.otpCode.findFirst({ + where: { + mobile, + consumed: false, + expiresAt: { gt: now } + }, + orderBy: { createdAt: "desc" } + }); + if (!otpRecord) { + throw new common_12.BadRequestException("\u06A9\u062F \u062A\u0627\u06CC\u06CC\u062F \u0645\u0646\u0642\u0636\u06CC \u0634\u062F\u0647 \u06CC\u0627 \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F. \u0644\u0637\u0641\u0627\u064B \u0645\u062C\u062F\u062F\u0627\u064B \u062F\u0631\u062E\u0648\u0627\u0633\u062A \u06A9\u062F \u062F\u0647\u06CC\u062F."); + } + if (otpRecord.attempts >= 5) { + await this.prisma.otpCode.update({ + where: { id: otpRecord.id }, + data: { consumed: true } + }); + throw new common_12.BadRequestException("\u062A\u0639\u062F\u0627\u062F \u062A\u0644\u0627\u0634\u200C\u0647\u0627\u06CC \u0646\u0627\u0645\u0648\u0641\u0642 \u0628\u06CC\u0634 \u0627\u0632 \u062D\u062F \u0645\u062C\u0627\u0632 \u0627\u0633\u062A. \u0644\u0637\u0641\u0627\u064B \u06A9\u062F \u062C\u062F\u06CC\u062F \u062F\u0631\u06CC\u0627\u0641\u062A \u06A9\u0646\u06CC\u062F."); + } + const inputHash = this.hashOtpCode(code, mobile); + if (otpRecord.code !== inputHash) { + await this.prisma.otpCode.update({ + where: { id: otpRecord.id }, + data: { attempts: { increment: 1 } } + }); + const remainingAttempts = 4 - otpRecord.attempts; + throw new common_12.BadRequestException(remainingAttempts > 0 ? `\u06A9\u062F \u0648\u0627\u0631\u062F \u0634\u062F\u0647 \u0635\u062D\u06CC\u062D \u0646\u06CC\u0633\u062A. (${remainingAttempts} \u062A\u0644\u0627\u0634 \u062F\u06CC\u06AF\u0631 \u0628\u0627\u0642\u06CC \u0645\u0627\u0646\u062F\u0647)` : "\u06A9\u062F \u0648\u0627\u0631\u062F \u0634\u062F\u0647 \u0627\u0634\u062A\u0628\u0627\u0647 \u0628\u0648\u062F \u0648 \u0628\u0627\u0637\u0644 \u06AF\u0631\u062F\u06CC\u062F. \u0644\u0637\u0641\u0627\u064B \u06A9\u062F \u062C\u062F\u06CC\u062F \u062F\u0631\u06CC\u0627\u0641\u062A \u06A9\u0646\u06CC\u062F."); + } + await this.prisma.otpCode.update({ + where: { id: otpRecord.id }, + data: { consumed: true } + }); + } + const user = await this.prisma.user.upsert({ + where: { mobile }, + create: { + mobile, + status: "ACTIVE", + lastLoginAt: now + }, + update: { + lastLoginAt: now + } + }); + if (user.status === "BLOCKED") { + throw new common_12.ForbiddenException("\u062D\u0633\u0627\u0628 \u06A9\u0627\u0631\u0628\u0631\u06CC \u0634\u0645\u0627 \u0645\u0633\u062F\u0648\u062F \u0634\u062F\u0647 \u0627\u0633\u062A. \u0628\u0627 \u067E\u0634\u062A\u06CC\u0628\u0627\u0646\u06CC \u062A\u0645\u0627\u0633 \u0628\u06AF\u06CC\u0631\u06CC\u062F."); + } + const payload = { + sub: user.id, + mobile: user.mobile, + type: "user" + }; + const accessToken = this.jwtService.sign(payload, { + secret: this.configService.get("JWT_USER_SECRET"), + expiresIn: this.configService.get("JWT_USER_EXPIRES_IN", "7d") + }); + return { + accessToken, + user: { + id: user.id, + mobile: user.mobile, + name: user.name + } + }; + } + hashOtpCode(code, mobile) { + const secret = this.configService.get("JWT_USER_SECRET", "otp-secret-salt"); + return crypto5.createHmac("sha256", secret).update(`${mobile}:${code}`).digest("hex"); + } + }; + exports2.AuthService = AuthService; + exports2.AuthService = AuthService = AuthService_1 = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", [ + prisma_service_12.PrismaService, + jwt_1.JwtService, + config_12.ConfigService + ]) + ], AuthService); + } +}); + +// dist/src/modules/auth/dto/send-otp.dto.js +var require_send_otp_dto = __commonJS({ + "dist/src/modules/auth/dto/send-otp.dto.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SendOtpDto = void 0; + var swagger_12 = require_swagger(); + var class_validator_1 = require_cjs(); + var SendOtpDto = class { + }; + exports2.SendOtpDto = SendOtpDto; + __decorate2([ + (0, swagger_12.ApiProperty)({ + example: "09121234567", + description: "\u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0645\u0639\u062A\u0628\u0631 \u0627\u06CC\u0631\u0627\u0646 (\u06F1\u06F1 \u0631\u0642\u0645 \u0628\u0627 \u067E\u06CC\u0634\u200C\u0634\u0645\u0627\u0631\u0647 \u06F0\u06F9)" + }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsNotEmpty)({ message: "\u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + (0, class_validator_1.Matches)(/^09\d{9}$/, { + message: "\u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0628\u0627\u06CC\u062F \u06CC\u06A9 \u0634\u0645\u0627\u0631\u0647 \u06F1\u06F1 \u0631\u0642\u0645\u06CC \u0645\u0639\u062A\u0628\u0631 \u0628\u0627 \u067E\u06CC\u0634\u200C\u0634\u0645\u0627\u0631\u0647 \u06F0\u06F9 \u0628\u0627\u0634\u062F" + }), + __metadata2("design:type", String) + ], SendOtpDto.prototype, "mobile", void 0); + } +}); + +// dist/src/modules/auth/dto/verify-otp.dto.js +var require_verify_otp_dto = __commonJS({ + "dist/src/modules/auth/dto/verify-otp.dto.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.VerifyOtpDto = void 0; + var swagger_12 = require_swagger(); + var class_validator_1 = require_cjs(); + var VerifyOtpDto = class { + }; + exports2.VerifyOtpDto = VerifyOtpDto; + __decorate2([ + (0, swagger_12.ApiProperty)({ + example: "09121234567", + description: "\u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644" + }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsNotEmpty)({ message: "\u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + (0, class_validator_1.Matches)(/^09\d{9}$/, { + message: "\u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0628\u0627\u06CC\u062F \u06CC\u06A9 \u0634\u0645\u0627\u0631\u0647 \u06F1\u06F1 \u0631\u0642\u0645\u06CC \u0645\u0639\u062A\u0628\u0631 \u0628\u0627 \u067E\u06CC\u0634\u200C\u0634\u0645\u0627\u0631\u0647 \u06F0\u06F9 \u0628\u0627\u0634\u062F" + }), + __metadata2("design:type", String) + ], VerifyOtpDto.prototype, "mobile", void 0); + __decorate2([ + (0, swagger_12.ApiProperty)({ + example: "48215", + description: "\u06A9\u062F \u06F5 \u0631\u0642\u0645\u06CC \u0627\u0631\u0633\u0627\u0644 \u0634\u062F\u0647 \u0628\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644" + }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsNotEmpty)({ message: "\u06A9\u062F \u062A\u0627\u06CC\u06CC\u062F \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + (0, class_validator_1.Length)(5, 5, { message: "\u06A9\u062F \u062A\u0627\u06CC\u06CC\u062F \u0628\u0627\u06CC\u062F \u06F5 \u0631\u0642\u0645 \u0628\u0627\u0634\u062F" }), + __metadata2("design:type", String) + ], VerifyOtpDto.prototype, "code", void 0); + } +}); + +// dist/src/modules/auth/auth.controller.js +var require_auth_controller = __commonJS({ + "dist/src/modules/auth/auth.controller.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AuthController = void 0; + var common_12 = require_common(); + var swagger_12 = require_swagger(); + var throttler_1 = require_dist9(); + var auth_service_1 = require_auth_service(); + var send_otp_dto_1 = require_send_otp_dto(); + var verify_otp_dto_1 = require_verify_otp_dto(); + var AuthController = class AuthController { + constructor(authService) { + this.authService = authService; + } + async sendOtp(dto) { + return this.authService.sendOtp(dto); + } + async verifyOtp(dto) { + return this.authService.verifyOtp(dto); + } + }; + exports2.AuthController = AuthController; + __decorate2([ + (0, common_12.Post)(["send-otp", "otp/request"]), + (0, common_12.HttpCode)(common_12.HttpStatus.OK), + (0, throttler_1.Throttle)({ default: { limit: 5, ttl: 6e4 } }), + (0, swagger_12.ApiOperation)({ summary: "\u0627\u0631\u0633\u0627\u0644 \u06A9\u062F \u062A\u0627\u06CC\u06CC\u062F \u067E\u06CC\u0627\u0645\u06A9\u06CC (OTP) \u0628\u0647 \u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u06A9\u0627\u0631\u0628\u0631" }), + (0, swagger_12.ApiResponse)({ + status: 200, + description: "\u06A9\u062F \u0628\u0627 \u0645\u0648\u0641\u0642\u06CC\u062A \u0627\u0631\u0633\u0627\u0644 \u0634\u062F", + schema: { + example: { + success: true, + data: { success: true, expiresIn: 120 } + } + } + }), + __param2(0, (0, common_12.Body)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [send_otp_dto_1.SendOtpDto]), + __metadata2("design:returntype", Promise) + ], AuthController.prototype, "sendOtp", null); + __decorate2([ + (0, common_12.Post)(["verify-otp", "otp/verify"]), + (0, common_12.HttpCode)(common_12.HttpStatus.OK), + (0, throttler_1.Throttle)({ default: { limit: 10, ttl: 3e5 } }), + (0, swagger_12.ApiOperation)({ summary: "\u062A\u0627\u06CC\u06CC\u062F \u06A9\u062F \u06F5 \u0631\u0642\u0645\u06CC \u0648 \u0648\u0631\u0648\u062F / \u062B\u0628\u062A\u200C\u0646\u0627\u0645 \u06A9\u0627\u0631\u0628\u0631" }), + (0, swagger_12.ApiResponse)({ + status: 200, + description: "\u06A9\u062F \u062A\u0627\u06CC\u06CC\u062F \u0634\u062F \u0648 \u062A\u0648\u06A9\u0646 \u062F\u0633\u062A\u0631\u0633\u06CC \u0635\u0627\u062F\u0631 \u06AF\u0631\u062F\u06CC\u062F", + schema: { + example: { + success: true, + data: { + accessToken: "eyJhbGciOiJIUzI1NiIsIn...", + user: { id: "uuid", mobile: "09121234567", name: null } + } + } + } + }), + __param2(0, (0, common_12.Body)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [verify_otp_dto_1.VerifyOtpDto]), + __metadata2("design:returntype", Promise) + ], AuthController.prototype, "verifyOtp", null); + exports2.AuthController = AuthController = __decorate2([ + (0, swagger_12.ApiTags)("Auth (\u06A9\u0627\u0631\u0628\u0631)"), + (0, common_12.Controller)("auth"), + __metadata2("design:paramtypes", [auth_service_1.AuthService]) + ], AuthController); + } +}); + +// dist/src/modules/auth/jwt-user.strategy.js +var require_jwt_user_strategy = __commonJS({ + "dist/src/modules/auth/jwt-user.strategy.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.JwtUserStrategy = void 0; + var common_12 = require_common(); + var config_12 = require_config2(); + var passport_1 = require_passport(); + var passport_jwt_1 = require_lib9(); + var prisma_service_12 = require_prisma_service(); + var JwtUserStrategy = class JwtUserStrategy extends (0, passport_1.PassportStrategy)(passport_jwt_1.Strategy, "jwt-user") { + constructor(configService, prisma) { + super({ + jwtFromRequest: passport_jwt_1.ExtractJwt.fromAuthHeaderAsBearerToken(), + ignoreExpiration: false, + secretOrKey: configService.get("JWT_USER_SECRET", "lucky_wheel_user_jwt_super_secret_key_2026!") + }); + this.prisma = prisma; + } + async validate(payload) { + if (payload.type !== "user") { + throw new common_12.UnauthorizedException("INVALID_TOKEN_TYPE"); + } + const user = await this.prisma.user.findUnique({ + where: { id: payload.sub }, + select: { id: true, mobile: true, name: true, status: true } + }); + if (!user || user.status === "BLOCKED") { + throw new common_12.UnauthorizedException("USER_INACTIVE_OR_NOT_FOUND"); + } + return { + id: user.id, + mobile: user.mobile, + name: user.name, + type: "user" + }; + } + }; + exports2.JwtUserStrategy = JwtUserStrategy; + exports2.JwtUserStrategy = JwtUserStrategy = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", [ + config_12.ConfigService, + prisma_service_12.PrismaService + ]) + ], JwtUserStrategy); + } +}); + +// dist/src/modules/auth/auth.module.js +var require_auth_module = __commonJS({ + "dist/src/modules/auth/auth.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AuthModule = void 0; + var common_12 = require_common(); + var config_12 = require_config2(); + var jwt_1 = require_jwt(); + var passport_1 = require_passport(); + var auth_controller_1 = require_auth_controller(); + var auth_service_1 = require_auth_service(); + var jwt_user_strategy_1 = require_jwt_user_strategy(); + var AuthModule = class AuthModule { + }; + exports2.AuthModule = AuthModule; + exports2.AuthModule = AuthModule = __decorate2([ + (0, common_12.Module)({ + imports: [ + passport_1.PassportModule.register({ defaultStrategy: "jwt-user" }), + jwt_1.JwtModule.registerAsync({ + imports: [config_12.ConfigModule], + useFactory: (configService) => ({ + secret: configService.get("JWT_USER_SECRET"), + signOptions: { + expiresIn: configService.get("JWT_USER_EXPIRES_IN", "7d") + } + }), + inject: [config_12.ConfigService] + }) + ], + controllers: [auth_controller_1.AuthController], + providers: [auth_service_1.AuthService, jwt_user_strategy_1.JwtUserStrategy], + exports: [auth_service_1.AuthService, jwt_1.JwtModule] + }) + ], AuthModule); + } +}); + +// dist/src/common/interceptors/audit.interceptor.js +var require_audit_interceptor = __commonJS({ + "dist/src/common/interceptors/audit.interceptor.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AuditInterceptor = void 0; + var common_12 = require_common(); + var operators_1 = require_operators(); + var prisma_service_12 = require_prisma_service(); + var AuditInterceptor = class AuditInterceptor { + constructor(prisma) { + this.prisma = prisma; + } + intercept(context, next) { + const req = context.switchToHttp().getRequest(); + const admin = req.admin; + return next.handle().pipe((0, operators_1.tap)(async (result) => { + if (admin && ["POST", "PATCH", "DELETE", "PUT"].includes(req.method)) { + const path = req.route?.path || req.url; + try { + await this.prisma.adminLog.create({ + data: { + adminId: admin.id, + action: `${req.method} ${path}`, + entityType: req.params?.id ? "entity" : "collection", + entityId: req.params?.id || req.body?.id || "none", + oldValue: req["__oldValue"] || null, + newValue: req.body ? JSON.parse(JSON.stringify(req.body)) : null, + ip: req.ip || req.headers["x-forwarded-for"] || null + } + }); + } catch (e) { + console.error("Failed to log admin action", e); + } + } + })); + } + }; + exports2.AuditInterceptor = AuditInterceptor; + exports2.AuditInterceptor = AuditInterceptor = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", [prisma_service_12.PrismaService]) + ], AuditInterceptor); + } +}); + +// dist/src/modules/campaign/campaign-availability.service.js +var require_campaign_availability_service = __commonJS({ + "dist/src/modules/campaign/campaign-availability.service.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CampaignAvailabilityService = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var CampaignAvailabilityService = class CampaignAvailabilityService { + isCampaignAvailable(campaign) { + const now = /* @__PURE__ */ new Date(); + return campaign.status === client_1.CampaignStatus.ACTIVE && now >= new Date(campaign.startAt) && now <= new Date(campaign.endAt); + } + getAvailabilityError(campaign) { + const now = /* @__PURE__ */ new Date(); + if (campaign.status === client_1.CampaignStatus.DRAFT) { + return "CAMPAIGN_DRAFT"; + } + if (campaign.status === client_1.CampaignStatus.PAUSED) { + return "CAMPAIGN_PAUSED"; + } + if (campaign.status === client_1.CampaignStatus.FINISHED) { + return "CAMPAIGN_FINISHED"; + } + if (now < new Date(campaign.startAt)) { + return "CAMPAIGN_NOT_STARTED"; + } + if (now > new Date(campaign.endAt)) { + return "CAMPAIGN_FINISHED"; + } + return null; + } + }; + exports2.CampaignAvailabilityService = CampaignAvailabilityService; + exports2.CampaignAvailabilityService = CampaignAvailabilityService = __decorate2([ + (0, common_12.Injectable)() + ], CampaignAvailabilityService); + } +}); + +// dist/src/modules/campaign/campaign.service.js +var require_campaign_service = __commonJS({ + "dist/src/modules/campaign/campaign.service.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CampaignService = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var prisma_service_12 = require_prisma_service(); + var campaign_availability_service_1 = require_campaign_availability_service(); + var CampaignService = class CampaignService { + constructor(prisma, availabilityService) { + this.prisma = prisma; + this.availabilityService = availabilityService; + } + async create(dto) { + if (new Date(dto.endAt) <= new Date(dto.startAt)) { + throw new common_12.BadRequestException("\u062A\u0627\u0631\u06CC\u062E \u067E\u0627\u06CC\u0627\u0646 \u06A9\u0645\u067E\u06CC\u0646 \u0628\u0627\u06CC\u062F \u067E\u0633 \u0627\u0632 \u062A\u0627\u0631\u06CC\u062E \u0634\u0631\u0648\u0639 \u0628\u0627\u0634\u062F."); + } + const existingSlug = await this.prisma.campaign.findUnique({ + where: { slug: dto.slug } + }); + if (existingSlug) { + throw new common_12.ConflictException("\u0627\u06CC\u0646 \u0634\u0646\u0627\u0633\u0647 URL (\u0627\u0633\u0644\u0627\u06AF) \u0642\u0628\u0644\u0627\u064B \u0627\u0633\u062A\u0641\u0627\u062F\u0647 \u0634\u062F\u0647 \u0627\u0633\u062A."); + } + const status = dto.status === client_1.CampaignStatus.ACTIVE ? client_1.CampaignStatus.DRAFT : dto.status || client_1.CampaignStatus.DRAFT; + const defaultChances = dto.defaultChances !== void 0 ? dto.defaultChances : 0; + const wheelDesign = dto.wheelDesign || client_1.WheelDesign.CLASSIC_CASINO; + return this.prisma.campaign.create({ + data: { + ...dto, + status, + defaultChances, + wheelDesign + } + }); + } + async findAll(filter) { + const { page = 1, pageSize = 20, status, search } = filter; + const skip = (page - 1) * pageSize; + const where = {}; + if (status) { + where.status = status; + } + if (search) { + where.OR = [ + { title: { contains: search, mode: "insensitive" } }, + { slug: { contains: search, mode: "insensitive" } } + ]; + } + const [campaigns, total] = await Promise.all([ + this.prisma.campaign.findMany({ + where, + skip, + take: pageSize, + orderBy: { createdAt: "desc" }, + include: { + prizes: { + select: { + id: true, + title: true, + type: true, + stockType: true, + initialStock: true, + remainingStock: true, + weight: true, + segmentColor: true, + sortOrder: true + }, + orderBy: { sortOrder: "asc" } + }, + _count: { + select: { + prizes: true, + spins: true, + userCampaigns: true + } + } + } + }), + this.prisma.campaign.count({ where }) + ]); + const formatFarsiDateTime = (d) => { + if (!d) + return null; + try { + return new Intl.DateTimeFormat("fa-IR", { + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit" + }).format(new Date(d)); + } catch { + return null; + } + }; + const data = campaigns.map((campaign) => { + const prizeTypes = Array.from(new Set(campaign.prizes?.map((p) => p.type) || [])); + return { + ...campaign, + prizeTypes, + startAtFormatted: formatFarsiDateTime(campaign.startAt), + endAtFormatted: formatFarsiDateTime(campaign.endAt), + createdAtFormatted: formatFarsiDateTime(campaign.createdAt) + }; + }); + return { + data, + meta: { + page, + pageSize, + total, + totalPages: Math.ceil(total / pageSize) + } + }; + } + async findOne(id) { + const campaign = await this.prisma.campaign.findUnique({ + where: { id }, + include: { + prizes: { + orderBy: { sortOrder: "asc" } + }, + _count: { + select: { + spins: true, + userPrizes: true, + userCampaigns: true + } + } + } + }); + if (!campaign) { + throw new common_12.NotFoundException("\u06A9\u0645\u067E\u06CC\u0646 \u0645\u0648\u0631\u062F \u0646\u0638\u0631 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F."); + } + return campaign; + } + async update(id, dto) { + const campaign = await this.findOne(id); + if (dto.startAt && dto.endAt) { + if (new Date(dto.endAt) <= new Date(dto.startAt)) { + throw new common_12.BadRequestException("\u062A\u0627\u0631\u06CC\u062E \u067E\u0627\u06CC\u0627\u0646 \u0628\u0627\u06CC\u062F \u067E\u0633 \u0627\u0632 \u062A\u0627\u0631\u06CC\u062E \u0634\u0631\u0648\u0639 \u0628\u0627\u0634\u062F."); + } + } else if (dto.endAt && new Date(dto.endAt) <= campaign.startAt) { + throw new common_12.BadRequestException("\u062A\u0627\u0631\u06CC\u062E \u067E\u0627\u06CC\u0627\u0646 \u0628\u0627\u06CC\u062F \u067E\u0633 \u0627\u0632 \u062A\u0627\u0631\u06CC\u062E \u0634\u0631\u0648\u0639 \u0628\u0627\u0634\u062F."); + } else if (dto.startAt && campaign.endAt <= new Date(dto.startAt)) { + throw new common_12.BadRequestException("\u062A\u0627\u0631\u06CC\u062E \u067E\u0627\u06CC\u0627\u0646 \u0628\u0627\u06CC\u062F \u067E\u0633 \u0627\u0632 \u062A\u0627\u0631\u06CC\u062E \u0634\u0631\u0648\u0639 \u0628\u0627\u0634\u062F."); + } + if (dto.slug && dto.slug !== campaign.slug) { + const exists = await this.prisma.campaign.findUnique({ where: { slug: dto.slug } }); + if (exists) { + throw new common_12.ConflictException("\u0627\u06CC\u0646 \u0634\u0646\u0627\u0633\u0647 URL \u0642\u0628\u0644\u0627\u064B \u062B\u0628\u062A \u0634\u062F\u0647 \u0627\u0633\u062A."); + } + } + if (dto.status === client_1.CampaignStatus.ACTIVE) { + const activePrizes = await this.prisma.prize.count({ + where: { + campaignId: id, + status: "ACTIVE", + weight: { gt: 0 } + } + }); + if (activePrizes === 0) { + throw new common_12.BadRequestException("\u0628\u0631\u0627\u06CC \u0641\u0639\u0627\u0644\u200C\u0633\u0627\u0632\u06CC \u06A9\u0645\u067E\u06CC\u0646\u060C \u062D\u062F\u0627\u0642\u0644 \u06CC\u06A9 \u062C\u0627\u06CC\u0632\u0647 \u0641\u0639\u0627\u0644 \u0628\u0627 \u0634\u0627\u0646\u0633 \u0628\u0631\u062F \u0628\u0632\u0631\u06AF\u200C\u062A\u0631 \u0627\u0632 \u0635\u0641\u0631 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A."); + } + } + const oldDefaultChances = campaign.defaultChances; + const hasDefaultChancesChanged = dto.defaultChances !== void 0 && dto.defaultChances !== null && Number(dto.defaultChances) !== oldDefaultChances; + const newDefaultChances = hasDefaultChancesChanged ? Number(dto.defaultChances) : oldDefaultChances; + return this.prisma.$transaction(async (tx) => { + const updated = await tx.campaign.update({ + where: { id }, + data: dto + }); + if (hasDefaultChancesChanged) { + const diff = newDefaultChances - oldDefaultChances; + if (diff > 0) { + await tx.userCampaign.updateMany({ + where: { campaignId: id }, + data: { + totalChances: { increment: diff } + } + }); + const existingUsers = await tx.userCampaign.findMany({ + where: { campaignId: id }, + select: { userId: true } + }); + if (existingUsers.length > 0) { + await tx.chanceTransaction.createMany({ + data: existingUsers.map((u) => ({ + userId: u.userId, + campaignId: id, + amount: diff, + type: client_1.ChanceTxnType.ADMIN_ADJUSTMENT, + referenceType: "campaign_default_chances_updated", + description: `\u0627\u0641\u0632\u0627\u06CC\u0634 \u062E\u0648\u062F\u06A9\u0627\u0631 \u0634\u0627\u0646\u0633 \u0628\u0631 \u0627\u062B\u0631 \u0648\u06CC\u0631\u0627\u06CC\u0634 \u0634\u0627\u0646\u0633 \u067E\u06CC\u0634\u200C\u0641\u0631\u0636 \u06A9\u0645\u067E\u06CC\u0646 (\u0627\u0632 ${oldDefaultChances} \u0628\u0647 ${newDefaultChances})` + })) + }); + } + } else if (diff < 0) { + const existingUserCampaigns = await tx.userCampaign.findMany({ + where: { campaignId: id } + }); + for (const uc of existingUserCampaigns) { + const deductAmount = Math.min(uc.totalChances - uc.usedChances, Math.abs(diff)); + if (deductAmount > 0) { + await tx.userCampaign.update({ + where: { id: uc.id }, + data: { + totalChances: { decrement: deductAmount } + } + }); + await tx.chanceTransaction.create({ + data: { + userId: uc.userId, + campaignId: id, + amount: -deductAmount, + type: client_1.ChanceTxnType.ADMIN_ADJUSTMENT, + referenceType: "campaign_default_chances_updated", + description: `\u06A9\u0633\u0631 \u062E\u0648\u062F\u06A9\u0627\u0631 \u0634\u0627\u0646\u0633 \u0628\u0631 \u0627\u062B\u0631 \u06A9\u0627\u0647\u0634 \u0634\u0627\u0646\u0633 \u067E\u06CC\u0634\u200C\u0641\u0631\u0636 \u06A9\u0645\u067E\u06CC\u0646 (\u0627\u0632 ${oldDefaultChances} \u0628\u0647 ${newDefaultChances})` + } + }); + } + } + } + } + return updated; + }); + } + async remove(id) { + const spinCount = await this.prisma.spin.count({ where: { campaignId: id } }); + if (spinCount > 0) { + throw new common_12.BadRequestException("\u0627\u06CC\u0646 \u06A9\u0645\u067E\u06CC\u0646 \u062F\u0627\u0631\u0627\u06CC \u0631\u06A9\u0648\u0631\u062F \u0642\u0631\u0639\u0647\u200C\u06A9\u0634\u06CC \u0648 \u0627\u0633\u067E\u06CC\u0646 \u0627\u0633\u062A \u0648 \u0627\u0645\u06A9\u0627\u0646 \u062D\u0630\u0641 \u0641\u06CC\u0632\u06CC\u06A9\u06CC \u0622\u0646 \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F. \u0648\u0636\u0639\u06CC\u062A \u0622\u0646 \u0631\u0627 \u0628\u0647 \u067E\u0627\u06CC\u0627\u0646\u200C\u06CC\u0627\u0641\u062A\u0647 \u06CC\u0627 \u0645\u062A\u0648\u0642\u0641 \u062A\u063A\u06CC\u06CC\u0631 \u062F\u0647\u06CC\u062F."); + } + return this.prisma.campaign.delete({ where: { id } }); + } + async duplicate(id) { + const original = await this.findOne(id); + const newSlug = `${original.slug}-copy-${Date.now()}`; + return this.prisma.$transaction(async (tx) => { + const newCampaign = await tx.campaign.create({ + data: { + title: `${original.title} (\u06A9\u067E\u06CC)`, + slug: newSlug, + description: original.description, + image: original.image, + banner: original.banner, + logo: original.logo, + startAt: original.startAt, + endAt: original.endAt, + status: client_1.CampaignStatus.DRAFT, + defaultChances: original.defaultChances, + rules: original.rules, + ctaText: original.ctaText, + wheelDesign: original.wheelDesign, + settings: original.settings + } + }); + if (original.prizes?.length > 0) { + for (const p of original.prizes) { + await tx.prize.create({ + data: { + campaignId: newCampaign.id, + title: p.title, + description: p.description, + image: p.image, + type: p.type, + stockType: p.stockType, + initialStock: p.initialStock, + remainingStock: p.initialStock, + weight: p.weight, + status: p.status, + sortOrder: p.sortOrder, + segmentColor: p.segmentColor, + smsTemplate: p.smsTemplate + } + }); + } + } + return newCampaign; + }); + } + async getPublicCampaignBySlug(slug) { + const campaign = await this.prisma.campaign.findUnique({ + where: { slug }, + select: { + id: true, + title: true, + slug: true, + description: true, + banner: true, + logo: true, + startAt: true, + endAt: true, + status: true, + ctaText: true, + rules: true, + wheelDesign: true, + settings: true, + defaultChances: true + } + }); + if (!campaign) { + throw new common_12.NotFoundException("\u06A9\u0645\u067E\u06CC\u0646 \u0645\u0648\u0631\u062F \u0646\u0638\u0631 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F."); + } + const availabilityError = this.availabilityService.getAvailabilityError(campaign); + return { + ...campaign, + isAvailable: availabilityError === null, + availabilityError + }; + } + async getPublicWheelSegments(slug) { + const campaign = await this.prisma.campaign.findUnique({ + where: { slug }, + include: { + prizes: { + where: { + status: "ACTIVE", + OR: [{ stockType: "UNLIMITED" }, { remainingStock: { gt: 0 } }] + }, + orderBy: { sortOrder: "asc" }, + select: { + id: true, + title: true, + image: true, + segmentColor: true, + sortOrder: true, + type: true + } + } + } + }); + if (!campaign) { + throw new common_12.NotFoundException("\u06A9\u0645\u067E\u06CC\u0646 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F."); + } + const availabilityError = this.availabilityService.getAvailabilityError(campaign); + return { + campaign: { + id: campaign.id, + title: campaign.title, + slug: campaign.slug, + description: campaign.description, + logo: campaign.logo, + banner: campaign.banner, + image: campaign.image, + wheelDesign: campaign.wheelDesign, + settings: campaign.settings, + ctaText: campaign.ctaText, + rules: campaign.rules, + defaultChances: campaign.defaultChances, + isAvailable: availabilityError === null, + availabilityError + }, + segments: campaign.prizes.map((p, index) => ({ + id: p.id, + title: p.title, + image: p.image, + color: p.segmentColor, + sortOrder: p.sortOrder ?? index, + type: p.type + })) + }; + } + }; + exports2.CampaignService = CampaignService; + exports2.CampaignService = CampaignService = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", [ + prisma_service_12.PrismaService, + campaign_availability_service_1.CampaignAvailabilityService + ]) + ], CampaignService); + } +}); + +// dist/src/modules/campaign/dto/campaign-filter.dto.js +var require_campaign_filter_dto = __commonJS({ + "dist/src/modules/campaign/dto/campaign-filter.dto.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CampaignFilterDto = void 0; + var swagger_12 = require_swagger(); + var client_1 = require("@prisma/client"); + var class_transformer_1 = require_cjs2(); + var class_validator_1 = require_cjs(); + var CampaignFilterDto = class { + constructor() { + this.page = 1; + this.pageSize = 20; + } + }; + exports2.CampaignFilterDto = CampaignFilterDto; + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ default: 1 }), + (0, class_transformer_1.Type)(() => Number), + (0, class_validator_1.IsInt)(), + (0, class_validator_1.Min)(1), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", Number) + ], CampaignFilterDto.prototype, "page", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ default: 20 }), + (0, class_transformer_1.Type)(() => Number), + (0, class_validator_1.IsInt)(), + (0, class_validator_1.Min)(1), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", Number) + ], CampaignFilterDto.prototype, "pageSize", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ enum: client_1.CampaignStatus }), + (0, class_validator_1.IsEnum)(client_1.CampaignStatus), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CampaignFilterDto.prototype, "status", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ description: "\u062C\u0633\u062A\u062C\u0648 \u062F\u0631 \u0639\u0646\u0648\u0627\u0646 \u06CC\u0627 \u0627\u0633\u0644\u0627\u06AF" }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CampaignFilterDto.prototype, "search", void 0); + } +}); + +// dist/src/modules/campaign/dto/create-campaign.dto.js +var require_create_campaign_dto = __commonJS({ + "dist/src/modules/campaign/dto/create-campaign.dto.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CreateCampaignDto = void 0; + var swagger_12 = require_swagger(); + var client_1 = require("@prisma/client"); + var class_transformer_1 = require_cjs2(); + var class_validator_1 = require_cjs(); + var CreateCampaignDto = class { + }; + exports2.CreateCampaignDto = CreateCampaignDto; + __decorate2([ + (0, swagger_12.ApiProperty)({ example: "\u062C\u0634\u0646\u0648\u0627\u0631\u0647 \u0646\u0648\u0631\u0648\u0632\u06CC \u06AF\u0631\u062F\u0648\u0646\u0647 \u0634\u0627\u0646\u0633", description: "\u0639\u0646\u0648\u0627\u0646 \u06A9\u0645\u067E\u06CC\u0646" }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsNotEmpty)({ message: "\u0639\u0646\u0648\u0627\u0646 \u06A9\u0645\u067E\u06CC\u0646 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + __metadata2("design:type", String) + ], CreateCampaignDto.prototype, "title", void 0); + __decorate2([ + (0, swagger_12.ApiProperty)({ example: "norooz-1405", description: "\u0634\u0646\u0627\u0633\u0647 \u06CC\u06A9\u062A\u0627\u06CC URL \u06A9\u0645\u067E\u06CC\u0646" }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsNotEmpty)({ message: "\u0634\u0646\u0627\u0633\u0647 URL \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + (0, class_validator_1.Matches)(/^[a-z0-9-]+$/, { + message: "\u0627\u0633\u0644\u0627\u06AF \u0628\u0627\u06CC\u062F \u0641\u0642\u0637 \u0634\u0627\u0645\u0644 \u062D\u0631\u0648\u0641 \u06A9\u0648\u0686\u06A9 \u0627\u0646\u06AF\u0644\u06CC\u0633\u06CC\u060C \u0627\u0639\u062F\u0627\u062F \u0648 \u062E\u0637 \u062A\u06CC\u0631\u0647 (-) \u0628\u0627\u0634\u062F" + }), + __metadata2("design:type", String) + ], CreateCampaignDto.prototype, "slug", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: "\u062A\u0648\u0636\u06CC\u062D\u0627\u062A \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u062C\u0648\u0627\u06CC\u0632 \u0648 \u0642\u0648\u0627\u0646\u06CC\u0646 \u06A9\u0645\u067E\u06CC\u0646" }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreateCampaignDto.prototype, "description", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: "http://localhost:3000/uploads/banner.png" }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreateCampaignDto.prototype, "banner", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: "http://localhost:3000/uploads/logo.png" }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreateCampaignDto.prototype, "logo", void 0); + __decorate2([ + (0, swagger_12.ApiProperty)({ example: "2026-03-20T00:00:00.000Z", description: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0633\u0627\u0639\u062A \u0634\u0631\u0648\u0639 \u06A9\u0645\u067E\u06CC\u0646" }), + (0, class_transformer_1.Type)(() => Date), + (0, class_validator_1.IsDate)({ message: "\u062A\u0627\u0631\u06CC\u062E \u0634\u0631\u0648\u0639 \u0628\u0627\u06CC\u062F \u06CC\u06A9 \u062A\u0627\u0631\u06CC\u062E \u0645\u0639\u062A\u0628\u0631 \u0628\u0627\u0634\u062F" }), + __metadata2("design:type", Date) + ], CreateCampaignDto.prototype, "startAt", void 0); + __decorate2([ + (0, swagger_12.ApiProperty)({ example: "2026-04-05T23:59:59.000Z", description: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0633\u0627\u0639\u062A \u067E\u0627\u06CC\u0627\u0646 \u06A9\u0645\u067E\u06CC\u0646" }), + (0, class_transformer_1.Type)(() => Date), + (0, class_validator_1.IsDate)({ message: "\u062A\u0627\u0631\u06CC\u062E \u067E\u0627\u06CC\u0627\u0646 \u0628\u0627\u06CC\u062F \u06CC\u06A9 \u062A\u0627\u0631\u06CC\u062E \u0645\u0639\u062A\u0628\u0631 \u0628\u0627\u0634\u062F" }), + __metadata2("design:type", Date) + ], CreateCampaignDto.prototype, "endAt", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ enum: client_1.CampaignStatus, default: client_1.CampaignStatus.DRAFT }), + (0, class_validator_1.IsEnum)(client_1.CampaignStatus), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreateCampaignDto.prototype, "status", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: 3, default: 0, description: "\u062A\u0639\u062F\u0627\u062F \u0634\u0627\u0646\u0633 \u0627\u0648\u0644\u06CC\u0647 \u0647\u0631 \u06A9\u0627\u0631\u0628\u0631 \u062C\u062F\u06CC\u062F" }), + (0, class_validator_1.IsInt)({ message: "\u062A\u0639\u062F\u0627\u062F \u0634\u0627\u0646\u0633 \u067E\u06CC\u0634\u200C\u0641\u0631\u0636 \u0628\u0627\u06CC\u062F \u0639\u062F\u062F \u0635\u062D\u06CC\u062D \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.Min)(0, { message: "\u062A\u0639\u062F\u0627\u062F \u0634\u0627\u0646\u0633 \u067E\u06CC\u0634\u200C\u0641\u0631\u0636 \u0646\u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u062F \u0645\u0646\u0641\u06CC \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", Number) + ], CreateCampaignDto.prototype, "defaultChances", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: "\u0647\u0631 \u06A9\u0627\u0631\u0628\u0631 \u0645\u062C\u0627\u0632 \u0628\u0647 \u0627\u0633\u062A\u0641\u0627\u062F\u0647 \u0627\u0632 \u0634\u0627\u0646\u0633\u200C\u0647\u0627\u06CC \u0627\u062E\u062A\u0635\u0627\u0635\u200C\u06CC\u0627\u0641\u062A\u0647 \u0627\u0633\u062A." }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreateCampaignDto.prototype, "rules", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: "\u0628\u0686\u0631\u062E\u0648\u0646 \u0648 \u0628\u0631\u0646\u062F\u0647 \u0634\u0648!" }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreateCampaignDto.prototype, "ctaText", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ + enum: client_1.WheelDesign, + default: client_1.WheelDesign.CLASSIC_CASINO, + description: "\u0637\u0631\u062D \u0628\u0635\u0631\u06CC \u06AF\u0631\u062F\u0648\u0646\u0647 (\u0627\u0646\u062A\u062E\u0627\u0628 \u0627\u0632 \u0628\u06CC\u0646 \u06F5 \u0637\u0631\u062D)" + }), + (0, class_validator_1.IsEnum)(client_1.WheelDesign), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreateCampaignDto.prototype, "wheelDesign", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ + example: { primaryColor: "#FFD700", secondaryColor: "#B22222", celebrationEffect: "confetti" }, + description: "\u062A\u0646\u0638\u06CC\u0645\u0627\u062A \u0634\u062E\u0635\u06CC\u200C\u0633\u0627\u0632\u06CC \u0628\u0635\u0631\u06CC \u0628\u0631\u0646\u062F" + }), + (0, class_validator_1.IsObject)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", Object) + ], CreateCampaignDto.prototype, "settings", void 0); + } +}); + +// dist/src/modules/campaign/dto/update-campaign.dto.js +var require_update_campaign_dto = __commonJS({ + "dist/src/modules/campaign/dto/update-campaign.dto.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UpdateCampaignDto = void 0; + var swagger_12 = require_swagger(); + var create_campaign_dto_1 = require_create_campaign_dto(); + var UpdateCampaignDto = class extends (0, swagger_12.PartialType)(create_campaign_dto_1.CreateCampaignDto) { + }; + exports2.UpdateCampaignDto = UpdateCampaignDto; + } +}); + +// dist/src/modules/campaign/admin-campaign.controller.js +var require_admin_campaign_controller = __commonJS({ + "dist/src/modules/campaign/admin-campaign.controller.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminCampaignController = void 0; + var common_12 = require_common(); + var swagger_12 = require_swagger(); + var jwt_admin_guard_1 = require_jwt_admin_guard(); + var audit_interceptor_1 = require_audit_interceptor(); + var campaign_service_1 = require_campaign_service(); + var campaign_filter_dto_1 = require_campaign_filter_dto(); + var create_campaign_dto_1 = require_create_campaign_dto(); + var update_campaign_dto_1 = require_update_campaign_dto(); + var AdminCampaignController = class AdminCampaignController { + constructor(campaignService) { + this.campaignService = campaignService; + } + async create(dto) { + return this.campaignService.create(dto); + } + async findAll(filter) { + return this.campaignService.findAll(filter); + } + async findOne(id) { + return this.campaignService.findOne(id); + } + async update(id, dto) { + return this.campaignService.update(id, dto); + } + async remove(id) { + return this.campaignService.remove(id); + } + async duplicate(id) { + return this.campaignService.duplicate(id); + } + }; + exports2.AdminCampaignController = AdminCampaignController; + __decorate2([ + (0, common_12.Post)(), + (0, swagger_12.ApiOperation)({ summary: "\u0627\u06CC\u062C\u0627\u062F \u06A9\u0645\u067E\u06CC\u0646 \u062C\u062F\u06CC\u062F" }), + (0, swagger_12.ApiResponse)({ status: 201, description: "\u06A9\u0645\u067E\u06CC\u0646 \u0628\u0627 \u0645\u0648\u0641\u0642\u06CC\u062A \u0627\u06CC\u062C\u0627\u062F \u0634\u062F" }), + __param2(0, (0, common_12.Body)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [create_campaign_dto_1.CreateCampaignDto]), + __metadata2("design:returntype", Promise) + ], AdminCampaignController.prototype, "create", null); + __decorate2([ + (0, common_12.Get)(), + (0, swagger_12.ApiOperation)({ summary: "\u0644\u06CC\u0633\u062A \u06A9\u0645\u067E\u06CC\u0646\u200C\u0647\u0627 \u0628\u0627 \u0641\u06CC\u0644\u062A\u0631 \u0648\u0636\u0639\u06CC\u062A\u060C \u062C\u0633\u062A\u062C\u0648 \u0648 \u0635\u0641\u062D\u0647\u200C\u0628\u0646\u062F\u06CC" }), + __param2(0, (0, common_12.Query)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [campaign_filter_dto_1.CampaignFilterDto]), + __metadata2("design:returntype", Promise) + ], AdminCampaignController.prototype, "findAll", null); + __decorate2([ + (0, common_12.Get)(":id"), + (0, swagger_12.ApiOperation)({ summary: "\u062F\u0631\u06CC\u0627\u0641\u062A \u062C\u0632\u0626\u06CC\u0627\u062A \u06A9\u0627\u0645\u0644 \u06A9\u0645\u067E\u06CC\u0646 \u0628\u0647 \u0647\u0645\u0631\u0627\u0647 \u062C\u0648\u0627\u06CC\u0632 \u0648 \u0622\u0645\u0627\u0631" }), + __param2(0, (0, common_12.Param)("id")), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String]), + __metadata2("design:returntype", Promise) + ], AdminCampaignController.prototype, "findOne", null); + __decorate2([ + (0, common_12.Patch)(":id"), + (0, swagger_12.ApiOperation)({ summary: "\u0648\u06CC\u0631\u0627\u06CC\u0634 \u0627\u0637\u0644\u0627\u0639\u0627\u062A \u0648 \u0648\u0636\u0639\u06CC\u062A \u06A9\u0645\u067E\u06CC\u0646" }), + __param2(0, (0, common_12.Param)("id")), + __param2(1, (0, common_12.Body)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String, update_campaign_dto_1.UpdateCampaignDto]), + __metadata2("design:returntype", Promise) + ], AdminCampaignController.prototype, "update", null); + __decorate2([ + (0, common_12.Delete)(":id"), + (0, swagger_12.ApiOperation)({ summary: "\u062D\u0630\u0641 \u06A9\u0645\u067E\u06CC\u0646 (\u062F\u0631 \u0635\u0648\u0631\u062A \u0639\u062F\u0645 \u0648\u062C\u0648\u062F \u0627\u0633\u067E\u06CC\u0646 \u062B\u0628\u062A\u200C\u0634\u062F\u0647)" }), + __param2(0, (0, common_12.Param)("id")), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String]), + __metadata2("design:returntype", Promise) + ], AdminCampaignController.prototype, "remove", null); + __decorate2([ + (0, common_12.Post)(":id/duplicate"), + (0, swagger_12.ApiOperation)({ summary: "\u06A9\u067E\u06CC\u200C\u0628\u0631\u062F\u0627\u0631\u06CC \u0633\u0631\u06CC\u0639 \u0627\u0632 \u06CC\u06A9 \u06A9\u0645\u067E\u06CC\u0646 \u0628\u0647 \u0647\u0645\u0631\u0627\u0647 \u062C\u0648\u0627\u06CC\u0632 \u0622\u0646" }), + __param2(0, (0, common_12.Param)("id")), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String]), + __metadata2("design:returntype", Promise) + ], AdminCampaignController.prototype, "duplicate", null); + exports2.AdminCampaignController = AdminCampaignController = __decorate2([ + (0, swagger_12.ApiTags)("Admin Campaigns (\u0645\u062F\u06CC\u0631\u06CC\u062A \u06A9\u0645\u067E\u06CC\u0646\u200C\u0647\u0627)"), + (0, common_12.Controller)("admin/campaigns"), + (0, common_12.UseGuards)(jwt_admin_guard_1.JwtAdminGuard), + (0, common_12.UseInterceptors)(audit_interceptor_1.AuditInterceptor), + (0, swagger_12.ApiBearerAuth)("AdminAuth"), + __metadata2("design:paramtypes", [campaign_service_1.CampaignService]) + ], AdminCampaignController); + } +}); + +// dist/src/modules/campaign/campaign.controller.js +var require_campaign_controller = __commonJS({ + "dist/src/modules/campaign/campaign.controller.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CampaignController = void 0; + var common_12 = require_common(); + var swagger_12 = require_swagger(); + var campaign_service_1 = require_campaign_service(); + var CampaignController = class CampaignController { + constructor(campaignService) { + this.campaignService = campaignService; + } + async getPublicCampaign(slug) { + return this.campaignService.getPublicCampaignBySlug(slug); + } + async getPublicWheelSegments(slug) { + return this.campaignService.getPublicWheelSegments(slug); + } + }; + exports2.CampaignController = CampaignController; + __decorate2([ + (0, common_12.Get)(":slug"), + (0, swagger_12.ApiOperation)({ summary: "\u062F\u0631\u06CC\u0627\u0641\u062A \u0645\u0634\u062E\u0635\u0627\u062A \u0639\u0645\u0648\u0645\u06CC \u06A9\u0645\u067E\u06CC\u0646 \u0628\u0631 \u0627\u0633\u0627\u0633 \u0627\u0633\u0644\u0627\u06AF" }), + (0, swagger_12.ApiResponse)({ status: 200, description: "\u0645\u0634\u062E\u0635\u0627\u062A \u0639\u0645\u0648\u0645\u06CC \u06A9\u0645\u067E\u06CC\u0646 \u0634\u0627\u0645\u0644 \u0639\u0646\u0627\u0648\u06CC\u0646\u060C \u0628\u0646\u0631\u060C \u0642\u0648\u0627\u0646\u06CC\u0646 \u0648 \u0648\u0636\u0639\u06CC\u062A \u062F\u0633\u062A\u0631\u0633\u06CC" }), + __param2(0, (0, common_12.Param)("slug")), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String]), + __metadata2("design:returntype", Promise) + ], CampaignController.prototype, "getPublicCampaign", null); + __decorate2([ + (0, common_12.Get)(":slug/wheel"), + (0, swagger_12.ApiOperation)({ summary: "\u062F\u0631\u06CC\u0627\u0641\u062A \u0633\u06AF\u0645\u0646\u062A\u200C\u0647\u0627\u06CC \u0646\u0645\u0627\u06CC\u0634\u06CC \u06AF\u0631\u062F\u0648\u0646\u0647 \u0634\u0627\u0646\u0633 \u0628\u062F\u0648\u0646 \u0627\u0641\u0634\u0627\u06CC \u0648\u0632\u0646 \u062C\u0648\u0627\u06CC\u0632" }), + (0, swagger_12.ApiResponse)({ status: 200, description: "\u0644\u06CC\u0633\u062A \u0633\u06AF\u0645\u0646\u062A\u200C\u0647\u0627\u06CC \u06AF\u0631\u062F\u0648\u0646\u0647 (\u0639\u0646\u0648\u0627\u0646\u060C \u0631\u0646\u06AF\u060C \u0622\u06CC\u06A9\u0648\u0646\u060C \u062A\u0631\u062A\u06CC\u0628)" }), + __param2(0, (0, common_12.Param)("slug")), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String]), + __metadata2("design:returntype", Promise) + ], CampaignController.prototype, "getPublicWheelSegments", null); + exports2.CampaignController = CampaignController = __decorate2([ + (0, swagger_12.ApiTags)("Campaigns (\u0639\u0645\u0648\u0645\u06CC \u06A9\u0644\u0627\u06CC\u0646\u062A)"), + (0, common_12.Controller)("campaigns"), + __metadata2("design:paramtypes", [campaign_service_1.CampaignService]) + ], CampaignController); + } +}); + +// dist/src/modules/campaign/campaign.module.js +var require_campaign_module = __commonJS({ + "dist/src/modules/campaign/campaign.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CampaignModule = void 0; + var common_12 = require_common(); + var admin_campaign_controller_1 = require_admin_campaign_controller(); + var campaign_availability_service_1 = require_campaign_availability_service(); + var campaign_controller_1 = require_campaign_controller(); + var campaign_service_1 = require_campaign_service(); + var CampaignModule = class CampaignModule { + }; + exports2.CampaignModule = CampaignModule; + exports2.CampaignModule = CampaignModule = __decorate2([ + (0, common_12.Module)({ + controllers: [campaign_controller_1.CampaignController, admin_campaign_controller_1.AdminCampaignController], + providers: [campaign_service_1.CampaignService, campaign_availability_service_1.CampaignAvailabilityService], + exports: [campaign_service_1.CampaignService, campaign_availability_service_1.CampaignAvailabilityService] + }) + ], CampaignModule); + } +}); + +// dist/src/common/decorators/current-admin.decorator.js +var require_current_admin_decorator = __commonJS({ + "dist/src/common/decorators/current-admin.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CurrentAdmin = void 0; + var common_12 = require_common(); + exports2.CurrentAdmin = (0, common_12.createParamDecorator)((data, ctx) => { + const request = ctx.switchToHttp().getRequest(); + const admin = request.admin; + return data ? admin?.[data] : admin; + }); + } +}); + +// dist/src/modules/chance/chance.service.js +var require_chance_service = __commonJS({ + "dist/src/modules/chance/chance.service.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ChanceService = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var prisma_service_12 = require_prisma_service(); + var ChanceService = class ChanceService { + constructor(prisma) { + this.prisma = prisma; + } + async adjustChance(tx, params) { + const { userId, campaignId, amount, type, createdById, referenceType, referenceId, description } = params; + const txn = await tx.chanceTransaction.create({ + data: { + userId, + campaignId, + amount, + type, + referenceType, + referenceId, + description, + createdById + } + }); + let userCampaign = await tx.userCampaign.findUnique({ + where: { userId_campaignId: { userId, campaignId } } + }); + if (!userCampaign) { + userCampaign = await tx.userCampaign.create({ + data: { + userId, + campaignId, + totalChances: Math.max(0, amount), + usedChances: 0 + } + }); + } else { + if (type === client_1.ChanceTxnType.SPIN_CONSUME) { + userCampaign = await tx.userCampaign.update({ + where: { id: userCampaign.id }, + data: { usedChances: { increment: 1 } } + }); + } else if (amount > 0) { + userCampaign = await tx.userCampaign.update({ + where: { id: userCampaign.id }, + data: { totalChances: { increment: amount } } + }); + } else if (amount < 0) { + const newTotal = Math.max(0, userCampaign.totalChances + amount); + userCampaign = await tx.userCampaign.update({ + where: { id: userCampaign.id }, + data: { totalChances: newTotal } + }); + } + } + return { txn, userCampaign }; + } + async adminAdjustChance(userId, campaignId, adminId, dto, ip) { + const user = await this.prisma.user.findUnique({ where: { id: userId } }); + if (!user) { + throw new common_12.NotFoundException("\u06A9\u0627\u0631\u0628\u0631 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F."); + } + const campaign = await this.prisma.campaign.findUnique({ where: { id: campaignId } }); + if (!campaign) { + throw new common_12.NotFoundException("\u06A9\u0645\u067E\u06CC\u0646 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F."); + } + return this.prisma.$transaction(async (tx) => { + if (dto.amount < 0) { + const current = await tx.userCampaign.findUnique({ + where: { userId_campaignId: { userId, campaignId } } + }); + const remaining = (current?.totalChances ?? 0) - (current?.usedChances ?? 0); + if (remaining + dto.amount < 0) { + throw new common_12.BadRequestException(`\u06A9\u0627\u0631\u0628\u0631 \u0641\u0642\u0637 ${remaining} \u0634\u0627\u0646\u0633 \u0628\u0627\u0642\u06CC\u200C\u0645\u0627\u0646\u062F\u0647 \u062F\u0627\u0631\u062F \u0648 \u0646\u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u06CC\u062F ${Math.abs(dto.amount)} \u0634\u0627\u0646\u0633 \u0627\u0632 \u0627\u0648 \u06A9\u0633\u0631 \u06A9\u0646\u06CC\u062F.`); + } + } + const finalDescription = dto.description || dto.reason || "\u062A\u063A\u06CC\u06CC\u0631 \u062F\u0633\u062A\u06CC \u0634\u0627\u0646\u0633 \u062A\u0648\u0633\u0637 \u0645\u062F\u06CC\u0631"; + const { txn, userCampaign } = await this.adjustChance(tx, { + userId, + campaignId, + amount: dto.amount, + type: client_1.ChanceTxnType.ADMIN_ADJUSTMENT, + createdById: adminId, + referenceType: "admin_manual", + description: finalDescription + }); + await tx.adminLog.create({ + data: { + adminId, + action: "chance.adjust", + entityType: "user_campaign", + entityId: userCampaign.id, + oldValue: { amountBefore: userCampaign.totalChances - dto.amount }, + newValue: { + amountChange: dto.amount, + amountAfter: userCampaign.totalChances, + description: finalDescription, + userMobile: user.mobile, + campaignTitle: campaign.title + }, + ip + } + }); + return { + success: true, + userCampaign: { + totalChances: userCampaign.totalChances, + usedChances: userCampaign.usedChances, + remainingChances: userCampaign.totalChances - userCampaign.usedChances + }, + transaction: txn + }; + }); + } + async getUserChances(userId, campaignId) { + const campaign = await this.prisma.campaign.findUnique({ + where: { id: campaignId }, + select: { defaultChances: true } + }); + const defaultChances = campaign?.defaultChances ?? 0; + let userCampaign = await this.prisma.userCampaign.findUnique({ + where: { userId_campaignId: { userId, campaignId } } + }); + if (!userCampaign) { + return this.prisma.$transaction(async (tx) => { + const { userCampaign: created } = await this.adjustChance(tx, { + userId, + campaignId, + amount: defaultChances, + type: client_1.ChanceTxnType.SIGNUP_BONUS, + referenceType: "campaign_entry", + description: "\u0634\u0627\u0646\u0633 \u0627\u0648\u0644\u06CC\u0647 \u067E\u06CC\u0634\u200C\u0641\u0631\u0636 \u0648\u0631\u0648\u062F \u0628\u0647 \u06A9\u0645\u067E\u06CC\u0646" + }); + return { + totalChances: created.totalChances, + usedChances: created.usedChances, + remainingChances: created.totalChances - created.usedChances + }; + }); + } + if (userCampaign.totalChances < defaultChances) { + const diff = defaultChances - userCampaign.totalChances; + return this.prisma.$transaction(async (tx) => { + const { userCampaign: updated } = await this.adjustChance(tx, { + userId, + campaignId, + amount: diff, + type: client_1.ChanceTxnType.ADMIN_ADJUSTMENT, + referenceType: "campaign_default_chances_sync", + description: `\u0647\u0645\u06AF\u0627\u0645\u200C\u0633\u0627\u0632\u06CC \u062E\u0648\u062F\u06A9\u0627\u0631 \u0628\u0627 \u0634\u0627\u0646\u0633 \u067E\u06CC\u0634\u200C\u0641\u0631\u0636 \u06A9\u0645\u067E\u06CC\u0646 (${defaultChances})` + }); + return { + totalChances: updated.totalChances, + usedChances: updated.usedChances, + remainingChances: updated.totalChances - updated.usedChances + }; + }); + } + return { + totalChances: userCampaign.totalChances, + usedChances: userCampaign.usedChances, + remainingChances: userCampaign.totalChances - userCampaign.usedChances + }; + } + async getUserChanceHistory(userId, campaignId) { + const where = { userId }; + if (campaignId) { + where.campaignId = campaignId; + } + return this.prisma.chanceTransaction.findMany({ + where, + orderBy: { createdAt: "desc" }, + include: { + campaign: { select: { id: true, title: true } }, + createdBy: { select: { id: true, name: true, email: true } } + } + }); + } + }; + exports2.ChanceService = ChanceService; + exports2.ChanceService = ChanceService = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", [prisma_service_12.PrismaService]) + ], ChanceService); + } +}); + +// dist/src/modules/chance/dto/adjust-chance.dto.js +var require_adjust_chance_dto = __commonJS({ + "dist/src/modules/chance/dto/adjust-chance.dto.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminAdjustChancePayloadDto = exports2.AdjustChanceDto = void 0; + var swagger_12 = require_swagger(); + var class_validator_1 = require_cjs(); + var AdjustChanceDto = class { + }; + exports2.AdjustChanceDto = AdjustChanceDto; + __decorate2([ + (0, swagger_12.ApiProperty)({ + example: 5, + description: "\u062A\u0639\u062F\u0627\u062F \u0634\u0627\u0646\u0633 \u062C\u0647\u062A \u0627\u0641\u0632\u0627\u06CC\u0634 (\u0645\u062B\u0628\u062A) \u06CC\u0627 \u06A9\u0627\u0647\u0634 (\u0645\u0646\u0641\u06CC) \u2014 \u0646\u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u062F \u0635\u0641\u0631 \u0628\u0627\u0634\u062F" + }), + (0, class_validator_1.IsInt)({ message: "\u0645\u0642\u062F\u0627\u0631 \u0634\u0627\u0646\u0633 \u0628\u0627\u06CC\u062F \u0639\u062F\u062F \u0635\u062D\u06CC\u062D \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.NotEquals)(0, { message: "\u0645\u0642\u062F\u0627\u0631 \u062A\u063A\u06CC\u06CC\u0631 \u0634\u0627\u0646\u0633 \u0646\u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u062F \u0635\u0641\u0631 \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.IsNotEmpty)({ message: "\u0645\u0642\u062F\u0627\u0631 \u062A\u063A\u06CC\u06CC\u0631 \u0634\u0627\u0646\u0633 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + __metadata2("design:type", Number) + ], AdjustChanceDto.prototype, "amount", void 0); + __decorate2([ + (0, swagger_12.ApiProperty)({ + example: "\u067E\u0627\u062F\u0627\u0634 \u0634\u0631\u06A9\u062A \u062F\u0631 \u0646\u0638\u0631\u0633\u0646\u062C\u06CC \u0627\u06CC\u0646\u0633\u062A\u0627\u06AF\u0631\u0627\u0645", + description: "\u0639\u0644\u062A \u0648 \u062A\u0648\u0636\u06CC\u062D \u062A\u063A\u06CC\u06CC\u0631 \u0634\u0627\u0646\u0633 \u0628\u0631\u0627\u06CC \u062B\u0628\u062A \u062F\u0631 \u062F\u0641\u062A\u0631\u06A9\u0644", + required: false + }), + (0, class_validator_1.IsString)({ message: "\u062A\u0648\u0636\u06CC\u062D\u0627\u062A \u0628\u0627\u06CC\u062F \u0645\u062A\u0646 \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], AdjustChanceDto.prototype, "description", void 0); + __decorate2([ + (0, swagger_12.ApiProperty)({ + example: "\u0627\u0647\u062F\u0627\u06CC \u0634\u0627\u0646\u0633 \u062A\u0634\u0648\u06CC\u0642\u06CC \u062A\u0648\u0633\u0637 \u0645\u062F\u06CC\u0631", + description: "\u062F\u0644\u06CC\u0644 \u062A\u063A\u06CC\u06CC\u0631 \u0634\u0627\u0646\u0633", + required: false + }), + (0, class_validator_1.IsString)({ message: "\u062F\u0644\u06CC\u0644 \u0628\u0627\u06CC\u062F \u0645\u062A\u0646 \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], AdjustChanceDto.prototype, "reason", void 0); + var AdminAdjustChancePayloadDto = class { + }; + exports2.AdminAdjustChancePayloadDto = AdminAdjustChancePayloadDto; + __decorate2([ + (0, swagger_12.ApiProperty)({ description: "\u0634\u0646\u0627\u0633\u0647 \u06A9\u0627\u0631\u0628\u0631" }), + (0, class_validator_1.IsString)({ message: "\u0634\u0646\u0627\u0633\u0647 \u06A9\u0627\u0631\u0628\u0631 \u0628\u0627\u06CC\u062F \u0631\u0634\u062A\u0647 \u0645\u0639\u062A\u0628\u0631 \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.IsNotEmpty)({ message: "\u0634\u0646\u0627\u0633\u0647 \u06A9\u0627\u0631\u0628\u0631 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + __metadata2("design:type", String) + ], AdminAdjustChancePayloadDto.prototype, "userId", void 0); + __decorate2([ + (0, swagger_12.ApiProperty)({ description: "\u0634\u0646\u0627\u0633\u0647 \u06A9\u0645\u067E\u06CC\u0646" }), + (0, class_validator_1.IsString)({ message: "\u0634\u0646\u0627\u0633\u0647 \u06A9\u0645\u067E\u06CC\u0646 \u0628\u0627\u06CC\u062F \u0631\u0634\u062A\u0647 \u0645\u0639\u062A\u0628\u0631 \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.IsNotEmpty)({ message: "\u0634\u0646\u0627\u0633\u0647 \u06A9\u0645\u067E\u06CC\u0646 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + __metadata2("design:type", String) + ], AdminAdjustChancePayloadDto.prototype, "campaignId", void 0); + __decorate2([ + (0, swagger_12.ApiProperty)({ + example: 5, + description: "\u062A\u0639\u062F\u0627\u062F \u0634\u0627\u0646\u0633 \u062C\u0647\u062A \u0627\u0641\u0632\u0627\u06CC\u0634 (\u0645\u062B\u0628\u062A) \u06CC\u0627 \u06A9\u0627\u0647\u0634 (\u0645\u0646\u0641\u06CC) \u2014 \u0646\u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u062F \u0635\u0641\u0631 \u0628\u0627\u0634\u062F" + }), + (0, class_validator_1.IsInt)({ message: "\u0645\u0642\u062F\u0627\u0631 \u0634\u0627\u0646\u0633 \u0628\u0627\u06CC\u062F \u0639\u062F\u062F \u0635\u062D\u06CC\u062D \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.NotEquals)(0, { message: "\u0645\u0642\u062F\u0627\u0631 \u062A\u063A\u06CC\u06CC\u0631 \u0634\u0627\u0646\u0633 \u0646\u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u062F \u0635\u0641\u0631 \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.IsNotEmpty)({ message: "\u0645\u0642\u062F\u0627\u0631 \u062A\u063A\u06CC\u06CC\u0631 \u0634\u0627\u0646\u0633 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + __metadata2("design:type", Number) + ], AdminAdjustChancePayloadDto.prototype, "amount", void 0); + __decorate2([ + (0, swagger_12.ApiProperty)({ + example: "\u0627\u0647\u062F\u0627\u06CC \u0634\u0627\u0646\u0633 \u062A\u0634\u0648\u06CC\u0642\u06CC \u062A\u0648\u0633\u0637 \u0645\u062F\u06CC\u0631", + description: "\u062F\u0644\u06CC\u0644 \u062A\u063A\u06CC\u06CC\u0631 \u0634\u0627\u0646\u0633", + required: false + }), + (0, class_validator_1.IsString)({ message: "\u062F\u0644\u06CC\u0644 \u0628\u0627\u06CC\u062F \u0645\u062A\u0646 \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], AdminAdjustChancePayloadDto.prototype, "reason", void 0); + __decorate2([ + (0, swagger_12.ApiProperty)({ + example: "\u067E\u0627\u062F\u0627\u0634 \u0648\u0641\u0627\u062F\u0627\u0631\u06CC", + description: "\u062A\u0648\u0636\u06CC\u062D\u0627\u062A \u062A\u063A\u06CC\u06CC\u0631 \u0634\u0627\u0646\u0633 \u0628\u0631\u0627\u06CC \u062F\u0641\u062A\u0631\u06A9\u0644", + required: false + }), + (0, class_validator_1.IsString)({ message: "\u062A\u0648\u0636\u06CC\u062D\u0627\u062A \u0628\u0627\u06CC\u062F \u0645\u062A\u0646 \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], AdminAdjustChancePayloadDto.prototype, "description", void 0); + } +}); + +// dist/src/modules/chance/admin-chance.controller.js +var require_admin_chance_controller = __commonJS({ + "dist/src/modules/chance/admin-chance.controller.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminChanceController = void 0; + var common_12 = require_common(); + var swagger_12 = require_swagger(); + var current_admin_decorator_1 = require_current_admin_decorator(); + var jwt_admin_guard_1 = require_jwt_admin_guard(); + var audit_interceptor_1 = require_audit_interceptor(); + var chance_service_1 = require_chance_service(); + var adjust_chance_dto_1 = require_adjust_chance_dto(); + var AdminChanceController = class AdminChanceController { + constructor(chanceService) { + this.chanceService = chanceService; + } + async adjustChanceDirect(adminId, dto, req) { + const ip = req.ip || req.headers["x-forwarded-for"]; + const description = dto.reason || dto.description || "\u0627\u0647\u062F\u0627\u06CC \u0634\u0627\u0646\u0633 \u062A\u0634\u0648\u06CC\u0642\u06CC \u062A\u0648\u0633\u0637 \u0645\u062F\u06CC\u0631"; + return this.chanceService.adminAdjustChance(dto.userId, dto.campaignId, adminId, { amount: dto.amount, description, reason: dto.reason }, ip); + } + async adjustChance(userId, campaignId, adminId, dto, req) { + const ip = req.ip || req.headers["x-forwarded-for"]; + const description = dto.description || dto.reason || "\u0627\u0647\u062F\u0627\u06CC \u0634\u0627\u0646\u0633 \u062A\u0634\u0648\u06CC\u0642\u06CC \u062A\u0648\u0633\u0637 \u0645\u062F\u06CC\u0631"; + return this.chanceService.adminAdjustChance(userId, campaignId, adminId, { amount: dto.amount, description, reason: dto.reason }, ip); + } + }; + exports2.AdminChanceController = AdminChanceController; + __decorate2([ + (0, common_12.Post)("chances/adjust"), + (0, swagger_12.ApiOperation)({ summary: "\u062A\u063A\u06CC\u06CC\u0631 \u0634\u0627\u0646\u0633 \u06A9\u0627\u0631\u0628\u0631 \u062F\u0631 \u06A9\u0645\u067E\u06CC\u0646 (\u0627\u0646\u062F\u067E\u0648\u0626\u06CC\u0646\u062A \u0645\u0633\u062A\u0642\u06CC\u0645 \u067E\u0646\u0644 \u0645\u062F\u06CC\u0631\u06CC\u062A)" }), + (0, swagger_12.ApiResponse)({ + status: 200, + description: "\u062A\u063A\u06CC\u06CC\u0631 \u0634\u0627\u0646\u0633 \u062F\u0631 \u062C\u062F\u0648\u0644 Snapshot \u0648 Ledger \u0627\u0639\u0645\u0627\u0644 \u0634\u062F \u0648 \u062F\u0631 AdminLog \u062B\u0628\u062A \u06AF\u0631\u062F\u06CC\u062F." + }), + __param2(0, (0, current_admin_decorator_1.CurrentAdmin)("id")), + __param2(1, (0, common_12.Body)()), + __param2(2, (0, common_12.Req)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String, adjust_chance_dto_1.AdminAdjustChancePayloadDto, Object]), + __metadata2("design:returntype", Promise) + ], AdminChanceController.prototype, "adjustChanceDirect", null); + __decorate2([ + (0, common_12.Post)("users/:userId/campaigns/:campaignId/chances"), + (0, swagger_12.ApiOperation)({ summary: "\u0627\u0636\u0627\u0641\u0647 \u06CC\u0627 \u06A9\u0645 \u06A9\u0631\u062F\u0646 \u062F\u0633\u062A\u06CC \u0634\u0627\u0646\u0633 \u06A9\u0627\u0631\u0628\u0631 \u062F\u0631 \u06CC\u06A9 \u06A9\u0645\u067E\u06CC\u0646 \u062E\u0627\u0635" }), + (0, swagger_12.ApiResponse)({ + status: 200, + description: "\u062A\u063A\u06CC\u06CC\u0631 \u0634\u0627\u0646\u0633 \u062F\u0631 \u062C\u062F\u0648\u0644 Snapshot \u0648 Ledger \u0627\u0639\u0645\u0627\u0644 \u0634\u062F \u0648 \u062F\u0631 AdminLog \u062B\u0628\u062A \u06AF\u0631\u062F\u06CC\u062F." + }), + __param2(0, (0, common_12.Param)("userId")), + __param2(1, (0, common_12.Param)("campaignId")), + __param2(2, (0, current_admin_decorator_1.CurrentAdmin)("id")), + __param2(3, (0, common_12.Body)()), + __param2(4, (0, common_12.Req)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String, String, String, adjust_chance_dto_1.AdjustChanceDto, Object]), + __metadata2("design:returntype", Promise) + ], AdminChanceController.prototype, "adjustChance", null); + exports2.AdminChanceController = AdminChanceController = __decorate2([ + (0, swagger_12.ApiTags)("Admin Chance Management (\u0645\u062F\u06CC\u0631\u06CC\u062A \u0634\u0627\u0646\u0633)"), + (0, common_12.Controller)("admin"), + (0, common_12.UseGuards)(jwt_admin_guard_1.JwtAdminGuard), + (0, common_12.UseInterceptors)(audit_interceptor_1.AuditInterceptor), + (0, swagger_12.ApiBearerAuth)("AdminAuth"), + __metadata2("design:paramtypes", [chance_service_1.ChanceService]) + ], AdminChanceController); + } +}); + +// dist/src/modules/chance/chance.module.js +var require_chance_module = __commonJS({ + "dist/src/modules/chance/chance.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ChanceModule = void 0; + var common_12 = require_common(); + var admin_chance_controller_1 = require_admin_chance_controller(); + var chance_service_1 = require_chance_service(); + var ChanceModule = class ChanceModule { + }; + exports2.ChanceModule = ChanceModule; + exports2.ChanceModule = ChanceModule = __decorate2([ + (0, common_12.Module)({ + controllers: [admin_chance_controller_1.AdminChanceController], + providers: [chance_service_1.ChanceService], + exports: [chance_service_1.ChanceService] + }) + ], ChanceModule); + } +}); + +// dist/src/modules/prize/dto/create-prize.dto.js +var require_create_prize_dto = __commonJS({ + "dist/src/modules/prize/dto/create-prize.dto.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CreatePrizeDto = void 0; + var swagger_12 = require_swagger(); + var client_1 = require("@prisma/client"); + var class_transformer_1 = require_cjs2(); + var class_validator_1 = require_cjs(); + var CreatePrizeDto = class { + constructor() { + this.status = client_1.PrizeStatus.ACTIVE; + this.sortOrder = 0; + } + }; + exports2.CreatePrizeDto = CreatePrizeDto; + __decorate2([ + (0, swagger_12.ApiProperty)({ example: "\u0622\u06CC\u0641\u0648\u0646 \u06F1\u06F5 \u067E\u0631\u0648 \u06F2\u06F5\u06F6 \u06AF\u06CC\u06AF\u0627\u0628\u0627\u06CC\u062A", description: "\u0639\u0646\u0648\u0627\u0646 \u062C\u0627\u06CC\u0632\u0647" }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsNotEmpty)({ message: "\u0639\u0646\u0648\u0627\u0646 \u062C\u0627\u06CC\u0632\u0647 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + __metadata2("design:type", String) + ], CreatePrizeDto.prototype, "title", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: "\u062A\u062D\u0648\u06CC\u0644 \u062D\u0636\u0648\u0631\u06CC \u0628\u0627 \u0627\u0631\u0627\u0626\u0647 \u06A9\u0627\u0631\u062A \u0634\u0646\u0627\u0633\u0627\u06CC\u06CC" }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreatePrizeDto.prototype, "description", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: "\u062A\u062D\u0648\u06CC\u0644 \u062D\u0636\u0648\u0631\u06CC \u0628\u0627 \u0627\u0631\u0627\u0626\u0647 \u06A9\u0627\u0631\u062A \u0634\u0646\u0627\u0633\u0627\u06CC\u06CC" }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreatePrizeDto.prototype, "subtitle", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: "http://localhost:3000/uploads/iphone.png" }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreatePrizeDto.prototype, "image", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: "http://localhost:3000/uploads/iphone.png" }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreatePrizeDto.prototype, "iconUrl", void 0); + __decorate2([ + (0, swagger_12.ApiProperty)({ enum: client_1.PrizeType, example: client_1.PrizeType.PHYSICAL, description: "\u0646\u0648\u0639 \u062C\u0627\u06CC\u0632\u0647" }), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreatePrizeDto.prototype, "type", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ description: "\u0646\u0627\u0645 \u0645\u0633\u062A\u0639\u0627\u0631 \u0646\u0648\u0639 \u062C\u0627\u06CC\u0632\u0647" }), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreatePrizeDto.prototype, "prizeType", void 0); + __decorate2([ + (0, swagger_12.ApiProperty)({ enum: client_1.StockType, example: client_1.StockType.LIMITED, description: "\u0646\u0648\u0639 \u0645\u0648\u062C\u0648\u062F\u06CC (\u0645\u062D\u062F\u0648\u062F / \u0646\u0627\u0645\u062D\u062F\u0648\u062F)" }), + (0, class_validator_1.IsEnum)(client_1.StockType), + (0, class_validator_1.IsNotEmpty)(), + __metadata2("design:type", String) + ], CreatePrizeDto.prototype, "stockType", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: 5, description: "\u0645\u0648\u062C\u0648\u062F\u06CC \u0627\u0648\u0644\u06CC\u0647 (\u062F\u0631 \u0635\u0648\u0631\u062A \u0645\u062D\u062F\u0648\u062F \u0628\u0648\u062F\u0646)" }), + (0, class_validator_1.ValidateIf)((o) => o.stockType === client_1.StockType.LIMITED), + (0, class_transformer_1.Type)(() => Number), + (0, class_validator_1.IsInt)({ message: "\u0645\u0648\u062C\u0648\u062F\u06CC \u0627\u0648\u0644\u06CC\u0647 \u0628\u0627\u06CC\u062F \u0639\u062F\u062F \u0635\u062D\u06CC\u062D \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.Min)(1, { message: "\u0645\u0648\u062C\u0648\u062F\u06CC \u0627\u0648\u0644\u06CC\u0647 \u0628\u0627\u06CC\u062F \u062D\u062F\u0627\u0642\u0644 \u06F1 \u0628\u0627\u0634\u062F" }), + __metadata2("design:type", Number) + ], CreatePrizeDto.prototype, "initialStock", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: 5, description: "\u0645\u0648\u062C\u0648\u062F\u06CC \u0628\u0627\u0642\u06CC\u200C\u0645\u0627\u0646\u062F\u0647 \u0641\u0639\u0644\u06CC" }), + (0, class_transformer_1.Type)(() => Number), + (0, class_validator_1.IsInt)({ message: "\u0645\u0648\u062C\u0648\u062F\u06CC \u0628\u0627\u0642\u06CC\u200C\u0645\u0627\u0646\u062F\u0647 \u0628\u0627\u06CC\u062F \u0639\u062F\u062F \u0635\u062D\u06CC\u062D \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.Min)(0, { message: "\u0645\u0648\u062C\u0648\u062F\u06CC \u0628\u0627\u0642\u06CC\u200C\u0645\u0627\u0646\u062F\u0647 \u0646\u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u062F \u0645\u0646\u0641\u06CC \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", Number) + ], CreatePrizeDto.prototype, "remainingStock", void 0); + __decorate2([ + (0, swagger_12.ApiProperty)({ example: 10, description: "\u0648\u0632\u0646 \u0628\u0631\u062F (\u0639\u062F\u062F\u06CC \u0645\u062B\u0628\u062A \u0648 \u0628\u0632\u0631\u06AF\u200C\u062A\u0631 \u0627\u0632 \u0635\u0641\u0631)" }), + (0, class_transformer_1.Type)(() => Number), + (0, class_validator_1.IsInt)({ message: "\u0648\u0632\u0646 \u0628\u0631\u062F \u0628\u0627\u06CC\u062F \u0639\u062F\u062F \u0635\u062D\u06CC\u062D \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.Min)(1, { message: "\u0648\u0632\u0646 \u0628\u0631\u062F \u0628\u0627\u06CC\u062F \u062D\u062F\u0627\u0642\u0644 \u06F1 \u0628\u0627\u0634\u062F" }), + __metadata2("design:type", Number) + ], CreatePrizeDto.prototype, "weight", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ enum: client_1.PrizeStatus, default: client_1.PrizeStatus.ACTIVE }), + (0, class_validator_1.IsEnum)(client_1.PrizeStatus), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreatePrizeDto.prototype, "status", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ description: "\u0648\u0636\u0639\u06CC\u062A \u0641\u0639\u0627\u0644 \u0628\u0648\u062F\u0646" }), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", Boolean) + ], CreatePrizeDto.prototype, "isActive", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: 1, default: 0, description: "\u062A\u0631\u062A\u06CC\u0628 \u0633\u06AF\u0645\u0646\u062A \u0631\u0648\u06CC \u06AF\u0631\u062F\u0648\u0646\u0647" }), + (0, class_transformer_1.Type)(() => Number), + (0, class_validator_1.IsInt)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", Number) + ], CreatePrizeDto.prototype, "sortOrder", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: "#FF5733", description: "\u06A9\u062F \u0631\u0646\u06AF \u0633\u06AF\u0645\u0646\u062A \u062F\u0631 \u06AF\u0631\u062F\u0648\u0646\u0647 (\u0641\u0631\u0645\u062A \u0647\u06AF\u0632)" }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreatePrizeDto.prototype, "segmentColor", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: "#FF5733", description: "\u06A9\u062F \u0631\u0646\u06AF (\u0646\u0627\u0645 \u0645\u0633\u062A\u0639\u0627\u0631)" }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreatePrizeDto.prototype, "color", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: "#FFFFFF" }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreatePrizeDto.prototype, "textColor", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: "2026-12-31T23:59:59.000Z", description: "\u062A\u0627\u0631\u06CC\u062E \u0627\u0646\u0642\u0636\u0627\u06CC \u06A9\u062F \u06CC\u0627 \u062C\u0627\u06CC\u0632\u0647" }), + (0, class_transformer_1.Type)(() => Date), + (0, class_validator_1.IsDate)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", Date) + ], CreatePrizeDto.prototype, "expiresAt", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ example: "\u062A\u0628\u0631\u06CC\u06A9! \u0634\u0645\u0627 \u0628\u0631\u0646\u062F\u0647 {prize} \u0634\u062F\u06CC\u062F. \u06A9\u062F \u062C\u0627\u06CC\u0632\u0647: {code}" }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], CreatePrizeDto.prototype, "smsTemplate", void 0); + } +}); + +// dist/src/modules/prize/dto/update-prize.dto.js +var require_update_prize_dto = __commonJS({ + "dist/src/modules/prize/dto/update-prize.dto.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UpdatePrizeDto = void 0; + var swagger_12 = require_swagger(); + var create_prize_dto_1 = require_create_prize_dto(); + var UpdatePrizeDto = class extends (0, swagger_12.PartialType)(create_prize_dto_1.CreatePrizeDto) { + }; + exports2.UpdatePrizeDto = UpdatePrizeDto; + } +}); + +// dist/src/modules/prize/dto/update-stock.dto.js +var require_update_stock_dto = __commonJS({ + "dist/src/modules/prize/dto/update-stock.dto.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UpdateStockDto = void 0; + var swagger_12 = require_swagger(); + var class_validator_1 = require_cjs(); + var UpdateStockDto = class { + }; + exports2.UpdateStockDto = UpdateStockDto; + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ + example: 10, + description: "\u0645\u0648\u062C\u0648\u062F\u06CC \u062C\u062F\u06CC\u062F \u0628\u0627\u0642\u06CC\u200C\u0645\u0627\u0646\u062F\u0647 \u06CC\u0627 \u062A\u0639\u062F\u0627\u062F \u0627\u0641\u0632\u0648\u062F\u0647\u200C\u0634\u062F\u0647 \u0628\u0647 \u0645\u0648\u062C\u0648\u062F\u06CC" + }), + (0, class_validator_1.IsInt)({ message: "\u0645\u0648\u062C\u0648\u062F\u06CC \u0628\u0627\u06CC\u062F \u0639\u062F\u062F \u0635\u062D\u06CC\u062D \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", Number) + ], UpdateStockDto.prototype, "stock", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ + example: 5, + description: "\u062A\u063A\u06CC\u06CC\u0631 \u0645\u0648\u062C\u0648\u062F\u06CC (\u0645\u062B\u0628\u062A \u0628\u0631\u0627\u06CC \u0627\u0641\u0632\u0627\u06CC\u0634\u060C \u0645\u0646\u0641\u06CC \u0628\u0631\u0627\u06CC \u06A9\u0627\u0647\u0634)" + }), + (0, class_validator_1.IsInt)({ message: "\u062A\u063A\u06CC\u06CC\u0631 \u0645\u0648\u062C\u0648\u062F\u06CC \u0628\u0627\u06CC\u062F \u0639\u062F\u062F \u0635\u062D\u06CC\u062D \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", Number) + ], UpdateStockDto.prototype, "change", void 0); + __decorate2([ + (0, swagger_12.ApiPropertyOptional)({ + example: "\u0648\u0631\u0648\u062F \u0645\u062D\u0645\u0648\u0644\u0647 \u062C\u062F\u06CC\u062F \u0628\u0647 \u0627\u0646\u0628\u0627\u0631", + description: "\u062F\u0644\u06CC\u0644 \u062A\u063A\u06CC\u06CC\u0631 \u0645\u0648\u062C\u0648\u062F\u06CC" + }), + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsOptional)(), + __metadata2("design:type", String) + ], UpdateStockDto.prototype, "reason", void 0); + } +}); + +// dist/src/modules/prize/prize.service.js +var require_prize_service = __commonJS({ + "dist/src/modules/prize/prize.service.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PrizeService = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var prisma_service_12 = require_prisma_service(); + var PrizeService = class PrizeService { + constructor(prisma) { + this.prisma = prisma; + } + async create(campaignId, dto) { + const campaign = await this.prisma.campaign.findUnique({ + where: { id: campaignId } + }); + if (!campaign) { + throw new common_12.NotFoundException("\u06A9\u0645\u067E\u06CC\u0646 \u0645\u0648\u0631\u062F \u0646\u0638\u0631 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F."); + } + if (dto.stockType === client_1.StockType.LIMITED && (!dto.initialStock || dto.initialStock <= 0)) { + throw new common_12.BadRequestException("\u0628\u0631\u0627\u06CC \u062C\u0648\u0627\u06CC\u0632 \u0645\u062D\u062F\u0648\u062F\u060C \u0645\u0648\u062C\u0648\u062F\u06CC \u0627\u0648\u0644\u06CC\u0647 \u0628\u0627\u06CC\u062F \u0628\u0632\u0631\u06AF\u200C\u062A\u0631 \u0627\u0632 \u0635\u0641\u0631 \u0628\u0627\u0634\u062F."); + } + const initialStock = dto.stockType === client_1.StockType.LIMITED ? dto.initialStock : null; + const remainingStock = dto.stockType === client_1.StockType.LIMITED ? dto.initialStock : null; + let sortOrder = dto.sortOrder; + if (sortOrder === void 0 || sortOrder === 0) { + const maxOrder = await this.prisma.prize.findFirst({ + where: { campaignId }, + orderBy: { sortOrder: "desc" }, + select: { sortOrder: true } + }); + sortOrder = (maxOrder?.sortOrder ?? 0) + 1; + } + const rawType = dto.type || dto.prizeType; + let type = "DISCOUNT_CODE"; + if (rawType === "WALLET_CREDIT") + type = "CREDIT"; + else if (rawType === "CHANCE") + type = "OTHER"; + else if (rawType) + type = rawType; + const segmentColor = dto.segmentColor || dto.color || "#3880ff"; + const description = dto.description ?? dto.subtitle ?? null; + const image = dto.image ?? dto.iconUrl ?? null; + let status = dto.status || "ACTIVE"; + if (dto.isActive !== void 0) { + status = dto.isActive ? "ACTIVE" : "INACTIVE"; + } + return this.prisma.prize.create({ + data: { + campaignId, + title: dto.title, + description, + image, + type, + stockType: dto.stockType, + initialStock, + remainingStock, + weight: dto.weight, + status, + sortOrder, + segmentColor, + expiresAt: dto.expiresAt, + smsTemplate: dto.smsTemplate + } + }); + } + async findByCampaign(campaignId) { + return this.prisma.prize.findMany({ + where: { campaignId }, + orderBy: { sortOrder: "asc" }, + include: { + _count: { + select: { + spins: true, + userPrizes: true + } + } + } + }); + } + async findOne(id) { + const prize = await this.prisma.prize.findUnique({ + where: { id }, + include: { + campaign: { + select: { id: true, title: true, slug: true } + }, + _count: { + select: { + spins: true, + userPrizes: true + } + } + } + }); + if (!prize) { + throw new common_12.NotFoundException("\u062C\u0627\u06CC\u0632\u0647 \u0645\u0648\u0631\u062F \u0646\u0638\u0631 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F."); + } + return prize; + } + async update(id, dto) { + const prize = await this.findOne(id); + const data = {}; + if (dto.title !== void 0) + data.title = dto.title; + if (dto.description !== void 0 || dto.subtitle !== void 0) { + data.description = dto.description ?? dto.subtitle; + } + if (dto.image !== void 0 || dto.iconUrl !== void 0) { + data.image = dto.image ?? dto.iconUrl; + } + if (dto.type !== void 0 || dto.prizeType !== void 0) { + const rawType = dto.type || dto.prizeType; + if (rawType === "WALLET_CREDIT") + data.type = "CREDIT"; + else if (rawType === "CHANCE") + data.type = "OTHER"; + else if (rawType) + data.type = rawType; + } + if (dto.segmentColor !== void 0 || dto.color !== void 0) { + data.segmentColor = dto.segmentColor ?? dto.color; + } + if (dto.weight !== void 0) + data.weight = dto.weight; + if (dto.sortOrder !== void 0) + data.sortOrder = dto.sortOrder; + if (dto.expiresAt !== void 0) + data.expiresAt = dto.expiresAt; + if (dto.smsTemplate !== void 0) + data.smsTemplate = dto.smsTemplate; + if (dto.status !== void 0) + data.status = dto.status; + else if (dto.isActive !== void 0) { + data.status = dto.isActive ? "ACTIVE" : "INACTIVE"; + } + if (dto.stockType === client_1.StockType.UNLIMITED) { + data.stockType = client_1.StockType.UNLIMITED; + data.initialStock = null; + data.remainingStock = null; + } else if (dto.stockType === client_1.StockType.LIMITED) { + data.stockType = client_1.StockType.LIMITED; + if (prize.stockType === client_1.StockType.UNLIMITED && !dto.initialStock) { + throw new common_12.BadRequestException("\u0628\u0631\u0627\u06CC \u062A\u063A\u06CC\u06CC\u0631 \u0648\u0636\u0639\u06CC\u062A \u0645\u0648\u062C\u0648\u062F\u06CC \u0628\u0647 \u0645\u062D\u062F\u0648\u062F\u060C \u062A\u0639\u06CC\u06CC\u0646 \u0645\u0648\u062C\u0648\u062F\u06CC \u0627\u0648\u0644\u06CC\u0647 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A."); + } + if (dto.initialStock !== void 0) { + data.initialStock = dto.initialStock; + if (dto.remainingStock === void 0) { + const diff = (dto.initialStock ?? 0) - (prize.initialStock ?? 0); + data.remainingStock = Math.max(0, (prize.remainingStock ?? 0) + diff); + } + } + if (dto.remainingStock !== void 0) { + data.remainingStock = dto.remainingStock; + } + } + return this.prisma.prize.update({ + where: { id }, + data + }); + } + async updateStock(id, dto) { + const prize = await this.findOne(id); + if (prize.stockType === client_1.StockType.UNLIMITED) { + throw new common_12.BadRequestException("\u0627\u06CC\u0646 \u062C\u0627\u06CC\u0632\u0647 \u062F\u0627\u0631\u0627\u06CC \u0645\u0648\u062C\u0648\u062F\u06CC \u0646\u0627\u0645\u062D\u062F\u0648\u062F \u0627\u0633\u062A."); + } + let newStock = prize.remainingStock ?? 0; + if (dto.stock !== void 0) { + newStock = dto.stock; + } else if (dto.change !== void 0) { + newStock = Math.max(0, newStock + dto.change); + } + return this.prisma.prize.update({ + where: { id }, + data: { + remainingStock: newStock, + ...newStock > 0 && prize.status === "INACTIVE" ? { status: "ACTIVE" } : {} + } + }); + } + async remove(id) { + const spinCount = await this.prisma.spin.count({ where: { prizeId: id } }); + if (spinCount > 0) { + throw new common_12.BadRequestException("\u0627\u06CC\u0646 \u062C\u0627\u06CC\u0632\u0647 \u0628\u0647 \u0628\u0631\u0646\u062F\u06AF\u0627\u0646 \u0642\u0628\u0644\u06CC \u062A\u0639\u0644\u0642 \u06AF\u0631\u0641\u062A\u0647 \u0648 \u062F\u0631 \u0633\u0648\u0627\u0628\u0642 \u0642\u0631\u0639\u0647\u200C\u06A9\u0634\u06CC \u062B\u0628\u062A \u0634\u062F\u0647 \u0627\u0633\u062A. \u0628\u0647\u200C\u062C\u0627\u06CC \u062D\u0630\u0641\u060C \u0648\u0636\u0639\u06CC\u062A \u0622\u0646 \u0631\u0627 \u063A\u06CC\u0631\u0641\u0639\u0627\u0644 (INACTIVE) \u06A9\u0646\u06CC\u062F."); + } + return this.prisma.prize.delete({ where: { id } }); + } + }; + exports2.PrizeService = PrizeService; + exports2.PrizeService = PrizeService = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", [prisma_service_12.PrismaService]) + ], PrizeService); + } +}); + +// dist/src/modules/prize/admin-prize.controller.js +var require_admin_prize_controller = __commonJS({ + "dist/src/modules/prize/admin-prize.controller.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminPrizeController = void 0; + var common_12 = require_common(); + var swagger_12 = require_swagger(); + var jwt_admin_guard_1 = require_jwt_admin_guard(); + var audit_interceptor_1 = require_audit_interceptor(); + var create_prize_dto_1 = require_create_prize_dto(); + var update_prize_dto_1 = require_update_prize_dto(); + var update_stock_dto_1 = require_update_stock_dto(); + var prize_service_1 = require_prize_service(); + var AdminPrizeController = class AdminPrizeController { + constructor(prizeService) { + this.prizeService = prizeService; + } + async create(campaignId, dto) { + return this.prizeService.create(campaignId, dto); + } + async findByCampaign(campaignId) { + return this.prizeService.findByCampaign(campaignId); + } + async findOne(id) { + return this.prizeService.findOne(id); + } + async update(id, dto) { + return this.prizeService.update(id, dto); + } + async updateStock(id, dto) { + return this.prizeService.updateStock(id, dto); + } + async remove(id) { + return this.prizeService.remove(id); + } + }; + exports2.AdminPrizeController = AdminPrizeController; + __decorate2([ + (0, common_12.Post)("campaigns/:campaignId/prizes"), + (0, swagger_12.ApiOperation)({ summary: "\u0627\u06CC\u062C\u0627\u062F \u062C\u0627\u06CC\u0632\u0647 \u062C\u062F\u06CC\u062F \u0628\u0631\u0627\u06CC \u06CC\u06A9 \u06A9\u0645\u067E\u06CC\u0646" }), + (0, swagger_12.ApiResponse)({ status: 201, description: "\u062C\u0627\u06CC\u0632\u0647 \u0628\u0627 \u0645\u0648\u0641\u0642\u06CC\u062A \u0628\u0647 \u06A9\u0645\u067E\u06CC\u0646 \u0627\u0636\u0627\u0641\u0647 \u0634\u062F" }), + __param2(0, (0, common_12.Param)("campaignId")), + __param2(1, (0, common_12.Body)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String, create_prize_dto_1.CreatePrizeDto]), + __metadata2("design:returntype", Promise) + ], AdminPrizeController.prototype, "create", null); + __decorate2([ + (0, common_12.Get)("campaigns/:campaignId/prizes"), + (0, swagger_12.ApiOperation)({ summary: "\u0644\u06CC\u0633\u062A \u062A\u0645\u0627\u0645 \u062C\u0648\u0627\u06CC\u0632 \u062A\u0639\u0631\u06CC\u0641\u200C\u0634\u062F\u0647 \u0628\u0631\u0627\u06CC \u06CC\u06A9 \u06A9\u0645\u067E\u06CC\u0646" }), + __param2(0, (0, common_12.Param)("campaignId")), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String]), + __metadata2("design:returntype", Promise) + ], AdminPrizeController.prototype, "findByCampaign", null); + __decorate2([ + (0, common_12.Get)("prizes/:id"), + (0, swagger_12.ApiOperation)({ summary: "\u062F\u0631\u06CC\u0627\u0641\u062A \u0645\u0634\u062E\u0635\u0627\u062A \u06A9\u0627\u0645\u0644 \u06CC\u06A9 \u062C\u0627\u06CC\u0632\u0647" }), + __param2(0, (0, common_12.Param)("id")), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String]), + __metadata2("design:returntype", Promise) + ], AdminPrizeController.prototype, "findOne", null); + __decorate2([ + (0, common_12.Patch)("prizes/:id"), + (0, common_12.Put)("prizes/:id"), + (0, swagger_12.ApiOperation)({ summary: "\u0648\u06CC\u0631\u0627\u06CC\u0634 \u0627\u0637\u0644\u0627\u0639\u0627\u062A \u0648 \u0648\u0632\u0646 \u062C\u0627\u06CC\u0632\u0647" }), + __param2(0, (0, common_12.Param)("id")), + __param2(1, (0, common_12.Body)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String, update_prize_dto_1.UpdatePrizeDto]), + __metadata2("design:returntype", Promise) + ], AdminPrizeController.prototype, "update", null); + __decorate2([ + (0, common_12.Patch)("prizes/:id/stock"), + (0, swagger_12.ApiOperation)({ summary: "\u0634\u0627\u0631\u0698 \u06CC\u0627 \u0627\u0635\u0644\u0627\u062D \u062F\u0633\u062A\u06CC \u0645\u0648\u062C\u0648\u062F\u06CC \u062C\u0627\u06CC\u0632\u0647" }), + __param2(0, (0, common_12.Param)("id")), + __param2(1, (0, common_12.Body)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String, update_stock_dto_1.UpdateStockDto]), + __metadata2("design:returntype", Promise) + ], AdminPrizeController.prototype, "updateStock", null); + __decorate2([ + (0, common_12.Delete)("prizes/:id"), + (0, swagger_12.ApiOperation)({ summary: "\u062D\u0630\u0641 \u062C\u0627\u06CC\u0632\u0647 (\u062F\u0631 \u0635\u0648\u0631\u062A \u0639\u062F\u0645 \u062B\u0628\u062A \u062F\u0631 \u0646\u062A\u0627\u06CC\u062C \u0642\u0631\u0639\u0647\u200C\u06A9\u0634\u06CC)" }), + __param2(0, (0, common_12.Param)("id")), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String]), + __metadata2("design:returntype", Promise) + ], AdminPrizeController.prototype, "remove", null); + exports2.AdminPrizeController = AdminPrizeController = __decorate2([ + (0, swagger_12.ApiTags)("Admin Prizes (\u0645\u062F\u06CC\u0631\u06CC\u062A \u062C\u0648\u0627\u06CC\u0632)"), + (0, common_12.Controller)("admin"), + (0, common_12.UseGuards)(jwt_admin_guard_1.JwtAdminGuard), + (0, common_12.UseInterceptors)(audit_interceptor_1.AuditInterceptor), + (0, swagger_12.ApiBearerAuth)("AdminAuth"), + __metadata2("design:paramtypes", [prize_service_1.PrizeService]) + ], AdminPrizeController); + } +}); + +// dist/src/modules/prize/prize.module.js +var require_prize_module = __commonJS({ + "dist/src/modules/prize/prize.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PrizeModule = void 0; + var common_12 = require_common(); + var admin_prize_controller_1 = require_admin_prize_controller(); + var prize_service_1 = require_prize_service(); + var PrizeModule = class PrizeModule { + }; + exports2.PrizeModule = PrizeModule; + exports2.PrizeModule = PrizeModule = __decorate2([ + (0, common_12.Module)({ + controllers: [admin_prize_controller_1.AdminPrizeController], + providers: [prize_service_1.PrizeService], + exports: [prize_service_1.PrizeService] + }) + ], PrizeModule); + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/under-dash.js +var require_under_dash = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/under-dash.js"(exports2, module2) { + var { toString: toString2 } = Object.prototype; + var escapeHtmlRegex = /["&<>]/; + var _2 = { + each: function each(obj2, cb) { + if (obj2) { + if (Array.isArray(obj2)) { + obj2.forEach(cb); + } else { + Object.keys(obj2).forEach((key) => { + cb(obj2[key], key); + }); + } + } + }, + some: function some(obj2, cb) { + if (obj2) { + if (Array.isArray(obj2)) { + return obj2.some(cb); + } + return Object.keys(obj2).some((key) => cb(obj2[key], key)); + } + return false; + }, + every: function every(obj2, cb) { + if (obj2) { + if (Array.isArray(obj2)) { + return obj2.every(cb); + } + return Object.keys(obj2).every((key) => cb(obj2[key], key)); + } + return true; + }, + map: function map(obj2, cb) { + if (obj2) { + if (Array.isArray(obj2)) { + return obj2.map(cb); + } + return Object.keys(obj2).map((key) => cb(obj2[key], key)); + } + return []; + }, + keyBy(a, p) { + return a.reduce((o, v) => { + o[v[p]] = v; + return o; + }, {}); + }, + isEqual: function isEqual(a, b) { + const aType = typeof a; + const bType = typeof b; + const aArray = Array.isArray(a); + const bArray = Array.isArray(b); + let keys; + if (aType !== bType) { + return false; + } + switch (typeof a) { + case "object": + if (aArray || bArray) { + if (aArray && bArray) { + return a.length === b.length && a.every((aValue, index) => { + const bValue = b[index]; + return _2.isEqual(aValue, bValue); + }); + } + return false; + } + if (a === null || b === null) { + return a === b; + } + keys = Object.keys(a); + if (Object.keys(b).length !== keys.length) { + return false; + } + for (const key of keys) { + if (!b.hasOwnProperty(key)) { + return false; + } + } + return _2.every(a, (aValue, key) => { + const bValue = b[key]; + return _2.isEqual(aValue, bValue); + }); + default: + return a === b; + } + }, + escapeHtml(html) { + const regexResult = escapeHtmlRegex.exec(html); + if (!regexResult) return html; + let result = ""; + let escape2 = ""; + let lastIndex = 0; + let i = regexResult.index; + for (; i < html.length; i++) { + switch (html.charAt(i)) { + case '"': + escape2 = """; + break; + case "&": + escape2 = "&"; + break; + case "'": + escape2 = "'"; + break; + case "<": + escape2 = "<"; + break; + case ">": + escape2 = ">"; + break; + default: + continue; + } + if (lastIndex !== i) result += html.substring(lastIndex, i); + lastIndex = i + 1; + result += escape2; + } + if (lastIndex !== i) return result + html.substring(lastIndex, i); + return result; + }, + strcmp(a, b) { + if (a < b) return -1; + if (a > b) return 1; + return 0; + }, + isUndefined(val) { + return toString2.call(val) === "[object Undefined]"; + }, + isObject(val) { + return toString2.call(val) === "[object Object]"; + }, + deepMerge() { + const target = arguments[0] || {}; + const { length } = arguments; + let src, clone, copyIsArray; + function assignValue(val, key) { + src = target[key]; + copyIsArray = Array.isArray(val); + if (_2.isObject(val) || copyIsArray) { + if (copyIsArray) { + copyIsArray = false; + clone = src && Array.isArray(src) ? src : []; + } else { + clone = src && _2.isObject(src) ? src : {}; + } + target[key] = _2.deepMerge(clone, val); + } else if (!_2.isUndefined(val)) { + target[key] = val; + } + } + for (let i = 0; i < length; i++) { + _2.each(arguments[i], assignValue); + } + return target; + } + }; + module2.exports = _2; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/col-cache.js +var require_col_cache = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/col-cache.js"(exports2, module2) { + var addressRegex = /^[A-Z]+\d+$/; + var colCache = { + _dictionary: [ + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z" + ], + _l2nFill: 0, + _l2n: {}, + _n2l: [], + _level(n) { + if (n <= 26) { + return 1; + } + if (n <= 26 * 26) { + return 2; + } + return 3; + }, + _fill(level) { + let c; + let v; + let l1; + let l2; + let l3; + let n = 1; + if (level >= 4) { + throw new Error("Out of bounds. Excel supports columns from 1 to 16384"); + } + if (this._l2nFill < 1 && level >= 1) { + while (n <= 26) { + c = this._dictionary[n - 1]; + this._n2l[n] = c; + this._l2n[c] = n; + n++; + } + this._l2nFill = 1; + } + if (this._l2nFill < 2 && level >= 2) { + n = 27; + while (n <= 26 + 26 * 26) { + v = n - (26 + 1); + l1 = v % 26; + l2 = Math.floor(v / 26); + c = this._dictionary[l2] + this._dictionary[l1]; + this._n2l[n] = c; + this._l2n[c] = n; + n++; + } + this._l2nFill = 2; + } + if (this._l2nFill < 3 && level >= 3) { + n = 26 + 26 * 26 + 1; + while (n <= 16384) { + v = n - (26 * 26 + 26 + 1); + l1 = v % 26; + l2 = Math.floor(v / 26) % 26; + l3 = Math.floor(v / (26 * 26)); + c = this._dictionary[l3] + this._dictionary[l2] + this._dictionary[l1]; + this._n2l[n] = c; + this._l2n[c] = n; + n++; + } + this._l2nFill = 3; + } + }, + l2n(l2) { + if (!this._l2n[l2]) { + this._fill(l2.length); + } + if (!this._l2n[l2]) { + throw new Error(`Out of bounds. Invalid column letter: ${l2}`); + } + return this._l2n[l2]; + }, + n2l(n) { + if (n < 1 || n > 16384) { + throw new Error(`${n} is out of bounds. Excel supports columns from 1 to 16384`); + } + if (!this._n2l[n]) { + this._fill(this._level(n)); + } + return this._n2l[n]; + }, + // ========================================================================= + // Address processing + _hash: {}, + // check if value looks like an address + validateAddress(value) { + if (!addressRegex.test(value)) { + throw new Error(`Invalid Address: ${value}`); + } + return true; + }, + // convert address string into structure + decodeAddress(value) { + const addr = value.length < 5 && this._hash[value]; + if (addr) { + return addr; + } + let hasCol = false; + let col = ""; + let colNumber = 0; + let hasRow = false; + let row = ""; + let rowNumber = 0; + for (let i = 0, char; i < value.length; i++) { + char = value.charCodeAt(i); + if (!hasRow && char >= 65 && char <= 90) { + hasCol = true; + col += value[i]; + colNumber = colNumber * 26 + char - 64; + } else if (char >= 48 && char <= 57) { + hasRow = true; + row += value[i]; + rowNumber = rowNumber * 10 + char - 48; + } else if (hasRow && hasCol && char !== 36) { + break; + } + } + if (!hasCol) { + colNumber = void 0; + } else if (colNumber > 16384) { + throw new Error(`Out of bounds. Invalid column letter: ${col}`); + } + if (!hasRow) { + rowNumber = void 0; + } + value = col + row; + const address = { + address: value, + col: colNumber, + row: rowNumber, + $col$row: `$${col}$${row}` + }; + if (colNumber <= 100 && rowNumber <= 100) { + this._hash[value] = address; + this._hash[address.$col$row] = address; + } + return address; + }, + // convert r,c into structure (if only 1 arg, assume r is address string) + getAddress(r, c) { + if (c) { + const address = this.n2l(c) + r; + return this.decodeAddress(address); + } + return this.decodeAddress(r); + }, + // convert [address], [tl:br] into address structures + decode(value) { + const parts = value.split(":"); + if (parts.length === 2) { + const tl = this.decodeAddress(parts[0]); + const br = this.decodeAddress(parts[1]); + const result = { + top: Math.min(tl.row, br.row), + left: Math.min(tl.col, br.col), + bottom: Math.max(tl.row, br.row), + right: Math.max(tl.col, br.col) + }; + result.tl = this.n2l(result.left) + result.top; + result.br = this.n2l(result.right) + result.bottom; + result.dimensions = `${result.tl}:${result.br}`; + return result; + } + return this.decodeAddress(value); + }, + // convert [sheetName!][$]col[$]row[[$]col[$]row] into address or range structures + decodeEx(value) { + const groups = value.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/); + const sheetName = groups[1] || groups[2]; + const reference = groups[3]; + const parts = reference.split(":"); + if (parts.length > 1) { + let tl = this.decodeAddress(parts[0]); + let br = this.decodeAddress(parts[1]); + const top = Math.min(tl.row, br.row); + const left = Math.min(tl.col, br.col); + const bottom = Math.max(tl.row, br.row); + const right = Math.max(tl.col, br.col); + tl = this.n2l(left) + top; + br = this.n2l(right) + bottom; + return { + top, + left, + bottom, + right, + sheetName, + tl: { address: tl, col: left, row: top, $col$row: `$${this.n2l(left)}$${top}`, sheetName }, + br: { + address: br, + col: right, + row: bottom, + $col$row: `$${this.n2l(right)}$${bottom}`, + sheetName + }, + dimensions: `${tl}:${br}` + }; + } + if (reference.startsWith("#")) { + return sheetName ? { sheetName, error: reference } : { error: reference }; + } + const address = this.decodeAddress(reference); + return sheetName ? { sheetName, ...address } : address; + }, + // convert row,col into address string + encodeAddress(row, col) { + return colCache.n2l(col) + row; + }, + // convert row,col into string address or t,l,b,r into range + encode() { + switch (arguments.length) { + case 2: + return colCache.encodeAddress(arguments[0], arguments[1]); + case 4: + return `${colCache.encodeAddress(arguments[0], arguments[1])}:${colCache.encodeAddress( + arguments[2], + arguments[3] + )}`; + default: + throw new Error("Can only encode with 2 or 4 arguments"); + } + }, + // return true if address is contained within range + inRange(range, address) { + const [left, top, , right, bottom] = range; + const [col, row] = address; + return col >= left && col <= right && row >= top && row <= bottom; + } + }; + module2.exports = colCache; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/range.js +var require_range4 = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/range.js"(exports2, module2) { + var colCache = require_col_cache(); + var Range = class _Range { + constructor() { + this.decode(arguments); + } + setTLBR(t, l2, b, r, s) { + if (arguments.length < 4) { + const tl = colCache.decodeAddress(t); + const br = colCache.decodeAddress(l2); + this.model = { + top: Math.min(tl.row, br.row), + left: Math.min(tl.col, br.col), + bottom: Math.max(tl.row, br.row), + right: Math.max(tl.col, br.col), + sheetName: b + }; + this.setTLBR(tl.row, tl.col, br.row, br.col, s); + } else { + this.model = { + top: Math.min(t, b), + left: Math.min(l2, r), + bottom: Math.max(t, b), + right: Math.max(l2, r), + sheetName: s + }; + } + } + decode(argv) { + switch (argv.length) { + case 5: + this.setTLBR(argv[0], argv[1], argv[2], argv[3], argv[4]); + break; + case 4: + this.setTLBR(argv[0], argv[1], argv[2], argv[3]); + break; + case 3: + this.setTLBR(argv[0], argv[1], argv[2]); + break; + case 2: + this.setTLBR(argv[0], argv[1]); + break; + case 1: { + const value = argv[0]; + if (value instanceof _Range) { + this.model = { + top: value.model.top, + left: value.model.left, + bottom: value.model.bottom, + right: value.model.right, + sheetName: value.sheetName + }; + } else if (value instanceof Array) { + this.decode(value); + } else if (value.top && value.left && value.bottom && value.right) { + this.model = { + top: value.top, + left: value.left, + bottom: value.bottom, + right: value.right, + sheetName: value.sheetName + }; + } else { + const tlbr = colCache.decodeEx(value); + if (tlbr.top) { + this.model = { + top: tlbr.top, + left: tlbr.left, + bottom: tlbr.bottom, + right: tlbr.right, + sheetName: tlbr.sheetName + }; + } else { + this.model = { + top: tlbr.row, + left: tlbr.col, + bottom: tlbr.row, + right: tlbr.col, + sheetName: tlbr.sheetName + }; + } + } + break; + } + case 0: + this.model = { + top: 0, + left: 0, + bottom: 0, + right: 0 + }; + break; + default: + throw new Error(`Invalid number of arguments to _getDimensions() - ${argv.length}`); + } + } + get top() { + return this.model.top || 1; + } + set top(value) { + this.model.top = value; + } + get left() { + return this.model.left || 1; + } + set left(value) { + this.model.left = value; + } + get bottom() { + return this.model.bottom || 1; + } + set bottom(value) { + this.model.bottom = value; + } + get right() { + return this.model.right || 1; + } + set right(value) { + this.model.right = value; + } + get sheetName() { + return this.model.sheetName; + } + set sheetName(value) { + this.model.sheetName = value; + } + get _serialisedSheetName() { + const { sheetName } = this.model; + if (sheetName) { + if (/^[a-zA-Z0-9]*$/.test(sheetName)) { + return `${sheetName}!`; + } + return `'${sheetName}'!`; + } + return ""; + } + expand(top, left, bottom, right) { + if (!this.model.top || top < this.top) this.top = top; + if (!this.model.left || left < this.left) this.left = left; + if (!this.model.bottom || bottom > this.bottom) this.bottom = bottom; + if (!this.model.right || right > this.right) this.right = right; + } + expandRow(row) { + if (row) { + const { dimensions, number } = row; + if (dimensions) { + this.expand(number, dimensions.min, number, dimensions.max); + } + } + } + expandToAddress(addressStr) { + const address = colCache.decodeEx(addressStr); + this.expand(address.row, address.col, address.row, address.col); + } + get tl() { + return colCache.n2l(this.left) + this.top; + } + get $t$l() { + return `$${colCache.n2l(this.left)}$${this.top}`; + } + get br() { + return colCache.n2l(this.right) + this.bottom; + } + get $b$r() { + return `$${colCache.n2l(this.right)}$${this.bottom}`; + } + get range() { + return `${this._serialisedSheetName + this.tl}:${this.br}`; + } + get $range() { + return `${this._serialisedSheetName + this.$t$l}:${this.$b$r}`; + } + get shortRange() { + return this.count > 1 ? this.range : this._serialisedSheetName + this.tl; + } + get $shortRange() { + return this.count > 1 ? this.$range : this._serialisedSheetName + this.$t$l; + } + get count() { + return (1 + this.bottom - this.top) * (1 + this.right - this.left); + } + toString() { + return this.range; + } + intersects(other) { + if (other.sheetName && this.sheetName && other.sheetName !== this.sheetName) return false; + if (other.bottom < this.top) return false; + if (other.top > this.bottom) return false; + if (other.right < this.left) return false; + if (other.left > this.right) return false; + return true; + } + contains(addressStr) { + const address = colCache.decodeEx(addressStr); + return this.containsEx(address); + } + containsEx(address) { + if (address.sheetName && this.sheetName && address.sheetName !== this.sheetName) return false; + return address.row >= this.top && address.row <= this.bottom && address.col >= this.left && address.col <= this.right; + } + forEachAddress(cb) { + for (let col = this.left; col <= this.right; col++) { + for (let row = this.top; row <= this.bottom; row++) { + cb(colCache.encodeAddress(row, col), row, col); + } + } + } + }; + module2.exports = Range; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/enums.js +var require_enums5 = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/enums.js"(exports2, module2) { + "use strict"; + module2.exports = { + ValueType: { + Null: 0, + Merge: 1, + Number: 2, + String: 3, + Date: 4, + Hyperlink: 5, + Formula: 6, + SharedString: 7, + RichText: 8, + Boolean: 9, + Error: 10 + }, + FormulaType: { + None: 0, + Master: 1, + Shared: 2 + }, + RelationshipType: { + None: 0, + OfficeDocument: 1, + Worksheet: 2, + CalcChain: 3, + SharedStrings: 4, + Styles: 5, + Theme: 6, + Hyperlink: 7 + }, + DocumentType: { + Xlsx: 1 + }, + ReadingOrder: { + LeftToRight: 1, + RightToLeft: 2 + }, + ErrorValue: { + NotApplicable: "#N/A", + Ref: "#REF!", + Name: "#NAME?", + DivZero: "#DIV/0!", + Null: "#NULL!", + Value: "#VALUE!", + Num: "#NUM!" + } + }; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/shared-formula.js +var require_shared_formula = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/shared-formula.js"(exports2, module2) { + var colCache = require_col_cache(); + var replacementCandidateRx = /(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi; + var CRrx = /^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i; + function slideFormula(formula, fromCell, toCell) { + const offset = colCache.decode(fromCell); + const to = colCache.decode(toCell); + return formula.replace( + replacementCandidateRx, + (refMatch, sheet, sheetMaybe, addrPart, trailingParen) => { + if (trailingParen) { + return refMatch; + } + const match = CRrx.exec(addrPart); + if (match) { + const colDollar = match[1]; + const colStr = match[2].toUpperCase(); + const rowDollar = match[3]; + const rowStr = match[4]; + if (colStr.length > 3 || colStr.length === 3 && colStr > "XFD") { + return refMatch; + } + let col = colCache.l2n(colStr); + let row = parseInt(rowStr, 10); + if (!colDollar) { + col += to.col - offset.col; + } + if (!rowDollar) { + row += to.row - offset.row; + } + const res = (sheet || "") + (colDollar || "") + colCache.n2l(col) + (rowDollar || "") + row; + return res; + } + return refMatch; + } + ); + } + module2.exports = { + slideFormula + }; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/note.js +var require_note = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/note.js"(exports2, module2) { + var _2 = require_under_dash(); + var Note = class _Note { + constructor(note) { + this.note = note; + } + get model() { + let value = null; + switch (typeof this.note) { + case "string": + value = { + type: "note", + note: { + texts: [ + { + text: this.note + } + ] + } + }; + break; + default: + value = { + type: "note", + note: this.note + }; + break; + } + return _2.deepMerge({}, _Note.DEFAULT_CONFIGS, value); + } + set model(value) { + const { note } = value; + const { texts } = note; + if (texts.length === 1 && Object.keys(texts[0]).length === 1) { + this.note = texts[0].text; + } else { + this.note = note; + } + } + static fromModel(model) { + const note = new _Note(); + note.model = model; + return note; + } + }; + Note.DEFAULT_CONFIGS = { + note: { + margins: { + insetmode: "auto", + inset: [0.13, 0.13, 0.25, 0.25] + }, + protection: { + locked: "True", + lockText: "True" + }, + editAs: "absolute" + } + }; + module2.exports = Note; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/cell.js +var require_cell = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/cell.js"(exports2, module2) { + var colCache = require_col_cache(); + var _2 = require_under_dash(); + var Enums = require_enums5(); + var { slideFormula } = require_shared_formula(); + var Note = require_note(); + var Cell = class _Cell { + constructor(row, column, address) { + if (!row || !column) { + throw new Error("A Cell needs a Row"); + } + this._row = row; + this._column = column; + colCache.validateAddress(address); + this._address = address; + this._value = Value.create(_Cell.Types.Null, this); + this.style = this._mergeStyle(row.style, column.style, {}); + this._mergeCount = 0; + } + get worksheet() { + return this._row.worksheet; + } + get workbook() { + return this._row.worksheet.workbook; + } + // help GC by removing cyclic (and other) references + destroy() { + delete this.style; + delete this._value; + delete this._row; + delete this._column; + delete this._address; + } + // ========================================================================= + // Styles stuff + get numFmt() { + return this.style.numFmt; + } + set numFmt(value) { + this.style.numFmt = value; + } + get font() { + return this.style.font; + } + set font(value) { + this.style.font = value; + } + get alignment() { + return this.style.alignment; + } + set alignment(value) { + this.style.alignment = value; + } + get border() { + return this.style.border; + } + set border(value) { + this.style.border = value; + } + get fill() { + return this.style.fill; + } + set fill(value) { + this.style.fill = value; + } + get protection() { + return this.style.protection; + } + set protection(value) { + this.style.protection = value; + } + _mergeStyle(rowStyle, colStyle, style) { + const numFmt = rowStyle && rowStyle.numFmt || colStyle && colStyle.numFmt; + if (numFmt) style.numFmt = numFmt; + const font = rowStyle && rowStyle.font || colStyle && colStyle.font; + if (font) style.font = font; + const alignment = rowStyle && rowStyle.alignment || colStyle && colStyle.alignment; + if (alignment) style.alignment = alignment; + const border = rowStyle && rowStyle.border || colStyle && colStyle.border; + if (border) style.border = border; + const fill = rowStyle && rowStyle.fill || colStyle && colStyle.fill; + if (fill) style.fill = fill; + const protection = rowStyle && rowStyle.protection || colStyle && colStyle.protection; + if (protection) style.protection = protection; + return style; + } + // ========================================================================= + // return the address for this cell + get address() { + return this._address; + } + get row() { + return this._row.number; + } + get col() { + return this._column.number; + } + get $col$row() { + return `$${this._column.letter}$${this.row}`; + } + // ========================================================================= + // Value stuff + get type() { + return this._value.type; + } + get effectiveType() { + return this._value.effectiveType; + } + toCsvString() { + return this._value.toCsvString(); + } + // ========================================================================= + // Merge stuff + addMergeRef() { + this._mergeCount++; + } + releaseMergeRef() { + this._mergeCount--; + } + get isMerged() { + return this._mergeCount > 0 || this.type === _Cell.Types.Merge; + } + merge(master, ignoreStyle) { + this._value.release(); + this._value = Value.create(_Cell.Types.Merge, this, master); + if (!ignoreStyle) { + this.style = master.style; + } + } + unmerge() { + if (this.type === _Cell.Types.Merge) { + this._value.release(); + this._value = Value.create(_Cell.Types.Null, this); + this.style = this._mergeStyle(this._row.style, this._column.style, {}); + } + } + isMergedTo(master) { + if (this._value.type !== _Cell.Types.Merge) return false; + return this._value.isMergedTo(master); + } + get master() { + if (this.type === _Cell.Types.Merge) { + return this._value.master; + } + return this; + } + get isHyperlink() { + return this._value.type === _Cell.Types.Hyperlink; + } + get hyperlink() { + return this._value.hyperlink; + } + // return the value + get value() { + return this._value.value; + } + // set the value - can be number, string or raw + set value(v) { + if (this.type === _Cell.Types.Merge) { + this._value.master.value = v; + return; + } + this._value.release(); + this._value = Value.create(Value.getType(v), this, v); + } + get note() { + return this._comment && this._comment.note; + } + set note(note) { + this._comment = new Note(note); + } + get text() { + return this._value.toString(); + } + get html() { + return _2.escapeHtml(this.text); + } + toString() { + return this.text; + } + _upgradeToHyperlink(hyperlink) { + if (this.type === _Cell.Types.String) { + this._value = Value.create(_Cell.Types.Hyperlink, this, { + text: this._value.value, + hyperlink + }); + } + } + // ========================================================================= + // Formula stuff + get formula() { + return this._value.formula; + } + get result() { + return this._value.result; + } + get formulaType() { + return this._value.formulaType; + } + // ========================================================================= + // Name stuff + get fullAddress() { + const { worksheet } = this._row; + return { + sheetName: worksheet.name, + address: this.address, + row: this.row, + col: this.col + }; + } + get name() { + return this.names[0]; + } + set name(value) { + this.names = [value]; + } + get names() { + return this.workbook.definedNames.getNamesEx(this.fullAddress); + } + set names(value) { + const { definedNames } = this.workbook; + definedNames.removeAllNames(this.fullAddress); + value.forEach((name) => { + definedNames.addEx(this.fullAddress, name); + }); + } + addName(name) { + this.workbook.definedNames.addEx(this.fullAddress, name); + } + removeName(name) { + this.workbook.definedNames.removeEx(this.fullAddress, name); + } + removeAllNames() { + this.workbook.definedNames.removeAllNames(this.fullAddress); + } + // ========================================================================= + // Data Validation stuff + get _dataValidations() { + return this.worksheet.dataValidations; + } + get dataValidation() { + return this._dataValidations.find(this.address); + } + set dataValidation(value) { + this._dataValidations.add(this.address, value); + } + // ========================================================================= + // Model stuff + get model() { + const { model } = this._value; + model.style = this.style; + if (this._comment) { + model.comment = this._comment.model; + } + return model; + } + set model(value) { + this._value.release(); + this._value = Value.create(value.type, this); + this._value.model = value; + if (value.comment) { + switch (value.comment.type) { + case "note": + this._comment = Note.fromModel(value.comment); + break; + } + } + if (value.style) { + this.style = value.style; + } else { + this.style = {}; + } + } + }; + Cell.Types = Enums.ValueType; + var NullValue = class { + constructor(cell) { + this.model = { + address: cell.address, + type: Cell.Types.Null + }; + } + get value() { + return null; + } + set value(value) { + } + get type() { + return Cell.Types.Null; + } + get effectiveType() { + return Cell.Types.Null; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return ""; + } + release() { + } + toString() { + return ""; + } + }; + var NumberValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.Number, + value + }; + } + get value() { + return this.model.value; + } + set value(value) { + this.model.value = value; + } + get type() { + return Cell.Types.Number; + } + get effectiveType() { + return Cell.Types.Number; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return this.model.value.toString(); + } + release() { + } + toString() { + return this.model.value.toString(); + } + }; + var StringValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.String, + value + }; + } + get value() { + return this.model.value; + } + set value(value) { + this.model.value = value; + } + get type() { + return Cell.Types.String; + } + get effectiveType() { + return Cell.Types.String; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return `"${this.model.value.replace(/"/g, '""')}"`; + } + release() { + } + toString() { + return this.model.value; + } + }; + var RichTextValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.String, + value + }; + } + get value() { + return this.model.value; + } + set value(value) { + this.model.value = value; + } + toString() { + return this.model.value.richText.map((t) => t.text).join(""); + } + get type() { + return Cell.Types.RichText; + } + get effectiveType() { + return Cell.Types.RichText; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return `"${this.text.replace(/"/g, '""')}"`; + } + release() { + } + }; + var DateValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.Date, + value + }; + } + get value() { + return this.model.value; + } + set value(value) { + this.model.value = value; + } + get type() { + return Cell.Types.Date; + } + get effectiveType() { + return Cell.Types.Date; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return this.model.value.toISOString(); + } + release() { + } + toString() { + return this.model.value.toString(); + } + }; + var HyperlinkValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.Hyperlink, + text: value ? value.text : void 0, + hyperlink: value ? value.hyperlink : void 0 + }; + if (value && value.tooltip) { + this.model.tooltip = value.tooltip; + } + } + get value() { + const v = { + text: this.model.text, + hyperlink: this.model.hyperlink + }; + if (this.model.tooltip) { + v.tooltip = this.model.tooltip; + } + return v; + } + set value(value) { + this.model = { + text: value.text, + hyperlink: value.hyperlink + }; + if (value.tooltip) { + this.model.tooltip = value.tooltip; + } + } + get text() { + return this.model.text; + } + set text(value) { + this.model.text = value; + } + /* + get tooltip() { + return this.model.tooltip; + } + + set tooltip(value) { + this.model.tooltip = value; + } */ + get hyperlink() { + return this.model.hyperlink; + } + set hyperlink(value) { + this.model.hyperlink = value; + } + get type() { + return Cell.Types.Hyperlink; + } + get effectiveType() { + return Cell.Types.Hyperlink; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return this.model.hyperlink; + } + release() { + } + toString() { + return this.model.text; + } + }; + var MergeValue = class { + constructor(cell, master) { + this.model = { + address: cell.address, + type: Cell.Types.Merge, + master: master ? master.address : void 0 + }; + this._master = master; + if (master) { + master.addMergeRef(); + } + } + get value() { + return this._master.value; + } + set value(value) { + if (value instanceof Cell) { + if (this._master) { + this._master.releaseMergeRef(); + } + value.addMergeRef(); + this._master = value; + } else { + this._master.value = value; + } + } + isMergedTo(master) { + return master === this._master; + } + get master() { + return this._master; + } + get type() { + return Cell.Types.Merge; + } + get effectiveType() { + return this._master.effectiveType; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return ""; + } + release() { + this._master.releaseMergeRef(); + } + toString() { + return this.value.toString(); + } + }; + var FormulaValue = class { + constructor(cell, value) { + this.cell = cell; + this.model = { + address: cell.address, + type: Cell.Types.Formula, + shareType: value ? value.shareType : void 0, + ref: value ? value.ref : void 0, + formula: value ? value.formula : void 0, + sharedFormula: value ? value.sharedFormula : void 0, + result: value ? value.result : void 0 + }; + } + _copyModel(model) { + const copy = {}; + const cp = (name) => { + const value = model[name]; + if (value) { + copy[name] = value; + } + }; + cp("formula"); + cp("result"); + cp("ref"); + cp("shareType"); + cp("sharedFormula"); + return copy; + } + get value() { + return this._copyModel(this.model); + } + set value(value) { + this.model = this._copyModel(value); + } + validate(value) { + switch (Value.getType(value)) { + case Cell.Types.Null: + case Cell.Types.String: + case Cell.Types.Number: + case Cell.Types.Date: + break; + case Cell.Types.Hyperlink: + case Cell.Types.Formula: + default: + throw new Error("Cannot process that type of result value"); + } + } + get dependencies() { + const ranges = this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g); + const cells = this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g, "").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g); + return { + ranges, + cells + }; + } + get formula() { + return this.model.formula || this._getTranslatedFormula(); + } + set formula(value) { + this.model.formula = value; + } + get formulaType() { + if (this.model.formula) { + return Enums.FormulaType.Master; + } + if (this.model.sharedFormula) { + return Enums.FormulaType.Shared; + } + return Enums.FormulaType.None; + } + get result() { + return this.model.result; + } + set result(value) { + this.model.result = value; + } + get type() { + return Cell.Types.Formula; + } + get effectiveType() { + const v = this.model.result; + if (v === null || v === void 0) { + return Enums.ValueType.Null; + } + if (v instanceof String || typeof v === "string") { + return Enums.ValueType.String; + } + if (typeof v === "number") { + return Enums.ValueType.Number; + } + if (v instanceof Date) { + return Enums.ValueType.Date; + } + if (v.text && v.hyperlink) { + return Enums.ValueType.Hyperlink; + } + if (v.formula) { + return Enums.ValueType.Formula; + } + return Enums.ValueType.Null; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + _getTranslatedFormula() { + if (!this._translatedFormula && this.model.sharedFormula) { + const { worksheet } = this.cell; + const master = worksheet.findCell(this.model.sharedFormula); + this._translatedFormula = master && slideFormula(master.formula, master.address, this.model.address); + } + return this._translatedFormula; + } + toCsvString() { + return `${this.model.result || ""}`; + } + release() { + } + toString() { + return this.model.result ? this.model.result.toString() : ""; + } + }; + var SharedStringValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.SharedString, + value + }; + } + get value() { + return this.model.value; + } + set value(value) { + this.model.value = value; + } + get type() { + return Cell.Types.SharedString; + } + get effectiveType() { + return Cell.Types.SharedString; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return this.model.value.toString(); + } + release() { + } + toString() { + return this.model.value.toString(); + } + }; + var BooleanValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.Boolean, + value + }; + } + get value() { + return this.model.value; + } + set value(value) { + this.model.value = value; + } + get type() { + return Cell.Types.Boolean; + } + get effectiveType() { + return Cell.Types.Boolean; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return this.model.value ? 1 : 0; + } + release() { + } + toString() { + return this.model.value.toString(); + } + }; + var ErrorValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.Error, + value + }; + } + get value() { + return this.model.value; + } + set value(value) { + this.model.value = value; + } + get type() { + return Cell.Types.Error; + } + get effectiveType() { + return Cell.Types.Error; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return this.toString(); + } + release() { + } + toString() { + return this.model.value.error.toString(); + } + }; + var JSONValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.String, + value: JSON.stringify(value), + rawValue: value + }; + } + get value() { + return this.model.rawValue; + } + set value(value) { + this.model.rawValue = value; + this.model.value = JSON.stringify(value); + } + get type() { + return Cell.Types.String; + } + get effectiveType() { + return Cell.Types.String; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return this.model.value; + } + release() { + } + toString() { + return this.model.value; + } + }; + var Value = { + getType(value) { + if (value === null || value === void 0) { + return Cell.Types.Null; + } + if (value instanceof String || typeof value === "string") { + return Cell.Types.String; + } + if (typeof value === "number") { + return Cell.Types.Number; + } + if (typeof value === "boolean") { + return Cell.Types.Boolean; + } + if (value instanceof Date) { + return Cell.Types.Date; + } + if (value.text && value.hyperlink) { + return Cell.Types.Hyperlink; + } + if (value.formula || value.sharedFormula) { + return Cell.Types.Formula; + } + if (value.richText) { + return Cell.Types.RichText; + } + if (value.sharedString) { + return Cell.Types.SharedString; + } + if (value.error) { + return Cell.Types.Error; + } + return Cell.Types.JSON; + }, + // map valueType to constructor + types: [ + { t: Cell.Types.Null, f: NullValue }, + { t: Cell.Types.Number, f: NumberValue }, + { t: Cell.Types.String, f: StringValue }, + { t: Cell.Types.Date, f: DateValue }, + { t: Cell.Types.Hyperlink, f: HyperlinkValue }, + { t: Cell.Types.Formula, f: FormulaValue }, + { t: Cell.Types.Merge, f: MergeValue }, + { t: Cell.Types.JSON, f: JSONValue }, + { t: Cell.Types.SharedString, f: SharedStringValue }, + { t: Cell.Types.RichText, f: RichTextValue }, + { t: Cell.Types.Boolean, f: BooleanValue }, + { t: Cell.Types.Error, f: ErrorValue } + ].reduce((p, t) => { + p[t.t] = t.f; + return p; + }, []), + create(type, cell, value) { + const T = this.types[type]; + if (!T) { + throw new Error(`Could not create Value of type ${type}`); + } + return new T(cell, value); + } + }; + module2.exports = Cell; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/row.js +var require_row = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/row.js"(exports2, module2) { + "use strict"; + var _2 = require_under_dash(); + var Enums = require_enums5(); + var colCache = require_col_cache(); + var Cell = require_cell(); + var Row = class { + constructor(worksheet, number) { + this._worksheet = worksheet; + this._number = number; + this._cells = []; + this.style = {}; + this.outlineLevel = 0; + } + // return the row number + get number() { + return this._number; + } + get worksheet() { + return this._worksheet; + } + // Inform Streaming Writer that this row (and all rows before it) are complete + // and ready to write. Has no effect on Worksheet document + commit() { + this._worksheet._commitRow(this); + } + // helps GC by breaking cyclic references + destroy() { + delete this._worksheet; + delete this._cells; + delete this.style; + } + findCell(colNumber) { + return this._cells[colNumber - 1]; + } + // given {address, row, col}, find or create new cell + getCellEx(address) { + let cell = this._cells[address.col - 1]; + if (!cell) { + const column = this._worksheet.getColumn(address.col); + cell = new Cell(this, column, address.address); + this._cells[address.col - 1] = cell; + } + return cell; + } + // get cell by key, letter or column number + getCell(col) { + if (typeof col === "string") { + const column = this._worksheet.getColumnKey(col); + if (column) { + col = column.number; + } else { + col = colCache.l2n(col); + } + } + return this._cells[col - 1] || this.getCellEx({ + address: colCache.encodeAddress(this._number, col), + row: this._number, + col + }); + } + // remove cell(s) and shift all higher cells down by count + splice(start, count, ...inserts) { + const nKeep = start + count; + const nExpand = inserts.length - count; + const nEnd = this._cells.length; + let i; + let cSrc; + let cDst; + if (nExpand < 0) { + for (i = start + inserts.length; i <= nEnd; i++) { + cDst = this._cells[i - 1]; + cSrc = this._cells[i - nExpand - 1]; + if (cSrc) { + cDst = this.getCell(i); + cDst.value = cSrc.value; + cDst.style = cSrc.style; + cDst._comment = cSrc._comment; + } else if (cDst) { + cDst.value = null; + cDst.style = {}; + cDst._comment = void 0; + } + } + } else if (nExpand > 0) { + for (i = nEnd; i >= nKeep; i--) { + cSrc = this._cells[i - 1]; + if (cSrc) { + cDst = this.getCell(i + nExpand); + cDst.value = cSrc.value; + cDst.style = cSrc.style; + cDst._comment = cSrc._comment; + } else { + this._cells[i + nExpand - 1] = void 0; + } + } + } + for (i = 0; i < inserts.length; i++) { + cDst = this.getCell(start + i); + cDst.value = inserts[i]; + cDst.style = {}; + cDst._comment = void 0; + } + } + // Iterate over all non-null cells in this row + eachCell(options, iteratee) { + if (!iteratee) { + iteratee = options; + options = null; + } + if (options && options.includeEmpty) { + const n = this._cells.length; + for (let i = 1; i <= n; i++) { + iteratee(this.getCell(i), i); + } + } else { + this._cells.forEach((cell, index) => { + if (cell && cell.type !== Enums.ValueType.Null) { + iteratee(cell, index + 1); + } + }); + } + } + // =========================================================================== + // Page Breaks + addPageBreak(lft, rght) { + const ws = this._worksheet; + const left = Math.max(0, lft - 1) || 0; + const right = Math.max(0, rght - 1) || 16838; + const pb = { + id: this._number, + max: right, + man: 1 + }; + if (left) pb.min = left; + ws.rowBreaks.push(pb); + } + // return a sparse array of cell values + get values() { + const values = []; + this._cells.forEach((cell) => { + if (cell && cell.type !== Enums.ValueType.Null) { + values[cell.col] = cell.value; + } + }); + return values; + } + // set the values by contiguous or sparse array, or by key'd object literal + set values(value) { + this._cells = []; + if (!value) { + } else if (value instanceof Array) { + let offset = 0; + if (value.hasOwnProperty("0")) { + offset = 1; + } + value.forEach((item, index) => { + if (item !== void 0) { + this.getCellEx({ + address: colCache.encodeAddress(this._number, index + offset), + row: this._number, + col: index + offset + }).value = item; + } + }); + } else { + this._worksheet.eachColumnKey((column, key) => { + if (value[key] !== void 0) { + this.getCellEx({ + address: colCache.encodeAddress(this._number, column.number), + row: this._number, + col: column.number + }).value = value[key]; + } + }); + } + } + // returns true if the row includes at least one cell with a value + get hasValues() { + return _2.some(this._cells, (cell) => cell && cell.type !== Enums.ValueType.Null); + } + get cellCount() { + return this._cells.length; + } + get actualCellCount() { + let count = 0; + this.eachCell(() => { + count++; + }); + return count; + } + // get the min and max column number for the non-null cells in this row or null + get dimensions() { + let min = 0; + let max = 0; + this._cells.forEach((cell) => { + if (cell && cell.type !== Enums.ValueType.Null) { + if (!min || min > cell.col) { + min = cell.col; + } + if (max < cell.col) { + max = cell.col; + } + } + }); + return min > 0 ? { + min, + max + } : null; + } + // ========================================================================= + // styles + _applyStyle(name, value) { + this.style[name] = value; + this._cells.forEach((cell) => { + if (cell) { + cell[name] = value; + } + }); + return value; + } + get numFmt() { + return this.style.numFmt; + } + set numFmt(value) { + this._applyStyle("numFmt", value); + } + get font() { + return this.style.font; + } + set font(value) { + this._applyStyle("font", value); + } + get alignment() { + return this.style.alignment; + } + set alignment(value) { + this._applyStyle("alignment", value); + } + get protection() { + return this.style.protection; + } + set protection(value) { + this._applyStyle("protection", value); + } + get border() { + return this.style.border; + } + set border(value) { + this._applyStyle("border", value); + } + get fill() { + return this.style.fill; + } + set fill(value) { + this._applyStyle("fill", value); + } + get hidden() { + return !!this._hidden; + } + set hidden(value) { + this._hidden = value; + } + get outlineLevel() { + return this._outlineLevel || 0; + } + set outlineLevel(value) { + this._outlineLevel = value; + } + get collapsed() { + return !!(this._outlineLevel && this._outlineLevel >= this._worksheet.properties.outlineLevelRow); + } + // ========================================================================= + get model() { + const cells = []; + let min = 0; + let max = 0; + this._cells.forEach((cell) => { + if (cell) { + const cellModel = cell.model; + if (cellModel) { + if (!min || min > cell.col) { + min = cell.col; + } + if (max < cell.col) { + max = cell.col; + } + cells.push(cellModel); + } + } + }); + return this.height || cells.length ? { + cells, + number: this.number, + min, + max, + height: this.height, + style: this.style, + hidden: this.hidden, + outlineLevel: this.outlineLevel, + collapsed: this.collapsed + } : null; + } + set model(value) { + if (value.number !== this._number) { + throw new Error("Invalid row number in model"); + } + this._cells = []; + let previousAddress; + value.cells.forEach((cellModel) => { + switch (cellModel.type) { + case Cell.Types.Merge: + break; + default: { + let address; + if (cellModel.address) { + address = colCache.decodeAddress(cellModel.address); + } else if (previousAddress) { + const { row } = previousAddress; + const col = previousAddress.col + 1; + address = { + row, + col, + address: colCache.encodeAddress(row, col), + $col$row: `$${colCache.n2l(col)}$${row}` + }; + } + previousAddress = address; + const cell = this.getCellEx(address); + cell.model = cellModel; + break; + } + } + }); + if (value.height) { + this.height = value.height; + } else { + delete this.height; + } + this.hidden = value.hidden; + this.outlineLevel = value.outlineLevel || 0; + this.style = value.style && JSON.parse(JSON.stringify(value.style)) || {}; + } + }; + module2.exports = Row; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/column.js +var require_column = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/column.js"(exports2, module2) { + "use strict"; + var _2 = require_under_dash(); + var Enums = require_enums5(); + var colCache = require_col_cache(); + var DEFAULT_COLUMN_WIDTH = 9; + var Column = class _Column { + constructor(worksheet, number, defn) { + this._worksheet = worksheet; + this._number = number; + if (defn !== false) { + this.defn = defn; + } + } + get number() { + return this._number; + } + get worksheet() { + return this._worksheet; + } + get letter() { + return colCache.n2l(this._number); + } + get isCustomWidth() { + return this.width !== void 0 && this.width !== DEFAULT_COLUMN_WIDTH; + } + get defn() { + return { + header: this._header, + key: this.key, + width: this.width, + style: this.style, + hidden: this.hidden, + outlineLevel: this.outlineLevel + }; + } + set defn(value) { + if (value) { + this.key = value.key; + this.width = value.width !== void 0 ? value.width : DEFAULT_COLUMN_WIDTH; + this.outlineLevel = value.outlineLevel; + if (value.style) { + this.style = value.style; + } else { + this.style = {}; + } + this.header = value.header; + this._hidden = !!value.hidden; + } else { + delete this._header; + delete this._key; + delete this.width; + this.style = {}; + this.outlineLevel = 0; + } + } + get headers() { + return this._header && this._header instanceof Array ? this._header : [this._header]; + } + get header() { + return this._header; + } + set header(value) { + if (value !== void 0) { + this._header = value; + this.headers.forEach((text, index) => { + this._worksheet.getCell(index + 1, this.number).value = text; + }); + } else { + this._header = void 0; + } + } + get key() { + return this._key; + } + set key(value) { + const column = this._key && this._worksheet.getColumnKey(this._key); + if (column === this) { + this._worksheet.deleteColumnKey(this._key); + } + this._key = value; + if (value) { + this._worksheet.setColumnKey(this._key, this); + } + } + get hidden() { + return !!this._hidden; + } + set hidden(value) { + this._hidden = value; + } + get outlineLevel() { + return this._outlineLevel || 0; + } + set outlineLevel(value) { + this._outlineLevel = value; + } + get collapsed() { + return !!(this._outlineLevel && this._outlineLevel >= this._worksheet.properties.outlineLevelCol); + } + toString() { + return JSON.stringify({ + key: this.key, + width: this.width, + headers: this.headers.length ? this.headers : void 0 + }); + } + equivalentTo(other) { + return this.width === other.width && this.hidden === other.hidden && this.outlineLevel === other.outlineLevel && _2.isEqual(this.style, other.style); + } + get isDefault() { + if (this.isCustomWidth) { + return false; + } + if (this.hidden) { + return false; + } + if (this.outlineLevel) { + return false; + } + const s = this.style; + if (s && (s.font || s.numFmt || s.alignment || s.border || s.fill || s.protection)) { + return false; + } + return true; + } + get headerCount() { + return this.headers.length; + } + eachCell(options, iteratee) { + const colNumber = this.number; + if (!iteratee) { + iteratee = options; + options = null; + } + this._worksheet.eachRow(options, (row, rowNumber) => { + iteratee(row.getCell(colNumber), rowNumber); + }); + } + get values() { + const v = []; + this.eachCell((cell, rowNumber) => { + if (cell && cell.type !== Enums.ValueType.Null) { + v[rowNumber] = cell.value; + } + }); + return v; + } + set values(v) { + if (!v) { + return; + } + const colNumber = this.number; + let offset = 0; + if (v.hasOwnProperty("0")) { + offset = 1; + } + v.forEach((value, index) => { + this._worksheet.getCell(index + offset, colNumber).value = value; + }); + } + // ========================================================================= + // styles + _applyStyle(name, value) { + this.style[name] = value; + this.eachCell((cell) => { + cell[name] = value; + }); + return value; + } + get numFmt() { + return this.style.numFmt; + } + set numFmt(value) { + this._applyStyle("numFmt", value); + } + get font() { + return this.style.font; + } + set font(value) { + this._applyStyle("font", value); + } + get alignment() { + return this.style.alignment; + } + set alignment(value) { + this._applyStyle("alignment", value); + } + get protection() { + return this.style.protection; + } + set protection(value) { + this._applyStyle("protection", value); + } + get border() { + return this.style.border; + } + set border(value) { + this._applyStyle("border", value); + } + get fill() { + return this.style.fill; + } + set fill(value) { + this._applyStyle("fill", value); + } + // ============================================================================= + // static functions + static toModel(columns) { + const cols = []; + let col = null; + if (columns) { + columns.forEach((column, index) => { + if (column.isDefault) { + if (col) { + col = null; + } + } else if (!col || !column.equivalentTo(col)) { + col = { + min: index + 1, + max: index + 1, + width: column.width !== void 0 ? column.width : DEFAULT_COLUMN_WIDTH, + style: column.style, + isCustomWidth: column.isCustomWidth, + hidden: column.hidden, + outlineLevel: column.outlineLevel, + collapsed: column.collapsed + }; + cols.push(col); + } else { + col.max = index + 1; + } + }); + } + return cols.length ? cols : void 0; + } + static fromModel(worksheet, cols) { + cols = cols || []; + const columns = []; + let count = 1; + let index = 0; + cols = cols.sort(function(pre, next) { + return pre.min - next.min; + }); + while (index < cols.length) { + const col = cols[index++]; + while (count < col.min) { + columns.push(new _Column(worksheet, count++)); + } + while (count <= col.max) { + columns.push(new _Column(worksheet, count++, col)); + } + } + return columns.length ? columns : null; + } + }; + module2.exports = Column; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/anchor.js +var require_anchor = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/anchor.js"(exports2, module2) { + "use strict"; + var colCache = require_col_cache(); + var Anchor = class _Anchor { + constructor(worksheet, address, offset = 0) { + this.worksheet = worksheet; + if (!address) { + this.nativeCol = 0; + this.nativeColOff = 0; + this.nativeRow = 0; + this.nativeRowOff = 0; + } else if (typeof address === "string") { + const decoded = colCache.decodeAddress(address); + this.nativeCol = decoded.col + offset; + this.nativeColOff = 0; + this.nativeRow = decoded.row + offset; + this.nativeRowOff = 0; + } else if (address.nativeCol !== void 0) { + this.nativeCol = address.nativeCol || 0; + this.nativeColOff = address.nativeColOff || 0; + this.nativeRow = address.nativeRow || 0; + this.nativeRowOff = address.nativeRowOff || 0; + } else if (address.col !== void 0) { + this.col = address.col + offset; + this.row = address.row + offset; + } else { + this.nativeCol = 0; + this.nativeColOff = 0; + this.nativeRow = 0; + this.nativeRowOff = 0; + } + } + static asInstance(model) { + return model instanceof _Anchor || model == null ? model : new _Anchor(model); + } + get col() { + return this.nativeCol + Math.min(this.colWidth - 1, this.nativeColOff) / this.colWidth; + } + set col(v) { + this.nativeCol = Math.floor(v); + this.nativeColOff = Math.floor((v - this.nativeCol) * this.colWidth); + } + get row() { + return this.nativeRow + Math.min(this.rowHeight - 1, this.nativeRowOff) / this.rowHeight; + } + set row(v) { + this.nativeRow = Math.floor(v); + this.nativeRowOff = Math.floor((v - this.nativeRow) * this.rowHeight); + } + get colWidth() { + return this.worksheet && this.worksheet.getColumn(this.nativeCol + 1) && this.worksheet.getColumn(this.nativeCol + 1).isCustomWidth ? Math.floor(this.worksheet.getColumn(this.nativeCol + 1).width * 1e4) : 64e4; + } + get rowHeight() { + return this.worksheet && this.worksheet.getRow(this.nativeRow + 1) && this.worksheet.getRow(this.nativeRow + 1).height ? Math.floor(this.worksheet.getRow(this.nativeRow + 1).height * 1e4) : 18e4; + } + get model() { + return { + nativeCol: this.nativeCol, + nativeColOff: this.nativeColOff, + nativeRow: this.nativeRow, + nativeRowOff: this.nativeRowOff + }; + } + set model(value) { + this.nativeCol = value.nativeCol; + this.nativeColOff = value.nativeColOff; + this.nativeRow = value.nativeRow; + this.nativeRowOff = value.nativeRowOff; + } + }; + module2.exports = Anchor; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/image.js +var require_image = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/image.js"(exports2, module2) { + var colCache = require_col_cache(); + var Anchor = require_anchor(); + var Image = class { + constructor(worksheet, model) { + this.worksheet = worksheet; + this.model = model; + } + get model() { + switch (this.type) { + case "background": + return { + type: this.type, + imageId: this.imageId + }; + case "image": + return { + type: this.type, + imageId: this.imageId, + hyperlinks: this.range.hyperlinks, + range: { + tl: this.range.tl.model, + br: this.range.br && this.range.br.model, + ext: this.range.ext, + editAs: this.range.editAs + } + }; + default: + throw new Error("Invalid Image Type"); + } + } + set model({ type, imageId, range, hyperlinks }) { + this.type = type; + this.imageId = imageId; + if (type === "image") { + if (typeof range === "string") { + const decoded = colCache.decode(range); + this.range = { + tl: new Anchor(this.worksheet, { col: decoded.left, row: decoded.top }, -1), + br: new Anchor(this.worksheet, { col: decoded.right, row: decoded.bottom }, 0), + editAs: "oneCell" + }; + } else { + this.range = { + tl: new Anchor(this.worksheet, range.tl, 0), + br: range.br && new Anchor(this.worksheet, range.br, 0), + ext: range.ext, + editAs: range.editAs, + hyperlinks: hyperlinks || range.hyperlinks + }; + } + } + } + }; + module2.exports = Image; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/table.js +var require_table = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/table.js"(exports2, module2) { + var colCache = require_col_cache(); + var Column = class { + // wrapper around column model, allowing access and manipulation + constructor(table, column, index) { + this.table = table; + this.column = column; + this.index = index; + } + _set(name, value) { + this.table.cacheState(); + this.column[name] = value; + } + /* eslint-disable lines-between-class-members */ + get name() { + return this.column.name; + } + set name(value) { + this._set("name", value); + } + get filterButton() { + return this.column.filterButton; + } + set filterButton(value) { + this.column.filterButton = value; + } + get style() { + return this.column.style; + } + set style(value) { + this.column.style = value; + } + get totalsRowLabel() { + return this.column.totalsRowLabel; + } + set totalsRowLabel(value) { + this._set("totalsRowLabel", value); + } + get totalsRowFunction() { + return this.column.totalsRowFunction; + } + set totalsRowFunction(value) { + this._set("totalsRowFunction", value); + } + get totalsRowResult() { + return this.column.totalsRowResult; + } + set totalsRowResult(value) { + this._set("totalsRowResult", value); + } + get totalsRowFormula() { + return this.column.totalsRowFormula; + } + set totalsRowFormula(value) { + this._set("totalsRowFormula", value); + } + /* eslint-enable lines-between-class-members */ + }; + var Table = class { + constructor(worksheet, table) { + this.worksheet = worksheet; + if (table) { + this.table = table; + this.validate(); + this.store(); + } + } + getFormula(column) { + switch (column.totalsRowFunction) { + case "none": + return null; + case "average": + return `SUBTOTAL(101,${this.table.name}[${column.name}])`; + case "countNums": + return `SUBTOTAL(102,${this.table.name}[${column.name}])`; + case "count": + return `SUBTOTAL(103,${this.table.name}[${column.name}])`; + case "max": + return `SUBTOTAL(104,${this.table.name}[${column.name}])`; + case "min": + return `SUBTOTAL(105,${this.table.name}[${column.name}])`; + case "stdDev": + return `SUBTOTAL(106,${this.table.name}[${column.name}])`; + case "var": + return `SUBTOTAL(107,${this.table.name}[${column.name}])`; + case "sum": + return `SUBTOTAL(109,${this.table.name}[${column.name}])`; + case "custom": + return column.totalsRowFormula; + default: + throw new Error(`Invalid Totals Row Function: ${column.totalsRowFunction}`); + } + } + get width() { + return this.table.columns.length; + } + get height() { + return this.table.rows.length; + } + get filterHeight() { + return this.height + (this.table.headerRow ? 1 : 0); + } + get tableHeight() { + return this.filterHeight + (this.table.totalsRow ? 1 : 0); + } + validate() { + const { table } = this; + const assign = (o, name, dflt) => { + if (o[name] === void 0) { + o[name] = dflt; + } + }; + assign(table, "headerRow", true); + assign(table, "totalsRow", false); + assign(table, "style", {}); + assign(table.style, "theme", "TableStyleMedium2"); + assign(table.style, "showFirstColumn", false); + assign(table.style, "showLastColumn", false); + assign(table.style, "showRowStripes", false); + assign(table.style, "showColumnStripes", false); + const assert = (test, message) => { + if (!test) { + throw new Error(message); + } + }; + assert(table.ref, "Table must have ref"); + assert(table.columns, "Table must have column definitions"); + assert(table.rows, "Table must have row definitions"); + table.tl = colCache.decodeAddress(table.ref); + const { row, col } = table.tl; + assert(row > 0, "Table must be on valid row"); + assert(col > 0, "Table must be on valid col"); + const { width, filterHeight, tableHeight } = this; + table.autoFilterRef = colCache.encode(row, col, row + filterHeight - 1, col + width - 1); + table.tableRef = colCache.encode(row, col, row + tableHeight - 1, col + width - 1); + table.columns.forEach((column, i) => { + assert(column.name, `Column ${i} must have a name`); + if (i === 0) { + assign(column, "totalsRowLabel", "Total"); + } else { + assign(column, "totalsRowFunction", "none"); + column.totalsRowFormula = this.getFormula(column); + } + }); + } + store() { + const assignStyle = (cell, style) => { + if (style) { + Object.keys(style).forEach((key) => { + cell[key] = style[key]; + }); + } + }; + const { worksheet, table } = this; + const { row, col } = table.tl; + let count = 0; + if (table.headerRow) { + const r = worksheet.getRow(row + count++); + table.columns.forEach((column, j) => { + const { style, name } = column; + const cell = r.getCell(col + j); + cell.value = name; + assignStyle(cell, style); + }); + } + table.rows.forEach((data) => { + const r = worksheet.getRow(row + count++); + data.forEach((value, j) => { + const cell = r.getCell(col + j); + cell.value = value; + assignStyle(cell, table.columns[j].style); + }); + }); + if (table.totalsRow) { + const r = worksheet.getRow(row + count++); + table.columns.forEach((column, j) => { + const cell = r.getCell(col + j); + if (j === 0) { + cell.value = column.totalsRowLabel; + } else { + const formula = this.getFormula(column); + if (formula) { + cell.value = { + formula: column.totalsRowFormula, + result: column.totalsRowResult + }; + } else { + cell.value = null; + } + } + assignStyle(cell, column.style); + }); + } + } + load(worksheet) { + const { table } = this; + const { row, col } = table.tl; + let count = 0; + if (table.headerRow) { + const r = worksheet.getRow(row + count++); + table.columns.forEach((column, j) => { + const cell = r.getCell(col + j); + cell.value = column.name; + }); + } + table.rows.forEach((data) => { + const r = worksheet.getRow(row + count++); + data.forEach((value, j) => { + const cell = r.getCell(col + j); + cell.value = value; + }); + }); + if (table.totalsRow) { + const r = worksheet.getRow(row + count++); + table.columns.forEach((column, j) => { + const cell = r.getCell(col + j); + if (j === 0) { + cell.value = column.totalsRowLabel; + } else { + const formula = this.getFormula(column); + if (formula) { + cell.value = { + formula: column.totalsRowFormula, + result: column.totalsRowResult + }; + } + } + }); + } + } + get model() { + return this.table; + } + set model(value) { + this.table = value; + } + // ================================================================ + // TODO: Mutating methods + cacheState() { + if (!this._cache) { + this._cache = { + ref: this.ref, + width: this.width, + tableHeight: this.tableHeight + }; + } + } + commit() { + if (!this._cache) { + return; + } + this.validate(); + const ref = colCache.decodeAddress(this._cache.ref); + if (this.ref !== this._cache.ref) { + for (let i = 0; i < this._cache.tableHeight; i++) { + const row = this.worksheet.getRow(ref.row + i); + for (let j = 0; j < this._cache.width; j++) { + const cell = row.getCell(ref.col + j); + cell.value = null; + } + } + } else { + for (let i = this.tableHeight; i < this._cache.tableHeight; i++) { + const row = this.worksheet.getRow(ref.row + i); + for (let j = 0; j < this._cache.width; j++) { + const cell = row.getCell(ref.col + j); + cell.value = null; + } + } + for (let i = 0; i < this.tableHeight; i++) { + const row = this.worksheet.getRow(ref.row + i); + for (let j = this.width; j < this._cache.width; j++) { + const cell = row.getCell(ref.col + j); + cell.value = null; + } + } + } + this.store(); + } + addRow(values, rowNumber) { + this.cacheState(); + if (rowNumber === void 0) { + this.table.rows.push(values); + } else { + this.table.rows.splice(rowNumber, 0, values); + } + } + removeRows(rowIndex, count = 1) { + this.cacheState(); + this.table.rows.splice(rowIndex, count); + } + getColumn(colIndex) { + const column = this.table.columns[colIndex]; + return new Column(this, column, colIndex); + } + addColumn(column, values, colIndex) { + this.cacheState(); + if (colIndex === void 0) { + this.table.columns.push(column); + this.table.rows.forEach((row, i) => { + row.push(values[i]); + }); + } else { + this.table.columns.splice(colIndex, 0, column); + this.table.rows.forEach((row, i) => { + row.splice(colIndex, 0, values[i]); + }); + } + } + removeColumns(colIndex, count = 1) { + this.cacheState(); + this.table.columns.splice(colIndex, count); + this.table.rows.forEach((row) => { + row.splice(colIndex, count); + }); + } + _assign(target, prop, value) { + this.cacheState(); + target[prop] = value; + } + /* eslint-disable lines-between-class-members */ + get ref() { + return this.table.ref; + } + set ref(value) { + this._assign(this.table, "ref", value); + } + get name() { + return this.table.name; + } + set name(value) { + this.table.name = value; + } + get displayName() { + return this.table.displyName || this.table.name; + } + set displayNamename(value) { + this.table.displayName = value; + } + get headerRow() { + return this.table.headerRow; + } + set headerRow(value) { + this._assign(this.table, "headerRow", value); + } + get totalsRow() { + return this.table.totalsRow; + } + set totalsRow(value) { + this._assign(this.table, "totalsRow", value); + } + get theme() { + return this.table.style.name; + } + set theme(value) { + this.table.style.name = value; + } + get showFirstColumn() { + return this.table.style.showFirstColumn; + } + set showFirstColumn(value) { + this.table.style.showFirstColumn = value; + } + get showLastColumn() { + return this.table.style.showLastColumn; + } + set showLastColumn(value) { + this.table.style.showLastColumn = value; + } + get showRowStripes() { + return this.table.style.showRowStripes; + } + set showRowStripes(value) { + this.table.style.showRowStripes = value; + } + get showColumnStripes() { + return this.table.style.showColumnStripes; + } + set showColumnStripes(value) { + this.table.style.showColumnStripes = value; + } + /* eslint-enable lines-between-class-members */ + }; + module2.exports = Table; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/data-validations.js +var require_data_validations = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/data-validations.js"(exports2, module2) { + var DataValidations = class { + constructor(model) { + this.model = model || {}; + } + add(address, validation) { + return this.model[address] = validation; + } + find(address) { + return this.model[address]; + } + remove(address) { + this.model[address] = void 0; + } + }; + module2.exports = DataValidations; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/encryptor.js +var require_encryptor = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/encryptor.js"(exports2, module2) { + "use strict"; + var crypto5 = require("crypto"); + var Encryptor = { + /** + * Calculate a hash of the concatenated buffers with the given algorithm. + * @param {string} algorithm - The hash algorithm. + * @returns {Buffer} The hash + */ + hash(algorithm, ...buffers) { + const hash = crypto5.createHash(algorithm); + hash.update(Buffer.concat(buffers)); + return hash.digest(); + }, + /** + * Convert a password into an encryption key + * @param {string} password - The password + * @param {string} hashAlgorithm - The hash algoritm + * @param {string} saltValue - The salt value + * @param {number} spinCount - The spin count + * @param {number} keyBits - The length of the key in bits + * @param {Buffer} blockKey - The block key + * @returns {Buffer} The encryption key + */ + convertPasswordToHash(password, hashAlgorithm, saltValue, spinCount) { + hashAlgorithm = hashAlgorithm.toLowerCase(); + const hashes = crypto5.getHashes(); + if (hashes.indexOf(hashAlgorithm) < 0) { + throw new Error(`Hash algorithm '${hashAlgorithm}' not supported!`); + } + const passwordBuffer = Buffer.from(password, "utf16le"); + let key = this.hash(hashAlgorithm, Buffer.from(saltValue, "base64"), passwordBuffer); + for (let i = 0; i < spinCount; i++) { + const iterator = Buffer.alloc(4); + iterator.writeUInt32LE(i, 0); + key = this.hash(hashAlgorithm, key, iterator); + } + return key.toString("base64"); + }, + /** + * Generates cryptographically strong pseudo-random data. + * @param size The size argument is a number indicating the number of bytes to generate. + */ + randomBytes(size) { + return crypto5.randomBytes(size); + } + }; + module2.exports = Encryptor; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/copy-style.js +var require_copy_style = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/copy-style.js"(exports2) { + var oneDepthCopy = (obj2, nestKeys) => ({ + ...obj2, + ...nestKeys.reduce((memo, key) => { + if (obj2[key]) memo[key] = { ...obj2[key] }; + return memo; + }, {}) + }); + var setIfExists = (src, dst, key, nestKeys = []) => { + if (src[key]) dst[key] = oneDepthCopy(src[key], nestKeys); + }; + var isEmptyObj = (obj2) => Object.keys(obj2).length === 0; + var copyStyle = (style) => { + if (!style) return style; + if (isEmptyObj(style)) return {}; + const copied = { ...style }; + setIfExists(style, copied, "font", ["color"]); + setIfExists(style, copied, "alignment"); + setIfExists(style, copied, "protection"); + if (style.border) { + setIfExists(style, copied, "border"); + setIfExists(style.border, copied.border, "top", ["color"]); + setIfExists(style.border, copied.border, "left", ["color"]); + setIfExists(style.border, copied.border, "bottom", ["color"]); + setIfExists(style.border, copied.border, "right", ["color"]); + setIfExists(style.border, copied.border, "diagonal", ["color"]); + } + if (style.fill) { + setIfExists(style, copied, "fill", ["fgColor", "bgColor", "center"]); + if (style.fill.stops) { + copied.fill.stops = style.fill.stops.map((s) => oneDepthCopy(s, ["color"])); + } + } + return copied; + }; + exports2.copyStyle = copyStyle; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/worksheet.js +var require_worksheet = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/worksheet.js"(exports2, module2) { + var _2 = require_under_dash(); + var colCache = require_col_cache(); + var Range = require_range4(); + var Row = require_row(); + var Column = require_column(); + var Enums = require_enums5(); + var Image = require_image(); + var Table = require_table(); + var DataValidations = require_data_validations(); + var Encryptor = require_encryptor(); + var { copyStyle } = require_copy_style(); + var Worksheet = class { + constructor(options) { + options = options || {}; + this._workbook = options.workbook; + this.id = options.id; + this.orderNo = options.orderNo; + this.name = options.name; + this.state = options.state || "visible"; + this._rows = []; + this._columns = null; + this._keys = {}; + this._merges = {}; + this.rowBreaks = []; + this.properties = Object.assign( + {}, + { + defaultRowHeight: 15, + dyDescent: 55, + outlineLevelCol: 0, + outlineLevelRow: 0 + }, + options.properties + ); + this.pageSetup = Object.assign( + {}, + { + margins: { left: 0.7, right: 0.7, top: 0.75, bottom: 0.75, header: 0.3, footer: 0.3 }, + orientation: "portrait", + horizontalDpi: 4294967295, + verticalDpi: 4294967295, + fitToPage: !!(options.pageSetup && (options.pageSetup.fitToWidth || options.pageSetup.fitToHeight) && !options.pageSetup.scale), + pageOrder: "downThenOver", + blackAndWhite: false, + draft: false, + cellComments: "None", + errors: "displayed", + scale: 100, + fitToWidth: 1, + fitToHeight: 1, + paperSize: void 0, + showRowColHeaders: false, + showGridLines: false, + firstPageNumber: void 0, + horizontalCentered: false, + verticalCentered: false, + rowBreaks: null, + colBreaks: null + }, + options.pageSetup + ); + this.headerFooter = Object.assign( + {}, + { + differentFirst: false, + differentOddEven: false, + oddHeader: null, + oddFooter: null, + evenHeader: null, + evenFooter: null, + firstHeader: null, + firstFooter: null + }, + options.headerFooter + ); + this.dataValidations = new DataValidations(); + this.views = options.views || []; + this.autoFilter = options.autoFilter || null; + this._media = []; + this.sheetProtection = null; + this.tables = {}; + this.conditionalFormattings = []; + } + get name() { + return this._name; + } + set name(name) { + if (name === void 0) { + name = `sheet${this.id}`; + } + if (this._name === name) return; + if (typeof name !== "string") { + throw new Error("The name has to be a string."); + } + if (name === "") { + throw new Error("The name can't be empty."); + } + if (name === "History") { + throw new Error('The name "History" is protected. Please use a different name.'); + } + if (/[*?:/\\[\]]/.test(name)) { + throw new Error(`Worksheet name ${name} cannot include any of the following characters: * ? : \\ / [ ]`); + } + if (/(^')|('$)/.test(name)) { + throw new Error(`The first or last character of worksheet name cannot be a single quotation mark: ${name}`); + } + if (name && name.length > 31) { + console.warn(`Worksheet name ${name} exceeds 31 chars. This will be truncated`); + name = name.substring(0, 31); + } + if (this._workbook._worksheets.find((ws) => ws && ws.name.toLowerCase() === name.toLowerCase())) { + throw new Error(`Worksheet name already exists: ${name}`); + } + this._name = name; + } + get workbook() { + return this._workbook; + } + // when you're done with this worksheet, call this to remove from workbook + destroy() { + this._workbook.removeWorksheetEx(this); + } + // Get the bounding range of the cells in this worksheet + get dimensions() { + const dimensions = new Range(); + this._rows.forEach((row) => { + if (row) { + const rowDims = row.dimensions; + if (rowDims) { + dimensions.expand(row.number, rowDims.min, row.number, rowDims.max); + } + } + }); + return dimensions; + } + // ========================================================================= + // Columns + // get the current columns array. + get columns() { + return this._columns; + } + // set the columns from an array of column definitions. + // Note: any headers defined will overwrite existing values. + set columns(value) { + this._headerRowCount = value.reduce((pv, cv) => { + const headerCount = cv.header && 1 || cv.headers && cv.headers.length || 0; + return Math.max(pv, headerCount); + }, 0); + let count = 1; + const columns = this._columns = []; + value.forEach((defn) => { + const column = new Column(this, count++, false); + columns.push(column); + column.defn = defn; + }); + } + getColumnKey(key) { + return this._keys[key]; + } + setColumnKey(key, value) { + this._keys[key] = value; + } + deleteColumnKey(key) { + delete this._keys[key]; + } + eachColumnKey(f) { + _2.each(this._keys, f); + } + // get a single column by col number. If it doesn't exist, create it and any gaps before it + getColumn(c) { + if (typeof c === "string") { + const col = this._keys[c]; + if (col) return col; + c = colCache.l2n(c); + } + if (!this._columns) { + this._columns = []; + } + if (c > this._columns.length) { + let n = this._columns.length + 1; + while (n <= c) { + this._columns.push(new Column(this, n++)); + } + } + return this._columns[c - 1]; + } + spliceColumns(start, count, ...inserts) { + const rows = this._rows; + const nRows = rows.length; + if (inserts.length > 0) { + for (let i = 0; i < nRows; i++) { + const rowArguments = [start, count]; + inserts.forEach((insert) => { + rowArguments.push(insert[i] || null); + }); + const row = this.getRow(i + 1); + row.splice.apply(row, rowArguments); + } + } else { + this._rows.forEach((r) => { + if (r) { + r.splice(start, count); + } + }); + } + const nExpand = inserts.length - count; + const nKeep = start + count; + const nEnd = this._columns.length; + if (nExpand < 0) { + for (let i = start + inserts.length; i <= nEnd; i++) { + this.getColumn(i).defn = this.getColumn(i - nExpand).defn; + } + } else if (nExpand > 0) { + for (let i = nEnd; i >= nKeep; i--) { + this.getColumn(i + nExpand).defn = this.getColumn(i).defn; + } + } + for (let i = start; i < start + inserts.length; i++) { + this.getColumn(i).defn = null; + } + this.workbook.definedNames.spliceColumns(this.name, start, count, inserts.length); + } + get lastColumn() { + return this.getColumn(this.columnCount); + } + get columnCount() { + let maxCount = 0; + this.eachRow((row) => { + maxCount = Math.max(maxCount, row.cellCount); + }); + return maxCount; + } + get actualColumnCount() { + const counts = []; + let count = 0; + this.eachRow((row) => { + row.eachCell(({ col }) => { + if (!counts[col]) { + counts[col] = true; + count++; + } + }); + }); + return count; + } + // ========================================================================= + // Rows + _commitRow() { + } + get _lastRowNumber() { + const rows = this._rows; + let n = rows.length; + while (n > 0 && rows[n - 1] === void 0) { + n--; + } + return n; + } + get _nextRow() { + return this._lastRowNumber + 1; + } + get lastRow() { + if (this._rows.length) { + return this._rows[this._rows.length - 1]; + } + return void 0; + } + // find a row (if exists) by row number + findRow(r) { + return this._rows[r - 1]; + } + // find multiple rows (if exists) by row number + findRows(start, length) { + return this._rows.slice(start - 1, start - 1 + length); + } + get rowCount() { + return this._lastRowNumber; + } + get actualRowCount() { + let count = 0; + this.eachRow(() => { + count++; + }); + return count; + } + // get a row by row number. + getRow(r) { + let row = this._rows[r - 1]; + if (!row) { + row = this._rows[r - 1] = new Row(this, r); + } + return row; + } + // get multiple rows by row number. + getRows(start, length) { + if (length < 1) return void 0; + const rows = []; + for (let i = start; i < start + length; i++) { + rows.push(this.getRow(i)); + } + return rows; + } + addRow(value, style = "n") { + const rowNo = this._nextRow; + const row = this.getRow(rowNo); + row.values = value; + this._setStyleOption(rowNo, style[0] === "i" ? style : "n"); + return row; + } + addRows(value, style = "n") { + const rows = []; + value.forEach((row) => { + rows.push(this.addRow(row, style)); + }); + return rows; + } + insertRow(pos, value, style = "n") { + this.spliceRows(pos, 0, value); + this._setStyleOption(pos, style); + return this.getRow(pos); + } + insertRows(pos, values, style = "n") { + this.spliceRows(pos, 0, ...values); + if (style !== "n") { + for (let i = 0; i < values.length; i++) { + if (style[0] === "o" && this.findRow(values.length + pos + i) !== void 0) { + this._copyStyle(values.length + pos + i, pos + i, style[1] === "+"); + } else if (style[0] === "i" && this.findRow(pos - 1) !== void 0) { + this._copyStyle(pos - 1, pos + i, style[1] === "+"); + } + } + } + return this.getRows(pos, values.length); + } + // set row at position to same style as of either pervious row (option 'i') or next row (option 'o') + _setStyleOption(pos, style = "n") { + if (style[0] === "o" && this.findRow(pos + 1) !== void 0) { + this._copyStyle(pos + 1, pos, style[1] === "+"); + } else if (style[0] === "i" && this.findRow(pos - 1) !== void 0) { + this._copyStyle(pos - 1, pos, style[1] === "+"); + } + } + _copyStyle(src, dest, styleEmpty = false) { + const rSrc = this.getRow(src); + const rDst = this.getRow(dest); + rDst.style = copyStyle(rSrc.style); + rSrc.eachCell({ includeEmpty: styleEmpty }, (cell, colNumber) => { + rDst.getCell(colNumber).style = copyStyle(cell.style); + }); + rDst.height = rSrc.height; + } + duplicateRow(rowNum, count, insert = false) { + const rSrc = this._rows[rowNum - 1]; + const inserts = new Array(count).fill(rSrc.values); + this.spliceRows(rowNum + 1, insert ? 0 : count, ...inserts); + for (let i = 0; i < count; i++) { + const rDst = this._rows[rowNum + i]; + rDst.style = rSrc.style; + rDst.height = rSrc.height; + rSrc.eachCell({ includeEmpty: true }, (cell, colNumber) => { + rDst.getCell(colNumber).style = cell.style; + }); + } + } + spliceRows(start, count, ...inserts) { + const nKeep = start + count; + const nInserts = inserts.length; + const nExpand = nInserts - count; + const nEnd = this._rows.length; + let i; + let rSrc; + if (nExpand < 0) { + if (start === nEnd) { + this._rows[nEnd - 1] = void 0; + } + for (i = nKeep; i <= nEnd; i++) { + rSrc = this._rows[i - 1]; + if (rSrc) { + const rDst = this.getRow(i + nExpand); + rDst.values = rSrc.values; + rDst.style = rSrc.style; + rDst.height = rSrc.height; + rSrc.eachCell({ includeEmpty: true }, (cell, colNumber) => { + rDst.getCell(colNumber).style = cell.style; + }); + this._rows[i - 1] = void 0; + } else { + this._rows[i + nExpand - 1] = void 0; + } + } + } else if (nExpand > 0) { + for (i = nEnd; i >= nKeep; i--) { + rSrc = this._rows[i - 1]; + if (rSrc) { + const rDst = this.getRow(i + nExpand); + rDst.values = rSrc.values; + rDst.style = rSrc.style; + rDst.height = rSrc.height; + rSrc.eachCell({ includeEmpty: true }, (cell, colNumber) => { + rDst.getCell(colNumber).style = cell.style; + if (cell._value.constructor.name === "MergeValue") { + const cellToBeMerged = this.getRow(cell._row._number + nInserts).getCell(colNumber); + const prevMaster = cell._value._master; + const newMaster = this.getRow(prevMaster._row._number + nInserts).getCell(prevMaster._column._number); + cellToBeMerged.merge(newMaster); + } + }); + } else { + this._rows[i + nExpand - 1] = void 0; + } + } + } + for (i = 0; i < nInserts; i++) { + const rDst = this.getRow(start + i); + rDst.style = {}; + rDst.values = inserts[i]; + } + this.workbook.definedNames.spliceRows(this.name, start, count, nInserts); + } + // iterate over every row in the worksheet, including maybe empty rows + eachRow(options, iteratee) { + if (!iteratee) { + iteratee = options; + options = void 0; + } + if (options && options.includeEmpty) { + const n = this._rows.length; + for (let i = 1; i <= n; i++) { + iteratee(this.getRow(i), i); + } + } else { + this._rows.forEach((row) => { + if (row && row.hasValues) { + iteratee(row, row.number); + } + }); + } + } + // return all rows as sparse array + getSheetValues() { + const rows = []; + this._rows.forEach((row) => { + if (row) { + rows[row.number] = row.values; + } + }); + return rows; + } + // ========================================================================= + // Cells + // returns the cell at [r,c] or address given by r. If not found, return undefined + findCell(r, c) { + const address = colCache.getAddress(r, c); + const row = this._rows[address.row - 1]; + return row ? row.findCell(address.col) : void 0; + } + // return the cell at [r,c] or address given by r. If not found, create a new one. + getCell(r, c) { + const address = colCache.getAddress(r, c); + const row = this.getRow(address.row); + return row.getCellEx(address); + } + // ========================================================================= + // Merge + // convert the range defined by ['tl:br'], [tl,br] or [t,l,b,r] into a single 'merged' cell + mergeCells(...cells) { + const dimensions = new Range(cells); + this._mergeCellsInternal(dimensions); + } + mergeCellsWithoutStyle(...cells) { + const dimensions = new Range(cells); + this._mergeCellsInternal(dimensions, true); + } + _mergeCellsInternal(dimensions, ignoreStyle) { + _2.each(this._merges, (merge) => { + if (merge.intersects(dimensions)) { + throw new Error("Cannot merge already merged cells"); + } + }); + const master = this.getCell(dimensions.top, dimensions.left); + for (let i = dimensions.top; i <= dimensions.bottom; i++) { + for (let j = dimensions.left; j <= dimensions.right; j++) { + if (i > dimensions.top || j > dimensions.left) { + this.getCell(i, j).merge(master, ignoreStyle); + } + } + } + this._merges[master.address] = dimensions; + } + _unMergeMaster(master) { + const merge = this._merges[master.address]; + if (merge) { + for (let i = merge.top; i <= merge.bottom; i++) { + for (let j = merge.left; j <= merge.right; j++) { + this.getCell(i, j).unmerge(); + } + } + delete this._merges[master.address]; + } + } + get hasMerges() { + return _2.some(this._merges, Boolean); + } + // scan the range defined by ['tl:br'], [tl,br] or [t,l,b,r] and if any cell is part of a merge, + // un-merge the group. Note this function can affect multiple merges and merge-blocks are + // atomic - either they're all merged or all un-merged. + unMergeCells(...cells) { + const dimensions = new Range(cells); + for (let i = dimensions.top; i <= dimensions.bottom; i++) { + for (let j = dimensions.left; j <= dimensions.right; j++) { + const cell = this.findCell(i, j); + if (cell) { + if (cell.type === Enums.ValueType.Merge) { + this._unMergeMaster(cell.master); + } else if (this._merges[cell.address]) { + this._unMergeMaster(cell); + } + } + } + } + } + // =========================================================================== + // Shared/Array Formula + fillFormula(range, formula, results, shareType = "shared") { + const decoded = colCache.decode(range); + const { top, left, bottom, right } = decoded; + const width = right - left + 1; + const masterAddress = colCache.encodeAddress(top, left); + const isShared = shareType === "shared"; + let getResult; + if (typeof results === "function") { + getResult = results; + } else if (Array.isArray(results)) { + if (Array.isArray(results[0])) { + getResult = (row, col) => results[row - top][col - left]; + } else { + getResult = (row, col) => results[(row - top) * width + (col - left)]; + } + } else { + getResult = () => void 0; + } + let first = true; + for (let r = top; r <= bottom; r++) { + for (let c = left; c <= right; c++) { + if (first) { + this.getCell(r, c).value = { + shareType, + formula, + ref: range, + result: getResult(r, c) + }; + first = false; + } else { + this.getCell(r, c).value = isShared ? { + sharedFormula: masterAddress, + result: getResult(r, c) + } : getResult(r, c); + } + } + } + } + // ========================================================================= + // Images + addImage(imageId, range) { + const model = { + type: "image", + imageId, + range + }; + this._media.push(new Image(this, model)); + } + getImages() { + return this._media.filter((m) => m.type === "image"); + } + addBackgroundImage(imageId) { + const model = { + type: "background", + imageId + }; + this._media.push(new Image(this, model)); + } + getBackgroundImageId() { + const image = this._media.find((m) => m.type === "background"); + return image && image.imageId; + } + // ========================================================================= + // Worksheet Protection + protect(password, options) { + return new Promise((resolve) => { + this.sheetProtection = { + sheet: true + }; + if (options && "spinCount" in options) { + options.spinCount = Number.isFinite(options.spinCount) ? Math.round(Math.max(0, options.spinCount)) : 1e5; + } + if (password) { + this.sheetProtection.algorithmName = "SHA-512"; + this.sheetProtection.saltValue = Encryptor.randomBytes(16).toString("base64"); + this.sheetProtection.spinCount = options && "spinCount" in options ? options.spinCount : 1e5; + this.sheetProtection.hashValue = Encryptor.convertPasswordToHash( + password, + "SHA512", + this.sheetProtection.saltValue, + this.sheetProtection.spinCount + ); + } + if (options) { + this.sheetProtection = Object.assign(this.sheetProtection, options); + if (!password && "spinCount" in options) { + delete this.sheetProtection.spinCount; + } + } + resolve(); + }); + } + unprotect() { + this.sheetProtection = null; + } + // ========================================================================= + // Tables + addTable(model) { + const table = new Table(this, model); + this.tables[model.name] = table; + return table; + } + getTable(name) { + return this.tables[name]; + } + removeTable(name) { + delete this.tables[name]; + } + getTables() { + return Object.values(this.tables); + } + // =========================================================================== + // Conditional Formatting + addConditionalFormatting(cf) { + this.conditionalFormattings.push(cf); + } + removeConditionalFormatting(filter) { + if (typeof filter === "number") { + this.conditionalFormattings.splice(filter, 1); + } else if (filter instanceof Function) { + this.conditionalFormattings = this.conditionalFormattings.filter(filter); + } else { + this.conditionalFormattings = []; + } + } + // =========================================================================== + // Deprecated + get tabColor() { + console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"); + return this.properties.tabColor; + } + set tabColor(value) { + console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"); + this.properties.tabColor = value; + } + // =========================================================================== + // Model + get model() { + const model = { + id: this.id, + name: this.name, + dataValidations: this.dataValidations.model, + properties: this.properties, + state: this.state, + pageSetup: this.pageSetup, + headerFooter: this.headerFooter, + rowBreaks: this.rowBreaks, + views: this.views, + autoFilter: this.autoFilter, + media: this._media.map((medium) => medium.model), + sheetProtection: this.sheetProtection, + tables: Object.values(this.tables).map((table) => table.model), + conditionalFormattings: this.conditionalFormattings + }; + model.cols = Column.toModel(this.columns); + const rows = model.rows = []; + const dimensions = model.dimensions = new Range(); + this._rows.forEach((row) => { + const rowModel = row && row.model; + if (rowModel) { + dimensions.expand(rowModel.number, rowModel.min, rowModel.number, rowModel.max); + rows.push(rowModel); + } + }); + model.merges = []; + _2.each(this._merges, (merge) => { + model.merges.push(merge.range); + }); + return model; + } + _parseRows(model) { + this._rows = []; + model.rows.forEach((rowModel) => { + const row = new Row(this, rowModel.number); + this._rows[row.number - 1] = row; + row.model = rowModel; + }); + } + _parseMergeCells(model) { + _2.each(model.mergeCells, (merge) => { + this.mergeCellsWithoutStyle(merge); + }); + } + set model(value) { + this.name = value.name; + this._columns = Column.fromModel(this, value.cols); + this._parseRows(value); + this._parseMergeCells(value); + this.dataValidations = new DataValidations(value.dataValidations); + this.properties = value.properties; + this.pageSetup = value.pageSetup; + this.headerFooter = value.headerFooter; + this.views = value.views; + this.autoFilter = value.autoFilter; + this._media = value.media.map((medium) => new Image(this, medium)); + this.sheetProtection = value.sheetProtection; + this.tables = value.tables.reduce((tables, table) => { + const t = new Table(); + t.model = table; + tables[table.name] = t; + return tables; + }, {}); + this.conditionalFormattings = value.conditionalFormattings; + } + }; + module2.exports = Worksheet; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/cell-matrix.js +var require_cell_matrix = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/cell-matrix.js"(exports2, module2) { + var _2 = require_under_dash(); + var colCache = require_col_cache(); + var CellMatrix = class { + constructor(template) { + this.template = template; + this.sheets = {}; + } + addCell(addressStr) { + this.addCellEx(colCache.decodeEx(addressStr)); + } + getCell(addressStr) { + return this.findCellEx(colCache.decodeEx(addressStr), true); + } + findCell(addressStr) { + return this.findCellEx(colCache.decodeEx(addressStr), false); + } + findCellAt(sheetName, rowNumber, colNumber) { + const sheet = this.sheets[sheetName]; + const row = sheet && sheet[rowNumber]; + return row && row[colNumber]; + } + addCellEx(address) { + if (address.top) { + for (let row = address.top; row <= address.bottom; row++) { + for (let col = address.left; col <= address.right; col++) { + this.getCellAt(address.sheetName, row, col); + } + } + } else { + this.findCellEx(address, true); + } + } + getCellEx(address) { + return this.findCellEx(address, true); + } + findCellEx(address, create) { + const sheet = this.findSheet(address, create); + const row = this.findSheetRow(sheet, address, create); + return this.findRowCell(row, address, create); + } + getCellAt(sheetName, rowNumber, colNumber) { + const sheet = this.sheets[sheetName] || (this.sheets[sheetName] = []); + const row = sheet[rowNumber] || (sheet[rowNumber] = []); + const cell = row[colNumber] || (row[colNumber] = { + sheetName, + address: colCache.n2l(colNumber) + rowNumber, + row: rowNumber, + col: colNumber + }); + return cell; + } + removeCellEx(address) { + const sheet = this.findSheet(address); + if (!sheet) { + return; + } + const row = this.findSheetRow(sheet, address); + if (!row) { + return; + } + delete row[address.col]; + } + forEachInSheet(sheetName, callback) { + const sheet = this.sheets[sheetName]; + if (sheet) { + sheet.forEach((row, rowNumber) => { + if (row) { + row.forEach((cell, colNumber) => { + if (cell) { + callback(cell, rowNumber, colNumber); + } + }); + } + }); + } + } + forEach(callback) { + _2.each(this.sheets, (sheet, sheetName) => { + this.forEachInSheet(sheetName, callback); + }); + } + map(callback) { + const results = []; + this.forEach((cell) => { + results.push(callback(cell)); + }); + return results; + } + findSheet(address, create) { + const name = address.sheetName; + if (this.sheets[name]) { + return this.sheets[name]; + } + if (create) { + return this.sheets[name] = []; + } + return void 0; + } + findSheetRow(sheet, address, create) { + const { row } = address; + if (sheet && sheet[row]) { + return sheet[row]; + } + if (create) { + return sheet[row] = []; + } + return void 0; + } + findRowCell(row, address, create) { + const { col } = address; + if (row && row[col]) { + return row[col]; + } + if (create) { + return row[col] = this.template ? Object.assign(address, JSON.parse(JSON.stringify(this.template))) : address; + } + return void 0; + } + spliceRows(sheetName, start, numDelete, numInsert) { + const sheet = this.sheets[sheetName]; + if (sheet) { + const inserts = []; + for (let i = 0; i < numInsert; i++) { + inserts.push([]); + } + sheet.splice(start, numDelete, ...inserts); + } + } + spliceColumns(sheetName, start, numDelete, numInsert) { + const sheet = this.sheets[sheetName]; + if (sheet) { + const inserts = []; + for (let i = 0; i < numInsert; i++) { + inserts.push(null); + } + _2.each(sheet, (row) => { + row.splice(start, numDelete, ...inserts); + }); + } + } + }; + module2.exports = CellMatrix; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/defined-names.js +var require_defined_names = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/defined-names.js"(exports2, module2) { + "use strict"; + var _2 = require_under_dash(); + var colCache = require_col_cache(); + var CellMatrix = require_cell_matrix(); + var Range = require_range4(); + var rangeRegexp = /[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/; + var DefinedNames = class { + constructor() { + this.matrixMap = {}; + } + getMatrix(name) { + const matrix = this.matrixMap[name] || (this.matrixMap[name] = new CellMatrix()); + return matrix; + } + // add a name to a cell. locStr in the form SheetName!$col$row or SheetName!$c1$r1:$c2:$r2 + add(locStr, name) { + const location = colCache.decodeEx(locStr); + this.addEx(location, name); + } + addEx(location, name) { + const matrix = this.getMatrix(name); + if (location.top) { + for (let col = location.left; col <= location.right; col++) { + for (let row = location.top; row <= location.bottom; row++) { + const address = { + sheetName: location.sheetName, + address: colCache.n2l(col) + row, + row, + col + }; + matrix.addCellEx(address); + } + } + } else { + matrix.addCellEx(location); + } + } + remove(locStr, name) { + const location = colCache.decodeEx(locStr); + this.removeEx(location, name); + } + removeEx(location, name) { + const matrix = this.getMatrix(name); + matrix.removeCellEx(location); + } + removeAllNames(location) { + _2.each(this.matrixMap, (matrix) => { + matrix.removeCellEx(location); + }); + } + forEach(callback) { + _2.each(this.matrixMap, (matrix, name) => { + matrix.forEach((cell) => { + callback(name, cell); + }); + }); + } + // get all the names of a cell + getNames(addressStr) { + return this.getNamesEx(colCache.decodeEx(addressStr)); + } + getNamesEx(address) { + return _2.map(this.matrixMap, (matrix, name) => matrix.findCellEx(address) && name).filter( + Boolean + ); + } + _explore(matrix, cell) { + cell.mark = false; + const { sheetName } = cell; + const range = new Range(cell.row, cell.col, cell.row, cell.col, sheetName); + let x; + let y; + function vGrow(yy, edge) { + const c = matrix.findCellAt(sheetName, yy, cell.col); + if (!c || !c.mark) { + return false; + } + range[edge] = yy; + c.mark = false; + return true; + } + for (y = cell.row - 1; vGrow(y, "top"); y--) ; + for (y = cell.row + 1; vGrow(y, "bottom"); y++) ; + function hGrow(xx, edge) { + const cells = []; + for (y = range.top; y <= range.bottom; y++) { + const c = matrix.findCellAt(sheetName, y, xx); + if (c && c.mark) { + cells.push(c); + } else { + return false; + } + } + range[edge] = xx; + for (let i = 0; i < cells.length; i++) { + cells[i].mark = false; + } + return true; + } + for (x = cell.col - 1; hGrow(x, "left"); x--) ; + for (x = cell.col + 1; hGrow(x, "right"); x++) ; + return range; + } + getRanges(name, matrix) { + matrix = matrix || this.matrixMap[name]; + if (!matrix) { + return { name, ranges: [] }; + } + matrix.forEach((cell) => { + cell.mark = true; + }); + const ranges = matrix.map((cell) => cell.mark && this._explore(matrix, cell)).filter(Boolean).map((range) => range.$shortRange); + return { + name, + ranges + }; + } + normaliseMatrix(matrix, sheetName) { + matrix.forEachInSheet(sheetName, (cell, row, col) => { + if (cell) { + if (cell.row !== row || cell.col !== col) { + cell.row = row; + cell.col = col; + cell.address = colCache.n2l(col) + row; + } + } + }); + } + spliceRows(sheetName, start, numDelete, numInsert) { + _2.each(this.matrixMap, (matrix) => { + matrix.spliceRows(sheetName, start, numDelete, numInsert); + this.normaliseMatrix(matrix, sheetName); + }); + } + spliceColumns(sheetName, start, numDelete, numInsert) { + _2.each(this.matrixMap, (matrix) => { + matrix.spliceColumns(sheetName, start, numDelete, numInsert); + this.normaliseMatrix(matrix, sheetName); + }); + } + get model() { + return _2.map(this.matrixMap, (matrix, name) => this.getRanges(name, matrix)).filter( + (definedName) => definedName.ranges.length + ); + } + set model(value) { + const matrixMap = this.matrixMap = {}; + value.forEach((definedName) => { + const matrix = matrixMap[definedName.name] = new CellMatrix(); + definedName.ranges.forEach((rangeStr) => { + if (rangeRegexp.test(rangeStr.split("!").pop() || "")) { + matrix.addCell(rangeStr); + } + }); + }); + } + }; + module2.exports = DefinedNames; + } +}); + +// ../../node_modules/.pnpm/process-nextick-args@2.0.1/node_modules/process-nextick-args/index.js +var require_process_nextick_args = __commonJS({ + "../../node_modules/.pnpm/process-nextick-args@2.0.1/node_modules/process-nextick-args/index.js"(exports2, module2) { + "use strict"; + if (typeof process === "undefined" || !process.version || process.version.indexOf("v0.") === 0 || process.version.indexOf("v1.") === 0 && process.version.indexOf("v1.8.") !== 0) { + module2.exports = { nextTick }; + } else { + module2.exports = process; + } + function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== "function") { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); + } + } + } +}); + +// ../../node_modules/.pnpm/isarray@1.0.0/node_modules/isarray/index.js +var require_isarray = __commonJS({ + "../../node_modules/.pnpm/isarray@1.0.0/node_modules/isarray/index.js"(exports2, module2) { + var toString2 = {}.toString; + module2.exports = Array.isArray || function(arr) { + return toString2.call(arr) == "[object Array]"; + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/stream.js +var require_stream2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) { + module2.exports = require("stream"); + } +}); + +// ../../node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.js +var require_safe_buffer2 = __commonJS({ + "../../node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.js"(exports2, module2) { + var buffer = require("buffer"); + var Buffer2 = buffer.Buffer; + function copyProps(src, dst) { + for (var key in src) { + dst[key] = src[key]; + } + } + if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) { + module2.exports = buffer; + } else { + copyProps(buffer, exports2); + exports2.Buffer = SafeBuffer; + } + function SafeBuffer(arg, encodingOrOffset, length) { + return Buffer2(arg, encodingOrOffset, length); + } + copyProps(Buffer2, SafeBuffer); + SafeBuffer.from = function(arg, encodingOrOffset, length) { + if (typeof arg === "number") { + throw new TypeError("Argument must not be a number"); + } + return Buffer2(arg, encodingOrOffset, length); + }; + SafeBuffer.alloc = function(size, fill, encoding) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + var buf = Buffer2(size); + if (fill !== void 0) { + if (typeof encoding === "string") { + buf.fill(fill, encoding); + } else { + buf.fill(fill); + } + } else { + buf.fill(0); + } + return buf; + }; + SafeBuffer.allocUnsafe = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return Buffer2(size); + }; + SafeBuffer.allocUnsafeSlow = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return buffer.SlowBuffer(size); + }; + } +}); + +// ../../node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js +var require_util3 = __commonJS({ + "../../node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js"(exports2) { + function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === "[object Array]"; + } + exports2.isArray = isArray; + function isBoolean(arg) { + return typeof arg === "boolean"; + } + exports2.isBoolean = isBoolean; + function isNull(arg) { + return arg === null; + } + exports2.isNull = isNull; + function isNullOrUndefined(arg) { + return arg == null; + } + exports2.isNullOrUndefined = isNullOrUndefined; + function isNumber(arg) { + return typeof arg === "number"; + } + exports2.isNumber = isNumber; + function isString(arg) { + return typeof arg === "string"; + } + exports2.isString = isString; + function isSymbol(arg) { + return typeof arg === "symbol"; + } + exports2.isSymbol = isSymbol; + function isUndefined(arg) { + return arg === void 0; + } + exports2.isUndefined = isUndefined; + function isRegExp(re) { + return objectToString(re) === "[object RegExp]"; + } + exports2.isRegExp = isRegExp; + function isObject2(arg) { + return typeof arg === "object" && arg !== null; + } + exports2.isObject = isObject2; + function isDate(d) { + return objectToString(d) === "[object Date]"; + } + exports2.isDate = isDate; + function isError2(e) { + return objectToString(e) === "[object Error]" || e instanceof Error; + } + exports2.isError = isError2; + function isFunction(arg) { + return typeof arg === "function"; + } + exports2.isFunction = isFunction; + function isPrimitive2(arg) { + return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol + typeof arg === "undefined"; + } + exports2.isPrimitive = isPrimitive2; + exports2.isBuffer = require("buffer").Buffer.isBuffer; + function objectToString(o) { + return Object.prototype.toString.call(o); + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/BufferList.js +var require_BufferList = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/BufferList.js"(exports2, module2) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + var Buffer2 = require_safe_buffer2().Buffer; + var util2 = require("util"); + function copyBuffer(src, target, offset) { + src.copy(target, offset); + } + module2.exports = (function() { + function BufferList() { + _classCallCheck(this, BufferList); + this.head = null; + this.tail = null; + this.length = 0; + } + BufferList.prototype.push = function push(v) { + var entry = { data: v, next: null }; + if (this.length > 0) this.tail.next = entry; + else this.head = entry; + this.tail = entry; + ++this.length; + }; + BufferList.prototype.unshift = function unshift(v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + }; + BufferList.prototype.shift = function shift() { + if (this.length === 0) return; + var ret2 = this.head.data; + if (this.length === 1) this.head = this.tail = null; + else this.head = this.head.next; + --this.length; + return ret2; + }; + BufferList.prototype.clear = function clear() { + this.head = this.tail = null; + this.length = 0; + }; + BufferList.prototype.join = function join(s) { + if (this.length === 0) return ""; + var p = this.head; + var ret2 = "" + p.data; + while (p = p.next) { + ret2 += s + p.data; + } + return ret2; + }; + BufferList.prototype.concat = function concat(n) { + if (this.length === 0) return Buffer2.alloc(0); + var ret2 = Buffer2.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret2, i); + i += p.data.length; + p = p.next; + } + return ret2; + }; + return BufferList; + })(); + if (util2 && util2.inspect && util2.inspect.custom) { + module2.exports.prototype[util2.inspect.custom] = function() { + var obj2 = util2.inspect({ length: this.length }); + return this.constructor.name + " " + obj2; + }; + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/destroy.js +var require_destroy3 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) { + "use strict"; + var pna = require_process_nextick_args(); + function destroy(err, cb) { + var _this = this; + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err) { + if (!this._writableState) { + pna.nextTick(emitErrorNT, this, err); + } else if (!this._writableState.errorEmitted) { + this._writableState.errorEmitted = true; + pna.nextTick(emitErrorNT, this, err); + } + } + return this; + } + if (this._readableState) { + this._readableState.destroyed = true; + } + if (this._writableState) { + this._writableState.destroyed = true; + } + this._destroy(err || null, function(err2) { + if (!cb && err2) { + if (!_this._writableState) { + pna.nextTick(emitErrorNT, _this, err2); + } else if (!_this._writableState.errorEmitted) { + _this._writableState.errorEmitted = true; + pna.nextTick(emitErrorNT, _this, err2); + } + } else if (cb) { + cb(err2); + } + }); + return this; + } + function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finalCalled = false; + this._writableState.prefinished = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } + } + function emitErrorNT(self2, err) { + self2.emit("error", err); + } + module2.exports = { + destroy, + undestroy + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_writable.js +var require_stream_writable2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) { + "use strict"; + var pna = require_process_nextick_args(); + module2.exports = Writable; + function CorkedRequest(state) { + var _this = this; + this.next = null; + this.entry = null; + this.finish = function() { + onCorkedFinish(_this, state); + }; + } + var asyncWrite = !process.browser && ["v0.10", "v0.9."].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; + var Duplex; + Writable.WritableState = WritableState; + var util2 = Object.create(require_util3()); + util2.inherits = require_inherits(); + var internalUtil = { + deprecate: require_node2() + }; + var Stream = require_stream2(); + var Buffer2 = require_safe_buffer2().Buffer; + var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer2.from(chunk); + } + function _isUint8Array(obj2) { + return Buffer2.isBuffer(obj2) || obj2 instanceof OurUint8Array; + } + var destroyImpl = require_destroy3(); + util2.inherits(Writable, Stream); + function nop() { + } + function WritableState(options, stream) { + Duplex = Duplex || require_stream_duplex2(); + options = options || {}; + var isDuplex = stream instanceof Duplex; + this.objectMode = !!options.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + var hwm = options.highWaterMark; + var writableHwm = options.writableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + if (hwm || hwm === 0) this.highWaterMark = hwm; + else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm; + else this.highWaterMark = defaultHwm; + this.highWaterMark = Math.floor(this.highWaterMark); + this.finalCalled = false; + this.needDrain = false; + this.ending = false; + this.ended = false; + this.finished = false; + this.destroyed = false; + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + this.defaultEncoding = options.defaultEncoding || "utf8"; + this.length = 0; + this.writing = false; + this.corked = 0; + this.sync = true; + this.bufferProcessing = false; + this.onwrite = function(er) { + onwrite(stream, er); + }; + this.writecb = null; + this.writelen = 0; + this.bufferedRequest = null; + this.lastBufferedRequest = null; + this.pendingcb = 0; + this.prefinished = false; + this.errorEmitted = false; + this.bufferedRequestCount = 0; + this.corkedRequestsFree = new CorkedRequest(this); + } + WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; + }; + (function() { + try { + Object.defineProperty(WritableState.prototype, "buffer", { + get: internalUtil.deprecate(function() { + return this.getBuffer(); + }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") + }); + } catch (_2) { + } + })(); + var realHasInstance; + if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function(object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + return object && object._writableState instanceof WritableState; + } + }); + } else { + realHasInstance = function(object) { + return object instanceof this; + }; + } + function Writable(options) { + Duplex = Duplex || require_stream_duplex2(); + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } + this._writableState = new WritableState(options, this); + this.writable = true; + if (options) { + if (typeof options.write === "function") this._write = options.write; + if (typeof options.writev === "function") this._writev = options.writev; + if (typeof options.destroy === "function") this._destroy = options.destroy; + if (typeof options.final === "function") this._final = options.final; + } + Stream.call(this); + } + Writable.prototype.pipe = function() { + this.emit("error", new Error("Cannot pipe, not readable")); + }; + function writeAfterEnd(stream, cb) { + var er = new Error("write after end"); + stream.emit("error", er); + pna.nextTick(cb, er); + } + function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + if (chunk === null) { + er = new TypeError("May not write null values to stream"); + } else if (typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { + er = new TypeError("Invalid non-string/buffer chunk"); + } + if (er) { + stream.emit("error", er); + pna.nextTick(cb, er); + valid = false; + } + return valid; + } + Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret2 = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + if (isBuf && !Buffer2.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (isBuf) encoding = "buffer"; + else if (!encoding) encoding = state.defaultEncoding; + if (typeof cb !== "function") cb = nop; + if (state.ended) writeAfterEnd(this, cb); + else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret2 = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + return ret2; + }; + Writable.prototype.cork = function() { + var state = this._writableState; + state.corked++; + }; + Writable.prototype.uncork = function() { + var state = this._writableState; + if (state.corked) { + state.corked--; + if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } + }; + Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + if (typeof encoding === "string") encoding = encoding.toLowerCase(); + if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1)) throw new TypeError("Unknown encoding: " + encoding); + this._writableState.defaultEncoding = encoding; + return this; + }; + function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") { + chunk = Buffer2.from(chunk, encoding); + } + return chunk; + } + Object.defineProperty(Writable.prototype, "writableHighWaterMark", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function() { + return this._writableState.highWaterMark; + } + }); + function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = "buffer"; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + state.length += len; + var ret2 = state.length < state.highWaterMark; + if (!ret2) state.needDrain = true; + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk, + encoding, + isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + return ret2; + } + function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite); + else stream._write(chunk, encoding, state.onwrite); + state.sync = false; + } + function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) { + pna.nextTick(cb, er); + pna.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + stream.emit("error", er); + } else { + cb(er); + stream._writableState.errorEmitted = true; + stream.emit("error", er); + finishMaybe(stream, state); + } + } + function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; + } + function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + onwriteStateUpdate(state); + if (er) onwriteError(stream, state, sync, er, cb); + else { + var finished = needFinish(state); + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + if (sync) { + asyncWrite(afterWrite, stream, state, finished, cb); + } else { + afterWrite(stream, state, finished, cb); + } + } + } + function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); + } + function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit("drain"); + } + } + function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + if (stream._writev && entry && entry.next) { + var l2 = state.bufferedRequestCount; + var buffer = new Array(l2); + var holder = state.corkedRequestsFree; + holder.entry = entry; + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + doWrite(stream, state, true, state.length, buffer, "", holder.finish); + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + if (state.writing) { + break; + } + } + if (entry === null) state.lastBufferedRequest = null; + } + state.bufferedRequest = entry; + state.bufferProcessing = false; + } + Writable.prototype._write = function(chunk, encoding, cb) { + cb(new Error("_write() is not implemented")); + }; + Writable.prototype._writev = null; + Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + if (typeof chunk === "function") { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (chunk !== null && chunk !== void 0) this.write(chunk, encoding); + if (state.corked) { + state.corked = 1; + this.uncork(); + } + if (!state.ending) endWritable(this, state, cb); + }; + function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; + } + function callFinal(stream, state) { + stream._final(function(err) { + state.pendingcb--; + if (err) { + stream.emit("error", err); + } + state.prefinished = true; + stream.emit("prefinish"); + finishMaybe(stream, state); + }); + } + function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === "function") { + state.pendingcb++; + state.finalCalled = true; + pna.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit("prefinish"); + } + } + } + function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit("finish"); + } + } + return need; + } + function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) pna.nextTick(cb); + else stream.once("finish", cb); + } + state.ended = true; + stream.writable = false; + } + function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + state.corkedRequestsFree.next = corkReq; + } + Object.defineProperty(Writable.prototype, "destroyed", { + get: function() { + if (this._writableState === void 0) { + return false; + } + return this._writableState.destroyed; + }, + set: function(value) { + if (!this._writableState) { + return; + } + this._writableState.destroyed = value; + } + }); + Writable.prototype.destroy = destroyImpl.destroy; + Writable.prototype._undestroy = destroyImpl.undestroy; + Writable.prototype._destroy = function(err, cb) { + this.end(); + cb(err); + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_duplex.js +var require_stream_duplex2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) { + "use strict"; + var pna = require_process_nextick_args(); + var objectKeys = Object.keys || function(obj2) { + var keys2 = []; + for (var key in obj2) { + keys2.push(key); + } + return keys2; + }; + module2.exports = Duplex; + var util2 = Object.create(require_util3()); + util2.inherits = require_inherits(); + var Readable = require_stream_readable2(); + var Writable = require_stream_writable2(); + util2.inherits(Duplex, Readable); + { + keys = objectKeys(Writable.prototype); + for (v = 0; v < keys.length; v++) { + method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } + } + var keys; + var method; + var v; + function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + Readable.call(this, options); + Writable.call(this, options); + if (options && options.readable === false) this.readable = false; + if (options && options.writable === false) this.writable = false; + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + this.once("end", onend); + } + Object.defineProperty(Duplex.prototype, "writableHighWaterMark", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function() { + return this._writableState.highWaterMark; + } + }); + function onend() { + if (this.allowHalfOpen || this._writableState.ended) return; + pna.nextTick(onEndNT, this); + } + function onEndNT(self2) { + self2.end(); + } + Object.defineProperty(Duplex.prototype, "destroyed", { + get: function() { + if (this._readableState === void 0 || this._writableState === void 0) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function(value) { + if (this._readableState === void 0 || this._writableState === void 0) { + return; + } + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } + }); + Duplex.prototype._destroy = function(err, cb) { + this.push(null); + this.end(); + pna.nextTick(cb, err); + }; + } +}); + +// ../../node_modules/.pnpm/string_decoder@1.1.1/node_modules/string_decoder/lib/string_decoder.js +var require_string_decoder2 = __commonJS({ + "../../node_modules/.pnpm/string_decoder@1.1.1/node_modules/string_decoder/lib/string_decoder.js"(exports2) { + "use strict"; + var Buffer2 = require_safe_buffer2().Buffer; + var isEncoding = Buffer2.isEncoding || function(encoding) { + encoding = "" + encoding; + switch (encoding && encoding.toLowerCase()) { + case "hex": + case "utf8": + case "utf-8": + case "ascii": + case "binary": + case "base64": + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + case "raw": + return true; + default: + return false; + } + }; + function _normalizeEncoding(enc) { + if (!enc) return "utf8"; + var retried; + while (true) { + switch (enc) { + case "utf8": + case "utf-8": + return "utf8"; + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return "utf16le"; + case "latin1": + case "binary": + return "latin1"; + case "base64": + case "ascii": + case "hex": + return enc; + default: + if (retried) return; + enc = ("" + enc).toLowerCase(); + retried = true; + } + } + } + function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== "string" && (Buffer2.isEncoding === isEncoding || !isEncoding(enc))) throw new Error("Unknown encoding: " + enc); + return nenc || enc; + } + exports2.StringDecoder = StringDecoder; + function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case "utf16le": + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case "utf8": + this.fillLast = utf8FillLast; + nb = 4; + break; + case "base64": + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; + } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = Buffer2.allocUnsafe(nb); + } + StringDecoder.prototype.write = function(buf) { + if (buf.length === 0) return ""; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === void 0) return ""; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; + } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ""; + }; + StringDecoder.prototype.end = utf8End; + StringDecoder.prototype.text = utf8Text; + StringDecoder.prototype.fillLast = function(buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; + }; + function utf8CheckByte(byte) { + if (byte <= 127) return 0; + else if (byte >> 5 === 6) return 2; + else if (byte >> 4 === 14) return 3; + else if (byte >> 3 === 30) return 4; + return byte >> 6 === 2 ? -1 : -2; + } + function utf8CheckIncomplete(self2, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self2.lastNeed = nb - 1; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self2.lastNeed = nb - 2; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0; + else self2.lastNeed = nb - 3; + } + return nb; + } + return 0; + } + function utf8CheckExtraBytes(self2, buf, p) { + if ((buf[0] & 192) !== 128) { + self2.lastNeed = 0; + return "\uFFFD"; + } + if (self2.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 192) !== 128) { + self2.lastNeed = 1; + return "\uFFFD"; + } + if (self2.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 192) !== 128) { + self2.lastNeed = 2; + return "\uFFFD"; + } + } + } + } + function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== void 0) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; + } + function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString("utf8", i); + this.lastTotal = total; + var end = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end); + return buf.toString("utf8", i, end); + } + function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) return r + "\uFFFD"; + return r; + } + function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString("utf16le", i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 55296 && c <= 56319) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; + } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString("utf16le", i, buf.length - 1); + } + function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) { + var end = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString("utf16le", 0, end); + } + return r; + } + function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString("base64", i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; + } else { + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + } + return buf.toString("base64", i, buf.length - n); + } + function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) return r + this.lastChar.toString("base64", 0, 3 - this.lastNeed); + return r; + } + function simpleWrite(buf) { + return buf.toString(this.encoding); + } + function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ""; + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_readable.js +var require_stream_readable2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) { + "use strict"; + var pna = require_process_nextick_args(); + module2.exports = Readable; + var isArray = require_isarray(); + var Duplex; + Readable.ReadableState = ReadableState; + var EE = require("events").EventEmitter; + var EElistenerCount = function(emitter, type) { + return emitter.listeners(type).length; + }; + var Stream = require_stream2(); + var Buffer2 = require_safe_buffer2().Buffer; + var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer2.from(chunk); + } + function _isUint8Array(obj2) { + return Buffer2.isBuffer(obj2) || obj2 instanceof OurUint8Array; + } + var util2 = Object.create(require_util3()); + util2.inherits = require_inherits(); + var debugUtil = require("util"); + var debug = void 0; + if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog("stream"); + } else { + debug = function() { + }; + } + var BufferList = require_BufferList(); + var destroyImpl = require_destroy3(); + var StringDecoder; + util2.inherits(Readable, Stream); + var kProxyEvents = ["error", "close", "destroy", "pause", "resume"]; + function prependListener(emitter, event, fn) { + if (typeof emitter.prependListener === "function") return emitter.prependListener(event, fn); + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn); + else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn); + else emitter._events[event] = [fn, emitter._events[event]]; + } + function ReadableState(options, stream) { + Duplex = Duplex || require_stream_duplex2(); + options = options || {}; + var isDuplex = stream instanceof Duplex; + this.objectMode = !!options.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + var hwm = options.highWaterMark; + var readableHwm = options.readableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + if (hwm || hwm === 0) this.highWaterMark = hwm; + else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm; + else this.highWaterMark = defaultHwm; + this.highWaterMark = Math.floor(this.highWaterMark); + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + this.sync = true; + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + this.destroyed = false; + this.defaultEncoding = options.defaultEncoding || "utf8"; + this.awaitDrain = 0; + this.readingMore = false; + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = require_string_decoder2().StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } + } + function Readable(options) { + Duplex = Duplex || require_stream_duplex2(); + if (!(this instanceof Readable)) return new Readable(options); + this._readableState = new ReadableState(options, this); + this.readable = true; + if (options) { + if (typeof options.read === "function") this._read = options.read; + if (typeof options.destroy === "function") this._destroy = options.destroy; + } + Stream.call(this); + } + Object.defineProperty(Readable.prototype, "destroyed", { + get: function() { + if (this._readableState === void 0) { + return false; + } + return this._readableState.destroyed; + }, + set: function(value) { + if (!this._readableState) { + return; + } + this._readableState.destroyed = value; + } + }); + Readable.prototype.destroy = destroyImpl.destroy; + Readable.prototype._undestroy = destroyImpl.undestroy; + Readable.prototype._destroy = function(err, cb) { + this.push(null); + cb(err); + }; + Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + if (!state.objectMode) { + if (typeof chunk === "string") { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer2.from(chunk, encoding); + encoding = ""; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); + }; + Readable.prototype.unshift = function(chunk) { + return readableAddChunk(this, chunk, null, true, false); + }; + function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + stream.emit("error", er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (addToFront) { + if (state.endEmitted) stream.emit("error", new Error("stream.unshift() after end event")); + else addChunk(stream, state, chunk, true); + } else if (state.ended) { + stream.emit("error", new Error("stream.push() after EOF")); + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false); + else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + } + } + return needMoreData(state); + } + function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit("data", chunk); + stream.read(0); + } else { + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk); + else state.buffer.push(chunk); + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); + } + function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { + er = new TypeError("Invalid non-string/buffer chunk"); + } + return er; + } + function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); + } + Readable.prototype.isPaused = function() { + return this._readableState.flowing === false; + }; + Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) StringDecoder = require_string_decoder2().StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; + }; + var MAX_HWM = 8388608; + function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; + } + function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + if (state.flowing && state.length) return state.buffer.head.data.length; + else return state.length; + } + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; + } + Readable.prototype.read = function(n) { + debug("read", n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + if (n !== 0) state.emittedReadable = false; + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug("read: emitReadable", state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this); + else emitReadable(this); + return null; + } + n = howMuchToRead(n, state); + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + var doRead = state.needReadable; + debug("need readable", doRead); + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug("length less than watermark", doRead); + } + if (state.ended || state.reading) { + doRead = false; + debug("reading or ended", doRead); + } else if (doRead) { + debug("do read"); + state.reading = true; + state.sync = true; + if (state.length === 0) state.needReadable = true; + this._read(state.highWaterMark); + state.sync = false; + if (!state.reading) n = howMuchToRead(nOrig, state); + } + var ret2; + if (n > 0) ret2 = fromList(n, state); + else ret2 = null; + if (ret2 === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } + if (state.length === 0) { + if (!state.ended) state.needReadable = true; + if (nOrig !== n && state.ended) endReadable(this); + } + if (ret2 !== null) this.emit("data", ret2); + return ret2; + }; + function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + emitReadable(stream); + } + function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug("emitReadable", state.flowing); + state.emittedReadable = true; + if (state.sync) pna.nextTick(emitReadable_, stream); + else emitReadable_(stream); + } + } + function emitReadable_(stream) { + debug("emit readable"); + stream.emit("readable"); + flow(stream); + } + function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + pna.nextTick(maybeReadMore_, stream, state); + } + } + function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug("maybeReadMore read 0"); + stream.read(0); + if (len === state.length) + break; + else len = state.length; + } + state.readingMore = false; + } + Readable.prototype._read = function(n) { + this.emit("error", new Error("_read() is not implemented")); + }; + Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug("pipe count=%d opts=%j", state.pipesCount, pipeOpts); + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) pna.nextTick(endFn); + else src.once("end", endFn); + dest.on("unpipe", onunpipe); + function onunpipe(readable, unpipeInfo) { + debug("onunpipe"); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + function onend() { + debug("onend"); + dest.end(); + } + var ondrain = pipeOnDrain(src); + dest.on("drain", ondrain); + var cleanedUp = false; + function cleanup() { + debug("cleanup"); + dest.removeListener("close", onclose); + dest.removeListener("finish", onfinish); + dest.removeListener("drain", ondrain); + dest.removeListener("error", onerror); + dest.removeListener("unpipe", onunpipe); + src.removeListener("end", onend); + src.removeListener("end", unpipe); + src.removeListener("data", ondata); + cleanedUp = true; + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + var increasedAwaitDrain = false; + src.on("data", ondata); + function ondata(chunk) { + debug("ondata"); + increasedAwaitDrain = false; + var ret2 = dest.write(chunk); + if (false === ret2 && !increasedAwaitDrain) { + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug("false write response, pause", state.awaitDrain); + state.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } + function onerror(er) { + debug("onerror", er); + unpipe(); + dest.removeListener("error", onerror); + if (EElistenerCount(dest, "error") === 0) dest.emit("error", er); + } + prependListener(dest, "error", onerror); + function onclose() { + dest.removeListener("finish", onfinish); + unpipe(); + } + dest.once("close", onclose); + function onfinish() { + debug("onfinish"); + dest.removeListener("close", onclose); + unpipe(); + } + dest.once("finish", onfinish); + function unpipe() { + debug("unpipe"); + src.unpipe(dest); + } + dest.emit("pipe", src); + if (!state.flowing) { + debug("pipe resume"); + src.resume(); + } + return dest; + }; + function pipeOnDrain(src) { + return function() { + var state = src._readableState; + debug("pipeOnDrain", state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, "data")) { + state.flowing = true; + flow(src); + } + }; + } + Readable.prototype.unpipe = function(dest) { + var state = this._readableState; + var unpipeInfo = { hasUnpiped: false }; + if (state.pipesCount === 0) return this; + if (state.pipesCount === 1) { + if (dest && dest !== state.pipes) return this; + if (!dest) dest = state.pipes; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit("unpipe", this, unpipeInfo); + return this; + } + if (!dest) { + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + for (var i = 0; i < len; i++) { + dests[i].emit("unpipe", this, { hasUnpiped: false }); + } + return this; + } + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + dest.emit("unpipe", this, unpipeInfo); + return this; + }; + Readable.prototype.on = function(ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + if (ev === "data") { + if (this._readableState.flowing !== false) this.resume(); + } else if (ev === "readable") { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + pna.nextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this); + } + } + } + return res; + }; + Readable.prototype.addListener = Readable.prototype.on; + function nReadingNextTick(self2) { + debug("readable nexttick read 0"); + self2.read(0); + } + Readable.prototype.resume = function() { + var state = this._readableState; + if (!state.flowing) { + debug("resume"); + state.flowing = true; + resume(this, state); + } + return this; + }; + function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + pna.nextTick(resume_, stream, state); + } + } + function resume_(stream, state) { + if (!state.reading) { + debug("resume read 0"); + stream.read(0); + } + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit("resume"); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); + } + Readable.prototype.pause = function() { + debug("call pause flowing=%j", this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug("pause"); + this._readableState.flowing = false; + this.emit("pause"); + } + return this; + }; + function flow(stream) { + var state = stream._readableState; + debug("flow", state.flowing); + while (state.flowing && stream.read() !== null) { + } + } + Readable.prototype.wrap = function(stream) { + var _this = this; + var state = this._readableState; + var paused = false; + stream.on("end", function() { + debug("wrapped end"); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); + } + _this.push(null); + }); + stream.on("data", function(chunk) { + debug("wrapped data"); + if (state.decoder) chunk = state.decoder.write(chunk); + if (state.objectMode && (chunk === null || chunk === void 0)) return; + else if (!state.objectMode && (!chunk || !chunk.length)) return; + var ret2 = _this.push(chunk); + if (!ret2) { + paused = true; + stream.pause(); + } + }); + for (var i in stream) { + if (this[i] === void 0 && typeof stream[i] === "function") { + this[i] = /* @__PURE__ */ (function(method) { + return function() { + return stream[method].apply(stream, arguments); + }; + })(i); + } + } + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + this._read = function(n2) { + debug("wrapped _read", n2); + if (paused) { + paused = false; + stream.resume(); + } + }; + return this; + }; + Object.defineProperty(Readable.prototype, "readableHighWaterMark", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function() { + return this._readableState.highWaterMark; + } + }); + Readable._fromList = fromList; + function fromList(n, state) { + if (state.length === 0) return null; + var ret2; + if (state.objectMode) ret2 = state.buffer.shift(); + else if (!n || n >= state.length) { + if (state.decoder) ret2 = state.buffer.join(""); + else if (state.buffer.length === 1) ret2 = state.buffer.head.data; + else ret2 = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + ret2 = fromListPartial(n, state.buffer, state.decoder); + } + return ret2; + } + function fromListPartial(n, list, hasStrings) { + var ret2; + if (n < list.head.data.length) { + ret2 = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + ret2 = list.shift(); + } else { + ret2 = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret2; + } + function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret2 = p.data; + n -= ret2.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret2 += str; + else ret2 += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) list.head = p.next; + else list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret2; + } + function copyFromBuffer(n, list) { + var ret2 = Buffer2.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret2); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret2, ret2.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) list.head = p.next; + else list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret2; + } + function endReadable(stream) { + var state = stream._readableState; + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); + if (!state.endEmitted) { + state.ended = true; + pna.nextTick(endReadableNT, state, stream); + } + } + function endReadableNT(state, stream) { + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit("end"); + } + } + function indexOf(xs, x) { + for (var i = 0, l2 = xs.length; i < l2; i++) { + if (xs[i] === x) return i; + } + return -1; + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_transform.js +var require_stream_transform2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_transform.js"(exports2, module2) { + "use strict"; + module2.exports = Transform; + var Duplex = require_stream_duplex2(); + var util2 = Object.create(require_util3()); + util2.inherits = require_inherits(); + util2.inherits(Transform, Duplex); + function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + var cb = ts.writecb; + if (!cb) { + return this.emit("error", new Error("write callback called multiple times")); + } + ts.writechunk = null; + ts.writecb = null; + if (data != null) + this.push(data); + cb(er); + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } + } + function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + Duplex.call(this, options); + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + this._readableState.needReadable = true; + this._readableState.sync = false; + if (options) { + if (typeof options.transform === "function") this._transform = options.transform; + if (typeof options.flush === "function") this._flush = options.flush; + } + this.on("prefinish", prefinish); + } + function prefinish() { + var _this = this; + if (typeof this._flush === "function") { + this._flush(function(er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } + } + Transform.prototype.push = function(chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); + }; + Transform.prototype._transform = function(chunk, encoding, cb) { + throw new Error("_transform() is not implemented"); + }; + Transform.prototype._write = function(chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } + }; + Transform.prototype._read = function(n) { + var ts = this._transformState; + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + ts.needTransform = true; + } + }; + Transform.prototype._destroy = function(err, cb) { + var _this2 = this; + Duplex.prototype._destroy.call(this, err, function(err2) { + cb(err2); + _this2.emit("close"); + }); + }; + function done(stream, er, data) { + if (er) return stream.emit("error", er); + if (data != null) + stream.push(data); + if (stream._writableState.length) throw new Error("Calling transform done when ws.length != 0"); + if (stream._transformState.transforming) throw new Error("Calling transform done when still transforming"); + return stream.push(null); + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_passthrough.js +var require_stream_passthrough2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_passthrough.js"(exports2, module2) { + "use strict"; + module2.exports = PassThrough; + var Transform = require_stream_transform2(); + var util2 = Object.create(require_util3()); + util2.inherits = require_inherits(); + util2.inherits(PassThrough, Transform); + function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + Transform.call(this, options); + } + PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/readable.js +var require_readable2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/readable.js"(exports2, module2) { + var Stream = require("stream"); + if (process.env.READABLE_STREAM === "disable" && Stream) { + module2.exports = Stream; + exports2 = module2.exports = Stream.Readable; + exports2.Readable = Stream.Readable; + exports2.Writable = Stream.Writable; + exports2.Duplex = Stream.Duplex; + exports2.Transform = Stream.Transform; + exports2.PassThrough = Stream.PassThrough; + exports2.Stream = Stream; + } else { + exports2 = module2.exports = require_stream_readable2(); + exports2.Stream = Stream || exports2; + exports2.Readable = exports2; + exports2.Writable = require_stream_writable2(); + exports2.Duplex = require_stream_duplex2(); + exports2.Transform = require_stream_transform2(); + exports2.PassThrough = require_stream_passthrough2(); + } + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/support.js +var require_support = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/support.js"(exports2) { + "use strict"; + exports2.base64 = true; + exports2.array = true; + exports2.string = true; + exports2.arraybuffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined"; + exports2.nodebuffer = typeof Buffer !== "undefined"; + exports2.uint8array = typeof Uint8Array !== "undefined"; + if (typeof ArrayBuffer === "undefined") { + exports2.blob = false; + } else { + buffer = new ArrayBuffer(0); + try { + exports2.blob = new Blob([buffer], { + type: "application/zip" + }).size === 0; + } catch (e) { + try { + Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder; + builder = new Builder(); + builder.append(buffer); + exports2.blob = builder.getBlob("application/zip").size === 0; + } catch (e2) { + exports2.blob = false; + } + } + } + var buffer; + var Builder; + var builder; + try { + exports2.nodestream = !!require_readable2().Readable; + } catch (e) { + exports2.nodestream = false; + } + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/base64.js +var require_base64 = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/base64.js"(exports2) { + "use strict"; + var utils = require_utils20(); + var support = require_support(); + var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + exports2.encode = function(input) { + var output = []; + var chr1, chr2, chr3, enc1, enc2, enc3, enc4; + var i = 0, len = input.length, remainingBytes = len; + var isArray = utils.getTypeOf(input) !== "string"; + while (i < input.length) { + remainingBytes = len - i; + if (!isArray) { + chr1 = input.charCodeAt(i++); + chr2 = i < len ? input.charCodeAt(i++) : 0; + chr3 = i < len ? input.charCodeAt(i++) : 0; + } else { + chr1 = input[i++]; + chr2 = i < len ? input[i++] : 0; + chr3 = i < len ? input[i++] : 0; + } + enc1 = chr1 >> 2; + enc2 = (chr1 & 3) << 4 | chr2 >> 4; + enc3 = remainingBytes > 1 ? (chr2 & 15) << 2 | chr3 >> 6 : 64; + enc4 = remainingBytes > 2 ? chr3 & 63 : 64; + output.push(_keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4)); + } + return output.join(""); + }; + exports2.decode = function(input) { + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0, resultIndex = 0; + var dataUrlPrefix = "data:"; + if (input.substr(0, dataUrlPrefix.length) === dataUrlPrefix) { + throw new Error("Invalid base64 input, it looks like a data url."); + } + input = input.replace(/[^A-Za-z0-9+/=]/g, ""); + var totalLength = input.length * 3 / 4; + if (input.charAt(input.length - 1) === _keyStr.charAt(64)) { + totalLength--; + } + if (input.charAt(input.length - 2) === _keyStr.charAt(64)) { + totalLength--; + } + if (totalLength % 1 !== 0) { + throw new Error("Invalid base64 input, bad content length."); + } + var output; + if (support.uint8array) { + output = new Uint8Array(totalLength | 0); + } else { + output = new Array(totalLength | 0); + } + while (i < input.length) { + enc1 = _keyStr.indexOf(input.charAt(i++)); + enc2 = _keyStr.indexOf(input.charAt(i++)); + enc3 = _keyStr.indexOf(input.charAt(i++)); + enc4 = _keyStr.indexOf(input.charAt(i++)); + chr1 = enc1 << 2 | enc2 >> 4; + chr2 = (enc2 & 15) << 4 | enc3 >> 2; + chr3 = (enc3 & 3) << 6 | enc4; + output[resultIndex++] = chr1; + if (enc3 !== 64) { + output[resultIndex++] = chr2; + } + if (enc4 !== 64) { + output[resultIndex++] = chr3; + } + } + return output; + }; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/nodejsUtils.js +var require_nodejsUtils = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/nodejsUtils.js"(exports2, module2) { + "use strict"; + module2.exports = { + /** + * True if this is running in Nodejs, will be undefined in a browser. + * In a browser, browserify won't include this file and the whole module + * will be resolved an empty object. + */ + isNode: typeof Buffer !== "undefined", + /** + * Create a new nodejs Buffer from an existing content. + * @param {Object} data the data to pass to the constructor. + * @param {String} encoding the encoding to use. + * @return {Buffer} a new Buffer. + */ + newBufferFrom: function(data, encoding) { + if (Buffer.from && Buffer.from !== Uint8Array.from) { + return Buffer.from(data, encoding); + } else { + if (typeof data === "number") { + throw new Error('The "data" argument must not be a number'); + } + return new Buffer(data, encoding); + } + }, + /** + * Create a new nodejs Buffer with the specified size. + * @param {Integer} size the size of the buffer. + * @return {Buffer} a new Buffer. + */ + allocBuffer: function(size) { + if (Buffer.alloc) { + return Buffer.alloc(size); + } else { + var buf = new Buffer(size); + buf.fill(0); + return buf; + } + }, + /** + * Find out if an object is a Buffer. + * @param {Object} b the object to test. + * @return {Boolean} true if the object is a Buffer, false otherwise. + */ + isBuffer: function(b) { + return Buffer.isBuffer(b); + }, + isStream: function(obj2) { + return obj2 && typeof obj2.on === "function" && typeof obj2.pause === "function" && typeof obj2.resume === "function"; + } + }; + } +}); + +// ../../node_modules/.pnpm/immediate@3.0.6/node_modules/immediate/lib/index.js +var require_lib10 = __commonJS({ + "../../node_modules/.pnpm/immediate@3.0.6/node_modules/immediate/lib/index.js"(exports2, module2) { + "use strict"; + var Mutation = global.MutationObserver || global.WebKitMutationObserver; + var scheduleDrain; + if (process.browser) { + if (Mutation) { + called = 0; + observer = new Mutation(nextTick); + element = global.document.createTextNode(""); + observer.observe(element, { + characterData: true + }); + scheduleDrain = function() { + element.data = called = ++called % 2; + }; + } else if (!global.setImmediate && typeof global.MessageChannel !== "undefined") { + channel = new global.MessageChannel(); + channel.port1.onmessage = nextTick; + scheduleDrain = function() { + channel.port2.postMessage(0); + }; + } else if ("document" in global && "onreadystatechange" in global.document.createElement("script")) { + scheduleDrain = function() { + var scriptEl = global.document.createElement("script"); + scriptEl.onreadystatechange = function() { + nextTick(); + scriptEl.onreadystatechange = null; + scriptEl.parentNode.removeChild(scriptEl); + scriptEl = null; + }; + global.document.documentElement.appendChild(scriptEl); + }; + } else { + scheduleDrain = function() { + setTimeout(nextTick, 0); + }; + } + } else { + scheduleDrain = function() { + process.nextTick(nextTick); + }; + } + var called; + var observer; + var element; + var channel; + var draining; + var queue = []; + function nextTick() { + draining = true; + var i, oldQueue; + var len = queue.length; + while (len) { + oldQueue = queue; + queue = []; + i = -1; + while (++i < len) { + oldQueue[i](); + } + len = queue.length; + } + draining = false; + } + module2.exports = immediate; + function immediate(task) { + if (queue.push(task) === 1 && !draining) { + scheduleDrain(); + } + } + } +}); + +// ../../node_modules/.pnpm/lie@3.3.0/node_modules/lie/lib/index.js +var require_lib11 = __commonJS({ + "../../node_modules/.pnpm/lie@3.3.0/node_modules/lie/lib/index.js"(exports2, module2) { + "use strict"; + var immediate = require_lib10(); + function INTERNAL() { + } + var handlers = {}; + var REJECTED = ["REJECTED"]; + var FULFILLED = ["FULFILLED"]; + var PENDING = ["PENDING"]; + if (!process.browser) { + UNHANDLED = ["UNHANDLED"]; + } + var UNHANDLED; + module2.exports = Promise2; + function Promise2(resolver) { + if (typeof resolver !== "function") { + throw new TypeError("resolver must be a function"); + } + this.state = PENDING; + this.queue = []; + this.outcome = void 0; + if (!process.browser) { + this.handled = UNHANDLED; + } + if (resolver !== INTERNAL) { + safelyResolveThenable(this, resolver); + } + } + Promise2.prototype.finally = function(callback) { + if (typeof callback !== "function") { + return this; + } + var p = this.constructor; + return this.then(resolve2, reject2); + function resolve2(value) { + function yes() { + return value; + } + return p.resolve(callback()).then(yes); + } + function reject2(reason) { + function no() { + throw reason; + } + return p.resolve(callback()).then(no); + } + }; + Promise2.prototype.catch = function(onRejected) { + return this.then(null, onRejected); + }; + Promise2.prototype.then = function(onFulfilled, onRejected) { + if (typeof onFulfilled !== "function" && this.state === FULFILLED || typeof onRejected !== "function" && this.state === REJECTED) { + return this; + } + var promise = new this.constructor(INTERNAL); + if (!process.browser) { + if (this.handled === UNHANDLED) { + this.handled = null; + } + } + if (this.state !== PENDING) { + var resolver = this.state === FULFILLED ? onFulfilled : onRejected; + unwrap(promise, resolver, this.outcome); + } else { + this.queue.push(new QueueItem(promise, onFulfilled, onRejected)); + } + return promise; + }; + function QueueItem(promise, onFulfilled, onRejected) { + this.promise = promise; + if (typeof onFulfilled === "function") { + this.onFulfilled = onFulfilled; + this.callFulfilled = this.otherCallFulfilled; + } + if (typeof onRejected === "function") { + this.onRejected = onRejected; + this.callRejected = this.otherCallRejected; + } + } + QueueItem.prototype.callFulfilled = function(value) { + handlers.resolve(this.promise, value); + }; + QueueItem.prototype.otherCallFulfilled = function(value) { + unwrap(this.promise, this.onFulfilled, value); + }; + QueueItem.prototype.callRejected = function(value) { + handlers.reject(this.promise, value); + }; + QueueItem.prototype.otherCallRejected = function(value) { + unwrap(this.promise, this.onRejected, value); + }; + function unwrap(promise, func, value) { + immediate(function() { + var returnValue; + try { + returnValue = func(value); + } catch (e) { + return handlers.reject(promise, e); + } + if (returnValue === promise) { + handlers.reject(promise, new TypeError("Cannot resolve promise with itself")); + } else { + handlers.resolve(promise, returnValue); + } + }); + } + handlers.resolve = function(self2, value) { + var result = tryCatch2(getThen, value); + if (result.status === "error") { + return handlers.reject(self2, result.value); + } + var thenable = result.value; + if (thenable) { + safelyResolveThenable(self2, thenable); + } else { + self2.state = FULFILLED; + self2.outcome = value; + var i = -1; + var len = self2.queue.length; + while (++i < len) { + self2.queue[i].callFulfilled(value); + } + } + return self2; + }; + handlers.reject = function(self2, error) { + self2.state = REJECTED; + self2.outcome = error; + if (!process.browser) { + if (self2.handled === UNHANDLED) { + immediate(function() { + if (self2.handled === UNHANDLED) { + process.emit("unhandledRejection", error, self2); + } + }); + } + } + var i = -1; + var len = self2.queue.length; + while (++i < len) { + self2.queue[i].callRejected(error); + } + return self2; + }; + function getThen(obj2) { + var then = obj2 && obj2.then; + if (obj2 && (typeof obj2 === "object" || typeof obj2 === "function") && typeof then === "function") { + return function appyThen() { + then.apply(obj2, arguments); + }; + } + } + function safelyResolveThenable(self2, thenable) { + var called = false; + function onError(value) { + if (called) { + return; + } + called = true; + handlers.reject(self2, value); + } + function onSuccess(value) { + if (called) { + return; + } + called = true; + handlers.resolve(self2, value); + } + function tryToUnwrap() { + thenable(onSuccess, onError); + } + var result = tryCatch2(tryToUnwrap); + if (result.status === "error") { + onError(result.value); + } + } + function tryCatch2(func, value) { + var out = {}; + try { + out.value = func(value); + out.status = "success"; + } catch (e) { + out.status = "error"; + out.value = e; + } + return out; + } + Promise2.resolve = resolve; + function resolve(value) { + if (value instanceof this) { + return value; + } + return handlers.resolve(new this(INTERNAL), value); + } + Promise2.reject = reject; + function reject(reason) { + var promise = new this(INTERNAL); + return handlers.reject(promise, reason); + } + Promise2.all = all; + function all(iterable) { + var self2 = this; + if (Object.prototype.toString.call(iterable) !== "[object Array]") { + return this.reject(new TypeError("must be an array")); + } + var len = iterable.length; + var called = false; + if (!len) { + return this.resolve([]); + } + var values = new Array(len); + var resolved = 0; + var i = -1; + var promise = new this(INTERNAL); + while (++i < len) { + allResolver(iterable[i], i); + } + return promise; + function allResolver(value, i2) { + self2.resolve(value).then(resolveFromAll, function(error) { + if (!called) { + called = true; + handlers.reject(promise, error); + } + }); + function resolveFromAll(outValue) { + values[i2] = outValue; + if (++resolved === len && !called) { + called = true; + handlers.resolve(promise, values); + } + } + } + } + Promise2.race = race; + function race(iterable) { + var self2 = this; + if (Object.prototype.toString.call(iterable) !== "[object Array]") { + return this.reject(new TypeError("must be an array")); + } + var len = iterable.length; + var called = false; + if (!len) { + return this.resolve([]); + } + var i = -1; + var promise = new this(INTERNAL); + while (++i < len) { + resolver(iterable[i]); + } + return promise; + function resolver(value) { + self2.resolve(value).then(function(response) { + if (!called) { + called = true; + handlers.resolve(promise, response); + } + }, function(error) { + if (!called) { + called = true; + handlers.reject(promise, error); + } + }); + } + } + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/external.js +var require_external = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/external.js"(exports2, module2) { + "use strict"; + var ES6Promise = null; + if (typeof Promise !== "undefined") { + ES6Promise = Promise; + } else { + ES6Promise = require_lib11(); + } + module2.exports = { + Promise: ES6Promise + }; + } +}); + +// ../../node_modules/.pnpm/setimmediate@1.0.5/node_modules/setimmediate/setImmediate.js +var require_setImmediate = __commonJS({ + "../../node_modules/.pnpm/setimmediate@1.0.5/node_modules/setimmediate/setImmediate.js"(exports2) { + (function(global2, undefined2) { + "use strict"; + if (global2.setImmediate) { + return; + } + var nextHandle = 1; + var tasksByHandle = {}; + var currentlyRunningATask = false; + var doc = global2.document; + var registerImmediate; + function setImmediate2(callback) { + if (typeof callback !== "function") { + callback = new Function("" + callback); + } + var args = new Array(arguments.length - 1); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i + 1]; + } + var task = { callback, args }; + tasksByHandle[nextHandle] = task; + registerImmediate(nextHandle); + return nextHandle++; + } + function clearImmediate(handle) { + delete tasksByHandle[handle]; + } + function run(task) { + var callback = task.callback; + var args = task.args; + switch (args.length) { + case 0: + callback(); + break; + case 1: + callback(args[0]); + break; + case 2: + callback(args[0], args[1]); + break; + case 3: + callback(args[0], args[1], args[2]); + break; + default: + callback.apply(undefined2, args); + break; + } + } + function runIfPresent(handle) { + if (currentlyRunningATask) { + setTimeout(runIfPresent, 0, handle); + } else { + var task = tasksByHandle[handle]; + if (task) { + currentlyRunningATask = true; + try { + run(task); + } finally { + clearImmediate(handle); + currentlyRunningATask = false; + } + } + } + } + function installNextTickImplementation() { + registerImmediate = function(handle) { + process.nextTick(function() { + runIfPresent(handle); + }); + }; + } + function canUsePostMessage() { + if (global2.postMessage && !global2.importScripts) { + var postMessageIsAsynchronous = true; + var oldOnMessage = global2.onmessage; + global2.onmessage = function() { + postMessageIsAsynchronous = false; + }; + global2.postMessage("", "*"); + global2.onmessage = oldOnMessage; + return postMessageIsAsynchronous; + } + } + function installPostMessageImplementation() { + var messagePrefix = "setImmediate$" + Math.random() + "$"; + var onGlobalMessage = function(event) { + if (event.source === global2 && typeof event.data === "string" && event.data.indexOf(messagePrefix) === 0) { + runIfPresent(+event.data.slice(messagePrefix.length)); + } + }; + if (global2.addEventListener) { + global2.addEventListener("message", onGlobalMessage, false); + } else { + global2.attachEvent("onmessage", onGlobalMessage); + } + registerImmediate = function(handle) { + global2.postMessage(messagePrefix + handle, "*"); + }; + } + function installMessageChannelImplementation() { + var channel = new MessageChannel(); + channel.port1.onmessage = function(event) { + var handle = event.data; + runIfPresent(handle); + }; + registerImmediate = function(handle) { + channel.port2.postMessage(handle); + }; + } + function installReadyStateChangeImplementation() { + var html = doc.documentElement; + registerImmediate = function(handle) { + var script = doc.createElement("script"); + script.onreadystatechange = function() { + runIfPresent(handle); + script.onreadystatechange = null; + html.removeChild(script); + script = null; + }; + html.appendChild(script); + }; + } + function installSetTimeoutImplementation() { + registerImmediate = function(handle) { + setTimeout(runIfPresent, 0, handle); + }; + } + var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global2); + attachTo = attachTo && attachTo.setTimeout ? attachTo : global2; + if ({}.toString.call(global2.process) === "[object process]") { + installNextTickImplementation(); + } else if (canUsePostMessage()) { + installPostMessageImplementation(); + } else if (global2.MessageChannel) { + installMessageChannelImplementation(); + } else if (doc && "onreadystatechange" in doc.createElement("script")) { + installReadyStateChangeImplementation(); + } else { + installSetTimeoutImplementation(); + } + attachTo.setImmediate = setImmediate2; + attachTo.clearImmediate = clearImmediate; + })(typeof self === "undefined" ? typeof global === "undefined" ? exports2 : global : self); + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/utils.js +var require_utils20 = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/utils.js"(exports2) { + "use strict"; + var support = require_support(); + var base64 = require_base64(); + var nodejsUtils = require_nodejsUtils(); + var external = require_external(); + require_setImmediate(); + function string2binary(str) { + var result = null; + if (support.uint8array) { + result = new Uint8Array(str.length); + } else { + result = new Array(str.length); + } + return stringToArrayLike(str, result); + } + exports2.newBlob = function(part, type) { + exports2.checkSupport("blob"); + try { + return new Blob([part], { + type + }); + } catch (e) { + try { + var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder; + var builder = new Builder(); + builder.append(part); + return builder.getBlob(type); + } catch (e2) { + throw new Error("Bug : can't construct the Blob."); + } + } + }; + function identity(input) { + return input; + } + function stringToArrayLike(str, array) { + for (var i = 0; i < str.length; ++i) { + array[i] = str.charCodeAt(i) & 255; + } + return array; + } + var arrayToStringHelper = { + /** + * Transform an array of int into a string, chunk by chunk. + * See the performances notes on arrayLikeToString. + * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform. + * @param {String} type the type of the array. + * @param {Integer} chunk the chunk size. + * @return {String} the resulting string. + * @throws Error if the chunk is too big for the stack. + */ + stringifyByChunk: function(array, type, chunk) { + var result = [], k = 0, len = array.length; + if (len <= chunk) { + return String.fromCharCode.apply(null, array); + } + while (k < len) { + if (type === "array" || type === "nodebuffer") { + result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len)))); + } else { + result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len)))); + } + k += chunk; + } + return result.join(""); + }, + /** + * Call String.fromCharCode on every item in the array. + * This is the naive implementation, which generate A LOT of intermediate string. + * This should be used when everything else fail. + * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform. + * @return {String} the result. + */ + stringifyByChar: function(array) { + var resultStr = ""; + for (var i = 0; i < array.length; i++) { + resultStr += String.fromCharCode(array[i]); + } + return resultStr; + }, + applyCanBeUsed: { + /** + * true if the browser accepts to use String.fromCharCode on Uint8Array + */ + uint8array: (function() { + try { + return support.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1; + } catch (e) { + return false; + } + })(), + /** + * true if the browser accepts to use String.fromCharCode on nodejs Buffer. + */ + nodebuffer: (function() { + try { + return support.nodebuffer && String.fromCharCode.apply(null, nodejsUtils.allocBuffer(1)).length === 1; + } catch (e) { + return false; + } + })() + } + }; + function arrayLikeToString(array) { + var chunk = 65536, type = exports2.getTypeOf(array), canUseApply = true; + if (type === "uint8array") { + canUseApply = arrayToStringHelper.applyCanBeUsed.uint8array; + } else if (type === "nodebuffer") { + canUseApply = arrayToStringHelper.applyCanBeUsed.nodebuffer; + } + if (canUseApply) { + while (chunk > 1) { + try { + return arrayToStringHelper.stringifyByChunk(array, type, chunk); + } catch (e) { + chunk = Math.floor(chunk / 2); + } + } + } + return arrayToStringHelper.stringifyByChar(array); + } + exports2.applyFromCharCode = arrayLikeToString; + function arrayLikeToArrayLike(arrayFrom, arrayTo) { + for (var i = 0; i < arrayFrom.length; i++) { + arrayTo[i] = arrayFrom[i]; + } + return arrayTo; + } + var transform = {}; + transform["string"] = { + "string": identity, + "array": function(input) { + return stringToArrayLike(input, new Array(input.length)); + }, + "arraybuffer": function(input) { + return transform["string"]["uint8array"](input).buffer; + }, + "uint8array": function(input) { + return stringToArrayLike(input, new Uint8Array(input.length)); + }, + "nodebuffer": function(input) { + return stringToArrayLike(input, nodejsUtils.allocBuffer(input.length)); + } + }; + transform["array"] = { + "string": arrayLikeToString, + "array": identity, + "arraybuffer": function(input) { + return new Uint8Array(input).buffer; + }, + "uint8array": function(input) { + return new Uint8Array(input); + }, + "nodebuffer": function(input) { + return nodejsUtils.newBufferFrom(input); + } + }; + transform["arraybuffer"] = { + "string": function(input) { + return arrayLikeToString(new Uint8Array(input)); + }, + "array": function(input) { + return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength)); + }, + "arraybuffer": identity, + "uint8array": function(input) { + return new Uint8Array(input); + }, + "nodebuffer": function(input) { + return nodejsUtils.newBufferFrom(new Uint8Array(input)); + } + }; + transform["uint8array"] = { + "string": arrayLikeToString, + "array": function(input) { + return arrayLikeToArrayLike(input, new Array(input.length)); + }, + "arraybuffer": function(input) { + return input.buffer; + }, + "uint8array": identity, + "nodebuffer": function(input) { + return nodejsUtils.newBufferFrom(input); + } + }; + transform["nodebuffer"] = { + "string": arrayLikeToString, + "array": function(input) { + return arrayLikeToArrayLike(input, new Array(input.length)); + }, + "arraybuffer": function(input) { + return transform["nodebuffer"]["uint8array"](input).buffer; + }, + "uint8array": function(input) { + return arrayLikeToArrayLike(input, new Uint8Array(input.length)); + }, + "nodebuffer": identity + }; + exports2.transformTo = function(outputType, input) { + if (!input) { + input = ""; + } + if (!outputType) { + return input; + } + exports2.checkSupport(outputType); + var inputType = exports2.getTypeOf(input); + var result = transform[inputType][outputType](input); + return result; + }; + exports2.resolve = function(path) { + var parts = path.split("/"); + var result = []; + for (var index = 0; index < parts.length; index++) { + var part = parts[index]; + if (part === "." || part === "" && index !== 0 && index !== parts.length - 1) { + continue; + } else if (part === "..") { + result.pop(); + } else { + result.push(part); + } + } + return result.join("/"); + }; + exports2.getTypeOf = function(input) { + if (typeof input === "string") { + return "string"; + } + if (Object.prototype.toString.call(input) === "[object Array]") { + return "array"; + } + if (support.nodebuffer && nodejsUtils.isBuffer(input)) { + return "nodebuffer"; + } + if (support.uint8array && input instanceof Uint8Array) { + return "uint8array"; + } + if (support.arraybuffer && input instanceof ArrayBuffer) { + return "arraybuffer"; + } + }; + exports2.checkSupport = function(type) { + var supported = support[type.toLowerCase()]; + if (!supported) { + throw new Error(type + " is not supported by this platform"); + } + }; + exports2.MAX_VALUE_16BITS = 65535; + exports2.MAX_VALUE_32BITS = -1; + exports2.pretty = function(str) { + var res = "", code, i; + for (i = 0; i < (str || "").length; i++) { + code = str.charCodeAt(i); + res += "\\x" + (code < 16 ? "0" : "") + code.toString(16).toUpperCase(); + } + return res; + }; + exports2.delay = function(callback, args, self2) { + setImmediate(function() { + callback.apply(self2 || null, args || []); + }); + }; + exports2.inherits = function(ctor, superCtor) { + var Obj = function() { + }; + Obj.prototype = superCtor.prototype; + ctor.prototype = new Obj(); + }; + exports2.extend = function() { + var result = {}, i, attr; + for (i = 0; i < arguments.length; i++) { + for (attr in arguments[i]) { + if (Object.prototype.hasOwnProperty.call(arguments[i], attr) && typeof result[attr] === "undefined") { + result[attr] = arguments[i][attr]; + } + } + } + return result; + }; + exports2.prepareContent = function(name, inputData, isBinary, isOptimizedBinaryString, isBase64) { + var promise = external.Promise.resolve(inputData).then(function(data) { + var isBlob = support.blob && (data instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(data)) !== -1); + if (isBlob && typeof FileReader !== "undefined") { + return new external.Promise(function(resolve, reject) { + var reader = new FileReader(); + reader.onload = function(e) { + resolve(e.target.result); + }; + reader.onerror = function(e) { + reject(e.target.error); + }; + reader.readAsArrayBuffer(data); + }); + } else { + return data; + } + }); + return promise.then(function(data) { + var dataType = exports2.getTypeOf(data); + if (!dataType) { + return external.Promise.reject( + new Error("Can't read the data of '" + name + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?") + ); + } + if (dataType === "arraybuffer") { + data = exports2.transformTo("uint8array", data); + } else if (dataType === "string") { + if (isBase64) { + data = base64.decode(data); + } else if (isBinary) { + if (isOptimizedBinaryString !== true) { + data = string2binary(data); + } + } + } + return data; + }); + }; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/stream/GenericWorker.js +var require_GenericWorker = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/stream/GenericWorker.js"(exports2, module2) { + "use strict"; + function GenericWorker(name) { + this.name = name || "default"; + this.streamInfo = {}; + this.generatedError = null; + this.extraStreamInfo = {}; + this.isPaused = true; + this.isFinished = false; + this.isLocked = false; + this._listeners = { + "data": [], + "end": [], + "error": [] + }; + this.previous = null; + } + GenericWorker.prototype = { + /** + * Push a chunk to the next workers. + * @param {Object} chunk the chunk to push + */ + push: function(chunk) { + this.emit("data", chunk); + }, + /** + * End the stream. + * @return {Boolean} true if this call ended the worker, false otherwise. + */ + end: function() { + if (this.isFinished) { + return false; + } + this.flush(); + try { + this.emit("end"); + this.cleanUp(); + this.isFinished = true; + } catch (e) { + this.emit("error", e); + } + return true; + }, + /** + * End the stream with an error. + * @param {Error} e the error which caused the premature end. + * @return {Boolean} true if this call ended the worker with an error, false otherwise. + */ + error: function(e) { + if (this.isFinished) { + return false; + } + if (this.isPaused) { + this.generatedError = e; + } else { + this.isFinished = true; + this.emit("error", e); + if (this.previous) { + this.previous.error(e); + } + this.cleanUp(); + } + return true; + }, + /** + * Add a callback on an event. + * @param {String} name the name of the event (data, end, error) + * @param {Function} listener the function to call when the event is triggered + * @return {GenericWorker} the current object for chainability + */ + on: function(name, listener) { + this._listeners[name].push(listener); + return this; + }, + /** + * Clean any references when a worker is ending. + */ + cleanUp: function() { + this.streamInfo = this.generatedError = this.extraStreamInfo = null; + this._listeners = []; + }, + /** + * Trigger an event. This will call registered callback with the provided arg. + * @param {String} name the name of the event (data, end, error) + * @param {Object} arg the argument to call the callback with. + */ + emit: function(name, arg) { + if (this._listeners[name]) { + for (var i = 0; i < this._listeners[name].length; i++) { + this._listeners[name][i].call(this, arg); + } + } + }, + /** + * Chain a worker with an other. + * @param {Worker} next the worker receiving events from the current one. + * @return {worker} the next worker for chainability + */ + pipe: function(next) { + return next.registerPrevious(this); + }, + /** + * Same as `pipe` in the other direction. + * Using an API with `pipe(next)` is very easy. + * Implementing the API with the point of view of the next one registering + * a source is easier, see the ZipFileWorker. + * @param {Worker} previous the previous worker, sending events to this one + * @return {Worker} the current worker for chainability + */ + registerPrevious: function(previous) { + if (this.isLocked) { + throw new Error("The stream '" + this + "' has already been used."); + } + this.streamInfo = previous.streamInfo; + this.mergeStreamInfo(); + this.previous = previous; + var self2 = this; + previous.on("data", function(chunk) { + self2.processChunk(chunk); + }); + previous.on("end", function() { + self2.end(); + }); + previous.on("error", function(e) { + self2.error(e); + }); + return this; + }, + /** + * Pause the stream so it doesn't send events anymore. + * @return {Boolean} true if this call paused the worker, false otherwise. + */ + pause: function() { + if (this.isPaused || this.isFinished) { + return false; + } + this.isPaused = true; + if (this.previous) { + this.previous.pause(); + } + return true; + }, + /** + * Resume a paused stream. + * @return {Boolean} true if this call resumed the worker, false otherwise. + */ + resume: function() { + if (!this.isPaused || this.isFinished) { + return false; + } + this.isPaused = false; + var withError = false; + if (this.generatedError) { + this.error(this.generatedError); + withError = true; + } + if (this.previous) { + this.previous.resume(); + } + return !withError; + }, + /** + * Flush any remaining bytes as the stream is ending. + */ + flush: function() { + }, + /** + * Process a chunk. This is usually the method overridden. + * @param {Object} chunk the chunk to process. + */ + processChunk: function(chunk) { + this.push(chunk); + }, + /** + * Add a key/value to be added in the workers chain streamInfo once activated. + * @param {String} key the key to use + * @param {Object} value the associated value + * @return {Worker} the current worker for chainability + */ + withStreamInfo: function(key, value) { + this.extraStreamInfo[key] = value; + this.mergeStreamInfo(); + return this; + }, + /** + * Merge this worker's streamInfo into the chain's streamInfo. + */ + mergeStreamInfo: function() { + for (var key in this.extraStreamInfo) { + if (!Object.prototype.hasOwnProperty.call(this.extraStreamInfo, key)) { + continue; + } + this.streamInfo[key] = this.extraStreamInfo[key]; + } + }, + /** + * Lock the stream to prevent further updates on the workers chain. + * After calling this method, all calls to pipe will fail. + */ + lock: function() { + if (this.isLocked) { + throw new Error("The stream '" + this + "' has already been used."); + } + this.isLocked = true; + if (this.previous) { + this.previous.lock(); + } + }, + /** + * + * Pretty print the workers chain. + */ + toString: function() { + var me = "Worker " + this.name; + if (this.previous) { + return this.previous + " -> " + me; + } else { + return me; + } + } + }; + module2.exports = GenericWorker; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/utf8.js +var require_utf8 = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/utf8.js"(exports2) { + "use strict"; + var utils = require_utils20(); + var support = require_support(); + var nodejsUtils = require_nodejsUtils(); + var GenericWorker = require_GenericWorker(); + var _utf8len = new Array(256); + for (i = 0; i < 256; i++) { + _utf8len[i] = i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1; + } + var i; + _utf8len[254] = _utf8len[254] = 1; + var string2buf = function(str) { + var buf, c, c2, m_pos, i2, str_len = str.length, buf_len = 0; + for (m_pos = 0; m_pos < str_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 64512) === 55296 && m_pos + 1 < str_len) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 64512) === 56320) { + c = 65536 + (c - 55296 << 10) + (c2 - 56320); + m_pos++; + } + } + buf_len += c < 128 ? 1 : c < 2048 ? 2 : c < 65536 ? 3 : 4; + } + if (support.uint8array) { + buf = new Uint8Array(buf_len); + } else { + buf = new Array(buf_len); + } + for (i2 = 0, m_pos = 0; i2 < buf_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 64512) === 55296 && m_pos + 1 < str_len) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 64512) === 56320) { + c = 65536 + (c - 55296 << 10) + (c2 - 56320); + m_pos++; + } + } + if (c < 128) { + buf[i2++] = c; + } else if (c < 2048) { + buf[i2++] = 192 | c >>> 6; + buf[i2++] = 128 | c & 63; + } else if (c < 65536) { + buf[i2++] = 224 | c >>> 12; + buf[i2++] = 128 | c >>> 6 & 63; + buf[i2++] = 128 | c & 63; + } else { + buf[i2++] = 240 | c >>> 18; + buf[i2++] = 128 | c >>> 12 & 63; + buf[i2++] = 128 | c >>> 6 & 63; + buf[i2++] = 128 | c & 63; + } + } + return buf; + }; + var utf8border = function(buf, max) { + var pos; + max = max || buf.length; + if (max > buf.length) { + max = buf.length; + } + pos = max - 1; + while (pos >= 0 && (buf[pos] & 192) === 128) { + pos--; + } + if (pos < 0) { + return max; + } + if (pos === 0) { + return max; + } + return pos + _utf8len[buf[pos]] > max ? pos : max; + }; + var buf2string = function(buf) { + var i2, out, c, c_len; + var len = buf.length; + var utf16buf = new Array(len * 2); + for (out = 0, i2 = 0; i2 < len; ) { + c = buf[i2++]; + if (c < 128) { + utf16buf[out++] = c; + continue; + } + c_len = _utf8len[c]; + if (c_len > 4) { + utf16buf[out++] = 65533; + i2 += c_len - 1; + continue; + } + c &= c_len === 2 ? 31 : c_len === 3 ? 15 : 7; + while (c_len > 1 && i2 < len) { + c = c << 6 | buf[i2++] & 63; + c_len--; + } + if (c_len > 1) { + utf16buf[out++] = 65533; + continue; + } + if (c < 65536) { + utf16buf[out++] = c; + } else { + c -= 65536; + utf16buf[out++] = 55296 | c >> 10 & 1023; + utf16buf[out++] = 56320 | c & 1023; + } + } + if (utf16buf.length !== out) { + if (utf16buf.subarray) { + utf16buf = utf16buf.subarray(0, out); + } else { + utf16buf.length = out; + } + } + return utils.applyFromCharCode(utf16buf); + }; + exports2.utf8encode = function utf8encode(str) { + if (support.nodebuffer) { + return nodejsUtils.newBufferFrom(str, "utf-8"); + } + return string2buf(str); + }; + exports2.utf8decode = function utf8decode(buf) { + if (support.nodebuffer) { + return utils.transformTo("nodebuffer", buf).toString("utf-8"); + } + buf = utils.transformTo(support.uint8array ? "uint8array" : "array", buf); + return buf2string(buf); + }; + function Utf8DecodeWorker() { + GenericWorker.call(this, "utf-8 decode"); + this.leftOver = null; + } + utils.inherits(Utf8DecodeWorker, GenericWorker); + Utf8DecodeWorker.prototype.processChunk = function(chunk) { + var data = utils.transformTo(support.uint8array ? "uint8array" : "array", chunk.data); + if (this.leftOver && this.leftOver.length) { + if (support.uint8array) { + var previousData = data; + data = new Uint8Array(previousData.length + this.leftOver.length); + data.set(this.leftOver, 0); + data.set(previousData, this.leftOver.length); + } else { + data = this.leftOver.concat(data); + } + this.leftOver = null; + } + var nextBoundary = utf8border(data); + var usableData = data; + if (nextBoundary !== data.length) { + if (support.uint8array) { + usableData = data.subarray(0, nextBoundary); + this.leftOver = data.subarray(nextBoundary, data.length); + } else { + usableData = data.slice(0, nextBoundary); + this.leftOver = data.slice(nextBoundary, data.length); + } + } + this.push({ + data: exports2.utf8decode(usableData), + meta: chunk.meta + }); + }; + Utf8DecodeWorker.prototype.flush = function() { + if (this.leftOver && this.leftOver.length) { + this.push({ + data: exports2.utf8decode(this.leftOver), + meta: {} + }); + this.leftOver = null; + } + }; + exports2.Utf8DecodeWorker = Utf8DecodeWorker; + function Utf8EncodeWorker() { + GenericWorker.call(this, "utf-8 encode"); + } + utils.inherits(Utf8EncodeWorker, GenericWorker); + Utf8EncodeWorker.prototype.processChunk = function(chunk) { + this.push({ + data: exports2.utf8encode(chunk.data), + meta: chunk.meta + }); + }; + exports2.Utf8EncodeWorker = Utf8EncodeWorker; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/stream/ConvertWorker.js +var require_ConvertWorker = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/stream/ConvertWorker.js"(exports2, module2) { + "use strict"; + var GenericWorker = require_GenericWorker(); + var utils = require_utils20(); + function ConvertWorker(destType) { + GenericWorker.call(this, "ConvertWorker to " + destType); + this.destType = destType; + } + utils.inherits(ConvertWorker, GenericWorker); + ConvertWorker.prototype.processChunk = function(chunk) { + this.push({ + data: utils.transformTo(this.destType, chunk.data), + meta: chunk.meta + }); + }; + module2.exports = ConvertWorker; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +var require_NodejsStreamOutputAdapter = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js"(exports2, module2) { + "use strict"; + var Readable = require_readable2().Readable; + var utils = require_utils20(); + utils.inherits(NodejsStreamOutputAdapter, Readable); + function NodejsStreamOutputAdapter(helper, options, updateCb) { + Readable.call(this, options); + this._helper = helper; + var self2 = this; + helper.on("data", function(data, meta) { + if (!self2.push(data)) { + self2._helper.pause(); + } + if (updateCb) { + updateCb(meta); + } + }).on("error", function(e) { + self2.emit("error", e); + }).on("end", function() { + self2.push(null); + }); + } + NodejsStreamOutputAdapter.prototype._read = function() { + this._helper.resume(); + }; + module2.exports = NodejsStreamOutputAdapter; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/stream/StreamHelper.js +var require_StreamHelper = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/stream/StreamHelper.js"(exports2, module2) { + "use strict"; + var utils = require_utils20(); + var ConvertWorker = require_ConvertWorker(); + var GenericWorker = require_GenericWorker(); + var base64 = require_base64(); + var support = require_support(); + var external = require_external(); + var NodejsStreamOutputAdapter = null; + if (support.nodestream) { + try { + NodejsStreamOutputAdapter = require_NodejsStreamOutputAdapter(); + } catch (e) { + } + } + function transformZipOutput(type, content, mimeType) { + switch (type) { + case "blob": + return utils.newBlob(utils.transformTo("arraybuffer", content), mimeType); + case "base64": + return base64.encode(content); + default: + return utils.transformTo(type, content); + } + } + function concat(type, dataArray) { + var i, index = 0, res = null, totalLength = 0; + for (i = 0; i < dataArray.length; i++) { + totalLength += dataArray[i].length; + } + switch (type) { + case "string": + return dataArray.join(""); + case "array": + return Array.prototype.concat.apply([], dataArray); + case "uint8array": + res = new Uint8Array(totalLength); + for (i = 0; i < dataArray.length; i++) { + res.set(dataArray[i], index); + index += dataArray[i].length; + } + return res; + case "nodebuffer": + return Buffer.concat(dataArray); + default: + throw new Error("concat : unsupported type '" + type + "'"); + } + } + function accumulate(helper, updateCallback) { + return new external.Promise(function(resolve, reject) { + var dataArray = []; + var chunkType = helper._internalType, resultType = helper._outputType, mimeType = helper._mimeType; + helper.on("data", function(data, meta) { + dataArray.push(data); + if (updateCallback) { + updateCallback(meta); + } + }).on("error", function(err) { + dataArray = []; + reject(err); + }).on("end", function() { + try { + var result = transformZipOutput(resultType, concat(chunkType, dataArray), mimeType); + resolve(result); + } catch (e) { + reject(e); + } + dataArray = []; + }).resume(); + }); + } + function StreamHelper(worker, outputType, mimeType) { + var internalType = outputType; + switch (outputType) { + case "blob": + case "arraybuffer": + internalType = "uint8array"; + break; + case "base64": + internalType = "string"; + break; + } + try { + this._internalType = internalType; + this._outputType = outputType; + this._mimeType = mimeType; + utils.checkSupport(internalType); + this._worker = worker.pipe(new ConvertWorker(internalType)); + worker.lock(); + } catch (e) { + this._worker = new GenericWorker("error"); + this._worker.error(e); + } + } + StreamHelper.prototype = { + /** + * Listen a StreamHelper, accumulate its content and concatenate it into a + * complete block. + * @param {Function} updateCb the update callback. + * @return Promise the promise for the accumulation. + */ + accumulate: function(updateCb) { + return accumulate(this, updateCb); + }, + /** + * Add a listener on an event triggered on a stream. + * @param {String} evt the name of the event + * @param {Function} fn the listener + * @return {StreamHelper} the current helper. + */ + on: function(evt, fn) { + var self2 = this; + if (evt === "data") { + this._worker.on(evt, function(chunk) { + fn.call(self2, chunk.data, chunk.meta); + }); + } else { + this._worker.on(evt, function() { + utils.delay(fn, arguments, self2); + }); + } + return this; + }, + /** + * Resume the flow of chunks. + * @return {StreamHelper} the current helper. + */ + resume: function() { + utils.delay(this._worker.resume, [], this._worker); + return this; + }, + /** + * Pause the flow of chunks. + * @return {StreamHelper} the current helper. + */ + pause: function() { + this._worker.pause(); + return this; + }, + /** + * Return a nodejs stream for this helper. + * @param {Function} updateCb the update callback. + * @return {NodejsStreamOutputAdapter} the nodejs stream. + */ + toNodejsStream: function(updateCb) { + utils.checkSupport("nodestream"); + if (this._outputType !== "nodebuffer") { + throw new Error(this._outputType + " is not supported by this method"); + } + return new NodejsStreamOutputAdapter(this, { + objectMode: this._outputType !== "nodebuffer" + }, updateCb); + } + }; + module2.exports = StreamHelper; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/defaults.js +var require_defaults2 = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/defaults.js"(exports2) { + "use strict"; + exports2.base64 = false; + exports2.binary = false; + exports2.dir = false; + exports2.createFolders = true; + exports2.date = null; + exports2.compression = null; + exports2.compressionOptions = null; + exports2.comment = null; + exports2.unixPermissions = null; + exports2.dosPermissions = null; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/stream/DataWorker.js +var require_DataWorker = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/stream/DataWorker.js"(exports2, module2) { + "use strict"; + var utils = require_utils20(); + var GenericWorker = require_GenericWorker(); + var DEFAULT_BLOCK_SIZE = 16 * 1024; + function DataWorker(dataP) { + GenericWorker.call(this, "DataWorker"); + var self2 = this; + this.dataIsReady = false; + this.index = 0; + this.max = 0; + this.data = null; + this.type = ""; + this._tickScheduled = false; + dataP.then(function(data) { + self2.dataIsReady = true; + self2.data = data; + self2.max = data && data.length || 0; + self2.type = utils.getTypeOf(data); + if (!self2.isPaused) { + self2._tickAndRepeat(); + } + }, function(e) { + self2.error(e); + }); + } + utils.inherits(DataWorker, GenericWorker); + DataWorker.prototype.cleanUp = function() { + GenericWorker.prototype.cleanUp.call(this); + this.data = null; + }; + DataWorker.prototype.resume = function() { + if (!GenericWorker.prototype.resume.call(this)) { + return false; + } + if (!this._tickScheduled && this.dataIsReady) { + this._tickScheduled = true; + utils.delay(this._tickAndRepeat, [], this); + } + return true; + }; + DataWorker.prototype._tickAndRepeat = function() { + this._tickScheduled = false; + if (this.isPaused || this.isFinished) { + return; + } + this._tick(); + if (!this.isFinished) { + utils.delay(this._tickAndRepeat, [], this); + this._tickScheduled = true; + } + }; + DataWorker.prototype._tick = function() { + if (this.isPaused || this.isFinished) { + return false; + } + var size = DEFAULT_BLOCK_SIZE; + var data = null, nextIndex = Math.min(this.max, this.index + size); + if (this.index >= this.max) { + return this.end(); + } else { + switch (this.type) { + case "string": + data = this.data.substring(this.index, nextIndex); + break; + case "uint8array": + data = this.data.subarray(this.index, nextIndex); + break; + case "array": + case "nodebuffer": + data = this.data.slice(this.index, nextIndex); + break; + } + this.index = nextIndex; + return this.push({ + data, + meta: { + percent: this.max ? this.index / this.max * 100 : 0 + } + }); + } + }; + module2.exports = DataWorker; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/crc32.js +var require_crc32 = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/crc32.js"(exports2, module2) { + "use strict"; + var utils = require_utils20(); + function makeTable() { + var c, table = []; + for (var n = 0; n < 256; n++) { + c = n; + for (var k = 0; k < 8; k++) { + c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1; + } + table[n] = c; + } + return table; + } + var crcTable = makeTable(); + function crc32(crc, buf, len, pos) { + var t = crcTable, end = pos + len; + crc = crc ^ -1; + for (var i = pos; i < end; i++) { + crc = crc >>> 8 ^ t[(crc ^ buf[i]) & 255]; + } + return crc ^ -1; + } + function crc32str(crc, str, len, pos) { + var t = crcTable, end = pos + len; + crc = crc ^ -1; + for (var i = pos; i < end; i++) { + crc = crc >>> 8 ^ t[(crc ^ str.charCodeAt(i)) & 255]; + } + return crc ^ -1; + } + module2.exports = function crc32wrapper(input, crc) { + if (typeof input === "undefined" || !input.length) { + return 0; + } + var isArray = utils.getTypeOf(input) !== "string"; + if (isArray) { + return crc32(crc | 0, input, input.length, 0); + } else { + return crc32str(crc | 0, input, input.length, 0); + } + }; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/stream/Crc32Probe.js +var require_Crc32Probe = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/stream/Crc32Probe.js"(exports2, module2) { + "use strict"; + var GenericWorker = require_GenericWorker(); + var crc32 = require_crc32(); + var utils = require_utils20(); + function Crc32Probe() { + GenericWorker.call(this, "Crc32Probe"); + this.withStreamInfo("crc32", 0); + } + utils.inherits(Crc32Probe, GenericWorker); + Crc32Probe.prototype.processChunk = function(chunk) { + this.streamInfo.crc32 = crc32(chunk.data, this.streamInfo.crc32 || 0); + this.push(chunk); + }; + module2.exports = Crc32Probe; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/stream/DataLengthProbe.js +var require_DataLengthProbe = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/stream/DataLengthProbe.js"(exports2, module2) { + "use strict"; + var utils = require_utils20(); + var GenericWorker = require_GenericWorker(); + function DataLengthProbe(propName) { + GenericWorker.call(this, "DataLengthProbe for " + propName); + this.propName = propName; + this.withStreamInfo(propName, 0); + } + utils.inherits(DataLengthProbe, GenericWorker); + DataLengthProbe.prototype.processChunk = function(chunk) { + if (chunk) { + var length = this.streamInfo[this.propName] || 0; + this.streamInfo[this.propName] = length + chunk.data.length; + } + GenericWorker.prototype.processChunk.call(this, chunk); + }; + module2.exports = DataLengthProbe; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/compressedObject.js +var require_compressedObject = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/compressedObject.js"(exports2, module2) { + "use strict"; + var external = require_external(); + var DataWorker = require_DataWorker(); + var Crc32Probe = require_Crc32Probe(); + var DataLengthProbe = require_DataLengthProbe(); + function CompressedObject(compressedSize, uncompressedSize, crc32, compression, data) { + this.compressedSize = compressedSize; + this.uncompressedSize = uncompressedSize; + this.crc32 = crc32; + this.compression = compression; + this.compressedContent = data; + } + CompressedObject.prototype = { + /** + * Create a worker to get the uncompressed content. + * @return {GenericWorker} the worker. + */ + getContentWorker: function() { + var worker = new DataWorker(external.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new DataLengthProbe("data_length")); + var that = this; + worker.on("end", function() { + if (this.streamInfo["data_length"] !== that.uncompressedSize) { + throw new Error("Bug : uncompressed data size mismatch"); + } + }); + return worker; + }, + /** + * Create a worker to get the compressed content. + * @return {GenericWorker} the worker. + */ + getCompressedWorker: function() { + return new DataWorker(external.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression); + } + }; + CompressedObject.createWorkerFrom = function(uncompressedWorker, compression, compressionOptions) { + return uncompressedWorker.pipe(new Crc32Probe()).pipe(new DataLengthProbe("uncompressedSize")).pipe(compression.compressWorker(compressionOptions)).pipe(new DataLengthProbe("compressedSize")).withStreamInfo("compression", compression); + }; + module2.exports = CompressedObject; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/zipObject.js +var require_zipObject = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/zipObject.js"(exports2, module2) { + "use strict"; + var StreamHelper = require_StreamHelper(); + var DataWorker = require_DataWorker(); + var utf8 = require_utf8(); + var CompressedObject = require_compressedObject(); + var GenericWorker = require_GenericWorker(); + var ZipObject = function(name, data, options) { + this.name = name; + this.dir = options.dir; + this.date = options.date; + this.comment = options.comment; + this.unixPermissions = options.unixPermissions; + this.dosPermissions = options.dosPermissions; + this._data = data; + this._dataBinary = options.binary; + this.options = { + compression: options.compression, + compressionOptions: options.compressionOptions + }; + }; + ZipObject.prototype = { + /** + * Create an internal stream for the content of this object. + * @param {String} type the type of each chunk. + * @return StreamHelper the stream. + */ + internalStream: function(type) { + var result = null, outputType = "string"; + try { + if (!type) { + throw new Error("No output type specified."); + } + outputType = type.toLowerCase(); + var askUnicodeString = outputType === "string" || outputType === "text"; + if (outputType === "binarystring" || outputType === "text") { + outputType = "string"; + } + result = this._decompressWorker(); + var isUnicodeString = !this._dataBinary; + if (isUnicodeString && !askUnicodeString) { + result = result.pipe(new utf8.Utf8EncodeWorker()); + } + if (!isUnicodeString && askUnicodeString) { + result = result.pipe(new utf8.Utf8DecodeWorker()); + } + } catch (e) { + result = new GenericWorker("error"); + result.error(e); + } + return new StreamHelper(result, outputType, ""); + }, + /** + * Prepare the content in the asked type. + * @param {String} type the type of the result. + * @param {Function} onUpdate a function to call on each internal update. + * @return Promise the promise of the result. + */ + async: function(type, onUpdate) { + return this.internalStream(type).accumulate(onUpdate); + }, + /** + * Prepare the content as a nodejs stream. + * @param {String} type the type of each chunk. + * @param {Function} onUpdate a function to call on each internal update. + * @return Stream the stream. + */ + nodeStream: function(type, onUpdate) { + return this.internalStream(type || "nodebuffer").toNodejsStream(onUpdate); + }, + /** + * Return a worker for the compressed content. + * @private + * @param {Object} compression the compression object to use. + * @param {Object} compressionOptions the options to use when compressing. + * @return Worker the worker. + */ + _compressWorker: function(compression, compressionOptions) { + if (this._data instanceof CompressedObject && this._data.compression.magic === compression.magic) { + return this._data.getCompressedWorker(); + } else { + var result = this._decompressWorker(); + if (!this._dataBinary) { + result = result.pipe(new utf8.Utf8EncodeWorker()); + } + return CompressedObject.createWorkerFrom(result, compression, compressionOptions); + } + }, + /** + * Return a worker for the decompressed content. + * @private + * @return Worker the worker. + */ + _decompressWorker: function() { + if (this._data instanceof CompressedObject) { + return this._data.getContentWorker(); + } else if (this._data instanceof GenericWorker) { + return this._data; + } else { + return new DataWorker(this._data); + } + } + }; + var removedMethods = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"]; + var removedFn = function() { + throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); + }; + for (i = 0; i < removedMethods.length; i++) { + ZipObject.prototype[removedMethods[i]] = removedFn; + } + var i; + module2.exports = ZipObject; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/common.js +var require_common4 = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/common.js"(exports2) { + "use strict"; + var TYPED_OK = typeof Uint8Array !== "undefined" && typeof Uint16Array !== "undefined" && typeof Int32Array !== "undefined"; + function _has(obj2, key) { + return Object.prototype.hasOwnProperty.call(obj2, key); + } + exports2.assign = function(obj2) { + var sources = Array.prototype.slice.call(arguments, 1); + while (sources.length) { + var source = sources.shift(); + if (!source) { + continue; + } + if (typeof source !== "object") { + throw new TypeError(source + "must be non-object"); + } + for (var p in source) { + if (_has(source, p)) { + obj2[p] = source[p]; + } + } + } + return obj2; + }; + exports2.shrinkBuf = function(buf, size) { + if (buf.length === size) { + return buf; + } + if (buf.subarray) { + return buf.subarray(0, size); + } + buf.length = size; + return buf; + }; + var fnTyped = { + arraySet: function(dest, src, src_offs, len, dest_offs) { + if (src.subarray && dest.subarray) { + dest.set(src.subarray(src_offs, src_offs + len), dest_offs); + return; + } + for (var i = 0; i < len; i++) { + dest[dest_offs + i] = src[src_offs + i]; + } + }, + // Join array of chunks to single array. + flattenChunks: function(chunks) { + var i, l2, len, pos, chunk, result; + len = 0; + for (i = 0, l2 = chunks.length; i < l2; i++) { + len += chunks[i].length; + } + result = new Uint8Array(len); + pos = 0; + for (i = 0, l2 = chunks.length; i < l2; i++) { + chunk = chunks[i]; + result.set(chunk, pos); + pos += chunk.length; + } + return result; + } + }; + var fnUntyped = { + arraySet: function(dest, src, src_offs, len, dest_offs) { + for (var i = 0; i < len; i++) { + dest[dest_offs + i] = src[src_offs + i]; + } + }, + // Join array of chunks to single array. + flattenChunks: function(chunks) { + return [].concat.apply([], chunks); + } + }; + exports2.setTyped = function(on) { + if (on) { + exports2.Buf8 = Uint8Array; + exports2.Buf16 = Uint16Array; + exports2.Buf32 = Int32Array; + exports2.assign(exports2, fnTyped); + } else { + exports2.Buf8 = Array; + exports2.Buf16 = Array; + exports2.Buf32 = Array; + exports2.assign(exports2, fnUntyped); + } + }; + exports2.setTyped(TYPED_OK); + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/trees.js +var require_trees = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/trees.js"(exports2) { + "use strict"; + var utils = require_common4(); + var Z_FIXED = 4; + var Z_BINARY = 0; + var Z_TEXT = 1; + var Z_UNKNOWN = 2; + function zero(buf) { + var len = buf.length; + while (--len >= 0) { + buf[len] = 0; + } + } + var STORED_BLOCK = 0; + var STATIC_TREES = 1; + var DYN_TREES = 2; + var MIN_MATCH = 3; + var MAX_MATCH = 258; + var LENGTH_CODES = 29; + var LITERALS = 256; + var L_CODES = LITERALS + 1 + LENGTH_CODES; + var D_CODES = 30; + var BL_CODES = 19; + var HEAP_SIZE = 2 * L_CODES + 1; + var MAX_BITS = 15; + var Buf_size = 16; + var MAX_BL_BITS = 7; + var END_BLOCK = 256; + var REP_3_6 = 16; + var REPZ_3_10 = 17; + var REPZ_11_138 = 18; + var extra_lbits = ( + /* extra bits for each length code */ + [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0] + ); + var extra_dbits = ( + /* extra bits for each distance code */ + [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13] + ); + var extra_blbits = ( + /* extra bits for each bit length code */ + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7] + ); + var bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; + var DIST_CODE_LEN = 512; + var static_ltree = new Array((L_CODES + 2) * 2); + zero(static_ltree); + var static_dtree = new Array(D_CODES * 2); + zero(static_dtree); + var _dist_code = new Array(DIST_CODE_LEN); + zero(_dist_code); + var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); + zero(_length_code); + var base_length = new Array(LENGTH_CODES); + zero(base_length); + var base_dist = new Array(D_CODES); + zero(base_dist); + function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { + this.static_tree = static_tree; + this.extra_bits = extra_bits; + this.extra_base = extra_base; + this.elems = elems; + this.max_length = max_length; + this.has_stree = static_tree && static_tree.length; + } + var static_l_desc; + var static_d_desc; + var static_bl_desc; + function TreeDesc(dyn_tree, stat_desc) { + this.dyn_tree = dyn_tree; + this.max_code = 0; + this.stat_desc = stat_desc; + } + function d_code(dist) { + return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; + } + function put_short(s, w) { + s.pending_buf[s.pending++] = w & 255; + s.pending_buf[s.pending++] = w >>> 8 & 255; + } + function send_bits(s, value, length) { + if (s.bi_valid > Buf_size - length) { + s.bi_buf |= value << s.bi_valid & 65535; + put_short(s, s.bi_buf); + s.bi_buf = value >> Buf_size - s.bi_valid; + s.bi_valid += length - Buf_size; + } else { + s.bi_buf |= value << s.bi_valid & 65535; + s.bi_valid += length; + } + } + function send_code(s, c, tree) { + send_bits( + s, + tree[c * 2], + tree[c * 2 + 1] + /*.Len*/ + ); + } + function bi_reverse(code, len) { + var res = 0; + do { + res |= code & 1; + code >>>= 1; + res <<= 1; + } while (--len > 0); + return res >>> 1; + } + function bi_flush(s) { + if (s.bi_valid === 16) { + put_short(s, s.bi_buf); + s.bi_buf = 0; + s.bi_valid = 0; + } else if (s.bi_valid >= 8) { + s.pending_buf[s.pending++] = s.bi_buf & 255; + s.bi_buf >>= 8; + s.bi_valid -= 8; + } + } + function gen_bitlen(s, desc) { + var tree = desc.dyn_tree; + var max_code = desc.max_code; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var extra = desc.stat_desc.extra_bits; + var base = desc.stat_desc.extra_base; + var max_length = desc.stat_desc.max_length; + var h; + var n, m; + var bits; + var xbits; + var f; + var overflow = 0; + for (bits = 0; bits <= MAX_BITS; bits++) { + s.bl_count[bits] = 0; + } + tree[s.heap[s.heap_max] * 2 + 1] = 0; + for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { + n = s.heap[h]; + bits = tree[tree[n * 2 + 1] * 2 + 1] + 1; + if (bits > max_length) { + bits = max_length; + overflow++; + } + tree[n * 2 + 1] = bits; + if (n > max_code) { + continue; + } + s.bl_count[bits]++; + xbits = 0; + if (n >= base) { + xbits = extra[n - base]; + } + f = tree[n * 2]; + s.opt_len += f * (bits + xbits); + if (has_stree) { + s.static_len += f * (stree[n * 2 + 1] + xbits); + } + } + if (overflow === 0) { + return; + } + do { + bits = max_length - 1; + while (s.bl_count[bits] === 0) { + bits--; + } + s.bl_count[bits]--; + s.bl_count[bits + 1] += 2; + s.bl_count[max_length]--; + overflow -= 2; + } while (overflow > 0); + for (bits = max_length; bits !== 0; bits--) { + n = s.bl_count[bits]; + while (n !== 0) { + m = s.heap[--h]; + if (m > max_code) { + continue; + } + if (tree[m * 2 + 1] !== bits) { + s.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2]; + tree[m * 2 + 1] = bits; + } + n--; + } + } + } + function gen_codes(tree, max_code, bl_count) { + var next_code = new Array(MAX_BITS + 1); + var code = 0; + var bits; + var n; + for (bits = 1; bits <= MAX_BITS; bits++) { + next_code[bits] = code = code + bl_count[bits - 1] << 1; + } + for (n = 0; n <= max_code; n++) { + var len = tree[n * 2 + 1]; + if (len === 0) { + continue; + } + tree[n * 2] = bi_reverse(next_code[len]++, len); + } + } + function tr_static_init() { + var n; + var bits; + var length; + var code; + var dist; + var bl_count = new Array(MAX_BITS + 1); + length = 0; + for (code = 0; code < LENGTH_CODES - 1; code++) { + base_length[code] = length; + for (n = 0; n < 1 << extra_lbits[code]; n++) { + _length_code[length++] = code; + } + } + _length_code[length - 1] = code; + dist = 0; + for (code = 0; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < 1 << extra_dbits[code]; n++) { + _dist_code[dist++] = code; + } + } + dist >>= 7; + for (; code < D_CODES; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < 1 << extra_dbits[code] - 7; n++) { + _dist_code[256 + dist++] = code; + } + } + for (bits = 0; bits <= MAX_BITS; bits++) { + bl_count[bits] = 0; + } + n = 0; + while (n <= 143) { + static_ltree[n * 2 + 1] = 8; + n++; + bl_count[8]++; + } + while (n <= 255) { + static_ltree[n * 2 + 1] = 9; + n++; + bl_count[9]++; + } + while (n <= 279) { + static_ltree[n * 2 + 1] = 7; + n++; + bl_count[7]++; + } + while (n <= 287) { + static_ltree[n * 2 + 1] = 8; + n++; + bl_count[8]++; + } + gen_codes(static_ltree, L_CODES + 1, bl_count); + for (n = 0; n < D_CODES; n++) { + static_dtree[n * 2 + 1] = 5; + static_dtree[n * 2] = bi_reverse(n, 5); + } + static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); + static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); + static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); + } + function init_block(s) { + var n; + for (n = 0; n < L_CODES; n++) { + s.dyn_ltree[n * 2] = 0; + } + for (n = 0; n < D_CODES; n++) { + s.dyn_dtree[n * 2] = 0; + } + for (n = 0; n < BL_CODES; n++) { + s.bl_tree[n * 2] = 0; + } + s.dyn_ltree[END_BLOCK * 2] = 1; + s.opt_len = s.static_len = 0; + s.last_lit = s.matches = 0; + } + function bi_windup(s) { + if (s.bi_valid > 8) { + put_short(s, s.bi_buf); + } else if (s.bi_valid > 0) { + s.pending_buf[s.pending++] = s.bi_buf; + } + s.bi_buf = 0; + s.bi_valid = 0; + } + function copy_block(s, buf, len, header) { + bi_windup(s); + if (header) { + put_short(s, len); + put_short(s, ~len); + } + utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); + s.pending += len; + } + function smaller(tree, n, m, depth) { + var _n2 = n * 2; + var _m2 = m * 2; + return tree[_n2] < tree[_m2] || tree[_n2] === tree[_m2] && depth[n] <= depth[m]; + } + function pqdownheap(s, tree, k) { + var v = s.heap[k]; + var j = k << 1; + while (j <= s.heap_len) { + if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { + j++; + } + if (smaller(tree, v, s.heap[j], s.depth)) { + break; + } + s.heap[k] = s.heap[j]; + k = j; + j <<= 1; + } + s.heap[k] = v; + } + function compress_block(s, ltree, dtree) { + var dist; + var lc; + var lx = 0; + var code; + var extra; + if (s.last_lit !== 0) { + do { + dist = s.pending_buf[s.d_buf + lx * 2] << 8 | s.pending_buf[s.d_buf + lx * 2 + 1]; + lc = s.pending_buf[s.l_buf + lx]; + lx++; + if (dist === 0) { + send_code(s, lc, ltree); + } else { + code = _length_code[lc]; + send_code(s, code + LITERALS + 1, ltree); + extra = extra_lbits[code]; + if (extra !== 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); + } + dist--; + code = d_code(dist); + send_code(s, code, dtree); + extra = extra_dbits[code]; + if (extra !== 0) { + dist -= base_dist[code]; + send_bits(s, dist, extra); + } + } + } while (lx < s.last_lit); + } + send_code(s, END_BLOCK, ltree); + } + function build_tree(s, desc) { + var tree = desc.dyn_tree; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var elems = desc.stat_desc.elems; + var n, m; + var max_code = -1; + var node; + s.heap_len = 0; + s.heap_max = HEAP_SIZE; + for (n = 0; n < elems; n++) { + if (tree[n * 2] !== 0) { + s.heap[++s.heap_len] = max_code = n; + s.depth[n] = 0; + } else { + tree[n * 2 + 1] = 0; + } + } + while (s.heap_len < 2) { + node = s.heap[++s.heap_len] = max_code < 2 ? ++max_code : 0; + tree[node * 2] = 1; + s.depth[node] = 0; + s.opt_len--; + if (has_stree) { + s.static_len -= stree[node * 2 + 1]; + } + } + desc.max_code = max_code; + for (n = s.heap_len >> 1; n >= 1; n--) { + pqdownheap(s, tree, n); + } + node = elems; + do { + n = s.heap[ + 1 + /*SMALLEST*/ + ]; + s.heap[ + 1 + /*SMALLEST*/ + ] = s.heap[s.heap_len--]; + pqdownheap( + s, + tree, + 1 + /*SMALLEST*/ + ); + m = s.heap[ + 1 + /*SMALLEST*/ + ]; + s.heap[--s.heap_max] = n; + s.heap[--s.heap_max] = m; + tree[node * 2] = tree[n * 2] + tree[m * 2]; + s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; + tree[n * 2 + 1] = tree[m * 2 + 1] = node; + s.heap[ + 1 + /*SMALLEST*/ + ] = node++; + pqdownheap( + s, + tree, + 1 + /*SMALLEST*/ + ); + } while (s.heap_len >= 2); + s.heap[--s.heap_max] = s.heap[ + 1 + /*SMALLEST*/ + ]; + gen_bitlen(s, desc); + gen_codes(tree, max_code, s.bl_count); + } + function scan_tree(s, tree, max_code) { + var n; + var prevlen = -1; + var curlen; + var nextlen = tree[0 * 2 + 1]; + var count = 0; + var max_count = 7; + var min_count = 4; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + tree[(max_code + 1) * 2 + 1] = 65535; + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]; + if (++count < max_count && curlen === nextlen) { + continue; + } else if (count < min_count) { + s.bl_tree[curlen * 2] += count; + } else if (curlen !== 0) { + if (curlen !== prevlen) { + s.bl_tree[curlen * 2]++; + } + s.bl_tree[REP_3_6 * 2]++; + } else if (count <= 10) { + s.bl_tree[REPZ_3_10 * 2]++; + } else { + s.bl_tree[REPZ_11_138 * 2]++; + } + count = 0; + prevlen = curlen; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + } else { + max_count = 7; + min_count = 4; + } + } + } + function send_tree(s, tree, max_code) { + var n; + var prevlen = -1; + var curlen; + var nextlen = tree[0 * 2 + 1]; + var count = 0; + var max_count = 7; + var min_count = 4; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]; + if (++count < max_count && curlen === nextlen) { + continue; + } else if (count < min_count) { + do { + send_code(s, curlen, s.bl_tree); + } while (--count !== 0); + } else if (curlen !== 0) { + if (curlen !== prevlen) { + send_code(s, curlen, s.bl_tree); + count--; + } + send_code(s, REP_3_6, s.bl_tree); + send_bits(s, count - 3, 2); + } else if (count <= 10) { + send_code(s, REPZ_3_10, s.bl_tree); + send_bits(s, count - 3, 3); + } else { + send_code(s, REPZ_11_138, s.bl_tree); + send_bits(s, count - 11, 7); + } + count = 0; + prevlen = curlen; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + } else { + max_count = 7; + min_count = 4; + } + } + } + function build_bl_tree(s) { + var max_blindex; + scan_tree(s, s.dyn_ltree, s.l_desc.max_code); + scan_tree(s, s.dyn_dtree, s.d_desc.max_code); + build_tree(s, s.bl_desc); + for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { + if (s.bl_tree[bl_order[max_blindex] * 2 + 1] !== 0) { + break; + } + } + s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; + return max_blindex; + } + function send_all_trees(s, lcodes, dcodes, blcodes) { + var rank; + send_bits(s, lcodes - 257, 5); + send_bits(s, dcodes - 1, 5); + send_bits(s, blcodes - 4, 4); + for (rank = 0; rank < blcodes; rank++) { + send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1], 3); + } + send_tree(s, s.dyn_ltree, lcodes - 1); + send_tree(s, s.dyn_dtree, dcodes - 1); + } + function detect_data_type(s) { + var black_mask = 4093624447; + var n; + for (n = 0; n <= 31; n++, black_mask >>>= 1) { + if (black_mask & 1 && s.dyn_ltree[n * 2] !== 0) { + return Z_BINARY; + } + } + if (s.dyn_ltree[9 * 2] !== 0 || s.dyn_ltree[10 * 2] !== 0 || s.dyn_ltree[13 * 2] !== 0) { + return Z_TEXT; + } + for (n = 32; n < LITERALS; n++) { + if (s.dyn_ltree[n * 2] !== 0) { + return Z_TEXT; + } + } + return Z_BINARY; + } + var static_init_done = false; + function _tr_init(s) { + if (!static_init_done) { + tr_static_init(); + static_init_done = true; + } + s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); + s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); + s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); + s.bi_buf = 0; + s.bi_valid = 0; + init_block(s); + } + function _tr_stored_block(s, buf, stored_len, last) { + send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); + copy_block(s, buf, stored_len, true); + } + function _tr_align(s) { + send_bits(s, STATIC_TREES << 1, 3); + send_code(s, END_BLOCK, static_ltree); + bi_flush(s); + } + function _tr_flush_block(s, buf, stored_len, last) { + var opt_lenb, static_lenb; + var max_blindex = 0; + if (s.level > 0) { + if (s.strm.data_type === Z_UNKNOWN) { + s.strm.data_type = detect_data_type(s); + } + build_tree(s, s.l_desc); + build_tree(s, s.d_desc); + max_blindex = build_bl_tree(s); + opt_lenb = s.opt_len + 3 + 7 >>> 3; + static_lenb = s.static_len + 3 + 7 >>> 3; + if (static_lenb <= opt_lenb) { + opt_lenb = static_lenb; + } + } else { + opt_lenb = static_lenb = stored_len + 5; + } + if (stored_len + 4 <= opt_lenb && buf !== -1) { + _tr_stored_block(s, buf, stored_len, last); + } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { + send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); + compress_block(s, static_ltree, static_dtree); + } else { + send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); + send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); + compress_block(s, s.dyn_ltree, s.dyn_dtree); + } + init_block(s); + if (last) { + bi_windup(s); + } + } + function _tr_tally(s, dist, lc) { + s.pending_buf[s.d_buf + s.last_lit * 2] = dist >>> 8 & 255; + s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 255; + s.pending_buf[s.l_buf + s.last_lit] = lc & 255; + s.last_lit++; + if (dist === 0) { + s.dyn_ltree[lc * 2]++; + } else { + s.matches++; + dist--; + s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]++; + s.dyn_dtree[d_code(dist) * 2]++; + } + return s.last_lit === s.lit_bufsize - 1; + } + exports2._tr_init = _tr_init; + exports2._tr_stored_block = _tr_stored_block; + exports2._tr_flush_block = _tr_flush_block; + exports2._tr_tally = _tr_tally; + exports2._tr_align = _tr_align; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/adler32.js +var require_adler32 = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/adler32.js"(exports2, module2) { + "use strict"; + function adler32(adler, buf, len, pos) { + var s1 = adler & 65535 | 0, s2 = adler >>> 16 & 65535 | 0, n = 0; + while (len !== 0) { + n = len > 2e3 ? 2e3 : len; + len -= n; + do { + s1 = s1 + buf[pos++] | 0; + s2 = s2 + s1 | 0; + } while (--n); + s1 %= 65521; + s2 %= 65521; + } + return s1 | s2 << 16 | 0; + } + module2.exports = adler32; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/crc32.js +var require_crc322 = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/crc32.js"(exports2, module2) { + "use strict"; + function makeTable() { + var c, table = []; + for (var n = 0; n < 256; n++) { + c = n; + for (var k = 0; k < 8; k++) { + c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1; + } + table[n] = c; + } + return table; + } + var crcTable = makeTable(); + function crc32(crc, buf, len, pos) { + var t = crcTable, end = pos + len; + crc ^= -1; + for (var i = pos; i < end; i++) { + crc = crc >>> 8 ^ t[(crc ^ buf[i]) & 255]; + } + return crc ^ -1; + } + module2.exports = crc32; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/messages.js +var require_messages3 = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/messages.js"(exports2, module2) { + "use strict"; + module2.exports = { + 2: "need dictionary", + /* Z_NEED_DICT 2 */ + 1: "stream end", + /* Z_STREAM_END 1 */ + 0: "", + /* Z_OK 0 */ + "-1": "file error", + /* Z_ERRNO (-1) */ + "-2": "stream error", + /* Z_STREAM_ERROR (-2) */ + "-3": "data error", + /* Z_DATA_ERROR (-3) */ + "-4": "insufficient memory", + /* Z_MEM_ERROR (-4) */ + "-5": "buffer error", + /* Z_BUF_ERROR (-5) */ + "-6": "incompatible version" + /* Z_VERSION_ERROR (-6) */ + }; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/deflate.js +var require_deflate = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/deflate.js"(exports2) { + "use strict"; + var utils = require_common4(); + var trees = require_trees(); + var adler32 = require_adler32(); + var crc32 = require_crc322(); + var msg = require_messages3(); + var Z_NO_FLUSH = 0; + var Z_PARTIAL_FLUSH = 1; + var Z_FULL_FLUSH = 3; + var Z_FINISH = 4; + var Z_BLOCK = 5; + var Z_OK = 0; + var Z_STREAM_END = 1; + var Z_STREAM_ERROR = -2; + var Z_DATA_ERROR = -3; + var Z_BUF_ERROR = -5; + var Z_DEFAULT_COMPRESSION = -1; + var Z_FILTERED = 1; + var Z_HUFFMAN_ONLY = 2; + var Z_RLE = 3; + var Z_FIXED = 4; + var Z_DEFAULT_STRATEGY = 0; + var Z_UNKNOWN = 2; + var Z_DEFLATED = 8; + var MAX_MEM_LEVEL = 9; + var MAX_WBITS = 15; + var DEF_MEM_LEVEL = 8; + var LENGTH_CODES = 29; + var LITERALS = 256; + var L_CODES = LITERALS + 1 + LENGTH_CODES; + var D_CODES = 30; + var BL_CODES = 19; + var HEAP_SIZE = 2 * L_CODES + 1; + var MAX_BITS = 15; + var MIN_MATCH = 3; + var MAX_MATCH = 258; + var MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1; + var PRESET_DICT = 32; + var INIT_STATE = 42; + var EXTRA_STATE = 69; + var NAME_STATE = 73; + var COMMENT_STATE = 91; + var HCRC_STATE = 103; + var BUSY_STATE = 113; + var FINISH_STATE = 666; + var BS_NEED_MORE = 1; + var BS_BLOCK_DONE = 2; + var BS_FINISH_STARTED = 3; + var BS_FINISH_DONE = 4; + var OS_CODE = 3; + function err(strm, errorCode) { + strm.msg = msg[errorCode]; + return errorCode; + } + function rank(f) { + return (f << 1) - (f > 4 ? 9 : 0); + } + function zero(buf) { + var len = buf.length; + while (--len >= 0) { + buf[len] = 0; + } + } + function flush_pending(strm) { + var s = strm.state; + var len = s.pending; + if (len > strm.avail_out) { + len = strm.avail_out; + } + if (len === 0) { + return; + } + utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); + strm.next_out += len; + s.pending_out += len; + strm.total_out += len; + strm.avail_out -= len; + s.pending -= len; + if (s.pending === 0) { + s.pending_out = 0; + } + } + function flush_block_only(s, last) { + trees._tr_flush_block(s, s.block_start >= 0 ? s.block_start : -1, s.strstart - s.block_start, last); + s.block_start = s.strstart; + flush_pending(s.strm); + } + function put_byte(s, b) { + s.pending_buf[s.pending++] = b; + } + function putShortMSB(s, b) { + s.pending_buf[s.pending++] = b >>> 8 & 255; + s.pending_buf[s.pending++] = b & 255; + } + function read_buf(strm, buf, start, size) { + var len = strm.avail_in; + if (len > size) { + len = size; + } + if (len === 0) { + return 0; + } + strm.avail_in -= len; + utils.arraySet(buf, strm.input, strm.next_in, len, start); + if (strm.state.wrap === 1) { + strm.adler = adler32(strm.adler, buf, len, start); + } else if (strm.state.wrap === 2) { + strm.adler = crc32(strm.adler, buf, len, start); + } + strm.next_in += len; + strm.total_in += len; + return len; + } + function longest_match(s, cur_match) { + var chain_length = s.max_chain_length; + var scan = s.strstart; + var match; + var len; + var best_len = s.prev_length; + var nice_match = s.nice_match; + var limit = s.strstart > s.w_size - MIN_LOOKAHEAD ? s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0; + var _win = s.window; + var wmask = s.w_mask; + var prev = s.prev; + var strend = s.strstart + MAX_MATCH; + var scan_end1 = _win[scan + best_len - 1]; + var scan_end = _win[scan + best_len]; + if (s.prev_length >= s.good_match) { + chain_length >>= 2; + } + if (nice_match > s.lookahead) { + nice_match = s.lookahead; + } + do { + match = cur_match; + if (_win[match + best_len] !== scan_end || _win[match + best_len - 1] !== scan_end1 || _win[match] !== _win[scan] || _win[++match] !== _win[scan + 1]) { + continue; + } + scan += 2; + match++; + do { + } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && scan < strend); + len = MAX_MATCH - (strend - scan); + scan = strend - MAX_MATCH; + if (len > best_len) { + s.match_start = cur_match; + best_len = len; + if (len >= nice_match) { + break; + } + scan_end1 = _win[scan + best_len - 1]; + scan_end = _win[scan + best_len]; + } + } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); + if (best_len <= s.lookahead) { + return best_len; + } + return s.lookahead; + } + function fill_window(s) { + var _w_size = s.w_size; + var p, n, m, more, str; + do { + more = s.window_size - s.lookahead - s.strstart; + if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { + utils.arraySet(s.window, s.window, _w_size, _w_size, 0); + s.match_start -= _w_size; + s.strstart -= _w_size; + s.block_start -= _w_size; + n = s.hash_size; + p = n; + do { + m = s.head[--p]; + s.head[p] = m >= _w_size ? m - _w_size : 0; + } while (--n); + n = _w_size; + p = n; + do { + m = s.prev[--p]; + s.prev[p] = m >= _w_size ? m - _w_size : 0; + } while (--n); + more += _w_size; + } + if (s.strm.avail_in === 0) { + break; + } + n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); + s.lookahead += n; + if (s.lookahead + s.insert >= MIN_MATCH) { + str = s.strstart - s.insert; + s.ins_h = s.window[str]; + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + 1]) & s.hash_mask; + while (s.insert) { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + s.prev[str & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = str; + str++; + s.insert--; + if (s.lookahead + s.insert < MIN_MATCH) { + break; + } + } + } + } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); + } + function deflate_stored(s, flush) { + var max_block_size = 65535; + if (max_block_size > s.pending_buf_size - 5) { + max_block_size = s.pending_buf_size - 5; + } + for (; ; ) { + if (s.lookahead <= 1) { + fill_window(s); + if (s.lookahead === 0 && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } + } + s.strstart += s.lookahead; + s.lookahead = 0; + var max_start = s.block_start + max_block_size; + if (s.strstart === 0 || s.strstart >= max_start) { + s.lookahead = s.strstart - max_start; + s.strstart = max_start; + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + if (s.strstart - s.block_start >= s.w_size - MIN_LOOKAHEAD) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } + s.insert = 0; + if (flush === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.strstart > s.block_start) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_NEED_MORE; + } + function deflate_fast(s, flush) { + var hash_head; + var bflush; + for (; ; ) { + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } + } + hash_head = 0; + if (s.lookahead >= MIN_MATCH) { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + } + if (hash_head !== 0 && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) { + s.match_length = longest_match(s, hash_head); + } + if (s.match_length >= MIN_MATCH) { + bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); + s.lookahead -= s.match_length; + if (s.match_length <= s.max_lazy_match && s.lookahead >= MIN_MATCH) { + s.match_length--; + do { + s.strstart++; + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + } while (--s.match_length !== 0); + s.strstart++; + } else { + s.strstart += s.match_length; + s.match_length = 0; + s.ins_h = s.window[s.strstart]; + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + 1]) & s.hash_mask; + } + } else { + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + } + if (bflush) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } + s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; + if (flush === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.last_lit) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_BLOCK_DONE; + } + function deflate_slow(s, flush) { + var hash_head; + var bflush; + var max_insert; + for (; ; ) { + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } + } + hash_head = 0; + if (s.lookahead >= MIN_MATCH) { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + } + s.prev_length = s.match_length; + s.prev_match = s.match_start; + s.match_length = MIN_MATCH - 1; + if (hash_head !== 0 && s.prev_length < s.max_lazy_match && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) { + s.match_length = longest_match(s, hash_head); + if (s.match_length <= 5 && (s.strategy === Z_FILTERED || s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096)) { + s.match_length = MIN_MATCH - 1; + } + } + if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { + max_insert = s.strstart + s.lookahead - MIN_MATCH; + bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); + s.lookahead -= s.prev_length - 1; + s.prev_length -= 2; + do { + if (++s.strstart <= max_insert) { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + } + } while (--s.prev_length !== 0); + s.match_available = 0; + s.match_length = MIN_MATCH - 1; + s.strstart++; + if (bflush) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } else if (s.match_available) { + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + if (bflush) { + flush_block_only(s, false); + } + s.strstart++; + s.lookahead--; + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } else { + s.match_available = 1; + s.strstart++; + s.lookahead--; + } + } + if (s.match_available) { + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + s.match_available = 0; + } + s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; + if (flush === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.last_lit) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_BLOCK_DONE; + } + function deflate_rle(s, flush) { + var bflush; + var prev; + var scan, strend; + var _win = s.window; + for (; ; ) { + if (s.lookahead <= MAX_MATCH) { + fill_window(s); + if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } + } + s.match_length = 0; + if (s.lookahead >= MIN_MATCH && s.strstart > 0) { + scan = s.strstart - 1; + prev = _win[scan]; + if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { + strend = s.strstart + MAX_MATCH; + do { + } while (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && scan < strend); + s.match_length = MAX_MATCH - (strend - scan); + if (s.match_length > s.lookahead) { + s.match_length = s.lookahead; + } + } + } + if (s.match_length >= MIN_MATCH) { + bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); + s.lookahead -= s.match_length; + s.strstart += s.match_length; + s.match_length = 0; + } else { + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + } + if (bflush) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } + s.insert = 0; + if (flush === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.last_lit) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_BLOCK_DONE; + } + function deflate_huff(s, flush) { + var bflush; + for (; ; ) { + if (s.lookahead === 0) { + fill_window(s); + if (s.lookahead === 0) { + if (flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + break; + } + } + s.match_length = 0; + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + if (bflush) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } + s.insert = 0; + if (flush === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.last_lit) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_BLOCK_DONE; + } + function Config(good_length, max_lazy, nice_length, max_chain, func) { + this.good_length = good_length; + this.max_lazy = max_lazy; + this.nice_length = nice_length; + this.max_chain = max_chain; + this.func = func; + } + var configuration_table; + configuration_table = [ + /* good lazy nice chain */ + new Config(0, 0, 0, 0, deflate_stored), + /* 0 store only */ + new Config(4, 4, 8, 4, deflate_fast), + /* 1 max speed, no lazy matches */ + new Config(4, 5, 16, 8, deflate_fast), + /* 2 */ + new Config(4, 6, 32, 32, deflate_fast), + /* 3 */ + new Config(4, 4, 16, 16, deflate_slow), + /* 4 lazy matches */ + new Config(8, 16, 32, 32, deflate_slow), + /* 5 */ + new Config(8, 16, 128, 128, deflate_slow), + /* 6 */ + new Config(8, 32, 128, 256, deflate_slow), + /* 7 */ + new Config(32, 128, 258, 1024, deflate_slow), + /* 8 */ + new Config(32, 258, 258, 4096, deflate_slow) + /* 9 max compression */ + ]; + function lm_init(s) { + s.window_size = 2 * s.w_size; + zero(s.head); + s.max_lazy_match = configuration_table[s.level].max_lazy; + s.good_match = configuration_table[s.level].good_length; + s.nice_match = configuration_table[s.level].nice_length; + s.max_chain_length = configuration_table[s.level].max_chain; + s.strstart = 0; + s.block_start = 0; + s.lookahead = 0; + s.insert = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + s.ins_h = 0; + } + function DeflateState() { + this.strm = null; + this.status = 0; + this.pending_buf = null; + this.pending_buf_size = 0; + this.pending_out = 0; + this.pending = 0; + this.wrap = 0; + this.gzhead = null; + this.gzindex = 0; + this.method = Z_DEFLATED; + this.last_flush = -1; + this.w_size = 0; + this.w_bits = 0; + this.w_mask = 0; + this.window = null; + this.window_size = 0; + this.prev = null; + this.head = null; + this.ins_h = 0; + this.hash_size = 0; + this.hash_bits = 0; + this.hash_mask = 0; + this.hash_shift = 0; + this.block_start = 0; + this.match_length = 0; + this.prev_match = 0; + this.match_available = 0; + this.strstart = 0; + this.match_start = 0; + this.lookahead = 0; + this.prev_length = 0; + this.max_chain_length = 0; + this.max_lazy_match = 0; + this.level = 0; + this.strategy = 0; + this.good_match = 0; + this.nice_match = 0; + this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); + this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); + this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); + zero(this.dyn_ltree); + zero(this.dyn_dtree); + zero(this.bl_tree); + this.l_desc = null; + this.d_desc = null; + this.bl_desc = null; + this.bl_count = new utils.Buf16(MAX_BITS + 1); + this.heap = new utils.Buf16(2 * L_CODES + 1); + zero(this.heap); + this.heap_len = 0; + this.heap_max = 0; + this.depth = new utils.Buf16(2 * L_CODES + 1); + zero(this.depth); + this.l_buf = 0; + this.lit_bufsize = 0; + this.last_lit = 0; + this.d_buf = 0; + this.opt_len = 0; + this.static_len = 0; + this.matches = 0; + this.insert = 0; + this.bi_buf = 0; + this.bi_valid = 0; + } + function deflateResetKeep(strm) { + var s; + if (!strm || !strm.state) { + return err(strm, Z_STREAM_ERROR); + } + strm.total_in = strm.total_out = 0; + strm.data_type = Z_UNKNOWN; + s = strm.state; + s.pending = 0; + s.pending_out = 0; + if (s.wrap < 0) { + s.wrap = -s.wrap; + } + s.status = s.wrap ? INIT_STATE : BUSY_STATE; + strm.adler = s.wrap === 2 ? 0 : 1; + s.last_flush = Z_NO_FLUSH; + trees._tr_init(s); + return Z_OK; + } + function deflateReset(strm) { + var ret2 = deflateResetKeep(strm); + if (ret2 === Z_OK) { + lm_init(strm.state); + } + return ret2; + } + function deflateSetHeader(strm, head) { + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + if (strm.state.wrap !== 2) { + return Z_STREAM_ERROR; + } + strm.state.gzhead = head; + return Z_OK; + } + function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { + if (!strm) { + return Z_STREAM_ERROR; + } + var wrap = 1; + if (level === Z_DEFAULT_COMPRESSION) { + level = 6; + } + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } else if (windowBits > 15) { + wrap = 2; + windowBits -= 16; + } + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) { + return err(strm, Z_STREAM_ERROR); + } + if (windowBits === 8) { + windowBits = 9; + } + var s = new DeflateState(); + strm.state = s; + s.strm = strm; + s.wrap = wrap; + s.gzhead = null; + s.w_bits = windowBits; + s.w_size = 1 << s.w_bits; + s.w_mask = s.w_size - 1; + s.hash_bits = memLevel + 7; + s.hash_size = 1 << s.hash_bits; + s.hash_mask = s.hash_size - 1; + s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); + s.window = new utils.Buf8(s.w_size * 2); + s.head = new utils.Buf16(s.hash_size); + s.prev = new utils.Buf16(s.w_size); + s.lit_bufsize = 1 << memLevel + 6; + s.pending_buf_size = s.lit_bufsize * 4; + s.pending_buf = new utils.Buf8(s.pending_buf_size); + s.d_buf = 1 * s.lit_bufsize; + s.l_buf = (1 + 2) * s.lit_bufsize; + s.level = level; + s.strategy = strategy; + s.method = method; + return deflateReset(strm); + } + function deflateInit(strm, level) { + return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); + } + function deflate(strm, flush) { + var old_flush, s; + var beg, val; + if (!strm || !strm.state || flush > Z_BLOCK || flush < 0) { + return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; + } + s = strm.state; + if (!strm.output || !strm.input && strm.avail_in !== 0 || s.status === FINISH_STATE && flush !== Z_FINISH) { + return err(strm, strm.avail_out === 0 ? Z_BUF_ERROR : Z_STREAM_ERROR); + } + s.strm = strm; + old_flush = s.last_flush; + s.last_flush = flush; + if (s.status === INIT_STATE) { + if (s.wrap === 2) { + strm.adler = 0; + put_byte(s, 31); + put_byte(s, 139); + put_byte(s, 8); + if (!s.gzhead) { + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, s.level === 9 ? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 4 : 0); + put_byte(s, OS_CODE); + s.status = BUSY_STATE; + } else { + put_byte( + s, + (s.gzhead.text ? 1 : 0) + (s.gzhead.hcrc ? 2 : 0) + (!s.gzhead.extra ? 0 : 4) + (!s.gzhead.name ? 0 : 8) + (!s.gzhead.comment ? 0 : 16) + ); + put_byte(s, s.gzhead.time & 255); + put_byte(s, s.gzhead.time >> 8 & 255); + put_byte(s, s.gzhead.time >> 16 & 255); + put_byte(s, s.gzhead.time >> 24 & 255); + put_byte(s, s.level === 9 ? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 4 : 0); + put_byte(s, s.gzhead.os & 255); + if (s.gzhead.extra && s.gzhead.extra.length) { + put_byte(s, s.gzhead.extra.length & 255); + put_byte(s, s.gzhead.extra.length >> 8 & 255); + } + if (s.gzhead.hcrc) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); + } + s.gzindex = 0; + s.status = EXTRA_STATE; + } + } else { + var header = Z_DEFLATED + (s.w_bits - 8 << 4) << 8; + var level_flags = -1; + if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { + level_flags = 0; + } else if (s.level < 6) { + level_flags = 1; + } else if (s.level === 6) { + level_flags = 2; + } else { + level_flags = 3; + } + header |= level_flags << 6; + if (s.strstart !== 0) { + header |= PRESET_DICT; + } + header += 31 - header % 31; + s.status = BUSY_STATE; + putShortMSB(s, header); + if (s.strstart !== 0) { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 65535); + } + strm.adler = 1; + } + } + if (s.status === EXTRA_STATE) { + if (s.gzhead.extra) { + beg = s.pending; + while (s.gzindex < (s.gzhead.extra.length & 65535)) { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + break; + } + } + put_byte(s, s.gzhead.extra[s.gzindex] & 255); + s.gzindex++; + } + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (s.gzindex === s.gzhead.extra.length) { + s.gzindex = 0; + s.status = NAME_STATE; + } + } else { + s.status = NAME_STATE; + } + } + if (s.status === NAME_STATE) { + if (s.gzhead.name) { + beg = s.pending; + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + if (s.gzindex < s.gzhead.name.length) { + val = s.gzhead.name.charCodeAt(s.gzindex++) & 255; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.gzindex = 0; + s.status = COMMENT_STATE; + } + } else { + s.status = COMMENT_STATE; + } + } + if (s.status === COMMENT_STATE) { + if (s.gzhead.comment) { + beg = s.pending; + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + if (s.gzindex < s.gzhead.comment.length) { + val = s.gzhead.comment.charCodeAt(s.gzindex++) & 255; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.status = HCRC_STATE; + } + } else { + s.status = HCRC_STATE; + } + } + if (s.status === HCRC_STATE) { + if (s.gzhead.hcrc) { + if (s.pending + 2 > s.pending_buf_size) { + flush_pending(strm); + } + if (s.pending + 2 <= s.pending_buf_size) { + put_byte(s, strm.adler & 255); + put_byte(s, strm.adler >> 8 & 255); + strm.adler = 0; + s.status = BUSY_STATE; + } + } else { + s.status = BUSY_STATE; + } + } + if (s.pending !== 0) { + flush_pending(strm); + if (strm.avail_out === 0) { + s.last_flush = -1; + return Z_OK; + } + } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && flush !== Z_FINISH) { + return err(strm, Z_BUF_ERROR); + } + if (s.status === FINISH_STATE && strm.avail_in !== 0) { + return err(strm, Z_BUF_ERROR); + } + if (strm.avail_in !== 0 || s.lookahead !== 0 || flush !== Z_NO_FLUSH && s.status !== FINISH_STATE) { + var bstate = s.strategy === Z_HUFFMAN_ONLY ? deflate_huff(s, flush) : s.strategy === Z_RLE ? deflate_rle(s, flush) : configuration_table[s.level].func(s, flush); + if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { + s.status = FINISH_STATE; + } + if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { + if (strm.avail_out === 0) { + s.last_flush = -1; + } + return Z_OK; + } + if (bstate === BS_BLOCK_DONE) { + if (flush === Z_PARTIAL_FLUSH) { + trees._tr_align(s); + } else if (flush !== Z_BLOCK) { + trees._tr_stored_block(s, 0, 0, false); + if (flush === Z_FULL_FLUSH) { + zero(s.head); + if (s.lookahead === 0) { + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + } + } + flush_pending(strm); + if (strm.avail_out === 0) { + s.last_flush = -1; + return Z_OK; + } + } + } + if (flush !== Z_FINISH) { + return Z_OK; + } + if (s.wrap <= 0) { + return Z_STREAM_END; + } + if (s.wrap === 2) { + put_byte(s, strm.adler & 255); + put_byte(s, strm.adler >> 8 & 255); + put_byte(s, strm.adler >> 16 & 255); + put_byte(s, strm.adler >> 24 & 255); + put_byte(s, strm.total_in & 255); + put_byte(s, strm.total_in >> 8 & 255); + put_byte(s, strm.total_in >> 16 & 255); + put_byte(s, strm.total_in >> 24 & 255); + } else { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 65535); + } + flush_pending(strm); + if (s.wrap > 0) { + s.wrap = -s.wrap; + } + return s.pending !== 0 ? Z_OK : Z_STREAM_END; + } + function deflateEnd(strm) { + var status; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + status = strm.state.status; + if (status !== INIT_STATE && status !== EXTRA_STATE && status !== NAME_STATE && status !== COMMENT_STATE && status !== HCRC_STATE && status !== BUSY_STATE && status !== FINISH_STATE) { + return err(strm, Z_STREAM_ERROR); + } + strm.state = null; + return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; + } + function deflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + var s; + var str, n; + var wrap; + var avail; + var next; + var input; + var tmpDict; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + s = strm.state; + wrap = s.wrap; + if (wrap === 2 || wrap === 1 && s.status !== INIT_STATE || s.lookahead) { + return Z_STREAM_ERROR; + } + if (wrap === 1) { + strm.adler = adler32(strm.adler, dictionary, dictLength, 0); + } + s.wrap = 0; + if (dictLength >= s.w_size) { + if (wrap === 0) { + zero(s.head); + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + tmpDict = new utils.Buf8(s.w_size); + utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); + dictionary = tmpDict; + dictLength = s.w_size; + } + avail = strm.avail_in; + next = strm.next_in; + input = strm.input; + strm.avail_in = dictLength; + strm.next_in = 0; + strm.input = dictionary; + fill_window(s); + while (s.lookahead >= MIN_MATCH) { + str = s.strstart; + n = s.lookahead - (MIN_MATCH - 1); + do { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + s.prev[str & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = str; + str++; + } while (--n); + s.strstart = str; + s.lookahead = MIN_MATCH - 1; + fill_window(s); + } + s.strstart += s.lookahead; + s.block_start = s.strstart; + s.insert = s.lookahead; + s.lookahead = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + strm.next_in = next; + strm.input = input; + strm.avail_in = avail; + s.wrap = wrap; + return Z_OK; + } + exports2.deflateInit = deflateInit; + exports2.deflateInit2 = deflateInit2; + exports2.deflateReset = deflateReset; + exports2.deflateResetKeep = deflateResetKeep; + exports2.deflateSetHeader = deflateSetHeader; + exports2.deflate = deflate; + exports2.deflateEnd = deflateEnd; + exports2.deflateSetDictionary = deflateSetDictionary; + exports2.deflateInfo = "pako deflate (from Nodeca project)"; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/strings.js +var require_strings = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/strings.js"(exports2) { + "use strict"; + var utils = require_common4(); + var STR_APPLY_OK = true; + var STR_APPLY_UIA_OK = true; + try { + String.fromCharCode.apply(null, [0]); + } catch (__) { + STR_APPLY_OK = false; + } + try { + String.fromCharCode.apply(null, new Uint8Array(1)); + } catch (__) { + STR_APPLY_UIA_OK = false; + } + var _utf8len = new utils.Buf8(256); + for (q = 0; q < 256; q++) { + _utf8len[q] = q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1; + } + var q; + _utf8len[254] = _utf8len[254] = 1; + exports2.string2buf = function(str) { + var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; + for (m_pos = 0; m_pos < str_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 64512) === 55296 && m_pos + 1 < str_len) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 64512) === 56320) { + c = 65536 + (c - 55296 << 10) + (c2 - 56320); + m_pos++; + } + } + buf_len += c < 128 ? 1 : c < 2048 ? 2 : c < 65536 ? 3 : 4; + } + buf = new utils.Buf8(buf_len); + for (i = 0, m_pos = 0; i < buf_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 64512) === 55296 && m_pos + 1 < str_len) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 64512) === 56320) { + c = 65536 + (c - 55296 << 10) + (c2 - 56320); + m_pos++; + } + } + if (c < 128) { + buf[i++] = c; + } else if (c < 2048) { + buf[i++] = 192 | c >>> 6; + buf[i++] = 128 | c & 63; + } else if (c < 65536) { + buf[i++] = 224 | c >>> 12; + buf[i++] = 128 | c >>> 6 & 63; + buf[i++] = 128 | c & 63; + } else { + buf[i++] = 240 | c >>> 18; + buf[i++] = 128 | c >>> 12 & 63; + buf[i++] = 128 | c >>> 6 & 63; + buf[i++] = 128 | c & 63; + } + } + return buf; + }; + function buf2binstring(buf, len) { + if (len < 65534) { + if (buf.subarray && STR_APPLY_UIA_OK || !buf.subarray && STR_APPLY_OK) { + return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); + } + } + var result = ""; + for (var i = 0; i < len; i++) { + result += String.fromCharCode(buf[i]); + } + return result; + } + exports2.buf2binstring = function(buf) { + return buf2binstring(buf, buf.length); + }; + exports2.binstring2buf = function(str) { + var buf = new utils.Buf8(str.length); + for (var i = 0, len = buf.length; i < len; i++) { + buf[i] = str.charCodeAt(i); + } + return buf; + }; + exports2.buf2string = function(buf, max) { + var i, out, c, c_len; + var len = max || buf.length; + var utf16buf = new Array(len * 2); + for (out = 0, i = 0; i < len; ) { + c = buf[i++]; + if (c < 128) { + utf16buf[out++] = c; + continue; + } + c_len = _utf8len[c]; + if (c_len > 4) { + utf16buf[out++] = 65533; + i += c_len - 1; + continue; + } + c &= c_len === 2 ? 31 : c_len === 3 ? 15 : 7; + while (c_len > 1 && i < len) { + c = c << 6 | buf[i++] & 63; + c_len--; + } + if (c_len > 1) { + utf16buf[out++] = 65533; + continue; + } + if (c < 65536) { + utf16buf[out++] = c; + } else { + c -= 65536; + utf16buf[out++] = 55296 | c >> 10 & 1023; + utf16buf[out++] = 56320 | c & 1023; + } + } + return buf2binstring(utf16buf, out); + }; + exports2.utf8border = function(buf, max) { + var pos; + max = max || buf.length; + if (max > buf.length) { + max = buf.length; + } + pos = max - 1; + while (pos >= 0 && (buf[pos] & 192) === 128) { + pos--; + } + if (pos < 0) { + return max; + } + if (pos === 0) { + return max; + } + return pos + _utf8len[buf[pos]] > max ? pos : max; + }; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/zstream.js +var require_zstream = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/zstream.js"(exports2, module2) { + "use strict"; + function ZStream() { + this.input = null; + this.next_in = 0; + this.avail_in = 0; + this.total_in = 0; + this.output = null; + this.next_out = 0; + this.avail_out = 0; + this.total_out = 0; + this.msg = ""; + this.state = null; + this.data_type = 2; + this.adler = 0; + } + module2.exports = ZStream; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/deflate.js +var require_deflate2 = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/deflate.js"(exports2) { + "use strict"; + var zlib_deflate = require_deflate(); + var utils = require_common4(); + var strings = require_strings(); + var msg = require_messages3(); + var ZStream = require_zstream(); + var toString2 = Object.prototype.toString; + var Z_NO_FLUSH = 0; + var Z_FINISH = 4; + var Z_OK = 0; + var Z_STREAM_END = 1; + var Z_SYNC_FLUSH = 2; + var Z_DEFAULT_COMPRESSION = -1; + var Z_DEFAULT_STRATEGY = 0; + var Z_DEFLATED = 8; + function Deflate(options) { + if (!(this instanceof Deflate)) return new Deflate(options); + this.options = utils.assign({ + level: Z_DEFAULT_COMPRESSION, + method: Z_DEFLATED, + chunkSize: 16384, + windowBits: 15, + memLevel: 8, + strategy: Z_DEFAULT_STRATEGY, + to: "" + }, options || {}); + var opt = this.options; + if (opt.raw && opt.windowBits > 0) { + opt.windowBits = -opt.windowBits; + } else if (opt.gzip && opt.windowBits > 0 && opt.windowBits < 16) { + opt.windowBits += 16; + } + this.err = 0; + this.msg = ""; + this.ended = false; + this.chunks = []; + this.strm = new ZStream(); + this.strm.avail_out = 0; + var status = zlib_deflate.deflateInit2( + this.strm, + opt.level, + opt.method, + opt.windowBits, + opt.memLevel, + opt.strategy + ); + if (status !== Z_OK) { + throw new Error(msg[status]); + } + if (opt.header) { + zlib_deflate.deflateSetHeader(this.strm, opt.header); + } + if (opt.dictionary) { + var dict; + if (typeof opt.dictionary === "string") { + dict = strings.string2buf(opt.dictionary); + } else if (toString2.call(opt.dictionary) === "[object ArrayBuffer]") { + dict = new Uint8Array(opt.dictionary); + } else { + dict = opt.dictionary; + } + status = zlib_deflate.deflateSetDictionary(this.strm, dict); + if (status !== Z_OK) { + throw new Error(msg[status]); + } + this._dict_set = true; + } + } + Deflate.prototype.push = function(data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var status, _mode; + if (this.ended) { + return false; + } + _mode = mode === ~~mode ? mode : mode === true ? Z_FINISH : Z_NO_FLUSH; + if (typeof data === "string") { + strm.input = strings.string2buf(data); + } else if (toString2.call(data) === "[object ArrayBuffer]") { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + strm.next_in = 0; + strm.avail_in = strm.input.length; + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + status = zlib_deflate.deflate(strm, _mode); + if (status !== Z_STREAM_END && status !== Z_OK) { + this.onEnd(status); + this.ended = true; + return false; + } + if (strm.avail_out === 0 || strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH)) { + if (this.options.to === "string") { + this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); + if (_mode === Z_FINISH) { + status = zlib_deflate.deflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === Z_OK; + } + if (_mode === Z_SYNC_FLUSH) { + this.onEnd(Z_OK); + strm.avail_out = 0; + return true; + } + return true; + }; + Deflate.prototype.onData = function(chunk) { + this.chunks.push(chunk); + }; + Deflate.prototype.onEnd = function(status) { + if (status === Z_OK) { + if (this.options.to === "string") { + this.result = this.chunks.join(""); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; + }; + function deflate(input, options) { + var deflator = new Deflate(options); + deflator.push(input, true); + if (deflator.err) { + throw deflator.msg || msg[deflator.err]; + } + return deflator.result; + } + function deflateRaw(input, options) { + options = options || {}; + options.raw = true; + return deflate(input, options); + } + function gzip(input, options) { + options = options || {}; + options.gzip = true; + return deflate(input, options); + } + exports2.Deflate = Deflate; + exports2.deflate = deflate; + exports2.deflateRaw = deflateRaw; + exports2.gzip = gzip; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inffast.js +var require_inffast = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inffast.js"(exports2, module2) { + "use strict"; + var BAD = 30; + var TYPE = 12; + module2.exports = function inflate_fast(strm, start) { + var state; + var _in; + var last; + var _out; + var beg; + var end; + var dmax; + var wsize; + var whave; + var wnext; + var s_window; + var hold; + var bits; + var lcode; + var dcode; + var lmask; + var dmask; + var here; + var op; + var len; + var dist; + var from; + var from_source; + var input, output; + state = strm.state; + _in = strm.next_in; + input = strm.input; + last = _in + (strm.avail_in - 5); + _out = strm.next_out; + output = strm.output; + beg = _out - (start - strm.avail_out); + end = _out + (strm.avail_out - 257); + dmax = state.dmax; + wsize = state.wsize; + whave = state.whave; + wnext = state.wnext; + s_window = state.window; + hold = state.hold; + bits = state.bits; + lcode = state.lencode; + dcode = state.distcode; + lmask = (1 << state.lenbits) - 1; + dmask = (1 << state.distbits) - 1; + top: + do { + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = lcode[hold & lmask]; + dolen: + for (; ; ) { + op = here >>> 24; + hold >>>= op; + bits -= op; + op = here >>> 16 & 255; + if (op === 0) { + output[_out++] = here & 65535; + } else if (op & 16) { + len = here & 65535; + op &= 15; + if (op) { + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + len += hold & (1 << op) - 1; + hold >>>= op; + bits -= op; + } + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = dcode[hold & dmask]; + dodist: + for (; ; ) { + op = here >>> 24; + hold >>>= op; + bits -= op; + op = here >>> 16 & 255; + if (op & 16) { + dist = here & 65535; + op &= 15; + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + } + dist += hold & (1 << op) - 1; + if (dist > dmax) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break top; + } + hold >>>= op; + bits -= op; + op = _out - beg; + if (dist > op) { + op = dist - op; + if (op > whave) { + if (state.sane) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break top; + } + } + from = 0; + from_source = s_window; + if (wnext === 0) { + from += wsize - op; + if (op < len) { + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; + from_source = output; + } + } else if (wnext < op) { + from += wsize + wnext - op; + op -= wnext; + if (op < len) { + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = 0; + if (wnext < len) { + op = wnext; + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; + from_source = output; + } + } + } else { + from += wnext - op; + if (op < len) { + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; + from_source = output; + } + } + while (len > 2) { + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + len -= 3; + } + if (len) { + output[_out++] = from_source[from++]; + if (len > 1) { + output[_out++] = from_source[from++]; + } + } + } else { + from = _out - dist; + do { + output[_out++] = output[from++]; + output[_out++] = output[from++]; + output[_out++] = output[from++]; + len -= 3; + } while (len > 2); + if (len) { + output[_out++] = output[from++]; + if (len > 1) { + output[_out++] = output[from++]; + } + } + } + } else if ((op & 64) === 0) { + here = dcode[(here & 65535) + (hold & (1 << op) - 1)]; + continue dodist; + } else { + strm.msg = "invalid distance code"; + state.mode = BAD; + break top; + } + break; + } + } else if ((op & 64) === 0) { + here = lcode[(here & 65535) + (hold & (1 << op) - 1)]; + continue dolen; + } else if (op & 32) { + state.mode = TYPE; + break top; + } else { + strm.msg = "invalid literal/length code"; + state.mode = BAD; + break top; + } + break; + } + } while (_in < last && _out < end); + len = bits >> 3; + _in -= len; + bits -= len << 3; + hold &= (1 << bits) - 1; + strm.next_in = _in; + strm.next_out = _out; + strm.avail_in = _in < last ? 5 + (last - _in) : 5 - (_in - last); + strm.avail_out = _out < end ? 257 + (end - _out) : 257 - (_out - end); + state.hold = hold; + state.bits = bits; + return; + }; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inftrees.js +var require_inftrees = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inftrees.js"(exports2, module2) { + "use strict"; + var utils = require_common4(); + var MAXBITS = 15; + var ENOUGH_LENS = 852; + var ENOUGH_DISTS = 592; + var CODES = 0; + var LENS = 1; + var DISTS = 2; + var lbase = [ + /* Length codes 257..285 base */ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 13, + 15, + 17, + 19, + 23, + 27, + 31, + 35, + 43, + 51, + 59, + 67, + 83, + 99, + 115, + 131, + 163, + 195, + 227, + 258, + 0, + 0 + ]; + var lext = [ + /* Length codes 257..285 extra */ + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 17, + 17, + 17, + 18, + 18, + 18, + 18, + 19, + 19, + 19, + 19, + 20, + 20, + 20, + 20, + 21, + 21, + 21, + 21, + 16, + 72, + 78 + ]; + var dbase = [ + /* Distance codes 0..29 base */ + 1, + 2, + 3, + 4, + 5, + 7, + 9, + 13, + 17, + 25, + 33, + 49, + 65, + 97, + 129, + 193, + 257, + 385, + 513, + 769, + 1025, + 1537, + 2049, + 3073, + 4097, + 6145, + 8193, + 12289, + 16385, + 24577, + 0, + 0 + ]; + var dext = [ + /* Distance codes 0..29 extra */ + 16, + 16, + 16, + 16, + 17, + 17, + 18, + 18, + 19, + 19, + 20, + 20, + 21, + 21, + 22, + 22, + 23, + 23, + 24, + 24, + 25, + 25, + 26, + 26, + 27, + 27, + 28, + 28, + 29, + 29, + 64, + 64 + ]; + module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) { + var bits = opts.bits; + var len = 0; + var sym = 0; + var min = 0, max = 0; + var root = 0; + var curr = 0; + var drop = 0; + var left = 0; + var used = 0; + var huff = 0; + var incr; + var fill; + var low; + var mask; + var next; + var base = null; + var base_index = 0; + var end; + var count = new utils.Buf16(MAXBITS + 1); + var offs = new utils.Buf16(MAXBITS + 1); + var extra = null; + var extra_index = 0; + var here_bits, here_op, here_val; + for (len = 0; len <= MAXBITS; len++) { + count[len] = 0; + } + for (sym = 0; sym < codes; sym++) { + count[lens[lens_index + sym]]++; + } + root = bits; + for (max = MAXBITS; max >= 1; max--) { + if (count[max] !== 0) { + break; + } + } + if (root > max) { + root = max; + } + if (max === 0) { + table[table_index++] = 1 << 24 | 64 << 16 | 0; + table[table_index++] = 1 << 24 | 64 << 16 | 0; + opts.bits = 1; + return 0; + } + for (min = 1; min < max; min++) { + if (count[min] !== 0) { + break; + } + } + if (root < min) { + root = min; + } + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) { + return -1; + } + } + if (left > 0 && (type === CODES || max !== 1)) { + return -1; + } + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) { + offs[len + 1] = offs[len] + count[len]; + } + for (sym = 0; sym < codes; sym++) { + if (lens[lens_index + sym] !== 0) { + work[offs[lens[lens_index + sym]]++] = sym; + } + } + if (type === CODES) { + base = extra = work; + end = 19; + } else if (type === LENS) { + base = lbase; + base_index -= 257; + extra = lext; + extra_index -= 257; + end = 256; + } else { + base = dbase; + extra = dext; + end = -1; + } + huff = 0; + sym = 0; + len = min; + next = table_index; + curr = root; + drop = 0; + low = -1; + used = 1 << root; + mask = used - 1; + if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) { + return 1; + } + for (; ; ) { + here_bits = len - drop; + if (work[sym] < end) { + here_op = 0; + here_val = work[sym]; + } else if (work[sym] > end) { + here_op = extra[extra_index + work[sym]]; + here_val = base[base_index + work[sym]]; + } else { + here_op = 32 + 64; + here_val = 0; + } + incr = 1 << len - drop; + fill = 1 << curr; + min = fill; + do { + fill -= incr; + table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0; + } while (fill !== 0); + incr = 1 << len - 1; + while (huff & incr) { + incr >>= 1; + } + if (incr !== 0) { + huff &= incr - 1; + huff += incr; + } else { + huff = 0; + } + sym++; + if (--count[len] === 0) { + if (len === max) { + break; + } + len = lens[lens_index + work[sym]]; + } + if (len > root && (huff & mask) !== low) { + if (drop === 0) { + drop = root; + } + next += min; + curr = len - drop; + left = 1 << curr; + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) { + break; + } + curr++; + left <<= 1; + } + used += 1 << curr; + if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) { + return 1; + } + low = huff & mask; + table[low] = root << 24 | curr << 16 | next - table_index | 0; + } + } + if (huff !== 0) { + table[next + huff] = len - drop << 24 | 64 << 16 | 0; + } + opts.bits = root; + return 0; + }; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inflate.js +var require_inflate = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inflate.js"(exports2) { + "use strict"; + var utils = require_common4(); + var adler32 = require_adler32(); + var crc32 = require_crc322(); + var inflate_fast = require_inffast(); + var inflate_table = require_inftrees(); + var CODES = 0; + var LENS = 1; + var DISTS = 2; + var Z_FINISH = 4; + var Z_BLOCK = 5; + var Z_TREES = 6; + var Z_OK = 0; + var Z_STREAM_END = 1; + var Z_NEED_DICT = 2; + var Z_STREAM_ERROR = -2; + var Z_DATA_ERROR = -3; + var Z_MEM_ERROR = -4; + var Z_BUF_ERROR = -5; + var Z_DEFLATED = 8; + var HEAD = 1; + var FLAGS = 2; + var TIME = 3; + var OS = 4; + var EXLEN = 5; + var EXTRA = 6; + var NAME = 7; + var COMMENT = 8; + var HCRC = 9; + var DICTID = 10; + var DICT = 11; + var TYPE = 12; + var TYPEDO = 13; + var STORED = 14; + var COPY_ = 15; + var COPY = 16; + var TABLE = 17; + var LENLENS = 18; + var CODELENS = 19; + var LEN_ = 20; + var LEN = 21; + var LENEXT = 22; + var DIST = 23; + var DISTEXT = 24; + var MATCH = 25; + var LIT = 26; + var CHECK = 27; + var LENGTH = 28; + var DONE = 29; + var BAD = 30; + var MEM = 31; + var SYNC = 32; + var ENOUGH_LENS = 852; + var ENOUGH_DISTS = 592; + var MAX_WBITS = 15; + var DEF_WBITS = MAX_WBITS; + function zswap32(q) { + return (q >>> 24 & 255) + (q >>> 8 & 65280) + ((q & 65280) << 8) + ((q & 255) << 24); + } + function InflateState() { + this.mode = 0; + this.last = false; + this.wrap = 0; + this.havedict = false; + this.flags = 0; + this.dmax = 0; + this.check = 0; + this.total = 0; + this.head = null; + this.wbits = 0; + this.wsize = 0; + this.whave = 0; + this.wnext = 0; + this.window = null; + this.hold = 0; + this.bits = 0; + this.length = 0; + this.offset = 0; + this.extra = 0; + this.lencode = null; + this.distcode = null; + this.lenbits = 0; + this.distbits = 0; + this.ncode = 0; + this.nlen = 0; + this.ndist = 0; + this.have = 0; + this.next = null; + this.lens = new utils.Buf16(320); + this.work = new utils.Buf16(288); + this.lendyn = null; + this.distdyn = null; + this.sane = 0; + this.back = 0; + this.was = 0; + } + function inflateResetKeep(strm) { + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + strm.total_in = strm.total_out = state.total = 0; + strm.msg = ""; + if (state.wrap) { + strm.adler = state.wrap & 1; + } + state.mode = HEAD; + state.last = 0; + state.havedict = 0; + state.dmax = 32768; + state.head = null; + state.hold = 0; + state.bits = 0; + state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); + state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); + state.sane = 1; + state.back = -1; + return Z_OK; + } + function inflateReset(strm) { + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + state.wsize = 0; + state.whave = 0; + state.wnext = 0; + return inflateResetKeep(strm); + } + function inflateReset2(strm, windowBits) { + var wrap; + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } else { + wrap = (windowBits >> 4) + 1; + if (windowBits < 48) { + windowBits &= 15; + } + } + if (windowBits && (windowBits < 8 || windowBits > 15)) { + return Z_STREAM_ERROR; + } + if (state.window !== null && state.wbits !== windowBits) { + state.window = null; + } + state.wrap = wrap; + state.wbits = windowBits; + return inflateReset(strm); + } + function inflateInit2(strm, windowBits) { + var ret2; + var state; + if (!strm) { + return Z_STREAM_ERROR; + } + state = new InflateState(); + strm.state = state; + state.window = null; + ret2 = inflateReset2(strm, windowBits); + if (ret2 !== Z_OK) { + strm.state = null; + } + return ret2; + } + function inflateInit(strm) { + return inflateInit2(strm, DEF_WBITS); + } + var virgin = true; + var lenfix; + var distfix; + function fixedtables(state) { + if (virgin) { + var sym; + lenfix = new utils.Buf32(512); + distfix = new utils.Buf32(32); + sym = 0; + while (sym < 144) { + state.lens[sym++] = 8; + } + while (sym < 256) { + state.lens[sym++] = 9; + } + while (sym < 280) { + state.lens[sym++] = 7; + } + while (sym < 288) { + state.lens[sym++] = 8; + } + inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); + sym = 0; + while (sym < 32) { + state.lens[sym++] = 5; + } + inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); + virgin = false; + } + state.lencode = lenfix; + state.lenbits = 9; + state.distcode = distfix; + state.distbits = 5; + } + function updatewindow(strm, src, end, copy) { + var dist; + var state = strm.state; + if (state.window === null) { + state.wsize = 1 << state.wbits; + state.wnext = 0; + state.whave = 0; + state.window = new utils.Buf8(state.wsize); + } + if (copy >= state.wsize) { + utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); + state.wnext = 0; + state.whave = state.wsize; + } else { + dist = state.wsize - state.wnext; + if (dist > copy) { + dist = copy; + } + utils.arraySet(state.window, src, end - copy, dist, state.wnext); + copy -= dist; + if (copy) { + utils.arraySet(state.window, src, end - copy, copy, 0); + state.wnext = copy; + state.whave = state.wsize; + } else { + state.wnext += dist; + if (state.wnext === state.wsize) { + state.wnext = 0; + } + if (state.whave < state.wsize) { + state.whave += dist; + } + } + } + return 0; + } + function inflate(strm, flush) { + var state; + var input, output; + var next; + var put; + var have, left; + var hold; + var bits; + var _in, _out; + var copy; + var from; + var from_source; + var here = 0; + var here_bits, here_op, here_val; + var last_bits, last_op, last_val; + var len; + var ret2; + var hbuf = new utils.Buf8(4); + var opts; + var n; + var order = ( + /* permutation of code lengths */ + [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15] + ); + if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0) { + return Z_STREAM_ERROR; + } + state = strm.state; + if (state.mode === TYPE) { + state.mode = TYPEDO; + } + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + _in = have; + _out = left; + ret2 = Z_OK; + inf_leave: + for (; ; ) { + switch (state.mode) { + case HEAD: + if (state.wrap === 0) { + state.mode = TYPEDO; + break; + } + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (state.wrap & 2 && hold === 35615) { + state.check = 0; + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc32(state.check, hbuf, 2, 0); + hold = 0; + bits = 0; + state.mode = FLAGS; + break; + } + state.flags = 0; + if (state.head) { + state.head.done = false; + } + if (!(state.wrap & 1) || /* check if zlib header allowed */ + (((hold & 255) << 8) + (hold >> 8)) % 31) { + strm.msg = "incorrect header check"; + state.mode = BAD; + break; + } + if ((hold & 15) !== Z_DEFLATED) { + strm.msg = "unknown compression method"; + state.mode = BAD; + break; + } + hold >>>= 4; + bits -= 4; + len = (hold & 15) + 8; + if (state.wbits === 0) { + state.wbits = len; + } else if (len > state.wbits) { + strm.msg = "invalid window size"; + state.mode = BAD; + break; + } + state.dmax = 1 << len; + strm.adler = state.check = 1; + state.mode = hold & 512 ? DICTID : TYPE; + hold = 0; + bits = 0; + break; + case FLAGS: + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.flags = hold; + if ((state.flags & 255) !== Z_DEFLATED) { + strm.msg = "unknown compression method"; + state.mode = BAD; + break; + } + if (state.flags & 57344) { + strm.msg = "unknown header flags set"; + state.mode = BAD; + break; + } + if (state.head) { + state.head.text = hold >> 8 & 1; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc32(state.check, hbuf, 2, 0); + } + hold = 0; + bits = 0; + state.mode = TIME; + /* falls through */ + case TIME: + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (state.head) { + state.head.time = hold; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + hbuf[2] = hold >>> 16 & 255; + hbuf[3] = hold >>> 24 & 255; + state.check = crc32(state.check, hbuf, 4, 0); + } + hold = 0; + bits = 0; + state.mode = OS; + /* falls through */ + case OS: + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (state.head) { + state.head.xflags = hold & 255; + state.head.os = hold >> 8; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc32(state.check, hbuf, 2, 0); + } + hold = 0; + bits = 0; + state.mode = EXLEN; + /* falls through */ + case EXLEN: + if (state.flags & 1024) { + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.length = hold; + if (state.head) { + state.head.extra_len = hold; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc32(state.check, hbuf, 2, 0); + } + hold = 0; + bits = 0; + } else if (state.head) { + state.head.extra = null; + } + state.mode = EXTRA; + /* falls through */ + case EXTRA: + if (state.flags & 1024) { + copy = state.length; + if (copy > have) { + copy = have; + } + if (copy) { + if (state.head) { + len = state.head.extra_len - state.length; + if (!state.head.extra) { + state.head.extra = new Array(state.head.extra_len); + } + utils.arraySet( + state.head.extra, + input, + next, + // extra field is limited to 65536 bytes + // - no need for additional size check + copy, + /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ + len + ); + } + if (state.flags & 512) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + state.length -= copy; + } + if (state.length) { + break inf_leave; + } + } + state.length = 0; + state.mode = NAME; + /* falls through */ + case NAME: + if (state.flags & 2048) { + if (have === 0) { + break inf_leave; + } + copy = 0; + do { + len = input[next + copy++]; + if (state.head && len && state.length < 65536) { + state.head.name += String.fromCharCode(len); + } + } while (len && copy < have); + if (state.flags & 512) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { + break inf_leave; + } + } else if (state.head) { + state.head.name = null; + } + state.length = 0; + state.mode = COMMENT; + /* falls through */ + case COMMENT: + if (state.flags & 4096) { + if (have === 0) { + break inf_leave; + } + copy = 0; + do { + len = input[next + copy++]; + if (state.head && len && state.length < 65536) { + state.head.comment += String.fromCharCode(len); + } + } while (len && copy < have); + if (state.flags & 512) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { + break inf_leave; + } + } else if (state.head) { + state.head.comment = null; + } + state.mode = HCRC; + /* falls through */ + case HCRC: + if (state.flags & 512) { + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (hold !== (state.check & 65535)) { + strm.msg = "header crc mismatch"; + state.mode = BAD; + break; + } + hold = 0; + bits = 0; + } + if (state.head) { + state.head.hcrc = state.flags >> 9 & 1; + state.head.done = true; + } + strm.adler = state.check = 0; + state.mode = TYPE; + break; + case DICTID: + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + strm.adler = state.check = zswap32(hold); + hold = 0; + bits = 0; + state.mode = DICT; + /* falls through */ + case DICT: + if (state.havedict === 0) { + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + return Z_NEED_DICT; + } + strm.adler = state.check = 1; + state.mode = TYPE; + /* falls through */ + case TYPE: + if (flush === Z_BLOCK || flush === Z_TREES) { + break inf_leave; + } + /* falls through */ + case TYPEDO: + if (state.last) { + hold >>>= bits & 7; + bits -= bits & 7; + state.mode = CHECK; + break; + } + while (bits < 3) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.last = hold & 1; + hold >>>= 1; + bits -= 1; + switch (hold & 3) { + case 0: + state.mode = STORED; + break; + case 1: + fixedtables(state); + state.mode = LEN_; + if (flush === Z_TREES) { + hold >>>= 2; + bits -= 2; + break inf_leave; + } + break; + case 2: + state.mode = TABLE; + break; + case 3: + strm.msg = "invalid block type"; + state.mode = BAD; + } + hold >>>= 2; + bits -= 2; + break; + case STORED: + hold >>>= bits & 7; + bits -= bits & 7; + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if ((hold & 65535) !== (hold >>> 16 ^ 65535)) { + strm.msg = "invalid stored block lengths"; + state.mode = BAD; + break; + } + state.length = hold & 65535; + hold = 0; + bits = 0; + state.mode = COPY_; + if (flush === Z_TREES) { + break inf_leave; + } + /* falls through */ + case COPY_: + state.mode = COPY; + /* falls through */ + case COPY: + copy = state.length; + if (copy) { + if (copy > have) { + copy = have; + } + if (copy > left) { + copy = left; + } + if (copy === 0) { + break inf_leave; + } + utils.arraySet(output, input, next, copy, put); + have -= copy; + next += copy; + left -= copy; + put += copy; + state.length -= copy; + break; + } + state.mode = TYPE; + break; + case TABLE: + while (bits < 14) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.nlen = (hold & 31) + 257; + hold >>>= 5; + bits -= 5; + state.ndist = (hold & 31) + 1; + hold >>>= 5; + bits -= 5; + state.ncode = (hold & 15) + 4; + hold >>>= 4; + bits -= 4; + if (state.nlen > 286 || state.ndist > 30) { + strm.msg = "too many length or distance symbols"; + state.mode = BAD; + break; + } + state.have = 0; + state.mode = LENLENS; + /* falls through */ + case LENLENS: + while (state.have < state.ncode) { + while (bits < 3) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.lens[order[state.have++]] = hold & 7; + hold >>>= 3; + bits -= 3; + } + while (state.have < 19) { + state.lens[order[state.have++]] = 0; + } + state.lencode = state.lendyn; + state.lenbits = 7; + opts = { bits: state.lenbits }; + ret2 = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); + state.lenbits = opts.bits; + if (ret2) { + strm.msg = "invalid code lengths set"; + state.mode = BAD; + break; + } + state.have = 0; + state.mode = CODELENS; + /* falls through */ + case CODELENS: + while (state.have < state.nlen + state.ndist) { + for (; ; ) { + here = state.lencode[hold & (1 << state.lenbits) - 1]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (here_val < 16) { + hold >>>= here_bits; + bits -= here_bits; + state.lens[state.have++] = here_val; + } else { + if (here_val === 16) { + n = here_bits + 2; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= here_bits; + bits -= here_bits; + if (state.have === 0) { + strm.msg = "invalid bit length repeat"; + state.mode = BAD; + break; + } + len = state.lens[state.have - 1]; + copy = 3 + (hold & 3); + hold >>>= 2; + bits -= 2; + } else if (here_val === 17) { + n = here_bits + 3; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= here_bits; + bits -= here_bits; + len = 0; + copy = 3 + (hold & 7); + hold >>>= 3; + bits -= 3; + } else { + n = here_bits + 7; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= here_bits; + bits -= here_bits; + len = 0; + copy = 11 + (hold & 127); + hold >>>= 7; + bits -= 7; + } + if (state.have + copy > state.nlen + state.ndist) { + strm.msg = "invalid bit length repeat"; + state.mode = BAD; + break; + } + while (copy--) { + state.lens[state.have++] = len; + } + } + } + if (state.mode === BAD) { + break; + } + if (state.lens[256] === 0) { + strm.msg = "invalid code -- missing end-of-block"; + state.mode = BAD; + break; + } + state.lenbits = 9; + opts = { bits: state.lenbits }; + ret2 = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); + state.lenbits = opts.bits; + if (ret2) { + strm.msg = "invalid literal/lengths set"; + state.mode = BAD; + break; + } + state.distbits = 6; + state.distcode = state.distdyn; + opts = { bits: state.distbits }; + ret2 = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); + state.distbits = opts.bits; + if (ret2) { + strm.msg = "invalid distances set"; + state.mode = BAD; + break; + } + state.mode = LEN_; + if (flush === Z_TREES) { + break inf_leave; + } + /* falls through */ + case LEN_: + state.mode = LEN; + /* falls through */ + case LEN: + if (have >= 6 && left >= 258) { + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + inflate_fast(strm, _out); + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + if (state.mode === TYPE) { + state.back = -1; + } + break; + } + state.back = 0; + for (; ; ) { + here = state.lencode[hold & (1 << state.lenbits) - 1]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (here_op && (here_op & 240) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (; ; ) { + here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (last_bits + here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= last_bits; + bits -= last_bits; + state.back += last_bits; + } + hold >>>= here_bits; + bits -= here_bits; + state.back += here_bits; + state.length = here_val; + if (here_op === 0) { + state.mode = LIT; + break; + } + if (here_op & 32) { + state.back = -1; + state.mode = TYPE; + break; + } + if (here_op & 64) { + strm.msg = "invalid literal/length code"; + state.mode = BAD; + break; + } + state.extra = here_op & 15; + state.mode = LENEXT; + /* falls through */ + case LENEXT: + if (state.extra) { + n = state.extra; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.length += hold & (1 << state.extra) - 1; + hold >>>= state.extra; + bits -= state.extra; + state.back += state.extra; + } + state.was = state.length; + state.mode = DIST; + /* falls through */ + case DIST: + for (; ; ) { + here = state.distcode[hold & (1 << state.distbits) - 1]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if ((here_op & 240) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (; ; ) { + here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (last_bits + here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= last_bits; + bits -= last_bits; + state.back += last_bits; + } + hold >>>= here_bits; + bits -= here_bits; + state.back += here_bits; + if (here_op & 64) { + strm.msg = "invalid distance code"; + state.mode = BAD; + break; + } + state.offset = here_val; + state.extra = here_op & 15; + state.mode = DISTEXT; + /* falls through */ + case DISTEXT: + if (state.extra) { + n = state.extra; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.offset += hold & (1 << state.extra) - 1; + hold >>>= state.extra; + bits -= state.extra; + state.back += state.extra; + } + if (state.offset > state.dmax) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break; + } + state.mode = MATCH; + /* falls through */ + case MATCH: + if (left === 0) { + break inf_leave; + } + copy = _out - left; + if (state.offset > copy) { + copy = state.offset - copy; + if (copy > state.whave) { + if (state.sane) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break; + } + } + if (copy > state.wnext) { + copy -= state.wnext; + from = state.wsize - copy; + } else { + from = state.wnext - copy; + } + if (copy > state.length) { + copy = state.length; + } + from_source = state.window; + } else { + from_source = output; + from = put - state.offset; + copy = state.length; + } + if (copy > left) { + copy = left; + } + left -= copy; + state.length -= copy; + do { + output[put++] = from_source[from++]; + } while (--copy); + if (state.length === 0) { + state.mode = LEN; + } + break; + case LIT: + if (left === 0) { + break inf_leave; + } + output[put++] = state.length; + left--; + state.mode = LEN; + break; + case CHECK: + if (state.wrap) { + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold |= input[next++] << bits; + bits += 8; + } + _out -= left; + strm.total_out += _out; + state.total += _out; + if (_out) { + strm.adler = state.check = /*UPDATE(state.check, put - _out, _out);*/ + state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out); + } + _out = left; + if ((state.flags ? hold : zswap32(hold)) !== state.check) { + strm.msg = "incorrect data check"; + state.mode = BAD; + break; + } + hold = 0; + bits = 0; + } + state.mode = LENGTH; + /* falls through */ + case LENGTH: + if (state.wrap && state.flags) { + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (hold !== (state.total & 4294967295)) { + strm.msg = "incorrect length check"; + state.mode = BAD; + break; + } + hold = 0; + bits = 0; + } + state.mode = DONE; + /* falls through */ + case DONE: + ret2 = Z_STREAM_END; + break inf_leave; + case BAD: + ret2 = Z_DATA_ERROR; + break inf_leave; + case MEM: + return Z_MEM_ERROR; + case SYNC: + /* falls through */ + default: + return Z_STREAM_ERROR; + } + } + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + if (state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH)) { + if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { + state.mode = MEM; + return Z_MEM_ERROR; + } + } + _in -= strm.avail_in; + _out -= strm.avail_out; + strm.total_in += _in; + strm.total_out += _out; + state.total += _out; + if (state.wrap && _out) { + strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ + state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out); + } + strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); + if ((_in === 0 && _out === 0 || flush === Z_FINISH) && ret2 === Z_OK) { + ret2 = Z_BUF_ERROR; + } + return ret2; + } + function inflateEnd(strm) { + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + var state = strm.state; + if (state.window) { + state.window = null; + } + strm.state = null; + return Z_OK; + } + function inflateGetHeader(strm, head) { + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + if ((state.wrap & 2) === 0) { + return Z_STREAM_ERROR; + } + state.head = head; + head.done = false; + return Z_OK; + } + function inflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + var state; + var dictid; + var ret2; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + if (state.wrap !== 0 && state.mode !== DICT) { + return Z_STREAM_ERROR; + } + if (state.mode === DICT) { + dictid = 1; + dictid = adler32(dictid, dictionary, dictLength, 0); + if (dictid !== state.check) { + return Z_DATA_ERROR; + } + } + ret2 = updatewindow(strm, dictionary, dictLength, dictLength); + if (ret2) { + state.mode = MEM; + return Z_MEM_ERROR; + } + state.havedict = 1; + return Z_OK; + } + exports2.inflateReset = inflateReset; + exports2.inflateReset2 = inflateReset2; + exports2.inflateResetKeep = inflateResetKeep; + exports2.inflateInit = inflateInit; + exports2.inflateInit2 = inflateInit2; + exports2.inflate = inflate; + exports2.inflateEnd = inflateEnd; + exports2.inflateGetHeader = inflateGetHeader; + exports2.inflateSetDictionary = inflateSetDictionary; + exports2.inflateInfo = "pako inflate (from Nodeca project)"; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/constants.js +var require_constants13 = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/constants.js"(exports2, module2) { + "use strict"; + module2.exports = { + /* Allowed flush values; see deflate() and inflate() below for details */ + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_TREES: 6, + /* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + //Z_MEM_ERROR: -4, + Z_BUF_ERROR: -5, + //Z_VERSION_ERROR: -6, + /* compression levels */ + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + Z_DEFAULT_STRATEGY: 0, + /* Possible values of the data_type field (though see inflate()) */ + Z_BINARY: 0, + Z_TEXT: 1, + //Z_ASCII: 1, // = Z_TEXT (deprecated) + Z_UNKNOWN: 2, + /* The deflate compression method */ + Z_DEFLATED: 8 + //Z_NULL: null // Use -1 or null inline, depending on var type + }; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/gzheader.js +var require_gzheader = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/gzheader.js"(exports2, module2) { + "use strict"; + function GZheader() { + this.text = 0; + this.time = 0; + this.xflags = 0; + this.os = 0; + this.extra = null; + this.extra_len = 0; + this.name = ""; + this.comment = ""; + this.hcrc = 0; + this.done = false; + } + module2.exports = GZheader; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/inflate.js +var require_inflate2 = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/inflate.js"(exports2) { + "use strict"; + var zlib_inflate = require_inflate(); + var utils = require_common4(); + var strings = require_strings(); + var c = require_constants13(); + var msg = require_messages3(); + var ZStream = require_zstream(); + var GZheader = require_gzheader(); + var toString2 = Object.prototype.toString; + function Inflate(options) { + if (!(this instanceof Inflate)) return new Inflate(options); + this.options = utils.assign({ + chunkSize: 16384, + windowBits: 0, + to: "" + }, options || {}); + var opt = this.options; + if (opt.raw && opt.windowBits >= 0 && opt.windowBits < 16) { + opt.windowBits = -opt.windowBits; + if (opt.windowBits === 0) { + opt.windowBits = -15; + } + } + if (opt.windowBits >= 0 && opt.windowBits < 16 && !(options && options.windowBits)) { + opt.windowBits += 32; + } + if (opt.windowBits > 15 && opt.windowBits < 48) { + if ((opt.windowBits & 15) === 0) { + opt.windowBits |= 15; + } + } + this.err = 0; + this.msg = ""; + this.ended = false; + this.chunks = []; + this.strm = new ZStream(); + this.strm.avail_out = 0; + var status = zlib_inflate.inflateInit2( + this.strm, + opt.windowBits + ); + if (status !== c.Z_OK) { + throw new Error(msg[status]); + } + this.header = new GZheader(); + zlib_inflate.inflateGetHeader(this.strm, this.header); + if (opt.dictionary) { + if (typeof opt.dictionary === "string") { + opt.dictionary = strings.string2buf(opt.dictionary); + } else if (toString2.call(opt.dictionary) === "[object ArrayBuffer]") { + opt.dictionary = new Uint8Array(opt.dictionary); + } + if (opt.raw) { + status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary); + if (status !== c.Z_OK) { + throw new Error(msg[status]); + } + } + } + } + Inflate.prototype.push = function(data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var dictionary = this.options.dictionary; + var status, _mode; + var next_out_utf8, tail, utf8str; + var allowBufError = false; + if (this.ended) { + return false; + } + _mode = mode === ~~mode ? mode : mode === true ? c.Z_FINISH : c.Z_NO_FLUSH; + if (typeof data === "string") { + strm.input = strings.binstring2buf(data); + } else if (toString2.call(data) === "[object ArrayBuffer]") { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + strm.next_in = 0; + strm.avail_in = strm.input.length; + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); + if (status === c.Z_NEED_DICT && dictionary) { + status = zlib_inflate.inflateSetDictionary(this.strm, dictionary); + } + if (status === c.Z_BUF_ERROR && allowBufError === true) { + status = c.Z_OK; + allowBufError = false; + } + if (status !== c.Z_STREAM_END && status !== c.Z_OK) { + this.onEnd(status); + this.ended = true; + return false; + } + if (strm.next_out) { + if (strm.avail_out === 0 || status === c.Z_STREAM_END || strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH)) { + if (this.options.to === "string") { + next_out_utf8 = strings.utf8border(strm.output, strm.next_out); + tail = strm.next_out - next_out_utf8; + utf8str = strings.buf2string(strm.output, next_out_utf8); + strm.next_out = tail; + strm.avail_out = chunkSize - tail; + if (tail) { + utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); + } + this.onData(utf8str); + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } + if (strm.avail_in === 0 && strm.avail_out === 0) { + allowBufError = true; + } + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); + if (status === c.Z_STREAM_END) { + _mode = c.Z_FINISH; + } + if (_mode === c.Z_FINISH) { + status = zlib_inflate.inflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === c.Z_OK; + } + if (_mode === c.Z_SYNC_FLUSH) { + this.onEnd(c.Z_OK); + strm.avail_out = 0; + return true; + } + return true; + }; + Inflate.prototype.onData = function(chunk) { + this.chunks.push(chunk); + }; + Inflate.prototype.onEnd = function(status) { + if (status === c.Z_OK) { + if (this.options.to === "string") { + this.result = this.chunks.join(""); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; + }; + function inflate(input, options) { + var inflator = new Inflate(options); + inflator.push(input, true); + if (inflator.err) { + throw inflator.msg || msg[inflator.err]; + } + return inflator.result; + } + function inflateRaw(input, options) { + options = options || {}; + options.raw = true; + return inflate(input, options); + } + exports2.Inflate = Inflate; + exports2.inflate = inflate; + exports2.inflateRaw = inflateRaw; + exports2.ungzip = inflate; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/index.js +var require_pako = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/index.js"(exports2, module2) { + "use strict"; + var assign = require_common4().assign; + var deflate = require_deflate2(); + var inflate = require_inflate2(); + var constants = require_constants13(); + var pako = {}; + assign(pako, deflate, inflate, constants); + module2.exports = pako; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/flate.js +var require_flate = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/flate.js"(exports2) { + "use strict"; + var USE_TYPEDARRAY = typeof Uint8Array !== "undefined" && typeof Uint16Array !== "undefined" && typeof Uint32Array !== "undefined"; + var pako = require_pako(); + var utils = require_utils20(); + var GenericWorker = require_GenericWorker(); + var ARRAY_TYPE = USE_TYPEDARRAY ? "uint8array" : "array"; + exports2.magic = "\b\0"; + function FlateWorker(action, options) { + GenericWorker.call(this, "FlateWorker/" + action); + this._pako = null; + this._pakoAction = action; + this._pakoOptions = options; + this.meta = {}; + } + utils.inherits(FlateWorker, GenericWorker); + FlateWorker.prototype.processChunk = function(chunk) { + this.meta = chunk.meta; + if (this._pako === null) { + this._createPako(); + } + this._pako.push(utils.transformTo(ARRAY_TYPE, chunk.data), false); + }; + FlateWorker.prototype.flush = function() { + GenericWorker.prototype.flush.call(this); + if (this._pako === null) { + this._createPako(); + } + this._pako.push([], true); + }; + FlateWorker.prototype.cleanUp = function() { + GenericWorker.prototype.cleanUp.call(this); + this._pako = null; + }; + FlateWorker.prototype._createPako = function() { + this._pako = new pako[this._pakoAction]({ + raw: true, + level: this._pakoOptions.level || -1 + // default compression + }); + var self2 = this; + this._pako.onData = function(data) { + self2.push({ + data, + meta: self2.meta + }); + }; + }; + exports2.compressWorker = function(compressionOptions) { + return new FlateWorker("Deflate", compressionOptions); + }; + exports2.uncompressWorker = function() { + return new FlateWorker("Inflate", {}); + }; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/compressions.js +var require_compressions = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/compressions.js"(exports2) { + "use strict"; + var GenericWorker = require_GenericWorker(); + exports2.STORE = { + magic: "\0\0", + compressWorker: function() { + return new GenericWorker("STORE compression"); + }, + uncompressWorker: function() { + return new GenericWorker("STORE decompression"); + } + }; + exports2.DEFLATE = require_flate(); + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/signature.js +var require_signature = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/signature.js"(exports2) { + "use strict"; + exports2.LOCAL_FILE_HEADER = "PK"; + exports2.CENTRAL_FILE_HEADER = "PK"; + exports2.CENTRAL_DIRECTORY_END = "PK"; + exports2.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07"; + exports2.ZIP64_CENTRAL_DIRECTORY_END = "PK"; + exports2.DATA_DESCRIPTOR = "PK\x07\b"; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/generate/ZipFileWorker.js +var require_ZipFileWorker = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/generate/ZipFileWorker.js"(exports2, module2) { + "use strict"; + var utils = require_utils20(); + var GenericWorker = require_GenericWorker(); + var utf8 = require_utf8(); + var crc32 = require_crc32(); + var signature = require_signature(); + var decToHex = function(dec, bytes) { + var hex = "", i; + for (i = 0; i < bytes; i++) { + hex += String.fromCharCode(dec & 255); + dec = dec >>> 8; + } + return hex; + }; + var generateUnixExternalFileAttr = function(unixPermissions, isDir) { + var result = unixPermissions; + if (!unixPermissions) { + result = isDir ? 16893 : 33204; + } + return (result & 65535) << 16; + }; + var generateDosExternalFileAttr = function(dosPermissions) { + return (dosPermissions || 0) & 63; + }; + var generateZipParts = function(streamInfo, streamedContent, streamingEnded, offset, platform, encodeFileName) { + var file2 = streamInfo["file"], compression = streamInfo["compression"], useCustomEncoding = encodeFileName !== utf8.utf8encode, encodedFileName = utils.transformTo("string", encodeFileName(file2.name)), utfEncodedFileName = utils.transformTo("string", utf8.utf8encode(file2.name)), comment = file2.comment, encodedComment = utils.transformTo("string", encodeFileName(comment)), utfEncodedComment = utils.transformTo("string", utf8.utf8encode(comment)), useUTF8ForFileName = utfEncodedFileName.length !== file2.name.length, useUTF8ForComment = utfEncodedComment.length !== comment.length, dosTime, dosDate, extraFields = "", unicodePathExtraField = "", unicodeCommentExtraField = "", dir = file2.dir, date = file2.date; + var dataInfo = { + crc32: 0, + compressedSize: 0, + uncompressedSize: 0 + }; + if (!streamedContent || streamingEnded) { + dataInfo.crc32 = streamInfo["crc32"]; + dataInfo.compressedSize = streamInfo["compressedSize"]; + dataInfo.uncompressedSize = streamInfo["uncompressedSize"]; + } + var bitflag = 0; + if (streamedContent) { + bitflag |= 8; + } + if (!useCustomEncoding && (useUTF8ForFileName || useUTF8ForComment)) { + bitflag |= 2048; + } + var extFileAttr = 0; + var versionMadeBy = 0; + if (dir) { + extFileAttr |= 16; + } + if (platform === "UNIX") { + versionMadeBy = 798; + extFileAttr |= generateUnixExternalFileAttr(file2.unixPermissions, dir); + } else { + versionMadeBy = 20; + extFileAttr |= generateDosExternalFileAttr(file2.dosPermissions, dir); + } + dosTime = date.getUTCHours(); + dosTime = dosTime << 6; + dosTime = dosTime | date.getUTCMinutes(); + dosTime = dosTime << 5; + dosTime = dosTime | date.getUTCSeconds() / 2; + dosDate = date.getUTCFullYear() - 1980; + dosDate = dosDate << 4; + dosDate = dosDate | date.getUTCMonth() + 1; + dosDate = dosDate << 5; + dosDate = dosDate | date.getUTCDate(); + if (useUTF8ForFileName) { + unicodePathExtraField = // Version + decToHex(1, 1) + // NameCRC32 + decToHex(crc32(encodedFileName), 4) + // UnicodeName + utfEncodedFileName; + extraFields += // Info-ZIP Unicode Path Extra Field + "up" + // size + decToHex(unicodePathExtraField.length, 2) + // content + unicodePathExtraField; + } + if (useUTF8ForComment) { + unicodeCommentExtraField = // Version + decToHex(1, 1) + // CommentCRC32 + decToHex(crc32(encodedComment), 4) + // UnicodeName + utfEncodedComment; + extraFields += // Info-ZIP Unicode Path Extra Field + "uc" + // size + decToHex(unicodeCommentExtraField.length, 2) + // content + unicodeCommentExtraField; + } + var header = ""; + header += "\n\0"; + header += decToHex(bitflag, 2); + header += compression.magic; + header += decToHex(dosTime, 2); + header += decToHex(dosDate, 2); + header += decToHex(dataInfo.crc32, 4); + header += decToHex(dataInfo.compressedSize, 4); + header += decToHex(dataInfo.uncompressedSize, 4); + header += decToHex(encodedFileName.length, 2); + header += decToHex(extraFields.length, 2); + var fileRecord = signature.LOCAL_FILE_HEADER + header + encodedFileName + extraFields; + var dirRecord = signature.CENTRAL_FILE_HEADER + // version made by (00: DOS) + decToHex(versionMadeBy, 2) + // file header (common to file and central directory) + header + // file comment length + decToHex(encodedComment.length, 2) + // disk number start + "\0\0\0\0" + // external file attributes + decToHex(extFileAttr, 4) + // relative offset of local header + decToHex(offset, 4) + // file name + encodedFileName + // extra field + extraFields + // file comment + encodedComment; + return { + fileRecord, + dirRecord + }; + }; + var generateCentralDirectoryEnd = function(entriesCount, centralDirLength, localDirLength, comment, encodeFileName) { + var dirEnd = ""; + var encodedComment = utils.transformTo("string", encodeFileName(comment)); + dirEnd = signature.CENTRAL_DIRECTORY_END + // number of this disk + "\0\0\0\0" + // total number of entries in the central directory on this disk + decToHex(entriesCount, 2) + // total number of entries in the central directory + decToHex(entriesCount, 2) + // size of the central directory 4 bytes + decToHex(centralDirLength, 4) + // offset of start of central directory with respect to the starting disk number + decToHex(localDirLength, 4) + // .ZIP file comment length + decToHex(encodedComment.length, 2) + // .ZIP file comment + encodedComment; + return dirEnd; + }; + var generateDataDescriptors = function(streamInfo) { + var descriptor = ""; + descriptor = signature.DATA_DESCRIPTOR + // crc-32 4 bytes + decToHex(streamInfo["crc32"], 4) + // compressed size 4 bytes + decToHex(streamInfo["compressedSize"], 4) + // uncompressed size 4 bytes + decToHex(streamInfo["uncompressedSize"], 4); + return descriptor; + }; + function ZipFileWorker(streamFiles, comment, platform, encodeFileName) { + GenericWorker.call(this, "ZipFileWorker"); + this.bytesWritten = 0; + this.zipComment = comment; + this.zipPlatform = platform; + this.encodeFileName = encodeFileName; + this.streamFiles = streamFiles; + this.accumulate = false; + this.contentBuffer = []; + this.dirRecords = []; + this.currentSourceOffset = 0; + this.entriesCount = 0; + this.currentFile = null; + this._sources = []; + } + utils.inherits(ZipFileWorker, GenericWorker); + ZipFileWorker.prototype.push = function(chunk) { + var currentFilePercent = chunk.meta.percent || 0; + var entriesCount = this.entriesCount; + var remainingFiles = this._sources.length; + if (this.accumulate) { + this.contentBuffer.push(chunk); + } else { + this.bytesWritten += chunk.data.length; + GenericWorker.prototype.push.call(this, { + data: chunk.data, + meta: { + currentFile: this.currentFile, + percent: entriesCount ? (currentFilePercent + 100 * (entriesCount - remainingFiles - 1)) / entriesCount : 100 + } + }); + } + }; + ZipFileWorker.prototype.openedSource = function(streamInfo) { + this.currentSourceOffset = this.bytesWritten; + this.currentFile = streamInfo["file"].name; + var streamedContent = this.streamFiles && !streamInfo["file"].dir; + if (streamedContent) { + var record = generateZipParts(streamInfo, streamedContent, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName); + this.push({ + data: record.fileRecord, + meta: { percent: 0 } + }); + } else { + this.accumulate = true; + } + }; + ZipFileWorker.prototype.closedSource = function(streamInfo) { + this.accumulate = false; + var streamedContent = this.streamFiles && !streamInfo["file"].dir; + var record = generateZipParts(streamInfo, streamedContent, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName); + this.dirRecords.push(record.dirRecord); + if (streamedContent) { + this.push({ + data: generateDataDescriptors(streamInfo), + meta: { percent: 100 } + }); + } else { + this.push({ + data: record.fileRecord, + meta: { percent: 0 } + }); + while (this.contentBuffer.length) { + this.push(this.contentBuffer.shift()); + } + } + this.currentFile = null; + }; + ZipFileWorker.prototype.flush = function() { + var localDirLength = this.bytesWritten; + for (var i = 0; i < this.dirRecords.length; i++) { + this.push({ + data: this.dirRecords[i], + meta: { percent: 100 } + }); + } + var centralDirLength = this.bytesWritten - localDirLength; + var dirEnd = generateCentralDirectoryEnd(this.dirRecords.length, centralDirLength, localDirLength, this.zipComment, this.encodeFileName); + this.push({ + data: dirEnd, + meta: { percent: 100 } + }); + }; + ZipFileWorker.prototype.prepareNextSource = function() { + this.previous = this._sources.shift(); + this.openedSource(this.previous.streamInfo); + if (this.isPaused) { + this.previous.pause(); + } else { + this.previous.resume(); + } + }; + ZipFileWorker.prototype.registerPrevious = function(previous) { + this._sources.push(previous); + var self2 = this; + previous.on("data", function(chunk) { + self2.processChunk(chunk); + }); + previous.on("end", function() { + self2.closedSource(self2.previous.streamInfo); + if (self2._sources.length) { + self2.prepareNextSource(); + } else { + self2.end(); + } + }); + previous.on("error", function(e) { + self2.error(e); + }); + return this; + }; + ZipFileWorker.prototype.resume = function() { + if (!GenericWorker.prototype.resume.call(this)) { + return false; + } + if (!this.previous && this._sources.length) { + this.prepareNextSource(); + return true; + } + if (!this.previous && !this._sources.length && !this.generatedError) { + this.end(); + return true; + } + }; + ZipFileWorker.prototype.error = function(e) { + var sources = this._sources; + if (!GenericWorker.prototype.error.call(this, e)) { + return false; + } + for (var i = 0; i < sources.length; i++) { + try { + sources[i].error(e); + } catch (e2) { + } + } + return true; + }; + ZipFileWorker.prototype.lock = function() { + GenericWorker.prototype.lock.call(this); + var sources = this._sources; + for (var i = 0; i < sources.length; i++) { + sources[i].lock(); + } + }; + module2.exports = ZipFileWorker; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/generate/index.js +var require_generate2 = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/generate/index.js"(exports2) { + "use strict"; + var compressions = require_compressions(); + var ZipFileWorker = require_ZipFileWorker(); + var getCompression = function(fileCompression, zipCompression) { + var compressionName = fileCompression || zipCompression; + var compression = compressions[compressionName]; + if (!compression) { + throw new Error(compressionName + " is not a valid compression method !"); + } + return compression; + }; + exports2.generateWorker = function(zip, options, comment) { + var zipFileWorker = new ZipFileWorker(options.streamFiles, comment, options.platform, options.encodeFileName); + var entriesCount = 0; + try { + zip.forEach(function(relativePath, file2) { + entriesCount++; + var compression = getCompression(file2.options.compression, options.compression); + var compressionOptions = file2.options.compressionOptions || options.compressionOptions || {}; + var dir = file2.dir, date = file2.date; + file2._compressWorker(compression, compressionOptions).withStreamInfo("file", { + name: relativePath, + dir, + date, + comment: file2.comment || "", + unixPermissions: file2.unixPermissions, + dosPermissions: file2.dosPermissions + }).pipe(zipFileWorker); + }); + zipFileWorker.entriesCount = entriesCount; + } catch (e) { + zipFileWorker.error(e); + } + return zipFileWorker; + }; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js +var require_NodejsStreamInputAdapter = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js"(exports2, module2) { + "use strict"; + var utils = require_utils20(); + var GenericWorker = require_GenericWorker(); + function NodejsStreamInputAdapter(filename, stream) { + GenericWorker.call(this, "Nodejs stream input adapter for " + filename); + this._upstreamEnded = false; + this._bindStream(stream); + } + utils.inherits(NodejsStreamInputAdapter, GenericWorker); + NodejsStreamInputAdapter.prototype._bindStream = function(stream) { + var self2 = this; + this._stream = stream; + stream.pause(); + stream.on("data", function(chunk) { + self2.push({ + data: chunk, + meta: { + percent: 0 + } + }); + }).on("error", function(e) { + if (self2.isPaused) { + this.generatedError = e; + } else { + self2.error(e); + } + }).on("end", function() { + if (self2.isPaused) { + self2._upstreamEnded = true; + } else { + self2.end(); + } + }); + }; + NodejsStreamInputAdapter.prototype.pause = function() { + if (!GenericWorker.prototype.pause.call(this)) { + return false; + } + this._stream.pause(); + return true; + }; + NodejsStreamInputAdapter.prototype.resume = function() { + if (!GenericWorker.prototype.resume.call(this)) { + return false; + } + if (this._upstreamEnded) { + this.end(); + } else { + this._stream.resume(); + } + return true; + }; + module2.exports = NodejsStreamInputAdapter; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/object.js +var require_object = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/object.js"(exports2, module2) { + "use strict"; + var utf8 = require_utf8(); + var utils = require_utils20(); + var GenericWorker = require_GenericWorker(); + var StreamHelper = require_StreamHelper(); + var defaults = require_defaults2(); + var CompressedObject = require_compressedObject(); + var ZipObject = require_zipObject(); + var generate = require_generate2(); + var nodejsUtils = require_nodejsUtils(); + var NodejsStreamInputAdapter = require_NodejsStreamInputAdapter(); + var fileAdd = function(name, data, originalOptions) { + var dataType = utils.getTypeOf(data), parent; + var o = utils.extend(originalOptions || {}, defaults); + o.date = o.date || /* @__PURE__ */ new Date(); + if (o.compression !== null) { + o.compression = o.compression.toUpperCase(); + } + if (typeof o.unixPermissions === "string") { + o.unixPermissions = parseInt(o.unixPermissions, 8); + } + if (o.unixPermissions && o.unixPermissions & 16384) { + o.dir = true; + } + if (o.dosPermissions && o.dosPermissions & 16) { + o.dir = true; + } + if (o.dir) { + name = forceTrailingSlash(name); + } + if (o.createFolders && (parent = parentFolder(name))) { + folderAdd.call(this, parent, true); + } + var isUnicodeString = dataType === "string" && o.binary === false && o.base64 === false; + if (!originalOptions || typeof originalOptions.binary === "undefined") { + o.binary = !isUnicodeString; + } + var isCompressedEmpty = data instanceof CompressedObject && data.uncompressedSize === 0; + if (isCompressedEmpty || o.dir || !data || data.length === 0) { + o.base64 = false; + o.binary = true; + data = ""; + o.compression = "STORE"; + dataType = "string"; + } + var zipObjectContent = null; + if (data instanceof CompressedObject || data instanceof GenericWorker) { + zipObjectContent = data; + } else if (nodejsUtils.isNode && nodejsUtils.isStream(data)) { + zipObjectContent = new NodejsStreamInputAdapter(name, data); + } else { + zipObjectContent = utils.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64); + } + var object = new ZipObject(name, zipObjectContent, o); + this.files[name] = object; + }; + var parentFolder = function(path) { + if (path.slice(-1) === "/") { + path = path.substring(0, path.length - 1); + } + var lastSlash = path.lastIndexOf("/"); + return lastSlash > 0 ? path.substring(0, lastSlash) : ""; + }; + var forceTrailingSlash = function(path) { + if (path.slice(-1) !== "/") { + path += "/"; + } + return path; + }; + var folderAdd = function(name, createFolders) { + createFolders = typeof createFolders !== "undefined" ? createFolders : defaults.createFolders; + name = forceTrailingSlash(name); + if (!this.files[name]) { + fileAdd.call(this, name, null, { + dir: true, + createFolders + }); + } + return this.files[name]; + }; + function isRegExp(object) { + return Object.prototype.toString.call(object) === "[object RegExp]"; + } + var out = { + /** + * @see loadAsync + */ + load: function() { + throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); + }, + /** + * Call a callback function for each entry at this folder level. + * @param {Function} cb the callback function: + * function (relativePath, file) {...} + * It takes 2 arguments : the relative path and the file. + */ + forEach: function(cb) { + var filename, relativePath, file2; + for (filename in this.files) { + file2 = this.files[filename]; + relativePath = filename.slice(this.root.length, filename.length); + if (relativePath && filename.slice(0, this.root.length) === this.root) { + cb(relativePath, file2); + } + } + }, + /** + * Filter nested files/folders with the specified function. + * @param {Function} search the predicate to use : + * function (relativePath, file) {...} + * It takes 2 arguments : the relative path and the file. + * @return {Array} An array of matching elements. + */ + filter: function(search) { + var result = []; + this.forEach(function(relativePath, entry) { + if (search(relativePath, entry)) { + result.push(entry); + } + }); + return result; + }, + /** + * Add a file to the zip file, or search a file. + * @param {string|RegExp} name The name of the file to add (if data is defined), + * the name of the file to find (if no data) or a regex to match files. + * @param {String|ArrayBuffer|Uint8Array|Buffer} data The file data, either raw or base64 encoded + * @param {Object} o File options + * @return {JSZip|Object|Array} this JSZip object (when adding a file), + * a file (when searching by string) or an array of files (when searching by regex). + */ + file: function(name, data, o) { + if (arguments.length === 1) { + if (isRegExp(name)) { + var regexp = name; + return this.filter(function(relativePath, file2) { + return !file2.dir && regexp.test(relativePath); + }); + } else { + var obj2 = this.files[this.root + name]; + if (obj2 && !obj2.dir) { + return obj2; + } else { + return null; + } + } + } else { + name = this.root + name; + fileAdd.call(this, name, data, o); + } + return this; + }, + /** + * Add a directory to the zip file, or search. + * @param {String|RegExp} arg The name of the directory to add, or a regex to search folders. + * @return {JSZip} an object with the new directory as the root, or an array containing matching folders. + */ + folder: function(arg) { + if (!arg) { + return this; + } + if (isRegExp(arg)) { + return this.filter(function(relativePath, file2) { + return file2.dir && arg.test(relativePath); + }); + } + var name = this.root + arg; + var newFolder = folderAdd.call(this, name); + var ret2 = this.clone(); + ret2.root = newFolder.name; + return ret2; + }, + /** + * Delete a file, or a directory and all sub-files, from the zip + * @param {string} name the name of the file to delete + * @return {JSZip} this JSZip object + */ + remove: function(name) { + name = this.root + name; + var file2 = this.files[name]; + if (!file2) { + if (name.slice(-1) !== "/") { + name += "/"; + } + file2 = this.files[name]; + } + if (file2 && !file2.dir) { + delete this.files[name]; + } else { + var kids = this.filter(function(relativePath, file3) { + return file3.name.slice(0, name.length) === name; + }); + for (var i = 0; i < kids.length; i++) { + delete this.files[kids[i].name]; + } + } + return this; + }, + /** + * @deprecated This method has been removed in JSZip 3.0, please check the upgrade guide. + */ + generate: function() { + throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); + }, + /** + * Generate the complete zip file as an internal stream. + * @param {Object} options the options to generate the zip file : + * - compression, "STORE" by default. + * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob. + * @return {StreamHelper} the streamed zip file. + */ + generateInternalStream: function(options) { + var worker, opts = {}; + try { + opts = utils.extend(options || {}, { + streamFiles: false, + compression: "STORE", + compressionOptions: null, + type: "", + platform: "DOS", + comment: null, + mimeType: "application/zip", + encodeFileName: utf8.utf8encode + }); + opts.type = opts.type.toLowerCase(); + opts.compression = opts.compression.toUpperCase(); + if (opts.type === "binarystring") { + opts.type = "string"; + } + if (!opts.type) { + throw new Error("No output type specified."); + } + utils.checkSupport(opts.type); + if (opts.platform === "darwin" || opts.platform === "freebsd" || opts.platform === "linux" || opts.platform === "sunos") { + opts.platform = "UNIX"; + } + if (opts.platform === "win32") { + opts.platform = "DOS"; + } + var comment = opts.comment || this.comment || ""; + worker = generate.generateWorker(this, opts, comment); + } catch (e) { + worker = new GenericWorker("error"); + worker.error(e); + } + return new StreamHelper(worker, opts.type || "string", opts.mimeType); + }, + /** + * Generate the complete zip file asynchronously. + * @see generateInternalStream + */ + generateAsync: function(options, onUpdate) { + return this.generateInternalStream(options).accumulate(onUpdate); + }, + /** + * Generate the complete zip file asynchronously. + * @see generateInternalStream + */ + generateNodeStream: function(options, onUpdate) { + options = options || {}; + if (!options.type) { + options.type = "nodebuffer"; + } + return this.generateInternalStream(options).toNodejsStream(onUpdate); + } + }; + module2.exports = out; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/reader/DataReader.js +var require_DataReader = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/reader/DataReader.js"(exports2, module2) { + "use strict"; + var utils = require_utils20(); + function DataReader(data) { + this.data = data; + this.length = data.length; + this.index = 0; + this.zero = 0; + } + DataReader.prototype = { + /** + * Check that the offset will not go too far. + * @param {string} offset the additional offset to check. + * @throws {Error} an Error if the offset is out of bounds. + */ + checkOffset: function(offset) { + this.checkIndex(this.index + offset); + }, + /** + * Check that the specified index will not be too far. + * @param {string} newIndex the index to check. + * @throws {Error} an Error if the index is out of bounds. + */ + checkIndex: function(newIndex) { + if (this.length < this.zero + newIndex || newIndex < 0) { + throw new Error("End of data reached (data length = " + this.length + ", asked index = " + newIndex + "). Corrupted zip ?"); + } + }, + /** + * Change the index. + * @param {number} newIndex The new index. + * @throws {Error} if the new index is out of the data. + */ + setIndex: function(newIndex) { + this.checkIndex(newIndex); + this.index = newIndex; + }, + /** + * Skip the next n bytes. + * @param {number} n the number of bytes to skip. + * @throws {Error} if the new index is out of the data. + */ + skip: function(n) { + this.setIndex(this.index + n); + }, + /** + * Get the byte at the specified index. + * @param {number} i the index to use. + * @return {number} a byte. + */ + byteAt: function() { + }, + /** + * Get the next number with a given byte size. + * @param {number} size the number of bytes to read. + * @return {number} the corresponding number. + */ + readInt: function(size) { + var result = 0, i; + this.checkOffset(size); + for (i = this.index + size - 1; i >= this.index; i--) { + result = (result << 8) + this.byteAt(i); + } + this.index += size; + return result; + }, + /** + * Get the next string with a given byte size. + * @param {number} size the number of bytes to read. + * @return {string} the corresponding string. + */ + readString: function(size) { + return utils.transformTo("string", this.readData(size)); + }, + /** + * Get raw data without conversion, bytes. + * @param {number} size the number of bytes to read. + * @return {Object} the raw data, implementation specific. + */ + readData: function() { + }, + /** + * Find the last occurrence of a zip signature (4 bytes). + * @param {string} sig the signature to find. + * @return {number} the index of the last occurrence, -1 if not found. + */ + lastIndexOfSignature: function() { + }, + /** + * Read the signature (4 bytes) at the current position and compare it with sig. + * @param {string} sig the expected signature + * @return {boolean} true if the signature matches, false otherwise. + */ + readAndCheckSignature: function() { + }, + /** + * Get the next date. + * @return {Date} the date. + */ + readDate: function() { + var dostime = this.readInt(4); + return new Date(Date.UTC( + (dostime >> 25 & 127) + 1980, + // year + (dostime >> 21 & 15) - 1, + // month + dostime >> 16 & 31, + // day + dostime >> 11 & 31, + // hour + dostime >> 5 & 63, + // minute + (dostime & 31) << 1 + )); + } + }; + module2.exports = DataReader; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/reader/ArrayReader.js +var require_ArrayReader = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/reader/ArrayReader.js"(exports2, module2) { + "use strict"; + var DataReader = require_DataReader(); + var utils = require_utils20(); + function ArrayReader(data) { + DataReader.call(this, data); + for (var i = 0; i < this.data.length; i++) { + data[i] = data[i] & 255; + } + } + utils.inherits(ArrayReader, DataReader); + ArrayReader.prototype.byteAt = function(i) { + return this.data[this.zero + i]; + }; + ArrayReader.prototype.lastIndexOfSignature = function(sig) { + var sig0 = sig.charCodeAt(0), sig1 = sig.charCodeAt(1), sig2 = sig.charCodeAt(2), sig3 = sig.charCodeAt(3); + for (var i = this.length - 4; i >= 0; --i) { + if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) { + return i - this.zero; + } + } + return -1; + }; + ArrayReader.prototype.readAndCheckSignature = function(sig) { + var sig0 = sig.charCodeAt(0), sig1 = sig.charCodeAt(1), sig2 = sig.charCodeAt(2), sig3 = sig.charCodeAt(3), data = this.readData(4); + return sig0 === data[0] && sig1 === data[1] && sig2 === data[2] && sig3 === data[3]; + }; + ArrayReader.prototype.readData = function(size) { + this.checkOffset(size); + if (size === 0) { + return []; + } + var result = this.data.slice(this.zero + this.index, this.zero + this.index + size); + this.index += size; + return result; + }; + module2.exports = ArrayReader; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/reader/StringReader.js +var require_StringReader = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/reader/StringReader.js"(exports2, module2) { + "use strict"; + var DataReader = require_DataReader(); + var utils = require_utils20(); + function StringReader(data) { + DataReader.call(this, data); + } + utils.inherits(StringReader, DataReader); + StringReader.prototype.byteAt = function(i) { + return this.data.charCodeAt(this.zero + i); + }; + StringReader.prototype.lastIndexOfSignature = function(sig) { + return this.data.lastIndexOf(sig) - this.zero; + }; + StringReader.prototype.readAndCheckSignature = function(sig) { + var data = this.readData(4); + return sig === data; + }; + StringReader.prototype.readData = function(size) { + this.checkOffset(size); + var result = this.data.slice(this.zero + this.index, this.zero + this.index + size); + this.index += size; + return result; + }; + module2.exports = StringReader; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/reader/Uint8ArrayReader.js +var require_Uint8ArrayReader = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/reader/Uint8ArrayReader.js"(exports2, module2) { + "use strict"; + var ArrayReader = require_ArrayReader(); + var utils = require_utils20(); + function Uint8ArrayReader(data) { + ArrayReader.call(this, data); + } + utils.inherits(Uint8ArrayReader, ArrayReader); + Uint8ArrayReader.prototype.readData = function(size) { + this.checkOffset(size); + if (size === 0) { + return new Uint8Array(0); + } + var result = this.data.subarray(this.zero + this.index, this.zero + this.index + size); + this.index += size; + return result; + }; + module2.exports = Uint8ArrayReader; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/reader/NodeBufferReader.js +var require_NodeBufferReader = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/reader/NodeBufferReader.js"(exports2, module2) { + "use strict"; + var Uint8ArrayReader = require_Uint8ArrayReader(); + var utils = require_utils20(); + function NodeBufferReader(data) { + Uint8ArrayReader.call(this, data); + } + utils.inherits(NodeBufferReader, Uint8ArrayReader); + NodeBufferReader.prototype.readData = function(size) { + this.checkOffset(size); + var result = this.data.slice(this.zero + this.index, this.zero + this.index + size); + this.index += size; + return result; + }; + module2.exports = NodeBufferReader; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/reader/readerFor.js +var require_readerFor = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/reader/readerFor.js"(exports2, module2) { + "use strict"; + var utils = require_utils20(); + var support = require_support(); + var ArrayReader = require_ArrayReader(); + var StringReader = require_StringReader(); + var NodeBufferReader = require_NodeBufferReader(); + var Uint8ArrayReader = require_Uint8ArrayReader(); + module2.exports = function(data) { + var type = utils.getTypeOf(data); + utils.checkSupport(type); + if (type === "string" && !support.uint8array) { + return new StringReader(data); + } + if (type === "nodebuffer") { + return new NodeBufferReader(data); + } + if (support.uint8array) { + return new Uint8ArrayReader(utils.transformTo("uint8array", data)); + } + return new ArrayReader(utils.transformTo("array", data)); + }; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/zipEntry.js +var require_zipEntry = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/zipEntry.js"(exports2, module2) { + "use strict"; + var readerFor = require_readerFor(); + var utils = require_utils20(); + var CompressedObject = require_compressedObject(); + var crc32fn = require_crc32(); + var utf8 = require_utf8(); + var compressions = require_compressions(); + var support = require_support(); + var MADE_BY_DOS = 0; + var MADE_BY_UNIX = 3; + var findCompression = function(compressionMethod) { + for (var method in compressions) { + if (!Object.prototype.hasOwnProperty.call(compressions, method)) { + continue; + } + if (compressions[method].magic === compressionMethod) { + return compressions[method]; + } + } + return null; + }; + function ZipEntry(options, loadOptions) { + this.options = options; + this.loadOptions = loadOptions; + } + ZipEntry.prototype = { + /** + * say if the file is encrypted. + * @return {boolean} true if the file is encrypted, false otherwise. + */ + isEncrypted: function() { + return (this.bitFlag & 1) === 1; + }, + /** + * say if the file has utf-8 filename/comment. + * @return {boolean} true if the filename/comment is in utf-8, false otherwise. + */ + useUTF8: function() { + return (this.bitFlag & 2048) === 2048; + }, + /** + * Read the local part of a zip file and add the info in this object. + * @param {DataReader} reader the reader to use. + */ + readLocalPart: function(reader) { + var compression, localExtraFieldsLength; + reader.skip(22); + this.fileNameLength = reader.readInt(2); + localExtraFieldsLength = reader.readInt(2); + this.fileName = reader.readData(this.fileNameLength); + reader.skip(localExtraFieldsLength); + if (this.compressedSize === -1 || this.uncompressedSize === -1) { + throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)"); + } + compression = findCompression(this.compressionMethod); + if (compression === null) { + throw new Error("Corrupted zip : compression " + utils.pretty(this.compressionMethod) + " unknown (inner file : " + utils.transformTo("string", this.fileName) + ")"); + } + this.decompressed = new CompressedObject(this.compressedSize, this.uncompressedSize, this.crc32, compression, reader.readData(this.compressedSize)); + }, + /** + * Read the central part of a zip file and add the info in this object. + * @param {DataReader} reader the reader to use. + */ + readCentralPart: function(reader) { + this.versionMadeBy = reader.readInt(2); + reader.skip(2); + this.bitFlag = reader.readInt(2); + this.compressionMethod = reader.readString(2); + this.date = reader.readDate(); + this.crc32 = reader.readInt(4); + this.compressedSize = reader.readInt(4); + this.uncompressedSize = reader.readInt(4); + var fileNameLength = reader.readInt(2); + this.extraFieldsLength = reader.readInt(2); + this.fileCommentLength = reader.readInt(2); + this.diskNumberStart = reader.readInt(2); + this.internalFileAttributes = reader.readInt(2); + this.externalFileAttributes = reader.readInt(4); + this.localHeaderOffset = reader.readInt(4); + if (this.isEncrypted()) { + throw new Error("Encrypted zip are not supported"); + } + reader.skip(fileNameLength); + this.readExtraFields(reader); + this.parseZIP64ExtraField(reader); + this.fileComment = reader.readData(this.fileCommentLength); + }, + /** + * Parse the external file attributes and get the unix/dos permissions. + */ + processAttributes: function() { + this.unixPermissions = null; + this.dosPermissions = null; + var madeBy = this.versionMadeBy >> 8; + this.dir = this.externalFileAttributes & 16 ? true : false; + if (madeBy === MADE_BY_DOS) { + this.dosPermissions = this.externalFileAttributes & 63; + } + if (madeBy === MADE_BY_UNIX) { + this.unixPermissions = this.externalFileAttributes >> 16 & 65535; + } + if (!this.dir && this.fileNameStr.slice(-1) === "/") { + this.dir = true; + } + }, + /** + * Parse the ZIP64 extra field and merge the info in the current ZipEntry. + * @param {DataReader} reader the reader to use. + */ + parseZIP64ExtraField: function() { + if (!this.extraFields[1]) { + return; + } + var extraReader = readerFor(this.extraFields[1].value); + if (this.uncompressedSize === utils.MAX_VALUE_32BITS) { + this.uncompressedSize = extraReader.readInt(8); + } + if (this.compressedSize === utils.MAX_VALUE_32BITS) { + this.compressedSize = extraReader.readInt(8); + } + if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) { + this.localHeaderOffset = extraReader.readInt(8); + } + if (this.diskNumberStart === utils.MAX_VALUE_32BITS) { + this.diskNumberStart = extraReader.readInt(4); + } + }, + /** + * Read the central part of a zip file and add the info in this object. + * @param {DataReader} reader the reader to use. + */ + readExtraFields: function(reader) { + var end = reader.index + this.extraFieldsLength, extraFieldId, extraFieldLength, extraFieldValue; + if (!this.extraFields) { + this.extraFields = {}; + } + while (reader.index + 4 < end) { + extraFieldId = reader.readInt(2); + extraFieldLength = reader.readInt(2); + extraFieldValue = reader.readData(extraFieldLength); + this.extraFields[extraFieldId] = { + id: extraFieldId, + length: extraFieldLength, + value: extraFieldValue + }; + } + reader.setIndex(end); + }, + /** + * Apply an UTF8 transformation if needed. + */ + handleUTF8: function() { + var decodeParamType = support.uint8array ? "uint8array" : "array"; + if (this.useUTF8()) { + this.fileNameStr = utf8.utf8decode(this.fileName); + this.fileCommentStr = utf8.utf8decode(this.fileComment); + } else { + var upath = this.findExtraFieldUnicodePath(); + if (upath !== null) { + this.fileNameStr = upath; + } else { + var fileNameByteArray = utils.transformTo(decodeParamType, this.fileName); + this.fileNameStr = this.loadOptions.decodeFileName(fileNameByteArray); + } + var ucomment = this.findExtraFieldUnicodeComment(); + if (ucomment !== null) { + this.fileCommentStr = ucomment; + } else { + var commentByteArray = utils.transformTo(decodeParamType, this.fileComment); + this.fileCommentStr = this.loadOptions.decodeFileName(commentByteArray); + } + } + }, + /** + * Find the unicode path declared in the extra field, if any. + * @return {String} the unicode path, null otherwise. + */ + findExtraFieldUnicodePath: function() { + var upathField = this.extraFields[28789]; + if (upathField) { + var extraReader = readerFor(upathField.value); + if (extraReader.readInt(1) !== 1) { + return null; + } + if (crc32fn(this.fileName) !== extraReader.readInt(4)) { + return null; + } + return utf8.utf8decode(extraReader.readData(upathField.length - 5)); + } + return null; + }, + /** + * Find the unicode comment declared in the extra field, if any. + * @return {String} the unicode comment, null otherwise. + */ + findExtraFieldUnicodeComment: function() { + var ucommentField = this.extraFields[25461]; + if (ucommentField) { + var extraReader = readerFor(ucommentField.value); + if (extraReader.readInt(1) !== 1) { + return null; + } + if (crc32fn(this.fileComment) !== extraReader.readInt(4)) { + return null; + } + return utf8.utf8decode(extraReader.readData(ucommentField.length - 5)); + } + return null; + } + }; + module2.exports = ZipEntry; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/zipEntries.js +var require_zipEntries = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/zipEntries.js"(exports2, module2) { + "use strict"; + var readerFor = require_readerFor(); + var utils = require_utils20(); + var sig = require_signature(); + var ZipEntry = require_zipEntry(); + var support = require_support(); + function ZipEntries(loadOptions) { + this.files = []; + this.loadOptions = loadOptions; + } + ZipEntries.prototype = { + /** + * Check that the reader is on the specified signature. + * @param {string} expectedSignature the expected signature. + * @throws {Error} if it is an other signature. + */ + checkSignature: function(expectedSignature) { + if (!this.reader.readAndCheckSignature(expectedSignature)) { + this.reader.index -= 4; + var signature = this.reader.readString(4); + throw new Error("Corrupted zip or bug: unexpected signature (" + utils.pretty(signature) + ", expected " + utils.pretty(expectedSignature) + ")"); + } + }, + /** + * Check if the given signature is at the given index. + * @param {number} askedIndex the index to check. + * @param {string} expectedSignature the signature to expect. + * @return {boolean} true if the signature is here, false otherwise. + */ + isSignature: function(askedIndex, expectedSignature) { + var currentIndex = this.reader.index; + this.reader.setIndex(askedIndex); + var signature = this.reader.readString(4); + var result = signature === expectedSignature; + this.reader.setIndex(currentIndex); + return result; + }, + /** + * Read the end of the central directory. + */ + readBlockEndOfCentral: function() { + this.diskNumber = this.reader.readInt(2); + this.diskWithCentralDirStart = this.reader.readInt(2); + this.centralDirRecordsOnThisDisk = this.reader.readInt(2); + this.centralDirRecords = this.reader.readInt(2); + this.centralDirSize = this.reader.readInt(4); + this.centralDirOffset = this.reader.readInt(4); + this.zipCommentLength = this.reader.readInt(2); + var zipComment = this.reader.readData(this.zipCommentLength); + var decodeParamType = support.uint8array ? "uint8array" : "array"; + var decodeContent = utils.transformTo(decodeParamType, zipComment); + this.zipComment = this.loadOptions.decodeFileName(decodeContent); + }, + /** + * Read the end of the Zip 64 central directory. + * Not merged with the method readEndOfCentral : + * The end of central can coexist with its Zip64 brother, + * I don't want to read the wrong number of bytes ! + */ + readBlockZip64EndOfCentral: function() { + this.zip64EndOfCentralSize = this.reader.readInt(8); + this.reader.skip(4); + this.diskNumber = this.reader.readInt(4); + this.diskWithCentralDirStart = this.reader.readInt(4); + this.centralDirRecordsOnThisDisk = this.reader.readInt(8); + this.centralDirRecords = this.reader.readInt(8); + this.centralDirSize = this.reader.readInt(8); + this.centralDirOffset = this.reader.readInt(8); + this.zip64ExtensibleData = {}; + var extraDataSize = this.zip64EndOfCentralSize - 44, index = 0, extraFieldId, extraFieldLength, extraFieldValue; + while (index < extraDataSize) { + extraFieldId = this.reader.readInt(2); + extraFieldLength = this.reader.readInt(4); + extraFieldValue = this.reader.readData(extraFieldLength); + this.zip64ExtensibleData[extraFieldId] = { + id: extraFieldId, + length: extraFieldLength, + value: extraFieldValue + }; + } + }, + /** + * Read the end of the Zip 64 central directory locator. + */ + readBlockZip64EndOfCentralLocator: function() { + this.diskWithZip64CentralDirStart = this.reader.readInt(4); + this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8); + this.disksCount = this.reader.readInt(4); + if (this.disksCount > 1) { + throw new Error("Multi-volumes zip are not supported"); + } + }, + /** + * Read the local files, based on the offset read in the central part. + */ + readLocalFiles: function() { + var i, file2; + for (i = 0; i < this.files.length; i++) { + file2 = this.files[i]; + this.reader.setIndex(file2.localHeaderOffset); + this.checkSignature(sig.LOCAL_FILE_HEADER); + file2.readLocalPart(this.reader); + file2.handleUTF8(); + file2.processAttributes(); + } + }, + /** + * Read the central directory. + */ + readCentralDir: function() { + var file2; + this.reader.setIndex(this.centralDirOffset); + while (this.reader.readAndCheckSignature(sig.CENTRAL_FILE_HEADER)) { + file2 = new ZipEntry({ + zip64: this.zip64 + }, this.loadOptions); + file2.readCentralPart(this.reader); + this.files.push(file2); + } + if (this.centralDirRecords !== this.files.length) { + if (this.centralDirRecords !== 0 && this.files.length === 0) { + throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length); + } else { + } + } + }, + /** + * Read the end of central directory. + */ + readEndOfCentral: function() { + var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END); + if (offset < 0) { + var isGarbage = !this.isSignature(0, sig.LOCAL_FILE_HEADER); + if (isGarbage) { + throw new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"); + } else { + throw new Error("Corrupted zip: can't find end of central directory"); + } + } + this.reader.setIndex(offset); + var endOfCentralDirOffset = offset; + this.checkSignature(sig.CENTRAL_DIRECTORY_END); + this.readBlockEndOfCentral(); + if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) { + this.zip64 = true; + offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR); + if (offset < 0) { + throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator"); + } + this.reader.setIndex(offset); + this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR); + this.readBlockZip64EndOfCentralLocator(); + if (!this.isSignature(this.relativeOffsetEndOfZip64CentralDir, sig.ZIP64_CENTRAL_DIRECTORY_END)) { + this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_END); + if (this.relativeOffsetEndOfZip64CentralDir < 0) { + throw new Error("Corrupted zip: can't find the ZIP64 end of central directory"); + } + } + this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir); + this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END); + this.readBlockZip64EndOfCentral(); + } + var expectedEndOfCentralDirOffset = this.centralDirOffset + this.centralDirSize; + if (this.zip64) { + expectedEndOfCentralDirOffset += 20; + expectedEndOfCentralDirOffset += 12 + this.zip64EndOfCentralSize; + } + var extraBytes = endOfCentralDirOffset - expectedEndOfCentralDirOffset; + if (extraBytes > 0) { + if (this.isSignature(endOfCentralDirOffset, sig.CENTRAL_FILE_HEADER)) { + } else { + this.reader.zero = extraBytes; + } + } else if (extraBytes < 0) { + throw new Error("Corrupted zip: missing " + Math.abs(extraBytes) + " bytes."); + } + }, + prepareReader: function(data) { + this.reader = readerFor(data); + }, + /** + * Read a zip file and create ZipEntries. + * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file. + */ + load: function(data) { + this.prepareReader(data); + this.readEndOfCentral(); + this.readCentralDir(); + this.readLocalFiles(); + } + }; + module2.exports = ZipEntries; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/load.js +var require_load = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/load.js"(exports2, module2) { + "use strict"; + var utils = require_utils20(); + var external = require_external(); + var utf8 = require_utf8(); + var ZipEntries = require_zipEntries(); + var Crc32Probe = require_Crc32Probe(); + var nodejsUtils = require_nodejsUtils(); + function checkEntryCRC32(zipEntry) { + return new external.Promise(function(resolve, reject) { + var worker = zipEntry.decompressed.getContentWorker().pipe(new Crc32Probe()); + worker.on("error", function(e) { + reject(e); + }).on("end", function() { + if (worker.streamInfo.crc32 !== zipEntry.decompressed.crc32) { + reject(new Error("Corrupted zip : CRC32 mismatch")); + } else { + resolve(); + } + }).resume(); + }); + } + module2.exports = function(data, options) { + var zip = this; + options = utils.extend(options || {}, { + base64: false, + checkCRC32: false, + optimizedBinaryString: false, + createFolders: false, + decodeFileName: utf8.utf8decode + }); + if (nodejsUtils.isNode && nodejsUtils.isStream(data)) { + return external.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")); + } + return utils.prepareContent("the loaded zip file", data, true, options.optimizedBinaryString, options.base64).then(function(data2) { + var zipEntries = new ZipEntries(options); + zipEntries.load(data2); + return zipEntries; + }).then(function checkCRC32(zipEntries) { + var promises = [external.Promise.resolve(zipEntries)]; + var files = zipEntries.files; + if (options.checkCRC32) { + for (var i = 0; i < files.length; i++) { + promises.push(checkEntryCRC32(files[i])); + } + } + return external.Promise.all(promises); + }).then(function addFiles(results) { + var zipEntries = results.shift(); + var files = zipEntries.files; + for (var i = 0; i < files.length; i++) { + var input = files[i]; + var unsafeName = input.fileNameStr; + var safeName = utils.resolve(input.fileNameStr); + zip.file(safeName, input.decompressed, { + binary: true, + optimizedBinaryString: true, + date: input.date, + dir: input.dir, + comment: input.fileCommentStr.length ? input.fileCommentStr : null, + unixPermissions: input.unixPermissions, + dosPermissions: input.dosPermissions, + createFolders: options.createFolders + }); + if (!input.dir) { + zip.file(safeName).unsafeOriginalName = unsafeName; + } + } + if (zipEntries.zipComment.length) { + zip.comment = zipEntries.zipComment; + } + return zip; + }); + }; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/index.js +var require_lib12 = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/lib/index.js"(exports2, module2) { + "use strict"; + function JSZip() { + if (!(this instanceof JSZip)) { + return new JSZip(); + } + if (arguments.length) { + throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide."); + } + this.files = /* @__PURE__ */ Object.create(null); + this.comment = null; + this.root = ""; + this.clone = function() { + var newObj = new JSZip(); + for (var i in this) { + if (typeof this[i] !== "function") { + newObj[i] = this[i]; + } + } + return newObj; + }; + } + JSZip.prototype = require_object(); + JSZip.prototype.loadAsync = require_load(); + JSZip.support = require_support(); + JSZip.defaults = require_defaults2(); + JSZip.version = "3.10.1"; + JSZip.loadAsync = function(content, options) { + return new JSZip().loadAsync(content, options); + }; + JSZip.external = require_external(); + module2.exports = JSZip; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/utils.js +var require_utils21 = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/utils.js"(exports2, module2) { + var fs = require("fs"); + var inherits2 = function(cls, superCtor, statics, prototype) { + cls.super_ = superCtor; + if (!prototype) { + prototype = statics; + statics = null; + } + if (statics) { + Object.keys(statics).forEach((i) => { + Object.defineProperty(cls, i, Object.getOwnPropertyDescriptor(statics, i)); + }); + } + const properties = { + constructor: { + value: cls, + enumerable: false, + writable: false, + configurable: true + } + }; + if (prototype) { + Object.keys(prototype).forEach((i) => { + properties[i] = Object.getOwnPropertyDescriptor(prototype, i); + }); + } + cls.prototype = Object.create(superCtor.prototype, properties); + }; + var xmlDecodeRegex = /[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/; + var utils = { + nop() { + }, + promiseImmediate(value) { + return new Promise((resolve) => { + if (global.setImmediate) { + setImmediate(() => { + resolve(value); + }); + } else { + setTimeout(() => { + resolve(value); + }, 1); + } + }); + }, + inherits: inherits2, + dateToExcel(d, date1904) { + return 25569 + d.getTime() / (24 * 3600 * 1e3) - (date1904 ? 1462 : 0); + }, + excelToDate(v, date1904) { + const millisecondSinceEpoch = Math.round((v - 25569 + (date1904 ? 1462 : 0)) * 24 * 3600 * 1e3); + return new Date(millisecondSinceEpoch); + }, + parsePath(filepath) { + const last = filepath.lastIndexOf("/"); + return { + path: filepath.substring(0, last), + name: filepath.substring(last + 1) + }; + }, + getRelsPath(filepath) { + const path = utils.parsePath(filepath); + return `${path.path}/_rels/${path.name}.rels`; + }, + xmlEncode(text) { + const regexResult = xmlDecodeRegex.exec(text); + if (!regexResult) return text; + let result = ""; + let escape2 = ""; + let lastIndex = 0; + let i = regexResult.index; + for (; i < text.length; i++) { + const charCode = text.charCodeAt(i); + switch (charCode) { + case 34: + escape2 = """; + break; + case 38: + escape2 = "&"; + break; + case 39: + escape2 = "'"; + break; + case 60: + escape2 = "<"; + break; + case 62: + escape2 = ">"; + break; + case 127: + escape2 = ""; + break; + default: { + if (charCode <= 31 && (charCode <= 8 || charCode >= 11 && charCode !== 13)) { + escape2 = ""; + break; + } + continue; + } + } + if (lastIndex !== i) result += text.substring(lastIndex, i); + lastIndex = i + 1; + if (escape2) result += escape2; + } + if (lastIndex !== i) return result + text.substring(lastIndex, i); + return result; + }, + xmlDecode(text) { + return text.replace(/&([a-z]*);/g, (c) => { + switch (c) { + case "<": + return "<"; + case ">": + return ">"; + case "&": + return "&"; + case "'": + return "'"; + case """: + return '"'; + default: + return c; + } + }); + }, + validInt(value) { + const i = parseInt(value, 10); + return !Number.isNaN(i) ? i : 0; + }, + isDateFmt(fmt) { + if (!fmt) { + return false; + } + fmt = fmt.replace(/\[[^\]]*]/g, ""); + fmt = fmt.replace(/"[^"]*"/g, ""); + const result = fmt.match(/[ymdhMsb]+/) !== null; + return result; + }, + fs: { + exists(path) { + return new Promise((resolve) => { + fs.access(path, fs.constants.F_OK, (err) => { + resolve(!err); + }); + }); + } + }, + toIsoDateString(dt) { + return dt.toIsoString().subsstr(0, 10); + }, + parseBoolean(value) { + return value === true || value === "true" || value === 1 || value === "1"; + } + }; + module2.exports = utils; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/string-buf.js +var require_string_buf = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/string-buf.js"(exports2, module2) { + var StringBuf = class { + constructor(options) { + this._buf = Buffer.alloc(options && options.size || 16384); + this._encoding = options && options.encoding || "utf8"; + this._inPos = 0; + this._buffer = void 0; + } + get length() { + return this._inPos; + } + get capacity() { + return this._buf.length; + } + get buffer() { + return this._buf; + } + toBuffer() { + if (!this._buffer) { + this._buffer = Buffer.alloc(this.length); + this._buf.copy(this._buffer, 0, 0, this.length); + } + return this._buffer; + } + reset(position) { + position = position || 0; + this._buffer = void 0; + this._inPos = position; + } + _grow(min) { + let size = this._buf.length * 2; + while (size < min) { + size *= 2; + } + const buf = Buffer.alloc(size); + this._buf.copy(buf, 0); + this._buf = buf; + } + addText(text) { + this._buffer = void 0; + let inPos = this._inPos + this._buf.write(text, this._inPos, this._encoding); + while (inPos >= this._buf.length - 4) { + this._grow(this._inPos + text.length); + inPos = this._inPos + this._buf.write(text, this._inPos, this._encoding); + } + this._inPos = inPos; + } + addStringBuf(inBuf) { + if (inBuf.length) { + this._buffer = void 0; + if (this.length + inBuf.length > this.capacity) { + this._grow(this.length + inBuf.length); + } + inBuf._buf.copy(this._buf, this._inPos, 0, inBuf.length); + this._inPos += inBuf.length; + } + } + }; + module2.exports = StringBuf; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/stream-buf.js +var require_stream_buf = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/stream-buf.js"(exports2, module2) { + var Stream = require_readable(); + var utils = require_utils21(); + var StringBuf = require_string_buf(); + var StringChunk = class { + constructor(data, encoding) { + this._data = data; + this._encoding = encoding; + } + get length() { + return this.toBuffer().length; + } + // copy to target buffer + copy(target, targetOffset, offset, length) { + return this.toBuffer().copy(target, targetOffset, offset, length); + } + toBuffer() { + if (!this._buffer) { + this._buffer = Buffer.from(this._data, this._encoding); + } + return this._buffer; + } + }; + var StringBufChunk = class { + constructor(data) { + this._data = data; + } + get length() { + return this._data.length; + } + // copy to target buffer + copy(target, targetOffset, offset, length) { + return this._data._buf.copy(target, targetOffset, offset, length); + } + toBuffer() { + return this._data.toBuffer(); + } + }; + var BufferChunk = class { + constructor(data) { + this._data = data; + } + get length() { + return this._data.length; + } + // copy to target buffer + copy(target, targetOffset, offset, length) { + this._data.copy(target, targetOffset, offset, length); + } + toBuffer() { + return this._data; + } + }; + var ReadWriteBuf = class { + constructor(size) { + this.size = size; + this.buffer = Buffer.alloc(size); + this.iRead = 0; + this.iWrite = 0; + } + toBuffer() { + if (this.iRead === 0 && this.iWrite === this.size) { + return this.buffer; + } + const buf = Buffer.alloc(this.iWrite - this.iRead); + this.buffer.copy(buf, 0, this.iRead, this.iWrite); + return buf; + } + get length() { + return this.iWrite - this.iRead; + } + get eod() { + return this.iRead === this.iWrite; + } + get full() { + return this.iWrite === this.size; + } + read(size) { + let buf; + if (size === 0) { + return null; + } + if (size === void 0 || size >= this.length) { + buf = this.toBuffer(); + this.iRead = this.iWrite; + return buf; + } + buf = Buffer.alloc(size); + this.buffer.copy(buf, 0, this.iRead, size); + this.iRead += size; + return buf; + } + write(chunk, offset, length) { + const size = Math.min(length, this.size - this.iWrite); + chunk.copy(this.buffer, this.iWrite, offset, offset + size); + this.iWrite += size; + return size; + } + }; + var StreamBuf = function(options) { + options = options || {}; + this.bufSize = options.bufSize || 1024 * 1024; + this.buffers = []; + this.batch = options.batch || false; + this.corked = false; + this.inPos = 0; + this.outPos = 0; + this.pipes = []; + this.paused = false; + this.encoding = null; + }; + utils.inherits(StreamBuf, Stream.Duplex, { + toBuffer() { + switch (this.buffers.length) { + case 0: + return null; + case 1: + return this.buffers[0].toBuffer(); + default: + return Buffer.concat(this.buffers.map((rwBuf) => rwBuf.toBuffer())); + } + }, + // writable + // event drain - if write returns false (which it won't), indicates when safe to write again. + // finish - end() has been called + // pipe(src) - pipe() has been called on readable + // unpipe(src) - unpipe() has been called on readable + // error - duh + _getWritableBuffer() { + if (this.buffers.length) { + const last = this.buffers[this.buffers.length - 1]; + if (!last.full) { + return last; + } + } + const buf = new ReadWriteBuf(this.bufSize); + this.buffers.push(buf); + return buf; + }, + async _pipe(chunk) { + const write = function(pipe) { + return new Promise((resolve) => { + pipe.write(chunk.toBuffer(), () => { + resolve(); + }); + }); + }; + await Promise.all(this.pipes.map(write)); + }, + _writeToBuffers(chunk) { + let inPos = 0; + const inLen = chunk.length; + while (inPos < inLen) { + const buffer = this._getWritableBuffer(); + inPos += buffer.write(chunk, inPos, inLen - inPos); + } + }, + async write(data, encoding, callback) { + if (encoding instanceof Function) { + callback = encoding; + encoding = "utf8"; + } + callback = callback || utils.nop; + let chunk; + if (data instanceof StringBuf) { + chunk = new StringBufChunk(data); + } else if (data instanceof Buffer) { + chunk = new BufferChunk(data); + } else if (typeof data === "string" || data instanceof String || data instanceof ArrayBuffer) { + chunk = new StringChunk(data, encoding); + } else { + throw new Error("Chunk must be one of type String, Buffer or StringBuf."); + } + if (this.pipes.length) { + if (this.batch) { + this._writeToBuffers(chunk); + while (!this.corked && this.buffers.length > 1) { + this._pipe(this.buffers.shift()); + } + } else if (!this.corked) { + await this._pipe(chunk); + callback(); + } else { + this._writeToBuffers(chunk); + process.nextTick(callback); + } + } else { + if (!this.paused) { + this.emit("data", chunk.toBuffer()); + } + this._writeToBuffers(chunk); + this.emit("readable"); + } + return true; + }, + cork() { + this.corked = true; + }, + _flush() { + if (this.pipes.length) { + while (this.buffers.length) { + this._pipe(this.buffers.shift()); + } + } + }, + uncork() { + this.corked = false; + this._flush(); + }, + end(chunk, encoding, callback) { + const writeComplete = (error) => { + if (error) { + callback(error); + } else { + this._flush(); + this.pipes.forEach((pipe) => { + pipe.end(); + }); + this.emit("finish"); + } + }; + if (chunk) { + this.write(chunk, encoding, writeComplete); + } else { + writeComplete(); + } + }, + // readable + // event readable - some data is now available + // event data - switch to flowing mode - feeds chunks to handler + // event end - no more data + // event close - optional, indicates upstream close + // event error - duh + read(size) { + let buffers; + if (size) { + buffers = []; + while (size && this.buffers.length && !this.buffers[0].eod) { + const first = this.buffers[0]; + const buffer = first.read(size); + size -= buffer.length; + buffers.push(buffer); + if (first.eod && first.full) { + this.buffers.shift(); + } + } + return Buffer.concat(buffers); + } + buffers = this.buffers.map((buf) => buf.toBuffer()).filter(Boolean); + this.buffers = []; + return Buffer.concat(buffers); + }, + setEncoding(encoding) { + this.encoding = encoding; + }, + pause() { + this.paused = true; + }, + resume() { + this.paused = false; + }, + isPaused() { + return !!this.paused; + }, + pipe(destination) { + this.pipes.push(destination); + if (!this.paused && this.buffers.length) { + this.end(); + } + }, + unpipe(destination) { + this.pipes = this.pipes.filter((pipe) => pipe !== destination); + }, + unshift() { + throw new Error("Not Implemented"); + }, + wrap() { + throw new Error("Not Implemented"); + } + }); + module2.exports = StreamBuf; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/browser-buffer-encode.js +var require_browser_buffer_encode = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/browser-buffer-encode.js"(exports2) { + var textEncoder = typeof TextEncoder === "undefined" ? null : new TextEncoder("utf-8"); + var { Buffer: Buffer2 } = require("buffer"); + function stringToBuffer(str) { + if (typeof str !== "string") { + return str; + } + if (textEncoder) { + return Buffer2.from(textEncoder.encode(str).buffer); + } + return Buffer2.from(str); + } + exports2.stringToBuffer = stringToBuffer; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/zip-stream.js +var require_zip_stream = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/zip-stream.js"(exports2, module2) { + var events = require("events"); + var JSZip = require_lib12(); + var StreamBuf = require_stream_buf(); + var { stringToBuffer } = require_browser_buffer_encode(); + var ZipWriter = class extends events.EventEmitter { + constructor(options) { + super(); + this.options = Object.assign( + { + type: "nodebuffer", + compression: "DEFLATE" + }, + options + ); + this.zip = new JSZip(); + this.stream = new StreamBuf(); + } + append(data, options) { + if (options.hasOwnProperty("base64") && options.base64) { + this.zip.file(options.name, data, { base64: true }); + } else { + if (process.browser && typeof data === "string") { + data = stringToBuffer(data); + } + this.zip.file(options.name, data); + } + } + async finalize() { + const content = await this.zip.generateAsync(this.options); + this.stream.end(content); + this.emit("finish"); + } + // ========================================================================== + // Stream.Readable interface + read(size) { + return this.stream.read(size); + } + setEncoding(encoding) { + return this.stream.setEncoding(encoding); + } + pause() { + return this.stream.pause(); + } + resume() { + return this.stream.resume(); + } + isPaused() { + return this.stream.isPaused(); + } + pipe(destination, options) { + return this.stream.pipe(destination, options); + } + unpipe(destination) { + return this.stream.unpipe(destination); + } + unshift(chunk) { + return this.stream.unshift(chunk); + } + wrap(stream) { + return this.stream.wrap(stream); + } + }; + module2.exports = { + ZipWriter + }; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/xml-stream.js +var require_xml_stream = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/xml-stream.js"(exports2, module2) { + var _2 = require_under_dash(); + var utils = require_utils21(); + var OPEN_ANGLE = "<"; + var CLOSE_ANGLE = ">"; + var OPEN_ANGLE_SLASH = ""; + function pushAttribute(xml, name, value) { + xml.push(` ${name}="${utils.xmlEncode(value.toString())}"`); + } + function pushAttributes(xml, attributes) { + if (attributes) { + const tmp = []; + _2.each(attributes, (value, name) => { + if (value !== void 0) { + pushAttribute(tmp, name, value); + } + }); + xml.push(tmp.join("")); + } + } + var XmlStream = class { + constructor() { + this._xml = []; + this._stack = []; + this._rollbacks = []; + } + get tos() { + return this._stack.length ? this._stack[this._stack.length - 1] : void 0; + } + get cursor() { + return this._xml.length; + } + openXml(docAttributes) { + const xml = this._xml; + xml.push("\n"); + } + openNode(name, attributes) { + const parent = this.tos; + const xml = this._xml; + if (parent && this.open) { + xml.push(CLOSE_ANGLE); + } + this._stack.push(name); + xml.push(OPEN_ANGLE); + xml.push(name); + pushAttributes(xml, attributes); + this.leaf = true; + this.open = true; + } + addAttribute(name, value) { + if (!this.open) { + throw new Error("Cannot write attributes to node if it is not open"); + } + if (value !== void 0) { + pushAttribute(this._xml, name, value); + } + } + addAttributes(attrs) { + if (!this.open) { + throw new Error("Cannot write attributes to node if it is not open"); + } + pushAttributes(this._xml, attrs); + } + writeText(text) { + const xml = this._xml; + if (this.open) { + xml.push(CLOSE_ANGLE); + this.open = false; + } + this.leaf = false; + xml.push(utils.xmlEncode(text.toString())); + } + writeXml(xml) { + if (this.open) { + this._xml.push(CLOSE_ANGLE); + this.open = false; + } + this.leaf = false; + this._xml.push(xml); + } + closeNode() { + const node = this._stack.pop(); + const xml = this._xml; + if (this.leaf) { + xml.push(CLOSE_SLASH_ANGLE); + } else { + xml.push(OPEN_ANGLE_SLASH); + xml.push(node); + xml.push(CLOSE_ANGLE); + } + this.open = false; + this.leaf = false; + } + leafNode(name, attributes, text) { + this.openNode(name, attributes); + if (text !== void 0) { + this.writeText(text); + } + this.closeNode(); + } + closeAll() { + while (this._stack.length) { + this.closeNode(); + } + } + addRollback() { + this._rollbacks.push({ + xml: this._xml.length, + stack: this._stack.length, + leaf: this.leaf, + open: this.open + }); + return this.cursor; + } + commit() { + this._rollbacks.pop(); + } + rollback() { + const r = this._rollbacks.pop(); + if (this._xml.length > r.xml) { + this._xml.splice(r.xml, this._xml.length - r.xml); + } + if (this._stack.length > r.stack) { + this._stack.splice(r.stack, this._stack.length - r.stack); + } + this.leaf = r.leaf; + this.open = r.open; + } + get xml() { + this.closeAll(); + return this._xml.join(""); + } + }; + XmlStream.StdDocAttributes = { + version: "1.0", + encoding: "UTF-8", + standalone: "yes" + }; + module2.exports = XmlStream; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/browser-buffer-decode.js +var require_browser_buffer_decode = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/browser-buffer-decode.js"(exports2) { + var textDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder("utf-8"); + function bufferToString(chunk) { + if (typeof chunk === "string") { + return chunk; + } + if (textDecoder) { + return textDecoder.decode(chunk); + } + return chunk.toString(); + } + exports2.bufferToString = bufferToString; + } +}); + +// ../../node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xml/1.0/ed5.js +var require_ed5 = __commonJS({ + "../../node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xml/1.0/ed5.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CHAR = " \n\r -\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}"; + exports2.S = " \r\n"; + exports2.NAME_START_CHAR = ":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}"; + exports2.NAME_CHAR = "-" + exports2.NAME_START_CHAR + ".0-9\xB7\u0300-\u036F\u203F-\u2040"; + exports2.CHAR_RE = new RegExp("^[" + exports2.CHAR + "]$", "u"); + exports2.S_RE = new RegExp("^[" + exports2.S + "]+$", "u"); + exports2.NAME_START_CHAR_RE = new RegExp("^[" + exports2.NAME_START_CHAR + "]$", "u"); + exports2.NAME_CHAR_RE = new RegExp("^[" + exports2.NAME_CHAR + "]$", "u"); + exports2.NAME_RE = new RegExp("^[" + exports2.NAME_START_CHAR + "][" + exports2.NAME_CHAR + "]*$", "u"); + exports2.NMTOKEN_RE = new RegExp("^[" + exports2.NAME_CHAR + "]+$", "u"); + var TAB = 9; + var NL = 10; + var CR = 13; + var SPACE = 32; + exports2.S_LIST = [SPACE, NL, CR, TAB]; + function isChar(c) { + return c >= SPACE && c <= 55295 || c === NL || c === CR || c === TAB || c >= 57344 && c <= 65533 || c >= 65536 && c <= 1114111; + } + exports2.isChar = isChar; + function isS(c) { + return c === SPACE || c === NL || c === CR || c === TAB; + } + exports2.isS = isS; + function isNameStartChar(c) { + return c >= 65 && c <= 90 || c >= 97 && c <= 122 || c === 58 || c === 95 || c === 8204 || c === 8205 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 767 || c >= 880 && c <= 893 || c >= 895 && c <= 8191 || c >= 8304 && c <= 8591 || c >= 11264 && c <= 12271 || c >= 12289 && c <= 55295 || c >= 63744 && c <= 64975 || c >= 65008 && c <= 65533 || c >= 65536 && c <= 983039; + } + exports2.isNameStartChar = isNameStartChar; + function isNameChar(c) { + return isNameStartChar(c) || c >= 48 && c <= 57 || c === 45 || c === 46 || c === 183 || c >= 768 && c <= 879 || c >= 8255 && c <= 8256; + } + exports2.isNameChar = isNameChar; + } +}); + +// ../../node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xml/1.1/ed2.js +var require_ed2 = __commonJS({ + "../../node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xml/1.1/ed2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CHAR = "-\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}"; + exports2.RESTRICTED_CHAR = "-\b\v\f-\x7F-\x84\x86-\x9F"; + exports2.S = " \r\n"; + exports2.NAME_START_CHAR = ":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}"; + exports2.NAME_CHAR = "-" + exports2.NAME_START_CHAR + ".0-9\xB7\u0300-\u036F\u203F-\u2040"; + exports2.CHAR_RE = new RegExp("^[" + exports2.CHAR + "]$", "u"); + exports2.RESTRICTED_CHAR_RE = new RegExp("^[" + exports2.RESTRICTED_CHAR + "]$", "u"); + exports2.S_RE = new RegExp("^[" + exports2.S + "]+$", "u"); + exports2.NAME_START_CHAR_RE = new RegExp("^[" + exports2.NAME_START_CHAR + "]$", "u"); + exports2.NAME_CHAR_RE = new RegExp("^[" + exports2.NAME_CHAR + "]$", "u"); + exports2.NAME_RE = new RegExp("^[" + exports2.NAME_START_CHAR + "][" + exports2.NAME_CHAR + "]*$", "u"); + exports2.NMTOKEN_RE = new RegExp("^[" + exports2.NAME_CHAR + "]+$", "u"); + var TAB = 9; + var NL = 10; + var CR = 13; + var SPACE = 32; + exports2.S_LIST = [SPACE, NL, CR, TAB]; + function isChar(c) { + return c >= 1 && c <= 55295 || c >= 57344 && c <= 65533 || c >= 65536 && c <= 1114111; + } + exports2.isChar = isChar; + function isRestrictedChar(c) { + return c >= 1 && c <= 8 || c === 11 || c === 12 || c >= 14 && c <= 31 || c >= 127 && c <= 132 || c >= 134 && c <= 159; + } + exports2.isRestrictedChar = isRestrictedChar; + function isCharAndNotRestricted(c) { + return c === 9 || c === 10 || c === 13 || c > 31 && c < 127 || c === 133 || c > 159 && c <= 55295 || c >= 57344 && c <= 65533 || c >= 65536 && c <= 1114111; + } + exports2.isCharAndNotRestricted = isCharAndNotRestricted; + function isS(c) { + return c === SPACE || c === NL || c === CR || c === TAB; + } + exports2.isS = isS; + function isNameStartChar(c) { + return c >= 65 && c <= 90 || c >= 97 && c <= 122 || c === 58 || c === 95 || c === 8204 || c === 8205 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 767 || c >= 880 && c <= 893 || c >= 895 && c <= 8191 || c >= 8304 && c <= 8591 || c >= 11264 && c <= 12271 || c >= 12289 && c <= 55295 || c >= 63744 && c <= 64975 || c >= 65008 && c <= 65533 || c >= 65536 && c <= 983039; + } + exports2.isNameStartChar = isNameStartChar; + function isNameChar(c) { + return isNameStartChar(c) || c >= 48 && c <= 57 || c === 45 || c === 46 || c === 183 || c >= 768 && c <= 879 || c >= 8255 && c <= 8256; + } + exports2.isNameChar = isNameChar; + } +}); + +// ../../node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xmlns/1.0/ed3.js +var require_ed3 = __commonJS({ + "../../node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xmlns/1.0/ed3.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NC_NAME_START_CHAR = "A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}"; + exports2.NC_NAME_CHAR = "-" + exports2.NC_NAME_START_CHAR + ".0-9\xB7\u0300-\u036F\u203F-\u2040"; + exports2.NC_NAME_START_CHAR_RE = new RegExp("^[" + exports2.NC_NAME_START_CHAR + "]$", "u"); + exports2.NC_NAME_CHAR_RE = new RegExp("^[" + exports2.NC_NAME_CHAR + "]$", "u"); + exports2.NC_NAME_RE = new RegExp("^[" + exports2.NC_NAME_START_CHAR + "][" + exports2.NC_NAME_CHAR + "]*$", "u"); + function isNCNameStartChar(c) { + return c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 767 || c >= 880 && c <= 893 || c >= 895 && c <= 8191 || c >= 8204 && c <= 8205 || c >= 8304 && c <= 8591 || c >= 11264 && c <= 12271 || c >= 12289 && c <= 55295 || c >= 63744 && c <= 64975 || c >= 65008 && c <= 65533 || c >= 65536 && c <= 983039; + } + exports2.isNCNameStartChar = isNCNameStartChar; + function isNCNameChar(c) { + return isNCNameStartChar(c) || (c === 45 || c === 46 || c >= 48 && c <= 57 || c === 183 || c >= 768 && c <= 879 || c >= 8255 && c <= 8256); + } + exports2.isNCNameChar = isNCNameChar; + } +}); + +// ../../node_modules/.pnpm/saxes@5.0.1/node_modules/saxes/saxes.js +var require_saxes = __commonJS({ + "../../node_modules/.pnpm/saxes@5.0.1/node_modules/saxes/saxes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var ed5 = require_ed5(); + var ed2 = require_ed2(); + var NSed3 = require_ed3(); + var isS = ed5.isS; + var isChar10 = ed5.isChar; + var isNameStartChar = ed5.isNameStartChar; + var isNameChar = ed5.isNameChar; + var S_LIST = ed5.S_LIST; + var NAME_RE = ed5.NAME_RE; + var isChar11 = ed2.isChar; + var isNCNameStartChar = NSed3.isNCNameStartChar; + var isNCNameChar = NSed3.isNCNameChar; + var NC_NAME_RE = NSed3.NC_NAME_RE; + var XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace"; + var XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/"; + var rootNS = { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + __proto__: null, + xml: XML_NAMESPACE, + xmlns: XMLNS_NAMESPACE + }; + var XML_ENTITIES = { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + __proto__: null, + amp: "&", + gt: ">", + lt: "<", + quot: '"', + apos: "'" + }; + var EOC = -1; + var NL_LIKE = -2; + var S_BEGIN = 0; + var S_BEGIN_WHITESPACE = 1; + var S_DOCTYPE = 2; + var S_DOCTYPE_QUOTE = 3; + var S_DTD = 4; + var S_DTD_QUOTED = 5; + var S_DTD_OPEN_WAKA = 6; + var S_DTD_OPEN_WAKA_BANG = 7; + var S_DTD_COMMENT = 8; + var S_DTD_COMMENT_ENDING = 9; + var S_DTD_COMMENT_ENDED = 10; + var S_DTD_PI = 11; + var S_DTD_PI_ENDING = 12; + var S_TEXT = 13; + var S_ENTITY = 14; + var S_OPEN_WAKA = 15; + var S_OPEN_WAKA_BANG = 16; + var S_COMMENT = 17; + var S_COMMENT_ENDING = 18; + var S_COMMENT_ENDED = 19; + var S_CDATA = 20; + var S_CDATA_ENDING = 21; + var S_CDATA_ENDING_2 = 22; + var S_PI_FIRST_CHAR = 23; + var S_PI_REST = 24; + var S_PI_BODY = 25; + var S_PI_ENDING = 26; + var S_XML_DECL_NAME_START = 27; + var S_XML_DECL_NAME = 28; + var S_XML_DECL_EQ = 29; + var S_XML_DECL_VALUE_START = 30; + var S_XML_DECL_VALUE = 31; + var S_XML_DECL_SEPARATOR = 32; + var S_XML_DECL_ENDING = 33; + var S_OPEN_TAG = 34; + var S_OPEN_TAG_SLASH = 35; + var S_ATTRIB = 36; + var S_ATTRIB_NAME = 37; + var S_ATTRIB_NAME_SAW_WHITE = 38; + var S_ATTRIB_VALUE = 39; + var S_ATTRIB_VALUE_QUOTED = 40; + var S_ATTRIB_VALUE_CLOSED = 41; + var S_ATTRIB_VALUE_UNQUOTED = 42; + var S_CLOSE_TAG = 43; + var S_CLOSE_TAG_SAW_WHITE = 44; + var TAB = 9; + var NL = 10; + var CR = 13; + var SPACE = 32; + var BANG = 33; + var DQUOTE = 34; + var AMP = 38; + var SQUOTE = 39; + var MINUS = 45; + var FORWARD_SLASH = 47; + var SEMICOLON = 59; + var LESS = 60; + var EQUAL = 61; + var GREATER = 62; + var QUESTION = 63; + var OPEN_BRACKET = 91; + var CLOSE_BRACKET = 93; + var NEL = 133; + var LS = 8232; + var isQuote = (c) => c === DQUOTE || c === SQUOTE; + var QUOTES = [DQUOTE, SQUOTE]; + var DOCTYPE_TERMINATOR = [...QUOTES, OPEN_BRACKET, GREATER]; + var DTD_TERMINATOR = [...QUOTES, LESS, CLOSE_BRACKET]; + var XML_DECL_NAME_TERMINATOR = [EQUAL, QUESTION, ...S_LIST]; + var ATTRIB_VALUE_UNQUOTED_TERMINATOR = [...S_LIST, GREATER, AMP, LESS]; + function nsPairCheck(parser, prefix, uri) { + switch (prefix) { + case "xml": + if (uri !== XML_NAMESPACE) { + parser.fail(`xml prefix must be bound to ${XML_NAMESPACE}.`); + } + break; + case "xmlns": + if (uri !== XMLNS_NAMESPACE) { + parser.fail(`xmlns prefix must be bound to ${XMLNS_NAMESPACE}.`); + } + break; + default: + } + switch (uri) { + case XMLNS_NAMESPACE: + parser.fail(prefix === "" ? `the default namespace may not be set to ${uri}.` : `may not assign a prefix (even "xmlns") to the URI ${XMLNS_NAMESPACE}.`); + break; + case XML_NAMESPACE: + switch (prefix) { + case "xml": + break; + case "": + parser.fail(`the default namespace may not be set to ${uri}.`); + break; + default: + parser.fail("may not assign the xml namespace to another prefix."); + } + break; + default: + } + } + function nsMappingCheck(parser, mapping) { + for (const local of Object.keys(mapping)) { + nsPairCheck(parser, local, mapping[local]); + } + } + var isNCName = (name) => NC_NAME_RE.test(name); + var isName = (name) => NAME_RE.test(name); + var FORBIDDEN_START = 0; + var FORBIDDEN_BRACKET = 1; + var FORBIDDEN_BRACKET_BRACKET = 2; + exports2.EVENTS = [ + "xmldecl", + "text", + "processinginstruction", + "doctype", + "comment", + "opentagstart", + "attribute", + "opentag", + "closetag", + "cdata", + "error", + "end", + "ready" + ]; + var EVENT_NAME_TO_HANDLER_NAME = { + xmldecl: "xmldeclHandler", + text: "textHandler", + processinginstruction: "piHandler", + doctype: "doctypeHandler", + comment: "commentHandler", + opentagstart: "openTagStartHandler", + attribute: "attributeHandler", + opentag: "openTagHandler", + closetag: "closeTagHandler", + cdata: "cdataHandler", + error: "errorHandler", + end: "endHandler", + ready: "readyHandler" + }; + var SaxesParser = class { + /** + * @param opt The parser options. + */ + constructor(opt) { + this.opt = opt !== null && opt !== void 0 ? opt : {}; + this.fragmentOpt = !!this.opt.fragment; + const xmlnsOpt = this.xmlnsOpt = !!this.opt.xmlns; + this.trackPosition = this.opt.position !== false; + this.fileName = this.opt.fileName; + if (xmlnsOpt) { + this.nameStartCheck = isNCNameStartChar; + this.nameCheck = isNCNameChar; + this.isName = isNCName; + this.processAttribs = this.processAttribsNS; + this.pushAttrib = this.pushAttribNS; + this.ns = Object.assign({ __proto__: null }, rootNS); + const additional = this.opt.additionalNamespaces; + if (additional != null) { + nsMappingCheck(this, additional); + Object.assign(this.ns, additional); + } + } else { + this.nameStartCheck = isNameStartChar; + this.nameCheck = isNameChar; + this.isName = isName; + this.processAttribs = this.processAttribsPlain; + this.pushAttrib = this.pushAttribPlain; + } + this.stateTable = [ + /* eslint-disable @typescript-eslint/unbound-method */ + this.sBegin, + this.sBeginWhitespace, + this.sDoctype, + this.sDoctypeQuote, + this.sDTD, + this.sDTDQuoted, + this.sDTDOpenWaka, + this.sDTDOpenWakaBang, + this.sDTDComment, + this.sDTDCommentEnding, + this.sDTDCommentEnded, + this.sDTDPI, + this.sDTDPIEnding, + this.sText, + this.sEntity, + this.sOpenWaka, + this.sOpenWakaBang, + this.sComment, + this.sCommentEnding, + this.sCommentEnded, + this.sCData, + this.sCDataEnding, + this.sCDataEnding2, + this.sPIFirstChar, + this.sPIRest, + this.sPIBody, + this.sPIEnding, + this.sXMLDeclNameStart, + this.sXMLDeclName, + this.sXMLDeclEq, + this.sXMLDeclValueStart, + this.sXMLDeclValue, + this.sXMLDeclSeparator, + this.sXMLDeclEnding, + this.sOpenTag, + this.sOpenTagSlash, + this.sAttrib, + this.sAttribName, + this.sAttribNameSawWhite, + this.sAttribValue, + this.sAttribValueQuoted, + this.sAttribValueClosed, + this.sAttribValueUnquoted, + this.sCloseTag, + this.sCloseTagSawWhite + ]; + this._init(); + } + /** + * Indicates whether or not the parser is closed. If ``true``, wait for + * the ``ready`` event to write again. + */ + get closed() { + return this._closed; + } + _init() { + var _a; + this.openWakaBang = ""; + this.text = ""; + this.name = ""; + this.piTarget = ""; + this.entity = ""; + this.q = null; + this.tags = []; + this.tag = null; + this.topNS = null; + this.chunk = ""; + this.chunkPosition = 0; + this.i = 0; + this.prevI = 0; + this.carriedFromPrevious = void 0; + this.forbiddenState = FORBIDDEN_START; + this.attribList = []; + const { fragmentOpt } = this; + this.state = fragmentOpt ? S_TEXT : S_BEGIN; + this.reportedTextBeforeRoot = this.reportedTextAfterRoot = this.closedRoot = this.sawRoot = fragmentOpt; + this.xmlDeclPossible = !fragmentOpt; + this.xmlDeclExpects = ["version"]; + this.entityReturnState = void 0; + let { defaultXMLVersion } = this.opt; + if (defaultXMLVersion === void 0) { + if (this.opt.forceXMLVersion === true) { + throw new Error("forceXMLVersion set but defaultXMLVersion is not set"); + } + defaultXMLVersion = "1.0"; + } + this.setXMLVersion(defaultXMLVersion); + this.positionAtNewLine = 0; + this.doctype = false; + this._closed = false; + this.xmlDecl = { + version: void 0, + encoding: void 0, + standalone: void 0 + }; + this.line = 1; + this.column = 0; + this.ENTITIES = Object.create(XML_ENTITIES); + (_a = this.readyHandler) === null || _a === void 0 ? void 0 : _a.call(this); + } + /** + * The stream position the parser is currently looking at. This field is + * zero-based. + * + * This field is not based on counting Unicode characters but is to be + * interpreted as a plain index into a JavaScript string. + */ + get position() { + return this.chunkPosition + this.i; + } + /** + * The column number of the next character to be read by the parser. * + * This field is zero-based. (The first column in a line is 0.) + * + * This field reports the index at which the next character would be in the + * line if the line were represented as a JavaScript string. Note that this + * *can* be different to a count based on the number of *Unicode characters* + * due to how JavaScript handles astral plane characters. + * + * See [[column]] for a number that corresponds to a count of Unicode + * characters. + */ + get columnIndex() { + return this.position - this.positionAtNewLine; + } + /** + * Set an event listener on an event. The parser supports one handler per + * event type. If you try to set an event handler over an existing handler, + * the old handler is silently overwritten. + * + * @param name The event to listen to. + * + * @param handler The handler to set. + */ + on(name, handler) { + this[EVENT_NAME_TO_HANDLER_NAME[name]] = handler; + } + /** + * Unset an event handler. + * + * @parma name The event to stop listening to. + */ + off(name) { + this[EVENT_NAME_TO_HANDLER_NAME[name]] = void 0; + } + /** + * Make an error object. The error object will have a message that contains + * the ``fileName`` option passed at the creation of the parser. If position + * tracking was turned on, it will also have line and column number + * information. + * + * @param message The message describing the error to report. + * + * @returns An error object with a properly formatted message. + */ + makeError(message) { + var _a; + let msg = (_a = this.fileName) !== null && _a !== void 0 ? _a : ""; + if (this.trackPosition) { + if (msg.length > 0) { + msg += ":"; + } + msg += `${this.line}:${this.column}`; + } + if (msg.length > 0) { + msg += ": "; + } + return new Error(msg + message); + } + /** + * Report a parsing error. This method is made public so that client code may + * check for issues that are outside the scope of this project and can report + * errors. + * + * @param message The error to report. + * + * @returns this + */ + fail(message) { + const err = this.makeError(message); + const handler = this.errorHandler; + if (handler === void 0) { + throw err; + } else { + handler(err); + } + return this; + } + /** + * Write a XML data to the parser. + * + * @param chunk The XML data to write. + * + * @returns this + */ + write(chunk) { + if (this.closed) { + return this.fail("cannot write after close; assign an onready handler."); + } + let end = false; + if (chunk === null) { + end = true; + chunk = ""; + } else if (typeof chunk === "object") { + chunk = chunk.toString(); + } + if (this.carriedFromPrevious !== void 0) { + chunk = `${this.carriedFromPrevious}${chunk}`; + this.carriedFromPrevious = void 0; + } + let limit = chunk.length; + const lastCode = chunk.charCodeAt(limit - 1); + if (!end && // A trailing CR or surrogate must be carried over to the next + // chunk. + (lastCode === CR || lastCode >= 55296 && lastCode <= 56319)) { + this.carriedFromPrevious = chunk[limit - 1]; + limit--; + chunk = chunk.slice(0, limit); + } + const { stateTable } = this; + this.chunk = chunk; + this.i = 0; + while (this.i < limit) { + stateTable[this.state].call(this); + } + this.chunkPosition += limit; + return end ? this.end() : this; + } + /** + * Close the current stream. Perform final well-formedness checks and reset + * the parser tstate. + * + * @returns this + */ + close() { + return this.write(null); + } + /** + * Get a single code point out of the current chunk. This updates the current + * position if we do position tracking. + * + * This is the algorithm to use for XML 1.0. + * + * @returns The character read. + */ + getCode10() { + const { chunk, i } = this; + this.prevI = i; + this.i = i + 1; + if (i >= chunk.length) { + return EOC; + } + const code = chunk.charCodeAt(i); + this.column++; + if (code < 55296) { + if (code >= SPACE || code === TAB) { + return code; + } + switch (code) { + case NL: + this.line++; + this.column = 0; + this.positionAtNewLine = this.position; + return NL; + case CR: + if (chunk.charCodeAt(i + 1) === NL) { + this.i = i + 2; + } + this.line++; + this.column = 0; + this.positionAtNewLine = this.position; + return NL_LIKE; + default: + this.fail("disallowed character."); + return code; + } + } + if (code > 56319) { + if (!(code >= 57344 && code <= 65533)) { + this.fail("disallowed character."); + } + return code; + } + const final = 65536 + (code - 55296) * 1024 + (chunk.charCodeAt(i + 1) - 56320); + this.i = i + 2; + if (final > 1114111) { + this.fail("disallowed character."); + } + return final; + } + /** + * Get a single code point out of the current chunk. This updates the current + * position if we do position tracking. + * + * This is the algorithm to use for XML 1.1. + * + * @returns {number} The character read. + */ + getCode11() { + const { chunk, i } = this; + this.prevI = i; + this.i = i + 1; + if (i >= chunk.length) { + return EOC; + } + const code = chunk.charCodeAt(i); + this.column++; + if (code < 55296) { + if (code > 31 && code < 127 || code > 159 && code !== LS || code === TAB) { + return code; + } + switch (code) { + case NL: + this.line++; + this.column = 0; + this.positionAtNewLine = this.position; + return NL; + case CR: { + const next = chunk.charCodeAt(i + 1); + if (next === NL || next === NEL) { + this.i = i + 2; + } + } + /* yes, fall through */ + case NEL: + // 0x85 + case LS: + this.line++; + this.column = 0; + this.positionAtNewLine = this.position; + return NL_LIKE; + default: + this.fail("disallowed character."); + return code; + } + } + if (code > 56319) { + if (!(code >= 57344 && code <= 65533)) { + this.fail("disallowed character."); + } + return code; + } + const final = 65536 + (code - 55296) * 1024 + (chunk.charCodeAt(i + 1) - 56320); + this.i = i + 2; + if (final > 1114111) { + this.fail("disallowed character."); + } + return final; + } + /** + * Like ``getCode`` but with the return value normalized so that ``NL`` is + * returned for ``NL_LIKE``. + */ + getCodeNorm() { + const c = this.getCode(); + return c === NL_LIKE ? NL : c; + } + unget() { + this.i = this.prevI; + this.column--; + } + /** + * Capture characters into a buffer until encountering one of a set of + * characters. + * + * @param chars An array of codepoints. Encountering a character in the array + * ends the capture. (``chars`` may safely contain ``NL``.) + * + * @return The character code that made the capture end, or ``EOC`` if we hit + * the end of the chunk. The return value cannot be NL_LIKE: NL is returned + * instead. + */ + captureTo(chars) { + let { i: start } = this; + const { chunk } = this; + while (true) { + const c = this.getCode(); + const isNLLike = c === NL_LIKE; + const final = isNLLike ? NL : c; + if (final === EOC || chars.includes(final)) { + this.text += chunk.slice(start, this.prevI); + return final; + } + if (isNLLike) { + this.text += `${chunk.slice(start, this.prevI)} +`; + start = this.i; + } + } + } + /** + * Capture characters into a buffer until encountering a character. + * + * @param char The codepoint that ends the capture. **NOTE ``char`` MAY NOT + * CONTAIN ``NL``.** Passing ``NL`` will result in buggy behavior. + * + * @return ``true`` if we ran into the character. Otherwise, we ran into the + * end of the current chunk. + */ + captureToChar(char) { + let { i: start } = this; + const { chunk } = this; + while (true) { + let c = this.getCode(); + switch (c) { + case NL_LIKE: + this.text += `${chunk.slice(start, this.prevI)} +`; + start = this.i; + c = NL; + break; + case EOC: + this.text += chunk.slice(start); + return false; + default: + } + if (c === char) { + this.text += chunk.slice(start, this.prevI); + return true; + } + } + } + /** + * Capture characters that satisfy ``isNameChar`` into the ``name`` field of + * this parser. + * + * @return The character code that made the test fail, or ``EOC`` if we hit + * the end of the chunk. The return value cannot be NL_LIKE: NL is returned + * instead. + */ + captureNameChars() { + const { chunk, i: start } = this; + while (true) { + const c = this.getCode(); + if (c === EOC) { + this.name += chunk.slice(start); + return EOC; + } + if (!isNameChar(c)) { + this.name += chunk.slice(start, this.prevI); + return c === NL_LIKE ? NL : c; + } + } + } + /** + * Skip white spaces. + * + * @return The character that ended the skip, or ``EOC`` if we hit + * the end of the chunk. The return value cannot be NL_LIKE: NL is returned + * instead. + */ + skipSpaces() { + while (true) { + const c = this.getCodeNorm(); + if (c === EOC || !isS(c)) { + return c; + } + } + } + setXMLVersion(version2) { + this.currentXMLVersion = version2; + if (version2 === "1.0") { + this.isChar = isChar10; + this.getCode = this.getCode10; + } else { + this.isChar = isChar11; + this.getCode = this.getCode11; + } + } + // STATE ENGINE METHODS + // This needs to be a state separate from S_BEGIN_WHITESPACE because we want + // to be sure never to come back to this state later. + sBegin() { + if (this.chunk.charCodeAt(0) === 65279) { + this.i++; + this.column++; + } + this.state = S_BEGIN_WHITESPACE; + } + sBeginWhitespace() { + const iBefore = this.i; + const c = this.skipSpaces(); + if (this.prevI !== iBefore) { + this.xmlDeclPossible = false; + } + switch (c) { + case LESS: + this.state = S_OPEN_WAKA; + if (this.text.length !== 0) { + throw new Error("no-empty text at start"); + } + break; + case EOC: + break; + default: + this.unget(); + this.state = S_TEXT; + this.xmlDeclPossible = false; + } + } + sDoctype() { + var _a; + const c = this.captureTo(DOCTYPE_TERMINATOR); + switch (c) { + case GREATER: { + (_a = this.doctypeHandler) === null || _a === void 0 ? void 0 : _a.call(this, this.text); + this.text = ""; + this.state = S_TEXT; + this.doctype = true; + break; + } + case EOC: + break; + default: + this.text += String.fromCodePoint(c); + if (c === OPEN_BRACKET) { + this.state = S_DTD; + } else if (isQuote(c)) { + this.state = S_DOCTYPE_QUOTE; + this.q = c; + } + } + } + sDoctypeQuote() { + const q = this.q; + if (this.captureToChar(q)) { + this.text += String.fromCodePoint(q); + this.q = null; + this.state = S_DOCTYPE; + } + } + sDTD() { + const c = this.captureTo(DTD_TERMINATOR); + if (c === EOC) { + return; + } + this.text += String.fromCodePoint(c); + if (c === CLOSE_BRACKET) { + this.state = S_DOCTYPE; + } else if (c === LESS) { + this.state = S_DTD_OPEN_WAKA; + } else if (isQuote(c)) { + this.state = S_DTD_QUOTED; + this.q = c; + } + } + sDTDQuoted() { + const q = this.q; + if (this.captureToChar(q)) { + this.text += String.fromCodePoint(q); + this.state = S_DTD; + this.q = null; + } + } + sDTDOpenWaka() { + const c = this.getCodeNorm(); + this.text += String.fromCodePoint(c); + switch (c) { + case BANG: + this.state = S_DTD_OPEN_WAKA_BANG; + this.openWakaBang = ""; + break; + case QUESTION: + this.state = S_DTD_PI; + break; + default: + this.state = S_DTD; + } + } + sDTDOpenWakaBang() { + const char = String.fromCodePoint(this.getCodeNorm()); + const owb = this.openWakaBang += char; + this.text += char; + if (owb !== "-") { + this.state = owb === "--" ? S_DTD_COMMENT : S_DTD; + this.openWakaBang = ""; + } + } + sDTDComment() { + if (this.captureToChar(MINUS)) { + this.text += "-"; + this.state = S_DTD_COMMENT_ENDING; + } + } + sDTDCommentEnding() { + const c = this.getCodeNorm(); + this.text += String.fromCodePoint(c); + this.state = c === MINUS ? S_DTD_COMMENT_ENDED : S_DTD_COMMENT; + } + sDTDCommentEnded() { + const c = this.getCodeNorm(); + this.text += String.fromCodePoint(c); + if (c === GREATER) { + this.state = S_DTD; + } else { + this.fail("malformed comment."); + this.state = S_DTD_COMMENT; + } + } + sDTDPI() { + if (this.captureToChar(QUESTION)) { + this.text += "?"; + this.state = S_DTD_PI_ENDING; + } + } + sDTDPIEnding() { + const c = this.getCodeNorm(); + this.text += String.fromCodePoint(c); + if (c === GREATER) { + this.state = S_DTD; + } + } + sText() { + if (this.tags.length !== 0) { + this.handleTextInRoot(); + } else { + this.handleTextOutsideRoot(); + } + } + sEntity() { + let { i: start } = this; + const { chunk } = this; + loop: + while (true) { + switch (this.getCode()) { + case NL_LIKE: + this.entity += `${chunk.slice(start, this.prevI)} +`; + start = this.i; + break; + case SEMICOLON: { + const { entityReturnState } = this; + const entity = this.entity + chunk.slice(start, this.prevI); + this.state = entityReturnState; + let parsed; + if (entity === "") { + this.fail("empty entity name."); + parsed = "&;"; + } else { + parsed = this.parseEntity(entity); + this.entity = ""; + } + if (entityReturnState !== S_TEXT || this.textHandler !== void 0) { + this.text += parsed; + } + break loop; + } + case EOC: + this.entity += chunk.slice(start); + break loop; + default: + } + } + } + sOpenWaka() { + const c = this.getCode(); + if (isNameStartChar(c)) { + this.state = S_OPEN_TAG; + this.unget(); + this.xmlDeclPossible = false; + } else { + switch (c) { + case FORWARD_SLASH: + this.state = S_CLOSE_TAG; + this.xmlDeclPossible = false; + break; + case BANG: + this.state = S_OPEN_WAKA_BANG; + this.openWakaBang = ""; + this.xmlDeclPossible = false; + break; + case QUESTION: + this.state = S_PI_FIRST_CHAR; + break; + default: + this.fail("disallowed character in tag name"); + this.state = S_TEXT; + this.xmlDeclPossible = false; + } + } + } + sOpenWakaBang() { + this.openWakaBang += String.fromCodePoint(this.getCodeNorm()); + switch (this.openWakaBang) { + case "[CDATA[": + if (!this.sawRoot && !this.reportedTextBeforeRoot) { + this.fail("text data outside of root node."); + this.reportedTextBeforeRoot = true; + } + if (this.closedRoot && !this.reportedTextAfterRoot) { + this.fail("text data outside of root node."); + this.reportedTextAfterRoot = true; + } + this.state = S_CDATA; + this.openWakaBang = ""; + break; + case "--": + this.state = S_COMMENT; + this.openWakaBang = ""; + break; + case "DOCTYPE": + this.state = S_DOCTYPE; + if (this.doctype || this.sawRoot) { + this.fail("inappropriately located doctype declaration."); + } + this.openWakaBang = ""; + break; + default: + if (this.openWakaBang.length >= 7) { + this.fail("incorrect syntax."); + } + } + } + sComment() { + if (this.captureToChar(MINUS)) { + this.state = S_COMMENT_ENDING; + } + } + sCommentEnding() { + var _a; + const c = this.getCodeNorm(); + if (c === MINUS) { + this.state = S_COMMENT_ENDED; + (_a = this.commentHandler) === null || _a === void 0 ? void 0 : _a.call(this, this.text); + this.text = ""; + } else { + this.text += `-${String.fromCodePoint(c)}`; + this.state = S_COMMENT; + } + } + sCommentEnded() { + const c = this.getCodeNorm(); + if (c !== GREATER) { + this.fail("malformed comment."); + this.text += `--${String.fromCodePoint(c)}`; + this.state = S_COMMENT; + } else { + this.state = S_TEXT; + } + } + sCData() { + if (this.captureToChar(CLOSE_BRACKET)) { + this.state = S_CDATA_ENDING; + } + } + sCDataEnding() { + const c = this.getCodeNorm(); + if (c === CLOSE_BRACKET) { + this.state = S_CDATA_ENDING_2; + } else { + this.text += `]${String.fromCodePoint(c)}`; + this.state = S_CDATA; + } + } + sCDataEnding2() { + var _a; + const c = this.getCodeNorm(); + switch (c) { + case GREATER: { + (_a = this.cdataHandler) === null || _a === void 0 ? void 0 : _a.call(this, this.text); + this.text = ""; + this.state = S_TEXT; + break; + } + case CLOSE_BRACKET: + this.text += "]"; + break; + default: + this.text += `]]${String.fromCodePoint(c)}`; + this.state = S_CDATA; + } + } + // We need this separate state to check the first character fo the pi target + // with this.nameStartCheck which allows less characters than this.nameCheck. + sPIFirstChar() { + const c = this.getCodeNorm(); + if (this.nameStartCheck(c)) { + this.piTarget += String.fromCodePoint(c); + this.state = S_PI_REST; + } else if (c === QUESTION || isS(c)) { + this.fail("processing instruction without a target."); + this.state = c === QUESTION ? S_PI_ENDING : S_PI_BODY; + } else { + this.fail("disallowed character in processing instruction name."); + this.piTarget += String.fromCodePoint(c); + this.state = S_PI_REST; + } + } + sPIRest() { + const { chunk, i: start } = this; + while (true) { + const c = this.getCodeNorm(); + if (c === EOC) { + this.piTarget += chunk.slice(start); + return; + } + if (!this.nameCheck(c)) { + this.piTarget += chunk.slice(start, this.prevI); + const isQuestion = c === QUESTION; + if (isQuestion || isS(c)) { + if (this.piTarget === "xml") { + if (!this.xmlDeclPossible) { + this.fail("an XML declaration must be at the start of the document."); + } + this.state = isQuestion ? S_XML_DECL_ENDING : S_XML_DECL_NAME_START; + } else { + this.state = isQuestion ? S_PI_ENDING : S_PI_BODY; + } + } else { + this.fail("disallowed character in processing instruction name."); + this.piTarget += String.fromCodePoint(c); + } + break; + } + } + } + sPIBody() { + if (this.text.length === 0) { + const c = this.getCodeNorm(); + if (c === QUESTION) { + this.state = S_PI_ENDING; + } else if (!isS(c)) { + this.text = String.fromCodePoint(c); + } + } else if (this.captureToChar(QUESTION)) { + this.state = S_PI_ENDING; + } + } + sPIEnding() { + var _a; + const c = this.getCodeNorm(); + if (c === GREATER) { + const { piTarget } = this; + if (piTarget.toLowerCase() === "xml") { + this.fail("the XML declaration must appear at the start of the document."); + } + (_a = this.piHandler) === null || _a === void 0 ? void 0 : _a.call(this, { + target: piTarget, + body: this.text + }); + this.piTarget = this.text = ""; + this.state = S_TEXT; + } else if (c === QUESTION) { + this.text += "?"; + } else { + this.text += `?${String.fromCodePoint(c)}`; + this.state = S_PI_BODY; + } + this.xmlDeclPossible = false; + } + sXMLDeclNameStart() { + const c = this.skipSpaces(); + if (c === QUESTION) { + this.state = S_XML_DECL_ENDING; + return; + } + if (c !== EOC) { + this.state = S_XML_DECL_NAME; + this.name = String.fromCodePoint(c); + } + } + sXMLDeclName() { + const c = this.captureTo(XML_DECL_NAME_TERMINATOR); + if (c === QUESTION) { + this.state = S_XML_DECL_ENDING; + this.name += this.text; + this.text = ""; + this.fail("XML declaration is incomplete."); + return; + } + if (!(isS(c) || c === EQUAL)) { + return; + } + this.name += this.text; + this.text = ""; + if (!this.xmlDeclExpects.includes(this.name)) { + switch (this.name.length) { + case 0: + this.fail("did not expect any more name/value pairs."); + break; + case 1: + this.fail(`expected the name ${this.xmlDeclExpects[0]}.`); + break; + default: + this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`); + } + } + this.state = c === EQUAL ? S_XML_DECL_VALUE_START : S_XML_DECL_EQ; + } + sXMLDeclEq() { + const c = this.getCodeNorm(); + if (c === QUESTION) { + this.state = S_XML_DECL_ENDING; + this.fail("XML declaration is incomplete."); + return; + } + if (isS(c)) { + return; + } + if (c !== EQUAL) { + this.fail("value required."); + } + this.state = S_XML_DECL_VALUE_START; + } + sXMLDeclValueStart() { + const c = this.getCodeNorm(); + if (c === QUESTION) { + this.state = S_XML_DECL_ENDING; + this.fail("XML declaration is incomplete."); + return; + } + if (isS(c)) { + return; + } + if (!isQuote(c)) { + this.fail("value must be quoted."); + this.q = SPACE; + } else { + this.q = c; + } + this.state = S_XML_DECL_VALUE; + } + sXMLDeclValue() { + const c = this.captureTo([this.q, QUESTION]); + if (c === QUESTION) { + this.state = S_XML_DECL_ENDING; + this.text = ""; + this.fail("XML declaration is incomplete."); + return; + } + if (c === EOC) { + return; + } + const value = this.text; + this.text = ""; + switch (this.name) { + case "version": { + this.xmlDeclExpects = ["encoding", "standalone"]; + const version2 = value; + this.xmlDecl.version = version2; + if (!/^1\.[0-9]+$/.test(version2)) { + this.fail("version number must match /^1\\.[0-9]+$/."); + } else if (!this.opt.forceXMLVersion) { + this.setXMLVersion(version2); + } + break; + } + case "encoding": + if (!/^[A-Za-z][A-Za-z0-9._-]*$/.test(value)) { + this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."); + } + this.xmlDeclExpects = ["standalone"]; + this.xmlDecl.encoding = value; + break; + case "standalone": + if (value !== "yes" && value !== "no") { + this.fail('standalone value must match "yes" or "no".'); + } + this.xmlDeclExpects = []; + this.xmlDecl.standalone = value; + break; + default: + } + this.name = ""; + this.state = S_XML_DECL_SEPARATOR; + } + sXMLDeclSeparator() { + const c = this.getCodeNorm(); + if (c === QUESTION) { + this.state = S_XML_DECL_ENDING; + return; + } + if (!isS(c)) { + this.fail("whitespace required."); + this.unget(); + } + this.state = S_XML_DECL_NAME_START; + } + sXMLDeclEnding() { + var _a; + const c = this.getCodeNorm(); + if (c === GREATER) { + if (this.piTarget !== "xml") { + this.fail("processing instructions are not allowed before root."); + } else if (this.name !== "version" && this.xmlDeclExpects.includes("version")) { + this.fail("XML declaration must contain a version."); + } + (_a = this.xmldeclHandler) === null || _a === void 0 ? void 0 : _a.call(this, this.xmlDecl); + this.name = ""; + this.piTarget = this.text = ""; + this.state = S_TEXT; + } else { + this.fail("The character ? is disallowed anywhere in XML declarations."); + } + this.xmlDeclPossible = false; + } + sOpenTag() { + var _a; + const c = this.captureNameChars(); + if (c === EOC) { + return; + } + const tag = this.tag = { + name: this.name, + attributes: /* @__PURE__ */ Object.create(null) + }; + this.name = ""; + if (this.xmlnsOpt) { + this.topNS = tag.ns = /* @__PURE__ */ Object.create(null); + } + (_a = this.openTagStartHandler) === null || _a === void 0 ? void 0 : _a.call(this, tag); + this.sawRoot = true; + if (!this.fragmentOpt && this.closedRoot) { + this.fail("documents may contain only one root."); + } + switch (c) { + case GREATER: + this.openTag(); + break; + case FORWARD_SLASH: + this.state = S_OPEN_TAG_SLASH; + break; + default: + if (!isS(c)) { + this.fail("disallowed character in tag name."); + } + this.state = S_ATTRIB; + } + } + sOpenTagSlash() { + if (this.getCode() === GREATER) { + this.openSelfClosingTag(); + } else { + this.fail("forward-slash in opening tag not followed by >."); + this.state = S_ATTRIB; + } + } + sAttrib() { + const c = this.skipSpaces(); + if (c === EOC) { + return; + } + if (isNameStartChar(c)) { + this.unget(); + this.state = S_ATTRIB_NAME; + } else if (c === GREATER) { + this.openTag(); + } else if (c === FORWARD_SLASH) { + this.state = S_OPEN_TAG_SLASH; + } else { + this.fail("disallowed character in attribute name."); + } + } + sAttribName() { + const c = this.captureNameChars(); + if (c === EQUAL) { + this.state = S_ATTRIB_VALUE; + } else if (isS(c)) { + this.state = S_ATTRIB_NAME_SAW_WHITE; + } else if (c === GREATER) { + this.fail("attribute without value."); + this.pushAttrib(this.name, this.name); + this.name = this.text = ""; + this.openTag(); + } else if (c !== EOC) { + this.fail("disallowed character in attribute name."); + } + } + sAttribNameSawWhite() { + const c = this.skipSpaces(); + switch (c) { + case EOC: + return; + case EQUAL: + this.state = S_ATTRIB_VALUE; + break; + default: + this.fail("attribute without value."); + this.text = ""; + this.name = ""; + if (c === GREATER) { + this.openTag(); + } else if (isNameStartChar(c)) { + this.unget(); + this.state = S_ATTRIB_NAME; + } else { + this.fail("disallowed character in attribute name."); + this.state = S_ATTRIB; + } + } + } + sAttribValue() { + const c = this.getCodeNorm(); + if (isQuote(c)) { + this.q = c; + this.state = S_ATTRIB_VALUE_QUOTED; + } else if (!isS(c)) { + this.fail("unquoted attribute value."); + this.state = S_ATTRIB_VALUE_UNQUOTED; + this.unget(); + } + } + sAttribValueQuoted() { + const { q, chunk } = this; + let { i: start } = this; + while (true) { + switch (this.getCode()) { + case q: + this.pushAttrib(this.name, this.text + chunk.slice(start, this.prevI)); + this.name = this.text = ""; + this.q = null; + this.state = S_ATTRIB_VALUE_CLOSED; + return; + case AMP: + this.text += chunk.slice(start, this.prevI); + this.state = S_ENTITY; + this.entityReturnState = S_ATTRIB_VALUE_QUOTED; + return; + case NL: + case NL_LIKE: + case TAB: + this.text += `${chunk.slice(start, this.prevI)} `; + start = this.i; + break; + case LESS: + this.text += chunk.slice(start, this.prevI); + this.fail("disallowed character."); + return; + case EOC: + this.text += chunk.slice(start); + return; + default: + } + } + } + sAttribValueClosed() { + const c = this.getCodeNorm(); + if (isS(c)) { + this.state = S_ATTRIB; + } else if (c === GREATER) { + this.openTag(); + } else if (c === FORWARD_SLASH) { + this.state = S_OPEN_TAG_SLASH; + } else if (isNameStartChar(c)) { + this.fail("no whitespace between attributes."); + this.unget(); + this.state = S_ATTRIB_NAME; + } else { + this.fail("disallowed character in attribute name."); + } + } + sAttribValueUnquoted() { + const c = this.captureTo(ATTRIB_VALUE_UNQUOTED_TERMINATOR); + switch (c) { + case AMP: + this.state = S_ENTITY; + this.entityReturnState = S_ATTRIB_VALUE_UNQUOTED; + break; + case LESS: + this.fail("disallowed character."); + break; + case EOC: + break; + default: + if (this.text.includes("]]>")) { + this.fail('the string "]]>" is disallowed in char data.'); + } + this.pushAttrib(this.name, this.text); + this.name = this.text = ""; + if (c === GREATER) { + this.openTag(); + } else { + this.state = S_ATTRIB; + } + } + } + sCloseTag() { + const c = this.captureNameChars(); + if (c === GREATER) { + this.closeTag(); + } else if (isS(c)) { + this.state = S_CLOSE_TAG_SAW_WHITE; + } else if (c !== EOC) { + this.fail("disallowed character in closing tag."); + } + } + sCloseTagSawWhite() { + switch (this.skipSpaces()) { + case GREATER: + this.closeTag(); + break; + case EOC: + break; + default: + this.fail("disallowed character in closing tag."); + } + } + // END OF STATE ENGINE METHODS + handleTextInRoot() { + let { i: start, forbiddenState } = this; + const { chunk, textHandler: handler } = this; + scanLoop: + while (true) { + switch (this.getCode()) { + case LESS: { + this.state = S_OPEN_WAKA; + if (handler !== void 0) { + const { text } = this; + const slice = chunk.slice(start, this.prevI); + if (text.length !== 0) { + handler(text + slice); + this.text = ""; + } else if (slice.length !== 0) { + handler(slice); + } + } + forbiddenState = FORBIDDEN_START; + break scanLoop; + } + case AMP: + this.state = S_ENTITY; + this.entityReturnState = S_TEXT; + if (handler !== void 0) { + this.text += chunk.slice(start, this.prevI); + } + forbiddenState = FORBIDDEN_START; + break scanLoop; + case CLOSE_BRACKET: + switch (forbiddenState) { + case FORBIDDEN_START: + forbiddenState = FORBIDDEN_BRACKET; + break; + case FORBIDDEN_BRACKET: + forbiddenState = FORBIDDEN_BRACKET_BRACKET; + break; + case FORBIDDEN_BRACKET_BRACKET: + break; + default: + throw new Error("impossible state"); + } + break; + case GREATER: + if (forbiddenState === FORBIDDEN_BRACKET_BRACKET) { + this.fail('the string "]]>" is disallowed in char data.'); + } + forbiddenState = FORBIDDEN_START; + break; + case NL_LIKE: + if (handler !== void 0) { + this.text += `${chunk.slice(start, this.prevI)} +`; + } + start = this.i; + forbiddenState = FORBIDDEN_START; + break; + case EOC: + if (handler !== void 0) { + this.text += chunk.slice(start); + } + break scanLoop; + default: + forbiddenState = FORBIDDEN_START; + } + } + this.forbiddenState = forbiddenState; + } + handleTextOutsideRoot() { + let { i: start } = this; + const { chunk, textHandler: handler } = this; + let nonSpace = false; + outRootLoop: + while (true) { + const code = this.getCode(); + switch (code) { + case LESS: { + this.state = S_OPEN_WAKA; + if (handler !== void 0) { + const { text } = this; + const slice = chunk.slice(start, this.prevI); + if (text.length !== 0) { + handler(text + slice); + this.text = ""; + } else if (slice.length !== 0) { + handler(slice); + } + } + break outRootLoop; + } + case AMP: + this.state = S_ENTITY; + this.entityReturnState = S_TEXT; + if (handler !== void 0) { + this.text += chunk.slice(start, this.prevI); + } + nonSpace = true; + break outRootLoop; + case NL_LIKE: + if (handler !== void 0) { + this.text += `${chunk.slice(start, this.prevI)} +`; + } + start = this.i; + break; + case EOC: + if (handler !== void 0) { + this.text += chunk.slice(start); + } + break outRootLoop; + default: + if (!isS(code)) { + nonSpace = true; + } + } + } + if (!nonSpace) { + return; + } + if (!this.sawRoot && !this.reportedTextBeforeRoot) { + this.fail("text data outside of root node."); + this.reportedTextBeforeRoot = true; + } + if (this.closedRoot && !this.reportedTextAfterRoot) { + this.fail("text data outside of root node."); + this.reportedTextAfterRoot = true; + } + } + pushAttribNS(name, value) { + var _a; + const { prefix, local } = this.qname(name); + const attr = { name, prefix, local, value }; + this.attribList.push(attr); + (_a = this.attributeHandler) === null || _a === void 0 ? void 0 : _a.call(this, attr); + if (prefix === "xmlns") { + const trimmed = value.trim(); + if (this.currentXMLVersion === "1.0" && trimmed === "") { + this.fail("invalid attempt to undefine prefix in XML 1.0"); + } + this.topNS[local] = trimmed; + nsPairCheck(this, local, trimmed); + } else if (name === "xmlns") { + const trimmed = value.trim(); + this.topNS[""] = trimmed; + nsPairCheck(this, "", trimmed); + } + } + pushAttribPlain(name, value) { + var _a; + const attr = { name, value }; + this.attribList.push(attr); + (_a = this.attributeHandler) === null || _a === void 0 ? void 0 : _a.call(this, attr); + } + /** + * End parsing. This performs final well-formedness checks and resets the + * parser to a clean state. + * + * @returns this + */ + end() { + var _a, _b; + if (!this.sawRoot) { + this.fail("document must contain a root element."); + } + const { tags } = this; + while (tags.length > 0) { + const tag = tags.pop(); + this.fail(`unclosed tag: ${tag.name}`); + } + if (this.state !== S_BEGIN && this.state !== S_TEXT) { + this.fail("unexpected end."); + } + const { text } = this; + if (text.length !== 0) { + (_a = this.textHandler) === null || _a === void 0 ? void 0 : _a.call(this, text); + this.text = ""; + } + this._closed = true; + (_b = this.endHandler) === null || _b === void 0 ? void 0 : _b.call(this); + this._init(); + return this; + } + /** + * Resolve a namespace prefix. + * + * @param prefix The prefix to resolve. + * + * @returns The namespace URI or ``undefined`` if the prefix is not defined. + */ + resolve(prefix) { + var _a, _b; + let uri = this.topNS[prefix]; + if (uri !== void 0) { + return uri; + } + const { tags } = this; + for (let index = tags.length - 1; index >= 0; index--) { + uri = tags[index].ns[prefix]; + if (uri !== void 0) { + return uri; + } + } + uri = this.ns[prefix]; + if (uri !== void 0) { + return uri; + } + return (_b = (_a = this.opt).resolvePrefix) === null || _b === void 0 ? void 0 : _b.call(_a, prefix); + } + /** + * Parse a qname into its prefix and local name parts. + * + * @param name The name to parse + * + * @returns + */ + qname(name) { + const colon = name.indexOf(":"); + if (colon === -1) { + return { prefix: "", local: name }; + } + const local = name.slice(colon + 1); + const prefix = name.slice(0, colon); + if (prefix === "" || local === "" || local.includes(":")) { + this.fail(`malformed name: ${name}.`); + } + return { prefix, local }; + } + processAttribsNS() { + var _a; + const { attribList } = this; + const tag = this.tag; + { + const { prefix, local } = this.qname(tag.name); + tag.prefix = prefix; + tag.local = local; + const uri = tag.uri = (_a = this.resolve(prefix)) !== null && _a !== void 0 ? _a : ""; + if (prefix !== "") { + if (prefix === "xmlns") { + this.fail('tags may not have "xmlns" as prefix.'); + } + if (uri === "") { + this.fail(`unbound namespace prefix: ${JSON.stringify(prefix)}.`); + tag.uri = prefix; + } + } + } + if (attribList.length === 0) { + return; + } + const { attributes } = tag; + const seen = /* @__PURE__ */ new Set(); + for (const attr of attribList) { + const { name, prefix, local } = attr; + let uri; + let eqname; + if (prefix === "") { + uri = name === "xmlns" ? XMLNS_NAMESPACE : ""; + eqname = name; + } else { + uri = this.resolve(prefix); + if (uri === void 0) { + this.fail(`unbound namespace prefix: ${JSON.stringify(prefix)}.`); + uri = prefix; + } + eqname = `{${uri}}${local}`; + } + if (seen.has(eqname)) { + this.fail(`duplicate attribute: ${eqname}.`); + } + seen.add(eqname); + attr.uri = uri; + attributes[name] = attr; + } + this.attribList = []; + } + processAttribsPlain() { + const { attribList } = this; + const attributes = this.tag.attributes; + for (const { name, value } of attribList) { + if (attributes[name] !== void 0) { + this.fail(`duplicate attribute: ${name}.`); + } + attributes[name] = value; + } + this.attribList = []; + } + /** + * Handle a complete open tag. This parser code calls this once it has seen + * the whole tag. This method checks for well-formeness and then emits + * ``onopentag``. + */ + openTag() { + var _a; + this.processAttribs(); + const { tags } = this; + const tag = this.tag; + tag.isSelfClosing = false; + (_a = this.openTagHandler) === null || _a === void 0 ? void 0 : _a.call(this, tag); + tags.push(tag); + this.state = S_TEXT; + this.name = ""; + } + /** + * Handle a complete self-closing tag. This parser code calls this once it has + * seen the whole tag. This method checks for well-formeness and then emits + * ``onopentag`` and ``onclosetag``. + */ + openSelfClosingTag() { + var _a, _b, _c; + this.processAttribs(); + const { tags } = this; + const tag = this.tag; + tag.isSelfClosing = true; + (_a = this.openTagHandler) === null || _a === void 0 ? void 0 : _a.call(this, tag); + (_b = this.closeTagHandler) === null || _b === void 0 ? void 0 : _b.call(this, tag); + const top = this.tag = (_c = tags[tags.length - 1]) !== null && _c !== void 0 ? _c : null; + if (top === null) { + this.closedRoot = true; + } + this.state = S_TEXT; + this.name = ""; + } + /** + * Handle a complete close tag. This parser code calls this once it has seen + * the whole tag. This method checks for well-formeness and then emits + * ``onclosetag``. + */ + closeTag() { + const { tags, name } = this; + this.state = S_TEXT; + this.name = ""; + if (name === "") { + this.fail("weird empty close tag."); + this.text += ""; + return; + } + const handler = this.closeTagHandler; + let l2 = tags.length; + while (l2-- > 0) { + const tag = this.tag = tags.pop(); + this.topNS = tag.ns; + handler === null || handler === void 0 ? void 0 : handler(tag); + if (tag.name === name) { + break; + } + this.fail("unexpected close tag."); + } + if (l2 === 0) { + this.closedRoot = true; + } else if (l2 < 0) { + this.fail(`unmatched closing tag: ${name}.`); + this.text += ``; + } + } + /** + * Resolves an entity. Makes any necessary well-formedness checks. + * + * @param entity The entity to resolve. + * + * @returns The parsed entity. + */ + parseEntity(entity) { + if (entity[0] !== "#") { + const defined = this.ENTITIES[entity]; + if (defined !== void 0) { + return defined; + } + this.fail(this.isName(entity) ? "undefined entity." : "disallowed character in entity name."); + return `&${entity};`; + } + let num = NaN; + if (entity[1] === "x" && /^#x[0-9a-f]+$/i.test(entity)) { + num = parseInt(entity.slice(2), 16); + } else if (/^#[0-9]+$/.test(entity)) { + num = parseInt(entity.slice(1), 10); + } + if (!this.isChar(num)) { + this.fail("malformed character entity."); + return `&${entity};`; + } + return String.fromCodePoint(num); + } + }; + exports2.SaxesParser = SaxesParser; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/parse-sax.js +var require_parse_sax = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/parse-sax.js"(exports2, module2) { + var { SaxesParser } = require_saxes(); + var { PassThrough } = require_readable(); + var { bufferToString } = require_browser_buffer_decode(); + module2.exports = async function* (iterable) { + if (iterable.pipe && !iterable[Symbol.asyncIterator]) { + iterable = iterable.pipe(new PassThrough()); + } + const saxesParser = new SaxesParser(); + let error; + saxesParser.on("error", (err) => { + error = err; + }); + let events = []; + saxesParser.on("opentag", (value) => events.push({ eventType: "opentag", value })); + saxesParser.on("text", (value) => events.push({ eventType: "text", value })); + saxesParser.on("closetag", (value) => events.push({ eventType: "closetag", value })); + for await (const chunk of iterable) { + saxesParser.write(bufferToString(chunk)); + if (error) throw error; + yield events; + events = []; + } + }; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/base-xform.js +var require_base_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/base-xform.js"(exports2, module2) { + var parseSax = require_parse_sax(); + var XmlStream = require_xml_stream(); + var BaseXform = class _BaseXform { + // constructor(/* model, name */) {} + // ============================================================ + // Virtual Interface + prepare() { + } + render() { + } + parseOpen(node) { + } + parseText(text) { + } + parseClose(name) { + } + reconcile(model, options) { + } + // ============================================================ + reset() { + this.model = null; + if (this.map) { + Object.values(this.map).forEach((xform) => { + if (xform instanceof _BaseXform) { + xform.reset(); + } else if (xform.xform) { + xform.xform.reset(); + } + }); + } + } + mergeModel(obj2) { + this.model = Object.assign(this.model || {}, obj2); + } + async parse(saxParser) { + for await (const events of saxParser) { + for (const { eventType, value } of events) { + if (eventType === "opentag") { + this.parseOpen(value); + } else if (eventType === "text") { + this.parseText(value); + } else if (eventType === "closetag") { + if (!this.parseClose(value.name)) { + return this.model; + } + } + } + } + return this.model; + } + async parseStream(stream) { + return this.parse(parseSax(stream)); + } + get xml() { + return this.toXml(this.model); + } + toXml(model) { + const xmlStream = new XmlStream(); + this.render(xmlStream, model); + return xmlStream.xml; + } + // ============================================================ + // Useful Utilities + static toAttribute(value, dflt, always = false) { + if (value === void 0) { + if (always) { + return dflt; + } + } else if (always || value !== dflt) { + return value.toString(); + } + return void 0; + } + static toStringAttribute(value, dflt, always = false) { + return _BaseXform.toAttribute(value, dflt, always); + } + static toStringValue(attr, dflt) { + return attr === void 0 ? dflt : attr; + } + static toBoolAttribute(value, dflt, always = false) { + if (value === void 0) { + if (always) { + return dflt; + } + } else if (always || value !== dflt) { + return value ? "1" : "0"; + } + return void 0; + } + static toBoolValue(attr, dflt) { + return attr === void 0 ? dflt : attr === "1"; + } + static toIntAttribute(value, dflt, always = false) { + return _BaseXform.toAttribute(value, dflt, always); + } + static toIntValue(attr, dflt) { + return attr === void 0 ? dflt : parseInt(attr, 10); + } + static toFloatAttribute(value, dflt, always = false) { + return _BaseXform.toAttribute(value, dflt, always); + } + static toFloatValue(attr, dflt) { + return attr === void 0 ? dflt : parseFloat(attr); + } + }; + module2.exports = BaseXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/static-xform.js +var require_static_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/static-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var XmlStream = require_xml_stream(); + function build(xmlStream, model) { + xmlStream.openNode(model.tag, model.$); + if (model.c) { + model.c.forEach((child) => { + build(xmlStream, child); + }); + } + if (model.t) { + xmlStream.writeText(model.t); + } + xmlStream.closeNode(); + } + var StaticXform = class extends BaseXform { + constructor(model) { + super(); + this._model = model; + } + render(xmlStream) { + if (!this._xml) { + const stream = new XmlStream(); + build(stream, this._model); + this._xml = stream.xml; + } + xmlStream.writeXml(this._xml); + } + parseOpen() { + return true; + } + parseText() { + } + parseClose(name) { + switch (name) { + case this._model.tag: + return false; + default: + return true; + } + } + }; + module2.exports = StaticXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/list-xform.js +var require_list_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/list-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var ListXform = class extends BaseXform { + constructor(options) { + super(); + this.tag = options.tag; + this.always = !!options.always; + this.count = options.count; + this.empty = options.empty; + this.$count = options.$count || "count"; + this.$ = options.$; + this.childXform = options.childXform; + this.maxItems = options.maxItems; + } + prepare(model, options) { + const { childXform } = this; + if (model) { + model.forEach((childModel, index) => { + options.index = index; + childXform.prepare(childModel, options); + }); + } + } + render(xmlStream, model) { + if (this.always || model && model.length) { + xmlStream.openNode(this.tag, this.$); + if (this.count) { + xmlStream.addAttribute(this.$count, model && model.length || 0); + } + const { childXform } = this; + (model || []).forEach((childModel, index) => { + childXform.render(xmlStream, childModel, index); + }); + xmlStream.closeNode(); + } else if (this.empty) { + xmlStream.leafNode(this.tag); + } + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.model = []; + return true; + default: + if (this.childXform.parseOpen(node)) { + this.parser = this.childXform; + return true; + } + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.push(this.parser.model); + this.parser = void 0; + if (this.maxItems && this.model.length > this.maxItems) { + throw new Error(`Max ${this.childXform.tag} count (${this.maxItems}) exceeded`); + } + } + return true; + } + return false; + } + reconcile(model, options) { + if (model) { + const { childXform } = this; + model.forEach((childModel) => { + childXform.reconcile(childModel, options); + }); + } + } + }; + module2.exports = ListXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/color-xform.js +var require_color_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/color-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var ColorXform = class extends BaseXform { + constructor(name) { + super(); + this.name = name || "color"; + } + get tag() { + return this.name; + } + render(xmlStream, model) { + if (model) { + xmlStream.openNode(this.name); + if (model.argb) { + xmlStream.addAttribute("rgb", model.argb); + } else if (model.theme !== void 0) { + xmlStream.addAttribute("theme", model.theme); + if (model.tint !== void 0) { + xmlStream.addAttribute("tint", model.tint); + } + } else if (model.indexed !== void 0) { + xmlStream.addAttribute("indexed", model.indexed); + } else { + xmlStream.addAttribute("auto", "1"); + } + xmlStream.closeNode(); + return true; + } + return false; + } + parseOpen(node) { + if (node.name === this.name) { + if (node.attributes.rgb) { + this.model = { argb: node.attributes.rgb }; + } else if (node.attributes.theme) { + this.model = { theme: parseInt(node.attributes.theme, 10) }; + if (node.attributes.tint) { + this.model.tint = parseFloat(node.attributes.tint); + } + } else if (node.attributes.indexed) { + this.model = { indexed: parseInt(node.attributes.indexed, 10) }; + } else { + this.model = void 0; + } + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = ColorXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/simple/boolean-xform.js +var require_boolean_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/simple/boolean-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var BooleanXform = class extends BaseXform { + constructor(options) { + super(); + this.tag = options.tag; + this.attr = options.attr; + } + render(xmlStream, model) { + if (model) { + xmlStream.openNode(this.tag); + xmlStream.closeNode(); + } + } + parseOpen(node) { + if (node.name === this.tag) { + this.model = true; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = BooleanXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/simple/integer-xform.js +var require_integer_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/simple/integer-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var IntegerXform = class extends BaseXform { + constructor(options) { + super(); + this.tag = options.tag; + this.attr = options.attr; + this.attrs = options.attrs; + this.zero = options.zero; + } + render(xmlStream, model) { + if (model || this.zero) { + xmlStream.openNode(this.tag); + if (this.attrs) { + xmlStream.addAttributes(this.attrs); + } + if (this.attr) { + xmlStream.addAttribute(this.attr, model); + } else { + xmlStream.writeText(model); + } + xmlStream.closeNode(); + } + } + parseOpen(node) { + if (node.name === this.tag) { + if (this.attr) { + this.model = parseInt(node.attributes[this.attr], 10); + } else { + this.text = []; + } + return true; + } + return false; + } + parseText(text) { + if (!this.attr) { + this.text.push(text); + } + } + parseClose() { + if (!this.attr) { + this.model = parseInt(this.text.join("") || 0, 10); + } + return false; + } + }; + module2.exports = IntegerXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/simple/string-xform.js +var require_string_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/simple/string-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var StringXform = class extends BaseXform { + constructor(options) { + super(); + this.tag = options.tag; + this.attr = options.attr; + this.attrs = options.attrs; + } + render(xmlStream, model) { + if (model !== void 0) { + xmlStream.openNode(this.tag); + if (this.attrs) { + xmlStream.addAttributes(this.attrs); + } + if (this.attr) { + xmlStream.addAttribute(this.attr, model); + } else { + xmlStream.writeText(model); + } + xmlStream.closeNode(); + } + } + parseOpen(node) { + if (node.name === this.tag) { + if (this.attr) { + this.model = node.attributes[this.attr]; + } else { + this.text = []; + } + } + } + parseText(text) { + if (!this.attr) { + this.text.push(text); + } + } + parseClose() { + if (!this.attr) { + this.model = this.text.join(""); + } + return false; + } + }; + module2.exports = StringXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/underline-xform.js +var require_underline_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/underline-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var UnderlineXform = class _UnderlineXform extends BaseXform { + constructor(model) { + super(); + this.model = model; + } + get tag() { + return "u"; + } + render(xmlStream, model) { + model = model || this.model; + if (model === true) { + xmlStream.leafNode("u"); + } else { + const attr = _UnderlineXform.Attributes[model]; + if (attr) { + xmlStream.leafNode("u", attr); + } + } + } + parseOpen(node) { + if (node.name === "u") { + this.model = node.attributes.val || true; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + UnderlineXform.Attributes = { + single: {}, + double: { val: "double" }, + singleAccounting: { val: "singleAccounting" }, + doubleAccounting: { val: "doubleAccounting" } + }; + module2.exports = UnderlineXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/font-xform.js +var require_font_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/font-xform.js"(exports2, module2) { + "use strict"; + var ColorXform = require_color_xform(); + var BooleanXform = require_boolean_xform(); + var IntegerXform = require_integer_xform(); + var StringXform = require_string_xform(); + var UnderlineXform = require_underline_xform(); + var _2 = require_under_dash(); + var BaseXform = require_base_xform(); + var FontXform = class _FontXform extends BaseXform { + constructor(options) { + super(); + this.options = options || _FontXform.OPTIONS; + this.map = { + b: { prop: "bold", xform: new BooleanXform({ tag: "b", attr: "val" }) }, + i: { prop: "italic", xform: new BooleanXform({ tag: "i", attr: "val" }) }, + u: { prop: "underline", xform: new UnderlineXform() }, + charset: { prop: "charset", xform: new IntegerXform({ tag: "charset", attr: "val" }) }, + color: { prop: "color", xform: new ColorXform() }, + condense: { prop: "condense", xform: new BooleanXform({ tag: "condense", attr: "val" }) }, + extend: { prop: "extend", xform: new BooleanXform({ tag: "extend", attr: "val" }) }, + family: { prop: "family", xform: new IntegerXform({ tag: "family", attr: "val" }) }, + outline: { prop: "outline", xform: new BooleanXform({ tag: "outline", attr: "val" }) }, + vertAlign: { prop: "vertAlign", xform: new StringXform({ tag: "vertAlign", attr: "val" }) }, + scheme: { prop: "scheme", xform: new StringXform({ tag: "scheme", attr: "val" }) }, + shadow: { prop: "shadow", xform: new BooleanXform({ tag: "shadow", attr: "val" }) }, + strike: { prop: "strike", xform: new BooleanXform({ tag: "strike", attr: "val" }) }, + sz: { prop: "size", xform: new IntegerXform({ tag: "sz", attr: "val" }) } + }; + this.map[this.options.fontNameTag] = { + prop: "name", + xform: new StringXform({ tag: this.options.fontNameTag, attr: "val" }) + }; + } + get tag() { + return this.options.tagName; + } + render(xmlStream, model) { + const { map } = this; + xmlStream.openNode(this.options.tagName); + _2.each(this.map, (defn, tag) => { + map[tag].xform.render(xmlStream, model[defn.prop]); + }); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + if (this.map[node.name]) { + this.parser = this.map[node.name].xform; + return this.parser.parseOpen(node); + } + switch (node.name) { + case this.options.tagName: + this.model = {}; + return true; + default: + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser && !this.parser.parseClose(name)) { + const item = this.map[name]; + if (this.parser.model) { + this.model[item.prop] = this.parser.model; + } + this.parser = void 0; + return true; + } + switch (name) { + case this.options.tagName: + return false; + default: + return true; + } + } + }; + FontXform.OPTIONS = { + tagName: "font", + fontNameTag: "name" + }; + module2.exports = FontXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/fill-xform.js +var require_fill_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/fill-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var ColorXform = require_color_xform(); + var StopXform = class extends BaseXform { + constructor() { + super(); + this.map = { + color: new ColorXform() + }; + } + get tag() { + return "stop"; + } + render(xmlStream, model) { + xmlStream.openNode("stop"); + xmlStream.addAttribute("position", model.position); + this.map.color.render(xmlStream, model.color); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "stop": + this.model = { + position: parseFloat(node.attributes.position) + }; + return true; + case "color": + this.parser = this.map.color; + this.parser.parseOpen(node); + return true; + default: + return false; + } + } + parseText() { + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.color = this.parser.model; + this.parser = void 0; + } + return true; + } + return false; + } + }; + var PatternFillXform = class extends BaseXform { + constructor() { + super(); + this.map = { + fgColor: new ColorXform("fgColor"), + bgColor: new ColorXform("bgColor") + }; + } + get name() { + return "pattern"; + } + get tag() { + return "patternFill"; + } + render(xmlStream, model) { + xmlStream.openNode("patternFill"); + xmlStream.addAttribute("patternType", model.pattern); + if (model.fgColor) { + this.map.fgColor.render(xmlStream, model.fgColor); + } + if (model.bgColor) { + this.map.bgColor.render(xmlStream, model.bgColor); + } + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "patternFill": + this.model = { + type: "pattern", + pattern: node.attributes.patternType + }; + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + if (this.parser.model) { + this.model[name] = this.parser.model; + } + this.parser = void 0; + } + return true; + } + return false; + } + }; + var GradientFillXform = class extends BaseXform { + constructor() { + super(); + this.map = { + stop: new StopXform() + }; + } + get name() { + return "gradient"; + } + get tag() { + return "gradientFill"; + } + render(xmlStream, model) { + xmlStream.openNode("gradientFill"); + switch (model.gradient) { + case "angle": + xmlStream.addAttribute("degree", model.degree); + break; + case "path": + xmlStream.addAttribute("type", "path"); + if (model.center.left) { + xmlStream.addAttribute("left", model.center.left); + if (model.center.right === void 0) { + xmlStream.addAttribute("right", model.center.left); + } + } + if (model.center.right) { + xmlStream.addAttribute("right", model.center.right); + } + if (model.center.top) { + xmlStream.addAttribute("top", model.center.top); + if (model.center.bottom === void 0) { + xmlStream.addAttribute("bottom", model.center.top); + } + } + if (model.center.bottom) { + xmlStream.addAttribute("bottom", model.center.bottom); + } + break; + default: + break; + } + const stopXform = this.map.stop; + model.stops.forEach((stopModel) => { + stopXform.render(xmlStream, stopModel); + }); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "gradientFill": { + const model = this.model = { + stops: [] + }; + if (node.attributes.degree) { + model.gradient = "angle"; + model.degree = parseInt(node.attributes.degree, 10); + } else if (node.attributes.type === "path") { + model.gradient = "path"; + model.center = { + left: node.attributes.left ? parseFloat(node.attributes.left) : 0, + top: node.attributes.top ? parseFloat(node.attributes.top) : 0 + }; + if (node.attributes.right !== node.attributes.left) { + model.center.right = node.attributes.right ? parseFloat(node.attributes.right) : 0; + } + if (node.attributes.bottom !== node.attributes.top) { + model.center.bottom = node.attributes.bottom ? parseFloat(node.attributes.bottom) : 0; + } + } + return true; + } + case "stop": + this.parser = this.map.stop; + this.parser.parseOpen(node); + return true; + default: + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.stops.push(this.parser.model); + this.parser = void 0; + } + return true; + } + return false; + } + }; + var FillXform = class _FillXform extends BaseXform { + constructor() { + super(); + this.map = { + patternFill: new PatternFillXform(), + gradientFill: new GradientFillXform() + }; + } + get tag() { + return "fill"; + } + render(xmlStream, model) { + xmlStream.addRollback(); + xmlStream.openNode("fill"); + switch (model.type) { + case "pattern": + this.map.patternFill.render(xmlStream, model); + break; + case "gradient": + this.map.gradientFill.render(xmlStream, model); + break; + default: + xmlStream.rollback(); + return; + } + xmlStream.closeNode(); + xmlStream.commit(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "fill": + this.model = {}; + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model = this.parser.model; + this.model.type = this.parser.name; + this.parser = void 0; + } + return true; + } + return false; + } + validStyle(value) { + return _FillXform.validPatternValues[value]; + } + }; + FillXform.validPatternValues = [ + "none", + "solid", + "darkVertical", + "darkGray", + "mediumGray", + "lightGray", + "gray125", + "gray0625", + "darkHorizontal", + "darkVertical", + "darkDown", + "darkUp", + "darkGrid", + "darkTrellis", + "lightHorizontal", + "lightVertical", + "lightDown", + "lightUp", + "lightGrid", + "lightTrellis", + "lightGrid" + ].reduce((p, v) => { + p[v] = true; + return p; + }, {}); + FillXform.StopXform = StopXform; + FillXform.PatternFillXform = PatternFillXform; + FillXform.GradientFillXform = GradientFillXform; + module2.exports = FillXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/border-xform.js +var require_border_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/border-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var utils = require_utils21(); + var ColorXform = require_color_xform(); + var EdgeXform = class _EdgeXform extends BaseXform { + constructor(name) { + super(); + this.name = name; + this.map = { + color: new ColorXform() + }; + } + get tag() { + return this.name; + } + render(xmlStream, model, defaultColor) { + const color = model && model.color || defaultColor || this.defaultColor; + xmlStream.openNode(this.name); + if (model && model.style) { + xmlStream.addAttribute("style", model.style); + if (color) { + this.map.color.render(xmlStream, color); + } + } + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.name: { + const { style } = node.attributes; + if (style) { + this.model = { + style + }; + } else { + this.model = void 0; + } + return true; + } + case "color": + this.parser = this.map.color; + this.parser.parseOpen(node); + return true; + default: + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + if (name === this.name) { + if (this.map.color.model) { + if (!this.model) { + this.model = {}; + } + this.model.color = this.map.color.model; + } + } + return false; + } + validStyle(value) { + return _EdgeXform.validStyleValues[value]; + } + }; + EdgeXform.validStyleValues = [ + "thin", + "dashed", + "dotted", + "dashDot", + "hair", + "dashDotDot", + "slantDashDot", + "mediumDashed", + "mediumDashDotDot", + "mediumDashDot", + "medium", + "double", + "thick" + ].reduce((p, v) => { + p[v] = true; + return p; + }, {}); + var BorderXform = class extends BaseXform { + constructor() { + super(); + this.map = { + top: new EdgeXform("top"), + left: new EdgeXform("left"), + bottom: new EdgeXform("bottom"), + right: new EdgeXform("right"), + diagonal: new EdgeXform("diagonal") + }; + } + render(xmlStream, model) { + const { color } = model; + xmlStream.openNode("border"); + if (model.diagonal && model.diagonal.style) { + if (model.diagonal.up) { + xmlStream.addAttribute("diagonalUp", "1"); + } + if (model.diagonal.down) { + xmlStream.addAttribute("diagonalDown", "1"); + } + } + function add(edgeModel, edgeXform) { + if (edgeModel && !edgeModel.color && model.color) { + edgeModel = { + ...edgeModel, + color: model.color + }; + } + edgeXform.render(xmlStream, edgeModel, color); + } + add(model.left, this.map.left); + add(model.right, this.map.right); + add(model.top, this.map.top); + add(model.bottom, this.map.bottom); + add(model.diagonal, this.map.diagonal); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "border": + this.reset(); + this.diagonalUp = utils.parseBoolean(node.attributes.diagonalUp); + this.diagonalDown = utils.parseBoolean(node.attributes.diagonalDown); + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + if (name === "border") { + const model = this.model = {}; + const add = function(key, edgeModel, extensions) { + if (edgeModel) { + if (extensions) { + Object.assign(edgeModel, extensions); + } + model[key] = edgeModel; + } + }; + add("left", this.map.left.model); + add("right", this.map.right.model); + add("top", this.map.top.model); + add("bottom", this.map.bottom.model); + add("diagonal", this.map.diagonal.model, { up: this.diagonalUp, down: this.diagonalDown }); + } + return false; + } + }; + module2.exports = BorderXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/defaultnumformats.js +var require_defaultnumformats = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/defaultnumformats.js"(exports2, module2) { + module2.exports = { + 0: { f: "General" }, + 1: { f: "0" }, + 2: { f: "0.00" }, + 3: { f: "#,##0" }, + 4: { f: "#,##0.00" }, + 9: { f: "0%" }, + 10: { f: "0.00%" }, + 11: { f: "0.00E+00" }, + 12: { f: "# ?/?" }, + 13: { f: "# ??/??" }, + 14: { f: "mm-dd-yy" }, + 15: { f: "d-mmm-yy" }, + 16: { f: "d-mmm" }, + 17: { f: "mmm-yy" }, + 18: { f: "h:mm AM/PM" }, + 19: { f: "h:mm:ss AM/PM" }, + 20: { f: "h:mm" }, + 21: { f: "h:mm:ss" }, + 22: { f: 'm/d/yy "h":mm' }, + 27: { + "zh-tw": "[$-404]e/m/d", + "zh-cn": 'yyyy"\u5E74"m"\u6708"', + "ja-jp": "[$-411]ge.m.d", + "ko-kr": 'yyyy"\u5E74" mm"\u6708" dd"\u65E5"' + }, + 28: { + "zh-tw": '[$-404]e"\u5E74"m"\u6708"d"\u65E5"', + "zh-cn": 'm"\u6708"d"\u65E5"', + "ja-jp": '[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"', + "ko-kr": "mm-dd" + }, + 29: { + "zh-tw": '[$-404]e"\u5E74"m"\u6708"d"\u65E5"', + "zh-cn": 'm"\u6708"d"\u65E5"', + "ja-jp": '[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"', + "ko-kr": "mm-dd" + }, + 30: { "zh-tw": "m/d/yy ", "zh-cn": "m-d-yy", "ja-jp": "m/d/yy", "ko-kr": "mm-dd-yy" }, + 31: { + "zh-tw": 'yyyy"\u5E74"m"\u6708"d"\u65E5"', + "zh-cn": 'yyyy"\u5E74"m"\u6708"d"\u65E5"', + "ja-jp": 'yyyy"\u5E74"m"\u6708"d"\u65E5"', + "ko-kr": 'yyyy"\uB144" mm"\uC6D4" dd"\uC77C"' + }, + 32: { + "zh-tw": 'hh"\u6642"mm"\u5206"', + "zh-cn": 'h"\u65F6"mm"\u5206"', + "ja-jp": 'h"\u6642"mm"\u5206"', + "ko-kr": 'h"\uC2DC" mm"\uBD84"' + }, + 33: { + "zh-tw": 'hh"\u6642"mm"\u5206"ss"\u79D2"', + "zh-cn": 'h"\u65F6"mm"\u5206"ss"\u79D2"', + "ja-jp": 'h"\u6642"mm"\u5206"ss"\u79D2"', + "ko-kr": 'h"\uC2DC" mm"\uBD84" ss"\uCD08"' + }, + 34: { + "zh-tw": '\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"', + "zh-cn": '\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"', + "ja-jp": 'yyyy"\u5E74"m"\u6708"', + "ko-kr": "yyyy-mm-dd" + }, + 35: { + "zh-tw": '\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"', + "zh-cn": '\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"', + "ja-jp": 'm"\u6708"d"\u65E5"', + "ko-kr": "yyyy-mm-dd" + }, + 36: { + "zh-tw": "[$-404]e/m/d", + "zh-cn": 'yyyy"\u5E74"m"\u6708"', + "ja-jp": "[$-411]ge.m.d", + "ko-kr": 'yyyy"\u5E74" mm"\u6708" dd"\u65E5"' + }, + 37: { f: "#,##0 ;(#,##0)" }, + 38: { f: "#,##0 ;[Red](#,##0)" }, + 39: { f: "#,##0.00 ;(#,##0.00)" }, + 40: { f: "#,##0.00 ;[Red](#,##0.00)" }, + 45: { f: "mm:ss" }, + 46: { f: "[h]:mm:ss" }, + 47: { f: "mmss.0" }, + 48: { f: "##0.0E+0" }, + 49: { f: "@" }, + 50: { + "zh-tw": "[$-404]e/m/d", + "zh-cn": 'yyyy"\u5E74"m"\u6708"', + "ja-jp": "[$-411]ge.m.d", + "ko-kr": 'yyyy"\u5E74" mm"\u6708" dd"\u65E5"' + }, + 51: { + "zh-tw": '[$-404]e"\u5E74"m"\u6708"d"\u65E5"', + "zh-cn": 'm"\u6708"d"\u65E5"', + "ja-jp": '[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"', + "ko-kr": "mm-dd" + }, + 52: { + "zh-tw": '\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"', + "zh-cn": 'yyyy"\u5E74"m"\u6708"', + "ja-jp": 'yyyy"\u5E74"m"\u6708"', + "ko-kr": "yyyy-mm-dd" + }, + 53: { + "zh-tw": '\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"', + "zh-cn": 'm"\u6708"d"\u65E5"', + "ja-jp": 'm"\u6708"d"\u65E5"', + "ko-kr": "yyyy-mm-dd" + }, + 54: { + "zh-tw": '[$-404]e"\u5E74"m"\u6708"d"\u65E5"', + "zh-cn": 'm"\u6708"d"\u65E5"', + "ja-jp": '[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"', + "ko-kr": "mm-dd" + }, + 55: { + "zh-tw": '\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"', + "zh-cn": '\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"', + "ja-jp": 'yyyy"\u5E74"m"\u6708"', + "ko-kr": "yyyy-mm-dd" + }, + 56: { + "zh-tw": '\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"', + "zh-cn": '\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"', + "ja-jp": 'm"\u6708"d"\u65E5"', + "ko-kr": "yyyy-mm-dd" + }, + 57: { + "zh-tw": "[$-404]e/m/d", + "zh-cn": 'yyyy"\u5E74"m"\u6708"', + "ja-jp": "[$-411]ge.m.d", + "ko-kr": 'yyyy"\u5E74" mm"\u6708" dd"\u65E5"' + }, + 58: { + "zh-tw": '[$-404]e"\u5E74"m"\u6708"d"\u65E5"', + "zh-cn": 'm"\u6708"d"\u65E5"', + "ja-jp": '[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"', + "ko-kr": "mm-dd" + }, + 59: { "th-th": "t0" }, + 60: { "th-th": "t0.00" }, + 61: { "th-th": "t#,##0" }, + 62: { "th-th": "t#,##0.00" }, + 67: { "th-th": "t0%" }, + 68: { "th-th": "t0.00%" }, + 69: { "th-th": "t# ?/?" }, + 70: { "th-th": "t# ??/??" }, + 81: { "th-th": "d/m/bb" } + }; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/numfmt-xform.js +var require_numfmt_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/numfmt-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var defaultNumFormats = require_defaultnumformats(); + var BaseXform = require_base_xform(); + function hashDefaultFormats() { + const hash = {}; + _2.each(defaultNumFormats, (dnf, id) => { + if (dnf.f) { + hash[dnf.f] = parseInt(id, 10); + } + }); + return hash; + } + var defaultFmtHash = hashDefaultFormats(); + var NumFmtXform = class extends BaseXform { + constructor(id, formatCode) { + super(); + this.id = id; + this.formatCode = formatCode; + } + get tag() { + return "numFmt"; + } + render(xmlStream, model) { + xmlStream.leafNode("numFmt", { numFmtId: model.id, formatCode: model.formatCode }); + } + parseOpen(node) { + switch (node.name) { + case "numFmt": + this.model = { + id: parseInt(node.attributes.numFmtId, 10), + formatCode: node.attributes.formatCode.replace(/[\\](.)/g, "$1") + }; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + NumFmtXform.getDefaultFmtId = function getDefaultFmtId(formatCode) { + return defaultFmtHash[formatCode]; + }; + NumFmtXform.getDefaultFmtCode = function getDefaultFmtCode(numFmtId) { + return defaultNumFormats[numFmtId] && defaultNumFormats[numFmtId].f; + }; + module2.exports = NumFmtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/alignment-xform.js +var require_alignment_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/alignment-xform.js"(exports2, module2) { + var Enums = require_enums5(); + var utils = require_utils21(); + var BaseXform = require_base_xform(); + var validation = { + horizontalValues: [ + "left", + "center", + "right", + "fill", + "centerContinuous", + "distributed", + "justify" + ].reduce((p, v) => { + p[v] = true; + return p; + }, {}), + horizontal(value) { + return this.horizontalValues[value] ? value : void 0; + }, + verticalValues: ["top", "middle", "bottom", "distributed", "justify"].reduce((p, v) => { + p[v] = true; + return p; + }, {}), + vertical(value) { + if (value === "middle") return "center"; + return this.verticalValues[value] ? value : void 0; + }, + wrapText(value) { + return value ? true : void 0; + }, + shrinkToFit(value) { + return value ? true : void 0; + }, + textRotation(value) { + switch (value) { + case "vertical": + return value; + default: + value = utils.validInt(value); + return value >= -90 && value <= 90 ? value : void 0; + } + }, + indent(value) { + value = utils.validInt(value); + return Math.max(0, value); + }, + readingOrder(value) { + switch (value) { + case "ltr": + return Enums.ReadingOrder.LeftToRight; + case "rtl": + return Enums.ReadingOrder.RightToLeft; + default: + return void 0; + } + } + }; + var textRotationXform = { + toXml(textRotation) { + textRotation = validation.textRotation(textRotation); + if (textRotation) { + if (textRotation === "vertical") { + return 255; + } + const tr = Math.round(textRotation); + if (tr >= 0 && tr <= 90) { + return tr; + } + if (tr < 0 && tr >= -90) { + return 90 - tr; + } + } + return void 0; + }, + toModel(textRotation) { + const tr = utils.validInt(textRotation); + if (tr !== void 0) { + if (tr === 255) { + return "vertical"; + } + if (tr >= 0 && tr <= 90) { + return tr; + } + if (tr > 90 && tr <= 180) { + return 90 - tr; + } + } + return void 0; + } + }; + var AlignmentXform = class extends BaseXform { + get tag() { + return "alignment"; + } + render(xmlStream, model) { + xmlStream.addRollback(); + xmlStream.openNode("alignment"); + let isValid = false; + function add(name, value) { + if (value) { + xmlStream.addAttribute(name, value); + isValid = true; + } + } + add("horizontal", validation.horizontal(model.horizontal)); + add("vertical", validation.vertical(model.vertical)); + add("wrapText", validation.wrapText(model.wrapText) ? "1" : false); + add("shrinkToFit", validation.shrinkToFit(model.shrinkToFit) ? "1" : false); + add("indent", validation.indent(model.indent)); + add("textRotation", textRotationXform.toXml(model.textRotation)); + add("readingOrder", validation.readingOrder(model.readingOrder)); + xmlStream.closeNode(); + if (isValid) { + xmlStream.commit(); + } else { + xmlStream.rollback(); + } + } + parseOpen(node) { + const model = {}; + let valid = false; + function add(truthy, name, value) { + if (truthy) { + model[name] = value; + valid = true; + } + } + add(node.attributes.horizontal, "horizontal", node.attributes.horizontal); + add( + node.attributes.vertical, + "vertical", + node.attributes.vertical === "center" ? "middle" : node.attributes.vertical + ); + add(node.attributes.wrapText, "wrapText", utils.parseBoolean(node.attributes.wrapText)); + add(node.attributes.shrinkToFit, "shrinkToFit", utils.parseBoolean(node.attributes.shrinkToFit)); + add(node.attributes.indent, "indent", parseInt(node.attributes.indent, 10)); + add( + node.attributes.textRotation, + "textRotation", + textRotationXform.toModel(node.attributes.textRotation) + ); + add( + node.attributes.readingOrder, + "readingOrder", + node.attributes.readingOrder === "2" ? "rtl" : "ltr" + ); + this.model = valid ? model : null; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = AlignmentXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/protection-xform.js +var require_protection_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/protection-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var validation = { + boolean(value, dflt) { + if (value === void 0) { + return dflt; + } + return value; + } + }; + var ProtectionXform = class extends BaseXform { + get tag() { + return "protection"; + } + render(xmlStream, model) { + xmlStream.addRollback(); + xmlStream.openNode("protection"); + let isValid = false; + function add(name, value) { + if (value !== void 0) { + xmlStream.addAttribute(name, value); + isValid = true; + } + } + add("locked", validation.boolean(model.locked, true) ? void 0 : "0"); + add("hidden", validation.boolean(model.hidden, false) ? "1" : void 0); + xmlStream.closeNode(); + if (isValid) { + xmlStream.commit(); + } else { + xmlStream.rollback(); + } + } + parseOpen(node) { + const model = { + locked: !(node.attributes.locked === "0"), + hidden: node.attributes.hidden === "1" + }; + const isSignificant = !model.locked || model.hidden; + this.model = isSignificant ? model : null; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = ProtectionXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/style-xform.js +var require_style_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/style-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var AlignmentXform = require_alignment_xform(); + var ProtectionXform = require_protection_xform(); + var StyleXform = class extends BaseXform { + constructor(options) { + super(); + this.xfId = !!(options && options.xfId); + this.map = { + alignment: new AlignmentXform(), + protection: new ProtectionXform() + }; + } + get tag() { + return "xf"; + } + render(xmlStream, model) { + xmlStream.openNode("xf", { + numFmtId: model.numFmtId || 0, + fontId: model.fontId || 0, + fillId: model.fillId || 0, + borderId: model.borderId || 0 + }); + if (this.xfId) { + xmlStream.addAttribute("xfId", model.xfId || 0); + } + if (model.numFmtId) { + xmlStream.addAttribute("applyNumberFormat", "1"); + } + if (model.fontId) { + xmlStream.addAttribute("applyFont", "1"); + } + if (model.fillId) { + xmlStream.addAttribute("applyFill", "1"); + } + if (model.borderId) { + xmlStream.addAttribute("applyBorder", "1"); + } + if (model.alignment) { + xmlStream.addAttribute("applyAlignment", "1"); + } + if (model.protection) { + xmlStream.addAttribute("applyProtection", "1"); + } + if (model.alignment) { + this.map.alignment.render(xmlStream, model.alignment); + } + if (model.protection) { + this.map.protection.render(xmlStream, model.protection); + } + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "xf": + this.model = { + numFmtId: parseInt(node.attributes.numFmtId, 10), + fontId: parseInt(node.attributes.fontId, 10), + fillId: parseInt(node.attributes.fillId, 10), + borderId: parseInt(node.attributes.borderId, 10) + }; + if (this.xfId) { + this.model.xfId = parseInt(node.attributes.xfId, 10); + } + return true; + case "alignment": + this.parser = this.map.alignment; + this.parser.parseOpen(node); + return true; + case "protection": + this.parser = this.map.protection; + this.parser.parseOpen(node); + return true; + default: + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + if (this.map.protection === this.parser) { + this.model.protection = this.parser.model; + } else { + this.model.alignment = this.parser.model; + } + this.parser = void 0; + } + return true; + } + return name !== "xf"; + } + }; + module2.exports = StyleXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/dxf-xform.js +var require_dxf_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/dxf-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var AlignmentXform = require_alignment_xform(); + var BorderXform = require_border_xform(); + var FillXform = require_fill_xform(); + var FontXform = require_font_xform(); + var NumFmtXform = require_numfmt_xform(); + var ProtectionXform = require_protection_xform(); + var DxfXform = class extends BaseXform { + constructor() { + super(); + this.map = { + alignment: new AlignmentXform(), + border: new BorderXform(), + fill: new FillXform(), + font: new FontXform(), + numFmt: new NumFmtXform(), + protection: new ProtectionXform() + }; + } + get tag() { + return "dxf"; + } + // how do we generate dxfid? + render(xmlStream, model) { + xmlStream.openNode(this.tag); + if (model.font) { + this.map.font.render(xmlStream, model.font); + } + if (model.numFmt && model.numFmtId) { + const numFmtModel = { id: model.numFmtId, formatCode: model.numFmt }; + this.map.numFmt.render(xmlStream, numFmtModel); + } + if (model.fill) { + this.map.fill.render(xmlStream, model.fill); + } + if (model.alignment) { + this.map.alignment.render(xmlStream, model.alignment); + } + if (model.border) { + this.map.border.render(xmlStream, model.border); + } + if (model.protection) { + this.map.protection.render(xmlStream, model.protection); + } + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + return true; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + if (name === this.tag) { + this.model = { + alignment: this.map.alignment.model, + border: this.map.border.model, + fill: this.map.fill.model, + font: this.map.font.model, + numFmt: this.map.numFmt.model, + protection: this.map.protection.model + }; + return false; + } + return true; + } + }; + module2.exports = DxfXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/styles-xform.js +var require_styles_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/styles-xform.js"(exports2, module2) { + var Enums = require_enums5(); + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var StaticXform = require_static_xform(); + var ListXform = require_list_xform(); + var FontXform = require_font_xform(); + var FillXform = require_fill_xform(); + var BorderXform = require_border_xform(); + var NumFmtXform = require_numfmt_xform(); + var StyleXform = require_style_xform(); + var DxfXform = require_dxf_xform(); + var NUMFMT_BASE = 164; + var StylesXform = class _StylesXform extends BaseXform { + constructor(initialise) { + super(); + this.map = { + numFmts: new ListXform({ tag: "numFmts", count: true, childXform: new NumFmtXform() }), + fonts: new ListXform({ + tag: "fonts", + count: true, + childXform: new FontXform(), + $: { "x14ac:knownFonts": 1 } + }), + fills: new ListXform({ tag: "fills", count: true, childXform: new FillXform() }), + borders: new ListXform({ tag: "borders", count: true, childXform: new BorderXform() }), + cellStyleXfs: new ListXform({ tag: "cellStyleXfs", count: true, childXform: new StyleXform() }), + cellXfs: new ListXform({ + tag: "cellXfs", + count: true, + childXform: new StyleXform({ xfId: true }) + }), + dxfs: new ListXform({ tag: "dxfs", always: true, count: true, childXform: new DxfXform() }), + // for style manager + numFmt: new NumFmtXform(), + font: new FontXform(), + fill: new FillXform(), + border: new BorderXform(), + style: new StyleXform({ xfId: true }), + cellStyles: _StylesXform.STATIC_XFORMS.cellStyles, + tableStyles: _StylesXform.STATIC_XFORMS.tableStyles, + extLst: _StylesXform.STATIC_XFORMS.extLst + }; + if (initialise) { + this.init(); + } + } + initIndex() { + this.index = { + style: {}, + numFmt: {}, + numFmtNextId: 164, + // start custom format ids here + font: {}, + border: {}, + fill: {} + }; + } + init() { + this.model = { + styles: [], + numFmts: [], + fonts: [], + borders: [], + fills: [], + dxfs: [] + }; + this.initIndex(); + this._addBorder({}); + this._addStyle({ numFmtId: 0, fontId: 0, fillId: 0, borderId: 0, xfId: 0 }); + this._addFill({ type: "pattern", pattern: "none" }); + this._addFill({ type: "pattern", pattern: "gray125" }); + this.weakMap = /* @__PURE__ */ new WeakMap(); + } + render(xmlStream, model) { + model = model || this.model; + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("styleSheet", _StylesXform.STYLESHEET_ATTRIBUTES); + if (this.index) { + if (model.numFmts && model.numFmts.length) { + xmlStream.openNode("numFmts", { count: model.numFmts.length }); + model.numFmts.forEach((numFmtXml) => { + xmlStream.writeXml(numFmtXml); + }); + xmlStream.closeNode(); + } + if (!model.fonts.length) { + this._addFont({ size: 11, color: { theme: 1 }, name: "Calibri", family: 2, scheme: "minor" }); + } + xmlStream.openNode("fonts", { count: model.fonts.length, "x14ac:knownFonts": 1 }); + model.fonts.forEach((fontXml) => { + xmlStream.writeXml(fontXml); + }); + xmlStream.closeNode(); + xmlStream.openNode("fills", { count: model.fills.length }); + model.fills.forEach((fillXml) => { + xmlStream.writeXml(fillXml); + }); + xmlStream.closeNode(); + xmlStream.openNode("borders", { count: model.borders.length }); + model.borders.forEach((borderXml) => { + xmlStream.writeXml(borderXml); + }); + xmlStream.closeNode(); + this.map.cellStyleXfs.render(xmlStream, [{ numFmtId: 0, fontId: 0, fillId: 0, borderId: 0, xfId: 0 }]); + xmlStream.openNode("cellXfs", { count: model.styles.length }); + model.styles.forEach((styleXml) => { + xmlStream.writeXml(styleXml); + }); + xmlStream.closeNode(); + } else { + this.map.numFmts.render(xmlStream, model.numFmts); + this.map.fonts.render(xmlStream, model.fonts); + this.map.fills.render(xmlStream, model.fills); + this.map.borders.render(xmlStream, model.borders); + this.map.cellStyleXfs.render(xmlStream, [{ numFmtId: 0, fontId: 0, fillId: 0, borderId: 0, xfId: 0 }]); + this.map.cellXfs.render(xmlStream, model.styles); + } + _StylesXform.STATIC_XFORMS.cellStyles.render(xmlStream); + this.map.dxfs.render(xmlStream, model.dxfs); + _StylesXform.STATIC_XFORMS.tableStyles.render(xmlStream); + _StylesXform.STATIC_XFORMS.extLst.render(xmlStream); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "styleSheet": + this.initIndex(); + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + return true; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case "styleSheet": { + this.model = {}; + const add = (propName, xform) => { + if (xform.model && xform.model.length) { + this.model[propName] = xform.model; + } + }; + add("numFmts", this.map.numFmts); + add("fonts", this.map.fonts); + add("fills", this.map.fills); + add("borders", this.map.borders); + add("styles", this.map.cellXfs); + add("dxfs", this.map.dxfs); + this.index = { + model: [], + numFmt: [] + }; + if (this.model.numFmts) { + const numFmtIndex = this.index.numFmt; + this.model.numFmts.forEach((numFmt) => { + numFmtIndex[numFmt.id] = numFmt.formatCode; + }); + } + return false; + } + default: + return true; + } + } + // add a cell's style model to the collection + // each style property is processed and cross-referenced, etc. + // the styleId is returned. Note: cellType is used when numFmt not defined + addStyleModel(model, cellType) { + if (!model) { + return 0; + } + if (!this.model.fonts.length) { + this._addFont({ size: 11, color: { theme: 1 }, name: "Calibri", family: 2, scheme: "minor" }); + } + if (this.weakMap && this.weakMap.has(model)) { + return this.weakMap.get(model); + } + const style = {}; + cellType = cellType || Enums.ValueType.Number; + if (model.numFmt) { + style.numFmtId = this._addNumFmtStr(model.numFmt); + } else { + switch (cellType) { + case Enums.ValueType.Number: + style.numFmtId = this._addNumFmtStr("General"); + break; + case Enums.ValueType.Date: + style.numFmtId = this._addNumFmtStr("mm-dd-yy"); + break; + default: + break; + } + } + if (model.font) { + style.fontId = this._addFont(model.font); + } + if (model.border) { + style.borderId = this._addBorder(model.border); + } + if (model.fill) { + style.fillId = this._addFill(model.fill); + } + if (model.alignment) { + style.alignment = model.alignment; + } + if (model.protection) { + style.protection = model.protection; + } + const styleId = this._addStyle(style); + if (this.weakMap) { + this.weakMap.set(model, styleId); + } + return styleId; + } + // given a styleId (i.e. s="n"), get the cell's style model + // objects are shared where possible. + getStyleModel(id) { + const style = this.model.styles[id]; + if (!style) return null; + let model = this.index.model[id]; + if (model) return model; + model = this.index.model[id] = {}; + if (style.numFmtId) { + const numFmt = this.index.numFmt[style.numFmtId] || NumFmtXform.getDefaultFmtCode(style.numFmtId); + if (numFmt) { + model.numFmt = numFmt; + } + } + function addStyle(name, group, styleId) { + if (styleId || styleId === 0) { + const part = group[styleId]; + if (part) { + model[name] = part; + } + } + } + addStyle("font", this.model.fonts, style.fontId); + addStyle("border", this.model.borders, style.borderId); + addStyle("fill", this.model.fills, style.fillId); + if (style.alignment) { + model.alignment = style.alignment; + } + if (style.protection) { + model.protection = style.protection; + } + return model; + } + addDxfStyle(style) { + if (style.numFmt) { + style.numFmtId = this._addNumFmtStr(style.numFmt); + } + this.model.dxfs.push(style); + return this.model.dxfs.length - 1; + } + getDxfStyle(id) { + return this.model.dxfs[id]; + } + // ========================================================================= + // Private Interface + _addStyle(style) { + const xml = this.map.style.toXml(style); + let index = this.index.style[xml]; + if (index === void 0) { + index = this.index.style[xml] = this.model.styles.length; + this.model.styles.push(xml); + } + return index; + } + // ========================================================================= + // Number Formats + _addNumFmtStr(formatCode) { + let index = NumFmtXform.getDefaultFmtId(formatCode); + if (index !== void 0) return index; + index = this.index.numFmt[formatCode]; + if (index !== void 0) return index; + index = this.index.numFmt[formatCode] = NUMFMT_BASE + this.model.numFmts.length; + const xml = this.map.numFmt.toXml({ id: index, formatCode }); + this.model.numFmts.push(xml); + return index; + } + // ========================================================================= + // Fonts + _addFont(font) { + const xml = this.map.font.toXml(font); + let index = this.index.font[xml]; + if (index === void 0) { + index = this.index.font[xml] = this.model.fonts.length; + this.model.fonts.push(xml); + } + return index; + } + // ========================================================================= + // Borders + _addBorder(border) { + const xml = this.map.border.toXml(border); + let index = this.index.border[xml]; + if (index === void 0) { + index = this.index.border[xml] = this.model.borders.length; + this.model.borders.push(xml); + } + return index; + } + // ========================================================================= + // Fills + _addFill(fill) { + const xml = this.map.fill.toXml(fill); + let index = this.index.fill[xml]; + if (index === void 0) { + index = this.index.fill[xml] = this.model.fills.length; + this.model.fills.push(xml); + } + return index; + } + // ========================================================================= + }; + StylesXform.STYLESHEET_ATTRIBUTES = { + xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main", + "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006", + "mc:Ignorable": "x14ac x16r2", + "xmlns:x14ac": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac", + "xmlns:x16r2": "http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" + }; + StylesXform.STATIC_XFORMS = { + cellStyles: new StaticXform({ + tag: "cellStyles", + $: { count: 1 }, + c: [{ tag: "cellStyle", $: { name: "Normal", xfId: 0, builtinId: 0 } }] + }), + dxfs: new StaticXform({ tag: "dxfs", $: { count: 0 } }), + tableStyles: new StaticXform({ + tag: "tableStyles", + $: { count: 0, defaultTableStyle: "TableStyleMedium2", defaultPivotStyle: "PivotStyleLight16" } + }), + extLst: new StaticXform({ + tag: "extLst", + c: [ + { + tag: "ext", + $: { + uri: "{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}", + "xmlns:x14": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" + }, + c: [{ tag: "x14:slicerStyles", $: { defaultSlicerStyle: "SlicerStyleLight1" } }] + }, + { + tag: "ext", + $: { + uri: "{9260A510-F301-46a8-8635-F512D64BE5F5}", + "xmlns:x15": "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" + }, + c: [{ tag: "x15:timelineStyles", $: { defaultTimelineStyle: "TimeSlicerStyleLight1" } }] + } + ] + }) + }; + var StylesXformMock = class extends StylesXform { + constructor() { + super(); + this.model = { + styles: [{ numFmtId: 0, fontId: 0, fillId: 0, borderId: 0, xfId: 0 }], + numFmts: [], + fonts: [{ size: 11, color: { theme: 1 }, name: "Calibri", family: 2, scheme: "minor" }], + borders: [{}], + fills: [ + { type: "pattern", pattern: "none" }, + { type: "pattern", pattern: "gray125" } + ] + }; + } + // ========================================================================= + // Style Manager Interface + // override normal behaviour - consume and dispose + parseStream(stream) { + stream.autodrain(); + return Promise.resolve(); + } + // add a cell's style model to the collection + // each style property is processed and cross-referenced, etc. + // the styleId is returned. Note: cellType is used when numFmt not defined + addStyleModel(model, cellType) { + switch (cellType) { + case Enums.ValueType.Date: + return this.dateStyleId; + default: + return 0; + } + } + get dateStyleId() { + if (!this._dateStyleId) { + const dateStyle = { + numFmtId: NumFmtXform.getDefaultFmtId("mm-dd-yy") + }; + this._dateStyleId = this.model.styles.length; + this.model.styles.push(dateStyle); + } + return this._dateStyleId; + } + // given a styleId (i.e. s="n"), get the cell's style model + // objects are shared where possible. + getStyleModel() { + return {}; + } + }; + StylesXform.Mock = StylesXformMock; + module2.exports = StylesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/simple/date-xform.js +var require_date_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/simple/date-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var DateXform = class extends BaseXform { + constructor(options) { + super(); + this.tag = options.tag; + this.attr = options.attr; + this.attrs = options.attrs; + this._format = options.format || function(dt) { + try { + if (Number.isNaN(dt.getTime())) return ""; + return dt.toISOString(); + } catch (e) { + return ""; + } + }; + this._parse = options.parse || function(str) { + return new Date(str); + }; + } + render(xmlStream, model) { + if (model) { + xmlStream.openNode(this.tag); + if (this.attrs) { + xmlStream.addAttributes(this.attrs); + } + if (this.attr) { + xmlStream.addAttribute(this.attr, this._format(model)); + } else { + xmlStream.writeText(this._format(model)); + } + xmlStream.closeNode(); + } + } + parseOpen(node) { + if (node.name === this.tag) { + if (this.attr) { + this.model = this._parse(node.attributes[this.attr]); + } else { + this.text = []; + } + } + } + parseText(text) { + if (!this.attr) { + this.text.push(text); + } + } + parseClose() { + if (!this.attr) { + this.model = this._parse(this.text.join("")); + } + return false; + } + }; + module2.exports = DateXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/core-xform.js +var require_core_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/core-xform.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var DateXform = require_date_xform(); + var StringXform = require_string_xform(); + var IntegerXform = require_integer_xform(); + var CoreXform = class _CoreXform extends BaseXform { + constructor() { + super(); + this.map = { + "dc:creator": new StringXform({ tag: "dc:creator" }), + "dc:title": new StringXform({ tag: "dc:title" }), + "dc:subject": new StringXform({ tag: "dc:subject" }), + "dc:description": new StringXform({ tag: "dc:description" }), + "dc:identifier": new StringXform({ tag: "dc:identifier" }), + "dc:language": new StringXform({ tag: "dc:language" }), + "cp:keywords": new StringXform({ tag: "cp:keywords" }), + "cp:category": new StringXform({ tag: "cp:category" }), + "cp:lastModifiedBy": new StringXform({ tag: "cp:lastModifiedBy" }), + "cp:lastPrinted": new DateXform({ tag: "cp:lastPrinted", format: _CoreXform.DateFormat }), + "cp:revision": new IntegerXform({ tag: "cp:revision" }), + "cp:version": new StringXform({ tag: "cp:version" }), + "cp:contentStatus": new StringXform({ tag: "cp:contentStatus" }), + "cp:contentType": new StringXform({ tag: "cp:contentType" }), + "dcterms:created": new DateXform({ + tag: "dcterms:created", + attrs: _CoreXform.DateAttrs, + format: _CoreXform.DateFormat + }), + "dcterms:modified": new DateXform({ + tag: "dcterms:modified", + attrs: _CoreXform.DateAttrs, + format: _CoreXform.DateFormat + }) + }; + } + render(xmlStream, model) { + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("cp:coreProperties", _CoreXform.CORE_PROPERTY_ATTRIBUTES); + this.map["dc:creator"].render(xmlStream, model.creator); + this.map["dc:title"].render(xmlStream, model.title); + this.map["dc:subject"].render(xmlStream, model.subject); + this.map["dc:description"].render(xmlStream, model.description); + this.map["dc:identifier"].render(xmlStream, model.identifier); + this.map["dc:language"].render(xmlStream, model.language); + this.map["cp:keywords"].render(xmlStream, model.keywords); + this.map["cp:category"].render(xmlStream, model.category); + this.map["cp:lastModifiedBy"].render(xmlStream, model.lastModifiedBy); + this.map["cp:lastPrinted"].render(xmlStream, model.lastPrinted); + this.map["cp:revision"].render(xmlStream, model.revision); + this.map["cp:version"].render(xmlStream, model.version); + this.map["cp:contentStatus"].render(xmlStream, model.contentStatus); + this.map["cp:contentType"].render(xmlStream, model.contentType); + this.map["dcterms:created"].render(xmlStream, model.created); + this.map["dcterms:modified"].render(xmlStream, model.modified); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "cp:coreProperties": + case "coreProperties": + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + throw new Error(`Unexpected xml node in parseOpen: ${JSON.stringify(node)}`); + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case "cp:coreProperties": + case "coreProperties": + this.model = { + creator: this.map["dc:creator"].model, + title: this.map["dc:title"].model, + subject: this.map["dc:subject"].model, + description: this.map["dc:description"].model, + identifier: this.map["dc:identifier"].model, + language: this.map["dc:language"].model, + keywords: this.map["cp:keywords"].model, + category: this.map["cp:category"].model, + lastModifiedBy: this.map["cp:lastModifiedBy"].model, + lastPrinted: this.map["cp:lastPrinted"].model, + revision: this.map["cp:revision"].model, + contentStatus: this.map["cp:contentStatus"].model, + contentType: this.map["cp:contentType"].model, + created: this.map["dcterms:created"].model, + modified: this.map["dcterms:modified"].model + }; + return false; + default: + throw new Error(`Unexpected xml node in parseClose: ${name}`); + } + } + }; + CoreXform.DateFormat = function(dt) { + return dt.toISOString().replace(/[.]\d{3}/, ""); + }; + CoreXform.DateAttrs = { "xsi:type": "dcterms:W3CDTF" }; + CoreXform.CORE_PROPERTY_ATTRIBUTES = { + "xmlns:cp": "http://schemas.openxmlformats.org/package/2006/metadata/core-properties", + "xmlns:dc": "http://purl.org/dc/elements/1.1/", + "xmlns:dcterms": "http://purl.org/dc/terms/", + "xmlns:dcmitype": "http://purl.org/dc/dcmitype/", + "xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance" + }; + module2.exports = CoreXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/text-xform.js +var require_text_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/text-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var TextXform = class extends BaseXform { + get tag() { + return "t"; + } + render(xmlStream, model) { + xmlStream.openNode("t"); + if (/^\s|\n|\s$/.test(model)) { + xmlStream.addAttribute("xml:space", "preserve"); + } + xmlStream.writeText(model); + xmlStream.closeNode(); + } + get model() { + return this._text.join("").replace(/_x([0-9A-F]{4})_/g, ($0, $1) => String.fromCharCode(parseInt($1, 16))); + } + parseOpen(node) { + switch (node.name) { + case "t": + this._text = []; + return true; + default: + return false; + } + } + parseText(text) { + this._text.push(text); + } + parseClose() { + return false; + } + }; + module2.exports = TextXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/rich-text-xform.js +var require_rich_text_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/rich-text-xform.js"(exports2, module2) { + var TextXform = require_text_xform(); + var FontXform = require_font_xform(); + var BaseXform = require_base_xform(); + var RichTextXform = class _RichTextXform extends BaseXform { + constructor(model) { + super(); + this.model = model; + } + get tag() { + return "r"; + } + get textXform() { + return this._textXform || (this._textXform = new TextXform()); + } + get fontXform() { + return this._fontXform || (this._fontXform = new FontXform(_RichTextXform.FONT_OPTIONS)); + } + render(xmlStream, model) { + model = model || this.model; + xmlStream.openNode("r"); + if (model.font) { + this.fontXform.render(xmlStream, model.font); + } + this.textXform.render(xmlStream, model.text); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "r": + this.model = {}; + return true; + case "t": + this.parser = this.textXform; + this.parser.parseOpen(node); + return true; + case "rPr": + this.parser = this.fontXform; + this.parser.parseOpen(node); + return true; + default: + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + switch (name) { + case "r": + return false; + case "t": + this.model.text = this.parser.model; + this.parser = void 0; + return true; + case "rPr": + this.model.font = this.parser.model; + this.parser = void 0; + return true; + default: + if (this.parser) { + this.parser.parseClose(name); + } + return true; + } + } + }; + RichTextXform.FONT_OPTIONS = { + tagName: "rPr", + fontNameTag: "rFont" + }; + module2.exports = RichTextXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/phonetic-text-xform.js +var require_phonetic_text_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/phonetic-text-xform.js"(exports2, module2) { + var TextXform = require_text_xform(); + var RichTextXform = require_rich_text_xform(); + var BaseXform = require_base_xform(); + var PhoneticTextXform = class extends BaseXform { + constructor() { + super(); + this.map = { + r: new RichTextXform(), + t: new TextXform() + }; + } + get tag() { + return "rPh"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { + sb: model.sb || 0, + eb: model.eb || 0 + }); + if (model && model.hasOwnProperty("richText") && model.richText) { + const { r } = this.map; + model.richText.forEach((text) => { + r.render(xmlStream, text); + }); + } else if (model) { + this.map.t.render(xmlStream, model.text); + } + xmlStream.closeNode(); + } + parseOpen(node) { + const { name } = node; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + if (name === this.tag) { + this.model = { + sb: parseInt(node.attributes.sb, 10), + eb: parseInt(node.attributes.eb, 10) + }; + return true; + } + this.parser = this.map[name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + return false; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + switch (name) { + case "r": { + let rt = this.model.richText; + if (!rt) { + rt = this.model.richText = []; + } + rt.push(this.parser.model); + break; + } + case "t": + this.model.text = this.parser.model; + break; + default: + break; + } + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + }; + module2.exports = PhoneticTextXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/shared-string-xform.js +var require_shared_string_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/shared-string-xform.js"(exports2, module2) { + var TextXform = require_text_xform(); + var RichTextXform = require_rich_text_xform(); + var PhoneticTextXform = require_phonetic_text_xform(); + var BaseXform = require_base_xform(); + var SharedStringXform = class extends BaseXform { + constructor(model) { + super(); + this.model = model; + this.map = { + r: new RichTextXform(), + t: new TextXform(), + rPh: new PhoneticTextXform() + }; + } + get tag() { + return "si"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + if (model && model.hasOwnProperty("richText") && model.richText) { + if (model.richText.length) { + model.richText.forEach((text) => { + this.map.r.render(xmlStream, text); + }); + } else { + this.map.t.render(xmlStream, ""); + } + } else if (model !== void 0 && model !== null) { + this.map.t.render(xmlStream, model); + } + xmlStream.closeNode(); + } + parseOpen(node) { + const { name } = node; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + if (name === this.tag) { + this.model = {}; + return true; + } + this.parser = this.map[name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + return false; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + switch (name) { + case "r": { + let rt = this.model.richText; + if (!rt) { + rt = this.model.richText = []; + } + rt.push(this.parser.model); + break; + } + case "t": + this.model = this.parser.model; + break; + default: + break; + } + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + }; + module2.exports = SharedStringXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/shared-strings-xform.js +var require_shared_strings_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/shared-strings-xform.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var SharedStringXform = require_shared_string_xform(); + var SharedStringsXform = class extends BaseXform { + constructor(model) { + super(); + this.model = model || { + values: [], + count: 0 + }; + this.hash = /* @__PURE__ */ Object.create(null); + this.rich = /* @__PURE__ */ Object.create(null); + } + get sharedStringXform() { + return this._sharedStringXform || (this._sharedStringXform = new SharedStringXform()); + } + get values() { + return this.model.values; + } + get uniqueCount() { + return this.model.values.length; + } + get count() { + return this.model.count; + } + getString(index) { + return this.model.values[index]; + } + add(value) { + return value.richText ? this.addRichText(value) : this.addText(value); + } + addText(value) { + let index = this.hash[value]; + if (index === void 0) { + index = this.hash[value] = this.model.values.length; + this.model.values.push(value); + } + this.model.count++; + return index; + } + addRichText(value) { + const xml = this.sharedStringXform.toXml(value); + let index = this.rich[xml]; + if (index === void 0) { + index = this.rich[xml] = this.model.values.length; + this.model.values.push(value); + } + this.model.count++; + return index; + } + // + // + // <%=text%> + // + // + render(xmlStream, model) { + model = model || this._values; + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("sst", { + xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main", + count: model.count, + uniqueCount: model.values.length + }); + const sx = this.sharedStringXform; + model.values.forEach((sharedString) => { + sx.render(xmlStream, sharedString); + }); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "sst": + return true; + case "si": + this.parser = this.sharedStringXform; + this.parser.parseOpen(node); + return true; + default: + throw new Error(`Unexpected xml node in parseOpen: ${JSON.stringify(node)}`); + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.values.push(this.parser.model); + this.model.count++; + this.parser = void 0; + } + return true; + } + switch (name) { + case "sst": + return false; + default: + throw new Error(`Unexpected xml node in parseClose: ${name}`); + } + } + }; + module2.exports = SharedStringsXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/relationship-xform.js +var require_relationship_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/relationship-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var RelationshipXform = class extends BaseXform { + render(xmlStream, model) { + xmlStream.leafNode("Relationship", model); + } + parseOpen(node) { + switch (node.name) { + case "Relationship": + this.model = node.attributes; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = RelationshipXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/relationships-xform.js +var require_relationships_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/relationships-xform.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var RelationshipXform = require_relationship_xform(); + var RelationshipsXform = class _RelationshipsXform extends BaseXform { + constructor() { + super(); + this.map = { + Relationship: new RelationshipXform() + }; + } + render(xmlStream, model) { + model = model || this._values; + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("Relationships", _RelationshipsXform.RELATIONSHIPS_ATTRIBUTES); + model.forEach((relationship) => { + this.map.Relationship.render(xmlStream, relationship); + }); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "Relationships": + this.model = []; + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + throw new Error(`Unexpected xml node in parseOpen: ${JSON.stringify(node)}`); + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.push(this.parser.model); + this.parser = void 0; + } + return true; + } + switch (name) { + case "Relationships": + return false; + default: + throw new Error(`Unexpected xml node in parseClose: ${name}`); + } + } + }; + RelationshipsXform.RELATIONSHIPS_ATTRIBUTES = { + xmlns: "http://schemas.openxmlformats.org/package/2006/relationships" + }; + module2.exports = RelationshipsXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/content-types-xform.js +var require_content_types_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/content-types-xform.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var ContentTypesXform = class _ContentTypesXform extends BaseXform { + render(xmlStream, model) { + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("Types", _ContentTypesXform.PROPERTY_ATTRIBUTES); + const mediaHash = {}; + (model.media || []).forEach((medium) => { + if (medium.type === "image") { + const imageType = medium.extension; + if (!mediaHash[imageType]) { + mediaHash[imageType] = true; + xmlStream.leafNode("Default", { Extension: imageType, ContentType: `image/${imageType}` }); + } + } + }); + xmlStream.leafNode("Default", { + Extension: "rels", + ContentType: "application/vnd.openxmlformats-package.relationships+xml" + }); + xmlStream.leafNode("Default", { Extension: "xml", ContentType: "application/xml" }); + xmlStream.leafNode("Override", { + PartName: "/xl/workbook.xml", + ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" + }); + model.worksheets.forEach((worksheet) => { + const name = `/xl/worksheets/sheet${worksheet.id}.xml`; + xmlStream.leafNode("Override", { + PartName: name, + ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" + }); + }); + xmlStream.leafNode("Override", { + PartName: "/xl/theme/theme1.xml", + ContentType: "application/vnd.openxmlformats-officedocument.theme+xml" + }); + xmlStream.leafNode("Override", { + PartName: "/xl/styles.xml", + ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" + }); + const hasSharedStrings = model.sharedStrings && model.sharedStrings.count; + if (hasSharedStrings) { + xmlStream.leafNode("Override", { + PartName: "/xl/sharedStrings.xml", + ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" + }); + } + if (model.tables) { + model.tables.forEach((table) => { + xmlStream.leafNode("Override", { + PartName: `/xl/tables/${table.target}`, + ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml" + }); + }); + } + if (model.drawings) { + model.drawings.forEach((drawing) => { + xmlStream.leafNode("Override", { + PartName: `/xl/drawings/${drawing.name}.xml`, + ContentType: "application/vnd.openxmlformats-officedocument.drawing+xml" + }); + }); + } + if (model.commentRefs) { + xmlStream.leafNode("Default", { + Extension: "vml", + ContentType: "application/vnd.openxmlformats-officedocument.vmlDrawing" + }); + model.commentRefs.forEach(({ commentName }) => { + xmlStream.leafNode("Override", { + PartName: `/xl/${commentName}.xml`, + ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml" + }); + }); + } + xmlStream.leafNode("Override", { + PartName: "/docProps/core.xml", + ContentType: "application/vnd.openxmlformats-package.core-properties+xml" + }); + xmlStream.leafNode("Override", { + PartName: "/docProps/app.xml", + ContentType: "application/vnd.openxmlformats-officedocument.extended-properties+xml" + }); + xmlStream.closeNode(); + } + parseOpen() { + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + ContentTypesXform.PROPERTY_ATTRIBUTES = { + xmlns: "http://schemas.openxmlformats.org/package/2006/content-types" + }; + module2.exports = ContentTypesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/app-heading-pairs-xform.js +var require_app_heading_pairs_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/app-heading-pairs-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var AppHeadingPairsXform = class extends BaseXform { + render(xmlStream, model) { + xmlStream.openNode("HeadingPairs"); + xmlStream.openNode("vt:vector", { size: 2, baseType: "variant" }); + xmlStream.openNode("vt:variant"); + xmlStream.leafNode("vt:lpstr", void 0, "Worksheets"); + xmlStream.closeNode(); + xmlStream.openNode("vt:variant"); + xmlStream.leafNode("vt:i4", void 0, model.length); + xmlStream.closeNode(); + xmlStream.closeNode(); + xmlStream.closeNode(); + } + parseOpen(node) { + return node.name === "HeadingPairs"; + } + parseText() { + } + parseClose(name) { + return name !== "HeadingPairs"; + } + }; + module2.exports = AppHeadingPairsXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/app-titles-of-parts-xform.js +var require_app_titles_of_parts_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/app-titles-of-parts-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var AppTitlesOfPartsXform = class extends BaseXform { + render(xmlStream, model) { + xmlStream.openNode("TitlesOfParts"); + xmlStream.openNode("vt:vector", { size: model.length, baseType: "lpstr" }); + model.forEach((sheet) => { + xmlStream.leafNode("vt:lpstr", void 0, sheet.name); + }); + xmlStream.closeNode(); + xmlStream.closeNode(); + } + parseOpen(node) { + return node.name === "TitlesOfParts"; + } + parseText() { + } + parseClose(name) { + return name !== "TitlesOfParts"; + } + }; + module2.exports = AppTitlesOfPartsXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/app-xform.js +var require_app_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/app-xform.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var StringXform = require_string_xform(); + var AppHeadingPairsXform = require_app_heading_pairs_xform(); + var AppTitleOfPartsXform = require_app_titles_of_parts_xform(); + var AppXform = class _AppXform extends BaseXform { + constructor() { + super(); + this.map = { + Company: new StringXform({ tag: "Company" }), + Manager: new StringXform({ tag: "Manager" }), + HeadingPairs: new AppHeadingPairsXform(), + TitleOfParts: new AppTitleOfPartsXform() + }; + } + render(xmlStream, model) { + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("Properties", _AppXform.PROPERTY_ATTRIBUTES); + xmlStream.leafNode("Application", void 0, "Microsoft Excel"); + xmlStream.leafNode("DocSecurity", void 0, "0"); + xmlStream.leafNode("ScaleCrop", void 0, "false"); + this.map.HeadingPairs.render(xmlStream, model.worksheets); + this.map.TitleOfParts.render(xmlStream, model.worksheets); + this.map.Company.render(xmlStream, model.company || ""); + this.map.Manager.render(xmlStream, model.manager); + xmlStream.leafNode("LinksUpToDate", void 0, "false"); + xmlStream.leafNode("SharedDoc", void 0, "false"); + xmlStream.leafNode("HyperlinksChanged", void 0, "false"); + xmlStream.leafNode("AppVersion", void 0, "16.0300"); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "Properties": + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case "Properties": + this.model = { + worksheets: this.map.TitleOfParts.model, + company: this.map.Company.model, + manager: this.map.Manager.model + }; + return false; + default: + return true; + } + } + }; + AppXform.DateFormat = function(dt) { + return dt.toISOString().replace(/[.]\d{3,6}/, ""); + }; + AppXform.DateAttrs = { "xsi:type": "dcterms:W3CDTF" }; + AppXform.PROPERTY_ATTRIBUTES = { + xmlns: "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties", + "xmlns:vt": "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes" + }; + module2.exports = AppXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/defined-name-xform.js +var require_defined_name_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/defined-name-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var colCache = require_col_cache(); + var DefinedNamesXform = class extends BaseXform { + render(xmlStream, model) { + xmlStream.openNode("definedName", { + name: model.name, + localSheetId: model.localSheetId + }); + xmlStream.writeText(model.ranges.join(",")); + xmlStream.closeNode(); + } + parseOpen(node) { + switch (node.name) { + case "definedName": + this._parsedName = node.attributes.name; + this._parsedLocalSheetId = node.attributes.localSheetId; + this._parsedText = []; + return true; + default: + return false; + } + } + parseText(text) { + this._parsedText.push(text); + } + parseClose() { + this.model = { + name: this._parsedName, + ranges: extractRanges(this._parsedText.join("")) + }; + if (this._parsedLocalSheetId !== void 0) { + this.model.localSheetId = parseInt(this._parsedLocalSheetId, 10); + } + return false; + } + }; + function isValidRange(range) { + try { + colCache.decodeEx(range); + return true; + } catch (err) { + return false; + } + } + function extractRanges(parsedText) { + const ranges = []; + let quotesOpened = false; + let last = ""; + parsedText.split(",").forEach((item) => { + if (!item) { + return; + } + const quotes = (item.match(/'/g) || []).length; + if (!quotes) { + if (quotesOpened) { + last += `${item},`; + } else if (isValidRange(item)) { + ranges.push(item); + } + return; + } + const quotesEven = quotes % 2 === 0; + if (!quotesOpened && quotesEven && isValidRange(item)) { + ranges.push(item); + } else if (quotesOpened && !quotesEven) { + quotesOpened = false; + if (isValidRange(last + item)) { + ranges.push(last + item); + } + last = ""; + } else { + quotesOpened = true; + last += `${item},`; + } + }); + return ranges; + } + module2.exports = DefinedNamesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/sheet-xform.js +var require_sheet_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/sheet-xform.js"(exports2, module2) { + var utils = require_utils21(); + var BaseXform = require_base_xform(); + var WorksheetXform = class extends BaseXform { + render(xmlStream, model) { + xmlStream.leafNode("sheet", { + sheetId: model.id, + name: model.name, + state: model.state, + "r:id": model.rId + }); + } + parseOpen(node) { + if (node.name === "sheet") { + this.model = { + name: utils.xmlDecode(node.attributes.name), + id: parseInt(node.attributes.sheetId, 10), + state: node.attributes.state, + rId: node.attributes["r:id"] + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = WorksheetXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/workbook-view-xform.js +var require_workbook_view_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/workbook-view-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var WorkbookViewXform = class extends BaseXform { + render(xmlStream, model) { + const attributes = { + xWindow: model.x || 0, + yWindow: model.y || 0, + windowWidth: model.width || 12e3, + windowHeight: model.height || 24e3, + firstSheet: model.firstSheet, + activeTab: model.activeTab + }; + if (model.visibility && model.visibility !== "visible") { + attributes.visibility = model.visibility; + } + xmlStream.leafNode("workbookView", attributes); + } + parseOpen(node) { + if (node.name === "workbookView") { + const model = this.model = {}; + const addS = function(name, value, dflt) { + const s = value !== void 0 ? model[name] = value : dflt; + if (s !== void 0) { + model[name] = s; + } + }; + const addN = function(name, value, dflt) { + const n = value !== void 0 ? model[name] = parseInt(value, 10) : dflt; + if (n !== void 0) { + model[name] = n; + } + }; + addN("x", node.attributes.xWindow, 0); + addN("y", node.attributes.yWindow, 0); + addN("width", node.attributes.windowWidth, 25e3); + addN("height", node.attributes.windowHeight, 1e4); + addS("visibility", node.attributes.visibility, "visible"); + addN("activeTab", node.attributes.activeTab, void 0); + addN("firstSheet", node.attributes.firstSheet, void 0); + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = WorkbookViewXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/workbook-properties-xform.js +var require_workbook_properties_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/workbook-properties-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var WorksheetPropertiesXform = class extends BaseXform { + render(xmlStream, model) { + xmlStream.leafNode("workbookPr", { + date1904: model.date1904 ? 1 : void 0, + defaultThemeVersion: 164011, + filterPrivacy: 1 + }); + } + parseOpen(node) { + if (node.name === "workbookPr") { + this.model = { + date1904: node.attributes.date1904 === "1" + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = WorksheetPropertiesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/workbook-calc-properties-xform.js +var require_workbook_calc_properties_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/workbook-calc-properties-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var WorkbookCalcPropertiesXform = class extends BaseXform { + render(xmlStream, model) { + xmlStream.leafNode("calcPr", { + calcId: 171027, + fullCalcOnLoad: model.fullCalcOnLoad ? 1 : void 0 + }); + } + parseOpen(node) { + if (node.name === "calcPr") { + this.model = {}; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = WorkbookCalcPropertiesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/workbook-xform.js +var require_workbook_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/workbook-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var colCache = require_col_cache(); + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var StaticXform = require_static_xform(); + var ListXform = require_list_xform(); + var DefinedNameXform = require_defined_name_xform(); + var SheetXform = require_sheet_xform(); + var WorkbookViewXform = require_workbook_view_xform(); + var WorkbookPropertiesXform = require_workbook_properties_xform(); + var WorkbookCalcPropertiesXform = require_workbook_calc_properties_xform(); + var WorkbookXform = class _WorkbookXform extends BaseXform { + constructor() { + super(); + this.map = { + fileVersion: _WorkbookXform.STATIC_XFORMS.fileVersion, + workbookPr: new WorkbookPropertiesXform(), + bookViews: new ListXform({ + tag: "bookViews", + count: false, + childXform: new WorkbookViewXform() + }), + sheets: new ListXform({ tag: "sheets", count: false, childXform: new SheetXform() }), + definedNames: new ListXform({ + tag: "definedNames", + count: false, + childXform: new DefinedNameXform() + }), + calcPr: new WorkbookCalcPropertiesXform() + }; + } + prepare(model) { + model.sheets = model.worksheets; + const printAreas = []; + let index = 0; + model.sheets.forEach((sheet) => { + if (sheet.pageSetup && sheet.pageSetup.printArea) { + sheet.pageSetup.printArea.split("&&").forEach((printArea) => { + const printAreaComponents = printArea.split(":"); + const definedName = { + name: "_xlnm.Print_Area", + ranges: [`'${sheet.name}'!$${printAreaComponents[0]}:$${printAreaComponents[1]}`], + localSheetId: index + }; + printAreas.push(definedName); + }); + } + if (sheet.pageSetup && (sheet.pageSetup.printTitlesRow || sheet.pageSetup.printTitlesColumn)) { + const ranges = []; + if (sheet.pageSetup.printTitlesColumn) { + const titlesColumns = sheet.pageSetup.printTitlesColumn.split(":"); + ranges.push(`'${sheet.name}'!$${titlesColumns[0]}:$${titlesColumns[1]}`); + } + if (sheet.pageSetup.printTitlesRow) { + const titlesRows = sheet.pageSetup.printTitlesRow.split(":"); + ranges.push(`'${sheet.name}'!$${titlesRows[0]}:$${titlesRows[1]}`); + } + const definedName = { + name: "_xlnm.Print_Titles", + ranges, + localSheetId: index + }; + printAreas.push(definedName); + } + index++; + }); + if (printAreas.length) { + model.definedNames = model.definedNames.concat(printAreas); + } + (model.media || []).forEach((medium, i) => { + medium.name = medium.type + (i + 1); + }); + } + render(xmlStream, model) { + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("workbook", _WorkbookXform.WORKBOOK_ATTRIBUTES); + this.map.fileVersion.render(xmlStream); + this.map.workbookPr.render(xmlStream, model.properties); + this.map.bookViews.render(xmlStream, model.views); + this.map.sheets.render(xmlStream, model.sheets); + this.map.definedNames.render(xmlStream, model.definedNames); + this.map.calcPr.render(xmlStream, model.calcProperties); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "workbook": + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + return true; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case "workbook": + this.model = { + sheets: this.map.sheets.model, + properties: this.map.workbookPr.model || {}, + views: this.map.bookViews.model, + calcProperties: {} + }; + if (this.map.definedNames.model) { + this.model.definedNames = this.map.definedNames.model; + } + return false; + default: + return true; + } + } + reconcile(model) { + const rels = (model.workbookRels || []).reduce((map, rel) => { + map[rel.Id] = rel; + return map; + }, {}); + const worksheets = []; + let worksheet; + let index = 0; + (model.sheets || []).forEach((sheet) => { + const rel = rels[sheet.rId]; + if (!rel) { + return; + } + worksheet = model.worksheetHash[`xl/${rel.Target.replace(/^(\s|\/xl\/)+/, "")}`]; + if (worksheet) { + worksheet.name = sheet.name; + worksheet.id = sheet.id; + worksheet.state = sheet.state; + worksheets[index++] = worksheet; + } + }); + const definedNames = []; + _2.each(model.definedNames, (definedName) => { + if (definedName.name === "_xlnm.Print_Area") { + worksheet = worksheets[definedName.localSheetId]; + if (worksheet) { + if (!worksheet.pageSetup) { + worksheet.pageSetup = {}; + } + const range = colCache.decodeEx(definedName.ranges[0]); + worksheet.pageSetup.printArea = worksheet.pageSetup.printArea ? `${worksheet.pageSetup.printArea}&&${range.dimensions}` : range.dimensions; + } + } else if (definedName.name === "_xlnm.Print_Titles") { + worksheet = worksheets[definedName.localSheetId]; + if (worksheet) { + if (!worksheet.pageSetup) { + worksheet.pageSetup = {}; + } + const rangeString = definedName.ranges.join(","); + const dollarRegex = /\$/g; + const rowRangeRegex = /\$\d+:\$\d+/; + const rowRangeMatches = rangeString.match(rowRangeRegex); + if (rowRangeMatches && rowRangeMatches.length) { + const range = rowRangeMatches[0]; + worksheet.pageSetup.printTitlesRow = range.replace(dollarRegex, ""); + } + const columnRangeRegex = /\$[A-Z]+:\$[A-Z]+/; + const columnRangeMatches = rangeString.match(columnRangeRegex); + if (columnRangeMatches && columnRangeMatches.length) { + const range = columnRangeMatches[0]; + worksheet.pageSetup.printTitlesColumn = range.replace(dollarRegex, ""); + } + } + } else { + definedNames.push(definedName); + } + }); + model.definedNames = definedNames; + model.media.forEach((media, i) => { + media.index = i; + }); + } + }; + WorkbookXform.WORKBOOK_ATTRIBUTES = { + xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main", + "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships", + "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006", + "mc:Ignorable": "x15", + "xmlns:x15": "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" + }; + WorkbookXform.STATIC_XFORMS = { + fileVersion: new StaticXform({ + tag: "fileVersion", + $: { appName: "xl", lastEdited: 5, lowestEdited: 5, rupBuild: 9303 } + }) + }; + module2.exports = WorkbookXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/rel-type.js +var require_rel_type = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/rel-type.js"(exports2, module2) { + "use strict"; + module2.exports = { + OfficeDocument: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", + Worksheet: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet", + CalcChain: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain", + SharedStrings: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings", + Styles: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles", + Theme: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme", + Hyperlink: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", + Image: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", + CoreProperties: "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties", + ExtenderProperties: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties", + Comments: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments", + VmlDrawing: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing", + Table: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table" + }; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/merges.js +var require_merges = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/merges.js"(exports2, module2) { + var _2 = require_under_dash(); + var Range = require_range4(); + var colCache = require_col_cache(); + var Enums = require_enums5(); + var Merges = class { + constructor() { + this.merges = {}; + } + add(merge) { + if (this.merges[merge.master]) { + this.merges[merge.master].expandToAddress(merge.address); + } else { + const range = `${merge.master}:${merge.address}`; + this.merges[merge.master] = new Range(range); + } + } + get mergeCells() { + return _2.map(this.merges, (merge) => merge.range); + } + reconcile(mergeCells, rows) { + _2.each(mergeCells, (merge) => { + const dimensions = colCache.decode(merge); + for (let i = dimensions.top; i <= dimensions.bottom; i++) { + const row = rows[i - 1]; + for (let j = dimensions.left; j <= dimensions.right; j++) { + const cell = row.cells[j - 1]; + if (!cell) { + row.cells[j] = { + type: Enums.ValueType.Null, + address: colCache.encodeAddress(i, j) + }; + } else if (cell.type === Enums.ValueType.Merge) { + cell.master = dimensions.tl; + } + } + } + }); + } + getMasterAddress(address) { + const range = this.hash[address]; + return range && range.tl; + } + }; + module2.exports = Merges; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cell-xform.js +var require_cell_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cell-xform.js"(exports2, module2) { + var utils = require_utils21(); + var BaseXform = require_base_xform(); + var Range = require_range4(); + var Enums = require_enums5(); + var RichTextXform = require_rich_text_xform(); + function getValueType(v) { + if (v === null || v === void 0) { + return Enums.ValueType.Null; + } + if (v instanceof String || typeof v === "string") { + return Enums.ValueType.String; + } + if (typeof v === "number") { + return Enums.ValueType.Number; + } + if (typeof v === "boolean") { + return Enums.ValueType.Boolean; + } + if (v instanceof Date) { + return Enums.ValueType.Date; + } + if (v.text && v.hyperlink) { + return Enums.ValueType.Hyperlink; + } + if (v.formula) { + return Enums.ValueType.Formula; + } + if (v.error) { + return Enums.ValueType.Error; + } + throw new Error("I could not understand type of value"); + } + function getEffectiveCellType(cell) { + switch (cell.type) { + case Enums.ValueType.Formula: + return getValueType(cell.result); + default: + return cell.type; + } + } + var CellXform = class extends BaseXform { + constructor() { + super(); + this.richTextXForm = new RichTextXform(); + } + get tag() { + return "c"; + } + prepare(model, options) { + const styleId = options.styles.addStyleModel(model.style || {}, getEffectiveCellType(model)); + if (styleId) { + model.styleId = styleId; + } + if (model.comment) { + options.comments.push({ ...model.comment, ref: model.address }); + } + switch (model.type) { + case Enums.ValueType.String: + case Enums.ValueType.RichText: + if (options.sharedStrings) { + model.ssId = options.sharedStrings.add(model.value); + } + break; + case Enums.ValueType.Date: + if (options.date1904) { + model.date1904 = true; + } + break; + case Enums.ValueType.Hyperlink: + if (options.sharedStrings && model.text !== void 0 && model.text !== null) { + model.ssId = options.sharedStrings.add(model.text); + } + options.hyperlinks.push({ + address: model.address, + target: model.hyperlink, + tooltip: model.tooltip + }); + break; + case Enums.ValueType.Merge: + options.merges.add(model); + break; + case Enums.ValueType.Formula: + if (options.date1904) { + model.date1904 = true; + } + if (model.shareType === "shared") { + model.si = options.siFormulae++; + } + if (model.formula) { + options.formulae[model.address] = model; + } else if (model.sharedFormula) { + const master = options.formulae[model.sharedFormula]; + if (!master) { + throw new Error( + `Shared Formula master must exist above and or left of clone for cell ${model.address}` + ); + } + if (master.si === void 0) { + master.shareType = "shared"; + master.si = options.siFormulae++; + master.range = new Range(master.address, model.address); + } else if (master.range) { + master.range.expandToAddress(model.address); + } + model.si = master.si; + } + break; + default: + break; + } + } + renderFormula(xmlStream, model) { + let attrs = null; + switch (model.shareType) { + case "shared": + attrs = { + t: "shared", + ref: model.ref || model.range.range, + si: model.si + }; + break; + case "array": + attrs = { + t: "array", + ref: model.ref + }; + break; + default: + if (model.si !== void 0) { + attrs = { + t: "shared", + si: model.si + }; + } + break; + } + switch (getValueType(model.result)) { + case Enums.ValueType.Null: + xmlStream.leafNode("f", attrs, model.formula); + break; + case Enums.ValueType.String: + xmlStream.addAttribute("t", "str"); + xmlStream.leafNode("f", attrs, model.formula); + xmlStream.leafNode("v", null, model.result); + break; + case Enums.ValueType.Number: + xmlStream.leafNode("f", attrs, model.formula); + xmlStream.leafNode("v", null, model.result); + break; + case Enums.ValueType.Boolean: + xmlStream.addAttribute("t", "b"); + xmlStream.leafNode("f", attrs, model.formula); + xmlStream.leafNode("v", null, model.result ? 1 : 0); + break; + case Enums.ValueType.Error: + xmlStream.addAttribute("t", "e"); + xmlStream.leafNode("f", attrs, model.formula); + xmlStream.leafNode("v", null, model.result.error); + break; + case Enums.ValueType.Date: + xmlStream.leafNode("f", attrs, model.formula); + xmlStream.leafNode("v", null, utils.dateToExcel(model.result, model.date1904)); + break; + // case Enums.ValueType.Hyperlink: // ?? + // case Enums.ValueType.Formula: + default: + throw new Error("I could not understand type of value"); + } + } + render(xmlStream, model) { + if (model.type === Enums.ValueType.Null && !model.styleId) { + return; + } + xmlStream.openNode("c"); + xmlStream.addAttribute("r", model.address); + if (model.styleId) { + xmlStream.addAttribute("s", model.styleId); + } + switch (model.type) { + case Enums.ValueType.Null: + break; + case Enums.ValueType.Number: + xmlStream.leafNode("v", null, model.value); + break; + case Enums.ValueType.Boolean: + xmlStream.addAttribute("t", "b"); + xmlStream.leafNode("v", null, model.value ? "1" : "0"); + break; + case Enums.ValueType.Error: + xmlStream.addAttribute("t", "e"); + xmlStream.leafNode("v", null, model.value.error); + break; + case Enums.ValueType.String: + case Enums.ValueType.RichText: + if (model.ssId !== void 0) { + xmlStream.addAttribute("t", "s"); + xmlStream.leafNode("v", null, model.ssId); + } else if (model.value && model.value.richText) { + xmlStream.addAttribute("t", "inlineStr"); + xmlStream.openNode("is"); + model.value.richText.forEach((text) => { + this.richTextXForm.render(xmlStream, text); + }); + xmlStream.closeNode("is"); + } else { + xmlStream.addAttribute("t", "str"); + xmlStream.leafNode("v", null, model.value); + } + break; + case Enums.ValueType.Date: + xmlStream.leafNode("v", null, utils.dateToExcel(model.value, model.date1904)); + break; + case Enums.ValueType.Hyperlink: + if (model.ssId !== void 0) { + xmlStream.addAttribute("t", "s"); + xmlStream.leafNode("v", null, model.ssId); + } else { + xmlStream.addAttribute("t", "str"); + xmlStream.leafNode("v", null, model.text); + } + break; + case Enums.ValueType.Formula: + this.renderFormula(xmlStream, model); + break; + case Enums.ValueType.Merge: + break; + default: + break; + } + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "c": + this.model = { + address: node.attributes.r + }; + this.t = node.attributes.t; + if (node.attributes.s) { + this.model.styleId = parseInt(node.attributes.s, 10); + } + return true; + case "f": + this.currentNode = "f"; + this.model.si = node.attributes.si; + this.model.shareType = node.attributes.t; + this.model.ref = node.attributes.ref; + return true; + case "v": + this.currentNode = "v"; + return true; + case "t": + this.currentNode = "t"; + return true; + case "r": + this.parser = this.richTextXForm; + this.parser.parseOpen(node); + return true; + default: + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + return; + } + switch (this.currentNode) { + case "f": + this.model.formula = this.model.formula ? this.model.formula + text : text; + break; + case "v": + case "t": + if (this.model.value && this.model.value.richText) { + this.model.value.richText.text = this.model.value.richText.text ? this.model.value.richText.text + text : text; + } else { + this.model.value = this.model.value ? this.model.value + text : text; + } + break; + default: + break; + } + } + parseClose(name) { + switch (name) { + case "c": { + const { model } = this; + if (model.formula || model.shareType) { + model.type = Enums.ValueType.Formula; + if (model.value) { + if (this.t === "str") { + model.result = utils.xmlDecode(model.value); + } else if (this.t === "b") { + model.result = parseInt(model.value, 10) !== 0; + } else if (this.t === "e") { + model.result = { error: model.value }; + } else { + model.result = parseFloat(model.value); + } + model.value = void 0; + } + } else if (model.value !== void 0) { + switch (this.t) { + case "s": + model.type = Enums.ValueType.String; + model.value = parseInt(model.value, 10); + break; + case "str": + model.type = Enums.ValueType.String; + model.value = utils.xmlDecode(model.value); + break; + case "inlineStr": + model.type = Enums.ValueType.String; + break; + case "b": + model.type = Enums.ValueType.Boolean; + model.value = parseInt(model.value, 10) !== 0; + break; + case "e": + model.type = Enums.ValueType.Error; + model.value = { error: model.value }; + break; + default: + model.type = Enums.ValueType.Number; + model.value = parseFloat(model.value); + break; + } + } else if (model.styleId) { + model.type = Enums.ValueType.Null; + } else { + model.type = Enums.ValueType.Merge; + } + return false; + } + case "f": + case "v": + case "is": + this.currentNode = void 0; + return true; + case "t": + if (this.parser) { + this.parser.parseClose(name); + return true; + } + this.currentNode = void 0; + return true; + case "r": + this.model.value = this.model.value || {}; + this.model.value.richText = this.model.value.richText || []; + this.model.value.richText.push(this.parser.model); + this.parser = void 0; + this.currentNode = void 0; + return true; + default: + if (this.parser) { + this.parser.parseClose(name); + return true; + } + return false; + } + } + reconcile(model, options) { + const style = model.styleId && options.styles && options.styles.getStyleModel(model.styleId); + if (style) { + model.style = style; + } + if (model.styleId !== void 0) { + model.styleId = void 0; + } + switch (model.type) { + case Enums.ValueType.String: + if (typeof model.value === "number") { + if (options.sharedStrings) { + model.value = options.sharedStrings.getString(model.value); + } + } + if (model.value.richText) { + model.type = Enums.ValueType.RichText; + } + break; + case Enums.ValueType.Number: + if (style && utils.isDateFmt(style.numFmt)) { + model.type = Enums.ValueType.Date; + model.value = utils.excelToDate(model.value, options.date1904); + } + break; + case Enums.ValueType.Formula: + if (model.result !== void 0 && style && utils.isDateFmt(style.numFmt)) { + model.result = utils.excelToDate(model.result, options.date1904); + } + if (model.shareType === "shared") { + if (model.ref) { + options.formulae[model.si] = model.address; + } else { + model.sharedFormula = options.formulae[model.si]; + delete model.shareType; + } + delete model.si; + } + break; + default: + break; + } + const hyperlink = options.hyperlinkMap[model.address]; + if (hyperlink) { + if (model.type === Enums.ValueType.Formula) { + model.text = model.result; + model.result = void 0; + } else { + model.text = model.value; + model.value = void 0; + } + model.type = Enums.ValueType.Hyperlink; + model.hyperlink = hyperlink; + } + const comment = options.commentsMap && options.commentsMap[model.address]; + if (comment) { + model.comment = comment; + } + } + }; + module2.exports = CellXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/row-xform.js +var require_row_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/row-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var utils = require_utils21(); + var CellXform = require_cell_xform(); + var RowXform = class extends BaseXform { + constructor(options) { + super(); + this.maxItems = options && options.maxItems; + this.map = { + c: new CellXform() + }; + } + get tag() { + return "row"; + } + prepare(model, options) { + const styleId = options.styles.addStyleModel(model.style); + if (styleId) { + model.styleId = styleId; + } + const cellXform = this.map.c; + model.cells.forEach((cellModel) => { + cellXform.prepare(cellModel, options); + }); + } + render(xmlStream, model, options) { + xmlStream.openNode("row"); + xmlStream.addAttribute("r", model.number); + if (model.height) { + xmlStream.addAttribute("ht", model.height); + xmlStream.addAttribute("customHeight", "1"); + } + if (model.hidden) { + xmlStream.addAttribute("hidden", "1"); + } + if (model.min > 0 && model.max > 0 && model.min <= model.max) { + xmlStream.addAttribute("spans", `${model.min}:${model.max}`); + } + if (model.styleId) { + xmlStream.addAttribute("s", model.styleId); + xmlStream.addAttribute("customFormat", "1"); + } + xmlStream.addAttribute("x14ac:dyDescent", "0.25"); + if (model.outlineLevel) { + xmlStream.addAttribute("outlineLevel", model.outlineLevel); + } + if (model.collapsed) { + xmlStream.addAttribute("collapsed", "1"); + } + const cellXform = this.map.c; + model.cells.forEach((cellModel) => { + cellXform.render(xmlStream, cellModel, options); + }); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + if (node.name === "row") { + this.numRowsSeen += 1; + const spans = node.attributes.spans ? node.attributes.spans.split(":").map((span) => parseInt(span, 10)) : [void 0, void 0]; + const model = this.model = { + number: parseInt(node.attributes.r, 10), + min: spans[0], + max: spans[1], + cells: [] + }; + if (node.attributes.s) { + model.styleId = parseInt(node.attributes.s, 10); + } + if (utils.parseBoolean(node.attributes.hidden)) { + model.hidden = true; + } + if (utils.parseBoolean(node.attributes.bestFit)) { + model.bestFit = true; + } + if (node.attributes.ht) { + model.height = parseFloat(node.attributes.ht); + } + if (node.attributes.outlineLevel) { + model.outlineLevel = parseInt(node.attributes.outlineLevel, 10); + } + if (utils.parseBoolean(node.attributes.collapsed)) { + model.collapsed = true; + } + return true; + } + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + return false; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.cells.push(this.parser.model); + if (this.maxItems && this.model.cells.length > this.maxItems) { + throw new Error(`Max column count (${this.maxItems}) exceeded`); + } + this.parser = void 0; + } + return true; + } + return false; + } + reconcile(model, options) { + model.style = model.styleId ? options.styles.getStyleModel(model.styleId) : {}; + if (model.styleId !== void 0) { + model.styleId = void 0; + } + const cellXform = this.map.c; + model.cells.forEach((cellModel) => { + cellXform.reconcile(cellModel, options); + }); + } + }; + module2.exports = RowXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/col-xform.js +var require_col_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/col-xform.js"(exports2, module2) { + var utils = require_utils21(); + var BaseXform = require_base_xform(); + var ColXform = class extends BaseXform { + get tag() { + return "col"; + } + prepare(model, options) { + const styleId = options.styles.addStyleModel(model.style || {}); + if (styleId) { + model.styleId = styleId; + } + } + render(xmlStream, model) { + xmlStream.openNode("col"); + xmlStream.addAttribute("min", model.min); + xmlStream.addAttribute("max", model.max); + if (model.width) { + xmlStream.addAttribute("width", model.width); + } + if (model.styleId) { + xmlStream.addAttribute("style", model.styleId); + } + if (model.hidden) { + xmlStream.addAttribute("hidden", "1"); + } + if (model.bestFit) { + xmlStream.addAttribute("bestFit", "1"); + } + if (model.outlineLevel) { + xmlStream.addAttribute("outlineLevel", model.outlineLevel); + } + if (model.collapsed) { + xmlStream.addAttribute("collapsed", "1"); + } + xmlStream.addAttribute("customWidth", "1"); + xmlStream.closeNode(); + } + parseOpen(node) { + if (node.name === "col") { + const model = this.model = { + min: parseInt(node.attributes.min || "0", 10), + max: parseInt(node.attributes.max || "0", 10), + width: node.attributes.width === void 0 ? void 0 : parseFloat(node.attributes.width || "0") + }; + if (node.attributes.style) { + model.styleId = parseInt(node.attributes.style, 10); + } + if (utils.parseBoolean(node.attributes.hidden)) { + model.hidden = true; + } + if (utils.parseBoolean(node.attributes.bestFit)) { + model.bestFit = true; + } + if (node.attributes.outlineLevel) { + model.outlineLevel = parseInt(node.attributes.outlineLevel, 10); + } + if (utils.parseBoolean(node.attributes.collapsed)) { + model.collapsed = true; + } + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + reconcile(model, options) { + if (model.styleId) { + model.style = options.styles.getStyleModel(model.styleId); + } + } + }; + module2.exports = ColXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/dimension-xform.js +var require_dimension_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/dimension-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var DimensionXform = class extends BaseXform { + get tag() { + return "dimension"; + } + render(xmlStream, model) { + if (model) { + xmlStream.leafNode("dimension", { ref: model }); + } + } + parseOpen(node) { + if (node.name === "dimension") { + this.model = node.attributes.ref; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = DimensionXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/hyperlink-xform.js +var require_hyperlink_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/hyperlink-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var HyperlinkXform = class extends BaseXform { + get tag() { + return "hyperlink"; + } + render(xmlStream, model) { + if (this.isInternalLink(model)) { + xmlStream.leafNode("hyperlink", { + ref: model.address, + "r:id": model.rId, + tooltip: model.tooltip, + location: model.target + }); + } else { + xmlStream.leafNode("hyperlink", { + ref: model.address, + "r:id": model.rId, + tooltip: model.tooltip + }); + } + } + parseOpen(node) { + if (node.name === "hyperlink") { + this.model = { + address: node.attributes.ref, + rId: node.attributes["r:id"], + tooltip: node.attributes.tooltip + }; + if (node.attributes.location) { + this.model.target = node.attributes.location; + } + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + isInternalLink(model) { + return model.target && /^[^!]+![a-zA-Z]+[\d]+$/.test(model.target); + } + }; + module2.exports = HyperlinkXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/merge-cell-xform.js +var require_merge_cell_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/merge-cell-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var MergeCellXform = class extends BaseXform { + get tag() { + return "mergeCell"; + } + render(xmlStream, model) { + xmlStream.leafNode("mergeCell", { ref: model }); + } + parseOpen(node) { + if (node.name === "mergeCell") { + this.model = node.attributes.ref; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = MergeCellXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/data-validations-xform.js +var require_data_validations_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/data-validations-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var utils = require_utils21(); + var colCache = require_col_cache(); + var BaseXform = require_base_xform(); + var Range = require_range4(); + function assign(definedName, attributes, name, defaultValue) { + const value = attributes[name]; + if (value !== void 0) { + definedName[name] = value; + } else if (defaultValue !== void 0) { + definedName[name] = defaultValue; + } + } + function assignBool(definedName, attributes, name, defaultValue) { + const value = attributes[name]; + if (value !== void 0) { + definedName[name] = utils.parseBoolean(value); + } else if (defaultValue !== void 0) { + definedName[name] = defaultValue; + } + } + function optimiseDataValidations(model) { + const dvList = _2.map(model, (dataValidation, address) => ({ + address, + dataValidation, + marked: false + })).sort((a, b) => _2.strcmp(a.address, b.address)); + const dvMap = _2.keyBy(dvList, "address"); + const matchCol = (addr, height, col) => { + for (let i = 0; i < height; i++) { + const otherAddress = colCache.encodeAddress(addr.row + i, col); + if (!model[otherAddress] || !_2.isEqual(model[addr.address], model[otherAddress])) { + return false; + } + } + return true; + }; + return dvList.map((dv) => { + if (!dv.marked) { + const addr = colCache.decodeEx(dv.address); + if (addr.dimensions) { + dvMap[addr.dimensions].marked = true; + return { + ...dv.dataValidation, + sqref: dv.address + }; + } + let height = 1; + let otherAddress = colCache.encodeAddress(addr.row + height, addr.col); + while (model[otherAddress] && _2.isEqual(dv.dataValidation, model[otherAddress])) { + height++; + otherAddress = colCache.encodeAddress(addr.row + height, addr.col); + } + let width = 1; + while (matchCol(addr, height, addr.col + width)) { + width++; + } + for (let i = 0; i < height; i++) { + for (let j = 0; j < width; j++) { + otherAddress = colCache.encodeAddress(addr.row + i, addr.col + j); + dvMap[otherAddress].marked = true; + } + } + if (height > 1 || width > 1) { + const bottom = addr.row + (height - 1); + const right = addr.col + (width - 1); + return { + ...dv.dataValidation, + sqref: `${dv.address}:${colCache.encodeAddress(bottom, right)}` + }; + } + return { + ...dv.dataValidation, + sqref: dv.address + }; + } + return null; + }).filter(Boolean); + } + var DataValidationsXform = class extends BaseXform { + get tag() { + return "dataValidations"; + } + render(xmlStream, model) { + const optimizedModel = optimiseDataValidations(model); + if (optimizedModel.length) { + xmlStream.openNode("dataValidations", { count: optimizedModel.length }); + optimizedModel.forEach((value) => { + xmlStream.openNode("dataValidation"); + if (value.type !== "any") { + xmlStream.addAttribute("type", value.type); + if (value.operator && value.type !== "list" && value.operator !== "between") { + xmlStream.addAttribute("operator", value.operator); + } + if (value.allowBlank) { + xmlStream.addAttribute("allowBlank", "1"); + } + } + if (value.showInputMessage) { + xmlStream.addAttribute("showInputMessage", "1"); + } + if (value.promptTitle) { + xmlStream.addAttribute("promptTitle", value.promptTitle); + } + if (value.prompt) { + xmlStream.addAttribute("prompt", value.prompt); + } + if (value.showErrorMessage) { + xmlStream.addAttribute("showErrorMessage", "1"); + } + if (value.errorStyle) { + xmlStream.addAttribute("errorStyle", value.errorStyle); + } + if (value.errorTitle) { + xmlStream.addAttribute("errorTitle", value.errorTitle); + } + if (value.error) { + xmlStream.addAttribute("error", value.error); + } + xmlStream.addAttribute("sqref", value.sqref); + (value.formulae || []).forEach((formula, index) => { + xmlStream.openNode(`formula${index + 1}`); + if (value.type === "date") { + xmlStream.writeText(utils.dateToExcel(new Date(formula))); + } else { + xmlStream.writeText(formula); + } + xmlStream.closeNode(); + }); + xmlStream.closeNode(); + }); + xmlStream.closeNode(); + } + } + parseOpen(node) { + switch (node.name) { + case "dataValidations": + this.model = {}; + return true; + case "dataValidation": { + this._address = node.attributes.sqref; + const dataValidation = { type: node.attributes.type || "any", formulae: [] }; + if (node.attributes.type) { + assignBool(dataValidation, node.attributes, "allowBlank"); + } + assignBool(dataValidation, node.attributes, "showInputMessage"); + assignBool(dataValidation, node.attributes, "showErrorMessage"); + switch (dataValidation.type) { + case "any": + case "list": + case "custom": + break; + default: + assign(dataValidation, node.attributes, "operator", "between"); + break; + } + assign(dataValidation, node.attributes, "promptTitle"); + assign(dataValidation, node.attributes, "prompt"); + assign(dataValidation, node.attributes, "errorStyle"); + assign(dataValidation, node.attributes, "errorTitle"); + assign(dataValidation, node.attributes, "error"); + this._dataValidation = dataValidation; + return true; + } + case "formula1": + case "formula2": + this._formula = []; + return true; + default: + return false; + } + } + parseText(text) { + if (this._formula) { + this._formula.push(text); + } + } + parseClose(name) { + switch (name) { + case "dataValidations": + return false; + case "dataValidation": { + if (!this._dataValidation.formulae || !this._dataValidation.formulae.length) { + delete this._dataValidation.formulae; + delete this._dataValidation.operator; + } + const list = this._address.split(/\s+/g) || []; + list.forEach((addr) => { + if (addr.includes(":")) { + const range = new Range(addr); + range.forEachAddress((address) => { + this.model[address] = this._dataValidation; + }); + } else { + this.model[addr] = this._dataValidation; + } + }); + return true; + } + case "formula1": + case "formula2": { + let formula = this._formula.join(""); + switch (this._dataValidation.type) { + case "whole": + case "textLength": + formula = parseInt(formula, 10); + break; + case "decimal": + formula = parseFloat(formula); + break; + case "date": + formula = utils.excelToDate(parseFloat(formula)); + break; + default: + break; + } + this._dataValidation.formulae.push(formula); + this._formula = void 0; + return true; + } + default: + return true; + } + } + }; + module2.exports = DataValidationsXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/page-setup-properties-xform.js +var require_page_setup_properties_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/page-setup-properties-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var PageSetupPropertiesXform = class extends BaseXform { + get tag() { + return "pageSetUpPr"; + } + render(xmlStream, model) { + if (model && model.fitToPage) { + xmlStream.leafNode(this.tag, { + fitToPage: model.fitToPage ? "1" : void 0 + }); + return true; + } + return false; + } + parseOpen(node) { + if (node.name === this.tag) { + this.model = { + fitToPage: node.attributes.fitToPage === "1" + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = PageSetupPropertiesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/outline-properties-xform.js +var require_outline_properties_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/outline-properties-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var isDefined = (attr) => typeof attr !== "undefined"; + var OutlinePropertiesXform = class extends BaseXform { + get tag() { + return "outlinePr"; + } + render(xmlStream, model) { + if (model && (isDefined(model.summaryBelow) || isDefined(model.summaryRight))) { + xmlStream.leafNode(this.tag, { + summaryBelow: isDefined(model.summaryBelow) ? Number(model.summaryBelow) : void 0, + summaryRight: isDefined(model.summaryRight) ? Number(model.summaryRight) : void 0 + }); + return true; + } + return false; + } + parseOpen(node) { + if (node.name === this.tag) { + this.model = { + summaryBelow: isDefined(node.attributes.summaryBelow) ? Boolean(Number(node.attributes.summaryBelow)) : void 0, + summaryRight: isDefined(node.attributes.summaryRight) ? Boolean(Number(node.attributes.summaryRight)) : void 0 + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = OutlinePropertiesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-properties-xform.js +var require_sheet_properties_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-properties-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var ColorXform = require_color_xform(); + var PageSetupPropertiesXform = require_page_setup_properties_xform(); + var OutlinePropertiesXform = require_outline_properties_xform(); + var SheetPropertiesXform = class extends BaseXform { + constructor() { + super(); + this.map = { + tabColor: new ColorXform("tabColor"), + pageSetUpPr: new PageSetupPropertiesXform(), + outlinePr: new OutlinePropertiesXform() + }; + } + get tag() { + return "sheetPr"; + } + render(xmlStream, model) { + if (model) { + xmlStream.addRollback(); + xmlStream.openNode("sheetPr"); + let inner = false; + inner = this.map.tabColor.render(xmlStream, model.tabColor) || inner; + inner = this.map.pageSetUpPr.render(xmlStream, model.pageSetup) || inner; + inner = this.map.outlinePr.render(xmlStream, model.outlineProperties) || inner; + if (inner) { + xmlStream.closeNode(); + xmlStream.commit(); + } else { + xmlStream.rollback(); + } + } + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + if (node.name === this.tag) { + this.reset(); + return true; + } + if (this.map[node.name]) { + this.parser = this.map[node.name]; + this.parser.parseOpen(node); + return true; + } + return false; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + return true; + } + return false; + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + if (this.map.tabColor.model || this.map.pageSetUpPr.model || this.map.outlinePr.model) { + this.model = {}; + if (this.map.tabColor.model) { + this.model.tabColor = this.map.tabColor.model; + } + if (this.map.pageSetUpPr.model) { + this.model.pageSetup = this.map.pageSetUpPr.model; + } + if (this.map.outlinePr.model) { + this.model.outlineProperties = this.map.outlinePr.model; + } + } else { + this.model = null; + } + return false; + } + }; + module2.exports = SheetPropertiesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-format-properties-xform.js +var require_sheet_format_properties_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-format-properties-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var BaseXform = require_base_xform(); + var SheetFormatPropertiesXform = class extends BaseXform { + get tag() { + return "sheetFormatPr"; + } + render(xmlStream, model) { + if (model) { + const attributes = { + defaultRowHeight: model.defaultRowHeight, + outlineLevelRow: model.outlineLevelRow, + outlineLevelCol: model.outlineLevelCol, + "x14ac:dyDescent": model.dyDescent + }; + if (model.defaultColWidth) { + attributes.defaultColWidth = model.defaultColWidth; + } + if (!model.defaultRowHeight || model.defaultRowHeight !== 15) { + attributes.customHeight = "1"; + } + if (_2.some(attributes, (value) => value !== void 0)) { + xmlStream.leafNode("sheetFormatPr", attributes); + } + } + } + parseOpen(node) { + if (node.name === "sheetFormatPr") { + this.model = { + defaultRowHeight: parseFloat(node.attributes.defaultRowHeight || "0"), + dyDescent: parseFloat(node.attributes["x14ac:dyDescent"] || "0"), + outlineLevelRow: parseInt(node.attributes.outlineLevelRow || "0", 10), + outlineLevelCol: parseInt(node.attributes.outlineLevelCol || "0", 10) + }; + if (node.attributes.defaultColWidth) { + this.model.defaultColWidth = parseFloat(node.attributes.defaultColWidth); + } + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = SheetFormatPropertiesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-view-xform.js +var require_sheet_view_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-view-xform.js"(exports2, module2) { + var colCache = require_col_cache(); + var BaseXform = require_base_xform(); + var VIEW_STATES = { + frozen: "frozen", + frozenSplit: "frozen", + split: "split" + }; + var SheetViewXform = class extends BaseXform { + get tag() { + return "sheetView"; + } + prepare(model) { + switch (model.state) { + case "frozen": + case "split": + break; + default: + model.state = "normal"; + break; + } + } + render(xmlStream, model) { + xmlStream.openNode("sheetView", { + workbookViewId: model.workbookViewId || 0 + }); + const add = function(name, value, included) { + if (included) { + xmlStream.addAttribute(name, value); + } + }; + add("rightToLeft", "1", model.rightToLeft === true); + add("tabSelected", "1", model.tabSelected); + add("showRuler", "0", model.showRuler === false); + add("showRowColHeaders", "0", model.showRowColHeaders === false); + add("showGridLines", "0", model.showGridLines === false); + add("zoomScale", model.zoomScale, model.zoomScale); + add("zoomScaleNormal", model.zoomScaleNormal, model.zoomScaleNormal); + add("view", model.style, model.style); + let topLeftCell; + let xSplit; + let ySplit; + let activePane; + switch (model.state) { + case "frozen": + xSplit = model.xSplit || 0; + ySplit = model.ySplit || 0; + topLeftCell = model.topLeftCell || colCache.getAddress(ySplit + 1, xSplit + 1).address; + activePane = model.xSplit && model.ySplit && "bottomRight" || model.xSplit && "topRight" || "bottomLeft"; + xmlStream.leafNode("pane", { + xSplit: model.xSplit || void 0, + ySplit: model.ySplit || void 0, + topLeftCell, + activePane, + state: "frozen" + }); + xmlStream.leafNode("selection", { + pane: activePane, + activeCell: model.activeCell, + sqref: model.activeCell + }); + break; + case "split": + if (model.activePane === "topLeft") { + model.activePane = void 0; + } + xmlStream.leafNode("pane", { + xSplit: model.xSplit || void 0, + ySplit: model.ySplit || void 0, + topLeftCell: model.topLeftCell, + activePane: model.activePane + }); + xmlStream.leafNode("selection", { + pane: model.activePane, + activeCell: model.activeCell, + sqref: model.activeCell + }); + break; + case "normal": + if (model.activeCell) { + xmlStream.leafNode("selection", { + activeCell: model.activeCell, + sqref: model.activeCell + }); + } + break; + default: + break; + } + xmlStream.closeNode(); + } + parseOpen(node) { + switch (node.name) { + case "sheetView": + this.sheetView = { + workbookViewId: parseInt(node.attributes.workbookViewId, 10), + rightToLeft: node.attributes.rightToLeft === "1", + tabSelected: node.attributes.tabSelected === "1", + showRuler: !(node.attributes.showRuler === "0"), + showRowColHeaders: !(node.attributes.showRowColHeaders === "0"), + showGridLines: !(node.attributes.showGridLines === "0"), + zoomScale: parseInt(node.attributes.zoomScale || "100", 10), + zoomScaleNormal: parseInt(node.attributes.zoomScaleNormal || "100", 10), + style: node.attributes.view + }; + this.pane = void 0; + this.selections = {}; + return true; + case "pane": + this.pane = { + xSplit: parseInt(node.attributes.xSplit || "0", 10), + ySplit: parseInt(node.attributes.ySplit || "0", 10), + topLeftCell: node.attributes.topLeftCell, + activePane: node.attributes.activePane || "topLeft", + state: node.attributes.state + }; + return true; + case "selection": { + const name = node.attributes.pane || "topLeft"; + this.selections[name] = { + pane: name, + activeCell: node.attributes.activeCell + }; + return true; + } + default: + return false; + } + } + parseText() { + } + parseClose(name) { + let model; + let selection; + switch (name) { + case "sheetView": + if (this.sheetView && this.pane) { + model = this.model = { + workbookViewId: this.sheetView.workbookViewId, + rightToLeft: this.sheetView.rightToLeft, + state: VIEW_STATES[this.pane.state] || "split", + // split is default + xSplit: this.pane.xSplit, + ySplit: this.pane.ySplit, + topLeftCell: this.pane.topLeftCell, + showRuler: this.sheetView.showRuler, + showRowColHeaders: this.sheetView.showRowColHeaders, + showGridLines: this.sheetView.showGridLines, + zoomScale: this.sheetView.zoomScale, + zoomScaleNormal: this.sheetView.zoomScaleNormal + }; + if (this.model.state === "split") { + model.activePane = this.pane.activePane; + } + selection = this.selections[this.pane.activePane]; + if (selection && selection.activeCell) { + model.activeCell = selection.activeCell; + } + if (this.sheetView.style) { + model.style = this.sheetView.style; + } + } else { + model = this.model = { + workbookViewId: this.sheetView.workbookViewId, + rightToLeft: this.sheetView.rightToLeft, + state: "normal", + showRuler: this.sheetView.showRuler, + showRowColHeaders: this.sheetView.showRowColHeaders, + showGridLines: this.sheetView.showGridLines, + zoomScale: this.sheetView.zoomScale, + zoomScaleNormal: this.sheetView.zoomScaleNormal + }; + selection = this.selections.topLeft; + if (selection && selection.activeCell) { + model.activeCell = selection.activeCell; + } + if (this.sheetView.style) { + model.style = this.sheetView.style; + } + } + return false; + default: + return true; + } + } + reconcile() { + } + }; + module2.exports = SheetViewXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-protection-xform.js +var require_sheet_protection_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-protection-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var BaseXform = require_base_xform(); + function booleanToXml(model, value) { + return model ? value : void 0; + } + function xmlToBoolean(value, equals) { + return value === equals ? true : void 0; + } + var SheetProtectionXform = class extends BaseXform { + get tag() { + return "sheetProtection"; + } + render(xmlStream, model) { + if (model) { + const attributes = { + sheet: booleanToXml(model.sheet, "1"), + selectLockedCells: model.selectLockedCells === false ? "1" : void 0, + selectUnlockedCells: model.selectUnlockedCells === false ? "1" : void 0, + formatCells: booleanToXml(model.formatCells, "0"), + formatColumns: booleanToXml(model.formatColumns, "0"), + formatRows: booleanToXml(model.formatRows, "0"), + insertColumns: booleanToXml(model.insertColumns, "0"), + insertRows: booleanToXml(model.insertRows, "0"), + insertHyperlinks: booleanToXml(model.insertHyperlinks, "0"), + deleteColumns: booleanToXml(model.deleteColumns, "0"), + deleteRows: booleanToXml(model.deleteRows, "0"), + sort: booleanToXml(model.sort, "0"), + autoFilter: booleanToXml(model.autoFilter, "0"), + pivotTables: booleanToXml(model.pivotTables, "0") + }; + if (model.sheet) { + attributes.algorithmName = model.algorithmName; + attributes.hashValue = model.hashValue; + attributes.saltValue = model.saltValue; + attributes.spinCount = model.spinCount; + attributes.objects = booleanToXml(model.objects === false, "1"); + attributes.scenarios = booleanToXml(model.scenarios === false, "1"); + } + if (_2.some(attributes, (value) => value !== void 0)) { + xmlStream.leafNode(this.tag, attributes); + } + } + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + sheet: xmlToBoolean(node.attributes.sheet, "1"), + objects: node.attributes.objects === "1" ? false : void 0, + scenarios: node.attributes.scenarios === "1" ? false : void 0, + selectLockedCells: node.attributes.selectLockedCells === "1" ? false : void 0, + selectUnlockedCells: node.attributes.selectUnlockedCells === "1" ? false : void 0, + formatCells: xmlToBoolean(node.attributes.formatCells, "0"), + formatColumns: xmlToBoolean(node.attributes.formatColumns, "0"), + formatRows: xmlToBoolean(node.attributes.formatRows, "0"), + insertColumns: xmlToBoolean(node.attributes.insertColumns, "0"), + insertRows: xmlToBoolean(node.attributes.insertRows, "0"), + insertHyperlinks: xmlToBoolean(node.attributes.insertHyperlinks, "0"), + deleteColumns: xmlToBoolean(node.attributes.deleteColumns, "0"), + deleteRows: xmlToBoolean(node.attributes.deleteRows, "0"), + sort: xmlToBoolean(node.attributes.sort, "0"), + autoFilter: xmlToBoolean(node.attributes.autoFilter, "0"), + pivotTables: xmlToBoolean(node.attributes.pivotTables, "0") + }; + if (node.attributes.algorithmName) { + this.model.algorithmName = node.attributes.algorithmName; + this.model.hashValue = node.attributes.hashValue; + this.model.saltValue = node.attributes.saltValue; + this.model.spinCount = parseInt(node.attributes.spinCount, 10); + } + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = SheetProtectionXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/page-margins-xform.js +var require_page_margins_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/page-margins-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var BaseXform = require_base_xform(); + var PageMarginsXform = class extends BaseXform { + get tag() { + return "pageMargins"; + } + render(xmlStream, model) { + if (model) { + const attributes = { + left: model.left, + right: model.right, + top: model.top, + bottom: model.bottom, + header: model.header, + footer: model.footer + }; + if (_2.some(attributes, (value) => value !== void 0)) { + xmlStream.leafNode(this.tag, attributes); + } + } + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + left: parseFloat(node.attributes.left || 0.7), + right: parseFloat(node.attributes.right || 0.7), + top: parseFloat(node.attributes.top || 0.75), + bottom: parseFloat(node.attributes.bottom || 0.75), + header: parseFloat(node.attributes.header || 0.3), + footer: parseFloat(node.attributes.footer || 0.3) + }; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = PageMarginsXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/page-setup-xform.js +var require_page_setup_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/page-setup-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var BaseXform = require_base_xform(); + function booleanToXml(model) { + return model ? "1" : void 0; + } + function pageOrderToXml(model) { + switch (model) { + case "overThenDown": + return model; + default: + return void 0; + } + } + function cellCommentsToXml(model) { + switch (model) { + case "atEnd": + case "asDisplyed": + return model; + default: + return void 0; + } + } + function errorsToXml(model) { + switch (model) { + case "dash": + case "blank": + case "NA": + return model; + default: + return void 0; + } + } + function pageSizeToModel(value) { + return value !== void 0 ? parseInt(value, 10) : void 0; + } + var PageSetupXform = class extends BaseXform { + get tag() { + return "pageSetup"; + } + render(xmlStream, model) { + if (model) { + const attributes = { + paperSize: model.paperSize, + orientation: model.orientation, + horizontalDpi: model.horizontalDpi, + verticalDpi: model.verticalDpi, + pageOrder: pageOrderToXml(model.pageOrder), + blackAndWhite: booleanToXml(model.blackAndWhite), + draft: booleanToXml(model.draft), + cellComments: cellCommentsToXml(model.cellComments), + errors: errorsToXml(model.errors), + scale: model.scale, + fitToWidth: model.fitToWidth, + fitToHeight: model.fitToHeight, + firstPageNumber: model.firstPageNumber, + useFirstPageNumber: booleanToXml(model.firstPageNumber), + usePrinterDefaults: booleanToXml(model.usePrinterDefaults), + copies: model.copies + }; + if (_2.some(attributes, (value) => value !== void 0)) { + xmlStream.leafNode(this.tag, attributes); + } + } + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + paperSize: pageSizeToModel(node.attributes.paperSize), + orientation: node.attributes.orientation || "portrait", + horizontalDpi: parseInt(node.attributes.horizontalDpi || "4294967295", 10), + verticalDpi: parseInt(node.attributes.verticalDpi || "4294967295", 10), + pageOrder: node.attributes.pageOrder || "downThenOver", + blackAndWhite: node.attributes.blackAndWhite === "1", + draft: node.attributes.draft === "1", + cellComments: node.attributes.cellComments || "None", + errors: node.attributes.errors || "displayed", + scale: parseInt(node.attributes.scale || "100", 10), + fitToWidth: parseInt(node.attributes.fitToWidth || "1", 10), + fitToHeight: parseInt(node.attributes.fitToHeight || "1", 10), + firstPageNumber: parseInt(node.attributes.firstPageNumber || "1", 10), + useFirstPageNumber: node.attributes.useFirstPageNumber === "1", + usePrinterDefaults: node.attributes.usePrinterDefaults === "1", + copies: parseInt(node.attributes.copies || "1", 10) + }; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = PageSetupXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/print-options-xform.js +var require_print_options_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/print-options-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var BaseXform = require_base_xform(); + function booleanToXml(model) { + return model ? "1" : void 0; + } + var PrintOptionsXform = class extends BaseXform { + get tag() { + return "printOptions"; + } + render(xmlStream, model) { + if (model) { + const attributes = { + headings: booleanToXml(model.showRowColHeaders), + gridLines: booleanToXml(model.showGridLines), + horizontalCentered: booleanToXml(model.horizontalCentered), + verticalCentered: booleanToXml(model.verticalCentered) + }; + if (_2.some(attributes, (value) => value !== void 0)) { + xmlStream.leafNode(this.tag, attributes); + } + } + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + showRowColHeaders: node.attributes.headings === "1", + showGridLines: node.attributes.gridLines === "1", + horizontalCentered: node.attributes.horizontalCentered === "1", + verticalCentered: node.attributes.verticalCentered === "1" + }; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = PrintOptionsXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/auto-filter-xform.js +var require_auto_filter_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/auto-filter-xform.js"(exports2, module2) { + var colCache = require_col_cache(); + var BaseXform = require_base_xform(); + var AutoFilterXform = class extends BaseXform { + get tag() { + return "autoFilter"; + } + render(xmlStream, model) { + if (model) { + if (typeof model === "string") { + xmlStream.leafNode("autoFilter", { ref: model }); + } else { + const getAddress = function(addr) { + if (typeof addr === "string") { + return addr; + } + return colCache.getAddress(addr.row, addr.column).address; + }; + const firstAddress = getAddress(model.from); + const secondAddress = getAddress(model.to); + if (firstAddress && secondAddress) { + xmlStream.leafNode("autoFilter", { ref: `${firstAddress}:${secondAddress}` }); + } + } + } + } + parseOpen(node) { + if (node.name === "autoFilter") { + this.model = node.attributes.ref; + } + } + }; + module2.exports = AutoFilterXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/picture-xform.js +var require_picture_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/picture-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var PictureXform = class extends BaseXform { + get tag() { + return "picture"; + } + render(xmlStream, model) { + if (model) { + xmlStream.leafNode(this.tag, { "r:id": model.rId }); + } + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + rId: node.attributes["r:id"] + }; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = PictureXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/drawing-xform.js +var require_drawing_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/drawing-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var DrawingXform = class extends BaseXform { + get tag() { + return "drawing"; + } + render(xmlStream, model) { + if (model) { + xmlStream.leafNode(this.tag, { "r:id": model.rId }); + } + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + rId: node.attributes["r:id"] + }; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = DrawingXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/table-part-xform.js +var require_table_part_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/table-part-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var TablePartXform = class extends BaseXform { + get tag() { + return "tablePart"; + } + render(xmlStream, model) { + if (model) { + xmlStream.leafNode(this.tag, { "r:id": model.rId }); + } + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + rId: node.attributes["r:id"] + }; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = TablePartXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/page-breaks-xform.js +var require_page_breaks_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/page-breaks-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var PageBreaksXform = class extends BaseXform { + get tag() { + return "brk"; + } + render(xmlStream, model) { + xmlStream.leafNode("brk", model); + } + parseOpen(node) { + if (node.name === "brk") { + this.model = node.attributes.ref; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = PageBreaksXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/row-breaks-xform.js +var require_row_breaks_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/row-breaks-xform.js"(exports2, module2) { + "use strict"; + var PageBreaksXform = require_page_breaks_xform(); + var ListXform = require_list_xform(); + var RowBreaksXform = class extends ListXform { + constructor() { + const options = { + tag: "rowBreaks", + count: true, + childXform: new PageBreaksXform() + }; + super(options); + } + // get tag() { return 'rowBreaks'; } + render(xmlStream, model) { + if (model && model.length) { + xmlStream.openNode(this.tag, this.$); + if (this.count) { + xmlStream.addAttribute(this.$count, model.length); + xmlStream.addAttribute("manualBreakCount", model.length); + } + const { childXform } = this; + model.forEach((childModel) => { + childXform.render(xmlStream, childModel); + }); + xmlStream.closeNode(); + } else if (this.empty) { + xmlStream.leafNode(this.tag); + } + } + }; + module2.exports = RowBreaksXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/header-footer-xform.js +var require_header_footer_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/header-footer-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var HeaderFooterXform = class extends BaseXform { + get tag() { + return "headerFooter"; + } + render(xmlStream, model) { + if (model) { + xmlStream.addRollback(); + let createTag = false; + xmlStream.openNode("headerFooter"); + if (model.differentFirst) { + xmlStream.addAttribute("differentFirst", "1"); + createTag = true; + } + if (model.differentOddEven) { + xmlStream.addAttribute("differentOddEven", "1"); + createTag = true; + } + if (model.oddHeader && typeof model.oddHeader === "string") { + xmlStream.leafNode("oddHeader", null, model.oddHeader); + createTag = true; + } + if (model.oddFooter && typeof model.oddFooter === "string") { + xmlStream.leafNode("oddFooter", null, model.oddFooter); + createTag = true; + } + if (model.evenHeader && typeof model.evenHeader === "string") { + xmlStream.leafNode("evenHeader", null, model.evenHeader); + createTag = true; + } + if (model.evenFooter && typeof model.evenFooter === "string") { + xmlStream.leafNode("evenFooter", null, model.evenFooter); + createTag = true; + } + if (model.firstHeader && typeof model.firstHeader === "string") { + xmlStream.leafNode("firstHeader", null, model.firstHeader); + createTag = true; + } + if (model.firstFooter && typeof model.firstFooter === "string") { + xmlStream.leafNode("firstFooter", null, model.firstFooter); + createTag = true; + } + if (createTag) { + xmlStream.closeNode(); + xmlStream.commit(); + } else { + xmlStream.rollback(); + } + } + } + parseOpen(node) { + switch (node.name) { + case "headerFooter": + this.model = {}; + if (node.attributes.differentFirst) { + this.model.differentFirst = parseInt(node.attributes.differentFirst, 0) === 1; + } + if (node.attributes.differentOddEven) { + this.model.differentOddEven = parseInt(node.attributes.differentOddEven, 0) === 1; + } + return true; + case "oddHeader": + this.currentNode = "oddHeader"; + return true; + case "oddFooter": + this.currentNode = "oddFooter"; + return true; + case "evenHeader": + this.currentNode = "evenHeader"; + return true; + case "evenFooter": + this.currentNode = "evenFooter"; + return true; + case "firstHeader": + this.currentNode = "firstHeader"; + return true; + case "firstFooter": + this.currentNode = "firstFooter"; + return true; + default: + return false; + } + } + parseText(text) { + switch (this.currentNode) { + case "oddHeader": + this.model.oddHeader = text; + break; + case "oddFooter": + this.model.oddFooter = text; + break; + case "evenHeader": + this.model.evenHeader = text; + break; + case "evenFooter": + this.model.evenFooter = text; + break; + case "firstHeader": + this.model.firstHeader = text; + break; + case "firstFooter": + this.model.firstFooter = text; + break; + default: + break; + } + } + parseClose() { + switch (this.currentNode) { + case "oddHeader": + case "oddFooter": + case "evenHeader": + case "evenFooter": + case "firstHeader": + case "firstFooter": + this.currentNode = void 0; + return true; + default: + return false; + } + } + }; + module2.exports = HeaderFooterXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/composite-xform.js +var require_composite_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/composite-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CompositeXform = class extends BaseXform { + createNewModel(node) { + return {}; + } + parseOpen(node) { + this.parser = this.parser || this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + if (node.name === this.tag) { + this.model = this.createNewModel(node); + return true; + } + return false; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + onParserClose(name, parser) { + this.model[name] = parser.model; + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.onParserClose(name, this.parser); + this.parser = void 0; + } + return true; + } + return name !== this.tag; + } + }; + module2.exports = CompositeXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/cfvo-xform.js +var require_cfvo_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/cfvo-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CfvoXform = class extends BaseXform { + get tag() { + return "cfvo"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, { + type: model.type, + val: model.value + }); + } + parseOpen(node) { + this.model = { + type: node.attributes.type, + value: BaseXform.toFloatValue(node.attributes.val) + }; + } + parseClose(name) { + return name !== this.tag; + } + }; + module2.exports = CfvoXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/databar-xform.js +var require_databar_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/databar-xform.js"(exports2, module2) { + var CompositeXform = require_composite_xform(); + var ColorXform = require_color_xform(); + var CfvoXform = require_cfvo_xform(); + var DatabarXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + cfvo: this.cfvoXform = new CfvoXform(), + color: this.colorXform = new ColorXform() + }; + } + get tag() { + return "dataBar"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + model.cfvo.forEach((cfvo) => { + this.cfvoXform.render(xmlStream, cfvo); + }); + this.colorXform.render(xmlStream, model.color); + xmlStream.closeNode(); + } + createNewModel() { + return { + cfvo: [] + }; + } + onParserClose(name, parser) { + switch (name) { + case "cfvo": + this.model.cfvo.push(parser.model); + break; + case "color": + this.model.color = parser.model; + break; + } + } + }; + module2.exports = DatabarXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/ext-lst-ref-xform.js +var require_ext_lst_ref_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/ext-lst-ref-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CompositeXform = require_composite_xform(); + var X14IdXform = class extends BaseXform { + get tag() { + return "x14:id"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, null, model); + } + parseOpen() { + this.model = ""; + } + parseText(text) { + this.model += text; + } + parseClose(name) { + return name !== this.tag; + } + }; + var ExtXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + "x14:id": this.idXform = new X14IdXform() + }; + } + get tag() { + return "ext"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { + uri: "{B025F937-C7B1-47D3-B67F-A62EFF666E3E}", + "xmlns:x14": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" + }); + this.idXform.render(xmlStream, model.x14Id); + xmlStream.closeNode(); + } + createNewModel() { + return {}; + } + onParserClose(name, parser) { + this.model.x14Id = parser.model; + } + }; + var ExtLstRefXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + ext: new ExtXform() + }; + } + get tag() { + return "extLst"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + this.map.ext.render(xmlStream, model); + xmlStream.closeNode(); + } + createNewModel() { + return {}; + } + onParserClose(name, parser) { + Object.assign(this.model, parser.model); + } + }; + module2.exports = ExtLstRefXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/formula-xform.js +var require_formula_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/formula-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var FormulaXform = class extends BaseXform { + get tag() { + return "formula"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, null, model); + } + parseOpen() { + this.model = ""; + } + parseText(text) { + this.model += text; + } + parseClose(name) { + return name !== this.tag; + } + }; + module2.exports = FormulaXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/color-scale-xform.js +var require_color_scale_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/color-scale-xform.js"(exports2, module2) { + var CompositeXform = require_composite_xform(); + var ColorXform = require_color_xform(); + var CfvoXform = require_cfvo_xform(); + var ColorScaleXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + cfvo: this.cfvoXform = new CfvoXform(), + color: this.colorXform = new ColorXform() + }; + } + get tag() { + return "colorScale"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + model.cfvo.forEach((cfvo) => { + this.cfvoXform.render(xmlStream, cfvo); + }); + model.color.forEach((color) => { + this.colorXform.render(xmlStream, color); + }); + xmlStream.closeNode(); + } + createNewModel(node) { + return { + cfvo: [], + color: [] + }; + } + onParserClose(name, parser) { + this.model[name].push(parser.model); + } + }; + module2.exports = ColorScaleXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/icon-set-xform.js +var require_icon_set_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/icon-set-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CompositeXform = require_composite_xform(); + var CfvoXform = require_cfvo_xform(); + var IconSetXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + cfvo: this.cfvoXform = new CfvoXform() + }; + } + get tag() { + return "iconSet"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { + iconSet: BaseXform.toStringAttribute(model.iconSet, "3TrafficLights"), + reverse: BaseXform.toBoolAttribute(model.reverse, false), + showValue: BaseXform.toBoolAttribute(model.showValue, true) + }); + model.cfvo.forEach((cfvo) => { + this.cfvoXform.render(xmlStream, cfvo); + }); + xmlStream.closeNode(); + } + createNewModel({ attributes }) { + return { + iconSet: BaseXform.toStringValue(attributes.iconSet, "3TrafficLights"), + reverse: BaseXform.toBoolValue(attributes.reverse), + showValue: BaseXform.toBoolValue(attributes.showValue), + cfvo: [] + }; + } + onParserClose(name, parser) { + this.model[name].push(parser.model); + } + }; + module2.exports = IconSetXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/cf-rule-xform.js +var require_cf_rule_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/cf-rule-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CompositeXform = require_composite_xform(); + var Range = require_range4(); + var DatabarXform = require_databar_xform(); + var ExtLstRefXform = require_ext_lst_ref_xform(); + var FormulaXform = require_formula_xform(); + var ColorScaleXform = require_color_scale_xform(); + var IconSetXform = require_icon_set_xform(); + var extIcons = { + "3Triangles": true, + "3Stars": true, + "5Boxes": true + }; + var getTextFormula = (model) => { + if (model.formulae && model.formulae[0]) { + return model.formulae[0]; + } + const range = new Range(model.ref); + const { tl } = range; + switch (model.operator) { + case "containsText": + return `NOT(ISERROR(SEARCH("${model.text}",${tl})))`; + case "containsBlanks": + return `LEN(TRIM(${tl}))=0`; + case "notContainsBlanks": + return `LEN(TRIM(${tl}))>0`; + case "containsErrors": + return `ISERROR(${tl})`; + case "notContainsErrors": + return `NOT(ISERROR(${tl}))`; + default: + return void 0; + } + }; + var getTimePeriodFormula = (model) => { + if (model.formulae && model.formulae[0]) { + return model.formulae[0]; + } + const range = new Range(model.ref); + const { tl } = range; + switch (model.timePeriod) { + case "thisWeek": + return `AND(TODAY()-ROUNDDOWN(${tl},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${tl},0)-TODAY()<=7-WEEKDAY(TODAY()))`; + case "lastWeek": + return `AND(TODAY()-ROUNDDOWN(${tl},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${tl},0)<(WEEKDAY(TODAY())+7))`; + case "nextWeek": + return `AND(ROUNDDOWN(${tl},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${tl},0)-TODAY()<(15-WEEKDAY(TODAY())))`; + case "yesterday": + return `FLOOR(${tl},1)=TODAY()-1`; + case "today": + return `FLOOR(${tl},1)=TODAY()`; + case "tomorrow": + return `FLOOR(${tl},1)=TODAY()+1`; + case "last7Days": + return `AND(TODAY()-FLOOR(${tl},1)<=6,FLOOR(${tl},1)<=TODAY())`; + case "lastMonth": + return `AND(MONTH(${tl})=MONTH(EDATE(TODAY(),0-1)),YEAR(${tl})=YEAR(EDATE(TODAY(),0-1)))`; + case "thisMonth": + return `AND(MONTH(${tl})=MONTH(TODAY()),YEAR(${tl})=YEAR(TODAY()))`; + case "nextMonth": + return `AND(MONTH(${tl})=MONTH(EDATE(TODAY(),0+1)),YEAR(${tl})=YEAR(EDATE(TODAY(),0+1)))`; + default: + return void 0; + } + }; + var opType = (attributes) => { + const { type, operator } = attributes; + switch (type) { + case "containsText": + case "containsBlanks": + case "notContainsBlanks": + case "containsErrors": + case "notContainsErrors": + return { + type: "containsText", + operator: type + }; + default: + return { type, operator }; + } + }; + var CfRuleXform = class _CfRuleXform extends CompositeXform { + constructor() { + super(); + this.map = { + dataBar: this.databarXform = new DatabarXform(), + extLst: this.extLstRefXform = new ExtLstRefXform(), + formula: this.formulaXform = new FormulaXform(), + colorScale: this.colorScaleXform = new ColorScaleXform(), + iconSet: this.iconSetXform = new IconSetXform() + }; + } + get tag() { + return "cfRule"; + } + static isPrimitive(rule) { + if (rule.type === "iconSet") { + if (rule.custom || extIcons[rule.iconSet]) { + return false; + } + } + return true; + } + render(xmlStream, model) { + switch (model.type) { + case "expression": + this.renderExpression(xmlStream, model); + break; + case "cellIs": + this.renderCellIs(xmlStream, model); + break; + case "top10": + this.renderTop10(xmlStream, model); + break; + case "aboveAverage": + this.renderAboveAverage(xmlStream, model); + break; + case "dataBar": + this.renderDataBar(xmlStream, model); + break; + case "colorScale": + this.renderColorScale(xmlStream, model); + break; + case "iconSet": + this.renderIconSet(xmlStream, model); + break; + case "containsText": + this.renderText(xmlStream, model); + break; + case "timePeriod": + this.renderTimePeriod(xmlStream, model); + break; + } + } + renderExpression(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: "expression", + dxfId: model.dxfId, + priority: model.priority + }); + this.formulaXform.render(xmlStream, model.formulae[0]); + xmlStream.closeNode(); + } + renderCellIs(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: "cellIs", + dxfId: model.dxfId, + priority: model.priority, + operator: model.operator + }); + model.formulae.forEach((formula) => { + this.formulaXform.render(xmlStream, formula); + }); + xmlStream.closeNode(); + } + renderTop10(xmlStream, model) { + xmlStream.leafNode(this.tag, { + type: "top10", + dxfId: model.dxfId, + priority: model.priority, + percent: BaseXform.toBoolAttribute(model.percent, false), + bottom: BaseXform.toBoolAttribute(model.bottom, false), + rank: BaseXform.toIntValue(model.rank, 10, true) + }); + } + renderAboveAverage(xmlStream, model) { + xmlStream.leafNode(this.tag, { + type: "aboveAverage", + dxfId: model.dxfId, + priority: model.priority, + aboveAverage: BaseXform.toBoolAttribute(model.aboveAverage, true) + }); + } + renderDataBar(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: "dataBar", + priority: model.priority + }); + this.databarXform.render(xmlStream, model); + this.extLstRefXform.render(xmlStream, model); + xmlStream.closeNode(); + } + renderColorScale(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: "colorScale", + priority: model.priority + }); + this.colorScaleXform.render(xmlStream, model); + xmlStream.closeNode(); + } + renderIconSet(xmlStream, model) { + if (!_CfRuleXform.isPrimitive(model)) { + return; + } + xmlStream.openNode(this.tag, { + type: "iconSet", + priority: model.priority + }); + this.iconSetXform.render(xmlStream, model); + xmlStream.closeNode(); + } + renderText(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: model.operator, + dxfId: model.dxfId, + priority: model.priority, + operator: BaseXform.toStringAttribute(model.operator, "containsText") + }); + const formula = getTextFormula(model); + if (formula) { + this.formulaXform.render(xmlStream, formula); + } + xmlStream.closeNode(); + } + renderTimePeriod(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: "timePeriod", + dxfId: model.dxfId, + priority: model.priority, + timePeriod: model.timePeriod + }); + const formula = getTimePeriodFormula(model); + if (formula) { + this.formulaXform.render(xmlStream, formula); + } + xmlStream.closeNode(); + } + createNewModel({ attributes }) { + return { + ...opType(attributes), + dxfId: BaseXform.toIntValue(attributes.dxfId), + priority: BaseXform.toIntValue(attributes.priority), + timePeriod: attributes.timePeriod, + percent: BaseXform.toBoolValue(attributes.percent), + bottom: BaseXform.toBoolValue(attributes.bottom), + rank: BaseXform.toIntValue(attributes.rank), + aboveAverage: BaseXform.toBoolValue(attributes.aboveAverage) + }; + } + onParserClose(name, parser) { + switch (name) { + case "dataBar": + case "extLst": + case "colorScale": + case "iconSet": + Object.assign(this.model, parser.model); + break; + case "formula": + this.model.formulae = this.model.formulae || []; + this.model.formulae.push(parser.model); + break; + } + } + }; + module2.exports = CfRuleXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/conditional-formatting-xform.js +var require_conditional_formatting_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/conditional-formatting-xform.js"(exports2, module2) { + var CompositeXform = require_composite_xform(); + var CfRuleXform = require_cf_rule_xform(); + var ConditionalFormattingXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + cfRule: new CfRuleXform() + }; + } + get tag() { + return "conditionalFormatting"; + } + render(xmlStream, model) { + if (!model.rules.some(CfRuleXform.isPrimitive)) { + return; + } + xmlStream.openNode(this.tag, { sqref: model.ref }); + model.rules.forEach((rule) => { + if (CfRuleXform.isPrimitive(rule)) { + rule.ref = model.ref; + this.map.cfRule.render(xmlStream, rule); + } + }); + xmlStream.closeNode(); + } + createNewModel({ attributes }) { + return { + ref: attributes.sqref, + rules: [] + }; + } + onParserClose(name, parser) { + this.model.rules.push(parser.model); + } + }; + module2.exports = ConditionalFormattingXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/conditional-formattings-xform.js +var require_conditional_formattings_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/conditional-formattings-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var ConditionalFormattingXform = require_conditional_formatting_xform(); + var ConditionalFormattingsXform = class extends BaseXform { + constructor() { + super(); + this.cfXform = new ConditionalFormattingXform(); + } + get tag() { + return "conditionalFormatting"; + } + reset() { + this.model = []; + } + prepare(model, options) { + let nextPriority = model.reduce( + (p, cf) => Math.max(p, ...cf.rules.map((rule) => rule.priority || 0)), + 1 + ); + model.forEach((cf) => { + cf.rules.forEach((rule) => { + if (!rule.priority) { + rule.priority = nextPriority++; + } + if (rule.style) { + rule.dxfId = options.styles.addDxfStyle(rule.style); + } + }); + }); + } + render(xmlStream, model) { + model.forEach((cf) => { + this.cfXform.render(xmlStream, cf); + }); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "conditionalFormatting": + this.parser = this.cfXform; + this.parser.parseOpen(node); + return true; + default: + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.push(this.parser.model); + this.parser = void 0; + return false; + } + return true; + } + return false; + } + reconcile(model, options) { + model.forEach((cf) => { + cf.rules.forEach((rule) => { + if (rule.dxfId !== void 0) { + rule.style = options.styles.getDxfStyle(rule.dxfId); + delete rule.dxfId; + } + }); + }); + } + }; + module2.exports = ConditionalFormattingsXform; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/rng.js +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + import_crypto.default.randomFillSync(rnds8Pool); + poolPtr = 0; + } + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} +var import_crypto, rnds8Pool, poolPtr; +var init_rng = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/rng.js"() { + import_crypto = __toESM(require("crypto")); + rnds8Pool = new Uint8Array(256); + poolPtr = rnds8Pool.length; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/regex.js +var regex_default; +var init_regex = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/regex.js"() { + regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/validate.js +function validate(uuid) { + return typeof uuid === "string" && regex_default.test(uuid); +} +var validate_default; +var init_validate = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/validate.js"() { + init_regex(); + validate_default = validate; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/stringify.js +function stringify(arr, offset = 0) { + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); + if (!validate_default(uuid)) { + throw TypeError("Stringified UUID is invalid"); + } + return uuid; +} +var byteToHex, stringify_default; +var init_stringify = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/stringify.js"() { + init_validate(); + byteToHex = []; + for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 256).toString(16).substr(1)); + } + stringify_default = stringify; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v1.js +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq; + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || rng)(); + if (node == null) { + node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + if (clockseq == null) { + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383; + } + } + let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); + let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1; + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4; + if (dt < 0 && options.clockseq === void 0) { + clockseq = clockseq + 1 & 16383; + } + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) { + nsecs = 0; + } + if (nsecs >= 1e4) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + msecs += 122192928e5; + const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; + b[i++] = tl >>> 24 & 255; + b[i++] = tl >>> 16 & 255; + b[i++] = tl >>> 8 & 255; + b[i++] = tl & 255; + const tmh = msecs / 4294967296 * 1e4 & 268435455; + b[i++] = tmh >>> 8 & 255; + b[i++] = tmh & 255; + b[i++] = tmh >>> 24 & 15 | 16; + b[i++] = tmh >>> 16 & 255; + b[i++] = clockseq >>> 8 | 128; + b[i++] = clockseq & 255; + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + return buf || stringify_default(b); +} +var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default; +var init_v1 = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v1.js"() { + init_rng(); + init_stringify(); + _lastMSecs = 0; + _lastNSecs = 0; + v1_default = v1; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/parse.js +function parse(uuid) { + if (!validate_default(uuid)) { + throw TypeError("Invalid UUID"); + } + let v; + const arr = new Uint8Array(16); + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 255; + arr[2] = v >>> 8 & 255; + arr[3] = v & 255; + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 255; + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 255; + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 255; + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; + arr[11] = v / 4294967296 & 255; + arr[12] = v >>> 24 & 255; + arr[13] = v >>> 16 & 255; + arr[14] = v >>> 8 & 255; + arr[15] = v & 255; + return arr; +} +var parse_default; +var init_parse = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/parse.js"() { + init_validate(); + parse_default = parse; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v35.js +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); + const bytes = []; + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + return bytes; +} +function v35_default(name, version2, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === "string") { + value = stringToBytes(value); + } + if (typeof namespace === "string") { + namespace = parse_default(namespace); + } + if (namespace.length !== 16) { + throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); + } + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 15 | version2; + bytes[8] = bytes[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + return buf; + } + return stringify_default(bytes); + } + try { + generateUUID.name = name; + } catch (err) { + } + generateUUID.DNS = DNS; + generateUUID.URL = URL2; + return generateUUID; +} +var DNS, URL2; +var init_v35 = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v35.js"() { + init_stringify(); + init_parse(); + DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; + URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/md5.js +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto2.default.createHash("md5").update(bytes).digest(); +} +var import_crypto2, md5_default; +var init_md5 = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/md5.js"() { + import_crypto2 = __toESM(require("crypto")); + md5_default = md5; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v3.js +var v3, v3_default; +var init_v3 = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v3.js"() { + init_v35(); + init_md5(); + v3 = v35_default("v3", 48, md5_default); + v3_default = v3; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v4.js +function v4(options, buf, offset) { + options = options || {}; + const rnds = options.random || (options.rng || rng)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + return buf; + } + return stringify_default(rnds); +} +var v4_default; +var init_v4 = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v4.js"() { + init_rng(); + init_stringify(); + v4_default = v4; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/sha1.js +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto3.default.createHash("sha1").update(bytes).digest(); +} +var import_crypto3, sha1_default; +var init_sha1 = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/sha1.js"() { + import_crypto3 = __toESM(require("crypto")); + sha1_default = sha1; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v5.js +var v5, v5_default; +var init_v5 = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v5.js"() { + init_v35(); + init_sha1(); + v5 = v35_default("v5", 80, sha1_default); + v5_default = v5; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/nil.js +var nil_default; +var init_nil = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/nil.js"() { + nil_default = "00000000-0000-0000-0000-000000000000"; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/version.js +function version(uuid) { + if (!validate_default(uuid)) { + throw TypeError("Invalid UUID"); + } + return parseInt(uuid.substr(14, 1), 16); +} +var version_default; +var init_version = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/version.js"() { + init_validate(); + version_default = version; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/index.js +var esm_node_exports = {}; +__export(esm_node_exports, { + NIL: () => nil_default, + parse: () => parse_default, + stringify: () => stringify_default, + v1: () => v1_default, + v3: () => v3_default, + v4: () => v4_default, + v5: () => v5_default, + validate: () => validate_default, + version: () => version_default +}); +var init_esm_node = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/index.js"() { + init_v1(); + init_v3(); + init_v4(); + init_v5(); + init_nil(); + init_version(); + init_validate(); + init_stringify(); + init_parse(); + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/f-ext-xform.js +var require_f_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/f-ext-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var FExtXform = class extends BaseXform { + get tag() { + return "xm:f"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, null, model); + } + parseOpen() { + this.model = ""; + } + parseText(text) { + this.model += text; + } + parseClose(name) { + return name !== this.tag; + } + }; + module2.exports = FExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/cfvo-ext-xform.js +var require_cfvo_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/cfvo-ext-xform.js"(exports2, module2) { + var CompositeXform = require_composite_xform(); + var FExtXform = require_f_ext_xform(); + var CfvoExtXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + "xm:f": this.fExtXform = new FExtXform() + }; + } + get tag() { + return "x14:cfvo"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: model.type + }); + if (model.value !== void 0) { + this.fExtXform.render(xmlStream, model.value); + } + xmlStream.closeNode(); + } + createNewModel(node) { + return { + type: node.attributes.type + }; + } + onParserClose(name, parser) { + switch (name) { + case "xm:f": + this.model.value = parser.model ? parseFloat(parser.model) : 0; + break; + } + } + }; + module2.exports = CfvoExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/databar-ext-xform.js +var require_databar_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/databar-ext-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CompositeXform = require_composite_xform(); + var ColorXform = require_color_xform(); + var CfvoExtXform = require_cfvo_ext_xform(); + var DatabarExtXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + "x14:cfvo": this.cfvoXform = new CfvoExtXform(), + "x14:borderColor": this.borderColorXform = new ColorXform("x14:borderColor"), + "x14:negativeBorderColor": this.negativeBorderColorXform = new ColorXform( + "x14:negativeBorderColor" + ), + "x14:negativeFillColor": this.negativeFillColorXform = new ColorXform( + "x14:negativeFillColor" + ), + "x14:axisColor": this.axisColorXform = new ColorXform("x14:axisColor") + }; + } + static isExt(rule) { + return !rule.gradient; + } + get tag() { + return "x14:dataBar"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { + minLength: BaseXform.toIntAttribute(model.minLength, 0, true), + maxLength: BaseXform.toIntAttribute(model.maxLength, 100, true), + border: BaseXform.toBoolAttribute(model.border, false), + gradient: BaseXform.toBoolAttribute(model.gradient, true), + negativeBarColorSameAsPositive: BaseXform.toBoolAttribute( + model.negativeBarColorSameAsPositive, + true + ), + negativeBarBorderColorSameAsPositive: BaseXform.toBoolAttribute( + model.negativeBarBorderColorSameAsPositive, + true + ), + axisPosition: BaseXform.toAttribute(model.axisPosition, "auto"), + direction: BaseXform.toAttribute(model.direction, "leftToRight") + }); + model.cfvo.forEach((cfvo) => { + this.cfvoXform.render(xmlStream, cfvo); + }); + this.borderColorXform.render(xmlStream, model.borderColor); + this.negativeBorderColorXform.render(xmlStream, model.negativeBorderColor); + this.negativeFillColorXform.render(xmlStream, model.negativeFillColor); + this.axisColorXform.render(xmlStream, model.axisColor); + xmlStream.closeNode(); + } + createNewModel({ attributes }) { + return { + cfvo: [], + minLength: BaseXform.toIntValue(attributes.minLength, 0), + maxLength: BaseXform.toIntValue(attributes.maxLength, 100), + border: BaseXform.toBoolValue(attributes.border, false), + gradient: BaseXform.toBoolValue(attributes.gradient, true), + negativeBarColorSameAsPositive: BaseXform.toBoolValue( + attributes.negativeBarColorSameAsPositive, + true + ), + negativeBarBorderColorSameAsPositive: BaseXform.toBoolValue( + attributes.negativeBarBorderColorSameAsPositive, + true + ), + axisPosition: BaseXform.toStringValue(attributes.axisPosition, "auto"), + direction: BaseXform.toStringValue(attributes.direction, "leftToRight") + }; + } + onParserClose(name, parser) { + const [, prop] = name.split(":"); + switch (prop) { + case "cfvo": + this.model.cfvo.push(parser.model); + break; + default: + this.model[prop] = parser.model; + break; + } + } + }; + module2.exports = DatabarExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/cf-icon-ext-xform.js +var require_cf_icon_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/cf-icon-ext-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CfIconExtXform = class extends BaseXform { + get tag() { + return "x14:cfIcon"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, { + iconSet: model.iconSet, + iconId: model.iconId + }); + } + parseOpen({ attributes }) { + this.model = { + iconSet: attributes.iconSet, + iconId: BaseXform.toIntValue(attributes.iconId) + }; + } + parseClose(name) { + return name !== this.tag; + } + }; + module2.exports = CfIconExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/icon-set-ext-xform.js +var require_icon_set_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/icon-set-ext-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CompositeXform = require_composite_xform(); + var CfvoExtXform = require_cfvo_ext_xform(); + var CfIconExtXform = require_cf_icon_ext_xform(); + var IconSetExtXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + "x14:cfvo": this.cfvoXform = new CfvoExtXform(), + "x14:cfIcon": this.cfIconXform = new CfIconExtXform() + }; + } + get tag() { + return "x14:iconSet"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { + iconSet: BaseXform.toStringAttribute(model.iconSet), + reverse: BaseXform.toBoolAttribute(model.reverse, false), + showValue: BaseXform.toBoolAttribute(model.showValue, true), + custom: BaseXform.toBoolAttribute(model.icons, false) + }); + model.cfvo.forEach((cfvo) => { + this.cfvoXform.render(xmlStream, cfvo); + }); + if (model.icons) { + model.icons.forEach((icon, i) => { + icon.iconId = i; + this.cfIconXform.render(xmlStream, icon); + }); + } + xmlStream.closeNode(); + } + createNewModel({ attributes }) { + return { + cfvo: [], + iconSet: BaseXform.toStringValue(attributes.iconSet, "3TrafficLights"), + reverse: BaseXform.toBoolValue(attributes.reverse, false), + showValue: BaseXform.toBoolValue(attributes.showValue, true) + }; + } + onParserClose(name, parser) { + const [, prop] = name.split(":"); + switch (prop) { + case "cfvo": + this.model.cfvo.push(parser.model); + break; + case "cfIcon": + if (!this.model.icons) { + this.model.icons = []; + } + this.model.icons.push(parser.model); + break; + default: + this.model[prop] = parser.model; + break; + } + } + }; + module2.exports = IconSetExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/cf-rule-ext-xform.js +var require_cf_rule_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/cf-rule-ext-xform.js"(exports2, module2) { + var { v4: uuidv4 } = (init_esm_node(), __toCommonJS(esm_node_exports)); + var BaseXform = require_base_xform(); + var CompositeXform = require_composite_xform(); + var DatabarExtXform = require_databar_ext_xform(); + var IconSetExtXform = require_icon_set_ext_xform(); + var extIcons = { + "3Triangles": true, + "3Stars": true, + "5Boxes": true + }; + var CfRuleExtXform = class _CfRuleExtXform extends CompositeXform { + constructor() { + super(); + this.map = { + "x14:dataBar": this.databarXform = new DatabarExtXform(), + "x14:iconSet": this.iconSetXform = new IconSetExtXform() + }; + } + get tag() { + return "x14:cfRule"; + } + static isExt(rule) { + if (rule.type === "dataBar") { + return DatabarExtXform.isExt(rule); + } + if (rule.type === "iconSet") { + if (rule.custom || extIcons[rule.iconSet]) { + return true; + } + } + return false; + } + prepare(model) { + if (_CfRuleExtXform.isExt(model)) { + model.x14Id = `{${uuidv4()}}`.toUpperCase(); + } + } + render(xmlStream, model) { + if (!_CfRuleExtXform.isExt(model)) { + return; + } + switch (model.type) { + case "dataBar": + this.renderDataBar(xmlStream, model); + break; + case "iconSet": + this.renderIconSet(xmlStream, model); + break; + } + } + renderDataBar(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: "dataBar", + id: model.x14Id + }); + this.databarXform.render(xmlStream, model); + xmlStream.closeNode(); + } + renderIconSet(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: "iconSet", + priority: model.priority, + id: model.x14Id || `{${uuidv4()}}` + }); + this.iconSetXform.render(xmlStream, model); + xmlStream.closeNode(); + } + createNewModel({ attributes }) { + return { + type: attributes.type, + x14Id: attributes.id, + priority: BaseXform.toIntValue(attributes.priority) + }; + } + onParserClose(name, parser) { + Object.assign(this.model, parser.model); + } + }; + module2.exports = CfRuleExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/sqref-ext-xform.js +var require_sqref_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/sqref-ext-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var SqrefExtXform = class extends BaseXform { + get tag() { + return "xm:sqref"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, null, model); + } + parseOpen() { + this.model = ""; + } + parseText(text) { + this.model += text; + } + parseClose(name) { + return name !== this.tag; + } + }; + module2.exports = SqrefExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/conditional-formatting-ext-xform.js +var require_conditional_formatting_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/conditional-formatting-ext-xform.js"(exports2, module2) { + var CompositeXform = require_composite_xform(); + var SqRefExtXform = require_sqref_ext_xform(); + var CfRuleExtXform = require_cf_rule_ext_xform(); + var ConditionalFormattingExtXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + "xm:sqref": this.sqRef = new SqRefExtXform(), + "x14:cfRule": this.cfRule = new CfRuleExtXform() + }; + } + get tag() { + return "x14:conditionalFormatting"; + } + prepare(model, options) { + model.rules.forEach((rule) => { + this.cfRule.prepare(rule, options); + }); + } + render(xmlStream, model) { + if (!model.rules.some(CfRuleExtXform.isExt)) { + return; + } + xmlStream.openNode(this.tag, { + "xmlns:xm": "http://schemas.microsoft.com/office/excel/2006/main" + }); + model.rules.filter(CfRuleExtXform.isExt).forEach((rule) => this.cfRule.render(xmlStream, rule)); + this.sqRef.render(xmlStream, model.ref); + xmlStream.closeNode(); + } + createNewModel() { + return { + rules: [] + }; + } + onParserClose(name, parser) { + switch (name) { + case "xm:sqref": + this.model.ref = parser.model; + break; + case "x14:cfRule": + this.model.rules.push(parser.model); + break; + } + } + }; + module2.exports = ConditionalFormattingExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/conditional-formattings-ext-xform.js +var require_conditional_formattings_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/conditional-formattings-ext-xform.js"(exports2, module2) { + var CompositeXform = require_composite_xform(); + var CfRuleExtXform = require_cf_rule_ext_xform(); + var ConditionalFormattingExtXform = require_conditional_formatting_ext_xform(); + var ConditionalFormattingsExtXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + "x14:conditionalFormatting": this.cfXform = new ConditionalFormattingExtXform() + }; + } + get tag() { + return "x14:conditionalFormattings"; + } + hasContent(model) { + if (model.hasExtContent === void 0) { + model.hasExtContent = model.some((cf) => cf.rules.some(CfRuleExtXform.isExt)); + } + return model.hasExtContent; + } + prepare(model, options) { + model.forEach((cf) => { + this.cfXform.prepare(cf, options); + }); + } + render(xmlStream, model) { + if (this.hasContent(model)) { + xmlStream.openNode(this.tag); + model.forEach((cf) => this.cfXform.render(xmlStream, cf)); + xmlStream.closeNode(); + } + } + createNewModel() { + return []; + } + onParserClose(name, parser) { + this.model.push(parser.model); + } + }; + module2.exports = ConditionalFormattingsExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/ext-lst-xform.js +var require_ext_lst_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/ext-lst-xform.js"(exports2, module2) { + var CompositeXform = require_composite_xform(); + var ConditionalFormattingsExt = require_conditional_formattings_ext_xform(); + var ExtXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + "x14:conditionalFormattings": this.conditionalFormattings = new ConditionalFormattingsExt() + }; + } + get tag() { + return "ext"; + } + hasContent(model) { + return this.conditionalFormattings.hasContent(model.conditionalFormattings); + } + prepare(model, options) { + this.conditionalFormattings.prepare(model.conditionalFormattings, options); + } + render(xmlStream, model) { + xmlStream.openNode("ext", { + uri: "{78C0D931-6437-407d-A8EE-F0AAD7539E65}", + "xmlns:x14": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" + }); + this.conditionalFormattings.render(xmlStream, model.conditionalFormattings); + xmlStream.closeNode(); + } + createNewModel() { + return {}; + } + onParserClose(name, parser) { + this.model[name] = parser.model; + } + }; + var ExtLstXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + ext: this.ext = new ExtXform() + }; + } + get tag() { + return "extLst"; + } + prepare(model, options) { + this.ext.prepare(model, options); + } + hasContent(model) { + return this.ext.hasContent(model); + } + render(xmlStream, model) { + if (!this.hasContent(model)) { + return; + } + xmlStream.openNode("extLst"); + this.ext.render(xmlStream, model); + xmlStream.closeNode(); + } + createNewModel() { + return {}; + } + onParserClose(name, parser) { + Object.assign(this.model, parser.model); + } + }; + module2.exports = ExtLstXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/worksheet-xform.js +var require_worksheet_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/worksheet-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var colCache = require_col_cache(); + var XmlStream = require_xml_stream(); + var RelType = require_rel_type(); + var Merges = require_merges(); + var BaseXform = require_base_xform(); + var ListXform = require_list_xform(); + var RowXform = require_row_xform(); + var ColXform = require_col_xform(); + var DimensionXform = require_dimension_xform(); + var HyperlinkXform = require_hyperlink_xform(); + var MergeCellXform = require_merge_cell_xform(); + var DataValidationsXform = require_data_validations_xform(); + var SheetPropertiesXform = require_sheet_properties_xform(); + var SheetFormatPropertiesXform = require_sheet_format_properties_xform(); + var SheetViewXform = require_sheet_view_xform(); + var SheetProtectionXform = require_sheet_protection_xform(); + var PageMarginsXform = require_page_margins_xform(); + var PageSetupXform = require_page_setup_xform(); + var PrintOptionsXform = require_print_options_xform(); + var AutoFilterXform = require_auto_filter_xform(); + var PictureXform = require_picture_xform(); + var DrawingXform = require_drawing_xform(); + var TablePartXform = require_table_part_xform(); + var RowBreaksXform = require_row_breaks_xform(); + var HeaderFooterXform = require_header_footer_xform(); + var ConditionalFormattingsXform = require_conditional_formattings_xform(); + var ExtListXform = require_ext_lst_xform(); + var mergeRule = (rule, extRule) => { + Object.keys(extRule).forEach((key) => { + const value = rule[key]; + const extValue = extRule[key]; + if (value === void 0 && extValue !== void 0) { + rule[key] = extValue; + } + }); + }; + var mergeConditionalFormattings = (model, extModel) => { + if (!extModel || !extModel.length) { + return model; + } + if (!model || !model.length) { + return extModel; + } + const cfMap = {}; + const ruleMap = {}; + model.forEach((cf) => { + cfMap[cf.ref] = cf; + cf.rules.forEach((rule) => { + const { x14Id } = rule; + if (x14Id) { + ruleMap[x14Id] = rule; + } + }); + }); + extModel.forEach((extCf) => { + extCf.rules.forEach((extRule) => { + const rule = ruleMap[extRule.x14Id]; + if (rule) { + mergeRule(rule, extRule); + } else if (cfMap[extCf.ref]) { + cfMap[extCf.ref].rules.push(extRule); + } else { + model.push({ + ref: extCf.ref, + rules: [extRule] + }); + } + }); + }); + return model; + }; + var WorkSheetXform = class _WorkSheetXform extends BaseXform { + constructor(options) { + super(); + const { maxRows, maxCols, ignoreNodes } = options || {}; + this.ignoreNodes = ignoreNodes || []; + this.map = { + sheetPr: new SheetPropertiesXform(), + dimension: new DimensionXform(), + sheetViews: new ListXform({ + tag: "sheetViews", + count: false, + childXform: new SheetViewXform() + }), + sheetFormatPr: new SheetFormatPropertiesXform(), + cols: new ListXform({ tag: "cols", count: false, childXform: new ColXform() }), + sheetData: new ListXform({ + tag: "sheetData", + count: false, + empty: true, + childXform: new RowXform({ maxItems: maxCols }), + maxItems: maxRows + }), + autoFilter: new AutoFilterXform(), + mergeCells: new ListXform({ tag: "mergeCells", count: true, childXform: new MergeCellXform() }), + rowBreaks: new RowBreaksXform(), + hyperlinks: new ListXform({ + tag: "hyperlinks", + count: false, + childXform: new HyperlinkXform() + }), + pageMargins: new PageMarginsXform(), + dataValidations: new DataValidationsXform(), + pageSetup: new PageSetupXform(), + headerFooter: new HeaderFooterXform(), + printOptions: new PrintOptionsXform(), + picture: new PictureXform(), + drawing: new DrawingXform(), + sheetProtection: new SheetProtectionXform(), + tableParts: new ListXform({ tag: "tableParts", count: true, childXform: new TablePartXform() }), + conditionalFormatting: new ConditionalFormattingsXform(), + extLst: new ExtListXform() + }; + } + prepare(model, options) { + options.merges = new Merges(); + model.hyperlinks = options.hyperlinks = []; + model.comments = options.comments = []; + options.formulae = {}; + options.siFormulae = 0; + this.map.cols.prepare(model.cols, options); + this.map.sheetData.prepare(model.rows, options); + this.map.conditionalFormatting.prepare(model.conditionalFormattings, options); + model.mergeCells = options.merges.mergeCells; + const rels = model.rels = []; + function nextRid(r) { + return `rId${r.length + 1}`; + } + model.hyperlinks.forEach((hyperlink) => { + const rId = nextRid(rels); + hyperlink.rId = rId; + rels.push({ + Id: rId, + Type: RelType.Hyperlink, + Target: hyperlink.target, + TargetMode: "External" + }); + }); + if (model.comments.length > 0) { + const comment = { + Id: nextRid(rels), + Type: RelType.Comments, + Target: `../comments${model.id}.xml` + }; + rels.push(comment); + const vmlDrawing = { + Id: nextRid(rels), + Type: RelType.VmlDrawing, + Target: `../drawings/vmlDrawing${model.id}.vml` + }; + rels.push(vmlDrawing); + model.comments.forEach((item) => { + item.refAddress = colCache.decodeAddress(item.ref); + }); + options.commentRefs.push({ + commentName: `comments${model.id}`, + vmlDrawing: `vmlDrawing${model.id}` + }); + } + const drawingRelsHash = []; + let bookImage; + model.media.forEach((medium) => { + if (medium.type === "background") { + const rId = nextRid(rels); + bookImage = options.media[medium.imageId]; + rels.push({ + Id: rId, + Type: RelType.Image, + Target: `../media/${bookImage.name}.${bookImage.extension}` + }); + model.background = { + rId + }; + model.image = options.media[medium.imageId]; + } else if (medium.type === "image") { + let { drawing } = model; + bookImage = options.media[medium.imageId]; + if (!drawing) { + drawing = model.drawing = { + rId: nextRid(rels), + name: `drawing${++options.drawingsCount}`, + anchors: [], + rels: [] + }; + options.drawings.push(drawing); + rels.push({ + Id: drawing.rId, + Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing", + Target: `../drawings/${drawing.name}.xml` + }); + } + let rIdImage = this.preImageId === medium.imageId ? drawingRelsHash[medium.imageId] : drawingRelsHash[drawing.rels.length]; + if (!rIdImage) { + rIdImage = nextRid(drawing.rels); + drawingRelsHash[drawing.rels.length] = rIdImage; + drawing.rels.push({ + Id: rIdImage, + Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", + Target: `../media/${bookImage.name}.${bookImage.extension}` + }); + } + const anchor = { + picture: { + rId: rIdImage + }, + range: medium.range + }; + if (medium.hyperlinks && medium.hyperlinks.hyperlink) { + const rIdHyperLink = nextRid(drawing.rels); + drawingRelsHash[drawing.rels.length] = rIdHyperLink; + anchor.picture.hyperlinks = { + tooltip: medium.hyperlinks.tooltip, + rId: rIdHyperLink + }; + drawing.rels.push({ + Id: rIdHyperLink, + Type: RelType.Hyperlink, + Target: medium.hyperlinks.hyperlink, + TargetMode: "External" + }); + } + this.preImageId = medium.imageId; + drawing.anchors.push(anchor); + } + }); + model.tables.forEach((table) => { + const rId = nextRid(rels); + table.rId = rId; + rels.push({ + Id: rId, + Type: RelType.Table, + Target: `../tables/${table.target}` + }); + table.columns.forEach((column) => { + const { style } = column; + if (style) { + column.dxfId = options.styles.addDxfStyle(style); + } + }); + }); + this.map.extLst.prepare(model, options); + } + render(xmlStream, model) { + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("worksheet", _WorkSheetXform.WORKSHEET_ATTRIBUTES); + const sheetFormatPropertiesModel = model.properties ? { + defaultRowHeight: model.properties.defaultRowHeight, + dyDescent: model.properties.dyDescent, + outlineLevelCol: model.properties.outlineLevelCol, + outlineLevelRow: model.properties.outlineLevelRow + } : void 0; + if (model.properties && model.properties.defaultColWidth) { + sheetFormatPropertiesModel.defaultColWidth = model.properties.defaultColWidth; + } + const sheetPropertiesModel = { + outlineProperties: model.properties && model.properties.outlineProperties, + tabColor: model.properties && model.properties.tabColor, + pageSetup: model.pageSetup && model.pageSetup.fitToPage ? { + fitToPage: model.pageSetup.fitToPage + } : void 0 + }; + const pageMarginsModel = model.pageSetup && model.pageSetup.margins; + const printOptionsModel = { + showRowColHeaders: model.pageSetup && model.pageSetup.showRowColHeaders, + showGridLines: model.pageSetup && model.pageSetup.showGridLines, + horizontalCentered: model.pageSetup && model.pageSetup.horizontalCentered, + verticalCentered: model.pageSetup && model.pageSetup.verticalCentered + }; + const sheetProtectionModel = model.sheetProtection; + this.map.sheetPr.render(xmlStream, sheetPropertiesModel); + this.map.dimension.render(xmlStream, model.dimensions); + this.map.sheetViews.render(xmlStream, model.views); + this.map.sheetFormatPr.render(xmlStream, sheetFormatPropertiesModel); + this.map.cols.render(xmlStream, model.cols); + this.map.sheetData.render(xmlStream, model.rows); + this.map.sheetProtection.render(xmlStream, sheetProtectionModel); + this.map.autoFilter.render(xmlStream, model.autoFilter); + this.map.mergeCells.render(xmlStream, model.mergeCells); + this.map.conditionalFormatting.render(xmlStream, model.conditionalFormattings); + this.map.dataValidations.render(xmlStream, model.dataValidations); + this.map.hyperlinks.render(xmlStream, model.hyperlinks); + this.map.printOptions.render(xmlStream, printOptionsModel); + this.map.pageMargins.render(xmlStream, pageMarginsModel); + this.map.pageSetup.render(xmlStream, model.pageSetup); + this.map.headerFooter.render(xmlStream, model.headerFooter); + this.map.rowBreaks.render(xmlStream, model.rowBreaks); + this.map.drawing.render(xmlStream, model.drawing); + this.map.picture.render(xmlStream, model.background); + this.map.tableParts.render(xmlStream, model.tables); + this.map.extLst.render(xmlStream, model); + if (model.rels) { + model.rels.forEach((rel) => { + if (rel.Type === RelType.VmlDrawing) { + xmlStream.leafNode("legacyDrawing", { "r:id": rel.Id }); + } + }); + } + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + if (node.name === "worksheet") { + _2.each(this.map, (xform) => { + xform.reset(); + }); + return true; + } + if (this.map[node.name] && !this.ignoreNodes.includes(node.name)) { + this.parser = this.map[node.name]; + this.parser.parseOpen(node); + } + return true; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case "worksheet": { + const properties = this.map.sheetFormatPr.model || {}; + if (this.map.sheetPr.model && this.map.sheetPr.model.tabColor) { + properties.tabColor = this.map.sheetPr.model.tabColor; + } + if (this.map.sheetPr.model && this.map.sheetPr.model.outlineProperties) { + properties.outlineProperties = this.map.sheetPr.model.outlineProperties; + } + const sheetProperties = { + fitToPage: this.map.sheetPr.model && this.map.sheetPr.model.pageSetup && this.map.sheetPr.model.pageSetup.fitToPage || false, + margins: this.map.pageMargins.model + }; + const pageSetup = Object.assign(sheetProperties, this.map.pageSetup.model, this.map.printOptions.model); + const conditionalFormattings = mergeConditionalFormattings( + this.map.conditionalFormatting.model, + this.map.extLst.model && this.map.extLst.model["x14:conditionalFormattings"] + ); + this.model = { + dimensions: this.map.dimension.model, + cols: this.map.cols.model, + rows: this.map.sheetData.model, + mergeCells: this.map.mergeCells.model, + hyperlinks: this.map.hyperlinks.model, + dataValidations: this.map.dataValidations.model, + properties, + views: this.map.sheetViews.model, + pageSetup, + headerFooter: this.map.headerFooter.model, + background: this.map.picture.model, + drawing: this.map.drawing.model, + tables: this.map.tableParts.model, + conditionalFormattings + }; + if (this.map.autoFilter.model) { + this.model.autoFilter = this.map.autoFilter.model; + } + if (this.map.sheetProtection.model) { + this.model.sheetProtection = this.map.sheetProtection.model; + } + return false; + } + default: + return true; + } + } + reconcile(model, options) { + const rels = (model.relationships || []).reduce((h, rel) => { + h[rel.Id] = rel; + if (rel.Type === RelType.Comments) { + model.comments = options.comments[rel.Target].comments; + } + if (rel.Type === RelType.VmlDrawing && model.comments && model.comments.length) { + const vmlComment = options.vmlDrawings[rel.Target].comments; + model.comments.forEach((comment, index) => { + comment.note = Object.assign({}, comment.note, vmlComment[index]); + }); + } + return h; + }, {}); + options.commentsMap = (model.comments || []).reduce((h, comment) => { + if (comment.ref) { + h[comment.ref] = comment; + } + return h; + }, {}); + options.hyperlinkMap = (model.hyperlinks || []).reduce((h, hyperlink) => { + if (hyperlink.rId) { + h[hyperlink.address] = rels[hyperlink.rId].Target; + } + return h; + }, {}); + options.formulae = {}; + model.rows = model.rows && model.rows.filter(Boolean) || []; + model.rows.forEach((row) => { + row.cells = row.cells && row.cells.filter(Boolean) || []; + }); + this.map.cols.reconcile(model.cols, options); + this.map.sheetData.reconcile(model.rows, options); + this.map.conditionalFormatting.reconcile(model.conditionalFormattings, options); + model.media = []; + if (model.drawing) { + const drawingRel = rels[model.drawing.rId]; + const match = drawingRel.Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/); + if (match) { + const drawingName = match[1]; + const drawing = options.drawings[drawingName]; + drawing.anchors.forEach((anchor) => { + if (anchor.medium) { + const image = { + type: "image", + imageId: anchor.medium.index, + range: anchor.range, + hyperlinks: anchor.picture.hyperlinks + }; + model.media.push(image); + } + }); + } + } + const backgroundRel = model.background && rels[model.background.rId]; + if (backgroundRel) { + const target = backgroundRel.Target.split("/media/")[1]; + const imageId = options.mediaIndex && options.mediaIndex[target]; + if (imageId !== void 0) { + model.media.push({ + type: "background", + imageId + }); + } + } + model.tables = (model.tables || []).map((tablePart) => { + const rel = rels[tablePart.rId]; + return options.tables[rel.Target]; + }); + delete model.relationships; + delete model.hyperlinks; + delete model.comments; + } + }; + WorkSheetXform.WORKSHEET_ATTRIBUTES = { + xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main", + "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships", + "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006", + "mc:Ignorable": "x14ac", + "xmlns:x14ac": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" + }; + module2.exports = WorkSheetXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/base-cell-anchor-xform.js +var require_base_cell_anchor_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/base-cell-anchor-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var BaseCellAnchorXform = class extends BaseXform { + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + this.model = { + range: { + editAs: node.attributes.editAs || "oneCell" + } + }; + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + reconcilePicture(model, options) { + if (model && model.rId) { + const rel = options.rels[model.rId]; + const match = rel.Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/); + if (match) { + const name = match[1]; + const mediaId = options.mediaIndex[name]; + return options.media[mediaId]; + } + } + return void 0; + } + }; + module2.exports = BaseCellAnchorXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/cell-position-xform.js +var require_cell_position_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/cell-position-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var IntegerXform = require_integer_xform(); + var CellPositionXform = class extends BaseXform { + constructor(options) { + super(); + this.tag = options.tag; + this.map = { + "xdr:col": new IntegerXform({ tag: "xdr:col", zero: true }), + "xdr:colOff": new IntegerXform({ tag: "xdr:colOff", zero: true }), + "xdr:row": new IntegerXform({ tag: "xdr:row", zero: true }), + "xdr:rowOff": new IntegerXform({ tag: "xdr:rowOff", zero: true }) + }; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + this.map["xdr:col"].render(xmlStream, model.nativeCol); + this.map["xdr:colOff"].render(xmlStream, model.nativeColOff); + this.map["xdr:row"].render(xmlStream, model.nativeRow); + this.map["xdr:rowOff"].render(xmlStream, model.nativeRowOff); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model = { + nativeCol: this.map["xdr:col"].model, + nativeColOff: this.map["xdr:colOff"].model, + nativeRow: this.map["xdr:row"].model, + nativeRowOff: this.map["xdr:rowOff"].model + }; + return false; + default: + return true; + } + } + }; + module2.exports = CellPositionXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/blip-xform.js +var require_blip_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/blip-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var BlipXform = class extends BaseXform { + get tag() { + return "a:blip"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, { + "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships", + "r:embed": model.rId, + cstate: "print" + }); + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + rId: node.attributes["r:embed"] + }; + return true; + default: + return true; + } + } + parseText() { + } + parseClose(name) { + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + }; + module2.exports = BlipXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/blip-fill-xform.js +var require_blip_fill_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/blip-fill-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var BlipXform = require_blip_xform(); + var BlipFillXform = class extends BaseXform { + constructor() { + super(); + this.map = { + "a:blip": new BlipXform() + }; + } + get tag() { + return "xdr:blipFill"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + this.map["a:blip"].render(xmlStream, model); + xmlStream.openNode("a:stretch"); + xmlStream.leafNode("a:fillRect"); + xmlStream.closeNode(); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText() { + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model = this.map["a:blip"].model; + return false; + default: + return true; + } + } + }; + module2.exports = BlipFillXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/hlink-click-xform.js +var require_hlink_click_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/hlink-click-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var HLinkClickXform = class extends BaseXform { + get tag() { + return "a:hlinkClick"; + } + render(xmlStream, model) { + if (!(model.hyperlinks && model.hyperlinks.rId)) { + return; + } + xmlStream.leafNode(this.tag, { + "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships", + "r:id": model.hyperlinks.rId, + tooltip: model.hyperlinks.tooltip + }); + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + hyperlinks: { + rId: node.attributes["r:id"], + tooltip: node.attributes.tooltip + } + }; + return true; + default: + return true; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = HLinkClickXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/ext-lst-xform.js +var require_ext_lst_xform2 = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/ext-lst-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var ExtLstXform = class extends BaseXform { + get tag() { + return "a:extLst"; + } + render(xmlStream) { + xmlStream.openNode(this.tag); + xmlStream.openNode("a:ext", { + uri: "{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}" + }); + xmlStream.leafNode("a16:creationId", { + "xmlns:a16": "http://schemas.microsoft.com/office/drawing/2014/main", + id: "{00000000-0008-0000-0000-000002000000}" + }); + xmlStream.closeNode(); + xmlStream.closeNode(); + } + parseOpen(node) { + switch (node.name) { + case this.tag: + return true; + default: + return true; + } + } + parseText() { + } + parseClose(name) { + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + }; + module2.exports = ExtLstXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/c-nv-pr-xform.js +var require_c_nv_pr_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/c-nv-pr-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var HlickClickXform = require_hlink_click_xform(); + var ExtLstXform = require_ext_lst_xform2(); + var CNvPrXform = class extends BaseXform { + constructor() { + super(); + this.map = { + "a:hlinkClick": new HlickClickXform(), + "a:extLst": new ExtLstXform() + }; + } + get tag() { + return "xdr:cNvPr"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { + id: model.index, + name: `Picture ${model.index}` + }); + this.map["a:hlinkClick"].render(xmlStream, model); + this.map["a:extLst"].render(xmlStream, model); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText() { + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model = this.map["a:hlinkClick"].model; + return false; + default: + return true; + } + } + }; + module2.exports = CNvPrXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/c-nv-pic-pr-xform.js +var require_c_nv_pic_pr_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/c-nv-pic-pr-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CNvPicPrXform = class extends BaseXform { + get tag() { + return "xdr:cNvPicPr"; + } + render(xmlStream) { + xmlStream.openNode(this.tag); + xmlStream.leafNode("a:picLocks", { + noChangeAspect: "1" + }); + xmlStream.closeNode(); + } + parseOpen(node) { + switch (node.name) { + case this.tag: + return true; + default: + return true; + } + } + parseText() { + } + parseClose(name) { + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + }; + module2.exports = CNvPicPrXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/nv-pic-pr-xform.js +var require_nv_pic_pr_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/nv-pic-pr-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CNvPrXform = require_c_nv_pr_xform(); + var CNvPicPrXform = require_c_nv_pic_pr_xform(); + var NvPicPrXform = class extends BaseXform { + constructor() { + super(); + this.map = { + "xdr:cNvPr": new CNvPrXform(), + "xdr:cNvPicPr": new CNvPicPrXform() + }; + } + get tag() { + return "xdr:nvPicPr"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + this.map["xdr:cNvPr"].render(xmlStream, model); + this.map["xdr:cNvPicPr"].render(xmlStream, model); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText() { + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model = this.map["xdr:cNvPr"].model; + return false; + default: + return true; + } + } + }; + module2.exports = NvPicPrXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/sp-pr.js +var require_sp_pr = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/sp-pr.js"(exports2, module2) { + module2.exports = { + tag: "xdr:spPr", + c: [ + { + tag: "a:xfrm", + c: [ + { tag: "a:off", $: { x: "0", y: "0" } }, + { tag: "a:ext", $: { cx: "0", cy: "0" } } + ] + }, + { + tag: "a:prstGeom", + $: { prst: "rect" }, + c: [{ tag: "a:avLst" }] + } + ] + }; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/pic-xform.js +var require_pic_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/pic-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var StaticXform = require_static_xform(); + var BlipFillXform = require_blip_fill_xform(); + var NvPicPrXform = require_nv_pic_pr_xform(); + var spPrJSON = require_sp_pr(); + var PicXform = class extends BaseXform { + constructor() { + super(); + this.map = { + "xdr:nvPicPr": new NvPicPrXform(), + "xdr:blipFill": new BlipFillXform(), + "xdr:spPr": new StaticXform(spPrJSON) + }; + } + get tag() { + return "xdr:pic"; + } + prepare(model, options) { + model.index = options.index + 1; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + this.map["xdr:nvPicPr"].render(xmlStream, model); + this.map["xdr:blipFill"].render(xmlStream, model); + this.map["xdr:spPr"].render(xmlStream, model); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText() { + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.mergeModel(this.parser.model); + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + }; + module2.exports = PicXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/two-cell-anchor-xform.js +var require_two_cell_anchor_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/two-cell-anchor-xform.js"(exports2, module2) { + var BaseCellAnchorXform = require_base_cell_anchor_xform(); + var StaticXform = require_static_xform(); + var CellPositionXform = require_cell_position_xform(); + var PicXform = require_pic_xform(); + var TwoCellAnchorXform = class extends BaseCellAnchorXform { + constructor() { + super(); + this.map = { + "xdr:from": new CellPositionXform({ tag: "xdr:from" }), + "xdr:to": new CellPositionXform({ tag: "xdr:to" }), + "xdr:pic": new PicXform(), + "xdr:clientData": new StaticXform({ tag: "xdr:clientData" }) + }; + } + get tag() { + return "xdr:twoCellAnchor"; + } + prepare(model, options) { + this.map["xdr:pic"].prepare(model.picture, options); + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { editAs: model.range.editAs || "oneCell" }); + this.map["xdr:from"].render(xmlStream, model.range.tl); + this.map["xdr:to"].render(xmlStream, model.range.br); + this.map["xdr:pic"].render(xmlStream, model.picture); + this.map["xdr:clientData"].render(xmlStream, {}); + xmlStream.closeNode(); + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model.range.tl = this.map["xdr:from"].model; + this.model.range.br = this.map["xdr:to"].model; + this.model.picture = this.map["xdr:pic"].model; + return false; + default: + return true; + } + } + reconcile(model, options) { + model.medium = this.reconcilePicture(model.picture, options); + } + }; + module2.exports = TwoCellAnchorXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/ext-xform.js +var require_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/ext-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var EMU_PER_PIXEL_AT_96_DPI = 9525; + var ExtXform = class extends BaseXform { + constructor(options) { + super(); + this.tag = options.tag; + this.map = {}; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + const width = Math.floor(model.width * EMU_PER_PIXEL_AT_96_DPI); + const height = Math.floor(model.height * EMU_PER_PIXEL_AT_96_DPI); + xmlStream.addAttribute("cx", width); + xmlStream.addAttribute("cy", height); + xmlStream.closeNode(); + } + parseOpen(node) { + if (node.name === this.tag) { + this.model = { + width: parseInt(node.attributes.cx || "0", 10) / EMU_PER_PIXEL_AT_96_DPI, + height: parseInt(node.attributes.cy || "0", 10) / EMU_PER_PIXEL_AT_96_DPI + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = ExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/one-cell-anchor-xform.js +var require_one_cell_anchor_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/one-cell-anchor-xform.js"(exports2, module2) { + var BaseCellAnchorXform = require_base_cell_anchor_xform(); + var StaticXform = require_static_xform(); + var CellPositionXform = require_cell_position_xform(); + var ExtXform = require_ext_xform(); + var PicXform = require_pic_xform(); + var OneCellAnchorXform = class extends BaseCellAnchorXform { + constructor() { + super(); + this.map = { + "xdr:from": new CellPositionXform({ tag: "xdr:from" }), + "xdr:ext": new ExtXform({ tag: "xdr:ext" }), + "xdr:pic": new PicXform(), + "xdr:clientData": new StaticXform({ tag: "xdr:clientData" }) + }; + } + get tag() { + return "xdr:oneCellAnchor"; + } + prepare(model, options) { + this.map["xdr:pic"].prepare(model.picture, options); + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { editAs: model.range.editAs || "oneCell" }); + this.map["xdr:from"].render(xmlStream, model.range.tl); + this.map["xdr:ext"].render(xmlStream, model.range.ext); + this.map["xdr:pic"].render(xmlStream, model.picture); + this.map["xdr:clientData"].render(xmlStream, {}); + xmlStream.closeNode(); + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model.range.tl = this.map["xdr:from"].model; + this.model.range.ext = this.map["xdr:ext"].model; + this.model.picture = this.map["xdr:pic"].model; + return false; + default: + return true; + } + } + reconcile(model, options) { + model.medium = this.reconcilePicture(model.picture, options); + } + }; + module2.exports = OneCellAnchorXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/drawing-xform.js +var require_drawing_xform2 = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/drawing-xform.js"(exports2, module2) { + var colCache = require_col_cache(); + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var TwoCellAnchorXform = require_two_cell_anchor_xform(); + var OneCellAnchorXform = require_one_cell_anchor_xform(); + function getAnchorType(model) { + const range = typeof model.range === "string" ? colCache.decode(model.range) : model.range; + return range.br ? "xdr:twoCellAnchor" : "xdr:oneCellAnchor"; + } + var DrawingXform = class _DrawingXform extends BaseXform { + constructor() { + super(); + this.map = { + "xdr:twoCellAnchor": new TwoCellAnchorXform(), + "xdr:oneCellAnchor": new OneCellAnchorXform() + }; + } + prepare(model) { + model.anchors.forEach((item, index) => { + item.anchorType = getAnchorType(item); + const anchor = this.map[item.anchorType]; + anchor.prepare(item, { index }); + }); + } + get tag() { + return "xdr:wsDr"; + } + render(xmlStream, model) { + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode(this.tag, _DrawingXform.DRAWING_ATTRIBUTES); + model.anchors.forEach((item) => { + const anchor = this.map[item.anchorType]; + anchor.render(xmlStream, item); + }); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + this.model = { + anchors: [] + }; + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.anchors.push(this.parser.model); + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + reconcile(model, options) { + model.anchors.forEach((anchor) => { + if (anchor.br) { + this.map["xdr:twoCellAnchor"].reconcile(anchor, options); + } else { + this.map["xdr:oneCellAnchor"].reconcile(anchor, options); + } + }); + } + }; + DrawingXform.DRAWING_ATTRIBUTES = { + "xmlns:xdr": "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing", + "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main" + }; + module2.exports = DrawingXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/custom-filter-xform.js +var require_custom_filter_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/custom-filter-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CustomFilterXform = class extends BaseXform { + get tag() { + return "customFilter"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, { + val: model.val, + operator: model.operator + }); + } + parseOpen(node) { + if (node.name === this.tag) { + this.model = { + val: node.attributes.val, + operator: node.attributes.operator + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = CustomFilterXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/filter-xform.js +var require_filter_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/filter-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var FilterXform = class extends BaseXform { + get tag() { + return "filter"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, { + val: model.val + }); + } + parseOpen(node) { + if (node.name === this.tag) { + this.model = { + val: node.attributes.val + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = FilterXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/filter-column-xform.js +var require_filter_column_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/filter-column-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var ListXform = require_list_xform(); + var CustomFilterXform = require_custom_filter_xform(); + var FilterXform = require_filter_xform(); + var FilterColumnXform = class extends BaseXform { + constructor() { + super(); + this.map = { + customFilters: new ListXform({ + tag: "customFilters", + count: false, + empty: true, + childXform: new CustomFilterXform() + }), + filters: new ListXform({ + tag: "filters", + count: false, + empty: true, + childXform: new FilterXform() + }) + }; + } + get tag() { + return "filterColumn"; + } + prepare(model, options) { + model.colId = options.index.toString(); + } + render(xmlStream, model) { + if (model.customFilters) { + xmlStream.openNode(this.tag, { + colId: model.colId, + hiddenButton: model.filterButton ? "0" : "1" + }); + this.map.customFilters.render(xmlStream, model.customFilters); + xmlStream.closeNode(); + return true; + } + xmlStream.leafNode(this.tag, { + colId: model.colId, + hiddenButton: model.filterButton ? "0" : "1" + }); + return true; + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + const { attributes } = node; + switch (node.name) { + case this.tag: + this.model = { + filterButton: attributes.hiddenButton === "0" + }; + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parseOpen(node); + return true; + } + throw new Error(`Unexpected xml node in parseOpen: ${JSON.stringify(node)}`); + } + } + parseText() { + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model.customFilters = this.map.customFilters.model; + return false; + default: + return true; + } + } + }; + module2.exports = FilterColumnXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/auto-filter-xform.js +var require_auto_filter_xform2 = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/auto-filter-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var FilterColumnXform = require_filter_column_xform(); + var AutoFilterXform = class extends BaseXform { + constructor() { + super(); + this.map = { + filterColumn: new FilterColumnXform() + }; + } + get tag() { + return "autoFilter"; + } + prepare(model) { + model.columns.forEach((column, index) => { + this.map.filterColumn.prepare(column, { index }); + }); + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { ref: model.autoFilterRef }); + model.columns.forEach((column) => { + this.map.filterColumn.render(xmlStream, column); + }); + xmlStream.closeNode(); + return true; + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.model = { + autoFilterRef: node.attributes.ref, + columns: [] + }; + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parseOpen(node); + return true; + } + throw new Error(`Unexpected xml node in parseOpen: ${JSON.stringify(node)}`); + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.columns.push(this.parser.model); + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + return false; + default: + throw new Error(`Unexpected xml node in parseClose: ${name}`); + } + } + }; + module2.exports = AutoFilterXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/table-column-xform.js +var require_table_column_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/table-column-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var TableColumnXform = class extends BaseXform { + get tag() { + return "tableColumn"; + } + prepare(model, options) { + model.id = options.index + 1; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, { + id: model.id.toString(), + name: model.name, + totalsRowLabel: model.totalsRowLabel, + totalsRowFunction: model.totalsRowFunction, + dxfId: model.dxfId + }); + return true; + } + parseOpen(node) { + if (node.name === this.tag) { + const { attributes } = node; + this.model = { + name: attributes.name, + totalsRowLabel: attributes.totalsRowLabel, + totalsRowFunction: attributes.totalsRowFunction, + dxfId: attributes.dxfId + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = TableColumnXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/table-style-info-xform.js +var require_table_style_info_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/table-style-info-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var TableStyleInfoXform = class extends BaseXform { + get tag() { + return "tableStyleInfo"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, { + name: model.theme ? model.theme : void 0, + showFirstColumn: model.showFirstColumn ? "1" : "0", + showLastColumn: model.showLastColumn ? "1" : "0", + showRowStripes: model.showRowStripes ? "1" : "0", + showColumnStripes: model.showColumnStripes ? "1" : "0" + }); + return true; + } + parseOpen(node) { + if (node.name === this.tag) { + const { attributes } = node; + this.model = { + theme: attributes.name ? attributes.name : null, + showFirstColumn: attributes.showFirstColumn === "1", + showLastColumn: attributes.showLastColumn === "1", + showRowStripes: attributes.showRowStripes === "1", + showColumnStripes: attributes.showColumnStripes === "1" + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = TableStyleInfoXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/table-xform.js +var require_table_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/table-xform.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var ListXform = require_list_xform(); + var AutoFilterXform = require_auto_filter_xform2(); + var TableColumnXform = require_table_column_xform(); + var TableStyleInfoXform = require_table_style_info_xform(); + var TableXform = class _TableXform extends BaseXform { + constructor() { + super(); + this.map = { + autoFilter: new AutoFilterXform(), + tableColumns: new ListXform({ + tag: "tableColumns", + count: true, + empty: true, + childXform: new TableColumnXform() + }), + tableStyleInfo: new TableStyleInfoXform() + }; + } + prepare(model, options) { + this.map.autoFilter.prepare(model); + this.map.tableColumns.prepare(model.columns, options); + } + get tag() { + return "table"; + } + render(xmlStream, model) { + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode(this.tag, { + ..._TableXform.TABLE_ATTRIBUTES, + id: model.id, + name: model.name, + displayName: model.displayName || model.name, + ref: model.tableRef, + totalsRowCount: model.totalsRow ? "1" : void 0, + totalsRowShown: model.totalsRow ? void 0 : "1", + headerRowCount: model.headerRow ? "1" : "0" + }); + this.map.autoFilter.render(xmlStream, model); + this.map.tableColumns.render(xmlStream, model.columns); + this.map.tableStyleInfo.render(xmlStream, model.style); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + const { name, attributes } = node; + switch (name) { + case this.tag: + this.reset(); + this.model = { + name: attributes.name, + displayName: attributes.displayName || attributes.name, + tableRef: attributes.ref, + totalsRow: attributes.totalsRowCount === "1", + headerRow: attributes.headerRowCount === "1" + }; + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model.columns = this.map.tableColumns.model; + if (this.map.autoFilter.model) { + this.model.autoFilterRef = this.map.autoFilter.model.autoFilterRef; + this.map.autoFilter.model.columns.forEach((column, index) => { + this.model.columns[index].filterButton = column.filterButton; + }); + } + this.model.style = this.map.tableStyleInfo.model; + return false; + default: + return true; + } + } + reconcile(model, options) { + model.columns.forEach((column) => { + if (column.dxfId !== void 0) { + column.style = options.styles.getDxfStyle(column.dxfId); + } + }); + } + }; + TableXform.TABLE_ATTRIBUTES = { + xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main", + "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006", + "mc:Ignorable": "xr xr3", + "xmlns:xr": "http://schemas.microsoft.com/office/spreadsheetml/2014/revision", + "xmlns:xr3": "http://schemas.microsoft.com/office/spreadsheetml/2016/revision3" + // 'xr:uid': '{00000000-000C-0000-FFFF-FFFF00000000}', + }; + module2.exports = TableXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/comment-xform.js +var require_comment_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/comment-xform.js"(exports2, module2) { + var RichTextXform = require_rich_text_xform(); + var utils = require_utils21(); + var BaseXform = require_base_xform(); + var CommentXform = module2.exports = function(model) { + this.model = model; + }; + utils.inherits(CommentXform, BaseXform, { + get tag() { + return "r"; + }, + get richTextXform() { + if (!this._richTextXform) { + this._richTextXform = new RichTextXform(); + } + return this._richTextXform; + }, + render(xmlStream, model) { + model = model || this.model; + xmlStream.openNode("comment", { + ref: model.ref, + authorId: 0 + }); + xmlStream.openNode("text"); + if (model && model.note && model.note.texts) { + model.note.texts.forEach((text) => { + this.richTextXform.render(xmlStream, text); + }); + } + xmlStream.closeNode(); + xmlStream.closeNode(); + }, + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "comment": + this.model = { + type: "note", + note: { + texts: [] + }, + ...node.attributes + }; + return true; + case "r": + this.parser = this.richTextXform; + this.parser.parseOpen(node); + return true; + default: + return false; + } + }, + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + }, + parseClose(name) { + switch (name) { + case "comment": + return false; + case "r": + this.model.note.texts.push(this.parser.model); + this.parser = void 0; + return true; + default: + if (this.parser) { + this.parser.parseClose(name); + } + return true; + } + } + }); + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/comments-xform.js +var require_comments_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/comments-xform.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var utils = require_utils21(); + var BaseXform = require_base_xform(); + var CommentXform = require_comment_xform(); + var CommentsXform = module2.exports = function() { + this.map = { + comment: new CommentXform() + }; + }; + utils.inherits( + CommentsXform, + BaseXform, + { + COMMENTS_ATTRIBUTES: { + xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main" + } + }, + { + render(xmlStream, model) { + model = model || this.model; + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("comments", CommentsXform.COMMENTS_ATTRIBUTES); + xmlStream.openNode("authors"); + xmlStream.leafNode("author", null, "Author"); + xmlStream.closeNode(); + xmlStream.openNode("commentList"); + model.comments.forEach((comment) => { + this.map.comment.render(xmlStream, comment); + }); + xmlStream.closeNode(); + xmlStream.closeNode(); + }, + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "commentList": + this.model = { + comments: [] + }; + return true; + case "comment": + this.parser = this.map.comment; + this.parser.parseOpen(node); + return true; + default: + return false; + } + }, + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + }, + parseClose(name) { + switch (name) { + case "commentList": + return false; + case "comment": + this.model.comments.push(this.parser.model); + this.parser = void 0; + return true; + default: + if (this.parser) { + this.parser.parseClose(name); + } + return true; + } + } + } + ); + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-textbox-xform.js +var require_vml_textbox_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-textbox-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var VmlTextboxXform = class extends BaseXform { + get tag() { + return "v:textbox"; + } + conversionUnit(value, multiple, unit) { + return `${parseFloat(value) * multiple.toFixed(2)}${unit}`; + } + reverseConversionUnit(inset) { + return (inset || "").split(",").map((margin) => { + return Number(parseFloat(this.conversionUnit(parseFloat(margin), 0.1, "")).toFixed(2)); + }); + } + render(xmlStream, model) { + const attributes = { + style: "mso-direction-alt:auto" + }; + if (model && model.note) { + let { inset } = model.note && model.note.margins; + if (Array.isArray(inset)) { + inset = inset.map((margin) => { + return this.conversionUnit(margin, 10, "mm"); + }).join(","); + } + if (inset) { + attributes.inset = inset; + } + } + xmlStream.openNode("v:textbox", attributes); + xmlStream.leafNode("div", { style: "text-align:left" }); + xmlStream.closeNode(); + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + inset: this.reverseConversionUnit(node.attributes.inset) + }; + return true; + default: + return true; + } + } + parseText() { + } + parseClose(name) { + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + }; + module2.exports = VmlTextboxXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-anchor-xform.js +var require_vml_anchor_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-anchor-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var VmlAnchorXform = class extends BaseXform { + get tag() { + return "x:Anchor"; + } + getAnchorRect(anchor) { + const l2 = Math.floor(anchor.left); + const lf = Math.floor((anchor.left - l2) * 68); + const t = Math.floor(anchor.top); + const tf = Math.floor((anchor.top - t) * 18); + const r = Math.floor(anchor.right); + const rf = Math.floor((anchor.right - r) * 68); + const b = Math.floor(anchor.bottom); + const bf = Math.floor((anchor.bottom - b) * 18); + return [l2, lf, t, tf, r, rf, b, bf]; + } + getDefaultRect(ref) { + const l2 = ref.col; + const lf = 6; + const t = Math.max(ref.row - 2, 0); + const tf = 14; + const r = l2 + 2; + const rf = 2; + const b = t + 4; + const bf = 16; + return [l2, lf, t, tf, r, rf, b, bf]; + } + render(xmlStream, model) { + const rect = model.anchor ? this.getAnchorRect(model.anchor) : this.getDefaultRect(model.refAddress); + xmlStream.leafNode("x:Anchor", null, rect.join(", ")); + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.text = ""; + return true; + default: + return false; + } + } + parseText(text) { + this.text = text; + } + parseClose() { + return false; + } + }; + module2.exports = VmlAnchorXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/style/vml-protection-xform.js +var require_vml_protection_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/style/vml-protection-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var VmlProtectionXform = class extends BaseXform { + constructor(model) { + super(); + this._model = model; + } + get tag() { + return this._model && this._model.tag; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, null, model); + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.text = ""; + return true; + default: + return false; + } + } + parseText(text) { + this.text = text; + } + parseClose() { + return false; + } + }; + module2.exports = VmlProtectionXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/style/vml-position-xform.js +var require_vml_position_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/style/vml-position-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var VmlPositionXform = class extends BaseXform { + constructor(model) { + super(); + this._model = model; + } + get tag() { + return this._model && this._model.tag; + } + render(xmlStream, model, type) { + if (model === type[2]) { + xmlStream.leafNode(this.tag); + } else if (this.tag === "x:SizeWithCells" && model === type[1]) { + xmlStream.leafNode(this.tag); + } + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = {}; + this.model[this.tag] = true; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = VmlPositionXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-client-data-xform.js +var require_vml_client_data_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-client-data-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var VmlAnchorXform = require_vml_anchor_xform(); + var VmlProtectionXform = require_vml_protection_xform(); + var VmlPositionXform = require_vml_position_xform(); + var POSITION_TYPE = ["twoCells", "oneCells", "absolute"]; + var VmlClientDataXform = class extends BaseXform { + constructor() { + super(); + this.map = { + "x:Anchor": new VmlAnchorXform(), + "x:Locked": new VmlProtectionXform({ tag: "x:Locked" }), + "x:LockText": new VmlProtectionXform({ tag: "x:LockText" }), + "x:SizeWithCells": new VmlPositionXform({ tag: "x:SizeWithCells" }), + "x:MoveWithCells": new VmlPositionXform({ tag: "x:MoveWithCells" }) + }; + } + get tag() { + return "x:ClientData"; + } + render(xmlStream, model) { + const { protection, editAs } = model.note; + xmlStream.openNode(this.tag, { ObjectType: "Note" }); + this.map["x:MoveWithCells"].render(xmlStream, editAs, POSITION_TYPE); + this.map["x:SizeWithCells"].render(xmlStream, editAs, POSITION_TYPE); + this.map["x:Anchor"].render(xmlStream, model); + this.map["x:Locked"].render(xmlStream, protection.locked); + xmlStream.leafNode("x:AutoFill", null, "False"); + this.map["x:LockText"].render(xmlStream, protection.lockText); + xmlStream.leafNode("x:Row", null, model.refAddress.row - 1); + xmlStream.leafNode("x:Column", null, model.refAddress.col - 1); + xmlStream.closeNode(); + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.reset(); + this.model = { + anchor: [], + protection: {}, + editAs: "" + }; + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.normalizeModel(); + return false; + default: + return true; + } + } + normalizeModel() { + const position = Object.assign( + {}, + this.map["x:MoveWithCells"].model, + this.map["x:SizeWithCells"].model + ); + const len = Object.keys(position).length; + this.model.editAs = POSITION_TYPE[len]; + this.model.anchor = this.map["x:Anchor"].text; + this.model.protection.locked = this.map["x:Locked"].text; + this.model.protection.lockText = this.map["x:LockText"].text; + } + }; + module2.exports = VmlClientDataXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-shape-xform.js +var require_vml_shape_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-shape-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var VmlTextboxXform = require_vml_textbox_xform(); + var VmlClientDataXform = require_vml_client_data_xform(); + var VmlShapeXform = class _VmlShapeXform extends BaseXform { + constructor() { + super(); + this.map = { + "v:textbox": new VmlTextboxXform(), + "x:ClientData": new VmlClientDataXform() + }; + } + get tag() { + return "v:shape"; + } + render(xmlStream, model, index) { + xmlStream.openNode("v:shape", _VmlShapeXform.V_SHAPE_ATTRIBUTES(model, index)); + xmlStream.leafNode("v:fill", { color2: "infoBackground [80]" }); + xmlStream.leafNode("v:shadow", { color: "none [81]", obscured: "t" }); + xmlStream.leafNode("v:path", { "o:connecttype": "none" }); + this.map["v:textbox"].render(xmlStream, model); + this.map["x:ClientData"].render(xmlStream, model); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + this.model = { + margins: { + insetmode: node.attributes["o:insetmode"] + }, + anchor: "", + editAs: "", + protection: {} + }; + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model.margins.inset = this.map["v:textbox"].model && this.map["v:textbox"].model.inset; + this.model.protection = this.map["x:ClientData"].model && this.map["x:ClientData"].model.protection; + this.model.anchor = this.map["x:ClientData"].model && this.map["x:ClientData"].model.anchor; + this.model.editAs = this.map["x:ClientData"].model && this.map["x:ClientData"].model.editAs; + return false; + default: + return true; + } + } + }; + VmlShapeXform.V_SHAPE_ATTRIBUTES = (model, index) => ({ + id: `_x0000_s${1025 + index}`, + type: "#_x0000_t202", + style: "position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden", + fillcolor: "infoBackground [80]", + strokecolor: "none [81]", + "o:insetmode": model.note.margins && model.note.margins.insetmode + }); + module2.exports = VmlShapeXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-notes-xform.js +var require_vml_notes_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-notes-xform.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var VmlShapeXform = require_vml_shape_xform(); + var VmlNotesXform = class _VmlNotesXform extends BaseXform { + constructor() { + super(); + this.map = { + "v:shape": new VmlShapeXform() + }; + } + get tag() { + return "xml"; + } + render(xmlStream, model) { + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode(this.tag, _VmlNotesXform.DRAWING_ATTRIBUTES); + xmlStream.openNode("o:shapelayout", { "v:ext": "edit" }); + xmlStream.leafNode("o:idmap", { "v:ext": "edit", data: 1 }); + xmlStream.closeNode(); + xmlStream.openNode("v:shapetype", { + id: "_x0000_t202", + coordsize: "21600,21600", + "o:spt": 202, + path: "m,l,21600r21600,l21600,xe" + }); + xmlStream.leafNode("v:stroke", { joinstyle: "miter" }); + xmlStream.leafNode("v:path", { gradientshapeok: "t", "o:connecttype": "rect" }); + xmlStream.closeNode(); + model.comments.forEach((item, index) => { + this.map["v:shape"].render(xmlStream, item, index); + }); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + this.model = { + comments: [] + }; + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.comments.push(this.parser.model); + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + reconcile(model, options) { + model.anchors.forEach((anchor) => { + if (anchor.br) { + this.map["xdr:twoCellAnchor"].reconcile(anchor, options); + } else { + this.map["xdr:oneCellAnchor"].reconcile(anchor, options); + } + }); + } + }; + VmlNotesXform.DRAWING_ATTRIBUTES = { + "xmlns:v": "urn:schemas-microsoft-com:vml", + "xmlns:o": "urn:schemas-microsoft-com:office:office", + "xmlns:x": "urn:schemas-microsoft-com:office:excel" + }; + module2.exports = VmlNotesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xml/theme1.js +var require_theme1 = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xml/theme1.js"(exports2, module2) { + module2.exports = '\n '; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xlsx.js +var require_xlsx = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xlsx.js"(exports2, module2) { + var fs = require("fs"); + var JSZip = require_lib12(); + var { PassThrough } = require_readable(); + var ZipStream = require_zip_stream(); + var StreamBuf = require_stream_buf(); + var utils = require_utils21(); + var XmlStream = require_xml_stream(); + var { bufferToString } = require_browser_buffer_decode(); + var StylesXform = require_styles_xform(); + var CoreXform = require_core_xform(); + var SharedStringsXform = require_shared_strings_xform(); + var RelationshipsXform = require_relationships_xform(); + var ContentTypesXform = require_content_types_xform(); + var AppXform = require_app_xform(); + var WorkbookXform = require_workbook_xform(); + var WorksheetXform = require_worksheet_xform(); + var DrawingXform = require_drawing_xform2(); + var TableXform = require_table_xform(); + var CommentsXform = require_comments_xform(); + var VmlNotesXform = require_vml_notes_xform(); + var theme1Xml = require_theme1(); + function fsReadFileAsync(filename, options) { + return new Promise((resolve, reject) => { + fs.readFile(filename, options, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + var XLSX = class _XLSX { + constructor(workbook) { + this.workbook = workbook; + } + // =============================================================================== + // Workbook + // ========================================================================= + // Read + async readFile(filename, options) { + if (!await utils.fs.exists(filename)) { + throw new Error(`File not found: ${filename}`); + } + const stream = fs.createReadStream(filename); + try { + const workbook = await this.read(stream, options); + stream.close(); + return workbook; + } catch (error) { + stream.close(); + throw error; + } + } + parseRels(stream) { + const xform = new RelationshipsXform(); + return xform.parseStream(stream); + } + parseWorkbook(stream) { + const xform = new WorkbookXform(); + return xform.parseStream(stream); + } + parseSharedStrings(stream) { + const xform = new SharedStringsXform(); + return xform.parseStream(stream); + } + reconcile(model, options) { + const workbookXform = new WorkbookXform(); + const worksheetXform = new WorksheetXform(options); + const drawingXform = new DrawingXform(); + const tableXform = new TableXform(); + workbookXform.reconcile(model); + const drawingOptions = { + media: model.media, + mediaIndex: model.mediaIndex + }; + Object.keys(model.drawings).forEach((name) => { + const drawing = model.drawings[name]; + const drawingRel = model.drawingRels[name]; + if (drawingRel) { + drawingOptions.rels = drawingRel.reduce((o, rel) => { + o[rel.Id] = rel; + return o; + }, {}); + (drawing.anchors || []).forEach((anchor) => { + const hyperlinks = anchor.picture && anchor.picture.hyperlinks; + if (hyperlinks && drawingOptions.rels[hyperlinks.rId]) { + hyperlinks.hyperlink = drawingOptions.rels[hyperlinks.rId].Target; + delete hyperlinks.rId; + } + }); + drawingXform.reconcile(drawing, drawingOptions); + } + }); + const tableOptions = { + styles: model.styles + }; + Object.values(model.tables).forEach((table) => { + tableXform.reconcile(table, tableOptions); + }); + const sheetOptions = { + styles: model.styles, + sharedStrings: model.sharedStrings, + media: model.media, + mediaIndex: model.mediaIndex, + date1904: model.properties && model.properties.date1904, + drawings: model.drawings, + comments: model.comments, + tables: model.tables, + vmlDrawings: model.vmlDrawings + }; + model.worksheets.forEach((worksheet) => { + worksheet.relationships = model.worksheetRels[worksheet.sheetNo]; + worksheetXform.reconcile(worksheet, sheetOptions); + }); + delete model.worksheetHash; + delete model.worksheetRels; + delete model.globalRels; + delete model.sharedStrings; + delete model.workbookRels; + delete model.sheetDefs; + delete model.styles; + delete model.mediaIndex; + delete model.drawings; + delete model.drawingRels; + delete model.vmlDrawings; + } + async _processWorksheetEntry(stream, model, sheetNo, options, path) { + const xform = new WorksheetXform(options); + const worksheet = await xform.parseStream(stream); + worksheet.sheetNo = sheetNo; + model.worksheetHash[path] = worksheet; + model.worksheets.push(worksheet); + } + async _processCommentEntry(stream, model, name) { + const xform = new CommentsXform(); + const comments = await xform.parseStream(stream); + model.comments[`../${name}.xml`] = comments; + } + async _processTableEntry(stream, model, name) { + const xform = new TableXform(); + const table = await xform.parseStream(stream); + model.tables[`../tables/${name}.xml`] = table; + } + async _processWorksheetRelsEntry(stream, model, sheetNo) { + const xform = new RelationshipsXform(); + const relationships = await xform.parseStream(stream); + model.worksheetRels[sheetNo] = relationships; + } + async _processMediaEntry(entry, model, filename) { + const lastDot = filename.lastIndexOf("."); + if (lastDot >= 1) { + const extension = filename.substr(lastDot + 1); + const name = filename.substr(0, lastDot); + await new Promise((resolve, reject) => { + const streamBuf = new StreamBuf(); + streamBuf.on("finish", () => { + model.mediaIndex[filename] = model.media.length; + model.mediaIndex[name] = model.media.length; + const medium = { + type: "image", + name, + extension, + buffer: streamBuf.toBuffer() + }; + model.media.push(medium); + resolve(); + }); + entry.on("error", (error) => { + reject(error); + }); + entry.pipe(streamBuf); + }); + } + } + async _processDrawingEntry(entry, model, name) { + const xform = new DrawingXform(); + const drawing = await xform.parseStream(entry); + model.drawings[name] = drawing; + } + async _processDrawingRelsEntry(entry, model, name) { + const xform = new RelationshipsXform(); + const relationships = await xform.parseStream(entry); + model.drawingRels[name] = relationships; + } + async _processVmlDrawingEntry(entry, model, name) { + const xform = new VmlNotesXform(); + const vmlDrawing = await xform.parseStream(entry); + model.vmlDrawings[`../drawings/${name}.vml`] = vmlDrawing; + } + async _processThemeEntry(entry, model, name) { + await new Promise((resolve, reject) => { + const stream = new StreamBuf(); + entry.on("error", reject); + stream.on("error", reject); + stream.on("finish", () => { + model.themes[name] = stream.read().toString(); + resolve(); + }); + entry.pipe(stream); + }); + } + /** + * @deprecated since version 4.0. You should use `#read` instead. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md + */ + createInputStream() { + throw new Error( + "`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md" + ); + } + async read(stream, options) { + if (!stream[Symbol.asyncIterator] && stream.pipe) { + stream = stream.pipe(new PassThrough()); + } + const chunks = []; + for await (const chunk of stream) { + chunks.push(chunk); + } + return this.load(Buffer.concat(chunks), options); + } + async load(data, options) { + let buffer; + if (options && options.base64) { + buffer = Buffer.from(data.toString(), "base64"); + } else { + buffer = data; + } + const model = { + worksheets: [], + worksheetHash: {}, + worksheetRels: [], + themes: {}, + media: [], + mediaIndex: {}, + drawings: {}, + drawingRels: {}, + comments: {}, + tables: {}, + vmlDrawings: {} + }; + const zip = await JSZip.loadAsync(buffer); + for (const entry of Object.values(zip.files)) { + if (!entry.dir) { + let entryName = entry.name; + if (entryName[0] === "/") { + entryName = entryName.substr(1); + } + let stream; + if (entryName.match(/xl\/media\//) || // themes are not parsed as stream + entryName.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/)) { + stream = new PassThrough(); + stream.write(await entry.async("nodebuffer")); + } else { + stream = new PassThrough({ + writableObjectMode: true, + readableObjectMode: true + }); + let content; + if (process.browser) { + content = bufferToString(await entry.async("nodebuffer")); + } else { + content = await entry.async("string"); + } + const chunkSize = 16 * 1024; + for (let i = 0; i < content.length; i += chunkSize) { + stream.write(content.substring(i, i + chunkSize)); + } + } + stream.end(); + switch (entryName) { + case "_rels/.rels": + model.globalRels = await this.parseRels(stream); + break; + case "xl/workbook.xml": { + const workbook = await this.parseWorkbook(stream); + model.sheets = workbook.sheets; + model.definedNames = workbook.definedNames; + model.views = workbook.views; + model.properties = workbook.properties; + model.calcProperties = workbook.calcProperties; + break; + } + case "xl/_rels/workbook.xml.rels": + model.workbookRels = await this.parseRels(stream); + break; + case "xl/sharedStrings.xml": + model.sharedStrings = new SharedStringsXform(); + await model.sharedStrings.parseStream(stream); + break; + case "xl/styles.xml": + model.styles = new StylesXform(); + await model.styles.parseStream(stream); + break; + case "docProps/app.xml": { + const appXform = new AppXform(); + const appProperties = await appXform.parseStream(stream); + model.company = appProperties.company; + model.manager = appProperties.manager; + break; + } + case "docProps/core.xml": { + const coreXform = new CoreXform(); + const coreProperties = await coreXform.parseStream(stream); + Object.assign(model, coreProperties); + break; + } + default: { + let match = entryName.match(/xl\/worksheets\/sheet(\d+)[.]xml/); + if (match) { + await this._processWorksheetEntry(stream, model, match[1], options, entryName); + break; + } + match = entryName.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/); + if (match) { + await this._processWorksheetRelsEntry(stream, model, match[1]); + break; + } + match = entryName.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/); + if (match) { + await this._processThemeEntry(stream, model, match[1]); + break; + } + match = entryName.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/); + if (match) { + await this._processMediaEntry(stream, model, match[1]); + break; + } + match = entryName.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/); + if (match) { + await this._processDrawingEntry(stream, model, match[1]); + break; + } + match = entryName.match(/xl\/(comments\d+)[.]xml/); + if (match) { + await this._processCommentEntry(stream, model, match[1]); + break; + } + match = entryName.match(/xl\/tables\/(table\d+)[.]xml/); + if (match) { + await this._processTableEntry(stream, model, match[1]); + break; + } + match = entryName.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/); + if (match) { + await this._processDrawingRelsEntry(stream, model, match[1]); + break; + } + match = entryName.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/); + if (match) { + await this._processVmlDrawingEntry(stream, model, match[1]); + break; + } + } + } + } + } + this.reconcile(model, options); + this.workbook.model = model; + return this.workbook; + } + // ========================================================================= + // Write + async addMedia(zip, model) { + await Promise.all( + model.media.map(async (medium) => { + if (medium.type === "image") { + const filename = `xl/media/${medium.name}.${medium.extension}`; + if (medium.filename) { + const data = await fsReadFileAsync(medium.filename); + return zip.append(data, { name: filename }); + } + if (medium.buffer) { + return zip.append(medium.buffer, { name: filename }); + } + if (medium.base64) { + const dataimg64 = medium.base64; + const content = dataimg64.substring(dataimg64.indexOf(",") + 1); + return zip.append(content, { name: filename, base64: true }); + } + } + throw new Error("Unsupported media"); + }) + ); + } + addDrawings(zip, model) { + const drawingXform = new DrawingXform(); + const relsXform = new RelationshipsXform(); + model.worksheets.forEach((worksheet) => { + const { drawing } = worksheet; + if (drawing) { + drawingXform.prepare(drawing, {}); + let xml = drawingXform.toXml(drawing); + zip.append(xml, { name: `xl/drawings/${drawing.name}.xml` }); + xml = relsXform.toXml(drawing.rels); + zip.append(xml, { name: `xl/drawings/_rels/${drawing.name}.xml.rels` }); + } + }); + } + addTables(zip, model) { + const tableXform = new TableXform(); + model.worksheets.forEach((worksheet) => { + const { tables } = worksheet; + tables.forEach((table) => { + tableXform.prepare(table, {}); + const tableXml = tableXform.toXml(table); + zip.append(tableXml, { name: `xl/tables/${table.target}` }); + }); + }); + } + async addContentTypes(zip, model) { + const xform = new ContentTypesXform(); + const xml = xform.toXml(model); + zip.append(xml, { name: "[Content_Types].xml" }); + } + async addApp(zip, model) { + const xform = new AppXform(); + const xml = xform.toXml(model); + zip.append(xml, { name: "docProps/app.xml" }); + } + async addCore(zip, model) { + const coreXform = new CoreXform(); + zip.append(coreXform.toXml(model), { name: "docProps/core.xml" }); + } + async addThemes(zip, model) { + const themes = model.themes || { theme1: theme1Xml }; + Object.keys(themes).forEach((name) => { + const xml = themes[name]; + const path = `xl/theme/${name}.xml`; + zip.append(xml, { name: path }); + }); + } + async addOfficeRels(zip) { + const xform = new RelationshipsXform(); + const xml = xform.toXml([ + { Id: "rId1", Type: _XLSX.RelType.OfficeDocument, Target: "xl/workbook.xml" }, + { Id: "rId2", Type: _XLSX.RelType.CoreProperties, Target: "docProps/core.xml" }, + { Id: "rId3", Type: _XLSX.RelType.ExtenderProperties, Target: "docProps/app.xml" } + ]); + zip.append(xml, { name: "_rels/.rels" }); + } + async addWorkbookRels(zip, model) { + let count = 1; + const relationships = [ + { Id: `rId${count++}`, Type: _XLSX.RelType.Styles, Target: "styles.xml" }, + { Id: `rId${count++}`, Type: _XLSX.RelType.Theme, Target: "theme/theme1.xml" } + ]; + if (model.sharedStrings.count) { + relationships.push({ + Id: `rId${count++}`, + Type: _XLSX.RelType.SharedStrings, + Target: "sharedStrings.xml" + }); + } + model.worksheets.forEach((worksheet) => { + worksheet.rId = `rId${count++}`; + relationships.push({ + Id: worksheet.rId, + Type: _XLSX.RelType.Worksheet, + Target: `worksheets/sheet${worksheet.id}.xml` + }); + }); + const xform = new RelationshipsXform(); + const xml = xform.toXml(relationships); + zip.append(xml, { name: "xl/_rels/workbook.xml.rels" }); + } + async addSharedStrings(zip, model) { + if (model.sharedStrings && model.sharedStrings.count) { + zip.append(model.sharedStrings.xml, { name: "xl/sharedStrings.xml" }); + } + } + async addStyles(zip, model) { + const { xml } = model.styles; + if (xml) { + zip.append(xml, { name: "xl/styles.xml" }); + } + } + async addWorkbook(zip, model) { + const xform = new WorkbookXform(); + zip.append(xform.toXml(model), { name: "xl/workbook.xml" }); + } + async addWorksheets(zip, model) { + const worksheetXform = new WorksheetXform(); + const relationshipsXform = new RelationshipsXform(); + const commentsXform = new CommentsXform(); + const vmlNotesXform = new VmlNotesXform(); + model.worksheets.forEach((worksheet) => { + let xmlStream = new XmlStream(); + worksheetXform.render(xmlStream, worksheet); + zip.append(xmlStream.xml, { name: `xl/worksheets/sheet${worksheet.id}.xml` }); + if (worksheet.rels && worksheet.rels.length) { + xmlStream = new XmlStream(); + relationshipsXform.render(xmlStream, worksheet.rels); + zip.append(xmlStream.xml, { name: `xl/worksheets/_rels/sheet${worksheet.id}.xml.rels` }); + } + if (worksheet.comments.length > 0) { + xmlStream = new XmlStream(); + commentsXform.render(xmlStream, worksheet); + zip.append(xmlStream.xml, { name: `xl/comments${worksheet.id}.xml` }); + xmlStream = new XmlStream(); + vmlNotesXform.render(xmlStream, worksheet); + zip.append(xmlStream.xml, { name: `xl/drawings/vmlDrawing${worksheet.id}.vml` }); + } + }); + } + _finalize(zip) { + return new Promise((resolve, reject) => { + zip.on("finish", () => { + resolve(this); + }); + zip.on("error", reject); + zip.finalize(); + }); + } + prepareModel(model, options) { + model.creator = model.creator || "ExcelJS"; + model.lastModifiedBy = model.lastModifiedBy || "ExcelJS"; + model.created = model.created || /* @__PURE__ */ new Date(); + model.modified = model.modified || /* @__PURE__ */ new Date(); + model.useSharedStrings = options.useSharedStrings !== void 0 ? options.useSharedStrings : true; + model.useStyles = options.useStyles !== void 0 ? options.useStyles : true; + model.sharedStrings = new SharedStringsXform(); + model.styles = model.useStyles ? new StylesXform(true) : new StylesXform.Mock(); + const workbookXform = new WorkbookXform(); + const worksheetXform = new WorksheetXform(); + workbookXform.prepare(model); + const worksheetOptions = { + sharedStrings: model.sharedStrings, + styles: model.styles, + date1904: model.properties.date1904, + drawingsCount: 0, + media: model.media + }; + worksheetOptions.drawings = model.drawings = []; + worksheetOptions.commentRefs = model.commentRefs = []; + let tableCount = 0; + model.tables = []; + model.worksheets.forEach((worksheet) => { + worksheet.tables.forEach((table) => { + tableCount++; + table.target = `table${tableCount}.xml`; + table.id = tableCount; + model.tables.push(table); + }); + worksheetXform.prepare(worksheet, worksheetOptions); + }); + } + async write(stream, options) { + options = options || {}; + const { model } = this.workbook; + const zip = new ZipStream.ZipWriter(options.zip); + zip.pipe(stream); + this.prepareModel(model, options); + await this.addContentTypes(zip, model); + await this.addOfficeRels(zip, model); + await this.addWorkbookRels(zip, model); + await this.addWorksheets(zip, model); + await this.addSharedStrings(zip, model); + await this.addDrawings(zip, model); + await this.addTables(zip, model); + await Promise.all([this.addThemes(zip, model), this.addStyles(zip, model)]); + await this.addMedia(zip, model); + await Promise.all([this.addApp(zip, model), this.addCore(zip, model)]); + await this.addWorkbook(zip, model); + return this._finalize(zip); + } + writeFile(filename, options) { + const stream = fs.createWriteStream(filename); + return new Promise((resolve, reject) => { + stream.on("finish", () => { + resolve(); + }); + stream.on("error", (error) => { + reject(error); + }); + this.write(stream, options).then(() => { + stream.end(); + }).catch((err) => { + reject(err); + }); + }); + } + async writeBuffer(options) { + const stream = new StreamBuf(); + await this.write(stream, options); + return stream.read(); + } + }; + XLSX.RelType = require_rel_type(); + module2.exports = XLSX; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/FormatterOptions.js +var require_FormatterOptions = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/FormatterOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FormatterOptions = void 0; + var FormatterOptions = class { + constructor(opts = {}) { + var _a; + this.objectMode = true; + this.delimiter = ","; + this.rowDelimiter = "\n"; + this.quote = '"'; + this.escape = this.quote; + this.quoteColumns = false; + this.quoteHeaders = this.quoteColumns; + this.headers = null; + this.includeEndRowDelimiter = false; + this.writeBOM = false; + this.BOM = "\uFEFF"; + this.alwaysWriteHeaders = false; + Object.assign(this, opts || {}); + if (typeof (opts === null || opts === void 0 ? void 0 : opts.quoteHeaders) === "undefined") { + this.quoteHeaders = this.quoteColumns; + } + if ((opts === null || opts === void 0 ? void 0 : opts.quote) === true) { + this.quote = '"'; + } else if ((opts === null || opts === void 0 ? void 0 : opts.quote) === false) { + this.quote = ""; + } + if (typeof (opts === null || opts === void 0 ? void 0 : opts.escape) !== "string") { + this.escape = this.quote; + } + this.shouldWriteHeaders = !!this.headers && ((_a = opts.writeHeaders) !== null && _a !== void 0 ? _a : true); + this.headers = Array.isArray(this.headers) ? this.headers : null; + this.escapedQuote = `${this.escape}${this.quote}`; + } + }; + exports2.FormatterOptions = FormatterOptions; + } +}); + +// ../../node_modules/.pnpm/lodash.isfunction@3.0.9/node_modules/lodash.isfunction/index.js +var require_lodash10 = __commonJS({ + "../../node_modules/.pnpm/lodash.isfunction@3.0.9/node_modules/lodash.isfunction/index.js"(exports2, module2) { + var asyncTag = "[object AsyncFunction]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var nullTag = "[object Null]"; + var proxyTag = "[object Proxy]"; + var undefinedTag = "[object Undefined]"; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var nativeObjectToString = objectProto.toString; + var Symbol2 = root.Symbol; + var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0; + function baseGetTag(value) { + if (value == null) { + return value === void 0 ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); + } + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; + try { + value[symToStringTag] = void 0; + var unmasked = true; + } catch (e) { + } + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + function objectToString(value) { + return nativeObjectToString.call(value); + } + function isFunction(value) { + if (!isObject2(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + function isObject2(value) { + var type = typeof value; + return value != null && (type == "object" || type == "function"); + } + module2.exports = isFunction; + } +}); + +// ../../node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.js +var require_lodash11 = __commonJS({ + "../../node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.js"(exports2, module2) { + var LARGE_ARRAY_SIZE = 200; + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + var COMPARE_PARTIAL_FLAG = 1; + var COMPARE_UNORDERED_FLAG = 2; + var MAX_SAFE_INTEGER = 9007199254740991; + var argsTag = "[object Arguments]"; + var arrayTag = "[object Array]"; + var asyncTag = "[object AsyncFunction]"; + var boolTag = "[object Boolean]"; + var dateTag = "[object Date]"; + var errorTag = "[object Error]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var mapTag = "[object Map]"; + var numberTag = "[object Number]"; + var nullTag = "[object Null]"; + var objectTag = "[object Object]"; + var promiseTag = "[object Promise]"; + var proxyTag = "[object Proxy]"; + var regexpTag = "[object RegExp]"; + var setTag = "[object Set]"; + var stringTag = "[object String]"; + var symbolTag = "[object Symbol]"; + var undefinedTag = "[object Undefined]"; + var weakMapTag = "[object WeakMap]"; + var arrayBufferTag = "[object ArrayBuffer]"; + var dataViewTag = "[object DataView]"; + var float32Tag = "[object Float32Array]"; + var float64Tag = "[object Float64Array]"; + var int8Tag = "[object Int8Array]"; + var int16Tag = "[object Int16Array]"; + var int32Tag = "[object Int32Array]"; + var uint8Tag = "[object Uint8Array]"; + var uint8ClampedTag = "[object Uint8ClampedArray]"; + var uint16Tag = "[object Uint16Array]"; + var uint32Tag = "[object Uint32Array]"; + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var reIsUint = /^(?:0|[1-9]\d*)$/; + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var freeProcess = moduleExports && freeGlobal.process; + var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding("util"); + } catch (e) { + } + })(); + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + function arrayFilter(array, predicate) { + var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + function arrayPush(array, values) { + var index = -1, length = values.length, offset = array.length; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + function arraySome(array, predicate) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + function baseTimes(n, iteratee) { + var index = -1, result = Array(n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + function cacheHas(cache, key) { + return cache.has(key); + } + function getValue(object, key) { + return object == null ? void 0 : object[key]; + } + function mapToArray(map) { + var index = -1, result = Array(map.size); + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + function setToArray(set) { + var index = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + var arrayProto = Array.prototype; + var funcProto = Function.prototype; + var objectProto = Object.prototype; + var coreJsData = root["__core-js_shared__"]; + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + })(); + var nativeObjectToString = objectProto.toString; + var reIsNative = RegExp( + "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + var Buffer2 = moduleExports ? root.Buffer : void 0; + var Symbol2 = root.Symbol; + var Uint8Array2 = root.Uint8Array; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var splice = arrayProto.splice; + var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0; + var nativeGetSymbols = Object.getOwnPropertySymbols; + var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0; + var nativeKeys = overArg(Object.keys, Object); + var DataView2 = getNative(root, "DataView"); + var Map2 = getNative(root, "Map"); + var Promise2 = getNative(root, "Promise"); + var Set2 = getNative(root, "Set"); + var WeakMap2 = getNative(root, "WeakMap"); + var nativeCreate = getNative(Object, "create"); + var dataViewCtorString = toSource(DataView2); + var mapCtorString = toSource(Map2); + var promiseCtorString = toSource(Promise2); + var setCtorString = toSource(Set2); + var weakMapCtorString = toSource(WeakMap2); + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; + function Hash(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? void 0 : result; + } + return hasOwnProperty.call(data, key) ? data[key] : void 0; + } + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key); + } + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value; + return this; + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + function ListCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? void 0 : data[index][1]; + } + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + function MapCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function mapCacheClear() { + this.size = 0; + this.__data__ = { + "hash": new Hash(), + "map": new (Map2 || ListCache)(), + "string": new Hash() + }; + } + function mapCacheDelete(key) { + var result = getMapData(this, key)["delete"](key); + this.size -= result ? 1 : 0; + return result; + } + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + function mapCacheSet(key, value) { + var data = getMapData(this, key), size = data.size; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + function SetCache(values) { + var index = -1, length = values == null ? 0 : values.length; + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + function setCacheHas(value) { + return this.__data__.has(value); + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + function stackDelete(key) { + var data = this.__data__, result = data["delete"](key); + this.size = data.size; + return result; + } + function stackGet(key) { + return this.__data__.get(key); + } + function stackHas(key) { + return this.__data__.has(key); + } + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + Stack.prototype.clear = stackClear; + Stack.prototype["delete"] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode. + (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. + isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. + isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. + isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + function baseGetTag(value) { + if (value == null) { + return value === void 0 ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); + } + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__"); + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + function baseIsNative(value) { + if (!isObject2(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != "constructor") { + result.push(key); + } + } + return result; + } + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0; + stack.set(array, other); + stack.set(other, array); + while (++index < arrLength) { + var arrValue = array[index], othValue = other[index]; + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== void 0) { + if (compared) { + continue; + } + result = false; + break; + } + if (seen) { + if (!arraySome(other, function(othValue2, othIndex) { + if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + result = false; + break; + } + } + stack["delete"](array); + stack["delete"](other); + return result; + } + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) { + return false; + } + return true; + case boolTag: + case dateTag: + case numberTag: + return eq(+object, +other); + case errorTag: + return object.name == other.name && object.message == other.message; + case regexpTag: + case stringTag: + return object == other + ""; + case mapTag: + var convert = mapToArray; + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + if (object.size != other.size && !isPartial) { + return false; + } + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack["delete"](object); + return result; + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], othValue = other[key]; + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); + } + if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { + result = false; + break; + } + skipCtor || (skipCtor = key == "constructor"); + } + if (result && !skipCtor) { + var objCtor = object.constructor, othCtor = other.constructor; + if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { + result = false; + } + } + stack["delete"](object); + stack["delete"](other); + return result; + } + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : void 0; + } + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; + try { + value[symToStringTag] = void 0; + var unmasked = true; + } catch (e) { + } + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + var getTag = baseGetTag; + if (DataView2 && getTag(new DataView2(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) { + getTag = function(value) { + var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : ""; + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + case mapCtorString: + return mapTag; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag; + case weakMapCtorString: + return weakMapTag; + } + } + return result; + }; + } + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + function isPrototype(value) { + var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; + return value === proto; + } + function objectToString(value) { + return nativeObjectToString.call(value); + } + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + function eq(value, other) { + return value === other || value !== value && other !== other; + } + var isArguments = baseIsArguments(/* @__PURE__ */ (function() { + return arguments; + })()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee"); + }; + var isArray = Array.isArray; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + var isBuffer = nativeIsBuffer || stubFalse; + function isEqual(value, other) { + return baseIsEqual(value, other); + } + function isFunction(value) { + if (!isObject2(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject2(value) { + var type = typeof value; + return value != null && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return value != null && typeof value == "object"; + } + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + function stubArray() { + return []; + } + function stubFalse() { + return false; + } + module2.exports = isEqual; + } +}); + +// ../../node_modules/.pnpm/lodash.isnil@4.0.0/node_modules/lodash.isnil/index.js +var require_lodash12 = __commonJS({ + "../../node_modules/.pnpm/lodash.isnil@4.0.0/node_modules/lodash.isnil/index.js"(exports2, module2) { + function isNil(value) { + return value == null; + } + module2.exports = isNil; + } +}); + +// ../../node_modules/.pnpm/lodash.escaperegexp@4.1.2/node_modules/lodash.escaperegexp/index.js +var require_lodash13 = __commonJS({ + "../../node_modules/.pnpm/lodash.escaperegexp@4.1.2/node_modules/lodash.escaperegexp/index.js"(exports2, module2) { + var INFINITY = 1 / 0; + var symbolTag = "[object Symbol]"; + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reHasRegExpChar = RegExp(reRegExpChar.source); + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + var objectProto = Object.prototype; + var objectToString = objectProto.toString; + var Symbol2 = root.Symbol; + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolToString = symbolProto ? symbolProto.toString : void 0; + function baseToString(value) { + if (typeof value == "string") { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ""; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; + } + function toString2(value) { + return value == null ? "" : baseToString(value); + } + function escapeRegExp(string) { + string = toString2(string); + return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string; + } + module2.exports = escapeRegExp; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/formatter/FieldFormatter.js +var require_FieldFormatter = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/formatter/FieldFormatter.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FieldFormatter = void 0; + var lodash_isboolean_1 = __importDefault2(require_lodash4()); + var lodash_isnil_1 = __importDefault2(require_lodash12()); + var lodash_escaperegexp_1 = __importDefault2(require_lodash13()); + var FieldFormatter = class { + constructor(formatterOptions) { + this._headers = null; + this.formatterOptions = formatterOptions; + if (formatterOptions.headers !== null) { + this.headers = formatterOptions.headers; + } + this.REPLACE_REGEXP = new RegExp(formatterOptions.quote, "g"); + const escapePattern = `[${formatterOptions.delimiter}${lodash_escaperegexp_1.default(formatterOptions.rowDelimiter)}|\r| +]`; + this.ESCAPE_REGEXP = new RegExp(escapePattern); + } + set headers(headers) { + this._headers = headers; + } + shouldQuote(fieldIndex, isHeader) { + const quoteConfig = isHeader ? this.formatterOptions.quoteHeaders : this.formatterOptions.quoteColumns; + if (lodash_isboolean_1.default(quoteConfig)) { + return quoteConfig; + } + if (Array.isArray(quoteConfig)) { + return quoteConfig[fieldIndex]; + } + if (this._headers !== null) { + return quoteConfig[this._headers[fieldIndex]]; + } + return false; + } + format(field, fieldIndex, isHeader) { + const preparedField = `${lodash_isnil_1.default(field) ? "" : field}`.replace(/\0/g, ""); + const { formatterOptions } = this; + if (formatterOptions.quote !== "") { + const shouldEscape = preparedField.indexOf(formatterOptions.quote) !== -1; + if (shouldEscape) { + return this.quoteField(preparedField.replace(this.REPLACE_REGEXP, formatterOptions.escapedQuote)); + } + } + const hasEscapeCharacters = preparedField.search(this.ESCAPE_REGEXP) !== -1; + if (hasEscapeCharacters || this.shouldQuote(fieldIndex, isHeader)) { + return this.quoteField(preparedField); + } + return preparedField; + } + quoteField(field) { + const { quote } = this.formatterOptions; + return `${quote}${field}${quote}`; + } + }; + exports2.FieldFormatter = FieldFormatter; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/types.js +var require_types5 = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isSyncTransform = void 0; + exports2.isSyncTransform = (transform) => transform.length === 1; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/formatter/RowFormatter.js +var require_RowFormatter = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/formatter/RowFormatter.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RowFormatter = void 0; + var lodash_isfunction_1 = __importDefault2(require_lodash10()); + var lodash_isequal_1 = __importDefault2(require_lodash11()); + var FieldFormatter_1 = require_FieldFormatter(); + var types_1 = require_types5(); + var RowFormatter = class _RowFormatter { + constructor(formatterOptions) { + this.rowCount = 0; + this.formatterOptions = formatterOptions; + this.fieldFormatter = new FieldFormatter_1.FieldFormatter(formatterOptions); + this.headers = formatterOptions.headers; + this.shouldWriteHeaders = formatterOptions.shouldWriteHeaders; + this.hasWrittenHeaders = false; + if (this.headers !== null) { + this.fieldFormatter.headers = this.headers; + } + if (formatterOptions.transform) { + this.rowTransform = formatterOptions.transform; + } + } + static isRowHashArray(row) { + if (Array.isArray(row)) { + return Array.isArray(row[0]) && row[0].length === 2; + } + return false; + } + static isRowArray(row) { + return Array.isArray(row) && !this.isRowHashArray(row); + } + // get headers from a row item + static gatherHeaders(row) { + if (_RowFormatter.isRowHashArray(row)) { + return row.map((it) => it[0]); + } + if (Array.isArray(row)) { + return row; + } + return Object.keys(row); + } + // eslint-disable-next-line @typescript-eslint/no-shadow + static createTransform(transformFunction) { + if (types_1.isSyncTransform(transformFunction)) { + return (row, cb) => { + let transformedRow = null; + try { + transformedRow = transformFunction(row); + } catch (e) { + return cb(e); + } + return cb(null, transformedRow); + }; + } + return (row, cb) => { + transformFunction(row, cb); + }; + } + set rowTransform(transformFunction) { + if (!lodash_isfunction_1.default(transformFunction)) { + throw new TypeError("The transform should be a function"); + } + this._rowTransform = _RowFormatter.createTransform(transformFunction); + } + format(row, cb) { + this.callTransformer(row, (err, transformedRow) => { + if (err) { + return cb(err); + } + if (!row) { + return cb(null); + } + const rows = []; + if (transformedRow) { + const { shouldFormatColumns, headers } = this.checkHeaders(transformedRow); + if (this.shouldWriteHeaders && headers && !this.hasWrittenHeaders) { + rows.push(this.formatColumns(headers, true)); + this.hasWrittenHeaders = true; + } + if (shouldFormatColumns) { + const columns = this.gatherColumns(transformedRow); + rows.push(this.formatColumns(columns, false)); + } + } + return cb(null, rows); + }); + } + finish(cb) { + const rows = []; + if (this.formatterOptions.alwaysWriteHeaders && this.rowCount === 0) { + if (!this.headers) { + return cb(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided.")); + } + rows.push(this.formatColumns(this.headers, true)); + } + if (this.formatterOptions.includeEndRowDelimiter) { + rows.push(this.formatterOptions.rowDelimiter); + } + return cb(null, rows); + } + // check if we need to write header return true if we should also write a row + // could be false if headers is true and the header row(first item) is passed in + checkHeaders(row) { + if (this.headers) { + return { shouldFormatColumns: true, headers: this.headers }; + } + const headers = _RowFormatter.gatherHeaders(row); + this.headers = headers; + this.fieldFormatter.headers = headers; + if (!this.shouldWriteHeaders) { + return { shouldFormatColumns: true, headers: null }; + } + return { shouldFormatColumns: !lodash_isequal_1.default(headers, row), headers }; + } + // todo change this method to unknown[] + gatherColumns(row) { + if (this.headers === null) { + throw new Error("Headers is currently null"); + } + if (!Array.isArray(row)) { + return this.headers.map((header) => row[header]); + } + if (_RowFormatter.isRowHashArray(row)) { + return this.headers.map((header, i) => { + const col = row[i]; + if (col) { + return col[1]; + } + return ""; + }); + } + if (_RowFormatter.isRowArray(row) && !this.shouldWriteHeaders) { + return row; + } + return this.headers.map((header, i) => row[i]); + } + callTransformer(row, cb) { + if (!this._rowTransform) { + return cb(null, row); + } + return this._rowTransform(row, cb); + } + formatColumns(columns, isHeadersRow) { + const formattedCols = columns.map((field, i) => this.fieldFormatter.format(field, i, isHeadersRow)).join(this.formatterOptions.delimiter); + const { rowCount } = this; + this.rowCount += 1; + if (rowCount) { + return [this.formatterOptions.rowDelimiter, formattedCols].join(""); + } + return formattedCols; + } + }; + exports2.RowFormatter = RowFormatter; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/formatter/index.js +var require_formatter = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/formatter/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FieldFormatter = exports2.RowFormatter = void 0; + var RowFormatter_1 = require_RowFormatter(); + Object.defineProperty(exports2, "RowFormatter", { enumerable: true, get: function() { + return RowFormatter_1.RowFormatter; + } }); + var FieldFormatter_1 = require_FieldFormatter(); + Object.defineProperty(exports2, "FieldFormatter", { enumerable: true, get: function() { + return FieldFormatter_1.FieldFormatter; + } }); + } +}); + +// ../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/CsvFormatterStream.js +var require_CsvFormatterStream = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/CsvFormatterStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CsvFormatterStream = void 0; + var stream_1 = require("stream"); + var formatter_1 = require_formatter(); + var CsvFormatterStream = class extends stream_1.Transform { + constructor(formatterOptions) { + super({ writableObjectMode: formatterOptions.objectMode }); + this.hasWrittenBOM = false; + this.formatterOptions = formatterOptions; + this.rowFormatter = new formatter_1.RowFormatter(formatterOptions); + this.hasWrittenBOM = !formatterOptions.writeBOM; + } + transform(transformFunction) { + this.rowFormatter.rowTransform = transformFunction; + return this; + } + _transform(row, encoding, cb) { + let cbCalled = false; + try { + if (!this.hasWrittenBOM) { + this.push(this.formatterOptions.BOM); + this.hasWrittenBOM = true; + } + this.rowFormatter.format(row, (err, rows) => { + if (err) { + cbCalled = true; + return cb(err); + } + if (rows) { + rows.forEach((r) => { + this.push(Buffer.from(r, "utf8")); + }); + } + cbCalled = true; + return cb(); + }); + } catch (e) { + if (cbCalled) { + throw e; + } + cb(e); + } + } + _flush(cb) { + this.rowFormatter.finish((err, rows) => { + if (err) { + return cb(err); + } + if (rows) { + rows.forEach((r) => { + this.push(Buffer.from(r, "utf8")); + }); + } + return cb(); + }); + } + }; + exports2.CsvFormatterStream = CsvFormatterStream; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/index.js +var require_src3 = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeToPath = exports2.writeToString = exports2.writeToBuffer = exports2.writeToStream = exports2.write = exports2.format = exports2.FormatterOptions = exports2.CsvFormatterStream = void 0; + var util_1 = require("util"); + var stream_1 = require("stream"); + var fs = __importStar2(require("fs")); + var FormatterOptions_1 = require_FormatterOptions(); + var CsvFormatterStream_1 = require_CsvFormatterStream(); + __exportStar2(require_types5(), exports2); + var CsvFormatterStream_2 = require_CsvFormatterStream(); + Object.defineProperty(exports2, "CsvFormatterStream", { enumerable: true, get: function() { + return CsvFormatterStream_2.CsvFormatterStream; + } }); + var FormatterOptions_2 = require_FormatterOptions(); + Object.defineProperty(exports2, "FormatterOptions", { enumerable: true, get: function() { + return FormatterOptions_2.FormatterOptions; + } }); + exports2.format = (options) => new CsvFormatterStream_1.CsvFormatterStream(new FormatterOptions_1.FormatterOptions(options)); + exports2.write = (rows, options) => { + const csvStream = exports2.format(options); + const promiseWrite = util_1.promisify((row, cb) => { + csvStream.write(row, void 0, cb); + }); + rows.reduce((prev, row) => prev.then(() => promiseWrite(row)), Promise.resolve()).then(() => csvStream.end()).catch((err) => { + csvStream.emit("error", err); + }); + return csvStream; + }; + exports2.writeToStream = (ws, rows, options) => exports2.write(rows, options).pipe(ws); + exports2.writeToBuffer = (rows, opts = {}) => { + const buffers = []; + const ws = new stream_1.Writable({ + write(data, enc, writeCb) { + buffers.push(data); + writeCb(); + } + }); + return new Promise((res, rej) => { + ws.on("error", rej).on("finish", () => res(Buffer.concat(buffers))); + exports2.write(rows, opts).pipe(ws); + }); + }; + exports2.writeToString = (rows, options) => exports2.writeToBuffer(rows, options).then((buffer) => buffer.toString()); + exports2.writeToPath = (path, rows, options) => { + const stream = fs.createWriteStream(path, { encoding: "utf8" }); + return exports2.write(rows, options).pipe(stream); + }; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/ParserOptions.js +var require_ParserOptions = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/ParserOptions.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ParserOptions = void 0; + var lodash_escaperegexp_1 = __importDefault2(require_lodash13()); + var lodash_isnil_1 = __importDefault2(require_lodash12()); + var ParserOptions = class { + constructor(opts) { + var _a; + this.objectMode = true; + this.delimiter = ","; + this.ignoreEmpty = false; + this.quote = '"'; + this.escape = null; + this.escapeChar = this.quote; + this.comment = null; + this.supportsComments = false; + this.ltrim = false; + this.rtrim = false; + this.trim = false; + this.headers = null; + this.renameHeaders = false; + this.strictColumnHandling = false; + this.discardUnmappedColumns = false; + this.carriageReturn = "\r"; + this.encoding = "utf8"; + this.limitRows = false; + this.maxRows = 0; + this.skipLines = 0; + this.skipRows = 0; + Object.assign(this, opts || {}); + if (this.delimiter.length > 1) { + throw new Error("delimiter option must be one character long"); + } + this.escapedDelimiter = lodash_escaperegexp_1.default(this.delimiter); + this.escapeChar = (_a = this.escape) !== null && _a !== void 0 ? _a : this.quote; + this.supportsComments = !lodash_isnil_1.default(this.comment); + this.NEXT_TOKEN_REGEXP = new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`); + if (this.maxRows > 0) { + this.limitRows = true; + } + } + }; + exports2.ParserOptions = ParserOptions; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/types.js +var require_types6 = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isSyncValidate = exports2.isSyncTransform = void 0; + exports2.isSyncTransform = (transform) => transform.length === 1; + exports2.isSyncValidate = (validate2) => validate2.length === 1; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/transforms/RowTransformerValidator.js +var require_RowTransformerValidator = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/transforms/RowTransformerValidator.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RowTransformerValidator = void 0; + var lodash_isfunction_1 = __importDefault2(require_lodash10()); + var types_1 = require_types6(); + var RowTransformerValidator = class _RowTransformerValidator { + constructor() { + this._rowTransform = null; + this._rowValidator = null; + } + // eslint-disable-next-line @typescript-eslint/no-shadow + static createTransform(transformFunction) { + if (types_1.isSyncTransform(transformFunction)) { + return (row, cb) => { + let transformed = null; + try { + transformed = transformFunction(row); + } catch (e) { + return cb(e); + } + return cb(null, transformed); + }; + } + return transformFunction; + } + static createValidator(validateFunction) { + if (types_1.isSyncValidate(validateFunction)) { + return (row, cb) => { + cb(null, { row, isValid: validateFunction(row) }); + }; + } + return (row, cb) => { + validateFunction(row, (err, isValid, reason) => { + if (err) { + return cb(err); + } + if (isValid) { + return cb(null, { row, isValid, reason }); + } + return cb(null, { row, isValid: false, reason }); + }); + }; + } + set rowTransform(transformFunction) { + if (!lodash_isfunction_1.default(transformFunction)) { + throw new TypeError("The transform should be a function"); + } + this._rowTransform = _RowTransformerValidator.createTransform(transformFunction); + } + set rowValidator(validateFunction) { + if (!lodash_isfunction_1.default(validateFunction)) { + throw new TypeError("The validate should be a function"); + } + this._rowValidator = _RowTransformerValidator.createValidator(validateFunction); + } + transformAndValidate(row, cb) { + return this.callTransformer(row, (transformErr, transformedRow) => { + if (transformErr) { + return cb(transformErr); + } + if (!transformedRow) { + return cb(null, { row: null, isValid: true }); + } + return this.callValidator(transformedRow, (validateErr, validationResult) => { + if (validateErr) { + return cb(validateErr); + } + if (validationResult && !validationResult.isValid) { + return cb(null, { row: transformedRow, isValid: false, reason: validationResult.reason }); + } + return cb(null, { row: transformedRow, isValid: true }); + }); + }); + } + callTransformer(row, cb) { + if (!this._rowTransform) { + return cb(null, row); + } + return this._rowTransform(row, cb); + } + callValidator(row, cb) { + if (!this._rowValidator) { + return cb(null, { row, isValid: true }); + } + return this._rowValidator(row, cb); + } + }; + exports2.RowTransformerValidator = RowTransformerValidator; + } +}); + +// ../../node_modules/.pnpm/lodash.isundefined@3.0.1/node_modules/lodash.isundefined/index.js +var require_lodash14 = __commonJS({ + "../../node_modules/.pnpm/lodash.isundefined@3.0.1/node_modules/lodash.isundefined/index.js"(exports2, module2) { + function isUndefined(value) { + return value === void 0; + } + module2.exports = isUndefined; + } +}); + +// ../../node_modules/.pnpm/lodash.uniq@4.5.0/node_modules/lodash.uniq/index.js +var require_lodash15 = __commonJS({ + "../../node_modules/.pnpm/lodash.uniq@4.5.0/node_modules/lodash.uniq/index.js"(exports2, module2) { + var LARGE_ARRAY_SIZE = 200; + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + var INFINITY = 1 / 0; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + function arrayIncludes(array, value) { + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; + } + function arrayIncludesWith(array, value, comparator) { + var index = -1, length = array ? array.length : 0; + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, index = fromIndex + (fromRight ? 1 : -1); + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex(array, baseIsNaN, fromIndex); + } + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + function baseIsNaN(value) { + return value !== value; + } + function cacheHas(cache, key) { + return cache.has(key); + } + function getValue(object, key) { + return object == null ? void 0 : object[key]; + } + function isHostObject(value) { + var result = false; + if (value != null && typeof value.toString != "function") { + try { + result = !!(value + ""); + } catch (e) { + } + } + return result; + } + function setToArray(set) { + var index = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + var arrayProto = Array.prototype; + var funcProto = Function.prototype; + var objectProto = Object.prototype; + var coreJsData = root["__core-js_shared__"]; + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + })(); + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var objectToString = objectProto.toString; + var reIsNative = RegExp( + "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + var splice = arrayProto.splice; + var Map2 = getNative(root, "Map"); + var Set2 = getNative(root, "Set"); + var nativeCreate = getNative(Object, "create"); + function Hash(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + } + function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; + } + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? void 0 : result; + } + return hasOwnProperty.call(data, key) ? data[key] : void 0; + } + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key); + } + function hashSet(key, value) { + var data = this.__data__; + data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value; + return this; + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + function ListCache(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function listCacheClear() { + this.__data__ = []; + } + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; + } + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? void 0 : data[index][1]; + } + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + function MapCache(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function mapCacheClear() { + this.__data__ = { + "hash": new Hash(), + "map": new (Map2 || ListCache)(), + "string": new Hash() + }; + } + function mapCacheDelete(key) { + return getMapData(this, key)["delete"](key); + } + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + function SetCache(values) { + var index = -1, length = values ? values.length : 0; + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + function setCacheHas(value) { + return this.__data__.has(value); + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + function baseIsNative(value) { + if (!isObject2(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + function baseUniq(array, iteratee, comparator) { + var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result; + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], computed = iteratee ? iteratee(value) : value; + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values) { + return new Set2(values); + }; + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : void 0; + } + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + function uniq(array) { + return array && array.length ? baseUniq(array) : []; + } + function eq(value, other) { + return value === other || value !== value && other !== other; + } + function isFunction(value) { + var tag = isObject2(value) ? objectToString.call(value) : ""; + return tag == funcTag || tag == genTag; + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function noop() { + } + module2.exports = uniq; + } +}); + +// ../../node_modules/.pnpm/lodash.groupby@4.6.0/node_modules/lodash.groupby/index.js +var require_lodash16 = __commonJS({ + "../../node_modules/.pnpm/lodash.groupby@4.6.0/node_modules/lodash.groupby/index.js"(exports2, module2) { + var LARGE_ARRAY_SIZE = 200; + var FUNC_ERROR_TEXT = "Expected a function"; + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + var UNORDERED_COMPARE_FLAG = 1; + var PARTIAL_COMPARE_FLAG = 2; + var INFINITY = 1 / 0; + var MAX_SAFE_INTEGER = 9007199254740991; + var argsTag = "[object Arguments]"; + var arrayTag = "[object Array]"; + var boolTag = "[object Boolean]"; + var dateTag = "[object Date]"; + var errorTag = "[object Error]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var mapTag = "[object Map]"; + var numberTag = "[object Number]"; + var objectTag = "[object Object]"; + var promiseTag = "[object Promise]"; + var regexpTag = "[object RegExp]"; + var setTag = "[object Set]"; + var stringTag = "[object String]"; + var symbolTag = "[object Symbol]"; + var weakMapTag = "[object WeakMap]"; + var arrayBufferTag = "[object ArrayBuffer]"; + var dataViewTag = "[object DataView]"; + var float32Tag = "[object Float32Array]"; + var float64Tag = "[object Float64Array]"; + var int8Tag = "[object Int8Array]"; + var int16Tag = "[object Int16Array]"; + var int32Tag = "[object Int32Array]"; + var uint8Tag = "[object Uint8Array]"; + var uint8ClampedTag = "[object Uint8ClampedArray]"; + var uint16Tag = "[object Uint16Array]"; + var uint32Tag = "[object Uint32Array]"; + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/; + var reIsPlainProp = /^\w*$/; + var reLeadingDot = /^\./; + var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reEscapeChar = /\\(\\)?/g; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var reIsUint = /^(?:0|[1-9]\d*)$/; + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var freeProcess = moduleExports && freeGlobal.process; + var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding("util"); + } catch (e) { + } + })(); + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, length = array ? array.length : 0; + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + function arraySome(array, predicate) { + var index = -1, length = array ? array.length : 0; + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + function baseProperty(key) { + return function(object) { + return object == null ? void 0 : object[key]; + }; + } + function baseTimes(n, iteratee) { + var index = -1, result = Array(n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + function getValue(object, key) { + return object == null ? void 0 : object[key]; + } + function isHostObject(value) { + var result = false; + if (value != null && typeof value.toString != "function") { + try { + result = !!(value + ""); + } catch (e) { + } + } + return result; + } + function mapToArray(map) { + var index = -1, result = Array(map.size); + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + function setToArray(set) { + var index = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + var arrayProto = Array.prototype; + var funcProto = Function.prototype; + var objectProto = Object.prototype; + var coreJsData = root["__core-js_shared__"]; + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + })(); + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var objectToString = objectProto.toString; + var reIsNative = RegExp( + "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + var Symbol2 = root.Symbol; + var Uint8Array2 = root.Uint8Array; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var splice = arrayProto.splice; + var nativeKeys = overArg(Object.keys, Object); + var DataView2 = getNative(root, "DataView"); + var Map2 = getNative(root, "Map"); + var Promise2 = getNative(root, "Promise"); + var Set2 = getNative(root, "Set"); + var WeakMap2 = getNative(root, "WeakMap"); + var nativeCreate = getNative(Object, "create"); + var dataViewCtorString = toSource(DataView2); + var mapCtorString = toSource(Map2); + var promiseCtorString = toSource(Promise2); + var setCtorString = toSource(Set2); + var weakMapCtorString = toSource(WeakMap2); + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; + var symbolToString = symbolProto ? symbolProto.toString : void 0; + function Hash(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + } + function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; + } + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? void 0 : result; + } + return hasOwnProperty.call(data, key) ? data[key] : void 0; + } + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key); + } + function hashSet(key, value) { + var data = this.__data__; + data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value; + return this; + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + function ListCache(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function listCacheClear() { + this.__data__ = []; + } + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; + } + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? void 0 : data[index][1]; + } + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + function MapCache(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function mapCacheClear() { + this.__data__ = { + "hash": new Hash(), + "map": new (Map2 || ListCache)(), + "string": new Hash() + }; + } + function mapCacheDelete(key) { + return getMapData(this, key)["delete"](key); + } + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + function SetCache(values) { + var index = -1, length = values ? values.length : 0; + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + function setCacheHas(value) { + return this.__data__.has(value); + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + function Stack(entries) { + this.__data__ = new ListCache(entries); + } + function stackClear() { + this.__data__ = new ListCache(); + } + function stackDelete(key) { + return this.__data__["delete"](key); + } + function stackGet(key) { + return this.__data__.get(key); + } + function stackHas(key) { + return this.__data__.has(key); + } + function stackSet(key, value) { + var cache = this.__data__; + if (cache instanceof ListCache) { + var pairs = cache.__data__; + if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + return this; + } + cache = this.__data__ = new MapCache(pairs); + } + cache.set(key, value); + return this; + } + Stack.prototype.clear = stackClear; + Stack.prototype["delete"] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + function arrayLikeKeys(value, inherited) { + var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : []; + var length = result.length, skipIndexes = !!length; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection2) { + setter(accumulator, value, iteratee(value), collection2); + }); + return accumulator; + } + var baseEach = createBaseEach(baseForOwn); + var baseFor = createBaseFor(); + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + function baseGet(object, path) { + path = isKey(path, object) ? [path] : castPath(path); + var index = 0, length = path.length; + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return index && index == length ? object : void 0; + } + function baseGetTag(value) { + return objectToString.call(value); + } + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + function baseIsEqual(value, other, customizer, bitmask, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || !isObject2(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack); + } + function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { + var objIsArr = isArray(object), othIsArr = isArray(other), objTag = arrayTag, othTag = arrayTag; + if (!objIsArr) { + objTag = getTag(object); + objTag = objTag == argsTag ? objectTag : objTag; + } + if (!othIsArr) { + othTag = getTag(other); + othTag = othTag == argsTag ? objectTag : othTag; + } + var objIsObj = objTag == objectTag && !isHostObject(object), othIsObj = othTag == objectTag && !isHostObject(other), isSameTag = objTag == othTag; + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack); + } + if (!(bitmask & PARTIAL_COMPARE_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__"); + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack()); + return equalObjects(object, other, equalFunc, customizer, bitmask, stack); + } + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, length = index, noCustomizer = !customizer; + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], objValue = object[key], srcValue = data[1]; + if (noCustomizer && data[2]) { + if (objValue === void 0 && !(key in object)) { + return false; + } + } else { + var stack = new Stack(); + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === void 0 ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) : result)) { + return false; + } + } + } + return true; + } + function baseIsNative(value) { + if (!isObject2(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; + } + function baseIteratee(value) { + if (typeof value == "function") { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == "object") { + return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); + } + return property(value); + } + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != "constructor") { + result.push(key); + } + } + return result; + } + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, void 0, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG); + }; + } + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + function baseToString(value) { + if (typeof value == "string") { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ""; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + function castPath(value) { + return isArray(value) ? value : stringToPath(value); + } + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {}; + return func(collection, setter, baseIteratee(iteratee, 2), accumulator); + }; + } + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); + while (fromRight ? index-- : ++index < length) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, arrLength = array.length, othLength = other.length; + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, result = true, seen = bitmask & UNORDERED_COMPARE_FLAG ? new SetCache() : void 0; + stack.set(array, other); + stack.set(other, array); + while (++index < arrLength) { + var arrValue = array[index], othValue = other[index]; + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== void 0) { + if (compared) { + continue; + } + result = false; + break; + } + if (seen) { + if (!arraySome(other, function(othValue2, othIndex) { + if (!seen.has(othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, customizer, bitmask, stack))) { + return seen.add(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + result = false; + break; + } + } + stack["delete"](array); + stack["delete"](other); + return result; + } + function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) { + return false; + } + return true; + case boolTag: + case dateTag: + case numberTag: + return eq(+object, +other); + case errorTag: + return object.name == other.name && object.message == other.message; + case regexpTag: + case stringTag: + return object == other + ""; + case mapTag: + var convert = mapToArray; + case setTag: + var isPartial = bitmask & PARTIAL_COMPARE_FLAG; + convert || (convert = setToArray); + if (object.size != other.size && !isPartial) { + return false; + } + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= UNORDERED_COMPARE_FLAG; + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + stack["delete"](object); + return result; + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, objProps = keys(object), objLength = objProps.length, othProps = keys(other), othLength = othProps.length; + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], othValue = other[key]; + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); + } + if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack) : compared)) { + result = false; + break; + } + skipCtor || (skipCtor = key == "constructor"); + } + if (result && !skipCtor) { + var objCtor = object.constructor, othCtor = other.constructor; + if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { + result = false; + } + } + stack["delete"](object); + stack["delete"](other); + return result; + } + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + function getMatchData(object) { + var result = keys(object), length = result.length; + while (length--) { + var key = result[length], value = object[key]; + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : void 0; + } + var getTag = baseGetTag; + if (DataView2 && getTag(new DataView2(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) { + getTag = function(value) { + var result = objectToString.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0; + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + case mapCtorString: + return mapTag; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag; + case weakMapCtorString: + return weakMapTag; + } + } + return result; + }; + } + function hasPath(object, path, hasFunc) { + path = isKey(path, object) ? [path] : castPath(path); + var result, index = -1, length = path.length; + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result) { + return result; + } + var length = object ? object.length : 0; + return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); + } + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object); + } + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + function isPrototype(value) { + var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; + return value === proto; + } + function isStrictComparable(value) { + return value === value && !isObject2(value); + } + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && (srcValue !== void 0 || key in Object(object)); + }; + } + var stringToPath = memoize(function(string) { + string = toString2(string); + var result = []; + if (reLeadingDot.test(string)) { + result.push(""); + } + string.replace(rePropName, function(match, number, quote, string2) { + result.push(quote ? string2.replace(reEscapeChar, "$1") : number || match); + }); + return result; + }); + function toKey(value) { + if (typeof value == "string" || isSymbol(value)) { + return value; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + result[key] = [value]; + } + }); + function memoize(func, resolver) { + if (typeof func != "function" || resolver && typeof resolver != "function") { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; + } + memoize.Cache = MapCache; + function eq(value, other) { + return value === other || value !== value && other !== other; + } + function isArguments(value) { + return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag); + } + var isArray = Array.isArray; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + function isFunction(value) { + var tag = isObject2(value) ? objectToString.call(value) : ""; + return tag == funcTag || tag == genTag; + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; + } + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + function toString2(value) { + return value == null ? "" : baseToString(value); + } + function get(object, path, defaultValue) { + var result = object == null ? void 0 : baseGet(object, path); + return result === void 0 ? defaultValue : result; + } + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + function identity(value) { + return value; + } + function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); + } + module2.exports = groupBy; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/transforms/HeaderTransformer.js +var require_HeaderTransformer = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/transforms/HeaderTransformer.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HeaderTransformer = void 0; + var lodash_isundefined_1 = __importDefault2(require_lodash14()); + var lodash_isfunction_1 = __importDefault2(require_lodash10()); + var lodash_uniq_1 = __importDefault2(require_lodash15()); + var lodash_groupby_1 = __importDefault2(require_lodash16()); + var HeaderTransformer = class { + constructor(parserOptions) { + this.headers = null; + this.receivedHeaders = false; + this.shouldUseFirstRow = false; + this.processedFirstRow = false; + this.headersLength = 0; + this.parserOptions = parserOptions; + if (parserOptions.headers === true) { + this.shouldUseFirstRow = true; + } else if (Array.isArray(parserOptions.headers)) { + this.setHeaders(parserOptions.headers); + } else if (lodash_isfunction_1.default(parserOptions.headers)) { + this.headersTransform = parserOptions.headers; + } + } + transform(row, cb) { + if (!this.shouldMapRow(row)) { + return cb(null, { row: null, isValid: true }); + } + return cb(null, this.processRow(row)); + } + shouldMapRow(row) { + const { parserOptions } = this; + if (!this.headersTransform && parserOptions.renameHeaders && !this.processedFirstRow) { + if (!this.receivedHeaders) { + throw new Error("Error renaming headers: new headers must be provided in an array"); + } + this.processedFirstRow = true; + return false; + } + if (!this.receivedHeaders && Array.isArray(row)) { + if (this.headersTransform) { + this.setHeaders(this.headersTransform(row)); + } else if (this.shouldUseFirstRow) { + this.setHeaders(row); + } else { + return true; + } + return false; + } + return true; + } + processRow(row) { + if (!this.headers) { + return { row, isValid: true }; + } + const { parserOptions } = this; + if (!parserOptions.discardUnmappedColumns && row.length > this.headersLength) { + if (!parserOptions.strictColumnHandling) { + throw new Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${row.length}`); + } + return { + row, + isValid: false, + reason: `Column header mismatch expected: ${this.headersLength} columns got: ${row.length}` + }; + } + if (parserOptions.strictColumnHandling && row.length < this.headersLength) { + return { + row, + isValid: false, + reason: `Column header mismatch expected: ${this.headersLength} columns got: ${row.length}` + }; + } + return { row: this.mapHeaders(row), isValid: true }; + } + mapHeaders(row) { + const rowMap = {}; + const { headers, headersLength } = this; + for (let i = 0; i < headersLength; i += 1) { + const header = headers[i]; + if (!lodash_isundefined_1.default(header)) { + const val = row[i]; + if (lodash_isundefined_1.default(val)) { + rowMap[header] = ""; + } else { + rowMap[header] = val; + } + } + } + return rowMap; + } + setHeaders(headers) { + var _a; + const filteredHeaders = headers.filter((h) => !!h); + if (lodash_uniq_1.default(filteredHeaders).length !== filteredHeaders.length) { + const grouped = lodash_groupby_1.default(filteredHeaders); + const duplicates = Object.keys(grouped).filter((dup) => grouped[dup].length > 1); + throw new Error(`Duplicate headers found ${JSON.stringify(duplicates)}`); + } + this.headers = headers; + this.receivedHeaders = true; + this.headersLength = ((_a = this.headers) === null || _a === void 0 ? void 0 : _a.length) || 0; + } + }; + exports2.HeaderTransformer = HeaderTransformer; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/transforms/index.js +var require_transforms = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/transforms/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HeaderTransformer = exports2.RowTransformerValidator = void 0; + var RowTransformerValidator_1 = require_RowTransformerValidator(); + Object.defineProperty(exports2, "RowTransformerValidator", { enumerable: true, get: function() { + return RowTransformerValidator_1.RowTransformerValidator; + } }); + var HeaderTransformer_1 = require_HeaderTransformer(); + Object.defineProperty(exports2, "HeaderTransformer", { enumerable: true, get: function() { + return HeaderTransformer_1.HeaderTransformer; + } }); + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/Token.js +var require_Token = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/Token.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Token = void 0; + var Token = class { + constructor(tokenArgs) { + this.token = tokenArgs.token; + this.startCursor = tokenArgs.startCursor; + this.endCursor = tokenArgs.endCursor; + } + static isTokenRowDelimiter(token) { + const content = token.token; + return content === "\r" || content === "\n" || content === "\r\n"; + } + static isTokenCarriageReturn(token, parserOptions) { + return token.token === parserOptions.carriageReturn; + } + static isTokenComment(token, parserOptions) { + return parserOptions.supportsComments && !!token && token.token === parserOptions.comment; + } + static isTokenEscapeCharacter(token, parserOptions) { + return token.token === parserOptions.escapeChar; + } + static isTokenQuote(token, parserOptions) { + return token.token === parserOptions.quote; + } + static isTokenDelimiter(token, parserOptions) { + return token.token === parserOptions.delimiter; + } + }; + exports2.Token = Token; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/Scanner.js +var require_Scanner = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/Scanner.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Scanner = void 0; + var Token_1 = require_Token(); + var ROW_DELIMITER = /((?:\r\n)|\n|\r)/; + var Scanner = class { + constructor(args) { + this.cursor = 0; + this.line = args.line; + this.lineLength = this.line.length; + this.parserOptions = args.parserOptions; + this.hasMoreData = args.hasMoreData; + this.cursor = args.cursor || 0; + } + get hasMoreCharacters() { + return this.lineLength > this.cursor; + } + get nextNonSpaceToken() { + const { lineFromCursor } = this; + const regex = this.parserOptions.NEXT_TOKEN_REGEXP; + if (lineFromCursor.search(regex) === -1) { + return null; + } + const match = regex.exec(lineFromCursor); + if (match == null) { + return null; + } + const token = match[1]; + const startCursor = this.cursor + (match.index || 0); + return new Token_1.Token({ + token, + startCursor, + endCursor: startCursor + token.length - 1 + }); + } + get nextCharacterToken() { + const { cursor, lineLength } = this; + if (lineLength <= cursor) { + return null; + } + return new Token_1.Token({ + token: this.line[cursor], + startCursor: cursor, + endCursor: cursor + }); + } + get lineFromCursor() { + return this.line.substr(this.cursor); + } + advancePastLine() { + const match = ROW_DELIMITER.exec(this.lineFromCursor); + if (!match) { + if (this.hasMoreData) { + return null; + } + this.cursor = this.lineLength; + return this; + } + this.cursor += (match.index || 0) + match[0].length; + return this; + } + advanceTo(cursor) { + this.cursor = cursor; + return this; + } + advanceToToken(token) { + this.cursor = token.startCursor; + return this; + } + advancePastToken(token) { + this.cursor = token.endCursor + 1; + return this; + } + truncateToCursor() { + this.line = this.lineFromCursor; + this.lineLength = this.line.length; + this.cursor = 0; + return this; + } + }; + exports2.Scanner = Scanner; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/ColumnFormatter.js +var require_ColumnFormatter = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/ColumnFormatter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ColumnFormatter = void 0; + var ColumnFormatter = class { + constructor(parserOptions) { + if (parserOptions.trim) { + this.format = (col) => col.trim(); + } else if (parserOptions.ltrim) { + this.format = (col) => col.trimLeft(); + } else if (parserOptions.rtrim) { + this.format = (col) => col.trimRight(); + } else { + this.format = (col) => col; + } + } + }; + exports2.ColumnFormatter = ColumnFormatter; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/NonQuotedColumnParser.js +var require_NonQuotedColumnParser = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/NonQuotedColumnParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NonQuotedColumnParser = void 0; + var ColumnFormatter_1 = require_ColumnFormatter(); + var Token_1 = require_Token(); + var NonQuotedColumnParser = class { + constructor(parserOptions) { + this.parserOptions = parserOptions; + this.columnFormatter = new ColumnFormatter_1.ColumnFormatter(parserOptions); + } + parse(scanner) { + if (!scanner.hasMoreCharacters) { + return null; + } + const { parserOptions } = this; + const characters = []; + let nextToken = scanner.nextCharacterToken; + for (; nextToken; nextToken = scanner.nextCharacterToken) { + if (Token_1.Token.isTokenDelimiter(nextToken, parserOptions) || Token_1.Token.isTokenRowDelimiter(nextToken)) { + break; + } + characters.push(nextToken.token); + scanner.advancePastToken(nextToken); + } + return this.columnFormatter.format(characters.join("")); + } + }; + exports2.NonQuotedColumnParser = NonQuotedColumnParser; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/QuotedColumnParser.js +var require_QuotedColumnParser = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/QuotedColumnParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QuotedColumnParser = void 0; + var ColumnFormatter_1 = require_ColumnFormatter(); + var Token_1 = require_Token(); + var QuotedColumnParser = class { + constructor(parserOptions) { + this.parserOptions = parserOptions; + this.columnFormatter = new ColumnFormatter_1.ColumnFormatter(parserOptions); + } + parse(scanner) { + if (!scanner.hasMoreCharacters) { + return null; + } + const originalCursor = scanner.cursor; + const { foundClosingQuote, col } = this.gatherDataBetweenQuotes(scanner); + if (!foundClosingQuote) { + scanner.advanceTo(originalCursor); + if (!scanner.hasMoreData) { + throw new Error(`Parse Error: missing closing: '${this.parserOptions.quote || ""}' in line: at '${scanner.lineFromCursor.replace(/[\r\n]/g, "\\n'")}'`); + } + return null; + } + this.checkForMalformedColumn(scanner); + return col; + } + gatherDataBetweenQuotes(scanner) { + const { parserOptions } = this; + let foundStartingQuote = false; + let foundClosingQuote = false; + const characters = []; + let nextToken = scanner.nextCharacterToken; + for (; !foundClosingQuote && nextToken !== null; nextToken = scanner.nextCharacterToken) { + const isQuote = Token_1.Token.isTokenQuote(nextToken, parserOptions); + if (!foundStartingQuote && isQuote) { + foundStartingQuote = true; + } else if (foundStartingQuote) { + if (Token_1.Token.isTokenEscapeCharacter(nextToken, parserOptions)) { + scanner.advancePastToken(nextToken); + const tokenFollowingEscape = scanner.nextCharacterToken; + if (tokenFollowingEscape !== null && (Token_1.Token.isTokenQuote(tokenFollowingEscape, parserOptions) || Token_1.Token.isTokenEscapeCharacter(tokenFollowingEscape, parserOptions))) { + characters.push(tokenFollowingEscape.token); + nextToken = tokenFollowingEscape; + } else if (isQuote) { + foundClosingQuote = true; + } else { + characters.push(nextToken.token); + } + } else if (isQuote) { + foundClosingQuote = true; + } else { + characters.push(nextToken.token); + } + } + scanner.advancePastToken(nextToken); + } + return { col: this.columnFormatter.format(characters.join("")), foundClosingQuote }; + } + checkForMalformedColumn(scanner) { + const { parserOptions } = this; + const { nextNonSpaceToken } = scanner; + if (nextNonSpaceToken) { + const isNextTokenADelimiter = Token_1.Token.isTokenDelimiter(nextNonSpaceToken, parserOptions); + const isNextTokenARowDelimiter = Token_1.Token.isTokenRowDelimiter(nextNonSpaceToken); + if (!(isNextTokenADelimiter || isNextTokenARowDelimiter)) { + const linePreview = scanner.lineFromCursor.substr(0, 10).replace(/[\r\n]/g, "\\n'"); + throw new Error(`Parse Error: expected: '${parserOptions.escapedDelimiter}' OR new line got: '${nextNonSpaceToken.token}'. at '${linePreview}`); + } + scanner.advanceToToken(nextNonSpaceToken); + } else if (!scanner.hasMoreData) { + scanner.advancePastLine(); + } + } + }; + exports2.QuotedColumnParser = QuotedColumnParser; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/ColumnParser.js +var require_ColumnParser = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/ColumnParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ColumnParser = void 0; + var NonQuotedColumnParser_1 = require_NonQuotedColumnParser(); + var QuotedColumnParser_1 = require_QuotedColumnParser(); + var Token_1 = require_Token(); + var ColumnParser = class { + constructor(parserOptions) { + this.parserOptions = parserOptions; + this.quotedColumnParser = new QuotedColumnParser_1.QuotedColumnParser(parserOptions); + this.nonQuotedColumnParser = new NonQuotedColumnParser_1.NonQuotedColumnParser(parserOptions); + } + parse(scanner) { + const { nextNonSpaceToken } = scanner; + if (nextNonSpaceToken !== null && Token_1.Token.isTokenQuote(nextNonSpaceToken, this.parserOptions)) { + scanner.advanceToToken(nextNonSpaceToken); + return this.quotedColumnParser.parse(scanner); + } + return this.nonQuotedColumnParser.parse(scanner); + } + }; + exports2.ColumnParser = ColumnParser; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/index.js +var require_column2 = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ColumnFormatter = exports2.QuotedColumnParser = exports2.NonQuotedColumnParser = exports2.ColumnParser = void 0; + var ColumnParser_1 = require_ColumnParser(); + Object.defineProperty(exports2, "ColumnParser", { enumerable: true, get: function() { + return ColumnParser_1.ColumnParser; + } }); + var NonQuotedColumnParser_1 = require_NonQuotedColumnParser(); + Object.defineProperty(exports2, "NonQuotedColumnParser", { enumerable: true, get: function() { + return NonQuotedColumnParser_1.NonQuotedColumnParser; + } }); + var QuotedColumnParser_1 = require_QuotedColumnParser(); + Object.defineProperty(exports2, "QuotedColumnParser", { enumerable: true, get: function() { + return QuotedColumnParser_1.QuotedColumnParser; + } }); + var ColumnFormatter_1 = require_ColumnFormatter(); + Object.defineProperty(exports2, "ColumnFormatter", { enumerable: true, get: function() { + return ColumnFormatter_1.ColumnFormatter; + } }); + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/RowParser.js +var require_RowParser = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/RowParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RowParser = void 0; + var column_1 = require_column2(); + var Token_1 = require_Token(); + var EMPTY_STRING = ""; + var RowParser = class { + constructor(parserOptions) { + this.parserOptions = parserOptions; + this.columnParser = new column_1.ColumnParser(parserOptions); + } + static isEmptyRow(row) { + return row.join(EMPTY_STRING).replace(/\s+/g, EMPTY_STRING) === EMPTY_STRING; + } + parse(scanner) { + const { parserOptions } = this; + const { hasMoreData } = scanner; + const currentScanner = scanner; + const columns = []; + let currentToken = this.getStartToken(currentScanner, columns); + while (currentToken) { + if (Token_1.Token.isTokenRowDelimiter(currentToken)) { + currentScanner.advancePastToken(currentToken); + if (!currentScanner.hasMoreCharacters && Token_1.Token.isTokenCarriageReturn(currentToken, parserOptions) && hasMoreData) { + return null; + } + currentScanner.truncateToCursor(); + return columns; + } + if (!this.shouldSkipColumnParse(currentScanner, currentToken, columns)) { + const item = this.columnParser.parse(currentScanner); + if (item === null) { + return null; + } + columns.push(item); + } + currentToken = currentScanner.nextNonSpaceToken; + } + if (!hasMoreData) { + currentScanner.truncateToCursor(); + return columns; + } + return null; + } + getStartToken(scanner, columns) { + const currentToken = scanner.nextNonSpaceToken; + if (currentToken !== null && Token_1.Token.isTokenDelimiter(currentToken, this.parserOptions)) { + columns.push(""); + return scanner.nextNonSpaceToken; + } + return currentToken; + } + shouldSkipColumnParse(scanner, currentToken, columns) { + const { parserOptions } = this; + if (Token_1.Token.isTokenDelimiter(currentToken, parserOptions)) { + scanner.advancePastToken(currentToken); + const nextToken = scanner.nextCharacterToken; + if (!scanner.hasMoreCharacters || nextToken !== null && Token_1.Token.isTokenRowDelimiter(nextToken)) { + columns.push(""); + return true; + } + if (nextToken !== null && Token_1.Token.isTokenDelimiter(nextToken, parserOptions)) { + columns.push(""); + return true; + } + } + return false; + } + }; + exports2.RowParser = RowParser; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/Parser.js +var require_Parser = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/Parser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Parser = void 0; + var Scanner_1 = require_Scanner(); + var RowParser_1 = require_RowParser(); + var Token_1 = require_Token(); + var Parser = class _Parser { + constructor(parserOptions) { + this.parserOptions = parserOptions; + this.rowParser = new RowParser_1.RowParser(this.parserOptions); + } + static removeBOM(line) { + if (line && line.charCodeAt(0) === 65279) { + return line.slice(1); + } + return line; + } + parse(line, hasMoreData) { + const scanner = new Scanner_1.Scanner({ + line: _Parser.removeBOM(line), + parserOptions: this.parserOptions, + hasMoreData + }); + if (this.parserOptions.supportsComments) { + return this.parseWithComments(scanner); + } + return this.parseWithoutComments(scanner); + } + parseWithoutComments(scanner) { + const rows = []; + let shouldContinue = true; + while (shouldContinue) { + shouldContinue = this.parseRow(scanner, rows); + } + return { line: scanner.line, rows }; + } + parseWithComments(scanner) { + const { parserOptions } = this; + const rows = []; + for (let nextToken = scanner.nextCharacterToken; nextToken !== null; nextToken = scanner.nextCharacterToken) { + if (Token_1.Token.isTokenComment(nextToken, parserOptions)) { + const cursor = scanner.advancePastLine(); + if (cursor === null) { + return { line: scanner.lineFromCursor, rows }; + } + if (!scanner.hasMoreCharacters) { + return { line: scanner.lineFromCursor, rows }; + } + scanner.truncateToCursor(); + } else if (!this.parseRow(scanner, rows)) { + break; + } + } + return { line: scanner.line, rows }; + } + parseRow(scanner, rows) { + const nextToken = scanner.nextNonSpaceToken; + if (!nextToken) { + return false; + } + const row = this.rowParser.parse(scanner); + if (row === null) { + return false; + } + if (this.parserOptions.ignoreEmpty && RowParser_1.RowParser.isEmptyRow(row)) { + return true; + } + rows.push(row); + return true; + } + }; + exports2.Parser = Parser; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/index.js +var require_parser3 = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QuotedColumnParser = exports2.NonQuotedColumnParser = exports2.ColumnParser = exports2.Token = exports2.Scanner = exports2.RowParser = exports2.Parser = void 0; + var Parser_1 = require_Parser(); + Object.defineProperty(exports2, "Parser", { enumerable: true, get: function() { + return Parser_1.Parser; + } }); + var RowParser_1 = require_RowParser(); + Object.defineProperty(exports2, "RowParser", { enumerable: true, get: function() { + return RowParser_1.RowParser; + } }); + var Scanner_1 = require_Scanner(); + Object.defineProperty(exports2, "Scanner", { enumerable: true, get: function() { + return Scanner_1.Scanner; + } }); + var Token_1 = require_Token(); + Object.defineProperty(exports2, "Token", { enumerable: true, get: function() { + return Token_1.Token; + } }); + var column_1 = require_column2(); + Object.defineProperty(exports2, "ColumnParser", { enumerable: true, get: function() { + return column_1.ColumnParser; + } }); + Object.defineProperty(exports2, "NonQuotedColumnParser", { enumerable: true, get: function() { + return column_1.NonQuotedColumnParser; + } }); + Object.defineProperty(exports2, "QuotedColumnParser", { enumerable: true, get: function() { + return column_1.QuotedColumnParser; + } }); + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/CsvParserStream.js +var require_CsvParserStream = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/CsvParserStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CsvParserStream = void 0; + var string_decoder_1 = require("string_decoder"); + var stream_1 = require("stream"); + var transforms_1 = require_transforms(); + var parser_1 = require_parser3(); + var CsvParserStream = class _CsvParserStream extends stream_1.Transform { + constructor(parserOptions) { + super({ objectMode: parserOptions.objectMode }); + this.lines = ""; + this.rowCount = 0; + this.parsedRowCount = 0; + this.parsedLineCount = 0; + this.endEmitted = false; + this.headersEmitted = false; + this.parserOptions = parserOptions; + this.parser = new parser_1.Parser(parserOptions); + this.headerTransformer = new transforms_1.HeaderTransformer(parserOptions); + this.decoder = new string_decoder_1.StringDecoder(parserOptions.encoding); + this.rowTransformerValidator = new transforms_1.RowTransformerValidator(); + } + get hasHitRowLimit() { + return this.parserOptions.limitRows && this.rowCount >= this.parserOptions.maxRows; + } + get shouldEmitRows() { + return this.parsedRowCount > this.parserOptions.skipRows; + } + get shouldSkipLine() { + return this.parsedLineCount <= this.parserOptions.skipLines; + } + transform(transformFunction) { + this.rowTransformerValidator.rowTransform = transformFunction; + return this; + } + validate(validateFunction) { + this.rowTransformerValidator.rowValidator = validateFunction; + return this; + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + emit(event, ...rest) { + if (event === "end") { + if (!this.endEmitted) { + this.endEmitted = true; + super.emit("end", this.rowCount); + } + return false; + } + return super.emit(event, ...rest); + } + _transform(data, encoding, done) { + if (this.hasHitRowLimit) { + return done(); + } + const wrappedCallback = _CsvParserStream.wrapDoneCallback(done); + try { + const { lines } = this; + const newLine = lines + this.decoder.write(data); + const rows = this.parse(newLine, true); + return this.processRows(rows, wrappedCallback); + } catch (e) { + return wrappedCallback(e); + } + } + _flush(done) { + const wrappedCallback = _CsvParserStream.wrapDoneCallback(done); + if (this.hasHitRowLimit) { + return wrappedCallback(); + } + try { + const newLine = this.lines + this.decoder.end(); + const rows = this.parse(newLine, false); + return this.processRows(rows, wrappedCallback); + } catch (e) { + return wrappedCallback(e); + } + } + parse(data, hasMoreData) { + if (!data) { + return []; + } + const { line, rows } = this.parser.parse(data, hasMoreData); + this.lines = line; + return rows; + } + processRows(rows, cb) { + const rowsLength = rows.length; + const iterate = (i) => { + const callNext = (err) => { + if (err) { + return cb(err); + } + if (i % 100 === 0) { + setImmediate(() => iterate(i + 1)); + return void 0; + } + return iterate(i + 1); + }; + this.checkAndEmitHeaders(); + if (i >= rowsLength || this.hasHitRowLimit) { + return cb(); + } + this.parsedLineCount += 1; + if (this.shouldSkipLine) { + return callNext(); + } + const row = rows[i]; + this.rowCount += 1; + this.parsedRowCount += 1; + const nextRowCount = this.rowCount; + return this.transformRow(row, (err, transformResult) => { + if (err) { + this.rowCount -= 1; + return callNext(err); + } + if (!transformResult) { + return callNext(new Error("expected transform result")); + } + if (!transformResult.isValid) { + this.emit("data-invalid", transformResult.row, nextRowCount, transformResult.reason); + } else if (transformResult.row) { + return this.pushRow(transformResult.row, callNext); + } + return callNext(); + }); + }; + iterate(0); + } + transformRow(parsedRow, cb) { + try { + this.headerTransformer.transform(parsedRow, (err, withHeaders) => { + if (err) { + return cb(err); + } + if (!withHeaders) { + return cb(new Error("Expected result from header transform")); + } + if (!withHeaders.isValid) { + if (this.shouldEmitRows) { + return cb(null, { isValid: false, row: parsedRow }); + } + return this.skipRow(cb); + } + if (withHeaders.row) { + if (this.shouldEmitRows) { + return this.rowTransformerValidator.transformAndValidate(withHeaders.row, cb); + } + return this.skipRow(cb); + } + this.rowCount -= 1; + this.parsedRowCount -= 1; + return cb(null, { row: null, isValid: true }); + }); + } catch (e) { + cb(e); + } + } + checkAndEmitHeaders() { + if (!this.headersEmitted && this.headerTransformer.headers) { + this.headersEmitted = true; + this.emit("headers", this.headerTransformer.headers); + } + } + skipRow(cb) { + this.rowCount -= 1; + return cb(null, { row: null, isValid: true }); + } + pushRow(row, cb) { + try { + if (!this.parserOptions.objectMode) { + this.push(JSON.stringify(row)); + } else { + this.push(row); + } + cb(); + } catch (e) { + cb(e); + } + } + static wrapDoneCallback(done) { + let errorCalled = false; + return (err, ...args) => { + if (err) { + if (errorCalled) { + throw err; + } + errorCalled = true; + done(err); + return; + } + done(...args); + }; + } + }; + exports2.CsvParserStream = CsvParserStream; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/index.js +var require_src4 = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.parseString = exports2.parseFile = exports2.parseStream = exports2.parse = exports2.ParserOptions = exports2.CsvParserStream = void 0; + var fs = __importStar2(require("fs")); + var stream_1 = require("stream"); + var ParserOptions_1 = require_ParserOptions(); + var CsvParserStream_1 = require_CsvParserStream(); + __exportStar2(require_types6(), exports2); + var CsvParserStream_2 = require_CsvParserStream(); + Object.defineProperty(exports2, "CsvParserStream", { enumerable: true, get: function() { + return CsvParserStream_2.CsvParserStream; + } }); + var ParserOptions_2 = require_ParserOptions(); + Object.defineProperty(exports2, "ParserOptions", { enumerable: true, get: function() { + return ParserOptions_2.ParserOptions; + } }); + exports2.parse = (args) => new CsvParserStream_1.CsvParserStream(new ParserOptions_1.ParserOptions(args)); + exports2.parseStream = (stream, options) => stream.pipe(new CsvParserStream_1.CsvParserStream(new ParserOptions_1.ParserOptions(options))); + exports2.parseFile = (location, options = {}) => fs.createReadStream(location).pipe(new CsvParserStream_1.CsvParserStream(new ParserOptions_1.ParserOptions(options))); + exports2.parseString = (string, options) => { + const rs = new stream_1.Readable(); + rs.push(string); + rs.push(null); + return rs.pipe(new CsvParserStream_1.CsvParserStream(new ParserOptions_1.ParserOptions(options))); + }; + } +}); + +// ../../node_modules/.pnpm/fast-csv@4.3.6/node_modules/fast-csv/build/src/index.js +var require_src5 = __commonJS({ + "../../node_modules/.pnpm/fast-csv@4.3.6/node_modules/fast-csv/build/src/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CsvParserStream = exports2.ParserOptions = exports2.parseFile = exports2.parseStream = exports2.parseString = exports2.parse = exports2.FormatterOptions = exports2.CsvFormatterStream = exports2.writeToPath = exports2.writeToString = exports2.writeToBuffer = exports2.writeToStream = exports2.write = exports2.format = void 0; + var format_1 = require_src3(); + Object.defineProperty(exports2, "format", { enumerable: true, get: function() { + return format_1.format; + } }); + Object.defineProperty(exports2, "write", { enumerable: true, get: function() { + return format_1.write; + } }); + Object.defineProperty(exports2, "writeToStream", { enumerable: true, get: function() { + return format_1.writeToStream; + } }); + Object.defineProperty(exports2, "writeToBuffer", { enumerable: true, get: function() { + return format_1.writeToBuffer; + } }); + Object.defineProperty(exports2, "writeToString", { enumerable: true, get: function() { + return format_1.writeToString; + } }); + Object.defineProperty(exports2, "writeToPath", { enumerable: true, get: function() { + return format_1.writeToPath; + } }); + Object.defineProperty(exports2, "CsvFormatterStream", { enumerable: true, get: function() { + return format_1.CsvFormatterStream; + } }); + Object.defineProperty(exports2, "FormatterOptions", { enumerable: true, get: function() { + return format_1.FormatterOptions; + } }); + var parse_1 = require_src4(); + Object.defineProperty(exports2, "parse", { enumerable: true, get: function() { + return parse_1.parse; + } }); + Object.defineProperty(exports2, "parseString", { enumerable: true, get: function() { + return parse_1.parseString; + } }); + Object.defineProperty(exports2, "parseStream", { enumerable: true, get: function() { + return parse_1.parseStream; + } }); + Object.defineProperty(exports2, "parseFile", { enumerable: true, get: function() { + return parse_1.parseFile; + } }); + Object.defineProperty(exports2, "ParserOptions", { enumerable: true, get: function() { + return parse_1.ParserOptions; + } }); + Object.defineProperty(exports2, "CsvParserStream", { enumerable: true, get: function() { + return parse_1.CsvParserStream; + } }); + } +}); + +// ../../node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/plugin/customParseFormat.js +var require_customParseFormat = __commonJS({ + "../../node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/plugin/customParseFormat.js"(exports2, module2) { + !(function(e, t) { + "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_customParseFormat = t(); + })(exports2, (function() { + "use strict"; + var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, i = /\d\d?/, o = /\d*[^-_:/,()\s\d]+/, s = {}, a = function(e2) { + return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3); + }; + var f = function(e2) { + return function(t2) { + this[e2] = +t2; + }; + }, h = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) { + (this.zone || (this.zone = {})).offset = (function(e3) { + if (!e3) return 0; + if ("Z" === e3) return 0; + var t2 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0); + return 0 === n2 ? 0 : "+" === t2[0] ? -n2 : n2; + })(e2); + }], u = function(e2) { + var t2 = s[e2]; + return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f)); + }, d = function(e2, t2) { + var n2, r2 = s.meridiem; + if (r2) { + for (var i2 = 1; i2 <= 24; i2 += 1) if (e2.indexOf(r2(i2, 0, t2)) > -1) { + n2 = i2 > 12; + break; + } + } else n2 = e2 === (t2 ? "pm" : "PM"); + return n2; + }, c = { A: [o, function(e2) { + this.afternoon = d(e2, false); + }], a: [o, function(e2) { + this.afternoon = d(e2, true); + }], Q: [n, function(e2) { + this.month = 3 * (e2 - 1) + 1; + }], S: [n, function(e2) { + this.milliseconds = 100 * +e2; + }], SS: [r, function(e2) { + this.milliseconds = 10 * +e2; + }], SSS: [/\d{3}/, function(e2) { + this.milliseconds = +e2; + }], s: [i, f("seconds")], ss: [i, f("seconds")], m: [i, f("minutes")], mm: [i, f("minutes")], H: [i, f("hours")], h: [i, f("hours")], HH: [i, f("hours")], hh: [i, f("hours")], D: [i, f("day")], DD: [r, f("day")], Do: [o, function(e2) { + var t2 = s.ordinal, n2 = e2.match(/\d+/); + if (this.day = n2[0], t2) for (var r2 = 1; r2 <= 31; r2 += 1) t2(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2); + }], w: [i, f("week")], ww: [r, f("week")], M: [i, f("month")], MM: [r, f("month")], MMM: [o, function(e2) { + var t2 = u("months"), n2 = (u("monthsShort") || t2.map((function(e3) { + return e3.slice(0, 3); + }))).indexOf(e2) + 1; + if (n2 < 1) throw new Error(); + this.month = n2 % 12 || n2; + }], MMMM: [o, function(e2) { + var t2 = u("months").indexOf(e2) + 1; + if (t2 < 1) throw new Error(); + this.month = t2 % 12 || t2; + }], Y: [/[+-]?\d+/, f("year")], YY: [r, function(e2) { + this.year = a(e2); + }], YYYY: [/\d{4}/, f("year")], Z: h, ZZ: h }; + function l2(n2) { + var r2, i2; + r2 = n2, i2 = s && s.formats; + for (var o2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(t2, n3, r3) { + var o3 = r3 && r3.toUpperCase(); + return n3 || i2[r3] || e[r3] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(e2, t3, n4) { + return t3 || n4.slice(1); + })); + }))).match(t), a2 = o2.length, f2 = 0; f2 < a2; f2 += 1) { + var h2 = o2[f2], u2 = c[h2], d2 = u2 && u2[0], l3 = u2 && u2[1]; + o2[f2] = l3 ? { regex: d2, parser: l3 } : h2.replace(/^\[|\]$/g, ""); + } + return function(e2) { + for (var t2 = {}, n3 = 0, r3 = 0; n3 < a2; n3 += 1) { + var i3 = o2[n3]; + if ("string" == typeof i3) r3 += i3.length; + else { + var s2 = i3.regex, f3 = i3.parser, h3 = e2.slice(r3), u3 = s2.exec(h3)[0]; + f3.call(t2, u3), e2 = e2.replace(u3, ""); + } + } + return (function(e3) { + var t3 = e3.afternoon; + if (void 0 !== t3) { + var n4 = e3.hours; + t3 ? n4 < 12 && (e3.hours += 12) : 12 === n4 && (e3.hours = 0), delete e3.afternoon; + } + })(t2), t2; + }; + } + return function(e2, t2, n2) { + n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (a = e2.parseTwoDigitYear); + var r2 = t2.prototype, i2 = r2.parse; + r2.parse = function(e3) { + var t3 = e3.date, r3 = e3.utc, o2 = e3.args; + this.$u = r3; + var a2 = o2[1]; + if ("string" == typeof a2) { + var f2 = true === o2[2], h2 = true === o2[3], u2 = f2 || h2, d2 = o2[2]; + h2 && (d2 = o2[2]), s = this.$locale(), !f2 && d2 && (s = n2.Ls[d2]), this.$d = (function(e4, t4, n3, r4) { + try { + if (["x", "X"].indexOf(t4) > -1) return new Date(("X" === t4 ? 1e3 : 1) * e4); + var i3 = l2(t4)(e4), o3 = i3.year, s2 = i3.month, a3 = i3.day, f3 = i3.hours, h3 = i3.minutes, u3 = i3.seconds, d3 = i3.milliseconds, c3 = i3.zone, m2 = i3.week, M2 = /* @__PURE__ */ new Date(), Y = a3 || (o3 || s2 ? 1 : M2.getDate()), p = o3 || M2.getFullYear(), v = 0; + o3 && !s2 || (v = s2 > 0 ? s2 - 1 : M2.getMonth()); + var D, w = f3 || 0, g = h3 || 0, y = u3 || 0, L = d3 || 0; + return c3 ? new Date(Date.UTC(p, v, Y, w, g, y, L + 60 * c3.offset * 1e3)) : n3 ? new Date(Date.UTC(p, v, Y, w, g, y, L)) : (D = new Date(p, v, Y, w, g, y, L), m2 && (D = r4(D).week(m2).toDate()), D); + } catch (e5) { + return /* @__PURE__ */ new Date(""); + } + })(t3, a2, r3, n2), this.init(), d2 && true !== d2 && (this.$L = this.locale(d2).$L), u2 && t3 != this.format(a2) && (this.$d = /* @__PURE__ */ new Date("")), s = {}; + } else if (a2 instanceof Array) for (var c2 = a2.length, m = 1; m <= c2; m += 1) { + o2[1] = a2[m - 1]; + var M = n2.apply(this, o2); + if (M.isValid()) { + this.$d = M.$d, this.$L = M.$L, this.init(); + break; + } + m === c2 && (this.$d = /* @__PURE__ */ new Date("")); + } + else i2.call(this, e3); + }; + }; + })); + } +}); + +// ../../node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/plugin/utc.js +var require_utc = __commonJS({ + "../../node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/plugin/utc.js"(exports2, module2) { + !(function(t, i) { + "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = i() : "function" == typeof define && define.amd ? define(i) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs_plugin_utc = i(); + })(exports2, (function() { + "use strict"; + var t = "minute", i = /[+-]\d\d(?::?\d\d)?/g, e = /([+-]|\d\d)/g; + return function(s, f, n) { + var u = f.prototype; + n.utc = function(t2) { + var i2 = { date: t2, utc: true, args: arguments }; + return new f(i2); + }, u.utc = function(i2) { + var e2 = n(this.toDate(), { locale: this.$L, utc: true }); + return i2 ? e2.add(this.utcOffset(), t) : e2; + }, u.local = function() { + return n(this.toDate(), { locale: this.$L, utc: false }); + }; + var r = u.parse; + u.parse = function(t2) { + t2.utc && (this.$u = true), this.$utils().u(t2.$offset) || (this.$offset = t2.$offset), r.call(this, t2); + }; + var o = u.init; + u.init = function() { + if (this.$u) { + var t2 = this.$d; + this.$y = t2.getUTCFullYear(), this.$M = t2.getUTCMonth(), this.$D = t2.getUTCDate(), this.$W = t2.getUTCDay(), this.$H = t2.getUTCHours(), this.$m = t2.getUTCMinutes(), this.$s = t2.getUTCSeconds(), this.$ms = t2.getUTCMilliseconds(); + } else o.call(this); + }; + var a = u.utcOffset; + u.utcOffset = function(s2, f2) { + var n2 = this.$utils().u; + if (n2(s2)) return this.$u ? 0 : n2(this.$offset) ? a.call(this) : this.$offset; + if ("string" == typeof s2 && (s2 = (function(t2) { + void 0 === t2 && (t2 = ""); + var s3 = t2.match(i); + if (!s3) return null; + var f3 = ("" + s3[0]).match(e) || ["-", 0, 0], n3 = f3[0], u3 = 60 * +f3[1] + +f3[2]; + return 0 === u3 ? 0 : "+" === n3 ? u3 : -u3; + })(s2), null === s2)) return this; + var u2 = Math.abs(s2) <= 16 ? 60 * s2 : s2; + if (0 === u2) return this.utc(f2); + var r2 = this.clone(); + if (f2) return r2.$offset = u2, r2.$u = false, r2; + var o2 = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset(); + return (r2 = this.local().add(u2 + o2, t)).$offset = u2, r2.$x.$localOffset = o2, r2; + }; + var h = u.format; + u.format = function(t2) { + var i2 = t2 || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : ""); + return h.call(this, i2); + }, u.valueOf = function() { + var t2 = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset()); + return this.$d.valueOf() - 6e4 * t2; + }, u.isUTC = function() { + return !!this.$u; + }, u.toISOString = function() { + return this.toDate().toISOString(); + }, u.toString = function() { + return this.toDate().toUTCString(); + }; + var l2 = u.toDate; + u.toDate = function(t2) { + return "s" === t2 && this.$offset ? n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : l2.call(this); + }; + var c = u.diff; + u.diff = function(t2, i2, e2) { + if (t2 && this.$u === t2.$u) return c.call(this, t2, i2, e2); + var s2 = this.local(), f2 = n(t2).local(); + return c.call(s2, f2, i2, e2); + }; + }; + })); + } +}); + +// ../../node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/dayjs.min.js +var require_dayjs_min = __commonJS({ + "../../node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/dayjs.min.js"(exports2, module2) { + !(function(t, e) { + "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e(); + })(exports2, (function() { + "use strict"; + var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l2 = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) { + var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100; + return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]"; + } }, m = function(t2, e2, n2) { + var r2 = String(t2); + return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2; + }, v = { s: m, z: function(t2) { + var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60; + return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0"); + }, m: function t2(e2, n2) { + if (e2.date() < n2.date()) return -t2(n2, e2); + var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c); + return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0); + }, a: function(t2) { + return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2); + }, p: function(t2) { + return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t2] || String(t2 || "").toLowerCase().replace(/s$/, ""); + }, u: function(t2) { + return void 0 === t2; + } }, g = "en", D = {}; + D[g] = M; + var p = "$isDayjsObject", S = function(t2) { + return t2 instanceof _2 || !(!t2 || !t2[p]); + }, w = function t2(e2, n2, r2) { + var i2; + if (!e2) return g; + if ("string" == typeof e2) { + var s2 = e2.toLowerCase(); + D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2); + var u2 = e2.split("-"); + if (!i2 && u2.length > 1) return t2(u2[0]); + } else { + var a2 = e2.name; + D[a2] = e2, i2 = a2; + } + return !r2 && i2 && (g = i2), i2 || !r2 && g; + }, O = function(t2, e2) { + if (S(t2)) return t2.clone(); + var n2 = "object" == typeof e2 ? e2 : {}; + return n2.date = t2, n2.args = arguments, new _2(n2); + }, b = v; + b.l = w, b.i = S, b.w = function(t2, e2) { + return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset }); + }; + var _2 = (function() { + function M2(t2) { + this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true; + } + var m2 = M2.prototype; + return m2.parse = function(t2) { + this.$d = (function(t3) { + var e2 = t3.date, n2 = t3.utc; + if (null === e2) return /* @__PURE__ */ new Date(NaN); + if (b.u(e2)) return /* @__PURE__ */ new Date(); + if (e2 instanceof Date) return new Date(e2); + if ("string" == typeof e2 && !/Z$/i.test(e2)) { + var r2 = e2.match($); + if (r2) { + var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3); + return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2); + } + } + return new Date(e2); + })(t2), this.init(); + }, m2.init = function() { + var t2 = this.$d; + this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds(); + }, m2.$utils = function() { + return b; + }, m2.isValid = function() { + return !(this.$d.toString() === l2); + }, m2.isSame = function(t2, e2) { + var n2 = O(t2); + return this.startOf(e2) <= n2 && n2 <= this.endOf(e2); + }, m2.isAfter = function(t2, e2) { + return O(t2) < this.startOf(e2); + }, m2.isBefore = function(t2, e2) { + return this.endOf(e2) < O(t2); + }, m2.$g = function(t2, e2, n2) { + return b.u(t2) ? this[e2] : this.set(n2, t2); + }, m2.unix = function() { + return Math.floor(this.valueOf() / 1e3); + }, m2.valueOf = function() { + return this.$d.getTime(); + }, m2.startOf = function(t2, e2) { + var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l3 = function(t3, e3) { + var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2); + return r2 ? i2 : i2.endOf(a); + }, $2 = function(t3, e3) { + return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2); + }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : ""); + switch (f2) { + case h: + return r2 ? l3(1, 0) : l3(31, 11); + case c: + return r2 ? l3(1, M3) : l3(0, M3 + 1); + case o: + var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2; + return l3(r2 ? m3 - D2 : m3 + (6 - D2), M3); + case a: + case d: + return $2(v2 + "Hours", 0); + case u: + return $2(v2 + "Minutes", 1); + case s: + return $2(v2 + "Seconds", 2); + case i: + return $2(v2 + "Milliseconds", 3); + default: + return this.clone(); + } + }, m2.endOf = function(t2) { + return this.startOf(t2, false); + }, m2.$set = function(t2, e2) { + var n2, o2 = b.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l3 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2; + if (o2 === c || o2 === h) { + var y2 = this.clone().set(d, 1); + y2.$d[l3]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d; + } else l3 && this.$d[l3]($2); + return this.init(), this; + }, m2.set = function(t2, e2) { + return this.clone().$set(t2, e2); + }, m2.get = function(t2) { + return this[b.p(t2)](); + }, m2.add = function(r2, f2) { + var d2, l3 = this; + r2 = Number(r2); + var $2 = b.p(f2), y2 = function(t2) { + var e2 = O(l3); + return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l3); + }; + if ($2 === c) return this.set(c, this.$M + r2); + if ($2 === h) return this.set(h, this.$y + r2); + if ($2 === a) return y2(1); + if ($2 === o) return y2(7); + var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3; + return b.w(m3, this); + }, m2.subtract = function(t2, e2) { + return this.add(-1 * t2, e2); + }, m2.format = function(t2) { + var e2 = this, n2 = this.$locale(); + if (!this.isValid()) return n2.invalidDate || l2; + var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) { + return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3); + }, d2 = function(t3) { + return b.s(s2 % 12 || 12, t3, "0"); + }, $2 = f2 || function(t3, e3, n3) { + var r3 = t3 < 12 ? "AM" : "PM"; + return n3 ? r3.toLowerCase() : r3; + }; + return r2.replace(y, (function(t3, r3) { + return r3 || (function(t4) { + switch (t4) { + case "YY": + return String(e2.$y).slice(-2); + case "YYYY": + return b.s(e2.$y, 4, "0"); + case "M": + return a2 + 1; + case "MM": + return b.s(a2 + 1, 2, "0"); + case "MMM": + return h2(n2.monthsShort, a2, c2, 3); + case "MMMM": + return h2(c2, a2); + case "D": + return e2.$D; + case "DD": + return b.s(e2.$D, 2, "0"); + case "d": + return String(e2.$W); + case "dd": + return h2(n2.weekdaysMin, e2.$W, o2, 2); + case "ddd": + return h2(n2.weekdaysShort, e2.$W, o2, 3); + case "dddd": + return o2[e2.$W]; + case "H": + return String(s2); + case "HH": + return b.s(s2, 2, "0"); + case "h": + return d2(1); + case "hh": + return d2(2); + case "a": + return $2(s2, u2, true); + case "A": + return $2(s2, u2, false); + case "m": + return String(u2); + case "mm": + return b.s(u2, 2, "0"); + case "s": + return String(e2.$s); + case "ss": + return b.s(e2.$s, 2, "0"); + case "SSS": + return b.s(e2.$ms, 3, "0"); + case "Z": + return i2; + } + return null; + })(t3) || i2.replace(":", ""); + })); + }, m2.utcOffset = function() { + return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); + }, m2.diff = function(r2, d2, l3) { + var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() { + return b.m(y2, m3); + }; + switch (M3) { + case h: + $2 = D2() / 12; + break; + case c: + $2 = D2(); + break; + case f: + $2 = D2() / 3; + break; + case o: + $2 = (g2 - v2) / 6048e5; + break; + case a: + $2 = (g2 - v2) / 864e5; + break; + case u: + $2 = g2 / n; + break; + case s: + $2 = g2 / e; + break; + case i: + $2 = g2 / t; + break; + default: + $2 = g2; + } + return l3 ? $2 : b.a($2); + }, m2.daysInMonth = function() { + return this.endOf(c).$D; + }, m2.$locale = function() { + return D[this.$L]; + }, m2.locale = function(t2, e2) { + if (!t2) return this.$L; + var n2 = this.clone(), r2 = w(t2, e2, true); + return r2 && (n2.$L = r2), n2; + }, m2.clone = function() { + return b.w(this.$d, this); + }, m2.toDate = function() { + return new Date(this.valueOf()); + }, m2.toJSON = function() { + return this.isValid() ? this.toISOString() : null; + }, m2.toISOString = function() { + return this.$d.toISOString(); + }, m2.toString = function() { + return this.$d.toUTCString(); + }, M2; + })(), Y = _2.prototype; + return O.prototype = Y, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach((function(t2) { + Y[t2[1]] = function(e2) { + return this.$g(e2, t2[0], t2[1]); + }; + })), O.extend = function(t2, e2) { + return t2.$i || (t2(e2, _2, O), t2.$i = true), O; + }, O.locale = w, O.isDayjs = S, O.unix = function(t2) { + return O(1e3 * t2); + }, O.en = D[g], O.Ls = D, O.p = {}, O; + })); + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/csv/csv.js +var require_csv = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/csv/csv.js"(exports2, module2) { + var fs = require("fs"); + var fastCsv = require_src5(); + var customParseFormat = require_customParseFormat(); + var utc = require_utc(); + var dayjs = require_dayjs_min().extend(customParseFormat).extend(utc); + var StreamBuf = require_stream_buf(); + var { + fs: { exists } + } = require_utils21(); + var SpecialValues = { + true: true, + false: false, + "#N/A": { error: "#N/A" }, + "#REF!": { error: "#REF!" }, + "#NAME?": { error: "#NAME?" }, + "#DIV/0!": { error: "#DIV/0!" }, + "#NULL!": { error: "#NULL!" }, + "#VALUE!": { error: "#VALUE!" }, + "#NUM!": { error: "#NUM!" } + }; + var CSV = class { + constructor(workbook) { + this.workbook = workbook; + this.worksheet = null; + } + async readFile(filename, options) { + options = options || {}; + if (!await exists(filename)) { + throw new Error(`File not found: ${filename}`); + } + const stream = fs.createReadStream(filename); + const worksheet = await this.read(stream, options); + stream.close(); + return worksheet; + } + read(stream, options) { + options = options || {}; + return new Promise((resolve, reject) => { + const worksheet = this.workbook.addWorksheet(options.sheetName); + const dateFormats = options.dateFormats || [ + "YYYY-MM-DD[T]HH:mm:ssZ", + "YYYY-MM-DD[T]HH:mm:ss", + "MM-DD-YYYY", + "YYYY-MM-DD" + ]; + const map = options.map || function(datum) { + if (datum === "") { + return null; + } + const datumNumber = Number(datum); + if (!Number.isNaN(datumNumber) && datumNumber !== Infinity) { + return datumNumber; + } + const dt = dateFormats.reduce((matchingDate, currentDateFormat) => { + if (matchingDate) { + return matchingDate; + } + const dayjsObj = dayjs(datum, currentDateFormat, true); + if (dayjsObj.isValid()) { + return dayjsObj; + } + return null; + }, null); + if (dt) { + return new Date(dt.valueOf()); + } + const special = SpecialValues[datum]; + if (special !== void 0) { + return special; + } + return datum; + }; + const csvStream = fastCsv.parse(options.parserOptions).on("data", (data) => { + worksheet.addRow(data.map(map)); + }).on("end", () => { + csvStream.emit("worksheet", worksheet); + }); + csvStream.on("worksheet", resolve).on("error", reject); + stream.pipe(csvStream); + }); + } + /** + * @deprecated since version 4.0. You should use `CSV#read` instead. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md + */ + createInputStream() { + throw new Error( + "`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md" + ); + } + write(stream, options) { + return new Promise((resolve, reject) => { + options = options || {}; + const worksheet = this.workbook.getWorksheet(options.sheetName || options.sheetId); + const csvStream = fastCsv.format(options.formatterOptions); + stream.on("finish", () => { + resolve(); + }); + csvStream.on("error", reject); + csvStream.pipe(stream); + const { dateFormat, dateUTC } = options; + const map = options.map || ((value) => { + if (value) { + if (value.text || value.hyperlink) { + return value.hyperlink || value.text || ""; + } + if (value.formula || value.result) { + return value.result || ""; + } + if (value instanceof Date) { + if (dateFormat) { + return dateUTC ? dayjs.utc(value).format(dateFormat) : dayjs(value).format(dateFormat); + } + return dateUTC ? dayjs.utc(value).format() : dayjs(value).format(); + } + if (value.error) { + return value.error; + } + if (typeof value === "object") { + return JSON.stringify(value); + } + } + return value; + }); + const includeEmptyRows = options.includeEmptyRows === void 0 || options.includeEmptyRows; + let lastRow = 1; + if (worksheet) { + worksheet.eachRow((row, rowNumber) => { + if (includeEmptyRows) { + while (lastRow++ < rowNumber - 1) { + csvStream.write([]); + } + } + const { values } = row; + values.shift(); + csvStream.write(values.map(map)); + lastRow = rowNumber; + }); + } + csvStream.end(); + }); + } + writeFile(filename, options) { + options = options || {}; + const streamOptions = { + encoding: options.encoding || "utf8" + }; + const stream = fs.createWriteStream(filename, streamOptions); + return this.write(stream, options); + } + async writeBuffer(options) { + const stream = new StreamBuf(); + await this.write(stream, options); + return stream.read(); + } + }; + module2.exports = CSV; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/workbook.js +var require_workbook = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/workbook.js"(exports2, module2) { + "use strict"; + var Worksheet = require_worksheet(); + var DefinedNames = require_defined_names(); + var XLSX = require_xlsx(); + var CSV = require_csv(); + var Workbook = class { + constructor() { + this.category = ""; + this.company = ""; + this.created = /* @__PURE__ */ new Date(); + this.description = ""; + this.keywords = ""; + this.manager = ""; + this.modified = this.created; + this.properties = {}; + this.calcProperties = {}; + this._worksheets = []; + this.subject = ""; + this.title = ""; + this.views = []; + this.media = []; + this._definedNames = new DefinedNames(); + } + get xlsx() { + if (!this._xlsx) this._xlsx = new XLSX(this); + return this._xlsx; + } + get csv() { + if (!this._csv) this._csv = new CSV(this); + return this._csv; + } + get nextId() { + for (let i = 1; i < this._worksheets.length; i++) { + if (!this._worksheets[i]) { + return i; + } + } + return this._worksheets.length || 1; + } + addWorksheet(name, options) { + const id = this.nextId; + if (options) { + if (typeof options === "string") { + console.trace( + 'tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }' + ); + options = { + properties: { + tabColor: { argb: options } + } + }; + } else if (options.argb || options.theme || options.indexed) { + console.trace( + "tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }" + ); + options = { + properties: { + tabColor: options + } + }; + } + } + const lastOrderNo = this._worksheets.reduce((acc, ws) => (ws && ws.orderNo) > acc ? ws.orderNo : acc, 0); + const worksheetOptions = Object.assign({}, options, { + id, + name, + orderNo: lastOrderNo + 1, + workbook: this + }); + const worksheet = new Worksheet(worksheetOptions); + this._worksheets[id] = worksheet; + return worksheet; + } + removeWorksheetEx(worksheet) { + delete this._worksheets[worksheet.id]; + } + removeWorksheet(id) { + const worksheet = this.getWorksheet(id); + if (worksheet) { + worksheet.destroy(); + } + } + getWorksheet(id) { + if (id === void 0) { + return this._worksheets.find(Boolean); + } + if (typeof id === "number") { + return this._worksheets[id]; + } + if (typeof id === "string") { + return this._worksheets.find((worksheet) => worksheet && worksheet.name === id); + } + return void 0; + } + get worksheets() { + return this._worksheets.slice(1).sort((a, b) => a.orderNo - b.orderNo).filter(Boolean); + } + eachSheet(iteratee) { + this.worksheets.forEach((sheet) => { + iteratee(sheet, sheet.id); + }); + } + get definedNames() { + return this._definedNames; + } + clearThemes() { + this._themes = void 0; + } + addImage(image) { + const id = this.media.length; + this.media.push(Object.assign({}, image, { type: "image" })); + return id; + } + getImage(id) { + return this.media[id]; + } + get model() { + return { + creator: this.creator || "Unknown", + lastModifiedBy: this.lastModifiedBy || "Unknown", + lastPrinted: this.lastPrinted, + created: this.created, + modified: this.modified, + properties: this.properties, + worksheets: this.worksheets.map((worksheet) => worksheet.model), + sheets: this.worksheets.map((ws) => ws.model).filter(Boolean), + definedNames: this._definedNames.model, + views: this.views, + company: this.company, + manager: this.manager, + title: this.title, + subject: this.subject, + keywords: this.keywords, + category: this.category, + description: this.description, + language: this.language, + revision: this.revision, + contentStatus: this.contentStatus, + themes: this._themes, + media: this.media, + calcProperties: this.calcProperties + }; + } + set model(value) { + this.creator = value.creator; + this.lastModifiedBy = value.lastModifiedBy; + this.lastPrinted = value.lastPrinted; + this.created = value.created; + this.modified = value.modified; + this.company = value.company; + this.manager = value.manager; + this.title = value.title; + this.subject = value.subject; + this.keywords = value.keywords; + this.category = value.category; + this.description = value.description; + this.language = value.language; + this.revision = value.revision; + this.contentStatus = value.contentStatus; + this.properties = value.properties; + this.calcProperties = value.calcProperties; + this._worksheets = []; + value.worksheets.forEach((worksheetModel) => { + const { id, name, state } = worksheetModel; + const orderNo = value.sheets && value.sheets.findIndex((ws) => ws.id === id); + const worksheet = this._worksheets[id] = new Worksheet({ + id, + name, + orderNo, + state, + workbook: this + }); + worksheet.model = worksheetModel; + }); + this._definedNames.model = value.definedNames; + this.views = value.views; + this._themes = value.themes; + this.media = value.media || []; + } + }; + module2.exports = Workbook; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/modelcontainer.js +var require_modelcontainer = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/modelcontainer.js"(exports2, module2) { + "use strict"; + var XLSX = require_xlsx(); + var ModelContainer = class { + constructor(model) { + this.model = model; + } + get xlsx() { + if (!this._xlsx) { + this._xlsx = new XLSX(this); + } + return this._xlsx; + } + }; + module2.exports = ModelContainer; + } +}); + +// ../../node_modules/.pnpm/minimatch@5.1.9/node_modules/minimatch/lib/path.js +var require_path = __commonJS({ + "../../node_modules/.pnpm/minimatch@5.1.9/node_modules/minimatch/lib/path.js"(exports2, module2) { + var isWindows = typeof process === "object" && process && process.platform === "win32"; + module2.exports = isWindows ? { sep: "\\" } : { sep: "/" }; + } +}); + +// ../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js +var require_balanced_match = __commonJS({ + "../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports2, module2) { + "use strict"; + module2.exports = balanced; + function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + var r = range(a, b, str); + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; + } + balanced.range = range; + function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + if (a === b) { + return [ai, bi]; + } + begs = []; + left = str.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) { + result = [left, right]; + } + } + return result; + } + } +}); + +// ../../node_modules/.pnpm/brace-expansion@2.1.4/node_modules/brace-expansion/index.js +var require_brace_expansion = __commonJS({ + "../../node_modules/.pnpm/brace-expansion@2.1.4/node_modules/brace-expansion/index.js"(exports2, module2) { + var balanced = require_balanced_match(); + module2.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + var EXPANSION_MAX = 1e5; + var EXPANSION_MAX_LENGTH = 4e6; + function numeric(str) { + return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); + } + function escapeBraces(str) { + return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str) { + return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str) { + if (!str) + return [""]; + var parts = []; + var m = balanced("{", "}", str); + if (!m) + return str.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str, options) { + if (!str) + return []; + options = options || {}; + var max = options.max == null ? EXPANSION_MAX : options.max; + var maxLength = options.maxLength == null ? EXPANSION_MAX_LENGTH : options.maxLength; + if (str.substr(0, 2) === "{}") { + str = "\\{\\}" + str.substr(2); + } + return expand(escapeBraces(str), max, maxLength, true).map(unescapeBraces); + } + function embrace(str) { + return "{" + str + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte(i, y) { + return i >= y; + } + function combine(acc, pre, values, max, maxLength, dropEmpties) { + var out = []; + var length = 0; + for (var a = 0; a < acc.length; a++) { + for (var v = 0; v < values.length; v++) { + if (out.length >= max) return out; + var expansion = acc[a] + pre + values[v]; + if (dropEmpties && !expansion) continue; + if (length + expansion.length > maxLength) return out; + out.push(expansion); + length += expansion.length; + } + } + return out; + } + function expandSequence(body, isAlphaSequence, max, maxLength) { + var n = body.split(/\.\./); + var N = []; + if (n[0] === void 0 || n[1] === void 0) { + return N; + } + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric(n[2])), 1) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + var length = 0; + for (var i = x; test(i, y) && N.length < max; i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") { + c = ""; + } + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) { + c = "-" + z + c.slice(1); + } else { + c = z + c; + } + } + } + } + if (length + c.length > maxLength) break; + N.push(c); + length += c.length; + } + return N; + } + function expand(str, max, maxLength, isTop) { + var acc = [""]; + var dropEmpties = false; + var firstGroup = true; + for (; ; ) { + const m = balanced("{", "}", str); + if (!m) { + return combine(acc, str, [""], max, maxLength, dropEmpties); + } + const pre = m.pre; + if (/\$$/.test(pre)) { + acc = combine( + acc, + pre + "{" + m.body + "}", + [""], + max, + maxLength, + dropEmpties && !m.post.length + ); + firstGroup = false; + if (!m.post.length) break; + str = m.post; + continue; + } + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,(?!,).*\}/)) { + str = m.pre + "{" + m.body + escClose + m.post; + isTop = true; + continue; + } + return combine( + acc, + pre + "{" + m.body + "}" + m.post, + [""], + max, + maxLength, + dropEmpties + ); + } + if (firstGroup) { + dropEmpties = isTop && !isSequence; + firstGroup = false; + } + var values; + if (isSequence) { + values = expandSequence(m.body, isAlphaSequence, max, maxLength); + } else { + var n = parseCommaParts(m.body); + if (n.length === 1 && n[0] !== void 0) { + n = expand(n[0], max, maxLength, false).map(embrace); + if (n.length === 1) { + acc = combine( + acc, + pre + n[0], + [""], + max, + maxLength, + dropEmpties && !m.post.length + ); + if (!m.post.length) break; + str = m.post; + continue; + } + } + var dropsEmpties = dropEmpties && !m.post.length && !pre; + for (var d = 0; dropsEmpties && d < acc.length; d++) { + if (acc[d]) { + dropsEmpties = false; + } + } + values = []; + var valuesLength = 0; + outer: for (var j = 0; j < n.length; j++) { + var expanded = expand(n[j], max, maxLength, false); + for (var k = 0; k < expanded.length; k++) { + var v = expanded[k]; + if (dropsEmpties && !v) continue; + if (values.length >= max || valuesLength + v.length > maxLength) { + break outer; + } + values.push(v); + valuesLength += v.length; + } + } + } + acc = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length); + if (!m.post.length) break; + str = m.post; + } + return acc; + } + } +}); + +// ../../node_modules/.pnpm/minimatch@5.1.9/node_modules/minimatch/minimatch.js +var require_minimatch = __commonJS({ + "../../node_modules/.pnpm/minimatch@5.1.9/node_modules/minimatch/minimatch.js"(exports2, module2) { + var minimatch = module2.exports = (p, pattern, options = {}) => { + assertValidPattern(pattern); + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + return new Minimatch(pattern, options).match(p); + }; + module2.exports = minimatch; + var path = require_path(); + minimatch.sep = path.sep; + var GLOBSTAR = Symbol("globstar **"); + minimatch.GLOBSTAR = GLOBSTAR; + var expand = require_brace_expansion(); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var charSet = (s) => s.split("").reduce((set, c) => { + set[c] = true; + return set; + }, {}); + var reSpecials = charSet("().*{}+?[]^$\\!"); + var addPatternStartSet = charSet("[.("); + var slashSplit = /\/+/; + minimatch.filter = (pattern, options = {}) => (p, i, list) => minimatch(p, pattern, options); + var ext = (a, b = {}) => { + const t = {}; + Object.keys(a).forEach((k) => t[k] = a[k]); + Object.keys(b).forEach((k) => t[k] = b[k]); + return t; + }; + minimatch.defaults = (def) => { + if (!def || typeof def !== "object" || !Object.keys(def).length) { + return minimatch; + } + const orig = minimatch; + const m = (p, pattern, options) => orig(p, pattern, ext(def, options)); + m.Minimatch = class Minimatch extends orig.Minimatch { + constructor(pattern, options) { + super(pattern, ext(def, options)); + } + }; + m.Minimatch.defaults = (options) => orig.defaults(ext(def, options)).Minimatch; + m.filter = (pattern, options) => orig.filter(pattern, ext(def, options)); + m.defaults = (options) => orig.defaults(ext(def, options)); + m.makeRe = (pattern, options) => orig.makeRe(pattern, ext(def, options)); + m.braceExpand = (pattern, options) => orig.braceExpand(pattern, ext(def, options)); + m.match = (list, pattern, options) => orig.match(list, pattern, ext(def, options)); + return m; + }; + minimatch.braceExpand = (pattern, options) => braceExpand(pattern, options); + var braceExpand = (pattern, options = {}) => { + assertValidPattern(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + return [pattern]; + } + return expand(pattern); + }; + var MAX_PATTERN_LENGTH = 1024 * 64; + var assertValidPattern = (pattern) => { + if (typeof pattern !== "string") { + throw new TypeError("invalid pattern"); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError("pattern is too long"); + } + }; + var SUBPARSE = Symbol("subparse"); + minimatch.makeRe = (pattern, options) => new Minimatch(pattern, options || {}).makeRe(); + minimatch.match = (list, pattern, options = {}) => { + const mm = new Minimatch(pattern, options); + list = list.filter((f) => mm.match(f)); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + var globUnescape = (s) => s.replace(/\\(.)/g, "$1"); + var charUnescape = (s) => s.replace(/\\([^-\]])/g, "$1"); + var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + var braExpEscape = (s) => s.replace(/[[\]\\]/g, "\\$&"); + var Minimatch = class { + constructor(pattern, options) { + assertValidPattern(pattern); + if (!options) options = {}; + this.options = options; + this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200; + this.set = []; + this.pattern = pattern; + this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; + if (this.windowsPathsNoEscape) { + this.pattern = this.pattern.replace(/\\/g, "/"); + } + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.make(); + } + debug() { + } + make() { + const pattern = this.pattern; + const options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + let set = this.globSet = this.braceExpand(); + if (options.debug) this.debug = (...args) => console.error(...args); + this.debug(this.pattern, set); + set = this.globParts = set.map((s) => s.split(slashSplit)); + this.debug(this.pattern, set); + set = set.map((s, si, set2) => s.map(this.parse, this)); + this.debug(this.pattern, set); + set = set.filter((s) => s.indexOf(false) === -1); + this.debug(this.pattern, set); + this.set = set; + } + parseNegate() { + if (this.options.nonegate) return; + const pattern = this.pattern; + let negate = false; + let negateOffset = 0; + for (let i = 0; i < pattern.length && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) this.pattern = pattern.slice(negateOffset); + this.negate = negate; + } + // set partial to true to test if, for example, + // "/a/b" matches the start of "/*/b/*/d" + // Partial means, if you run out of file before you run + // out of pattern, then that's fine, as long as all + // the parts match. + matchOne(file2, pattern, partial) { + if (pattern.indexOf(GLOBSTAR) !== -1) { + return this._matchGlobstar(file2, pattern, partial, 0, 0); + } + return this._matchOne(file2, pattern, partial, 0, 0); + } + _matchGlobstar(file2, pattern, partial, fileIndex, patternIndex) { + let firstgs = -1; + for (let i = patternIndex; i < pattern.length; i++) { + if (pattern[i] === GLOBSTAR) { + firstgs = i; + break; + } + } + let lastgs = -1; + for (let i = pattern.length - 1; i >= 0; i--) { + if (pattern[i] === GLOBSTAR) { + lastgs = i; + break; + } + } + const head = pattern.slice(patternIndex, firstgs); + const body = partial ? pattern.slice(firstgs + 1) : pattern.slice(firstgs + 1, lastgs); + const tail = partial ? [] : pattern.slice(lastgs + 1); + if (head.length) { + const fileHead = file2.slice(fileIndex, fileIndex + head.length); + if (!this._matchOne(fileHead, head, partial, 0, 0)) { + return false; + } + fileIndex += head.length; + } + let fileTailMatch = 0; + if (tail.length) { + if (tail.length + fileIndex > file2.length) return false; + const tailStart = file2.length - tail.length; + if (this._matchOne(file2, tail, partial, tailStart, 0)) { + fileTailMatch = tail.length; + } else { + if (file2[file2.length - 1] !== "" || fileIndex + tail.length === file2.length) { + return false; + } + if (!this._matchOne(file2, tail, partial, tailStart - 1, 0)) { + return false; + } + fileTailMatch = tail.length + 1; + } + } + if (!body.length) { + let sawSome = !!fileTailMatch; + for (let i = fileIndex; i < file2.length - fileTailMatch; i++) { + const f = String(file2[i]); + sawSome = true; + if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") { + return false; + } + } + return partial || sawSome; + } + const bodySegments = [[[], 0]]; + let currentBody = bodySegments[0]; + let nonGsParts = 0; + const nonGsPartsSums = [0]; + for (const b of body) { + if (b === GLOBSTAR) { + nonGsPartsSums.push(nonGsParts); + currentBody = [[], 0]; + bodySegments.push(currentBody); + } else { + currentBody[0].push(b); + nonGsParts++; + } + } + let idx = bodySegments.length - 1; + const fileLength = file2.length - fileTailMatch; + for (const b of bodySegments) { + b[1] = fileLength - (nonGsPartsSums[idx--] + b[0].length); + } + return !!this._matchGlobStarBodySections( + file2, + bodySegments, + fileIndex, + 0, + partial, + 0, + !!fileTailMatch + ); + } + // return false for "nope, not matching" + // return null for "not matching, cannot keep trying" + _matchGlobStarBodySections(file2, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) { + const bs = bodySegments[bodyIndex]; + if (!bs) { + for (let i = fileIndex; i < file2.length; i++) { + sawTail = true; + const f = file2[i]; + if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") { + return false; + } + } + return sawTail; + } + const [body, after] = bs; + while (fileIndex <= after) { + const m = this._matchOne( + file2.slice(0, fileIndex + body.length), + body, + partial, + fileIndex, + 0 + ); + if (m && globStarDepth < this.maxGlobstarRecursion) { + const sub = this._matchGlobStarBodySections( + file2, + bodySegments, + fileIndex + body.length, + bodyIndex + 1, + partial, + globStarDepth + 1, + sawTail + ); + if (sub !== false) { + return sub; + } + } + const f = file2[fileIndex]; + if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") { + return false; + } + fileIndex++; + } + return partial || null; + } + _matchOne(file2, pattern, partial, fileIndex, patternIndex) { + let fi, pi, fl, pl; + for (fi = fileIndex, pi = patternIndex, fl = file2.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + const p = pattern[pi]; + const f = file2[fi]; + this.debug(pattern, p, f); + if (p === false || p === GLOBSTAR) return false; + let hit; + if (typeof p === "string") { + hit = f === p; + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + return fi === fl - 1 && file2[fi] === ""; + } + throw new Error("wtf?"); + } + braceExpand() { + return braceExpand(this.pattern, this.options); + } + parse(pattern, isSub) { + assertValidPattern(pattern); + const options = this.options; + if (pattern === "**") { + if (!options.noglobstar) + return GLOBSTAR; + else + pattern = "*"; + } + if (pattern === "") return ""; + let re = ""; + let hasMagic = false; + let escaping = false; + const patternListStack = []; + const negativeLists = []; + let stateChar; + let inClass = false; + let reClassStart = -1; + let classStart = -1; + let cs; + let pl; + let sp; + let dotTravAllowed = pattern.charAt(0) === "."; + let dotFileAllowed = options.dot || dotTravAllowed; + const patternStart = () => dotTravAllowed ? "" : dotFileAllowed ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + const subPatternStart = (p) => p.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + const clearStateChar = () => { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + this.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + }; + for (let i = 0, c; i < pattern.length && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping) { + if (c === "/") { + return false; + } + if (reSpecials[c]) { + re += "\\"; + } + re += c; + escaping = false; + continue; + } + switch (c) { + /* istanbul ignore next */ + case "/": { + return false; + } + case "\\": + if (inClass && pattern.charAt(i + 1) === "-") { + re += c; + continue; + } + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) c = "^"; + re += c; + continue; + } + if (c === "*" && stateChar === "*") continue; + this.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) clearStateChar(); + continue; + case "(": { + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + const plEntry = { + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }; + this.debug(this.pattern, " ", plEntry); + patternListStack.push(plEntry); + re += plEntry.open; + if (plEntry.start === 0 && plEntry.type !== "!") { + dotTravAllowed = true; + re += subPatternStart(pattern.slice(i + 1)); + } + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + } + case ")": { + const plEntry = patternListStack[patternListStack.length - 1]; + if (inClass || !plEntry) { + re += "\\)"; + continue; + } + patternListStack.pop(); + clearStateChar(); + hasMagic = true; + pl = plEntry; + re += pl.close; + if (pl.type === "!") { + negativeLists.push(Object.assign(pl, { reEnd: re.length })); + } + continue; + } + case "|": { + const plEntry = patternListStack[patternListStack.length - 1]; + if (inClass || !plEntry) { + re += "\\|"; + continue; + } + clearStateChar(); + re += "|"; + if (plEntry.start === 0 && plEntry.type !== "!") { + dotTravAllowed = true; + re += subPatternStart(pattern.slice(i + 1)); + } + continue; + } + // these are mostly the same in regexp and glob + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + continue; + } + cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + braExpEscape(charUnescape(cs)) + "]"); + re += c; + } catch (er) { + re = re.substring(0, reClassStart) + "(?:$.)"; + } + hasMagic = true; + inClass = false; + continue; + default: + clearStateChar(); + if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + break; + } + } + if (inClass) { + cs = pattern.slice(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substring(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + let tail; + tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_2, $1, $2) => { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + const t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + const addPatternStart = addPatternStartSet[re.charAt(0)]; + for (let n = negativeLists.length - 1; n > -1; n--) { + const nl = negativeLists[n]; + const nlBefore = re.slice(0, nl.reStart); + const nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + let nlAfter = re.slice(nl.reEnd); + const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter; + const closeParensBefore = nlBefore.split(")").length; + const openParensBefore = nlBefore.split("(").length - closeParensBefore; + let cleanAfter = nlAfter; + for (let i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + const dollar = nlAfter === "" && isSub !== SUBPARSE ? "(?:$|\\/)" : ""; + re = nlBefore + nlFirst + nlAfter + dollar + nlLast; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart() + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (options.nocase && !hasMagic) { + hasMagic = pattern.toUpperCase() !== pattern.toLowerCase(); + } + if (!hasMagic) { + return globUnescape(pattern); + } + const flags = options.nocase ? "i" : ""; + try { + return Object.assign(new RegExp("^" + re + "$", flags), { + _glob: pattern, + _src: re + }); + } catch (er) { + return new RegExp("$."); + } + } + makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + const set = this.set; + if (!set.length) { + this.regexp = false; + return this.regexp; + } + const options = this.options; + const twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + const flags = options.nocase ? "i" : ""; + let re = set.map((pattern) => { + pattern = pattern.map( + (p) => typeof p === "string" ? regExpEscape(p) : p === GLOBSTAR ? GLOBSTAR : p._src + ).reduce((set2, p) => { + if (!(set2[set2.length - 1] === GLOBSTAR && p === GLOBSTAR)) { + set2.push(p); + } + return set2; + }, []); + pattern.forEach((p, i) => { + if (p !== GLOBSTAR || pattern[i - 1] === GLOBSTAR) { + return; + } + if (i === 0) { + if (pattern.length > 1) { + pattern[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + pattern[i + 1]; + } else { + pattern[i] = twoStar; + } + } else if (i === pattern.length - 1) { + pattern[i - 1] += "(?:\\/|" + twoStar + ")?"; + } else { + pattern[i - 1] += "(?:\\/|\\/" + twoStar + "\\/)" + pattern[i + 1]; + pattern[i + 1] = GLOBSTAR; + } + }); + return pattern.filter((p) => p !== GLOBSTAR).join("/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + match(f, partial = this.partial) { + this.debug("match", f, this.pattern); + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + const options = this.options; + if (path.sep !== "/") { + f = f.split(path.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + const set = this.set; + this.debug(this.pattern, "set", set); + let filename; + for (let i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break; + } + for (let i = 0; i < set.length; i++) { + const pattern = set[i]; + let file2 = f; + if (options.matchBase && pattern.length === 1) { + file2 = [filename]; + } + const hit = this.matchOne(file2, pattern, partial); + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } + if (options.flipNegate) return false; + return this.negate; + } + static defaults(def) { + return minimatch.defaults(def).Minimatch; + } + }; + minimatch.Minimatch = Minimatch; + } +}); + +// ../../node_modules/.pnpm/readdir-glob@1.1.3/node_modules/readdir-glob/index.js +var require_readdir_glob = __commonJS({ + "../../node_modules/.pnpm/readdir-glob@1.1.3/node_modules/readdir-glob/index.js"(exports2, module2) { + module2.exports = readdirGlob; + var fs = require("fs"); + var { EventEmitter } = require("events"); + var { Minimatch } = require_minimatch(); + var { resolve } = require("path"); + function readdir(dir, strict) { + return new Promise((resolve2, reject) => { + fs.readdir(dir, { withFileTypes: true }, (err, files) => { + if (err) { + switch (err.code) { + case "ENOTDIR": + if (strict) { + reject(err); + } else { + resolve2([]); + } + break; + case "ENOTSUP": + // Operation not supported + case "ENOENT": + // No such file or directory + case "ENAMETOOLONG": + // Filename too long + case "UNKNOWN": + resolve2([]); + break; + case "ELOOP": + // Too many levels of symbolic links + default: + reject(err); + break; + } + } else { + resolve2(files); + } + }); + }); + } + function stat(file2, followSymlinks) { + return new Promise((resolve2, reject) => { + const statFunc = followSymlinks ? fs.stat : fs.lstat; + statFunc(file2, (err, stats) => { + if (err) { + switch (err.code) { + case "ENOENT": + if (followSymlinks) { + resolve2(stat(file2, false)); + } else { + resolve2(null); + } + break; + default: + resolve2(null); + break; + } + } else { + resolve2(stats); + } + }); + }); + } + async function* exploreWalkAsync(dir, path, followSymlinks, useStat, shouldSkip, strict) { + let files = await readdir(path + dir, strict); + for (const file2 of files) { + let name = file2.name; + if (name === void 0) { + name = file2; + useStat = true; + } + const filename = dir + "/" + name; + const relative = filename.slice(1); + const absolute = path + "/" + relative; + let stats = null; + if (useStat || followSymlinks) { + stats = await stat(absolute, followSymlinks); + } + if (!stats && file2.name !== void 0) { + stats = file2; + } + if (stats === null) { + stats = { isDirectory: () => false }; + } + if (stats.isDirectory()) { + if (!shouldSkip(relative)) { + yield { relative, absolute, stats }; + yield* exploreWalkAsync(filename, path, followSymlinks, useStat, shouldSkip, false); + } + } else { + yield { relative, absolute, stats }; + } + } + } + async function* explore(path, followSymlinks, useStat, shouldSkip) { + yield* exploreWalkAsync("", path, followSymlinks, useStat, shouldSkip, true); + } + function readOptions(options) { + return { + pattern: options.pattern, + dot: !!options.dot, + noglobstar: !!options.noglobstar, + matchBase: !!options.matchBase, + nocase: !!options.nocase, + ignore: options.ignore, + skip: options.skip, + follow: !!options.follow, + stat: !!options.stat, + nodir: !!options.nodir, + mark: !!options.mark, + silent: !!options.silent, + absolute: !!options.absolute + }; + } + var ReaddirGlob = class extends EventEmitter { + constructor(cwd, options, cb) { + super(); + if (typeof options === "function") { + cb = options; + options = null; + } + this.options = readOptions(options || {}); + this.matchers = []; + if (this.options.pattern) { + const matchers = Array.isArray(this.options.pattern) ? this.options.pattern : [this.options.pattern]; + this.matchers = matchers.map( + (m) => new Minimatch(m, { + dot: this.options.dot, + noglobstar: this.options.noglobstar, + matchBase: this.options.matchBase, + nocase: this.options.nocase + }) + ); + } + this.ignoreMatchers = []; + if (this.options.ignore) { + const ignorePatterns = Array.isArray(this.options.ignore) ? this.options.ignore : [this.options.ignore]; + this.ignoreMatchers = ignorePatterns.map( + (ignore) => new Minimatch(ignore, { dot: true }) + ); + } + this.skipMatchers = []; + if (this.options.skip) { + const skipPatterns = Array.isArray(this.options.skip) ? this.options.skip : [this.options.skip]; + this.skipMatchers = skipPatterns.map( + (skip) => new Minimatch(skip, { dot: true }) + ); + } + this.iterator = explore(resolve(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this)); + this.paused = false; + this.inactive = false; + this.aborted = false; + if (cb) { + this._matches = []; + this.on("match", (match) => this._matches.push(this.options.absolute ? match.absolute : match.relative)); + this.on("error", (err) => cb(err)); + this.on("end", () => cb(null, this._matches)); + } + setTimeout(() => this._next(), 0); + } + _shouldSkipDirectory(relative) { + return this.skipMatchers.some((m) => m.match(relative)); + } + _fileMatches(relative, isDirectory) { + const file2 = relative + (isDirectory ? "/" : ""); + return (this.matchers.length === 0 || this.matchers.some((m) => m.match(file2))) && !this.ignoreMatchers.some((m) => m.match(file2)) && (!this.options.nodir || !isDirectory); + } + _next() { + if (!this.paused && !this.aborted) { + this.iterator.next().then((obj2) => { + if (!obj2.done) { + const isDirectory = obj2.value.stats.isDirectory(); + if (this._fileMatches(obj2.value.relative, isDirectory)) { + let relative = obj2.value.relative; + let absolute = obj2.value.absolute; + if (this.options.mark && isDirectory) { + relative += "/"; + absolute += "/"; + } + if (this.options.stat) { + this.emit("match", { relative, absolute, stat: obj2.value.stats }); + } else { + this.emit("match", { relative, absolute }); + } + } + this._next(this.iterator); + } else { + this.emit("end"); + } + }).catch((err) => { + this.abort(); + this.emit("error", err); + if (!err.code && !this.options.silent) { + console.error(err); + } + }); + } else { + this.inactive = true; + } + } + abort() { + this.aborted = true; + } + pause() { + this.paused = true; + } + resume() { + this.paused = false; + if (this.inactive) { + this.inactive = false; + this._next(); + } + } + }; + function readdirGlob(pattern, options, cb) { + return new ReaddirGlob(pattern, options, cb); + } + readdirGlob.ReaddirGlob = ReaddirGlob; + } +}); + +// ../../node_modules/.pnpm/async@3.2.6/node_modules/async/dist/async.js +var require_async2 = __commonJS({ + "../../node_modules/.pnpm/async@3.2.6/node_modules/async/dist/async.js"(exports2, module2) { + (function(global2, factory) { + typeof exports2 === "object" && typeof module2 !== "undefined" ? factory(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.async = {})); + })(exports2, (function(exports3) { + "use strict"; + function apply(fn, ...args) { + return (...callArgs) => fn(...args, ...callArgs); + } + function initialParams(fn) { + return function(...args) { + var callback = args.pop(); + return fn.call(this, args, callback); + }; + } + var hasQueueMicrotask = typeof queueMicrotask === "function" && queueMicrotask; + var hasSetImmediate = typeof setImmediate === "function" && setImmediate; + var hasNextTick = typeof process === "object" && typeof process.nextTick === "function"; + function fallback(fn) { + setTimeout(fn, 0); + } + function wrap(defer) { + return (fn, ...args) => defer(() => fn(...args)); + } + var _defer$1; + if (hasQueueMicrotask) { + _defer$1 = queueMicrotask; + } else if (hasSetImmediate) { + _defer$1 = setImmediate; + } else if (hasNextTick) { + _defer$1 = process.nextTick; + } else { + _defer$1 = fallback; + } + var setImmediate$1 = wrap(_defer$1); + function asyncify(func) { + if (isAsync(func)) { + return function(...args) { + const callback = args.pop(); + const promise = func.apply(this, args); + return handlePromise(promise, callback); + }; + } + return initialParams(function(args, callback) { + var result; + try { + result = func.apply(this, args); + } catch (e) { + return callback(e); + } + if (result && typeof result.then === "function") { + return handlePromise(result, callback); + } else { + callback(null, result); + } + }); + } + function handlePromise(promise, callback) { + return promise.then((value) => { + invokeCallback(callback, null, value); + }, (err) => { + invokeCallback(callback, err && (err instanceof Error || err.message) ? err : new Error(err)); + }); + } + function invokeCallback(callback, error, value) { + try { + callback(error, value); + } catch (err) { + setImmediate$1((e) => { + throw e; + }, err); + } + } + function isAsync(fn) { + return fn[Symbol.toStringTag] === "AsyncFunction"; + } + function isAsyncGenerator(fn) { + return fn[Symbol.toStringTag] === "AsyncGenerator"; + } + function isAsyncIterable(obj2) { + return typeof obj2[Symbol.asyncIterator] === "function"; + } + function wrapAsync(asyncFn) { + if (typeof asyncFn !== "function") throw new Error("expected a function"); + return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn; + } + function awaitify(asyncFn, arity) { + if (!arity) arity = asyncFn.length; + if (!arity) throw new Error("arity is undefined"); + function awaitable(...args) { + if (typeof args[arity - 1] === "function") { + return asyncFn.apply(this, args); + } + return new Promise((resolve, reject2) => { + args[arity - 1] = (err, ...cbArgs) => { + if (err) return reject2(err); + resolve(cbArgs.length > 1 ? cbArgs : cbArgs[0]); + }; + asyncFn.apply(this, args); + }); + } + return awaitable; + } + function applyEach$1(eachfn) { + return function applyEach2(fns, ...callArgs) { + const go = awaitify(function(callback) { + var that = this; + return eachfn(fns, (fn, cb) => { + wrapAsync(fn).apply(that, callArgs.concat(cb)); + }, callback); + }); + return go; + }; + } + function _asyncMap(eachfn, arr, iteratee, callback) { + arr = arr || []; + var results = []; + var counter = 0; + var _iteratee = wrapAsync(iteratee); + return eachfn(arr, (value, _2, iterCb) => { + var index2 = counter++; + _iteratee(value, (err, v) => { + results[index2] = v; + iterCb(err); + }); + }, (err) => { + callback(err, results); + }); + } + function isArrayLike(value) { + return value && typeof value.length === "number" && value.length >= 0 && value.length % 1 === 0; + } + const breakLoop = {}; + function once(fn) { + function wrapper(...args) { + if (fn === null) return; + var callFn = fn; + fn = null; + callFn.apply(this, args); + } + Object.assign(wrapper, fn); + return wrapper; + } + function getIterator(coll) { + return coll[Symbol.iterator] && coll[Symbol.iterator](); + } + function createArrayIterator(coll) { + var i = -1; + var len = coll.length; + return function next() { + return ++i < len ? { value: coll[i], key: i } : null; + }; + } + function createES2015Iterator(iterator) { + var i = -1; + return function next() { + var item = iterator.next(); + if (item.done) + return null; + i++; + return { value: item.value, key: i }; + }; + } + function createObjectIterator(obj2) { + var okeys = obj2 ? Object.keys(obj2) : []; + var i = -1; + var len = okeys.length; + return function next() { + var key = okeys[++i]; + if (key === "__proto__") { + return next(); + } + return i < len ? { value: obj2[key], key } : null; + }; + } + function createIterator(coll) { + if (isArrayLike(coll)) { + return createArrayIterator(coll); + } + var iterator = getIterator(coll); + return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); + } + function onlyOnce(fn) { + return function(...args) { + if (fn === null) throw new Error("Callback was already called."); + var callFn = fn; + fn = null; + callFn.apply(this, args); + }; + } + function asyncEachOfLimit(generator, limit, iteratee, callback) { + let done = false; + let canceled = false; + let awaiting = false; + let running = 0; + let idx = 0; + function replenish() { + if (running >= limit || awaiting || done) return; + awaiting = true; + generator.next().then(({ value, done: iterDone }) => { + if (canceled || done) return; + awaiting = false; + if (iterDone) { + done = true; + if (running <= 0) { + callback(null); + } + return; + } + running++; + iteratee(value, idx, iterateeCallback); + idx++; + replenish(); + }).catch(handleError); + } + function iterateeCallback(err, result) { + running -= 1; + if (canceled) return; + if (err) return handleError(err); + if (err === false) { + done = true; + canceled = true; + return; + } + if (result === breakLoop || done && running <= 0) { + done = true; + return callback(null); + } + replenish(); + } + function handleError(err) { + if (canceled) return; + awaiting = false; + done = true; + callback(err); + } + replenish(); + } + var eachOfLimit$2 = (limit) => { + return (obj2, iteratee, callback) => { + callback = once(callback); + if (limit <= 0) { + throw new RangeError("concurrency limit cannot be less than 1"); + } + if (!obj2) { + return callback(null); + } + if (isAsyncGenerator(obj2)) { + return asyncEachOfLimit(obj2, limit, iteratee, callback); + } + if (isAsyncIterable(obj2)) { + return asyncEachOfLimit(obj2[Symbol.asyncIterator](), limit, iteratee, callback); + } + var nextElem = createIterator(obj2); + var done = false; + var canceled = false; + var running = 0; + var looping = false; + function iterateeCallback(err, value) { + if (canceled) return; + running -= 1; + if (err) { + done = true; + callback(err); + } else if (err === false) { + done = true; + canceled = true; + } else if (value === breakLoop || done && running <= 0) { + done = true; + return callback(null); + } else if (!looping) { + replenish(); + } + } + function replenish() { + looping = true; + while (running < limit && !done) { + var elem = nextElem(); + if (elem === null) { + done = true; + if (running <= 0) { + callback(null); + } + return; + } + running += 1; + iteratee(elem.value, elem.key, onlyOnce(iterateeCallback)); + } + looping = false; + } + replenish(); + }; + }; + function eachOfLimit(coll, limit, iteratee, callback) { + return eachOfLimit$2(limit)(coll, wrapAsync(iteratee), callback); + } + var eachOfLimit$1 = awaitify(eachOfLimit, 4); + function eachOfArrayLike(coll, iteratee, callback) { + callback = once(callback); + var index2 = 0, completed = 0, { length } = coll, canceled = false; + if (length === 0) { + callback(null); + } + function iteratorCallback(err, value) { + if (err === false) { + canceled = true; + } + if (canceled === true) return; + if (err) { + callback(err); + } else if (++completed === length || value === breakLoop) { + callback(null); + } + } + for (; index2 < length; index2++) { + iteratee(coll[index2], index2, onlyOnce(iteratorCallback)); + } + } + function eachOfGeneric(coll, iteratee, callback) { + return eachOfLimit$1(coll, Infinity, iteratee, callback); + } + function eachOf(coll, iteratee, callback) { + var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric; + return eachOfImplementation(coll, wrapAsync(iteratee), callback); + } + var eachOf$1 = awaitify(eachOf, 3); + function map(coll, iteratee, callback) { + return _asyncMap(eachOf$1, coll, iteratee, callback); + } + var map$1 = awaitify(map, 3); + var applyEach = applyEach$1(map$1); + function eachOfSeries(coll, iteratee, callback) { + return eachOfLimit$1(coll, 1, iteratee, callback); + } + var eachOfSeries$1 = awaitify(eachOfSeries, 3); + function mapSeries(coll, iteratee, callback) { + return _asyncMap(eachOfSeries$1, coll, iteratee, callback); + } + var mapSeries$1 = awaitify(mapSeries, 3); + var applyEachSeries = applyEach$1(mapSeries$1); + const PROMISE_SYMBOL = Symbol("promiseCallback"); + function promiseCallback() { + let resolve, reject2; + function callback(err, ...args) { + if (err) return reject2(err); + resolve(args.length > 1 ? args : args[0]); + } + callback[PROMISE_SYMBOL] = new Promise((res, rej) => { + resolve = res, reject2 = rej; + }); + return callback; + } + function auto(tasks, concurrency, callback) { + if (typeof concurrency !== "number") { + callback = concurrency; + concurrency = null; + } + callback = once(callback || promiseCallback()); + var numTasks = Object.keys(tasks).length; + if (!numTasks) { + return callback(null); + } + if (!concurrency) { + concurrency = numTasks; + } + var results = {}; + var runningTasks = 0; + var canceled = false; + var hasError = false; + var listeners = /* @__PURE__ */ Object.create(null); + var readyTasks = []; + var readyToCheck = []; + var uncheckedDependencies = {}; + Object.keys(tasks).forEach((key) => { + var task = tasks[key]; + if (!Array.isArray(task)) { + enqueueTask(key, [task]); + readyToCheck.push(key); + return; + } + var dependencies = task.slice(0, task.length - 1); + var remainingDependencies = dependencies.length; + if (remainingDependencies === 0) { + enqueueTask(key, task); + readyToCheck.push(key); + return; + } + uncheckedDependencies[key] = remainingDependencies; + dependencies.forEach((dependencyName) => { + if (!tasks[dependencyName]) { + throw new Error("async.auto task `" + key + "` has a non-existent dependency `" + dependencyName + "` in " + dependencies.join(", ")); + } + addListener(dependencyName, () => { + remainingDependencies--; + if (remainingDependencies === 0) { + enqueueTask(key, task); + } + }); + }); + }); + checkForDeadlocks(); + processQueue(); + function enqueueTask(key, task) { + readyTasks.push(() => runTask(key, task)); + } + function processQueue() { + if (canceled) return; + if (readyTasks.length === 0 && runningTasks === 0) { + return callback(null, results); + } + while (readyTasks.length && runningTasks < concurrency) { + var run = readyTasks.shift(); + run(); + } + } + function addListener(taskName, fn) { + var taskListeners = listeners[taskName]; + if (!taskListeners) { + taskListeners = listeners[taskName] = []; + } + taskListeners.push(fn); + } + function taskComplete(taskName) { + var taskListeners = listeners[taskName] || []; + taskListeners.forEach((fn) => fn()); + processQueue(); + } + function runTask(key, task) { + if (hasError) return; + var taskCallback = onlyOnce((err, ...result) => { + runningTasks--; + if (err === false) { + canceled = true; + return; + } + if (result.length < 2) { + [result] = result; + } + if (err) { + var safeResults = {}; + Object.keys(results).forEach((rkey) => { + safeResults[rkey] = results[rkey]; + }); + safeResults[key] = result; + hasError = true; + listeners = /* @__PURE__ */ Object.create(null); + if (canceled) return; + callback(err, safeResults); + } else { + results[key] = result; + taskComplete(key); + } + }); + runningTasks++; + var taskFn = wrapAsync(task[task.length - 1]); + if (task.length > 1) { + taskFn(results, taskCallback); + } else { + taskFn(taskCallback); + } + } + function checkForDeadlocks() { + var currentTask; + var counter = 0; + while (readyToCheck.length) { + currentTask = readyToCheck.pop(); + counter++; + getDependents(currentTask).forEach((dependent) => { + if (--uncheckedDependencies[dependent] === 0) { + readyToCheck.push(dependent); + } + }); + } + if (counter !== numTasks) { + throw new Error( + "async.auto cannot execute tasks due to a recursive dependency" + ); + } + } + function getDependents(taskName) { + var result = []; + Object.keys(tasks).forEach((key) => { + const task = tasks[key]; + if (Array.isArray(task) && task.indexOf(taskName) >= 0) { + result.push(key); + } + }); + return result; + } + return callback[PROMISE_SYMBOL]; + } + var FN_ARGS = /^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/; + var ARROW_FN_ARGS = /^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/; + var FN_ARG_SPLIT = /,/; + var FN_ARG = /(=.+)?(\s*)$/; + function stripComments(string) { + let stripped = ""; + let index2 = 0; + let endBlockComment = string.indexOf("*/"); + while (index2 < string.length) { + if (string[index2] === "/" && string[index2 + 1] === "/") { + let endIndex = string.indexOf("\n", index2); + index2 = endIndex === -1 ? string.length : endIndex; + } else if (endBlockComment !== -1 && string[index2] === "/" && string[index2 + 1] === "*") { + let endIndex = string.indexOf("*/", index2); + if (endIndex !== -1) { + index2 = endIndex + 2; + endBlockComment = string.indexOf("*/", index2); + } else { + stripped += string[index2]; + index2++; + } + } else { + stripped += string[index2]; + index2++; + } + } + return stripped; + } + function parseParams(func) { + const src = stripComments(func.toString()); + let match = src.match(FN_ARGS); + if (!match) { + match = src.match(ARROW_FN_ARGS); + } + if (!match) throw new Error("could not parse args in autoInject\nSource:\n" + src); + let [, args] = match; + return args.replace(/\s/g, "").split(FN_ARG_SPLIT).map((arg) => arg.replace(FN_ARG, "").trim()); + } + function autoInject(tasks, callback) { + var newTasks = {}; + Object.keys(tasks).forEach((key) => { + var taskFn = tasks[key]; + var params; + var fnIsAsync = isAsync(taskFn); + var hasNoDeps = !fnIsAsync && taskFn.length === 1 || fnIsAsync && taskFn.length === 0; + if (Array.isArray(taskFn)) { + params = [...taskFn]; + taskFn = params.pop(); + newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn); + } else if (hasNoDeps) { + newTasks[key] = taskFn; + } else { + params = parseParams(taskFn); + if (taskFn.length === 0 && !fnIsAsync && params.length === 0) { + throw new Error("autoInject task functions require explicit parameters."); + } + if (!fnIsAsync) params.pop(); + newTasks[key] = params.concat(newTask); + } + function newTask(results, taskCb) { + var newArgs = params.map((name) => results[name]); + newArgs.push(taskCb); + wrapAsync(taskFn)(...newArgs); + } + }); + return auto(newTasks, callback); + } + class DLL { + constructor() { + this.head = this.tail = null; + this.length = 0; + } + removeLink(node) { + if (node.prev) node.prev.next = node.next; + else this.head = node.next; + if (node.next) node.next.prev = node.prev; + else this.tail = node.prev; + node.prev = node.next = null; + this.length -= 1; + return node; + } + empty() { + while (this.head) this.shift(); + return this; + } + insertAfter(node, newNode) { + newNode.prev = node; + newNode.next = node.next; + if (node.next) node.next.prev = newNode; + else this.tail = newNode; + node.next = newNode; + this.length += 1; + } + insertBefore(node, newNode) { + newNode.prev = node.prev; + newNode.next = node; + if (node.prev) node.prev.next = newNode; + else this.head = newNode; + node.prev = newNode; + this.length += 1; + } + unshift(node) { + if (this.head) this.insertBefore(this.head, node); + else setInitial(this, node); + } + push(node) { + if (this.tail) this.insertAfter(this.tail, node); + else setInitial(this, node); + } + shift() { + return this.head && this.removeLink(this.head); + } + pop() { + return this.tail && this.removeLink(this.tail); + } + toArray() { + return [...this]; + } + *[Symbol.iterator]() { + var cur = this.head; + while (cur) { + yield cur.data; + cur = cur.next; + } + } + remove(testFn) { + var curr = this.head; + while (curr) { + var { next } = curr; + if (testFn(curr)) { + this.removeLink(curr); + } + curr = next; + } + return this; + } + } + function setInitial(dll, node) { + dll.length = 1; + dll.head = dll.tail = node; + } + function queue$1(worker, concurrency, payload) { + if (concurrency == null) { + concurrency = 1; + } else if (concurrency === 0) { + throw new RangeError("Concurrency must not be zero"); + } + var _worker = wrapAsync(worker); + var numRunning = 0; + var workersList = []; + const events = { + error: [], + drain: [], + saturated: [], + unsaturated: [], + empty: [] + }; + function on(event, handler) { + events[event].push(handler); + } + function once2(event, handler) { + const handleAndRemove = (...args) => { + off(event, handleAndRemove); + handler(...args); + }; + events[event].push(handleAndRemove); + } + function off(event, handler) { + if (!event) return Object.keys(events).forEach((ev) => events[ev] = []); + if (!handler) return events[event] = []; + events[event] = events[event].filter((ev) => ev !== handler); + } + function trigger(event, ...args) { + events[event].forEach((handler) => handler(...args)); + } + var processingScheduled = false; + function _insert(data, insertAtFront, rejectOnError, callback) { + if (callback != null && typeof callback !== "function") { + throw new Error("task callback must be a function"); + } + q.started = true; + var res, rej; + function promiseCallback2(err, ...args) { + if (err) return rejectOnError ? rej(err) : res(); + if (args.length <= 1) return res(args[0]); + res(args); + } + var item = q._createTaskItem( + data, + rejectOnError ? promiseCallback2 : callback || promiseCallback2 + ); + if (insertAtFront) { + q._tasks.unshift(item); + } else { + q._tasks.push(item); + } + if (!processingScheduled) { + processingScheduled = true; + setImmediate$1(() => { + processingScheduled = false; + q.process(); + }); + } + if (rejectOnError || !callback) { + return new Promise((resolve, reject2) => { + res = resolve; + rej = reject2; + }); + } + } + function _createCB(tasks) { + return function(err, ...args) { + numRunning -= 1; + for (var i = 0, l2 = tasks.length; i < l2; i++) { + var task = tasks[i]; + var index2 = workersList.indexOf(task); + if (index2 === 0) { + workersList.shift(); + } else if (index2 > 0) { + workersList.splice(index2, 1); + } + task.callback(err, ...args); + if (err != null) { + trigger("error", err, task.data); + } + } + if (numRunning <= q.concurrency - q.buffer) { + trigger("unsaturated"); + } + if (q.idle()) { + trigger("drain"); + } + q.process(); + }; + } + function _maybeDrain(data) { + if (data.length === 0 && q.idle()) { + setImmediate$1(() => trigger("drain")); + return true; + } + return false; + } + const eventMethod = (name) => (handler) => { + if (!handler) { + return new Promise((resolve, reject2) => { + once2(name, (err, data) => { + if (err) return reject2(err); + resolve(data); + }); + }); + } + off(name); + on(name, handler); + }; + var isProcessing = false; + var q = { + _tasks: new DLL(), + _createTaskItem(data, callback) { + return { + data, + callback + }; + }, + *[Symbol.iterator]() { + yield* q._tasks[Symbol.iterator](); + }, + concurrency, + payload, + buffer: concurrency / 4, + started: false, + paused: false, + push(data, callback) { + if (Array.isArray(data)) { + if (_maybeDrain(data)) return; + return data.map((datum) => _insert(datum, false, false, callback)); + } + return _insert(data, false, false, callback); + }, + pushAsync(data, callback) { + if (Array.isArray(data)) { + if (_maybeDrain(data)) return; + return data.map((datum) => _insert(datum, false, true, callback)); + } + return _insert(data, false, true, callback); + }, + kill() { + off(); + q._tasks.empty(); + }, + unshift(data, callback) { + if (Array.isArray(data)) { + if (_maybeDrain(data)) return; + return data.map((datum) => _insert(datum, true, false, callback)); + } + return _insert(data, true, false, callback); + }, + unshiftAsync(data, callback) { + if (Array.isArray(data)) { + if (_maybeDrain(data)) return; + return data.map((datum) => _insert(datum, true, true, callback)); + } + return _insert(data, true, true, callback); + }, + remove(testFn) { + q._tasks.remove(testFn); + }, + process() { + if (isProcessing) { + return; + } + isProcessing = true; + while (!q.paused && numRunning < q.concurrency && q._tasks.length) { + var tasks = [], data = []; + var l2 = q._tasks.length; + if (q.payload) l2 = Math.min(l2, q.payload); + for (var i = 0; i < l2; i++) { + var node = q._tasks.shift(); + tasks.push(node); + workersList.push(node); + data.push(node.data); + } + numRunning += 1; + if (q._tasks.length === 0) { + trigger("empty"); + } + if (numRunning === q.concurrency) { + trigger("saturated"); + } + var cb = onlyOnce(_createCB(tasks)); + _worker(data, cb); + } + isProcessing = false; + }, + length() { + return q._tasks.length; + }, + running() { + return numRunning; + }, + workersList() { + return workersList; + }, + idle() { + return q._tasks.length + numRunning === 0; + }, + pause() { + q.paused = true; + }, + resume() { + if (q.paused === false) { + return; + } + q.paused = false; + setImmediate$1(q.process); + } + }; + Object.defineProperties(q, { + saturated: { + writable: false, + value: eventMethod("saturated") + }, + unsaturated: { + writable: false, + value: eventMethod("unsaturated") + }, + empty: { + writable: false, + value: eventMethod("empty") + }, + drain: { + writable: false, + value: eventMethod("drain") + }, + error: { + writable: false, + value: eventMethod("error") + } + }); + return q; + } + function cargo$1(worker, payload) { + return queue$1(worker, 1, payload); + } + function cargo(worker, concurrency, payload) { + return queue$1(worker, concurrency, payload); + } + function reduce(coll, memo, iteratee, callback) { + callback = once(callback); + var _iteratee = wrapAsync(iteratee); + return eachOfSeries$1(coll, (x, i, iterCb) => { + _iteratee(memo, x, (err, v) => { + memo = v; + iterCb(err); + }); + }, (err) => callback(err, memo)); + } + var reduce$1 = awaitify(reduce, 4); + function seq(...functions) { + var _functions = functions.map(wrapAsync); + return function(...args) { + var that = this; + var cb = args[args.length - 1]; + if (typeof cb == "function") { + args.pop(); + } else { + cb = promiseCallback(); + } + reduce$1( + _functions, + args, + (newargs, fn, iterCb) => { + fn.apply(that, newargs.concat((err, ...nextargs) => { + iterCb(err, nextargs); + })); + }, + (err, results) => cb(err, ...results) + ); + return cb[PROMISE_SYMBOL]; + }; + } + function compose(...args) { + return seq(...args.reverse()); + } + function mapLimit(coll, limit, iteratee, callback) { + return _asyncMap(eachOfLimit$2(limit), coll, iteratee, callback); + } + var mapLimit$1 = awaitify(mapLimit, 4); + function concatLimit(coll, limit, iteratee, callback) { + var _iteratee = wrapAsync(iteratee); + return mapLimit$1(coll, limit, (val, iterCb) => { + _iteratee(val, (err, ...args) => { + if (err) return iterCb(err); + return iterCb(err, args); + }); + }, (err, mapResults) => { + var result = []; + for (var i = 0; i < mapResults.length; i++) { + if (mapResults[i]) { + result = result.concat(...mapResults[i]); + } + } + return callback(err, result); + }); + } + var concatLimit$1 = awaitify(concatLimit, 4); + function concat(coll, iteratee, callback) { + return concatLimit$1(coll, Infinity, iteratee, callback); + } + var concat$1 = awaitify(concat, 3); + function concatSeries(coll, iteratee, callback) { + return concatLimit$1(coll, 1, iteratee, callback); + } + var concatSeries$1 = awaitify(concatSeries, 3); + function constant$1(...args) { + return function(...ignoredArgs) { + var callback = ignoredArgs.pop(); + return callback(null, ...args); + }; + } + function _createTester(check, getResult) { + return (eachfn, arr, _iteratee, cb) => { + var testPassed = false; + var testResult; + const iteratee = wrapAsync(_iteratee); + eachfn(arr, (value, _2, callback) => { + iteratee(value, (err, result) => { + if (err || err === false) return callback(err); + if (check(result) && !testResult) { + testPassed = true; + testResult = getResult(true, value); + return callback(null, breakLoop); + } + callback(); + }); + }, (err) => { + if (err) return cb(err); + cb(null, testPassed ? testResult : getResult(false)); + }); + }; + } + function detect(coll, iteratee, callback) { + return _createTester((bool) => bool, (res, item) => item)(eachOf$1, coll, iteratee, callback); + } + var detect$1 = awaitify(detect, 3); + function detectLimit(coll, limit, iteratee, callback) { + return _createTester((bool) => bool, (res, item) => item)(eachOfLimit$2(limit), coll, iteratee, callback); + } + var detectLimit$1 = awaitify(detectLimit, 4); + function detectSeries(coll, iteratee, callback) { + return _createTester((bool) => bool, (res, item) => item)(eachOfLimit$2(1), coll, iteratee, callback); + } + var detectSeries$1 = awaitify(detectSeries, 3); + function consoleFunc(name) { + return (fn, ...args) => wrapAsync(fn)(...args, (err, ...resultArgs) => { + if (typeof console === "object") { + if (err) { + if (console.error) { + console.error(err); + } + } else if (console[name]) { + resultArgs.forEach((x) => console[name](x)); + } + } + }); + } + var dir = consoleFunc("dir"); + function doWhilst(iteratee, test, callback) { + callback = onlyOnce(callback); + var _fn = wrapAsync(iteratee); + var _test = wrapAsync(test); + var results; + function next(err, ...args) { + if (err) return callback(err); + if (err === false) return; + results = args; + _test(...args, check); + } + function check(err, truth) { + if (err) return callback(err); + if (err === false) return; + if (!truth) return callback(null, ...results); + _fn(next); + } + return check(null, true); + } + var doWhilst$1 = awaitify(doWhilst, 3); + function doUntil(iteratee, test, callback) { + const _test = wrapAsync(test); + return doWhilst$1(iteratee, (...args) => { + const cb = args.pop(); + _test(...args, (err, truth) => cb(err, !truth)); + }, callback); + } + function _withoutIndex(iteratee) { + return (value, index2, callback) => iteratee(value, callback); + } + function eachLimit$2(coll, iteratee, callback) { + return eachOf$1(coll, _withoutIndex(wrapAsync(iteratee)), callback); + } + var each = awaitify(eachLimit$2, 3); + function eachLimit(coll, limit, iteratee, callback) { + return eachOfLimit$2(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback); + } + var eachLimit$1 = awaitify(eachLimit, 4); + function eachSeries(coll, iteratee, callback) { + return eachLimit$1(coll, 1, iteratee, callback); + } + var eachSeries$1 = awaitify(eachSeries, 3); + function ensureAsync(fn) { + if (isAsync(fn)) return fn; + return function(...args) { + var callback = args.pop(); + var sync = true; + args.push((...innerArgs) => { + if (sync) { + setImmediate$1(() => callback(...innerArgs)); + } else { + callback(...innerArgs); + } + }); + fn.apply(this, args); + sync = false; + }; + } + function every(coll, iteratee, callback) { + return _createTester((bool) => !bool, (res) => !res)(eachOf$1, coll, iteratee, callback); + } + var every$1 = awaitify(every, 3); + function everyLimit(coll, limit, iteratee, callback) { + return _createTester((bool) => !bool, (res) => !res)(eachOfLimit$2(limit), coll, iteratee, callback); + } + var everyLimit$1 = awaitify(everyLimit, 4); + function everySeries(coll, iteratee, callback) { + return _createTester((bool) => !bool, (res) => !res)(eachOfSeries$1, coll, iteratee, callback); + } + var everySeries$1 = awaitify(everySeries, 3); + function filterArray(eachfn, arr, iteratee, callback) { + var truthValues = new Array(arr.length); + eachfn(arr, (x, index2, iterCb) => { + iteratee(x, (err, v) => { + truthValues[index2] = !!v; + iterCb(err); + }); + }, (err) => { + if (err) return callback(err); + var results = []; + for (var i = 0; i < arr.length; i++) { + if (truthValues[i]) results.push(arr[i]); + } + callback(null, results); + }); + } + function filterGeneric(eachfn, coll, iteratee, callback) { + var results = []; + eachfn(coll, (x, index2, iterCb) => { + iteratee(x, (err, v) => { + if (err) return iterCb(err); + if (v) { + results.push({ index: index2, value: x }); + } + iterCb(err); + }); + }, (err) => { + if (err) return callback(err); + callback(null, results.sort((a, b) => a.index - b.index).map((v) => v.value)); + }); + } + function _filter(eachfn, coll, iteratee, callback) { + var filter2 = isArrayLike(coll) ? filterArray : filterGeneric; + return filter2(eachfn, coll, wrapAsync(iteratee), callback); + } + function filter(coll, iteratee, callback) { + return _filter(eachOf$1, coll, iteratee, callback); + } + var filter$1 = awaitify(filter, 3); + function filterLimit(coll, limit, iteratee, callback) { + return _filter(eachOfLimit$2(limit), coll, iteratee, callback); + } + var filterLimit$1 = awaitify(filterLimit, 4); + function filterSeries(coll, iteratee, callback) { + return _filter(eachOfSeries$1, coll, iteratee, callback); + } + var filterSeries$1 = awaitify(filterSeries, 3); + function forever(fn, errback) { + var done = onlyOnce(errback); + var task = wrapAsync(ensureAsync(fn)); + function next(err) { + if (err) return done(err); + if (err === false) return; + task(next); + } + return next(); + } + var forever$1 = awaitify(forever, 2); + function groupByLimit(coll, limit, iteratee, callback) { + var _iteratee = wrapAsync(iteratee); + return mapLimit$1(coll, limit, (val, iterCb) => { + _iteratee(val, (err, key) => { + if (err) return iterCb(err); + return iterCb(err, { key, val }); + }); + }, (err, mapResults) => { + var result = {}; + var { hasOwnProperty } = Object.prototype; + for (var i = 0; i < mapResults.length; i++) { + if (mapResults[i]) { + var { key } = mapResults[i]; + var { val } = mapResults[i]; + if (hasOwnProperty.call(result, key)) { + result[key].push(val); + } else { + result[key] = [val]; + } + } + } + return callback(err, result); + }); + } + var groupByLimit$1 = awaitify(groupByLimit, 4); + function groupBy(coll, iteratee, callback) { + return groupByLimit$1(coll, Infinity, iteratee, callback); + } + function groupBySeries(coll, iteratee, callback) { + return groupByLimit$1(coll, 1, iteratee, callback); + } + var log = consoleFunc("log"); + function mapValuesLimit(obj2, limit, iteratee, callback) { + callback = once(callback); + var newObj = {}; + var _iteratee = wrapAsync(iteratee); + return eachOfLimit$2(limit)(obj2, (val, key, next) => { + _iteratee(val, key, (err, result) => { + if (err) return next(err); + newObj[key] = result; + next(err); + }); + }, (err) => callback(err, newObj)); + } + var mapValuesLimit$1 = awaitify(mapValuesLimit, 4); + function mapValues(obj2, iteratee, callback) { + return mapValuesLimit$1(obj2, Infinity, iteratee, callback); + } + function mapValuesSeries(obj2, iteratee, callback) { + return mapValuesLimit$1(obj2, 1, iteratee, callback); + } + function memoize(fn, hasher = (v) => v) { + var memo = /* @__PURE__ */ Object.create(null); + var queues = /* @__PURE__ */ Object.create(null); + var _fn = wrapAsync(fn); + var memoized = initialParams((args, callback) => { + var key = hasher(...args); + if (key in memo) { + setImmediate$1(() => callback(null, ...memo[key])); + } else if (key in queues) { + queues[key].push(callback); + } else { + queues[key] = [callback]; + _fn(...args, (err, ...resultArgs) => { + if (!err) { + memo[key] = resultArgs; + } + var q = queues[key]; + delete queues[key]; + for (var i = 0, l2 = q.length; i < l2; i++) { + q[i](err, ...resultArgs); + } + }); + } + }); + memoized.memo = memo; + memoized.unmemoized = fn; + return memoized; + } + var _defer; + if (hasNextTick) { + _defer = process.nextTick; + } else if (hasSetImmediate) { + _defer = setImmediate; + } else { + _defer = fallback; + } + var nextTick = wrap(_defer); + var _parallel = awaitify((eachfn, tasks, callback) => { + var results = isArrayLike(tasks) ? [] : {}; + eachfn(tasks, (task, key, taskCb) => { + wrapAsync(task)((err, ...result) => { + if (result.length < 2) { + [result] = result; + } + results[key] = result; + taskCb(err); + }); + }, (err) => callback(err, results)); + }, 3); + function parallel(tasks, callback) { + return _parallel(eachOf$1, tasks, callback); + } + function parallelLimit(tasks, limit, callback) { + return _parallel(eachOfLimit$2(limit), tasks, callback); + } + function queue(worker, concurrency) { + var _worker = wrapAsync(worker); + return queue$1((items, cb) => { + _worker(items[0], cb); + }, concurrency, 1); + } + class Heap { + constructor() { + this.heap = []; + this.pushCount = Number.MIN_SAFE_INTEGER; + } + get length() { + return this.heap.length; + } + empty() { + this.heap = []; + return this; + } + percUp(index2) { + let p; + while (index2 > 0 && smaller(this.heap[index2], this.heap[p = parent(index2)])) { + let t = this.heap[index2]; + this.heap[index2] = this.heap[p]; + this.heap[p] = t; + index2 = p; + } + } + percDown(index2) { + let l2; + while ((l2 = leftChi(index2)) < this.heap.length) { + if (l2 + 1 < this.heap.length && smaller(this.heap[l2 + 1], this.heap[l2])) { + l2 = l2 + 1; + } + if (smaller(this.heap[index2], this.heap[l2])) { + break; + } + let t = this.heap[index2]; + this.heap[index2] = this.heap[l2]; + this.heap[l2] = t; + index2 = l2; + } + } + push(node) { + node.pushCount = ++this.pushCount; + this.heap.push(node); + this.percUp(this.heap.length - 1); + } + unshift(node) { + return this.heap.push(node); + } + shift() { + let [top] = this.heap; + this.heap[0] = this.heap[this.heap.length - 1]; + this.heap.pop(); + this.percDown(0); + return top; + } + toArray() { + return [...this]; + } + *[Symbol.iterator]() { + for (let i = 0; i < this.heap.length; i++) { + yield this.heap[i].data; + } + } + remove(testFn) { + let j = 0; + for (let i = 0; i < this.heap.length; i++) { + if (!testFn(this.heap[i])) { + this.heap[j] = this.heap[i]; + j++; + } + } + this.heap.splice(j); + for (let i = parent(this.heap.length - 1); i >= 0; i--) { + this.percDown(i); + } + return this; + } + } + function leftChi(i) { + return (i << 1) + 1; + } + function parent(i) { + return (i + 1 >> 1) - 1; + } + function smaller(x, y) { + if (x.priority !== y.priority) { + return x.priority < y.priority; + } else { + return x.pushCount < y.pushCount; + } + } + function priorityQueue(worker, concurrency) { + var q = queue(worker, concurrency); + var { + push, + pushAsync + } = q; + q._tasks = new Heap(); + q._createTaskItem = ({ data, priority }, callback) => { + return { + data, + priority, + callback + }; + }; + function createDataItems(tasks, priority) { + if (!Array.isArray(tasks)) { + return { data: tasks, priority }; + } + return tasks.map((data) => { + return { data, priority }; + }); + } + q.push = function(data, priority = 0, callback) { + return push(createDataItems(data, priority), callback); + }; + q.pushAsync = function(data, priority = 0, callback) { + return pushAsync(createDataItems(data, priority), callback); + }; + delete q.unshift; + delete q.unshiftAsync; + return q; + } + function race(tasks, callback) { + callback = once(callback); + if (!Array.isArray(tasks)) return callback(new TypeError("First argument to race must be an array of functions")); + if (!tasks.length) return callback(); + for (var i = 0, l2 = tasks.length; i < l2; i++) { + wrapAsync(tasks[i])(callback); + } + } + var race$1 = awaitify(race, 2); + function reduceRight(array, memo, iteratee, callback) { + var reversed = [...array].reverse(); + return reduce$1(reversed, memo, iteratee, callback); + } + function reflect(fn) { + var _fn = wrapAsync(fn); + return initialParams(function reflectOn(args, reflectCallback) { + args.push((error, ...cbArgs) => { + let retVal = {}; + if (error) { + retVal.error = error; + } + if (cbArgs.length > 0) { + var value = cbArgs; + if (cbArgs.length <= 1) { + [value] = cbArgs; + } + retVal.value = value; + } + reflectCallback(null, retVal); + }); + return _fn.apply(this, args); + }); + } + function reflectAll(tasks) { + var results; + if (Array.isArray(tasks)) { + results = tasks.map(reflect); + } else { + results = {}; + Object.keys(tasks).forEach((key) => { + results[key] = reflect.call(this, tasks[key]); + }); + } + return results; + } + function reject$2(eachfn, arr, _iteratee, callback) { + const iteratee = wrapAsync(_iteratee); + return _filter(eachfn, arr, (value, cb) => { + iteratee(value, (err, v) => { + cb(err, !v); + }); + }, callback); + } + function reject(coll, iteratee, callback) { + return reject$2(eachOf$1, coll, iteratee, callback); + } + var reject$1 = awaitify(reject, 3); + function rejectLimit(coll, limit, iteratee, callback) { + return reject$2(eachOfLimit$2(limit), coll, iteratee, callback); + } + var rejectLimit$1 = awaitify(rejectLimit, 4); + function rejectSeries(coll, iteratee, callback) { + return reject$2(eachOfSeries$1, coll, iteratee, callback); + } + var rejectSeries$1 = awaitify(rejectSeries, 3); + function constant(value) { + return function() { + return value; + }; + } + const DEFAULT_TIMES = 5; + const DEFAULT_INTERVAL = 0; + function retry(opts, task, callback) { + var options = { + times: DEFAULT_TIMES, + intervalFunc: constant(DEFAULT_INTERVAL) + }; + if (arguments.length < 3 && typeof opts === "function") { + callback = task || promiseCallback(); + task = opts; + } else { + parseTimes(options, opts); + callback = callback || promiseCallback(); + } + if (typeof task !== "function") { + throw new Error("Invalid arguments for async.retry"); + } + var _task = wrapAsync(task); + var attempt = 1; + function retryAttempt() { + _task((err, ...args) => { + if (err === false) return; + if (err && attempt++ < options.times && (typeof options.errorFilter != "function" || options.errorFilter(err))) { + setTimeout(retryAttempt, options.intervalFunc(attempt - 1)); + } else { + callback(err, ...args); + } + }); + } + retryAttempt(); + return callback[PROMISE_SYMBOL]; + } + function parseTimes(acc, t) { + if (typeof t === "object") { + acc.times = +t.times || DEFAULT_TIMES; + acc.intervalFunc = typeof t.interval === "function" ? t.interval : constant(+t.interval || DEFAULT_INTERVAL); + acc.errorFilter = t.errorFilter; + } else if (typeof t === "number" || typeof t === "string") { + acc.times = +t || DEFAULT_TIMES; + } else { + throw new Error("Invalid arguments for async.retry"); + } + } + function retryable(opts, task) { + if (!task) { + task = opts; + opts = null; + } + let arity = opts && opts.arity || task.length; + if (isAsync(task)) { + arity += 1; + } + var _task = wrapAsync(task); + return initialParams((args, callback) => { + if (args.length < arity - 1 || callback == null) { + args.push(callback); + callback = promiseCallback(); + } + function taskFn(cb) { + _task(...args, cb); + } + if (opts) retry(opts, taskFn, callback); + else retry(taskFn, callback); + return callback[PROMISE_SYMBOL]; + }); + } + function series(tasks, callback) { + return _parallel(eachOfSeries$1, tasks, callback); + } + function some(coll, iteratee, callback) { + return _createTester(Boolean, (res) => res)(eachOf$1, coll, iteratee, callback); + } + var some$1 = awaitify(some, 3); + function someLimit(coll, limit, iteratee, callback) { + return _createTester(Boolean, (res) => res)(eachOfLimit$2(limit), coll, iteratee, callback); + } + var someLimit$1 = awaitify(someLimit, 4); + function someSeries(coll, iteratee, callback) { + return _createTester(Boolean, (res) => res)(eachOfSeries$1, coll, iteratee, callback); + } + var someSeries$1 = awaitify(someSeries, 3); + function sortBy(coll, iteratee, callback) { + var _iteratee = wrapAsync(iteratee); + return map$1(coll, (x, iterCb) => { + _iteratee(x, (err, criteria) => { + if (err) return iterCb(err); + iterCb(err, { value: x, criteria }); + }); + }, (err, results) => { + if (err) return callback(err); + callback(null, results.sort(comparator).map((v) => v.value)); + }); + function comparator(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + } + } + var sortBy$1 = awaitify(sortBy, 3); + function timeout(asyncFn, milliseconds, info) { + var fn = wrapAsync(asyncFn); + return initialParams((args, callback) => { + var timedOut = false; + var timer; + function timeoutCallback() { + var name = asyncFn.name || "anonymous"; + var error = new Error('Callback function "' + name + '" timed out.'); + error.code = "ETIMEDOUT"; + if (info) { + error.info = info; + } + timedOut = true; + callback(error); + } + args.push((...cbArgs) => { + if (!timedOut) { + callback(...cbArgs); + clearTimeout(timer); + } + }); + timer = setTimeout(timeoutCallback, milliseconds); + fn(...args); + }); + } + function range(size) { + var result = Array(size); + while (size--) { + result[size] = size; + } + return result; + } + function timesLimit(count, limit, iteratee, callback) { + var _iteratee = wrapAsync(iteratee); + return mapLimit$1(range(count), limit, _iteratee, callback); + } + function times(n, iteratee, callback) { + return timesLimit(n, Infinity, iteratee, callback); + } + function timesSeries(n, iteratee, callback) { + return timesLimit(n, 1, iteratee, callback); + } + function transform(coll, accumulator, iteratee, callback) { + if (arguments.length <= 3 && typeof accumulator === "function") { + callback = iteratee; + iteratee = accumulator; + accumulator = Array.isArray(coll) ? [] : {}; + } + callback = once(callback || promiseCallback()); + var _iteratee = wrapAsync(iteratee); + eachOf$1(coll, (v, k, cb) => { + _iteratee(accumulator, v, k, cb); + }, (err) => callback(err, accumulator)); + return callback[PROMISE_SYMBOL]; + } + function tryEach(tasks, callback) { + var error = null; + var result; + return eachSeries$1(tasks, (task, taskCb) => { + wrapAsync(task)((err, ...args) => { + if (err === false) return taskCb(err); + if (args.length < 2) { + [result] = args; + } else { + result = args; + } + error = err; + taskCb(err ? null : {}); + }); + }, () => callback(error, result)); + } + var tryEach$1 = awaitify(tryEach); + function unmemoize(fn) { + return (...args) => { + return (fn.unmemoized || fn)(...args); + }; + } + function whilst(test, iteratee, callback) { + callback = onlyOnce(callback); + var _fn = wrapAsync(iteratee); + var _test = wrapAsync(test); + var results = []; + function next(err, ...rest) { + if (err) return callback(err); + results = rest; + if (err === false) return; + _test(check); + } + function check(err, truth) { + if (err) return callback(err); + if (err === false) return; + if (!truth) return callback(null, ...results); + _fn(next); + } + return _test(check); + } + var whilst$1 = awaitify(whilst, 3); + function until(test, iteratee, callback) { + const _test = wrapAsync(test); + return whilst$1((cb) => _test((err, truth) => cb(err, !truth)), iteratee, callback); + } + function waterfall(tasks, callback) { + callback = once(callback); + if (!Array.isArray(tasks)) return callback(new Error("First argument to waterfall must be an array of functions")); + if (!tasks.length) return callback(); + var taskIndex = 0; + function nextTask(args) { + var task = wrapAsync(tasks[taskIndex++]); + task(...args, onlyOnce(next)); + } + function next(err, ...args) { + if (err === false) return; + if (err || taskIndex === tasks.length) { + return callback(err, ...args); + } + nextTask(args); + } + nextTask([]); + } + var waterfall$1 = awaitify(waterfall); + var index = { + apply, + applyEach, + applyEachSeries, + asyncify, + auto, + autoInject, + cargo: cargo$1, + cargoQueue: cargo, + compose, + concat: concat$1, + concatLimit: concatLimit$1, + concatSeries: concatSeries$1, + constant: constant$1, + detect: detect$1, + detectLimit: detectLimit$1, + detectSeries: detectSeries$1, + dir, + doUntil, + doWhilst: doWhilst$1, + each, + eachLimit: eachLimit$1, + eachOf: eachOf$1, + eachOfLimit: eachOfLimit$1, + eachOfSeries: eachOfSeries$1, + eachSeries: eachSeries$1, + ensureAsync, + every: every$1, + everyLimit: everyLimit$1, + everySeries: everySeries$1, + filter: filter$1, + filterLimit: filterLimit$1, + filterSeries: filterSeries$1, + forever: forever$1, + groupBy, + groupByLimit: groupByLimit$1, + groupBySeries, + log, + map: map$1, + mapLimit: mapLimit$1, + mapSeries: mapSeries$1, + mapValues, + mapValuesLimit: mapValuesLimit$1, + mapValuesSeries, + memoize, + nextTick, + parallel, + parallelLimit, + priorityQueue, + queue, + race: race$1, + reduce: reduce$1, + reduceRight, + reflect, + reflectAll, + reject: reject$1, + rejectLimit: rejectLimit$1, + rejectSeries: rejectSeries$1, + retry, + retryable, + seq, + series, + setImmediate: setImmediate$1, + some: some$1, + someLimit: someLimit$1, + someSeries: someSeries$1, + sortBy: sortBy$1, + timeout, + times, + timesLimit, + timesSeries, + transform, + tryEach: tryEach$1, + unmemoize, + until, + waterfall: waterfall$1, + whilst: whilst$1, + // aliases + all: every$1, + allLimit: everyLimit$1, + allSeries: everySeries$1, + any: some$1, + anyLimit: someLimit$1, + anySeries: someSeries$1, + find: detect$1, + findLimit: detectLimit$1, + findSeries: detectSeries$1, + flatMap: concat$1, + flatMapLimit: concatLimit$1, + flatMapSeries: concatSeries$1, + forEach: each, + forEachSeries: eachSeries$1, + forEachLimit: eachLimit$1, + forEachOf: eachOf$1, + forEachOfSeries: eachOfSeries$1, + forEachOfLimit: eachOfLimit$1, + inject: reduce$1, + foldl: reduce$1, + foldr: reduceRight, + select: filter$1, + selectLimit: filterLimit$1, + selectSeries: filterSeries$1, + wrapSync: asyncify, + during: whilst$1, + doDuring: doWhilst$1 + }; + exports3.all = every$1; + exports3.allLimit = everyLimit$1; + exports3.allSeries = everySeries$1; + exports3.any = some$1; + exports3.anyLimit = someLimit$1; + exports3.anySeries = someSeries$1; + exports3.apply = apply; + exports3.applyEach = applyEach; + exports3.applyEachSeries = applyEachSeries; + exports3.asyncify = asyncify; + exports3.auto = auto; + exports3.autoInject = autoInject; + exports3.cargo = cargo$1; + exports3.cargoQueue = cargo; + exports3.compose = compose; + exports3.concat = concat$1; + exports3.concatLimit = concatLimit$1; + exports3.concatSeries = concatSeries$1; + exports3.constant = constant$1; + exports3.default = index; + exports3.detect = detect$1; + exports3.detectLimit = detectLimit$1; + exports3.detectSeries = detectSeries$1; + exports3.dir = dir; + exports3.doDuring = doWhilst$1; + exports3.doUntil = doUntil; + exports3.doWhilst = doWhilst$1; + exports3.during = whilst$1; + exports3.each = each; + exports3.eachLimit = eachLimit$1; + exports3.eachOf = eachOf$1; + exports3.eachOfLimit = eachOfLimit$1; + exports3.eachOfSeries = eachOfSeries$1; + exports3.eachSeries = eachSeries$1; + exports3.ensureAsync = ensureAsync; + exports3.every = every$1; + exports3.everyLimit = everyLimit$1; + exports3.everySeries = everySeries$1; + exports3.filter = filter$1; + exports3.filterLimit = filterLimit$1; + exports3.filterSeries = filterSeries$1; + exports3.find = detect$1; + exports3.findLimit = detectLimit$1; + exports3.findSeries = detectSeries$1; + exports3.flatMap = concat$1; + exports3.flatMapLimit = concatLimit$1; + exports3.flatMapSeries = concatSeries$1; + exports3.foldl = reduce$1; + exports3.foldr = reduceRight; + exports3.forEach = each; + exports3.forEachLimit = eachLimit$1; + exports3.forEachOf = eachOf$1; + exports3.forEachOfLimit = eachOfLimit$1; + exports3.forEachOfSeries = eachOfSeries$1; + exports3.forEachSeries = eachSeries$1; + exports3.forever = forever$1; + exports3.groupBy = groupBy; + exports3.groupByLimit = groupByLimit$1; + exports3.groupBySeries = groupBySeries; + exports3.inject = reduce$1; + exports3.log = log; + exports3.map = map$1; + exports3.mapLimit = mapLimit$1; + exports3.mapSeries = mapSeries$1; + exports3.mapValues = mapValues; + exports3.mapValuesLimit = mapValuesLimit$1; + exports3.mapValuesSeries = mapValuesSeries; + exports3.memoize = memoize; + exports3.nextTick = nextTick; + exports3.parallel = parallel; + exports3.parallelLimit = parallelLimit; + exports3.priorityQueue = priorityQueue; + exports3.queue = queue; + exports3.race = race$1; + exports3.reduce = reduce$1; + exports3.reduceRight = reduceRight; + exports3.reflect = reflect; + exports3.reflectAll = reflectAll; + exports3.reject = reject$1; + exports3.rejectLimit = rejectLimit$1; + exports3.rejectSeries = rejectSeries$1; + exports3.retry = retry; + exports3.retryable = retryable; + exports3.select = filter$1; + exports3.selectLimit = filterLimit$1; + exports3.selectSeries = filterSeries$1; + exports3.seq = seq; + exports3.series = series; + exports3.setImmediate = setImmediate$1; + exports3.some = some$1; + exports3.someLimit = someLimit$1; + exports3.someSeries = someSeries$1; + exports3.sortBy = sortBy$1; + exports3.timeout = timeout; + exports3.times = times; + exports3.timesLimit = timesLimit; + exports3.timesSeries = timesSeries; + exports3.transform = transform; + exports3.tryEach = tryEach$1; + exports3.unmemoize = unmemoize; + exports3.until = until; + exports3.waterfall = waterfall$1; + exports3.whilst = whilst$1; + exports3.wrapSync = asyncify; + Object.defineProperty(exports3, "__esModule", { value: true }); + })); + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js +var require_polyfills = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports2, module2) { + var constants = require("constants"); + var origCwd = process.cwd; + var cwd = null; + var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; + process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process); + return cwd; + }; + try { + process.cwd(); + } catch (er) { + } + if (typeof process.chdir === "function") { + chdir = process.chdir; + process.chdir = function(d) { + cwd = null; + chdir.call(process, d); + }; + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); + } + var chdir; + module2.exports = patch; + function patch(fs) { + if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs); + } + if (!fs.lutimes) { + patchLutimes(fs); + } + fs.chown = chownFix(fs.chown); + fs.fchown = chownFix(fs.fchown); + fs.lchown = chownFix(fs.lchown); + fs.chmod = chmodFix(fs.chmod); + fs.fchmod = chmodFix(fs.fchmod); + fs.lchmod = chmodFix(fs.lchmod); + fs.chownSync = chownFixSync(fs.chownSync); + fs.fchownSync = chownFixSync(fs.fchownSync); + fs.lchownSync = chownFixSync(fs.lchownSync); + fs.chmodSync = chmodFixSync(fs.chmodSync); + fs.fchmodSync = chmodFixSync(fs.fchmodSync); + fs.lchmodSync = chmodFixSync(fs.lchmodSync); + fs.stat = statFix(fs.stat); + fs.fstat = statFix(fs.fstat); + fs.lstat = statFix(fs.lstat); + fs.statSync = statFixSync(fs.statSync); + fs.fstatSync = statFixSync(fs.fstatSync); + fs.lstatSync = statFixSync(fs.lstatSync); + if (fs.chmod && !fs.lchmod) { + fs.lchmod = function(path, mode, cb) { + if (cb) process.nextTick(cb); + }; + fs.lchmodSync = function() { + }; + } + if (fs.chown && !fs.lchown) { + fs.lchown = function(path, uid, gid, cb) { + if (cb) process.nextTick(cb); + }; + fs.lchownSync = function() { + }; + } + if (platform === "win32") { + fs.rename = typeof fs.rename !== "function" ? fs.rename : (function(fs$rename) { + function rename(from, to, cb) { + var start = Date.now(); + var backoff = 0; + fs$rename(from, to, function CB(er) { + if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) { + setTimeout(function() { + fs.stat(to, function(stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er); + }); + }, backoff); + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er); + }); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); + return rename; + })(fs.rename); + } + fs.read = typeof fs.read !== "function" ? fs.read : (function(fs$read) { + function read(fd, buffer, offset, length, position, callback_) { + var callback; + if (callback_ && typeof callback_ === "function") { + var eagCounter = 0; + callback = function(er, _2, __) { + if (er && er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + return fs$read.call(fs, fd, buffer, offset, length, position, callback); + } + callback_.apply(this, arguments); + }; + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); + return read; + })(fs.read); + fs.readSync = typeof fs.readSync !== "function" ? fs.readSync : /* @__PURE__ */ (function(fs$readSync) { + return function(fd, buffer, offset, length, position) { + var eagCounter = 0; + while (true) { + try { + return fs$readSync.call(fs, fd, buffer, offset, length, position); + } catch (er) { + if (er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + continue; + } + throw er; + } + } + }; + })(fs.readSync); + function patchLchmod(fs2) { + fs2.lchmod = function(path, mode, callback) { + fs2.open( + path, + constants.O_WRONLY | constants.O_SYMLINK, + mode, + function(err, fd) { + if (err) { + if (callback) callback(err); + return; + } + fs2.fchmod(fd, mode, function(err2) { + fs2.close(fd, function(err22) { + if (callback) callback(err2 || err22); + }); + }); + } + ); + }; + fs2.lchmodSync = function(path, mode) { + var fd = fs2.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode); + var threw = true; + var ret2; + try { + ret2 = fs2.fchmodSync(fd, mode); + threw = false; + } finally { + if (threw) { + try { + fs2.closeSync(fd); + } catch (er) { + } + } else { + fs2.closeSync(fd); + } + } + return ret2; + }; + } + function patchLutimes(fs2) { + if (constants.hasOwnProperty("O_SYMLINK") && fs2.futimes) { + fs2.lutimes = function(path, at, mt, cb) { + fs2.open(path, constants.O_SYMLINK, function(er, fd) { + if (er) { + if (cb) cb(er); + return; + } + fs2.futimes(fd, at, mt, function(er2) { + fs2.close(fd, function(er22) { + if (cb) cb(er2 || er22); + }); + }); + }); + }; + fs2.lutimesSync = function(path, at, mt) { + var fd = fs2.openSync(path, constants.O_SYMLINK); + var ret2; + var threw = true; + try { + ret2 = fs2.futimesSync(fd, at, mt); + threw = false; + } finally { + if (threw) { + try { + fs2.closeSync(fd); + } catch (er) { + } + } else { + fs2.closeSync(fd); + } + } + return ret2; + }; + } else if (fs2.futimes) { + fs2.lutimes = function(_a, _b, _c, cb) { + if (cb) process.nextTick(cb); + }; + fs2.lutimesSync = function() { + }; + } + } + function chmodFix(orig) { + if (!orig) return orig; + return function(target, mode, cb) { + return orig.call(fs, target, mode, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chmodFixSync(orig) { + if (!orig) return orig; + return function(target, mode) { + try { + return orig.call(fs, target, mode); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function chownFix(orig) { + if (!orig) return orig; + return function(target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chownFixSync(orig) { + if (!orig) return orig; + return function(target, uid, gid) { + try { + return orig.call(fs, target, uid, gid); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function statFix(orig) { + if (!orig) return orig; + return function(target, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + function callback(er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + if (cb) cb.apply(this, arguments); + } + return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback); + }; + } + function statFixSync(orig) { + if (!orig) return orig; + return function(target, options) { + var stats = options ? orig.call(fs, target, options) : orig.call(fs, target); + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + return stats; + }; + } + function chownErOk(er) { + if (!er) + return true; + if (er.code === "ENOSYS") + return true; + var nonroot = !process.getuid || process.getuid() !== 0; + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true; + } + return false; + } + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js +var require_legacy_streams = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { + var Stream = require("stream").Stream; + module2.exports = legacy; + function legacy(fs) { + return { + ReadStream, + WriteStream + }; + function ReadStream(path, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path, options); + Stream.call(this); + var self2 = this; + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; + this.flags = "r"; + this.mode = 438; + this.bufferSize = 64 * 1024; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.encoding) this.setEncoding(this.encoding); + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.end === void 0) { + this.end = Infinity; + } else if ("number" !== typeof this.end) { + throw TypeError("end must be a Number"); + } + if (this.start > this.end) { + throw new Error("start must be <= end"); + } + this.pos = this.start; + } + if (this.fd !== null) { + process.nextTick(function() { + self2._read(); + }); + return; + } + fs.open(this.path, this.flags, this.mode, function(err, fd) { + if (err) { + self2.emit("error", err); + self2.readable = false; + return; + } + self2.fd = fd; + self2.emit("open", fd); + self2._read(); + }); + } + function WriteStream(path, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path, options); + Stream.call(this); + this.path = path; + this.fd = null; + this.writable = true; + this.flags = "w"; + this.encoding = "binary"; + this.mode = 438; + this.bytesWritten = 0; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.start < 0) { + throw new Error("start must be >= zero"); + } + this.pos = this.start; + } + this.busy = false; + this._queue = []; + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); + this.flush(); + } + } + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js +var require_clone = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports2, module2) { + "use strict"; + module2.exports = clone; + var getPrototypeOf = Object.getPrototypeOf || function(obj2) { + return obj2.__proto__; + }; + function clone(obj2) { + if (obj2 === null || typeof obj2 !== "object") + return obj2; + if (obj2 instanceof Object) + var copy = { __proto__: getPrototypeOf(obj2) }; + else + var copy = /* @__PURE__ */ Object.create(null); + Object.getOwnPropertyNames(obj2).forEach(function(key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj2, key)); + }); + return copy; + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js +var require_graceful_fs = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { + var fs = require("fs"); + var polyfills = require_polyfills(); + var legacy = require_legacy_streams(); + var clone = require_clone(); + var util2 = require("util"); + var gracefulQueue; + var previousSymbol; + if (typeof Symbol === "function" && typeof Symbol.for === "function") { + gracefulQueue = Symbol.for("graceful-fs.queue"); + previousSymbol = Symbol.for("graceful-fs.previous"); + } else { + gracefulQueue = "___graceful-fs.queue"; + previousSymbol = "___graceful-fs.previous"; + } + function noop() { + } + function publishQueue(context, queue2) { + Object.defineProperty(context, gracefulQueue, { + get: function() { + return queue2; + } + }); + } + var debug = noop; + if (util2.debuglog) + debug = util2.debuglog("gfs4"); + else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) + debug = function() { + var m = util2.format.apply(util2, arguments); + m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); + console.error(m); + }; + if (!fs[gracefulQueue]) { + queue = global[gracefulQueue] || []; + publishQueue(fs, queue); + fs.close = (function(fs$close) { + function close(fd, cb) { + return fs$close.call(fs, fd, function(err) { + if (!err) { + resetQueue(); + } + if (typeof cb === "function") + cb.apply(this, arguments); + }); + } + Object.defineProperty(close, previousSymbol, { + value: fs$close + }); + return close; + })(fs.close); + fs.closeSync = (function(fs$closeSync) { + function closeSync(fd) { + fs$closeSync.apply(fs, arguments); + resetQueue(); + } + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }); + return closeSync; + })(fs.closeSync); + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { + process.on("exit", function() { + debug(fs[gracefulQueue]); + require("assert").equal(fs[gracefulQueue].length, 0); + }); + } + } + var queue; + if (!global[gracefulQueue]) { + publishQueue(global, fs[gracefulQueue]); + } + module2.exports = patch(clone(fs)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { + module2.exports = patch(fs); + fs.__patched = true; + } + function patch(fs2) { + polyfills(fs2); + fs2.gracefulify = patch; + fs2.createReadStream = createReadStream; + fs2.createWriteStream = createWriteStream; + var fs$readFile = fs2.readFile; + fs2.readFile = readFile; + function readFile(path, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$readFile(path, options, cb); + function go$readFile(path2, options2, cb2, startTime) { + return fs$readFile(path2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$readFile, [path2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$writeFile = fs2.writeFile; + fs2.writeFile = writeFile; + function writeFile(path, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$writeFile(path, data, options, cb); + function go$writeFile(path2, data2, options2, cb2, startTime) { + return fs$writeFile(path2, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$writeFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$appendFile = fs2.appendFile; + if (fs$appendFile) + fs2.appendFile = appendFile; + function appendFile(path, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$appendFile(path, data, options, cb); + function go$appendFile(path2, data2, options2, cb2, startTime) { + return fs$appendFile(path2, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$appendFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$copyFile = fs2.copyFile; + if (fs$copyFile) + fs2.copyFile = copyFile; + function copyFile(src, dest, flags, cb) { + if (typeof flags === "function") { + cb = flags; + flags = 0; + } + return go$copyFile(src, dest, flags, cb); + function go$copyFile(src2, dest2, flags2, cb2, startTime) { + return fs$copyFile(src2, dest2, flags2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$readdir = fs2.readdir; + fs2.readdir = readdir; + var noReaddirOptionVersions = /^v[0-5]\./; + function readdir(path, options, cb) { + if (typeof options === "function") + cb = options, options = null; + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path2, options2, cb2, startTime) { + return fs$readdir(path2, fs$readdirCallback( + path2, + options2, + cb2, + startTime + )); + } : function go$readdir2(path2, options2, cb2, startTime) { + return fs$readdir(path2, options2, fs$readdirCallback( + path2, + options2, + cb2, + startTime + )); + }; + return go$readdir(path, options, cb); + function fs$readdirCallback(path2, options2, cb2, startTime) { + return function(err, files) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([ + go$readdir, + [path2, options2, cb2], + err, + startTime || Date.now(), + Date.now() + ]); + else { + if (files && files.sort) + files.sort(); + if (typeof cb2 === "function") + cb2.call(this, err, files); + } + }; + } + } + if (process.version.substr(0, 4) === "v0.8") { + var legStreams = legacy(fs2); + ReadStream = legStreams.ReadStream; + WriteStream = legStreams.WriteStream; + } + var fs$ReadStream = fs2.ReadStream; + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype); + ReadStream.prototype.open = ReadStream$open; + } + var fs$WriteStream = fs2.WriteStream; + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype); + WriteStream.prototype.open = WriteStream$open; + } + Object.defineProperty(fs2, "ReadStream", { + get: function() { + return ReadStream; + }, + set: function(val) { + ReadStream = val; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(fs2, "WriteStream", { + get: function() { + return WriteStream; + }, + set: function(val) { + WriteStream = val; + }, + enumerable: true, + configurable: true + }); + var FileReadStream = ReadStream; + Object.defineProperty(fs2, "FileReadStream", { + get: function() { + return FileReadStream; + }, + set: function(val) { + FileReadStream = val; + }, + enumerable: true, + configurable: true + }); + var FileWriteStream = WriteStream; + Object.defineProperty(fs2, "FileWriteStream", { + get: function() { + return FileWriteStream; + }, + set: function(val) { + FileWriteStream = val; + }, + enumerable: true, + configurable: true + }); + function ReadStream(path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this; + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments); + } + function ReadStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + if (that.autoClose) + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + that.read(); + } + }); + } + function WriteStream(path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this; + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments); + } + function WriteStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + } + }); + } + function createReadStream(path, options) { + return new fs2.ReadStream(path, options); + } + function createWriteStream(path, options) { + return new fs2.WriteStream(path, options); + } + var fs$open = fs2.open; + fs2.open = open; + function open(path, flags, mode, cb) { + if (typeof mode === "function") + cb = mode, mode = null; + return go$open(path, flags, mode, cb); + function go$open(path2, flags2, mode2, cb2, startTime) { + return fs$open(path2, flags2, mode2, function(err, fd) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$open, [path2, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + return fs2; + } + function enqueue(elem) { + debug("ENQUEUE", elem[0].name, elem[1]); + fs[gracefulQueue].push(elem); + retry(); + } + var retryTimer; + function resetQueue() { + var now = Date.now(); + for (var i = 0; i < fs[gracefulQueue].length; ++i) { + if (fs[gracefulQueue][i].length > 2) { + fs[gracefulQueue][i][3] = now; + fs[gracefulQueue][i][4] = now; + } + } + retry(); + } + function retry() { + clearTimeout(retryTimer); + retryTimer = void 0; + if (fs[gracefulQueue].length === 0) + return; + var elem = fs[gracefulQueue].shift(); + var fn = elem[0]; + var args = elem[1]; + var err = elem[2]; + var startTime = elem[3]; + var lastTime = elem[4]; + if (startTime === void 0) { + debug("RETRY", fn.name, args); + fn.apply(null, args); + } else if (Date.now() - startTime >= 6e4) { + debug("TIMEOUT", fn.name, args); + var cb = args.pop(); + if (typeof cb === "function") + cb.call(null, err); + } else { + var sinceAttempt = Date.now() - lastTime; + var sinceStart = Math.max(lastTime - startTime, 1); + var desiredDelay = Math.min(sinceStart * 1.2, 100); + if (sinceAttempt >= desiredDelay) { + debug("RETRY", fn.name, args); + fn.apply(null, args.concat([startTime])); + } else { + fs[gracefulQueue].push(elem); + } + } + if (retryTimer === void 0) { + retryTimer = setTimeout(retry, 0); + } + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/passthrough.js +var require_passthrough = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/passthrough.js"(exports2, module2) { + module2.exports = require_readable2().PassThrough; + } +}); + +// ../../node_modules/.pnpm/lazystream@1.0.1/node_modules/lazystream/lib/lazystream.js +var require_lazystream = __commonJS({ + "../../node_modules/.pnpm/lazystream@1.0.1/node_modules/lazystream/lib/lazystream.js"(exports2, module2) { + var util2 = require("util"); + var PassThrough = require_passthrough(); + module2.exports = { + Readable, + Writable + }; + util2.inherits(Readable, PassThrough); + util2.inherits(Writable, PassThrough); + function beforeFirstCall(instance, method, callback) { + instance[method] = function() { + delete instance[method]; + callback.apply(this, arguments); + return this[method].apply(this, arguments); + }; + } + function Readable(fn, options) { + if (!(this instanceof Readable)) + return new Readable(fn, options); + PassThrough.call(this, options); + beforeFirstCall(this, "_read", function() { + var source = fn.call(this, options); + var emit = this.emit.bind(this, "error"); + source.on("error", emit); + source.pipe(this); + }); + this.emit("readable"); + } + function Writable(fn, options) { + if (!(this instanceof Writable)) + return new Writable(fn, options); + PassThrough.call(this, options); + beforeFirstCall(this, "_write", function() { + var destination = fn.call(this, options); + var emit = this.emit.bind(this, "error"); + destination.on("error", emit); + this.pipe(destination); + }); + this.emit("writable"); + } + } +}); + +// ../../node_modules/.pnpm/normalize-path@3.0.0/node_modules/normalize-path/index.js +var require_normalize_path = __commonJS({ + "../../node_modules/.pnpm/normalize-path@3.0.0/node_modules/normalize-path/index.js"(exports2, module2) { + module2.exports = function(path, stripTrailing) { + if (typeof path !== "string") { + throw new TypeError("expected path to be a string"); + } + if (path === "\\" || path === "/") return "/"; + var len = path.length; + if (len <= 1) return path; + var prefix = ""; + if (len > 4 && path[3] === "\\") { + var ch = path[2]; + if ((ch === "?" || ch === ".") && path.slice(0, 2) === "\\\\") { + path = path.slice(2); + prefix = "//"; + } + } + var segs = path.split(/[/\\]+/); + if (stripTrailing !== false && segs[segs.length - 1] === "") { + segs.pop(); + } + return prefix + segs.join("/"); + }; + } +}); + +// ../../node_modules/.pnpm/lodash.defaults@4.2.0/node_modules/lodash.defaults/index.js +var require_lodash17 = __commonJS({ + "../../node_modules/.pnpm/lodash.defaults@4.2.0/node_modules/lodash.defaults/index.js"(exports2, module2) { + var MAX_SAFE_INTEGER = 9007199254740991; + var argsTag = "[object Arguments]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var reIsUint = /^(?:0|[1-9]\d*)$/; + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + function baseTimes(n, iteratee) { + var index = -1, result = Array(n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var objectToString = objectProto.toString; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var nativeMax = Math.max; + function arrayLikeKeys(value, inherited) { + var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : []; + var length = result.length, skipIndexes = !!length; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + function assignInDefaults(objValue, srcValue, key, object) { + if (objValue === void 0 || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) { + return srcValue; + } + return objValue; + } + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) { + object[key] = value; + } + } + function baseKeysIn(object) { + if (!isObject2(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), result = []; + for (var key in object) { + if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + function baseRest(func, start) { + start = nativeMax(start === void 0 ? func.length - 1 : start, 0); + return function() { + var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; + } + function copyObject(source, props, object, customizer) { + object || (object = {}); + var index = -1, length = props.length; + while (++index < length) { + var key = props[index]; + var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0; + assignValue(object, key, newValue === void 0 ? source[key] : newValue); + } + return object; + } + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0; + customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? void 0 : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + function isIterateeCall(value, index, object) { + if (!isObject2(object)) { + return false; + } + var type = typeof index; + if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) { + return eq(object[index], value); + } + return false; + } + function isPrototype(value) { + var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; + return value === proto; + } + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + function eq(value, other) { + return value === other || value !== value && other !== other; + } + function isArguments(value) { + return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag); + } + var isArray = Array.isArray; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + function isFunction(value) { + var tag = isObject2(value) ? objectToString.call(value) : ""; + return tag == funcTag || tag == genTag; + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + var defaults = baseRest(function(args) { + args.push(void 0, assignInDefaults); + return apply(assignInWith, void 0, args); + }); + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + module2.exports = defaults; + } +}); + +// ../../node_modules/.pnpm/lodash.flatten@4.4.0/node_modules/lodash.flatten/index.js +var require_lodash18 = __commonJS({ + "../../node_modules/.pnpm/lodash.flatten@4.4.0/node_modules/lodash.flatten/index.js"(exports2, module2) { + var MAX_SAFE_INTEGER = 9007199254740991; + var argsTag = "[object Arguments]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + function arrayPush(array, values) { + var index = -1, length = values.length, offset = array.length; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var objectToString = objectProto.toString; + var Symbol2 = root.Symbol; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0; + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, length = array.length; + predicate || (predicate = isFlattenable); + result || (result = []); + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + function isFlattenable(value) { + return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); + } + function flatten(array) { + var length = array ? array.length : 0; + return length ? baseFlatten(array, 1) : []; + } + function isArguments(value) { + return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag); + } + var isArray = Array.isArray; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + function isFunction(value) { + var tag = isObject2(value) ? objectToString.call(value) : ""; + return tag == funcTag || tag == genTag; + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + module2.exports = flatten; + } +}); + +// ../../node_modules/.pnpm/lodash.difference@4.5.0/node_modules/lodash.difference/index.js +var require_lodash19 = __commonJS({ + "../../node_modules/.pnpm/lodash.difference@4.5.0/node_modules/lodash.difference/index.js"(exports2, module2) { + var LARGE_ARRAY_SIZE = 200; + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + var MAX_SAFE_INTEGER = 9007199254740991; + var argsTag = "[object Arguments]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + function arrayIncludes(array, value) { + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; + } + function arrayIncludesWith(array, value, comparator) { + var index = -1, length = array ? array.length : 0; + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + function arrayMap(array, iteratee) { + var index = -1, length = array ? array.length : 0, result = Array(length); + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + function arrayPush(array, values) { + var index = -1, length = values.length, offset = array.length; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, index = fromIndex + (fromRight ? 1 : -1); + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex(array, baseIsNaN, fromIndex); + } + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + function baseIsNaN(value) { + return value !== value; + } + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + function cacheHas(cache, key) { + return cache.has(key); + } + function getValue(object, key) { + return object == null ? void 0 : object[key]; + } + function isHostObject(value) { + var result = false; + if (value != null && typeof value.toString != "function") { + try { + result = !!(value + ""); + } catch (e) { + } + } + return result; + } + var arrayProto = Array.prototype; + var funcProto = Function.prototype; + var objectProto = Object.prototype; + var coreJsData = root["__core-js_shared__"]; + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + })(); + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var objectToString = objectProto.toString; + var reIsNative = RegExp( + "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + var Symbol2 = root.Symbol; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var splice = arrayProto.splice; + var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0; + var nativeMax = Math.max; + var Map2 = getNative(root, "Map"); + var nativeCreate = getNative(Object, "create"); + function Hash(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + } + function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; + } + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? void 0 : result; + } + return hasOwnProperty.call(data, key) ? data[key] : void 0; + } + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key); + } + function hashSet(key, value) { + var data = this.__data__; + data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value; + return this; + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + function ListCache(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function listCacheClear() { + this.__data__ = []; + } + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; + } + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? void 0 : data[index][1]; + } + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + function MapCache(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function mapCacheClear() { + this.__data__ = { + "hash": new Hash(), + "map": new (Map2 || ListCache)(), + "string": new Hash() + }; + } + function mapCacheDelete(key) { + return getMapData(this, key)["delete"](key); + } + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + function SetCache(values) { + var index = -1, length = values ? values.length : 0; + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + function setCacheHas(value) { + return this.__data__.has(value); + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + function baseDifference(array, values, iteratee, comparator) { + var index = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values.length; + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], computed = iteratee ? iteratee(value) : value; + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, length = array.length; + predicate || (predicate = isFlattenable); + result || (result = []); + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + function baseIsNative(value) { + if (!isObject2(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + function baseRest(func, start) { + start = nativeMax(start === void 0 ? func.length - 1 : start, 0); + return function() { + var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; + } + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : void 0; + } + function isFlattenable(value) { + return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); + } + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : []; + }); + function eq(value, other) { + return value === other || value !== value && other !== other; + } + function isArguments(value) { + return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag); + } + var isArray = Array.isArray; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + function isFunction(value) { + var tag = isObject2(value) ? objectToString.call(value) : ""; + return tag == funcTag || tag == genTag; + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + module2.exports = difference; + } +}); + +// ../../node_modules/.pnpm/lodash.union@4.6.0/node_modules/lodash.union/index.js +var require_lodash20 = __commonJS({ + "../../node_modules/.pnpm/lodash.union@4.6.0/node_modules/lodash.union/index.js"(exports2, module2) { + var LARGE_ARRAY_SIZE = 200; + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + var INFINITY = 1 / 0; + var MAX_SAFE_INTEGER = 9007199254740991; + var argsTag = "[object Arguments]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + function arrayIncludes(array, value) { + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; + } + function arrayIncludesWith(array, value, comparator) { + var index = -1, length = array ? array.length : 0; + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + function arrayPush(array, values) { + var index = -1, length = values.length, offset = array.length; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, index = fromIndex + (fromRight ? 1 : -1); + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex(array, baseIsNaN, fromIndex); + } + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + function baseIsNaN(value) { + return value !== value; + } + function cacheHas(cache, key) { + return cache.has(key); + } + function getValue(object, key) { + return object == null ? void 0 : object[key]; + } + function isHostObject(value) { + var result = false; + if (value != null && typeof value.toString != "function") { + try { + result = !!(value + ""); + } catch (e) { + } + } + return result; + } + function setToArray(set) { + var index = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + var arrayProto = Array.prototype; + var funcProto = Function.prototype; + var objectProto = Object.prototype; + var coreJsData = root["__core-js_shared__"]; + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + })(); + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var objectToString = objectProto.toString; + var reIsNative = RegExp( + "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + var Symbol2 = root.Symbol; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var splice = arrayProto.splice; + var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0; + var nativeMax = Math.max; + var Map2 = getNative(root, "Map"); + var Set2 = getNative(root, "Set"); + var nativeCreate = getNative(Object, "create"); + function Hash(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + } + function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; + } + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? void 0 : result; + } + return hasOwnProperty.call(data, key) ? data[key] : void 0; + } + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key); + } + function hashSet(key, value) { + var data = this.__data__; + data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value; + return this; + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + function ListCache(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function listCacheClear() { + this.__data__ = []; + } + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; + } + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? void 0 : data[index][1]; + } + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + function MapCache(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function mapCacheClear() { + this.__data__ = { + "hash": new Hash(), + "map": new (Map2 || ListCache)(), + "string": new Hash() + }; + } + function mapCacheDelete(key) { + return getMapData(this, key)["delete"](key); + } + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + function SetCache(values) { + var index = -1, length = values ? values.length : 0; + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + function setCacheHas(value) { + return this.__data__.has(value); + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, length = array.length; + predicate || (predicate = isFlattenable); + result || (result = []); + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + function baseIsNative(value) { + if (!isObject2(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + function baseRest(func, start) { + start = nativeMax(start === void 0 ? func.length - 1 : start, 0); + return function() { + var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; + } + function baseUniq(array, iteratee, comparator) { + var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result; + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], computed = iteratee ? iteratee(value) : value; + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values) { + return new Set2(values); + }; + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : void 0; + } + function isFlattenable(value) { + return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); + } + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + function eq(value, other) { + return value === other || value !== value && other !== other; + } + function isArguments(value) { + return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag); + } + var isArray = Array.isArray; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + function isFunction(value) { + var tag = isObject2(value) ? objectToString.call(value) : ""; + return tag == funcTag || tag == genTag; + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function noop() { + } + module2.exports = union; + } +}); + +// ../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js +var require_old2 = __commonJS({ + "../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js"(exports2) { + var pathModule = require("path"); + var isWindows = process.platform === "win32"; + var fs = require("fs"); + var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + function rethrow() { + var callback; + if (DEBUG) { + var backtrace = new Error(); + callback = debugCallback; + } else + callback = missingCallback; + return callback; + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; + else if (!process.noDeprecation) { + var msg = "fs: missing callback " + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } + } + function maybeCallback(cb) { + return typeof cb === "function" ? cb : rethrow(); + } + var normalize = pathModule.normalize; + if (isWindows) { + nextPartRe = /(.*?)(?:[\/\\]+|$)/g; + } else { + nextPartRe = /(.*?)(?:[\/]+|$)/g; + } + var nextPartRe; + if (isWindows) { + splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; + } else { + splitRootRe = /^[\/]*/; + } + var splitRootRe; + exports2.realpathSync = function realpathSync(p, cache) { + p = pathModule.resolve(p); + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + var original = p, seenLinks = {}, knownHard = {}; + var pos; + var current; + var base; + var previous; + start(); + function start() { + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ""; + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } + while (pos < p.length) { + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + if (knownHard[base] || cache && cache[base] === base) { + continue; + } + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + continue; + } + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + resolvedLink = pathModule.resolve(previous, linkTarget); + if (cache) cache[base] = resolvedLink; + if (!isWindows) seenLinks[id] = linkTarget; + } + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + if (cache) cache[original] = p; + return p; + }; + exports2.realpath = function realpath(p, cache, cb) { + if (typeof cb !== "function") { + cb = maybeCallback(cache); + cache = null; + } + p = pathModule.resolve(p); + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + var original = p, seenLinks = {}, knownHard = {}; + var pos; + var current; + var base; + var previous; + start(); + function start() { + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ""; + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } + function LOOP() { + if (pos >= p.length) { + if (cache) cache[original] = p; + return cb(null, p); + } + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + if (knownHard[base] || cache && cache[base] === base) { + return process.nextTick(LOOP); + } + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + return gotResolvedLink(cache[base]); + } + return fs.lstat(base, gotStat); + } + function gotStat(err, stat) { + if (err) return cb(err); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + return process.nextTick(LOOP); + } + if (!isWindows) { + var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs.stat(base, function(err2) { + if (err2) return cb(err2); + fs.readlink(base, function(err3, target) { + if (!isWindows) seenLinks[id] = target; + gotTarget(err3, target); + }); + }); + } + function gotTarget(err, target, base2) { + if (err) return cb(err); + var resolvedLink = pathModule.resolve(previous, target); + if (cache) cache[base2] = resolvedLink; + gotResolvedLink(resolvedLink); + } + function gotResolvedLink(resolvedLink) { + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + }; + } +}); + +// ../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js +var require_fs = __commonJS({ + "../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js"(exports2, module2) { + module2.exports = realpath; + realpath.realpath = realpath; + realpath.sync = realpathSync; + realpath.realpathSync = realpathSync; + realpath.monkeypatch = monkeypatch; + realpath.unmonkeypatch = unmonkeypatch; + var fs = require("fs"); + var origRealpath = fs.realpath; + var origRealpathSync = fs.realpathSync; + var version2 = process.version; + var ok = /^v[0-5]\./.test(version2); + var old = require_old2(); + function newError(er) { + return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); + } + function realpath(p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb); + } + if (typeof cache === "function") { + cb = cache; + cache = null; + } + origRealpath(p, cache, function(er, result) { + if (newError(er)) { + old.realpath(p, cache, cb); + } else { + cb(er, result); + } + }); + } + function realpathSync(p, cache) { + if (ok) { + return origRealpathSync(p, cache); + } + try { + return origRealpathSync(p, cache); + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache); + } else { + throw er; + } + } + } + function monkeypatch() { + fs.realpath = realpath; + fs.realpathSync = realpathSync; + } + function unmonkeypatch() { + fs.realpath = origRealpath; + fs.realpathSync = origRealpathSync; + } + } +}); + +// ../../node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js +var require_concat_map = __commonJS({ + "../../node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js"(exports2, module2) { + module2.exports = function(xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + } +}); + +// ../../node_modules/.pnpm/brace-expansion@1.1.18/node_modules/brace-expansion/index.js +var require_brace_expansion2 = __commonJS({ + "../../node_modules/.pnpm/brace-expansion@1.1.18/node_modules/brace-expansion/index.js"(exports2, module2) { + var concatMap = require_concat_map(); + var balanced = require_balanced_match(); + module2.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + var EXPANSION_MAX = 1e5; + var EXPANSION_MAX_LENGTH = 4e6; + function numeric(str) { + return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); + } + function escapeBraces(str) { + return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str) { + return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str) { + if (!str) + return [""]; + var parts = []; + var m = balanced("{", "}", str); + if (!m) + return str.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str, options) { + if (!str) + return []; + options = options || {}; + var max = options.max == null ? EXPANSION_MAX : options.max; + var maxLength = options.maxLength == null ? EXPANSION_MAX_LENGTH : options.maxLength; + if (str.substr(0, 2) === "{}") { + str = "\\{\\}" + str.substr(2); + } + return expand(escapeBraces(str), max, maxLength, true).map(unescapeBraces); + } + function embrace(str) { + return "{" + str + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte(i, y) { + return i >= y; + } + function combine(acc, base, pre, values, max, maxLength, dropEmpties, outBase) { + var out = []; + var length = 0; + for (var a = 0; a < acc.length; a++) { + for (var v = 0; v < values.length; v++) { + if (out.length >= max) return out; + var expansion = acc[a] + pre + values[v]; + if (dropEmpties && expansion.length === base[a]) continue; + if (length + expansion.length > maxLength) return out; + out.push(expansion); + outBase.push(base[a]); + length += expansion.length; + } + } + return out; + } + function expandSequence(body, isAlphaSequence, max, maxLength) { + var n = body.split(/\.\./); + var N = []; + if (n[0] === void 0 || n[1] === void 0) { + return N; + } + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric(n[2])), 1) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + var length = 0; + for (var i = x; test(i, y) && N.length < max; i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") { + c = ""; + } + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) { + c = "-" + z + c.slice(1); + } else { + c = z + c; + } + } + } + } + if (length + c.length > maxLength) break; + N.push(c); + length += c.length; + } + return N; + } + function expand(str, max, maxLength, isTop) { + var acc = [""]; + var accBase = [0]; + var dropEmpties = false; + var firstGroup = true; + var nextBase; + for (; ; ) { + var m = balanced("{", "}", str); + if (!m) { + return combine(acc, accBase, str, [""], max, maxLength, dropEmpties, []); + } + var pre = m.pre; + if (/\$$/.test(pre)) { + return combine(acc, accBase, str, [""], max, maxLength, dropEmpties, []); + } + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,(?!,).*\}/)) { + str = m.pre + "{" + m.body + escClose + m.post; + isTop = true; + firstGroup = true; + dropEmpties = false; + accBase = []; + for (var b = 0; b < acc.length; b++) { + accBase.push(acc[b].length); + } + continue; + } + return combine( + acc, + accBase, + pre + "{" + m.body + "}" + m.post, + [""], + max, + maxLength, + dropEmpties, + [] + ); + } + if (firstGroup) { + dropEmpties = isTop && !isSequence; + firstGroup = false; + } + var values; + if (isSequence) { + values = expandSequence(m.body, isAlphaSequence, max, maxLength); + } else { + var n = parseCommaParts(m.body); + if (n.length === 1 && n[0] !== void 0) { + n = expand(n[0], max, maxLength, false).map(embrace); + if (n.length === 1) { + nextBase = []; + acc = combine( + acc, + accBase, + pre + n[0], + [""], + max, + maxLength, + dropEmpties && !m.post.length, + nextBase + ); + accBase = nextBase; + if (!m.post.length) break; + str = m.post; + continue; + } + } + var dropsEmpties = dropEmpties && !m.post.length && !pre; + for (var d = 0; dropsEmpties && d < acc.length; d++) { + if (acc[d].length !== accBase[d]) { + dropsEmpties = false; + } + } + values = []; + var valuesLength = 0; + outer: for (var j = 0; j < n.length; j++) { + var expanded = expand(n[j], max, maxLength, false); + for (var k = 0; k < expanded.length; k++) { + var v = expanded[k]; + if (dropsEmpties && !v) continue; + if (values.length >= max || valuesLength + v.length > maxLength) { + break outer; + } + values.push(v); + valuesLength += v.length; + } + } + } + nextBase = []; + acc = combine( + acc, + accBase, + pre, + values, + max, + maxLength, + dropEmpties && !m.post.length, + nextBase + ); + accBase = nextBase; + if (!m.post.length) break; + str = m.post; + } + return acc; + } + } +}); + +// ../../node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/minimatch.js +var require_minimatch2 = __commonJS({ + "../../node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/minimatch.js"(exports2, module2) { + module2.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path = (function() { + try { + return require("path"); + } catch (e) { + } + })() || { + sep: "/" + }; + minimatch.sep = path.sep; + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = require_brace_expansion2(); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set, c) { + set[c] = true; + return set; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + b = b || {}; + var t = {}; + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || typeof def !== "object" || !Object.keys(def).length) { + return minimatch; + } + var orig = minimatch; + var m = function minimatch2(p, pattern, options) { + return orig(p, pattern, ext(def, options)); + }; + m.Minimatch = function Minimatch2(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + m.Minimatch.defaults = function defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + }; + m.filter = function filter2(pattern, options) { + return orig.filter(pattern, ext(def, options)); + }; + m.defaults = function defaults(options) { + return orig.defaults(ext(def, options)); + }; + m.makeRe = function makeRe2(pattern, options) { + return orig.makeRe(pattern, ext(def, options)); + }; + m.braceExpand = function braceExpand2(pattern, options) { + return orig.braceExpand(pattern, ext(def, options)); + }; + m.match = function(list, pattern, options) { + return orig.match(list, pattern, ext(def, options)); + }; + return m; + }; + Minimatch.defaults = function(def) { + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + assertValidPattern(pattern); + if (!options) options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options); + } + assertValidPattern(pattern); + if (!options) options = {}; + pattern = pattern.trim(); + if (!options.allowWindowsEscape && path.sep !== "/") { + pattern = pattern.split(path.sep).join("/"); + } + this.options = options; + this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.make(); + } + Minimatch.prototype.debug = function() { + }; + Minimatch.prototype.make = make; + function make() { + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set = this.globSet = this.braceExpand(); + if (options.debug) this.debug = function debug() { + console.error.apply(console, arguments); + }; + this.debug(this.pattern, set); + set = this.globParts = set.map(function(s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set); + set = set.map(function(s, si, set2) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set); + set = set.filter(function(s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set); + this.set = set; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) return; + for (var i = 0, l2 = pattern.length; i < l2 && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + assertValidPattern(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + return [pattern]; + } + return expand(pattern); + } + var MAX_PATTERN_LENGTH = 1024 * 64; + var assertValidPattern = function(pattern) { + if (typeof pattern !== "string") { + throw new TypeError("invalid pattern"); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError("pattern is too long"); + } + }; + Minimatch.prototype.parse = parse2; + var SUBPARSE = {}; + function parse2(pattern, isSub) { + assertValidPattern(pattern); + var options = this.options; + if (pattern === "**") { + if (!options.noglobstar) + return GLOBSTAR; + else + pattern = "*"; + } + if (pattern === "") return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self2 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self2.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + /* istanbul ignore next */ + case "/": { + return false; + } + case "\\": + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) c = "^"; + re += c; + continue; + } + if (c === "*" && stateChar === "*") continue; + self2.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + // these are mostly the same in regexp and glob + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_2, $1, $2) { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case "[": + case ".": + case "(": + addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) { + dollar = "$"; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + var set = this.set; + if (!set.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + Minimatch.prototype.match = function match(f, partial) { + if (typeof partial === "undefined") partial = this.partial; + this.debug("match", f, this.pattern); + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + var options = this.options; + if (path.sep !== "/") { + f = f.split(path.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set = this.set; + this.debug(this.pattern, "set", set); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break; + } + for (i = 0; i < set.length; i++) { + var pattern = set[i]; + var file2 = f; + if (options.matchBase && pattern.length === 1) { + file2 = [filename]; + } + var hit = this.matchOne(file2, pattern, partial); + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } + if (options.flipNegate) return false; + return this.negate; + }; + Minimatch.prototype.matchOne = function(file2, pattern, partial) { + if (pattern.indexOf(GLOBSTAR) !== -1) { + return this._matchGlobstar(file2, pattern, partial, 0, 0); + } + return this._matchOne(file2, pattern, partial, 0, 0); + }; + Minimatch.prototype._matchGlobstar = function(file2, pattern, partial, fileIndex, patternIndex) { + var i; + var firstgs = -1; + for (i = patternIndex; i < pattern.length; i++) { + if (pattern[i] === GLOBSTAR) { + firstgs = i; + break; + } + } + var lastgs = -1; + for (i = pattern.length - 1; i >= 0; i--) { + if (pattern[i] === GLOBSTAR) { + lastgs = i; + break; + } + } + var head = pattern.slice(patternIndex, firstgs); + var body = partial ? pattern.slice(firstgs + 1) : pattern.slice(firstgs + 1, lastgs); + var tail = partial ? [] : pattern.slice(lastgs + 1); + if (head.length) { + var fileHead = file2.slice(fileIndex, fileIndex + head.length); + if (!this._matchOne(fileHead, head, partial, 0, 0)) { + return false; + } + fileIndex += head.length; + } + var fileTailMatch = 0; + if (tail.length) { + if (tail.length + fileIndex > file2.length) return false; + var tailStart = file2.length - tail.length; + if (this._matchOne(file2, tail, partial, tailStart, 0)) { + fileTailMatch = tail.length; + } else { + if (file2[file2.length - 1] !== "" || fileIndex + tail.length === file2.length) { + return false; + } + tailStart--; + if (!this._matchOne(file2, tail, partial, tailStart, 0)) { + return false; + } + fileTailMatch = tail.length + 1; + } + } + if (!body.length) { + var sawSome = !!fileTailMatch; + for (i = fileIndex; i < file2.length - fileTailMatch; i++) { + var f = String(file2[i]); + sawSome = true; + if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") { + return false; + } + } + return partial || sawSome; + } + var bodySegments = [[[], 0]]; + var currentBody = bodySegments[0]; + var nonGsParts = 0; + var nonGsPartsSums = [0]; + for (var bi = 0; bi < body.length; bi++) { + var b = body[bi]; + if (b === GLOBSTAR) { + nonGsPartsSums.push(nonGsParts); + currentBody = [[], 0]; + bodySegments.push(currentBody); + } else { + currentBody[0].push(b); + nonGsParts++; + } + } + var idx = bodySegments.length - 1; + var fileLength = file2.length - fileTailMatch; + for (var si = 0; si < bodySegments.length; si++) { + bodySegments[si][1] = fileLength - (nonGsPartsSums[idx--] + bodySegments[si][0].length); + } + return !!this._matchGlobStarBodySections( + file2, + bodySegments, + fileIndex, + 0, + partial, + 0, + !!fileTailMatch + ); + }; + Minimatch.prototype._matchGlobStarBodySections = function(file2, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) { + var bs = bodySegments[bodyIndex]; + if (!bs) { + for (var i = fileIndex; i < file2.length; i++) { + sawTail = true; + var f = file2[i]; + if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") { + return false; + } + } + return sawTail; + } + var body = bs[0]; + var after = bs[1]; + while (fileIndex <= after) { + var m = this._matchOne( + file2.slice(0, fileIndex + body.length), + body, + partial, + fileIndex, + 0 + ); + if (m && globStarDepth < this.maxGlobstarRecursion) { + var sub = this._matchGlobStarBodySections( + file2, + bodySegments, + fileIndex + body.length, + bodyIndex + 1, + partial, + globStarDepth + 1, + sawTail + ); + if (sub !== false) { + return sub; + } + } + var f = file2[fileIndex]; + if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") { + return false; + } + fileIndex++; + } + return partial || null; + }; + Minimatch.prototype._matchOne = function(file2, pattern, partial, fileIndex, patternIndex) { + var fi, pi, fl, pl; + for (fi = fileIndex, pi = patternIndex, fl = file2.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file2[fi]; + this.debug(pattern, p, f); + if (p === false || p === GLOBSTAR) return false; + var hit; + if (typeof p === "string") { + hit = f === p; + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + return fi === fl - 1 && file2[fi] === ""; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + } +}); + +// ../../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js +var require_path_is_absolute = __commonJS({ + "../../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js"(exports2, module2) { + "use strict"; + function posix(path) { + return path.charAt(0) === "/"; + } + function win32(path) { + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ""; + var isUnc = Boolean(device && device.charAt(1) !== ":"); + return Boolean(result[2] || isUnc); + } + module2.exports = process.platform === "win32" ? win32 : posix; + module2.exports.posix = posix; + module2.exports.win32 = win32; + } +}); + +// ../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/common.js +var require_common5 = __commonJS({ + "../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/common.js"(exports2) { + exports2.setopts = setopts; + exports2.ownProp = ownProp; + exports2.makeAbs = makeAbs; + exports2.finish = finish; + exports2.mark = mark; + exports2.isIgnored = isIgnored; + exports2.childrenIgnored = childrenIgnored; + function ownProp(obj2, field) { + return Object.prototype.hasOwnProperty.call(obj2, field); + } + var fs = require("fs"); + var path = require("path"); + var minimatch = require_minimatch2(); + var isAbsolute = require_path_is_absolute(); + var Minimatch = minimatch.Minimatch; + function alphasort(a, b) { + return a.localeCompare(b, "en"); + } + function setupIgnores(self2, options) { + self2.ignore = options.ignore || []; + if (!Array.isArray(self2.ignore)) + self2.ignore = [self2.ignore]; + if (self2.ignore.length) { + self2.ignore = self2.ignore.map(ignoreMap); + } + } + function ignoreMap(pattern) { + var gmatcher = null; + if (pattern.slice(-3) === "/**") { + var gpattern = pattern.replace(/(\/\*\*)+$/, ""); + gmatcher = new Minimatch(gpattern, { dot: true }); + } + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher + }; + } + function setopts(self2, pattern, options) { + if (!options) + options = {}; + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar"); + } + pattern = "**/" + pattern; + } + self2.silent = !!options.silent; + self2.pattern = pattern; + self2.strict = options.strict !== false; + self2.realpath = !!options.realpath; + self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null); + self2.follow = !!options.follow; + self2.dot = !!options.dot; + self2.mark = !!options.mark; + self2.nodir = !!options.nodir; + if (self2.nodir) + self2.mark = true; + self2.sync = !!options.sync; + self2.nounique = !!options.nounique; + self2.nonull = !!options.nonull; + self2.nosort = !!options.nosort; + self2.nocase = !!options.nocase; + self2.stat = !!options.stat; + self2.noprocess = !!options.noprocess; + self2.absolute = !!options.absolute; + self2.fs = options.fs || fs; + self2.maxLength = options.maxLength || Infinity; + self2.cache = options.cache || /* @__PURE__ */ Object.create(null); + self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null); + self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null); + setupIgnores(self2, options); + self2.changedCwd = false; + var cwd = process.cwd(); + if (!ownProp(options, "cwd")) + self2.cwd = cwd; + else { + self2.cwd = path.resolve(options.cwd); + self2.changedCwd = self2.cwd !== cwd; + } + self2.root = options.root || path.resolve(self2.cwd, "/"); + self2.root = path.resolve(self2.root); + if (process.platform === "win32") + self2.root = self2.root.replace(/\\/g, "/"); + self2.cwdAbs = isAbsolute(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); + if (process.platform === "win32") + self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); + self2.nomount = !!options.nomount; + options.nonegate = true; + options.nocomment = true; + options.allowWindowsEscape = false; + self2.minimatch = new Minimatch(pattern, options); + self2.options = self2.minimatch.options; + } + function finish(self2) { + var nou = self2.nounique; + var all = nou ? [] : /* @__PURE__ */ Object.create(null); + for (var i = 0, l2 = self2.matches.length; i < l2; i++) { + var matches = self2.matches[i]; + if (!matches || Object.keys(matches).length === 0) { + if (self2.nonull) { + var literal = self2.minimatch.globSet[i]; + if (nou) + all.push(literal); + else + all[literal] = true; + } + } else { + var m = Object.keys(matches); + if (nou) + all.push.apply(all, m); + else + m.forEach(function(m2) { + all[m2] = true; + }); + } + } + if (!nou) + all = Object.keys(all); + if (!self2.nosort) + all = all.sort(alphasort); + if (self2.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self2._mark(all[i]); + } + if (self2.nodir) { + all = all.filter(function(e) { + var notDir = !/\/$/.test(e); + var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; + if (notDir && c) + notDir = c !== "DIR" && !Array.isArray(c); + return notDir; + }); + } + } + if (self2.ignore.length) + all = all.filter(function(m2) { + return !isIgnored(self2, m2); + }); + self2.found = all; + } + function mark(self2, p) { + var abs = makeAbs(self2, p); + var c = self2.cache[abs]; + var m = p; + if (c) { + var isDir = c === "DIR" || Array.isArray(c); + var slash = p.slice(-1) === "/"; + if (isDir && !slash) + m += "/"; + else if (!isDir && slash) + m = m.slice(0, -1); + if (m !== p) { + var mabs = makeAbs(self2, m); + self2.statCache[mabs] = self2.statCache[abs]; + self2.cache[mabs] = self2.cache[abs]; + } + } + return m; + } + function makeAbs(self2, f) { + var abs = f; + if (f.charAt(0) === "/") { + abs = path.join(self2.root, f); + } else if (isAbsolute(f) || f === "") { + abs = f; + } else if (self2.changedCwd) { + abs = path.resolve(self2.cwd, f); + } else { + abs = path.resolve(f); + } + if (process.platform === "win32") + abs = abs.replace(/\\/g, "/"); + return abs; + } + function isIgnored(self2, path2) { + if (!self2.ignore.length) + return false; + return self2.ignore.some(function(item) { + return item.matcher.match(path2) || !!(item.gmatcher && item.gmatcher.match(path2)); + }); + } + function childrenIgnored(self2, path2) { + if (!self2.ignore.length) + return false; + return self2.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path2)); + }); + } + } +}); + +// ../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/sync.js +var require_sync = __commonJS({ + "../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/sync.js"(exports2, module2) { + module2.exports = globSync; + globSync.GlobSync = GlobSync; + var rp = require_fs(); + var minimatch = require_minimatch2(); + var Minimatch = minimatch.Minimatch; + var Glob = require_glob().Glob; + var util2 = require("util"); + var path = require("path"); + var assert = require("assert"); + var isAbsolute = require_path_is_absolute(); + var common = require_common5(); + var setopts = common.setopts; + var ownProp = common.ownProp; + var childrenIgnored = common.childrenIgnored; + var isIgnored = common.isIgnored; + function globSync(pattern, options) { + if (typeof options === "function" || arguments.length === 3) + throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); + return new GlobSync(pattern, options).found; + } + function GlobSync(pattern, options) { + if (!pattern) + throw new Error("must provide pattern"); + if (typeof options === "function" || arguments.length === 3) + throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options); + setopts(this, pattern, options); + if (this.noprocess) + return this; + var n = this.minimatch.set.length; + this.matches = new Array(n); + for (var i = 0; i < n; i++) { + this._process(this.minimatch.set[i], i, false); + } + this._finish(); + } + GlobSync.prototype._finish = function() { + assert.ok(this instanceof GlobSync); + if (this.realpath) { + var self2 = this; + this.matches.forEach(function(matchset, index) { + var set = self2.matches[index] = /* @__PURE__ */ Object.create(null); + for (var p in matchset) { + try { + p = self2._makeAbs(p); + var real = rp.realpathSync(p, self2.realpathCache); + set[real] = true; + } catch (er) { + if (er.syscall === "stat") + set[self2._makeAbs(p)] = true; + else + throw er; + } + } + }); + } + common.finish(this); + }; + GlobSync.prototype._process = function(pattern, index, inGlobStar) { + assert.ok(this instanceof GlobSync); + var n = 0; + while (typeof pattern[n] === "string") { + n++; + } + var prefix; + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join("/"), index); + return; + case 0: + prefix = null; + break; + default: + prefix = pattern.slice(0, n).join("/"); + break; + } + var remain = pattern.slice(n); + var read; + if (prefix === null) + read = "."; + else if (isAbsolute(prefix) || isAbsolute(pattern.map(function(p) { + return typeof p === "string" ? p : "[*]"; + }).join("/"))) { + if (!prefix || !isAbsolute(prefix)) + prefix = "/" + prefix; + read = prefix; + } else + read = prefix; + var abs = this._makeAbs(read); + if (childrenIgnored(this, read)) + return; + var isGlobStar = remain[0] === minimatch.GLOBSTAR; + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar); + }; + GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar); + if (!entries) + return; + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === "."; + var matchedEntries = []; + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (e.charAt(0) !== "." || dotOk) { + var m; + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + if (m) + matchedEntries.push(e); + } + } + var len = matchedEntries.length; + if (len === 0) + return; + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = /* @__PURE__ */ Object.create(null); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + if (prefix) { + if (prefix.slice(-1) !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + if (e.charAt(0) === "/" && !this.nomount) { + e = path.join(this.root, e); + } + this._emitMatch(index, e); + } + return; + } + remain.shift(); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + var newPattern; + if (prefix) + newPattern = [prefix, e]; + else + newPattern = [e]; + this._process(newPattern.concat(remain), index, inGlobStar); + } + }; + GlobSync.prototype._emitMatch = function(index, e) { + if (isIgnored(this, e)) + return; + var abs = this._makeAbs(e); + if (this.mark) + e = this._mark(e); + if (this.absolute) { + e = abs; + } + if (this.matches[index][e]) + return; + if (this.nodir) { + var c = this.cache[abs]; + if (c === "DIR" || Array.isArray(c)) + return; + } + this.matches[index][e] = true; + if (this.stat) + this._stat(e); + }; + GlobSync.prototype._readdirInGlobStar = function(abs) { + if (this.follow) + return this._readdir(abs, false); + var entries; + var lstat; + var stat; + try { + lstat = this.fs.lstatSync(abs); + } catch (er) { + if (er.code === "ENOENT") { + return null; + } + } + var isSym = lstat && lstat.isSymbolicLink(); + this.symlinks[abs] = isSym; + if (!isSym && lstat && !lstat.isDirectory()) + this.cache[abs] = "FILE"; + else + entries = this._readdir(abs, false); + return entries; + }; + GlobSync.prototype._readdir = function(abs, inGlobStar) { + var entries; + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs); + if (ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === "FILE") + return null; + if (Array.isArray(c)) + return c; + } + try { + return this._readdirEntries(abs, this.fs.readdirSync(abs)); + } catch (er) { + this._readdirError(abs, er); + return null; + } + }; + GlobSync.prototype._readdirEntries = function(abs, entries) { + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (abs === "/") + e = abs + e; + else + e = abs + "/" + e; + this.cache[e] = true; + } + } + this.cache[abs] = entries; + return entries; + }; + GlobSync.prototype._readdirError = function(f, er) { + switch (er.code) { + case "ENOTSUP": + // https://github.com/isaacs/node-glob/issues/205 + case "ENOTDIR": + var abs = this._makeAbs(f); + this.cache[abs] = "FILE"; + if (abs === this.cwdAbs) { + var error = new Error(er.code + " invalid cwd " + this.cwd); + error.path = this.cwd; + error.code = er.code; + throw error; + } + break; + case "ENOENT": + // not terribly unusual + case "ELOOP": + case "ENAMETOOLONG": + case "UNKNOWN": + this.cache[this._makeAbs(f)] = false; + break; + default: + this.cache[this._makeAbs(f)] = false; + if (this.strict) + throw er; + if (!this.silent) + console.error("glob error", er); + break; + } + }; + GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar); + if (!entries) + return; + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [prefix] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); + this._process(noGlobStar, index, false); + var len = entries.length; + var isSym = this.symlinks[abs]; + if (isSym && inGlobStar) + return; + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === "." && !this.dot) + continue; + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + this._process(instead, index, true); + var below = gspref.concat(entries[i], remain); + this._process(below, index, true); + } + }; + GlobSync.prototype._processSimple = function(prefix, index) { + var exists = this._stat(prefix); + if (!this.matches[index]) + this.matches[index] = /* @__PURE__ */ Object.create(null); + if (!exists) + return; + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + if (prefix.charAt(0) === "/") { + prefix = path.join(this.root, prefix); + } else { + prefix = path.resolve(this.root, prefix); + if (trail) + prefix += "/"; + } + } + if (process.platform === "win32") + prefix = prefix.replace(/\\/g, "/"); + this._emitMatch(index, prefix); + }; + GlobSync.prototype._stat = function(f) { + var abs = this._makeAbs(f); + var needDir = f.slice(-1) === "/"; + if (f.length > this.maxLength) + return false; + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (Array.isArray(c)) + c = "DIR"; + if (!needDir || c === "DIR") + return c; + if (needDir && c === "FILE") + return false; + } + var exists; + var stat = this.statCache[abs]; + if (!stat) { + var lstat; + try { + lstat = this.fs.lstatSync(abs); + } catch (er) { + if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { + this.statCache[abs] = false; + return false; + } + } + if (lstat && lstat.isSymbolicLink()) { + try { + stat = this.fs.statSync(abs); + } catch (er) { + stat = lstat; + } + } else { + stat = lstat; + } + } + this.statCache[abs] = stat; + var c = true; + if (stat) + c = stat.isDirectory() ? "DIR" : "FILE"; + this.cache[abs] = this.cache[abs] || c; + if (needDir && c === "FILE") + return false; + return c; + }; + GlobSync.prototype._mark = function(p) { + return common.mark(this, p); + }; + GlobSync.prototype._makeAbs = function(f) { + return common.makeAbs(this, f); + }; + } +}); + +// ../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js +var require_wrappy = __commonJS({ + "../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js"(exports2, module2) { + module2.exports = wrappy; + function wrappy(fn, cb) { + if (fn && cb) return wrappy(fn)(cb); + if (typeof fn !== "function") + throw new TypeError("need wrapper function"); + Object.keys(fn).forEach(function(k) { + wrapper[k] = fn[k]; + }); + return wrapper; + function wrapper() { + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + var ret2 = fn.apply(this, args); + var cb2 = args[args.length - 1]; + if (typeof ret2 === "function" && ret2 !== cb2) { + Object.keys(cb2).forEach(function(k) { + ret2[k] = cb2[k]; + }); + } + return ret2; + } + } + } +}); + +// ../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js +var require_once = __commonJS({ + "../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js"(exports2, module2) { + var wrappy = require_wrappy(); + module2.exports = wrappy(once); + module2.exports.strict = wrappy(onceStrict); + once.proto = once(function() { + Object.defineProperty(Function.prototype, "once", { + value: function() { + return once(this); + }, + configurable: true + }); + Object.defineProperty(Function.prototype, "onceStrict", { + value: function() { + return onceStrict(this); + }, + configurable: true + }); + }); + function once(fn) { + var f = function() { + if (f.called) return f.value; + f.called = true; + return f.value = fn.apply(this, arguments); + }; + f.called = false; + return f; + } + function onceStrict(fn) { + var f = function() { + if (f.called) + throw new Error(f.onceError); + f.called = true; + return f.value = fn.apply(this, arguments); + }; + var name = fn.name || "Function wrapped with `once`"; + f.onceError = name + " shouldn't be called more than once"; + f.called = false; + return f; + } + } +}); + +// ../../node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js +var require_inflight = __commonJS({ + "../../node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js"(exports2, module2) { + var wrappy = require_wrappy(); + var reqs = /* @__PURE__ */ Object.create(null); + var once = require_once(); + module2.exports = wrappy(inflight); + function inflight(key, cb) { + if (reqs[key]) { + reqs[key].push(cb); + return null; + } else { + reqs[key] = [cb]; + return makeres(key); + } + } + function makeres(key) { + return once(function RES() { + var cbs = reqs[key]; + var len = cbs.length; + var args = slice(arguments); + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args); + } + } finally { + if (cbs.length > len) { + cbs.splice(0, len); + process.nextTick(function() { + RES.apply(null, args); + }); + } else { + delete reqs[key]; + } + } + }); + } + function slice(args) { + var length = args.length; + var array = []; + for (var i = 0; i < length; i++) array[i] = args[i]; + return array; + } + } +}); + +// ../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/glob.js +var require_glob = __commonJS({ + "../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/glob.js"(exports2, module2) { + module2.exports = glob; + var rp = require_fs(); + var minimatch = require_minimatch2(); + var Minimatch = minimatch.Minimatch; + var inherits2 = require_inherits(); + var EE = require("events").EventEmitter; + var path = require("path"); + var assert = require("assert"); + var isAbsolute = require_path_is_absolute(); + var globSync = require_sync(); + var common = require_common5(); + var setopts = common.setopts; + var ownProp = common.ownProp; + var inflight = require_inflight(); + var util2 = require("util"); + var childrenIgnored = common.childrenIgnored; + var isIgnored = common.isIgnored; + var once = require_once(); + function glob(pattern, options, cb) { + if (typeof options === "function") cb = options, options = {}; + if (!options) options = {}; + if (options.sync) { + if (cb) + throw new TypeError("callback provided to sync glob"); + return globSync(pattern, options); + } + return new Glob(pattern, options, cb); + } + glob.sync = globSync; + var GlobSync = glob.GlobSync = globSync.GlobSync; + glob.glob = glob; + function extend(origin, add) { + if (add === null || typeof add !== "object") { + return origin; + } + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; + } + glob.hasMagic = function(pattern, options_) { + var options = extend({}, options_); + options.noprocess = true; + var g = new Glob(pattern, options); + var set = g.minimatch.set; + if (!pattern) + return false; + if (set.length > 1) + return true; + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== "string") + return true; + } + return false; + }; + glob.Glob = Glob; + inherits2(Glob, EE); + function Glob(pattern, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + if (options && options.sync) { + if (cb) + throw new TypeError("callback provided to sync glob"); + return new GlobSync(pattern, options); + } + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb); + setopts(this, pattern, options); + this._didRealPath = false; + var n = this.minimatch.set.length; + this.matches = new Array(n); + if (typeof cb === "function") { + cb = once(cb); + this.on("error", cb); + this.on("end", function(matches) { + cb(null, matches); + }); + } + var self2 = this; + this._processing = 0; + this._emitQueue = []; + this._processQueue = []; + this.paused = false; + if (this.noprocess) + return this; + if (n === 0) + return done(); + var sync = true; + for (var i = 0; i < n; i++) { + this._process(this.minimatch.set[i], i, false, done); + } + sync = false; + function done() { + --self2._processing; + if (self2._processing <= 0) { + if (sync) { + process.nextTick(function() { + self2._finish(); + }); + } else { + self2._finish(); + } + } + } + } + Glob.prototype._finish = function() { + assert(this instanceof Glob); + if (this.aborted) + return; + if (this.realpath && !this._didRealpath) + return this._realpath(); + common.finish(this); + this.emit("end", this.found); + }; + Glob.prototype._realpath = function() { + if (this._didRealpath) + return; + this._didRealpath = true; + var n = this.matches.length; + if (n === 0) + return this._finish(); + var self2 = this; + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next); + function next() { + if (--n === 0) + self2._finish(); + } + }; + Glob.prototype._realpathSet = function(index, cb) { + var matchset = this.matches[index]; + if (!matchset) + return cb(); + var found = Object.keys(matchset); + var self2 = this; + var n = found.length; + if (n === 0) + return cb(); + var set = this.matches[index] = /* @__PURE__ */ Object.create(null); + found.forEach(function(p, i) { + p = self2._makeAbs(p); + rp.realpath(p, self2.realpathCache, function(er, real) { + if (!er) + set[real] = true; + else if (er.syscall === "stat") + set[p] = true; + else + self2.emit("error", er); + if (--n === 0) { + self2.matches[index] = set; + cb(); + } + }); + }); + }; + Glob.prototype._mark = function(p) { + return common.mark(this, p); + }; + Glob.prototype._makeAbs = function(f) { + return common.makeAbs(this, f); + }; + Glob.prototype.abort = function() { + this.aborted = true; + this.emit("abort"); + }; + Glob.prototype.pause = function() { + if (!this.paused) { + this.paused = true; + this.emit("pause"); + } + }; + Glob.prototype.resume = function() { + if (this.paused) { + this.emit("resume"); + this.paused = false; + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0); + this._emitQueue.length = 0; + for (var i = 0; i < eq.length; i++) { + var e = eq[i]; + this._emitMatch(e[0], e[1]); + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0); + this._processQueue.length = 0; + for (var i = 0; i < pq.length; i++) { + var p = pq[i]; + this._processing--; + this._process(p[0], p[1], p[2], p[3]); + } + } + } + }; + Glob.prototype._process = function(pattern, index, inGlobStar, cb) { + assert(this instanceof Glob); + assert(typeof cb === "function"); + if (this.aborted) + return; + this._processing++; + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]); + return; + } + var n = 0; + while (typeof pattern[n] === "string") { + n++; + } + var prefix; + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join("/"), index, cb); + return; + case 0: + prefix = null; + break; + default: + prefix = pattern.slice(0, n).join("/"); + break; + } + var remain = pattern.slice(n); + var read; + if (prefix === null) + read = "."; + else if (isAbsolute(prefix) || isAbsolute(pattern.map(function(p) { + return typeof p === "string" ? p : "[*]"; + }).join("/"))) { + if (!prefix || !isAbsolute(prefix)) + prefix = "/" + prefix; + read = prefix; + } else + read = prefix; + var abs = this._makeAbs(read); + if (childrenIgnored(this, read)) + return cb(); + var isGlobStar = remain[0] === minimatch.GLOBSTAR; + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); + }; + Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { + var self2 = this; + this._readdir(abs, inGlobStar, function(er, entries) { + return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); + }); + }; + Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { + if (!entries) + return cb(); + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === "."; + var matchedEntries = []; + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (e.charAt(0) !== "." || dotOk) { + var m; + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + if (m) + matchedEntries.push(e); + } + } + var len = matchedEntries.length; + if (len === 0) + return cb(); + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = /* @__PURE__ */ Object.create(null); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + if (prefix) { + if (prefix !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + if (e.charAt(0) === "/" && !this.nomount) { + e = path.join(this.root, e); + } + this._emitMatch(index, e); + } + return cb(); + } + remain.shift(); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + var newPattern; + if (prefix) { + if (prefix !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + this._process([e].concat(remain), index, inGlobStar, cb); + } + cb(); + }; + Glob.prototype._emitMatch = function(index, e) { + if (this.aborted) + return; + if (isIgnored(this, e)) + return; + if (this.paused) { + this._emitQueue.push([index, e]); + return; + } + var abs = isAbsolute(e) ? e : this._makeAbs(e); + if (this.mark) + e = this._mark(e); + if (this.absolute) + e = abs; + if (this.matches[index][e]) + return; + if (this.nodir) { + var c = this.cache[abs]; + if (c === "DIR" || Array.isArray(c)) + return; + } + this.matches[index][e] = true; + var st = this.statCache[abs]; + if (st) + this.emit("stat", e, st); + this.emit("match", e); + }; + Glob.prototype._readdirInGlobStar = function(abs, cb) { + if (this.aborted) + return; + if (this.follow) + return this._readdir(abs, false, cb); + var lstatkey = "lstat\0" + abs; + var self2 = this; + var lstatcb = inflight(lstatkey, lstatcb_); + if (lstatcb) + self2.fs.lstat(abs, lstatcb); + function lstatcb_(er, lstat) { + if (er && er.code === "ENOENT") + return cb(); + var isSym = lstat && lstat.isSymbolicLink(); + self2.symlinks[abs] = isSym; + if (!isSym && lstat && !lstat.isDirectory()) { + self2.cache[abs] = "FILE"; + cb(); + } else + self2._readdir(abs, false, cb); + } + }; + Glob.prototype._readdir = function(abs, inGlobStar, cb) { + if (this.aborted) + return; + cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); + if (!cb) + return; + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb); + if (ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === "FILE") + return cb(); + if (Array.isArray(c)) + return cb(null, c); + } + var self2 = this; + self2.fs.readdir(abs, readdirCb(this, abs, cb)); + }; + function readdirCb(self2, abs, cb) { + return function(er, entries) { + if (er) + self2._readdirError(abs, er, cb); + else + self2._readdirEntries(abs, entries, cb); + }; + } + Glob.prototype._readdirEntries = function(abs, entries, cb) { + if (this.aborted) + return; + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (abs === "/") + e = abs + e; + else + e = abs + "/" + e; + this.cache[e] = true; + } + } + this.cache[abs] = entries; + return cb(null, entries); + }; + Glob.prototype._readdirError = function(f, er, cb) { + if (this.aborted) + return; + switch (er.code) { + case "ENOTSUP": + // https://github.com/isaacs/node-glob/issues/205 + case "ENOTDIR": + var abs = this._makeAbs(f); + this.cache[abs] = "FILE"; + if (abs === this.cwdAbs) { + var error = new Error(er.code + " invalid cwd " + this.cwd); + error.path = this.cwd; + error.code = er.code; + this.emit("error", error); + this.abort(); + } + break; + case "ENOENT": + // not terribly unusual + case "ELOOP": + case "ENAMETOOLONG": + case "UNKNOWN": + this.cache[this._makeAbs(f)] = false; + break; + default: + this.cache[this._makeAbs(f)] = false; + if (this.strict) { + this.emit("error", er); + this.abort(); + } + if (!this.silent) + console.error("glob error", er); + break; + } + return cb(); + }; + Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { + var self2 = this; + this._readdir(abs, inGlobStar, function(er, entries) { + self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); + }); + }; + Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { + if (!entries) + return cb(); + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [prefix] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); + this._process(noGlobStar, index, false, cb); + var isSym = this.symlinks[abs]; + var len = entries.length; + if (isSym && inGlobStar) + return cb(); + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === "." && !this.dot) + continue; + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + this._process(instead, index, true, cb); + var below = gspref.concat(entries[i], remain); + this._process(below, index, true, cb); + } + cb(); + }; + Glob.prototype._processSimple = function(prefix, index, cb) { + var self2 = this; + this._stat(prefix, function(er, exists) { + self2._processSimple2(prefix, index, er, exists, cb); + }); + }; + Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { + if (!this.matches[index]) + this.matches[index] = /* @__PURE__ */ Object.create(null); + if (!exists) + return cb(); + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + if (prefix.charAt(0) === "/") { + prefix = path.join(this.root, prefix); + } else { + prefix = path.resolve(this.root, prefix); + if (trail) + prefix += "/"; + } + } + if (process.platform === "win32") + prefix = prefix.replace(/\\/g, "/"); + this._emitMatch(index, prefix); + cb(); + }; + Glob.prototype._stat = function(f, cb) { + var abs = this._makeAbs(f); + var needDir = f.slice(-1) === "/"; + if (f.length > this.maxLength) + return cb(); + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (Array.isArray(c)) + c = "DIR"; + if (!needDir || c === "DIR") + return cb(null, c); + if (needDir && c === "FILE") + return cb(); + } + var exists; + var stat = this.statCache[abs]; + if (stat !== void 0) { + if (stat === false) + return cb(null, stat); + else { + var type = stat.isDirectory() ? "DIR" : "FILE"; + if (needDir && type === "FILE") + return cb(); + else + return cb(null, type, stat); + } + } + var self2 = this; + var statcb = inflight("stat\0" + abs, lstatcb_); + if (statcb) + self2.fs.lstat(abs, statcb); + function lstatcb_(er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + return self2.fs.stat(abs, function(er2, stat2) { + if (er2) + self2._stat2(f, abs, null, lstat, cb); + else + self2._stat2(f, abs, er2, stat2, cb); + }); + } else { + self2._stat2(f, abs, er, lstat, cb); + } + } + }; + Glob.prototype._stat2 = function(f, abs, er, stat, cb) { + if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { + this.statCache[abs] = false; + return cb(); + } + var needDir = f.slice(-1) === "/"; + this.statCache[abs] = stat; + if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) + return cb(null, false, stat); + var c = true; + if (stat) + c = stat.isDirectory() ? "DIR" : "FILE"; + this.cache[abs] = this.cache[abs] || c; + if (needDir && c === "FILE") + return cb(); + return cb(null, c, stat); + }; + } +}); + +// ../../node_modules/.pnpm/archiver-utils@2.1.0/node_modules/archiver-utils/file.js +var require_file2 = __commonJS({ + "../../node_modules/.pnpm/archiver-utils@2.1.0/node_modules/archiver-utils/file.js"(exports2, module2) { + var fs = require_graceful_fs(); + var path = require("path"); + var flatten = require_lodash18(); + var difference = require_lodash19(); + var union = require_lodash20(); + var isPlainObject = require_lodash7(); + var glob = require_glob(); + var file2 = module2.exports = {}; + var pathSeparatorRe = /[\/\\]/g; + var processPatterns = function(patterns, fn) { + var result = []; + flatten(patterns).forEach(function(pattern) { + var exclusion = pattern.indexOf("!") === 0; + if (exclusion) { + pattern = pattern.slice(1); + } + var matches = fn(pattern); + if (exclusion) { + result = difference(result, matches); + } else { + result = union(result, matches); + } + }); + return result; + }; + file2.exists = function() { + var filepath = path.join.apply(path, arguments); + return fs.existsSync(filepath); + }; + file2.expand = function(...args) { + var options = isPlainObject(args[0]) ? args.shift() : {}; + var patterns = Array.isArray(args[0]) ? args[0] : args; + if (patterns.length === 0) { + return []; + } + var matches = processPatterns(patterns, function(pattern) { + return glob.sync(pattern, options); + }); + if (options.filter) { + matches = matches.filter(function(filepath) { + filepath = path.join(options.cwd || "", filepath); + try { + if (typeof options.filter === "function") { + return options.filter(filepath); + } else { + return fs.statSync(filepath)[options.filter](); + } + } catch (e) { + return false; + } + }); + } + return matches; + }; + file2.expandMapping = function(patterns, destBase, options) { + options = Object.assign({ + rename: function(destBase2, destPath) { + return path.join(destBase2 || "", destPath); + } + }, options); + var files = []; + var fileByDest = {}; + file2.expand(options, patterns).forEach(function(src) { + var destPath = src; + if (options.flatten) { + destPath = path.basename(destPath); + } + if (options.ext) { + destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext); + } + var dest = options.rename(destBase, destPath, options); + if (options.cwd) { + src = path.join(options.cwd, src); + } + dest = dest.replace(pathSeparatorRe, "/"); + src = src.replace(pathSeparatorRe, "/"); + if (fileByDest[dest]) { + fileByDest[dest].src.push(src); + } else { + files.push({ + src: [src], + dest + }); + fileByDest[dest] = files[files.length - 1]; + } + }); + return files; + }; + file2.normalizeFilesArray = function(data) { + var files = []; + data.forEach(function(obj2) { + var prop; + if ("src" in obj2 || "dest" in obj2) { + files.push(obj2); + } + }); + if (files.length === 0) { + return []; + } + files = _(files).chain().forEach(function(obj2) { + if (!("src" in obj2) || !obj2.src) { + return; + } + if (Array.isArray(obj2.src)) { + obj2.src = flatten(obj2.src); + } else { + obj2.src = [obj2.src]; + } + }).map(function(obj2) { + var expandOptions = Object.assign({}, obj2); + delete expandOptions.src; + delete expandOptions.dest; + if (obj2.expand) { + return file2.expandMapping(obj2.src, obj2.dest, expandOptions).map(function(mapObj) { + var result2 = Object.assign({}, obj2); + result2.orig = Object.assign({}, obj2); + result2.src = mapObj.src; + result2.dest = mapObj.dest; + ["expand", "cwd", "flatten", "rename", "ext"].forEach(function(prop) { + delete result2[prop]; + }); + return result2; + }); + } + var result = Object.assign({}, obj2); + result.orig = Object.assign({}, obj2); + if ("src" in result) { + Object.defineProperty(result, "src", { + enumerable: true, + get: function fn() { + var src; + if (!("result" in fn)) { + src = obj2.src; + src = Array.isArray(src) ? flatten(src) : [src]; + fn.result = file2.expand(expandOptions, src); + } + return fn.result; + } + }); + } + if ("dest" in result) { + result.dest = obj2.dest; + } + return result; + }).flatten().value(); + return files; + }; + } +}); + +// ../../node_modules/.pnpm/archiver-utils@2.1.0/node_modules/archiver-utils/index.js +var require_archiver_utils = __commonJS({ + "../../node_modules/.pnpm/archiver-utils@2.1.0/node_modules/archiver-utils/index.js"(exports2, module2) { + var fs = require_graceful_fs(); + var path = require("path"); + var nutil = require("util"); + var lazystream = require_lazystream(); + var normalizePath = require_normalize_path(); + var defaults = require_lodash17(); + var Stream = require("stream").Stream; + var PassThrough = require_readable2().PassThrough; + var utils = module2.exports = {}; + utils.file = require_file2(); + utils.collectStream = function(source, callback) { + var collection = []; + var size = 0; + source.on("error", callback); + source.on("data", function(chunk) { + collection.push(chunk); + size += chunk.length; + }); + source.on("end", function() { + var buf = new Buffer(size); + var offset = 0; + collection.forEach(function(data) { + data.copy(buf, offset); + offset += data.length; + }); + callback(null, buf); + }); + }; + utils.dateify = function(dateish) { + dateish = dateish || /* @__PURE__ */ new Date(); + if (dateish instanceof Date) { + dateish = dateish; + } else if (typeof dateish === "string") { + dateish = new Date(dateish); + } else { + dateish = /* @__PURE__ */ new Date(); + } + return dateish; + }; + utils.defaults = function(object, source, guard) { + var args = arguments; + args[0] = args[0] || {}; + return defaults(...args); + }; + utils.isStream = function(source) { + return source instanceof Stream; + }; + utils.lazyReadStream = function(filepath) { + return new lazystream.Readable(function() { + return fs.createReadStream(filepath); + }); + }; + utils.normalizeInputSource = function(source) { + if (source === null) { + return new Buffer(0); + } else if (typeof source === "string") { + return new Buffer(source); + } else if (utils.isStream(source) && !source._readableState) { + var normalized = new PassThrough(); + source.pipe(normalized); + return normalized; + } + return source; + }; + utils.sanitizePath = function(filepath) { + return normalizePath(filepath, false).replace(/^\w+:/, "").replace(/^(\.\.\/|\/)+/, ""); + }; + utils.trailingSlashIt = function(str) { + return str.slice(-1) !== "/" ? str + "/" : str; + }; + utils.unixifyPath = function(filepath) { + return normalizePath(filepath, false).replace(/^\w+:/, ""); + }; + utils.walkdir = function(dirpath, base, callback) { + var results = []; + if (typeof base === "function") { + callback = base; + base = dirpath; + } + fs.readdir(dirpath, function(err, list) { + var i = 0; + var file2; + var filepath; + if (err) { + return callback(err); + } + (function next() { + file2 = list[i++]; + if (!file2) { + return callback(null, results); + } + filepath = path.join(dirpath, file2); + fs.stat(filepath, function(err2, stats) { + results.push({ + path: filepath, + relative: path.relative(base, filepath).replace(/\\/g, "/"), + stats + }); + if (stats && stats.isDirectory()) { + utils.walkdir(filepath, base, function(err3, res) { + res.forEach(function(dirEntry) { + results.push(dirEntry); + }); + next(); + }); + } else { + next(); + } + }); + })(); + }); + }; + } +}); + +// ../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/error.js +var require_error = __commonJS({ + "../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/error.js"(exports2, module2) { + var util2 = require("util"); + var ERROR_CODES = { + "ABORTED": "archive was aborted", + "DIRECTORYDIRPATHREQUIRED": "diretory dirpath argument must be a non-empty string value", + "DIRECTORYFUNCTIONINVALIDDATA": "invalid data returned by directory custom data function", + "ENTRYNAMEREQUIRED": "entry name must be a non-empty string value", + "FILEFILEPATHREQUIRED": "file filepath argument must be a non-empty string value", + "FINALIZING": "archive already finalizing", + "QUEUECLOSED": "queue closed", + "NOENDMETHOD": "no suitable finalize/end method defined by module", + "DIRECTORYNOTSUPPORTED": "support for directory entries not defined by module", + "FORMATSET": "archive format already set", + "INPUTSTEAMBUFFERREQUIRED": "input source must be valid Stream or Buffer instance", + "MODULESET": "module already set", + "SYMLINKNOTSUPPORTED": "support for symlink entries not defined by module", + "SYMLINKFILEPATHREQUIRED": "symlink filepath argument must be a non-empty string value", + "SYMLINKTARGETREQUIRED": "symlink target argument must be a non-empty string value", + "ENTRYNOTSUPPORTED": "entry not supported" + }; + function ArchiverError(code, data) { + Error.captureStackTrace(this, this.constructor); + this.message = ERROR_CODES[code] || code; + this.code = code; + this.data = data; + } + util2.inherits(ArchiverError, Error); + exports2 = module2.exports = ArchiverError; + } +}); + +// ../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/core.js +var require_core5 = __commonJS({ + "../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/core.js"(exports2, module2) { + var fs = require("fs"); + var glob = require_readdir_glob(); + var async = require_async2(); + var path = require("path"); + var util2 = require_archiver_utils(); + var inherits2 = require("util").inherits; + var ArchiverError = require_error(); + var Transform = require_readable().Transform; + var win32 = process.platform === "win32"; + var Archiver = function(format, options) { + if (!(this instanceof Archiver)) { + return new Archiver(format, options); + } + if (typeof format !== "string") { + options = format; + format = "zip"; + } + options = this.options = util2.defaults(options, { + highWaterMark: 1024 * 1024, + statConcurrency: 4 + }); + Transform.call(this, options); + this._format = false; + this._module = false; + this._pending = 0; + this._pointer = 0; + this._entriesCount = 0; + this._entriesProcessedCount = 0; + this._fsEntriesTotalBytes = 0; + this._fsEntriesProcessedBytes = 0; + this._queue = async.queue(this._onQueueTask.bind(this), 1); + this._queue.drain(this._onQueueDrain.bind(this)); + this._statQueue = async.queue(this._onStatQueueTask.bind(this), options.statConcurrency); + this._statQueue.drain(this._onQueueDrain.bind(this)); + this._state = { + aborted: false, + finalize: false, + finalizing: false, + finalized: false, + modulePiped: false + }; + this._streams = []; + }; + inherits2(Archiver, Transform); + Archiver.prototype._abort = function() { + this._state.aborted = true; + this._queue.kill(); + this._statQueue.kill(); + if (this._queue.idle()) { + this._shutdown(); + } + }; + Archiver.prototype._append = function(filepath, data) { + data = data || {}; + var task = { + source: null, + filepath + }; + if (!data.name) { + data.name = filepath; + } + data.sourcePath = filepath; + task.data = data; + this._entriesCount++; + if (data.stats && data.stats instanceof fs.Stats) { + task = this._updateQueueTaskWithStats(task, data.stats); + if (task) { + if (data.stats.size) { + this._fsEntriesTotalBytes += data.stats.size; + } + this._queue.push(task); + } + } else { + this._statQueue.push(task); + } + }; + Archiver.prototype._finalize = function() { + if (this._state.finalizing || this._state.finalized || this._state.aborted) { + return; + } + this._state.finalizing = true; + this._moduleFinalize(); + this._state.finalizing = false; + this._state.finalized = true; + }; + Archiver.prototype._maybeFinalize = function() { + if (this._state.finalizing || this._state.finalized || this._state.aborted) { + return false; + } + if (this._state.finalize && this._pending === 0 && this._queue.idle() && this._statQueue.idle()) { + this._finalize(); + return true; + } + return false; + }; + Archiver.prototype._moduleAppend = function(source, data, callback) { + if (this._state.aborted) { + callback(); + return; + } + this._module.append(source, data, function(err) { + this._task = null; + if (this._state.aborted) { + this._shutdown(); + return; + } + if (err) { + this.emit("error", err); + setImmediate(callback); + return; + } + this.emit("entry", data); + this._entriesProcessedCount++; + if (data.stats && data.stats.size) { + this._fsEntriesProcessedBytes += data.stats.size; + } + this.emit("progress", { + entries: { + total: this._entriesCount, + processed: this._entriesProcessedCount + }, + fs: { + totalBytes: this._fsEntriesTotalBytes, + processedBytes: this._fsEntriesProcessedBytes + } + }); + setImmediate(callback); + }.bind(this)); + }; + Archiver.prototype._moduleFinalize = function() { + if (typeof this._module.finalize === "function") { + this._module.finalize(); + } else if (typeof this._module.end === "function") { + this._module.end(); + } else { + this.emit("error", new ArchiverError("NOENDMETHOD")); + } + }; + Archiver.prototype._modulePipe = function() { + this._module.on("error", this._onModuleError.bind(this)); + this._module.pipe(this); + this._state.modulePiped = true; + }; + Archiver.prototype._moduleSupports = function(key) { + if (!this._module.supports || !this._module.supports[key]) { + return false; + } + return this._module.supports[key]; + }; + Archiver.prototype._moduleUnpipe = function() { + this._module.unpipe(this); + this._state.modulePiped = false; + }; + Archiver.prototype._normalizeEntryData = function(data, stats) { + data = util2.defaults(data, { + type: "file", + name: null, + date: null, + mode: null, + prefix: null, + sourcePath: null, + stats: false + }); + if (stats && data.stats === false) { + data.stats = stats; + } + var isDir = data.type === "directory"; + if (data.name) { + if (typeof data.prefix === "string" && "" !== data.prefix) { + data.name = data.prefix + "/" + data.name; + data.prefix = null; + } + data.name = util2.sanitizePath(data.name); + if (data.type !== "symlink" && data.name.slice(-1) === "/") { + isDir = true; + data.type = "directory"; + } else if (isDir) { + data.name += "/"; + } + } + if (typeof data.mode === "number") { + if (win32) { + data.mode &= 511; + } else { + data.mode &= 4095; + } + } else if (data.stats && data.mode === null) { + if (win32) { + data.mode = data.stats.mode & 511; + } else { + data.mode = data.stats.mode & 4095; + } + if (win32 && isDir) { + data.mode = 493; + } + } else if (data.mode === null) { + data.mode = isDir ? 493 : 420; + } + if (data.stats && data.date === null) { + data.date = data.stats.mtime; + } else { + data.date = util2.dateify(data.date); + } + return data; + }; + Archiver.prototype._onModuleError = function(err) { + this.emit("error", err); + }; + Archiver.prototype._onQueueDrain = function() { + if (this._state.finalizing || this._state.finalized || this._state.aborted) { + return; + } + if (this._state.finalize && this._pending === 0 && this._queue.idle() && this._statQueue.idle()) { + this._finalize(); + } + }; + Archiver.prototype._onQueueTask = function(task, callback) { + var fullCallback = () => { + if (task.data.callback) { + task.data.callback(); + } + callback(); + }; + if (this._state.finalizing || this._state.finalized || this._state.aborted) { + fullCallback(); + return; + } + this._task = task; + this._moduleAppend(task.source, task.data, fullCallback); + }; + Archiver.prototype._onStatQueueTask = function(task, callback) { + if (this._state.finalizing || this._state.finalized || this._state.aborted) { + callback(); + return; + } + fs.lstat(task.filepath, function(err, stats) { + if (this._state.aborted) { + setImmediate(callback); + return; + } + if (err) { + this._entriesCount--; + this.emit("warning", err); + setImmediate(callback); + return; + } + task = this._updateQueueTaskWithStats(task, stats); + if (task) { + if (stats.size) { + this._fsEntriesTotalBytes += stats.size; + } + this._queue.push(task); + } + setImmediate(callback); + }.bind(this)); + }; + Archiver.prototype._shutdown = function() { + this._moduleUnpipe(); + this.end(); + }; + Archiver.prototype._transform = function(chunk, encoding, callback) { + if (chunk) { + this._pointer += chunk.length; + } + callback(null, chunk); + }; + Archiver.prototype._updateQueueTaskWithStats = function(task, stats) { + if (stats.isFile()) { + task.data.type = "file"; + task.data.sourceType = "stream"; + task.source = util2.lazyReadStream(task.filepath); + } else if (stats.isDirectory() && this._moduleSupports("directory")) { + task.data.name = util2.trailingSlashIt(task.data.name); + task.data.type = "directory"; + task.data.sourcePath = util2.trailingSlashIt(task.filepath); + task.data.sourceType = "buffer"; + task.source = Buffer.concat([]); + } else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) { + var linkPath = fs.readlinkSync(task.filepath); + var dirName = path.dirname(task.filepath); + task.data.type = "symlink"; + task.data.linkname = path.relative(dirName, path.resolve(dirName, linkPath)); + task.data.sourceType = "buffer"; + task.source = Buffer.concat([]); + } else { + if (stats.isDirectory()) { + this.emit("warning", new ArchiverError("DIRECTORYNOTSUPPORTED", task.data)); + } else if (stats.isSymbolicLink()) { + this.emit("warning", new ArchiverError("SYMLINKNOTSUPPORTED", task.data)); + } else { + this.emit("warning", new ArchiverError("ENTRYNOTSUPPORTED", task.data)); + } + return null; + } + task.data = this._normalizeEntryData(task.data, stats); + return task; + }; + Archiver.prototype.abort = function() { + if (this._state.aborted || this._state.finalized) { + return this; + } + this._abort(); + return this; + }; + Archiver.prototype.append = function(source, data) { + if (this._state.finalize || this._state.aborted) { + this.emit("error", new ArchiverError("QUEUECLOSED")); + return this; + } + data = this._normalizeEntryData(data); + if (typeof data.name !== "string" || data.name.length === 0) { + this.emit("error", new ArchiverError("ENTRYNAMEREQUIRED")); + return this; + } + if (data.type === "directory" && !this._moduleSupports("directory")) { + this.emit("error", new ArchiverError("DIRECTORYNOTSUPPORTED", { name: data.name })); + return this; + } + source = util2.normalizeInputSource(source); + if (Buffer.isBuffer(source)) { + data.sourceType = "buffer"; + } else if (util2.isStream(source)) { + data.sourceType = "stream"; + } else { + this.emit("error", new ArchiverError("INPUTSTEAMBUFFERREQUIRED", { name: data.name })); + return this; + } + this._entriesCount++; + this._queue.push({ + data, + source + }); + return this; + }; + Archiver.prototype.directory = function(dirpath, destpath, data) { + if (this._state.finalize || this._state.aborted) { + this.emit("error", new ArchiverError("QUEUECLOSED")); + return this; + } + if (typeof dirpath !== "string" || dirpath.length === 0) { + this.emit("error", new ArchiverError("DIRECTORYDIRPATHREQUIRED")); + return this; + } + this._pending++; + if (destpath === false) { + destpath = ""; + } else if (typeof destpath !== "string") { + destpath = dirpath; + } + var dataFunction = false; + if (typeof data === "function") { + dataFunction = data; + data = {}; + } else if (typeof data !== "object") { + data = {}; + } + var globOptions = { + stat: true, + dot: true + }; + function onGlobEnd() { + this._pending--; + this._maybeFinalize(); + } + function onGlobError(err) { + this.emit("error", err); + } + function onGlobMatch(match) { + globber.pause(); + var ignoreMatch = false; + var entryData = Object.assign({}, data); + entryData.name = match.relative; + entryData.prefix = destpath; + entryData.stats = match.stat; + entryData.callback = globber.resume.bind(globber); + try { + if (dataFunction) { + entryData = dataFunction(entryData); + if (entryData === false) { + ignoreMatch = true; + } else if (typeof entryData !== "object") { + throw new ArchiverError("DIRECTORYFUNCTIONINVALIDDATA", { dirpath }); + } + } + } catch (e) { + this.emit("error", e); + return; + } + if (ignoreMatch) { + globber.resume(); + return; + } + this._append(match.absolute, entryData); + } + var globber = glob(dirpath, globOptions); + globber.on("error", onGlobError.bind(this)); + globber.on("match", onGlobMatch.bind(this)); + globber.on("end", onGlobEnd.bind(this)); + return this; + }; + Archiver.prototype.file = function(filepath, data) { + if (this._state.finalize || this._state.aborted) { + this.emit("error", new ArchiverError("QUEUECLOSED")); + return this; + } + if (typeof filepath !== "string" || filepath.length === 0) { + this.emit("error", new ArchiverError("FILEFILEPATHREQUIRED")); + return this; + } + this._append(filepath, data); + return this; + }; + Archiver.prototype.glob = function(pattern, options, data) { + this._pending++; + options = util2.defaults(options, { + stat: true, + pattern + }); + function onGlobEnd() { + this._pending--; + this._maybeFinalize(); + } + function onGlobError(err) { + this.emit("error", err); + } + function onGlobMatch(match) { + globber.pause(); + var entryData = Object.assign({}, data); + entryData.callback = globber.resume.bind(globber); + entryData.stats = match.stat; + entryData.name = match.relative; + this._append(match.absolute, entryData); + } + var globber = glob(options.cwd || ".", options); + globber.on("error", onGlobError.bind(this)); + globber.on("match", onGlobMatch.bind(this)); + globber.on("end", onGlobEnd.bind(this)); + return this; + }; + Archiver.prototype.finalize = function() { + if (this._state.aborted) { + var abortedError = new ArchiverError("ABORTED"); + this.emit("error", abortedError); + return Promise.reject(abortedError); + } + if (this._state.finalize) { + var finalizingError = new ArchiverError("FINALIZING"); + this.emit("error", finalizingError); + return Promise.reject(finalizingError); + } + this._state.finalize = true; + if (this._pending === 0 && this._queue.idle() && this._statQueue.idle()) { + this._finalize(); + } + var self2 = this; + return new Promise(function(resolve, reject) { + var errored; + self2._module.on("end", function() { + if (!errored) { + resolve(); + } + }); + self2._module.on("error", function(err) { + errored = true; + reject(err); + }); + }); + }; + Archiver.prototype.setFormat = function(format) { + if (this._format) { + this.emit("error", new ArchiverError("FORMATSET")); + return this; + } + this._format = format; + return this; + }; + Archiver.prototype.setModule = function(module3) { + if (this._state.aborted) { + this.emit("error", new ArchiverError("ABORTED")); + return this; + } + if (this._state.module) { + this.emit("error", new ArchiverError("MODULESET")); + return this; + } + this._module = module3; + this._modulePipe(); + return this; + }; + Archiver.prototype.symlink = function(filepath, target, mode) { + if (this._state.finalize || this._state.aborted) { + this.emit("error", new ArchiverError("QUEUECLOSED")); + return this; + } + if (typeof filepath !== "string" || filepath.length === 0) { + this.emit("error", new ArchiverError("SYMLINKFILEPATHREQUIRED")); + return this; + } + if (typeof target !== "string" || target.length === 0) { + this.emit("error", new ArchiverError("SYMLINKTARGETREQUIRED", { filepath })); + return this; + } + if (!this._moduleSupports("symlink")) { + this.emit("error", new ArchiverError("SYMLINKNOTSUPPORTED", { filepath })); + return this; + } + var data = {}; + data.type = "symlink"; + data.name = filepath.replace(/\\/g, "/"); + data.linkname = target.replace(/\\/g, "/"); + data.sourceType = "buffer"; + if (typeof mode === "number") { + data.mode = mode; + } + this._entriesCount++; + this._queue.push({ + data, + source: Buffer.concat([]) + }); + return this; + }; + Archiver.prototype.pointer = function() { + return this._pointer; + }; + Archiver.prototype.use = function(plugin) { + this._streams.push(plugin); + return this; + }; + module2.exports = Archiver; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/archive-entry.js +var require_archive_entry = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/archive-entry.js"(exports2, module2) { + var ArchiveEntry = module2.exports = function() { + }; + ArchiveEntry.prototype.getName = function() { + }; + ArchiveEntry.prototype.getSize = function() { + }; + ArchiveEntry.prototype.getLastModifiedDate = function() { + }; + ArchiveEntry.prototype.isDirectory = function() { + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/util.js +var require_util4 = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/util.js"(exports2, module2) { + var util2 = module2.exports = {}; + util2.dateToDos = function(d, forceLocalTime) { + forceLocalTime = forceLocalTime || false; + var year = forceLocalTime ? d.getFullYear() : d.getUTCFullYear(); + if (year < 1980) { + return 2162688; + } else if (year >= 2044) { + return 2141175677; + } + var val = { + year, + month: forceLocalTime ? d.getMonth() : d.getUTCMonth(), + date: forceLocalTime ? d.getDate() : d.getUTCDate(), + hours: forceLocalTime ? d.getHours() : d.getUTCHours(), + minutes: forceLocalTime ? d.getMinutes() : d.getUTCMinutes(), + seconds: forceLocalTime ? d.getSeconds() : d.getUTCSeconds() + }; + return val.year - 1980 << 25 | val.month + 1 << 21 | val.date << 16 | val.hours << 11 | val.minutes << 5 | val.seconds / 2; + }; + util2.dosToDate = function(dos) { + return new Date((dos >> 25 & 127) + 1980, (dos >> 21 & 15) - 1, dos >> 16 & 31, dos >> 11 & 31, dos >> 5 & 63, (dos & 31) << 1); + }; + util2.fromDosTime = function(buf) { + return util2.dosToDate(buf.readUInt32LE(0)); + }; + util2.getEightBytes = function(v) { + var buf = Buffer.alloc(8); + buf.writeUInt32LE(v % 4294967296, 0); + buf.writeUInt32LE(v / 4294967296 | 0, 4); + return buf; + }; + util2.getShortBytes = function(v) { + var buf = Buffer.alloc(2); + buf.writeUInt16LE((v & 65535) >>> 0, 0); + return buf; + }; + util2.getShortBytesValue = function(buf, offset) { + return buf.readUInt16LE(offset); + }; + util2.getLongBytes = function(v) { + var buf = Buffer.alloc(4); + buf.writeUInt32LE((v & 4294967295) >>> 0, 0); + return buf; + }; + util2.getLongBytesValue = function(buf, offset) { + return buf.readUInt32LE(offset); + }; + util2.toDosTime = function(d) { + return util2.getLongBytes(util2.dateToDos(d)); + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js +var require_general_purpose_bit = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js"(exports2, module2) { + var zipUtil = require_util4(); + var DATA_DESCRIPTOR_FLAG = 1 << 3; + var ENCRYPTION_FLAG = 1 << 0; + var NUMBER_OF_SHANNON_FANO_TREES_FLAG = 1 << 2; + var SLIDING_DICTIONARY_SIZE_FLAG = 1 << 1; + var STRONG_ENCRYPTION_FLAG = 1 << 6; + var UFT8_NAMES_FLAG = 1 << 11; + var GeneralPurposeBit = module2.exports = function() { + if (!(this instanceof GeneralPurposeBit)) { + return new GeneralPurposeBit(); + } + this.descriptor = false; + this.encryption = false; + this.utf8 = false; + this.numberOfShannonFanoTrees = 0; + this.strongEncryption = false; + this.slidingDictionarySize = 0; + return this; + }; + GeneralPurposeBit.prototype.encode = function() { + return zipUtil.getShortBytes( + (this.descriptor ? DATA_DESCRIPTOR_FLAG : 0) | (this.utf8 ? UFT8_NAMES_FLAG : 0) | (this.encryption ? ENCRYPTION_FLAG : 0) | (this.strongEncryption ? STRONG_ENCRYPTION_FLAG : 0) + ); + }; + GeneralPurposeBit.prototype.parse = function(buf, offset) { + var flag = zipUtil.getShortBytesValue(buf, offset); + var gbp = new GeneralPurposeBit(); + gbp.useDataDescriptor((flag & DATA_DESCRIPTOR_FLAG) !== 0); + gbp.useUTF8ForNames((flag & UFT8_NAMES_FLAG) !== 0); + gbp.useStrongEncryption((flag & STRONG_ENCRYPTION_FLAG) !== 0); + gbp.useEncryption((flag & ENCRYPTION_FLAG) !== 0); + gbp.setSlidingDictionarySize((flag & SLIDING_DICTIONARY_SIZE_FLAG) !== 0 ? 8192 : 4096); + gbp.setNumberOfShannonFanoTrees((flag & NUMBER_OF_SHANNON_FANO_TREES_FLAG) !== 0 ? 3 : 2); + return gbp; + }; + GeneralPurposeBit.prototype.setNumberOfShannonFanoTrees = function(n) { + this.numberOfShannonFanoTrees = n; + }; + GeneralPurposeBit.prototype.getNumberOfShannonFanoTrees = function() { + return this.numberOfShannonFanoTrees; + }; + GeneralPurposeBit.prototype.setSlidingDictionarySize = function(n) { + this.slidingDictionarySize = n; + }; + GeneralPurposeBit.prototype.getSlidingDictionarySize = function() { + return this.slidingDictionarySize; + }; + GeneralPurposeBit.prototype.useDataDescriptor = function(b) { + this.descriptor = b; + }; + GeneralPurposeBit.prototype.usesDataDescriptor = function() { + return this.descriptor; + }; + GeneralPurposeBit.prototype.useEncryption = function(b) { + this.encryption = b; + }; + GeneralPurposeBit.prototype.usesEncryption = function() { + return this.encryption; + }; + GeneralPurposeBit.prototype.useStrongEncryption = function(b) { + this.strongEncryption = b; + }; + GeneralPurposeBit.prototype.usesStrongEncryption = function() { + return this.strongEncryption; + }; + GeneralPurposeBit.prototype.useUTF8ForNames = function(b) { + this.utf8 = b; + }; + GeneralPurposeBit.prototype.usesUTF8ForNames = function() { + return this.utf8; + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/unix-stat.js +var require_unix_stat = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/unix-stat.js"(exports2, module2) { + module2.exports = { + /** + * Bits used for permissions (and sticky bit) + */ + PERM_MASK: 4095, + // 07777 + /** + * Bits used to indicate the filesystem object type. + */ + FILE_TYPE_FLAG: 61440, + // 0170000 + /** + * Indicates symbolic links. + */ + LINK_FLAG: 40960, + // 0120000 + /** + * Indicates plain files. + */ + FILE_FLAG: 32768, + // 0100000 + /** + * Indicates directories. + */ + DIR_FLAG: 16384, + // 040000 + // ---------------------------------------------------------- + // somewhat arbitrary choices that are quite common for shared + // installations + // ----------------------------------------------------------- + /** + * Default permissions for symbolic links. + */ + DEFAULT_LINK_PERM: 511, + // 0777 + /** + * Default permissions for directories. + */ + DEFAULT_DIR_PERM: 493, + // 0755 + /** + * Default permissions for plain files. + */ + DEFAULT_FILE_PERM: 420 + // 0644 + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/constants.js +var require_constants14 = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/constants.js"(exports2, module2) { + module2.exports = { + WORD: 4, + DWORD: 8, + EMPTY: Buffer.alloc(0), + SHORT: 2, + SHORT_MASK: 65535, + SHORT_SHIFT: 16, + SHORT_ZERO: Buffer.from(Array(2)), + LONG: 4, + LONG_ZERO: Buffer.from(Array(4)), + MIN_VERSION_INITIAL: 10, + MIN_VERSION_DATA_DESCRIPTOR: 20, + MIN_VERSION_ZIP64: 45, + VERSION_MADEBY: 45, + METHOD_STORED: 0, + METHOD_DEFLATED: 8, + PLATFORM_UNIX: 3, + PLATFORM_FAT: 0, + SIG_LFH: 67324752, + SIG_DD: 134695760, + SIG_CFH: 33639248, + SIG_EOCD: 101010256, + SIG_ZIP64_EOCD: 101075792, + SIG_ZIP64_EOCD_LOC: 117853008, + ZIP64_MAGIC_SHORT: 65535, + ZIP64_MAGIC: 4294967295, + ZIP64_EXTRA_ID: 1, + ZLIB_NO_COMPRESSION: 0, + ZLIB_BEST_SPEED: 1, + ZLIB_BEST_COMPRESSION: 9, + ZLIB_DEFAULT_COMPRESSION: -1, + MODE_MASK: 4095, + DEFAULT_FILE_MODE: 33188, + // 010644 = -rw-r--r-- = S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH + DEFAULT_DIR_MODE: 16877, + // 040755 = drwxr-xr-x = S_IFDIR | S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH + EXT_FILE_ATTR_DIR: 1106051088, + // 010173200020 = drwxr-xr-x = (((S_IFDIR | 0755) << 16) | S_DOS_D) + EXT_FILE_ATTR_FILE: 2175008800, + // 020151000040 = -rw-r--r-- = (((S_IFREG | 0644) << 16) | S_DOS_A) >>> 0 + // Unix file types + S_IFMT: 61440, + // 0170000 type of file mask + S_IFIFO: 4096, + // 010000 named pipe (fifo) + S_IFCHR: 8192, + // 020000 character special + S_IFDIR: 16384, + // 040000 directory + S_IFBLK: 24576, + // 060000 block special + S_IFREG: 32768, + // 0100000 regular + S_IFLNK: 40960, + // 0120000 symbolic link + S_IFSOCK: 49152, + // 0140000 socket + // DOS file type flags + S_DOS_A: 32, + // 040 Archive + S_DOS_D: 16, + // 020 Directory + S_DOS_V: 8, + // 010 Volume + S_DOS_S: 4, + // 04 System + S_DOS_H: 2, + // 02 Hidden + S_DOS_R: 1 + // 01 Read Only + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js +var require_zip_archive_entry = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js"(exports2, module2) { + var inherits2 = require("util").inherits; + var normalizePath = require_normalize_path(); + var ArchiveEntry = require_archive_entry(); + var GeneralPurposeBit = require_general_purpose_bit(); + var UnixStat = require_unix_stat(); + var constants = require_constants14(); + var zipUtil = require_util4(); + var ZipArchiveEntry = module2.exports = function(name) { + if (!(this instanceof ZipArchiveEntry)) { + return new ZipArchiveEntry(name); + } + ArchiveEntry.call(this); + this.platform = constants.PLATFORM_FAT; + this.method = -1; + this.name = null; + this.size = 0; + this.csize = 0; + this.gpb = new GeneralPurposeBit(); + this.crc = 0; + this.time = -1; + this.minver = constants.MIN_VERSION_INITIAL; + this.mode = -1; + this.extra = null; + this.exattr = 0; + this.inattr = 0; + this.comment = null; + if (name) { + this.setName(name); + } + }; + inherits2(ZipArchiveEntry, ArchiveEntry); + ZipArchiveEntry.prototype.getCentralDirectoryExtra = function() { + return this.getExtra(); + }; + ZipArchiveEntry.prototype.getComment = function() { + return this.comment !== null ? this.comment : ""; + }; + ZipArchiveEntry.prototype.getCompressedSize = function() { + return this.csize; + }; + ZipArchiveEntry.prototype.getCrc = function() { + return this.crc; + }; + ZipArchiveEntry.prototype.getExternalAttributes = function() { + return this.exattr; + }; + ZipArchiveEntry.prototype.getExtra = function() { + return this.extra !== null ? this.extra : constants.EMPTY; + }; + ZipArchiveEntry.prototype.getGeneralPurposeBit = function() { + return this.gpb; + }; + ZipArchiveEntry.prototype.getInternalAttributes = function() { + return this.inattr; + }; + ZipArchiveEntry.prototype.getLastModifiedDate = function() { + return this.getTime(); + }; + ZipArchiveEntry.prototype.getLocalFileDataExtra = function() { + return this.getExtra(); + }; + ZipArchiveEntry.prototype.getMethod = function() { + return this.method; + }; + ZipArchiveEntry.prototype.getName = function() { + return this.name; + }; + ZipArchiveEntry.prototype.getPlatform = function() { + return this.platform; + }; + ZipArchiveEntry.prototype.getSize = function() { + return this.size; + }; + ZipArchiveEntry.prototype.getTime = function() { + return this.time !== -1 ? zipUtil.dosToDate(this.time) : -1; + }; + ZipArchiveEntry.prototype.getTimeDos = function() { + return this.time !== -1 ? this.time : 0; + }; + ZipArchiveEntry.prototype.getUnixMode = function() { + return this.platform !== constants.PLATFORM_UNIX ? 0 : this.getExternalAttributes() >> constants.SHORT_SHIFT & constants.SHORT_MASK; + }; + ZipArchiveEntry.prototype.getVersionNeededToExtract = function() { + return this.minver; + }; + ZipArchiveEntry.prototype.setComment = function(comment) { + if (Buffer.byteLength(comment) !== comment.length) { + this.getGeneralPurposeBit().useUTF8ForNames(true); + } + this.comment = comment; + }; + ZipArchiveEntry.prototype.setCompressedSize = function(size) { + if (size < 0) { + throw new Error("invalid entry compressed size"); + } + this.csize = size; + }; + ZipArchiveEntry.prototype.setCrc = function(crc) { + if (crc < 0) { + throw new Error("invalid entry crc32"); + } + this.crc = crc; + }; + ZipArchiveEntry.prototype.setExternalAttributes = function(attr) { + this.exattr = attr >>> 0; + }; + ZipArchiveEntry.prototype.setExtra = function(extra) { + this.extra = extra; + }; + ZipArchiveEntry.prototype.setGeneralPurposeBit = function(gpb) { + if (!(gpb instanceof GeneralPurposeBit)) { + throw new Error("invalid entry GeneralPurposeBit"); + } + this.gpb = gpb; + }; + ZipArchiveEntry.prototype.setInternalAttributes = function(attr) { + this.inattr = attr; + }; + ZipArchiveEntry.prototype.setMethod = function(method) { + if (method < 0) { + throw new Error("invalid entry compression method"); + } + this.method = method; + }; + ZipArchiveEntry.prototype.setName = function(name, prependSlash = false) { + name = normalizePath(name, false).replace(/^\w+:/, "").replace(/^(\.\.\/|\/)+/, ""); + if (prependSlash) { + name = `/${name}`; + } + if (Buffer.byteLength(name) !== name.length) { + this.getGeneralPurposeBit().useUTF8ForNames(true); + } + this.name = name; + }; + ZipArchiveEntry.prototype.setPlatform = function(platform) { + this.platform = platform; + }; + ZipArchiveEntry.prototype.setSize = function(size) { + if (size < 0) { + throw new Error("invalid entry size"); + } + this.size = size; + }; + ZipArchiveEntry.prototype.setTime = function(time, forceLocalTime) { + if (!(time instanceof Date)) { + throw new Error("invalid entry time"); + } + this.time = zipUtil.dateToDos(time, forceLocalTime); + }; + ZipArchiveEntry.prototype.setUnixMode = function(mode) { + mode |= this.isDirectory() ? constants.S_IFDIR : constants.S_IFREG; + var extattr = 0; + extattr |= mode << constants.SHORT_SHIFT | (this.isDirectory() ? constants.S_DOS_D : constants.S_DOS_A); + this.setExternalAttributes(extattr); + this.mode = mode & constants.MODE_MASK; + this.platform = constants.PLATFORM_UNIX; + }; + ZipArchiveEntry.prototype.setVersionNeededToExtract = function(minver) { + this.minver = minver; + }; + ZipArchiveEntry.prototype.isDirectory = function() { + return this.getName().slice(-1) === "/"; + }; + ZipArchiveEntry.prototype.isUnixSymlink = function() { + return (this.getUnixMode() & UnixStat.FILE_TYPE_FLAG) === UnixStat.LINK_FLAG; + }; + ZipArchiveEntry.prototype.isZip64 = function() { + return this.csize > constants.ZIP64_MAGIC || this.size > constants.ZIP64_MAGIC; + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/util/index.js +var require_util5 = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/util/index.js"(exports2, module2) { + var Stream = require("stream").Stream; + var PassThrough = require_readable().PassThrough; + var util2 = module2.exports = {}; + util2.isStream = function(source) { + return source instanceof Stream; + }; + util2.normalizeInputSource = function(source) { + if (source === null) { + return Buffer.alloc(0); + } else if (typeof source === "string") { + return Buffer.from(source); + } else if (util2.isStream(source) && !source._readableState) { + var normalized = new PassThrough(); + source.pipe(normalized); + return normalized; + } + return source; + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/archive-output-stream.js +var require_archive_output_stream = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/archive-output-stream.js"(exports2, module2) { + var inherits2 = require("util").inherits; + var Transform = require_readable().Transform; + var ArchiveEntry = require_archive_entry(); + var util2 = require_util5(); + var ArchiveOutputStream = module2.exports = function(options) { + if (!(this instanceof ArchiveOutputStream)) { + return new ArchiveOutputStream(options); + } + Transform.call(this, options); + this.offset = 0; + this._archive = { + finish: false, + finished: false, + processing: false + }; + }; + inherits2(ArchiveOutputStream, Transform); + ArchiveOutputStream.prototype._appendBuffer = function(zae, source, callback) { + }; + ArchiveOutputStream.prototype._appendStream = function(zae, source, callback) { + }; + ArchiveOutputStream.prototype._emitErrorCallback = function(err) { + if (err) { + this.emit("error", err); + } + }; + ArchiveOutputStream.prototype._finish = function(ae) { + }; + ArchiveOutputStream.prototype._normalizeEntry = function(ae) { + }; + ArchiveOutputStream.prototype._transform = function(chunk, encoding, callback) { + callback(null, chunk); + }; + ArchiveOutputStream.prototype.entry = function(ae, source, callback) { + source = source || null; + if (typeof callback !== "function") { + callback = this._emitErrorCallback.bind(this); + } + if (!(ae instanceof ArchiveEntry)) { + callback(new Error("not a valid instance of ArchiveEntry")); + return; + } + if (this._archive.finish || this._archive.finished) { + callback(new Error("unacceptable entry after finish")); + return; + } + if (this._archive.processing) { + callback(new Error("already processing an entry")); + return; + } + this._archive.processing = true; + this._normalizeEntry(ae); + this._entry = ae; + source = util2.normalizeInputSource(source); + if (Buffer.isBuffer(source)) { + this._appendBuffer(ae, source, callback); + } else if (util2.isStream(source)) { + this._appendStream(ae, source, callback); + } else { + this._archive.processing = false; + callback(new Error("input source must be valid Stream or Buffer instance")); + return; + } + return this; + }; + ArchiveOutputStream.prototype.finish = function() { + if (this._archive.processing) { + this._archive.finish = true; + return; + } + this._finish(); + }; + ArchiveOutputStream.prototype.getBytesWritten = function() { + return this.offset; + }; + ArchiveOutputStream.prototype.write = function(chunk, cb) { + if (chunk) { + this.offset += chunk.length; + } + return Transform.prototype.write.call(this, chunk, cb); + }; + } +}); + +// ../../node_modules/.pnpm/buffer-crc32@0.2.13/node_modules/buffer-crc32/index.js +var require_buffer_crc32 = __commonJS({ + "../../node_modules/.pnpm/buffer-crc32@0.2.13/node_modules/buffer-crc32/index.js"(exports2, module2) { + var Buffer2 = require("buffer").Buffer; + var CRC_TABLE = [ + 0, + 1996959894, + 3993919788, + 2567524794, + 124634137, + 1886057615, + 3915621685, + 2657392035, + 249268274, + 2044508324, + 3772115230, + 2547177864, + 162941995, + 2125561021, + 3887607047, + 2428444049, + 498536548, + 1789927666, + 4089016648, + 2227061214, + 450548861, + 1843258603, + 4107580753, + 2211677639, + 325883990, + 1684777152, + 4251122042, + 2321926636, + 335633487, + 1661365465, + 4195302755, + 2366115317, + 997073096, + 1281953886, + 3579855332, + 2724688242, + 1006888145, + 1258607687, + 3524101629, + 2768942443, + 901097722, + 1119000684, + 3686517206, + 2898065728, + 853044451, + 1172266101, + 3705015759, + 2882616665, + 651767980, + 1373503546, + 3369554304, + 3218104598, + 565507253, + 1454621731, + 3485111705, + 3099436303, + 671266974, + 1594198024, + 3322730930, + 2970347812, + 795835527, + 1483230225, + 3244367275, + 3060149565, + 1994146192, + 31158534, + 2563907772, + 4023717930, + 1907459465, + 112637215, + 2680153253, + 3904427059, + 2013776290, + 251722036, + 2517215374, + 3775830040, + 2137656763, + 141376813, + 2439277719, + 3865271297, + 1802195444, + 476864866, + 2238001368, + 4066508878, + 1812370925, + 453092731, + 2181625025, + 4111451223, + 1706088902, + 314042704, + 2344532202, + 4240017532, + 1658658271, + 366619977, + 2362670323, + 4224994405, + 1303535960, + 984961486, + 2747007092, + 3569037538, + 1256170817, + 1037604311, + 2765210733, + 3554079995, + 1131014506, + 879679996, + 2909243462, + 3663771856, + 1141124467, + 855842277, + 2852801631, + 3708648649, + 1342533948, + 654459306, + 3188396048, + 3373015174, + 1466479909, + 544179635, + 3110523913, + 3462522015, + 1591671054, + 702138776, + 2966460450, + 3352799412, + 1504918807, + 783551873, + 3082640443, + 3233442989, + 3988292384, + 2596254646, + 62317068, + 1957810842, + 3939845945, + 2647816111, + 81470997, + 1943803523, + 3814918930, + 2489596804, + 225274430, + 2053790376, + 3826175755, + 2466906013, + 167816743, + 2097651377, + 4027552580, + 2265490386, + 503444072, + 1762050814, + 4150417245, + 2154129355, + 426522225, + 1852507879, + 4275313526, + 2312317920, + 282753626, + 1742555852, + 4189708143, + 2394877945, + 397917763, + 1622183637, + 3604390888, + 2714866558, + 953729732, + 1340076626, + 3518719985, + 2797360999, + 1068828381, + 1219638859, + 3624741850, + 2936675148, + 906185462, + 1090812512, + 3747672003, + 2825379669, + 829329135, + 1181335161, + 3412177804, + 3160834842, + 628085408, + 1382605366, + 3423369109, + 3138078467, + 570562233, + 1426400815, + 3317316542, + 2998733608, + 733239954, + 1555261956, + 3268935591, + 3050360625, + 752459403, + 1541320221, + 2607071920, + 3965973030, + 1969922972, + 40735498, + 2617837225, + 3943577151, + 1913087877, + 83908371, + 2512341634, + 3803740692, + 2075208622, + 213261112, + 2463272603, + 3855990285, + 2094854071, + 198958881, + 2262029012, + 4057260610, + 1759359992, + 534414190, + 2176718541, + 4139329115, + 1873836001, + 414664567, + 2282248934, + 4279200368, + 1711684554, + 285281116, + 2405801727, + 4167216745, + 1634467795, + 376229701, + 2685067896, + 3608007406, + 1308918612, + 956543938, + 2808555105, + 3495958263, + 1231636301, + 1047427035, + 2932959818, + 3654703836, + 1088359270, + 936918e3, + 2847714899, + 3736837829, + 1202900863, + 817233897, + 3183342108, + 3401237130, + 1404277552, + 615818150, + 3134207493, + 3453421203, + 1423857449, + 601450431, + 3009837614, + 3294710456, + 1567103746, + 711928724, + 3020668471, + 3272380065, + 1510334235, + 755167117 + ]; + if (typeof Int32Array !== "undefined") { + CRC_TABLE = new Int32Array(CRC_TABLE); + } + function ensureBuffer(input) { + if (Buffer2.isBuffer(input)) { + return input; + } + var hasNewBufferAPI = typeof Buffer2.alloc === "function" && typeof Buffer2.from === "function"; + if (typeof input === "number") { + return hasNewBufferAPI ? Buffer2.alloc(input) : new Buffer2(input); + } else if (typeof input === "string") { + return hasNewBufferAPI ? Buffer2.from(input) : new Buffer2(input); + } else { + throw new Error("input must be buffer, number, or string, received " + typeof input); + } + } + function bufferizeInt(num) { + var tmp = ensureBuffer(4); + tmp.writeInt32BE(num, 0); + return tmp; + } + function _crc32(buf, previous) { + buf = ensureBuffer(buf); + if (Buffer2.isBuffer(previous)) { + previous = previous.readUInt32BE(0); + } + var crc = ~~previous ^ -1; + for (var n = 0; n < buf.length; n++) { + crc = CRC_TABLE[(crc ^ buf[n]) & 255] ^ crc >>> 8; + } + return crc ^ -1; + } + function crc32() { + return bufferizeInt(_crc32.apply(null, arguments)); + } + crc32.signed = function() { + return _crc32.apply(null, arguments); + }; + crc32.unsigned = function() { + return _crc32.apply(null, arguments) >>> 0; + }; + module2.exports = crc32; + } +}); + +// ../../node_modules/.pnpm/crc-32@1.2.2/node_modules/crc-32/crc32.js +var require_crc323 = __commonJS({ + "../../node_modules/.pnpm/crc-32@1.2.2/node_modules/crc-32/crc32.js"(exports2) { + var CRC32; + (function(factory) { + if (typeof DO_NOT_EXPORT_CRC === "undefined") { + if ("object" === typeof exports2) { + factory(exports2); + } else if ("function" === typeof define && define.amd) { + define(function() { + var module3 = {}; + factory(module3); + return module3; + }); + } else { + factory(CRC32 = {}); + } + } else { + factory(CRC32 = {}); + } + })(function(CRC322) { + CRC322.version = "1.2.2"; + function signed_crc_table() { + var c = 0, table = new Array(256); + for (var n = 0; n != 256; ++n) { + c = n; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + table[n] = c; + } + return typeof Int32Array !== "undefined" ? new Int32Array(table) : table; + } + var T0 = signed_crc_table(); + function slice_by_16_tables(T) { + var c = 0, v = 0, n = 0, table = typeof Int32Array !== "undefined" ? new Int32Array(4096) : new Array(4096); + for (n = 0; n != 256; ++n) table[n] = T[n]; + for (n = 0; n != 256; ++n) { + v = T[n]; + for (c = 256 + n; c < 4096; c += 256) v = table[c] = v >>> 8 ^ T[v & 255]; + } + var out = []; + for (n = 1; n != 16; ++n) out[n - 1] = typeof Int32Array !== "undefined" ? table.subarray(n * 256, n * 256 + 256) : table.slice(n * 256, n * 256 + 256); + return out; + } + var TT = slice_by_16_tables(T0); + var T1 = TT[0], T2 = TT[1], T3 = TT[2], T4 = TT[3], T5 = TT[4]; + var T6 = TT[5], T7 = TT[6], T8 = TT[7], T9 = TT[8], Ta = TT[9]; + var Tb = TT[10], Tc = TT[11], Td = TT[12], Te = TT[13], Tf = TT[14]; + function crc32_bstr(bstr, seed) { + var C = seed ^ -1; + for (var i = 0, L = bstr.length; i < L; ) C = C >>> 8 ^ T0[(C ^ bstr.charCodeAt(i++)) & 255]; + return ~C; + } + function crc32_buf(B, seed) { + var C = seed ^ -1, L = B.length - 15, i = 0; + for (; i < L; ) C = Tf[B[i++] ^ C & 255] ^ Te[B[i++] ^ C >> 8 & 255] ^ Td[B[i++] ^ C >> 16 & 255] ^ Tc[B[i++] ^ C >>> 24] ^ Tb[B[i++]] ^ Ta[B[i++]] ^ T9[B[i++]] ^ T8[B[i++]] ^ T7[B[i++]] ^ T6[B[i++]] ^ T5[B[i++]] ^ T4[B[i++]] ^ T3[B[i++]] ^ T2[B[i++]] ^ T1[B[i++]] ^ T0[B[i++]]; + L += 15; + while (i < L) C = C >>> 8 ^ T0[(C ^ B[i++]) & 255]; + return ~C; + } + function crc32_str(str, seed) { + var C = seed ^ -1; + for (var i = 0, L = str.length, c = 0, d = 0; i < L; ) { + c = str.charCodeAt(i++); + if (c < 128) { + C = C >>> 8 ^ T0[(C ^ c) & 255]; + } else if (c < 2048) { + C = C >>> 8 ^ T0[(C ^ (192 | c >> 6 & 31)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | c & 63)) & 255]; + } else if (c >= 55296 && c < 57344) { + c = (c & 1023) + 64; + d = str.charCodeAt(i++) & 1023; + C = C >>> 8 ^ T0[(C ^ (240 | c >> 8 & 7)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | c >> 2 & 63)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | d >> 6 & 15 | (c & 3) << 4)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | d & 63)) & 255]; + } else { + C = C >>> 8 ^ T0[(C ^ (224 | c >> 12 & 15)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | c >> 6 & 63)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | c & 63)) & 255]; + } + } + return ~C; + } + CRC322.table = T0; + CRC322.bstr = crc32_bstr; + CRC322.buf = crc32_buf; + CRC322.str = crc32_str; + }); + } +}); + +// ../../node_modules/.pnpm/crc32-stream@4.0.3/node_modules/crc32-stream/lib/crc32-stream.js +var require_crc32_stream = __commonJS({ + "../../node_modules/.pnpm/crc32-stream@4.0.3/node_modules/crc32-stream/lib/crc32-stream.js"(exports2, module2) { + "use strict"; + var { Transform } = require_readable(); + var crc32 = require_crc323(); + var CRC32Stream = class extends Transform { + constructor(options) { + super(options); + this.checksum = Buffer.allocUnsafe(4); + this.checksum.writeInt32BE(0, 0); + this.rawSize = 0; + } + _transform(chunk, encoding, callback) { + if (chunk) { + this.checksum = crc32.buf(chunk, this.checksum) >>> 0; + this.rawSize += chunk.length; + } + callback(null, chunk); + } + digest(encoding) { + const checksum = Buffer.allocUnsafe(4); + checksum.writeUInt32BE(this.checksum >>> 0, 0); + return encoding ? checksum.toString(encoding) : checksum; + } + hex() { + return this.digest("hex").toUpperCase(); + } + size() { + return this.rawSize; + } + }; + module2.exports = CRC32Stream; + } +}); + +// ../../node_modules/.pnpm/crc32-stream@4.0.3/node_modules/crc32-stream/lib/deflate-crc32-stream.js +var require_deflate_crc32_stream = __commonJS({ + "../../node_modules/.pnpm/crc32-stream@4.0.3/node_modules/crc32-stream/lib/deflate-crc32-stream.js"(exports2, module2) { + "use strict"; + var { DeflateRaw } = require("zlib"); + var crc32 = require_crc323(); + var DeflateCRC32Stream = class extends DeflateRaw { + constructor(options) { + super(options); + this.checksum = Buffer.allocUnsafe(4); + this.checksum.writeInt32BE(0, 0); + this.rawSize = 0; + this.compressedSize = 0; + } + push(chunk, encoding) { + if (chunk) { + this.compressedSize += chunk.length; + } + return super.push(chunk, encoding); + } + _transform(chunk, encoding, callback) { + if (chunk) { + this.checksum = crc32.buf(chunk, this.checksum) >>> 0; + this.rawSize += chunk.length; + } + super._transform(chunk, encoding, callback); + } + digest(encoding) { + const checksum = Buffer.allocUnsafe(4); + checksum.writeUInt32BE(this.checksum >>> 0, 0); + return encoding ? checksum.toString(encoding) : checksum; + } + hex() { + return this.digest("hex").toUpperCase(); + } + size(compressed = false) { + if (compressed) { + return this.compressedSize; + } else { + return this.rawSize; + } + } + }; + module2.exports = DeflateCRC32Stream; + } +}); + +// ../../node_modules/.pnpm/crc32-stream@4.0.3/node_modules/crc32-stream/lib/index.js +var require_lib13 = __commonJS({ + "../../node_modules/.pnpm/crc32-stream@4.0.3/node_modules/crc32-stream/lib/index.js"(exports2, module2) { + "use strict"; + module2.exports = { + CRC32Stream: require_crc32_stream(), + DeflateCRC32Stream: require_deflate_crc32_stream() + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js +var require_zip_archive_output_stream = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js"(exports2, module2) { + var inherits2 = require("util").inherits; + var crc32 = require_buffer_crc32(); + var { CRC32Stream } = require_lib13(); + var { DeflateCRC32Stream } = require_lib13(); + var ArchiveOutputStream = require_archive_output_stream(); + var ZipArchiveEntry = require_zip_archive_entry(); + var GeneralPurposeBit = require_general_purpose_bit(); + var constants = require_constants14(); + var util2 = require_util5(); + var zipUtil = require_util4(); + var ZipArchiveOutputStream = module2.exports = function(options) { + if (!(this instanceof ZipArchiveOutputStream)) { + return new ZipArchiveOutputStream(options); + } + options = this.options = this._defaults(options); + ArchiveOutputStream.call(this, options); + this._entry = null; + this._entries = []; + this._archive = { + centralLength: 0, + centralOffset: 0, + comment: "", + finish: false, + finished: false, + processing: false, + forceZip64: options.forceZip64, + forceLocalTime: options.forceLocalTime + }; + }; + inherits2(ZipArchiveOutputStream, ArchiveOutputStream); + ZipArchiveOutputStream.prototype._afterAppend = function(ae) { + this._entries.push(ae); + if (ae.getGeneralPurposeBit().usesDataDescriptor()) { + this._writeDataDescriptor(ae); + } + this._archive.processing = false; + this._entry = null; + if (this._archive.finish && !this._archive.finished) { + this._finish(); + } + }; + ZipArchiveOutputStream.prototype._appendBuffer = function(ae, source, callback) { + if (source.length === 0) { + ae.setMethod(constants.METHOD_STORED); + } + var method = ae.getMethod(); + if (method === constants.METHOD_STORED) { + ae.setSize(source.length); + ae.setCompressedSize(source.length); + ae.setCrc(crc32.unsigned(source)); + } + this._writeLocalFileHeader(ae); + if (method === constants.METHOD_STORED) { + this.write(source); + this._afterAppend(ae); + callback(null, ae); + return; + } else if (method === constants.METHOD_DEFLATED) { + this._smartStream(ae, callback).end(source); + return; + } else { + callback(new Error("compression method " + method + " not implemented")); + return; + } + }; + ZipArchiveOutputStream.prototype._appendStream = function(ae, source, callback) { + ae.getGeneralPurposeBit().useDataDescriptor(true); + ae.setVersionNeededToExtract(constants.MIN_VERSION_DATA_DESCRIPTOR); + this._writeLocalFileHeader(ae); + var smart = this._smartStream(ae, callback); + source.once("error", function(err) { + smart.emit("error", err); + smart.end(); + }); + source.pipe(smart); + }; + ZipArchiveOutputStream.prototype._defaults = function(o) { + if (typeof o !== "object") { + o = {}; + } + if (typeof o.zlib !== "object") { + o.zlib = {}; + } + if (typeof o.zlib.level !== "number") { + o.zlib.level = constants.ZLIB_BEST_SPEED; + } + o.forceZip64 = !!o.forceZip64; + o.forceLocalTime = !!o.forceLocalTime; + return o; + }; + ZipArchiveOutputStream.prototype._finish = function() { + this._archive.centralOffset = this.offset; + this._entries.forEach(function(ae) { + this._writeCentralFileHeader(ae); + }.bind(this)); + this._archive.centralLength = this.offset - this._archive.centralOffset; + if (this.isZip64()) { + this._writeCentralDirectoryZip64(); + } + this._writeCentralDirectoryEnd(); + this._archive.processing = false; + this._archive.finish = true; + this._archive.finished = true; + this.end(); + }; + ZipArchiveOutputStream.prototype._normalizeEntry = function(ae) { + if (ae.getMethod() === -1) { + ae.setMethod(constants.METHOD_DEFLATED); + } + if (ae.getMethod() === constants.METHOD_DEFLATED) { + ae.getGeneralPurposeBit().useDataDescriptor(true); + ae.setVersionNeededToExtract(constants.MIN_VERSION_DATA_DESCRIPTOR); + } + if (ae.getTime() === -1) { + ae.setTime(/* @__PURE__ */ new Date(), this._archive.forceLocalTime); + } + ae._offsets = { + file: 0, + data: 0, + contents: 0 + }; + }; + ZipArchiveOutputStream.prototype._smartStream = function(ae, callback) { + var deflate = ae.getMethod() === constants.METHOD_DEFLATED; + var process3 = deflate ? new DeflateCRC32Stream(this.options.zlib) : new CRC32Stream(); + var error = null; + function handleStuff() { + var digest = process3.digest().readUInt32BE(0); + ae.setCrc(digest); + ae.setSize(process3.size()); + ae.setCompressedSize(process3.size(true)); + this._afterAppend(ae); + callback(error, ae); + } + process3.once("end", handleStuff.bind(this)); + process3.once("error", function(err) { + error = err; + }); + process3.pipe(this, { end: false }); + return process3; + }; + ZipArchiveOutputStream.prototype._writeCentralDirectoryEnd = function() { + var records = this._entries.length; + var size = this._archive.centralLength; + var offset = this._archive.centralOffset; + if (this.isZip64()) { + records = constants.ZIP64_MAGIC_SHORT; + size = constants.ZIP64_MAGIC; + offset = constants.ZIP64_MAGIC; + } + this.write(zipUtil.getLongBytes(constants.SIG_EOCD)); + this.write(constants.SHORT_ZERO); + this.write(constants.SHORT_ZERO); + this.write(zipUtil.getShortBytes(records)); + this.write(zipUtil.getShortBytes(records)); + this.write(zipUtil.getLongBytes(size)); + this.write(zipUtil.getLongBytes(offset)); + var comment = this.getComment(); + var commentLength = Buffer.byteLength(comment); + this.write(zipUtil.getShortBytes(commentLength)); + this.write(comment); + }; + ZipArchiveOutputStream.prototype._writeCentralDirectoryZip64 = function() { + this.write(zipUtil.getLongBytes(constants.SIG_ZIP64_EOCD)); + this.write(zipUtil.getEightBytes(44)); + this.write(zipUtil.getShortBytes(constants.MIN_VERSION_ZIP64)); + this.write(zipUtil.getShortBytes(constants.MIN_VERSION_ZIP64)); + this.write(constants.LONG_ZERO); + this.write(constants.LONG_ZERO); + this.write(zipUtil.getEightBytes(this._entries.length)); + this.write(zipUtil.getEightBytes(this._entries.length)); + this.write(zipUtil.getEightBytes(this._archive.centralLength)); + this.write(zipUtil.getEightBytes(this._archive.centralOffset)); + this.write(zipUtil.getLongBytes(constants.SIG_ZIP64_EOCD_LOC)); + this.write(constants.LONG_ZERO); + this.write(zipUtil.getEightBytes(this._archive.centralOffset + this._archive.centralLength)); + this.write(zipUtil.getLongBytes(1)); + }; + ZipArchiveOutputStream.prototype._writeCentralFileHeader = function(ae) { + var gpb = ae.getGeneralPurposeBit(); + var method = ae.getMethod(); + var offsets = ae._offsets; + var size = ae.getSize(); + var compressedSize = ae.getCompressedSize(); + if (ae.isZip64() || offsets.file > constants.ZIP64_MAGIC) { + size = constants.ZIP64_MAGIC; + compressedSize = constants.ZIP64_MAGIC; + ae.setVersionNeededToExtract(constants.MIN_VERSION_ZIP64); + var extraBuf = Buffer.concat([ + zipUtil.getShortBytes(constants.ZIP64_EXTRA_ID), + zipUtil.getShortBytes(24), + zipUtil.getEightBytes(ae.getSize()), + zipUtil.getEightBytes(ae.getCompressedSize()), + zipUtil.getEightBytes(offsets.file) + ], 28); + ae.setExtra(extraBuf); + } + this.write(zipUtil.getLongBytes(constants.SIG_CFH)); + this.write(zipUtil.getShortBytes(ae.getPlatform() << 8 | constants.VERSION_MADEBY)); + this.write(zipUtil.getShortBytes(ae.getVersionNeededToExtract())); + this.write(gpb.encode()); + this.write(zipUtil.getShortBytes(method)); + this.write(zipUtil.getLongBytes(ae.getTimeDos())); + this.write(zipUtil.getLongBytes(ae.getCrc())); + this.write(zipUtil.getLongBytes(compressedSize)); + this.write(zipUtil.getLongBytes(size)); + var name = ae.getName(); + var comment = ae.getComment(); + var extra = ae.getCentralDirectoryExtra(); + if (gpb.usesUTF8ForNames()) { + name = Buffer.from(name); + comment = Buffer.from(comment); + } + this.write(zipUtil.getShortBytes(name.length)); + this.write(zipUtil.getShortBytes(extra.length)); + this.write(zipUtil.getShortBytes(comment.length)); + this.write(constants.SHORT_ZERO); + this.write(zipUtil.getShortBytes(ae.getInternalAttributes())); + this.write(zipUtil.getLongBytes(ae.getExternalAttributes())); + if (offsets.file > constants.ZIP64_MAGIC) { + this.write(zipUtil.getLongBytes(constants.ZIP64_MAGIC)); + } else { + this.write(zipUtil.getLongBytes(offsets.file)); + } + this.write(name); + this.write(extra); + this.write(comment); + }; + ZipArchiveOutputStream.prototype._writeDataDescriptor = function(ae) { + this.write(zipUtil.getLongBytes(constants.SIG_DD)); + this.write(zipUtil.getLongBytes(ae.getCrc())); + if (ae.isZip64()) { + this.write(zipUtil.getEightBytes(ae.getCompressedSize())); + this.write(zipUtil.getEightBytes(ae.getSize())); + } else { + this.write(zipUtil.getLongBytes(ae.getCompressedSize())); + this.write(zipUtil.getLongBytes(ae.getSize())); + } + }; + ZipArchiveOutputStream.prototype._writeLocalFileHeader = function(ae) { + var gpb = ae.getGeneralPurposeBit(); + var method = ae.getMethod(); + var name = ae.getName(); + var extra = ae.getLocalFileDataExtra(); + if (ae.isZip64()) { + gpb.useDataDescriptor(true); + ae.setVersionNeededToExtract(constants.MIN_VERSION_ZIP64); + } + if (gpb.usesUTF8ForNames()) { + name = Buffer.from(name); + } + ae._offsets.file = this.offset; + this.write(zipUtil.getLongBytes(constants.SIG_LFH)); + this.write(zipUtil.getShortBytes(ae.getVersionNeededToExtract())); + this.write(gpb.encode()); + this.write(zipUtil.getShortBytes(method)); + this.write(zipUtil.getLongBytes(ae.getTimeDos())); + ae._offsets.data = this.offset; + if (gpb.usesDataDescriptor()) { + this.write(constants.LONG_ZERO); + this.write(constants.LONG_ZERO); + this.write(constants.LONG_ZERO); + } else { + this.write(zipUtil.getLongBytes(ae.getCrc())); + this.write(zipUtil.getLongBytes(ae.getCompressedSize())); + this.write(zipUtil.getLongBytes(ae.getSize())); + } + this.write(zipUtil.getShortBytes(name.length)); + this.write(zipUtil.getShortBytes(extra.length)); + this.write(name); + this.write(extra); + ae._offsets.contents = this.offset; + }; + ZipArchiveOutputStream.prototype.getComment = function(comment) { + return this._archive.comment !== null ? this._archive.comment : ""; + }; + ZipArchiveOutputStream.prototype.isZip64 = function() { + return this._archive.forceZip64 || this._entries.length > constants.ZIP64_MAGIC_SHORT || this._archive.centralLength > constants.ZIP64_MAGIC || this._archive.centralOffset > constants.ZIP64_MAGIC; + }; + ZipArchiveOutputStream.prototype.setComment = function(comment) { + this._archive.comment = comment; + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/compress-commons.js +var require_compress_commons = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/compress-commons.js"(exports2, module2) { + module2.exports = { + ArchiveEntry: require_archive_entry(), + ZipArchiveEntry: require_zip_archive_entry(), + ArchiveOutputStream: require_archive_output_stream(), + ZipArchiveOutputStream: require_zip_archive_output_stream() + }; + } +}); + +// ../../node_modules/.pnpm/archiver-utils@3.0.4/node_modules/archiver-utils/file.js +var require_file3 = __commonJS({ + "../../node_modules/.pnpm/archiver-utils@3.0.4/node_modules/archiver-utils/file.js"(exports2, module2) { + var fs = require_graceful_fs(); + var path = require("path"); + var flatten = require_lodash18(); + var difference = require_lodash19(); + var union = require_lodash20(); + var isPlainObject = require_lodash7(); + var glob = require_glob(); + var file2 = module2.exports = {}; + var pathSeparatorRe = /[\/\\]/g; + var processPatterns = function(patterns, fn) { + var result = []; + flatten(patterns).forEach(function(pattern) { + var exclusion = pattern.indexOf("!") === 0; + if (exclusion) { + pattern = pattern.slice(1); + } + var matches = fn(pattern); + if (exclusion) { + result = difference(result, matches); + } else { + result = union(result, matches); + } + }); + return result; + }; + file2.exists = function() { + var filepath = path.join.apply(path, arguments); + return fs.existsSync(filepath); + }; + file2.expand = function(...args) { + var options = isPlainObject(args[0]) ? args.shift() : {}; + var patterns = Array.isArray(args[0]) ? args[0] : args; + if (patterns.length === 0) { + return []; + } + var matches = processPatterns(patterns, function(pattern) { + return glob.sync(pattern, options); + }); + if (options.filter) { + matches = matches.filter(function(filepath) { + filepath = path.join(options.cwd || "", filepath); + try { + if (typeof options.filter === "function") { + return options.filter(filepath); + } else { + return fs.statSync(filepath)[options.filter](); + } + } catch (e) { + return false; + } + }); + } + return matches; + }; + file2.expandMapping = function(patterns, destBase, options) { + options = Object.assign({ + rename: function(destBase2, destPath) { + return path.join(destBase2 || "", destPath); + } + }, options); + var files = []; + var fileByDest = {}; + file2.expand(options, patterns).forEach(function(src) { + var destPath = src; + if (options.flatten) { + destPath = path.basename(destPath); + } + if (options.ext) { + destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext); + } + var dest = options.rename(destBase, destPath, options); + if (options.cwd) { + src = path.join(options.cwd, src); + } + dest = dest.replace(pathSeparatorRe, "/"); + src = src.replace(pathSeparatorRe, "/"); + if (fileByDest[dest]) { + fileByDest[dest].src.push(src); + } else { + files.push({ + src: [src], + dest + }); + fileByDest[dest] = files[files.length - 1]; + } + }); + return files; + }; + file2.normalizeFilesArray = function(data) { + var files = []; + data.forEach(function(obj2) { + var prop; + if ("src" in obj2 || "dest" in obj2) { + files.push(obj2); + } + }); + if (files.length === 0) { + return []; + } + files = _(files).chain().forEach(function(obj2) { + if (!("src" in obj2) || !obj2.src) { + return; + } + if (Array.isArray(obj2.src)) { + obj2.src = flatten(obj2.src); + } else { + obj2.src = [obj2.src]; + } + }).map(function(obj2) { + var expandOptions = Object.assign({}, obj2); + delete expandOptions.src; + delete expandOptions.dest; + if (obj2.expand) { + return file2.expandMapping(obj2.src, obj2.dest, expandOptions).map(function(mapObj) { + var result2 = Object.assign({}, obj2); + result2.orig = Object.assign({}, obj2); + result2.src = mapObj.src; + result2.dest = mapObj.dest; + ["expand", "cwd", "flatten", "rename", "ext"].forEach(function(prop) { + delete result2[prop]; + }); + return result2; + }); + } + var result = Object.assign({}, obj2); + result.orig = Object.assign({}, obj2); + if ("src" in result) { + Object.defineProperty(result, "src", { + enumerable: true, + get: function fn() { + var src; + if (!("result" in fn)) { + src = obj2.src; + src = Array.isArray(src) ? flatten(src) : [src]; + fn.result = file2.expand(expandOptions, src); + } + return fn.result; + } + }); + } + if ("dest" in result) { + result.dest = obj2.dest; + } + return result; + }).flatten().value(); + return files; + }; + } +}); + +// ../../node_modules/.pnpm/archiver-utils@3.0.4/node_modules/archiver-utils/index.js +var require_archiver_utils2 = __commonJS({ + "../../node_modules/.pnpm/archiver-utils@3.0.4/node_modules/archiver-utils/index.js"(exports2, module2) { + var fs = require_graceful_fs(); + var path = require("path"); + var lazystream = require_lazystream(); + var normalizePath = require_normalize_path(); + var defaults = require_lodash17(); + var Stream = require("stream").Stream; + var PassThrough = require_readable().PassThrough; + var utils = module2.exports = {}; + utils.file = require_file3(); + utils.collectStream = function(source, callback) { + var collection = []; + var size = 0; + source.on("error", callback); + source.on("data", function(chunk) { + collection.push(chunk); + size += chunk.length; + }); + source.on("end", function() { + var buf = Buffer.alloc(size); + var offset = 0; + collection.forEach(function(data) { + data.copy(buf, offset); + offset += data.length; + }); + callback(null, buf); + }); + }; + utils.dateify = function(dateish) { + dateish = dateish || /* @__PURE__ */ new Date(); + if (dateish instanceof Date) { + dateish = dateish; + } else if (typeof dateish === "string") { + dateish = new Date(dateish); + } else { + dateish = /* @__PURE__ */ new Date(); + } + return dateish; + }; + utils.defaults = function(object, source, guard) { + var args = arguments; + args[0] = args[0] || {}; + return defaults(...args); + }; + utils.isStream = function(source) { + return source instanceof Stream; + }; + utils.lazyReadStream = function(filepath) { + return new lazystream.Readable(function() { + return fs.createReadStream(filepath); + }); + }; + utils.normalizeInputSource = function(source) { + if (source === null) { + return Buffer.alloc(0); + } else if (typeof source === "string") { + return Buffer.from(source); + } else if (utils.isStream(source)) { + return source.pipe(new PassThrough()); + } + return source; + }; + utils.sanitizePath = function(filepath) { + return normalizePath(filepath, false).replace(/^\w+:/, "").replace(/^(\.\.\/|\/)+/, ""); + }; + utils.trailingSlashIt = function(str) { + return str.slice(-1) !== "/" ? str + "/" : str; + }; + utils.unixifyPath = function(filepath) { + return normalizePath(filepath, false).replace(/^\w+:/, ""); + }; + utils.walkdir = function(dirpath, base, callback) { + var results = []; + if (typeof base === "function") { + callback = base; + base = dirpath; + } + fs.readdir(dirpath, function(err, list) { + var i = 0; + var file2; + var filepath; + if (err) { + return callback(err); + } + (function next() { + file2 = list[i++]; + if (!file2) { + return callback(null, results); + } + filepath = path.join(dirpath, file2); + fs.stat(filepath, function(err2, stats) { + results.push({ + path: filepath, + relative: path.relative(base, filepath).replace(/\\/g, "/"), + stats + }); + if (stats && stats.isDirectory()) { + utils.walkdir(filepath, base, function(err3, res) { + res.forEach(function(dirEntry) { + results.push(dirEntry); + }); + next(); + }); + } else { + next(); + } + }); + })(); + }); + }; + } +}); + +// ../../node_modules/.pnpm/zip-stream@4.1.1/node_modules/zip-stream/index.js +var require_zip_stream2 = __commonJS({ + "../../node_modules/.pnpm/zip-stream@4.1.1/node_modules/zip-stream/index.js"(exports2, module2) { + var inherits2 = require("util").inherits; + var ZipArchiveOutputStream = require_compress_commons().ZipArchiveOutputStream; + var ZipArchiveEntry = require_compress_commons().ZipArchiveEntry; + var util2 = require_archiver_utils2(); + var ZipStream = module2.exports = function(options) { + if (!(this instanceof ZipStream)) { + return new ZipStream(options); + } + options = this.options = options || {}; + options.zlib = options.zlib || {}; + ZipArchiveOutputStream.call(this, options); + if (typeof options.level === "number" && options.level >= 0) { + options.zlib.level = options.level; + delete options.level; + } + if (!options.forceZip64 && typeof options.zlib.level === "number" && options.zlib.level === 0) { + options.store = true; + } + options.namePrependSlash = options.namePrependSlash || false; + if (options.comment && options.comment.length > 0) { + this.setComment(options.comment); + } + }; + inherits2(ZipStream, ZipArchiveOutputStream); + ZipStream.prototype._normalizeFileData = function(data) { + data = util2.defaults(data, { + type: "file", + name: null, + namePrependSlash: this.options.namePrependSlash, + linkname: null, + date: null, + mode: null, + store: this.options.store, + comment: "" + }); + var isDir = data.type === "directory"; + var isSymlink = data.type === "symlink"; + if (data.name) { + data.name = util2.sanitizePath(data.name); + if (!isSymlink && data.name.slice(-1) === "/") { + isDir = true; + data.type = "directory"; + } else if (isDir) { + data.name += "/"; + } + } + if (isDir || isSymlink) { + data.store = true; + } + data.date = util2.dateify(data.date); + return data; + }; + ZipStream.prototype.entry = function(source, data, callback) { + if (typeof callback !== "function") { + callback = this._emitErrorCallback.bind(this); + } + data = this._normalizeFileData(data); + if (data.type !== "file" && data.type !== "directory" && data.type !== "symlink") { + callback(new Error(data.type + " entries not currently supported")); + return; + } + if (typeof data.name !== "string" || data.name.length === 0) { + callback(new Error("entry name must be a non-empty string value")); + return; + } + if (data.type === "symlink" && typeof data.linkname !== "string") { + callback(new Error("entry linkname must be a non-empty string value when type equals symlink")); + return; + } + var entry = new ZipArchiveEntry(data.name); + entry.setTime(data.date, this.options.forceLocalTime); + if (data.namePrependSlash) { + entry.setName(data.name, true); + } + if (data.store) { + entry.setMethod(0); + } + if (data.comment.length > 0) { + entry.setComment(data.comment); + } + if (data.type === "symlink" && typeof data.mode !== "number") { + data.mode = 40960; + } + if (typeof data.mode === "number") { + if (data.type === "symlink") { + data.mode |= 40960; + } + entry.setUnixMode(data.mode); + } + if (data.type === "symlink" && typeof data.linkname === "string") { + source = Buffer.from(data.linkname); + } + return ZipArchiveOutputStream.prototype.entry.call(this, entry, source, callback); + }; + ZipStream.prototype.finalize = function() { + this.finish(); + }; + } +}); + +// ../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/plugins/zip.js +var require_zip4 = __commonJS({ + "../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/plugins/zip.js"(exports2, module2) { + var engine = require_zip_stream2(); + var util2 = require_archiver_utils(); + var Zip = function(options) { + if (!(this instanceof Zip)) { + return new Zip(options); + } + options = this.options = util2.defaults(options, { + comment: "", + forceUTC: false, + namePrependSlash: false, + store: false + }); + this.supports = { + directory: true, + symlink: true + }; + this.engine = new engine(options); + }; + Zip.prototype.append = function(source, data, callback) { + this.engine.entry(source, data, callback); + }; + Zip.prototype.finalize = function() { + this.engine.finalize(); + }; + Zip.prototype.on = function() { + return this.engine.on.apply(this.engine, arguments); + }; + Zip.prototype.pipe = function() { + return this.engine.pipe.apply(this.engine, arguments); + }; + Zip.prototype.unpipe = function() { + return this.engine.unpipe.apply(this.engine, arguments); + }; + module2.exports = Zip; + } +}); + +// ../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/BufferList.js +var require_BufferList2 = __commonJS({ + "../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/BufferList.js"(exports2, module2) { + "use strict"; + var { Buffer: Buffer2 } = require("buffer"); + var symbol = Symbol.for("BufferList"); + function BufferList(buf) { + if (!(this instanceof BufferList)) { + return new BufferList(buf); + } + BufferList._init.call(this, buf); + } + BufferList._init = function _init(buf) { + Object.defineProperty(this, symbol, { value: true }); + this._bufs = []; + this.length = 0; + if (buf) { + this.append(buf); + } + }; + BufferList.prototype._new = function _new(buf) { + return new BufferList(buf); + }; + BufferList.prototype._offset = function _offset(offset) { + if (offset === 0) { + return [0, 0]; + } + let tot = 0; + for (let i = 0; i < this._bufs.length; i++) { + const _t = tot + this._bufs[i].length; + if (offset < _t || i === this._bufs.length - 1) { + return [i, offset - tot]; + } + tot = _t; + } + }; + BufferList.prototype._reverseOffset = function(blOffset) { + const bufferId = blOffset[0]; + let offset = blOffset[1]; + for (let i = 0; i < bufferId; i++) { + offset += this._bufs[i].length; + } + return offset; + }; + BufferList.prototype.get = function get(index) { + if (index > this.length || index < 0) { + return void 0; + } + const offset = this._offset(index); + return this._bufs[offset[0]][offset[1]]; + }; + BufferList.prototype.slice = function slice(start, end) { + if (typeof start === "number" && start < 0) { + start += this.length; + } + if (typeof end === "number" && end < 0) { + end += this.length; + } + return this.copy(null, 0, start, end); + }; + BufferList.prototype.copy = function copy(dst, dstStart, srcStart, srcEnd) { + if (typeof srcStart !== "number" || srcStart < 0) { + srcStart = 0; + } + if (typeof srcEnd !== "number" || srcEnd > this.length) { + srcEnd = this.length; + } + if (srcStart >= this.length) { + return dst || Buffer2.alloc(0); + } + if (srcEnd <= 0) { + return dst || Buffer2.alloc(0); + } + const copy2 = !!dst; + const off = this._offset(srcStart); + const len = srcEnd - srcStart; + let bytes = len; + let bufoff = copy2 && dstStart || 0; + let start = off[1]; + if (srcStart === 0 && srcEnd === this.length) { + if (!copy2) { + return this._bufs.length === 1 ? this._bufs[0] : Buffer2.concat(this._bufs, this.length); + } + for (let i = 0; i < this._bufs.length; i++) { + this._bufs[i].copy(dst, bufoff); + bufoff += this._bufs[i].length; + } + return dst; + } + if (bytes <= this._bufs[off[0]].length - start) { + return copy2 ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes) : this._bufs[off[0]].slice(start, start + bytes); + } + if (!copy2) { + dst = Buffer2.allocUnsafe(len); + } + for (let i = off[0]; i < this._bufs.length; i++) { + const l2 = this._bufs[i].length - start; + if (bytes > l2) { + this._bufs[i].copy(dst, bufoff, start); + bufoff += l2; + } else { + this._bufs[i].copy(dst, bufoff, start, start + bytes); + bufoff += l2; + break; + } + bytes -= l2; + if (start) { + start = 0; + } + } + if (dst.length > bufoff) return dst.slice(0, bufoff); + return dst; + }; + BufferList.prototype.shallowSlice = function shallowSlice(start, end) { + start = start || 0; + end = typeof end !== "number" ? this.length : end; + if (start < 0) { + start += this.length; + } + if (end < 0) { + end += this.length; + } + if (start === end) { + return this._new(); + } + const startOffset = this._offset(start); + const endOffset = this._offset(end); + const buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1); + if (endOffset[1] === 0) { + buffers.pop(); + } else { + buffers[buffers.length - 1] = buffers[buffers.length - 1].slice(0, endOffset[1]); + } + if (startOffset[1] !== 0) { + buffers[0] = buffers[0].slice(startOffset[1]); + } + return this._new(buffers); + }; + BufferList.prototype.toString = function toString2(encoding, start, end) { + return this.slice(start, end).toString(encoding); + }; + BufferList.prototype.consume = function consume(bytes) { + bytes = Math.trunc(bytes); + if (Number.isNaN(bytes) || bytes <= 0) return this; + while (this._bufs.length) { + if (bytes >= this._bufs[0].length) { + bytes -= this._bufs[0].length; + this.length -= this._bufs[0].length; + this._bufs.shift(); + } else { + this._bufs[0] = this._bufs[0].slice(bytes); + this.length -= bytes; + break; + } + } + return this; + }; + BufferList.prototype.duplicate = function duplicate() { + const copy = this._new(); + for (let i = 0; i < this._bufs.length; i++) { + copy.append(this._bufs[i]); + } + return copy; + }; + BufferList.prototype.append = function append(buf) { + if (buf == null) { + return this; + } + if (buf.buffer) { + this._appendBuffer(Buffer2.from(buf.buffer, buf.byteOffset, buf.byteLength)); + } else if (Array.isArray(buf)) { + for (let i = 0; i < buf.length; i++) { + this.append(buf[i]); + } + } else if (this._isBufferList(buf)) { + for (let i = 0; i < buf._bufs.length; i++) { + this.append(buf._bufs[i]); + } + } else { + if (typeof buf === "number") { + buf = buf.toString(); + } + this._appendBuffer(Buffer2.from(buf)); + } + return this; + }; + BufferList.prototype._appendBuffer = function appendBuffer(buf) { + this._bufs.push(buf); + this.length += buf.length; + }; + BufferList.prototype.indexOf = function(search, offset, encoding) { + if (encoding === void 0 && typeof offset === "string") { + encoding = offset; + offset = void 0; + } + if (typeof search === "function" || Array.isArray(search)) { + throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.'); + } else if (typeof search === "number") { + search = Buffer2.from([search]); + } else if (typeof search === "string") { + search = Buffer2.from(search, encoding); + } else if (this._isBufferList(search)) { + search = search.slice(); + } else if (Array.isArray(search.buffer)) { + search = Buffer2.from(search.buffer, search.byteOffset, search.byteLength); + } else if (!Buffer2.isBuffer(search)) { + search = Buffer2.from(search); + } + offset = Number(offset || 0); + if (isNaN(offset)) { + offset = 0; + } + if (offset < 0) { + offset = this.length + offset; + } + if (offset < 0) { + offset = 0; + } + if (search.length === 0) { + return offset > this.length ? this.length : offset; + } + const blOffset = this._offset(offset); + let blIndex = blOffset[0]; + let buffOffset = blOffset[1]; + for (; blIndex < this._bufs.length; blIndex++) { + const buff = this._bufs[blIndex]; + while (buffOffset < buff.length) { + const availableWindow = buff.length - buffOffset; + if (availableWindow >= search.length) { + const nativeSearchResult = buff.indexOf(search, buffOffset); + if (nativeSearchResult !== -1) { + return this._reverseOffset([blIndex, nativeSearchResult]); + } + buffOffset = buff.length - search.length + 1; + } else { + const revOffset = this._reverseOffset([blIndex, buffOffset]); + if (this._match(revOffset, search)) { + return revOffset; + } + buffOffset++; + } + } + buffOffset = 0; + } + return -1; + }; + BufferList.prototype._match = function(offset, search) { + if (this.length - offset < search.length) { + return false; + } + for (let searchOffset = 0; searchOffset < search.length; searchOffset++) { + if (this.get(offset + searchOffset) !== search[searchOffset]) { + return false; + } + } + return true; + }; + (function() { + const methods = { + readDoubleBE: 8, + readDoubleLE: 8, + readFloatBE: 4, + readFloatLE: 4, + readInt32BE: 4, + readInt32LE: 4, + readUInt32BE: 4, + readUInt32LE: 4, + readInt16BE: 2, + readInt16LE: 2, + readUInt16BE: 2, + readUInt16LE: 2, + readInt8: 1, + readUInt8: 1, + readIntBE: null, + readIntLE: null, + readUIntBE: null, + readUIntLE: null + }; + for (const m in methods) { + (function(m2) { + if (methods[m2] === null) { + BufferList.prototype[m2] = function(offset, byteLength) { + return this.slice(offset, offset + byteLength)[m2](0, byteLength); + }; + } else { + BufferList.prototype[m2] = function(offset = 0) { + return this.slice(offset, offset + methods[m2])[m2](0); + }; + } + })(m); + } + })(); + BufferList.prototype._isBufferList = function _isBufferList(b) { + return b instanceof BufferList || BufferList.isBufferList(b); + }; + BufferList.isBufferList = function isBufferList(b) { + return b != null && b[symbol]; + }; + module2.exports = BufferList; + } +}); + +// ../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/bl.js +var require_bl = __commonJS({ + "../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/bl.js"(exports2, module2) { + "use strict"; + var DuplexStream = require_readable().Duplex; + var inherits2 = require_inherits(); + var BufferList = require_BufferList2(); + function BufferListStream(callback) { + if (!(this instanceof BufferListStream)) { + return new BufferListStream(callback); + } + if (typeof callback === "function") { + this._callback = callback; + const piper = function piper2(err) { + if (this._callback) { + this._callback(err); + this._callback = null; + } + }.bind(this); + this.on("pipe", function onPipe(src) { + src.on("error", piper); + }); + this.on("unpipe", function onUnpipe(src) { + src.removeListener("error", piper); + }); + callback = null; + } + BufferList._init.call(this, callback); + DuplexStream.call(this); + } + inherits2(BufferListStream, DuplexStream); + Object.assign(BufferListStream.prototype, BufferList.prototype); + BufferListStream.prototype._new = function _new(callback) { + return new BufferListStream(callback); + }; + BufferListStream.prototype._write = function _write(buf, encoding, callback) { + this._appendBuffer(buf); + if (typeof callback === "function") { + callback(); + } + }; + BufferListStream.prototype._read = function _read(size) { + if (!this.length) { + return this.push(null); + } + size = Math.min(size, this.length); + this.push(this.slice(0, size)); + this.consume(size); + }; + BufferListStream.prototype.end = function end(chunk) { + DuplexStream.prototype.end.call(this, chunk); + if (this._callback) { + this._callback(null, this.slice()); + this._callback = null; + } + }; + BufferListStream.prototype._destroy = function _destroy(err, cb) { + this._bufs.length = 0; + this.length = 0; + cb(err); + }; + BufferListStream.prototype._isBufferList = function _isBufferList(b) { + return b instanceof BufferListStream || b instanceof BufferList || BufferListStream.isBufferList(b); + }; + BufferListStream.isBufferList = BufferList.isBufferList; + module2.exports = BufferListStream; + module2.exports.BufferListStream = BufferListStream; + module2.exports.BufferList = BufferList; + } +}); + +// ../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/headers.js +var require_headers = __commonJS({ + "../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/headers.js"(exports2) { + var alloc = Buffer.alloc; + var ZEROS = "0000000000000000000"; + var SEVENS = "7777777777777777777"; + var ZERO_OFFSET = "0".charCodeAt(0); + var USTAR_MAGIC = Buffer.from("ustar\0", "binary"); + var USTAR_VER = Buffer.from("00", "binary"); + var GNU_MAGIC = Buffer.from("ustar ", "binary"); + var GNU_VER = Buffer.from(" \0", "binary"); + var MASK = parseInt("7777", 8); + var MAGIC_OFFSET = 257; + var VERSION_OFFSET = 263; + var clamp = function(index, len, defaultValue) { + if (typeof index !== "number") return defaultValue; + index = ~~index; + if (index >= len) return len; + if (index >= 0) return index; + index += len; + if (index >= 0) return index; + return 0; + }; + var toType = function(flag) { + switch (flag) { + case 0: + return "file"; + case 1: + return "link"; + case 2: + return "symlink"; + case 3: + return "character-device"; + case 4: + return "block-device"; + case 5: + return "directory"; + case 6: + return "fifo"; + case 7: + return "contiguous-file"; + case 72: + return "pax-header"; + case 55: + return "pax-global-header"; + case 27: + return "gnu-long-link-path"; + case 28: + case 30: + return "gnu-long-path"; + } + return null; + }; + var toTypeflag = function(flag) { + switch (flag) { + case "file": + return 0; + case "link": + return 1; + case "symlink": + return 2; + case "character-device": + return 3; + case "block-device": + return 4; + case "directory": + return 5; + case "fifo": + return 6; + case "contiguous-file": + return 7; + case "pax-header": + return 72; + } + return 0; + }; + var indexOf = function(block, num, offset, end) { + for (; offset < end; offset++) { + if (block[offset] === num) return offset; + } + return end; + }; + var cksum = function(block) { + var sum = 8 * 32; + for (var i = 0; i < 148; i++) sum += block[i]; + for (var j = 156; j < 512; j++) sum += block[j]; + return sum; + }; + var encodeOct = function(val, n) { + val = val.toString(8); + if (val.length > n) return SEVENS.slice(0, n) + " "; + else return ZEROS.slice(0, n - val.length) + val + " "; + }; + function parse256(buf) { + var positive; + if (buf[0] === 128) positive = true; + else if (buf[0] === 255) positive = false; + else return null; + var tuple = []; + for (var i = buf.length - 1; i > 0; i--) { + var byte = buf[i]; + if (positive) tuple.push(byte); + else tuple.push(255 - byte); + } + var sum = 0; + var l2 = tuple.length; + for (i = 0; i < l2; i++) { + sum += tuple[i] * Math.pow(256, i); + } + return positive ? sum : -1 * sum; + } + var decodeOct = function(val, offset, length) { + val = val.slice(offset, offset + length); + offset = 0; + if (val[offset] & 128) { + return parse256(val); + } else { + while (offset < val.length && val[offset] === 32) offset++; + var end = clamp(indexOf(val, 32, offset, val.length), val.length, val.length); + while (offset < end && val[offset] === 0) offset++; + if (end === offset) return 0; + return parseInt(val.slice(offset, end).toString(), 8); + } + }; + var decodeStr = function(val, offset, length, encoding) { + return val.slice(offset, indexOf(val, 0, offset, offset + length)).toString(encoding); + }; + var addLength = function(str) { + var len = Buffer.byteLength(str); + var digits = Math.floor(Math.log(len) / Math.log(10)) + 1; + if (len + digits >= Math.pow(10, digits)) digits++; + return len + digits + str; + }; + exports2.decodeLongPath = function(buf, encoding) { + return decodeStr(buf, 0, buf.length, encoding); + }; + exports2.encodePax = function(opts) { + var result = ""; + if (opts.name) result += addLength(" path=" + opts.name + "\n"); + if (opts.linkname) result += addLength(" linkpath=" + opts.linkname + "\n"); + var pax = opts.pax; + if (pax) { + for (var key in pax) { + result += addLength(" " + key + "=" + pax[key] + "\n"); + } + } + return Buffer.from(result); + }; + exports2.decodePax = function(buf) { + var result = {}; + while (buf.length) { + var i = 0; + while (i < buf.length && buf[i] !== 32) i++; + var len = parseInt(buf.slice(0, i).toString(), 10); + if (!len) return result; + var b = buf.slice(i + 1, len - 1).toString(); + var keyIndex = b.indexOf("="); + if (keyIndex === -1) return result; + result[b.slice(0, keyIndex)] = b.slice(keyIndex + 1); + buf = buf.slice(len); + } + return result; + }; + exports2.encode = function(opts) { + var buf = alloc(512); + var name = opts.name; + var prefix = ""; + if (opts.typeflag === 5 && name[name.length - 1] !== "/") name += "/"; + if (Buffer.byteLength(name) !== name.length) return null; + while (Buffer.byteLength(name) > 100) { + var i = name.indexOf("/"); + if (i === -1) return null; + prefix += prefix ? "/" + name.slice(0, i) : name.slice(0, i); + name = name.slice(i + 1); + } + if (Buffer.byteLength(name) > 100 || Buffer.byteLength(prefix) > 155) return null; + if (opts.linkname && Buffer.byteLength(opts.linkname) > 100) return null; + buf.write(name); + buf.write(encodeOct(opts.mode & MASK, 6), 100); + buf.write(encodeOct(opts.uid, 6), 108); + buf.write(encodeOct(opts.gid, 6), 116); + buf.write(encodeOct(opts.size, 11), 124); + buf.write(encodeOct(opts.mtime.getTime() / 1e3 | 0, 11), 136); + buf[156] = ZERO_OFFSET + toTypeflag(opts.type); + if (opts.linkname) buf.write(opts.linkname, 157); + USTAR_MAGIC.copy(buf, MAGIC_OFFSET); + USTAR_VER.copy(buf, VERSION_OFFSET); + if (opts.uname) buf.write(opts.uname, 265); + if (opts.gname) buf.write(opts.gname, 297); + buf.write(encodeOct(opts.devmajor || 0, 6), 329); + buf.write(encodeOct(opts.devminor || 0, 6), 337); + if (prefix) buf.write(prefix, 345); + buf.write(encodeOct(cksum(buf), 6), 148); + return buf; + }; + exports2.decode = function(buf, filenameEncoding, allowUnknownFormat) { + var typeflag = buf[156] === 0 ? 0 : buf[156] - ZERO_OFFSET; + var name = decodeStr(buf, 0, 100, filenameEncoding); + var mode = decodeOct(buf, 100, 8); + var uid = decodeOct(buf, 108, 8); + var gid = decodeOct(buf, 116, 8); + var size = decodeOct(buf, 124, 12); + var mtime = decodeOct(buf, 136, 12); + var type = toType(typeflag); + var linkname = buf[157] === 0 ? null : decodeStr(buf, 157, 100, filenameEncoding); + var uname = decodeStr(buf, 265, 32); + var gname = decodeStr(buf, 297, 32); + var devmajor = decodeOct(buf, 329, 8); + var devminor = decodeOct(buf, 337, 8); + var c = cksum(buf); + if (c === 8 * 32) return null; + if (c !== decodeOct(buf, 148, 8)) throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?"); + if (USTAR_MAGIC.compare(buf, MAGIC_OFFSET, MAGIC_OFFSET + 6) === 0) { + if (buf[345]) name = decodeStr(buf, 345, 155, filenameEncoding) + "/" + name; + } else if (GNU_MAGIC.compare(buf, MAGIC_OFFSET, MAGIC_OFFSET + 6) === 0 && GNU_VER.compare(buf, VERSION_OFFSET, VERSION_OFFSET + 2) === 0) { + } else { + if (!allowUnknownFormat) { + throw new Error("Invalid tar header: unknown format."); + } + } + if (typeflag === 0 && name && name[name.length - 1] === "/") typeflag = 5; + return { + name, + mode, + uid, + gid, + size, + mtime: new Date(1e3 * mtime), + type, + linkname, + uname, + gname, + devmajor, + devminor + }; + }; + } +}); + +// ../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/extract.js +var require_extract = __commonJS({ + "../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/extract.js"(exports2, module2) { + var util2 = require("util"); + var bl = require_bl(); + var headers = require_headers(); + var Writable = require_readable().Writable; + var PassThrough = require_readable().PassThrough; + var noop = function() { + }; + var overflow = function(size) { + size &= 511; + return size && 512 - size; + }; + var emptyStream = function(self2, offset) { + var s = new Source(self2, offset); + s.end(); + return s; + }; + var mixinPax = function(header, pax) { + if (pax.path) header.name = pax.path; + if (pax.linkpath) header.linkname = pax.linkpath; + if (pax.size) header.size = parseInt(pax.size, 10); + header.pax = pax; + return header; + }; + var Source = function(self2, offset) { + this._parent = self2; + this.offset = offset; + PassThrough.call(this, { autoDestroy: false }); + }; + util2.inherits(Source, PassThrough); + Source.prototype.destroy = function(err) { + this._parent.destroy(err); + }; + var Extract = function(opts) { + if (!(this instanceof Extract)) return new Extract(opts); + Writable.call(this, opts); + opts = opts || {}; + this._offset = 0; + this._buffer = bl(); + this._missing = 0; + this._partial = false; + this._onparse = noop; + this._header = null; + this._stream = null; + this._overflow = null; + this._cb = null; + this._locked = false; + this._destroyed = false; + this._pax = null; + this._paxGlobal = null; + this._gnuLongPath = null; + this._gnuLongLinkPath = null; + var self2 = this; + var b = self2._buffer; + var oncontinue = function() { + self2._continue(); + }; + var onunlock = function(err) { + self2._locked = false; + if (err) return self2.destroy(err); + if (!self2._stream) oncontinue(); + }; + var onstreamend = function() { + self2._stream = null; + var drain = overflow(self2._header.size); + if (drain) self2._parse(drain, ondrain); + else self2._parse(512, onheader); + if (!self2._locked) oncontinue(); + }; + var ondrain = function() { + self2._buffer.consume(overflow(self2._header.size)); + self2._parse(512, onheader); + oncontinue(); + }; + var onpaxglobalheader = function() { + var size = self2._header.size; + self2._paxGlobal = headers.decodePax(b.slice(0, size)); + b.consume(size); + onstreamend(); + }; + var onpaxheader = function() { + var size = self2._header.size; + self2._pax = headers.decodePax(b.slice(0, size)); + if (self2._paxGlobal) self2._pax = Object.assign({}, self2._paxGlobal, self2._pax); + b.consume(size); + onstreamend(); + }; + var ongnulongpath = function() { + var size = self2._header.size; + this._gnuLongPath = headers.decodeLongPath(b.slice(0, size), opts.filenameEncoding); + b.consume(size); + onstreamend(); + }; + var ongnulonglinkpath = function() { + var size = self2._header.size; + this._gnuLongLinkPath = headers.decodeLongPath(b.slice(0, size), opts.filenameEncoding); + b.consume(size); + onstreamend(); + }; + var onheader = function() { + var offset = self2._offset; + var header; + try { + header = self2._header = headers.decode(b.slice(0, 512), opts.filenameEncoding, opts.allowUnknownFormat); + } catch (err) { + self2.emit("error", err); + } + b.consume(512); + if (!header) { + self2._parse(512, onheader); + oncontinue(); + return; + } + if (header.type === "gnu-long-path") { + self2._parse(header.size, ongnulongpath); + oncontinue(); + return; + } + if (header.type === "gnu-long-link-path") { + self2._parse(header.size, ongnulonglinkpath); + oncontinue(); + return; + } + if (header.type === "pax-global-header") { + self2._parse(header.size, onpaxglobalheader); + oncontinue(); + return; + } + if (header.type === "pax-header") { + self2._parse(header.size, onpaxheader); + oncontinue(); + return; + } + if (self2._gnuLongPath) { + header.name = self2._gnuLongPath; + self2._gnuLongPath = null; + } + if (self2._gnuLongLinkPath) { + header.linkname = self2._gnuLongLinkPath; + self2._gnuLongLinkPath = null; + } + if (self2._pax) { + self2._header = header = mixinPax(header, self2._pax); + self2._pax = null; + } + self2._locked = true; + if (!header.size || header.type === "directory") { + self2._parse(512, onheader); + self2.emit("entry", header, emptyStream(self2, offset), onunlock); + return; + } + self2._stream = new Source(self2, offset); + self2.emit("entry", header, self2._stream, onunlock); + self2._parse(header.size, onstreamend); + oncontinue(); + }; + this._onheader = onheader; + this._parse(512, onheader); + }; + util2.inherits(Extract, Writable); + Extract.prototype.destroy = function(err) { + if (this._destroyed) return; + this._destroyed = true; + if (err) this.emit("error", err); + this.emit("close"); + if (this._stream) this._stream.emit("close"); + }; + Extract.prototype._parse = function(size, onparse) { + if (this._destroyed) return; + this._offset += size; + this._missing = size; + if (onparse === this._onheader) this._partial = false; + this._onparse = onparse; + }; + Extract.prototype._continue = function() { + if (this._destroyed) return; + var cb = this._cb; + this._cb = noop; + if (this._overflow) this._write(this._overflow, void 0, cb); + else cb(); + }; + Extract.prototype._write = function(data, enc, cb) { + if (this._destroyed) return; + var s = this._stream; + var b = this._buffer; + var missing = this._missing; + if (data.length) this._partial = true; + if (data.length < missing) { + this._missing -= data.length; + this._overflow = null; + if (s) return s.write(data, cb); + b.append(data); + return cb(); + } + this._cb = cb; + this._missing = 0; + var overflow2 = null; + if (data.length > missing) { + overflow2 = data.slice(missing); + data = data.slice(0, missing); + } + if (s) s.end(data); + else b.append(data); + this._overflow = overflow2; + this._onparse(); + }; + Extract.prototype._final = function(cb) { + if (this._partial) return this.destroy(new Error("Unexpected end of data")); + cb(); + }; + module2.exports = Extract; + } +}); + +// ../../node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/index.js +var require_fs_constants = __commonJS({ + "../../node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/index.js"(exports2, module2) { + module2.exports = require("fs").constants || require("constants"); + } +}); + +// ../../node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/index.js +var require_end_of_stream2 = __commonJS({ + "../../node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/index.js"(exports2, module2) { + var once = require_once(); + var noop = function() { + }; + var qnt = global.Bare ? queueMicrotask : process.nextTick.bind(process); + var isRequest = function(stream) { + return stream.setHeader && typeof stream.abort === "function"; + }; + var isChildProcess = function(stream) { + return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3; + }; + var eos = function(stream, opts, callback) { + if (typeof opts === "function") return eos(stream, null, opts); + if (!opts) opts = {}; + callback = once(callback || noop); + var ws = stream._writableState; + var rs = stream._readableState; + var readable = opts.readable || opts.readable !== false && stream.readable; + var writable = opts.writable || opts.writable !== false && stream.writable; + var cancelled = false; + var onlegacyfinish = function() { + if (!stream.writable) onfinish(); + }; + var onfinish = function() { + writable = false; + if (!readable) callback.call(stream); + }; + var onend = function() { + readable = false; + if (!writable) callback.call(stream); + }; + var onexit = function(exitCode) { + callback.call(stream, exitCode ? new Error("exited with error code: " + exitCode) : null); + }; + var onerror = function(err) { + callback.call(stream, err); + }; + var onclose = function() { + qnt(onclosenexttick); + }; + var onclosenexttick = function() { + if (cancelled) return; + if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error("premature close")); + if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error("premature close")); + }; + var onrequest = function() { + stream.req.on("finish", onfinish); + }; + if (isRequest(stream)) { + stream.on("complete", onfinish); + stream.on("abort", onclose); + if (stream.req) onrequest(); + else stream.on("request", onrequest); + } else if (writable && !ws) { + stream.on("end", onlegacyfinish); + stream.on("close", onlegacyfinish); + } + if (isChildProcess(stream)) stream.on("exit", onexit); + stream.on("end", onend); + stream.on("finish", onfinish); + if (opts.error !== false) stream.on("error", onerror); + stream.on("close", onclose); + return function() { + cancelled = true; + stream.removeListener("complete", onfinish); + stream.removeListener("abort", onclose); + stream.removeListener("request", onrequest); + if (stream.req) stream.req.removeListener("finish", onfinish); + stream.removeListener("end", onlegacyfinish); + stream.removeListener("close", onlegacyfinish); + stream.removeListener("finish", onfinish); + stream.removeListener("exit", onexit); + stream.removeListener("end", onend); + stream.removeListener("error", onerror); + stream.removeListener("close", onclose); + }; + }; + module2.exports = eos; + } +}); + +// ../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/pack.js +var require_pack = __commonJS({ + "../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/pack.js"(exports2, module2) { + var constants = require_fs_constants(); + var eos = require_end_of_stream2(); + var inherits2 = require_inherits(); + var alloc = Buffer.alloc; + var Readable = require_readable().Readable; + var Writable = require_readable().Writable; + var StringDecoder = require("string_decoder").StringDecoder; + var headers = require_headers(); + var DMODE = parseInt("755", 8); + var FMODE = parseInt("644", 8); + var END_OF_TAR = alloc(1024); + var noop = function() { + }; + var overflow = function(self2, size) { + size &= 511; + if (size) self2.push(END_OF_TAR.slice(0, 512 - size)); + }; + function modeToType(mode) { + switch (mode & constants.S_IFMT) { + case constants.S_IFBLK: + return "block-device"; + case constants.S_IFCHR: + return "character-device"; + case constants.S_IFDIR: + return "directory"; + case constants.S_IFIFO: + return "fifo"; + case constants.S_IFLNK: + return "symlink"; + } + return "file"; + } + var Sink = function(to) { + Writable.call(this); + this.written = 0; + this._to = to; + this._destroyed = false; + }; + inherits2(Sink, Writable); + Sink.prototype._write = function(data, enc, cb) { + this.written += data.length; + if (this._to.push(data)) return cb(); + this._to._drain = cb; + }; + Sink.prototype.destroy = function() { + if (this._destroyed) return; + this._destroyed = true; + this.emit("close"); + }; + var LinkSink = function() { + Writable.call(this); + this.linkname = ""; + this._decoder = new StringDecoder("utf-8"); + this._destroyed = false; + }; + inherits2(LinkSink, Writable); + LinkSink.prototype._write = function(data, enc, cb) { + this.linkname += this._decoder.write(data); + cb(); + }; + LinkSink.prototype.destroy = function() { + if (this._destroyed) return; + this._destroyed = true; + this.emit("close"); + }; + var Void = function() { + Writable.call(this); + this._destroyed = false; + }; + inherits2(Void, Writable); + Void.prototype._write = function(data, enc, cb) { + cb(new Error("No body allowed for this entry")); + }; + Void.prototype.destroy = function() { + if (this._destroyed) return; + this._destroyed = true; + this.emit("close"); + }; + var Pack = function(opts) { + if (!(this instanceof Pack)) return new Pack(opts); + Readable.call(this, opts); + this._drain = noop; + this._finalized = false; + this._finalizing = false; + this._destroyed = false; + this._stream = null; + }; + inherits2(Pack, Readable); + Pack.prototype.entry = function(header, buffer, callback) { + if (this._stream) throw new Error("already piping an entry"); + if (this._finalized || this._destroyed) return; + if (typeof buffer === "function") { + callback = buffer; + buffer = null; + } + if (!callback) callback = noop; + var self2 = this; + if (!header.size || header.type === "symlink") header.size = 0; + if (!header.type) header.type = modeToType(header.mode); + if (!header.mode) header.mode = header.type === "directory" ? DMODE : FMODE; + if (!header.uid) header.uid = 0; + if (!header.gid) header.gid = 0; + if (!header.mtime) header.mtime = /* @__PURE__ */ new Date(); + if (typeof buffer === "string") buffer = Buffer.from(buffer); + if (Buffer.isBuffer(buffer)) { + header.size = buffer.length; + this._encode(header); + var ok = this.push(buffer); + overflow(self2, header.size); + if (ok) process.nextTick(callback); + else this._drain = callback; + return new Void(); + } + if (header.type === "symlink" && !header.linkname) { + var linkSink = new LinkSink(); + eos(linkSink, function(err) { + if (err) { + self2.destroy(); + return callback(err); + } + header.linkname = linkSink.linkname; + self2._encode(header); + callback(); + }); + return linkSink; + } + this._encode(header); + if (header.type !== "file" && header.type !== "contiguous-file") { + process.nextTick(callback); + return new Void(); + } + var sink = new Sink(this); + this._stream = sink; + eos(sink, function(err) { + self2._stream = null; + if (err) { + self2.destroy(); + return callback(err); + } + if (sink.written !== header.size) { + self2.destroy(); + return callback(new Error("size mismatch")); + } + overflow(self2, header.size); + if (self2._finalizing) self2.finalize(); + callback(); + }); + return sink; + }; + Pack.prototype.finalize = function() { + if (this._stream) { + this._finalizing = true; + return; + } + if (this._finalized) return; + this._finalized = true; + this.push(END_OF_TAR); + this.push(null); + }; + Pack.prototype.destroy = function(err) { + if (this._destroyed) return; + this._destroyed = true; + if (err) this.emit("error", err); + this.emit("close"); + if (this._stream && this._stream.destroy) this._stream.destroy(); + }; + Pack.prototype._encode = function(header) { + if (!header.pax) { + var buf = headers.encode(header); + if (buf) { + this.push(buf); + return; + } + } + this._encodePax(header); + }; + Pack.prototype._encodePax = function(header) { + var paxHeader = headers.encodePax({ + name: header.name, + linkname: header.linkname, + pax: header.pax + }); + var newHeader = { + name: "PaxHeader", + mode: header.mode, + uid: header.uid, + gid: header.gid, + size: paxHeader.length, + mtime: header.mtime, + type: "pax-header", + linkname: header.linkname && "PaxHeader", + uname: header.uname, + gname: header.gname, + devmajor: header.devmajor, + devminor: header.devminor + }; + this.push(headers.encode(newHeader)); + this.push(paxHeader); + overflow(this, paxHeader.length); + newHeader.size = header.size; + newHeader.type = header.type; + this.push(headers.encode(newHeader)); + }; + Pack.prototype._read = function(n) { + var drain = this._drain; + this._drain = noop; + drain(); + }; + module2.exports = Pack; + } +}); + +// ../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/index.js +var require_tar_stream = __commonJS({ + "../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/index.js"(exports2) { + exports2.extract = require_extract(); + exports2.pack = require_pack(); + } +}); + +// ../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/plugins/tar.js +var require_tar = __commonJS({ + "../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/plugins/tar.js"(exports2, module2) { + var zlib = require("zlib"); + var engine = require_tar_stream(); + var util2 = require_archiver_utils(); + var Tar = function(options) { + if (!(this instanceof Tar)) { + return new Tar(options); + } + options = this.options = util2.defaults(options, { + gzip: false + }); + if (typeof options.gzipOptions !== "object") { + options.gzipOptions = {}; + } + this.supports = { + directory: true, + symlink: true + }; + this.engine = engine.pack(options); + this.compressor = false; + if (options.gzip) { + this.compressor = zlib.createGzip(options.gzipOptions); + this.compressor.on("error", this._onCompressorError.bind(this)); + } + }; + Tar.prototype._onCompressorError = function(err) { + this.engine.emit("error", err); + }; + Tar.prototype.append = function(source, data, callback) { + var self2 = this; + data.mtime = data.date; + function append(err, sourceBuffer) { + if (err) { + callback(err); + return; + } + self2.engine.entry(data, sourceBuffer, function(err2) { + callback(err2, data); + }); + } + if (data.sourceType === "buffer") { + append(null, source); + } else if (data.sourceType === "stream" && data.stats) { + data.size = data.stats.size; + var entry = self2.engine.entry(data, function(err) { + callback(err, data); + }); + source.pipe(entry); + } else if (data.sourceType === "stream") { + util2.collectStream(source, append); + } + }; + Tar.prototype.finalize = function() { + this.engine.finalize(); + }; + Tar.prototype.on = function() { + return this.engine.on.apply(this.engine, arguments); + }; + Tar.prototype.pipe = function(destination, options) { + if (this.compressor) { + return this.engine.pipe.apply(this.engine, [this.compressor]).pipe(destination, options); + } else { + return this.engine.pipe.apply(this.engine, arguments); + } + }; + Tar.prototype.unpipe = function() { + if (this.compressor) { + return this.compressor.unpipe.apply(this.compressor, arguments); + } else { + return this.engine.unpipe.apply(this.engine, arguments); + } + }; + module2.exports = Tar; + } +}); + +// ../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/plugins/json.js +var require_json3 = __commonJS({ + "../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/plugins/json.js"(exports2, module2) { + var inherits2 = require("util").inherits; + var Transform = require_readable().Transform; + var crc32 = require_buffer_crc32(); + var util2 = require_archiver_utils(); + var Json = function(options) { + if (!(this instanceof Json)) { + return new Json(options); + } + options = this.options = util2.defaults(options, {}); + Transform.call(this, options); + this.supports = { + directory: true, + symlink: true + }; + this.files = []; + }; + inherits2(Json, Transform); + Json.prototype._transform = function(chunk, encoding, callback) { + callback(null, chunk); + }; + Json.prototype._writeStringified = function() { + var fileString = JSON.stringify(this.files); + this.write(fileString); + }; + Json.prototype.append = function(source, data, callback) { + var self2 = this; + data.crc32 = 0; + function onend(err, sourceBuffer) { + if (err) { + callback(err); + return; + } + data.size = sourceBuffer.length || 0; + data.crc32 = crc32.unsigned(sourceBuffer); + self2.files.push(data); + callback(null, data); + } + if (data.sourceType === "buffer") { + onend(null, source); + } else if (data.sourceType === "stream") { + util2.collectStream(source, onend); + } + }; + Json.prototype.finalize = function() { + this._writeStringified(); + this.end(); + }; + module2.exports = Json; + } +}); + +// ../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/index.js +var require_archiver = __commonJS({ + "../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/index.js"(exports2, module2) { + var Archiver = require_core5(); + var formats = {}; + var vending = function(format, options) { + return vending.create(format, options); + }; + vending.create = function(format, options) { + if (formats[format]) { + var instance = new Archiver(format, options); + instance.setFormat(format); + instance.setModule(new formats[format](options)); + return instance; + } else { + throw new Error("create(" + format + "): format not registered"); + } + }; + vending.registerFormat = function(format, module3) { + if (formats[format]) { + throw new Error("register(" + format + "): format already registered"); + } + if (typeof module3 !== "function") { + throw new Error("register(" + format + "): format module invalid"); + } + if (typeof module3.prototype.append !== "function" || typeof module3.prototype.finalize !== "function") { + throw new Error("register(" + format + "): format module missing methods"); + } + formats[format] = module3; + }; + vending.isRegisteredFormat = function(format) { + if (formats[format]) { + return true; + } + return false; + }; + vending.registerFormat("zip", require_zip4()); + vending.registerFormat("tar", require_tar()); + vending.registerFormat("json", require_json3()); + module2.exports = vending; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/shared-strings.js +var require_shared_strings = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/shared-strings.js"(exports2, module2) { + var SharedStrings = class { + constructor() { + this._values = []; + this._totalRefs = 0; + this._hash = /* @__PURE__ */ Object.create(null); + } + get count() { + return this._values.length; + } + get values() { + return this._values; + } + get totalRefs() { + return this._totalRefs; + } + getString(index) { + return this._values[index]; + } + add(value) { + let index = this._hash[value]; + if (index === void 0) { + index = this._hash[value] = this._values.length; + this._values.push(value); + } + this._totalRefs++; + return index; + } + }; + module2.exports = SharedStrings; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/sheet-rels-writer.js +var require_sheet_rels_writer = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/sheet-rels-writer.js"(exports2, module2) { + var utils = require_utils21(); + var RelType = require_rel_type(); + var HyperlinksProxy = class { + constructor(sheetRelsWriter) { + this.writer = sheetRelsWriter; + } + push(hyperlink) { + this.writer.addHyperlink(hyperlink); + } + }; + var SheetRelsWriter = class { + constructor(options) { + this.id = options.id; + this.count = 0; + this._hyperlinks = []; + this._workbook = options.workbook; + } + get stream() { + if (!this._stream) { + this._stream = this._workbook._openStream(`/xl/worksheets/_rels/sheet${this.id}.xml.rels`); + } + return this._stream; + } + get length() { + return this._hyperlinks.length; + } + each(fn) { + return this._hyperlinks.forEach(fn); + } + get hyperlinksProxy() { + return this._hyperlinksProxy || (this._hyperlinksProxy = new HyperlinksProxy(this)); + } + addHyperlink(hyperlink) { + const relationship = { + Target: hyperlink.target, + Type: RelType.Hyperlink, + TargetMode: "External" + }; + const rId = this._writeRelationship(relationship); + this._hyperlinks.push({ + rId, + address: hyperlink.address + }); + } + addMedia(media) { + return this._writeRelationship(media); + } + addRelationship(rel) { + return this._writeRelationship(rel); + } + commit() { + if (this.count) { + this._writeClose(); + this.stream.end(); + } + } + // ================================================================================ + _writeOpen() { + this.stream.write( + ` + ` + ); + } + _writeRelationship(relationship) { + if (!this.count) { + this._writeOpen(); + } + const rId = `rId${++this.count}`; + if (relationship.TargetMode) { + this.stream.write( + `` + ); + } else { + this.stream.write( + `` + ); + } + return rId; + } + _writeClose() { + this.stream.write(""); + } + }; + module2.exports = SheetRelsWriter; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/sheet-comments-writer.js +var require_sheet_comments_writer = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/sheet-comments-writer.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var RelType = require_rel_type(); + var colCache = require_col_cache(); + var CommentXform = require_comment_xform(); + var VmlShapeXform = require_vml_shape_xform(); + var SheetCommentsWriter = class { + constructor(worksheet, sheetRelsWriter, options) { + this.id = options.id; + this.count = 0; + this._worksheet = worksheet; + this._workbook = options.workbook; + this._sheetRelsWriter = sheetRelsWriter; + } + get commentsStream() { + if (!this._commentsStream) { + this._commentsStream = this._workbook._openStream(`/xl/comments${this.id}.xml`); + } + return this._commentsStream; + } + get vmlStream() { + if (!this._vmlStream) { + this._vmlStream = this._workbook._openStream(`xl/drawings/vmlDrawing${this.id}.vml`); + } + return this._vmlStream; + } + _addRelationships() { + const commentRel = { + Type: RelType.Comments, + Target: `../comments${this.id}.xml` + }; + this._sheetRelsWriter.addRelationship(commentRel); + const vmlDrawingRel = { + Type: RelType.VmlDrawing, + Target: `../drawings/vmlDrawing${this.id}.vml` + }; + this.vmlRelId = this._sheetRelsWriter.addRelationship(vmlDrawingRel); + } + _addCommentRefs() { + this._workbook.commentRefs.push({ + commentName: `comments${this.id}`, + vmlDrawing: `vmlDrawing${this.id}` + }); + } + _writeOpen() { + this.commentsStream.write( + 'Author' + ); + this.vmlStream.write( + '' + ); + } + _writeComment(comment, index) { + const commentXform = new CommentXform(); + const commentsXmlStream = new XmlStream(); + commentXform.render(commentsXmlStream, comment); + this.commentsStream.write(commentsXmlStream.xml); + const vmlShapeXform = new VmlShapeXform(); + const vmlXmlStream = new XmlStream(); + vmlShapeXform.render(vmlXmlStream, comment, index); + this.vmlStream.write(vmlXmlStream.xml); + } + _writeClose() { + this.commentsStream.write(""); + this.vmlStream.write(""); + } + addComments(comments) { + if (comments && comments.length) { + if (!this.startedData) { + this._worksheet.comments = []; + this._writeOpen(); + this._addRelationships(); + this._addCommentRefs(); + this.startedData = true; + } + comments.forEach((item) => { + item.refAddress = colCache.decodeAddress(item.ref); + }); + comments.forEach((comment) => { + this._writeComment(comment, this.count); + this.count += 1; + }); + } + } + commit() { + if (this.count) { + this._writeClose(); + this.commentsStream.end(); + this.vmlStream.end(); + } + } + }; + module2.exports = SheetCommentsWriter; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/worksheet-writer.js +var require_worksheet_writer = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/worksheet-writer.js"(exports2, module2) { + var _2 = require_under_dash(); + var RelType = require_rel_type(); + var colCache = require_col_cache(); + var Encryptor = require_encryptor(); + var Dimensions = require_range4(); + var StringBuf = require_string_buf(); + var Row = require_row(); + var Column = require_column(); + var SheetRelsWriter = require_sheet_rels_writer(); + var SheetCommentsWriter = require_sheet_comments_writer(); + var DataValidations = require_data_validations(); + var xmlBuffer = new StringBuf(); + var ListXform = require_list_xform(); + var DataValidationsXform = require_data_validations_xform(); + var SheetPropertiesXform = require_sheet_properties_xform(); + var SheetFormatPropertiesXform = require_sheet_format_properties_xform(); + var ColXform = require_col_xform(); + var RowXform = require_row_xform(); + var HyperlinkXform = require_hyperlink_xform(); + var SheetViewXform = require_sheet_view_xform(); + var SheetProtectionXform = require_sheet_protection_xform(); + var PageMarginsXform = require_page_margins_xform(); + var PageSetupXform = require_page_setup_xform(); + var AutoFilterXform = require_auto_filter_xform(); + var PictureXform = require_picture_xform(); + var ConditionalFormattingsXform = require_conditional_formattings_xform(); + var HeaderFooterXform = require_header_footer_xform(); + var RowBreaksXform = require_row_breaks_xform(); + var xform = { + dataValidations: new DataValidationsXform(), + sheetProperties: new SheetPropertiesXform(), + sheetFormatProperties: new SheetFormatPropertiesXform(), + columns: new ListXform({ tag: "cols", length: false, childXform: new ColXform() }), + row: new RowXform(), + hyperlinks: new ListXform({ tag: "hyperlinks", length: false, childXform: new HyperlinkXform() }), + sheetViews: new ListXform({ tag: "sheetViews", length: false, childXform: new SheetViewXform() }), + sheetProtection: new SheetProtectionXform(), + pageMargins: new PageMarginsXform(), + pageSeteup: new PageSetupXform(), + autoFilter: new AutoFilterXform(), + picture: new PictureXform(), + conditionalFormattings: new ConditionalFormattingsXform(), + headerFooter: new HeaderFooterXform(), + rowBreaks: new RowBreaksXform() + }; + var WorksheetWriter = class { + constructor(options) { + this.id = options.id; + this.name = options.name || `Sheet${this.id}`; + this.state = options.state || "visible"; + this._rows = []; + this._columns = null; + this._keys = {}; + this._merges = []; + this._merges.add = function() { + }; + this._sheetRelsWriter = new SheetRelsWriter(options); + this._sheetCommentsWriter = new SheetCommentsWriter(this, this._sheetRelsWriter, options); + this._dimensions = new Dimensions(); + this._rowZero = 1; + this.committed = false; + this.dataValidations = new DataValidations(); + this._formulae = {}; + this._siFormulae = 0; + this.conditionalFormatting = []; + this.rowBreaks = []; + this.properties = Object.assign( + {}, + { + defaultRowHeight: 15, + dyDescent: 55, + outlineLevelCol: 0, + outlineLevelRow: 0 + }, + options.properties + ); + this.headerFooter = Object.assign( + {}, + { + differentFirst: false, + differentOddEven: false, + oddHeader: null, + oddFooter: null, + evenHeader: null, + evenFooter: null, + firstHeader: null, + firstFooter: null + }, + options.headerFooter + ); + this.pageSetup = Object.assign( + {}, + { + margins: { left: 0.7, right: 0.7, top: 0.75, bottom: 0.75, header: 0.3, footer: 0.3 }, + orientation: "portrait", + horizontalDpi: 4294967295, + verticalDpi: 4294967295, + fitToPage: !!(options.pageSetup && (options.pageSetup.fitToWidth || options.pageSetup.fitToHeight) && !options.pageSetup.scale), + pageOrder: "downThenOver", + blackAndWhite: false, + draft: false, + cellComments: "None", + errors: "displayed", + scale: 100, + fitToWidth: 1, + fitToHeight: 1, + paperSize: void 0, + showRowColHeaders: false, + showGridLines: false, + horizontalCentered: false, + verticalCentered: false, + rowBreaks: null, + colBreaks: null + }, + options.pageSetup + ); + this.useSharedStrings = options.useSharedStrings || false; + this._workbook = options.workbook; + this.hasComments = false; + this._views = options.views || []; + this.autoFilter = options.autoFilter || null; + this._media = []; + this.sheetProtection = null; + this._writeOpenWorksheet(); + this.startedData = false; + } + get workbook() { + return this._workbook; + } + get stream() { + if (!this._stream) { + this._stream = this._workbook._openStream(`/xl/worksheets/sheet${this.id}.xml`); + this._stream.pause(); + } + return this._stream; + } + // destroy - not a valid operation for a streaming writer + // even though some streamers might be able to, it's a bad idea. + destroy() { + throw new Error("Invalid Operation: destroy"); + } + commit() { + if (this.committed) { + return; + } + this._rows.forEach((cRow) => { + if (cRow) { + this._writeRow(cRow); + } + }); + this._rows = null; + if (!this.startedData) { + this._writeOpenSheetData(); + } + this._writeCloseSheetData(); + this._writeAutoFilter(); + this._writeMergeCells(); + this._writeHyperlinks(); + this._writeConditionalFormatting(); + this._writeDataValidations(); + this._writeSheetProtection(); + this._writePageMargins(); + this._writePageSetup(); + this._writeBackground(); + this._writeHeaderFooter(); + this._writeRowBreaks(); + this._writeLegacyData(); + this._writeCloseWorksheet(); + this.stream.end(); + this._sheetCommentsWriter.commit(); + this._sheetRelsWriter.commit(); + this.committed = true; + } + // return the current dimensions of the writer + get dimensions() { + return this._dimensions; + } + get views() { + return this._views; + } + // ========================================================================= + // Columns + // get the current columns array. + get columns() { + return this._columns; + } + // set the columns from an array of column definitions. + // Note: any headers defined will overwrite existing values. + set columns(value) { + this._headerRowCount = value.reduce((pv, cv) => { + const headerCount = cv.header && 1 || cv.headers && cv.headers.length || 0; + return Math.max(pv, headerCount); + }, 0); + let count = 1; + const columns = this._columns = []; + value.forEach((defn) => { + const column = new Column(this, count++, false); + columns.push(column); + column.defn = defn; + }); + } + getColumnKey(key) { + return this._keys[key]; + } + setColumnKey(key, value) { + this._keys[key] = value; + } + deleteColumnKey(key) { + delete this._keys[key]; + } + eachColumnKey(f) { + _2.each(this._keys, f); + } + // get a single column by col number. If it doesn't exist, it and any gaps before it + // are created. + getColumn(c) { + if (typeof c === "string") { + const col = this._keys[c]; + if (col) return col; + c = colCache.l2n(c); + } + if (!this._columns) { + this._columns = []; + } + if (c > this._columns.length) { + let n = this._columns.length + 1; + while (n <= c) { + this._columns.push(new Column(this, n++)); + } + } + return this._columns[c - 1]; + } + // ========================================================================= + // Rows + get _nextRow() { + return this._rowZero + this._rows.length; + } + // iterate over every uncommitted row in the worksheet, including maybe empty rows + eachRow(options, iteratee) { + if (!iteratee) { + iteratee = options; + options = void 0; + } + if (options && options.includeEmpty) { + const n = this._nextRow; + for (let i = this._rowZero; i < n; i++) { + iteratee(this.getRow(i), i); + } + } else { + this._rows.forEach((row) => { + if (row.hasValues) { + iteratee(row, row.number); + } + }); + } + } + _commitRow(cRow) { + let found = false; + while (this._rows.length && !found) { + const row = this._rows.shift(); + this._rowZero++; + if (row) { + this._writeRow(row); + found = row.number === cRow.number; + this._rowZero = row.number + 1; + } + } + } + get lastRow() { + if (this._rows.length) { + return this._rows[this._rows.length - 1]; + } + return void 0; + } + // find a row (if exists) by row number + findRow(rowNumber) { + const index = rowNumber - this._rowZero; + return this._rows[index]; + } + getRow(rowNumber) { + const index = rowNumber - this._rowZero; + if (index < 0) { + throw new Error("Out of bounds: this row has been committed"); + } + let row = this._rows[index]; + if (!row) { + this._rows[index] = row = new Row(this, rowNumber); + } + return row; + } + addRow(value) { + const row = new Row(this, this._nextRow); + this._rows[row.number - this._rowZero] = row; + row.values = value; + return row; + } + // ================================================================================ + // Cells + // returns the cell at [r,c] or address given by r. If not found, return undefined + findCell(r, c) { + const address = colCache.getAddress(r, c); + const row = this.findRow(address.row); + return row ? row.findCell(address.column) : void 0; + } + // return the cell at [r,c] or address given by r. If not found, create a new one. + getCell(r, c) { + const address = colCache.getAddress(r, c); + const row = this.getRow(address.row); + return row.getCellEx(address); + } + mergeCells(...cells) { + const dimensions = new Dimensions(cells); + this._merges.forEach((merge) => { + if (merge.intersects(dimensions)) { + throw new Error("Cannot merge already merged cells"); + } + }); + const master = this.getCell(dimensions.top, dimensions.left); + for (let i = dimensions.top; i <= dimensions.bottom; i++) { + for (let j = dimensions.left; j <= dimensions.right; j++) { + if (i > dimensions.top || j > dimensions.left) { + this.getCell(i, j).merge(master); + } + } + } + this._merges.push(dimensions); + } + // =========================================================================== + // Conditional Formatting + addConditionalFormatting(cf) { + this.conditionalFormatting.push(cf); + } + removeConditionalFormatting(filter) { + if (typeof filter === "number") { + this.conditionalFormatting.splice(filter, 1); + } else if (filter instanceof Function) { + this.conditionalFormatting = this.conditionalFormatting.filter(filter); + } else { + this.conditionalFormatting = []; + } + } + // ========================================================================= + addBackgroundImage(imageId) { + this._background = { + imageId + }; + } + getBackgroundImageId() { + return this._background && this._background.imageId; + } + // ========================================================================= + // Worksheet Protection + protect(password, options) { + return new Promise((resolve) => { + this.sheetProtection = { + sheet: true + }; + if (options && "spinCount" in options) { + options.spinCount = Number.isFinite(options.spinCount) ? Math.round(Math.max(0, options.spinCount)) : 1e5; + } + if (password) { + this.sheetProtection.algorithmName = "SHA-512"; + this.sheetProtection.saltValue = Encryptor.randomBytes(16).toString("base64"); + this.sheetProtection.spinCount = options && "spinCount" in options ? options.spinCount : 1e5; + this.sheetProtection.hashValue = Encryptor.convertPasswordToHash( + password, + "SHA512", + this.sheetProtection.saltValue, + this.sheetProtection.spinCount + ); + } + if (options) { + this.sheetProtection = Object.assign(this.sheetProtection, options); + if (!password && "spinCount" in options) { + delete this.sheetProtection.spinCount; + } + } + resolve(); + }); + } + unprotect() { + this.sheetProtection = null; + } + // ================================================================================ + _write(text) { + xmlBuffer.reset(); + xmlBuffer.addText(text); + this.stream.write(xmlBuffer); + } + _writeSheetProperties(xmlBuf, properties, pageSetup) { + const sheetPropertiesModel = { + outlineProperties: properties && properties.outlineProperties, + tabColor: properties && properties.tabColor, + pageSetup: pageSetup && pageSetup.fitToPage ? { + fitToPage: pageSetup.fitToPage + } : void 0 + }; + xmlBuf.addText(xform.sheetProperties.toXml(sheetPropertiesModel)); + } + _writeSheetFormatProperties(xmlBuf, properties) { + const sheetFormatPropertiesModel = properties ? { + defaultRowHeight: properties.defaultRowHeight, + dyDescent: properties.dyDescent, + outlineLevelCol: properties.outlineLevelCol, + outlineLevelRow: properties.outlineLevelRow + } : void 0; + if (properties.defaultColWidth) { + sheetFormatPropertiesModel.defaultColWidth = properties.defaultColWidth; + } + xmlBuf.addText(xform.sheetFormatProperties.toXml(sheetFormatPropertiesModel)); + } + _writeOpenWorksheet() { + xmlBuffer.reset(); + xmlBuffer.addText(''); + xmlBuffer.addText( + '' + ); + this._writeSheetProperties(xmlBuffer, this.properties, this.pageSetup); + xmlBuffer.addText(xform.sheetViews.toXml(this.views)); + this._writeSheetFormatProperties(xmlBuffer, this.properties); + this.stream.write(xmlBuffer); + } + _writeColumns() { + const cols = Column.toModel(this.columns); + if (cols) { + xform.columns.prepare(cols, { styles: this._workbook.styles }); + this.stream.write(xform.columns.toXml(cols)); + } + } + _writeOpenSheetData() { + this._write(""); + } + _writeRow(row) { + if (!this.startedData) { + this._writeColumns(); + this._writeOpenSheetData(); + this.startedData = true; + } + if (row.hasValues || row.height) { + const { model } = row; + const options = { + styles: this._workbook.styles, + sharedStrings: this.useSharedStrings ? this._workbook.sharedStrings : void 0, + hyperlinks: this._sheetRelsWriter.hyperlinksProxy, + merges: this._merges, + formulae: this._formulae, + siFormulae: this._siFormulae, + comments: [] + }; + xform.row.prepare(model, options); + this.stream.write(xform.row.toXml(model)); + if (options.comments.length) { + this.hasComments = true; + this._sheetCommentsWriter.addComments(options.comments); + } + } + } + _writeCloseSheetData() { + this._write(""); + } + _writeMergeCells() { + if (this._merges.length) { + xmlBuffer.reset(); + xmlBuffer.addText(``); + this._merges.forEach((merge) => { + xmlBuffer.addText(``); + }); + xmlBuffer.addText(""); + this.stream.write(xmlBuffer); + } + } + _writeHyperlinks() { + this.stream.write(xform.hyperlinks.toXml(this._sheetRelsWriter._hyperlinks)); + } + _writeConditionalFormatting() { + const options = { + styles: this._workbook.styles + }; + xform.conditionalFormattings.prepare(this.conditionalFormatting, options); + this.stream.write(xform.conditionalFormattings.toXml(this.conditionalFormatting)); + } + _writeRowBreaks() { + this.stream.write(xform.rowBreaks.toXml(this.rowBreaks)); + } + _writeDataValidations() { + this.stream.write(xform.dataValidations.toXml(this.dataValidations.model)); + } + _writeSheetProtection() { + this.stream.write(xform.sheetProtection.toXml(this.sheetProtection)); + } + _writePageMargins() { + this.stream.write(xform.pageMargins.toXml(this.pageSetup.margins)); + } + _writePageSetup() { + this.stream.write(xform.pageSeteup.toXml(this.pageSetup)); + } + _writeHeaderFooter() { + this.stream.write(xform.headerFooter.toXml(this.headerFooter)); + } + _writeAutoFilter() { + this.stream.write(xform.autoFilter.toXml(this.autoFilter)); + } + _writeBackground() { + if (this._background) { + if (this._background.imageId !== void 0) { + const image = this._workbook.getImage(this._background.imageId); + const pictureId = this._sheetRelsWriter.addMedia({ + Target: `../media/${image.name}`, + Type: RelType.Image + }); + this._background = { + ...this._background, + rId: pictureId + }; + } + this.stream.write(xform.picture.toXml({ rId: this._background.rId })); + } + } + _writeLegacyData() { + if (this.hasComments) { + xmlBuffer.reset(); + xmlBuffer.addText(``); + this.stream.write(xmlBuffer); + } + } + _writeDimensions() { + } + _writeCloseWorksheet() { + this._write(""); + } + }; + module2.exports = WorksheetWriter; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/workbook-writer.js +var require_workbook_writer = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/workbook-writer.js"(exports2, module2) { + var fs = require("fs"); + var Archiver = require_archiver(); + var StreamBuf = require_stream_buf(); + var RelType = require_rel_type(); + var StylesXform = require_styles_xform(); + var SharedStrings = require_shared_strings(); + var DefinedNames = require_defined_names(); + var CoreXform = require_core_xform(); + var RelationshipsXform = require_relationships_xform(); + var ContentTypesXform = require_content_types_xform(); + var AppXform = require_app_xform(); + var WorkbookXform = require_workbook_xform(); + var SharedStringsXform = require_shared_strings_xform(); + var WorksheetWriter = require_worksheet_writer(); + var theme1Xml = require_theme1(); + var WorkbookWriter = class { + constructor(options) { + options = options || {}; + this.created = options.created || /* @__PURE__ */ new Date(); + this.modified = options.modified || this.created; + this.creator = options.creator || "ExcelJS"; + this.lastModifiedBy = options.lastModifiedBy || "ExcelJS"; + this.lastPrinted = options.lastPrinted; + this.useSharedStrings = options.useSharedStrings || false; + this.sharedStrings = new SharedStrings(); + this.styles = options.useStyles ? new StylesXform(true) : new StylesXform.Mock(true); + this._definedNames = new DefinedNames(); + this._worksheets = []; + this.views = []; + this.zipOptions = options.zip; + this.media = []; + this.commentRefs = []; + this.zip = Archiver("zip", this.zipOptions); + if (options.stream) { + this.stream = options.stream; + } else if (options.filename) { + this.stream = fs.createWriteStream(options.filename); + } else { + this.stream = new StreamBuf(); + } + this.zip.pipe(this.stream); + this.promise = Promise.all([this.addThemes(), this.addOfficeRels()]); + } + get definedNames() { + return this._definedNames; + } + _openStream(path) { + const stream = new StreamBuf({ bufSize: 65536, batch: true }); + this.zip.append(stream, { name: path }); + stream.on("finish", () => { + stream.emit("zipped"); + }); + return stream; + } + _commitWorksheets() { + const commitWorksheet = function(worksheet) { + if (!worksheet.committed) { + return new Promise((resolve) => { + worksheet.stream.on("zipped", () => { + resolve(); + }); + worksheet.commit(); + }); + } + return Promise.resolve(); + }; + const promises = this._worksheets.map(commitWorksheet); + if (promises.length) { + return Promise.all(promises); + } + return Promise.resolve(); + } + async commit() { + await this.promise; + await this.addMedia(); + await this._commitWorksheets(); + await Promise.all([ + this.addContentTypes(), + this.addApp(), + this.addCore(), + this.addSharedStrings(), + this.addStyles(), + this.addWorkbookRels() + ]); + await this.addWorkbook(); + return this._finalize(); + } + get nextId() { + let i; + for (i = 1; i < this._worksheets.length; i++) { + if (!this._worksheets[i]) { + return i; + } + } + return this._worksheets.length || 1; + } + addImage(image) { + const id = this.media.length; + const medium = Object.assign({}, image, { type: "image", name: `image${id}.${image.extension}` }); + this.media.push(medium); + return id; + } + getImage(id) { + return this.media[id]; + } + addWorksheet(name, options) { + options = options || {}; + const useSharedStrings = options.useSharedStrings !== void 0 ? options.useSharedStrings : this.useSharedStrings; + if (options.tabColor) { + console.trace("tabColor option has moved to { properties: tabColor: {...} }"); + options.properties = Object.assign( + { + tabColor: options.tabColor + }, + options.properties + ); + } + const id = this.nextId; + name = name || `sheet${id}`; + const worksheet = new WorksheetWriter({ + id, + name, + workbook: this, + useSharedStrings, + properties: options.properties, + state: options.state, + pageSetup: options.pageSetup, + views: options.views, + autoFilter: options.autoFilter, + headerFooter: options.headerFooter + }); + this._worksheets[id] = worksheet; + return worksheet; + } + getWorksheet(id) { + if (id === void 0) { + return this._worksheets.find(() => true); + } + if (typeof id === "number") { + return this._worksheets[id]; + } + if (typeof id === "string") { + return this._worksheets.find((worksheet) => worksheet && worksheet.name === id); + } + return void 0; + } + addStyles() { + return new Promise((resolve) => { + this.zip.append(this.styles.xml, { name: "xl/styles.xml" }); + resolve(); + }); + } + addThemes() { + return new Promise((resolve) => { + this.zip.append(theme1Xml, { name: "xl/theme/theme1.xml" }); + resolve(); + }); + } + addOfficeRels() { + return new Promise((resolve) => { + const xform = new RelationshipsXform(); + const xml = xform.toXml([ + { Id: "rId1", Type: RelType.OfficeDocument, Target: "xl/workbook.xml" }, + { Id: "rId2", Type: RelType.CoreProperties, Target: "docProps/core.xml" }, + { Id: "rId3", Type: RelType.ExtenderProperties, Target: "docProps/app.xml" } + ]); + this.zip.append(xml, { name: "/_rels/.rels" }); + resolve(); + }); + } + addContentTypes() { + return new Promise((resolve) => { + const model = { + worksheets: this._worksheets.filter(Boolean), + sharedStrings: this.sharedStrings, + commentRefs: this.commentRefs, + media: this.media + }; + const xform = new ContentTypesXform(); + const xml = xform.toXml(model); + this.zip.append(xml, { name: "[Content_Types].xml" }); + resolve(); + }); + } + addMedia() { + return Promise.all( + this.media.map((medium) => { + if (medium.type === "image") { + const filename = `xl/media/${medium.name}`; + if (medium.filename) { + return this.zip.file(medium.filename, { name: filename }); + } + if (medium.buffer) { + return this.zip.append(medium.buffer, { name: filename }); + } + if (medium.base64) { + const dataimg64 = medium.base64; + const content = dataimg64.substring(dataimg64.indexOf(",") + 1); + return this.zip.append(content, { name: filename, base64: true }); + } + } + throw new Error("Unsupported media"); + }) + ); + } + addApp() { + return new Promise((resolve) => { + const model = { + worksheets: this._worksheets.filter(Boolean) + }; + const xform = new AppXform(); + const xml = xform.toXml(model); + this.zip.append(xml, { name: "docProps/app.xml" }); + resolve(); + }); + } + addCore() { + return new Promise((resolve) => { + const coreXform = new CoreXform(); + const xml = coreXform.toXml(this); + this.zip.append(xml, { name: "docProps/core.xml" }); + resolve(); + }); + } + addSharedStrings() { + if (this.sharedStrings.count) { + return new Promise((resolve) => { + const sharedStringsXform = new SharedStringsXform(); + const xml = sharedStringsXform.toXml(this.sharedStrings); + this.zip.append(xml, { name: "/xl/sharedStrings.xml" }); + resolve(); + }); + } + return Promise.resolve(); + } + addWorkbookRels() { + let count = 1; + const relationships = [ + { Id: `rId${count++}`, Type: RelType.Styles, Target: "styles.xml" }, + { Id: `rId${count++}`, Type: RelType.Theme, Target: "theme/theme1.xml" } + ]; + if (this.sharedStrings.count) { + relationships.push({ + Id: `rId${count++}`, + Type: RelType.SharedStrings, + Target: "sharedStrings.xml" + }); + } + this._worksheets.forEach((worksheet) => { + if (worksheet) { + worksheet.rId = `rId${count++}`; + relationships.push({ + Id: worksheet.rId, + Type: RelType.Worksheet, + Target: `worksheets/sheet${worksheet.id}.xml` + }); + } + }); + return new Promise((resolve) => { + const xform = new RelationshipsXform(); + const xml = xform.toXml(relationships); + this.zip.append(xml, { name: "/xl/_rels/workbook.xml.rels" }); + resolve(); + }); + } + addWorkbook() { + const { zip } = this; + const model = { + worksheets: this._worksheets.filter(Boolean), + definedNames: this._definedNames.model, + views: this.views, + properties: {}, + calcProperties: {} + }; + return new Promise((resolve) => { + const xform = new WorkbookXform(); + xform.prepare(model); + zip.append(xform.toXml(model), { name: "/xl/workbook.xml" }); + resolve(); + }); + } + _finalize() { + return new Promise((resolve, reject) => { + this.stream.on("error", reject); + this.stream.on("finish", () => { + resolve(this); + }); + this.zip.on("error", reject); + this.zip.finalize(); + }); + } + }; + module2.exports = WorkbookWriter; + } +}); + +// ../../node_modules/.pnpm/listenercount@1.0.1/node_modules/listenercount/index.js +var require_listenercount = __commonJS({ + "../../node_modules/.pnpm/listenercount@1.0.1/node_modules/listenercount/index.js"(exports2, module2) { + "use strict"; + var listenerCount = require("events").listenerCount; + listenerCount = listenerCount || function(ee, event) { + var listeners = ee && ee._events && ee._events[event]; + if (Array.isArray(listeners)) { + return listeners.length; + } else if (typeof listeners === "function") { + return 1; + } else { + return 0; + } + }; + module2.exports = listenerCount; + } +}); + +// ../../node_modules/.pnpm/buffer-indexof-polyfill@1.0.2/node_modules/buffer-indexof-polyfill/init-buffer.js +var require_init_buffer = __commonJS({ + "../../node_modules/.pnpm/buffer-indexof-polyfill@1.0.2/node_modules/buffer-indexof-polyfill/init-buffer.js"(exports2, module2) { + module2.exports = function initBuffer(val) { + var nodeVersion = process && process.version ? process.version : "v5.0.0"; + var major = nodeVersion.split(".")[0].replace("v", ""); + return major < 6 ? new Buffer(val) : Buffer.from(val); + }; + } +}); + +// ../../node_modules/.pnpm/buffer-indexof-polyfill@1.0.2/node_modules/buffer-indexof-polyfill/index.js +var require_buffer_indexof_polyfill = __commonJS({ + "../../node_modules/.pnpm/buffer-indexof-polyfill@1.0.2/node_modules/buffer-indexof-polyfill/index.js"() { + "use strict"; + var initBuffer = require_init_buffer(); + if (!Buffer.prototype.indexOf) { + Buffer.prototype.indexOf = function(value, offset) { + offset = offset || 0; + if (typeof value === "string" || value instanceof String) { + value = initBuffer(value); + } else if (typeof value === "number" || value instanceof Number) { + value = initBuffer([value]); + } + var len = value.length; + for (var i = offset; i <= this.length - len; i++) { + var mismatch = false; + for (var j = 0; j < len; j++) { + if (this[i + j] != value[j]) { + mismatch = true; + break; + } + } + if (!mismatch) { + return i; + } + } + return -1; + }; + } + function bufferLastIndexOf(value, offset) { + if (typeof value === "string" || value instanceof String) { + value = initBuffer(value); + } else if (typeof value === "number" || value instanceof Number) { + value = initBuffer([value]); + } + var len = value.length; + offset = offset || this.length - len; + for (var i = offset; i >= 0; i--) { + var mismatch = false; + for (var j = 0; j < len; j++) { + if (this[i + j] != value[j]) { + mismatch = true; + break; + } + } + if (!mismatch) { + return i; + } + } + return -1; + } + if (Buffer.prototype.lastIndexOf) { + if (initBuffer("ABC").lastIndexOf("ABC") === -1) + Buffer.prototype.lastIndexOf = bufferLastIndexOf; + } else { + Buffer.prototype.lastIndexOf = bufferLastIndexOf; + } + } +}); + +// ../../node_modules/.pnpm/traverse@0.3.9/node_modules/traverse/index.js +var require_traverse = __commonJS({ + "../../node_modules/.pnpm/traverse@0.3.9/node_modules/traverse/index.js"(exports2, module2) { + module2.exports = Traverse; + function Traverse(obj2) { + if (!(this instanceof Traverse)) return new Traverse(obj2); + this.value = obj2; + } + Traverse.prototype.get = function(ps) { + var node = this.value; + for (var i = 0; i < ps.length; i++) { + var key = ps[i]; + if (!Object.hasOwnProperty.call(node, key)) { + node = void 0; + break; + } + node = node[key]; + } + return node; + }; + Traverse.prototype.set = function(ps, value) { + var node = this.value; + for (var i = 0; i < ps.length - 1; i++) { + var key = ps[i]; + if (!Object.hasOwnProperty.call(node, key)) node[key] = {}; + node = node[key]; + } + node[ps[i]] = value; + return value; + }; + Traverse.prototype.map = function(cb) { + return walk(this.value, cb, true); + }; + Traverse.prototype.forEach = function(cb) { + this.value = walk(this.value, cb, false); + return this.value; + }; + Traverse.prototype.reduce = function(cb, init) { + var skip = arguments.length === 1; + var acc = skip ? this.value : init; + this.forEach(function(x) { + if (!this.isRoot || !skip) { + acc = cb.call(this, acc, x); + } + }); + return acc; + }; + Traverse.prototype.deepEqual = function(obj2) { + if (arguments.length !== 1) { + throw new Error( + "deepEqual requires exactly one object to compare against" + ); + } + var equal = true; + var node = obj2; + this.forEach(function(y) { + var notEqual = (function() { + equal = false; + return void 0; + }).bind(this); + if (!this.isRoot) { + if (typeof node !== "object") return notEqual(); + node = node[this.key]; + } + var x = node; + this.post(function() { + node = x; + }); + var toS = function(o) { + return Object.prototype.toString.call(o); + }; + if (this.circular) { + if (Traverse(obj2).get(this.circular.path) !== x) notEqual(); + } else if (typeof x !== typeof y) { + notEqual(); + } else if (x === null || y === null || x === void 0 || y === void 0) { + if (x !== y) notEqual(); + } else if (x.__proto__ !== y.__proto__) { + notEqual(); + } else if (x === y) { + } else if (typeof x === "function") { + if (x instanceof RegExp) { + if (x.toString() != y.toString()) notEqual(); + } else if (x !== y) notEqual(); + } else if (typeof x === "object") { + if (toS(y) === "[object Arguments]" || toS(x) === "[object Arguments]") { + if (toS(x) !== toS(y)) { + notEqual(); + } + } else if (x instanceof Date || y instanceof Date) { + if (!(x instanceof Date) || !(y instanceof Date) || x.getTime() !== y.getTime()) { + notEqual(); + } + } else { + var kx = Object.keys(x); + var ky = Object.keys(y); + if (kx.length !== ky.length) return notEqual(); + for (var i = 0; i < kx.length; i++) { + var k = kx[i]; + if (!Object.hasOwnProperty.call(y, k)) { + notEqual(); + } + } + } + } + }); + return equal; + }; + Traverse.prototype.paths = function() { + var acc = []; + this.forEach(function(x) { + acc.push(this.path); + }); + return acc; + }; + Traverse.prototype.nodes = function() { + var acc = []; + this.forEach(function(x) { + acc.push(this.node); + }); + return acc; + }; + Traverse.prototype.clone = function() { + var parents = [], nodes = []; + return (function clone(src) { + for (var i = 0; i < parents.length; i++) { + if (parents[i] === src) { + return nodes[i]; + } + } + if (typeof src === "object" && src !== null) { + var dst = copy(src); + parents.push(src); + nodes.push(dst); + Object.keys(src).forEach(function(key) { + dst[key] = clone(src[key]); + }); + parents.pop(); + nodes.pop(); + return dst; + } else { + return src; + } + })(this.value); + }; + function walk(root, cb, immutable) { + var path = []; + var parents = []; + var alive = true; + return (function walker(node_) { + var node = immutable ? copy(node_) : node_; + var modifiers = {}; + var state = { + node, + node_, + path: [].concat(path), + parent: parents.slice(-1)[0], + key: path.slice(-1)[0], + isRoot: path.length === 0, + level: path.length, + circular: null, + update: function(x) { + if (!state.isRoot) { + state.parent.node[state.key] = x; + } + state.node = x; + }, + "delete": function() { + delete state.parent.node[state.key]; + }, + remove: function() { + if (Array.isArray(state.parent.node)) { + state.parent.node.splice(state.key, 1); + } else { + delete state.parent.node[state.key]; + } + }, + before: function(f) { + modifiers.before = f; + }, + after: function(f) { + modifiers.after = f; + }, + pre: function(f) { + modifiers.pre = f; + }, + post: function(f) { + modifiers.post = f; + }, + stop: function() { + alive = false; + } + }; + if (!alive) return state; + if (typeof node === "object" && node !== null) { + state.isLeaf = Object.keys(node).length == 0; + for (var i = 0; i < parents.length; i++) { + if (parents[i].node_ === node_) { + state.circular = parents[i]; + break; + } + } + } else { + state.isLeaf = true; + } + state.notLeaf = !state.isLeaf; + state.notRoot = !state.isRoot; + var ret2 = cb.call(state, state.node); + if (ret2 !== void 0 && state.update) state.update(ret2); + if (modifiers.before) modifiers.before.call(state, state.node); + if (typeof state.node == "object" && state.node !== null && !state.circular) { + parents.push(state); + var keys = Object.keys(state.node); + keys.forEach(function(key, i2) { + path.push(key); + if (modifiers.pre) modifiers.pre.call(state, state.node[key], key); + var child = walker(state.node[key]); + if (immutable && Object.hasOwnProperty.call(state.node, key)) { + state.node[key] = child.node; + } + child.isLast = i2 == keys.length - 1; + child.isFirst = i2 == 0; + if (modifiers.post) modifiers.post.call(state, child); + path.pop(); + }); + parents.pop(); + } + if (modifiers.after) modifiers.after.call(state, state.node); + return state; + })(root).node; + } + Object.keys(Traverse.prototype).forEach(function(key) { + Traverse[key] = function(obj2) { + var args = [].slice.call(arguments, 1); + var t = Traverse(obj2); + return t[key].apply(t, args); + }; + }); + function copy(src) { + if (typeof src === "object" && src !== null) { + var dst; + if (Array.isArray(src)) { + dst = []; + } else if (src instanceof Date) { + dst = new Date(src); + } else if (src instanceof Boolean) { + dst = new Boolean(src); + } else if (src instanceof Number) { + dst = new Number(src); + } else if (src instanceof String) { + dst = new String(src); + } else { + dst = Object.create(Object.getPrototypeOf(src)); + } + Object.keys(src).forEach(function(key) { + dst[key] = src[key]; + }); + return dst; + } else return src; + } + } +}); + +// ../../node_modules/.pnpm/chainsaw@0.1.0/node_modules/chainsaw/index.js +var require_chainsaw = __commonJS({ + "../../node_modules/.pnpm/chainsaw@0.1.0/node_modules/chainsaw/index.js"(exports2, module2) { + var Traverse = require_traverse(); + var EventEmitter = require("events").EventEmitter; + module2.exports = Chainsaw; + function Chainsaw(builder) { + var saw = Chainsaw.saw(builder, {}); + var r = builder.call(saw.handlers, saw); + if (r !== void 0) saw.handlers = r; + saw.record(); + return saw.chain(); + } + Chainsaw.light = function ChainsawLight(builder) { + var saw = Chainsaw.saw(builder, {}); + var r = builder.call(saw.handlers, saw); + if (r !== void 0) saw.handlers = r; + return saw.chain(); + }; + Chainsaw.saw = function(builder, handlers) { + var saw = new EventEmitter(); + saw.handlers = handlers; + saw.actions = []; + saw.chain = function() { + var ch = Traverse(saw.handlers).map(function(node) { + if (this.isRoot) return node; + var ps = this.path; + if (typeof node === "function") { + this.update(function() { + saw.actions.push({ + path: ps, + args: [].slice.call(arguments) + }); + return ch; + }); + } + }); + process.nextTick(function() { + saw.emit("begin"); + saw.next(); + }); + return ch; + }; + saw.pop = function() { + return saw.actions.shift(); + }; + saw.next = function() { + var action = saw.pop(); + if (!action) { + saw.emit("end"); + } else if (!action.trap) { + var node = saw.handlers; + action.path.forEach(function(key) { + node = node[key]; + }); + node.apply(saw.handlers, action.args); + } + }; + saw.nest = function(cb) { + var args = [].slice.call(arguments, 1); + var autonext = true; + if (typeof cb === "boolean") { + var autonext = cb; + cb = args.shift(); + } + var s = Chainsaw.saw(builder, {}); + var r = builder.call(s.handlers, s); + if (r !== void 0) s.handlers = r; + if ("undefined" !== typeof saw.step) { + s.record(); + } + cb.apply(s.chain(), args); + if (autonext !== false) s.on("end", saw.next); + }; + saw.record = function() { + upgradeChainsaw(saw); + }; + ["trap", "down", "jump"].forEach(function(method) { + saw[method] = function() { + throw new Error("To use the trap, down and jump features, please call record() first to start recording actions."); + }; + }); + return saw; + }; + function upgradeChainsaw(saw) { + saw.step = 0; + saw.pop = function() { + return saw.actions[saw.step++]; + }; + saw.trap = function(name, cb) { + var ps = Array.isArray(name) ? name : [name]; + saw.actions.push({ + path: ps, + step: saw.step, + cb, + trap: true + }); + }; + saw.down = function(name) { + var ps = (Array.isArray(name) ? name : [name]).join("/"); + var i = saw.actions.slice(saw.step).map(function(x) { + if (x.trap && x.step <= saw.step) return false; + return x.path.join("/") == ps; + }).indexOf(true); + if (i >= 0) saw.step += i; + else saw.step = saw.actions.length; + var act = saw.actions[saw.step - 1]; + if (act && act.trap) { + saw.step = act.step; + act.cb(); + } else saw.next(); + }; + saw.jump = function(step) { + saw.step = step; + saw.next(); + }; + } + } +}); + +// ../../node_modules/.pnpm/buffers@0.1.1/node_modules/buffers/index.js +var require_buffers = __commonJS({ + "../../node_modules/.pnpm/buffers@0.1.1/node_modules/buffers/index.js"(exports2, module2) { + module2.exports = Buffers; + function Buffers(bufs) { + if (!(this instanceof Buffers)) return new Buffers(bufs); + this.buffers = bufs || []; + this.length = this.buffers.reduce(function(size, buf) { + return size + buf.length; + }, 0); + } + Buffers.prototype.push = function() { + for (var i = 0; i < arguments.length; i++) { + if (!Buffer.isBuffer(arguments[i])) { + throw new TypeError("Tried to push a non-buffer"); + } + } + for (var i = 0; i < arguments.length; i++) { + var buf = arguments[i]; + this.buffers.push(buf); + this.length += buf.length; + } + return this.length; + }; + Buffers.prototype.unshift = function() { + for (var i = 0; i < arguments.length; i++) { + if (!Buffer.isBuffer(arguments[i])) { + throw new TypeError("Tried to unshift a non-buffer"); + } + } + for (var i = 0; i < arguments.length; i++) { + var buf = arguments[i]; + this.buffers.unshift(buf); + this.length += buf.length; + } + return this.length; + }; + Buffers.prototype.copy = function(dst, dStart, start, end) { + return this.slice(start, end).copy(dst, dStart, 0, end - start); + }; + Buffers.prototype.splice = function(i, howMany) { + var buffers = this.buffers; + var index = i >= 0 ? i : this.length - i; + var reps = [].slice.call(arguments, 2); + if (howMany === void 0) { + howMany = this.length - index; + } else if (howMany > this.length - index) { + howMany = this.length - index; + } + for (var i = 0; i < reps.length; i++) { + this.length += reps[i].length; + } + var removed = new Buffers(); + var bytes = 0; + var startBytes = 0; + for (var ii = 0; ii < buffers.length && startBytes + buffers[ii].length < index; ii++) { + startBytes += buffers[ii].length; + } + if (index - startBytes > 0) { + var start = index - startBytes; + if (start + howMany < buffers[ii].length) { + removed.push(buffers[ii].slice(start, start + howMany)); + var orig = buffers[ii]; + var buf0 = new Buffer(start); + for (var i = 0; i < start; i++) { + buf0[i] = orig[i]; + } + var buf1 = new Buffer(orig.length - start - howMany); + for (var i = start + howMany; i < orig.length; i++) { + buf1[i - howMany - start] = orig[i]; + } + if (reps.length > 0) { + var reps_ = reps.slice(); + reps_.unshift(buf0); + reps_.push(buf1); + buffers.splice.apply(buffers, [ii, 1].concat(reps_)); + ii += reps_.length; + reps = []; + } else { + buffers.splice(ii, 1, buf0, buf1); + ii += 2; + } + } else { + removed.push(buffers[ii].slice(start)); + buffers[ii] = buffers[ii].slice(0, start); + ii++; + } + } + if (reps.length > 0) { + buffers.splice.apply(buffers, [ii, 0].concat(reps)); + ii += reps.length; + } + while (removed.length < howMany) { + var buf = buffers[ii]; + var len = buf.length; + var take = Math.min(len, howMany - removed.length); + if (take === len) { + removed.push(buf); + buffers.splice(ii, 1); + } else { + removed.push(buf.slice(0, take)); + buffers[ii] = buffers[ii].slice(take); + } + } + this.length -= removed.length; + return removed; + }; + Buffers.prototype.slice = function(i, j) { + var buffers = this.buffers; + if (j === void 0) j = this.length; + if (i === void 0) i = 0; + if (j > this.length) j = this.length; + var startBytes = 0; + for (var si = 0; si < buffers.length && startBytes + buffers[si].length <= i; si++) { + startBytes += buffers[si].length; + } + var target = new Buffer(j - i); + var ti = 0; + for (var ii = si; ti < j - i && ii < buffers.length; ii++) { + var len = buffers[ii].length; + var start = ti === 0 ? i - startBytes : 0; + var end = ti + len >= j - i ? Math.min(start + (j - i) - ti, len) : len; + buffers[ii].copy(target, ti, start, end); + ti += end - start; + } + return target; + }; + Buffers.prototype.pos = function(i) { + if (i < 0 || i >= this.length) throw new Error("oob"); + var l2 = i, bi = 0, bu = null; + for (; ; ) { + bu = this.buffers[bi]; + if (l2 < bu.length) { + return { buf: bi, offset: l2 }; + } else { + l2 -= bu.length; + } + bi++; + } + }; + Buffers.prototype.get = function get(i) { + var pos = this.pos(i); + return this.buffers[pos.buf].get(pos.offset); + }; + Buffers.prototype.set = function set(i, b) { + var pos = this.pos(i); + return this.buffers[pos.buf].set(pos.offset, b); + }; + Buffers.prototype.indexOf = function(needle, offset) { + if ("string" === typeof needle) { + needle = new Buffer(needle); + } else if (needle instanceof Buffer) { + } else { + throw new Error("Invalid type for a search string"); + } + if (!needle.length) { + return 0; + } + if (!this.length) { + return -1; + } + var i = 0, j = 0, match = 0, mstart, pos = 0; + if (offset) { + var p = this.pos(offset); + i = p.buf; + j = p.offset; + pos = offset; + } + for (; ; ) { + while (j >= this.buffers[i].length) { + j = 0; + i++; + if (i >= this.buffers.length) { + return -1; + } + } + var char = this.buffers[i][j]; + if (char == needle[match]) { + if (match == 0) { + mstart = { + i, + j, + pos + }; + } + match++; + if (match == needle.length) { + return mstart.pos; + } + } else if (match != 0) { + i = mstart.i; + j = mstart.j; + pos = mstart.pos; + match = 0; + } + j++; + pos++; + } + }; + Buffers.prototype.toBuffer = function() { + return this.slice(); + }; + Buffers.prototype.toString = function(encoding, start, end) { + return this.slice(start, end).toString(encoding); + }; + } +}); + +// ../../node_modules/.pnpm/binary@0.3.0/node_modules/binary/lib/vars.js +var require_vars = __commonJS({ + "../../node_modules/.pnpm/binary@0.3.0/node_modules/binary/lib/vars.js"(exports2, module2) { + module2.exports = function(store) { + function getset(name, value) { + var node = vars.store; + var keys = name.split("."); + keys.slice(0, -1).forEach(function(k) { + if (node[k] === void 0) node[k] = {}; + node = node[k]; + }); + var key = keys[keys.length - 1]; + if (arguments.length == 1) { + return node[key]; + } else { + return node[key] = value; + } + } + var vars = { + get: function(name) { + return getset(name); + }, + set: function(name, value) { + return getset(name, value); + }, + store: store || {} + }; + return vars; + }; + } +}); + +// ../../node_modules/.pnpm/binary@0.3.0/node_modules/binary/index.js +var require_binary2 = __commonJS({ + "../../node_modules/.pnpm/binary@0.3.0/node_modules/binary/index.js"(exports2, module2) { + var Chainsaw = require_chainsaw(); + var EventEmitter = require("events").EventEmitter; + var Buffers = require_buffers(); + var Vars = require_vars(); + var Stream = require("stream").Stream; + exports2 = module2.exports = function(bufOrEm, eventName) { + if (Buffer.isBuffer(bufOrEm)) { + return exports2.parse(bufOrEm); + } + var s = exports2.stream(); + if (bufOrEm && bufOrEm.pipe) { + bufOrEm.pipe(s); + } else if (bufOrEm) { + bufOrEm.on(eventName || "data", function(buf) { + s.write(buf); + }); + bufOrEm.on("end", function() { + s.end(); + }); + } + return s; + }; + exports2.stream = function(input) { + if (input) return exports2.apply(null, arguments); + var pending = null; + function getBytes(bytes, cb, skip) { + pending = { + bytes, + skip, + cb: function(buf) { + pending = null; + cb(buf); + } + }; + dispatch(); + } + var offset = null; + function dispatch() { + if (!pending) { + if (caughtEnd) done = true; + return; + } + if (typeof pending === "function") { + pending(); + } else { + var bytes = offset + pending.bytes; + if (buffers.length >= bytes) { + var buf; + if (offset == null) { + buf = buffers.splice(0, bytes); + if (!pending.skip) { + buf = buf.slice(); + } + } else { + if (!pending.skip) { + buf = buffers.slice(offset, bytes); + } + offset = bytes; + } + if (pending.skip) { + pending.cb(); + } else { + pending.cb(buf); + } + } + } + } + function builder(saw) { + function next() { + if (!done) saw.next(); + } + var self2 = words(function(bytes, cb) { + return function(name) { + getBytes(bytes, function(buf) { + vars.set(name, cb(buf)); + next(); + }); + }; + }); + self2.tap = function(cb) { + saw.nest(cb, vars.store); + }; + self2.into = function(key, cb) { + if (!vars.get(key)) vars.set(key, {}); + var parent = vars; + vars = Vars(parent.get(key)); + saw.nest(function() { + cb.apply(this, arguments); + this.tap(function() { + vars = parent; + }); + }, vars.store); + }; + self2.flush = function() { + vars.store = {}; + next(); + }; + self2.loop = function(cb) { + var end = false; + saw.nest(false, function loop() { + this.vars = vars.store; + cb.call(this, function() { + end = true; + next(); + }, vars.store); + this.tap(function() { + if (end) saw.next(); + else loop.call(this); + }.bind(this)); + }, vars.store); + }; + self2.buffer = function(name, bytes) { + if (typeof bytes === "string") { + bytes = vars.get(bytes); + } + getBytes(bytes, function(buf) { + vars.set(name, buf); + next(); + }); + }; + self2.skip = function(bytes) { + if (typeof bytes === "string") { + bytes = vars.get(bytes); + } + getBytes(bytes, function() { + next(); + }); + }; + self2.scan = function find(name, search) { + if (typeof search === "string") { + search = new Buffer(search); + } else if (!Buffer.isBuffer(search)) { + throw new Error("search must be a Buffer or a string"); + } + var taken = 0; + pending = function() { + var pos = buffers.indexOf(search, offset + taken); + var i = pos - offset - taken; + if (pos !== -1) { + pending = null; + if (offset != null) { + vars.set( + name, + buffers.slice(offset, offset + taken + i) + ); + offset += taken + i + search.length; + } else { + vars.set( + name, + buffers.slice(0, taken + i) + ); + buffers.splice(0, taken + i + search.length); + } + next(); + dispatch(); + } else { + i = Math.max(buffers.length - search.length - offset - taken, 0); + } + taken += i; + }; + dispatch(); + }; + self2.peek = function(cb) { + offset = 0; + saw.nest(function() { + cb.call(this, vars.store); + this.tap(function() { + offset = null; + }); + }); + }; + return self2; + } + ; + var stream = Chainsaw.light(builder); + stream.writable = true; + var buffers = Buffers(); + stream.write = function(buf) { + buffers.push(buf); + dispatch(); + }; + var vars = Vars(); + var done = false, caughtEnd = false; + stream.end = function() { + caughtEnd = true; + }; + stream.pipe = Stream.prototype.pipe; + Object.getOwnPropertyNames(EventEmitter.prototype).forEach(function(name) { + stream[name] = EventEmitter.prototype[name]; + }); + return stream; + }; + exports2.parse = function parse2(buffer) { + var self2 = words(function(bytes, cb) { + return function(name) { + if (offset + bytes <= buffer.length) { + var buf = buffer.slice(offset, offset + bytes); + offset += bytes; + vars.set(name, cb(buf)); + } else { + vars.set(name, null); + } + return self2; + }; + }); + var offset = 0; + var vars = Vars(); + self2.vars = vars.store; + self2.tap = function(cb) { + cb.call(self2, vars.store); + return self2; + }; + self2.into = function(key, cb) { + if (!vars.get(key)) { + vars.set(key, {}); + } + var parent = vars; + vars = Vars(parent.get(key)); + cb.call(self2, vars.store); + vars = parent; + return self2; + }; + self2.loop = function(cb) { + var end = false; + var ender = function() { + end = true; + }; + while (end === false) { + cb.call(self2, ender, vars.store); + } + return self2; + }; + self2.buffer = function(name, size) { + if (typeof size === "string") { + size = vars.get(size); + } + var buf = buffer.slice(offset, Math.min(buffer.length, offset + size)); + offset += size; + vars.set(name, buf); + return self2; + }; + self2.skip = function(bytes) { + if (typeof bytes === "string") { + bytes = vars.get(bytes); + } + offset += bytes; + return self2; + }; + self2.scan = function(name, search) { + if (typeof search === "string") { + search = new Buffer(search); + } else if (!Buffer.isBuffer(search)) { + throw new Error("search must be a Buffer or a string"); + } + vars.set(name, null); + for (var i = 0; i + offset <= buffer.length - search.length + 1; i++) { + for (var j = 0; j < search.length && buffer[offset + i + j] === search[j]; j++) ; + if (j === search.length) break; + } + vars.set(name, buffer.slice(offset, offset + i)); + offset += i + search.length; + return self2; + }; + self2.peek = function(cb) { + var was = offset; + cb.call(self2, vars.store); + offset = was; + return self2; + }; + self2.flush = function() { + vars.store = {}; + return self2; + }; + self2.eof = function() { + return offset >= buffer.length; + }; + return self2; + }; + function decodeLEu(bytes) { + var acc = 0; + for (var i = 0; i < bytes.length; i++) { + acc += Math.pow(256, i) * bytes[i]; + } + return acc; + } + function decodeBEu(bytes) { + var acc = 0; + for (var i = 0; i < bytes.length; i++) { + acc += Math.pow(256, bytes.length - i - 1) * bytes[i]; + } + return acc; + } + function decodeBEs(bytes) { + var val = decodeBEu(bytes); + if ((bytes[0] & 128) == 128) { + val -= Math.pow(256, bytes.length); + } + return val; + } + function decodeLEs(bytes) { + var val = decodeLEu(bytes); + if ((bytes[bytes.length - 1] & 128) == 128) { + val -= Math.pow(256, bytes.length); + } + return val; + } + function words(decode) { + var self2 = {}; + [1, 2, 4, 8].forEach(function(bytes) { + var bits = bytes * 8; + self2["word" + bits + "le"] = self2["word" + bits + "lu"] = decode(bytes, decodeLEu); + self2["word" + bits + "ls"] = decode(bytes, decodeLEs); + self2["word" + bits + "be"] = self2["word" + bits + "bu"] = decode(bytes, decodeBEu); + self2["word" + bits + "bs"] = decode(bytes, decodeBEs); + }); + self2.word8 = self2.word8u = self2.word8be; + self2.word8s = self2.word8bs; + return self2; + } + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/es5.js +var require_es5 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/es5.js"(exports2, module2) { + var isES5 = (function() { + "use strict"; + return this === void 0; + })(); + if (isES5) { + module2.exports = { + freeze: Object.freeze, + defineProperty: Object.defineProperty, + getDescriptor: Object.getOwnPropertyDescriptor, + keys: Object.keys, + names: Object.getOwnPropertyNames, + getPrototypeOf: Object.getPrototypeOf, + isArray: Array.isArray, + isES5, + propertyIsWritable: function(obj2, prop) { + var descriptor = Object.getOwnPropertyDescriptor(obj2, prop); + return !!(!descriptor || descriptor.writable || descriptor.set); + } + }; + } else { + has = {}.hasOwnProperty; + str = {}.toString; + proto = {}.constructor.prototype; + ObjectKeys = function(o) { + var ret2 = []; + for (var key in o) { + if (has.call(o, key)) { + ret2.push(key); + } + } + return ret2; + }; + ObjectGetDescriptor = function(o, key) { + return { value: o[key] }; + }; + ObjectDefineProperty = function(o, key, desc) { + o[key] = desc.value; + return o; + }; + ObjectFreeze = function(obj2) { + return obj2; + }; + ObjectGetPrototypeOf = function(obj2) { + try { + return Object(obj2).constructor.prototype; + } catch (e) { + return proto; + } + }; + ArrayIsArray = function(obj2) { + try { + return str.call(obj2) === "[object Array]"; + } catch (e) { + return false; + } + }; + module2.exports = { + isArray: ArrayIsArray, + keys: ObjectKeys, + names: ObjectKeys, + defineProperty: ObjectDefineProperty, + getDescriptor: ObjectGetDescriptor, + freeze: ObjectFreeze, + getPrototypeOf: ObjectGetPrototypeOf, + isES5, + propertyIsWritable: function() { + return true; + } + }; + } + var has; + var str; + var proto; + var ObjectKeys; + var ObjectGetDescriptor; + var ObjectDefineProperty; + var ObjectFreeze; + var ObjectGetPrototypeOf; + var ArrayIsArray; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/util.js +var require_util6 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/util.js"(exports, module) { + "use strict"; + var es5 = require_es5(); + var canEvaluate = typeof navigator == "undefined"; + var errorObj = { e: {} }; + var tryCatchTarget; + var globalObject = typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : exports !== void 0 ? exports : null; + function tryCatcher() { + try { + var target = tryCatchTarget; + tryCatchTarget = null; + return target.apply(this, arguments); + } catch (e) { + errorObj.e = e; + return errorObj; + } + } + function tryCatch(fn) { + tryCatchTarget = fn; + return tryCatcher; + } + var inherits = function(Child, Parent) { + var hasProp = {}.hasOwnProperty; + function T() { + this.constructor = Child; + this.constructor$ = Parent; + for (var propertyName in Parent.prototype) { + if (hasProp.call(Parent.prototype, propertyName) && propertyName.charAt(propertyName.length - 1) !== "$") { + this[propertyName + "$"] = Parent.prototype[propertyName]; + } + } + } + T.prototype = Parent.prototype; + Child.prototype = new T(); + return Child.prototype; + }; + function isPrimitive(val) { + return val == null || val === true || val === false || typeof val === "string" || typeof val === "number"; + } + function isObject(value) { + return typeof value === "function" || typeof value === "object" && value !== null; + } + function maybeWrapAsError(maybeError) { + if (!isPrimitive(maybeError)) return maybeError; + return new Error(safeToString(maybeError)); + } + function withAppended(target, appendee) { + var len = target.length; + var ret2 = new Array(len + 1); + var i; + for (i = 0; i < len; ++i) { + ret2[i] = target[i]; + } + ret2[i] = appendee; + return ret2; + } + function getDataPropertyOrDefault(obj2, key, defaultValue) { + if (es5.isES5) { + var desc = Object.getOwnPropertyDescriptor(obj2, key); + if (desc != null) { + return desc.get == null && desc.set == null ? desc.value : defaultValue; + } + } else { + return {}.hasOwnProperty.call(obj2, key) ? obj2[key] : void 0; + } + } + function notEnumerableProp(obj2, name, value) { + if (isPrimitive(obj2)) return obj2; + var descriptor = { + value, + configurable: true, + enumerable: false, + writable: true + }; + es5.defineProperty(obj2, name, descriptor); + return obj2; + } + function thrower(r) { + throw r; + } + var inheritedDataKeys = (function() { + var excludedPrototypes = [ + Array.prototype, + Object.prototype, + Function.prototype + ]; + var isExcludedProto = function(val) { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (excludedPrototypes[i] === val) { + return true; + } + } + return false; + }; + if (es5.isES5) { + var getKeys = Object.getOwnPropertyNames; + return function(obj2) { + var ret2 = []; + var visitedKeys = /* @__PURE__ */ Object.create(null); + while (obj2 != null && !isExcludedProto(obj2)) { + var keys; + try { + keys = getKeys(obj2); + } catch (e) { + return ret2; + } + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (visitedKeys[key]) continue; + visitedKeys[key] = true; + var desc = Object.getOwnPropertyDescriptor(obj2, key); + if (desc != null && desc.get == null && desc.set == null) { + ret2.push(key); + } + } + obj2 = es5.getPrototypeOf(obj2); + } + return ret2; + }; + } else { + var hasProp = {}.hasOwnProperty; + return function(obj2) { + if (isExcludedProto(obj2)) return []; + var ret2 = []; + enumeration: for (var key in obj2) { + if (hasProp.call(obj2, key)) { + ret2.push(key); + } else { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (hasProp.call(excludedPrototypes[i], key)) { + continue enumeration; + } + } + ret2.push(key); + } + } + return ret2; + }; + } + })(); + var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/; + function isClass(fn) { + try { + if (typeof fn === "function") { + var keys = es5.names(fn.prototype); + var hasMethods = es5.isES5 && keys.length > 1; + var hasMethodsOtherThanConstructor = keys.length > 0 && !(keys.length === 1 && keys[0] === "constructor"); + var hasThisAssignmentAndStaticMethods = thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0; + if (hasMethods || hasMethodsOtherThanConstructor || hasThisAssignmentAndStaticMethods) { + return true; + } + } + return false; + } catch (e) { + return false; + } + } + function toFastProperties(obj) { + function FakeConstructor() { + } + FakeConstructor.prototype = obj; + var l = 8; + while (l--) new FakeConstructor(); + return obj; + eval(obj); + } + var rident = /^[a-z$_][a-z$_0-9]*$/i; + function isIdentifier(str) { + return rident.test(str); + } + function filledRange(count, prefix, suffix) { + var ret2 = new Array(count); + for (var i = 0; i < count; ++i) { + ret2[i] = prefix + i + suffix; + } + return ret2; + } + function safeToString(obj2) { + try { + return obj2 + ""; + } catch (e) { + return "[no string representation]"; + } + } + function isError(obj2) { + return obj2 !== null && typeof obj2 === "object" && typeof obj2.message === "string" && typeof obj2.name === "string"; + } + function markAsOriginatingFromRejection(e) { + try { + notEnumerableProp(e, "isOperational", true); + } catch (ignore) { + } + } + function originatesFromRejection(e) { + if (e == null) return false; + return e instanceof Error["__BluebirdErrorTypes__"].OperationalError || e["isOperational"] === true; + } + function canAttachTrace(obj2) { + return isError(obj2) && es5.propertyIsWritable(obj2, "stack"); + } + var ensureErrorObject = (function() { + if (!("stack" in new Error())) { + return function(value) { + if (canAttachTrace(value)) return value; + try { + throw new Error(safeToString(value)); + } catch (err) { + return err; + } + }; + } else { + return function(value) { + if (canAttachTrace(value)) return value; + return new Error(safeToString(value)); + }; + } + })(); + function classString(obj2) { + return {}.toString.call(obj2); + } + function copyDescriptors(from, to, filter) { + var keys = es5.names(from); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (filter(key)) { + try { + es5.defineProperty(to, key, es5.getDescriptor(from, key)); + } catch (ignore) { + } + } + } + } + var asArray = function(v) { + if (es5.isArray(v)) { + return v; + } + return null; + }; + if (typeof Symbol !== "undefined" && Symbol.iterator) { + ArrayFrom = typeof Array.from === "function" ? function(v) { + return Array.from(v); + } : function(v) { + var ret2 = []; + var it = v[Symbol.iterator](); + var itResult; + while (!(itResult = it.next()).done) { + ret2.push(itResult.value); + } + return ret2; + }; + asArray = function(v) { + if (es5.isArray(v)) { + return v; + } else if (v != null && typeof v[Symbol.iterator] === "function") { + return ArrayFrom(v); + } + return null; + }; + } + var ArrayFrom; + var isNode = typeof process !== "undefined" && classString(process).toLowerCase() === "[object process]"; + var hasEnvVariables = typeof process !== "undefined" && typeof process.env !== "undefined"; + function env(key) { + return hasEnvVariables ? process.env[key] : void 0; + } + function getNativePromise() { + if (typeof Promise === "function") { + try { + var promise = new Promise(function() { + }); + if ({}.toString.call(promise) === "[object Promise]") { + return Promise; + } + } catch (e) { + } + } + } + function domainBind(self2, cb) { + return self2.bind(cb); + } + var ret = { + isClass, + isIdentifier, + inheritedDataKeys, + getDataPropertyOrDefault, + thrower, + isArray: es5.isArray, + asArray, + notEnumerableProp, + isPrimitive, + isObject, + isError, + canEvaluate, + errorObj, + tryCatch, + inherits, + withAppended, + maybeWrapAsError, + toFastProperties, + filledRange, + toString: safeToString, + canAttachTrace, + ensureErrorObject, + originatesFromRejection, + markAsOriginatingFromRejection, + classString, + copyDescriptors, + hasDevTools: typeof chrome !== "undefined" && chrome && typeof chrome.loadTimes === "function", + isNode, + hasEnvVariables, + env, + global: globalObject, + getNativePromise, + domainBind + }; + ret.isRecentNode = ret.isNode && (function() { + var version2 = process.versions.node.split(".").map(Number); + return version2[0] === 0 && version2[1] > 10 || version2[0] > 0; + })(); + if (ret.isNode) ret.toFastProperties(process); + try { + throw new Error(); + } catch (e) { + ret.lastLineError = e; + } + module.exports = ret; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/schedule.js +var require_schedule2 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/schedule.js"(exports2, module2) { + "use strict"; + var util2 = require_util6(); + var schedule; + var noAsyncScheduler = function() { + throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n"); + }; + var NativePromise = util2.getNativePromise(); + if (util2.isNode && typeof MutationObserver === "undefined") { + GlobalSetImmediate = global.setImmediate; + ProcessNextTick = process.nextTick; + schedule = util2.isRecentNode ? function(fn) { + GlobalSetImmediate.call(global, fn); + } : function(fn) { + ProcessNextTick.call(process, fn); + }; + } else if (typeof NativePromise === "function" && typeof NativePromise.resolve === "function") { + nativePromise = NativePromise.resolve(); + schedule = function(fn) { + nativePromise.then(fn); + }; + } else if (typeof MutationObserver !== "undefined" && !(typeof window !== "undefined" && window.navigator && (window.navigator.standalone || window.cordova))) { + schedule = (function() { + var div = document.createElement("div"); + var opts = { attributes: true }; + var toggleScheduled = false; + var div2 = document.createElement("div"); + var o2 = new MutationObserver(function() { + div.classList.toggle("foo"); + toggleScheduled = false; + }); + o2.observe(div2, opts); + var scheduleToggle = function() { + if (toggleScheduled) return; + toggleScheduled = true; + div2.classList.toggle("foo"); + }; + return function schedule2(fn) { + var o = new MutationObserver(function() { + o.disconnect(); + fn(); + }); + o.observe(div, opts); + scheduleToggle(); + }; + })(); + } else if (typeof setImmediate !== "undefined") { + schedule = function(fn) { + setImmediate(fn); + }; + } else if (typeof setTimeout !== "undefined") { + schedule = function(fn) { + setTimeout(fn, 0); + }; + } else { + schedule = noAsyncScheduler; + } + var GlobalSetImmediate; + var ProcessNextTick; + var nativePromise; + module2.exports = schedule; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/queue.js +var require_queue3 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/queue.js"(exports2, module2) { + "use strict"; + function arrayMove(src, srcIndex, dst, dstIndex, len) { + for (var j = 0; j < len; ++j) { + dst[j + dstIndex] = src[j + srcIndex]; + src[j + srcIndex] = void 0; + } + } + function Queue(capacity) { + this._capacity = capacity; + this._length = 0; + this._front = 0; + } + Queue.prototype._willBeOverCapacity = function(size) { + return this._capacity < size; + }; + Queue.prototype._pushOne = function(arg) { + var length = this.length(); + this._checkCapacity(length + 1); + var i = this._front + length & this._capacity - 1; + this[i] = arg; + this._length = length + 1; + }; + Queue.prototype.push = function(fn, receiver, arg) { + var length = this.length() + 3; + if (this._willBeOverCapacity(length)) { + this._pushOne(fn); + this._pushOne(receiver); + this._pushOne(arg); + return; + } + var j = this._front + length - 3; + this._checkCapacity(length); + var wrapMask = this._capacity - 1; + this[j + 0 & wrapMask] = fn; + this[j + 1 & wrapMask] = receiver; + this[j + 2 & wrapMask] = arg; + this._length = length; + }; + Queue.prototype.shift = function() { + var front = this._front, ret2 = this[front]; + this[front] = void 0; + this._front = front + 1 & this._capacity - 1; + this._length--; + return ret2; + }; + Queue.prototype.length = function() { + return this._length; + }; + Queue.prototype._checkCapacity = function(size) { + if (this._capacity < size) { + this._resizeTo(this._capacity << 1); + } + }; + Queue.prototype._resizeTo = function(capacity) { + var oldCapacity = this._capacity; + this._capacity = capacity; + var front = this._front; + var length = this._length; + var moveItemsCount = front + length & oldCapacity - 1; + arrayMove(this, 0, this, oldCapacity, moveItemsCount); + }; + module2.exports = Queue; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/async.js +var require_async3 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/async.js"(exports2, module2) { + "use strict"; + var firstLineError; + try { + throw new Error(); + } catch (e) { + firstLineError = e; + } + var schedule = require_schedule2(); + var Queue = require_queue3(); + var util2 = require_util6(); + function Async() { + this._customScheduler = false; + this._isTickUsed = false; + this._lateQueue = new Queue(16); + this._normalQueue = new Queue(16); + this._haveDrainedQueues = false; + this._trampolineEnabled = true; + var self2 = this; + this.drainQueues = function() { + self2._drainQueues(); + }; + this._schedule = schedule; + } + Async.prototype.setScheduler = function(fn) { + var prev = this._schedule; + this._schedule = fn; + this._customScheduler = true; + return prev; + }; + Async.prototype.hasCustomScheduler = function() { + return this._customScheduler; + }; + Async.prototype.enableTrampoline = function() { + this._trampolineEnabled = true; + }; + Async.prototype.disableTrampolineIfNecessary = function() { + if (util2.hasDevTools) { + this._trampolineEnabled = false; + } + }; + Async.prototype.haveItemsQueued = function() { + return this._isTickUsed || this._haveDrainedQueues; + }; + Async.prototype.fatalError = function(e, isNode2) { + if (isNode2) { + process.stderr.write("Fatal " + (e instanceof Error ? e.stack : e) + "\n"); + process.exit(2); + } else { + this.throwLater(e); + } + }; + Async.prototype.throwLater = function(fn, arg) { + if (arguments.length === 1) { + arg = fn; + fn = function() { + throw arg; + }; + } + if (typeof setTimeout !== "undefined") { + setTimeout(function() { + fn(arg); + }, 0); + } else try { + this._schedule(function() { + fn(arg); + }); + } catch (e) { + throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n"); + } + }; + function AsyncInvokeLater(fn, receiver, arg) { + this._lateQueue.push(fn, receiver, arg); + this._queueTick(); + } + function AsyncInvoke(fn, receiver, arg) { + this._normalQueue.push(fn, receiver, arg); + this._queueTick(); + } + function AsyncSettlePromises(promise) { + this._normalQueue._pushOne(promise); + this._queueTick(); + } + if (!util2.hasDevTools) { + Async.prototype.invokeLater = AsyncInvokeLater; + Async.prototype.invoke = AsyncInvoke; + Async.prototype.settlePromises = AsyncSettlePromises; + } else { + Async.prototype.invokeLater = function(fn, receiver, arg) { + if (this._trampolineEnabled) { + AsyncInvokeLater.call(this, fn, receiver, arg); + } else { + this._schedule(function() { + setTimeout(function() { + fn.call(receiver, arg); + }, 100); + }); + } + }; + Async.prototype.invoke = function(fn, receiver, arg) { + if (this._trampolineEnabled) { + AsyncInvoke.call(this, fn, receiver, arg); + } else { + this._schedule(function() { + fn.call(receiver, arg); + }); + } + }; + Async.prototype.settlePromises = function(promise) { + if (this._trampolineEnabled) { + AsyncSettlePromises.call(this, promise); + } else { + this._schedule(function() { + promise._settlePromises(); + }); + } + }; + } + Async.prototype._drainQueue = function(queue) { + while (queue.length() > 0) { + var fn = queue.shift(); + if (typeof fn !== "function") { + fn._settlePromises(); + continue; + } + var receiver = queue.shift(); + var arg = queue.shift(); + fn.call(receiver, arg); + } + }; + Async.prototype._drainQueues = function() { + this._drainQueue(this._normalQueue); + this._reset(); + this._haveDrainedQueues = true; + this._drainQueue(this._lateQueue); + }; + Async.prototype._queueTick = function() { + if (!this._isTickUsed) { + this._isTickUsed = true; + this._schedule(this.drainQueues); + } + }; + Async.prototype._reset = function() { + this._isTickUsed = false; + }; + module2.exports = Async; + module2.exports.firstLineError = firstLineError; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/errors.js +var require_errors7 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/errors.js"(exports2, module2) { + "use strict"; + var es52 = require_es5(); + var Objectfreeze = es52.freeze; + var util2 = require_util6(); + var inherits2 = util2.inherits; + var notEnumerableProp2 = util2.notEnumerableProp; + function subError(nameProperty, defaultMessage) { + function SubError(message) { + if (!(this instanceof SubError)) return new SubError(message); + notEnumerableProp2( + this, + "message", + typeof message === "string" ? message : defaultMessage + ); + notEnumerableProp2(this, "name", nameProperty); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + Error.call(this); + } + } + inherits2(SubError, Error); + return SubError; + } + var _TypeError; + var _RangeError; + var Warning = subError("Warning", "warning"); + var CancellationError = subError("CancellationError", "cancellation error"); + var TimeoutError = subError("TimeoutError", "timeout error"); + var AggregateError2 = subError("AggregateError", "aggregate error"); + try { + _TypeError = TypeError; + _RangeError = RangeError; + } catch (e) { + _TypeError = subError("TypeError", "type error"); + _RangeError = subError("RangeError", "range error"); + } + var methods = "join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "); + for (i = 0; i < methods.length; ++i) { + if (typeof Array.prototype[methods[i]] === "function") { + AggregateError2.prototype[methods[i]] = Array.prototype[methods[i]]; + } + } + var i; + es52.defineProperty(AggregateError2.prototype, "length", { + value: 0, + configurable: false, + writable: true, + enumerable: true + }); + AggregateError2.prototype["isOperational"] = true; + var level = 0; + AggregateError2.prototype.toString = function() { + var indent = Array(level * 4 + 1).join(" "); + var ret2 = "\n" + indent + "AggregateError of:\n"; + level++; + indent = Array(level * 4 + 1).join(" "); + for (var i2 = 0; i2 < this.length; ++i2) { + var str = this[i2] === this ? "[Circular AggregateError]" : this[i2] + ""; + var lines = str.split("\n"); + for (var j = 0; j < lines.length; ++j) { + lines[j] = indent + lines[j]; + } + str = lines.join("\n"); + ret2 += str + "\n"; + } + level--; + return ret2; + }; + function OperationalError(message) { + if (!(this instanceof OperationalError)) + return new OperationalError(message); + notEnumerableProp2(this, "name", "OperationalError"); + notEnumerableProp2(this, "message", message); + this.cause = message; + this["isOperational"] = true; + if (message instanceof Error) { + notEnumerableProp2(this, "message", message.message); + notEnumerableProp2(this, "stack", message.stack); + } else if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } + inherits2(OperationalError, Error); + var errorTypes = Error["__BluebirdErrorTypes__"]; + if (!errorTypes) { + errorTypes = Objectfreeze({ + CancellationError, + TimeoutError, + OperationalError, + RejectionError: OperationalError, + AggregateError: AggregateError2 + }); + es52.defineProperty(Error, "__BluebirdErrorTypes__", { + value: errorTypes, + writable: false, + enumerable: false, + configurable: false + }); + } + module2.exports = { + Error, + TypeError: _TypeError, + RangeError: _RangeError, + CancellationError: errorTypes.CancellationError, + OperationalError: errorTypes.OperationalError, + TimeoutError: errorTypes.TimeoutError, + AggregateError: errorTypes.AggregateError, + Warning + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/thenables.js +var require_thenables = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/thenables.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL) { + var util2 = require_util6(); + var errorObj2 = util2.errorObj; + var isObject2 = util2.isObject; + function tryConvertToPromise(obj2, context) { + if (isObject2(obj2)) { + if (obj2 instanceof Promise2) return obj2; + var then = getThen(obj2); + if (then === errorObj2) { + if (context) context._pushContext(); + var ret2 = Promise2.reject(then.e); + if (context) context._popContext(); + return ret2; + } else if (typeof then === "function") { + if (isAnyBluebirdPromise(obj2)) { + var ret2 = new Promise2(INTERNAL); + obj2._then( + ret2._fulfill, + ret2._reject, + void 0, + ret2, + null + ); + return ret2; + } + return doThenable(obj2, then, context); + } + } + return obj2; + } + function doGetThen(obj2) { + return obj2.then; + } + function getThen(obj2) { + try { + return doGetThen(obj2); + } catch (e) { + errorObj2.e = e; + return errorObj2; + } + } + var hasProp = {}.hasOwnProperty; + function isAnyBluebirdPromise(obj2) { + try { + return hasProp.call(obj2, "_promise0"); + } catch (e) { + return false; + } + } + function doThenable(x, then, context) { + var promise = new Promise2(INTERNAL); + var ret2 = promise; + if (context) context._pushContext(); + promise._captureStackTrace(); + if (context) context._popContext(); + var synchronous = true; + var result = util2.tryCatch(then).call(x, resolve, reject); + synchronous = false; + if (promise && result === errorObj2) { + promise._rejectCallback(result.e, true, true); + promise = null; + } + function resolve(value) { + if (!promise) return; + promise._resolveCallback(value); + promise = null; + } + function reject(reason) { + if (!promise) return; + promise._rejectCallback(reason, synchronous, true); + promise = null; + } + return ret2; + } + return tryConvertToPromise; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/promise_array.js +var require_promise_array = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/promise_array.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, apiRejection, Proxyable) { + var util2 = require_util6(); + var isArray = util2.isArray; + function toResolutionValue(val) { + switch (val) { + case -2: + return []; + case -3: + return {}; + } + } + function PromiseArray(values) { + var promise = this._promise = new Promise2(INTERNAL); + if (values instanceof Promise2) { + promise._propagateFrom(values, 3); + } + promise._setOnCancel(this); + this._values = values; + this._length = 0; + this._totalResolved = 0; + this._init(void 0, -2); + } + util2.inherits(PromiseArray, Proxyable); + PromiseArray.prototype.length = function() { + return this._length; + }; + PromiseArray.prototype.promise = function() { + return this._promise; + }; + PromiseArray.prototype._init = function init(_2, resolveValueIfEmpty) { + var values = tryConvertToPromise(this._values, this._promise); + if (values instanceof Promise2) { + values = values._target(); + var bitField = values._bitField; + ; + this._values = values; + if ((bitField & 50397184) === 0) { + this._promise._setAsyncGuaranteed(); + return values._then( + init, + this._reject, + void 0, + this, + resolveValueIfEmpty + ); + } else if ((bitField & 33554432) !== 0) { + values = values._value(); + } else if ((bitField & 16777216) !== 0) { + return this._reject(values._reason()); + } else { + return this._cancel(); + } + } + values = util2.asArray(values); + if (values === null) { + var err = apiRejection( + "expecting an array or an iterable object but got " + util2.classString(values) + ).reason(); + this._promise._rejectCallback(err, false); + return; + } + if (values.length === 0) { + if (resolveValueIfEmpty === -5) { + this._resolveEmptyArray(); + } else { + this._resolve(toResolutionValue(resolveValueIfEmpty)); + } + return; + } + this._iterate(values); + }; + PromiseArray.prototype._iterate = function(values) { + var len = this.getActualLength(values.length); + this._length = len; + this._values = this.shouldCopyValues() ? new Array(len) : this._values; + var result = this._promise; + var isResolved = false; + var bitField = null; + for (var i = 0; i < len; ++i) { + var maybePromise = tryConvertToPromise(values[i], result); + if (maybePromise instanceof Promise2) { + maybePromise = maybePromise._target(); + bitField = maybePromise._bitField; + } else { + bitField = null; + } + if (isResolved) { + if (bitField !== null) { + maybePromise.suppressUnhandledRejections(); + } + } else if (bitField !== null) { + if ((bitField & 50397184) === 0) { + maybePromise._proxy(this, i); + this._values[i] = maybePromise; + } else if ((bitField & 33554432) !== 0) { + isResolved = this._promiseFulfilled(maybePromise._value(), i); + } else if ((bitField & 16777216) !== 0) { + isResolved = this._promiseRejected(maybePromise._reason(), i); + } else { + isResolved = this._promiseCancelled(i); + } + } else { + isResolved = this._promiseFulfilled(maybePromise, i); + } + } + if (!isResolved) result._setAsyncGuaranteed(); + }; + PromiseArray.prototype._isResolved = function() { + return this._values === null; + }; + PromiseArray.prototype._resolve = function(value) { + this._values = null; + this._promise._fulfill(value); + }; + PromiseArray.prototype._cancel = function() { + if (this._isResolved() || !this._promise._isCancellable()) return; + this._values = null; + this._promise._cancel(); + }; + PromiseArray.prototype._reject = function(reason) { + this._values = null; + this._promise._rejectCallback(reason, false); + }; + PromiseArray.prototype._promiseFulfilled = function(value, index) { + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + return true; + } + return false; + }; + PromiseArray.prototype._promiseCancelled = function() { + this._cancel(); + return true; + }; + PromiseArray.prototype._promiseRejected = function(reason) { + this._totalResolved++; + this._reject(reason); + return true; + }; + PromiseArray.prototype._resultCancelled = function() { + if (this._isResolved()) return; + var values = this._values; + this._cancel(); + if (values instanceof Promise2) { + values.cancel(); + } else { + for (var i = 0; i < values.length; ++i) { + if (values[i] instanceof Promise2) { + values[i].cancel(); + } + } + } + }; + PromiseArray.prototype.shouldCopyValues = function() { + return true; + }; + PromiseArray.prototype.getActualLength = function(len) { + return len; + }; + return PromiseArray; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/context.js +var require_context = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/context.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2) { + var longStackTraces = false; + var contextStack = []; + Promise2.prototype._promiseCreated = function() { + }; + Promise2.prototype._pushContext = function() { + }; + Promise2.prototype._popContext = function() { + return null; + }; + Promise2._peekContext = Promise2.prototype._peekContext = function() { + }; + function Context() { + this._trace = new Context.CapturedTrace(peekContext()); + } + Context.prototype._pushContext = function() { + if (this._trace !== void 0) { + this._trace._promiseCreated = null; + contextStack.push(this._trace); + } + }; + Context.prototype._popContext = function() { + if (this._trace !== void 0) { + var trace = contextStack.pop(); + var ret2 = trace._promiseCreated; + trace._promiseCreated = null; + return ret2; + } + return null; + }; + function createContext() { + if (longStackTraces) return new Context(); + } + function peekContext() { + var lastIndex = contextStack.length - 1; + if (lastIndex >= 0) { + return contextStack[lastIndex]; + } + return void 0; + } + Context.CapturedTrace = null; + Context.create = createContext; + Context.deactivateLongStackTraces = function() { + }; + Context.activateLongStackTraces = function() { + var Promise_pushContext = Promise2.prototype._pushContext; + var Promise_popContext = Promise2.prototype._popContext; + var Promise_PeekContext = Promise2._peekContext; + var Promise_peekContext = Promise2.prototype._peekContext; + var Promise_promiseCreated = Promise2.prototype._promiseCreated; + Context.deactivateLongStackTraces = function() { + Promise2.prototype._pushContext = Promise_pushContext; + Promise2.prototype._popContext = Promise_popContext; + Promise2._peekContext = Promise_PeekContext; + Promise2.prototype._peekContext = Promise_peekContext; + Promise2.prototype._promiseCreated = Promise_promiseCreated; + longStackTraces = false; + }; + longStackTraces = true; + Promise2.prototype._pushContext = Context.prototype._pushContext; + Promise2.prototype._popContext = Context.prototype._popContext; + Promise2._peekContext = Promise2.prototype._peekContext = peekContext; + Promise2.prototype._promiseCreated = function() { + var ctx = this._peekContext(); + if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this; + }; + }; + return Context; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/debuggability.js +var require_debuggability = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/debuggability.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, Context) { + var getDomain = Promise2._getDomain; + var async = Promise2._async; + var Warning = require_errors7().Warning; + var util2 = require_util6(); + var canAttachTrace2 = util2.canAttachTrace; + var unhandledRejectionHandled; + var possiblyUnhandledRejection; + var bluebirdFramePattern = /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/; + var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/; + var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/; + var stackFramePattern = null; + var formatStack = null; + var indentStackFrames = false; + var printWarning; + var debugging = !!(util2.env("BLUEBIRD_DEBUG") != 0 && (util2.env("BLUEBIRD_DEBUG") || util2.env("NODE_ENV") === "development")); + var warnings = !!(util2.env("BLUEBIRD_WARNINGS") != 0 && (debugging || util2.env("BLUEBIRD_WARNINGS"))); + var longStackTraces = !!(util2.env("BLUEBIRD_LONG_STACK_TRACES") != 0 && (debugging || util2.env("BLUEBIRD_LONG_STACK_TRACES"))); + var wForgottenReturn = util2.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 && (warnings || !!util2.env("BLUEBIRD_W_FORGOTTEN_RETURN")); + Promise2.prototype.suppressUnhandledRejections = function() { + var target = this._target(); + target._bitField = target._bitField & ~1048576 | 524288; + }; + Promise2.prototype._ensurePossibleRejectionHandled = function() { + if ((this._bitField & 524288) !== 0) return; + this._setRejectionIsUnhandled(); + async.invokeLater(this._notifyUnhandledRejection, this, void 0); + }; + Promise2.prototype._notifyUnhandledRejectionIsHandled = function() { + fireRejectionEvent( + "rejectionHandled", + unhandledRejectionHandled, + void 0, + this + ); + }; + Promise2.prototype._setReturnedNonUndefined = function() { + this._bitField = this._bitField | 268435456; + }; + Promise2.prototype._returnedNonUndefined = function() { + return (this._bitField & 268435456) !== 0; + }; + Promise2.prototype._notifyUnhandledRejection = function() { + if (this._isRejectionUnhandled()) { + var reason = this._settledValue(); + this._setUnhandledRejectionIsNotified(); + fireRejectionEvent( + "unhandledRejection", + possiblyUnhandledRejection, + reason, + this + ); + } + }; + Promise2.prototype._setUnhandledRejectionIsNotified = function() { + this._bitField = this._bitField | 262144; + }; + Promise2.prototype._unsetUnhandledRejectionIsNotified = function() { + this._bitField = this._bitField & ~262144; + }; + Promise2.prototype._isUnhandledRejectionNotified = function() { + return (this._bitField & 262144) > 0; + }; + Promise2.prototype._setRejectionIsUnhandled = function() { + this._bitField = this._bitField | 1048576; + }; + Promise2.prototype._unsetRejectionIsUnhandled = function() { + this._bitField = this._bitField & ~1048576; + if (this._isUnhandledRejectionNotified()) { + this._unsetUnhandledRejectionIsNotified(); + this._notifyUnhandledRejectionIsHandled(); + } + }; + Promise2.prototype._isRejectionUnhandled = function() { + return (this._bitField & 1048576) > 0; + }; + Promise2.prototype._warn = function(message, shouldUseOwnTrace, promise) { + return warn(message, shouldUseOwnTrace, promise || this); + }; + Promise2.onPossiblyUnhandledRejection = function(fn) { + var domain = getDomain(); + possiblyUnhandledRejection = typeof fn === "function" ? domain === null ? fn : util2.domainBind(domain, fn) : void 0; + }; + Promise2.onUnhandledRejectionHandled = function(fn) { + var domain = getDomain(); + unhandledRejectionHandled = typeof fn === "function" ? domain === null ? fn : util2.domainBind(domain, fn) : void 0; + }; + var disableLongStackTraces = function() { + }; + Promise2.longStackTraces = function() { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n"); + } + if (!config.longStackTraces && longStackTracesIsSupported()) { + var Promise_captureStackTrace = Promise2.prototype._captureStackTrace; + var Promise_attachExtraTrace = Promise2.prototype._attachExtraTrace; + config.longStackTraces = true; + disableLongStackTraces = function() { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n"); + } + Promise2.prototype._captureStackTrace = Promise_captureStackTrace; + Promise2.prototype._attachExtraTrace = Promise_attachExtraTrace; + Context.deactivateLongStackTraces(); + async.enableTrampoline(); + config.longStackTraces = false; + }; + Promise2.prototype._captureStackTrace = longStackTracesCaptureStackTrace; + Promise2.prototype._attachExtraTrace = longStackTracesAttachExtraTrace; + Context.activateLongStackTraces(); + async.disableTrampolineIfNecessary(); + } + }; + Promise2.hasLongStackTraces = function() { + return config.longStackTraces && longStackTracesIsSupported(); + }; + var fireDomEvent = (function() { + try { + if (typeof CustomEvent === "function") { + var event = new CustomEvent("CustomEvent"); + util2.global.dispatchEvent(event); + return function(name, event2) { + var domEvent = new CustomEvent(name.toLowerCase(), { + detail: event2, + cancelable: true + }); + return !util2.global.dispatchEvent(domEvent); + }; + } else if (typeof Event === "function") { + var event = new Event("CustomEvent"); + util2.global.dispatchEvent(event); + return function(name, event2) { + var domEvent = new Event(name.toLowerCase(), { + cancelable: true + }); + domEvent.detail = event2; + return !util2.global.dispatchEvent(domEvent); + }; + } else { + var event = document.createEvent("CustomEvent"); + event.initCustomEvent("testingtheevent", false, true, {}); + util2.global.dispatchEvent(event); + return function(name, event2) { + var domEvent = document.createEvent("CustomEvent"); + domEvent.initCustomEvent( + name.toLowerCase(), + false, + true, + event2 + ); + return !util2.global.dispatchEvent(domEvent); + }; + } + } catch (e) { + } + return function() { + return false; + }; + })(); + var fireGlobalEvent = (function() { + if (util2.isNode) { + return function() { + return process.emit.apply(process, arguments); + }; + } else { + if (!util2.global) { + return function() { + return false; + }; + } + return function(name) { + var methodName = "on" + name.toLowerCase(); + var method = util2.global[methodName]; + if (!method) return false; + method.apply(util2.global, [].slice.call(arguments, 1)); + return true; + }; + } + })(); + function generatePromiseLifecycleEventObject(name, promise) { + return { promise }; + } + var eventToObjectGenerator = { + promiseCreated: generatePromiseLifecycleEventObject, + promiseFulfilled: generatePromiseLifecycleEventObject, + promiseRejected: generatePromiseLifecycleEventObject, + promiseResolved: generatePromiseLifecycleEventObject, + promiseCancelled: generatePromiseLifecycleEventObject, + promiseChained: function(name, promise, child) { + return { promise, child }; + }, + warning: function(name, warning) { + return { warning }; + }, + unhandledRejection: function(name, reason, promise) { + return { reason, promise }; + }, + rejectionHandled: generatePromiseLifecycleEventObject + }; + var activeFireEvent = function(name) { + var globalEventFired = false; + try { + globalEventFired = fireGlobalEvent.apply(null, arguments); + } catch (e) { + async.throwLater(e); + globalEventFired = true; + } + var domEventFired = false; + try { + domEventFired = fireDomEvent( + name, + eventToObjectGenerator[name].apply(null, arguments) + ); + } catch (e) { + async.throwLater(e); + domEventFired = true; + } + return domEventFired || globalEventFired; + }; + Promise2.config = function(opts) { + opts = Object(opts); + if ("longStackTraces" in opts) { + if (opts.longStackTraces) { + Promise2.longStackTraces(); + } else if (!opts.longStackTraces && Promise2.hasLongStackTraces()) { + disableLongStackTraces(); + } + } + if ("warnings" in opts) { + var warningsOption = opts.warnings; + config.warnings = !!warningsOption; + wForgottenReturn = config.warnings; + if (util2.isObject(warningsOption)) { + if ("wForgottenReturn" in warningsOption) { + wForgottenReturn = !!warningsOption.wForgottenReturn; + } + } + } + if ("cancellation" in opts && opts.cancellation && !config.cancellation) { + if (async.haveItemsQueued()) { + throw new Error( + "cannot enable cancellation after promises are in use" + ); + } + Promise2.prototype._clearCancellationData = cancellationClearCancellationData; + Promise2.prototype._propagateFrom = cancellationPropagateFrom; + Promise2.prototype._onCancel = cancellationOnCancel; + Promise2.prototype._setOnCancel = cancellationSetOnCancel; + Promise2.prototype._attachCancellationCallback = cancellationAttachCancellationCallback; + Promise2.prototype._execute = cancellationExecute; + propagateFromFunction = cancellationPropagateFrom; + config.cancellation = true; + } + if ("monitoring" in opts) { + if (opts.monitoring && !config.monitoring) { + config.monitoring = true; + Promise2.prototype._fireEvent = activeFireEvent; + } else if (!opts.monitoring && config.monitoring) { + config.monitoring = false; + Promise2.prototype._fireEvent = defaultFireEvent; + } + } + return Promise2; + }; + function defaultFireEvent() { + return false; + } + Promise2.prototype._fireEvent = defaultFireEvent; + Promise2.prototype._execute = function(executor, resolve, reject) { + try { + executor(resolve, reject); + } catch (e) { + return e; + } + }; + Promise2.prototype._onCancel = function() { + }; + Promise2.prototype._setOnCancel = function(handler) { + ; + }; + Promise2.prototype._attachCancellationCallback = function(onCancel) { + ; + }; + Promise2.prototype._captureStackTrace = function() { + }; + Promise2.prototype._attachExtraTrace = function() { + }; + Promise2.prototype._clearCancellationData = function() { + }; + Promise2.prototype._propagateFrom = function(parent, flags) { + ; + ; + }; + function cancellationExecute(executor, resolve, reject) { + var promise = this; + try { + executor(resolve, reject, function(onCancel) { + if (typeof onCancel !== "function") { + throw new TypeError("onCancel must be a function, got: " + util2.toString(onCancel)); + } + promise._attachCancellationCallback(onCancel); + }); + } catch (e) { + return e; + } + } + function cancellationAttachCancellationCallback(onCancel) { + if (!this._isCancellable()) return this; + var previousOnCancel = this._onCancel(); + if (previousOnCancel !== void 0) { + if (util2.isArray(previousOnCancel)) { + previousOnCancel.push(onCancel); + } else { + this._setOnCancel([previousOnCancel, onCancel]); + } + } else { + this._setOnCancel(onCancel); + } + } + function cancellationOnCancel() { + return this._onCancelField; + } + function cancellationSetOnCancel(onCancel) { + this._onCancelField = onCancel; + } + function cancellationClearCancellationData() { + this._cancellationParent = void 0; + this._onCancelField = void 0; + } + function cancellationPropagateFrom(parent, flags) { + if ((flags & 1) !== 0) { + this._cancellationParent = parent; + var branchesRemainingToCancel = parent._branchesRemainingToCancel; + if (branchesRemainingToCancel === void 0) { + branchesRemainingToCancel = 0; + } + parent._branchesRemainingToCancel = branchesRemainingToCancel + 1; + } + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } + } + function bindingPropagateFrom(parent, flags) { + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } + } + var propagateFromFunction = bindingPropagateFrom; + function boundValueFunction() { + var ret2 = this._boundTo; + if (ret2 !== void 0) { + if (ret2 instanceof Promise2) { + if (ret2.isFulfilled()) { + return ret2.value(); + } else { + return void 0; + } + } + } + return ret2; + } + function longStackTracesCaptureStackTrace() { + this._trace = new CapturedTrace(this._peekContext()); + } + function longStackTracesAttachExtraTrace(error, ignoreSelf) { + if (canAttachTrace2(error)) { + var trace = this._trace; + if (trace !== void 0) { + if (ignoreSelf) trace = trace._parent; + } + if (trace !== void 0) { + trace.attachExtraTrace(error); + } else if (!error.__stackCleaned__) { + var parsed = parseStackAndMessage(error); + util2.notEnumerableProp( + error, + "stack", + parsed.message + "\n" + parsed.stack.join("\n") + ); + util2.notEnumerableProp(error, "__stackCleaned__", true); + } + } + } + function checkForgottenReturns(returnValue, promiseCreated, name, promise, parent) { + if (returnValue === void 0 && promiseCreated !== null && wForgottenReturn) { + if (parent !== void 0 && parent._returnedNonUndefined()) return; + if ((promise._bitField & 65535) === 0) return; + if (name) name = name + " "; + var handlerLine = ""; + var creatorLine = ""; + if (promiseCreated._trace) { + var traceLines = promiseCreated._trace.stack.split("\n"); + var stack = cleanStack(traceLines); + for (var i = stack.length - 1; i >= 0; --i) { + var line = stack[i]; + if (!nodeFramePattern.test(line)) { + var lineMatches = line.match(parseLinePattern); + if (lineMatches) { + handlerLine = "at " + lineMatches[1] + ":" + lineMatches[2] + ":" + lineMatches[3] + " "; + } + break; + } + } + if (stack.length > 0) { + var firstUserLine = stack[0]; + for (var i = 0; i < traceLines.length; ++i) { + if (traceLines[i] === firstUserLine) { + if (i > 0) { + creatorLine = "\n" + traceLines[i - 1]; + } + break; + } + } + } + } + var msg = "a promise was created in a " + name + "handler " + handlerLine + "but was not returned from it, see http://goo.gl/rRqMUw" + creatorLine; + promise._warn(msg, true, promiseCreated); + } + } + function deprecated(name, replacement) { + var message = name + " is deprecated and will be removed in a future version."; + if (replacement) message += " Use " + replacement + " instead."; + return warn(message); + } + function warn(message, shouldUseOwnTrace, promise) { + if (!config.warnings) return; + var warning = new Warning(message); + var ctx; + if (shouldUseOwnTrace) { + promise._attachExtraTrace(warning); + } else if (config.longStackTraces && (ctx = Promise2._peekContext())) { + ctx.attachExtraTrace(warning); + } else { + var parsed = parseStackAndMessage(warning); + warning.stack = parsed.message + "\n" + parsed.stack.join("\n"); + } + if (!activeFireEvent("warning", warning)) { + formatAndLogError(warning, "", true); + } + } + function reconstructStack(message, stacks) { + for (var i = 0; i < stacks.length - 1; ++i) { + stacks[i].push("From previous event:"); + stacks[i] = stacks[i].join("\n"); + } + if (i < stacks.length) { + stacks[i] = stacks[i].join("\n"); + } + return message + "\n" + stacks.join("\n"); + } + function removeDuplicateOrEmptyJumps(stacks) { + for (var i = 0; i < stacks.length; ++i) { + if (stacks[i].length === 0 || i + 1 < stacks.length && stacks[i][0] === stacks[i + 1][0]) { + stacks.splice(i, 1); + i--; + } + } + } + function removeCommonRoots(stacks) { + var current = stacks[0]; + for (var i = 1; i < stacks.length; ++i) { + var prev = stacks[i]; + var currentLastIndex = current.length - 1; + var currentLastLine = current[currentLastIndex]; + var commonRootMeetPoint = -1; + for (var j = prev.length - 1; j >= 0; --j) { + if (prev[j] === currentLastLine) { + commonRootMeetPoint = j; + break; + } + } + for (var j = commonRootMeetPoint; j >= 0; --j) { + var line = prev[j]; + if (current[currentLastIndex] === line) { + current.pop(); + currentLastIndex--; + } else { + break; + } + } + current = prev; + } + } + function cleanStack(stack) { + var ret2 = []; + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + var isTraceLine = " (No stack trace)" === line || stackFramePattern.test(line); + var isInternalFrame = isTraceLine && shouldIgnore(line); + if (isTraceLine && !isInternalFrame) { + if (indentStackFrames && line.charAt(0) !== " ") { + line = " " + line; + } + ret2.push(line); + } + } + return ret2; + } + function stackFramesAsArray(error) { + var stack = error.stack.replace(/\s+$/g, "").split("\n"); + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + if (" (No stack trace)" === line || stackFramePattern.test(line)) { + break; + } + } + if (i > 0 && error.name != "SyntaxError") { + stack = stack.slice(i); + } + return stack; + } + function parseStackAndMessage(error) { + var stack = error.stack; + var message = error.toString(); + stack = typeof stack === "string" && stack.length > 0 ? stackFramesAsArray(error) : [" (No stack trace)"]; + return { + message, + stack: error.name == "SyntaxError" ? stack : cleanStack(stack) + }; + } + function formatAndLogError(error, title, isSoft) { + if (typeof console !== "undefined") { + var message; + if (util2.isObject(error)) { + var stack = error.stack; + message = title + formatStack(stack, error); + } else { + message = title + String(error); + } + if (typeof printWarning === "function") { + printWarning(message, isSoft); + } else if (typeof console.log === "function" || typeof console.log === "object") { + console.log(message); + } + } + } + function fireRejectionEvent(name, localHandler, reason, promise) { + var localEventFired = false; + try { + if (typeof localHandler === "function") { + localEventFired = true; + if (name === "rejectionHandled") { + localHandler(promise); + } else { + localHandler(reason, promise); + } + } + } catch (e) { + async.throwLater(e); + } + if (name === "unhandledRejection") { + if (!activeFireEvent(name, reason, promise) && !localEventFired) { + formatAndLogError(reason, "Unhandled rejection "); + } + } else { + activeFireEvent(name, promise); + } + } + function formatNonError(obj2) { + var str; + if (typeof obj2 === "function") { + str = "[function " + (obj2.name || "anonymous") + "]"; + } else { + str = obj2 && typeof obj2.toString === "function" ? obj2.toString() : util2.toString(obj2); + var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/; + if (ruselessToString.test(str)) { + try { + var newStr = JSON.stringify(obj2); + str = newStr; + } catch (e) { + } + } + if (str.length === 0) { + str = "(empty array)"; + } + } + return "(<" + snip(str) + ">, no stack trace)"; + } + function snip(str) { + var maxChars = 41; + if (str.length < maxChars) { + return str; + } + return str.substr(0, maxChars - 3) + "..."; + } + function longStackTracesIsSupported() { + return typeof captureStackTrace === "function"; + } + var shouldIgnore = function() { + return false; + }; + var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/; + function parseLineInfo(line) { + var matches = line.match(parseLineInfoRegex); + if (matches) { + return { + fileName: matches[1], + line: parseInt(matches[2], 10) + }; + } + } + function setBounds(firstLineError, lastLineError) { + if (!longStackTracesIsSupported()) return; + var firstStackLines = firstLineError.stack.split("\n"); + var lastStackLines = lastLineError.stack.split("\n"); + var firstIndex = -1; + var lastIndex = -1; + var firstFileName; + var lastFileName; + for (var i = 0; i < firstStackLines.length; ++i) { + var result = parseLineInfo(firstStackLines[i]); + if (result) { + firstFileName = result.fileName; + firstIndex = result.line; + break; + } + } + for (var i = 0; i < lastStackLines.length; ++i) { + var result = parseLineInfo(lastStackLines[i]); + if (result) { + lastFileName = result.fileName; + lastIndex = result.line; + break; + } + } + if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName || firstFileName !== lastFileName || firstIndex >= lastIndex) { + return; + } + shouldIgnore = function(line) { + if (bluebirdFramePattern.test(line)) return true; + var info = parseLineInfo(line); + if (info) { + if (info.fileName === firstFileName && (firstIndex <= info.line && info.line <= lastIndex)) { + return true; + } + } + return false; + }; + } + function CapturedTrace(parent) { + this._parent = parent; + this._promisesCreated = 0; + var length = this._length = 1 + (parent === void 0 ? 0 : parent._length); + captureStackTrace(this, CapturedTrace); + if (length > 32) this.uncycle(); + } + util2.inherits(CapturedTrace, Error); + Context.CapturedTrace = CapturedTrace; + CapturedTrace.prototype.uncycle = function() { + var length = this._length; + if (length < 2) return; + var nodes = []; + var stackToIndex = {}; + for (var i = 0, node = this; node !== void 0; ++i) { + nodes.push(node); + node = node._parent; + } + length = this._length = i; + for (var i = length - 1; i >= 0; --i) { + var stack = nodes[i].stack; + if (stackToIndex[stack] === void 0) { + stackToIndex[stack] = i; + } + } + for (var i = 0; i < length; ++i) { + var currentStack = nodes[i].stack; + var index = stackToIndex[currentStack]; + if (index !== void 0 && index !== i) { + if (index > 0) { + nodes[index - 1]._parent = void 0; + nodes[index - 1]._length = 1; + } + nodes[i]._parent = void 0; + nodes[i]._length = 1; + var cycleEdgeNode = i > 0 ? nodes[i - 1] : this; + if (index < length - 1) { + cycleEdgeNode._parent = nodes[index + 1]; + cycleEdgeNode._parent.uncycle(); + cycleEdgeNode._length = cycleEdgeNode._parent._length + 1; + } else { + cycleEdgeNode._parent = void 0; + cycleEdgeNode._length = 1; + } + var currentChildLength = cycleEdgeNode._length + 1; + for (var j = i - 2; j >= 0; --j) { + nodes[j]._length = currentChildLength; + currentChildLength++; + } + return; + } + } + }; + CapturedTrace.prototype.attachExtraTrace = function(error) { + if (error.__stackCleaned__) return; + this.uncycle(); + var parsed = parseStackAndMessage(error); + var message = parsed.message; + var stacks = [parsed.stack]; + var trace = this; + while (trace !== void 0) { + stacks.push(cleanStack(trace.stack.split("\n"))); + trace = trace._parent; + } + removeCommonRoots(stacks); + removeDuplicateOrEmptyJumps(stacks); + util2.notEnumerableProp(error, "stack", reconstructStack(message, stacks)); + util2.notEnumerableProp(error, "__stackCleaned__", true); + }; + var captureStackTrace = (function stackDetection() { + var v8stackFramePattern = /^\s*at\s*/; + var v8stackFormatter = function(stack, error) { + if (typeof stack === "string") return stack; + if (error.name !== void 0 && error.message !== void 0) { + return error.toString(); + } + return formatNonError(error); + }; + if (typeof Error.stackTraceLimit === "number" && typeof Error.captureStackTrace === "function") { + Error.stackTraceLimit += 6; + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + var captureStackTrace2 = Error.captureStackTrace; + shouldIgnore = function(line) { + return bluebirdFramePattern.test(line); + }; + return function(receiver, ignoreUntil) { + Error.stackTraceLimit += 6; + captureStackTrace2(receiver, ignoreUntil); + Error.stackTraceLimit -= 6; + }; + } + var err = new Error(); + if (typeof err.stack === "string" && err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) { + stackFramePattern = /@/; + formatStack = v8stackFormatter; + indentStackFrames = true; + return function captureStackTrace3(o) { + o.stack = new Error().stack; + }; + } + var hasStackAfterThrow; + try { + throw new Error(); + } catch (e) { + hasStackAfterThrow = "stack" in e; + } + if (!("stack" in err) && hasStackAfterThrow && typeof Error.stackTraceLimit === "number") { + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + return function captureStackTrace3(o) { + Error.stackTraceLimit += 6; + try { + throw new Error(); + } catch (e) { + o.stack = e.stack; + } + Error.stackTraceLimit -= 6; + }; + } + formatStack = function(stack, error) { + if (typeof stack === "string") return stack; + if ((typeof error === "object" || typeof error === "function") && error.name !== void 0 && error.message !== void 0) { + return error.toString(); + } + return formatNonError(error); + }; + return null; + })([]); + if (typeof console !== "undefined" && typeof console.warn !== "undefined") { + printWarning = function(message) { + console.warn(message); + }; + if (util2.isNode && process.stderr.isTTY) { + printWarning = function(message, isSoft) { + var color = isSoft ? "\x1B[33m" : "\x1B[31m"; + console.warn(color + message + "\x1B[0m\n"); + }; + } else if (!util2.isNode && typeof new Error().stack === "string") { + printWarning = function(message, isSoft) { + console.warn( + "%c" + message, + isSoft ? "color: darkorange" : "color: red" + ); + }; + } + } + var config = { + warnings, + longStackTraces: false, + cancellation: false, + monitoring: false + }; + if (longStackTraces) Promise2.longStackTraces(); + return { + longStackTraces: function() { + return config.longStackTraces; + }, + warnings: function() { + return config.warnings; + }, + cancellation: function() { + return config.cancellation; + }, + monitoring: function() { + return config.monitoring; + }, + propagateFromFunction: function() { + return propagateFromFunction; + }, + boundValueFunction: function() { + return boundValueFunction; + }, + checkForgottenReturns, + setBounds, + warn, + deprecated, + CapturedTrace, + fireDomEvent, + fireGlobalEvent + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/finally.js +var require_finally = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/finally.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, tryConvertToPromise) { + var util2 = require_util6(); + var CancellationError = Promise2.CancellationError; + var errorObj2 = util2.errorObj; + function PassThroughHandlerContext(promise, type, handler) { + this.promise = promise; + this.type = type; + this.handler = handler; + this.called = false; + this.cancelPromise = null; + } + PassThroughHandlerContext.prototype.isFinallyHandler = function() { + return this.type === 0; + }; + function FinallyHandlerCancelReaction(finallyHandler2) { + this.finallyHandler = finallyHandler2; + } + FinallyHandlerCancelReaction.prototype._resultCancelled = function() { + checkCancel(this.finallyHandler); + }; + function checkCancel(ctx, reason) { + if (ctx.cancelPromise != null) { + if (arguments.length > 1) { + ctx.cancelPromise._reject(reason); + } else { + ctx.cancelPromise._cancel(); + } + ctx.cancelPromise = null; + return true; + } + return false; + } + function succeed() { + return finallyHandler.call(this, this.promise._target()._settledValue()); + } + function fail(reason) { + if (checkCancel(this, reason)) return; + errorObj2.e = reason; + return errorObj2; + } + function finallyHandler(reasonOrValue) { + var promise = this.promise; + var handler = this.handler; + if (!this.called) { + this.called = true; + var ret2 = this.isFinallyHandler() ? handler.call(promise._boundValue()) : handler.call(promise._boundValue(), reasonOrValue); + if (ret2 !== void 0) { + promise._setReturnedNonUndefined(); + var maybePromise = tryConvertToPromise(ret2, promise); + if (maybePromise instanceof Promise2) { + if (this.cancelPromise != null) { + if (maybePromise._isCancelled()) { + var reason = new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + errorObj2.e = reason; + return errorObj2; + } else if (maybePromise.isPending()) { + maybePromise._attachCancellationCallback( + new FinallyHandlerCancelReaction(this) + ); + } + } + return maybePromise._then( + succeed, + fail, + void 0, + this, + void 0 + ); + } + } + } + if (promise.isRejected()) { + checkCancel(this); + errorObj2.e = reasonOrValue; + return errorObj2; + } else { + checkCancel(this); + return reasonOrValue; + } + } + Promise2.prototype._passThrough = function(handler, type, success, fail2) { + if (typeof handler !== "function") return this.then(); + return this._then( + success, + fail2, + void 0, + new PassThroughHandlerContext(this, type, handler), + void 0 + ); + }; + Promise2.prototype.lastly = Promise2.prototype["finally"] = function(handler) { + return this._passThrough( + handler, + 0, + finallyHandler, + finallyHandler + ); + }; + Promise2.prototype.tap = function(handler) { + return this._passThrough(handler, 1, finallyHandler); + }; + return PassThroughHandlerContext; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/catch_filter.js +var require_catch_filter = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/catch_filter.js"(exports2, module2) { + "use strict"; + module2.exports = function(NEXT_FILTER) { + var util2 = require_util6(); + var getKeys = require_es5().keys; + var tryCatch2 = util2.tryCatch; + var errorObj2 = util2.errorObj; + function catchFilter(instances, cb, promise) { + return function(e) { + var boundTo = promise._boundValue(); + predicateLoop: for (var i = 0; i < instances.length; ++i) { + var item = instances[i]; + if (item === Error || item != null && item.prototype instanceof Error) { + if (e instanceof item) { + return tryCatch2(cb).call(boundTo, e); + } + } else if (typeof item === "function") { + var matchesPredicate = tryCatch2(item).call(boundTo, e); + if (matchesPredicate === errorObj2) { + return matchesPredicate; + } else if (matchesPredicate) { + return tryCatch2(cb).call(boundTo, e); + } + } else if (util2.isObject(e)) { + var keys = getKeys(item); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + if (item[key] != e[key]) { + continue predicateLoop; + } + } + return tryCatch2(cb).call(boundTo, e); + } + } + return NEXT_FILTER; + }; + } + return catchFilter; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/nodeback.js +var require_nodeback = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/nodeback.js"(exports2, module2) { + "use strict"; + var util2 = require_util6(); + var maybeWrapAsError2 = util2.maybeWrapAsError; + var errors = require_errors7(); + var OperationalError = errors.OperationalError; + var es52 = require_es5(); + function isUntypedError(obj2) { + return obj2 instanceof Error && es52.getPrototypeOf(obj2) === Error.prototype; + } + var rErrorKey = /^(?:name|message|stack|cause)$/; + function wrapAsOperationalError(obj2) { + var ret2; + if (isUntypedError(obj2)) { + ret2 = new OperationalError(obj2); + ret2.name = obj2.name; + ret2.message = obj2.message; + ret2.stack = obj2.stack; + var keys = es52.keys(obj2); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (!rErrorKey.test(key)) { + ret2[key] = obj2[key]; + } + } + return ret2; + } + util2.markAsOriginatingFromRejection(obj2); + return obj2; + } + function nodebackForPromise(promise, multiArgs) { + return function(err, value) { + if (promise === null) return; + if (err) { + var wrapped = wrapAsOperationalError(maybeWrapAsError2(err)); + promise._attachExtraTrace(wrapped); + promise._reject(wrapped); + } else if (!multiArgs) { + promise._fulfill(value); + } else { + var $_len = arguments.length; + var args = new Array(Math.max($_len - 1, 0)); + for (var $_i = 1; $_i < $_len; ++$_i) { + args[$_i - 1] = arguments[$_i]; + } + ; + promise._fulfill(args); + } + promise = null; + }; + } + module2.exports = nodebackForPromise; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/method.js +var require_method = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/method.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, apiRejection, debug) { + var util2 = require_util6(); + var tryCatch2 = util2.tryCatch; + Promise2.method = function(fn) { + if (typeof fn !== "function") { + throw new Promise2.TypeError("expecting a function but got " + util2.classString(fn)); + } + return function() { + var ret2 = new Promise2(INTERNAL); + ret2._captureStackTrace(); + ret2._pushContext(); + var value = tryCatch2(fn).apply(this, arguments); + var promiseCreated = ret2._popContext(); + debug.checkForgottenReturns( + value, + promiseCreated, + "Promise.method", + ret2 + ); + ret2._resolveFromSyncValue(value); + return ret2; + }; + }; + Promise2.attempt = Promise2["try"] = function(fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util2.classString(fn)); + } + var ret2 = new Promise2(INTERNAL); + ret2._captureStackTrace(); + ret2._pushContext(); + var value; + if (arguments.length > 1) { + debug.deprecated("calling Promise.try with more than 1 argument"); + var arg = arguments[1]; + var ctx = arguments[2]; + value = util2.isArray(arg) ? tryCatch2(fn).apply(ctx, arg) : tryCatch2(fn).call(ctx, arg); + } else { + value = tryCatch2(fn)(); + } + var promiseCreated = ret2._popContext(); + debug.checkForgottenReturns( + value, + promiseCreated, + "Promise.try", + ret2 + ); + ret2._resolveFromSyncValue(value); + return ret2; + }; + Promise2.prototype._resolveFromSyncValue = function(value) { + if (value === util2.errorObj) { + this._rejectCallback(value.e, false); + } else { + this._resolveCallback(value, true); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/bind.js +var require_bind = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/bind.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, debug) { + var calledBind = false; + var rejectThis = function(_2, e) { + this._reject(e); + }; + var targetRejected = function(e, context) { + context.promiseRejectionQueued = true; + context.bindingPromise._then(rejectThis, rejectThis, null, this, e); + }; + var bindingResolved = function(thisArg, context) { + if ((this._bitField & 50397184) === 0) { + this._resolveCallback(context.target); + } + }; + var bindingRejected = function(e, context) { + if (!context.promiseRejectionQueued) this._reject(e); + }; + Promise2.prototype.bind = function(thisArg) { + if (!calledBind) { + calledBind = true; + Promise2.prototype._propagateFrom = debug.propagateFromFunction(); + Promise2.prototype._boundValue = debug.boundValueFunction(); + } + var maybePromise = tryConvertToPromise(thisArg); + var ret2 = new Promise2(INTERNAL); + ret2._propagateFrom(this, 1); + var target = this._target(); + ret2._setBoundTo(maybePromise); + if (maybePromise instanceof Promise2) { + var context = { + promiseRejectionQueued: false, + promise: ret2, + target, + bindingPromise: maybePromise + }; + target._then(INTERNAL, targetRejected, void 0, ret2, context); + maybePromise._then( + bindingResolved, + bindingRejected, + void 0, + ret2, + context + ); + ret2._setOnCancel(maybePromise); + } else { + ret2._resolveCallback(target); + } + return ret2; + }; + Promise2.prototype._setBoundTo = function(obj2) { + if (obj2 !== void 0) { + this._bitField = this._bitField | 2097152; + this._boundTo = obj2; + } else { + this._bitField = this._bitField & ~2097152; + } + }; + Promise2.prototype._isBound = function() { + return (this._bitField & 2097152) === 2097152; + }; + Promise2.bind = function(thisArg, value) { + return Promise2.resolve(value).bind(thisArg); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/cancel.js +var require_cancel = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/cancel.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, PromiseArray, apiRejection, debug) { + var util2 = require_util6(); + var tryCatch2 = util2.tryCatch; + var errorObj2 = util2.errorObj; + var async = Promise2._async; + Promise2.prototype["break"] = Promise2.prototype.cancel = function() { + if (!debug.cancellation()) return this._warn("cancellation is disabled"); + var promise = this; + var child = promise; + while (promise._isCancellable()) { + if (!promise._cancelBy(child)) { + if (child._isFollowing()) { + child._followee().cancel(); + } else { + child._cancelBranched(); + } + break; + } + var parent = promise._cancellationParent; + if (parent == null || !parent._isCancellable()) { + if (promise._isFollowing()) { + promise._followee().cancel(); + } else { + promise._cancelBranched(); + } + break; + } else { + if (promise._isFollowing()) promise._followee().cancel(); + promise._setWillBeCancelled(); + child = promise; + promise = parent; + } + } + }; + Promise2.prototype._branchHasCancelled = function() { + this._branchesRemainingToCancel--; + }; + Promise2.prototype._enoughBranchesHaveCancelled = function() { + return this._branchesRemainingToCancel === void 0 || this._branchesRemainingToCancel <= 0; + }; + Promise2.prototype._cancelBy = function(canceller) { + if (canceller === this) { + this._branchesRemainingToCancel = 0; + this._invokeOnCancel(); + return true; + } else { + this._branchHasCancelled(); + if (this._enoughBranchesHaveCancelled()) { + this._invokeOnCancel(); + return true; + } + } + return false; + }; + Promise2.prototype._cancelBranched = function() { + if (this._enoughBranchesHaveCancelled()) { + this._cancel(); + } + }; + Promise2.prototype._cancel = function() { + if (!this._isCancellable()) return; + this._setCancelled(); + async.invoke(this._cancelPromises, this, void 0); + }; + Promise2.prototype._cancelPromises = function() { + if (this._length() > 0) this._settlePromises(); + }; + Promise2.prototype._unsetOnCancel = function() { + this._onCancelField = void 0; + }; + Promise2.prototype._isCancellable = function() { + return this.isPending() && !this._isCancelled(); + }; + Promise2.prototype.isCancellable = function() { + return this.isPending() && !this.isCancelled(); + }; + Promise2.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) { + if (util2.isArray(onCancelCallback)) { + for (var i = 0; i < onCancelCallback.length; ++i) { + this._doInvokeOnCancel(onCancelCallback[i], internalOnly); + } + } else if (onCancelCallback !== void 0) { + if (typeof onCancelCallback === "function") { + if (!internalOnly) { + var e = tryCatch2(onCancelCallback).call(this._boundValue()); + if (e === errorObj2) { + this._attachExtraTrace(e.e); + async.throwLater(e.e); + } + } + } else { + onCancelCallback._resultCancelled(this); + } + } + }; + Promise2.prototype._invokeOnCancel = function() { + var onCancelCallback = this._onCancel(); + this._unsetOnCancel(); + async.invoke(this._doInvokeOnCancel, this, onCancelCallback); + }; + Promise2.prototype._invokeInternalOnCancel = function() { + if (this._isCancellable()) { + this._doInvokeOnCancel(this._onCancel(), true); + this._unsetOnCancel(); + } + }; + Promise2.prototype._resultCancelled = function() { + this.cancel(); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/direct_resolve.js +var require_direct_resolve = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/direct_resolve.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2) { + function returner() { + return this.value; + } + function thrower2() { + throw this.reason; + } + Promise2.prototype["return"] = Promise2.prototype.thenReturn = function(value) { + if (value instanceof Promise2) value.suppressUnhandledRejections(); + return this._then( + returner, + void 0, + void 0, + { value }, + void 0 + ); + }; + Promise2.prototype["throw"] = Promise2.prototype.thenThrow = function(reason) { + return this._then( + thrower2, + void 0, + void 0, + { reason }, + void 0 + ); + }; + Promise2.prototype.catchThrow = function(reason) { + if (arguments.length <= 1) { + return this._then( + void 0, + thrower2, + void 0, + { reason }, + void 0 + ); + } else { + var _reason = arguments[1]; + var handler = function() { + throw _reason; + }; + return this.caught(reason, handler); + } + }; + Promise2.prototype.catchReturn = function(value) { + if (arguments.length <= 1) { + if (value instanceof Promise2) value.suppressUnhandledRejections(); + return this._then( + void 0, + returner, + void 0, + { value }, + void 0 + ); + } else { + var _value = arguments[1]; + if (_value instanceof Promise2) _value.suppressUnhandledRejections(); + var handler = function() { + return _value; + }; + return this.caught(value, handler); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/synchronous_inspection.js +var require_synchronous_inspection = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/synchronous_inspection.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2) { + function PromiseInspection(promise) { + if (promise !== void 0) { + promise = promise._target(); + this._bitField = promise._bitField; + this._settledValueField = promise._isFateSealed() ? promise._settledValue() : void 0; + } else { + this._bitField = 0; + this._settledValueField = void 0; + } + } + PromiseInspection.prototype._settledValue = function() { + return this._settledValueField; + }; + var value = PromiseInspection.prototype.value = function() { + if (!this.isFulfilled()) { + throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n"); + } + return this._settledValue(); + }; + var reason = PromiseInspection.prototype.error = PromiseInspection.prototype.reason = function() { + if (!this.isRejected()) { + throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n"); + } + return this._settledValue(); + }; + var isFulfilled = PromiseInspection.prototype.isFulfilled = function() { + return (this._bitField & 33554432) !== 0; + }; + var isRejected = PromiseInspection.prototype.isRejected = function() { + return (this._bitField & 16777216) !== 0; + }; + var isPending = PromiseInspection.prototype.isPending = function() { + return (this._bitField & 50397184) === 0; + }; + var isResolved = PromiseInspection.prototype.isResolved = function() { + return (this._bitField & 50331648) !== 0; + }; + PromiseInspection.prototype.isCancelled = function() { + return (this._bitField & 8454144) !== 0; + }; + Promise2.prototype.__isCancelled = function() { + return (this._bitField & 65536) === 65536; + }; + Promise2.prototype._isCancelled = function() { + return this._target().__isCancelled(); + }; + Promise2.prototype.isCancelled = function() { + return (this._target()._bitField & 8454144) !== 0; + }; + Promise2.prototype.isPending = function() { + return isPending.call(this._target()); + }; + Promise2.prototype.isRejected = function() { + return isRejected.call(this._target()); + }; + Promise2.prototype.isFulfilled = function() { + return isFulfilled.call(this._target()); + }; + Promise2.prototype.isResolved = function() { + return isResolved.call(this._target()); + }; + Promise2.prototype.value = function() { + return value.call(this._target()); + }; + Promise2.prototype.reason = function() { + var target = this._target(); + target._unsetRejectionIsUnhandled(); + return reason.call(target); + }; + Promise2.prototype._value = function() { + return this._settledValue(); + }; + Promise2.prototype._reason = function() { + this._unsetRejectionIsUnhandled(); + return this._settledValue(); + }; + Promise2.PromiseInspection = PromiseInspection; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/join.js +var require_join = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/join.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain) { + var util2 = require_util6(); + var canEvaluate2 = util2.canEvaluate; + var tryCatch2 = util2.tryCatch; + var errorObj2 = util2.errorObj; + var reject; + if (true) { + if (canEvaluate2) { + var thenCallback = function(i2) { + return new Function("value", "holder", " \n 'use strict'; \n holder.pIndex = value; \n holder.checkFulfillment(this); \n ".replace(/Index/g, i2)); + }; + var promiseSetter = function(i2) { + return new Function("promise", "holder", " \n 'use strict'; \n holder.pIndex = promise; \n ".replace(/Index/g, i2)); + }; + var generateHolderClass = function(total) { + var props = new Array(total); + for (var i2 = 0; i2 < props.length; ++i2) { + props[i2] = "this.p" + (i2 + 1); + } + var assignment = props.join(" = ") + " = null;"; + var cancellationCode = "var promise;\n" + props.map(function(prop) { + return " \n promise = " + prop + "; \n if (promise instanceof Promise) { \n promise.cancel(); \n } \n "; + }).join("\n"); + var passedArguments = props.join(", "); + var name = "Holder$" + total; + var code = "return function(tryCatch, errorObj, Promise, async) { \n 'use strict'; \n function [TheName](fn) { \n [TheProperties] \n this.fn = fn; \n this.asyncNeeded = true; \n this.now = 0; \n } \n \n [TheName].prototype._callFunction = function(promise) { \n promise._pushContext(); \n var ret = tryCatch(this.fn)([ThePassedArguments]); \n promise._popContext(); \n if (ret === errorObj) { \n promise._rejectCallback(ret.e, false); \n } else { \n promise._resolveCallback(ret); \n } \n }; \n \n [TheName].prototype.checkFulfillment = function(promise) { \n var now = ++this.now; \n if (now === [TheTotal]) { \n if (this.asyncNeeded) { \n async.invoke(this._callFunction, this, promise); \n } else { \n this._callFunction(promise); \n } \n \n } \n }; \n \n [TheName].prototype._resultCancelled = function() { \n [CancellationCode] \n }; \n \n return [TheName]; \n }(tryCatch, errorObj, Promise, async); \n "; + code = code.replace(/\[TheName\]/g, name).replace(/\[TheTotal\]/g, total).replace(/\[ThePassedArguments\]/g, passedArguments).replace(/\[TheProperties\]/g, assignment).replace(/\[CancellationCode\]/g, cancellationCode); + return new Function("tryCatch", "errorObj", "Promise", "async", code)(tryCatch2, errorObj2, Promise2, async); + }; + var holderClasses = []; + var thenCallbacks = []; + var promiseSetters = []; + for (var i = 0; i < 8; ++i) { + holderClasses.push(generateHolderClass(i + 1)); + thenCallbacks.push(thenCallback(i + 1)); + promiseSetters.push(promiseSetter(i + 1)); + } + reject = function(reason) { + this._reject(reason); + }; + } + } + Promise2.join = function() { + var last = arguments.length - 1; + var fn; + if (last > 0 && typeof arguments[last] === "function") { + fn = arguments[last]; + if (true) { + if (last <= 8 && canEvaluate2) { + var ret2 = new Promise2(INTERNAL); + ret2._captureStackTrace(); + var HolderClass = holderClasses[last - 1]; + var holder = new HolderClass(fn); + var callbacks = thenCallbacks; + for (var i2 = 0; i2 < last; ++i2) { + var maybePromise = tryConvertToPromise(arguments[i2], ret2); + if (maybePromise instanceof Promise2) { + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if ((bitField & 50397184) === 0) { + maybePromise._then( + callbacks[i2], + reject, + void 0, + ret2, + holder + ); + promiseSetters[i2](maybePromise, holder); + holder.asyncNeeded = false; + } else if ((bitField & 33554432) !== 0) { + callbacks[i2].call( + ret2, + maybePromise._value(), + holder + ); + } else if ((bitField & 16777216) !== 0) { + ret2._reject(maybePromise._reason()); + } else { + ret2._cancel(); + } + } else { + callbacks[i2].call(ret2, maybePromise, holder); + } + } + if (!ret2._isFateSealed()) { + if (holder.asyncNeeded) { + var domain = getDomain(); + if (domain !== null) { + holder.fn = util2.domainBind(domain, holder.fn); + } + } + ret2._setAsyncGuaranteed(); + ret2._setOnCancel(holder); + } + return ret2; + } + } + } + var $_len = arguments.length; + var args = new Array($_len); + for (var $_i = 0; $_i < $_len; ++$_i) { + args[$_i] = arguments[$_i]; + } + ; + if (fn) args.pop(); + var ret2 = new PromiseArray(args).promise(); + return fn !== void 0 ? ret2.spread(fn) : ret2; + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/map.js +var require_map4 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/map.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug) { + var getDomain = Promise2._getDomain; + var util2 = require_util6(); + var tryCatch2 = util2.tryCatch; + var errorObj2 = util2.errorObj; + var async = Promise2._async; + function MappingPromiseArray(promises, fn, limit, _filter) { + this.constructor$(promises); + this._promise._captureStackTrace(); + var domain = getDomain(); + this._callback = domain === null ? fn : util2.domainBind(domain, fn); + this._preservedValues = _filter === INTERNAL ? new Array(this.length()) : null; + this._limit = limit; + this._inFlight = 0; + this._queue = []; + async.invoke(this._asyncInit, this, void 0); + } + util2.inherits(MappingPromiseArray, PromiseArray); + MappingPromiseArray.prototype._asyncInit = function() { + this._init$(void 0, -2); + }; + MappingPromiseArray.prototype._init = function() { + }; + MappingPromiseArray.prototype._promiseFulfilled = function(value, index) { + var values = this._values; + var length = this.length(); + var preservedValues = this._preservedValues; + var limit = this._limit; + if (index < 0) { + index = index * -1 - 1; + values[index] = value; + if (limit >= 1) { + this._inFlight--; + this._drainQueue(); + if (this._isResolved()) return true; + } + } else { + if (limit >= 1 && this._inFlight >= limit) { + values[index] = value; + this._queue.push(index); + return false; + } + if (preservedValues !== null) preservedValues[index] = value; + var promise = this._promise; + var callback = this._callback; + var receiver = promise._boundValue(); + promise._pushContext(); + var ret2 = tryCatch2(callback).call(receiver, value, index, length); + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret2, + promiseCreated, + preservedValues !== null ? "Promise.filter" : "Promise.map", + promise + ); + if (ret2 === errorObj2) { + this._reject(ret2.e); + return true; + } + var maybePromise = tryConvertToPromise(ret2, this._promise); + if (maybePromise instanceof Promise2) { + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if ((bitField & 50397184) === 0) { + if (limit >= 1) this._inFlight++; + values[index] = maybePromise; + maybePromise._proxy(this, (index + 1) * -1); + return false; + } else if ((bitField & 33554432) !== 0) { + ret2 = maybePromise._value(); + } else if ((bitField & 16777216) !== 0) { + this._reject(maybePromise._reason()); + return true; + } else { + this._cancel(); + return true; + } + } + values[index] = ret2; + } + var totalResolved = ++this._totalResolved; + if (totalResolved >= length) { + if (preservedValues !== null) { + this._filter(values, preservedValues); + } else { + this._resolve(values); + } + return true; + } + return false; + }; + MappingPromiseArray.prototype._drainQueue = function() { + var queue = this._queue; + var limit = this._limit; + var values = this._values; + while (queue.length > 0 && this._inFlight < limit) { + if (this._isResolved()) return; + var index = queue.pop(); + this._promiseFulfilled(values[index], index); + } + }; + MappingPromiseArray.prototype._filter = function(booleans, values) { + var len = values.length; + var ret2 = new Array(len); + var j = 0; + for (var i = 0; i < len; ++i) { + if (booleans[i]) ret2[j++] = values[i]; + } + ret2.length = j; + this._resolve(ret2); + }; + MappingPromiseArray.prototype.preservedValues = function() { + return this._preservedValues; + }; + function map(promises, fn, options, _filter) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util2.classString(fn)); + } + var limit = 0; + if (options !== void 0) { + if (typeof options === "object" && options !== null) { + if (typeof options.concurrency !== "number") { + return Promise2.reject( + new TypeError("'concurrency' must be a number but it is " + util2.classString(options.concurrency)) + ); + } + limit = options.concurrency; + } else { + return Promise2.reject(new TypeError( + "options argument must be an object but it is " + util2.classString(options) + )); + } + } + limit = typeof limit === "number" && isFinite(limit) && limit >= 1 ? limit : 0; + return new MappingPromiseArray(promises, fn, limit, _filter).promise(); + } + Promise2.prototype.map = function(fn, options) { + return map(this, fn, options, null); + }; + Promise2.map = function(promises, fn, options, _filter) { + return map(promises, fn, options, _filter); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/call_get.js +var require_call_get = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/call_get.js"(exports2, module2) { + "use strict"; + var cr = Object.create; + if (cr) { + callerCache = cr(null); + getterCache = cr(null); + callerCache[" size"] = getterCache[" size"] = 0; + } + var callerCache; + var getterCache; + module2.exports = function(Promise2) { + var util2 = require_util6(); + var canEvaluate2 = util2.canEvaluate; + var isIdentifier2 = util2.isIdentifier; + var getMethodCaller; + var getGetter; + if (true) { + var makeMethodCaller = function(methodName) { + return new Function("ensureMethod", " \n return function(obj) { \n 'use strict' \n var len = this.length; \n ensureMethod(obj, 'methodName'); \n switch(len) { \n case 1: return obj.methodName(this[0]); \n case 2: return obj.methodName(this[0], this[1]); \n case 3: return obj.methodName(this[0], this[1], this[2]); \n case 0: return obj.methodName(); \n default: \n return obj.methodName.apply(obj, this); \n } \n }; \n ".replace(/methodName/g, methodName))(ensureMethod); + }; + var makeGetter = function(propertyName) { + return new Function("obj", " \n 'use strict'; \n return obj.propertyName; \n ".replace("propertyName", propertyName)); + }; + var getCompiled = function(name, compiler, cache) { + var ret2 = cache[name]; + if (typeof ret2 !== "function") { + if (!isIdentifier2(name)) { + return null; + } + ret2 = compiler(name); + cache[name] = ret2; + cache[" size"]++; + if (cache[" size"] > 512) { + var keys = Object.keys(cache); + for (var i = 0; i < 256; ++i) delete cache[keys[i]]; + cache[" size"] = keys.length - 256; + } + } + return ret2; + }; + getMethodCaller = function(name) { + return getCompiled(name, makeMethodCaller, callerCache); + }; + getGetter = function(name) { + return getCompiled(name, makeGetter, getterCache); + }; + } + function ensureMethod(obj2, methodName) { + var fn; + if (obj2 != null) fn = obj2[methodName]; + if (typeof fn !== "function") { + var message = "Object " + util2.classString(obj2) + " has no method '" + util2.toString(methodName) + "'"; + throw new Promise2.TypeError(message); + } + return fn; + } + function caller(obj2) { + var methodName = this.pop(); + var fn = ensureMethod(obj2, methodName); + return fn.apply(obj2, this); + } + Promise2.prototype.call = function(methodName) { + var $_len = arguments.length; + var args = new Array(Math.max($_len - 1, 0)); + for (var $_i = 1; $_i < $_len; ++$_i) { + args[$_i - 1] = arguments[$_i]; + } + ; + if (true) { + if (canEvaluate2) { + var maybeCaller = getMethodCaller(methodName); + if (maybeCaller !== null) { + return this._then( + maybeCaller, + void 0, + void 0, + args, + void 0 + ); + } + } + } + args.push(methodName); + return this._then(caller, void 0, void 0, args, void 0); + }; + function namedGetter(obj2) { + return obj2[this]; + } + function indexedGetter(obj2) { + var index = +this; + if (index < 0) index = Math.max(0, index + obj2.length); + return obj2[index]; + } + Promise2.prototype.get = function(propertyName) { + var isIndex = typeof propertyName === "number"; + var getter; + if (!isIndex) { + if (canEvaluate2) { + var maybeGetter = getGetter(propertyName); + getter = maybeGetter !== null ? maybeGetter : namedGetter; + } else { + getter = namedGetter; + } + } else { + getter = indexedGetter; + } + return this._then(getter, void 0, void 0, propertyName, void 0); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/using.js +var require_using2 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/using.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug) { + var util2 = require_util6(); + var TypeError2 = require_errors7().TypeError; + var inherits2 = require_util6().inherits; + var errorObj2 = util2.errorObj; + var tryCatch2 = util2.tryCatch; + var NULL = {}; + function thrower2(e) { + setTimeout(function() { + throw e; + }, 0); + } + function castPreservingDisposable(thenable) { + var maybePromise = tryConvertToPromise(thenable); + if (maybePromise !== thenable && typeof thenable._isDisposable === "function" && typeof thenable._getDisposer === "function" && thenable._isDisposable()) { + maybePromise._setDisposable(thenable._getDisposer()); + } + return maybePromise; + } + function dispose(resources, inspection) { + var i = 0; + var len = resources.length; + var ret2 = new Promise2(INTERNAL); + function iterator() { + if (i >= len) return ret2._fulfill(); + var maybePromise = castPreservingDisposable(resources[i++]); + if (maybePromise instanceof Promise2 && maybePromise._isDisposable()) { + try { + maybePromise = tryConvertToPromise( + maybePromise._getDisposer().tryDispose(inspection), + resources.promise + ); + } catch (e) { + return thrower2(e); + } + if (maybePromise instanceof Promise2) { + return maybePromise._then( + iterator, + thrower2, + null, + null, + null + ); + } + } + iterator(); + } + iterator(); + return ret2; + } + function Disposer(data, promise, context) { + this._data = data; + this._promise = promise; + this._context = context; + } + Disposer.prototype.data = function() { + return this._data; + }; + Disposer.prototype.promise = function() { + return this._promise; + }; + Disposer.prototype.resource = function() { + if (this.promise().isFulfilled()) { + return this.promise().value(); + } + return NULL; + }; + Disposer.prototype.tryDispose = function(inspection) { + var resource = this.resource(); + var context = this._context; + if (context !== void 0) context._pushContext(); + var ret2 = resource !== NULL ? this.doDispose(resource, inspection) : null; + if (context !== void 0) context._popContext(); + this._promise._unsetDisposable(); + this._data = null; + return ret2; + }; + Disposer.isDisposer = function(d) { + return d != null && typeof d.resource === "function" && typeof d.tryDispose === "function"; + }; + function FunctionDisposer(fn, promise, context) { + this.constructor$(fn, promise, context); + } + inherits2(FunctionDisposer, Disposer); + FunctionDisposer.prototype.doDispose = function(resource, inspection) { + var fn = this.data(); + return fn.call(resource, resource, inspection); + }; + function maybeUnwrapDisposer(value) { + if (Disposer.isDisposer(value)) { + this.resources[this.index]._setDisposable(value); + return value.promise(); + } + return value; + } + function ResourceList(length) { + this.length = length; + this.promise = null; + this[length - 1] = null; + } + ResourceList.prototype._resultCancelled = function() { + var len = this.length; + for (var i = 0; i < len; ++i) { + var item = this[i]; + if (item instanceof Promise2) { + item.cancel(); + } + } + }; + Promise2.using = function() { + var len = arguments.length; + if (len < 2) return apiRejection( + "you must pass at least 2 arguments to Promise.using" + ); + var fn = arguments[len - 1]; + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util2.classString(fn)); + } + var input; + var spreadArgs = true; + if (len === 2 && Array.isArray(arguments[0])) { + input = arguments[0]; + len = input.length; + spreadArgs = false; + } else { + input = arguments; + len--; + } + var resources = new ResourceList(len); + for (var i = 0; i < len; ++i) { + var resource = input[i]; + if (Disposer.isDisposer(resource)) { + var disposer = resource; + resource = resource.promise(); + resource._setDisposable(disposer); + } else { + var maybePromise = tryConvertToPromise(resource); + if (maybePromise instanceof Promise2) { + resource = maybePromise._then(maybeUnwrapDisposer, null, null, { + resources, + index: i + }, void 0); + } + } + resources[i] = resource; + } + var reflectedResources = new Array(resources.length); + for (var i = 0; i < reflectedResources.length; ++i) { + reflectedResources[i] = Promise2.resolve(resources[i]).reflect(); + } + var resultPromise = Promise2.all(reflectedResources).then(function(inspections) { + for (var i2 = 0; i2 < inspections.length; ++i2) { + var inspection = inspections[i2]; + if (inspection.isRejected()) { + errorObj2.e = inspection.error(); + return errorObj2; + } else if (!inspection.isFulfilled()) { + resultPromise.cancel(); + return; + } + inspections[i2] = inspection.value(); + } + promise._pushContext(); + fn = tryCatch2(fn); + var ret2 = spreadArgs ? fn.apply(void 0, inspections) : fn(inspections); + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret2, + promiseCreated, + "Promise.using", + promise + ); + return ret2; + }); + var promise = resultPromise.lastly(function() { + var inspection = new Promise2.PromiseInspection(resultPromise); + return dispose(resources, inspection); + }); + resources.promise = promise; + promise._setOnCancel(resources); + return promise; + }; + Promise2.prototype._setDisposable = function(disposer) { + this._bitField = this._bitField | 131072; + this._disposer = disposer; + }; + Promise2.prototype._isDisposable = function() { + return (this._bitField & 131072) > 0; + }; + Promise2.prototype._getDisposer = function() { + return this._disposer; + }; + Promise2.prototype._unsetDisposable = function() { + this._bitField = this._bitField & ~131072; + this._disposer = void 0; + }; + Promise2.prototype.disposer = function(fn) { + if (typeof fn === "function") { + return new FunctionDisposer(fn, this, createContext()); + } + throw new TypeError2(); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/timers.js +var require_timers = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/timers.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL, debug) { + var util2 = require_util6(); + var TimeoutError = Promise2.TimeoutError; + function HandleWrapper(handle) { + this.handle = handle; + } + HandleWrapper.prototype._resultCancelled = function() { + clearTimeout(this.handle); + }; + var afterValue = function(value) { + return delay(+this).thenReturn(value); + }; + var delay = Promise2.delay = function(ms, value) { + var ret2; + var handle; + if (value !== void 0) { + ret2 = Promise2.resolve(value)._then(afterValue, null, null, ms, void 0); + if (debug.cancellation() && value instanceof Promise2) { + ret2._setOnCancel(value); + } + } else { + ret2 = new Promise2(INTERNAL); + handle = setTimeout(function() { + ret2._fulfill(); + }, +ms); + if (debug.cancellation()) { + ret2._setOnCancel(new HandleWrapper(handle)); + } + ret2._captureStackTrace(); + } + ret2._setAsyncGuaranteed(); + return ret2; + }; + Promise2.prototype.delay = function(ms) { + return delay(ms, this); + }; + var afterTimeout = function(promise, message, parent) { + var err; + if (typeof message !== "string") { + if (message instanceof Error) { + err = message; + } else { + err = new TimeoutError("operation timed out"); + } + } else { + err = new TimeoutError(message); + } + util2.markAsOriginatingFromRejection(err); + promise._attachExtraTrace(err); + promise._reject(err); + if (parent != null) { + parent.cancel(); + } + }; + function successClear(value) { + clearTimeout(this.handle); + return value; + } + function failureClear(reason) { + clearTimeout(this.handle); + throw reason; + } + Promise2.prototype.timeout = function(ms, message) { + ms = +ms; + var ret2, parent; + var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() { + if (ret2.isPending()) { + afterTimeout(ret2, message, parent); + } + }, ms)); + if (debug.cancellation()) { + parent = this.then(); + ret2 = parent._then( + successClear, + failureClear, + void 0, + handleWrapper, + void 0 + ); + ret2._setOnCancel(handleWrapper); + } else { + ret2 = this._then( + successClear, + failureClear, + void 0, + handleWrapper, + void 0 + ); + } + return ret2; + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/generators.js +var require_generators = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/generators.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug) { + var errors = require_errors7(); + var TypeError2 = errors.TypeError; + var util2 = require_util6(); + var errorObj2 = util2.errorObj; + var tryCatch2 = util2.tryCatch; + var yieldHandlers = []; + function promiseFromYieldHandler(value, yieldHandlers2, traceParent) { + for (var i = 0; i < yieldHandlers2.length; ++i) { + traceParent._pushContext(); + var result = tryCatch2(yieldHandlers2[i])(value); + traceParent._popContext(); + if (result === errorObj2) { + traceParent._pushContext(); + var ret2 = Promise2.reject(errorObj2.e); + traceParent._popContext(); + return ret2; + } + var maybePromise = tryConvertToPromise(result, traceParent); + if (maybePromise instanceof Promise2) return maybePromise; + } + return null; + } + function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) { + if (debug.cancellation()) { + var internal = new Promise2(INTERNAL); + var _finallyPromise = this._finallyPromise = new Promise2(INTERNAL); + this._promise = internal.lastly(function() { + return _finallyPromise; + }); + internal._captureStackTrace(); + internal._setOnCancel(this); + } else { + var promise = this._promise = new Promise2(INTERNAL); + promise._captureStackTrace(); + } + this._stack = stack; + this._generatorFunction = generatorFunction; + this._receiver = receiver; + this._generator = void 0; + this._yieldHandlers = typeof yieldHandler === "function" ? [yieldHandler].concat(yieldHandlers) : yieldHandlers; + this._yieldedPromise = null; + this._cancellationPhase = false; + } + util2.inherits(PromiseSpawn, Proxyable); + PromiseSpawn.prototype._isResolved = function() { + return this._promise === null; + }; + PromiseSpawn.prototype._cleanup = function() { + this._promise = this._generator = null; + if (debug.cancellation() && this._finallyPromise !== null) { + this._finallyPromise._fulfill(); + this._finallyPromise = null; + } + }; + PromiseSpawn.prototype._promiseCancelled = function() { + if (this._isResolved()) return; + var implementsReturn = typeof this._generator["return"] !== "undefined"; + var result; + if (!implementsReturn) { + var reason = new Promise2.CancellationError( + "generator .return() sentinel" + ); + Promise2.coroutine.returnSentinel = reason; + this._promise._attachExtraTrace(reason); + this._promise._pushContext(); + result = tryCatch2(this._generator["throw"]).call( + this._generator, + reason + ); + this._promise._popContext(); + } else { + this._promise._pushContext(); + result = tryCatch2(this._generator["return"]).call( + this._generator, + void 0 + ); + this._promise._popContext(); + } + this._cancellationPhase = true; + this._yieldedPromise = null; + this._continue(result); + }; + PromiseSpawn.prototype._promiseFulfilled = function(value) { + this._yieldedPromise = null; + this._promise._pushContext(); + var result = tryCatch2(this._generator.next).call(this._generator, value); + this._promise._popContext(); + this._continue(result); + }; + PromiseSpawn.prototype._promiseRejected = function(reason) { + this._yieldedPromise = null; + this._promise._attachExtraTrace(reason); + this._promise._pushContext(); + var result = tryCatch2(this._generator["throw"]).call(this._generator, reason); + this._promise._popContext(); + this._continue(result); + }; + PromiseSpawn.prototype._resultCancelled = function() { + if (this._yieldedPromise instanceof Promise2) { + var promise = this._yieldedPromise; + this._yieldedPromise = null; + promise.cancel(); + } + }; + PromiseSpawn.prototype.promise = function() { + return this._promise; + }; + PromiseSpawn.prototype._run = function() { + this._generator = this._generatorFunction.call(this._receiver); + this._receiver = this._generatorFunction = void 0; + this._promiseFulfilled(void 0); + }; + PromiseSpawn.prototype._continue = function(result) { + var promise = this._promise; + if (result === errorObj2) { + this._cleanup(); + if (this._cancellationPhase) { + return promise.cancel(); + } else { + return promise._rejectCallback(result.e, false); + } + } + var value = result.value; + if (result.done === true) { + this._cleanup(); + if (this._cancellationPhase) { + return promise.cancel(); + } else { + return promise._resolveCallback(value); + } + } else { + var maybePromise = tryConvertToPromise(value, this._promise); + if (!(maybePromise instanceof Promise2)) { + maybePromise = promiseFromYieldHandler( + maybePromise, + this._yieldHandlers, + this._promise + ); + if (maybePromise === null) { + this._promiseRejected( + new TypeError2( + "A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s", value) + "From coroutine:\n" + this._stack.split("\n").slice(1, -7).join("\n") + ) + ); + return; + } + } + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if ((bitField & 50397184) === 0) { + this._yieldedPromise = maybePromise; + maybePromise._proxy(this, null); + } else if ((bitField & 33554432) !== 0) { + Promise2._async.invoke( + this._promiseFulfilled, + this, + maybePromise._value() + ); + } else if ((bitField & 16777216) !== 0) { + Promise2._async.invoke( + this._promiseRejected, + this, + maybePromise._reason() + ); + } else { + this._promiseCancelled(); + } + } + }; + Promise2.coroutine = function(generatorFunction, options) { + if (typeof generatorFunction !== "function") { + throw new TypeError2("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n"); + } + var yieldHandler = Object(options).yieldHandler; + var PromiseSpawn$ = PromiseSpawn; + var stack = new Error().stack; + return function() { + var generator = generatorFunction.apply(this, arguments); + var spawn = new PromiseSpawn$( + void 0, + void 0, + yieldHandler, + stack + ); + var ret2 = spawn.promise(); + spawn._generator = generator; + spawn._promiseFulfilled(void 0); + return ret2; + }; + }; + Promise2.coroutine.addYieldHandler = function(fn) { + if (typeof fn !== "function") { + throw new TypeError2("expecting a function but got " + util2.classString(fn)); + } + yieldHandlers.push(fn); + }; + Promise2.spawn = function(generatorFunction) { + debug.deprecated("Promise.spawn()", "Promise.coroutine()"); + if (typeof generatorFunction !== "function") { + return apiRejection("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n"); + } + var spawn = new PromiseSpawn(generatorFunction, this); + var ret2 = spawn.promise(); + spawn._run(Promise2.spawn); + return ret2; + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/nodeify.js +var require_nodeify = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/nodeify.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2) { + var util2 = require_util6(); + var async = Promise2._async; + var tryCatch2 = util2.tryCatch; + var errorObj2 = util2.errorObj; + function spreadAdapter(val, nodeback) { + var promise = this; + if (!util2.isArray(val)) return successAdapter.call(promise, val, nodeback); + var ret2 = tryCatch2(nodeback).apply(promise._boundValue(), [null].concat(val)); + if (ret2 === errorObj2) { + async.throwLater(ret2.e); + } + } + function successAdapter(val, nodeback) { + var promise = this; + var receiver = promise._boundValue(); + var ret2 = val === void 0 ? tryCatch2(nodeback).call(receiver, null) : tryCatch2(nodeback).call(receiver, null, val); + if (ret2 === errorObj2) { + async.throwLater(ret2.e); + } + } + function errorAdapter(reason, nodeback) { + var promise = this; + if (!reason) { + var newReason = new Error(reason + ""); + newReason.cause = reason; + reason = newReason; + } + var ret2 = tryCatch2(nodeback).call(promise._boundValue(), reason); + if (ret2 === errorObj2) { + async.throwLater(ret2.e); + } + } + Promise2.prototype.asCallback = Promise2.prototype.nodeify = function(nodeback, options) { + if (typeof nodeback == "function") { + var adapter = successAdapter; + if (options !== void 0 && Object(options).spread) { + adapter = spreadAdapter; + } + this._then( + adapter, + errorAdapter, + void 0, + this, + nodeback + ); + } + return this; + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/promisify.js +var require_promisify = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/promisify.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL) { + var THIS = {}; + var util2 = require_util6(); + var nodebackForPromise = require_nodeback(); + var withAppended2 = util2.withAppended; + var maybeWrapAsError2 = util2.maybeWrapAsError; + var canEvaluate2 = util2.canEvaluate; + var TypeError2 = require_errors7().TypeError; + var defaultSuffix = "Async"; + var defaultPromisified = { __isPromisified__: true }; + var noCopyProps = [ + "arity", + "length", + "name", + "arguments", + "caller", + "callee", + "prototype", + "__isPromisified__" + ]; + var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$"); + var defaultFilter = function(name) { + return util2.isIdentifier(name) && name.charAt(0) !== "_" && name !== "constructor"; + }; + function propsFilter(key) { + return !noCopyPropsPattern.test(key); + } + function isPromisified(fn) { + try { + return fn.__isPromisified__ === true; + } catch (e) { + return false; + } + } + function hasPromisified(obj2, key, suffix) { + var val = util2.getDataPropertyOrDefault( + obj2, + key + suffix, + defaultPromisified + ); + return val ? isPromisified(val) : false; + } + function checkValid(ret2, suffix, suffixRegexp) { + for (var i = 0; i < ret2.length; i += 2) { + var key = ret2[i]; + if (suffixRegexp.test(key)) { + var keyWithoutAsyncSuffix = key.replace(suffixRegexp, ""); + for (var j = 0; j < ret2.length; j += 2) { + if (ret2[j] === keyWithoutAsyncSuffix) { + throw new TypeError2("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s", suffix)); + } + } + } + } + } + function promisifiableMethods(obj2, suffix, suffixRegexp, filter) { + var keys = util2.inheritedDataKeys(obj2); + var ret2 = []; + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var value = obj2[key]; + var passesDefaultFilter = filter === defaultFilter ? true : defaultFilter(key, value, obj2); + if (typeof value === "function" && !isPromisified(value) && !hasPromisified(obj2, key, suffix) && filter(key, value, obj2, passesDefaultFilter)) { + ret2.push(key, value); + } + } + checkValid(ret2, suffix, suffixRegexp); + return ret2; + } + var escapeIdentRegex = function(str) { + return str.replace(/([$])/, "\\$"); + }; + var makeNodePromisifiedEval; + if (true) { + var switchCaseArgumentOrder = function(likelyArgumentCount) { + var ret2 = [likelyArgumentCount]; + var min = Math.max(0, likelyArgumentCount - 1 - 3); + for (var i = likelyArgumentCount - 1; i >= min; --i) { + ret2.push(i); + } + for (var i = likelyArgumentCount + 1; i <= 3; ++i) { + ret2.push(i); + } + return ret2; + }; + var argumentSequence = function(argumentCount) { + return util2.filledRange(argumentCount, "_arg", ""); + }; + var parameterDeclaration = function(parameterCount2) { + return util2.filledRange( + Math.max(parameterCount2, 3), + "_arg", + "" + ); + }; + var parameterCount = function(fn) { + if (typeof fn.length === "number") { + return Math.max(Math.min(fn.length, 1023 + 1), 0); + } + return 0; + }; + makeNodePromisifiedEval = function(callback, receiver, originalName, fn, _2, multiArgs) { + var newParameterCount = Math.max(0, parameterCount(fn) - 1); + var argumentOrder = switchCaseArgumentOrder(newParameterCount); + var shouldProxyThis = typeof callback === "string" || receiver === THIS; + function generateCallForArgumentCount(count) { + var args = argumentSequence(count).join(", "); + var comma = count > 0 ? ", " : ""; + var ret2; + if (shouldProxyThis) { + ret2 = "ret = callback.call(this, {{args}}, nodeback); break;\n"; + } else { + ret2 = receiver === void 0 ? "ret = callback({{args}}, nodeback); break;\n" : "ret = callback.call(receiver, {{args}}, nodeback); break;\n"; + } + return ret2.replace("{{args}}", args).replace(", ", comma); + } + function generateArgumentSwitchCase() { + var ret2 = ""; + for (var i = 0; i < argumentOrder.length; ++i) { + ret2 += "case " + argumentOrder[i] + ":" + generateCallForArgumentCount(argumentOrder[i]); + } + ret2 += " \n default: \n var args = new Array(len + 1); \n var i = 0; \n for (var i = 0; i < len; ++i) { \n args[i] = arguments[i]; \n } \n args[i] = nodeback; \n [CodeForCall] \n break; \n ".replace("[CodeForCall]", shouldProxyThis ? "ret = callback.apply(this, args);\n" : "ret = callback.apply(receiver, args);\n"); + return ret2; + } + var getFunctionCode = typeof callback === "string" ? "this != null ? this['" + callback + "'] : fn" : "fn"; + var body = "'use strict'; \n var ret = function (Parameters) { \n 'use strict'; \n var len = arguments.length; \n var promise = new Promise(INTERNAL); \n promise._captureStackTrace(); \n var nodeback = nodebackForPromise(promise, " + multiArgs + "); \n var ret; \n var callback = tryCatch([GetFunctionCode]); \n switch(len) { \n [CodeForSwitchCase] \n } \n if (ret === errorObj) { \n promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n } \n if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n return promise; \n }; \n notEnumerableProp(ret, '__isPromisified__', true); \n return ret; \n ".replace("[CodeForSwitchCase]", generateArgumentSwitchCase()).replace("[GetFunctionCode]", getFunctionCode); + body = body.replace("Parameters", parameterDeclaration(newParameterCount)); + return new Function( + "Promise", + "fn", + "receiver", + "withAppended", + "maybeWrapAsError", + "nodebackForPromise", + "tryCatch", + "errorObj", + "notEnumerableProp", + "INTERNAL", + body + )( + Promise2, + fn, + receiver, + withAppended2, + maybeWrapAsError2, + nodebackForPromise, + util2.tryCatch, + util2.errorObj, + util2.notEnumerableProp, + INTERNAL + ); + }; + } + function makeNodePromisifiedClosure(callback, receiver, _2, fn, __, multiArgs) { + var defaultThis = /* @__PURE__ */ (function() { + return this; + })(); + var method = callback; + if (typeof method === "string") { + callback = fn; + } + function promisified() { + var _receiver = receiver; + if (receiver === THIS) _receiver = this; + var promise = new Promise2(INTERNAL); + promise._captureStackTrace(); + var cb = typeof method === "string" && this !== defaultThis ? this[method] : callback; + var fn2 = nodebackForPromise(promise, multiArgs); + try { + cb.apply(_receiver, withAppended2(arguments, fn2)); + } catch (e) { + promise._rejectCallback(maybeWrapAsError2(e), true, true); + } + if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); + return promise; + } + util2.notEnumerableProp(promisified, "__isPromisified__", true); + return promisified; + } + var makeNodePromisified = canEvaluate2 ? makeNodePromisifiedEval : makeNodePromisifiedClosure; + function promisifyAll(obj2, suffix, filter, promisifier, multiArgs) { + var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$"); + var methods = promisifiableMethods(obj2, suffix, suffixRegexp, filter); + for (var i = 0, len = methods.length; i < len; i += 2) { + var key = methods[i]; + var fn = methods[i + 1]; + var promisifiedKey = key + suffix; + if (promisifier === makeNodePromisified) { + obj2[promisifiedKey] = makeNodePromisified(key, THIS, key, fn, suffix, multiArgs); + } else { + var promisified = promisifier(fn, function() { + return makeNodePromisified( + key, + THIS, + key, + fn, + suffix, + multiArgs + ); + }); + util2.notEnumerableProp(promisified, "__isPromisified__", true); + obj2[promisifiedKey] = promisified; + } + } + util2.toFastProperties(obj2); + return obj2; + } + function promisify(callback, receiver, multiArgs) { + return makeNodePromisified( + callback, + receiver, + void 0, + callback, + null, + multiArgs + ); + } + Promise2.promisify = function(fn, options) { + if (typeof fn !== "function") { + throw new TypeError2("expecting a function but got " + util2.classString(fn)); + } + if (isPromisified(fn)) { + return fn; + } + options = Object(options); + var receiver = options.context === void 0 ? THIS : options.context; + var multiArgs = !!options.multiArgs; + var ret2 = promisify(fn, receiver, multiArgs); + util2.copyDescriptors(fn, ret2, propsFilter); + return ret2; + }; + Promise2.promisifyAll = function(target, options) { + if (typeof target !== "function" && typeof target !== "object") { + throw new TypeError2("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n"); + } + options = Object(options); + var multiArgs = !!options.multiArgs; + var suffix = options.suffix; + if (typeof suffix !== "string") suffix = defaultSuffix; + var filter = options.filter; + if (typeof filter !== "function") filter = defaultFilter; + var promisifier = options.promisifier; + if (typeof promisifier !== "function") promisifier = makeNodePromisified; + if (!util2.isIdentifier(suffix)) { + throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n"); + } + var keys = util2.inheritedDataKeys(target); + for (var i = 0; i < keys.length; ++i) { + var value = target[keys[i]]; + if (keys[i] !== "constructor" && util2.isClass(value)) { + promisifyAll( + value.prototype, + suffix, + filter, + promisifier, + multiArgs + ); + promisifyAll(value, suffix, filter, promisifier, multiArgs); + } + } + return promisifyAll(target, suffix, filter, promisifier, multiArgs); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/props.js +var require_props = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/props.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, PromiseArray, tryConvertToPromise, apiRejection) { + var util2 = require_util6(); + var isObject2 = util2.isObject; + var es52 = require_es5(); + var Es6Map; + if (typeof Map === "function") Es6Map = Map; + var mapToEntries = /* @__PURE__ */ (function() { + var index = 0; + var size = 0; + function extractEntry(value, key) { + this[index] = value; + this[index + size] = key; + index++; + } + return function mapToEntries2(map) { + size = map.size; + index = 0; + var ret2 = new Array(map.size * 2); + map.forEach(extractEntry, ret2); + return ret2; + }; + })(); + var entriesToMap = function(entries) { + var ret2 = new Es6Map(); + var length = entries.length / 2 | 0; + for (var i = 0; i < length; ++i) { + var key = entries[length + i]; + var value = entries[i]; + ret2.set(key, value); + } + return ret2; + }; + function PropertiesPromiseArray(obj2) { + var isMap = false; + var entries; + if (Es6Map !== void 0 && obj2 instanceof Es6Map) { + entries = mapToEntries(obj2); + isMap = true; + } else { + var keys = es52.keys(obj2); + var len = keys.length; + entries = new Array(len * 2); + for (var i = 0; i < len; ++i) { + var key = keys[i]; + entries[i] = obj2[key]; + entries[i + len] = key; + } + } + this.constructor$(entries); + this._isMap = isMap; + this._init$(void 0, -3); + } + util2.inherits(PropertiesPromiseArray, PromiseArray); + PropertiesPromiseArray.prototype._init = function() { + }; + PropertiesPromiseArray.prototype._promiseFulfilled = function(value, index) { + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + var val; + if (this._isMap) { + val = entriesToMap(this._values); + } else { + val = {}; + var keyOffset = this.length(); + for (var i = 0, len = this.length(); i < len; ++i) { + val[this._values[i + keyOffset]] = this._values[i]; + } + } + this._resolve(val); + return true; + } + return false; + }; + PropertiesPromiseArray.prototype.shouldCopyValues = function() { + return false; + }; + PropertiesPromiseArray.prototype.getActualLength = function(len) { + return len >> 1; + }; + function props(promises) { + var ret2; + var castValue = tryConvertToPromise(promises); + if (!isObject2(castValue)) { + return apiRejection("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n"); + } else if (castValue instanceof Promise2) { + ret2 = castValue._then( + Promise2.props, + void 0, + void 0, + void 0, + void 0 + ); + } else { + ret2 = new PropertiesPromiseArray(castValue).promise(); + } + if (castValue instanceof Promise2) { + ret2._propagateFrom(castValue, 2); + } + return ret2; + } + Promise2.prototype.props = function() { + return props(this); + }; + Promise2.props = function(promises) { + return props(promises); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/race.js +var require_race3 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/race.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, apiRejection) { + var util2 = require_util6(); + var raceLater = function(promise) { + return promise.then(function(array) { + return race(array, promise); + }); + }; + function race(promises, parent) { + var maybePromise = tryConvertToPromise(promises); + if (maybePromise instanceof Promise2) { + return raceLater(maybePromise); + } else { + promises = util2.asArray(promises); + if (promises === null) + return apiRejection("expecting an array or an iterable object but got " + util2.classString(promises)); + } + var ret2 = new Promise2(INTERNAL); + if (parent !== void 0) { + ret2._propagateFrom(parent, 3); + } + var fulfill = ret2._fulfill; + var reject = ret2._reject; + for (var i = 0, len = promises.length; i < len; ++i) { + var val = promises[i]; + if (val === void 0 && !(i in promises)) { + continue; + } + Promise2.cast(val)._then(fulfill, reject, void 0, ret2, null); + } + return ret2; + } + Promise2.race = function(promises) { + return race(promises, void 0); + }; + Promise2.prototype.race = function() { + return race(this, void 0); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/reduce.js +var require_reduce2 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/reduce.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug) { + var getDomain = Promise2._getDomain; + var util2 = require_util6(); + var tryCatch2 = util2.tryCatch; + function ReductionPromiseArray(promises, fn, initialValue, _each) { + this.constructor$(promises); + var domain = getDomain(); + this._fn = domain === null ? fn : util2.domainBind(domain, fn); + if (initialValue !== void 0) { + initialValue = Promise2.resolve(initialValue); + initialValue._attachCancellationCallback(this); + } + this._initialValue = initialValue; + this._currentCancellable = null; + if (_each === INTERNAL) { + this._eachValues = Array(this._length); + } else if (_each === 0) { + this._eachValues = null; + } else { + this._eachValues = void 0; + } + this._promise._captureStackTrace(); + this._init$(void 0, -5); + } + util2.inherits(ReductionPromiseArray, PromiseArray); + ReductionPromiseArray.prototype._gotAccum = function(accum) { + if (this._eachValues !== void 0 && this._eachValues !== null && accum !== INTERNAL) { + this._eachValues.push(accum); + } + }; + ReductionPromiseArray.prototype._eachComplete = function(value) { + if (this._eachValues !== null) { + this._eachValues.push(value); + } + return this._eachValues; + }; + ReductionPromiseArray.prototype._init = function() { + }; + ReductionPromiseArray.prototype._resolveEmptyArray = function() { + this._resolve(this._eachValues !== void 0 ? this._eachValues : this._initialValue); + }; + ReductionPromiseArray.prototype.shouldCopyValues = function() { + return false; + }; + ReductionPromiseArray.prototype._resolve = function(value) { + this._promise._resolveCallback(value); + this._values = null; + }; + ReductionPromiseArray.prototype._resultCancelled = function(sender) { + if (sender === this._initialValue) return this._cancel(); + if (this._isResolved()) return; + this._resultCancelled$(); + if (this._currentCancellable instanceof Promise2) { + this._currentCancellable.cancel(); + } + if (this._initialValue instanceof Promise2) { + this._initialValue.cancel(); + } + }; + ReductionPromiseArray.prototype._iterate = function(values) { + this._values = values; + var value; + var i; + var length = values.length; + if (this._initialValue !== void 0) { + value = this._initialValue; + i = 0; + } else { + value = Promise2.resolve(values[0]); + i = 1; + } + this._currentCancellable = value; + if (!value.isRejected()) { + for (; i < length; ++i) { + var ctx = { + accum: null, + value: values[i], + index: i, + length, + array: this + }; + value = value._then(gotAccum, void 0, void 0, ctx, void 0); + } + } + if (this._eachValues !== void 0) { + value = value._then(this._eachComplete, void 0, void 0, this, void 0); + } + value._then(completed, completed, void 0, value, this); + }; + Promise2.prototype.reduce = function(fn, initialValue) { + return reduce(this, fn, initialValue, null); + }; + Promise2.reduce = function(promises, fn, initialValue, _each) { + return reduce(promises, fn, initialValue, _each); + }; + function completed(valueOrReason, array) { + if (this.isFulfilled()) { + array._resolve(valueOrReason); + } else { + array._reject(valueOrReason); + } + } + function reduce(promises, fn, initialValue, _each) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util2.classString(fn)); + } + var array = new ReductionPromiseArray(promises, fn, initialValue, _each); + return array.promise(); + } + function gotAccum(accum) { + this.accum = accum; + this.array._gotAccum(accum); + var value = tryConvertToPromise(this.value, this.array._promise); + if (value instanceof Promise2) { + this.array._currentCancellable = value; + return value._then(gotValue, void 0, void 0, this, void 0); + } else { + return gotValue.call(this, value); + } + } + function gotValue(value) { + var array = this.array; + var promise = array._promise; + var fn = tryCatch2(array._fn); + promise._pushContext(); + var ret2; + if (array._eachValues !== void 0) { + ret2 = fn.call(promise._boundValue(), value, this.index, this.length); + } else { + ret2 = fn.call( + promise._boundValue(), + this.accum, + value, + this.index, + this.length + ); + } + if (ret2 instanceof Promise2) { + array._currentCancellable = ret2; + } + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret2, + promiseCreated, + array._eachValues !== void 0 ? "Promise.each" : "Promise.reduce", + promise + ); + return ret2; + } + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/settle.js +var require_settle = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/settle.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, PromiseArray, debug) { + var PromiseInspection = Promise2.PromiseInspection; + var util2 = require_util6(); + function SettledPromiseArray(values) { + this.constructor$(values); + } + util2.inherits(SettledPromiseArray, PromiseArray); + SettledPromiseArray.prototype._promiseResolved = function(index, inspection) { + this._values[index] = inspection; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + return true; + } + return false; + }; + SettledPromiseArray.prototype._promiseFulfilled = function(value, index) { + var ret2 = new PromiseInspection(); + ret2._bitField = 33554432; + ret2._settledValueField = value; + return this._promiseResolved(index, ret2); + }; + SettledPromiseArray.prototype._promiseRejected = function(reason, index) { + var ret2 = new PromiseInspection(); + ret2._bitField = 16777216; + ret2._settledValueField = reason; + return this._promiseResolved(index, ret2); + }; + Promise2.settle = function(promises) { + debug.deprecated(".settle()", ".reflect()"); + return new SettledPromiseArray(promises).promise(); + }; + Promise2.prototype.settle = function() { + return Promise2.settle(this); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/some.js +var require_some = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/some.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, PromiseArray, apiRejection) { + var util2 = require_util6(); + var RangeError2 = require_errors7().RangeError; + var AggregateError2 = require_errors7().AggregateError; + var isArray = util2.isArray; + var CANCELLATION = {}; + function SomePromiseArray(values) { + this.constructor$(values); + this._howMany = 0; + this._unwrap = false; + this._initialized = false; + } + util2.inherits(SomePromiseArray, PromiseArray); + SomePromiseArray.prototype._init = function() { + if (!this._initialized) { + return; + } + if (this._howMany === 0) { + this._resolve([]); + return; + } + this._init$(void 0, -5); + var isArrayResolved = isArray(this._values); + if (!this._isResolved() && isArrayResolved && this._howMany > this._canPossiblyFulfill()) { + this._reject(this._getRangeError(this.length())); + } + }; + SomePromiseArray.prototype.init = function() { + this._initialized = true; + this._init(); + }; + SomePromiseArray.prototype.setUnwrap = function() { + this._unwrap = true; + }; + SomePromiseArray.prototype.howMany = function() { + return this._howMany; + }; + SomePromiseArray.prototype.setHowMany = function(count) { + this._howMany = count; + }; + SomePromiseArray.prototype._promiseFulfilled = function(value) { + this._addFulfilled(value); + if (this._fulfilled() === this.howMany()) { + this._values.length = this.howMany(); + if (this.howMany() === 1 && this._unwrap) { + this._resolve(this._values[0]); + } else { + this._resolve(this._values); + } + return true; + } + return false; + }; + SomePromiseArray.prototype._promiseRejected = function(reason) { + this._addRejected(reason); + return this._checkOutcome(); + }; + SomePromiseArray.prototype._promiseCancelled = function() { + if (this._values instanceof Promise2 || this._values == null) { + return this._cancel(); + } + this._addRejected(CANCELLATION); + return this._checkOutcome(); + }; + SomePromiseArray.prototype._checkOutcome = function() { + if (this.howMany() > this._canPossiblyFulfill()) { + var e = new AggregateError2(); + for (var i = this.length(); i < this._values.length; ++i) { + if (this._values[i] !== CANCELLATION) { + e.push(this._values[i]); + } + } + if (e.length > 0) { + this._reject(e); + } else { + this._cancel(); + } + return true; + } + return false; + }; + SomePromiseArray.prototype._fulfilled = function() { + return this._totalResolved; + }; + SomePromiseArray.prototype._rejected = function() { + return this._values.length - this.length(); + }; + SomePromiseArray.prototype._addRejected = function(reason) { + this._values.push(reason); + }; + SomePromiseArray.prototype._addFulfilled = function(value) { + this._values[this._totalResolved++] = value; + }; + SomePromiseArray.prototype._canPossiblyFulfill = function() { + return this.length() - this._rejected(); + }; + SomePromiseArray.prototype._getRangeError = function(count) { + var message = "Input array must contain at least " + this._howMany + " items but contains only " + count + " items"; + return new RangeError2(message); + }; + SomePromiseArray.prototype._resolveEmptyArray = function() { + this._reject(this._getRangeError(0)); + }; + function some(promises, howMany) { + if ((howMany | 0) !== howMany || howMany < 0) { + return apiRejection("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n"); + } + var ret2 = new SomePromiseArray(promises); + var promise = ret2.promise(); + ret2.setHowMany(howMany); + ret2.init(); + return promise; + } + Promise2.some = function(promises, howMany) { + return some(promises, howMany); + }; + Promise2.prototype.some = function(howMany) { + return some(this, howMany); + }; + Promise2._SomePromiseArray = SomePromiseArray; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/filter.js +var require_filter3 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/filter.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL) { + var PromiseMap = Promise2.map; + Promise2.prototype.filter = function(fn, options) { + return PromiseMap(this, fn, options, INTERNAL); + }; + Promise2.filter = function(promises, fn, options) { + return PromiseMap(promises, fn, options, INTERNAL); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/each.js +var require_each = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/each.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL) { + var PromiseReduce = Promise2.reduce; + var PromiseAll = Promise2.all; + function promiseAllThis() { + return PromiseAll(this); + } + function PromiseMapSeries(promises, fn) { + return PromiseReduce(promises, fn, INTERNAL, INTERNAL); + } + Promise2.prototype.each = function(fn) { + return PromiseReduce(this, fn, INTERNAL, 0)._then(promiseAllThis, void 0, void 0, this, void 0); + }; + Promise2.prototype.mapSeries = function(fn) { + return PromiseReduce(this, fn, INTERNAL, INTERNAL); + }; + Promise2.each = function(promises, fn) { + return PromiseReduce(promises, fn, INTERNAL, 0)._then(promiseAllThis, void 0, void 0, promises, void 0); + }; + Promise2.mapSeries = PromiseMapSeries; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/any.js +var require_any = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/any.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2) { + var SomePromiseArray = Promise2._SomePromiseArray; + function any(promises) { + var ret2 = new SomePromiseArray(promises); + var promise = ret2.promise(); + ret2.setHowMany(1); + ret2.setUnwrap(); + ret2.init(); + return promise; + } + Promise2.any = function(promises) { + return any(promises); + }; + Promise2.prototype.any = function() { + return any(this); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/promise.js +var require_promise = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/promise.js"(exports2, module2) { + "use strict"; + module2.exports = function() { + var makeSelfResolutionError = function() { + return new TypeError2("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n"); + }; + var reflectHandler = function() { + return new Promise2.PromiseInspection(this._target()); + }; + var apiRejection = function(msg) { + return Promise2.reject(new TypeError2(msg)); + }; + function Proxyable() { + } + var UNDEFINED_BINDING = {}; + var util2 = require_util6(); + var getDomain; + if (util2.isNode) { + getDomain = function() { + var ret2 = process.domain; + if (ret2 === void 0) ret2 = null; + return ret2; + }; + } else { + getDomain = function() { + return null; + }; + } + util2.notEnumerableProp(Promise2, "_getDomain", getDomain); + var es52 = require_es5(); + var Async = require_async3(); + var async = new Async(); + es52.defineProperty(Promise2, "_async", { value: async }); + var errors = require_errors7(); + var TypeError2 = Promise2.TypeError = errors.TypeError; + Promise2.RangeError = errors.RangeError; + var CancellationError = Promise2.CancellationError = errors.CancellationError; + Promise2.TimeoutError = errors.TimeoutError; + Promise2.OperationalError = errors.OperationalError; + Promise2.RejectionError = errors.OperationalError; + Promise2.AggregateError = errors.AggregateError; + var INTERNAL = function() { + }; + var APPLY = {}; + var NEXT_FILTER = {}; + var tryConvertToPromise = require_thenables()(Promise2, INTERNAL); + var PromiseArray = require_promise_array()( + Promise2, + INTERNAL, + tryConvertToPromise, + apiRejection, + Proxyable + ); + var Context = require_context()(Promise2); + var createContext = Context.create; + var debug = require_debuggability()(Promise2, Context); + var CapturedTrace = debug.CapturedTrace; + var PassThroughHandlerContext = require_finally()(Promise2, tryConvertToPromise); + var catchFilter = require_catch_filter()(NEXT_FILTER); + var nodebackForPromise = require_nodeback(); + var errorObj2 = util2.errorObj; + var tryCatch2 = util2.tryCatch; + function check(self2, executor) { + if (typeof executor !== "function") { + throw new TypeError2("expecting a function but got " + util2.classString(executor)); + } + if (self2.constructor !== Promise2) { + throw new TypeError2("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n"); + } + } + function Promise2(executor) { + this._bitField = 0; + this._fulfillmentHandler0 = void 0; + this._rejectionHandler0 = void 0; + this._promise0 = void 0; + this._receiver0 = void 0; + if (executor !== INTERNAL) { + check(this, executor); + this._resolveFromExecutor(executor); + } + this._promiseCreated(); + this._fireEvent("promiseCreated", this); + } + Promise2.prototype.toString = function() { + return "[object Promise]"; + }; + Promise2.prototype.caught = Promise2.prototype["catch"] = function(fn) { + var len = arguments.length; + if (len > 1) { + var catchInstances = new Array(len - 1), j = 0, i; + for (i = 0; i < len - 1; ++i) { + var item = arguments[i]; + if (util2.isObject(item)) { + catchInstances[j++] = item; + } else { + return apiRejection("expecting an object but got A catch statement predicate " + util2.classString(item)); + } + } + catchInstances.length = j; + fn = arguments[i]; + return this.then(void 0, catchFilter(catchInstances, fn, this)); + } + return this.then(void 0, fn); + }; + Promise2.prototype.reflect = function() { + return this._then( + reflectHandler, + reflectHandler, + void 0, + this, + void 0 + ); + }; + Promise2.prototype.then = function(didFulfill, didReject) { + if (debug.warnings() && arguments.length > 0 && typeof didFulfill !== "function" && typeof didReject !== "function") { + var msg = ".then() only accepts functions but was passed: " + util2.classString(didFulfill); + if (arguments.length > 1) { + msg += ", " + util2.classString(didReject); + } + this._warn(msg); + } + return this._then(didFulfill, didReject, void 0, void 0, void 0); + }; + Promise2.prototype.done = function(didFulfill, didReject) { + var promise = this._then(didFulfill, didReject, void 0, void 0, void 0); + promise._setIsFinal(); + }; + Promise2.prototype.spread = function(fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util2.classString(fn)); + } + return this.all()._then(fn, void 0, void 0, APPLY, void 0); + }; + Promise2.prototype.toJSON = function() { + var ret2 = { + isFulfilled: false, + isRejected: false, + fulfillmentValue: void 0, + rejectionReason: void 0 + }; + if (this.isFulfilled()) { + ret2.fulfillmentValue = this.value(); + ret2.isFulfilled = true; + } else if (this.isRejected()) { + ret2.rejectionReason = this.reason(); + ret2.isRejected = true; + } + return ret2; + }; + Promise2.prototype.all = function() { + if (arguments.length > 0) { + this._warn(".all() was passed arguments but it does not take any"); + } + return new PromiseArray(this).promise(); + }; + Promise2.prototype.error = function(fn) { + return this.caught(util2.originatesFromRejection, fn); + }; + Promise2.getNewLibraryCopy = module2.exports; + Promise2.is = function(val) { + return val instanceof Promise2; + }; + Promise2.fromNode = Promise2.fromCallback = function(fn) { + var ret2 = new Promise2(INTERNAL); + ret2._captureStackTrace(); + var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs : false; + var result = tryCatch2(fn)(nodebackForPromise(ret2, multiArgs)); + if (result === errorObj2) { + ret2._rejectCallback(result.e, true); + } + if (!ret2._isFateSealed()) ret2._setAsyncGuaranteed(); + return ret2; + }; + Promise2.all = function(promises) { + return new PromiseArray(promises).promise(); + }; + Promise2.cast = function(obj2) { + var ret2 = tryConvertToPromise(obj2); + if (!(ret2 instanceof Promise2)) { + ret2 = new Promise2(INTERNAL); + ret2._captureStackTrace(); + ret2._setFulfilled(); + ret2._rejectionHandler0 = obj2; + } + return ret2; + }; + Promise2.resolve = Promise2.fulfilled = Promise2.cast; + Promise2.reject = Promise2.rejected = function(reason) { + var ret2 = new Promise2(INTERNAL); + ret2._captureStackTrace(); + ret2._rejectCallback(reason, true); + return ret2; + }; + Promise2.setScheduler = function(fn) { + if (typeof fn !== "function") { + throw new TypeError2("expecting a function but got " + util2.classString(fn)); + } + return async.setScheduler(fn); + }; + Promise2.prototype._then = function(didFulfill, didReject, _2, receiver, internalData) { + var haveInternalData = internalData !== void 0; + var promise = haveInternalData ? internalData : new Promise2(INTERNAL); + var target = this._target(); + var bitField = target._bitField; + if (!haveInternalData) { + promise._propagateFrom(this, 3); + promise._captureStackTrace(); + if (receiver === void 0 && (this._bitField & 2097152) !== 0) { + if (!((bitField & 50397184) === 0)) { + receiver = this._boundValue(); + } else { + receiver = target === this ? void 0 : this._boundTo; + } + } + this._fireEvent("promiseChained", this, promise); + } + var domain = getDomain(); + if (!((bitField & 50397184) === 0)) { + var handler, value, settler = target._settlePromiseCtx; + if ((bitField & 33554432) !== 0) { + value = target._rejectionHandler0; + handler = didFulfill; + } else if ((bitField & 16777216) !== 0) { + value = target._fulfillmentHandler0; + handler = didReject; + target._unsetRejectionIsUnhandled(); + } else { + settler = target._settlePromiseLateCancellationObserver; + value = new CancellationError("late cancellation observer"); + target._attachExtraTrace(value); + handler = didReject; + } + async.invoke(settler, target, { + handler: domain === null ? handler : typeof handler === "function" && util2.domainBind(domain, handler), + promise, + receiver, + value + }); + } else { + target._addCallbacks(didFulfill, didReject, promise, receiver, domain); + } + return promise; + }; + Promise2.prototype._length = function() { + return this._bitField & 65535; + }; + Promise2.prototype._isFateSealed = function() { + return (this._bitField & 117506048) !== 0; + }; + Promise2.prototype._isFollowing = function() { + return (this._bitField & 67108864) === 67108864; + }; + Promise2.prototype._setLength = function(len) { + this._bitField = this._bitField & -65536 | len & 65535; + }; + Promise2.prototype._setFulfilled = function() { + this._bitField = this._bitField | 33554432; + this._fireEvent("promiseFulfilled", this); + }; + Promise2.prototype._setRejected = function() { + this._bitField = this._bitField | 16777216; + this._fireEvent("promiseRejected", this); + }; + Promise2.prototype._setFollowing = function() { + this._bitField = this._bitField | 67108864; + this._fireEvent("promiseResolved", this); + }; + Promise2.prototype._setIsFinal = function() { + this._bitField = this._bitField | 4194304; + }; + Promise2.prototype._isFinal = function() { + return (this._bitField & 4194304) > 0; + }; + Promise2.prototype._unsetCancelled = function() { + this._bitField = this._bitField & ~65536; + }; + Promise2.prototype._setCancelled = function() { + this._bitField = this._bitField | 65536; + this._fireEvent("promiseCancelled", this); + }; + Promise2.prototype._setWillBeCancelled = function() { + this._bitField = this._bitField | 8388608; + }; + Promise2.prototype._setAsyncGuaranteed = function() { + if (async.hasCustomScheduler()) return; + this._bitField = this._bitField | 134217728; + }; + Promise2.prototype._receiverAt = function(index) { + var ret2 = index === 0 ? this._receiver0 : this[index * 4 - 4 + 3]; + if (ret2 === UNDEFINED_BINDING) { + return void 0; + } else if (ret2 === void 0 && this._isBound()) { + return this._boundValue(); + } + return ret2; + }; + Promise2.prototype._promiseAt = function(index) { + return this[index * 4 - 4 + 2]; + }; + Promise2.prototype._fulfillmentHandlerAt = function(index) { + return this[index * 4 - 4 + 0]; + }; + Promise2.prototype._rejectionHandlerAt = function(index) { + return this[index * 4 - 4 + 1]; + }; + Promise2.prototype._boundValue = function() { + }; + Promise2.prototype._migrateCallback0 = function(follower) { + var bitField = follower._bitField; + var fulfill = follower._fulfillmentHandler0; + var reject = follower._rejectionHandler0; + var promise = follower._promise0; + var receiver = follower._receiverAt(0); + if (receiver === void 0) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); + }; + Promise2.prototype._migrateCallbackAt = function(follower, index) { + var fulfill = follower._fulfillmentHandlerAt(index); + var reject = follower._rejectionHandlerAt(index); + var promise = follower._promiseAt(index); + var receiver = follower._receiverAt(index); + if (receiver === void 0) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); + }; + Promise2.prototype._addCallbacks = function(fulfill, reject, promise, receiver, domain) { + var index = this._length(); + if (index >= 65535 - 4) { + index = 0; + this._setLength(0); + } + if (index === 0) { + this._promise0 = promise; + this._receiver0 = receiver; + if (typeof fulfill === "function") { + this._fulfillmentHandler0 = domain === null ? fulfill : util2.domainBind(domain, fulfill); + } + if (typeof reject === "function") { + this._rejectionHandler0 = domain === null ? reject : util2.domainBind(domain, reject); + } + } else { + var base = index * 4 - 4; + this[base + 2] = promise; + this[base + 3] = receiver; + if (typeof fulfill === "function") { + this[base + 0] = domain === null ? fulfill : util2.domainBind(domain, fulfill); + } + if (typeof reject === "function") { + this[base + 1] = domain === null ? reject : util2.domainBind(domain, reject); + } + } + this._setLength(index + 1); + return index; + }; + Promise2.prototype._proxy = function(proxyable, arg) { + this._addCallbacks(void 0, void 0, arg, proxyable, null); + }; + Promise2.prototype._resolveCallback = function(value, shouldBind) { + if ((this._bitField & 117506048) !== 0) return; + if (value === this) + return this._rejectCallback(makeSelfResolutionError(), false); + var maybePromise = tryConvertToPromise(value, this); + if (!(maybePromise instanceof Promise2)) return this._fulfill(value); + if (shouldBind) this._propagateFrom(maybePromise, 2); + var promise = maybePromise._target(); + if (promise === this) { + this._reject(makeSelfResolutionError()); + return; + } + var bitField = promise._bitField; + if ((bitField & 50397184) === 0) { + var len = this._length(); + if (len > 0) promise._migrateCallback0(this); + for (var i = 1; i < len; ++i) { + promise._migrateCallbackAt(this, i); + } + this._setFollowing(); + this._setLength(0); + this._setFollowee(promise); + } else if ((bitField & 33554432) !== 0) { + this._fulfill(promise._value()); + } else if ((bitField & 16777216) !== 0) { + this._reject(promise._reason()); + } else { + var reason = new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + this._reject(reason); + } + }; + Promise2.prototype._rejectCallback = function(reason, synchronous, ignoreNonErrorWarnings) { + var trace = util2.ensureErrorObject(reason); + var hasStack = trace === reason; + if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) { + var message = "a promise was rejected with a non-error: " + util2.classString(reason); + this._warn(message, true); + } + this._attachExtraTrace(trace, synchronous ? hasStack : false); + this._reject(reason); + }; + Promise2.prototype._resolveFromExecutor = function(executor) { + var promise = this; + this._captureStackTrace(); + this._pushContext(); + var synchronous = true; + var r = this._execute(executor, function(value) { + promise._resolveCallback(value); + }, function(reason) { + promise._rejectCallback(reason, synchronous); + }); + synchronous = false; + this._popContext(); + if (r !== void 0) { + promise._rejectCallback(r, true); + } + }; + Promise2.prototype._settlePromiseFromHandler = function(handler, receiver, value, promise) { + var bitField = promise._bitField; + if ((bitField & 65536) !== 0) return; + promise._pushContext(); + var x; + if (receiver === APPLY) { + if (!value || typeof value.length !== "number") { + x = errorObj2; + x.e = new TypeError2("cannot .spread() a non-array: " + util2.classString(value)); + } else { + x = tryCatch2(handler).apply(this._boundValue(), value); + } + } else { + x = tryCatch2(handler).call(receiver, value); + } + var promiseCreated = promise._popContext(); + bitField = promise._bitField; + if ((bitField & 65536) !== 0) return; + if (x === NEXT_FILTER) { + promise._reject(value); + } else if (x === errorObj2) { + promise._rejectCallback(x.e, false); + } else { + debug.checkForgottenReturns(x, promiseCreated, "", promise, this); + promise._resolveCallback(x); + } + }; + Promise2.prototype._target = function() { + var ret2 = this; + while (ret2._isFollowing()) ret2 = ret2._followee(); + return ret2; + }; + Promise2.prototype._followee = function() { + return this._rejectionHandler0; + }; + Promise2.prototype._setFollowee = function(promise) { + this._rejectionHandler0 = promise; + }; + Promise2.prototype._settlePromise = function(promise, handler, receiver, value) { + var isPromise = promise instanceof Promise2; + var bitField = this._bitField; + var asyncGuaranteed = (bitField & 134217728) !== 0; + if ((bitField & 65536) !== 0) { + if (isPromise) promise._invokeInternalOnCancel(); + if (receiver instanceof PassThroughHandlerContext && receiver.isFinallyHandler()) { + receiver.cancelPromise = promise; + if (tryCatch2(handler).call(receiver, value) === errorObj2) { + promise._reject(errorObj2.e); + } + } else if (handler === reflectHandler) { + promise._fulfill(reflectHandler.call(receiver)); + } else if (receiver instanceof Proxyable) { + receiver._promiseCancelled(promise); + } else if (isPromise || promise instanceof PromiseArray) { + promise._cancel(); + } else { + receiver.cancel(); + } + } else if (typeof handler === "function") { + if (!isPromise) { + handler.call(receiver, value, promise); + } else { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (receiver instanceof Proxyable) { + if (!receiver._isResolved()) { + if ((bitField & 33554432) !== 0) { + receiver._promiseFulfilled(value, promise); + } else { + receiver._promiseRejected(value, promise); + } + } + } else if (isPromise) { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + if ((bitField & 33554432) !== 0) { + promise._fulfill(value); + } else { + promise._reject(value); + } + } + }; + Promise2.prototype._settlePromiseLateCancellationObserver = function(ctx) { + var handler = ctx.handler; + var promise = ctx.promise; + var receiver = ctx.receiver; + var value = ctx.value; + if (typeof handler === "function") { + if (!(promise instanceof Promise2)) { + handler.call(receiver, value, promise); + } else { + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (promise instanceof Promise2) { + promise._reject(value); + } + }; + Promise2.prototype._settlePromiseCtx = function(ctx) { + this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value); + }; + Promise2.prototype._settlePromise0 = function(handler, value, bitField) { + var promise = this._promise0; + var receiver = this._receiverAt(0); + this._promise0 = void 0; + this._receiver0 = void 0; + this._settlePromise(promise, handler, receiver, value); + }; + Promise2.prototype._clearCallbackDataAtIndex = function(index) { + var base = index * 4 - 4; + this[base + 2] = this[base + 3] = this[base + 0] = this[base + 1] = void 0; + }; + Promise2.prototype._fulfill = function(value) { + var bitField = this._bitField; + if ((bitField & 117506048) >>> 16) return; + if (value === this) { + var err = makeSelfResolutionError(); + this._attachExtraTrace(err); + return this._reject(err); + } + this._setFulfilled(); + this._rejectionHandler0 = value; + if ((bitField & 65535) > 0) { + if ((bitField & 134217728) !== 0) { + this._settlePromises(); + } else { + async.settlePromises(this); + } + } + }; + Promise2.prototype._reject = function(reason) { + var bitField = this._bitField; + if ((bitField & 117506048) >>> 16) return; + this._setRejected(); + this._fulfillmentHandler0 = reason; + if (this._isFinal()) { + return async.fatalError(reason, util2.isNode); + } + if ((bitField & 65535) > 0) { + async.settlePromises(this); + } else { + this._ensurePossibleRejectionHandled(); + } + }; + Promise2.prototype._fulfillPromises = function(len, value) { + for (var i = 1; i < len; i++) { + var handler = this._fulfillmentHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, value); + } + }; + Promise2.prototype._rejectPromises = function(len, reason) { + for (var i = 1; i < len; i++) { + var handler = this._rejectionHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, reason); + } + }; + Promise2.prototype._settlePromises = function() { + var bitField = this._bitField; + var len = bitField & 65535; + if (len > 0) { + if ((bitField & 16842752) !== 0) { + var reason = this._fulfillmentHandler0; + this._settlePromise0(this._rejectionHandler0, reason, bitField); + this._rejectPromises(len, reason); + } else { + var value = this._rejectionHandler0; + this._settlePromise0(this._fulfillmentHandler0, value, bitField); + this._fulfillPromises(len, value); + } + this._setLength(0); + } + this._clearCancellationData(); + }; + Promise2.prototype._settledValue = function() { + var bitField = this._bitField; + if ((bitField & 33554432) !== 0) { + return this._rejectionHandler0; + } else if ((bitField & 16777216) !== 0) { + return this._fulfillmentHandler0; + } + }; + function deferResolve(v) { + this.promise._resolveCallback(v); + } + function deferReject(v) { + this.promise._rejectCallback(v, false); + } + Promise2.defer = Promise2.pending = function() { + debug.deprecated("Promise.defer", "new Promise"); + var promise = new Promise2(INTERNAL); + return { + promise, + resolve: deferResolve, + reject: deferReject + }; + }; + util2.notEnumerableProp( + Promise2, + "_makeSelfResolutionError", + makeSelfResolutionError + ); + require_method()( + Promise2, + INTERNAL, + tryConvertToPromise, + apiRejection, + debug + ); + require_bind()(Promise2, INTERNAL, tryConvertToPromise, debug); + require_cancel()(Promise2, PromiseArray, apiRejection, debug); + require_direct_resolve()(Promise2); + require_synchronous_inspection()(Promise2); + require_join()( + Promise2, + PromiseArray, + tryConvertToPromise, + INTERNAL, + async, + getDomain + ); + Promise2.Promise = Promise2; + Promise2.version = "3.4.7"; + require_map4()(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); + require_call_get()(Promise2); + require_using2()(Promise2, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug); + require_timers()(Promise2, INTERNAL, debug); + require_generators()(Promise2, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug); + require_nodeify()(Promise2); + require_promisify()(Promise2, INTERNAL); + require_props()(Promise2, PromiseArray, tryConvertToPromise, apiRejection); + require_race3()(Promise2, INTERNAL, tryConvertToPromise, apiRejection); + require_reduce2()(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); + require_settle()(Promise2, PromiseArray, debug); + require_some()(Promise2, PromiseArray, apiRejection); + require_filter3()(Promise2, INTERNAL); + require_each()(Promise2, INTERNAL); + require_any()(Promise2); + util2.toFastProperties(Promise2); + util2.toFastProperties(Promise2.prototype); + function fillTypes(value) { + var p = new Promise2(INTERNAL); + p._fulfillmentHandler0 = value; + p._rejectionHandler0 = value; + p._promise0 = value; + p._receiver0 = value; + } + fillTypes({ a: 1 }); + fillTypes({ b: 2 }); + fillTypes({ c: 3 }); + fillTypes(1); + fillTypes(function() { + }); + fillTypes(void 0); + fillTypes(false); + fillTypes(new Promise2(INTERNAL)); + debug.setBounds(Async.firstLineError, util2.lastLineError); + return Promise2; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/bluebird.js +var require_bluebird = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/bluebird.js"(exports2, module2) { + "use strict"; + var old; + if (typeof Promise !== "undefined") old = Promise; + function noConflict() { + try { + if (Promise === bluebird) Promise = old; + } catch (e) { + } + return bluebird; + } + var bluebird = require_promise()(); + bluebird.noConflict = noConflict; + module2.exports = bluebird; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Buffer.js +var require_Buffer = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Buffer.js"(exports2, module2) { + var Buffer2 = require("buffer").Buffer; + if (Buffer2.from === void 0) { + Buffer2.from = function(a, b, c) { + return new Buffer2(a, b, c); + }; + Buffer2.alloc = Buffer2.from; + } + module2.exports = Buffer2; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/PullStream.js +var require_PullStream = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/PullStream.js"(exports2, module2) { + var Stream = require("stream"); + var Promise2 = require_bluebird(); + var util2 = require("util"); + var Buffer2 = require_Buffer(); + var strFunction = "function"; + if (!Stream.Writable || !Stream.Writable.prototype.destroy) + Stream = require_readable2(); + function PullStream() { + if (!(this instanceof PullStream)) + return new PullStream(); + Stream.Duplex.call(this, { decodeStrings: false, objectMode: true }); + this.buffer = Buffer2.from(""); + var self2 = this; + self2.on("finish", function() { + self2.finished = true; + self2.emit("chunk", false); + }); + } + util2.inherits(PullStream, Stream.Duplex); + PullStream.prototype._write = function(chunk, e, cb) { + this.buffer = Buffer2.concat([this.buffer, chunk]); + this.cb = cb; + this.emit("chunk"); + }; + PullStream.prototype.stream = function(eof, includeEof) { + var p = Stream.PassThrough(); + var done, self2 = this; + function cb() { + if (typeof self2.cb === strFunction) { + var callback = self2.cb; + self2.cb = void 0; + return callback(); + } + } + function pull() { + var packet; + if (self2.buffer && self2.buffer.length) { + if (typeof eof === "number") { + packet = self2.buffer.slice(0, eof); + self2.buffer = self2.buffer.slice(eof); + eof -= packet.length; + done = !eof; + } else { + var match = self2.buffer.indexOf(eof); + if (match !== -1) { + self2.match = match; + if (includeEof) match = match + eof.length; + packet = self2.buffer.slice(0, match); + self2.buffer = self2.buffer.slice(match); + done = true; + } else { + var len = self2.buffer.length - eof.length; + if (len <= 0) { + cb(); + } else { + packet = self2.buffer.slice(0, len); + self2.buffer = self2.buffer.slice(len); + } + } + } + if (packet) p.write(packet, function() { + if (self2.buffer.length === 0 || eof.length && self2.buffer.length <= eof.length) cb(); + }); + } + if (!done) { + if (self2.finished) { + self2.removeListener("chunk", pull); + self2.emit("error", new Error("FILE_ENDED")); + return; + } + } else { + self2.removeListener("chunk", pull); + p.end(); + } + } + self2.on("chunk", pull); + pull(); + return p; + }; + PullStream.prototype.pull = function(eof, includeEof) { + if (eof === 0) return Promise2.resolve(""); + if (!isNaN(eof) && this.buffer.length > eof) { + var data = this.buffer.slice(0, eof); + this.buffer = this.buffer.slice(eof); + return Promise2.resolve(data); + } + var buffer = Buffer2.from(""), self2 = this; + var concatStream = Stream.Transform(); + concatStream._transform = function(d, e, cb) { + buffer = Buffer2.concat([buffer, d]); + cb(); + }; + var rejectHandler; + var pullStreamRejectHandler; + return new Promise2(function(resolve, reject) { + rejectHandler = reject; + pullStreamRejectHandler = function(e) { + self2.__emittedError = e; + reject(e); + }; + if (self2.finished) + return reject(new Error("FILE_ENDED")); + self2.once("error", pullStreamRejectHandler); + self2.stream(eof, includeEof).on("error", reject).pipe(concatStream).on("finish", function() { + resolve(buffer); + }).on("error", reject); + }).finally(function() { + self2.removeListener("error", rejectHandler); + self2.removeListener("error", pullStreamRejectHandler); + }); + }; + PullStream.prototype._read = function() { + }; + module2.exports = PullStream; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/NoopStream.js +var require_NoopStream = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/NoopStream.js"(exports2, module2) { + var Stream = require("stream"); + var util2 = require("util"); + if (!Stream.Writable || !Stream.Writable.prototype.destroy) + Stream = require_readable2(); + function NoopStream() { + if (!(this instanceof NoopStream)) { + return new NoopStream(); + } + Stream.Transform.call(this); + } + util2.inherits(NoopStream, Stream.Transform); + NoopStream.prototype._transform = function(d, e, cb) { + cb(); + }; + module2.exports = NoopStream; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/BufferStream.js +var require_BufferStream = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/BufferStream.js"(exports2, module2) { + var Promise2 = require_bluebird(); + var Stream = require("stream"); + var Buffer2 = require_Buffer(); + if (!Stream.Writable || !Stream.Writable.prototype.destroy) + Stream = require_readable2(); + module2.exports = function(entry) { + return new Promise2(function(resolve, reject) { + var chunks = []; + var bufferStream = Stream.Transform().on("finish", function() { + resolve(Buffer2.concat(chunks)); + }).on("error", reject); + bufferStream._transform = function(d, e, cb) { + chunks.push(d); + cb(); + }; + entry.on("error", reject).pipe(bufferStream); + }); + }; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parseExtraField.js +var require_parseExtraField = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parseExtraField.js"(exports2, module2) { + var binary = require_binary2(); + module2.exports = function(extraField, vars) { + var extra; + while (!extra && extraField && extraField.length) { + var candidateExtra = binary.parse(extraField).word16lu("signature").word16lu("partsize").word64lu("uncompressedSize").word64lu("compressedSize").word64lu("offset").word64lu("disknum").vars; + if (candidateExtra.signature === 1) { + extra = candidateExtra; + } else { + extraField = extraField.slice(candidateExtra.partsize + 4); + } + } + extra = extra || {}; + if (vars.compressedSize === 4294967295) + vars.compressedSize = extra.compressedSize; + if (vars.uncompressedSize === 4294967295) + vars.uncompressedSize = extra.uncompressedSize; + if (vars.offsetToLocalFileHeader === 4294967295) + vars.offsetToLocalFileHeader = extra.offset; + return extra; + }; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parseDateTime.js +var require_parseDateTime = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parseDateTime.js"(exports2, module2) { + module2.exports = function parseDateTime(date, time) { + const day = date & 31; + const month = date >> 5 & 15; + const year = (date >> 9 & 127) + 1980; + const seconds = time ? (time & 31) * 2 : 0; + const minutes = time ? time >> 5 & 63 : 0; + const hours = time ? time >> 11 : 0; + return new Date(Date.UTC(year, month - 1, day, hours, minutes, seconds)); + }; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parse.js +var require_parse5 = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parse.js"(exports2, module2) { + var util2 = require("util"); + var zlib = require("zlib"); + var Stream = require("stream"); + var binary = require_binary2(); + var Promise2 = require_bluebird(); + var PullStream = require_PullStream(); + var NoopStream = require_NoopStream(); + var BufferStream = require_BufferStream(); + var parseExtraField = require_parseExtraField(); + var Buffer2 = require_Buffer(); + var parseDateTime = require_parseDateTime(); + if (!Stream.Writable || !Stream.Writable.prototype.destroy) + Stream = require_readable2(); + var endDirectorySignature = Buffer2.alloc(4); + endDirectorySignature.writeUInt32LE(101010256, 0); + function Parse(opts) { + if (!(this instanceof Parse)) { + return new Parse(opts); + } + var self2 = this; + self2._opts = opts || { verbose: false }; + PullStream.call(self2, self2._opts); + self2.on("finish", function() { + self2.emit("end"); + self2.emit("close"); + }); + self2._readRecord().catch(function(e) { + if (!self2.__emittedError || self2.__emittedError !== e) + self2.emit("error", e); + }); + } + util2.inherits(Parse, PullStream); + Parse.prototype._readRecord = function() { + var self2 = this; + return self2.pull(4).then(function(data) { + if (data.length === 0) + return; + var signature = data.readUInt32LE(0); + if (signature === 875721283) { + return self2._readCrxHeader(); + } + if (signature === 67324752) { + return self2._readFile(); + } else if (signature === 33639248) { + self2.reachedCD = true; + return self2._readCentralDirectoryFileHeader(); + } else if (signature === 101010256) { + return self2._readEndOfCentralDirectoryRecord(); + } else if (self2.reachedCD) { + var includeEof = true; + return self2.pull(endDirectorySignature, includeEof).then(function() { + return self2._readEndOfCentralDirectoryRecord(); + }); + } else + self2.emit("error", new Error("invalid signature: 0x" + signature.toString(16))); + }); + }; + Parse.prototype._readCrxHeader = function() { + var self2 = this; + return self2.pull(12).then(function(data) { + self2.crxHeader = binary.parse(data).word32lu("version").word32lu("pubKeyLength").word32lu("signatureLength").vars; + return self2.pull(self2.crxHeader.pubKeyLength + self2.crxHeader.signatureLength); + }).then(function(data) { + self2.crxHeader.publicKey = data.slice(0, self2.crxHeader.pubKeyLength); + self2.crxHeader.signature = data.slice(self2.crxHeader.pubKeyLength); + self2.emit("crx-header", self2.crxHeader); + return self2._readRecord(); + }); + }; + Parse.prototype._readFile = function() { + var self2 = this; + return self2.pull(26).then(function(data) { + var vars = binary.parse(data).word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").vars; + vars.lastModifiedDateTime = parseDateTime(vars.lastModifiedDate, vars.lastModifiedTime); + if (self2.crxHeader) vars.crxHeader = self2.crxHeader; + return self2.pull(vars.fileNameLength).then(function(fileNameBuffer) { + var fileName = fileNameBuffer.toString("utf8"); + var entry = Stream.PassThrough(); + var __autodraining = false; + entry.autodrain = function() { + __autodraining = true; + var draining = entry.pipe(NoopStream()); + draining.promise = function() { + return new Promise2(function(resolve, reject) { + draining.on("finish", resolve); + draining.on("error", reject); + }); + }; + return draining; + }; + entry.buffer = function() { + return BufferStream(entry); + }; + entry.path = fileName; + entry.props = {}; + entry.props.path = fileName; + entry.props.pathBuffer = fileNameBuffer; + entry.props.flags = { + "isUnicode": (vars.flags & 2048) != 0 + }; + entry.type = vars.uncompressedSize === 0 && /[\/\\]$/.test(fileName) ? "Directory" : "File"; + if (self2._opts.verbose) { + if (entry.type === "Directory") { + console.log(" creating:", fileName); + } else if (entry.type === "File") { + if (vars.compressionMethod === 0) { + console.log(" extracting:", fileName); + } else { + console.log(" inflating:", fileName); + } + } + } + return self2.pull(vars.extraFieldLength).then(function(extraField) { + var extra = parseExtraField(extraField, vars); + entry.vars = vars; + entry.extra = extra; + if (self2._opts.forceStream) { + self2.push(entry); + } else { + self2.emit("entry", entry); + if (self2._readableState.pipesCount || self2._readableState.pipes && self2._readableState.pipes.length) + self2.push(entry); + } + if (self2._opts.verbose) + console.log({ + filename: fileName, + vars, + extra + }); + var fileSizeKnown = !(vars.flags & 8) || vars.compressedSize > 0, eof; + entry.__autodraining = __autodraining; + var inflater = vars.compressionMethod && !__autodraining ? zlib.createInflateRaw() : Stream.PassThrough(); + if (fileSizeKnown) { + entry.size = vars.uncompressedSize; + eof = vars.compressedSize; + } else { + eof = Buffer2.alloc(4); + eof.writeUInt32LE(134695760, 0); + } + return new Promise2(function(resolve, reject) { + self2.stream(eof).pipe(inflater).on("error", function(err) { + self2.emit("error", err); + }).pipe(entry).on("finish", function() { + return fileSizeKnown ? self2._readRecord().then(resolve).catch(reject) : self2._processDataDescriptor(entry).then(resolve).catch(reject); + }); + }); + }); + }); + }); + }; + Parse.prototype._processDataDescriptor = function(entry) { + var self2 = this; + return self2.pull(16).then(function(data) { + var vars = binary.parse(data).word32lu("dataDescriptorSignature").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").vars; + entry.size = vars.uncompressedSize; + return self2._readRecord(); + }); + }; + Parse.prototype._readCentralDirectoryFileHeader = function() { + var self2 = this; + return self2.pull(42).then(function(data) { + var vars = binary.parse(data).word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars; + return self2.pull(vars.fileNameLength).then(function(fileName) { + vars.fileName = fileName.toString("utf8"); + return self2.pull(vars.extraFieldLength); + }).then(function(extraField) { + return self2.pull(vars.fileCommentLength); + }).then(function(fileComment) { + return self2._readRecord(); + }); + }); + }; + Parse.prototype._readEndOfCentralDirectoryRecord = function() { + var self2 = this; + return self2.pull(18).then(function(data) { + var vars = binary.parse(data).word16lu("diskNumber").word16lu("diskStart").word16lu("numberOfRecordsOnDisk").word16lu("numberOfRecords").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars; + return self2.pull(vars.commentLength).then(function(comment) { + comment = comment.toString("utf8"); + self2.end(); + self2.push(null); + }); + }); + }; + Parse.prototype.promise = function() { + var self2 = this; + return new Promise2(function(resolve, reject) { + self2.on("finish", resolve); + self2.on("error", reject); + }); + }; + module2.exports = Parse; + } +}); + +// ../../node_modules/.pnpm/duplexer2@0.1.4/node_modules/duplexer2/index.js +var require_duplexer2 = __commonJS({ + "../../node_modules/.pnpm/duplexer2@0.1.4/node_modules/duplexer2/index.js"(exports2, module2) { + "use strict"; + var stream = require_readable2(); + function DuplexWrapper(options, writable, readable) { + if (typeof readable === "undefined") { + readable = writable; + writable = options; + options = null; + } + stream.Duplex.call(this, options); + if (typeof readable.read !== "function") { + readable = new stream.Readable(options).wrap(readable); + } + this._writable = writable; + this._readable = readable; + this._waiting = false; + var self2 = this; + writable.once("finish", function() { + self2.end(); + }); + this.once("finish", function() { + writable.end(); + }); + readable.on("readable", function() { + if (self2._waiting) { + self2._waiting = false; + self2._read(); + } + }); + readable.once("end", function() { + self2.push(null); + }); + if (!options || typeof options.bubbleErrors === "undefined" || options.bubbleErrors) { + writable.on("error", function(err) { + self2.emit("error", err); + }); + readable.on("error", function(err) { + self2.emit("error", err); + }); + } + } + DuplexWrapper.prototype = Object.create(stream.Duplex.prototype, { constructor: { value: DuplexWrapper } }); + DuplexWrapper.prototype._write = function _write(input, encoding, done) { + this._writable.write(input, encoding, done); + }; + DuplexWrapper.prototype._read = function _read() { + var buf; + var reads = 0; + while ((buf = this._readable.read()) !== null) { + this.push(buf); + reads++; + } + if (reads === 0) { + this._waiting = true; + } + }; + module2.exports = function duplex2(options, writable, readable) { + return new DuplexWrapper(options, writable, readable); + }; + module2.exports.DuplexWrapper = DuplexWrapper; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parseOne.js +var require_parseOne = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parseOne.js"(exports2, module2) { + var Stream = require("stream"); + var Parse = require_parse5(); + var duplexer2 = require_duplexer2(); + var BufferStream = require_BufferStream(); + if (!Stream.Writable || !Stream.Writable.prototype.destroy) + Stream = require_readable2(); + function parseOne(match, opts) { + var inStream = Stream.PassThrough({ objectMode: true }); + var outStream = Stream.PassThrough(); + var transform = Stream.Transform({ objectMode: true }); + var re = match instanceof RegExp ? match : match && new RegExp(match); + var found; + transform._transform = function(entry, e, cb) { + if (found || re && !re.exec(entry.path)) { + entry.autodrain(); + return cb(); + } else { + found = true; + out.emit("entry", entry); + entry.on("error", function(e2) { + outStream.emit("error", e2); + }); + entry.pipe(outStream).on("error", function(err) { + cb(err); + }).on("finish", function(d) { + cb(null, d); + }); + } + }; + inStream.pipe(Parse(opts)).on("error", function(err) { + outStream.emit("error", err); + }).pipe(transform).on("error", Object).on("finish", function() { + if (!found) + outStream.emit("error", new Error("PATTERN_NOT_FOUND")); + else + outStream.end(); + }); + var out = duplexer2(inStream, outStream); + out.buffer = function() { + return BufferStream(outStream); + }; + return out; + } + module2.exports = parseOne; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/abstract.js +var require_abstract = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/abstract.js"(exports2, module2) { + module2.exports = Abstract; + var Stream = require("stream").Stream; + var inherits2 = require_inherits(); + function Abstract() { + Stream.call(this); + } + inherits2(Abstract, Stream); + Abstract.prototype.on = function(ev, fn) { + if (ev === "ready" && this.ready) { + process.nextTick(fn.bind(this)); + } else { + Stream.prototype.on.call(this, ev, fn); + } + return this; + }; + Abstract.prototype.abort = function() { + this._aborted = true; + this.emit("abort"); + }; + Abstract.prototype.destroy = function() { + }; + Abstract.prototype.warn = function(msg, code) { + var self2 = this; + var er = decorate(msg, code, self2); + if (!self2.listeners("warn")) { + console.error( + "%s %s\npath = %s\nsyscall = %s\nfstream_type = %s\nfstream_path = %s\nfstream_unc_path = %s\nfstream_class = %s\nfstream_stack =\n%s\n", + code || "UNKNOWN", + er.stack, + er.path, + er.syscall, + er.fstream_type, + er.fstream_path, + er.fstream_unc_path, + er.fstream_class, + er.fstream_stack.join("\n") + ); + } else { + self2.emit("warn", er); + } + }; + Abstract.prototype.info = function(msg, code) { + this.emit("info", msg, code); + }; + Abstract.prototype.error = function(msg, code, th) { + var er = decorate(msg, code, this); + if (th) throw er; + else this.emit("error", er); + }; + function decorate(er, code, self2) { + if (!(er instanceof Error)) er = new Error(er); + er.code = er.code || code; + er.path = er.path || self2.path; + er.fstream_type = er.fstream_type || self2.type; + er.fstream_path = er.fstream_path || self2.path; + if (self2._path !== self2.path) { + er.fstream_unc_path = er.fstream_unc_path || self2._path; + } + if (self2.linkpath) { + er.fstream_linkpath = er.fstream_linkpath || self2.linkpath; + } + er.fstream_class = er.fstream_class || self2.constructor.name; + er.fstream_stack = er.fstream_stack || new Error().stack.split(/\n/).slice(3).map(function(s) { + return s.replace(/^ {4}at /, ""); + }); + return er; + } + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/get-type.js +var require_get_type = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/get-type.js"(exports2, module2) { + module2.exports = getType; + function getType(st) { + var types = [ + "Directory", + "File", + "SymbolicLink", + "Link", + // special for hardlinks from tarballs + "BlockDevice", + "CharacterDevice", + "FIFO", + "Socket" + ]; + var type; + if (st.type && types.indexOf(st.type) !== -1) { + st[st.type] = true; + return st.type; + } + for (var i = 0, l2 = types.length; i < l2; i++) { + type = types[i]; + var is = st[type] || st["is" + type]; + if (typeof is === "function") is = is.call(st); + if (is) { + st[type] = true; + st.type = type; + return type; + } + } + return null; + } + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/link-reader.js +var require_link_reader = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/link-reader.js"(exports2, module2) { + module2.exports = LinkReader; + var fs = require_graceful_fs(); + var inherits2 = require_inherits(); + var Reader = require_reader(); + inherits2(LinkReader, Reader); + function LinkReader(props) { + var self2 = this; + if (!(self2 instanceof LinkReader)) { + throw new Error("LinkReader must be called as constructor."); + } + if (!(props.type === "Link" && props.Link || props.type === "SymbolicLink" && props.SymbolicLink)) { + throw new Error("Non-link type " + props.type); + } + Reader.call(self2, props); + } + LinkReader.prototype._stat = function(currentStat) { + var self2 = this; + fs.readlink(self2._path, function(er, linkpath) { + if (er) return self2.error(er); + self2.linkpath = self2.props.linkpath = linkpath; + self2.emit("linkpath", linkpath); + Reader.prototype._stat.call(self2, currentStat); + }); + }; + LinkReader.prototype._read = function() { + var self2 = this; + if (self2._paused) return; + if (!self2._ended) { + self2.emit("end"); + self2.emit("close"); + self2._ended = true; + } + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/dir-reader.js +var require_dir_reader = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/dir-reader.js"(exports2, module2) { + module2.exports = DirReader; + var fs = require_graceful_fs(); + var inherits2 = require_inherits(); + var path = require("path"); + var Reader = require_reader(); + var assert = require("assert").ok; + inherits2(DirReader, Reader); + function DirReader(props) { + var self2 = this; + if (!(self2 instanceof DirReader)) { + throw new Error("DirReader must be called as constructor."); + } + if (props.type !== "Directory" || !props.Directory) { + throw new Error("Non-directory type " + props.type); + } + self2.entries = null; + self2._index = -1; + self2._paused = false; + self2._length = -1; + if (props.sort) { + this.sort = props.sort; + } + Reader.call(this, props); + } + DirReader.prototype._getEntries = function() { + var self2 = this; + if (self2._gotEntries) return; + self2._gotEntries = true; + fs.readdir(self2._path, function(er, entries) { + if (er) return self2.error(er); + self2.entries = entries; + self2.emit("entries", entries); + if (self2._paused) self2.once("resume", processEntries); + else processEntries(); + function processEntries() { + self2._length = self2.entries.length; + if (typeof self2.sort === "function") { + self2.entries = self2.entries.sort(self2.sort.bind(self2)); + } + self2._read(); + } + }); + }; + DirReader.prototype._read = function() { + var self2 = this; + if (!self2.entries) return self2._getEntries(); + if (self2._paused || self2._currentEntry || self2._aborted) { + return; + } + self2._index++; + if (self2._index >= self2.entries.length) { + if (!self2._ended) { + self2._ended = true; + self2.emit("end"); + self2.emit("close"); + } + return; + } + var p = path.resolve(self2._path, self2.entries[self2._index]); + assert(p !== self2._path); + assert(self2.entries[self2._index]); + self2._currentEntry = p; + fs[self2.props.follow ? "stat" : "lstat"](p, function(er, stat) { + if (er) return self2.error(er); + var who = self2._proxy || self2; + stat.path = p; + stat.basename = path.basename(p); + stat.dirname = path.dirname(p); + var childProps = self2.getChildProps.call(who, stat); + childProps.path = p; + childProps.basename = path.basename(p); + childProps.dirname = path.dirname(p); + var entry = Reader(childProps, stat); + self2._currentEntry = entry; + entry.on("pause", function(who2) { + if (!self2._paused && !entry._disowned) { + self2.pause(who2); + } + }); + entry.on("resume", function(who2) { + if (self2._paused && !entry._disowned) { + self2.resume(who2); + } + }); + entry.on("stat", function(props) { + self2.emit("_entryStat", entry, props); + if (entry._aborted) return; + if (entry._paused) { + entry.once("resume", function() { + self2.emit("entryStat", entry, props); + }); + } else self2.emit("entryStat", entry, props); + }); + entry.on("ready", function EMITCHILD() { + if (self2._paused) { + entry.pause(self2); + return self2.once("resume", EMITCHILD); + } + if (entry.type === "Socket") { + self2.emit("socket", entry); + } else { + self2.emitEntry(entry); + } + }); + var ended = false; + entry.on("close", onend); + entry.on("disown", onend); + function onend() { + if (ended) return; + ended = true; + self2.emit("childEnd", entry); + self2.emit("entryEnd", entry); + self2._currentEntry = null; + if (!self2._paused) { + self2._read(); + } + } + entry.on("error", function(er2) { + if (entry._swallowErrors) { + self2.warn(er2); + entry.emit("end"); + entry.emit("close"); + } else { + self2.emit("error", er2); + } + }); + [ + "child", + "childEnd", + "warn" + ].forEach(function(ev) { + entry.on(ev, self2.emit.bind(self2, ev)); + }); + }); + }; + DirReader.prototype.disown = function(entry) { + entry.emit("beforeDisown"); + entry._disowned = true; + entry.parent = entry.root = null; + if (entry === this._currentEntry) { + this._currentEntry = null; + } + entry.emit("disown"); + }; + DirReader.prototype.getChildProps = function() { + return { + depth: this.depth + 1, + root: this.root || this, + parent: this, + follow: this.follow, + filter: this.filter, + sort: this.props.sort, + hardlinks: this.props.hardlinks + }; + }; + DirReader.prototype.pause = function(who) { + var self2 = this; + if (self2._paused) return; + who = who || self2; + self2._paused = true; + if (self2._currentEntry && self2._currentEntry.pause) { + self2._currentEntry.pause(who); + } + self2.emit("pause", who); + }; + DirReader.prototype.resume = function(who) { + var self2 = this; + if (!self2._paused) return; + who = who || self2; + self2._paused = false; + self2.emit("resume", who); + if (self2._paused) { + return; + } + if (self2._currentEntry) { + if (self2._currentEntry.resume) self2._currentEntry.resume(who); + } else self2._read(); + }; + DirReader.prototype.emitEntry = function(entry) { + this.emit("entry", entry); + this.emit("child", entry); + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/file-reader.js +var require_file_reader = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/file-reader.js"(exports2, module2) { + module2.exports = FileReader2; + var fs = require_graceful_fs(); + var inherits2 = require_inherits(); + var Reader = require_reader(); + var EOF = { EOF: true }; + var CLOSE = { CLOSE: true }; + inherits2(FileReader2, Reader); + function FileReader2(props) { + var self2 = this; + if (!(self2 instanceof FileReader2)) { + throw new Error("FileReader must be called as constructor."); + } + if (!(props.type === "Link" && props.Link || props.type === "File" && props.File)) { + throw new Error("Non-file type " + props.type); + } + self2._buffer = []; + self2._bytesEmitted = 0; + Reader.call(self2, props); + } + FileReader2.prototype._getStream = function() { + var self2 = this; + var stream = self2._stream = fs.createReadStream(self2._path, self2.props); + if (self2.props.blksize) { + stream.bufferSize = self2.props.blksize; + } + stream.on("open", self2.emit.bind(self2, "open")); + stream.on("data", function(c) { + self2._bytesEmitted += c.length; + if (!c.length) { + return; + } else if (self2._paused || self2._buffer.length) { + self2._buffer.push(c); + self2._read(); + } else self2.emit("data", c); + }); + stream.on("end", function() { + if (self2._paused || self2._buffer.length) { + self2._buffer.push(EOF); + self2._read(); + } else { + self2.emit("end"); + } + if (self2._bytesEmitted !== self2.props.size) { + self2.error("Didn't get expected byte count\nexpect: " + self2.props.size + "\nactual: " + self2._bytesEmitted); + } + }); + stream.on("close", function() { + if (self2._paused || self2._buffer.length) { + self2._buffer.push(CLOSE); + self2._read(); + } else { + self2.emit("close"); + } + }); + stream.on("error", function(e) { + self2.emit("error", e); + }); + self2._read(); + }; + FileReader2.prototype._read = function() { + var self2 = this; + if (self2._paused) { + return; + } + if (!self2._stream) { + return self2._getStream(); + } + if (self2._buffer.length) { + var buf = self2._buffer; + for (var i = 0, l2 = buf.length; i < l2; i++) { + var c = buf[i]; + if (c === EOF) { + self2.emit("end"); + } else if (c === CLOSE) { + self2.emit("close"); + } else { + self2.emit("data", c); + } + if (self2._paused) { + self2._buffer = buf.slice(i); + return; + } + } + self2._buffer.length = 0; + } + }; + FileReader2.prototype.pause = function(who) { + var self2 = this; + if (self2._paused) return; + who = who || self2; + self2._paused = true; + if (self2._stream) self2._stream.pause(); + self2.emit("pause", who); + }; + FileReader2.prototype.resume = function(who) { + var self2 = this; + if (!self2._paused) return; + who = who || self2; + self2.emit("resume", who); + self2._paused = false; + if (self2._stream) self2._stream.resume(); + self2._read(); + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/socket-reader.js +var require_socket_reader = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/socket-reader.js"(exports2, module2) { + module2.exports = SocketReader; + var inherits2 = require_inherits(); + var Reader = require_reader(); + inherits2(SocketReader, Reader); + function SocketReader(props) { + var self2 = this; + if (!(self2 instanceof SocketReader)) { + throw new Error("SocketReader must be called as constructor."); + } + if (!(props.type === "Socket" && props.Socket)) { + throw new Error("Non-socket type " + props.type); + } + Reader.call(self2, props); + } + SocketReader.prototype._read = function() { + var self2 = this; + if (self2._paused) return; + if (!self2._ended) { + self2.emit("end"); + self2.emit("close"); + self2._ended = true; + } + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/proxy-reader.js +var require_proxy_reader = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/proxy-reader.js"(exports2, module2) { + module2.exports = ProxyReader; + var Reader = require_reader(); + var getType = require_get_type(); + var inherits2 = require_inherits(); + var fs = require_graceful_fs(); + inherits2(ProxyReader, Reader); + function ProxyReader(props) { + var self2 = this; + if (!(self2 instanceof ProxyReader)) { + throw new Error("ProxyReader must be called as constructor."); + } + self2.props = props; + self2._buffer = []; + self2.ready = false; + Reader.call(self2, props); + } + ProxyReader.prototype._stat = function() { + var self2 = this; + var props = self2.props; + var stat = props.follow ? "stat" : "lstat"; + fs[stat](props.path, function(er, current) { + var type; + if (er || !current) { + type = "File"; + } else { + type = getType(current); + } + props[type] = true; + props.type = self2.type = type; + self2._old = current; + self2._addProxy(Reader(props, current)); + }); + }; + ProxyReader.prototype._addProxy = function(proxy) { + var self2 = this; + if (self2._proxyTarget) { + return self2.error("proxy already set"); + } + self2._proxyTarget = proxy; + proxy._proxy = self2; + [ + "error", + "data", + "end", + "close", + "linkpath", + "entry", + "entryEnd", + "child", + "childEnd", + "warn", + "stat" + ].forEach(function(ev) { + proxy.on(ev, self2.emit.bind(self2, ev)); + }); + self2.emit("proxy", proxy); + proxy.on("ready", function() { + self2.ready = true; + self2.emit("ready"); + }); + var calls = self2._buffer; + self2._buffer.length = 0; + calls.forEach(function(c) { + proxy[c[0]].apply(proxy, c[1]); + }); + }; + ProxyReader.prototype.pause = function() { + return this._proxyTarget ? this._proxyTarget.pause() : false; + }; + ProxyReader.prototype.resume = function() { + return this._proxyTarget ? this._proxyTarget.resume() : false; + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/reader.js +var require_reader = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/reader.js"(exports2, module2) { + module2.exports = Reader; + var fs = require_graceful_fs(); + var Stream = require("stream").Stream; + var inherits2 = require_inherits(); + var path = require("path"); + var getType = require_get_type(); + var hardLinks = Reader.hardLinks = {}; + var Abstract = require_abstract(); + inherits2(Reader, Abstract); + var LinkReader = require_link_reader(); + function Reader(props, currentStat) { + var self2 = this; + if (!(self2 instanceof Reader)) return new Reader(props, currentStat); + if (typeof props === "string") { + props = { path: props }; + } + var type; + var ClassType; + if (props.type && typeof props.type === "function") { + type = props.type; + ClassType = type; + } else { + type = getType(props); + ClassType = Reader; + } + if (currentStat && !type) { + type = getType(currentStat); + props[type] = true; + props.type = type; + } + switch (type) { + case "Directory": + ClassType = require_dir_reader(); + break; + case "Link": + // XXX hard links are just files. + // However, it would be good to keep track of files' dev+inode + // and nlink values, and create a HardLinkReader that emits + // a linkpath value of the original copy, so that the tar + // writer can preserve them. + // ClassType = HardLinkReader + // break + case "File": + ClassType = require_file_reader(); + break; + case "SymbolicLink": + ClassType = LinkReader; + break; + case "Socket": + ClassType = require_socket_reader(); + break; + case null: + ClassType = require_proxy_reader(); + break; + } + if (!(self2 instanceof ClassType)) { + return new ClassType(props); + } + Abstract.call(self2); + if (!props.path) { + self2.error("Must provide a path", null, true); + } + self2.readable = true; + self2.writable = false; + self2.type = type; + self2.props = props; + self2.depth = props.depth = props.depth || 0; + self2.parent = props.parent || null; + self2.root = props.root || props.parent && props.parent.root || self2; + self2._path = self2.path = path.resolve(props.path); + if (process.platform === "win32") { + self2.path = self2._path = self2.path.replace(/\?/g, "_"); + if (self2._path.length >= 260) { + self2._swallowErrors = true; + self2._path = "\\\\?\\" + self2.path.replace(/\//g, "\\"); + } + } + self2.basename = props.basename = path.basename(self2.path); + self2.dirname = props.dirname = path.dirname(self2.path); + props.parent = props.root = null; + self2.size = props.size; + self2.filter = typeof props.filter === "function" ? props.filter : null; + if (props.sort === "alpha") props.sort = alphasort; + self2._stat(currentStat); + } + function alphasort(a, b) { + return a === b ? 0 : a.toLowerCase() > b.toLowerCase() ? 1 : a.toLowerCase() < b.toLowerCase() ? -1 : a > b ? 1 : -1; + } + Reader.prototype._stat = function(currentStat) { + var self2 = this; + var props = self2.props; + var stat = props.follow ? "stat" : "lstat"; + if (currentStat) process.nextTick(statCb.bind(null, null, currentStat)); + else fs[stat](self2._path, statCb); + function statCb(er, props_) { + if (er) return self2.error(er); + Object.keys(props_).forEach(function(k2) { + props[k2] = props_[k2]; + }); + if (void 0 !== self2.size && props.size !== self2.size) { + return self2.error("incorrect size"); + } + self2.size = props.size; + var type = getType(props); + var handleHardlinks = props.hardlinks !== false; + if (handleHardlinks && type !== "Directory" && props.nlink && props.nlink > 1) { + var k = props.dev + ":" + props.ino; + if (hardLinks[k] === self2._path || !hardLinks[k]) { + hardLinks[k] = self2._path; + } else { + type = self2.type = self2.props.type = "Link"; + self2.Link = self2.props.Link = true; + self2.linkpath = self2.props.linkpath = hardLinks[k]; + self2._stat = self2._read = LinkReader.prototype._read; + } + } + if (self2.type && self2.type !== type) { + self2.error("Unexpected type: " + type); + } + if (self2.filter) { + var who = self2._proxy || self2; + if (!self2.filter.call(who, who, props)) { + if (!self2._disowned) { + self2.abort(); + self2.emit("end"); + self2.emit("close"); + } + return; + } + } + var events = ["_stat", "stat", "ready"]; + var e = 0; + (function go() { + if (self2._aborted) { + self2.emit("end"); + self2.emit("close"); + return; + } + if (self2._paused && self2.type !== "Directory") { + self2.once("resume", go); + return; + } + var ev = events[e++]; + if (!ev) { + return self2._read(); + } + self2.emit(ev, props); + go(); + })(); + } + }; + Reader.prototype.pipe = function(dest) { + var self2 = this; + if (typeof dest.add === "function") { + self2.on("entry", function(entry) { + var ret2 = dest.add(entry); + if (ret2 === false) { + self2.pause(); + } + }); + } + return Stream.prototype.pipe.apply(this, arguments); + }; + Reader.prototype.pause = function(who) { + this._paused = true; + who = who || this; + this.emit("pause", who); + if (this._stream) this._stream.pause(who); + }; + Reader.prototype.resume = function(who) { + this._paused = false; + who = who || this; + this.emit("resume", who); + if (this._stream) this._stream.resume(who); + this._read(); + }; + Reader.prototype._read = function() { + this.error("Cannot read unknown type: " + this.type); + }; + } +}); + +// ../../node_modules/.pnpm/rimraf@2.7.1/node_modules/rimraf/rimraf.js +var require_rimraf = __commonJS({ + "../../node_modules/.pnpm/rimraf@2.7.1/node_modules/rimraf/rimraf.js"(exports2, module2) { + module2.exports = rimraf; + rimraf.sync = rimrafSync; + var assert = require("assert"); + var path = require("path"); + var fs = require("fs"); + var glob = void 0; + try { + glob = require_glob(); + } catch (_err) { + } + var _0666 = parseInt("666", 8); + var defaultGlobOpts = { + nosort: true, + silent: true + }; + var timeout = 0; + var isWindows = process.platform === "win32"; + function defaults(options) { + var methods = [ + "unlink", + "chmod", + "stat", + "lstat", + "rmdir", + "readdir" + ]; + methods.forEach(function(m) { + options[m] = options[m] || fs[m]; + m = m + "Sync"; + options[m] = options[m] || fs[m]; + }); + options.maxBusyTries = options.maxBusyTries || 3; + options.emfileWait = options.emfileWait || 1e3; + if (options.glob === false) { + options.disableGlob = true; + } + if (options.disableGlob !== true && glob === void 0) { + throw Error("glob dependency not found, set `options.disableGlob = true` if intentional"); + } + options.disableGlob = options.disableGlob || false; + options.glob = options.glob || defaultGlobOpts; + } + function rimraf(p, options, cb) { + if (typeof options === "function") { + cb = options; + options = {}; + } + assert(p, "rimraf: missing path"); + assert.equal(typeof p, "string", "rimraf: path should be a string"); + assert.equal(typeof cb, "function", "rimraf: callback function required"); + assert(options, "rimraf: invalid options argument provided"); + assert.equal(typeof options, "object", "rimraf: options should be object"); + defaults(options); + var busyTries = 0; + var errState = null; + var n = 0; + if (options.disableGlob || !glob.hasMagic(p)) + return afterGlob(null, [p]); + options.lstat(p, function(er, stat) { + if (!er) + return afterGlob(null, [p]); + glob(p, options.glob, afterGlob); + }); + function next(er) { + errState = errState || er; + if (--n === 0) + cb(errState); + } + function afterGlob(er, results) { + if (er) + return cb(er); + n = results.length; + if (n === 0) + return cb(); + results.forEach(function(p2) { + rimraf_(p2, options, function CB(er2) { + if (er2) { + if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { + busyTries++; + var time = busyTries * 100; + return setTimeout(function() { + rimraf_(p2, options, CB); + }, time); + } + if (er2.code === "EMFILE" && timeout < options.emfileWait) { + return setTimeout(function() { + rimraf_(p2, options, CB); + }, timeout++); + } + if (er2.code === "ENOENT") er2 = null; + } + timeout = 0; + next(er2); + }); + }); + } + } + function rimraf_(p, options, cb) { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.lstat(p, function(er, st) { + if (er && er.code === "ENOENT") + return cb(null); + if (er && er.code === "EPERM" && isWindows) + fixWinEPERM(p, options, er, cb); + if (st && st.isDirectory()) + return rmdir(p, options, er, cb); + options.unlink(p, function(er2) { + if (er2) { + if (er2.code === "ENOENT") + return cb(null); + if (er2.code === "EPERM") + return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); + if (er2.code === "EISDIR") + return rmdir(p, options, er2, cb); + } + return cb(er2); + }); + }); + } + function fixWinEPERM(p, options, er, cb) { + assert(p); + assert(options); + assert(typeof cb === "function"); + if (er) + assert(er instanceof Error); + options.chmod(p, _0666, function(er2) { + if (er2) + cb(er2.code === "ENOENT" ? null : er); + else + options.stat(p, function(er3, stats) { + if (er3) + cb(er3.code === "ENOENT" ? null : er); + else if (stats.isDirectory()) + rmdir(p, options, er, cb); + else + options.unlink(p, cb); + }); + }); + } + function fixWinEPERMSync(p, options, er) { + assert(p); + assert(options); + if (er) + assert(er instanceof Error); + try { + options.chmodSync(p, _0666); + } catch (er2) { + if (er2.code === "ENOENT") + return; + else + throw er; + } + try { + var stats = options.statSync(p); + } catch (er3) { + if (er3.code === "ENOENT") + return; + else + throw er; + } + if (stats.isDirectory()) + rmdirSync(p, options, er); + else + options.unlinkSync(p); + } + function rmdir(p, options, originalEr, cb) { + assert(p); + assert(options); + if (originalEr) + assert(originalEr instanceof Error); + assert(typeof cb === "function"); + options.rmdir(p, function(er) { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) + rmkids(p, options, cb); + else if (er && er.code === "ENOTDIR") + cb(originalEr); + else + cb(er); + }); + } + function rmkids(p, options, cb) { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.readdir(p, function(er, files) { + if (er) + return cb(er); + var n = files.length; + if (n === 0) + return options.rmdir(p, cb); + var errState; + files.forEach(function(f) { + rimraf(path.join(p, f), options, function(er2) { + if (errState) + return; + if (er2) + return cb(errState = er2); + if (--n === 0) + options.rmdir(p, cb); + }); + }); + }); + } + function rimrafSync(p, options) { + options = options || {}; + defaults(options); + assert(p, "rimraf: missing path"); + assert.equal(typeof p, "string", "rimraf: path should be a string"); + assert(options, "rimraf: missing options"); + assert.equal(typeof options, "object", "rimraf: options should be object"); + var results; + if (options.disableGlob || !glob.hasMagic(p)) { + results = [p]; + } else { + try { + options.lstatSync(p); + results = [p]; + } catch (er) { + results = glob.sync(p, options.glob); + } + } + if (!results.length) + return; + for (var i = 0; i < results.length; i++) { + var p = results[i]; + try { + var st = options.lstatSync(p); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "EPERM" && isWindows) + fixWinEPERMSync(p, options, er); + } + try { + if (st && st.isDirectory()) + rmdirSync(p, options, null); + else + options.unlinkSync(p); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "EPERM") + return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er); + if (er.code !== "EISDIR") + throw er; + rmdirSync(p, options, er); + } + } + } + function rmdirSync(p, options, originalEr) { + assert(p); + assert(options); + if (originalEr) + assert(originalEr instanceof Error); + try { + options.rmdirSync(p); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "ENOTDIR") + throw originalEr; + if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") + rmkidsSync(p, options); + } + } + function rmkidsSync(p, options) { + assert(p); + assert(options); + options.readdirSync(p).forEach(function(f) { + rimrafSync(path.join(p, f), options); + }); + var retries = isWindows ? 100 : 1; + var i = 0; + do { + var threw = true; + try { + var ret2 = options.rmdirSync(p, options); + threw = false; + return ret2; + } finally { + if (++i < retries && threw) + continue; + } + } while (true); + } + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/collect.js +var require_collect = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/collect.js"(exports2, module2) { + module2.exports = collect; + function collect(stream) { + if (stream._collected) return; + if (stream._paused) return stream.on("resume", collect.bind(null, stream)); + stream._collected = true; + stream.pause(); + stream.on("data", save); + stream.on("end", save); + var buf = []; + function save(b) { + if (typeof b === "string") b = new Buffer(b); + if (Buffer.isBuffer(b) && !b.length) return; + buf.push(b); + } + stream.on("entry", saveEntry); + var entryBuffer = []; + function saveEntry(e) { + collect(e); + entryBuffer.push(e); + } + stream.on("proxy", proxyPause); + function proxyPause(p) { + p.pause(); + } + stream.pipe = /* @__PURE__ */ (function(orig) { + return function(dest) { + var e = 0; + (function unblockEntry() { + var entry = entryBuffer[e++]; + if (!entry) return resume(); + entry.on("end", unblockEntry); + if (dest) dest.add(entry); + else stream.emit("entry", entry); + })(); + function resume() { + stream.removeListener("entry", saveEntry); + stream.removeListener("data", save); + stream.removeListener("end", save); + stream.pipe = orig; + if (dest) stream.pipe(dest); + buf.forEach(function(b) { + if (b) stream.emit("data", b); + else stream.emit("end"); + }); + stream.resume(); + } + return dest; + }; + })(stream.pipe); + } + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/dir-writer.js +var require_dir_writer = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/dir-writer.js"(exports2, module2) { + module2.exports = DirWriter; + var Writer = require_writer(); + var inherits2 = require_inherits(); + var mkdir = require_mkdirp(); + var path = require("path"); + var collect = require_collect(); + inherits2(DirWriter, Writer); + function DirWriter(props) { + var self2 = this; + if (!(self2 instanceof DirWriter)) { + self2.error("DirWriter must be called as constructor.", null, true); + } + if (props.type !== "Directory" || !props.Directory) { + self2.error("Non-directory type " + props.type + " " + JSON.stringify(props), null, true); + } + Writer.call(this, props); + } + DirWriter.prototype._create = function() { + var self2 = this; + mkdir(self2._path, Writer.dirmode, function(er) { + if (er) return self2.error(er); + self2.ready = true; + self2.emit("ready"); + self2._process(); + }); + }; + DirWriter.prototype.write = function() { + return true; + }; + DirWriter.prototype.end = function() { + this._ended = true; + this._process(); + }; + DirWriter.prototype.add = function(entry) { + var self2 = this; + collect(entry); + if (!self2.ready || self2._currentEntry) { + self2._buffer.push(entry); + return false; + } + if (self2._ended) { + return self2.error("add after end"); + } + self2._buffer.push(entry); + self2._process(); + return this._buffer.length === 0; + }; + DirWriter.prototype._process = function() { + var self2 = this; + if (self2._processing) return; + var entry = self2._buffer.shift(); + if (!entry) { + self2.emit("drain"); + if (self2._ended) self2._finish(); + return; + } + self2._processing = true; + self2.emit("entry", entry); + var p = entry; + var pp; + do { + pp = p._path || p.path; + if (pp === self2.root._path || pp === self2._path || pp && pp.indexOf(self2._path) === 0) { + self2._processing = false; + if (entry._collected) entry.pipe(); + return self2._process(); + } + p = p.parent; + } while (p); + var props = { + parent: self2, + root: self2.root || self2, + type: entry.type, + depth: self2.depth + 1 + }; + pp = entry._path || entry.path || entry.props.path; + if (entry.parent) { + pp = pp.substr(entry.parent._path.length + 1); + } + props.path = path.join(self2.path, path.join("/", pp)); + props.filter = self2.filter; + Object.keys(entry.props).forEach(function(k) { + if (!props.hasOwnProperty(k)) { + props[k] = entry.props[k]; + } + }); + var child = self2._currentChild = new Writer(props); + child.on("ready", function() { + entry.pipe(child); + entry.resume(); + }); + child.on("error", function(er) { + if (child._swallowErrors) { + self2.warn(er); + child.emit("end"); + child.emit("close"); + } else { + self2.emit("error", er); + } + }); + child.on("close", onend); + var ended = false; + function onend() { + if (ended) return; + ended = true; + self2._currentChild = null; + self2._processing = false; + self2._process(); + } + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/link-writer.js +var require_link_writer = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/link-writer.js"(exports2, module2) { + module2.exports = LinkWriter; + var fs = require_graceful_fs(); + var Writer = require_writer(); + var inherits2 = require_inherits(); + var path = require("path"); + var rimraf = require_rimraf(); + inherits2(LinkWriter, Writer); + function LinkWriter(props) { + var self2 = this; + if (!(self2 instanceof LinkWriter)) { + throw new Error("LinkWriter must be called as constructor."); + } + if (!(props.type === "Link" && props.Link || props.type === "SymbolicLink" && props.SymbolicLink)) { + throw new Error("Non-link type " + props.type); + } + if (props.linkpath === "") props.linkpath = "."; + if (!props.linkpath) { + self2.error("Need linkpath property to create " + props.type); + } + Writer.call(this, props); + } + LinkWriter.prototype._create = function() { + var self2 = this; + var hard = self2.type === "Link" || process.platform === "win32"; + var link = hard ? "link" : "symlink"; + var lp = hard ? path.resolve(self2.dirname, self2.linkpath) : self2.linkpath; + if (hard) return clobber(self2, lp, link); + fs.readlink(self2._path, function(er, p) { + if (p && p === lp) return finish(self2); + clobber(self2, lp, link); + }); + }; + function clobber(self2, lp, link) { + rimraf(self2._path, function(er) { + if (er) return self2.error(er); + create(self2, lp, link); + }); + } + function create(self2, lp, link) { + fs[link](lp, self2._path, function(er) { + if (er) { + if ((er.code === "ENOENT" || er.code === "EACCES" || er.code === "EPERM") && process.platform === "win32") { + self2.ready = true; + self2.emit("ready"); + self2.emit("end"); + self2.emit("close"); + self2.end = self2._finish = function() { + }; + } else return self2.error(er); + } + finish(self2); + }); + } + function finish(self2) { + self2.ready = true; + self2.emit("ready"); + if (self2._ended && !self2._finished) self2._finish(); + } + LinkWriter.prototype.end = function() { + this._ended = true; + if (this.ready) { + this._finished = true; + this._finish(); + } + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/file-writer.js +var require_file_writer = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/file-writer.js"(exports2, module2) { + module2.exports = FileWriter; + var fs = require_graceful_fs(); + var Writer = require_writer(); + var inherits2 = require_inherits(); + var EOF = {}; + inherits2(FileWriter, Writer); + function FileWriter(props) { + var self2 = this; + if (!(self2 instanceof FileWriter)) { + throw new Error("FileWriter must be called as constructor."); + } + if (props.type !== "File" || !props.File) { + throw new Error("Non-file type " + props.type); + } + self2._buffer = []; + self2._bytesWritten = 0; + Writer.call(this, props); + } + FileWriter.prototype._create = function() { + var self2 = this; + if (self2._stream) return; + var so = {}; + if (self2.props.flags) so.flags = self2.props.flags; + so.mode = Writer.filemode; + if (self2._old && self2._old.blksize) so.bufferSize = self2._old.blksize; + self2._stream = fs.createWriteStream(self2._path, so); + self2._stream.on("open", function() { + self2.ready = true; + self2._buffer.forEach(function(c) { + if (c === EOF) self2._stream.end(); + else self2._stream.write(c); + }); + self2.emit("ready"); + self2.emit("drain"); + }); + self2._stream.on("error", function(er) { + self2.emit("error", er); + }); + self2._stream.on("drain", function() { + self2.emit("drain"); + }); + self2._stream.on("close", function() { + self2._finish(); + }); + }; + FileWriter.prototype.write = function(c) { + var self2 = this; + self2._bytesWritten += c.length; + if (!self2.ready) { + if (!Buffer.isBuffer(c) && typeof c !== "string") { + throw new Error("invalid write data"); + } + self2._buffer.push(c); + return false; + } + var ret2 = self2._stream.write(c); + if (ret2 === false && self2._stream._queue) { + return self2._stream._queue.length <= 2; + } else { + return ret2; + } + }; + FileWriter.prototype.end = function(c) { + var self2 = this; + if (c) self2.write(c); + if (!self2.ready) { + self2._buffer.push(EOF); + return false; + } + return self2._stream.end(); + }; + FileWriter.prototype._finish = function() { + var self2 = this; + if (typeof self2.size === "number" && self2._bytesWritten !== self2.size) { + self2.error( + "Did not get expected byte count.\nexpect: " + self2.size + "\nactual: " + self2._bytesWritten + ); + } + Writer.prototype._finish.call(self2); + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/proxy-writer.js +var require_proxy_writer = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/proxy-writer.js"(exports2, module2) { + module2.exports = ProxyWriter; + var Writer = require_writer(); + var getType = require_get_type(); + var inherits2 = require_inherits(); + var collect = require_collect(); + var fs = require("fs"); + inherits2(ProxyWriter, Writer); + function ProxyWriter(props) { + var self2 = this; + if (!(self2 instanceof ProxyWriter)) { + throw new Error("ProxyWriter must be called as constructor."); + } + self2.props = props; + self2._needDrain = false; + Writer.call(self2, props); + } + ProxyWriter.prototype._stat = function() { + var self2 = this; + var props = self2.props; + var stat = props.follow ? "stat" : "lstat"; + fs[stat](props.path, function(er, current) { + var type; + if (er || !current) { + type = "File"; + } else { + type = getType(current); + } + props[type] = true; + props.type = self2.type = type; + self2._old = current; + self2._addProxy(Writer(props, current)); + }); + }; + ProxyWriter.prototype._addProxy = function(proxy) { + var self2 = this; + if (self2._proxy) { + return self2.error("proxy already set"); + } + self2._proxy = proxy; + [ + "ready", + "error", + "close", + "pipe", + "drain", + "warn" + ].forEach(function(ev) { + proxy.on(ev, self2.emit.bind(self2, ev)); + }); + self2.emit("proxy", proxy); + var calls = self2._buffer; + calls.forEach(function(c) { + proxy[c[0]].apply(proxy, c[1]); + }); + self2._buffer.length = 0; + if (self2._needsDrain) self2.emit("drain"); + }; + ProxyWriter.prototype.add = function(entry) { + collect(entry); + if (!this._proxy) { + this._buffer.push(["add", [entry]]); + this._needDrain = true; + return false; + } + return this._proxy.add(entry); + }; + ProxyWriter.prototype.write = function(c) { + if (!this._proxy) { + this._buffer.push(["write", [c]]); + this._needDrain = true; + return false; + } + return this._proxy.write(c); + }; + ProxyWriter.prototype.end = function(c) { + if (!this._proxy) { + this._buffer.push(["end", [c]]); + return false; + } + return this._proxy.end(c); + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/writer.js +var require_writer = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/writer.js"(exports2, module2) { + module2.exports = Writer; + var fs = require_graceful_fs(); + var inherits2 = require_inherits(); + var rimraf = require_rimraf(); + var mkdir = require_mkdirp(); + var path = require("path"); + var umask = process.platform === "win32" ? 0 : process.umask(); + var getType = require_get_type(); + var Abstract = require_abstract(); + inherits2(Writer, Abstract); + Writer.dirmode = parseInt("0777", 8) & ~umask; + Writer.filemode = parseInt("0666", 8) & ~umask; + var DirWriter = require_dir_writer(); + var LinkWriter = require_link_writer(); + var FileWriter = require_file_writer(); + var ProxyWriter = require_proxy_writer(); + function Writer(props, current) { + var self2 = this; + if (typeof props === "string") { + props = { path: props }; + } + var type = getType(props); + var ClassType = Writer; + switch (type) { + case "Directory": + ClassType = DirWriter; + break; + case "File": + ClassType = FileWriter; + break; + case "Link": + case "SymbolicLink": + ClassType = LinkWriter; + break; + case null: + default: + ClassType = ProxyWriter; + break; + } + if (!(self2 instanceof ClassType)) return new ClassType(props); + Abstract.call(self2); + if (!props.path) self2.error("Must provide a path", null, true); + self2.type = props.type; + self2.props = props; + self2.depth = props.depth || 0; + self2.clobber = props.clobber === false ? props.clobber : true; + self2.parent = props.parent || null; + self2.root = props.root || props.parent && props.parent.root || self2; + self2._path = self2.path = path.resolve(props.path); + if (process.platform === "win32") { + self2.path = self2._path = self2.path.replace(/\?/g, "_"); + if (self2._path.length >= 260) { + self2._swallowErrors = true; + self2._path = "\\\\?\\" + self2.path.replace(/\//g, "\\"); + } + } + self2.basename = path.basename(props.path); + self2.dirname = path.dirname(props.path); + self2.linkpath = props.linkpath || null; + props.parent = props.root = null; + self2.size = props.size; + if (typeof props.mode === "string") { + props.mode = parseInt(props.mode, 8); + } + self2.readable = false; + self2.writable = true; + self2._buffer = []; + self2.ready = false; + self2.filter = typeof props.filter === "function" ? props.filter : null; + self2._stat(current); + } + Writer.prototype._create = function() { + var self2 = this; + fs[self2.props.follow ? "stat" : "lstat"](self2._path, function(er) { + if (er) { + return self2.warn("Cannot create " + self2._path + "\nUnsupported type: " + self2.type, "ENOTSUP"); + } + self2._finish(); + }); + }; + Writer.prototype._stat = function(current) { + var self2 = this; + var props = self2.props; + var stat = props.follow ? "stat" : "lstat"; + var who = self2._proxy || self2; + if (current) statCb(null, current); + else fs[stat](self2._path, statCb); + function statCb(er, current2) { + if (self2.filter && !self2.filter.call(who, who, current2)) { + self2._aborted = true; + self2.emit("end"); + self2.emit("close"); + return; + } + if (er || !current2) { + return create(self2); + } + self2._old = current2; + var currentType = getType(current2); + if (currentType !== self2.type || self2.type === "File" && current2.nlink > 1) { + return rimraf(self2._path, function(er2) { + if (er2) return self2.error(er2); + self2._old = null; + create(self2); + }); + } + create(self2); + } + }; + function create(self2) { + mkdir(path.dirname(self2._path), Writer.dirmode, function(er, made) { + if (er) return self2.error(er); + self2._madeDir = made; + return self2._create(); + }); + } + function endChmod(self2, want, current, path2, cb) { + var wantMode = want.mode; + var chmod = want.follow || self2.type !== "SymbolicLink" ? "chmod" : "lchmod"; + if (!fs[chmod]) return cb(); + if (typeof wantMode !== "number") return cb(); + var curMode = current.mode & parseInt("0777", 8); + wantMode = wantMode & parseInt("0777", 8); + if (wantMode === curMode) return cb(); + fs[chmod](path2, wantMode, cb); + } + function endChown(self2, want, current, path2, cb) { + if (process.platform === "win32") return cb(); + if (!process.getuid || process.getuid() !== 0) return cb(); + if (typeof want.uid !== "number" && typeof want.gid !== "number") return cb(); + if (current.uid === want.uid && current.gid === want.gid) return cb(); + var chown = self2.props.follow || self2.type !== "SymbolicLink" ? "chown" : "lchown"; + if (!fs[chown]) return cb(); + if (typeof want.uid !== "number") want.uid = current.uid; + if (typeof want.gid !== "number") want.gid = current.gid; + fs[chown](path2, want.uid, want.gid, cb); + } + function endUtimes(self2, want, current, path2, cb) { + if (!fs.utimes || process.platform === "win32") return cb(); + var utimes = want.follow || self2.type !== "SymbolicLink" ? "utimes" : "lutimes"; + if (utimes === "lutimes" && !fs[utimes]) { + utimes = "utimes"; + } + if (!fs[utimes]) return cb(); + var curA = current.atime; + var curM = current.mtime; + var meA = want.atime; + var meM = want.mtime; + if (meA === void 0) meA = curA; + if (meM === void 0) meM = curM; + if (!isDate(meA)) meA = new Date(meA); + if (!isDate(meM)) meA = new Date(meM); + if (meA.getTime() === curA.getTime() && meM.getTime() === curM.getTime()) return cb(); + fs[utimes](path2, meA, meM, cb); + } + Writer.prototype._finish = function() { + var self2 = this; + if (self2._finishing) return; + self2._finishing = true; + var todo = 0; + var errState = null; + var done = false; + if (self2._old) { + self2._old.atime = /* @__PURE__ */ new Date(0); + self2._old.mtime = /* @__PURE__ */ new Date(0); + setProps(self2._old); + } else { + var stat = self2.props.follow ? "stat" : "lstat"; + fs[stat](self2._path, function(er, current) { + if (er) { + if (er.code === "ENOENT" && (self2.type === "Link" || self2.type === "SymbolicLink") && process.platform === "win32") { + self2.ready = true; + self2.emit("ready"); + self2.emit("end"); + self2.emit("close"); + self2.end = self2._finish = function() { + }; + return; + } else return self2.error(er); + } + setProps(self2._old = current); + }); + } + return; + function setProps(current) { + todo += 3; + endChmod(self2, self2.props, current, self2._path, next("chmod")); + endChown(self2, self2.props, current, self2._path, next("chown")); + endUtimes(self2, self2.props, current, self2._path, next("utimes")); + } + function next(what) { + return function(er) { + if (errState) return; + if (er) { + er.fstream_finish_call = what; + return self2.error(errState = er); + } + if (--todo > 0) return; + if (done) return; + done = true; + if (!self2._madeDir) return end(); + else endMadeDir(self2, self2._path, end); + function end(er2) { + if (er2) { + er2.fstream_finish_call = "setupMadeDir"; + return self2.error(er2); + } + self2.emit("end"); + self2.emit("close"); + } + }; + } + }; + function endMadeDir(self2, p, cb) { + var made = self2._madeDir; + var d = path.dirname(p); + endMadeDir_(self2, d, function(er) { + if (er) return cb(er); + if (d === made) { + return cb(); + } + endMadeDir(self2, d, cb); + }); + } + function endMadeDir_(self2, p, cb) { + var dirProps = {}; + Object.keys(self2.props).forEach(function(k) { + dirProps[k] = self2.props[k]; + if (k === "mode" && self2.type !== "Directory") { + dirProps[k] = dirProps[k] | parseInt("0111", 8); + } + }); + var todo = 3; + var errState = null; + fs.stat(p, function(er, current) { + if (er) return cb(errState = er); + endChmod(self2, dirProps, current, p, next); + endChown(self2, dirProps, current, p, next); + endUtimes(self2, dirProps, current, p, next); + }); + function next(er) { + if (errState) return; + if (er) return cb(errState = er); + if (--todo === 0) return cb(); + } + } + Writer.prototype.pipe = function() { + this.error("Can't pipe from writable stream"); + }; + Writer.prototype.add = function() { + this.error("Can't add to non-Directory type"); + }; + Writer.prototype.write = function() { + return true; + }; + function objectToString(d) { + return Object.prototype.toString.call(d); + } + function isDate(d) { + return typeof d === "object" && objectToString(d) === "[object Date]"; + } + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/fstream.js +var require_fstream = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/fstream.js"(exports2) { + exports2.Abstract = require_abstract(); + exports2.Reader = require_reader(); + exports2.Writer = require_writer(); + exports2.File = { + Reader: require_file_reader(), + Writer: require_file_writer() + }; + exports2.Dir = { + Reader: require_dir_reader(), + Writer: require_dir_writer() + }; + exports2.Link = { + Reader: require_link_reader(), + Writer: require_link_writer() + }; + exports2.Proxy = { + Reader: require_proxy_reader(), + Writer: require_proxy_writer() + }; + exports2.Reader.Dir = exports2.DirReader = exports2.Dir.Reader; + exports2.Reader.File = exports2.FileReader = exports2.File.Reader; + exports2.Reader.Link = exports2.LinkReader = exports2.Link.Reader; + exports2.Reader.Proxy = exports2.ProxyReader = exports2.Proxy.Reader; + exports2.Writer.Dir = exports2.DirWriter = exports2.Dir.Writer; + exports2.Writer.File = exports2.FileWriter = exports2.File.Writer; + exports2.Writer.Link = exports2.LinkWriter = exports2.Link.Writer; + exports2.Writer.Proxy = exports2.ProxyWriter = exports2.Proxy.Writer; + exports2.collect = require_collect(); + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/extract.js +var require_extract2 = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/extract.js"(exports2, module2) { + module2.exports = Extract; + var Parse = require_parse5(); + var Writer = require_fstream().Writer; + var path = require("path"); + var stream = require("stream"); + var duplexer2 = require_duplexer2(); + var Promise2 = require_bluebird(); + function Extract(opts) { + opts.path = path.resolve(path.normalize(opts.path)); + var parser = new Parse(opts); + var outStream = new stream.Writable({ objectMode: true }); + outStream._write = function(entry, encoding, cb) { + if (entry.type == "Directory") return cb(); + var extractPath = path.join(opts.path, entry.path); + if (extractPath.indexOf(opts.path) != 0) { + return cb(); + } + const writer = opts.getWriter ? opts.getWriter({ path: extractPath }) : Writer({ path: extractPath }); + entry.pipe(writer).on("error", cb).on("close", cb); + }; + var extract = duplexer2(parser, outStream); + parser.once("crx-header", function(crxHeader) { + extract.crxHeader = crxHeader; + }); + parser.pipe(outStream).on("finish", function() { + extract.emit("close"); + }); + extract.promise = function() { + return new Promise2(function(resolve, reject) { + extract.on("close", resolve); + extract.on("error", reject); + }); + }; + return extract; + } + } +}); + +// ../../node_modules/.pnpm/big-integer@1.6.52/node_modules/big-integer/BigInteger.js +var require_BigInteger = __commonJS({ + "../../node_modules/.pnpm/big-integer@1.6.52/node_modules/big-integer/BigInteger.js"(exports2, module2) { + var bigInt = (function(undefined2) { + "use strict"; + var BASE = 1e7, LOG_BASE = 7, MAX_INT = 9007199254740992, MAX_INT_ARR = smallToArray(MAX_INT), DEFAULT_ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz"; + var supportsNativeBigInt = typeof BigInt === "function"; + function Integer(v, radix, alphabet, caseSensitive) { + if (typeof v === "undefined") return Integer[0]; + if (typeof radix !== "undefined") return +radix === 10 && !alphabet ? parseValue(v) : parseBase(v, radix, alphabet, caseSensitive); + return parseValue(v); + } + function BigInteger(value, sign) { + this.value = value; + this.sign = sign; + this.isSmall = false; + } + BigInteger.prototype = Object.create(Integer.prototype); + function SmallInteger(value) { + this.value = value; + this.sign = value < 0; + this.isSmall = true; + } + SmallInteger.prototype = Object.create(Integer.prototype); + function NativeBigInt(value) { + this.value = value; + } + NativeBigInt.prototype = Object.create(Integer.prototype); + function isPrecise(n) { + return -MAX_INT < n && n < MAX_INT; + } + function smallToArray(n) { + if (n < 1e7) + return [n]; + if (n < 1e14) + return [n % 1e7, Math.floor(n / 1e7)]; + return [n % 1e7, Math.floor(n / 1e7) % 1e7, Math.floor(n / 1e14)]; + } + function arrayToSmall(arr) { + trim(arr); + var length = arr.length; + if (length < 4 && compareAbs(arr, MAX_INT_ARR) < 0) { + switch (length) { + case 0: + return 0; + case 1: + return arr[0]; + case 2: + return arr[0] + arr[1] * BASE; + default: + return arr[0] + (arr[1] + arr[2] * BASE) * BASE; + } + } + return arr; + } + function trim(v) { + var i2 = v.length; + while (v[--i2] === 0) ; + v.length = i2 + 1; + } + function createArray(length) { + var x = new Array(length); + var i2 = -1; + while (++i2 < length) { + x[i2] = 0; + } + return x; + } + function truncate(n) { + if (n > 0) return Math.floor(n); + return Math.ceil(n); + } + function add(a, b) { + var l_a = a.length, l_b = b.length, r = new Array(l_a), carry = 0, base = BASE, sum, i2; + for (i2 = 0; i2 < l_b; i2++) { + sum = a[i2] + b[i2] + carry; + carry = sum >= base ? 1 : 0; + r[i2] = sum - carry * base; + } + while (i2 < l_a) { + sum = a[i2] + carry; + carry = sum === base ? 1 : 0; + r[i2++] = sum - carry * base; + } + if (carry > 0) r.push(carry); + return r; + } + function addAny(a, b) { + if (a.length >= b.length) return add(a, b); + return add(b, a); + } + function addSmall(a, carry) { + var l2 = a.length, r = new Array(l2), base = BASE, sum, i2; + for (i2 = 0; i2 < l2; i2++) { + sum = a[i2] - base + carry; + carry = Math.floor(sum / base); + r[i2] = sum - carry * base; + carry += 1; + } + while (carry > 0) { + r[i2++] = carry % base; + carry = Math.floor(carry / base); + } + return r; + } + BigInteger.prototype.add = function(v) { + var n = parseValue(v); + if (this.sign !== n.sign) { + return this.subtract(n.negate()); + } + var a = this.value, b = n.value; + if (n.isSmall) { + return new BigInteger(addSmall(a, Math.abs(b)), this.sign); + } + return new BigInteger(addAny(a, b), this.sign); + }; + BigInteger.prototype.plus = BigInteger.prototype.add; + SmallInteger.prototype.add = function(v) { + var n = parseValue(v); + var a = this.value; + if (a < 0 !== n.sign) { + return this.subtract(n.negate()); + } + var b = n.value; + if (n.isSmall) { + if (isPrecise(a + b)) return new SmallInteger(a + b); + b = smallToArray(Math.abs(b)); + } + return new BigInteger(addSmall(b, Math.abs(a)), a < 0); + }; + SmallInteger.prototype.plus = SmallInteger.prototype.add; + NativeBigInt.prototype.add = function(v) { + return new NativeBigInt(this.value + parseValue(v).value); + }; + NativeBigInt.prototype.plus = NativeBigInt.prototype.add; + function subtract(a, b) { + var a_l = a.length, b_l = b.length, r = new Array(a_l), borrow = 0, base = BASE, i2, difference; + for (i2 = 0; i2 < b_l; i2++) { + difference = a[i2] - borrow - b[i2]; + if (difference < 0) { + difference += base; + borrow = 1; + } else borrow = 0; + r[i2] = difference; + } + for (i2 = b_l; i2 < a_l; i2++) { + difference = a[i2] - borrow; + if (difference < 0) difference += base; + else { + r[i2++] = difference; + break; + } + r[i2] = difference; + } + for (; i2 < a_l; i2++) { + r[i2] = a[i2]; + } + trim(r); + return r; + } + function subtractAny(a, b, sign) { + var value; + if (compareAbs(a, b) >= 0) { + value = subtract(a, b); + } else { + value = subtract(b, a); + sign = !sign; + } + value = arrayToSmall(value); + if (typeof value === "number") { + if (sign) value = -value; + return new SmallInteger(value); + } + return new BigInteger(value, sign); + } + function subtractSmall(a, b, sign) { + var l2 = a.length, r = new Array(l2), carry = -b, base = BASE, i2, difference; + for (i2 = 0; i2 < l2; i2++) { + difference = a[i2] + carry; + carry = Math.floor(difference / base); + difference %= base; + r[i2] = difference < 0 ? difference + base : difference; + } + r = arrayToSmall(r); + if (typeof r === "number") { + if (sign) r = -r; + return new SmallInteger(r); + } + return new BigInteger(r, sign); + } + BigInteger.prototype.subtract = function(v) { + var n = parseValue(v); + if (this.sign !== n.sign) { + return this.add(n.negate()); + } + var a = this.value, b = n.value; + if (n.isSmall) + return subtractSmall(a, Math.abs(b), this.sign); + return subtractAny(a, b, this.sign); + }; + BigInteger.prototype.minus = BigInteger.prototype.subtract; + SmallInteger.prototype.subtract = function(v) { + var n = parseValue(v); + var a = this.value; + if (a < 0 !== n.sign) { + return this.add(n.negate()); + } + var b = n.value; + if (n.isSmall) { + return new SmallInteger(a - b); + } + return subtractSmall(b, Math.abs(a), a >= 0); + }; + SmallInteger.prototype.minus = SmallInteger.prototype.subtract; + NativeBigInt.prototype.subtract = function(v) { + return new NativeBigInt(this.value - parseValue(v).value); + }; + NativeBigInt.prototype.minus = NativeBigInt.prototype.subtract; + BigInteger.prototype.negate = function() { + return new BigInteger(this.value, !this.sign); + }; + SmallInteger.prototype.negate = function() { + var sign = this.sign; + var small = new SmallInteger(-this.value); + small.sign = !sign; + return small; + }; + NativeBigInt.prototype.negate = function() { + return new NativeBigInt(-this.value); + }; + BigInteger.prototype.abs = function() { + return new BigInteger(this.value, false); + }; + SmallInteger.prototype.abs = function() { + return new SmallInteger(Math.abs(this.value)); + }; + NativeBigInt.prototype.abs = function() { + return new NativeBigInt(this.value >= 0 ? this.value : -this.value); + }; + function multiplyLong(a, b) { + var a_l = a.length, b_l = b.length, l2 = a_l + b_l, r = createArray(l2), base = BASE, product, carry, i2, a_i, b_j; + for (i2 = 0; i2 < a_l; ++i2) { + a_i = a[i2]; + for (var j = 0; j < b_l; ++j) { + b_j = b[j]; + product = a_i * b_j + r[i2 + j]; + carry = Math.floor(product / base); + r[i2 + j] = product - carry * base; + r[i2 + j + 1] += carry; + } + } + trim(r); + return r; + } + function multiplySmall(a, b) { + var l2 = a.length, r = new Array(l2), base = BASE, carry = 0, product, i2; + for (i2 = 0; i2 < l2; i2++) { + product = a[i2] * b + carry; + carry = Math.floor(product / base); + r[i2] = product - carry * base; + } + while (carry > 0) { + r[i2++] = carry % base; + carry = Math.floor(carry / base); + } + return r; + } + function shiftLeft(x, n) { + var r = []; + while (n-- > 0) r.push(0); + return r.concat(x); + } + function multiplyKaratsuba(x, y) { + var n = Math.max(x.length, y.length); + if (n <= 30) return multiplyLong(x, y); + n = Math.ceil(n / 2); + var b = x.slice(n), a = x.slice(0, n), d = y.slice(n), c = y.slice(0, n); + var ac = multiplyKaratsuba(a, c), bd = multiplyKaratsuba(b, d), abcd = multiplyKaratsuba(addAny(a, b), addAny(c, d)); + var product = addAny(addAny(ac, shiftLeft(subtract(subtract(abcd, ac), bd), n)), shiftLeft(bd, 2 * n)); + trim(product); + return product; + } + function useKaratsuba(l1, l2) { + return -0.012 * l1 - 0.012 * l2 + 15e-6 * l1 * l2 > 0; + } + BigInteger.prototype.multiply = function(v) { + var n = parseValue(v), a = this.value, b = n.value, sign = this.sign !== n.sign, abs; + if (n.isSmall) { + if (b === 0) return Integer[0]; + if (b === 1) return this; + if (b === -1) return this.negate(); + abs = Math.abs(b); + if (abs < BASE) { + return new BigInteger(multiplySmall(a, abs), sign); + } + b = smallToArray(abs); + } + if (useKaratsuba(a.length, b.length)) + return new BigInteger(multiplyKaratsuba(a, b), sign); + return new BigInteger(multiplyLong(a, b), sign); + }; + BigInteger.prototype.times = BigInteger.prototype.multiply; + function multiplySmallAndArray(a, b, sign) { + if (a < BASE) { + return new BigInteger(multiplySmall(b, a), sign); + } + return new BigInteger(multiplyLong(b, smallToArray(a)), sign); + } + SmallInteger.prototype._multiplyBySmall = function(a) { + if (isPrecise(a.value * this.value)) { + return new SmallInteger(a.value * this.value); + } + return multiplySmallAndArray(Math.abs(a.value), smallToArray(Math.abs(this.value)), this.sign !== a.sign); + }; + BigInteger.prototype._multiplyBySmall = function(a) { + if (a.value === 0) return Integer[0]; + if (a.value === 1) return this; + if (a.value === -1) return this.negate(); + return multiplySmallAndArray(Math.abs(a.value), this.value, this.sign !== a.sign); + }; + SmallInteger.prototype.multiply = function(v) { + return parseValue(v)._multiplyBySmall(this); + }; + SmallInteger.prototype.times = SmallInteger.prototype.multiply; + NativeBigInt.prototype.multiply = function(v) { + return new NativeBigInt(this.value * parseValue(v).value); + }; + NativeBigInt.prototype.times = NativeBigInt.prototype.multiply; + function square(a) { + var l2 = a.length, r = createArray(l2 + l2), base = BASE, product, carry, i2, a_i, a_j; + for (i2 = 0; i2 < l2; i2++) { + a_i = a[i2]; + carry = 0 - a_i * a_i; + for (var j = i2; j < l2; j++) { + a_j = a[j]; + product = 2 * (a_i * a_j) + r[i2 + j] + carry; + carry = Math.floor(product / base); + r[i2 + j] = product - carry * base; + } + r[i2 + l2] = carry; + } + trim(r); + return r; + } + BigInteger.prototype.square = function() { + return new BigInteger(square(this.value), false); + }; + SmallInteger.prototype.square = function() { + var value = this.value * this.value; + if (isPrecise(value)) return new SmallInteger(value); + return new BigInteger(square(smallToArray(Math.abs(this.value))), false); + }; + NativeBigInt.prototype.square = function(v) { + return new NativeBigInt(this.value * this.value); + }; + function divMod1(a, b) { + var a_l = a.length, b_l = b.length, base = BASE, result = createArray(b.length), divisorMostSignificantDigit = b[b_l - 1], lambda = Math.ceil(base / (2 * divisorMostSignificantDigit)), remainder = multiplySmall(a, lambda), divisor = multiplySmall(b, lambda), quotientDigit, shift, carry, borrow, i2, l2, q; + if (remainder.length <= a_l) remainder.push(0); + divisor.push(0); + divisorMostSignificantDigit = divisor[b_l - 1]; + for (shift = a_l - b_l; shift >= 0; shift--) { + quotientDigit = base - 1; + if (remainder[shift + b_l] !== divisorMostSignificantDigit) { + quotientDigit = Math.floor((remainder[shift + b_l] * base + remainder[shift + b_l - 1]) / divisorMostSignificantDigit); + } + carry = 0; + borrow = 0; + l2 = divisor.length; + for (i2 = 0; i2 < l2; i2++) { + carry += quotientDigit * divisor[i2]; + q = Math.floor(carry / base); + borrow += remainder[shift + i2] - (carry - q * base); + carry = q; + if (borrow < 0) { + remainder[shift + i2] = borrow + base; + borrow = -1; + } else { + remainder[shift + i2] = borrow; + borrow = 0; + } + } + while (borrow !== 0) { + quotientDigit -= 1; + carry = 0; + for (i2 = 0; i2 < l2; i2++) { + carry += remainder[shift + i2] - base + divisor[i2]; + if (carry < 0) { + remainder[shift + i2] = carry + base; + carry = 0; + } else { + remainder[shift + i2] = carry; + carry = 1; + } + } + borrow += carry; + } + result[shift] = quotientDigit; + } + remainder = divModSmall(remainder, lambda)[0]; + return [arrayToSmall(result), arrayToSmall(remainder)]; + } + function divMod2(a, b) { + var a_l = a.length, b_l = b.length, result = [], part = [], base = BASE, guess, xlen, highx, highy, check; + while (a_l) { + part.unshift(a[--a_l]); + trim(part); + if (compareAbs(part, b) < 0) { + result.push(0); + continue; + } + xlen = part.length; + highx = part[xlen - 1] * base + part[xlen - 2]; + highy = b[b_l - 1] * base + b[b_l - 2]; + if (xlen > b_l) { + highx = (highx + 1) * base; + } + guess = Math.ceil(highx / highy); + do { + check = multiplySmall(b, guess); + if (compareAbs(check, part) <= 0) break; + guess--; + } while (guess); + result.push(guess); + part = subtract(part, check); + } + result.reverse(); + return [arrayToSmall(result), arrayToSmall(part)]; + } + function divModSmall(value, lambda) { + var length = value.length, quotient = createArray(length), base = BASE, i2, q, remainder, divisor; + remainder = 0; + for (i2 = length - 1; i2 >= 0; --i2) { + divisor = remainder * base + value[i2]; + q = truncate(divisor / lambda); + remainder = divisor - q * lambda; + quotient[i2] = q | 0; + } + return [quotient, remainder | 0]; + } + function divModAny(self2, v) { + var value, n = parseValue(v); + if (supportsNativeBigInt) { + return [new NativeBigInt(self2.value / n.value), new NativeBigInt(self2.value % n.value)]; + } + var a = self2.value, b = n.value; + var quotient; + if (b === 0) throw new Error("Cannot divide by zero"); + if (self2.isSmall) { + if (n.isSmall) { + return [new SmallInteger(truncate(a / b)), new SmallInteger(a % b)]; + } + return [Integer[0], self2]; + } + if (n.isSmall) { + if (b === 1) return [self2, Integer[0]]; + if (b == -1) return [self2.negate(), Integer[0]]; + var abs = Math.abs(b); + if (abs < BASE) { + value = divModSmall(a, abs); + quotient = arrayToSmall(value[0]); + var remainder = value[1]; + if (self2.sign) remainder = -remainder; + if (typeof quotient === "number") { + if (self2.sign !== n.sign) quotient = -quotient; + return [new SmallInteger(quotient), new SmallInteger(remainder)]; + } + return [new BigInteger(quotient, self2.sign !== n.sign), new SmallInteger(remainder)]; + } + b = smallToArray(abs); + } + var comparison = compareAbs(a, b); + if (comparison === -1) return [Integer[0], self2]; + if (comparison === 0) return [Integer[self2.sign === n.sign ? 1 : -1], Integer[0]]; + if (a.length + b.length <= 200) + value = divMod1(a, b); + else value = divMod2(a, b); + quotient = value[0]; + var qSign = self2.sign !== n.sign, mod = value[1], mSign = self2.sign; + if (typeof quotient === "number") { + if (qSign) quotient = -quotient; + quotient = new SmallInteger(quotient); + } else quotient = new BigInteger(quotient, qSign); + if (typeof mod === "number") { + if (mSign) mod = -mod; + mod = new SmallInteger(mod); + } else mod = new BigInteger(mod, mSign); + return [quotient, mod]; + } + BigInteger.prototype.divmod = function(v) { + var result = divModAny(this, v); + return { + quotient: result[0], + remainder: result[1] + }; + }; + NativeBigInt.prototype.divmod = SmallInteger.prototype.divmod = BigInteger.prototype.divmod; + BigInteger.prototype.divide = function(v) { + return divModAny(this, v)[0]; + }; + NativeBigInt.prototype.over = NativeBigInt.prototype.divide = function(v) { + return new NativeBigInt(this.value / parseValue(v).value); + }; + SmallInteger.prototype.over = SmallInteger.prototype.divide = BigInteger.prototype.over = BigInteger.prototype.divide; + BigInteger.prototype.mod = function(v) { + return divModAny(this, v)[1]; + }; + NativeBigInt.prototype.mod = NativeBigInt.prototype.remainder = function(v) { + return new NativeBigInt(this.value % parseValue(v).value); + }; + SmallInteger.prototype.remainder = SmallInteger.prototype.mod = BigInteger.prototype.remainder = BigInteger.prototype.mod; + BigInteger.prototype.pow = function(v) { + var n = parseValue(v), a = this.value, b = n.value, value, x, y; + if (b === 0) return Integer[1]; + if (a === 0) return Integer[0]; + if (a === 1) return Integer[1]; + if (a === -1) return n.isEven() ? Integer[1] : Integer[-1]; + if (n.sign) { + return Integer[0]; + } + if (!n.isSmall) throw new Error("The exponent " + n.toString() + " is too large."); + if (this.isSmall) { + if (isPrecise(value = Math.pow(a, b))) + return new SmallInteger(truncate(value)); + } + x = this; + y = Integer[1]; + while (true) { + if (b & true) { + y = y.times(x); + --b; + } + if (b === 0) break; + b /= 2; + x = x.square(); + } + return y; + }; + SmallInteger.prototype.pow = BigInteger.prototype.pow; + NativeBigInt.prototype.pow = function(v) { + var n = parseValue(v); + var a = this.value, b = n.value; + var _0 = BigInt(0), _1 = BigInt(1), _2 = BigInt(2); + if (b === _0) return Integer[1]; + if (a === _0) return Integer[0]; + if (a === _1) return Integer[1]; + if (a === BigInt(-1)) return n.isEven() ? Integer[1] : Integer[-1]; + if (n.isNegative()) return new NativeBigInt(_0); + var x = this; + var y = Integer[1]; + while (true) { + if ((b & _1) === _1) { + y = y.times(x); + --b; + } + if (b === _0) break; + b /= _2; + x = x.square(); + } + return y; + }; + BigInteger.prototype.modPow = function(exp, mod) { + exp = parseValue(exp); + mod = parseValue(mod); + if (mod.isZero()) throw new Error("Cannot take modPow with modulus 0"); + var r = Integer[1], base = this.mod(mod); + if (exp.isNegative()) { + exp = exp.multiply(Integer[-1]); + base = base.modInv(mod); + } + while (exp.isPositive()) { + if (base.isZero()) return Integer[0]; + if (exp.isOdd()) r = r.multiply(base).mod(mod); + exp = exp.divide(2); + base = base.square().mod(mod); + } + return r; + }; + NativeBigInt.prototype.modPow = SmallInteger.prototype.modPow = BigInteger.prototype.modPow; + function compareAbs(a, b) { + if (a.length !== b.length) { + return a.length > b.length ? 1 : -1; + } + for (var i2 = a.length - 1; i2 >= 0; i2--) { + if (a[i2] !== b[i2]) return a[i2] > b[i2] ? 1 : -1; + } + return 0; + } + BigInteger.prototype.compareAbs = function(v) { + var n = parseValue(v), a = this.value, b = n.value; + if (n.isSmall) return 1; + return compareAbs(a, b); + }; + SmallInteger.prototype.compareAbs = function(v) { + var n = parseValue(v), a = Math.abs(this.value), b = n.value; + if (n.isSmall) { + b = Math.abs(b); + return a === b ? 0 : a > b ? 1 : -1; + } + return -1; + }; + NativeBigInt.prototype.compareAbs = function(v) { + var a = this.value; + var b = parseValue(v).value; + a = a >= 0 ? a : -a; + b = b >= 0 ? b : -b; + return a === b ? 0 : a > b ? 1 : -1; + }; + BigInteger.prototype.compare = function(v) { + if (v === Infinity) { + return -1; + } + if (v === -Infinity) { + return 1; + } + var n = parseValue(v), a = this.value, b = n.value; + if (this.sign !== n.sign) { + return n.sign ? 1 : -1; + } + if (n.isSmall) { + return this.sign ? -1 : 1; + } + return compareAbs(a, b) * (this.sign ? -1 : 1); + }; + BigInteger.prototype.compareTo = BigInteger.prototype.compare; + SmallInteger.prototype.compare = function(v) { + if (v === Infinity) { + return -1; + } + if (v === -Infinity) { + return 1; + } + var n = parseValue(v), a = this.value, b = n.value; + if (n.isSmall) { + return a == b ? 0 : a > b ? 1 : -1; + } + if (a < 0 !== n.sign) { + return a < 0 ? -1 : 1; + } + return a < 0 ? 1 : -1; + }; + SmallInteger.prototype.compareTo = SmallInteger.prototype.compare; + NativeBigInt.prototype.compare = function(v) { + if (v === Infinity) { + return -1; + } + if (v === -Infinity) { + return 1; + } + var a = this.value; + var b = parseValue(v).value; + return a === b ? 0 : a > b ? 1 : -1; + }; + NativeBigInt.prototype.compareTo = NativeBigInt.prototype.compare; + BigInteger.prototype.equals = function(v) { + return this.compare(v) === 0; + }; + NativeBigInt.prototype.eq = NativeBigInt.prototype.equals = SmallInteger.prototype.eq = SmallInteger.prototype.equals = BigInteger.prototype.eq = BigInteger.prototype.equals; + BigInteger.prototype.notEquals = function(v) { + return this.compare(v) !== 0; + }; + NativeBigInt.prototype.neq = NativeBigInt.prototype.notEquals = SmallInteger.prototype.neq = SmallInteger.prototype.notEquals = BigInteger.prototype.neq = BigInteger.prototype.notEquals; + BigInteger.prototype.greater = function(v) { + return this.compare(v) > 0; + }; + NativeBigInt.prototype.gt = NativeBigInt.prototype.greater = SmallInteger.prototype.gt = SmallInteger.prototype.greater = BigInteger.prototype.gt = BigInteger.prototype.greater; + BigInteger.prototype.lesser = function(v) { + return this.compare(v) < 0; + }; + NativeBigInt.prototype.lt = NativeBigInt.prototype.lesser = SmallInteger.prototype.lt = SmallInteger.prototype.lesser = BigInteger.prototype.lt = BigInteger.prototype.lesser; + BigInteger.prototype.greaterOrEquals = function(v) { + return this.compare(v) >= 0; + }; + NativeBigInt.prototype.geq = NativeBigInt.prototype.greaterOrEquals = SmallInteger.prototype.geq = SmallInteger.prototype.greaterOrEquals = BigInteger.prototype.geq = BigInteger.prototype.greaterOrEquals; + BigInteger.prototype.lesserOrEquals = function(v) { + return this.compare(v) <= 0; + }; + NativeBigInt.prototype.leq = NativeBigInt.prototype.lesserOrEquals = SmallInteger.prototype.leq = SmallInteger.prototype.lesserOrEquals = BigInteger.prototype.leq = BigInteger.prototype.lesserOrEquals; + BigInteger.prototype.isEven = function() { + return (this.value[0] & 1) === 0; + }; + SmallInteger.prototype.isEven = function() { + return (this.value & 1) === 0; + }; + NativeBigInt.prototype.isEven = function() { + return (this.value & BigInt(1)) === BigInt(0); + }; + BigInteger.prototype.isOdd = function() { + return (this.value[0] & 1) === 1; + }; + SmallInteger.prototype.isOdd = function() { + return (this.value & 1) === 1; + }; + NativeBigInt.prototype.isOdd = function() { + return (this.value & BigInt(1)) === BigInt(1); + }; + BigInteger.prototype.isPositive = function() { + return !this.sign; + }; + SmallInteger.prototype.isPositive = function() { + return this.value > 0; + }; + NativeBigInt.prototype.isPositive = SmallInteger.prototype.isPositive; + BigInteger.prototype.isNegative = function() { + return this.sign; + }; + SmallInteger.prototype.isNegative = function() { + return this.value < 0; + }; + NativeBigInt.prototype.isNegative = SmallInteger.prototype.isNegative; + BigInteger.prototype.isUnit = function() { + return false; + }; + SmallInteger.prototype.isUnit = function() { + return Math.abs(this.value) === 1; + }; + NativeBigInt.prototype.isUnit = function() { + return this.abs().value === BigInt(1); + }; + BigInteger.prototype.isZero = function() { + return false; + }; + SmallInteger.prototype.isZero = function() { + return this.value === 0; + }; + NativeBigInt.prototype.isZero = function() { + return this.value === BigInt(0); + }; + BigInteger.prototype.isDivisibleBy = function(v) { + var n = parseValue(v); + if (n.isZero()) return false; + if (n.isUnit()) return true; + if (n.compareAbs(2) === 0) return this.isEven(); + return this.mod(n).isZero(); + }; + NativeBigInt.prototype.isDivisibleBy = SmallInteger.prototype.isDivisibleBy = BigInteger.prototype.isDivisibleBy; + function isBasicPrime(v) { + var n = v.abs(); + if (n.isUnit()) return false; + if (n.equals(2) || n.equals(3) || n.equals(5)) return true; + if (n.isEven() || n.isDivisibleBy(3) || n.isDivisibleBy(5)) return false; + if (n.lesser(49)) return true; + } + function millerRabinTest(n, a) { + var nPrev = n.prev(), b = nPrev, r = 0, d, t, i2, x; + while (b.isEven()) b = b.divide(2), r++; + next: for (i2 = 0; i2 < a.length; i2++) { + if (n.lesser(a[i2])) continue; + x = bigInt(a[i2]).modPow(b, n); + if (x.isUnit() || x.equals(nPrev)) continue; + for (d = r - 1; d != 0; d--) { + x = x.square().mod(n); + if (x.isUnit()) return false; + if (x.equals(nPrev)) continue next; + } + return false; + } + return true; + } + BigInteger.prototype.isPrime = function(strict) { + var isPrime = isBasicPrime(this); + if (isPrime !== undefined2) return isPrime; + var n = this.abs(); + var bits = n.bitLength(); + if (bits <= 64) + return millerRabinTest(n, [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]); + var logN = Math.log(2) * bits.toJSNumber(); + var t = Math.ceil(strict === true ? 2 * Math.pow(logN, 2) : logN); + for (var a = [], i2 = 0; i2 < t; i2++) { + a.push(bigInt(i2 + 2)); + } + return millerRabinTest(n, a); + }; + NativeBigInt.prototype.isPrime = SmallInteger.prototype.isPrime = BigInteger.prototype.isPrime; + BigInteger.prototype.isProbablePrime = function(iterations, rng2) { + var isPrime = isBasicPrime(this); + if (isPrime !== undefined2) return isPrime; + var n = this.abs(); + var t = iterations === undefined2 ? 5 : iterations; + for (var a = [], i2 = 0; i2 < t; i2++) { + a.push(bigInt.randBetween(2, n.minus(2), rng2)); + } + return millerRabinTest(n, a); + }; + NativeBigInt.prototype.isProbablePrime = SmallInteger.prototype.isProbablePrime = BigInteger.prototype.isProbablePrime; + BigInteger.prototype.modInv = function(n) { + var t = bigInt.zero, newT = bigInt.one, r = parseValue(n), newR = this.abs(), q, lastT, lastR; + while (!newR.isZero()) { + q = r.divide(newR); + lastT = t; + lastR = r; + t = newT; + r = newR; + newT = lastT.subtract(q.multiply(newT)); + newR = lastR.subtract(q.multiply(newR)); + } + if (!r.isUnit()) throw new Error(this.toString() + " and " + n.toString() + " are not co-prime"); + if (t.compare(0) === -1) { + t = t.add(n); + } + if (this.isNegative()) { + return t.negate(); + } + return t; + }; + NativeBigInt.prototype.modInv = SmallInteger.prototype.modInv = BigInteger.prototype.modInv; + BigInteger.prototype.next = function() { + var value = this.value; + if (this.sign) { + return subtractSmall(value, 1, this.sign); + } + return new BigInteger(addSmall(value, 1), this.sign); + }; + SmallInteger.prototype.next = function() { + var value = this.value; + if (value + 1 < MAX_INT) return new SmallInteger(value + 1); + return new BigInteger(MAX_INT_ARR, false); + }; + NativeBigInt.prototype.next = function() { + return new NativeBigInt(this.value + BigInt(1)); + }; + BigInteger.prototype.prev = function() { + var value = this.value; + if (this.sign) { + return new BigInteger(addSmall(value, 1), true); + } + return subtractSmall(value, 1, this.sign); + }; + SmallInteger.prototype.prev = function() { + var value = this.value; + if (value - 1 > -MAX_INT) return new SmallInteger(value - 1); + return new BigInteger(MAX_INT_ARR, true); + }; + NativeBigInt.prototype.prev = function() { + return new NativeBigInt(this.value - BigInt(1)); + }; + var powersOfTwo = [1]; + while (2 * powersOfTwo[powersOfTwo.length - 1] <= BASE) powersOfTwo.push(2 * powersOfTwo[powersOfTwo.length - 1]); + var powers2Length = powersOfTwo.length, highestPower2 = powersOfTwo[powers2Length - 1]; + function shift_isSmall(n) { + return Math.abs(n) <= BASE; + } + BigInteger.prototype.shiftLeft = function(v) { + var n = parseValue(v).toJSNumber(); + if (!shift_isSmall(n)) { + throw new Error(String(n) + " is too large for shifting."); + } + if (n < 0) return this.shiftRight(-n); + var result = this; + if (result.isZero()) return result; + while (n >= powers2Length) { + result = result.multiply(highestPower2); + n -= powers2Length - 1; + } + return result.multiply(powersOfTwo[n]); + }; + NativeBigInt.prototype.shiftLeft = SmallInteger.prototype.shiftLeft = BigInteger.prototype.shiftLeft; + BigInteger.prototype.shiftRight = function(v) { + var remQuo; + var n = parseValue(v).toJSNumber(); + if (!shift_isSmall(n)) { + throw new Error(String(n) + " is too large for shifting."); + } + if (n < 0) return this.shiftLeft(-n); + var result = this; + while (n >= powers2Length) { + if (result.isZero() || result.isNegative() && result.isUnit()) return result; + remQuo = divModAny(result, highestPower2); + result = remQuo[1].isNegative() ? remQuo[0].prev() : remQuo[0]; + n -= powers2Length - 1; + } + remQuo = divModAny(result, powersOfTwo[n]); + return remQuo[1].isNegative() ? remQuo[0].prev() : remQuo[0]; + }; + NativeBigInt.prototype.shiftRight = SmallInteger.prototype.shiftRight = BigInteger.prototype.shiftRight; + function bitwise(x, y, fn) { + y = parseValue(y); + var xSign = x.isNegative(), ySign = y.isNegative(); + var xRem = xSign ? x.not() : x, yRem = ySign ? y.not() : y; + var xDigit = 0, yDigit = 0; + var xDivMod = null, yDivMod = null; + var result = []; + while (!xRem.isZero() || !yRem.isZero()) { + xDivMod = divModAny(xRem, highestPower2); + xDigit = xDivMod[1].toJSNumber(); + if (xSign) { + xDigit = highestPower2 - 1 - xDigit; + } + yDivMod = divModAny(yRem, highestPower2); + yDigit = yDivMod[1].toJSNumber(); + if (ySign) { + yDigit = highestPower2 - 1 - yDigit; + } + xRem = xDivMod[0]; + yRem = yDivMod[0]; + result.push(fn(xDigit, yDigit)); + } + var sum = fn(xSign ? 1 : 0, ySign ? 1 : 0) !== 0 ? bigInt(-1) : bigInt(0); + for (var i2 = result.length - 1; i2 >= 0; i2 -= 1) { + sum = sum.multiply(highestPower2).add(bigInt(result[i2])); + } + return sum; + } + BigInteger.prototype.not = function() { + return this.negate().prev(); + }; + NativeBigInt.prototype.not = SmallInteger.prototype.not = BigInteger.prototype.not; + BigInteger.prototype.and = function(n) { + return bitwise(this, n, function(a, b) { + return a & b; + }); + }; + NativeBigInt.prototype.and = SmallInteger.prototype.and = BigInteger.prototype.and; + BigInteger.prototype.or = function(n) { + return bitwise(this, n, function(a, b) { + return a | b; + }); + }; + NativeBigInt.prototype.or = SmallInteger.prototype.or = BigInteger.prototype.or; + BigInteger.prototype.xor = function(n) { + return bitwise(this, n, function(a, b) { + return a ^ b; + }); + }; + NativeBigInt.prototype.xor = SmallInteger.prototype.xor = BigInteger.prototype.xor; + var LOBMASK_I = 1 << 30, LOBMASK_BI = (BASE & -BASE) * (BASE & -BASE) | LOBMASK_I; + function roughLOB(n) { + var v = n.value, x = typeof v === "number" ? v | LOBMASK_I : typeof v === "bigint" ? v | BigInt(LOBMASK_I) : v[0] + v[1] * BASE | LOBMASK_BI; + return x & -x; + } + function integerLogarithm(value, base) { + if (base.compareTo(value) <= 0) { + var tmp = integerLogarithm(value, base.square(base)); + var p = tmp.p; + var e = tmp.e; + var t = p.multiply(base); + return t.compareTo(value) <= 0 ? { p: t, e: e * 2 + 1 } : { p, e: e * 2 }; + } + return { p: bigInt(1), e: 0 }; + } + BigInteger.prototype.bitLength = function() { + var n = this; + if (n.compareTo(bigInt(0)) < 0) { + n = n.negate().subtract(bigInt(1)); + } + if (n.compareTo(bigInt(0)) === 0) { + return bigInt(0); + } + return bigInt(integerLogarithm(n, bigInt(2)).e).add(bigInt(1)); + }; + NativeBigInt.prototype.bitLength = SmallInteger.prototype.bitLength = BigInteger.prototype.bitLength; + function max(a, b) { + a = parseValue(a); + b = parseValue(b); + return a.greater(b) ? a : b; + } + function min(a, b) { + a = parseValue(a); + b = parseValue(b); + return a.lesser(b) ? a : b; + } + function gcd(a, b) { + a = parseValue(a).abs(); + b = parseValue(b).abs(); + if (a.equals(b)) return a; + if (a.isZero()) return b; + if (b.isZero()) return a; + var c = Integer[1], d, t; + while (a.isEven() && b.isEven()) { + d = min(roughLOB(a), roughLOB(b)); + a = a.divide(d); + b = b.divide(d); + c = c.multiply(d); + } + while (a.isEven()) { + a = a.divide(roughLOB(a)); + } + do { + while (b.isEven()) { + b = b.divide(roughLOB(b)); + } + if (a.greater(b)) { + t = b; + b = a; + a = t; + } + b = b.subtract(a); + } while (!b.isZero()); + return c.isUnit() ? a : a.multiply(c); + } + function lcm(a, b) { + a = parseValue(a).abs(); + b = parseValue(b).abs(); + return a.divide(gcd(a, b)).multiply(b); + } + function randBetween(a, b, rng2) { + a = parseValue(a); + b = parseValue(b); + var usedRNG = rng2 || Math.random; + var low = min(a, b), high = max(a, b); + var range = high.subtract(low).add(1); + if (range.isSmall) return low.add(Math.floor(usedRNG() * range)); + var digits = toBase(range, BASE).value; + var result = [], restricted = true; + for (var i2 = 0; i2 < digits.length; i2++) { + var top = restricted ? digits[i2] + (i2 + 1 < digits.length ? digits[i2 + 1] / BASE : 0) : BASE; + var digit = truncate(usedRNG() * top); + result.push(digit); + if (digit < digits[i2]) restricted = false; + } + return low.add(Integer.fromArray(result, BASE, false)); + } + var parseBase = function(text, base, alphabet, caseSensitive) { + alphabet = alphabet || DEFAULT_ALPHABET; + text = String(text); + if (!caseSensitive) { + text = text.toLowerCase(); + alphabet = alphabet.toLowerCase(); + } + var length = text.length; + var i2; + var absBase = Math.abs(base); + var alphabetValues = {}; + for (i2 = 0; i2 < alphabet.length; i2++) { + alphabetValues[alphabet[i2]] = i2; + } + for (i2 = 0; i2 < length; i2++) { + var c = text[i2]; + if (c === "-") continue; + if (c in alphabetValues) { + if (alphabetValues[c] >= absBase) { + if (c === "1" && absBase === 1) continue; + throw new Error(c + " is not a valid digit in base " + base + "."); + } + } + } + base = parseValue(base); + var digits = []; + var isNegative = text[0] === "-"; + for (i2 = isNegative ? 1 : 0; i2 < text.length; i2++) { + var c = text[i2]; + if (c in alphabetValues) digits.push(parseValue(alphabetValues[c])); + else if (c === "<") { + var start = i2; + do { + i2++; + } while (text[i2] !== ">" && i2 < text.length); + digits.push(parseValue(text.slice(start + 1, i2))); + } else throw new Error(c + " is not a valid character"); + } + return parseBaseFromArray(digits, base, isNegative); + }; + function parseBaseFromArray(digits, base, isNegative) { + var val = Integer[0], pow = Integer[1], i2; + for (i2 = digits.length - 1; i2 >= 0; i2--) { + val = val.add(digits[i2].times(pow)); + pow = pow.times(base); + } + return isNegative ? val.negate() : val; + } + function stringify2(digit, alphabet) { + alphabet = alphabet || DEFAULT_ALPHABET; + if (digit < alphabet.length) { + return alphabet[digit]; + } + return "<" + digit + ">"; + } + function toBase(n, base) { + base = bigInt(base); + if (base.isZero()) { + if (n.isZero()) return { value: [0], isNegative: false }; + throw new Error("Cannot convert nonzero numbers to base 0."); + } + if (base.equals(-1)) { + if (n.isZero()) return { value: [0], isNegative: false }; + if (n.isNegative()) + return { + value: [].concat.apply( + [], + Array.apply(null, Array(-n.toJSNumber())).map(Array.prototype.valueOf, [1, 0]) + ), + isNegative: false + }; + var arr = Array.apply(null, Array(n.toJSNumber() - 1)).map(Array.prototype.valueOf, [0, 1]); + arr.unshift([1]); + return { + value: [].concat.apply([], arr), + isNegative: false + }; + } + var neg = false; + if (n.isNegative() && base.isPositive()) { + neg = true; + n = n.abs(); + } + if (base.isUnit()) { + if (n.isZero()) return { value: [0], isNegative: false }; + return { + value: Array.apply(null, Array(n.toJSNumber())).map(Number.prototype.valueOf, 1), + isNegative: neg + }; + } + var out = []; + var left = n, divmod; + while (left.isNegative() || left.compareAbs(base) >= 0) { + divmod = left.divmod(base); + left = divmod.quotient; + var digit = divmod.remainder; + if (digit.isNegative()) { + digit = base.minus(digit).abs(); + left = left.next(); + } + out.push(digit.toJSNumber()); + } + out.push(left.toJSNumber()); + return { value: out.reverse(), isNegative: neg }; + } + function toBaseString(n, base, alphabet) { + var arr = toBase(n, base); + return (arr.isNegative ? "-" : "") + arr.value.map(function(x) { + return stringify2(x, alphabet); + }).join(""); + } + BigInteger.prototype.toArray = function(radix) { + return toBase(this, radix); + }; + SmallInteger.prototype.toArray = function(radix) { + return toBase(this, radix); + }; + NativeBigInt.prototype.toArray = function(radix) { + return toBase(this, radix); + }; + BigInteger.prototype.toString = function(radix, alphabet) { + if (radix === undefined2) radix = 10; + if (radix !== 10 || alphabet) return toBaseString(this, radix, alphabet); + var v = this.value, l2 = v.length, str = String(v[--l2]), zeros = "0000000", digit; + while (--l2 >= 0) { + digit = String(v[l2]); + str += zeros.slice(digit.length) + digit; + } + var sign = this.sign ? "-" : ""; + return sign + str; + }; + SmallInteger.prototype.toString = function(radix, alphabet) { + if (radix === undefined2) radix = 10; + if (radix != 10 || alphabet) return toBaseString(this, radix, alphabet); + return String(this.value); + }; + NativeBigInt.prototype.toString = SmallInteger.prototype.toString; + NativeBigInt.prototype.toJSON = BigInteger.prototype.toJSON = SmallInteger.prototype.toJSON = function() { + return this.toString(); + }; + BigInteger.prototype.valueOf = function() { + return parseInt(this.toString(), 10); + }; + BigInteger.prototype.toJSNumber = BigInteger.prototype.valueOf; + SmallInteger.prototype.valueOf = function() { + return this.value; + }; + SmallInteger.prototype.toJSNumber = SmallInteger.prototype.valueOf; + NativeBigInt.prototype.valueOf = NativeBigInt.prototype.toJSNumber = function() { + return parseInt(this.toString(), 10); + }; + function parseStringValue(v) { + if (isPrecise(+v)) { + var x = +v; + if (x === truncate(x)) + return supportsNativeBigInt ? new NativeBigInt(BigInt(x)) : new SmallInteger(x); + throw new Error("Invalid integer: " + v); + } + var sign = v[0] === "-"; + if (sign) v = v.slice(1); + var split = v.split(/e/i); + if (split.length > 2) throw new Error("Invalid integer: " + split.join("e")); + if (split.length === 2) { + var exp = split[1]; + if (exp[0] === "+") exp = exp.slice(1); + exp = +exp; + if (exp !== truncate(exp) || !isPrecise(exp)) throw new Error("Invalid integer: " + exp + " is not a valid exponent."); + var text = split[0]; + var decimalPlace = text.indexOf("."); + if (decimalPlace >= 0) { + exp -= text.length - decimalPlace - 1; + text = text.slice(0, decimalPlace) + text.slice(decimalPlace + 1); + } + if (exp < 0) throw new Error("Cannot include negative exponent part for integers"); + text += new Array(exp + 1).join("0"); + v = text; + } + var isValid = /^([0-9][0-9]*)$/.test(v); + if (!isValid) throw new Error("Invalid integer: " + v); + if (supportsNativeBigInt) { + return new NativeBigInt(BigInt(sign ? "-" + v : v)); + } + var r = [], max2 = v.length, l2 = LOG_BASE, min2 = max2 - l2; + while (max2 > 0) { + r.push(+v.slice(min2, max2)); + min2 -= l2; + if (min2 < 0) min2 = 0; + max2 -= l2; + } + trim(r); + return new BigInteger(r, sign); + } + function parseNumberValue(v) { + if (supportsNativeBigInt) { + return new NativeBigInt(BigInt(v)); + } + if (isPrecise(v)) { + if (v !== truncate(v)) throw new Error(v + " is not an integer."); + return new SmallInteger(v); + } + return parseStringValue(v.toString()); + } + function parseValue(v) { + if (typeof v === "number") { + return parseNumberValue(v); + } + if (typeof v === "string") { + return parseStringValue(v); + } + if (typeof v === "bigint") { + return new NativeBigInt(v); + } + return v; + } + for (var i = 0; i < 1e3; i++) { + Integer[i] = parseValue(i); + if (i > 0) Integer[-i] = parseValue(-i); + } + Integer.one = Integer[1]; + Integer.zero = Integer[0]; + Integer.minusOne = Integer[-1]; + Integer.max = max; + Integer.min = min; + Integer.gcd = gcd; + Integer.lcm = lcm; + Integer.isInstance = function(x) { + return x instanceof BigInteger || x instanceof SmallInteger || x instanceof NativeBigInt; + }; + Integer.randBetween = randBetween; + Integer.fromArray = function(digits, base, isNegative) { + return parseBaseFromArray(digits.map(parseValue), parseValue(base || 10), isNegative); + }; + return Integer; + })(); + if (typeof module2 !== "undefined" && module2.hasOwnProperty("exports")) { + module2.exports = bigInt; + } + if (typeof define === "function" && define.amd) { + define(function() { + return bigInt; + }); + } + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Decrypt.js +var require_Decrypt = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Decrypt.js"(exports2, module2) { + var bigInt = require_BigInteger(); + var Stream = require("stream"); + if (!Stream.Writable || !Stream.Writable.prototype.destroy) + Stream = require_readable2(); + var table; + function generateTable() { + var poly = 3988292384, c, n, k; + table = []; + for (n = 0; n < 256; n++) { + c = n; + for (k = 0; k < 8; k++) + c = c & 1 ? poly ^ c >>> 1 : c = c >>> 1; + table[n] = c >>> 0; + } + } + function crc(ch, crc2) { + if (!table) + generateTable(); + if (ch.charCodeAt) + ch = ch.charCodeAt(0); + return bigInt(crc2).shiftRight(8).and(16777215).xor(table[bigInt(crc2).xor(ch).and(255)]).value; + } + function Decrypt() { + if (!(this instanceof Decrypt)) + return new Decrypt(); + this.key0 = 305419896; + this.key1 = 591751049; + this.key2 = 878082192; + } + Decrypt.prototype.update = function(h) { + this.key0 = crc(h, this.key0); + this.key1 = bigInt(this.key0).and(255).and(4294967295).add(this.key1); + this.key1 = bigInt(this.key1).multiply(134775813).add(1).and(4294967295).value; + this.key2 = crc(bigInt(this.key1).shiftRight(24).and(255), this.key2); + }; + Decrypt.prototype.decryptByte = function(c) { + var k = bigInt(this.key2).or(2); + c = c ^ bigInt(k).multiply(bigInt(k ^ 1)).shiftRight(8).and(255); + this.update(c); + return c; + }; + Decrypt.prototype.stream = function() { + var stream = Stream.Transform(), self2 = this; + stream._transform = function(d, e, cb) { + for (var i = 0; i < d.length; i++) { + d[i] = self2.decryptByte(d[i]); + } + this.push(d); + cb(); + }; + return stream; + }; + module2.exports = Decrypt; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Open/unzip.js +var require_unzip = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Open/unzip.js"(exports2, module2) { + var Promise2 = require_bluebird(); + var Decrypt = require_Decrypt(); + var PullStream = require_PullStream(); + var Stream = require("stream"); + var binary = require_binary2(); + var zlib = require("zlib"); + var parseExtraField = require_parseExtraField(); + var Buffer2 = require_Buffer(); + var parseDateTime = require_parseDateTime(); + if (!Stream.Writable || !Stream.Writable.prototype.destroy) + Stream = require_readable2(); + module2.exports = function unzip(source, offset, _password, directoryVars) { + var file2 = PullStream(), entry = Stream.PassThrough(); + var req = source.stream(offset); + req.pipe(file2).on("error", function(e) { + entry.emit("error", e); + }); + entry.vars = file2.pull(30).then(function(data) { + var vars = binary.parse(data).word32lu("signature").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").vars; + vars.lastModifiedDateTime = parseDateTime(vars.lastModifiedDate, vars.lastModifiedTime); + return file2.pull(vars.fileNameLength).then(function(fileName) { + vars.fileName = fileName.toString("utf8"); + return file2.pull(vars.extraFieldLength); + }).then(function(extraField) { + var checkEncryption; + vars.extra = parseExtraField(extraField, vars); + if (directoryVars && directoryVars.compressedSize) vars = directoryVars; + if (vars.flags & 1) checkEncryption = file2.pull(12).then(function(header) { + if (!_password) + throw new Error("MISSING_PASSWORD"); + var decrypt = Decrypt(); + String(_password).split("").forEach(function(d) { + decrypt.update(d); + }); + for (var i = 0; i < header.length; i++) + header[i] = decrypt.decryptByte(header[i]); + vars.decrypt = decrypt; + vars.compressedSize -= 12; + var check = vars.flags & 8 ? vars.lastModifiedTime >> 8 & 255 : vars.crc32 >> 24 & 255; + if (header[11] !== check) + throw new Error("BAD_PASSWORD"); + return vars; + }); + return Promise2.resolve(checkEncryption).then(function() { + entry.emit("vars", vars); + return vars; + }); + }); + }); + entry.vars.then(function(vars) { + var fileSizeKnown = !(vars.flags & 8) || vars.compressedSize > 0, eof; + var inflater = vars.compressionMethod ? zlib.createInflateRaw() : Stream.PassThrough(); + if (fileSizeKnown) { + entry.size = vars.uncompressedSize; + eof = vars.compressedSize; + } else { + eof = Buffer2.alloc(4); + eof.writeUInt32LE(134695760, 0); + } + var stream = file2.stream(eof); + if (vars.decrypt) + stream = stream.pipe(vars.decrypt.stream()); + stream.pipe(inflater).on("error", function(err) { + entry.emit("error", err); + }).pipe(entry).on("finish", function() { + if (req.destroy) + req.destroy(); + else if (req.abort) + req.abort(); + else if (req.close) + req.close(); + else if (req.push) + req.push(); + else + console.log("warning - unable to close stream"); + }); + }).catch(function(e) { + entry.emit("error", e); + }); + return entry; + }; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Open/directory.js +var require_directory = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Open/directory.js"(exports2, module2) { + var binary = require_binary2(); + var PullStream = require_PullStream(); + var unzip = require_unzip(); + var Promise2 = require_bluebird(); + var BufferStream = require_BufferStream(); + var parseExtraField = require_parseExtraField(); + var Buffer2 = require_Buffer(); + var path = require("path"); + var Writer = require_fstream().Writer; + var parseDateTime = require_parseDateTime(); + var signature = Buffer2.alloc(4); + signature.writeUInt32LE(101010256, 0); + function getCrxHeader(source) { + var sourceStream = source.stream(0).pipe(PullStream()); + return sourceStream.pull(4).then(function(data) { + var signature2 = data.readUInt32LE(0); + if (signature2 === 875721283) { + var crxHeader; + return sourceStream.pull(12).then(function(data2) { + crxHeader = binary.parse(data2).word32lu("version").word32lu("pubKeyLength").word32lu("signatureLength").vars; + }).then(function() { + return sourceStream.pull(crxHeader.pubKeyLength + crxHeader.signatureLength); + }).then(function(data2) { + crxHeader.publicKey = data2.slice(0, crxHeader.pubKeyLength); + crxHeader.signature = data2.slice(crxHeader.pubKeyLength); + crxHeader.size = 16 + crxHeader.pubKeyLength + crxHeader.signatureLength; + return crxHeader; + }); + } + }); + } + function getZip64CentralDirectory(source, zip64CDL) { + var d64loc = binary.parse(zip64CDL).word32lu("signature").word32lu("diskNumber").word64lu("offsetToStartOfCentralDirectory").word32lu("numberOfDisks").vars; + if (d64loc.signature != 117853008) { + throw new Error("invalid zip64 end of central dir locator signature (0x07064b50): 0x" + d64loc.signature.toString(16)); + } + var dir64 = PullStream(); + source.stream(d64loc.offsetToStartOfCentralDirectory).pipe(dir64); + return dir64.pull(56); + } + function parseZip64DirRecord(dir64record) { + var vars = binary.parse(dir64record).word32lu("signature").word64lu("sizeOfCentralDirectory").word16lu("version").word16lu("versionsNeededToExtract").word32lu("diskNumber").word32lu("diskStart").word64lu("numberOfRecordsOnDisk").word64lu("numberOfRecords").word64lu("sizeOfCentralDirectory").word64lu("offsetToStartOfCentralDirectory").vars; + if (vars.signature != 101075792) { + throw new Error("invalid zip64 end of central dir locator signature (0x06064b50): 0x0" + vars.signature.toString(16)); + } + return vars; + } + module2.exports = function centralDirectory(source, options) { + var endDir = PullStream(), records = PullStream(), tailSize = options && options.tailSize || 80, sourceSize, crxHeader, startOffset, vars; + if (options && options.crx) + crxHeader = getCrxHeader(source); + return source.size().then(function(size) { + sourceSize = size; + source.stream(Math.max(0, size - tailSize)).on("error", function(error) { + endDir.emit("error", error); + }).pipe(endDir); + return endDir.pull(signature); + }).then(function() { + return Promise2.props({ directory: endDir.pull(22), crxHeader }); + }).then(function(d) { + var data = d.directory; + startOffset = d.crxHeader && d.crxHeader.size || 0; + vars = binary.parse(data).word32lu("signature").word16lu("diskNumber").word16lu("diskStart").word16lu("numberOfRecordsOnDisk").word16lu("numberOfRecords").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars; + if (vars.numberOfRecords == 65535 || vars.numberOfRecords == 65535 || vars.offsetToStartOfCentralDirectory == 4294967295) { + const zip64CDLSize = 20; + const zip64CDLOffset = sourceSize - (tailSize - endDir.match + zip64CDLSize); + const zip64CDLStream = PullStream(); + source.stream(zip64CDLOffset).pipe(zip64CDLStream); + return zip64CDLStream.pull(zip64CDLSize).then(function(d2) { + return getZip64CentralDirectory(source, d2); + }).then(function(dir64record) { + vars = parseZip64DirRecord(dir64record); + }); + } else { + vars.offsetToStartOfCentralDirectory += startOffset; + } + }).then(function() { + if (vars.commentLength) return endDir.pull(vars.commentLength).then(function(comment) { + vars.comment = comment.toString("utf8"); + }); + }).then(function() { + source.stream(vars.offsetToStartOfCentralDirectory).pipe(records); + vars.extract = function(opts) { + if (!opts || !opts.path) throw new Error("PATH_MISSING"); + opts.path = path.resolve(path.normalize(opts.path)); + return vars.files.then(function(files) { + return Promise2.map(files, function(entry) { + if (entry.type == "Directory") return; + var extractPath = path.join(opts.path, entry.path); + if (extractPath.indexOf(opts.path) != 0) { + return; + } + var writer = opts.getWriter ? opts.getWriter({ path: extractPath }) : Writer({ path: extractPath }); + return new Promise2(function(resolve, reject) { + entry.stream(opts.password).on("error", reject).pipe(writer).on("close", resolve).on("error", reject); + }); + }, { concurrency: opts.concurrency > 1 ? opts.concurrency : 1 }); + }); + }; + vars.files = Promise2.mapSeries(Array(vars.numberOfRecords), function() { + return records.pull(46).then(function(data) { + var vars2 = binary.parse(data).word32lu("signature").word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars; + vars2.offsetToLocalFileHeader += startOffset; + vars2.lastModifiedDateTime = parseDateTime(vars2.lastModifiedDate, vars2.lastModifiedTime); + return records.pull(vars2.fileNameLength).then(function(fileNameBuffer) { + vars2.pathBuffer = fileNameBuffer; + vars2.path = fileNameBuffer.toString("utf8"); + vars2.isUnicode = (vars2.flags & 2048) != 0; + return records.pull(vars2.extraFieldLength); + }).then(function(extraField) { + vars2.extra = parseExtraField(extraField, vars2); + return records.pull(vars2.fileCommentLength); + }).then(function(comment) { + vars2.comment = comment; + vars2.type = vars2.uncompressedSize === 0 && /[\/\\]$/.test(vars2.path) ? "Directory" : "File"; + vars2.stream = function(_password) { + return unzip(source, vars2.offsetToLocalFileHeader, _password, vars2); + }; + vars2.buffer = function(_password) { + return BufferStream(vars2.stream(_password)); + }; + return vars2; + }); + }); + }); + return Promise2.props(vars); + }); + }; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Open/index.js +var require_Open = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Open/index.js"(exports2, module2) { + var fs = require_graceful_fs(); + var Promise2 = require_bluebird(); + var directory = require_directory(); + var Stream = require("stream"); + if (!Stream.Writable || !Stream.Writable.prototype.destroy) + Stream = require_readable2(); + module2.exports = { + buffer: function(buffer, options) { + var source = { + stream: function(offset, length) { + var stream = Stream.PassThrough(); + stream.end(buffer.slice(offset, length)); + return stream; + }, + size: function() { + return Promise2.resolve(buffer.length); + } + }; + return directory(source, options); + }, + file: function(filename, options) { + var source = { + stream: function(offset, length) { + return fs.createReadStream(filename, { start: offset, end: length && offset + length }); + }, + size: function() { + return new Promise2(function(resolve, reject) { + fs.stat(filename, function(err, d) { + if (err) + reject(err); + else + resolve(d.size); + }); + }); + } + }; + return directory(source, options); + }, + url: function(request, params, options) { + if (typeof params === "string") + params = { url: params }; + if (!params.url) + throw "URL missing"; + params.headers = params.headers || {}; + var source = { + stream: function(offset, length) { + var options2 = Object.create(params); + options2.headers = Object.create(params.headers); + options2.headers.range = "bytes=" + offset + "-" + (length ? length : ""); + return request(options2); + }, + size: function() { + return new Promise2(function(resolve, reject) { + var req = request(params); + req.on("response", function(d) { + req.abort(); + if (!d.headers["content-length"]) + reject(new Error("Missing content length header")); + else + resolve(d.headers["content-length"]); + }).on("error", reject); + }); + } + }; + return directory(source, options); + }, + s3: function(client, params, options) { + var source = { + size: function() { + return new Promise2(function(resolve, reject) { + client.headObject(params, function(err, d) { + if (err) + reject(err); + else + resolve(d.ContentLength); + }); + }); + }, + stream: function(offset, length) { + var d = {}; + for (var key in params) + d[key] = params[key]; + d.Range = "bytes=" + offset + "-" + (length ? length : ""); + return client.getObject(d).createReadStream(); + } + }; + return directory(source, options); + }, + custom: function(source, options) { + return directory(source, options); + } + }; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/unzip.js +var require_unzip2 = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/unzip.js"(exports2) { + "use strict"; + require_listenercount(); + require_buffer_indexof_polyfill(); + require_setImmediate(); + exports2.Parse = require_parse5(); + exports2.ParseOne = require_parseOne(); + exports2.Extract = require_extract2(); + exports2.Open = require_Open(); + } +}); + +// ../../node_modules/.pnpm/tmp@0.2.7/node_modules/tmp/lib/tmp.js +var require_tmp = __commonJS({ + "../../node_modules/.pnpm/tmp@0.2.7/node_modules/tmp/lib/tmp.js"(exports2, module2) { + var fs = require("fs"); + var os2 = require("os"); + var path = require("path"); + var crypto5 = require("crypto"); + var _c = { fs: fs.constants, os: os2.constants }; + var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + var TEMPLATE_PATTERN = /XXXXXX/; + var DEFAULT_TRIES = 3; + var CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR); + var IS_WIN32 = os2.platform() === "win32"; + var EBADF = _c.EBADF || _c.os.errno.EBADF; + var ENOENT = _c.ENOENT || _c.os.errno.ENOENT; + var DIR_MODE = 448; + var FILE_MODE = 384; + var EXIT = "exit"; + var _removeObjects = []; + var FN_RMDIR_SYNC = fs.rmdirSync.bind(fs); + var _gracefulCleanup = false; + function rimraf(dirPath, callback) { + return fs.rm(dirPath, { recursive: true }, callback); + } + function FN_RIMRAF_SYNC(dirPath) { + return fs.rmSync(dirPath, { recursive: true }); + } + function tmpName(options, callback) { + const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; + _assertAndSanitizeOptions(opts, function(err, sanitizedOptions) { + if (err) return cb(err); + let tries = sanitizedOptions.tries; + (function _getUniqueName() { + try { + const name = _generateTmpName(sanitizedOptions); + fs.stat(name, function(err2) { + if (!err2) { + if (tries-- > 0) return _getUniqueName(); + return cb(new Error("Could not get a unique tmp filename, max tries reached " + name)); + } + cb(null, name); + }); + } catch (err2) { + cb(err2); + } + })(); + }); + } + function tmpNameSync(options) { + const args = _parseArguments(options), opts = args[0]; + const sanitizedOptions = _assertAndSanitizeOptionsSync(opts); + let tries = sanitizedOptions.tries; + do { + const name = _generateTmpName(sanitizedOptions); + try { + fs.statSync(name); + } catch (e) { + return name; + } + } while (tries-- > 0); + throw new Error("Could not get a unique tmp filename, max tries reached"); + } + function file2(options, callback) { + const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; + tmpName(opts, function _tmpNameCreated(err, name) { + if (err) return cb(err); + fs.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) { + if (err2) return cb(err2); + if (opts.discardDescriptor) { + return fs.close(fd, function _discardCallback(possibleErr) { + return cb(possibleErr, name, void 0, _prepareTmpFileRemoveCallback(name, -1, opts, false)); + }); + } else { + const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor; + cb(null, name, fd, _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, false)); + } + }); + }); + } + function fileSync(options) { + const args = _parseArguments(options), opts = args[0]; + const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor; + const name = tmpNameSync(opts); + let fd = fs.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE); + if (opts.discardDescriptor) { + fs.closeSync(fd); + fd = void 0; + } + return { + name, + fd, + removeCallback: _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, true) + }; + } + function dir(options, callback) { + const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; + tmpName(opts, function _tmpNameCreated(err, name) { + if (err) return cb(err); + fs.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) { + if (err2) return cb(err2); + cb(null, name, _prepareTmpDirRemoveCallback(name, opts, false)); + }); + }); + } + function dirSync(options) { + const args = _parseArguments(options), opts = args[0]; + const name = tmpNameSync(opts); + fs.mkdirSync(name, opts.mode || DIR_MODE); + return { + name, + removeCallback: _prepareTmpDirRemoveCallback(name, opts, true) + }; + } + function _removeFileAsync(fdPath, next) { + const _handler = function(err) { + if (err && !_isENOENT(err)) { + return next(err); + } + next(); + }; + if (0 <= fdPath[0]) + fs.close(fdPath[0], function() { + fs.unlink(fdPath[1], _handler); + }); + else fs.unlink(fdPath[1], _handler); + } + function _removeFileSync(fdPath) { + let rethrownException = null; + try { + if (0 <= fdPath[0]) fs.closeSync(fdPath[0]); + } catch (e) { + if (!_isEBADF(e) && !_isENOENT(e)) throw e; + } finally { + try { + fs.unlinkSync(fdPath[1]); + } catch (e) { + if (!_isENOENT(e)) rethrownException = e; + } + } + if (rethrownException !== null) { + throw rethrownException; + } + } + function _prepareTmpFileRemoveCallback(name, fd, opts, sync) { + const removeCallbackSync = _prepareRemoveCallback(_removeFileSync, [fd, name], sync); + const removeCallback = _prepareRemoveCallback(_removeFileAsync, [fd, name], sync, removeCallbackSync); + if (!opts.keep) _removeObjects.unshift(removeCallbackSync); + return sync ? removeCallbackSync : removeCallback; + } + function _prepareTmpDirRemoveCallback(name, opts, sync) { + const removeFunction = opts.unsafeCleanup ? rimraf : fs.rmdir.bind(fs); + const removeFunctionSync = opts.unsafeCleanup ? FN_RIMRAF_SYNC : FN_RMDIR_SYNC; + const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name, sync); + const removeCallback = _prepareRemoveCallback(removeFunction, name, sync, removeCallbackSync); + if (!opts.keep) _removeObjects.unshift(removeCallbackSync); + return sync ? removeCallbackSync : removeCallback; + } + function _prepareRemoveCallback(removeFunction, fileOrDirName, sync, cleanupCallbackSync) { + let called = false; + return function _cleanupCallback(next) { + if (!called) { + const toRemove = cleanupCallbackSync || _cleanupCallback; + const index = _removeObjects.indexOf(toRemove); + if (index >= 0) _removeObjects.splice(index, 1); + called = true; + if (sync || removeFunction === FN_RMDIR_SYNC || removeFunction === FN_RIMRAF_SYNC) { + return removeFunction(fileOrDirName); + } else { + return removeFunction(fileOrDirName, next || function() { + }); + } + } + }; + } + function _garbageCollector() { + if (!_gracefulCleanup) return; + while (_removeObjects.length) { + try { + _removeObjects[0](); + } catch (e) { + } + } + } + function _randomChars(howMany) { + let value = [], rnd = null; + try { + rnd = crypto5.randomBytes(howMany); + } catch (e) { + rnd = crypto5.pseudoRandomBytes(howMany); + } + for (let i = 0; i < howMany; i++) { + value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]); + } + return value.join(""); + } + function _isUndefined(obj2) { + return typeof obj2 === "undefined"; + } + function _parseArguments(options, callback) { + if (typeof options === "function") { + return [{}, options]; + } + if (_isUndefined(options)) { + return [{}, callback]; + } + const actualOptions = {}; + for (const key of Object.getOwnPropertyNames(options)) { + actualOptions[key] = options[key]; + } + return [actualOptions, callback]; + } + function _resolvePath(name, tmpDir, cb) { + const pathToResolve = path.isAbsolute(name) ? name : path.join(tmpDir, name); + fs.stat(pathToResolve, function(err) { + if (err) { + fs.realpath(path.dirname(pathToResolve), function(err2, parentDir) { + if (err2) return cb(err2); + cb(null, path.join(parentDir, path.basename(pathToResolve))); + }); + } else { + fs.realpath(pathToResolve, cb); + } + }); + } + function _resolvePathSync(name, tmpDir) { + const pathToResolve = path.isAbsolute(name) ? name : path.join(tmpDir, name); + try { + fs.statSync(pathToResolve); + return fs.realpathSync(pathToResolve); + } catch (_err) { + const parentDir = fs.realpathSync(path.dirname(pathToResolve)); + return path.join(parentDir, path.basename(pathToResolve)); + } + } + function _generateTmpName(opts) { + const tmpDir = opts.tmpdir; + if (!_isUndefined(opts.name)) { + return path.join(tmpDir, opts.dir, opts.name); + } + if (!_isUndefined(opts.template)) { + return path.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); + } + const name = [ + opts.prefix ? opts.prefix : "tmp", + "-", + process.pid, + "-", + _randomChars(12), + opts.postfix ? "-" + opts.postfix : "" + ].join(""); + return path.join(tmpDir, opts.dir, name); + } + function _assertPath(option, value) { + if (typeof value !== "string") { + throw new Error(`${option} option must be a string, got "${typeof value}".`); + } + if (value.includes("..")) { + throw new Error("Relative value not allowed"); + } + return value; + } + function _assertOptionsBase(options) { + if (!_isUndefined(options.name)) { + const name = options.name; + if (path.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); + const basename = path.basename(name); + if (basename === ".." || basename === "." || basename !== name) { + throw new Error(`name option must not contain a path, found "${name}".`); + } + } + if (!_isUndefined(options.template)) { + if (typeof options.template !== "string") { + throw new Error(`template option must be a string, got "${typeof options.template}".`); + } + if (!options.template.match(TEMPLATE_PATTERN)) { + throw new Error(`Invalid template, found "${options.template}".`); + } + } + if (!_isUndefined(options.tries) && isNaN(options.tries) || options.tries < 0) { + throw new Error(`Invalid tries, found "${options.tries}".`); + } + options.tries = _isUndefined(options.name) ? options.tries || DEFAULT_TRIES : 1; + options.keep = !!options.keep; + options.detachDescriptor = !!options.detachDescriptor; + options.discardDescriptor = !!options.discardDescriptor; + options.unsafeCleanup = !!options.unsafeCleanup; + options.prefix = _isUndefined(options.prefix) ? "" : _assertPath("prefix", options.prefix); + options.postfix = _isUndefined(options.postfix) ? "" : _assertPath("postfix", options.postfix); + options.template = _isUndefined(options.template) ? void 0 : _assertPath("template", options.template); + } + function _getRelativePath(option, name, tmpDir, cb) { + if (_isUndefined(name)) return cb(null); + _resolvePath(name, tmpDir, function(err, resolvedPath) { + if (err) return cb(err); + const relativePath = path.relative(tmpDir, resolvedPath); + if (relativePath.startsWith("..") || path.isAbsolute(relativePath)) { + return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`)); + } + cb(null, relativePath); + }); + } + function _getRelativePathSync(option, name, tmpDir) { + if (_isUndefined(name)) return; + const resolvedPath = _resolvePathSync(name, tmpDir); + const relativePath = path.relative(tmpDir, resolvedPath); + if (relativePath.startsWith("..") || path.isAbsolute(relativePath)) { + throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`); + } + return relativePath; + } + function _assertAndSanitizeOptions(options, cb) { + _getTmpDir(options, function(err, tmpDir) { + if (err) return cb(err); + options.tmpdir = tmpDir; + try { + _assertOptionsBase(options, tmpDir); + } catch (err2) { + return cb(err2); + } + _getRelativePath("dir", options.dir, tmpDir, function(err2, dir2) { + if (err2) return cb(err2); + options.dir = _isUndefined(dir2) ? "" : dir2; + _getRelativePath("template", options.template, tmpDir, function(err3, template) { + if (err3) return cb(err3); + options.template = template; + cb(null, options); + }); + }); + }); + } + function _assertAndSanitizeOptionsSync(options) { + const tmpDir = options.tmpdir = _getTmpDirSync(options); + _assertOptionsBase(options, tmpDir); + const dir2 = _getRelativePathSync("dir", options.dir, tmpDir); + options.dir = _isUndefined(dir2) ? "" : dir2; + options.template = _getRelativePathSync("template", options.template, tmpDir); + return options; + } + function _isEBADF(error) { + return _isExpectedError(error, -EBADF, "EBADF"); + } + function _isENOENT(error) { + return _isExpectedError(error, -ENOENT, "ENOENT"); + } + function _isExpectedError(error, errno, code) { + return IS_WIN32 ? error.code === code : error.code === code && error.errno === errno; + } + function setGracefulCleanup() { + _gracefulCleanup = true; + } + function _getTmpDir(options, cb) { + return fs.realpath(options && options.tmpdir || os2.tmpdir(), cb); + } + function _getTmpDirSync(options) { + return fs.realpathSync(options && options.tmpdir || os2.tmpdir()); + } + process.addListener(EXIT, _garbageCollector); + Object.defineProperty(module2.exports, "tmpdir", { + enumerable: true, + configurable: false, + get: function() { + return _getTmpDirSync(); + } + }); + module2.exports.dir = dir; + module2.exports.dirSync = dirSync; + module2.exports.file = file2; + module2.exports.fileSync = fileSync; + module2.exports.tmpName = tmpName; + module2.exports.tmpNameSync = tmpNameSync; + module2.exports.setGracefulCleanup = setGracefulCleanup; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/iterate-stream.js +var require_iterate_stream = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/iterate-stream.js"(exports2, module2) { + module2.exports = async function* iterateStream(stream) { + const contents = []; + stream.on("data", (data) => contents.push(data)); + let resolveStreamEndedPromise; + const streamEndedPromise = new Promise((resolve) => resolveStreamEndedPromise = resolve); + let ended = false; + stream.on("end", () => { + ended = true; + resolveStreamEndedPromise(); + }); + let error = false; + stream.on("error", (err) => { + error = err; + resolveStreamEndedPromise(); + }); + while (!ended || contents.length > 0) { + if (contents.length === 0) { + stream.resume(); + await Promise.race([once(stream, "data"), streamEndedPromise]); + } else { + stream.pause(); + const data = contents.shift(); + yield data; + } + if (error) throw error; + } + resolveStreamEndedPromise(); + }; + function once(eventEmitter, type) { + return new Promise((resolve) => { + let fired = false; + const handler = () => { + if (!fired) { + fired = true; + eventEmitter.removeListener(type, handler); + resolve(); + } + }; + eventEmitter.addListener(type, handler); + }); + } + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/worksheet-reader.js +var require_worksheet_reader = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/worksheet-reader.js"(exports2, module2) { + var { EventEmitter } = require("events"); + var parseSax = require_parse_sax(); + var _2 = require_under_dash(); + var utils = require_utils21(); + var colCache = require_col_cache(); + var Dimensions = require_range4(); + var Row = require_row(); + var Column = require_column(); + var WorksheetReader = class extends EventEmitter { + constructor({ workbook, id, iterator, options }) { + super(); + this.workbook = workbook; + this.id = id; + this.iterator = iterator; + this.options = options || {}; + this.name = `Sheet${this.id}`; + this._columns = null; + this._keys = {}; + this._dimensions = new Dimensions(); + } + // destroy - not a valid operation for a streaming writer + // even though some streamers might be able to, it's a bad idea. + destroy() { + throw new Error("Invalid Operation: destroy"); + } + // return the current dimensions of the writer + get dimensions() { + return this._dimensions; + } + // ========================================================================= + // Columns + // get the current columns array. + get columns() { + return this._columns; + } + // get a single column by col number. If it doesn't exist, it and any gaps before it + // are created. + getColumn(c) { + if (typeof c === "string") { + const col = this._keys[c]; + if (col) { + return col; + } + c = colCache.l2n(c); + } + if (!this._columns) { + this._columns = []; + } + if (c > this._columns.length) { + let n = this._columns.length + 1; + while (n <= c) { + this._columns.push(new Column(this, n++)); + } + } + return this._columns[c - 1]; + } + getColumnKey(key) { + return this._keys[key]; + } + setColumnKey(key, value) { + this._keys[key] = value; + } + deleteColumnKey(key) { + delete this._keys[key]; + } + eachColumnKey(f) { + _2.each(this._keys, f); + } + async read() { + try { + for await (const events of this.parse()) { + for (const { eventType, value } of events) { + this.emit(eventType, value); + } + } + this.emit("finished"); + } catch (error) { + this.emit("error", error); + } + } + async *[Symbol.asyncIterator]() { + for await (const events of this.parse()) { + for (const { eventType, value } of events) { + if (eventType === "row") { + yield value; + } + } + } + } + async *parse() { + const { iterator, options } = this; + let emitSheet = false; + let emitHyperlinks = false; + let hyperlinks = null; + switch (options.worksheets) { + case "emit": + emitSheet = true; + break; + case "prep": + break; + default: + break; + } + switch (options.hyperlinks) { + case "emit": + emitHyperlinks = true; + break; + case "cache": + this.hyperlinks = hyperlinks = {}; + break; + default: + break; + } + if (!emitSheet && !emitHyperlinks && !hyperlinks) { + return; + } + const { sharedStrings, styles, properties } = this.workbook; + let inCols = false; + let inRows = false; + let inHyperlinks = false; + let cols = null; + let row = null; + let c = null; + let current = null; + for await (const events of parseSax(iterator)) { + const worksheetEvents = []; + for (const { eventType, value } of events) { + if (eventType === "opentag") { + const node = value; + if (emitSheet) { + switch (node.name) { + case "cols": + inCols = true; + cols = []; + break; + case "sheetData": + inRows = true; + break; + case "col": + if (inCols) { + cols.push({ + min: parseInt(node.attributes.min, 10), + max: parseInt(node.attributes.max, 10), + width: parseFloat(node.attributes.width), + styleId: parseInt(node.attributes.style || "0", 10) + }); + } + break; + case "row": + if (inRows) { + const r = parseInt(node.attributes.r, 10); + row = new Row(this, r); + if (node.attributes.ht) { + row.height = parseFloat(node.attributes.ht); + } + if (node.attributes.s) { + const styleId = parseInt(node.attributes.s, 10); + const style = styles.getStyleModel(styleId); + if (style) { + row.style = style; + } + } + } + break; + case "c": + if (row) { + c = { + ref: node.attributes.r, + s: parseInt(node.attributes.s, 10), + t: node.attributes.t + }; + } + break; + case "f": + if (c) { + current = c.f = { text: "" }; + } + break; + case "v": + if (c) { + current = c.v = { text: "" }; + } + break; + case "is": + case "t": + if (c) { + current = c.v = { text: "" }; + } + break; + case "mergeCell": + break; + default: + break; + } + } + if (emitHyperlinks || hyperlinks) { + switch (node.name) { + case "hyperlinks": + inHyperlinks = true; + break; + case "hyperlink": + if (inHyperlinks) { + const hyperlink = { + ref: node.attributes.ref, + rId: node.attributes["r:id"] + }; + if (emitHyperlinks) { + worksheetEvents.push({ eventType: "hyperlink", value: hyperlink }); + } else { + hyperlinks[hyperlink.ref] = hyperlink; + } + } + break; + default: + break; + } + } + } else if (eventType === "text") { + if (emitSheet) { + if (current) { + current.text += value; + } + } + } else if (eventType === "closetag") { + const node = value; + if (emitSheet) { + switch (node.name) { + case "cols": + inCols = false; + this._columns = Column.fromModel(cols); + break; + case "sheetData": + inRows = false; + break; + case "row": + this._dimensions.expandRow(row); + worksheetEvents.push({ eventType: "row", value: row }); + row = null; + break; + case "c": + if (row && c) { + const address = colCache.decodeAddress(c.ref); + const cell = row.getCell(address.col); + if (c.s) { + const style = styles.getStyleModel(c.s); + if (style) { + cell.style = style; + } + } + if (c.f) { + const cellValue = { + formula: c.f.text + }; + if (c.v) { + if (c.t === "str") { + cellValue.result = utils.xmlDecode(c.v.text); + } else { + cellValue.result = parseFloat(c.v.text); + } + } + cell.value = cellValue; + } else if (c.v) { + switch (c.t) { + case "s": { + const index = parseInt(c.v.text, 10); + if (sharedStrings) { + cell.value = sharedStrings[index]; + } else { + cell.value = { + sharedString: index + }; + } + break; + } + case "inlineStr": + case "str": + cell.value = utils.xmlDecode(c.v.text); + break; + case "e": + cell.value = { error: c.v.text }; + break; + case "b": + cell.value = parseInt(c.v.text, 10) !== 0; + break; + default: + if (utils.isDateFmt(cell.numFmt)) { + cell.value = utils.excelToDate( + parseFloat(c.v.text), + properties.model && properties.model.date1904 + ); + } else { + cell.value = parseFloat(c.v.text); + } + break; + } + } + if (hyperlinks) { + const hyperlink = hyperlinks[c.ref]; + if (hyperlink) { + cell.text = cell.value; + cell.value = void 0; + cell.hyperlink = hyperlink; + } + } + c = null; + } + break; + default: + break; + } + } + if (emitHyperlinks || hyperlinks) { + switch (node.name) { + case "hyperlinks": + inHyperlinks = false; + break; + default: + break; + } + } + } + } + if (worksheetEvents.length > 0) { + yield worksheetEvents; + } + } + } + }; + module2.exports = WorksheetReader; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/hyperlink-reader.js +var require_hyperlink_reader = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/hyperlink-reader.js"(exports2, module2) { + var { EventEmitter } = require("events"); + var parseSax = require_parse_sax(); + var Enums = require_enums5(); + var RelType = require_rel_type(); + var HyperlinkReader = class extends EventEmitter { + constructor({ workbook, id, iterator, options }) { + super(); + this.workbook = workbook; + this.id = id; + this.iterator = iterator; + this.options = options; + } + get count() { + return this.hyperlinks && this.hyperlinks.length || 0; + } + each(fn) { + return this.hyperlinks.forEach(fn); + } + async read() { + const { iterator, options } = this; + let emitHyperlinks = false; + let hyperlinks = null; + switch (options.hyperlinks) { + case "emit": + emitHyperlinks = true; + break; + case "cache": + this.hyperlinks = hyperlinks = {}; + break; + default: + break; + } + if (!emitHyperlinks && !hyperlinks) { + this.emit("finished"); + return; + } + try { + for await (const events of parseSax(iterator)) { + for (const { eventType, value } of events) { + if (eventType === "opentag") { + const node = value; + if (node.name === "Relationship") { + const rId = node.attributes.Id; + switch (node.attributes.Type) { + case RelType.Hyperlink: + { + const relationship = { + type: Enums.RelationshipType.Styles, + rId, + target: node.attributes.Target, + targetMode: node.attributes.TargetMode + }; + if (emitHyperlinks) { + this.emit("hyperlink", relationship); + } else { + hyperlinks[relationship.rId] = relationship; + } + } + break; + default: + break; + } + } + } + } + } + this.emit("finished"); + } catch (error) { + this.emit("error", error); + } + } + }; + module2.exports = HyperlinkReader; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/workbook-reader.js +var require_workbook_reader = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/workbook-reader.js"(exports2, module2) { + var fs = require("fs"); + var { EventEmitter } = require("events"); + var { PassThrough, Readable } = require_readable(); + var nodeStream = require("stream"); + var unzip = require_unzip2(); + var tmp = require_tmp(); + var iterateStream = require_iterate_stream(); + var parseSax = require_parse_sax(); + var StyleManager = require_styles_xform(); + var WorkbookXform = require_workbook_xform(); + var RelationshipsXform = require_relationships_xform(); + var WorksheetReader = require_worksheet_reader(); + var HyperlinkReader = require_hyperlink_reader(); + tmp.setGracefulCleanup(); + var WorkbookReader = class extends EventEmitter { + constructor(input, options = {}) { + super(); + this.input = input; + this.options = { + worksheets: "emit", + sharedStrings: "cache", + hyperlinks: "ignore", + styles: "ignore", + entries: "ignore", + ...options + }; + this.styles = new StyleManager(); + this.styles.init(); + } + _getStream(input) { + if (input instanceof nodeStream.Readable || input instanceof Readable) { + return input; + } + if (typeof input === "string") { + return fs.createReadStream(input); + } + throw new Error(`Could not recognise input: ${input}`); + } + async read(input, options) { + try { + for await (const { eventType, value } of this.parse(input, options)) { + switch (eventType) { + case "shared-strings": + this.emit(eventType, value); + break; + case "worksheet": + this.emit(eventType, value); + await value.read(); + break; + case "hyperlinks": + this.emit(eventType, value); + break; + } + } + this.emit("end"); + this.emit("finished"); + } catch (error) { + this.emit("error", error); + } + } + async *[Symbol.asyncIterator]() { + for await (const { eventType, value } of this.parse()) { + if (eventType === "worksheet") { + yield value; + } + } + } + async *parse(input, options) { + if (options) this.options = options; + const stream = this.stream = this._getStream(input || this.input); + const zip = unzip.Parse({ forceStream: true }); + stream.pipe(zip); + const waitingWorkSheets = []; + for await (const entry of iterateStream(zip)) { + let match; + let sheetNo; + switch (entry.path) { + case "_rels/.rels": + break; + case "xl/_rels/workbook.xml.rels": + await this._parseRels(entry); + break; + case "xl/workbook.xml": + await this._parseWorkbook(entry); + break; + case "xl/sharedStrings.xml": + yield* this._parseSharedStrings(entry); + break; + case "xl/styles.xml": + await this._parseStyles(entry); + break; + default: + if (entry.path.match(/xl\/worksheets\/sheet\d+[.]xml/)) { + match = entry.path.match(/xl\/worksheets\/sheet(\d+)[.]xml/); + sheetNo = match[1]; + if (this.sharedStrings && this.workbookRels) { + yield* this._parseWorksheet(iterateStream(entry), sheetNo); + } else { + await new Promise((resolve, reject) => { + tmp.file((err, path, fd, tempFileCleanupCallback) => { + if (err) { + return reject(err); + } + waitingWorkSheets.push({ sheetNo, path, tempFileCleanupCallback }); + const tempStream = fs.createWriteStream(path); + tempStream.on("error", reject); + entry.pipe(tempStream); + return tempStream.on("finish", () => { + return resolve(); + }); + }); + }); + } + } else if (entry.path.match(/xl\/worksheets\/_rels\/sheet\d+[.]xml.rels/)) { + match = entry.path.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/); + sheetNo = match[1]; + yield* this._parseHyperlinks(iterateStream(entry), sheetNo); + } + break; + } + entry.autodrain(); + } + for (const { sheetNo, path, tempFileCleanupCallback } of waitingWorkSheets) { + let fileStream = fs.createReadStream(path); + if (!fileStream[Symbol.asyncIterator]) { + fileStream = fileStream.pipe(new PassThrough()); + } + yield* this._parseWorksheet(fileStream, sheetNo); + tempFileCleanupCallback(); + } + } + _emitEntry(payload) { + if (this.options.entries === "emit") { + this.emit("entry", payload); + } + } + async _parseRels(entry) { + const xform = new RelationshipsXform(); + this.workbookRels = await xform.parseStream(iterateStream(entry)); + } + async _parseWorkbook(entry) { + this._emitEntry({ type: "workbook" }); + const workbook = new WorkbookXform(); + await workbook.parseStream(iterateStream(entry)); + this.properties = workbook.map.workbookPr; + this.model = workbook.model; + } + async *_parseSharedStrings(entry) { + this._emitEntry({ type: "shared-strings" }); + switch (this.options.sharedStrings) { + case "cache": + this.sharedStrings = []; + break; + case "emit": + break; + default: + return; + } + let text = null; + let richText = []; + let index = 0; + let font = null; + for await (const events of parseSax(iterateStream(entry))) { + for (const { eventType, value } of events) { + if (eventType === "opentag") { + const node = value; + switch (node.name) { + case "b": + font = font || {}; + font.bold = true; + break; + case "charset": + font = font || {}; + font.charset = parseInt(node.attributes.charset, 10); + break; + case "color": + font = font || {}; + font.color = {}; + if (node.attributes.rgb) { + font.color.argb = node.attributes.argb; + } + if (node.attributes.val) { + font.color.argb = node.attributes.val; + } + if (node.attributes.theme) { + font.color.theme = node.attributes.theme; + } + break; + case "family": + font = font || {}; + font.family = parseInt(node.attributes.val, 10); + break; + case "i": + font = font || {}; + font.italic = true; + break; + case "outline": + font = font || {}; + font.outline = true; + break; + case "rFont": + font = font || {}; + font.name = node.value; + break; + case "si": + font = null; + richText = []; + text = null; + break; + case "sz": + font = font || {}; + font.size = parseInt(node.attributes.val, 10); + break; + case "strike": + break; + case "t": + text = null; + break; + case "u": + font = font || {}; + font.underline = true; + break; + case "vertAlign": + font = font || {}; + font.vertAlign = node.attributes.val; + break; + } + } else if (eventType === "text") { + text = text ? text + value : value; + } else if (eventType === "closetag") { + const node = value; + switch (node.name) { + case "r": + richText.push({ + font, + text + }); + font = null; + text = null; + break; + case "si": + if (this.options.sharedStrings === "cache") { + this.sharedStrings.push(richText.length ? { richText } : text); + } else if (this.options.sharedStrings === "emit") { + yield { index: index++, text: richText.length ? { richText } : text }; + } + richText = []; + font = null; + text = null; + break; + } + } + } + } + } + async _parseStyles(entry) { + this._emitEntry({ type: "styles" }); + if (this.options.styles === "cache") { + this.styles = new StyleManager(); + await this.styles.parseStream(iterateStream(entry)); + } + } + *_parseWorksheet(iterator, sheetNo) { + this._emitEntry({ type: "worksheet", id: sheetNo }); + const worksheetReader = new WorksheetReader({ + workbook: this, + id: sheetNo, + iterator, + options: this.options + }); + const matchingRel = (this.workbookRels || []).find((rel) => rel.Target === `worksheets/sheet${sheetNo}.xml`); + const matchingSheet = matchingRel && (this.model.sheets || []).find((sheet) => sheet.rId === matchingRel.Id); + if (matchingSheet) { + worksheetReader.id = matchingSheet.id; + worksheetReader.name = matchingSheet.name; + worksheetReader.state = matchingSheet.state; + } + if (this.options.worksheets === "emit") { + yield { eventType: "worksheet", value: worksheetReader }; + } + } + *_parseHyperlinks(iterator, sheetNo) { + this._emitEntry({ type: "hyperlinks", id: sheetNo }); + const hyperlinksReader = new HyperlinkReader({ + workbook: this, + id: sheetNo, + iterator, + options: this.options + }); + if (this.options.hyperlinks === "emit") { + yield { eventType: "hyperlinks", value: hyperlinksReader }; + } + } + }; + WorkbookReader.Options = { + worksheets: ["emit", "ignore"], + sharedStrings: ["cache", "emit", "ignore"], + hyperlinks: ["cache", "emit", "ignore"], + styles: ["cache", "ignore"], + entries: ["emit", "ignore"] + }; + module2.exports = WorkbookReader; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/exceljs.nodejs.js +var require_exceljs_nodejs = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/exceljs.nodejs.js"(exports2, module2) { + var ExcelJS = { + Workbook: require_workbook(), + ModelContainer: require_modelcontainer(), + stream: { + xlsx: { + WorkbookWriter: require_workbook_writer(), + WorkbookReader: require_workbook_reader() + } + } + }; + Object.assign(ExcelJS, require_enums5()); + module2.exports = ExcelJS; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/excel.js +var require_excel = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/excel.js"(exports2, module2) { + if (parseInt(process.versions.node.split(".")[0], 10) < 10) { + throw new Error( + "For node versions older than 10, please use the ES5 Import: https://github.com/exceljs/exceljs#es5-imports" + ); + } + module2.exports = require_exceljs_nodejs(); + } +}); + +// dist/src/modules/report/report.service.js +var require_report_service = __commonJS({ + "dist/src/modules/report/report.service.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ReportService = void 0; + var common_12 = require_common(); + var ExcelJS = require_excel(); + var prisma_service_12 = require_prisma_service(); + var ReportService = class ReportService { + constructor(prisma) { + this.prisma = prisma; + } + async getDashboardStats() { + const todayStart = /* @__PURE__ */ new Date(); + todayStart.setHours(0, 0, 0, 0); + const [totalUsers, todayUsers, totalSpins, todaySpins, totalWinners, totalDistributedPrizes, consumedChancesAggr, activePrizesCount, activeCampaignsCount, activeCampaignsList, recentWinners] = await Promise.all([ + this.prisma.user.count(), + this.prisma.user.count({ where: { createdAt: { gte: todayStart } } }), + this.prisma.spin.count(), + this.prisma.spin.count({ where: { createdAt: { gte: todayStart } } }), + this.prisma.userPrize.count(), + this.prisma.userPrize.count({ + where: { status: { in: ["DELIVERED", "USED"] } } + }), + this.prisma.chanceTransaction.aggregate({ + where: { type: "SPIN_CONSUME" }, + _sum: { amount: true } + }), + this.prisma.prize.count({ where: { status: "ACTIVE" } }), + this.prisma.campaign.count({ where: { status: "ACTIVE" } }), + this.prisma.campaign.findMany({ + where: { status: "ACTIVE" }, + take: 4, + orderBy: { createdAt: "desc" }, + select: { + id: true, + title: true, + slug: true, + status: true, + startAt: true, + endAt: true, + wheelDesign: true, + _count: { + select: { + spins: true, + userPrizes: true, + prizes: true + } + } + } + }), + this.prisma.userPrize.findMany({ + take: 10, + orderBy: { wonAt: "desc" }, + include: { + user: { select: { id: true, mobile: true, name: true } }, + prize: { select: { title: true, type: true, image: true } }, + campaign: { select: { id: true, title: true } } + } + }) + ]); + const fourteenDaysAgo = /* @__PURE__ */ new Date(); + fourteenDaysAgo.setDate(fourteenDaysAgo.getDate() - 14); + fourteenDaysAgo.setHours(0, 0, 0, 0); + const recentSpins = await this.prisma.spin.findMany({ + where: { createdAt: { gte: fourteenDaysAgo } }, + select: { createdAt: true, prizeId: true } + }); + const dayMap = {}; + for (let i = 0; i < 14; i++) { + const d = /* @__PURE__ */ new Date(); + d.setDate(d.getDate() - (13 - i)); + const key = d.toISOString().slice(0, 10); + dayMap[key] = { spins: 0, winners: 0 }; + } + recentSpins.forEach((s) => { + const key = s.createdAt.toISOString().slice(0, 10); + if (dayMap[key]) { + dayMap[key].spins++; + if (s.prizeId) { + dayMap[key].winners++; + } + } + }); + const spinsByDay = Object.entries(dayMap).map(([date, data]) => ({ + date, + spins: data.spins, + winners: data.winners + })); + const prizesWithWins = await this.prisma.userPrize.groupBy({ + by: ["prizeId"], + _count: { id: true } + }); + const prizeDetails = await this.prisma.prize.findMany({ + where: { id: { in: prizesWithWins.map((p) => p.prizeId) } }, + select: { id: true, title: true } + }); + const prizeTitleMap = new Map(prizeDetails.map((p) => [p.id, p.title])); + const totalWon = prizesWithWins.reduce((sum, p) => sum + p._count.id, 0); + const prizeDistribution = prizesWithWins.map((p) => ({ + prizeTitle: prizeTitleMap.get(p.prizeId) || "\u0646\u0627\u0645\u0634\u062E\u0635", + count: p._count.id, + percentage: totalWon > 0 ? Number((p._count.id / totalWon * 100).toFixed(1)) : 0 + })); + const winRate = totalSpins > 0 ? Number((totalWinners / totalSpins * 100).toFixed(1)) : 0; + return { + stats: { + totalUsers, + todayUsers, + totalSpins, + todaySpins, + totalWinners, + totalDistributedPrizes, + consumedChances: Math.abs(consumedChancesAggr._sum.amount || 0), + activePrizesCount, + activeCampaignsCount, + winRate + }, + activeCampaigns: activeCampaignsList, + spinsByDay, + prizeDistribution, + recentWinners + }; + } + async getParticipationReport(query) { + const where = {}; + if (query.campaignId) + where.campaignId = query.campaignId; + if (query.from || query.to) { + where.createdAt = {}; + if (query.from) + where.createdAt.gte = new Date(query.from); + if (query.to) + where.createdAt.lte = new Date(query.to); + } + const [totalSpins, winnersCount, userCampaigns] = await Promise.all([ + this.prisma.spin.count({ where }), + this.prisma.userPrize.count({ + where: { + ...query.campaignId ? { campaignId: query.campaignId } : {}, + ...query.from || query.to ? { + wonAt: { + ...query.from ? { gte: new Date(query.from) } : {}, + ...query.to ? { lte: new Date(query.to) } : {} + } + } : {} + } + }), + this.prisma.userCampaign.findMany({ + where: query.campaignId ? { campaignId: query.campaignId } : {}, + select: { totalChances: true, usedChances: true } + }) + ]); + const totalChancesAllocated = userCampaigns.reduce((sum, c) => sum + c.totalChances, 0); + const totalChancesUsed = userCampaigns.reduce((sum, c) => sum + c.usedChances, 0); + const zeroSpinUsers = userCampaigns.filter((c) => c.usedChances === 0).length; + const remainingChanceUsers = userCampaigns.filter((c) => c.totalChances > c.usedChances).length; + return { + totalSpins, + winnersCount, + totalChancesAllocated, + totalChancesUsed, + zeroSpinUsers, + remainingChanceUsers + }; + } + async exportParticipationExcel(query) { + const report = await this.getParticipationReport(query); + const workbook = new ExcelJS.Workbook(); + const worksheet = workbook.addWorksheet("\u06AF\u0632\u0627\u0631\u0634 \u0645\u0634\u0627\u0631\u06A9\u062A"); + worksheet.columns = [ + { header: "\u0634\u0627\u062E\u0635 KPI", key: "metric", width: 35 }, + { header: "\u0645\u0642\u062F\u0627\u0631", key: "value", width: 20 } + ]; + worksheet.addRow({ metric: "\u062A\u0639\u062F\u0627\u062F \u06A9\u0644 \u0686\u0631\u062E\u0634\u200C\u0647\u0627 (Spins)", value: report.totalSpins }); + worksheet.addRow({ metric: "\u062A\u0639\u062F\u0627\u062F \u062C\u0648\u0627\u06CC\u0632 \u0628\u0631\u0646\u062F\u0647 \u0634\u062F\u0647", value: report.winnersCount }); + worksheet.addRow({ metric: "\u06A9\u0644 \u0634\u0627\u0646\u0633\u200C\u0647\u0627\u06CC \u062A\u062E\u0635\u06CC\u0635 \u06CC\u0627\u0641\u062A\u0647", value: report.totalChancesAllocated }); + worksheet.addRow({ metric: "\u06A9\u0644 \u0634\u0627\u0646\u0633\u200C\u0647\u0627\u06CC \u0645\u0635\u0631\u0641 \u0634\u062F\u0647", value: report.totalChancesUsed }); + worksheet.addRow({ metric: "\u06A9\u0627\u0631\u0628\u0631\u0627\u0646 \u0628\u062F\u0648\u0646 \u0686\u0631\u062E\u0634 (Zero Spin)", value: report.zeroSpinUsers }); + worksheet.addRow({ metric: "\u06A9\u0627\u0631\u0628\u0631\u0627\u0646 \u0628\u0627 \u0634\u0627\u0646\u0633 \u0628\u0627\u0642\u06CC\u200C\u0645\u0627\u0646\u062F\u0647", value: report.remainingChanceUsers }); + return workbook.xlsx.writeBuffer(); + } + }; + exports2.ReportService = ReportService; + exports2.ReportService = ReportService = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", [prisma_service_12.PrismaService]) + ], ReportService); + } +}); + +// dist/src/modules/report/admin-report.controller.js +var require_admin_report_controller = __commonJS({ + "dist/src/modules/report/admin-report.controller.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminReportController = void 0; + var common_12 = require_common(); + var swagger_12 = require_swagger(); + var jwt_admin_guard_1 = require_jwt_admin_guard(); + var report_service_1 = require_report_service(); + var AdminReportController = class AdminReportController { + constructor(reportService) { + this.reportService = reportService; + } + async getDashboard() { + return this.reportService.getDashboardStats(); + } + async getParticipation(query) { + return this.reportService.getParticipationReport(query); + } + async exportExcel(query, res) { + const buffer = await this.reportService.exportParticipationExcel(query); + res.send(buffer); + } + }; + exports2.AdminReportController = AdminReportController; + __decorate2([ + (0, common_12.Get)("dashboard"), + (0, swagger_12.ApiOperation)({ summary: "\u062F\u0631\u06CC\u0627\u0641\u062A \u062A\u0645\u0627\u0645 \u0622\u0645\u0627\u0631\u0647\u0627\u06CC \u062A\u062C\u0645\u06CC\u0639\u06CC \u062F\u0627\u0634\u0628\u0648\u0631\u062F \u0627\u0635\u0644\u06CC\u060C \u0686\u0627\u0631\u062A\u200C\u0647\u0627\u06CC \u0631\u0648\u0632\u0627\u0646\u0647 \u0648 \u0622\u062E\u0631\u06CC\u0646 \u0628\u0631\u0646\u062F\u06AF\u0627\u0646" }), + (0, swagger_12.ApiResponse)({ status: 200, description: "\u0634\u0627\u062E\u0635\u200C\u0647\u0627\u06CC KPI \u062F\u0627\u0634\u0628\u0648\u0631\u062F" }), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", []), + __metadata2("design:returntype", Promise) + ], AdminReportController.prototype, "getDashboard", null); + __decorate2([ + (0, common_12.Get)("participation"), + (0, swagger_12.ApiOperation)({ summary: "\u06AF\u0632\u0627\u0631\u0634 \u0645\u0634\u0627\u0631\u06A9\u062A \u06A9\u0627\u0631\u0628\u0631\u0627\u0646 \u0648 \u062A\u062D\u0644\u06CC\u0644 \u0634\u0627\u0646\u0633\u200C\u0647\u0627 \u0628\u0627 \u0641\u06CC\u0644\u062A\u0631 \u0628\u0627\u0632\u0647 \u0632\u0645\u0627\u0646\u06CC" }), + (0, swagger_12.ApiQuery)({ name: "from", required: false }), + (0, swagger_12.ApiQuery)({ name: "to", required: false }), + (0, swagger_12.ApiQuery)({ name: "campaignId", required: false }), + __param2(0, (0, common_12.Query)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [Object]), + __metadata2("design:returntype", Promise) + ], AdminReportController.prototype, "getParticipation", null); + __decorate2([ + (0, common_12.Get)("export"), + (0, swagger_12.ApiOperation)({ summary: "\u062E\u0631\u0648\u062C\u06CC \u0627\u06A9\u0633\u0644 \u06AF\u0632\u0627\u0631\u0634 \u0645\u0634\u0627\u0631\u06A9\u062A" }), + (0, common_12.Header)("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"), + (0, common_12.Header)("Content-Disposition", "attachment; filename=participation-report.xlsx"), + __param2(0, (0, common_12.Query)()), + __param2(1, (0, common_12.Res)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [Object, Object]), + __metadata2("design:returntype", Promise) + ], AdminReportController.prototype, "exportExcel", null); + exports2.AdminReportController = AdminReportController = __decorate2([ + (0, swagger_12.ApiTags)("Admin Reports (\u06AF\u0632\u0627\u0631\u0634\u200C\u06AF\u06CC\u0631\u06CC \u0648 \u062F\u0627\u0634\u0628\u0648\u0631\u062F)"), + (0, common_12.Controller)("admin/reports"), + (0, common_12.UseGuards)(jwt_admin_guard_1.JwtAdminGuard), + (0, swagger_12.ApiBearerAuth)("AdminAuth"), + __metadata2("design:paramtypes", [report_service_1.ReportService]) + ], AdminReportController); + } +}); + +// dist/src/modules/report/report.module.js +var require_report_module = __commonJS({ + "dist/src/modules/report/report.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ReportModule = void 0; + var common_12 = require_common(); + var admin_report_controller_1 = require_admin_report_controller(); + var report_service_1 = require_report_service(); + var ReportModule = class ReportModule { + }; + exports2.ReportModule = ReportModule; + exports2.ReportModule = ReportModule = __decorate2([ + (0, common_12.Module)({ + controllers: [admin_report_controller_1.AdminReportController], + providers: [report_service_1.ReportService], + exports: [report_service_1.ReportService] + }) + ], ReportModule); + } +}); + +// dist/src/modules/sms/sms.service.js +var require_sms_service = __commonJS({ + "dist/src/modules/sms/sms.service.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + var SmsService_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SmsService = void 0; + var bullmq_1 = require_dist6(); + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var bullmq_2 = require_cjs4(); + var prisma_service_12 = require_prisma_service(); + var SmsService = SmsService_1 = class SmsService { + constructor(smsQueue, prisma) { + this.smsQueue = smsQueue; + this.prisma = prisma; + this.logger = new common_12.Logger(SmsService_1.name); + } + async enqueueOtp(mobile, code) { + const message = `\u06A9\u062F \u0648\u0631\u0648\u062F \u0634\u0645\u0627 \u0628\u0647 \u0633\u0627\u0645\u0627\u0646\u0647 \u06AF\u0631\u062F\u0648\u0646\u0647 \u0634\u0627\u0646\u0633: ${code}`; + try { + await this.smsQueue.add("otp", { mobile, message, type: client_1.SmsType.OTP }, { + attempts: 3, + backoff: { type: "exponential", delay: 2e3 }, + priority: 1, + removeOnComplete: true + }); + } catch (e) { + this.logger.error(`Failed to enqueue OTP SMS: ${e.message}`); + } + } + async enqueueSpinResult(spinId) { + try { + const spin = await this.prisma.spin.findUnique({ + where: { id: spinId }, + include: { + user: true, + prize: true, + userPrize: true, + campaign: true + } + }); + if (!spin || !spin.user) { + return; + } + const mobile = spin.user.mobile; + let message = ""; + let type = client_1.SmsType.WINNING; + if (!spin.prize || spin.prize.type === "NO_PRIZE") { + type = client_1.SmsType.NO_PRIZE; + message = `\u0647\u0645\u0631\u0627\u0647 \u06AF\u0631\u0627\u0645\u06CC\u060C \u0645\u062A\u0623\u0633\u0641\u0627\u0646\u0647 \u062F\u0631 \u0627\u06CC\u0646 \u062F\u0648\u0631 \u0627\u0632 \u06AF\u0631\u062F\u0648\u0646\u0647 ${spin.campaign.title} \u0628\u0631\u0646\u062F\u0647 \u0646\u0634\u062F\u06CC\u062F. \u0634\u0627\u0646\u0633\u200C\u0647\u0627\u06CC \u062F\u06CC\u06AF\u0631 \u062E\u0648\u062F \u0631\u0627 \u0627\u0645\u062A\u062D\u0627\u0646 \u06A9\u0646\u06CC\u062F!`; + } else { + type = client_1.SmsType.WINNING; + const codeText = spin.userPrize?.code ? ` \u06A9\u062F \u062C\u0627\u06CC\u0632\u0647: ${spin.userPrize.code}` : ""; + if (spin.prize.smsTemplate) { + message = spin.prize.smsTemplate.replace("{prize}", spin.prize.title).replace("{code}", spin.userPrize?.code || "").replace("{campaign}", spin.campaign.title); + } else { + message = `\u062A\u0628\u0631\u06CC\u06A9! \u0634\u0645\u0627 \u062F\u0631 \u06AF\u0631\u062F\u0648\u0646\u0647 ${spin.campaign.title} \u0628\u0631\u0646\u062F\u0647 \xAB${spin.prize.title}\xBB \u0634\u062F\u06CC\u062F.${codeText}`; + } + } + await this.smsQueue.add("spin-result", { + userId: spin.userId, + mobile, + message, + type + }, { + attempts: 3, + backoff: { type: "exponential", delay: 3e3 }, + removeOnComplete: true + }); + } catch (e) { + this.logger.error(`Failed to enqueue spin result SMS for spin ${spinId}: ${e.message}`); + } + } + async resendSms(logId) { + const log = await this.prisma.smsLog.findUnique({ where: { id: logId } }); + if (!log) { + throw new common_12.NotFoundException("\u0644\u0627\u06AF \u067E\u06CC\u0627\u0645\u06A9 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F."); + } + await this.smsQueue.add("resend", { + userId: log.userId, + mobile: log.mobile, + message: log.message, + type: log.type + }, { + attempts: 3, + backoff: { type: "exponential", delay: 2e3 } + }); + return { success: true, message: "\u067E\u06CC\u0627\u0645\u06A9 \u0628\u0627 \u0645\u0648\u0641\u0642\u06CC\u062A \u062F\u0631 \u0635\u0641 \u0627\u0631\u0633\u0627\u0644 \u0645\u062C\u062F\u062F \u0642\u0631\u0627\u0631 \u06AF\u0631\u0641\u062A." }; + } + async getLogs(query) { + const page = Number(query.page) || 1; + const pageSize = Number(query.pageSize) || 20; + const skip = (page - 1) * pageSize; + const where = {}; + if (query.mobile) + where.mobile = { contains: query.mobile }; + if (query.status) + where.status = query.status; + const [data, total] = await Promise.all([ + this.prisma.smsLog.findMany({ + where, + skip, + take: pageSize, + orderBy: { createdAt: "desc" } + }), + this.prisma.smsLog.count({ where }) + ]); + return { + data, + meta: { + page, + pageSize, + total, + totalPages: Math.ceil(total / pageSize) + } + }; + } + }; + exports2.SmsService = SmsService; + exports2.SmsService = SmsService = SmsService_1 = __decorate2([ + (0, common_12.Injectable)(), + __param2(0, (0, bullmq_1.InjectQueue)("sms")), + __metadata2("design:paramtypes", [ + bullmq_2.Queue, + prisma_service_12.PrismaService + ]) + ], SmsService); + } +}); + +// dist/src/modules/sms/admin-sms.controller.js +var require_admin_sms_controller = __commonJS({ + "dist/src/modules/sms/admin-sms.controller.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminSmsController = void 0; + var common_12 = require_common(); + var swagger_12 = require_swagger(); + var jwt_admin_guard_1 = require_jwt_admin_guard(); + var audit_interceptor_1 = require_audit_interceptor(); + var sms_service_1 = require_sms_service(); + var AdminSmsController = class AdminSmsController { + constructor(smsService) { + this.smsService = smsService; + } + async getLogs(query) { + return this.smsService.getLogs(query); + } + async resend(id) { + return this.smsService.resendSms(id); + } + }; + exports2.AdminSmsController = AdminSmsController; + __decorate2([ + (0, common_12.Get)(), + (0, swagger_12.ApiOperation)({ summary: "\u0644\u06CC\u0633\u062A \u062A\u0645\u0627\u0645 \u067E\u06CC\u0627\u0645\u06A9\u200C\u0647\u0627\u06CC \u0627\u0631\u0633\u0627\u0644\u06CC \u0628\u0627 \u0641\u06CC\u0644\u062A\u0631 \u0648\u0636\u0639\u06CC\u062A \u0648 \u0645\u0648\u0628\u0627\u06CC\u0644" }), + (0, swagger_12.ApiQuery)({ name: "page", required: false }), + (0, swagger_12.ApiQuery)({ name: "pageSize", required: false }), + (0, swagger_12.ApiQuery)({ name: "mobile", required: false }), + (0, swagger_12.ApiQuery)({ name: "status", required: false }), + __param2(0, (0, common_12.Query)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [Object]), + __metadata2("design:returntype", Promise) + ], AdminSmsController.prototype, "getLogs", null); + __decorate2([ + (0, common_12.Post)(":id/resend"), + (0, swagger_12.ApiOperation)({ summary: "\u0627\u0631\u0633\u0627\u0644 \u0645\u062C\u062F\u062F \u067E\u06CC\u0627\u0645\u06A9 \u0646\u0627\u0645\u0648\u0641\u0642" }), + (0, swagger_12.ApiResponse)({ status: 200, description: "\u067E\u06CC\u0627\u0645\u06A9 \u062F\u0631 \u0635\u0641 \u0627\u0631\u0633\u0627\u0644 \u0645\u062C\u062F\u062F \u0642\u0631\u0627\u0631 \u06AF\u0631\u0641\u062A" }), + __param2(0, (0, common_12.Param)("id")), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String]), + __metadata2("design:returntype", Promise) + ], AdminSmsController.prototype, "resend", null); + exports2.AdminSmsController = AdminSmsController = __decorate2([ + (0, swagger_12.ApiTags)("Admin SMS Logs (\u0645\u062F\u06CC\u0631\u06CC\u062A \u067E\u06CC\u0627\u0645\u06A9\u200C\u0647\u0627)"), + (0, common_12.Controller)("admin/sms-logs"), + (0, common_12.UseGuards)(jwt_admin_guard_1.JwtAdminGuard), + (0, common_12.UseInterceptors)(audit_interceptor_1.AuditInterceptor), + (0, swagger_12.ApiBearerAuth)("AdminAuth"), + __metadata2("design:paramtypes", [sms_service_1.SmsService]) + ], AdminSmsController); + } +}); + +// dist/src/modules/sms/providers/mock-sms.provider.js +var require_mock_sms_provider = __commonJS({ + "dist/src/modules/sms/providers/mock-sms.provider.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var MockSmsProvider_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MockSmsProvider = void 0; + var common_12 = require_common(); + var MockSmsProvider = MockSmsProvider_1 = class MockSmsProvider { + constructor() { + this.logger = new common_12.Logger(MockSmsProvider_1.name); + } + async send(mobile, message) { + const providerMessageId = `MOCK-SMS-${Date.now()}`; + this.logger.log(`[MOCK SMS] Sent to ${mobile} | Content: ${message} | ID: ${providerMessageId}`); + return { + providerMessageId, + raw: { success: true, mock: true, recipient: mobile, body: message } + }; + } + }; + exports2.MockSmsProvider = MockSmsProvider; + exports2.MockSmsProvider = MockSmsProvider = MockSmsProvider_1 = __decorate2([ + (0, common_12.Injectable)() + ], MockSmsProvider); + } +}); + +// dist/src/modules/sms/providers/raygan-sms.provider.js +var require_raygan_sms_provider = __commonJS({ + "dist/src/modules/sms/providers/raygan-sms.provider.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var RayganSmsProvider_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RayganSmsProvider = void 0; + var common_12 = require_common(); + var config_12 = require_config2(); + var RayganSmsProvider = RayganSmsProvider_1 = class RayganSmsProvider { + constructor(configService) { + this.configService = configService; + this.logger = new common_12.Logger(RayganSmsProvider_1.name); + this.baseUrl = this.configService.get("RAYGAN_SMS_API_BASE_URL", "https://api.raygansms.com"); + this.username = this.configService.get("RAYGAN_SMS_USERNAME"); + this.password = this.configService.get("RAYGAN_SMS_PASSWORD"); + this.fromLine = this.configService.get("RAYGAN_SMS_LINE_NUMBER"); + } + async send(mobile, message) { + try { + const response = await fetch(`${this.baseUrl}/api/sms/send`, { + method: "POST", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify({ + username: this.username, + password: this.password, + from: this.fromLine, + to: mobile, + text: message + }) + }); + const data = await response.json(); + const messageId = data?.messageId || data?.id || `RAYGAN-${Date.now()}`; + return { + providerMessageId: String(messageId), + raw: data + }; + } catch (err) { + this.logger.error(`RayganSMS send failure to ${mobile}: ${err.message}`); + throw err; + } + } + }; + exports2.RayganSmsProvider = RayganSmsProvider; + exports2.RayganSmsProvider = RayganSmsProvider = RayganSmsProvider_1 = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", [config_12.ConfigService]) + ], RayganSmsProvider); + } +}); + +// dist/src/modules/sms/sms.processor.js +var require_sms_processor = __commonJS({ + "dist/src/modules/sms/sms.processor.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + var SmsProcessor_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SmsProcessor = void 0; + var bullmq_1 = require_dist6(); + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var prisma_service_12 = require_prisma_service(); + var SmsProcessor = SmsProcessor_1 = class SmsProcessor extends bullmq_1.WorkerHost { + constructor(prisma, provider) { + super(); + this.prisma = prisma; + this.provider = provider; + this.logger = new common_12.Logger(SmsProcessor_1.name); + } + async process(job) { + const { mobile, message, type = client_1.SmsType.WINNING, userId } = job.data; + const log = await this.prisma.smsLog.create({ + data: { + userId: userId || null, + mobile, + type, + message, + provider: "raygansms", + status: client_1.SmsStatus.PENDING + } + }); + try { + const result = await this.provider.send(mobile, message); + await this.prisma.smsLog.update({ + where: { id: log.id }, + data: { + status: client_1.SmsStatus.SENT, + providerResponse: result.raw + } + }); + return result; + } catch (err) { + this.logger.error(`SMS Job ${job.id} failed: ${err.message}`); + await this.prisma.smsLog.update({ + where: { id: log.id }, + data: { + status: client_1.SmsStatus.FAILED, + providerResponse: { error: err.message || String(err) } + } + }); + throw err; + } + } + }; + exports2.SmsProcessor = SmsProcessor; + exports2.SmsProcessor = SmsProcessor = SmsProcessor_1 = __decorate2([ + (0, bullmq_1.Processor)("sms"), + __param2(1, (0, common_12.Inject)("SMS_PROVIDER")), + __metadata2("design:paramtypes", [prisma_service_12.PrismaService, Object]) + ], SmsProcessor); + } +}); + +// dist/src/modules/sms/sms.module.js +var require_sms_module = __commonJS({ + "dist/src/modules/sms/sms.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SmsModule = void 0; + var bullmq_1 = require_dist6(); + var common_12 = require_common(); + var config_12 = require_config2(); + var admin_sms_controller_1 = require_admin_sms_controller(); + var mock_sms_provider_1 = require_mock_sms_provider(); + var raygan_sms_provider_1 = require_raygan_sms_provider(); + var sms_processor_1 = require_sms_processor(); + var sms_service_1 = require_sms_service(); + var SmsModule = class SmsModule { + }; + exports2.SmsModule = SmsModule; + exports2.SmsModule = SmsModule = __decorate2([ + (0, common_12.Module)({ + imports: [ + bullmq_1.BullModule.registerQueue({ + name: "sms" + }) + ], + controllers: [admin_sms_controller_1.AdminSmsController], + providers: [ + sms_service_1.SmsService, + sms_processor_1.SmsProcessor, + { + provide: "SMS_PROVIDER", + useFactory: (config) => { + const driver = config.get("SMS_DRIVER", "mock"); + return driver === "raygansms" ? new raygan_sms_provider_1.RayganSmsProvider(config) : new mock_sms_provider_1.MockSmsProvider(); + }, + inject: [config_12.ConfigService] + } + ], + exports: [sms_service_1.SmsService] + }) + ], SmsModule); + } +}); + +// dist/src/modules/spin-engine/prize-code-generator.js +var require_prize_code_generator = __commonJS({ + "dist/src/modules/spin-engine/prize-code-generator.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PrizeCodeGenerator = void 0; + var common_12 = require_common(); + var crypto5 = require("crypto"); + var PrizeCodeGenerator = class PrizeCodeGenerator { + async generateUnique(tx) { + for (let i = 0; i < 5; i++) { + const randomHex = crypto5.randomBytes(4).toString("hex").toUpperCase(); + const code = `MNT-${randomHex}`; + const existing = await tx.userPrize.findUnique({ + where: { code }, + select: { id: true } + }); + if (!existing) { + return code; + } + } + throw new common_12.InternalServerErrorException("\u062E\u0637\u0627 \u062F\u0631 \u062A\u0648\u0644\u06CC\u062F \u06A9\u062F \u06CC\u06A9\u062A\u0627\u06CC \u062C\u0627\u06CC\u0632\u0647. \u0644\u0637\u0641\u0627\u064B \u0645\u062C\u062F\u062F\u0627\u064B \u062A\u0644\u0627\u0634 \u06A9\u0646\u06CC\u062F."); + } + }; + exports2.PrizeCodeGenerator = PrizeCodeGenerator; + exports2.PrizeCodeGenerator = PrizeCodeGenerator = __decorate2([ + (0, common_12.Injectable)() + ], PrizeCodeGenerator); + } +}); + +// dist/src/common/decorators/current-user.decorator.js +var require_current_user_decorator = __commonJS({ + "dist/src/common/decorators/current-user.decorator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CurrentUser = void 0; + var common_12 = require_common(); + exports2.CurrentUser = (0, common_12.createParamDecorator)((data, ctx) => { + const request = ctx.switchToHttp().getRequest(); + const user = request.user; + return data ? user?.[data] : user; + }); + } +}); + +// dist/src/common/guards/jwt-user.guard.js +var require_jwt_user_guard = __commonJS({ + "dist/src/common/guards/jwt-user.guard.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.JwtUserGuard = void 0; + var common_12 = require_common(); + var passport_1 = require_passport(); + var JwtUserGuard = class JwtUserGuard extends (0, passport_1.AuthGuard)("jwt-user") { + canActivate(context) { + return super.canActivate(context); + } + handleRequest(err, user) { + if (err || !user || user.type !== "user") { + throw err || new common_12.UnauthorizedException("UNAUTHORIZED"); + } + return user; + } + }; + exports2.JwtUserGuard = JwtUserGuard; + exports2.JwtUserGuard = JwtUserGuard = __decorate2([ + (0, common_12.Injectable)() + ], JwtUserGuard); + } +}); + +// dist/src/modules/spin-engine/dto/spin-request.dto.js +var require_spin_request_dto = __commonJS({ + "dist/src/modules/spin-engine/dto/spin-request.dto.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SpinRequestDto = void 0; + var swagger_12 = require_swagger(); + var class_validator_1 = require_cjs(); + var SpinRequestDto = class { + }; + exports2.SpinRequestDto = SpinRequestDto; + __decorate2([ + (0, swagger_12.ApiProperty)({ + example: "d3b07384-d113-4ec3-a612-42fe1d3f56e9", + description: "\u06A9\u0644\u06CC\u062F \u06CC\u06A9\u062A\u0627 \u062A\u0648\u0644\u06CC\u062F\u0634\u062F\u0647 \u062A\u0648\u0633\u0637 \u06A9\u0644\u0627\u06CC\u0646\u062A \u0628\u0631\u0627\u06CC \u062A\u0636\u0645\u06CC\u0646 Idempotency (UUID v4)" + }), + (0, class_validator_1.IsUUID)("4", { message: "\u06A9\u0644\u06CC\u062F Idempotency \u0628\u0627\u06CC\u062F \u06CC\u06A9 UUID v4 \u0645\u0639\u062A\u0628\u0631 \u0628\u0627\u0634\u062F" }), + (0, class_validator_1.IsNotEmpty)({ message: "\u06A9\u0644\u06CC\u062F Idempotency \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + __metadata2("design:type", String) + ], SpinRequestDto.prototype, "idempotencyKey", void 0); + } +}); + +// dist/src/modules/spin-engine/weighted-random-selector.js +var require_weighted_random_selector = __commonJS({ + "dist/src/modules/spin-engine/weighted-random-selector.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WeightedRandomSelector = void 0; + var common_12 = require_common(); + var crypto5 = require("crypto"); + var WeightedRandomSelector = class WeightedRandomSelector { + select(candidates) { + if (!candidates || candidates.length === 0) { + throw new Error("Candidate pool cannot be empty."); + } + if (candidates.length === 1) { + return candidates[0]; + } + const totalWeight = candidates.reduce((sum, item) => sum + Math.max(0, item.weight), 0); + if (totalWeight <= 0) { + throw new Error("Total weight of eligible prizes must be greater than zero."); + } + const rnd = crypto5.randomInt(0, totalWeight); + let cursor = 0; + for (const item of candidates) { + cursor += Math.max(0, item.weight); + if (rnd < cursor) { + return item; + } + } + return candidates[candidates.length - 1]; + } + }; + exports2.WeightedRandomSelector = WeightedRandomSelector; + exports2.WeightedRandomSelector = WeightedRandomSelector = __decorate2([ + (0, common_12.Injectable)() + ], WeightedRandomSelector); + } +}); + +// dist/src/modules/spin-engine/spin-engine.service.js +var require_spin_engine_service = __commonJS({ + "dist/src/modules/spin-engine/spin-engine.service.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var SpinEngineService_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SpinEngineService = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var crypto5 = require("crypto"); + var prisma_service_12 = require_prisma_service(); + var campaign_availability_service_1 = require_campaign_availability_service(); + var sms_service_1 = require_sms_service(); + var prize_code_generator_1 = require_prize_code_generator(); + var weighted_random_selector_1 = require_weighted_random_selector(); + var SpinEngineService = SpinEngineService_1 = class SpinEngineService { + constructor(prisma, availabilityService, weightedRandomSelector, prizeCodeGenerator, smsService) { + this.prisma = prisma; + this.availabilityService = availabilityService; + this.weightedRandomSelector = weightedRandomSelector; + this.prizeCodeGenerator = prizeCodeGenerator; + this.smsService = smsService; + this.logger = new common_12.Logger(SpinEngineService_1.name); + } + async spin(userId, campaignId, idempotencyKey, metadata) { + const existing = await this.prisma.spin.findUnique({ + where: { idempotencyKey }, + include: { + prize: true, + userPrize: true + } + }); + if (existing) { + this.logger.log(`[IDEMPOTENCY HIT] Returning existing spin result for key: ${idempotencyKey}`); + return this.formatExistingSpinResponse(existing, campaignId, userId); + } + let retries = 5; + while (retries >= 0) { + try { + return await this.executeSpinTransaction(userId, campaignId, idempotencyKey, metadata); + } catch (err) { + const isSerializationError = err.code === "P2034" || err.message?.includes("could not serialize access") || err.message?.includes("40001") || err.message?.includes("deadlock") || err.code === "P2010" && String(err.meta?.code) === "40001"; + if (isSerializationError && retries > 0) { + retries--; + const jitter = crypto5.randomInt(30, 150); + this.logger.warn(`Serialization conflict during spin. Retrying in ${jitter}ms... (${retries} attempts left)`); + await new Promise((res) => setTimeout(res, jitter)); + continue; + } + if (err.code === "P2002" && (err.meta?.target?.includes("idempotency_key") || err.message?.includes("idempotency_key"))) { + const concurrentSpin = await this.prisma.spin.findUnique({ + where: { idempotencyKey }, + include: { prize: true, userPrize: true } + }); + if (concurrentSpin) { + return this.formatExistingSpinResponse(concurrentSpin, campaignId, userId); + } + } + throw err; + } + } + throw new common_12.InternalServerErrorException("\u062E\u0637\u0627 \u062F\u0631 \u067E\u0631\u062F\u0627\u0632\u0634 \u0627\u0633\u067E\u06CC\u0646 \u0628\u0631 \u0627\u062B\u0631 \u062A\u0631\u0627\u0641\u06CC\u06A9 \u0628\u0627\u0644\u0627. \u0644\u0637\u0641\u0627\u064B \u0645\u062C\u062F\u062F\u0627\u064B \u062A\u0644\u0627\u0634 \u06A9\u0646\u06CC\u062F."); + } + async executeSpinTransaction(userId, campaignId, idempotencyKey, metadata) { + return this.prisma.$transaction(async (tx) => { + const campaign = await tx.campaign.findUnique({ + where: { id: campaignId } + }); + if (!campaign) { + throw new common_12.NotFoundException("CAMPAIGN_NOT_FOUND"); + } + if (!this.availabilityService.isCampaignAvailable(campaign)) { + const error = this.availabilityService.getAvailabilityError(campaign); + const errorMessages = { + CAMPAIGN_DRAFT: "\u0627\u06CC\u0646 \u06A9\u0645\u067E\u06CC\u0646 \u062F\u0631 \u0648\u0636\u0639\u06CC\u062A \u067E\u06CC\u0634\u200C\u0646\u0648\u06CC\u0633 (DRAFT) \u0642\u0631\u0627\u0631 \u062F\u0627\u0631\u062F \u0648 \u0647\u0646\u0648\u0632 \u0641\u0639\u0627\u0644 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A.", + CAMPAIGN_PAUSED: "\u0627\u06CC\u0646 \u06A9\u0645\u067E\u06CC\u0646 \u0645\u0648\u0642\u062A\u0627\u064B \u0645\u062A\u0648\u0642\u0641 \u0634\u062F\u0647 \u0627\u0633\u062A.", + CAMPAIGN_NOT_STARTED: "\u0632\u0645\u0627\u0646 \u0634\u0631\u0648\u0639 \u0627\u06CC\u0646 \u06A9\u0645\u067E\u06CC\u0646 \u0647\u0646\u0648\u0632 \u0641\u0631\u0627 \u0646\u0631\u0633\u06CC\u062F\u0647 \u0627\u0633\u062A.", + CAMPAIGN_FINISHED: "\u0645\u0647\u0644\u062A \u0634\u0631\u06A9\u062A \u062F\u0631 \u0627\u06CC\u0646 \u06A9\u0645\u067E\u06CC\u0646 \u0628\u0647 \u067E\u0627\u06CC\u0627\u0646 \u0631\u0633\u06CC\u062F\u0647 \u0627\u0633\u062A." + }; + const message = errorMessages[error || ""] || error || "\u0627\u06CC\u0646 \u06A9\u0645\u067E\u06CC\u0646 \u062F\u0631 \u062D\u0627\u0644 \u062D\u0627\u0636\u0631 \u0641\u0639\u0627\u0644 \u0646\u0645\u06CC\u200C\u0628\u0627\u0634\u062F."; + throw new common_12.BadRequestException(message); + } + const userCampaigns = await tx.$queryRaw` + SELECT id, user_id, campaign_id, total_chances, used_chances + FROM user_campaigns + WHERE user_id = ${userId} AND campaign_id = ${campaignId} + FOR UPDATE + `; + let userCampaign = userCampaigns[0]; + let totalChances = userCampaign?.total_chances ?? 0; + let usedChances = userCampaign?.used_chances ?? 0; + if (!userCampaign) { + const defaultChances = campaign.defaultChances; + const newRecord = await tx.userCampaign.create({ + data: { + userId, + campaignId, + totalChances: defaultChances, + usedChances: 0 + } + }); + await tx.chanceTransaction.create({ + data: { + userId, + campaignId, + amount: defaultChances, + type: "SIGNUP_BONUS", + referenceType: "campaign_entry", + description: "\u0634\u0627\u0646\u0633 \u0627\u0648\u0644\u06CC\u0647 \u067E\u06CC\u0634\u200C\u0641\u0631\u0636 \u0648\u0631\u0648\u062F \u0628\u0647 \u06A9\u0645\u067E\u06CC\u0646" + } + }); + userCampaign = { + id: newRecord.id, + user_id: newRecord.userId, + campaign_id: newRecord.campaignId, + total_chances: newRecord.totalChances, + used_chances: 0 + }; + totalChances = defaultChances; + usedChances = 0; + } else if (totalChances < campaign.defaultChances) { + const diff = campaign.defaultChances - totalChances; + await tx.userCampaign.update({ + where: { id: userCampaign.id }, + data: { totalChances: { increment: diff } } + }); + await tx.chanceTransaction.create({ + data: { + userId, + campaignId, + amount: diff, + type: "ADMIN_ADJUSTMENT", + referenceType: "campaign_default_chances_sync", + description: `\u0647\u0645\u06AF\u0627\u0645\u200C\u0633\u0627\u0632\u06CC \u062E\u0648\u062F\u06A9\u0627\u0631 \u0628\u0627 \u0634\u0627\u0646\u0633 \u067E\u06CC\u0634\u200C\u0641\u0631\u0636 \u06A9\u0645\u067E\u06CC\u0646 (${campaign.defaultChances})` + } + }); + totalChances = campaign.defaultChances; + } + const remainingChances = totalChances - usedChances; + if (remainingChances <= 0) { + throw new common_12.BadRequestException("NO_CHANCE_LEFT"); + } + const eligiblePrizes = await tx.$queryRaw` + SELECT id, campaign_id, title, description, image, type, stock_type, initial_stock, remaining_stock, weight, status, sort_order, segment_color + FROM prizes + WHERE campaign_id = ${campaignId} + AND status = 'ACTIVE' + AND weight > 0 + AND (stock_type = 'UNLIMITED' OR remaining_stock > 0) + ORDER BY id ASC + FOR UPDATE + `; + if (!eligiblePrizes || eligiblePrizes.length === 0) { + throw new common_12.ConflictException("NO_ACTIVE_PRIZE"); + } + const selected = this.weightedRandomSelector.select(eligiblePrizes); + if (selected.stock_type === client_1.StockType.LIMITED) { + await tx.prize.update({ + where: { id: selected.id }, + data: { remainingStock: { decrement: 1 } } + }); + } + await tx.chanceTransaction.create({ + data: { + userId, + campaignId, + amount: -1, + type: "SPIN_CONSUME", + referenceType: "spin", + description: `\u0627\u0633\u062A\u0641\u0627\u062F\u0647 \u0627\u0632 \u0634\u0627\u0646\u0633 \u062F\u0631 \u0642\u0631\u0639\u0647\u200C\u06A9\u0634\u06CC` + } + }); + await tx.userCampaign.update({ + where: { id: userCampaign.id }, + data: { usedChances: { increment: 1 } } + }); + const spin = await tx.spin.create({ + data: { + userId, + campaignId, + prizeId: selected.id, + idempotencyKey, + status: "SUCCESS", + ip: metadata?.ip || null, + userAgent: metadata?.userAgent || null + } + }); + let userPrize = null; + if (selected.type !== client_1.PrizeType.NO_PRIZE) { + const code = await this.prizeCodeGenerator.generateUnique(tx); + userPrize = await tx.userPrize.create({ + data: { + userId, + campaignId, + prizeId: selected.id, + spinId: spin.id, + code, + status: "NEW", + wonAt: /* @__PURE__ */ new Date() + } + }); + } + return { + spin, + selectedPrize: selected, + userPrize, + remainingChances: remainingChances - 1 + }; + }, { + isolationLevel: client_1.Prisma.TransactionIsolationLevel.ReadCommitted, + timeout: 1e4 + }).then(async (result) => { + try { + await this.smsService.enqueueSpinResult(result.spin.id); + } catch (smsErr) { + this.logger.error(`Failed to enqueue spin SMS (non-blocking): ${smsErr}`); + } + return { + success: true, + spinId: result.spin.id, + prize: { + id: result.selectedPrize.id, + title: result.selectedPrize.title, + segment: result.selectedPrize.sort_order, + code: result.userPrize?.code || null, + type: result.selectedPrize.type, + image: result.selectedPrize.image + }, + remainingChances: result.remainingChances + }; + }); + } + async formatExistingSpinResponse(spin, campaignId, userId) { + const userCampaign = await this.prisma.userCampaign.findUnique({ + where: { userId_campaignId: { userId, campaignId } } + }); + const remainingChances = (userCampaign?.totalChances ?? 0) - (userCampaign?.usedChances ?? 0); + return { + success: true, + spinId: spin.id, + prize: spin.prize ? { + id: spin.prize.id, + title: spin.prize.title, + segment: spin.prize.sortOrder, + code: spin.userPrize?.code || null, + type: spin.prize.type, + image: spin.prize.image + } : null, + remainingChances + }; + } + }; + exports2.SpinEngineService = SpinEngineService; + exports2.SpinEngineService = SpinEngineService = SpinEngineService_1 = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", [ + prisma_service_12.PrismaService, + campaign_availability_service_1.CampaignAvailabilityService, + weighted_random_selector_1.WeightedRandomSelector, + prize_code_generator_1.PrizeCodeGenerator, + sms_service_1.SmsService + ]) + ], SpinEngineService); + } +}); + +// dist/src/modules/spin-engine/spin-engine.controller.js +var require_spin_engine_controller = __commonJS({ + "dist/src/modules/spin-engine/spin-engine.controller.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SpinEngineController = void 0; + var common_12 = require_common(); + var swagger_12 = require_swagger(); + var throttler_1 = require_dist9(); + var current_user_decorator_1 = require_current_user_decorator(); + var jwt_user_guard_1 = require_jwt_user_guard(); + var spin_request_dto_1 = require_spin_request_dto(); + var spin_engine_service_1 = require_spin_engine_service(); + var SpinEngineController = class SpinEngineController { + constructor(spinEngineService) { + this.spinEngineService = spinEngineService; + } + async spin(campaignId, userId, dto, req) { + const ip = req.ip || req.headers["x-forwarded-for"]; + const userAgent = req.headers["user-agent"]; + return this.spinEngineService.spin(userId, campaignId, dto.idempotencyKey, { + ip, + userAgent + }); + } + }; + exports2.SpinEngineController = SpinEngineController; + __decorate2([ + (0, common_12.Post)(":id/spin"), + (0, common_12.HttpCode)(common_12.HttpStatus.OK), + (0, throttler_1.Throttle)({ default: { limit: 20, ttl: 6e4 } }), + (0, swagger_12.ApiOperation)({ + summary: "\u0686\u0631\u062E\u0627\u0646\u062F\u0646 \u06AF\u0631\u062F\u0648\u0646\u0647 \u0634\u0627\u0646\u0633 (\u062A\u0636\u0645\u06CC\u0646 \u0627\u062A\u0645\u06CC\u06A9\u060C \u062C\u0644\u0648\u06AF\u06CC\u0631\u06CC \u0627\u0632 Concurrency \u0648 Idempotency)" + }), + (0, swagger_12.ApiResponse)({ + status: 200, + description: "\u0646\u062A\u06CC\u062C\u0647 \u0642\u0631\u0639\u0647\u200C\u06A9\u0634\u06CC \u0628\u0627 \u0645\u0648\u0641\u0642\u06CC\u062A \u062A\u0648\u0633\u0637 \u0633\u0631\u0648\u0631 \u062A\u0639\u06CC\u06CC\u0646 \u0648 \u062B\u0628\u062A \u06AF\u0631\u062F\u06CC\u062F.", + schema: { + example: { + success: true, + data: { + success: true, + spinId: "d3b07384-d113-4ec3-a612-42fe1d3f56e9", + prize: { + id: "prize-uuid", + title: "\u06A9\u0627\u0631\u062A \u0647\u062F\u06CC\u0647 \u06F5\u06F0\u06F0 \u0647\u0632\u0627\u0631 \u062A\u0648\u0645\u0627\u0646\u06CC", + segment: 3, + code: "MNT-8F4KD2", + type: "CREDIT", + image: "http://localhost:3000/uploads/gift.png" + }, + remainingChances: 2 + } + } + } + }), + __param2(0, (0, common_12.Param)("id")), + __param2(1, (0, current_user_decorator_1.CurrentUser)("id")), + __param2(2, (0, common_12.Body)()), + __param2(3, (0, common_12.Req)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String, String, spin_request_dto_1.SpinRequestDto, Object]), + __metadata2("design:returntype", Promise) + ], SpinEngineController.prototype, "spin", null); + exports2.SpinEngineController = SpinEngineController = __decorate2([ + (0, swagger_12.ApiTags)("Spin Engine (\u06AF\u0631\u062F\u0648\u0646\u0647 \u0634\u0627\u0646\u0633)"), + (0, common_12.Controller)("campaigns"), + (0, common_12.UseGuards)(jwt_user_guard_1.JwtUserGuard), + (0, swagger_12.ApiBearerAuth)("UserAuth"), + __metadata2("design:paramtypes", [spin_engine_service_1.SpinEngineService]) + ], SpinEngineController); + } +}); + +// dist/src/modules/spin-engine/spin-engine.module.js +var require_spin_engine_module = __commonJS({ + "dist/src/modules/spin-engine/spin-engine.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SpinEngineModule = void 0; + var common_12 = require_common(); + var campaign_module_1 = require_campaign_module(); + var chance_module_1 = require_chance_module(); + var sms_module_1 = require_sms_module(); + var prize_code_generator_1 = require_prize_code_generator(); + var spin_engine_controller_1 = require_spin_engine_controller(); + var spin_engine_service_1 = require_spin_engine_service(); + var weighted_random_selector_1 = require_weighted_random_selector(); + var SpinEngineModule = class SpinEngineModule { + }; + exports2.SpinEngineModule = SpinEngineModule; + exports2.SpinEngineModule = SpinEngineModule = __decorate2([ + (0, common_12.Module)({ + imports: [campaign_module_1.CampaignModule, chance_module_1.ChanceModule, sms_module_1.SmsModule], + controllers: [spin_engine_controller_1.SpinEngineController], + providers: [spin_engine_service_1.SpinEngineService, weighted_random_selector_1.WeightedRandomSelector, prize_code_generator_1.PrizeCodeGenerator], + exports: [spin_engine_service_1.SpinEngineService, weighted_random_selector_1.WeightedRandomSelector, prize_code_generator_1.PrizeCodeGenerator] + }) + ], SpinEngineModule); + } +}); + +// dist/src/modules/storage/providers/local-storage.provider.js +var require_local_storage_provider = __commonJS({ + "dist/src/modules/storage/providers/local-storage.provider.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LocalStorageProvider = void 0; + var common_12 = require_common(); + var config_12 = require_config2(); + var crypto5 = require("crypto"); + var fs = require("fs"); + var path = require("path"); + var LocalStorageProvider = class LocalStorageProvider { + constructor(configService) { + this.configService = configService; + this.root = this.configService.get("STORAGE_LOCAL_ROOT", "./uploads"); + this.publicBaseUrl = this.configService.get("STORAGE_PUBLIC_URL", "http://localhost:3000/uploads"); + } + async upload(file2, options) { + const dir = path.join(process.cwd(), this.root, options.folder); + await fs.promises.mkdir(dir, { recursive: true }); + const ext = path.extname(options.filename); + const finalName = `${Date.now()}-${crypto5.randomUUID()}${ext}`; + const fullPath = path.join(dir, finalName); + await fs.promises.writeFile(fullPath, file2); + const relPath = `${options.folder}/${finalName}`.replace(/\\/g, "/"); + const url = `${this.publicBaseUrl}/${relPath}`; + return { url, path: relPath }; + } + async delete(relPath) { + const fullPath = path.join(process.cwd(), this.root, relPath); + await fs.promises.unlink(fullPath).catch(() => void 0); + } + }; + exports2.LocalStorageProvider = LocalStorageProvider; + exports2.LocalStorageProvider = LocalStorageProvider = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", [config_12.ConfigService]) + ], LocalStorageProvider); + } +}); + +// dist/src/modules/storage/storage.service.js +var require_storage_service = __commonJS({ + "dist/src/modules/storage/storage.service.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageService = void 0; + var common_12 = require_common(); + var StorageService = class StorageService { + constructor(provider) { + this.provider = provider; + } + async uploadFile(file2, folder = "general") { + return this.provider.upload(file2.buffer, { + folder, + filename: file2.originalname, + mimeType: file2.mimetype + }); + } + async deleteFile(relPath) { + return this.provider.delete(relPath); + } + }; + exports2.StorageService = StorageService; + exports2.StorageService = StorageService = __decorate2([ + (0, common_12.Injectable)(), + __param2(0, (0, common_12.Inject)("STORAGE_PROVIDER")), + __metadata2("design:paramtypes", [Object]) + ], StorageService); + } +}); + +// dist/src/modules/storage/storage.controller.js +var require_storage_controller = __commonJS({ + "dist/src/modules/storage/storage.controller.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageController = void 0; + var common_12 = require_common(); + var platform_express_1 = require_platform_express(); + var swagger_12 = require_swagger(); + var jwt_admin_guard_1 = require_jwt_admin_guard(); + var storage_service_1 = require_storage_service(); + var StorageController = class StorageController { + constructor(storageService) { + this.storageService = storageService; + } + async uploadFile(file2) { + if (!file2) { + throw new common_12.BadRequestException("\u0641\u0627\u06CC\u0644\u06CC \u0627\u0631\u0633\u0627\u0644 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A."); + } + return this.storageService.uploadFile(file2, "campaign-assets"); + } + }; + exports2.StorageController = StorageController; + __decorate2([ + (0, common_12.Post)(), + (0, common_12.UseInterceptors)((0, platform_express_1.FileInterceptor)("file", { + limits: { fileSize: 5 * 1024 * 1024 }, + fileFilter: (req, file2, cb) => { + if (!file2.mimetype.match(/\/(jpg|jpeg|png|webp|svg\+xml)$/)) { + return cb(new common_12.BadRequestException("\u0641\u0642\u0637 \u0641\u0631\u0645\u062A\u200C\u0647\u0627\u06CC \u062A\u0635\u0648\u06CC\u0631\u06CC JPG, PNG, WebP \u0648 SVG \u0645\u062C\u0627\u0632 \u0645\u06CC\u200C\u0628\u0627\u0634\u0646\u062F."), false); + } + cb(null, true); + } + })), + (0, swagger_12.ApiOperation)({ summary: "\u0622\u067E\u0644\u0648\u062F \u062A\u0635\u0648\u06CC\u0631 \u0628\u0631\u0627\u06CC \u0644\u0648\u06AF\u0648\u060C \u0628\u0646\u0631 \u06CC\u0627 \u0639\u06A9\u0633 \u062C\u0627\u06CC\u0632\u0647" }), + (0, swagger_12.ApiConsumes)("multipart/form-data"), + (0, swagger_12.ApiBody)({ + schema: { + type: "object", + properties: { + file: { + type: "string", + format: "binary" + } + } + } + }), + __param2(0, (0, common_12.UploadedFile)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [Object]), + __metadata2("design:returntype", Promise) + ], StorageController.prototype, "uploadFile", null); + exports2.StorageController = StorageController = __decorate2([ + (0, swagger_12.ApiTags)("Admin Uploads (\u0622\u067E\u0644\u0648\u062F \u0641\u0627\u06CC\u0644)"), + (0, common_12.Controller)("admin/uploads"), + (0, common_12.UseGuards)(jwt_admin_guard_1.JwtAdminGuard), + (0, swagger_12.ApiBearerAuth)("AdminAuth"), + __metadata2("design:paramtypes", [storage_service_1.StorageService]) + ], StorageController); + } +}); + +// dist/src/modules/storage/storage.module.js +var require_storage_module = __commonJS({ + "dist/src/modules/storage/storage.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageModule = void 0; + var common_12 = require_common(); + var local_storage_provider_1 = require_local_storage_provider(); + var storage_controller_1 = require_storage_controller(); + var storage_service_1 = require_storage_service(); + var StorageModule = class StorageModule { + }; + exports2.StorageModule = StorageModule; + exports2.StorageModule = StorageModule = __decorate2([ + (0, common_12.Module)({ + controllers: [storage_controller_1.StorageController], + providers: [ + storage_service_1.StorageService, + { + provide: "STORAGE_PROVIDER", + useClass: local_storage_provider_1.LocalStorageProvider + } + ], + exports: [storage_service_1.StorageService] + }) + ], StorageModule); + } +}); + +// dist/src/modules/user/user.service.js +var require_user_service = __commonJS({ + "dist/src/modules/user/user.service.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UserService = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var prisma_service_12 = require_prisma_service(); + var chance_service_1 = require_chance_service(); + var UserService = class UserService { + constructor(prisma, chanceService) { + this.prisma = prisma; + this.chanceService = chanceService; + } + async getMe(userId) { + const user = await this.prisma.user.findUnique({ + where: { id: userId }, + select: { + id: true, + mobile: true, + name: true, + status: true, + lastLoginAt: true, + createdAt: true + } + }); + if (!user) { + throw new common_12.NotFoundException("\u06A9\u0627\u0631\u0628\u0631 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F."); + } + return user; + } + async getMyChances(userId, campaignId) { + if (!campaignId) { + return this.prisma.userCampaign.findMany({ + where: { userId }, + include: { + campaign: { select: { id: true, title: true, slug: true, status: true } } + } + }); + } + return this.chanceService.getUserChances(userId, campaignId); + } + async getMyPrizes(userId) { + return this.prisma.userPrize.findMany({ + where: { userId }, + orderBy: { wonAt: "desc" }, + include: { + prize: { + select: { + id: true, + title: true, + description: true, + image: true, + type: true, + expiresAt: true + } + }, + campaign: { + select: { id: true, title: true, slug: true } + } + } + }); + } + async findAllForAdmin(query) { + const page = Number(query.page) || 1; + const pageSize = Number(query.pageSize) || 20; + const skip = (page - 1) * pageSize; + const where = {}; + if (query.status) { + where.status = query.status; + } else if (query.isBlocked !== void 0 && query.isBlocked !== "") { + const isBlocked = String(query.isBlocked) === "true"; + where.status = isBlocked ? client_1.UserStatus.BLOCKED : client_1.UserStatus.ACTIVE; + } + if (query.search) { + where.OR = [ + { mobile: { contains: query.search } }, + { name: { contains: query.search, mode: "insensitive" } } + ]; + } + const [data, total] = await Promise.all([ + this.prisma.user.findMany({ + where, + skip, + take: pageSize, + orderBy: { createdAt: "desc" }, + select: { + id: true, + mobile: true, + name: true, + status: true, + lastLoginAt: true, + createdAt: true, + _count: { + select: { + userCampaigns: true, + spins: true, + userPrizes: true + } + } + } + }), + this.prisma.user.count({ where }) + ]); + return { + data, + meta: { + page, + pageSize, + total, + totalPages: Math.ceil(total / pageSize) + } + }; + } + async findOneForAdmin(id) { + const user = await this.prisma.user.findUnique({ + where: { id }, + include: { + userCampaigns: { + include: { + campaign: { select: { id: true, title: true, slug: true } } + } + }, + userPrizes: { + orderBy: { wonAt: "desc" }, + include: { + prize: true, + campaign: { select: { title: true } } + } + }, + spins: { + take: 20, + orderBy: { createdAt: "desc" }, + include: { + prize: { select: { title: true, type: true } }, + campaign: { select: { title: true } } + } + }, + chanceTransactions: { + take: 30, + orderBy: { createdAt: "desc" }, + include: { + campaign: { select: { title: true } }, + createdBy: { select: { name: true } } + } + } + } + }); + if (!user) { + throw new common_12.NotFoundException("\u06A9\u0627\u0631\u0628\u0631 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F."); + } + return user; + } + async toggleBlockUser(id, blocked) { + const user = await this.prisma.user.findUnique({ where: { id } }); + if (!user) { + throw new common_12.NotFoundException("\u06A9\u0627\u0631\u0628\u0631 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F."); + } + const newStatus = blocked ? client_1.UserStatus.BLOCKED : client_1.UserStatus.ACTIVE; + return this.prisma.user.update({ + where: { id }, + data: { status: newStatus }, + select: { id: true, mobile: true, status: true } + }); + } + }; + exports2.UserService = UserService; + exports2.UserService = UserService = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", [ + prisma_service_12.PrismaService, + chance_service_1.ChanceService + ]) + ], UserService); + } +}); + +// dist/src/modules/user/admin-user.controller.js +var require_admin_user_controller = __commonJS({ + "dist/src/modules/user/admin-user.controller.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminUserController = void 0; + var common_12 = require_common(); + var swagger_12 = require_swagger(); + var client_1 = require("@prisma/client"); + var jwt_admin_guard_1 = require_jwt_admin_guard(); + var audit_interceptor_1 = require_audit_interceptor(); + var user_service_1 = require_user_service(); + var AdminUserController = class AdminUserController { + constructor(userService) { + this.userService = userService; + } + async findAll(query) { + return this.userService.findAllForAdmin(query); + } + async findOne(id) { + return this.userService.findOneForAdmin(id); + } + async toggleBlock(id, blocked) { + return this.userService.toggleBlockUser(id, blocked); + } + }; + exports2.AdminUserController = AdminUserController; + __decorate2([ + (0, common_12.Get)(), + (0, swagger_12.ApiOperation)({ summary: "\u0644\u06CC\u0633\u062A \u06A9\u0627\u0631\u0628\u0631\u0627\u0646 \u0628\u0627 \u062C\u0633\u062A\u062C\u0648\u06CC \u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644/\u0646\u0627\u0645 \u0648 \u0641\u06CC\u0644\u062A\u0631 \u0648\u0636\u0639\u06CC\u062A" }), + (0, swagger_12.ApiQuery)({ name: "page", required: false }), + (0, swagger_12.ApiQuery)({ name: "pageSize", required: false }), + (0, swagger_12.ApiQuery)({ name: "search", required: false }), + (0, swagger_12.ApiQuery)({ name: "status", enum: client_1.UserStatus, required: false }), + __param2(0, (0, common_12.Query)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [Object]), + __metadata2("design:returntype", Promise) + ], AdminUserController.prototype, "findAll", null); + __decorate2([ + (0, common_12.Get)(":id"), + (0, swagger_12.ApiOperation)({ summary: "\u0645\u0634\u0627\u0647\u062F\u0647 \u067E\u0631\u0648\u0641\u0627\u06CC\u0644 \u06A9\u0627\u0645\u0644\u060C \u06A9\u0645\u067E\u06CC\u0646\u200C\u0647\u0627\u060C \u0634\u0627\u0646\u0633\u200C\u0647\u0627\u060C \u0627\u0633\u067E\u06CC\u0646\u200C\u0647\u0627 \u0648 \u062C\u0648\u0627\u06CC\u0632 \u06A9\u0627\u0631\u0628\u0631" }), + __param2(0, (0, common_12.Param)("id")), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String]), + __metadata2("design:returntype", Promise) + ], AdminUserController.prototype, "findOne", null); + __decorate2([ + (0, common_12.Patch)(":id/block"), + (0, swagger_12.ApiOperation)({ summary: "\u0645\u0633\u062F\u0648\u062F\u0633\u0627\u0632\u06CC \u06CC\u0627 \u0631\u0641\u0639 \u0645\u0633\u062F\u0648\u062F\u06CC\u062A \u06A9\u0627\u0631\u0628\u0631" }), + __param2(0, (0, common_12.Param)("id")), + __param2(1, (0, common_12.Body)("blocked")), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String, Boolean]), + __metadata2("design:returntype", Promise) + ], AdminUserController.prototype, "toggleBlock", null); + exports2.AdminUserController = AdminUserController = __decorate2([ + (0, swagger_12.ApiTags)("Admin Users (\u0645\u062F\u06CC\u0631\u06CC\u062A \u06A9\u0627\u0631\u0628\u0631\u0627\u0646)"), + (0, common_12.Controller)("admin/users"), + (0, common_12.UseGuards)(jwt_admin_guard_1.JwtAdminGuard), + (0, common_12.UseInterceptors)(audit_interceptor_1.AuditInterceptor), + (0, swagger_12.ApiBearerAuth)("AdminAuth"), + __metadata2("design:paramtypes", [user_service_1.UserService]) + ], AdminUserController); + } +}); + +// dist/src/modules/user/user.controller.js +var require_user_controller = __commonJS({ + "dist/src/modules/user/user.controller.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UserController = void 0; + var common_12 = require_common(); + var swagger_12 = require_swagger(); + var current_user_decorator_1 = require_current_user_decorator(); + var jwt_user_guard_1 = require_jwt_user_guard(); + var user_service_1 = require_user_service(); + var UserController = class UserController { + constructor(userService) { + this.userService = userService; + } + async getMe(userId) { + return this.userService.getMe(userId); + } + async getMyChances(userId, campaignId) { + return this.userService.getMyChances(userId, campaignId); + } + async getMyPrizes(userId) { + return this.userService.getMyPrizes(userId); + } + }; + exports2.UserController = UserController; + __decorate2([ + (0, common_12.Get)(), + (0, swagger_12.ApiOperation)({ summary: "\u062F\u0631\u06CC\u0627\u0641\u062A \u0645\u0634\u062E\u0635\u0627\u062A \u062D\u0633\u0627\u0628 \u06A9\u0627\u0631\u0628\u0631\u06CC \u0645\u0646" }), + (0, swagger_12.ApiResponse)({ status: 200, description: "\u0645\u0634\u062E\u0635\u0627\u062A \u06A9\u0627\u0631\u0628\u0631 \u062C\u0627\u0631\u06CC" }), + __param2(0, (0, current_user_decorator_1.CurrentUser)("id")), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String]), + __metadata2("design:returntype", Promise) + ], UserController.prototype, "getMe", null); + __decorate2([ + (0, common_12.Get)("chances"), + (0, swagger_12.ApiOperation)({ summary: "\u062F\u0631\u06CC\u0627\u0641\u062A \u0648\u0636\u0639\u06CC\u062A \u0648 \u062A\u0639\u062F\u0627\u062F \u0634\u0627\u0646\u0633\u200C\u0647\u0627\u06CC \u06A9\u0627\u0631\u0628\u0631 \u062F\u0631 \u06CC\u06A9 \u06A9\u0645\u067E\u06CC\u0646" }), + (0, swagger_12.ApiQuery)({ name: "campaignId", required: false, description: "\u0634\u0646\u0627\u0633\u0647 \u06A9\u0645\u067E\u06CC\u0646 \u0645\u0648\u0631\u062F \u0646\u0638\u0631" }), + __param2(0, (0, current_user_decorator_1.CurrentUser)("id")), + __param2(1, (0, common_12.Query)("campaignId")), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String, String]), + __metadata2("design:returntype", Promise) + ], UserController.prototype, "getMyChances", null); + __decorate2([ + (0, common_12.Get)("prizes"), + (0, swagger_12.ApiOperation)({ summary: "\u062A\u0627\u0631\u06CC\u062E\u0686\u0647 \u062A\u0645\u0627\u0645 \u062C\u0648\u0627\u06CC\u0632 \u0628\u0631\u0646\u062F\u0647 \u0634\u062F\u0647 \u062A\u0648\u0633\u0637 \u06A9\u0627\u0631\u0628\u0631 (\u062C\u0648\u0627\u06CC\u0632 \u0645\u0646)" }), + __param2(0, (0, current_user_decorator_1.CurrentUser)("id")), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String]), + __metadata2("design:returntype", Promise) + ], UserController.prototype, "getMyPrizes", null); + exports2.UserController = UserController = __decorate2([ + (0, swagger_12.ApiTags)("User (\u06A9\u0627\u0631\u0628\u0631 \u0644\u0627\u06AF\u06CC\u0646\u200C\u0634\u062F\u0647)"), + (0, common_12.Controller)("me"), + (0, common_12.UseGuards)(jwt_user_guard_1.JwtUserGuard), + (0, swagger_12.ApiBearerAuth)("UserAuth"), + __metadata2("design:paramtypes", [user_service_1.UserService]) + ], UserController); + } +}); + +// dist/src/modules/user/user.module.js +var require_user_module = __commonJS({ + "dist/src/modules/user/user.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UserModule = void 0; + var common_12 = require_common(); + var chance_module_1 = require_chance_module(); + var admin_user_controller_1 = require_admin_user_controller(); + var user_controller_1 = require_user_controller(); + var user_service_1 = require_user_service(); + var UserModule = class UserModule { + }; + exports2.UserModule = UserModule; + exports2.UserModule = UserModule = __decorate2([ + (0, common_12.Module)({ + imports: [chance_module_1.ChanceModule], + controllers: [user_controller_1.UserController, admin_user_controller_1.AdminUserController], + providers: [user_service_1.UserService], + exports: [user_service_1.UserService] + }) + ], UserModule); + } +}); + +// dist/src/modules/winner/winner.service.js +var require_winner_service = __commonJS({ + "dist/src/modules/winner/winner.service.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var WinnerService_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WinnerService = void 0; + var common_12 = require_common(); + var schedule_1 = require_schedule(); + var client_1 = require("@prisma/client"); + var ExcelJS = require_excel(); + var prisma_service_12 = require_prisma_service(); + var WinnerService = WinnerService_1 = class WinnerService { + constructor(prisma) { + this.prisma = prisma; + this.logger = new common_12.Logger(WinnerService_1.name); + } + async findAllUserPrizes(query) { + const page = Number(query.page) || 1; + const pageSize = Number(query.pageSize) || 20; + const skip = (page - 1) * pageSize; + const where = {}; + if (query.campaignId) + where.campaignId = query.campaignId; + if (query.status) + where.status = query.status; + if (query.search) { + where.OR = [ + { code: { contains: query.search } }, + { user: { mobile: { contains: query.search } } }, + { user: { name: { contains: query.search, mode: "insensitive" } } }, + { prize: { title: { contains: query.search, mode: "insensitive" } } } + ]; + } + const [data, total] = await Promise.all([ + this.prisma.userPrize.findMany({ + where, + skip, + take: pageSize, + orderBy: { wonAt: "desc" }, + include: { + user: { select: { id: true, mobile: true, name: true } }, + prize: { select: { id: true, title: true, type: true, image: true } }, + campaign: { select: { id: true, title: true, slug: true } } + } + }), + this.prisma.userPrize.count({ where }) + ]); + const formatFarsiDateTime = (d) => { + if (!d) + return null; + try { + return new Intl.DateTimeFormat("fa-IR", { + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit" + }).format(new Date(d)); + } catch { + return null; + } + }; + const enrichedData = data.map((item) => ({ + ...item, + createdAt: item.wonAt, + wonAtFormatted: formatFarsiDateTime(item.wonAt), + redeemedAtFormatted: formatFarsiDateTime(item.redeemedAt), + prizeType: item.prize?.type + })); + return { + data: enrichedData, + meta: { + page, + pageSize, + total, + totalPages: Math.ceil(total / pageSize) + } + }; + } + async updatePrizeStatus(id, dto, adminId, ip) { + const userPrize = await this.prisma.userPrize.findUnique({ + where: { id }, + include: { + user: { select: { mobile: true } }, + prize: { select: { title: true, type: true } } + } + }); + if (!userPrize) { + throw new common_12.NotFoundException("\u062C\u0627\u06CC\u0632\u0647 \u0628\u0631\u0646\u062F\u0647 \u0645\u0648\u0631\u062F \u0646\u0638\u0631 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F."); + } + const oldStatus = userPrize.status; + const newStatus = dto.status; + const updated = await this.prisma.userPrize.update({ + where: { id }, + data: { + status: newStatus, + redeemedAt: ["DELIVERED", "USED"].includes(newStatus) ? /* @__PURE__ */ new Date() : userPrize.redeemedAt + } + }); + await this.prisma.adminLog.create({ + data: { + adminId, + action: "user_prize.update_status", + entityType: "user_prize", + entityId: id, + oldValue: { status: oldStatus }, + newValue: { + status: newStatus, + userMobile: userPrize.user.mobile, + prizeTitle: userPrize.prize.title + }, + ip + } + }); + return updated; + } + async exportWinnersExcel(query) { + const where = {}; + if (query.campaignId) + where.campaignId = query.campaignId; + if (query.status) + where.status = query.status; + const items = await this.prisma.userPrize.findMany({ + where, + orderBy: { wonAt: "desc" }, + include: { + user: { select: { mobile: true, name: true } }, + prize: { select: { title: true, type: true } }, + campaign: { select: { title: true } } + } + }); + const workbook = new ExcelJS.Workbook(); + const worksheet = workbook.addWorksheet("Winners"); + worksheet.columns = [ + { header: "\u0634\u0646\u0627\u0633\u0647 \u0628\u0631\u062F", key: "id", width: 36 }, + { header: "\u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644", key: "mobile", width: 16 }, + { header: "\u0646\u0627\u0645 \u06A9\u0627\u0631\u0628\u0631", key: "name", width: 20 }, + { header: "\u06A9\u0645\u067E\u06CC\u0646", key: "campaign", width: 25 }, + { header: "\u0639\u0646\u0648\u0627\u0646 \u062C\u0627\u06CC\u0632\u0647", key: "prize", width: 25 }, + { header: "\u0646\u0648\u0639 \u062C\u0627\u06CC\u0632\u0647", key: "type", width: 16 }, + { header: "\u06A9\u062F \u062C\u0627\u06CC\u0632\u0647", key: "code", width: 20 }, + { header: "\u0648\u0636\u0639\u06CC\u062A", key: "status", width: 16 }, + { header: "\u062A\u0627\u0631\u06CC\u062E \u0628\u0631\u062F", key: "wonAt", width: 24 }, + { header: "\u062A\u0627\u0631\u06CC\u062E \u062A\u062D\u0648\u06CC\u0644 / \u0645\u0635\u0631\u0641", key: "redeemedAt", width: 24 } + ]; + items.forEach((item) => { + worksheet.addRow({ + id: item.id, + mobile: item.user.mobile, + name: item.user.name || "-", + campaign: item.campaign.title, + prize: item.prize.title, + type: item.prize.type, + code: item.code || "-", + status: item.status, + wonAt: item.wonAt.toISOString(), + redeemedAt: item.redeemedAt ? item.redeemedAt.toISOString() : "-" + }); + }); + return workbook.xlsx.writeBuffer(); + } + async findAllSpins(query) { + const page = Number(query.page) || 1; + const pageSize = Number(query.pageSize) || 20; + const skip = (page - 1) * pageSize; + const where = {}; + if (query.campaignId) + where.campaignId = query.campaignId; + if (query.prizeId) + where.prizeId = query.prizeId; + if (query.search) { + where.OR = [ + { user: { mobile: { contains: query.search } } }, + { prize: { title: { contains: query.search, mode: "insensitive" } } }, + { idempotencyKey: { contains: query.search } } + ]; + } + const [data, total] = await Promise.all([ + this.prisma.spin.findMany({ + where, + skip, + take: pageSize, + orderBy: { createdAt: "desc" }, + include: { + user: { select: { id: true, mobile: true, name: true } }, + prize: { select: { id: true, title: true, type: true, segmentColor: true } }, + campaign: { select: { id: true, title: true } }, + userPrize: { select: { code: true, status: true } } + } + }), + this.prisma.spin.count({ where }) + ]); + const formatFarsiDateTime = (d) => { + if (!d) + return null; + try { + return new Intl.DateTimeFormat("fa-IR", { + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit" + }).format(new Date(d)); + } catch { + return null; + } + }; + const enrichedData = data.map((item) => ({ + ...item, + createdAtFormatted: formatFarsiDateTime(item.createdAt), + prizeType: item.prize?.type + })); + return { + data: enrichedData, + meta: { + page, + pageSize, + total, + totalPages: Math.ceil(total / pageSize) + } + }; + } + async exportSpinsExcel(query) { + const where = {}; + if (query.campaignId) + where.campaignId = query.campaignId; + const items = await this.prisma.spin.findMany({ + where, + orderBy: { createdAt: "desc" }, + include: { + user: { select: { mobile: true, name: true } }, + prize: { select: { title: true, type: true } }, + campaign: { select: { title: true } } + } + }); + const workbook = new ExcelJS.Workbook(); + const worksheet = workbook.addWorksheet("Spins"); + worksheet.columns = [ + { header: "\u0634\u0646\u0627\u0633\u0647 \u0627\u0633\u067E\u06CC\u0646", key: "id", width: 36 }, + { header: "\u0645\u0648\u0628\u0627\u06CC\u0644 \u06A9\u0627\u0631\u0628\u0631", key: "mobile", width: 16 }, + { header: "\u06A9\u0645\u067E\u06CC\u0646", key: "campaign", width: 25 }, + { header: "\u062C\u0627\u06CC\u0632\u0647 \u062A\u0639\u06CC\u06CC\u0646\u200C\u0634\u062F\u0647", key: "prize", width: 25 }, + { header: "\u0646\u0648\u0639 \u062C\u0627\u06CC\u0632\u0647", key: "type", width: 16 }, + { header: "\u06A9\u0644\u06CC\u062F Idempotency", key: "key", width: 36 }, + { header: "IP \u062F\u0631\u062E\u0648\u0627\u0633\u062A", key: "ip", width: 18 }, + { header: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0633\u0627\u0639\u062A", key: "createdAt", width: 24 } + ]; + items.forEach((item) => { + worksheet.addRow({ + id: item.id, + mobile: item.user.mobile, + campaign: item.campaign.title, + prize: item.prize?.title || "\u0628\u062F\u0648\u0646 \u062C\u0627\u06CC\u0632\u0647", + type: item.prize?.type || "-", + key: item.idempotencyKey, + ip: item.ip || "-", + createdAt: item.createdAt.toISOString() + }); + }); + return workbook.xlsx.writeBuffer(); + } + async handlePrizeExpirations() { + this.logger.log("[CRON] Running daily prize expiration check..."); + const now = /* @__PURE__ */ new Date(); + const expiredResult = await this.prisma.userPrize.updateMany({ + where: { + status: { in: [client_1.UserPrizeStatus.NEW, client_1.UserPrizeStatus.ACTIVE_CODE] }, + prize: { + expiresAt: { lt: now } + } + }, + data: { + status: client_1.UserPrizeStatus.EXPIRED + } + }); + this.logger.log(`[CRON] ${expiredResult.count} user prize(s) marked as EXPIRED.`); + } + }; + exports2.WinnerService = WinnerService; + __decorate2([ + (0, schedule_1.Cron)(schedule_1.CronExpression.EVERY_DAY_AT_MIDNIGHT), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", []), + __metadata2("design:returntype", Promise) + ], WinnerService.prototype, "handlePrizeExpirations", null); + exports2.WinnerService = WinnerService = WinnerService_1 = __decorate2([ + (0, common_12.Injectable)(), + __metadata2("design:paramtypes", [prisma_service_12.PrismaService]) + ], WinnerService); + } +}); + +// dist/src/modules/winner/admin-spin.controller.js +var require_admin_spin_controller = __commonJS({ + "dist/src/modules/winner/admin-spin.controller.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminSpinController = void 0; + var common_12 = require_common(); + var swagger_12 = require_swagger(); + var jwt_admin_guard_1 = require_jwt_admin_guard(); + var audit_interceptor_1 = require_audit_interceptor(); + var winner_service_1 = require_winner_service(); + var AdminSpinController = class AdminSpinController { + constructor(winnerService) { + this.winnerService = winnerService; + } + async findAll(query) { + return this.winnerService.findAllSpins(query); + } + async export(query, res) { + const buffer = await this.winnerService.exportSpinsExcel(query); + res.send(buffer); + } + }; + exports2.AdminSpinController = AdminSpinController; + __decorate2([ + (0, common_12.Get)(), + (0, swagger_12.ApiOperation)({ summary: "\u0644\u06CC\u0633\u062A \u062A\u0627\u0631\u06CC\u062E\u0686\u0647 \u062A\u0645\u0627\u0645 \u0686\u0631\u062E\u0627\u0646\u062F\u0646\u200C\u0647\u0627\u06CC \u06AF\u0631\u062F\u0648\u0646\u0647 \u0628\u0627 \u0641\u06CC\u0644\u062A\u0631 \u0648 \u062C\u0633\u062A\u062C\u0648" }), + (0, swagger_12.ApiQuery)({ name: "page", required: false }), + (0, swagger_12.ApiQuery)({ name: "pageSize", required: false }), + (0, swagger_12.ApiQuery)({ name: "campaignId", required: false }), + (0, swagger_12.ApiQuery)({ name: "prizeId", required: false }), + (0, swagger_12.ApiQuery)({ name: "search", required: false }), + __param2(0, (0, common_12.Query)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [Object]), + __metadata2("design:returntype", Promise) + ], AdminSpinController.prototype, "findAll", null); + __decorate2([ + (0, common_12.Get)("export"), + (0, swagger_12.ApiOperation)({ summary: "\u062E\u0631\u0648\u062C\u06CC \u0641\u0627\u06CC\u0644 \u0627\u06A9\u0633\u0644 \u0627\u0632 \u062A\u0627\u0631\u06CC\u062E\u0686\u0647 \u062A\u0645\u0627\u0645 \u0627\u0633\u067E\u06CC\u0646\u200C\u0647\u0627" }), + (0, common_12.Header)("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"), + (0, common_12.Header)("Content-Disposition", "attachment; filename=spins.xlsx"), + __param2(0, (0, common_12.Query)()), + __param2(1, (0, common_12.Res)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [Object, Object]), + __metadata2("design:returntype", Promise) + ], AdminSpinController.prototype, "export", null); + exports2.AdminSpinController = AdminSpinController = __decorate2([ + (0, swagger_12.ApiTags)("Admin Spins (\u062A\u0627\u0631\u06CC\u062E\u0686\u0647 \u0627\u0633\u067E\u06CC\u0646\u200C\u0647\u0627)"), + (0, common_12.Controller)("admin/spins"), + (0, common_12.UseGuards)(jwt_admin_guard_1.JwtAdminGuard), + (0, common_12.UseInterceptors)(audit_interceptor_1.AuditInterceptor), + (0, swagger_12.ApiBearerAuth)("AdminAuth"), + __metadata2("design:paramtypes", [winner_service_1.WinnerService]) + ], AdminSpinController); + } +}); + +// dist/src/modules/winner/dto/update-prize-status.dto.js +var require_update_prize_status_dto = __commonJS({ + "dist/src/modules/winner/dto/update-prize-status.dto.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UpdatePrizeStatusDto = void 0; + var swagger_12 = require_swagger(); + var client_1 = require("@prisma/client"); + var class_validator_1 = require_cjs(); + var UpdatePrizeStatusDto = class { + }; + exports2.UpdatePrizeStatusDto = UpdatePrizeStatusDto; + __decorate2([ + (0, swagger_12.ApiProperty)({ + enum: client_1.UserPrizeStatus, + example: client_1.UserPrizeStatus.DELIVERED, + description: "\u0648\u0636\u0639\u06CC\u062A \u062C\u062F\u06CC\u062F \u062C\u0627\u06CC\u0632\u0647 \u0628\u0631\u0646\u062F\u0647" + }), + (0, class_validator_1.IsEnum)(client_1.UserPrizeStatus, { message: "\u0648\u0636\u0639\u06CC\u062A \u0627\u0646\u062A\u062E\u0627\u0628 \u0634\u062F\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A" }), + (0, class_validator_1.IsNotEmpty)(), + __metadata2("design:type", String) + ], UpdatePrizeStatusDto.prototype, "status", void 0); + } +}); + +// dist/src/modules/winner/admin-winner.controller.js +var require_admin_winner_controller = __commonJS({ + "dist/src/modules/winner/admin-winner.controller.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata2 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param2 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminWinnerController = void 0; + var common_12 = require_common(); + var swagger_12 = require_swagger(); + var current_admin_decorator_1 = require_current_admin_decorator(); + var jwt_admin_guard_1 = require_jwt_admin_guard(); + var audit_interceptor_1 = require_audit_interceptor(); + var update_prize_status_dto_1 = require_update_prize_status_dto(); + var winner_service_1 = require_winner_service(); + var AdminWinnerController = class AdminWinnerController { + constructor(winnerService) { + this.winnerService = winnerService; + } + async findAll(query) { + return this.winnerService.findAllUserPrizes(query); + } + async updateStatus(id, dto, adminId, req) { + const ip = req.ip || req.headers["x-forwarded-for"]; + return this.winnerService.updatePrizeStatus(id, dto, adminId, ip); + } + async export(query, res) { + const buffer = await this.winnerService.exportWinnersExcel(query); + res.send(buffer); + } + }; + exports2.AdminWinnerController = AdminWinnerController; + __decorate2([ + (0, common_12.Get)(), + (0, swagger_12.ApiOperation)({ summary: "\u0644\u06CC\u0633\u062A \u0628\u0631\u0646\u062F\u06AF\u0627\u0646 \u0628\u0627 \u0641\u06CC\u0644\u062A\u0631 \u06A9\u0645\u067E\u06CC\u0646\u060C \u0648\u0636\u0639\u06CC\u062A \u062C\u0627\u06CC\u0632\u0647 \u0648 \u062C\u0633\u062A\u062C\u0648" }), + (0, swagger_12.ApiQuery)({ name: "page", required: false }), + (0, swagger_12.ApiQuery)({ name: "pageSize", required: false }), + (0, swagger_12.ApiQuery)({ name: "campaignId", required: false }), + (0, swagger_12.ApiQuery)({ name: "status", required: false }), + (0, swagger_12.ApiQuery)({ name: "search", required: false }), + __param2(0, (0, common_12.Query)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [Object]), + __metadata2("design:returntype", Promise) + ], AdminWinnerController.prototype, "findAll", null); + __decorate2([ + (0, common_12.Patch)(":id/status"), + (0, swagger_12.ApiOperation)({ summary: "\u062A\u063A\u06CC\u06CC\u0631 \u0648\u0636\u0639\u06CC\u062A \u062C\u0627\u06CC\u0632\u0647 \u0628\u0631\u0646\u062F\u0647 (\u062A\u062D\u0648\u06CC\u0644 \u0634\u062F / \u062A\u0645\u0627\u0633 \u06AF\u0631\u0641\u062A\u0647 \u0634\u062F / \u0645\u0646\u0642\u0636\u06CC \u0634\u062F)" }), + __param2(0, (0, common_12.Param)("id")), + __param2(1, (0, common_12.Body)()), + __param2(2, (0, current_admin_decorator_1.CurrentAdmin)("id")), + __param2(3, (0, common_12.Req)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [String, update_prize_status_dto_1.UpdatePrizeStatusDto, String, Object]), + __metadata2("design:returntype", Promise) + ], AdminWinnerController.prototype, "updateStatus", null); + __decorate2([ + (0, common_12.Get)("export"), + (0, swagger_12.ApiOperation)({ summary: "\u062E\u0631\u0648\u062C\u06CC \u0641\u0627\u06CC\u0644 \u0627\u06A9\u0633\u0644 \u0627\u0632 \u0644\u06CC\u0633\u062A \u0628\u0631\u0646\u062F\u06AF\u0627\u0646" }), + (0, common_12.Header)("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"), + (0, common_12.Header)("Content-Disposition", "attachment; filename=winners.xlsx"), + __param2(0, (0, common_12.Query)()), + __param2(1, (0, common_12.Res)()), + __metadata2("design:type", Function), + __metadata2("design:paramtypes", [Object, Object]), + __metadata2("design:returntype", Promise) + ], AdminWinnerController.prototype, "export", null); + exports2.AdminWinnerController = AdminWinnerController = __decorate2([ + (0, swagger_12.ApiTags)("Admin Winners (\u0645\u062F\u06CC\u0631\u06CC\u062A \u0628\u0631\u0646\u062F\u06AF\u0627\u0646)"), + (0, common_12.Controller)("admin/user-prizes"), + (0, common_12.UseGuards)(jwt_admin_guard_1.JwtAdminGuard), + (0, common_12.UseInterceptors)(audit_interceptor_1.AuditInterceptor), + (0, swagger_12.ApiBearerAuth)("AdminAuth"), + __metadata2("design:paramtypes", [winner_service_1.WinnerService]) + ], AdminWinnerController); + } +}); + +// dist/src/modules/winner/winner.module.js +var require_winner_module = __commonJS({ + "dist/src/modules/winner/winner.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WinnerModule = void 0; + var common_12 = require_common(); + var admin_spin_controller_1 = require_admin_spin_controller(); + var admin_winner_controller_1 = require_admin_winner_controller(); + var winner_service_1 = require_winner_service(); + var WinnerModule = class WinnerModule { + }; + exports2.WinnerModule = WinnerModule; + exports2.WinnerModule = WinnerModule = __decorate2([ + (0, common_12.Module)({ + controllers: [admin_winner_controller_1.AdminWinnerController, admin_spin_controller_1.AdminSpinController], + providers: [winner_service_1.WinnerService], + exports: [winner_service_1.WinnerService] + }) + ], WinnerModule); + } +}); + +// dist/src/prisma/prisma.module.js +var require_prisma_module = __commonJS({ + "dist/src/prisma/prisma.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PrismaModule = void 0; + var common_12 = require_common(); + var prisma_service_12 = require_prisma_service(); + var PrismaModule = class PrismaModule { + }; + exports2.PrismaModule = PrismaModule; + exports2.PrismaModule = PrismaModule = __decorate2([ + (0, common_12.Global)(), + (0, common_12.Module)({ + providers: [prisma_service_12.PrismaService], + exports: [prisma_service_12.PrismaService] + }) + ], PrismaModule); + } +}); + +// dist/src/app.module.js +var require_app_module = __commonJS({ + "dist/src/app.module.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AppModule = void 0; + var bullmq_1 = require_dist6(); + var common_12 = require_common(); + var config_12 = require_config2(); + var schedule_1 = require_schedule(); + var throttler_1 = require_dist9(); + var env_validation_1 = require_env_validation(); + var admin_audit_module_1 = require_admin_audit_module(); + var admin_auth_module_1 = require_admin_auth_module(); + var auth_module_1 = require_auth_module(); + var campaign_module_1 = require_campaign_module(); + var chance_module_1 = require_chance_module(); + var prize_module_1 = require_prize_module(); + var report_module_1 = require_report_module(); + var sms_module_1 = require_sms_module(); + var spin_engine_module_1 = require_spin_engine_module(); + var storage_module_1 = require_storage_module(); + var user_module_1 = require_user_module(); + var winner_module_1 = require_winner_module(); + var prisma_module_1 = require_prisma_module(); + var AppModule = class AppModule { + }; + exports2.AppModule = AppModule; + exports2.AppModule = AppModule = __decorate2([ + (0, common_12.Module)({ + imports: [ + config_12.ConfigModule.forRoot({ + isGlobal: true, + validate: env_validation_1.validateEnv, + envFilePath: ".env" + }), + schedule_1.ScheduleModule.forRoot(), + throttler_1.ThrottlerModule.forRoot([ + { + name: "default", + ttl: 6e4, + limit: 60 + } + ]), + bullmq_1.BullModule.forRootAsync({ + imports: [config_12.ConfigModule], + useFactory: (configService) => ({ + connection: { + host: configService.get("REDIS_HOST", "localhost"), + port: configService.get("REDIS_PORT", 6379), + password: configService.get("REDIS_PASSWORD") || void 0 + } + }), + inject: [config_12.ConfigService] + }), + prisma_module_1.PrismaModule, + auth_module_1.AuthModule, + admin_auth_module_1.AdminAuthModule, + storage_module_1.StorageModule, + campaign_module_1.CampaignModule, + prize_module_1.PrizeModule, + chance_module_1.ChanceModule, + user_module_1.UserModule, + sms_module_1.SmsModule, + spin_engine_module_1.SpinEngineModule, + winner_module_1.WinnerModule, + report_module_1.ReportModule, + admin_audit_module_1.AdminAuditModule + ] + }) + ], AppModule); + } +}); + +// dist/src/common/filters/all-exceptions.filter.js +var require_all_exceptions_filter = __commonJS({ + "dist/src/common/filters/all-exceptions.filter.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var AllExceptionsFilter_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AllExceptionsFilter = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var AllExceptionsFilter = AllExceptionsFilter_1 = class AllExceptionsFilter { + constructor() { + this.logger = new common_12.Logger(AllExceptionsFilter_1.name); + } + catch(exception, host) { + const ctx = host.switchToHttp(); + const response = ctx.getResponse(); + let status = common_12.HttpStatus.INTERNAL_SERVER_ERROR; + let message = "Internal server error"; + let errorCode = "INTERNAL_ERROR"; + if (exception instanceof common_12.HttpException) { + status = exception.getStatus(); + const res = exception.getResponse(); + if (typeof res === "object" && res !== null) { + const anyRes = res; + message = anyRes.message || exception.message; + errorCode = anyRes.error || anyRes.errorCode || this.getErrorCodeFromStatus(status); + } else { + message = exception.message; + errorCode = this.getErrorCodeFromStatus(status); + } + } else if (exception instanceof client_1.Prisma.PrismaClientKnownRequestError) { + if (exception.code === "P2002") { + status = common_12.HttpStatus.CONFLICT; + message = "A resource with this identifier already exists (duplicate entry)."; + errorCode = "DUPLICATE_ENTRY"; + } else if (exception.code === "P2025") { + status = common_12.HttpStatus.NOT_FOUND; + message = "Record to update or delete not found."; + errorCode = "NOT_FOUND"; + } else { + status = common_12.HttpStatus.BAD_REQUEST; + message = `Database query error: ${exception.code}`; + errorCode = "DATABASE_ERROR"; + } + } else if (exception instanceof Error) { + this.logger.error(exception.message, exception.stack); + message = exception.message; + } + response.status(status).json({ + success: false, + statusCode: status, + errorCode, + message, + timestamp: (/* @__PURE__ */ new Date()).toISOString() + }); + } + getErrorCodeFromStatus(status) { + switch (status) { + case common_12.HttpStatus.BAD_REQUEST: + return "BAD_REQUEST"; + case common_12.HttpStatus.UNAUTHORIZED: + return "UNAUTHORIZED"; + case common_12.HttpStatus.FORBIDDEN: + return "FORBIDDEN"; + case common_12.HttpStatus.NOT_FOUND: + return "NOT_FOUND"; + case common_12.HttpStatus.CONFLICT: + return "CONFLICT"; + case common_12.HttpStatus.TOO_MANY_REQUESTS: + return "TOO_MANY_REQUESTS"; + default: + return "INTERNAL_ERROR"; + } + } + }; + exports2.AllExceptionsFilter = AllExceptionsFilter; + exports2.AllExceptionsFilter = AllExceptionsFilter = AllExceptionsFilter_1 = __decorate2([ + (0, common_12.Catch)() + ], AllExceptionsFilter); + } +}); + +// dist/src/common/interceptors/response.interceptor.js +var require_response_interceptor = __commonJS({ + "dist/src/common/interceptors/response.interceptor.js"(exports2) { + "use strict"; + var __decorate2 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ResponseInterceptor = void 0; + var common_12 = require_common(); + var operators_1 = require_operators(); + var ResponseInterceptor = class ResponseInterceptor { + intercept(context, next) { + return next.handle().pipe((0, operators_1.map)((data) => { + if (data && typeof data === "object" && ("success" in data || "data" in data)) { + return data; + } + return { + success: true, + data + }; + })); + } + }; + exports2.ResponseInterceptor = ResponseInterceptor; + exports2.ResponseInterceptor = ResponseInterceptor = __decorate2([ + (0, common_12.Injectable)() + ], ResponseInterceptor); + } +}); + +// dist/src/main.js +Object.defineProperty(exports, "__esModule", { value: true }); +var common_1 = require_common(); +var config_1 = require_config2(); +var core_1 = require_core3(); +var swagger_1 = require_swagger(); +var helmet_1 = require_helmet(); +var path_1 = require("path"); +var app_module_1 = require_app_module(); +var all_exceptions_filter_1 = require_all_exceptions_filter(); +var response_interceptor_1 = require_response_interceptor(); +var prisma_service_1 = require_prisma_service(); +async function bootstrap() { + const app = await core_1.NestFactory.create(app_module_1.AppModule); + const configService = app.get(config_1.ConfigService); + app.use((0, helmet_1.default)({ + crossOriginResourcePolicy: { policy: "cross-origin" } + })); + const adminOrigin = configService.get("CORS_ADMIN_ORIGIN", "http://localhost:5173"); + const clientOrigin = configService.get("CORS_CLIENT_ORIGIN", "http://localhost:5174"); + app.enableCors({ + origin: [adminOrigin, clientOrigin], + credentials: true + }); + app.setGlobalPrefix("api"); + const uploadRoot = configService.get("STORAGE_LOCAL_ROOT", "./uploads"); + app.useStaticAssets((0, path_1.join)(process.cwd(), uploadRoot), { + prefix: "/uploads/" + }); + app.useGlobalPipes(new common_1.ValidationPipe({ + whitelist: true, + forbidNonWhitelisted: false, + transform: true, + transformOptions: { + enableImplicitConversion: true + } + })); + app.useGlobalFilters(new all_exceptions_filter_1.AllExceptionsFilter()); + app.useGlobalInterceptors(new response_interceptor_1.ResponseInterceptor()); + const prismaService = app.get(prisma_service_1.PrismaService); + await prismaService.enableShutdownHooks(app); + const swaggerConfig = new swagger_1.DocumentBuilder().setTitle("Lucky Wheel API").setDescription("\u0645\u0633\u062A\u0646\u062F\u0627\u062A \u062C\u0627\u0645\u0639 \u0648\u0628\u200C\u0633\u0631\u0648\u06CC\u0633 \u0633\u0627\u0645\u0627\u0646\u0647 \u06AF\u0631\u062F\u0648\u0646\u0647 \u0634\u0627\u0646\u0633 \u0648 \u0642\u0631\u0639\u0647\u200C\u06A9\u0634\u06CC").setVersion("1.0").addBearerAuth({ type: "http", scheme: "bearer", bearerFormat: "JWT", in: "header" }, "UserAuth").addBearerAuth({ type: "http", scheme: "bearer", bearerFormat: "JWT", in: "header" }, "AdminAuth").build(); + const document2 = swagger_1.SwaggerModule.createDocument(app, swaggerConfig); + swagger_1.SwaggerModule.setup("api/docs", app, document2); + const port = configService.get("PORT", 3e3); + await app.listen(port); + console.log(`Application is running on: http://localhost:${port}`); + console.log(`Swagger documentation: http://localhost:${port}/api/docs`); +} +bootstrap(); +/*! Bundled license information: + +reflect-metadata/Reflect.js: + (*! ***************************************************************************** + Copyright (C) Microsoft. All rights reserved. + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + this file except in compliance with the License. You may obtain a copy of the + License at http://www.apache.org/licenses/LICENSE-2.0 + + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED + WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, + MERCHANTABLITY OR NON-INFRINGEMENT. + + See the Apache Version 2.0 License for specific language governing permissions + and limitations under the License. + ***************************************************************************** *) + +depd/index.js: + (*! + * depd + * Copyright(c) 2014-2018 Douglas Christopher Wilson + * MIT Licensed + *) + +bytes/index.js: + (*! + * bytes + * Copyright(c) 2012-2014 TJ Holowaychuk + * Copyright(c) 2015 Jed Watson + * MIT Licensed + *) + +content-type/index.js: + (*! + * content-type + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) + +statuses/index.js: + (*! + * statuses + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + *) + +toidentifier/index.js: + (*! + * toidentifier + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + *) + +http-errors/index.js: + (*! + * http-errors + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + *) + +destroy/index.js: + (*! + * destroy + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +unpipe/index.js: + (*! + * unpipe + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) + +raw-body/index.js: + (*! + * raw-body + * Copyright(c) 2013-2014 Jonathan Ong + * Copyright(c) 2014-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +ee-first/index.js: + (*! + * ee-first + * Copyright(c) 2014 Jonathan Ong + * MIT Licensed + *) + +on-finished/index.js: + (*! + * on-finished + * Copyright(c) 2013 Jonathan Ong + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + *) + +body-parser/lib/read.js: +body-parser/lib/types/raw.js: +body-parser/lib/types/text.js: +body-parser/index.js: + (*! + * body-parser + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +media-typer/index.js: + (*! + * media-typer + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + *) + +mime-db/index.js: + (*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +mime-types/index.js: + (*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) + +type-is/index.js: + (*! + * type-is + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +body-parser/lib/types/json.js: +body-parser/lib/types/urlencoded.js: + (*! + * body-parser + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +object-assign/index.js: + (* + object-assign + (c) Sindre Sorhus + @license MIT + *) + +vary/index.js: + (*! + * vary + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + *) + +merge-descriptors/index.js: + (*! + * merge-descriptors + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) + +encodeurl/index.js: + (*! + * encodeurl + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + *) + +escape-html/index.js: + (*! + * escape-html + * Copyright(c) 2012-2013 TJ Holowaychuk + * Copyright(c) 2015 Andreas Lubbe + * Copyright(c) 2015 Tiancheng "Timothy" Gu + * MIT Licensed + *) + +parseurl/index.js: + (*! + * parseurl + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + *) + +finalhandler/index.js: + (*! + * finalhandler + * Copyright(c) 2014-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +express/lib/router/layer.js: +express/lib/router/route.js: +express/lib/router/index.js: +express/lib/middleware/init.js: +express/lib/middleware/query.js: +express/lib/view.js: +express/lib/application.js: +express/lib/request.js: +express/lib/express.js: +express/index.js: + (*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +methods/index.js: + (*! + * methods + * Copyright(c) 2013-2014 TJ Holowaychuk + * Copyright(c) 2015-2016 Douglas Christopher Wilson + * MIT Licensed + *) + +safe-buffer/index.js: + (*! safe-buffer. MIT License. Feross Aboukhadijeh *) + +content-disposition/index.js: + (*! + * content-disposition + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + *) + +etag/index.js: + (*! + * etag + * Copyright(c) 2014-2016 Douglas Christopher Wilson + * MIT Licensed + *) + +fresh/index.js: + (*! + * fresh + * Copyright(c) 2012 TJ Holowaychuk + * Copyright(c) 2016-2017 Douglas Christopher Wilson + * MIT Licensed + *) + +range-parser/index.js: + (*! + * range-parser + * Copyright(c) 2012-2014 TJ Holowaychuk + * Copyright(c) 2015-2016 Douglas Christopher Wilson + * MIT Licensed + *) + +send/index.js: + (*! + * send + * Copyright(c) 2012 TJ Holowaychuk + * Copyright(c) 2014-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +forwarded/index.js: + (*! + * forwarded + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + *) + +proxy-addr/index.js: + (*! + * proxy-addr + * Copyright(c) 2014-2016 Douglas Christopher Wilson + * MIT Licensed + *) + +express/lib/utils.js: +express/lib/response.js: + (*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +negotiator/index.js: + (*! + * negotiator + * Copyright(c) 2012 Federico Romero + * Copyright(c) 2012-2014 Isaac Z. Schlueter + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) + +accepts/index.js: + (*! + * accepts + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) + +cookie/index.js: + (*! + * cookie + * Copyright(c) 2012-2014 Roman Shtylman + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) + +serve-static/index.js: + (*! + * serve-static + * Copyright(c) 2010 Sencha Inc. + * Copyright(c) 2011 TJ Holowaychuk + * Copyright(c) 2014-2016 Douglas Christopher Wilson + * MIT Licensed + *) + +lodash/lodash.js: + (** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + *) + +xmlchars/xml/1.0/ed5.js: + (** + * Character classes and associated utilities for the 5th edition of XML 1.0. + * + * @author Louis-Dominique Dubeau + * @license MIT + * @copyright Louis-Dominique Dubeau + *) + +xmlchars/xml/1.1/ed2.js: + (** + * Character classes and associated utilities for the 2nd edition of XML 1.1. + * + * @author Louis-Dominique Dubeau + * @license MIT + * @copyright Louis-Dominique Dubeau + *) + +xmlchars/xmlns/1.0/ed3.js: + (** + * Character class utilities for XML NS 1.0 edition 3. + * + * @author Louis-Dominique Dubeau + * @license MIT + * @copyright Louis-Dominique Dubeau + *) + +normalize-path/index.js: + (*! + * normalize-path + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * Released under the MIT License. + *) + +archiver/lib/error.js: +archiver/lib/core.js: + (** + * Archiver Core + * + * @ignore + * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE} + * @copyright (c) 2012-2014 Chris Talkington, contributors. + *) + +crc-32/crc32.js: + (*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com *) + +zip-stream/index.js: + (** + * ZipStream + * + * @ignore + * @license [MIT]{@link https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE} + * @copyright (c) 2014 Chris Talkington, contributors. + *) + +archiver/lib/plugins/zip.js: + (** + * ZIP Format Plugin + * + * @module plugins/zip + * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE} + * @copyright (c) 2012-2014 Chris Talkington, contributors. + *) + +archiver/lib/plugins/tar.js: + (** + * TAR Format Plugin + * + * @module plugins/tar + * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE} + * @copyright (c) 2012-2014 Chris Talkington, contributors. + *) + +archiver/lib/plugins/json.js: + (** + * JSON Format Plugin + * + * @module plugins/json + * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE} + * @copyright (c) 2012-2014 Chris Talkington, contributors. + *) + +archiver/index.js: + (** + * Archiver Vending + * + * @ignore + * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE} + * @copyright (c) 2012-2014 Chris Talkington, contributors. + *) + +tmp/lib/tmp.js: + (*! + * Tmp + * + * Copyright (c) 2011-2017 KARASZI Istvan + * + * MIT Licensed + *) +*/ diff --git a/apps/api/release/migrations/20260909192201_init/migration.sql b/apps/api/release/migrations/20260909192201_init/migration.sql new file mode 100644 index 0000000..bc82dae --- /dev/null +++ b/apps/api/release/migrations/20260909192201_init/migration.sql @@ -0,0 +1,320 @@ +-- CreateEnum +CREATE TYPE "AdminStatus" AS ENUM ('ACTIVE', 'DISABLED'); + +-- CreateEnum +CREATE TYPE "AdminRole" AS ENUM ('SUPER_ADMIN', 'OPERATOR', 'SUPPORT'); + +-- CreateEnum +CREATE TYPE "UserStatus" AS ENUM ('ACTIVE', 'BLOCKED'); + +-- CreateEnum +CREATE TYPE "CampaignStatus" AS ENUM ('DRAFT', 'ACTIVE', 'PAUSED', 'FINISHED'); + +-- CreateEnum +CREATE TYPE "PrizeType" AS ENUM ('PHYSICAL', 'DISCOUNT_CODE', 'CREDIT', 'CASH', 'NO_PRIZE', 'OTHER'); + +-- CreateEnum +CREATE TYPE "StockType" AS ENUM ('LIMITED', 'UNLIMITED'); + +-- CreateEnum +CREATE TYPE "PrizeStatus" AS ENUM ('ACTIVE', 'INACTIVE'); + +-- CreateEnum +CREATE TYPE "SpinStatus" AS ENUM ('SUCCESS', 'FAILED', 'DUPLICATE'); + +-- CreateEnum +CREATE TYPE "ChanceTxnType" AS ENUM ('SIGNUP_BONUS', 'ADMIN_ADJUSTMENT', 'SPIN_CONSUME', 'CAMPAIGN_BONUS', 'REFUND'); + +-- CreateEnum +CREATE TYPE "UserPrizeStatus" AS ENUM ('NEW', 'CONTACTED', 'DELIVERED', 'ACTIVE_CODE', 'USED', 'EXPIRED'); + +-- CreateEnum +CREATE TYPE "SmsType" AS ENUM ('OTP', 'WINNING', 'NO_PRIZE', 'PRIZE_REMINDER'); + +-- CreateEnum +CREATE TYPE "SmsStatus" AS ENUM ('PENDING', 'SENT', 'FAILED'); + +-- CreateEnum +CREATE TYPE "WheelDesign" AS ENUM ('CLASSIC_CASINO', 'NEON_CYBER', 'MINIMAL_FLAT', 'LUXURY_GOLD', 'PLAYFUL_CARTOON'); + +-- CreateTable +CREATE TABLE "admins" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "mobile" TEXT NOT NULL, + "email" TEXT NOT NULL, + "password_hash" TEXT NOT NULL, + "role" "AdminRole" NOT NULL DEFAULT 'OPERATOR', + "status" "AdminStatus" NOT NULL DEFAULT 'ACTIVE', + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "admins_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "users" ( + "id" TEXT NOT NULL, + "mobile" TEXT NOT NULL, + "name" TEXT, + "status" "UserStatus" NOT NULL DEFAULT 'ACTIVE', + "last_login_at" TIMESTAMP(3), + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "users_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "otp_codes" ( + "id" TEXT NOT NULL, + "mobile" TEXT NOT NULL, + "code" TEXT NOT NULL, + "user_id" TEXT, + "attempts" INTEGER NOT NULL DEFAULT 0, + "consumed" BOOLEAN NOT NULL DEFAULT false, + "expires_at" TIMESTAMP(3) NOT NULL, + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "otp_codes_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "campaigns" ( + "id" TEXT NOT NULL, + "title" TEXT NOT NULL, + "slug" TEXT NOT NULL, + "description" TEXT, + "image" TEXT, + "banner" TEXT, + "logo" TEXT, + "start_at" TIMESTAMP(3) NOT NULL, + "end_at" TIMESTAMP(3) NOT NULL, + "status" "CampaignStatus" NOT NULL DEFAULT 'DRAFT', + "default_chances" INTEGER NOT NULL DEFAULT 0, + "rules" TEXT, + "cta_text" TEXT, + "wheel_design" "WheelDesign" NOT NULL DEFAULT 'CLASSIC_CASINO', + "settings" JSONB, + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "campaigns_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "prizes" ( + "id" TEXT NOT NULL, + "campaign_id" TEXT NOT NULL, + "title" TEXT NOT NULL, + "description" TEXT, + "image" TEXT, + "type" "PrizeType" NOT NULL, + "stock_type" "StockType" NOT NULL, + "initial_stock" INTEGER, + "remaining_stock" INTEGER, + "weight" INTEGER NOT NULL, + "status" "PrizeStatus" NOT NULL DEFAULT 'ACTIVE', + "sort_order" INTEGER NOT NULL DEFAULT 0, + "segment_color" TEXT NOT NULL, + "expires_at" TIMESTAMP(3), + "sms_template" TEXT, + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "prizes_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "user_campaigns" ( + "id" TEXT NOT NULL, + "user_id" TEXT NOT NULL, + "campaign_id" TEXT NOT NULL, + "total_chances" INTEGER NOT NULL DEFAULT 0, + "used_chances" INTEGER NOT NULL DEFAULT 0, + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "user_campaigns_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "chance_transactions" ( + "id" TEXT NOT NULL, + "user_id" TEXT NOT NULL, + "campaign_id" TEXT NOT NULL, + "amount" INTEGER NOT NULL, + "type" "ChanceTxnType" NOT NULL, + "reference_type" TEXT, + "reference_id" TEXT, + "description" TEXT, + "created_by" TEXT, + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "chance_transactions_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "spins" ( + "id" TEXT NOT NULL, + "user_id" TEXT NOT NULL, + "campaign_id" TEXT NOT NULL, + "prize_id" TEXT, + "status" "SpinStatus" NOT NULL DEFAULT 'SUCCESS', + "idempotency_key" TEXT NOT NULL, + "ip" TEXT, + "user_agent" TEXT, + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "spins_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "user_prizes" ( + "id" TEXT NOT NULL, + "user_id" TEXT NOT NULL, + "campaign_id" TEXT NOT NULL, + "prize_id" TEXT NOT NULL, + "spin_id" TEXT NOT NULL, + "code" TEXT, + "status" "UserPrizeStatus" NOT NULL DEFAULT 'NEW', + "won_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "redeemed_at" TIMESTAMP(3), + + CONSTRAINT "user_prizes_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "sms_logs" ( + "id" TEXT NOT NULL, + "user_id" TEXT, + "mobile" TEXT NOT NULL, + "type" "SmsType" NOT NULL, + "message" TEXT NOT NULL, + "provider" TEXT NOT NULL DEFAULT 'raygansms', + "status" "SmsStatus" NOT NULL DEFAULT 'PENDING', + "provider_response" JSONB, + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "sms_logs_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "admin_logs" ( + "id" TEXT NOT NULL, + "admin_id" TEXT NOT NULL, + "action" TEXT NOT NULL, + "entity_type" TEXT NOT NULL, + "entity_id" TEXT NOT NULL, + "old_value" JSONB, + "new_value" JSONB, + "ip" TEXT, + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "admin_logs_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "admins_mobile_key" ON "admins"("mobile"); + +-- CreateIndex +CREATE UNIQUE INDEX "admins_email_key" ON "admins"("email"); + +-- CreateIndex +CREATE UNIQUE INDEX "users_mobile_key" ON "users"("mobile"); + +-- CreateIndex +CREATE INDEX "users_mobile_idx" ON "users"("mobile"); + +-- CreateIndex +CREATE INDEX "otp_codes_mobile_consumed_idx" ON "otp_codes"("mobile", "consumed"); + +-- CreateIndex +CREATE UNIQUE INDEX "campaigns_slug_key" ON "campaigns"("slug"); + +-- CreateIndex +CREATE INDEX "campaigns_status_start_at_end_at_idx" ON "campaigns"("status", "start_at", "end_at"); + +-- CreateIndex +CREATE INDEX "prizes_campaign_id_status_idx" ON "prizes"("campaign_id", "status"); + +-- CreateIndex +CREATE UNIQUE INDEX "user_campaigns_user_id_campaign_id_key" ON "user_campaigns"("user_id", "campaign_id"); + +-- CreateIndex +CREATE INDEX "chance_transactions_user_id_campaign_id_idx" ON "chance_transactions"("user_id", "campaign_id"); + +-- CreateIndex +CREATE UNIQUE INDEX "spins_idempotency_key_key" ON "spins"("idempotency_key"); + +-- CreateIndex +CREATE INDEX "spins_user_id_campaign_id_idx" ON "spins"("user_id", "campaign_id"); + +-- CreateIndex +CREATE INDEX "spins_campaign_id_created_at_idx" ON "spins"("campaign_id", "created_at"); + +-- CreateIndex +CREATE UNIQUE INDEX "user_prizes_spin_id_key" ON "user_prizes"("spin_id"); + +-- CreateIndex +CREATE UNIQUE INDEX "user_prizes_code_key" ON "user_prizes"("code"); + +-- CreateIndex +CREATE INDEX "user_prizes_user_id_idx" ON "user_prizes"("user_id"); + +-- CreateIndex +CREATE INDEX "user_prizes_status_idx" ON "user_prizes"("status"); + +-- CreateIndex +CREATE INDEX "sms_logs_mobile_type_idx" ON "sms_logs"("mobile", "type"); + +-- CreateIndex +CREATE INDEX "admin_logs_entity_type_entity_id_idx" ON "admin_logs"("entity_type", "entity_id"); + +-- AddForeignKey +ALTER TABLE "otp_codes" ADD CONSTRAINT "otp_codes_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "prizes" ADD CONSTRAINT "prizes_campaign_id_fkey" FOREIGN KEY ("campaign_id") REFERENCES "campaigns"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "user_campaigns" ADD CONSTRAINT "user_campaigns_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "user_campaigns" ADD CONSTRAINT "user_campaigns_campaign_id_fkey" FOREIGN KEY ("campaign_id") REFERENCES "campaigns"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "chance_transactions" ADD CONSTRAINT "chance_transactions_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "chance_transactions" ADD CONSTRAINT "chance_transactions_campaign_id_fkey" FOREIGN KEY ("campaign_id") REFERENCES "campaigns"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "chance_transactions" ADD CONSTRAINT "chance_transactions_created_by_fkey" FOREIGN KEY ("created_by") REFERENCES "admins"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "spins" ADD CONSTRAINT "spins_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "spins" ADD CONSTRAINT "spins_campaign_id_fkey" FOREIGN KEY ("campaign_id") REFERENCES "campaigns"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "spins" ADD CONSTRAINT "spins_prize_id_fkey" FOREIGN KEY ("prize_id") REFERENCES "prizes"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "user_prizes" ADD CONSTRAINT "user_prizes_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "user_prizes" ADD CONSTRAINT "user_prizes_campaign_id_fkey" FOREIGN KEY ("campaign_id") REFERENCES "campaigns"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "user_prizes" ADD CONSTRAINT "user_prizes_prize_id_fkey" FOREIGN KEY ("prize_id") REFERENCES "prizes"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "user_prizes" ADD CONSTRAINT "user_prizes_spin_id_fkey" FOREIGN KEY ("spin_id") REFERENCES "spins"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "sms_logs" ADD CONSTRAINT "sms_logs_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "admin_logs" ADD CONSTRAINT "admin_logs_admin_id_fkey" FOREIGN KEY ("admin_id") REFERENCES "admins"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/apps/api/release/migrations/20260912194500_add_wheel_designs/migration.sql b/apps/api/release/migrations/20260912194500_add_wheel_designs/migration.sql new file mode 100644 index 0000000..5cc64d7 --- /dev/null +++ b/apps/api/release/migrations/20260912194500_add_wheel_designs/migration.sql @@ -0,0 +1,6 @@ +-- AlterEnum: add 5 new wheel design themes +ALTER TYPE "WheelDesign" ADD VALUE IF NOT EXISTS 'RUSTIC_WOOD'; +ALTER TYPE "WheelDesign" ADD VALUE IF NOT EXISTS 'GALAXY_SPACE'; +ALTER TYPE "WheelDesign" ADD VALUE IF NOT EXISTS 'CANDY_LAND'; +ALTER TYPE "WheelDesign" ADD VALUE IF NOT EXISTS 'FIRE_FLAME'; +ALTER TYPE "WheelDesign" ADD VALUE IF NOT EXISTS 'CRYSTAL_ICE'; diff --git a/apps/api/release/migrations/migration_lock.toml b/apps/api/release/migrations/migration_lock.toml new file mode 100644 index 0000000..fbffa92 --- /dev/null +++ b/apps/api/release/migrations/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "postgresql" \ No newline at end of file diff --git a/apps/api/release/seed.js b/apps/api/release/seed.js new file mode 100644 index 0000000..c17b809 --- /dev/null +++ b/apps/api/release/seed.js @@ -0,0 +1,108 @@ +// prisma/seed.ts +var import_client = require("@prisma/client"); +var prisma = new import_client.PrismaClient(); +async function main() { + console.log("Seeding default demo campaign and prizes..."); + const existingCampaign = await prisma.campaign.findUnique({ + where: { slug: "default-campaign" } + }); + if (existingCampaign) { + console.log("Default campaign already exists."); + return; + } + const campaign = await prisma.campaign.create({ + data: { + title: "\u06AF\u0631\u062F\u0648\u0646\u0647 \u0634\u0627\u0646\u0633 \u062C\u0634\u0646\u0648\u0627\u0631\u0647 \u0628\u0632\u0631\u06AF \u0646\u0648\u0631\u0648\u0632\u06CC", + slug: "default-campaign", + description: "\u0647\u0631 \u0631\u0648\u0632 \u0628\u0627 \u0686\u0631\u062E\u0627\u0646\u062F\u0646 \u06AF\u0631\u062F\u0648\u0646\u0647\u060C \u0634\u0627\u0646\u0633 \u0628\u0631\u0646\u062F\u0647 \u0634\u062F\u0646 \u0622\u06CC\u0641\u0648\u0646\u060C \u0633\u06A9\u0647 \u0637\u0644\u0627\u060C \u0648 \u06A9\u062F\u0647\u0627\u06CC \u062A\u062E\u0641\u06CC\u0641 \u0634\u06AF\u0641\u062A\u200C\u0627\u0646\u06AF\u06CC\u0632 \u0631\u0627 \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u06CC\u062F!", + startAt: new Date(Date.now() - 24 * 3600 * 1e3), + endAt: new Date(Date.now() + 60 * 24 * 3600 * 1e3), + status: "ACTIVE", + defaultChances: 3, + ctaText: "\u0628\u0686\u0631\u062E\u0648\u0646 \u0648 \u0628\u0631\u0646\u062F\u0647 \u0634\u0648!", + wheelDesign: "CLASSIC_CASINO", + rules: "\u06F1. \u0647\u0631 \u06A9\u0627\u0631\u0628\u0631 \u062F\u0631 \u0628\u062F\u0648 \u0648\u0631\u0648\u062F \u06F3 \u0634\u0627\u0646\u0633 \u0686\u0631\u062E\u0627\u0646\u062F\u0646 \u0631\u0627\u06CC\u06AF\u0627\u0646 \u062F\u0631\u06CC\u0627\u0641\u062A \u0645\u06CC\u200C\u06A9\u0646\u062F.\n\u06F2. \u062C\u0648\u0627\u06CC\u0632 \u0641\u06CC\u0632\u06CC\u06A9\u06CC \u067E\u0633 \u0627\u0632 \u0647\u0645\u0627\u0647\u0646\u06AF\u06CC \u062A\u0644\u0641\u0646\u06CC \u062A\u0648\u0633\u0637 \u067E\u0634\u062A\u06CC\u0628\u0627\u0646\u06CC \u0627\u0631\u0633\u0627\u0644 \u062E\u0648\u0627\u0647\u062F \u0634\u062F.\n\u06F3. \u06A9\u062F\u0647\u0627\u06CC \u062A\u062E\u0641\u06CC\u0641 \u0628\u0644\u0627\u0641\u0627\u0635\u0644\u0647 \u067E\u06CC\u0627\u0645\u06A9 \u0634\u062F\u0647 \u0648 \u062A\u0627 \u06F7 \u0631\u0648\u0632 \u067E\u0633 \u0627\u0632 \u062F\u0631\u06CC\u0627\u0641\u062A \u0645\u0639\u062A\u0628\u0631 \u0647\u0633\u062A\u0646\u062F.", + prizes: { + create: [ + { + title: "\u0622\u06CC\u0641\u0648\u0646 \u06F1\u06F5 \u067E\u0631\u0648", + type: "PHYSICAL", + stockType: "LIMITED", + initialStock: 3, + remainingStock: 3, + weight: 1, + sortOrder: 1, + segmentColor: "#b91c1c" + }, + { + title: "\u062A\u062E\u0641\u06CC\u0641 \u06F5\u06F0\u066A \u062F\u06CC\u062C\u06CC\u200C\u06A9\u0627\u0644\u0627", + type: "DISCOUNT_CODE", + stockType: "UNLIMITED", + weight: 25, + sortOrder: 2, + segmentColor: "#1e293b" + }, + { + title: "\u06A9\u0627\u0631\u062A \u0647\u062F\u06CC\u0647 \u06F5\u06F0\u06F0 \u062A\u0648\u0645\u0627\u0646\u06CC", + type: "CREDIT", + stockType: "LIMITED", + initialStock: 50, + remainingStock: 50, + weight: 10, + sortOrder: 3, + segmentColor: "#b91c1c" + }, + { + title: "\u067E\u0648\u0686 (\u062F\u0641\u0639\u0647 \u0628\u0639\u062F)", + type: "NO_PRIZE", + stockType: "UNLIMITED", + weight: 20, + sortOrder: 4, + segmentColor: "#1e293b" + }, + { + title: "\u062A\u062E\u0641\u06CC\u0641 \u06F3\u06F0\u066A \u0627\u0633\u0646\u067E", + type: "DISCOUNT_CODE", + stockType: "UNLIMITED", + weight: 20, + sortOrder: 5, + segmentColor: "#b91c1c" + }, + { + title: "\u0633\u0627\u0639\u062A \u0647\u0648\u0634\u0645\u0646\u062F", + type: "PHYSICAL", + stockType: "LIMITED", + initialStock: 10, + remainingStock: 10, + weight: 4, + sortOrder: 6, + segmentColor: "#1e293b" + }, + { + title: "\u0634\u0627\u0646\u0633 \u0645\u062C\u062F\u062F", + type: "OTHER", + stockType: "UNLIMITED", + weight: 15, + sortOrder: 7, + segmentColor: "#b91c1c" + }, + { + title: "\u067E\u0648\u0686 (\u0628\u062F\u0648\u0646 \u062C\u0627\u06CC\u0632\u0647)", + type: "NO_PRIZE", + stockType: "UNLIMITED", + weight: 5, + sortOrder: 8, + segmentColor: "#1e293b" + } + ] + } + } + }); + console.log(`Campaign created with ID: ${campaign.id} and 8 prizes.`); +} +main().catch((e) => { + console.error(e); + process.exit(1); +}).finally(async () => { + await prisma.$disconnect(); +}); diff --git a/apps/api/release/vendor/.prisma/client/default.d.ts b/apps/api/release/vendor/.prisma/client/default.d.ts new file mode 100644 index 0000000..bc20c6c --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/default.d.ts @@ -0,0 +1 @@ +export * from "./index" \ No newline at end of file diff --git a/apps/api/release/vendor/.prisma/client/default.js b/apps/api/release/vendor/.prisma/client/default.js new file mode 100644 index 0000000..fa52f0c --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/default.js @@ -0,0 +1 @@ +module.exports = { ...require('.') } \ No newline at end of file diff --git a/apps/api/release/vendor/.prisma/client/deno/edge.d.ts b/apps/api/release/vendor/.prisma/client/deno/edge.d.ts new file mode 100644 index 0000000..bca0a97 --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/deno/edge.d.ts @@ -0,0 +1,9 @@ +class PrismaClient { + constructor() { + throw new Error( + '@prisma/client/deno/edge did not initialize yet. Please run "prisma generate" and try to import it again.', + ) + } +} + +export { PrismaClient } diff --git a/apps/api/release/vendor/.prisma/client/edge.d.ts b/apps/api/release/vendor/.prisma/client/edge.d.ts new file mode 100644 index 0000000..274b8fa --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/edge.d.ts @@ -0,0 +1 @@ +export * from "./default" \ No newline at end of file diff --git a/apps/api/release/vendor/.prisma/client/edge.js b/apps/api/release/vendor/.prisma/client/edge.js new file mode 100644 index 0000000..f84833c --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/edge.js @@ -0,0 +1,439 @@ + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + PrismaClientKnownRequestError, + PrismaClientUnknownRequestError, + PrismaClientRustPanicError, + PrismaClientInitializationError, + PrismaClientValidationError, + NotFoundError, + getPrismaClient, + sqltag, + empty, + join, + raw, + skip, + Decimal, + Debug, + objectEnumValues, + makeStrictEnum, + Extensions, + warnOnce, + defineDmmfProperty, + Public, + getRuntime +} = require('@prisma/client/runtime/edge.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 5.22.0 + * Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2 + */ +Prisma.prismaVersion = { + client: "5.22.0", + engine: "605197351a3c8bdd595af2d2a9bc3025bca48ea2" +} + +Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; +Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError +Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError +Prisma.PrismaClientInitializationError = PrismaClientInitializationError +Prisma.PrismaClientValidationError = PrismaClientValidationError +Prisma.NotFoundError = NotFoundError +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = sqltag +Prisma.empty = empty +Prisma.join = join +Prisma.raw = raw +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = Extensions.getExtensionContext +Prisma.defineExtension = Extensions.defineExtension + +/** + * Shorthand utilities for JSON filtering + */ +Prisma.DbNull = objectEnumValues.instances.DbNull +Prisma.JsonNull = objectEnumValues.instances.JsonNull +Prisma.AnyNull = objectEnumValues.instances.AnyNull + +Prisma.NullTypes = { + DbNull: objectEnumValues.classes.DbNull, + JsonNull: objectEnumValues.classes.JsonNull, + AnyNull: objectEnumValues.classes.AnyNull +} + + + + + +/** + * Enums + */ +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.AdminScalarFieldEnum = { + id: 'id', + name: 'name', + mobile: 'mobile', + email: 'email', + passwordHash: 'passwordHash', + role: 'role', + status: 'status', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.UserScalarFieldEnum = { + id: 'id', + mobile: 'mobile', + name: 'name', + status: 'status', + lastLoginAt: 'lastLoginAt', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.OtpCodeScalarFieldEnum = { + id: 'id', + mobile: 'mobile', + code: 'code', + userId: 'userId', + attempts: 'attempts', + consumed: 'consumed', + expiresAt: 'expiresAt', + createdAt: 'createdAt' +}; + +exports.Prisma.CampaignScalarFieldEnum = { + id: 'id', + title: 'title', + slug: 'slug', + description: 'description', + image: 'image', + banner: 'banner', + logo: 'logo', + startAt: 'startAt', + endAt: 'endAt', + status: 'status', + defaultChances: 'defaultChances', + rules: 'rules', + ctaText: 'ctaText', + wheelDesign: 'wheelDesign', + settings: 'settings', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.PrizeScalarFieldEnum = { + id: 'id', + campaignId: 'campaignId', + title: 'title', + description: 'description', + image: 'image', + type: 'type', + stockType: 'stockType', + initialStock: 'initialStock', + remainingStock: 'remainingStock', + weight: 'weight', + status: 'status', + sortOrder: 'sortOrder', + segmentColor: 'segmentColor', + expiresAt: 'expiresAt', + smsTemplate: 'smsTemplate', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.UserCampaignScalarFieldEnum = { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + totalChances: 'totalChances', + usedChances: 'usedChances', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.ChanceTransactionScalarFieldEnum = { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + amount: 'amount', + type: 'type', + referenceType: 'referenceType', + referenceId: 'referenceId', + description: 'description', + createdById: 'createdById', + createdAt: 'createdAt' +}; + +exports.Prisma.SpinScalarFieldEnum = { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + prizeId: 'prizeId', + status: 'status', + idempotencyKey: 'idempotencyKey', + ip: 'ip', + userAgent: 'userAgent', + createdAt: 'createdAt' +}; + +exports.Prisma.UserPrizeScalarFieldEnum = { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + prizeId: 'prizeId', + spinId: 'spinId', + code: 'code', + status: 'status', + wonAt: 'wonAt', + redeemedAt: 'redeemedAt' +}; + +exports.Prisma.SmsLogScalarFieldEnum = { + id: 'id', + userId: 'userId', + mobile: 'mobile', + type: 'type', + message: 'message', + provider: 'provider', + status: 'status', + providerResponse: 'providerResponse', + createdAt: 'createdAt' +}; + +exports.Prisma.AdminLogScalarFieldEnum = { + id: 'id', + adminId: 'adminId', + action: 'action', + entityType: 'entityType', + entityId: 'entityId', + oldValue: 'oldValue', + newValue: 'newValue', + ip: 'ip', + createdAt: 'createdAt' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.NullableJsonNullValueInput = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; + +exports.Prisma.JsonNullValueFilter = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull, + AnyNull: Prisma.AnyNull +}; +exports.AdminRole = exports.$Enums.AdminRole = { + SUPER_ADMIN: 'SUPER_ADMIN', + OPERATOR: 'OPERATOR', + SUPPORT: 'SUPPORT' +}; + +exports.AdminStatus = exports.$Enums.AdminStatus = { + ACTIVE: 'ACTIVE', + DISABLED: 'DISABLED' +}; + +exports.UserStatus = exports.$Enums.UserStatus = { + ACTIVE: 'ACTIVE', + BLOCKED: 'BLOCKED' +}; + +exports.CampaignStatus = exports.$Enums.CampaignStatus = { + DRAFT: 'DRAFT', + ACTIVE: 'ACTIVE', + PAUSED: 'PAUSED', + FINISHED: 'FINISHED' +}; + +exports.WheelDesign = exports.$Enums.WheelDesign = { + CLASSIC_CASINO: 'CLASSIC_CASINO', + NEON_CYBER: 'NEON_CYBER', + MINIMAL_FLAT: 'MINIMAL_FLAT', + LUXURY_GOLD: 'LUXURY_GOLD', + PLAYFUL_CARTOON: 'PLAYFUL_CARTOON', + RUSTIC_WOOD: 'RUSTIC_WOOD', + GALAXY_SPACE: 'GALAXY_SPACE', + CANDY_LAND: 'CANDY_LAND', + FIRE_FLAME: 'FIRE_FLAME', + CRYSTAL_ICE: 'CRYSTAL_ICE' +}; + +exports.PrizeType = exports.$Enums.PrizeType = { + PHYSICAL: 'PHYSICAL', + DISCOUNT_CODE: 'DISCOUNT_CODE', + CREDIT: 'CREDIT', + CASH: 'CASH', + NO_PRIZE: 'NO_PRIZE', + OTHER: 'OTHER' +}; + +exports.StockType = exports.$Enums.StockType = { + LIMITED: 'LIMITED', + UNLIMITED: 'UNLIMITED' +}; + +exports.PrizeStatus = exports.$Enums.PrizeStatus = { + ACTIVE: 'ACTIVE', + INACTIVE: 'INACTIVE' +}; + +exports.ChanceTxnType = exports.$Enums.ChanceTxnType = { + SIGNUP_BONUS: 'SIGNUP_BONUS', + ADMIN_ADJUSTMENT: 'ADMIN_ADJUSTMENT', + SPIN_CONSUME: 'SPIN_CONSUME', + CAMPAIGN_BONUS: 'CAMPAIGN_BONUS', + REFUND: 'REFUND' +}; + +exports.SpinStatus = exports.$Enums.SpinStatus = { + SUCCESS: 'SUCCESS', + FAILED: 'FAILED', + DUPLICATE: 'DUPLICATE' +}; + +exports.UserPrizeStatus = exports.$Enums.UserPrizeStatus = { + NEW: 'NEW', + CONTACTED: 'CONTACTED', + DELIVERED: 'DELIVERED', + ACTIVE_CODE: 'ACTIVE_CODE', + USED: 'USED', + EXPIRED: 'EXPIRED' +}; + +exports.SmsType = exports.$Enums.SmsType = { + OTP: 'OTP', + WINNING: 'WINNING', + NO_PRIZE: 'NO_PRIZE', + PRIZE_REMINDER: 'PRIZE_REMINDER' +}; + +exports.SmsStatus = exports.$Enums.SmsStatus = { + PENDING: 'PENDING', + SENT: 'SENT', + FAILED: 'FAILED' +}; + +exports.Prisma.ModelName = { + Admin: 'Admin', + User: 'User', + OtpCode: 'OtpCode', + Campaign: 'Campaign', + Prize: 'Prize', + UserCampaign: 'UserCampaign', + ChanceTransaction: 'ChanceTransaction', + Spin: 'Spin', + UserPrize: 'UserPrize', + SmsLog: 'SmsLog', + AdminLog: 'AdminLog' +}; +/** + * Create the Client + */ +const config = { + "generator": { + "name": "client", + "provider": { + "fromEnvVar": null, + "value": "prisma-client-js" + }, + "output": { + "value": "D:\\APP\\Lucky_Wheel\\node_modules\\.pnpm\\@prisma+client@5.22.0_prisma@5.22.0\\node_modules\\@prisma\\client", + "fromEnvVar": null + }, + "config": { + "engineType": "library" + }, + "binaryTargets": [ + { + "fromEnvVar": null, + "value": "windows", + "native": true + }, + { + "fromEnvVar": null, + "value": "debian-openssl-3.0.x" + } + ], + "previewFeatures": [], + "sourceFilePath": "D:\\APP\\Lucky_Wheel\\apps\\api\\prisma\\schema.prisma" + }, + "relativeEnvPaths": { + "rootEnvPath": null + }, + "relativePath": "../../../../../../apps/api/prisma", + "clientVersion": "5.22.0", + "engineVersion": "605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "datasourceNames": [ + "db" + ], + "activeProvider": "postgresql", + "postinstall": false, + "inlineDatasources": { + "db": { + "url": { + "fromEnvVar": "DATABASE_URL", + "value": null + } + } + }, + "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n // native = local Windows/macOS; debian-openssl-3.0.x = node:20-bookworm (Arvan)\n binaryTargets = [\"native\", \"debian-openssl-3.0.x\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n// ==================== ENUMS ====================\n\nenum AdminStatus {\n ACTIVE\n DISABLED\n}\n\nenum AdminRole {\n SUPER_ADMIN\n OPERATOR\n SUPPORT\n}\n\nenum UserStatus {\n ACTIVE\n BLOCKED\n}\n\nenum CampaignStatus {\n DRAFT\n ACTIVE\n PAUSED\n FINISHED\n}\n\nenum PrizeType {\n PHYSICAL\n DISCOUNT_CODE\n CREDIT\n CASH\n NO_PRIZE\n OTHER\n}\n\nenum StockType {\n LIMITED\n UNLIMITED\n}\n\nenum PrizeStatus {\n ACTIVE\n INACTIVE\n}\n\nenum SpinStatus {\n SUCCESS\n FAILED\n DUPLICATE\n}\n\nenum ChanceTxnType {\n SIGNUP_BONUS\n ADMIN_ADJUSTMENT\n SPIN_CONSUME\n CAMPAIGN_BONUS\n REFUND\n}\n\nenum UserPrizeStatus {\n NEW\n CONTACTED\n DELIVERED\n ACTIVE_CODE\n USED\n EXPIRED\n}\n\nenum SmsType {\n OTP\n WINNING\n NO_PRIZE\n PRIZE_REMINDER\n}\n\nenum SmsStatus {\n PENDING\n SENT\n FAILED\n}\n\nenum WheelDesign {\n CLASSIC_CASINO\n NEON_CYBER\n MINIMAL_FLAT\n LUXURY_GOLD\n PLAYFUL_CARTOON\n RUSTIC_WOOD\n GALAXY_SPACE\n CANDY_LAND\n FIRE_FLAME\n CRYSTAL_ICE\n}\n\n// ==================== MODELS ====================\n\nmodel Admin {\n id String @id @default(uuid())\n name String\n mobile String @unique\n email String @unique\n passwordHash String @map(\"password_hash\")\n role AdminRole @default(OPERATOR)\n status AdminStatus @default(ACTIVE)\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n auditLogs AdminLog[]\n chanceTxns ChanceTransaction[] @relation(\"AdminCreatedTxn\")\n\n @@map(\"admins\")\n}\n\nmodel User {\n id String @id @default(uuid())\n mobile String @unique\n name String?\n status UserStatus @default(ACTIVE)\n lastLoginAt DateTime? @map(\"last_login_at\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n userCampaigns UserCampaign[]\n chanceTransactions ChanceTransaction[]\n spins Spin[]\n userPrizes UserPrize[]\n otpCodes OtpCode[]\n smsLogs SmsLog[]\n\n @@index([mobile])\n @@map(\"users\")\n}\n\nmodel OtpCode {\n id String @id @default(uuid())\n mobile String\n code String\n userId String? @map(\"user_id\")\n user User? @relation(fields: [userId], references: [id])\n attempts Int @default(0)\n consumed Boolean @default(false)\n expiresAt DateTime @map(\"expires_at\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n\n @@index([mobile, consumed])\n @@map(\"otp_codes\")\n}\n\nmodel Campaign {\n id String @id @default(uuid())\n title String\n slug String @unique\n description String?\n image String?\n banner String?\n logo String?\n startAt DateTime @map(\"start_at\")\n endAt DateTime @map(\"end_at\")\n status CampaignStatus @default(DRAFT)\n defaultChances Int @default(0) @map(\"default_chances\")\n rules String?\n ctaText String? @map(\"cta_text\")\n wheelDesign WheelDesign @default(CLASSIC_CASINO) @map(\"wheel_design\")\n settings Json? // primaryColor, secondaryColor, headerText, buttonText, headerImage, celebrationEffect...\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n prizes Prize[]\n userCampaigns UserCampaign[]\n chanceTxns ChanceTransaction[]\n spins Spin[]\n userPrizes UserPrize[]\n\n @@index([status, startAt, endAt])\n @@map(\"campaigns\")\n}\n\nmodel Prize {\n id String @id @default(uuid())\n campaignId String @map(\"campaign_id\")\n campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)\n title String\n description String?\n image String?\n type PrizeType\n stockType StockType @map(\"stock_type\")\n initialStock Int? @map(\"initial_stock\")\n remainingStock Int? @map(\"remaining_stock\")\n weight Int\n status PrizeStatus @default(ACTIVE)\n sortOrder Int @default(0) @map(\"sort_order\")\n segmentColor String @map(\"segment_color\")\n expiresAt DateTime? @map(\"expires_at\")\n smsTemplate String? @map(\"sms_template\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n spins Spin[]\n userPrizes UserPrize[]\n\n @@index([campaignId, status])\n @@map(\"prizes\")\n}\n\nmodel UserCampaign {\n id String @id @default(uuid())\n userId String @map(\"user_id\")\n user User @relation(fields: [userId], references: [id])\n campaignId String @map(\"campaign_id\")\n campaign Campaign @relation(fields: [campaignId], references: [id])\n totalChances Int @default(0) @map(\"total_chances\")\n usedChances Int @default(0) @map(\"used_chances\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n @@unique([userId, campaignId])\n @@map(\"user_campaigns\")\n}\n\nmodel ChanceTransaction {\n id String @id @default(uuid())\n userId String @map(\"user_id\")\n user User @relation(fields: [userId], references: [id])\n campaignId String @map(\"campaign_id\")\n campaign Campaign @relation(fields: [campaignId], references: [id])\n amount Int // مثبت یا منفی\n type ChanceTxnType\n referenceType String? @map(\"reference_type\") // e.g. \"spin\", \"manual\"\n referenceId String? @map(\"reference_id\")\n description String?\n createdById String? @map(\"created_by\") // admin id در صورت تغییر دستی\n createdBy Admin? @relation(\"AdminCreatedTxn\", fields: [createdById], references: [id])\n createdAt DateTime @default(now()) @map(\"created_at\")\n\n @@index([userId, campaignId])\n @@map(\"chance_transactions\")\n}\n\nmodel Spin {\n id String @id @default(uuid())\n userId String @map(\"user_id\")\n user User @relation(fields: [userId], references: [id])\n campaignId String @map(\"campaign_id\")\n campaign Campaign @relation(fields: [campaignId], references: [id])\n prizeId String? @map(\"prize_id\")\n prize Prize? @relation(fields: [prizeId], references: [id])\n status SpinStatus @default(SUCCESS)\n idempotencyKey String @unique @map(\"idempotency_key\")\n ip String?\n userAgent String? @map(\"user_agent\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n\n userPrize UserPrize?\n\n @@index([userId, campaignId])\n @@index([campaignId, createdAt])\n @@map(\"spins\")\n}\n\nmodel UserPrize {\n id String @id @default(uuid())\n userId String @map(\"user_id\")\n user User @relation(fields: [userId], references: [id])\n campaignId String @map(\"campaign_id\")\n campaign Campaign @relation(fields: [campaignId], references: [id])\n prizeId String @map(\"prize_id\")\n prize Prize @relation(fields: [prizeId], references: [id])\n spinId String @unique @map(\"spin_id\")\n spin Spin @relation(fields: [spinId], references: [id])\n code String? @unique\n status UserPrizeStatus @default(NEW)\n wonAt DateTime @default(now()) @map(\"won_at\")\n redeemedAt DateTime? @map(\"redeemed_at\")\n\n @@index([userId])\n @@index([status])\n @@map(\"user_prizes\")\n}\n\nmodel SmsLog {\n id String @id @default(uuid())\n userId String? @map(\"user_id\")\n user User? @relation(fields: [userId], references: [id])\n mobile String\n type SmsType\n message String\n provider String @default(\"raygansms\")\n status SmsStatus @default(PENDING)\n providerResponse Json? @map(\"provider_response\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n\n @@index([mobile, type])\n @@map(\"sms_logs\")\n}\n\nmodel AdminLog {\n id String @id @default(uuid())\n adminId String @map(\"admin_id\")\n admin Admin @relation(fields: [adminId], references: [id])\n action String // e.g. \"prize.update\", \"chance.add\"\n entityType String @map(\"entity_type\")\n entityId String @map(\"entity_id\")\n oldValue Json? @map(\"old_value\")\n newValue Json? @map(\"new_value\")\n ip String?\n createdAt DateTime @default(now()) @map(\"created_at\")\n\n @@index([entityType, entityId])\n @@map(\"admin_logs\")\n}\n", + "inlineSchemaHash": "3ad5c30b962f7b121964539330345f78ded198ef5cbcadad1928d4e44c16409a", + "copyEngine": true +} +config.dirname = '/' + +config.runtimeDataModel = JSON.parse("{\"models\":{\"Admin\":{\"dbName\":\"admins\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"passwordHash\",\"dbName\":\"password_hash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"AdminRole\",\"default\":\"OPERATOR\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"AdminStatus\",\"default\":\"ACTIVE\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"dbName\":\"updated_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"auditLogs\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminLog\",\"relationName\":\"AdminToAdminLog\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chanceTxns\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChanceTransaction\",\"relationName\":\"AdminCreatedTxn\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"User\":{\"dbName\":\"users\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"UserStatus\",\"default\":\"ACTIVE\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastLoginAt\",\"dbName\":\"last_login_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"dbName\":\"updated_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"userCampaigns\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserCampaign\",\"relationName\":\"UserToUserCampaign\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chanceTransactions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChanceTransaction\",\"relationName\":\"ChanceTransactionToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"spins\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Spin\",\"relationName\":\"SpinToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userPrizes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserPrize\",\"relationName\":\"UserToUserPrize\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"otpCodes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OtpCode\",\"relationName\":\"OtpCodeToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"smsLogs\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SmsLog\",\"relationName\":\"SmsLogToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"OtpCode\":{\"dbName\":\"otp_codes\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"code\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"OtpCodeToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"attempts\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"consumed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiresAt\",\"dbName\":\"expires_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Campaign\":{\"dbName\":\"campaigns\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"slug\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"image\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"banner\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"logo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"startAt\",\"dbName\":\"start_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"endAt\",\"dbName\":\"end_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"CampaignStatus\",\"default\":\"DRAFT\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"defaultChances\",\"dbName\":\"default_chances\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rules\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ctaText\",\"dbName\":\"cta_text\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wheelDesign\",\"dbName\":\"wheel_design\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"WheelDesign\",\"default\":\"CLASSIC_CASINO\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"settings\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"dbName\":\"updated_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"prizes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Prize\",\"relationName\":\"CampaignToPrize\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userCampaigns\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserCampaign\",\"relationName\":\"CampaignToUserCampaign\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chanceTxns\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChanceTransaction\",\"relationName\":\"CampaignToChanceTransaction\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"spins\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Spin\",\"relationName\":\"CampaignToSpin\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userPrizes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserPrize\",\"relationName\":\"CampaignToUserPrize\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Prize\":{\"dbName\":\"prizes\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaignId\",\"dbName\":\"campaign_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaign\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Campaign\",\"relationName\":\"CampaignToPrize\",\"relationFromFields\":[\"campaignId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"image\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PrizeType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stockType\",\"dbName\":\"stock_type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"StockType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"initialStock\",\"dbName\":\"initial_stock\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remainingStock\",\"dbName\":\"remaining_stock\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"weight\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"PrizeStatus\",\"default\":\"ACTIVE\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sortOrder\",\"dbName\":\"sort_order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"segmentColor\",\"dbName\":\"segment_color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiresAt\",\"dbName\":\"expires_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"smsTemplate\",\"dbName\":\"sms_template\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"dbName\":\"updated_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"spins\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Spin\",\"relationName\":\"PrizeToSpin\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userPrizes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserPrize\",\"relationName\":\"PrizeToUserPrize\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"UserCampaign\":{\"dbName\":\"user_campaigns\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"UserToUserCampaign\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaignId\",\"dbName\":\"campaign_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaign\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Campaign\",\"relationName\":\"CampaignToUserCampaign\",\"relationFromFields\":[\"campaignId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalChances\",\"dbName\":\"total_chances\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"usedChances\",\"dbName\":\"used_chances\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"dbName\":\"updated_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[[\"userId\",\"campaignId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"userId\",\"campaignId\"]}],\"isGenerated\":false},\"ChanceTransaction\":{\"dbName\":\"chance_transactions\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"ChanceTransactionToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaignId\",\"dbName\":\"campaign_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaign\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Campaign\",\"relationName\":\"CampaignToChanceTransaction\",\"relationFromFields\":[\"campaignId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"amount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChanceTxnType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referenceType\",\"dbName\":\"reference_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referenceId\",\"dbName\":\"reference_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdById\",\"dbName\":\"created_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Admin\",\"relationName\":\"AdminCreatedTxn\",\"relationFromFields\":[\"createdById\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Spin\":{\"dbName\":\"spins\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"SpinToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaignId\",\"dbName\":\"campaign_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaign\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Campaign\",\"relationName\":\"CampaignToSpin\",\"relationFromFields\":[\"campaignId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"prizeId\",\"dbName\":\"prize_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"prize\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Prize\",\"relationName\":\"PrizeToSpin\",\"relationFromFields\":[\"prizeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"SpinStatus\",\"default\":\"SUCCESS\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"idempotencyKey\",\"dbName\":\"idempotency_key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ip\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userAgent\",\"dbName\":\"user_agent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userPrize\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserPrize\",\"relationName\":\"SpinToUserPrize\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"UserPrize\":{\"dbName\":\"user_prizes\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"UserToUserPrize\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaignId\",\"dbName\":\"campaign_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaign\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Campaign\",\"relationName\":\"CampaignToUserPrize\",\"relationFromFields\":[\"campaignId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"prizeId\",\"dbName\":\"prize_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"prize\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Prize\",\"relationName\":\"PrizeToUserPrize\",\"relationFromFields\":[\"prizeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"spinId\",\"dbName\":\"spin_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"spin\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Spin\",\"relationName\":\"SpinToUserPrize\",\"relationFromFields\":[\"spinId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"code\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"UserPrizeStatus\",\"default\":\"NEW\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wonAt\",\"dbName\":\"won_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"redeemedAt\",\"dbName\":\"redeemed_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SmsLog\":{\"dbName\":\"sms_logs\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"SmsLogToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SmsType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"message\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"provider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"raygansms\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"SmsStatus\",\"default\":\"PENDING\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"providerResponse\",\"dbName\":\"provider_response\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AdminLog\":{\"dbName\":\"admin_logs\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminId\",\"dbName\":\"admin_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"admin\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Admin\",\"relationName\":\"AdminToAdminLog\",\"relationFromFields\":[\"adminId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"action\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"entityType\",\"dbName\":\"entity_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"entityId\",\"dbName\":\"entity_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"oldValue\",\"dbName\":\"old_value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"newValue\",\"dbName\":\"new_value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ip\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{\"AdminStatus\":{\"values\":[{\"name\":\"ACTIVE\",\"dbName\":null},{\"name\":\"DISABLED\",\"dbName\":null}],\"dbName\":null},\"AdminRole\":{\"values\":[{\"name\":\"SUPER_ADMIN\",\"dbName\":null},{\"name\":\"OPERATOR\",\"dbName\":null},{\"name\":\"SUPPORT\",\"dbName\":null}],\"dbName\":null},\"UserStatus\":{\"values\":[{\"name\":\"ACTIVE\",\"dbName\":null},{\"name\":\"BLOCKED\",\"dbName\":null}],\"dbName\":null},\"CampaignStatus\":{\"values\":[{\"name\":\"DRAFT\",\"dbName\":null},{\"name\":\"ACTIVE\",\"dbName\":null},{\"name\":\"PAUSED\",\"dbName\":null},{\"name\":\"FINISHED\",\"dbName\":null}],\"dbName\":null},\"PrizeType\":{\"values\":[{\"name\":\"PHYSICAL\",\"dbName\":null},{\"name\":\"DISCOUNT_CODE\",\"dbName\":null},{\"name\":\"CREDIT\",\"dbName\":null},{\"name\":\"CASH\",\"dbName\":null},{\"name\":\"NO_PRIZE\",\"dbName\":null},{\"name\":\"OTHER\",\"dbName\":null}],\"dbName\":null},\"StockType\":{\"values\":[{\"name\":\"LIMITED\",\"dbName\":null},{\"name\":\"UNLIMITED\",\"dbName\":null}],\"dbName\":null},\"PrizeStatus\":{\"values\":[{\"name\":\"ACTIVE\",\"dbName\":null},{\"name\":\"INACTIVE\",\"dbName\":null}],\"dbName\":null},\"SpinStatus\":{\"values\":[{\"name\":\"SUCCESS\",\"dbName\":null},{\"name\":\"FAILED\",\"dbName\":null},{\"name\":\"DUPLICATE\",\"dbName\":null}],\"dbName\":null},\"ChanceTxnType\":{\"values\":[{\"name\":\"SIGNUP_BONUS\",\"dbName\":null},{\"name\":\"ADMIN_ADJUSTMENT\",\"dbName\":null},{\"name\":\"SPIN_CONSUME\",\"dbName\":null},{\"name\":\"CAMPAIGN_BONUS\",\"dbName\":null},{\"name\":\"REFUND\",\"dbName\":null}],\"dbName\":null},\"UserPrizeStatus\":{\"values\":[{\"name\":\"NEW\",\"dbName\":null},{\"name\":\"CONTACTED\",\"dbName\":null},{\"name\":\"DELIVERED\",\"dbName\":null},{\"name\":\"ACTIVE_CODE\",\"dbName\":null},{\"name\":\"USED\",\"dbName\":null},{\"name\":\"EXPIRED\",\"dbName\":null}],\"dbName\":null},\"SmsType\":{\"values\":[{\"name\":\"OTP\",\"dbName\":null},{\"name\":\"WINNING\",\"dbName\":null},{\"name\":\"NO_PRIZE\",\"dbName\":null},{\"name\":\"PRIZE_REMINDER\",\"dbName\":null}],\"dbName\":null},\"SmsStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"SENT\",\"dbName\":null},{\"name\":\"FAILED\",\"dbName\":null}],\"dbName\":null},\"WheelDesign\":{\"values\":[{\"name\":\"CLASSIC_CASINO\",\"dbName\":null},{\"name\":\"NEON_CYBER\",\"dbName\":null},{\"name\":\"MINIMAL_FLAT\",\"dbName\":null},{\"name\":\"LUXURY_GOLD\",\"dbName\":null},{\"name\":\"PLAYFUL_CARTOON\",\"dbName\":null},{\"name\":\"RUSTIC_WOOD\",\"dbName\":null},{\"name\":\"GALAXY_SPACE\",\"dbName\":null},{\"name\":\"CANDY_LAND\",\"dbName\":null},{\"name\":\"FIRE_FLAME\",\"dbName\":null},{\"name\":\"CRYSTAL_ICE\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") +defineDmmfProperty(exports.Prisma, config.runtimeDataModel) +config.engineWasm = undefined + +config.injectableEdgeEnv = () => ({ + parsed: { + DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.DATABASE_URL || undefined + } +}) + +if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) { + Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) +} + +const PrismaClient = getPrismaClient(config) +exports.PrismaClient = PrismaClient +Object.assign(exports, Prisma) + diff --git a/apps/api/release/vendor/.prisma/client/index-browser.js b/apps/api/release/vendor/.prisma/client/index-browser.js new file mode 100644 index 0000000..c9a3c43 --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/index-browser.js @@ -0,0 +1,428 @@ + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + Decimal, + objectEnumValues, + makeStrictEnum, + Public, + getRuntime, + skip +} = require('@prisma/client/runtime/index-browser.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 5.22.0 + * Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2 + */ +Prisma.prismaVersion = { + client: "5.22.0", + engine: "605197351a3c8bdd595af2d2a9bc3025bca48ea2" +} + +Prisma.PrismaClientKnownRequestError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)}; +Prisma.PrismaClientUnknownRequestError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientRustPanicError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientInitializationError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientValidationError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.NotFoundError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.empty = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.join = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.raw = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.defineExtension = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} + +/** + * Shorthand utilities for JSON filtering + */ +Prisma.DbNull = objectEnumValues.instances.DbNull +Prisma.JsonNull = objectEnumValues.instances.JsonNull +Prisma.AnyNull = objectEnumValues.instances.AnyNull + +Prisma.NullTypes = { + DbNull: objectEnumValues.classes.DbNull, + JsonNull: objectEnumValues.classes.JsonNull, + AnyNull: objectEnumValues.classes.AnyNull +} + + + +/** + * Enums + */ + +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.AdminScalarFieldEnum = { + id: 'id', + name: 'name', + mobile: 'mobile', + email: 'email', + passwordHash: 'passwordHash', + role: 'role', + status: 'status', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.UserScalarFieldEnum = { + id: 'id', + mobile: 'mobile', + name: 'name', + status: 'status', + lastLoginAt: 'lastLoginAt', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.OtpCodeScalarFieldEnum = { + id: 'id', + mobile: 'mobile', + code: 'code', + userId: 'userId', + attempts: 'attempts', + consumed: 'consumed', + expiresAt: 'expiresAt', + createdAt: 'createdAt' +}; + +exports.Prisma.CampaignScalarFieldEnum = { + id: 'id', + title: 'title', + slug: 'slug', + description: 'description', + image: 'image', + banner: 'banner', + logo: 'logo', + startAt: 'startAt', + endAt: 'endAt', + status: 'status', + defaultChances: 'defaultChances', + rules: 'rules', + ctaText: 'ctaText', + wheelDesign: 'wheelDesign', + settings: 'settings', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.PrizeScalarFieldEnum = { + id: 'id', + campaignId: 'campaignId', + title: 'title', + description: 'description', + image: 'image', + type: 'type', + stockType: 'stockType', + initialStock: 'initialStock', + remainingStock: 'remainingStock', + weight: 'weight', + status: 'status', + sortOrder: 'sortOrder', + segmentColor: 'segmentColor', + expiresAt: 'expiresAt', + smsTemplate: 'smsTemplate', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.UserCampaignScalarFieldEnum = { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + totalChances: 'totalChances', + usedChances: 'usedChances', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.ChanceTransactionScalarFieldEnum = { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + amount: 'amount', + type: 'type', + referenceType: 'referenceType', + referenceId: 'referenceId', + description: 'description', + createdById: 'createdById', + createdAt: 'createdAt' +}; + +exports.Prisma.SpinScalarFieldEnum = { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + prizeId: 'prizeId', + status: 'status', + idempotencyKey: 'idempotencyKey', + ip: 'ip', + userAgent: 'userAgent', + createdAt: 'createdAt' +}; + +exports.Prisma.UserPrizeScalarFieldEnum = { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + prizeId: 'prizeId', + spinId: 'spinId', + code: 'code', + status: 'status', + wonAt: 'wonAt', + redeemedAt: 'redeemedAt' +}; + +exports.Prisma.SmsLogScalarFieldEnum = { + id: 'id', + userId: 'userId', + mobile: 'mobile', + type: 'type', + message: 'message', + provider: 'provider', + status: 'status', + providerResponse: 'providerResponse', + createdAt: 'createdAt' +}; + +exports.Prisma.AdminLogScalarFieldEnum = { + id: 'id', + adminId: 'adminId', + action: 'action', + entityType: 'entityType', + entityId: 'entityId', + oldValue: 'oldValue', + newValue: 'newValue', + ip: 'ip', + createdAt: 'createdAt' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.NullableJsonNullValueInput = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; + +exports.Prisma.JsonNullValueFilter = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull, + AnyNull: Prisma.AnyNull +}; +exports.AdminRole = exports.$Enums.AdminRole = { + SUPER_ADMIN: 'SUPER_ADMIN', + OPERATOR: 'OPERATOR', + SUPPORT: 'SUPPORT' +}; + +exports.AdminStatus = exports.$Enums.AdminStatus = { + ACTIVE: 'ACTIVE', + DISABLED: 'DISABLED' +}; + +exports.UserStatus = exports.$Enums.UserStatus = { + ACTIVE: 'ACTIVE', + BLOCKED: 'BLOCKED' +}; + +exports.CampaignStatus = exports.$Enums.CampaignStatus = { + DRAFT: 'DRAFT', + ACTIVE: 'ACTIVE', + PAUSED: 'PAUSED', + FINISHED: 'FINISHED' +}; + +exports.WheelDesign = exports.$Enums.WheelDesign = { + CLASSIC_CASINO: 'CLASSIC_CASINO', + NEON_CYBER: 'NEON_CYBER', + MINIMAL_FLAT: 'MINIMAL_FLAT', + LUXURY_GOLD: 'LUXURY_GOLD', + PLAYFUL_CARTOON: 'PLAYFUL_CARTOON', + RUSTIC_WOOD: 'RUSTIC_WOOD', + GALAXY_SPACE: 'GALAXY_SPACE', + CANDY_LAND: 'CANDY_LAND', + FIRE_FLAME: 'FIRE_FLAME', + CRYSTAL_ICE: 'CRYSTAL_ICE' +}; + +exports.PrizeType = exports.$Enums.PrizeType = { + PHYSICAL: 'PHYSICAL', + DISCOUNT_CODE: 'DISCOUNT_CODE', + CREDIT: 'CREDIT', + CASH: 'CASH', + NO_PRIZE: 'NO_PRIZE', + OTHER: 'OTHER' +}; + +exports.StockType = exports.$Enums.StockType = { + LIMITED: 'LIMITED', + UNLIMITED: 'UNLIMITED' +}; + +exports.PrizeStatus = exports.$Enums.PrizeStatus = { + ACTIVE: 'ACTIVE', + INACTIVE: 'INACTIVE' +}; + +exports.ChanceTxnType = exports.$Enums.ChanceTxnType = { + SIGNUP_BONUS: 'SIGNUP_BONUS', + ADMIN_ADJUSTMENT: 'ADMIN_ADJUSTMENT', + SPIN_CONSUME: 'SPIN_CONSUME', + CAMPAIGN_BONUS: 'CAMPAIGN_BONUS', + REFUND: 'REFUND' +}; + +exports.SpinStatus = exports.$Enums.SpinStatus = { + SUCCESS: 'SUCCESS', + FAILED: 'FAILED', + DUPLICATE: 'DUPLICATE' +}; + +exports.UserPrizeStatus = exports.$Enums.UserPrizeStatus = { + NEW: 'NEW', + CONTACTED: 'CONTACTED', + DELIVERED: 'DELIVERED', + ACTIVE_CODE: 'ACTIVE_CODE', + USED: 'USED', + EXPIRED: 'EXPIRED' +}; + +exports.SmsType = exports.$Enums.SmsType = { + OTP: 'OTP', + WINNING: 'WINNING', + NO_PRIZE: 'NO_PRIZE', + PRIZE_REMINDER: 'PRIZE_REMINDER' +}; + +exports.SmsStatus = exports.$Enums.SmsStatus = { + PENDING: 'PENDING', + SENT: 'SENT', + FAILED: 'FAILED' +}; + +exports.Prisma.ModelName = { + Admin: 'Admin', + User: 'User', + OtpCode: 'OtpCode', + Campaign: 'Campaign', + Prize: 'Prize', + UserCampaign: 'UserCampaign', + ChanceTransaction: 'ChanceTransaction', + Spin: 'Spin', + UserPrize: 'UserPrize', + SmsLog: 'SmsLog', + AdminLog: 'AdminLog' +}; + +/** + * This is a stub Prisma Client that will error at runtime if called. + */ +class PrismaClient { + constructor() { + return new Proxy(this, { + get(target, prop) { + let message + const runtime = getRuntime() + if (runtime.isEdge) { + message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: +- Use Prisma Accelerate: https://pris.ly/d/accelerate +- Use Driver Adapters: https://pris.ly/d/driver-adapters +`; + } else { + message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' + } + + message += ` +If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` + + throw new Error(message) + } + }) + } +} + +exports.PrismaClient = PrismaClient + +Object.assign(exports, Prisma) diff --git a/apps/api/release/vendor/.prisma/client/index.d.ts b/apps/api/release/vendor/.prisma/client/index.d.ts new file mode 100644 index 0000000..f72399a --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/index.d.ts @@ -0,0 +1,21789 @@ + +/** + * Client +**/ + +import * as runtime from '@prisma/client/runtime/library.js'; +import $Types = runtime.Types // general types +import $Public = runtime.Types.Public +import $Utils = runtime.Types.Utils +import $Extensions = runtime.Types.Extensions +import $Result = runtime.Types.Result + +export type PrismaPromise = $Public.PrismaPromise + + +/** + * Model Admin + * + */ +export type Admin = $Result.DefaultSelection +/** + * Model User + * + */ +export type User = $Result.DefaultSelection +/** + * Model OtpCode + * + */ +export type OtpCode = $Result.DefaultSelection +/** + * Model Campaign + * + */ +export type Campaign = $Result.DefaultSelection +/** + * Model Prize + * + */ +export type Prize = $Result.DefaultSelection +/** + * Model UserCampaign + * + */ +export type UserCampaign = $Result.DefaultSelection +/** + * Model ChanceTransaction + * + */ +export type ChanceTransaction = $Result.DefaultSelection +/** + * Model Spin + * + */ +export type Spin = $Result.DefaultSelection +/** + * Model UserPrize + * + */ +export type UserPrize = $Result.DefaultSelection +/** + * Model SmsLog + * + */ +export type SmsLog = $Result.DefaultSelection +/** + * Model AdminLog + * + */ +export type AdminLog = $Result.DefaultSelection + +/** + * Enums + */ +export namespace $Enums { + export const AdminRole: { + SUPER_ADMIN: 'SUPER_ADMIN', + OPERATOR: 'OPERATOR', + SUPPORT: 'SUPPORT' +}; + +export type AdminRole = (typeof AdminRole)[keyof typeof AdminRole] + + +export const AdminStatus: { + ACTIVE: 'ACTIVE', + DISABLED: 'DISABLED' +}; + +export type AdminStatus = (typeof AdminStatus)[keyof typeof AdminStatus] + + +export const UserStatus: { + ACTIVE: 'ACTIVE', + BLOCKED: 'BLOCKED' +}; + +export type UserStatus = (typeof UserStatus)[keyof typeof UserStatus] + + +export const CampaignStatus: { + DRAFT: 'DRAFT', + ACTIVE: 'ACTIVE', + PAUSED: 'PAUSED', + FINISHED: 'FINISHED' +}; + +export type CampaignStatus = (typeof CampaignStatus)[keyof typeof CampaignStatus] + + +export const WheelDesign: { + CLASSIC_CASINO: 'CLASSIC_CASINO', + NEON_CYBER: 'NEON_CYBER', + MINIMAL_FLAT: 'MINIMAL_FLAT', + LUXURY_GOLD: 'LUXURY_GOLD', + PLAYFUL_CARTOON: 'PLAYFUL_CARTOON', + RUSTIC_WOOD: 'RUSTIC_WOOD', + GALAXY_SPACE: 'GALAXY_SPACE', + CANDY_LAND: 'CANDY_LAND', + FIRE_FLAME: 'FIRE_FLAME', + CRYSTAL_ICE: 'CRYSTAL_ICE' +}; + +export type WheelDesign = (typeof WheelDesign)[keyof typeof WheelDesign] + + +export const PrizeType: { + PHYSICAL: 'PHYSICAL', + DISCOUNT_CODE: 'DISCOUNT_CODE', + CREDIT: 'CREDIT', + CASH: 'CASH', + NO_PRIZE: 'NO_PRIZE', + OTHER: 'OTHER' +}; + +export type PrizeType = (typeof PrizeType)[keyof typeof PrizeType] + + +export const StockType: { + LIMITED: 'LIMITED', + UNLIMITED: 'UNLIMITED' +}; + +export type StockType = (typeof StockType)[keyof typeof StockType] + + +export const PrizeStatus: { + ACTIVE: 'ACTIVE', + INACTIVE: 'INACTIVE' +}; + +export type PrizeStatus = (typeof PrizeStatus)[keyof typeof PrizeStatus] + + +export const ChanceTxnType: { + SIGNUP_BONUS: 'SIGNUP_BONUS', + ADMIN_ADJUSTMENT: 'ADMIN_ADJUSTMENT', + SPIN_CONSUME: 'SPIN_CONSUME', + CAMPAIGN_BONUS: 'CAMPAIGN_BONUS', + REFUND: 'REFUND' +}; + +export type ChanceTxnType = (typeof ChanceTxnType)[keyof typeof ChanceTxnType] + + +export const SpinStatus: { + SUCCESS: 'SUCCESS', + FAILED: 'FAILED', + DUPLICATE: 'DUPLICATE' +}; + +export type SpinStatus = (typeof SpinStatus)[keyof typeof SpinStatus] + + +export const UserPrizeStatus: { + NEW: 'NEW', + CONTACTED: 'CONTACTED', + DELIVERED: 'DELIVERED', + ACTIVE_CODE: 'ACTIVE_CODE', + USED: 'USED', + EXPIRED: 'EXPIRED' +}; + +export type UserPrizeStatus = (typeof UserPrizeStatus)[keyof typeof UserPrizeStatus] + + +export const SmsType: { + OTP: 'OTP', + WINNING: 'WINNING', + NO_PRIZE: 'NO_PRIZE', + PRIZE_REMINDER: 'PRIZE_REMINDER' +}; + +export type SmsType = (typeof SmsType)[keyof typeof SmsType] + + +export const SmsStatus: { + PENDING: 'PENDING', + SENT: 'SENT', + FAILED: 'FAILED' +}; + +export type SmsStatus = (typeof SmsStatus)[keyof typeof SmsStatus] + +} + +export type AdminRole = $Enums.AdminRole + +export const AdminRole: typeof $Enums.AdminRole + +export type AdminStatus = $Enums.AdminStatus + +export const AdminStatus: typeof $Enums.AdminStatus + +export type UserStatus = $Enums.UserStatus + +export const UserStatus: typeof $Enums.UserStatus + +export type CampaignStatus = $Enums.CampaignStatus + +export const CampaignStatus: typeof $Enums.CampaignStatus + +export type WheelDesign = $Enums.WheelDesign + +export const WheelDesign: typeof $Enums.WheelDesign + +export type PrizeType = $Enums.PrizeType + +export const PrizeType: typeof $Enums.PrizeType + +export type StockType = $Enums.StockType + +export const StockType: typeof $Enums.StockType + +export type PrizeStatus = $Enums.PrizeStatus + +export const PrizeStatus: typeof $Enums.PrizeStatus + +export type ChanceTxnType = $Enums.ChanceTxnType + +export const ChanceTxnType: typeof $Enums.ChanceTxnType + +export type SpinStatus = $Enums.SpinStatus + +export const SpinStatus: typeof $Enums.SpinStatus + +export type UserPrizeStatus = $Enums.UserPrizeStatus + +export const UserPrizeStatus: typeof $Enums.UserPrizeStatus + +export type SmsType = $Enums.SmsType + +export const SmsType: typeof $Enums.SmsType + +export type SmsStatus = $Enums.SmsStatus + +export const SmsStatus: typeof $Enums.SmsStatus + +/** + * ## Prisma Client ʲˢ + * + * Type-safe database client for TypeScript & Node.js + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Admins + * const admins = await prisma.admin.findMany() + * ``` + * + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). + */ +export class PrismaClient< + ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, + U = 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array ? Prisma.GetEvents : never : never, + ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs +> { + [K: symbol]: { types: Prisma.TypeMap['other'] } + + /** + * ## Prisma Client ʲˢ + * + * Type-safe database client for TypeScript & Node.js + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Admins + * const admins = await prisma.admin.findMany() + * ``` + * + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). + */ + + constructor(optionsArg ?: Prisma.Subset); + $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): void; + + /** + * Connect with the database + */ + $connect(): $Utils.JsPromise; + + /** + * Disconnect from the database + */ + $disconnect(): $Utils.JsPromise; + + /** + * Add a middleware + * @deprecated since 4.16.0. For new code, prefer client extensions instead. + * @see https://pris.ly/d/extensions + */ + $use(cb: Prisma.Middleware): void + +/** + * Executes a prepared raw query and returns the number of affected rows. + * @example + * ``` + * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Executes a raw query and returns the number of affected rows. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a prepared raw query and returns the `SELECT` data. + * @example + * ``` + * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a raw query and returns the `SELECT` data. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + + /** + * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. + * @example + * ``` + * const [george, bob, alice] = await prisma.$transaction([ + * prisma.user.create({ data: { name: 'George' } }), + * prisma.user.create({ data: { name: 'Bob' } }), + * prisma.user.create({ data: { name: 'Alice' } }), + * ]) + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). + */ + $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise> + + $transaction(fn: (prisma: Omit) => $Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise + + + $extends: $Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs> + + /** + * `prisma.admin`: Exposes CRUD operations for the **Admin** model. + * Example usage: + * ```ts + * // Fetch zero or more Admins + * const admins = await prisma.admin.findMany() + * ``` + */ + get admin(): Prisma.AdminDelegate; + + /** + * `prisma.user`: Exposes CRUD operations for the **User** model. + * Example usage: + * ```ts + * // Fetch zero or more Users + * const users = await prisma.user.findMany() + * ``` + */ + get user(): Prisma.UserDelegate; + + /** + * `prisma.otpCode`: Exposes CRUD operations for the **OtpCode** model. + * Example usage: + * ```ts + * // Fetch zero or more OtpCodes + * const otpCodes = await prisma.otpCode.findMany() + * ``` + */ + get otpCode(): Prisma.OtpCodeDelegate; + + /** + * `prisma.campaign`: Exposes CRUD operations for the **Campaign** model. + * Example usage: + * ```ts + * // Fetch zero or more Campaigns + * const campaigns = await prisma.campaign.findMany() + * ``` + */ + get campaign(): Prisma.CampaignDelegate; + + /** + * `prisma.prize`: Exposes CRUD operations for the **Prize** model. + * Example usage: + * ```ts + * // Fetch zero or more Prizes + * const prizes = await prisma.prize.findMany() + * ``` + */ + get prize(): Prisma.PrizeDelegate; + + /** + * `prisma.userCampaign`: Exposes CRUD operations for the **UserCampaign** model. + * Example usage: + * ```ts + * // Fetch zero or more UserCampaigns + * const userCampaigns = await prisma.userCampaign.findMany() + * ``` + */ + get userCampaign(): Prisma.UserCampaignDelegate; + + /** + * `prisma.chanceTransaction`: Exposes CRUD operations for the **ChanceTransaction** model. + * Example usage: + * ```ts + * // Fetch zero or more ChanceTransactions + * const chanceTransactions = await prisma.chanceTransaction.findMany() + * ``` + */ + get chanceTransaction(): Prisma.ChanceTransactionDelegate; + + /** + * `prisma.spin`: Exposes CRUD operations for the **Spin** model. + * Example usage: + * ```ts + * // Fetch zero or more Spins + * const spins = await prisma.spin.findMany() + * ``` + */ + get spin(): Prisma.SpinDelegate; + + /** + * `prisma.userPrize`: Exposes CRUD operations for the **UserPrize** model. + * Example usage: + * ```ts + * // Fetch zero or more UserPrizes + * const userPrizes = await prisma.userPrize.findMany() + * ``` + */ + get userPrize(): Prisma.UserPrizeDelegate; + + /** + * `prisma.smsLog`: Exposes CRUD operations for the **SmsLog** model. + * Example usage: + * ```ts + * // Fetch zero or more SmsLogs + * const smsLogs = await prisma.smsLog.findMany() + * ``` + */ + get smsLog(): Prisma.SmsLogDelegate; + + /** + * `prisma.adminLog`: Exposes CRUD operations for the **AdminLog** model. + * Example usage: + * ```ts + * // Fetch zero or more AdminLogs + * const adminLogs = await prisma.adminLog.findMany() + * ``` + */ + get adminLog(): Prisma.AdminLogDelegate; +} + +export namespace Prisma { + export import DMMF = runtime.DMMF + + export type PrismaPromise = $Public.PrismaPromise + + /** + * Validator + */ + export import validator = runtime.Public.validator + + /** + * Prisma Errors + */ + export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError + export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError + export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError + export import PrismaClientInitializationError = runtime.PrismaClientInitializationError + export import PrismaClientValidationError = runtime.PrismaClientValidationError + export import NotFoundError = runtime.NotFoundError + + /** + * Re-export of sql-template-tag + */ + export import sql = runtime.sqltag + export import empty = runtime.empty + export import join = runtime.join + export import raw = runtime.raw + export import Sql = runtime.Sql + + + + /** + * Decimal.js + */ + export import Decimal = runtime.Decimal + + export type DecimalJsLike = runtime.DecimalJsLike + + /** + * Metrics + */ + export type Metrics = runtime.Metrics + export type Metric = runtime.Metric + export type MetricHistogram = runtime.MetricHistogram + export type MetricHistogramBucket = runtime.MetricHistogramBucket + + /** + * Extensions + */ + export import Extension = $Extensions.UserArgs + export import getExtensionContext = runtime.Extensions.getExtensionContext + export import Args = $Public.Args + export import Payload = $Public.Payload + export import Result = $Public.Result + export import Exact = $Public.Exact + + /** + * Prisma Client JS version: 5.22.0 + * Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2 + */ + export type PrismaVersion = { + client: string + } + + export const prismaVersion: PrismaVersion + + /** + * Utility Types + */ + + + export import JsonObject = runtime.JsonObject + export import JsonArray = runtime.JsonArray + export import JsonValue = runtime.JsonValue + export import InputJsonObject = runtime.InputJsonObject + export import InputJsonArray = runtime.InputJsonArray + export import InputJsonValue = runtime.InputJsonValue + + /** + * Types of the values used to represent different kinds of `null` values when working with JSON fields. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + namespace NullTypes { + /** + * Type of `Prisma.DbNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.DbNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class DbNull { + private DbNull: never + private constructor() + } + + /** + * Type of `Prisma.JsonNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.JsonNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class JsonNull { + private JsonNull: never + private constructor() + } + + /** + * Type of `Prisma.AnyNull`. + * + * You cannot use other instances of this class. Please use the `Prisma.AnyNull` value. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + class AnyNull { + private AnyNull: never + private constructor() + } + } + + /** + * Helper for filtering JSON entries that have `null` on the database (empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const DbNull: NullTypes.DbNull + + /** + * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const JsonNull: NullTypes.JsonNull + + /** + * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ + export const AnyNull: NullTypes.AnyNull + + type SelectAndInclude = { + select: any + include: any + } + + type SelectAndOmit = { + select: any + omit: any + } + + /** + * Get the type of the value, that the Promise holds. + */ + export type PromiseType> = T extends PromiseLike ? U : T; + + /** + * Get the return type of a function which returns a Promise. + */ + export type PromiseReturnType $Utils.JsPromise> = PromiseType> + + /** + * From T, pick a set of properties whose keys are in the union K + */ + type Prisma__Pick = { + [P in K]: T[P]; + }; + + + export type Enumerable = T | Array; + + export type RequiredKeys = { + [K in keyof T]-?: {} extends Prisma__Pick ? never : K + }[keyof T] + + export type TruthyKeys = keyof { + [K in keyof T as T[K] extends false | undefined | null ? never : K]: K + } + + export type TrueKeys = TruthyKeys>> + + /** + * Subset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection + */ + export type Subset = { + [key in keyof T]: key extends keyof U ? T[key] : never; + }; + + /** + * SelectSubset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. + * Additionally, it validates, if both select and include are present. If the case, it errors. + */ + export type SelectSubset = { + [key in keyof T]: key extends keyof U ? T[key] : never + } & + (T extends SelectAndInclude + ? 'Please either choose `select` or `include`.' + : T extends SelectAndOmit + ? 'Please either choose `select` or `omit`.' + : {}) + + /** + * Subset + Intersection + * @desc From `T` pick properties that exist in `U` and intersect `K` + */ + export type SubsetIntersection = { + [key in keyof T]: key extends keyof U ? T[key] : never + } & + K + + type Without = { [P in Exclude]?: never }; + + /** + * XOR is needed to have a real mutually exclusive union type + * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types + */ + type XOR = + T extends object ? + U extends object ? + (Without & U) | (Without & T) + : U : T + + + /** + * Is T a Record? + */ + type IsObject = T extends Array + ? False + : T extends Date + ? False + : T extends Uint8Array + ? False + : T extends BigInt + ? False + : T extends object + ? True + : False + + + /** + * If it's T[], return T + */ + export type UnEnumerate = T extends Array ? U : T + + /** + * From ts-toolbelt + */ + + type __Either = Omit & + { + // Merge all but K + [P in K]: Prisma__Pick // With K possibilities + }[K] + + type EitherStrict = Strict<__Either> + + type EitherLoose = ComputeRaw<__Either> + + type _Either< + O extends object, + K extends Key, + strict extends Boolean + > = { + 1: EitherStrict + 0: EitherLoose + }[strict] + + type Either< + O extends object, + K extends Key, + strict extends Boolean = 1 + > = O extends unknown ? _Either : never + + export type Union = any + + type PatchUndefined = { + [K in keyof O]: O[K] extends undefined ? At : O[K] + } & {} + + /** Helper Types for "Merge" **/ + export type IntersectOf = ( + U extends unknown ? (k: U) => void : never + ) extends (k: infer I) => void + ? I + : never + + export type Overwrite = { + [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; + } & {}; + + type _Merge = IntersectOf; + }>>; + + type Key = string | number | symbol; + type AtBasic = K extends keyof O ? O[K] : never; + type AtStrict = O[K & keyof O]; + type AtLoose = O extends unknown ? AtStrict : never; + export type At = { + 1: AtStrict; + 0: AtLoose; + }[strict]; + + export type ComputeRaw = A extends Function ? A : { + [K in keyof A]: A[K]; + } & {}; + + export type OptionalFlat = { + [K in keyof O]?: O[K]; + } & {}; + + type _Record = { + [P in K]: T; + }; + + // cause typescript not to expand types and preserve names + type NoExpand = T extends unknown ? T : never; + + // this type assumes the passed object is entirely optional + type AtLeast = NoExpand< + O extends unknown + ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) + | {[P in keyof O as P extends K ? K : never]-?: O[P]} & O + : never>; + + type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; + + export type Strict = ComputeRaw<_Strict>; + /** End Helper Types for "Merge" **/ + + export type Merge = ComputeRaw<_Merge>>; + + /** + A [[Boolean]] + */ + export type Boolean = True | False + + // /** + // 1 + // */ + export type True = 1 + + /** + 0 + */ + export type False = 0 + + export type Not = { + 0: 1 + 1: 0 + }[B] + + export type Extends = [A1] extends [never] + ? 0 // anything `never` is false + : A1 extends A2 + ? 1 + : 0 + + export type Has = Not< + Extends, U1> + > + + export type Or = { + 0: { + 0: 0 + 1: 1 + } + 1: { + 0: 1 + 1: 1 + } + }[B1][B2] + + export type Keys = U extends unknown ? keyof U : never + + type Cast = A extends B ? A : B; + + export const type: unique symbol; + + + + /** + * Used by group by + */ + + export type GetScalarType = O extends object ? { + [P in keyof T]: P extends keyof O + ? O[P] + : never + } : never + + type FieldPaths< + T, + U = Omit + > = IsObject extends True ? U : T + + type GetHavingFields = { + [K in keyof T]: Or< + Or, Extends<'AND', K>>, + Extends<'NOT', K> + > extends True + ? // infer is only needed to not hit TS limit + // based on the brilliant idea of Pierre-Antoine Mills + // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 + T[K] extends infer TK + ? GetHavingFields extends object ? Merge> : never> + : never + : {} extends FieldPaths + ? never + : K + }[keyof T] + + /** + * Convert tuple to union + */ + type _TupleToUnion = T extends (infer E)[] ? E : never + type TupleToUnion = _TupleToUnion + type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T + + /** + * Like `Pick`, but additionally can also accept an array of keys + */ + type PickEnumerable | keyof T> = Prisma__Pick> + + /** + * Exclude all keys with underscores + */ + type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T + + + export type FieldRef = runtime.FieldRef + + type FieldRefInputType = Model extends never ? never : FieldRef + + + export const ModelName: { + Admin: 'Admin', + User: 'User', + OtpCode: 'OtpCode', + Campaign: 'Campaign', + Prize: 'Prize', + UserCampaign: 'UserCampaign', + ChanceTransaction: 'ChanceTransaction', + Spin: 'Spin', + UserPrize: 'UserPrize', + SmsLog: 'SmsLog', + AdminLog: 'AdminLog' + }; + + export type ModelName = (typeof ModelName)[keyof typeof ModelName] + + + export type Datasources = { + db?: Datasource + } + + interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs, clientOptions: PrismaClientOptions }, $Utils.Record> { + returns: Prisma.TypeMap + } + + export type TypeMap = { + meta: { + modelProps: "admin" | "user" | "otpCode" | "campaign" | "prize" | "userCampaign" | "chanceTransaction" | "spin" | "userPrize" | "smsLog" | "adminLog" + txIsolationLevel: Prisma.TransactionIsolationLevel + } + model: { + Admin: { + payload: Prisma.$AdminPayload + fields: Prisma.AdminFieldRefs + operations: { + findUnique: { + args: Prisma.AdminFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AdminFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.AdminFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AdminFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.AdminFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.AdminCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.AdminCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.AdminCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.AdminDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.AdminUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AdminDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.AdminUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.AdminUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.AdminAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.AdminGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.AdminCountArgs + result: $Utils.Optional | number + } + } + } + User: { + payload: Prisma.$UserPayload + fields: Prisma.UserFieldRefs + operations: { + findUnique: { + args: Prisma.UserFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.UserFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.UserFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.UserFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.UserFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.UserCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.UserCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.UserCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.UserDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.UserUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.UserDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.UserUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.UserUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.UserAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.UserGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.UserCountArgs + result: $Utils.Optional | number + } + } + } + OtpCode: { + payload: Prisma.$OtpCodePayload + fields: Prisma.OtpCodeFieldRefs + operations: { + findUnique: { + args: Prisma.OtpCodeFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.OtpCodeFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.OtpCodeFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.OtpCodeFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.OtpCodeFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.OtpCodeCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.OtpCodeCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.OtpCodeCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.OtpCodeDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.OtpCodeUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.OtpCodeDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.OtpCodeUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.OtpCodeUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.OtpCodeAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.OtpCodeGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.OtpCodeCountArgs + result: $Utils.Optional | number + } + } + } + Campaign: { + payload: Prisma.$CampaignPayload + fields: Prisma.CampaignFieldRefs + operations: { + findUnique: { + args: Prisma.CampaignFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.CampaignFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.CampaignFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.CampaignFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.CampaignFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.CampaignCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.CampaignCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.CampaignCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.CampaignDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.CampaignUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.CampaignDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.CampaignUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.CampaignUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.CampaignAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.CampaignGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.CampaignCountArgs + result: $Utils.Optional | number + } + } + } + Prize: { + payload: Prisma.$PrizePayload + fields: Prisma.PrizeFieldRefs + operations: { + findUnique: { + args: Prisma.PrizeFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.PrizeFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.PrizeFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.PrizeFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.PrizeFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.PrizeCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.PrizeCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.PrizeCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.PrizeDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.PrizeUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.PrizeDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.PrizeUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.PrizeUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.PrizeAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.PrizeGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.PrizeCountArgs + result: $Utils.Optional | number + } + } + } + UserCampaign: { + payload: Prisma.$UserCampaignPayload + fields: Prisma.UserCampaignFieldRefs + operations: { + findUnique: { + args: Prisma.UserCampaignFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.UserCampaignFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.UserCampaignFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.UserCampaignFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.UserCampaignFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.UserCampaignCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.UserCampaignCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.UserCampaignCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.UserCampaignDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.UserCampaignUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.UserCampaignDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.UserCampaignUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.UserCampaignUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.UserCampaignAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.UserCampaignGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.UserCampaignCountArgs + result: $Utils.Optional | number + } + } + } + ChanceTransaction: { + payload: Prisma.$ChanceTransactionPayload + fields: Prisma.ChanceTransactionFieldRefs + operations: { + findUnique: { + args: Prisma.ChanceTransactionFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.ChanceTransactionFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.ChanceTransactionFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.ChanceTransactionFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.ChanceTransactionFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.ChanceTransactionCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.ChanceTransactionCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.ChanceTransactionCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.ChanceTransactionDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.ChanceTransactionUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.ChanceTransactionDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.ChanceTransactionUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.ChanceTransactionUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.ChanceTransactionAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.ChanceTransactionGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.ChanceTransactionCountArgs + result: $Utils.Optional | number + } + } + } + Spin: { + payload: Prisma.$SpinPayload + fields: Prisma.SpinFieldRefs + operations: { + findUnique: { + args: Prisma.SpinFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.SpinFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.SpinFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.SpinFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.SpinFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.SpinCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.SpinCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.SpinCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.SpinDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.SpinUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.SpinDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.SpinUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.SpinUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.SpinAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.SpinGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.SpinCountArgs + result: $Utils.Optional | number + } + } + } + UserPrize: { + payload: Prisma.$UserPrizePayload + fields: Prisma.UserPrizeFieldRefs + operations: { + findUnique: { + args: Prisma.UserPrizeFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.UserPrizeFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.UserPrizeFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.UserPrizeFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.UserPrizeFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.UserPrizeCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.UserPrizeCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.UserPrizeCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.UserPrizeDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.UserPrizeUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.UserPrizeDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.UserPrizeUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.UserPrizeUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.UserPrizeAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.UserPrizeGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.UserPrizeCountArgs + result: $Utils.Optional | number + } + } + } + SmsLog: { + payload: Prisma.$SmsLogPayload + fields: Prisma.SmsLogFieldRefs + operations: { + findUnique: { + args: Prisma.SmsLogFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.SmsLogFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.SmsLogFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.SmsLogFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.SmsLogFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.SmsLogCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.SmsLogCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.SmsLogCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.SmsLogDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.SmsLogUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.SmsLogDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.SmsLogUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.SmsLogUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.SmsLogAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.SmsLogGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.SmsLogCountArgs + result: $Utils.Optional | number + } + } + } + AdminLog: { + payload: Prisma.$AdminLogPayload + fields: Prisma.AdminLogFieldRefs + operations: { + findUnique: { + args: Prisma.AdminLogFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AdminLogFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.AdminLogFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AdminLogFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.AdminLogFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.AdminLogCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.AdminLogCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.AdminLogCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.AdminLogDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.AdminLogUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AdminLogDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.AdminLogUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.AdminLogUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.AdminLogAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.AdminLogGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.AdminLogCountArgs + result: $Utils.Optional | number + } + } + } + } + } & { + other: { + payload: any + operations: { + $executeRaw: { + args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], + result: any + } + $executeRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + $queryRaw: { + args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], + result: any + } + $queryRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + } + } + } + export const defineExtension: $Extensions.ExtendsHook<"define", Prisma.TypeMapCb, $Extensions.DefaultArgs> + export type DefaultPrismaClient = PrismaClient + export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' + export interface PrismaClientOptions { + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasources?: Datasources + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasourceUrl?: string + /** + * @default "colorless" + */ + errorFormat?: ErrorFormat + /** + * @example + * ``` + * // Defaults to stdout + * log: ['query', 'info', 'warn', 'error'] + * + * // Emit as events + * log: [ + * { emit: 'stdout', level: 'query' }, + * { emit: 'stdout', level: 'info' }, + * { emit: 'stdout', level: 'warn' } + * { emit: 'stdout', level: 'error' } + * ] + * ``` + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). + */ + log?: (LogLevel | LogDefinition)[] + /** + * The default values for transactionOptions + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: { + maxWait?: number + timeout?: number + isolationLevel?: Prisma.TransactionIsolationLevel + } + } + + + /* Types for Logging */ + export type LogLevel = 'info' | 'query' | 'warn' | 'error' + export type LogDefinition = { + level: LogLevel + emit: 'stdout' | 'event' + } + + export type GetLogType = T extends LogDefinition ? T['emit'] extends 'event' ? T['level'] : never : never + export type GetEvents = T extends Array ? + GetLogType | GetLogType | GetLogType | GetLogType + : never + + export type QueryEvent = { + timestamp: Date + query: string + params: string + duration: number + target: string + } + + export type LogEvent = { + timestamp: Date + message: string + target: string + } + /* End Types for Logging */ + + + export type PrismaAction = + | 'findUnique' + | 'findUniqueOrThrow' + | 'findMany' + | 'findFirst' + | 'findFirstOrThrow' + | 'create' + | 'createMany' + | 'createManyAndReturn' + | 'update' + | 'updateMany' + | 'upsert' + | 'delete' + | 'deleteMany' + | 'executeRaw' + | 'queryRaw' + | 'aggregate' + | 'count' + | 'runCommandRaw' + | 'findRaw' + | 'groupBy' + + /** + * These options are being passed into the middleware as "params" + */ + export type MiddlewareParams = { + model?: ModelName + action: PrismaAction + args: any + dataPath: string[] + runInTransaction: boolean + } + + /** + * The `T` type makes sure, that the `return proceed` is not forgotten in the middleware implementation + */ + export type Middleware = ( + params: MiddlewareParams, + next: (params: MiddlewareParams) => $Utils.JsPromise, + ) => $Utils.JsPromise + + // tested in getLogLevel.test.ts + export function getLogLevel(log: Array): LogLevel | undefined; + + /** + * `PrismaClient` proxy available in interactive transactions. + */ + export type TransactionClient = Omit + + export type Datasource = { + url?: string + } + + /** + * Count Types + */ + + + /** + * Count Type AdminCountOutputType + */ + + export type AdminCountOutputType = { + auditLogs: number + chanceTxns: number + } + + export type AdminCountOutputTypeSelect = { + auditLogs?: boolean | AdminCountOutputTypeCountAuditLogsArgs + chanceTxns?: boolean | AdminCountOutputTypeCountChanceTxnsArgs + } + + // Custom InputTypes + /** + * AdminCountOutputType without action + */ + export type AdminCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the AdminCountOutputType + */ + select?: AdminCountOutputTypeSelect | null + } + + /** + * AdminCountOutputType without action + */ + export type AdminCountOutputTypeCountAuditLogsArgs = { + where?: AdminLogWhereInput + } + + /** + * AdminCountOutputType without action + */ + export type AdminCountOutputTypeCountChanceTxnsArgs = { + where?: ChanceTransactionWhereInput + } + + + /** + * Count Type UserCountOutputType + */ + + export type UserCountOutputType = { + userCampaigns: number + chanceTransactions: number + spins: number + userPrizes: number + otpCodes: number + smsLogs: number + } + + export type UserCountOutputTypeSelect = { + userCampaigns?: boolean | UserCountOutputTypeCountUserCampaignsArgs + chanceTransactions?: boolean | UserCountOutputTypeCountChanceTransactionsArgs + spins?: boolean | UserCountOutputTypeCountSpinsArgs + userPrizes?: boolean | UserCountOutputTypeCountUserPrizesArgs + otpCodes?: boolean | UserCountOutputTypeCountOtpCodesArgs + smsLogs?: boolean | UserCountOutputTypeCountSmsLogsArgs + } + + // Custom InputTypes + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the UserCountOutputType + */ + select?: UserCountOutputTypeSelect | null + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountUserCampaignsArgs = { + where?: UserCampaignWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountChanceTransactionsArgs = { + where?: ChanceTransactionWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountSpinsArgs = { + where?: SpinWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountUserPrizesArgs = { + where?: UserPrizeWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountOtpCodesArgs = { + where?: OtpCodeWhereInput + } + + /** + * UserCountOutputType without action + */ + export type UserCountOutputTypeCountSmsLogsArgs = { + where?: SmsLogWhereInput + } + + + /** + * Count Type CampaignCountOutputType + */ + + export type CampaignCountOutputType = { + prizes: number + userCampaigns: number + chanceTxns: number + spins: number + userPrizes: number + } + + export type CampaignCountOutputTypeSelect = { + prizes?: boolean | CampaignCountOutputTypeCountPrizesArgs + userCampaigns?: boolean | CampaignCountOutputTypeCountUserCampaignsArgs + chanceTxns?: boolean | CampaignCountOutputTypeCountChanceTxnsArgs + spins?: boolean | CampaignCountOutputTypeCountSpinsArgs + userPrizes?: boolean | CampaignCountOutputTypeCountUserPrizesArgs + } + + // Custom InputTypes + /** + * CampaignCountOutputType without action + */ + export type CampaignCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the CampaignCountOutputType + */ + select?: CampaignCountOutputTypeSelect | null + } + + /** + * CampaignCountOutputType without action + */ + export type CampaignCountOutputTypeCountPrizesArgs = { + where?: PrizeWhereInput + } + + /** + * CampaignCountOutputType without action + */ + export type CampaignCountOutputTypeCountUserCampaignsArgs = { + where?: UserCampaignWhereInput + } + + /** + * CampaignCountOutputType without action + */ + export type CampaignCountOutputTypeCountChanceTxnsArgs = { + where?: ChanceTransactionWhereInput + } + + /** + * CampaignCountOutputType without action + */ + export type CampaignCountOutputTypeCountSpinsArgs = { + where?: SpinWhereInput + } + + /** + * CampaignCountOutputType without action + */ + export type CampaignCountOutputTypeCountUserPrizesArgs = { + where?: UserPrizeWhereInput + } + + + /** + * Count Type PrizeCountOutputType + */ + + export type PrizeCountOutputType = { + spins: number + userPrizes: number + } + + export type PrizeCountOutputTypeSelect = { + spins?: boolean | PrizeCountOutputTypeCountSpinsArgs + userPrizes?: boolean | PrizeCountOutputTypeCountUserPrizesArgs + } + + // Custom InputTypes + /** + * PrizeCountOutputType without action + */ + export type PrizeCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the PrizeCountOutputType + */ + select?: PrizeCountOutputTypeSelect | null + } + + /** + * PrizeCountOutputType without action + */ + export type PrizeCountOutputTypeCountSpinsArgs = { + where?: SpinWhereInput + } + + /** + * PrizeCountOutputType without action + */ + export type PrizeCountOutputTypeCountUserPrizesArgs = { + where?: UserPrizeWhereInput + } + + + /** + * Models + */ + + /** + * Model Admin + */ + + export type AggregateAdmin = { + _count: AdminCountAggregateOutputType | null + _min: AdminMinAggregateOutputType | null + _max: AdminMaxAggregateOutputType | null + } + + export type AdminMinAggregateOutputType = { + id: string | null + name: string | null + mobile: string | null + email: string | null + passwordHash: string | null + role: $Enums.AdminRole | null + status: $Enums.AdminStatus | null + createdAt: Date | null + updatedAt: Date | null + } + + export type AdminMaxAggregateOutputType = { + id: string | null + name: string | null + mobile: string | null + email: string | null + passwordHash: string | null + role: $Enums.AdminRole | null + status: $Enums.AdminStatus | null + createdAt: Date | null + updatedAt: Date | null + } + + export type AdminCountAggregateOutputType = { + id: number + name: number + mobile: number + email: number + passwordHash: number + role: number + status: number + createdAt: number + updatedAt: number + _all: number + } + + + export type AdminMinAggregateInputType = { + id?: true + name?: true + mobile?: true + email?: true + passwordHash?: true + role?: true + status?: true + createdAt?: true + updatedAt?: true + } + + export type AdminMaxAggregateInputType = { + id?: true + name?: true + mobile?: true + email?: true + passwordHash?: true + role?: true + status?: true + createdAt?: true + updatedAt?: true + } + + export type AdminCountAggregateInputType = { + id?: true + name?: true + mobile?: true + email?: true + passwordHash?: true + role?: true + status?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type AdminAggregateArgs = { + /** + * Filter which Admin to aggregate. + */ + where?: AdminWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Admins to fetch. + */ + orderBy?: AdminOrderByWithRelationInput | AdminOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: AdminWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Admins from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Admins. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Admins + **/ + _count?: true | AdminCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AdminMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AdminMaxAggregateInputType + } + + export type GetAdminAggregateType = { + [P in keyof T & keyof AggregateAdmin]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type AdminGroupByArgs = { + where?: AdminWhereInput + orderBy?: AdminOrderByWithAggregationInput | AdminOrderByWithAggregationInput[] + by: AdminScalarFieldEnum[] | AdminScalarFieldEnum + having?: AdminScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AdminCountAggregateInputType | true + _min?: AdminMinAggregateInputType + _max?: AdminMaxAggregateInputType + } + + export type AdminGroupByOutputType = { + id: string + name: string + mobile: string + email: string + passwordHash: string + role: $Enums.AdminRole + status: $Enums.AdminStatus + createdAt: Date + updatedAt: Date + _count: AdminCountAggregateOutputType | null + _min: AdminMinAggregateOutputType | null + _max: AdminMaxAggregateOutputType | null + } + + type GetAdminGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof AdminGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type AdminSelect = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + mobile?: boolean + email?: boolean + passwordHash?: boolean + role?: boolean + status?: boolean + createdAt?: boolean + updatedAt?: boolean + auditLogs?: boolean | Admin$auditLogsArgs + chanceTxns?: boolean | Admin$chanceTxnsArgs + _count?: boolean | AdminCountOutputTypeDefaultArgs + }, ExtArgs["result"]["admin"]> + + export type AdminSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + name?: boolean + mobile?: boolean + email?: boolean + passwordHash?: boolean + role?: boolean + status?: boolean + createdAt?: boolean + updatedAt?: boolean + }, ExtArgs["result"]["admin"]> + + export type AdminSelectScalar = { + id?: boolean + name?: boolean + mobile?: boolean + email?: boolean + passwordHash?: boolean + role?: boolean + status?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + export type AdminInclude = { + auditLogs?: boolean | Admin$auditLogsArgs + chanceTxns?: boolean | Admin$chanceTxnsArgs + _count?: boolean | AdminCountOutputTypeDefaultArgs + } + export type AdminIncludeCreateManyAndReturn = {} + + export type $AdminPayload = { + name: "Admin" + objects: { + auditLogs: Prisma.$AdminLogPayload[] + chanceTxns: Prisma.$ChanceTransactionPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + name: string + mobile: string + email: string + passwordHash: string + role: $Enums.AdminRole + status: $Enums.AdminStatus + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["admin"]> + composites: {} + } + + type AdminGetPayload = $Result.GetResult + + type AdminCountArgs = + Omit & { + select?: AdminCountAggregateInputType | true + } + + export interface AdminDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Admin'], meta: { name: 'Admin' } } + /** + * Find zero or one Admin that matches the filter. + * @param {AdminFindUniqueArgs} args - Arguments to find a Admin + * @example + * // Get one Admin + * const admin = await prisma.admin.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__AdminClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one Admin that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AdminFindUniqueOrThrowArgs} args - Arguments to find a Admin + * @example + * // Get one Admin + * const admin = await prisma.admin.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__AdminClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first Admin that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminFindFirstArgs} args - Arguments to find a Admin + * @example + * // Get one Admin + * const admin = await prisma.admin.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__AdminClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first Admin that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminFindFirstOrThrowArgs} args - Arguments to find a Admin + * @example + * // Get one Admin + * const admin = await prisma.admin.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__AdminClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more Admins that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Admins + * const admins = await prisma.admin.findMany() + * + * // Get first 10 Admins + * const admins = await prisma.admin.findMany({ take: 10 }) + * + * // Only select the `id` + * const adminWithIdOnly = await prisma.admin.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a Admin. + * @param {AdminCreateArgs} args - Arguments to create a Admin. + * @example + * // Create one Admin + * const Admin = await prisma.admin.create({ + * data: { + * // ... data to create a Admin + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__AdminClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many Admins. + * @param {AdminCreateManyArgs} args - Arguments to create many Admins. + * @example + * // Create many Admins + * const admin = await prisma.admin.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Admins and returns the data saved in the database. + * @param {AdminCreateManyAndReturnArgs} args - Arguments to create many Admins. + * @example + * // Create many Admins + * const admin = await prisma.admin.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Admins and only return the `id` + * const adminWithIdOnly = await prisma.admin.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a Admin. + * @param {AdminDeleteArgs} args - Arguments to delete one Admin. + * @example + * // Delete one Admin + * const Admin = await prisma.admin.delete({ + * where: { + * // ... filter to delete one Admin + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__AdminClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one Admin. + * @param {AdminUpdateArgs} args - Arguments to update one Admin. + * @example + * // Update one Admin + * const admin = await prisma.admin.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__AdminClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more Admins. + * @param {AdminDeleteManyArgs} args - Arguments to filter Admins to delete. + * @example + * // Delete a few Admins + * const { count } = await prisma.admin.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Admins. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Admins + * const admin = await prisma.admin.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one Admin. + * @param {AdminUpsertArgs} args - Arguments to update or create a Admin. + * @example + * // Update or create a Admin + * const admin = await prisma.admin.upsert({ + * create: { + * // ... data to create a Admin + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Admin we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__AdminClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of Admins. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminCountArgs} args - Arguments to filter Admins to count. + * @example + * // Count the number of Admins + * const count = await prisma.admin.count({ + * where: { + * // ... the filter for the Admins we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Admin. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Admin. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends AdminGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: AdminGroupByArgs['orderBy'] } + : { orderBy?: AdminGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAdminGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Admin model + */ + readonly fields: AdminFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Admin. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__AdminClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + auditLogs = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + chanceTxns = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Admin model + */ + interface AdminFieldRefs { + readonly id: FieldRef<"Admin", 'String'> + readonly name: FieldRef<"Admin", 'String'> + readonly mobile: FieldRef<"Admin", 'String'> + readonly email: FieldRef<"Admin", 'String'> + readonly passwordHash: FieldRef<"Admin", 'String'> + readonly role: FieldRef<"Admin", 'AdminRole'> + readonly status: FieldRef<"Admin", 'AdminStatus'> + readonly createdAt: FieldRef<"Admin", 'DateTime'> + readonly updatedAt: FieldRef<"Admin", 'DateTime'> + } + + + // Custom InputTypes + /** + * Admin findUnique + */ + export type AdminFindUniqueArgs = { + /** + * Select specific fields to fetch from the Admin + */ + select?: AdminSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminInclude | null + /** + * Filter, which Admin to fetch. + */ + where: AdminWhereUniqueInput + } + + /** + * Admin findUniqueOrThrow + */ + export type AdminFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Admin + */ + select?: AdminSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminInclude | null + /** + * Filter, which Admin to fetch. + */ + where: AdminWhereUniqueInput + } + + /** + * Admin findFirst + */ + export type AdminFindFirstArgs = { + /** + * Select specific fields to fetch from the Admin + */ + select?: AdminSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminInclude | null + /** + * Filter, which Admin to fetch. + */ + where?: AdminWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Admins to fetch. + */ + orderBy?: AdminOrderByWithRelationInput | AdminOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Admins. + */ + cursor?: AdminWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Admins from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Admins. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Admins. + */ + distinct?: AdminScalarFieldEnum | AdminScalarFieldEnum[] + } + + /** + * Admin findFirstOrThrow + */ + export type AdminFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Admin + */ + select?: AdminSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminInclude | null + /** + * Filter, which Admin to fetch. + */ + where?: AdminWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Admins to fetch. + */ + orderBy?: AdminOrderByWithRelationInput | AdminOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Admins. + */ + cursor?: AdminWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Admins from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Admins. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Admins. + */ + distinct?: AdminScalarFieldEnum | AdminScalarFieldEnum[] + } + + /** + * Admin findMany + */ + export type AdminFindManyArgs = { + /** + * Select specific fields to fetch from the Admin + */ + select?: AdminSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminInclude | null + /** + * Filter, which Admins to fetch. + */ + where?: AdminWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Admins to fetch. + */ + orderBy?: AdminOrderByWithRelationInput | AdminOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Admins. + */ + cursor?: AdminWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Admins from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Admins. + */ + skip?: number + distinct?: AdminScalarFieldEnum | AdminScalarFieldEnum[] + } + + /** + * Admin create + */ + export type AdminCreateArgs = { + /** + * Select specific fields to fetch from the Admin + */ + select?: AdminSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminInclude | null + /** + * The data needed to create a Admin. + */ + data: XOR + } + + /** + * Admin createMany + */ + export type AdminCreateManyArgs = { + /** + * The data used to create many Admins. + */ + data: AdminCreateManyInput | AdminCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Admin createManyAndReturn + */ + export type AdminCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Admin + */ + select?: AdminSelectCreateManyAndReturn | null + /** + * The data used to create many Admins. + */ + data: AdminCreateManyInput | AdminCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Admin update + */ + export type AdminUpdateArgs = { + /** + * Select specific fields to fetch from the Admin + */ + select?: AdminSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminInclude | null + /** + * The data needed to update a Admin. + */ + data: XOR + /** + * Choose, which Admin to update. + */ + where: AdminWhereUniqueInput + } + + /** + * Admin updateMany + */ + export type AdminUpdateManyArgs = { + /** + * The data used to update Admins. + */ + data: XOR + /** + * Filter which Admins to update + */ + where?: AdminWhereInput + } + + /** + * Admin upsert + */ + export type AdminUpsertArgs = { + /** + * Select specific fields to fetch from the Admin + */ + select?: AdminSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminInclude | null + /** + * The filter to search for the Admin to update in case it exists. + */ + where: AdminWhereUniqueInput + /** + * In case the Admin found by the `where` argument doesn't exist, create a new Admin with this data. + */ + create: XOR + /** + * In case the Admin was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Admin delete + */ + export type AdminDeleteArgs = { + /** + * Select specific fields to fetch from the Admin + */ + select?: AdminSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminInclude | null + /** + * Filter which Admin to delete. + */ + where: AdminWhereUniqueInput + } + + /** + * Admin deleteMany + */ + export type AdminDeleteManyArgs = { + /** + * Filter which Admins to delete + */ + where?: AdminWhereInput + } + + /** + * Admin.auditLogs + */ + export type Admin$auditLogsArgs = { + /** + * Select specific fields to fetch from the AdminLog + */ + select?: AdminLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminLogInclude | null + where?: AdminLogWhereInput + orderBy?: AdminLogOrderByWithRelationInput | AdminLogOrderByWithRelationInput[] + cursor?: AdminLogWhereUniqueInput + take?: number + skip?: number + distinct?: AdminLogScalarFieldEnum | AdminLogScalarFieldEnum[] + } + + /** + * Admin.chanceTxns + */ + export type Admin$chanceTxnsArgs = { + /** + * Select specific fields to fetch from the ChanceTransaction + */ + select?: ChanceTransactionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChanceTransactionInclude | null + where?: ChanceTransactionWhereInput + orderBy?: ChanceTransactionOrderByWithRelationInput | ChanceTransactionOrderByWithRelationInput[] + cursor?: ChanceTransactionWhereUniqueInput + take?: number + skip?: number + distinct?: ChanceTransactionScalarFieldEnum | ChanceTransactionScalarFieldEnum[] + } + + /** + * Admin without action + */ + export type AdminDefaultArgs = { + /** + * Select specific fields to fetch from the Admin + */ + select?: AdminSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminInclude | null + } + + + /** + * Model User + */ + + export type AggregateUser = { + _count: UserCountAggregateOutputType | null + _min: UserMinAggregateOutputType | null + _max: UserMaxAggregateOutputType | null + } + + export type UserMinAggregateOutputType = { + id: string | null + mobile: string | null + name: string | null + status: $Enums.UserStatus | null + lastLoginAt: Date | null + createdAt: Date | null + updatedAt: Date | null + } + + export type UserMaxAggregateOutputType = { + id: string | null + mobile: string | null + name: string | null + status: $Enums.UserStatus | null + lastLoginAt: Date | null + createdAt: Date | null + updatedAt: Date | null + } + + export type UserCountAggregateOutputType = { + id: number + mobile: number + name: number + status: number + lastLoginAt: number + createdAt: number + updatedAt: number + _all: number + } + + + export type UserMinAggregateInputType = { + id?: true + mobile?: true + name?: true + status?: true + lastLoginAt?: true + createdAt?: true + updatedAt?: true + } + + export type UserMaxAggregateInputType = { + id?: true + mobile?: true + name?: true + status?: true + lastLoginAt?: true + createdAt?: true + updatedAt?: true + } + + export type UserCountAggregateInputType = { + id?: true + mobile?: true + name?: true + status?: true + lastLoginAt?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type UserAggregateArgs = { + /** + * Filter which User to aggregate. + */ + where?: UserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Users to fetch. + */ + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: UserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Users from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Users. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Users + **/ + _count?: true | UserCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: UserMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: UserMaxAggregateInputType + } + + export type GetUserAggregateType = { + [P in keyof T & keyof AggregateUser]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type UserGroupByArgs = { + where?: UserWhereInput + orderBy?: UserOrderByWithAggregationInput | UserOrderByWithAggregationInput[] + by: UserScalarFieldEnum[] | UserScalarFieldEnum + having?: UserScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: UserCountAggregateInputType | true + _min?: UserMinAggregateInputType + _max?: UserMaxAggregateInputType + } + + export type UserGroupByOutputType = { + id: string + mobile: string + name: string | null + status: $Enums.UserStatus + lastLoginAt: Date | null + createdAt: Date + updatedAt: Date + _count: UserCountAggregateOutputType | null + _min: UserMinAggregateOutputType | null + _max: UserMaxAggregateOutputType | null + } + + type GetUserGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof UserGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type UserSelect = $Extensions.GetSelect<{ + id?: boolean + mobile?: boolean + name?: boolean + status?: boolean + lastLoginAt?: boolean + createdAt?: boolean + updatedAt?: boolean + userCampaigns?: boolean | User$userCampaignsArgs + chanceTransactions?: boolean | User$chanceTransactionsArgs + spins?: boolean | User$spinsArgs + userPrizes?: boolean | User$userPrizesArgs + otpCodes?: boolean | User$otpCodesArgs + smsLogs?: boolean | User$smsLogsArgs + _count?: boolean | UserCountOutputTypeDefaultArgs + }, ExtArgs["result"]["user"]> + + export type UserSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + mobile?: boolean + name?: boolean + status?: boolean + lastLoginAt?: boolean + createdAt?: boolean + updatedAt?: boolean + }, ExtArgs["result"]["user"]> + + export type UserSelectScalar = { + id?: boolean + mobile?: boolean + name?: boolean + status?: boolean + lastLoginAt?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + export type UserInclude = { + userCampaigns?: boolean | User$userCampaignsArgs + chanceTransactions?: boolean | User$chanceTransactionsArgs + spins?: boolean | User$spinsArgs + userPrizes?: boolean | User$userPrizesArgs + otpCodes?: boolean | User$otpCodesArgs + smsLogs?: boolean | User$smsLogsArgs + _count?: boolean | UserCountOutputTypeDefaultArgs + } + export type UserIncludeCreateManyAndReturn = {} + + export type $UserPayload = { + name: "User" + objects: { + userCampaigns: Prisma.$UserCampaignPayload[] + chanceTransactions: Prisma.$ChanceTransactionPayload[] + spins: Prisma.$SpinPayload[] + userPrizes: Prisma.$UserPrizePayload[] + otpCodes: Prisma.$OtpCodePayload[] + smsLogs: Prisma.$SmsLogPayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + mobile: string + name: string | null + status: $Enums.UserStatus + lastLoginAt: Date | null + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["user"]> + composites: {} + } + + type UserGetPayload = $Result.GetResult + + type UserCountArgs = + Omit & { + select?: UserCountAggregateInputType | true + } + + export interface UserDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['User'], meta: { name: 'User' } } + /** + * Find zero or one User that matches the filter. + * @param {UserFindUniqueArgs} args - Arguments to find a User + * @example + * // Get one User + * const user = await prisma.user.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one User that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User + * @example + * // Get one User + * const user = await prisma.user.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first User that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserFindFirstArgs} args - Arguments to find a User + * @example + * // Get one User + * const user = await prisma.user.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first User that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserFindFirstOrThrowArgs} args - Arguments to find a User + * @example + * // Get one User + * const user = await prisma.user.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more Users that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Users + * const users = await prisma.user.findMany() + * + * // Get first 10 Users + * const users = await prisma.user.findMany({ take: 10 }) + * + * // Only select the `id` + * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a User. + * @param {UserCreateArgs} args - Arguments to create a User. + * @example + * // Create one User + * const User = await prisma.user.create({ + * data: { + * // ... data to create a User + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many Users. + * @param {UserCreateManyArgs} args - Arguments to create many Users. + * @example + * // Create many Users + * const user = await prisma.user.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Users and returns the data saved in the database. + * @param {UserCreateManyAndReturnArgs} args - Arguments to create many Users. + * @example + * // Create many Users + * const user = await prisma.user.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Users and only return the `id` + * const userWithIdOnly = await prisma.user.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a User. + * @param {UserDeleteArgs} args - Arguments to delete one User. + * @example + * // Delete one User + * const User = await prisma.user.delete({ + * where: { + * // ... filter to delete one User + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one User. + * @param {UserUpdateArgs} args - Arguments to update one User. + * @example + * // Update one User + * const user = await prisma.user.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more Users. + * @param {UserDeleteManyArgs} args - Arguments to filter Users to delete. + * @example + * // Delete a few Users + * const { count } = await prisma.user.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Users. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Users + * const user = await prisma.user.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one User. + * @param {UserUpsertArgs} args - Arguments to update or create a User. + * @example + * // Update or create a User + * const user = await prisma.user.upsert({ + * create: { + * // ... data to create a User + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the User we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__UserClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of Users. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserCountArgs} args - Arguments to filter Users to count. + * @example + * // Count the number of Users + * const count = await prisma.user.count({ + * where: { + * // ... the filter for the Users we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a User. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by User. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends UserGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: UserGroupByArgs['orderBy'] } + : { orderBy?: UserGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetUserGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the User model + */ + readonly fields: UserFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for User. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__UserClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + userCampaigns = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + chanceTransactions = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + spins = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + userPrizes = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + otpCodes = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + smsLogs = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the User model + */ + interface UserFieldRefs { + readonly id: FieldRef<"User", 'String'> + readonly mobile: FieldRef<"User", 'String'> + readonly name: FieldRef<"User", 'String'> + readonly status: FieldRef<"User", 'UserStatus'> + readonly lastLoginAt: FieldRef<"User", 'DateTime'> + readonly createdAt: FieldRef<"User", 'DateTime'> + readonly updatedAt: FieldRef<"User", 'DateTime'> + } + + + // Custom InputTypes + /** + * User findUnique + */ + export type UserFindUniqueArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter, which User to fetch. + */ + where: UserWhereUniqueInput + } + + /** + * User findUniqueOrThrow + */ + export type UserFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter, which User to fetch. + */ + where: UserWhereUniqueInput + } + + /** + * User findFirst + */ + export type UserFindFirstArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter, which User to fetch. + */ + where?: UserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Users to fetch. + */ + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Users. + */ + cursor?: UserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Users from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Users. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Users. + */ + distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] + } + + /** + * User findFirstOrThrow + */ + export type UserFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter, which User to fetch. + */ + where?: UserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Users to fetch. + */ + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Users. + */ + cursor?: UserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Users from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Users. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Users. + */ + distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] + } + + /** + * User findMany + */ + export type UserFindManyArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter, which Users to fetch. + */ + where?: UserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Users to fetch. + */ + orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Users. + */ + cursor?: UserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Users from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Users. + */ + skip?: number + distinct?: UserScalarFieldEnum | UserScalarFieldEnum[] + } + + /** + * User create + */ + export type UserCreateArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * The data needed to create a User. + */ + data: XOR + } + + /** + * User createMany + */ + export type UserCreateManyArgs = { + /** + * The data used to create many Users. + */ + data: UserCreateManyInput | UserCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * User createManyAndReturn + */ + export type UserCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelectCreateManyAndReturn | null + /** + * The data used to create many Users. + */ + data: UserCreateManyInput | UserCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * User update + */ + export type UserUpdateArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * The data needed to update a User. + */ + data: XOR + /** + * Choose, which User to update. + */ + where: UserWhereUniqueInput + } + + /** + * User updateMany + */ + export type UserUpdateManyArgs = { + /** + * The data used to update Users. + */ + data: XOR + /** + * Filter which Users to update + */ + where?: UserWhereInput + } + + /** + * User upsert + */ + export type UserUpsertArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * The filter to search for the User to update in case it exists. + */ + where: UserWhereUniqueInput + /** + * In case the User found by the `where` argument doesn't exist, create a new User with this data. + */ + create: XOR + /** + * In case the User was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * User delete + */ + export type UserDeleteArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + /** + * Filter which User to delete. + */ + where: UserWhereUniqueInput + } + + /** + * User deleteMany + */ + export type UserDeleteManyArgs = { + /** + * Filter which Users to delete + */ + where?: UserWhereInput + } + + /** + * User.userCampaigns + */ + export type User$userCampaignsArgs = { + /** + * Select specific fields to fetch from the UserCampaign + */ + select?: UserCampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserCampaignInclude | null + where?: UserCampaignWhereInput + orderBy?: UserCampaignOrderByWithRelationInput | UserCampaignOrderByWithRelationInput[] + cursor?: UserCampaignWhereUniqueInput + take?: number + skip?: number + distinct?: UserCampaignScalarFieldEnum | UserCampaignScalarFieldEnum[] + } + + /** + * User.chanceTransactions + */ + export type User$chanceTransactionsArgs = { + /** + * Select specific fields to fetch from the ChanceTransaction + */ + select?: ChanceTransactionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChanceTransactionInclude | null + where?: ChanceTransactionWhereInput + orderBy?: ChanceTransactionOrderByWithRelationInput | ChanceTransactionOrderByWithRelationInput[] + cursor?: ChanceTransactionWhereUniqueInput + take?: number + skip?: number + distinct?: ChanceTransactionScalarFieldEnum | ChanceTransactionScalarFieldEnum[] + } + + /** + * User.spins + */ + export type User$spinsArgs = { + /** + * Select specific fields to fetch from the Spin + */ + select?: SpinSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SpinInclude | null + where?: SpinWhereInput + orderBy?: SpinOrderByWithRelationInput | SpinOrderByWithRelationInput[] + cursor?: SpinWhereUniqueInput + take?: number + skip?: number + distinct?: SpinScalarFieldEnum | SpinScalarFieldEnum[] + } + + /** + * User.userPrizes + */ + export type User$userPrizesArgs = { + /** + * Select specific fields to fetch from the UserPrize + */ + select?: UserPrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserPrizeInclude | null + where?: UserPrizeWhereInput + orderBy?: UserPrizeOrderByWithRelationInput | UserPrizeOrderByWithRelationInput[] + cursor?: UserPrizeWhereUniqueInput + take?: number + skip?: number + distinct?: UserPrizeScalarFieldEnum | UserPrizeScalarFieldEnum[] + } + + /** + * User.otpCodes + */ + export type User$otpCodesArgs = { + /** + * Select specific fields to fetch from the OtpCode + */ + select?: OtpCodeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OtpCodeInclude | null + where?: OtpCodeWhereInput + orderBy?: OtpCodeOrderByWithRelationInput | OtpCodeOrderByWithRelationInput[] + cursor?: OtpCodeWhereUniqueInput + take?: number + skip?: number + distinct?: OtpCodeScalarFieldEnum | OtpCodeScalarFieldEnum[] + } + + /** + * User.smsLogs + */ + export type User$smsLogsArgs = { + /** + * Select specific fields to fetch from the SmsLog + */ + select?: SmsLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SmsLogInclude | null + where?: SmsLogWhereInput + orderBy?: SmsLogOrderByWithRelationInput | SmsLogOrderByWithRelationInput[] + cursor?: SmsLogWhereUniqueInput + take?: number + skip?: number + distinct?: SmsLogScalarFieldEnum | SmsLogScalarFieldEnum[] + } + + /** + * User without action + */ + export type UserDefaultArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + } + + + /** + * Model OtpCode + */ + + export type AggregateOtpCode = { + _count: OtpCodeCountAggregateOutputType | null + _avg: OtpCodeAvgAggregateOutputType | null + _sum: OtpCodeSumAggregateOutputType | null + _min: OtpCodeMinAggregateOutputType | null + _max: OtpCodeMaxAggregateOutputType | null + } + + export type OtpCodeAvgAggregateOutputType = { + attempts: number | null + } + + export type OtpCodeSumAggregateOutputType = { + attempts: number | null + } + + export type OtpCodeMinAggregateOutputType = { + id: string | null + mobile: string | null + code: string | null + userId: string | null + attempts: number | null + consumed: boolean | null + expiresAt: Date | null + createdAt: Date | null + } + + export type OtpCodeMaxAggregateOutputType = { + id: string | null + mobile: string | null + code: string | null + userId: string | null + attempts: number | null + consumed: boolean | null + expiresAt: Date | null + createdAt: Date | null + } + + export type OtpCodeCountAggregateOutputType = { + id: number + mobile: number + code: number + userId: number + attempts: number + consumed: number + expiresAt: number + createdAt: number + _all: number + } + + + export type OtpCodeAvgAggregateInputType = { + attempts?: true + } + + export type OtpCodeSumAggregateInputType = { + attempts?: true + } + + export type OtpCodeMinAggregateInputType = { + id?: true + mobile?: true + code?: true + userId?: true + attempts?: true + consumed?: true + expiresAt?: true + createdAt?: true + } + + export type OtpCodeMaxAggregateInputType = { + id?: true + mobile?: true + code?: true + userId?: true + attempts?: true + consumed?: true + expiresAt?: true + createdAt?: true + } + + export type OtpCodeCountAggregateInputType = { + id?: true + mobile?: true + code?: true + userId?: true + attempts?: true + consumed?: true + expiresAt?: true + createdAt?: true + _all?: true + } + + export type OtpCodeAggregateArgs = { + /** + * Filter which OtpCode to aggregate. + */ + where?: OtpCodeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of OtpCodes to fetch. + */ + orderBy?: OtpCodeOrderByWithRelationInput | OtpCodeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: OtpCodeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` OtpCodes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` OtpCodes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned OtpCodes + **/ + _count?: true | OtpCodeCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: OtpCodeAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: OtpCodeSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: OtpCodeMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: OtpCodeMaxAggregateInputType + } + + export type GetOtpCodeAggregateType = { + [P in keyof T & keyof AggregateOtpCode]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type OtpCodeGroupByArgs = { + where?: OtpCodeWhereInput + orderBy?: OtpCodeOrderByWithAggregationInput | OtpCodeOrderByWithAggregationInput[] + by: OtpCodeScalarFieldEnum[] | OtpCodeScalarFieldEnum + having?: OtpCodeScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: OtpCodeCountAggregateInputType | true + _avg?: OtpCodeAvgAggregateInputType + _sum?: OtpCodeSumAggregateInputType + _min?: OtpCodeMinAggregateInputType + _max?: OtpCodeMaxAggregateInputType + } + + export type OtpCodeGroupByOutputType = { + id: string + mobile: string + code: string + userId: string | null + attempts: number + consumed: boolean + expiresAt: Date + createdAt: Date + _count: OtpCodeCountAggregateOutputType | null + _avg: OtpCodeAvgAggregateOutputType | null + _sum: OtpCodeSumAggregateOutputType | null + _min: OtpCodeMinAggregateOutputType | null + _max: OtpCodeMaxAggregateOutputType | null + } + + type GetOtpCodeGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof OtpCodeGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type OtpCodeSelect = $Extensions.GetSelect<{ + id?: boolean + mobile?: boolean + code?: boolean + userId?: boolean + attempts?: boolean + consumed?: boolean + expiresAt?: boolean + createdAt?: boolean + user?: boolean | OtpCode$userArgs + }, ExtArgs["result"]["otpCode"]> + + export type OtpCodeSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + mobile?: boolean + code?: boolean + userId?: boolean + attempts?: boolean + consumed?: boolean + expiresAt?: boolean + createdAt?: boolean + user?: boolean | OtpCode$userArgs + }, ExtArgs["result"]["otpCode"]> + + export type OtpCodeSelectScalar = { + id?: boolean + mobile?: boolean + code?: boolean + userId?: boolean + attempts?: boolean + consumed?: boolean + expiresAt?: boolean + createdAt?: boolean + } + + export type OtpCodeInclude = { + user?: boolean | OtpCode$userArgs + } + export type OtpCodeIncludeCreateManyAndReturn = { + user?: boolean | OtpCode$userArgs + } + + export type $OtpCodePayload = { + name: "OtpCode" + objects: { + user: Prisma.$UserPayload | null + } + scalars: $Extensions.GetPayloadResult<{ + id: string + mobile: string + code: string + userId: string | null + attempts: number + consumed: boolean + expiresAt: Date + createdAt: Date + }, ExtArgs["result"]["otpCode"]> + composites: {} + } + + type OtpCodeGetPayload = $Result.GetResult + + type OtpCodeCountArgs = + Omit & { + select?: OtpCodeCountAggregateInputType | true + } + + export interface OtpCodeDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['OtpCode'], meta: { name: 'OtpCode' } } + /** + * Find zero or one OtpCode that matches the filter. + * @param {OtpCodeFindUniqueArgs} args - Arguments to find a OtpCode + * @example + * // Get one OtpCode + * const otpCode = await prisma.otpCode.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__OtpCodeClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one OtpCode that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {OtpCodeFindUniqueOrThrowArgs} args - Arguments to find a OtpCode + * @example + * // Get one OtpCode + * const otpCode = await prisma.otpCode.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__OtpCodeClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first OtpCode that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OtpCodeFindFirstArgs} args - Arguments to find a OtpCode + * @example + * // Get one OtpCode + * const otpCode = await prisma.otpCode.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__OtpCodeClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first OtpCode that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OtpCodeFindFirstOrThrowArgs} args - Arguments to find a OtpCode + * @example + * // Get one OtpCode + * const otpCode = await prisma.otpCode.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__OtpCodeClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more OtpCodes that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OtpCodeFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all OtpCodes + * const otpCodes = await prisma.otpCode.findMany() + * + * // Get first 10 OtpCodes + * const otpCodes = await prisma.otpCode.findMany({ take: 10 }) + * + * // Only select the `id` + * const otpCodeWithIdOnly = await prisma.otpCode.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a OtpCode. + * @param {OtpCodeCreateArgs} args - Arguments to create a OtpCode. + * @example + * // Create one OtpCode + * const OtpCode = await prisma.otpCode.create({ + * data: { + * // ... data to create a OtpCode + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__OtpCodeClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many OtpCodes. + * @param {OtpCodeCreateManyArgs} args - Arguments to create many OtpCodes. + * @example + * // Create many OtpCodes + * const otpCode = await prisma.otpCode.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many OtpCodes and returns the data saved in the database. + * @param {OtpCodeCreateManyAndReturnArgs} args - Arguments to create many OtpCodes. + * @example + * // Create many OtpCodes + * const otpCode = await prisma.otpCode.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many OtpCodes and only return the `id` + * const otpCodeWithIdOnly = await prisma.otpCode.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a OtpCode. + * @param {OtpCodeDeleteArgs} args - Arguments to delete one OtpCode. + * @example + * // Delete one OtpCode + * const OtpCode = await prisma.otpCode.delete({ + * where: { + * // ... filter to delete one OtpCode + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__OtpCodeClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one OtpCode. + * @param {OtpCodeUpdateArgs} args - Arguments to update one OtpCode. + * @example + * // Update one OtpCode + * const otpCode = await prisma.otpCode.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__OtpCodeClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more OtpCodes. + * @param {OtpCodeDeleteManyArgs} args - Arguments to filter OtpCodes to delete. + * @example + * // Delete a few OtpCodes + * const { count } = await prisma.otpCode.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more OtpCodes. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OtpCodeUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many OtpCodes + * const otpCode = await prisma.otpCode.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one OtpCode. + * @param {OtpCodeUpsertArgs} args - Arguments to update or create a OtpCode. + * @example + * // Update or create a OtpCode + * const otpCode = await prisma.otpCode.upsert({ + * create: { + * // ... data to create a OtpCode + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the OtpCode we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__OtpCodeClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of OtpCodes. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OtpCodeCountArgs} args - Arguments to filter OtpCodes to count. + * @example + * // Count the number of OtpCodes + * const count = await prisma.otpCode.count({ + * where: { + * // ... the filter for the OtpCodes we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a OtpCode. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OtpCodeAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by OtpCode. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {OtpCodeGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends OtpCodeGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: OtpCodeGroupByArgs['orderBy'] } + : { orderBy?: OtpCodeGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetOtpCodeGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the OtpCode model + */ + readonly fields: OtpCodeFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for OtpCode. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__OtpCodeClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the OtpCode model + */ + interface OtpCodeFieldRefs { + readonly id: FieldRef<"OtpCode", 'String'> + readonly mobile: FieldRef<"OtpCode", 'String'> + readonly code: FieldRef<"OtpCode", 'String'> + readonly userId: FieldRef<"OtpCode", 'String'> + readonly attempts: FieldRef<"OtpCode", 'Int'> + readonly consumed: FieldRef<"OtpCode", 'Boolean'> + readonly expiresAt: FieldRef<"OtpCode", 'DateTime'> + readonly createdAt: FieldRef<"OtpCode", 'DateTime'> + } + + + // Custom InputTypes + /** + * OtpCode findUnique + */ + export type OtpCodeFindUniqueArgs = { + /** + * Select specific fields to fetch from the OtpCode + */ + select?: OtpCodeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OtpCodeInclude | null + /** + * Filter, which OtpCode to fetch. + */ + where: OtpCodeWhereUniqueInput + } + + /** + * OtpCode findUniqueOrThrow + */ + export type OtpCodeFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the OtpCode + */ + select?: OtpCodeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OtpCodeInclude | null + /** + * Filter, which OtpCode to fetch. + */ + where: OtpCodeWhereUniqueInput + } + + /** + * OtpCode findFirst + */ + export type OtpCodeFindFirstArgs = { + /** + * Select specific fields to fetch from the OtpCode + */ + select?: OtpCodeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OtpCodeInclude | null + /** + * Filter, which OtpCode to fetch. + */ + where?: OtpCodeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of OtpCodes to fetch. + */ + orderBy?: OtpCodeOrderByWithRelationInput | OtpCodeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for OtpCodes. + */ + cursor?: OtpCodeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` OtpCodes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` OtpCodes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of OtpCodes. + */ + distinct?: OtpCodeScalarFieldEnum | OtpCodeScalarFieldEnum[] + } + + /** + * OtpCode findFirstOrThrow + */ + export type OtpCodeFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the OtpCode + */ + select?: OtpCodeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OtpCodeInclude | null + /** + * Filter, which OtpCode to fetch. + */ + where?: OtpCodeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of OtpCodes to fetch. + */ + orderBy?: OtpCodeOrderByWithRelationInput | OtpCodeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for OtpCodes. + */ + cursor?: OtpCodeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` OtpCodes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` OtpCodes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of OtpCodes. + */ + distinct?: OtpCodeScalarFieldEnum | OtpCodeScalarFieldEnum[] + } + + /** + * OtpCode findMany + */ + export type OtpCodeFindManyArgs = { + /** + * Select specific fields to fetch from the OtpCode + */ + select?: OtpCodeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OtpCodeInclude | null + /** + * Filter, which OtpCodes to fetch. + */ + where?: OtpCodeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of OtpCodes to fetch. + */ + orderBy?: OtpCodeOrderByWithRelationInput | OtpCodeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing OtpCodes. + */ + cursor?: OtpCodeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` OtpCodes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` OtpCodes. + */ + skip?: number + distinct?: OtpCodeScalarFieldEnum | OtpCodeScalarFieldEnum[] + } + + /** + * OtpCode create + */ + export type OtpCodeCreateArgs = { + /** + * Select specific fields to fetch from the OtpCode + */ + select?: OtpCodeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OtpCodeInclude | null + /** + * The data needed to create a OtpCode. + */ + data: XOR + } + + /** + * OtpCode createMany + */ + export type OtpCodeCreateManyArgs = { + /** + * The data used to create many OtpCodes. + */ + data: OtpCodeCreateManyInput | OtpCodeCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * OtpCode createManyAndReturn + */ + export type OtpCodeCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the OtpCode + */ + select?: OtpCodeSelectCreateManyAndReturn | null + /** + * The data used to create many OtpCodes. + */ + data: OtpCodeCreateManyInput | OtpCodeCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: OtpCodeIncludeCreateManyAndReturn | null + } + + /** + * OtpCode update + */ + export type OtpCodeUpdateArgs = { + /** + * Select specific fields to fetch from the OtpCode + */ + select?: OtpCodeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OtpCodeInclude | null + /** + * The data needed to update a OtpCode. + */ + data: XOR + /** + * Choose, which OtpCode to update. + */ + where: OtpCodeWhereUniqueInput + } + + /** + * OtpCode updateMany + */ + export type OtpCodeUpdateManyArgs = { + /** + * The data used to update OtpCodes. + */ + data: XOR + /** + * Filter which OtpCodes to update + */ + where?: OtpCodeWhereInput + } + + /** + * OtpCode upsert + */ + export type OtpCodeUpsertArgs = { + /** + * Select specific fields to fetch from the OtpCode + */ + select?: OtpCodeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OtpCodeInclude | null + /** + * The filter to search for the OtpCode to update in case it exists. + */ + where: OtpCodeWhereUniqueInput + /** + * In case the OtpCode found by the `where` argument doesn't exist, create a new OtpCode with this data. + */ + create: XOR + /** + * In case the OtpCode was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * OtpCode delete + */ + export type OtpCodeDeleteArgs = { + /** + * Select specific fields to fetch from the OtpCode + */ + select?: OtpCodeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OtpCodeInclude | null + /** + * Filter which OtpCode to delete. + */ + where: OtpCodeWhereUniqueInput + } + + /** + * OtpCode deleteMany + */ + export type OtpCodeDeleteManyArgs = { + /** + * Filter which OtpCodes to delete + */ + where?: OtpCodeWhereInput + } + + /** + * OtpCode.user + */ + export type OtpCode$userArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + where?: UserWhereInput + } + + /** + * OtpCode without action + */ + export type OtpCodeDefaultArgs = { + /** + * Select specific fields to fetch from the OtpCode + */ + select?: OtpCodeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OtpCodeInclude | null + } + + + /** + * Model Campaign + */ + + export type AggregateCampaign = { + _count: CampaignCountAggregateOutputType | null + _avg: CampaignAvgAggregateOutputType | null + _sum: CampaignSumAggregateOutputType | null + _min: CampaignMinAggregateOutputType | null + _max: CampaignMaxAggregateOutputType | null + } + + export type CampaignAvgAggregateOutputType = { + defaultChances: number | null + } + + export type CampaignSumAggregateOutputType = { + defaultChances: number | null + } + + export type CampaignMinAggregateOutputType = { + id: string | null + title: string | null + slug: string | null + description: string | null + image: string | null + banner: string | null + logo: string | null + startAt: Date | null + endAt: Date | null + status: $Enums.CampaignStatus | null + defaultChances: number | null + rules: string | null + ctaText: string | null + wheelDesign: $Enums.WheelDesign | null + createdAt: Date | null + updatedAt: Date | null + } + + export type CampaignMaxAggregateOutputType = { + id: string | null + title: string | null + slug: string | null + description: string | null + image: string | null + banner: string | null + logo: string | null + startAt: Date | null + endAt: Date | null + status: $Enums.CampaignStatus | null + defaultChances: number | null + rules: string | null + ctaText: string | null + wheelDesign: $Enums.WheelDesign | null + createdAt: Date | null + updatedAt: Date | null + } + + export type CampaignCountAggregateOutputType = { + id: number + title: number + slug: number + description: number + image: number + banner: number + logo: number + startAt: number + endAt: number + status: number + defaultChances: number + rules: number + ctaText: number + wheelDesign: number + settings: number + createdAt: number + updatedAt: number + _all: number + } + + + export type CampaignAvgAggregateInputType = { + defaultChances?: true + } + + export type CampaignSumAggregateInputType = { + defaultChances?: true + } + + export type CampaignMinAggregateInputType = { + id?: true + title?: true + slug?: true + description?: true + image?: true + banner?: true + logo?: true + startAt?: true + endAt?: true + status?: true + defaultChances?: true + rules?: true + ctaText?: true + wheelDesign?: true + createdAt?: true + updatedAt?: true + } + + export type CampaignMaxAggregateInputType = { + id?: true + title?: true + slug?: true + description?: true + image?: true + banner?: true + logo?: true + startAt?: true + endAt?: true + status?: true + defaultChances?: true + rules?: true + ctaText?: true + wheelDesign?: true + createdAt?: true + updatedAt?: true + } + + export type CampaignCountAggregateInputType = { + id?: true + title?: true + slug?: true + description?: true + image?: true + banner?: true + logo?: true + startAt?: true + endAt?: true + status?: true + defaultChances?: true + rules?: true + ctaText?: true + wheelDesign?: true + settings?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type CampaignAggregateArgs = { + /** + * Filter which Campaign to aggregate. + */ + where?: CampaignWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Campaigns to fetch. + */ + orderBy?: CampaignOrderByWithRelationInput | CampaignOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: CampaignWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Campaigns from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Campaigns. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Campaigns + **/ + _count?: true | CampaignCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: CampaignAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: CampaignSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: CampaignMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: CampaignMaxAggregateInputType + } + + export type GetCampaignAggregateType = { + [P in keyof T & keyof AggregateCampaign]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type CampaignGroupByArgs = { + where?: CampaignWhereInput + orderBy?: CampaignOrderByWithAggregationInput | CampaignOrderByWithAggregationInput[] + by: CampaignScalarFieldEnum[] | CampaignScalarFieldEnum + having?: CampaignScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: CampaignCountAggregateInputType | true + _avg?: CampaignAvgAggregateInputType + _sum?: CampaignSumAggregateInputType + _min?: CampaignMinAggregateInputType + _max?: CampaignMaxAggregateInputType + } + + export type CampaignGroupByOutputType = { + id: string + title: string + slug: string + description: string | null + image: string | null + banner: string | null + logo: string | null + startAt: Date + endAt: Date + status: $Enums.CampaignStatus + defaultChances: number + rules: string | null + ctaText: string | null + wheelDesign: $Enums.WheelDesign + settings: JsonValue | null + createdAt: Date + updatedAt: Date + _count: CampaignCountAggregateOutputType | null + _avg: CampaignAvgAggregateOutputType | null + _sum: CampaignSumAggregateOutputType | null + _min: CampaignMinAggregateOutputType | null + _max: CampaignMaxAggregateOutputType | null + } + + type GetCampaignGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof CampaignGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type CampaignSelect = $Extensions.GetSelect<{ + id?: boolean + title?: boolean + slug?: boolean + description?: boolean + image?: boolean + banner?: boolean + logo?: boolean + startAt?: boolean + endAt?: boolean + status?: boolean + defaultChances?: boolean + rules?: boolean + ctaText?: boolean + wheelDesign?: boolean + settings?: boolean + createdAt?: boolean + updatedAt?: boolean + prizes?: boolean | Campaign$prizesArgs + userCampaigns?: boolean | Campaign$userCampaignsArgs + chanceTxns?: boolean | Campaign$chanceTxnsArgs + spins?: boolean | Campaign$spinsArgs + userPrizes?: boolean | Campaign$userPrizesArgs + _count?: boolean | CampaignCountOutputTypeDefaultArgs + }, ExtArgs["result"]["campaign"]> + + export type CampaignSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + title?: boolean + slug?: boolean + description?: boolean + image?: boolean + banner?: boolean + logo?: boolean + startAt?: boolean + endAt?: boolean + status?: boolean + defaultChances?: boolean + rules?: boolean + ctaText?: boolean + wheelDesign?: boolean + settings?: boolean + createdAt?: boolean + updatedAt?: boolean + }, ExtArgs["result"]["campaign"]> + + export type CampaignSelectScalar = { + id?: boolean + title?: boolean + slug?: boolean + description?: boolean + image?: boolean + banner?: boolean + logo?: boolean + startAt?: boolean + endAt?: boolean + status?: boolean + defaultChances?: boolean + rules?: boolean + ctaText?: boolean + wheelDesign?: boolean + settings?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + export type CampaignInclude = { + prizes?: boolean | Campaign$prizesArgs + userCampaigns?: boolean | Campaign$userCampaignsArgs + chanceTxns?: boolean | Campaign$chanceTxnsArgs + spins?: boolean | Campaign$spinsArgs + userPrizes?: boolean | Campaign$userPrizesArgs + _count?: boolean | CampaignCountOutputTypeDefaultArgs + } + export type CampaignIncludeCreateManyAndReturn = {} + + export type $CampaignPayload = { + name: "Campaign" + objects: { + prizes: Prisma.$PrizePayload[] + userCampaigns: Prisma.$UserCampaignPayload[] + chanceTxns: Prisma.$ChanceTransactionPayload[] + spins: Prisma.$SpinPayload[] + userPrizes: Prisma.$UserPrizePayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + title: string + slug: string + description: string | null + image: string | null + banner: string | null + logo: string | null + startAt: Date + endAt: Date + status: $Enums.CampaignStatus + defaultChances: number + rules: string | null + ctaText: string | null + wheelDesign: $Enums.WheelDesign + settings: Prisma.JsonValue | null + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["campaign"]> + composites: {} + } + + type CampaignGetPayload = $Result.GetResult + + type CampaignCountArgs = + Omit & { + select?: CampaignCountAggregateInputType | true + } + + export interface CampaignDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Campaign'], meta: { name: 'Campaign' } } + /** + * Find zero or one Campaign that matches the filter. + * @param {CampaignFindUniqueArgs} args - Arguments to find a Campaign + * @example + * // Get one Campaign + * const campaign = await prisma.campaign.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__CampaignClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one Campaign that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {CampaignFindUniqueOrThrowArgs} args - Arguments to find a Campaign + * @example + * // Get one Campaign + * const campaign = await prisma.campaign.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__CampaignClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first Campaign that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CampaignFindFirstArgs} args - Arguments to find a Campaign + * @example + * // Get one Campaign + * const campaign = await prisma.campaign.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__CampaignClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first Campaign that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CampaignFindFirstOrThrowArgs} args - Arguments to find a Campaign + * @example + * // Get one Campaign + * const campaign = await prisma.campaign.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__CampaignClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more Campaigns that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CampaignFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Campaigns + * const campaigns = await prisma.campaign.findMany() + * + * // Get first 10 Campaigns + * const campaigns = await prisma.campaign.findMany({ take: 10 }) + * + * // Only select the `id` + * const campaignWithIdOnly = await prisma.campaign.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a Campaign. + * @param {CampaignCreateArgs} args - Arguments to create a Campaign. + * @example + * // Create one Campaign + * const Campaign = await prisma.campaign.create({ + * data: { + * // ... data to create a Campaign + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__CampaignClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many Campaigns. + * @param {CampaignCreateManyArgs} args - Arguments to create many Campaigns. + * @example + * // Create many Campaigns + * const campaign = await prisma.campaign.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Campaigns and returns the data saved in the database. + * @param {CampaignCreateManyAndReturnArgs} args - Arguments to create many Campaigns. + * @example + * // Create many Campaigns + * const campaign = await prisma.campaign.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Campaigns and only return the `id` + * const campaignWithIdOnly = await prisma.campaign.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a Campaign. + * @param {CampaignDeleteArgs} args - Arguments to delete one Campaign. + * @example + * // Delete one Campaign + * const Campaign = await prisma.campaign.delete({ + * where: { + * // ... filter to delete one Campaign + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__CampaignClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one Campaign. + * @param {CampaignUpdateArgs} args - Arguments to update one Campaign. + * @example + * // Update one Campaign + * const campaign = await prisma.campaign.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__CampaignClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more Campaigns. + * @param {CampaignDeleteManyArgs} args - Arguments to filter Campaigns to delete. + * @example + * // Delete a few Campaigns + * const { count } = await prisma.campaign.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Campaigns. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CampaignUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Campaigns + * const campaign = await prisma.campaign.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one Campaign. + * @param {CampaignUpsertArgs} args - Arguments to update or create a Campaign. + * @example + * // Update or create a Campaign + * const campaign = await prisma.campaign.upsert({ + * create: { + * // ... data to create a Campaign + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Campaign we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__CampaignClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of Campaigns. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CampaignCountArgs} args - Arguments to filter Campaigns to count. + * @example + * // Count the number of Campaigns + * const count = await prisma.campaign.count({ + * where: { + * // ... the filter for the Campaigns we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Campaign. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CampaignAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Campaign. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CampaignGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends CampaignGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: CampaignGroupByArgs['orderBy'] } + : { orderBy?: CampaignGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetCampaignGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Campaign model + */ + readonly fields: CampaignFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Campaign. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__CampaignClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + prizes = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + userCampaigns = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + chanceTxns = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + spins = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + userPrizes = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Campaign model + */ + interface CampaignFieldRefs { + readonly id: FieldRef<"Campaign", 'String'> + readonly title: FieldRef<"Campaign", 'String'> + readonly slug: FieldRef<"Campaign", 'String'> + readonly description: FieldRef<"Campaign", 'String'> + readonly image: FieldRef<"Campaign", 'String'> + readonly banner: FieldRef<"Campaign", 'String'> + readonly logo: FieldRef<"Campaign", 'String'> + readonly startAt: FieldRef<"Campaign", 'DateTime'> + readonly endAt: FieldRef<"Campaign", 'DateTime'> + readonly status: FieldRef<"Campaign", 'CampaignStatus'> + readonly defaultChances: FieldRef<"Campaign", 'Int'> + readonly rules: FieldRef<"Campaign", 'String'> + readonly ctaText: FieldRef<"Campaign", 'String'> + readonly wheelDesign: FieldRef<"Campaign", 'WheelDesign'> + readonly settings: FieldRef<"Campaign", 'Json'> + readonly createdAt: FieldRef<"Campaign", 'DateTime'> + readonly updatedAt: FieldRef<"Campaign", 'DateTime'> + } + + + // Custom InputTypes + /** + * Campaign findUnique + */ + export type CampaignFindUniqueArgs = { + /** + * Select specific fields to fetch from the Campaign + */ + select?: CampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CampaignInclude | null + /** + * Filter, which Campaign to fetch. + */ + where: CampaignWhereUniqueInput + } + + /** + * Campaign findUniqueOrThrow + */ + export type CampaignFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Campaign + */ + select?: CampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CampaignInclude | null + /** + * Filter, which Campaign to fetch. + */ + where: CampaignWhereUniqueInput + } + + /** + * Campaign findFirst + */ + export type CampaignFindFirstArgs = { + /** + * Select specific fields to fetch from the Campaign + */ + select?: CampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CampaignInclude | null + /** + * Filter, which Campaign to fetch. + */ + where?: CampaignWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Campaigns to fetch. + */ + orderBy?: CampaignOrderByWithRelationInput | CampaignOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Campaigns. + */ + cursor?: CampaignWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Campaigns from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Campaigns. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Campaigns. + */ + distinct?: CampaignScalarFieldEnum | CampaignScalarFieldEnum[] + } + + /** + * Campaign findFirstOrThrow + */ + export type CampaignFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Campaign + */ + select?: CampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CampaignInclude | null + /** + * Filter, which Campaign to fetch. + */ + where?: CampaignWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Campaigns to fetch. + */ + orderBy?: CampaignOrderByWithRelationInput | CampaignOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Campaigns. + */ + cursor?: CampaignWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Campaigns from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Campaigns. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Campaigns. + */ + distinct?: CampaignScalarFieldEnum | CampaignScalarFieldEnum[] + } + + /** + * Campaign findMany + */ + export type CampaignFindManyArgs = { + /** + * Select specific fields to fetch from the Campaign + */ + select?: CampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CampaignInclude | null + /** + * Filter, which Campaigns to fetch. + */ + where?: CampaignWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Campaigns to fetch. + */ + orderBy?: CampaignOrderByWithRelationInput | CampaignOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Campaigns. + */ + cursor?: CampaignWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Campaigns from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Campaigns. + */ + skip?: number + distinct?: CampaignScalarFieldEnum | CampaignScalarFieldEnum[] + } + + /** + * Campaign create + */ + export type CampaignCreateArgs = { + /** + * Select specific fields to fetch from the Campaign + */ + select?: CampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CampaignInclude | null + /** + * The data needed to create a Campaign. + */ + data: XOR + } + + /** + * Campaign createMany + */ + export type CampaignCreateManyArgs = { + /** + * The data used to create many Campaigns. + */ + data: CampaignCreateManyInput | CampaignCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Campaign createManyAndReturn + */ + export type CampaignCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Campaign + */ + select?: CampaignSelectCreateManyAndReturn | null + /** + * The data used to create many Campaigns. + */ + data: CampaignCreateManyInput | CampaignCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Campaign update + */ + export type CampaignUpdateArgs = { + /** + * Select specific fields to fetch from the Campaign + */ + select?: CampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CampaignInclude | null + /** + * The data needed to update a Campaign. + */ + data: XOR + /** + * Choose, which Campaign to update. + */ + where: CampaignWhereUniqueInput + } + + /** + * Campaign updateMany + */ + export type CampaignUpdateManyArgs = { + /** + * The data used to update Campaigns. + */ + data: XOR + /** + * Filter which Campaigns to update + */ + where?: CampaignWhereInput + } + + /** + * Campaign upsert + */ + export type CampaignUpsertArgs = { + /** + * Select specific fields to fetch from the Campaign + */ + select?: CampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CampaignInclude | null + /** + * The filter to search for the Campaign to update in case it exists. + */ + where: CampaignWhereUniqueInput + /** + * In case the Campaign found by the `where` argument doesn't exist, create a new Campaign with this data. + */ + create: XOR + /** + * In case the Campaign was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Campaign delete + */ + export type CampaignDeleteArgs = { + /** + * Select specific fields to fetch from the Campaign + */ + select?: CampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CampaignInclude | null + /** + * Filter which Campaign to delete. + */ + where: CampaignWhereUniqueInput + } + + /** + * Campaign deleteMany + */ + export type CampaignDeleteManyArgs = { + /** + * Filter which Campaigns to delete + */ + where?: CampaignWhereInput + } + + /** + * Campaign.prizes + */ + export type Campaign$prizesArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + where?: PrizeWhereInput + orderBy?: PrizeOrderByWithRelationInput | PrizeOrderByWithRelationInput[] + cursor?: PrizeWhereUniqueInput + take?: number + skip?: number + distinct?: PrizeScalarFieldEnum | PrizeScalarFieldEnum[] + } + + /** + * Campaign.userCampaigns + */ + export type Campaign$userCampaignsArgs = { + /** + * Select specific fields to fetch from the UserCampaign + */ + select?: UserCampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserCampaignInclude | null + where?: UserCampaignWhereInput + orderBy?: UserCampaignOrderByWithRelationInput | UserCampaignOrderByWithRelationInput[] + cursor?: UserCampaignWhereUniqueInput + take?: number + skip?: number + distinct?: UserCampaignScalarFieldEnum | UserCampaignScalarFieldEnum[] + } + + /** + * Campaign.chanceTxns + */ + export type Campaign$chanceTxnsArgs = { + /** + * Select specific fields to fetch from the ChanceTransaction + */ + select?: ChanceTransactionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChanceTransactionInclude | null + where?: ChanceTransactionWhereInput + orderBy?: ChanceTransactionOrderByWithRelationInput | ChanceTransactionOrderByWithRelationInput[] + cursor?: ChanceTransactionWhereUniqueInput + take?: number + skip?: number + distinct?: ChanceTransactionScalarFieldEnum | ChanceTransactionScalarFieldEnum[] + } + + /** + * Campaign.spins + */ + export type Campaign$spinsArgs = { + /** + * Select specific fields to fetch from the Spin + */ + select?: SpinSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SpinInclude | null + where?: SpinWhereInput + orderBy?: SpinOrderByWithRelationInput | SpinOrderByWithRelationInput[] + cursor?: SpinWhereUniqueInput + take?: number + skip?: number + distinct?: SpinScalarFieldEnum | SpinScalarFieldEnum[] + } + + /** + * Campaign.userPrizes + */ + export type Campaign$userPrizesArgs = { + /** + * Select specific fields to fetch from the UserPrize + */ + select?: UserPrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserPrizeInclude | null + where?: UserPrizeWhereInput + orderBy?: UserPrizeOrderByWithRelationInput | UserPrizeOrderByWithRelationInput[] + cursor?: UserPrizeWhereUniqueInput + take?: number + skip?: number + distinct?: UserPrizeScalarFieldEnum | UserPrizeScalarFieldEnum[] + } + + /** + * Campaign without action + */ + export type CampaignDefaultArgs = { + /** + * Select specific fields to fetch from the Campaign + */ + select?: CampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CampaignInclude | null + } + + + /** + * Model Prize + */ + + export type AggregatePrize = { + _count: PrizeCountAggregateOutputType | null + _avg: PrizeAvgAggregateOutputType | null + _sum: PrizeSumAggregateOutputType | null + _min: PrizeMinAggregateOutputType | null + _max: PrizeMaxAggregateOutputType | null + } + + export type PrizeAvgAggregateOutputType = { + initialStock: number | null + remainingStock: number | null + weight: number | null + sortOrder: number | null + } + + export type PrizeSumAggregateOutputType = { + initialStock: number | null + remainingStock: number | null + weight: number | null + sortOrder: number | null + } + + export type PrizeMinAggregateOutputType = { + id: string | null + campaignId: string | null + title: string | null + description: string | null + image: string | null + type: $Enums.PrizeType | null + stockType: $Enums.StockType | null + initialStock: number | null + remainingStock: number | null + weight: number | null + status: $Enums.PrizeStatus | null + sortOrder: number | null + segmentColor: string | null + expiresAt: Date | null + smsTemplate: string | null + createdAt: Date | null + updatedAt: Date | null + } + + export type PrizeMaxAggregateOutputType = { + id: string | null + campaignId: string | null + title: string | null + description: string | null + image: string | null + type: $Enums.PrizeType | null + stockType: $Enums.StockType | null + initialStock: number | null + remainingStock: number | null + weight: number | null + status: $Enums.PrizeStatus | null + sortOrder: number | null + segmentColor: string | null + expiresAt: Date | null + smsTemplate: string | null + createdAt: Date | null + updatedAt: Date | null + } + + export type PrizeCountAggregateOutputType = { + id: number + campaignId: number + title: number + description: number + image: number + type: number + stockType: number + initialStock: number + remainingStock: number + weight: number + status: number + sortOrder: number + segmentColor: number + expiresAt: number + smsTemplate: number + createdAt: number + updatedAt: number + _all: number + } + + + export type PrizeAvgAggregateInputType = { + initialStock?: true + remainingStock?: true + weight?: true + sortOrder?: true + } + + export type PrizeSumAggregateInputType = { + initialStock?: true + remainingStock?: true + weight?: true + sortOrder?: true + } + + export type PrizeMinAggregateInputType = { + id?: true + campaignId?: true + title?: true + description?: true + image?: true + type?: true + stockType?: true + initialStock?: true + remainingStock?: true + weight?: true + status?: true + sortOrder?: true + segmentColor?: true + expiresAt?: true + smsTemplate?: true + createdAt?: true + updatedAt?: true + } + + export type PrizeMaxAggregateInputType = { + id?: true + campaignId?: true + title?: true + description?: true + image?: true + type?: true + stockType?: true + initialStock?: true + remainingStock?: true + weight?: true + status?: true + sortOrder?: true + segmentColor?: true + expiresAt?: true + smsTemplate?: true + createdAt?: true + updatedAt?: true + } + + export type PrizeCountAggregateInputType = { + id?: true + campaignId?: true + title?: true + description?: true + image?: true + type?: true + stockType?: true + initialStock?: true + remainingStock?: true + weight?: true + status?: true + sortOrder?: true + segmentColor?: true + expiresAt?: true + smsTemplate?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type PrizeAggregateArgs = { + /** + * Filter which Prize to aggregate. + */ + where?: PrizeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Prizes to fetch. + */ + orderBy?: PrizeOrderByWithRelationInput | PrizeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: PrizeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Prizes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Prizes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Prizes + **/ + _count?: true | PrizeCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: PrizeAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: PrizeSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: PrizeMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: PrizeMaxAggregateInputType + } + + export type GetPrizeAggregateType = { + [P in keyof T & keyof AggregatePrize]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type PrizeGroupByArgs = { + where?: PrizeWhereInput + orderBy?: PrizeOrderByWithAggregationInput | PrizeOrderByWithAggregationInput[] + by: PrizeScalarFieldEnum[] | PrizeScalarFieldEnum + having?: PrizeScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: PrizeCountAggregateInputType | true + _avg?: PrizeAvgAggregateInputType + _sum?: PrizeSumAggregateInputType + _min?: PrizeMinAggregateInputType + _max?: PrizeMaxAggregateInputType + } + + export type PrizeGroupByOutputType = { + id: string + campaignId: string + title: string + description: string | null + image: string | null + type: $Enums.PrizeType + stockType: $Enums.StockType + initialStock: number | null + remainingStock: number | null + weight: number + status: $Enums.PrizeStatus + sortOrder: number + segmentColor: string + expiresAt: Date | null + smsTemplate: string | null + createdAt: Date + updatedAt: Date + _count: PrizeCountAggregateOutputType | null + _avg: PrizeAvgAggregateOutputType | null + _sum: PrizeSumAggregateOutputType | null + _min: PrizeMinAggregateOutputType | null + _max: PrizeMaxAggregateOutputType | null + } + + type GetPrizeGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof PrizeGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type PrizeSelect = $Extensions.GetSelect<{ + id?: boolean + campaignId?: boolean + title?: boolean + description?: boolean + image?: boolean + type?: boolean + stockType?: boolean + initialStock?: boolean + remainingStock?: boolean + weight?: boolean + status?: boolean + sortOrder?: boolean + segmentColor?: boolean + expiresAt?: boolean + smsTemplate?: boolean + createdAt?: boolean + updatedAt?: boolean + campaign?: boolean | CampaignDefaultArgs + spins?: boolean | Prize$spinsArgs + userPrizes?: boolean | Prize$userPrizesArgs + _count?: boolean | PrizeCountOutputTypeDefaultArgs + }, ExtArgs["result"]["prize"]> + + export type PrizeSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + campaignId?: boolean + title?: boolean + description?: boolean + image?: boolean + type?: boolean + stockType?: boolean + initialStock?: boolean + remainingStock?: boolean + weight?: boolean + status?: boolean + sortOrder?: boolean + segmentColor?: boolean + expiresAt?: boolean + smsTemplate?: boolean + createdAt?: boolean + updatedAt?: boolean + campaign?: boolean | CampaignDefaultArgs + }, ExtArgs["result"]["prize"]> + + export type PrizeSelectScalar = { + id?: boolean + campaignId?: boolean + title?: boolean + description?: boolean + image?: boolean + type?: boolean + stockType?: boolean + initialStock?: boolean + remainingStock?: boolean + weight?: boolean + status?: boolean + sortOrder?: boolean + segmentColor?: boolean + expiresAt?: boolean + smsTemplate?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + export type PrizeInclude = { + campaign?: boolean | CampaignDefaultArgs + spins?: boolean | Prize$spinsArgs + userPrizes?: boolean | Prize$userPrizesArgs + _count?: boolean | PrizeCountOutputTypeDefaultArgs + } + export type PrizeIncludeCreateManyAndReturn = { + campaign?: boolean | CampaignDefaultArgs + } + + export type $PrizePayload = { + name: "Prize" + objects: { + campaign: Prisma.$CampaignPayload + spins: Prisma.$SpinPayload[] + userPrizes: Prisma.$UserPrizePayload[] + } + scalars: $Extensions.GetPayloadResult<{ + id: string + campaignId: string + title: string + description: string | null + image: string | null + type: $Enums.PrizeType + stockType: $Enums.StockType + initialStock: number | null + remainingStock: number | null + weight: number + status: $Enums.PrizeStatus + sortOrder: number + segmentColor: string + expiresAt: Date | null + smsTemplate: string | null + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["prize"]> + composites: {} + } + + type PrizeGetPayload = $Result.GetResult + + type PrizeCountArgs = + Omit & { + select?: PrizeCountAggregateInputType | true + } + + export interface PrizeDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Prize'], meta: { name: 'Prize' } } + /** + * Find zero or one Prize that matches the filter. + * @param {PrizeFindUniqueArgs} args - Arguments to find a Prize + * @example + * // Get one Prize + * const prize = await prisma.prize.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__PrizeClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one Prize that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {PrizeFindUniqueOrThrowArgs} args - Arguments to find a Prize + * @example + * // Get one Prize + * const prize = await prisma.prize.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__PrizeClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first Prize that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PrizeFindFirstArgs} args - Arguments to find a Prize + * @example + * // Get one Prize + * const prize = await prisma.prize.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__PrizeClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first Prize that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PrizeFindFirstOrThrowArgs} args - Arguments to find a Prize + * @example + * // Get one Prize + * const prize = await prisma.prize.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__PrizeClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more Prizes that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PrizeFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Prizes + * const prizes = await prisma.prize.findMany() + * + * // Get first 10 Prizes + * const prizes = await prisma.prize.findMany({ take: 10 }) + * + * // Only select the `id` + * const prizeWithIdOnly = await prisma.prize.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a Prize. + * @param {PrizeCreateArgs} args - Arguments to create a Prize. + * @example + * // Create one Prize + * const Prize = await prisma.prize.create({ + * data: { + * // ... data to create a Prize + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__PrizeClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many Prizes. + * @param {PrizeCreateManyArgs} args - Arguments to create many Prizes. + * @example + * // Create many Prizes + * const prize = await prisma.prize.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Prizes and returns the data saved in the database. + * @param {PrizeCreateManyAndReturnArgs} args - Arguments to create many Prizes. + * @example + * // Create many Prizes + * const prize = await prisma.prize.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Prizes and only return the `id` + * const prizeWithIdOnly = await prisma.prize.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a Prize. + * @param {PrizeDeleteArgs} args - Arguments to delete one Prize. + * @example + * // Delete one Prize + * const Prize = await prisma.prize.delete({ + * where: { + * // ... filter to delete one Prize + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__PrizeClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one Prize. + * @param {PrizeUpdateArgs} args - Arguments to update one Prize. + * @example + * // Update one Prize + * const prize = await prisma.prize.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__PrizeClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more Prizes. + * @param {PrizeDeleteManyArgs} args - Arguments to filter Prizes to delete. + * @example + * // Delete a few Prizes + * const { count } = await prisma.prize.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Prizes. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PrizeUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Prizes + * const prize = await prisma.prize.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one Prize. + * @param {PrizeUpsertArgs} args - Arguments to update or create a Prize. + * @example + * // Update or create a Prize + * const prize = await prisma.prize.upsert({ + * create: { + * // ... data to create a Prize + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Prize we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__PrizeClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of Prizes. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PrizeCountArgs} args - Arguments to filter Prizes to count. + * @example + * // Count the number of Prizes + * const count = await prisma.prize.count({ + * where: { + * // ... the filter for the Prizes we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Prize. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PrizeAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Prize. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PrizeGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends PrizeGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: PrizeGroupByArgs['orderBy'] } + : { orderBy?: PrizeGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetPrizeGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Prize model + */ + readonly fields: PrizeFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Prize. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__PrizeClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + campaign = {}>(args?: Subset>): Prisma__CampaignClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + spins = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + userPrizes = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Prize model + */ + interface PrizeFieldRefs { + readonly id: FieldRef<"Prize", 'String'> + readonly campaignId: FieldRef<"Prize", 'String'> + readonly title: FieldRef<"Prize", 'String'> + readonly description: FieldRef<"Prize", 'String'> + readonly image: FieldRef<"Prize", 'String'> + readonly type: FieldRef<"Prize", 'PrizeType'> + readonly stockType: FieldRef<"Prize", 'StockType'> + readonly initialStock: FieldRef<"Prize", 'Int'> + readonly remainingStock: FieldRef<"Prize", 'Int'> + readonly weight: FieldRef<"Prize", 'Int'> + readonly status: FieldRef<"Prize", 'PrizeStatus'> + readonly sortOrder: FieldRef<"Prize", 'Int'> + readonly segmentColor: FieldRef<"Prize", 'String'> + readonly expiresAt: FieldRef<"Prize", 'DateTime'> + readonly smsTemplate: FieldRef<"Prize", 'String'> + readonly createdAt: FieldRef<"Prize", 'DateTime'> + readonly updatedAt: FieldRef<"Prize", 'DateTime'> + } + + + // Custom InputTypes + /** + * Prize findUnique + */ + export type PrizeFindUniqueArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * Filter, which Prize to fetch. + */ + where: PrizeWhereUniqueInput + } + + /** + * Prize findUniqueOrThrow + */ + export type PrizeFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * Filter, which Prize to fetch. + */ + where: PrizeWhereUniqueInput + } + + /** + * Prize findFirst + */ + export type PrizeFindFirstArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * Filter, which Prize to fetch. + */ + where?: PrizeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Prizes to fetch. + */ + orderBy?: PrizeOrderByWithRelationInput | PrizeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Prizes. + */ + cursor?: PrizeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Prizes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Prizes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Prizes. + */ + distinct?: PrizeScalarFieldEnum | PrizeScalarFieldEnum[] + } + + /** + * Prize findFirstOrThrow + */ + export type PrizeFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * Filter, which Prize to fetch. + */ + where?: PrizeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Prizes to fetch. + */ + orderBy?: PrizeOrderByWithRelationInput | PrizeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Prizes. + */ + cursor?: PrizeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Prizes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Prizes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Prizes. + */ + distinct?: PrizeScalarFieldEnum | PrizeScalarFieldEnum[] + } + + /** + * Prize findMany + */ + export type PrizeFindManyArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * Filter, which Prizes to fetch. + */ + where?: PrizeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Prizes to fetch. + */ + orderBy?: PrizeOrderByWithRelationInput | PrizeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Prizes. + */ + cursor?: PrizeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Prizes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Prizes. + */ + skip?: number + distinct?: PrizeScalarFieldEnum | PrizeScalarFieldEnum[] + } + + /** + * Prize create + */ + export type PrizeCreateArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * The data needed to create a Prize. + */ + data: XOR + } + + /** + * Prize createMany + */ + export type PrizeCreateManyArgs = { + /** + * The data used to create many Prizes. + */ + data: PrizeCreateManyInput | PrizeCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Prize createManyAndReturn + */ + export type PrizeCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelectCreateManyAndReturn | null + /** + * The data used to create many Prizes. + */ + data: PrizeCreateManyInput | PrizeCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeIncludeCreateManyAndReturn | null + } + + /** + * Prize update + */ + export type PrizeUpdateArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * The data needed to update a Prize. + */ + data: XOR + /** + * Choose, which Prize to update. + */ + where: PrizeWhereUniqueInput + } + + /** + * Prize updateMany + */ + export type PrizeUpdateManyArgs = { + /** + * The data used to update Prizes. + */ + data: XOR + /** + * Filter which Prizes to update + */ + where?: PrizeWhereInput + } + + /** + * Prize upsert + */ + export type PrizeUpsertArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * The filter to search for the Prize to update in case it exists. + */ + where: PrizeWhereUniqueInput + /** + * In case the Prize found by the `where` argument doesn't exist, create a new Prize with this data. + */ + create: XOR + /** + * In case the Prize was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Prize delete + */ + export type PrizeDeleteArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + /** + * Filter which Prize to delete. + */ + where: PrizeWhereUniqueInput + } + + /** + * Prize deleteMany + */ + export type PrizeDeleteManyArgs = { + /** + * Filter which Prizes to delete + */ + where?: PrizeWhereInput + } + + /** + * Prize.spins + */ + export type Prize$spinsArgs = { + /** + * Select specific fields to fetch from the Spin + */ + select?: SpinSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SpinInclude | null + where?: SpinWhereInput + orderBy?: SpinOrderByWithRelationInput | SpinOrderByWithRelationInput[] + cursor?: SpinWhereUniqueInput + take?: number + skip?: number + distinct?: SpinScalarFieldEnum | SpinScalarFieldEnum[] + } + + /** + * Prize.userPrizes + */ + export type Prize$userPrizesArgs = { + /** + * Select specific fields to fetch from the UserPrize + */ + select?: UserPrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserPrizeInclude | null + where?: UserPrizeWhereInput + orderBy?: UserPrizeOrderByWithRelationInput | UserPrizeOrderByWithRelationInput[] + cursor?: UserPrizeWhereUniqueInput + take?: number + skip?: number + distinct?: UserPrizeScalarFieldEnum | UserPrizeScalarFieldEnum[] + } + + /** + * Prize without action + */ + export type PrizeDefaultArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + } + + + /** + * Model UserCampaign + */ + + export type AggregateUserCampaign = { + _count: UserCampaignCountAggregateOutputType | null + _avg: UserCampaignAvgAggregateOutputType | null + _sum: UserCampaignSumAggregateOutputType | null + _min: UserCampaignMinAggregateOutputType | null + _max: UserCampaignMaxAggregateOutputType | null + } + + export type UserCampaignAvgAggregateOutputType = { + totalChances: number | null + usedChances: number | null + } + + export type UserCampaignSumAggregateOutputType = { + totalChances: number | null + usedChances: number | null + } + + export type UserCampaignMinAggregateOutputType = { + id: string | null + userId: string | null + campaignId: string | null + totalChances: number | null + usedChances: number | null + createdAt: Date | null + updatedAt: Date | null + } + + export type UserCampaignMaxAggregateOutputType = { + id: string | null + userId: string | null + campaignId: string | null + totalChances: number | null + usedChances: number | null + createdAt: Date | null + updatedAt: Date | null + } + + export type UserCampaignCountAggregateOutputType = { + id: number + userId: number + campaignId: number + totalChances: number + usedChances: number + createdAt: number + updatedAt: number + _all: number + } + + + export type UserCampaignAvgAggregateInputType = { + totalChances?: true + usedChances?: true + } + + export type UserCampaignSumAggregateInputType = { + totalChances?: true + usedChances?: true + } + + export type UserCampaignMinAggregateInputType = { + id?: true + userId?: true + campaignId?: true + totalChances?: true + usedChances?: true + createdAt?: true + updatedAt?: true + } + + export type UserCampaignMaxAggregateInputType = { + id?: true + userId?: true + campaignId?: true + totalChances?: true + usedChances?: true + createdAt?: true + updatedAt?: true + } + + export type UserCampaignCountAggregateInputType = { + id?: true + userId?: true + campaignId?: true + totalChances?: true + usedChances?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type UserCampaignAggregateArgs = { + /** + * Filter which UserCampaign to aggregate. + */ + where?: UserCampaignWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of UserCampaigns to fetch. + */ + orderBy?: UserCampaignOrderByWithRelationInput | UserCampaignOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: UserCampaignWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` UserCampaigns from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` UserCampaigns. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned UserCampaigns + **/ + _count?: true | UserCampaignCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: UserCampaignAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: UserCampaignSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: UserCampaignMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: UserCampaignMaxAggregateInputType + } + + export type GetUserCampaignAggregateType = { + [P in keyof T & keyof AggregateUserCampaign]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type UserCampaignGroupByArgs = { + where?: UserCampaignWhereInput + orderBy?: UserCampaignOrderByWithAggregationInput | UserCampaignOrderByWithAggregationInput[] + by: UserCampaignScalarFieldEnum[] | UserCampaignScalarFieldEnum + having?: UserCampaignScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: UserCampaignCountAggregateInputType | true + _avg?: UserCampaignAvgAggregateInputType + _sum?: UserCampaignSumAggregateInputType + _min?: UserCampaignMinAggregateInputType + _max?: UserCampaignMaxAggregateInputType + } + + export type UserCampaignGroupByOutputType = { + id: string + userId: string + campaignId: string + totalChances: number + usedChances: number + createdAt: Date + updatedAt: Date + _count: UserCampaignCountAggregateOutputType | null + _avg: UserCampaignAvgAggregateOutputType | null + _sum: UserCampaignSumAggregateOutputType | null + _min: UserCampaignMinAggregateOutputType | null + _max: UserCampaignMaxAggregateOutputType | null + } + + type GetUserCampaignGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof UserCampaignGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type UserCampaignSelect = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + campaignId?: boolean + totalChances?: boolean + usedChances?: boolean + createdAt?: boolean + updatedAt?: boolean + user?: boolean | UserDefaultArgs + campaign?: boolean | CampaignDefaultArgs + }, ExtArgs["result"]["userCampaign"]> + + export type UserCampaignSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + campaignId?: boolean + totalChances?: boolean + usedChances?: boolean + createdAt?: boolean + updatedAt?: boolean + user?: boolean | UserDefaultArgs + campaign?: boolean | CampaignDefaultArgs + }, ExtArgs["result"]["userCampaign"]> + + export type UserCampaignSelectScalar = { + id?: boolean + userId?: boolean + campaignId?: boolean + totalChances?: boolean + usedChances?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + export type UserCampaignInclude = { + user?: boolean | UserDefaultArgs + campaign?: boolean | CampaignDefaultArgs + } + export type UserCampaignIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + campaign?: boolean | CampaignDefaultArgs + } + + export type $UserCampaignPayload = { + name: "UserCampaign" + objects: { + user: Prisma.$UserPayload + campaign: Prisma.$CampaignPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + userId: string + campaignId: string + totalChances: number + usedChances: number + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["userCampaign"]> + composites: {} + } + + type UserCampaignGetPayload = $Result.GetResult + + type UserCampaignCountArgs = + Omit & { + select?: UserCampaignCountAggregateInputType | true + } + + export interface UserCampaignDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['UserCampaign'], meta: { name: 'UserCampaign' } } + /** + * Find zero or one UserCampaign that matches the filter. + * @param {UserCampaignFindUniqueArgs} args - Arguments to find a UserCampaign + * @example + * // Get one UserCampaign + * const userCampaign = await prisma.userCampaign.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__UserCampaignClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one UserCampaign that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {UserCampaignFindUniqueOrThrowArgs} args - Arguments to find a UserCampaign + * @example + * // Get one UserCampaign + * const userCampaign = await prisma.userCampaign.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__UserCampaignClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first UserCampaign that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserCampaignFindFirstArgs} args - Arguments to find a UserCampaign + * @example + * // Get one UserCampaign + * const userCampaign = await prisma.userCampaign.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__UserCampaignClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first UserCampaign that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserCampaignFindFirstOrThrowArgs} args - Arguments to find a UserCampaign + * @example + * // Get one UserCampaign + * const userCampaign = await prisma.userCampaign.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__UserCampaignClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more UserCampaigns that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserCampaignFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all UserCampaigns + * const userCampaigns = await prisma.userCampaign.findMany() + * + * // Get first 10 UserCampaigns + * const userCampaigns = await prisma.userCampaign.findMany({ take: 10 }) + * + * // Only select the `id` + * const userCampaignWithIdOnly = await prisma.userCampaign.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a UserCampaign. + * @param {UserCampaignCreateArgs} args - Arguments to create a UserCampaign. + * @example + * // Create one UserCampaign + * const UserCampaign = await prisma.userCampaign.create({ + * data: { + * // ... data to create a UserCampaign + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__UserCampaignClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many UserCampaigns. + * @param {UserCampaignCreateManyArgs} args - Arguments to create many UserCampaigns. + * @example + * // Create many UserCampaigns + * const userCampaign = await prisma.userCampaign.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many UserCampaigns and returns the data saved in the database. + * @param {UserCampaignCreateManyAndReturnArgs} args - Arguments to create many UserCampaigns. + * @example + * // Create many UserCampaigns + * const userCampaign = await prisma.userCampaign.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many UserCampaigns and only return the `id` + * const userCampaignWithIdOnly = await prisma.userCampaign.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a UserCampaign. + * @param {UserCampaignDeleteArgs} args - Arguments to delete one UserCampaign. + * @example + * // Delete one UserCampaign + * const UserCampaign = await prisma.userCampaign.delete({ + * where: { + * // ... filter to delete one UserCampaign + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__UserCampaignClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one UserCampaign. + * @param {UserCampaignUpdateArgs} args - Arguments to update one UserCampaign. + * @example + * // Update one UserCampaign + * const userCampaign = await prisma.userCampaign.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__UserCampaignClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more UserCampaigns. + * @param {UserCampaignDeleteManyArgs} args - Arguments to filter UserCampaigns to delete. + * @example + * // Delete a few UserCampaigns + * const { count } = await prisma.userCampaign.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more UserCampaigns. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserCampaignUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many UserCampaigns + * const userCampaign = await prisma.userCampaign.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one UserCampaign. + * @param {UserCampaignUpsertArgs} args - Arguments to update or create a UserCampaign. + * @example + * // Update or create a UserCampaign + * const userCampaign = await prisma.userCampaign.upsert({ + * create: { + * // ... data to create a UserCampaign + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the UserCampaign we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__UserCampaignClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of UserCampaigns. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserCampaignCountArgs} args - Arguments to filter UserCampaigns to count. + * @example + * // Count the number of UserCampaigns + * const count = await prisma.userCampaign.count({ + * where: { + * // ... the filter for the UserCampaigns we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a UserCampaign. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserCampaignAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by UserCampaign. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserCampaignGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends UserCampaignGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: UserCampaignGroupByArgs['orderBy'] } + : { orderBy?: UserCampaignGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetUserCampaignGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the UserCampaign model + */ + readonly fields: UserCampaignFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for UserCampaign. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__UserCampaignClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + campaign = {}>(args?: Subset>): Prisma__CampaignClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the UserCampaign model + */ + interface UserCampaignFieldRefs { + readonly id: FieldRef<"UserCampaign", 'String'> + readonly userId: FieldRef<"UserCampaign", 'String'> + readonly campaignId: FieldRef<"UserCampaign", 'String'> + readonly totalChances: FieldRef<"UserCampaign", 'Int'> + readonly usedChances: FieldRef<"UserCampaign", 'Int'> + readonly createdAt: FieldRef<"UserCampaign", 'DateTime'> + readonly updatedAt: FieldRef<"UserCampaign", 'DateTime'> + } + + + // Custom InputTypes + /** + * UserCampaign findUnique + */ + export type UserCampaignFindUniqueArgs = { + /** + * Select specific fields to fetch from the UserCampaign + */ + select?: UserCampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserCampaignInclude | null + /** + * Filter, which UserCampaign to fetch. + */ + where: UserCampaignWhereUniqueInput + } + + /** + * UserCampaign findUniqueOrThrow + */ + export type UserCampaignFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the UserCampaign + */ + select?: UserCampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserCampaignInclude | null + /** + * Filter, which UserCampaign to fetch. + */ + where: UserCampaignWhereUniqueInput + } + + /** + * UserCampaign findFirst + */ + export type UserCampaignFindFirstArgs = { + /** + * Select specific fields to fetch from the UserCampaign + */ + select?: UserCampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserCampaignInclude | null + /** + * Filter, which UserCampaign to fetch. + */ + where?: UserCampaignWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of UserCampaigns to fetch. + */ + orderBy?: UserCampaignOrderByWithRelationInput | UserCampaignOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for UserCampaigns. + */ + cursor?: UserCampaignWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` UserCampaigns from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` UserCampaigns. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of UserCampaigns. + */ + distinct?: UserCampaignScalarFieldEnum | UserCampaignScalarFieldEnum[] + } + + /** + * UserCampaign findFirstOrThrow + */ + export type UserCampaignFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the UserCampaign + */ + select?: UserCampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserCampaignInclude | null + /** + * Filter, which UserCampaign to fetch. + */ + where?: UserCampaignWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of UserCampaigns to fetch. + */ + orderBy?: UserCampaignOrderByWithRelationInput | UserCampaignOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for UserCampaigns. + */ + cursor?: UserCampaignWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` UserCampaigns from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` UserCampaigns. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of UserCampaigns. + */ + distinct?: UserCampaignScalarFieldEnum | UserCampaignScalarFieldEnum[] + } + + /** + * UserCampaign findMany + */ + export type UserCampaignFindManyArgs = { + /** + * Select specific fields to fetch from the UserCampaign + */ + select?: UserCampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserCampaignInclude | null + /** + * Filter, which UserCampaigns to fetch. + */ + where?: UserCampaignWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of UserCampaigns to fetch. + */ + orderBy?: UserCampaignOrderByWithRelationInput | UserCampaignOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing UserCampaigns. + */ + cursor?: UserCampaignWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` UserCampaigns from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` UserCampaigns. + */ + skip?: number + distinct?: UserCampaignScalarFieldEnum | UserCampaignScalarFieldEnum[] + } + + /** + * UserCampaign create + */ + export type UserCampaignCreateArgs = { + /** + * Select specific fields to fetch from the UserCampaign + */ + select?: UserCampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserCampaignInclude | null + /** + * The data needed to create a UserCampaign. + */ + data: XOR + } + + /** + * UserCampaign createMany + */ + export type UserCampaignCreateManyArgs = { + /** + * The data used to create many UserCampaigns. + */ + data: UserCampaignCreateManyInput | UserCampaignCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * UserCampaign createManyAndReturn + */ + export type UserCampaignCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the UserCampaign + */ + select?: UserCampaignSelectCreateManyAndReturn | null + /** + * The data used to create many UserCampaigns. + */ + data: UserCampaignCreateManyInput | UserCampaignCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: UserCampaignIncludeCreateManyAndReturn | null + } + + /** + * UserCampaign update + */ + export type UserCampaignUpdateArgs = { + /** + * Select specific fields to fetch from the UserCampaign + */ + select?: UserCampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserCampaignInclude | null + /** + * The data needed to update a UserCampaign. + */ + data: XOR + /** + * Choose, which UserCampaign to update. + */ + where: UserCampaignWhereUniqueInput + } + + /** + * UserCampaign updateMany + */ + export type UserCampaignUpdateManyArgs = { + /** + * The data used to update UserCampaigns. + */ + data: XOR + /** + * Filter which UserCampaigns to update + */ + where?: UserCampaignWhereInput + } + + /** + * UserCampaign upsert + */ + export type UserCampaignUpsertArgs = { + /** + * Select specific fields to fetch from the UserCampaign + */ + select?: UserCampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserCampaignInclude | null + /** + * The filter to search for the UserCampaign to update in case it exists. + */ + where: UserCampaignWhereUniqueInput + /** + * In case the UserCampaign found by the `where` argument doesn't exist, create a new UserCampaign with this data. + */ + create: XOR + /** + * In case the UserCampaign was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * UserCampaign delete + */ + export type UserCampaignDeleteArgs = { + /** + * Select specific fields to fetch from the UserCampaign + */ + select?: UserCampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserCampaignInclude | null + /** + * Filter which UserCampaign to delete. + */ + where: UserCampaignWhereUniqueInput + } + + /** + * UserCampaign deleteMany + */ + export type UserCampaignDeleteManyArgs = { + /** + * Filter which UserCampaigns to delete + */ + where?: UserCampaignWhereInput + } + + /** + * UserCampaign without action + */ + export type UserCampaignDefaultArgs = { + /** + * Select specific fields to fetch from the UserCampaign + */ + select?: UserCampaignSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserCampaignInclude | null + } + + + /** + * Model ChanceTransaction + */ + + export type AggregateChanceTransaction = { + _count: ChanceTransactionCountAggregateOutputType | null + _avg: ChanceTransactionAvgAggregateOutputType | null + _sum: ChanceTransactionSumAggregateOutputType | null + _min: ChanceTransactionMinAggregateOutputType | null + _max: ChanceTransactionMaxAggregateOutputType | null + } + + export type ChanceTransactionAvgAggregateOutputType = { + amount: number | null + } + + export type ChanceTransactionSumAggregateOutputType = { + amount: number | null + } + + export type ChanceTransactionMinAggregateOutputType = { + id: string | null + userId: string | null + campaignId: string | null + amount: number | null + type: $Enums.ChanceTxnType | null + referenceType: string | null + referenceId: string | null + description: string | null + createdById: string | null + createdAt: Date | null + } + + export type ChanceTransactionMaxAggregateOutputType = { + id: string | null + userId: string | null + campaignId: string | null + amount: number | null + type: $Enums.ChanceTxnType | null + referenceType: string | null + referenceId: string | null + description: string | null + createdById: string | null + createdAt: Date | null + } + + export type ChanceTransactionCountAggregateOutputType = { + id: number + userId: number + campaignId: number + amount: number + type: number + referenceType: number + referenceId: number + description: number + createdById: number + createdAt: number + _all: number + } + + + export type ChanceTransactionAvgAggregateInputType = { + amount?: true + } + + export type ChanceTransactionSumAggregateInputType = { + amount?: true + } + + export type ChanceTransactionMinAggregateInputType = { + id?: true + userId?: true + campaignId?: true + amount?: true + type?: true + referenceType?: true + referenceId?: true + description?: true + createdById?: true + createdAt?: true + } + + export type ChanceTransactionMaxAggregateInputType = { + id?: true + userId?: true + campaignId?: true + amount?: true + type?: true + referenceType?: true + referenceId?: true + description?: true + createdById?: true + createdAt?: true + } + + export type ChanceTransactionCountAggregateInputType = { + id?: true + userId?: true + campaignId?: true + amount?: true + type?: true + referenceType?: true + referenceId?: true + description?: true + createdById?: true + createdAt?: true + _all?: true + } + + export type ChanceTransactionAggregateArgs = { + /** + * Filter which ChanceTransaction to aggregate. + */ + where?: ChanceTransactionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChanceTransactions to fetch. + */ + orderBy?: ChanceTransactionOrderByWithRelationInput | ChanceTransactionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: ChanceTransactionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChanceTransactions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChanceTransactions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ChanceTransactions + **/ + _count?: true | ChanceTransactionCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ChanceTransactionAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ChanceTransactionSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ChanceTransactionMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ChanceTransactionMaxAggregateInputType + } + + export type GetChanceTransactionAggregateType = { + [P in keyof T & keyof AggregateChanceTransaction]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type ChanceTransactionGroupByArgs = { + where?: ChanceTransactionWhereInput + orderBy?: ChanceTransactionOrderByWithAggregationInput | ChanceTransactionOrderByWithAggregationInput[] + by: ChanceTransactionScalarFieldEnum[] | ChanceTransactionScalarFieldEnum + having?: ChanceTransactionScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ChanceTransactionCountAggregateInputType | true + _avg?: ChanceTransactionAvgAggregateInputType + _sum?: ChanceTransactionSumAggregateInputType + _min?: ChanceTransactionMinAggregateInputType + _max?: ChanceTransactionMaxAggregateInputType + } + + export type ChanceTransactionGroupByOutputType = { + id: string + userId: string + campaignId: string + amount: number + type: $Enums.ChanceTxnType + referenceType: string | null + referenceId: string | null + description: string | null + createdById: string | null + createdAt: Date + _count: ChanceTransactionCountAggregateOutputType | null + _avg: ChanceTransactionAvgAggregateOutputType | null + _sum: ChanceTransactionSumAggregateOutputType | null + _min: ChanceTransactionMinAggregateOutputType | null + _max: ChanceTransactionMaxAggregateOutputType | null + } + + type GetChanceTransactionGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof ChanceTransactionGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type ChanceTransactionSelect = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + campaignId?: boolean + amount?: boolean + type?: boolean + referenceType?: boolean + referenceId?: boolean + description?: boolean + createdById?: boolean + createdAt?: boolean + user?: boolean | UserDefaultArgs + campaign?: boolean | CampaignDefaultArgs + createdBy?: boolean | ChanceTransaction$createdByArgs + }, ExtArgs["result"]["chanceTransaction"]> + + export type ChanceTransactionSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + campaignId?: boolean + amount?: boolean + type?: boolean + referenceType?: boolean + referenceId?: boolean + description?: boolean + createdById?: boolean + createdAt?: boolean + user?: boolean | UserDefaultArgs + campaign?: boolean | CampaignDefaultArgs + createdBy?: boolean | ChanceTransaction$createdByArgs + }, ExtArgs["result"]["chanceTransaction"]> + + export type ChanceTransactionSelectScalar = { + id?: boolean + userId?: boolean + campaignId?: boolean + amount?: boolean + type?: boolean + referenceType?: boolean + referenceId?: boolean + description?: boolean + createdById?: boolean + createdAt?: boolean + } + + export type ChanceTransactionInclude = { + user?: boolean | UserDefaultArgs + campaign?: boolean | CampaignDefaultArgs + createdBy?: boolean | ChanceTransaction$createdByArgs + } + export type ChanceTransactionIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + campaign?: boolean | CampaignDefaultArgs + createdBy?: boolean | ChanceTransaction$createdByArgs + } + + export type $ChanceTransactionPayload = { + name: "ChanceTransaction" + objects: { + user: Prisma.$UserPayload + campaign: Prisma.$CampaignPayload + createdBy: Prisma.$AdminPayload | null + } + scalars: $Extensions.GetPayloadResult<{ + id: string + userId: string + campaignId: string + amount: number + type: $Enums.ChanceTxnType + referenceType: string | null + referenceId: string | null + description: string | null + createdById: string | null + createdAt: Date + }, ExtArgs["result"]["chanceTransaction"]> + composites: {} + } + + type ChanceTransactionGetPayload = $Result.GetResult + + type ChanceTransactionCountArgs = + Omit & { + select?: ChanceTransactionCountAggregateInputType | true + } + + export interface ChanceTransactionDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ChanceTransaction'], meta: { name: 'ChanceTransaction' } } + /** + * Find zero or one ChanceTransaction that matches the filter. + * @param {ChanceTransactionFindUniqueArgs} args - Arguments to find a ChanceTransaction + * @example + * // Get one ChanceTransaction + * const chanceTransaction = await prisma.chanceTransaction.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__ChanceTransactionClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one ChanceTransaction that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ChanceTransactionFindUniqueOrThrowArgs} args - Arguments to find a ChanceTransaction + * @example + * // Get one ChanceTransaction + * const chanceTransaction = await prisma.chanceTransaction.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__ChanceTransactionClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first ChanceTransaction that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChanceTransactionFindFirstArgs} args - Arguments to find a ChanceTransaction + * @example + * // Get one ChanceTransaction + * const chanceTransaction = await prisma.chanceTransaction.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__ChanceTransactionClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first ChanceTransaction that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChanceTransactionFindFirstOrThrowArgs} args - Arguments to find a ChanceTransaction + * @example + * // Get one ChanceTransaction + * const chanceTransaction = await prisma.chanceTransaction.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__ChanceTransactionClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more ChanceTransactions that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChanceTransactionFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ChanceTransactions + * const chanceTransactions = await prisma.chanceTransaction.findMany() + * + * // Get first 10 ChanceTransactions + * const chanceTransactions = await prisma.chanceTransaction.findMany({ take: 10 }) + * + * // Only select the `id` + * const chanceTransactionWithIdOnly = await prisma.chanceTransaction.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a ChanceTransaction. + * @param {ChanceTransactionCreateArgs} args - Arguments to create a ChanceTransaction. + * @example + * // Create one ChanceTransaction + * const ChanceTransaction = await prisma.chanceTransaction.create({ + * data: { + * // ... data to create a ChanceTransaction + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__ChanceTransactionClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many ChanceTransactions. + * @param {ChanceTransactionCreateManyArgs} args - Arguments to create many ChanceTransactions. + * @example + * // Create many ChanceTransactions + * const chanceTransaction = await prisma.chanceTransaction.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many ChanceTransactions and returns the data saved in the database. + * @param {ChanceTransactionCreateManyAndReturnArgs} args - Arguments to create many ChanceTransactions. + * @example + * // Create many ChanceTransactions + * const chanceTransaction = await prisma.chanceTransaction.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many ChanceTransactions and only return the `id` + * const chanceTransactionWithIdOnly = await prisma.chanceTransaction.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a ChanceTransaction. + * @param {ChanceTransactionDeleteArgs} args - Arguments to delete one ChanceTransaction. + * @example + * // Delete one ChanceTransaction + * const ChanceTransaction = await prisma.chanceTransaction.delete({ + * where: { + * // ... filter to delete one ChanceTransaction + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__ChanceTransactionClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one ChanceTransaction. + * @param {ChanceTransactionUpdateArgs} args - Arguments to update one ChanceTransaction. + * @example + * // Update one ChanceTransaction + * const chanceTransaction = await prisma.chanceTransaction.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__ChanceTransactionClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more ChanceTransactions. + * @param {ChanceTransactionDeleteManyArgs} args - Arguments to filter ChanceTransactions to delete. + * @example + * // Delete a few ChanceTransactions + * const { count } = await prisma.chanceTransaction.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ChanceTransactions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChanceTransactionUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ChanceTransactions + * const chanceTransaction = await prisma.chanceTransaction.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one ChanceTransaction. + * @param {ChanceTransactionUpsertArgs} args - Arguments to update or create a ChanceTransaction. + * @example + * // Update or create a ChanceTransaction + * const chanceTransaction = await prisma.chanceTransaction.upsert({ + * create: { + * // ... data to create a ChanceTransaction + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ChanceTransaction we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__ChanceTransactionClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of ChanceTransactions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChanceTransactionCountArgs} args - Arguments to filter ChanceTransactions to count. + * @example + * // Count the number of ChanceTransactions + * const count = await prisma.chanceTransaction.count({ + * where: { + * // ... the filter for the ChanceTransactions we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ChanceTransaction. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChanceTransactionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by ChanceTransaction. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ChanceTransactionGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ChanceTransactionGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ChanceTransactionGroupByArgs['orderBy'] } + : { orderBy?: ChanceTransactionGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetChanceTransactionGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the ChanceTransaction model + */ + readonly fields: ChanceTransactionFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for ChanceTransaction. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__ChanceTransactionClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + campaign = {}>(args?: Subset>): Prisma__CampaignClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + createdBy = {}>(args?: Subset>): Prisma__AdminClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the ChanceTransaction model + */ + interface ChanceTransactionFieldRefs { + readonly id: FieldRef<"ChanceTransaction", 'String'> + readonly userId: FieldRef<"ChanceTransaction", 'String'> + readonly campaignId: FieldRef<"ChanceTransaction", 'String'> + readonly amount: FieldRef<"ChanceTransaction", 'Int'> + readonly type: FieldRef<"ChanceTransaction", 'ChanceTxnType'> + readonly referenceType: FieldRef<"ChanceTransaction", 'String'> + readonly referenceId: FieldRef<"ChanceTransaction", 'String'> + readonly description: FieldRef<"ChanceTransaction", 'String'> + readonly createdById: FieldRef<"ChanceTransaction", 'String'> + readonly createdAt: FieldRef<"ChanceTransaction", 'DateTime'> + } + + + // Custom InputTypes + /** + * ChanceTransaction findUnique + */ + export type ChanceTransactionFindUniqueArgs = { + /** + * Select specific fields to fetch from the ChanceTransaction + */ + select?: ChanceTransactionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChanceTransactionInclude | null + /** + * Filter, which ChanceTransaction to fetch. + */ + where: ChanceTransactionWhereUniqueInput + } + + /** + * ChanceTransaction findUniqueOrThrow + */ + export type ChanceTransactionFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ChanceTransaction + */ + select?: ChanceTransactionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChanceTransactionInclude | null + /** + * Filter, which ChanceTransaction to fetch. + */ + where: ChanceTransactionWhereUniqueInput + } + + /** + * ChanceTransaction findFirst + */ + export type ChanceTransactionFindFirstArgs = { + /** + * Select specific fields to fetch from the ChanceTransaction + */ + select?: ChanceTransactionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChanceTransactionInclude | null + /** + * Filter, which ChanceTransaction to fetch. + */ + where?: ChanceTransactionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChanceTransactions to fetch. + */ + orderBy?: ChanceTransactionOrderByWithRelationInput | ChanceTransactionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChanceTransactions. + */ + cursor?: ChanceTransactionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChanceTransactions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChanceTransactions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChanceTransactions. + */ + distinct?: ChanceTransactionScalarFieldEnum | ChanceTransactionScalarFieldEnum[] + } + + /** + * ChanceTransaction findFirstOrThrow + */ + export type ChanceTransactionFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ChanceTransaction + */ + select?: ChanceTransactionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChanceTransactionInclude | null + /** + * Filter, which ChanceTransaction to fetch. + */ + where?: ChanceTransactionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChanceTransactions to fetch. + */ + orderBy?: ChanceTransactionOrderByWithRelationInput | ChanceTransactionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ChanceTransactions. + */ + cursor?: ChanceTransactionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChanceTransactions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChanceTransactions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ChanceTransactions. + */ + distinct?: ChanceTransactionScalarFieldEnum | ChanceTransactionScalarFieldEnum[] + } + + /** + * ChanceTransaction findMany + */ + export type ChanceTransactionFindManyArgs = { + /** + * Select specific fields to fetch from the ChanceTransaction + */ + select?: ChanceTransactionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChanceTransactionInclude | null + /** + * Filter, which ChanceTransactions to fetch. + */ + where?: ChanceTransactionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ChanceTransactions to fetch. + */ + orderBy?: ChanceTransactionOrderByWithRelationInput | ChanceTransactionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ChanceTransactions. + */ + cursor?: ChanceTransactionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ChanceTransactions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ChanceTransactions. + */ + skip?: number + distinct?: ChanceTransactionScalarFieldEnum | ChanceTransactionScalarFieldEnum[] + } + + /** + * ChanceTransaction create + */ + export type ChanceTransactionCreateArgs = { + /** + * Select specific fields to fetch from the ChanceTransaction + */ + select?: ChanceTransactionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChanceTransactionInclude | null + /** + * The data needed to create a ChanceTransaction. + */ + data: XOR + } + + /** + * ChanceTransaction createMany + */ + export type ChanceTransactionCreateManyArgs = { + /** + * The data used to create many ChanceTransactions. + */ + data: ChanceTransactionCreateManyInput | ChanceTransactionCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * ChanceTransaction createManyAndReturn + */ + export type ChanceTransactionCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the ChanceTransaction + */ + select?: ChanceTransactionSelectCreateManyAndReturn | null + /** + * The data used to create many ChanceTransactions. + */ + data: ChanceTransactionCreateManyInput | ChanceTransactionCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: ChanceTransactionIncludeCreateManyAndReturn | null + } + + /** + * ChanceTransaction update + */ + export type ChanceTransactionUpdateArgs = { + /** + * Select specific fields to fetch from the ChanceTransaction + */ + select?: ChanceTransactionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChanceTransactionInclude | null + /** + * The data needed to update a ChanceTransaction. + */ + data: XOR + /** + * Choose, which ChanceTransaction to update. + */ + where: ChanceTransactionWhereUniqueInput + } + + /** + * ChanceTransaction updateMany + */ + export type ChanceTransactionUpdateManyArgs = { + /** + * The data used to update ChanceTransactions. + */ + data: XOR + /** + * Filter which ChanceTransactions to update + */ + where?: ChanceTransactionWhereInput + } + + /** + * ChanceTransaction upsert + */ + export type ChanceTransactionUpsertArgs = { + /** + * Select specific fields to fetch from the ChanceTransaction + */ + select?: ChanceTransactionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChanceTransactionInclude | null + /** + * The filter to search for the ChanceTransaction to update in case it exists. + */ + where: ChanceTransactionWhereUniqueInput + /** + * In case the ChanceTransaction found by the `where` argument doesn't exist, create a new ChanceTransaction with this data. + */ + create: XOR + /** + * In case the ChanceTransaction was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * ChanceTransaction delete + */ + export type ChanceTransactionDeleteArgs = { + /** + * Select specific fields to fetch from the ChanceTransaction + */ + select?: ChanceTransactionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChanceTransactionInclude | null + /** + * Filter which ChanceTransaction to delete. + */ + where: ChanceTransactionWhereUniqueInput + } + + /** + * ChanceTransaction deleteMany + */ + export type ChanceTransactionDeleteManyArgs = { + /** + * Filter which ChanceTransactions to delete + */ + where?: ChanceTransactionWhereInput + } + + /** + * ChanceTransaction.createdBy + */ + export type ChanceTransaction$createdByArgs = { + /** + * Select specific fields to fetch from the Admin + */ + select?: AdminSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminInclude | null + where?: AdminWhereInput + } + + /** + * ChanceTransaction without action + */ + export type ChanceTransactionDefaultArgs = { + /** + * Select specific fields to fetch from the ChanceTransaction + */ + select?: ChanceTransactionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ChanceTransactionInclude | null + } + + + /** + * Model Spin + */ + + export type AggregateSpin = { + _count: SpinCountAggregateOutputType | null + _min: SpinMinAggregateOutputType | null + _max: SpinMaxAggregateOutputType | null + } + + export type SpinMinAggregateOutputType = { + id: string | null + userId: string | null + campaignId: string | null + prizeId: string | null + status: $Enums.SpinStatus | null + idempotencyKey: string | null + ip: string | null + userAgent: string | null + createdAt: Date | null + } + + export type SpinMaxAggregateOutputType = { + id: string | null + userId: string | null + campaignId: string | null + prizeId: string | null + status: $Enums.SpinStatus | null + idempotencyKey: string | null + ip: string | null + userAgent: string | null + createdAt: Date | null + } + + export type SpinCountAggregateOutputType = { + id: number + userId: number + campaignId: number + prizeId: number + status: number + idempotencyKey: number + ip: number + userAgent: number + createdAt: number + _all: number + } + + + export type SpinMinAggregateInputType = { + id?: true + userId?: true + campaignId?: true + prizeId?: true + status?: true + idempotencyKey?: true + ip?: true + userAgent?: true + createdAt?: true + } + + export type SpinMaxAggregateInputType = { + id?: true + userId?: true + campaignId?: true + prizeId?: true + status?: true + idempotencyKey?: true + ip?: true + userAgent?: true + createdAt?: true + } + + export type SpinCountAggregateInputType = { + id?: true + userId?: true + campaignId?: true + prizeId?: true + status?: true + idempotencyKey?: true + ip?: true + userAgent?: true + createdAt?: true + _all?: true + } + + export type SpinAggregateArgs = { + /** + * Filter which Spin to aggregate. + */ + where?: SpinWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Spins to fetch. + */ + orderBy?: SpinOrderByWithRelationInput | SpinOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: SpinWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Spins from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Spins. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Spins + **/ + _count?: true | SpinCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: SpinMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: SpinMaxAggregateInputType + } + + export type GetSpinAggregateType = { + [P in keyof T & keyof AggregateSpin]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type SpinGroupByArgs = { + where?: SpinWhereInput + orderBy?: SpinOrderByWithAggregationInput | SpinOrderByWithAggregationInput[] + by: SpinScalarFieldEnum[] | SpinScalarFieldEnum + having?: SpinScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: SpinCountAggregateInputType | true + _min?: SpinMinAggregateInputType + _max?: SpinMaxAggregateInputType + } + + export type SpinGroupByOutputType = { + id: string + userId: string + campaignId: string + prizeId: string | null + status: $Enums.SpinStatus + idempotencyKey: string + ip: string | null + userAgent: string | null + createdAt: Date + _count: SpinCountAggregateOutputType | null + _min: SpinMinAggregateOutputType | null + _max: SpinMaxAggregateOutputType | null + } + + type GetSpinGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof SpinGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type SpinSelect = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + campaignId?: boolean + prizeId?: boolean + status?: boolean + idempotencyKey?: boolean + ip?: boolean + userAgent?: boolean + createdAt?: boolean + user?: boolean | UserDefaultArgs + campaign?: boolean | CampaignDefaultArgs + prize?: boolean | Spin$prizeArgs + userPrize?: boolean | Spin$userPrizeArgs + }, ExtArgs["result"]["spin"]> + + export type SpinSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + campaignId?: boolean + prizeId?: boolean + status?: boolean + idempotencyKey?: boolean + ip?: boolean + userAgent?: boolean + createdAt?: boolean + user?: boolean | UserDefaultArgs + campaign?: boolean | CampaignDefaultArgs + prize?: boolean | Spin$prizeArgs + }, ExtArgs["result"]["spin"]> + + export type SpinSelectScalar = { + id?: boolean + userId?: boolean + campaignId?: boolean + prizeId?: boolean + status?: boolean + idempotencyKey?: boolean + ip?: boolean + userAgent?: boolean + createdAt?: boolean + } + + export type SpinInclude = { + user?: boolean | UserDefaultArgs + campaign?: boolean | CampaignDefaultArgs + prize?: boolean | Spin$prizeArgs + userPrize?: boolean | Spin$userPrizeArgs + } + export type SpinIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + campaign?: boolean | CampaignDefaultArgs + prize?: boolean | Spin$prizeArgs + } + + export type $SpinPayload = { + name: "Spin" + objects: { + user: Prisma.$UserPayload + campaign: Prisma.$CampaignPayload + prize: Prisma.$PrizePayload | null + userPrize: Prisma.$UserPrizePayload | null + } + scalars: $Extensions.GetPayloadResult<{ + id: string + userId: string + campaignId: string + prizeId: string | null + status: $Enums.SpinStatus + idempotencyKey: string + ip: string | null + userAgent: string | null + createdAt: Date + }, ExtArgs["result"]["spin"]> + composites: {} + } + + type SpinGetPayload = $Result.GetResult + + type SpinCountArgs = + Omit & { + select?: SpinCountAggregateInputType | true + } + + export interface SpinDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Spin'], meta: { name: 'Spin' } } + /** + * Find zero or one Spin that matches the filter. + * @param {SpinFindUniqueArgs} args - Arguments to find a Spin + * @example + * // Get one Spin + * const spin = await prisma.spin.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__SpinClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one Spin that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {SpinFindUniqueOrThrowArgs} args - Arguments to find a Spin + * @example + * // Get one Spin + * const spin = await prisma.spin.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__SpinClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first Spin that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SpinFindFirstArgs} args - Arguments to find a Spin + * @example + * // Get one Spin + * const spin = await prisma.spin.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__SpinClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first Spin that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SpinFindFirstOrThrowArgs} args - Arguments to find a Spin + * @example + * // Get one Spin + * const spin = await prisma.spin.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__SpinClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more Spins that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SpinFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Spins + * const spins = await prisma.spin.findMany() + * + * // Get first 10 Spins + * const spins = await prisma.spin.findMany({ take: 10 }) + * + * // Only select the `id` + * const spinWithIdOnly = await prisma.spin.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a Spin. + * @param {SpinCreateArgs} args - Arguments to create a Spin. + * @example + * // Create one Spin + * const Spin = await prisma.spin.create({ + * data: { + * // ... data to create a Spin + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__SpinClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many Spins. + * @param {SpinCreateManyArgs} args - Arguments to create many Spins. + * @example + * // Create many Spins + * const spin = await prisma.spin.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Spins and returns the data saved in the database. + * @param {SpinCreateManyAndReturnArgs} args - Arguments to create many Spins. + * @example + * // Create many Spins + * const spin = await prisma.spin.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Spins and only return the `id` + * const spinWithIdOnly = await prisma.spin.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a Spin. + * @param {SpinDeleteArgs} args - Arguments to delete one Spin. + * @example + * // Delete one Spin + * const Spin = await prisma.spin.delete({ + * where: { + * // ... filter to delete one Spin + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__SpinClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one Spin. + * @param {SpinUpdateArgs} args - Arguments to update one Spin. + * @example + * // Update one Spin + * const spin = await prisma.spin.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__SpinClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more Spins. + * @param {SpinDeleteManyArgs} args - Arguments to filter Spins to delete. + * @example + * // Delete a few Spins + * const { count } = await prisma.spin.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Spins. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SpinUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Spins + * const spin = await prisma.spin.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one Spin. + * @param {SpinUpsertArgs} args - Arguments to update or create a Spin. + * @example + * // Update or create a Spin + * const spin = await prisma.spin.upsert({ + * create: { + * // ... data to create a Spin + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Spin we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__SpinClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of Spins. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SpinCountArgs} args - Arguments to filter Spins to count. + * @example + * // Count the number of Spins + * const count = await prisma.spin.count({ + * where: { + * // ... the filter for the Spins we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Spin. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SpinAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by Spin. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SpinGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends SpinGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: SpinGroupByArgs['orderBy'] } + : { orderBy?: SpinGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSpinGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Spin model + */ + readonly fields: SpinFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for Spin. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__SpinClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + campaign = {}>(args?: Subset>): Prisma__CampaignClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + prize = {}>(args?: Subset>): Prisma__PrizeClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + userPrize = {}>(args?: Subset>): Prisma__UserPrizeClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the Spin model + */ + interface SpinFieldRefs { + readonly id: FieldRef<"Spin", 'String'> + readonly userId: FieldRef<"Spin", 'String'> + readonly campaignId: FieldRef<"Spin", 'String'> + readonly prizeId: FieldRef<"Spin", 'String'> + readonly status: FieldRef<"Spin", 'SpinStatus'> + readonly idempotencyKey: FieldRef<"Spin", 'String'> + readonly ip: FieldRef<"Spin", 'String'> + readonly userAgent: FieldRef<"Spin", 'String'> + readonly createdAt: FieldRef<"Spin", 'DateTime'> + } + + + // Custom InputTypes + /** + * Spin findUnique + */ + export type SpinFindUniqueArgs = { + /** + * Select specific fields to fetch from the Spin + */ + select?: SpinSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SpinInclude | null + /** + * Filter, which Spin to fetch. + */ + where: SpinWhereUniqueInput + } + + /** + * Spin findUniqueOrThrow + */ + export type SpinFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Spin + */ + select?: SpinSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SpinInclude | null + /** + * Filter, which Spin to fetch. + */ + where: SpinWhereUniqueInput + } + + /** + * Spin findFirst + */ + export type SpinFindFirstArgs = { + /** + * Select specific fields to fetch from the Spin + */ + select?: SpinSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SpinInclude | null + /** + * Filter, which Spin to fetch. + */ + where?: SpinWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Spins to fetch. + */ + orderBy?: SpinOrderByWithRelationInput | SpinOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Spins. + */ + cursor?: SpinWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Spins from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Spins. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Spins. + */ + distinct?: SpinScalarFieldEnum | SpinScalarFieldEnum[] + } + + /** + * Spin findFirstOrThrow + */ + export type SpinFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Spin + */ + select?: SpinSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SpinInclude | null + /** + * Filter, which Spin to fetch. + */ + where?: SpinWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Spins to fetch. + */ + orderBy?: SpinOrderByWithRelationInput | SpinOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Spins. + */ + cursor?: SpinWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Spins from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Spins. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Spins. + */ + distinct?: SpinScalarFieldEnum | SpinScalarFieldEnum[] + } + + /** + * Spin findMany + */ + export type SpinFindManyArgs = { + /** + * Select specific fields to fetch from the Spin + */ + select?: SpinSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SpinInclude | null + /** + * Filter, which Spins to fetch. + */ + where?: SpinWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Spins to fetch. + */ + orderBy?: SpinOrderByWithRelationInput | SpinOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Spins. + */ + cursor?: SpinWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Spins from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Spins. + */ + skip?: number + distinct?: SpinScalarFieldEnum | SpinScalarFieldEnum[] + } + + /** + * Spin create + */ + export type SpinCreateArgs = { + /** + * Select specific fields to fetch from the Spin + */ + select?: SpinSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SpinInclude | null + /** + * The data needed to create a Spin. + */ + data: XOR + } + + /** + * Spin createMany + */ + export type SpinCreateManyArgs = { + /** + * The data used to create many Spins. + */ + data: SpinCreateManyInput | SpinCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * Spin createManyAndReturn + */ + export type SpinCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Spin + */ + select?: SpinSelectCreateManyAndReturn | null + /** + * The data used to create many Spins. + */ + data: SpinCreateManyInput | SpinCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: SpinIncludeCreateManyAndReturn | null + } + + /** + * Spin update + */ + export type SpinUpdateArgs = { + /** + * Select specific fields to fetch from the Spin + */ + select?: SpinSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SpinInclude | null + /** + * The data needed to update a Spin. + */ + data: XOR + /** + * Choose, which Spin to update. + */ + where: SpinWhereUniqueInput + } + + /** + * Spin updateMany + */ + export type SpinUpdateManyArgs = { + /** + * The data used to update Spins. + */ + data: XOR + /** + * Filter which Spins to update + */ + where?: SpinWhereInput + } + + /** + * Spin upsert + */ + export type SpinUpsertArgs = { + /** + * Select specific fields to fetch from the Spin + */ + select?: SpinSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SpinInclude | null + /** + * The filter to search for the Spin to update in case it exists. + */ + where: SpinWhereUniqueInput + /** + * In case the Spin found by the `where` argument doesn't exist, create a new Spin with this data. + */ + create: XOR + /** + * In case the Spin was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * Spin delete + */ + export type SpinDeleteArgs = { + /** + * Select specific fields to fetch from the Spin + */ + select?: SpinSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SpinInclude | null + /** + * Filter which Spin to delete. + */ + where: SpinWhereUniqueInput + } + + /** + * Spin deleteMany + */ + export type SpinDeleteManyArgs = { + /** + * Filter which Spins to delete + */ + where?: SpinWhereInput + } + + /** + * Spin.prize + */ + export type Spin$prizeArgs = { + /** + * Select specific fields to fetch from the Prize + */ + select?: PrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: PrizeInclude | null + where?: PrizeWhereInput + } + + /** + * Spin.userPrize + */ + export type Spin$userPrizeArgs = { + /** + * Select specific fields to fetch from the UserPrize + */ + select?: UserPrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserPrizeInclude | null + where?: UserPrizeWhereInput + } + + /** + * Spin without action + */ + export type SpinDefaultArgs = { + /** + * Select specific fields to fetch from the Spin + */ + select?: SpinSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SpinInclude | null + } + + + /** + * Model UserPrize + */ + + export type AggregateUserPrize = { + _count: UserPrizeCountAggregateOutputType | null + _min: UserPrizeMinAggregateOutputType | null + _max: UserPrizeMaxAggregateOutputType | null + } + + export type UserPrizeMinAggregateOutputType = { + id: string | null + userId: string | null + campaignId: string | null + prizeId: string | null + spinId: string | null + code: string | null + status: $Enums.UserPrizeStatus | null + wonAt: Date | null + redeemedAt: Date | null + } + + export type UserPrizeMaxAggregateOutputType = { + id: string | null + userId: string | null + campaignId: string | null + prizeId: string | null + spinId: string | null + code: string | null + status: $Enums.UserPrizeStatus | null + wonAt: Date | null + redeemedAt: Date | null + } + + export type UserPrizeCountAggregateOutputType = { + id: number + userId: number + campaignId: number + prizeId: number + spinId: number + code: number + status: number + wonAt: number + redeemedAt: number + _all: number + } + + + export type UserPrizeMinAggregateInputType = { + id?: true + userId?: true + campaignId?: true + prizeId?: true + spinId?: true + code?: true + status?: true + wonAt?: true + redeemedAt?: true + } + + export type UserPrizeMaxAggregateInputType = { + id?: true + userId?: true + campaignId?: true + prizeId?: true + spinId?: true + code?: true + status?: true + wonAt?: true + redeemedAt?: true + } + + export type UserPrizeCountAggregateInputType = { + id?: true + userId?: true + campaignId?: true + prizeId?: true + spinId?: true + code?: true + status?: true + wonAt?: true + redeemedAt?: true + _all?: true + } + + export type UserPrizeAggregateArgs = { + /** + * Filter which UserPrize to aggregate. + */ + where?: UserPrizeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of UserPrizes to fetch. + */ + orderBy?: UserPrizeOrderByWithRelationInput | UserPrizeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: UserPrizeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` UserPrizes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` UserPrizes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned UserPrizes + **/ + _count?: true | UserPrizeCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: UserPrizeMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: UserPrizeMaxAggregateInputType + } + + export type GetUserPrizeAggregateType = { + [P in keyof T & keyof AggregateUserPrize]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type UserPrizeGroupByArgs = { + where?: UserPrizeWhereInput + orderBy?: UserPrizeOrderByWithAggregationInput | UserPrizeOrderByWithAggregationInput[] + by: UserPrizeScalarFieldEnum[] | UserPrizeScalarFieldEnum + having?: UserPrizeScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: UserPrizeCountAggregateInputType | true + _min?: UserPrizeMinAggregateInputType + _max?: UserPrizeMaxAggregateInputType + } + + export type UserPrizeGroupByOutputType = { + id: string + userId: string + campaignId: string + prizeId: string + spinId: string + code: string | null + status: $Enums.UserPrizeStatus + wonAt: Date + redeemedAt: Date | null + _count: UserPrizeCountAggregateOutputType | null + _min: UserPrizeMinAggregateOutputType | null + _max: UserPrizeMaxAggregateOutputType | null + } + + type GetUserPrizeGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof UserPrizeGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type UserPrizeSelect = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + campaignId?: boolean + prizeId?: boolean + spinId?: boolean + code?: boolean + status?: boolean + wonAt?: boolean + redeemedAt?: boolean + user?: boolean | UserDefaultArgs + campaign?: boolean | CampaignDefaultArgs + prize?: boolean | PrizeDefaultArgs + spin?: boolean | SpinDefaultArgs + }, ExtArgs["result"]["userPrize"]> + + export type UserPrizeSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + campaignId?: boolean + prizeId?: boolean + spinId?: boolean + code?: boolean + status?: boolean + wonAt?: boolean + redeemedAt?: boolean + user?: boolean | UserDefaultArgs + campaign?: boolean | CampaignDefaultArgs + prize?: boolean | PrizeDefaultArgs + spin?: boolean | SpinDefaultArgs + }, ExtArgs["result"]["userPrize"]> + + export type UserPrizeSelectScalar = { + id?: boolean + userId?: boolean + campaignId?: boolean + prizeId?: boolean + spinId?: boolean + code?: boolean + status?: boolean + wonAt?: boolean + redeemedAt?: boolean + } + + export type UserPrizeInclude = { + user?: boolean | UserDefaultArgs + campaign?: boolean | CampaignDefaultArgs + prize?: boolean | PrizeDefaultArgs + spin?: boolean | SpinDefaultArgs + } + export type UserPrizeIncludeCreateManyAndReturn = { + user?: boolean | UserDefaultArgs + campaign?: boolean | CampaignDefaultArgs + prize?: boolean | PrizeDefaultArgs + spin?: boolean | SpinDefaultArgs + } + + export type $UserPrizePayload = { + name: "UserPrize" + objects: { + user: Prisma.$UserPayload + campaign: Prisma.$CampaignPayload + prize: Prisma.$PrizePayload + spin: Prisma.$SpinPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + userId: string + campaignId: string + prizeId: string + spinId: string + code: string | null + status: $Enums.UserPrizeStatus + wonAt: Date + redeemedAt: Date | null + }, ExtArgs["result"]["userPrize"]> + composites: {} + } + + type UserPrizeGetPayload = $Result.GetResult + + type UserPrizeCountArgs = + Omit & { + select?: UserPrizeCountAggregateInputType | true + } + + export interface UserPrizeDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['UserPrize'], meta: { name: 'UserPrize' } } + /** + * Find zero or one UserPrize that matches the filter. + * @param {UserPrizeFindUniqueArgs} args - Arguments to find a UserPrize + * @example + * // Get one UserPrize + * const userPrize = await prisma.userPrize.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__UserPrizeClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one UserPrize that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {UserPrizeFindUniqueOrThrowArgs} args - Arguments to find a UserPrize + * @example + * // Get one UserPrize + * const userPrize = await prisma.userPrize.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__UserPrizeClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first UserPrize that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserPrizeFindFirstArgs} args - Arguments to find a UserPrize + * @example + * // Get one UserPrize + * const userPrize = await prisma.userPrize.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__UserPrizeClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first UserPrize that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserPrizeFindFirstOrThrowArgs} args - Arguments to find a UserPrize + * @example + * // Get one UserPrize + * const userPrize = await prisma.userPrize.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__UserPrizeClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more UserPrizes that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserPrizeFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all UserPrizes + * const userPrizes = await prisma.userPrize.findMany() + * + * // Get first 10 UserPrizes + * const userPrizes = await prisma.userPrize.findMany({ take: 10 }) + * + * // Only select the `id` + * const userPrizeWithIdOnly = await prisma.userPrize.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a UserPrize. + * @param {UserPrizeCreateArgs} args - Arguments to create a UserPrize. + * @example + * // Create one UserPrize + * const UserPrize = await prisma.userPrize.create({ + * data: { + * // ... data to create a UserPrize + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__UserPrizeClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many UserPrizes. + * @param {UserPrizeCreateManyArgs} args - Arguments to create many UserPrizes. + * @example + * // Create many UserPrizes + * const userPrize = await prisma.userPrize.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many UserPrizes and returns the data saved in the database. + * @param {UserPrizeCreateManyAndReturnArgs} args - Arguments to create many UserPrizes. + * @example + * // Create many UserPrizes + * const userPrize = await prisma.userPrize.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many UserPrizes and only return the `id` + * const userPrizeWithIdOnly = await prisma.userPrize.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a UserPrize. + * @param {UserPrizeDeleteArgs} args - Arguments to delete one UserPrize. + * @example + * // Delete one UserPrize + * const UserPrize = await prisma.userPrize.delete({ + * where: { + * // ... filter to delete one UserPrize + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__UserPrizeClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one UserPrize. + * @param {UserPrizeUpdateArgs} args - Arguments to update one UserPrize. + * @example + * // Update one UserPrize + * const userPrize = await prisma.userPrize.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__UserPrizeClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more UserPrizes. + * @param {UserPrizeDeleteManyArgs} args - Arguments to filter UserPrizes to delete. + * @example + * // Delete a few UserPrizes + * const { count } = await prisma.userPrize.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more UserPrizes. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserPrizeUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many UserPrizes + * const userPrize = await prisma.userPrize.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one UserPrize. + * @param {UserPrizeUpsertArgs} args - Arguments to update or create a UserPrize. + * @example + * // Update or create a UserPrize + * const userPrize = await prisma.userPrize.upsert({ + * create: { + * // ... data to create a UserPrize + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the UserPrize we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__UserPrizeClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of UserPrizes. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserPrizeCountArgs} args - Arguments to filter UserPrizes to count. + * @example + * // Count the number of UserPrizes + * const count = await prisma.userPrize.count({ + * where: { + * // ... the filter for the UserPrizes we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a UserPrize. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserPrizeAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by UserPrize. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {UserPrizeGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends UserPrizeGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: UserPrizeGroupByArgs['orderBy'] } + : { orderBy?: UserPrizeGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetUserPrizeGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the UserPrize model + */ + readonly fields: UserPrizeFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for UserPrize. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__UserPrizeClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + campaign = {}>(args?: Subset>): Prisma__CampaignClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + prize = {}>(args?: Subset>): Prisma__PrizeClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + spin = {}>(args?: Subset>): Prisma__SpinClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the UserPrize model + */ + interface UserPrizeFieldRefs { + readonly id: FieldRef<"UserPrize", 'String'> + readonly userId: FieldRef<"UserPrize", 'String'> + readonly campaignId: FieldRef<"UserPrize", 'String'> + readonly prizeId: FieldRef<"UserPrize", 'String'> + readonly spinId: FieldRef<"UserPrize", 'String'> + readonly code: FieldRef<"UserPrize", 'String'> + readonly status: FieldRef<"UserPrize", 'UserPrizeStatus'> + readonly wonAt: FieldRef<"UserPrize", 'DateTime'> + readonly redeemedAt: FieldRef<"UserPrize", 'DateTime'> + } + + + // Custom InputTypes + /** + * UserPrize findUnique + */ + export type UserPrizeFindUniqueArgs = { + /** + * Select specific fields to fetch from the UserPrize + */ + select?: UserPrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserPrizeInclude | null + /** + * Filter, which UserPrize to fetch. + */ + where: UserPrizeWhereUniqueInput + } + + /** + * UserPrize findUniqueOrThrow + */ + export type UserPrizeFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the UserPrize + */ + select?: UserPrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserPrizeInclude | null + /** + * Filter, which UserPrize to fetch. + */ + where: UserPrizeWhereUniqueInput + } + + /** + * UserPrize findFirst + */ + export type UserPrizeFindFirstArgs = { + /** + * Select specific fields to fetch from the UserPrize + */ + select?: UserPrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserPrizeInclude | null + /** + * Filter, which UserPrize to fetch. + */ + where?: UserPrizeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of UserPrizes to fetch. + */ + orderBy?: UserPrizeOrderByWithRelationInput | UserPrizeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for UserPrizes. + */ + cursor?: UserPrizeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` UserPrizes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` UserPrizes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of UserPrizes. + */ + distinct?: UserPrizeScalarFieldEnum | UserPrizeScalarFieldEnum[] + } + + /** + * UserPrize findFirstOrThrow + */ + export type UserPrizeFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the UserPrize + */ + select?: UserPrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserPrizeInclude | null + /** + * Filter, which UserPrize to fetch. + */ + where?: UserPrizeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of UserPrizes to fetch. + */ + orderBy?: UserPrizeOrderByWithRelationInput | UserPrizeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for UserPrizes. + */ + cursor?: UserPrizeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` UserPrizes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` UserPrizes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of UserPrizes. + */ + distinct?: UserPrizeScalarFieldEnum | UserPrizeScalarFieldEnum[] + } + + /** + * UserPrize findMany + */ + export type UserPrizeFindManyArgs = { + /** + * Select specific fields to fetch from the UserPrize + */ + select?: UserPrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserPrizeInclude | null + /** + * Filter, which UserPrizes to fetch. + */ + where?: UserPrizeWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of UserPrizes to fetch. + */ + orderBy?: UserPrizeOrderByWithRelationInput | UserPrizeOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing UserPrizes. + */ + cursor?: UserPrizeWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` UserPrizes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` UserPrizes. + */ + skip?: number + distinct?: UserPrizeScalarFieldEnum | UserPrizeScalarFieldEnum[] + } + + /** + * UserPrize create + */ + export type UserPrizeCreateArgs = { + /** + * Select specific fields to fetch from the UserPrize + */ + select?: UserPrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserPrizeInclude | null + /** + * The data needed to create a UserPrize. + */ + data: XOR + } + + /** + * UserPrize createMany + */ + export type UserPrizeCreateManyArgs = { + /** + * The data used to create many UserPrizes. + */ + data: UserPrizeCreateManyInput | UserPrizeCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * UserPrize createManyAndReturn + */ + export type UserPrizeCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the UserPrize + */ + select?: UserPrizeSelectCreateManyAndReturn | null + /** + * The data used to create many UserPrizes. + */ + data: UserPrizeCreateManyInput | UserPrizeCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: UserPrizeIncludeCreateManyAndReturn | null + } + + /** + * UserPrize update + */ + export type UserPrizeUpdateArgs = { + /** + * Select specific fields to fetch from the UserPrize + */ + select?: UserPrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserPrizeInclude | null + /** + * The data needed to update a UserPrize. + */ + data: XOR + /** + * Choose, which UserPrize to update. + */ + where: UserPrizeWhereUniqueInput + } + + /** + * UserPrize updateMany + */ + export type UserPrizeUpdateManyArgs = { + /** + * The data used to update UserPrizes. + */ + data: XOR + /** + * Filter which UserPrizes to update + */ + where?: UserPrizeWhereInput + } + + /** + * UserPrize upsert + */ + export type UserPrizeUpsertArgs = { + /** + * Select specific fields to fetch from the UserPrize + */ + select?: UserPrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserPrizeInclude | null + /** + * The filter to search for the UserPrize to update in case it exists. + */ + where: UserPrizeWhereUniqueInput + /** + * In case the UserPrize found by the `where` argument doesn't exist, create a new UserPrize with this data. + */ + create: XOR + /** + * In case the UserPrize was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * UserPrize delete + */ + export type UserPrizeDeleteArgs = { + /** + * Select specific fields to fetch from the UserPrize + */ + select?: UserPrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserPrizeInclude | null + /** + * Filter which UserPrize to delete. + */ + where: UserPrizeWhereUniqueInput + } + + /** + * UserPrize deleteMany + */ + export type UserPrizeDeleteManyArgs = { + /** + * Filter which UserPrizes to delete + */ + where?: UserPrizeWhereInput + } + + /** + * UserPrize without action + */ + export type UserPrizeDefaultArgs = { + /** + * Select specific fields to fetch from the UserPrize + */ + select?: UserPrizeSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserPrizeInclude | null + } + + + /** + * Model SmsLog + */ + + export type AggregateSmsLog = { + _count: SmsLogCountAggregateOutputType | null + _min: SmsLogMinAggregateOutputType | null + _max: SmsLogMaxAggregateOutputType | null + } + + export type SmsLogMinAggregateOutputType = { + id: string | null + userId: string | null + mobile: string | null + type: $Enums.SmsType | null + message: string | null + provider: string | null + status: $Enums.SmsStatus | null + createdAt: Date | null + } + + export type SmsLogMaxAggregateOutputType = { + id: string | null + userId: string | null + mobile: string | null + type: $Enums.SmsType | null + message: string | null + provider: string | null + status: $Enums.SmsStatus | null + createdAt: Date | null + } + + export type SmsLogCountAggregateOutputType = { + id: number + userId: number + mobile: number + type: number + message: number + provider: number + status: number + providerResponse: number + createdAt: number + _all: number + } + + + export type SmsLogMinAggregateInputType = { + id?: true + userId?: true + mobile?: true + type?: true + message?: true + provider?: true + status?: true + createdAt?: true + } + + export type SmsLogMaxAggregateInputType = { + id?: true + userId?: true + mobile?: true + type?: true + message?: true + provider?: true + status?: true + createdAt?: true + } + + export type SmsLogCountAggregateInputType = { + id?: true + userId?: true + mobile?: true + type?: true + message?: true + provider?: true + status?: true + providerResponse?: true + createdAt?: true + _all?: true + } + + export type SmsLogAggregateArgs = { + /** + * Filter which SmsLog to aggregate. + */ + where?: SmsLogWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of SmsLogs to fetch. + */ + orderBy?: SmsLogOrderByWithRelationInput | SmsLogOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: SmsLogWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` SmsLogs from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` SmsLogs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned SmsLogs + **/ + _count?: true | SmsLogCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: SmsLogMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: SmsLogMaxAggregateInputType + } + + export type GetSmsLogAggregateType = { + [P in keyof T & keyof AggregateSmsLog]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type SmsLogGroupByArgs = { + where?: SmsLogWhereInput + orderBy?: SmsLogOrderByWithAggregationInput | SmsLogOrderByWithAggregationInput[] + by: SmsLogScalarFieldEnum[] | SmsLogScalarFieldEnum + having?: SmsLogScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: SmsLogCountAggregateInputType | true + _min?: SmsLogMinAggregateInputType + _max?: SmsLogMaxAggregateInputType + } + + export type SmsLogGroupByOutputType = { + id: string + userId: string | null + mobile: string + type: $Enums.SmsType + message: string + provider: string + status: $Enums.SmsStatus + providerResponse: JsonValue | null + createdAt: Date + _count: SmsLogCountAggregateOutputType | null + _min: SmsLogMinAggregateOutputType | null + _max: SmsLogMaxAggregateOutputType | null + } + + type GetSmsLogGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof SmsLogGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type SmsLogSelect = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + mobile?: boolean + type?: boolean + message?: boolean + provider?: boolean + status?: boolean + providerResponse?: boolean + createdAt?: boolean + user?: boolean | SmsLog$userArgs + }, ExtArgs["result"]["smsLog"]> + + export type SmsLogSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + userId?: boolean + mobile?: boolean + type?: boolean + message?: boolean + provider?: boolean + status?: boolean + providerResponse?: boolean + createdAt?: boolean + user?: boolean | SmsLog$userArgs + }, ExtArgs["result"]["smsLog"]> + + export type SmsLogSelectScalar = { + id?: boolean + userId?: boolean + mobile?: boolean + type?: boolean + message?: boolean + provider?: boolean + status?: boolean + providerResponse?: boolean + createdAt?: boolean + } + + export type SmsLogInclude = { + user?: boolean | SmsLog$userArgs + } + export type SmsLogIncludeCreateManyAndReturn = { + user?: boolean | SmsLog$userArgs + } + + export type $SmsLogPayload = { + name: "SmsLog" + objects: { + user: Prisma.$UserPayload | null + } + scalars: $Extensions.GetPayloadResult<{ + id: string + userId: string | null + mobile: string + type: $Enums.SmsType + message: string + provider: string + status: $Enums.SmsStatus + providerResponse: Prisma.JsonValue | null + createdAt: Date + }, ExtArgs["result"]["smsLog"]> + composites: {} + } + + type SmsLogGetPayload = $Result.GetResult + + type SmsLogCountArgs = + Omit & { + select?: SmsLogCountAggregateInputType | true + } + + export interface SmsLogDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['SmsLog'], meta: { name: 'SmsLog' } } + /** + * Find zero or one SmsLog that matches the filter. + * @param {SmsLogFindUniqueArgs} args - Arguments to find a SmsLog + * @example + * // Get one SmsLog + * const smsLog = await prisma.smsLog.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__SmsLogClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one SmsLog that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {SmsLogFindUniqueOrThrowArgs} args - Arguments to find a SmsLog + * @example + * // Get one SmsLog + * const smsLog = await prisma.smsLog.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__SmsLogClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first SmsLog that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SmsLogFindFirstArgs} args - Arguments to find a SmsLog + * @example + * // Get one SmsLog + * const smsLog = await prisma.smsLog.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__SmsLogClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first SmsLog that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SmsLogFindFirstOrThrowArgs} args - Arguments to find a SmsLog + * @example + * // Get one SmsLog + * const smsLog = await prisma.smsLog.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__SmsLogClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more SmsLogs that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SmsLogFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all SmsLogs + * const smsLogs = await prisma.smsLog.findMany() + * + * // Get first 10 SmsLogs + * const smsLogs = await prisma.smsLog.findMany({ take: 10 }) + * + * // Only select the `id` + * const smsLogWithIdOnly = await prisma.smsLog.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a SmsLog. + * @param {SmsLogCreateArgs} args - Arguments to create a SmsLog. + * @example + * // Create one SmsLog + * const SmsLog = await prisma.smsLog.create({ + * data: { + * // ... data to create a SmsLog + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__SmsLogClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many SmsLogs. + * @param {SmsLogCreateManyArgs} args - Arguments to create many SmsLogs. + * @example + * // Create many SmsLogs + * const smsLog = await prisma.smsLog.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many SmsLogs and returns the data saved in the database. + * @param {SmsLogCreateManyAndReturnArgs} args - Arguments to create many SmsLogs. + * @example + * // Create many SmsLogs + * const smsLog = await prisma.smsLog.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many SmsLogs and only return the `id` + * const smsLogWithIdOnly = await prisma.smsLog.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a SmsLog. + * @param {SmsLogDeleteArgs} args - Arguments to delete one SmsLog. + * @example + * // Delete one SmsLog + * const SmsLog = await prisma.smsLog.delete({ + * where: { + * // ... filter to delete one SmsLog + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__SmsLogClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one SmsLog. + * @param {SmsLogUpdateArgs} args - Arguments to update one SmsLog. + * @example + * // Update one SmsLog + * const smsLog = await prisma.smsLog.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__SmsLogClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more SmsLogs. + * @param {SmsLogDeleteManyArgs} args - Arguments to filter SmsLogs to delete. + * @example + * // Delete a few SmsLogs + * const { count } = await prisma.smsLog.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more SmsLogs. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SmsLogUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many SmsLogs + * const smsLog = await prisma.smsLog.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one SmsLog. + * @param {SmsLogUpsertArgs} args - Arguments to update or create a SmsLog. + * @example + * // Update or create a SmsLog + * const smsLog = await prisma.smsLog.upsert({ + * create: { + * // ... data to create a SmsLog + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the SmsLog we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__SmsLogClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of SmsLogs. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SmsLogCountArgs} args - Arguments to filter SmsLogs to count. + * @example + * // Count the number of SmsLogs + * const count = await prisma.smsLog.count({ + * where: { + * // ... the filter for the SmsLogs we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a SmsLog. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SmsLogAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by SmsLog. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SmsLogGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends SmsLogGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: SmsLogGroupByArgs['orderBy'] } + : { orderBy?: SmsLogGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSmsLogGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the SmsLog model + */ + readonly fields: SmsLogFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for SmsLog. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__SmsLogClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + user = {}>(args?: Subset>): Prisma__UserClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the SmsLog model + */ + interface SmsLogFieldRefs { + readonly id: FieldRef<"SmsLog", 'String'> + readonly userId: FieldRef<"SmsLog", 'String'> + readonly mobile: FieldRef<"SmsLog", 'String'> + readonly type: FieldRef<"SmsLog", 'SmsType'> + readonly message: FieldRef<"SmsLog", 'String'> + readonly provider: FieldRef<"SmsLog", 'String'> + readonly status: FieldRef<"SmsLog", 'SmsStatus'> + readonly providerResponse: FieldRef<"SmsLog", 'Json'> + readonly createdAt: FieldRef<"SmsLog", 'DateTime'> + } + + + // Custom InputTypes + /** + * SmsLog findUnique + */ + export type SmsLogFindUniqueArgs = { + /** + * Select specific fields to fetch from the SmsLog + */ + select?: SmsLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SmsLogInclude | null + /** + * Filter, which SmsLog to fetch. + */ + where: SmsLogWhereUniqueInput + } + + /** + * SmsLog findUniqueOrThrow + */ + export type SmsLogFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the SmsLog + */ + select?: SmsLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SmsLogInclude | null + /** + * Filter, which SmsLog to fetch. + */ + where: SmsLogWhereUniqueInput + } + + /** + * SmsLog findFirst + */ + export type SmsLogFindFirstArgs = { + /** + * Select specific fields to fetch from the SmsLog + */ + select?: SmsLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SmsLogInclude | null + /** + * Filter, which SmsLog to fetch. + */ + where?: SmsLogWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of SmsLogs to fetch. + */ + orderBy?: SmsLogOrderByWithRelationInput | SmsLogOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for SmsLogs. + */ + cursor?: SmsLogWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` SmsLogs from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` SmsLogs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of SmsLogs. + */ + distinct?: SmsLogScalarFieldEnum | SmsLogScalarFieldEnum[] + } + + /** + * SmsLog findFirstOrThrow + */ + export type SmsLogFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the SmsLog + */ + select?: SmsLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SmsLogInclude | null + /** + * Filter, which SmsLog to fetch. + */ + where?: SmsLogWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of SmsLogs to fetch. + */ + orderBy?: SmsLogOrderByWithRelationInput | SmsLogOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for SmsLogs. + */ + cursor?: SmsLogWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` SmsLogs from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` SmsLogs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of SmsLogs. + */ + distinct?: SmsLogScalarFieldEnum | SmsLogScalarFieldEnum[] + } + + /** + * SmsLog findMany + */ + export type SmsLogFindManyArgs = { + /** + * Select specific fields to fetch from the SmsLog + */ + select?: SmsLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SmsLogInclude | null + /** + * Filter, which SmsLogs to fetch. + */ + where?: SmsLogWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of SmsLogs to fetch. + */ + orderBy?: SmsLogOrderByWithRelationInput | SmsLogOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing SmsLogs. + */ + cursor?: SmsLogWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` SmsLogs from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` SmsLogs. + */ + skip?: number + distinct?: SmsLogScalarFieldEnum | SmsLogScalarFieldEnum[] + } + + /** + * SmsLog create + */ + export type SmsLogCreateArgs = { + /** + * Select specific fields to fetch from the SmsLog + */ + select?: SmsLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SmsLogInclude | null + /** + * The data needed to create a SmsLog. + */ + data: XOR + } + + /** + * SmsLog createMany + */ + export type SmsLogCreateManyArgs = { + /** + * The data used to create many SmsLogs. + */ + data: SmsLogCreateManyInput | SmsLogCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * SmsLog createManyAndReturn + */ + export type SmsLogCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the SmsLog + */ + select?: SmsLogSelectCreateManyAndReturn | null + /** + * The data used to create many SmsLogs. + */ + data: SmsLogCreateManyInput | SmsLogCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: SmsLogIncludeCreateManyAndReturn | null + } + + /** + * SmsLog update + */ + export type SmsLogUpdateArgs = { + /** + * Select specific fields to fetch from the SmsLog + */ + select?: SmsLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SmsLogInclude | null + /** + * The data needed to update a SmsLog. + */ + data: XOR + /** + * Choose, which SmsLog to update. + */ + where: SmsLogWhereUniqueInput + } + + /** + * SmsLog updateMany + */ + export type SmsLogUpdateManyArgs = { + /** + * The data used to update SmsLogs. + */ + data: XOR + /** + * Filter which SmsLogs to update + */ + where?: SmsLogWhereInput + } + + /** + * SmsLog upsert + */ + export type SmsLogUpsertArgs = { + /** + * Select specific fields to fetch from the SmsLog + */ + select?: SmsLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SmsLogInclude | null + /** + * The filter to search for the SmsLog to update in case it exists. + */ + where: SmsLogWhereUniqueInput + /** + * In case the SmsLog found by the `where` argument doesn't exist, create a new SmsLog with this data. + */ + create: XOR + /** + * In case the SmsLog was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * SmsLog delete + */ + export type SmsLogDeleteArgs = { + /** + * Select specific fields to fetch from the SmsLog + */ + select?: SmsLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SmsLogInclude | null + /** + * Filter which SmsLog to delete. + */ + where: SmsLogWhereUniqueInput + } + + /** + * SmsLog deleteMany + */ + export type SmsLogDeleteManyArgs = { + /** + * Filter which SmsLogs to delete + */ + where?: SmsLogWhereInput + } + + /** + * SmsLog.user + */ + export type SmsLog$userArgs = { + /** + * Select specific fields to fetch from the User + */ + select?: UserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UserInclude | null + where?: UserWhereInput + } + + /** + * SmsLog without action + */ + export type SmsLogDefaultArgs = { + /** + * Select specific fields to fetch from the SmsLog + */ + select?: SmsLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SmsLogInclude | null + } + + + /** + * Model AdminLog + */ + + export type AggregateAdminLog = { + _count: AdminLogCountAggregateOutputType | null + _min: AdminLogMinAggregateOutputType | null + _max: AdminLogMaxAggregateOutputType | null + } + + export type AdminLogMinAggregateOutputType = { + id: string | null + adminId: string | null + action: string | null + entityType: string | null + entityId: string | null + ip: string | null + createdAt: Date | null + } + + export type AdminLogMaxAggregateOutputType = { + id: string | null + adminId: string | null + action: string | null + entityType: string | null + entityId: string | null + ip: string | null + createdAt: Date | null + } + + export type AdminLogCountAggregateOutputType = { + id: number + adminId: number + action: number + entityType: number + entityId: number + oldValue: number + newValue: number + ip: number + createdAt: number + _all: number + } + + + export type AdminLogMinAggregateInputType = { + id?: true + adminId?: true + action?: true + entityType?: true + entityId?: true + ip?: true + createdAt?: true + } + + export type AdminLogMaxAggregateInputType = { + id?: true + adminId?: true + action?: true + entityType?: true + entityId?: true + ip?: true + createdAt?: true + } + + export type AdminLogCountAggregateInputType = { + id?: true + adminId?: true + action?: true + entityType?: true + entityId?: true + oldValue?: true + newValue?: true + ip?: true + createdAt?: true + _all?: true + } + + export type AdminLogAggregateArgs = { + /** + * Filter which AdminLog to aggregate. + */ + where?: AdminLogWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AdminLogs to fetch. + */ + orderBy?: AdminLogOrderByWithRelationInput | AdminLogOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: AdminLogWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AdminLogs from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AdminLogs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned AdminLogs + **/ + _count?: true | AdminLogCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AdminLogMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AdminLogMaxAggregateInputType + } + + export type GetAdminLogAggregateType = { + [P in keyof T & keyof AggregateAdminLog]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type AdminLogGroupByArgs = { + where?: AdminLogWhereInput + orderBy?: AdminLogOrderByWithAggregationInput | AdminLogOrderByWithAggregationInput[] + by: AdminLogScalarFieldEnum[] | AdminLogScalarFieldEnum + having?: AdminLogScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AdminLogCountAggregateInputType | true + _min?: AdminLogMinAggregateInputType + _max?: AdminLogMaxAggregateInputType + } + + export type AdminLogGroupByOutputType = { + id: string + adminId: string + action: string + entityType: string + entityId: string + oldValue: JsonValue | null + newValue: JsonValue | null + ip: string | null + createdAt: Date + _count: AdminLogCountAggregateOutputType | null + _min: AdminLogMinAggregateOutputType | null + _max: AdminLogMaxAggregateOutputType | null + } + + type GetAdminLogGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof AdminLogGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type AdminLogSelect = $Extensions.GetSelect<{ + id?: boolean + adminId?: boolean + action?: boolean + entityType?: boolean + entityId?: boolean + oldValue?: boolean + newValue?: boolean + ip?: boolean + createdAt?: boolean + admin?: boolean | AdminDefaultArgs + }, ExtArgs["result"]["adminLog"]> + + export type AdminLogSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + adminId?: boolean + action?: boolean + entityType?: boolean + entityId?: boolean + oldValue?: boolean + newValue?: boolean + ip?: boolean + createdAt?: boolean + admin?: boolean | AdminDefaultArgs + }, ExtArgs["result"]["adminLog"]> + + export type AdminLogSelectScalar = { + id?: boolean + adminId?: boolean + action?: boolean + entityType?: boolean + entityId?: boolean + oldValue?: boolean + newValue?: boolean + ip?: boolean + createdAt?: boolean + } + + export type AdminLogInclude = { + admin?: boolean | AdminDefaultArgs + } + export type AdminLogIncludeCreateManyAndReturn = { + admin?: boolean | AdminDefaultArgs + } + + export type $AdminLogPayload = { + name: "AdminLog" + objects: { + admin: Prisma.$AdminPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + adminId: string + action: string + entityType: string + entityId: string + oldValue: Prisma.JsonValue | null + newValue: Prisma.JsonValue | null + ip: string | null + createdAt: Date + }, ExtArgs["result"]["adminLog"]> + composites: {} + } + + type AdminLogGetPayload = $Result.GetResult + + type AdminLogCountArgs = + Omit & { + select?: AdminLogCountAggregateInputType | true + } + + export interface AdminLogDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['AdminLog'], meta: { name: 'AdminLog' } } + /** + * Find zero or one AdminLog that matches the filter. + * @param {AdminLogFindUniqueArgs} args - Arguments to find a AdminLog + * @example + * // Get one AdminLog + * const adminLog = await prisma.adminLog.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__AdminLogClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one AdminLog that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AdminLogFindUniqueOrThrowArgs} args - Arguments to find a AdminLog + * @example + * // Get one AdminLog + * const adminLog = await prisma.adminLog.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__AdminLogClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first AdminLog that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminLogFindFirstArgs} args - Arguments to find a AdminLog + * @example + * // Get one AdminLog + * const adminLog = await prisma.adminLog.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__AdminLogClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first AdminLog that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminLogFindFirstOrThrowArgs} args - Arguments to find a AdminLog + * @example + * // Get one AdminLog + * const adminLog = await prisma.adminLog.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__AdminLogClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more AdminLogs that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminLogFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all AdminLogs + * const adminLogs = await prisma.adminLog.findMany() + * + * // Get first 10 AdminLogs + * const adminLogs = await prisma.adminLog.findMany({ take: 10 }) + * + * // Only select the `id` + * const adminLogWithIdOnly = await prisma.adminLog.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a AdminLog. + * @param {AdminLogCreateArgs} args - Arguments to create a AdminLog. + * @example + * // Create one AdminLog + * const AdminLog = await prisma.adminLog.create({ + * data: { + * // ... data to create a AdminLog + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__AdminLogClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many AdminLogs. + * @param {AdminLogCreateManyArgs} args - Arguments to create many AdminLogs. + * @example + * // Create many AdminLogs + * const adminLog = await prisma.adminLog.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many AdminLogs and returns the data saved in the database. + * @param {AdminLogCreateManyAndReturnArgs} args - Arguments to create many AdminLogs. + * @example + * // Create many AdminLogs + * const adminLog = await prisma.adminLog.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many AdminLogs and only return the `id` + * const adminLogWithIdOnly = await prisma.adminLog.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a AdminLog. + * @param {AdminLogDeleteArgs} args - Arguments to delete one AdminLog. + * @example + * // Delete one AdminLog + * const AdminLog = await prisma.adminLog.delete({ + * where: { + * // ... filter to delete one AdminLog + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__AdminLogClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one AdminLog. + * @param {AdminLogUpdateArgs} args - Arguments to update one AdminLog. + * @example + * // Update one AdminLog + * const adminLog = await prisma.adminLog.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__AdminLogClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more AdminLogs. + * @param {AdminLogDeleteManyArgs} args - Arguments to filter AdminLogs to delete. + * @example + * // Delete a few AdminLogs + * const { count } = await prisma.adminLog.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more AdminLogs. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminLogUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many AdminLogs + * const adminLog = await prisma.adminLog.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one AdminLog. + * @param {AdminLogUpsertArgs} args - Arguments to update or create a AdminLog. + * @example + * // Update or create a AdminLog + * const adminLog = await prisma.adminLog.upsert({ + * create: { + * // ... data to create a AdminLog + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the AdminLog we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__AdminLogClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of AdminLogs. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminLogCountArgs} args - Arguments to filter AdminLogs to count. + * @example + * // Count the number of AdminLogs + * const count = await prisma.adminLog.count({ + * where: { + * // ... the filter for the AdminLogs we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a AdminLog. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminLogAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by AdminLog. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminLogGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends AdminLogGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: AdminLogGroupByArgs['orderBy'] } + : { orderBy?: AdminLogGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAdminLogGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the AdminLog model + */ + readonly fields: AdminLogFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for AdminLog. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__AdminLogClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + admin = {}>(args?: Subset>): Prisma__AdminClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the AdminLog model + */ + interface AdminLogFieldRefs { + readonly id: FieldRef<"AdminLog", 'String'> + readonly adminId: FieldRef<"AdminLog", 'String'> + readonly action: FieldRef<"AdminLog", 'String'> + readonly entityType: FieldRef<"AdminLog", 'String'> + readonly entityId: FieldRef<"AdminLog", 'String'> + readonly oldValue: FieldRef<"AdminLog", 'Json'> + readonly newValue: FieldRef<"AdminLog", 'Json'> + readonly ip: FieldRef<"AdminLog", 'String'> + readonly createdAt: FieldRef<"AdminLog", 'DateTime'> + } + + + // Custom InputTypes + /** + * AdminLog findUnique + */ + export type AdminLogFindUniqueArgs = { + /** + * Select specific fields to fetch from the AdminLog + */ + select?: AdminLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminLogInclude | null + /** + * Filter, which AdminLog to fetch. + */ + where: AdminLogWhereUniqueInput + } + + /** + * AdminLog findUniqueOrThrow + */ + export type AdminLogFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the AdminLog + */ + select?: AdminLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminLogInclude | null + /** + * Filter, which AdminLog to fetch. + */ + where: AdminLogWhereUniqueInput + } + + /** + * AdminLog findFirst + */ + export type AdminLogFindFirstArgs = { + /** + * Select specific fields to fetch from the AdminLog + */ + select?: AdminLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminLogInclude | null + /** + * Filter, which AdminLog to fetch. + */ + where?: AdminLogWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AdminLogs to fetch. + */ + orderBy?: AdminLogOrderByWithRelationInput | AdminLogOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AdminLogs. + */ + cursor?: AdminLogWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AdminLogs from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AdminLogs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AdminLogs. + */ + distinct?: AdminLogScalarFieldEnum | AdminLogScalarFieldEnum[] + } + + /** + * AdminLog findFirstOrThrow + */ + export type AdminLogFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the AdminLog + */ + select?: AdminLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminLogInclude | null + /** + * Filter, which AdminLog to fetch. + */ + where?: AdminLogWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AdminLogs to fetch. + */ + orderBy?: AdminLogOrderByWithRelationInput | AdminLogOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AdminLogs. + */ + cursor?: AdminLogWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AdminLogs from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AdminLogs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AdminLogs. + */ + distinct?: AdminLogScalarFieldEnum | AdminLogScalarFieldEnum[] + } + + /** + * AdminLog findMany + */ + export type AdminLogFindManyArgs = { + /** + * Select specific fields to fetch from the AdminLog + */ + select?: AdminLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminLogInclude | null + /** + * Filter, which AdminLogs to fetch. + */ + where?: AdminLogWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AdminLogs to fetch. + */ + orderBy?: AdminLogOrderByWithRelationInput | AdminLogOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing AdminLogs. + */ + cursor?: AdminLogWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AdminLogs from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AdminLogs. + */ + skip?: number + distinct?: AdminLogScalarFieldEnum | AdminLogScalarFieldEnum[] + } + + /** + * AdminLog create + */ + export type AdminLogCreateArgs = { + /** + * Select specific fields to fetch from the AdminLog + */ + select?: AdminLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminLogInclude | null + /** + * The data needed to create a AdminLog. + */ + data: XOR + } + + /** + * AdminLog createMany + */ + export type AdminLogCreateManyArgs = { + /** + * The data used to create many AdminLogs. + */ + data: AdminLogCreateManyInput | AdminLogCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * AdminLog createManyAndReturn + */ + export type AdminLogCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the AdminLog + */ + select?: AdminLogSelectCreateManyAndReturn | null + /** + * The data used to create many AdminLogs. + */ + data: AdminLogCreateManyInput | AdminLogCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminLogIncludeCreateManyAndReturn | null + } + + /** + * AdminLog update + */ + export type AdminLogUpdateArgs = { + /** + * Select specific fields to fetch from the AdminLog + */ + select?: AdminLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminLogInclude | null + /** + * The data needed to update a AdminLog. + */ + data: XOR + /** + * Choose, which AdminLog to update. + */ + where: AdminLogWhereUniqueInput + } + + /** + * AdminLog updateMany + */ + export type AdminLogUpdateManyArgs = { + /** + * The data used to update AdminLogs. + */ + data: XOR + /** + * Filter which AdminLogs to update + */ + where?: AdminLogWhereInput + } + + /** + * AdminLog upsert + */ + export type AdminLogUpsertArgs = { + /** + * Select specific fields to fetch from the AdminLog + */ + select?: AdminLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminLogInclude | null + /** + * The filter to search for the AdminLog to update in case it exists. + */ + where: AdminLogWhereUniqueInput + /** + * In case the AdminLog found by the `where` argument doesn't exist, create a new AdminLog with this data. + */ + create: XOR + /** + * In case the AdminLog was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * AdminLog delete + */ + export type AdminLogDeleteArgs = { + /** + * Select specific fields to fetch from the AdminLog + */ + select?: AdminLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminLogInclude | null + /** + * Filter which AdminLog to delete. + */ + where: AdminLogWhereUniqueInput + } + + /** + * AdminLog deleteMany + */ + export type AdminLogDeleteManyArgs = { + /** + * Filter which AdminLogs to delete + */ + where?: AdminLogWhereInput + } + + /** + * AdminLog without action + */ + export type AdminLogDefaultArgs = { + /** + * Select specific fields to fetch from the AdminLog + */ + select?: AdminLogSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminLogInclude | null + } + + + /** + * Enums + */ + + export const TransactionIsolationLevel: { + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' + }; + + export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + + export const AdminScalarFieldEnum: { + id: 'id', + name: 'name', + mobile: 'mobile', + email: 'email', + passwordHash: 'passwordHash', + role: 'role', + status: 'status', + createdAt: 'createdAt', + updatedAt: 'updatedAt' + }; + + export type AdminScalarFieldEnum = (typeof AdminScalarFieldEnum)[keyof typeof AdminScalarFieldEnum] + + + export const UserScalarFieldEnum: { + id: 'id', + mobile: 'mobile', + name: 'name', + status: 'status', + lastLoginAt: 'lastLoginAt', + createdAt: 'createdAt', + updatedAt: 'updatedAt' + }; + + export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] + + + export const OtpCodeScalarFieldEnum: { + id: 'id', + mobile: 'mobile', + code: 'code', + userId: 'userId', + attempts: 'attempts', + consumed: 'consumed', + expiresAt: 'expiresAt', + createdAt: 'createdAt' + }; + + export type OtpCodeScalarFieldEnum = (typeof OtpCodeScalarFieldEnum)[keyof typeof OtpCodeScalarFieldEnum] + + + export const CampaignScalarFieldEnum: { + id: 'id', + title: 'title', + slug: 'slug', + description: 'description', + image: 'image', + banner: 'banner', + logo: 'logo', + startAt: 'startAt', + endAt: 'endAt', + status: 'status', + defaultChances: 'defaultChances', + rules: 'rules', + ctaText: 'ctaText', + wheelDesign: 'wheelDesign', + settings: 'settings', + createdAt: 'createdAt', + updatedAt: 'updatedAt' + }; + + export type CampaignScalarFieldEnum = (typeof CampaignScalarFieldEnum)[keyof typeof CampaignScalarFieldEnum] + + + export const PrizeScalarFieldEnum: { + id: 'id', + campaignId: 'campaignId', + title: 'title', + description: 'description', + image: 'image', + type: 'type', + stockType: 'stockType', + initialStock: 'initialStock', + remainingStock: 'remainingStock', + weight: 'weight', + status: 'status', + sortOrder: 'sortOrder', + segmentColor: 'segmentColor', + expiresAt: 'expiresAt', + smsTemplate: 'smsTemplate', + createdAt: 'createdAt', + updatedAt: 'updatedAt' + }; + + export type PrizeScalarFieldEnum = (typeof PrizeScalarFieldEnum)[keyof typeof PrizeScalarFieldEnum] + + + export const UserCampaignScalarFieldEnum: { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + totalChances: 'totalChances', + usedChances: 'usedChances', + createdAt: 'createdAt', + updatedAt: 'updatedAt' + }; + + export type UserCampaignScalarFieldEnum = (typeof UserCampaignScalarFieldEnum)[keyof typeof UserCampaignScalarFieldEnum] + + + export const ChanceTransactionScalarFieldEnum: { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + amount: 'amount', + type: 'type', + referenceType: 'referenceType', + referenceId: 'referenceId', + description: 'description', + createdById: 'createdById', + createdAt: 'createdAt' + }; + + export type ChanceTransactionScalarFieldEnum = (typeof ChanceTransactionScalarFieldEnum)[keyof typeof ChanceTransactionScalarFieldEnum] + + + export const SpinScalarFieldEnum: { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + prizeId: 'prizeId', + status: 'status', + idempotencyKey: 'idempotencyKey', + ip: 'ip', + userAgent: 'userAgent', + createdAt: 'createdAt' + }; + + export type SpinScalarFieldEnum = (typeof SpinScalarFieldEnum)[keyof typeof SpinScalarFieldEnum] + + + export const UserPrizeScalarFieldEnum: { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + prizeId: 'prizeId', + spinId: 'spinId', + code: 'code', + status: 'status', + wonAt: 'wonAt', + redeemedAt: 'redeemedAt' + }; + + export type UserPrizeScalarFieldEnum = (typeof UserPrizeScalarFieldEnum)[keyof typeof UserPrizeScalarFieldEnum] + + + export const SmsLogScalarFieldEnum: { + id: 'id', + userId: 'userId', + mobile: 'mobile', + type: 'type', + message: 'message', + provider: 'provider', + status: 'status', + providerResponse: 'providerResponse', + createdAt: 'createdAt' + }; + + export type SmsLogScalarFieldEnum = (typeof SmsLogScalarFieldEnum)[keyof typeof SmsLogScalarFieldEnum] + + + export const AdminLogScalarFieldEnum: { + id: 'id', + adminId: 'adminId', + action: 'action', + entityType: 'entityType', + entityId: 'entityId', + oldValue: 'oldValue', + newValue: 'newValue', + ip: 'ip', + createdAt: 'createdAt' + }; + + export type AdminLogScalarFieldEnum = (typeof AdminLogScalarFieldEnum)[keyof typeof AdminLogScalarFieldEnum] + + + export const SortOrder: { + asc: 'asc', + desc: 'desc' + }; + + export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + + export const NullableJsonNullValueInput: { + DbNull: typeof DbNull, + JsonNull: typeof JsonNull + }; + + export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput] + + + export const QueryMode: { + default: 'default', + insensitive: 'insensitive' + }; + + export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + + + export const NullsOrder: { + first: 'first', + last: 'last' + }; + + export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + + + export const JsonNullValueFilter: { + DbNull: typeof DbNull, + JsonNull: typeof JsonNull, + AnyNull: typeof AnyNull + }; + + export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter] + + + /** + * Field references + */ + + + /** + * Reference to a field of type 'String' + */ + export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> + + + + /** + * Reference to a field of type 'String[]' + */ + export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'> + + + + /** + * Reference to a field of type 'AdminRole' + */ + export type EnumAdminRoleFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AdminRole'> + + + + /** + * Reference to a field of type 'AdminRole[]' + */ + export type ListEnumAdminRoleFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AdminRole[]'> + + + + /** + * Reference to a field of type 'AdminStatus' + */ + export type EnumAdminStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AdminStatus'> + + + + /** + * Reference to a field of type 'AdminStatus[]' + */ + export type ListEnumAdminStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AdminStatus[]'> + + + + /** + * Reference to a field of type 'DateTime' + */ + export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> + + + + /** + * Reference to a field of type 'DateTime[]' + */ + export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'> + + + + /** + * Reference to a field of type 'UserStatus' + */ + export type EnumUserStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'UserStatus'> + + + + /** + * Reference to a field of type 'UserStatus[]' + */ + export type ListEnumUserStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'UserStatus[]'> + + + + /** + * Reference to a field of type 'Int' + */ + export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> + + + + /** + * Reference to a field of type 'Int[]' + */ + export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'> + + + + /** + * Reference to a field of type 'Boolean' + */ + export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> + + + + /** + * Reference to a field of type 'CampaignStatus' + */ + export type EnumCampaignStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'CampaignStatus'> + + + + /** + * Reference to a field of type 'CampaignStatus[]' + */ + export type ListEnumCampaignStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'CampaignStatus[]'> + + + + /** + * Reference to a field of type 'WheelDesign' + */ + export type EnumWheelDesignFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'WheelDesign'> + + + + /** + * Reference to a field of type 'WheelDesign[]' + */ + export type ListEnumWheelDesignFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'WheelDesign[]'> + + + + /** + * Reference to a field of type 'Json' + */ + export type JsonFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Json'> + + + + /** + * Reference to a field of type 'PrizeType' + */ + export type EnumPrizeTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PrizeType'> + + + + /** + * Reference to a field of type 'PrizeType[]' + */ + export type ListEnumPrizeTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PrizeType[]'> + + + + /** + * Reference to a field of type 'StockType' + */ + export type EnumStockTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'StockType'> + + + + /** + * Reference to a field of type 'StockType[]' + */ + export type ListEnumStockTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'StockType[]'> + + + + /** + * Reference to a field of type 'PrizeStatus' + */ + export type EnumPrizeStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PrizeStatus'> + + + + /** + * Reference to a field of type 'PrizeStatus[]' + */ + export type ListEnumPrizeStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PrizeStatus[]'> + + + + /** + * Reference to a field of type 'ChanceTxnType' + */ + export type EnumChanceTxnTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'ChanceTxnType'> + + + + /** + * Reference to a field of type 'ChanceTxnType[]' + */ + export type ListEnumChanceTxnTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'ChanceTxnType[]'> + + + + /** + * Reference to a field of type 'SpinStatus' + */ + export type EnumSpinStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SpinStatus'> + + + + /** + * Reference to a field of type 'SpinStatus[]' + */ + export type ListEnumSpinStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SpinStatus[]'> + + + + /** + * Reference to a field of type 'UserPrizeStatus' + */ + export type EnumUserPrizeStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'UserPrizeStatus'> + + + + /** + * Reference to a field of type 'UserPrizeStatus[]' + */ + export type ListEnumUserPrizeStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'UserPrizeStatus[]'> + + + + /** + * Reference to a field of type 'SmsType' + */ + export type EnumSmsTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SmsType'> + + + + /** + * Reference to a field of type 'SmsType[]' + */ + export type ListEnumSmsTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SmsType[]'> + + + + /** + * Reference to a field of type 'SmsStatus' + */ + export type EnumSmsStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SmsStatus'> + + + + /** + * Reference to a field of type 'SmsStatus[]' + */ + export type ListEnumSmsStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'SmsStatus[]'> + + + + /** + * Reference to a field of type 'Float' + */ + export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> + + + + /** + * Reference to a field of type 'Float[]' + */ + export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'> + + /** + * Deep Input Types + */ + + + export type AdminWhereInput = { + AND?: AdminWhereInput | AdminWhereInput[] + OR?: AdminWhereInput[] + NOT?: AdminWhereInput | AdminWhereInput[] + id?: StringFilter<"Admin"> | string + name?: StringFilter<"Admin"> | string + mobile?: StringFilter<"Admin"> | string + email?: StringFilter<"Admin"> | string + passwordHash?: StringFilter<"Admin"> | string + role?: EnumAdminRoleFilter<"Admin"> | $Enums.AdminRole + status?: EnumAdminStatusFilter<"Admin"> | $Enums.AdminStatus + createdAt?: DateTimeFilter<"Admin"> | Date | string + updatedAt?: DateTimeFilter<"Admin"> | Date | string + auditLogs?: AdminLogListRelationFilter + chanceTxns?: ChanceTransactionListRelationFilter + } + + export type AdminOrderByWithRelationInput = { + id?: SortOrder + name?: SortOrder + mobile?: SortOrder + email?: SortOrder + passwordHash?: SortOrder + role?: SortOrder + status?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + auditLogs?: AdminLogOrderByRelationAggregateInput + chanceTxns?: ChanceTransactionOrderByRelationAggregateInput + } + + export type AdminWhereUniqueInput = Prisma.AtLeast<{ + id?: string + mobile?: string + email?: string + AND?: AdminWhereInput | AdminWhereInput[] + OR?: AdminWhereInput[] + NOT?: AdminWhereInput | AdminWhereInput[] + name?: StringFilter<"Admin"> | string + passwordHash?: StringFilter<"Admin"> | string + role?: EnumAdminRoleFilter<"Admin"> | $Enums.AdminRole + status?: EnumAdminStatusFilter<"Admin"> | $Enums.AdminStatus + createdAt?: DateTimeFilter<"Admin"> | Date | string + updatedAt?: DateTimeFilter<"Admin"> | Date | string + auditLogs?: AdminLogListRelationFilter + chanceTxns?: ChanceTransactionListRelationFilter + }, "id" | "mobile" | "email"> + + export type AdminOrderByWithAggregationInput = { + id?: SortOrder + name?: SortOrder + mobile?: SortOrder + email?: SortOrder + passwordHash?: SortOrder + role?: SortOrder + status?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + _count?: AdminCountOrderByAggregateInput + _max?: AdminMaxOrderByAggregateInput + _min?: AdminMinOrderByAggregateInput + } + + export type AdminScalarWhereWithAggregatesInput = { + AND?: AdminScalarWhereWithAggregatesInput | AdminScalarWhereWithAggregatesInput[] + OR?: AdminScalarWhereWithAggregatesInput[] + NOT?: AdminScalarWhereWithAggregatesInput | AdminScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Admin"> | string + name?: StringWithAggregatesFilter<"Admin"> | string + mobile?: StringWithAggregatesFilter<"Admin"> | string + email?: StringWithAggregatesFilter<"Admin"> | string + passwordHash?: StringWithAggregatesFilter<"Admin"> | string + role?: EnumAdminRoleWithAggregatesFilter<"Admin"> | $Enums.AdminRole + status?: EnumAdminStatusWithAggregatesFilter<"Admin"> | $Enums.AdminStatus + createdAt?: DateTimeWithAggregatesFilter<"Admin"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"Admin"> | Date | string + } + + export type UserWhereInput = { + AND?: UserWhereInput | UserWhereInput[] + OR?: UserWhereInput[] + NOT?: UserWhereInput | UserWhereInput[] + id?: StringFilter<"User"> | string + mobile?: StringFilter<"User"> | string + name?: StringNullableFilter<"User"> | string | null + status?: EnumUserStatusFilter<"User"> | $Enums.UserStatus + lastLoginAt?: DateTimeNullableFilter<"User"> | Date | string | null + createdAt?: DateTimeFilter<"User"> | Date | string + updatedAt?: DateTimeFilter<"User"> | Date | string + userCampaigns?: UserCampaignListRelationFilter + chanceTransactions?: ChanceTransactionListRelationFilter + spins?: SpinListRelationFilter + userPrizes?: UserPrizeListRelationFilter + otpCodes?: OtpCodeListRelationFilter + smsLogs?: SmsLogListRelationFilter + } + + export type UserOrderByWithRelationInput = { + id?: SortOrder + mobile?: SortOrder + name?: SortOrderInput | SortOrder + status?: SortOrder + lastLoginAt?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + userCampaigns?: UserCampaignOrderByRelationAggregateInput + chanceTransactions?: ChanceTransactionOrderByRelationAggregateInput + spins?: SpinOrderByRelationAggregateInput + userPrizes?: UserPrizeOrderByRelationAggregateInput + otpCodes?: OtpCodeOrderByRelationAggregateInput + smsLogs?: SmsLogOrderByRelationAggregateInput + } + + export type UserWhereUniqueInput = Prisma.AtLeast<{ + id?: string + mobile?: string + AND?: UserWhereInput | UserWhereInput[] + OR?: UserWhereInput[] + NOT?: UserWhereInput | UserWhereInput[] + name?: StringNullableFilter<"User"> | string | null + status?: EnumUserStatusFilter<"User"> | $Enums.UserStatus + lastLoginAt?: DateTimeNullableFilter<"User"> | Date | string | null + createdAt?: DateTimeFilter<"User"> | Date | string + updatedAt?: DateTimeFilter<"User"> | Date | string + userCampaigns?: UserCampaignListRelationFilter + chanceTransactions?: ChanceTransactionListRelationFilter + spins?: SpinListRelationFilter + userPrizes?: UserPrizeListRelationFilter + otpCodes?: OtpCodeListRelationFilter + smsLogs?: SmsLogListRelationFilter + }, "id" | "mobile"> + + export type UserOrderByWithAggregationInput = { + id?: SortOrder + mobile?: SortOrder + name?: SortOrderInput | SortOrder + status?: SortOrder + lastLoginAt?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + _count?: UserCountOrderByAggregateInput + _max?: UserMaxOrderByAggregateInput + _min?: UserMinOrderByAggregateInput + } + + export type UserScalarWhereWithAggregatesInput = { + AND?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[] + OR?: UserScalarWhereWithAggregatesInput[] + NOT?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"User"> | string + mobile?: StringWithAggregatesFilter<"User"> | string + name?: StringNullableWithAggregatesFilter<"User"> | string | null + status?: EnumUserStatusWithAggregatesFilter<"User"> | $Enums.UserStatus + lastLoginAt?: DateTimeNullableWithAggregatesFilter<"User"> | Date | string | null + createdAt?: DateTimeWithAggregatesFilter<"User"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"User"> | Date | string + } + + export type OtpCodeWhereInput = { + AND?: OtpCodeWhereInput | OtpCodeWhereInput[] + OR?: OtpCodeWhereInput[] + NOT?: OtpCodeWhereInput | OtpCodeWhereInput[] + id?: StringFilter<"OtpCode"> | string + mobile?: StringFilter<"OtpCode"> | string + code?: StringFilter<"OtpCode"> | string + userId?: StringNullableFilter<"OtpCode"> | string | null + attempts?: IntFilter<"OtpCode"> | number + consumed?: BoolFilter<"OtpCode"> | boolean + expiresAt?: DateTimeFilter<"OtpCode"> | Date | string + createdAt?: DateTimeFilter<"OtpCode"> | Date | string + user?: XOR | null + } + + export type OtpCodeOrderByWithRelationInput = { + id?: SortOrder + mobile?: SortOrder + code?: SortOrder + userId?: SortOrderInput | SortOrder + attempts?: SortOrder + consumed?: SortOrder + expiresAt?: SortOrder + createdAt?: SortOrder + user?: UserOrderByWithRelationInput + } + + export type OtpCodeWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: OtpCodeWhereInput | OtpCodeWhereInput[] + OR?: OtpCodeWhereInput[] + NOT?: OtpCodeWhereInput | OtpCodeWhereInput[] + mobile?: StringFilter<"OtpCode"> | string + code?: StringFilter<"OtpCode"> | string + userId?: StringNullableFilter<"OtpCode"> | string | null + attempts?: IntFilter<"OtpCode"> | number + consumed?: BoolFilter<"OtpCode"> | boolean + expiresAt?: DateTimeFilter<"OtpCode"> | Date | string + createdAt?: DateTimeFilter<"OtpCode"> | Date | string + user?: XOR | null + }, "id"> + + export type OtpCodeOrderByWithAggregationInput = { + id?: SortOrder + mobile?: SortOrder + code?: SortOrder + userId?: SortOrderInput | SortOrder + attempts?: SortOrder + consumed?: SortOrder + expiresAt?: SortOrder + createdAt?: SortOrder + _count?: OtpCodeCountOrderByAggregateInput + _avg?: OtpCodeAvgOrderByAggregateInput + _max?: OtpCodeMaxOrderByAggregateInput + _min?: OtpCodeMinOrderByAggregateInput + _sum?: OtpCodeSumOrderByAggregateInput + } + + export type OtpCodeScalarWhereWithAggregatesInput = { + AND?: OtpCodeScalarWhereWithAggregatesInput | OtpCodeScalarWhereWithAggregatesInput[] + OR?: OtpCodeScalarWhereWithAggregatesInput[] + NOT?: OtpCodeScalarWhereWithAggregatesInput | OtpCodeScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"OtpCode"> | string + mobile?: StringWithAggregatesFilter<"OtpCode"> | string + code?: StringWithAggregatesFilter<"OtpCode"> | string + userId?: StringNullableWithAggregatesFilter<"OtpCode"> | string | null + attempts?: IntWithAggregatesFilter<"OtpCode"> | number + consumed?: BoolWithAggregatesFilter<"OtpCode"> | boolean + expiresAt?: DateTimeWithAggregatesFilter<"OtpCode"> | Date | string + createdAt?: DateTimeWithAggregatesFilter<"OtpCode"> | Date | string + } + + export type CampaignWhereInput = { + AND?: CampaignWhereInput | CampaignWhereInput[] + OR?: CampaignWhereInput[] + NOT?: CampaignWhereInput | CampaignWhereInput[] + id?: StringFilter<"Campaign"> | string + title?: StringFilter<"Campaign"> | string + slug?: StringFilter<"Campaign"> | string + description?: StringNullableFilter<"Campaign"> | string | null + image?: StringNullableFilter<"Campaign"> | string | null + banner?: StringNullableFilter<"Campaign"> | string | null + logo?: StringNullableFilter<"Campaign"> | string | null + startAt?: DateTimeFilter<"Campaign"> | Date | string + endAt?: DateTimeFilter<"Campaign"> | Date | string + status?: EnumCampaignStatusFilter<"Campaign"> | $Enums.CampaignStatus + defaultChances?: IntFilter<"Campaign"> | number + rules?: StringNullableFilter<"Campaign"> | string | null + ctaText?: StringNullableFilter<"Campaign"> | string | null + wheelDesign?: EnumWheelDesignFilter<"Campaign"> | $Enums.WheelDesign + settings?: JsonNullableFilter<"Campaign"> + createdAt?: DateTimeFilter<"Campaign"> | Date | string + updatedAt?: DateTimeFilter<"Campaign"> | Date | string + prizes?: PrizeListRelationFilter + userCampaigns?: UserCampaignListRelationFilter + chanceTxns?: ChanceTransactionListRelationFilter + spins?: SpinListRelationFilter + userPrizes?: UserPrizeListRelationFilter + } + + export type CampaignOrderByWithRelationInput = { + id?: SortOrder + title?: SortOrder + slug?: SortOrder + description?: SortOrderInput | SortOrder + image?: SortOrderInput | SortOrder + banner?: SortOrderInput | SortOrder + logo?: SortOrderInput | SortOrder + startAt?: SortOrder + endAt?: SortOrder + status?: SortOrder + defaultChances?: SortOrder + rules?: SortOrderInput | SortOrder + ctaText?: SortOrderInput | SortOrder + wheelDesign?: SortOrder + settings?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + prizes?: PrizeOrderByRelationAggregateInput + userCampaigns?: UserCampaignOrderByRelationAggregateInput + chanceTxns?: ChanceTransactionOrderByRelationAggregateInput + spins?: SpinOrderByRelationAggregateInput + userPrizes?: UserPrizeOrderByRelationAggregateInput + } + + export type CampaignWhereUniqueInput = Prisma.AtLeast<{ + id?: string + slug?: string + AND?: CampaignWhereInput | CampaignWhereInput[] + OR?: CampaignWhereInput[] + NOT?: CampaignWhereInput | CampaignWhereInput[] + title?: StringFilter<"Campaign"> | string + description?: StringNullableFilter<"Campaign"> | string | null + image?: StringNullableFilter<"Campaign"> | string | null + banner?: StringNullableFilter<"Campaign"> | string | null + logo?: StringNullableFilter<"Campaign"> | string | null + startAt?: DateTimeFilter<"Campaign"> | Date | string + endAt?: DateTimeFilter<"Campaign"> | Date | string + status?: EnumCampaignStatusFilter<"Campaign"> | $Enums.CampaignStatus + defaultChances?: IntFilter<"Campaign"> | number + rules?: StringNullableFilter<"Campaign"> | string | null + ctaText?: StringNullableFilter<"Campaign"> | string | null + wheelDesign?: EnumWheelDesignFilter<"Campaign"> | $Enums.WheelDesign + settings?: JsonNullableFilter<"Campaign"> + createdAt?: DateTimeFilter<"Campaign"> | Date | string + updatedAt?: DateTimeFilter<"Campaign"> | Date | string + prizes?: PrizeListRelationFilter + userCampaigns?: UserCampaignListRelationFilter + chanceTxns?: ChanceTransactionListRelationFilter + spins?: SpinListRelationFilter + userPrizes?: UserPrizeListRelationFilter + }, "id" | "slug"> + + export type CampaignOrderByWithAggregationInput = { + id?: SortOrder + title?: SortOrder + slug?: SortOrder + description?: SortOrderInput | SortOrder + image?: SortOrderInput | SortOrder + banner?: SortOrderInput | SortOrder + logo?: SortOrderInput | SortOrder + startAt?: SortOrder + endAt?: SortOrder + status?: SortOrder + defaultChances?: SortOrder + rules?: SortOrderInput | SortOrder + ctaText?: SortOrderInput | SortOrder + wheelDesign?: SortOrder + settings?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + _count?: CampaignCountOrderByAggregateInput + _avg?: CampaignAvgOrderByAggregateInput + _max?: CampaignMaxOrderByAggregateInput + _min?: CampaignMinOrderByAggregateInput + _sum?: CampaignSumOrderByAggregateInput + } + + export type CampaignScalarWhereWithAggregatesInput = { + AND?: CampaignScalarWhereWithAggregatesInput | CampaignScalarWhereWithAggregatesInput[] + OR?: CampaignScalarWhereWithAggregatesInput[] + NOT?: CampaignScalarWhereWithAggregatesInput | CampaignScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Campaign"> | string + title?: StringWithAggregatesFilter<"Campaign"> | string + slug?: StringWithAggregatesFilter<"Campaign"> | string + description?: StringNullableWithAggregatesFilter<"Campaign"> | string | null + image?: StringNullableWithAggregatesFilter<"Campaign"> | string | null + banner?: StringNullableWithAggregatesFilter<"Campaign"> | string | null + logo?: StringNullableWithAggregatesFilter<"Campaign"> | string | null + startAt?: DateTimeWithAggregatesFilter<"Campaign"> | Date | string + endAt?: DateTimeWithAggregatesFilter<"Campaign"> | Date | string + status?: EnumCampaignStatusWithAggregatesFilter<"Campaign"> | $Enums.CampaignStatus + defaultChances?: IntWithAggregatesFilter<"Campaign"> | number + rules?: StringNullableWithAggregatesFilter<"Campaign"> | string | null + ctaText?: StringNullableWithAggregatesFilter<"Campaign"> | string | null + wheelDesign?: EnumWheelDesignWithAggregatesFilter<"Campaign"> | $Enums.WheelDesign + settings?: JsonNullableWithAggregatesFilter<"Campaign"> + createdAt?: DateTimeWithAggregatesFilter<"Campaign"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"Campaign"> | Date | string + } + + export type PrizeWhereInput = { + AND?: PrizeWhereInput | PrizeWhereInput[] + OR?: PrizeWhereInput[] + NOT?: PrizeWhereInput | PrizeWhereInput[] + id?: StringFilter<"Prize"> | string + campaignId?: StringFilter<"Prize"> | string + title?: StringFilter<"Prize"> | string + description?: StringNullableFilter<"Prize"> | string | null + image?: StringNullableFilter<"Prize"> | string | null + type?: EnumPrizeTypeFilter<"Prize"> | $Enums.PrizeType + stockType?: EnumStockTypeFilter<"Prize"> | $Enums.StockType + initialStock?: IntNullableFilter<"Prize"> | number | null + remainingStock?: IntNullableFilter<"Prize"> | number | null + weight?: IntFilter<"Prize"> | number + status?: EnumPrizeStatusFilter<"Prize"> | $Enums.PrizeStatus + sortOrder?: IntFilter<"Prize"> | number + segmentColor?: StringFilter<"Prize"> | string + expiresAt?: DateTimeNullableFilter<"Prize"> | Date | string | null + smsTemplate?: StringNullableFilter<"Prize"> | string | null + createdAt?: DateTimeFilter<"Prize"> | Date | string + updatedAt?: DateTimeFilter<"Prize"> | Date | string + campaign?: XOR + spins?: SpinListRelationFilter + userPrizes?: UserPrizeListRelationFilter + } + + export type PrizeOrderByWithRelationInput = { + id?: SortOrder + campaignId?: SortOrder + title?: SortOrder + description?: SortOrderInput | SortOrder + image?: SortOrderInput | SortOrder + type?: SortOrder + stockType?: SortOrder + initialStock?: SortOrderInput | SortOrder + remainingStock?: SortOrderInput | SortOrder + weight?: SortOrder + status?: SortOrder + sortOrder?: SortOrder + segmentColor?: SortOrder + expiresAt?: SortOrderInput | SortOrder + smsTemplate?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + campaign?: CampaignOrderByWithRelationInput + spins?: SpinOrderByRelationAggregateInput + userPrizes?: UserPrizeOrderByRelationAggregateInput + } + + export type PrizeWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: PrizeWhereInput | PrizeWhereInput[] + OR?: PrizeWhereInput[] + NOT?: PrizeWhereInput | PrizeWhereInput[] + campaignId?: StringFilter<"Prize"> | string + title?: StringFilter<"Prize"> | string + description?: StringNullableFilter<"Prize"> | string | null + image?: StringNullableFilter<"Prize"> | string | null + type?: EnumPrizeTypeFilter<"Prize"> | $Enums.PrizeType + stockType?: EnumStockTypeFilter<"Prize"> | $Enums.StockType + initialStock?: IntNullableFilter<"Prize"> | number | null + remainingStock?: IntNullableFilter<"Prize"> | number | null + weight?: IntFilter<"Prize"> | number + status?: EnumPrizeStatusFilter<"Prize"> | $Enums.PrizeStatus + sortOrder?: IntFilter<"Prize"> | number + segmentColor?: StringFilter<"Prize"> | string + expiresAt?: DateTimeNullableFilter<"Prize"> | Date | string | null + smsTemplate?: StringNullableFilter<"Prize"> | string | null + createdAt?: DateTimeFilter<"Prize"> | Date | string + updatedAt?: DateTimeFilter<"Prize"> | Date | string + campaign?: XOR + spins?: SpinListRelationFilter + userPrizes?: UserPrizeListRelationFilter + }, "id"> + + export type PrizeOrderByWithAggregationInput = { + id?: SortOrder + campaignId?: SortOrder + title?: SortOrder + description?: SortOrderInput | SortOrder + image?: SortOrderInput | SortOrder + type?: SortOrder + stockType?: SortOrder + initialStock?: SortOrderInput | SortOrder + remainingStock?: SortOrderInput | SortOrder + weight?: SortOrder + status?: SortOrder + sortOrder?: SortOrder + segmentColor?: SortOrder + expiresAt?: SortOrderInput | SortOrder + smsTemplate?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + _count?: PrizeCountOrderByAggregateInput + _avg?: PrizeAvgOrderByAggregateInput + _max?: PrizeMaxOrderByAggregateInput + _min?: PrizeMinOrderByAggregateInput + _sum?: PrizeSumOrderByAggregateInput + } + + export type PrizeScalarWhereWithAggregatesInput = { + AND?: PrizeScalarWhereWithAggregatesInput | PrizeScalarWhereWithAggregatesInput[] + OR?: PrizeScalarWhereWithAggregatesInput[] + NOT?: PrizeScalarWhereWithAggregatesInput | PrizeScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Prize"> | string + campaignId?: StringWithAggregatesFilter<"Prize"> | string + title?: StringWithAggregatesFilter<"Prize"> | string + description?: StringNullableWithAggregatesFilter<"Prize"> | string | null + image?: StringNullableWithAggregatesFilter<"Prize"> | string | null + type?: EnumPrizeTypeWithAggregatesFilter<"Prize"> | $Enums.PrizeType + stockType?: EnumStockTypeWithAggregatesFilter<"Prize"> | $Enums.StockType + initialStock?: IntNullableWithAggregatesFilter<"Prize"> | number | null + remainingStock?: IntNullableWithAggregatesFilter<"Prize"> | number | null + weight?: IntWithAggregatesFilter<"Prize"> | number + status?: EnumPrizeStatusWithAggregatesFilter<"Prize"> | $Enums.PrizeStatus + sortOrder?: IntWithAggregatesFilter<"Prize"> | number + segmentColor?: StringWithAggregatesFilter<"Prize"> | string + expiresAt?: DateTimeNullableWithAggregatesFilter<"Prize"> | Date | string | null + smsTemplate?: StringNullableWithAggregatesFilter<"Prize"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"Prize"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"Prize"> | Date | string + } + + export type UserCampaignWhereInput = { + AND?: UserCampaignWhereInput | UserCampaignWhereInput[] + OR?: UserCampaignWhereInput[] + NOT?: UserCampaignWhereInput | UserCampaignWhereInput[] + id?: StringFilter<"UserCampaign"> | string + userId?: StringFilter<"UserCampaign"> | string + campaignId?: StringFilter<"UserCampaign"> | string + totalChances?: IntFilter<"UserCampaign"> | number + usedChances?: IntFilter<"UserCampaign"> | number + createdAt?: DateTimeFilter<"UserCampaign"> | Date | string + updatedAt?: DateTimeFilter<"UserCampaign"> | Date | string + user?: XOR + campaign?: XOR + } + + export type UserCampaignOrderByWithRelationInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + totalChances?: SortOrder + usedChances?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + user?: UserOrderByWithRelationInput + campaign?: CampaignOrderByWithRelationInput + } + + export type UserCampaignWhereUniqueInput = Prisma.AtLeast<{ + id?: string + userId_campaignId?: UserCampaignUserIdCampaignIdCompoundUniqueInput + AND?: UserCampaignWhereInput | UserCampaignWhereInput[] + OR?: UserCampaignWhereInput[] + NOT?: UserCampaignWhereInput | UserCampaignWhereInput[] + userId?: StringFilter<"UserCampaign"> | string + campaignId?: StringFilter<"UserCampaign"> | string + totalChances?: IntFilter<"UserCampaign"> | number + usedChances?: IntFilter<"UserCampaign"> | number + createdAt?: DateTimeFilter<"UserCampaign"> | Date | string + updatedAt?: DateTimeFilter<"UserCampaign"> | Date | string + user?: XOR + campaign?: XOR + }, "id" | "userId_campaignId"> + + export type UserCampaignOrderByWithAggregationInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + totalChances?: SortOrder + usedChances?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + _count?: UserCampaignCountOrderByAggregateInput + _avg?: UserCampaignAvgOrderByAggregateInput + _max?: UserCampaignMaxOrderByAggregateInput + _min?: UserCampaignMinOrderByAggregateInput + _sum?: UserCampaignSumOrderByAggregateInput + } + + export type UserCampaignScalarWhereWithAggregatesInput = { + AND?: UserCampaignScalarWhereWithAggregatesInput | UserCampaignScalarWhereWithAggregatesInput[] + OR?: UserCampaignScalarWhereWithAggregatesInput[] + NOT?: UserCampaignScalarWhereWithAggregatesInput | UserCampaignScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"UserCampaign"> | string + userId?: StringWithAggregatesFilter<"UserCampaign"> | string + campaignId?: StringWithAggregatesFilter<"UserCampaign"> | string + totalChances?: IntWithAggregatesFilter<"UserCampaign"> | number + usedChances?: IntWithAggregatesFilter<"UserCampaign"> | number + createdAt?: DateTimeWithAggregatesFilter<"UserCampaign"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"UserCampaign"> | Date | string + } + + export type ChanceTransactionWhereInput = { + AND?: ChanceTransactionWhereInput | ChanceTransactionWhereInput[] + OR?: ChanceTransactionWhereInput[] + NOT?: ChanceTransactionWhereInput | ChanceTransactionWhereInput[] + id?: StringFilter<"ChanceTransaction"> | string + userId?: StringFilter<"ChanceTransaction"> | string + campaignId?: StringFilter<"ChanceTransaction"> | string + amount?: IntFilter<"ChanceTransaction"> | number + type?: EnumChanceTxnTypeFilter<"ChanceTransaction"> | $Enums.ChanceTxnType + referenceType?: StringNullableFilter<"ChanceTransaction"> | string | null + referenceId?: StringNullableFilter<"ChanceTransaction"> | string | null + description?: StringNullableFilter<"ChanceTransaction"> | string | null + createdById?: StringNullableFilter<"ChanceTransaction"> | string | null + createdAt?: DateTimeFilter<"ChanceTransaction"> | Date | string + user?: XOR + campaign?: XOR + createdBy?: XOR | null + } + + export type ChanceTransactionOrderByWithRelationInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + amount?: SortOrder + type?: SortOrder + referenceType?: SortOrderInput | SortOrder + referenceId?: SortOrderInput | SortOrder + description?: SortOrderInput | SortOrder + createdById?: SortOrderInput | SortOrder + createdAt?: SortOrder + user?: UserOrderByWithRelationInput + campaign?: CampaignOrderByWithRelationInput + createdBy?: AdminOrderByWithRelationInput + } + + export type ChanceTransactionWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: ChanceTransactionWhereInput | ChanceTransactionWhereInput[] + OR?: ChanceTransactionWhereInput[] + NOT?: ChanceTransactionWhereInput | ChanceTransactionWhereInput[] + userId?: StringFilter<"ChanceTransaction"> | string + campaignId?: StringFilter<"ChanceTransaction"> | string + amount?: IntFilter<"ChanceTransaction"> | number + type?: EnumChanceTxnTypeFilter<"ChanceTransaction"> | $Enums.ChanceTxnType + referenceType?: StringNullableFilter<"ChanceTransaction"> | string | null + referenceId?: StringNullableFilter<"ChanceTransaction"> | string | null + description?: StringNullableFilter<"ChanceTransaction"> | string | null + createdById?: StringNullableFilter<"ChanceTransaction"> | string | null + createdAt?: DateTimeFilter<"ChanceTransaction"> | Date | string + user?: XOR + campaign?: XOR + createdBy?: XOR | null + }, "id"> + + export type ChanceTransactionOrderByWithAggregationInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + amount?: SortOrder + type?: SortOrder + referenceType?: SortOrderInput | SortOrder + referenceId?: SortOrderInput | SortOrder + description?: SortOrderInput | SortOrder + createdById?: SortOrderInput | SortOrder + createdAt?: SortOrder + _count?: ChanceTransactionCountOrderByAggregateInput + _avg?: ChanceTransactionAvgOrderByAggregateInput + _max?: ChanceTransactionMaxOrderByAggregateInput + _min?: ChanceTransactionMinOrderByAggregateInput + _sum?: ChanceTransactionSumOrderByAggregateInput + } + + export type ChanceTransactionScalarWhereWithAggregatesInput = { + AND?: ChanceTransactionScalarWhereWithAggregatesInput | ChanceTransactionScalarWhereWithAggregatesInput[] + OR?: ChanceTransactionScalarWhereWithAggregatesInput[] + NOT?: ChanceTransactionScalarWhereWithAggregatesInput | ChanceTransactionScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"ChanceTransaction"> | string + userId?: StringWithAggregatesFilter<"ChanceTransaction"> | string + campaignId?: StringWithAggregatesFilter<"ChanceTransaction"> | string + amount?: IntWithAggregatesFilter<"ChanceTransaction"> | number + type?: EnumChanceTxnTypeWithAggregatesFilter<"ChanceTransaction"> | $Enums.ChanceTxnType + referenceType?: StringNullableWithAggregatesFilter<"ChanceTransaction"> | string | null + referenceId?: StringNullableWithAggregatesFilter<"ChanceTransaction"> | string | null + description?: StringNullableWithAggregatesFilter<"ChanceTransaction"> | string | null + createdById?: StringNullableWithAggregatesFilter<"ChanceTransaction"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"ChanceTransaction"> | Date | string + } + + export type SpinWhereInput = { + AND?: SpinWhereInput | SpinWhereInput[] + OR?: SpinWhereInput[] + NOT?: SpinWhereInput | SpinWhereInput[] + id?: StringFilter<"Spin"> | string + userId?: StringFilter<"Spin"> | string + campaignId?: StringFilter<"Spin"> | string + prizeId?: StringNullableFilter<"Spin"> | string | null + status?: EnumSpinStatusFilter<"Spin"> | $Enums.SpinStatus + idempotencyKey?: StringFilter<"Spin"> | string + ip?: StringNullableFilter<"Spin"> | string | null + userAgent?: StringNullableFilter<"Spin"> | string | null + createdAt?: DateTimeFilter<"Spin"> | Date | string + user?: XOR + campaign?: XOR + prize?: XOR | null + userPrize?: XOR | null + } + + export type SpinOrderByWithRelationInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + prizeId?: SortOrderInput | SortOrder + status?: SortOrder + idempotencyKey?: SortOrder + ip?: SortOrderInput | SortOrder + userAgent?: SortOrderInput | SortOrder + createdAt?: SortOrder + user?: UserOrderByWithRelationInput + campaign?: CampaignOrderByWithRelationInput + prize?: PrizeOrderByWithRelationInput + userPrize?: UserPrizeOrderByWithRelationInput + } + + export type SpinWhereUniqueInput = Prisma.AtLeast<{ + id?: string + idempotencyKey?: string + AND?: SpinWhereInput | SpinWhereInput[] + OR?: SpinWhereInput[] + NOT?: SpinWhereInput | SpinWhereInput[] + userId?: StringFilter<"Spin"> | string + campaignId?: StringFilter<"Spin"> | string + prizeId?: StringNullableFilter<"Spin"> | string | null + status?: EnumSpinStatusFilter<"Spin"> | $Enums.SpinStatus + ip?: StringNullableFilter<"Spin"> | string | null + userAgent?: StringNullableFilter<"Spin"> | string | null + createdAt?: DateTimeFilter<"Spin"> | Date | string + user?: XOR + campaign?: XOR + prize?: XOR | null + userPrize?: XOR | null + }, "id" | "idempotencyKey"> + + export type SpinOrderByWithAggregationInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + prizeId?: SortOrderInput | SortOrder + status?: SortOrder + idempotencyKey?: SortOrder + ip?: SortOrderInput | SortOrder + userAgent?: SortOrderInput | SortOrder + createdAt?: SortOrder + _count?: SpinCountOrderByAggregateInput + _max?: SpinMaxOrderByAggregateInput + _min?: SpinMinOrderByAggregateInput + } + + export type SpinScalarWhereWithAggregatesInput = { + AND?: SpinScalarWhereWithAggregatesInput | SpinScalarWhereWithAggregatesInput[] + OR?: SpinScalarWhereWithAggregatesInput[] + NOT?: SpinScalarWhereWithAggregatesInput | SpinScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"Spin"> | string + userId?: StringWithAggregatesFilter<"Spin"> | string + campaignId?: StringWithAggregatesFilter<"Spin"> | string + prizeId?: StringNullableWithAggregatesFilter<"Spin"> | string | null + status?: EnumSpinStatusWithAggregatesFilter<"Spin"> | $Enums.SpinStatus + idempotencyKey?: StringWithAggregatesFilter<"Spin"> | string + ip?: StringNullableWithAggregatesFilter<"Spin"> | string | null + userAgent?: StringNullableWithAggregatesFilter<"Spin"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"Spin"> | Date | string + } + + export type UserPrizeWhereInput = { + AND?: UserPrizeWhereInput | UserPrizeWhereInput[] + OR?: UserPrizeWhereInput[] + NOT?: UserPrizeWhereInput | UserPrizeWhereInput[] + id?: StringFilter<"UserPrize"> | string + userId?: StringFilter<"UserPrize"> | string + campaignId?: StringFilter<"UserPrize"> | string + prizeId?: StringFilter<"UserPrize"> | string + spinId?: StringFilter<"UserPrize"> | string + code?: StringNullableFilter<"UserPrize"> | string | null + status?: EnumUserPrizeStatusFilter<"UserPrize"> | $Enums.UserPrizeStatus + wonAt?: DateTimeFilter<"UserPrize"> | Date | string + redeemedAt?: DateTimeNullableFilter<"UserPrize"> | Date | string | null + user?: XOR + campaign?: XOR + prize?: XOR + spin?: XOR + } + + export type UserPrizeOrderByWithRelationInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + prizeId?: SortOrder + spinId?: SortOrder + code?: SortOrderInput | SortOrder + status?: SortOrder + wonAt?: SortOrder + redeemedAt?: SortOrderInput | SortOrder + user?: UserOrderByWithRelationInput + campaign?: CampaignOrderByWithRelationInput + prize?: PrizeOrderByWithRelationInput + spin?: SpinOrderByWithRelationInput + } + + export type UserPrizeWhereUniqueInput = Prisma.AtLeast<{ + id?: string + spinId?: string + code?: string + AND?: UserPrizeWhereInput | UserPrizeWhereInput[] + OR?: UserPrizeWhereInput[] + NOT?: UserPrizeWhereInput | UserPrizeWhereInput[] + userId?: StringFilter<"UserPrize"> | string + campaignId?: StringFilter<"UserPrize"> | string + prizeId?: StringFilter<"UserPrize"> | string + status?: EnumUserPrizeStatusFilter<"UserPrize"> | $Enums.UserPrizeStatus + wonAt?: DateTimeFilter<"UserPrize"> | Date | string + redeemedAt?: DateTimeNullableFilter<"UserPrize"> | Date | string | null + user?: XOR + campaign?: XOR + prize?: XOR + spin?: XOR + }, "id" | "spinId" | "code"> + + export type UserPrizeOrderByWithAggregationInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + prizeId?: SortOrder + spinId?: SortOrder + code?: SortOrderInput | SortOrder + status?: SortOrder + wonAt?: SortOrder + redeemedAt?: SortOrderInput | SortOrder + _count?: UserPrizeCountOrderByAggregateInput + _max?: UserPrizeMaxOrderByAggregateInput + _min?: UserPrizeMinOrderByAggregateInput + } + + export type UserPrizeScalarWhereWithAggregatesInput = { + AND?: UserPrizeScalarWhereWithAggregatesInput | UserPrizeScalarWhereWithAggregatesInput[] + OR?: UserPrizeScalarWhereWithAggregatesInput[] + NOT?: UserPrizeScalarWhereWithAggregatesInput | UserPrizeScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"UserPrize"> | string + userId?: StringWithAggregatesFilter<"UserPrize"> | string + campaignId?: StringWithAggregatesFilter<"UserPrize"> | string + prizeId?: StringWithAggregatesFilter<"UserPrize"> | string + spinId?: StringWithAggregatesFilter<"UserPrize"> | string + code?: StringNullableWithAggregatesFilter<"UserPrize"> | string | null + status?: EnumUserPrizeStatusWithAggregatesFilter<"UserPrize"> | $Enums.UserPrizeStatus + wonAt?: DateTimeWithAggregatesFilter<"UserPrize"> | Date | string + redeemedAt?: DateTimeNullableWithAggregatesFilter<"UserPrize"> | Date | string | null + } + + export type SmsLogWhereInput = { + AND?: SmsLogWhereInput | SmsLogWhereInput[] + OR?: SmsLogWhereInput[] + NOT?: SmsLogWhereInput | SmsLogWhereInput[] + id?: StringFilter<"SmsLog"> | string + userId?: StringNullableFilter<"SmsLog"> | string | null + mobile?: StringFilter<"SmsLog"> | string + type?: EnumSmsTypeFilter<"SmsLog"> | $Enums.SmsType + message?: StringFilter<"SmsLog"> | string + provider?: StringFilter<"SmsLog"> | string + status?: EnumSmsStatusFilter<"SmsLog"> | $Enums.SmsStatus + providerResponse?: JsonNullableFilter<"SmsLog"> + createdAt?: DateTimeFilter<"SmsLog"> | Date | string + user?: XOR | null + } + + export type SmsLogOrderByWithRelationInput = { + id?: SortOrder + userId?: SortOrderInput | SortOrder + mobile?: SortOrder + type?: SortOrder + message?: SortOrder + provider?: SortOrder + status?: SortOrder + providerResponse?: SortOrderInput | SortOrder + createdAt?: SortOrder + user?: UserOrderByWithRelationInput + } + + export type SmsLogWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: SmsLogWhereInput | SmsLogWhereInput[] + OR?: SmsLogWhereInput[] + NOT?: SmsLogWhereInput | SmsLogWhereInput[] + userId?: StringNullableFilter<"SmsLog"> | string | null + mobile?: StringFilter<"SmsLog"> | string + type?: EnumSmsTypeFilter<"SmsLog"> | $Enums.SmsType + message?: StringFilter<"SmsLog"> | string + provider?: StringFilter<"SmsLog"> | string + status?: EnumSmsStatusFilter<"SmsLog"> | $Enums.SmsStatus + providerResponse?: JsonNullableFilter<"SmsLog"> + createdAt?: DateTimeFilter<"SmsLog"> | Date | string + user?: XOR | null + }, "id"> + + export type SmsLogOrderByWithAggregationInput = { + id?: SortOrder + userId?: SortOrderInput | SortOrder + mobile?: SortOrder + type?: SortOrder + message?: SortOrder + provider?: SortOrder + status?: SortOrder + providerResponse?: SortOrderInput | SortOrder + createdAt?: SortOrder + _count?: SmsLogCountOrderByAggregateInput + _max?: SmsLogMaxOrderByAggregateInput + _min?: SmsLogMinOrderByAggregateInput + } + + export type SmsLogScalarWhereWithAggregatesInput = { + AND?: SmsLogScalarWhereWithAggregatesInput | SmsLogScalarWhereWithAggregatesInput[] + OR?: SmsLogScalarWhereWithAggregatesInput[] + NOT?: SmsLogScalarWhereWithAggregatesInput | SmsLogScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"SmsLog"> | string + userId?: StringNullableWithAggregatesFilter<"SmsLog"> | string | null + mobile?: StringWithAggregatesFilter<"SmsLog"> | string + type?: EnumSmsTypeWithAggregatesFilter<"SmsLog"> | $Enums.SmsType + message?: StringWithAggregatesFilter<"SmsLog"> | string + provider?: StringWithAggregatesFilter<"SmsLog"> | string + status?: EnumSmsStatusWithAggregatesFilter<"SmsLog"> | $Enums.SmsStatus + providerResponse?: JsonNullableWithAggregatesFilter<"SmsLog"> + createdAt?: DateTimeWithAggregatesFilter<"SmsLog"> | Date | string + } + + export type AdminLogWhereInput = { + AND?: AdminLogWhereInput | AdminLogWhereInput[] + OR?: AdminLogWhereInput[] + NOT?: AdminLogWhereInput | AdminLogWhereInput[] + id?: StringFilter<"AdminLog"> | string + adminId?: StringFilter<"AdminLog"> | string + action?: StringFilter<"AdminLog"> | string + entityType?: StringFilter<"AdminLog"> | string + entityId?: StringFilter<"AdminLog"> | string + oldValue?: JsonNullableFilter<"AdminLog"> + newValue?: JsonNullableFilter<"AdminLog"> + ip?: StringNullableFilter<"AdminLog"> | string | null + createdAt?: DateTimeFilter<"AdminLog"> | Date | string + admin?: XOR + } + + export type AdminLogOrderByWithRelationInput = { + id?: SortOrder + adminId?: SortOrder + action?: SortOrder + entityType?: SortOrder + entityId?: SortOrder + oldValue?: SortOrderInput | SortOrder + newValue?: SortOrderInput | SortOrder + ip?: SortOrderInput | SortOrder + createdAt?: SortOrder + admin?: AdminOrderByWithRelationInput + } + + export type AdminLogWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: AdminLogWhereInput | AdminLogWhereInput[] + OR?: AdminLogWhereInput[] + NOT?: AdminLogWhereInput | AdminLogWhereInput[] + adminId?: StringFilter<"AdminLog"> | string + action?: StringFilter<"AdminLog"> | string + entityType?: StringFilter<"AdminLog"> | string + entityId?: StringFilter<"AdminLog"> | string + oldValue?: JsonNullableFilter<"AdminLog"> + newValue?: JsonNullableFilter<"AdminLog"> + ip?: StringNullableFilter<"AdminLog"> | string | null + createdAt?: DateTimeFilter<"AdminLog"> | Date | string + admin?: XOR + }, "id"> + + export type AdminLogOrderByWithAggregationInput = { + id?: SortOrder + adminId?: SortOrder + action?: SortOrder + entityType?: SortOrder + entityId?: SortOrder + oldValue?: SortOrderInput | SortOrder + newValue?: SortOrderInput | SortOrder + ip?: SortOrderInput | SortOrder + createdAt?: SortOrder + _count?: AdminLogCountOrderByAggregateInput + _max?: AdminLogMaxOrderByAggregateInput + _min?: AdminLogMinOrderByAggregateInput + } + + export type AdminLogScalarWhereWithAggregatesInput = { + AND?: AdminLogScalarWhereWithAggregatesInput | AdminLogScalarWhereWithAggregatesInput[] + OR?: AdminLogScalarWhereWithAggregatesInput[] + NOT?: AdminLogScalarWhereWithAggregatesInput | AdminLogScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"AdminLog"> | string + adminId?: StringWithAggregatesFilter<"AdminLog"> | string + action?: StringWithAggregatesFilter<"AdminLog"> | string + entityType?: StringWithAggregatesFilter<"AdminLog"> | string + entityId?: StringWithAggregatesFilter<"AdminLog"> | string + oldValue?: JsonNullableWithAggregatesFilter<"AdminLog"> + newValue?: JsonNullableWithAggregatesFilter<"AdminLog"> + ip?: StringNullableWithAggregatesFilter<"AdminLog"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"AdminLog"> | Date | string + } + + export type AdminCreateInput = { + id?: string + name: string + mobile: string + email: string + passwordHash: string + role?: $Enums.AdminRole + status?: $Enums.AdminStatus + createdAt?: Date | string + updatedAt?: Date | string + auditLogs?: AdminLogCreateNestedManyWithoutAdminInput + chanceTxns?: ChanceTransactionCreateNestedManyWithoutCreatedByInput + } + + export type AdminUncheckedCreateInput = { + id?: string + name: string + mobile: string + email: string + passwordHash: string + role?: $Enums.AdminRole + status?: $Enums.AdminStatus + createdAt?: Date | string + updatedAt?: Date | string + auditLogs?: AdminLogUncheckedCreateNestedManyWithoutAdminInput + chanceTxns?: ChanceTransactionUncheckedCreateNestedManyWithoutCreatedByInput + } + + export type AdminUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + status?: EnumAdminStatusFieldUpdateOperationsInput | $Enums.AdminStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + auditLogs?: AdminLogUpdateManyWithoutAdminNestedInput + chanceTxns?: ChanceTransactionUpdateManyWithoutCreatedByNestedInput + } + + export type AdminUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + status?: EnumAdminStatusFieldUpdateOperationsInput | $Enums.AdminStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + auditLogs?: AdminLogUncheckedUpdateManyWithoutAdminNestedInput + chanceTxns?: ChanceTransactionUncheckedUpdateManyWithoutCreatedByNestedInput + } + + export type AdminCreateManyInput = { + id?: string + name: string + mobile: string + email: string + passwordHash: string + role?: $Enums.AdminRole + status?: $Enums.AdminStatus + createdAt?: Date | string + updatedAt?: Date | string + } + + export type AdminUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + status?: EnumAdminStatusFieldUpdateOperationsInput | $Enums.AdminStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AdminUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + status?: EnumAdminStatusFieldUpdateOperationsInput | $Enums.AdminStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type UserCreateInput = { + id?: string + mobile: string + name?: string | null + status?: $Enums.UserStatus + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + userCampaigns?: UserCampaignCreateNestedManyWithoutUserInput + chanceTransactions?: ChanceTransactionCreateNestedManyWithoutUserInput + spins?: SpinCreateNestedManyWithoutUserInput + userPrizes?: UserPrizeCreateNestedManyWithoutUserInput + otpCodes?: OtpCodeCreateNestedManyWithoutUserInput + smsLogs?: SmsLogCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateInput = { + id?: string + mobile: string + name?: string | null + status?: $Enums.UserStatus + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutUserInput + chanceTransactions?: ChanceTransactionUncheckedCreateNestedManyWithoutUserInput + spins?: SpinUncheckedCreateNestedManyWithoutUserInput + userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutUserInput + otpCodes?: OtpCodeUncheckedCreateNestedManyWithoutUserInput + smsLogs?: SmsLogUncheckedCreateNestedManyWithoutUserInput + } + + export type UserUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + userCampaigns?: UserCampaignUpdateManyWithoutUserNestedInput + chanceTransactions?: ChanceTransactionUpdateManyWithoutUserNestedInput + spins?: SpinUpdateManyWithoutUserNestedInput + userPrizes?: UserPrizeUpdateManyWithoutUserNestedInput + otpCodes?: OtpCodeUpdateManyWithoutUserNestedInput + smsLogs?: SmsLogUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + userCampaigns?: UserCampaignUncheckedUpdateManyWithoutUserNestedInput + chanceTransactions?: ChanceTransactionUncheckedUpdateManyWithoutUserNestedInput + spins?: SpinUncheckedUpdateManyWithoutUserNestedInput + userPrizes?: UserPrizeUncheckedUpdateManyWithoutUserNestedInput + otpCodes?: OtpCodeUncheckedUpdateManyWithoutUserNestedInput + smsLogs?: SmsLogUncheckedUpdateManyWithoutUserNestedInput + } + + export type UserCreateManyInput = { + id?: string + mobile: string + name?: string | null + status?: $Enums.UserStatus + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type UserUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type UserUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type OtpCodeCreateInput = { + id?: string + mobile: string + code: string + attempts?: number + consumed?: boolean + expiresAt: Date | string + createdAt?: Date | string + user?: UserCreateNestedOneWithoutOtpCodesInput + } + + export type OtpCodeUncheckedCreateInput = { + id?: string + mobile: string + code: string + userId?: string | null + attempts?: number + consumed?: boolean + expiresAt: Date | string + createdAt?: Date | string + } + + export type OtpCodeUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + attempts?: IntFieldUpdateOperationsInput | number + consumed?: BoolFieldUpdateOperationsInput | boolean + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneWithoutOtpCodesNestedInput + } + + export type OtpCodeUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + userId?: NullableStringFieldUpdateOperationsInput | string | null + attempts?: IntFieldUpdateOperationsInput | number + consumed?: BoolFieldUpdateOperationsInput | boolean + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type OtpCodeCreateManyInput = { + id?: string + mobile: string + code: string + userId?: string | null + attempts?: number + consumed?: boolean + expiresAt: Date | string + createdAt?: Date | string + } + + export type OtpCodeUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + attempts?: IntFieldUpdateOperationsInput | number + consumed?: BoolFieldUpdateOperationsInput | boolean + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type OtpCodeUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + userId?: NullableStringFieldUpdateOperationsInput | string | null + attempts?: IntFieldUpdateOperationsInput | number + consumed?: BoolFieldUpdateOperationsInput | boolean + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CampaignCreateInput = { + id?: string + title: string + slug: string + description?: string | null + image?: string | null + banner?: string | null + logo?: string | null + startAt: Date | string + endAt: Date | string + status?: $Enums.CampaignStatus + defaultChances?: number + rules?: string | null + ctaText?: string | null + wheelDesign?: $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string + prizes?: PrizeCreateNestedManyWithoutCampaignInput + userCampaigns?: UserCampaignCreateNestedManyWithoutCampaignInput + chanceTxns?: ChanceTransactionCreateNestedManyWithoutCampaignInput + spins?: SpinCreateNestedManyWithoutCampaignInput + userPrizes?: UserPrizeCreateNestedManyWithoutCampaignInput + } + + export type CampaignUncheckedCreateInput = { + id?: string + title: string + slug: string + description?: string | null + image?: string | null + banner?: string | null + logo?: string | null + startAt: Date | string + endAt: Date | string + status?: $Enums.CampaignStatus + defaultChances?: number + rules?: string | null + ctaText?: string | null + wheelDesign?: $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string + prizes?: PrizeUncheckedCreateNestedManyWithoutCampaignInput + userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutCampaignInput + chanceTxns?: ChanceTransactionUncheckedCreateNestedManyWithoutCampaignInput + spins?: SpinUncheckedCreateNestedManyWithoutCampaignInput + userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutCampaignInput + } + + export type CampaignUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + slug?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + banner?: NullableStringFieldUpdateOperationsInput | string | null + logo?: NullableStringFieldUpdateOperationsInput | string | null + startAt?: DateTimeFieldUpdateOperationsInput | Date | string + endAt?: DateTimeFieldUpdateOperationsInput | Date | string + status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus + defaultChances?: IntFieldUpdateOperationsInput | number + rules?: NullableStringFieldUpdateOperationsInput | string | null + ctaText?: NullableStringFieldUpdateOperationsInput | string | null + wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + prizes?: PrizeUpdateManyWithoutCampaignNestedInput + userCampaigns?: UserCampaignUpdateManyWithoutCampaignNestedInput + chanceTxns?: ChanceTransactionUpdateManyWithoutCampaignNestedInput + spins?: SpinUpdateManyWithoutCampaignNestedInput + userPrizes?: UserPrizeUpdateManyWithoutCampaignNestedInput + } + + export type CampaignUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + slug?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + banner?: NullableStringFieldUpdateOperationsInput | string | null + logo?: NullableStringFieldUpdateOperationsInput | string | null + startAt?: DateTimeFieldUpdateOperationsInput | Date | string + endAt?: DateTimeFieldUpdateOperationsInput | Date | string + status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus + defaultChances?: IntFieldUpdateOperationsInput | number + rules?: NullableStringFieldUpdateOperationsInput | string | null + ctaText?: NullableStringFieldUpdateOperationsInput | string | null + wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + prizes?: PrizeUncheckedUpdateManyWithoutCampaignNestedInput + userCampaigns?: UserCampaignUncheckedUpdateManyWithoutCampaignNestedInput + chanceTxns?: ChanceTransactionUncheckedUpdateManyWithoutCampaignNestedInput + spins?: SpinUncheckedUpdateManyWithoutCampaignNestedInput + userPrizes?: UserPrizeUncheckedUpdateManyWithoutCampaignNestedInput + } + + export type CampaignCreateManyInput = { + id?: string + title: string + slug: string + description?: string | null + image?: string | null + banner?: string | null + logo?: string | null + startAt: Date | string + endAt: Date | string + status?: $Enums.CampaignStatus + defaultChances?: number + rules?: string | null + ctaText?: string | null + wheelDesign?: $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string + } + + export type CampaignUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + slug?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + banner?: NullableStringFieldUpdateOperationsInput | string | null + logo?: NullableStringFieldUpdateOperationsInput | string | null + startAt?: DateTimeFieldUpdateOperationsInput | Date | string + endAt?: DateTimeFieldUpdateOperationsInput | Date | string + status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus + defaultChances?: IntFieldUpdateOperationsInput | number + rules?: NullableStringFieldUpdateOperationsInput | string | null + ctaText?: NullableStringFieldUpdateOperationsInput | string | null + wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CampaignUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + slug?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + banner?: NullableStringFieldUpdateOperationsInput | string | null + logo?: NullableStringFieldUpdateOperationsInput | string | null + startAt?: DateTimeFieldUpdateOperationsInput | Date | string + endAt?: DateTimeFieldUpdateOperationsInput | Date | string + status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus + defaultChances?: IntFieldUpdateOperationsInput | number + rules?: NullableStringFieldUpdateOperationsInput | string | null + ctaText?: NullableStringFieldUpdateOperationsInput | string | null + wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PrizeCreateInput = { + id?: string + title: string + description?: string | null + image?: string | null + type: $Enums.PrizeType + stockType: $Enums.StockType + initialStock?: number | null + remainingStock?: number | null + weight: number + status?: $Enums.PrizeStatus + sortOrder?: number + segmentColor: string + expiresAt?: Date | string | null + smsTemplate?: string | null + createdAt?: Date | string + updatedAt?: Date | string + campaign: CampaignCreateNestedOneWithoutPrizesInput + spins?: SpinCreateNestedManyWithoutPrizeInput + userPrizes?: UserPrizeCreateNestedManyWithoutPrizeInput + } + + export type PrizeUncheckedCreateInput = { + id?: string + campaignId: string + title: string + description?: string | null + image?: string | null + type: $Enums.PrizeType + stockType: $Enums.StockType + initialStock?: number | null + remainingStock?: number | null + weight: number + status?: $Enums.PrizeStatus + sortOrder?: number + segmentColor: string + expiresAt?: Date | string | null + smsTemplate?: string | null + createdAt?: Date | string + updatedAt?: Date | string + spins?: SpinUncheckedCreateNestedManyWithoutPrizeInput + userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutPrizeInput + } + + export type PrizeUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType + stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType + initialStock?: NullableIntFieldUpdateOperationsInput | number | null + remainingStock?: NullableIntFieldUpdateOperationsInput | number | null + weight?: IntFieldUpdateOperationsInput | number + status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus + sortOrder?: IntFieldUpdateOperationsInput | number + segmentColor?: StringFieldUpdateOperationsInput | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + campaign?: CampaignUpdateOneRequiredWithoutPrizesNestedInput + spins?: SpinUpdateManyWithoutPrizeNestedInput + userPrizes?: UserPrizeUpdateManyWithoutPrizeNestedInput + } + + export type PrizeUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType + stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType + initialStock?: NullableIntFieldUpdateOperationsInput | number | null + remainingStock?: NullableIntFieldUpdateOperationsInput | number | null + weight?: IntFieldUpdateOperationsInput | number + status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus + sortOrder?: IntFieldUpdateOperationsInput | number + segmentColor?: StringFieldUpdateOperationsInput | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + spins?: SpinUncheckedUpdateManyWithoutPrizeNestedInput + userPrizes?: UserPrizeUncheckedUpdateManyWithoutPrizeNestedInput + } + + export type PrizeCreateManyInput = { + id?: string + campaignId: string + title: string + description?: string | null + image?: string | null + type: $Enums.PrizeType + stockType: $Enums.StockType + initialStock?: number | null + remainingStock?: number | null + weight: number + status?: $Enums.PrizeStatus + sortOrder?: number + segmentColor: string + expiresAt?: Date | string | null + smsTemplate?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type PrizeUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType + stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType + initialStock?: NullableIntFieldUpdateOperationsInput | number | null + remainingStock?: NullableIntFieldUpdateOperationsInput | number | null + weight?: IntFieldUpdateOperationsInput | number + status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus + sortOrder?: IntFieldUpdateOperationsInput | number + segmentColor?: StringFieldUpdateOperationsInput | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PrizeUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType + stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType + initialStock?: NullableIntFieldUpdateOperationsInput | number | null + remainingStock?: NullableIntFieldUpdateOperationsInput | number | null + weight?: IntFieldUpdateOperationsInput | number + status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus + sortOrder?: IntFieldUpdateOperationsInput | number + segmentColor?: StringFieldUpdateOperationsInput | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type UserCampaignCreateInput = { + id?: string + totalChances?: number + usedChances?: number + createdAt?: Date | string + updatedAt?: Date | string + user: UserCreateNestedOneWithoutUserCampaignsInput + campaign: CampaignCreateNestedOneWithoutUserCampaignsInput + } + + export type UserCampaignUncheckedCreateInput = { + id?: string + userId: string + campaignId: string + totalChances?: number + usedChances?: number + createdAt?: Date | string + updatedAt?: Date | string + } + + export type UserCampaignUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + totalChances?: IntFieldUpdateOperationsInput | number + usedChances?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutUserCampaignsNestedInput + campaign?: CampaignUpdateOneRequiredWithoutUserCampaignsNestedInput + } + + export type UserCampaignUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + totalChances?: IntFieldUpdateOperationsInput | number + usedChances?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type UserCampaignCreateManyInput = { + id?: string + userId: string + campaignId: string + totalChances?: number + usedChances?: number + createdAt?: Date | string + updatedAt?: Date | string + } + + export type UserCampaignUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + totalChances?: IntFieldUpdateOperationsInput | number + usedChances?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type UserCampaignUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + totalChances?: IntFieldUpdateOperationsInput | number + usedChances?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type ChanceTransactionCreateInput = { + id?: string + amount: number + type: $Enums.ChanceTxnType + referenceType?: string | null + referenceId?: string | null + description?: string | null + createdAt?: Date | string + user: UserCreateNestedOneWithoutChanceTransactionsInput + campaign: CampaignCreateNestedOneWithoutChanceTxnsInput + createdBy?: AdminCreateNestedOneWithoutChanceTxnsInput + } + + export type ChanceTransactionUncheckedCreateInput = { + id?: string + userId: string + campaignId: string + amount: number + type: $Enums.ChanceTxnType + referenceType?: string | null + referenceId?: string | null + description?: string | null + createdById?: string | null + createdAt?: Date | string + } + + export type ChanceTransactionUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType + referenceType?: NullableStringFieldUpdateOperationsInput | string | null + referenceId?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutChanceTransactionsNestedInput + campaign?: CampaignUpdateOneRequiredWithoutChanceTxnsNestedInput + createdBy?: AdminUpdateOneWithoutChanceTxnsNestedInput + } + + export type ChanceTransactionUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType + referenceType?: NullableStringFieldUpdateOperationsInput | string | null + referenceId?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdById?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type ChanceTransactionCreateManyInput = { + id?: string + userId: string + campaignId: string + amount: number + type: $Enums.ChanceTxnType + referenceType?: string | null + referenceId?: string | null + description?: string | null + createdById?: string | null + createdAt?: Date | string + } + + export type ChanceTransactionUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType + referenceType?: NullableStringFieldUpdateOperationsInput | string | null + referenceId?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type ChanceTransactionUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType + referenceType?: NullableStringFieldUpdateOperationsInput | string | null + referenceId?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdById?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SpinCreateInput = { + id?: string + status?: $Enums.SpinStatus + idempotencyKey: string + ip?: string | null + userAgent?: string | null + createdAt?: Date | string + user: UserCreateNestedOneWithoutSpinsInput + campaign: CampaignCreateNestedOneWithoutSpinsInput + prize?: PrizeCreateNestedOneWithoutSpinsInput + userPrize?: UserPrizeCreateNestedOneWithoutSpinInput + } + + export type SpinUncheckedCreateInput = { + id?: string + userId: string + campaignId: string + prizeId?: string | null + status?: $Enums.SpinStatus + idempotencyKey: string + ip?: string | null + userAgent?: string | null + createdAt?: Date | string + userPrize?: UserPrizeUncheckedCreateNestedOneWithoutSpinInput + } + + export type SpinUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus + idempotencyKey?: StringFieldUpdateOperationsInput | string + ip?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutSpinsNestedInput + campaign?: CampaignUpdateOneRequiredWithoutSpinsNestedInput + prize?: PrizeUpdateOneWithoutSpinsNestedInput + userPrize?: UserPrizeUpdateOneWithoutSpinNestedInput + } + + export type SpinUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + prizeId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus + idempotencyKey?: StringFieldUpdateOperationsInput | string + ip?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + userPrize?: UserPrizeUncheckedUpdateOneWithoutSpinNestedInput + } + + export type SpinCreateManyInput = { + id?: string + userId: string + campaignId: string + prizeId?: string | null + status?: $Enums.SpinStatus + idempotencyKey: string + ip?: string | null + userAgent?: string | null + createdAt?: Date | string + } + + export type SpinUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus + idempotencyKey?: StringFieldUpdateOperationsInput | string + ip?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SpinUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + prizeId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus + idempotencyKey?: StringFieldUpdateOperationsInput | string + ip?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type UserPrizeCreateInput = { + id?: string + code?: string | null + status?: $Enums.UserPrizeStatus + wonAt?: Date | string + redeemedAt?: Date | string | null + user: UserCreateNestedOneWithoutUserPrizesInput + campaign: CampaignCreateNestedOneWithoutUserPrizesInput + prize: PrizeCreateNestedOneWithoutUserPrizesInput + spin: SpinCreateNestedOneWithoutUserPrizeInput + } + + export type UserPrizeUncheckedCreateInput = { + id?: string + userId: string + campaignId: string + prizeId: string + spinId: string + code?: string | null + status?: $Enums.UserPrizeStatus + wonAt?: Date | string + redeemedAt?: Date | string | null + } + + export type UserPrizeUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + code?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus + wonAt?: DateTimeFieldUpdateOperationsInput | Date | string + redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + user?: UserUpdateOneRequiredWithoutUserPrizesNestedInput + campaign?: CampaignUpdateOneRequiredWithoutUserPrizesNestedInput + prize?: PrizeUpdateOneRequiredWithoutUserPrizesNestedInput + spin?: SpinUpdateOneRequiredWithoutUserPrizeNestedInput + } + + export type UserPrizeUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + prizeId?: StringFieldUpdateOperationsInput | string + spinId?: StringFieldUpdateOperationsInput | string + code?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus + wonAt?: DateTimeFieldUpdateOperationsInput | Date | string + redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type UserPrizeCreateManyInput = { + id?: string + userId: string + campaignId: string + prizeId: string + spinId: string + code?: string | null + status?: $Enums.UserPrizeStatus + wonAt?: Date | string + redeemedAt?: Date | string | null + } + + export type UserPrizeUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + code?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus + wonAt?: DateTimeFieldUpdateOperationsInput | Date | string + redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type UserPrizeUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + prizeId?: StringFieldUpdateOperationsInput | string + spinId?: StringFieldUpdateOperationsInput | string + code?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus + wonAt?: DateTimeFieldUpdateOperationsInput | Date | string + redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type SmsLogCreateInput = { + id?: string + mobile: string + type: $Enums.SmsType + message: string + provider?: string + status?: $Enums.SmsStatus + providerResponse?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + user?: UserCreateNestedOneWithoutSmsLogsInput + } + + export type SmsLogUncheckedCreateInput = { + id?: string + userId?: string | null + mobile: string + type: $Enums.SmsType + message: string + provider?: string + status?: $Enums.SmsStatus + providerResponse?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + } + + export type SmsLogUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + type?: EnumSmsTypeFieldUpdateOperationsInput | $Enums.SmsType + message?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + status?: EnumSmsStatusFieldUpdateOperationsInput | $Enums.SmsStatus + providerResponse?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneWithoutSmsLogsNestedInput + } + + export type SmsLogUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + type?: EnumSmsTypeFieldUpdateOperationsInput | $Enums.SmsType + message?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + status?: EnumSmsStatusFieldUpdateOperationsInput | $Enums.SmsStatus + providerResponse?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SmsLogCreateManyInput = { + id?: string + userId?: string | null + mobile: string + type: $Enums.SmsType + message: string + provider?: string + status?: $Enums.SmsStatus + providerResponse?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + } + + export type SmsLogUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + type?: EnumSmsTypeFieldUpdateOperationsInput | $Enums.SmsType + message?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + status?: EnumSmsStatusFieldUpdateOperationsInput | $Enums.SmsStatus + providerResponse?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SmsLogUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + type?: EnumSmsTypeFieldUpdateOperationsInput | $Enums.SmsType + message?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + status?: EnumSmsStatusFieldUpdateOperationsInput | $Enums.SmsStatus + providerResponse?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AdminLogCreateInput = { + id?: string + action: string + entityType: string + entityId: string + oldValue?: NullableJsonNullValueInput | InputJsonValue + newValue?: NullableJsonNullValueInput | InputJsonValue + ip?: string | null + createdAt?: Date | string + admin: AdminCreateNestedOneWithoutAuditLogsInput + } + + export type AdminLogUncheckedCreateInput = { + id?: string + adminId: string + action: string + entityType: string + entityId: string + oldValue?: NullableJsonNullValueInput | InputJsonValue + newValue?: NullableJsonNullValueInput | InputJsonValue + ip?: string | null + createdAt?: Date | string + } + + export type AdminLogUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + action?: StringFieldUpdateOperationsInput | string + entityType?: StringFieldUpdateOperationsInput | string + entityId?: StringFieldUpdateOperationsInput | string + oldValue?: NullableJsonNullValueInput | InputJsonValue + newValue?: NullableJsonNullValueInput | InputJsonValue + ip?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + admin?: AdminUpdateOneRequiredWithoutAuditLogsNestedInput + } + + export type AdminLogUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + adminId?: StringFieldUpdateOperationsInput | string + action?: StringFieldUpdateOperationsInput | string + entityType?: StringFieldUpdateOperationsInput | string + entityId?: StringFieldUpdateOperationsInput | string + oldValue?: NullableJsonNullValueInput | InputJsonValue + newValue?: NullableJsonNullValueInput | InputJsonValue + ip?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AdminLogCreateManyInput = { + id?: string + adminId: string + action: string + entityType: string + entityId: string + oldValue?: NullableJsonNullValueInput | InputJsonValue + newValue?: NullableJsonNullValueInput | InputJsonValue + ip?: string | null + createdAt?: Date | string + } + + export type AdminLogUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + action?: StringFieldUpdateOperationsInput | string + entityType?: StringFieldUpdateOperationsInput | string + entityId?: StringFieldUpdateOperationsInput | string + oldValue?: NullableJsonNullValueInput | InputJsonValue + newValue?: NullableJsonNullValueInput | InputJsonValue + ip?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AdminLogUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + adminId?: StringFieldUpdateOperationsInput | string + action?: StringFieldUpdateOperationsInput | string + entityType?: StringFieldUpdateOperationsInput | string + entityId?: StringFieldUpdateOperationsInput | string + oldValue?: NullableJsonNullValueInput | InputJsonValue + newValue?: NullableJsonNullValueInput | InputJsonValue + ip?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type StringFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + mode?: QueryMode + not?: NestedStringFilter<$PrismaModel> | string + } + + export type EnumAdminRoleFilter<$PrismaModel = never> = { + equals?: $Enums.AdminRole | EnumAdminRoleFieldRefInput<$PrismaModel> + in?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel> + notIn?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel> + not?: NestedEnumAdminRoleFilter<$PrismaModel> | $Enums.AdminRole + } + + export type EnumAdminStatusFilter<$PrismaModel = never> = { + equals?: $Enums.AdminStatus | EnumAdminStatusFieldRefInput<$PrismaModel> + in?: $Enums.AdminStatus[] | ListEnumAdminStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.AdminStatus[] | ListEnumAdminStatusFieldRefInput<$PrismaModel> + not?: NestedEnumAdminStatusFilter<$PrismaModel> | $Enums.AdminStatus + } + + export type DateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeFilter<$PrismaModel> | Date | string + } + + export type AdminLogListRelationFilter = { + every?: AdminLogWhereInput + some?: AdminLogWhereInput + none?: AdminLogWhereInput + } + + export type ChanceTransactionListRelationFilter = { + every?: ChanceTransactionWhereInput + some?: ChanceTransactionWhereInput + none?: ChanceTransactionWhereInput + } + + export type AdminLogOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type ChanceTransactionOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type AdminCountOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + mobile?: SortOrder + email?: SortOrder + passwordHash?: SortOrder + role?: SortOrder + status?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type AdminMaxOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + mobile?: SortOrder + email?: SortOrder + passwordHash?: SortOrder + role?: SortOrder + status?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type AdminMinOrderByAggregateInput = { + id?: SortOrder + name?: SortOrder + mobile?: SortOrder + email?: SortOrder + passwordHash?: SortOrder + role?: SortOrder + status?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type StringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + mode?: QueryMode + not?: NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedStringFilter<$PrismaModel> + _max?: NestedStringFilter<$PrismaModel> + } + + export type EnumAdminRoleWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.AdminRole | EnumAdminRoleFieldRefInput<$PrismaModel> + in?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel> + notIn?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel> + not?: NestedEnumAdminRoleWithAggregatesFilter<$PrismaModel> | $Enums.AdminRole + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumAdminRoleFilter<$PrismaModel> + _max?: NestedEnumAdminRoleFilter<$PrismaModel> + } + + export type EnumAdminStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.AdminStatus | EnumAdminStatusFieldRefInput<$PrismaModel> + in?: $Enums.AdminStatus[] | ListEnumAdminStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.AdminStatus[] | ListEnumAdminStatusFieldRefInput<$PrismaModel> + not?: NestedEnumAdminStatusWithAggregatesFilter<$PrismaModel> | $Enums.AdminStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumAdminStatusFilter<$PrismaModel> + _max?: NestedEnumAdminStatusFilter<$PrismaModel> + } + + export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedDateTimeFilter<$PrismaModel> + _max?: NestedDateTimeFilter<$PrismaModel> + } + + export type StringNullableFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + mode?: QueryMode + not?: NestedStringNullableFilter<$PrismaModel> | string | null + } + + export type EnumUserStatusFilter<$PrismaModel = never> = { + equals?: $Enums.UserStatus | EnumUserStatusFieldRefInput<$PrismaModel> + in?: $Enums.UserStatus[] | ListEnumUserStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.UserStatus[] | ListEnumUserStatusFieldRefInput<$PrismaModel> + not?: NestedEnumUserStatusFilter<$PrismaModel> | $Enums.UserStatus + } + + export type DateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null + } + + export type UserCampaignListRelationFilter = { + every?: UserCampaignWhereInput + some?: UserCampaignWhereInput + none?: UserCampaignWhereInput + } + + export type SpinListRelationFilter = { + every?: SpinWhereInput + some?: SpinWhereInput + none?: SpinWhereInput + } + + export type UserPrizeListRelationFilter = { + every?: UserPrizeWhereInput + some?: UserPrizeWhereInput + none?: UserPrizeWhereInput + } + + export type OtpCodeListRelationFilter = { + every?: OtpCodeWhereInput + some?: OtpCodeWhereInput + none?: OtpCodeWhereInput + } + + export type SmsLogListRelationFilter = { + every?: SmsLogWhereInput + some?: SmsLogWhereInput + none?: SmsLogWhereInput + } + + export type SortOrderInput = { + sort: SortOrder + nulls?: NullsOrder + } + + export type UserCampaignOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type SpinOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type UserPrizeOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type OtpCodeOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type SmsLogOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type UserCountOrderByAggregateInput = { + id?: SortOrder + mobile?: SortOrder + name?: SortOrder + status?: SortOrder + lastLoginAt?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type UserMaxOrderByAggregateInput = { + id?: SortOrder + mobile?: SortOrder + name?: SortOrder + status?: SortOrder + lastLoginAt?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type UserMinOrderByAggregateInput = { + id?: SortOrder + mobile?: SortOrder + name?: SortOrder + status?: SortOrder + lastLoginAt?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + mode?: QueryMode + not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedStringNullableFilter<$PrismaModel> + _max?: NestedStringNullableFilter<$PrismaModel> + } + + export type EnumUserStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.UserStatus | EnumUserStatusFieldRefInput<$PrismaModel> + in?: $Enums.UserStatus[] | ListEnumUserStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.UserStatus[] | ListEnumUserStatusFieldRefInput<$PrismaModel> + not?: NestedEnumUserStatusWithAggregatesFilter<$PrismaModel> | $Enums.UserStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumUserStatusFilter<$PrismaModel> + _max?: NestedEnumUserStatusFilter<$PrismaModel> + } + + export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedDateTimeNullableFilter<$PrismaModel> + _max?: NestedDateTimeNullableFilter<$PrismaModel> + } + + export type IntFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntFilter<$PrismaModel> | number + } + + export type BoolFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolFilter<$PrismaModel> | boolean + } + + export type UserNullableRelationFilter = { + is?: UserWhereInput | null + isNot?: UserWhereInput | null + } + + export type OtpCodeCountOrderByAggregateInput = { + id?: SortOrder + mobile?: SortOrder + code?: SortOrder + userId?: SortOrder + attempts?: SortOrder + consumed?: SortOrder + expiresAt?: SortOrder + createdAt?: SortOrder + } + + export type OtpCodeAvgOrderByAggregateInput = { + attempts?: SortOrder + } + + export type OtpCodeMaxOrderByAggregateInput = { + id?: SortOrder + mobile?: SortOrder + code?: SortOrder + userId?: SortOrder + attempts?: SortOrder + consumed?: SortOrder + expiresAt?: SortOrder + createdAt?: SortOrder + } + + export type OtpCodeMinOrderByAggregateInput = { + id?: SortOrder + mobile?: SortOrder + code?: SortOrder + userId?: SortOrder + attempts?: SortOrder + consumed?: SortOrder + expiresAt?: SortOrder + createdAt?: SortOrder + } + + export type OtpCodeSumOrderByAggregateInput = { + attempts?: SortOrder + } + + export type IntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedIntFilter<$PrismaModel> + _min?: NestedIntFilter<$PrismaModel> + _max?: NestedIntFilter<$PrismaModel> + } + + export type BoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedBoolFilter<$PrismaModel> + _max?: NestedBoolFilter<$PrismaModel> + } + + export type EnumCampaignStatusFilter<$PrismaModel = never> = { + equals?: $Enums.CampaignStatus | EnumCampaignStatusFieldRefInput<$PrismaModel> + in?: $Enums.CampaignStatus[] | ListEnumCampaignStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.CampaignStatus[] | ListEnumCampaignStatusFieldRefInput<$PrismaModel> + not?: NestedEnumCampaignStatusFilter<$PrismaModel> | $Enums.CampaignStatus + } + + export type EnumWheelDesignFilter<$PrismaModel = never> = { + equals?: $Enums.WheelDesign | EnumWheelDesignFieldRefInput<$PrismaModel> + in?: $Enums.WheelDesign[] | ListEnumWheelDesignFieldRefInput<$PrismaModel> + notIn?: $Enums.WheelDesign[] | ListEnumWheelDesignFieldRefInput<$PrismaModel> + not?: NestedEnumWheelDesignFilter<$PrismaModel> | $Enums.WheelDesign + } + export type JsonNullableFilter<$PrismaModel = never> = + | PatchUndefined< + Either>, Exclude>, 'path'>>, + Required> + > + | OptionalFlat>, 'path'>> + + export type JsonNullableFilterBase<$PrismaModel = never> = { + equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + path?: string[] + string_contains?: string | StringFieldRefInput<$PrismaModel> + string_starts_with?: string | StringFieldRefInput<$PrismaModel> + string_ends_with?: string | StringFieldRefInput<$PrismaModel> + array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + } + + export type PrizeListRelationFilter = { + every?: PrizeWhereInput + some?: PrizeWhereInput + none?: PrizeWhereInput + } + + export type PrizeOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type CampaignCountOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + slug?: SortOrder + description?: SortOrder + image?: SortOrder + banner?: SortOrder + logo?: SortOrder + startAt?: SortOrder + endAt?: SortOrder + status?: SortOrder + defaultChances?: SortOrder + rules?: SortOrder + ctaText?: SortOrder + wheelDesign?: SortOrder + settings?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type CampaignAvgOrderByAggregateInput = { + defaultChances?: SortOrder + } + + export type CampaignMaxOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + slug?: SortOrder + description?: SortOrder + image?: SortOrder + banner?: SortOrder + logo?: SortOrder + startAt?: SortOrder + endAt?: SortOrder + status?: SortOrder + defaultChances?: SortOrder + rules?: SortOrder + ctaText?: SortOrder + wheelDesign?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type CampaignMinOrderByAggregateInput = { + id?: SortOrder + title?: SortOrder + slug?: SortOrder + description?: SortOrder + image?: SortOrder + banner?: SortOrder + logo?: SortOrder + startAt?: SortOrder + endAt?: SortOrder + status?: SortOrder + defaultChances?: SortOrder + rules?: SortOrder + ctaText?: SortOrder + wheelDesign?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type CampaignSumOrderByAggregateInput = { + defaultChances?: SortOrder + } + + export type EnumCampaignStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.CampaignStatus | EnumCampaignStatusFieldRefInput<$PrismaModel> + in?: $Enums.CampaignStatus[] | ListEnumCampaignStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.CampaignStatus[] | ListEnumCampaignStatusFieldRefInput<$PrismaModel> + not?: NestedEnumCampaignStatusWithAggregatesFilter<$PrismaModel> | $Enums.CampaignStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumCampaignStatusFilter<$PrismaModel> + _max?: NestedEnumCampaignStatusFilter<$PrismaModel> + } + + export type EnumWheelDesignWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.WheelDesign | EnumWheelDesignFieldRefInput<$PrismaModel> + in?: $Enums.WheelDesign[] | ListEnumWheelDesignFieldRefInput<$PrismaModel> + notIn?: $Enums.WheelDesign[] | ListEnumWheelDesignFieldRefInput<$PrismaModel> + not?: NestedEnumWheelDesignWithAggregatesFilter<$PrismaModel> | $Enums.WheelDesign + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumWheelDesignFilter<$PrismaModel> + _max?: NestedEnumWheelDesignFilter<$PrismaModel> + } + export type JsonNullableWithAggregatesFilter<$PrismaModel = never> = + | PatchUndefined< + Either>, Exclude>, 'path'>>, + Required> + > + | OptionalFlat>, 'path'>> + + export type JsonNullableWithAggregatesFilterBase<$PrismaModel = never> = { + equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + path?: string[] + string_contains?: string | StringFieldRefInput<$PrismaModel> + string_starts_with?: string | StringFieldRefInput<$PrismaModel> + string_ends_with?: string | StringFieldRefInput<$PrismaModel> + array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedJsonNullableFilter<$PrismaModel> + _max?: NestedJsonNullableFilter<$PrismaModel> + } + + export type EnumPrizeTypeFilter<$PrismaModel = never> = { + equals?: $Enums.PrizeType | EnumPrizeTypeFieldRefInput<$PrismaModel> + in?: $Enums.PrizeType[] | ListEnumPrizeTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.PrizeType[] | ListEnumPrizeTypeFieldRefInput<$PrismaModel> + not?: NestedEnumPrizeTypeFilter<$PrismaModel> | $Enums.PrizeType + } + + export type EnumStockTypeFilter<$PrismaModel = never> = { + equals?: $Enums.StockType | EnumStockTypeFieldRefInput<$PrismaModel> + in?: $Enums.StockType[] | ListEnumStockTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.StockType[] | ListEnumStockTypeFieldRefInput<$PrismaModel> + not?: NestedEnumStockTypeFilter<$PrismaModel> | $Enums.StockType + } + + export type IntNullableFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableFilter<$PrismaModel> | number | null + } + + export type EnumPrizeStatusFilter<$PrismaModel = never> = { + equals?: $Enums.PrizeStatus | EnumPrizeStatusFieldRefInput<$PrismaModel> + in?: $Enums.PrizeStatus[] | ListEnumPrizeStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.PrizeStatus[] | ListEnumPrizeStatusFieldRefInput<$PrismaModel> + not?: NestedEnumPrizeStatusFilter<$PrismaModel> | $Enums.PrizeStatus + } + + export type CampaignRelationFilter = { + is?: CampaignWhereInput + isNot?: CampaignWhereInput + } + + export type PrizeCountOrderByAggregateInput = { + id?: SortOrder + campaignId?: SortOrder + title?: SortOrder + description?: SortOrder + image?: SortOrder + type?: SortOrder + stockType?: SortOrder + initialStock?: SortOrder + remainingStock?: SortOrder + weight?: SortOrder + status?: SortOrder + sortOrder?: SortOrder + segmentColor?: SortOrder + expiresAt?: SortOrder + smsTemplate?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type PrizeAvgOrderByAggregateInput = { + initialStock?: SortOrder + remainingStock?: SortOrder + weight?: SortOrder + sortOrder?: SortOrder + } + + export type PrizeMaxOrderByAggregateInput = { + id?: SortOrder + campaignId?: SortOrder + title?: SortOrder + description?: SortOrder + image?: SortOrder + type?: SortOrder + stockType?: SortOrder + initialStock?: SortOrder + remainingStock?: SortOrder + weight?: SortOrder + status?: SortOrder + sortOrder?: SortOrder + segmentColor?: SortOrder + expiresAt?: SortOrder + smsTemplate?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type PrizeMinOrderByAggregateInput = { + id?: SortOrder + campaignId?: SortOrder + title?: SortOrder + description?: SortOrder + image?: SortOrder + type?: SortOrder + stockType?: SortOrder + initialStock?: SortOrder + remainingStock?: SortOrder + weight?: SortOrder + status?: SortOrder + sortOrder?: SortOrder + segmentColor?: SortOrder + expiresAt?: SortOrder + smsTemplate?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type PrizeSumOrderByAggregateInput = { + initialStock?: SortOrder + remainingStock?: SortOrder + weight?: SortOrder + sortOrder?: SortOrder + } + + export type EnumPrizeTypeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.PrizeType | EnumPrizeTypeFieldRefInput<$PrismaModel> + in?: $Enums.PrizeType[] | ListEnumPrizeTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.PrizeType[] | ListEnumPrizeTypeFieldRefInput<$PrismaModel> + not?: NestedEnumPrizeTypeWithAggregatesFilter<$PrismaModel> | $Enums.PrizeType + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumPrizeTypeFilter<$PrismaModel> + _max?: NestedEnumPrizeTypeFilter<$PrismaModel> + } + + export type EnumStockTypeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.StockType | EnumStockTypeFieldRefInput<$PrismaModel> + in?: $Enums.StockType[] | ListEnumStockTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.StockType[] | ListEnumStockTypeFieldRefInput<$PrismaModel> + not?: NestedEnumStockTypeWithAggregatesFilter<$PrismaModel> | $Enums.StockType + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumStockTypeFilter<$PrismaModel> + _max?: NestedEnumStockTypeFilter<$PrismaModel> + } + + export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null + _count?: NestedIntNullableFilter<$PrismaModel> + _avg?: NestedFloatNullableFilter<$PrismaModel> + _sum?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedIntNullableFilter<$PrismaModel> + _max?: NestedIntNullableFilter<$PrismaModel> + } + + export type EnumPrizeStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.PrizeStatus | EnumPrizeStatusFieldRefInput<$PrismaModel> + in?: $Enums.PrizeStatus[] | ListEnumPrizeStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.PrizeStatus[] | ListEnumPrizeStatusFieldRefInput<$PrismaModel> + not?: NestedEnumPrizeStatusWithAggregatesFilter<$PrismaModel> | $Enums.PrizeStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumPrizeStatusFilter<$PrismaModel> + _max?: NestedEnumPrizeStatusFilter<$PrismaModel> + } + + export type UserRelationFilter = { + is?: UserWhereInput + isNot?: UserWhereInput + } + + export type UserCampaignUserIdCampaignIdCompoundUniqueInput = { + userId: string + campaignId: string + } + + export type UserCampaignCountOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + totalChances?: SortOrder + usedChances?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type UserCampaignAvgOrderByAggregateInput = { + totalChances?: SortOrder + usedChances?: SortOrder + } + + export type UserCampaignMaxOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + totalChances?: SortOrder + usedChances?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type UserCampaignMinOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + totalChances?: SortOrder + usedChances?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type UserCampaignSumOrderByAggregateInput = { + totalChances?: SortOrder + usedChances?: SortOrder + } + + export type EnumChanceTxnTypeFilter<$PrismaModel = never> = { + equals?: $Enums.ChanceTxnType | EnumChanceTxnTypeFieldRefInput<$PrismaModel> + in?: $Enums.ChanceTxnType[] | ListEnumChanceTxnTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.ChanceTxnType[] | ListEnumChanceTxnTypeFieldRefInput<$PrismaModel> + not?: NestedEnumChanceTxnTypeFilter<$PrismaModel> | $Enums.ChanceTxnType + } + + export type AdminNullableRelationFilter = { + is?: AdminWhereInput | null + isNot?: AdminWhereInput | null + } + + export type ChanceTransactionCountOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + amount?: SortOrder + type?: SortOrder + referenceType?: SortOrder + referenceId?: SortOrder + description?: SortOrder + createdById?: SortOrder + createdAt?: SortOrder + } + + export type ChanceTransactionAvgOrderByAggregateInput = { + amount?: SortOrder + } + + export type ChanceTransactionMaxOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + amount?: SortOrder + type?: SortOrder + referenceType?: SortOrder + referenceId?: SortOrder + description?: SortOrder + createdById?: SortOrder + createdAt?: SortOrder + } + + export type ChanceTransactionMinOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + amount?: SortOrder + type?: SortOrder + referenceType?: SortOrder + referenceId?: SortOrder + description?: SortOrder + createdById?: SortOrder + createdAt?: SortOrder + } + + export type ChanceTransactionSumOrderByAggregateInput = { + amount?: SortOrder + } + + export type EnumChanceTxnTypeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.ChanceTxnType | EnumChanceTxnTypeFieldRefInput<$PrismaModel> + in?: $Enums.ChanceTxnType[] | ListEnumChanceTxnTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.ChanceTxnType[] | ListEnumChanceTxnTypeFieldRefInput<$PrismaModel> + not?: NestedEnumChanceTxnTypeWithAggregatesFilter<$PrismaModel> | $Enums.ChanceTxnType + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumChanceTxnTypeFilter<$PrismaModel> + _max?: NestedEnumChanceTxnTypeFilter<$PrismaModel> + } + + export type EnumSpinStatusFilter<$PrismaModel = never> = { + equals?: $Enums.SpinStatus | EnumSpinStatusFieldRefInput<$PrismaModel> + in?: $Enums.SpinStatus[] | ListEnumSpinStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.SpinStatus[] | ListEnumSpinStatusFieldRefInput<$PrismaModel> + not?: NestedEnumSpinStatusFilter<$PrismaModel> | $Enums.SpinStatus + } + + export type PrizeNullableRelationFilter = { + is?: PrizeWhereInput | null + isNot?: PrizeWhereInput | null + } + + export type UserPrizeNullableRelationFilter = { + is?: UserPrizeWhereInput | null + isNot?: UserPrizeWhereInput | null + } + + export type SpinCountOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + prizeId?: SortOrder + status?: SortOrder + idempotencyKey?: SortOrder + ip?: SortOrder + userAgent?: SortOrder + createdAt?: SortOrder + } + + export type SpinMaxOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + prizeId?: SortOrder + status?: SortOrder + idempotencyKey?: SortOrder + ip?: SortOrder + userAgent?: SortOrder + createdAt?: SortOrder + } + + export type SpinMinOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + prizeId?: SortOrder + status?: SortOrder + idempotencyKey?: SortOrder + ip?: SortOrder + userAgent?: SortOrder + createdAt?: SortOrder + } + + export type EnumSpinStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.SpinStatus | EnumSpinStatusFieldRefInput<$PrismaModel> + in?: $Enums.SpinStatus[] | ListEnumSpinStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.SpinStatus[] | ListEnumSpinStatusFieldRefInput<$PrismaModel> + not?: NestedEnumSpinStatusWithAggregatesFilter<$PrismaModel> | $Enums.SpinStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumSpinStatusFilter<$PrismaModel> + _max?: NestedEnumSpinStatusFilter<$PrismaModel> + } + + export type EnumUserPrizeStatusFilter<$PrismaModel = never> = { + equals?: $Enums.UserPrizeStatus | EnumUserPrizeStatusFieldRefInput<$PrismaModel> + in?: $Enums.UserPrizeStatus[] | ListEnumUserPrizeStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.UserPrizeStatus[] | ListEnumUserPrizeStatusFieldRefInput<$PrismaModel> + not?: NestedEnumUserPrizeStatusFilter<$PrismaModel> | $Enums.UserPrizeStatus + } + + export type PrizeRelationFilter = { + is?: PrizeWhereInput + isNot?: PrizeWhereInput + } + + export type SpinRelationFilter = { + is?: SpinWhereInput + isNot?: SpinWhereInput + } + + export type UserPrizeCountOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + prizeId?: SortOrder + spinId?: SortOrder + code?: SortOrder + status?: SortOrder + wonAt?: SortOrder + redeemedAt?: SortOrder + } + + export type UserPrizeMaxOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + prizeId?: SortOrder + spinId?: SortOrder + code?: SortOrder + status?: SortOrder + wonAt?: SortOrder + redeemedAt?: SortOrder + } + + export type UserPrizeMinOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + campaignId?: SortOrder + prizeId?: SortOrder + spinId?: SortOrder + code?: SortOrder + status?: SortOrder + wonAt?: SortOrder + redeemedAt?: SortOrder + } + + export type EnumUserPrizeStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.UserPrizeStatus | EnumUserPrizeStatusFieldRefInput<$PrismaModel> + in?: $Enums.UserPrizeStatus[] | ListEnumUserPrizeStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.UserPrizeStatus[] | ListEnumUserPrizeStatusFieldRefInput<$PrismaModel> + not?: NestedEnumUserPrizeStatusWithAggregatesFilter<$PrismaModel> | $Enums.UserPrizeStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumUserPrizeStatusFilter<$PrismaModel> + _max?: NestedEnumUserPrizeStatusFilter<$PrismaModel> + } + + export type EnumSmsTypeFilter<$PrismaModel = never> = { + equals?: $Enums.SmsType | EnumSmsTypeFieldRefInput<$PrismaModel> + in?: $Enums.SmsType[] | ListEnumSmsTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.SmsType[] | ListEnumSmsTypeFieldRefInput<$PrismaModel> + not?: NestedEnumSmsTypeFilter<$PrismaModel> | $Enums.SmsType + } + + export type EnumSmsStatusFilter<$PrismaModel = never> = { + equals?: $Enums.SmsStatus | EnumSmsStatusFieldRefInput<$PrismaModel> + in?: $Enums.SmsStatus[] | ListEnumSmsStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.SmsStatus[] | ListEnumSmsStatusFieldRefInput<$PrismaModel> + not?: NestedEnumSmsStatusFilter<$PrismaModel> | $Enums.SmsStatus + } + + export type SmsLogCountOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + mobile?: SortOrder + type?: SortOrder + message?: SortOrder + provider?: SortOrder + status?: SortOrder + providerResponse?: SortOrder + createdAt?: SortOrder + } + + export type SmsLogMaxOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + mobile?: SortOrder + type?: SortOrder + message?: SortOrder + provider?: SortOrder + status?: SortOrder + createdAt?: SortOrder + } + + export type SmsLogMinOrderByAggregateInput = { + id?: SortOrder + userId?: SortOrder + mobile?: SortOrder + type?: SortOrder + message?: SortOrder + provider?: SortOrder + status?: SortOrder + createdAt?: SortOrder + } + + export type EnumSmsTypeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.SmsType | EnumSmsTypeFieldRefInput<$PrismaModel> + in?: $Enums.SmsType[] | ListEnumSmsTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.SmsType[] | ListEnumSmsTypeFieldRefInput<$PrismaModel> + not?: NestedEnumSmsTypeWithAggregatesFilter<$PrismaModel> | $Enums.SmsType + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumSmsTypeFilter<$PrismaModel> + _max?: NestedEnumSmsTypeFilter<$PrismaModel> + } + + export type EnumSmsStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.SmsStatus | EnumSmsStatusFieldRefInput<$PrismaModel> + in?: $Enums.SmsStatus[] | ListEnumSmsStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.SmsStatus[] | ListEnumSmsStatusFieldRefInput<$PrismaModel> + not?: NestedEnumSmsStatusWithAggregatesFilter<$PrismaModel> | $Enums.SmsStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumSmsStatusFilter<$PrismaModel> + _max?: NestedEnumSmsStatusFilter<$PrismaModel> + } + + export type AdminRelationFilter = { + is?: AdminWhereInput + isNot?: AdminWhereInput + } + + export type AdminLogCountOrderByAggregateInput = { + id?: SortOrder + adminId?: SortOrder + action?: SortOrder + entityType?: SortOrder + entityId?: SortOrder + oldValue?: SortOrder + newValue?: SortOrder + ip?: SortOrder + createdAt?: SortOrder + } + + export type AdminLogMaxOrderByAggregateInput = { + id?: SortOrder + adminId?: SortOrder + action?: SortOrder + entityType?: SortOrder + entityId?: SortOrder + ip?: SortOrder + createdAt?: SortOrder + } + + export type AdminLogMinOrderByAggregateInput = { + id?: SortOrder + adminId?: SortOrder + action?: SortOrder + entityType?: SortOrder + entityId?: SortOrder + ip?: SortOrder + createdAt?: SortOrder + } + + export type AdminLogCreateNestedManyWithoutAdminInput = { + create?: XOR | AdminLogCreateWithoutAdminInput[] | AdminLogUncheckedCreateWithoutAdminInput[] + connectOrCreate?: AdminLogCreateOrConnectWithoutAdminInput | AdminLogCreateOrConnectWithoutAdminInput[] + createMany?: AdminLogCreateManyAdminInputEnvelope + connect?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[] + } + + export type ChanceTransactionCreateNestedManyWithoutCreatedByInput = { + create?: XOR | ChanceTransactionCreateWithoutCreatedByInput[] | ChanceTransactionUncheckedCreateWithoutCreatedByInput[] + connectOrCreate?: ChanceTransactionCreateOrConnectWithoutCreatedByInput | ChanceTransactionCreateOrConnectWithoutCreatedByInput[] + createMany?: ChanceTransactionCreateManyCreatedByInputEnvelope + connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + } + + export type AdminLogUncheckedCreateNestedManyWithoutAdminInput = { + create?: XOR | AdminLogCreateWithoutAdminInput[] | AdminLogUncheckedCreateWithoutAdminInput[] + connectOrCreate?: AdminLogCreateOrConnectWithoutAdminInput | AdminLogCreateOrConnectWithoutAdminInput[] + createMany?: AdminLogCreateManyAdminInputEnvelope + connect?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[] + } + + export type ChanceTransactionUncheckedCreateNestedManyWithoutCreatedByInput = { + create?: XOR | ChanceTransactionCreateWithoutCreatedByInput[] | ChanceTransactionUncheckedCreateWithoutCreatedByInput[] + connectOrCreate?: ChanceTransactionCreateOrConnectWithoutCreatedByInput | ChanceTransactionCreateOrConnectWithoutCreatedByInput[] + createMany?: ChanceTransactionCreateManyCreatedByInputEnvelope + connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + } + + export type StringFieldUpdateOperationsInput = { + set?: string + } + + export type EnumAdminRoleFieldUpdateOperationsInput = { + set?: $Enums.AdminRole + } + + export type EnumAdminStatusFieldUpdateOperationsInput = { + set?: $Enums.AdminStatus + } + + export type DateTimeFieldUpdateOperationsInput = { + set?: Date | string + } + + export type AdminLogUpdateManyWithoutAdminNestedInput = { + create?: XOR | AdminLogCreateWithoutAdminInput[] | AdminLogUncheckedCreateWithoutAdminInput[] + connectOrCreate?: AdminLogCreateOrConnectWithoutAdminInput | AdminLogCreateOrConnectWithoutAdminInput[] + upsert?: AdminLogUpsertWithWhereUniqueWithoutAdminInput | AdminLogUpsertWithWhereUniqueWithoutAdminInput[] + createMany?: AdminLogCreateManyAdminInputEnvelope + set?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[] + disconnect?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[] + delete?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[] + connect?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[] + update?: AdminLogUpdateWithWhereUniqueWithoutAdminInput | AdminLogUpdateWithWhereUniqueWithoutAdminInput[] + updateMany?: AdminLogUpdateManyWithWhereWithoutAdminInput | AdminLogUpdateManyWithWhereWithoutAdminInput[] + deleteMany?: AdminLogScalarWhereInput | AdminLogScalarWhereInput[] + } + + export type ChanceTransactionUpdateManyWithoutCreatedByNestedInput = { + create?: XOR | ChanceTransactionCreateWithoutCreatedByInput[] | ChanceTransactionUncheckedCreateWithoutCreatedByInput[] + connectOrCreate?: ChanceTransactionCreateOrConnectWithoutCreatedByInput | ChanceTransactionCreateOrConnectWithoutCreatedByInput[] + upsert?: ChanceTransactionUpsertWithWhereUniqueWithoutCreatedByInput | ChanceTransactionUpsertWithWhereUniqueWithoutCreatedByInput[] + createMany?: ChanceTransactionCreateManyCreatedByInputEnvelope + set?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + disconnect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + delete?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + update?: ChanceTransactionUpdateWithWhereUniqueWithoutCreatedByInput | ChanceTransactionUpdateWithWhereUniqueWithoutCreatedByInput[] + updateMany?: ChanceTransactionUpdateManyWithWhereWithoutCreatedByInput | ChanceTransactionUpdateManyWithWhereWithoutCreatedByInput[] + deleteMany?: ChanceTransactionScalarWhereInput | ChanceTransactionScalarWhereInput[] + } + + export type AdminLogUncheckedUpdateManyWithoutAdminNestedInput = { + create?: XOR | AdminLogCreateWithoutAdminInput[] | AdminLogUncheckedCreateWithoutAdminInput[] + connectOrCreate?: AdminLogCreateOrConnectWithoutAdminInput | AdminLogCreateOrConnectWithoutAdminInput[] + upsert?: AdminLogUpsertWithWhereUniqueWithoutAdminInput | AdminLogUpsertWithWhereUniqueWithoutAdminInput[] + createMany?: AdminLogCreateManyAdminInputEnvelope + set?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[] + disconnect?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[] + delete?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[] + connect?: AdminLogWhereUniqueInput | AdminLogWhereUniqueInput[] + update?: AdminLogUpdateWithWhereUniqueWithoutAdminInput | AdminLogUpdateWithWhereUniqueWithoutAdminInput[] + updateMany?: AdminLogUpdateManyWithWhereWithoutAdminInput | AdminLogUpdateManyWithWhereWithoutAdminInput[] + deleteMany?: AdminLogScalarWhereInput | AdminLogScalarWhereInput[] + } + + export type ChanceTransactionUncheckedUpdateManyWithoutCreatedByNestedInput = { + create?: XOR | ChanceTransactionCreateWithoutCreatedByInput[] | ChanceTransactionUncheckedCreateWithoutCreatedByInput[] + connectOrCreate?: ChanceTransactionCreateOrConnectWithoutCreatedByInput | ChanceTransactionCreateOrConnectWithoutCreatedByInput[] + upsert?: ChanceTransactionUpsertWithWhereUniqueWithoutCreatedByInput | ChanceTransactionUpsertWithWhereUniqueWithoutCreatedByInput[] + createMany?: ChanceTransactionCreateManyCreatedByInputEnvelope + set?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + disconnect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + delete?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + update?: ChanceTransactionUpdateWithWhereUniqueWithoutCreatedByInput | ChanceTransactionUpdateWithWhereUniqueWithoutCreatedByInput[] + updateMany?: ChanceTransactionUpdateManyWithWhereWithoutCreatedByInput | ChanceTransactionUpdateManyWithWhereWithoutCreatedByInput[] + deleteMany?: ChanceTransactionScalarWhereInput | ChanceTransactionScalarWhereInput[] + } + + export type UserCampaignCreateNestedManyWithoutUserInput = { + create?: XOR | UserCampaignCreateWithoutUserInput[] | UserCampaignUncheckedCreateWithoutUserInput[] + connectOrCreate?: UserCampaignCreateOrConnectWithoutUserInput | UserCampaignCreateOrConnectWithoutUserInput[] + createMany?: UserCampaignCreateManyUserInputEnvelope + connect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + } + + export type ChanceTransactionCreateNestedManyWithoutUserInput = { + create?: XOR | ChanceTransactionCreateWithoutUserInput[] | ChanceTransactionUncheckedCreateWithoutUserInput[] + connectOrCreate?: ChanceTransactionCreateOrConnectWithoutUserInput | ChanceTransactionCreateOrConnectWithoutUserInput[] + createMany?: ChanceTransactionCreateManyUserInputEnvelope + connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + } + + export type SpinCreateNestedManyWithoutUserInput = { + create?: XOR | SpinCreateWithoutUserInput[] | SpinUncheckedCreateWithoutUserInput[] + connectOrCreate?: SpinCreateOrConnectWithoutUserInput | SpinCreateOrConnectWithoutUserInput[] + createMany?: SpinCreateManyUserInputEnvelope + connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + } + + export type UserPrizeCreateNestedManyWithoutUserInput = { + create?: XOR | UserPrizeCreateWithoutUserInput[] | UserPrizeUncheckedCreateWithoutUserInput[] + connectOrCreate?: UserPrizeCreateOrConnectWithoutUserInput | UserPrizeCreateOrConnectWithoutUserInput[] + createMany?: UserPrizeCreateManyUserInputEnvelope + connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + } + + export type OtpCodeCreateNestedManyWithoutUserInput = { + create?: XOR | OtpCodeCreateWithoutUserInput[] | OtpCodeUncheckedCreateWithoutUserInput[] + connectOrCreate?: OtpCodeCreateOrConnectWithoutUserInput | OtpCodeCreateOrConnectWithoutUserInput[] + createMany?: OtpCodeCreateManyUserInputEnvelope + connect?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[] + } + + export type SmsLogCreateNestedManyWithoutUserInput = { + create?: XOR | SmsLogCreateWithoutUserInput[] | SmsLogUncheckedCreateWithoutUserInput[] + connectOrCreate?: SmsLogCreateOrConnectWithoutUserInput | SmsLogCreateOrConnectWithoutUserInput[] + createMany?: SmsLogCreateManyUserInputEnvelope + connect?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[] + } + + export type UserCampaignUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | UserCampaignCreateWithoutUserInput[] | UserCampaignUncheckedCreateWithoutUserInput[] + connectOrCreate?: UserCampaignCreateOrConnectWithoutUserInput | UserCampaignCreateOrConnectWithoutUserInput[] + createMany?: UserCampaignCreateManyUserInputEnvelope + connect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + } + + export type ChanceTransactionUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | ChanceTransactionCreateWithoutUserInput[] | ChanceTransactionUncheckedCreateWithoutUserInput[] + connectOrCreate?: ChanceTransactionCreateOrConnectWithoutUserInput | ChanceTransactionCreateOrConnectWithoutUserInput[] + createMany?: ChanceTransactionCreateManyUserInputEnvelope + connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + } + + export type SpinUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | SpinCreateWithoutUserInput[] | SpinUncheckedCreateWithoutUserInput[] + connectOrCreate?: SpinCreateOrConnectWithoutUserInput | SpinCreateOrConnectWithoutUserInput[] + createMany?: SpinCreateManyUserInputEnvelope + connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + } + + export type UserPrizeUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | UserPrizeCreateWithoutUserInput[] | UserPrizeUncheckedCreateWithoutUserInput[] + connectOrCreate?: UserPrizeCreateOrConnectWithoutUserInput | UserPrizeCreateOrConnectWithoutUserInput[] + createMany?: UserPrizeCreateManyUserInputEnvelope + connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + } + + export type OtpCodeUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | OtpCodeCreateWithoutUserInput[] | OtpCodeUncheckedCreateWithoutUserInput[] + connectOrCreate?: OtpCodeCreateOrConnectWithoutUserInput | OtpCodeCreateOrConnectWithoutUserInput[] + createMany?: OtpCodeCreateManyUserInputEnvelope + connect?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[] + } + + export type SmsLogUncheckedCreateNestedManyWithoutUserInput = { + create?: XOR | SmsLogCreateWithoutUserInput[] | SmsLogUncheckedCreateWithoutUserInput[] + connectOrCreate?: SmsLogCreateOrConnectWithoutUserInput | SmsLogCreateOrConnectWithoutUserInput[] + createMany?: SmsLogCreateManyUserInputEnvelope + connect?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[] + } + + export type NullableStringFieldUpdateOperationsInput = { + set?: string | null + } + + export type EnumUserStatusFieldUpdateOperationsInput = { + set?: $Enums.UserStatus + } + + export type NullableDateTimeFieldUpdateOperationsInput = { + set?: Date | string | null + } + + export type UserCampaignUpdateManyWithoutUserNestedInput = { + create?: XOR | UserCampaignCreateWithoutUserInput[] | UserCampaignUncheckedCreateWithoutUserInput[] + connectOrCreate?: UserCampaignCreateOrConnectWithoutUserInput | UserCampaignCreateOrConnectWithoutUserInput[] + upsert?: UserCampaignUpsertWithWhereUniqueWithoutUserInput | UserCampaignUpsertWithWhereUniqueWithoutUserInput[] + createMany?: UserCampaignCreateManyUserInputEnvelope + set?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + disconnect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + delete?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + connect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + update?: UserCampaignUpdateWithWhereUniqueWithoutUserInput | UserCampaignUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: UserCampaignUpdateManyWithWhereWithoutUserInput | UserCampaignUpdateManyWithWhereWithoutUserInput[] + deleteMany?: UserCampaignScalarWhereInput | UserCampaignScalarWhereInput[] + } + + export type ChanceTransactionUpdateManyWithoutUserNestedInput = { + create?: XOR | ChanceTransactionCreateWithoutUserInput[] | ChanceTransactionUncheckedCreateWithoutUserInput[] + connectOrCreate?: ChanceTransactionCreateOrConnectWithoutUserInput | ChanceTransactionCreateOrConnectWithoutUserInput[] + upsert?: ChanceTransactionUpsertWithWhereUniqueWithoutUserInput | ChanceTransactionUpsertWithWhereUniqueWithoutUserInput[] + createMany?: ChanceTransactionCreateManyUserInputEnvelope + set?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + disconnect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + delete?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + update?: ChanceTransactionUpdateWithWhereUniqueWithoutUserInput | ChanceTransactionUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: ChanceTransactionUpdateManyWithWhereWithoutUserInput | ChanceTransactionUpdateManyWithWhereWithoutUserInput[] + deleteMany?: ChanceTransactionScalarWhereInput | ChanceTransactionScalarWhereInput[] + } + + export type SpinUpdateManyWithoutUserNestedInput = { + create?: XOR | SpinCreateWithoutUserInput[] | SpinUncheckedCreateWithoutUserInput[] + connectOrCreate?: SpinCreateOrConnectWithoutUserInput | SpinCreateOrConnectWithoutUserInput[] + upsert?: SpinUpsertWithWhereUniqueWithoutUserInput | SpinUpsertWithWhereUniqueWithoutUserInput[] + createMany?: SpinCreateManyUserInputEnvelope + set?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + disconnect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + delete?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + update?: SpinUpdateWithWhereUniqueWithoutUserInput | SpinUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: SpinUpdateManyWithWhereWithoutUserInput | SpinUpdateManyWithWhereWithoutUserInput[] + deleteMany?: SpinScalarWhereInput | SpinScalarWhereInput[] + } + + export type UserPrizeUpdateManyWithoutUserNestedInput = { + create?: XOR | UserPrizeCreateWithoutUserInput[] | UserPrizeUncheckedCreateWithoutUserInput[] + connectOrCreate?: UserPrizeCreateOrConnectWithoutUserInput | UserPrizeCreateOrConnectWithoutUserInput[] + upsert?: UserPrizeUpsertWithWhereUniqueWithoutUserInput | UserPrizeUpsertWithWhereUniqueWithoutUserInput[] + createMany?: UserPrizeCreateManyUserInputEnvelope + set?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + disconnect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + delete?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + update?: UserPrizeUpdateWithWhereUniqueWithoutUserInput | UserPrizeUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: UserPrizeUpdateManyWithWhereWithoutUserInput | UserPrizeUpdateManyWithWhereWithoutUserInput[] + deleteMany?: UserPrizeScalarWhereInput | UserPrizeScalarWhereInput[] + } + + export type OtpCodeUpdateManyWithoutUserNestedInput = { + create?: XOR | OtpCodeCreateWithoutUserInput[] | OtpCodeUncheckedCreateWithoutUserInput[] + connectOrCreate?: OtpCodeCreateOrConnectWithoutUserInput | OtpCodeCreateOrConnectWithoutUserInput[] + upsert?: OtpCodeUpsertWithWhereUniqueWithoutUserInput | OtpCodeUpsertWithWhereUniqueWithoutUserInput[] + createMany?: OtpCodeCreateManyUserInputEnvelope + set?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[] + disconnect?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[] + delete?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[] + connect?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[] + update?: OtpCodeUpdateWithWhereUniqueWithoutUserInput | OtpCodeUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: OtpCodeUpdateManyWithWhereWithoutUserInput | OtpCodeUpdateManyWithWhereWithoutUserInput[] + deleteMany?: OtpCodeScalarWhereInput | OtpCodeScalarWhereInput[] + } + + export type SmsLogUpdateManyWithoutUserNestedInput = { + create?: XOR | SmsLogCreateWithoutUserInput[] | SmsLogUncheckedCreateWithoutUserInput[] + connectOrCreate?: SmsLogCreateOrConnectWithoutUserInput | SmsLogCreateOrConnectWithoutUserInput[] + upsert?: SmsLogUpsertWithWhereUniqueWithoutUserInput | SmsLogUpsertWithWhereUniqueWithoutUserInput[] + createMany?: SmsLogCreateManyUserInputEnvelope + set?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[] + disconnect?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[] + delete?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[] + connect?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[] + update?: SmsLogUpdateWithWhereUniqueWithoutUserInput | SmsLogUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: SmsLogUpdateManyWithWhereWithoutUserInput | SmsLogUpdateManyWithWhereWithoutUserInput[] + deleteMany?: SmsLogScalarWhereInput | SmsLogScalarWhereInput[] + } + + export type UserCampaignUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | UserCampaignCreateWithoutUserInput[] | UserCampaignUncheckedCreateWithoutUserInput[] + connectOrCreate?: UserCampaignCreateOrConnectWithoutUserInput | UserCampaignCreateOrConnectWithoutUserInput[] + upsert?: UserCampaignUpsertWithWhereUniqueWithoutUserInput | UserCampaignUpsertWithWhereUniqueWithoutUserInput[] + createMany?: UserCampaignCreateManyUserInputEnvelope + set?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + disconnect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + delete?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + connect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + update?: UserCampaignUpdateWithWhereUniqueWithoutUserInput | UserCampaignUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: UserCampaignUpdateManyWithWhereWithoutUserInput | UserCampaignUpdateManyWithWhereWithoutUserInput[] + deleteMany?: UserCampaignScalarWhereInput | UserCampaignScalarWhereInput[] + } + + export type ChanceTransactionUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | ChanceTransactionCreateWithoutUserInput[] | ChanceTransactionUncheckedCreateWithoutUserInput[] + connectOrCreate?: ChanceTransactionCreateOrConnectWithoutUserInput | ChanceTransactionCreateOrConnectWithoutUserInput[] + upsert?: ChanceTransactionUpsertWithWhereUniqueWithoutUserInput | ChanceTransactionUpsertWithWhereUniqueWithoutUserInput[] + createMany?: ChanceTransactionCreateManyUserInputEnvelope + set?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + disconnect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + delete?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + update?: ChanceTransactionUpdateWithWhereUniqueWithoutUserInput | ChanceTransactionUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: ChanceTransactionUpdateManyWithWhereWithoutUserInput | ChanceTransactionUpdateManyWithWhereWithoutUserInput[] + deleteMany?: ChanceTransactionScalarWhereInput | ChanceTransactionScalarWhereInput[] + } + + export type SpinUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | SpinCreateWithoutUserInput[] | SpinUncheckedCreateWithoutUserInput[] + connectOrCreate?: SpinCreateOrConnectWithoutUserInput | SpinCreateOrConnectWithoutUserInput[] + upsert?: SpinUpsertWithWhereUniqueWithoutUserInput | SpinUpsertWithWhereUniqueWithoutUserInput[] + createMany?: SpinCreateManyUserInputEnvelope + set?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + disconnect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + delete?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + update?: SpinUpdateWithWhereUniqueWithoutUserInput | SpinUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: SpinUpdateManyWithWhereWithoutUserInput | SpinUpdateManyWithWhereWithoutUserInput[] + deleteMany?: SpinScalarWhereInput | SpinScalarWhereInput[] + } + + export type UserPrizeUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | UserPrizeCreateWithoutUserInput[] | UserPrizeUncheckedCreateWithoutUserInput[] + connectOrCreate?: UserPrizeCreateOrConnectWithoutUserInput | UserPrizeCreateOrConnectWithoutUserInput[] + upsert?: UserPrizeUpsertWithWhereUniqueWithoutUserInput | UserPrizeUpsertWithWhereUniqueWithoutUserInput[] + createMany?: UserPrizeCreateManyUserInputEnvelope + set?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + disconnect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + delete?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + update?: UserPrizeUpdateWithWhereUniqueWithoutUserInput | UserPrizeUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: UserPrizeUpdateManyWithWhereWithoutUserInput | UserPrizeUpdateManyWithWhereWithoutUserInput[] + deleteMany?: UserPrizeScalarWhereInput | UserPrizeScalarWhereInput[] + } + + export type OtpCodeUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | OtpCodeCreateWithoutUserInput[] | OtpCodeUncheckedCreateWithoutUserInput[] + connectOrCreate?: OtpCodeCreateOrConnectWithoutUserInput | OtpCodeCreateOrConnectWithoutUserInput[] + upsert?: OtpCodeUpsertWithWhereUniqueWithoutUserInput | OtpCodeUpsertWithWhereUniqueWithoutUserInput[] + createMany?: OtpCodeCreateManyUserInputEnvelope + set?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[] + disconnect?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[] + delete?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[] + connect?: OtpCodeWhereUniqueInput | OtpCodeWhereUniqueInput[] + update?: OtpCodeUpdateWithWhereUniqueWithoutUserInput | OtpCodeUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: OtpCodeUpdateManyWithWhereWithoutUserInput | OtpCodeUpdateManyWithWhereWithoutUserInput[] + deleteMany?: OtpCodeScalarWhereInput | OtpCodeScalarWhereInput[] + } + + export type SmsLogUncheckedUpdateManyWithoutUserNestedInput = { + create?: XOR | SmsLogCreateWithoutUserInput[] | SmsLogUncheckedCreateWithoutUserInput[] + connectOrCreate?: SmsLogCreateOrConnectWithoutUserInput | SmsLogCreateOrConnectWithoutUserInput[] + upsert?: SmsLogUpsertWithWhereUniqueWithoutUserInput | SmsLogUpsertWithWhereUniqueWithoutUserInput[] + createMany?: SmsLogCreateManyUserInputEnvelope + set?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[] + disconnect?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[] + delete?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[] + connect?: SmsLogWhereUniqueInput | SmsLogWhereUniqueInput[] + update?: SmsLogUpdateWithWhereUniqueWithoutUserInput | SmsLogUpdateWithWhereUniqueWithoutUserInput[] + updateMany?: SmsLogUpdateManyWithWhereWithoutUserInput | SmsLogUpdateManyWithWhereWithoutUserInput[] + deleteMany?: SmsLogScalarWhereInput | SmsLogScalarWhereInput[] + } + + export type UserCreateNestedOneWithoutOtpCodesInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutOtpCodesInput + connect?: UserWhereUniqueInput + } + + export type IntFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number + } + + export type BoolFieldUpdateOperationsInput = { + set?: boolean + } + + export type UserUpdateOneWithoutOtpCodesNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutOtpCodesInput + upsert?: UserUpsertWithoutOtpCodesInput + disconnect?: UserWhereInput | boolean + delete?: UserWhereInput | boolean + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutOtpCodesInput> + } + + export type PrizeCreateNestedManyWithoutCampaignInput = { + create?: XOR | PrizeCreateWithoutCampaignInput[] | PrizeUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: PrizeCreateOrConnectWithoutCampaignInput | PrizeCreateOrConnectWithoutCampaignInput[] + createMany?: PrizeCreateManyCampaignInputEnvelope + connect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + } + + export type UserCampaignCreateNestedManyWithoutCampaignInput = { + create?: XOR | UserCampaignCreateWithoutCampaignInput[] | UserCampaignUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: UserCampaignCreateOrConnectWithoutCampaignInput | UserCampaignCreateOrConnectWithoutCampaignInput[] + createMany?: UserCampaignCreateManyCampaignInputEnvelope + connect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + } + + export type ChanceTransactionCreateNestedManyWithoutCampaignInput = { + create?: XOR | ChanceTransactionCreateWithoutCampaignInput[] | ChanceTransactionUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: ChanceTransactionCreateOrConnectWithoutCampaignInput | ChanceTransactionCreateOrConnectWithoutCampaignInput[] + createMany?: ChanceTransactionCreateManyCampaignInputEnvelope + connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + } + + export type SpinCreateNestedManyWithoutCampaignInput = { + create?: XOR | SpinCreateWithoutCampaignInput[] | SpinUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: SpinCreateOrConnectWithoutCampaignInput | SpinCreateOrConnectWithoutCampaignInput[] + createMany?: SpinCreateManyCampaignInputEnvelope + connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + } + + export type UserPrizeCreateNestedManyWithoutCampaignInput = { + create?: XOR | UserPrizeCreateWithoutCampaignInput[] | UserPrizeUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: UserPrizeCreateOrConnectWithoutCampaignInput | UserPrizeCreateOrConnectWithoutCampaignInput[] + createMany?: UserPrizeCreateManyCampaignInputEnvelope + connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + } + + export type PrizeUncheckedCreateNestedManyWithoutCampaignInput = { + create?: XOR | PrizeCreateWithoutCampaignInput[] | PrizeUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: PrizeCreateOrConnectWithoutCampaignInput | PrizeCreateOrConnectWithoutCampaignInput[] + createMany?: PrizeCreateManyCampaignInputEnvelope + connect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + } + + export type UserCampaignUncheckedCreateNestedManyWithoutCampaignInput = { + create?: XOR | UserCampaignCreateWithoutCampaignInput[] | UserCampaignUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: UserCampaignCreateOrConnectWithoutCampaignInput | UserCampaignCreateOrConnectWithoutCampaignInput[] + createMany?: UserCampaignCreateManyCampaignInputEnvelope + connect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + } + + export type ChanceTransactionUncheckedCreateNestedManyWithoutCampaignInput = { + create?: XOR | ChanceTransactionCreateWithoutCampaignInput[] | ChanceTransactionUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: ChanceTransactionCreateOrConnectWithoutCampaignInput | ChanceTransactionCreateOrConnectWithoutCampaignInput[] + createMany?: ChanceTransactionCreateManyCampaignInputEnvelope + connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + } + + export type SpinUncheckedCreateNestedManyWithoutCampaignInput = { + create?: XOR | SpinCreateWithoutCampaignInput[] | SpinUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: SpinCreateOrConnectWithoutCampaignInput | SpinCreateOrConnectWithoutCampaignInput[] + createMany?: SpinCreateManyCampaignInputEnvelope + connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + } + + export type UserPrizeUncheckedCreateNestedManyWithoutCampaignInput = { + create?: XOR | UserPrizeCreateWithoutCampaignInput[] | UserPrizeUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: UserPrizeCreateOrConnectWithoutCampaignInput | UserPrizeCreateOrConnectWithoutCampaignInput[] + createMany?: UserPrizeCreateManyCampaignInputEnvelope + connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + } + + export type EnumCampaignStatusFieldUpdateOperationsInput = { + set?: $Enums.CampaignStatus + } + + export type EnumWheelDesignFieldUpdateOperationsInput = { + set?: $Enums.WheelDesign + } + + export type PrizeUpdateManyWithoutCampaignNestedInput = { + create?: XOR | PrizeCreateWithoutCampaignInput[] | PrizeUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: PrizeCreateOrConnectWithoutCampaignInput | PrizeCreateOrConnectWithoutCampaignInput[] + upsert?: PrizeUpsertWithWhereUniqueWithoutCampaignInput | PrizeUpsertWithWhereUniqueWithoutCampaignInput[] + createMany?: PrizeCreateManyCampaignInputEnvelope + set?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + disconnect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + delete?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + connect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + update?: PrizeUpdateWithWhereUniqueWithoutCampaignInput | PrizeUpdateWithWhereUniqueWithoutCampaignInput[] + updateMany?: PrizeUpdateManyWithWhereWithoutCampaignInput | PrizeUpdateManyWithWhereWithoutCampaignInput[] + deleteMany?: PrizeScalarWhereInput | PrizeScalarWhereInput[] + } + + export type UserCampaignUpdateManyWithoutCampaignNestedInput = { + create?: XOR | UserCampaignCreateWithoutCampaignInput[] | UserCampaignUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: UserCampaignCreateOrConnectWithoutCampaignInput | UserCampaignCreateOrConnectWithoutCampaignInput[] + upsert?: UserCampaignUpsertWithWhereUniqueWithoutCampaignInput | UserCampaignUpsertWithWhereUniqueWithoutCampaignInput[] + createMany?: UserCampaignCreateManyCampaignInputEnvelope + set?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + disconnect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + delete?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + connect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + update?: UserCampaignUpdateWithWhereUniqueWithoutCampaignInput | UserCampaignUpdateWithWhereUniqueWithoutCampaignInput[] + updateMany?: UserCampaignUpdateManyWithWhereWithoutCampaignInput | UserCampaignUpdateManyWithWhereWithoutCampaignInput[] + deleteMany?: UserCampaignScalarWhereInput | UserCampaignScalarWhereInput[] + } + + export type ChanceTransactionUpdateManyWithoutCampaignNestedInput = { + create?: XOR | ChanceTransactionCreateWithoutCampaignInput[] | ChanceTransactionUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: ChanceTransactionCreateOrConnectWithoutCampaignInput | ChanceTransactionCreateOrConnectWithoutCampaignInput[] + upsert?: ChanceTransactionUpsertWithWhereUniqueWithoutCampaignInput | ChanceTransactionUpsertWithWhereUniqueWithoutCampaignInput[] + createMany?: ChanceTransactionCreateManyCampaignInputEnvelope + set?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + disconnect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + delete?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + update?: ChanceTransactionUpdateWithWhereUniqueWithoutCampaignInput | ChanceTransactionUpdateWithWhereUniqueWithoutCampaignInput[] + updateMany?: ChanceTransactionUpdateManyWithWhereWithoutCampaignInput | ChanceTransactionUpdateManyWithWhereWithoutCampaignInput[] + deleteMany?: ChanceTransactionScalarWhereInput | ChanceTransactionScalarWhereInput[] + } + + export type SpinUpdateManyWithoutCampaignNestedInput = { + create?: XOR | SpinCreateWithoutCampaignInput[] | SpinUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: SpinCreateOrConnectWithoutCampaignInput | SpinCreateOrConnectWithoutCampaignInput[] + upsert?: SpinUpsertWithWhereUniqueWithoutCampaignInput | SpinUpsertWithWhereUniqueWithoutCampaignInput[] + createMany?: SpinCreateManyCampaignInputEnvelope + set?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + disconnect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + delete?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + update?: SpinUpdateWithWhereUniqueWithoutCampaignInput | SpinUpdateWithWhereUniqueWithoutCampaignInput[] + updateMany?: SpinUpdateManyWithWhereWithoutCampaignInput | SpinUpdateManyWithWhereWithoutCampaignInput[] + deleteMany?: SpinScalarWhereInput | SpinScalarWhereInput[] + } + + export type UserPrizeUpdateManyWithoutCampaignNestedInput = { + create?: XOR | UserPrizeCreateWithoutCampaignInput[] | UserPrizeUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: UserPrizeCreateOrConnectWithoutCampaignInput | UserPrizeCreateOrConnectWithoutCampaignInput[] + upsert?: UserPrizeUpsertWithWhereUniqueWithoutCampaignInput | UserPrizeUpsertWithWhereUniqueWithoutCampaignInput[] + createMany?: UserPrizeCreateManyCampaignInputEnvelope + set?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + disconnect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + delete?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + update?: UserPrizeUpdateWithWhereUniqueWithoutCampaignInput | UserPrizeUpdateWithWhereUniqueWithoutCampaignInput[] + updateMany?: UserPrizeUpdateManyWithWhereWithoutCampaignInput | UserPrizeUpdateManyWithWhereWithoutCampaignInput[] + deleteMany?: UserPrizeScalarWhereInput | UserPrizeScalarWhereInput[] + } + + export type PrizeUncheckedUpdateManyWithoutCampaignNestedInput = { + create?: XOR | PrizeCreateWithoutCampaignInput[] | PrizeUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: PrizeCreateOrConnectWithoutCampaignInput | PrizeCreateOrConnectWithoutCampaignInput[] + upsert?: PrizeUpsertWithWhereUniqueWithoutCampaignInput | PrizeUpsertWithWhereUniqueWithoutCampaignInput[] + createMany?: PrizeCreateManyCampaignInputEnvelope + set?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + disconnect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + delete?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + connect?: PrizeWhereUniqueInput | PrizeWhereUniqueInput[] + update?: PrizeUpdateWithWhereUniqueWithoutCampaignInput | PrizeUpdateWithWhereUniqueWithoutCampaignInput[] + updateMany?: PrizeUpdateManyWithWhereWithoutCampaignInput | PrizeUpdateManyWithWhereWithoutCampaignInput[] + deleteMany?: PrizeScalarWhereInput | PrizeScalarWhereInput[] + } + + export type UserCampaignUncheckedUpdateManyWithoutCampaignNestedInput = { + create?: XOR | UserCampaignCreateWithoutCampaignInput[] | UserCampaignUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: UserCampaignCreateOrConnectWithoutCampaignInput | UserCampaignCreateOrConnectWithoutCampaignInput[] + upsert?: UserCampaignUpsertWithWhereUniqueWithoutCampaignInput | UserCampaignUpsertWithWhereUniqueWithoutCampaignInput[] + createMany?: UserCampaignCreateManyCampaignInputEnvelope + set?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + disconnect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + delete?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + connect?: UserCampaignWhereUniqueInput | UserCampaignWhereUniqueInput[] + update?: UserCampaignUpdateWithWhereUniqueWithoutCampaignInput | UserCampaignUpdateWithWhereUniqueWithoutCampaignInput[] + updateMany?: UserCampaignUpdateManyWithWhereWithoutCampaignInput | UserCampaignUpdateManyWithWhereWithoutCampaignInput[] + deleteMany?: UserCampaignScalarWhereInput | UserCampaignScalarWhereInput[] + } + + export type ChanceTransactionUncheckedUpdateManyWithoutCampaignNestedInput = { + create?: XOR | ChanceTransactionCreateWithoutCampaignInput[] | ChanceTransactionUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: ChanceTransactionCreateOrConnectWithoutCampaignInput | ChanceTransactionCreateOrConnectWithoutCampaignInput[] + upsert?: ChanceTransactionUpsertWithWhereUniqueWithoutCampaignInput | ChanceTransactionUpsertWithWhereUniqueWithoutCampaignInput[] + createMany?: ChanceTransactionCreateManyCampaignInputEnvelope + set?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + disconnect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + delete?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + connect?: ChanceTransactionWhereUniqueInput | ChanceTransactionWhereUniqueInput[] + update?: ChanceTransactionUpdateWithWhereUniqueWithoutCampaignInput | ChanceTransactionUpdateWithWhereUniqueWithoutCampaignInput[] + updateMany?: ChanceTransactionUpdateManyWithWhereWithoutCampaignInput | ChanceTransactionUpdateManyWithWhereWithoutCampaignInput[] + deleteMany?: ChanceTransactionScalarWhereInput | ChanceTransactionScalarWhereInput[] + } + + export type SpinUncheckedUpdateManyWithoutCampaignNestedInput = { + create?: XOR | SpinCreateWithoutCampaignInput[] | SpinUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: SpinCreateOrConnectWithoutCampaignInput | SpinCreateOrConnectWithoutCampaignInput[] + upsert?: SpinUpsertWithWhereUniqueWithoutCampaignInput | SpinUpsertWithWhereUniqueWithoutCampaignInput[] + createMany?: SpinCreateManyCampaignInputEnvelope + set?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + disconnect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + delete?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + update?: SpinUpdateWithWhereUniqueWithoutCampaignInput | SpinUpdateWithWhereUniqueWithoutCampaignInput[] + updateMany?: SpinUpdateManyWithWhereWithoutCampaignInput | SpinUpdateManyWithWhereWithoutCampaignInput[] + deleteMany?: SpinScalarWhereInput | SpinScalarWhereInput[] + } + + export type UserPrizeUncheckedUpdateManyWithoutCampaignNestedInput = { + create?: XOR | UserPrizeCreateWithoutCampaignInput[] | UserPrizeUncheckedCreateWithoutCampaignInput[] + connectOrCreate?: UserPrizeCreateOrConnectWithoutCampaignInput | UserPrizeCreateOrConnectWithoutCampaignInput[] + upsert?: UserPrizeUpsertWithWhereUniqueWithoutCampaignInput | UserPrizeUpsertWithWhereUniqueWithoutCampaignInput[] + createMany?: UserPrizeCreateManyCampaignInputEnvelope + set?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + disconnect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + delete?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + update?: UserPrizeUpdateWithWhereUniqueWithoutCampaignInput | UserPrizeUpdateWithWhereUniqueWithoutCampaignInput[] + updateMany?: UserPrizeUpdateManyWithWhereWithoutCampaignInput | UserPrizeUpdateManyWithWhereWithoutCampaignInput[] + deleteMany?: UserPrizeScalarWhereInput | UserPrizeScalarWhereInput[] + } + + export type CampaignCreateNestedOneWithoutPrizesInput = { + create?: XOR + connectOrCreate?: CampaignCreateOrConnectWithoutPrizesInput + connect?: CampaignWhereUniqueInput + } + + export type SpinCreateNestedManyWithoutPrizeInput = { + create?: XOR | SpinCreateWithoutPrizeInput[] | SpinUncheckedCreateWithoutPrizeInput[] + connectOrCreate?: SpinCreateOrConnectWithoutPrizeInput | SpinCreateOrConnectWithoutPrizeInput[] + createMany?: SpinCreateManyPrizeInputEnvelope + connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + } + + export type UserPrizeCreateNestedManyWithoutPrizeInput = { + create?: XOR | UserPrizeCreateWithoutPrizeInput[] | UserPrizeUncheckedCreateWithoutPrizeInput[] + connectOrCreate?: UserPrizeCreateOrConnectWithoutPrizeInput | UserPrizeCreateOrConnectWithoutPrizeInput[] + createMany?: UserPrizeCreateManyPrizeInputEnvelope + connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + } + + export type SpinUncheckedCreateNestedManyWithoutPrizeInput = { + create?: XOR | SpinCreateWithoutPrizeInput[] | SpinUncheckedCreateWithoutPrizeInput[] + connectOrCreate?: SpinCreateOrConnectWithoutPrizeInput | SpinCreateOrConnectWithoutPrizeInput[] + createMany?: SpinCreateManyPrizeInputEnvelope + connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + } + + export type UserPrizeUncheckedCreateNestedManyWithoutPrizeInput = { + create?: XOR | UserPrizeCreateWithoutPrizeInput[] | UserPrizeUncheckedCreateWithoutPrizeInput[] + connectOrCreate?: UserPrizeCreateOrConnectWithoutPrizeInput | UserPrizeCreateOrConnectWithoutPrizeInput[] + createMany?: UserPrizeCreateManyPrizeInputEnvelope + connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + } + + export type EnumPrizeTypeFieldUpdateOperationsInput = { + set?: $Enums.PrizeType + } + + export type EnumStockTypeFieldUpdateOperationsInput = { + set?: $Enums.StockType + } + + export type NullableIntFieldUpdateOperationsInput = { + set?: number | null + increment?: number + decrement?: number + multiply?: number + divide?: number + } + + export type EnumPrizeStatusFieldUpdateOperationsInput = { + set?: $Enums.PrizeStatus + } + + export type CampaignUpdateOneRequiredWithoutPrizesNestedInput = { + create?: XOR + connectOrCreate?: CampaignCreateOrConnectWithoutPrizesInput + upsert?: CampaignUpsertWithoutPrizesInput + connect?: CampaignWhereUniqueInput + update?: XOR, CampaignUncheckedUpdateWithoutPrizesInput> + } + + export type SpinUpdateManyWithoutPrizeNestedInput = { + create?: XOR | SpinCreateWithoutPrizeInput[] | SpinUncheckedCreateWithoutPrizeInput[] + connectOrCreate?: SpinCreateOrConnectWithoutPrizeInput | SpinCreateOrConnectWithoutPrizeInput[] + upsert?: SpinUpsertWithWhereUniqueWithoutPrizeInput | SpinUpsertWithWhereUniqueWithoutPrizeInput[] + createMany?: SpinCreateManyPrizeInputEnvelope + set?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + disconnect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + delete?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + update?: SpinUpdateWithWhereUniqueWithoutPrizeInput | SpinUpdateWithWhereUniqueWithoutPrizeInput[] + updateMany?: SpinUpdateManyWithWhereWithoutPrizeInput | SpinUpdateManyWithWhereWithoutPrizeInput[] + deleteMany?: SpinScalarWhereInput | SpinScalarWhereInput[] + } + + export type UserPrizeUpdateManyWithoutPrizeNestedInput = { + create?: XOR | UserPrizeCreateWithoutPrizeInput[] | UserPrizeUncheckedCreateWithoutPrizeInput[] + connectOrCreate?: UserPrizeCreateOrConnectWithoutPrizeInput | UserPrizeCreateOrConnectWithoutPrizeInput[] + upsert?: UserPrizeUpsertWithWhereUniqueWithoutPrizeInput | UserPrizeUpsertWithWhereUniqueWithoutPrizeInput[] + createMany?: UserPrizeCreateManyPrizeInputEnvelope + set?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + disconnect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + delete?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + update?: UserPrizeUpdateWithWhereUniqueWithoutPrizeInput | UserPrizeUpdateWithWhereUniqueWithoutPrizeInput[] + updateMany?: UserPrizeUpdateManyWithWhereWithoutPrizeInput | UserPrizeUpdateManyWithWhereWithoutPrizeInput[] + deleteMany?: UserPrizeScalarWhereInput | UserPrizeScalarWhereInput[] + } + + export type SpinUncheckedUpdateManyWithoutPrizeNestedInput = { + create?: XOR | SpinCreateWithoutPrizeInput[] | SpinUncheckedCreateWithoutPrizeInput[] + connectOrCreate?: SpinCreateOrConnectWithoutPrizeInput | SpinCreateOrConnectWithoutPrizeInput[] + upsert?: SpinUpsertWithWhereUniqueWithoutPrizeInput | SpinUpsertWithWhereUniqueWithoutPrizeInput[] + createMany?: SpinCreateManyPrizeInputEnvelope + set?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + disconnect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + delete?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + connect?: SpinWhereUniqueInput | SpinWhereUniqueInput[] + update?: SpinUpdateWithWhereUniqueWithoutPrizeInput | SpinUpdateWithWhereUniqueWithoutPrizeInput[] + updateMany?: SpinUpdateManyWithWhereWithoutPrizeInput | SpinUpdateManyWithWhereWithoutPrizeInput[] + deleteMany?: SpinScalarWhereInput | SpinScalarWhereInput[] + } + + export type UserPrizeUncheckedUpdateManyWithoutPrizeNestedInput = { + create?: XOR | UserPrizeCreateWithoutPrizeInput[] | UserPrizeUncheckedCreateWithoutPrizeInput[] + connectOrCreate?: UserPrizeCreateOrConnectWithoutPrizeInput | UserPrizeCreateOrConnectWithoutPrizeInput[] + upsert?: UserPrizeUpsertWithWhereUniqueWithoutPrizeInput | UserPrizeUpsertWithWhereUniqueWithoutPrizeInput[] + createMany?: UserPrizeCreateManyPrizeInputEnvelope + set?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + disconnect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + delete?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + connect?: UserPrizeWhereUniqueInput | UserPrizeWhereUniqueInput[] + update?: UserPrizeUpdateWithWhereUniqueWithoutPrizeInput | UserPrizeUpdateWithWhereUniqueWithoutPrizeInput[] + updateMany?: UserPrizeUpdateManyWithWhereWithoutPrizeInput | UserPrizeUpdateManyWithWhereWithoutPrizeInput[] + deleteMany?: UserPrizeScalarWhereInput | UserPrizeScalarWhereInput[] + } + + export type UserCreateNestedOneWithoutUserCampaignsInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutUserCampaignsInput + connect?: UserWhereUniqueInput + } + + export type CampaignCreateNestedOneWithoutUserCampaignsInput = { + create?: XOR + connectOrCreate?: CampaignCreateOrConnectWithoutUserCampaignsInput + connect?: CampaignWhereUniqueInput + } + + export type UserUpdateOneRequiredWithoutUserCampaignsNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutUserCampaignsInput + upsert?: UserUpsertWithoutUserCampaignsInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutUserCampaignsInput> + } + + export type CampaignUpdateOneRequiredWithoutUserCampaignsNestedInput = { + create?: XOR + connectOrCreate?: CampaignCreateOrConnectWithoutUserCampaignsInput + upsert?: CampaignUpsertWithoutUserCampaignsInput + connect?: CampaignWhereUniqueInput + update?: XOR, CampaignUncheckedUpdateWithoutUserCampaignsInput> + } + + export type UserCreateNestedOneWithoutChanceTransactionsInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutChanceTransactionsInput + connect?: UserWhereUniqueInput + } + + export type CampaignCreateNestedOneWithoutChanceTxnsInput = { + create?: XOR + connectOrCreate?: CampaignCreateOrConnectWithoutChanceTxnsInput + connect?: CampaignWhereUniqueInput + } + + export type AdminCreateNestedOneWithoutChanceTxnsInput = { + create?: XOR + connectOrCreate?: AdminCreateOrConnectWithoutChanceTxnsInput + connect?: AdminWhereUniqueInput + } + + export type EnumChanceTxnTypeFieldUpdateOperationsInput = { + set?: $Enums.ChanceTxnType + } + + export type UserUpdateOneRequiredWithoutChanceTransactionsNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutChanceTransactionsInput + upsert?: UserUpsertWithoutChanceTransactionsInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutChanceTransactionsInput> + } + + export type CampaignUpdateOneRequiredWithoutChanceTxnsNestedInput = { + create?: XOR + connectOrCreate?: CampaignCreateOrConnectWithoutChanceTxnsInput + upsert?: CampaignUpsertWithoutChanceTxnsInput + connect?: CampaignWhereUniqueInput + update?: XOR, CampaignUncheckedUpdateWithoutChanceTxnsInput> + } + + export type AdminUpdateOneWithoutChanceTxnsNestedInput = { + create?: XOR + connectOrCreate?: AdminCreateOrConnectWithoutChanceTxnsInput + upsert?: AdminUpsertWithoutChanceTxnsInput + disconnect?: AdminWhereInput | boolean + delete?: AdminWhereInput | boolean + connect?: AdminWhereUniqueInput + update?: XOR, AdminUncheckedUpdateWithoutChanceTxnsInput> + } + + export type UserCreateNestedOneWithoutSpinsInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutSpinsInput + connect?: UserWhereUniqueInput + } + + export type CampaignCreateNestedOneWithoutSpinsInput = { + create?: XOR + connectOrCreate?: CampaignCreateOrConnectWithoutSpinsInput + connect?: CampaignWhereUniqueInput + } + + export type PrizeCreateNestedOneWithoutSpinsInput = { + create?: XOR + connectOrCreate?: PrizeCreateOrConnectWithoutSpinsInput + connect?: PrizeWhereUniqueInput + } + + export type UserPrizeCreateNestedOneWithoutSpinInput = { + create?: XOR + connectOrCreate?: UserPrizeCreateOrConnectWithoutSpinInput + connect?: UserPrizeWhereUniqueInput + } + + export type UserPrizeUncheckedCreateNestedOneWithoutSpinInput = { + create?: XOR + connectOrCreate?: UserPrizeCreateOrConnectWithoutSpinInput + connect?: UserPrizeWhereUniqueInput + } + + export type EnumSpinStatusFieldUpdateOperationsInput = { + set?: $Enums.SpinStatus + } + + export type UserUpdateOneRequiredWithoutSpinsNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutSpinsInput + upsert?: UserUpsertWithoutSpinsInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutSpinsInput> + } + + export type CampaignUpdateOneRequiredWithoutSpinsNestedInput = { + create?: XOR + connectOrCreate?: CampaignCreateOrConnectWithoutSpinsInput + upsert?: CampaignUpsertWithoutSpinsInput + connect?: CampaignWhereUniqueInput + update?: XOR, CampaignUncheckedUpdateWithoutSpinsInput> + } + + export type PrizeUpdateOneWithoutSpinsNestedInput = { + create?: XOR + connectOrCreate?: PrizeCreateOrConnectWithoutSpinsInput + upsert?: PrizeUpsertWithoutSpinsInput + disconnect?: PrizeWhereInput | boolean + delete?: PrizeWhereInput | boolean + connect?: PrizeWhereUniqueInput + update?: XOR, PrizeUncheckedUpdateWithoutSpinsInput> + } + + export type UserPrizeUpdateOneWithoutSpinNestedInput = { + create?: XOR + connectOrCreate?: UserPrizeCreateOrConnectWithoutSpinInput + upsert?: UserPrizeUpsertWithoutSpinInput + disconnect?: UserPrizeWhereInput | boolean + delete?: UserPrizeWhereInput | boolean + connect?: UserPrizeWhereUniqueInput + update?: XOR, UserPrizeUncheckedUpdateWithoutSpinInput> + } + + export type UserPrizeUncheckedUpdateOneWithoutSpinNestedInput = { + create?: XOR + connectOrCreate?: UserPrizeCreateOrConnectWithoutSpinInput + upsert?: UserPrizeUpsertWithoutSpinInput + disconnect?: UserPrizeWhereInput | boolean + delete?: UserPrizeWhereInput | boolean + connect?: UserPrizeWhereUniqueInput + update?: XOR, UserPrizeUncheckedUpdateWithoutSpinInput> + } + + export type UserCreateNestedOneWithoutUserPrizesInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutUserPrizesInput + connect?: UserWhereUniqueInput + } + + export type CampaignCreateNestedOneWithoutUserPrizesInput = { + create?: XOR + connectOrCreate?: CampaignCreateOrConnectWithoutUserPrizesInput + connect?: CampaignWhereUniqueInput + } + + export type PrizeCreateNestedOneWithoutUserPrizesInput = { + create?: XOR + connectOrCreate?: PrizeCreateOrConnectWithoutUserPrizesInput + connect?: PrizeWhereUniqueInput + } + + export type SpinCreateNestedOneWithoutUserPrizeInput = { + create?: XOR + connectOrCreate?: SpinCreateOrConnectWithoutUserPrizeInput + connect?: SpinWhereUniqueInput + } + + export type EnumUserPrizeStatusFieldUpdateOperationsInput = { + set?: $Enums.UserPrizeStatus + } + + export type UserUpdateOneRequiredWithoutUserPrizesNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutUserPrizesInput + upsert?: UserUpsertWithoutUserPrizesInput + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutUserPrizesInput> + } + + export type CampaignUpdateOneRequiredWithoutUserPrizesNestedInput = { + create?: XOR + connectOrCreate?: CampaignCreateOrConnectWithoutUserPrizesInput + upsert?: CampaignUpsertWithoutUserPrizesInput + connect?: CampaignWhereUniqueInput + update?: XOR, CampaignUncheckedUpdateWithoutUserPrizesInput> + } + + export type PrizeUpdateOneRequiredWithoutUserPrizesNestedInput = { + create?: XOR + connectOrCreate?: PrizeCreateOrConnectWithoutUserPrizesInput + upsert?: PrizeUpsertWithoutUserPrizesInput + connect?: PrizeWhereUniqueInput + update?: XOR, PrizeUncheckedUpdateWithoutUserPrizesInput> + } + + export type SpinUpdateOneRequiredWithoutUserPrizeNestedInput = { + create?: XOR + connectOrCreate?: SpinCreateOrConnectWithoutUserPrizeInput + upsert?: SpinUpsertWithoutUserPrizeInput + connect?: SpinWhereUniqueInput + update?: XOR, SpinUncheckedUpdateWithoutUserPrizeInput> + } + + export type UserCreateNestedOneWithoutSmsLogsInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutSmsLogsInput + connect?: UserWhereUniqueInput + } + + export type EnumSmsTypeFieldUpdateOperationsInput = { + set?: $Enums.SmsType + } + + export type EnumSmsStatusFieldUpdateOperationsInput = { + set?: $Enums.SmsStatus + } + + export type UserUpdateOneWithoutSmsLogsNestedInput = { + create?: XOR + connectOrCreate?: UserCreateOrConnectWithoutSmsLogsInput + upsert?: UserUpsertWithoutSmsLogsInput + disconnect?: UserWhereInput | boolean + delete?: UserWhereInput | boolean + connect?: UserWhereUniqueInput + update?: XOR, UserUncheckedUpdateWithoutSmsLogsInput> + } + + export type AdminCreateNestedOneWithoutAuditLogsInput = { + create?: XOR + connectOrCreate?: AdminCreateOrConnectWithoutAuditLogsInput + connect?: AdminWhereUniqueInput + } + + export type AdminUpdateOneRequiredWithoutAuditLogsNestedInput = { + create?: XOR + connectOrCreate?: AdminCreateOrConnectWithoutAuditLogsInput + upsert?: AdminUpsertWithoutAuditLogsInput + connect?: AdminWhereUniqueInput + update?: XOR, AdminUncheckedUpdateWithoutAuditLogsInput> + } + + export type NestedStringFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringFilter<$PrismaModel> | string + } + + export type NestedEnumAdminRoleFilter<$PrismaModel = never> = { + equals?: $Enums.AdminRole | EnumAdminRoleFieldRefInput<$PrismaModel> + in?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel> + notIn?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel> + not?: NestedEnumAdminRoleFilter<$PrismaModel> | $Enums.AdminRole + } + + export type NestedEnumAdminStatusFilter<$PrismaModel = never> = { + equals?: $Enums.AdminStatus | EnumAdminStatusFieldRefInput<$PrismaModel> + in?: $Enums.AdminStatus[] | ListEnumAdminStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.AdminStatus[] | ListEnumAdminStatusFieldRefInput<$PrismaModel> + not?: NestedEnumAdminStatusFilter<$PrismaModel> | $Enums.AdminStatus + } + + export type NestedDateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeFilter<$PrismaModel> | Date | string + } + + export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> + in?: string[] | ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedStringFilter<$PrismaModel> + _max?: NestedStringFilter<$PrismaModel> + } + + export type NestedIntFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntFilter<$PrismaModel> | number + } + + export type NestedEnumAdminRoleWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.AdminRole | EnumAdminRoleFieldRefInput<$PrismaModel> + in?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel> + notIn?: $Enums.AdminRole[] | ListEnumAdminRoleFieldRefInput<$PrismaModel> + not?: NestedEnumAdminRoleWithAggregatesFilter<$PrismaModel> | $Enums.AdminRole + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumAdminRoleFilter<$PrismaModel> + _max?: NestedEnumAdminRoleFilter<$PrismaModel> + } + + export type NestedEnumAdminStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.AdminStatus | EnumAdminStatusFieldRefInput<$PrismaModel> + in?: $Enums.AdminStatus[] | ListEnumAdminStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.AdminStatus[] | ListEnumAdminStatusFieldRefInput<$PrismaModel> + not?: NestedEnumAdminStatusWithAggregatesFilter<$PrismaModel> | $Enums.AdminStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumAdminStatusFilter<$PrismaModel> + _max?: NestedEnumAdminStatusFilter<$PrismaModel> + } + + export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedDateTimeFilter<$PrismaModel> + _max?: NestedDateTimeFilter<$PrismaModel> + } + + export type NestedStringNullableFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringNullableFilter<$PrismaModel> | string | null + } + + export type NestedEnumUserStatusFilter<$PrismaModel = never> = { + equals?: $Enums.UserStatus | EnumUserStatusFieldRefInput<$PrismaModel> + in?: $Enums.UserStatus[] | ListEnumUserStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.UserStatus[] | ListEnumUserStatusFieldRefInput<$PrismaModel> + not?: NestedEnumUserStatusFilter<$PrismaModel> | $Enums.UserStatus + } + + export type NestedDateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null + } + + export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | StringFieldRefInput<$PrismaModel> | null + in?: string[] | ListStringFieldRefInput<$PrismaModel> | null + notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null + lt?: string | StringFieldRefInput<$PrismaModel> + lte?: string | StringFieldRefInput<$PrismaModel> + gt?: string | StringFieldRefInput<$PrismaModel> + gte?: string | StringFieldRefInput<$PrismaModel> + contains?: string | StringFieldRefInput<$PrismaModel> + startsWith?: string | StringFieldRefInput<$PrismaModel> + endsWith?: string | StringFieldRefInput<$PrismaModel> + not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedStringNullableFilter<$PrismaModel> + _max?: NestedStringNullableFilter<$PrismaModel> + } + + export type NestedIntNullableFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableFilter<$PrismaModel> | number | null + } + + export type NestedEnumUserStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.UserStatus | EnumUserStatusFieldRefInput<$PrismaModel> + in?: $Enums.UserStatus[] | ListEnumUserStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.UserStatus[] | ListEnumUserStatusFieldRefInput<$PrismaModel> + not?: NestedEnumUserStatusWithAggregatesFilter<$PrismaModel> | $Enums.UserStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumUserStatusFilter<$PrismaModel> + _max?: NestedEnumUserStatusFilter<$PrismaModel> + } + + export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedDateTimeNullableFilter<$PrismaModel> + _max?: NestedDateTimeNullableFilter<$PrismaModel> + } + + export type NestedBoolFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolFilter<$PrismaModel> | boolean + } + + export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> + in?: number[] | ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedFloatFilter<$PrismaModel> + _sum?: NestedIntFilter<$PrismaModel> + _min?: NestedIntFilter<$PrismaModel> + _max?: NestedIntFilter<$PrismaModel> + } + + export type NestedFloatFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> + in?: number[] | ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatFilter<$PrismaModel> | number + } + + export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | BooleanFieldRefInput<$PrismaModel> + not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedBoolFilter<$PrismaModel> + _max?: NestedBoolFilter<$PrismaModel> + } + + export type NestedEnumCampaignStatusFilter<$PrismaModel = never> = { + equals?: $Enums.CampaignStatus | EnumCampaignStatusFieldRefInput<$PrismaModel> + in?: $Enums.CampaignStatus[] | ListEnumCampaignStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.CampaignStatus[] | ListEnumCampaignStatusFieldRefInput<$PrismaModel> + not?: NestedEnumCampaignStatusFilter<$PrismaModel> | $Enums.CampaignStatus + } + + export type NestedEnumWheelDesignFilter<$PrismaModel = never> = { + equals?: $Enums.WheelDesign | EnumWheelDesignFieldRefInput<$PrismaModel> + in?: $Enums.WheelDesign[] | ListEnumWheelDesignFieldRefInput<$PrismaModel> + notIn?: $Enums.WheelDesign[] | ListEnumWheelDesignFieldRefInput<$PrismaModel> + not?: NestedEnumWheelDesignFilter<$PrismaModel> | $Enums.WheelDesign + } + + export type NestedEnumCampaignStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.CampaignStatus | EnumCampaignStatusFieldRefInput<$PrismaModel> + in?: $Enums.CampaignStatus[] | ListEnumCampaignStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.CampaignStatus[] | ListEnumCampaignStatusFieldRefInput<$PrismaModel> + not?: NestedEnumCampaignStatusWithAggregatesFilter<$PrismaModel> | $Enums.CampaignStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumCampaignStatusFilter<$PrismaModel> + _max?: NestedEnumCampaignStatusFilter<$PrismaModel> + } + + export type NestedEnumWheelDesignWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.WheelDesign | EnumWheelDesignFieldRefInput<$PrismaModel> + in?: $Enums.WheelDesign[] | ListEnumWheelDesignFieldRefInput<$PrismaModel> + notIn?: $Enums.WheelDesign[] | ListEnumWheelDesignFieldRefInput<$PrismaModel> + not?: NestedEnumWheelDesignWithAggregatesFilter<$PrismaModel> | $Enums.WheelDesign + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumWheelDesignFilter<$PrismaModel> + _max?: NestedEnumWheelDesignFilter<$PrismaModel> + } + export type NestedJsonNullableFilter<$PrismaModel = never> = + | PatchUndefined< + Either>, Exclude>, 'path'>>, + Required> + > + | OptionalFlat>, 'path'>> + + export type NestedJsonNullableFilterBase<$PrismaModel = never> = { + equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + path?: string[] + string_contains?: string | StringFieldRefInput<$PrismaModel> + string_starts_with?: string | StringFieldRefInput<$PrismaModel> + string_ends_with?: string | StringFieldRefInput<$PrismaModel> + array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + } + + export type NestedEnumPrizeTypeFilter<$PrismaModel = never> = { + equals?: $Enums.PrizeType | EnumPrizeTypeFieldRefInput<$PrismaModel> + in?: $Enums.PrizeType[] | ListEnumPrizeTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.PrizeType[] | ListEnumPrizeTypeFieldRefInput<$PrismaModel> + not?: NestedEnumPrizeTypeFilter<$PrismaModel> | $Enums.PrizeType + } + + export type NestedEnumStockTypeFilter<$PrismaModel = never> = { + equals?: $Enums.StockType | EnumStockTypeFieldRefInput<$PrismaModel> + in?: $Enums.StockType[] | ListEnumStockTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.StockType[] | ListEnumStockTypeFieldRefInput<$PrismaModel> + not?: NestedEnumStockTypeFilter<$PrismaModel> | $Enums.StockType + } + + export type NestedEnumPrizeStatusFilter<$PrismaModel = never> = { + equals?: $Enums.PrizeStatus | EnumPrizeStatusFieldRefInput<$PrismaModel> + in?: $Enums.PrizeStatus[] | ListEnumPrizeStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.PrizeStatus[] | ListEnumPrizeStatusFieldRefInput<$PrismaModel> + not?: NestedEnumPrizeStatusFilter<$PrismaModel> | $Enums.PrizeStatus + } + + export type NestedEnumPrizeTypeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.PrizeType | EnumPrizeTypeFieldRefInput<$PrismaModel> + in?: $Enums.PrizeType[] | ListEnumPrizeTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.PrizeType[] | ListEnumPrizeTypeFieldRefInput<$PrismaModel> + not?: NestedEnumPrizeTypeWithAggregatesFilter<$PrismaModel> | $Enums.PrizeType + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumPrizeTypeFilter<$PrismaModel> + _max?: NestedEnumPrizeTypeFilter<$PrismaModel> + } + + export type NestedEnumStockTypeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.StockType | EnumStockTypeFieldRefInput<$PrismaModel> + in?: $Enums.StockType[] | ListEnumStockTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.StockType[] | ListEnumStockTypeFieldRefInput<$PrismaModel> + not?: NestedEnumStockTypeWithAggregatesFilter<$PrismaModel> | $Enums.StockType + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumStockTypeFilter<$PrismaModel> + _max?: NestedEnumStockTypeFilter<$PrismaModel> + } + + export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | IntFieldRefInput<$PrismaModel> | null + in?: number[] | ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null + lt?: number | IntFieldRefInput<$PrismaModel> + lte?: number | IntFieldRefInput<$PrismaModel> + gt?: number | IntFieldRefInput<$PrismaModel> + gte?: number | IntFieldRefInput<$PrismaModel> + not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null + _count?: NestedIntNullableFilter<$PrismaModel> + _avg?: NestedFloatNullableFilter<$PrismaModel> + _sum?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedIntNullableFilter<$PrismaModel> + _max?: NestedIntNullableFilter<$PrismaModel> + } + + export type NestedFloatNullableFilter<$PrismaModel = never> = { + equals?: number | FloatFieldRefInput<$PrismaModel> | null + in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null + lt?: number | FloatFieldRefInput<$PrismaModel> + lte?: number | FloatFieldRefInput<$PrismaModel> + gt?: number | FloatFieldRefInput<$PrismaModel> + gte?: number | FloatFieldRefInput<$PrismaModel> + not?: NestedFloatNullableFilter<$PrismaModel> | number | null + } + + export type NestedEnumPrizeStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.PrizeStatus | EnumPrizeStatusFieldRefInput<$PrismaModel> + in?: $Enums.PrizeStatus[] | ListEnumPrizeStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.PrizeStatus[] | ListEnumPrizeStatusFieldRefInput<$PrismaModel> + not?: NestedEnumPrizeStatusWithAggregatesFilter<$PrismaModel> | $Enums.PrizeStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumPrizeStatusFilter<$PrismaModel> + _max?: NestedEnumPrizeStatusFilter<$PrismaModel> + } + + export type NestedEnumChanceTxnTypeFilter<$PrismaModel = never> = { + equals?: $Enums.ChanceTxnType | EnumChanceTxnTypeFieldRefInput<$PrismaModel> + in?: $Enums.ChanceTxnType[] | ListEnumChanceTxnTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.ChanceTxnType[] | ListEnumChanceTxnTypeFieldRefInput<$PrismaModel> + not?: NestedEnumChanceTxnTypeFilter<$PrismaModel> | $Enums.ChanceTxnType + } + + export type NestedEnumChanceTxnTypeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.ChanceTxnType | EnumChanceTxnTypeFieldRefInput<$PrismaModel> + in?: $Enums.ChanceTxnType[] | ListEnumChanceTxnTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.ChanceTxnType[] | ListEnumChanceTxnTypeFieldRefInput<$PrismaModel> + not?: NestedEnumChanceTxnTypeWithAggregatesFilter<$PrismaModel> | $Enums.ChanceTxnType + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumChanceTxnTypeFilter<$PrismaModel> + _max?: NestedEnumChanceTxnTypeFilter<$PrismaModel> + } + + export type NestedEnumSpinStatusFilter<$PrismaModel = never> = { + equals?: $Enums.SpinStatus | EnumSpinStatusFieldRefInput<$PrismaModel> + in?: $Enums.SpinStatus[] | ListEnumSpinStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.SpinStatus[] | ListEnumSpinStatusFieldRefInput<$PrismaModel> + not?: NestedEnumSpinStatusFilter<$PrismaModel> | $Enums.SpinStatus + } + + export type NestedEnumSpinStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.SpinStatus | EnumSpinStatusFieldRefInput<$PrismaModel> + in?: $Enums.SpinStatus[] | ListEnumSpinStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.SpinStatus[] | ListEnumSpinStatusFieldRefInput<$PrismaModel> + not?: NestedEnumSpinStatusWithAggregatesFilter<$PrismaModel> | $Enums.SpinStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumSpinStatusFilter<$PrismaModel> + _max?: NestedEnumSpinStatusFilter<$PrismaModel> + } + + export type NestedEnumUserPrizeStatusFilter<$PrismaModel = never> = { + equals?: $Enums.UserPrizeStatus | EnumUserPrizeStatusFieldRefInput<$PrismaModel> + in?: $Enums.UserPrizeStatus[] | ListEnumUserPrizeStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.UserPrizeStatus[] | ListEnumUserPrizeStatusFieldRefInput<$PrismaModel> + not?: NestedEnumUserPrizeStatusFilter<$PrismaModel> | $Enums.UserPrizeStatus + } + + export type NestedEnumUserPrizeStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.UserPrizeStatus | EnumUserPrizeStatusFieldRefInput<$PrismaModel> + in?: $Enums.UserPrizeStatus[] | ListEnumUserPrizeStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.UserPrizeStatus[] | ListEnumUserPrizeStatusFieldRefInput<$PrismaModel> + not?: NestedEnumUserPrizeStatusWithAggregatesFilter<$PrismaModel> | $Enums.UserPrizeStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumUserPrizeStatusFilter<$PrismaModel> + _max?: NestedEnumUserPrizeStatusFilter<$PrismaModel> + } + + export type NestedEnumSmsTypeFilter<$PrismaModel = never> = { + equals?: $Enums.SmsType | EnumSmsTypeFieldRefInput<$PrismaModel> + in?: $Enums.SmsType[] | ListEnumSmsTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.SmsType[] | ListEnumSmsTypeFieldRefInput<$PrismaModel> + not?: NestedEnumSmsTypeFilter<$PrismaModel> | $Enums.SmsType + } + + export type NestedEnumSmsStatusFilter<$PrismaModel = never> = { + equals?: $Enums.SmsStatus | EnumSmsStatusFieldRefInput<$PrismaModel> + in?: $Enums.SmsStatus[] | ListEnumSmsStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.SmsStatus[] | ListEnumSmsStatusFieldRefInput<$PrismaModel> + not?: NestedEnumSmsStatusFilter<$PrismaModel> | $Enums.SmsStatus + } + + export type NestedEnumSmsTypeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.SmsType | EnumSmsTypeFieldRefInput<$PrismaModel> + in?: $Enums.SmsType[] | ListEnumSmsTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.SmsType[] | ListEnumSmsTypeFieldRefInput<$PrismaModel> + not?: NestedEnumSmsTypeWithAggregatesFilter<$PrismaModel> | $Enums.SmsType + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumSmsTypeFilter<$PrismaModel> + _max?: NestedEnumSmsTypeFilter<$PrismaModel> + } + + export type NestedEnumSmsStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.SmsStatus | EnumSmsStatusFieldRefInput<$PrismaModel> + in?: $Enums.SmsStatus[] | ListEnumSmsStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.SmsStatus[] | ListEnumSmsStatusFieldRefInput<$PrismaModel> + not?: NestedEnumSmsStatusWithAggregatesFilter<$PrismaModel> | $Enums.SmsStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumSmsStatusFilter<$PrismaModel> + _max?: NestedEnumSmsStatusFilter<$PrismaModel> + } + + export type AdminLogCreateWithoutAdminInput = { + id?: string + action: string + entityType: string + entityId: string + oldValue?: NullableJsonNullValueInput | InputJsonValue + newValue?: NullableJsonNullValueInput | InputJsonValue + ip?: string | null + createdAt?: Date | string + } + + export type AdminLogUncheckedCreateWithoutAdminInput = { + id?: string + action: string + entityType: string + entityId: string + oldValue?: NullableJsonNullValueInput | InputJsonValue + newValue?: NullableJsonNullValueInput | InputJsonValue + ip?: string | null + createdAt?: Date | string + } + + export type AdminLogCreateOrConnectWithoutAdminInput = { + where: AdminLogWhereUniqueInput + create: XOR + } + + export type AdminLogCreateManyAdminInputEnvelope = { + data: AdminLogCreateManyAdminInput | AdminLogCreateManyAdminInput[] + skipDuplicates?: boolean + } + + export type ChanceTransactionCreateWithoutCreatedByInput = { + id?: string + amount: number + type: $Enums.ChanceTxnType + referenceType?: string | null + referenceId?: string | null + description?: string | null + createdAt?: Date | string + user: UserCreateNestedOneWithoutChanceTransactionsInput + campaign: CampaignCreateNestedOneWithoutChanceTxnsInput + } + + export type ChanceTransactionUncheckedCreateWithoutCreatedByInput = { + id?: string + userId: string + campaignId: string + amount: number + type: $Enums.ChanceTxnType + referenceType?: string | null + referenceId?: string | null + description?: string | null + createdAt?: Date | string + } + + export type ChanceTransactionCreateOrConnectWithoutCreatedByInput = { + where: ChanceTransactionWhereUniqueInput + create: XOR + } + + export type ChanceTransactionCreateManyCreatedByInputEnvelope = { + data: ChanceTransactionCreateManyCreatedByInput | ChanceTransactionCreateManyCreatedByInput[] + skipDuplicates?: boolean + } + + export type AdminLogUpsertWithWhereUniqueWithoutAdminInput = { + where: AdminLogWhereUniqueInput + update: XOR + create: XOR + } + + export type AdminLogUpdateWithWhereUniqueWithoutAdminInput = { + where: AdminLogWhereUniqueInput + data: XOR + } + + export type AdminLogUpdateManyWithWhereWithoutAdminInput = { + where: AdminLogScalarWhereInput + data: XOR + } + + export type AdminLogScalarWhereInput = { + AND?: AdminLogScalarWhereInput | AdminLogScalarWhereInput[] + OR?: AdminLogScalarWhereInput[] + NOT?: AdminLogScalarWhereInput | AdminLogScalarWhereInput[] + id?: StringFilter<"AdminLog"> | string + adminId?: StringFilter<"AdminLog"> | string + action?: StringFilter<"AdminLog"> | string + entityType?: StringFilter<"AdminLog"> | string + entityId?: StringFilter<"AdminLog"> | string + oldValue?: JsonNullableFilter<"AdminLog"> + newValue?: JsonNullableFilter<"AdminLog"> + ip?: StringNullableFilter<"AdminLog"> | string | null + createdAt?: DateTimeFilter<"AdminLog"> | Date | string + } + + export type ChanceTransactionUpsertWithWhereUniqueWithoutCreatedByInput = { + where: ChanceTransactionWhereUniqueInput + update: XOR + create: XOR + } + + export type ChanceTransactionUpdateWithWhereUniqueWithoutCreatedByInput = { + where: ChanceTransactionWhereUniqueInput + data: XOR + } + + export type ChanceTransactionUpdateManyWithWhereWithoutCreatedByInput = { + where: ChanceTransactionScalarWhereInput + data: XOR + } + + export type ChanceTransactionScalarWhereInput = { + AND?: ChanceTransactionScalarWhereInput | ChanceTransactionScalarWhereInput[] + OR?: ChanceTransactionScalarWhereInput[] + NOT?: ChanceTransactionScalarWhereInput | ChanceTransactionScalarWhereInput[] + id?: StringFilter<"ChanceTransaction"> | string + userId?: StringFilter<"ChanceTransaction"> | string + campaignId?: StringFilter<"ChanceTransaction"> | string + amount?: IntFilter<"ChanceTransaction"> | number + type?: EnumChanceTxnTypeFilter<"ChanceTransaction"> | $Enums.ChanceTxnType + referenceType?: StringNullableFilter<"ChanceTransaction"> | string | null + referenceId?: StringNullableFilter<"ChanceTransaction"> | string | null + description?: StringNullableFilter<"ChanceTransaction"> | string | null + createdById?: StringNullableFilter<"ChanceTransaction"> | string | null + createdAt?: DateTimeFilter<"ChanceTransaction"> | Date | string + } + + export type UserCampaignCreateWithoutUserInput = { + id?: string + totalChances?: number + usedChances?: number + createdAt?: Date | string + updatedAt?: Date | string + campaign: CampaignCreateNestedOneWithoutUserCampaignsInput + } + + export type UserCampaignUncheckedCreateWithoutUserInput = { + id?: string + campaignId: string + totalChances?: number + usedChances?: number + createdAt?: Date | string + updatedAt?: Date | string + } + + export type UserCampaignCreateOrConnectWithoutUserInput = { + where: UserCampaignWhereUniqueInput + create: XOR + } + + export type UserCampaignCreateManyUserInputEnvelope = { + data: UserCampaignCreateManyUserInput | UserCampaignCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type ChanceTransactionCreateWithoutUserInput = { + id?: string + amount: number + type: $Enums.ChanceTxnType + referenceType?: string | null + referenceId?: string | null + description?: string | null + createdAt?: Date | string + campaign: CampaignCreateNestedOneWithoutChanceTxnsInput + createdBy?: AdminCreateNestedOneWithoutChanceTxnsInput + } + + export type ChanceTransactionUncheckedCreateWithoutUserInput = { + id?: string + campaignId: string + amount: number + type: $Enums.ChanceTxnType + referenceType?: string | null + referenceId?: string | null + description?: string | null + createdById?: string | null + createdAt?: Date | string + } + + export type ChanceTransactionCreateOrConnectWithoutUserInput = { + where: ChanceTransactionWhereUniqueInput + create: XOR + } + + export type ChanceTransactionCreateManyUserInputEnvelope = { + data: ChanceTransactionCreateManyUserInput | ChanceTransactionCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type SpinCreateWithoutUserInput = { + id?: string + status?: $Enums.SpinStatus + idempotencyKey: string + ip?: string | null + userAgent?: string | null + createdAt?: Date | string + campaign: CampaignCreateNestedOneWithoutSpinsInput + prize?: PrizeCreateNestedOneWithoutSpinsInput + userPrize?: UserPrizeCreateNestedOneWithoutSpinInput + } + + export type SpinUncheckedCreateWithoutUserInput = { + id?: string + campaignId: string + prizeId?: string | null + status?: $Enums.SpinStatus + idempotencyKey: string + ip?: string | null + userAgent?: string | null + createdAt?: Date | string + userPrize?: UserPrizeUncheckedCreateNestedOneWithoutSpinInput + } + + export type SpinCreateOrConnectWithoutUserInput = { + where: SpinWhereUniqueInput + create: XOR + } + + export type SpinCreateManyUserInputEnvelope = { + data: SpinCreateManyUserInput | SpinCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type UserPrizeCreateWithoutUserInput = { + id?: string + code?: string | null + status?: $Enums.UserPrizeStatus + wonAt?: Date | string + redeemedAt?: Date | string | null + campaign: CampaignCreateNestedOneWithoutUserPrizesInput + prize: PrizeCreateNestedOneWithoutUserPrizesInput + spin: SpinCreateNestedOneWithoutUserPrizeInput + } + + export type UserPrizeUncheckedCreateWithoutUserInput = { + id?: string + campaignId: string + prizeId: string + spinId: string + code?: string | null + status?: $Enums.UserPrizeStatus + wonAt?: Date | string + redeemedAt?: Date | string | null + } + + export type UserPrizeCreateOrConnectWithoutUserInput = { + where: UserPrizeWhereUniqueInput + create: XOR + } + + export type UserPrizeCreateManyUserInputEnvelope = { + data: UserPrizeCreateManyUserInput | UserPrizeCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type OtpCodeCreateWithoutUserInput = { + id?: string + mobile: string + code: string + attempts?: number + consumed?: boolean + expiresAt: Date | string + createdAt?: Date | string + } + + export type OtpCodeUncheckedCreateWithoutUserInput = { + id?: string + mobile: string + code: string + attempts?: number + consumed?: boolean + expiresAt: Date | string + createdAt?: Date | string + } + + export type OtpCodeCreateOrConnectWithoutUserInput = { + where: OtpCodeWhereUniqueInput + create: XOR + } + + export type OtpCodeCreateManyUserInputEnvelope = { + data: OtpCodeCreateManyUserInput | OtpCodeCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type SmsLogCreateWithoutUserInput = { + id?: string + mobile: string + type: $Enums.SmsType + message: string + provider?: string + status?: $Enums.SmsStatus + providerResponse?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + } + + export type SmsLogUncheckedCreateWithoutUserInput = { + id?: string + mobile: string + type: $Enums.SmsType + message: string + provider?: string + status?: $Enums.SmsStatus + providerResponse?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + } + + export type SmsLogCreateOrConnectWithoutUserInput = { + where: SmsLogWhereUniqueInput + create: XOR + } + + export type SmsLogCreateManyUserInputEnvelope = { + data: SmsLogCreateManyUserInput | SmsLogCreateManyUserInput[] + skipDuplicates?: boolean + } + + export type UserCampaignUpsertWithWhereUniqueWithoutUserInput = { + where: UserCampaignWhereUniqueInput + update: XOR + create: XOR + } + + export type UserCampaignUpdateWithWhereUniqueWithoutUserInput = { + where: UserCampaignWhereUniqueInput + data: XOR + } + + export type UserCampaignUpdateManyWithWhereWithoutUserInput = { + where: UserCampaignScalarWhereInput + data: XOR + } + + export type UserCampaignScalarWhereInput = { + AND?: UserCampaignScalarWhereInput | UserCampaignScalarWhereInput[] + OR?: UserCampaignScalarWhereInput[] + NOT?: UserCampaignScalarWhereInput | UserCampaignScalarWhereInput[] + id?: StringFilter<"UserCampaign"> | string + userId?: StringFilter<"UserCampaign"> | string + campaignId?: StringFilter<"UserCampaign"> | string + totalChances?: IntFilter<"UserCampaign"> | number + usedChances?: IntFilter<"UserCampaign"> | number + createdAt?: DateTimeFilter<"UserCampaign"> | Date | string + updatedAt?: DateTimeFilter<"UserCampaign"> | Date | string + } + + export type ChanceTransactionUpsertWithWhereUniqueWithoutUserInput = { + where: ChanceTransactionWhereUniqueInput + update: XOR + create: XOR + } + + export type ChanceTransactionUpdateWithWhereUniqueWithoutUserInput = { + where: ChanceTransactionWhereUniqueInput + data: XOR + } + + export type ChanceTransactionUpdateManyWithWhereWithoutUserInput = { + where: ChanceTransactionScalarWhereInput + data: XOR + } + + export type SpinUpsertWithWhereUniqueWithoutUserInput = { + where: SpinWhereUniqueInput + update: XOR + create: XOR + } + + export type SpinUpdateWithWhereUniqueWithoutUserInput = { + where: SpinWhereUniqueInput + data: XOR + } + + export type SpinUpdateManyWithWhereWithoutUserInput = { + where: SpinScalarWhereInput + data: XOR + } + + export type SpinScalarWhereInput = { + AND?: SpinScalarWhereInput | SpinScalarWhereInput[] + OR?: SpinScalarWhereInput[] + NOT?: SpinScalarWhereInput | SpinScalarWhereInput[] + id?: StringFilter<"Spin"> | string + userId?: StringFilter<"Spin"> | string + campaignId?: StringFilter<"Spin"> | string + prizeId?: StringNullableFilter<"Spin"> | string | null + status?: EnumSpinStatusFilter<"Spin"> | $Enums.SpinStatus + idempotencyKey?: StringFilter<"Spin"> | string + ip?: StringNullableFilter<"Spin"> | string | null + userAgent?: StringNullableFilter<"Spin"> | string | null + createdAt?: DateTimeFilter<"Spin"> | Date | string + } + + export type UserPrizeUpsertWithWhereUniqueWithoutUserInput = { + where: UserPrizeWhereUniqueInput + update: XOR + create: XOR + } + + export type UserPrizeUpdateWithWhereUniqueWithoutUserInput = { + where: UserPrizeWhereUniqueInput + data: XOR + } + + export type UserPrizeUpdateManyWithWhereWithoutUserInput = { + where: UserPrizeScalarWhereInput + data: XOR + } + + export type UserPrizeScalarWhereInput = { + AND?: UserPrizeScalarWhereInput | UserPrizeScalarWhereInput[] + OR?: UserPrizeScalarWhereInput[] + NOT?: UserPrizeScalarWhereInput | UserPrizeScalarWhereInput[] + id?: StringFilter<"UserPrize"> | string + userId?: StringFilter<"UserPrize"> | string + campaignId?: StringFilter<"UserPrize"> | string + prizeId?: StringFilter<"UserPrize"> | string + spinId?: StringFilter<"UserPrize"> | string + code?: StringNullableFilter<"UserPrize"> | string | null + status?: EnumUserPrizeStatusFilter<"UserPrize"> | $Enums.UserPrizeStatus + wonAt?: DateTimeFilter<"UserPrize"> | Date | string + redeemedAt?: DateTimeNullableFilter<"UserPrize"> | Date | string | null + } + + export type OtpCodeUpsertWithWhereUniqueWithoutUserInput = { + where: OtpCodeWhereUniqueInput + update: XOR + create: XOR + } + + export type OtpCodeUpdateWithWhereUniqueWithoutUserInput = { + where: OtpCodeWhereUniqueInput + data: XOR + } + + export type OtpCodeUpdateManyWithWhereWithoutUserInput = { + where: OtpCodeScalarWhereInput + data: XOR + } + + export type OtpCodeScalarWhereInput = { + AND?: OtpCodeScalarWhereInput | OtpCodeScalarWhereInput[] + OR?: OtpCodeScalarWhereInput[] + NOT?: OtpCodeScalarWhereInput | OtpCodeScalarWhereInput[] + id?: StringFilter<"OtpCode"> | string + mobile?: StringFilter<"OtpCode"> | string + code?: StringFilter<"OtpCode"> | string + userId?: StringNullableFilter<"OtpCode"> | string | null + attempts?: IntFilter<"OtpCode"> | number + consumed?: BoolFilter<"OtpCode"> | boolean + expiresAt?: DateTimeFilter<"OtpCode"> | Date | string + createdAt?: DateTimeFilter<"OtpCode"> | Date | string + } + + export type SmsLogUpsertWithWhereUniqueWithoutUserInput = { + where: SmsLogWhereUniqueInput + update: XOR + create: XOR + } + + export type SmsLogUpdateWithWhereUniqueWithoutUserInput = { + where: SmsLogWhereUniqueInput + data: XOR + } + + export type SmsLogUpdateManyWithWhereWithoutUserInput = { + where: SmsLogScalarWhereInput + data: XOR + } + + export type SmsLogScalarWhereInput = { + AND?: SmsLogScalarWhereInput | SmsLogScalarWhereInput[] + OR?: SmsLogScalarWhereInput[] + NOT?: SmsLogScalarWhereInput | SmsLogScalarWhereInput[] + id?: StringFilter<"SmsLog"> | string + userId?: StringNullableFilter<"SmsLog"> | string | null + mobile?: StringFilter<"SmsLog"> | string + type?: EnumSmsTypeFilter<"SmsLog"> | $Enums.SmsType + message?: StringFilter<"SmsLog"> | string + provider?: StringFilter<"SmsLog"> | string + status?: EnumSmsStatusFilter<"SmsLog"> | $Enums.SmsStatus + providerResponse?: JsonNullableFilter<"SmsLog"> + createdAt?: DateTimeFilter<"SmsLog"> | Date | string + } + + export type UserCreateWithoutOtpCodesInput = { + id?: string + mobile: string + name?: string | null + status?: $Enums.UserStatus + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + userCampaigns?: UserCampaignCreateNestedManyWithoutUserInput + chanceTransactions?: ChanceTransactionCreateNestedManyWithoutUserInput + spins?: SpinCreateNestedManyWithoutUserInput + userPrizes?: UserPrizeCreateNestedManyWithoutUserInput + smsLogs?: SmsLogCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateWithoutOtpCodesInput = { + id?: string + mobile: string + name?: string | null + status?: $Enums.UserStatus + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutUserInput + chanceTransactions?: ChanceTransactionUncheckedCreateNestedManyWithoutUserInput + spins?: SpinUncheckedCreateNestedManyWithoutUserInput + userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutUserInput + smsLogs?: SmsLogUncheckedCreateNestedManyWithoutUserInput + } + + export type UserCreateOrConnectWithoutOtpCodesInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutOtpCodesInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutOtpCodesInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutOtpCodesInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + userCampaigns?: UserCampaignUpdateManyWithoutUserNestedInput + chanceTransactions?: ChanceTransactionUpdateManyWithoutUserNestedInput + spins?: SpinUpdateManyWithoutUserNestedInput + userPrizes?: UserPrizeUpdateManyWithoutUserNestedInput + smsLogs?: SmsLogUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutOtpCodesInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + userCampaigns?: UserCampaignUncheckedUpdateManyWithoutUserNestedInput + chanceTransactions?: ChanceTransactionUncheckedUpdateManyWithoutUserNestedInput + spins?: SpinUncheckedUpdateManyWithoutUserNestedInput + userPrizes?: UserPrizeUncheckedUpdateManyWithoutUserNestedInput + smsLogs?: SmsLogUncheckedUpdateManyWithoutUserNestedInput + } + + export type PrizeCreateWithoutCampaignInput = { + id?: string + title: string + description?: string | null + image?: string | null + type: $Enums.PrizeType + stockType: $Enums.StockType + initialStock?: number | null + remainingStock?: number | null + weight: number + status?: $Enums.PrizeStatus + sortOrder?: number + segmentColor: string + expiresAt?: Date | string | null + smsTemplate?: string | null + createdAt?: Date | string + updatedAt?: Date | string + spins?: SpinCreateNestedManyWithoutPrizeInput + userPrizes?: UserPrizeCreateNestedManyWithoutPrizeInput + } + + export type PrizeUncheckedCreateWithoutCampaignInput = { + id?: string + title: string + description?: string | null + image?: string | null + type: $Enums.PrizeType + stockType: $Enums.StockType + initialStock?: number | null + remainingStock?: number | null + weight: number + status?: $Enums.PrizeStatus + sortOrder?: number + segmentColor: string + expiresAt?: Date | string | null + smsTemplate?: string | null + createdAt?: Date | string + updatedAt?: Date | string + spins?: SpinUncheckedCreateNestedManyWithoutPrizeInput + userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutPrizeInput + } + + export type PrizeCreateOrConnectWithoutCampaignInput = { + where: PrizeWhereUniqueInput + create: XOR + } + + export type PrizeCreateManyCampaignInputEnvelope = { + data: PrizeCreateManyCampaignInput | PrizeCreateManyCampaignInput[] + skipDuplicates?: boolean + } + + export type UserCampaignCreateWithoutCampaignInput = { + id?: string + totalChances?: number + usedChances?: number + createdAt?: Date | string + updatedAt?: Date | string + user: UserCreateNestedOneWithoutUserCampaignsInput + } + + export type UserCampaignUncheckedCreateWithoutCampaignInput = { + id?: string + userId: string + totalChances?: number + usedChances?: number + createdAt?: Date | string + updatedAt?: Date | string + } + + export type UserCampaignCreateOrConnectWithoutCampaignInput = { + where: UserCampaignWhereUniqueInput + create: XOR + } + + export type UserCampaignCreateManyCampaignInputEnvelope = { + data: UserCampaignCreateManyCampaignInput | UserCampaignCreateManyCampaignInput[] + skipDuplicates?: boolean + } + + export type ChanceTransactionCreateWithoutCampaignInput = { + id?: string + amount: number + type: $Enums.ChanceTxnType + referenceType?: string | null + referenceId?: string | null + description?: string | null + createdAt?: Date | string + user: UserCreateNestedOneWithoutChanceTransactionsInput + createdBy?: AdminCreateNestedOneWithoutChanceTxnsInput + } + + export type ChanceTransactionUncheckedCreateWithoutCampaignInput = { + id?: string + userId: string + amount: number + type: $Enums.ChanceTxnType + referenceType?: string | null + referenceId?: string | null + description?: string | null + createdById?: string | null + createdAt?: Date | string + } + + export type ChanceTransactionCreateOrConnectWithoutCampaignInput = { + where: ChanceTransactionWhereUniqueInput + create: XOR + } + + export type ChanceTransactionCreateManyCampaignInputEnvelope = { + data: ChanceTransactionCreateManyCampaignInput | ChanceTransactionCreateManyCampaignInput[] + skipDuplicates?: boolean + } + + export type SpinCreateWithoutCampaignInput = { + id?: string + status?: $Enums.SpinStatus + idempotencyKey: string + ip?: string | null + userAgent?: string | null + createdAt?: Date | string + user: UserCreateNestedOneWithoutSpinsInput + prize?: PrizeCreateNestedOneWithoutSpinsInput + userPrize?: UserPrizeCreateNestedOneWithoutSpinInput + } + + export type SpinUncheckedCreateWithoutCampaignInput = { + id?: string + userId: string + prizeId?: string | null + status?: $Enums.SpinStatus + idempotencyKey: string + ip?: string | null + userAgent?: string | null + createdAt?: Date | string + userPrize?: UserPrizeUncheckedCreateNestedOneWithoutSpinInput + } + + export type SpinCreateOrConnectWithoutCampaignInput = { + where: SpinWhereUniqueInput + create: XOR + } + + export type SpinCreateManyCampaignInputEnvelope = { + data: SpinCreateManyCampaignInput | SpinCreateManyCampaignInput[] + skipDuplicates?: boolean + } + + export type UserPrizeCreateWithoutCampaignInput = { + id?: string + code?: string | null + status?: $Enums.UserPrizeStatus + wonAt?: Date | string + redeemedAt?: Date | string | null + user: UserCreateNestedOneWithoutUserPrizesInput + prize: PrizeCreateNestedOneWithoutUserPrizesInput + spin: SpinCreateNestedOneWithoutUserPrizeInput + } + + export type UserPrizeUncheckedCreateWithoutCampaignInput = { + id?: string + userId: string + prizeId: string + spinId: string + code?: string | null + status?: $Enums.UserPrizeStatus + wonAt?: Date | string + redeemedAt?: Date | string | null + } + + export type UserPrizeCreateOrConnectWithoutCampaignInput = { + where: UserPrizeWhereUniqueInput + create: XOR + } + + export type UserPrizeCreateManyCampaignInputEnvelope = { + data: UserPrizeCreateManyCampaignInput | UserPrizeCreateManyCampaignInput[] + skipDuplicates?: boolean + } + + export type PrizeUpsertWithWhereUniqueWithoutCampaignInput = { + where: PrizeWhereUniqueInput + update: XOR + create: XOR + } + + export type PrizeUpdateWithWhereUniqueWithoutCampaignInput = { + where: PrizeWhereUniqueInput + data: XOR + } + + export type PrizeUpdateManyWithWhereWithoutCampaignInput = { + where: PrizeScalarWhereInput + data: XOR + } + + export type PrizeScalarWhereInput = { + AND?: PrizeScalarWhereInput | PrizeScalarWhereInput[] + OR?: PrizeScalarWhereInput[] + NOT?: PrizeScalarWhereInput | PrizeScalarWhereInput[] + id?: StringFilter<"Prize"> | string + campaignId?: StringFilter<"Prize"> | string + title?: StringFilter<"Prize"> | string + description?: StringNullableFilter<"Prize"> | string | null + image?: StringNullableFilter<"Prize"> | string | null + type?: EnumPrizeTypeFilter<"Prize"> | $Enums.PrizeType + stockType?: EnumStockTypeFilter<"Prize"> | $Enums.StockType + initialStock?: IntNullableFilter<"Prize"> | number | null + remainingStock?: IntNullableFilter<"Prize"> | number | null + weight?: IntFilter<"Prize"> | number + status?: EnumPrizeStatusFilter<"Prize"> | $Enums.PrizeStatus + sortOrder?: IntFilter<"Prize"> | number + segmentColor?: StringFilter<"Prize"> | string + expiresAt?: DateTimeNullableFilter<"Prize"> | Date | string | null + smsTemplate?: StringNullableFilter<"Prize"> | string | null + createdAt?: DateTimeFilter<"Prize"> | Date | string + updatedAt?: DateTimeFilter<"Prize"> | Date | string + } + + export type UserCampaignUpsertWithWhereUniqueWithoutCampaignInput = { + where: UserCampaignWhereUniqueInput + update: XOR + create: XOR + } + + export type UserCampaignUpdateWithWhereUniqueWithoutCampaignInput = { + where: UserCampaignWhereUniqueInput + data: XOR + } + + export type UserCampaignUpdateManyWithWhereWithoutCampaignInput = { + where: UserCampaignScalarWhereInput + data: XOR + } + + export type ChanceTransactionUpsertWithWhereUniqueWithoutCampaignInput = { + where: ChanceTransactionWhereUniqueInput + update: XOR + create: XOR + } + + export type ChanceTransactionUpdateWithWhereUniqueWithoutCampaignInput = { + where: ChanceTransactionWhereUniqueInput + data: XOR + } + + export type ChanceTransactionUpdateManyWithWhereWithoutCampaignInput = { + where: ChanceTransactionScalarWhereInput + data: XOR + } + + export type SpinUpsertWithWhereUniqueWithoutCampaignInput = { + where: SpinWhereUniqueInput + update: XOR + create: XOR + } + + export type SpinUpdateWithWhereUniqueWithoutCampaignInput = { + where: SpinWhereUniqueInput + data: XOR + } + + export type SpinUpdateManyWithWhereWithoutCampaignInput = { + where: SpinScalarWhereInput + data: XOR + } + + export type UserPrizeUpsertWithWhereUniqueWithoutCampaignInput = { + where: UserPrizeWhereUniqueInput + update: XOR + create: XOR + } + + export type UserPrizeUpdateWithWhereUniqueWithoutCampaignInput = { + where: UserPrizeWhereUniqueInput + data: XOR + } + + export type UserPrizeUpdateManyWithWhereWithoutCampaignInput = { + where: UserPrizeScalarWhereInput + data: XOR + } + + export type CampaignCreateWithoutPrizesInput = { + id?: string + title: string + slug: string + description?: string | null + image?: string | null + banner?: string | null + logo?: string | null + startAt: Date | string + endAt: Date | string + status?: $Enums.CampaignStatus + defaultChances?: number + rules?: string | null + ctaText?: string | null + wheelDesign?: $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string + userCampaigns?: UserCampaignCreateNestedManyWithoutCampaignInput + chanceTxns?: ChanceTransactionCreateNestedManyWithoutCampaignInput + spins?: SpinCreateNestedManyWithoutCampaignInput + userPrizes?: UserPrizeCreateNestedManyWithoutCampaignInput + } + + export type CampaignUncheckedCreateWithoutPrizesInput = { + id?: string + title: string + slug: string + description?: string | null + image?: string | null + banner?: string | null + logo?: string | null + startAt: Date | string + endAt: Date | string + status?: $Enums.CampaignStatus + defaultChances?: number + rules?: string | null + ctaText?: string | null + wheelDesign?: $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string + userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutCampaignInput + chanceTxns?: ChanceTransactionUncheckedCreateNestedManyWithoutCampaignInput + spins?: SpinUncheckedCreateNestedManyWithoutCampaignInput + userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutCampaignInput + } + + export type CampaignCreateOrConnectWithoutPrizesInput = { + where: CampaignWhereUniqueInput + create: XOR + } + + export type SpinCreateWithoutPrizeInput = { + id?: string + status?: $Enums.SpinStatus + idempotencyKey: string + ip?: string | null + userAgent?: string | null + createdAt?: Date | string + user: UserCreateNestedOneWithoutSpinsInput + campaign: CampaignCreateNestedOneWithoutSpinsInput + userPrize?: UserPrizeCreateNestedOneWithoutSpinInput + } + + export type SpinUncheckedCreateWithoutPrizeInput = { + id?: string + userId: string + campaignId: string + status?: $Enums.SpinStatus + idempotencyKey: string + ip?: string | null + userAgent?: string | null + createdAt?: Date | string + userPrize?: UserPrizeUncheckedCreateNestedOneWithoutSpinInput + } + + export type SpinCreateOrConnectWithoutPrizeInput = { + where: SpinWhereUniqueInput + create: XOR + } + + export type SpinCreateManyPrizeInputEnvelope = { + data: SpinCreateManyPrizeInput | SpinCreateManyPrizeInput[] + skipDuplicates?: boolean + } + + export type UserPrizeCreateWithoutPrizeInput = { + id?: string + code?: string | null + status?: $Enums.UserPrizeStatus + wonAt?: Date | string + redeemedAt?: Date | string | null + user: UserCreateNestedOneWithoutUserPrizesInput + campaign: CampaignCreateNestedOneWithoutUserPrizesInput + spin: SpinCreateNestedOneWithoutUserPrizeInput + } + + export type UserPrizeUncheckedCreateWithoutPrizeInput = { + id?: string + userId: string + campaignId: string + spinId: string + code?: string | null + status?: $Enums.UserPrizeStatus + wonAt?: Date | string + redeemedAt?: Date | string | null + } + + export type UserPrizeCreateOrConnectWithoutPrizeInput = { + where: UserPrizeWhereUniqueInput + create: XOR + } + + export type UserPrizeCreateManyPrizeInputEnvelope = { + data: UserPrizeCreateManyPrizeInput | UserPrizeCreateManyPrizeInput[] + skipDuplicates?: boolean + } + + export type CampaignUpsertWithoutPrizesInput = { + update: XOR + create: XOR + where?: CampaignWhereInput + } + + export type CampaignUpdateToOneWithWhereWithoutPrizesInput = { + where?: CampaignWhereInput + data: XOR + } + + export type CampaignUpdateWithoutPrizesInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + slug?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + banner?: NullableStringFieldUpdateOperationsInput | string | null + logo?: NullableStringFieldUpdateOperationsInput | string | null + startAt?: DateTimeFieldUpdateOperationsInput | Date | string + endAt?: DateTimeFieldUpdateOperationsInput | Date | string + status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus + defaultChances?: IntFieldUpdateOperationsInput | number + rules?: NullableStringFieldUpdateOperationsInput | string | null + ctaText?: NullableStringFieldUpdateOperationsInput | string | null + wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + userCampaigns?: UserCampaignUpdateManyWithoutCampaignNestedInput + chanceTxns?: ChanceTransactionUpdateManyWithoutCampaignNestedInput + spins?: SpinUpdateManyWithoutCampaignNestedInput + userPrizes?: UserPrizeUpdateManyWithoutCampaignNestedInput + } + + export type CampaignUncheckedUpdateWithoutPrizesInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + slug?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + banner?: NullableStringFieldUpdateOperationsInput | string | null + logo?: NullableStringFieldUpdateOperationsInput | string | null + startAt?: DateTimeFieldUpdateOperationsInput | Date | string + endAt?: DateTimeFieldUpdateOperationsInput | Date | string + status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus + defaultChances?: IntFieldUpdateOperationsInput | number + rules?: NullableStringFieldUpdateOperationsInput | string | null + ctaText?: NullableStringFieldUpdateOperationsInput | string | null + wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + userCampaigns?: UserCampaignUncheckedUpdateManyWithoutCampaignNestedInput + chanceTxns?: ChanceTransactionUncheckedUpdateManyWithoutCampaignNestedInput + spins?: SpinUncheckedUpdateManyWithoutCampaignNestedInput + userPrizes?: UserPrizeUncheckedUpdateManyWithoutCampaignNestedInput + } + + export type SpinUpsertWithWhereUniqueWithoutPrizeInput = { + where: SpinWhereUniqueInput + update: XOR + create: XOR + } + + export type SpinUpdateWithWhereUniqueWithoutPrizeInput = { + where: SpinWhereUniqueInput + data: XOR + } + + export type SpinUpdateManyWithWhereWithoutPrizeInput = { + where: SpinScalarWhereInput + data: XOR + } + + export type UserPrizeUpsertWithWhereUniqueWithoutPrizeInput = { + where: UserPrizeWhereUniqueInput + update: XOR + create: XOR + } + + export type UserPrizeUpdateWithWhereUniqueWithoutPrizeInput = { + where: UserPrizeWhereUniqueInput + data: XOR + } + + export type UserPrizeUpdateManyWithWhereWithoutPrizeInput = { + where: UserPrizeScalarWhereInput + data: XOR + } + + export type UserCreateWithoutUserCampaignsInput = { + id?: string + mobile: string + name?: string | null + status?: $Enums.UserStatus + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + chanceTransactions?: ChanceTransactionCreateNestedManyWithoutUserInput + spins?: SpinCreateNestedManyWithoutUserInput + userPrizes?: UserPrizeCreateNestedManyWithoutUserInput + otpCodes?: OtpCodeCreateNestedManyWithoutUserInput + smsLogs?: SmsLogCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateWithoutUserCampaignsInput = { + id?: string + mobile: string + name?: string | null + status?: $Enums.UserStatus + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + chanceTransactions?: ChanceTransactionUncheckedCreateNestedManyWithoutUserInput + spins?: SpinUncheckedCreateNestedManyWithoutUserInput + userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutUserInput + otpCodes?: OtpCodeUncheckedCreateNestedManyWithoutUserInput + smsLogs?: SmsLogUncheckedCreateNestedManyWithoutUserInput + } + + export type UserCreateOrConnectWithoutUserCampaignsInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type CampaignCreateWithoutUserCampaignsInput = { + id?: string + title: string + slug: string + description?: string | null + image?: string | null + banner?: string | null + logo?: string | null + startAt: Date | string + endAt: Date | string + status?: $Enums.CampaignStatus + defaultChances?: number + rules?: string | null + ctaText?: string | null + wheelDesign?: $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string + prizes?: PrizeCreateNestedManyWithoutCampaignInput + chanceTxns?: ChanceTransactionCreateNestedManyWithoutCampaignInput + spins?: SpinCreateNestedManyWithoutCampaignInput + userPrizes?: UserPrizeCreateNestedManyWithoutCampaignInput + } + + export type CampaignUncheckedCreateWithoutUserCampaignsInput = { + id?: string + title: string + slug: string + description?: string | null + image?: string | null + banner?: string | null + logo?: string | null + startAt: Date | string + endAt: Date | string + status?: $Enums.CampaignStatus + defaultChances?: number + rules?: string | null + ctaText?: string | null + wheelDesign?: $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string + prizes?: PrizeUncheckedCreateNestedManyWithoutCampaignInput + chanceTxns?: ChanceTransactionUncheckedCreateNestedManyWithoutCampaignInput + spins?: SpinUncheckedCreateNestedManyWithoutCampaignInput + userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutCampaignInput + } + + export type CampaignCreateOrConnectWithoutUserCampaignsInput = { + where: CampaignWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutUserCampaignsInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutUserCampaignsInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutUserCampaignsInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + chanceTransactions?: ChanceTransactionUpdateManyWithoutUserNestedInput + spins?: SpinUpdateManyWithoutUserNestedInput + userPrizes?: UserPrizeUpdateManyWithoutUserNestedInput + otpCodes?: OtpCodeUpdateManyWithoutUserNestedInput + smsLogs?: SmsLogUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutUserCampaignsInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + chanceTransactions?: ChanceTransactionUncheckedUpdateManyWithoutUserNestedInput + spins?: SpinUncheckedUpdateManyWithoutUserNestedInput + userPrizes?: UserPrizeUncheckedUpdateManyWithoutUserNestedInput + otpCodes?: OtpCodeUncheckedUpdateManyWithoutUserNestedInput + smsLogs?: SmsLogUncheckedUpdateManyWithoutUserNestedInput + } + + export type CampaignUpsertWithoutUserCampaignsInput = { + update: XOR + create: XOR + where?: CampaignWhereInput + } + + export type CampaignUpdateToOneWithWhereWithoutUserCampaignsInput = { + where?: CampaignWhereInput + data: XOR + } + + export type CampaignUpdateWithoutUserCampaignsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + slug?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + banner?: NullableStringFieldUpdateOperationsInput | string | null + logo?: NullableStringFieldUpdateOperationsInput | string | null + startAt?: DateTimeFieldUpdateOperationsInput | Date | string + endAt?: DateTimeFieldUpdateOperationsInput | Date | string + status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus + defaultChances?: IntFieldUpdateOperationsInput | number + rules?: NullableStringFieldUpdateOperationsInput | string | null + ctaText?: NullableStringFieldUpdateOperationsInput | string | null + wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + prizes?: PrizeUpdateManyWithoutCampaignNestedInput + chanceTxns?: ChanceTransactionUpdateManyWithoutCampaignNestedInput + spins?: SpinUpdateManyWithoutCampaignNestedInput + userPrizes?: UserPrizeUpdateManyWithoutCampaignNestedInput + } + + export type CampaignUncheckedUpdateWithoutUserCampaignsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + slug?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + banner?: NullableStringFieldUpdateOperationsInput | string | null + logo?: NullableStringFieldUpdateOperationsInput | string | null + startAt?: DateTimeFieldUpdateOperationsInput | Date | string + endAt?: DateTimeFieldUpdateOperationsInput | Date | string + status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus + defaultChances?: IntFieldUpdateOperationsInput | number + rules?: NullableStringFieldUpdateOperationsInput | string | null + ctaText?: NullableStringFieldUpdateOperationsInput | string | null + wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + prizes?: PrizeUncheckedUpdateManyWithoutCampaignNestedInput + chanceTxns?: ChanceTransactionUncheckedUpdateManyWithoutCampaignNestedInput + spins?: SpinUncheckedUpdateManyWithoutCampaignNestedInput + userPrizes?: UserPrizeUncheckedUpdateManyWithoutCampaignNestedInput + } + + export type UserCreateWithoutChanceTransactionsInput = { + id?: string + mobile: string + name?: string | null + status?: $Enums.UserStatus + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + userCampaigns?: UserCampaignCreateNestedManyWithoutUserInput + spins?: SpinCreateNestedManyWithoutUserInput + userPrizes?: UserPrizeCreateNestedManyWithoutUserInput + otpCodes?: OtpCodeCreateNestedManyWithoutUserInput + smsLogs?: SmsLogCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateWithoutChanceTransactionsInput = { + id?: string + mobile: string + name?: string | null + status?: $Enums.UserStatus + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutUserInput + spins?: SpinUncheckedCreateNestedManyWithoutUserInput + userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutUserInput + otpCodes?: OtpCodeUncheckedCreateNestedManyWithoutUserInput + smsLogs?: SmsLogUncheckedCreateNestedManyWithoutUserInput + } + + export type UserCreateOrConnectWithoutChanceTransactionsInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type CampaignCreateWithoutChanceTxnsInput = { + id?: string + title: string + slug: string + description?: string | null + image?: string | null + banner?: string | null + logo?: string | null + startAt: Date | string + endAt: Date | string + status?: $Enums.CampaignStatus + defaultChances?: number + rules?: string | null + ctaText?: string | null + wheelDesign?: $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string + prizes?: PrizeCreateNestedManyWithoutCampaignInput + userCampaigns?: UserCampaignCreateNestedManyWithoutCampaignInput + spins?: SpinCreateNestedManyWithoutCampaignInput + userPrizes?: UserPrizeCreateNestedManyWithoutCampaignInput + } + + export type CampaignUncheckedCreateWithoutChanceTxnsInput = { + id?: string + title: string + slug: string + description?: string | null + image?: string | null + banner?: string | null + logo?: string | null + startAt: Date | string + endAt: Date | string + status?: $Enums.CampaignStatus + defaultChances?: number + rules?: string | null + ctaText?: string | null + wheelDesign?: $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string + prizes?: PrizeUncheckedCreateNestedManyWithoutCampaignInput + userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutCampaignInput + spins?: SpinUncheckedCreateNestedManyWithoutCampaignInput + userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutCampaignInput + } + + export type CampaignCreateOrConnectWithoutChanceTxnsInput = { + where: CampaignWhereUniqueInput + create: XOR + } + + export type AdminCreateWithoutChanceTxnsInput = { + id?: string + name: string + mobile: string + email: string + passwordHash: string + role?: $Enums.AdminRole + status?: $Enums.AdminStatus + createdAt?: Date | string + updatedAt?: Date | string + auditLogs?: AdminLogCreateNestedManyWithoutAdminInput + } + + export type AdminUncheckedCreateWithoutChanceTxnsInput = { + id?: string + name: string + mobile: string + email: string + passwordHash: string + role?: $Enums.AdminRole + status?: $Enums.AdminStatus + createdAt?: Date | string + updatedAt?: Date | string + auditLogs?: AdminLogUncheckedCreateNestedManyWithoutAdminInput + } + + export type AdminCreateOrConnectWithoutChanceTxnsInput = { + where: AdminWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutChanceTransactionsInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutChanceTransactionsInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutChanceTransactionsInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + userCampaigns?: UserCampaignUpdateManyWithoutUserNestedInput + spins?: SpinUpdateManyWithoutUserNestedInput + userPrizes?: UserPrizeUpdateManyWithoutUserNestedInput + otpCodes?: OtpCodeUpdateManyWithoutUserNestedInput + smsLogs?: SmsLogUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutChanceTransactionsInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + userCampaigns?: UserCampaignUncheckedUpdateManyWithoutUserNestedInput + spins?: SpinUncheckedUpdateManyWithoutUserNestedInput + userPrizes?: UserPrizeUncheckedUpdateManyWithoutUserNestedInput + otpCodes?: OtpCodeUncheckedUpdateManyWithoutUserNestedInput + smsLogs?: SmsLogUncheckedUpdateManyWithoutUserNestedInput + } + + export type CampaignUpsertWithoutChanceTxnsInput = { + update: XOR + create: XOR + where?: CampaignWhereInput + } + + export type CampaignUpdateToOneWithWhereWithoutChanceTxnsInput = { + where?: CampaignWhereInput + data: XOR + } + + export type CampaignUpdateWithoutChanceTxnsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + slug?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + banner?: NullableStringFieldUpdateOperationsInput | string | null + logo?: NullableStringFieldUpdateOperationsInput | string | null + startAt?: DateTimeFieldUpdateOperationsInput | Date | string + endAt?: DateTimeFieldUpdateOperationsInput | Date | string + status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus + defaultChances?: IntFieldUpdateOperationsInput | number + rules?: NullableStringFieldUpdateOperationsInput | string | null + ctaText?: NullableStringFieldUpdateOperationsInput | string | null + wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + prizes?: PrizeUpdateManyWithoutCampaignNestedInput + userCampaigns?: UserCampaignUpdateManyWithoutCampaignNestedInput + spins?: SpinUpdateManyWithoutCampaignNestedInput + userPrizes?: UserPrizeUpdateManyWithoutCampaignNestedInput + } + + export type CampaignUncheckedUpdateWithoutChanceTxnsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + slug?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + banner?: NullableStringFieldUpdateOperationsInput | string | null + logo?: NullableStringFieldUpdateOperationsInput | string | null + startAt?: DateTimeFieldUpdateOperationsInput | Date | string + endAt?: DateTimeFieldUpdateOperationsInput | Date | string + status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus + defaultChances?: IntFieldUpdateOperationsInput | number + rules?: NullableStringFieldUpdateOperationsInput | string | null + ctaText?: NullableStringFieldUpdateOperationsInput | string | null + wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + prizes?: PrizeUncheckedUpdateManyWithoutCampaignNestedInput + userCampaigns?: UserCampaignUncheckedUpdateManyWithoutCampaignNestedInput + spins?: SpinUncheckedUpdateManyWithoutCampaignNestedInput + userPrizes?: UserPrizeUncheckedUpdateManyWithoutCampaignNestedInput + } + + export type AdminUpsertWithoutChanceTxnsInput = { + update: XOR + create: XOR + where?: AdminWhereInput + } + + export type AdminUpdateToOneWithWhereWithoutChanceTxnsInput = { + where?: AdminWhereInput + data: XOR + } + + export type AdminUpdateWithoutChanceTxnsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + status?: EnumAdminStatusFieldUpdateOperationsInput | $Enums.AdminStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + auditLogs?: AdminLogUpdateManyWithoutAdminNestedInput + } + + export type AdminUncheckedUpdateWithoutChanceTxnsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + status?: EnumAdminStatusFieldUpdateOperationsInput | $Enums.AdminStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + auditLogs?: AdminLogUncheckedUpdateManyWithoutAdminNestedInput + } + + export type UserCreateWithoutSpinsInput = { + id?: string + mobile: string + name?: string | null + status?: $Enums.UserStatus + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + userCampaigns?: UserCampaignCreateNestedManyWithoutUserInput + chanceTransactions?: ChanceTransactionCreateNestedManyWithoutUserInput + userPrizes?: UserPrizeCreateNestedManyWithoutUserInput + otpCodes?: OtpCodeCreateNestedManyWithoutUserInput + smsLogs?: SmsLogCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateWithoutSpinsInput = { + id?: string + mobile: string + name?: string | null + status?: $Enums.UserStatus + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutUserInput + chanceTransactions?: ChanceTransactionUncheckedCreateNestedManyWithoutUserInput + userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutUserInput + otpCodes?: OtpCodeUncheckedCreateNestedManyWithoutUserInput + smsLogs?: SmsLogUncheckedCreateNestedManyWithoutUserInput + } + + export type UserCreateOrConnectWithoutSpinsInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type CampaignCreateWithoutSpinsInput = { + id?: string + title: string + slug: string + description?: string | null + image?: string | null + banner?: string | null + logo?: string | null + startAt: Date | string + endAt: Date | string + status?: $Enums.CampaignStatus + defaultChances?: number + rules?: string | null + ctaText?: string | null + wheelDesign?: $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string + prizes?: PrizeCreateNestedManyWithoutCampaignInput + userCampaigns?: UserCampaignCreateNestedManyWithoutCampaignInput + chanceTxns?: ChanceTransactionCreateNestedManyWithoutCampaignInput + userPrizes?: UserPrizeCreateNestedManyWithoutCampaignInput + } + + export type CampaignUncheckedCreateWithoutSpinsInput = { + id?: string + title: string + slug: string + description?: string | null + image?: string | null + banner?: string | null + logo?: string | null + startAt: Date | string + endAt: Date | string + status?: $Enums.CampaignStatus + defaultChances?: number + rules?: string | null + ctaText?: string | null + wheelDesign?: $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string + prizes?: PrizeUncheckedCreateNestedManyWithoutCampaignInput + userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutCampaignInput + chanceTxns?: ChanceTransactionUncheckedCreateNestedManyWithoutCampaignInput + userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutCampaignInput + } + + export type CampaignCreateOrConnectWithoutSpinsInput = { + where: CampaignWhereUniqueInput + create: XOR + } + + export type PrizeCreateWithoutSpinsInput = { + id?: string + title: string + description?: string | null + image?: string | null + type: $Enums.PrizeType + stockType: $Enums.StockType + initialStock?: number | null + remainingStock?: number | null + weight: number + status?: $Enums.PrizeStatus + sortOrder?: number + segmentColor: string + expiresAt?: Date | string | null + smsTemplate?: string | null + createdAt?: Date | string + updatedAt?: Date | string + campaign: CampaignCreateNestedOneWithoutPrizesInput + userPrizes?: UserPrizeCreateNestedManyWithoutPrizeInput + } + + export type PrizeUncheckedCreateWithoutSpinsInput = { + id?: string + campaignId: string + title: string + description?: string | null + image?: string | null + type: $Enums.PrizeType + stockType: $Enums.StockType + initialStock?: number | null + remainingStock?: number | null + weight: number + status?: $Enums.PrizeStatus + sortOrder?: number + segmentColor: string + expiresAt?: Date | string | null + smsTemplate?: string | null + createdAt?: Date | string + updatedAt?: Date | string + userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutPrizeInput + } + + export type PrizeCreateOrConnectWithoutSpinsInput = { + where: PrizeWhereUniqueInput + create: XOR + } + + export type UserPrizeCreateWithoutSpinInput = { + id?: string + code?: string | null + status?: $Enums.UserPrizeStatus + wonAt?: Date | string + redeemedAt?: Date | string | null + user: UserCreateNestedOneWithoutUserPrizesInput + campaign: CampaignCreateNestedOneWithoutUserPrizesInput + prize: PrizeCreateNestedOneWithoutUserPrizesInput + } + + export type UserPrizeUncheckedCreateWithoutSpinInput = { + id?: string + userId: string + campaignId: string + prizeId: string + code?: string | null + status?: $Enums.UserPrizeStatus + wonAt?: Date | string + redeemedAt?: Date | string | null + } + + export type UserPrizeCreateOrConnectWithoutSpinInput = { + where: UserPrizeWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutSpinsInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutSpinsInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutSpinsInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + userCampaigns?: UserCampaignUpdateManyWithoutUserNestedInput + chanceTransactions?: ChanceTransactionUpdateManyWithoutUserNestedInput + userPrizes?: UserPrizeUpdateManyWithoutUserNestedInput + otpCodes?: OtpCodeUpdateManyWithoutUserNestedInput + smsLogs?: SmsLogUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutSpinsInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + userCampaigns?: UserCampaignUncheckedUpdateManyWithoutUserNestedInput + chanceTransactions?: ChanceTransactionUncheckedUpdateManyWithoutUserNestedInput + userPrizes?: UserPrizeUncheckedUpdateManyWithoutUserNestedInput + otpCodes?: OtpCodeUncheckedUpdateManyWithoutUserNestedInput + smsLogs?: SmsLogUncheckedUpdateManyWithoutUserNestedInput + } + + export type CampaignUpsertWithoutSpinsInput = { + update: XOR + create: XOR + where?: CampaignWhereInput + } + + export type CampaignUpdateToOneWithWhereWithoutSpinsInput = { + where?: CampaignWhereInput + data: XOR + } + + export type CampaignUpdateWithoutSpinsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + slug?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + banner?: NullableStringFieldUpdateOperationsInput | string | null + logo?: NullableStringFieldUpdateOperationsInput | string | null + startAt?: DateTimeFieldUpdateOperationsInput | Date | string + endAt?: DateTimeFieldUpdateOperationsInput | Date | string + status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus + defaultChances?: IntFieldUpdateOperationsInput | number + rules?: NullableStringFieldUpdateOperationsInput | string | null + ctaText?: NullableStringFieldUpdateOperationsInput | string | null + wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + prizes?: PrizeUpdateManyWithoutCampaignNestedInput + userCampaigns?: UserCampaignUpdateManyWithoutCampaignNestedInput + chanceTxns?: ChanceTransactionUpdateManyWithoutCampaignNestedInput + userPrizes?: UserPrizeUpdateManyWithoutCampaignNestedInput + } + + export type CampaignUncheckedUpdateWithoutSpinsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + slug?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + banner?: NullableStringFieldUpdateOperationsInput | string | null + logo?: NullableStringFieldUpdateOperationsInput | string | null + startAt?: DateTimeFieldUpdateOperationsInput | Date | string + endAt?: DateTimeFieldUpdateOperationsInput | Date | string + status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus + defaultChances?: IntFieldUpdateOperationsInput | number + rules?: NullableStringFieldUpdateOperationsInput | string | null + ctaText?: NullableStringFieldUpdateOperationsInput | string | null + wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + prizes?: PrizeUncheckedUpdateManyWithoutCampaignNestedInput + userCampaigns?: UserCampaignUncheckedUpdateManyWithoutCampaignNestedInput + chanceTxns?: ChanceTransactionUncheckedUpdateManyWithoutCampaignNestedInput + userPrizes?: UserPrizeUncheckedUpdateManyWithoutCampaignNestedInput + } + + export type PrizeUpsertWithoutSpinsInput = { + update: XOR + create: XOR + where?: PrizeWhereInput + } + + export type PrizeUpdateToOneWithWhereWithoutSpinsInput = { + where?: PrizeWhereInput + data: XOR + } + + export type PrizeUpdateWithoutSpinsInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType + stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType + initialStock?: NullableIntFieldUpdateOperationsInput | number | null + remainingStock?: NullableIntFieldUpdateOperationsInput | number | null + weight?: IntFieldUpdateOperationsInput | number + status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus + sortOrder?: IntFieldUpdateOperationsInput | number + segmentColor?: StringFieldUpdateOperationsInput | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + campaign?: CampaignUpdateOneRequiredWithoutPrizesNestedInput + userPrizes?: UserPrizeUpdateManyWithoutPrizeNestedInput + } + + export type PrizeUncheckedUpdateWithoutSpinsInput = { + id?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType + stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType + initialStock?: NullableIntFieldUpdateOperationsInput | number | null + remainingStock?: NullableIntFieldUpdateOperationsInput | number | null + weight?: IntFieldUpdateOperationsInput | number + status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus + sortOrder?: IntFieldUpdateOperationsInput | number + segmentColor?: StringFieldUpdateOperationsInput | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + userPrizes?: UserPrizeUncheckedUpdateManyWithoutPrizeNestedInput + } + + export type UserPrizeUpsertWithoutSpinInput = { + update: XOR + create: XOR + where?: UserPrizeWhereInput + } + + export type UserPrizeUpdateToOneWithWhereWithoutSpinInput = { + where?: UserPrizeWhereInput + data: XOR + } + + export type UserPrizeUpdateWithoutSpinInput = { + id?: StringFieldUpdateOperationsInput | string + code?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus + wonAt?: DateTimeFieldUpdateOperationsInput | Date | string + redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + user?: UserUpdateOneRequiredWithoutUserPrizesNestedInput + campaign?: CampaignUpdateOneRequiredWithoutUserPrizesNestedInput + prize?: PrizeUpdateOneRequiredWithoutUserPrizesNestedInput + } + + export type UserPrizeUncheckedUpdateWithoutSpinInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + prizeId?: StringFieldUpdateOperationsInput | string + code?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus + wonAt?: DateTimeFieldUpdateOperationsInput | Date | string + redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type UserCreateWithoutUserPrizesInput = { + id?: string + mobile: string + name?: string | null + status?: $Enums.UserStatus + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + userCampaigns?: UserCampaignCreateNestedManyWithoutUserInput + chanceTransactions?: ChanceTransactionCreateNestedManyWithoutUserInput + spins?: SpinCreateNestedManyWithoutUserInput + otpCodes?: OtpCodeCreateNestedManyWithoutUserInput + smsLogs?: SmsLogCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateWithoutUserPrizesInput = { + id?: string + mobile: string + name?: string | null + status?: $Enums.UserStatus + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutUserInput + chanceTransactions?: ChanceTransactionUncheckedCreateNestedManyWithoutUserInput + spins?: SpinUncheckedCreateNestedManyWithoutUserInput + otpCodes?: OtpCodeUncheckedCreateNestedManyWithoutUserInput + smsLogs?: SmsLogUncheckedCreateNestedManyWithoutUserInput + } + + export type UserCreateOrConnectWithoutUserPrizesInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type CampaignCreateWithoutUserPrizesInput = { + id?: string + title: string + slug: string + description?: string | null + image?: string | null + banner?: string | null + logo?: string | null + startAt: Date | string + endAt: Date | string + status?: $Enums.CampaignStatus + defaultChances?: number + rules?: string | null + ctaText?: string | null + wheelDesign?: $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string + prizes?: PrizeCreateNestedManyWithoutCampaignInput + userCampaigns?: UserCampaignCreateNestedManyWithoutCampaignInput + chanceTxns?: ChanceTransactionCreateNestedManyWithoutCampaignInput + spins?: SpinCreateNestedManyWithoutCampaignInput + } + + export type CampaignUncheckedCreateWithoutUserPrizesInput = { + id?: string + title: string + slug: string + description?: string | null + image?: string | null + banner?: string | null + logo?: string | null + startAt: Date | string + endAt: Date | string + status?: $Enums.CampaignStatus + defaultChances?: number + rules?: string | null + ctaText?: string | null + wheelDesign?: $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string + prizes?: PrizeUncheckedCreateNestedManyWithoutCampaignInput + userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutCampaignInput + chanceTxns?: ChanceTransactionUncheckedCreateNestedManyWithoutCampaignInput + spins?: SpinUncheckedCreateNestedManyWithoutCampaignInput + } + + export type CampaignCreateOrConnectWithoutUserPrizesInput = { + where: CampaignWhereUniqueInput + create: XOR + } + + export type PrizeCreateWithoutUserPrizesInput = { + id?: string + title: string + description?: string | null + image?: string | null + type: $Enums.PrizeType + stockType: $Enums.StockType + initialStock?: number | null + remainingStock?: number | null + weight: number + status?: $Enums.PrizeStatus + sortOrder?: number + segmentColor: string + expiresAt?: Date | string | null + smsTemplate?: string | null + createdAt?: Date | string + updatedAt?: Date | string + campaign: CampaignCreateNestedOneWithoutPrizesInput + spins?: SpinCreateNestedManyWithoutPrizeInput + } + + export type PrizeUncheckedCreateWithoutUserPrizesInput = { + id?: string + campaignId: string + title: string + description?: string | null + image?: string | null + type: $Enums.PrizeType + stockType: $Enums.StockType + initialStock?: number | null + remainingStock?: number | null + weight: number + status?: $Enums.PrizeStatus + sortOrder?: number + segmentColor: string + expiresAt?: Date | string | null + smsTemplate?: string | null + createdAt?: Date | string + updatedAt?: Date | string + spins?: SpinUncheckedCreateNestedManyWithoutPrizeInput + } + + export type PrizeCreateOrConnectWithoutUserPrizesInput = { + where: PrizeWhereUniqueInput + create: XOR + } + + export type SpinCreateWithoutUserPrizeInput = { + id?: string + status?: $Enums.SpinStatus + idempotencyKey: string + ip?: string | null + userAgent?: string | null + createdAt?: Date | string + user: UserCreateNestedOneWithoutSpinsInput + campaign: CampaignCreateNestedOneWithoutSpinsInput + prize?: PrizeCreateNestedOneWithoutSpinsInput + } + + export type SpinUncheckedCreateWithoutUserPrizeInput = { + id?: string + userId: string + campaignId: string + prizeId?: string | null + status?: $Enums.SpinStatus + idempotencyKey: string + ip?: string | null + userAgent?: string | null + createdAt?: Date | string + } + + export type SpinCreateOrConnectWithoutUserPrizeInput = { + where: SpinWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutUserPrizesInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutUserPrizesInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutUserPrizesInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + userCampaigns?: UserCampaignUpdateManyWithoutUserNestedInput + chanceTransactions?: ChanceTransactionUpdateManyWithoutUserNestedInput + spins?: SpinUpdateManyWithoutUserNestedInput + otpCodes?: OtpCodeUpdateManyWithoutUserNestedInput + smsLogs?: SmsLogUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutUserPrizesInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + userCampaigns?: UserCampaignUncheckedUpdateManyWithoutUserNestedInput + chanceTransactions?: ChanceTransactionUncheckedUpdateManyWithoutUserNestedInput + spins?: SpinUncheckedUpdateManyWithoutUserNestedInput + otpCodes?: OtpCodeUncheckedUpdateManyWithoutUserNestedInput + smsLogs?: SmsLogUncheckedUpdateManyWithoutUserNestedInput + } + + export type CampaignUpsertWithoutUserPrizesInput = { + update: XOR + create: XOR + where?: CampaignWhereInput + } + + export type CampaignUpdateToOneWithWhereWithoutUserPrizesInput = { + where?: CampaignWhereInput + data: XOR + } + + export type CampaignUpdateWithoutUserPrizesInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + slug?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + banner?: NullableStringFieldUpdateOperationsInput | string | null + logo?: NullableStringFieldUpdateOperationsInput | string | null + startAt?: DateTimeFieldUpdateOperationsInput | Date | string + endAt?: DateTimeFieldUpdateOperationsInput | Date | string + status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus + defaultChances?: IntFieldUpdateOperationsInput | number + rules?: NullableStringFieldUpdateOperationsInput | string | null + ctaText?: NullableStringFieldUpdateOperationsInput | string | null + wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + prizes?: PrizeUpdateManyWithoutCampaignNestedInput + userCampaigns?: UserCampaignUpdateManyWithoutCampaignNestedInput + chanceTxns?: ChanceTransactionUpdateManyWithoutCampaignNestedInput + spins?: SpinUpdateManyWithoutCampaignNestedInput + } + + export type CampaignUncheckedUpdateWithoutUserPrizesInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + slug?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + banner?: NullableStringFieldUpdateOperationsInput | string | null + logo?: NullableStringFieldUpdateOperationsInput | string | null + startAt?: DateTimeFieldUpdateOperationsInput | Date | string + endAt?: DateTimeFieldUpdateOperationsInput | Date | string + status?: EnumCampaignStatusFieldUpdateOperationsInput | $Enums.CampaignStatus + defaultChances?: IntFieldUpdateOperationsInput | number + rules?: NullableStringFieldUpdateOperationsInput | string | null + ctaText?: NullableStringFieldUpdateOperationsInput | string | null + wheelDesign?: EnumWheelDesignFieldUpdateOperationsInput | $Enums.WheelDesign + settings?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + prizes?: PrizeUncheckedUpdateManyWithoutCampaignNestedInput + userCampaigns?: UserCampaignUncheckedUpdateManyWithoutCampaignNestedInput + chanceTxns?: ChanceTransactionUncheckedUpdateManyWithoutCampaignNestedInput + spins?: SpinUncheckedUpdateManyWithoutCampaignNestedInput + } + + export type PrizeUpsertWithoutUserPrizesInput = { + update: XOR + create: XOR + where?: PrizeWhereInput + } + + export type PrizeUpdateToOneWithWhereWithoutUserPrizesInput = { + where?: PrizeWhereInput + data: XOR + } + + export type PrizeUpdateWithoutUserPrizesInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType + stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType + initialStock?: NullableIntFieldUpdateOperationsInput | number | null + remainingStock?: NullableIntFieldUpdateOperationsInput | number | null + weight?: IntFieldUpdateOperationsInput | number + status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus + sortOrder?: IntFieldUpdateOperationsInput | number + segmentColor?: StringFieldUpdateOperationsInput | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + campaign?: CampaignUpdateOneRequiredWithoutPrizesNestedInput + spins?: SpinUpdateManyWithoutPrizeNestedInput + } + + export type PrizeUncheckedUpdateWithoutUserPrizesInput = { + id?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType + stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType + initialStock?: NullableIntFieldUpdateOperationsInput | number | null + remainingStock?: NullableIntFieldUpdateOperationsInput | number | null + weight?: IntFieldUpdateOperationsInput | number + status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus + sortOrder?: IntFieldUpdateOperationsInput | number + segmentColor?: StringFieldUpdateOperationsInput | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + spins?: SpinUncheckedUpdateManyWithoutPrizeNestedInput + } + + export type SpinUpsertWithoutUserPrizeInput = { + update: XOR + create: XOR + where?: SpinWhereInput + } + + export type SpinUpdateToOneWithWhereWithoutUserPrizeInput = { + where?: SpinWhereInput + data: XOR + } + + export type SpinUpdateWithoutUserPrizeInput = { + id?: StringFieldUpdateOperationsInput | string + status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus + idempotencyKey?: StringFieldUpdateOperationsInput | string + ip?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutSpinsNestedInput + campaign?: CampaignUpdateOneRequiredWithoutSpinsNestedInput + prize?: PrizeUpdateOneWithoutSpinsNestedInput + } + + export type SpinUncheckedUpdateWithoutUserPrizeInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + prizeId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus + idempotencyKey?: StringFieldUpdateOperationsInput | string + ip?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type UserCreateWithoutSmsLogsInput = { + id?: string + mobile: string + name?: string | null + status?: $Enums.UserStatus + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + userCampaigns?: UserCampaignCreateNestedManyWithoutUserInput + chanceTransactions?: ChanceTransactionCreateNestedManyWithoutUserInput + spins?: SpinCreateNestedManyWithoutUserInput + userPrizes?: UserPrizeCreateNestedManyWithoutUserInput + otpCodes?: OtpCodeCreateNestedManyWithoutUserInput + } + + export type UserUncheckedCreateWithoutSmsLogsInput = { + id?: string + mobile: string + name?: string | null + status?: $Enums.UserStatus + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + userCampaigns?: UserCampaignUncheckedCreateNestedManyWithoutUserInput + chanceTransactions?: ChanceTransactionUncheckedCreateNestedManyWithoutUserInput + spins?: SpinUncheckedCreateNestedManyWithoutUserInput + userPrizes?: UserPrizeUncheckedCreateNestedManyWithoutUserInput + otpCodes?: OtpCodeUncheckedCreateNestedManyWithoutUserInput + } + + export type UserCreateOrConnectWithoutSmsLogsInput = { + where: UserWhereUniqueInput + create: XOR + } + + export type UserUpsertWithoutSmsLogsInput = { + update: XOR + create: XOR + where?: UserWhereInput + } + + export type UserUpdateToOneWithWhereWithoutSmsLogsInput = { + where?: UserWhereInput + data: XOR + } + + export type UserUpdateWithoutSmsLogsInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + userCampaigns?: UserCampaignUpdateManyWithoutUserNestedInput + chanceTransactions?: ChanceTransactionUpdateManyWithoutUserNestedInput + spins?: SpinUpdateManyWithoutUserNestedInput + userPrizes?: UserPrizeUpdateManyWithoutUserNestedInput + otpCodes?: OtpCodeUpdateManyWithoutUserNestedInput + } + + export type UserUncheckedUpdateWithoutSmsLogsInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + name?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserStatusFieldUpdateOperationsInput | $Enums.UserStatus + lastLoginAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + userCampaigns?: UserCampaignUncheckedUpdateManyWithoutUserNestedInput + chanceTransactions?: ChanceTransactionUncheckedUpdateManyWithoutUserNestedInput + spins?: SpinUncheckedUpdateManyWithoutUserNestedInput + userPrizes?: UserPrizeUncheckedUpdateManyWithoutUserNestedInput + otpCodes?: OtpCodeUncheckedUpdateManyWithoutUserNestedInput + } + + export type AdminCreateWithoutAuditLogsInput = { + id?: string + name: string + mobile: string + email: string + passwordHash: string + role?: $Enums.AdminRole + status?: $Enums.AdminStatus + createdAt?: Date | string + updatedAt?: Date | string + chanceTxns?: ChanceTransactionCreateNestedManyWithoutCreatedByInput + } + + export type AdminUncheckedCreateWithoutAuditLogsInput = { + id?: string + name: string + mobile: string + email: string + passwordHash: string + role?: $Enums.AdminRole + status?: $Enums.AdminStatus + createdAt?: Date | string + updatedAt?: Date | string + chanceTxns?: ChanceTransactionUncheckedCreateNestedManyWithoutCreatedByInput + } + + export type AdminCreateOrConnectWithoutAuditLogsInput = { + where: AdminWhereUniqueInput + create: XOR + } + + export type AdminUpsertWithoutAuditLogsInput = { + update: XOR + create: XOR + where?: AdminWhereInput + } + + export type AdminUpdateToOneWithWhereWithoutAuditLogsInput = { + where?: AdminWhereInput + data: XOR + } + + export type AdminUpdateWithoutAuditLogsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + status?: EnumAdminStatusFieldUpdateOperationsInput | $Enums.AdminStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + chanceTxns?: ChanceTransactionUpdateManyWithoutCreatedByNestedInput + } + + export type AdminUncheckedUpdateWithoutAuditLogsInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + email?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + status?: EnumAdminStatusFieldUpdateOperationsInput | $Enums.AdminStatus + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + chanceTxns?: ChanceTransactionUncheckedUpdateManyWithoutCreatedByNestedInput + } + + export type AdminLogCreateManyAdminInput = { + id?: string + action: string + entityType: string + entityId: string + oldValue?: NullableJsonNullValueInput | InputJsonValue + newValue?: NullableJsonNullValueInput | InputJsonValue + ip?: string | null + createdAt?: Date | string + } + + export type ChanceTransactionCreateManyCreatedByInput = { + id?: string + userId: string + campaignId: string + amount: number + type: $Enums.ChanceTxnType + referenceType?: string | null + referenceId?: string | null + description?: string | null + createdAt?: Date | string + } + + export type AdminLogUpdateWithoutAdminInput = { + id?: StringFieldUpdateOperationsInput | string + action?: StringFieldUpdateOperationsInput | string + entityType?: StringFieldUpdateOperationsInput | string + entityId?: StringFieldUpdateOperationsInput | string + oldValue?: NullableJsonNullValueInput | InputJsonValue + newValue?: NullableJsonNullValueInput | InputJsonValue + ip?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AdminLogUncheckedUpdateWithoutAdminInput = { + id?: StringFieldUpdateOperationsInput | string + action?: StringFieldUpdateOperationsInput | string + entityType?: StringFieldUpdateOperationsInput | string + entityId?: StringFieldUpdateOperationsInput | string + oldValue?: NullableJsonNullValueInput | InputJsonValue + newValue?: NullableJsonNullValueInput | InputJsonValue + ip?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AdminLogUncheckedUpdateManyWithoutAdminInput = { + id?: StringFieldUpdateOperationsInput | string + action?: StringFieldUpdateOperationsInput | string + entityType?: StringFieldUpdateOperationsInput | string + entityId?: StringFieldUpdateOperationsInput | string + oldValue?: NullableJsonNullValueInput | InputJsonValue + newValue?: NullableJsonNullValueInput | InputJsonValue + ip?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type ChanceTransactionUpdateWithoutCreatedByInput = { + id?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType + referenceType?: NullableStringFieldUpdateOperationsInput | string | null + referenceId?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutChanceTransactionsNestedInput + campaign?: CampaignUpdateOneRequiredWithoutChanceTxnsNestedInput + } + + export type ChanceTransactionUncheckedUpdateWithoutCreatedByInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType + referenceType?: NullableStringFieldUpdateOperationsInput | string | null + referenceId?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type ChanceTransactionUncheckedUpdateManyWithoutCreatedByInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType + referenceType?: NullableStringFieldUpdateOperationsInput | string | null + referenceId?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type UserCampaignCreateManyUserInput = { + id?: string + campaignId: string + totalChances?: number + usedChances?: number + createdAt?: Date | string + updatedAt?: Date | string + } + + export type ChanceTransactionCreateManyUserInput = { + id?: string + campaignId: string + amount: number + type: $Enums.ChanceTxnType + referenceType?: string | null + referenceId?: string | null + description?: string | null + createdById?: string | null + createdAt?: Date | string + } + + export type SpinCreateManyUserInput = { + id?: string + campaignId: string + prizeId?: string | null + status?: $Enums.SpinStatus + idempotencyKey: string + ip?: string | null + userAgent?: string | null + createdAt?: Date | string + } + + export type UserPrizeCreateManyUserInput = { + id?: string + campaignId: string + prizeId: string + spinId: string + code?: string | null + status?: $Enums.UserPrizeStatus + wonAt?: Date | string + redeemedAt?: Date | string | null + } + + export type OtpCodeCreateManyUserInput = { + id?: string + mobile: string + code: string + attempts?: number + consumed?: boolean + expiresAt: Date | string + createdAt?: Date | string + } + + export type SmsLogCreateManyUserInput = { + id?: string + mobile: string + type: $Enums.SmsType + message: string + provider?: string + status?: $Enums.SmsStatus + providerResponse?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + } + + export type UserCampaignUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + totalChances?: IntFieldUpdateOperationsInput | number + usedChances?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + campaign?: CampaignUpdateOneRequiredWithoutUserCampaignsNestedInput + } + + export type UserCampaignUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + totalChances?: IntFieldUpdateOperationsInput | number + usedChances?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type UserCampaignUncheckedUpdateManyWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + totalChances?: IntFieldUpdateOperationsInput | number + usedChances?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type ChanceTransactionUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType + referenceType?: NullableStringFieldUpdateOperationsInput | string | null + referenceId?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + campaign?: CampaignUpdateOneRequiredWithoutChanceTxnsNestedInput + createdBy?: AdminUpdateOneWithoutChanceTxnsNestedInput + } + + export type ChanceTransactionUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType + referenceType?: NullableStringFieldUpdateOperationsInput | string | null + referenceId?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdById?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type ChanceTransactionUncheckedUpdateManyWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType + referenceType?: NullableStringFieldUpdateOperationsInput | string | null + referenceId?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdById?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SpinUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus + idempotencyKey?: StringFieldUpdateOperationsInput | string + ip?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + campaign?: CampaignUpdateOneRequiredWithoutSpinsNestedInput + prize?: PrizeUpdateOneWithoutSpinsNestedInput + userPrize?: UserPrizeUpdateOneWithoutSpinNestedInput + } + + export type SpinUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + prizeId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus + idempotencyKey?: StringFieldUpdateOperationsInput | string + ip?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + userPrize?: UserPrizeUncheckedUpdateOneWithoutSpinNestedInput + } + + export type SpinUncheckedUpdateManyWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + prizeId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus + idempotencyKey?: StringFieldUpdateOperationsInput | string + ip?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type UserPrizeUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + code?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus + wonAt?: DateTimeFieldUpdateOperationsInput | Date | string + redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + campaign?: CampaignUpdateOneRequiredWithoutUserPrizesNestedInput + prize?: PrizeUpdateOneRequiredWithoutUserPrizesNestedInput + spin?: SpinUpdateOneRequiredWithoutUserPrizeNestedInput + } + + export type UserPrizeUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + prizeId?: StringFieldUpdateOperationsInput | string + spinId?: StringFieldUpdateOperationsInput | string + code?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus + wonAt?: DateTimeFieldUpdateOperationsInput | Date | string + redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type UserPrizeUncheckedUpdateManyWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + prizeId?: StringFieldUpdateOperationsInput | string + spinId?: StringFieldUpdateOperationsInput | string + code?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus + wonAt?: DateTimeFieldUpdateOperationsInput | Date | string + redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type OtpCodeUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + attempts?: IntFieldUpdateOperationsInput | number + consumed?: BoolFieldUpdateOperationsInput | boolean + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type OtpCodeUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + attempts?: IntFieldUpdateOperationsInput | number + consumed?: BoolFieldUpdateOperationsInput | boolean + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type OtpCodeUncheckedUpdateManyWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + code?: StringFieldUpdateOperationsInput | string + attempts?: IntFieldUpdateOperationsInput | number + consumed?: BoolFieldUpdateOperationsInput | boolean + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SmsLogUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + type?: EnumSmsTypeFieldUpdateOperationsInput | $Enums.SmsType + message?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + status?: EnumSmsStatusFieldUpdateOperationsInput | $Enums.SmsStatus + providerResponse?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SmsLogUncheckedUpdateWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + type?: EnumSmsTypeFieldUpdateOperationsInput | $Enums.SmsType + message?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + status?: EnumSmsStatusFieldUpdateOperationsInput | $Enums.SmsStatus + providerResponse?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SmsLogUncheckedUpdateManyWithoutUserInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + type?: EnumSmsTypeFieldUpdateOperationsInput | $Enums.SmsType + message?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + status?: EnumSmsStatusFieldUpdateOperationsInput | $Enums.SmsStatus + providerResponse?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type PrizeCreateManyCampaignInput = { + id?: string + title: string + description?: string | null + image?: string | null + type: $Enums.PrizeType + stockType: $Enums.StockType + initialStock?: number | null + remainingStock?: number | null + weight: number + status?: $Enums.PrizeStatus + sortOrder?: number + segmentColor: string + expiresAt?: Date | string | null + smsTemplate?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type UserCampaignCreateManyCampaignInput = { + id?: string + userId: string + totalChances?: number + usedChances?: number + createdAt?: Date | string + updatedAt?: Date | string + } + + export type ChanceTransactionCreateManyCampaignInput = { + id?: string + userId: string + amount: number + type: $Enums.ChanceTxnType + referenceType?: string | null + referenceId?: string | null + description?: string | null + createdById?: string | null + createdAt?: Date | string + } + + export type SpinCreateManyCampaignInput = { + id?: string + userId: string + prizeId?: string | null + status?: $Enums.SpinStatus + idempotencyKey: string + ip?: string | null + userAgent?: string | null + createdAt?: Date | string + } + + export type UserPrizeCreateManyCampaignInput = { + id?: string + userId: string + prizeId: string + spinId: string + code?: string | null + status?: $Enums.UserPrizeStatus + wonAt?: Date | string + redeemedAt?: Date | string | null + } + + export type PrizeUpdateWithoutCampaignInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType + stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType + initialStock?: NullableIntFieldUpdateOperationsInput | number | null + remainingStock?: NullableIntFieldUpdateOperationsInput | number | null + weight?: IntFieldUpdateOperationsInput | number + status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus + sortOrder?: IntFieldUpdateOperationsInput | number + segmentColor?: StringFieldUpdateOperationsInput | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + spins?: SpinUpdateManyWithoutPrizeNestedInput + userPrizes?: UserPrizeUpdateManyWithoutPrizeNestedInput + } + + export type PrizeUncheckedUpdateWithoutCampaignInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType + stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType + initialStock?: NullableIntFieldUpdateOperationsInput | number | null + remainingStock?: NullableIntFieldUpdateOperationsInput | number | null + weight?: IntFieldUpdateOperationsInput | number + status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus + sortOrder?: IntFieldUpdateOperationsInput | number + segmentColor?: StringFieldUpdateOperationsInput | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + spins?: SpinUncheckedUpdateManyWithoutPrizeNestedInput + userPrizes?: UserPrizeUncheckedUpdateManyWithoutPrizeNestedInput + } + + export type PrizeUncheckedUpdateManyWithoutCampaignInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + image?: NullableStringFieldUpdateOperationsInput | string | null + type?: EnumPrizeTypeFieldUpdateOperationsInput | $Enums.PrizeType + stockType?: EnumStockTypeFieldUpdateOperationsInput | $Enums.StockType + initialStock?: NullableIntFieldUpdateOperationsInput | number | null + remainingStock?: NullableIntFieldUpdateOperationsInput | number | null + weight?: IntFieldUpdateOperationsInput | number + status?: EnumPrizeStatusFieldUpdateOperationsInput | $Enums.PrizeStatus + sortOrder?: IntFieldUpdateOperationsInput | number + segmentColor?: StringFieldUpdateOperationsInput | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + smsTemplate?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type UserCampaignUpdateWithoutCampaignInput = { + id?: StringFieldUpdateOperationsInput | string + totalChances?: IntFieldUpdateOperationsInput | number + usedChances?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutUserCampaignsNestedInput + } + + export type UserCampaignUncheckedUpdateWithoutCampaignInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + totalChances?: IntFieldUpdateOperationsInput | number + usedChances?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type UserCampaignUncheckedUpdateManyWithoutCampaignInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + totalChances?: IntFieldUpdateOperationsInput | number + usedChances?: IntFieldUpdateOperationsInput | number + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type ChanceTransactionUpdateWithoutCampaignInput = { + id?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType + referenceType?: NullableStringFieldUpdateOperationsInput | string | null + referenceId?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutChanceTransactionsNestedInput + createdBy?: AdminUpdateOneWithoutChanceTxnsNestedInput + } + + export type ChanceTransactionUncheckedUpdateWithoutCampaignInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType + referenceType?: NullableStringFieldUpdateOperationsInput | string | null + referenceId?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdById?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type ChanceTransactionUncheckedUpdateManyWithoutCampaignInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + amount?: IntFieldUpdateOperationsInput | number + type?: EnumChanceTxnTypeFieldUpdateOperationsInput | $Enums.ChanceTxnType + referenceType?: NullableStringFieldUpdateOperationsInput | string | null + referenceId?: NullableStringFieldUpdateOperationsInput | string | null + description?: NullableStringFieldUpdateOperationsInput | string | null + createdById?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SpinUpdateWithoutCampaignInput = { + id?: StringFieldUpdateOperationsInput | string + status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus + idempotencyKey?: StringFieldUpdateOperationsInput | string + ip?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutSpinsNestedInput + prize?: PrizeUpdateOneWithoutSpinsNestedInput + userPrize?: UserPrizeUpdateOneWithoutSpinNestedInput + } + + export type SpinUncheckedUpdateWithoutCampaignInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + prizeId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus + idempotencyKey?: StringFieldUpdateOperationsInput | string + ip?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + userPrize?: UserPrizeUncheckedUpdateOneWithoutSpinNestedInput + } + + export type SpinUncheckedUpdateManyWithoutCampaignInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + prizeId?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus + idempotencyKey?: StringFieldUpdateOperationsInput | string + ip?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type UserPrizeUpdateWithoutCampaignInput = { + id?: StringFieldUpdateOperationsInput | string + code?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus + wonAt?: DateTimeFieldUpdateOperationsInput | Date | string + redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + user?: UserUpdateOneRequiredWithoutUserPrizesNestedInput + prize?: PrizeUpdateOneRequiredWithoutUserPrizesNestedInput + spin?: SpinUpdateOneRequiredWithoutUserPrizeNestedInput + } + + export type UserPrizeUncheckedUpdateWithoutCampaignInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + prizeId?: StringFieldUpdateOperationsInput | string + spinId?: StringFieldUpdateOperationsInput | string + code?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus + wonAt?: DateTimeFieldUpdateOperationsInput | Date | string + redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type UserPrizeUncheckedUpdateManyWithoutCampaignInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + prizeId?: StringFieldUpdateOperationsInput | string + spinId?: StringFieldUpdateOperationsInput | string + code?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus + wonAt?: DateTimeFieldUpdateOperationsInput | Date | string + redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type SpinCreateManyPrizeInput = { + id?: string + userId: string + campaignId: string + status?: $Enums.SpinStatus + idempotencyKey: string + ip?: string | null + userAgent?: string | null + createdAt?: Date | string + } + + export type UserPrizeCreateManyPrizeInput = { + id?: string + userId: string + campaignId: string + spinId: string + code?: string | null + status?: $Enums.UserPrizeStatus + wonAt?: Date | string + redeemedAt?: Date | string | null + } + + export type SpinUpdateWithoutPrizeInput = { + id?: StringFieldUpdateOperationsInput | string + status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus + idempotencyKey?: StringFieldUpdateOperationsInput | string + ip?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + user?: UserUpdateOneRequiredWithoutSpinsNestedInput + campaign?: CampaignUpdateOneRequiredWithoutSpinsNestedInput + userPrize?: UserPrizeUpdateOneWithoutSpinNestedInput + } + + export type SpinUncheckedUpdateWithoutPrizeInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus + idempotencyKey?: StringFieldUpdateOperationsInput | string + ip?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + userPrize?: UserPrizeUncheckedUpdateOneWithoutSpinNestedInput + } + + export type SpinUncheckedUpdateManyWithoutPrizeInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + status?: EnumSpinStatusFieldUpdateOperationsInput | $Enums.SpinStatus + idempotencyKey?: StringFieldUpdateOperationsInput | string + ip?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type UserPrizeUpdateWithoutPrizeInput = { + id?: StringFieldUpdateOperationsInput | string + code?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus + wonAt?: DateTimeFieldUpdateOperationsInput | Date | string + redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + user?: UserUpdateOneRequiredWithoutUserPrizesNestedInput + campaign?: CampaignUpdateOneRequiredWithoutUserPrizesNestedInput + spin?: SpinUpdateOneRequiredWithoutUserPrizeNestedInput + } + + export type UserPrizeUncheckedUpdateWithoutPrizeInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + spinId?: StringFieldUpdateOperationsInput | string + code?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus + wonAt?: DateTimeFieldUpdateOperationsInput | Date | string + redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type UserPrizeUncheckedUpdateManyWithoutPrizeInput = { + id?: StringFieldUpdateOperationsInput | string + userId?: StringFieldUpdateOperationsInput | string + campaignId?: StringFieldUpdateOperationsInput | string + spinId?: StringFieldUpdateOperationsInput | string + code?: NullableStringFieldUpdateOperationsInput | string | null + status?: EnumUserPrizeStatusFieldUpdateOperationsInput | $Enums.UserPrizeStatus + wonAt?: DateTimeFieldUpdateOperationsInput | Date | string + redeemedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + + + /** + * Aliases for legacy arg types + */ + /** + * @deprecated Use AdminCountOutputTypeDefaultArgs instead + */ + export type AdminCountOutputTypeArgs = AdminCountOutputTypeDefaultArgs + /** + * @deprecated Use UserCountOutputTypeDefaultArgs instead + */ + export type UserCountOutputTypeArgs = UserCountOutputTypeDefaultArgs + /** + * @deprecated Use CampaignCountOutputTypeDefaultArgs instead + */ + export type CampaignCountOutputTypeArgs = CampaignCountOutputTypeDefaultArgs + /** + * @deprecated Use PrizeCountOutputTypeDefaultArgs instead + */ + export type PrizeCountOutputTypeArgs = PrizeCountOutputTypeDefaultArgs + /** + * @deprecated Use AdminDefaultArgs instead + */ + export type AdminArgs = AdminDefaultArgs + /** + * @deprecated Use UserDefaultArgs instead + */ + export type UserArgs = UserDefaultArgs + /** + * @deprecated Use OtpCodeDefaultArgs instead + */ + export type OtpCodeArgs = OtpCodeDefaultArgs + /** + * @deprecated Use CampaignDefaultArgs instead + */ + export type CampaignArgs = CampaignDefaultArgs + /** + * @deprecated Use PrizeDefaultArgs instead + */ + export type PrizeArgs = PrizeDefaultArgs + /** + * @deprecated Use UserCampaignDefaultArgs instead + */ + export type UserCampaignArgs = UserCampaignDefaultArgs + /** + * @deprecated Use ChanceTransactionDefaultArgs instead + */ + export type ChanceTransactionArgs = ChanceTransactionDefaultArgs + /** + * @deprecated Use SpinDefaultArgs instead + */ + export type SpinArgs = SpinDefaultArgs + /** + * @deprecated Use UserPrizeDefaultArgs instead + */ + export type UserPrizeArgs = UserPrizeDefaultArgs + /** + * @deprecated Use SmsLogDefaultArgs instead + */ + export type SmsLogArgs = SmsLogDefaultArgs + /** + * @deprecated Use AdminLogDefaultArgs instead + */ + export type AdminLogArgs = AdminLogDefaultArgs + + /** + * Batch Payload for updateMany & deleteMany & createMany + */ + + export type BatchPayload = { + count: number + } + + /** + * DMMF + */ + export const dmmf: runtime.BaseDMMF +} \ No newline at end of file diff --git a/apps/api/release/vendor/.prisma/client/index.js b/apps/api/release/vendor/.prisma/client/index.js new file mode 100644 index 0000000..49e8b4a --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/index.js @@ -0,0 +1,464 @@ + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + PrismaClientKnownRequestError, + PrismaClientUnknownRequestError, + PrismaClientRustPanicError, + PrismaClientInitializationError, + PrismaClientValidationError, + NotFoundError, + getPrismaClient, + sqltag, + empty, + join, + raw, + skip, + Decimal, + Debug, + objectEnumValues, + makeStrictEnum, + Extensions, + warnOnce, + defineDmmfProperty, + Public, + getRuntime +} = require('@prisma/client/runtime/library.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 5.22.0 + * Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2 + */ +Prisma.prismaVersion = { + client: "5.22.0", + engine: "605197351a3c8bdd595af2d2a9bc3025bca48ea2" +} + +Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; +Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError +Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError +Prisma.PrismaClientInitializationError = PrismaClientInitializationError +Prisma.PrismaClientValidationError = PrismaClientValidationError +Prisma.NotFoundError = NotFoundError +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = sqltag +Prisma.empty = empty +Prisma.join = join +Prisma.raw = raw +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = Extensions.getExtensionContext +Prisma.defineExtension = Extensions.defineExtension + +/** + * Shorthand utilities for JSON filtering + */ +Prisma.DbNull = objectEnumValues.instances.DbNull +Prisma.JsonNull = objectEnumValues.instances.JsonNull +Prisma.AnyNull = objectEnumValues.instances.AnyNull + +Prisma.NullTypes = { + DbNull: objectEnumValues.classes.DbNull, + JsonNull: objectEnumValues.classes.JsonNull, + AnyNull: objectEnumValues.classes.AnyNull +} + + + + + const path = require('path') + +/** + * Enums + */ +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.AdminScalarFieldEnum = { + id: 'id', + name: 'name', + mobile: 'mobile', + email: 'email', + passwordHash: 'passwordHash', + role: 'role', + status: 'status', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.UserScalarFieldEnum = { + id: 'id', + mobile: 'mobile', + name: 'name', + status: 'status', + lastLoginAt: 'lastLoginAt', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.OtpCodeScalarFieldEnum = { + id: 'id', + mobile: 'mobile', + code: 'code', + userId: 'userId', + attempts: 'attempts', + consumed: 'consumed', + expiresAt: 'expiresAt', + createdAt: 'createdAt' +}; + +exports.Prisma.CampaignScalarFieldEnum = { + id: 'id', + title: 'title', + slug: 'slug', + description: 'description', + image: 'image', + banner: 'banner', + logo: 'logo', + startAt: 'startAt', + endAt: 'endAt', + status: 'status', + defaultChances: 'defaultChances', + rules: 'rules', + ctaText: 'ctaText', + wheelDesign: 'wheelDesign', + settings: 'settings', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.PrizeScalarFieldEnum = { + id: 'id', + campaignId: 'campaignId', + title: 'title', + description: 'description', + image: 'image', + type: 'type', + stockType: 'stockType', + initialStock: 'initialStock', + remainingStock: 'remainingStock', + weight: 'weight', + status: 'status', + sortOrder: 'sortOrder', + segmentColor: 'segmentColor', + expiresAt: 'expiresAt', + smsTemplate: 'smsTemplate', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.UserCampaignScalarFieldEnum = { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + totalChances: 'totalChances', + usedChances: 'usedChances', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.ChanceTransactionScalarFieldEnum = { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + amount: 'amount', + type: 'type', + referenceType: 'referenceType', + referenceId: 'referenceId', + description: 'description', + createdById: 'createdById', + createdAt: 'createdAt' +}; + +exports.Prisma.SpinScalarFieldEnum = { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + prizeId: 'prizeId', + status: 'status', + idempotencyKey: 'idempotencyKey', + ip: 'ip', + userAgent: 'userAgent', + createdAt: 'createdAt' +}; + +exports.Prisma.UserPrizeScalarFieldEnum = { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + prizeId: 'prizeId', + spinId: 'spinId', + code: 'code', + status: 'status', + wonAt: 'wonAt', + redeemedAt: 'redeemedAt' +}; + +exports.Prisma.SmsLogScalarFieldEnum = { + id: 'id', + userId: 'userId', + mobile: 'mobile', + type: 'type', + message: 'message', + provider: 'provider', + status: 'status', + providerResponse: 'providerResponse', + createdAt: 'createdAt' +}; + +exports.Prisma.AdminLogScalarFieldEnum = { + id: 'id', + adminId: 'adminId', + action: 'action', + entityType: 'entityType', + entityId: 'entityId', + oldValue: 'oldValue', + newValue: 'newValue', + ip: 'ip', + createdAt: 'createdAt' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.NullableJsonNullValueInput = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; + +exports.Prisma.JsonNullValueFilter = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull, + AnyNull: Prisma.AnyNull +}; +exports.AdminRole = exports.$Enums.AdminRole = { + SUPER_ADMIN: 'SUPER_ADMIN', + OPERATOR: 'OPERATOR', + SUPPORT: 'SUPPORT' +}; + +exports.AdminStatus = exports.$Enums.AdminStatus = { + ACTIVE: 'ACTIVE', + DISABLED: 'DISABLED' +}; + +exports.UserStatus = exports.$Enums.UserStatus = { + ACTIVE: 'ACTIVE', + BLOCKED: 'BLOCKED' +}; + +exports.CampaignStatus = exports.$Enums.CampaignStatus = { + DRAFT: 'DRAFT', + ACTIVE: 'ACTIVE', + PAUSED: 'PAUSED', + FINISHED: 'FINISHED' +}; + +exports.WheelDesign = exports.$Enums.WheelDesign = { + CLASSIC_CASINO: 'CLASSIC_CASINO', + NEON_CYBER: 'NEON_CYBER', + MINIMAL_FLAT: 'MINIMAL_FLAT', + LUXURY_GOLD: 'LUXURY_GOLD', + PLAYFUL_CARTOON: 'PLAYFUL_CARTOON', + RUSTIC_WOOD: 'RUSTIC_WOOD', + GALAXY_SPACE: 'GALAXY_SPACE', + CANDY_LAND: 'CANDY_LAND', + FIRE_FLAME: 'FIRE_FLAME', + CRYSTAL_ICE: 'CRYSTAL_ICE' +}; + +exports.PrizeType = exports.$Enums.PrizeType = { + PHYSICAL: 'PHYSICAL', + DISCOUNT_CODE: 'DISCOUNT_CODE', + CREDIT: 'CREDIT', + CASH: 'CASH', + NO_PRIZE: 'NO_PRIZE', + OTHER: 'OTHER' +}; + +exports.StockType = exports.$Enums.StockType = { + LIMITED: 'LIMITED', + UNLIMITED: 'UNLIMITED' +}; + +exports.PrizeStatus = exports.$Enums.PrizeStatus = { + ACTIVE: 'ACTIVE', + INACTIVE: 'INACTIVE' +}; + +exports.ChanceTxnType = exports.$Enums.ChanceTxnType = { + SIGNUP_BONUS: 'SIGNUP_BONUS', + ADMIN_ADJUSTMENT: 'ADMIN_ADJUSTMENT', + SPIN_CONSUME: 'SPIN_CONSUME', + CAMPAIGN_BONUS: 'CAMPAIGN_BONUS', + REFUND: 'REFUND' +}; + +exports.SpinStatus = exports.$Enums.SpinStatus = { + SUCCESS: 'SUCCESS', + FAILED: 'FAILED', + DUPLICATE: 'DUPLICATE' +}; + +exports.UserPrizeStatus = exports.$Enums.UserPrizeStatus = { + NEW: 'NEW', + CONTACTED: 'CONTACTED', + DELIVERED: 'DELIVERED', + ACTIVE_CODE: 'ACTIVE_CODE', + USED: 'USED', + EXPIRED: 'EXPIRED' +}; + +exports.SmsType = exports.$Enums.SmsType = { + OTP: 'OTP', + WINNING: 'WINNING', + NO_PRIZE: 'NO_PRIZE', + PRIZE_REMINDER: 'PRIZE_REMINDER' +}; + +exports.SmsStatus = exports.$Enums.SmsStatus = { + PENDING: 'PENDING', + SENT: 'SENT', + FAILED: 'FAILED' +}; + +exports.Prisma.ModelName = { + Admin: 'Admin', + User: 'User', + OtpCode: 'OtpCode', + Campaign: 'Campaign', + Prize: 'Prize', + UserCampaign: 'UserCampaign', + ChanceTransaction: 'ChanceTransaction', + Spin: 'Spin', + UserPrize: 'UserPrize', + SmsLog: 'SmsLog', + AdminLog: 'AdminLog' +}; +/** + * Create the Client + */ +const config = { + "generator": { + "name": "client", + "provider": { + "fromEnvVar": null, + "value": "prisma-client-js" + }, + "output": { + "value": "D:\\APP\\Lucky_Wheel\\node_modules\\.pnpm\\@prisma+client@5.22.0_prisma@5.22.0\\node_modules\\@prisma\\client", + "fromEnvVar": null + }, + "config": { + "engineType": "library" + }, + "binaryTargets": [ + { + "fromEnvVar": null, + "value": "windows", + "native": true + }, + { + "fromEnvVar": null, + "value": "debian-openssl-3.0.x" + } + ], + "previewFeatures": [], + "sourceFilePath": "D:\\APP\\Lucky_Wheel\\apps\\api\\prisma\\schema.prisma" + }, + "relativeEnvPaths": { + "rootEnvPath": null + }, + "relativePath": "../../../../../../apps/api/prisma", + "clientVersion": "5.22.0", + "engineVersion": "605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "datasourceNames": [ + "db" + ], + "activeProvider": "postgresql", + "postinstall": false, + "inlineDatasources": { + "db": { + "url": { + "fromEnvVar": "DATABASE_URL", + "value": null + } + } + }, + "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n // native = local Windows/macOS; debian-openssl-3.0.x = node:20-bookworm (Arvan)\n binaryTargets = [\"native\", \"debian-openssl-3.0.x\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n// ==================== ENUMS ====================\n\nenum AdminStatus {\n ACTIVE\n DISABLED\n}\n\nenum AdminRole {\n SUPER_ADMIN\n OPERATOR\n SUPPORT\n}\n\nenum UserStatus {\n ACTIVE\n BLOCKED\n}\n\nenum CampaignStatus {\n DRAFT\n ACTIVE\n PAUSED\n FINISHED\n}\n\nenum PrizeType {\n PHYSICAL\n DISCOUNT_CODE\n CREDIT\n CASH\n NO_PRIZE\n OTHER\n}\n\nenum StockType {\n LIMITED\n UNLIMITED\n}\n\nenum PrizeStatus {\n ACTIVE\n INACTIVE\n}\n\nenum SpinStatus {\n SUCCESS\n FAILED\n DUPLICATE\n}\n\nenum ChanceTxnType {\n SIGNUP_BONUS\n ADMIN_ADJUSTMENT\n SPIN_CONSUME\n CAMPAIGN_BONUS\n REFUND\n}\n\nenum UserPrizeStatus {\n NEW\n CONTACTED\n DELIVERED\n ACTIVE_CODE\n USED\n EXPIRED\n}\n\nenum SmsType {\n OTP\n WINNING\n NO_PRIZE\n PRIZE_REMINDER\n}\n\nenum SmsStatus {\n PENDING\n SENT\n FAILED\n}\n\nenum WheelDesign {\n CLASSIC_CASINO\n NEON_CYBER\n MINIMAL_FLAT\n LUXURY_GOLD\n PLAYFUL_CARTOON\n RUSTIC_WOOD\n GALAXY_SPACE\n CANDY_LAND\n FIRE_FLAME\n CRYSTAL_ICE\n}\n\n// ==================== MODELS ====================\n\nmodel Admin {\n id String @id @default(uuid())\n name String\n mobile String @unique\n email String @unique\n passwordHash String @map(\"password_hash\")\n role AdminRole @default(OPERATOR)\n status AdminStatus @default(ACTIVE)\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n auditLogs AdminLog[]\n chanceTxns ChanceTransaction[] @relation(\"AdminCreatedTxn\")\n\n @@map(\"admins\")\n}\n\nmodel User {\n id String @id @default(uuid())\n mobile String @unique\n name String?\n status UserStatus @default(ACTIVE)\n lastLoginAt DateTime? @map(\"last_login_at\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n userCampaigns UserCampaign[]\n chanceTransactions ChanceTransaction[]\n spins Spin[]\n userPrizes UserPrize[]\n otpCodes OtpCode[]\n smsLogs SmsLog[]\n\n @@index([mobile])\n @@map(\"users\")\n}\n\nmodel OtpCode {\n id String @id @default(uuid())\n mobile String\n code String\n userId String? @map(\"user_id\")\n user User? @relation(fields: [userId], references: [id])\n attempts Int @default(0)\n consumed Boolean @default(false)\n expiresAt DateTime @map(\"expires_at\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n\n @@index([mobile, consumed])\n @@map(\"otp_codes\")\n}\n\nmodel Campaign {\n id String @id @default(uuid())\n title String\n slug String @unique\n description String?\n image String?\n banner String?\n logo String?\n startAt DateTime @map(\"start_at\")\n endAt DateTime @map(\"end_at\")\n status CampaignStatus @default(DRAFT)\n defaultChances Int @default(0) @map(\"default_chances\")\n rules String?\n ctaText String? @map(\"cta_text\")\n wheelDesign WheelDesign @default(CLASSIC_CASINO) @map(\"wheel_design\")\n settings Json? // primaryColor, secondaryColor, headerText, buttonText, headerImage, celebrationEffect...\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n prizes Prize[]\n userCampaigns UserCampaign[]\n chanceTxns ChanceTransaction[]\n spins Spin[]\n userPrizes UserPrize[]\n\n @@index([status, startAt, endAt])\n @@map(\"campaigns\")\n}\n\nmodel Prize {\n id String @id @default(uuid())\n campaignId String @map(\"campaign_id\")\n campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)\n title String\n description String?\n image String?\n type PrizeType\n stockType StockType @map(\"stock_type\")\n initialStock Int? @map(\"initial_stock\")\n remainingStock Int? @map(\"remaining_stock\")\n weight Int\n status PrizeStatus @default(ACTIVE)\n sortOrder Int @default(0) @map(\"sort_order\")\n segmentColor String @map(\"segment_color\")\n expiresAt DateTime? @map(\"expires_at\")\n smsTemplate String? @map(\"sms_template\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n spins Spin[]\n userPrizes UserPrize[]\n\n @@index([campaignId, status])\n @@map(\"prizes\")\n}\n\nmodel UserCampaign {\n id String @id @default(uuid())\n userId String @map(\"user_id\")\n user User @relation(fields: [userId], references: [id])\n campaignId String @map(\"campaign_id\")\n campaign Campaign @relation(fields: [campaignId], references: [id])\n totalChances Int @default(0) @map(\"total_chances\")\n usedChances Int @default(0) @map(\"used_chances\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n @@unique([userId, campaignId])\n @@map(\"user_campaigns\")\n}\n\nmodel ChanceTransaction {\n id String @id @default(uuid())\n userId String @map(\"user_id\")\n user User @relation(fields: [userId], references: [id])\n campaignId String @map(\"campaign_id\")\n campaign Campaign @relation(fields: [campaignId], references: [id])\n amount Int // مثبت یا منفی\n type ChanceTxnType\n referenceType String? @map(\"reference_type\") // e.g. \"spin\", \"manual\"\n referenceId String? @map(\"reference_id\")\n description String?\n createdById String? @map(\"created_by\") // admin id در صورت تغییر دستی\n createdBy Admin? @relation(\"AdminCreatedTxn\", fields: [createdById], references: [id])\n createdAt DateTime @default(now()) @map(\"created_at\")\n\n @@index([userId, campaignId])\n @@map(\"chance_transactions\")\n}\n\nmodel Spin {\n id String @id @default(uuid())\n userId String @map(\"user_id\")\n user User @relation(fields: [userId], references: [id])\n campaignId String @map(\"campaign_id\")\n campaign Campaign @relation(fields: [campaignId], references: [id])\n prizeId String? @map(\"prize_id\")\n prize Prize? @relation(fields: [prizeId], references: [id])\n status SpinStatus @default(SUCCESS)\n idempotencyKey String @unique @map(\"idempotency_key\")\n ip String?\n userAgent String? @map(\"user_agent\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n\n userPrize UserPrize?\n\n @@index([userId, campaignId])\n @@index([campaignId, createdAt])\n @@map(\"spins\")\n}\n\nmodel UserPrize {\n id String @id @default(uuid())\n userId String @map(\"user_id\")\n user User @relation(fields: [userId], references: [id])\n campaignId String @map(\"campaign_id\")\n campaign Campaign @relation(fields: [campaignId], references: [id])\n prizeId String @map(\"prize_id\")\n prize Prize @relation(fields: [prizeId], references: [id])\n spinId String @unique @map(\"spin_id\")\n spin Spin @relation(fields: [spinId], references: [id])\n code String? @unique\n status UserPrizeStatus @default(NEW)\n wonAt DateTime @default(now()) @map(\"won_at\")\n redeemedAt DateTime? @map(\"redeemed_at\")\n\n @@index([userId])\n @@index([status])\n @@map(\"user_prizes\")\n}\n\nmodel SmsLog {\n id String @id @default(uuid())\n userId String? @map(\"user_id\")\n user User? @relation(fields: [userId], references: [id])\n mobile String\n type SmsType\n message String\n provider String @default(\"raygansms\")\n status SmsStatus @default(PENDING)\n providerResponse Json? @map(\"provider_response\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n\n @@index([mobile, type])\n @@map(\"sms_logs\")\n}\n\nmodel AdminLog {\n id String @id @default(uuid())\n adminId String @map(\"admin_id\")\n admin Admin @relation(fields: [adminId], references: [id])\n action String // e.g. \"prize.update\", \"chance.add\"\n entityType String @map(\"entity_type\")\n entityId String @map(\"entity_id\")\n oldValue Json? @map(\"old_value\")\n newValue Json? @map(\"new_value\")\n ip String?\n createdAt DateTime @default(now()) @map(\"created_at\")\n\n @@index([entityType, entityId])\n @@map(\"admin_logs\")\n}\n", + "inlineSchemaHash": "3ad5c30b962f7b121964539330345f78ded198ef5cbcadad1928d4e44c16409a", + "copyEngine": true +} + +const fs = require('fs') + +config.dirname = __dirname +if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { + const alternativePaths = [ + "../../node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/node_modules/.prisma/client", + "../node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/node_modules/.prisma/client", + ] + + const alternativePath = alternativePaths.find((altPath) => { + return fs.existsSync(path.join(process.cwd(), altPath, 'schema.prisma')) + }) ?? alternativePaths[0] + + config.dirname = path.join(process.cwd(), alternativePath) + config.isBundled = true +} + +config.runtimeDataModel = JSON.parse("{\"models\":{\"Admin\":{\"dbName\":\"admins\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"passwordHash\",\"dbName\":\"password_hash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"AdminRole\",\"default\":\"OPERATOR\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"AdminStatus\",\"default\":\"ACTIVE\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"dbName\":\"updated_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"auditLogs\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminLog\",\"relationName\":\"AdminToAdminLog\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chanceTxns\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChanceTransaction\",\"relationName\":\"AdminCreatedTxn\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"User\":{\"dbName\":\"users\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"UserStatus\",\"default\":\"ACTIVE\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastLoginAt\",\"dbName\":\"last_login_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"dbName\":\"updated_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"userCampaigns\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserCampaign\",\"relationName\":\"UserToUserCampaign\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chanceTransactions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChanceTransaction\",\"relationName\":\"ChanceTransactionToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"spins\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Spin\",\"relationName\":\"SpinToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userPrizes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserPrize\",\"relationName\":\"UserToUserPrize\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"otpCodes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OtpCode\",\"relationName\":\"OtpCodeToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"smsLogs\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SmsLog\",\"relationName\":\"SmsLogToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"OtpCode\":{\"dbName\":\"otp_codes\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"code\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"OtpCodeToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"attempts\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"consumed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiresAt\",\"dbName\":\"expires_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Campaign\":{\"dbName\":\"campaigns\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"slug\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"image\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"banner\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"logo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"startAt\",\"dbName\":\"start_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"endAt\",\"dbName\":\"end_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"CampaignStatus\",\"default\":\"DRAFT\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"defaultChances\",\"dbName\":\"default_chances\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rules\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ctaText\",\"dbName\":\"cta_text\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wheelDesign\",\"dbName\":\"wheel_design\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"WheelDesign\",\"default\":\"CLASSIC_CASINO\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"settings\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"dbName\":\"updated_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"prizes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Prize\",\"relationName\":\"CampaignToPrize\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userCampaigns\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserCampaign\",\"relationName\":\"CampaignToUserCampaign\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"chanceTxns\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChanceTransaction\",\"relationName\":\"CampaignToChanceTransaction\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"spins\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Spin\",\"relationName\":\"CampaignToSpin\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userPrizes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserPrize\",\"relationName\":\"CampaignToUserPrize\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Prize\":{\"dbName\":\"prizes\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaignId\",\"dbName\":\"campaign_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaign\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Campaign\",\"relationName\":\"CampaignToPrize\",\"relationFromFields\":[\"campaignId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"image\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PrizeType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stockType\",\"dbName\":\"stock_type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"StockType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"initialStock\",\"dbName\":\"initial_stock\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remainingStock\",\"dbName\":\"remaining_stock\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"weight\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"PrizeStatus\",\"default\":\"ACTIVE\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sortOrder\",\"dbName\":\"sort_order\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"segmentColor\",\"dbName\":\"segment_color\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiresAt\",\"dbName\":\"expires_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"smsTemplate\",\"dbName\":\"sms_template\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"dbName\":\"updated_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"spins\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Spin\",\"relationName\":\"PrizeToSpin\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userPrizes\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserPrize\",\"relationName\":\"PrizeToUserPrize\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"UserCampaign\":{\"dbName\":\"user_campaigns\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"UserToUserCampaign\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaignId\",\"dbName\":\"campaign_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaign\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Campaign\",\"relationName\":\"CampaignToUserCampaign\",\"relationFromFields\":[\"campaignId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalChances\",\"dbName\":\"total_chances\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"usedChances\",\"dbName\":\"used_chances\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"dbName\":\"updated_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[[\"userId\",\"campaignId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"userId\",\"campaignId\"]}],\"isGenerated\":false},\"ChanceTransaction\":{\"dbName\":\"chance_transactions\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"ChanceTransactionToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaignId\",\"dbName\":\"campaign_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaign\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Campaign\",\"relationName\":\"CampaignToChanceTransaction\",\"relationFromFields\":[\"campaignId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"amount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ChanceTxnType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referenceType\",\"dbName\":\"reference_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referenceId\",\"dbName\":\"reference_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdById\",\"dbName\":\"created_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdBy\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Admin\",\"relationName\":\"AdminCreatedTxn\",\"relationFromFields\":[\"createdById\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Spin\":{\"dbName\":\"spins\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"SpinToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaignId\",\"dbName\":\"campaign_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaign\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Campaign\",\"relationName\":\"CampaignToSpin\",\"relationFromFields\":[\"campaignId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"prizeId\",\"dbName\":\"prize_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"prize\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Prize\",\"relationName\":\"PrizeToSpin\",\"relationFromFields\":[\"prizeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"SpinStatus\",\"default\":\"SUCCESS\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"idempotencyKey\",\"dbName\":\"idempotency_key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ip\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userAgent\",\"dbName\":\"user_agent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userPrize\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserPrize\",\"relationName\":\"SpinToUserPrize\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"UserPrize\":{\"dbName\":\"user_prizes\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"UserToUserPrize\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaignId\",\"dbName\":\"campaign_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"campaign\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Campaign\",\"relationName\":\"CampaignToUserPrize\",\"relationFromFields\":[\"campaignId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"prizeId\",\"dbName\":\"prize_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"prize\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Prize\",\"relationName\":\"PrizeToUserPrize\",\"relationFromFields\":[\"prizeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"spinId\",\"dbName\":\"spin_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"spin\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Spin\",\"relationName\":\"SpinToUserPrize\",\"relationFromFields\":[\"spinId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"code\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"UserPrizeStatus\",\"default\":\"NEW\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wonAt\",\"dbName\":\"won_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"redeemedAt\",\"dbName\":\"redeemed_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SmsLog\":{\"dbName\":\"sms_logs\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"SmsLogToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SmsType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"message\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"provider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"raygansms\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"SmsStatus\",\"default\":\"PENDING\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"providerResponse\",\"dbName\":\"provider_response\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AdminLog\":{\"dbName\":\"admin_logs\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminId\",\"dbName\":\"admin_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"admin\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Admin\",\"relationName\":\"AdminToAdminLog\",\"relationFromFields\":[\"adminId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"action\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"entityType\",\"dbName\":\"entity_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"entityId\",\"dbName\":\"entity_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"oldValue\",\"dbName\":\"old_value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"newValue\",\"dbName\":\"new_value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ip\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"dbName\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{\"AdminStatus\":{\"values\":[{\"name\":\"ACTIVE\",\"dbName\":null},{\"name\":\"DISABLED\",\"dbName\":null}],\"dbName\":null},\"AdminRole\":{\"values\":[{\"name\":\"SUPER_ADMIN\",\"dbName\":null},{\"name\":\"OPERATOR\",\"dbName\":null},{\"name\":\"SUPPORT\",\"dbName\":null}],\"dbName\":null},\"UserStatus\":{\"values\":[{\"name\":\"ACTIVE\",\"dbName\":null},{\"name\":\"BLOCKED\",\"dbName\":null}],\"dbName\":null},\"CampaignStatus\":{\"values\":[{\"name\":\"DRAFT\",\"dbName\":null},{\"name\":\"ACTIVE\",\"dbName\":null},{\"name\":\"PAUSED\",\"dbName\":null},{\"name\":\"FINISHED\",\"dbName\":null}],\"dbName\":null},\"PrizeType\":{\"values\":[{\"name\":\"PHYSICAL\",\"dbName\":null},{\"name\":\"DISCOUNT_CODE\",\"dbName\":null},{\"name\":\"CREDIT\",\"dbName\":null},{\"name\":\"CASH\",\"dbName\":null},{\"name\":\"NO_PRIZE\",\"dbName\":null},{\"name\":\"OTHER\",\"dbName\":null}],\"dbName\":null},\"StockType\":{\"values\":[{\"name\":\"LIMITED\",\"dbName\":null},{\"name\":\"UNLIMITED\",\"dbName\":null}],\"dbName\":null},\"PrizeStatus\":{\"values\":[{\"name\":\"ACTIVE\",\"dbName\":null},{\"name\":\"INACTIVE\",\"dbName\":null}],\"dbName\":null},\"SpinStatus\":{\"values\":[{\"name\":\"SUCCESS\",\"dbName\":null},{\"name\":\"FAILED\",\"dbName\":null},{\"name\":\"DUPLICATE\",\"dbName\":null}],\"dbName\":null},\"ChanceTxnType\":{\"values\":[{\"name\":\"SIGNUP_BONUS\",\"dbName\":null},{\"name\":\"ADMIN_ADJUSTMENT\",\"dbName\":null},{\"name\":\"SPIN_CONSUME\",\"dbName\":null},{\"name\":\"CAMPAIGN_BONUS\",\"dbName\":null},{\"name\":\"REFUND\",\"dbName\":null}],\"dbName\":null},\"UserPrizeStatus\":{\"values\":[{\"name\":\"NEW\",\"dbName\":null},{\"name\":\"CONTACTED\",\"dbName\":null},{\"name\":\"DELIVERED\",\"dbName\":null},{\"name\":\"ACTIVE_CODE\",\"dbName\":null},{\"name\":\"USED\",\"dbName\":null},{\"name\":\"EXPIRED\",\"dbName\":null}],\"dbName\":null},\"SmsType\":{\"values\":[{\"name\":\"OTP\",\"dbName\":null},{\"name\":\"WINNING\",\"dbName\":null},{\"name\":\"NO_PRIZE\",\"dbName\":null},{\"name\":\"PRIZE_REMINDER\",\"dbName\":null}],\"dbName\":null},\"SmsStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"SENT\",\"dbName\":null},{\"name\":\"FAILED\",\"dbName\":null}],\"dbName\":null},\"WheelDesign\":{\"values\":[{\"name\":\"CLASSIC_CASINO\",\"dbName\":null},{\"name\":\"NEON_CYBER\",\"dbName\":null},{\"name\":\"MINIMAL_FLAT\",\"dbName\":null},{\"name\":\"LUXURY_GOLD\",\"dbName\":null},{\"name\":\"PLAYFUL_CARTOON\",\"dbName\":null},{\"name\":\"RUSTIC_WOOD\",\"dbName\":null},{\"name\":\"GALAXY_SPACE\",\"dbName\":null},{\"name\":\"CANDY_LAND\",\"dbName\":null},{\"name\":\"FIRE_FLAME\",\"dbName\":null},{\"name\":\"CRYSTAL_ICE\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") +defineDmmfProperty(exports.Prisma, config.runtimeDataModel) +config.engineWasm = undefined + + +const { warnEnvConflicts } = require('@prisma/client/runtime/library.js') + +warnEnvConflicts({ + rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath), + schemaEnvPath: config.relativeEnvPaths.schemaEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.schemaEnvPath) +}) + +const PrismaClient = getPrismaClient(config) +exports.PrismaClient = PrismaClient +Object.assign(exports, Prisma) + +// file annotations for bundling tools to include these files +path.join(__dirname, "query_engine-windows.dll.node"); +path.join(process.cwd(), "../../node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/node_modules/.prisma/client/query_engine-windows.dll.node") + +// file annotations for bundling tools to include these files +path.join(__dirname, "libquery_engine-debian-openssl-3.0.x.so.node"); +path.join(process.cwd(), "../../node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/node_modules/.prisma/client/libquery_engine-debian-openssl-3.0.x.so.node") +// file annotations for bundling tools to include these files +path.join(__dirname, "schema.prisma"); +path.join(process.cwd(), "../../node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/node_modules/.prisma/client/schema.prisma") diff --git a/apps/api/release/vendor/.prisma/client/libquery_engine-debian-openssl-3.0.x.so.node b/apps/api/release/vendor/.prisma/client/libquery_engine-debian-openssl-3.0.x.so.node new file mode 100644 index 0000000..827ccc8 Binary files /dev/null and b/apps/api/release/vendor/.prisma/client/libquery_engine-debian-openssl-3.0.x.so.node differ diff --git a/apps/api/release/vendor/.prisma/client/package.json b/apps/api/release/vendor/.prisma/client/package.json new file mode 100644 index 0000000..1ac1370 --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/package.json @@ -0,0 +1,97 @@ +{ + "name": "prisma-client-9c4b98c054c4413303a6fe7479f16a8ffbbc92ed96b3de050b8208db40acf7bd", + "main": "index.js", + "types": "index.d.ts", + "browser": "index-browser.js", + "exports": { + "./package.json": "./package.json", + ".": { + "require": { + "node": "./index.js", + "edge-light": "./wasm.js", + "workerd": "./wasm.js", + "worker": "./wasm.js", + "browser": "./index-browser.js", + "default": "./index.js" + }, + "import": { + "node": "./index.js", + "edge-light": "./wasm.js", + "workerd": "./wasm.js", + "worker": "./wasm.js", + "browser": "./index-browser.js", + "default": "./index.js" + }, + "default": "./index.js" + }, + "./edge": { + "types": "./edge.d.ts", + "require": "./edge.js", + "import": "./edge.js", + "default": "./edge.js" + }, + "./react-native": { + "types": "./react-native.d.ts", + "require": "./react-native.js", + "import": "./react-native.js", + "default": "./react-native.js" + }, + "./extension": { + "types": "./extension.d.ts", + "require": "./extension.js", + "import": "./extension.js", + "default": "./extension.js" + }, + "./index-browser": { + "types": "./index.d.ts", + "require": "./index-browser.js", + "import": "./index-browser.js", + "default": "./index-browser.js" + }, + "./index": { + "types": "./index.d.ts", + "require": "./index.js", + "import": "./index.js", + "default": "./index.js" + }, + "./wasm": { + "types": "./wasm.d.ts", + "require": "./wasm.js", + "import": "./wasm.js", + "default": "./wasm.js" + }, + "./runtime/library": { + "types": "./runtime/library.d.ts", + "require": "./runtime/library.js", + "import": "./runtime/library.js", + "default": "./runtime/library.js" + }, + "./runtime/binary": { + "types": "./runtime/binary.d.ts", + "require": "./runtime/binary.js", + "import": "./runtime/binary.js", + "default": "./runtime/binary.js" + }, + "./generator-build": { + "require": "./generator-build/index.js", + "import": "./generator-build/index.js", + "default": "./generator-build/index.js" + }, + "./sql": { + "require": { + "types": "./sql.d.ts", + "node": "./sql.js", + "default": "./sql.js" + }, + "import": { + "types": "./sql.d.ts", + "node": "./sql.mjs", + "default": "./sql.mjs" + }, + "default": "./sql.js" + }, + "./*": "./*" + }, + "version": "5.22.0", + "sideEffects": false +} \ No newline at end of file diff --git a/apps/api/release/vendor/.prisma/client/schema.prisma b/apps/api/release/vendor/.prisma/client/schema.prisma new file mode 100644 index 0000000..d0b4b9b --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/schema.prisma @@ -0,0 +1,320 @@ +generator client { + provider = "prisma-client-js" + // native = local Windows/macOS; debian-openssl-3.0.x = node:20-bookworm (Arvan) + binaryTargets = ["native", "debian-openssl-3.0.x"] +} + +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +} + +// ==================== ENUMS ==================== + +enum AdminStatus { + ACTIVE + DISABLED +} + +enum AdminRole { + SUPER_ADMIN + OPERATOR + SUPPORT +} + +enum UserStatus { + ACTIVE + BLOCKED +} + +enum CampaignStatus { + DRAFT + ACTIVE + PAUSED + FINISHED +} + +enum PrizeType { + PHYSICAL + DISCOUNT_CODE + CREDIT + CASH + NO_PRIZE + OTHER +} + +enum StockType { + LIMITED + UNLIMITED +} + +enum PrizeStatus { + ACTIVE + INACTIVE +} + +enum SpinStatus { + SUCCESS + FAILED + DUPLICATE +} + +enum ChanceTxnType { + SIGNUP_BONUS + ADMIN_ADJUSTMENT + SPIN_CONSUME + CAMPAIGN_BONUS + REFUND +} + +enum UserPrizeStatus { + NEW + CONTACTED + DELIVERED + ACTIVE_CODE + USED + EXPIRED +} + +enum SmsType { + OTP + WINNING + NO_PRIZE + PRIZE_REMINDER +} + +enum SmsStatus { + PENDING + SENT + FAILED +} + +enum WheelDesign { + CLASSIC_CASINO + NEON_CYBER + MINIMAL_FLAT + LUXURY_GOLD + PLAYFUL_CARTOON + RUSTIC_WOOD + GALAXY_SPACE + CANDY_LAND + FIRE_FLAME + CRYSTAL_ICE +} + +// ==================== MODELS ==================== + +model Admin { + id String @id @default(uuid()) + name String + mobile String @unique + email String @unique + passwordHash String @map("password_hash") + role AdminRole @default(OPERATOR) + status AdminStatus @default(ACTIVE) + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + auditLogs AdminLog[] + chanceTxns ChanceTransaction[] @relation("AdminCreatedTxn") + + @@map("admins") +} + +model User { + id String @id @default(uuid()) + mobile String @unique + name String? + status UserStatus @default(ACTIVE) + lastLoginAt DateTime? @map("last_login_at") + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + userCampaigns UserCampaign[] + chanceTransactions ChanceTransaction[] + spins Spin[] + userPrizes UserPrize[] + otpCodes OtpCode[] + smsLogs SmsLog[] + + @@index([mobile]) + @@map("users") +} + +model OtpCode { + id String @id @default(uuid()) + mobile String + code String + userId String? @map("user_id") + user User? @relation(fields: [userId], references: [id]) + attempts Int @default(0) + consumed Boolean @default(false) + expiresAt DateTime @map("expires_at") + createdAt DateTime @default(now()) @map("created_at") + + @@index([mobile, consumed]) + @@map("otp_codes") +} + +model Campaign { + id String @id @default(uuid()) + title String + slug String @unique + description String? + image String? + banner String? + logo String? + startAt DateTime @map("start_at") + endAt DateTime @map("end_at") + status CampaignStatus @default(DRAFT) + defaultChances Int @default(0) @map("default_chances") + rules String? + ctaText String? @map("cta_text") + wheelDesign WheelDesign @default(CLASSIC_CASINO) @map("wheel_design") + settings Json? // primaryColor, secondaryColor, headerText, buttonText, headerImage, celebrationEffect... + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + prizes Prize[] + userCampaigns UserCampaign[] + chanceTxns ChanceTransaction[] + spins Spin[] + userPrizes UserPrize[] + + @@index([status, startAt, endAt]) + @@map("campaigns") +} + +model Prize { + id String @id @default(uuid()) + campaignId String @map("campaign_id") + campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade) + title String + description String? + image String? + type PrizeType + stockType StockType @map("stock_type") + initialStock Int? @map("initial_stock") + remainingStock Int? @map("remaining_stock") + weight Int + status PrizeStatus @default(ACTIVE) + sortOrder Int @default(0) @map("sort_order") + segmentColor String @map("segment_color") + expiresAt DateTime? @map("expires_at") + smsTemplate String? @map("sms_template") + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + spins Spin[] + userPrizes UserPrize[] + + @@index([campaignId, status]) + @@map("prizes") +} + +model UserCampaign { + id String @id @default(uuid()) + userId String @map("user_id") + user User @relation(fields: [userId], references: [id]) + campaignId String @map("campaign_id") + campaign Campaign @relation(fields: [campaignId], references: [id]) + totalChances Int @default(0) @map("total_chances") + usedChances Int @default(0) @map("used_chances") + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + @@unique([userId, campaignId]) + @@map("user_campaigns") +} + +model ChanceTransaction { + id String @id @default(uuid()) + userId String @map("user_id") + user User @relation(fields: [userId], references: [id]) + campaignId String @map("campaign_id") + campaign Campaign @relation(fields: [campaignId], references: [id]) + amount Int // مثبت یا منفی + type ChanceTxnType + referenceType String? @map("reference_type") // e.g. "spin", "manual" + referenceId String? @map("reference_id") + description String? + createdById String? @map("created_by") // admin id در صورت تغییر دستی + createdBy Admin? @relation("AdminCreatedTxn", fields: [createdById], references: [id]) + createdAt DateTime @default(now()) @map("created_at") + + @@index([userId, campaignId]) + @@map("chance_transactions") +} + +model Spin { + id String @id @default(uuid()) + userId String @map("user_id") + user User @relation(fields: [userId], references: [id]) + campaignId String @map("campaign_id") + campaign Campaign @relation(fields: [campaignId], references: [id]) + prizeId String? @map("prize_id") + prize Prize? @relation(fields: [prizeId], references: [id]) + status SpinStatus @default(SUCCESS) + idempotencyKey String @unique @map("idempotency_key") + ip String? + userAgent String? @map("user_agent") + createdAt DateTime @default(now()) @map("created_at") + + userPrize UserPrize? + + @@index([userId, campaignId]) + @@index([campaignId, createdAt]) + @@map("spins") +} + +model UserPrize { + id String @id @default(uuid()) + userId String @map("user_id") + user User @relation(fields: [userId], references: [id]) + campaignId String @map("campaign_id") + campaign Campaign @relation(fields: [campaignId], references: [id]) + prizeId String @map("prize_id") + prize Prize @relation(fields: [prizeId], references: [id]) + spinId String @unique @map("spin_id") + spin Spin @relation(fields: [spinId], references: [id]) + code String? @unique + status UserPrizeStatus @default(NEW) + wonAt DateTime @default(now()) @map("won_at") + redeemedAt DateTime? @map("redeemed_at") + + @@index([userId]) + @@index([status]) + @@map("user_prizes") +} + +model SmsLog { + id String @id @default(uuid()) + userId String? @map("user_id") + user User? @relation(fields: [userId], references: [id]) + mobile String + type SmsType + message String + provider String @default("raygansms") + status SmsStatus @default(PENDING) + providerResponse Json? @map("provider_response") + createdAt DateTime @default(now()) @map("created_at") + + @@index([mobile, type]) + @@map("sms_logs") +} + +model AdminLog { + id String @id @default(uuid()) + adminId String @map("admin_id") + admin Admin @relation(fields: [adminId], references: [id]) + action String // e.g. "prize.update", "chance.add" + entityType String @map("entity_type") + entityId String @map("entity_id") + oldValue Json? @map("old_value") + newValue Json? @map("new_value") + ip String? + createdAt DateTime @default(now()) @map("created_at") + + @@index([entityType, entityId]) + @@map("admin_logs") +} diff --git a/apps/api/release/vendor/.prisma/client/wasm.d.ts b/apps/api/release/vendor/.prisma/client/wasm.d.ts new file mode 100644 index 0000000..bc20c6c --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/wasm.d.ts @@ -0,0 +1 @@ +export * from "./index" \ No newline at end of file diff --git a/apps/api/release/vendor/.prisma/client/wasm.js b/apps/api/release/vendor/.prisma/client/wasm.js new file mode 100644 index 0000000..c9a3c43 --- /dev/null +++ b/apps/api/release/vendor/.prisma/client/wasm.js @@ -0,0 +1,428 @@ + +Object.defineProperty(exports, "__esModule", { value: true }); + +const { + Decimal, + objectEnumValues, + makeStrictEnum, + Public, + getRuntime, + skip +} = require('@prisma/client/runtime/index-browser.js') + + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: 5.22.0 + * Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2 + */ +Prisma.prismaVersion = { + client: "5.22.0", + engine: "605197351a3c8bdd595af2d2a9bc3025bca48ea2" +} + +Prisma.PrismaClientKnownRequestError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)}; +Prisma.PrismaClientUnknownRequestError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientRustPanicError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientInitializationError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.PrismaClientValidationError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.NotFoundError = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.empty = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.join = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.raw = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} +Prisma.defineExtension = () => { + const runtimeName = getRuntime().prettyName; + throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, +)} + +/** + * Shorthand utilities for JSON filtering + */ +Prisma.DbNull = objectEnumValues.instances.DbNull +Prisma.JsonNull = objectEnumValues.instances.JsonNull +Prisma.AnyNull = objectEnumValues.instances.AnyNull + +Prisma.NullTypes = { + DbNull: objectEnumValues.classes.DbNull, + JsonNull: objectEnumValues.classes.JsonNull, + AnyNull: objectEnumValues.classes.AnyNull +} + + + +/** + * Enums + */ + +exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +}); + +exports.Prisma.AdminScalarFieldEnum = { + id: 'id', + name: 'name', + mobile: 'mobile', + email: 'email', + passwordHash: 'passwordHash', + role: 'role', + status: 'status', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.UserScalarFieldEnum = { + id: 'id', + mobile: 'mobile', + name: 'name', + status: 'status', + lastLoginAt: 'lastLoginAt', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.OtpCodeScalarFieldEnum = { + id: 'id', + mobile: 'mobile', + code: 'code', + userId: 'userId', + attempts: 'attempts', + consumed: 'consumed', + expiresAt: 'expiresAt', + createdAt: 'createdAt' +}; + +exports.Prisma.CampaignScalarFieldEnum = { + id: 'id', + title: 'title', + slug: 'slug', + description: 'description', + image: 'image', + banner: 'banner', + logo: 'logo', + startAt: 'startAt', + endAt: 'endAt', + status: 'status', + defaultChances: 'defaultChances', + rules: 'rules', + ctaText: 'ctaText', + wheelDesign: 'wheelDesign', + settings: 'settings', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.PrizeScalarFieldEnum = { + id: 'id', + campaignId: 'campaignId', + title: 'title', + description: 'description', + image: 'image', + type: 'type', + stockType: 'stockType', + initialStock: 'initialStock', + remainingStock: 'remainingStock', + weight: 'weight', + status: 'status', + sortOrder: 'sortOrder', + segmentColor: 'segmentColor', + expiresAt: 'expiresAt', + smsTemplate: 'smsTemplate', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.UserCampaignScalarFieldEnum = { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + totalChances: 'totalChances', + usedChances: 'usedChances', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.ChanceTransactionScalarFieldEnum = { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + amount: 'amount', + type: 'type', + referenceType: 'referenceType', + referenceId: 'referenceId', + description: 'description', + createdById: 'createdById', + createdAt: 'createdAt' +}; + +exports.Prisma.SpinScalarFieldEnum = { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + prizeId: 'prizeId', + status: 'status', + idempotencyKey: 'idempotencyKey', + ip: 'ip', + userAgent: 'userAgent', + createdAt: 'createdAt' +}; + +exports.Prisma.UserPrizeScalarFieldEnum = { + id: 'id', + userId: 'userId', + campaignId: 'campaignId', + prizeId: 'prizeId', + spinId: 'spinId', + code: 'code', + status: 'status', + wonAt: 'wonAt', + redeemedAt: 'redeemedAt' +}; + +exports.Prisma.SmsLogScalarFieldEnum = { + id: 'id', + userId: 'userId', + mobile: 'mobile', + type: 'type', + message: 'message', + provider: 'provider', + status: 'status', + providerResponse: 'providerResponse', + createdAt: 'createdAt' +}; + +exports.Prisma.AdminLogScalarFieldEnum = { + id: 'id', + adminId: 'adminId', + action: 'action', + entityType: 'entityType', + entityId: 'entityId', + oldValue: 'oldValue', + newValue: 'newValue', + ip: 'ip', + createdAt: 'createdAt' +}; + +exports.Prisma.SortOrder = { + asc: 'asc', + desc: 'desc' +}; + +exports.Prisma.NullableJsonNullValueInput = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull +}; + +exports.Prisma.QueryMode = { + default: 'default', + insensitive: 'insensitive' +}; + +exports.Prisma.NullsOrder = { + first: 'first', + last: 'last' +}; + +exports.Prisma.JsonNullValueFilter = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull, + AnyNull: Prisma.AnyNull +}; +exports.AdminRole = exports.$Enums.AdminRole = { + SUPER_ADMIN: 'SUPER_ADMIN', + OPERATOR: 'OPERATOR', + SUPPORT: 'SUPPORT' +}; + +exports.AdminStatus = exports.$Enums.AdminStatus = { + ACTIVE: 'ACTIVE', + DISABLED: 'DISABLED' +}; + +exports.UserStatus = exports.$Enums.UserStatus = { + ACTIVE: 'ACTIVE', + BLOCKED: 'BLOCKED' +}; + +exports.CampaignStatus = exports.$Enums.CampaignStatus = { + DRAFT: 'DRAFT', + ACTIVE: 'ACTIVE', + PAUSED: 'PAUSED', + FINISHED: 'FINISHED' +}; + +exports.WheelDesign = exports.$Enums.WheelDesign = { + CLASSIC_CASINO: 'CLASSIC_CASINO', + NEON_CYBER: 'NEON_CYBER', + MINIMAL_FLAT: 'MINIMAL_FLAT', + LUXURY_GOLD: 'LUXURY_GOLD', + PLAYFUL_CARTOON: 'PLAYFUL_CARTOON', + RUSTIC_WOOD: 'RUSTIC_WOOD', + GALAXY_SPACE: 'GALAXY_SPACE', + CANDY_LAND: 'CANDY_LAND', + FIRE_FLAME: 'FIRE_FLAME', + CRYSTAL_ICE: 'CRYSTAL_ICE' +}; + +exports.PrizeType = exports.$Enums.PrizeType = { + PHYSICAL: 'PHYSICAL', + DISCOUNT_CODE: 'DISCOUNT_CODE', + CREDIT: 'CREDIT', + CASH: 'CASH', + NO_PRIZE: 'NO_PRIZE', + OTHER: 'OTHER' +}; + +exports.StockType = exports.$Enums.StockType = { + LIMITED: 'LIMITED', + UNLIMITED: 'UNLIMITED' +}; + +exports.PrizeStatus = exports.$Enums.PrizeStatus = { + ACTIVE: 'ACTIVE', + INACTIVE: 'INACTIVE' +}; + +exports.ChanceTxnType = exports.$Enums.ChanceTxnType = { + SIGNUP_BONUS: 'SIGNUP_BONUS', + ADMIN_ADJUSTMENT: 'ADMIN_ADJUSTMENT', + SPIN_CONSUME: 'SPIN_CONSUME', + CAMPAIGN_BONUS: 'CAMPAIGN_BONUS', + REFUND: 'REFUND' +}; + +exports.SpinStatus = exports.$Enums.SpinStatus = { + SUCCESS: 'SUCCESS', + FAILED: 'FAILED', + DUPLICATE: 'DUPLICATE' +}; + +exports.UserPrizeStatus = exports.$Enums.UserPrizeStatus = { + NEW: 'NEW', + CONTACTED: 'CONTACTED', + DELIVERED: 'DELIVERED', + ACTIVE_CODE: 'ACTIVE_CODE', + USED: 'USED', + EXPIRED: 'EXPIRED' +}; + +exports.SmsType = exports.$Enums.SmsType = { + OTP: 'OTP', + WINNING: 'WINNING', + NO_PRIZE: 'NO_PRIZE', + PRIZE_REMINDER: 'PRIZE_REMINDER' +}; + +exports.SmsStatus = exports.$Enums.SmsStatus = { + PENDING: 'PENDING', + SENT: 'SENT', + FAILED: 'FAILED' +}; + +exports.Prisma.ModelName = { + Admin: 'Admin', + User: 'User', + OtpCode: 'OtpCode', + Campaign: 'Campaign', + Prize: 'Prize', + UserCampaign: 'UserCampaign', + ChanceTransaction: 'ChanceTransaction', + Spin: 'Spin', + UserPrize: 'UserPrize', + SmsLog: 'SmsLog', + AdminLog: 'AdminLog' +}; + +/** + * This is a stub Prisma Client that will error at runtime if called. + */ +class PrismaClient { + constructor() { + return new Proxy(this, { + get(target, prop) { + let message + const runtime = getRuntime() + if (runtime.isEdge) { + message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: +- Use Prisma Accelerate: https://pris.ly/d/accelerate +- Use Driver Adapters: https://pris.ly/d/driver-adapters +`; + } else { + message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' + } + + message += ` +If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` + + throw new Error(message) + } + }) + } +} + +exports.PrismaClient = PrismaClient + +Object.assign(exports, Prisma) diff --git a/apps/api/release/vendor/@prisma/client/LICENSE b/apps/api/release/vendor/@prisma/client/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/apps/api/release/vendor/@prisma/client/README.md b/apps/api/release/vendor/@prisma/client/README.md new file mode 100644 index 0000000..c67b83c --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/README.md @@ -0,0 +1,27 @@ +# Prisma Client · [![npm version](https://img.shields.io/npm/v/@prisma/client.svg?style=flat)](https://www.npmjs.com/package/@prisma/client) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/prisma/prisma/blob/main/CONTRIBUTING.md) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue)](https://github.com/prisma/prisma/blob/main/LICENSE) [![Discord](https://img.shields.io/discord/937751382725886062?label=Discord)](https://pris.ly/discord) + +Prisma Client JS is an **auto-generated query builder** that enables **type-safe** database access and **reduces boilerplate**. You can use it as an alternative to traditional ORMs such as Sequelize, TypeORM or SQL query builders like knex.js. + +It is part of the [Prisma](https://www.prisma.io/) ecosystem. Prisma provides database tools for data access, declarative data modeling, schema migrations and visual data management. Learn more in the main [`prisma`](https://github.com/prisma/prisma/) repository or read the [documentation](https://www.prisma.io/docs/). + +## Getting started + +Follow one of these guides to get started with Prisma Client JS: + +- [Quickstart](https://www.prisma.io/docs/getting-started/quickstart) (5 min) +- [Set up a new project with Prisma (SQL migrations)](https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch-sql) (15 min) +- [Set up a new project with Prisma (Prisma Migrate)](https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch-prisma-migrate) (15 min) +- [Add Prisma to an existing project](https://www.prisma.io/docs/getting-started/setup-prisma/add-to-existing-project) (15 min) + +Alternatively you can explore the ready-to-run [examples](https://github.com/prisma/prisma-examples/) (REST, GraphQL, gRPC, plain JavaScript and TypeScript demos, ...) or watch the [demo videos](https://www.youtube.com/watch?v=0RhtQgIs-TE&list=PLn2e1F9Rfr6k9PnR_figWOcSHgc_erDr5&index=1) (1-2 min per video). + +## Contributing + +Refer to our [contribution guidelines](https://github.com/prisma/prisma/blob/main/CONTRIBUTING.md) and [Code of Conduct for contributors](https://github.com/prisma/prisma/blob/main/CODE_OF_CONDUCT.md). + +## Tests Status + +- Prisma Tests Status: + [![CI](https://github.com/prisma/prisma/actions/workflows/test.yml/badge.svg)](https://github.com/prisma/prisma/actions/workflows/test.yml) +- Ecosystem Tests Status: + [![Actions Status](https://github.com/prisma/ecosystem-tests/workflows/test/badge.svg)](https://github.com/prisma/ecosystem-tests/actions) diff --git a/apps/api/release/vendor/@prisma/client/default.d.ts b/apps/api/release/vendor/@prisma/client/default.d.ts new file mode 100644 index 0000000..bedfdce --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/default.d.ts @@ -0,0 +1 @@ +export * from '.prisma/client/default' diff --git a/apps/api/release/vendor/@prisma/client/default.js b/apps/api/release/vendor/@prisma/client/default.js new file mode 100644 index 0000000..3c2dafb --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/default.js @@ -0,0 +1,3 @@ +module.exports = { + ...require('.prisma/client/default'), +} diff --git a/apps/api/release/vendor/@prisma/client/edge.d.ts b/apps/api/release/vendor/@prisma/client/edge.d.ts new file mode 100644 index 0000000..b8d190e --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/edge.d.ts @@ -0,0 +1 @@ +export * from '.prisma/client/edge' diff --git a/apps/api/release/vendor/@prisma/client/edge.js b/apps/api/release/vendor/@prisma/client/edge.js new file mode 100644 index 0000000..c4925e8 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/edge.js @@ -0,0 +1,4 @@ +module.exports = { + // https://github.com/prisma/prisma/pull/12907 + ...require('.prisma/client/edge'), +} diff --git a/apps/api/release/vendor/@prisma/client/extension.d.ts b/apps/api/release/vendor/@prisma/client/extension.d.ts new file mode 100644 index 0000000..28e3968 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/extension.d.ts @@ -0,0 +1 @@ +export * from './scripts/default-index' diff --git a/apps/api/release/vendor/@prisma/client/extension.js b/apps/api/release/vendor/@prisma/client/extension.js new file mode 100644 index 0000000..3ab6e46 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/extension.js @@ -0,0 +1,4 @@ +module.exports = { + // https://github.com/prisma/prisma/pull/12907 + ...require('./scripts/default-index'), +} diff --git a/apps/api/release/vendor/@prisma/client/generator-build/index.js b/apps/api/release/vendor/@prisma/client/generator-build/index.js new file mode 100644 index 0000000..f0adad1 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/generator-build/index.js @@ -0,0 +1,10351 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// ../../node_modules/.pnpm/@prisma+engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2/node_modules/@prisma/engines-version/package.json +var require_package = __commonJS({ + "../../node_modules/.pnpm/@prisma+engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2/node_modules/@prisma/engines-version/package.json"(exports2, module2) { + module2.exports = { + name: "@prisma/engines-version", + version: "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + main: "index.js", + types: "index.d.ts", + license: "Apache-2.0", + author: "Tim Suchanek ", + prisma: { + enginesVersion: "605197351a3c8bdd595af2d2a9bc3025bca48ea2" + }, + repository: { + type: "git", + url: "https://github.com/prisma/engines-wrapper.git", + directory: "packages/engines-version" + }, + devDependencies: { + "@types/node": "18.19.34", + typescript: "4.9.5" + }, + files: [ + "index.js", + "index.d.ts" + ], + scripts: { + build: "tsc -d" + } + }; + } +}); + +// ../../node_modules/.pnpm/@prisma+engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2/node_modules/@prisma/engines-version/index.js +var require_engines_version = __commonJS({ + "../../node_modules/.pnpm/@prisma+engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2/node_modules/@prisma/engines-version/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.enginesVersion = void 0; + exports2.enginesVersion = require_package().prisma.enginesVersion; + } +}); + +// ../../node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js +var require_universalify = __commonJS({ + "../../node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js"(exports2) { + "use strict"; + exports2.fromCallback = function(fn) { + return Object.defineProperty(function(...args) { + if (typeof args[args.length - 1] === "function") fn.apply(this, args); + else { + return new Promise((resolve, reject) => { + fn.call( + this, + ...args, + (err, res) => err != null ? reject(err) : resolve(res) + ); + }); + } + }, "name", { value: fn.name }); + }; + exports2.fromPromise = function(fn) { + return Object.defineProperty(function(...args) { + const cb = args[args.length - 1]; + if (typeof cb !== "function") return fn.apply(this, args); + else fn.apply(this, args.slice(0, -1)).then((r) => cb(null, r), cb); + }, "name", { value: fn.name }); + }; + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js +var require_polyfills = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js"(exports2, module2) { + "use strict"; + var constants = require("constants"); + var origCwd = process.cwd; + var cwd2 = null; + var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; + process.cwd = function() { + if (!cwd2) + cwd2 = origCwd.call(process); + return cwd2; + }; + try { + process.cwd(); + } catch (er) { + } + if (typeof process.chdir === "function") { + chdir = process.chdir; + process.chdir = function(d) { + cwd2 = null; + chdir.call(process, d); + }; + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); + } + var chdir; + module2.exports = patch; + function patch(fs3) { + if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs3); + } + if (!fs3.lutimes) { + patchLutimes(fs3); + } + fs3.chown = chownFix(fs3.chown); + fs3.fchown = chownFix(fs3.fchown); + fs3.lchown = chownFix(fs3.lchown); + fs3.chmod = chmodFix(fs3.chmod); + fs3.fchmod = chmodFix(fs3.fchmod); + fs3.lchmod = chmodFix(fs3.lchmod); + fs3.chownSync = chownFixSync(fs3.chownSync); + fs3.fchownSync = chownFixSync(fs3.fchownSync); + fs3.lchownSync = chownFixSync(fs3.lchownSync); + fs3.chmodSync = chmodFixSync(fs3.chmodSync); + fs3.fchmodSync = chmodFixSync(fs3.fchmodSync); + fs3.lchmodSync = chmodFixSync(fs3.lchmodSync); + fs3.stat = statFix(fs3.stat); + fs3.fstat = statFix(fs3.fstat); + fs3.lstat = statFix(fs3.lstat); + fs3.statSync = statFixSync(fs3.statSync); + fs3.fstatSync = statFixSync(fs3.fstatSync); + fs3.lstatSync = statFixSync(fs3.lstatSync); + if (fs3.chmod && !fs3.lchmod) { + fs3.lchmod = function(path5, mode, cb) { + if (cb) process.nextTick(cb); + }; + fs3.lchmodSync = function() { + }; + } + if (fs3.chown && !fs3.lchown) { + fs3.lchown = function(path5, uid, gid, cb) { + if (cb) process.nextTick(cb); + }; + fs3.lchownSync = function() { + }; + } + if (platform === "win32") { + fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : function(fs$rename) { + function rename(from, to, cb) { + var start = Date.now(); + var backoff = 0; + fs$rename(from, to, function CB(er) { + if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { + setTimeout(function() { + fs3.stat(to, function(stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er); + }); + }, backoff); + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er); + }); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); + return rename; + }(fs3.rename); + } + fs3.read = typeof fs3.read !== "function" ? fs3.read : function(fs$read) { + function read(fd, buffer2, offset, length, position, callback_) { + var callback; + if (callback_ && typeof callback_ === "function") { + var eagCounter = 0; + callback = function(er, _, __) { + if (er && er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + return fs$read.call(fs3, fd, buffer2, offset, length, position, callback); + } + callback_.apply(this, arguments); + }; + } + return fs$read.call(fs3, fd, buffer2, offset, length, position, callback); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); + return read; + }(fs3.read); + fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ function(fs$readSync) { + return function(fd, buffer2, offset, length, position) { + var eagCounter = 0; + while (true) { + try { + return fs$readSync.call(fs3, fd, buffer2, offset, length, position); + } catch (er) { + if (er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + continue; + } + throw er; + } + } + }; + }(fs3.readSync); + function patchLchmod(fs4) { + fs4.lchmod = function(path5, mode, callback) { + fs4.open( + path5, + constants.O_WRONLY | constants.O_SYMLINK, + mode, + function(err, fd) { + if (err) { + if (callback) callback(err); + return; + } + fs4.fchmod(fd, mode, function(err2) { + fs4.close(fd, function(err22) { + if (callback) callback(err2 || err22); + }); + }); + } + ); + }; + fs4.lchmodSync = function(path5, mode) { + var fd = fs4.openSync(path5, constants.O_WRONLY | constants.O_SYMLINK, mode); + var threw = true; + var ret; + try { + ret = fs4.fchmodSync(fd, mode); + threw = false; + } finally { + if (threw) { + try { + fs4.closeSync(fd); + } catch (er) { + } + } else { + fs4.closeSync(fd); + } + } + return ret; + }; + } + function patchLutimes(fs4) { + if (constants.hasOwnProperty("O_SYMLINK") && fs4.futimes) { + fs4.lutimes = function(path5, at, mt, cb) { + fs4.open(path5, constants.O_SYMLINK, function(er, fd) { + if (er) { + if (cb) cb(er); + return; + } + fs4.futimes(fd, at, mt, function(er2) { + fs4.close(fd, function(er22) { + if (cb) cb(er2 || er22); + }); + }); + }); + }; + fs4.lutimesSync = function(path5, at, mt) { + var fd = fs4.openSync(path5, constants.O_SYMLINK); + var ret; + var threw = true; + try { + ret = fs4.futimesSync(fd, at, mt); + threw = false; + } finally { + if (threw) { + try { + fs4.closeSync(fd); + } catch (er) { + } + } else { + fs4.closeSync(fd); + } + } + return ret; + }; + } else if (fs4.futimes) { + fs4.lutimes = function(_a, _b, _c, cb) { + if (cb) process.nextTick(cb); + }; + fs4.lutimesSync = function() { + }; + } + } + function chmodFix(orig) { + if (!orig) return orig; + return function(target, mode, cb) { + return orig.call(fs3, target, mode, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chmodFixSync(orig) { + if (!orig) return orig; + return function(target, mode) { + try { + return orig.call(fs3, target, mode); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function chownFix(orig) { + if (!orig) return orig; + return function(target, uid, gid, cb) { + return orig.call(fs3, target, uid, gid, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chownFixSync(orig) { + if (!orig) return orig; + return function(target, uid, gid) { + try { + return orig.call(fs3, target, uid, gid); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function statFix(orig) { + if (!orig) return orig; + return function(target, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + function callback(er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + if (cb) cb.apply(this, arguments); + } + return options ? orig.call(fs3, target, options, callback) : orig.call(fs3, target, callback); + }; + } + function statFixSync(orig) { + if (!orig) return orig; + return function(target, options) { + var stats = options ? orig.call(fs3, target, options) : orig.call(fs3, target); + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + return stats; + }; + } + function chownErOk(er) { + if (!er) + return true; + if (er.code === "ENOSYS") + return true; + var nonroot = !process.getuid || process.getuid() !== 0; + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true; + } + return false; + } + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js +var require_legacy_streams = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { + "use strict"; + var Stream = require("stream").Stream; + module2.exports = legacy; + function legacy(fs3) { + return { + ReadStream, + WriteStream + }; + function ReadStream(path5, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path5, options); + Stream.call(this); + var self = this; + this.path = path5; + this.fd = null; + this.readable = true; + this.paused = false; + this.flags = "r"; + this.mode = 438; + this.bufferSize = 64 * 1024; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.encoding) this.setEncoding(this.encoding); + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.end === void 0) { + this.end = Infinity; + } else if ("number" !== typeof this.end) { + throw TypeError("end must be a Number"); + } + if (this.start > this.end) { + throw new Error("start must be <= end"); + } + this.pos = this.start; + } + if (this.fd !== null) { + process.nextTick(function() { + self._read(); + }); + return; + } + fs3.open(this.path, this.flags, this.mode, function(err, fd) { + if (err) { + self.emit("error", err); + self.readable = false; + return; + } + self.fd = fd; + self.emit("open", fd); + self._read(); + }); + } + function WriteStream(path5, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path5, options); + Stream.call(this); + this.path = path5; + this.fd = null; + this.writable = true; + this.flags = "w"; + this.encoding = "binary"; + this.mode = 438; + this.bytesWritten = 0; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.start < 0) { + throw new Error("start must be >= zero"); + } + this.pos = this.start; + } + this.busy = false; + this._queue = []; + if (this.fd === null) { + this._open = fs3.open; + this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); + this.flush(); + } + } + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js +var require_clone = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js"(exports2, module2) { + "use strict"; + module2.exports = clone; + var getPrototypeOf = Object.getPrototypeOf || function(obj) { + return obj.__proto__; + }; + function clone(obj) { + if (obj === null || typeof obj !== "object") + return obj; + if (obj instanceof Object) + var copy = { __proto__: getPrototypeOf(obj) }; + else + var copy = /* @__PURE__ */ Object.create(null); + Object.getOwnPropertyNames(obj).forEach(function(key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); + }); + return copy; + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js +var require_graceful_fs = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { + "use strict"; + var fs3 = require("fs"); + var polyfills = require_polyfills(); + var legacy = require_legacy_streams(); + var clone = require_clone(); + var util2 = require("util"); + var gracefulQueue; + var previousSymbol; + if (typeof Symbol === "function" && typeof Symbol.for === "function") { + gracefulQueue = Symbol.for("graceful-fs.queue"); + previousSymbol = Symbol.for("graceful-fs.previous"); + } else { + gracefulQueue = "___graceful-fs.queue"; + previousSymbol = "___graceful-fs.previous"; + } + function noop() { + } + function publishQueue(context, queue2) { + Object.defineProperty(context, gracefulQueue, { + get: function() { + return queue2; + } + }); + } + var debug4 = noop; + if (util2.debuglog) + debug4 = util2.debuglog("gfs4"); + else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) + debug4 = function() { + var m = util2.format.apply(util2, arguments); + m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); + console.error(m); + }; + if (!fs3[gracefulQueue]) { + queue = global[gracefulQueue] || []; + publishQueue(fs3, queue); + fs3.close = function(fs$close) { + function close(fd, cb) { + return fs$close.call(fs3, fd, function(err) { + if (!err) { + resetQueue(); + } + if (typeof cb === "function") + cb.apply(this, arguments); + }); + } + Object.defineProperty(close, previousSymbol, { + value: fs$close + }); + return close; + }(fs3.close); + fs3.closeSync = function(fs$closeSync) { + function closeSync(fd) { + fs$closeSync.apply(fs3, arguments); + resetQueue(); + } + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }); + return closeSync; + }(fs3.closeSync); + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { + process.on("exit", function() { + debug4(fs3[gracefulQueue]); + require("assert").equal(fs3[gracefulQueue].length, 0); + }); + } + } + var queue; + if (!global[gracefulQueue]) { + publishQueue(global, fs3[gracefulQueue]); + } + module2.exports = patch(clone(fs3)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs3.__patched) { + module2.exports = patch(fs3); + fs3.__patched = true; + } + function patch(fs4) { + polyfills(fs4); + fs4.gracefulify = patch; + fs4.createReadStream = createReadStream; + fs4.createWriteStream = createWriteStream; + var fs$readFile = fs4.readFile; + fs4.readFile = readFile; + function readFile(path5, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$readFile(path5, options, cb); + function go$readFile(path6, options2, cb2, startTime) { + return fs$readFile(path6, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$readFile, [path6, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$writeFile = fs4.writeFile; + fs4.writeFile = writeFile; + function writeFile(path5, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$writeFile(path5, data, options, cb); + function go$writeFile(path6, data2, options2, cb2, startTime) { + return fs$writeFile(path6, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$writeFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$appendFile = fs4.appendFile; + if (fs$appendFile) + fs4.appendFile = appendFile; + function appendFile(path5, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$appendFile(path5, data, options, cb); + function go$appendFile(path6, data2, options2, cb2, startTime) { + return fs$appendFile(path6, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$appendFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$copyFile = fs4.copyFile; + if (fs$copyFile) + fs4.copyFile = copyFile; + function copyFile(src, dest, flags, cb) { + if (typeof flags === "function") { + cb = flags; + flags = 0; + } + return go$copyFile(src, dest, flags, cb); + function go$copyFile(src2, dest2, flags2, cb2, startTime) { + return fs$copyFile(src2, dest2, flags2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$readdir = fs4.readdir; + fs4.readdir = readdir; + var noReaddirOptionVersions = /^v[0-5]\./; + function readdir(path5, options, cb) { + if (typeof options === "function") + cb = options, options = null; + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path6, options2, cb2, startTime) { + return fs$readdir(path6, fs$readdirCallback( + path6, + options2, + cb2, + startTime + )); + } : function go$readdir2(path6, options2, cb2, startTime) { + return fs$readdir(path6, options2, fs$readdirCallback( + path6, + options2, + cb2, + startTime + )); + }; + return go$readdir(path5, options, cb); + function fs$readdirCallback(path6, options2, cb2, startTime) { + return function(err, files) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([ + go$readdir, + [path6, options2, cb2], + err, + startTime || Date.now(), + Date.now() + ]); + else { + if (files && files.sort) + files.sort(); + if (typeof cb2 === "function") + cb2.call(this, err, files); + } + }; + } + } + if (process.version.substr(0, 4) === "v0.8") { + var legStreams = legacy(fs4); + ReadStream = legStreams.ReadStream; + WriteStream = legStreams.WriteStream; + } + var fs$ReadStream = fs4.ReadStream; + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype); + ReadStream.prototype.open = ReadStream$open; + } + var fs$WriteStream = fs4.WriteStream; + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype); + WriteStream.prototype.open = WriteStream$open; + } + Object.defineProperty(fs4, "ReadStream", { + get: function() { + return ReadStream; + }, + set: function(val) { + ReadStream = val; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(fs4, "WriteStream", { + get: function() { + return WriteStream; + }, + set: function(val) { + WriteStream = val; + }, + enumerable: true, + configurable: true + }); + var FileReadStream = ReadStream; + Object.defineProperty(fs4, "FileReadStream", { + get: function() { + return FileReadStream; + }, + set: function(val) { + FileReadStream = val; + }, + enumerable: true, + configurable: true + }); + var FileWriteStream = WriteStream; + Object.defineProperty(fs4, "FileWriteStream", { + get: function() { + return FileWriteStream; + }, + set: function(val) { + FileWriteStream = val; + }, + enumerable: true, + configurable: true + }); + function ReadStream(path5, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this; + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments); + } + function ReadStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + if (that.autoClose) + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + that.read(); + } + }); + } + function WriteStream(path5, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this; + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments); + } + function WriteStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + } + }); + } + function createReadStream(path5, options) { + return new fs4.ReadStream(path5, options); + } + function createWriteStream(path5, options) { + return new fs4.WriteStream(path5, options); + } + var fs$open = fs4.open; + fs4.open = open; + function open(path5, flags, mode, cb) { + if (typeof mode === "function") + cb = mode, mode = null; + return go$open(path5, flags, mode, cb); + function go$open(path6, flags2, mode2, cb2, startTime) { + return fs$open(path6, flags2, mode2, function(err, fd) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$open, [path6, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + return fs4; + } + function enqueue(elem) { + debug4("ENQUEUE", elem[0].name, elem[1]); + fs3[gracefulQueue].push(elem); + retry(); + } + var retryTimer; + function resetQueue() { + var now = Date.now(); + for (var i = 0; i < fs3[gracefulQueue].length; ++i) { + if (fs3[gracefulQueue][i].length > 2) { + fs3[gracefulQueue][i][3] = now; + fs3[gracefulQueue][i][4] = now; + } + } + retry(); + } + function retry() { + clearTimeout(retryTimer); + retryTimer = void 0; + if (fs3[gracefulQueue].length === 0) + return; + var elem = fs3[gracefulQueue].shift(); + var fn = elem[0]; + var args = elem[1]; + var err = elem[2]; + var startTime = elem[3]; + var lastTime = elem[4]; + if (startTime === void 0) { + debug4("RETRY", fn.name, args); + fn.apply(null, args); + } else if (Date.now() - startTime >= 6e4) { + debug4("TIMEOUT", fn.name, args); + var cb = args.pop(); + if (typeof cb === "function") + cb.call(null, err); + } else { + var sinceAttempt = Date.now() - lastTime; + var sinceStart = Math.max(lastTime - startTime, 1); + var desiredDelay = Math.min(sinceStart * 1.2, 100); + if (sinceAttempt >= desiredDelay) { + debug4("RETRY", fn.name, args); + fn.apply(null, args.concat([startTime])); + } else { + fs3[gracefulQueue].push(elem); + } + } + if (retryTimer === void 0) { + retryTimer = setTimeout(retry, 0); + } + } + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/fs/index.js +var require_fs = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/fs/index.js"(exports2) { + "use strict"; + var u = require_universalify().fromCallback; + var fs3 = require_graceful_fs(); + var api = [ + "access", + "appendFile", + "chmod", + "chown", + "close", + "copyFile", + "fchmod", + "fchown", + "fdatasync", + "fstat", + "fsync", + "ftruncate", + "futimes", + "lchmod", + "lchown", + "link", + "lstat", + "mkdir", + "mkdtemp", + "open", + "opendir", + "readdir", + "readFile", + "readlink", + "realpath", + "rename", + "rm", + "rmdir", + "stat", + "symlink", + "truncate", + "unlink", + "utimes", + "writeFile" + ].filter((key) => { + return typeof fs3[key] === "function"; + }); + Object.assign(exports2, fs3); + api.forEach((method2) => { + exports2[method2] = u(fs3[method2]); + }); + exports2.exists = function(filename, callback) { + if (typeof callback === "function") { + return fs3.exists(filename, callback); + } + return new Promise((resolve) => { + return fs3.exists(filename, resolve); + }); + }; + exports2.read = function(fd, buffer2, offset, length, position, callback) { + if (typeof callback === "function") { + return fs3.read(fd, buffer2, offset, length, position, callback); + } + return new Promise((resolve, reject) => { + fs3.read(fd, buffer2, offset, length, position, (err, bytesRead, buffer3) => { + if (err) return reject(err); + resolve({ bytesRead, buffer: buffer3 }); + }); + }); + }; + exports2.write = function(fd, buffer2, ...args) { + if (typeof args[args.length - 1] === "function") { + return fs3.write(fd, buffer2, ...args); + } + return new Promise((resolve, reject) => { + fs3.write(fd, buffer2, ...args, (err, bytesWritten, buffer3) => { + if (err) return reject(err); + resolve({ bytesWritten, buffer: buffer3 }); + }); + }); + }; + exports2.readv = function(fd, buffers, ...args) { + if (typeof args[args.length - 1] === "function") { + return fs3.readv(fd, buffers, ...args); + } + return new Promise((resolve, reject) => { + fs3.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => { + if (err) return reject(err); + resolve({ bytesRead, buffers: buffers2 }); + }); + }); + }; + exports2.writev = function(fd, buffers, ...args) { + if (typeof args[args.length - 1] === "function") { + return fs3.writev(fd, buffers, ...args); + } + return new Promise((resolve, reject) => { + fs3.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => { + if (err) return reject(err); + resolve({ bytesWritten, buffers: buffers2 }); + }); + }); + }; + if (typeof fs3.realpath.native === "function") { + exports2.realpath.native = u(fs3.realpath.native); + } else { + process.emitWarning( + "fs.realpath.native is not a function. Is fs being monkey-patched?", + "Warning", + "fs-extra-WARN0003" + ); + } + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/utils.js +var require_utils = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) { + "use strict"; + var path5 = require("path"); + module2.exports.checkPath = function checkPath(pth) { + if (process.platform === "win32") { + const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path5.parse(pth).root, "")); + if (pathHasInvalidWinCharacters) { + const error = new Error(`Path contains invalid characters: ${pth}`); + error.code = "EINVAL"; + throw error; + } + } + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/make-dir.js +var require_make_dir = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) { + "use strict"; + var fs3 = require_fs(); + var { checkPath } = require_utils(); + var getMode = (options) => { + const defaults = { mode: 511 }; + if (typeof options === "number") return options; + return { ...defaults, ...options }.mode; + }; + module2.exports.makeDir = async (dir, options) => { + checkPath(dir); + return fs3.mkdir(dir, { + mode: getMode(options), + recursive: true + }); + }; + module2.exports.makeDirSync = (dir, options) => { + checkPath(dir); + return fs3.mkdirSync(dir, { + mode: getMode(options), + recursive: true + }); + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/index.js +var require_mkdirs = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/index.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromPromise; + var { makeDir: _makeDir, makeDirSync } = require_make_dir(); + var makeDir = u(_makeDir); + module2.exports = { + mkdirs: makeDir, + mkdirsSync: makeDirSync, + // alias + mkdirp: makeDir, + mkdirpSync: makeDirSync, + ensureDir: makeDir, + ensureDirSync: makeDirSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/path-exists/index.js +var require_path_exists = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromPromise; + var fs3 = require_fs(); + function pathExists2(path5) { + return fs3.access(path5).then(() => true).catch(() => false); + } + module2.exports = { + pathExists: u(pathExists2), + pathExistsSync: fs3.existsSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/utimes.js +var require_utimes = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) { + "use strict"; + var fs3 = require_graceful_fs(); + function utimesMillis(path5, atime, mtime, callback) { + fs3.open(path5, "r+", (err, fd) => { + if (err) return callback(err); + fs3.futimes(fd, atime, mtime, (futimesErr) => { + fs3.close(fd, (closeErr) => { + if (callback) callback(futimesErr || closeErr); + }); + }); + }); + } + function utimesMillisSync(path5, atime, mtime) { + const fd = fs3.openSync(path5, "r+"); + fs3.futimesSync(fd, atime, mtime); + return fs3.closeSync(fd); + } + module2.exports = { + utimesMillis, + utimesMillisSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/stat.js +var require_stat = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/stat.js"(exports2, module2) { + "use strict"; + var fs3 = require_fs(); + var path5 = require("path"); + var util2 = require("util"); + function getStats(src, dest, opts) { + const statFunc = opts.dereference ? (file2) => fs3.stat(file2, { bigint: true }) : (file2) => fs3.lstat(file2, { bigint: true }); + return Promise.all([ + statFunc(src), + statFunc(dest).catch((err) => { + if (err.code === "ENOENT") return null; + throw err; + }) + ]).then(([srcStat, destStat]) => ({ srcStat, destStat })); + } + function getStatsSync(src, dest, opts) { + let destStat; + const statFunc = opts.dereference ? (file2) => fs3.statSync(file2, { bigint: true }) : (file2) => fs3.lstatSync(file2, { bigint: true }); + const srcStat = statFunc(src); + try { + destStat = statFunc(dest); + } catch (err) { + if (err.code === "ENOENT") return { srcStat, destStat: null }; + throw err; + } + return { srcStat, destStat }; + } + function checkPaths(src, dest, funcName, opts, cb) { + util2.callbackify(getStats)(src, dest, opts, (err, stats) => { + if (err) return cb(err); + const { srcStat, destStat } = stats; + if (destStat) { + if (areIdentical(srcStat, destStat)) { + const srcBaseName = path5.basename(src); + const destBaseName = path5.basename(dest); + if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) { + return cb(null, { srcStat, destStat, isChangingCase: true }); + } + return cb(new Error("Source and destination must not be the same.")); + } + if (srcStat.isDirectory() && !destStat.isDirectory()) { + return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)); + } + if (!srcStat.isDirectory() && destStat.isDirectory()) { + return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)); + } + } + if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { + return cb(new Error(errMsg(src, dest, funcName))); + } + return cb(null, { srcStat, destStat }); + }); + } + function checkPathsSync(src, dest, funcName, opts) { + const { srcStat, destStat } = getStatsSync(src, dest, opts); + if (destStat) { + if (areIdentical(srcStat, destStat)) { + const srcBaseName = path5.basename(src); + const destBaseName = path5.basename(dest); + if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) { + return { srcStat, destStat, isChangingCase: true }; + } + throw new Error("Source and destination must not be the same."); + } + if (srcStat.isDirectory() && !destStat.isDirectory()) { + throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`); + } + if (!srcStat.isDirectory() && destStat.isDirectory()) { + throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`); + } + } + if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { + throw new Error(errMsg(src, dest, funcName)); + } + return { srcStat, destStat }; + } + function checkParentPaths(src, srcStat, dest, funcName, cb) { + const srcParent = path5.resolve(path5.dirname(src)); + const destParent = path5.resolve(path5.dirname(dest)); + if (destParent === srcParent || destParent === path5.parse(destParent).root) return cb(); + fs3.stat(destParent, { bigint: true }, (err, destStat) => { + if (err) { + if (err.code === "ENOENT") return cb(); + return cb(err); + } + if (areIdentical(srcStat, destStat)) { + return cb(new Error(errMsg(src, dest, funcName))); + } + return checkParentPaths(src, srcStat, destParent, funcName, cb); + }); + } + function checkParentPathsSync(src, srcStat, dest, funcName) { + const srcParent = path5.resolve(path5.dirname(src)); + const destParent = path5.resolve(path5.dirname(dest)); + if (destParent === srcParent || destParent === path5.parse(destParent).root) return; + let destStat; + try { + destStat = fs3.statSync(destParent, { bigint: true }); + } catch (err) { + if (err.code === "ENOENT") return; + throw err; + } + if (areIdentical(srcStat, destStat)) { + throw new Error(errMsg(src, dest, funcName)); + } + return checkParentPathsSync(src, srcStat, destParent, funcName); + } + function areIdentical(srcStat, destStat) { + return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev; + } + function isSrcSubdir(src, dest) { + const srcArr = path5.resolve(src).split(path5.sep).filter((i) => i); + const destArr = path5.resolve(dest).split(path5.sep).filter((i) => i); + return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true); + } + function errMsg(src, dest, funcName) { + return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`; + } + module2.exports = { + checkPaths, + checkPathsSync, + checkParentPaths, + checkParentPathsSync, + isSrcSubdir, + areIdentical + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy.js +var require_copy = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) { + "use strict"; + var fs3 = require_graceful_fs(); + var path5 = require("path"); + var mkdirs = require_mkdirs().mkdirs; + var pathExists2 = require_path_exists().pathExists; + var utimesMillis = require_utimes().utimesMillis; + var stat = require_stat(); + function copy(src, dest, opts, cb) { + if (typeof opts === "function" && !cb) { + cb = opts; + opts = {}; + } else if (typeof opts === "function") { + opts = { filter: opts }; + } + cb = cb || function() { + }; + opts = opts || {}; + opts.clobber = "clobber" in opts ? !!opts.clobber : true; + opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber; + if (opts.preserveTimestamps && process.arch === "ia32") { + process.emitWarning( + "Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269", + "Warning", + "fs-extra-WARN0001" + ); + } + stat.checkPaths(src, dest, "copy", opts, (err, stats) => { + if (err) return cb(err); + const { srcStat, destStat } = stats; + stat.checkParentPaths(src, srcStat, dest, "copy", (err2) => { + if (err2) return cb(err2); + runFilter(src, dest, opts, (err3, include) => { + if (err3) return cb(err3); + if (!include) return cb(); + checkParentDir(destStat, src, dest, opts, cb); + }); + }); + }); + } + function checkParentDir(destStat, src, dest, opts, cb) { + const destParent = path5.dirname(dest); + pathExists2(destParent, (err, dirExists) => { + if (err) return cb(err); + if (dirExists) return getStats(destStat, src, dest, opts, cb); + mkdirs(destParent, (err2) => { + if (err2) return cb(err2); + return getStats(destStat, src, dest, opts, cb); + }); + }); + } + function runFilter(src, dest, opts, cb) { + if (!opts.filter) return cb(null, true); + Promise.resolve(opts.filter(src, dest)).then((include) => cb(null, include), (error) => cb(error)); + } + function getStats(destStat, src, dest, opts, cb) { + const stat2 = opts.dereference ? fs3.stat : fs3.lstat; + stat2(src, (err, srcStat) => { + if (err) return cb(err); + if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb); + else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb); + else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb); + else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`)); + else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`)); + return cb(new Error(`Unknown file: ${src}`)); + }); + } + function onFile(srcStat, destStat, src, dest, opts, cb) { + if (!destStat) return copyFile(srcStat, src, dest, opts, cb); + return mayCopyFile(srcStat, src, dest, opts, cb); + } + function mayCopyFile(srcStat, src, dest, opts, cb) { + if (opts.overwrite) { + fs3.unlink(dest, (err) => { + if (err) return cb(err); + return copyFile(srcStat, src, dest, opts, cb); + }); + } else if (opts.errorOnExist) { + return cb(new Error(`'${dest}' already exists`)); + } else return cb(); + } + function copyFile(srcStat, src, dest, opts, cb) { + fs3.copyFile(src, dest, (err) => { + if (err) return cb(err); + if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb); + return setDestMode(dest, srcStat.mode, cb); + }); + } + function handleTimestampsAndMode(srcMode, src, dest, cb) { + if (fileIsNotWritable(srcMode)) { + return makeFileWritable(dest, srcMode, (err) => { + if (err) return cb(err); + return setDestTimestampsAndMode(srcMode, src, dest, cb); + }); + } + return setDestTimestampsAndMode(srcMode, src, dest, cb); + } + function fileIsNotWritable(srcMode) { + return (srcMode & 128) === 0; + } + function makeFileWritable(dest, srcMode, cb) { + return setDestMode(dest, srcMode | 128, cb); + } + function setDestTimestampsAndMode(srcMode, src, dest, cb) { + setDestTimestamps(src, dest, (err) => { + if (err) return cb(err); + return setDestMode(dest, srcMode, cb); + }); + } + function setDestMode(dest, srcMode, cb) { + return fs3.chmod(dest, srcMode, cb); + } + function setDestTimestamps(src, dest, cb) { + fs3.stat(src, (err, updatedSrcStat) => { + if (err) return cb(err); + return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb); + }); + } + function onDir(srcStat, destStat, src, dest, opts, cb) { + if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb); + return copyDir(src, dest, opts, cb); + } + function mkDirAndCopy(srcMode, src, dest, opts, cb) { + fs3.mkdir(dest, (err) => { + if (err) return cb(err); + copyDir(src, dest, opts, (err2) => { + if (err2) return cb(err2); + return setDestMode(dest, srcMode, cb); + }); + }); + } + function copyDir(src, dest, opts, cb) { + fs3.readdir(src, (err, items) => { + if (err) return cb(err); + return copyDirItems(items, src, dest, opts, cb); + }); + } + function copyDirItems(items, src, dest, opts, cb) { + const item = items.pop(); + if (!item) return cb(); + return copyDirItem(items, item, src, dest, opts, cb); + } + function copyDirItem(items, item, src, dest, opts, cb) { + const srcItem = path5.join(src, item); + const destItem = path5.join(dest, item); + runFilter(srcItem, destItem, opts, (err, include) => { + if (err) return cb(err); + if (!include) return copyDirItems(items, src, dest, opts, cb); + stat.checkPaths(srcItem, destItem, "copy", opts, (err2, stats) => { + if (err2) return cb(err2); + const { destStat } = stats; + getStats(destStat, srcItem, destItem, opts, (err3) => { + if (err3) return cb(err3); + return copyDirItems(items, src, dest, opts, cb); + }); + }); + }); + } + function onLink(destStat, src, dest, opts, cb) { + fs3.readlink(src, (err, resolvedSrc) => { + if (err) return cb(err); + if (opts.dereference) { + resolvedSrc = path5.resolve(process.cwd(), resolvedSrc); + } + if (!destStat) { + return fs3.symlink(resolvedSrc, dest, cb); + } else { + fs3.readlink(dest, (err2, resolvedDest) => { + if (err2) { + if (err2.code === "EINVAL" || err2.code === "UNKNOWN") return fs3.symlink(resolvedSrc, dest, cb); + return cb(err2); + } + if (opts.dereference) { + resolvedDest = path5.resolve(process.cwd(), resolvedDest); + } + if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) { + return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)); + } + if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) { + return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)); + } + return copyLink(resolvedSrc, dest, cb); + }); + } + }); + } + function copyLink(resolvedSrc, dest, cb) { + fs3.unlink(dest, (err) => { + if (err) return cb(err); + return fs3.symlink(resolvedSrc, dest, cb); + }); + } + module2.exports = copy; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy-sync.js +var require_copy_sync = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) { + "use strict"; + var fs3 = require_graceful_fs(); + var path5 = require("path"); + var mkdirsSync = require_mkdirs().mkdirsSync; + var utimesMillisSync = require_utimes().utimesMillisSync; + var stat = require_stat(); + function copySync(src, dest, opts) { + if (typeof opts === "function") { + opts = { filter: opts }; + } + opts = opts || {}; + opts.clobber = "clobber" in opts ? !!opts.clobber : true; + opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber; + if (opts.preserveTimestamps && process.arch === "ia32") { + process.emitWarning( + "Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269", + "Warning", + "fs-extra-WARN0002" + ); + } + const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts); + stat.checkParentPathsSync(src, srcStat, dest, "copy"); + if (opts.filter && !opts.filter(src, dest)) return; + const destParent = path5.dirname(dest); + if (!fs3.existsSync(destParent)) mkdirsSync(destParent); + return getStats(destStat, src, dest, opts); + } + function getStats(destStat, src, dest, opts) { + const statSync = opts.dereference ? fs3.statSync : fs3.lstatSync; + const srcStat = statSync(src); + if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts); + else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts); + else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts); + else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`); + else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`); + throw new Error(`Unknown file: ${src}`); + } + function onFile(srcStat, destStat, src, dest, opts) { + if (!destStat) return copyFile(srcStat, src, dest, opts); + return mayCopyFile(srcStat, src, dest, opts); + } + function mayCopyFile(srcStat, src, dest, opts) { + if (opts.overwrite) { + fs3.unlinkSync(dest); + return copyFile(srcStat, src, dest, opts); + } else if (opts.errorOnExist) { + throw new Error(`'${dest}' already exists`); + } + } + function copyFile(srcStat, src, dest, opts) { + fs3.copyFileSync(src, dest); + if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest); + return setDestMode(dest, srcStat.mode); + } + function handleTimestamps(srcMode, src, dest) { + if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode); + return setDestTimestamps(src, dest); + } + function fileIsNotWritable(srcMode) { + return (srcMode & 128) === 0; + } + function makeFileWritable(dest, srcMode) { + return setDestMode(dest, srcMode | 128); + } + function setDestMode(dest, srcMode) { + return fs3.chmodSync(dest, srcMode); + } + function setDestTimestamps(src, dest) { + const updatedSrcStat = fs3.statSync(src); + return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime); + } + function onDir(srcStat, destStat, src, dest, opts) { + if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts); + return copyDir(src, dest, opts); + } + function mkDirAndCopy(srcMode, src, dest, opts) { + fs3.mkdirSync(dest); + copyDir(src, dest, opts); + return setDestMode(dest, srcMode); + } + function copyDir(src, dest, opts) { + fs3.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts)); + } + function copyDirItem(item, src, dest, opts) { + const srcItem = path5.join(src, item); + const destItem = path5.join(dest, item); + if (opts.filter && !opts.filter(srcItem, destItem)) return; + const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts); + return getStats(destStat, srcItem, destItem, opts); + } + function onLink(destStat, src, dest, opts) { + let resolvedSrc = fs3.readlinkSync(src); + if (opts.dereference) { + resolvedSrc = path5.resolve(process.cwd(), resolvedSrc); + } + if (!destStat) { + return fs3.symlinkSync(resolvedSrc, dest); + } else { + let resolvedDest; + try { + resolvedDest = fs3.readlinkSync(dest); + } catch (err) { + if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs3.symlinkSync(resolvedSrc, dest); + throw err; + } + if (opts.dereference) { + resolvedDest = path5.resolve(process.cwd(), resolvedDest); + } + if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) { + throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`); + } + if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) { + throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`); + } + return copyLink(resolvedSrc, dest); + } + } + function copyLink(resolvedSrc, dest) { + fs3.unlinkSync(dest); + return fs3.symlinkSync(resolvedSrc, dest); + } + module2.exports = copySync; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/index.js +var require_copy2 = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/index.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromCallback; + module2.exports = { + copy: u(require_copy()), + copySync: require_copy_sync() + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/remove/index.js +var require_remove = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/remove/index.js"(exports2, module2) { + "use strict"; + var fs3 = require_graceful_fs(); + var u = require_universalify().fromCallback; + function remove(path5, callback) { + fs3.rm(path5, { recursive: true, force: true }, callback); + } + function removeSync(path5) { + fs3.rmSync(path5, { recursive: true, force: true }); + } + module2.exports = { + remove: u(remove), + removeSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/empty/index.js +var require_empty = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/empty/index.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromPromise; + var fs3 = require_fs(); + var path5 = require("path"); + var mkdir = require_mkdirs(); + var remove = require_remove(); + var emptyDir = u(async function emptyDir2(dir) { + let items; + try { + items = await fs3.readdir(dir); + } catch { + return mkdir.mkdirs(dir); + } + return Promise.all(items.map((item) => remove.remove(path5.join(dir, item)))); + }); + function emptyDirSync(dir) { + let items; + try { + items = fs3.readdirSync(dir); + } catch { + return mkdir.mkdirsSync(dir); + } + items.forEach((item) => { + item = path5.join(dir, item); + remove.removeSync(item); + }); + } + module2.exports = { + emptyDirSync, + emptydirSync: emptyDirSync, + emptyDir, + emptydir: emptyDir + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/file.js +var require_file = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromCallback; + var path5 = require("path"); + var fs3 = require_graceful_fs(); + var mkdir = require_mkdirs(); + function createFile(file2, callback) { + function makeFile() { + fs3.writeFile(file2, "", (err) => { + if (err) return callback(err); + callback(); + }); + } + fs3.stat(file2, (err, stats) => { + if (!err && stats.isFile()) return callback(); + const dir = path5.dirname(file2); + fs3.stat(dir, (err2, stats2) => { + if (err2) { + if (err2.code === "ENOENT") { + return mkdir.mkdirs(dir, (err3) => { + if (err3) return callback(err3); + makeFile(); + }); + } + return callback(err2); + } + if (stats2.isDirectory()) makeFile(); + else { + fs3.readdir(dir, (err3) => { + if (err3) return callback(err3); + }); + } + }); + }); + } + function createFileSync(file2) { + let stats; + try { + stats = fs3.statSync(file2); + } catch { + } + if (stats && stats.isFile()) return; + const dir = path5.dirname(file2); + try { + if (!fs3.statSync(dir).isDirectory()) { + fs3.readdirSync(dir); + } + } catch (err) { + if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir); + else throw err; + } + fs3.writeFileSync(file2, ""); + } + module2.exports = { + createFile: u(createFile), + createFileSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/link.js +var require_link = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromCallback; + var path5 = require("path"); + var fs3 = require_graceful_fs(); + var mkdir = require_mkdirs(); + var pathExists2 = require_path_exists().pathExists; + var { areIdentical } = require_stat(); + function createLink(srcpath, dstpath, callback) { + function makeLink(srcpath2, dstpath2) { + fs3.link(srcpath2, dstpath2, (err) => { + if (err) return callback(err); + callback(null); + }); + } + fs3.lstat(dstpath, (_, dstStat) => { + fs3.lstat(srcpath, (err, srcStat) => { + if (err) { + err.message = err.message.replace("lstat", "ensureLink"); + return callback(err); + } + if (dstStat && areIdentical(srcStat, dstStat)) return callback(null); + const dir = path5.dirname(dstpath); + pathExists2(dir, (err2, dirExists) => { + if (err2) return callback(err2); + if (dirExists) return makeLink(srcpath, dstpath); + mkdir.mkdirs(dir, (err3) => { + if (err3) return callback(err3); + makeLink(srcpath, dstpath); + }); + }); + }); + }); + } + function createLinkSync(srcpath, dstpath) { + let dstStat; + try { + dstStat = fs3.lstatSync(dstpath); + } catch { + } + try { + const srcStat = fs3.lstatSync(srcpath); + if (dstStat && areIdentical(srcStat, dstStat)) return; + } catch (err) { + err.message = err.message.replace("lstat", "ensureLink"); + throw err; + } + const dir = path5.dirname(dstpath); + const dirExists = fs3.existsSync(dir); + if (dirExists) return fs3.linkSync(srcpath, dstpath); + mkdir.mkdirsSync(dir); + return fs3.linkSync(srcpath, dstpath); + } + module2.exports = { + createLink: u(createLink), + createLinkSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-paths.js +var require_symlink_paths = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) { + "use strict"; + var path5 = require("path"); + var fs3 = require_graceful_fs(); + var pathExists2 = require_path_exists().pathExists; + function symlinkPaths(srcpath, dstpath, callback) { + if (path5.isAbsolute(srcpath)) { + return fs3.lstat(srcpath, (err) => { + if (err) { + err.message = err.message.replace("lstat", "ensureSymlink"); + return callback(err); + } + return callback(null, { + toCwd: srcpath, + toDst: srcpath + }); + }); + } else { + const dstdir = path5.dirname(dstpath); + const relativeToDst = path5.join(dstdir, srcpath); + return pathExists2(relativeToDst, (err, exists) => { + if (err) return callback(err); + if (exists) { + return callback(null, { + toCwd: relativeToDst, + toDst: srcpath + }); + } else { + return fs3.lstat(srcpath, (err2) => { + if (err2) { + err2.message = err2.message.replace("lstat", "ensureSymlink"); + return callback(err2); + } + return callback(null, { + toCwd: srcpath, + toDst: path5.relative(dstdir, srcpath) + }); + }); + } + }); + } + } + function symlinkPathsSync(srcpath, dstpath) { + let exists; + if (path5.isAbsolute(srcpath)) { + exists = fs3.existsSync(srcpath); + if (!exists) throw new Error("absolute srcpath does not exist"); + return { + toCwd: srcpath, + toDst: srcpath + }; + } else { + const dstdir = path5.dirname(dstpath); + const relativeToDst = path5.join(dstdir, srcpath); + exists = fs3.existsSync(relativeToDst); + if (exists) { + return { + toCwd: relativeToDst, + toDst: srcpath + }; + } else { + exists = fs3.existsSync(srcpath); + if (!exists) throw new Error("relative srcpath does not exist"); + return { + toCwd: srcpath, + toDst: path5.relative(dstdir, srcpath) + }; + } + } + } + module2.exports = { + symlinkPaths, + symlinkPathsSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js +var require_symlink_type = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) { + "use strict"; + var fs3 = require_graceful_fs(); + function symlinkType(srcpath, type, callback) { + callback = typeof type === "function" ? type : callback; + type = typeof type === "function" ? false : type; + if (type) return callback(null, type); + fs3.lstat(srcpath, (err, stats) => { + if (err) return callback(null, "file"); + type = stats && stats.isDirectory() ? "dir" : "file"; + callback(null, type); + }); + } + function symlinkTypeSync(srcpath, type) { + let stats; + if (type) return type; + try { + stats = fs3.lstatSync(srcpath); + } catch { + return "file"; + } + return stats && stats.isDirectory() ? "dir" : "file"; + } + module2.exports = { + symlinkType, + symlinkTypeSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js +var require_symlink = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromCallback; + var path5 = require("path"); + var fs3 = require_fs(); + var _mkdirs = require_mkdirs(); + var mkdirs = _mkdirs.mkdirs; + var mkdirsSync = _mkdirs.mkdirsSync; + var _symlinkPaths = require_symlink_paths(); + var symlinkPaths = _symlinkPaths.symlinkPaths; + var symlinkPathsSync = _symlinkPaths.symlinkPathsSync; + var _symlinkType = require_symlink_type(); + var symlinkType = _symlinkType.symlinkType; + var symlinkTypeSync = _symlinkType.symlinkTypeSync; + var pathExists2 = require_path_exists().pathExists; + var { areIdentical } = require_stat(); + function createSymlink(srcpath, dstpath, type, callback) { + callback = typeof type === "function" ? type : callback; + type = typeof type === "function" ? false : type; + fs3.lstat(dstpath, (err, stats) => { + if (!err && stats.isSymbolicLink()) { + Promise.all([ + fs3.stat(srcpath), + fs3.stat(dstpath) + ]).then(([srcStat, dstStat]) => { + if (areIdentical(srcStat, dstStat)) return callback(null); + _createSymlink(srcpath, dstpath, type, callback); + }); + } else _createSymlink(srcpath, dstpath, type, callback); + }); + } + function _createSymlink(srcpath, dstpath, type, callback) { + symlinkPaths(srcpath, dstpath, (err, relative) => { + if (err) return callback(err); + srcpath = relative.toDst; + symlinkType(relative.toCwd, type, (err2, type2) => { + if (err2) return callback(err2); + const dir = path5.dirname(dstpath); + pathExists2(dir, (err3, dirExists) => { + if (err3) return callback(err3); + if (dirExists) return fs3.symlink(srcpath, dstpath, type2, callback); + mkdirs(dir, (err4) => { + if (err4) return callback(err4); + fs3.symlink(srcpath, dstpath, type2, callback); + }); + }); + }); + }); + } + function createSymlinkSync(srcpath, dstpath, type) { + let stats; + try { + stats = fs3.lstatSync(dstpath); + } catch { + } + if (stats && stats.isSymbolicLink()) { + const srcStat = fs3.statSync(srcpath); + const dstStat = fs3.statSync(dstpath); + if (areIdentical(srcStat, dstStat)) return; + } + const relative = symlinkPathsSync(srcpath, dstpath); + srcpath = relative.toDst; + type = symlinkTypeSync(relative.toCwd, type); + const dir = path5.dirname(dstpath); + const exists = fs3.existsSync(dir); + if (exists) return fs3.symlinkSync(srcpath, dstpath, type); + mkdirsSync(dir); + return fs3.symlinkSync(srcpath, dstpath, type); + } + module2.exports = { + createSymlink: u(createSymlink), + createSymlinkSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js +var require_ensure = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js"(exports2, module2) { + "use strict"; + var { createFile, createFileSync } = require_file(); + var { createLink, createLinkSync } = require_link(); + var { createSymlink, createSymlinkSync } = require_symlink(); + module2.exports = { + // file + createFile, + createFileSync, + ensureFile: createFile, + ensureFileSync: createFileSync, + // link + createLink, + createLinkSync, + ensureLink: createLink, + ensureLinkSync: createLinkSync, + // symlink + createSymlink, + createSymlinkSync, + ensureSymlink: createSymlink, + ensureSymlinkSync: createSymlinkSync + }; + } +}); + +// ../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js +var require_utils2 = __commonJS({ + "../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports2, module2) { + "use strict"; + function stringify2(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) { + const EOF = finalEOL ? EOL : ""; + const str = JSON.stringify(obj, replacer, spaces); + return str.replace(/\n/g, EOL) + EOF; + } + function stripBom(content) { + if (Buffer.isBuffer(content)) content = content.toString("utf8"); + return content.replace(/^\uFEFF/, ""); + } + module2.exports = { stringify: stringify2, stripBom }; + } +}); + +// ../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js +var require_jsonfile = __commonJS({ + "../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js"(exports2, module2) { + "use strict"; + var _fs; + try { + _fs = require_graceful_fs(); + } catch (_) { + _fs = require("fs"); + } + var universalify = require_universalify(); + var { stringify: stringify2, stripBom } = require_utils2(); + async function _readFile(file2, options = {}) { + if (typeof options === "string") { + options = { encoding: options }; + } + const fs3 = options.fs || _fs; + const shouldThrow = "throws" in options ? options.throws : true; + let data = await universalify.fromCallback(fs3.readFile)(file2, options); + data = stripBom(data); + let obj; + try { + obj = JSON.parse(data, options ? options.reviver : null); + } catch (err) { + if (shouldThrow) { + err.message = `${file2}: ${err.message}`; + throw err; + } else { + return null; + } + } + return obj; + } + var readFile = universalify.fromPromise(_readFile); + function readFileSync(file2, options = {}) { + if (typeof options === "string") { + options = { encoding: options }; + } + const fs3 = options.fs || _fs; + const shouldThrow = "throws" in options ? options.throws : true; + try { + let content = fs3.readFileSync(file2, options); + content = stripBom(content); + return JSON.parse(content, options.reviver); + } catch (err) { + if (shouldThrow) { + err.message = `${file2}: ${err.message}`; + throw err; + } else { + return null; + } + } + } + async function _writeFile(file2, obj, options = {}) { + const fs3 = options.fs || _fs; + const str = stringify2(obj, options); + await universalify.fromCallback(fs3.writeFile)(file2, str, options); + } + var writeFile = universalify.fromPromise(_writeFile); + function writeFileSync(file2, obj, options = {}) { + const fs3 = options.fs || _fs; + const str = stringify2(obj, options); + return fs3.writeFileSync(file2, str, options); + } + var jsonfile = { + readFile, + readFileSync, + writeFile, + writeFileSync + }; + module2.exports = jsonfile; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/jsonfile.js +var require_jsonfile2 = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/jsonfile.js"(exports2, module2) { + "use strict"; + var jsonFile = require_jsonfile(); + module2.exports = { + // jsonfile exports + readJson: jsonFile.readFile, + readJsonSync: jsonFile.readFileSync, + writeJson: jsonFile.writeFile, + writeJsonSync: jsonFile.writeFileSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/output-file/index.js +var require_output_file = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/output-file/index.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromCallback; + var fs3 = require_graceful_fs(); + var path5 = require("path"); + var mkdir = require_mkdirs(); + var pathExists2 = require_path_exists().pathExists; + function outputFile(file2, data, encoding, callback) { + if (typeof encoding === "function") { + callback = encoding; + encoding = "utf8"; + } + const dir = path5.dirname(file2); + pathExists2(dir, (err, itDoes) => { + if (err) return callback(err); + if (itDoes) return fs3.writeFile(file2, data, encoding, callback); + mkdir.mkdirs(dir, (err2) => { + if (err2) return callback(err2); + fs3.writeFile(file2, data, encoding, callback); + }); + }); + } + function outputFileSync(file2, ...args) { + const dir = path5.dirname(file2); + if (fs3.existsSync(dir)) { + return fs3.writeFileSync(file2, ...args); + } + mkdir.mkdirsSync(dir); + fs3.writeFileSync(file2, ...args); + } + module2.exports = { + outputFile: u(outputFile), + outputFileSync + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json.js +var require_output_json = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json.js"(exports2, module2) { + "use strict"; + var { stringify: stringify2 } = require_utils2(); + var { outputFile } = require_output_file(); + async function outputJson(file2, data, options = {}) { + const str = stringify2(data, options); + await outputFile(file2, str, options); + } + module2.exports = outputJson; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json-sync.js +var require_output_json_sync = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json-sync.js"(exports2, module2) { + "use strict"; + var { stringify: stringify2 } = require_utils2(); + var { outputFileSync } = require_output_file(); + function outputJsonSync(file2, data, options) { + const str = stringify2(data, options); + outputFileSync(file2, str, options); + } + module2.exports = outputJsonSync; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/index.js +var require_json = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/index.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromPromise; + var jsonFile = require_jsonfile2(); + jsonFile.outputJson = u(require_output_json()); + jsonFile.outputJsonSync = require_output_json_sync(); + jsonFile.outputJSON = jsonFile.outputJson; + jsonFile.outputJSONSync = jsonFile.outputJsonSync; + jsonFile.writeJSON = jsonFile.writeJson; + jsonFile.writeJSONSync = jsonFile.writeJsonSync; + jsonFile.readJSON = jsonFile.readJson; + jsonFile.readJSONSync = jsonFile.readJsonSync; + module2.exports = jsonFile; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move.js +var require_move = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move.js"(exports2, module2) { + "use strict"; + var fs3 = require_graceful_fs(); + var path5 = require("path"); + var copy = require_copy2().copy; + var remove = require_remove().remove; + var mkdirp = require_mkdirs().mkdirp; + var pathExists2 = require_path_exists().pathExists; + var stat = require_stat(); + function move(src, dest, opts, cb) { + if (typeof opts === "function") { + cb = opts; + opts = {}; + } + opts = opts || {}; + const overwrite = opts.overwrite || opts.clobber || false; + stat.checkPaths(src, dest, "move", opts, (err, stats) => { + if (err) return cb(err); + const { srcStat, isChangingCase = false } = stats; + stat.checkParentPaths(src, srcStat, dest, "move", (err2) => { + if (err2) return cb(err2); + if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb); + mkdirp(path5.dirname(dest), (err3) => { + if (err3) return cb(err3); + return doRename(src, dest, overwrite, isChangingCase, cb); + }); + }); + }); + } + function isParentRoot(dest) { + const parent = path5.dirname(dest); + const parsedPath = path5.parse(parent); + return parsedPath.root === parent; + } + function doRename(src, dest, overwrite, isChangingCase, cb) { + if (isChangingCase) return rename(src, dest, overwrite, cb); + if (overwrite) { + return remove(dest, (err) => { + if (err) return cb(err); + return rename(src, dest, overwrite, cb); + }); + } + pathExists2(dest, (err, destExists) => { + if (err) return cb(err); + if (destExists) return cb(new Error("dest already exists.")); + return rename(src, dest, overwrite, cb); + }); + } + function rename(src, dest, overwrite, cb) { + fs3.rename(src, dest, (err) => { + if (!err) return cb(); + if (err.code !== "EXDEV") return cb(err); + return moveAcrossDevice(src, dest, overwrite, cb); + }); + } + function moveAcrossDevice(src, dest, overwrite, cb) { + const opts = { + overwrite, + errorOnExist: true, + preserveTimestamps: true + }; + copy(src, dest, opts, (err) => { + if (err) return cb(err); + return remove(src, cb); + }); + } + module2.exports = move; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move-sync.js +var require_move_sync = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) { + "use strict"; + var fs3 = require_graceful_fs(); + var path5 = require("path"); + var copySync = require_copy2().copySync; + var removeSync = require_remove().removeSync; + var mkdirpSync = require_mkdirs().mkdirpSync; + var stat = require_stat(); + function moveSync(src, dest, opts) { + opts = opts || {}; + const overwrite = opts.overwrite || opts.clobber || false; + const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts); + stat.checkParentPathsSync(src, srcStat, dest, "move"); + if (!isParentRoot(dest)) mkdirpSync(path5.dirname(dest)); + return doRename(src, dest, overwrite, isChangingCase); + } + function isParentRoot(dest) { + const parent = path5.dirname(dest); + const parsedPath = path5.parse(parent); + return parsedPath.root === parent; + } + function doRename(src, dest, overwrite, isChangingCase) { + if (isChangingCase) return rename(src, dest, overwrite); + if (overwrite) { + removeSync(dest); + return rename(src, dest, overwrite); + } + if (fs3.existsSync(dest)) throw new Error("dest already exists."); + return rename(src, dest, overwrite); + } + function rename(src, dest, overwrite) { + try { + fs3.renameSync(src, dest); + } catch (err) { + if (err.code !== "EXDEV") throw err; + return moveAcrossDevice(src, dest, overwrite); + } + } + function moveAcrossDevice(src, dest, overwrite) { + const opts = { + overwrite, + errorOnExist: true, + preserveTimestamps: true + }; + copySync(src, dest, opts); + return removeSync(src); + } + module2.exports = moveSync; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/index.js +var require_move2 = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/index.js"(exports2, module2) { + "use strict"; + var u = require_universalify().fromCallback; + module2.exports = { + move: u(require_move()), + moveSync: require_move_sync() + }; + } +}); + +// ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/index.js +var require_lib = __commonJS({ + "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/index.js"(exports2, module2) { + "use strict"; + module2.exports = { + // Export promiseified graceful-fs: + ...require_fs(), + // Export extra methods: + ...require_copy2(), + ...require_empty(), + ...require_ensure(), + ...require_json(), + ...require_mkdirs(), + ...require_move2(), + ...require_output_file(), + ...require_path_exists(), + ...require_remove() + }; + } +}); + +// ../../node_modules/.pnpm/common-path-prefix@3.0.0/node_modules/common-path-prefix/index.js +var require_common_path_prefix = __commonJS({ + "../../node_modules/.pnpm/common-path-prefix@3.0.0/node_modules/common-path-prefix/index.js"(exports2, module2) { + "use strict"; + var { sep: DEFAULT_SEPARATOR } = require("path"); + var determineSeparator = (paths2) => { + for (const path5 of paths2) { + const match = /(\/|\\)/.exec(path5); + if (match !== null) return match[0]; + } + return DEFAULT_SEPARATOR; + }; + module2.exports = function commonPathPrefix2(paths2, sep = determineSeparator(paths2)) { + const [first = "", ...remaining] = paths2; + if (first === "" || remaining.length === 0) return ""; + const parts = first.split(sep); + let endOfPrefix = parts.length; + for (const path5 of remaining) { + const compare = path5.split(sep); + for (let i = 0; i < endOfPrefix; i++) { + if (compare[i] !== parts[i]) { + endOfPrefix = i; + } + } + if (endOfPrefix === 0) return ""; + } + const prefix = parts.slice(0, endOfPrefix).join(sep); + return prefix.endsWith(sep) ? prefix : prefix + sep; + }; + } +}); + +// ../../node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js +var require_indent_string = __commonJS({ + "../../node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js"(exports2, module2) { + "use strict"; + module2.exports = (string, count = 1, options) => { + options = { + indent: " ", + includeEmptyLines: false, + ...options + }; + if (typeof string !== "string") { + throw new TypeError( + `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` + ); + } + if (typeof count !== "number") { + throw new TypeError( + `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` + ); + } + if (typeof options.indent !== "string") { + throw new TypeError( + `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` + ); + } + if (count === 0) { + return string; + } + const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; + return string.replace(regex, options.indent.repeat(count)); + }; + } +}); + +// ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/identifier.js +var require_identifier = __commonJS({ + "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.isIdentifierChar = isIdentifierChar; + exports2.isIdentifierName = isIdentifierName2; + exports2.isIdentifierStart = isIdentifierStart; + var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"; + var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65"; + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; + var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; + var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; + function isInAstralSet(code, set) { + let pos = 65536; + for (let i = 0, length = set.length; i < length; i += 2) { + pos += set[i]; + if (pos > code) return false; + pos += set[i + 1]; + if (pos >= code) return true; + } + return false; + } + function isIdentifierStart(code) { + if (code < 65) return code === 36; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + if (code <= 65535) { + return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes); + } + function isIdentifierChar(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + if (code <= 65535) { + return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); + } + function isIdentifierName2(name) { + let isFirst = true; + for (let i = 0; i < name.length; i++) { + let cp = name.charCodeAt(i); + if ((cp & 64512) === 55296 && i + 1 < name.length) { + const trail = name.charCodeAt(++i); + if ((trail & 64512) === 56320) { + cp = 65536 + ((cp & 1023) << 10) + (trail & 1023); + } + } + if (isFirst) { + isFirst = false; + if (!isIdentifierStart(cp)) { + return false; + } + } else if (!isIdentifierChar(cp)) { + return false; + } + } + return !isFirst; + } + } +}); + +// ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/keyword.js +var require_keyword = __commonJS({ + "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.isKeyword = isKeyword; + exports2.isReservedWord = isReservedWord; + exports2.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; + exports2.isStrictBindReservedWord = isStrictBindReservedWord; + exports2.isStrictReservedWord = isStrictReservedWord; + var reservedWords = { + keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], + strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], + strictBind: ["eval", "arguments"] + }; + var keywords = new Set(reservedWords.keyword); + var reservedWordsStrictSet = new Set(reservedWords.strict); + var reservedWordsStrictBindSet = new Set(reservedWords.strictBind); + function isReservedWord(word, inModule) { + return inModule && word === "await" || word === "enum"; + } + function isStrictReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); + } + function isStrictBindOnlyReservedWord(word) { + return reservedWordsStrictBindSet.has(word); + } + function isStrictBindReservedWord(word, inModule) { + return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); + } + function isKeyword(word) { + return keywords.has(word); + } + } +}); + +// ../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/index.js +var require_lib2 = __commonJS({ + "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.24.7/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + Object.defineProperty(exports2, "isIdentifierChar", { + enumerable: true, + get: function() { + return _identifier.isIdentifierChar; + } + }); + Object.defineProperty(exports2, "isIdentifierName", { + enumerable: true, + get: function() { + return _identifier.isIdentifierName; + } + }); + Object.defineProperty(exports2, "isIdentifierStart", { + enumerable: true, + get: function() { + return _identifier.isIdentifierStart; + } + }); + Object.defineProperty(exports2, "isKeyword", { + enumerable: true, + get: function() { + return _keyword.isKeyword; + } + }); + Object.defineProperty(exports2, "isReservedWord", { + enumerable: true, + get: function() { + return _keyword.isReservedWord; + } + }); + Object.defineProperty(exports2, "isStrictBindOnlyReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictBindOnlyReservedWord; + } + }); + Object.defineProperty(exports2, "isStrictBindReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictBindReservedWord; + } + }); + Object.defineProperty(exports2, "isStrictReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictReservedWord; + } + }); + var _identifier = require_identifier(); + var _keyword = require_keyword(); + } +}); + +// ../../node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.js +var require_pluralize = __commonJS({ + "../../node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.js"(exports2, module2) { + "use strict"; + (function(root, pluralize3) { + if (typeof require === "function" && typeof exports2 === "object" && typeof module2 === "object") { + module2.exports = pluralize3(); + } else if (typeof define === "function" && define.amd) { + define(function() { + return pluralize3(); + }); + } else { + root.pluralize = pluralize3(); + } + })(exports2, function() { + var pluralRules = []; + var singularRules = []; + var uncountables = {}; + var irregularPlurals = {}; + var irregularSingles = {}; + function sanitizeRule(rule) { + if (typeof rule === "string") { + return new RegExp("^" + rule + "$", "i"); + } + return rule; + } + function restoreCase(word, token) { + if (word === token) return token; + if (word === word.toLowerCase()) return token.toLowerCase(); + if (word === word.toUpperCase()) return token.toUpperCase(); + if (word[0] === word[0].toUpperCase()) { + return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase(); + } + return token.toLowerCase(); + } + function interpolate(str, args) { + return str.replace(/\$(\d{1,2})/g, function(match, index) { + return args[index] || ""; + }); + } + function replace(word, rule) { + return word.replace(rule[0], function(match, index) { + var result = interpolate(rule[1], arguments); + if (match === "") { + return restoreCase(word[index - 1], result); + } + return restoreCase(match, result); + }); + } + function sanitizeWord(token, word, rules) { + if (!token.length || uncountables.hasOwnProperty(token)) { + return word; + } + var len = rules.length; + while (len--) { + var rule = rules[len]; + if (rule[0].test(word)) return replace(word, rule); + } + return word; + } + function replaceWord(replaceMap, keepMap, rules) { + return function(word) { + var token = word.toLowerCase(); + if (keepMap.hasOwnProperty(token)) { + return restoreCase(word, token); + } + if (replaceMap.hasOwnProperty(token)) { + return restoreCase(word, replaceMap[token]); + } + return sanitizeWord(token, word, rules); + }; + } + function checkWord(replaceMap, keepMap, rules, bool) { + return function(word) { + var token = word.toLowerCase(); + if (keepMap.hasOwnProperty(token)) return true; + if (replaceMap.hasOwnProperty(token)) return false; + return sanitizeWord(token, token, rules) === token; + }; + } + function pluralize3(word, count, inclusive) { + var pluralized = count === 1 ? pluralize3.singular(word) : pluralize3.plural(word); + return (inclusive ? count + " " : "") + pluralized; + } + pluralize3.plural = replaceWord( + irregularSingles, + irregularPlurals, + pluralRules + ); + pluralize3.isPlural = checkWord( + irregularSingles, + irregularPlurals, + pluralRules + ); + pluralize3.singular = replaceWord( + irregularPlurals, + irregularSingles, + singularRules + ); + pluralize3.isSingular = checkWord( + irregularPlurals, + irregularSingles, + singularRules + ); + pluralize3.addPluralRule = function(rule, replacement) { + pluralRules.push([sanitizeRule(rule), replacement]); + }; + pluralize3.addSingularRule = function(rule, replacement) { + singularRules.push([sanitizeRule(rule), replacement]); + }; + pluralize3.addUncountableRule = function(word) { + if (typeof word === "string") { + uncountables[word.toLowerCase()] = true; + return; + } + pluralize3.addPluralRule(word, "$0"); + pluralize3.addSingularRule(word, "$0"); + }; + pluralize3.addIrregularRule = function(single, plural) { + plural = plural.toLowerCase(); + single = single.toLowerCase(); + irregularSingles[single] = plural; + irregularPlurals[plural] = single; + }; + [ + // Pronouns. + ["I", "we"], + ["me", "us"], + ["he", "they"], + ["she", "they"], + ["them", "them"], + ["myself", "ourselves"], + ["yourself", "yourselves"], + ["itself", "themselves"], + ["herself", "themselves"], + ["himself", "themselves"], + ["themself", "themselves"], + ["is", "are"], + ["was", "were"], + ["has", "have"], + ["this", "these"], + ["that", "those"], + // Words ending in with a consonant and `o`. + ["echo", "echoes"], + ["dingo", "dingoes"], + ["volcano", "volcanoes"], + ["tornado", "tornadoes"], + ["torpedo", "torpedoes"], + // Ends with `us`. + ["genus", "genera"], + ["viscus", "viscera"], + // Ends with `ma`. + ["stigma", "stigmata"], + ["stoma", "stomata"], + ["dogma", "dogmata"], + ["lemma", "lemmata"], + ["schema", "schemata"], + ["anathema", "anathemata"], + // Other irregular rules. + ["ox", "oxen"], + ["axe", "axes"], + ["die", "dice"], + ["yes", "yeses"], + ["foot", "feet"], + ["eave", "eaves"], + ["goose", "geese"], + ["tooth", "teeth"], + ["quiz", "quizzes"], + ["human", "humans"], + ["proof", "proofs"], + ["carve", "carves"], + ["valve", "valves"], + ["looey", "looies"], + ["thief", "thieves"], + ["groove", "grooves"], + ["pickaxe", "pickaxes"], + ["passerby", "passersby"] + ].forEach(function(rule) { + return pluralize3.addIrregularRule(rule[0], rule[1]); + }); + [ + [/s?$/i, "s"], + [/[^\u0000-\u007F]$/i, "$0"], + [/([^aeiou]ese)$/i, "$1"], + [/(ax|test)is$/i, "$1es"], + [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, "$1es"], + [/(e[mn]u)s?$/i, "$1s"], + [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, "$1"], + [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1i"], + [/(alumn|alg|vertebr)(?:a|ae)$/i, "$1ae"], + [/(seraph|cherub)(?:im)?$/i, "$1im"], + [/(her|at|gr)o$/i, "$1oes"], + [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, "$1a"], + [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, "$1a"], + [/sis$/i, "ses"], + [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, "$1$2ves"], + [/([^aeiouy]|qu)y$/i, "$1ies"], + [/([^ch][ieo][ln])ey$/i, "$1ies"], + [/(x|ch|ss|sh|zz)$/i, "$1es"], + [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, "$1ices"], + [/\b((?:tit)?m|l)(?:ice|ouse)$/i, "$1ice"], + [/(pe)(?:rson|ople)$/i, "$1ople"], + [/(child)(?:ren)?$/i, "$1ren"], + [/eaux$/i, "$0"], + [/m[ae]n$/i, "men"], + ["thou", "you"] + ].forEach(function(rule) { + return pluralize3.addPluralRule(rule[0], rule[1]); + }); + [ + [/s$/i, ""], + [/(ss)$/i, "$1"], + [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, "$1fe"], + [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, "$1f"], + [/ies$/i, "y"], + [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, "$1ie"], + [/\b(mon|smil)ies$/i, "$1ey"], + [/\b((?:tit)?m|l)ice$/i, "$1ouse"], + [/(seraph|cherub)im$/i, "$1"], + [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, "$1"], + [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, "$1sis"], + [/(movie|twelve|abuse|e[mn]u)s$/i, "$1"], + [/(test)(?:is|es)$/i, "$1is"], + [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1us"], + [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, "$1um"], + [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, "$1on"], + [/(alumn|alg|vertebr)ae$/i, "$1a"], + [/(cod|mur|sil|vert|ind)ices$/i, "$1ex"], + [/(matr|append)ices$/i, "$1ix"], + [/(pe)(rson|ople)$/i, "$1rson"], + [/(child)ren$/i, "$1"], + [/(eau)x?$/i, "$1"], + [/men$/i, "man"] + ].forEach(function(rule) { + return pluralize3.addSingularRule(rule[0], rule[1]); + }); + [ + // Singular words with no plurals. + "adulthood", + "advice", + "agenda", + "aid", + "aircraft", + "alcohol", + "ammo", + "analytics", + "anime", + "athletics", + "audio", + "bison", + "blood", + "bream", + "buffalo", + "butter", + "carp", + "cash", + "chassis", + "chess", + "clothing", + "cod", + "commerce", + "cooperation", + "corps", + "debris", + "diabetes", + "digestion", + "elk", + "energy", + "equipment", + "excretion", + "expertise", + "firmware", + "flounder", + "fun", + "gallows", + "garbage", + "graffiti", + "hardware", + "headquarters", + "health", + "herpes", + "highjinks", + "homework", + "housework", + "information", + "jeans", + "justice", + "kudos", + "labour", + "literature", + "machinery", + "mackerel", + "mail", + "media", + "mews", + "moose", + "music", + "mud", + "manga", + "news", + "only", + "personnel", + "pike", + "plankton", + "pliers", + "police", + "pollution", + "premises", + "rain", + "research", + "rice", + "salmon", + "scissors", + "series", + "sewage", + "shambles", + "shrimp", + "software", + "species", + "staff", + "swine", + "tennis", + "traffic", + "transportation", + "trout", + "tuna", + "wealth", + "welfare", + "whiting", + "wildebeest", + "wildlife", + "you", + /pok[eé]mon$/i, + // Regexes. + /[^aeiou]ese$/i, + // "chinese", "japanese" + /deer$/i, + // "deer", "reindeer" + /fish$/i, + // "fish", "blowfish", "angelfish" + /measles$/i, + /o[iu]s$/i, + // "carnivorous" + /pox$/i, + // "chickpox", "smallpox" + /sheep$/i + ].forEach(pluralize3.addUncountableRule); + return pluralize3; + }); + } +}); + +// ../../node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/index.js +var require_env_paths = __commonJS({ + "../../node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/index.js"(exports2, module2) { + "use strict"; + var path5 = require("path"); + var os2 = require("os"); + var homedir = os2.homedir(); + var tmpdir = os2.tmpdir(); + var { env: env2 } = process; + var macos = (name) => { + const library = path5.join(homedir, "Library"); + return { + data: path5.join(library, "Application Support", name), + config: path5.join(library, "Preferences", name), + cache: path5.join(library, "Caches", name), + log: path5.join(library, "Logs", name), + temp: path5.join(tmpdir, name) + }; + }; + var windows = (name) => { + const appData = env2.APPDATA || path5.join(homedir, "AppData", "Roaming"); + const localAppData = env2.LOCALAPPDATA || path5.join(homedir, "AppData", "Local"); + return { + // Data/config/cache/log are invented by me as Windows isn't opinionated about this + data: path5.join(localAppData, name, "Data"), + config: path5.join(appData, name, "Config"), + cache: path5.join(localAppData, name, "Cache"), + log: path5.join(localAppData, name, "Log"), + temp: path5.join(tmpdir, name) + }; + }; + var linux = (name) => { + const username = path5.basename(homedir); + return { + data: path5.join(env2.XDG_DATA_HOME || path5.join(homedir, ".local", "share"), name), + config: path5.join(env2.XDG_CONFIG_HOME || path5.join(homedir, ".config"), name), + cache: path5.join(env2.XDG_CACHE_HOME || path5.join(homedir, ".cache"), name), + // https://wiki.debian.org/XDGBaseDirectorySpecification#state + log: path5.join(env2.XDG_STATE_HOME || path5.join(homedir, ".local", "state"), name), + temp: path5.join(tmpdir, username, name) + }; + }; + var envPaths = (name, options) => { + if (typeof name !== "string") { + throw new TypeError(`Expected string, got ${typeof name}`); + } + options = Object.assign({ suffix: "nodejs" }, options); + if (options.suffix) { + name += `-${options.suffix}`; + } + if (process.platform === "darwin") { + return macos(name); + } + if (process.platform === "win32") { + return windows(name); + } + return linux(name); + }; + module2.exports = envPaths; + module2.exports.default = envPaths; + } +}); + +// ../../node_modules/.pnpm/path-exists@3.0.0/node_modules/path-exists/index.js +var require_path_exists2 = __commonJS({ + "../../node_modules/.pnpm/path-exists@3.0.0/node_modules/path-exists/index.js"(exports2, module2) { + "use strict"; + var fs3 = require("fs"); + module2.exports = (fp) => new Promise((resolve) => { + fs3.access(fp, (err) => { + resolve(!err); + }); + }); + module2.exports.sync = (fp) => { + try { + fs3.accessSync(fp); + return true; + } catch (err) { + return false; + } + }; + } +}); + +// ../../node_modules/.pnpm/p-try@2.2.0/node_modules/p-try/index.js +var require_p_try = __commonJS({ + "../../node_modules/.pnpm/p-try@2.2.0/node_modules/p-try/index.js"(exports2, module2) { + "use strict"; + var pTry = (fn, ...arguments_) => new Promise((resolve) => { + resolve(fn(...arguments_)); + }); + module2.exports = pTry; + module2.exports.default = pTry; + } +}); + +// ../../node_modules/.pnpm/p-limit@2.3.0/node_modules/p-limit/index.js +var require_p_limit = __commonJS({ + "../../node_modules/.pnpm/p-limit@2.3.0/node_modules/p-limit/index.js"(exports2, module2) { + "use strict"; + var pTry = require_p_try(); + var pLimit2 = (concurrency) => { + if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { + return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up")); + } + const queue = []; + let activeCount = 0; + const next = () => { + activeCount--; + if (queue.length > 0) { + queue.shift()(); + } + }; + const run = (fn, resolve, ...args) => { + activeCount++; + const result = pTry(fn, ...args); + resolve(result); + result.then(next, next); + }; + const enqueue = (fn, resolve, ...args) => { + if (activeCount < concurrency) { + run(fn, resolve, ...args); + } else { + queue.push(run.bind(null, fn, resolve, ...args)); + } + }; + const generator = (fn, ...args) => new Promise((resolve) => enqueue(fn, resolve, ...args)); + Object.defineProperties(generator, { + activeCount: { + get: () => activeCount + }, + pendingCount: { + get: () => queue.length + }, + clearQueue: { + value: () => { + queue.length = 0; + } + } + }); + return generator; + }; + module2.exports = pLimit2; + module2.exports.default = pLimit2; + } +}); + +// ../../node_modules/.pnpm/p-locate@3.0.0/node_modules/p-locate/index.js +var require_p_locate = __commonJS({ + "../../node_modules/.pnpm/p-locate@3.0.0/node_modules/p-locate/index.js"(exports2, module2) { + "use strict"; + var pLimit2 = require_p_limit(); + var EndError = class extends Error { + constructor(value) { + super(); + this.value = value; + } + }; + var testElement = (el, tester) => Promise.resolve(el).then(tester); + var finder = (el) => Promise.all(el).then((val) => val[1] === true && Promise.reject(new EndError(val[0]))); + module2.exports = (iterable, tester, opts) => { + opts = Object.assign({ + concurrency: Infinity, + preserveOrder: true + }, opts); + const limit = pLimit2(opts.concurrency); + const items = [...iterable].map((el) => [el, limit(testElement, el, tester)]); + const checkLimit = pLimit2(opts.preserveOrder ? 1 : Infinity); + return Promise.all(items.map((el) => checkLimit(finder, el))).then(() => { + }).catch((err) => err instanceof EndError ? err.value : Promise.reject(err)); + }; + } +}); + +// ../../node_modules/.pnpm/locate-path@3.0.0/node_modules/locate-path/index.js +var require_locate_path = __commonJS({ + "../../node_modules/.pnpm/locate-path@3.0.0/node_modules/locate-path/index.js"(exports2, module2) { + "use strict"; + var path5 = require("path"); + var pathExists2 = require_path_exists2(); + var pLocate2 = require_p_locate(); + module2.exports = (iterable, options) => { + options = Object.assign({ + cwd: process.cwd() + }, options); + return pLocate2(iterable, (el) => pathExists2(path5.resolve(options.cwd, el)), options); + }; + module2.exports.sync = (iterable, options) => { + options = Object.assign({ + cwd: process.cwd() + }, options); + for (const el of iterable) { + if (pathExists2.sync(path5.resolve(options.cwd, el))) { + return el; + } + } + }; + } +}); + +// ../../node_modules/.pnpm/find-up@3.0.0/node_modules/find-up/index.js +var require_find_up = __commonJS({ + "../../node_modules/.pnpm/find-up@3.0.0/node_modules/find-up/index.js"(exports2, module2) { + "use strict"; + var path5 = require("path"); + var locatePath2 = require_locate_path(); + module2.exports = (filename, opts = {}) => { + const startDir = path5.resolve(opts.cwd || ""); + const { root } = path5.parse(startDir); + const filenames = [].concat(filename); + return new Promise((resolve) => { + (function find(dir) { + locatePath2(filenames, { cwd: dir }).then((file2) => { + if (file2) { + resolve(path5.join(dir, file2)); + } else if (dir === root) { + resolve(null); + } else { + find(path5.dirname(dir)); + } + }); + })(startDir); + }); + }; + module2.exports.sync = (filename, opts = {}) => { + let dir = path5.resolve(opts.cwd || ""); + const { root } = path5.parse(dir); + const filenames = [].concat(filename); + while (true) { + const file2 = locatePath2.sync(filenames, { cwd: dir }); + if (file2) { + return path5.join(dir, file2); + } + if (dir === root) { + return null; + } + dir = path5.dirname(dir); + } + }; + } +}); + +// ../../node_modules/.pnpm/pkg-up@3.1.0/node_modules/pkg-up/index.js +var require_pkg_up = __commonJS({ + "../../node_modules/.pnpm/pkg-up@3.1.0/node_modules/pkg-up/index.js"(exports2, module2) { + "use strict"; + var findUp2 = require_find_up(); + module2.exports = async ({ cwd: cwd2 } = {}) => findUp2("package.json", { cwd: cwd2 }); + module2.exports.sync = ({ cwd: cwd2 } = {}) => findUp2.sync("package.json", { cwd: cwd2 }); + } +}); + +// package.json +var require_package2 = __commonJS({ + "package.json"(exports2, module2) { + module2.exports = { + name: "@prisma/client", + version: "5.22.0", + description: "Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.", + keywords: [ + "ORM", + "Prisma", + "prisma2", + "Prisma Client", + "client", + "query", + "query-builder", + "database", + "db", + "JavaScript", + "JS", + "TypeScript", + "TS", + "SQL", + "SQLite", + "pg", + "Postgres", + "PostgreSQL", + "CockroachDB", + "MySQL", + "MariaDB", + "MSSQL", + "SQL Server", + "SQLServer", + "MongoDB", + "react-native" + ], + main: "default.js", + types: "default.d.ts", + browser: "index-browser.js", + exports: { + "./package.json": "./package.json", + ".": { + require: { + types: "./default.d.ts", + node: "./default.js", + "edge-light": "./default.js", + workerd: "./default.js", + worker: "./default.js", + browser: "./index-browser.js" + }, + import: { + types: "./default.d.ts", + node: "./default.js", + "edge-light": "./default.js", + workerd: "./default.js", + worker: "./default.js", + browser: "./index-browser.js" + }, + default: "./default.js" + }, + "./edge": { + types: "./edge.d.ts", + require: "./edge.js", + import: "./edge.js", + default: "./edge.js" + }, + "./react-native": { + types: "./react-native.d.ts", + require: "./react-native.js", + import: "./react-native.js", + default: "./react-native.js" + }, + "./extension": { + types: "./extension.d.ts", + require: "./extension.js", + import: "./extension.js", + default: "./extension.js" + }, + "./index-browser": { + types: "./index.d.ts", + require: "./index-browser.js", + import: "./index-browser.js", + default: "./index-browser.js" + }, + "./index": { + types: "./index.d.ts", + require: "./index.js", + import: "./index.js", + default: "./index.js" + }, + "./wasm": { + types: "./wasm.d.ts", + require: "./wasm.js", + import: "./wasm.js", + default: "./wasm.js" + }, + "./runtime/library": { + types: "./runtime/library.d.ts", + require: "./runtime/library.js", + import: "./runtime/library.js", + default: "./runtime/library.js" + }, + "./runtime/binary": { + types: "./runtime/binary.d.ts", + require: "./runtime/binary.js", + import: "./runtime/binary.js", + default: "./runtime/binary.js" + }, + "./generator-build": { + require: "./generator-build/index.js", + import: "./generator-build/index.js", + default: "./generator-build/index.js" + }, + "./sql": { + require: { + types: "./sql.d.ts", + node: "./sql.js", + default: "./sql.js" + }, + import: { + types: "./sql.d.ts", + node: "./sql.mjs", + default: "./sql.mjs" + }, + default: "./sql.js" + }, + "./*": "./*" + }, + license: "Apache-2.0", + engines: { + node: ">=16.13" + }, + homepage: "https://www.prisma.io", + repository: { + type: "git", + url: "https://github.com/prisma/prisma.git", + directory: "packages/client" + }, + author: "Tim Suchanek ", + bugs: "https://github.com/prisma/prisma/issues", + scripts: { + dev: "DEV=true tsx helpers/build.ts", + build: "tsx helpers/build.ts", + test: "dotenv -e ../../.db.env -- jest --silent", + "test:e2e": "dotenv -e ../../.db.env -- tsx tests/e2e/_utils/run.ts", + "test:functional": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts", + "test:memory": "dotenv -e ../../.db.env -- tsx helpers/memory-tests.ts", + "test:functional:code": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --no-types", + "test:functional:types": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --types-only", + "test-notypes": "dotenv -e ../../.db.env -- jest --testPathIgnorePatterns src/__tests__/types/types.test.ts", + generate: "node scripts/postinstall.js", + postinstall: "node scripts/postinstall.js", + prepublishOnly: "pnpm run build", + "new-test": "tsx ./helpers/new-test/new-test.ts" + }, + files: [ + "README.md", + "runtime", + "!runtime/*.map", + "scripts", + "generator-build", + "edge.js", + "edge.d.ts", + "wasm.js", + "wasm.d.ts", + "index.js", + "index.d.ts", + "react-native.js", + "react-native.d.ts", + "default.js", + "default.d.ts", + "index-browser.js", + "extension.js", + "extension.d.ts", + "sql.d.ts", + "sql.js", + "sql.mjs" + ], + devDependencies: { + "@cloudflare/workers-types": "4.20240614.0", + "@codspeed/benchmark.js-plugin": "3.1.1", + "@faker-js/faker": "8.4.1", + "@fast-check/jest": "1.8.2", + "@inquirer/prompts": "5.0.5", + "@jest/create-cache-key-function": "29.7.0", + "@jest/globals": "29.7.0", + "@jest/test-sequencer": "29.7.0", + "@libsql/client": "0.8.0", + "@neondatabase/serverless": "0.9.3", + "@opentelemetry/api": "1.9.0", + "@opentelemetry/context-async-hooks": "1.25.1", + "@opentelemetry/instrumentation": "0.52.1", + "@opentelemetry/resources": "1.25.1", + "@opentelemetry/sdk-trace-base": "1.25.1", + "@opentelemetry/semantic-conventions": "1.25.1", + "@planetscale/database": "1.18.0", + "@prisma/adapter-d1": "workspace:*", + "@prisma/adapter-libsql": "workspace:*", + "@prisma/adapter-neon": "workspace:*", + "@prisma/adapter-pg": "workspace:*", + "@prisma/adapter-pg-worker": "workspace:*", + "@prisma/adapter-planetscale": "workspace:*", + "@prisma/debug": "workspace:*", + "@prisma/driver-adapter-utils": "workspace:*", + "@prisma/engines": "workspace:*", + "@prisma/engines-version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@prisma/fetch-engine": "workspace:*", + "@prisma/generator-helper": "workspace:*", + "@prisma/get-platform": "workspace:*", + "@prisma/instrumentation": "workspace:*", + "@prisma/internals": "workspace:*", + "@prisma/migrate": "workspace:*", + "@prisma/mini-proxy": "0.9.5", + "@prisma/pg-worker": "workspace:*", + "@prisma/query-engine-wasm": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@snaplet/copycat": "0.17.3", + "@swc-node/register": "1.10.9", + "@swc/core": "1.6.13", + "@swc/jest": "0.2.36", + "@timsuchanek/copy": "1.4.5", + "@types/debug": "4.1.12", + "@types/fs-extra": "9.0.13", + "@types/jest": "29.5.12", + "@types/js-levenshtein": "1.1.3", + "@types/mssql": "9.1.5", + "@types/node": "18.19.31", + "@types/pg": "8.11.6", + arg: "5.0.2", + benchmark: "2.1.4", + "ci-info": "4.0.0", + "decimal.js": "10.4.3", + "detect-runtime": "1.0.4", + "env-paths": "2.2.1", + esbuild: "0.23.0", + execa: "5.1.1", + "expect-type": "0.19.0", + "flat-map-polyfill": "0.3.8", + "fs-extra": "11.1.1", + "get-stream": "6.0.1", + globby: "11.1.0", + "indent-string": "4.0.0", + jest: "29.7.0", + "jest-extended": "4.0.2", + "jest-junit": "16.0.0", + "jest-serializer-ansi-escapes": "3.0.0", + "jest-snapshot": "29.7.0", + "js-levenshtein": "1.1.6", + kleur: "4.1.5", + klona: "2.0.6", + mariadb: "3.3.1", + memfs: "4.9.3", + mssql: "11.0.1", + "new-github-issue-url": "0.2.1", + "node-fetch": "3.3.2", + "p-retry": "4.6.2", + pg: "8.11.5", + "pkg-up": "3.1.0", + pluralize: "8.0.0", + resolve: "1.22.8", + rimraf: "3.0.2", + "simple-statistics": "7.8.5", + "sort-keys": "4.2.0", + "source-map-support": "0.5.21", + "sql-template-tag": "5.2.1", + "stacktrace-parser": "0.1.10", + "strip-ansi": "6.0.1", + "strip-indent": "3.0.0", + "ts-node": "10.9.2", + "ts-pattern": "5.2.0", + tsd: "0.31.1", + typescript: "5.4.5", + undici: "5.28.4", + wrangler: "3.62.0", + zx: "7.2.3" + }, + peerDependencies: { + prisma: "*" + }, + peerDependenciesMeta: { + prisma: { + optional: true + } + }, + sideEffects: false + }; + } +}); + +// ../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/array-species-create.js +var require_array_species_create = __commonJS({ + "../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/array-species-create.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { + return typeof obj; + } : function(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + exports2.default = arraySpeciesCreate; + function arraySpeciesCreate(originalArray, length) { + var isArray = Array.isArray(originalArray); + if (!isArray) { + return Array(length); + } + var C = Object.getPrototypeOf(originalArray).constructor; + if (C) { + if ((typeof C === "undefined" ? "undefined" : _typeof(C)) === "object" || typeof C === "function") { + C = C[Symbol.species.toString()]; + C = C !== null ? C : void 0; + } + if (C === void 0) { + return Array(length); + } + if (typeof C !== "function") { + throw TypeError("invalid constructor"); + } + var result = new C(length); + return result; + } + } + } +}); + +// ../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/flatten-into-array.js +var require_flatten_into_array = __commonJS({ + "../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/flatten-into-array.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = flattenIntoArray; + function flattenIntoArray(target, source, start, depth, mapperFunction, thisArg) { + var mapperFunctionProvied = mapperFunction !== void 0; + var targetIndex = start; + var sourceIndex = 0; + var sourceLen = source.length; + while (sourceIndex < sourceLen) { + var p = sourceIndex; + var exists = !!source[p]; + if (exists === true) { + var element = source[p]; + if (element) { + if (mapperFunctionProvied) { + element = mapperFunction.call(thisArg, element, sourceIndex, target); + } + var spreadable = Object.getOwnPropertySymbols(element).includes(Symbol.isConcatSpreadable) || Array.isArray(element); + if (spreadable === true && depth > 0) { + var nextIndex = flattenIntoArray(target, element, targetIndex, depth - 1); + targetIndex = nextIndex; + } else { + if (!Number.isSafeInteger(targetIndex)) { + throw TypeError(); + } + target[targetIndex] = element; + } + } + } + targetIndex += 1; + sourceIndex += 1; + } + return targetIndex; + } + } +}); + +// ../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/flatten.js +var require_flatten = __commonJS({ + "../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/flatten.js"() { + "use strict"; + var _arraySpeciesCreate = require_array_species_create(); + var _arraySpeciesCreate2 = _interopRequireDefault(_arraySpeciesCreate); + var _flattenIntoArray = require_flatten_into_array(); + var _flattenIntoArray2 = _interopRequireDefault(_flattenIntoArray); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + if (!Object.prototype.hasOwnProperty.call(Array.prototype, "flatten")) { + Array.prototype.flatten = function flatten(depth) { + var o = Object(this); + var a = (0, _arraySpeciesCreate2.default)(o, this.length); + var depthNum = depth !== void 0 ? Number(depth) : Infinity; + (0, _flattenIntoArray2.default)(a, o, 0, depthNum); + return a.filter(function(e) { + return e !== void 0; + }); + }; + } + } +}); + +// ../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/flat-map.js +var require_flat_map = __commonJS({ + "../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/flat-map.js"() { + "use strict"; + var _flattenIntoArray = require_flatten_into_array(); + var _flattenIntoArray2 = _interopRequireDefault(_flattenIntoArray); + var _arraySpeciesCreate = require_array_species_create(); + var _arraySpeciesCreate2 = _interopRequireDefault(_arraySpeciesCreate); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + if (!Object.prototype.hasOwnProperty.call(Array.prototype, "flatMap")) { + Array.prototype.flatMap = function flatMap(callbackFn, thisArg) { + var o = Object(this); + if (!callbackFn || typeof callbackFn.call !== "function") { + throw TypeError("callbackFn must be callable."); + } + var t = thisArg !== void 0 ? thisArg : void 0; + var a = (0, _arraySpeciesCreate2.default)(o, o.length); + (0, _flattenIntoArray2.default)( + a, + o, + /*start*/ + 0, + /*depth*/ + 1, + callbackFn, + t + ); + return a.filter(function(x) { + return x !== void 0; + }, a); + }; + } + } +}); + +// src/generation/ts-builders/KeyType.ts +var KeyType_exports = {}; +__export(KeyType_exports, { + KeyType: () => KeyType, + keyType: () => keyType +}); +function keyType(baseType, key) { + return new KeyType(baseType, key); +} +var KeyType; +var init_KeyType = __esm({ + "src/generation/ts-builders/KeyType.ts"() { + "use strict"; + init_TypeBuilder(); + KeyType = class extends TypeBuilder { + constructor(baseType, key) { + super(); + this.baseType = baseType; + this.key = key; + } + write(writer) { + this.baseType.writeIndexed(writer); + writer.write("[").write(`"${this.key}"`).write("]"); + } + }; + } +}); + +// src/generation/ts-builders/TypeBuilder.ts +var TypeBuilder; +var init_TypeBuilder = __esm({ + "src/generation/ts-builders/TypeBuilder.ts"() { + "use strict"; + TypeBuilder = class { + constructor() { + // TODO(@SevInf): this should be replaced with precedence system that would + // automatically add parenthesis where they are needed + this.needsParenthesisWhenIndexed = false; + this.needsParenthesisInKeyof = false; + this.needsParenthesisInUnion = false; + } + subKey(key) { + const { KeyType: KeyType2 } = (init_KeyType(), __toCommonJS(KeyType_exports)); + return new KeyType2(this, key); + } + writeIndexed(writer) { + if (this.needsParenthesisWhenIndexed) { + writer.write("("); + } + writer.write(this); + if (this.needsParenthesisWhenIndexed) { + writer.write(")"); + } + } + }; + } +}); + +// ../../node_modules/.pnpm/ci-info@4.0.0/node_modules/ci-info/vendors.json +var require_vendors = __commonJS({ + "../../node_modules/.pnpm/ci-info@4.0.0/node_modules/ci-info/vendors.json"(exports2, module2) { + module2.exports = [ + { + name: "Agola CI", + constant: "AGOLA", + env: "AGOLA_GIT_REF", + pr: "AGOLA_PULL_REQUEST_ID" + }, + { + name: "Appcircle", + constant: "APPCIRCLE", + env: "AC_APPCIRCLE" + }, + { + name: "AppVeyor", + constant: "APPVEYOR", + env: "APPVEYOR", + pr: "APPVEYOR_PULL_REQUEST_NUMBER" + }, + { + name: "AWS CodeBuild", + constant: "CODEBUILD", + env: "CODEBUILD_BUILD_ARN" + }, + { + name: "Azure Pipelines", + constant: "AZURE_PIPELINES", + env: "TF_BUILD", + pr: { + BUILD_REASON: "PullRequest" + } + }, + { + name: "Bamboo", + constant: "BAMBOO", + env: "bamboo_planKey" + }, + { + name: "Bitbucket Pipelines", + constant: "BITBUCKET", + env: "BITBUCKET_COMMIT", + pr: "BITBUCKET_PR_ID" + }, + { + name: "Bitrise", + constant: "BITRISE", + env: "BITRISE_IO", + pr: "BITRISE_PULL_REQUEST" + }, + { + name: "Buddy", + constant: "BUDDY", + env: "BUDDY_WORKSPACE_ID", + pr: "BUDDY_EXECUTION_PULL_REQUEST_ID" + }, + { + name: "Buildkite", + constant: "BUILDKITE", + env: "BUILDKITE", + pr: { + env: "BUILDKITE_PULL_REQUEST", + ne: "false" + } + }, + { + name: "CircleCI", + constant: "CIRCLE", + env: "CIRCLECI", + pr: "CIRCLE_PULL_REQUEST" + }, + { + name: "Cirrus CI", + constant: "CIRRUS", + env: "CIRRUS_CI", + pr: "CIRRUS_PR" + }, + { + name: "Codefresh", + constant: "CODEFRESH", + env: "CF_BUILD_ID", + pr: { + any: [ + "CF_PULL_REQUEST_NUMBER", + "CF_PULL_REQUEST_ID" + ] + } + }, + { + name: "Codemagic", + constant: "CODEMAGIC", + env: "CM_BUILD_ID", + pr: "CM_PULL_REQUEST" + }, + { + name: "Codeship", + constant: "CODESHIP", + env: { + CI_NAME: "codeship" + } + }, + { + name: "Drone", + constant: "DRONE", + env: "DRONE", + pr: { + DRONE_BUILD_EVENT: "pull_request" + } + }, + { + name: "dsari", + constant: "DSARI", + env: "DSARI" + }, + { + name: "Earthly", + constant: "EARTHLY", + env: "EARTHLY_CI" + }, + { + name: "Expo Application Services", + constant: "EAS", + env: "EAS_BUILD" + }, + { + name: "Gerrit", + constant: "GERRIT", + env: "GERRIT_PROJECT" + }, + { + name: "Gitea Actions", + constant: "GITEA_ACTIONS", + env: "GITEA_ACTIONS" + }, + { + name: "GitHub Actions", + constant: "GITHUB_ACTIONS", + env: "GITHUB_ACTIONS", + pr: { + GITHUB_EVENT_NAME: "pull_request" + } + }, + { + name: "GitLab CI", + constant: "GITLAB", + env: "GITLAB_CI", + pr: "CI_MERGE_REQUEST_ID" + }, + { + name: "GoCD", + constant: "GOCD", + env: "GO_PIPELINE_LABEL" + }, + { + name: "Google Cloud Build", + constant: "GOOGLE_CLOUD_BUILD", + env: "BUILDER_OUTPUT" + }, + { + name: "Harness CI", + constant: "HARNESS", + env: "HARNESS_BUILD_ID" + }, + { + name: "Heroku", + constant: "HEROKU", + env: { + env: "NODE", + includes: "/app/.heroku/node/bin/node" + } + }, + { + name: "Hudson", + constant: "HUDSON", + env: "HUDSON_URL" + }, + { + name: "Jenkins", + constant: "JENKINS", + env: [ + "JENKINS_URL", + "BUILD_ID" + ], + pr: { + any: [ + "ghprbPullId", + "CHANGE_ID" + ] + } + }, + { + name: "LayerCI", + constant: "LAYERCI", + env: "LAYERCI", + pr: "LAYERCI_PULL_REQUEST" + }, + { + name: "Magnum CI", + constant: "MAGNUM", + env: "MAGNUM" + }, + { + name: "Netlify CI", + constant: "NETLIFY", + env: "NETLIFY", + pr: { + env: "PULL_REQUEST", + ne: "false" + } + }, + { + name: "Nevercode", + constant: "NEVERCODE", + env: "NEVERCODE", + pr: { + env: "NEVERCODE_PULL_REQUEST", + ne: "false" + } + }, + { + name: "Prow", + constant: "PROW", + env: "PROW_JOB_ID" + }, + { + name: "ReleaseHub", + constant: "RELEASEHUB", + env: "RELEASE_BUILD_ID" + }, + { + name: "Render", + constant: "RENDER", + env: "RENDER", + pr: { + IS_PULL_REQUEST: "true" + } + }, + { + name: "Sail CI", + constant: "SAIL", + env: "SAILCI", + pr: "SAIL_PULL_REQUEST_NUMBER" + }, + { + name: "Screwdriver", + constant: "SCREWDRIVER", + env: "SCREWDRIVER", + pr: { + env: "SD_PULL_REQUEST", + ne: "false" + } + }, + { + name: "Semaphore", + constant: "SEMAPHORE", + env: "SEMAPHORE", + pr: "PULL_REQUEST_NUMBER" + }, + { + name: "Sourcehut", + constant: "SOURCEHUT", + env: { + CI_NAME: "sourcehut" + } + }, + { + name: "Strider CD", + constant: "STRIDER", + env: "STRIDER" + }, + { + name: "TaskCluster", + constant: "TASKCLUSTER", + env: [ + "TASK_ID", + "RUN_ID" + ] + }, + { + name: "TeamCity", + constant: "TEAMCITY", + env: "TEAMCITY_VERSION" + }, + { + name: "Travis CI", + constant: "TRAVIS", + env: "TRAVIS", + pr: { + env: "TRAVIS_PULL_REQUEST", + ne: "false" + } + }, + { + name: "Vela", + constant: "VELA", + env: "VELA", + pr: { + VELA_PULL_REQUEST: "1" + } + }, + { + name: "Vercel", + constant: "VERCEL", + env: { + any: [ + "NOW_BUILDER", + "VERCEL" + ] + }, + pr: "VERCEL_GIT_PULL_REQUEST_ID" + }, + { + name: "Visual Studio App Center", + constant: "APPCENTER", + env: "APPCENTER_BUILD_ID" + }, + { + name: "Woodpecker", + constant: "WOODPECKER", + env: { + CI: "woodpecker" + }, + pr: { + CI_BUILD_EVENT: "pull_request" + } + }, + { + name: "Xcode Cloud", + constant: "XCODE_CLOUD", + env: "CI_XCODE_PROJECT", + pr: "CI_PULL_REQUEST_NUMBER" + }, + { + name: "Xcode Server", + constant: "XCODE_SERVER", + env: "XCS" + } + ]; + } +}); + +// ../../node_modules/.pnpm/ci-info@4.0.0/node_modules/ci-info/index.js +var require_ci_info = __commonJS({ + "../../node_modules/.pnpm/ci-info@4.0.0/node_modules/ci-info/index.js"(exports2) { + "use strict"; + var vendors = require_vendors(); + var env2 = process.env; + Object.defineProperty(exports2, "_vendors", { + value: vendors.map(function(v) { + return v.constant; + }) + }); + exports2.name = null; + exports2.isPR = null; + vendors.forEach(function(vendor) { + const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]; + const isCI = envs.every(function(obj) { + return checkEnv(obj); + }); + exports2[vendor.constant] = isCI; + if (!isCI) { + return; + } + exports2.name = vendor.name; + switch (typeof vendor.pr) { + case "string": + exports2.isPR = !!env2[vendor.pr]; + break; + case "object": + if ("env" in vendor.pr) { + exports2.isPR = vendor.pr.env in env2 && env2[vendor.pr.env] !== vendor.pr.ne; + } else if ("any" in vendor.pr) { + exports2.isPR = vendor.pr.any.some(function(key) { + return !!env2[key]; + }); + } else { + exports2.isPR = checkEnv(vendor.pr); + } + break; + default: + exports2.isPR = null; + } + }); + exports2.isCI = !!(env2.CI !== "false" && // Bypass all checks if CI env is explicitly set to 'false' + (env2.BUILD_ID || // Jenkins, Cloudbees + env2.BUILD_NUMBER || // Jenkins, TeamCity + env2.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari + env2.CI_APP_ID || // Appflow + env2.CI_BUILD_ID || // Appflow + env2.CI_BUILD_NUMBER || // Appflow + env2.CI_NAME || // Codeship and others + env2.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI + env2.RUN_ID || // TaskCluster, dsari + exports2.name || false)); + function checkEnv(obj) { + if (typeof obj === "string") return !!env2[obj]; + if ("env" in obj) { + return env2[obj.env] && env2[obj.env].includes(obj.includes); + } + if ("any" in obj) { + return obj.any.some(function(k) { + return !!env2[k]; + }); + } + return Object.keys(obj).every(function(k) { + return env2[k] === obj[k]; + }); + } + } +}); + +// src/generation/generator.ts +var generator_exports = {}; +__export(generator_exports, { + dmmfToTypes: () => dmmfToTypes, + externalToInternalDmmf: () => externalToInternalDmmf +}); +module.exports = __toCommonJS(generator_exports); + +// ../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs +var colors_exports = {}; +__export(colors_exports, { + $: () => $, + bgBlack: () => bgBlack, + bgBlue: () => bgBlue, + bgCyan: () => bgCyan, + bgGreen: () => bgGreen, + bgMagenta: () => bgMagenta, + bgRed: () => bgRed, + bgWhite: () => bgWhite, + bgYellow: () => bgYellow, + black: () => black, + blue: () => blue, + bold: () => bold, + cyan: () => cyan, + dim: () => dim, + gray: () => gray, + green: () => green, + grey: () => grey, + hidden: () => hidden, + inverse: () => inverse, + italic: () => italic, + magenta: () => magenta, + red: () => red, + reset: () => reset, + strikethrough: () => strikethrough, + underline: () => underline, + white: () => white, + yellow: () => yellow +}); +var FORCE_COLOR; +var NODE_DISABLE_COLORS; +var NO_COLOR; +var TERM; +var isTTY = true; +if (typeof process !== "undefined") { + ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {}); + isTTY = process.stdout && process.stdout.isTTY; +} +var $ = { + enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY) +}; +function init(x, y) { + let rgx = new RegExp(`\\x1b\\[${y}m`, "g"); + let open = `\x1B[${x}m`, close = `\x1B[${y}m`; + return function(txt) { + if (!$.enabled || txt == null) return txt; + return open + (!!~("" + txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close; + }; +} +var reset = init(0, 0); +var bold = init(1, 22); +var dim = init(2, 22); +var italic = init(3, 23); +var underline = init(4, 24); +var inverse = init(7, 27); +var hidden = init(8, 28); +var strikethrough = init(9, 29); +var black = init(30, 39); +var red = init(31, 39); +var green = init(32, 39); +var yellow = init(33, 39); +var blue = init(34, 39); +var magenta = init(35, 39); +var cyan = init(36, 39); +var white = init(37, 39); +var gray = init(90, 39); +var grey = init(90, 39); +var bgBlack = init(40, 49); +var bgRed = init(41, 49); +var bgGreen = init(42, 49); +var bgYellow = init(43, 49); +var bgBlue = init(44, 49); +var bgMagenta = init(45, 49); +var bgCyan = init(46, 49); +var bgWhite = init(47, 49); + +// ../debug/src/index.ts +var MAX_ARGS_HISTORY = 100; +var COLORS = ["green", "yellow", "blue", "magenta", "cyan", "red"]; +var argsHistory = []; +var lastTimestamp = Date.now(); +var lastColor = 0; +var processEnv = typeof process !== "undefined" ? process.env : {}; +globalThis.DEBUG ??= processEnv.DEBUG ?? ""; +globalThis.DEBUG_COLORS ??= processEnv.DEBUG_COLORS ? processEnv.DEBUG_COLORS === "true" : true; +var topProps = { + enable(namespace2) { + if (typeof namespace2 === "string") { + globalThis.DEBUG = namespace2; + } + }, + disable() { + const prev = globalThis.DEBUG; + globalThis.DEBUG = ""; + return prev; + }, + // this is the core logic to check if logging should happen or not + enabled(namespace2) { + const listenedNamespaces = globalThis.DEBUG.split(",").map((s) => { + return s.replace(/[.+?^${}()|[\]\\]/g, "\\$&"); + }); + const isListened = listenedNamespaces.some((listenedNamespace) => { + if (listenedNamespace === "" || listenedNamespace[0] === "-") return false; + return namespace2.match(RegExp(listenedNamespace.split("*").join(".*") + "$")); + }); + const isExcluded = listenedNamespaces.some((listenedNamespace) => { + if (listenedNamespace === "" || listenedNamespace[0] !== "-") return false; + return namespace2.match(RegExp(listenedNamespace.slice(1).split("*").join(".*") + "$")); + }); + return isListened && !isExcluded; + }, + log: (...args) => { + const [namespace2, format, ...rest] = args; + const logWithFormatting = console.warn ?? console.log; + logWithFormatting(`${namespace2} ${format}`, ...rest); + }, + formatters: {} + // not implemented +}; +function debugCreate(namespace2) { + const instanceProps = { + color: COLORS[lastColor++ % COLORS.length], + enabled: topProps.enabled(namespace2), + namespace: namespace2, + log: topProps.log, + extend: () => { + } + // not implemented + }; + const debugCall = (...args) => { + const { enabled, namespace: namespace3, color, log } = instanceProps; + if (args.length !== 0) { + argsHistory.push([namespace3, ...args]); + } + if (argsHistory.length > MAX_ARGS_HISTORY) { + argsHistory.shift(); + } + if (topProps.enabled(namespace3) || enabled) { + const stringArgs = args.map((arg) => { + if (typeof arg === "string") { + return arg; + } + return safeStringify(arg); + }); + const ms = `+${Date.now() - lastTimestamp}ms`; + lastTimestamp = Date.now(); + if (globalThis.DEBUG_COLORS) { + log(colors_exports[color](bold(namespace3)), ...stringArgs, colors_exports[color](ms)); + } else { + log(namespace3, ...stringArgs, ms); + } + } + }; + return new Proxy(debugCall, { + get: (_, prop) => instanceProps[prop], + set: (_, prop, value) => instanceProps[prop] = value + }); +} +var Debug = new Proxy(debugCreate, { + get: (_, prop) => topProps[prop], + set: (_, prop, value) => topProps[prop] = value +}); +function safeStringify(value, indent9 = 2) { + const cache = /* @__PURE__ */ new Set(); + return JSON.stringify( + value, + (key, value2) => { + if (typeof value2 === "object" && value2 !== null) { + if (cache.has(value2)) { + return `[Circular *]`; + } + cache.add(value2); + } else if (typeof value2 === "bigint") { + return value2.toString(); + } + return value2; + }, + indent9 + ); +} +var src_default = Debug; + +// src/generation/generator.ts +var import_engines_version = __toESM(require_engines_version()); + +// ../generator-helper/src/dmmf.ts +var DMMF; +((DMMF2) => { + let ModelAction; + ((ModelAction2) => { + ModelAction2["findUnique"] = "findUnique"; + ModelAction2["findUniqueOrThrow"] = "findUniqueOrThrow"; + ModelAction2["findFirst"] = "findFirst"; + ModelAction2["findFirstOrThrow"] = "findFirstOrThrow"; + ModelAction2["findMany"] = "findMany"; + ModelAction2["create"] = "create"; + ModelAction2["createMany"] = "createMany"; + ModelAction2["createManyAndReturn"] = "createManyAndReturn"; + ModelAction2["update"] = "update"; + ModelAction2["updateMany"] = "updateMany"; + ModelAction2["upsert"] = "upsert"; + ModelAction2["delete"] = "delete"; + ModelAction2["deleteMany"] = "deleteMany"; + ModelAction2["groupBy"] = "groupBy"; + ModelAction2["count"] = "count"; + ModelAction2["aggregate"] = "aggregate"; + ModelAction2["findRaw"] = "findRaw"; + ModelAction2["aggregateRaw"] = "aggregateRaw"; + })(ModelAction = DMMF2.ModelAction || (DMMF2.ModelAction = {})); +})(DMMF || (DMMF = {})); + +// ../generator-helper/src/byline.ts +var import_stream = __toESM(require("stream")); +var import_util = __toESM(require("util")); +function byline(readStream, options) { + return createStream(readStream, options); +} +function createStream(readStream, options) { + if (readStream) { + return createLineStream(readStream, options); + } else { + return new LineStream(options); + } +} +function createLineStream(readStream, options) { + if (!readStream) { + throw new Error("expected readStream"); + } + if (!readStream.readable) { + throw new Error("readStream must be readable"); + } + const ls = new LineStream(options); + readStream.pipe(ls); + return ls; +} +function LineStream(options) { + import_stream.default.Transform.call(this, options); + options = options || {}; + this._readableState.objectMode = true; + this._lineBuffer = []; + this._keepEmptyLines = options.keepEmptyLines || false; + this._lastChunkEndedWithCR = false; + this.on("pipe", function(src) { + if (!this.encoding) { + if (src instanceof import_stream.default.Readable) { + this.encoding = src._readableState.encoding; + } + } + }); +} +import_util.default.inherits(LineStream, import_stream.default.Transform); +LineStream.prototype._transform = function(chunk, encoding, done) { + encoding = encoding || "utf8"; + if (Buffer.isBuffer(chunk)) { + if (encoding == "buffer") { + chunk = chunk.toString(); + encoding = "utf8"; + } else { + chunk = chunk.toString(encoding); + } + } + this._chunkEncoding = encoding; + const lines = chunk.split(/\r\n|\r|\n/g); + if (this._lastChunkEndedWithCR && chunk[0] == "\n") { + lines.shift(); + } + if (this._lineBuffer.length > 0) { + this._lineBuffer[this._lineBuffer.length - 1] += lines[0]; + lines.shift(); + } + this._lastChunkEndedWithCR = chunk[chunk.length - 1] == "\r"; + this._lineBuffer = this._lineBuffer.concat(lines); + this._pushBuffer(encoding, 1, done); +}; +LineStream.prototype._pushBuffer = function(encoding, keep, done) { + while (this._lineBuffer.length > keep) { + const line = this._lineBuffer.shift(); + if (this._keepEmptyLines || line.length > 0) { + if (!this.push(this._reencode(line, encoding))) { + const self = this; + setImmediate(function() { + self._pushBuffer(encoding, keep, done); + }); + return; + } + } + } + done(); +}; +LineStream.prototype._flush = function(done) { + this._pushBuffer(this._chunkEncoding, 0, done); +}; +LineStream.prototype._reencode = function(line, chunkEncoding) { + if (this.encoding && this.encoding != chunkEncoding) { + return Buffer.from(line, chunkEncoding).toString(this.encoding); + } else if (this.encoding) { + return line; + } else { + return Buffer.from(line, chunkEncoding); + } +}; + +// ../generator-helper/src/generatorHandler.ts +function generatorHandler(handler) { + byline(process.stdin).on("data", async (line) => { + const json = JSON.parse(String(line)); + if (json.method === "generate" && json.params) { + try { + const result = await handler.onGenerate(json.params); + respond({ + jsonrpc: "2.0", + result, + id: json.id + }); + } catch (_e) { + const e = _e; + respond({ + jsonrpc: "2.0", + error: { + code: -32e3, + message: e.message, + data: { + stack: e.stack + } + }, + id: json.id + }); + } + } + if (json.method === "getManifest") { + if (handler.onManifest) { + try { + const manifest = handler.onManifest(json.params); + respond({ + jsonrpc: "2.0", + result: { + manifest + }, + id: json.id + }); + } catch (_e) { + const e = _e; + respond({ + jsonrpc: "2.0", + error: { + code: -32e3, + message: e.message, + data: { + stack: e.stack + } + }, + id: json.id + }); + } + } else { + respond({ + jsonrpc: "2.0", + result: { + manifest: null + }, + id: json.id + }); + } + } + }); + process.stdin.resume(); +} +function respond(response) { + console.error(JSON.stringify(response)); +} + +// ../get-platform/src/getNodeAPIName.ts +var NODE_API_QUERY_ENGINE_URL_BASE = "libquery_engine"; +function getNodeAPIName(binaryTarget, type) { + const isUrl = type === "url"; + if (binaryTarget.includes("windows")) { + return isUrl ? `query_engine.dll.node` : `query_engine-${binaryTarget}.dll.node`; + } else if (binaryTarget.includes("darwin")) { + return isUrl ? `${NODE_API_QUERY_ENGINE_URL_BASE}.dylib.node` : `${NODE_API_QUERY_ENGINE_URL_BASE}-${binaryTarget}.dylib.node`; + } else { + return isUrl ? `${NODE_API_QUERY_ENGINE_URL_BASE}.so.node` : `${NODE_API_QUERY_ENGINE_URL_BASE}-${binaryTarget}.so.node`; + } +} + +// ../../node_modules/.pnpm/find-cache-dir@5.0.0/node_modules/find-cache-dir/index.js +var import_node_process = __toESM(require("process"), 1); +var import_common_path_prefix = __toESM(require_common_path_prefix(), 1); + +// ../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js +var findUpStop = Symbol("findUpStop"); + +// ../../node_modules/.pnpm/find-cache-dir@5.0.0/node_modules/find-cache-dir/index.js +var { env, cwd } = import_node_process.default; + +// ../fetch-engine/src/utils.ts +var import_fs = __toESM(require("fs")); +var import_os = __toESM(require("os")); +var debug = src_default("prisma:fetch-engine:cache-dir"); +async function overwriteFile(sourcePath, targetPath) { + if (import_os.default.platform() === "darwin") { + await removeFileIfExists(targetPath); + await import_fs.default.promises.copyFile(sourcePath, targetPath); + } else { + let tempPath = `${targetPath}.tmp${process.pid}`; + await import_fs.default.promises.copyFile(sourcePath, tempPath); + await import_fs.default.promises.rename(tempPath, targetPath); + } +} +async function removeFileIfExists(filePath) { + try { + await import_fs.default.promises.unlink(filePath); + } catch (e) { + if (e.code !== "ENOENT") { + throw e; + } + } +} + +// ../internals/src/client/getClientEngineType.ts +var DEFAULT_CLIENT_ENGINE_TYPE = "library" /* Library */; +function getClientEngineType(generatorConfig) { + const engineTypeFromEnvVar = getEngineTypeFromEnvVar(); + if (engineTypeFromEnvVar) return engineTypeFromEnvVar; + if (generatorConfig?.config.engineType === "library" /* Library */) { + return "library" /* Library */; + } else if (generatorConfig?.config.engineType === "binary" /* Binary */) { + return "binary" /* Binary */; + } else { + return DEFAULT_CLIENT_ENGINE_TYPE; + } +} +function getEngineTypeFromEnvVar() { + const engineType = process.env.PRISMA_CLIENT_ENGINE_TYPE; + if (engineType === "library" /* Library */) { + return "library" /* Library */; + } else if (engineType === "binary" /* Binary */) { + return "binary" /* Binary */; + } else { + return void 0; + } +} + +// ../internals/src/utils/parseEnvValue.ts +function parseEnvValue(object) { + if (object.fromEnvVar && object.fromEnvVar != "null") { + const value = process.env[object.fromEnvVar]; + if (!value) { + throw new Error( + `Attempted to load provider value using \`env(${object.fromEnvVar})\` but it was not present. Please ensure that ${dim( + object.fromEnvVar + )} is present in your Environment Variables` + ); + } + return value; + } + return object.value; +} + +// ../internals/src/utils/path.ts +var import_path = __toESM(require("path")); +function pathToPosix(filePath) { + if (import_path.default.sep === import_path.default.posix.sep) { + return filePath; + } + return filePath.split(import_path.default.sep).join(import_path.default.posix.sep); +} + +// ../internals/src/utils/parseAWSNodejsRuntimeEnvVarVersion.ts +function parseAWSNodejsRuntimeEnvVarVersion() { + const runtimeEnvVar = process.env.AWS_LAMBDA_JS_RUNTIME; + if (!runtimeEnvVar || runtimeEnvVar === "") return null; + try { + const runtimeRegex = /^nodejs(\d+).x$/; + const match = runtimeRegex.exec(runtimeEnvVar); + if (match) { + return parseInt(match[1]); + } + } catch (e) { + console.error( + `We could not parse the AWS_LAMBDA_JS_RUNTIME env var with the following value: ${runtimeEnvVar}. This was silently ignored.` + ); + } + return null; +} + +// ../internals/src/utils/assertNever.ts +function assertNever(arg, errorMessage) { + throw new Error(errorMessage); +} + +// ../internals/src/utils/hasOwnProperty.ts +function hasOwnProperty(object, key) { + return Object.prototype.hasOwnProperty.call(object, key); +} + +// ../internals/src/utils/isValidJsIdentifier.ts +var import_helper_validator_identifier = __toESM(require_lib2()); +function isValidJsIdentifier(str) { + return (0, import_helper_validator_identifier.isIdentifierName)(str); +} + +// ../internals/src/utils/setClassName.ts +function setClassName(classObject, name) { + Object.defineProperty(classObject, "name", { + value: name, + configurable: true + }); +} + +// src/runtime/externalToInternalDmmf.ts +var import_pluralize = __toESM(require_pluralize()); + +// src/generation/utils/common.ts +var keyBy = (collection, prop) => { + const acc = {}; + for (const obj of collection) { + const key = obj[prop]; + acc[key] = obj; + } + return acc; +}; +function needsNamespace(field) { + if (field.kind === "object") { + return true; + } + if (field.kind === "scalar") { + return field.type === "Json" || field.type === "Decimal"; + } + return false; +} +var GraphQLScalarToJSTypeTable = { + String: "string", + Int: "number", + Float: "number", + Boolean: "boolean", + Long: "number", + DateTime: ["Date", "string"], + ID: "string", + UUID: "string", + Json: "JsonValue", + Bytes: "Buffer", + Decimal: ["Decimal", "DecimalJsLike", "number", "string"], + BigInt: ["bigint", "number"] +}; +var JSOutputTypeToInputType = { + JsonValue: "InputJsonValue" +}; +function capitalize(str) { + return str[0].toUpperCase() + str.slice(1); +} +function lowerCase(name) { + return name.substring(0, 1).toLowerCase() + name.substring(1); +} + +// src/runtime/externalToInternalDmmf.ts +function externalToInternalDmmf(document) { + return { + ...document, + mappings: getMappings(document.mappings, document.datamodel) + }; +} +function getMappings(mappings, datamodel) { + const modelOperations = mappings.modelOperations.filter((mapping) => { + const model = datamodel.models.find((m) => m.name === mapping.model); + if (!model) { + throw new Error(`Mapping without model ${mapping.model}`); + } + return model.fields.some((f) => f.kind !== "object"); + }).map((mapping) => ({ + model: mapping.model, + plural: (0, import_pluralize.default)(lowerCase(mapping.model)), + // TODO not needed anymore + findUnique: mapping.findUnique || mapping.findSingle, + findUniqueOrThrow: mapping.findUniqueOrThrow, + findFirst: mapping.findFirst, + findFirstOrThrow: mapping.findFirstOrThrow, + findMany: mapping.findMany, + create: mapping.createOne || mapping.createSingle || mapping.create, + createMany: mapping.createMany, + createManyAndReturn: mapping.createManyAndReturn, + delete: mapping.deleteOne || mapping.deleteSingle || mapping.delete, + update: mapping.updateOne || mapping.updateSingle || mapping.update, + deleteMany: mapping.deleteMany, + updateMany: mapping.updateMany, + upsert: mapping.upsertOne || mapping.upsertSingle || mapping.upsert, + aggregate: mapping.aggregate, + groupBy: mapping.groupBy, + findRaw: mapping.findRaw, + aggregateRaw: mapping.aggregateRaw + })); + return { + modelOperations, + otherOperations: mappings.otherOperations + }; +} + +// src/generation/generateClient.ts +var import_crypto2 = require("crypto"); +var import_env_paths = __toESM(require_env_paths()); +var import_fs2 = require("fs"); +var import_promises = __toESM(require("fs/promises")); +var import_fs_extra = __toESM(require_lib()); +var import_path5 = __toESM(require("path")); +var import_pkg_up = __toESM(require_pkg_up()); +var import_package = __toESM(require_package2()); + +// src/generation/getDMMF.ts +function getPrismaClientDMMF(dmmf) { + return externalToInternalDmmf(dmmf); +} + +// ../../node_modules/.pnpm/flat-map-polyfill@0.3.8/node_modules/flat-map-polyfill/dist/cjs/index.js +require_flatten(); +require_flat_map(); + +// src/generation/TSClient/Enum.ts +var import_indent_string = __toESM(require_indent_string()); + +// src/runtime/core/types/exported/ObjectEnums.ts +var objectEnumNames = ["JsonNullValueInput", "NullableJsonNullValueInput", "JsonNullValueFilter"]; +var secret = Symbol(); +var representations = /* @__PURE__ */ new WeakMap(); +var ObjectEnumValue = class { + constructor(arg) { + if (arg === secret) { + representations.set(this, `Prisma.${this._getName()}`); + } else { + representations.set(this, `new Prisma.${this._getNamespace()}.${this._getName()}()`); + } + } + _getName() { + return this.constructor.name; + } + toString() { + return representations.get(this); + } +}; +var NullTypesEnumValue = class extends ObjectEnumValue { + _getNamespace() { + return "NullTypes"; + } +}; +var DbNull = class extends NullTypesEnumValue { +}; +setClassName2(DbNull, "DbNull"); +var JsonNull = class extends NullTypesEnumValue { +}; +setClassName2(JsonNull, "JsonNull"); +var AnyNull = class extends NullTypesEnumValue { +}; +setClassName2(AnyNull, "AnyNull"); +var objectEnumValues = { + classes: { + DbNull, + JsonNull, + AnyNull + }, + instances: { + DbNull: new DbNull(secret), + JsonNull: new JsonNull(secret), + AnyNull: new AnyNull(secret) + } +}; +function setClassName2(classObject, name) { + Object.defineProperty(classObject, "name", { + value: name, + configurable: true + }); +} + +// src/runtime/strictEnum.ts +var strictEnumNames = ["TransactionIsolationLevel"]; + +// src/generation/TSClient/constants.ts +var TAB_SIZE = 2; + +// src/generation/TSClient/Enum.ts +var Enum = class { + constructor(type, useNamespace) { + this.type = type; + this.useNamespace = useNamespace; + } + isObjectEnum() { + return this.useNamespace && objectEnumNames.includes(this.type.name); + } + isStrictEnum() { + return this.useNamespace && strictEnumNames.includes(this.type.name); + } + toJS() { + const { type } = this; + const enumVariants = `{ +${(0, import_indent_string.default)(type.values.map((v) => `${v}: ${this.getValueJS(v)}`).join(",\n"), TAB_SIZE)} +}`; + const enumBody = this.isStrictEnum() ? `makeStrictEnum(${enumVariants})` : enumVariants; + return this.useNamespace ? `exports.Prisma.${type.name} = ${enumBody};` : `exports.${type.name} = exports.$Enums.${type.name} = ${enumBody};`; + } + getValueJS(value) { + return this.isObjectEnum() ? `Prisma.${value}` : `'${value}'`; + } + toTS() { + const { type } = this; + return `export const ${type.name}: { +${(0, import_indent_string.default)(type.values.map((v) => `${v}: ${this.getValueTS(v)}`).join(",\n"), TAB_SIZE)} +}; + +export type ${type.name} = (typeof ${type.name})[keyof typeof ${type.name}] +`; + } + getValueTS(value) { + return this.isObjectEnum() ? `typeof ${value}` : `'${value}'`; + } +}; + +// src/generation/TSClient/Generable.ts +function JS(gen) { + return gen.toJS?.() ?? ""; +} +function BrowserJS(gen) { + return gen.toBrowserJS?.() ?? ""; +} +function TS(gen) { + return gen.toTS(); +} + +// src/generation/TSClient/Input.ts +var import_indent_string2 = __toESM(require_indent_string()); + +// src/runtime/utils/uniqueBy.ts +function uniqueBy(arr, callee) { + const result = {}; + for (const value of arr) { + const hash = callee(value); + if (!result[hash]) { + result[hash] = value; + } + } + return Object.values(result); +} + +// src/generation/ts-builders/ArraySpread.ts +init_TypeBuilder(); +var ArraySpread = class extends TypeBuilder { + constructor(innerType) { + super(); + this.innerType = innerType; + } + write(writer) { + writer.write("[...").write(this.innerType).write("]"); + } +}; +function arraySpread(innerType) { + return new ArraySpread(innerType); +} + +// src/generation/ts-builders/ArrayType.ts +init_TypeBuilder(); +var ArrayType = class extends TypeBuilder { + constructor(elementType) { + super(); + this.elementType = elementType; + } + write(writer) { + this.elementType.writeIndexed(writer); + writer.write("[]"); + } +}; +function array(elementType) { + return new ArrayType(elementType); +} + +// src/generation/ts-builders/ConstDeclaration.ts +var ConstDeclaration = class { + constructor(name, type) { + this.name = name; + this.type = type; + } + setDocComment(docComment2) { + this.docComment = docComment2; + return this; + } + write(writer) { + if (this.docComment) { + writer.write(this.docComment); + } + writer.write("const ").write(this.name).write(": ").write(this.type); + } +}; +function constDeclaration(name, type) { + return new ConstDeclaration(name, type); +} + +// src/generation/ts-builders/DocComment.ts +var DocComment = class { + constructor(startingText) { + this.lines = []; + if (startingText) { + this.addText(startingText); + } + } + addText(text) { + this.lines.push(...text.split("\n")); + return this; + } + write(writer) { + writer.writeLine("/**"); + for (const line of this.lines) { + writer.writeLine(` * ${line}`); + } + writer.writeLine(" */"); + return writer; + } +}; +function docComment(firstParameter, ...args) { + if (typeof firstParameter === "string" || typeof firstParameter === "undefined") { + return new DocComment(firstParameter); + } + return docCommentTag(firstParameter, args); +} +function docCommentTag(strings, args) { + const docComment2 = new DocComment(); + const fullText = strings.flatMap((str, i) => { + if (i < args.length) { + return [str, args[i]]; + } + return [str]; + }).join(""); + const lines = trimEmptyLines(fullText.split("\n")); + if (lines.length === 0) { + return docComment2; + } + const indent9 = getIndent(lines[0]); + for (const line of lines) { + docComment2.addText(line.slice(indent9)); + } + return docComment2; +} +function trimEmptyLines(lines) { + const firstLine = findFirstNonEmptyLine(lines); + const lastLine = findLastNonEmptyLine(lines); + if (firstLine === -1 || lastLine === -1) { + return []; + } + return lines.slice(firstLine, lastLine + 1); +} +function findFirstNonEmptyLine(lines) { + return lines.findIndex((line) => !isEmptyLine(line)); +} +function findLastNonEmptyLine(lines) { + let i = lines.length - 1; + while (i > 0 && isEmptyLine(lines[i])) { + i--; + } + return i; +} +function isEmptyLine(line) { + return line.trim().length === 0; +} +function getIndent(line) { + let indent9 = 0; + while (line[indent9] === " ") { + indent9++; + } + return indent9; +} + +// src/generation/ts-builders/Export.ts +var Export = class { + constructor(declaration) { + this.declaration = declaration; + } + setDocComment(docComment2) { + this.docComment = docComment2; + return this; + } + write(writer) { + if (this.docComment) { + writer.write(this.docComment); + } + writer.write("export ").write(this.declaration); + } +}; +function moduleExport(declaration) { + return new Export(declaration); +} + +// src/generation/ts-builders/ExportFrom.ts +var NamespaceExport = class { + constructor(from, namespace2) { + this.from = from; + this.namespace = namespace2; + } + write(writer) { + writer.write(`export * as ${this.namespace} from '${this.from}'`); + } +}; +var BindingsExport = class { + constructor(from) { + this.from = from; + this.namedExports = []; + } + named(namedExport) { + if (typeof namedExport === "string") { + namedExport = new NamedExport(namedExport); + } + this.namedExports.push(namedExport); + return this; + } + write(writer) { + writer.write("export ").write("{ ").writeJoined(", ", this.namedExports).write(" }").write(` from "${this.from}"`); + } +}; +var NamedExport = class { + constructor(name) { + this.name = name; + } + as(alias) { + this.alias = alias; + return this; + } + write(writer) { + writer.write(this.name); + if (this.alias) { + writer.write(" as ").write(this.alias); + } + } +}; +var ExportAllFrom = class { + constructor(from) { + this.from = from; + } + asNamespace(namespace2) { + return new NamespaceExport(this.from, namespace2); + } + named(binding) { + return new BindingsExport(this.from).named(binding); + } + write(writer) { + writer.write(`export * from "${this.from}"`); + } +}; +function moduleExportFrom(from) { + return new ExportAllFrom(from); +} + +// src/generation/ts-builders/File.ts +var File = class { + constructor() { + this.imports = []; + this.declarations = []; + } + addImport(moduleImport2) { + this.imports.push(moduleImport2); + return this; + } + add(declaration) { + this.declarations.push(declaration); + } + write(writer) { + for (const moduleImport2 of this.imports) { + writer.writeLine(moduleImport2); + } + if (this.imports.length > 0) { + writer.newLine(); + } + for (const [i, declaration] of this.declarations.entries()) { + writer.writeLine(declaration); + if (i < this.declarations.length - 1) { + writer.newLine(); + } + } + } +}; +function file() { + return new File(); +} + +// src/generation/ts-builders/PrimitiveType.ts +init_TypeBuilder(); +var PrimitiveType = class extends TypeBuilder { + constructor(name) { + super(); + this.name = name; + } + write(writer) { + writer.write(this.name); + } +}; +var stringType = new PrimitiveType("string"); +var numberType = new PrimitiveType("number"); +var booleanType = new PrimitiveType("boolean"); +var nullType = new PrimitiveType("null"); +var undefinedType = new PrimitiveType("undefined"); +var bigintType = new PrimitiveType("bigint"); +var unknownType = new PrimitiveType("unknown"); +var anyType = new PrimitiveType("any"); +var voidType = new PrimitiveType("void"); +var thisType = new PrimitiveType("this"); +var neverType = new PrimitiveType("never"); + +// src/generation/ts-builders/FunctionType.ts +init_TypeBuilder(); +var FunctionType = class extends TypeBuilder { + constructor() { + super(...arguments); + this.needsParenthesisWhenIndexed = true; + this.needsParenthesisInKeyof = true; + this.needsParenthesisInUnion = true; + this.returnType = voidType; + this.parameters = []; + this.genericParameters = []; + } + setReturnType(returnType) { + this.returnType = returnType; + return this; + } + addParameter(param) { + this.parameters.push(param); + return this; + } + addGenericParameter(param) { + this.genericParameters.push(param); + return this; + } + write(writer) { + if (this.genericParameters.length > 0) { + writer.write("<").writeJoined(", ", this.genericParameters).write(">"); + } + writer.write("(").writeJoined(", ", this.parameters).write(") => ").write(this.returnType); + } +}; +function functionType() { + return new FunctionType(); +} + +// src/generation/ts-builders/NamedType.ts +init_TypeBuilder(); +var NamedType = class extends TypeBuilder { + constructor(name) { + super(); + this.name = name; + this.genericArguments = []; + } + addGenericArgument(type) { + this.genericArguments.push(type); + return this; + } + write(writer) { + writer.write(this.name); + if (this.genericArguments.length > 0) { + writer.write("<").writeJoined(", ", this.genericArguments).write(">"); + } + } +}; +function namedType(name) { + return new NamedType(name); +} + +// src/generation/ts-builders/GenericParameter.ts +var GenericParameter = class { + constructor(name) { + this.name = name; + } + extends(type) { + this.extendedType = type; + return this; + } + default(type) { + this.defaultType = type; + return this; + } + toArgument() { + return new NamedType(this.name); + } + write(writer) { + writer.write(this.name); + if (this.extendedType) { + writer.write(" extends ").write(this.extendedType); + } + if (this.defaultType) { + writer.write(" = ").write(this.defaultType); + } + } +}; +function genericParameter(name) { + return new GenericParameter(name); +} + +// src/generation/ts-builders/helpers.ts +function omit(type, keyType2) { + return namedType("Omit").addGenericArgument(type).addGenericArgument(keyType2); +} +function promise(resultType) { + return new NamedType("$Utils.JsPromise").addGenericArgument(resultType); +} +function prismaPromise(resultType) { + return new NamedType("Prisma.PrismaPromise").addGenericArgument(resultType); +} +function optional(innerType) { + return new NamedType("$Utils.Optional").addGenericArgument(innerType); +} + +// src/generation/ts-builders/Import.ts +var NamespaceImport = class { + constructor(alias, from) { + this.alias = alias; + this.from = from; + } + write(writer) { + writer.write("import * as ").write(this.alias).write(` from "${this.from}"`); + } +}; +var BindingsImport = class { + constructor(from) { + this.from = from; + this.namedImports = []; + } + default(name) { + this.defaultImport = name; + return this; + } + named(namedImport) { + if (typeof namedImport === "string") { + namedImport = new NamedImport(namedImport); + } + this.namedImports.push(namedImport); + return this; + } + write(writer) { + writer.write("import "); + if (this.defaultImport) { + writer.write(this.defaultImport); + if (this.hasNamedImports()) { + writer.write(", "); + } + } + if (this.hasNamedImports()) { + writer.write("{ ").writeJoined(", ", this.namedImports).write(" }"); + } + writer.write(` from "${this.from}"`); + } + hasNamedImports() { + return this.namedImports.length > 0; + } +}; +var NamedImport = class { + constructor(name) { + this.name = name; + } + as(alias) { + this.alias = alias; + return this; + } + write(writer) { + writer.write(this.name); + if (this.alias) { + writer.write(" as ").write(this.alias); + } + } +}; +var ModuleImport = class { + constructor(from) { + this.from = from; + } + asNamespace(alias) { + return new NamespaceImport(alias, this.from); + } + default(alias) { + return new BindingsImport(this.from).default(alias); + } + named(namedImport) { + return new BindingsImport(this.from).named(namedImport); + } + write(writer) { + writer.write("import ").write(`"${this.from}"`); + } +}; +function moduleImport(from) { + return new ModuleImport(from); +} + +// src/generation/ts-builders/Interface.ts +init_TypeBuilder(); +var InterfaceDeclaration = class extends TypeBuilder { + constructor(name) { + super(); + this.name = name; + this.needsParenthesisWhenIndexed = true; + this.items = []; + this.genericParameters = []; + this.extendedTypes = []; + } + add(item) { + this.items.push(item); + return this; + } + addMultiple(items) { + for (const item of items) { + this.add(item); + } + return this; + } + addGenericParameter(param) { + this.genericParameters.push(param); + return this; + } + extends(type) { + this.extendedTypes.push(type); + return this; + } + write(writer) { + writer.write("interface ").write(this.name); + if (this.genericParameters.length > 0) { + writer.write("<").writeJoined(", ", this.genericParameters).write(">"); + } + if (this.extendedTypes.length > 0) { + writer.write(" extends ").writeJoined(", ", this.extendedTypes); + } + if (this.items.length === 0) { + writer.writeLine(" {}"); + return; + } + writer.writeLine(" {").withIndent(() => { + for (const item of this.items) { + writer.writeLine(item); + } + }).write("}"); + } +}; +function interfaceDeclaration(name) { + return new InterfaceDeclaration(name); +} + +// src/generation/ts-builders/Method.ts +var Method = class { + constructor(name) { + this.name = name; + this.returnType = voidType; + this.parameters = []; + this.genericParameters = []; + } + setDocComment(docComment2) { + this.docComment = docComment2; + return this; + } + setReturnType(returnType) { + this.returnType = returnType; + return this; + } + addParameter(param) { + this.parameters.push(param); + return this; + } + addGenericParameter(param) { + this.genericParameters.push(param); + return this; + } + write(writer) { + if (this.docComment) { + writer.write(this.docComment); + } + writer.write(this.name); + if (this.genericParameters.length > 0) { + writer.write("<").writeJoined(", ", this.genericParameters).write(">"); + } + writer.write("("); + if (this.parameters.length > 0) { + writer.writeJoined(", ", this.parameters); + } + writer.write(")"); + if (this.name !== "constructor") { + writer.write(": ").write(this.returnType); + } + } +}; +function method(name) { + return new Method(name); +} + +// src/generation/ts-builders/NamespaceDeclaration.ts +var NamespaceDeclaration = class { + constructor(name) { + this.name = name; + this.items = []; + } + add(declaration) { + this.items.push(declaration); + } + write(writer) { + writer.writeLine(`namespace ${this.name} {`).withIndent(() => { + for (const item of this.items) { + writer.writeLine(item); + } + }).write("}"); + } +}; +function namespace(name) { + return new NamespaceDeclaration(name); +} + +// src/generation/ts-builders/ObjectType.ts +init_TypeBuilder(); +var ObjectType = class extends TypeBuilder { + constructor() { + super(...arguments); + this.needsParenthesisWhenIndexed = true; + this.items = []; + this.inline = false; + } + add(item) { + this.items.push(item); + return this; + } + addMultiple(items) { + for (const item of items) { + this.add(item); + } + return this; + } + formatInline() { + this.inline = true; + return this; + } + write(writer) { + if (this.items.length === 0) { + writer.write("{}"); + } else if (this.inline) { + this.writeInline(writer); + } else { + this.writeMultiline(writer); + } + } + writeMultiline(writer) { + writer.writeLine("{").withIndent(() => { + for (const item of this.items) { + writer.writeLine(item); + } + }).write("}"); + } + writeInline(writer) { + writer.write("{ ").writeJoined(", ", this.items).write(" }"); + } +}; +function objectType() { + return new ObjectType(); +} + +// src/generation/ts-builders/Parameter.ts +var Parameter = class { + constructor(name, type) { + this.name = name; + this.type = type; + this.isOptional = false; + } + optional() { + this.isOptional = true; + return this; + } + write(writer) { + writer.write(this.name); + if (this.isOptional) { + writer.write("?"); + } + writer.write(": ").write(this.type); + } +}; +function parameter(name, type) { + return new Parameter(name, type); +} + +// src/generation/ts-builders/Property.ts +var Property = class { + constructor(name, type) { + this.name = name; + this.type = type; + this.isOptional = false; + this.isReadonly = false; + } + optional() { + this.isOptional = true; + return this; + } + readonly() { + this.isReadonly = true; + return this; + } + setDocComment(docComment2) { + this.docComment = docComment2; + return this; + } + write(writer) { + if (this.docComment) { + writer.write(this.docComment); + } + if (this.isReadonly) { + writer.write("readonly "); + } + if (typeof this.name === "string") { + if (isValidJsIdentifier(this.name)) { + writer.write(this.name); + } else { + writer.write("[").write(JSON.stringify(this.name)).write("]"); + } + } else { + writer.write("[").write(this.name).write("]"); + } + if (this.isOptional) { + writer.write("?"); + } + writer.write(": ").write(this.type); + } +}; +function property(name, type) { + return new Property(name, type); +} + +// src/generation/ts-builders/Writer.ts +var INDENT_SIZE = 2; +var Writer = class { + constructor(startingIndent = 0, context) { + this.context = context; + this.lines = []; + this.currentLine = ""; + this.currentIndent = 0; + this.currentIndent = startingIndent; + } + /** + * Adds provided value to the current line. Does not end the line. + * + * @param value + * @returns + */ + write(value) { + if (typeof value === "string") { + this.currentLine += value; + } else { + value.write(this); + } + return this; + } + /** + * Adds several `values` to the current line, separated by `separator`. Both values and separator + * can also be `Builder` instances for more advanced formatting. + * + * @param separator + * @param values + * @param writeItem allow to customize how individual item is written + * @returns + */ + writeJoined(separator, values, writeItem = (item, w) => w.write(item)) { + const last = values.length - 1; + for (let i = 0; i < values.length; i++) { + writeItem(values[i], this); + if (i !== last) { + this.write(separator); + } + } + return this; + } + /** + * Adds a string to current line, flushes current line and starts a new line. + * @param line + * @returns + */ + writeLine(line) { + return this.write(line).newLine(); + } + /** + * Flushes current line and starts a new line. New line starts at previously configured indentation level + * @returns + */ + newLine() { + this.lines.push(this.indentedCurrentLine()); + this.currentLine = ""; + this.marginSymbol = void 0; + const afterNextNewLineCallback = this.afterNextNewLineCallback; + this.afterNextNewLineCallback = void 0; + afterNextNewLineCallback?.(); + return this; + } + /** + * Increases indentation level by 1, calls provided callback and then decreases indentation again. + * Could be used for writing indented blocks of text: + * + * @example + * ```ts + * writer + * .writeLine('{') + * .withIndent(() => { + * writer.writeLine('foo: 123'); + * writer.writeLine('bar: 456'); + * }) + * .writeLine('}') + * ``` + * @param callback + * @returns + */ + withIndent(callback) { + this.indent(); + callback(this); + this.unindent(); + return this; + } + /** + * Calls provided callback next time when new line is started. + * Callback is called after old line have already been flushed and a new + * line have been started. Can be used for adding "between the lines" decorations, + * such as underlines. + * + * @param callback + * @returns + */ + afterNextNewline(callback) { + this.afterNextNewLineCallback = callback; + return this; + } + /** + * Increases indentation level of the current line by 1 + * @returns + */ + indent() { + this.currentIndent++; + return this; + } + /** + * Decreases indentation level of the current line by 1, if it is possible + * @returns + */ + unindent() { + if (this.currentIndent > 0) { + this.currentIndent--; + } + return this; + } + /** + * Adds a symbol, that will replace the first character of the current line (including indentation) + * when it is flushed. Can be used for adding markers to the line. + * + * Note: if indentation level of the line is 0, it will replace the first actually printed character + * of the line. Use with caution. + * @param symbol + * @returns + */ + addMarginSymbol(symbol) { + this.marginSymbol = symbol; + return this; + } + toString() { + return this.lines.concat(this.indentedCurrentLine()).join("\n"); + } + getCurrentLineLength() { + return this.currentLine.length; + } + indentedCurrentLine() { + const line = this.currentLine.padStart(this.currentLine.length + INDENT_SIZE * this.currentIndent); + if (this.marginSymbol) { + return this.marginSymbol + line.slice(1); + } + return line; + } +}; + +// src/generation/ts-builders/stringify.ts +function stringify(builder, { indentLevel = 0, newLine = "none" } = {}) { + const str = new Writer(indentLevel, void 0).write(builder).toString(); + switch (newLine) { + case "none": + return str; + case "leading": + return "\n" + str; + case "trailing": + return str + "\n"; + case "both": + return "\n" + str + "\n"; + default: + assertNever(newLine, "Unexpected value"); + } +} + +// src/generation/ts-builders/StringLiteralType.ts +init_TypeBuilder(); +var StringLiteralType = class extends TypeBuilder { + constructor(content) { + super(); + this.content = content; + } + write(writer) { + writer.write(JSON.stringify(this.content)); + } +}; +function stringLiteral(content) { + return new StringLiteralType(content); +} + +// src/generation/ts-builders/TupleType.ts +init_TypeBuilder(); +var TupleItem = class { + constructor(type) { + this.type = type; + } + setName(name) { + this.name = name; + return this; + } + write(writer) { + if (this.name) { + writer.write(this.name).write(": "); + } + writer.write(this.type); + } +}; +var TupleType = class extends TypeBuilder { + constructor() { + super(...arguments); + this.items = []; + } + add(item) { + if (item instanceof TypeBuilder) { + item = new TupleItem(item); + } + this.items.push(item); + return this; + } + write(writer) { + writer.write("[").writeJoined(", ", this.items).write("]"); + } +}; +function tupleType() { + return new TupleType(); +} +function tupleItem(type) { + return new TupleItem(type); +} + +// src/generation/ts-builders/TypeDeclaration.ts +var TypeDeclaration = class { + constructor(name, type) { + this.name = name; + this.type = type; + this.genericParameters = []; + } + addGenericParameter(param) { + this.genericParameters.push(param); + return this; + } + setName(name) { + this.name = name; + return this; + } + setDocComment(docComment2) { + this.docComment = docComment2; + return this; + } + write(writer) { + if (this.docComment) { + writer.write(this.docComment); + } + writer.write("type ").write(this.name); + if (this.genericParameters.length > 0) { + writer.write("<").writeJoined(", ", this.genericParameters).write(">"); + } + writer.write(" = ").write(this.type); + } +}; +function typeDeclaration(name, type) { + return new TypeDeclaration(name, type); +} + +// src/generation/ts-builders/UnionType.ts +init_TypeBuilder(); +var UnionType = class extends TypeBuilder { + constructor(firstType) { + super(); + this.needsParenthesisWhenIndexed = true; + this.needsParenthesisInKeyof = true; + this.variants = [firstType]; + } + addVariant(variant) { + this.variants.push(variant); + return this; + } + addVariants(variants) { + for (const variant of variants) { + this.addVariant(variant); + } + return this; + } + write(writer) { + writer.writeJoined(" | ", this.variants, (variant, writer2) => { + if (variant.needsParenthesisInUnion) { + writer2.write("(").write(variant).write(")"); + } else { + writer2.write(variant); + } + }); + } + mapVariants(callback) { + return unionType(this.variants.map((v) => callback(v))); + } +}; +function unionType(types) { + if (Array.isArray(types)) { + if (types.length === 0) { + throw new TypeError("Union types array can not be empty"); + } + const union = new UnionType(types[0]); + for (let i = 1; i < types.length; i++) { + union.addVariant(types[i]); + } + return union; + } + return new UnionType(types); +} + +// src/generation/ts-builders/WellKnownSymbol.ts +var WellKnownSymbol = class { + constructor(name) { + this.name = name; + } + write(writer) { + writer.write("Symbol.").write(this.name); + } +}; +function wellKnownSymbol(name) { + return new WellKnownSymbol(name); +} +var toStringTag = wellKnownSymbol("toStringTag"); + +// src/generation/utils.ts +function getSelectName(modelName) { + return `${modelName}Select`; +} +function getSelectCreateManyAndReturnName(modelName) { + return `${modelName}SelectCreateManyAndReturn`; +} +function getIncludeName(modelName) { + return `${modelName}Include`; +} +function getIncludeCreateManyAndReturnName(modelName) { + return `${modelName}IncludeCreateManyAndReturn`; +} +function getCreateManyAndReturnOutputType(modelName) { + return `CreateMany${modelName}AndReturnOutputType`; +} +function getOmitName(modelName) { + return `${modelName}Omit`; +} +function getAggregateName(modelName) { + return `Aggregate${capitalize2(modelName)}`; +} +function getGroupByName(modelName) { + return `${capitalize2(modelName)}GroupByOutputType`; +} +function getAvgAggregateName(modelName) { + return `${capitalize2(modelName)}AvgAggregateOutputType`; +} +function getSumAggregateName(modelName) { + return `${capitalize2(modelName)}SumAggregateOutputType`; +} +function getMinAggregateName(modelName) { + return `${capitalize2(modelName)}MinAggregateOutputType`; +} +function getMaxAggregateName(modelName) { + return `${capitalize2(modelName)}MaxAggregateOutputType`; +} +function getCountAggregateInputName(modelName) { + return `${capitalize2(modelName)}CountAggregateInputType`; +} +function getCountAggregateOutputName(modelName) { + return `${capitalize2(modelName)}CountAggregateOutputType`; +} +function getAggregateInputType(aggregateOutputType) { + return aggregateOutputType.replace(/OutputType$/, "InputType"); +} +function getGroupByArgsName(modelName) { + return `${modelName}GroupByArgs`; +} +function getGroupByPayloadName(modelName) { + return `Get${capitalize2(modelName)}GroupByPayload`; +} +function getAggregateArgsName(modelName) { + return `${capitalize2(modelName)}AggregateArgs`; +} +function getAggregateGetName(modelName) { + return `Get${capitalize2(modelName)}AggregateType`; +} +function getFieldArgName(field, modelName) { + if (field.args.length) { + return getModelFieldArgsName(field, modelName); + } + return getModelArgName(field.outputType.type); +} +function getModelFieldArgsName(field, modelName) { + return `${modelName}$${field.name}Args`; +} +function getLegacyModelArgName(modelName) { + return `${modelName}Args`; +} +function getModelArgName(modelName, action) { + if (!action) { + return `${modelName}DefaultArgs`; + } + switch (action) { + case DMMF.ModelAction.findMany: + return `${modelName}FindManyArgs`; + case DMMF.ModelAction.findUnique: + return `${modelName}FindUniqueArgs`; + case DMMF.ModelAction.findUniqueOrThrow: + return `${modelName}FindUniqueOrThrowArgs`; + case DMMF.ModelAction.findFirst: + return `${modelName}FindFirstArgs`; + case DMMF.ModelAction.findFirstOrThrow: + return `${modelName}FindFirstOrThrowArgs`; + case DMMF.ModelAction.upsert: + return `${modelName}UpsertArgs`; + case DMMF.ModelAction.update: + return `${modelName}UpdateArgs`; + case DMMF.ModelAction.updateMany: + return `${modelName}UpdateManyArgs`; + case DMMF.ModelAction.delete: + return `${modelName}DeleteArgs`; + case DMMF.ModelAction.create: + return `${modelName}CreateArgs`; + case DMMF.ModelAction.createMany: + return `${modelName}CreateManyArgs`; + case DMMF.ModelAction.createManyAndReturn: + return `${modelName}CreateManyAndReturnArgs`; + case DMMF.ModelAction.deleteMany: + return `${modelName}DeleteManyArgs`; + case DMMF.ModelAction.groupBy: + return getGroupByArgsName(modelName); + case DMMF.ModelAction.aggregate: + return getAggregateArgsName(modelName); + case DMMF.ModelAction.count: + return `${modelName}CountArgs`; + case DMMF.ModelAction.findRaw: + return `${modelName}FindRawArgs`; + case DMMF.ModelAction.aggregateRaw: + return `${modelName}AggregateRawArgs`; + default: + assertNever(action, `Unknown action: ${action}`); + } +} +function getPayloadName(modelName, namespace2 = true) { + if (namespace2) { + return `Prisma.${getPayloadName(modelName, false)}`; + } + return `$${modelName}Payload`; +} +function getFieldRefsTypeName(name) { + return `${name}FieldRefs`; +} +function capitalize2(str) { + return str[0].toUpperCase() + str.slice(1); +} +function getRefAllowedTypeName(type) { + let typeName = type.type; + if (type.isList) { + typeName += "[]"; + } + return `'${typeName}'`; +} +function appendSkipType(context, type) { + if (context.isPreviewFeatureOn("strictUndefinedChecks")) { + return unionType([type, namedType("$Types.Skip")]); + } + return type; +} +var extArgsParam = genericParameter("ExtArgs").extends(namedType("$Extensions.InternalArgs")).default(namedType("$Extensions.DefaultArgs")); + +// src/generation/TSClient/Input.ts +var InputField = class { + constructor(field, context, source) { + this.field = field; + this.context = context; + this.source = source; + } + toTS() { + const property2 = buildInputField(this.field, this.context, this.source); + return stringify(property2); + } +}; +function buildInputField(field, context, source) { + const tsType = buildAllFieldTypes(field.inputTypes, context, source); + const tsProperty = property(field.name, field.isRequired ? tsType : appendSkipType(context, tsType)); + if (!field.isRequired) { + tsProperty.optional(); + } + const docComment2 = docComment(); + if (field.comment) { + docComment2.addText(field.comment); + } + if (field.deprecation) { + docComment2.addText(`@deprecated since ${field.deprecation.sinceVersion}: ${field.deprecation.reason}`); + } + if (docComment2.lines.length > 0) { + tsProperty.setDocComment(docComment2); + } + return tsProperty; +} +function buildSingleFieldType(t, genericsInfo, source) { + let type; + const scalarType = GraphQLScalarToJSTypeTable[t.type]; + if (t.location === "enumTypes" && t.namespace === "model") { + type = namedType(`$Enums.${t.type}`); + } else if (t.type === "Null") { + return nullType; + } else if (Array.isArray(scalarType)) { + const union = unionType(scalarType.map(namedInputType)); + if (t.isList) { + return union.mapVariants((variant) => array(variant)); + } + return union; + } else { + type = namedInputType(scalarType ?? t.type); + } + if (genericsInfo.typeRefNeedsGenericModelArg(t)) { + if (source) { + type.addGenericArgument(stringLiteral(source)); + } else { + type.addGenericArgument(namedType("$PrismaModel")); + } + } + if (t.isList) { + return array(type); + } + return type; +} +function namedInputType(typeName) { + return namedType(JSOutputTypeToInputType[typeName] ?? typeName); +} +function buildAllFieldTypes(inputTypes, context, source) { + const inputObjectTypes = inputTypes.filter((t) => t.location === "inputObjectTypes" && !t.isList); + const otherTypes = inputTypes.filter((t) => t.location !== "inputObjectTypes" || t.isList); + const tsInputObjectTypes = inputObjectTypes.map((type) => buildSingleFieldType(type, context.genericArgsInfo, source)); + const tsOtherTypes = otherTypes.map((type) => buildSingleFieldType(type, context.genericArgsInfo, source)); + if (tsOtherTypes.length === 0) { + return xorTypes(tsInputObjectTypes); + } + if (tsInputObjectTypes.length === 0) { + return unionType(tsOtherTypes); + } + return unionType(xorTypes(tsInputObjectTypes)).addVariants(tsOtherTypes); +} +function xorTypes(types) { + return types.reduce((prev, curr) => namedType("XOR").addGenericArgument(prev).addGenericArgument(curr)); +} +var InputType = class { + constructor(type, context) { + this.type = type; + this.context = context; + this.generatedName = type.name; + } + toTS() { + const { type } = this; + const source = type.meta?.source; + const fields = uniqueBy(type.fields, (f) => f.name); + const body = `{ +${(0, import_indent_string2.default)( + fields.map((arg) => { + return new InputField(arg, this.context, source).toTS(); + }).join("\n"), + TAB_SIZE + )} +}`; + return ` +export type ${this.getTypeName()} = ${wrapWithAtLeast(body, type)}`; + } + overrideName(name) { + this.generatedName = name; + return this; + } + getTypeName() { + if (this.context.genericArgsInfo.typeNeedsGenericModelArg(this.type)) { + return `${this.generatedName}<$PrismaModel = never>`; + } + return this.generatedName; + } +}; +function wrapWithAtLeast(body, input) { + if (input.constraints?.fields && input.constraints.fields.length > 0) { + const fields = input.constraints.fields.map((f) => `"${f}"`).join(" | "); + return `Prisma.AtLeast<${body}, ${fields}>`; + } + return body; +} + +// src/generation/TSClient/Model.ts +var import_indent_string3 = __toESM(require_indent_string()); + +// ../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/dist/index.mjs +function klona(x) { + if (typeof x !== "object") return x; + var k, tmp, str = Object.prototype.toString.call(x); + if (str === "[object Object]") { + if (x.constructor !== Object && typeof x.constructor === "function") { + tmp = new x.constructor(); + for (k in x) { + if (x.hasOwnProperty(k) && tmp[k] !== x[k]) { + tmp[k] = klona(x[k]); + } + } + } else { + tmp = {}; + for (k in x) { + if (k === "__proto__") { + Object.defineProperty(tmp, k, { + value: klona(x[k]), + configurable: true, + enumerable: true, + writable: true + }); + } else { + tmp[k] = klona(x[k]); + } + } + } + return tmp; + } + if (str === "[object Array]") { + k = x.length; + for (tmp = Array(k); k--; ) { + tmp[k] = klona(x[k]); + } + return tmp; + } + if (str === "[object Set]") { + tmp = /* @__PURE__ */ new Set(); + x.forEach(function(val) { + tmp.add(klona(val)); + }); + return tmp; + } + if (str === "[object Map]") { + tmp = /* @__PURE__ */ new Map(); + x.forEach(function(val, key) { + tmp.set(klona(key), klona(val)); + }); + return tmp; + } + if (str === "[object Date]") { + return /* @__PURE__ */ new Date(+x); + } + if (str === "[object RegExp]") { + tmp = new RegExp(x.source, x.flags); + tmp.lastIndex = x.lastIndex; + return tmp; + } + if (str === "[object DataView]") { + return new x.constructor(klona(x.buffer)); + } + if (str === "[object ArrayBuffer]") { + return x.slice(0); + } + if (str.slice(-6) === "Array]") { + return new x.constructor(x); + } + return x; +} + +// src/generation/TSClient/helpers.ts +var import_pluralize2 = __toESM(require_pluralize()); + +// src/generation/TSClient/jsdoc.ts +var Docs = { + cursor: `{@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}`, + pagination: `{@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}`, + aggregations: `{@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}`, + distinct: `{@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}`, + sorting: `{@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}` +}; +function addLinkToDocs(comment, docs) { + return `${Docs[docs]} + +${comment}`; +} +function getDeprecationString(since, replacement) { + return `@deprecated since ${since} please use \`${replacement}\``; +} +var undefinedNote = `Note, that providing \`undefined\` is treated as the value not being there. +Read more here: https://pris.ly/d/null-undefined`; +var JSDocFields = { + take: (singular, plural) => addLinkToDocs(`Take \`\xB1n\` ${plural} from the position of the cursor.`, "pagination"), + skip: (singular, plural) => addLinkToDocs(`Skip the first \`n\` ${plural}.`, "pagination"), + _count: (singular, plural) => addLinkToDocs(`Count returned ${plural}`, "aggregations"), + _avg: () => addLinkToDocs(`Select which fields to average`, "aggregations"), + _sum: () => addLinkToDocs(`Select which fields to sum`, "aggregations"), + _min: () => addLinkToDocs(`Select which fields to find the minimum value`, "aggregations"), + _max: () => addLinkToDocs(`Select which fields to find the maximum value`, "aggregations"), + count: () => getDeprecationString("2.23.0", "_count"), + avg: () => getDeprecationString("2.23.0", "_avg"), + sum: () => getDeprecationString("2.23.0", "_sum"), + min: () => getDeprecationString("2.23.0", "_min"), + max: () => getDeprecationString("2.23.0", "_max"), + distinct: (singular, plural) => addLinkToDocs(`Filter by unique combinations of ${plural}.`, "distinct"), + orderBy: (singular, plural) => addLinkToDocs(`Determine the order of ${plural} to fetch.`, "sorting") +}; +var JSDocs = { + groupBy: { + body: (ctx) => `Group by ${ctx.singular}. +${undefinedNote} +@param {${getGroupByArgsName(ctx.model.name)}} args - Group by arguments. +@example +// Group by city, order by createdAt, get count +const result = await prisma.user.groupBy({ + by: ['city', 'createdAt'], + orderBy: { + createdAt: true + }, + _count: { + _all: true + }, +}) +`, + fields: {} + }, + create: { + body: (ctx) => `Create a ${ctx.singular}. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to create a ${ctx.singular}. +@example +// Create one ${ctx.singular} +const ${ctx.singular} = await ${ctx.method}({ + data: { + // ... data to create a ${ctx.singular} + } +}) +`, + fields: { + data: (singular) => `The data needed to create a ${singular}.` + } + }, + createMany: { + body: (ctx) => `Create many ${ctx.plural}. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to create many ${ctx.plural}. +@example +// Create many ${ctx.plural} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + data: [ + // ... provide data here + ] +}) + `, + fields: { + data: (singular, plural) => `The data used to create many ${plural}.` + } + }, + createManyAndReturn: { + body: (ctx) => { + const onlySelect = ctx.firstScalar ? ` +// Create many ${ctx.plural} and only return the \`${ctx.firstScalar.name}\` +const ${lowerCase(ctx.mapping.model)}With${capitalize(ctx.firstScalar.name)}Only = await ${ctx.method}({ + select: { ${ctx.firstScalar.name}: true }, + data: [ + // ... provide data here + ] +})` : ""; + return `Create many ${ctx.plural} and returns the data saved in the database. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to create many ${ctx.plural}. +@example +// Create many ${ctx.plural} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + data: [ + // ... provide data here + ] +}) +${onlySelect} +${undefinedNote} +`; + }, + fields: { + data: (singular, plural) => `The data used to create many ${plural}.` + } + }, + findUnique: { + body: (ctx) => `Find zero or one ${ctx.singular} that matches the filter. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to find a ${ctx.singular} +@example +// Get one ${ctx.singular} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + where: { + // ... provide filter here + } +})`, + fields: { + where: (singular) => `Filter, which ${singular} to fetch.` + } + }, + findUniqueOrThrow: { + body: (ctx) => `Find one ${ctx.singular} that matches the filter or throw an error with \`error.code='P2025'\` +if no matches were found. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to find a ${ctx.singular} +@example +// Get one ${ctx.singular} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + where: { + // ... provide filter here + } +})`, + fields: { + where: (singular) => `Filter, which ${singular} to fetch.` + } + }, + findFirst: { + body: (ctx) => `Find the first ${ctx.singular} that matches the filter. +${undefinedNote} +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to find a ${ctx.singular} +@example +// Get one ${ctx.singular} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + where: { + // ... provide filter here + } +})`, + fields: { + where: (singular) => `Filter, which ${singular} to fetch.`, + orderBy: JSDocFields.orderBy, + cursor: (singular, plural) => addLinkToDocs(`Sets the position for searching for ${plural}.`, "cursor"), + take: JSDocFields.take, + skip: JSDocFields.skip, + distinct: JSDocFields.distinct + } + }, + findFirstOrThrow: { + body: (ctx) => `Find the first ${ctx.singular} that matches the filter or +throw \`PrismaKnownClientError\` with \`P2025\` code if no matches were found. +${undefinedNote} +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to find a ${ctx.singular} +@example +// Get one ${ctx.singular} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + where: { + // ... provide filter here + } +})`, + fields: { + where: (singular) => `Filter, which ${singular} to fetch.`, + orderBy: JSDocFields.orderBy, + cursor: (singular, plural) => addLinkToDocs(`Sets the position for searching for ${plural}.`, "cursor"), + take: JSDocFields.take, + skip: JSDocFields.skip, + distinct: JSDocFields.distinct + } + }, + findMany: { + body: (ctx) => { + const onlySelect = ctx.firstScalar ? ` +// Only select the \`${ctx.firstScalar.name}\` +const ${lowerCase(ctx.mapping.model)}With${capitalize(ctx.firstScalar.name)}Only = await ${ctx.method}({ select: { ${ctx.firstScalar.name}: true } })` : ""; + return `Find zero or more ${ctx.plural} that matches the filter. +${undefinedNote} +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to filter and select certain fields only. +@example +// Get all ${ctx.plural} +const ${ctx.mapping.plural} = await ${ctx.method}() + +// Get first 10 ${ctx.plural} +const ${ctx.mapping.plural} = await ${ctx.method}({ take: 10 }) +${onlySelect} +`; + }, + fields: { + where: (singular, plural) => `Filter, which ${plural} to fetch.`, + orderBy: JSDocFields.orderBy, + skip: JSDocFields.skip, + cursor: (singular, plural) => addLinkToDocs(`Sets the position for listing ${plural}.`, "cursor"), + take: JSDocFields.take + } + }, + update: { + body: (ctx) => `Update one ${ctx.singular}. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to update one ${ctx.singular}. +@example +// Update one ${ctx.singular} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + where: { + // ... provide filter here + }, + data: { + // ... provide data here + } +}) +`, + fields: { + data: (singular) => `The data needed to update a ${singular}.`, + where: (singular) => `Choose, which ${singular} to update.` + } + }, + upsert: { + body: (ctx) => `Create or update one ${ctx.singular}. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to update or create a ${ctx.singular}. +@example +// Update or create a ${ctx.singular} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + create: { + // ... data to create a ${ctx.singular} + }, + update: { + // ... in case it already exists, update + }, + where: { + // ... the filter for the ${ctx.singular} we want to update + } +})`, + fields: { + where: (singular) => `The filter to search for the ${singular} to update in case it exists.`, + create: (singular) => `In case the ${singular} found by the \`where\` argument doesn't exist, create a new ${singular} with this data.`, + update: (singular) => `In case the ${singular} was found with the provided \`where\` argument, update it with this data.` + } + }, + delete: { + body: (ctx) => `Delete a ${ctx.singular}. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to delete one ${ctx.singular}. +@example +// Delete one ${ctx.singular} +const ${ctx.singular} = await ${ctx.method}({ + where: { + // ... filter to delete one ${ctx.singular} + } +}) +`, + fields: { + where: (singular) => `Filter which ${singular} to delete.` + } + }, + aggregate: { + body: (ctx) => `Allows you to perform aggregations operations on a ${ctx.singular}. +${undefinedNote} +@param {${getModelArgName( + ctx.model.name, + ctx.action + )}} args - Select which aggregations you would like to apply and on what fields. +@example +// Ordered by age ascending +// Where email contains prisma.io +// Limited to the 10 users +const aggregations = await prisma.user.aggregate({ + _avg: { + age: true, + }, + where: { + email: { + contains: "prisma.io", + }, + }, + orderBy: { + age: "asc", + }, + take: 10, +})`, + fields: { + where: (singular) => `Filter which ${singular} to aggregate.`, + orderBy: JSDocFields.orderBy, + cursor: () => addLinkToDocs(`Sets the start position`, "cursor"), + take: JSDocFields.take, + skip: JSDocFields.skip, + _count: JSDocFields._count, + _avg: JSDocFields._avg, + _sum: JSDocFields._sum, + _min: JSDocFields._min, + _max: JSDocFields._max, + count: JSDocFields.count, + avg: JSDocFields.avg, + sum: JSDocFields.sum, + min: JSDocFields.min, + max: JSDocFields.max + } + }, + count: { + body: (ctx) => `Count the number of ${ctx.plural}. +${undefinedNote} +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to filter ${ctx.plural} to count. +@example +// Count the number of ${ctx.plural} +const count = await ${ctx.method}({ + where: { + // ... the filter for the ${ctx.plural} we want to count + } +})`, + fields: {} + }, + updateMany: { + body: (ctx) => `Update zero or more ${ctx.plural}. +${undefinedNote} +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to update one or more rows. +@example +// Update many ${ctx.plural} +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + where: { + // ... provide filter here + }, + data: { + // ... provide data here + } +}) +`, + fields: { + data: (singular, plural) => `The data used to update ${plural}.`, + where: (singular, plural) => `Filter which ${plural} to update` + } + }, + deleteMany: { + body: (ctx) => `Delete zero or more ${ctx.plural}. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to filter ${ctx.plural} to delete. +@example +// Delete a few ${ctx.plural} +const { count } = await ${ctx.method}({ + where: { + // ... provide filter here + } +}) +`, + fields: { + where: (singular, plural) => `Filter which ${plural} to delete` + } + }, + aggregateRaw: { + body: (ctx) => `Perform aggregation operations on a ${ctx.singular}. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Select which aggregations you would like to apply. +@example +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + pipeline: [ + { $match: { status: "registered" } }, + { $group: { _id: "$country", total: { $sum: 1 } } } + ] +})`, + fields: { + pipeline: () => "An array of aggregation stages to process and transform the document stream via the aggregation pipeline. ${@link https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline MongoDB Docs}.", + options: () => "Additional options to pass to the `aggregate` command ${@link https://docs.mongodb.com/manual/reference/command/aggregate/#command-fields MongoDB Docs}." + } + }, + findRaw: { + body: (ctx) => `Find zero or more ${ctx.plural} that matches the filter. +@param {${getModelArgName(ctx.model.name, ctx.action)}} args - Select which filters you would like to apply. +@example +const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({ + filter: { age: { $gt: 25 } } +})`, + fields: { + filter: () => "The query predicate filter. If unspecified, then all documents in the collection will match the predicate. ${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}.", + options: () => "Additional options to pass to the `find` command ${@link https://docs.mongodb.com/manual/reference/command/find/#command-fields MongoDB Docs}." + } + } +}; + +// src/generation/TSClient/helpers.ts +function getMethodJSDocBody(action, mapping, model) { + const ctx = { + singular: capitalize(mapping.model), + plural: capitalize(mapping.plural), + firstScalar: model.fields.find((f) => f.kind === "scalar"), + method: `prisma.${lowerCase(mapping.model)}.${action}`, + action, + mapping, + model + }; + const jsdoc = JSDocs[action]?.body(ctx); + return jsdoc ? jsdoc : ""; +} +function getMethodJSDoc(action, mapping, model) { + return wrapComment(getMethodJSDocBody(action, mapping, model)); +} +function wrapComment(str) { + return `/** +${str.split("\n").map((l) => " * " + l).join("\n")} +**/`; +} +function getArgFieldJSDoc(type, action, field) { + if (!field || !action || !type) return; + const fieldName = typeof field === "string" ? field : field.name; + if (JSDocs[action] && JSDocs[action]?.fields[fieldName]) { + const singular = type.name; + const plural = (0, import_pluralize2.default)(type.name); + const comment = JSDocs[action]?.fields[fieldName](singular, plural); + return comment; + } + return void 0; +} +function escapeJson(str) { + return str.replace(/\\n/g, "\\\\n").replace(/\\r/g, "\\\\r").replace(/\\t/g, "\\\\t"); +} + +// src/generation/TSClient/Args.ts +var ArgsTypeBuilder = class { + constructor(type, context, action) { + this.type = type; + this.context = context; + this.action = action; + this.hasDefaultName = true; + this.moduleExport = moduleExport( + typeDeclaration(getModelArgName(type.name, action), objectType()).addGenericParameter(extArgsParam) + ).setDocComment(docComment(`${type.name} ${action ?? "without action"}`)); + } + addProperty(prop) { + this.moduleExport.declaration.type.add(prop); + } + addSchemaArgs(args) { + for (const arg of args) { + const inputField = buildInputField(arg, this.context); + const docComment2 = getArgFieldJSDoc(this.type, this.action, arg); + if (docComment2) { + inputField.setDocComment(docComment(docComment2)); + } + this.addProperty(inputField); + } + return this; + } + addSelectArg(selectTypeName = getSelectName(this.type.name)) { + this.addProperty( + property( + "select", + unionType([namedType(selectTypeName).addGenericArgument(extArgsParam.toArgument()), nullType]) + ).optional().setDocComment(docComment(`Select specific fields to fetch from the ${this.type.name}`)) + ); + return this; + } + addIncludeArgIfHasRelations(includeTypeName = getIncludeName(this.type.name), type = this.type) { + const hasRelationField = type.fields.some((f) => f.outputType.location === "outputObjectTypes"); + if (!hasRelationField) { + return this; + } + this.addProperty( + property( + "include", + unionType([namedType(includeTypeName).addGenericArgument(extArgsParam.toArgument()), nullType]) + ).optional().setDocComment(docComment("Choose, which related nodes to fetch as well")) + ); + return this; + } + addOmitArg() { + if (!this.context.isPreviewFeatureOn("omitApi")) { + return this; + } + this.addProperty( + property( + "omit", + unionType([ + namedType(getOmitName(this.type.name)).addGenericArgument(extArgsParam.toArgument()), + nullType + ]) + ).optional().setDocComment(docComment(`Omit specific fields from the ${this.type.name}`)) + ); + return this; + } + setGeneratedName(name) { + this.hasDefaultName = false; + this.moduleExport.declaration.setName(name); + return this; + } + setComment(comment) { + this.moduleExport.setDocComment(docComment(comment)); + return this; + } + createExport() { + if (!this.action && this.hasDefaultName) { + this.context.defaultArgsAliases.addPossibleAlias( + getModelArgName(this.type.name), + getLegacyModelArgName(this.type.name) + ); + } + this.context.defaultArgsAliases.registerArgName(this.moduleExport.declaration.name); + return this.moduleExport; + } +}; + +// src/generation/TSClient/ModelFieldRefs.ts +var ModelFieldRefs = class { + constructor(outputType) { + this.outputType = outputType; + } + toTS() { + const { name } = this.outputType; + return ` + +/** + * Fields of the ${name} model + */ +interface ${getFieldRefsTypeName(name)} { +${this.stringifyFields()} +} + `; + } + stringifyFields() { + const { name } = this.outputType; + return this.outputType.fields.filter((field) => field.outputType.location !== "outputObjectTypes").map((field) => { + const fieldOutput = field.outputType; + const refTypeName = getRefAllowedTypeName(fieldOutput); + return ` readonly ${field.name}: FieldRef<"${name}", ${refTypeName}>`; + }).join("\n"); + } +}; + +// src/generation/TSClient/Output.ts +function buildModelOutputProperty(field, dmmf) { + let fieldTypeName = hasOwnProperty(GraphQLScalarToJSTypeTable, field.type) ? GraphQLScalarToJSTypeTable[field.type] : field.type; + if (Array.isArray(fieldTypeName)) { + fieldTypeName = fieldTypeName[0]; + } + if (needsNamespace(field)) { + fieldTypeName = `Prisma.${fieldTypeName}`; + } + let fieldType; + if (field.kind === "object") { + const payloadType = namedType(getPayloadName(field.type)); + if (!dmmf.isComposite(field.type)) { + payloadType.addGenericArgument(namedType("ExtArgs")); + } + fieldType = payloadType; + } else if (field.kind === "enum") { + fieldType = namedType(`$Enums.${fieldTypeName}`); + } else { + fieldType = namedType(fieldTypeName); + } + if (field.isList) { + fieldType = array(fieldType); + } else if (!field.isRequired) { + fieldType = unionType(fieldType).addVariant(nullType); + } + const property2 = property(field.name, fieldType); + if (field.documentation) { + property2.setDocComment(docComment(field.documentation)); + } + return property2; +} +function buildOutputType(type) { + return moduleExport(typeDeclaration(type.name, objectType().addMultiple(type.fields.map(buildOutputField)))); +} +function buildOutputField(field) { + let fieldType; + if (field.outputType.location === "enumTypes" && field.outputType.namespace === "model") { + fieldType = namedType(enumTypeName(field.outputType)); + } else { + const typeNames = GraphQLScalarToJSTypeTable[field.outputType.type] ?? field.outputType.type; + fieldType = Array.isArray(typeNames) ? namedType(typeNames[0]) : namedType(typeNames); + } + if (field.outputType.isList) { + fieldType = array(fieldType); + } else if (field.isNullable) { + fieldType = unionType(fieldType).addVariant(nullType); + } + const property2 = property(field.name, fieldType); + if (field.deprecation) { + property2.setDocComment( + docComment(`@deprecated since ${field.deprecation.sinceVersion} because ${field.deprecation.reason}`) + ); + } + return property2; +} +function enumTypeName(ref) { + const name = ref.type; + const namespace2 = ref.namespace === "model" ? "$Enums" : "Prisma"; + return `${namespace2}.${name}`; +} + +// src/generation/TSClient/Payload.ts +function buildModelPayload(model, context) { + const isComposite = context.dmmf.isComposite(model.name); + const objects = objectType(); + const scalars = objectType(); + const composites = objectType(); + for (const field of model.fields) { + if (field.kind === "object") { + if (context.dmmf.isComposite(field.type)) { + composites.add(buildModelOutputProperty(field, context.dmmf)); + } else { + objects.add(buildModelOutputProperty(field, context.dmmf)); + } + } else if (field.kind === "enum" || field.kind === "scalar") { + scalars.add(buildModelOutputProperty(field, context.dmmf)); + } + } + const scalarsType = isComposite ? scalars : namedType("$Extensions.GetPayloadResult").addGenericArgument(scalars).addGenericArgument(namedType("ExtArgs").subKey("result").subKey(lowerCase(model.name))); + const payloadTypeDeclaration = typeDeclaration( + getPayloadName(model.name, false), + objectType().add(property("name", stringLiteral(model.name))).add(property("objects", objects)).add(property("scalars", scalarsType)).add(property("composites", composites)) + ); + if (!isComposite) { + payloadTypeDeclaration.addGenericParameter(extArgsParam); + } + return moduleExport(payloadTypeDeclaration); +} + +// src/generation/TSClient/SelectIncludeOmit.ts +function buildIncludeType({ + modelName, + typeName = getIncludeName(modelName), + context, + fields +}) { + const type = buildSelectOrIncludeObject(modelName, getIncludeFields(fields, context.dmmf), context); + return buildExport(typeName, type); +} +function buildOmitType({ modelName, fields, context }) { + const keysType = unionType( + fields.filter( + (field) => field.outputType.location === "scalar" || field.outputType.location === "enumTypes" || context.dmmf.isComposite(field.outputType.type) + ).map((field) => stringLiteral(field.name)) + ); + const omitType = namedType("$Extensions.GetOmit").addGenericArgument(keysType).addGenericArgument(modelResultExtensionsType(modelName)); + if (context.isPreviewFeatureOn("strictUndefinedChecks")) { + omitType.addGenericArgument(namedType("$Types.Skip")); + } + return buildExport(getOmitName(modelName), omitType); +} +function buildSelectType({ + modelName, + typeName = getSelectName(modelName), + fields, + context +}) { + const objectType2 = buildSelectOrIncludeObject(modelName, fields, context); + const selectType = namedType("$Extensions.GetSelect").addGenericArgument(objectType2).addGenericArgument(modelResultExtensionsType(modelName)); + return buildExport(typeName, selectType); +} +function modelResultExtensionsType(modelName) { + return extArgsParam.toArgument().subKey("result").subKey(lowerCase(modelName)); +} +function buildScalarSelectType({ modelName, fields, context }) { + const object = buildSelectOrIncludeObject( + modelName, + fields.filter((field) => field.outputType.location === "scalar" || field.outputType.location === "enumTypes"), + context + ); + return moduleExport(typeDeclaration(`${getSelectName(modelName)}Scalar`, object)); +} +function buildSelectOrIncludeObject(modelName, fields, context) { + const objectType2 = objectType(); + for (const field of fields) { + const fieldType = unionType(booleanType); + if (field.outputType.location === "outputObjectTypes") { + const subSelectType = namedType(getFieldArgName(field, modelName)); + subSelectType.addGenericArgument(extArgsParam.toArgument()); + fieldType.addVariant(subSelectType); + } + objectType2.add(property(field.name, appendSkipType(context, fieldType)).optional()); + } + return objectType2; +} +function buildExport(typeName, type) { + const declaration = typeDeclaration(typeName, type); + return moduleExport(declaration.addGenericParameter(extArgsParam)); +} +function getIncludeFields(fields, dmmf) { + return fields.filter((field) => { + if (field.outputType.location !== "outputObjectTypes") { + return false; + } + return !dmmf.isComposite(field.outputType.type); + }); +} + +// src/generation/TSClient/utils/getModelActions.ts +function getModelActions(dmmf, name) { + const mapping = dmmf.mappingsMap[name] ?? { model: name, plural: `${name}s` }; + const mappingKeys = Object.keys(mapping).filter( + (key) => key !== "model" && key !== "plural" && mapping[key] + ); + if ("aggregate" in mapping) { + mappingKeys.push("count"); + } + return mappingKeys; +} + +// src/generation/TSClient/Model.ts +var Model = class { + constructor(model, context) { + this.model = model; + this.context = context; + this.dmmf = context.dmmf; + this.type = this.context.dmmf.outputTypeMap.model[model.name]; + this.createManyAndReturnType = this.context.dmmf.outputTypeMap.model[getCreateManyAndReturnOutputType(model.name)]; + this.mapping = this.context.dmmf.mappings.modelOperations.find((m) => m.model === model.name); + } + get argsTypes() { + const argsTypes = []; + for (const action of Object.keys(DMMF.ModelAction)) { + const fieldName = this.rootFieldNameForAction(action); + if (!fieldName) { + continue; + } + const field = this.dmmf.rootFieldMap[fieldName]; + if (!field) { + throw new Error(`Oops this must not happen. Could not find field ${fieldName} on either Query or Mutation`); + } + if (action === "updateMany" || action === "deleteMany" || action === "createMany" || action === "findRaw" || action === "aggregateRaw") { + argsTypes.push( + new ArgsTypeBuilder(this.type, this.context, action).addSchemaArgs(field.args).createExport() + ); + } else if (action === "createManyAndReturn") { + const args = new ArgsTypeBuilder(this.type, this.context, action).addSelectArg(getSelectCreateManyAndReturnName(this.type.name)).addOmitArg().addSchemaArgs(field.args); + if (this.createManyAndReturnType) { + args.addIncludeArgIfHasRelations( + getIncludeCreateManyAndReturnName(this.model.name), + this.createManyAndReturnType + ); + } + argsTypes.push(args.createExport()); + } else if (action !== "groupBy" && action !== "aggregate") { + argsTypes.push( + new ArgsTypeBuilder(this.type, this.context, action).addSelectArg().addOmitArg().addIncludeArgIfHasRelations().addSchemaArgs(field.args).createExport() + ); + } + } + for (const field of this.type.fields) { + if (!field.args.length) { + continue; + } + const fieldOutput = this.dmmf.resolveOutputObjectType(field.outputType); + if (!fieldOutput) { + continue; + } + argsTypes.push( + new ArgsTypeBuilder(fieldOutput, this.context).addSelectArg().addOmitArg().addIncludeArgIfHasRelations().addSchemaArgs(field.args).setGeneratedName(getModelFieldArgsName(field, this.model.name)).setComment(`${this.model.name}.${field.name}`).createExport() + ); + } + argsTypes.push( + new ArgsTypeBuilder(this.type, this.context).addSelectArg().addOmitArg().addIncludeArgIfHasRelations().createExport() + ); + return argsTypes; + } + rootFieldNameForAction(action) { + return this.mapping?.[action]; + } + getGroupByTypes() { + const { model, mapping } = this; + const groupByType = this.dmmf.outputTypeMap.prisma[getGroupByName(model.name)]; + if (!groupByType) { + throw new Error(`Could not get group by type for model ${model.name}`); + } + const groupByRootField = this.dmmf.rootFieldMap[mapping.groupBy]; + if (!groupByRootField) { + throw new Error(`Could not find groupBy root field for model ${model.name}. Mapping: ${mapping?.groupBy}`); + } + const groupByArgsName = getGroupByArgsName(model.name); + this.context.defaultArgsAliases.registerArgName(groupByArgsName); + return ` + + +export type ${groupByArgsName} = { +${(0, import_indent_string3.default)( + groupByRootField.args.map((arg) => { + const updatedArg = { ...arg, comment: getArgFieldJSDoc(this.type, DMMF.ModelAction.groupBy, arg) }; + return new InputField(updatedArg, this.context).toTS(); + }).concat( + groupByType.fields.filter((f) => f.outputType.location === "outputObjectTypes").map((f) => { + if (f.outputType.location === "outputObjectTypes") { + return `${f.name}?: ${getAggregateInputType(f.outputType.type)}${f.name === "_count" ? " | true" : ""}`; + } + return ""; + }) + ).join("\n"), + TAB_SIZE + )} +} + +${stringify(buildOutputType(groupByType))} + +type ${getGroupByPayloadName(model.name)} = Prisma.PrismaPromise< + Array< + PickEnumerable<${groupByType.name}, T['by']> & + { + [P in ((keyof T) & (keyof ${groupByType.name}))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > +`; + } + getAggregationTypes() { + const { model, mapping } = this; + let aggregateType = this.dmmf.outputTypeMap.prisma[getAggregateName(model.name)]; + if (!aggregateType) { + throw new Error(`Could not get aggregate type "${getAggregateName(model.name)}" for "${model.name}"`); + } + aggregateType = klona(aggregateType); + const aggregateRootField = this.dmmf.rootFieldMap[mapping.aggregate]; + if (!aggregateRootField) { + throw new Error(`Could not find aggregate root field for model ${model.name}. Mapping: ${mapping?.aggregate}`); + } + const aggregateTypes = [aggregateType]; + const avgType = this.dmmf.outputTypeMap.prisma[getAvgAggregateName(model.name)]; + const sumType = this.dmmf.outputTypeMap.prisma[getSumAggregateName(model.name)]; + const minType = this.dmmf.outputTypeMap.prisma[getMinAggregateName(model.name)]; + const maxType = this.dmmf.outputTypeMap.prisma[getMaxAggregateName(model.name)]; + const countType = this.dmmf.outputTypeMap.prisma[getCountAggregateOutputName(model.name)]; + if (avgType) { + aggregateTypes.push(avgType); + } + if (sumType) { + aggregateTypes.push(sumType); + } + if (minType) { + aggregateTypes.push(minType); + } + if (maxType) { + aggregateTypes.push(maxType); + } + if (countType) { + aggregateTypes.push(countType); + } + const aggregateArgsName = getAggregateArgsName(model.name); + this.context.defaultArgsAliases.registerArgName(aggregateArgsName); + const aggregateName = getAggregateName(model.name); + return `${aggregateTypes.map(buildOutputType).map((type) => stringify(type)).join("\n\n")} + +${aggregateTypes.length > 1 ? aggregateTypes.slice(1).map((type) => { + const newType = { + name: getAggregateInputType(type.name), + constraints: { + maxNumFields: null, + minNumFields: null + }, + fields: type.fields.map((field) => ({ + ...field, + name: field.name, + isNullable: false, + isRequired: false, + inputTypes: [ + { + isList: false, + location: "scalar", + type: "true" + } + ] + })) + }; + return new InputType(newType, this.context).toTS(); + }).join("\n") : ""} + +export type ${aggregateArgsName} = { +${(0, import_indent_string3.default)( + aggregateRootField.args.map((arg) => { + const updatedArg = { ...arg, comment: getArgFieldJSDoc(this.type, DMMF.ModelAction.aggregate, arg) }; + return new InputField(updatedArg, this.context).toTS(); + }).concat( + aggregateType.fields.map((f) => { + let data = ""; + const comment = getArgFieldJSDoc(this.type, DMMF.ModelAction.aggregate, f.name); + data += comment ? wrapComment(comment) + "\n" : ""; + if (f.name === "_count" || f.name === "count") { + data += `${f.name}?: true | ${getCountAggregateInputName(model.name)}`; + } else { + data += `${f.name}?: ${getAggregateInputType(f.outputType.type)}`; + } + return data; + }) + ).join("\n"), + TAB_SIZE + )} +} + +export type ${getAggregateGetName(model.name)} = { + [P in keyof T & keyof ${aggregateName}]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType +}`; + } + toTSWithoutNamespace() { + const { model } = this; + const docLines = model.documentation ?? ""; + const modelLine = `Model ${model.name} +`; + const docs = `${modelLine}${docLines}`; + const modelTypeExport = moduleExport( + typeDeclaration( + model.name, + namedType(`$Result.DefaultSelection`).addGenericArgument(namedType(getPayloadName(model.name))) + ) + ).setDocComment(docComment(docs)); + return stringify(modelTypeExport); + } + toTS() { + const { model } = this; + const isComposite = this.dmmf.isComposite(model.name); + const omitType = this.context.isPreviewFeatureOn("omitApi") ? stringify(buildOmitType({ modelName: this.model.name, context: this.context, fields: this.type.fields }), { + newLine: "leading" + }) : ""; + const hasRelationField = model.fields.some((f) => f.kind === "object"); + const includeType = hasRelationField ? stringify( + buildIncludeType({ modelName: this.model.name, context: this.context, fields: this.type.fields }), + { + newLine: "leading" + } + ) : ""; + const createManyAndReturnIncludeType = hasRelationField && this.createManyAndReturnType ? stringify( + buildIncludeType({ + typeName: getIncludeCreateManyAndReturnName(this.model.name), + modelName: this.model.name, + context: this.context, + fields: this.createManyAndReturnType.fields + }), + { + newLine: "leading" + } + ) : ""; + return ` +/** + * Model ${model.name} + */ + +${!isComposite ? this.getAggregationTypes() : ""} + +${!isComposite ? this.getGroupByTypes() : ""} + +${stringify(buildSelectType({ modelName: this.model.name, fields: this.type.fields, context: this.context }))} +${this.createManyAndReturnType ? stringify( + buildSelectType({ + modelName: this.model.name, + fields: this.createManyAndReturnType.fields, + context: this.context, + typeName: getSelectCreateManyAndReturnName(this.model.name) + }), + { newLine: "leading" } + ) : ""} +${stringify(buildScalarSelectType({ modelName: this.model.name, fields: this.type.fields, context: this.context }), { + newLine: "leading" + })} +${omitType}${includeType}${createManyAndReturnIncludeType} + +${stringify(buildModelPayload(this.model, this.context), { newLine: "none" })} + +type ${model.name}GetPayload = $Result.GetResult<${getPayloadName(model.name)}, S> + +${isComposite ? "" : new ModelDelegate(this.type, this.context).toTS()} + +${new ModelFieldRefs(this.type).toTS()} + +// Custom InputTypes +${this.argsTypes.map((type) => stringify(type)).join("\n\n")} +`; + } +}; +var ModelDelegate = class { + constructor(outputType, context) { + this.outputType = outputType; + this.context = context; + } + /** + * Returns all available non-aggregate or group actions + * Includes both dmmf and client-only actions + * + * @param availableActions + * @returns + */ + getNonAggregateActions(availableActions) { + const actions = availableActions.filter( + (key) => key !== DMMF.ModelAction.aggregate && key !== DMMF.ModelAction.groupBy && key !== DMMF.ModelAction.count + ); + return actions; + } + toTS() { + const { name } = this.outputType; + const { dmmf } = this.context; + const mapping = dmmf.mappingsMap[name] ?? { model: name, plural: `${name}s` }; + const modelOrType = dmmf.typeAndModelMap[name]; + const availableActions = getModelActions(dmmf, name); + const nonAggregateActions = this.getNonAggregateActions(availableActions); + const groupByArgsName = getGroupByArgsName(name); + const countArgsName = getModelArgName(name, DMMF.ModelAction.count); + this.context.defaultArgsAliases.registerArgName(countArgsName); + const genericDelegateParams = [extArgsParam]; + const excludedArgsForCount = ["select", "include", "distinct"]; + if (this.context.isPreviewFeatureOn("omitApi")) { + excludedArgsForCount.push("omit"); + genericDelegateParams.push(genericParameter("ClientOptions").default(objectType())); + } + if (this.context.isPreviewFeatureOn("relationJoins")) { + excludedArgsForCount.push("relationLoadStrategy"); + } + const excludedArgsForCountType = excludedArgsForCount.map((name2) => `'${name2}'`).join(" | "); + return `${availableActions.includes(DMMF.ModelAction.aggregate) ? `type ${countArgsName} = + Omit<${getModelArgName(name, DMMF.ModelAction.findMany)}, ${excludedArgsForCountType}> & { + select?: ${getCountAggregateInputName(name)} | true + } +` : ""} +export interface ${name}Delegate<${genericDelegateParams.map((param) => stringify(param)).join(", ")}> { +${(0, import_indent_string3.default)(`[K: symbol]: { types: Prisma.TypeMap['model']['${name}'], meta: { name: '${name}' } }`, TAB_SIZE)} +${nonAggregateActions.map((action) => { + const method2 = buildModelDelegateMethod(name, action, this.context); + return stringify(method2, { indentLevel: 1, newLine: "trailing" }); + }).join("\n")} + +${availableActions.includes(DMMF.ModelAction.aggregate) ? `${(0, import_indent_string3.default)(getMethodJSDoc(DMMF.ModelAction.count, mapping, modelOrType), TAB_SIZE)} + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > +` : ""} +${availableActions.includes(DMMF.ModelAction.aggregate) ? `${(0, import_indent_string3.default)(getMethodJSDoc(DMMF.ModelAction.aggregate, mapping, modelOrType), TAB_SIZE)} + aggregate(args: Subset): Prisma.PrismaPromise<${getAggregateGetName(name)}> +` : ""} +${availableActions.includes(DMMF.ModelAction.groupBy) ? `${(0, import_indent_string3.default)(getMethodJSDoc(DMMF.ModelAction.groupBy, mapping, modelOrType), TAB_SIZE)} + groupBy< + T extends ${groupByArgsName}, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: ${groupByArgsName}['orderBy'] } + : { orderBy?: ${groupByArgsName}['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? \`Error: "by" must not be empty.\` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? \`Error: Field "\${P}" used in "having" needs to be provided in "by".\` + : [ + Error, + 'Field ', + P, + \` in "having" needs to be provided in "by"\`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : \`Error: Field "\${P}" in "orderBy" needs to be provided in "by"\` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : \`Error: Field "\${P}" in "orderBy" needs to be provided in "by"\` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : \`Error: Field "\${P}" in "orderBy" needs to be provided in "by"\` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? ${getGroupByPayloadName( + name + )} : Prisma.PrismaPromise` : ""} +/** + * Fields of the ${name} model + */ +readonly fields: ${getFieldRefsTypeName(name)}; +} + +${stringify(buildFluentWrapperDefinition(name, this.outputType, this.context))} +`; + } +}; +function buildModelDelegateMethod(modelName, actionName, context) { + const mapping = context.dmmf.mappingsMap[modelName] ?? { model: modelName, plural: `${modelName}s` }; + const modelOrType = context.dmmf.typeAndModelMap[modelName]; + const method2 = method(actionName).setDocComment(docComment(getMethodJSDocBody(actionName, mapping, modelOrType))).addParameter(getNonAggregateMethodArgs(modelName, actionName)).setReturnType(getReturnType({ modelName, actionName, context })); + const generic = getNonAggregateMethodGenericParam(modelName, actionName); + if (generic) { + method2.addGenericParameter(generic); + } + return method2; +} +function getNonAggregateMethodArgs(modelName, actionName) { + getReturnType; + const makeParameter = (type2) => parameter("args", type2); + if (actionName === DMMF.ModelAction.count) { + const type2 = omit( + namedType(getModelArgName(modelName, DMMF.ModelAction.findMany)), + unionType(stringLiteral("select")).addVariant(stringLiteral("include")).addVariant(stringLiteral("distinct")) + ); + return makeParameter(type2).optional(); + } + if (actionName === DMMF.ModelAction.findRaw || actionName === DMMF.ModelAction.aggregateRaw) { + return makeParameter(namedType(getModelArgName(modelName, actionName))).optional(); + } + const type = namedType("SelectSubset").addGenericArgument(namedType("T")).addGenericArgument( + namedType(getModelArgName(modelName, actionName)).addGenericArgument(extArgsParam.toArgument()) + ); + const param = makeParameter(type); + if (actionName === DMMF.ModelAction.findMany || actionName === DMMF.ModelAction.findFirst || actionName === DMMF.ModelAction.deleteMany || actionName === DMMF.ModelAction.createMany || actionName === DMMF.ModelAction.createManyAndReturn || actionName === DMMF.ModelAction.findFirstOrThrow) { + param.optional(); + } + return param; +} +function getNonAggregateMethodGenericParam(modelName, actionName) { + if (actionName === DMMF.ModelAction.count || actionName === DMMF.ModelAction.findRaw || actionName === DMMF.ModelAction.aggregateRaw) { + return null; + } + const arg = genericParameter("T"); + if (actionName === DMMF.ModelAction.aggregate) { + return arg.extends(namedType(getAggregateArgsName(modelName))); + } + return arg.extends(namedType(getModelArgName(modelName, actionName))); +} +function getReturnType({ + modelName, + actionName, + context, + isChaining = false, + isNullable = false +}) { + if (actionName === DMMF.ModelAction.count) { + return promise(numberType); + } + if (actionName === DMMF.ModelAction.aggregate) { + return promise(namedType(getAggregateGetName(modelName)).addGenericArgument(namedType("T"))); + } + if (actionName === DMMF.ModelAction.findRaw || actionName === DMMF.ModelAction.aggregateRaw) { + return prismaPromise(namedType("JsonObject")); + } + if (actionName === DMMF.ModelAction.deleteMany || actionName === DMMF.ModelAction.updateMany || actionName === DMMF.ModelAction.createMany) { + return prismaPromise(namedType("BatchPayload")); + } + const isList = actionName === DMMF.ModelAction.findMany || actionName === DMMF.ModelAction.createManyAndReturn; + if (isList) { + let result = getResultType(modelName, actionName, context); + if (isChaining) { + result = unionType(result).addVariant(namedType("Null")); + } + return prismaPromise(result); + } + if (isChaining && actionName === DMMF.ModelAction.findUniqueOrThrow) { + const nullType2 = isNullable ? nullType : namedType("Null"); + const result = unionType(getResultType(modelName, actionName, context)).addVariant(nullType2); + return getFluentWrapper(modelName, context, result, nullType2); + } + if (actionName === DMMF.ModelAction.findFirst || actionName === DMMF.ModelAction.findUnique) { + const result = unionType(getResultType(modelName, actionName, context)).addVariant(nullType); + return getFluentWrapper(modelName, context, result, nullType); + } + return getFluentWrapper(modelName, context, getResultType(modelName, actionName, context)); +} +function getFluentWrapper(modelName, context, resultType, nullType2 = neverType) { + const result = namedType(fluentWrapperName(modelName)).addGenericArgument(resultType).addGenericArgument(nullType2).addGenericArgument(extArgsParam.toArgument()); + if (context.isPreviewFeatureOn("omitApi")) { + result.addGenericArgument(namedType("ClientOptions")); + } + return result; +} +function getResultType(modelName, actionName, context) { + const result = namedType("$Result.GetResult").addGenericArgument(namedType(getPayloadName(modelName)).addGenericArgument(extArgsParam.toArgument())).addGenericArgument(namedType("T")).addGenericArgument(stringLiteral(actionName)); + if (context.isPreviewFeatureOn("omitApi")) { + result.addGenericArgument(namedType("ClientOptions")); + } + return result; +} +function buildFluentWrapperDefinition(modelName, outputType, context) { + const definition = interfaceDeclaration(fluentWrapperName(modelName)); + definition.addGenericParameter(genericParameter("T")).addGenericParameter(genericParameter("Null").default(neverType)).addGenericParameter(extArgsParam).extends(prismaPromise(namedType("T"))); + if (context.isPreviewFeatureOn("omitApi")) { + definition.addGenericParameter(genericParameter("ClientOptions").default(objectType())); + } + definition.add(property(toStringTag, stringLiteral("PrismaPromise")).readonly()); + definition.addMultiple( + outputType.fields.filter( + (field) => field.outputType.location === "outputObjectTypes" && !context.dmmf.isComposite(field.outputType.type) && field.name !== "_count" + ).map((field) => { + const fieldArgType = namedType(getFieldArgName(field, modelName)).addGenericArgument(extArgsParam.toArgument()); + const argsParam = genericParameter("T").extends(fieldArgType).default(objectType()); + return method(field.name).addGenericParameter(argsParam).addParameter(parameter("args", subset(argsParam.toArgument(), fieldArgType)).optional()).setReturnType( + getReturnType({ + modelName: field.outputType.type, + actionName: field.outputType.isList ? DMMF.ModelAction.findMany : DMMF.ModelAction.findUniqueOrThrow, + isChaining: true, + context, + isNullable: field.isNullable + }) + ); + }) + ); + definition.add( + method("then").setDocComment( + docComment` + Attaches callbacks for the resolution and/or rejection of the Promise. + @param onfulfilled The callback to execute when the Promise is resolved. + @param onrejected The callback to execute when the Promise is rejected. + @returns A Promise for the completion of which ever callback is executed. + ` + ).addGenericParameter(genericParameter("TResult1").default(namedType("T"))).addGenericParameter(genericParameter("TResult2").default(neverType)).addParameter(promiseCallback("onfulfilled", parameter("value", namedType("T")), namedType("TResult1"))).addParameter(promiseCallback("onrejected", parameter("reason", anyType), namedType("TResult2"))).setReturnType(promise(unionType([namedType("TResult1"), namedType("TResult2")]))) + ); + definition.add( + method("catch").setDocComment( + docComment` + Attaches a callback for only the rejection of the Promise. + @param onrejected The callback to execute when the Promise is rejected. + @returns A Promise for the completion of the callback. + ` + ).addGenericParameter(genericParameter("TResult").default(neverType)).addParameter(promiseCallback("onrejected", parameter("reason", anyType), namedType("TResult"))).setReturnType(promise(unionType([namedType("T"), namedType("TResult")]))) + ); + definition.add( + method("finally").setDocComment( + docComment` + Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + resolved value cannot be modified from the callback. + @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + @returns A Promise for the completion of the callback. + ` + ).addParameter( + parameter("onfinally", unionType([functionType(), undefinedType, nullType])).optional() + ).setReturnType(promise(namedType("T"))) + ); + return moduleExport(definition).setDocComment(docComment` + The delegate class that acts as a "Promise-like" for ${modelName}. + Why is this prefixed with \`Prisma__\`? + Because we want to prevent naming conflicts as mentioned in + https://github.com/prisma/prisma-client-js/issues/707 + `); +} +function promiseCallback(name, callbackParam, returnType) { + return parameter( + name, + unionType([ + functionType().addParameter(callbackParam).setReturnType(typeOrPromiseLike(returnType)), + undefinedType, + nullType + ]) + ).optional(); +} +function typeOrPromiseLike(type) { + return unionType([type, namedType("PromiseLike").addGenericArgument(type)]); +} +function subset(arg, baseType) { + return namedType("Subset").addGenericArgument(arg).addGenericArgument(baseType); +} +function fluentWrapperName(modelName) { + return `Prisma__${modelName}Client`; +} + +// src/generation/TSClient/TSClient.ts +var import_ci_info = __toESM(require_ci_info()); +var import_crypto = __toESM(require("crypto")); +var import_indent_string8 = __toESM(require_indent_string()); +var import_path4 = __toESM(require("path")); + +// src/generation/dmmf.ts +var DMMFHelper = class { + constructor(document) { + this.document = document; + } + get compositeNames() { + return this._compositeNames ??= new Set(this.datamodel.types.map((t) => t.name)); + } + get inputTypesByName() { + return this._inputTypesByName ??= this.buildInputTypesMap(); + } + get typeAndModelMap() { + return this._typeAndModelMap ??= this.buildTypeModelMap(); + } + get mappingsMap() { + return this._mappingsMap ??= this.buildMappingsMap(); + } + get outputTypeMap() { + return this._outputTypeMap ??= this.buildMergedOutputTypeMap(); + } + get rootFieldMap() { + return this._rootFieldMap ??= this.buildRootFieldMap(); + } + get datamodel() { + return this.document.datamodel; + } + get mappings() { + return this.document.mappings; + } + get schema() { + return this.document.schema; + } + get inputObjectTypes() { + return this.schema.inputObjectTypes; + } + get outputObjectTypes() { + return this.schema.outputObjectTypes; + } + isComposite(modelOrTypeName) { + return this.compositeNames.has(modelOrTypeName); + } + getOtherOperationNames() { + return [ + Object.values(this.mappings.otherOperations.write), + Object.values(this.mappings.otherOperations.read) + ].flat(); + } + hasEnumInNamespace(enumName, namespace2) { + return this.schema.enumTypes[namespace2]?.find((schemaEnum) => schemaEnum.name === enumName) !== void 0; + } + resolveInputObjectType(ref) { + return this.inputTypesByName.get(fullyQualifiedName(ref.type, ref.namespace)); + } + resolveOutputObjectType(ref) { + if (ref.location !== "outputObjectTypes") { + return void 0; + } + return this.outputObjectTypes[ref.namespace ?? "prisma"].find((outputObject) => outputObject.name === ref.type); + } + buildModelMap() { + return keyBy(this.datamodel.models, "name"); + } + buildTypeMap() { + return keyBy(this.datamodel.types, "name"); + } + buildTypeModelMap() { + return { ...this.buildTypeMap(), ...this.buildModelMap() }; + } + buildMappingsMap() { + return keyBy(this.mappings.modelOperations, "model"); + } + buildMergedOutputTypeMap() { + if (!this.schema.outputObjectTypes.prisma) { + return { + model: keyBy(this.schema.outputObjectTypes.model, "name"), + prisma: keyBy([], "name") + }; + } + return { + model: keyBy(this.schema.outputObjectTypes.model, "name"), + prisma: keyBy(this.schema.outputObjectTypes.prisma, "name") + }; + } + buildRootFieldMap() { + return { + ...keyBy(this.outputTypeMap.prisma.Query.fields, "name"), + ...keyBy(this.outputTypeMap.prisma.Mutation.fields, "name") + }; + } + buildInputTypesMap() { + const result = /* @__PURE__ */ new Map(); + for (const type of this.inputObjectTypes.prisma) { + result.set(fullyQualifiedName(type.name, "prisma"), type); + } + if (!this.inputObjectTypes.model) { + return result; + } + for (const type of this.inputObjectTypes.model) { + result.set(fullyQualifiedName(type.name, "model"), type); + } + return result; + } +}; +function fullyQualifiedName(typeName, namespace2) { + if (namespace2) { + return `${namespace2}.${typeName}`; + } + return typeName; +} + +// src/generation/Cache.ts +var Cache = class { + constructor() { + this._map = /* @__PURE__ */ new Map(); + } + get(key) { + return this._map.get(key)?.value; + } + set(key, value) { + this._map.set(key, { value }); + } + getOrCreate(key, create) { + const cached = this._map.get(key); + if (cached) { + return cached.value; + } + const value = create(); + this.set(key, value); + return value; + } +}; + +// src/generation/GenericsArgsInfo.ts +var GenericArgsInfo = class { + constructor(_dmmf) { + this._dmmf = _dmmf; + this._cache = new Cache(); + } + /** + * Determines if arg types need generic <$PrismaModel> argument added. + * Essentially, performs breadth-first search for any fieldRefTypes that + * do not have corresponding `meta.source` defined. + * + * @param type + * @returns + */ + typeNeedsGenericModelArg(topLevelType) { + return this._cache.getOrCreate(topLevelType, () => { + const toVisit = [{ type: topLevelType }]; + const visited = /* @__PURE__ */ new Set(); + let item; + while (item = toVisit.shift()) { + const { type: currentType } = item; + const cached = this._cache.get(currentType); + if (cached === true) { + this._cacheResultsForTree(item); + return true; + } + if (cached === false) { + continue; + } + if (visited.has(currentType)) { + continue; + } + if (currentType.meta?.source) { + this._cache.set(currentType, false); + continue; + } + visited.add(currentType); + for (const field of currentType.fields) { + for (const fieldType of field.inputTypes) { + if (fieldType.location === "fieldRefTypes") { + this._cacheResultsForTree(item); + return true; + } + const inputObject = this._dmmf.resolveInputObjectType(fieldType); + if (inputObject) { + toVisit.push({ type: inputObject, parent: item }); + } + } + } + } + for (const visitedType of visited) { + this._cache.set(visitedType, false); + } + return false; + }); + } + typeRefNeedsGenericModelArg(ref) { + if (ref.location === "fieldRefTypes") { + return true; + } + const inputType = this._dmmf.resolveInputObjectType(ref); + if (!inputType) { + return false; + } + return this.typeNeedsGenericModelArg(inputType); + } + _cacheResultsForTree(item) { + let currentItem = item; + while (currentItem) { + this._cache.set(currentItem.type, true); + currentItem = currentItem.parent; + } + } +}; + +// src/generation/utils/buildInjectableEdgeEnv.ts +function buildInjectableEdgeEnv(edge, datasources) { + if (edge === true) { + return declareInjectableEdgeEnv(datasources); + } + return ``; +} +function declareInjectableEdgeEnv(datasources) { + const injectableEdgeEnv = { parsed: {} }; + const envVarNames = getSelectedEnvVarNames(datasources); + for (const envVarName of envVarNames) { + injectableEdgeEnv.parsed[envVarName] = getRuntimeEdgeEnvVar(envVarName); + } + const injectableEdgeEnvJson = JSON.stringify(injectableEdgeEnv, null, 2); + const injectableEdgeEnvCode = injectableEdgeEnvJson.replace(/"/g, ""); + return ` +config.injectableEdgeEnv = () => (${injectableEdgeEnvCode})`; +} +function getSelectedEnvVarNames(datasources) { + return datasources.reduce((acc, datasource) => { + if (datasource.url.fromEnvVar) { + return [...acc, datasource.url.fromEnvVar]; + } + return acc; + }, []); +} +function getRuntimeEdgeEnvVar(envVarName) { + const cfwEnv = `typeof globalThis !== 'undefined' && globalThis['${envVarName}']`; + const nodeOrVercelEnv = `typeof process !== 'undefined' && process.env && process.env.${envVarName}`; + return `${cfwEnv} || ${nodeOrVercelEnv} || undefined`; +} + +// src/generation/utils/buildDebugInitialization.ts +function buildDebugInitialization(edge) { + if (!edge) { + return ""; + } + const debugVar = getRuntimeEdgeEnvVar("DEBUG"); + return `if (${debugVar}) { + Debug.enable(${debugVar}) +} +`; +} + +// src/generation/utils/buildDirname.ts +function buildDirname(edge, relativeOutdir) { + if (edge === true) { + return buildDirnameDefault(); + } + return buildDirnameFind(relativeOutdir); +} +function buildDirnameFind(relativeOutdir) { + return ` +const fs = require('fs') + +config.dirname = __dirname +if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { + const alternativePaths = [ + ${JSON.stringify(pathToPosix(relativeOutdir))}, + ${JSON.stringify(pathToPosix(relativeOutdir).split("/").slice(1).join("/"))}, + ] + + const alternativePath = alternativePaths.find((altPath) => { + return fs.existsSync(path.join(process.cwd(), altPath, 'schema.prisma')) + }) ?? alternativePaths[0] + + config.dirname = path.join(process.cwd(), alternativePath) + config.isBundled = true +}`; +} +function buildDirnameDefault() { + return `config.dirname = '/'`; +} + +// src/runtime/core/runtimeDataModel.ts +function dmmfToRuntimeDataModel(dmmfDataModel) { + return { + models: buildMapForRuntime(dmmfDataModel.models), + enums: buildMapForRuntime(dmmfDataModel.enums), + types: buildMapForRuntime(dmmfDataModel.types) + }; +} +function pruneRuntimeDataModel({ models }) { + const prunedModels = {}; + for (const modelName of Object.keys(models)) { + prunedModels[modelName] = { fields: [], dbName: models[modelName].dbName }; + for (const { name, kind, type, relationName, dbName } of models[modelName].fields) { + prunedModels[modelName].fields.push({ name, kind, type, relationName, dbName }); + } + } + return { models: prunedModels, enums: {}, types: {} }; +} +function buildMapForRuntime(list) { + const result = {}; + for (const { name, ...rest } of list) { + result[name] = rest; + } + return result; +} + +// src/generation/utils/buildDMMF.ts +function buildRuntimeDataModel(datamodel, runtimeNameJs) { + const runtimeDataModel = dmmfToRuntimeDataModel(datamodel); + let prunedDataModel; + if (runtimeNameJs === "wasm") { + prunedDataModel = pruneRuntimeDataModel(runtimeDataModel); + } else { + prunedDataModel = runtimeDataModel; + } + const datamodelString = escapeJson(JSON.stringify(prunedDataModel)); + return ` +config.runtimeDataModel = JSON.parse(${JSON.stringify(datamodelString)}) +defineDmmfProperty(exports.Prisma, config.runtimeDataModel)`; +} + +// src/generation/utils/buildGetQueryEngineWasmModule.ts +function buildQueryEngineWasmModule(wasm, copyEngine, runtimeNameJs) { + if (copyEngine && runtimeNameJs === "library" && process.env.PRISMA_CLIENT_FORCE_WASM) { + return `config.engineWasm = { + getRuntime: () => require('./query_engine_bg.js'), + getQueryEngineWasmModule: async () => { + const queryEngineWasmFilePath = require('path').join(config.dirname, 'query_engine_bg.wasm') + const queryEngineWasmFileBytes = require('fs').readFileSync(queryEngineWasmFilePath) + + return new WebAssembly.Module(queryEngineWasmFileBytes) + } + }`; + } + if (copyEngine && wasm === true) { + return `config.engineWasm = { + getRuntime: () => require('./query_engine_bg.js'), + getQueryEngineWasmModule: async () => { + const loader = (await import('#wasm-engine-loader')).default + const engine = (await loader).default + return engine + } +}`; + } + return `config.engineWasm = undefined`; +} + +// src/generation/utils/buildNFTAnnotations.ts +var import_path3 = __toESM(require("path")); + +// ../../helpers/blaze/map.ts +function mapList(object, mapper) { + const mapped = new Array(object.length); + for (let i = 0; i < object.length; ++i) { + mapped[i] = mapper(object[i], i); + } + return mapped; +} +function mapObject(object, mapper) { + const mapped = {}; + const keys = Object.keys(object); + for (let i = 0; i < keys.length; ++i) { + mapped[i] = mapper(object[keys[i]], keys[i]); + } + return mapped; +} +var map = (object, mapper) => { + return Array.isArray(object) ? mapList(object, mapper) : mapObject(object, mapper); +}; + +// src/generation/utils/buildNFTAnnotations.ts +function buildNFTAnnotations(noEngine, engineType, binaryTargets, relativeOutdir) { + if (noEngine === true) return ""; + if (binaryTargets === void 0) { + return ""; + } + if (process.env.NETLIFY) { + const isNodeMajor20OrUp = parseInt(process.versions.node.split(".")[0]) >= 20; + const awsRuntimeVersion = parseAWSNodejsRuntimeEnvVarVersion(); + const isRuntimeEnvVar20OrUp = awsRuntimeVersion && awsRuntimeVersion >= 20; + const isRuntimeEnvVar18OrDown = awsRuntimeVersion && awsRuntimeVersion <= 18; + if ((isNodeMajor20OrUp || isRuntimeEnvVar20OrUp) && !isRuntimeEnvVar18OrDown) { + binaryTargets = ["rhel-openssl-3.0.x"]; + } else { + binaryTargets = ["rhel-openssl-1.0.x"]; + } + } + const engineAnnotations = map(binaryTargets, (binaryTarget) => { + const engineFilename = getQueryEngineFilename(engineType, binaryTarget); + return engineFilename ? buildNFTAnnotation(engineFilename, relativeOutdir) : ""; + }).join("\n"); + const schemaAnnotations = buildNFTAnnotation("schema.prisma", relativeOutdir); + return `${engineAnnotations}${schemaAnnotations}`; +} +function getQueryEngineFilename(engineType, binaryTarget) { + if (engineType === "library" /* Library */) { + return getNodeAPIName(binaryTarget, "fs"); + } + if (engineType === "binary" /* Binary */) { + return `query-engine-${binaryTarget}`; + } + return void 0; +} +function buildNFTAnnotation(fileName, relativeOutdir) { + const relativeFilePath = import_path3.default.join(relativeOutdir, fileName); + return ` +// file annotations for bundling tools to include these files +path.join(__dirname, ${JSON.stringify(pathToPosix(fileName))}); +path.join(process.cwd(), ${JSON.stringify(pathToPosix(relativeFilePath))})`; +} + +// src/generation/utils/buildRequirePath.ts +function buildRequirePath(edge) { + if (edge === true) return ""; + return ` + const path = require('path')`; +} + +// src/generation/utils/buildWarnEnvConflicts.ts +function buildWarnEnvConflicts(edge, runtimeBase, runtimeNameJs) { + if (edge === true) return ""; + return ` +const { warnEnvConflicts } = require('${runtimeBase}/${runtimeNameJs}.js') + +warnEnvConflicts({ + rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath), + schemaEnvPath: config.relativeEnvPaths.schemaEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.schemaEnvPath) +})`; +} + +// src/generation/TSClient/common.ts +var import_indent_string4 = __toESM(require_indent_string()); +var commonCodeJS = ({ + runtimeBase, + runtimeNameJs, + browser, + clientVersion: clientVersion2, + engineVersion, + generator, + deno +}) => `${deno ? "const exports = {}" : ""} +Object.defineProperty(exports, "__esModule", { value: true }); +${deno ? ` +import { + PrismaClientKnownRequestError, + PrismaClientUnknownRequestError, + PrismaClientRustPanicError, + PrismaClientInitializationError, + PrismaClientValidationError, + NotFoundError, + getPrismaClient, + sqltag, + empty, + join, + raw, + Decimal, + Debug, + objectEnumValues, + makeStrictEnum, + Extensions, + defineDmmfProperty, + Public, + getRuntime, + skip +} from '${runtimeBase}/${runtimeNameJs}.js'` : browser ? ` +const { + Decimal, + objectEnumValues, + makeStrictEnum, + Public, + getRuntime, + skip +} = require('${runtimeBase}/${runtimeNameJs}.js') +` : ` +const { + PrismaClientKnownRequestError, + PrismaClientUnknownRequestError, + PrismaClientRustPanicError, + PrismaClientInitializationError, + PrismaClientValidationError, + NotFoundError, + getPrismaClient, + sqltag, + empty, + join, + raw, + skip, + Decimal, + Debug, + objectEnumValues, + makeStrictEnum, + Extensions, + warnOnce, + defineDmmfProperty, + Public, + getRuntime +} = require('${runtimeBase}/${runtimeNameJs}.js') +`} + +const Prisma = {} + +exports.Prisma = Prisma +exports.$Enums = {} + +/** + * Prisma Client JS version: ${clientVersion2} + * Query Engine version: ${engineVersion} + */ +Prisma.prismaVersion = { + client: "${clientVersion2}", + engine: "${engineVersion}" +} + +Prisma.PrismaClientKnownRequestError = ${notSupportOnBrowser("PrismaClientKnownRequestError", browser)}; +Prisma.PrismaClientUnknownRequestError = ${notSupportOnBrowser("PrismaClientUnknownRequestError", browser)} +Prisma.PrismaClientRustPanicError = ${notSupportOnBrowser("PrismaClientRustPanicError", browser)} +Prisma.PrismaClientInitializationError = ${notSupportOnBrowser("PrismaClientInitializationError", browser)} +Prisma.PrismaClientValidationError = ${notSupportOnBrowser("PrismaClientValidationError", browser)} +Prisma.NotFoundError = ${notSupportOnBrowser("NotFoundError", browser)} +Prisma.Decimal = Decimal + +/** + * Re-export of sql-template-tag + */ +Prisma.sql = ${notSupportOnBrowser("sqltag", browser)} +Prisma.empty = ${notSupportOnBrowser("empty", browser)} +Prisma.join = ${notSupportOnBrowser("join", browser)} +Prisma.raw = ${notSupportOnBrowser("raw", browser)} +Prisma.validator = Public.validator + +/** +* Extensions +*/ +Prisma.getExtensionContext = ${notSupportOnBrowser("Extensions.getExtensionContext", browser)} +Prisma.defineExtension = ${notSupportOnBrowser("Extensions.defineExtension", browser)} + +/** + * Shorthand utilities for JSON filtering + */ +Prisma.DbNull = objectEnumValues.instances.DbNull +Prisma.JsonNull = objectEnumValues.instances.JsonNull +Prisma.AnyNull = objectEnumValues.instances.AnyNull + +Prisma.NullTypes = { + DbNull: objectEnumValues.classes.DbNull, + JsonNull: objectEnumValues.classes.JsonNull, + AnyNull: objectEnumValues.classes.AnyNull +} + +${buildPrismaSkipJs(generator.previewFeatures)} +`; +var notSupportOnBrowser = (fnc, browser) => { + if (browser) { + return `() => { + const runtimeName = getRuntime().prettyName; + throw new Error(\`${fnc} is unable to run in this browser environment, or has been bundled for the browser (running in \${runtimeName}). +In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report\`, +)}`; + } + return fnc; +}; +var commonCodeTS = ({ + runtimeBase, + runtimeNameTs, + clientVersion: clientVersion2, + engineVersion, + generator +}) => ({ + tsWithoutNamespace: () => `import * as runtime from '${runtimeBase}/${runtimeNameTs}'; +import $Types = runtime.Types // general types +import $Public = runtime.Types.Public +import $Utils = runtime.Types.Utils +import $Extensions = runtime.Types.Extensions +import $Result = runtime.Types.Result + +export type PrismaPromise = $Public.PrismaPromise +`, + ts: () => `export import DMMF = runtime.DMMF + +export type PrismaPromise = $Public.PrismaPromise + +/** + * Validator + */ +export import validator = runtime.Public.validator + +/** + * Prisma Errors + */ +export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError +export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError +export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError +export import PrismaClientInitializationError = runtime.PrismaClientInitializationError +export import PrismaClientValidationError = runtime.PrismaClientValidationError +export import NotFoundError = runtime.NotFoundError + +/** + * Re-export of sql-template-tag + */ +export import sql = runtime.sqltag +export import empty = runtime.empty +export import join = runtime.join +export import raw = runtime.raw +export import Sql = runtime.Sql + +${buildPrismaSkipTs(generator.previewFeatures)} + +/** + * Decimal.js + */ +export import Decimal = runtime.Decimal + +export type DecimalJsLike = runtime.DecimalJsLike + +/** + * Metrics + */ +export type Metrics = runtime.Metrics +export type Metric = runtime.Metric +export type MetricHistogram = runtime.MetricHistogram +export type MetricHistogramBucket = runtime.MetricHistogramBucket + +/** +* Extensions +*/ +export import Extension = $Extensions.UserArgs +export import getExtensionContext = runtime.Extensions.getExtensionContext +export import Args = $Public.Args +export import Payload = $Public.Payload +export import Result = $Public.Result +export import Exact = $Public.Exact + +/** + * Prisma Client JS version: ${clientVersion2} + * Query Engine version: ${engineVersion} + */ +export type PrismaVersion = { + client: string +} + +export const prismaVersion: PrismaVersion + +/** + * Utility Types + */ + + +export import JsonObject = runtime.JsonObject +export import JsonArray = runtime.JsonArray +export import JsonValue = runtime.JsonValue +export import InputJsonObject = runtime.InputJsonObject +export import InputJsonArray = runtime.InputJsonArray +export import InputJsonValue = runtime.InputJsonValue + +/** + * Types of the values used to represent different kinds of \`null\` values when working with JSON fields. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +namespace NullTypes { +${buildNullClass("DbNull")} + +${buildNullClass("JsonNull")} + +${buildNullClass("AnyNull")} +} + +/** + * Helper for filtering JSON entries that have \`null\` on the database (empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const DbNull: NullTypes.DbNull + +/** + * Helper for filtering JSON entries that have JSON \`null\` values (not empty on the db) + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const JsonNull: NullTypes.JsonNull + +/** + * Helper for filtering JSON entries that are \`Prisma.DbNull\` or \`Prisma.JsonNull\` + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field + */ +export const AnyNull: NullTypes.AnyNull + +type SelectAndInclude = { + select: any + include: any +} + +type SelectAndOmit = { + select: any + omit: any +} + +/** + * Get the type of the value, that the Promise holds. + */ +export type PromiseType> = T extends PromiseLike ? U : T; + +/** + * Get the return type of a function which returns a Promise. + */ +export type PromiseReturnType $Utils.JsPromise> = PromiseType> + +/** + * From T, pick a set of properties whose keys are in the union K + */ +type Prisma__Pick = { + [P in K]: T[P]; +}; + + +export type Enumerable = T | Array; + +export type RequiredKeys = { + [K in keyof T]-?: {} extends Prisma__Pick ? never : K +}[keyof T] + +export type TruthyKeys = keyof { + [K in keyof T as T[K] extends false | undefined | null ? never : K]: K +} + +export type TrueKeys = TruthyKeys>> + +/** + * Subset + * @desc From \`T\` pick properties that exist in \`U\`. Simple version of Intersection + */ +export type Subset = { + [key in keyof T]: key extends keyof U ? T[key] : never; +}; + +/** + * SelectSubset + * @desc From \`T\` pick properties that exist in \`U\`. Simple version of Intersection. + * Additionally, it validates, if both select and include are present. If the case, it errors. + */ +export type SelectSubset = { + [key in keyof T]: key extends keyof U ? T[key] : never +} & + (T extends SelectAndInclude + ? 'Please either choose \`select\` or \`include\`.' + : T extends SelectAndOmit + ? 'Please either choose \`select\` or \`omit\`.' + : {}) + +/** + * Subset + Intersection + * @desc From \`T\` pick properties that exist in \`U\` and intersect \`K\` + */ +export type SubsetIntersection = { + [key in keyof T]: key extends keyof U ? T[key] : never +} & + K + +type Without = { [P in Exclude]?: never }; + +/** + * XOR is needed to have a real mutually exclusive union type + * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types + */ +type XOR = + T extends object ? + U extends object ? + (Without & U) | (Without & T) + : U : T + + +/** + * Is T a Record? + */ +type IsObject = T extends Array +? False +: T extends Date +? False +: T extends Uint8Array +? False +: T extends BigInt +? False +: T extends object +? True +: False + + +/** + * If it's T[], return T + */ +export type UnEnumerate = T extends Array ? U : T + +/** + * From ts-toolbelt + */ + +type __Either = Omit & + { + // Merge all but K + [P in K]: Prisma__Pick // With K possibilities + }[K] + +type EitherStrict = Strict<__Either> + +type EitherLoose = ComputeRaw<__Either> + +type _Either< + O extends object, + K extends Key, + strict extends Boolean +> = { + 1: EitherStrict + 0: EitherLoose +}[strict] + +type Either< + O extends object, + K extends Key, + strict extends Boolean = 1 +> = O extends unknown ? _Either : never + +export type Union = any + +type PatchUndefined = { + [K in keyof O]: O[K] extends undefined ? At : O[K] +} & {} + +/** Helper Types for "Merge" **/ +export type IntersectOf = ( + U extends unknown ? (k: U) => void : never +) extends (k: infer I) => void + ? I + : never + +export type Overwrite = { + [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; +} & {}; + +type _Merge = IntersectOf; +}>>; + +type Key = string | number | symbol; +type AtBasic = K extends keyof O ? O[K] : never; +type AtStrict = O[K & keyof O]; +type AtLoose = O extends unknown ? AtStrict : never; +export type At = { + 1: AtStrict; + 0: AtLoose; +}[strict]; + +export type ComputeRaw = A extends Function ? A : { + [K in keyof A]: A[K]; +} & {}; + +export type OptionalFlat = { + [K in keyof O]?: O[K]; +} & {}; + +type _Record = { + [P in K]: T; +}; + +// cause typescript not to expand types and preserve names +type NoExpand = T extends unknown ? T : never; + +// this type assumes the passed object is entirely optional +type AtLeast = NoExpand< + O extends unknown + ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) + | {[P in keyof O as P extends K ? K : never]-?: O[P]} & O + : never>; + +type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; + +export type Strict = ComputeRaw<_Strict>; +/** End Helper Types for "Merge" **/ + +export type Merge = ComputeRaw<_Merge>>; + +/** +A [[Boolean]] +*/ +export type Boolean = True | False + +// /** +// 1 +// */ +export type True = 1 + +/** +0 +*/ +export type False = 0 + +export type Not = { + 0: 1 + 1: 0 +}[B] + +export type Extends = [A1] extends [never] + ? 0 // anything \`never\` is false + : A1 extends A2 + ? 1 + : 0 + +export type Has = Not< + Extends, U1> +> + +export type Or = { + 0: { + 0: 0 + 1: 1 + } + 1: { + 0: 1 + 1: 1 + } +}[B1][B2] + +export type Keys = U extends unknown ? keyof U : never + +type Cast = A extends B ? A : B; + +export const type: unique symbol; + + + +/** + * Used by group by + */ + +export type GetScalarType = O extends object ? { + [P in keyof T]: P extends keyof O + ? O[P] + : never +} : never + +type FieldPaths< + T, + U = Omit +> = IsObject extends True ? U : T + +type GetHavingFields = { + [K in keyof T]: Or< + Or, Extends<'AND', K>>, + Extends<'NOT', K> + > extends True + ? // infer is only needed to not hit TS limit + // based on the brilliant idea of Pierre-Antoine Mills + // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 + T[K] extends infer TK + ? GetHavingFields extends object ? Merge> : never> + : never + : {} extends FieldPaths + ? never + : K +}[keyof T] + +/** + * Convert tuple to union + */ +type _TupleToUnion = T extends (infer E)[] ? E : never +type TupleToUnion = _TupleToUnion +type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T + +/** + * Like \`Pick\`, but additionally can also accept an array of keys + */ +type PickEnumerable | keyof T> = Prisma__Pick> + +/** + * Exclude all keys with underscores + */ +type ExcludeUnderscoreKeys = T extends \`_\${string}\` ? never : T + + +export type FieldRef = runtime.FieldRef + +type FieldRefInputType = Model extends never ? never : FieldRef + +` +}); +function buildNullClass(name) { + const source = `/** +* Type of \`Prisma.${name}\`. +* +* You cannot use other instances of this class. Please use the \`Prisma.${name}\` value. +* +* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field +*/ +class ${name} { + private ${name}: never + private constructor() +}`; + return (0, import_indent_string4.default)(source, TAB_SIZE); +} +function buildPrismaSkipTs(previewFeatures) { + if (previewFeatures.includes("strictUndefinedChecks")) { + return ` +/** + * Prisma.skip + */ +export import skip = runtime.skip +`; + } + return ""; +} +function buildPrismaSkipJs(previewFeatures) { + if (previewFeatures.includes("strictUndefinedChecks")) { + return ` +Prisma.skip = skip +`; + } + return ""; +} + +// src/generation/TSClient/Count.ts +var import_indent_string5 = __toESM(require_indent_string()); +var Count = class { + constructor(type, context) { + this.type = type; + this.context = context; + } + get argsTypes() { + const argsTypes = []; + argsTypes.push( + new ArgsTypeBuilder(this.type, this.context).addSelectArg().addIncludeArgIfHasRelations().createExport() + ); + for (const field of this.type.fields) { + if (field.args.length > 0) { + argsTypes.push( + new ArgsTypeBuilder(this.type, this.context).addSchemaArgs(field.args).setGeneratedName(getCountArgsType(this.type.name, field.name)).createExport() + ); + } + } + return argsTypes; + } + toTS() { + const { type } = this; + const { name } = type; + const outputType = buildOutputType(type); + return ` +/** + * Count Type ${name} + */ + +${stringify(outputType)} + +export type ${getSelectName(name)} = { +${(0, import_indent_string5.default)( + type.fields.map((field) => { + const types = ["boolean"]; + if (field.outputType.location === "outputObjectTypes") { + types.push(getFieldArgName(field, this.type.name)); + } + if (field.args.length > 0) { + types.push(getCountArgsType(name, field.name)); + } + return `${field.name}?: ${types.join(" | ")}`; + }).join("\n"), + TAB_SIZE + )} +} + +// Custom InputTypes +${this.argsTypes.map((typeExport) => stringify(typeExport)).join("\n\n")} +`; + } +}; +function getCountArgsType(typeName, fieldName) { + return `${typeName}Count${capitalize2(fieldName)}Args`; +} + +// src/generation/TSClient/DefaultArgsAliases.ts +var DefaultArgsAliases = class { + constructor() { + this.existingArgTypes = /* @__PURE__ */ new Set(); + this.possibleAliases = []; + } + addPossibleAlias(newName, legacyName) { + this.possibleAliases.push({ newName, legacyName }); + } + registerArgName(name) { + this.existingArgTypes.add(name); + } + generateAliases() { + const aliases = []; + for (const { newName, legacyName } of this.possibleAliases) { + if (this.existingArgTypes.has(legacyName)) { + continue; + } + aliases.push( + stringify( + moduleExport( + typeDeclaration(legacyName, namedType(newName).addGenericArgument(extArgsParam.toArgument())).addGenericParameter(extArgsParam) + ).setDocComment(docComment(`@deprecated Use ${newName} instead`)), + { indentLevel: 1 } + ) + ); + } + return aliases.join("\n"); + } +}; + +// src/generation/TSClient/FieldRefInput.ts +var FieldRefInput = class { + constructor(type) { + this.type = type; + } + toTS() { + const allowedTypes = this.getAllowedTypes(); + return ` +/** + * Reference to a field of type ${allowedTypes} + */ +export type ${this.type.name}<$PrismaModel> = FieldRefInputType<$PrismaModel, ${allowedTypes}> + `; + } + getAllowedTypes() { + return this.type.allowTypes.map(getRefAllowedTypeName).join(" | "); + } +}; + +// src/generation/TSClient/GenerateContext.ts +var GenerateContext = class { + constructor({ dmmf, genericArgsInfo, defaultArgsAliases, generator }) { + this.dmmf = dmmf; + this.genericArgsInfo = genericArgsInfo; + this.defaultArgsAliases = defaultArgsAliases; + this.generator = generator; + } + isPreviewFeatureOn(previewFeature) { + return this.generator?.previewFeatures?.includes(previewFeature) ?? false; + } +}; + +// src/generation/TSClient/PrismaClient.ts +var import_indent_string7 = __toESM(require_indent_string()); + +// src/generation/utils/runtimeImport.ts +function runtimeImport(name) { + return name; +} +function runtimeImportedType(name) { + return namedType(`runtime.${name}`); +} + +// src/generation/TSClient/Datasources.ts +var import_indent_string6 = __toESM(require_indent_string()); +var Datasources = class { + constructor(internalDatasources) { + this.internalDatasources = internalDatasources; + } + toTS() { + const sources = this.internalDatasources; + return `export type Datasources = { +${(0, import_indent_string6.default)(sources.map((s) => `${s.name}?: Datasource`).join("\n"), 2)} +}`; + } +}; + +// src/generation/TSClient/globalOmit.ts +function globalOmitConfig(dmmf) { + const objectType2 = objectType().addMultiple( + dmmf.datamodel.models.map((model) => { + const type = namedType(getOmitName(model.name)); + return property(lowerCase(model.name), type).optional(); + }) + ); + return moduleExport(typeDeclaration("GlobalOmitConfig", objectType2)); +} + +// src/generation/TSClient/PrismaClient.ts +function clientTypeMapModelsDefinition(context) { + const meta = objectType(); + const modelNames = context.dmmf.datamodel.models.map((m) => m.name); + if (modelNames.length === 0) { + meta.add(property("modelProps", neverType)); + } else { + meta.add(property("modelProps", unionType(modelNames.map((name) => stringLiteral(lowerCase(name)))))); + } + const isolationLevel = context.dmmf.hasEnumInNamespace("TransactionIsolationLevel", "prisma") ? namedType("Prisma.TransactionIsolationLevel") : neverType; + meta.add(property("txIsolationLevel", isolationLevel)); + const model = objectType(); + model.addMultiple( + modelNames.map((modelName) => { + const entry = objectType(); + entry.add( + property("payload", namedType(getPayloadName(modelName)).addGenericArgument(extArgsParam.toArgument())) + ); + entry.add(property("fields", namedType(`Prisma.${getFieldRefsTypeName(modelName)}`))); + const actions = getModelActions(context.dmmf, modelName); + const operations = objectType(); + operations.addMultiple( + actions.map((action) => { + const operationType = objectType(); + const argsType = `Prisma.${getModelArgName(modelName, action)}`; + operationType.add(property("args", namedType(argsType).addGenericArgument(extArgsParam.toArgument()))); + operationType.add(property("result", clientTypeMapModelsResultDefinition(modelName, action))); + return property(action, operationType); + }) + ); + entry.add(property("operations", operations)); + return property(modelName, entry); + }) + ); + return objectType().add(property("meta", meta)).add(property("model", model)); +} +function clientTypeMapModelsResultDefinition(modelName, action) { + if (action === "count") + return unionType([optional(namedType(getCountAggregateOutputName(modelName))), numberType]); + if (action === "groupBy") return array(optional(namedType(getGroupByName(modelName)))); + if (action === "aggregate") return optional(namedType(getAggregateName(modelName))); + if (action === "findRaw") return namedType("JsonObject"); + if (action === "aggregateRaw") return namedType("JsonObject"); + if (action === "deleteMany") return namedType("BatchPayload"); + if (action === "createMany") return namedType("BatchPayload"); + if (action === "createManyAndReturn") return array(payloadToResult(modelName)); + if (action === "updateMany") return namedType("BatchPayload"); + if (action === "findMany") return array(payloadToResult(modelName)); + if (action === "findFirst") return unionType([payloadToResult(modelName), nullType]); + if (action === "findUnique") return unionType([payloadToResult(modelName), nullType]); + if (action === "findFirstOrThrow") return payloadToResult(modelName); + if (action === "findUniqueOrThrow") return payloadToResult(modelName); + if (action === "create") return payloadToResult(modelName); + if (action === "update") return payloadToResult(modelName); + if (action === "upsert") return payloadToResult(modelName); + if (action === "delete") return payloadToResult(modelName); + assertNever(action, `Unknown action: ${action}`); +} +function payloadToResult(modelName) { + return namedType("$Utils.PayloadToResult").addGenericArgument(namedType(getPayloadName(modelName))); +} +function clientTypeMapOthersDefinition(context) { + const otherOperationsNames = context.dmmf.getOtherOperationNames().flatMap((name) => { + const results = [`$${name}`]; + if (name === "executeRaw" || name === "queryRaw") { + results.push(`$${name}Unsafe`); + } + if (name === "queryRaw" && context.isPreviewFeatureOn("typedSql")) { + results.push(`$queryRawTyped`); + } + return results; + }); + const argsResultMap = { + $executeRaw: { args: "[query: TemplateStringsArray | Prisma.Sql, ...values: any[]]", result: "any" }, + $queryRaw: { args: "[query: TemplateStringsArray | Prisma.Sql, ...values: any[]]", result: "any" }, + $executeRawUnsafe: { args: "[query: string, ...values: any[]]", result: "any" }, + $queryRawUnsafe: { args: "[query: string, ...values: any[]]", result: "any" }, + $runCommandRaw: { args: "Prisma.InputJsonObject", result: "Prisma.JsonObject" }, + $queryRawTyped: { args: "runtime.UnknownTypedSql", result: "Prisma.JsonObject" } + }; + return `{ + other: { + payload: any + operations: {${otherOperationsNames.reduce((acc, action) => { + return `${acc} + ${action}: { + args: ${argsResultMap[action].args}, + result: ${argsResultMap[action].result} + }`; + }, "")} + } + } +}`; +} +function clientTypeMapDefinition(context) { + const typeMap = `${stringify(clientTypeMapModelsDefinition(context))} & ${clientTypeMapOthersDefinition(context)}`; + return ` +interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs, clientOptions: PrismaClientOptions }, $Utils.Record> { + returns: Prisma.TypeMap +} + +export type TypeMap = ${typeMap}`; +} +function clientExtensionsDefinitions(context) { + const typeMap = clientTypeMapDefinition(context); + const define2 = moduleExport( + constDeclaration( + "defineExtension", + namedType("$Extensions.ExtendsHook").addGenericArgument(stringLiteral("define")).addGenericArgument(namedType("Prisma.TypeMapCb")).addGenericArgument(namedType("$Extensions.DefaultArgs")) + ) + ); + return [typeMap, stringify(define2)].join("\n"); +} +function extendsPropertyDefinition(context) { + const extendsDefinition = namedType("$Extensions.ExtendsHook").addGenericArgument(stringLiteral("extends")).addGenericArgument(namedType("Prisma.TypeMapCb")).addGenericArgument(namedType("ExtArgs")); + if (context.isPreviewFeatureOn("omitApi")) { + extendsDefinition.addGenericArgument( + namedType("$Utils.Call").addGenericArgument(namedType("Prisma.TypeMapCb")).addGenericArgument(objectType().add(property("extArgs", namedType("ExtArgs")))) + ).addGenericArgument(namedType("ClientOptions")); + } + return stringify(property("$extends", extendsDefinition), { indentLevel: 1 }); +} +function batchingTransactionDefinition(context) { + const method2 = method("$transaction").setDocComment( + docComment` + Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. + @example + \`\`\` + const [george, bob, alice] = await prisma.$transaction([ + prisma.user.create({ data: { name: 'George' } }), + prisma.user.create({ data: { name: 'Bob' } }), + prisma.user.create({ data: { name: 'Alice' } }), + ]) + \`\`\` + + Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). + ` + ).addGenericParameter(genericParameter("P").extends(array(prismaPromise(anyType)))).addParameter(parameter("arg", arraySpread(namedType("P")))).setReturnType(promise(namedType("runtime.Types.Utils.UnwrapTuple").addGenericArgument(namedType("P")))); + if (context.dmmf.hasEnumInNamespace("TransactionIsolationLevel", "prisma")) { + const options = objectType().formatInline().add(property("isolationLevel", namedType("Prisma.TransactionIsolationLevel")).optional()); + method2.addParameter(parameter("options", options).optional()); + } + return stringify(method2, { indentLevel: 1, newLine: "leading" }); +} +function interactiveTransactionDefinition(context) { + const options = objectType().formatInline().add(property("maxWait", numberType).optional()).add(property("timeout", numberType).optional()); + if (context.dmmf.hasEnumInNamespace("TransactionIsolationLevel", "prisma")) { + const isolationLevel = property("isolationLevel", namedType("Prisma.TransactionIsolationLevel")).optional(); + options.add(isolationLevel); + } + const returnType = promise(namedType("R")); + const callbackType = functionType().addParameter( + parameter("prisma", omit(namedType("PrismaClient"), namedType("runtime.ITXClientDenyList"))) + ).setReturnType(returnType); + const method2 = method("$transaction").addGenericParameter(genericParameter("R")).addParameter(parameter("fn", callbackType)).addParameter(parameter("options", options).optional()).setReturnType(returnType); + return stringify(method2, { indentLevel: 1, newLine: "leading" }); +} +function queryRawDefinition(context) { + if (!context.dmmf.mappings.otherOperations.write.includes("queryRaw")) { + return ""; + } + return ` + /** + * Performs a prepared raw query and returns the \`SELECT\` data. + * @example + * \`\`\` + * const result = await prisma.$queryRaw\`SELECT * FROM User WHERE id = \${1} OR email = \${'user@email.com'};\` + * \`\`\` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a raw query and returns the \`SELECT\` data. + * Susceptible to SQL injections, see documentation. + * @example + * \`\`\` + * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') + * \`\`\` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise;`; +} +function executeRawDefinition(context) { + if (!context.dmmf.mappings.otherOperations.write.includes("executeRaw")) { + return ""; + } + return ` + /** + * Executes a prepared raw query and returns the number of affected rows. + * @example + * \`\`\` + * const result = await prisma.$executeRaw\`UPDATE User SET cool = \${true} WHERE email = \${'user@email.com'};\` + * \`\`\` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Executes a raw query and returns the number of affected rows. + * Susceptible to SQL injections, see documentation. + * @example + * \`\`\` + * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') + * \`\`\` + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + */ + $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise;`; +} +function queryRawTypedDefinition(context) { + if (!context.isPreviewFeatureOn("typedSql")) { + return ""; + } + if (!context.dmmf.mappings.otherOperations.write.includes("queryRaw")) { + return ""; + } + const param = genericParameter("T"); + const method2 = method("$queryRawTyped").setDocComment( + docComment` + Executes a typed SQL query and returns a typed result + @example + \`\`\` + import { myQuery } from '@prisma/client/sql' + + const result = await prisma.$queryRawTyped(myQuery()) + \`\`\` + ` + ).addGenericParameter(param).addParameter( + parameter( + "typedSql", + runtimeImportedType("TypedSql").addGenericArgument(array(unknownType)).addGenericArgument(param.toArgument()) + ) + ).setReturnType(prismaPromise(array(param.toArgument()))); + return stringify(method2, { indentLevel: 1, newLine: "leading" }); +} +function metricDefinition(context) { + if (!context.isPreviewFeatureOn("metrics")) { + return ""; + } + const property2 = property("$metrics", namedType(`runtime.${runtimeImport("MetricsClient")}`)).setDocComment( + docComment` + Gives access to the client metrics in json or prometheus format. + + @example + \`\`\` + const metrics = await prisma.$metrics.json() + // or + const metrics = await prisma.$metrics.prometheus() + \`\`\` + ` + ).readonly(); + return stringify(property2, { indentLevel: 1, newLine: "leading" }); +} +function runCommandRawDefinition(context) { + if (!context.dmmf.mappings.otherOperations.write.includes("runCommandRaw")) { + return ""; + } + const method2 = method("$runCommandRaw").addParameter(parameter("command", namedType("Prisma.InputJsonObject"))).setReturnType(prismaPromise(namedType("Prisma.JsonObject"))).setDocComment(docComment` + Executes a raw MongoDB command and returns the result of it. + @example + \`\`\` + const user = await prisma.$runCommandRaw({ + aggregate: 'User', + pipeline: [{ $match: { name: 'Bob' } }, { $project: { email: true, _id: false } }], + explain: false, + }) + \`\`\` + + Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). + `); + return stringify(method2, { indentLevel: 1, newLine: "leading" }); +} +function applyPendingMigrationsDefinition() { + if (this.runtimeNameTs !== "react-native") { + return null; + } + const method2 = method("$applyPendingMigrations").setReturnType(promise(voidType)).setDocComment( + docComment`Tries to apply pending migrations one by one. If a migration fails to apply, the function will stop and throw an error. You are responsible for informing the user and possibly blocking the app as we cannot guarantee the state of the database.` + ); + return stringify(method2, { indentLevel: 1, newLine: "leading" }); +} +function eventRegistrationMethodDeclaration(runtimeNameTs) { + if (runtimeNameTs === "binary.js") { + return `$on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : V extends 'beforeExit' ? () => $Utils.JsPromise : Prisma.LogEvent) => void): void;`; + } else { + return `$on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): void;`; + } +} +var PrismaClientClass = class { + constructor(context, internalDatasources, outputDir, runtimeNameTs, browser) { + this.context = context; + this.internalDatasources = internalDatasources; + this.outputDir = outputDir; + this.runtimeNameTs = runtimeNameTs; + this.browser = browser; + } + get jsDoc() { + const { dmmf } = this.context; + let example; + if (dmmf.mappings.modelOperations.length) { + example = dmmf.mappings.modelOperations[0]; + } else { + example = { + model: "User", + plural: "users" + }; + } + return `/** + * ## Prisma Client \u02B2\u02E2 + * + * Type-safe database client for TypeScript & Node.js + * @example + * \`\`\` + * const prisma = new PrismaClient() + * // Fetch zero or more ${capitalize2(example.plural)} + * const ${lowerCase(example.plural)} = await prisma.${lowerCase(example.model)}.findMany() + * \`\`\` + * + * + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). + */`; + } + toTSWithoutNamespace() { + const { dmmf } = this.context; + return `${this.jsDoc} +export class PrismaClient< + ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, + U = 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array ? Prisma.GetEvents : never : never, + ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs +> { + [K: symbol]: { types: Prisma.TypeMap['other'] } + + ${(0, import_indent_string7.default)(this.jsDoc, TAB_SIZE)} + + constructor(optionsArg ?: Prisma.Subset); + ${eventRegistrationMethodDeclaration(this.runtimeNameTs)} + + /** + * Connect with the database + */ + $connect(): $Utils.JsPromise; + + /** + * Disconnect from the database + */ + $disconnect(): $Utils.JsPromise; + + /** + * Add a middleware + * @deprecated since 4.16.0. For new code, prefer client extensions instead. + * @see https://pris.ly/d/extensions + */ + $use(cb: Prisma.Middleware): void + +${[ + executeRawDefinition(this.context), + queryRawDefinition(this.context), + queryRawTypedDefinition(this.context), + batchingTransactionDefinition(this.context), + interactiveTransactionDefinition(this.context), + runCommandRawDefinition(this.context), + metricDefinition(this.context), + applyPendingMigrationsDefinition.bind(this)(), + extendsPropertyDefinition(this.context) + ].filter((d) => d !== null).join("\n").trim()} + + ${(0, import_indent_string7.default)( + dmmf.mappings.modelOperations.filter((m) => m.findMany).map((m) => { + let methodName = lowerCase(m.model); + if (methodName === "constructor") { + methodName = '["constructor"]'; + } + const generics = ["ExtArgs"]; + if (this.context.isPreviewFeatureOn("omitApi")) { + generics.push("ClientOptions"); + } + return `/** + * \`prisma.${methodName}\`: Exposes CRUD operations for the **${m.model}** model. + * Example usage: + * \`\`\`ts + * // Fetch zero or more ${capitalize2(m.plural)} + * const ${lowerCase(m.plural)} = await prisma.${methodName}.findMany() + * \`\`\` + */ +get ${methodName}(): Prisma.${m.model}Delegate<${generics.join(", ")}>;`; + }).join("\n\n"), + 2 + )} +}`; + } + toTS() { + const clientOptions = this.buildClientOptions(); + const isOmitEnabled = this.context.isPreviewFeatureOn("omitApi"); + return `${new Datasources(this.internalDatasources).toTS()} +${clientExtensionsDefinitions(this.context)} +export type DefaultPrismaClient = PrismaClient +export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' +${stringify(moduleExport(clientOptions))} +${isOmitEnabled ? stringify(globalOmitConfig(this.context.dmmf)) : ""} + +/* Types for Logging */ +export type LogLevel = 'info' | 'query' | 'warn' | 'error' +export type LogDefinition = { + level: LogLevel + emit: 'stdout' | 'event' +} + +export type GetLogType = T extends LogDefinition ? T['emit'] extends 'event' ? T['level'] : never : never +export type GetEvents = T extends Array ? + GetLogType | GetLogType | GetLogType | GetLogType + : never + +export type QueryEvent = { + timestamp: Date + query: string + params: string + duration: number + target: string +} + +export type LogEvent = { + timestamp: Date + message: string + target: string +} +/* End Types for Logging */ + + +export type PrismaAction = + | 'findUnique' + | 'findUniqueOrThrow' + | 'findMany' + | 'findFirst' + | 'findFirstOrThrow' + | 'create' + | 'createMany' + | 'createManyAndReturn' + | 'update' + | 'updateMany' + | 'upsert' + | 'delete' + | 'deleteMany' + | 'executeRaw' + | 'queryRaw' + | 'aggregate' + | 'count' + | 'runCommandRaw' + | 'findRaw' + | 'groupBy' + +/** + * These options are being passed into the middleware as "params" + */ +export type MiddlewareParams = { + model?: ModelName + action: PrismaAction + args: any + dataPath: string[] + runInTransaction: boolean +} + +/** + * The \`T\` type makes sure, that the \`return proceed\` is not forgotten in the middleware implementation + */ +export type Middleware = ( + params: MiddlewareParams, + next: (params: MiddlewareParams) => $Utils.JsPromise, +) => $Utils.JsPromise + +// tested in getLogLevel.test.ts +export function getLogLevel(log: Array): LogLevel | undefined; + +/** + * \`PrismaClient\` proxy available in interactive transactions. + */ +export type TransactionClient = Omit +`; + } + buildClientOptions() { + const clientOptions = interfaceDeclaration("PrismaClientOptions").add( + property("datasources", namedType("Datasources")).optional().setDocComment(docComment("Overwrites the datasource url from your schema.prisma file")) + ).add( + property("datasourceUrl", stringType).optional().setDocComment(docComment("Overwrites the datasource url from your schema.prisma file")) + ).add( + property("errorFormat", namedType("ErrorFormat")).optional().setDocComment(docComment('@default "colorless"')) + ).add( + property("log", array(unionType([namedType("LogLevel"), namedType("LogDefinition")]))).optional().setDocComment(docComment` + @example + \`\`\` + // Defaults to stdout + log: ['query', 'info', 'warn', 'error'] + + // Emit as events + log: [ + { emit: 'stdout', level: 'query' }, + { emit: 'stdout', level: 'info' }, + { emit: 'stdout', level: 'warn' } + { emit: 'stdout', level: 'error' } + ] + \`\`\` + Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). + `) + ); + const transactionOptions = objectType().add(property("maxWait", numberType).optional()).add(property("timeout", numberType).optional()); + if (this.context.dmmf.hasEnumInNamespace("TransactionIsolationLevel", "prisma")) { + transactionOptions.add(property("isolationLevel", namedType("Prisma.TransactionIsolationLevel")).optional()); + } + clientOptions.add( + property("transactionOptions", transactionOptions).optional().setDocComment(docComment` + The default values for transactionOptions + maxWait ?= 2000 + timeout ?= 5000 + `) + ); + if (this.runtimeNameTs === "library.js" && this.context.isPreviewFeatureOn("driverAdapters")) { + clientOptions.add( + property("adapter", unionType([namedType("runtime.DriverAdapter"), namedType("null")])).optional().setDocComment( + docComment("Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`") + ) + ); + } + if (this.context.isPreviewFeatureOn("omitApi")) { + clientOptions.add( + property("omit", namedType("Prisma.GlobalOmitConfig")).optional().setDocComment(docComment` + Global configuration for omitting model fields by default. + + @example + \`\`\` + const prisma = new PrismaClient({ + omit: { + user: { + password: true + } + } + }) + \`\`\` + `) + ); + } + return clientOptions; + } +}; + +// src/generation/TSClient/TSClient.ts +var TSClient = class { + constructor(options) { + this.options = options; + this.dmmf = new DMMFHelper(options.dmmf); + this.genericsInfo = new GenericArgsInfo(this.dmmf); + } + toJS() { + const { + edge, + wasm, + binaryPaths, + generator, + outputDir, + datamodel: inlineSchema, + runtimeBase, + runtimeNameJs, + datasources, + deno, + copyEngine = true, + reusedJs, + envPaths + } = this.options; + if (reusedJs) { + return `module.exports = { ...require('${reusedJs}') }`; + } + const relativeEnvPaths = { + rootEnvPath: envPaths.rootEnvPath && pathToPosix(import_path4.default.relative(outputDir, envPaths.rootEnvPath)), + schemaEnvPath: envPaths.schemaEnvPath && pathToPosix(import_path4.default.relative(outputDir, envPaths.schemaEnvPath)) + }; + const clientEngineType = getClientEngineType(generator); + generator.config.engineType = clientEngineType; + const binaryTargets = clientEngineType === "library" /* Library */ ? Object.keys(binaryPaths.libqueryEngine ?? {}) : Object.keys(binaryPaths.queryEngine ?? {}); + const inlineSchemaHash = import_crypto.default.createHash("sha256").update(Buffer.from(inlineSchema, "utf8").toString("base64")).digest("hex"); + const datasourceFilePath = datasources[0].sourceFilePath; + const config = { + generator, + relativeEnvPaths, + relativePath: pathToPosix(import_path4.default.relative(outputDir, import_path4.default.dirname(datasourceFilePath))), + clientVersion: this.options.clientVersion, + engineVersion: this.options.engineVersion, + datasourceNames: datasources.map((d) => d.name), + activeProvider: this.options.activeProvider, + postinstall: this.options.postinstall, + ciName: import_ci_info.default.name ?? void 0, + inlineDatasources: datasources.reduce((acc, ds) => { + return acc[ds.name] = { url: ds.url }, acc; + }, {}), + inlineSchema, + inlineSchemaHash, + copyEngine + }; + const relativeOutdir = import_path4.default.relative(process.cwd(), outputDir); + const code = `${commonCodeJS({ ...this.options, browser: false })} +${buildRequirePath(edge)} + +/** + * Enums + */ +${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toJS()).join("\n\n")} +${this.dmmf.schema.enumTypes.model?.map((type) => new Enum(type, false).toJS()).join("\n\n") ?? ""} + +${new Enum( + { + name: "ModelName", + values: this.dmmf.mappings.modelOperations.map((m) => m.model) + }, + true + ).toJS()} +/** + * Create the Client + */ +const config = ${JSON.stringify(config, null, 2)} +${buildDirname(edge, relativeOutdir)} +${buildRuntimeDataModel(this.dmmf.datamodel, runtimeNameJs)} +${buildQueryEngineWasmModule(wasm, copyEngine, runtimeNameJs)} +${buildInjectableEdgeEnv(edge, datasources)} +${buildWarnEnvConflicts(edge, runtimeBase, runtimeNameJs)} +${buildDebugInitialization(edge)} +const PrismaClient = getPrismaClient(config) +exports.PrismaClient = PrismaClient +Object.assign(exports, Prisma)${deno ? "\nexport { exports as default, Prisma, PrismaClient }" : ""} +${buildNFTAnnotations(edge || !copyEngine, clientEngineType, binaryTargets, relativeOutdir)} +`; + return code; + } + toTS() { + const { reusedTs } = this.options; + if (reusedTs) { + const topExports = moduleExportFrom(`./${reusedTs}`); + return stringify(topExports); + } + const context = new GenerateContext({ + dmmf: this.dmmf, + genericArgsInfo: this.genericsInfo, + generator: this.options.generator, + defaultArgsAliases: new DefaultArgsAliases() + }); + const prismaClientClass = new PrismaClientClass( + context, + this.options.datasources, + this.options.outputDir, + this.options.runtimeNameTs, + this.options.browser + ); + const commonCode = commonCodeTS(this.options); + const modelAndTypes = Object.values(this.dmmf.typeAndModelMap).reduce((acc, modelOrType) => { + if (this.dmmf.outputTypeMap.model[modelOrType.name]) { + acc.push(new Model(modelOrType, context)); + } + return acc; + }, []); + const prismaEnums = this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS()); + const modelEnums = []; + const modelEnumsAliases = []; + for (const enumType of this.dmmf.schema.enumTypes.model ?? []) { + modelEnums.push(new Enum(enumType, false).toTS()); + modelEnumsAliases.push( + stringify(moduleExport(typeDeclaration(enumType.name, namedType(`$Enums.${enumType.name}`)))), + stringify( + moduleExport(constDeclaration(enumType.name, namedType(`typeof $Enums.${enumType.name}`))) + ) + ); + } + const fieldRefs = this.dmmf.schema.fieldRefTypes.prisma?.map((type) => new FieldRefInput(type).toTS()) ?? []; + const countTypes = this.dmmf.schema.outputObjectTypes.prisma?.filter((t) => t.name.endsWith("CountOutputType")).map((t) => new Count(t, context)); + const code = ` +/** + * Client +**/ + +${commonCode.tsWithoutNamespace()} + +${modelAndTypes.map((m) => m.toTSWithoutNamespace()).join("\n")} +${modelEnums.length > 0 ? ` +/** + * Enums + */ +export namespace $Enums { + ${modelEnums.join("\n\n")} +} + +${modelEnumsAliases.join("\n\n")} +` : ""} +${prismaClientClass.toTSWithoutNamespace()} + +export namespace Prisma { +${(0, import_indent_string8.default)( + `${commonCode.ts()} +${new Enum( + { + name: "ModelName", + values: this.dmmf.mappings.modelOperations.map((m) => m.model) + }, + true + ).toTS()} + +${prismaClientClass.toTS()} +export type Datasource = { + url?: string +} + +/** + * Count Types + */ + +${countTypes.map((t) => t.toTS()).join("\n")} + +/** + * Models + */ +${modelAndTypes.map((model) => model.toTS()).join("\n")} + +/** + * Enums + */ + +${prismaEnums?.join("\n\n")} +${fieldRefs.length > 0 ? ` +/** + * Field references + */ + +${fieldRefs.join("\n\n")}` : ""} +/** + * Deep Input Types + */ + +${this.dmmf.inputObjectTypes.prisma?.reduce((acc, inputType) => { + if (inputType.name.includes("Json") && inputType.name.includes("Filter")) { + const needsGeneric = this.genericsInfo.typeNeedsGenericModelArg(inputType); + const innerName = needsGeneric ? `${inputType.name}Base<$PrismaModel>` : `${inputType.name}Base`; + const typeName = needsGeneric ? `${inputType.name}<$PrismaModel = never>` : inputType.name; + const baseName = `Required<${innerName}>`; + acc.push(`export type ${typeName} = + | PatchUndefined< + Either<${baseName}, Exclude>, + ${baseName} + > + | OptionalFlat>`); + acc.push(new InputType(inputType, context).overrideName(`${inputType.name}Base`).toTS()); + } else { + acc.push(new InputType(inputType, context).toTS()); + } + return acc; + }, []).join("\n")} + +${this.dmmf.inputObjectTypes.model?.map((inputType) => new InputType(inputType, context).toTS()).join("\n") ?? ""} + +/** + * Aliases for legacy arg types + */ +${context.defaultArgsAliases.generateAliases()} + +/** + * Batch Payload for updateMany & deleteMany & createMany + */ + +export type BatchPayload = { + count: number +} + +/** + * DMMF + */ +export const dmmf: runtime.BaseDMMF +`, + 2 + )}}`; + return code; + } + toBrowserJS() { + const code = `${commonCodeJS({ + ...this.options, + runtimeNameJs: "index-browser", + browser: true + })} +/** + * Enums + */ + +${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toJS()).join("\n\n")} +${this.dmmf.schema.enumTypes.model?.map((type) => new Enum(type, false).toJS()).join("\n\n") ?? ""} + +${new Enum( + { + name: "ModelName", + values: this.dmmf.mappings.modelOperations.map((m) => m.model) + }, + true + ).toJS()} + +/** + * This is a stub Prisma Client that will error at runtime if called. + */ +class PrismaClient { + constructor() { + return new Proxy(this, { + get(target, prop) { + let message + const runtime = getRuntime() + if (runtime.isEdge) { + message = \`PrismaClient is not configured to run in \${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: +- Use Prisma Accelerate: https://pris.ly/d/accelerate +- Use Driver Adapters: https://pris.ly/d/driver-adapters +\`; + } else { + message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in \`' + runtime.prettyName + '\`).' + } + + message += \` +If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report\` + + throw new Error(message) + } + }) + } +} + +exports.PrismaClient = PrismaClient + +Object.assign(exports, Prisma) +`; + return code; + } +}; + +// src/generation/typedSql/buildDbEnums.ts +var DbEnumsList = class { + constructor(enums) { + this.enums = enums.map((dmmfEnum) => ({ + name: dmmfEnum.dbName ?? dmmfEnum.name, + values: dmmfEnum.values.map((dmmfValue) => dmmfValue.dbName ?? dmmfValue.name) + })); + } + isEmpty() { + return this.enums.length === 0; + } + hasEnum(name) { + return Boolean(this.enums.find((dbEnum) => dbEnum.name === name)); + } + *validJsIdentifiers() { + for (const dbEnum of this.enums) { + if (isValidJsIdentifier(dbEnum.name)) { + yield dbEnum; + } + } + } + *invalidJsIdentifiers() { + for (const dbEnum of this.enums) { + if (!isValidJsIdentifier(dbEnum.name)) { + yield dbEnum; + } + } + } +}; +function buildDbEnums(list) { + const file2 = file(); + file2.add(buildInvalidIdentifierEnums(list)); + file2.add(buildValidIdentifierEnums(list)); + return stringify(file2); +} +function buildValidIdentifierEnums(list) { + const namespace2 = namespace("$DbEnums"); + for (const dbEnum of list.validJsIdentifiers()) { + namespace2.add(typeDeclaration(dbEnum.name, enumToUnion(dbEnum))); + } + return moduleExport(namespace2); +} +function buildInvalidIdentifierEnums(list) { + const iface = interfaceDeclaration("$DbEnums"); + for (const dbEnum of list.invalidJsIdentifiers()) { + iface.add(property(dbEnum.name, enumToUnion(dbEnum))); + } + return moduleExport(iface); +} +function enumToUnion(dbEnum) { + return unionType(dbEnum.values.map(stringLiteral)); +} +function queryUsesEnums(query, enums) { + if (enums.isEmpty()) { + return false; + } + return query.parameters.some((param) => enums.hasEnum(param.typ)) || query.resultColumns.some((column) => enums.hasEnum(column.typ)); +} + +// src/generation/typedSql/buildIndex.ts +function buildIndexTs(queries, enums) { + const file2 = file(); + if (!enums.isEmpty()) { + file2.add(moduleExportFrom("./$DbEnums").named("$DbEnums")); + } + for (const query of queries) { + file2.add(moduleExportFrom(`./${query.name}`)); + } + return stringify(file2); +} +function buildIndexCjs(queries, edgeRuntimeSuffix) { + const writer = new Writer(0, void 0); + writer.writeLine('"use strict"'); + for (const { name } of queries) { + const fileName = edgeRuntimeSuffix ? `${name}.${edgeRuntimeSuffix}` : name; + writer.writeLine(`exports.${name} = require("./${fileName}.js").${name}`); + } + return writer.toString(); +} +function buildIndexEsm(queries, edgeRuntimeSuffix) { + const writer = new Writer(0, void 0); + for (const { name } of queries) { + const fileName = edgeRuntimeSuffix ? `${name}.${edgeRuntimeSuffix}` : name; + writer.writeLine(`export * from "./${fileName}.mjs"`); + } + return writer.toString(); +} + +// src/generation/typedSql/mapTypes.ts +var decimal = namedType("$runtime.Decimal"); +var buffer = namedType("Buffer"); +var date = namedType("Date"); +var inputJsonValue = namedType("$runtime.InputJsonObject"); +var jsonValue = namedType("$runtime.JsonValue"); +var bigintIn = unionType([numberType, bigintType]); +var decimalIn = unionType([numberType, decimal]); +var typeMappings = { + unknown: unknownType, + string: stringType, + int: numberType, + bigint: { + in: bigintIn, + out: bigintType + }, + decimal: { + in: decimalIn, + out: decimal + }, + float: numberType, + double: numberType, + enum: stringType, + // TODO: + bytes: buffer, + bool: booleanType, + char: stringType, + json: { + in: inputJsonValue, + out: jsonValue + }, + xml: stringType, + uuid: stringType, + date, + datetime: date, + time: date, + null: nullType, + "int-array": array(numberType), + "string-array": array(stringType), + "json-array": { + in: array(inputJsonValue), + out: array(jsonValue) + }, + "uuid-array": array(stringType), + "xml-array": array(stringType), + "bigint-array": { + in: array(bigintIn), + out: array(bigintType) + }, + "float-array": array(numberType), + "double-array": array(numberType), + "char-array": array(stringType), + "bytes-array": array(buffer), + "bool-array": array(booleanType), + "date-array": array(date), + "time-array": array(date), + "datetime-array": array(date), + "decimal-array": { + in: array(decimalIn), + out: array(decimal) + } +}; +function getInputType(introspectionType, nullable, enums) { + const inn = getMappingConfig(introspectionType, enums).in; + if (!nullable) { + return inn; + } else { + return new UnionType(inn).addVariant(nullType); + } +} +function getOutputType(introspectionType, nullable, enums) { + const out = getMappingConfig(introspectionType, enums).out; + if (!nullable) { + return out; + } else { + return new UnionType(out).addVariant(nullType); + } +} +function getMappingConfig(introspectionType, enums) { + const config = typeMappings[introspectionType]; + if (!config) { + if (enums.hasEnum(introspectionType)) { + const type = getEnumType(introspectionType); + return { in: type, out: type }; + } + throw new Error("Unknown type"); + } + if (config instanceof TypeBuilder) { + return { in: config, out: config }; + } + return config; +} +function getEnumType(name) { + if (isValidJsIdentifier(name)) { + return namedType(`$DbEnums.${name}`); + } + return namedType("$DbEnums").subKey(name); +} + +// src/generation/typedSql/buildTypedQuery.ts +function buildTypedQueryTs({ query, runtimeBase, runtimeName, enums }) { + const file2 = file(); + file2.addImport(moduleImport(`${runtimeBase}/${runtimeName}`).asNamespace("$runtime")); + if (queryUsesEnums(query, enums)) { + file2.addImport(moduleImport("./$DbEnums").named("$DbEnums")); + } + const doc = docComment(query.documentation ?? void 0); + const factoryType = functionType(); + const parametersType = tupleType(); + for (const param of query.parameters) { + const paramType = getInputType(param.typ, param.nullable, enums); + factoryType.addParameter(parameter(param.name, paramType)); + parametersType.add(tupleItem(paramType).setName(param.name)); + if (param.documentation) { + doc.addText(`@param ${param.name} ${param.documentation}`); + } else { + doc.addText(`@param ${param.name}`); + } + } + factoryType.setReturnType( + namedType("$runtime.TypedSql").addGenericArgument(namedType(`${query.name}.Parameters`)).addGenericArgument(namedType(`${query.name}.Result`)) + ); + file2.add(moduleExport(constDeclaration(query.name, factoryType)).setDocComment(doc)); + const namespace2 = namespace(query.name); + namespace2.add(moduleExport(typeDeclaration("Parameters", parametersType))); + namespace2.add(buildResultType(query, enums)); + file2.add(moduleExport(namespace2)); + return stringify(file2); +} +function buildResultType(query, enums) { + const type = objectType().addMultiple( + query.resultColumns.map((column) => property(column.name, getOutputType(column.typ, column.nullable, enums))) + ); + return moduleExport(typeDeclaration("Result", type)); +} +function buildTypedQueryCjs({ query, runtimeBase, runtimeName }) { + const writer = new Writer(0, void 0); + writer.writeLine('"use strict"'); + writer.writeLine(`const { makeTypedQueryFactory: $mkFactory } = require("${runtimeBase}/${runtimeName}")`); + writer.writeLine(`exports.${query.name} = /*#__PURE__*/ $mkFactory(${JSON.stringify(query.source)})`); + return writer.toString(); +} +function buildTypedQueryEsm({ query, runtimeBase, runtimeName }) { + const writer = new Writer(0, void 0); + writer.writeLine(`import { makeTypedQueryFactory as $mkFactory } from "${runtimeBase}/${runtimeName}"`); + writer.writeLine(`export const ${query.name} = /*#__PURE__*/ $mkFactory(${JSON.stringify(query.source)})`); + return writer.toString(); +} + +// src/generation/typedSql/typedSql.ts +function buildTypedSql({ + queries, + runtimeBase, + edgeRuntimeName, + mainRuntimeName, + dmmf +}) { + const fileMap = {}; + const enums = new DbEnumsList(dmmf.datamodel.enums); + if (!enums.isEmpty()) { + fileMap["$DbEnums.d.ts"] = buildDbEnums(enums); + } + for (const query of queries) { + const options = { query, runtimeBase, runtimeName: mainRuntimeName, enums }; + const edgeOptions = { ...options, runtimeName: `${edgeRuntimeName}.js` }; + fileMap[`${query.name}.d.ts`] = buildTypedQueryTs(options); + fileMap[`${query.name}.js`] = buildTypedQueryCjs(options); + fileMap[`${query.name}.${edgeRuntimeName}.js`] = buildTypedQueryCjs(edgeOptions); + fileMap[`${query.name}.mjs`] = buildTypedQueryEsm(options); + fileMap[`${query.name}.edge.mjs`] = buildTypedQueryEsm(edgeOptions); + } + fileMap["index.d.ts"] = buildIndexTs(queries, enums); + fileMap["index.js"] = buildIndexCjs(queries); + fileMap["index.mjs"] = buildIndexEsm(queries); + fileMap[`index.${edgeRuntimeName}.mjs`] = buildIndexEsm(queries, edgeRuntimeName); + fileMap[`index.${edgeRuntimeName}.js`] = buildIndexCjs(queries, edgeRuntimeName); + return fileMap; +} + +// src/generation/generateClient.ts +var debug2 = src_default("prisma:client:generateClient"); +var DenylistError = class extends Error { + constructor(message) { + super(message); + this.stack = void 0; + } +}; +setClassName(DenylistError, "DenylistError"); +async function buildClient({ + schemaPath, + runtimeBase, + datamodel, + binaryPaths, + outputDir, + generator, + dmmf, + datasources, + engineVersion, + clientVersion: clientVersion2, + activeProvider, + postinstall, + copyEngine, + envPaths, + typedSql +}) { + const clientEngineType = getClientEngineType(generator); + const baseClientOptions = { + dmmf: getPrismaClientDMMF(dmmf), + envPaths: envPaths ?? { rootEnvPath: null, schemaEnvPath: void 0 }, + datasources, + generator, + binaryPaths, + schemaPath, + outputDir, + runtimeBase, + clientVersion: clientVersion2, + engineVersion, + activeProvider, + postinstall, + copyEngine, + datamodel, + browser: false, + deno: false, + edge: false, + wasm: false + }; + const nodeClientOptions = { + ...baseClientOptions, + runtimeNameJs: getNodeRuntimeName(clientEngineType), + runtimeNameTs: `${getNodeRuntimeName(clientEngineType)}.js` + }; + const nodeClient = new TSClient(nodeClientOptions); + const defaultClient = new TSClient({ + ...nodeClientOptions, + reusedTs: "index", + reusedJs: "." + }); + const edgeClient = new TSClient({ + ...baseClientOptions, + runtimeNameJs: "edge", + runtimeNameTs: "library.js", + reusedTs: "default", + edge: true + }); + const rnTsClient = new TSClient({ + ...baseClientOptions, + runtimeNameJs: "react-native", + runtimeNameTs: "react-native", + edge: true + }); + const trampolineTsClient = new TSClient({ + ...nodeClientOptions, + reusedTs: "index", + reusedJs: "#main-entry-point" + }); + const exportsMapBase = { + node: "./index.js", + "edge-light": "./wasm.js", + workerd: "./wasm.js", + worker: "./wasm.js", + browser: "./index-browser.js", + default: "./index.js" + }; + const exportsMapDefault = { + require: exportsMapBase, + import: exportsMapBase, + default: exportsMapBase.default + }; + const pkgJson = { + name: getUniquePackageName(datamodel), + main: "index.js", + types: "index.d.ts", + browser: "index-browser.js", + exports: { + ...import_package.default.exports, + // TODO: remove on DA ga + ...{ ".": exportsMapDefault } + }, + version: clientVersion2, + sideEffects: false + }; + const fileMap = {}; + fileMap["index.js"] = JS(nodeClient); + fileMap["index.d.ts"] = TS(nodeClient); + fileMap["default.js"] = JS(defaultClient); + fileMap["default.d.ts"] = TS(defaultClient); + fileMap["index-browser.js"] = BrowserJS(nodeClient); + fileMap["edge.js"] = JS(edgeClient); + fileMap["edge.d.ts"] = TS(edgeClient); + if (generator.previewFeatures.includes("reactNative")) { + fileMap["react-native.js"] = JS(rnTsClient); + fileMap["react-native.d.ts"] = TS(rnTsClient); + } + const usesWasmRuntime = generator.previewFeatures.includes("driverAdapters"); + if (usesWasmRuntime) { + fileMap["default.js"] = JS(trampolineTsClient); + fileMap["default.d.ts"] = TS(trampolineTsClient); + fileMap["wasm-worker-loader.mjs"] = `export default import('./query_engine_bg.wasm')`; + fileMap["wasm-edge-light-loader.mjs"] = `export default import('./query_engine_bg.wasm?module')`; + pkgJson["browser"] = "default.js"; + pkgJson["imports"] = { + // when `import('#wasm-engine-loader')` is called, it will be resolved to the correct file + "#wasm-engine-loader": { + // Keys reference: https://runtime-keys.proposal.wintercg.org/#keys + /** + * Vercel Edge Functions / Next.js Middlewares + */ + "edge-light": "./wasm-edge-light-loader.mjs", + /** + * Cloudflare Workers, Cloudflare Pages + */ + workerd: "./wasm-worker-loader.mjs", + /** + * (Old) Cloudflare Workers + * @millsp It's a fallback, in case both other keys didn't work because we could be on a different edge platform. It's a hypothetical case rather than anything actually tested. + */ + worker: "./wasm-worker-loader.mjs", + /** + * Fallback for every other JavaScript runtime + */ + default: "./wasm-worker-loader.mjs" + }, + // when `require('#main-entry-point')` is called, it will be resolved to the correct file + "#main-entry-point": exportsMapDefault + }; + const wasmClient = new TSClient({ + ...baseClientOptions, + runtimeNameJs: "wasm", + runtimeNameTs: "library.js", + reusedTs: "default", + edge: true, + wasm: true + }); + fileMap["wasm.js"] = JS(wasmClient); + fileMap["wasm.d.ts"] = TS(wasmClient); + } else { + fileMap["wasm.js"] = fileMap["index-browser.js"]; + fileMap["wasm.d.ts"] = fileMap["default.d.ts"]; + } + if (generator.previewFeatures.includes("deno") && !!globalThis.Deno) { + const denoEdgeClient = new TSClient({ + ...baseClientOptions, + runtimeBase: `../${runtimeBase}`, + runtimeNameJs: "edge-esm", + runtimeNameTs: "library.d.ts", + deno: true, + edge: true + }); + fileMap["deno/edge.js"] = JS(denoEdgeClient); + fileMap["deno/index.d.ts"] = TS(denoEdgeClient); + fileMap["deno/edge.ts"] = ` +import './polyfill.js' +// @deno-types="./index.d.ts" +export * from './edge.js'`; + fileMap["deno/polyfill.js"] = "globalThis.process = { env: Deno.env.toObject() }; globalThis.global = globalThis"; + } + if (typedSql && typedSql.length > 0) { + const edgeRuntimeName = usesWasmRuntime ? "wasm" : "edge"; + const cjsEdgeIndex = `./sql/index.${edgeRuntimeName}.js`; + const esmEdgeIndex = `./sql/index.${edgeRuntimeName}.mjs`; + pkgJson.exports["./sql"] = { + require: { + types: "./sql/index.d.ts", + "edge-light": cjsEdgeIndex, + workerd: cjsEdgeIndex, + worker: cjsEdgeIndex, + node: "./sql/index.js", + default: "./sql/index.js" + }, + import: { + types: "./sql/index.d.ts", + "edge-light": esmEdgeIndex, + workerd: esmEdgeIndex, + worker: esmEdgeIndex, + node: "./sql/index.mjs", + default: "./sql/index.mjs" + }, + default: "./sql/index.js" + }; + fileMap["sql"] = buildTypedSql({ + dmmf, + runtimeBase: getTypedSqlRuntimeBase(runtimeBase), + mainRuntimeName: getNodeRuntimeName(clientEngineType), + queries: typedSql, + edgeRuntimeName + }); + } + fileMap["package.json"] = JSON.stringify(pkgJson, null, 2); + return { + fileMap, + // a map of file names to their contents + prismaClientDmmf: dmmf + // the DMMF document + }; +} +function getTypedSqlRuntimeBase(runtimeBase) { + if (!runtimeBase.startsWith(".")) { + return runtimeBase; + } + if (runtimeBase.startsWith("./")) { + return `.${runtimeBase}`; + } + return `../${runtimeBase}`; +} +async function getDefaultOutdir(outputDir) { + if (outputDir.endsWith("node_modules/@prisma/client")) { + return import_path5.default.join(outputDir, "../../.prisma/client"); + } + if (process.env.INIT_CWD && process.env.npm_lifecycle_event === "postinstall" && !process.env.PWD?.includes(".pnpm")) { + if ((0, import_fs2.existsSync)(import_path5.default.join(process.env.INIT_CWD, "package.json"))) { + return import_path5.default.join(process.env.INIT_CWD, "node_modules/.prisma/client"); + } + const packagePath = await (0, import_pkg_up.default)({ cwd: process.env.INIT_CWD }); + if (packagePath) { + return import_path5.default.join(import_path5.default.dirname(packagePath), "node_modules/.prisma/client"); + } + } + return import_path5.default.join(outputDir, "../../.prisma/client"); +} +async function generateClient(options) { + const { + datamodel, + schemaPath, + generator, + dmmf, + datasources, + binaryPaths, + testMode, + copyRuntime, + copyRuntimeSourceMaps = false, + clientVersion: clientVersion2, + engineVersion, + activeProvider, + postinstall, + envPaths, + copyEngine = true, + typedSql + } = options; + const clientEngineType = getClientEngineType(generator); + const { runtimeBase, outputDir } = await getGenerationDirs(options); + const { prismaClientDmmf, fileMap } = await buildClient({ + datamodel, + schemaPath, + runtimeBase, + outputDir, + generator, + dmmf, + datasources, + binaryPaths, + clientVersion: clientVersion2, + engineVersion, + activeProvider, + postinstall, + copyEngine, + testMode, + envPaths, + typedSql + }); + const provider = datasources[0].provider; + const denylistsErrors = validateDmmfAgainstDenylists(prismaClientDmmf); + if (denylistsErrors) { + let message = `${bold( + red("Error: ") + )}The schema at "${schemaPath}" contains reserved keywords. + Rename the following items:`; + for (const error of denylistsErrors) { + message += "\n - " + error.message; + } + message += ` +To learn more about how to rename models, check out https://pris.ly/d/naming-models`; + throw new DenylistError(message); + } + if (!copyEngine) { + await deleteOutputDir(outputDir); + } + await (0, import_fs_extra.ensureDir)(outputDir); + if (generator.previewFeatures.includes("deno") && !!globalThis.Deno) { + await (0, import_fs_extra.ensureDir)(import_path5.default.join(outputDir, "deno")); + } + await writeFileMap(outputDir, fileMap); + const runtimeDir = import_path5.default.join(__dirname, `${testMode ? "../" : ""}../runtime`); + if (copyRuntime || generator.isCustomOutput === true) { + const copiedRuntimeDir = import_path5.default.join(outputDir, "runtime"); + await (0, import_fs_extra.ensureDir)(copiedRuntimeDir); + await copyRuntimeFiles({ + from: runtimeDir, + to: copiedRuntimeDir, + sourceMaps: copyRuntimeSourceMaps, + runtimeName: getNodeRuntimeName(clientEngineType) + }); + } + const enginePath = clientEngineType === "library" /* Library */ ? binaryPaths.libqueryEngine : binaryPaths.queryEngine; + if (!enginePath) { + throw new Error( + `Prisma Client needs \`${clientEngineType === "library" /* Library */ ? "libqueryEngine" : "queryEngine"}\` in the \`binaryPaths\` object.` + ); + } + if (copyEngine) { + if (process.env.NETLIFY) { + await (0, import_fs_extra.ensureDir)("/tmp/prisma-engines"); + } + for (const [binaryTarget, filePath] of Object.entries(enginePath)) { + const fileName = import_path5.default.basename(filePath); + let target; + if (process.env.NETLIFY && !["rhel-openssl-1.0.x", "rhel-openssl-3.0.x"].includes(binaryTarget)) { + target = import_path5.default.join("/tmp/prisma-engines", fileName); + } else { + target = import_path5.default.join(outputDir, fileName); + } + await overwriteFile(filePath, target); + } + } + const schemaTargetPath = import_path5.default.join(outputDir, "schema.prisma"); + await import_promises.default.writeFile(schemaTargetPath, datamodel, { encoding: "utf-8" }); + if (generator.previewFeatures.includes("driverAdapters") && isWasmEngineSupported(provider) && copyEngine && !testMode) { + const suffix = provider === "postgres" ? "postgresql" : provider; + await import_promises.default.copyFile( + import_path5.default.join(runtimeDir, `query_engine_bg.${suffix}.wasm`), + import_path5.default.join(outputDir, `query_engine_bg.wasm`) + ); + await import_promises.default.copyFile(import_path5.default.join(runtimeDir, `query_engine_bg.${suffix}.js`), import_path5.default.join(outputDir, `query_engine_bg.js`)); + } + try { + const prismaCache = (0, import_env_paths.default)("prisma").cache; + const signalsPath = import_path5.default.join(prismaCache, "last-generate"); + await import_promises.default.mkdir(prismaCache, { recursive: true }); + await import_promises.default.writeFile(signalsPath, Date.now().toString()); + } catch { + } +} +function writeFileMap(outputDir, fileMap) { + return Promise.all( + Object.entries(fileMap).map(async ([fileName, content]) => { + const absolutePath = import_path5.default.join(outputDir, fileName); + await import_promises.default.rm(absolutePath, { recursive: true, force: true }); + if (typeof content === "string") { + await import_promises.default.writeFile(absolutePath, content); + } else { + await import_promises.default.mkdir(absolutePath); + await writeFileMap(absolutePath, content); + } + }) + ); +} +function isWasmEngineSupported(provider) { + return provider === "postgresql" || provider === "postgres" || provider === "mysql" || provider === "sqlite"; +} +function validateDmmfAgainstDenylists(prismaClientDmmf) { + const errorArray = []; + const denylists = { + // A copy of this list is also in prisma-engines. Any edit should be done in both places. + // https://github.com/prisma/prisma-engines/blob/main/psl/parser-database/src/names/reserved_model_names.rs + models: [ + // Reserved Prisma keywords + "PrismaClient", + "Prisma", + // JavaScript keywords + "break", + "case", + "catch", + "class", + "const", + "continue", + "debugger", + "default", + "delete", + "do", + "else", + "enum", + "export", + "extends", + "false", + "finally", + "for", + "function", + "if", + "implements", + "import", + "in", + "instanceof", + "interface", + "let", + "new", + "null", + "package", + "private", + "protected", + "public", + "return", + "super", + "switch", + "this", + "throw", + "true", + "try", + "typeof", + "var", + "void", + "while", + "with", + "yield" + ], + fields: ["AND", "OR", "NOT"], + dynamic: [] + }; + if (prismaClientDmmf.datamodel.enums) { + for (const it of prismaClientDmmf.datamodel.enums) { + if (denylists.models.includes(it.name) || denylists.fields.includes(it.name)) { + errorArray.push(Error(`"enum ${it.name}"`)); + } + } + } + if (prismaClientDmmf.datamodel.models) { + for (const it of prismaClientDmmf.datamodel.models) { + if (denylists.models.includes(it.name) || denylists.fields.includes(it.name)) { + errorArray.push(Error(`"model ${it.name}"`)); + } + } + } + return errorArray.length > 0 ? errorArray : null; +} +async function getGenerationDirs({ + runtimeBase, + generator, + outputDir, + datamodel, + schemaPath, + testMode +}) { + const isCustomOutput = generator.isCustomOutput === true; + let userRuntimeImport = isCustomOutput ? "./runtime" : "@prisma/client/runtime"; + let userOutputDir = isCustomOutput ? outputDir : await getDefaultOutdir(outputDir); + if (testMode && runtimeBase) { + userOutputDir = outputDir; + userRuntimeImport = pathToPosix(runtimeBase); + } + if (isCustomOutput) { + await verifyOutputDirectory(userOutputDir, datamodel, schemaPath); + } + const userPackageRoot = await (0, import_pkg_up.default)({ cwd: import_path5.default.dirname(userOutputDir) }); + const userProjectRoot = userPackageRoot ? import_path5.default.dirname(userPackageRoot) : process.cwd(); + return { + runtimeBase: userRuntimeImport, + outputDir: userOutputDir, + projectRoot: userProjectRoot + }; +} +async function verifyOutputDirectory(directory, datamodel, schemaPath) { + let content; + try { + content = await import_promises.default.readFile(import_path5.default.join(directory, "package.json"), "utf8"); + } catch (e) { + if (e.code === "ENOENT") { + return; + } + throw e; + } + const { name } = JSON.parse(content); + if (name === import_package.default.name) { + const message = [`Generating client into ${bold(directory)} is not allowed.`]; + message.push("This package is used by `prisma generate` and overwriting its content is dangerous."); + message.push(""); + message.push("Suggestion:"); + const outputDeclaration = findOutputPathDeclaration(datamodel); + if (outputDeclaration && outputDeclaration.content.includes(import_package.default.name)) { + const outputLine = outputDeclaration.content; + message.push(`In ${bold(schemaPath)} replace:`); + message.push(""); + message.push(`${dim(outputDeclaration.lineNumber)} ${replacePackageName(outputLine, red(import_package.default.name))}`); + message.push("with"); + message.push(`${dim(outputDeclaration.lineNumber)} ${replacePackageName(outputLine, green(".prisma/client"))}`); + } else { + message.push(`Generate client into ${bold(replacePackageName(directory, green(".prisma/client")))} instead`); + } + message.push(""); + message.push("You won't need to change your imports."); + message.push("Imports from `@prisma/client` will be automatically forwarded to `.prisma/client`"); + const error = new Error(message.join("\n")); + throw error; + } +} +function replacePackageName(directoryPath, replacement) { + return directoryPath.replace(import_package.default.name, replacement); +} +function findOutputPathDeclaration(datamodel) { + const lines = datamodel.split(/\r?\n/); + for (const [i, line] of lines.entries()) { + if (/output\s*=/.test(line)) { + return { lineNumber: i + 1, content: line.trim() }; + } + } + return null; +} +function getNodeRuntimeName(engineType) { + if (engineType === "binary" /* Binary */) { + return "binary"; + } + if (engineType === "library" /* Library */) { + return "library"; + } + assertNever(engineType, "Unknown engine type"); +} +async function copyRuntimeFiles({ from, to, runtimeName, sourceMaps }) { + const files = [ + // library.d.ts is always included, as it contains the actual runtime type + // definitions. Rest of the `runtime.d.ts` files just re-export everything + // from `library.d.ts` + "library.d.ts", + "index-browser.js", + "index-browser.d.ts", + "edge.js", + "edge-esm.js", + "react-native.js", + "wasm.js" + ]; + files.push(`${runtimeName}.js`); + if (runtimeName !== "library") { + files.push(`${runtimeName}.d.ts`); + } + if (sourceMaps) { + files.push(...files.filter((file2) => file2.endsWith(".js")).map((file2) => `${file2}.map`)); + } + await Promise.all(files.map((file2) => import_promises.default.copyFile(import_path5.default.join(from, file2), import_path5.default.join(to, file2)))); +} +async function deleteOutputDir(outputDir) { + try { + debug2(`attempting to delete ${outputDir} recursively`); + if (require(`${outputDir}/package.json`).name?.startsWith(GENERATED_PACKAGE_NAME_PREFIX)) { + await import_promises.default.rmdir(outputDir, { recursive: true }).catch(() => { + debug2(`failed to delete ${outputDir} recursively`); + }); + } + } catch { + debug2(`failed to delete ${outputDir} recursively, not found`); + } +} +function getUniquePackageName(datamodel) { + const hash = (0, import_crypto2.createHash)("sha256"); + hash.write(datamodel); + return `${GENERATED_PACKAGE_NAME_PREFIX}${hash.digest().toString("hex")}`; +} +var GENERATED_PACKAGE_NAME_PREFIX = "prisma-client-"; + +// src/generation/utils/types/dmmfToTypes.ts +function dmmfToTypes(dmmf) { + return new TSClient({ + dmmf, + datasources: [], + clientVersion: "", + engineVersion: "", + runtimeBase: "@prisma/client", + runtimeNameJs: "library", + runtimeNameTs: "library", + schemaPath: "", + outputDir: "", + activeProvider: "", + binaryPaths: {}, + generator: { + binaryTargets: [], + config: {}, + name: "prisma-client-js", + output: null, + provider: { value: "prisma-client-js", fromEnvVar: null }, + previewFeatures: [], + isCustomOutput: false, + sourceFilePath: "schema.prisma" + }, + datamodel: "", + browser: false, + deno: false, + edge: false, + wasm: false, + envPaths: { + rootEnvPath: null, + schemaEnvPath: void 0 + } + }).toTS(); +} + +// src/generation/generator.ts +var debug3 = src_default("prisma:client:generator"); +var pkg = require_package2(); +var clientVersion = pkg.version; +if (process.argv[1] === __filename) { + generatorHandler({ + onManifest(config) { + const requiredEngine = getClientEngineType(config) === "library" /* Library */ ? "libqueryEngine" : "queryEngine"; + debug3(`requiredEngine: ${requiredEngine}`); + return { + defaultOutput: ".prisma/client", + // the value here doesn't matter, as it's resolved in https://github.com/prisma/prisma/blob/88fe98a09092d8e53e51f11b730c7672c19d1bd4/packages/sdk/src/get-generators/getGenerators.ts + prettyName: "Prisma Client", + requiresEngines: [requiredEngine], + version: clientVersion, + requiresEngineVersion: import_engines_version.enginesVersion + }; + }, + async onGenerate(options) { + const outputDir = parseEnvValue(options.generator.output); + return generateClient({ + datamodel: options.datamodel, + schemaPath: options.schemaPath, + binaryPaths: options.binaryPaths, + datasources: options.datasources, + envPaths: options.envPaths, + outputDir, + copyRuntime: Boolean(options.generator.config.copyRuntime), + // TODO: is this needed/valid? + copyRuntimeSourceMaps: Boolean(process.env.PRISMA_COPY_RUNTIME_SOURCEMAPS), + dmmf: options.dmmf, + generator: options.generator, + engineVersion: options.version, + clientVersion, + activeProvider: options.datasources[0]?.activeProvider, + postinstall: options.postinstall, + copyEngine: !options.noEngine, + typedSql: options.typedSql + }); + } + }); +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + dmmfToTypes, + externalToInternalDmmf +}); diff --git a/apps/api/release/vendor/@prisma/client/index-browser.js b/apps/api/release/vendor/@prisma/client/index-browser.js new file mode 100644 index 0000000..3ea8d77 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/index-browser.js @@ -0,0 +1,3 @@ +const prisma = require('.prisma/client/index-browser') + +module.exports = prisma diff --git a/apps/api/release/vendor/@prisma/client/index.d.ts b/apps/api/release/vendor/@prisma/client/index.d.ts new file mode 100644 index 0000000..bedfdce --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/index.d.ts @@ -0,0 +1 @@ +export * from '.prisma/client/default' diff --git a/apps/api/release/vendor/@prisma/client/index.js b/apps/api/release/vendor/@prisma/client/index.js new file mode 100644 index 0000000..1be37eb --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/index.js @@ -0,0 +1,4 @@ +module.exports = { + // https://github.com/prisma/prisma/pull/12907 + ...require('.prisma/client/default'), +} diff --git a/apps/api/release/vendor/@prisma/client/package.json b/apps/api/release/vendor/@prisma/client/package.json new file mode 100644 index 0000000..297061e --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/package.json @@ -0,0 +1,280 @@ +{ + "name": "@prisma/client", + "version": "5.22.0", + "description": "Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.", + "keywords": [ + "ORM", + "Prisma", + "prisma2", + "Prisma Client", + "client", + "query", + "query-builder", + "database", + "db", + "JavaScript", + "JS", + "TypeScript", + "TS", + "SQL", + "SQLite", + "pg", + "Postgres", + "PostgreSQL", + "CockroachDB", + "MySQL", + "MariaDB", + "MSSQL", + "SQL Server", + "SQLServer", + "MongoDB", + "react-native" + ], + "main": "default.js", + "types": "default.d.ts", + "browser": "index-browser.js", + "exports": { + "./package.json": "./package.json", + ".": { + "require": { + "types": "./default.d.ts", + "node": "./default.js", + "edge-light": "./default.js", + "workerd": "./default.js", + "worker": "./default.js", + "browser": "./index-browser.js" + }, + "import": { + "types": "./default.d.ts", + "node": "./default.js", + "edge-light": "./default.js", + "workerd": "./default.js", + "worker": "./default.js", + "browser": "./index-browser.js" + }, + "default": "./default.js" + }, + "./edge": { + "types": "./edge.d.ts", + "require": "./edge.js", + "import": "./edge.js", + "default": "./edge.js" + }, + "./react-native": { + "types": "./react-native.d.ts", + "require": "./react-native.js", + "import": "./react-native.js", + "default": "./react-native.js" + }, + "./extension": { + "types": "./extension.d.ts", + "require": "./extension.js", + "import": "./extension.js", + "default": "./extension.js" + }, + "./index-browser": { + "types": "./index.d.ts", + "require": "./index-browser.js", + "import": "./index-browser.js", + "default": "./index-browser.js" + }, + "./index": { + "types": "./index.d.ts", + "require": "./index.js", + "import": "./index.js", + "default": "./index.js" + }, + "./wasm": { + "types": "./wasm.d.ts", + "require": "./wasm.js", + "import": "./wasm.js", + "default": "./wasm.js" + }, + "./runtime/library": { + "types": "./runtime/library.d.ts", + "require": "./runtime/library.js", + "import": "./runtime/library.js", + "default": "./runtime/library.js" + }, + "./runtime/binary": { + "types": "./runtime/binary.d.ts", + "require": "./runtime/binary.js", + "import": "./runtime/binary.js", + "default": "./runtime/binary.js" + }, + "./generator-build": { + "require": "./generator-build/index.js", + "import": "./generator-build/index.js", + "default": "./generator-build/index.js" + }, + "./sql": { + "require": { + "types": "./sql.d.ts", + "node": "./sql.js", + "default": "./sql.js" + }, + "import": { + "types": "./sql.d.ts", + "node": "./sql.mjs", + "default": "./sql.mjs" + }, + "default": "./sql.js" + }, + "./*": "./*" + }, + "license": "Apache-2.0", + "engines": { + "node": ">=16.13" + }, + "homepage": "https://www.prisma.io", + "repository": { + "type": "git", + "url": "https://github.com/prisma/prisma.git", + "directory": "packages/client" + }, + "author": "Tim Suchanek ", + "bugs": "https://github.com/prisma/prisma/issues", + "files": [ + "README.md", + "runtime", + "!runtime/*.map", + "scripts", + "generator-build", + "edge.js", + "edge.d.ts", + "wasm.js", + "wasm.d.ts", + "index.js", + "index.d.ts", + "react-native.js", + "react-native.d.ts", + "default.js", + "default.d.ts", + "index-browser.js", + "extension.js", + "extension.d.ts", + "sql.d.ts", + "sql.js", + "sql.mjs" + ], + "devDependencies": { + "@cloudflare/workers-types": "4.20240614.0", + "@codspeed/benchmark.js-plugin": "3.1.1", + "@faker-js/faker": "8.4.1", + "@fast-check/jest": "1.8.2", + "@inquirer/prompts": "5.0.5", + "@jest/create-cache-key-function": "29.7.0", + "@jest/globals": "29.7.0", + "@jest/test-sequencer": "29.7.0", + "@libsql/client": "0.8.0", + "@neondatabase/serverless": "0.9.3", + "@opentelemetry/api": "1.9.0", + "@opentelemetry/context-async-hooks": "1.25.1", + "@opentelemetry/instrumentation": "0.52.1", + "@opentelemetry/resources": "1.25.1", + "@opentelemetry/sdk-trace-base": "1.25.1", + "@opentelemetry/semantic-conventions": "1.25.1", + "@planetscale/database": "1.18.0", + "@prisma/engines-version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@prisma/mini-proxy": "0.9.5", + "@prisma/query-engine-wasm": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@snaplet/copycat": "0.17.3", + "@swc-node/register": "1.10.9", + "@swc/core": "1.6.13", + "@swc/jest": "0.2.36", + "@timsuchanek/copy": "1.4.5", + "@types/debug": "4.1.12", + "@types/fs-extra": "9.0.13", + "@types/jest": "29.5.12", + "@types/js-levenshtein": "1.1.3", + "@types/mssql": "9.1.5", + "@types/node": "18.19.31", + "@types/pg": "8.11.6", + "arg": "5.0.2", + "benchmark": "2.1.4", + "ci-info": "4.0.0", + "decimal.js": "10.4.3", + "detect-runtime": "1.0.4", + "env-paths": "2.2.1", + "esbuild": "0.23.0", + "execa": "5.1.1", + "expect-type": "0.19.0", + "flat-map-polyfill": "0.3.8", + "fs-extra": "11.1.1", + "get-stream": "6.0.1", + "globby": "11.1.0", + "indent-string": "4.0.0", + "jest": "29.7.0", + "jest-extended": "4.0.2", + "jest-junit": "16.0.0", + "jest-serializer-ansi-escapes": "3.0.0", + "jest-snapshot": "29.7.0", + "js-levenshtein": "1.1.6", + "kleur": "4.1.5", + "klona": "2.0.6", + "mariadb": "3.3.1", + "memfs": "4.9.3", + "mssql": "11.0.1", + "new-github-issue-url": "0.2.1", + "node-fetch": "3.3.2", + "p-retry": "4.6.2", + "pg": "8.11.5", + "pkg-up": "3.1.0", + "pluralize": "8.0.0", + "resolve": "1.22.8", + "rimraf": "3.0.2", + "simple-statistics": "7.8.5", + "sort-keys": "4.2.0", + "source-map-support": "0.5.21", + "sql-template-tag": "5.2.1", + "stacktrace-parser": "0.1.10", + "strip-ansi": "6.0.1", + "strip-indent": "3.0.0", + "ts-node": "10.9.2", + "ts-pattern": "5.2.0", + "tsd": "0.31.1", + "typescript": "5.4.5", + "undici": "5.28.4", + "wrangler": "3.62.0", + "zx": "7.2.3", + "@prisma/adapter-d1": "5.22.0", + "@prisma/adapter-libsql": "5.22.0", + "@prisma/adapter-neon": "5.22.0", + "@prisma/adapter-pg": "5.22.0", + "@prisma/adapter-planetscale": "5.22.0", + "@prisma/driver-adapter-utils": "5.22.0", + "@prisma/adapter-pg-worker": "5.22.0", + "@prisma/debug": "5.22.0", + "@prisma/engines": "5.22.0", + "@prisma/fetch-engine": "5.22.0", + "@prisma/generator-helper": "5.22.0", + "@prisma/get-platform": "5.22.0", + "@prisma/instrumentation": "5.22.0", + "@prisma/internals": "5.22.0", + "@prisma/migrate": "5.22.0", + "@prisma/pg-worker": "5.22.0" + }, + "peerDependencies": { + "prisma": "*" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + } + }, + "sideEffects": false, + "scripts": { + "dev": "DEV=true tsx helpers/build.ts", + "build": "tsx helpers/build.ts", + "test": "dotenv -e ../../.db.env -- jest --silent", + "test:e2e": "dotenv -e ../../.db.env -- tsx tests/e2e/_utils/run.ts", + "test:functional": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts", + "test:memory": "dotenv -e ../../.db.env -- tsx helpers/memory-tests.ts", + "test:functional:code": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --no-types", + "test:functional:types": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --types-only", + "test-notypes": "dotenv -e ../../.db.env -- jest --testPathIgnorePatterns src/__tests__/types/types.test.ts", + "generate": "node scripts/postinstall.js", + "postinstall": "node scripts/postinstall.js", + "new-test": "tsx ./helpers/new-test/new-test.ts" + } +} \ No newline at end of file diff --git a/apps/api/release/vendor/@prisma/client/react-native.d.ts b/apps/api/release/vendor/@prisma/client/react-native.d.ts new file mode 100644 index 0000000..bfcd706 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/react-native.d.ts @@ -0,0 +1 @@ +export * from '.prisma/client/react-native' diff --git a/apps/api/release/vendor/@prisma/client/react-native.js b/apps/api/release/vendor/@prisma/client/react-native.js new file mode 100644 index 0000000..12b76d3 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/react-native.js @@ -0,0 +1,3 @@ +module.exports = { + ...require('.prisma/client/react-native'), +} diff --git a/apps/api/release/vendor/@prisma/client/runtime/binary.d.ts b/apps/api/release/vendor/@prisma/client/runtime/binary.d.ts new file mode 100644 index 0000000..b935a73 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/binary.d.ts @@ -0,0 +1 @@ +export * from "./library" diff --git a/apps/api/release/vendor/@prisma/client/runtime/binary.js b/apps/api/release/vendor/@prisma/client/runtime/binary.js new file mode 100644 index 0000000..c46100b --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/binary.js @@ -0,0 +1,210 @@ +"use strict";var FD=Object.create;var Hi=Object.defineProperty;var ND=Object.getOwnPropertyDescriptor;var xD=Object.getOwnPropertyNames;var LD=Object.getPrototypeOf,UD=Object.prototype.hasOwnProperty;var wd=e=>{throw TypeError(e)};var TD=(e,A,t)=>A in e?Hi(e,A,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[A]=t;var Q=(e,A)=>()=>(A||e((A={exports:{}}).exports,A),A.exports),Wi=(e,A)=>{for(var t in A)Hi(e,t,{get:A[t],enumerable:!0})},Rd=(e,A,t,r)=>{if(A&&typeof A=="object"||typeof A=="function")for(let n of xD(A))!UD.call(e,n)&&n!==t&&Hi(e,n,{get:()=>A[n],enumerable:!(r=ND(A,n))||r.enumerable});return e};var Z=(e,A,t)=>(t=e!=null?FD(LD(e)):{},Rd(A||!e||!e.__esModule?Hi(t,"default",{value:e,enumerable:!0}):t,e)),MD=e=>Rd(Hi({},"__esModule",{value:!0}),e);var Dd=(e,A,t)=>TD(e,typeof A!="symbol"?A+"":A,t),Hg=(e,A,t)=>A.has(e)||wd("Cannot "+t);var f=(e,A,t)=>(Hg(e,A,"read from private field"),t?t.call(e):A.get(e)),Ne=(e,A,t)=>A.has(e)?wd("Cannot add the same private member more than once"):A instanceof WeakSet?A.add(e):A.set(e,t),Ae=(e,A,t,r)=>(Hg(e,A,"write to private field"),r?r.call(e,t):A.set(e,t),t),MA=(e,A,t)=>(Hg(e,A,"access private method"),t);var Xd=Q((LV,Zd)=>{"use strict";Zd.exports=Kd;Kd.sync=yb;var _d=require("fs");function mb(e,A){var t=A.pathExt!==void 0?A.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var r=0;r{"use strict";AQ.exports=$d;$d.sync=wb;var zd=require("fs");function $d(e,A,t){zd.stat(e,function(r,n){t(r,r?!1:eQ(n,A))})}function wb(e,A){return eQ(zd.statSync(e),A)}function eQ(e,A){return e.isFile()&&Rb(e,A)}function Rb(e,A){var t=e.mode,r=e.uid,n=e.gid,i=A.uid!==void 0?A.uid:process.getuid&&process.getuid(),s=A.gid!==void 0?A.gid:process.getgid&&process.getgid(),o=parseInt("100",8),a=parseInt("010",8),c=parseInt("001",8),g=o|a,l=t&c||t&a&&n===s||t&o&&r===i||t&g&&i===0;return l}});var nQ=Q((MV,rQ)=>{"use strict";var TV=require("fs"),_o;process.platform==="win32"||global.TESTING_WINDOWS?_o=Xd():_o=tQ();rQ.exports=tl;tl.sync=Db;function tl(e,A,t){if(typeof A=="function"&&(t=A,A={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,n){tl(e,A||{},function(i,s){i?n(i):r(s)})})}_o(e,A||{},function(r,n){r&&(r.code==="EACCES"||A&&A.ignoreErrors)&&(r=null,n=!1),t(r,n)})}function Db(e,A){try{return _o.sync(e,A||{})}catch(t){if(A&&A.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var lQ=Q((vV,gQ)=>{"use strict";var Cn=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",iQ=require("path"),bb=Cn?";":":",sQ=nQ(),oQ=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),aQ=(e,A)=>{let t=A.colon||bb,r=e.match(/\//)||Cn&&e.match(/\\/)?[""]:[...Cn?[process.cwd()]:[],...(A.path||process.env.PATH||"").split(t)],n=Cn?A.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=Cn?n.split(t):[""];return Cn&&e.indexOf(".")!==-1&&i[0]!==""&&i.unshift(""),{pathEnv:r,pathExt:i,pathExtExe:n}},cQ=(e,A,t)=>{typeof A=="function"&&(t=A,A={}),A||(A={});let{pathEnv:r,pathExt:n,pathExtExe:i}=aQ(e,A),s=[],o=c=>new Promise((g,l)=>{if(c===r.length)return A.all&&s.length?g(s):l(oQ(e));let u=r[c],E=/^".*"$/.test(u)?u.slice(1,-1):u,h=iQ.join(E,e),d=!E&&/^\.[\\\/]/.test(e)?e.slice(0,2)+h:h;g(a(d,c,0))}),a=(c,g,l)=>new Promise((u,E)=>{if(l===n.length)return u(o(g+1));let h=n[l];sQ(c+h,{pathExt:i},(d,C)=>{if(!d&&C)if(A.all)s.push(c+h);else return u(c+h);return u(a(c,g,l+1))})});return t?o(0).then(c=>t(null,c),t):o(0)},kb=(e,A)=>{A=A||{};let{pathEnv:t,pathExt:r,pathExtExe:n}=aQ(e,A),i=[];for(let s=0;s{"use strict";var uQ=(e={})=>{let A=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(A).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};rl.exports=uQ;rl.exports.default=uQ});var QQ=Q((GV,dQ)=>{"use strict";var EQ=require("path"),Sb=lQ(),Fb=nl();function hQ(e,A){let t=e.options.env||process.env,r=process.cwd(),n=e.options.cwd!=null,i=n&&process.chdir!==void 0&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch{}let s;try{s=Sb.sync(e.command,{path:t[Fb({env:t})],pathExt:A?EQ.delimiter:void 0})}catch{}finally{i&&process.chdir(r)}return s&&(s=EQ.resolve(n?e.options.cwd:"",s)),s}function Nb(e){return hQ(e)||hQ(e,!0)}dQ.exports=Nb});var CQ=Q((JV,sl)=>{"use strict";var il=/([()\][%!^"`<>&|;, *?])/g;function xb(e){return e=e.replace(il,"^$1"),e}function Lb(e,A){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(il,"^$1"),A&&(e=e.replace(il,"^$1")),e}sl.exports.command=xb;sl.exports.argument=Lb});var IQ=Q((YV,fQ)=>{"use strict";fQ.exports=/^#!(.*)/});var pQ=Q((VV,BQ)=>{"use strict";var Ub=IQ();BQ.exports=(e="")=>{let A=e.match(Ub);if(!A)return null;let[t,r]=A[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?r:r?`${n} ${r}`:n}});var yQ=Q((qV,mQ)=>{"use strict";var ol=require("fs"),Tb=pQ();function Mb(e){let t=Buffer.alloc(150),r;try{r=ol.openSync(e,"r"),ol.readSync(r,t,0,150,0),ol.closeSync(r)}catch{}return Tb(t.toString())}mQ.exports=Mb});var bQ=Q((OV,DQ)=>{"use strict";var vb=require("path"),wQ=QQ(),RQ=CQ(),Pb=yQ(),Gb=process.platform==="win32",Jb=/\.(?:com|exe)$/i,Yb=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Vb(e){e.file=wQ(e);let A=e.file&&Pb(e.file);return A?(e.args.unshift(e.file),e.command=A,wQ(e)):e.file}function qb(e){if(!Gb)return e;let A=Vb(e),t=!Jb.test(A);if(e.options.forceShell||t){let r=Yb.test(A);e.command=vb.normalize(e.command),e.command=RQ.command(e.command),e.args=e.args.map(i=>RQ.argument(i,r));let n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function Ob(e,A,t){A&&!Array.isArray(A)&&(t=A,A=null),A=A?A.slice(0):[],t=Object.assign({},t);let r={command:e,args:A,options:t,file:void 0,original:{command:e,args:A}};return t.shell?r:qb(r)}DQ.exports=Ob});var FQ=Q((HV,SQ)=>{"use strict";var al=process.platform==="win32";function cl(e,A){return Object.assign(new Error(`${A} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${A} ${e.command}`,path:e.command,spawnargs:e.args})}function Hb(e,A){if(!al)return;let t=e.emit;e.emit=function(r,n){if(r==="exit"){let i=kQ(n,A,"spawn");if(i)return t.call(e,"error",i)}return t.apply(e,arguments)}}function kQ(e,A){return al&&e===1&&!A.file?cl(A.original,"spawn"):null}function Wb(e,A){return al&&e===1&&!A.file?cl(A.original,"spawnSync"):null}SQ.exports={hookChildProcess:Hb,verifyENOENT:kQ,verifyENOENTSync:Wb,notFoundError:cl}});var LQ=Q((WV,fn)=>{"use strict";var NQ=require("child_process"),gl=bQ(),ll=FQ();function xQ(e,A,t){let r=gl(e,A,t),n=NQ.spawn(r.command,r.args,r.options);return ll.hookChildProcess(n,r),n}function _b(e,A,t){let r=gl(e,A,t),n=NQ.spawnSync(r.command,r.args,r.options);return n.error=n.error||ll.verifyENOENTSync(n.status,r),n}fn.exports=xQ;fn.exports.spawn=xQ;fn.exports.sync=_b;fn.exports._parse=gl;fn.exports._enoent=ll});var TQ=Q((_V,UQ)=>{"use strict";UQ.exports=e=>{let A=typeof e=="string"?` +`:10,t=typeof e=="string"?"\r":13;return e[e.length-1]===A&&(e=e.slice(0,e.length-1)),e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e}});var PQ=Q((jV,zi)=>{"use strict";var Xi=require("path"),MQ=nl(),vQ=e=>{e={cwd:process.cwd(),path:process.env[MQ()],execPath:process.execPath,...e};let A,t=Xi.resolve(e.cwd),r=[];for(;A!==t;)r.push(Xi.join(t,"node_modules/.bin")),A=t,t=Xi.resolve(t,"..");let n=Xi.resolve(e.cwd,e.execPath,"..");return r.push(n),r.concat(e.path).join(Xi.delimiter)};zi.exports=vQ;zi.exports.default=vQ;zi.exports.env=e=>{e={env:process.env,...e};let A={...e.env},t=MQ({env:A});return e.path=A[t],A[t]=zi.exports(e),A}});var JQ=Q((KV,ul)=>{"use strict";var GQ=(e,A)=>{for(let t of Reflect.ownKeys(A))Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(A,t));return e};ul.exports=GQ;ul.exports.default=GQ});var VQ=Q((ZV,Ko)=>{"use strict";var jb=JQ(),jo=new WeakMap,YQ=(e,A={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let t,r=0,n=e.displayName||e.name||"",i=function(...s){if(jo.set(i,++r),r===1)t=e.apply(this,s),e=null;else if(A.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return t};return jb(i,e),jo.set(i,r),i};Ko.exports=YQ;Ko.exports.default=YQ;Ko.exports.callCount=e=>{if(!jo.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return jo.get(e)}});var qQ=Q(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.SIGNALS=void 0;var Kb=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];Zo.SIGNALS=Kb});var El=Q(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.SIGRTMAX=In.getRealtimeSignals=void 0;var Zb=function(){let e=HQ-OQ+1;return Array.from({length:e},Xb)};In.getRealtimeSignals=Zb;var Xb=function(e,A){return{name:`SIGRT${A+1}`,number:OQ+A,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},OQ=34,HQ=64;In.SIGRTMAX=HQ});var WQ=Q(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.getSignals=void 0;var zb=require("os"),$b=qQ(),ek=El(),Ak=function(){let e=(0,ek.getRealtimeSignals)();return[...$b.SIGNALS,...e].map(tk)};Xo.getSignals=Ak;var tk=function({name:e,number:A,description:t,action:r,forced:n=!1,standard:i}){let{signals:{[e]:s}}=zb.constants,o=s!==void 0;return{name:e,number:o?s:A,description:t,supported:o,action:r,forced:n,standard:i}}});var jQ=Q(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.signalsByNumber=Bn.signalsByName=void 0;var rk=require("os"),_Q=WQ(),nk=El(),ik=function(){return(0,_Q.getSignals)().reduce(sk,{})},sk=function(e,{name:A,number:t,description:r,supported:n,action:i,forced:s,standard:o}){return{...e,[A]:{name:A,number:t,description:r,supported:n,action:i,forced:s,standard:o}}},ok=ik();Bn.signalsByName=ok;var ak=function(){let e=(0,_Q.getSignals)(),A=nk.SIGRTMAX+1,t=Array.from({length:A},(r,n)=>ck(n,e));return Object.assign({},...t)},ck=function(e,A){let t=gk(e,A);if(t===void 0)return{};let{name:r,description:n,supported:i,action:s,forced:o,standard:a}=t;return{[e]:{name:r,number:e,description:n,supported:i,action:s,forced:o,standard:a}}},gk=function(e,A){let t=A.find(({name:r})=>rk.constants.signals[r]===e);return t!==void 0?t:A.find(r=>r.number===e)},lk=ak();Bn.signalsByNumber=lk});var ZQ=Q((Aq,KQ)=>{"use strict";var{signalsByName:uk}=jQ(),Ek=({timedOut:e,timeout:A,errorCode:t,signal:r,signalDescription:n,exitCode:i,isCanceled:s})=>e?`timed out after ${A} milliseconds`:s?"was canceled":t!==void 0?`failed with ${t}`:r!==void 0?`was killed with ${r} (${n})`:i!==void 0?`failed with exit code ${i}`:"failed",hk=({stdout:e,stderr:A,all:t,error:r,signal:n,exitCode:i,command:s,escapedCommand:o,timedOut:a,isCanceled:c,killed:g,parsed:{options:{timeout:l}}})=>{i=i===null?void 0:i,n=n===null?void 0:n;let u=n===void 0?void 0:uk[n].description,E=r&&r.code,d=`Command ${Ek({timedOut:a,timeout:l,errorCode:E,signal:n,signalDescription:u,exitCode:i,isCanceled:c})}: ${s}`,C=Object.prototype.toString.call(r)==="[object Error]",I=C?`${d} +${r.message}`:d,p=[I,A,e].filter(Boolean).join(` +`);return C?(r.originalMessage=r.message,r.message=p):r=new Error(p),r.shortMessage=I,r.command=s,r.escapedCommand=o,r.exitCode=i,r.signal=n,r.signalDescription=u,r.stdout=e,r.stderr=A,t!==void 0&&(r.all=t),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=!!a,r.isCanceled=c,r.killed=g&&!a,r};KQ.exports=hk});var zQ=Q((tq,hl)=>{"use strict";var zo=["stdin","stdout","stderr"],dk=e=>zo.some(A=>e[A]!==void 0),XQ=e=>{if(!e)return;let{stdio:A}=e;if(A===void 0)return zo.map(r=>e[r]);if(dk(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${zo.map(r=>`\`${r}\``).join(", ")}`);if(typeof A=="string")return A;if(!Array.isArray(A))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof A}\``);let t=Math.max(A.length,zo.length);return Array.from({length:t},(r,n)=>A[n])};hl.exports=XQ;hl.exports.node=e=>{let A=XQ(e);return A==="ipc"?"ipc":A===void 0||typeof A=="string"?[A,A,A,"ipc"]:A.includes("ipc")?A:[...A,"ipc"]}});var $Q=Q((rq,$o)=>{"use strict";$o.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&$o.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&$o.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var nC=Q((nq,yn)=>{"use strict";var we=global.process,Mr=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};Mr(we)?(eC=require("assert"),pn=$Q(),AC=/^win/i.test(we.platform),$i=require("events"),typeof $i!="function"&&($i=$i.EventEmitter),we.__signal_exit_emitter__?qe=we.__signal_exit_emitter__:(qe=we.__signal_exit_emitter__=new $i,qe.count=0,qe.emitted={}),qe.infinite||(qe.setMaxListeners(1/0),qe.infinite=!0),yn.exports=function(e,A){if(!Mr(global.process))return function(){};eC.equal(typeof e,"function","a callback must be provided for exit handler"),mn===!1&&dl();var t="exit";A&&A.alwaysLast&&(t="afterexit");var r=function(){qe.removeListener(t,e),qe.listeners("exit").length===0&&qe.listeners("afterexit").length===0&&ea()};return qe.on(t,e),r},ea=function(){!mn||!Mr(global.process)||(mn=!1,pn.forEach(function(A){try{we.removeListener(A,Aa[A])}catch{}}),we.emit=ta,we.reallyExit=Ql,qe.count-=1)},yn.exports.unload=ea,vr=function(A,t,r){qe.emitted[A]||(qe.emitted[A]=!0,qe.emit(A,t,r))},Aa={},pn.forEach(function(e){Aa[e]=function(){if(Mr(global.process)){var t=we.listeners(e);t.length===qe.count&&(ea(),vr("exit",null,e),vr("afterexit",null,e),AC&&e==="SIGHUP"&&(e="SIGINT"),we.kill(we.pid,e))}}}),yn.exports.signals=function(){return pn},mn=!1,dl=function(){mn||!Mr(global.process)||(mn=!0,qe.count+=1,pn=pn.filter(function(A){try{return we.on(A,Aa[A]),!0}catch{return!1}}),we.emit=rC,we.reallyExit=tC)},yn.exports.load=dl,Ql=we.reallyExit,tC=function(A){Mr(global.process)&&(we.exitCode=A||0,vr("exit",we.exitCode,null),vr("afterexit",we.exitCode,null),Ql.call(we,we.exitCode))},ta=we.emit,rC=function(A,t){if(A==="exit"&&Mr(global.process)){t!==void 0&&(we.exitCode=t);var r=ta.apply(this,arguments);return vr("exit",we.exitCode,null),vr("afterexit",we.exitCode,null),r}else return ta.apply(this,arguments)}):yn.exports=function(){return function(){}};var eC,pn,AC,$i,qe,ea,vr,Aa,mn,dl,Ql,tC,ta,rC});var sC=Q((iq,iC)=>{"use strict";var Qk=require("os"),Ck=nC(),fk=1e3*5,Ik=(e,A="SIGTERM",t={})=>{let r=e(A);return Bk(e,A,t,r),r},Bk=(e,A,t,r)=>{if(!pk(A,t,r))return;let n=yk(t),i=setTimeout(()=>{e("SIGKILL")},n);i.unref&&i.unref()},pk=(e,{forceKillAfterTimeout:A},t)=>mk(e)&&A!==!1&&t,mk=e=>e===Qk.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",yk=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return fk;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},wk=(e,A)=>{e.kill()&&(A.isCanceled=!0)},Rk=(e,A,t)=>{e.kill(A),t(Object.assign(new Error("Timed out"),{timedOut:!0,signal:A}))},Dk=(e,{timeout:A,killSignal:t="SIGTERM"},r)=>{if(A===0||A===void 0)return r;let n,i=new Promise((o,a)=>{n=setTimeout(()=>{Rk(e,t,a)},A)}),s=r.finally(()=>{clearTimeout(n)});return Promise.race([i,s])},bk=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},kk=async(e,{cleanup:A,detached:t},r)=>{if(!A||t)return r;let n=Ck(()=>{e.kill()});return r.finally(()=>{n()})};iC.exports={spawnedKill:Ik,spawnedCancel:wk,setupTimeout:Dk,validateTimeout:bk,setExitHandler:kk}});var aC=Q((sq,oC)=>{"use strict";var gt=e=>e!==null&&typeof e=="object"&&typeof e.pipe=="function";gt.writable=e=>gt(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object";gt.readable=e=>gt(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object";gt.duplex=e=>gt.writable(e)&>.readable(e);gt.transform=e=>gt.duplex(e)&&typeof e._transform=="function";oC.exports=gt});var gC=Q((oq,cC)=>{"use strict";var{PassThrough:Sk}=require("stream");cC.exports=e=>{e={...e};let{array:A}=e,{encoding:t}=e,r=t==="buffer",n=!1;A?n=!(t||r):t=t||"utf8",r&&(t=null);let i=new Sk({objectMode:n});t&&i.setEncoding(t);let s=0,o=[];return i.on("data",a=>{o.push(a),n?s=o.length:s+=a.length}),i.getBufferedValue=()=>A?o:r?Buffer.concat(o,s):o.join(""),i.getBufferedLength=()=>s,i}});var fl=Q((aq,es)=>{"use strict";var{constants:Fk}=require("buffer"),Nk=require("stream"),{promisify:xk}=require("util"),Lk=gC(),Uk=xk(Nk.pipeline),ra=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function Cl(e,A){if(!e)throw new Error("Expected a stream");A={maxBuffer:1/0,...A};let{maxBuffer:t}=A,r=Lk(A);return await new Promise((n,i)=>{let s=o=>{o&&r.getBufferedLength()<=Fk.MAX_LENGTH&&(o.bufferedData=r.getBufferedValue()),i(o)};(async()=>{try{await Uk(e,r),n()}catch(o){s(o)}})(),r.on("data",()=>{r.getBufferedLength()>t&&s(new ra)})}),r.getBufferedValue()}es.exports=Cl;es.exports.buffer=(e,A)=>Cl(e,{...A,encoding:"buffer"});es.exports.array=(e,A)=>Cl(e,{...A,array:!0});es.exports.MaxBufferError=ra});var uC=Q((cq,lC)=>{"use strict";var{PassThrough:Tk}=require("stream");lC.exports=function(){var e=[],A=new Tk({objectMode:!0});return A.setMaxListeners(0),A.add=t,A.isEmpty=r,A.on("unpipe",n),Array.prototype.slice.call(arguments).forEach(t),A;function t(i){return Array.isArray(i)?(i.forEach(t),this):(e.push(i),i.once("end",n.bind(null,i)),i.once("error",A.emit.bind(A,"error")),i.pipe(A,{end:!1}),this)}function r(){return e.length==0}function n(i){e=e.filter(function(s){return s!==i}),!e.length&&A.readable&&A.end()}}});var QC=Q((gq,dC)=>{"use strict";var hC=aC(),EC=fl(),Mk=uC(),vk=(e,A)=>{A===void 0||e.stdin===void 0||(hC(A)?A.pipe(e.stdin):e.stdin.end(A))},Pk=(e,{all:A})=>{if(!A||!e.stdout&&!e.stderr)return;let t=Mk();return e.stdout&&t.add(e.stdout),e.stderr&&t.add(e.stderr),t},Il=async(e,A)=>{if(e){e.destroy();try{return await A}catch(t){return t.bufferedData}}},Bl=(e,{encoding:A,buffer:t,maxBuffer:r})=>{if(!(!e||!t))return A?EC(e,{encoding:A,maxBuffer:r}):EC.buffer(e,{maxBuffer:r})},Gk=async({stdout:e,stderr:A,all:t},{encoding:r,buffer:n,maxBuffer:i},s)=>{let o=Bl(e,{encoding:r,buffer:n,maxBuffer:i}),a=Bl(A,{encoding:r,buffer:n,maxBuffer:i}),c=Bl(t,{encoding:r,buffer:n,maxBuffer:i*2});try{return await Promise.all([s,o,a,c])}catch(g){return Promise.all([{error:g,signal:g.signal,timedOut:g.timedOut},Il(e,o),Il(A,a),Il(t,c)])}},Jk=({input:e})=>{if(hC(e))throw new TypeError("The `input` option cannot be a stream in sync mode")};dC.exports={handleInput:vk,makeAllStream:Pk,getSpawnedResult:Gk,validateInputSync:Jk}});var fC=Q((lq,CC)=>{"use strict";var Yk=(async()=>{})().constructor.prototype,Vk=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Yk,e)]),qk=(e,A)=>{for(let[t,r]of Vk){let n=typeof A=="function"?(...i)=>Reflect.apply(r.value,A(),i):r.value.bind(A);Reflect.defineProperty(e,t,{...r,value:n})}return e},Ok=e=>new Promise((A,t)=>{e.on("exit",(r,n)=>{A({exitCode:r,signal:n})}),e.on("error",r=>{t(r)}),e.stdin&&e.stdin.on("error",r=>{t(r)})});CC.exports={mergePromise:qk,getSpawnedPromise:Ok}});var pC=Q((uq,BC)=>{"use strict";var IC=(e,A=[])=>Array.isArray(A)?[e,...A]:[e],Hk=/^[\w.-]+$/,Wk=/"/g,_k=e=>typeof e!="string"||Hk.test(e)?e:`"${e.replace(Wk,'\\"')}"`,jk=(e,A)=>IC(e,A).join(" "),Kk=(e,A)=>IC(e,A).map(t=>_k(t)).join(" "),Zk=/ +/g,Xk=e=>{let A=[];for(let t of e.trim().split(Zk)){let r=A[A.length-1];r&&r.endsWith("\\")?A[A.length-1]=`${r.slice(0,-1)} ${t}`:A.push(t)}return A};BC.exports={joinCommand:jk,getEscapedCommand:Kk,parseCommand:Xk}});var kC=Q((Eq,wn)=>{"use strict";var zk=require("path"),pl=require("child_process"),$k=LQ(),eS=TQ(),AS=PQ(),tS=VQ(),na=ZQ(),yC=zQ(),{spawnedKill:rS,spawnedCancel:nS,setupTimeout:iS,validateTimeout:sS,setExitHandler:oS}=sC(),{handleInput:aS,getSpawnedResult:cS,makeAllStream:gS,validateInputSync:lS}=QC(),{mergePromise:mC,getSpawnedPromise:uS}=fC(),{joinCommand:wC,parseCommand:RC,getEscapedCommand:DC}=pC(),ES=1e3*1e3*100,hS=({env:e,extendEnv:A,preferLocal:t,localDir:r,execPath:n})=>{let i=A?{...process.env,...e}:e;return t?AS.env({env:i,cwd:r,execPath:n}):i},bC=(e,A,t={})=>{let r=$k._parse(e,A,t);return e=r.command,A=r.args,t=r.options,t={maxBuffer:ES,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:t.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...t},t.env=hS(t),t.stdio=yC(t),process.platform==="win32"&&zk.basename(e,".exe")==="cmd"&&A.unshift("/q"),{file:e,args:A,options:t,parsed:r}},As=(e,A,t)=>typeof A!="string"&&!Buffer.isBuffer(A)?t===void 0?void 0:"":e.stripFinalNewline?eS(A):A,ia=(e,A,t)=>{let r=bC(e,A,t),n=wC(e,A),i=DC(e,A);sS(r.options);let s;try{s=pl.spawn(r.file,r.args,r.options)}catch(E){let h=new pl.ChildProcess,d=Promise.reject(na({error:E,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return mC(h,d)}let o=uS(s),a=iS(s,r.options,o),c=oS(s,r.options,a),g={isCanceled:!1};s.kill=rS.bind(null,s.kill.bind(s)),s.cancel=nS.bind(null,s,g);let u=tS(async()=>{let[{error:E,exitCode:h,signal:d,timedOut:C},I,p,w]=await cS(s,r.options,c),m=As(r.options,I),K=As(r.options,p),H=As(r.options,w);if(E||h!==0||d!==null){let ne=na({error:E,exitCode:h,signal:d,stdout:m,stderr:K,all:H,command:n,escapedCommand:i,parsed:r,timedOut:C,isCanceled:g.isCanceled,killed:s.killed});if(!r.options.reject)return ne;throw ne}return{command:n,escapedCommand:i,exitCode:0,stdout:m,stderr:K,all:H,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return aS(s,r.options.input),s.all=gS(s,r.options),mC(s,u)};wn.exports=ia;wn.exports.sync=(e,A,t)=>{let r=bC(e,A,t),n=wC(e,A),i=DC(e,A);lS(r.options);let s;try{s=pl.spawnSync(r.file,r.args,r.options)}catch(c){throw na({error:c,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}let o=As(r.options,s.stdout,s.error),a=As(r.options,s.stderr,s.error);if(s.error||s.status!==0||s.signal!==null){let c=na({stdout:o,stderr:a,error:s.error,signal:s.signal,exitCode:s.status,command:n,escapedCommand:i,parsed:r,timedOut:s.error&&s.error.code==="ETIMEDOUT",isCanceled:!1,killed:s.signal!==null});if(!r.options.reject)return c;throw c}return{command:n,escapedCommand:i,exitCode:0,stdout:o,stderr:a,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};wn.exports.command=(e,A)=>{let[t,...r]=RC(e);return ia(t,r,A)};wn.exports.commandSync=(e,A)=>{let[t,...r]=RC(e);return ia.sync(t,r,A)};wn.exports.node=(e,A,t={})=>{A&&!Array.isArray(A)&&typeof A=="object"&&(t=A,A=[]);let r=yC.node(t),n=process.execArgv.filter(o=>!o.startsWith("--inspect")),{nodePath:i=process.execPath,nodeOptions:s=n}=t;return ia(i,[...s,e,...Array.isArray(A)?A:[]],{...t,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})}});var ml=Q((Bq,dS)=>{dS.exports={name:"@prisma/engines-version",version:"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"605197351a3c8bdd595af2d2a9bc3025bca48ea2"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.34",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var yl=Q(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.enginesVersion=void 0;sa.enginesVersion=ml().prisma.enginesVersion});var FC=Q((mq,SC)=>{"use strict";function GA(e,A){typeof A=="boolean"&&(A={forever:A}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=A||{},this._maxRetryTime=A&&A.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}SC.exports=GA;GA.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};GA.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};GA.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var A=new Date().getTime();if(e&&A-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),t=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t),this._options.unref&&this._timer.unref(),!0};GA.prototype.attempt=function(e,A){this._fn=e,A&&(A.timeout&&(this._operationTimeout=A.timeout),A.cb&&(this._operationTimeoutCb=A.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};GA.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};GA.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};GA.prototype.start=GA.prototype.try;GA.prototype.errors=function(){return this._errors};GA.prototype.attempts=function(){return this._attempts};GA.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},A=null,t=0,r=0;r=t&&(A=n,t=s)}return A}});var NC=Q(Pr=>{"use strict";var QS=FC();Pr.operation=function(e){var A=Pr.timeouts(e);return new QS(A,{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};Pr.timeouts=function(e){if(e instanceof Array)return[].concat(e);var A={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var t in e)A[t]=e[t];if(A.minTimeout>A.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],n=0;n{"use strict";xC.exports=NC()});var TC=Q((Rq,aa)=>{"use strict";var CS=LC(),fS=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"],oa=class extends Error{constructor(A){super(),A instanceof Error?(this.originalError=A,{message:A}=A):(this.originalError=new Error(A),this.originalError.stack=this.stack),this.name="AbortError",this.message=A}},IS=(e,A,t)=>{let r=t.retries-(A-1);return e.attemptNumber=A,e.retriesLeft=r,e},BS=e=>fS.includes(e),UC=(e,A)=>new Promise((t,r)=>{A={onFailedAttempt:()=>{},retries:10,...A};let n=CS.operation(A);n.attempt(async i=>{try{t(await e(i))}catch(s){if(!(s instanceof Error)){r(new TypeError(`Non-error was thrown: "${s}". You should only throw errors.`));return}if(s instanceof oa)n.stop(),r(s.originalError);else if(s instanceof TypeError&&!BS(s.message))n.stop(),r(s);else{IS(s,i,A);try{await A.onFailedAttempt(s)}catch(o){r(o);return}n.retry(s)||r(n.mainError())}}})});aa.exports=UC;aa.exports.default=UC;aa.exports.AbortError=oa});var PC=Q((Gq,yS)=>{yS.exports={name:"dotenv",version:"16.0.3",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{require:"./lib/main.js",types:"./lib/main.d.ts",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^17.0.9",decache:"^4.6.1",dtslint:"^3.7.0",sinon:"^12.0.1",standard:"^16.0.4","standard-markdown":"^7.1.0","standard-version":"^9.3.2",tap:"^15.1.6",tar:"^6.1.11",typescript:"^4.5.4"},engines:{node:">=12"}}});var JC=Q((Jq,ga)=>{"use strict";var wS=require("fs"),GC=require("path"),RS=require("os"),DS=PC(),bS=DS.version,kS=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function SS(e){let A={},t=e.toString();t=t.replace(/\r\n?/mg,` +`);let r;for(;(r=kS.exec(t))!=null;){let n=r[1],i=r[2]||"";i=i.trim();let s=i[0];i=i.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(i=i.replace(/\\n/g,` +`),i=i.replace(/\\r/g,"\r")),A[n]=i}return A}function Dl(e){console.log(`[dotenv@${bS}][DEBUG] ${e}`)}function FS(e){return e[0]==="~"?GC.join(RS.homedir(),e.slice(1)):e}function NS(e){let A=GC.resolve(process.cwd(),".env"),t="utf8",r=!!(e&&e.debug),n=!!(e&&e.override);e&&(e.path!=null&&(A=FS(e.path)),e.encoding!=null&&(t=e.encoding));try{let i=ca.parse(wS.readFileSync(A,{encoding:t}));return Object.keys(i).forEach(function(s){Object.prototype.hasOwnProperty.call(process.env,s)?(n===!0&&(process.env[s]=i[s]),r&&Dl(n===!0?`"${s}" is already defined in \`process.env\` and WAS overwritten`:`"${s}" is already defined in \`process.env\` and was NOT overwritten`)):process.env[s]=i[s]}),{parsed:i}}catch(i){return r&&Dl(`Failed to load ${A} ${i.message}`),{error:i}}}var ca={config:NS,parse:SS};ga.exports.config=ca.config;ga.exports.parse=ca.parse;ga.exports=ca});var WC=Q((_q,HC)=>{"use strict";HC.exports=e=>{let A=e.match(/^[ \t]*(?=\S)/gm);return A?A.reduce((t,r)=>Math.min(t,r.length),1/0):0}});var jC=Q((jq,_C)=>{"use strict";var TS=WC();_C.exports=e=>{let A=TS(e);if(A===0)return e;let t=new RegExp(`^[ \\t]{${A}}`,"gm");return e.replace(t,"")}});var Fl=Q((eO,KC)=>{"use strict";KC.exports=(e,A=1,t)=>{if(t={indent:" ",includeEmptyLines:!1,...t},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof A!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof A}\``);if(typeof t.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t.indent}\``);if(A===0)return e;let r=t.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(r,t.indent.repeat(A))}});var $C=Q((rO,zC)=>{"use strict";zC.exports=({onlyFirst:e=!1}={})=>{let A=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(A,e?void 0:"g")}});var Ul=Q((nO,ef)=>{"use strict";var qS=$C();ef.exports=e=>typeof e=="string"?e.replace(qS(),""):e});var tf=Q((oO,Ea)=>{"use strict";Ea.exports=(e={})=>{let A;if(e.repoUrl)A=e.repoUrl;else if(e.user&&e.repo)A=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let t=new URL(`${A}/issues/new`),r=["body","title","labels","template","milestone","assignee","projects"];for(let n of r){let i=e[n];if(i!==void 0){if(n==="labels"||n==="projects"){if(!Array.isArray(i))throw new TypeError(`The \`${n}\` option should be an array`);i=i.join(",")}t.searchParams.set(n,i)}}return t.toString()};Ea.exports.default=Ea.exports});var Ol=Q((fH,Rf)=>{"use strict";Rf.exports=function(){function e(A,t,r,n,i){return Ar?r+1:A+1:n===i?t:t+1}return function(A,t){if(A===t)return 0;if(A.length>t.length){var r=A;A=t,t=r}for(var n=A.length,i=t.length;n>0&&A.charCodeAt(n-1)===t.charCodeAt(i-1);)n--,i--;for(var s=0;s{"use strict";_I.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kHeadersList:Symbol("headers list"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kHTTP2BuildRequest:Symbol("http2 build request"),kHTTP1BuildRequest:Symbol("http1 build request"),kHTTP2CopyHeaders:Symbol("http2 copy headers"),kHTTPConnVersion:Symbol("http connection version"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable")}});var le=Q((K4,jI)=>{"use strict";var Le=class extends Error{constructor(A){super(A),this.name="UndiciError",this.code="UND_ERR"}},Eu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ConnectTimeoutError",this.message=A||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}},hu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="HeadersTimeoutError",this.message=A||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}},du=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="HeadersOverflowError",this.message=A||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}},Qu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="BodyTimeoutError",this.message=A||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}},Cu=class e extends Le{constructor(A,t,r,n){super(A),Error.captureStackTrace(this,e),this.name="ResponseStatusCodeError",this.message=A||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=n,this.status=t,this.statusCode=t,this.headers=r}},fu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="InvalidArgumentError",this.message=A||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}},Iu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="InvalidReturnValueError",this.message=A||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}},Bu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="AbortError",this.message=A||"Request aborted",this.code="UND_ERR_ABORTED"}},pu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="InformationalError",this.message=A||"Request information",this.code="UND_ERR_INFO"}},mu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="RequestContentLengthMismatchError",this.message=A||"Request body length does not match content-length header",this.code="UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"}},yu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ResponseContentLengthMismatchError",this.message=A||"Response body length does not match content-length header",this.code="UND_ERR_RES_CONTENT_LENGTH_MISMATCH"}},wu=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ClientDestroyedError",this.message=A||"The client is destroyed",this.code="UND_ERR_DESTROYED"}},Ru=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ClientClosedError",this.message=A||"The client is closed",this.code="UND_ERR_CLOSED"}},Du=class e extends Le{constructor(A,t){super(A),Error.captureStackTrace(this,e),this.name="SocketError",this.message=A||"Socket error",this.code="UND_ERR_SOCKET",this.socket=t}},Wa=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="NotSupportedError",this.message=A||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}},bu=class extends Le{constructor(A){super(A),Error.captureStackTrace(this,Wa),this.name="MissingUpstreamError",this.message=A||"No upstream has been added to the BalancedPool",this.code="UND_ERR_BPL_MISSING_UPSTREAM"}},ku=class e extends Error{constructor(A,t,r){super(A),Error.captureStackTrace(this,e),this.name="HTTPParserError",this.code=t?`HPE_${t}`:void 0,this.data=r?r.toString():void 0}},Su=class e extends Le{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="ResponseExceededMaxSizeError",this.message=A||"Response content exceeded max size",this.code="UND_ERR_RES_EXCEEDED_MAX_SIZE"}},Fu=class e extends Le{constructor(A,t,{headers:r,data:n}){super(A),Error.captureStackTrace(this,e),this.name="RequestRetryError",this.message=A||"Request retry error",this.code="UND_ERR_REQ_RETRY",this.statusCode=t,this.data=n,this.headers=r}};jI.exports={HTTPParserError:ku,UndiciError:Le,HeadersTimeoutError:hu,HeadersOverflowError:du,BodyTimeoutError:Qu,RequestContentLengthMismatchError:mu,ConnectTimeoutError:Eu,ResponseStatusCodeError:Cu,InvalidArgumentError:fu,InvalidReturnValueError:Iu,RequestAbortedError:Bu,ClientDestroyedError:wu,ClientClosedError:Ru,InformationalError:pu,SocketError:Du,NotSupportedError:Wa,ResponseContentLengthMismatchError:yu,BalancedPoolMissingUpstreamError:bu,ResponseExceededMaxSizeError:Su,RequestRetryError:Fu}});var ZI=Q((Z4,KI)=>{"use strict";var _a={},Nu=["Accept","Accept-Encoding","Accept-Language","Accept-Ranges","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Age","Allow","Alt-Svc","Alt-Used","Authorization","Cache-Control","Clear-Site-Data","Connection","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-Location","Content-Range","Content-Security-Policy","Content-Security-Policy-Report-Only","Content-Type","Cookie","Cross-Origin-Embedder-Policy","Cross-Origin-Opener-Policy","Cross-Origin-Resource-Policy","Date","Device-Memory","Downlink","ECT","ETag","Expect","Expect-CT","Expires","Forwarded","From","Host","If-Match","If-Modified-Since","If-None-Match","If-Range","If-Unmodified-Since","Keep-Alive","Last-Modified","Link","Location","Max-Forwards","Origin","Permissions-Policy","Pragma","Proxy-Authenticate","Proxy-Authorization","RTT","Range","Referer","Referrer-Policy","Refresh","Retry-After","Sec-WebSocket-Accept","Sec-WebSocket-Extensions","Sec-WebSocket-Key","Sec-WebSocket-Protocol","Sec-WebSocket-Version","Server","Server-Timing","Service-Worker-Allowed","Service-Worker-Navigation-Preload","Set-Cookie","SourceMap","Strict-Transport-Security","Supports-Loading-Mode","TE","Timing-Allow-Origin","Trailer","Transfer-Encoding","Upgrade","Upgrade-Insecure-Requests","User-Agent","Vary","Via","WWW-Authenticate","X-Content-Type-Options","X-DNS-Prefetch-Control","X-Frame-Options","X-Permitted-Cross-Domain-Policies","X-Powered-By","X-Requested-With","X-XSS-Protection"];for(let e=0;e{"use strict";var eB=require("assert"),{kDestroyed:AB,kBodyUsed:XI}=de(),{IncomingMessage:Sx}=require("http"),Wn=require("stream"),Fx=require("net"),{InvalidArgumentError:je}=le(),{Blob:zI}=require("buffer"),ja=require("util"),{stringify:Nx}=require("querystring"),{headerNameLowerCasedRecord:xx}=ZI(),[xu,$I]=process.versions.node.split(".").map(e=>Number(e));function Lx(){}function Lu(e){return e&&typeof e=="object"&&typeof e.pipe=="function"&&typeof e.on=="function"}function tB(e){return zI&&e instanceof zI||e&&typeof e=="object"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function Ux(e,A){if(e.includes("?")||e.includes("#"))throw new Error('Query params cannot be passed when url already contains "?" or "#".');let t=Nx(A);return t&&(e+="?"+t),e}function rB(e){if(typeof e=="string"){if(e=new URL(e),!/^https?:/.test(e.origin||e.protocol))throw new je("Invalid URL protocol: the URL must start with `http:` or `https:`.");return e}if(!e||typeof e!="object")throw new je("Invalid URL: The URL argument must be a non-null object.");if(!/^https?:/.test(e.origin||e.protocol))throw new je("Invalid URL protocol: the URL must start with `http:` or `https:`.");if(!(e instanceof URL)){if(e.port!=null&&e.port!==""&&!Number.isFinite(parseInt(e.port)))throw new je("Invalid URL: port must be a valid integer or a string representation of an integer.");if(e.path!=null&&typeof e.path!="string")throw new je("Invalid URL path: the path must be a string or null/undefined.");if(e.pathname!=null&&typeof e.pathname!="string")throw new je("Invalid URL pathname: the pathname must be a string or null/undefined.");if(e.hostname!=null&&typeof e.hostname!="string")throw new je("Invalid URL hostname: the hostname must be a string or null/undefined.");if(e.origin!=null&&typeof e.origin!="string")throw new je("Invalid URL origin: the origin must be a string or null/undefined.");let A=e.port!=null?e.port:e.protocol==="https:"?443:80,t=e.origin!=null?e.origin:`${e.protocol}//${e.hostname}:${A}`,r=e.path!=null?e.path:`${e.pathname||""}${e.search||""}`;t.endsWith("/")&&(t=t.substring(0,t.length-1)),r&&!r.startsWith("/")&&(r=`/${r}`),e=new URL(t+r)}return e}function Tx(e){if(e=rB(e),e.pathname!=="/"||e.search||e.hash)throw new je("invalid url");return e}function Mx(e){if(e[0]==="["){let t=e.indexOf("]");return eB(t!==-1),e.substring(1,t)}let A=e.indexOf(":");return A===-1?e:e.substring(0,A)}function vx(e){if(!e)return null;eB.strictEqual(typeof e,"string");let A=Mx(e);return Fx.isIP(A)?"":A}function Px(e){return JSON.parse(JSON.stringify(e))}function Gx(e){return e!=null&&typeof e[Symbol.asyncIterator]=="function"}function Jx(e){return e!=null&&(typeof e[Symbol.iterator]=="function"||typeof e[Symbol.asyncIterator]=="function")}function Yx(e){if(e==null)return 0;if(Lu(e)){let A=e._readableState;return A&&A.objectMode===!1&&A.ended===!0&&Number.isFinite(A.length)?A.length:null}else{if(tB(e))return e.size!=null?e.size:null;if(iB(e))return e.byteLength}return null}function Uu(e){return!e||!!(e.destroyed||e[AB])}function nB(e){let A=e&&e._readableState;return Uu(e)&&A&&!A.endEmitted}function Vx(e,A){e==null||!Lu(e)||Uu(e)||(typeof e.destroy=="function"?(Object.getPrototypeOf(e).constructor===Sx&&(e.socket=null),e.destroy(A)):A&&process.nextTick((t,r)=>{t.emit("error",r)},e,A),e.destroyed!==!0&&(e[AB]=!0))}var qx=/timeout=(\d+)/;function Ox(e){let A=e.toString().match(qx);return A?parseInt(A[1],10)*1e3:null}function Hx(e){return xx[e]||e.toLowerCase()}function Wx(e,A={}){if(!Array.isArray(e))return e;for(let t=0;ti.toString("utf8")):A[r]=e[t+1].toString("utf8")}return"content-length"in A&&"content-disposition"in A&&(A["content-disposition"]=Buffer.from(A["content-disposition"]).toString("latin1")),A}function _x(e){let A=[],t=!1,r=-1;for(let n=0;n{t.close()});else{let i=Buffer.isBuffer(n)?n:Buffer.from(n);t.enqueue(new Uint8Array(i))}return t.desiredSize>0},async cancel(t){await A.return()}},0)}function AL(e){return e&&typeof e=="object"&&typeof e.append=="function"&&typeof e.delete=="function"&&typeof e.get=="function"&&typeof e.getAll=="function"&&typeof e.has=="function"&&typeof e.set=="function"&&e[Symbol.toStringTag]==="FormData"}function tL(e){if(e){if(typeof e.throwIfAborted=="function")e.throwIfAborted();else if(e.aborted){let A=new Error("The operation was aborted");throw A.name="AbortError",A}}}function rL(e,A){return"addEventListener"in e?(e.addEventListener("abort",A,{once:!0}),()=>e.removeEventListener("abort",A)):(e.addListener("abort",A),()=>e.removeListener("abort",A))}var nL=!!String.prototype.toWellFormed;function iL(e){return nL?`${e}`.toWellFormed():ja.toUSVString?ja.toUSVString(e):`${e}`}function sL(e){if(e==null||e==="")return{start:0,end:null,size:null};let A=e?e.match(/^bytes (\d+)-(\d+)\/(\d+)?$/):null;return A?{start:parseInt(A[1]),end:A[2]?parseInt(A[2]):null,size:A[3]?parseInt(A[3]):null}:null}var sB=Object.create(null);sB.enumerable=!0;oB.exports={kEnumerableProperty:sB,nop:Lx,isDisturbed:Kx,isErrored:Zx,isReadable:Xx,toUSVString:iL,isReadableAborted:nB,isBlobLike:tB,parseOrigin:Tx,parseURL:rB,getServerName:vx,isStream:Lu,isIterable:Jx,isAsyncIterable:Gx,isDestroyed:Uu,headerNameToString:Hx,parseRawHeaders:_x,parseHeaders:Wx,parseKeepAliveTimeout:Ox,destroy:Vx,bodyLength:Yx,deepClone:Px,ReadableStreamFrom:eL,isBuffer:iB,validateHandler:jx,getSocketInfo:zx,isFormDataLike:AL,buildURL:Ux,throwIfAborted:tL,addAbortListener:rL,parseRangeHeader:sL,nodeMajor:xu,nodeMinor:$I,nodeHasAutoSelectFamily:xu>18||xu===18&&$I>=13,safeHTTPMethods:["GET","HEAD","OPTIONS","TRACE"]}});var gB=Q((z4,cB)=>{"use strict";var Tu=Date.now(),Br,pr=[];function oL(){Tu=Date.now();let e=pr.length,A=0;for(;A0&&Tu>=t.state&&(t.state=-1,t.callback(t.opaque)),t.state===-1?(t.state=-2,A!==e-1?pr[A]=pr.pop():pr.pop(),e-=1):A+=1}pr.length>0&&aB()}function aB(){Br&&Br.refresh?Br.refresh():(clearTimeout(Br),Br=setTimeout(oL,1e3),Br.unref&&Br.unref())}var Ka=class{constructor(A,t,r){this.callback=A,this.delay=t,this.opaque=r,this.state=-2,this.refresh()}refresh(){this.state===-2&&(pr.push(this),(!Br||pr.length===1)&&aB()),this.state=0}clear(){this.state=-1}};cB.exports={setTimeout(e,A,t){return A<1e3?setTimeout(e,A,t):new Ka(e,A,t)},clearTimeout(e){e instanceof Ka?e.clear():clearTimeout(e)}}});var Mu=Q(($4,lB)=>{"use strict";var aL=require("events").EventEmitter,cL=require("util").inherits;function Vr(e){if(typeof e=="string"&&(e=Buffer.from(e)),!Buffer.isBuffer(e))throw new TypeError("The needle has to be a String or a Buffer.");let A=e.length;if(A===0)throw new Error("The needle cannot be an empty String/Buffer.");if(A>256)throw new Error("The needle cannot have a length bigger than 256.");this.maxMatches=1/0,this.matches=0,this._occ=new Array(256).fill(A),this._lookbehind_size=0,this._needle=e,this._bufpos=0,this._lookbehind=Buffer.alloc(A);for(var t=0;t=0)this.emit("info",!1,this._lookbehind,0,this._lookbehind_size),this._lookbehind_size=0;else{let o=this._lookbehind_size+i;return o>0&&this.emit("info",!1,this._lookbehind,0,o),this._lookbehind.copy(this._lookbehind,0,o,this._lookbehind_size-o),this._lookbehind_size-=o,e.copy(this._lookbehind,this._lookbehind_size),this._lookbehind_size+=A,this._bufpos=A,A}}if(i+=(i>=0)*this._bufpos,e.indexOf(t,i)!==-1)return i=e.indexOf(t,i),++this.matches,i>0?this.emit("info",!0,e,this._bufpos,i):this.emit("info",!0),this._bufpos=i+r;for(i=A-r;i0&&this.emit("info",!1,e,this._bufpos,i{"use strict";var gL=require("util").inherits,uB=require("stream").Readable;function vu(e){uB.call(this,e)}gL(vu,uB);vu.prototype._read=function(e){};EB.exports=vu});var Za=Q((Aj,dB)=>{"use strict";dB.exports=function(A,t,r){if(!A||A[t]===void 0||A[t]===null)return r;if(typeof A[t]!="number"||isNaN(A[t]))throw new TypeError("Limit "+t+" is not a valid number");return A[t]}});var IB=Q((tj,fB)=>{"use strict";var CB=require("events").EventEmitter,lL=require("util").inherits,QB=Za(),uL=Mu(),EL=Buffer.from(`\r +\r +`),hL=/\r\n/g,dL=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function _n(e){CB.call(this),e=e||{};let A=this;this.nread=0,this.maxed=!1,this.npairs=0,this.maxHeaderPairs=QB(e,"maxHeaderPairs",2e3),this.maxHeaderSize=QB(e,"maxHeaderSize",80*1024),this.buffer="",this.header={},this.finished=!1,this.ss=new uL(EL),this.ss.on("info",function(t,r,n,i){r&&!A.maxed&&(A.nread+i-n>=A.maxHeaderSize?(i=A.maxHeaderSize-A.nread+n,A.nread=A.maxHeaderSize,A.maxed=!0):A.nread+=i-n,A.buffer+=r.toString("binary",n,i)),t&&A._finish()})}lL(_n,CB);_n.prototype.push=function(e){let A=this.ss.push(e);if(this.finished)return A};_n.prototype.reset=function(){this.finished=!1,this.buffer="",this.header={},this.ss.reset()};_n.prototype._finish=function(){this.buffer&&this._parseHeader(),this.ss.matches=this.ss.maxMatches;let e=this.header;this.header={},this.buffer="",this.finished=!0,this.nread=this.npairs=0,this.maxed=!1,this.emit("header",e)};_n.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs)return;let e=this.buffer.split(hL),A=e.length,t,r;for(var n=0;n{"use strict";var Pu=require("stream").Writable,QL=require("util").inherits,CL=Mu(),BB=hB(),fL=IB(),IL=45,BL=Buffer.from("-"),pL=Buffer.from(`\r +`),mL=function(){};function zA(e){if(!(this instanceof zA))return new zA(e);if(Pu.call(this,e),!e||!e.headerFirst&&typeof e.boundary!="string")throw new TypeError("Boundary required");typeof e.boundary=="string"?this.setBoundary(e.boundary):this._bparser=void 0,this._headerFirst=e.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:e.partHwm},this._pause=!1;let A=this;this._hparser=new fL(e),this._hparser.on("header",function(t){A._inHeader=!1,A._part.emit("header",t)})}QL(zA,Pu);zA.prototype.emit=function(e){if(e==="finish"&&!this._realFinish){if(!this._finished){let A=this;process.nextTick(function(){if(A.emit("error",new Error("Unexpected end of multipart data")),A._part&&!A._ignoreData){let t=A._isPreamble?"Preamble":"Part";A._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data")),A._part.push(null),process.nextTick(function(){A._realFinish=!0,A.emit("finish"),A._realFinish=!1});return}A._realFinish=!0,A.emit("finish"),A._realFinish=!1})}}else Pu.prototype.emit.apply(this,arguments)};zA.prototype._write=function(e,A,t){if(!this._hparser&&!this._bparser)return t();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new BB(this._partOpts),this._events.preamble?this.emit("preamble",this._part):this._ignore());let r=this._hparser.push(e);if(!this._inHeader&&r!==void 0&&r{"use strict";var mB=new TextDecoder("utf-8"),Xa=new Map([["utf-8",mB],["utf8",mB]]);function yL(e,A,t){if(e)if(Xa.has(t))try{return Xa.get(t).decode(Buffer.from(e,A))}catch{}else try{return Xa.set(t,new TextDecoder(t)),Xa.get(t).decode(Buffer.from(e,A))}catch{}return e}yB.exports=yL});var Ju=Q((ij,DB)=>{"use strict";var $a=za(),wB=/%([a-fA-F0-9]{2})/g;function RB(e,A){return String.fromCharCode(parseInt(A,16))}function wL(e){let A=[],t="key",r="",n=!1,i=!1,s=0,o="";for(var a=0,c=e.length;a{"use strict";bB.exports=function(A){if(typeof A!="string")return"";for(var t=A.length-1;t>=0;--t)switch(A.charCodeAt(t)){case 47:case 92:return A=A.slice(t+1),A===".."||A==="."?"":A}return A===".."||A==="."?"":A}});var xB=Q((oj,NB)=>{"use strict";var{Readable:FB}=require("stream"),{inherits:RL}=require("util"),DL=Gu(),SB=Ju(),bL=za(),kL=kB(),qr=Za(),SL=/^boundary$/i,FL=/^form-data$/i,NL=/^charset$/i,xL=/^filename$/i,LL=/^name$/i;ec.detect=/^multipart\/form-data/i;function ec(e,A){let t,r,n=this,i,s=A.limits,o=A.isPartAFile||((ee,Y,ce)=>Y==="application/octet-stream"||ce!==void 0),a=A.parsedConType||[],c=A.defCharset||"utf8",g=A.preservePath,l={highWaterMark:A.fileHwm};for(t=0,r=a.length;tI)return n.parser.removeListener("part",ee),n.parser.on("part",jn),e.hitPartsLimit=!0,e.emit("partsLimit"),jn(Y);if(q){let ce=q;ce.emit("end"),ce.removeAllListeners("end")}Y.on("header",function(ce){let Je,fe,P,To,Mo,qi,Oi=0;if(ce["content-type"]&&(P=SB(ce["content-type"][0]),P[0])){for(Je=P[0].toLowerCase(),t=0,r=P.length;th){let xt=h-Oi+st.length;xt>0&&Ye.push(st.slice(0,xt)),Ye.truncated=!0,Ye.bytesRead=h,Y.removeAllListeners("data"),Ye.emit("limit");return}else Ye.push(st)||(n._pause=!0);Ye.bytesRead=Oi},Og=function(){ne=void 0,Ye.push(null)}}else{if(K===C)return e.hitFieldsLimit||(e.hitFieldsLimit=!0,e.emit("fieldsLimit")),jn(Y);++K,++H;let Ye="",st=!1;q=Y,qg=function(xt){if((Oi+=xt.length)>E){let SD=E-(Oi-xt.length);Ye+=xt.toString("binary",0,SD),st=!0,Y.removeAllListeners("data")}else Ye+=xt.toString("binary")},Og=function(){q=void 0,Ye.length&&(Ye=bL(Ye,"binary",To)),e.emit("field",fe,Ye,!1,st,Mo,Je),--H,u()}}Y._readableState.sync=!1,Y.on("data",qg),Y.on("end",Og)}).on("error",function(ce){ne&&ne.emit("error",ce)})}).on("error",function(ee){e.emit("error",ee)}).on("finish",function(){ae=!0,u()})}ec.prototype.write=function(e,A){let t=this.parser.write(e);t&&!this._pause?A():(this._needDrain=!t,this._cb=A)};ec.prototype.end=function(){let e=this;e.parser.writable?e.parser.end():e._boy._done||process.nextTick(function(){e._boy._done=!0,e._boy.emit("finish")})};function jn(e){e.resume()}function Yu(e){FB.call(this,e),this.bytesRead=0,this.truncated=!1}RL(Yu,FB);Yu.prototype._read=function(e){};NB.exports=ec});var UB=Q((aj,LB)=>{"use strict";var UL=/\+/g,TL=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];function Vu(){this.buffer=void 0}Vu.prototype.write=function(e){e=e.replace(UL," ");let A="",t=0,r=0,n=e.length;for(;tr&&(A+=e.substring(r,t),r=t),this.buffer="",++r);return r{"use strict";var ML=UB(),Kn=za(),qu=Za(),vL=/^charset$/i;Ac.detect=/^application\/x-www-form-urlencoded/i;function Ac(e,A){let t=A.limits,r=A.parsedConType;this.boy=e,this.fieldSizeLimit=qu(t,"fieldSize",1*1024*1024),this.fieldNameSizeLimit=qu(t,"fieldNameSize",100),this.fieldsLimit=qu(t,"fields",1/0);let n;for(var i=0,s=r.length;ii&&(this._key+=this.decoder.write(e.toString("binary",i,t))),this._state="val",this._hitLimit=!1,this._checkingBytes=!0,this._val="",this._bytesVal=0,this._valTrunc=!1,this.decoder.reset(),i=t+1;else if(r!==void 0){++this._fields;let o,a=this._keyTrunc;if(r>i?o=this._key+=this.decoder.write(e.toString("binary",i,r)):o=this._key,this._hitLimit=!1,this._checkingBytes=!0,this._key="",this._bytesKey=0,this._keyTrunc=!1,this.decoder.reset(),o.length&&this.boy.emit("field",Kn(o,"binary",this.charset),"",a,!1),i=r+1,this._fields===this.fieldsLimit)return A()}else this._hitLimit?(n>i&&(this._key+=this.decoder.write(e.toString("binary",i,n))),i=n,(this._bytesKey=this._key.length)===this.fieldNameSizeLimit&&(this._checkingBytes=!1,this._keyTrunc=!0)):(ii&&(this._val+=this.decoder.write(e.toString("binary",i,r))),this.boy.emit("field",Kn(this._key,"binary",this.charset),Kn(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc),this._state="key",this._hitLimit=!1,this._checkingBytes=!0,this._key="",this._bytesKey=0,this._keyTrunc=!1,this.decoder.reset(),i=r+1,this._fields===this.fieldsLimit)return A()}else this._hitLimit?(n>i&&(this._val+=this.decoder.write(e.toString("binary",i,n))),i=n,(this._val===""&&this.fieldSizeLimit===0||(this._bytesVal=this._val.length)===this.fieldSizeLimit)&&(this._checkingBytes=!1,this._valTrunc=!0)):(i0?this.boy.emit("field",Kn(this._key,"binary",this.charset),"",this._keyTrunc,!1):this._state==="val"&&this.boy.emit("field",Kn(this._key,"binary",this.charset),Kn(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc),this.boy._done=!0,this.boy.emit("finish"))};TB.exports=Ac});var GB=Q((gj,Ss)=>{"use strict";var Ou=require("stream").Writable,{inherits:PL}=require("util"),GL=Gu(),vB=xB(),PB=MB(),JL=Ju();function Vt(e){if(!(this instanceof Vt))return new Vt(e);if(typeof e!="object")throw new TypeError("Busboy expected an options-Object.");if(typeof e.headers!="object")throw new TypeError("Busboy expected an options-Object with headers-attribute.");if(typeof e.headers["content-type"]!="string")throw new TypeError("Missing Content-Type-header.");let{headers:A,...t}=e;this.opts={autoDestroy:!1,...t},Ou.call(this,this.opts),this._done=!1,this._parser=this.getParserByHeaders(A),this._finished=!1}PL(Vt,Ou);Vt.prototype.emit=function(e){if(e==="finish"){if(this._done){if(this._finished)return}else{this._parser?.end();return}this._finished=!0}Ou.prototype.emit.apply(this,arguments)};Vt.prototype.getParserByHeaders=function(e){let A=JL(e["content-type"]),t={defCharset:this.opts.defCharset,fileHwm:this.opts.fileHwm,headers:e,highWaterMark:this.opts.highWaterMark,isPartAFile:this.opts.isPartAFile,limits:this.opts.limits,parsedConType:A,preservePath:this.opts.preservePath};if(vB.detect.test(A[0]))return new vB(this,t);if(PB.detect.test(A[0]))return new PB(this,t);throw new Error("Unsupported Content-Type.")};Vt.prototype._write=function(e,A,t){this._parser.write(e,t)};Ss.exports=Vt;Ss.exports.default=Vt;Ss.exports.Busboy=Vt;Ss.exports.Dicer=GL});var mr=Q((lj,_B)=>{"use strict";var{MessageChannel:YL,receiveMessageOnPort:VL}=require("worker_threads"),JB=["GET","HEAD","POST"],qL=new Set(JB),OL=[101,204,205,304],YB=[301,302,303,307,308],HL=new Set(YB),VB=["1","7","9","11","13","15","17","19","20","21","22","23","25","37","42","43","53","69","77","79","87","95","101","102","103","104","109","110","111","113","115","117","119","123","135","137","139","143","161","179","389","427","465","512","513","514","515","526","530","531","532","540","548","554","556","563","587","601","636","989","990","993","995","1719","1720","1723","2049","3659","4045","5060","5061","6000","6566","6665","6666","6667","6668","6669","6697","10080"],WL=new Set(VB),qB=["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"],_L=new Set(qB),jL=["follow","manual","error"],OB=["GET","HEAD","OPTIONS","TRACE"],KL=new Set(OB),ZL=["navigate","same-origin","no-cors","cors"],XL=["omit","same-origin","include"],zL=["default","no-store","reload","no-cache","force-cache","only-if-cached"],$L=["content-encoding","content-language","content-location","content-type","content-length"],eU=["half"],HB=["CONNECT","TRACE","TRACK"],AU=new Set(HB),WB=["audio","audioworklet","font","image","manifest","paintworklet","script","style","track","video","xslt",""],tU=new Set(WB),rU=globalThis.DOMException??(()=>{try{atob("~")}catch(e){return Object.getPrototypeOf(e).constructor}})(),Zn,nU=globalThis.structuredClone??function(A,t=void 0){if(arguments.length===0)throw new TypeError("missing argument");return Zn||(Zn=new YL),Zn.port1.unref(),Zn.port2.unref(),Zn.port1.postMessage(A,t?.transfer),VL(Zn.port2).message};_B.exports={DOMException:rU,structuredClone:nU,subresource:WB,forbiddenMethods:HB,requestBodyHeader:$L,referrerPolicy:qB,requestRedirect:jL,requestMode:ZL,requestCredentials:XL,requestCache:zL,redirectStatus:YB,corsSafeListedMethods:JB,nullBodyStatus:OL,safeMethods:OB,badPorts:VB,requestDuplex:eU,subresourceSet:tU,badPortsSet:WL,redirectStatusSet:HL,corsSafeListedMethodsSet:qL,safeMethodsSet:KL,forbiddenMethodsSet:AU,referrerPolicySet:_L}});var Xn=Q((uj,jB)=>{"use strict";var Hu=Symbol.for("undici.globalOrigin.1");function iU(){return globalThis[Hu]}function sU(e){if(e===void 0){Object.defineProperty(globalThis,Hu,{value:void 0,writable:!0,enumerable:!1,configurable:!1});return}let A=new URL(e);if(A.protocol!=="http:"&&A.protocol!=="https:")throw new TypeError(`Only http & https urls are allowed, received ${A.protocol}`);Object.defineProperty(globalThis,Hu,{value:A,writable:!0,enumerable:!1,configurable:!1})}jB.exports={getGlobalOrigin:iU,setGlobalOrigin:sU}});var YA=Q((Ej,tp)=>{"use strict";var{redirectStatusSet:oU,referrerPolicySet:aU,badPortsSet:cU}=mr(),{getGlobalOrigin:gU}=Xn(),{performance:lU}=require("perf_hooks"),{isBlobLike:uU,toUSVString:EU,ReadableStreamFrom:hU}=W(),zn=require("assert"),{isUint8Array:dU}=require("util/types"),KB=[],tc;try{tc=require("crypto");let e=["sha256","sha384","sha512"];KB=tc.getHashes().filter(A=>e.includes(A))}catch{}function ZB(e){let A=e.urlList,t=A.length;return t===0?null:A[t-1].toString()}function QU(e,A){if(!oU.has(e.status))return null;let t=e.headersList.get("location");return t!==null&&zB(t)&&(t=new URL(t,ZB(e))),t&&!t.hash&&(t.hash=A),t}function Ns(e){return e.urlList[e.urlList.length-1]}function CU(e){let A=Ns(e);return Ap(A)&&cU.has(A.port)?"blocked":"allowed"}function fU(e){return e instanceof Error||e?.constructor?.name==="Error"||e?.constructor?.name==="DOMException"}function IU(e){for(let A=0;A=32&&t<=126||t>=128&&t<=255))return!1}return!0}function BU(e){switch(e){case 34:case 40:case 41:case 44:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 123:case 125:return!1;default:return e>=33&&e<=126}}function XB(e){if(e.length===0)return!1;for(let A=0;A0)for(let i=r.length;i!==0;i--){let s=r[i-1].trim();if(aU.has(s)){n=s;break}}n!==""&&(e.referrerPolicy=n)}function yU(){return"allowed"}function wU(){return"success"}function RU(){return"success"}function DU(e){let A=null;A=e.mode,e.headersList.set("sec-fetch-mode",A)}function bU(e){let A=e.origin;if(e.responseTainting==="cors"||e.mode==="websocket")A&&e.headersList.append("origin",A);else if(e.method!=="GET"&&e.method!=="HEAD"){switch(e.referrerPolicy){case"no-referrer":A=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":e.origin&&ju(e.origin)&&!ju(Ns(e))&&(A=null);break;case"same-origin":rc(e,Ns(e))||(A=null);break;default:}A&&e.headersList.append("origin",A)}}function kU(e){return lU.now()}function SU(e){return{startTime:e.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:e.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}function FU(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function NU(e){return{referrerPolicy:e.referrerPolicy}}function xU(e){let A=e.referrerPolicy;zn(A);let t=null;if(e.referrer==="client"){let o=gU();if(!o||o.origin==="null")return"no-referrer";t=new URL(o)}else e.referrer instanceof URL&&(t=e.referrer);let r=Wu(t),n=Wu(t,!0);r.toString().length>4096&&(r=n);let i=rc(e,r),s=Fs(r)&&!Fs(e.url);switch(A){case"origin":return n??Wu(t,!0);case"unsafe-url":return r;case"same-origin":return i?n:"no-referrer";case"origin-when-cross-origin":return i?r:n;case"strict-origin-when-cross-origin":{let o=Ns(e);return rc(r,o)?r:Fs(r)&&!Fs(o)?"no-referrer":n}case"strict-origin":case"no-referrer-when-downgrade":default:return s?"no-referrer":n}}function Wu(e,A){return zn(e instanceof URL),e.protocol==="file:"||e.protocol==="about:"||e.protocol==="blank:"?"no-referrer":(e.username="",e.password="",e.hash="",A&&(e.pathname="",e.search=""),e)}function Fs(e){if(!(e instanceof URL))return!1;if(e.href==="about:blank"||e.href==="about:srcdoc"||e.protocol==="data:"||e.protocol==="file:")return!0;return A(e.origin);function A(t){if(t==null||t==="null")return!1;let r=new URL(t);return!!(r.protocol==="https:"||r.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(r.hostname)||r.hostname==="localhost"||r.hostname.includes("localhost.")||r.hostname.endsWith(".localhost"))}}function LU(e,A){if(tc===void 0)return!0;let t=$B(A);if(t==="no metadata"||t.length===0)return!0;let r=TU(t),n=MU(t,r);for(let i of n){let s=i.algo,o=i.hash,a=tc.createHash(s).update(e).digest("base64");if(a[a.length-1]==="="&&(a[a.length-2]==="="?a=a.slice(0,-2):a=a.slice(0,-1)),vU(a,o))return!0}return!1}var UU=/(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function $B(e){let A=[],t=!0;for(let r of e.split(" ")){t=!1;let n=UU.exec(r);if(n===null||n.groups===void 0||n.groups.algo===void 0)continue;let i=n.groups.algo.toLowerCase();KB.includes(i)&&A.push(n.groups)}return t===!0?"no metadata":A}function TU(e){let A=e[0].algo;if(A[3]==="5")return A;for(let t=1;t{e=r,A=n}),resolve:e,reject:A}}function JU(e){return e.controller.state==="aborted"}function YU(e){return e.controller.state==="aborted"||e.controller.state==="terminated"}var Ku={delete:"DELETE",DELETE:"DELETE",get:"GET",GET:"GET",head:"HEAD",HEAD:"HEAD",options:"OPTIONS",OPTIONS:"OPTIONS",post:"POST",POST:"POST",put:"PUT",PUT:"PUT"};Object.setPrototypeOf(Ku,null);function VU(e){return Ku[e.toLowerCase()]??e}function qU(e){let A=JSON.stringify(e);if(A===void 0)throw new TypeError("Value is not JSON serializable");return zn(typeof A=="string"),A}var OU=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function HU(e,A,t){let r={index:0,kind:t,target:e},n={next(){if(Object.getPrototypeOf(this)!==n)throw new TypeError(`'next' called on an object that does not implement interface ${A} Iterator.`);let{index:i,kind:s,target:o}=r,a=o(),c=a.length;if(i>=c)return{value:void 0,done:!0};let g=a[i];return r.index=i+1,WU(g,s)},[Symbol.toStringTag]:`${A} Iterator`};return Object.setPrototypeOf(n,OU),Object.setPrototypeOf({},n)}function WU(e,A){let t;switch(A){case"key":{t=e[0];break}case"value":{t=e[1];break}case"key+value":{t=e;break}}return{value:t,done:!1}}async function _U(e,A,t){let r=A,n=t,i;try{i=e.stream.getReader()}catch(s){n(s);return}try{let s=await ep(i);r(s)}catch(s){n(s)}}var _u=globalThis.ReadableStream;function jU(e){return _u||(_u=require("stream/web").ReadableStream),e instanceof _u||e[Symbol.toStringTag]==="ReadableStream"&&typeof e.tee=="function"}var KU=65535;function ZU(e){return e.lengthA+String.fromCharCode(t),"")}function XU(e){try{e.close()}catch(A){if(!A.message.includes("Controller is already closed"))throw A}}function zU(e){for(let A=0;AObject.prototype.hasOwnProperty.call(e,A));tp.exports={isAborted:JU,isCancelled:YU,createDeferredPromise:GU,ReadableStreamFrom:hU,toUSVString:EU,tryUpgradeRequestToAPotentiallyTrustworthyURL:PU,coarsenedSharedCurrentTime:kU,determineRequestsReferrer:xU,makePolicyContainer:FU,clonePolicyContainer:NU,appendFetchMetadata:DU,appendRequestOriginHeader:bU,TAOCheck:RU,corsCheck:wU,crossOriginResourcePolicyCheck:yU,createOpaqueTimingInfo:SU,setRequestReferrerPolicyOnRedirect:mU,isValidHTTPToken:XB,requestBadPort:CU,requestCurrentURL:Ns,responseURL:ZB,responseLocationURL:QU,isBlobLike:uU,isURLPotentiallyTrustworthy:Fs,isValidReasonPhrase:IU,sameOrigin:rc,normalizeMethod:VU,serializeJavascriptValueToJSONString:qU,makeIterator:HU,isValidHeaderName:pU,isValidHeaderValue:zB,hasOwn:eT,isErrorLike:fU,fullyReadBody:_U,bytesMatch:LU,isReadableStreamLike:jU,readableStreamClose:XU,isomorphicEncode:zU,isomorphicDecode:ZU,urlIsLocal:$U,urlHasHttpsScheme:ju,urlIsHttpHttpsScheme:Ap,readAllBytes:ep,normalizeMethodRecord:Ku,parseMetadata:$B}});var qt=Q((hj,rp)=>{"use strict";rp.exports={kUrl:Symbol("url"),kHeaders:Symbol("headers"),kSignal:Symbol("signal"),kState:Symbol("state"),kGuard:Symbol("guard"),kRealm:Symbol("realm")}});var iA=Q((dj,ip)=>{"use strict";var{types:It}=require("util"),{hasOwn:np,toUSVString:AT}=YA(),R={};R.converters={};R.util={};R.errors={};R.errors.exception=function(e){return new TypeError(`${e.header}: ${e.message}`)};R.errors.conversionFailed=function(e){let A=e.types.length===1?"":" one of",t=`${e.argument} could not be converted to${A}: ${e.types.join(", ")}.`;return R.errors.exception({header:e.prefix,message:t})};R.errors.invalidArgument=function(e){return R.errors.exception({header:e.prefix,message:`"${e.value}" is an invalid ${e.type}.`})};R.brandCheck=function(e,A,t=void 0){if(t?.strict!==!1&&!(e instanceof A))throw new TypeError("Illegal invocation");return e?.[Symbol.toStringTag]===A.prototype[Symbol.toStringTag]};R.argumentLengthCheck=function({length:e},A,t){if(en)throw R.errors.exception({header:"Integer conversion",message:`Value must be between ${i}-${n}, got ${s}.`});return s}return!Number.isNaN(s)&&r.clamp===!0?(s=Math.min(Math.max(s,i),n),Math.floor(s)%2===0?s=Math.floor(s):s=Math.ceil(s),s):Number.isNaN(s)||s===0&&Object.is(0,s)||s===Number.POSITIVE_INFINITY||s===Number.NEGATIVE_INFINITY?0:(s=R.util.IntegerPart(s),s=s%Math.pow(2,A),t==="signed"&&s>=Math.pow(2,A)-1?s-Math.pow(2,A):s)};R.util.IntegerPart=function(e){let A=Math.floor(Math.abs(e));return e<0?-1*A:A};R.sequenceConverter=function(e){return A=>{if(R.util.Type(A)!=="Object")throw R.errors.exception({header:"Sequence",message:`Value of type ${R.util.Type(A)} is not an Object.`});let t=A?.[Symbol.iterator]?.(),r=[];if(t===void 0||typeof t.next!="function")throw R.errors.exception({header:"Sequence",message:"Object is not an iterator."});for(;;){let{done:n,value:i}=t.next();if(n)break;r.push(e(i))}return r}};R.recordConverter=function(e,A){return t=>{if(R.util.Type(t)!=="Object")throw R.errors.exception({header:"Record",message:`Value of type ${R.util.Type(t)} is not an Object.`});let r={};if(!It.isProxy(t)){let i=Object.keys(t);for(let s of i){let o=e(s),a=A(t[s]);r[o]=a}return r}let n=Reflect.ownKeys(t);for(let i of n)if(Reflect.getOwnPropertyDescriptor(t,i)?.enumerable){let o=e(i),a=A(t[i]);r[o]=a}return r}};R.interfaceConverter=function(e){return(A,t={})=>{if(t.strict!==!1&&!(A instanceof e))throw R.errors.exception({header:e.name,message:`Expected ${A} to be an instance of ${e.name}.`});return A}};R.dictionaryConverter=function(e){return A=>{let t=R.util.Type(A),r={};if(t==="Null"||t==="Undefined")return r;if(t!=="Object")throw R.errors.exception({header:"Dictionary",message:`Expected ${A} to be one of: Null, Undefined, Object.`});for(let n of e){let{key:i,defaultValue:s,required:o,converter:a}=n;if(o===!0&&!np(A,i))throw R.errors.exception({header:"Dictionary",message:`Missing required key "${i}".`});let c=A[i],g=np(n,"defaultValue");if(g&&c!==null&&(c=c??s),o||g||c!==void 0){if(c=a(c),n.allowedValues&&!n.allowedValues.includes(c))throw R.errors.exception({header:"Dictionary",message:`${c} is not an accepted type. Expected one of ${n.allowedValues.join(", ")}.`});r[i]=c}}return r}};R.nullableConverter=function(e){return A=>A===null?A:e(A)};R.converters.DOMString=function(e,A={}){if(e===null&&A.legacyNullToEmptyString)return"";if(typeof e=="symbol")throw new TypeError("Could not convert argument of type symbol to string.");return String(e)};R.converters.ByteString=function(e){let A=R.converters.DOMString(e);for(let t=0;t255)throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${t} has a value of ${A.charCodeAt(t)} which is greater than 255.`);return A};R.converters.USVString=AT;R.converters.boolean=function(e){return!!e};R.converters.any=function(e){return e};R.converters["long long"]=function(e){return R.util.ConvertToInt(e,64,"signed")};R.converters["unsigned long long"]=function(e){return R.util.ConvertToInt(e,64,"unsigned")};R.converters["unsigned long"]=function(e){return R.util.ConvertToInt(e,32,"unsigned")};R.converters["unsigned short"]=function(e,A){return R.util.ConvertToInt(e,16,"unsigned",A)};R.converters.ArrayBuffer=function(e,A={}){if(R.util.Type(e)!=="Object"||!It.isAnyArrayBuffer(e))throw R.errors.conversionFailed({prefix:`${e}`,argument:`${e}`,types:["ArrayBuffer"]});if(A.allowShared===!1&&It.isSharedArrayBuffer(e))throw R.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});return e};R.converters.TypedArray=function(e,A,t={}){if(R.util.Type(e)!=="Object"||!It.isTypedArray(e)||e.constructor.name!==A.name)throw R.errors.conversionFailed({prefix:`${A.name}`,argument:`${e}`,types:[A.name]});if(t.allowShared===!1&&It.isSharedArrayBuffer(e.buffer))throw R.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});return e};R.converters.DataView=function(e,A={}){if(R.util.Type(e)!=="Object"||!It.isDataView(e))throw R.errors.exception({header:"DataView",message:"Object is not a DataView."});if(A.allowShared===!1&&It.isSharedArrayBuffer(e.buffer))throw R.errors.exception({header:"ArrayBuffer",message:"SharedArrayBuffer is not allowed."});return e};R.converters.BufferSource=function(e,A={}){if(It.isAnyArrayBuffer(e))return R.converters.ArrayBuffer(e,A);if(It.isTypedArray(e))return R.converters.TypedArray(e,e.constructor);if(It.isDataView(e))return R.converters.DataView(e,A);throw new TypeError(`Could not convert ${e} to a BufferSource.`)};R.converters["sequence"]=R.sequenceConverter(R.converters.ByteString);R.converters["sequence>"]=R.sequenceConverter(R.converters["sequence"]);R.converters["record"]=R.recordConverter(R.converters.ByteString,R.converters.ByteString);ip.exports={webidl:R}});var $A=Q((Qj,lp)=>{"use strict";var ic=require("assert"),{atob:tT}=require("buffer"),{isomorphicDecode:rT}=YA(),nT=new TextEncoder,nc=/^[!#$%&'*+-.^_|~A-Za-z0-9]+$/,iT=/(\u000A|\u000D|\u0009|\u0020)/,sT=/[\u0009|\u0020-\u007E|\u0080-\u00FF]/;function oT(e){ic(e.protocol==="data:");let A=ap(e,!0);A=A.slice(5);let t={position:0},r=$n(",",A,t),n=r.length;if(r=lT(r,!0,!0),t.position>=A.length)return"failure";t.position++;let i=A.slice(n+1),s=cp(i);if(/;(\u0020){0,}base64$/i.test(r)){let a=rT(s);if(s=cT(a),s==="failure")return"failure";r=r.slice(0,-6),r=r.replace(/(\u0020)+$/,""),r=r.slice(0,-1)}r.startsWith(";")&&(r="text/plain"+r);let o=Xu(r);return o==="failure"&&(o=Xu("text/plain;charset=US-ASCII")),{mimeType:o,body:s}}function ap(e,A=!1){if(!A)return e.href;let t=e.href,r=e.hash.length;return r===0?t:t.substring(0,t.length-r)}function sc(e,A,t){let r="";for(;t.positione.length)return"failure";A.position++;let r=$n(";",e,A);if(r=Zu(r,!1,!0),r.length===0||!nc.test(r))return"failure";let n=t.toLowerCase(),i=r.toLowerCase(),s={type:n,subtype:i,parameters:new Map,essence:`${n}/${i}`};for(;A.positioniT.test(c),e,A);let o=sc(c=>c!==";"&&c!=="=",e,A);if(o=o.toLowerCase(),A.positione.length)break;let a=null;if(e[A.position]==='"')a=gp(e,A,!0),$n(";",e,A);else if(a=$n(";",e,A),a=Zu(a,!1,!0),a.length===0)continue;o.length!==0&&nc.test(o)&&(a.length===0||sT.test(a))&&!s.parameters.has(o)&&s.parameters.set(o,a)}return s}function cT(e){if(e=e.replace(/[\u0009\u000A\u000C\u000D\u0020]/g,""),e.length%4===0&&(e=e.replace(/=?=$/,"")),e.length%4===1||/[^+/0-9A-Za-z]/.test(e))return"failure";let A=tT(e),t=new Uint8Array(A.length);for(let r=0;rs!=='"'&&s!=="\\",e,A),!(A.position>=e.length);){let i=e[A.position];if(A.position++,i==="\\"){if(A.position>=e.length){n+="\\";break}n+=e[A.position],A.position++}else{ic(i==='"');break}}return t?n:e.slice(r,A.position)}function gT(e){ic(e!=="failure");let{parameters:A,essence:t}=e,r=t;for(let[n,i]of A.entries())r+=";",r+=n,r+="=",nc.test(i)||(i=i.replace(/(\\|")/g,"\\$1"),i='"'+i,i+='"'),r+=i;return r}function sp(e){return e==="\r"||e===` +`||e===" "||e===" "}function Zu(e,A=!0,t=!0){let r=0,n=e.length-1;if(A)for(;r0&&sp(e[n]);n--);return e.slice(r,n+1)}function op(e){return e==="\r"||e===` +`||e===" "||e==="\f"||e===" "}function lT(e,A=!0,t=!0){let r=0,n=e.length-1;if(A)for(;r0&&op(e[n]);n--);return e.slice(r,n+1)}lp.exports={dataURLProcessor:oT,URLSerializer:ap,collectASequenceOfCodePoints:sc,collectASequenceOfCodePointsFast:$n,stringPercentDecode:cp,parseMIMEType:Xu,collectAnHTTPQuotedString:gp,serializeAMimeType:gT}});var oc=Q((Cj,Qp)=>{"use strict";var{Blob:hp,File:up}=require("buffer"),{types:zu}=require("util"),{kState:DA}=qt(),{isBlobLike:dp}=YA(),{webidl:te}=iA(),{parseMIMEType:uT,serializeAMimeType:ET}=$A(),{kEnumerableProperty:Ep}=W(),hT=new TextEncoder,xs=class e extends hp{constructor(A,t,r={}){te.argumentLengthCheck(arguments,2,{header:"File constructor"}),A=te.converters["sequence"](A),t=te.converters.USVString(t),r=te.converters.FilePropertyBag(r);let n=t,i=r.type,s;e:{if(i){if(i=uT(i),i==="failure"){i="";break e}i=ET(i).toLowerCase()}s=r.lastModified}super(dT(A,r),{type:i}),this[DA]={name:n,lastModified:s,type:i}}get name(){return te.brandCheck(this,e),this[DA].name}get lastModified(){return te.brandCheck(this,e),this[DA].lastModified}get type(){return te.brandCheck(this,e),this[DA].type}},$u=class e{constructor(A,t,r={}){let n=t,i=r.type,s=r.lastModified??Date.now();this[DA]={blobLike:A,name:n,type:i,lastModified:s}}stream(...A){return te.brandCheck(this,e),this[DA].blobLike.stream(...A)}arrayBuffer(...A){return te.brandCheck(this,e),this[DA].blobLike.arrayBuffer(...A)}slice(...A){return te.brandCheck(this,e),this[DA].blobLike.slice(...A)}text(...A){return te.brandCheck(this,e),this[DA].blobLike.text(...A)}get size(){return te.brandCheck(this,e),this[DA].blobLike.size}get type(){return te.brandCheck(this,e),this[DA].blobLike.type}get name(){return te.brandCheck(this,e),this[DA].name}get lastModified(){return te.brandCheck(this,e),this[DA].lastModified}get[Symbol.toStringTag](){return"File"}};Object.defineProperties(xs.prototype,{[Symbol.toStringTag]:{value:"File",configurable:!0},name:Ep,lastModified:Ep});te.converters.Blob=te.interfaceConverter(hp);te.converters.BlobPart=function(e,A){if(te.util.Type(e)==="Object"){if(dp(e))return te.converters.Blob(e,{strict:!1});if(ArrayBuffer.isView(e)||zu.isAnyArrayBuffer(e))return te.converters.BufferSource(e,A)}return te.converters.USVString(e,A)};te.converters["sequence"]=te.sequenceConverter(te.converters.BlobPart);te.converters.FilePropertyBag=te.dictionaryConverter([{key:"lastModified",converter:te.converters["long long"],get defaultValue(){return Date.now()}},{key:"type",converter:te.converters.DOMString,defaultValue:""},{key:"endings",converter:e=>(e=te.converters.DOMString(e),e=e.toLowerCase(),e!=="native"&&(e="transparent"),e),defaultValue:"transparent"}]);function dT(e,A){let t=[];for(let r of e)if(typeof r=="string"){let n=r;A.endings==="native"&&(n=QT(n)),t.push(hT.encode(n))}else zu.isAnyArrayBuffer(r)||zu.isTypedArray(r)?r.buffer?t.push(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)):t.push(new Uint8Array(r)):dp(r)&&t.push(r);return t}function QT(e){let A=` +`;return process.platform==="win32"&&(A=`\r +`),e.replace(/\r?\n/g,A)}function CT(e){return up&&e instanceof up||e instanceof xs||e&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&e[Symbol.toStringTag]==="File"}Qp.exports={File:xs,FileLike:$u,isFileLike:CT}});var cc=Q((fj,pp)=>{"use strict";var{isBlobLike:ac,toUSVString:fT,makeIterator:eE}=YA(),{kState:$e}=qt(),{File:Bp,FileLike:Cp,isFileLike:IT}=oc(),{webidl:re}=iA(),{Blob:BT,File:AE}=require("buffer"),fp=AE??Bp,ei=class e{constructor(A){if(A!==void 0)throw re.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[$e]=[]}append(A,t,r=void 0){if(re.brandCheck(this,e),re.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!ac(t))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");A=re.converters.USVString(A),t=ac(t)?re.converters.Blob(t,{strict:!1}):re.converters.USVString(t),r=arguments.length===3?re.converters.USVString(r):void 0;let n=Ip(A,t,r);this[$e].push(n)}delete(A){re.brandCheck(this,e),re.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),A=re.converters.USVString(A),this[$e]=this[$e].filter(t=>t.name!==A)}get(A){re.brandCheck(this,e),re.argumentLengthCheck(arguments,1,{header:"FormData.get"}),A=re.converters.USVString(A);let t=this[$e].findIndex(r=>r.name===A);return t===-1?null:this[$e][t].value}getAll(A){return re.brandCheck(this,e),re.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),A=re.converters.USVString(A),this[$e].filter(t=>t.name===A).map(t=>t.value)}has(A){return re.brandCheck(this,e),re.argumentLengthCheck(arguments,1,{header:"FormData.has"}),A=re.converters.USVString(A),this[$e].findIndex(t=>t.name===A)!==-1}set(A,t,r=void 0){if(re.brandCheck(this,e),re.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!ac(t))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");A=re.converters.USVString(A),t=ac(t)?re.converters.Blob(t,{strict:!1}):re.converters.USVString(t),r=arguments.length===3?fT(r):void 0;let n=Ip(A,t,r),i=this[$e].findIndex(s=>s.name===A);i!==-1?this[$e]=[...this[$e].slice(0,i),n,...this[$e].slice(i+1).filter(s=>s.name!==A)]:this[$e].push(n)}entries(){return re.brandCheck(this,e),eE(()=>this[$e].map(A=>[A.name,A.value]),"FormData","key+value")}keys(){return re.brandCheck(this,e),eE(()=>this[$e].map(A=>[A.name,A.value]),"FormData","key")}values(){return re.brandCheck(this,e),eE(()=>this[$e].map(A=>[A.name,A.value]),"FormData","value")}forEach(A,t=globalThis){if(re.brandCheck(this,e),re.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof A!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[r,n]of this)A.apply(t,[n,r,this])}};ei.prototype[Symbol.iterator]=ei.prototype.entries;Object.defineProperties(ei.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function Ip(e,A,t){if(e=Buffer.from(e).toString("utf8"),typeof A=="string")A=Buffer.from(A).toString("utf8");else if(IT(A)||(A=A instanceof BT?new fp([A],"blob",{type:A.type}):new Cp(A,"blob",{type:A.type})),t!==void 0){let r={type:A.type,lastModified:A.lastModified};A=AE&&A instanceof AE||A instanceof Bp?new fp([A],t,r):new Cp(A,t,r)}return{name:e,value:A}}pp.exports={FormData:ei}});var Ls=Q((Ij,Fp)=>{"use strict";var pT=GB(),Ai=W(),{ReadableStreamFrom:mT,isBlobLike:mp,isReadableStreamLike:yT,readableStreamClose:wT,createDeferredPromise:RT,fullyReadBody:DT}=YA(),{FormData:yp}=cc(),{kState:Ht}=qt(),{webidl:tE}=iA(),{DOMException:Dp,structuredClone:bT}=mr(),{Blob:kT,File:ST}=require("buffer"),{kBodyUsed:FT}=de(),rE=require("assert"),{isErrored:NT}=W(),{isUint8Array:bp,isArrayBuffer:xT}=require("util/types"),{File:LT}=oc(),{parseMIMEType:UT,serializeAMimeType:TT}=$A(),Ot=globalThis.ReadableStream,wp=ST??LT,gc=new TextEncoder,MT=new TextDecoder;function kp(e,A=!1){Ot||(Ot=require("stream/web").ReadableStream);let t=null;e instanceof Ot?t=e:mp(e)?t=e.stream():t=new Ot({async pull(a){a.enqueue(typeof n=="string"?gc.encode(n):n),queueMicrotask(()=>wT(a))},start(){},type:void 0}),rE(yT(t));let r=null,n=null,i=null,s=null;if(typeof e=="string")n=e,s="text/plain;charset=UTF-8";else if(e instanceof URLSearchParams)n=e.toString(),s="application/x-www-form-urlencoded;charset=UTF-8";else if(xT(e))n=new Uint8Array(e.slice());else if(ArrayBuffer.isView(e))n=new Uint8Array(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));else if(Ai.isFormDataLike(e)){let a=`----formdata-undici-0${`${Math.floor(Math.random()*1e11)}`.padStart(11,"0")}`,c=`--${a}\r +Content-Disposition: form-data`;let g=C=>C.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),l=C=>C.replace(/\r?\n|\r/g,`\r +`),u=[],E=new Uint8Array([13,10]);i=0;let h=!1;for(let[C,I]of e)if(typeof I=="string"){let p=gc.encode(c+`; name="${g(l(C))}"\r +\r +${l(I)}\r +`);u.push(p),i+=p.byteLength}else{let p=gc.encode(`${c}; name="${g(l(C))}"`+(I.name?`; filename="${g(I.name)}"`:"")+`\r +Content-Type: ${I.type||"application/octet-stream"}\r +\r +`);u.push(p,I,E),typeof I.size=="number"?i+=p.byteLength+I.size+E.byteLength:h=!0}let d=gc.encode(`--${a}--`);u.push(d),i+=d.byteLength,h&&(i=null),n=e,r=async function*(){for(let C of u)C.stream?yield*C.stream():yield C},s="multipart/form-data; boundary="+a}else if(mp(e))n=e,i=e.size,e.type&&(s=e.type);else if(typeof e[Symbol.asyncIterator]=="function"){if(A)throw new TypeError("keepalive");if(Ai.isDisturbed(e)||e.locked)throw new TypeError("Response body object should not be disturbed or locked");t=e instanceof Ot?e:mT(e)}if((typeof n=="string"||Ai.isBuffer(n))&&(i=Buffer.byteLength(n)),r!=null){let a;t=new Ot({async start(){a=r(e)[Symbol.asyncIterator]()},async pull(c){let{value:g,done:l}=await a.next();return l?queueMicrotask(()=>{c.close()}):NT(t)||c.enqueue(new Uint8Array(g)),c.desiredSize>0},async cancel(c){await a.return()},type:void 0})}return[{stream:t,source:n,length:i},s]}function vT(e,A=!1){return Ot||(Ot=require("stream/web").ReadableStream),e instanceof Ot&&(rE(!Ai.isDisturbed(e),"The body has already been consumed."),rE(!e.locked,"The stream is locked.")),kp(e,A)}function PT(e){let[A,t]=e.stream.tee(),r=bT(t,{transfer:[t]}),[,n]=r.tee();return e.stream=A,{stream:n,length:e.length,source:e.source}}async function*Rp(e){if(e)if(bp(e))yield e;else{let A=e.stream;if(Ai.isDisturbed(A))throw new TypeError("The body has already been consumed.");if(A.locked)throw new TypeError("The stream is locked.");A[FT]=!0,yield*A}}function nE(e){if(e.aborted)throw new Dp("The operation was aborted.","AbortError")}function GT(e){return{blob(){return lc(this,t=>{let r=qT(this);return r==="failure"?r="":r&&(r=TT(r)),new kT([t],{type:r})},e)},arrayBuffer(){return lc(this,t=>new Uint8Array(t).buffer,e)},text(){return lc(this,Sp,e)},json(){return lc(this,VT,e)},async formData(){tE.brandCheck(this,e),nE(this[Ht]);let t=this.headers.get("Content-Type");if(/multipart\/form-data/.test(t)){let r={};for(let[o,a]of this.headers)r[o.toLowerCase()]=a;let n=new yp,i;try{i=new pT({headers:r,preservePath:!0})}catch(o){throw new Dp(`${o}`,"AbortError")}i.on("field",(o,a)=>{n.append(o,a)}),i.on("file",(o,a,c,g,l)=>{let u=[];if(g==="base64"||g.toLowerCase()==="base64"){let E="";a.on("data",h=>{E+=h.toString().replace(/[\r\n]/gm,"");let d=E.length-E.length%4;u.push(Buffer.from(E.slice(0,d),"base64")),E=E.slice(d)}),a.on("end",()=>{u.push(Buffer.from(E,"base64")),n.append(o,new wp(u,c,{type:l}))})}else a.on("data",E=>{u.push(E)}),a.on("end",()=>{n.append(o,new wp(u,c,{type:l}))})});let s=new Promise((o,a)=>{i.on("finish",o),i.on("error",c=>a(new TypeError(c)))});if(this.body!==null)for await(let o of Rp(this[Ht].body))i.write(o);return i.end(),await s,n}else if(/application\/x-www-form-urlencoded/.test(t)){let r;try{let i="",s=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let o of Rp(this[Ht].body)){if(!bp(o))throw new TypeError("Expected Uint8Array chunk");i+=s.decode(o,{stream:!0})}i+=s.decode(),r=new URLSearchParams(i)}catch(i){throw Object.assign(new TypeError,{cause:i})}let n=new yp;for(let[i,s]of r)n.append(i,s);return n}else throw await Promise.resolve(),nE(this[Ht]),tE.errors.exception({header:`${e.name}.formData`,message:"Could not parse content as FormData."})}}}function JT(e){Object.assign(e.prototype,GT(e))}async function lc(e,A,t){if(tE.brandCheck(e,t),nE(e[Ht]),YT(e[Ht].body))throw new TypeError("Body is unusable");let r=RT(),n=s=>r.reject(s),i=s=>{try{r.resolve(A(s))}catch(o){n(o)}};return e[Ht].body==null?(i(new Uint8Array),r.promise):(await DT(e[Ht].body,i,n),r.promise)}function YT(e){return e!=null&&(e.stream.locked||Ai.isDisturbed(e.stream))}function Sp(e){return e.length===0?"":(e[0]===239&&e[1]===187&&e[2]===191&&(e=e.subarray(3)),MT.decode(e))}function VT(e){return JSON.parse(Sp(e))}function qT(e){let{headersList:A}=e[Ht],t=A.get("content-type");return t===null?"failure":UT(t)}Fp.exports={extractBody:kp,safelyExtractBody:vT,cloneBody:PT,mixinBody:JT}});var Up=Q((Bj,Lp)=>{"use strict";var{InvalidArgumentError:Qe,NotSupportedError:OT}=le(),Wt=require("assert"),{kHTTP2BuildRequest:HT,kHTTP2CopyHeaders:WT,kHTTP1BuildRequest:_T}=de(),QA=W(),Np=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/,xp=/[^\t\x20-\x7e\x80-\xff]/,jT=/[^\u0021-\u00ff]/,et=Symbol("handler"),Te={},iE;try{let e=require("diagnostics_channel");Te.create=e.channel("undici:request:create"),Te.bodySent=e.channel("undici:request:bodySent"),Te.headers=e.channel("undici:request:headers"),Te.trailers=e.channel("undici:request:trailers"),Te.error=e.channel("undici:request:error")}catch{Te.create={hasSubscribers:!1},Te.bodySent={hasSubscribers:!1},Te.headers={hasSubscribers:!1},Te.trailers={hasSubscribers:!1},Te.error={hasSubscribers:!1}}var sE=class e{constructor(A,{path:t,method:r,body:n,headers:i,query:s,idempotent:o,blocking:a,upgrade:c,headersTimeout:g,bodyTimeout:l,reset:u,throwOnError:E,expectContinue:h},d){if(typeof t!="string")throw new Qe("path must be a string");if(t[0]!=="/"&&!(t.startsWith("http://")||t.startsWith("https://"))&&r!=="CONNECT")throw new Qe("path must be an absolute URL or start with a slash");if(jT.exec(t)!==null)throw new Qe("invalid request path");if(typeof r!="string")throw new Qe("method must be a string");if(Np.exec(r)===null)throw new Qe("invalid request method");if(c&&typeof c!="string")throw new Qe("upgrade must be a string");if(g!=null&&(!Number.isFinite(g)||g<0))throw new Qe("invalid headersTimeout");if(l!=null&&(!Number.isFinite(l)||l<0))throw new Qe("invalid bodyTimeout");if(u!=null&&typeof u!="boolean")throw new Qe("invalid reset");if(h!=null&&typeof h!="boolean")throw new Qe("invalid expectContinue");if(this.headersTimeout=g,this.bodyTimeout=l,this.throwOnError=E===!0,this.method=r,this.abort=null,n==null)this.body=null;else if(QA.isStream(n)){this.body=n;let C=this.body._readableState;(!C||!C.autoDestroy)&&(this.endHandler=function(){QA.destroy(this)},this.body.on("end",this.endHandler)),this.errorHandler=I=>{this.abort?this.abort(I):this.error=I},this.body.on("error",this.errorHandler)}else if(QA.isBuffer(n))this.body=n.byteLength?n:null;else if(ArrayBuffer.isView(n))this.body=n.buffer.byteLength?Buffer.from(n.buffer,n.byteOffset,n.byteLength):null;else if(n instanceof ArrayBuffer)this.body=n.byteLength?Buffer.from(n):null;else if(typeof n=="string")this.body=n.length?Buffer.from(n):null;else if(QA.isFormDataLike(n)||QA.isIterable(n)||QA.isBlobLike(n))this.body=n;else throw new Qe("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable");if(this.completed=!1,this.aborted=!1,this.upgrade=c||null,this.path=s?QA.buildURL(t,s):t,this.origin=A,this.idempotent=o??(r==="HEAD"||r==="GET"),this.blocking=a??!1,this.reset=u??null,this.host=null,this.contentLength=null,this.contentType=null,this.headers="",this.expectContinue=h??!1,Array.isArray(i)){if(i.length%2!==0)throw new Qe("headers array must be even");for(let C=0;C{"use strict";var KT=require("events"),oE=class extends KT{dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};Tp.exports=oE});var Ms=Q((mj,Mp)=>{"use strict";var ZT=uc(),{ClientDestroyedError:aE,ClientClosedError:XT,InvalidArgumentError:ti}=le(),{kDestroy:zT,kClose:$T,kDispatch:cE,kInterceptors:Hr}=de(),ri=Symbol("destroyed"),Ts=Symbol("closed"),_t=Symbol("onDestroyed"),ni=Symbol("onClosed"),Ec=Symbol("Intercepted Dispatch"),gE=class extends ZT{constructor(){super(),this[ri]=!1,this[_t]=null,this[Ts]=!1,this[ni]=[]}get destroyed(){return this[ri]}get closed(){return this[Ts]}get interceptors(){return this[Hr]}set interceptors(A){if(A){for(let t=A.length-1;t>=0;t--)if(typeof this[Hr][t]!="function")throw new ti("interceptor must be an function")}this[Hr]=A}close(A){if(A===void 0)return new Promise((r,n)=>{this.close((i,s)=>i?n(i):r(s))});if(typeof A!="function")throw new ti("invalid callback");if(this[ri]){queueMicrotask(()=>A(new aE,null));return}if(this[Ts]){this[ni]?this[ni].push(A):queueMicrotask(()=>A(null,null));return}this[Ts]=!0,this[ni].push(A);let t=()=>{let r=this[ni];this[ni]=null;for(let n=0;nthis.destroy()).then(()=>{queueMicrotask(t)})}destroy(A,t){if(typeof A=="function"&&(t=A,A=null),t===void 0)return new Promise((n,i)=>{this.destroy(A,(s,o)=>s?i(s):n(o))});if(typeof t!="function")throw new ti("invalid callback");if(this[ri]){this[_t]?this[_t].push(t):queueMicrotask(()=>t(null,null));return}A||(A=new aE),this[ri]=!0,this[_t]=this[_t]||[],this[_t].push(t);let r=()=>{let n=this[_t];this[_t]=null;for(let i=0;i{queueMicrotask(r)})}[Ec](A,t){if(!this[Hr]||this[Hr].length===0)return this[Ec]=this[cE],this[cE](A,t);let r=this[cE].bind(this);for(let n=this[Hr].length-1;n>=0;n--)r=this[Hr][n](r);return this[Ec]=r,r(A,t)}dispatch(A,t){if(!t||typeof t!="object")throw new ti("handler must be an object");try{if(!A||typeof A!="object")throw new ti("opts must be an object.");if(this[ri]||this[_t])throw new aE;if(this[Ts])throw new XT;return this[Ec](A,t)}catch(r){if(typeof t.onError!="function")throw new ti("invalid onError method");return t.onError(r),!1}}};Mp.exports=gE});var vs=Q((Rj,Gp)=>{"use strict";var eM=require("net"),vp=require("assert"),Pp=W(),{InvalidArgumentError:AM,ConnectTimeoutError:tM}=le(),lE,uE;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?uE=class{constructor(A){this._maxCachedSessions=A,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(t=>{if(this._sessionCache.size=this._maxCachedSessions){let{value:r}=this._sessionCache.keys().next();this._sessionCache.delete(r)}this._sessionCache.set(A,t)}}};function rM({allowH2:e,maxCachedSessions:A,socketPath:t,timeout:r,...n}){if(A!=null&&(!Number.isInteger(A)||A<0))throw new AM("maxCachedSessions must be a positive integer or zero");let i={path:t,...n},s=new uE(A??100);return r=r??1e4,e=e??!1,function({hostname:a,host:c,protocol:g,port:l,servername:u,localAddress:E,httpSocket:h},d){let C;if(g==="https:"){lE||(lE=require("tls")),u=u||i.servername||Pp.getServerName(c)||null;let p=u||a,w=s.get(p)||null;vp(p),C=lE.connect({highWaterMark:16384,...i,servername:u,session:w,localAddress:E,ALPNProtocols:e?["http/1.1","h2"]:["http/1.1"],socket:h,port:l||443,host:a}),C.on("session",function(m){s.set(p,m)})}else vp(!h,"httpSocket can only be sent on TLS update"),C=eM.connect({highWaterMark:64*1024,...i,localAddress:E,port:l||80,host:a});if(i.keepAlive==null||i.keepAlive){let p=i.keepAliveInitialDelay===void 0?6e4:i.keepAliveInitialDelay;C.setKeepAlive(!0,p)}let I=nM(()=>iM(C),r);return C.setNoDelay(!0).once(g==="https:"?"secureConnect":"connect",function(){if(I(),d){let p=d;d=null,p(null,this)}}).on("error",function(p){if(I(),d){let w=d;d=null,w(p)}}),C}}function nM(e,A){if(!A)return()=>{};let t=null,r=null,n=setTimeout(()=>{t=setImmediate(()=>{process.platform==="win32"?r=setImmediate(()=>e()):e()})},A);return()=>{clearTimeout(n),clearImmediate(t),clearImmediate(r)}}function iM(e){Pp.destroy(e,new tM)}Gp.exports=rM});var Jp=Q(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});hc.enumToMap=void 0;function sM(e){let A={};return Object.keys(e).forEach(t=>{let r=e[t];typeof r=="number"&&(A[t]=r)}),A}hc.enumToMap=sM});var Yp=Q(y=>{"use strict";Object.defineProperty(y,"__esModule",{value:!0});y.SPECIAL_HEADERS=y.HEADER_STATE=y.MINOR=y.MAJOR=y.CONNECTION_TOKEN_CHARS=y.HEADER_CHARS=y.TOKEN=y.STRICT_TOKEN=y.HEX=y.URL_CHAR=y.STRICT_URL_CHAR=y.USERINFO_CHARS=y.MARK=y.ALPHANUM=y.NUM=y.HEX_MAP=y.NUM_MAP=y.ALPHA=y.FINISH=y.H_METHOD_MAP=y.METHOD_MAP=y.METHODS_RTSP=y.METHODS_ICE=y.METHODS_HTTP=y.METHODS=y.LENIENT_FLAGS=y.FLAGS=y.TYPE=y.ERROR=void 0;var oM=Jp(),aM;(function(e){e[e.OK=0]="OK",e[e.INTERNAL=1]="INTERNAL",e[e.STRICT=2]="STRICT",e[e.LF_EXPECTED=3]="LF_EXPECTED",e[e.UNEXPECTED_CONTENT_LENGTH=4]="UNEXPECTED_CONTENT_LENGTH",e[e.CLOSED_CONNECTION=5]="CLOSED_CONNECTION",e[e.INVALID_METHOD=6]="INVALID_METHOD",e[e.INVALID_URL=7]="INVALID_URL",e[e.INVALID_CONSTANT=8]="INVALID_CONSTANT",e[e.INVALID_VERSION=9]="INVALID_VERSION",e[e.INVALID_HEADER_TOKEN=10]="INVALID_HEADER_TOKEN",e[e.INVALID_CONTENT_LENGTH=11]="INVALID_CONTENT_LENGTH",e[e.INVALID_CHUNK_SIZE=12]="INVALID_CHUNK_SIZE",e[e.INVALID_STATUS=13]="INVALID_STATUS",e[e.INVALID_EOF_STATE=14]="INVALID_EOF_STATE",e[e.INVALID_TRANSFER_ENCODING=15]="INVALID_TRANSFER_ENCODING",e[e.CB_MESSAGE_BEGIN=16]="CB_MESSAGE_BEGIN",e[e.CB_HEADERS_COMPLETE=17]="CB_HEADERS_COMPLETE",e[e.CB_MESSAGE_COMPLETE=18]="CB_MESSAGE_COMPLETE",e[e.CB_CHUNK_HEADER=19]="CB_CHUNK_HEADER",e[e.CB_CHUNK_COMPLETE=20]="CB_CHUNK_COMPLETE",e[e.PAUSED=21]="PAUSED",e[e.PAUSED_UPGRADE=22]="PAUSED_UPGRADE",e[e.PAUSED_H2_UPGRADE=23]="PAUSED_H2_UPGRADE",e[e.USER=24]="USER"})(aM=y.ERROR||(y.ERROR={}));var cM;(function(e){e[e.BOTH=0]="BOTH",e[e.REQUEST=1]="REQUEST",e[e.RESPONSE=2]="RESPONSE"})(cM=y.TYPE||(y.TYPE={}));var gM;(function(e){e[e.CONNECTION_KEEP_ALIVE=1]="CONNECTION_KEEP_ALIVE",e[e.CONNECTION_CLOSE=2]="CONNECTION_CLOSE",e[e.CONNECTION_UPGRADE=4]="CONNECTION_UPGRADE",e[e.CHUNKED=8]="CHUNKED",e[e.UPGRADE=16]="UPGRADE",e[e.CONTENT_LENGTH=32]="CONTENT_LENGTH",e[e.SKIPBODY=64]="SKIPBODY",e[e.TRAILING=128]="TRAILING",e[e.TRANSFER_ENCODING=512]="TRANSFER_ENCODING"})(gM=y.FLAGS||(y.FLAGS={}));var lM;(function(e){e[e.HEADERS=1]="HEADERS",e[e.CHUNKED_LENGTH=2]="CHUNKED_LENGTH",e[e.KEEP_ALIVE=4]="KEEP_ALIVE"})(lM=y.LENIENT_FLAGS||(y.LENIENT_FLAGS={}));var S;(function(e){e[e.DELETE=0]="DELETE",e[e.GET=1]="GET",e[e.HEAD=2]="HEAD",e[e.POST=3]="POST",e[e.PUT=4]="PUT",e[e.CONNECT=5]="CONNECT",e[e.OPTIONS=6]="OPTIONS",e[e.TRACE=7]="TRACE",e[e.COPY=8]="COPY",e[e.LOCK=9]="LOCK",e[e.MKCOL=10]="MKCOL",e[e.MOVE=11]="MOVE",e[e.PROPFIND=12]="PROPFIND",e[e.PROPPATCH=13]="PROPPATCH",e[e.SEARCH=14]="SEARCH",e[e.UNLOCK=15]="UNLOCK",e[e.BIND=16]="BIND",e[e.REBIND=17]="REBIND",e[e.UNBIND=18]="UNBIND",e[e.ACL=19]="ACL",e[e.REPORT=20]="REPORT",e[e.MKACTIVITY=21]="MKACTIVITY",e[e.CHECKOUT=22]="CHECKOUT",e[e.MERGE=23]="MERGE",e[e["M-SEARCH"]=24]="M-SEARCH",e[e.NOTIFY=25]="NOTIFY",e[e.SUBSCRIBE=26]="SUBSCRIBE",e[e.UNSUBSCRIBE=27]="UNSUBSCRIBE",e[e.PATCH=28]="PATCH",e[e.PURGE=29]="PURGE",e[e.MKCALENDAR=30]="MKCALENDAR",e[e.LINK=31]="LINK",e[e.UNLINK=32]="UNLINK",e[e.SOURCE=33]="SOURCE",e[e.PRI=34]="PRI",e[e.DESCRIBE=35]="DESCRIBE",e[e.ANNOUNCE=36]="ANNOUNCE",e[e.SETUP=37]="SETUP",e[e.PLAY=38]="PLAY",e[e.PAUSE=39]="PAUSE",e[e.TEARDOWN=40]="TEARDOWN",e[e.GET_PARAMETER=41]="GET_PARAMETER",e[e.SET_PARAMETER=42]="SET_PARAMETER",e[e.REDIRECT=43]="REDIRECT",e[e.RECORD=44]="RECORD",e[e.FLUSH=45]="FLUSH"})(S=y.METHODS||(y.METHODS={}));y.METHODS_HTTP=[S.DELETE,S.GET,S.HEAD,S.POST,S.PUT,S.CONNECT,S.OPTIONS,S.TRACE,S.COPY,S.LOCK,S.MKCOL,S.MOVE,S.PROPFIND,S.PROPPATCH,S.SEARCH,S.UNLOCK,S.BIND,S.REBIND,S.UNBIND,S.ACL,S.REPORT,S.MKACTIVITY,S.CHECKOUT,S.MERGE,S["M-SEARCH"],S.NOTIFY,S.SUBSCRIBE,S.UNSUBSCRIBE,S.PATCH,S.PURGE,S.MKCALENDAR,S.LINK,S.UNLINK,S.PRI,S.SOURCE];y.METHODS_ICE=[S.SOURCE];y.METHODS_RTSP=[S.OPTIONS,S.DESCRIBE,S.ANNOUNCE,S.SETUP,S.PLAY,S.PAUSE,S.TEARDOWN,S.GET_PARAMETER,S.SET_PARAMETER,S.REDIRECT,S.RECORD,S.FLUSH,S.GET,S.POST];y.METHOD_MAP=oM.enumToMap(S);y.H_METHOD_MAP={};Object.keys(y.METHOD_MAP).forEach(e=>{/^H/.test(e)&&(y.H_METHOD_MAP[e]=y.METHOD_MAP[e])});var uM;(function(e){e[e.SAFE=0]="SAFE",e[e.SAFE_WITH_CB=1]="SAFE_WITH_CB",e[e.UNSAFE=2]="UNSAFE"})(uM=y.FINISH||(y.FINISH={}));y.ALPHA=[];for(let e=65;e<=90;e++)y.ALPHA.push(String.fromCharCode(e)),y.ALPHA.push(String.fromCharCode(e+32));y.NUM_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9};y.HEX_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15};y.NUM=["0","1","2","3","4","5","6","7","8","9"];y.ALPHANUM=y.ALPHA.concat(y.NUM);y.MARK=["-","_",".","!","~","*","'","(",")"];y.USERINFO_CHARS=y.ALPHANUM.concat(y.MARK).concat(["%",";",":","&","=","+","$",","]);y.STRICT_URL_CHAR=["!",'"',"$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","@","[","\\","]","^","_","`","{","|","}","~"].concat(y.ALPHANUM);y.URL_CHAR=y.STRICT_URL_CHAR.concat([" ","\f"]);for(let e=128;e<=255;e++)y.URL_CHAR.push(e);y.HEX=y.NUM.concat(["a","b","c","d","e","f","A","B","C","D","E","F"]);y.STRICT_TOKEN=["!","#","$","%","&","'","*","+","-",".","^","_","`","|","~"].concat(y.ALPHANUM);y.TOKEN=y.STRICT_TOKEN.concat([" "]);y.HEADER_CHARS=[" "];for(let e=32;e<=255;e++)e!==127&&y.HEADER_CHARS.push(e);y.CONNECTION_TOKEN_CHARS=y.HEADER_CHARS.filter(e=>e!==44);y.MAJOR=y.NUM_MAP;y.MINOR=y.MAJOR;var ii;(function(e){e[e.GENERAL=0]="GENERAL",e[e.CONNECTION=1]="CONNECTION",e[e.CONTENT_LENGTH=2]="CONTENT_LENGTH",e[e.TRANSFER_ENCODING=3]="TRANSFER_ENCODING",e[e.UPGRADE=4]="UPGRADE",e[e.CONNECTION_KEEP_ALIVE=5]="CONNECTION_KEEP_ALIVE",e[e.CONNECTION_CLOSE=6]="CONNECTION_CLOSE",e[e.CONNECTION_UPGRADE=7]="CONNECTION_UPGRADE",e[e.TRANSFER_ENCODING_CHUNKED=8]="TRANSFER_ENCODING_CHUNKED"})(ii=y.HEADER_STATE||(y.HEADER_STATE={}));y.SPECIAL_HEADERS={connection:ii.CONNECTION,"content-length":ii.CONTENT_LENGTH,"proxy-connection":ii.CONNECTION,"transfer-encoding":ii.TRANSFER_ENCODING,upgrade:ii.UPGRADE}});var dE=Q((kj,Op)=>{"use strict";var jt=W(),{kBodyUsed:Ps}=de(),hE=require("assert"),{InvalidArgumentError:EM}=le(),hM=require("events"),dM=[300,301,302,303,307,308],Vp=Symbol("body"),dc=class{constructor(A){this[Vp]=A,this[Ps]=!1}async*[Symbol.asyncIterator](){hE(!this[Ps],"disturbed"),this[Ps]=!0,yield*this[Vp]}},EE=class{constructor(A,t,r,n){if(t!=null&&(!Number.isInteger(t)||t<0))throw new EM("maxRedirections must be a positive number");jt.validateHandler(n,r.method,r.upgrade),this.dispatch=A,this.location=null,this.abort=null,this.opts={...r,maxRedirections:0},this.maxRedirections=t,this.handler=n,this.history=[],jt.isStream(this.opts.body)?(jt.bodyLength(this.opts.body)===0&&this.opts.body.on("data",function(){hE(!1)}),typeof this.opts.body.readableDidRead!="boolean"&&(this.opts.body[Ps]=!1,hM.prototype.on.call(this.opts.body,"data",function(){this[Ps]=!0}))):this.opts.body&&typeof this.opts.body.pipeTo=="function"?this.opts.body=new dc(this.opts.body):this.opts.body&&typeof this.opts.body!="string"&&!ArrayBuffer.isView(this.opts.body)&&jt.isIterable(this.opts.body)&&(this.opts.body=new dc(this.opts.body))}onConnect(A){this.abort=A,this.handler.onConnect(A,{history:this.history})}onUpgrade(A,t,r){this.handler.onUpgrade(A,t,r)}onError(A){this.handler.onError(A)}onHeaders(A,t,r,n){if(this.location=this.history.length>=this.maxRedirections||jt.isDisturbed(this.opts.body)?null:QM(A,t),this.opts.origin&&this.history.push(new URL(this.opts.path,this.opts.origin)),!this.location)return this.handler.onHeaders(A,t,r,n);let{origin:i,pathname:s,search:o}=jt.parseURL(new URL(this.location,this.opts.origin&&new URL(this.opts.path,this.opts.origin))),a=o?`${s}${o}`:s;this.opts.headers=CM(this.opts.headers,A===303,this.opts.origin!==i),this.opts.path=a,this.opts.origin=i,this.opts.maxRedirections=0,this.opts.query=null,A===303&&this.opts.method!=="HEAD"&&(this.opts.method="GET",this.opts.body=null)}onData(A){if(!this.location)return this.handler.onData(A)}onComplete(A){this.location?(this.location=null,this.abort=null,this.dispatch(this.opts,this)):this.handler.onComplete(A)}onBodySent(A){this.handler.onBodySent&&this.handler.onBodySent(A)}};function QM(e,A){if(dM.indexOf(e)===-1)return null;for(let t=0;t{"use strict";var fM=dE();function IM({maxRedirections:e}){return A=>function(r,n){let{maxRedirections:i=e}=r;if(!i)return A(r,n);let s=new fM(A,i,r,n);return r={...r,maxRedirections:0},A(r,s)}}Hp.exports=IM});var QE=Q((Fj,Wp)=>{"use strict";Wp.exports="AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCsLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC1kAIABBGGpCADcDACAAQgA3AwAgAEE4akIANwMAIABBMGpCADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvk8wEDDn8DfgR/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgACgCHCIQQX9qDt0B2gEB2QECAwQFBgcICQoLDA0O2AEPENcBERLWARMUFRYXGBkaG+AB3wEcHR7VAR8gISIjJCXUASYnKCkqKyzTAdIBLS7RAdABLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVG2wFHSElKzwHOAUvNAUzMAU1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4ABgQGCAYMBhAGFAYYBhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwHLAcoBuAHJAbkByAG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAQDcAQtBACEQDMYBC0EOIRAMxQELQQ0hEAzEAQtBDyEQDMMBC0EQIRAMwgELQRMhEAzBAQtBFCEQDMABC0EVIRAMvwELQRYhEAy+AQtBFyEQDL0BC0EYIRAMvAELQRkhEAy7AQtBGiEQDLoBC0EbIRAMuQELQRwhEAy4AQtBCCEQDLcBC0EdIRAMtgELQSAhEAy1AQtBHyEQDLQBC0EHIRAMswELQSEhEAyyAQtBIiEQDLEBC0EeIRAMsAELQSMhEAyvAQtBEiEQDK4BC0ERIRAMrQELQSQhEAysAQtBJSEQDKsBC0EmIRAMqgELQSchEAypAQtBwwEhEAyoAQtBKSEQDKcBC0ErIRAMpgELQSwhEAylAQtBLSEQDKQBC0EuIRAMowELQS8hEAyiAQtBxAEhEAyhAQtBMCEQDKABC0E0IRAMnwELQQwhEAyeAQtBMSEQDJ0BC0EyIRAMnAELQTMhEAybAQtBOSEQDJoBC0E1IRAMmQELQcUBIRAMmAELQQshEAyXAQtBOiEQDJYBC0E2IRAMlQELQQohEAyUAQtBNyEQDJMBC0E4IRAMkgELQTwhEAyRAQtBOyEQDJABC0E9IRAMjwELQQkhEAyOAQtBKCEQDI0BC0E+IRAMjAELQT8hEAyLAQtBwAAhEAyKAQtBwQAhEAyJAQtBwgAhEAyIAQtBwwAhEAyHAQtBxAAhEAyGAQtBxQAhEAyFAQtBxgAhEAyEAQtBKiEQDIMBC0HHACEQDIIBC0HIACEQDIEBC0HJACEQDIABC0HKACEQDH8LQcsAIRAMfgtBzQAhEAx9C0HMACEQDHwLQc4AIRAMewtBzwAhEAx6C0HQACEQDHkLQdEAIRAMeAtB0gAhEAx3C0HTACEQDHYLQdQAIRAMdQtB1gAhEAx0C0HVACEQDHMLQQYhEAxyC0HXACEQDHELQQUhEAxwC0HYACEQDG8LQQQhEAxuC0HZACEQDG0LQdoAIRAMbAtB2wAhEAxrC0HcACEQDGoLQQMhEAxpC0HdACEQDGgLQd4AIRAMZwtB3wAhEAxmC0HhACEQDGULQeAAIRAMZAtB4gAhEAxjC0HjACEQDGILQQIhEAxhC0HkACEQDGALQeUAIRAMXwtB5gAhEAxeC0HnACEQDF0LQegAIRAMXAtB6QAhEAxbC0HqACEQDFoLQesAIRAMWQtB7AAhEAxYC0HtACEQDFcLQe4AIRAMVgtB7wAhEAxVC0HwACEQDFQLQfEAIRAMUwtB8gAhEAxSC0HzACEQDFELQfQAIRAMUAtB9QAhEAxPC0H2ACEQDE4LQfcAIRAMTQtB+AAhEAxMC0H5ACEQDEsLQfoAIRAMSgtB+wAhEAxJC0H8ACEQDEgLQf0AIRAMRwtB/gAhEAxGC0H/ACEQDEULQYABIRAMRAtBgQEhEAxDC0GCASEQDEILQYMBIRAMQQtBhAEhEAxAC0GFASEQDD8LQYYBIRAMPgtBhwEhEAw9C0GIASEQDDwLQYkBIRAMOwtBigEhEAw6C0GLASEQDDkLQYwBIRAMOAtBjQEhEAw3C0GOASEQDDYLQY8BIRAMNQtBkAEhEAw0C0GRASEQDDMLQZIBIRAMMgtBkwEhEAwxC0GUASEQDDALQZUBIRAMLwtBlgEhEAwuC0GXASEQDC0LQZgBIRAMLAtBmQEhEAwrC0GaASEQDCoLQZsBIRAMKQtBnAEhEAwoC0GdASEQDCcLQZ4BIRAMJgtBnwEhEAwlC0GgASEQDCQLQaEBIRAMIwtBogEhEAwiC0GjASEQDCELQaQBIRAMIAtBpQEhEAwfC0GmASEQDB4LQacBIRAMHQtBqAEhEAwcC0GpASEQDBsLQaoBIRAMGgtBqwEhEAwZC0GsASEQDBgLQa0BIRAMFwtBrgEhEAwWC0EBIRAMFQtBrwEhEAwUC0GwASEQDBMLQbEBIRAMEgtBswEhEAwRC0GyASEQDBALQbQBIRAMDwtBtQEhEAwOC0G2ASEQDA0LQbcBIRAMDAtBuAEhEAwLC0G5ASEQDAoLQboBIRAMCQtBuwEhEAwIC0HGASEQDAcLQbwBIRAMBgtBvQEhEAwFC0G+ASEQDAQLQb8BIRAMAwtBwAEhEAwCC0HCASEQDAELQcEBIRALA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQDscBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxweHyAhIyUoP0BBREVGR0hJSktMTU9QUVJT3gNXWVtcXWBiZWZnaGlqa2xtb3BxcnN0dXZ3eHl6e3x9foABggGFAYYBhwGJAYsBjAGNAY4BjwGQAZEBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAckBygHLAcwBzQHOAc8B0AHRAdIB0wHUAdUB1gHXAdgB2QHaAdsB3AHdAd4B4AHhAeIB4wHkAeUB5gHnAegB6QHqAesB7AHtAe4B7wHwAfEB8gHzAZkCpAKwAv4C/gILIAEiBCACRw3zAUHdASEQDP8DCyABIhAgAkcN3QFBwwEhEAz+AwsgASIBIAJHDZABQfcAIRAM/QMLIAEiASACRw2GAUHvACEQDPwDCyABIgEgAkcNf0HqACEQDPsDCyABIgEgAkcNe0HoACEQDPoDCyABIgEgAkcNeEHmACEQDPkDCyABIgEgAkcNGkEYIRAM+AMLIAEiASACRw0UQRIhEAz3AwsgASIBIAJHDVlBxQAhEAz2AwsgASIBIAJHDUpBPyEQDPUDCyABIgEgAkcNSEE8IRAM9AMLIAEiASACRw1BQTEhEAzzAwsgAC0ALkEBRg3rAwyHAgsgACABIgEgAhDAgICAAEEBRw3mASAAQgA3AyAM5wELIAAgASIBIAIQtICAgAAiEA3nASABIQEM9QILAkAgASIBIAJHDQBBBiEQDPADCyAAIAFBAWoiASACELuAgIAAIhAN6AEgASEBDDELIABCADcDIEESIRAM1QMLIAEiECACRw0rQR0hEAztAwsCQCABIgEgAkYNACABQQFqIQFBECEQDNQDC0EHIRAM7AMLIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN5QFBCCEQDOsDCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEUIRAM0gMLQQkhEAzqAwsgASEBIAApAyBQDeQBIAEhAQzyAgsCQCABIgEgAkcNAEELIRAM6QMLIAAgAUEBaiIBIAIQtoCAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3mASABIQEMDQsgACABIgEgAhC6gICAACIQDecBIAEhAQzwAgsCQCABIgEgAkcNAEEPIRAM5QMLIAEtAAAiEEE7Rg0IIBBBDUcN6AEgAUEBaiEBDO8CCyAAIAEiASACELqAgIAAIhAN6AEgASEBDPICCwNAAkAgAS0AAEHwtYCAAGotAAAiEEEBRg0AIBBBAkcN6wEgACgCBCEQIABBADYCBCAAIBAgAUEBaiIBELmAgIAAIhAN6gEgASEBDPQCCyABQQFqIgEgAkcNAAtBEiEQDOIDCyAAIAEiASACELqAgIAAIhAN6QEgASEBDAoLIAEiASACRw0GQRshEAzgAwsCQCABIgEgAkcNAEEWIRAM4AMLIABBioCAgAA2AgggACABNgIEIAAgASACELiAgIAAIhAN6gEgASEBQSAhEAzGAwsCQCABIgEgAkYNAANAAkAgAS0AAEHwt4CAAGotAAAiEEECRg0AAkAgEEF/ag4E5QHsAQDrAewBCyABQQFqIQFBCCEQDMgDCyABQQFqIgEgAkcNAAtBFSEQDN8DC0EVIRAM3gMLA0ACQCABLQAAQfC5gIAAai0AACIQQQJGDQAgEEF/ag4E3gHsAeAB6wHsAQsgAUEBaiIBIAJHDQALQRghEAzdAwsCQCABIgEgAkYNACAAQYuAgIAANgIIIAAgATYCBCABIQFBByEQDMQDC0EZIRAM3AMLIAFBAWohAQwCCwJAIAEiFCACRw0AQRohEAzbAwsgFCEBAkAgFC0AAEFzag4U3QLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gIA7gILQQAhECAAQQA2AhwgAEGvi4CAADYCECAAQQI2AgwgACAUQQFqNgIUDNoDCwJAIAEtAAAiEEE7Rg0AIBBBDUcN6AEgAUEBaiEBDOUCCyABQQFqIQELQSIhEAy/AwsCQCABIhAgAkcNAEEcIRAM2AMLQgAhESAQIQEgEC0AAEFQag435wHmAQECAwQFBgcIAAAAAAAAAAkKCwwNDgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxAREhMUAAtBHiEQDL0DC0ICIREM5QELQgMhEQzkAQtCBCERDOMBC0IFIREM4gELQgYhEQzhAQtCByERDOABC0IIIREM3wELQgkhEQzeAQtCCiERDN0BC0ILIREM3AELQgwhEQzbAQtCDSERDNoBC0IOIREM2QELQg8hEQzYAQtCCiERDNcBC0ILIREM1gELQgwhEQzVAQtCDSERDNQBC0IOIREM0wELQg8hEQzSAQtCACERAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQLQAAQVBqDjflAeQBAAECAwQFBgfmAeYB5gHmAeYB5gHmAQgJCgsMDeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gEODxAREhPmAQtCAiERDOQBC0IDIREM4wELQgQhEQziAQtCBSERDOEBC0IGIREM4AELQgchEQzfAQtCCCERDN4BC0IJIREM3QELQgohEQzcAQtCCyERDNsBC0IMIREM2gELQg0hEQzZAQtCDiERDNgBC0IPIREM1wELQgohEQzWAQtCCyERDNUBC0IMIREM1AELQg0hEQzTAQtCDiERDNIBC0IPIREM0QELIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN0gFBHyEQDMADCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEkIRAMpwMLQSAhEAy/AwsgACABIhAgAhC+gICAAEF/ag4FtgEAxQIB0QHSAQtBESEQDKQDCyAAQQE6AC8gECEBDLsDCyABIgEgAkcN0gFBJCEQDLsDCyABIg0gAkcNHkHGACEQDLoDCyAAIAEiASACELKAgIAAIhAN1AEgASEBDLUBCyABIhAgAkcNJkHQACEQDLgDCwJAIAEiASACRw0AQSghEAy4AwsgAEEANgIEIABBjICAgAA2AgggACABIAEQsYCAgAAiEA3TASABIQEM2AELAkAgASIQIAJHDQBBKSEQDLcDCyAQLQAAIgFBIEYNFCABQQlHDdMBIBBBAWohAQwVCwJAIAEiASACRg0AIAFBAWohAQwXC0EqIRAMtQMLAkAgASIQIAJHDQBBKyEQDLUDCwJAIBAtAAAiAUEJRg0AIAFBIEcN1QELIAAtACxBCEYN0wEgECEBDJEDCwJAIAEiASACRw0AQSwhEAy0AwsgAS0AAEEKRw3VASABQQFqIQEMyQILIAEiDiACRw3VAUEvIRAMsgMLA0ACQCABLQAAIhBBIEYNAAJAIBBBdmoOBADcAdwBANoBCyABIQEM4AELIAFBAWoiASACRw0AC0ExIRAMsQMLQTIhECABIhQgAkYNsAMgAiAUayAAKAIAIgFqIRUgFCABa0EDaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfC7gIAAai0AAEcNAQJAIAFBA0cNAEEGIQEMlgMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLEDCyAAQQA2AgAgFCEBDNkBC0EzIRAgASIUIAJGDa8DIAIgFGsgACgCACIBaiEVIBQgAWtBCGohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUH0u4CAAGotAABHDQECQCABQQhHDQBBBSEBDJUDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAywAwsgAEEANgIAIBQhAQzYAQtBNCEQIAEiFCACRg2uAyACIBRrIAAoAgAiAWohFSAUIAFrQQVqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw0BAkAgAUEFRw0AQQchAQyUAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMrwMLIABBADYCACAUIQEM1wELAkAgASIBIAJGDQADQAJAIAEtAABBgL6AgABqLQAAIhBBAUYNACAQQQJGDQogASEBDN0BCyABQQFqIgEgAkcNAAtBMCEQDK4DC0EwIRAMrQMLAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AIBBBdmoOBNkB2gHaAdkB2gELIAFBAWoiASACRw0AC0E4IRAMrQMLQTghEAysAwsDQAJAIAEtAAAiEEEgRg0AIBBBCUcNAwsgAUEBaiIBIAJHDQALQTwhEAyrAwsDQAJAIAEtAAAiEEEgRg0AAkACQCAQQXZqDgTaAQEB2gEACyAQQSxGDdsBCyABIQEMBAsgAUEBaiIBIAJHDQALQT8hEAyqAwsgASEBDNsBC0HAACEQIAEiFCACRg2oAyACIBRrIAAoAgAiAWohFiAUIAFrQQZqIRcCQANAIBQtAABBIHIgAUGAwICAAGotAABHDQEgAUEGRg2OAyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAypAwsgAEEANgIAIBQhAQtBNiEQDI4DCwJAIAEiDyACRw0AQcEAIRAMpwMLIABBjICAgAA2AgggACAPNgIEIA8hASAALQAsQX9qDgTNAdUB1wHZAYcDCyABQQFqIQEMzAELAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgciAQIBBBv39qQf8BcUEaSRtB/wFxIhBBCUYNACAQQSBGDQACQAJAAkACQCAQQZ1/ag4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUExIRAMkQMLIAFBAWohAUEyIRAMkAMLIAFBAWohAUEzIRAMjwMLIAEhAQzQAQsgAUEBaiIBIAJHDQALQTUhEAylAwtBNSEQDKQDCwJAIAEiASACRg0AA0ACQCABLQAAQYC8gIAAai0AAEEBRg0AIAEhAQzTAQsgAUEBaiIBIAJHDQALQT0hEAykAwtBPSEQDKMDCyAAIAEiASACELCAgIAAIhAN1gEgASEBDAELIBBBAWohAQtBPCEQDIcDCwJAIAEiASACRw0AQcIAIRAMoAMLAkADQAJAIAEtAABBd2oOGAAC/gL+AoQD/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4CAP4CCyABQQFqIgEgAkcNAAtBwgAhEAygAwsgAUEBaiEBIAAtAC1BAXFFDb0BIAEhAQtBLCEQDIUDCyABIgEgAkcN0wFBxAAhEAydAwsDQAJAIAEtAABBkMCAgABqLQAAQQFGDQAgASEBDLcCCyABQQFqIgEgAkcNAAtBxQAhEAycAwsgDS0AACIQQSBGDbMBIBBBOkcNgQMgACgCBCEBIABBADYCBCAAIAEgDRCvgICAACIBDdABIA1BAWohAQyzAgtBxwAhECABIg0gAkYNmgMgAiANayAAKAIAIgFqIRYgDSABa0EFaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGQwoCAAGotAABHDYADIAFBBUYN9AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmgMLQcgAIRAgASINIAJGDZkDIAIgDWsgACgCACIBaiEWIA0gAWtBCWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBlsKAgABqLQAARw3/AgJAIAFBCUcNAEECIQEM9QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJkDCwJAIAEiDSACRw0AQckAIRAMmQMLAkACQCANLQAAIgFBIHIgASABQb9/akH/AXFBGkkbQf8BcUGSf2oOBwCAA4ADgAOAA4ADAYADCyANQQFqIQFBPiEQDIADCyANQQFqIQFBPyEQDP8CC0HKACEQIAEiDSACRg2XAyACIA1rIAAoAgAiAWohFiANIAFrQQFqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaDCgIAAai0AAEcN/QIgAUEBRg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyXAwtBywAhECABIg0gAkYNlgMgAiANayAAKAIAIgFqIRYgDSABa0EOaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGiwoCAAGotAABHDfwCIAFBDkYN8AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlgMLQcwAIRAgASINIAJGDZUDIAIgDWsgACgCACIBaiEWIA0gAWtBD2ohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBwMKAgABqLQAARw37AgJAIAFBD0cNAEEDIQEM8QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJUDC0HNACEQIAEiDSACRg2UAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQdDCgIAAai0AAEcN+gICQCABQQVHDQBBBCEBDPACCyABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyUAwsCQCABIg0gAkcNAEHOACEQDJQDCwJAAkACQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZ1/ag4TAP0C/QL9Av0C/QL9Av0C/QL9Av0C/QL9AgH9Av0C/QICA/0CCyANQQFqIQFBwQAhEAz9AgsgDUEBaiEBQcIAIRAM/AILIA1BAWohAUHDACEQDPsCCyANQQFqIQFBxAAhEAz6AgsCQCABIgEgAkYNACAAQY2AgIAANgIIIAAgATYCBCABIQFBxQAhEAz6AgtBzwAhEAySAwsgECEBAkACQCAQLQAAQXZqDgQBqAKoAgCoAgsgEEEBaiEBC0EnIRAM+AILAkAgASIBIAJHDQBB0QAhEAyRAwsCQCABLQAAQSBGDQAgASEBDI0BCyABQQFqIQEgAC0ALUEBcUUNxwEgASEBDIwBCyABIhcgAkcNyAFB0gAhEAyPAwtB0wAhECABIhQgAkYNjgMgAiAUayAAKAIAIgFqIRYgFCABa0EBaiEXA0AgFC0AACABQdbCgIAAai0AAEcNzAEgAUEBRg3HASABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAyOAwsCQCABIgEgAkcNAEHVACEQDI4DCyABLQAAQQpHDcwBIAFBAWohAQzHAQsCQCABIgEgAkcNAEHWACEQDI0DCwJAAkAgAS0AAEF2ag4EAM0BzQEBzQELIAFBAWohAQzHAQsgAUEBaiEBQcoAIRAM8wILIAAgASIBIAIQroCAgAAiEA3LASABIQFBzQAhEAzyAgsgAC0AKUEiRg2FAwymAgsCQCABIgEgAkcNAEHbACEQDIoDC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgAS0AAEFQag4K1AHTAQABAgMEBQYI1QELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMzAELQQkhEEEBIRRBACEXQQAhFgzLAQsCQCABIgEgAkcNAEHdACEQDIkDCyABLQAAQS5HDcwBIAFBAWohAQymAgsgASIBIAJHDcwBQd8AIRAMhwMLAkAgASIBIAJGDQAgAEGOgICAADYCCCAAIAE2AgQgASEBQdAAIRAM7gILQeAAIRAMhgMLQeEAIRAgASIBIAJGDYUDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHiwoCAAGotAABHDc0BIBRBA0YNzAEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhQMLQeIAIRAgASIBIAJGDYQDIAIgAWsgACgCACIUaiEWIAEgFGtBAmohFwNAIAEtAAAgFEHmwoCAAGotAABHDcwBIBRBAkYNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhAMLQeMAIRAgASIBIAJGDYMDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHpwoCAAGotAABHDcsBIBRBA0YNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMgwMLAkAgASIBIAJHDQBB5QAhEAyDAwsgACABQQFqIgEgAhCogICAACIQDc0BIAEhAUHWACEQDOkCCwJAIAEiASACRg0AA0ACQCABLQAAIhBBIEYNAAJAAkACQCAQQbh/ag4LAAHPAc8BzwHPAc8BzwHPAc8BAs8BCyABQQFqIQFB0gAhEAztAgsgAUEBaiEBQdMAIRAM7AILIAFBAWohAUHUACEQDOsCCyABQQFqIgEgAkcNAAtB5AAhEAyCAwtB5AAhEAyBAwsDQAJAIAEtAABB8MKAgABqLQAAIhBBAUYNACAQQX5qDgPPAdAB0QHSAQsgAUEBaiIBIAJHDQALQeYAIRAMgAMLAkAgASIBIAJGDQAgAUEBaiEBDAMLQecAIRAM/wILA0ACQCABLQAAQfDEgIAAai0AACIQQQFGDQACQCAQQX5qDgTSAdMB1AEA1QELIAEhAUHXACEQDOcCCyABQQFqIgEgAkcNAAtB6AAhEAz+AgsCQCABIgEgAkcNAEHpACEQDP4CCwJAIAEtAAAiEEF2ag4augHVAdUBvAHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHKAdUB1QEA0wELIAFBAWohAQtBBiEQDOMCCwNAAkAgAS0AAEHwxoCAAGotAABBAUYNACABIQEMngILIAFBAWoiASACRw0AC0HqACEQDPsCCwJAIAEiASACRg0AIAFBAWohAQwDC0HrACEQDPoCCwJAIAEiASACRw0AQewAIRAM+gILIAFBAWohAQwBCwJAIAEiASACRw0AQe0AIRAM+QILIAFBAWohAQtBBCEQDN4CCwJAIAEiFCACRw0AQe4AIRAM9wILIBQhAQJAAkACQCAULQAAQfDIgIAAai0AAEF/ag4H1AHVAdYBAJwCAQLXAQsgFEEBaiEBDAoLIBRBAWohAQzNAQtBACEQIABBADYCHCAAQZuSgIAANgIQIABBBzYCDCAAIBRBAWo2AhQM9gILAkADQAJAIAEtAABB8MiAgABqLQAAIhBBBEYNAAJAAkAgEEF/ag4H0gHTAdQB2QEABAHZAQsgASEBQdoAIRAM4AILIAFBAWohAUHcACEQDN8CCyABQQFqIgEgAkcNAAtB7wAhEAz2AgsgAUEBaiEBDMsBCwJAIAEiFCACRw0AQfAAIRAM9QILIBQtAABBL0cN1AEgFEEBaiEBDAYLAkAgASIUIAJHDQBB8QAhEAz0AgsCQCAULQAAIgFBL0cNACAUQQFqIQFB3QAhEAzbAgsgAUF2aiIEQRZLDdMBQQEgBHRBiYCAAnFFDdMBDMoCCwJAIAEiASACRg0AIAFBAWohAUHeACEQDNoCC0HyACEQDPICCwJAIAEiFCACRw0AQfQAIRAM8gILIBQhAQJAIBQtAABB8MyAgABqLQAAQX9qDgPJApQCANQBC0HhACEQDNgCCwJAIAEiFCACRg0AA0ACQCAULQAAQfDKgIAAai0AACIBQQNGDQACQCABQX9qDgLLAgDVAQsgFCEBQd8AIRAM2gILIBRBAWoiFCACRw0AC0HzACEQDPECC0HzACEQDPACCwJAIAEiASACRg0AIABBj4CAgAA2AgggACABNgIEIAEhAUHgACEQDNcCC0H1ACEQDO8CCwJAIAEiASACRw0AQfYAIRAM7wILIABBj4CAgAA2AgggACABNgIEIAEhAQtBAyEQDNQCCwNAIAEtAABBIEcNwwIgAUEBaiIBIAJHDQALQfcAIRAM7AILAkAgASIBIAJHDQBB+AAhEAzsAgsgAS0AAEEgRw3OASABQQFqIQEM7wELIAAgASIBIAIQrICAgAAiEA3OASABIQEMjgILAkAgASIEIAJHDQBB+gAhEAzqAgsgBC0AAEHMAEcN0QEgBEEBaiEBQRMhEAzPAQsCQCABIgQgAkcNAEH7ACEQDOkCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRADQCAELQAAIAFB8M6AgABqLQAARw3QASABQQVGDc4BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQfsAIRAM6AILAkAgASIEIAJHDQBB/AAhEAzoAgsCQAJAIAQtAABBvX9qDgwA0QHRAdEB0QHRAdEB0QHRAdEB0QEB0QELIARBAWohAUHmACEQDM8CCyAEQQFqIQFB5wAhEAzOAgsCQCABIgQgAkcNAEH9ACEQDOcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDc8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH9ACEQDOcCCyAAQQA2AgAgEEEBaiEBQRAhEAzMAQsCQCABIgQgAkcNAEH+ACEQDOYCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUH2zoCAAGotAABHDc4BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH+ACEQDOYCCyAAQQA2AgAgEEEBaiEBQRYhEAzLAQsCQCABIgQgAkcNAEH/ACEQDOUCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUH8zoCAAGotAABHDc0BIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH/ACEQDOUCCyAAQQA2AgAgEEEBaiEBQQUhEAzKAQsCQCABIgQgAkcNAEGAASEQDOQCCyAELQAAQdkARw3LASAEQQFqIQFBCCEQDMkBCwJAIAEiBCACRw0AQYEBIRAM4wILAkACQCAELQAAQbJ/ag4DAMwBAcwBCyAEQQFqIQFB6wAhEAzKAgsgBEEBaiEBQewAIRAMyQILAkAgASIEIAJHDQBBggEhEAziAgsCQAJAIAQtAABBuH9qDggAywHLAcsBywHLAcsBAcsBCyAEQQFqIQFB6gAhEAzJAgsgBEEBaiEBQe0AIRAMyAILAkAgASIEIAJHDQBBgwEhEAzhAgsgAiAEayAAKAIAIgFqIRAgBCABa0ECaiEUAkADQCAELQAAIAFBgM+AgABqLQAARw3JASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBA2AgBBgwEhEAzhAgtBACEQIABBADYCACAUQQFqIQEMxgELAkAgASIEIAJHDQBBhAEhEAzgAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBg8+AgABqLQAARw3IASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhAEhEAzgAgsgAEEANgIAIBBBAWohAUEjIRAMxQELAkAgASIEIAJHDQBBhQEhEAzfAgsCQAJAIAQtAABBtH9qDggAyAHIAcgByAHIAcgBAcgBCyAEQQFqIQFB7wAhEAzGAgsgBEEBaiEBQfAAIRAMxQILAkAgASIEIAJHDQBBhgEhEAzeAgsgBC0AAEHFAEcNxQEgBEEBaiEBDIMCCwJAIAEiBCACRw0AQYcBIRAM3QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQYjPgIAAai0AAEcNxQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYcBIRAM3QILIABBADYCACAQQQFqIQFBLSEQDMIBCwJAIAEiBCACRw0AQYgBIRAM3AILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNxAEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYgBIRAM3AILIABBADYCACAQQQFqIQFBKSEQDMEBCwJAIAEiASACRw0AQYkBIRAM2wILQQEhECABLQAAQd8ARw3AASABQQFqIQEMgQILAkAgASIEIAJHDQBBigEhEAzaAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQA0AgBC0AACABQYzPgIAAai0AAEcNwQEgAUEBRg2vAiABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGKASEQDNkCCwJAIAEiBCACRw0AQYsBIRAM2QILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQY7PgIAAai0AAEcNwQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYsBIRAM2QILIABBADYCACAQQQFqIQFBAiEQDL4BCwJAIAEiBCACRw0AQYwBIRAM2AILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNwAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYwBIRAM2AILIABBADYCACAQQQFqIQFBHyEQDL0BCwJAIAEiBCACRw0AQY0BIRAM1wILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNvwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY0BIRAM1wILIABBADYCACAQQQFqIQFBCSEQDLwBCwJAIAEiBCACRw0AQY4BIRAM1gILAkACQCAELQAAQbd/ag4HAL8BvwG/Ab8BvwEBvwELIARBAWohAUH4ACEQDL0CCyAEQQFqIQFB+QAhEAy8AgsCQCABIgQgAkcNAEGPASEQDNUCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGRz4CAAGotAABHDb0BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGPASEQDNUCCyAAQQA2AgAgEEEBaiEBQRghEAy6AQsCQCABIgQgAkcNAEGQASEQDNQCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUGXz4CAAGotAABHDbwBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGQASEQDNQCCyAAQQA2AgAgEEEBaiEBQRchEAy5AQsCQCABIgQgAkcNAEGRASEQDNMCCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUGaz4CAAGotAABHDbsBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGRASEQDNMCCyAAQQA2AgAgEEEBaiEBQRUhEAy4AQsCQCABIgQgAkcNAEGSASEQDNICCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGhz4CAAGotAABHDboBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGSASEQDNICCyAAQQA2AgAgEEEBaiEBQR4hEAy3AQsCQCABIgQgAkcNAEGTASEQDNECCyAELQAAQcwARw24ASAEQQFqIQFBCiEQDLYBCwJAIAQgAkcNAEGUASEQDNACCwJAAkAgBC0AAEG/f2oODwC5AbkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AQG5AQsgBEEBaiEBQf4AIRAMtwILIARBAWohAUH/ACEQDLYCCwJAIAQgAkcNAEGVASEQDM8CCwJAAkAgBC0AAEG/f2oOAwC4AQG4AQsgBEEBaiEBQf0AIRAMtgILIARBAWohBEGAASEQDLUCCwJAIAQgAkcNAEGWASEQDM4CCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUGnz4CAAGotAABHDbYBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGWASEQDM4CCyAAQQA2AgAgEEEBaiEBQQshEAyzAQsCQCAEIAJHDQBBlwEhEAzNAgsCQAJAAkACQCAELQAAQVNqDiMAuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AQG4AbgBuAG4AbgBArgBuAG4AQO4AQsgBEEBaiEBQfsAIRAMtgILIARBAWohAUH8ACEQDLUCCyAEQQFqIQRBgQEhEAy0AgsgBEEBaiEEQYIBIRAMswILAkAgBCACRw0AQZgBIRAMzAILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQanPgIAAai0AAEcNtAEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZgBIRAMzAILIABBADYCACAQQQFqIQFBGSEQDLEBCwJAIAQgAkcNAEGZASEQDMsCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGuz4CAAGotAABHDbMBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGZASEQDMsCCyAAQQA2AgAgEEEBaiEBQQYhEAywAQsCQCAEIAJHDQBBmgEhEAzKAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBtM+AgABqLQAARw2yASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmgEhEAzKAgsgAEEANgIAIBBBAWohAUEcIRAMrwELAkAgBCACRw0AQZsBIRAMyQILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbbPgIAAai0AAEcNsQEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZsBIRAMyQILIABBADYCACAQQQFqIQFBJyEQDK4BCwJAIAQgAkcNAEGcASEQDMgCCwJAAkAgBC0AAEGsf2oOAgABsQELIARBAWohBEGGASEQDK8CCyAEQQFqIQRBhwEhEAyuAgsCQCAEIAJHDQBBnQEhEAzHAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBuM+AgABqLQAARw2vASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBnQEhEAzHAgsgAEEANgIAIBBBAWohAUEmIRAMrAELAkAgBCACRw0AQZ4BIRAMxgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbrPgIAAai0AAEcNrgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ4BIRAMxgILIABBADYCACAQQQFqIQFBAyEQDKsBCwJAIAQgAkcNAEGfASEQDMUCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDa0BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGfASEQDMUCCyAAQQA2AgAgEEEBaiEBQQwhEAyqAQsCQCAEIAJHDQBBoAEhEAzEAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBvM+AgABqLQAARw2sASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBoAEhEAzEAgsgAEEANgIAIBBBAWohAUENIRAMqQELAkAgBCACRw0AQaEBIRAMwwILAkACQCAELQAAQbp/ag4LAKwBrAGsAawBrAGsAawBrAGsAQGsAQsgBEEBaiEEQYsBIRAMqgILIARBAWohBEGMASEQDKkCCwJAIAQgAkcNAEGiASEQDMICCyAELQAAQdAARw2pASAEQQFqIQQM6QELAkAgBCACRw0AQaMBIRAMwQILAkACQCAELQAAQbd/ag4HAaoBqgGqAaoBqgEAqgELIARBAWohBEGOASEQDKgCCyAEQQFqIQFBIiEQDKYBCwJAIAQgAkcNAEGkASEQDMACCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHAz4CAAGotAABHDagBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGkASEQDMACCyAAQQA2AgAgEEEBaiEBQR0hEAylAQsCQCAEIAJHDQBBpQEhEAy/AgsCQAJAIAQtAABBrn9qDgMAqAEBqAELIARBAWohBEGQASEQDKYCCyAEQQFqIQFBBCEQDKQBCwJAIAQgAkcNAEGmASEQDL4CCwJAAkACQAJAAkAgBC0AAEG/f2oOFQCqAaoBqgGqAaoBqgGqAaoBqgGqAQGqAaoBAqoBqgEDqgGqAQSqAQsgBEEBaiEEQYgBIRAMqAILIARBAWohBEGJASEQDKcCCyAEQQFqIQRBigEhEAymAgsgBEEBaiEEQY8BIRAMpQILIARBAWohBEGRASEQDKQCCwJAIAQgAkcNAEGnASEQDL0CCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDaUBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGnASEQDL0CCyAAQQA2AgAgEEEBaiEBQREhEAyiAQsCQCAEIAJHDQBBqAEhEAy8AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBws+AgABqLQAARw2kASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqAEhEAy8AgsgAEEANgIAIBBBAWohAUEsIRAMoQELAkAgBCACRw0AQakBIRAMuwILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQcXPgIAAai0AAEcNowEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQakBIRAMuwILIABBADYCACAQQQFqIQFBKyEQDKABCwJAIAQgAkcNAEGqASEQDLoCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHKz4CAAGotAABHDaIBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGqASEQDLoCCyAAQQA2AgAgEEEBaiEBQRQhEAyfAQsCQCAEIAJHDQBBqwEhEAy5AgsCQAJAAkACQCAELQAAQb5/ag4PAAECpAGkAaQBpAGkAaQBpAGkAaQBpAGkAQOkAQsgBEEBaiEEQZMBIRAMogILIARBAWohBEGUASEQDKECCyAEQQFqIQRBlQEhEAygAgsgBEEBaiEEQZYBIRAMnwILAkAgBCACRw0AQawBIRAMuAILIAQtAABBxQBHDZ8BIARBAWohBAzgAQsCQCAEIAJHDQBBrQEhEAy3AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBzc+AgABqLQAARw2fASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrQEhEAy3AgsgAEEANgIAIBBBAWohAUEOIRAMnAELAkAgBCACRw0AQa4BIRAMtgILIAQtAABB0ABHDZ0BIARBAWohAUElIRAMmwELAkAgBCACRw0AQa8BIRAMtQILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNnQEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQa8BIRAMtQILIABBADYCACAQQQFqIQFBKiEQDJoBCwJAIAQgAkcNAEGwASEQDLQCCwJAAkAgBC0AAEGrf2oOCwCdAZ0BnQGdAZ0BnQGdAZ0BnQEBnQELIARBAWohBEGaASEQDJsCCyAEQQFqIQRBmwEhEAyaAgsCQCAEIAJHDQBBsQEhEAyzAgsCQAJAIAQtAABBv39qDhQAnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBAZwBCyAEQQFqIQRBmQEhEAyaAgsgBEEBaiEEQZwBIRAMmQILAkAgBCACRw0AQbIBIRAMsgILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQdnPgIAAai0AAEcNmgEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbIBIRAMsgILIABBADYCACAQQQFqIQFBISEQDJcBCwJAIAQgAkcNAEGzASEQDLECCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUHdz4CAAGotAABHDZkBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGzASEQDLECCyAAQQA2AgAgEEEBaiEBQRohEAyWAQsCQCAEIAJHDQBBtAEhEAywAgsCQAJAAkAgBC0AAEG7f2oOEQCaAZoBmgGaAZoBmgGaAZoBmgEBmgGaAZoBmgGaAQKaAQsgBEEBaiEEQZ0BIRAMmAILIARBAWohBEGeASEQDJcCCyAEQQFqIQRBnwEhEAyWAgsCQCAEIAJHDQBBtQEhEAyvAgsgAiAEayAAKAIAIgFqIRQgBCABa0EFaiEQAkADQCAELQAAIAFB5M+AgABqLQAARw2XASABQQVGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtQEhEAyvAgsgAEEANgIAIBBBAWohAUEoIRAMlAELAkAgBCACRw0AQbYBIRAMrgILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQerPgIAAai0AAEcNlgEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbYBIRAMrgILIABBADYCACAQQQFqIQFBByEQDJMBCwJAIAQgAkcNAEG3ASEQDK0CCwJAAkAgBC0AAEG7f2oODgCWAZYBlgGWAZYBlgGWAZYBlgGWAZYBlgEBlgELIARBAWohBEGhASEQDJQCCyAEQQFqIQRBogEhEAyTAgsCQCAEIAJHDQBBuAEhEAysAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB7c+AgABqLQAARw2UASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuAEhEAysAgsgAEEANgIAIBBBAWohAUESIRAMkQELAkAgBCACRw0AQbkBIRAMqwILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNkwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbkBIRAMqwILIABBADYCACAQQQFqIQFBICEQDJABCwJAIAQgAkcNAEG6ASEQDKoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHyz4CAAGotAABHDZIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG6ASEQDKoCCyAAQQA2AgAgEEEBaiEBQQ8hEAyPAQsCQCAEIAJHDQBBuwEhEAypAgsCQAJAIAQtAABBt39qDgcAkgGSAZIBkgGSAQGSAQsgBEEBaiEEQaUBIRAMkAILIARBAWohBEGmASEQDI8CCwJAIAQgAkcNAEG8ASEQDKgCCyACIARrIAAoAgAiAWohFCAEIAFrQQdqIRACQANAIAQtAAAgAUH0z4CAAGotAABHDZABIAFBB0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG8ASEQDKgCCyAAQQA2AgAgEEEBaiEBQRshEAyNAQsCQCAEIAJHDQBBvQEhEAynAgsCQAJAAkAgBC0AAEG+f2oOEgCRAZEBkQGRAZEBkQGRAZEBkQEBkQGRAZEBkQGRAZEBApEBCyAEQQFqIQRBpAEhEAyPAgsgBEEBaiEEQacBIRAMjgILIARBAWohBEGoASEQDI0CCwJAIAQgAkcNAEG+ASEQDKYCCyAELQAAQc4ARw2NASAEQQFqIQQMzwELAkAgBCACRw0AQb8BIRAMpQILAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgBC0AAEG/f2oOFQABAgOcAQQFBpwBnAGcAQcICQoLnAEMDQ4PnAELIARBAWohAUHoACEQDJoCCyAEQQFqIQFB6QAhEAyZAgsgBEEBaiEBQe4AIRAMmAILIARBAWohAUHyACEQDJcCCyAEQQFqIQFB8wAhEAyWAgsgBEEBaiEBQfYAIRAMlQILIARBAWohAUH3ACEQDJQCCyAEQQFqIQFB+gAhEAyTAgsgBEEBaiEEQYMBIRAMkgILIARBAWohBEGEASEQDJECCyAEQQFqIQRBhQEhEAyQAgsgBEEBaiEEQZIBIRAMjwILIARBAWohBEGYASEQDI4CCyAEQQFqIQRBoAEhEAyNAgsgBEEBaiEEQaMBIRAMjAILIARBAWohBEGqASEQDIsCCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEGrASEQDIsCC0HAASEQDKMCCyAAIAUgAhCqgICAACIBDYsBIAUhAQxcCwJAIAYgAkYNACAGQQFqIQUMjQELQcIBIRAMoQILA0ACQCAQLQAAQXZqDgSMAQAAjwEACyAQQQFqIhAgAkcNAAtBwwEhEAygAgsCQCAHIAJGDQAgAEGRgICAADYCCCAAIAc2AgQgByEBQQEhEAyHAgtBxAEhEAyfAgsCQCAHIAJHDQBBxQEhEAyfAgsCQAJAIActAABBdmoOBAHOAc4BAM4BCyAHQQFqIQYMjQELIAdBAWohBQyJAQsCQCAHIAJHDQBBxgEhEAyeAgsCQAJAIActAABBdmoOFwGPAY8BAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAQCPAQsgB0EBaiEHC0GwASEQDIQCCwJAIAggAkcNAEHIASEQDJ0CCyAILQAAQSBHDY0BIABBADsBMiAIQQFqIQFBswEhEAyDAgsgASEXAkADQCAXIgcgAkYNASAHLQAAQVBqQf8BcSIQQQpPDcwBAkAgAC8BMiIUQZkzSw0AIAAgFEEKbCIUOwEyIBBB//8DcyAUQf7/A3FJDQAgB0EBaiEXIAAgFCAQaiIQOwEyIBBB//8DcUHoB0kNAQsLQQAhECAAQQA2AhwgAEHBiYCAADYCECAAQQ02AgwgACAHQQFqNgIUDJwCC0HHASEQDJsCCyAAIAggAhCugICAACIQRQ3KASAQQRVHDYwBIABByAE2AhwgACAINgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAyaAgsCQCAJIAJHDQBBzAEhEAyaAgtBACEUQQEhF0EBIRZBACEQAkACQAJAAkACQAJAAkACQAJAIAktAABBUGoOCpYBlQEAAQIDBAUGCJcBC0ECIRAMBgtBAyEQDAULQQQhEAwEC0EFIRAMAwtBBiEQDAILQQchEAwBC0EIIRALQQAhF0EAIRZBACEUDI4BC0EJIRBBASEUQQAhF0EAIRYMjQELAkAgCiACRw0AQc4BIRAMmQILIAotAABBLkcNjgEgCkEBaiEJDMoBCyALIAJHDY4BQdABIRAMlwILAkAgCyACRg0AIABBjoCAgAA2AgggACALNgIEQbcBIRAM/gELQdEBIRAMlgILAkAgBCACRw0AQdIBIRAMlgILIAIgBGsgACgCACIQaiEUIAQgEGtBBGohCwNAIAQtAAAgEEH8z4CAAGotAABHDY4BIBBBBEYN6QEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB0gEhEAyVAgsgACAMIAIQrICAgAAiAQ2NASAMIQEMuAELAkAgBCACRw0AQdQBIRAMlAILIAIgBGsgACgCACIQaiEUIAQgEGtBAWohDANAIAQtAAAgEEGB0ICAAGotAABHDY8BIBBBAUYNjgEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB1AEhEAyTAgsCQCAEIAJHDQBB1gEhEAyTAgsgAiAEayAAKAIAIhBqIRQgBCAQa0ECaiELA0AgBC0AACAQQYPQgIAAai0AAEcNjgEgEEECRg2QASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHWASEQDJICCwJAIAQgAkcNAEHXASEQDJICCwJAAkAgBC0AAEG7f2oOEACPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAY8BCyAEQQFqIQRBuwEhEAz5AQsgBEEBaiEEQbwBIRAM+AELAkAgBCACRw0AQdgBIRAMkQILIAQtAABByABHDYwBIARBAWohBAzEAQsCQCAEIAJGDQAgAEGQgICAADYCCCAAIAQ2AgRBvgEhEAz3AQtB2QEhEAyPAgsCQCAEIAJHDQBB2gEhEAyPAgsgBC0AAEHIAEYNwwEgAEEBOgAoDLkBCyAAQQI6AC8gACAEIAIQpoCAgAAiEA2NAUHCASEQDPQBCyAALQAoQX9qDgK3AbkBuAELA0ACQCAELQAAQXZqDgQAjgGOAQCOAQsgBEEBaiIEIAJHDQALQd0BIRAMiwILIABBADoALyAALQAtQQRxRQ2EAgsgAEEAOgAvIABBAToANCABIQEMjAELIBBBFUYN2gEgAEEANgIcIAAgATYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMiAILAkAgACAQIAIQtICAgAAiBA0AIBAhAQyBAgsCQCAEQRVHDQAgAEEDNgIcIAAgEDYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMiAILIABBADYCHCAAIBA2AhQgAEGnjoCAADYCECAAQRI2AgxBACEQDIcCCyAQQRVGDdYBIABBADYCHCAAIAE2AhQgAEHajYCAADYCECAAQRQ2AgxBACEQDIYCCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNjQEgAEEHNgIcIAAgEDYCFCAAIBQ2AgxBACEQDIUCCyAAIAAvATBBgAFyOwEwIAEhAQtBKiEQDOoBCyAQQRVGDdEBIABBADYCHCAAIAE2AhQgAEGDjICAADYCECAAQRM2AgxBACEQDIICCyAQQRVGDc8BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDIECCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyNAQsgAEEMNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDIACCyAQQRVGDcwBIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDP8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyMAQsgAEENNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDP4BCyAQQRVGDckBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDP0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyLAQsgAEEONgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPwBCyAAQQA2AhwgACABNgIUIABBwJWAgAA2AhAgAEECNgIMQQAhEAz7AQsgEEEVRg3FASAAQQA2AhwgACABNgIUIABBxoyAgAA2AhAgAEEjNgIMQQAhEAz6AQsgAEEQNgIcIAAgATYCFCAAIBA2AgxBACEQDPkBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQzxAQsgAEERNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPgBCyAQQRVGDcEBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPcBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyIAQsgAEETNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPYBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQztAQsgAEEUNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPUBCyAQQRVGDb0BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDPQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyGAQsgAEEWNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPMBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQt4CAgAAiBA0AIAFBAWohAQzpAQsgAEEXNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPIBCyAAQQA2AhwgACABNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzxAQtCASERCyAQQQFqIQECQCAAKQMgIhJC//////////8PVg0AIAAgEkIEhiARhDcDICABIQEMhAELIABBADYCHCAAIAE2AhQgAEGtiYCAADYCECAAQQw2AgxBACEQDO8BCyAAQQA2AhwgACAQNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzuAQsgACgCBCEXIABBADYCBCAQIBGnaiIWIQEgACAXIBAgFiAUGyIQELWAgIAAIhRFDXMgAEEFNgIcIAAgEDYCFCAAIBQ2AgxBACEQDO0BCyAAQQA2AhwgACAQNgIUIABBqpyAgAA2AhAgAEEPNgIMQQAhEAzsAQsgACAQIAIQtICAgAAiAQ0BIBAhAQtBDiEQDNEBCwJAIAFBFUcNACAAQQI2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAzqAQsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAM6QELIAFBAWohEAJAIAAvATAiAUGAAXFFDQACQCAAIBAgAhC7gICAACIBDQAgECEBDHALIAFBFUcNugEgAEEFNgIcIAAgEDYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAM6QELAkAgAUGgBHFBoARHDQAgAC0ALUECcQ0AIABBADYCHCAAIBA2AhQgAEGWk4CAADYCECAAQQQ2AgxBACEQDOkBCyAAIBAgAhC9gICAABogECEBAkACQAJAAkACQCAAIBAgAhCzgICAAA4WAgEABAQEBAQEBAQEBAQEBAQEBAQEAwQLIABBAToALgsgACAALwEwQcAAcjsBMCAQIQELQSYhEAzRAQsgAEEjNgIcIAAgEDYCFCAAQaWWgIAANgIQIABBFTYCDEEAIRAM6QELIABBADYCHCAAIBA2AhQgAEHVi4CAADYCECAAQRE2AgxBACEQDOgBCyAALQAtQQFxRQ0BQcMBIRAMzgELAkAgDSACRg0AA0ACQCANLQAAQSBGDQAgDSEBDMQBCyANQQFqIg0gAkcNAAtBJSEQDOcBC0ElIRAM5gELIAAoAgQhBCAAQQA2AgQgACAEIA0Qr4CAgAAiBEUNrQEgAEEmNgIcIAAgBDYCDCAAIA1BAWo2AhRBACEQDOUBCyAQQRVGDasBIABBADYCHCAAIAE2AhQgAEH9jYCAADYCECAAQR02AgxBACEQDOQBCyAAQSc2AhwgACABNgIUIAAgEDYCDEEAIRAM4wELIBAhAUEBIRQCQAJAAkACQAJAAkACQCAALQAsQX5qDgcGBQUDAQIABQsgACAALwEwQQhyOwEwDAMLQQIhFAwBC0EEIRQLIABBAToALCAAIAAvATAgFHI7ATALIBAhAQtBKyEQDMoBCyAAQQA2AhwgACAQNgIUIABBq5KAgAA2AhAgAEELNgIMQQAhEAziAQsgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDEEAIRAM4QELIABBADoALCAQIQEMvQELIBAhAUEBIRQCQAJAAkACQAJAIAAtACxBe2oOBAMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0EpIRAMxQELIABBADYCHCAAIAE2AhQgAEHwlICAADYCECAAQQM2AgxBACEQDN0BCwJAIA4tAABBDUcNACAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA5BAWohAQx1CyAAQSw2AhwgACABNgIMIAAgDkEBajYCFEEAIRAM3QELIAAtAC1BAXFFDQFBxAEhEAzDAQsCQCAOIAJHDQBBLSEQDNwBCwJAAkADQAJAIA4tAABBdmoOBAIAAAMACyAOQQFqIg4gAkcNAAtBLSEQDN0BCyAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA4hAQx0CyAAQSw2AhwgACAONgIUIAAgATYCDEEAIRAM3AELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHMLIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzbAQsgACgCBCEEIABBADYCBCAAIAQgDhCxgICAACIEDaABIA4hAQzOAQsgEEEsRw0BIAFBAWohEEEBIQECQAJAAkACQAJAIAAtACxBe2oOBAMBAgQACyAQIQEMBAtBAiEBDAELQQQhAQsgAEEBOgAsIAAgAC8BMCABcjsBMCAQIQEMAQsgACAALwEwQQhyOwEwIBAhAQtBOSEQDL8BCyAAQQA6ACwgASEBC0E0IRAMvQELIAAgAC8BMEEgcjsBMCABIQEMAgsgACgCBCEEIABBADYCBAJAIAAgBCABELGAgIAAIgQNACABIQEMxwELIABBNzYCHCAAIAE2AhQgACAENgIMQQAhEAzUAQsgAEEIOgAsIAEhAQtBMCEQDLkBCwJAIAAtAChBAUYNACABIQEMBAsgAC0ALUEIcUUNkwEgASEBDAMLIAAtADBBIHENlAFBxQEhEAy3AQsCQCAPIAJGDQACQANAAkAgDy0AAEFQaiIBQf8BcUEKSQ0AIA8hAUE1IRAMugELIAApAyAiEUKZs+bMmbPmzBlWDQEgACARQgp+IhE3AyAgESABrUL/AYMiEkJ/hVYNASAAIBEgEnw3AyAgD0EBaiIPIAJHDQALQTkhEAzRAQsgACgCBCECIABBADYCBCAAIAIgD0EBaiIEELGAgIAAIgINlQEgBCEBDMMBC0E5IRAMzwELAkAgAC8BMCIBQQhxRQ0AIAAtAChBAUcNACAALQAtQQhxRQ2QAQsgACABQff7A3FBgARyOwEwIA8hAQtBNyEQDLQBCyAAIAAvATBBEHI7ATAMqwELIBBBFUYNiwEgAEEANgIcIAAgATYCFCAAQfCOgIAANgIQIABBHDYCDEEAIRAMywELIABBwwA2AhwgACABNgIMIAAgDUEBajYCFEEAIRAMygELAkAgAS0AAEE6Rw0AIAAoAgQhECAAQQA2AgQCQCAAIBAgARCvgICAACIQDQAgAUEBaiEBDGMLIABBwwA2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMygELIABBADYCHCAAIAE2AhQgAEGxkYCAADYCECAAQQo2AgxBACEQDMkBCyAAQQA2AhwgACABNgIUIABBoJmAgAA2AhAgAEEeNgIMQQAhEAzIAQsgAEEANgIACyAAQYASOwEqIAAgF0EBaiIBIAIQqICAgAAiEA0BIAEhAQtBxwAhEAysAQsgEEEVRw2DASAAQdEANgIcIAAgATYCFCAAQeOXgIAANgIQIABBFTYCDEEAIRAMxAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDF4LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMwwELIABBADYCHCAAIBQ2AhQgAEHBqICAADYCECAAQQc2AgwgAEEANgIAQQAhEAzCAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAzBAQtBACEQIABBADYCHCAAIAE2AhQgAEGAkYCAADYCECAAQQk2AgwMwAELIBBBFUYNfSAAQQA2AhwgACABNgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAy/AQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgAUEBaiEBAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBAJAIAAgECABEK2AgIAAIhANACABIQEMXAsgAEHYADYCHCAAIAE2AhQgACAQNgIMQQAhEAy+AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMrQELIABB2QA2AhwgACABNgIUIAAgBDYCDEEAIRAMvQELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKsBCyAAQdoANgIcIAAgATYCFCAAIAQ2AgxBACEQDLwBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQypAQsgAEHcADYCHCAAIAE2AhQgACAENgIMQQAhEAy7AQsCQCABLQAAQVBqIhBB/wFxQQpPDQAgACAQOgAqIAFBAWohAUHPACEQDKIBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQynAQsgAEHeADYCHCAAIAE2AhQgACAENgIMQQAhEAy6AQsgAEEANgIAIBdBAWohAQJAIAAtAClBI08NACABIQEMWQsgAEEANgIcIAAgATYCFCAAQdOJgIAANgIQIABBCDYCDEEAIRAMuQELIABBADYCAAtBACEQIABBADYCHCAAIAE2AhQgAEGQs4CAADYCECAAQQg2AgwMtwELIABBADYCACAXQQFqIQECQCAALQApQSFHDQAgASEBDFYLIABBADYCHCAAIAE2AhQgAEGbioCAADYCECAAQQg2AgxBACEQDLYBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKSIQQV1qQQtPDQAgASEBDFULAkAgEEEGSw0AQQEgEHRBygBxRQ0AIAEhAQxVC0EAIRAgAEEANgIcIAAgATYCFCAAQfeJgIAANgIQIABBCDYCDAy1AQsgEEEVRg1xIABBADYCHCAAIAE2AhQgAEG5jYCAADYCECAAQRo2AgxBACEQDLQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxUCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLMBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDLIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDLEBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxRCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLABCyAAQQA2AhwgACABNgIUIABBxoqAgAA2AhAgAEEHNgIMQQAhEAyvAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAyuAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNgIUIAAgATYCDEEAIRAMowELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDEMLIABB5QA2AhwgACAUNgIUIAAgATYCDEEAIRAMogELIABBADYCHCAAIBQ2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKEBCyAAQQA2AhwgACABNgIUIABBw4+AgAA2AhAgAEEHNgIMQQAhEAygAQtBACEQIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgwMnwELIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgxBACEQDJ4BCyAAQQA2AhwgACAUNgIUIABB/pGAgAA2AhAgAEEHNgIMQQAhEAydAQsgAEEANgIcIAAgATYCFCAAQY6bgIAANgIQIABBBjYCDEEAIRAMnAELIBBBFUYNVyAAQQA2AhwgACABNgIUIABBzI6AgAA2AhAgAEEgNgIMQQAhEAybAQsgAEEANgIAIBBBAWohAUEkIRALIAAgEDoAKSAAKAIEIRAgAEEANgIEIAAgECABEKuAgIAAIhANVCABIQEMPgsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQfGbgIAANgIQIABBBjYCDAyXAQsgAUEVRg1QIABBADYCHCAAIAU2AhQgAEHwjICAADYCECAAQRs2AgxBACEQDJYBCyAAKAIEIQUgAEEANgIEIAAgBSAQEKmAgIAAIgUNASAQQQFqIQULQa0BIRAMewsgAEHBATYCHCAAIAU2AgwgACAQQQFqNgIUQQAhEAyTAQsgACgCBCEGIABBADYCBCAAIAYgEBCpgICAACIGDQEgEEEBaiEGC0GuASEQDHgLIABBwgE2AhwgACAGNgIMIAAgEEEBajYCFEEAIRAMkAELIABBADYCHCAAIAc2AhQgAEGXi4CAADYCECAAQQ02AgxBACEQDI8BCyAAQQA2AhwgACAINgIUIABB45CAgAA2AhAgAEEJNgIMQQAhEAyOAQsgAEEANgIcIAAgCDYCFCAAQZSNgIAANgIQIABBITYCDEEAIRAMjQELQQEhFkEAIRdBACEUQQEhEAsgACAQOgArIAlBAWohCAJAAkAgAC0ALUEQcQ0AAkACQAJAIAAtACoOAwEAAgQLIBZFDQMMAgsgFA0BDAILIBdFDQELIAAoAgQhECAAQQA2AgQgACAQIAgQrYCAgAAiEEUNPSAAQckBNgIcIAAgCDYCFCAAIBA2AgxBACEQDIwBCyAAKAIEIQQgAEEANgIEIAAgBCAIEK2AgIAAIgRFDXYgAEHKATYCHCAAIAg2AhQgACAENgIMQQAhEAyLAQsgACgCBCEEIABBADYCBCAAIAQgCRCtgICAACIERQ10IABBywE2AhwgACAJNgIUIAAgBDYCDEEAIRAMigELIAAoAgQhBCAAQQA2AgQgACAEIAoQrYCAgAAiBEUNciAAQc0BNgIcIAAgCjYCFCAAIAQ2AgxBACEQDIkBCwJAIAstAABBUGoiEEH/AXFBCk8NACAAIBA6ACogC0EBaiEKQbYBIRAMcAsgACgCBCEEIABBADYCBCAAIAQgCxCtgICAACIERQ1wIABBzwE2AhwgACALNgIUIAAgBDYCDEEAIRAMiAELIABBADYCHCAAIAQ2AhQgAEGQs4CAADYCECAAQQg2AgwgAEEANgIAQQAhEAyHAQsgAUEVRg0/IABBADYCHCAAIAw2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDIYBCyAAQYEEOwEoIAAoAgQhECAAQgA3AwAgACAQIAxBAWoiDBCrgICAACIQRQ04IABB0wE2AhwgACAMNgIUIAAgEDYCDEEAIRAMhQELIABBADYCAAtBACEQIABBADYCHCAAIAQ2AhQgAEHYm4CAADYCECAAQQg2AgwMgwELIAAoAgQhECAAQgA3AwAgACAQIAtBAWoiCxCrgICAACIQDQFBxgEhEAxpCyAAQQI6ACgMVQsgAEHVATYCHCAAIAs2AhQgACAQNgIMQQAhEAyAAQsgEEEVRg03IABBADYCHCAAIAQ2AhQgAEGkjICAADYCECAAQRA2AgxBACEQDH8LIAAtADRBAUcNNCAAIAQgAhC8gICAACIQRQ00IBBBFUcNNSAAQdwBNgIcIAAgBDYCFCAAQdWWgIAANgIQIABBFTYCDEEAIRAMfgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQMfQtBACEQDGMLQQIhEAxiC0ENIRAMYQtBDyEQDGALQSUhEAxfC0ETIRAMXgtBFSEQDF0LQRYhEAxcC0EXIRAMWwtBGCEQDFoLQRkhEAxZC0EaIRAMWAtBGyEQDFcLQRwhEAxWC0EdIRAMVQtBHyEQDFQLQSEhEAxTC0EjIRAMUgtBxgAhEAxRC0EuIRAMUAtBLyEQDE8LQTshEAxOC0E9IRAMTQtByAAhEAxMC0HJACEQDEsLQcsAIRAMSgtBzAAhEAxJC0HOACEQDEgLQdEAIRAMRwtB1QAhEAxGC0HYACEQDEULQdkAIRAMRAtB2wAhEAxDC0HkACEQDEILQeUAIRAMQQtB8QAhEAxAC0H0ACEQDD8LQY0BIRAMPgtBlwEhEAw9C0GpASEQDDwLQawBIRAMOwtBwAEhEAw6C0G5ASEQDDkLQa8BIRAMOAtBsQEhEAw3C0GyASEQDDYLQbQBIRAMNQtBtQEhEAw0C0G6ASEQDDMLQb0BIRAMMgtBvwEhEAwxC0HBASEQDDALIABBADYCHCAAIAQ2AhQgAEHpi4CAADYCECAAQR82AgxBACEQDEgLIABB2wE2AhwgACAENgIUIABB+paAgAA2AhAgAEEVNgIMQQAhEAxHCyAAQfgANgIcIAAgDDYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMRgsgAEHRADYCHCAAIAU2AhQgAEGwl4CAADYCECAAQRU2AgxBACEQDEULIABB+QA2AhwgACABNgIUIAAgEDYCDEEAIRAMRAsgAEH4ADYCHCAAIAE2AhQgAEHKmICAADYCECAAQRU2AgxBACEQDEMLIABB5AA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAxCCyAAQdcANgIcIAAgATYCFCAAQcmXgIAANgIQIABBFTYCDEEAIRAMQQsgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMQAsgAEHCADYCHCAAIAE2AhQgAEHjmICAADYCECAAQRU2AgxBACEQDD8LIABBADYCBCAAIA8gDxCxgICAACIERQ0BIABBOjYCHCAAIAQ2AgwgACAPQQFqNgIUQQAhEAw+CyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBEUNACAAQTs2AhwgACAENgIMIAAgAUEBajYCFEEAIRAMPgsgAUEBaiEBDC0LIA9BAWohAQwtCyAAQQA2AhwgACAPNgIUIABB5JKAgAA2AhAgAEEENgIMQQAhEAw7CyAAQTY2AhwgACAENgIUIAAgAjYCDEEAIRAMOgsgAEEuNgIcIAAgDjYCFCAAIAQ2AgxBACEQDDkLIABB0AA2AhwgACABNgIUIABBkZiAgAA2AhAgAEEVNgIMQQAhEAw4CyANQQFqIQEMLAsgAEEVNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMNgsgAEEbNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNQsgAEEPNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNAsgAEELNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMMwsgAEEaNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMgsgAEELNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMQsgAEEKNgIcIAAgATYCFCAAQeSWgIAANgIQIABBFTYCDEEAIRAMMAsgAEEeNgIcIAAgATYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAMLwsgAEEANgIcIAAgEDYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMLgsgAEEENgIcIAAgATYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMLQsgAEEANgIAIAtBAWohCwtBuAEhEAwSCyAAQQA2AgAgEEEBaiEBQfUAIRAMEQsgASEBAkAgAC0AKUEFRw0AQeMAIRAMEQtB4gAhEAwQC0EAIRAgAEEANgIcIABB5JGAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAwoCyAAQQA2AgAgF0EBaiEBQcAAIRAMDgtBASEBCyAAIAE6ACwgAEEANgIAIBdBAWohAQtBKCEQDAsLIAEhAQtBOCEQDAkLAkAgASIPIAJGDQADQAJAIA8tAABBgL6AgABqLQAAIgFBAUYNACABQQJHDQMgD0EBaiEBDAQLIA9BAWoiDyACRw0AC0E+IRAMIgtBPiEQDCELIABBADoALCAPIQEMAQtBCyEQDAYLQTohEAwFCyABQQFqIQFBLSEQDAQLIAAgAToALCAAQQA2AgAgFkEBaiEBQQwhEAwDCyAAQQA2AgAgF0EBaiEBQQohEAwCCyAAQQA2AgALIABBADoALCANIQFBCSEQDAALC0EAIRAgAEEANgIcIAAgCzYCFCAAQc2QgIAANgIQIABBCTYCDAwXC0EAIRAgAEEANgIcIAAgCjYCFCAAQemKgIAANgIQIABBCTYCDAwWC0EAIRAgAEEANgIcIAAgCTYCFCAAQbeQgIAANgIQIABBCTYCDAwVC0EAIRAgAEEANgIcIAAgCDYCFCAAQZyRgIAANgIQIABBCTYCDAwUC0EAIRAgAEEANgIcIAAgATYCFCAAQc2QgIAANgIQIABBCTYCDAwTC0EAIRAgAEEANgIcIAAgATYCFCAAQemKgIAANgIQIABBCTYCDAwSC0EAIRAgAEEANgIcIAAgATYCFCAAQbeQgIAANgIQIABBCTYCDAwRC0EAIRAgAEEANgIcIAAgATYCFCAAQZyRgIAANgIQIABBCTYCDAwQC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwPC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwOC0EAIRAgAEEANgIcIAAgATYCFCAAQcCSgIAANgIQIABBCzYCDAwNC0EAIRAgAEEANgIcIAAgATYCFCAAQZWJgIAANgIQIABBCzYCDAwMC0EAIRAgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDAwLC0EAIRAgAEEANgIcIAAgATYCFCAAQfuPgIAANgIQIABBCjYCDAwKC0EAIRAgAEEANgIcIAAgATYCFCAAQfGZgIAANgIQIABBAjYCDAwJC0EAIRAgAEEANgIcIAAgATYCFCAAQcSUgIAANgIQIABBAjYCDAwIC0EAIRAgAEEANgIcIAAgATYCFCAAQfKVgIAANgIQIABBAjYCDAwHCyAAQQI2AhwgACABNgIUIABBnJqAgAA2AhAgAEEWNgIMQQAhEAwGC0EBIRAMBQtB1AAhECABIgQgAkYNBCADQQhqIAAgBCACQdjCgIAAQQoQxYCAgAAgAygCDCEEIAMoAggOAwEEAgALEMqAgIAAAAsgAEEANgIcIABBtZqAgAA2AhAgAEEXNgIMIAAgBEEBajYCFEEAIRAMAgsgAEEANgIcIAAgBDYCFCAAQcqagIAANgIQIABBCTYCDEEAIRAMAQsCQCABIgQgAkcNAEEiIRAMAQsgAEGJgICAADYCCCAAIAQ2AgRBISEQCyADQRBqJICAgIAAIBALrwEBAn8gASgCACEGAkACQCACIANGDQAgBCAGaiEEIAYgA2ogAmshByACIAZBf3MgBWoiBmohBQNAAkAgAi0AACAELQAARg0AQQIhBAwDCwJAIAYNAEEAIQQgBSECDAMLIAZBf2ohBiAEQQFqIQQgAkEBaiICIANHDQALIAchBiADIQILIABBATYCACABIAY2AgAgACACNgIEDwsgAUEANgIAIAAgBDYCACAAIAI2AgQLCgAgABDHgICAAAvyNgELfyOAgICAAEEQayIBJICAgIAAAkBBACgCoNCAgAANAEEAEMuAgIAAQYDUhIAAayICQdkASQ0AQQAhAwJAQQAoAuDTgIAAIgQNAEEAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEIakFwcUHYqtWqBXMiBDYC4NOAgABBAEEANgL004CAAEEAQQA2AsTTgIAAC0EAIAI2AszTgIAAQQBBgNSEgAA2AsjTgIAAQQBBgNSEgAA2ApjQgIAAQQAgBDYCrNCAgABBAEF/NgKo0ICAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALQYDUhIAAQXhBgNSEgABrQQ9xQQBBgNSEgABBCGpBD3EbIgNqIgRBBGogAkFIaiIFIANrIgNBAXI2AgBBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAQYDUhIAAIAVqQTg2AgQLAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB7AFLDQACQEEAKAKI0ICAACIGQRAgAEETakFwcSAAQQtJGyICQQN2IgR2IgNBA3FFDQACQAJAIANBAXEgBHJBAXMiBUEDdCIEQbDQgIAAaiIDIARBuNCAgABqKAIAIgQoAggiAkcNAEEAIAZBfiAFd3E2AojQgIAADAELIAMgAjYCCCACIAM2AgwLIARBCGohAyAEIAVBA3QiBUEDcjYCBCAEIAVqIgQgBCgCBEEBcjYCBAwMCyACQQAoApDQgIAAIgdNDQECQCADRQ0AAkACQCADIAR0QQIgBHQiA0EAIANrcnEiA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqIgRBA3QiA0Gw0ICAAGoiBSADQbjQgIAAaigCACIDKAIIIgBHDQBBACAGQX4gBHdxIgY2AojQgIAADAELIAUgADYCCCAAIAU2AgwLIAMgAkEDcjYCBCADIARBA3QiBGogBCACayIFNgIAIAMgAmoiACAFQQFyNgIEAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQQCQAJAIAZBASAHQQN2dCIIcQ0AQQAgBiAIcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCAENgIMIAIgBDYCCCAEIAI2AgwgBCAINgIICyADQQhqIQNBACAANgKc0ICAAEEAIAU2ApDQgIAADAwLQQAoAozQgIAAIglFDQEgCUEAIAlrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqQQJ0QbjSgIAAaigCACIAKAIEQXhxIAJrIQQgACEFAkADQAJAIAUoAhAiAw0AIAVBFGooAgAiA0UNAgsgAygCBEF4cSACayIFIAQgBSAESSIFGyEEIAMgACAFGyEAIAMhBQwACwsgACgCGCEKAkAgACgCDCIIIABGDQAgACgCCCIDQQAoApjQgIAASRogCCADNgIIIAMgCDYCDAwLCwJAIABBFGoiBSgCACIDDQAgACgCECIDRQ0DIABBEGohBQsDQCAFIQsgAyIIQRRqIgUoAgAiAw0AIAhBEGohBSAIKAIQIgMNAAsgC0EANgIADAoLQX8hAiAAQb9/Sw0AIABBE2oiA0FwcSECQQAoAozQgIAAIgdFDQBBACELAkAgAkGAAkkNAEEfIQsgAkH///8HSw0AIANBCHYiAyADQYD+P2pBEHZBCHEiA3QiBCAEQYDgH2pBEHZBBHEiBHQiBSAFQYCAD2pBEHZBAnEiBXRBD3YgAyAEciAFcmsiA0EBdCACIANBFWp2QQFxckEcaiELC0EAIAJrIQQCQAJAAkACQCALQQJ0QbjSgIAAaigCACIFDQBBACEDQQAhCAwBC0EAIQMgAkEAQRkgC0EBdmsgC0EfRht0IQBBACEIA0ACQCAFKAIEQXhxIAJrIgYgBE8NACAGIQQgBSEIIAYNAEEAIQQgBSEIIAUhAwwDCyADIAVBFGooAgAiBiAGIAUgAEEddkEEcWpBEGooAgAiBUYbIAMgBhshAyAAQQF0IQAgBQ0ACwsCQCADIAhyDQBBACEIQQIgC3QiA0EAIANrciAHcSIDRQ0DIANBACADa3FBf2oiAyADQQx2QRBxIgN2IgVBBXZBCHEiACADciAFIAB2IgNBAnZBBHEiBXIgAyAFdiIDQQF2QQJxIgVyIAMgBXYiA0EBdkEBcSIFciADIAV2akECdEG40oCAAGooAgAhAwsgA0UNAQsDQCADKAIEQXhxIAJrIgYgBEkhAAJAIAMoAhAiBQ0AIANBFGooAgAhBQsgBiAEIAAbIQQgAyAIIAAbIQggBSEDIAUNAAsLIAhFDQAgBEEAKAKQ0ICAACACa08NACAIKAIYIQsCQCAIKAIMIgAgCEYNACAIKAIIIgNBACgCmNCAgABJGiAAIAM2AgggAyAANgIMDAkLAkAgCEEUaiIFKAIAIgMNACAIKAIQIgNFDQMgCEEQaiEFCwNAIAUhBiADIgBBFGoiBSgCACIDDQAgAEEQaiEFIAAoAhAiAw0ACyAGQQA2AgAMCAsCQEEAKAKQ0ICAACIDIAJJDQBBACgCnNCAgAAhBAJAAkAgAyACayIFQRBJDQAgBCACaiIAIAVBAXI2AgRBACAFNgKQ0ICAAEEAIAA2ApzQgIAAIAQgA2ogBTYCACAEIAJBA3I2AgQMAQsgBCADQQNyNgIEIAQgA2oiAyADKAIEQQFyNgIEQQBBADYCnNCAgABBAEEANgKQ0ICAAAsgBEEIaiEDDAoLAkBBACgClNCAgAAiACACTQ0AQQAoAqDQgIAAIgMgAmoiBCAAIAJrIgVBAXI2AgRBACAFNgKU0ICAAEEAIAQ2AqDQgIAAIAMgAkEDcjYCBCADQQhqIQMMCgsCQAJAQQAoAuDTgIAARQ0AQQAoAujTgIAAIQQMAQtBAEJ/NwLs04CAAEEAQoCAhICAgMAANwLk04CAAEEAIAFBDGpBcHFB2KrVqgVzNgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgABBgIAEIQQLQQAhAwJAIAQgAkHHAGoiB2oiBkEAIARrIgtxIgggAksNAEEAQTA2AvjTgIAADAoLAkBBACgCwNOAgAAiA0UNAAJAQQAoArjTgIAAIgQgCGoiBSAETQ0AIAUgA00NAQtBACEDQQBBMDYC+NOAgAAMCgtBAC0AxNOAgABBBHENBAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQAJAIAMoAgAiBSAESw0AIAUgAygCBGogBEsNAwsgAygCCCIDDQALC0EAEMuAgIAAIgBBf0YNBSAIIQYCQEEAKALk04CAACIDQX9qIgQgAHFFDQAgCCAAayAEIABqQQAgA2txaiEGCyAGIAJNDQUgBkH+////B0sNBQJAQQAoAsDTgIAAIgNFDQBBACgCuNOAgAAiBCAGaiIFIARNDQYgBSADSw0GCyAGEMuAgIAAIgMgAEcNAQwHCyAGIABrIAtxIgZB/v///wdLDQQgBhDLgICAACIAIAMoAgAgAygCBGpGDQMgACEDCwJAIANBf0YNACACQcgAaiAGTQ0AAkAgByAGa0EAKALo04CAACIEakEAIARrcSIEQf7///8HTQ0AIAMhAAwHCwJAIAQQy4CAgABBf0YNACAEIAZqIQYgAyEADAcLQQAgBmsQy4CAgAAaDAQLIAMhACADQX9HDQUMAwtBACEIDAcLQQAhAAwFCyAAQX9HDQILQQBBACgCxNOAgABBBHI2AsTTgIAACyAIQf7///8HSw0BIAgQy4CAgAAhAEEAEMuAgIAAIQMgAEF/Rg0BIANBf0YNASAAIANPDQEgAyAAayIGIAJBOGpNDQELQQBBACgCuNOAgAAgBmoiAzYCuNOAgAACQCADQQAoArzTgIAATQ0AQQAgAzYCvNOAgAALAkACQAJAAkBBACgCoNCAgAAiBEUNAEHI04CAACEDA0AgACADKAIAIgUgAygCBCIIakYNAiADKAIIIgMNAAwDCwsCQAJAQQAoApjQgIAAIgNFDQAgACADTw0BC0EAIAA2ApjQgIAAC0EAIQNBACAGNgLM04CAAEEAIAA2AsjTgIAAQQBBfzYCqNCAgABBAEEAKALg04CAADYCrNCAgABBAEEANgLU04CAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgQgBkFIaiIFIANrIgNBAXI2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAIAAgBWpBODYCBAwCCyADLQAMQQhxDQAgBCAFSQ0AIAQgAE8NACAEQXggBGtBD3FBACAEQQhqQQ9xGyIFaiIAQQAoApTQgIAAIAZqIgsgBWsiBUEBcjYCBCADIAggBmo2AgRBAEEAKALw04CAADYCpNCAgABBACAFNgKU0ICAAEEAIAA2AqDQgIAAIAQgC2pBODYCBAwBCwJAIABBACgCmNCAgAAiCE8NAEEAIAA2ApjQgIAAIAAhCAsgACAGaiEFQcjTgIAAIQMCQAJAAkACQAJAAkACQANAIAMoAgAgBUYNASADKAIIIgMNAAwCCwsgAy0ADEEIcUUNAQtByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiIFIARLDQMLIAMoAgghAwwACwsgAyAANgIAIAMgAygCBCAGajYCBCAAQXggAGtBD3FBACAAQQhqQQ9xG2oiCyACQQNyNgIEIAVBeCAFa0EPcUEAIAVBCGpBD3EbaiIGIAsgAmoiAmshAwJAIAYgBEcNAEEAIAI2AqDQgIAAQQBBACgClNCAgAAgA2oiAzYClNCAgAAgAiADQQFyNgIEDAMLAkAgBkEAKAKc0ICAAEcNAEEAIAI2ApzQgIAAQQBBACgCkNCAgAAgA2oiAzYCkNCAgAAgAiADQQFyNgIEIAIgA2ogAzYCAAwDCwJAIAYoAgQiBEEDcUEBRw0AIARBeHEhBwJAAkAgBEH/AUsNACAGKAIIIgUgBEEDdiIIQQN0QbDQgIAAaiIARhoCQCAGKAIMIgQgBUcNAEEAQQAoAojQgIAAQX4gCHdxNgKI0ICAAAwCCyAEIABGGiAEIAU2AgggBSAENgIMDAELIAYoAhghCQJAAkAgBigCDCIAIAZGDQAgBigCCCIEIAhJGiAAIAQ2AgggBCAANgIMDAELAkAgBkEUaiIEKAIAIgUNACAGQRBqIgQoAgAiBQ0AQQAhAAwBCwNAIAQhCCAFIgBBFGoiBCgCACIFDQAgAEEQaiEEIAAoAhAiBQ0ACyAIQQA2AgALIAlFDQACQAJAIAYgBigCHCIFQQJ0QbjSgIAAaiIEKAIARw0AIAQgADYCACAADQFBAEEAKAKM0ICAAEF+IAV3cTYCjNCAgAAMAgsgCUEQQRQgCSgCECAGRhtqIAA2AgAgAEUNAQsgACAJNgIYAkAgBigCECIERQ0AIAAgBDYCECAEIAA2AhgLIAYoAhQiBEUNACAAQRRqIAQ2AgAgBCAANgIYCyAHIANqIQMgBiAHaiIGKAIEIQQLIAYgBEF+cTYCBCACIANqIAM2AgAgAiADQQFyNgIEAkAgA0H/AUsNACADQXhxQbDQgIAAaiEEAkACQEEAKAKI0ICAACIFQQEgA0EDdnQiA3ENAEEAIAUgA3I2AojQgIAAIAQhAwwBCyAEKAIIIQMLIAMgAjYCDCAEIAI2AgggAiAENgIMIAIgAzYCCAwDC0EfIQQCQCADQf///wdLDQAgA0EIdiIEIARBgP4/akEQdkEIcSIEdCIFIAVBgOAfakEQdkEEcSIFdCIAIABBgIAPakEQdkECcSIAdEEPdiAEIAVyIAByayIEQQF0IAMgBEEVanZBAXFyQRxqIQQLIAIgBDYCHCACQgA3AhAgBEECdEG40oCAAGohBQJAQQAoAozQgIAAIgBBASAEdCIIcQ0AIAUgAjYCAEEAIAAgCHI2AozQgIAAIAIgBTYCGCACIAI2AgggAiACNgIMDAMLIANBAEEZIARBAXZrIARBH0YbdCEEIAUoAgAhAANAIAAiBSgCBEF4cSADRg0CIARBHXYhACAEQQF0IQQgBSAAQQRxakEQaiIIKAIAIgANAAsgCCACNgIAIAIgBTYCGCACIAI2AgwgAiACNgIIDAILIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgsgBkFIaiIIIANrIgNBAXI2AgQgACAIakE4NgIEIAQgBUE3IAVrQQ9xQQAgBUFJakEPcRtqQUFqIgggCCAEQRBqSRsiCEEjNgIEQQBBACgC8NOAgAA2AqTQgIAAQQAgAzYClNCAgABBACALNgKg0ICAACAIQRBqQQApAtDTgIAANwIAIAhBACkCyNOAgAA3AghBACAIQQhqNgLQ04CAAEEAIAY2AszTgIAAQQAgADYCyNOAgABBAEEANgLU04CAACAIQSRqIQMDQCADQQc2AgAgA0EEaiIDIAVJDQALIAggBEYNAyAIIAgoAgRBfnE2AgQgCCAIIARrIgA2AgAgBCAAQQFyNgIEAkAgAEH/AUsNACAAQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgAEEDdnQiAHENAEEAIAUgAHI2AojQgIAAIAMhBQwBCyADKAIIIQULIAUgBDYCDCADIAQ2AgggBCADNgIMIAQgBTYCCAwEC0EfIQMCQCAAQf///wdLDQAgAEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCIIIAhBgIAPakEQdkECcSIIdEEPdiADIAVyIAhyayIDQQF0IAAgA0EVanZBAXFyQRxqIQMLIAQgAzYCHCAEQgA3AhAgA0ECdEG40oCAAGohBQJAQQAoAozQgIAAIghBASADdCIGcQ0AIAUgBDYCAEEAIAggBnI2AozQgIAAIAQgBTYCGCAEIAQ2AgggBCAENgIMDAQLIABBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhCANAIAgiBSgCBEF4cSAARg0DIANBHXYhCCADQQF0IQMgBSAIQQRxakEQaiIGKAIAIggNAAsgBiAENgIAIAQgBTYCGCAEIAQ2AgwgBCAENgIIDAMLIAUoAggiAyACNgIMIAUgAjYCCCACQQA2AhggAiAFNgIMIAIgAzYCCAsgC0EIaiEDDAULIAUoAggiAyAENgIMIAUgBDYCCCAEQQA2AhggBCAFNgIMIAQgAzYCCAtBACgClNCAgAAiAyACTQ0AQQAoAqDQgIAAIgQgAmoiBSADIAJrIgNBAXI2AgRBACADNgKU0ICAAEEAIAU2AqDQgIAAIAQgAkEDcjYCBCAEQQhqIQMMAwtBACEDQQBBMDYC+NOAgAAMAgsCQCALRQ0AAkACQCAIIAgoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAA2AgAgAA0BQQAgB0F+IAV3cSIHNgKM0ICAAAwCCyALQRBBFCALKAIQIAhGG2ogADYCACAARQ0BCyAAIAs2AhgCQCAIKAIQIgNFDQAgACADNgIQIAMgADYCGAsgCEEUaigCACIDRQ0AIABBFGogAzYCACADIAA2AhgLAkACQCAEQQ9LDQAgCCAEIAJqIgNBA3I2AgQgCCADaiIDIAMoAgRBAXI2AgQMAQsgCCACaiIAIARBAXI2AgQgCCACQQNyNgIEIAAgBGogBDYCAAJAIARB/wFLDQAgBEF4cUGw0ICAAGohAwJAAkBBACgCiNCAgAAiBUEBIARBA3Z0IgRxDQBBACAFIARyNgKI0ICAACADIQQMAQsgAygCCCEECyAEIAA2AgwgAyAANgIIIAAgAzYCDCAAIAQ2AggMAQtBHyEDAkAgBEH///8HSw0AIARBCHYiAyADQYD+P2pBEHZBCHEiA3QiBSAFQYDgH2pBEHZBBHEiBXQiAiACQYCAD2pBEHZBAnEiAnRBD3YgAyAFciACcmsiA0EBdCAEIANBFWp2QQFxckEcaiEDCyAAIAM2AhwgAEIANwIQIANBAnRBuNKAgABqIQUCQCAHQQEgA3QiAnENACAFIAA2AgBBACAHIAJyNgKM0ICAACAAIAU2AhggACAANgIIIAAgADYCDAwBCyAEQQBBGSADQQF2ayADQR9GG3QhAyAFKAIAIQICQANAIAIiBSgCBEF4cSAERg0BIANBHXYhAiADQQF0IQMgBSACQQRxakEQaiIGKAIAIgINAAsgBiAANgIAIAAgBTYCGCAAIAA2AgwgACAANgIIDAELIAUoAggiAyAANgIMIAUgADYCCCAAQQA2AhggACAFNgIMIAAgAzYCCAsgCEEIaiEDDAELAkAgCkUNAAJAAkAgACAAKAIcIgVBAnRBuNKAgABqIgMoAgBHDQAgAyAINgIAIAgNAUEAIAlBfiAFd3E2AozQgIAADAILIApBEEEUIAooAhAgAEYbaiAINgIAIAhFDQELIAggCjYCGAJAIAAoAhAiA0UNACAIIAM2AhAgAyAINgIYCyAAQRRqKAIAIgNFDQAgCEEUaiADNgIAIAMgCDYCGAsCQAJAIARBD0sNACAAIAQgAmoiA0EDcjYCBCAAIANqIgMgAygCBEEBcjYCBAwBCyAAIAJqIgUgBEEBcjYCBCAAIAJBA3I2AgQgBSAEaiAENgIAAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQMCQAJAQQEgB0EDdnQiCCAGcQ0AQQAgCCAGcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCADNgIMIAIgAzYCCCADIAI2AgwgAyAINgIIC0EAIAU2ApzQgIAAQQAgBDYCkNCAgAALIABBCGohAwsgAUEQaiSAgICAACADCwoAIAAQyYCAgAAL4g0BB38CQCAARQ0AIABBeGoiASAAQXxqKAIAIgJBeHEiAGohAwJAIAJBAXENACACQQNxRQ0BIAEgASgCACICayIBQQAoApjQgIAAIgRJDQEgAiAAaiEAAkAgAUEAKAKc0ICAAEYNAAJAIAJB/wFLDQAgASgCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgASgCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAwsgAiAGRhogAiAENgIIIAQgAjYCDAwCCyABKAIYIQcCQAJAIAEoAgwiBiABRg0AIAEoAggiAiAESRogBiACNgIIIAIgBjYCDAwBCwJAIAFBFGoiAigCACIEDQAgAUEQaiICKAIAIgQNAEEAIQYMAQsDQCACIQUgBCIGQRRqIgIoAgAiBA0AIAZBEGohAiAGKAIQIgQNAAsgBUEANgIACyAHRQ0BAkACQCABIAEoAhwiBEECdEG40oCAAGoiAigCAEcNACACIAY2AgAgBg0BQQBBACgCjNCAgABBfiAEd3E2AozQgIAADAMLIAdBEEEUIAcoAhAgAUYbaiAGNgIAIAZFDQILIAYgBzYCGAJAIAEoAhAiAkUNACAGIAI2AhAgAiAGNgIYCyABKAIUIgJFDQEgBkEUaiACNgIAIAIgBjYCGAwBCyADKAIEIgJBA3FBA0cNACADIAJBfnE2AgRBACAANgKQ0ICAACABIABqIAA2AgAgASAAQQFyNgIEDwsgASADTw0AIAMoAgQiAkEBcUUNAAJAAkAgAkECcQ0AAkAgA0EAKAKg0ICAAEcNAEEAIAE2AqDQgIAAQQBBACgClNCAgAAgAGoiADYClNCAgAAgASAAQQFyNgIEIAFBACgCnNCAgABHDQNBAEEANgKQ0ICAAEEAQQA2ApzQgIAADwsCQCADQQAoApzQgIAARw0AQQAgATYCnNCAgABBAEEAKAKQ0ICAACAAaiIANgKQ0ICAACABIABBAXI2AgQgASAAaiAANgIADwsgAkF4cSAAaiEAAkACQCACQf8BSw0AIAMoAggiBCACQQN2IgVBA3RBsNCAgABqIgZGGgJAIAMoAgwiAiAERw0AQQBBACgCiNCAgABBfiAFd3E2AojQgIAADAILIAIgBkYaIAIgBDYCCCAEIAI2AgwMAQsgAygCGCEHAkACQCADKAIMIgYgA0YNACADKAIIIgJBACgCmNCAgABJGiAGIAI2AgggAiAGNgIMDAELAkAgA0EUaiICKAIAIgQNACADQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQACQAJAIAMgAygCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAgsgB0EQQRQgBygCECADRhtqIAY2AgAgBkUNAQsgBiAHNgIYAkAgAygCECICRQ0AIAYgAjYCECACIAY2AhgLIAMoAhQiAkUNACAGQRRqIAI2AgAgAiAGNgIYCyABIABqIAA2AgAgASAAQQFyNgIEIAFBACgCnNCAgABHDQFBACAANgKQ0ICAAA8LIAMgAkF+cTYCBCABIABqIAA2AgAgASAAQQFyNgIECwJAIABB/wFLDQAgAEF4cUGw0ICAAGohAgJAAkBBACgCiNCAgAAiBEEBIABBA3Z0IgBxDQBBACAEIAByNgKI0ICAACACIQAMAQsgAigCCCEACyAAIAE2AgwgAiABNgIIIAEgAjYCDCABIAA2AggPC0EfIQICQCAAQf///wdLDQAgAEEIdiICIAJBgP4/akEQdkEIcSICdCIEIARBgOAfakEQdkEEcSIEdCIGIAZBgIAPakEQdkECcSIGdEEPdiACIARyIAZyayICQQF0IAAgAkEVanZBAXFyQRxqIQILIAEgAjYCHCABQgA3AhAgAkECdEG40oCAAGohBAJAAkBBACgCjNCAgAAiBkEBIAJ0IgNxDQAgBCABNgIAQQAgBiADcjYCjNCAgAAgASAENgIYIAEgATYCCCABIAE2AgwMAQsgAEEAQRkgAkEBdmsgAkEfRht0IQIgBCgCACEGAkADQCAGIgQoAgRBeHEgAEYNASACQR12IQYgAkEBdCECIAQgBkEEcWpBEGoiAygCACIGDQALIAMgATYCACABIAQ2AhggASABNgIMIAEgATYCCAwBCyAEKAIIIgAgATYCDCAEIAE2AgggAUEANgIYIAEgBDYCDCABIAA2AggLQQBBACgCqNCAgABBf2oiAUF/IAEbNgKo0ICAAAsLBAAAAAtOAAJAIAANAD8AQRB0DwsCQCAAQf//A3ENACAAQX9MDQACQCAAQRB2QAAiAEF/Rw0AQQBBMDYC+NOAgABBfw8LIABBEHQPCxDKgICAAAAL8gICA38BfgJAIAJFDQAgACABOgAAIAIgAGoiA0F/aiABOgAAIAJBA0kNACAAIAE6AAIgACABOgABIANBfWogAToAACADQX5qIAE6AAAgAkEHSQ0AIAAgAToAAyADQXxqIAE6AAAgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIFayICQSBJDQAgAa1CgYCAgBB+IQYgAyAFaiEBA0AgASAGNwMYIAEgBjcDECABIAY3AwggASAGNwMAIAFBIGohASACQWBqIgJBH0sNAAsLIAALC45IAQBBgAgLhkgBAAAAAgAAAAMAAAAAAAAAAAAAAAQAAAAFAAAAAAAAAAAAAAAGAAAABwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEludmFsaWQgY2hhciBpbiB1cmwgcXVlcnkAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9ib2R5AENvbnRlbnQtTGVuZ3RoIG92ZXJmbG93AENodW5rIHNpemUgb3ZlcmZsb3cAUmVzcG9uc2Ugb3ZlcmZsb3cASW52YWxpZCBtZXRob2QgZm9yIEhUVFAveC54IHJlcXVlc3QASW52YWxpZCBtZXRob2QgZm9yIFJUU1AveC54IHJlcXVlc3QARXhwZWN0ZWQgU09VUkNFIG1ldGhvZCBmb3IgSUNFL3gueCByZXF1ZXN0AEludmFsaWQgY2hhciBpbiB1cmwgZnJhZ21lbnQgc3RhcnQARXhwZWN0ZWQgZG90AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fc3RhdHVzAEludmFsaWQgcmVzcG9uc2Ugc3RhdHVzAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMAVXNlciBjYWxsYmFjayBlcnJvcgBgb25fcmVzZXRgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19oZWFkZXJgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlYCBjYWxsYmFjayBlcnJvcgBgb25fc3RhdHVzX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdmVyc2lvbl9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3VybF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX21ldGhvZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lYCBjYWxsYmFjayBlcnJvcgBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNlcnZlcgBJbnZhbGlkIGhlYWRlciB2YWx1ZSBjaGFyAEludmFsaWQgaGVhZGVyIGZpZWxkIGNoYXIAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl92ZXJzaW9uAEludmFsaWQgbWlub3IgdmVyc2lvbgBJbnZhbGlkIG1ham9yIHZlcnNpb24ARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgdmVyc2lvbgBFeHBlY3RlZCBDUkxGIGFmdGVyIHZlcnNpb24ASW52YWxpZCBIVFRQIHZlcnNpb24ASW52YWxpZCBoZWFkZXIgdG9rZW4AU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl91cmwASW52YWxpZCBjaGFyYWN0ZXJzIGluIHVybABVbmV4cGVjdGVkIHN0YXJ0IGNoYXIgaW4gdXJsAERvdWJsZSBAIGluIHVybABFbXB0eSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXJhY3RlciBpbiBDb250ZW50LUxlbmd0aABEdXBsaWNhdGUgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyIGluIHVybCBwYXRoAENvbnRlbnQtTGVuZ3RoIGNhbid0IGJlIHByZXNlbnQgd2l0aCBUcmFuc2Zlci1FbmNvZGluZwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBzaXplAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX3ZhbHVlAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgdmFsdWUATWlzc2luZyBleHBlY3RlZCBMRiBhZnRlciBoZWFkZXIgdmFsdWUASW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHF1b3RlIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAFBhdXNlZCBieSBvbl9oZWFkZXJzX2NvbXBsZXRlAEludmFsaWQgRU9GIHN0YXRlAG9uX3Jlc2V0IHBhdXNlAG9uX2NodW5rX2hlYWRlciBwYXVzZQBvbl9tZXNzYWdlX2JlZ2luIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZSBwYXVzZQBvbl9zdGF0dXNfY29tcGxldGUgcGF1c2UAb25fdmVyc2lvbl9jb21wbGV0ZSBwYXVzZQBvbl91cmxfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlIHBhdXNlAG9uX21lc3NhZ2VfY29tcGxldGUgcGF1c2UAb25fbWV0aG9kX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fbmFtZSBwYXVzZQBVbmV4cGVjdGVkIHNwYWNlIGFmdGVyIHN0YXJ0IGxpbmUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fbmFtZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIG5hbWUAUGF1c2Ugb24gQ09OTkVDVC9VcGdyYWRlAFBhdXNlIG9uIFBSSS9VcGdyYWRlAEV4cGVjdGVkIEhUVFAvMiBDb25uZWN0aW9uIFByZWZhY2UAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9tZXRob2QARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgbWV0aG9kAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX2ZpZWxkAFBhdXNlZABJbnZhbGlkIHdvcmQgZW5jb3VudGVyZWQASW52YWxpZCBtZXRob2QgZW5jb3VudGVyZWQAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzY2hlbWEAUmVxdWVzdCBoYXMgaW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgAFNXSVRDSF9QUk9YWQBVU0VfUFJPWFkATUtBQ1RJVklUWQBVTlBST0NFU1NBQkxFX0VOVElUWQBDT1BZAE1PVkVEX1BFUk1BTkVOVExZAFRPT19FQVJMWQBOT1RJRlkARkFJTEVEX0RFUEVOREVOQ1kAQkFEX0dBVEVXQVkAUExBWQBQVVQAQ0hFQ0tPVVQAR0FURVdBWV9USU1FT1VUAFJFUVVFU1RfVElNRU9VVABORVRXT1JLX0NPTk5FQ1RfVElNRU9VVABDT05ORUNUSU9OX1RJTUVPVVQATE9HSU5fVElNRU9VVABORVRXT1JLX1JFQURfVElNRU9VVABQT1NUAE1JU0RJUkVDVEVEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfTE9BRF9CQUxBTkNFRF9SRVFVRVNUAEJBRF9SRVFVRVNUAEhUVFBfUkVRVUVTVF9TRU5UX1RPX0hUVFBTX1BPUlQAUkVQT1JUAElNX0FfVEVBUE9UAFJFU0VUX0NPTlRFTlQATk9fQ09OVEVOVABQQVJUSUFMX0NPTlRFTlQASFBFX0lOVkFMSURfQ09OU1RBTlQASFBFX0NCX1JFU0VUAEdFVABIUEVfU1RSSUNUAENPTkZMSUNUAFRFTVBPUkFSWV9SRURJUkVDVABQRVJNQU5FTlRfUkVESVJFQ1QAQ09OTkVDVABNVUxUSV9TVEFUVVMASFBFX0lOVkFMSURfU1RBVFVTAFRPT19NQU5ZX1JFUVVFU1RTAEVBUkxZX0hJTlRTAFVOQVZBSUxBQkxFX0ZPUl9MRUdBTF9SRUFTT05TAE9QVElPTlMAU1dJVENISU5HX1BST1RPQ09MUwBWQVJJQU5UX0FMU09fTkVHT1RJQVRFUwBNVUxUSVBMRV9DSE9JQ0VTAElOVEVSTkFMX1NFUlZFUl9FUlJPUgBXRUJfU0VSVkVSX1VOS05PV05fRVJST1IAUkFJTEdVTl9FUlJPUgBJREVOVElUWV9QUk9WSURFUl9BVVRIRU5USUNBVElPTl9FUlJPUgBTU0xfQ0VSVElGSUNBVEVfRVJST1IASU5WQUxJRF9YX0ZPUldBUkRFRF9GT1IAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAFNFRV9PVEhFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAE1LQ0FMRU5EQVIAU0VUVVAAV0VCX1NFUlZFUl9JU19ET1dOAFRFQVJET1dOAEhQRV9DTE9TRURfQ09OTkVDVElPTgBIRVVSSVNUSUNfRVhQSVJBVElPTgBESVNDT05ORUNURURfT1BFUkFUSU9OAE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4AU0lURV9JU19GUk9aRU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAElOVkFMSURfVE9LRU4ARk9SQklEREVOAEVOSEFOQ0VfWU9VUl9DQUxNAEhQRV9JTlZBTElEX1VSTABCTE9DS0VEX0JZX1BBUkVOVEFMX0NPTlRST0wATUtDT0wAQUNMAEhQRV9JTlRFUk5BTABSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFX1VOT0ZGSUNJQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAFJFVFJZX1dJVEgASFBFX0lOVkFMSURfQ09OVEVOVF9MRU5HVEgASFBFX1VORVhQRUNURURfQ09OVEVOVF9MRU5HVEgARkxVU0gAUFJPUFBBVENIAE0tU0VBUkNIAFVSSV9UT09fTE9ORwBQUk9DRVNTSU5HAE1JU0NFTExBTkVPVVNfUEVSU0lTVEVOVF9XQVJOSU5HAE1JU0NFTExBTkVPVVNfV0FSTklORwBIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBDT05USU5VRQBIUEVfQ0JfU1RBVFVTX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJTX0NPTVBMRVRFAEhQRV9DQl9WRVJTSU9OX0NPTVBMRVRFAEhQRV9DQl9VUkxfQ09NUExFVEUASFBFX0NCX0NIVU5LX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX05BTUVfQ09NUExFVEUASFBFX0NCX01FU1NBR0VfQ09NUExFVEUASFBFX0NCX01FVEhPRF9DT01QTEVURQBIUEVfQ0JfSEVBREVSX0ZJRUxEX0NPTVBMRVRFAERFTEVURQBIUEVfSU5WQUxJRF9FT0ZfU1RBVEUASU5WQUxJRF9TU0xfQ0VSVElGSUNBVEUAUEFVU0UATk9fUkVTUE9OU0UAVU5TVVBQT1JURURfTUVESUFfVFlQRQBHT05FAE5PVF9BQ0NFUFRBQkxFAFNFUlZJQ0VfVU5BVkFJTEFCTEUAUkFOR0VfTk9UX1NBVElTRklBQkxFAE9SSUdJTl9JU19VTlJFQUNIQUJMRQBSRVNQT05TRV9JU19TVEFMRQBQVVJHRQBNRVJHRQBSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFAFJFUVVFU1RfSEVBREVSX1RPT19MQVJHRQBQQVlMT0FEX1RPT19MQVJHRQBJTlNVRkZJQ0lFTlRfU1RPUkFHRQBIUEVfUEFVU0VEX1VQR1JBREUASFBFX1BBVVNFRF9IMl9VUEdSQURFAFNPVVJDRQBBTk5PVU5DRQBUUkFDRQBIUEVfVU5FWFBFQ1RFRF9TUEFDRQBERVNDUklCRQBVTlNVQlNDUklCRQBSRUNPUkQASFBFX0lOVkFMSURfTUVUSE9EAE5PVF9GT1VORABQUk9QRklORABVTkJJTkQAUkVCSU5EAFVOQVVUSE9SSVpFRABNRVRIT0RfTk9UX0FMTE9XRUQASFRUUF9WRVJTSU9OX05PVF9TVVBQT1JURUQAQUxSRUFEWV9SRVBPUlRFRABBQ0NFUFRFRABOT1RfSU1QTEVNRU5URUQATE9PUF9ERVRFQ1RFRABIUEVfQ1JfRVhQRUNURUQASFBFX0xGX0VYUEVDVEVEAENSRUFURUQASU1fVVNFRABIUEVfUEFVU0VEAFRJTUVPVVRfT0NDVVJFRABQQVlNRU5UX1JFUVVJUkVEAFBSRUNPTkRJVElPTl9SRVFVSVJFRABQUk9YWV9BVVRIRU5USUNBVElPTl9SRVFVSVJFRABORVRXT1JLX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAExFTkdUSF9SRVFVSVJFRABTU0xfQ0VSVElGSUNBVEVfUkVRVUlSRUQAVVBHUkFERV9SRVFVSVJFRABQQUdFX0VYUElSRUQAUFJFQ09ORElUSU9OX0ZBSUxFRABFWFBFQ1RBVElPTl9GQUlMRUQAUkVWQUxJREFUSU9OX0ZBSUxFRABTU0xfSEFORFNIQUtFX0ZBSUxFRABMT0NLRUQAVFJBTlNGT1JNQVRJT05fQVBQTElFRABOT1RfTU9ESUZJRUQATk9UX0VYVEVOREVEAEJBTkRXSURUSF9MSU1JVF9FWENFRURFRABTSVRFX0lTX09WRVJMT0FERUQASEVBRABFeHBlY3RlZCBIVFRQLwAAXhMAACYTAAAwEAAA8BcAAJ0TAAAVEgAAORcAAPASAAAKEAAAdRIAAK0SAACCEwAATxQAAH8QAACgFQAAIxQAAIkSAACLFAAATRUAANQRAADPFAAAEBgAAMkWAADcFgAAwREAAOAXAAC7FAAAdBQAAHwVAADlFAAACBcAAB8QAABlFQAAoxQAACgVAAACFQAAmRUAACwQAACLGQAATw8AANQOAABqEAAAzhAAAAIXAACJDgAAbhMAABwTAABmFAAAVhcAAMETAADNEwAAbBMAAGgXAABmFwAAXxcAACITAADODwAAaQ4AANgOAABjFgAAyxMAAKoOAAAoFwAAJhcAAMUTAABdFgAA6BEAAGcTAABlEwAA8hYAAHMTAAAdFwAA+RYAAPMRAADPDgAAzhUAAAwSAACzEQAApREAAGEQAAAyFwAAuxMAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIDAgICAgIAAAICAAICAAICAgICAgICAgIABAAAAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAACAAICAgICAAACAgACAgACAgICAgICAgICAAMABAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbG9zZWVlcC1hbGl2ZQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBY2h1bmtlZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEAAAEBAAEBAAEBAQEBAQEBAQEAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AAAAAAAAAAAAAAAAAAAByYW5zZmVyLWVuY29kaW5ncGdyYWRlDQoNCg0KU00NCg0KVFRQL0NFL1RTUC8AAAAAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQIAAQMAAAAAAAAAAAAAAAAAAAAAAAAEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAQAAAgAAAAAAAAAAAAAAAAAAAAAAAAMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAIAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8="});var jp=Q((Nj,_p)=>{"use strict";_p.exports="AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCrLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC0kBAXsgAEEQav0MAAAAAAAAAAAAAAAAAAAAACIB/QsDACAAIAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC+TzAQMOfwN+BH8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAKAIcIhBBf2oO3QHaAQHZAQIDBAUGBwgJCgsMDQ7YAQ8Q1wEREtYBExQVFhcYGRob4AHfARwdHtUBHyAhIiMkJdQBJicoKSorLNMB0gEtLtEB0AEvMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUbbAUdISUrPAc4BS80BTMwBTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AcsBygG4AckBuQHIAboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBANwBC0EAIRAMxgELQQ4hEAzFAQtBDSEQDMQBC0EPIRAMwwELQRAhEAzCAQtBEyEQDMEBC0EUIRAMwAELQRUhEAy/AQtBFiEQDL4BC0EXIRAMvQELQRghEAy8AQtBGSEQDLsBC0EaIRAMugELQRshEAy5AQtBHCEQDLgBC0EIIRAMtwELQR0hEAy2AQtBICEQDLUBC0EfIRAMtAELQQchEAyzAQtBISEQDLIBC0EiIRAMsQELQR4hEAywAQtBIyEQDK8BC0ESIRAMrgELQREhEAytAQtBJCEQDKwBC0ElIRAMqwELQSYhEAyqAQtBJyEQDKkBC0HDASEQDKgBC0EpIRAMpwELQSshEAymAQtBLCEQDKUBC0EtIRAMpAELQS4hEAyjAQtBLyEQDKIBC0HEASEQDKEBC0EwIRAMoAELQTQhEAyfAQtBDCEQDJ4BC0ExIRAMnQELQTIhEAycAQtBMyEQDJsBC0E5IRAMmgELQTUhEAyZAQtBxQEhEAyYAQtBCyEQDJcBC0E6IRAMlgELQTYhEAyVAQtBCiEQDJQBC0E3IRAMkwELQTghEAySAQtBPCEQDJEBC0E7IRAMkAELQT0hEAyPAQtBCSEQDI4BC0EoIRAMjQELQT4hEAyMAQtBPyEQDIsBC0HAACEQDIoBC0HBACEQDIkBC0HCACEQDIgBC0HDACEQDIcBC0HEACEQDIYBC0HFACEQDIUBC0HGACEQDIQBC0EqIRAMgwELQccAIRAMggELQcgAIRAMgQELQckAIRAMgAELQcoAIRAMfwtBywAhEAx+C0HNACEQDH0LQcwAIRAMfAtBzgAhEAx7C0HPACEQDHoLQdAAIRAMeQtB0QAhEAx4C0HSACEQDHcLQdMAIRAMdgtB1AAhEAx1C0HWACEQDHQLQdUAIRAMcwtBBiEQDHILQdcAIRAMcQtBBSEQDHALQdgAIRAMbwtBBCEQDG4LQdkAIRAMbQtB2gAhEAxsC0HbACEQDGsLQdwAIRAMagtBAyEQDGkLQd0AIRAMaAtB3gAhEAxnC0HfACEQDGYLQeEAIRAMZQtB4AAhEAxkC0HiACEQDGMLQeMAIRAMYgtBAiEQDGELQeQAIRAMYAtB5QAhEAxfC0HmACEQDF4LQecAIRAMXQtB6AAhEAxcC0HpACEQDFsLQeoAIRAMWgtB6wAhEAxZC0HsACEQDFgLQe0AIRAMVwtB7gAhEAxWC0HvACEQDFULQfAAIRAMVAtB8QAhEAxTC0HyACEQDFILQfMAIRAMUQtB9AAhEAxQC0H1ACEQDE8LQfYAIRAMTgtB9wAhEAxNC0H4ACEQDEwLQfkAIRAMSwtB+gAhEAxKC0H7ACEQDEkLQfwAIRAMSAtB/QAhEAxHC0H+ACEQDEYLQf8AIRAMRQtBgAEhEAxEC0GBASEQDEMLQYIBIRAMQgtBgwEhEAxBC0GEASEQDEALQYUBIRAMPwtBhgEhEAw+C0GHASEQDD0LQYgBIRAMPAtBiQEhEAw7C0GKASEQDDoLQYsBIRAMOQtBjAEhEAw4C0GNASEQDDcLQY4BIRAMNgtBjwEhEAw1C0GQASEQDDQLQZEBIRAMMwtBkgEhEAwyC0GTASEQDDELQZQBIRAMMAtBlQEhEAwvC0GWASEQDC4LQZcBIRAMLQtBmAEhEAwsC0GZASEQDCsLQZoBIRAMKgtBmwEhEAwpC0GcASEQDCgLQZ0BIRAMJwtBngEhEAwmC0GfASEQDCULQaABIRAMJAtBoQEhEAwjC0GiASEQDCILQaMBIRAMIQtBpAEhEAwgC0GlASEQDB8LQaYBIRAMHgtBpwEhEAwdC0GoASEQDBwLQakBIRAMGwtBqgEhEAwaC0GrASEQDBkLQawBIRAMGAtBrQEhEAwXC0GuASEQDBYLQQEhEAwVC0GvASEQDBQLQbABIRAMEwtBsQEhEAwSC0GzASEQDBELQbIBIRAMEAtBtAEhEAwPC0G1ASEQDA4LQbYBIRAMDQtBtwEhEAwMC0G4ASEQDAsLQbkBIRAMCgtBugEhEAwJC0G7ASEQDAgLQcYBIRAMBwtBvAEhEAwGC0G9ASEQDAULQb4BIRAMBAtBvwEhEAwDC0HAASEQDAILQcIBIRAMAQtBwQEhEAsDQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAOxwEAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB4fICEjJSg/QEFERUZHSElKS0xNT1BRUlPeA1dZW1xdYGJlZmdoaWprbG1vcHFyc3R1dnd4eXp7fH1+gAGCAYUBhgGHAYkBiwGMAY0BjgGPAZABkQGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwG4AbkBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgHHAcgByQHKAcsBzAHNAc4BzwHQAdEB0gHTAdQB1QHWAdcB2AHZAdoB2wHcAd0B3gHgAeEB4gHjAeQB5QHmAecB6AHpAeoB6wHsAe0B7gHvAfAB8QHyAfMBmQKkArAC/gL+AgsgASIEIAJHDfMBQd0BIRAM/wMLIAEiECACRw3dAUHDASEQDP4DCyABIgEgAkcNkAFB9wAhEAz9AwsgASIBIAJHDYYBQe8AIRAM/AMLIAEiASACRw1/QeoAIRAM+wMLIAEiASACRw17QegAIRAM+gMLIAEiASACRw14QeYAIRAM+QMLIAEiASACRw0aQRghEAz4AwsgASIBIAJHDRRBEiEQDPcDCyABIgEgAkcNWUHFACEQDPYDCyABIgEgAkcNSkE/IRAM9QMLIAEiASACRw1IQTwhEAz0AwsgASIBIAJHDUFBMSEQDPMDCyAALQAuQQFGDesDDIcCCyAAIAEiASACEMCAgIAAQQFHDeYBIABCADcDIAznAQsgACABIgEgAhC0gICAACIQDecBIAEhAQz1AgsCQCABIgEgAkcNAEEGIRAM8AMLIAAgAUEBaiIBIAIQu4CAgAAiEA3oASABIQEMMQsgAEIANwMgQRIhEAzVAwsgASIQIAJHDStBHSEQDO0DCwJAIAEiASACRg0AIAFBAWohAUEQIRAM1AMLQQchEAzsAwsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3lAUEIIRAM6wMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQRQhEAzSAwtBCSEQDOoDCyABIQEgACkDIFAN5AEgASEBDPICCwJAIAEiASACRw0AQQshEAzpAwsgACABQQFqIgEgAhC2gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeYBIAEhAQwNCyAAIAEiASACELqAgIAAIhAN5wEgASEBDPACCwJAIAEiASACRw0AQQ8hEAzlAwsgAS0AACIQQTtGDQggEEENRw3oASABQQFqIQEM7wILIAAgASIBIAIQuoCAgAAiEA3oASABIQEM8gILA0ACQCABLQAAQfC1gIAAai0AACIQQQFGDQAgEEECRw3rASAAKAIEIRAgAEEANgIEIAAgECABQQFqIgEQuYCAgAAiEA3qASABIQEM9AILIAFBAWoiASACRw0AC0ESIRAM4gMLIAAgASIBIAIQuoCAgAAiEA3pASABIQEMCgsgASIBIAJHDQZBGyEQDOADCwJAIAEiASACRw0AQRYhEAzgAwsgAEGKgICAADYCCCAAIAE2AgQgACABIAIQuICAgAAiEA3qASABIQFBICEQDMYDCwJAIAEiASACRg0AA0ACQCABLQAAQfC3gIAAai0AACIQQQJGDQACQCAQQX9qDgTlAewBAOsB7AELIAFBAWohAUEIIRAMyAMLIAFBAWoiASACRw0AC0EVIRAM3wMLQRUhEAzeAwsDQAJAIAEtAABB8LmAgABqLQAAIhBBAkYNACAQQX9qDgTeAewB4AHrAewBCyABQQFqIgEgAkcNAAtBGCEQDN0DCwJAIAEiASACRg0AIABBi4CAgAA2AgggACABNgIEIAEhAUEHIRAMxAMLQRkhEAzcAwsgAUEBaiEBDAILAkAgASIUIAJHDQBBGiEQDNsDCyAUIQECQCAULQAAQXNqDhTdAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAgDuAgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQM2gMLAkAgAS0AACIQQTtGDQAgEEENRw3oASABQQFqIQEM5QILIAFBAWohAQtBIiEQDL8DCwJAIAEiECACRw0AQRwhEAzYAwtCACERIBAhASAQLQAAQVBqDjfnAeYBAQIDBAUGBwgAAAAAAAAACQoLDA0OAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPEBESExQAC0EeIRAMvQMLQgIhEQzlAQtCAyERDOQBC0IEIREM4wELQgUhEQziAQtCBiERDOEBC0IHIREM4AELQgghEQzfAQtCCSERDN4BC0IKIREM3QELQgshEQzcAQtCDCERDNsBC0INIREM2gELQg4hEQzZAQtCDyERDNgBC0IKIREM1wELQgshEQzWAQtCDCERDNUBC0INIREM1AELQg4hEQzTAQtCDyERDNIBC0IAIRECQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAtAABBUGoON+UB5AEAAQIDBAUGB+YB5gHmAeYB5gHmAeYBCAkKCwwN5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAQ4PEBESE+YBC0ICIREM5AELQgMhEQzjAQtCBCERDOIBC0IFIREM4QELQgYhEQzgAQtCByERDN8BC0IIIREM3gELQgkhEQzdAQtCCiERDNwBC0ILIREM2wELQgwhEQzaAQtCDSERDNkBC0IOIREM2AELQg8hEQzXAQtCCiERDNYBC0ILIREM1QELQgwhEQzUAQtCDSERDNMBC0IOIREM0gELQg8hEQzRAQsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3SAUEfIRAMwAMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQSQhEAynAwtBICEQDL8DCyAAIAEiECACEL6AgIAAQX9qDgW2AQDFAgHRAdIBC0ERIRAMpAMLIABBAToALyAQIQEMuwMLIAEiASACRw3SAUEkIRAMuwMLIAEiDSACRw0eQcYAIRAMugMLIAAgASIBIAIQsoCAgAAiEA3UASABIQEMtQELIAEiECACRw0mQdAAIRAMuAMLAkAgASIBIAJHDQBBKCEQDLgDCyAAQQA2AgQgAEGMgICAADYCCCAAIAEgARCxgICAACIQDdMBIAEhAQzYAQsCQCABIhAgAkcNAEEpIRAMtwMLIBAtAAAiAUEgRg0UIAFBCUcN0wEgEEEBaiEBDBULAkAgASIBIAJGDQAgAUEBaiEBDBcLQSohEAy1AwsCQCABIhAgAkcNAEErIRAMtQMLAkAgEC0AACIBQQlGDQAgAUEgRw3VAQsgAC0ALEEIRg3TASAQIQEMkQMLAkAgASIBIAJHDQBBLCEQDLQDCyABLQAAQQpHDdUBIAFBAWohAQzJAgsgASIOIAJHDdUBQS8hEAyyAwsDQAJAIAEtAAAiEEEgRg0AAkAgEEF2ag4EANwB3AEA2gELIAEhAQzgAQsgAUEBaiIBIAJHDQALQTEhEAyxAwtBMiEQIAEiFCACRg2wAyACIBRrIAAoAgAiAWohFSAUIAFrQQNqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB8LuAgABqLQAARw0BAkAgAUEDRw0AQQYhAQyWAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMsQMLIABBADYCACAUIQEM2QELQTMhECABIhQgAkYNrwMgAiAUayAAKAIAIgFqIRUgFCABa0EIaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfS7gIAAai0AAEcNAQJAIAFBCEcNAEEFIQEMlQMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLADCyAAQQA2AgAgFCEBDNgBC0E0IRAgASIUIAJGDa4DIAIgFGsgACgCACIBaiEVIBQgAWtBBWohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUHQwoCAAGotAABHDQECQCABQQVHDQBBByEBDJQDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAyvAwsgAEEANgIAIBQhAQzXAQsCQCABIgEgAkYNAANAAkAgAS0AAEGAvoCAAGotAAAiEEEBRg0AIBBBAkYNCiABIQEM3QELIAFBAWoiASACRw0AC0EwIRAMrgMLQTAhEAytAwsCQCABIgEgAkYNAANAAkAgAS0AACIQQSBGDQAgEEF2ag4E2QHaAdoB2QHaAQsgAUEBaiIBIAJHDQALQTghEAytAwtBOCEQDKwDCwNAAkAgAS0AACIQQSBGDQAgEEEJRw0DCyABQQFqIgEgAkcNAAtBPCEQDKsDCwNAAkAgAS0AACIQQSBGDQACQAJAIBBBdmoOBNoBAQHaAQALIBBBLEYN2wELIAEhAQwECyABQQFqIgEgAkcNAAtBPyEQDKoDCyABIQEM2wELQcAAIRAgASIUIAJGDagDIAIgFGsgACgCACIBaiEWIBQgAWtBBmohFwJAA0AgFC0AAEEgciABQYDAgIAAai0AAEcNASABQQZGDY4DIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADKkDCyAAQQA2AgAgFCEBC0E2IRAMjgMLAkAgASIPIAJHDQBBwQAhEAynAwsgAEGMgICAADYCCCAAIA82AgQgDyEBIAAtACxBf2oOBM0B1QHXAdkBhwMLIAFBAWohAQzMAQsCQCABIgEgAkYNAANAAkAgAS0AACIQQSByIBAgEEG/f2pB/wFxQRpJG0H/AXEiEEEJRg0AIBBBIEYNAAJAAkACQAJAIBBBnX9qDhMAAwMDAwMDAwEDAwMDAwMDAwMCAwsgAUEBaiEBQTEhEAyRAwsgAUEBaiEBQTIhEAyQAwsgAUEBaiEBQTMhEAyPAwsgASEBDNABCyABQQFqIgEgAkcNAAtBNSEQDKUDC0E1IRAMpAMLAkAgASIBIAJGDQADQAJAIAEtAABBgLyAgABqLQAAQQFGDQAgASEBDNMBCyABQQFqIgEgAkcNAAtBPSEQDKQDC0E9IRAMowMLIAAgASIBIAIQsICAgAAiEA3WASABIQEMAQsgEEEBaiEBC0E8IRAMhwMLAkAgASIBIAJHDQBBwgAhEAygAwsCQANAAkAgAS0AAEF3ag4YAAL+Av4ChAP+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gIA/gILIAFBAWoiASACRw0AC0HCACEQDKADCyABQQFqIQEgAC0ALUEBcUUNvQEgASEBC0EsIRAMhQMLIAEiASACRw3TAUHEACEQDJ0DCwNAAkAgAS0AAEGQwICAAGotAABBAUYNACABIQEMtwILIAFBAWoiASACRw0AC0HFACEQDJwDCyANLQAAIhBBIEYNswEgEEE6Rw2BAyAAKAIEIQEgAEEANgIEIAAgASANEK+AgIAAIgEN0AEgDUEBaiEBDLMCC0HHACEQIAEiDSACRg2aAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQZDCgIAAai0AAEcNgAMgAUEFRg30AiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyaAwtByAAhECABIg0gAkYNmQMgAiANayAAKAIAIgFqIRYgDSABa0EJaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGWwoCAAGotAABHDf8CAkAgAUEJRw0AQQIhAQz1AgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmQMLAkAgASINIAJHDQBByQAhEAyZAwsCQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZJ/ag4HAIADgAOAA4ADgAMBgAMLIA1BAWohAUE+IRAMgAMLIA1BAWohAUE/IRAM/wILQcoAIRAgASINIAJGDZcDIAIgDWsgACgCACIBaiEWIA0gAWtBAWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBoMKAgABqLQAARw39AiABQQFGDfACIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJcDC0HLACEQIAEiDSACRg2WAyACIA1rIAAoAgAiAWohFiANIAFrQQ5qIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaLCgIAAai0AAEcN/AIgAUEORg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyWAwtBzAAhECABIg0gAkYNlQMgAiANayAAKAIAIgFqIRYgDSABa0EPaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUHAwoCAAGotAABHDfsCAkAgAUEPRw0AQQMhAQzxAgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlQMLQc0AIRAgASINIAJGDZQDIAIgDWsgACgCACIBaiEWIA0gAWtBBWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw36AgJAIAFBBUcNAEEEIQEM8AILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJQDCwJAIAEiDSACRw0AQc4AIRAMlAMLAkACQAJAAkAgDS0AACIBQSByIAEgAUG/f2pB/wFxQRpJG0H/AXFBnX9qDhMA/QL9Av0C/QL9Av0C/QL9Av0C/QL9Av0CAf0C/QL9AgID/QILIA1BAWohAUHBACEQDP0CCyANQQFqIQFBwgAhEAz8AgsgDUEBaiEBQcMAIRAM+wILIA1BAWohAUHEACEQDPoCCwJAIAEiASACRg0AIABBjYCAgAA2AgggACABNgIEIAEhAUHFACEQDPoCC0HPACEQDJIDCyAQIQECQAJAIBAtAABBdmoOBAGoAqgCAKgCCyAQQQFqIQELQSchEAz4AgsCQCABIgEgAkcNAEHRACEQDJEDCwJAIAEtAABBIEYNACABIQEMjQELIAFBAWohASAALQAtQQFxRQ3HASABIQEMjAELIAEiFyACRw3IAUHSACEQDI8DC0HTACEQIAEiFCACRg2OAyACIBRrIAAoAgAiAWohFiAUIAFrQQFqIRcDQCAULQAAIAFB1sKAgABqLQAARw3MASABQQFGDccBIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADI4DCwJAIAEiASACRw0AQdUAIRAMjgMLIAEtAABBCkcNzAEgAUEBaiEBDMcBCwJAIAEiASACRw0AQdYAIRAMjQMLAkACQCABLQAAQXZqDgQAzQHNAQHNAQsgAUEBaiEBDMcBCyABQQFqIQFBygAhEAzzAgsgACABIgEgAhCugICAACIQDcsBIAEhAUHNACEQDPICCyAALQApQSJGDYUDDKYCCwJAIAEiASACRw0AQdsAIRAMigMLQQAhFEEBIRdBASEWQQAhEAJAAkACQAJAAkACQAJAAkACQCABLQAAQVBqDgrUAdMBAAECAwQFBgjVAQtBAiEQDAYLQQMhEAwFC0EEIRAMBAtBBSEQDAMLQQYhEAwCC0EHIRAMAQtBCCEQC0EAIRdBACEWQQAhFAzMAQtBCSEQQQEhFEEAIRdBACEWDMsBCwJAIAEiASACRw0AQd0AIRAMiQMLIAEtAABBLkcNzAEgAUEBaiEBDKYCCyABIgEgAkcNzAFB3wAhEAyHAwsCQCABIgEgAkYNACAAQY6AgIAANgIIIAAgATYCBCABIQFB0AAhEAzuAgtB4AAhEAyGAwtB4QAhECABIgEgAkYNhQMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQeLCgIAAai0AAEcNzQEgFEEDRg3MASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyFAwtB4gAhECABIgEgAkYNhAMgAiABayAAKAIAIhRqIRYgASAUa0ECaiEXA0AgAS0AACAUQebCgIAAai0AAEcNzAEgFEECRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyEAwtB4wAhECABIgEgAkYNgwMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQenCgIAAai0AAEcNywEgFEEDRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyDAwsCQCABIgEgAkcNAEHlACEQDIMDCyAAIAFBAWoiASACEKiAgIAAIhANzQEgASEBQdYAIRAM6QILAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AAkACQAJAIBBBuH9qDgsAAc8BzwHPAc8BzwHPAc8BzwECzwELIAFBAWohAUHSACEQDO0CCyABQQFqIQFB0wAhEAzsAgsgAUEBaiEBQdQAIRAM6wILIAFBAWoiASACRw0AC0HkACEQDIIDC0HkACEQDIEDCwNAAkAgAS0AAEHwwoCAAGotAAAiEEEBRg0AIBBBfmoOA88B0AHRAdIBCyABQQFqIgEgAkcNAAtB5gAhEAyAAwsCQCABIgEgAkYNACABQQFqIQEMAwtB5wAhEAz/AgsDQAJAIAEtAABB8MSAgABqLQAAIhBBAUYNAAJAIBBBfmoOBNIB0wHUAQDVAQsgASEBQdcAIRAM5wILIAFBAWoiASACRw0AC0HoACEQDP4CCwJAIAEiASACRw0AQekAIRAM/gILAkAgAS0AACIQQXZqDhq6AdUB1QG8AdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAcoB1QHVAQDTAQsgAUEBaiEBC0EGIRAM4wILA0ACQCABLQAAQfDGgIAAai0AAEEBRg0AIAEhAQyeAgsgAUEBaiIBIAJHDQALQeoAIRAM+wILAkAgASIBIAJGDQAgAUEBaiEBDAMLQesAIRAM+gILAkAgASIBIAJHDQBB7AAhEAz6AgsgAUEBaiEBDAELAkAgASIBIAJHDQBB7QAhEAz5AgsgAUEBaiEBC0EEIRAM3gILAkAgASIUIAJHDQBB7gAhEAz3AgsgFCEBAkACQAJAIBQtAABB8MiAgABqLQAAQX9qDgfUAdUB1gEAnAIBAtcBCyAUQQFqIQEMCgsgFEEBaiEBDM0BC0EAIRAgAEEANgIcIABBm5KAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAz2AgsCQANAAkAgAS0AAEHwyICAAGotAAAiEEEERg0AAkACQCAQQX9qDgfSAdMB1AHZAQAEAdkBCyABIQFB2gAhEAzgAgsgAUEBaiEBQdwAIRAM3wILIAFBAWoiASACRw0AC0HvACEQDPYCCyABQQFqIQEMywELAkAgASIUIAJHDQBB8AAhEAz1AgsgFC0AAEEvRw3UASAUQQFqIQEMBgsCQCABIhQgAkcNAEHxACEQDPQCCwJAIBQtAAAiAUEvRw0AIBRBAWohAUHdACEQDNsCCyABQXZqIgRBFksN0wFBASAEdEGJgIACcUUN0wEMygILAkAgASIBIAJGDQAgAUEBaiEBQd4AIRAM2gILQfIAIRAM8gILAkAgASIUIAJHDQBB9AAhEAzyAgsgFCEBAkAgFC0AAEHwzICAAGotAABBf2oOA8kClAIA1AELQeEAIRAM2AILAkAgASIUIAJGDQADQAJAIBQtAABB8MqAgABqLQAAIgFBA0YNAAJAIAFBf2oOAssCANUBCyAUIQFB3wAhEAzaAgsgFEEBaiIUIAJHDQALQfMAIRAM8QILQfMAIRAM8AILAkAgASIBIAJGDQAgAEGPgICAADYCCCAAIAE2AgQgASEBQeAAIRAM1wILQfUAIRAM7wILAkAgASIBIAJHDQBB9gAhEAzvAgsgAEGPgICAADYCCCAAIAE2AgQgASEBC0EDIRAM1AILA0AgAS0AAEEgRw3DAiABQQFqIgEgAkcNAAtB9wAhEAzsAgsCQCABIgEgAkcNAEH4ACEQDOwCCyABLQAAQSBHDc4BIAFBAWohAQzvAQsgACABIgEgAhCsgICAACIQDc4BIAEhAQyOAgsCQCABIgQgAkcNAEH6ACEQDOoCCyAELQAAQcwARw3RASAEQQFqIQFBEyEQDM8BCwJAIAEiBCACRw0AQfsAIRAM6QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEANAIAQtAAAgAUHwzoCAAGotAABHDdABIAFBBUYNzgEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBB+wAhEAzoAgsCQCABIgQgAkcNAEH8ACEQDOgCCwJAAkAgBC0AAEG9f2oODADRAdEB0QHRAdEB0QHRAdEB0QHRAQHRAQsgBEEBaiEBQeYAIRAMzwILIARBAWohAUHnACEQDM4CCwJAIAEiBCACRw0AQf0AIRAM5wILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNzwEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf0AIRAM5wILIABBADYCACAQQQFqIQFBECEQDMwBCwJAIAEiBCACRw0AQf4AIRAM5gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQfbOgIAAai0AAEcNzgEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf4AIRAM5gILIABBADYCACAQQQFqIQFBFiEQDMsBCwJAIAEiBCACRw0AQf8AIRAM5QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQfzOgIAAai0AAEcNzQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf8AIRAM5QILIABBADYCACAQQQFqIQFBBSEQDMoBCwJAIAEiBCACRw0AQYABIRAM5AILIAQtAABB2QBHDcsBIARBAWohAUEIIRAMyQELAkAgASIEIAJHDQBBgQEhEAzjAgsCQAJAIAQtAABBsn9qDgMAzAEBzAELIARBAWohAUHrACEQDMoCCyAEQQFqIQFB7AAhEAzJAgsCQCABIgQgAkcNAEGCASEQDOICCwJAAkAgBC0AAEG4f2oOCADLAcsBywHLAcsBywEBywELIARBAWohAUHqACEQDMkCCyAEQQFqIQFB7QAhEAzIAgsCQCABIgQgAkcNAEGDASEQDOECCyACIARrIAAoAgAiAWohECAEIAFrQQJqIRQCQANAIAQtAAAgAUGAz4CAAGotAABHDckBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgEDYCAEGDASEQDOECC0EAIRAgAEEANgIAIBRBAWohAQzGAQsCQCABIgQgAkcNAEGEASEQDOACCyACIARrIAAoAgAiAWohFCAEIAFrQQRqIRACQANAIAQtAAAgAUGDz4CAAGotAABHDcgBIAFBBEYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGEASEQDOACCyAAQQA2AgAgEEEBaiEBQSMhEAzFAQsCQCABIgQgAkcNAEGFASEQDN8CCwJAAkAgBC0AAEG0f2oOCADIAcgByAHIAcgByAEByAELIARBAWohAUHvACEQDMYCCyAEQQFqIQFB8AAhEAzFAgsCQCABIgQgAkcNAEGGASEQDN4CCyAELQAAQcUARw3FASAEQQFqIQEMgwILAkAgASIEIAJHDQBBhwEhEAzdAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBiM+AgABqLQAARw3FASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhwEhEAzdAgsgAEEANgIAIBBBAWohAUEtIRAMwgELAkAgASIEIAJHDQBBiAEhEAzcAgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw3EASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiAEhEAzcAgsgAEEANgIAIBBBAWohAUEpIRAMwQELAkAgASIBIAJHDQBBiQEhEAzbAgtBASEQIAEtAABB3wBHDcABIAFBAWohAQyBAgsCQCABIgQgAkcNAEGKASEQDNoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRADQCAELQAAIAFBjM+AgABqLQAARw3BASABQQFGDa8CIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYoBIRAM2QILAkAgASIEIAJHDQBBiwEhEAzZAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBjs+AgABqLQAARw3BASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiwEhEAzZAgsgAEEANgIAIBBBAWohAUECIRAMvgELAkAgASIEIAJHDQBBjAEhEAzYAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw3AASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjAEhEAzYAgsgAEEANgIAIBBBAWohAUEfIRAMvQELAkAgASIEIAJHDQBBjQEhEAzXAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8s+AgABqLQAARw2/ASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjQEhEAzXAgsgAEEANgIAIBBBAWohAUEJIRAMvAELAkAgASIEIAJHDQBBjgEhEAzWAgsCQAJAIAQtAABBt39qDgcAvwG/Ab8BvwG/AQG/AQsgBEEBaiEBQfgAIRAMvQILIARBAWohAUH5ACEQDLwCCwJAIAEiBCACRw0AQY8BIRAM1QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQZHPgIAAai0AAEcNvQEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY8BIRAM1QILIABBADYCACAQQQFqIQFBGCEQDLoBCwJAIAEiBCACRw0AQZABIRAM1AILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQZfPgIAAai0AAEcNvAEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZABIRAM1AILIABBADYCACAQQQFqIQFBFyEQDLkBCwJAIAEiBCACRw0AQZEBIRAM0wILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQZrPgIAAai0AAEcNuwEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZEBIRAM0wILIABBADYCACAQQQFqIQFBFSEQDLgBCwJAIAEiBCACRw0AQZIBIRAM0gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQaHPgIAAai0AAEcNugEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZIBIRAM0gILIABBADYCACAQQQFqIQFBHiEQDLcBCwJAIAEiBCACRw0AQZMBIRAM0QILIAQtAABBzABHDbgBIARBAWohAUEKIRAMtgELAkAgBCACRw0AQZQBIRAM0AILAkACQCAELQAAQb9/ag4PALkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AbkBAbkBCyAEQQFqIQFB/gAhEAy3AgsgBEEBaiEBQf8AIRAMtgILAkAgBCACRw0AQZUBIRAMzwILAkACQCAELQAAQb9/ag4DALgBAbgBCyAEQQFqIQFB/QAhEAy2AgsgBEEBaiEEQYABIRAMtQILAkAgBCACRw0AQZYBIRAMzgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQafPgIAAai0AAEcNtgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZYBIRAMzgILIABBADYCACAQQQFqIQFBCyEQDLMBCwJAIAQgAkcNAEGXASEQDM0CCwJAAkACQAJAIAQtAABBU2oOIwC4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBAbgBuAG4AbgBuAECuAG4AbgBA7gBCyAEQQFqIQFB+wAhEAy2AgsgBEEBaiEBQfwAIRAMtQILIARBAWohBEGBASEQDLQCCyAEQQFqIQRBggEhEAyzAgsCQCAEIAJHDQBBmAEhEAzMAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBqc+AgABqLQAARw20ASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmAEhEAzMAgsgAEEANgIAIBBBAWohAUEZIRAMsQELAkAgBCACRw0AQZkBIRAMywILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQa7PgIAAai0AAEcNswEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZkBIRAMywILIABBADYCACAQQQFqIQFBBiEQDLABCwJAIAQgAkcNAEGaASEQDMoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG0z4CAAGotAABHDbIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGaASEQDMoCCyAAQQA2AgAgEEEBaiEBQRwhEAyvAQsCQCAEIAJHDQBBmwEhEAzJAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBts+AgABqLQAARw2xASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmwEhEAzJAgsgAEEANgIAIBBBAWohAUEnIRAMrgELAkAgBCACRw0AQZwBIRAMyAILAkACQCAELQAAQax/ag4CAAGxAQsgBEEBaiEEQYYBIRAMrwILIARBAWohBEGHASEQDK4CCwJAIAQgAkcNAEGdASEQDMcCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG4z4CAAGotAABHDa8BIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGdASEQDMcCCyAAQQA2AgAgEEEBaiEBQSYhEAysAQsCQCAEIAJHDQBBngEhEAzGAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBus+AgABqLQAARw2uASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBngEhEAzGAgsgAEEANgIAIBBBAWohAUEDIRAMqwELAkAgBCACRw0AQZ8BIRAMxQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNrQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ8BIRAMxQILIABBADYCACAQQQFqIQFBDCEQDKoBCwJAIAQgAkcNAEGgASEQDMQCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUG8z4CAAGotAABHDawBIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGgASEQDMQCCyAAQQA2AgAgEEEBaiEBQQ0hEAypAQsCQCAEIAJHDQBBoQEhEAzDAgsCQAJAIAQtAABBun9qDgsArAGsAawBrAGsAawBrAGsAawBAawBCyAEQQFqIQRBiwEhEAyqAgsgBEEBaiEEQYwBIRAMqQILAkAgBCACRw0AQaIBIRAMwgILIAQtAABB0ABHDakBIARBAWohBAzpAQsCQCAEIAJHDQBBowEhEAzBAgsCQAJAIAQtAABBt39qDgcBqgGqAaoBqgGqAQCqAQsgBEEBaiEEQY4BIRAMqAILIARBAWohAUEiIRAMpgELAkAgBCACRw0AQaQBIRAMwAILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQcDPgIAAai0AAEcNqAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaQBIRAMwAILIABBADYCACAQQQFqIQFBHSEQDKUBCwJAIAQgAkcNAEGlASEQDL8CCwJAAkAgBC0AAEGuf2oOAwCoAQGoAQsgBEEBaiEEQZABIRAMpgILIARBAWohAUEEIRAMpAELAkAgBCACRw0AQaYBIRAMvgILAkACQAJAAkACQCAELQAAQb9/ag4VAKoBqgGqAaoBqgGqAaoBqgGqAaoBAaoBqgECqgGqAQOqAaoBBKoBCyAEQQFqIQRBiAEhEAyoAgsgBEEBaiEEQYkBIRAMpwILIARBAWohBEGKASEQDKYCCyAEQQFqIQRBjwEhEAylAgsgBEEBaiEEQZEBIRAMpAILAkAgBCACRw0AQacBIRAMvQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNpQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQacBIRAMvQILIABBADYCACAQQQFqIQFBESEQDKIBCwJAIAQgAkcNAEGoASEQDLwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHCz4CAAGotAABHDaQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGoASEQDLwCCyAAQQA2AgAgEEEBaiEBQSwhEAyhAQsCQCAEIAJHDQBBqQEhEAy7AgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBxc+AgABqLQAARw2jASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqQEhEAy7AgsgAEEANgIAIBBBAWohAUErIRAMoAELAkAgBCACRw0AQaoBIRAMugILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQcrPgIAAai0AAEcNogEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaoBIRAMugILIABBADYCACAQQQFqIQFBFCEQDJ8BCwJAIAQgAkcNAEGrASEQDLkCCwJAAkACQAJAIAQtAABBvn9qDg8AAQKkAaQBpAGkAaQBpAGkAaQBpAGkAaQBA6QBCyAEQQFqIQRBkwEhEAyiAgsgBEEBaiEEQZQBIRAMoQILIARBAWohBEGVASEQDKACCyAEQQFqIQRBlgEhEAyfAgsCQCAEIAJHDQBBrAEhEAy4AgsgBC0AAEHFAEcNnwEgBEEBaiEEDOABCwJAIAQgAkcNAEGtASEQDLcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHNz4CAAGotAABHDZ8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGtASEQDLcCCyAAQQA2AgAgEEEBaiEBQQ4hEAycAQsCQCAEIAJHDQBBrgEhEAy2AgsgBC0AAEHQAEcNnQEgBEEBaiEBQSUhEAybAQsCQCAEIAJHDQBBrwEhEAy1AgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw2dASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrwEhEAy1AgsgAEEANgIAIBBBAWohAUEqIRAMmgELAkAgBCACRw0AQbABIRAMtAILAkACQCAELQAAQat/ag4LAJ0BnQGdAZ0BnQGdAZ0BnQGdAQGdAQsgBEEBaiEEQZoBIRAMmwILIARBAWohBEGbASEQDJoCCwJAIAQgAkcNAEGxASEQDLMCCwJAAkAgBC0AAEG/f2oOFACcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAEBnAELIARBAWohBEGZASEQDJoCCyAEQQFqIQRBnAEhEAyZAgsCQCAEIAJHDQBBsgEhEAyyAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFB2c+AgABqLQAARw2aASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBsgEhEAyyAgsgAEEANgIAIBBBAWohAUEhIRAMlwELAkAgBCACRw0AQbMBIRAMsQILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQd3PgIAAai0AAEcNmQEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbMBIRAMsQILIABBADYCACAQQQFqIQFBGiEQDJYBCwJAIAQgAkcNAEG0ASEQDLACCwJAAkACQCAELQAAQbt/ag4RAJoBmgGaAZoBmgGaAZoBmgGaAQGaAZoBmgGaAZoBApoBCyAEQQFqIQRBnQEhEAyYAgsgBEEBaiEEQZ4BIRAMlwILIARBAWohBEGfASEQDJYCCwJAIAQgAkcNAEG1ASEQDK8CCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUHkz4CAAGotAABHDZcBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG1ASEQDK8CCyAAQQA2AgAgEEEBaiEBQSghEAyUAQsCQCAEIAJHDQBBtgEhEAyuAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB6s+AgABqLQAARw2WASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtgEhEAyuAgsgAEEANgIAIBBBAWohAUEHIRAMkwELAkAgBCACRw0AQbcBIRAMrQILAkACQCAELQAAQbt/ag4OAJYBlgGWAZYBlgGWAZYBlgGWAZYBlgGWAQGWAQsgBEEBaiEEQaEBIRAMlAILIARBAWohBEGiASEQDJMCCwJAIAQgAkcNAEG4ASEQDKwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDZQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG4ASEQDKwCCyAAQQA2AgAgEEEBaiEBQRIhEAyRAQsCQCAEIAJHDQBBuQEhEAyrAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw2TASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuQEhEAyrAgsgAEEANgIAIBBBAWohAUEgIRAMkAELAkAgBCACRw0AQboBIRAMqgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNkgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQboBIRAMqgILIABBADYCACAQQQFqIQFBDyEQDI8BCwJAIAQgAkcNAEG7ASEQDKkCCwJAAkAgBC0AAEG3f2oOBwCSAZIBkgGSAZIBAZIBCyAEQQFqIQRBpQEhEAyQAgsgBEEBaiEEQaYBIRAMjwILAkAgBCACRw0AQbwBIRAMqAILIAIgBGsgACgCACIBaiEUIAQgAWtBB2ohEAJAA0AgBC0AACABQfTPgIAAai0AAEcNkAEgAUEHRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbwBIRAMqAILIABBADYCACAQQQFqIQFBGyEQDI0BCwJAIAQgAkcNAEG9ASEQDKcCCwJAAkACQCAELQAAQb5/ag4SAJEBkQGRAZEBkQGRAZEBkQGRAQGRAZEBkQGRAZEBkQECkQELIARBAWohBEGkASEQDI8CCyAEQQFqIQRBpwEhEAyOAgsgBEEBaiEEQagBIRAMjQILAkAgBCACRw0AQb4BIRAMpgILIAQtAABBzgBHDY0BIARBAWohBAzPAQsCQCAEIAJHDQBBvwEhEAylAgsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAELQAAQb9/ag4VAAECA5wBBAUGnAGcAZwBBwgJCgucAQwNDg+cAQsgBEEBaiEBQegAIRAMmgILIARBAWohAUHpACEQDJkCCyAEQQFqIQFB7gAhEAyYAgsgBEEBaiEBQfIAIRAMlwILIARBAWohAUHzACEQDJYCCyAEQQFqIQFB9gAhEAyVAgsgBEEBaiEBQfcAIRAMlAILIARBAWohAUH6ACEQDJMCCyAEQQFqIQRBgwEhEAySAgsgBEEBaiEEQYQBIRAMkQILIARBAWohBEGFASEQDJACCyAEQQFqIQRBkgEhEAyPAgsgBEEBaiEEQZgBIRAMjgILIARBAWohBEGgASEQDI0CCyAEQQFqIQRBowEhEAyMAgsgBEEBaiEEQaoBIRAMiwILAkAgBCACRg0AIABBkICAgAA2AgggACAENgIEQasBIRAMiwILQcABIRAMowILIAAgBSACEKqAgIAAIgENiwEgBSEBDFwLAkAgBiACRg0AIAZBAWohBQyNAQtBwgEhEAyhAgsDQAJAIBAtAABBdmoOBIwBAACPAQALIBBBAWoiECACRw0AC0HDASEQDKACCwJAIAcgAkYNACAAQZGAgIAANgIIIAAgBzYCBCAHIQFBASEQDIcCC0HEASEQDJ8CCwJAIAcgAkcNAEHFASEQDJ8CCwJAAkAgBy0AAEF2ag4EAc4BzgEAzgELIAdBAWohBgyNAQsgB0EBaiEFDIkBCwJAIAcgAkcNAEHGASEQDJ4CCwJAAkAgBy0AAEF2ag4XAY8BjwEBjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAI8BCyAHQQFqIQcLQbABIRAMhAILAkAgCCACRw0AQcgBIRAMnQILIAgtAABBIEcNjQEgAEEAOwEyIAhBAWohAUGzASEQDIMCCyABIRcCQANAIBciByACRg0BIActAABBUGpB/wFxIhBBCk8NzAECQCAALwEyIhRBmTNLDQAgACAUQQpsIhQ7ATIgEEH//wNzIBRB/v8DcUkNACAHQQFqIRcgACAUIBBqIhA7ATIgEEH//wNxQegHSQ0BCwtBACEQIABBADYCHCAAQcGJgIAANgIQIABBDTYCDCAAIAdBAWo2AhQMnAILQccBIRAMmwILIAAgCCACEK6AgIAAIhBFDcoBIBBBFUcNjAEgAEHIATYCHCAAIAg2AhQgAEHJl4CAADYCECAAQRU2AgxBACEQDJoCCwJAIAkgAkcNAEHMASEQDJoCC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgCS0AAEFQag4KlgGVAQABAgMEBQYIlwELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMjgELQQkhEEEBIRRBACEXQQAhFgyNAQsCQCAKIAJHDQBBzgEhEAyZAgsgCi0AAEEuRw2OASAKQQFqIQkMygELIAsgAkcNjgFB0AEhEAyXAgsCQCALIAJGDQAgAEGOgICAADYCCCAAIAs2AgRBtwEhEAz+AQtB0QEhEAyWAgsCQCAEIAJHDQBB0gEhEAyWAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EEaiELA0AgBC0AACAQQfzPgIAAai0AAEcNjgEgEEEERg3pASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHSASEQDJUCCyAAIAwgAhCsgICAACIBDY0BIAwhAQy4AQsCQCAEIAJHDQBB1AEhEAyUAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EBaiEMA0AgBC0AACAQQYHQgIAAai0AAEcNjwEgEEEBRg2OASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHUASEQDJMCCwJAIAQgAkcNAEHWASEQDJMCCyACIARrIAAoAgAiEGohFCAEIBBrQQJqIQsDQCAELQAAIBBBg9CAgABqLQAARw2OASAQQQJGDZABIBBBAWohECAEQQFqIgQgAkcNAAsgACAUNgIAQdYBIRAMkgILAkAgBCACRw0AQdcBIRAMkgILAkACQCAELQAAQbt/ag4QAI8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwEBjwELIARBAWohBEG7ASEQDPkBCyAEQQFqIQRBvAEhEAz4AQsCQCAEIAJHDQBB2AEhEAyRAgsgBC0AAEHIAEcNjAEgBEEBaiEEDMQBCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEG+ASEQDPcBC0HZASEQDI8CCwJAIAQgAkcNAEHaASEQDI8CCyAELQAAQcgARg3DASAAQQE6ACgMuQELIABBAjoALyAAIAQgAhCmgICAACIQDY0BQcIBIRAM9AELIAAtAChBf2oOArcBuQG4AQsDQAJAIAQtAABBdmoOBACOAY4BAI4BCyAEQQFqIgQgAkcNAAtB3QEhEAyLAgsgAEEAOgAvIAAtAC1BBHFFDYQCCyAAQQA6AC8gAEEBOgA0IAEhAQyMAQsgEEEVRg3aASAAQQA2AhwgACABNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAyIAgsCQCAAIBAgAhC0gICAACIEDQAgECEBDIECCwJAIARBFUcNACAAQQM2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAyIAgsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMhwILIBBBFUYN1gEgAEEANgIcIAAgATYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMhgILIAAoAgQhFyAAQQA2AgQgECARp2oiFiEBIAAgFyAQIBYgFBsiEBC1gICAACIURQ2NASAAQQc2AhwgACAQNgIUIAAgFDYCDEEAIRAMhQILIAAgAC8BMEGAAXI7ATAgASEBC0EqIRAM6gELIBBBFUYN0QEgAEEANgIcIAAgATYCFCAAQYOMgIAANgIQIABBEzYCDEEAIRAMggILIBBBFUYNzwEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAMgQILIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDI0BCyAAQQw2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMgAILIBBBFUYNzAEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM/wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIwBCyAAQQ02AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/gELIBBBFUYNyQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM/QELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIsBCyAAQQ42AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/AELIABBADYCHCAAIAE2AhQgAEHAlYCAADYCECAAQQI2AgxBACEQDPsBCyAQQRVGDcUBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPoBCyAAQRA2AhwgACABNgIUIAAgEDYCDEEAIRAM+QELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDPEBCyAAQRE2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM+AELIBBBFUYNwQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM9wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIgBCyAAQRM2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM9gELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDO0BCyAAQRQ2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM9QELIBBBFUYNvQEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM9AELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIYBCyAAQRY2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM8wELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC3gICAACIEDQAgAUEBaiEBDOkBCyAAQRc2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM8gELIABBADYCHCAAIAE2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDPEBC0IBIRELIBBBAWohAQJAIAApAyAiEkL//////////w9WDQAgACASQgSGIBGENwMgIAEhAQyEAQsgAEEANgIcIAAgATYCFCAAQa2JgIAANgIQIABBDDYCDEEAIRAM7wELIABBADYCHCAAIBA2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDO4BCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNcyAAQQU2AhwgACAQNgIUIAAgFDYCDEEAIRAM7QELIABBADYCHCAAIBA2AhQgAEGqnICAADYCECAAQQ82AgxBACEQDOwBCyAAIBAgAhC0gICAACIBDQEgECEBC0EOIRAM0QELAkAgAUEVRw0AIABBAjYCHCAAIBA2AhQgAEGwmICAADYCECAAQRU2AgxBACEQDOoBCyAAQQA2AhwgACAQNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAzpAQsgAUEBaiEQAkAgAC8BMCIBQYABcUUNAAJAIAAgECACELuAgIAAIgENACAQIQEMcAsgAUEVRw26ASAAQQU2AhwgACAQNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAzpAQsCQCABQaAEcUGgBEcNACAALQAtQQJxDQAgAEEANgIcIAAgEDYCFCAAQZaTgIAANgIQIABBBDYCDEEAIRAM6QELIAAgECACEL2AgIAAGiAQIQECQAJAAkACQAJAIAAgECACELOAgIAADhYCAQAEBAQEBAQEBAQEBAQEBAQEBAQDBAsgAEEBOgAuCyAAIAAvATBBwAByOwEwIBAhAQtBJiEQDNEBCyAAQSM2AhwgACAQNgIUIABBpZaAgAA2AhAgAEEVNgIMQQAhEAzpAQsgAEEANgIcIAAgEDYCFCAAQdWLgIAANgIQIABBETYCDEEAIRAM6AELIAAtAC1BAXFFDQFBwwEhEAzOAQsCQCANIAJGDQADQAJAIA0tAABBIEYNACANIQEMxAELIA1BAWoiDSACRw0AC0ElIRAM5wELQSUhEAzmAQsgACgCBCEEIABBADYCBCAAIAQgDRCvgICAACIERQ2tASAAQSY2AhwgACAENgIMIAAgDUEBajYCFEEAIRAM5QELIBBBFUYNqwEgAEEANgIcIAAgATYCFCAAQf2NgIAANgIQIABBHTYCDEEAIRAM5AELIABBJzYCHCAAIAE2AhQgACAQNgIMQQAhEAzjAQsgECEBQQEhFAJAAkACQAJAAkACQAJAIAAtACxBfmoOBwYFBQMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0ErIRAMygELIABBADYCHCAAIBA2AhQgAEGrkoCAADYCECAAQQs2AgxBACEQDOIBCyAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMQQAhEAzhAQsgAEEAOgAsIBAhAQy9AQsgECEBQQEhFAJAAkACQAJAAkAgAC0ALEF7ag4EAwECAAULIAAgAC8BMEEIcjsBMAwDC0ECIRQMAQtBBCEUCyAAQQE6ACwgACAALwEwIBRyOwEwCyAQIQELQSkhEAzFAQsgAEEANgIcIAAgATYCFCAAQfCUgIAANgIQIABBAzYCDEEAIRAM3QELAkAgDi0AAEENRw0AIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHULIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzdAQsgAC0ALUEBcUUNAUHEASEQDMMBCwJAIA4gAkcNAEEtIRAM3AELAkACQANAAkAgDi0AAEF2ag4EAgAAAwALIA5BAWoiDiACRw0AC0EtIRAM3QELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDiEBDHQLIABBLDYCHCAAIA42AhQgACABNgIMQQAhEAzcAQsgACgCBCEBIABBADYCBAJAIAAgASAOELGAgIAAIgENACAOQQFqIQEMcwsgAEEsNgIcIAAgATYCDCAAIA5BAWo2AhRBACEQDNsBCyAAKAIEIQQgAEEANgIEIAAgBCAOELGAgIAAIgQNoAEgDiEBDM4BCyAQQSxHDQEgAUEBaiEQQQEhAQJAAkACQAJAAkAgAC0ALEF7ag4EAwECBAALIBAhAQwEC0ECIQEMAQtBBCEBCyAAQQE6ACwgACAALwEwIAFyOwEwIBAhAQwBCyAAIAAvATBBCHI7ATAgECEBC0E5IRAMvwELIABBADoALCABIQELQTQhEAy9AQsgACAALwEwQSByOwEwIAEhAQwCCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBA0AIAEhAQzHAQsgAEE3NgIcIAAgATYCFCAAIAQ2AgxBACEQDNQBCyAAQQg6ACwgASEBC0EwIRAMuQELAkAgAC0AKEEBRg0AIAEhAQwECyAALQAtQQhxRQ2TASABIQEMAwsgAC0AMEEgcQ2UAUHFASEQDLcBCwJAIA8gAkYNAAJAA0ACQCAPLQAAQVBqIgFB/wFxQQpJDQAgDyEBQTUhEAy6AQsgACkDICIRQpmz5syZs+bMGVYNASAAIBFCCn4iETcDICARIAGtQv8BgyISQn+FVg0BIAAgESASfDcDICAPQQFqIg8gAkcNAAtBOSEQDNEBCyAAKAIEIQIgAEEANgIEIAAgAiAPQQFqIgQQsYCAgAAiAg2VASAEIQEMwwELQTkhEAzPAQsCQCAALwEwIgFBCHFFDQAgAC0AKEEBRw0AIAAtAC1BCHFFDZABCyAAIAFB9/sDcUGABHI7ATAgDyEBC0E3IRAMtAELIAAgAC8BMEEQcjsBMAyrAQsgEEEVRg2LASAAQQA2AhwgACABNgIUIABB8I6AgAA2AhAgAEEcNgIMQQAhEAzLAQsgAEHDADYCHCAAIAE2AgwgACANQQFqNgIUQQAhEAzKAQsCQCABLQAAQTpHDQAgACgCBCEQIABBADYCBAJAIAAgECABEK+AgIAAIhANACABQQFqIQEMYwsgAEHDADYCHCAAIBA2AgwgACABQQFqNgIUQQAhEAzKAQsgAEEANgIcIAAgATYCFCAAQbGRgIAANgIQIABBCjYCDEEAIRAMyQELIABBADYCHCAAIAE2AhQgAEGgmYCAADYCECAAQR42AgxBACEQDMgBCyAAQQA2AgALIABBgBI7ASogACAXQQFqIgEgAhCogICAACIQDQEgASEBC0HHACEQDKwBCyAQQRVHDYMBIABB0QA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAzEAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAzDAQsgAEEANgIcIAAgFDYCFCAAQcGogIAANgIQIABBBzYCDCAAQQA2AgBBACEQDMIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxdCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDMEBC0EAIRAgAEEANgIcIAAgATYCFCAAQYCRgIAANgIQIABBCTYCDAzAAQsgEEEVRg19IABBADYCHCAAIAE2AhQgAEGUjYCAADYCECAAQSE2AgxBACEQDL8BC0EBIRZBACEXQQAhFEEBIRALIAAgEDoAKyABQQFqIQECQAJAIAAtAC1BEHENAAJAAkACQCAALQAqDgMBAAIECyAWRQ0DDAILIBQNAQwCCyAXRQ0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQrYCAgAAiEA0AIAEhAQxcCyAAQdgANgIcIAAgATYCFCAAIBA2AgxBACEQDL4BCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQytAQsgAEHZADYCHCAAIAE2AhQgACAENgIMQQAhEAy9AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMqwELIABB2gA2AhwgACABNgIUIAAgBDYCDEEAIRAMvAELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKkBCyAAQdwANgIcIAAgATYCFCAAIAQ2AgxBACEQDLsBCwJAIAEtAABBUGoiEEH/AXFBCk8NACAAIBA6ACogAUEBaiEBQc8AIRAMogELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKcBCyAAQd4ANgIcIAAgATYCFCAAIAQ2AgxBACEQDLoBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKUEjTw0AIAEhAQxZCyAAQQA2AhwgACABNgIUIABB04mAgAA2AhAgAEEINgIMQQAhEAy5AQsgAEEANgIAC0EAIRAgAEEANgIcIAAgATYCFCAAQZCzgIAANgIQIABBCDYCDAy3AQsgAEEANgIAIBdBAWohAQJAIAAtAClBIUcNACABIQEMVgsgAEEANgIcIAAgATYCFCAAQZuKgIAANgIQIABBCDYCDEEAIRAMtgELIABBADYCACAXQQFqIQECQCAALQApIhBBXWpBC08NACABIQEMVQsCQCAQQQZLDQBBASAQdEHKAHFFDQAgASEBDFULQQAhECAAQQA2AhwgACABNgIUIABB94mAgAA2AhAgAEEINgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDK0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDKwBCyAAQQA2AhwgACABNgIUIABB3IiAgAA2AhAgAEEHNgIMQQAhEAyrAQsgEEE/Rw0BIAFBAWohAQtBBSEQDJABC0EAIRAgAEEANgIcIAAgATYCFCAAQf2SgIAANgIQIABBBzYCDAyoAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAynAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAymAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMRgsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAylAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHSADYCHCAAIBQ2AhQgACABNgIMQQAhEAykAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHTADYCHCAAIBQ2AhQgACABNgIMQQAhEAyjAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMQwsgAEHlADYCHCAAIBQ2AhQgACABNgIMQQAhEAyiAQsgAEEANgIcIAAgFDYCFCAAQcOPgIAANgIQIABBBzYCDEEAIRAMoQELIABBADYCHCAAIAE2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKABC0EAIRAgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDAyfAQsgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDEEAIRAMngELIABBADYCHCAAIBQ2AhQgAEH+kYCAADYCECAAQQc2AgxBACEQDJ0BCyAAQQA2AhwgACABNgIUIABBjpuAgAA2AhAgAEEGNgIMQQAhEAycAQsgEEEVRg1XIABBADYCHCAAIAE2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDJsBCyAAQQA2AgAgEEEBaiEBQSQhEAsgACAQOgApIAAoAgQhECAAQQA2AgQgACAQIAEQq4CAgAAiEA1UIAEhAQw+CyAAQQA2AgALQQAhECAAQQA2AhwgACAENgIUIABB8ZuAgAA2AhAgAEEGNgIMDJcBCyABQRVGDVAgAEEANgIcIAAgBTYCFCAAQfCMgIAANgIQIABBGzYCDEEAIRAMlgELIAAoAgQhBSAAQQA2AgQgACAFIBAQqYCAgAAiBQ0BIBBBAWohBQtBrQEhEAx7CyAAQcEBNgIcIAAgBTYCDCAAIBBBAWo2AhRBACEQDJMBCyAAKAIEIQYgAEEANgIEIAAgBiAQEKmAgIAAIgYNASAQQQFqIQYLQa4BIRAMeAsgAEHCATYCHCAAIAY2AgwgACAQQQFqNgIUQQAhEAyQAQsgAEEANgIcIAAgBzYCFCAAQZeLgIAANgIQIABBDTYCDEEAIRAMjwELIABBADYCHCAAIAg2AhQgAEHjkICAADYCECAAQQk2AgxBACEQDI4BCyAAQQA2AhwgACAINgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAyNAQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgCUEBaiEIAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBCAAIBAgCBCtgICAACIQRQ09IABByQE2AhwgACAINgIUIAAgEDYCDEEAIRAMjAELIAAoAgQhBCAAQQA2AgQgACAEIAgQrYCAgAAiBEUNdiAAQcoBNgIcIAAgCDYCFCAAIAQ2AgxBACEQDIsBCyAAKAIEIQQgAEEANgIEIAAgBCAJEK2AgIAAIgRFDXQgAEHLATYCHCAAIAk2AhQgACAENgIMQQAhEAyKAQsgACgCBCEEIABBADYCBCAAIAQgChCtgICAACIERQ1yIABBzQE2AhwgACAKNgIUIAAgBDYCDEEAIRAMiQELAkAgCy0AAEFQaiIQQf8BcUEKTw0AIAAgEDoAKiALQQFqIQpBtgEhEAxwCyAAKAIEIQQgAEEANgIEIAAgBCALEK2AgIAAIgRFDXAgAEHPATYCHCAAIAs2AhQgACAENgIMQQAhEAyIAQsgAEEANgIcIAAgBDYCFCAAQZCzgIAANgIQIABBCDYCDCAAQQA2AgBBACEQDIcBCyABQRVGDT8gAEEANgIcIAAgDDYCFCAAQcyOgIAANgIQIABBIDYCDEEAIRAMhgELIABBgQQ7ASggACgCBCEQIABCADcDACAAIBAgDEEBaiIMEKuAgIAAIhBFDTggAEHTATYCHCAAIAw2AhQgACAQNgIMQQAhEAyFAQsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQdibgIAANgIQIABBCDYCDAyDAQsgACgCBCEQIABCADcDACAAIBAgC0EBaiILEKuAgIAAIhANAUHGASEQDGkLIABBAjoAKAxVCyAAQdUBNgIcIAAgCzYCFCAAIBA2AgxBACEQDIABCyAQQRVGDTcgAEEANgIcIAAgBDYCFCAAQaSMgIAANgIQIABBEDYCDEEAIRAMfwsgAC0ANEEBRw00IAAgBCACELyAgIAAIhBFDTQgEEEVRw01IABB3AE2AhwgACAENgIUIABB1ZaAgAA2AhAgAEEVNgIMQQAhEAx+C0EAIRAgAEEANgIcIABBr4uAgAA2AhAgAEECNgIMIAAgFEEBajYCFAx9C0EAIRAMYwtBAiEQDGILQQ0hEAxhC0EPIRAMYAtBJSEQDF8LQRMhEAxeC0EVIRAMXQtBFiEQDFwLQRchEAxbC0EYIRAMWgtBGSEQDFkLQRohEAxYC0EbIRAMVwtBHCEQDFYLQR0hEAxVC0EfIRAMVAtBISEQDFMLQSMhEAxSC0HGACEQDFELQS4hEAxQC0EvIRAMTwtBOyEQDE4LQT0hEAxNC0HIACEQDEwLQckAIRAMSwtBywAhEAxKC0HMACEQDEkLQc4AIRAMSAtB0QAhEAxHC0HVACEQDEYLQdgAIRAMRQtB2QAhEAxEC0HbACEQDEMLQeQAIRAMQgtB5QAhEAxBC0HxACEQDEALQfQAIRAMPwtBjQEhEAw+C0GXASEQDD0LQakBIRAMPAtBrAEhEAw7C0HAASEQDDoLQbkBIRAMOQtBrwEhEAw4C0GxASEQDDcLQbIBIRAMNgtBtAEhEAw1C0G1ASEQDDQLQboBIRAMMwtBvQEhEAwyC0G/ASEQDDELQcEBIRAMMAsgAEEANgIcIAAgBDYCFCAAQemLgIAANgIQIABBHzYCDEEAIRAMSAsgAEHbATYCHCAAIAQ2AhQgAEH6loCAADYCECAAQRU2AgxBACEQDEcLIABB+AA2AhwgACAMNgIUIABBypiAgAA2AhAgAEEVNgIMQQAhEAxGCyAAQdEANgIcIAAgBTYCFCAAQbCXgIAANgIQIABBFTYCDEEAIRAMRQsgAEH5ADYCHCAAIAE2AhQgACAQNgIMQQAhEAxECyAAQfgANgIcIAAgATYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMQwsgAEHkADYCHCAAIAE2AhQgAEHjl4CAADYCECAAQRU2AgxBACEQDEILIABB1wA2AhwgACABNgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAxBCyAAQQA2AhwgACABNgIUIABBuY2AgAA2AhAgAEEaNgIMQQAhEAxACyAAQcIANgIcIAAgATYCFCAAQeOYgIAANgIQIABBFTYCDEEAIRAMPwsgAEEANgIEIAAgDyAPELGAgIAAIgRFDQEgAEE6NgIcIAAgBDYCDCAAIA9BAWo2AhRBACEQDD4LIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCxgICAACIERQ0AIABBOzYCHCAAIAQ2AgwgACABQQFqNgIUQQAhEAw+CyABQQFqIQEMLQsgD0EBaiEBDC0LIABBADYCHCAAIA82AhQgAEHkkoCAADYCECAAQQQ2AgxBACEQDDsLIABBNjYCHCAAIAQ2AhQgACACNgIMQQAhEAw6CyAAQS42AhwgACAONgIUIAAgBDYCDEEAIRAMOQsgAEHQADYCHCAAIAE2AhQgAEGRmICAADYCECAAQRU2AgxBACEQDDgLIA1BAWohAQwsCyAAQRU2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAw2CyAAQRs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw1CyAAQQ82AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw0CyAAQQs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAwzCyAAQRo2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwyCyAAQQs2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwxCyAAQQo2AhwgACABNgIUIABB5JaAgAA2AhAgAEEVNgIMQQAhEAwwCyAAQR42AhwgACABNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAwvCyAAQQA2AhwgACAQNgIUIABB2o2AgAA2AhAgAEEUNgIMQQAhEAwuCyAAQQQ2AhwgACABNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAwtCyAAQQA2AgAgC0EBaiELC0G4ASEQDBILIABBADYCACAQQQFqIQFB9QAhEAwRCyABIQECQCAALQApQQVHDQBB4wAhEAwRC0HiACEQDBALQQAhECAAQQA2AhwgAEHkkYCAADYCECAAQQc2AgwgACAUQQFqNgIUDCgLIABBADYCACAXQQFqIQFBwAAhEAwOC0EBIQELIAAgAToALCAAQQA2AgAgF0EBaiEBC0EoIRAMCwsgASEBC0E4IRAMCQsCQCABIg8gAkYNAANAAkAgDy0AAEGAvoCAAGotAAAiAUEBRg0AIAFBAkcNAyAPQQFqIQEMBAsgD0EBaiIPIAJHDQALQT4hEAwiC0E+IRAMIQsgAEEAOgAsIA8hAQwBC0ELIRAMBgtBOiEQDAULIAFBAWohAUEtIRAMBAsgACABOgAsIABBADYCACAWQQFqIQFBDCEQDAMLIABBADYCACAXQQFqIQFBCiEQDAILIABBADYCAAsgAEEAOgAsIA0hAUEJIRAMAAsLQQAhECAAQQA2AhwgACALNgIUIABBzZCAgAA2AhAgAEEJNgIMDBcLQQAhECAAQQA2AhwgACAKNgIUIABB6YqAgAA2AhAgAEEJNgIMDBYLQQAhECAAQQA2AhwgACAJNgIUIABBt5CAgAA2AhAgAEEJNgIMDBULQQAhECAAQQA2AhwgACAINgIUIABBnJGAgAA2AhAgAEEJNgIMDBQLQQAhECAAQQA2AhwgACABNgIUIABBzZCAgAA2AhAgAEEJNgIMDBMLQQAhECAAQQA2AhwgACABNgIUIABB6YqAgAA2AhAgAEEJNgIMDBILQQAhECAAQQA2AhwgACABNgIUIABBt5CAgAA2AhAgAEEJNgIMDBELQQAhECAAQQA2AhwgACABNgIUIABBnJGAgAA2AhAgAEEJNgIMDBALQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA8LQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA4LQQAhECAAQQA2AhwgACABNgIUIABBwJKAgAA2AhAgAEELNgIMDA0LQQAhECAAQQA2AhwgACABNgIUIABBlYmAgAA2AhAgAEELNgIMDAwLQQAhECAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMDAsLQQAhECAAQQA2AhwgACABNgIUIABB+4+AgAA2AhAgAEEKNgIMDAoLQQAhECAAQQA2AhwgACABNgIUIABB8ZmAgAA2AhAgAEECNgIMDAkLQQAhECAAQQA2AhwgACABNgIUIABBxJSAgAA2AhAgAEECNgIMDAgLQQAhECAAQQA2AhwgACABNgIUIABB8pWAgAA2AhAgAEECNgIMDAcLIABBAjYCHCAAIAE2AhQgAEGcmoCAADYCECAAQRY2AgxBACEQDAYLQQEhEAwFC0HUACEQIAEiBCACRg0EIANBCGogACAEIAJB2MKAgABBChDFgICAACADKAIMIQQgAygCCA4DAQQCAAsQyoCAgAAACyAAQQA2AhwgAEG1moCAADYCECAAQRc2AgwgACAEQQFqNgIUQQAhEAwCCyAAQQA2AhwgACAENgIUIABBypqAgAA2AhAgAEEJNgIMQQAhEAwBCwJAIAEiBCACRw0AQSIhEAwBCyAAQYmAgIAANgIIIAAgBDYCBEEhIRALIANBEGokgICAgAAgEAuvAQECfyABKAIAIQYCQAJAIAIgA0YNACAEIAZqIQQgBiADaiACayEHIAIgBkF/cyAFaiIGaiEFA0ACQCACLQAAIAQtAABGDQBBAiEEDAMLAkAgBg0AQQAhBCAFIQIMAwsgBkF/aiEGIARBAWohBCACQQFqIgIgA0cNAAsgByEGIAMhAgsgAEEBNgIAIAEgBjYCACAAIAI2AgQPCyABQQA2AgAgACAENgIAIAAgAjYCBAsKACAAEMeAgIAAC/I2AQt/I4CAgIAAQRBrIgEkgICAgAACQEEAKAKg0ICAAA0AQQAQy4CAgABBgNSEgABrIgJB2QBJDQBBACEDAkBBACgC4NOAgAAiBA0AQQBCfzcC7NOAgABBAEKAgISAgIDAADcC5NOAgABBACABQQhqQXBxQdiq1aoFcyIENgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgAALQQAgAjYCzNOAgABBAEGA1ISAADYCyNOAgABBAEGA1ISAADYCmNCAgABBACAENgKs0ICAAEEAQX82AqjQgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAtBgNSEgABBeEGA1ISAAGtBD3FBAEGA1ISAAEEIakEPcRsiA2oiBEEEaiACQUhqIgUgA2siA0EBcjYCAEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgABBgNSEgAAgBWpBODYCBAsCQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEHsAUsNAAJAQQAoAojQgIAAIgZBECAAQRNqQXBxIABBC0kbIgJBA3YiBHYiA0EDcUUNAAJAAkAgA0EBcSAEckEBcyIFQQN0IgRBsNCAgABqIgMgBEG40ICAAGooAgAiBCgCCCICRw0AQQAgBkF+IAV3cTYCiNCAgAAMAQsgAyACNgIIIAIgAzYCDAsgBEEIaiEDIAQgBUEDdCIFQQNyNgIEIAQgBWoiBCAEKAIEQQFyNgIEDAwLIAJBACgCkNCAgAAiB00NAQJAIANFDQACQAJAIAMgBHRBAiAEdCIDQQAgA2tycSIDQQAgA2txQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmoiBEEDdCIDQbDQgIAAaiIFIANBuNCAgABqKAIAIgMoAggiAEcNAEEAIAZBfiAEd3EiBjYCiNCAgAAMAQsgBSAANgIIIAAgBTYCDAsgAyACQQNyNgIEIAMgBEEDdCIEaiAEIAJrIgU2AgAgAyACaiIAIAVBAXI2AgQCQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhBAJAAkAgBkEBIAdBA3Z0IghxDQBBACAGIAhyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAQ2AgwgAiAENgIIIAQgAjYCDCAEIAg2AggLIANBCGohA0EAIAA2ApzQgIAAQQAgBTYCkNCAgAAMDAtBACgCjNCAgAAiCUUNASAJQQAgCWtxQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmpBAnRBuNKAgABqKAIAIgAoAgRBeHEgAmshBCAAIQUCQANAAkAgBSgCECIDDQAgBUEUaigCACIDRQ0CCyADKAIEQXhxIAJrIgUgBCAFIARJIgUbIQQgAyAAIAUbIQAgAyEFDAALCyAAKAIYIQoCQCAAKAIMIgggAEYNACAAKAIIIgNBACgCmNCAgABJGiAIIAM2AgggAyAINgIMDAsLAkAgAEEUaiIFKAIAIgMNACAAKAIQIgNFDQMgAEEQaiEFCwNAIAUhCyADIghBFGoiBSgCACIDDQAgCEEQaiEFIAgoAhAiAw0ACyALQQA2AgAMCgtBfyECIABBv39LDQAgAEETaiIDQXBxIQJBACgCjNCAgAAiB0UNAEEAIQsCQCACQYACSQ0AQR8hCyACQf///wdLDQAgA0EIdiIDIANBgP4/akEQdkEIcSIDdCIEIARBgOAfakEQdkEEcSIEdCIFIAVBgIAPakEQdkECcSIFdEEPdiADIARyIAVyayIDQQF0IAIgA0EVanZBAXFyQRxqIQsLQQAgAmshBAJAAkACQAJAIAtBAnRBuNKAgABqKAIAIgUNAEEAIQNBACEIDAELQQAhAyACQQBBGSALQQF2ayALQR9GG3QhAEEAIQgDQAJAIAUoAgRBeHEgAmsiBiAETw0AIAYhBCAFIQggBg0AQQAhBCAFIQggBSEDDAMLIAMgBUEUaigCACIGIAYgBSAAQR12QQRxakEQaigCACIFRhsgAyAGGyEDIABBAXQhACAFDQALCwJAIAMgCHINAEEAIQhBAiALdCIDQQAgA2tyIAdxIgNFDQMgA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBUEFdkEIcSIAIANyIAUgAHYiA0ECdkEEcSIFciADIAV2IgNBAXZBAnEiBXIgAyAFdiIDQQF2QQFxIgVyIAMgBXZqQQJ0QbjSgIAAaigCACEDCyADRQ0BCwNAIAMoAgRBeHEgAmsiBiAESSEAAkAgAygCECIFDQAgA0EUaigCACEFCyAGIAQgABshBCADIAggABshCCAFIQMgBQ0ACwsgCEUNACAEQQAoApDQgIAAIAJrTw0AIAgoAhghCwJAIAgoAgwiACAIRg0AIAgoAggiA0EAKAKY0ICAAEkaIAAgAzYCCCADIAA2AgwMCQsCQCAIQRRqIgUoAgAiAw0AIAgoAhAiA0UNAyAIQRBqIQULA0AgBSEGIAMiAEEUaiIFKAIAIgMNACAAQRBqIQUgACgCECIDDQALIAZBADYCAAwICwJAQQAoApDQgIAAIgMgAkkNAEEAKAKc0ICAACEEAkACQCADIAJrIgVBEEkNACAEIAJqIgAgBUEBcjYCBEEAIAU2ApDQgIAAQQAgADYCnNCAgAAgBCADaiAFNgIAIAQgAkEDcjYCBAwBCyAEIANBA3I2AgQgBCADaiIDIAMoAgRBAXI2AgRBAEEANgKc0ICAAEEAQQA2ApDQgIAACyAEQQhqIQMMCgsCQEEAKAKU0ICAACIAIAJNDQBBACgCoNCAgAAiAyACaiIEIAAgAmsiBUEBcjYCBEEAIAU2ApTQgIAAQQAgBDYCoNCAgAAgAyACQQNyNgIEIANBCGohAwwKCwJAAkBBACgC4NOAgABFDQBBACgC6NOAgAAhBAwBC0EAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEMakFwcUHYqtWqBXM2AuDTgIAAQQBBADYC9NOAgABBAEEANgLE04CAAEGAgAQhBAtBACEDAkAgBCACQccAaiIHaiIGQQAgBGsiC3EiCCACSw0AQQBBMDYC+NOAgAAMCgsCQEEAKALA04CAACIDRQ0AAkBBACgCuNOAgAAiBCAIaiIFIARNDQAgBSADTQ0BC0EAIQNBAEEwNgL404CAAAwKC0EALQDE04CAAEEEcQ0EAkACQAJAQQAoAqDQgIAAIgRFDQBByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiAESw0DCyADKAIIIgMNAAsLQQAQy4CAgAAiAEF/Rg0FIAghBgJAQQAoAuTTgIAAIgNBf2oiBCAAcUUNACAIIABrIAQgAGpBACADa3FqIQYLIAYgAk0NBSAGQf7///8HSw0FAkBBACgCwNOAgAAiA0UNAEEAKAK404CAACIEIAZqIgUgBE0NBiAFIANLDQYLIAYQy4CAgAAiAyAARw0BDAcLIAYgAGsgC3EiBkH+////B0sNBCAGEMuAgIAAIgAgAygCACADKAIEakYNAyAAIQMLAkAgA0F/Rg0AIAJByABqIAZNDQACQCAHIAZrQQAoAujTgIAAIgRqQQAgBGtxIgRB/v///wdNDQAgAyEADAcLAkAgBBDLgICAAEF/Rg0AIAQgBmohBiADIQAMBwtBACAGaxDLgICAABoMBAsgAyEAIANBf0cNBQwDC0EAIQgMBwtBACEADAULIABBf0cNAgtBAEEAKALE04CAAEEEcjYCxNOAgAALIAhB/v///wdLDQEgCBDLgICAACEAQQAQy4CAgAAhAyAAQX9GDQEgA0F/Rg0BIAAgA08NASADIABrIgYgAkE4ak0NAQtBAEEAKAK404CAACAGaiIDNgK404CAAAJAIANBACgCvNOAgABNDQBBACADNgK804CAAAsCQAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQCAAIAMoAgAiBSADKAIEIghqRg0CIAMoAggiAw0ADAMLCwJAAkBBACgCmNCAgAAiA0UNACAAIANPDQELQQAgADYCmNCAgAALQQAhA0EAIAY2AszTgIAAQQAgADYCyNOAgABBAEF/NgKo0ICAAEEAQQAoAuDTgIAANgKs0ICAAEEAQQA2AtTTgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiBCAGQUhqIgUgA2siA0EBcjYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgAAgACAFakE4NgIEDAILIAMtAAxBCHENACAEIAVJDQAgBCAATw0AIARBeCAEa0EPcUEAIARBCGpBD3EbIgVqIgBBACgClNCAgAAgBmoiCyAFayIFQQFyNgIEIAMgCCAGajYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAU2ApTQgIAAQQAgADYCoNCAgAAgBCALakE4NgIEDAELAkAgAEEAKAKY0ICAACIITw0AQQAgADYCmNCAgAAgACEICyAAIAZqIQVByNOAgAAhAwJAAkACQAJAAkACQAJAA0AgAygCACAFRg0BIAMoAggiAw0ADAILCyADLQAMQQhxRQ0BC0HI04CAACEDA0ACQCADKAIAIgUgBEsNACAFIAMoAgRqIgUgBEsNAwsgAygCCCEDDAALCyADIAA2AgAgAyADKAIEIAZqNgIEIABBeCAAa0EPcUEAIABBCGpBD3EbaiILIAJBA3I2AgQgBUF4IAVrQQ9xQQAgBUEIakEPcRtqIgYgCyACaiICayEDAkAgBiAERw0AQQAgAjYCoNCAgABBAEEAKAKU0ICAACADaiIDNgKU0ICAACACIANBAXI2AgQMAwsCQCAGQQAoApzQgIAARw0AQQAgAjYCnNCAgABBAEEAKAKQ0ICAACADaiIDNgKQ0ICAACACIANBAXI2AgQgAiADaiADNgIADAMLAkAgBigCBCIEQQNxQQFHDQAgBEF4cSEHAkACQCAEQf8BSw0AIAYoAggiBSAEQQN2IghBA3RBsNCAgABqIgBGGgJAIAYoAgwiBCAFRw0AQQBBACgCiNCAgABBfiAId3E2AojQgIAADAILIAQgAEYaIAQgBTYCCCAFIAQ2AgwMAQsgBigCGCEJAkACQCAGKAIMIgAgBkYNACAGKAIIIgQgCEkaIAAgBDYCCCAEIAA2AgwMAQsCQCAGQRRqIgQoAgAiBQ0AIAZBEGoiBCgCACIFDQBBACEADAELA0AgBCEIIAUiAEEUaiIEKAIAIgUNACAAQRBqIQQgACgCECIFDQALIAhBADYCAAsgCUUNAAJAAkAgBiAGKAIcIgVBAnRBuNKAgABqIgQoAgBHDQAgBCAANgIAIAANAUEAQQAoAozQgIAAQX4gBXdxNgKM0ICAAAwCCyAJQRBBFCAJKAIQIAZGG2ogADYCACAARQ0BCyAAIAk2AhgCQCAGKAIQIgRFDQAgACAENgIQIAQgADYCGAsgBigCFCIERQ0AIABBFGogBDYCACAEIAA2AhgLIAcgA2ohAyAGIAdqIgYoAgQhBAsgBiAEQX5xNgIEIAIgA2ogAzYCACACIANBAXI2AgQCQCADQf8BSw0AIANBeHFBsNCAgABqIQQCQAJAQQAoAojQgIAAIgVBASADQQN2dCIDcQ0AQQAgBSADcjYCiNCAgAAgBCEDDAELIAQoAgghAwsgAyACNgIMIAQgAjYCCCACIAQ2AgwgAiADNgIIDAMLQR8hBAJAIANB////B0sNACADQQh2IgQgBEGA/j9qQRB2QQhxIgR0IgUgBUGA4B9qQRB2QQRxIgV0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAQgBXIgAHJrIgRBAXQgAyAEQRVqdkEBcXJBHGohBAsgAiAENgIcIAJCADcCECAEQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiAEEBIAR0IghxDQAgBSACNgIAQQAgACAIcjYCjNCAgAAgAiAFNgIYIAIgAjYCCCACIAI2AgwMAwsgA0EAQRkgBEEBdmsgBEEfRht0IQQgBSgCACEAA0AgACIFKAIEQXhxIANGDQIgBEEddiEAIARBAXQhBCAFIABBBHFqQRBqIggoAgAiAA0ACyAIIAI2AgAgAiAFNgIYIAIgAjYCDCACIAI2AggMAgsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiCyAGQUhqIgggA2siA0EBcjYCBCAAIAhqQTg2AgQgBCAFQTcgBWtBD3FBACAFQUlqQQ9xG2pBQWoiCCAIIARBEGpJGyIIQSM2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAs2AqDQgIAAIAhBEGpBACkC0NOAgAA3AgAgCEEAKQLI04CAADcCCEEAIAhBCGo2AtDTgIAAQQAgBjYCzNOAgABBACAANgLI04CAAEEAQQA2AtTTgIAAIAhBJGohAwNAIANBBzYCACADQQRqIgMgBUkNAAsgCCAERg0DIAggCCgCBEF+cTYCBCAIIAggBGsiADYCACAEIABBAXI2AgQCQCAAQf8BSw0AIABBeHFBsNCAgABqIQMCQAJAQQAoAojQgIAAIgVBASAAQQN2dCIAcQ0AQQAgBSAAcjYCiNCAgAAgAyEFDAELIAMoAgghBQsgBSAENgIMIAMgBDYCCCAEIAM2AgwgBCAFNgIIDAQLQR8hAwJAIABB////B0sNACAAQQh2IgMgA0GA/j9qQRB2QQhxIgN0IgUgBUGA4B9qQRB2QQRxIgV0IgggCEGAgA9qQRB2QQJxIgh0QQ92IAMgBXIgCHJrIgNBAXQgACADQRVqdkEBcXJBHGohAwsgBCADNgIcIARCADcCECADQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiCEEBIAN0IgZxDQAgBSAENgIAQQAgCCAGcjYCjNCAgAAgBCAFNgIYIAQgBDYCCCAEIAQ2AgwMBAsgAEEAQRkgA0EBdmsgA0EfRht0IQMgBSgCACEIA0AgCCIFKAIEQXhxIABGDQMgA0EddiEIIANBAXQhAyAFIAhBBHFqQRBqIgYoAgAiCA0ACyAGIAQ2AgAgBCAFNgIYIAQgBDYCDCAEIAQ2AggMAwsgBSgCCCIDIAI2AgwgBSACNgIIIAJBADYCGCACIAU2AgwgAiADNgIICyALQQhqIQMMBQsgBSgCCCIDIAQ2AgwgBSAENgIIIARBADYCGCAEIAU2AgwgBCADNgIIC0EAKAKU0ICAACIDIAJNDQBBACgCoNCAgAAiBCACaiIFIAMgAmsiA0EBcjYCBEEAIAM2ApTQgIAAQQAgBTYCoNCAgAAgBCACQQNyNgIEIARBCGohAwwDC0EAIQNBAEEwNgL404CAAAwCCwJAIAtFDQACQAJAIAggCCgCHCIFQQJ0QbjSgIAAaiIDKAIARw0AIAMgADYCACAADQFBACAHQX4gBXdxIgc2AozQgIAADAILIAtBEEEUIAsoAhAgCEYbaiAANgIAIABFDQELIAAgCzYCGAJAIAgoAhAiA0UNACAAIAM2AhAgAyAANgIYCyAIQRRqKAIAIgNFDQAgAEEUaiADNgIAIAMgADYCGAsCQAJAIARBD0sNACAIIAQgAmoiA0EDcjYCBCAIIANqIgMgAygCBEEBcjYCBAwBCyAIIAJqIgAgBEEBcjYCBCAIIAJBA3I2AgQgACAEaiAENgIAAkAgBEH/AUsNACAEQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgBEEDdnQiBHENAEEAIAUgBHI2AojQgIAAIAMhBAwBCyADKAIIIQQLIAQgADYCDCADIAA2AgggACADNgIMIAAgBDYCCAwBC0EfIQMCQCAEQf///wdLDQAgBEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCICIAJBgIAPakEQdkECcSICdEEPdiADIAVyIAJyayIDQQF0IAQgA0EVanZBAXFyQRxqIQMLIAAgAzYCHCAAQgA3AhAgA0ECdEG40oCAAGohBQJAIAdBASADdCICcQ0AIAUgADYCAEEAIAcgAnI2AozQgIAAIAAgBTYCGCAAIAA2AgggACAANgIMDAELIARBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhAgJAA0AgAiIFKAIEQXhxIARGDQEgA0EddiECIANBAXQhAyAFIAJBBHFqQRBqIgYoAgAiAg0ACyAGIAA2AgAgACAFNgIYIAAgADYCDCAAIAA2AggMAQsgBSgCCCIDIAA2AgwgBSAANgIIIABBADYCGCAAIAU2AgwgACADNgIICyAIQQhqIQMMAQsCQCAKRQ0AAkACQCAAIAAoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAg2AgAgCA0BQQAgCUF+IAV3cTYCjNCAgAAMAgsgCkEQQRQgCigCECAARhtqIAg2AgAgCEUNAQsgCCAKNgIYAkAgACgCECIDRQ0AIAggAzYCECADIAg2AhgLIABBFGooAgAiA0UNACAIQRRqIAM2AgAgAyAINgIYCwJAAkAgBEEPSw0AIAAgBCACaiIDQQNyNgIEIAAgA2oiAyADKAIEQQFyNgIEDAELIAAgAmoiBSAEQQFyNgIEIAAgAkEDcjYCBCAFIARqIAQ2AgACQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhAwJAAkBBASAHQQN2dCIIIAZxDQBBACAIIAZyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAM2AgwgAiADNgIIIAMgAjYCDCADIAg2AggLQQAgBTYCnNCAgABBACAENgKQ0ICAAAsgAEEIaiEDCyABQRBqJICAgIAAIAMLCgAgABDJgICAAAviDQEHfwJAIABFDQAgAEF4aiIBIABBfGooAgAiAkF4cSIAaiEDAkAgAkEBcQ0AIAJBA3FFDQEgASABKAIAIgJrIgFBACgCmNCAgAAiBEkNASACIABqIQACQCABQQAoApzQgIAARg0AAkAgAkH/AUsNACABKAIIIgQgAkEDdiIFQQN0QbDQgIAAaiIGRhoCQCABKAIMIgIgBEcNAEEAQQAoAojQgIAAQX4gBXdxNgKI0ICAAAwDCyACIAZGGiACIAQ2AgggBCACNgIMDAILIAEoAhghBwJAAkAgASgCDCIGIAFGDQAgASgCCCICIARJGiAGIAI2AgggAiAGNgIMDAELAkAgAUEUaiICKAIAIgQNACABQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQECQAJAIAEgASgCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAwsgB0EQQRQgBygCECABRhtqIAY2AgAgBkUNAgsgBiAHNgIYAkAgASgCECICRQ0AIAYgAjYCECACIAY2AhgLIAEoAhQiAkUNASAGQRRqIAI2AgAgAiAGNgIYDAELIAMoAgQiAkEDcUEDRw0AIAMgAkF+cTYCBEEAIAA2ApDQgIAAIAEgAGogADYCACABIABBAXI2AgQPCyABIANPDQAgAygCBCICQQFxRQ0AAkACQCACQQJxDQACQCADQQAoAqDQgIAARw0AQQAgATYCoNCAgABBAEEAKAKU0ICAACAAaiIANgKU0ICAACABIABBAXI2AgQgAUEAKAKc0ICAAEcNA0EAQQA2ApDQgIAAQQBBADYCnNCAgAAPCwJAIANBACgCnNCAgABHDQBBACABNgKc0ICAAEEAQQAoApDQgIAAIABqIgA2ApDQgIAAIAEgAEEBcjYCBCABIABqIAA2AgAPCyACQXhxIABqIQACQAJAIAJB/wFLDQAgAygCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgAygCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAgsgAiAGRhogAiAENgIIIAQgAjYCDAwBCyADKAIYIQcCQAJAIAMoAgwiBiADRg0AIAMoAggiAkEAKAKY0ICAAEkaIAYgAjYCCCACIAY2AgwMAQsCQCADQRRqIgIoAgAiBA0AIANBEGoiAigCACIEDQBBACEGDAELA0AgAiEFIAQiBkEUaiICKAIAIgQNACAGQRBqIQIgBigCECIEDQALIAVBADYCAAsgB0UNAAJAAkAgAyADKAIcIgRBAnRBuNKAgABqIgIoAgBHDQAgAiAGNgIAIAYNAUEAQQAoAozQgIAAQX4gBHdxNgKM0ICAAAwCCyAHQRBBFCAHKAIQIANGG2ogBjYCACAGRQ0BCyAGIAc2AhgCQCADKAIQIgJFDQAgBiACNgIQIAIgBjYCGAsgAygCFCICRQ0AIAZBFGogAjYCACACIAY2AhgLIAEgAGogADYCACABIABBAXI2AgQgAUEAKAKc0ICAAEcNAUEAIAA2ApDQgIAADwsgAyACQX5xNgIEIAEgAGogADYCACABIABBAXI2AgQLAkAgAEH/AUsNACAAQXhxQbDQgIAAaiECAkACQEEAKAKI0ICAACIEQQEgAEEDdnQiAHENAEEAIAQgAHI2AojQgIAAIAIhAAwBCyACKAIIIQALIAAgATYCDCACIAE2AgggASACNgIMIAEgADYCCA8LQR8hAgJAIABB////B0sNACAAQQh2IgIgAkGA/j9qQRB2QQhxIgJ0IgQgBEGA4B9qQRB2QQRxIgR0IgYgBkGAgA9qQRB2QQJxIgZ0QQ92IAIgBHIgBnJrIgJBAXQgACACQRVqdkEBcXJBHGohAgsgASACNgIcIAFCADcCECACQQJ0QbjSgIAAaiEEAkACQEEAKAKM0ICAACIGQQEgAnQiA3ENACAEIAE2AgBBACAGIANyNgKM0ICAACABIAQ2AhggASABNgIIIAEgATYCDAwBCyAAQQBBGSACQQF2ayACQR9GG3QhAiAEKAIAIQYCQANAIAYiBCgCBEF4cSAARg0BIAJBHXYhBiACQQF0IQIgBCAGQQRxakEQaiIDKAIAIgYNAAsgAyABNgIAIAEgBDYCGCABIAE2AgwgASABNgIIDAELIAQoAggiACABNgIMIAQgATYCCCABQQA2AhggASAENgIMIAEgADYCCAtBAEEAKAKo0ICAAEF/aiIBQX8gARs2AqjQgIAACwsEAAAAC04AAkAgAA0APwBBEHQPCwJAIABB//8DcQ0AIABBf0wNAAJAIABBEHZAACIAQX9HDQBBAEEwNgL404CAAEF/DwsgAEEQdA8LEMqAgIAAAAvyAgIDfwF+AkAgAkUNACAAIAE6AAAgAiAAaiIDQX9qIAE6AAAgAkEDSQ0AIAAgAToAAiAAIAE6AAEgA0F9aiABOgAAIANBfmogAToAACACQQdJDQAgACABOgADIANBfGogAToAACACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiATYCACADIAIgBGtBfHEiBGoiAkF8aiABNgIAIARBCUkNACADIAE2AgggAyABNgIEIAJBeGogATYCACACQXRqIAE2AgAgBEEZSQ0AIAMgATYCGCADIAE2AhQgAyABNgIQIAMgATYCDCACQXBqIAE2AgAgAkFsaiABNgIAIAJBaGogATYCACACQWRqIAE2AgAgBCADQQRxQRhyIgVrIgJBIEkNACABrUKBgICAEH4hBiADIAVqIQEDQCABIAY3AxggASAGNwMQIAEgBjcDCCABIAY3AwAgAUEgaiEBIAJBYGoiAkEfSw0ACwsgAAsLjkgBAEGACAuGSAEAAAACAAAAAwAAAAAAAAAAAAAABAAAAAUAAAAAAAAAAAAAAAYAAAAHAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASW52YWxpZCBjaGFyIGluIHVybCBxdWVyeQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2JvZHkAQ29udGVudC1MZW5ndGggb3ZlcmZsb3cAQ2h1bmsgc2l6ZSBvdmVyZmxvdwBSZXNwb25zZSBvdmVyZmxvdwBJbnZhbGlkIG1ldGhvZCBmb3IgSFRUUC94LnggcmVxdWVzdABJbnZhbGlkIG1ldGhvZCBmb3IgUlRTUC94LnggcmVxdWVzdABFeHBlY3RlZCBTT1VSQ0UgbWV0aG9kIGZvciBJQ0UveC54IHJlcXVlc3QASW52YWxpZCBjaGFyIGluIHVybCBmcmFnbWVudCBzdGFydABFeHBlY3RlZCBkb3QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9zdGF0dXMASW52YWxpZCByZXNwb25zZSBzdGF0dXMASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucwBVc2VyIGNhbGxiYWNrIGVycm9yAGBvbl9yZXNldGAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2hlYWRlcmAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfYmVnaW5gIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fdmFsdWVgIGNhbGxiYWNrIGVycm9yAGBvbl9zdGF0dXNfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl92ZXJzaW9uX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdXJsX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBNaXNzaW5nIGV4cGVjdGVkIExGIGFmdGVyIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AgaGVhZGVyIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGUgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZWQgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fcmVzZXQgcGF1c2UAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlIHBhdXNlAG9uX3N0YXR1c19jb21wbGV0ZSBwYXVzZQBvbl92ZXJzaW9uX2NvbXBsZXRlIHBhdXNlAG9uX3VybF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXRob2RfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lIHBhdXNlAFVuZXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgc3RhcnQgbGluZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgbmFtZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AAU1dJVENIX1BST1hZAFVTRV9QUk9YWQBNS0FDVElWSVRZAFVOUFJPQ0VTU0FCTEVfRU5USVRZAENPUFkATU9WRURfUEVSTUFORU5UTFkAVE9PX0VBUkxZAE5PVElGWQBGQUlMRURfREVQRU5ERU5DWQBCQURfR0FURVdBWQBQTEFZAFBVVABDSEVDS09VVABHQVRFV0FZX1RJTUVPVVQAUkVRVUVTVF9USU1FT1VUAE5FVFdPUktfQ09OTkVDVF9USU1FT1VUAENPTk5FQ1RJT05fVElNRU9VVABMT0dJTl9USU1FT1VUAE5FVFdPUktfUkVBRF9USU1FT1VUAFBPU1QATUlTRElSRUNURURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9MT0FEX0JBTEFOQ0VEX1JFUVVFU1QAQkFEX1JFUVVFU1QASFRUUF9SRVFVRVNUX1NFTlRfVE9fSFRUUFNfUE9SVABSRVBPUlQASU1fQV9URUFQT1QAUkVTRVRfQ09OVEVOVABOT19DT05URU5UAFBBUlRJQUxfQ09OVEVOVABIUEVfSU5WQUxJRF9DT05TVEFOVABIUEVfQ0JfUkVTRVQAR0VUAEhQRV9TVFJJQ1QAQ09ORkxJQ1QAVEVNUE9SQVJZX1JFRElSRUNUAFBFUk1BTkVOVF9SRURJUkVDVABDT05ORUNUAE1VTFRJX1NUQVRVUwBIUEVfSU5WQUxJRF9TVEFUVVMAVE9PX01BTllfUkVRVUVTVFMARUFSTFlfSElOVFMAVU5BVkFJTEFCTEVfRk9SX0xFR0FMX1JFQVNPTlMAT1BUSU9OUwBTV0lUQ0hJTkdfUFJPVE9DT0xTAFZBUklBTlRfQUxTT19ORUdPVElBVEVTAE1VTFRJUExFX0NIT0lDRVMASU5URVJOQUxfU0VSVkVSX0VSUk9SAFdFQl9TRVJWRVJfVU5LTk9XTl9FUlJPUgBSQUlMR1VOX0VSUk9SAElERU5USVRZX1BST1ZJREVSX0FVVEhFTlRJQ0FUSU9OX0VSUk9SAFNTTF9DRVJUSUZJQ0FURV9FUlJPUgBJTlZBTElEX1hfRk9SV0FSREVEX0ZPUgBTRVRfUEFSQU1FVEVSAEdFVF9QQVJBTUVURVIASFBFX1VTRVIAU0VFX09USEVSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABXRUJfU0VSVkVSX0lTX0RPV04AVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhFVVJJU1RJQ19FWFBJUkFUSU9OAERJU0NPTk5FQ1RFRF9PUEVSQVRJT04ATk9OX0FVVEhPUklUQVRJVkVfSU5GT1JNQVRJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBTSVRFX0lTX0ZST1pFTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASU5WQUxJRF9UT0tFTgBGT1JCSURERU4ARU5IQU5DRV9ZT1VSX0NBTE0ASFBFX0lOVkFMSURfVVJMAEJMT0NLRURfQllfUEFSRU5UQUxfQ09OVFJPTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0VfVU5PRkZJQ0lBTABIUEVfT0sAVU5MSU5LAFVOTE9DSwBQUkkAUkVUUllfV0lUSABIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gAVVJJX1RPT19MT05HAFBST0NFU1NJTkcATUlTQ0VMTEFORU9VU19QRVJTSVNURU5UX1dBUk5JTkcATUlTQ0VMTEFORU9VU19XQVJOSU5HAEhQRV9JTlZBTElEX1RSQU5TRkVSX0VOQ09ESU5HAEV4cGVjdGVkIENSTEYASFBFX0lOVkFMSURfQ0hVTktfU0laRQBNT1ZFAENPTlRJTlVFAEhQRV9DQl9TVEFUVVNfQ09NUExFVEUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX1ZFUlNJT05fQ09NUExFVEUASFBFX0NCX1VSTF9DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX0hFQURFUl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fTkFNRV9DT01QTEVURQBIUEVfQ0JfTUVTU0FHRV9DT01QTEVURQBIUEVfQ0JfTUVUSE9EX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfRklFTERfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBJTlZBTElEX1NTTF9DRVJUSUZJQ0FURQBQQVVTRQBOT19SRVNQT05TRQBVTlNVUFBPUlRFRF9NRURJQV9UWVBFAEdPTkUATk9UX0FDQ0VQVEFCTEUAU0VSVklDRV9VTkFWQUlMQUJMRQBSQU5HRV9OT1RfU0FUSVNGSUFCTEUAT1JJR0lOX0lTX1VOUkVBQ0hBQkxFAFJFU1BPTlNFX0lTX1NUQUxFAFBVUkdFAE1FUkdFAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0UAUkVRVUVTVF9IRUFERVJfVE9PX0xBUkdFAFBBWUxPQURfVE9PX0xBUkdFAElOU1VGRklDSUVOVF9TVE9SQUdFAEhQRV9QQVVTRURfVVBHUkFERQBIUEVfUEFVU0VEX0gyX1VQR1JBREUAU09VUkNFAEFOTk9VTkNFAFRSQUNFAEhQRV9VTkVYUEVDVEVEX1NQQUNFAERFU0NSSUJFAFVOU1VCU0NSSUJFAFJFQ09SRABIUEVfSU5WQUxJRF9NRVRIT0QATk9UX0ZPVU5EAFBST1BGSU5EAFVOQklORABSRUJJTkQAVU5BVVRIT1JJWkVEAE1FVEhPRF9OT1RfQUxMT1dFRABIVFRQX1ZFUlNJT05fTk9UX1NVUFBPUlRFRABBTFJFQURZX1JFUE9SVEVEAEFDQ0VQVEVEAE5PVF9JTVBMRU1FTlRFRABMT09QX0RFVEVDVEVEAEhQRV9DUl9FWFBFQ1RFRABIUEVfTEZfRVhQRUNURUQAQ1JFQVRFRABJTV9VU0VEAEhQRV9QQVVTRUQAVElNRU9VVF9PQ0NVUkVEAFBBWU1FTlRfUkVRVUlSRUQAUFJFQ09ORElUSU9OX1JFUVVJUkVEAFBST1hZX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAE5FVFdPUktfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATEVOR1RIX1JFUVVJUkVEAFNTTF9DRVJUSUZJQ0FURV9SRVFVSVJFRABVUEdSQURFX1JFUVVJUkVEAFBBR0VfRVhQSVJFRABQUkVDT05ESVRJT05fRkFJTEVEAEVYUEVDVEFUSU9OX0ZBSUxFRABSRVZBTElEQVRJT05fRkFJTEVEAFNTTF9IQU5EU0hBS0VfRkFJTEVEAExPQ0tFRABUUkFOU0ZPUk1BVElPTl9BUFBMSUVEAE5PVF9NT0RJRklFRABOT1RfRVhURU5ERUQAQkFORFdJRFRIX0xJTUlUX0VYQ0VFREVEAFNJVEVfSVNfT1ZFUkxPQURFRABIRUFEAEV4cGVjdGVkIEhUVFAvAABeEwAAJhMAADAQAADwFwAAnRMAABUSAAA5FwAA8BIAAAoQAAB1EgAArRIAAIITAABPFAAAfxAAAKAVAAAjFAAAiRIAAIsUAABNFQAA1BEAAM8UAAAQGAAAyRYAANwWAADBEQAA4BcAALsUAAB0FAAAfBUAAOUUAAAIFwAAHxAAAGUVAACjFAAAKBUAAAIVAACZFQAALBAAAIsZAABPDwAA1A4AAGoQAADOEAAAAhcAAIkOAABuEwAAHBMAAGYUAABWFwAAwRMAAM0TAABsEwAAaBcAAGYXAABfFwAAIhMAAM4PAABpDgAA2A4AAGMWAADLEwAAqg4AACgXAAAmFwAAxRMAAF0WAADoEQAAZxMAAGUTAADyFgAAcxMAAB0XAAD5FgAA8xEAAM8OAADOFQAADBIAALMRAAClEQAAYRAAADIXAAC7EwAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgMCAgICAgAAAgIAAgIAAgICAgICAgICAgAEAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAAIAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAgICAgIAAAICAAICAAICAgICAgICAgIAAwAEAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsb3NlZWVwLWFsaXZlAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFjaHVua2VkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGVjdGlvbmVudC1sZW5ndGhvbnJveHktY29ubmVjdGlvbgAAAAAAAAAAAAAAAAAAAHJhbnNmZXItZW5jb2RpbmdwZ3JhZGUNCg0KDQpTTQ0KDQpUVFAvQ0UvVFNQLwAAAAAAAAAAAAAAAAECAAEDAAAAAAAAAAAAAAAAAAAAAAAABAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQUBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAABAAACAAAAAAAAAAAAAAAAAAAAAAAAAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAAAAACAAAAAAAAAAAAAAAAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw=="});var Hs=Q((xj,Em)=>{"use strict";var D=require("assert"),Xp=require("net"),BM=require("http"),{pipeline:pM}=require("stream"),k=W(),CE=gB(),IE=Up(),mM=Ms(),{RequestContentLengthMismatchError:Kt,ResponseContentLengthMismatchError:yM,InvalidArgumentError:Ue,RequestAbortedError:bE,HeadersTimeoutError:wM,HeadersOverflowError:RM,SocketError:oi,InformationalError:yt,BodyTimeoutError:DM,HTTPParserError:bM,ResponseExceededMaxSizeError:kM,ClientDestroyedError:SM}=le(),FM=vs(),{kUrl:Ke,kReset:sA,kServerName:yr,kClient:wt,kBusy:BE,kParser:Se,kConnect:NM,kBlocking:ai,kResuming:Wr,kRunning:be,kPending:jr,kSize:_r,kWriting:Zt,kQueue:Ie,kConnected:xM,kConnecting:si,kNeedDrain:Rr,kNoRef:Gs,kKeepAliveDefaultTimeout:pE,kHostHeader:zp,kPendingIdx:bA,kRunningIdx:Be,kError:Ze,kPipelining:Dr,kSocket:Fe,kKeepAliveTimeoutValue:Vs,kMaxHeadersSize:Ic,kKeepAliveMaxTimeout:$p,kKeepAliveTimeoutThreshold:em,kHeadersTimeout:Am,kBodyTimeout:tm,kStrictContentLength:qs,kConnector:Js,kMaxRedirections:LM,kMaxRequests:Os,kCounter:rm,kClose:UM,kDestroy:TM,kDispatch:MM,kInterceptors:vM,kLocalAddress:Ys,kMaxResponseSize:nm,kHTTPConnVersion:Rt,kHost:im,kHTTP2Session:kA,kHTTP2SessionState:pc,kHTTP2BuildRequest:PM,kHTTP2CopyHeaders:GM,kHTTP1BuildRequest:JM}=de(),mc;try{mc=require("http2")}catch{mc={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:YM,HTTP2_HEADER_METHOD:VM,HTTP2_HEADER_PATH:qM,HTTP2_HEADER_SCHEME:OM,HTTP2_HEADER_CONTENT_LENGTH:HM,HTTP2_HEADER_EXPECT:WM,HTTP2_HEADER_STATUS:_M}}=mc,Kp=!1,Cc=Buffer[Symbol.species],wr=Symbol("kClosedResolve"),eA={};try{let e=require("diagnostics_channel");eA.sendHeaders=e.channel("undici:client:sendHeaders"),eA.beforeConnect=e.channel("undici:client:beforeConnect"),eA.connectError=e.channel("undici:client:connectError"),eA.connected=e.channel("undici:client:connected")}catch{eA.sendHeaders={hasSubscribers:!1},eA.beforeConnect={hasSubscribers:!1},eA.connectError={hasSubscribers:!1},eA.connected={hasSubscribers:!1}}var mE=class extends mM{constructor(A,{interceptors:t,maxHeaderSize:r,headersTimeout:n,socketTimeout:i,requestTimeout:s,connectTimeout:o,bodyTimeout:a,idleTimeout:c,keepAlive:g,keepAliveTimeout:l,maxKeepAliveTimeout:u,keepAliveMaxTimeout:E,keepAliveTimeoutThreshold:h,socketPath:d,pipelining:C,tls:I,strictContentLength:p,maxCachedSessions:w,maxRedirections:m,connect:K,maxRequestsPerClient:H,localAddress:ne,maxResponseSize:q,autoSelectFamily:ae,autoSelectFamilyAttemptTimeout:De,allowH2:ee,maxConcurrentStreams:Y}={}){if(super(),g!==void 0)throw new Ue("unsupported keepAlive, use pipelining=0 instead");if(i!==void 0)throw new Ue("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(s!==void 0)throw new Ue("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(c!==void 0)throw new Ue("unsupported idleTimeout, use keepAliveTimeout instead");if(u!==void 0)throw new Ue("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead");if(r!=null&&!Number.isFinite(r))throw new Ue("invalid maxHeaderSize");if(d!=null&&typeof d!="string")throw new Ue("invalid socketPath");if(o!=null&&(!Number.isFinite(o)||o<0))throw new Ue("invalid connectTimeout");if(l!=null&&(!Number.isFinite(l)||l<=0))throw new Ue("invalid keepAliveTimeout");if(E!=null&&(!Number.isFinite(E)||E<=0))throw new Ue("invalid keepAliveMaxTimeout");if(h!=null&&!Number.isFinite(h))throw new Ue("invalid keepAliveTimeoutThreshold");if(n!=null&&(!Number.isInteger(n)||n<0))throw new Ue("headersTimeout must be a positive integer or zero");if(a!=null&&(!Number.isInteger(a)||a<0))throw new Ue("bodyTimeout must be a positive integer or zero");if(K!=null&&typeof K!="function"&&typeof K!="object")throw new Ue("connect must be a function or an object");if(m!=null&&(!Number.isInteger(m)||m<0))throw new Ue("maxRedirections must be a positive number");if(H!=null&&(!Number.isInteger(H)||H<0))throw new Ue("maxRequestsPerClient must be a positive number");if(ne!=null&&(typeof ne!="string"||Xp.isIP(ne)===0))throw new Ue("localAddress must be valid string IP address");if(q!=null&&(!Number.isInteger(q)||q<-1))throw new Ue("maxResponseSize must be a positive number");if(De!=null&&(!Number.isInteger(De)||De<-1))throw new Ue("autoSelectFamilyAttemptTimeout must be a positive number");if(ee!=null&&typeof ee!="boolean")throw new Ue("allowH2 must be a valid boolean value");if(Y!=null&&(typeof Y!="number"||Y<1))throw new Ue("maxConcurrentStreams must be a possitive integer, greater than 0");typeof K!="function"&&(K=FM({...I,maxCachedSessions:w,allowH2:ee,socketPath:d,timeout:o,...k.nodeHasAutoSelectFamily&&ae?{autoSelectFamily:ae,autoSelectFamilyAttemptTimeout:De}:void 0,...K})),this[vM]=t&&t.Client&&Array.isArray(t.Client)?t.Client:[zM({maxRedirections:m})],this[Ke]=k.parseOrigin(A),this[Js]=K,this[Fe]=null,this[Dr]=C??1,this[Ic]=r||BM.maxHeaderSize,this[pE]=l??4e3,this[$p]=E??6e5,this[em]=h??1e3,this[Vs]=this[pE],this[yr]=null,this[Ys]=ne??null,this[Wr]=0,this[Rr]=0,this[zp]=`host: ${this[Ke].hostname}${this[Ke].port?`:${this[Ke].port}`:""}\r +`,this[tm]=a??3e5,this[Am]=n??3e5,this[qs]=p??!0,this[LM]=m,this[Os]=H,this[wr]=null,this[nm]=q>-1?q:-1,this[Rt]="h1",this[kA]=null,this[pc]=ee?{openStreams:0,maxConcurrentStreams:Y??100}:null,this[im]=`${this[Ke].hostname}${this[Ke].port?`:${this[Ke].port}`:""}`,this[Ie]=[],this[Be]=0,this[bA]=0}get pipelining(){return this[Dr]}set pipelining(A){this[Dr]=A,SA(this,!0)}get[jr](){return this[Ie].length-this[bA]}get[be](){return this[bA]-this[Be]}get[_r](){return this[Ie].length-this[Be]}get[xM](){return!!this[Fe]&&!this[si]&&!this[Fe].destroyed}get[BE](){let A=this[Fe];return A&&(A[sA]||A[Zt]||A[ai])||this[_r]>=(this[Dr]||1)||this[jr]>0}[NM](A){cm(this),this.once("connect",A)}[MM](A,t){let r=A.origin||this[Ke].origin,n=this[Rt]==="h2"?IE[PM](r,A,t):IE[JM](r,A,t);return this[Ie].push(n),this[Wr]||(k.bodyLength(n.body)==null&&k.isIterable(n.body)?(this[Wr]=1,process.nextTick(SA,this)):SA(this,!0)),this[Wr]&&this[Rr]!==2&&this[BE]&&(this[Rr]=2),this[Rr]<2}async[UM](){return new Promise(A=>{this[_r]?this[wr]=A:A(null)})}async[TM](A){return new Promise(t=>{let r=this[Ie].splice(this[bA]);for(let i=0;i{this[wr]&&(this[wr](),this[wr]=null),t()};this[kA]!=null&&(k.destroy(this[kA],A),this[kA]=null,this[pc]=null),this[Fe]?k.destroy(this[Fe].on("close",n),A):queueMicrotask(n),SA(this)})}};function jM(e){D(e.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Fe][Ze]=e,Rc(this[wt],e)}function KM(e,A,t){let r=new yt(`HTTP/2: "frameError" received - type ${e}, code ${A}`);t===0&&(this[Fe][Ze]=r,Rc(this[wt],r))}function ZM(){k.destroy(this,new oi("other side closed")),k.destroy(this[Fe],new oi("other side closed"))}function XM(e){let A=this[wt],t=new yt(`HTTP/2: "GOAWAY" frame received with code ${e}`);if(A[Fe]=null,A[kA]=null,A.destroyed){D(this[jr]===0);let r=A[Ie].splice(A[Be]);for(let n=0;n0){let r=A[Ie][A[Be]];A[Ie][A[Be]++]=null,oA(A,r,t)}A[bA]=A[Be],D(A[be]===0),A.emit("disconnect",A[Ke],[A],t),SA(A)}var Bt=Yp(),zM=Qc(),$M=Buffer.alloc(0);async function ev(){let e=process.env.JEST_WORKER_ID?QE():void 0,A;try{A=await WebAssembly.compile(Buffer.from(jp(),"base64"))}catch{A=await WebAssembly.compile(Buffer.from(e||QE(),"base64"))}return await WebAssembly.instantiate(A,{env:{wasm_on_url:(t,r,n)=>0,wasm_on_status:(t,r,n)=>{D.strictEqual(Ge.ptr,t);let i=r-mt+pt.byteOffset;return Ge.onStatus(new Cc(pt.buffer,i,n))||0},wasm_on_message_begin:t=>(D.strictEqual(Ge.ptr,t),Ge.onMessageBegin()||0),wasm_on_header_field:(t,r,n)=>{D.strictEqual(Ge.ptr,t);let i=r-mt+pt.byteOffset;return Ge.onHeaderField(new Cc(pt.buffer,i,n))||0},wasm_on_header_value:(t,r,n)=>{D.strictEqual(Ge.ptr,t);let i=r-mt+pt.byteOffset;return Ge.onHeaderValue(new Cc(pt.buffer,i,n))||0},wasm_on_headers_complete:(t,r,n,i)=>(D.strictEqual(Ge.ptr,t),Ge.onHeadersComplete(r,!!n,!!i)||0),wasm_on_body:(t,r,n)=>{D.strictEqual(Ge.ptr,t);let i=r-mt+pt.byteOffset;return Ge.onBody(new Cc(pt.buffer,i,n))||0},wasm_on_message_complete:t=>(D.strictEqual(Ge.ptr,t),Ge.onMessageComplete()||0)}})}var fE=null,yE=ev();yE.catch();var Ge=null,pt=null,fc=0,mt=null,ci=1,Bc=2,wE=3,RE=class{constructor(A,t,{exports:r}){D(Number.isFinite(A[Ic])&&A[Ic]>0),this.llhttp=r,this.ptr=this.llhttp.llhttp_alloc(Bt.TYPE.RESPONSE),this.client=A,this.socket=t,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=A[Ic],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=A[nm]}setTimeout(A,t){this.timeoutType=t,A!==this.timeoutValue?(CE.clearTimeout(this.timeout),A?(this.timeout=CE.setTimeout(Av,A,this),this.timeout.unref&&this.timeout.unref()):this.timeout=null,this.timeoutValue=A):this.timeout&&this.timeout.refresh&&this.timeout.refresh()}resume(){this.socket.destroyed||!this.paused||(D(this.ptr!=null),D(Ge==null),this.llhttp.llhttp_resume(this.ptr),D(this.timeoutType===Bc),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||$M),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let A=this.socket.read();if(A===null)break;this.execute(A)}}execute(A){D(this.ptr!=null),D(Ge==null),D(!this.paused);let{socket:t,llhttp:r}=this;A.length>fc&&(mt&&r.free(mt),fc=Math.ceil(A.length/4096)*4096,mt=r.malloc(fc)),new Uint8Array(r.memory.buffer,mt,fc).set(A);try{let n;try{pt=A,Ge=this,n=r.llhttp_execute(this.ptr,mt,A.length)}catch(s){throw s}finally{Ge=null,pt=null}let i=r.llhttp_get_error_pos(this.ptr)-mt;if(n===Bt.ERROR.PAUSED_UPGRADE)this.onUpgrade(A.slice(i));else if(n===Bt.ERROR.PAUSED)this.paused=!0,t.unshift(A.slice(i));else if(n!==Bt.ERROR.OK){let s=r.llhttp_get_error_reason(this.ptr),o="";if(s){let a=new Uint8Array(r.memory.buffer,s).indexOf(0);o="Response does not match the HTTP/1.1 protocol ("+Buffer.from(r.memory.buffer,s,a).toString()+")"}throw new bM(o,Bt.ERROR[n],A.slice(i))}}catch(n){k.destroy(t,n)}}destroy(){D(this.ptr!=null),D(Ge==null),this.llhttp.llhttp_free(this.ptr),this.ptr=null,CE.clearTimeout(this.timeout),this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.paused=!1}onStatus(A){this.statusText=A.toString()}onMessageBegin(){let{socket:A,client:t}=this;if(A.destroyed||!t[Ie][t[Be]])return-1}onHeaderField(A){let t=this.headers.length;t&1?this.headers[t-1]=Buffer.concat([this.headers[t-1],A]):this.headers.push(A),this.trackHeader(A.length)}onHeaderValue(A){let t=this.headers.length;(t&1)===1?(this.headers.push(A),t+=1):this.headers[t-1]=Buffer.concat([this.headers[t-1],A]);let r=this.headers[t-2];r.length===10&&r.toString().toLowerCase()==="keep-alive"?this.keepAlive+=A.toString():r.length===10&&r.toString().toLowerCase()==="connection"?this.connection+=A.toString():r.length===14&&r.toString().toLowerCase()==="content-length"&&(this.contentLength+=A.toString()),this.trackHeader(A.length)}trackHeader(A){this.headersSize+=A,this.headersSize>=this.headersMaxSize&&k.destroy(this.socket,new RM)}onUpgrade(A){let{upgrade:t,client:r,socket:n,headers:i,statusCode:s}=this;D(t);let o=r[Ie][r[Be]];D(o),D(!n.destroyed),D(n===r[Fe]),D(!this.paused),D(o.upgrade||o.method==="CONNECT"),this.statusCode=null,this.statusText="",this.shouldKeepAlive=null,D(this.headers.length%2===0),this.headers=[],this.headersSize=0,n.unshift(A),n[Se].destroy(),n[Se]=null,n[wt]=null,n[Ze]=null,n.removeListener("error",om).removeListener("readable",sm).removeListener("end",am).removeListener("close",DE),r[Fe]=null,r[Ie][r[Be]++]=null,r.emit("disconnect",r[Ke],[r],new yt("upgrade"));try{o.onUpgrade(s,i,n)}catch(a){k.destroy(n,a)}SA(r)}onHeadersComplete(A,t,r){let{client:n,socket:i,headers:s,statusText:o}=this;if(i.destroyed)return-1;let a=n[Ie][n[Be]];if(!a)return-1;if(D(!this.upgrade),D(this.statusCode<200),A===100)return k.destroy(i,new oi("bad response",k.getSocketInfo(i))),-1;if(t&&!a.upgrade)return k.destroy(i,new oi("bad upgrade",k.getSocketInfo(i))),-1;if(D.strictEqual(this.timeoutType,ci),this.statusCode=A,this.shouldKeepAlive=r||a.method==="HEAD"&&!i[sA]&&this.connection.toLowerCase()==="keep-alive",this.statusCode>=200){let g=a.bodyTimeout!=null?a.bodyTimeout:n[tm];this.setTimeout(g,Bc)}else this.timeout&&this.timeout.refresh&&this.timeout.refresh();if(a.method==="CONNECT")return D(n[be]===1),this.upgrade=!0,2;if(t)return D(n[be]===1),this.upgrade=!0,2;if(D(this.headers.length%2===0),this.headers=[],this.headersSize=0,this.shouldKeepAlive&&n[Dr]){let g=this.keepAlive?k.parseKeepAliveTimeout(this.keepAlive):null;if(g!=null){let l=Math.min(g-n[em],n[$p]);l<=0?i[sA]=!0:n[Vs]=l}else n[Vs]=n[pE]}else i[sA]=!0;let c=a.onHeaders(A,s,this.resume,o)===!1;return a.aborted?-1:a.method==="HEAD"||A<200?1:(i[ai]&&(i[ai]=!1,SA(n)),c?Bt.ERROR.PAUSED:0)}onBody(A){let{client:t,socket:r,statusCode:n,maxResponseSize:i}=this;if(r.destroyed)return-1;let s=t[Ie][t[Be]];if(D(s),D.strictEqual(this.timeoutType,Bc),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),D(n>=200),i>-1&&this.bytesRead+A.length>i)return k.destroy(r,new kM),-1;if(this.bytesRead+=A.length,s.onData(A)===!1)return Bt.ERROR.PAUSED}onMessageComplete(){let{client:A,socket:t,statusCode:r,upgrade:n,headers:i,contentLength:s,bytesRead:o,shouldKeepAlive:a}=this;if(t.destroyed&&(!r||a))return-1;if(n)return;let c=A[Ie][A[Be]];if(D(c),D(r>=100),this.statusCode=null,this.statusText="",this.bytesRead=0,this.contentLength="",this.keepAlive="",this.connection="",D(this.headers.length%2===0),this.headers=[],this.headersSize=0,!(r<200)){if(c.method!=="HEAD"&&s&&o!==parseInt(s,10))return k.destroy(t,new yM),-1;if(c.onComplete(i),A[Ie][A[Be]++]=null,t[Zt])return D.strictEqual(A[be],0),k.destroy(t,new yt("reset")),Bt.ERROR.PAUSED;if(a){if(t[sA]&&A[be]===0)return k.destroy(t,new yt("reset")),Bt.ERROR.PAUSED;A[Dr]===1?setImmediate(SA,A):SA(A)}else return k.destroy(t,new yt("reset")),Bt.ERROR.PAUSED}}};function Av(e){let{socket:A,timeoutType:t,client:r}=e;t===ci?(!A[Zt]||A.writableNeedDrain||r[be]>1)&&(D(!e.paused,"cannot be paused while waiting for headers"),k.destroy(A,new wM)):t===Bc?e.paused||k.destroy(A,new DM):t===wE&&(D(r[be]===0&&r[Vs]),k.destroy(A,new yt("socket idle timeout")))}function sm(){let{[Se]:e}=this;e&&e.readMore()}function om(e){let{[wt]:A,[Se]:t}=this;if(D(e.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),A[Rt]!=="h2"&&e.code==="ECONNRESET"&&t.statusCode&&!t.shouldKeepAlive){t.onMessageComplete();return}this[Ze]=e,Rc(this[wt],e)}function Rc(e,A){if(e[be]===0&&A.code!=="UND_ERR_INFO"&&A.code!=="UND_ERR_SOCKET"){D(e[bA]===e[Be]);let t=e[Ie].splice(e[Be]);for(let r=0;r0&&t.code!=="UND_ERR_INFO"){let r=e[Ie][e[Be]];e[Ie][e[Be]++]=null,oA(e,r,t)}e[bA]=e[Be],D(e[be]===0),e.emit("disconnect",e[Ke],[e],t),SA(e)}async function cm(e){D(!e[si]),D(!e[Fe]);let{host:A,hostname:t,protocol:r,port:n}=e[Ke];if(t[0]==="["){let i=t.indexOf("]");D(i!==-1);let s=t.substring(1,i);D(Xp.isIP(s)),t=s}e[si]=!0,eA.beforeConnect.hasSubscribers&&eA.beforeConnect.publish({connectParams:{host:A,hostname:t,protocol:r,port:n,servername:e[yr],localAddress:e[Ys]},connector:e[Js]});try{let i=await new Promise((o,a)=>{e[Js]({host:A,hostname:t,protocol:r,port:n,servername:e[yr],localAddress:e[Ys]},(c,g)=>{c?a(c):o(g)})});if(e.destroyed){k.destroy(i.on("error",()=>{}),new SM);return}if(e[si]=!1,D(i),i.alpnProtocol==="h2"){Kp||(Kp=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let o=mc.connect(e[Ke],{createConnection:()=>i,peerMaxConcurrentStreams:e[pc].maxConcurrentStreams});e[Rt]="h2",o[wt]=e,o[Fe]=i,o.on("error",jM),o.on("frameError",KM),o.on("end",ZM),o.on("goaway",XM),o.on("close",DE),o.unref(),e[kA]=o,i[kA]=o}else fE||(fE=await yE,yE=null),i[Gs]=!1,i[Zt]=!1,i[sA]=!1,i[ai]=!1,i[Se]=new RE(e,i,fE);i[rm]=0,i[Os]=e[Os],i[wt]=e,i[Ze]=null,i.on("error",om).on("readable",sm).on("end",am).on("close",DE),e[Fe]=i,eA.connected.hasSubscribers&&eA.connected.publish({connectParams:{host:A,hostname:t,protocol:r,port:n,servername:e[yr],localAddress:e[Ys]},connector:e[Js],socket:i}),e.emit("connect",e[Ke],[e])}catch(i){if(e.destroyed)return;if(e[si]=!1,eA.connectError.hasSubscribers&&eA.connectError.publish({connectParams:{host:A,hostname:t,protocol:r,port:n,servername:e[yr],localAddress:e[Ys]},connector:e[Js],error:i}),i.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(D(e[be]===0);e[jr]>0&&e[Ie][e[bA]].servername===e[yr];){let s=e[Ie][e[bA]++];oA(e,s,i)}else Rc(e,i);e.emit("connectionError",e[Ke],[e],i)}SA(e)}function Zp(e){e[Rr]=0,e.emit("drain",e[Ke],[e])}function SA(e,A){e[Wr]!==2&&(e[Wr]=2,tv(e,A),e[Wr]=0,e[Be]>256&&(e[Ie].splice(0,e[Be]),e[bA]-=e[Be],e[Be]=0))}function tv(e,A){for(;;){if(e.destroyed){D(e[jr]===0);return}if(e[wr]&&!e[_r]){e[wr](),e[wr]=null;return}let t=e[Fe];if(t&&!t.destroyed&&t.alpnProtocol!=="h2"){if(e[_r]===0?!t[Gs]&&t.unref&&(t.unref(),t[Gs]=!0):t[Gs]&&t.ref&&(t.ref(),t[Gs]=!1),e[_r]===0)t[Se].timeoutType!==wE&&t[Se].setTimeout(e[Vs],wE);else if(e[be]>0&&t[Se].statusCode<200&&t[Se].timeoutType!==ci){let n=e[Ie][e[Be]],i=n.headersTimeout!=null?n.headersTimeout:e[Am];t[Se].setTimeout(i,ci)}}if(e[BE])e[Rr]=2;else if(e[Rr]===2){A?(e[Rr]=1,process.nextTick(Zp,e)):Zp(e);continue}if(e[jr]===0||e[be]>=(e[Dr]||1))return;let r=e[Ie][e[bA]];if(e[Ke].protocol==="https:"&&e[yr]!==r.servername){if(e[be]>0)return;if(e[yr]=r.servername,t&&t.servername!==r.servername){k.destroy(t,new yt("servername changed"));return}}if(e[si])return;if(!t&&!e[kA]){cm(e);return}if(t.destroyed||t[Zt]||t[sA]||t[ai]||e[be]>0&&!r.idempotent||e[be]>0&&(r.upgrade||r.method==="CONNECT")||e[be]>0&&k.bodyLength(r.body)!==0&&(k.isStream(r.body)||k.isAsyncIterable(r.body)))return;!r.aborted&&rv(e,r)?e[bA]++:e[Ie].splice(e[bA],1)}}function gm(e){return e!=="GET"&&e!=="HEAD"&&e!=="OPTIONS"&&e!=="TRACE"&&e!=="CONNECT"}function rv(e,A){if(e[Rt]==="h2"){nv(e,e[kA],A);return}let{body:t,method:r,path:n,host:i,upgrade:s,headers:o,blocking:a,reset:c}=A,g=r==="PUT"||r==="POST"||r==="PATCH";t&&typeof t.read=="function"&&t.read(0);let l=k.bodyLength(t),u=l;if(u===null&&(u=A.contentLength),u===0&&!g&&(u=null),gm(r)&&u>0&&A.contentLength!==null&&A.contentLength!==u){if(e[qs])return oA(e,A,new Kt),!1;process.emitWarning(new Kt)}let E=e[Fe];try{A.onConnect(d=>{A.aborted||A.completed||(oA(e,A,d||new bE),k.destroy(E,new yt("aborted")))})}catch(d){oA(e,A,d)}if(A.aborted)return!1;r==="HEAD"&&(E[sA]=!0),(s||r==="CONNECT")&&(E[sA]=!0),c!=null&&(E[sA]=c),e[Os]&&E[rm]++>=e[Os]&&(E[sA]=!0),a&&(E[ai]=!0);let h=`${r} ${n} HTTP/1.1\r +`;return typeof i=="string"?h+=`host: ${i}\r +`:h+=e[zp],s?h+=`connection: upgrade\r +upgrade: ${s}\r +`:e[Dr]&&!E[sA]?h+=`connection: keep-alive\r +`:h+=`connection: close\r +`,o&&(h+=o),eA.sendHeaders.hasSubscribers&&eA.sendHeaders.publish({request:A,headers:h,socket:E}),!t||l===0?(u===0?E.write(`${h}content-length: 0\r +\r +`,"latin1"):(D(u===null,"no body must not have content length"),E.write(`${h}\r +`,"latin1")),A.onRequestSent()):k.isBuffer(t)?(D(u===t.byteLength,"buffer body must have content length"),E.cork(),E.write(`${h}content-length: ${u}\r +\r +`,"latin1"),E.write(t),E.uncork(),A.onBodySent(t),A.onRequestSent(),g||(E[sA]=!0)):k.isBlobLike(t)?typeof t.stream=="function"?yc({body:t.stream(),client:e,request:A,socket:E,contentLength:u,header:h,expectsPayload:g}):um({body:t,client:e,request:A,socket:E,contentLength:u,header:h,expectsPayload:g}):k.isStream(t)?lm({body:t,client:e,request:A,socket:E,contentLength:u,header:h,expectsPayload:g}):k.isIterable(t)?yc({body:t,client:e,request:A,socket:E,contentLength:u,header:h,expectsPayload:g}):D(!1),!0}function nv(e,A,t){let{body:r,method:n,path:i,host:s,upgrade:o,expectContinue:a,signal:c,headers:g}=t,l;if(typeof g=="string"?l=IE[GM](g.trim()):l=g,o)return oA(e,t,new Error("Upgrade not supported for H2")),!1;try{t.onConnect(p=>{t.aborted||t.completed||oA(e,t,p||new bE)})}catch(p){oA(e,t,p)}if(t.aborted)return!1;let u,E=e[pc];if(l[YM]=s||e[im],l[VM]=n,n==="CONNECT")return A.ref(),u=A.request(l,{endStream:!1,signal:c}),u.id&&!u.pending?(t.onUpgrade(null,null,u),++E.openStreams):u.once("ready",()=>{t.onUpgrade(null,null,u),++E.openStreams}),u.once("close",()=>{E.openStreams-=1,E.openStreams===0&&A.unref()}),!0;l[qM]=i,l[OM]="https";let h=n==="PUT"||n==="POST"||n==="PATCH";r&&typeof r.read=="function"&&r.read(0);let d=k.bodyLength(r);if(d==null&&(d=t.contentLength),(d===0||!h)&&(d=null),gm(n)&&d>0&&t.contentLength!=null&&t.contentLength!==d){if(e[qs])return oA(e,t,new Kt),!1;process.emitWarning(new Kt)}d!=null&&(D(r,"no body must not have content length"),l[HM]=`${d}`),A.ref();let C=n==="GET"||n==="HEAD";return a?(l[WM]="100-continue",u=A.request(l,{endStream:C,signal:c}),u.once("continue",I)):(u=A.request(l,{endStream:C,signal:c}),I()),++E.openStreams,u.once("response",p=>{let{[_M]:w,...m}=p;t.onHeaders(Number(w),m,u.resume.bind(u),"")===!1&&u.pause()}),u.once("end",()=>{t.onComplete([])}),u.on("data",p=>{t.onData(p)===!1&&u.pause()}),u.once("close",()=>{E.openStreams-=1,E.openStreams===0&&A.unref()}),u.once("error",function(p){e[kA]&&!e[kA].destroyed&&!this.closed&&!this.destroyed&&(E.streams-=1,k.destroy(u,p))}),u.once("frameError",(p,w)=>{let m=new yt(`HTTP/2: "frameError" received - type ${p}, code ${w}`);oA(e,t,m),e[kA]&&!e[kA].destroyed&&!this.closed&&!this.destroyed&&(E.streams-=1,k.destroy(u,m))}),!0;function I(){r?k.isBuffer(r)?(D(d===r.byteLength,"buffer body must have content length"),u.cork(),u.write(r),u.uncork(),u.end(),t.onBodySent(r),t.onRequestSent()):k.isBlobLike(r)?typeof r.stream=="function"?yc({client:e,request:t,contentLength:d,h2stream:u,expectsPayload:h,body:r.stream(),socket:e[Fe],header:""}):um({body:r,client:e,request:t,contentLength:d,expectsPayload:h,h2stream:u,header:"",socket:e[Fe]}):k.isStream(r)?lm({body:r,client:e,request:t,contentLength:d,expectsPayload:h,socket:e[Fe],h2stream:u,header:""}):k.isIterable(r)?yc({body:r,client:e,request:t,contentLength:d,expectsPayload:h,header:"",h2stream:u,socket:e[Fe]}):D(!1):t.onRequestSent()}}function lm({h2stream:e,body:A,client:t,request:r,socket:n,contentLength:i,header:s,expectsPayload:o}){if(D(i!==0||t[be]===0,"stream body cannot be pipelined"),t[Rt]==="h2"){let d=function(C){r.onBodySent(C)},h=pM(A,e,C=>{C?(k.destroy(A,C),k.destroy(e,C)):r.onRequestSent()});h.on("data",d),h.once("end",()=>{h.removeListener("data",d),k.destroy(h)});return}let a=!1,c=new wc({socket:n,request:r,contentLength:i,client:t,expectsPayload:o,header:s}),g=function(h){if(!a)try{!c.write(h)&&this.pause&&this.pause()}catch(d){k.destroy(this,d)}},l=function(){a||A.resume&&A.resume()},u=function(){if(a)return;let h=new bE;queueMicrotask(()=>E(h))},E=function(h){if(!a){if(a=!0,D(n.destroyed||n[Zt]&&t[be]<=1),n.off("drain",l).off("error",E),A.removeListener("data",g).removeListener("end",E).removeListener("error",E).removeListener("close",u),!h)try{c.end()}catch(d){h=d}c.destroy(h),h&&(h.code!=="UND_ERR_INFO"||h.message!=="reset")?k.destroy(A,h):k.destroy(A)}};A.on("data",g).on("end",E).on("error",E).on("close",u),A.resume&&A.resume(),n.on("drain",l).on("error",E)}async function um({h2stream:e,body:A,client:t,request:r,socket:n,contentLength:i,header:s,expectsPayload:o}){D(i===A.size,"blob body must have content length");let a=t[Rt]==="h2";try{if(i!=null&&i!==A.size)throw new Kt;let c=Buffer.from(await A.arrayBuffer());a?(e.cork(),e.write(c),e.uncork()):(n.cork(),n.write(`${s}content-length: ${i}\r +\r +`,"latin1"),n.write(c),n.uncork()),r.onBodySent(c),r.onRequestSent(),o||(n[sA]=!0),SA(t)}catch(c){k.destroy(a?e:n,c)}}async function yc({h2stream:e,body:A,client:t,request:r,socket:n,contentLength:i,header:s,expectsPayload:o}){D(i!==0||t[be]===0,"iterator body cannot be pipelined");let a=null;function c(){if(a){let u=a;a=null,u()}}let g=()=>new Promise((u,E)=>{D(a===null),n[Ze]?E(n[Ze]):a=u});if(t[Rt]==="h2"){e.on("close",c).on("drain",c);try{for await(let u of A){if(n[Ze])throw n[Ze];let E=e.write(u);r.onBodySent(u),E||await g()}}catch(u){e.destroy(u)}finally{r.onRequestSent(),e.end(),e.off("close",c).off("drain",c)}return}n.on("close",c).on("drain",c);let l=new wc({socket:n,request:r,contentLength:i,client:t,expectsPayload:o,header:s});try{for await(let u of A){if(n[Ze])throw n[Ze];l.write(u)||await g()}l.end()}catch(u){l.destroy(u)}finally{n.off("close",c).off("drain",c)}}var wc=class{constructor({socket:A,request:t,contentLength:r,client:n,expectsPayload:i,header:s}){this.socket=A,this.request=t,this.contentLength=r,this.client=n,this.bytesWritten=0,this.expectsPayload=i,this.header=s,A[Zt]=!0}write(A){let{socket:t,request:r,contentLength:n,client:i,bytesWritten:s,expectsPayload:o,header:a}=this;if(t[Ze])throw t[Ze];if(t.destroyed)return!1;let c=Buffer.byteLength(A);if(!c)return!0;if(n!==null&&s+c>n){if(i[qs])throw new Kt;process.emitWarning(new Kt)}t.cork(),s===0&&(o||(t[sA]=!0),n===null?t.write(`${a}transfer-encoding: chunked\r +`,"latin1"):t.write(`${a}content-length: ${n}\r +\r +`,"latin1")),n===null&&t.write(`\r +${c.toString(16)}\r +`,"latin1"),this.bytesWritten+=c;let g=t.write(A);return t.uncork(),r.onBodySent(A),g||t[Se].timeout&&t[Se].timeoutType===ci&&t[Se].timeout.refresh&&t[Se].timeout.refresh(),g}end(){let{socket:A,contentLength:t,client:r,bytesWritten:n,expectsPayload:i,header:s,request:o}=this;if(o.onRequestSent(),A[Zt]=!1,A[Ze])throw A[Ze];if(!A.destroyed){if(n===0?i?A.write(`${s}content-length: 0\r +\r +`,"latin1"):A.write(`${s}\r +`,"latin1"):t===null&&A.write(`\r +0\r +\r +`,"latin1"),t!==null&&n!==t){if(r[qs])throw new Kt;process.emitWarning(new Kt)}A[Se].timeout&&A[Se].timeoutType===ci&&A[Se].timeout.refresh&&A[Se].timeout.refresh(),SA(r)}}destroy(A){let{socket:t,client:r}=this;t[Zt]=!1,A&&(D(r[be]<=1,"pipeline should only contain this request"),k.destroy(t,A))}};function oA(e,A,t){try{A.onError(t),D(A.aborted)}catch(r){e.emit("error",r)}}Em.exports=mE});var dm=Q((Uj,hm)=>{"use strict";var Dc=class{constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(A){this.list[this.top]=A,this.top=this.top+1&2047}shift(){let A=this.list[this.bottom];return A===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,A)}};hm.exports=class{constructor(){this.head=this.tail=new Dc}isEmpty(){return this.head.isEmpty()}push(A){this.head.isFull()&&(this.head=this.head.next=new Dc),this.head.push(A)}shift(){let A=this.tail,t=A.shift();return A.isEmpty()&&A.next!==null&&(this.tail=A.next),t}}});var Cm=Q((Tj,Qm)=>{"use strict";var{kFree:iv,kConnected:sv,kPending:ov,kQueued:av,kRunning:cv,kSize:gv}=de(),Kr=Symbol("pool"),kE=class{constructor(A){this[Kr]=A}get connected(){return this[Kr][sv]}get free(){return this[Kr][iv]}get pending(){return this[Kr][ov]}get queued(){return this[Kr][av]}get running(){return this[Kr][cv]}get size(){return this[Kr][gv]}};Qm.exports=kE});var UE=Q((Mj,bm)=>{"use strict";var lv=Ms(),uv=dm(),{kConnected:SE,kSize:fm,kRunning:Im,kPending:Bm,kQueued:Ws,kBusy:Ev,kFree:hv,kUrl:dv,kClose:Qv,kDestroy:Cv,kDispatch:fv}=de(),Iv=Cm(),CA=Symbol("clients"),aA=Symbol("needDrain"),_s=Symbol("queue"),FE=Symbol("closed resolve"),NE=Symbol("onDrain"),pm=Symbol("onConnect"),mm=Symbol("onDisconnect"),ym=Symbol("onConnectionError"),xE=Symbol("get dispatcher"),Rm=Symbol("add client"),Dm=Symbol("remove client"),wm=Symbol("stats"),LE=class extends lv{constructor(){super(),this[_s]=new uv,this[CA]=[],this[Ws]=0;let A=this;this[NE]=function(r,n){let i=A[_s],s=!1;for(;!s;){let o=i.shift();if(!o)break;A[Ws]--,s=!this.dispatch(o.opts,o.handler)}this[aA]=s,!this[aA]&&A[aA]&&(A[aA]=!1,A.emit("drain",r,[A,...n])),A[FE]&&i.isEmpty()&&Promise.all(A[CA].map(o=>o.close())).then(A[FE])},this[pm]=(t,r)=>{A.emit("connect",t,[A,...r])},this[mm]=(t,r,n)=>{A.emit("disconnect",t,[A,...r],n)},this[ym]=(t,r,n)=>{A.emit("connectionError",t,[A,...r],n)},this[wm]=new Iv(this)}get[Ev](){return this[aA]}get[SE](){return this[CA].filter(A=>A[SE]).length}get[hv](){return this[CA].filter(A=>A[SE]&&!A[aA]).length}get[Bm](){let A=this[Ws];for(let{[Bm]:t}of this[CA])A+=t;return A}get[Im](){let A=0;for(let{[Im]:t}of this[CA])A+=t;return A}get[fm](){let A=this[Ws];for(let{[fm]:t}of this[CA])A+=t;return A}get stats(){return this[wm]}async[Qv](){return this[_s].isEmpty()?Promise.all(this[CA].map(A=>A.close())):new Promise(A=>{this[FE]=A})}async[Cv](A){for(;;){let t=this[_s].shift();if(!t)break;t.handler.onError(A)}return Promise.all(this[CA].map(t=>t.destroy(A)))}[fv](A,t){let r=this[xE]();return r?r.dispatch(A,t)||(r[aA]=!0,this[aA]=!this[xE]()):(this[aA]=!0,this[_s].push({opts:A,handler:t}),this[Ws]++),!this[aA]}[Rm](A){return A.on("drain",this[NE]).on("connect",this[pm]).on("disconnect",this[mm]).on("connectionError",this[ym]),this[CA].push(A),this[aA]&&process.nextTick(()=>{this[aA]&&this[NE](A[dv],[this,A])}),this}[Dm](A){A.close(()=>{let t=this[CA].indexOf(A);t!==-1&&this[CA].splice(t,1)}),this[aA]=this[CA].some(t=>!t[aA]&&t.closed!==!0&&t.destroyed!==!0)}};bm.exports={PoolBase:LE,kClients:CA,kNeedDrain:aA,kAddClient:Rm,kRemoveClient:Dm,kGetDispatcher:xE}});var gi=Q((vj,Nm)=>{"use strict";var{PoolBase:Bv,kClients:km,kNeedDrain:pv,kAddClient:mv,kGetDispatcher:yv}=UE(),wv=Hs(),{InvalidArgumentError:TE}=le(),ME=W(),{kUrl:Sm,kInterceptors:Rv}=de(),Dv=vs(),vE=Symbol("options"),PE=Symbol("connections"),Fm=Symbol("factory");function bv(e,A){return new wv(e,A)}var GE=class extends Bv{constructor(A,{connections:t,factory:r=bv,connect:n,connectTimeout:i,tls:s,maxCachedSessions:o,socketPath:a,autoSelectFamily:c,autoSelectFamilyAttemptTimeout:g,allowH2:l,...u}={}){if(super(),t!=null&&(!Number.isFinite(t)||t<0))throw new TE("invalid connections");if(typeof r!="function")throw new TE("factory must be a function.");if(n!=null&&typeof n!="function"&&typeof n!="object")throw new TE("connect must be a function or an object");typeof n!="function"&&(n=Dv({...s,maxCachedSessions:o,allowH2:l,socketPath:a,timeout:i,...ME.nodeHasAutoSelectFamily&&c?{autoSelectFamily:c,autoSelectFamilyAttemptTimeout:g}:void 0,...n})),this[Rv]=u.interceptors&&u.interceptors.Pool&&Array.isArray(u.interceptors.Pool)?u.interceptors.Pool:[],this[PE]=t||null,this[Sm]=ME.parseOrigin(A),this[vE]={...ME.deepClone(u),connect:n,allowH2:l},this[vE].interceptors=u.interceptors?{...u.interceptors}:void 0,this[Fm]=r}[yv](){let A=this[km].find(t=>!t[pv]);return A||((!this[PE]||this[km].length{"use strict";var{BalancedPoolMissingUpstreamError:kv,InvalidArgumentError:Sv}=le(),{PoolBase:Fv,kClients:cA,kNeedDrain:js,kAddClient:Nv,kRemoveClient:xv,kGetDispatcher:Lv}=UE(),Uv=gi(),{kUrl:JE,kInterceptors:Tv}=de(),{parseOrigin:xm}=W(),Lm=Symbol("factory"),bc=Symbol("options"),Um=Symbol("kGreatestCommonDivisor"),Zr=Symbol("kCurrentWeight"),Xr=Symbol("kIndex"),VA=Symbol("kWeight"),kc=Symbol("kMaxWeightPerServer"),Sc=Symbol("kErrorPenalty");function Tm(e,A){return A===0?e:Tm(A,e%A)}function Mv(e,A){return new Uv(e,A)}var YE=class extends Fv{constructor(A=[],{factory:t=Mv,...r}={}){if(super(),this[bc]=r,this[Xr]=-1,this[Zr]=0,this[kc]=this[bc].maxWeightPerServer||100,this[Sc]=this[bc].errorPenalty||15,Array.isArray(A)||(A=[A]),typeof t!="function")throw new Sv("factory must be a function.");this[Tv]=r.interceptors&&r.interceptors.BalancedPool&&Array.isArray(r.interceptors.BalancedPool)?r.interceptors.BalancedPool:[],this[Lm]=t;for(let n of A)this.addUpstream(n);this._updateBalancedPoolStats()}addUpstream(A){let t=xm(A).origin;if(this[cA].find(n=>n[JE].origin===t&&n.closed!==!0&&n.destroyed!==!0))return this;let r=this[Lm](t,Object.assign({},this[bc]));this[Nv](r),r.on("connect",()=>{r[VA]=Math.min(this[kc],r[VA]+this[Sc])}),r.on("connectionError",()=>{r[VA]=Math.max(1,r[VA]-this[Sc]),this._updateBalancedPoolStats()}),r.on("disconnect",(...n)=>{let i=n[2];i&&i.code==="UND_ERR_SOCKET"&&(r[VA]=Math.max(1,r[VA]-this[Sc]),this._updateBalancedPoolStats())});for(let n of this[cA])n[VA]=this[kc];return this._updateBalancedPoolStats(),this}_updateBalancedPoolStats(){this[Um]=this[cA].map(A=>A[VA]).reduce(Tm,0)}removeUpstream(A){let t=xm(A).origin,r=this[cA].find(n=>n[JE].origin===t&&n.closed!==!0&&n.destroyed!==!0);return r&&this[xv](r),this}get upstreams(){return this[cA].filter(A=>A.closed!==!0&&A.destroyed!==!0).map(A=>A[JE].origin)}[Lv](){if(this[cA].length===0)throw new kv;if(!this[cA].find(i=>!i[js]&&i.closed!==!0&&i.destroyed!==!0)||this[cA].map(i=>i[js]).reduce((i,s)=>i&&s,!0))return;let r=0,n=this[cA].findIndex(i=>!i[js]);for(;r++this[cA][n][VA]&&!i[js]&&(n=this[Xr]),this[Xr]===0&&(this[Zr]=this[Zr]-this[Um],this[Zr]<=0&&(this[Zr]=this[kc])),i[VA]>=this[Zr]&&!i[js])return i}return this[Zr]=this[cA][n][VA],this[Xr]=n,this[cA][n]}};Mm.exports=YE});var VE=Q((Gj,Jm)=>{"use strict";var{kConnected:Pm,kSize:Gm}=de(),Fc=class{constructor(A){this.value=A}deref(){return this.value[Pm]===0&&this.value[Gm]===0?void 0:this.value}},Nc=class{constructor(A){this.finalizer=A}register(A,t){A.on&&A.on("disconnect",()=>{A[Pm]===0&&A[Gm]===0&&this.finalizer(t)})}};Jm.exports=function(){return process.env.NODE_V8_COVERAGE?{WeakRef:Fc,FinalizationRegistry:Nc}:{WeakRef:global.WeakRef||Fc,FinalizationRegistry:global.FinalizationRegistry||Nc}}});var Ks=Q((Jj,jm)=>{"use strict";var{InvalidArgumentError:xc}=le(),{kClients:br,kRunning:Ym,kClose:vv,kDestroy:Pv,kDispatch:Gv,kInterceptors:Jv}=de(),Yv=Ms(),Vv=gi(),qv=Hs(),Ov=W(),Hv=Qc(),{WeakRef:Wv,FinalizationRegistry:_v}=VE()(),Vm=Symbol("onConnect"),qm=Symbol("onDisconnect"),Om=Symbol("onConnectionError"),jv=Symbol("maxRedirections"),Hm=Symbol("onDrain"),Wm=Symbol("factory"),_m=Symbol("finalizer"),qE=Symbol("options");function Kv(e,A){return A&&A.connections===1?new qv(e,A):new Vv(e,A)}var OE=class extends Yv{constructor({factory:A=Kv,maxRedirections:t=0,connect:r,...n}={}){if(super(),typeof A!="function")throw new xc("factory must be a function.");if(r!=null&&typeof r!="function"&&typeof r!="object")throw new xc("connect must be a function or an object");if(!Number.isInteger(t)||t<0)throw new xc("maxRedirections must be a positive number");r&&typeof r!="function"&&(r={...r}),this[Jv]=n.interceptors&&n.interceptors.Agent&&Array.isArray(n.interceptors.Agent)?n.interceptors.Agent:[Hv({maxRedirections:t})],this[qE]={...Ov.deepClone(n),connect:r},this[qE].interceptors=n.interceptors?{...n.interceptors}:void 0,this[jv]=t,this[Wm]=A,this[br]=new Map,this[_m]=new _v(s=>{let o=this[br].get(s);o!==void 0&&o.deref()===void 0&&this[br].delete(s)});let i=this;this[Hm]=(s,o)=>{i.emit("drain",s,[i,...o])},this[Vm]=(s,o)=>{i.emit("connect",s,[i,...o])},this[qm]=(s,o,a)=>{i.emit("disconnect",s,[i,...o],a)},this[Om]=(s,o,a)=>{i.emit("connectionError",s,[i,...o],a)}}get[Ym](){let A=0;for(let t of this[br].values()){let r=t.deref();r&&(A+=r[Ym])}return A}[Gv](A,t){let r;if(A.origin&&(typeof A.origin=="string"||A.origin instanceof URL))r=String(A.origin);else throw new xc("opts.origin must be a non-empty string or URL.");let n=this[br].get(r),i=n?n.deref():null;return i||(i=this[Wm](A.origin,this[qE]).on("drain",this[Hm]).on("connect",this[Vm]).on("disconnect",this[qm]).on("connectionError",this[Om]),this[br].set(r,new Wv(i)),this[_m].register(i,r)),i.dispatch(A,t)}async[vv](){let A=[];for(let t of this[br].values()){let r=t.deref();r&&A.push(r.close())}await Promise.all(A)}async[Pv](A){let t=[];for(let r of this[br].values()){let n=r.deref();n&&t.push(n.destroy(A))}await Promise.all(t)}};jm.exports=OE});var ry=Q((Vj,ty)=>{"use strict";var zm=require("assert"),{Readable:Zv}=require("stream"),{RequestAbortedError:$m,NotSupportedError:Xv,InvalidArgumentError:zv}=le(),Tc=W(),{ReadableStreamFrom:$v,toUSVString:eP}=W(),HE,FA=Symbol("kConsume"),Lc=Symbol("kReading"),kr=Symbol("kBody"),Km=Symbol("abort"),ey=Symbol("kContentType"),Zm=()=>{};ty.exports=class extends Zv{constructor({resume:A,abort:t,contentType:r="",highWaterMark:n=64*1024}){super({autoDestroy:!0,read:A,highWaterMark:n}),this._readableState.dataEmitted=!1,this[Km]=t,this[FA]=null,this[kr]=null,this[ey]=r,this[Lc]=!1}destroy(A){return this.destroyed?this:(!A&&!this._readableState.endEmitted&&(A=new $m),A&&this[Km](),super.destroy(A))}emit(A,...t){return A==="data"?this._readableState.dataEmitted=!0:A==="error"&&(this._readableState.errorEmitted=!0),super.emit(A,...t)}on(A,...t){return(A==="data"||A==="readable")&&(this[Lc]=!0),super.on(A,...t)}addListener(A,...t){return this.on(A,...t)}off(A,...t){let r=super.off(A,...t);return(A==="data"||A==="readable")&&(this[Lc]=this.listenerCount("data")>0||this.listenerCount("readable")>0),r}removeListener(A,...t){return this.off(A,...t)}push(A){return this[FA]&&A!==null&&this.readableLength===0?(Ay(this[FA],A),this[Lc]?super.push(A):!0):super.push(A)}async text(){return Uc(this,"text")}async json(){return Uc(this,"json")}async blob(){return Uc(this,"blob")}async arrayBuffer(){return Uc(this,"arrayBuffer")}async formData(){throw new Xv}get bodyUsed(){return Tc.isDisturbed(this)}get body(){return this[kr]||(this[kr]=$v(this),this[FA]&&(this[kr].getReader(),zm(this[kr].locked))),this[kr]}dump(A){let t=A&&Number.isFinite(A.limit)?A.limit:262144,r=A&&A.signal;if(r)try{if(typeof r!="object"||!("aborted"in r))throw new zv("signal must be an AbortSignal");Tc.throwIfAborted(r)}catch(n){return Promise.reject(n)}return this.closed?Promise.resolve(null):new Promise((n,i)=>{let s=r?Tc.addAbortListener(r,()=>{this.destroy()}):Zm;this.on("close",function(){s(),r&&r.aborted?i(r.reason||Object.assign(new Error("The operation was aborted"),{name:"AbortError"})):n(null)}).on("error",Zm).on("data",function(o){t-=o.length,t<=0&&this.destroy()}).resume()})}};function AP(e){return e[kr]&&e[kr].locked===!0||e[FA]}function tP(e){return Tc.isDisturbed(e)||AP(e)}async function Uc(e,A){if(tP(e))throw new TypeError("unusable");return zm(!e[FA]),new Promise((t,r)=>{e[FA]={type:A,stream:e,resolve:t,reject:r,length:0,body:[]},e.on("error",function(n){WE(this[FA],n)}).on("close",function(){this[FA].body!==null&&WE(this[FA],new $m)}),process.nextTick(rP,e[FA])})}function rP(e){if(e.body===null)return;let{_readableState:A}=e.stream;for(let t of A.buffer)Ay(e,t);for(A.endEmitted?Xm(this[FA]):e.stream.on("end",function(){Xm(this[FA])}),e.stream.resume();e.stream.read()!=null;);}function Xm(e){let{type:A,body:t,resolve:r,stream:n,length:i}=e;try{if(A==="text")r(eP(Buffer.concat(t)));else if(A==="json")r(JSON.parse(Buffer.concat(t)));else if(A==="arrayBuffer"){let s=new Uint8Array(i),o=0;for(let a of t)s.set(a,o),o+=a.byteLength;r(s.buffer)}else A==="blob"&&(HE||(HE=require("buffer").Blob),r(new HE(t,{type:n[ey]})));WE(e)}catch(s){n.destroy(s)}}function Ay(e,A){e.length+=A.length,e.body.push(A)}function WE(e,A){e.body!==null&&(A?e.reject(A):e.resolve(),e.type=null,e.stream=null,e.resolve=null,e.reject=null,e.length=0,e.body=null)}});var _E=Q((qj,iy)=>{"use strict";var nP=require("assert"),{ResponseStatusCodeError:Mc}=le(),{toUSVString:ny}=W();async function iP({callback:e,body:A,contentType:t,statusCode:r,statusMessage:n,headers:i}){nP(A);let s=[],o=0;for await(let a of A)if(s.push(a),o+=a.length,o>128*1024){s=null;break}if(r===204||!t||!s){process.nextTick(e,new Mc(`Response status code ${r}${n?`: ${n}`:""}`,r,i));return}try{if(t.startsWith("application/json")){let a=JSON.parse(ny(Buffer.concat(s)));process.nextTick(e,new Mc(`Response status code ${r}${n?`: ${n}`:""}`,r,i,a));return}if(t.startsWith("text/")){let a=ny(Buffer.concat(s));process.nextTick(e,new Mc(`Response status code ${r}${n?`: ${n}`:""}`,r,i,a));return}}catch{}process.nextTick(e,new Mc(`Response status code ${r}${n?`: ${n}`:""}`,r,i))}iy.exports={getResolveErrorBodyCallback:iP}});var ui=Q((Oj,oy)=>{"use strict";var{addAbortListener:sP}=W(),{RequestAbortedError:oP}=le(),li=Symbol("kListener"),Sr=Symbol("kSignal");function sy(e){e.abort?e.abort():e.onError(new oP)}function aP(e,A){if(e[Sr]=null,e[li]=null,!!A){if(A.aborted){sy(e);return}e[Sr]=A,e[li]=()=>{sy(e)},sP(e[Sr],e[li])}}function cP(e){e[Sr]&&("removeEventListener"in e[Sr]?e[Sr].removeEventListener("abort",e[li]):e[Sr].removeListener("abort",e[li]),e[Sr]=null,e[li]=null)}oy.exports={addSignal:aP,removeSignal:cP}});var gy=Q((Hj,jE)=>{"use strict";var gP=ry(),{InvalidArgumentError:Ei,RequestAbortedError:lP}=le(),Dt=W(),{getResolveErrorBodyCallback:uP}=_E(),{AsyncResource:EP}=require("async_hooks"),{addSignal:hP,removeSignal:ay}=ui(),vc=class extends EP{constructor(A,t){if(!A||typeof A!="object")throw new Ei("invalid opts");let{signal:r,method:n,opaque:i,body:s,onInfo:o,responseHeaders:a,throwOnError:c,highWaterMark:g}=A;try{if(typeof t!="function")throw new Ei("invalid callback");if(g&&(typeof g!="number"||g<0))throw new Ei("invalid highWaterMark");if(r&&typeof r.on!="function"&&typeof r.addEventListener!="function")throw new Ei("signal must be an EventEmitter or EventTarget");if(n==="CONNECT")throw new Ei("invalid method");if(o&&typeof o!="function")throw new Ei("invalid onInfo callback");super("UNDICI_REQUEST")}catch(l){throw Dt.isStream(s)&&Dt.destroy(s.on("error",Dt.nop),l),l}this.responseHeaders=a||null,this.opaque=i||null,this.callback=t,this.res=null,this.abort=null,this.body=s,this.trailers={},this.context=null,this.onInfo=o||null,this.throwOnError=c,this.highWaterMark=g,Dt.isStream(s)&&s.on("error",l=>{this.onError(l)}),hP(this,r)}onConnect(A,t){if(!this.callback)throw new lP;this.abort=A,this.context=t}onHeaders(A,t,r,n){let{callback:i,opaque:s,abort:o,context:a,responseHeaders:c,highWaterMark:g}=this,l=c==="raw"?Dt.parseRawHeaders(t):Dt.parseHeaders(t);if(A<200){this.onInfo&&this.onInfo({statusCode:A,headers:l});return}let E=(c==="raw"?Dt.parseHeaders(t):l)["content-type"],h=new gP({resume:r,abort:o,contentType:E,highWaterMark:g});this.callback=null,this.res=h,i!==null&&(this.throwOnError&&A>=400?this.runInAsyncScope(uP,null,{callback:i,body:h,contentType:E,statusCode:A,statusMessage:n,headers:l}):this.runInAsyncScope(i,null,null,{statusCode:A,headers:l,trailers:this.trailers,opaque:s,body:h,context:a}))}onData(A){let{res:t}=this;return t.push(A)}onComplete(A){let{res:t}=this;ay(this),Dt.parseHeaders(A,this.trailers),t.push(null)}onError(A){let{res:t,callback:r,body:n,opaque:i}=this;ay(this),r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,A,{opaque:i})})),t&&(this.res=null,queueMicrotask(()=>{Dt.destroy(t,A)})),n&&(this.body=null,Dt.destroy(n,A))}};function cy(e,A){if(A===void 0)return new Promise((t,r)=>{cy.call(this,e,(n,i)=>n?r(n):t(i))});try{this.dispatch(e,new vc(e,A))}catch(t){if(typeof A!="function")throw t;let r=e&&e.opaque;queueMicrotask(()=>A(t,{opaque:r}))}}jE.exports=cy;jE.exports.RequestHandler=vc});var hy=Q((Wj,Ey)=>{"use strict";var{finished:dP,PassThrough:QP}=require("stream"),{InvalidArgumentError:hi,InvalidReturnValueError:CP,RequestAbortedError:fP}=le(),At=W(),{getResolveErrorBodyCallback:IP}=_E(),{AsyncResource:BP}=require("async_hooks"),{addSignal:pP,removeSignal:ly}=ui(),KE=class extends BP{constructor(A,t,r){if(!A||typeof A!="object")throw new hi("invalid opts");let{signal:n,method:i,opaque:s,body:o,onInfo:a,responseHeaders:c,throwOnError:g}=A;try{if(typeof r!="function")throw new hi("invalid callback");if(typeof t!="function")throw new hi("invalid factory");if(n&&typeof n.on!="function"&&typeof n.addEventListener!="function")throw new hi("signal must be an EventEmitter or EventTarget");if(i==="CONNECT")throw new hi("invalid method");if(a&&typeof a!="function")throw new hi("invalid onInfo callback");super("UNDICI_STREAM")}catch(l){throw At.isStream(o)&&At.destroy(o.on("error",At.nop),l),l}this.responseHeaders=c||null,this.opaque=s||null,this.factory=t,this.callback=r,this.res=null,this.abort=null,this.context=null,this.trailers=null,this.body=o,this.onInfo=a||null,this.throwOnError=g||!1,At.isStream(o)&&o.on("error",l=>{this.onError(l)}),pP(this,n)}onConnect(A,t){if(!this.callback)throw new fP;this.abort=A,this.context=t}onHeaders(A,t,r,n){let{factory:i,opaque:s,context:o,callback:a,responseHeaders:c}=this,g=c==="raw"?At.parseRawHeaders(t):At.parseHeaders(t);if(A<200){this.onInfo&&this.onInfo({statusCode:A,headers:g});return}this.factory=null;let l;if(this.throwOnError&&A>=400){let h=(c==="raw"?At.parseHeaders(t):g)["content-type"];l=new QP,this.callback=null,this.runInAsyncScope(IP,null,{callback:a,body:l,contentType:h,statusCode:A,statusMessage:n,headers:g})}else{if(i===null)return;if(l=this.runInAsyncScope(i,null,{statusCode:A,headers:g,opaque:s,context:o}),!l||typeof l.write!="function"||typeof l.end!="function"||typeof l.on!="function")throw new CP("expected Writable");dP(l,{readable:!1},E=>{let{callback:h,res:d,opaque:C,trailers:I,abort:p}=this;this.res=null,(E||!d.readable)&&At.destroy(d,E),this.callback=null,this.runInAsyncScope(h,null,E||null,{opaque:C,trailers:I}),E&&p()})}return l.on("drain",r),this.res=l,(l.writableNeedDrain!==void 0?l.writableNeedDrain:l._writableState&&l._writableState.needDrain)!==!0}onData(A){let{res:t}=this;return t?t.write(A):!0}onComplete(A){let{res:t}=this;ly(this),t&&(this.trailers=At.parseHeaders(A),t.end())}onError(A){let{res:t,callback:r,opaque:n,body:i}=this;ly(this),this.factory=null,t?(this.res=null,At.destroy(t,A)):r&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(r,null,A,{opaque:n})})),i&&(this.body=null,At.destroy(i,A))}};function uy(e,A,t){if(t===void 0)return new Promise((r,n)=>{uy.call(this,e,A,(i,s)=>i?n(i):r(s))});try{this.dispatch(e,new KE(e,A,t))}catch(r){if(typeof t!="function")throw r;let n=e&&e.opaque;queueMicrotask(()=>t(r,{opaque:n}))}}Ey.exports=uy});var Cy=Q((_j,Qy)=>{"use strict";var{Readable:dy,Duplex:mP,PassThrough:yP}=require("stream"),{InvalidArgumentError:Zs,InvalidReturnValueError:wP,RequestAbortedError:Pc}=le(),qA=W(),{AsyncResource:RP}=require("async_hooks"),{addSignal:DP,removeSignal:bP}=ui(),kP=require("assert"),di=Symbol("resume"),ZE=class extends dy{constructor(){super({autoDestroy:!0}),this[di]=null}_read(){let{[di]:A}=this;A&&(this[di]=null,A())}_destroy(A,t){this._read(),t(A)}},XE=class extends dy{constructor(A){super({autoDestroy:!0}),this[di]=A}_read(){this[di]()}_destroy(A,t){!A&&!this._readableState.endEmitted&&(A=new Pc),t(A)}},zE=class extends RP{constructor(A,t){if(!A||typeof A!="object")throw new Zs("invalid opts");if(typeof t!="function")throw new Zs("invalid handler");let{signal:r,method:n,opaque:i,onInfo:s,responseHeaders:o}=A;if(r&&typeof r.on!="function"&&typeof r.addEventListener!="function")throw new Zs("signal must be an EventEmitter or EventTarget");if(n==="CONNECT")throw new Zs("invalid method");if(s&&typeof s!="function")throw new Zs("invalid onInfo callback");super("UNDICI_PIPELINE"),this.opaque=i||null,this.responseHeaders=o||null,this.handler=t,this.abort=null,this.context=null,this.onInfo=s||null,this.req=new ZE().on("error",qA.nop),this.ret=new mP({readableObjectMode:A.objectMode,autoDestroy:!0,read:()=>{let{body:a}=this;a&&a.resume&&a.resume()},write:(a,c,g)=>{let{req:l}=this;l.push(a,c)||l._readableState.destroyed?g():l[di]=g},destroy:(a,c)=>{let{body:g,req:l,res:u,ret:E,abort:h}=this;!a&&!E._readableState.endEmitted&&(a=new Pc),h&&a&&h(),qA.destroy(g,a),qA.destroy(l,a),qA.destroy(u,a),bP(this),c(a)}}).on("prefinish",()=>{let{req:a}=this;a.push(null)}),this.res=null,DP(this,r)}onConnect(A,t){let{ret:r,res:n}=this;if(kP(!n,"pipeline cannot be retried"),r.destroyed)throw new Pc;this.abort=A,this.context=t}onHeaders(A,t,r){let{opaque:n,handler:i,context:s}=this;if(A<200){if(this.onInfo){let a=this.responseHeaders==="raw"?qA.parseRawHeaders(t):qA.parseHeaders(t);this.onInfo({statusCode:A,headers:a})}return}this.res=new XE(r);let o;try{this.handler=null;let a=this.responseHeaders==="raw"?qA.parseRawHeaders(t):qA.parseHeaders(t);o=this.runInAsyncScope(i,null,{statusCode:A,headers:a,opaque:n,body:this.res,context:s})}catch(a){throw this.res.on("error",qA.nop),a}if(!o||typeof o.on!="function")throw new wP("expected Readable");o.on("data",a=>{let{ret:c,body:g}=this;!c.push(a)&&g.pause&&g.pause()}).on("error",a=>{let{ret:c}=this;qA.destroy(c,a)}).on("end",()=>{let{ret:a}=this;a.push(null)}).on("close",()=>{let{ret:a}=this;a._readableState.ended||qA.destroy(a,new Pc)}),this.body=o}onData(A){let{res:t}=this;return t.push(A)}onComplete(A){let{res:t}=this;t.push(null)}onError(A){let{ret:t}=this;this.handler=null,qA.destroy(t,A)}};function SP(e,A){try{let t=new zE(e,A);return this.dispatch({...e,body:t.req},t),t.ret}catch(t){return new yP().destroy(t)}}Qy.exports=SP});var my=Q((jj,py)=>{"use strict";var{InvalidArgumentError:$E,RequestAbortedError:FP,SocketError:NP}=le(),{AsyncResource:xP}=require("async_hooks"),fy=W(),{addSignal:LP,removeSignal:Iy}=ui(),UP=require("assert"),eh=class extends xP{constructor(A,t){if(!A||typeof A!="object")throw new $E("invalid opts");if(typeof t!="function")throw new $E("invalid callback");let{signal:r,opaque:n,responseHeaders:i}=A;if(r&&typeof r.on!="function"&&typeof r.addEventListener!="function")throw new $E("signal must be an EventEmitter or EventTarget");super("UNDICI_UPGRADE"),this.responseHeaders=i||null,this.opaque=n||null,this.callback=t,this.abort=null,this.context=null,LP(this,r)}onConnect(A,t){if(!this.callback)throw new FP;this.abort=A,this.context=null}onHeaders(){throw new NP("bad upgrade",null)}onUpgrade(A,t,r){let{callback:n,opaque:i,context:s}=this;UP.strictEqual(A,101),Iy(this),this.callback=null;let o=this.responseHeaders==="raw"?fy.parseRawHeaders(t):fy.parseHeaders(t);this.runInAsyncScope(n,null,null,{headers:o,socket:r,opaque:i,context:s})}onError(A){let{callback:t,opaque:r}=this;Iy(this),t&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(t,null,A,{opaque:r})}))}};function By(e,A){if(A===void 0)return new Promise((t,r)=>{By.call(this,e,(n,i)=>n?r(n):t(i))});try{let t=new eh(e,A);this.dispatch({...e,method:e.method||"GET",upgrade:e.protocol||"Websocket"},t)}catch(t){if(typeof A!="function")throw t;let r=e&&e.opaque;queueMicrotask(()=>A(t,{opaque:r}))}}py.exports=By});var by=Q((Kj,Dy)=>{"use strict";var{AsyncResource:TP}=require("async_hooks"),{InvalidArgumentError:Ah,RequestAbortedError:MP,SocketError:vP}=le(),yy=W(),{addSignal:PP,removeSignal:wy}=ui(),th=class extends TP{constructor(A,t){if(!A||typeof A!="object")throw new Ah("invalid opts");if(typeof t!="function")throw new Ah("invalid callback");let{signal:r,opaque:n,responseHeaders:i}=A;if(r&&typeof r.on!="function"&&typeof r.addEventListener!="function")throw new Ah("signal must be an EventEmitter or EventTarget");super("UNDICI_CONNECT"),this.opaque=n||null,this.responseHeaders=i||null,this.callback=t,this.abort=null,PP(this,r)}onConnect(A,t){if(!this.callback)throw new MP;this.abort=A,this.context=t}onHeaders(){throw new vP("bad connect",null)}onUpgrade(A,t,r){let{callback:n,opaque:i,context:s}=this;wy(this),this.callback=null;let o=t;o!=null&&(o=this.responseHeaders==="raw"?yy.parseRawHeaders(t):yy.parseHeaders(t)),this.runInAsyncScope(n,null,null,{statusCode:A,headers:o,socket:r,opaque:i,context:s})}onError(A){let{callback:t,opaque:r}=this;wy(this),t&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(t,null,A,{opaque:r})}))}};function Ry(e,A){if(A===void 0)return new Promise((t,r)=>{Ry.call(this,e,(n,i)=>n?r(n):t(i))});try{let t=new th(e,A);this.dispatch({...e,method:"CONNECT"},t)}catch(t){if(typeof A!="function")throw t;let r=e&&e.opaque;queueMicrotask(()=>A(t,{opaque:r}))}}Dy.exports=Ry});var ky=Q((Zj,Qi)=>{"use strict";Qi.exports.request=gy();Qi.exports.stream=hy();Qi.exports.pipeline=Cy();Qi.exports.upgrade=my();Qi.exports.connect=by()});var nh=Q((Xj,Sy)=>{"use strict";var{UndiciError:GP}=le(),rh=class e extends GP{constructor(A){super(A),Error.captureStackTrace(this,e),this.name="MockNotMatchedError",this.message=A||"The request does not match any registered mock dispatches",this.code="UND_MOCK_ERR_MOCK_NOT_MATCHED"}};Sy.exports={MockNotMatchedError:rh}});var Ci=Q((zj,Fy)=>{"use strict";Fy.exports={kAgent:Symbol("agent"),kOptions:Symbol("options"),kFactory:Symbol("factory"),kDispatches:Symbol("dispatches"),kDispatchKey:Symbol("dispatch key"),kDefaultHeaders:Symbol("default headers"),kDefaultTrailers:Symbol("default trailers"),kContentLength:Symbol("content length"),kMockAgent:Symbol("mock agent"),kMockAgentSet:Symbol("mock agent set"),kMockAgentGet:Symbol("mock agent get"),kMockDispatch:Symbol("mock dispatch"),kClose:Symbol("close"),kOriginalClose:Symbol("original agent close"),kOrigin:Symbol("origin"),kIsMockActive:Symbol("is mock active"),kNetConnect:Symbol("net connect"),kGetNetConnect:Symbol("get net connect"),kConnected:Symbol("connected")}});var Xs=Q(($j,Vy)=>{"use strict";var{MockNotMatchedError:zr}=nh(),{kDispatches:Gc,kMockAgent:JP,kOriginalDispatch:YP,kOrigin:VP,kGetNetConnect:qP}=Ci(),{buildURL:OP,nop:HP}=W(),{STATUS_CODES:WP}=require("http"),{types:{isPromise:_P}}=require("util");function Xt(e,A){return typeof e=="string"?e===A:e instanceof RegExp?e.test(A):typeof e=="function"?e(A)===!0:!1}function xy(e){return Object.fromEntries(Object.entries(e).map(([A,t])=>[A.toLocaleLowerCase(),t]))}function Ly(e,A){if(Array.isArray(e)){for(let t=0;t"u")return!0;if(typeof A!="object"||typeof e.headers!="object")return!1;for(let[t,r]of Object.entries(e.headers)){let n=Ly(A,t);if(!Xt(r,n))return!1}return!0}function Ny(e){if(typeof e!="string")return e;let A=e.split("?");if(A.length!==2)return e;let t=new URLSearchParams(A.pop());return t.sort(),[...A,t.toString()].join("?")}function jP(e,{path:A,method:t,body:r,headers:n}){let i=Xt(e.path,A),s=Xt(e.method,t),o=typeof e.body<"u"?Xt(e.body,r):!0,a=Ty(e,n);return i&&s&&o&&a}function My(e){return Buffer.isBuffer(e)?e:typeof e=="object"?JSON.stringify(e):e.toString()}function vy(e,A){let t=A.query?OP(A.path,A.query):A.path,r=typeof t=="string"?Ny(t):t,n=e.filter(({consumed:i})=>!i).filter(({path:i})=>Xt(Ny(i),r));if(n.length===0)throw new zr(`Mock dispatch not matched for path '${r}'`);if(n=n.filter(({method:i})=>Xt(i,A.method)),n.length===0)throw new zr(`Mock dispatch not matched for method '${A.method}'`);if(n=n.filter(({body:i})=>typeof i<"u"?Xt(i,A.body):!0),n.length===0)throw new zr(`Mock dispatch not matched for body '${A.body}'`);if(n=n.filter(i=>Ty(i,A.headers)),n.length===0)throw new zr(`Mock dispatch not matched for headers '${typeof A.headers=="object"?JSON.stringify(A.headers):A.headers}'`);return n[0]}function KP(e,A,t){let r={timesInvoked:0,times:1,persist:!1,consumed:!1},n=typeof t=="function"?{callback:t}:{...t},i={...r,...A,pending:!0,data:{error:null,...n}};return e.push(i),i}function ih(e,A){let t=e.findIndex(r=>r.consumed?jP(r,A):!1);t!==-1&&e.splice(t,1)}function Py(e){let{path:A,method:t,body:r,headers:n,query:i}=e;return{path:A,method:t,body:r,headers:n,query:i}}function sh(e){return Object.entries(e).reduce((A,[t,r])=>[...A,Buffer.from(`${t}`),Array.isArray(r)?r.map(n=>Buffer.from(`${n}`)):Buffer.from(`${r}`)],[])}function Gy(e){return WP[e]||"unknown"}async function ZP(e){let A=[];for await(let t of e)A.push(t);return Buffer.concat(A).toString("utf8")}function Jy(e,A){let t=Py(e),r=vy(this[Gc],t);r.timesInvoked++,r.data.callback&&(r.data={...r.data,...r.data.callback(e)});let{data:{statusCode:n,data:i,headers:s,trailers:o,error:a},delay:c,persist:g}=r,{timesInvoked:l,times:u}=r;if(r.consumed=!g&&l>=u,r.pending=l0?setTimeout(()=>{E(this[Gc])},c):E(this[Gc]);function E(d,C=i){let I=Array.isArray(e.headers)?Uy(e.headers):e.headers,p=typeof C=="function"?C({...e,headers:I}):C;if(_P(p)){p.then(H=>E(d,H));return}let w=My(p),m=sh(s),K=sh(o);A.abort=HP,A.onHeaders(n,m,h,Gy(n)),A.onData(Buffer.from(w)),A.onComplete(K),ih(d,t)}function h(){}return!0}function XP(){let e=this[JP],A=this[VP],t=this[YP];return function(n,i){if(e.isMockActive)try{Jy.call(this,n,i)}catch(s){if(s instanceof zr){let o=e[qP]();if(o===!1)throw new zr(`${s.message}: subsequent request to origin ${A} was not allowed (net.connect disabled)`);if(Yy(o,A))t.call(this,n,i);else throw new zr(`${s.message}: subsequent request to origin ${A} was not allowed (net.connect is not enabled for this origin)`)}else throw s}else t.call(this,n,i)}}function Yy(e,A){let t=new URL(A);return e===!0?!0:!!(Array.isArray(e)&&e.some(r=>Xt(r,t.host)))}function zP(e){if(e){let{agent:A,...t}=e;return t}}Vy.exports={getResponseData:My,getMockDispatch:vy,addMockDispatch:KP,deleteMockDispatch:ih,buildKey:Py,generateKeyValues:sh,matchValue:Xt,getResponse:ZP,getStatusText:Gy,mockDispatch:Jy,buildMockDispatch:XP,checkNetConnect:Yy,buildMockOptions:zP,getHeaderByName:Ly}});var Eh=Q((e8,uh)=>{"use strict";var{getResponseData:$P,buildKey:e2,addMockDispatch:oh}=Xs(),{kDispatches:Jc,kDispatchKey:Yc,kDefaultHeaders:ah,kDefaultTrailers:ch,kContentLength:gh,kMockDispatch:Vc}=Ci(),{InvalidArgumentError:tt}=le(),{buildURL:A2}=W(),fi=class{constructor(A){this[Vc]=A}delay(A){if(typeof A!="number"||!Number.isInteger(A)||A<=0)throw new tt("waitInMs must be a valid integer > 0");return this[Vc].delay=A,this}persist(){return this[Vc].persist=!0,this}times(A){if(typeof A!="number"||!Number.isInteger(A)||A<=0)throw new tt("repeatTimes must be a valid integer > 0");return this[Vc].times=A,this}},lh=class{constructor(A,t){if(typeof A!="object")throw new tt("opts must be an object");if(typeof A.path>"u")throw new tt("opts.path must be defined");if(typeof A.method>"u"&&(A.method="GET"),typeof A.path=="string")if(A.query)A.path=A2(A.path,A.query);else{let r=new URL(A.path,"data://");A.path=r.pathname+r.search}typeof A.method=="string"&&(A.method=A.method.toUpperCase()),this[Yc]=e2(A),this[Jc]=t,this[ah]={},this[ch]={},this[gh]=!1}createMockScopeDispatchData(A,t,r={}){let n=$P(t),i=this[gh]?{"content-length":n.length}:{},s={...this[ah],...i,...r.headers},o={...this[ch],...r.trailers};return{statusCode:A,data:t,headers:s,trailers:o}}validateReplyParameters(A,t,r){if(typeof A>"u")throw new tt("statusCode must be defined");if(typeof t>"u")throw new tt("data must be defined");if(typeof r!="object")throw new tt("responseOptions must be an object")}reply(A){if(typeof A=="function"){let o=c=>{let g=A(c);if(typeof g!="object")throw new tt("reply options callback must return an object");let{statusCode:l,data:u="",responseOptions:E={}}=g;return this.validateReplyParameters(l,u,E),{...this.createMockScopeDispatchData(l,u,E)}},a=oh(this[Jc],this[Yc],o);return new fi(a)}let[t,r="",n={}]=[...arguments];this.validateReplyParameters(t,r,n);let i=this.createMockScopeDispatchData(t,r,n),s=oh(this[Jc],this[Yc],i);return new fi(s)}replyWithError(A){if(typeof A>"u")throw new tt("error must be defined");let t=oh(this[Jc],this[Yc],{error:A});return new fi(t)}defaultReplyHeaders(A){if(typeof A>"u")throw new tt("headers must be defined");return this[ah]=A,this}defaultReplyTrailers(A){if(typeof A>"u")throw new tt("trailers must be defined");return this[ch]=A,this}replyContentLength(){return this[gh]=!0,this}};uh.exports.MockInterceptor=lh;uh.exports.MockScope=fi});var Qh=Q((A8,Ky)=>{"use strict";var{promisify:t2}=require("util"),r2=Hs(),{buildMockDispatch:n2}=Xs(),{kDispatches:qy,kMockAgent:Oy,kClose:Hy,kOriginalClose:Wy,kOrigin:_y,kOriginalDispatch:i2,kConnected:hh}=Ci(),{MockInterceptor:s2}=Eh(),jy=de(),{InvalidArgumentError:o2}=le(),dh=class extends r2{constructor(A,t){if(super(A,t),!t||!t.agent||typeof t.agent.dispatch!="function")throw new o2("Argument opts.agent must implement Agent");this[Oy]=t.agent,this[_y]=A,this[qy]=[],this[hh]=1,this[i2]=this.dispatch,this[Wy]=this.close.bind(this),this.dispatch=n2.call(this),this.close=this[Hy]}get[jy.kConnected](){return this[hh]}intercept(A){return new s2(A,this[qy])}async[Hy](){await t2(this[Wy])(),this[hh]=0,this[Oy][jy.kClients].delete(this[_y])}};Ky.exports=dh});var Ih=Q((t8,tw)=>{"use strict";var{promisify:a2}=require("util"),c2=gi(),{buildMockDispatch:g2}=Xs(),{kDispatches:Zy,kMockAgent:Xy,kClose:zy,kOriginalClose:$y,kOrigin:ew,kOriginalDispatch:l2,kConnected:Ch}=Ci(),{MockInterceptor:u2}=Eh(),Aw=de(),{InvalidArgumentError:E2}=le(),fh=class extends c2{constructor(A,t){if(super(A,t),!t||!t.agent||typeof t.agent.dispatch!="function")throw new E2("Argument opts.agent must implement Agent");this[Xy]=t.agent,this[ew]=A,this[Zy]=[],this[Ch]=1,this[l2]=this.dispatch,this[$y]=this.close.bind(this),this.dispatch=g2.call(this),this.close=this[zy]}get[Aw.kConnected](){return this[Ch]}intercept(A){return new u2(A,this[Zy])}async[zy](){await a2(this[$y])(),this[Ch]=0,this[Xy][Aw.kClients].delete(this[ew])}};tw.exports=fh});var nw=Q((n8,rw)=>{"use strict";var h2={pronoun:"it",is:"is",was:"was",this:"this"},d2={pronoun:"they",is:"are",was:"were",this:"these"};rw.exports=class{constructor(A,t){this.singular=A,this.plural=t}pluralize(A){let t=A===1,r=t?h2:d2,n=t?this.singular:this.plural;return{...r,count:A,noun:n}}}});var sw=Q((s8,iw)=>{"use strict";var{Transform:Q2}=require("stream"),{Console:C2}=require("console");iw.exports=class{constructor({disableColors:A}={}){this.transform=new Q2({transform(t,r,n){n(null,t)}}),this.logger=new C2({stdout:this.transform,inspectOptions:{colors:!A&&!process.env.CI}})}format(A){let t=A.map(({method:r,path:n,data:{statusCode:i},persist:s,times:o,timesInvoked:a,origin:c})=>({Method:r,Origin:c,Path:n,"Status code":i,Persistent:s?"\u2705":"\u274C",Invocations:a,Remaining:s?1/0:o-a}));return this.logger.table(t),this.transform.read().toString()}}});var gw=Q((o8,cw)=>{"use strict";var{kClients:$r}=de(),f2=Ks(),{kAgent:Bh,kMockAgentSet:qc,kMockAgentGet:ow,kDispatches:ph,kIsMockActive:Oc,kNetConnect:en,kGetNetConnect:I2,kOptions:Hc,kFactory:Wc}=Ci(),B2=Qh(),p2=Ih(),{matchValue:m2,buildMockOptions:y2}=Xs(),{InvalidArgumentError:aw,UndiciError:w2}=le(),R2=uc(),D2=nw(),b2=sw(),mh=class{constructor(A){this.value=A}deref(){return this.value}},yh=class extends R2{constructor(A){if(super(A),this[en]=!0,this[Oc]=!0,A&&A.agent&&typeof A.agent.dispatch!="function")throw new aw("Argument opts.agent must implement Agent");let t=A&&A.agent?A.agent:new f2(A);this[Bh]=t,this[$r]=t[$r],this[Hc]=y2(A)}get(A){let t=this[ow](A);return t||(t=this[Wc](A),this[qc](A,t)),t}dispatch(A,t){return this.get(A.origin),this[Bh].dispatch(A,t)}async close(){await this[Bh].close(),this[$r].clear()}deactivate(){this[Oc]=!1}activate(){this[Oc]=!0}enableNetConnect(A){if(typeof A=="string"||typeof A=="function"||A instanceof RegExp)Array.isArray(this[en])?this[en].push(A):this[en]=[A];else if(typeof A>"u")this[en]=!0;else throw new aw("Unsupported matcher. Must be one of String|Function|RegExp.")}disableNetConnect(){this[en]=!1}get isMockActive(){return this[Oc]}[qc](A,t){this[$r].set(A,new mh(t))}[Wc](A){let t=Object.assign({agent:this},this[Hc]);return this[Hc]&&this[Hc].connections===1?new B2(A,t):new p2(A,t)}[ow](A){let t=this[$r].get(A);if(t)return t.deref();if(typeof A!="string"){let r=this[Wc]("http://localhost:9999");return this[qc](A,r),r}for(let[r,n]of Array.from(this[$r])){let i=n.deref();if(i&&typeof r!="string"&&m2(r,A)){let s=this[Wc](A);return this[qc](A,s),s[ph]=i[ph],s}}}[I2](){return this[en]}pendingInterceptors(){let A=this[$r];return Array.from(A.entries()).flatMap(([t,r])=>r.deref()[ph].map(n=>({...n,origin:t}))).filter(({pending:t})=>t)}assertNoPendingInterceptors({pendingInterceptorsFormatter:A=new b2}={}){let t=this.pendingInterceptors();if(t.length===0)return;let r=new D2("interceptor","interceptors").pluralize(t.length);throw new w2(` +${r.count} ${r.noun} ${r.is} pending: + +${A.format(t)} +`.trim())}};cw.exports=yh});var Qw=Q((a8,dw)=>{"use strict";var{kProxy:k2,kClose:S2,kDestroy:F2,kInterceptors:N2}=de(),{URL:lw}=require("url"),uw=Ks(),x2=gi(),L2=Ms(),{InvalidArgumentError:eo,RequestAbortedError:U2}=le(),Ew=vs(),zs=Symbol("proxy agent"),_c=Symbol("proxy client"),$s=Symbol("proxy headers"),wh=Symbol("request tls settings"),T2=Symbol("proxy tls settings"),hw=Symbol("connect endpoint function");function M2(e){return e==="https:"?443:80}function v2(e){if(typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new eo("Proxy opts.uri is mandatory");return{uri:e.uri,protocol:e.protocol||"https"}}function P2(e,A){return new x2(e,A)}var Rh=class extends L2{constructor(A){if(super(A),this[k2]=v2(A),this[zs]=new uw(A),this[N2]=A.interceptors&&A.interceptors.ProxyAgent&&Array.isArray(A.interceptors.ProxyAgent)?A.interceptors.ProxyAgent:[],typeof A=="string"&&(A={uri:A}),!A||!A.uri)throw new eo("Proxy opts.uri is mandatory");let{clientFactory:t=P2}=A;if(typeof t!="function")throw new eo("Proxy opts.clientFactory must be a function.");this[wh]=A.requestTls,this[T2]=A.proxyTls,this[$s]=A.headers||{};let r=new lw(A.uri),{origin:n,port:i,host:s,username:o,password:a}=r;if(A.auth&&A.token)throw new eo("opts.auth cannot be used in combination with opts.token");A.auth?this[$s]["proxy-authorization"]=`Basic ${A.auth}`:A.token?this[$s]["proxy-authorization"]=A.token:o&&a&&(this[$s]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(o)}:${decodeURIComponent(a)}`).toString("base64")}`);let c=Ew({...A.proxyTls});this[hw]=Ew({...A.requestTls}),this[_c]=t(r,{connect:c}),this[zs]=new uw({...A,connect:async(g,l)=>{let u=g.host;g.port||(u+=`:${M2(g.protocol)}`);try{let{socket:E,statusCode:h}=await this[_c].connect({origin:n,port:i,path:u,signal:g.signal,headers:{...this[$s],host:s}});if(h!==200&&(E.on("error",()=>{}).destroy(),l(new U2(`Proxy response (${h}) !== 200 when HTTP Tunneling`))),g.protocol!=="https:"){l(null,E);return}let d;this[wh]?d=this[wh].servername:d=g.servername,this[hw]({...g,servername:d,httpSocket:E},l)}catch(E){l(E)}}})}dispatch(A,t){let{host:r}=new lw(A.origin),n=G2(A.headers);return J2(n),this[zs].dispatch({...A,headers:{...n,host:r}},t)}async[S2](){await this[zs].close(),await this[_c].close()}async[F2](){await this[zs].destroy(),await this[_c].destroy()}};function G2(e){if(Array.isArray(e)){let A={};for(let t=0;tt.toLowerCase()==="proxy-authorization"))throw new eo("Proxy-Authorization should be sent in ProxyAgent constructor")}dw.exports=Rh});var pw=Q((c8,Bw)=>{"use strict";var An=require("assert"),{kRetryHandlerDefaultRetry:Cw}=de(),{RequestRetryError:jc}=le(),{isDisturbed:fw,parseHeaders:Y2,parseRangeHeader:Iw}=W();function V2(e){let A=Date.now();return new Date(e).getTime()-A}var Dh=class e{constructor(A,t){let{retryOptions:r,...n}=A,{retry:i,maxRetries:s,maxTimeout:o,minTimeout:a,timeoutFactor:c,methods:g,errorCodes:l,retryAfter:u,statusCodes:E}=r??{};this.dispatch=t.dispatch,this.handler=t.handler,this.opts=n,this.abort=null,this.aborted=!1,this.retryOpts={retry:i??e[Cw],retryAfter:u??!0,maxTimeout:o??30*1e3,timeout:a??500,timeoutFactor:c??2,maxRetries:s??5,methods:g??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:E??[500,502,503,504,429],errorCodes:l??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE"]},this.retryCount=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect(h=>{this.aborted=!0,this.abort?this.abort(h):this.reason=h})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(A,t,r){this.handler.onUpgrade&&this.handler.onUpgrade(A,t,r)}onConnect(A){this.aborted?A(this.reason):this.abort=A}onBodySent(A){if(this.handler.onBodySent)return this.handler.onBodySent(A)}static[Cw](A,{state:t,opts:r},n){let{statusCode:i,code:s,headers:o}=A,{method:a,retryOptions:c}=r,{maxRetries:g,timeout:l,maxTimeout:u,timeoutFactor:E,statusCodes:h,errorCodes:d,methods:C}=c,{counter:I,currentTimeout:p}=t;if(p=p!=null&&p>0?p:l,s&&s!=="UND_ERR_REQ_RETRY"&&s!=="UND_ERR_SOCKET"&&!d.includes(s)){n(A);return}if(Array.isArray(C)&&!C.includes(a)){n(A);return}if(i!=null&&Array.isArray(h)&&!h.includes(i)){n(A);return}if(I>g){n(A);return}let w=o!=null&&o["retry-after"];w&&(w=Number(w),w=isNaN(w)?V2(w):w*1e3);let m=w>0?Math.min(w,u):Math.min(p*E**I,u);t.currentTimeout=m,setTimeout(()=>n(null),m)}onHeaders(A,t,r,n){let i=Y2(t);if(this.retryCount+=1,A>=300)return this.abort(new jc("Request failed",A,{headers:i,count:this.retryCount})),!1;if(this.resume!=null){if(this.resume=null,A!==206)return!0;let o=Iw(i["content-range"]);if(!o)return this.abort(new jc("Content-Range mismatch",A,{headers:i,count:this.retryCount})),!1;if(this.etag!=null&&this.etag!==i.etag)return this.abort(new jc("ETag mismatch",A,{headers:i,count:this.retryCount})),!1;let{start:a,size:c,end:g=c}=o;return An(this.start===a,"content-range mismatch"),An(this.end==null||this.end===g,"content-range mismatch"),this.resume=r,!0}if(this.end==null){if(A===206){let o=Iw(i["content-range"]);if(o==null)return this.handler.onHeaders(A,t,r,n);let{start:a,size:c,end:g=c}=o;An(a!=null&&Number.isFinite(a)&&this.start!==a,"content-range mismatch"),An(Number.isFinite(a)),An(g!=null&&Number.isFinite(g)&&this.end!==g,"invalid content-length"),this.start=a,this.end=g}if(this.end==null){let o=i["content-length"];this.end=o!=null?Number(o):null}return An(Number.isFinite(this.start)),An(this.end==null||Number.isFinite(this.end),"invalid content-length"),this.resume=r,this.etag=i.etag!=null?i.etag:null,this.handler.onHeaders(A,t,r,n)}let s=new jc("Request failed",A,{headers:i,count:this.retryCount});return this.abort(s),!1}onData(A){return this.start+=A.length,this.handler.onData(A)}onComplete(A){return this.retryCount=0,this.handler.onComplete(A)}onError(A){if(this.aborted||fw(this.opts.body))return this.handler.onError(A);this.retryOpts.retry(A,{state:{counter:this.retryCount++,currentTimeout:this.retryAfter},opts:{retryOptions:this.retryOpts,...this.opts}},t.bind(this));function t(r){if(r!=null||this.aborted||fw(this.opts.body))return this.handler.onError(r);this.start!==0&&(this.opts={...this.opts,headers:{...this.opts.headers,range:`bytes=${this.start}-${this.end??""}`}});try{this.dispatch(this.opts,this)}catch(n){this.handler.onError(n)}}}};Bw.exports=Dh});var Ii=Q((g8,Rw)=>{"use strict";var mw=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:q2}=le(),O2=Ks();ww()===void 0&&yw(new O2);function yw(e){if(!e||typeof e.dispatch!="function")throw new q2("Argument agent must implement Agent");Object.defineProperty(globalThis,mw,{value:e,writable:!0,enumerable:!1,configurable:!1})}function ww(){return globalThis[mw]}Rw.exports={setGlobalDispatcher:yw,getGlobalDispatcher:ww}});var bw=Q((u8,Dw)=>{"use strict";Dw.exports=class{constructor(A){this.handler=A}onConnect(...A){return this.handler.onConnect(...A)}onError(...A){return this.handler.onError(...A)}onUpgrade(...A){return this.handler.onUpgrade(...A)}onHeaders(...A){return this.handler.onHeaders(...A)}onData(...A){return this.handler.onData(...A)}onComplete(...A){return this.handler.onComplete(...A)}onBodySent(...A){return this.handler.onBodySent(...A)}}});var tn=Q((E8,xw)=>{"use strict";var{kHeadersList:IA,kConstruct:H2}=de(),{kGuard:kt}=qt(),{kEnumerableProperty:bt}=W(),{makeIterator:Bi,isValidHeaderName:Ao,isValidHeaderValue:Sw}=YA(),{webidl:V}=iA(),W2=require("assert"),fA=Symbol("headers map"),Xe=Symbol("headers map sorted");function kw(e){return e===10||e===13||e===9||e===32}function Fw(e){let A=0,t=e.length;for(;t>A&&kw(e.charCodeAt(t-1));)--t;for(;t>A&&kw(e.charCodeAt(A));)++A;return A===0&&t===e.length?e:e.substring(A,t)}function Nw(e,A){if(Array.isArray(A))for(let t=0;t>","record"]})}function bh(e,A,t){if(t=Fw(t),Ao(A)){if(!Sw(t))throw V.errors.invalidArgument({prefix:"Headers.append",value:t,type:"header value"})}else throw V.errors.invalidArgument({prefix:"Headers.append",value:A,type:"header name"});if(e[kt]==="immutable")throw new TypeError("immutable");return e[kt],e[IA].append(A,t)}var Kc=class e{constructor(A){Dd(this,"cookies",null);A instanceof e?(this[fA]=new Map(A[fA]),this[Xe]=A[Xe],this.cookies=A.cookies===null?null:[...A.cookies]):(this[fA]=new Map(A),this[Xe]=null)}contains(A){return A=A.toLowerCase(),this[fA].has(A)}clear(){this[fA].clear(),this[Xe]=null,this.cookies=null}append(A,t){this[Xe]=null;let r=A.toLowerCase(),n=this[fA].get(r);if(n){let i=r==="cookie"?"; ":", ";this[fA].set(r,{name:n.name,value:`${n.value}${i}${t}`})}else this[fA].set(r,{name:A,value:t});r==="set-cookie"&&(this.cookies??=[],this.cookies.push(t))}set(A,t){this[Xe]=null;let r=A.toLowerCase();r==="set-cookie"&&(this.cookies=[t]),this[fA].set(r,{name:A,value:t})}delete(A){this[Xe]=null,A=A.toLowerCase(),A==="set-cookie"&&(this.cookies=null),this[fA].delete(A)}get(A){let t=this[fA].get(A.toLowerCase());return t===void 0?null:t.value}*[Symbol.iterator](){for(let[A,{value:t}]of this[fA])yield[A,t]}get entries(){let A={};if(this[fA].size)for(let{name:t,value:r}of this[fA].values())A[t]=r;return A}},pi=class e{constructor(A=void 0){A!==H2&&(this[IA]=new Kc,this[kt]="none",A!==void 0&&(A=V.converters.HeadersInit(A),Nw(this,A)))}append(A,t){return V.brandCheck(this,e),V.argumentLengthCheck(arguments,2,{header:"Headers.append"}),A=V.converters.ByteString(A),t=V.converters.ByteString(t),bh(this,A,t)}delete(A){if(V.brandCheck(this,e),V.argumentLengthCheck(arguments,1,{header:"Headers.delete"}),A=V.converters.ByteString(A),!Ao(A))throw V.errors.invalidArgument({prefix:"Headers.delete",value:A,type:"header name"});if(this[kt]==="immutable")throw new TypeError("immutable");this[kt],this[IA].contains(A)&&this[IA].delete(A)}get(A){if(V.brandCheck(this,e),V.argumentLengthCheck(arguments,1,{header:"Headers.get"}),A=V.converters.ByteString(A),!Ao(A))throw V.errors.invalidArgument({prefix:"Headers.get",value:A,type:"header name"});return this[IA].get(A)}has(A){if(V.brandCheck(this,e),V.argumentLengthCheck(arguments,1,{header:"Headers.has"}),A=V.converters.ByteString(A),!Ao(A))throw V.errors.invalidArgument({prefix:"Headers.has",value:A,type:"header name"});return this[IA].contains(A)}set(A,t){if(V.brandCheck(this,e),V.argumentLengthCheck(arguments,2,{header:"Headers.set"}),A=V.converters.ByteString(A),t=V.converters.ByteString(t),t=Fw(t),Ao(A)){if(!Sw(t))throw V.errors.invalidArgument({prefix:"Headers.set",value:t,type:"header value"})}else throw V.errors.invalidArgument({prefix:"Headers.set",value:A,type:"header name"});if(this[kt]==="immutable")throw new TypeError("immutable");this[kt],this[IA].set(A,t)}getSetCookie(){V.brandCheck(this,e);let A=this[IA].cookies;return A?[...A]:[]}get[Xe](){if(this[IA][Xe])return this[IA][Xe];let A=[],t=[...this[IA]].sort((n,i)=>n[0]A,"Headers","key")}return Bi(()=>[...this[Xe].values()],"Headers","key")}values(){if(V.brandCheck(this,e),this[kt]==="immutable"){let A=this[Xe];return Bi(()=>A,"Headers","value")}return Bi(()=>[...this[Xe].values()],"Headers","value")}entries(){if(V.brandCheck(this,e),this[kt]==="immutable"){let A=this[Xe];return Bi(()=>A,"Headers","key+value")}return Bi(()=>[...this[Xe].values()],"Headers","key+value")}forEach(A,t=globalThis){if(V.brandCheck(this,e),V.argumentLengthCheck(arguments,1,{header:"Headers.forEach"}),typeof A!="function")throw new TypeError("Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'.");for(let[r,n]of this)A.apply(t,[n,r,this])}[Symbol.for("nodejs.util.inspect.custom")](){return V.brandCheck(this,e),this[IA]}};pi.prototype[Symbol.iterator]=pi.prototype.entries;Object.defineProperties(pi.prototype,{append:bt,delete:bt,get:bt,has:bt,set:bt,getSetCookie:bt,keys:bt,values:bt,entries:bt,forEach:bt,[Symbol.iterator]:{enumerable:!1},[Symbol.toStringTag]:{value:"Headers",configurable:!0}});V.converters.HeadersInit=function(e){if(V.util.Type(e)==="Object")return e[Symbol.iterator]?V.converters["sequence>"](e):V.converters["record"](e);throw V.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence>","record"]})};xw.exports={fill:Nw,Headers:pi,HeadersList:Kc}});var $c=Q((d8,Jw)=>{"use strict";var{Headers:_2,HeadersList:Lw,fill:j2}=tn(),{extractBody:Uw,cloneBody:K2,mixinBody:Z2}=Ls(),Fh=W(),{kEnumerableProperty:xA}=Fh,{isValidReasonPhrase:X2,isCancelled:z2,isAborted:$2,isBlobLike:e1,serializeJavascriptValueToJSONString:A1,isErrorLike:t1,isomorphicEncode:r1}=YA(),{redirectStatusSet:n1,nullBodyStatus:i1,DOMException:Tw}=mr(),{kState:Re,kHeaders:We,kGuard:mi,kRealm:NA}=qt(),{webidl:J}=iA(),{FormData:s1}=cc(),{getGlobalOrigin:o1}=Xn(),{URLSerializer:Mw}=$A(),{kHeadersList:kh,kConstruct:a1}=de(),Nh=require("assert"),{types:Sh}=require("util"),Pw=globalThis.ReadableStream||require("stream/web").ReadableStream,c1=new TextEncoder("utf-8"),yi=class e{static error(){let A={settingsObject:{}},t=new e;return t[Re]=Xc(),t[NA]=A,t[We][kh]=t[Re].headersList,t[We][mi]="immutable",t[We][NA]=A,t}static json(A,t={}){J.argumentLengthCheck(arguments,1,{header:"Response.json"}),t!==null&&(t=J.converters.ResponseInit(t));let r=c1.encode(A1(A)),n=Uw(r),i={settingsObject:{}},s=new e;return s[NA]=i,s[We][mi]="response",s[We][NA]=i,vw(s,t,{body:n[0],type:"application/json"}),s}static redirect(A,t=302){let r={settingsObject:{}};J.argumentLengthCheck(arguments,1,{header:"Response.redirect"}),A=J.converters.USVString(A),t=J.converters["unsigned short"](t);let n;try{n=new URL(A,o1())}catch(o){throw Object.assign(new TypeError("Failed to parse URL from "+A),{cause:o})}if(!n1.has(t))throw new RangeError("Invalid status code "+t);let i=new e;i[NA]=r,i[We][mi]="immutable",i[We][NA]=r,i[Re].status=t;let s=r1(Mw(n));return i[Re].headersList.append("location",s),i}constructor(A=null,t={}){A!==null&&(A=J.converters.BodyInit(A)),t=J.converters.ResponseInit(t),this[NA]={settingsObject:{}},this[Re]=zc({}),this[We]=new _2(a1),this[We][mi]="response",this[We][kh]=this[Re].headersList,this[We][NA]=this[NA];let r=null;if(A!=null){let[n,i]=Uw(A);r={body:n,type:i}}vw(this,t,r)}get type(){return J.brandCheck(this,e),this[Re].type}get url(){J.brandCheck(this,e);let A=this[Re].urlList,t=A[A.length-1]??null;return t===null?"":Mw(t,!0)}get redirected(){return J.brandCheck(this,e),this[Re].urlList.length>1}get status(){return J.brandCheck(this,e),this[Re].status}get ok(){return J.brandCheck(this,e),this[Re].status>=200&&this[Re].status<=299}get statusText(){return J.brandCheck(this,e),this[Re].statusText}get headers(){return J.brandCheck(this,e),this[We]}get body(){return J.brandCheck(this,e),this[Re].body?this[Re].body.stream:null}get bodyUsed(){return J.brandCheck(this,e),!!this[Re].body&&Fh.isDisturbed(this[Re].body.stream)}clone(){if(J.brandCheck(this,e),this.bodyUsed||this.body&&this.body.locked)throw J.errors.exception({header:"Response.clone",message:"Body has already been consumed."});let A=xh(this[Re]),t=new e;return t[Re]=A,t[NA]=this[NA],t[We][kh]=A.headersList,t[We][mi]=this[We][mi],t[We][NA]=this[We][NA],t}};Z2(yi);Object.defineProperties(yi.prototype,{type:xA,url:xA,status:xA,ok:xA,redirected:xA,statusText:xA,headers:xA,clone:xA,body:xA,bodyUsed:xA,[Symbol.toStringTag]:{value:"Response",configurable:!0}});Object.defineProperties(yi,{json:xA,redirect:xA,error:xA});function xh(e){if(e.internalResponse)return Gw(xh(e.internalResponse),e.type);let A=zc({...e,body:null});return e.body!=null&&(A.body=K2(e.body)),A}function zc(e){return{aborted:!1,rangeRequested:!1,timingAllowPassed:!1,requestIncludesCredentials:!1,type:"default",status:200,timingInfo:null,cacheState:"",statusText:"",...e,headersList:e.headersList?new Lw(e.headersList):new Lw,urlList:e.urlList?[...e.urlList]:[]}}function Xc(e){let A=t1(e);return zc({type:"error",status:0,error:A?e:new Error(e&&String(e)),aborted:e&&e.name==="AbortError"})}function Zc(e,A){return A={internalResponse:e,...A},new Proxy(e,{get(t,r){return r in A?A[r]:t[r]},set(t,r,n){return Nh(!(r in A)),t[r]=n,!0}})}function Gw(e,A){if(A==="basic")return Zc(e,{type:"basic",headersList:e.headersList});if(A==="cors")return Zc(e,{type:"cors",headersList:e.headersList});if(A==="opaque")return Zc(e,{type:"opaque",urlList:Object.freeze([]),status:0,statusText:"",body:null});if(A==="opaqueredirect")return Zc(e,{type:"opaqueredirect",status:0,statusText:"",headersList:[],body:null});Nh(!1)}function g1(e,A=null){return Nh(z2(e)),$2(e)?Xc(Object.assign(new Tw("The operation was aborted.","AbortError"),{cause:A})):Xc(Object.assign(new Tw("Request was cancelled."),{cause:A}))}function vw(e,A,t){if(A.status!==null&&(A.status<200||A.status>599))throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.');if("statusText"in A&&A.statusText!=null&&!X2(String(A.statusText)))throw new TypeError("Invalid statusText");if("status"in A&&A.status!=null&&(e[Re].status=A.status),"statusText"in A&&A.statusText!=null&&(e[Re].statusText=A.statusText),"headers"in A&&A.headers!=null&&j2(e[We],A.headers),t){if(i1.includes(e.status))throw J.errors.exception({header:"Response constructor",message:"Invalid response status code "+e.status});e[Re].body=t.body,t.type!=null&&!e[Re].headersList.contains("Content-Type")&&e[Re].headersList.append("content-type",t.type)}}J.converters.ReadableStream=J.interfaceConverter(Pw);J.converters.FormData=J.interfaceConverter(s1);J.converters.URLSearchParams=J.interfaceConverter(URLSearchParams);J.converters.XMLHttpRequestBodyInit=function(e){return typeof e=="string"?J.converters.USVString(e):e1(e)?J.converters.Blob(e,{strict:!1}):Sh.isArrayBuffer(e)||Sh.isTypedArray(e)||Sh.isDataView(e)?J.converters.BufferSource(e):Fh.isFormDataLike(e)?J.converters.FormData(e,{strict:!1}):e instanceof URLSearchParams?J.converters.URLSearchParams(e):J.converters.DOMString(e)};J.converters.BodyInit=function(e){return e instanceof Pw?J.converters.ReadableStream(e):e?.[Symbol.asyncIterator]?e:J.converters.XMLHttpRequestBodyInit(e)};J.converters.ResponseInit=J.dictionaryConverter([{key:"status",converter:J.converters["unsigned short"],defaultValue:200},{key:"statusText",converter:J.converters.ByteString,defaultValue:""},{key:"headers",converter:J.converters.HeadersInit}]);Jw.exports={makeNetworkError:Xc,makeResponse:zc,makeAppropriateNetworkError:g1,filterResponse:Gw,Response:yi,cloneResponse:xh}});var no=Q((Q8,Ww)=>{"use strict";var{extractBody:l1,mixinBody:u1,cloneBody:E1}=Ls(),{Headers:Yw,fill:h1,HeadersList:rg}=tn(),{FinalizationRegistry:d1}=VE()(),ro=W(),{isValidHTTPToken:Q1,sameOrigin:Vw,normalizeMethod:C1,makePolicyContainer:f1,normalizeMethodRecord:I1}=YA(),{forbiddenMethodsSet:B1,corsSafeListedMethodsSet:p1,referrerPolicy:m1,requestRedirect:y1,requestMode:w1,requestCredentials:R1,requestCache:D1,requestDuplex:b1}=mr(),{kEnumerableProperty:Me}=ro,{kHeaders:AA,kSignal:to,kState:pe,kGuard:eg,kRealm:LA}=qt(),{webidl:U}=iA(),{getGlobalOrigin:k1}=Xn(),{URLSerializer:S1}=$A(),{kHeadersList:Ag,kConstruct:tg}=de(),F1=require("assert"),{getMaxListeners:qw,setMaxListeners:Ow,getEventListeners:N1,defaultMaxListeners:Hw}=require("events"),Lh=globalThis.TransformStream,x1=Symbol("abortController"),L1=new d1(({signal:e,abort:A})=>{e.removeEventListener("abort",A)}),rn=class e{constructor(A,t={}){if(A===tg)return;U.argumentLengthCheck(arguments,1,{header:"Request constructor"}),A=U.converters.RequestInfo(A),t=U.converters.RequestInit(t),this[LA]={settingsObject:{baseUrl:k1(),get origin(){return this.baseUrl?.origin},policyContainer:f1()}};let r=null,n=null,i=this[LA].settingsObject.baseUrl,s=null;if(typeof A=="string"){let C;try{C=new URL(A,i)}catch(I){throw new TypeError("Failed to parse URL from "+A,{cause:I})}if(C.username||C.password)throw new TypeError("Request cannot be constructed from a URL that includes credentials: "+A);r=ng({urlList:[C]}),n="cors"}else F1(A instanceof e),r=A[pe],s=A[to];let o=this[LA].settingsObject.origin,a="client";if(r.window?.constructor?.name==="EnvironmentSettingsObject"&&Vw(r.window,o)&&(a=r.window),t.window!=null)throw new TypeError(`'window' option '${a}' must be null`);"window"in t&&(a="no-window"),r=ng({method:r.method,headersList:r.headersList,unsafeRequest:r.unsafeRequest,client:this[LA].settingsObject,window:a,priority:r.priority,origin:r.origin,referrer:r.referrer,referrerPolicy:r.referrerPolicy,mode:r.mode,credentials:r.credentials,cache:r.cache,redirect:r.redirect,integrity:r.integrity,keepalive:r.keepalive,reloadNavigation:r.reloadNavigation,historyNavigation:r.historyNavigation,urlList:[...r.urlList]});let c=Object.keys(t).length!==0;if(c&&(r.mode==="navigate"&&(r.mode="same-origin"),r.reloadNavigation=!1,r.historyNavigation=!1,r.origin="client",r.referrer="client",r.referrerPolicy="",r.url=r.urlList[r.urlList.length-1],r.urlList=[r.url]),t.referrer!==void 0){let C=t.referrer;if(C==="")r.referrer="no-referrer";else{let I;try{I=new URL(C,i)}catch(p){throw new TypeError(`Referrer "${C}" is not a valid URL.`,{cause:p})}I.protocol==="about:"&&I.hostname==="client"||o&&!Vw(I,this[LA].settingsObject.baseUrl)?r.referrer="client":r.referrer=I}}t.referrerPolicy!==void 0&&(r.referrerPolicy=t.referrerPolicy);let g;if(t.mode!==void 0?g=t.mode:g=n,g==="navigate")throw U.errors.exception({header:"Request constructor",message:"invalid request mode navigate."});if(g!=null&&(r.mode=g),t.credentials!==void 0&&(r.credentials=t.credentials),t.cache!==void 0&&(r.cache=t.cache),r.cache==="only-if-cached"&&r.mode!=="same-origin")throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode");if(t.redirect!==void 0&&(r.redirect=t.redirect),t.integrity!=null&&(r.integrity=String(t.integrity)),t.keepalive!==void 0&&(r.keepalive=!!t.keepalive),t.method!==void 0){let C=t.method;if(!Q1(C))throw new TypeError(`'${C}' is not a valid HTTP method.`);if(B1.has(C.toUpperCase()))throw new TypeError(`'${C}' HTTP method is unsupported.`);C=I1[C]??C1(C),r.method=C}t.signal!==void 0&&(s=t.signal),this[pe]=r;let l=new AbortController;if(this[to]=l.signal,this[to][LA]=this[LA],s!=null){if(!s||typeof s.aborted!="boolean"||typeof s.addEventListener!="function")throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal.");if(s.aborted)l.abort(s.reason);else{this[x1]=l;let C=new WeakRef(l),I=function(){let p=C.deref();p!==void 0&&p.abort(this.reason)};try{(typeof qw=="function"&&qw(s)===Hw||N1(s,"abort").length>=Hw)&&Ow(100,s)}catch{}ro.addAbortListener(s,I),L1.register(l,{signal:s,abort:I})}}if(this[AA]=new Yw(tg),this[AA][Ag]=r.headersList,this[AA][eg]="request",this[AA][LA]=this[LA],g==="no-cors"){if(!p1.has(r.method))throw new TypeError(`'${r.method} is unsupported in no-cors mode.`);this[AA][eg]="request-no-cors"}if(c){let C=this[AA][Ag],I=t.headers!==void 0?t.headers:new rg(C);if(C.clear(),I instanceof rg){for(let[p,w]of I)C.append(p,w);C.cookies=I.cookies}else h1(this[AA],I)}let u=A instanceof e?A[pe].body:null;if((t.body!=null||u!=null)&&(r.method==="GET"||r.method==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body.");let E=null;if(t.body!=null){let[C,I]=l1(t.body,r.keepalive);E=C,I&&!this[AA][Ag].contains("content-type")&&this[AA].append("content-type",I)}let h=E??u;if(h!=null&&h.source==null){if(E!=null&&t.duplex==null)throw new TypeError("RequestInit: duplex option is required when sending a body.");if(r.mode!=="same-origin"&&r.mode!=="cors")throw new TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"');r.useCORSPreflightFlag=!0}let d=h;if(E==null&&u!=null){if(ro.isDisturbed(u.stream)||u.stream.locked)throw new TypeError("Cannot construct a Request with a Request object that has already been used.");Lh||(Lh=require("stream/web").TransformStream);let C=new Lh;u.stream.pipeThrough(C),d={source:u.source,length:u.length,stream:C.readable}}this[pe].body=d}get method(){return U.brandCheck(this,e),this[pe].method}get url(){return U.brandCheck(this,e),S1(this[pe].url)}get headers(){return U.brandCheck(this,e),this[AA]}get destination(){return U.brandCheck(this,e),this[pe].destination}get referrer(){return U.brandCheck(this,e),this[pe].referrer==="no-referrer"?"":this[pe].referrer==="client"?"about:client":this[pe].referrer.toString()}get referrerPolicy(){return U.brandCheck(this,e),this[pe].referrerPolicy}get mode(){return U.brandCheck(this,e),this[pe].mode}get credentials(){return this[pe].credentials}get cache(){return U.brandCheck(this,e),this[pe].cache}get redirect(){return U.brandCheck(this,e),this[pe].redirect}get integrity(){return U.brandCheck(this,e),this[pe].integrity}get keepalive(){return U.brandCheck(this,e),this[pe].keepalive}get isReloadNavigation(){return U.brandCheck(this,e),this[pe].reloadNavigation}get isHistoryNavigation(){return U.brandCheck(this,e),this[pe].historyNavigation}get signal(){return U.brandCheck(this,e),this[to]}get body(){return U.brandCheck(this,e),this[pe].body?this[pe].body.stream:null}get bodyUsed(){return U.brandCheck(this,e),!!this[pe].body&&ro.isDisturbed(this[pe].body.stream)}get duplex(){return U.brandCheck(this,e),"half"}clone(){if(U.brandCheck(this,e),this.bodyUsed||this.body?.locked)throw new TypeError("unusable");let A=U1(this[pe]),t=new e(tg);t[pe]=A,t[LA]=this[LA],t[AA]=new Yw(tg),t[AA][Ag]=A.headersList,t[AA][eg]=this[AA][eg],t[AA][LA]=this[AA][LA];let r=new AbortController;return this.signal.aborted?r.abort(this.signal.reason):ro.addAbortListener(this.signal,()=>{r.abort(this.signal.reason)}),t[to]=r.signal,t}};u1(rn);function ng(e){let A={method:"GET",localURLsOnly:!1,unsafeRequest:!1,body:null,client:null,reservedClient:null,replacesClientId:"",window:"client",keepalive:!1,serviceWorkers:"all",initiator:"",destination:"",priority:null,origin:"client",policyContainer:"client",referrer:"client",referrerPolicy:"",mode:"no-cors",useCORSPreflightFlag:!1,credentials:"same-origin",useCredentials:!1,cache:"default",redirect:"follow",integrity:"",cryptoGraphicsNonceMetadata:"",parserMetadata:"",reloadNavigation:!1,historyNavigation:!1,userActivation:!1,taintedOrigin:!1,redirectCount:0,responseTainting:"basic",preventNoCacheCacheControlHeaderModification:!1,done:!1,timingAllowFailed:!1,...e,headersList:e.headersList?new rg(e.headersList):new rg};return A.url=A.urlList[0],A}function U1(e){let A=ng({...e,body:null});return e.body!=null&&(A.body=E1(e.body)),A}Object.defineProperties(rn.prototype,{method:Me,url:Me,headers:Me,redirect:Me,clone:Me,signal:Me,duplex:Me,destination:Me,body:Me,bodyUsed:Me,isHistoryNavigation:Me,isReloadNavigation:Me,keepalive:Me,integrity:Me,cache:Me,credentials:Me,attribute:Me,referrerPolicy:Me,referrer:Me,mode:Me,[Symbol.toStringTag]:{value:"Request",configurable:!0}});U.converters.Request=U.interfaceConverter(rn);U.converters.RequestInfo=function(e){return typeof e=="string"?U.converters.USVString(e):e instanceof rn?U.converters.Request(e):U.converters.USVString(e)};U.converters.AbortSignal=U.interfaceConverter(AbortSignal);U.converters.RequestInit=U.dictionaryConverter([{key:"method",converter:U.converters.ByteString},{key:"headers",converter:U.converters.HeadersInit},{key:"body",converter:U.nullableConverter(U.converters.BodyInit)},{key:"referrer",converter:U.converters.USVString},{key:"referrerPolicy",converter:U.converters.DOMString,allowedValues:m1},{key:"mode",converter:U.converters.DOMString,allowedValues:w1},{key:"credentials",converter:U.converters.DOMString,allowedValues:R1},{key:"cache",converter:U.converters.DOMString,allowedValues:D1},{key:"redirect",converter:U.converters.DOMString,allowedValues:y1},{key:"integrity",converter:U.converters.DOMString},{key:"keepalive",converter:U.converters.boolean},{key:"signal",converter:U.nullableConverter(e=>U.converters.AbortSignal(e,{strict:!1}))},{key:"window",converter:U.converters.any},{key:"duplex",converter:U.converters.DOMString,allowedValues:b1}]);Ww.exports={Request:rn,makeRequest:ng}});var lg=Q((C8,s0)=>{"use strict";var{Response:T1,makeNetworkError:ue,makeAppropriateNetworkError:ig,filterResponse:Uh,makeResponse:sg}=$c(),{Headers:_w}=tn(),{Request:M1,makeRequest:v1}=no(),io=require("zlib"),{bytesMatch:P1,makePolicyContainer:G1,clonePolicyContainer:J1,requestBadPort:Y1,TAOCheck:V1,appendRequestOriginHeader:q1,responseLocationURL:O1,requestCurrentURL:St,setRequestReferrerPolicyOnRedirect:H1,tryUpgradeRequestToAPotentiallyTrustworthyURL:W1,createOpaqueTimingInfo:qh,appendFetchMetadata:_1,corsCheck:j1,crossOriginResourcePolicyCheck:K1,determineRequestsReferrer:Z1,coarsenedSharedCurrentTime:Oh,createDeferredPromise:X1,isBlobLike:z1,sameOrigin:Jh,isCancelled:Ri,isAborted:jw,isErrorLike:$1,fullyReadBody:zw,readableStreamClose:eG,isomorphicEncode:Yh,urlIsLocal:AG,urlIsHttpHttpsScheme:Hh,urlHasHttpsScheme:tG}=YA(),{kState:Vh,kHeaders:Th,kGuard:rG,kRealm:Kw}=qt(),Di=require("assert"),{safelyExtractBody:og}=Ls(),{redirectStatusSet:$w,nullBodyStatus:e0,safeMethodsSet:nG,requestBodyHeader:iG,subresourceSet:sG,DOMException:ag}=mr(),{kHeadersList:wi}=de(),oG=require("events"),{Readable:aG,pipeline:cG}=require("stream"),{addAbortListener:gG,isErrored:lG,isReadable:cg,nodeMajor:Zw,nodeMinor:uG}=W(),{dataURLProcessor:EG,serializeAMimeType:hG}=$A(),{TransformStream:dG}=require("stream/web"),{getGlobalDispatcher:QG}=Ii(),{webidl:CG}=iA(),{STATUS_CODES:fG}=require("http"),IG=["GET","HEAD"],Mh,vh=globalThis.ReadableStream,gg=class extends oG{constructor(A){super(),this.dispatcher=A,this.connection=null,this.dump=!1,this.state="ongoing",this.setMaxListeners(21)}terminate(A){this.state==="ongoing"&&(this.state="terminated",this.connection?.destroy(A),this.emit("terminated",A))}abort(A){this.state==="ongoing"&&(this.state="aborted",A||(A=new ag("The operation was aborted.","AbortError")),this.serializedAbortReason=A,this.connection?.destroy(A),this.emit("terminated",A))}};function BG(e,A={}){CG.argumentLengthCheck(arguments,1,{header:"globalThis.fetch"});let t=X1(),r;try{r=new M1(e,A)}catch(u){return t.reject(u),t.promise}let n=r[Vh];if(r.signal.aborted)return Ph(t,n,null,r.signal.reason),t.promise;n.client.globalObject?.constructor?.name==="ServiceWorkerGlobalScope"&&(n.serviceWorkers="none");let s=null,o=null,a=!1,c=null;return gG(r.signal,()=>{a=!0,Di(c!=null),c.abort(r.signal.reason),Ph(t,n,s,r.signal.reason)}),c=t0({request:n,processResponseEndOfBody:u=>A0(u,"fetch"),processResponse:u=>{if(a)return Promise.resolve();if(u.aborted)return Ph(t,n,s,c.serializedAbortReason),Promise.resolve();if(u.type==="error")return t.reject(Object.assign(new TypeError("fetch failed"),{cause:u.error})),Promise.resolve();s=new T1,s[Vh]=u,s[Kw]=o,s[Th][wi]=u.headersList,s[Th][rG]="immutable",s[Th][Kw]=o,t.resolve(s)},dispatcher:A.dispatcher??QG()}),t.promise}function A0(e,A="other"){if(e.type==="error"&&e.aborted||!e.urlList?.length)return;let t=e.urlList[0],r=e.timingInfo,n=e.cacheState;Hh(t)&&r!==null&&(e.timingAllowPassed||(r=qh({startTime:r.startTime}),n=""),r.endTime=Oh(),e.timingInfo=r,pG(r,t,A,globalThis,n))}function pG(e,A,t,r,n){(Zw>18||Zw===18&&uG>=2)&&performance.markResourceTiming(e,A.href,t,r,n)}function Ph(e,A,t,r){if(r||(r=new ag("The operation was aborted.","AbortError")),e.reject(r),A.body!=null&&cg(A.body?.stream)&&A.body.stream.cancel(r).catch(i=>{if(i.code!=="ERR_INVALID_STATE")throw i}),t==null)return;let n=t[Vh];n.body!=null&&cg(n.body?.stream)&&n.body.stream.cancel(r).catch(i=>{if(i.code!=="ERR_INVALID_STATE")throw i})}function t0({request:e,processRequestBodyChunkLength:A,processRequestEndOfBody:t,processResponse:r,processResponseEndOfBody:n,processResponseConsumeBody:i,useParallelQueue:s=!1,dispatcher:o}){let a=null,c=!1;e.client!=null&&(a=e.client.globalObject,c=e.client.crossOriginIsolatedCapability);let g=Oh(c),l=qh({startTime:g}),u={controller:new gg(o),request:e,timingInfo:l,processRequestBodyChunkLength:A,processRequestEndOfBody:t,processResponse:r,processResponseConsumeBody:i,processResponseEndOfBody:n,taskDestination:a,crossOriginIsolatedCapability:c};return Di(!e.body||e.body.stream),e.window==="client"&&(e.window=e.client?.globalObject?.constructor?.name==="Window"?e.client:"no-window"),e.origin==="client"&&(e.origin=e.client?.origin),e.policyContainer==="client"&&(e.client!=null?e.policyContainer=J1(e.client.policyContainer):e.policyContainer=G1()),e.headersList.contains("accept")||e.headersList.append("accept","*/*"),e.headersList.contains("accept-language")||e.headersList.append("accept-language","*"),e.priority,sG.has(e.destination),r0(u).catch(E=>{u.controller.terminate(E)}),u.controller}async function r0(e,A=!1){let t=e.request,r=null;if(t.localURLsOnly&&!AG(St(t))&&(r=ue("local URLs only")),W1(t),Y1(t)==="blocked"&&(r=ue("bad port")),t.referrerPolicy===""&&(t.referrerPolicy=t.policyContainer.referrerPolicy),t.referrer!=="no-referrer"&&(t.referrer=Z1(t)),r===null&&(r=await(async()=>{let i=St(t);return Jh(i,t.url)&&t.responseTainting==="basic"||i.protocol==="data:"||t.mode==="navigate"||t.mode==="websocket"?(t.responseTainting="basic",await Xw(e)):t.mode==="same-origin"?ue('request mode cannot be "same-origin"'):t.mode==="no-cors"?t.redirect!=="follow"?ue('redirect mode cannot be "follow" for "no-cors" request'):(t.responseTainting="opaque",await Xw(e)):Hh(St(t))?(t.responseTainting="cors",await n0(e)):ue("URL scheme must be a HTTP(S) scheme")})()),A)return r;r.status!==0&&!r.internalResponse&&(t.responseTainting,t.responseTainting==="basic"?r=Uh(r,"basic"):t.responseTainting==="cors"?r=Uh(r,"cors"):t.responseTainting==="opaque"?r=Uh(r,"opaque"):Di(!1));let n=r.status===0?r:r.internalResponse;if(n.urlList.length===0&&n.urlList.push(...t.urlList),t.timingAllowFailed||(r.timingAllowPassed=!0),r.type==="opaque"&&n.status===206&&n.rangeRequested&&!t.headers.contains("range")&&(r=n=ue()),r.status!==0&&(t.method==="HEAD"||t.method==="CONNECT"||e0.includes(n.status))&&(n.body=null,e.controller.dump=!0),t.integrity){let i=o=>Gh(e,ue(o));if(t.responseTainting==="opaque"||r.body==null){i(r.error);return}let s=o=>{if(!P1(o,t.integrity)){i("integrity mismatch");return}r.body=og(o)[0],Gh(e,r)};await zw(r.body,s,i)}else Gh(e,r)}function Xw(e){if(Ri(e)&&e.request.redirectCount===0)return Promise.resolve(ig(e));let{request:A}=e,{protocol:t}=St(A);switch(t){case"about:":return Promise.resolve(ue("about scheme is not supported"));case"blob:":{Mh||(Mh=require("buffer").resolveObjectURL);let r=St(A);if(r.search.length!==0)return Promise.resolve(ue("NetworkError when attempting to fetch resource."));let n=Mh(r.toString());if(A.method!=="GET"||!z1(n))return Promise.resolve(ue("invalid method"));let i=og(n),s=i[0],o=Yh(`${s.length}`),a=i[1]??"",c=sg({statusText:"OK",headersList:[["content-length",{name:"Content-Length",value:o}],["content-type",{name:"Content-Type",value:a}]]});return c.body=s,Promise.resolve(c)}case"data:":{let r=St(A),n=EG(r);if(n==="failure")return Promise.resolve(ue("failed to fetch the data URL"));let i=hG(n.mimeType);return Promise.resolve(sg({statusText:"OK",headersList:[["content-type",{name:"Content-Type",value:i}]],body:og(n.body)[0]}))}case"file:":return Promise.resolve(ue("not implemented... yet..."));case"http:":case"https:":return n0(e).catch(r=>ue(r));default:return Promise.resolve(ue("unknown scheme"))}}function mG(e,A){e.request.done=!0,e.processResponseDone!=null&&queueMicrotask(()=>e.processResponseDone(A))}function Gh(e,A){A.type==="error"&&(A.urlList=[e.request.urlList[0]],A.timingInfo=qh({startTime:e.timingInfo.startTime}));let t=()=>{e.request.done=!0,e.processResponseEndOfBody!=null&&queueMicrotask(()=>e.processResponseEndOfBody(A))};if(e.processResponse!=null&&queueMicrotask(()=>e.processResponse(A)),A.body==null)t();else{let r=(i,s)=>{s.enqueue(i)},n=new dG({start(){},transform:r,flush:t},{size(){return 1}},{size(){return 1}});A.body={stream:A.body.stream.pipeThrough(n)}}if(e.processResponseConsumeBody!=null){let r=i=>e.processResponseConsumeBody(A,i),n=i=>e.processResponseConsumeBody(A,i);if(A.body==null)queueMicrotask(()=>r(null));else return zw(A.body,r,n);return Promise.resolve()}}async function n0(e){let A=e.request,t=null,r=null,n=e.timingInfo;if(A.serviceWorkers,t===null){if(A.redirect==="follow"&&(A.serviceWorkers="none"),r=t=await i0(e),A.responseTainting==="cors"&&j1(A,t)==="failure")return ue("cors failure");V1(A,t)==="failure"&&(A.timingAllowFailed=!0)}return(A.responseTainting==="opaque"||t.type==="opaque")&&K1(A.origin,A.client,A.destination,r)==="blocked"?ue("blocked"):($w.has(r.status)&&(A.redirect!=="manual"&&e.controller.connection.destroy(),A.redirect==="error"?t=ue("unexpected redirect"):A.redirect==="manual"?t=r:A.redirect==="follow"?t=await yG(e,t):Di(!1)),t.timingInfo=n,t)}function yG(e,A){let t=e.request,r=A.internalResponse?A.internalResponse:A,n;try{if(n=O1(r,St(t).hash),n==null)return A}catch(s){return Promise.resolve(ue(s))}if(!Hh(n))return Promise.resolve(ue("URL scheme must be a HTTP(S) scheme"));if(t.redirectCount===20)return Promise.resolve(ue("redirect count exceeded"));if(t.redirectCount+=1,t.mode==="cors"&&(n.username||n.password)&&!Jh(t,n))return Promise.resolve(ue('cross origin not allowed for request mode "cors"'));if(t.responseTainting==="cors"&&(n.username||n.password))return Promise.resolve(ue('URL cannot contain credentials for request mode "cors"'));if(r.status!==303&&t.body!=null&&t.body.source==null)return Promise.resolve(ue());if([301,302].includes(r.status)&&t.method==="POST"||r.status===303&&!IG.includes(t.method)){t.method="GET",t.body=null;for(let s of iG)t.headersList.delete(s)}Jh(St(t),n)||(t.headersList.delete("authorization"),t.headersList.delete("proxy-authorization",!0),t.headersList.delete("cookie"),t.headersList.delete("host")),t.body!=null&&(Di(t.body.source!=null),t.body=og(t.body.source)[0]);let i=e.timingInfo;return i.redirectEndTime=i.postRedirectStartTime=Oh(e.crossOriginIsolatedCapability),i.redirectStartTime===0&&(i.redirectStartTime=i.startTime),t.urlList.push(n),H1(t,r),r0(e,!0)}async function i0(e,A=!1,t=!1){let r=e.request,n=null,i=null,s=null,o=null,a=!1;r.window==="no-window"&&r.redirect==="error"?(n=e,i=r):(i=v1(r),n={...e},n.request=i);let c=r.credentials==="include"||r.credentials==="same-origin"&&r.responseTainting==="basic",g=i.body?i.body.length:null,l=null;if(i.body==null&&["POST","PUT"].includes(i.method)&&(l="0"),g!=null&&(l=Yh(`${g}`)),l!=null&&i.headersList.append("content-length",l),g!=null&&i.keepalive,i.referrer instanceof URL&&i.headersList.append("referer",Yh(i.referrer.href)),q1(i),_1(i),i.headersList.contains("user-agent")||i.headersList.append("user-agent",typeof esbuildDetection>"u"?"undici":"node"),i.cache==="default"&&(i.headersList.contains("if-modified-since")||i.headersList.contains("if-none-match")||i.headersList.contains("if-unmodified-since")||i.headersList.contains("if-match")||i.headersList.contains("if-range"))&&(i.cache="no-store"),i.cache==="no-cache"&&!i.preventNoCacheCacheControlHeaderModification&&!i.headersList.contains("cache-control")&&i.headersList.append("cache-control","max-age=0"),(i.cache==="no-store"||i.cache==="reload")&&(i.headersList.contains("pragma")||i.headersList.append("pragma","no-cache"),i.headersList.contains("cache-control")||i.headersList.append("cache-control","no-cache")),i.headersList.contains("range")&&i.headersList.append("accept-encoding","identity"),i.headersList.contains("accept-encoding")||(tG(St(i))?i.headersList.append("accept-encoding","br, gzip, deflate"):i.headersList.append("accept-encoding","gzip, deflate")),i.headersList.delete("host"),o==null&&(i.cache="no-store"),i.mode!=="no-store"&&i.mode,s==null){if(i.mode==="only-if-cached")return ue("only if cached");let u=await wG(n,c,t);!nG.has(i.method)&&u.status>=200&&u.status<=399,a&&u.status,s==null&&(s=u)}if(s.urlList=[...i.urlList],i.headersList.contains("range")&&(s.rangeRequested=!0),s.requestIncludesCredentials=c,s.status===407)return r.window==="no-window"?ue():Ri(e)?ig(e):ue("proxy authentication required");if(s.status===421&&!t&&(r.body==null||r.body.source!=null)){if(Ri(e))return ig(e);e.controller.connection.destroy(),s=await i0(e,A,!0)}return s}async function wG(e,A=!1,t=!1){Di(!e.controller.connection||e.controller.connection.destroyed),e.controller.connection={abort:null,destroyed:!1,destroy(h){this.destroyed||(this.destroyed=!0,this.abort?.(h??new ag("The operation was aborted.","AbortError")))}};let r=e.request,n=null,i=e.timingInfo;null==null&&(r.cache="no-store");let o=t?"yes":"no";r.mode;let a=null;if(r.body==null&&e.processRequestEndOfBody)queueMicrotask(()=>e.processRequestEndOfBody());else if(r.body!=null){let h=async function*(I){Ri(e)||(yield I,e.processRequestBodyChunkLength?.(I.byteLength))},d=()=>{Ri(e)||e.processRequestEndOfBody&&e.processRequestEndOfBody()},C=I=>{Ri(e)||(I.name==="AbortError"?e.controller.abort():e.controller.terminate(I))};a=async function*(){try{for await(let I of r.body.stream)yield*h(I);d()}catch(I){C(I)}}()}try{let{body:h,status:d,statusText:C,headersList:I,socket:p}=await E({body:a});if(p)n=sg({status:d,statusText:C,headersList:I,socket:p});else{let w=h[Symbol.asyncIterator]();e.controller.next=()=>w.next(),n=sg({status:d,statusText:C,headersList:I})}}catch(h){return h.name==="AbortError"?(e.controller.connection.destroy(),ig(e,h)):ue(h)}let c=()=>{e.controller.resume()},g=h=>{e.controller.abort(h)};vh||(vh=require("stream/web").ReadableStream);let l=new vh({async start(h){e.controller.controller=h},async pull(h){await c(h)},async cancel(h){await g(h)}},{highWaterMark:0,size(){return 1}});n.body={stream:l},e.controller.on("terminated",u),e.controller.resume=async()=>{for(;;){let h,d;try{let{done:C,value:I}=await e.controller.next();if(jw(e))break;h=C?void 0:I}catch(C){e.controller.ended&&!i.encodedBodySize?h=void 0:(h=C,d=!0)}if(h===void 0){eG(e.controller.controller),mG(e,n);return}if(i.decodedBodySize+=h?.byteLength??0,d){e.controller.terminate(h);return}if(e.controller.controller.enqueue(new Uint8Array(h)),lG(l)){e.controller.terminate();return}if(!e.controller.controller.desiredSize)return}};function u(h){jw(e)?(n.aborted=!0,cg(l)&&e.controller.controller.error(e.controller.serializedAbortReason)):cg(l)&&e.controller.controller.error(new TypeError("terminated",{cause:$1(h)?h:void 0})),e.controller.connection.destroy()}return n;async function E({body:h}){let d=St(r),C=e.controller.dispatcher;return new Promise((I,p)=>C.dispatch({path:d.pathname+d.search,origin:d.origin,method:r.method,body:e.controller.dispatcher.isMockActive?r.body&&(r.body.source||r.body.stream):h,headers:r.headersList.entries,maxRedirections:0,upgrade:r.mode==="websocket"?"websocket":void 0},{body:null,abort:null,onConnect(w){let{connection:m}=e.controller;m.destroyed?w(new ag("The operation was aborted.","AbortError")):(e.controller.on("terminated",w),this.abort=m.abort=w)},onHeaders(w,m,K,H){if(w<200)return;let ne=[],q="",ae=new _w;if(Array.isArray(m))for(let Y=0;Yfe.trim()):ce.toLowerCase()==="location"&&(q=Je),ae[wi].append(ce,Je)}else{let Y=Object.keys(m);for(let ce of Y){let Je=m[ce];ce.toLowerCase()==="content-encoding"?ne=Je.toLowerCase().split(",").map(fe=>fe.trim()).reverse():ce.toLowerCase()==="location"&&(q=Je),ae[wi].append(ce,Je)}}this.body=new aG({read:K});let De=[],ee=r.redirect==="follow"&&q&&$w.has(w);if(r.method!=="HEAD"&&r.method!=="CONNECT"&&!e0.includes(w)&&!ee)for(let Y of ne)if(Y==="x-gzip"||Y==="gzip")De.push(io.createGunzip({flush:io.constants.Z_SYNC_FLUSH,finishFlush:io.constants.Z_SYNC_FLUSH}));else if(Y==="deflate")De.push(io.createInflate());else if(Y==="br")De.push(io.createBrotliDecompress());else{De.length=0;break}return I({status:w,statusText:H,headersList:ae[wi],body:De.length?cG(this.body,...De,()=>{}):this.body.on("error",()=>{})}),!0},onData(w){if(e.controller.dump)return;let m=w;return i.encodedBodySize+=m.byteLength,this.body.push(m)},onComplete(){this.abort&&e.controller.off("terminated",this.abort),e.controller.ended=!0,this.body.push(null)},onError(w){this.abort&&e.controller.off("terminated",this.abort),this.body?.destroy(w),e.controller.terminate(w),p(w)},onUpgrade(w,m,K){if(w!==101)return;let H=new _w;for(let ne=0;ne{"use strict";o0.exports={kState:Symbol("FileReader state"),kResult:Symbol("FileReader result"),kError:Symbol("FileReader error"),kLastProgressEventFired:Symbol("FileReader last progress event fired timestamp"),kEvents:Symbol("FileReader events"),kAborted:Symbol("FileReader aborted")}});var c0=Q((I8,a0)=>{"use strict";var{webidl:UA}=iA(),ug=Symbol("ProgressEvent state"),_h=class e extends Event{constructor(A,t={}){A=UA.converters.DOMString(A),t=UA.converters.ProgressEventInit(t??{}),super(A,t),this[ug]={lengthComputable:t.lengthComputable,loaded:t.loaded,total:t.total}}get lengthComputable(){return UA.brandCheck(this,e),this[ug].lengthComputable}get loaded(){return UA.brandCheck(this,e),this[ug].loaded}get total(){return UA.brandCheck(this,e),this[ug].total}};UA.converters.ProgressEventInit=UA.dictionaryConverter([{key:"lengthComputable",converter:UA.converters.boolean,defaultValue:!1},{key:"loaded",converter:UA.converters["unsigned long long"],defaultValue:0},{key:"total",converter:UA.converters["unsigned long long"],defaultValue:0},{key:"bubbles",converter:UA.converters.boolean,defaultValue:!1},{key:"cancelable",converter:UA.converters.boolean,defaultValue:!1},{key:"composed",converter:UA.converters.boolean,defaultValue:!1}]);a0.exports={ProgressEvent:_h}});var l0=Q((B8,g0)=>{"use strict";function RG(e){if(!e)return"failure";switch(e.trim().toLowerCase()){case"unicode-1-1-utf-8":case"unicode11utf8":case"unicode20utf8":case"utf-8":case"utf8":case"x-unicode20utf8":return"UTF-8";case"866":case"cp866":case"csibm866":case"ibm866":return"IBM866";case"csisolatin2":case"iso-8859-2":case"iso-ir-101":case"iso8859-2":case"iso88592":case"iso_8859-2":case"iso_8859-2:1987":case"l2":case"latin2":return"ISO-8859-2";case"csisolatin3":case"iso-8859-3":case"iso-ir-109":case"iso8859-3":case"iso88593":case"iso_8859-3":case"iso_8859-3:1988":case"l3":case"latin3":return"ISO-8859-3";case"csisolatin4":case"iso-8859-4":case"iso-ir-110":case"iso8859-4":case"iso88594":case"iso_8859-4":case"iso_8859-4:1988":case"l4":case"latin4":return"ISO-8859-4";case"csisolatincyrillic":case"cyrillic":case"iso-8859-5":case"iso-ir-144":case"iso8859-5":case"iso88595":case"iso_8859-5":case"iso_8859-5:1988":return"ISO-8859-5";case"arabic":case"asmo-708":case"csiso88596e":case"csiso88596i":case"csisolatinarabic":case"ecma-114":case"iso-8859-6":case"iso-8859-6-e":case"iso-8859-6-i":case"iso-ir-127":case"iso8859-6":case"iso88596":case"iso_8859-6":case"iso_8859-6:1987":return"ISO-8859-6";case"csisolatingreek":case"ecma-118":case"elot_928":case"greek":case"greek8":case"iso-8859-7":case"iso-ir-126":case"iso8859-7":case"iso88597":case"iso_8859-7":case"iso_8859-7:1987":case"sun_eu_greek":return"ISO-8859-7";case"csiso88598e":case"csisolatinhebrew":case"hebrew":case"iso-8859-8":case"iso-8859-8-e":case"iso-ir-138":case"iso8859-8":case"iso88598":case"iso_8859-8":case"iso_8859-8:1988":case"visual":return"ISO-8859-8";case"csiso88598i":case"iso-8859-8-i":case"logical":return"ISO-8859-8-I";case"csisolatin6":case"iso-8859-10":case"iso-ir-157":case"iso8859-10":case"iso885910":case"l6":case"latin6":return"ISO-8859-10";case"iso-8859-13":case"iso8859-13":case"iso885913":return"ISO-8859-13";case"iso-8859-14":case"iso8859-14":case"iso885914":return"ISO-8859-14";case"csisolatin9":case"iso-8859-15":case"iso8859-15":case"iso885915":case"iso_8859-15":case"l9":return"ISO-8859-15";case"iso-8859-16":return"ISO-8859-16";case"cskoi8r":case"koi":case"koi8":case"koi8-r":case"koi8_r":return"KOI8-R";case"koi8-ru":case"koi8-u":return"KOI8-U";case"csmacintosh":case"mac":case"macintosh":case"x-mac-roman":return"macintosh";case"iso-8859-11":case"iso8859-11":case"iso885911":case"tis-620":case"windows-874":return"windows-874";case"cp1250":case"windows-1250":case"x-cp1250":return"windows-1250";case"cp1251":case"windows-1251":case"x-cp1251":return"windows-1251";case"ansi_x3.4-1968":case"ascii":case"cp1252":case"cp819":case"csisolatin1":case"ibm819":case"iso-8859-1":case"iso-ir-100":case"iso8859-1":case"iso88591":case"iso_8859-1":case"iso_8859-1:1987":case"l1":case"latin1":case"us-ascii":case"windows-1252":case"x-cp1252":return"windows-1252";case"cp1253":case"windows-1253":case"x-cp1253":return"windows-1253";case"cp1254":case"csisolatin5":case"iso-8859-9":case"iso-ir-148":case"iso8859-9":case"iso88599":case"iso_8859-9":case"iso_8859-9:1989":case"l5":case"latin5":case"windows-1254":case"x-cp1254":return"windows-1254";case"cp1255":case"windows-1255":case"x-cp1255":return"windows-1255";case"cp1256":case"windows-1256":case"x-cp1256":return"windows-1256";case"cp1257":case"windows-1257":case"x-cp1257":return"windows-1257";case"cp1258":case"windows-1258":case"x-cp1258":return"windows-1258";case"x-mac-cyrillic":case"x-mac-ukrainian":return"x-mac-cyrillic";case"chinese":case"csgb2312":case"csiso58gb231280":case"gb2312":case"gb_2312":case"gb_2312-80":case"gbk":case"iso-ir-58":case"x-gbk":return"GBK";case"gb18030":return"gb18030";case"big5":case"big5-hkscs":case"cn-big5":case"csbig5":case"x-x-big5":return"Big5";case"cseucpkdfmtjapanese":case"euc-jp":case"x-euc-jp":return"EUC-JP";case"csiso2022jp":case"iso-2022-jp":return"ISO-2022-JP";case"csshiftjis":case"ms932":case"ms_kanji":case"shift-jis":case"shift_jis":case"sjis":case"windows-31j":case"x-sjis":return"Shift_JIS";case"cseuckr":case"csksc56011987":case"euc-kr":case"iso-ir-149":case"korean":case"ks_c_5601-1987":case"ks_c_5601-1989":case"ksc5601":case"ksc_5601":case"windows-949":return"EUC-KR";case"csiso2022kr":case"hz-gb-2312":case"iso-2022-cn":case"iso-2022-cn-ext":case"iso-2022-kr":case"replacement":return"replacement";case"unicodefffe":case"utf-16be":return"UTF-16BE";case"csunicode":case"iso-10646-ucs-2":case"ucs-2":case"unicode":case"unicodefeff":case"utf-16":case"utf-16le":return"UTF-16LE";case"x-user-defined":return"x-user-defined";default:return"failure"}}g0.exports={getEncoding:RG}});var I0=Q((p8,f0)=>{"use strict";var{kState:bi,kError:jh,kResult:u0,kAborted:so,kLastProgressEventFired:Kh}=Wh(),{ProgressEvent:DG}=c0(),{getEncoding:E0}=l0(),{DOMException:bG}=mr(),{serializeAMimeType:kG,parseMIMEType:h0}=$A(),{types:SG}=require("util"),{StringDecoder:d0}=require("string_decoder"),{btoa:Q0}=require("buffer"),FG={enumerable:!0,writable:!1,configurable:!1};function NG(e,A,t,r){if(e[bi]==="loading")throw new bG("Invalid state","InvalidStateError");e[bi]="loading",e[u0]=null,e[jh]=null;let i=A.stream().getReader(),s=[],o=i.read(),a=!0;(async()=>{for(;!e[so];)try{let{done:c,value:g}=await o;if(a&&!e[so]&&queueMicrotask(()=>{Fr("loadstart",e)}),a=!1,!c&&SG.isUint8Array(g))s.push(g),(e[Kh]===void 0||Date.now()-e[Kh]>=50)&&!e[so]&&(e[Kh]=Date.now(),queueMicrotask(()=>{Fr("progress",e)})),o=i.read();else if(c){queueMicrotask(()=>{e[bi]="done";try{let l=xG(s,t,A.type,r);if(e[so])return;e[u0]=l,Fr("load",e)}catch(l){e[jh]=l,Fr("error",e)}e[bi]!=="loading"&&Fr("loadend",e)});break}}catch(c){if(e[so])return;queueMicrotask(()=>{e[bi]="done",e[jh]=c,Fr("error",e),e[bi]!=="loading"&&Fr("loadend",e)});break}})()}function Fr(e,A){let t=new DG(e,{bubbles:!1,cancelable:!1});A.dispatchEvent(t)}function xG(e,A,t,r){switch(A){case"DataURL":{let n="data:",i=h0(t||"application/octet-stream");i!=="failure"&&(n+=kG(i)),n+=";base64,";let s=new d0("latin1");for(let o of e)n+=Q0(s.write(o));return n+=Q0(s.end()),n}case"Text":{let n="failure";if(r&&(n=E0(r)),n==="failure"&&t){let i=h0(t);i!=="failure"&&(n=E0(i.parameters.get("charset")))}return n==="failure"&&(n="UTF-8"),LG(e,n)}case"ArrayBuffer":return C0(e).buffer;case"BinaryString":{let n="",i=new d0("latin1");for(let s of e)n+=i.write(s);return n+=i.end(),n}}}function LG(e,A){let t=C0(e),r=UG(t),n=0;r!==null&&(A=r,n=r==="UTF-8"?3:2);let i=t.slice(n);return new TextDecoder(A).decode(i)}function UG(e){let[A,t,r]=e;return A===239&&t===187&&r===191?"UTF-8":A===254&&t===255?"UTF-16BE":A===255&&t===254?"UTF-16LE":null}function C0(e){let A=e.reduce((r,n)=>r+n.byteLength,0),t=0;return e.reduce((r,n)=>(r.set(n,t),t+=n.byteLength,r),new Uint8Array(A))}f0.exports={staticPropertyDescriptors:FG,readOperation:NG,fireAProgressEvent:Fr}});var y0=Q((m8,m0)=>{"use strict";var{staticPropertyDescriptors:ki,readOperation:Eg,fireAProgressEvent:B0}=I0(),{kState:nn,kError:p0,kResult:hg,kEvents:$,kAborted:TG}=Wh(),{webidl:se}=iA(),{kEnumerableProperty:BA}=W(),rt=class e extends EventTarget{constructor(){super(),this[nn]="empty",this[hg]=null,this[p0]=null,this[$]={loadend:null,error:null,abort:null,load:null,progress:null,loadstart:null}}readAsArrayBuffer(A){se.brandCheck(this,e),se.argumentLengthCheck(arguments,1,{header:"FileReader.readAsArrayBuffer"}),A=se.converters.Blob(A,{strict:!1}),Eg(this,A,"ArrayBuffer")}readAsBinaryString(A){se.brandCheck(this,e),se.argumentLengthCheck(arguments,1,{header:"FileReader.readAsBinaryString"}),A=se.converters.Blob(A,{strict:!1}),Eg(this,A,"BinaryString")}readAsText(A,t=void 0){se.brandCheck(this,e),se.argumentLengthCheck(arguments,1,{header:"FileReader.readAsText"}),A=se.converters.Blob(A,{strict:!1}),t!==void 0&&(t=se.converters.DOMString(t)),Eg(this,A,"Text",t)}readAsDataURL(A){se.brandCheck(this,e),se.argumentLengthCheck(arguments,1,{header:"FileReader.readAsDataURL"}),A=se.converters.Blob(A,{strict:!1}),Eg(this,A,"DataURL")}abort(){if(this[nn]==="empty"||this[nn]==="done"){this[hg]=null;return}this[nn]==="loading"&&(this[nn]="done",this[hg]=null),this[TG]=!0,B0("abort",this),this[nn]!=="loading"&&B0("loadend",this)}get readyState(){switch(se.brandCheck(this,e),this[nn]){case"empty":return this.EMPTY;case"loading":return this.LOADING;case"done":return this.DONE}}get result(){return se.brandCheck(this,e),this[hg]}get error(){return se.brandCheck(this,e),this[p0]}get onloadend(){return se.brandCheck(this,e),this[$].loadend}set onloadend(A){se.brandCheck(this,e),this[$].loadend&&this.removeEventListener("loadend",this[$].loadend),typeof A=="function"?(this[$].loadend=A,this.addEventListener("loadend",A)):this[$].loadend=null}get onerror(){return se.brandCheck(this,e),this[$].error}set onerror(A){se.brandCheck(this,e),this[$].error&&this.removeEventListener("error",this[$].error),typeof A=="function"?(this[$].error=A,this.addEventListener("error",A)):this[$].error=null}get onloadstart(){return se.brandCheck(this,e),this[$].loadstart}set onloadstart(A){se.brandCheck(this,e),this[$].loadstart&&this.removeEventListener("loadstart",this[$].loadstart),typeof A=="function"?(this[$].loadstart=A,this.addEventListener("loadstart",A)):this[$].loadstart=null}get onprogress(){return se.brandCheck(this,e),this[$].progress}set onprogress(A){se.brandCheck(this,e),this[$].progress&&this.removeEventListener("progress",this[$].progress),typeof A=="function"?(this[$].progress=A,this.addEventListener("progress",A)):this[$].progress=null}get onload(){return se.brandCheck(this,e),this[$].load}set onload(A){se.brandCheck(this,e),this[$].load&&this.removeEventListener("load",this[$].load),typeof A=="function"?(this[$].load=A,this.addEventListener("load",A)):this[$].load=null}get onabort(){return se.brandCheck(this,e),this[$].abort}set onabort(A){se.brandCheck(this,e),this[$].abort&&this.removeEventListener("abort",this[$].abort),typeof A=="function"?(this[$].abort=A,this.addEventListener("abort",A)):this[$].abort=null}};rt.EMPTY=rt.prototype.EMPTY=0;rt.LOADING=rt.prototype.LOADING=1;rt.DONE=rt.prototype.DONE=2;Object.defineProperties(rt.prototype,{EMPTY:ki,LOADING:ki,DONE:ki,readAsArrayBuffer:BA,readAsBinaryString:BA,readAsText:BA,readAsDataURL:BA,abort:BA,readyState:BA,result:BA,error:BA,onloadstart:BA,onprogress:BA,onload:BA,onabort:BA,onerror:BA,onloadend:BA,[Symbol.toStringTag]:{value:"FileReader",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(rt,{EMPTY:ki,LOADING:ki,DONE:ki});m0.exports={FileReader:rt}});var dg=Q((y8,w0)=>{"use strict";w0.exports={kConstruct:de().kConstruct}});var b0=Q((w8,D0)=>{"use strict";var MG=require("assert"),{URLSerializer:R0}=$A(),{isValidHeaderName:vG}=YA();function PG(e,A,t=!1){let r=R0(e,t),n=R0(A,t);return r===n}function GG(e){MG(e!==null);let A=[];for(let t of e.split(",")){if(t=t.trim(),t.length){if(!vG(t))continue}else continue;A.push(t)}return A}D0.exports={urlEquals:PG,fieldValues:GG}});var U0=Q((R8,L0)=>{"use strict";var{kConstruct:JG}=dg(),{urlEquals:YG,fieldValues:Zh}=b0(),{kEnumerableProperty:sn,isDisturbed:VG}=W(),{kHeadersList:k0}=de(),{webidl:F}=iA(),{Response:F0,cloneResponse:qG}=$c(),{Request:Ft}=no(),{kState:gA,kHeaders:Qg,kGuard:S0,kRealm:OG}=qt(),{fetching:HG}=lg(),{urlIsHttpHttpsScheme:Cg,createDeferredPromise:Si,readAllBytes:WG}=YA(),Xh=require("assert"),{getGlobalDispatcher:_G}=Ii(),Nt,pA,fg,Fi,N0,zt=class zt{constructor(){Ne(this,pA);Ne(this,Nt);arguments[0]!==JG&&F.illegalConstructor(),Ae(this,Nt,arguments[1])}async match(A,t={}){F.brandCheck(this,zt),F.argumentLengthCheck(arguments,1,{header:"Cache.match"}),A=F.converters.RequestInfo(A),t=F.converters.CacheQueryOptions(t);let r=await this.matchAll(A,t);if(r.length!==0)return r[0]}async matchAll(A=void 0,t={}){F.brandCheck(this,zt),A!==void 0&&(A=F.converters.RequestInfo(A)),t=F.converters.CacheQueryOptions(t);let r=null;if(A!==void 0)if(A instanceof Ft){if(r=A[gA],r.method!=="GET"&&!t.ignoreMethod)return[]}else typeof A=="string"&&(r=new Ft(A)[gA]);let n=[];if(A===void 0)for(let s of f(this,Nt))n.push(s[1]);else{let s=MA(this,pA,Fi).call(this,r,t);for(let o of s)n.push(o[1])}let i=[];for(let s of n){let o=new F0(s.body?.source??null),a=o[gA].body;o[gA]=s,o[gA].body=a,o[Qg][k0]=s.headersList,o[Qg][S0]="immutable",i.push(o)}return Object.freeze(i)}async add(A){F.brandCheck(this,zt),F.argumentLengthCheck(arguments,1,{header:"Cache.add"}),A=F.converters.RequestInfo(A);let t=[A];return await this.addAll(t)}async addAll(A){F.brandCheck(this,zt),F.argumentLengthCheck(arguments,1,{header:"Cache.addAll"}),A=F.converters["sequence"](A);let t=[],r=[];for(let l of A){if(typeof l=="string")continue;let u=l[gA];if(!Cg(u.url)||u.method!=="GET")throw F.errors.exception({header:"Cache.addAll",message:"Expected http/s scheme when method is not GET."})}let n=[];for(let l of A){let u=new Ft(l)[gA];if(!Cg(u.url))throw F.errors.exception({header:"Cache.addAll",message:"Expected http/s scheme."});u.initiator="fetch",u.destination="subresource",r.push(u);let E=Si();n.push(HG({request:u,dispatcher:_G(),processResponse(h){if(h.type==="error"||h.status===206||h.status<200||h.status>299)E.reject(F.errors.exception({header:"Cache.addAll",message:"Received an invalid status code or the request failed."}));else if(h.headersList.contains("vary")){let d=Zh(h.headersList.get("vary"));for(let C of d)if(C==="*"){E.reject(F.errors.exception({header:"Cache.addAll",message:"invalid vary field value"}));for(let I of n)I.abort();return}}},processResponseEndOfBody(h){if(h.aborted){E.reject(new DOMException("aborted","AbortError"));return}E.resolve(h)}})),t.push(E.promise)}let s=await Promise.all(t),o=[],a=0;for(let l of s){let u={type:"put",request:r[a],response:l};o.push(u),a++}let c=Si(),g=null;try{MA(this,pA,fg).call(this,o)}catch(l){g=l}return queueMicrotask(()=>{g===null?c.resolve(void 0):c.reject(g)}),c.promise}async put(A,t){F.brandCheck(this,zt),F.argumentLengthCheck(arguments,2,{header:"Cache.put"}),A=F.converters.RequestInfo(A),t=F.converters.Response(t);let r=null;if(A instanceof Ft?r=A[gA]:r=new Ft(A)[gA],!Cg(r.url)||r.method!=="GET")throw F.errors.exception({header:"Cache.put",message:"Expected an http/s scheme when method is not GET"});let n=t[gA];if(n.status===206)throw F.errors.exception({header:"Cache.put",message:"Got 206 status"});if(n.headersList.contains("vary")){let u=Zh(n.headersList.get("vary"));for(let E of u)if(E==="*")throw F.errors.exception({header:"Cache.put",message:"Got * vary field value"})}if(n.body&&(VG(n.body.stream)||n.body.stream.locked))throw F.errors.exception({header:"Cache.put",message:"Response body is locked or disturbed"});let i=qG(n),s=Si();if(n.body!=null){let E=n.body.stream.getReader();WG(E).then(s.resolve,s.reject)}else s.resolve(void 0);let o=[],a={type:"put",request:r,response:i};o.push(a);let c=await s.promise;i.body!=null&&(i.body.source=c);let g=Si(),l=null;try{MA(this,pA,fg).call(this,o)}catch(u){l=u}return queueMicrotask(()=>{l===null?g.resolve():g.reject(l)}),g.promise}async delete(A,t={}){F.brandCheck(this,zt),F.argumentLengthCheck(arguments,1,{header:"Cache.delete"}),A=F.converters.RequestInfo(A),t=F.converters.CacheQueryOptions(t);let r=null;if(A instanceof Ft){if(r=A[gA],r.method!=="GET"&&!t.ignoreMethod)return!1}else Xh(typeof A=="string"),r=new Ft(A)[gA];let n=[],i={type:"delete",request:r,options:t};n.push(i);let s=Si(),o=null,a;try{a=MA(this,pA,fg).call(this,n)}catch(c){o=c}return queueMicrotask(()=>{o===null?s.resolve(!!a?.length):s.reject(o)}),s.promise}async keys(A=void 0,t={}){F.brandCheck(this,zt),A!==void 0&&(A=F.converters.RequestInfo(A)),t=F.converters.CacheQueryOptions(t);let r=null;if(A!==void 0)if(A instanceof Ft){if(r=A[gA],r.method!=="GET"&&!t.ignoreMethod)return[]}else typeof A=="string"&&(r=new Ft(A)[gA]);let n=Si(),i=[];if(A===void 0)for(let s of f(this,Nt))i.push(s[0]);else{let s=MA(this,pA,Fi).call(this,r,t);for(let o of s)i.push(o[0])}return queueMicrotask(()=>{let s=[];for(let o of i){let a=new Ft("https://a");a[gA]=o,a[Qg][k0]=o.headersList,a[Qg][S0]="immutable",a[OG]=o.client,s.push(a)}n.resolve(Object.freeze(s))}),n.promise}};Nt=new WeakMap,pA=new WeakSet,fg=function(A){let t=f(this,Nt),r=[...t],n=[],i=[];try{for(let s of A){if(s.type!=="delete"&&s.type!=="put")throw F.errors.exception({header:"Cache.#batchCacheOperations",message:'operation type does not match "delete" or "put"'});if(s.type==="delete"&&s.response!=null)throw F.errors.exception({header:"Cache.#batchCacheOperations",message:"delete operation should not have an associated response"});if(MA(this,pA,Fi).call(this,s.request,s.options,n).length)throw new DOMException("???","InvalidStateError");let o;if(s.type==="delete"){if(o=MA(this,pA,Fi).call(this,s.request,s.options),o.length===0)return[];for(let a of o){let c=t.indexOf(a);Xh(c!==-1),t.splice(c,1)}}else if(s.type==="put"){if(s.response==null)throw F.errors.exception({header:"Cache.#batchCacheOperations",message:"put operation should have an associated response"});let a=s.request;if(!Cg(a.url))throw F.errors.exception({header:"Cache.#batchCacheOperations",message:"expected http or https scheme"});if(a.method!=="GET")throw F.errors.exception({header:"Cache.#batchCacheOperations",message:"not get method"});if(s.options!=null)throw F.errors.exception({header:"Cache.#batchCacheOperations",message:"options must not be defined"});o=MA(this,pA,Fi).call(this,s.request);for(let c of o){let g=t.indexOf(c);Xh(g!==-1),t.splice(g,1)}t.push([s.request,s.response]),n.push([s.request,s.response])}i.push([s.request,s.response])}return i}catch(s){throw f(this,Nt).length=0,Ae(this,Nt,r),s}},Fi=function(A,t,r){let n=[],i=r??f(this,Nt);for(let s of i){let[o,a]=s;MA(this,pA,N0).call(this,A,o,a,t)&&n.push(s)}return n},N0=function(A,t,r=null,n){let i=new URL(A.url),s=new URL(t.url);if(n?.ignoreSearch&&(s.search="",i.search=""),!YG(i,s,!0))return!1;if(r==null||n?.ignoreVary||!r.headersList.contains("vary"))return!0;let o=Zh(r.headersList.get("vary"));for(let a of o){if(a==="*")return!1;let c=t.headersList.get(a),g=A.headersList.get(a);if(c!==g)return!1}return!0};var Ig=zt;Object.defineProperties(Ig.prototype,{[Symbol.toStringTag]:{value:"Cache",configurable:!0},match:sn,matchAll:sn,add:sn,addAll:sn,put:sn,delete:sn,keys:sn});var x0=[{key:"ignoreSearch",converter:F.converters.boolean,defaultValue:!1},{key:"ignoreMethod",converter:F.converters.boolean,defaultValue:!1},{key:"ignoreVary",converter:F.converters.boolean,defaultValue:!1}];F.converters.CacheQueryOptions=F.dictionaryConverter(x0);F.converters.MultiCacheQueryOptions=F.dictionaryConverter([...x0,{key:"cacheName",converter:F.converters.DOMString}]);F.converters.Response=F.interfaceConverter(F0);F.converters["sequence"]=F.sequenceConverter(F.converters.RequestInfo);L0.exports={Cache:Ig}});var M0=Q((b8,T0)=>{"use strict";var{kConstruct:oo}=dg(),{Cache:Bg}=U0(),{webidl:lA}=iA(),{kEnumerableProperty:ao}=W(),OA,on=class on{constructor(){Ne(this,OA,new Map);arguments[0]!==oo&&lA.illegalConstructor()}async match(A,t={}){if(lA.brandCheck(this,on),lA.argumentLengthCheck(arguments,1,{header:"CacheStorage.match"}),A=lA.converters.RequestInfo(A),t=lA.converters.MultiCacheQueryOptions(t),t.cacheName!=null){if(f(this,OA).has(t.cacheName)){let r=f(this,OA).get(t.cacheName);return await new Bg(oo,r).match(A,t)}}else for(let r of f(this,OA).values()){let i=await new Bg(oo,r).match(A,t);if(i!==void 0)return i}}async has(A){return lA.brandCheck(this,on),lA.argumentLengthCheck(arguments,1,{header:"CacheStorage.has"}),A=lA.converters.DOMString(A),f(this,OA).has(A)}async open(A){if(lA.brandCheck(this,on),lA.argumentLengthCheck(arguments,1,{header:"CacheStorage.open"}),A=lA.converters.DOMString(A),f(this,OA).has(A)){let r=f(this,OA).get(A);return new Bg(oo,r)}let t=[];return f(this,OA).set(A,t),new Bg(oo,t)}async delete(A){return lA.brandCheck(this,on),lA.argumentLengthCheck(arguments,1,{header:"CacheStorage.delete"}),A=lA.converters.DOMString(A),f(this,OA).delete(A)}async keys(){return lA.brandCheck(this,on),[...f(this,OA).keys()]}};OA=new WeakMap;var pg=on;Object.defineProperties(pg.prototype,{[Symbol.toStringTag]:{value:"CacheStorage",configurable:!0},match:ao,has:ao,open:ao,delete:ao,keys:ao});T0.exports={CacheStorage:pg}});var P0=Q((S8,v0)=>{"use strict";v0.exports={maxAttributeValueSize:1024,maxNameValuePairSize:4096}});var zh=Q((F8,Y0)=>{"use strict";var G0=require("assert"),{kHeadersList:J0}=de();function jG(e){if(e.length===0)return!1;for(let A of e){let t=A.charCodeAt(0);if(t>=0||t<=8||t>=10||t<=31||t===127)return!1}}function KG(e){for(let A of e){let t=A.charCodeAt(0);if(t<=32||t>127||A==="("||A===")"||A===">"||A==="<"||A==="@"||A===","||A===";"||A===":"||A==="\\"||A==='"'||A==="/"||A==="["||A==="]"||A==="?"||A==="="||A==="{"||A==="}")throw new Error("Invalid cookie name")}}function ZG(e){for(let A of e){let t=A.charCodeAt(0);if(t<33||t===34||t===44||t===59||t===92||t>126)throw new Error("Invalid header value")}}function XG(e){for(let A of e)if(A.charCodeAt(0)<33||A===";")throw new Error("Invalid cookie path")}function zG(e){if(e.startsWith("-")||e.endsWith(".")||e.endsWith("-"))throw new Error("Invalid cookie domain")}function $G(e){typeof e=="number"&&(e=new Date(e));let A=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],r=A[e.getUTCDay()],n=e.getUTCDate().toString().padStart(2,"0"),i=t[e.getUTCMonth()],s=e.getUTCFullYear(),o=e.getUTCHours().toString().padStart(2,"0"),a=e.getUTCMinutes().toString().padStart(2,"0"),c=e.getUTCSeconds().toString().padStart(2,"0");return`${r}, ${n} ${i} ${s} ${o}:${a}:${c} GMT`}function eJ(e){if(e<0)throw new Error("Invalid cookie max-age")}function AJ(e){if(e.name.length===0)return null;KG(e.name),ZG(e.value);let A=[`${e.name}=${e.value}`];e.name.startsWith("__Secure-")&&(e.secure=!0),e.name.startsWith("__Host-")&&(e.secure=!0,e.domain=null,e.path="/"),e.secure&&A.push("Secure"),e.httpOnly&&A.push("HttpOnly"),typeof e.maxAge=="number"&&(eJ(e.maxAge),A.push(`Max-Age=${e.maxAge}`)),e.domain&&(zG(e.domain),A.push(`Domain=${e.domain}`)),e.path&&(XG(e.path),A.push(`Path=${e.path}`)),e.expires&&e.expires.toString()!=="Invalid Date"&&A.push(`Expires=${$G(e.expires)}`),e.sameSite&&A.push(`SameSite=${e.sameSite}`);for(let t of e.unparsed){if(!t.includes("="))throw new Error("Invalid unparsed");let[r,...n]=t.split("=");A.push(`${r.trim()}=${n.join("=")}`)}return A.join("; ")}var mg;function tJ(e){if(e[J0])return e[J0];mg||(mg=Object.getOwnPropertySymbols(e).find(t=>t.description==="headers list"),G0(mg,"Headers cannot be parsed"));let A=e[mg];return G0(A),A}Y0.exports={isCTLExcludingHtab:jG,stringify:AJ,getHeadersList:tJ}});var q0=Q((N8,V0)=>{"use strict";var{maxNameValuePairSize:rJ,maxAttributeValueSize:nJ}=P0(),{isCTLExcludingHtab:iJ}=zh(),{collectASequenceOfCodePointsFast:yg}=$A(),sJ=require("assert");function oJ(e){if(iJ(e))return null;let A="",t="",r="",n="";if(e.includes(";")){let i={position:0};A=yg(";",e,i),t=e.slice(i.position)}else A=e;if(!A.includes("="))n=A;else{let i={position:0};r=yg("=",A,i),n=A.slice(i.position+1)}return r=r.trim(),n=n.trim(),r.length+n.length>rJ?null:{name:r,value:n,...Ni(t)}}function Ni(e,A={}){if(e.length===0)return A;sJ(e[0]===";"),e=e.slice(1);let t="";e.includes(";")?(t=yg(";",e,{position:0}),e=e.slice(t.length)):(t=e,e="");let r="",n="";if(t.includes("=")){let s={position:0};r=yg("=",t,s),n=t.slice(s.position+1)}else r=t;if(r=r.trim(),n=n.trim(),n.length>nJ)return Ni(e,A);let i=r.toLowerCase();if(i==="expires"){let s=new Date(n);A.expires=s}else if(i==="max-age"){let s=n.charCodeAt(0);if((s<48||s>57)&&n[0]!=="-"||!/^\d+$/.test(n))return Ni(e,A);let o=Number(n);A.maxAge=o}else if(i==="domain"){let s=n;s[0]==="."&&(s=s.slice(1)),s=s.toLowerCase(),A.domain=s}else if(i==="path"){let s="";n.length===0||n[0]!=="/"?s="/":s=n,A.path=s}else if(i==="secure")A.secure=!0;else if(i==="httponly")A.httpOnly=!0;else if(i==="samesite"){let s="Default",o=n.toLowerCase();o.includes("none")&&(s="None"),o.includes("strict")&&(s="Strict"),o.includes("lax")&&(s="Lax"),A.sameSite=s}else A.unparsed??=[],A.unparsed.push(`${r}=${n}`);return Ni(e,A)}V0.exports={parseSetCookie:oJ,parseUnparsedAttributes:Ni}});var _0=Q((x8,W0)=>{"use strict";var{parseSetCookie:aJ}=q0(),{stringify:O0,getHeadersList:cJ}=zh(),{webidl:O}=iA(),{Headers:wg}=tn();function gJ(e){O.argumentLengthCheck(arguments,1,{header:"getCookies"}),O.brandCheck(e,wg,{strict:!1});let A=e.get("cookie"),t={};if(!A)return t;for(let r of A.split(";")){let[n,...i]=r.split("=");t[n.trim()]=i.join("=")}return t}function lJ(e,A,t){O.argumentLengthCheck(arguments,2,{header:"deleteCookie"}),O.brandCheck(e,wg,{strict:!1}),A=O.converters.DOMString(A),t=O.converters.DeleteCookieAttributes(t),H0(e,{name:A,value:"",expires:new Date(0),...t})}function uJ(e){O.argumentLengthCheck(arguments,1,{header:"getSetCookies"}),O.brandCheck(e,wg,{strict:!1});let A=cJ(e).cookies;return A?A.map(t=>aJ(Array.isArray(t)?t[1]:t)):[]}function H0(e,A){O.argumentLengthCheck(arguments,2,{header:"setCookie"}),O.brandCheck(e,wg,{strict:!1}),A=O.converters.Cookie(A),O0(A)&&e.append("Set-Cookie",O0(A))}O.converters.DeleteCookieAttributes=O.dictionaryConverter([{converter:O.nullableConverter(O.converters.DOMString),key:"path",defaultValue:null},{converter:O.nullableConverter(O.converters.DOMString),key:"domain",defaultValue:null}]);O.converters.Cookie=O.dictionaryConverter([{converter:O.converters.DOMString,key:"name"},{converter:O.converters.DOMString,key:"value"},{converter:O.nullableConverter(e=>typeof e=="number"?O.converters["unsigned long long"](e):new Date(e)),key:"expires",defaultValue:null},{converter:O.nullableConverter(O.converters["long long"]),key:"maxAge",defaultValue:null},{converter:O.nullableConverter(O.converters.DOMString),key:"domain",defaultValue:null},{converter:O.nullableConverter(O.converters.DOMString),key:"path",defaultValue:null},{converter:O.nullableConverter(O.converters.boolean),key:"secure",defaultValue:null},{converter:O.nullableConverter(O.converters.boolean),key:"httpOnly",defaultValue:null},{converter:O.converters.USVString,key:"sameSite",allowedValues:["Strict","Lax","None"]},{converter:O.sequenceConverter(O.converters.DOMString),key:"unparsed",defaultValue:[]}]);W0.exports={getCookies:gJ,deleteCookie:lJ,getSetCookies:uJ,setCookie:H0}});var xi=Q((L8,j0)=>{"use strict";var EJ="258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hJ={enumerable:!0,writable:!1,configurable:!1},dJ={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},QJ={CONTINUATION:0,TEXT:1,BINARY:2,CLOSE:8,PING:9,PONG:10},CJ=2**16-1,fJ={INFO:0,PAYLOADLENGTH_16:2,PAYLOADLENGTH_64:3,READ_DATA:4},IJ=Buffer.allocUnsafe(0);j0.exports={uid:EJ,staticPropertyDescriptors:hJ,states:dJ,opcodes:QJ,maxUnsigned16Bit:CJ,parserStates:fJ,emptyBuffer:IJ}});var co=Q((U8,K0)=>{"use strict";K0.exports={kWebSocketURL:Symbol("url"),kReadyState:Symbol("ready state"),kController:Symbol("controller"),kResponse:Symbol("response"),kBinaryType:Symbol("binary type"),kSentClose:Symbol("sent close"),kReceivedClose:Symbol("received close"),kByteParser:Symbol("byte parser")}});var ed=Q((T8,Z0)=>{"use strict";var{webidl:N}=iA(),{kEnumerableProperty:mA}=W(),{MessagePort:BJ}=require("worker_threads"),nt,$t=class $t extends Event{constructor(t,r={}){N.argumentLengthCheck(arguments,1,{header:"MessageEvent constructor"}),t=N.converters.DOMString(t),r=N.converters.MessageEventInit(r);super(t,r);Ne(this,nt);Ae(this,nt,r)}get data(){return N.brandCheck(this,$t),f(this,nt).data}get origin(){return N.brandCheck(this,$t),f(this,nt).origin}get lastEventId(){return N.brandCheck(this,$t),f(this,nt).lastEventId}get source(){return N.brandCheck(this,$t),f(this,nt).source}get ports(){return N.brandCheck(this,$t),Object.isFrozen(f(this,nt).ports)||Object.freeze(f(this,nt).ports),f(this,nt).ports}initMessageEvent(t,r=!1,n=!1,i=null,s="",o="",a=null,c=[]){return N.brandCheck(this,$t),N.argumentLengthCheck(arguments,1,{header:"MessageEvent.initMessageEvent"}),new $t(t,{bubbles:r,cancelable:n,data:i,origin:s,lastEventId:o,source:a,ports:c})}};nt=new WeakMap;var Rg=$t,cn,go=class go extends Event{constructor(t,r={}){N.argumentLengthCheck(arguments,1,{header:"CloseEvent constructor"}),t=N.converters.DOMString(t),r=N.converters.CloseEventInit(r);super(t,r);Ne(this,cn);Ae(this,cn,r)}get wasClean(){return N.brandCheck(this,go),f(this,cn).wasClean}get code(){return N.brandCheck(this,go),f(this,cn).code}get reason(){return N.brandCheck(this,go),f(this,cn).reason}};cn=new WeakMap;var Dg=go,er,an=class an extends Event{constructor(t,r){N.argumentLengthCheck(arguments,1,{header:"ErrorEvent constructor"});super(t,r);Ne(this,er);t=N.converters.DOMString(t),r=N.converters.ErrorEventInit(r??{}),Ae(this,er,r)}get message(){return N.brandCheck(this,an),f(this,er).message}get filename(){return N.brandCheck(this,an),f(this,er).filename}get lineno(){return N.brandCheck(this,an),f(this,er).lineno}get colno(){return N.brandCheck(this,an),f(this,er).colno}get error(){return N.brandCheck(this,an),f(this,er).error}};er=new WeakMap;var bg=an;Object.defineProperties(Rg.prototype,{[Symbol.toStringTag]:{value:"MessageEvent",configurable:!0},data:mA,origin:mA,lastEventId:mA,source:mA,ports:mA,initMessageEvent:mA});Object.defineProperties(Dg.prototype,{[Symbol.toStringTag]:{value:"CloseEvent",configurable:!0},reason:mA,code:mA,wasClean:mA});Object.defineProperties(bg.prototype,{[Symbol.toStringTag]:{value:"ErrorEvent",configurable:!0},message:mA,filename:mA,lineno:mA,colno:mA,error:mA});N.converters.MessagePort=N.interfaceConverter(BJ);N.converters["sequence"]=N.sequenceConverter(N.converters.MessagePort);var $h=[{key:"bubbles",converter:N.converters.boolean,defaultValue:!1},{key:"cancelable",converter:N.converters.boolean,defaultValue:!1},{key:"composed",converter:N.converters.boolean,defaultValue:!1}];N.converters.MessageEventInit=N.dictionaryConverter([...$h,{key:"data",converter:N.converters.any,defaultValue:null},{key:"origin",converter:N.converters.USVString,defaultValue:""},{key:"lastEventId",converter:N.converters.DOMString,defaultValue:""},{key:"source",converter:N.nullableConverter(N.converters.MessagePort),defaultValue:null},{key:"ports",converter:N.converters["sequence"],get defaultValue(){return[]}}]);N.converters.CloseEventInit=N.dictionaryConverter([...$h,{key:"wasClean",converter:N.converters.boolean,defaultValue:!1},{key:"code",converter:N.converters["unsigned short"],defaultValue:0},{key:"reason",converter:N.converters.USVString,defaultValue:""}]);N.converters.ErrorEventInit=N.dictionaryConverter([...$h,{key:"message",converter:N.converters.DOMString,defaultValue:""},{key:"filename",converter:N.converters.USVString,defaultValue:""},{key:"lineno",converter:N.converters["unsigned long"],defaultValue:0},{key:"colno",converter:N.converters["unsigned long"],defaultValue:0},{key:"error",converter:N.converters.any}]);Z0.exports={MessageEvent:Rg,CloseEvent:Dg,ErrorEvent:bg}});var Fg=Q((v8,$0)=>{"use strict";var{kReadyState:kg,kController:pJ,kResponse:mJ,kBinaryType:yJ,kWebSocketURL:wJ}=co(),{states:Sg,opcodes:X0}=xi(),{MessageEvent:RJ,ErrorEvent:DJ}=ed();function bJ(e){return e[kg]===Sg.OPEN}function kJ(e){return e[kg]===Sg.CLOSING}function SJ(e){return e[kg]===Sg.CLOSED}function Ad(e,A,t=Event,r){let n=new t(e,r);A.dispatchEvent(n)}function FJ(e,A,t){if(e[kg]!==Sg.OPEN)return;let r;if(A===X0.TEXT)try{r=new TextDecoder("utf-8",{fatal:!0}).decode(t)}catch{z0(e,"Received invalid UTF-8 in text frame.");return}else A===X0.BINARY&&(e[yJ]==="blob"?r=new Blob([t]):r=new Uint8Array(t).buffer);Ad("message",e,RJ,{origin:e[wJ].origin,data:r})}function NJ(e){if(e.length===0)return!1;for(let A of e){let t=A.charCodeAt(0);if(t<33||t>126||A==="("||A===")"||A==="<"||A===">"||A==="@"||A===","||A===";"||A===":"||A==="\\"||A==='"'||A==="/"||A==="["||A==="]"||A==="?"||A==="="||A==="{"||A==="}"||t===32||t===9)return!1}return!0}function xJ(e){return e>=1e3&&e<1015?e!==1004&&e!==1005&&e!==1006:e>=3e3&&e<=4999}function z0(e,A){let{[pJ]:t,[mJ]:r}=e;t.abort(),r?.socket&&!r.socket.destroyed&&r.socket.destroy(),A&&Ad("error",e,DJ,{error:new Error(A)})}$0.exports={isEstablished:bJ,isClosing:kJ,isClosed:SJ,fireEvent:Ad,isValidSubprotocol:NJ,isValidStatusCode:xJ,failWebsocketConnection:z0,websocketMessageReceived:FJ}});var iR=Q((P8,nR)=>{"use strict";var rd=require("diagnostics_channel"),{uid:LJ,states:AR}=xi(),{kReadyState:tR,kSentClose:eR,kByteParser:rR,kReceivedClose:UJ}=co(),{fireEvent:TJ,failWebsocketConnection:gn}=Fg(),{CloseEvent:MJ}=ed(),{makeRequest:vJ}=no(),{fetching:PJ}=lg(),{Headers:GJ}=tn(),{getGlobalDispatcher:JJ}=Ii(),{kHeadersList:YJ}=de(),Ar={};Ar.open=rd.channel("undici:websocket:open");Ar.close=rd.channel("undici:websocket:close");Ar.socketError=rd.channel("undici:websocket:socket_error");var td;try{td=require("crypto")}catch{}function VJ(e,A,t,r,n){let i=e;i.protocol=e.protocol==="ws:"?"http:":"https:";let s=vJ({urlList:[i],serviceWorkers:"none",referrer:"no-referrer",mode:"websocket",credentials:"include",cache:"no-store",redirect:"error"});if(n.headers){let g=new GJ(n.headers)[YJ];s.headersList=g}let o=td.randomBytes(16).toString("base64");s.headersList.append("sec-websocket-key",o),s.headersList.append("sec-websocket-version","13");for(let g of A)s.headersList.append("sec-websocket-protocol",g);let a="";return PJ({request:s,useParallelQueue:!0,dispatcher:n.dispatcher??JJ(),processResponse(g){if(g.type==="error"||g.status!==101){gn(t,"Received network error or non-101 status code.");return}if(A.length!==0&&!g.headersList.get("Sec-WebSocket-Protocol")){gn(t,"Server did not respond with sent protocols.");return}if(g.headersList.get("Upgrade")?.toLowerCase()!=="websocket"){gn(t,'Server did not set Upgrade header to "websocket".');return}if(g.headersList.get("Connection")?.toLowerCase()!=="upgrade"){gn(t,'Server did not set Connection header to "upgrade".');return}let l=g.headersList.get("Sec-WebSocket-Accept"),u=td.createHash("sha1").update(o+LJ).digest("base64");if(l!==u){gn(t,"Incorrect hash received in Sec-WebSocket-Accept header.");return}let E=g.headersList.get("Sec-WebSocket-Extensions");if(E!==null&&E!==a){gn(t,"Received different permessage-deflate than the one set.");return}let h=g.headersList.get("Sec-WebSocket-Protocol");if(h!==null&&h!==s.headersList.get("Sec-WebSocket-Protocol")){gn(t,"Protocol was not set in the opening handshake.");return}g.socket.on("data",qJ),g.socket.on("close",OJ),g.socket.on("error",HJ),Ar.open.hasSubscribers&&Ar.open.publish({address:g.socket.address(),protocol:h,extensions:E}),r(g)}})}function qJ(e){this.ws[rR].write(e)||this.pause()}function OJ(){let{ws:e}=this,A=e[eR]&&e[UJ],t=1005,r="",n=e[rR].closingInfo;n?(t=n.code??1005,r=n.reason):e[eR]||(t=1006),e[tR]=AR.CLOSED,TJ("close",e,MJ,{wasClean:A,code:t,reason:r}),Ar.close.hasSubscribers&&Ar.close.publish({websocket:e,code:t,reason:r})}function HJ(e){let{ws:A}=this;A[tR]=AR.CLOSING,Ar.socketError.hasSubscribers&&Ar.socketError.publish(e),this.destroy()}nR.exports={establishWebSocketConnection:VJ}});var id=Q((G8,oR)=>{"use strict";var{maxUnsigned16Bit:WJ}=xi(),sR;try{sR=require("crypto")}catch{}var nd=class{constructor(A){this.frameData=A,this.maskKey=sR.randomBytes(4)}createFrame(A){let t=this.frameData?.byteLength??0,r=t,n=6;t>WJ?(n+=8,r=127):t>125&&(n+=2,r=126);let i=Buffer.allocUnsafe(t+n);i[0]=i[1]=0,i[0]|=128,i[0]=(i[0]&240)+A;i[n-4]=this.maskKey[0],i[n-3]=this.maskKey[1],i[n-2]=this.maskKey[2],i[n-1]=this.maskKey[3],i[1]=r,r===126?i.writeUInt16BE(t,2):r===127&&(i[2]=i[3]=0,i.writeUIntBE(t,4,6)),i[1]|=128;for(let s=0;s{"use strict";var{Writable:_J}=require("stream"),ER=require("diagnostics_channel"),{parserStates:HA,opcodes:WA,states:jJ,emptyBuffer:KJ}=xi(),{kReadyState:ZJ,kSentClose:aR,kResponse:cR,kReceivedClose:gR}=co(),{isValidStatusCode:lR,failWebsocketConnection:lo,websocketMessageReceived:XJ}=Fg(),{WebsocketFrameSend:uR}=id(),Li={};Li.ping=ER.channel("undici:websocket:ping");Li.pong=ER.channel("undici:websocket:pong");var it,uA,yA,_,Ui,sd=class extends _J{constructor(t){super();Ne(this,it,[]);Ne(this,uA,0);Ne(this,yA,HA.INFO);Ne(this,_,{});Ne(this,Ui,[]);this.ws=t}_write(t,r,n){f(this,it).push(t),Ae(this,uA,f(this,uA)+t.length),this.run(n)}run(t){for(;;){if(f(this,yA)===HA.INFO){if(f(this,uA)<2)return t();let r=this.consume(2);if(f(this,_).fin=(r[0]&128)!==0,f(this,_).opcode=r[0]&15,f(this,_).originalOpcode??=f(this,_).opcode,f(this,_).fragmented=!f(this,_).fin&&f(this,_).opcode!==WA.CONTINUATION,f(this,_).fragmented&&f(this,_).opcode!==WA.BINARY&&f(this,_).opcode!==WA.TEXT){lo(this.ws,"Invalid frame type was fragmented.");return}let n=r[1]&127;if(n<=125?(f(this,_).payloadLength=n,Ae(this,yA,HA.READ_DATA)):n===126?Ae(this,yA,HA.PAYLOADLENGTH_16):n===127&&Ae(this,yA,HA.PAYLOADLENGTH_64),f(this,_).fragmented&&n>125){lo(this.ws,"Fragmented frame exceeded 125 bytes.");return}else if((f(this,_).opcode===WA.PING||f(this,_).opcode===WA.PONG||f(this,_).opcode===WA.CLOSE)&&n>125){lo(this.ws,"Payload length for control frame exceeded 125 bytes.");return}else if(f(this,_).opcode===WA.CLOSE){if(n===1){lo(this.ws,"Received close frame with a 1-byte body.");return}let i=this.consume(n);if(f(this,_).closeInfo=this.parseCloseBody(!1,i),!this.ws[aR]){let s=Buffer.allocUnsafe(2);s.writeUInt16BE(f(this,_).closeInfo.code,0);let o=new uR(s);this.ws[cR].socket.write(o.createFrame(WA.CLOSE),a=>{a||(this.ws[aR]=!0)})}this.ws[ZJ]=jJ.CLOSING,this.ws[gR]=!0,this.end();return}else if(f(this,_).opcode===WA.PING){let i=this.consume(n);if(!this.ws[gR]){let s=new uR(i);this.ws[cR].socket.write(s.createFrame(WA.PONG)),Li.ping.hasSubscribers&&Li.ping.publish({payload:i})}if(Ae(this,yA,HA.INFO),f(this,uA)>0)continue;t();return}else if(f(this,_).opcode===WA.PONG){let i=this.consume(n);if(Li.pong.hasSubscribers&&Li.pong.publish({payload:i}),f(this,uA)>0)continue;t();return}}else if(f(this,yA)===HA.PAYLOADLENGTH_16){if(f(this,uA)<2)return t();let r=this.consume(2);f(this,_).payloadLength=r.readUInt16BE(0),Ae(this,yA,HA.READ_DATA)}else if(f(this,yA)===HA.PAYLOADLENGTH_64){if(f(this,uA)<8)return t();let r=this.consume(8),n=r.readUInt32BE(0);if(n>2**31-1){lo(this.ws,"Received payload length > 2^31 bytes.");return}let i=r.readUInt32BE(4);f(this,_).payloadLength=(n<<8)+i,Ae(this,yA,HA.READ_DATA)}else if(f(this,yA)===HA.READ_DATA){if(f(this,uA)=f(this,_).payloadLength){let r=this.consume(f(this,_).payloadLength);if(f(this,Ui).push(r),!f(this,_).fragmented||f(this,_).fin&&f(this,_).opcode===WA.CONTINUATION){let n=Buffer.concat(f(this,Ui));XJ(this.ws,f(this,_).originalOpcode,n),Ae(this,_,{}),f(this,Ui).length=0}Ae(this,yA,HA.INFO)}}if(!(f(this,uA)>0)){t();break}}}consume(t){if(t>f(this,uA))return null;if(t===0)return KJ;if(f(this,it)[0].length===t)return Ae(this,uA,f(this,uA)-f(this,it)[0].length),f(this,it).shift();let r=Buffer.allocUnsafe(t),n=0;for(;n!==t;){let i=f(this,it)[0],{length:s}=i;if(s+n===t){r.set(f(this,it).shift(),n);break}else if(s+n>t){r.set(i.subarray(0,t-n),n),f(this,it)[0]=i.subarray(t-n);break}else r.set(f(this,it).shift(),n),n+=i.length}return Ae(this,uA,f(this,uA)-t),r}parseCloseBody(t,r){let n;if(r.length>=2&&(n=r.readUInt16BE(0)),t)return lR(n)?{code:n}:null;let i=r.subarray(2);if(i[0]===239&&i[1]===187&&i[2]===191&&(i=i.subarray(3)),n!==void 0&&!lR(n))return null;try{i=new TextDecoder("utf-8",{fatal:!0}).decode(i)}catch{return null}return{code:n,reason:i}}get closingInfo(){return f(this,_).closeInfo}};it=new WeakMap,uA=new WeakMap,yA=new WeakMap,_=new WeakMap,Ui=new WeakMap;hR.exports={ByteParser:sd}});var wR=Q((V8,yR)=>{"use strict";var{webidl:M}=iA(),{DOMException:Nr}=mr(),{URLSerializer:zJ}=$A(),{getGlobalOrigin:$J}=Xn(),{staticPropertyDescriptors:xr,states:Ti,opcodes:uo,emptyBuffer:eY}=xi(),{kWebSocketURL:QR,kReadyState:tr,kController:AY,kBinaryType:Ng,kResponse:xg,kSentClose:tY,kByteParser:rY}=co(),{isEstablished:CR,isClosing:fR,isValidSubprotocol:nY,failWebsocketConnection:iY,fireEvent:sY}=Fg(),{establishWebSocketConnection:oY}=iR(),{WebsocketFrameSend:Eo}=id(),{ByteParser:aY}=dR(),{kEnumerableProperty:_A,isBlobLike:BR}=W(),{getGlobalDispatcher:cY}=Ii(),{types:pR}=require("util"),IR=!1,ke,jA,ho,Qo,Lg,mR,me=class me extends EventTarget{constructor(t,r=[]){super();Ne(this,Lg);Ne(this,ke,{open:null,error:null,close:null,message:null});Ne(this,jA,0);Ne(this,ho,"");Ne(this,Qo,"");M.argumentLengthCheck(arguments,1,{header:"WebSocket constructor"}),IR||(IR=!0,process.emitWarning("WebSockets are experimental, expect them to change at any time.",{code:"UNDICI-WS"}));let n=M.converters["DOMString or sequence or WebSocketInit"](r);t=M.converters.USVString(t),r=n.protocols;let i=$J(),s;try{s=new URL(t,i)}catch(o){throw new Nr(o,"SyntaxError")}if(s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),s.protocol!=="ws:"&&s.protocol!=="wss:")throw new Nr(`Expected a ws: or wss: protocol, got ${s.protocol}`,"SyntaxError");if(s.hash||s.href.endsWith("#"))throw new Nr("Got fragment","SyntaxError");if(typeof r=="string"&&(r=[r]),r.length!==new Set(r.map(o=>o.toLowerCase())).size)throw new Nr("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(r.length>0&&!r.every(o=>nY(o)))throw new Nr("Invalid Sec-WebSocket-Protocol value","SyntaxError");this[QR]=new URL(s.href),this[AY]=oY(s,r,this,o=>MA(this,Lg,mR).call(this,o),n),this[tr]=me.CONNECTING,this[Ng]="blob"}close(t=void 0,r=void 0){if(M.brandCheck(this,me),t!==void 0&&(t=M.converters["unsigned short"](t,{clamp:!0})),r!==void 0&&(r=M.converters.USVString(r)),t!==void 0&&t!==1e3&&(t<3e3||t>4999))throw new Nr("invalid code","InvalidAccessError");let n=0;if(r!==void 0&&(n=Buffer.byteLength(r),n>123))throw new Nr(`Reason must be less than 123 bytes; received ${n}`,"SyntaxError");if(!(this[tr]===me.CLOSING||this[tr]===me.CLOSED))if(!CR(this))iY(this,"Connection was closed before it was established."),this[tr]=me.CLOSING;else if(fR(this))this[tr]=me.CLOSING;else{let i=new Eo;t!==void 0&&r===void 0?(i.frameData=Buffer.allocUnsafe(2),i.frameData.writeUInt16BE(t,0)):t!==void 0&&r!==void 0?(i.frameData=Buffer.allocUnsafe(2+n),i.frameData.writeUInt16BE(t,0),i.frameData.write(r,2,"utf-8")):i.frameData=eY,this[xg].socket.write(i.createFrame(uo.CLOSE),o=>{o||(this[tY]=!0)}),this[tr]=Ti.CLOSING}}send(t){if(M.brandCheck(this,me),M.argumentLengthCheck(arguments,1,{header:"WebSocket.send"}),t=M.converters.WebSocketSendData(t),this[tr]===me.CONNECTING)throw new Nr("Sent before connected.","InvalidStateError");if(!CR(this)||fR(this))return;let r=this[xg].socket;if(typeof t=="string"){let n=Buffer.from(t),s=new Eo(n).createFrame(uo.TEXT);Ae(this,jA,f(this,jA)+n.byteLength),r.write(s,()=>{Ae(this,jA,f(this,jA)-n.byteLength)})}else if(pR.isArrayBuffer(t)){let n=Buffer.from(t),s=new Eo(n).createFrame(uo.BINARY);Ae(this,jA,f(this,jA)+n.byteLength),r.write(s,()=>{Ae(this,jA,f(this,jA)-n.byteLength)})}else if(ArrayBuffer.isView(t)){let n=Buffer.from(t,t.byteOffset,t.byteLength),s=new Eo(n).createFrame(uo.BINARY);Ae(this,jA,f(this,jA)+n.byteLength),r.write(s,()=>{Ae(this,jA,f(this,jA)-n.byteLength)})}else if(BR(t)){let n=new Eo;t.arrayBuffer().then(i=>{let s=Buffer.from(i);n.frameData=s;let o=n.createFrame(uo.BINARY);Ae(this,jA,f(this,jA)+s.byteLength),r.write(o,()=>{Ae(this,jA,f(this,jA)-s.byteLength)})})}}get readyState(){return M.brandCheck(this,me),this[tr]}get bufferedAmount(){return M.brandCheck(this,me),f(this,jA)}get url(){return M.brandCheck(this,me),zJ(this[QR])}get extensions(){return M.brandCheck(this,me),f(this,Qo)}get protocol(){return M.brandCheck(this,me),f(this,ho)}get onopen(){return M.brandCheck(this,me),f(this,ke).open}set onopen(t){M.brandCheck(this,me),f(this,ke).open&&this.removeEventListener("open",f(this,ke).open),typeof t=="function"?(f(this,ke).open=t,this.addEventListener("open",t)):f(this,ke).open=null}get onerror(){return M.brandCheck(this,me),f(this,ke).error}set onerror(t){M.brandCheck(this,me),f(this,ke).error&&this.removeEventListener("error",f(this,ke).error),typeof t=="function"?(f(this,ke).error=t,this.addEventListener("error",t)):f(this,ke).error=null}get onclose(){return M.brandCheck(this,me),f(this,ke).close}set onclose(t){M.brandCheck(this,me),f(this,ke).close&&this.removeEventListener("close",f(this,ke).close),typeof t=="function"?(f(this,ke).close=t,this.addEventListener("close",t)):f(this,ke).close=null}get onmessage(){return M.brandCheck(this,me),f(this,ke).message}set onmessage(t){M.brandCheck(this,me),f(this,ke).message&&this.removeEventListener("message",f(this,ke).message),typeof t=="function"?(f(this,ke).message=t,this.addEventListener("message",t)):f(this,ke).message=null}get binaryType(){return M.brandCheck(this,me),this[Ng]}set binaryType(t){M.brandCheck(this,me),t!=="blob"&&t!=="arraybuffer"?this[Ng]="blob":this[Ng]=t}};ke=new WeakMap,jA=new WeakMap,ho=new WeakMap,Qo=new WeakMap,Lg=new WeakSet,mR=function(t){this[xg]=t;let r=new aY(this);r.on("drain",function(){this.ws[xg].socket.resume()}),t.socket.ws=this,this[rY]=r,this[tr]=Ti.OPEN;let n=t.headersList.get("sec-websocket-extensions");n!==null&&Ae(this,Qo,n);let i=t.headersList.get("sec-websocket-protocol");i!==null&&Ae(this,ho,i),sY("open",this)};var TA=me;TA.CONNECTING=TA.prototype.CONNECTING=Ti.CONNECTING;TA.OPEN=TA.prototype.OPEN=Ti.OPEN;TA.CLOSING=TA.prototype.CLOSING=Ti.CLOSING;TA.CLOSED=TA.prototype.CLOSED=Ti.CLOSED;Object.defineProperties(TA.prototype,{CONNECTING:xr,OPEN:xr,CLOSING:xr,CLOSED:xr,url:_A,readyState:_A,bufferedAmount:_A,onopen:_A,onerror:_A,onclose:_A,close:_A,onmessage:_A,binaryType:_A,send:_A,extensions:_A,protocol:_A,[Symbol.toStringTag]:{value:"WebSocket",writable:!1,enumerable:!1,configurable:!0}});Object.defineProperties(TA,{CONNECTING:xr,OPEN:xr,CLOSING:xr,CLOSED:xr});M.converters["sequence"]=M.sequenceConverter(M.converters.DOMString);M.converters["DOMString or sequence"]=function(e){return M.util.Type(e)==="Object"&&Symbol.iterator in e?M.converters["sequence"](e):M.converters.DOMString(e)};M.converters.WebSocketInit=M.dictionaryConverter([{key:"protocols",converter:M.converters["DOMString or sequence"],get defaultValue(){return[]}},{key:"dispatcher",converter:e=>e,get defaultValue(){return cY()}},{key:"headers",converter:M.nullableConverter(M.converters.HeadersInit)}]);M.converters["DOMString or sequence or WebSocketInit"]=function(e){return M.util.Type(e)==="Object"&&!(Symbol.iterator in e)?M.converters.WebSocketInit(e):{protocols:M.converters["DOMString or sequence"](e)}};M.converters.WebSocketSendData=function(e){if(M.util.Type(e)==="Object"){if(BR(e))return M.converters.Blob(e,{strict:!1});if(ArrayBuffer.isView(e)||pR.isAnyArrayBuffer(e))return M.converters.BufferSource(e)}return M.converters.USVString(e)};yR.exports={WebSocket:TA}});var kR=Q((O8,G)=>{"use strict";var gY=Hs(),RR=uc(),DR=le(),lY=gi(),uY=vm(),EY=Ks(),ln=W(),{InvalidArgumentError:Ug}=DR,Mi=ky(),hY=vs(),dY=Qh(),QY=gw(),CY=Ih(),fY=nh(),IY=Qw(),BY=pw(),{getGlobalDispatcher:bR,setGlobalDispatcher:pY}=Ii(),mY=bw(),yY=dE(),wY=Qc(),od;try{require("crypto"),od=!0}catch{od=!1}Object.assign(RR.prototype,Mi);G.exports.Dispatcher=RR;G.exports.Client=gY;G.exports.Pool=lY;G.exports.BalancedPool=uY;G.exports.Agent=EY;G.exports.ProxyAgent=IY;G.exports.RetryHandler=BY;G.exports.DecoratorHandler=mY;G.exports.RedirectHandler=yY;G.exports.createRedirectInterceptor=wY;G.exports.buildConnector=hY;G.exports.errors=DR;function Co(e){return(A,t,r)=>{if(typeof t=="function"&&(r=t,t=null),!A||typeof A!="string"&&typeof A!="object"&&!(A instanceof URL))throw new Ug("invalid url");if(t!=null&&typeof t!="object")throw new Ug("invalid opts");if(t&&t.path!=null){if(typeof t.path!="string")throw new Ug("invalid opts.path");let s=t.path;t.path.startsWith("/")||(s=`/${s}`),A=new URL(ln.parseOrigin(A).origin+s)}else t||(t=typeof A=="object"?A:{}),A=ln.parseURL(A);let{agent:n,dispatcher:i=bR()}=t;if(n)throw new Ug("unsupported opts.agent. Did you mean opts.client?");return e.call(i,{...t,origin:A.origin,path:A.search?`${A.pathname}${A.search}`:A.pathname,method:t.method||(t.body?"PUT":"GET")},r)}}G.exports.setGlobalDispatcher=pY;G.exports.getGlobalDispatcher=bR;if(ln.nodeMajor>16||ln.nodeMajor===16&&ln.nodeMinor>=8){let e=null;G.exports.fetch=async function(s){e||(e=lg().fetch);try{return await e(...arguments)}catch(o){throw typeof o=="object"&&Error.captureStackTrace(o,this),o}},G.exports.Headers=tn().Headers,G.exports.Response=$c().Response,G.exports.Request=no().Request,G.exports.FormData=cc().FormData,G.exports.File=oc().File,G.exports.FileReader=y0().FileReader;let{setGlobalOrigin:A,getGlobalOrigin:t}=Xn();G.exports.setGlobalOrigin=A,G.exports.getGlobalOrigin=t;let{CacheStorage:r}=M0(),{kConstruct:n}=dg();G.exports.caches=new r(n)}if(ln.nodeMajor>=16){let{deleteCookie:e,getCookies:A,getSetCookies:t,setCookie:r}=_0();G.exports.deleteCookie=e,G.exports.getCookies=A,G.exports.getSetCookies=t,G.exports.setCookie=r;let{parseMIMEType:n,serializeAMimeType:i}=$A();G.exports.parseMIMEType=n,G.exports.serializeAMimeType=i}if(ln.nodeMajor>=18&&od){let{WebSocket:e}=wR();G.exports.WebSocket=e}G.exports.request=Co(Mi.request);G.exports.stream=Co(Mi.stream);G.exports.pipeline=Co(Mi.pipeline);G.exports.connect=Co(Mi.connect);G.exports.upgrade=Co(Mi.upgrade);G.exports.MockClient=dY;G.exports.MockPool=CY;G.exports.MockAgent=QY;G.exports.mockErrors=fY});var sV={};Wi(sV,{Debug:()=>Zg,Decimal:()=>ut,Extensions:()=>Wg,MetricsClient:()=>Yn,NotFoundError:()=>Pt,PrismaClientInitializationError:()=>z,PrismaClientKnownRequestError:()=>xe,PrismaClientRustPanicError:()=>JA,PrismaClientUnknownRequestError:()=>ve,PrismaClientValidationError:()=>Oe,Public:()=>_g,Sql:()=>dA,defineDmmfProperty:()=>Zf,deserializeJsonResponse:()=>Sn,dmmfToRuntimeDataModel:()=>Kf,empty:()=>eI,getPrismaClient:()=>DD,getRuntime:()=>xI,join:()=>$f,makeStrictEnum:()=>bD,makeTypedQueryFactory:()=>Xf,objectEnumValues:()=>Na,raw:()=>tu,serializeJsonQuery:()=>va,skip:()=>Ma,sqltag:()=>ru,warnEnvConflicts:()=>kD,warnOnce:()=>as});module.exports=MD(sV);var Wg={};Wi(Wg,{defineExtension:()=>bd,getExtensionContext:()=>kd});function bd(e){return typeof e=="function"?e:A=>A.$extends(e)}function kd(e){return e}var _g={};Wi(_g,{validator:()=>Sd});function Sd(...e){return A=>A}var vo={};Wi(vo,{$:()=>Ud,bgBlack:()=>WD,bgBlue:()=>ZD,bgCyan:()=>zD,bgGreen:()=>jD,bgMagenta:()=>XD,bgRed:()=>_D,bgWhite:()=>$D,bgYellow:()=>KD,black:()=>VD,blue:()=>Ut,bold:()=>Ve,cyan:()=>Tt,dim:()=>Ur,gray:()=>_i,green:()=>ir,grey:()=>HD,hidden:()=>JD,inverse:()=>GD,italic:()=>PD,magenta:()=>qD,red:()=>vA,reset:()=>vD,strikethrough:()=>YD,underline:()=>EA,white:()=>OD,yellow:()=>Lt});var jg,Fd,Nd,xd,Ld=!0;typeof process<"u"&&({FORCE_COLOR:jg,NODE_DISABLE_COLORS:Fd,NO_COLOR:Nd,TERM:xd}=process.env||{},Ld=process.stdout&&process.stdout.isTTY);var Ud={enabled:!Fd&&Nd==null&&xd!=="dumb"&&(jg!=null&&jg!=="0"||Ld)};function Ee(e,A){let t=new RegExp(`\\x1b\\[${A}m`,"g"),r=`\x1B[${e}m`,n=`\x1B[${A}m`;return function(i){return!Ud.enabled||i==null?i:r+(~(""+i).indexOf(n)?i.replace(t,n+r):i)+n}}var vD=Ee(0,0),Ve=Ee(1,22),Ur=Ee(2,22),PD=Ee(3,23),EA=Ee(4,24),GD=Ee(7,27),JD=Ee(8,28),YD=Ee(9,29),VD=Ee(30,39),vA=Ee(31,39),ir=Ee(32,39),Lt=Ee(33,39),Ut=Ee(34,39),qD=Ee(35,39),Tt=Ee(36,39),OD=Ee(37,39),_i=Ee(90,39),HD=Ee(90,39),WD=Ee(40,49),_D=Ee(41,49),jD=Ee(42,49),KD=Ee(43,49),ZD=Ee(44,49),XD=Ee(45,49),zD=Ee(46,49),$D=Ee(47,49);var eb=100,Td=["green","yellow","blue","magenta","cyan","red"],ji=[],Md=Date.now(),Ab=0,Kg=typeof process<"u"?process.env:{};globalThis.DEBUG??=Kg.DEBUG??"";globalThis.DEBUG_COLORS??=Kg.DEBUG_COLORS?Kg.DEBUG_COLORS==="true":!0;var Ki={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let A=globalThis.DEBUG.split(",").map(n=>n.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),t=A.some(n=>n===""||n[0]==="-"?!1:e.match(RegExp(n.split("*").join(".*")+"$"))),r=A.some(n=>n===""||n[0]!=="-"?!1:e.match(RegExp(n.slice(1).split("*").join(".*")+"$")));return t&&!r},log:(...e)=>{let[A,t,...r]=e;(console.warn??console.log)(`${A} ${t}`,...r)},formatters:{}};function tb(e){let A={color:Td[Ab++%Td.length],enabled:Ki.enabled(e),namespace:e,log:Ki.log,extend:()=>{}},t=(...r)=>{let{enabled:n,namespace:i,color:s,log:o}=A;if(r.length!==0&&ji.push([i,...r]),ji.length>eb&&ji.shift(),Ki.enabled(i)||n){let a=r.map(g=>typeof g=="string"?g:rb(g)),c=`+${Date.now()-Md}ms`;Md=Date.now(),globalThis.DEBUG_COLORS?o(vo[s](Ve(i)),...a,vo[s](c)):o(i,...a,c)}};return new Proxy(t,{get:(r,n)=>A[n],set:(r,n,i)=>A[n]=i})}var Zg=new Proxy(tb,{get:(e,A)=>Ki[A],set:(e,A,t)=>Ki[A]=t});function rb(e,A=2){let t=new Set;return JSON.stringify(e,(r,n)=>{if(typeof n=="object"&&n!==null){if(t.has(n))return"[Circular *]";t.add(n)}else if(typeof n=="bigint")return n.toString();return n},A)}function vd(e=7500){let A=ji.map(([t,...r])=>`${t} ${r.map(n=>typeof n=="string"?n:JSON.stringify(n)).join(" ")}`).join(` +`);return A.length!!(e&&typeof e=="object"),Jo=e=>e&&!!e[Mt],ct=(e,A,t)=>{if(Jo(e)){let r=e[Mt](),{matched:n,selections:i}=r.match(A);return n&&i&&Object.keys(i).forEach(s=>t(s,i[s])),n}if(zg(e)){if(!zg(A))return!1;if(Array.isArray(e)){if(!Array.isArray(A))return!1;let r=[],n=[],i=[];for(let s of e.keys()){let o=e[s];Jo(o)&&o[nb]?i.push(o):i.length?n.push(o):r.push(o)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(A.lengthct(c,s[g],t))&&n.every((c,g)=>ct(c,o[g],t))&&(i.length===0||ct(i[0],a,t))}return e.length===A.length&&e.every((s,o)=>ct(s,A[o],t))}return Object.keys(e).every(r=>{let n=e[r];return(r in A||Jo(i=n)&&i[Mt]().matcherType==="optional")&&ct(n,A[r],t);var i})}return Object.is(A,e)},gr=e=>{var A,t,r;return zg(e)?Jo(e)?(A=(t=(r=e[Mt]()).getSelectionKeys)==null?void 0:t.call(r))!=null?A:[]:Array.isArray(e)?Zi(e,gr):Zi(Object.values(e),gr):[]},Zi=(e,A)=>e.reduce((t,r)=>t.concat(A(r)),[]);function PA(e){return Object.assign(e,{optional:()=>ib(e),and:A=>ye(e,A),or:A=>sb(e,A),select:A=>A===void 0?Gd(e):Gd(A,e)})}function ib(e){return PA({[Mt]:()=>({match:A=>{let t={},r=(n,i)=>{t[n]=i};return A===void 0?(gr(e).forEach(n=>r(n,void 0)),{matched:!0,selections:t}):{matched:ct(e,A,r),selections:t}},getSelectionKeys:()=>gr(e),matcherType:"optional"})})}function ye(...e){return PA({[Mt]:()=>({match:A=>{let t={},r=(n,i)=>{t[n]=i};return{matched:e.every(n=>ct(n,A,r)),selections:t}},getSelectionKeys:()=>Zi(e,gr),matcherType:"and"})})}function sb(...e){return PA({[Mt]:()=>({match:A=>{let t={},r=(n,i)=>{t[n]=i};return Zi(e,gr).forEach(n=>r(n,void 0)),{matched:e.some(n=>ct(n,A,r)),selections:t}},getSelectionKeys:()=>Zi(e,gr),matcherType:"or"})})}function X(e){return{[Mt]:()=>({match:A=>({matched:!!e(A)})})}}function Gd(...e){let A=typeof e[0]=="string"?e[0]:void 0,t=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return PA({[Mt]:()=>({match:r=>{let n={[A??Yo]:r};return{matched:t===void 0||ct(t,r,(i,s)=>{n[i]=s}),selections:n}},getSelectionKeys:()=>[A??Yo].concat(t===void 0?[]:gr(t))})})}function ot(e){return typeof e=="number"}function sr(e){return typeof e=="string"}function or(e){return typeof e=="bigint"}var fV=PA(X(function(e){return!0}));var ar=e=>Object.assign(PA(e),{startsWith:A=>{return ar(ye(e,(t=A,X(r=>sr(r)&&r.startsWith(t)))));var t},endsWith:A=>{return ar(ye(e,(t=A,X(r=>sr(r)&&r.endsWith(t)))));var t},minLength:A=>ar(ye(e,(t=>X(r=>sr(r)&&r.length>=t))(A))),length:A=>ar(ye(e,(t=>X(r=>sr(r)&&r.length===t))(A))),maxLength:A=>ar(ye(e,(t=>X(r=>sr(r)&&r.length<=t))(A))),includes:A=>{return ar(ye(e,(t=A,X(r=>sr(r)&&r.includes(t)))));var t},regex:A=>{return ar(ye(e,(t=A,X(r=>sr(r)&&!!r.match(t)))));var t}}),IV=ar(X(sr)),at=e=>Object.assign(PA(e),{between:(A,t)=>at(ye(e,((r,n)=>X(i=>ot(i)&&r<=i&&n>=i))(A,t))),lt:A=>at(ye(e,(t=>X(r=>ot(r)&&rat(ye(e,(t=>X(r=>ot(r)&&r>t))(A))),lte:A=>at(ye(e,(t=>X(r=>ot(r)&&r<=t))(A))),gte:A=>at(ye(e,(t=>X(r=>ot(r)&&r>=t))(A))),int:()=>at(ye(e,X(A=>ot(A)&&Number.isInteger(A)))),finite:()=>at(ye(e,X(A=>ot(A)&&Number.isFinite(A)))),positive:()=>at(ye(e,X(A=>ot(A)&&A>0))),negative:()=>at(ye(e,X(A=>ot(A)&&A<0)))}),BV=at(X(ot)),cr=e=>Object.assign(PA(e),{between:(A,t)=>cr(ye(e,((r,n)=>X(i=>or(i)&&r<=i&&n>=i))(A,t))),lt:A=>cr(ye(e,(t=>X(r=>or(r)&&rcr(ye(e,(t=>X(r=>or(r)&&r>t))(A))),lte:A=>cr(ye(e,(t=>X(r=>or(r)&&r<=t))(A))),gte:A=>cr(ye(e,(t=>X(r=>or(r)&&r>=t))(A))),positive:()=>cr(ye(e,X(A=>or(A)&&A>0))),negative:()=>cr(ye(e,X(A=>or(A)&&A<0)))}),pV=cr(X(or)),mV=PA(X(function(e){return typeof e=="boolean"})),yV=PA(X(function(e){return typeof e=="symbol"})),wV=PA(X(function(e){return e==null})),RV=PA(X(function(e){return e!=null}));var $g={matched:!1,value:void 0};function Vo(e){return new el(e,$g)}var el=class e{constructor(A,t){this.input=void 0,this.state=void 0,this.input=A,this.state=t}with(...A){if(this.state.matched)return this;let t=A[A.length-1],r=[A[0]],n;A.length===3&&typeof A[1]=="function"?n=A[1]:A.length>2&&r.push(...A.slice(1,A.length-1));let i=!1,s={},o=(c,g)=>{i=!0,s[c]=g},a=!r.some(c=>ct(c,this.input,o))||n&&!n(this.input)?$g:{matched:!0,value:t(i?Yo in s?s[Yo]:s:this.input,this.input)};return new e(this.input,a)}when(A,t){if(this.state.matched)return this;let r=!!A(this.input);return new e(this.input,r?{matched:!0,value:t(this.input,this.input)}:$g)}otherwise(A){return this.state.matched?this.state.value:A(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let A;try{A=JSON.stringify(this.input)}catch{A=this.input}throw new Error(`Pattern matching error: no pattern matches value ${A}`)}run(){return this.exhaustive()}returnType(){return this}};var qd=require("util");var ob={warn:Lt("prisma:warn")},ab={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function qo(e,...A){ab.warn()&&console.warn(`${ob.warn} ${e}`,...A)}var cb=(0,qd.promisify)(Vd.default.exec),rA=ie("prisma:get-platform"),gb=["1.0.x","1.1.x","3.0.x"];async function Od(){let e=Ho.default.platform(),A=process.arch;if(e==="freebsd"){let s=await Wo("freebsd-version");if(s&&s.trim().length>0){let a=/^(\d+)\.?/.exec(s);if(a)return{platform:"freebsd",targetDistro:`freebsd${a[1]}`,arch:A}}}if(e!=="linux")return{platform:e,arch:A};let t=await ub(),r=await pb(),n=hb({arch:A,archFromUname:r,familyDistro:t.familyDistro}),{libssl:i}=await db(n);return{platform:"linux",libssl:i,arch:A,archFromUname:r,...t}}function lb(e){let A=/^ID="?([^"\n]*)"?$/im,t=/^ID_LIKE="?([^"\n]*)"?$/im,r=A.exec(e),n=r&&r[1]&&r[1].toLowerCase()||"",i=t.exec(e),s=i&&i[1]&&i[1].toLowerCase()||"",o=Vo({id:n,idLike:s}).with({id:"alpine"},({id:a})=>({targetDistro:"musl",familyDistro:a,originalDistro:a})).with({id:"raspbian"},({id:a})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:a})).with({id:"nixos"},({id:a})=>({targetDistro:"nixos",originalDistro:a,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:a})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:a})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:a})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:a})).when(({idLike:a})=>a.includes("debian")||a.includes("ubuntu"),({id:a})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:a})).when(({idLike:a})=>n==="arch"||a.includes("arch"),({id:a})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:a})).when(({idLike:a})=>a.includes("centos")||a.includes("fedora")||a.includes("rhel")||a.includes("suse"),({id:a})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:a})).otherwise(({id:a})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:a}));return rA(`Found distro info: +${JSON.stringify(o,null,2)}`),o}async function ub(){let e="/etc/os-release";try{let A=await Al.default.readFile(e,{encoding:"utf-8"});return lb(A)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function Eb(e){let A=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(A){let t=`${A[1]}.x`;return Hd(t)}}function Jd(e){let A=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(A){let t=`${A[1]}${A[2]??".0"}.x`;return Hd(t)}}function Hd(e){let A=(()=>{if(Wd(e))return e;let t=e.split(".");return t[1]="0",t.join(".")})();if(gb.includes(A))return A}function hb(e){return Vo(e).with({familyDistro:"musl"},()=>(rA('Trying platform-specific paths for "alpine"'),["/lib"])).with({familyDistro:"debian"},({archFromUname:A})=>(rA('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${A}-linux-gnu`,`/lib/${A}-linux-gnu`])).with({familyDistro:"rhel"},()=>(rA('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:A,arch:t,archFromUname:r})=>(rA(`Don't know any platform-specific paths for "${A}" on ${t} (${r})`),[]))}async function db(e){let A='grep -v "libssl.so.0"',t=await Yd(e);if(t){rA(`Found libssl.so file using platform-specific paths: ${t}`);let i=Jd(t);if(rA(`The parsed libssl version is: ${i}`),i)return{libssl:i,strategy:"libssl-specific-path"}}rA('Falling back to "ldconfig" and other generic paths');let r=await Wo(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${A}`);if(r||(r=await Yd(["/lib64","/usr/lib64","/lib"])),r){rA(`Found libssl.so file using "ldconfig" or other generic paths: ${r}`);let i=Jd(r);if(rA(`The parsed libssl version is: ${i}`),i)return{libssl:i,strategy:"ldconfig"}}let n=await Wo("openssl version -v");if(n){rA(`Found openssl binary with version: ${n}`);let i=Eb(n);if(rA(`The parsed openssl version is: ${i}`),i)return{libssl:i,strategy:"openssl-binary"}}return rA("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function Yd(e){for(let A of e){let t=await Qb(A);if(t)return t}}async function Qb(e){try{return(await Al.default.readdir(e)).find(t=>t.startsWith("libssl.so.")&&!t.startsWith("libssl.so.0"))}catch(A){if(A.code==="ENOENT")return;throw A}}async function Tr(){let{binaryTarget:e}=await fb();return e}function Cb(e){return e.binaryTarget!==void 0}var Oo={};async function fb(){if(Cb(Oo))return Promise.resolve({...Oo,memoized:!0});let e=await Od(),A=Ib(e);return Oo={...e,binaryTarget:A},{...Oo,memoized:!1}}function Ib(e){let{platform:A,arch:t,archFromUname:r,libssl:n,targetDistro:i,familyDistro:s,originalDistro:o}=e;A==="linux"&&!["x64","arm64"].includes(t)&&qo(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${t}" instead). If you are using your own custom Prisma engines, you can ignore this warning, as long as you've compiled the engines for your system architecture "${r}".`);let a="1.1.x";if(A==="linux"&&n===void 0){let g=Vo({familyDistro:s}).with({familyDistro:"debian"},()=>"Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed.").otherwise(()=>"Please manually install OpenSSL and try installing Prisma again.");qo(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${a}". +${g}`)}let c="debian";if(A==="linux"&&i===void 0&&rA(`Distro is "${o}". Falling back to Prisma engines built for "${c}".`),A==="darwin"&&t==="arm64")return"darwin-arm64";if(A==="darwin")return"darwin";if(A==="win32")return"windows";if(A==="freebsd")return i;if(A==="openbsd")return"openbsd";if(A==="netbsd")return"netbsd";if(A==="linux"&&i==="nixos")return"linux-nixos";if(A==="linux"&&t==="arm64")return`${i==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${n||a}`;if(A==="linux"&&t==="arm")return`linux-arm-openssl-${n||a}`;if(A==="linux"&&i==="musl"){let g="linux-musl";return!n||Wd(n)?g:`${g}-openssl-${n}`}return A==="linux"&&i&&n?`${i}-openssl-${n}`:(A!=="linux"&&qo(`Prisma detected unknown OS "${A}" and may not work as expected. Defaulting to "linux".`),n?`${c}-openssl-${n}`:i?`${i}-openssl-${a}`:`${c}-openssl-${a}`)}async function Bb(e){try{return await e()}catch{return}}function Wo(e){return Bb(async()=>{let A=await cb(e);return rA(`Command "${e}" successfully returned "${A.stdout}"`),A.stdout})}async function pb(){return typeof Ho.default.machine=="function"?Ho.default.machine():(await Wo("uname -m"))?.trim()}function Wd(e){return e.startsWith("1.")}var pS=Z(yl());var he=Z(require("path")),mS=Z(yl()),Uq=ie("prisma:engines");function MC(){return he.default.join(__dirname,"../")}var Tq="libquery-engine";he.default.join(__dirname,"../query-engine-darwin");he.default.join(__dirname,"../query-engine-darwin-arm64");he.default.join(__dirname,"../query-engine-debian-openssl-1.0.x");he.default.join(__dirname,"../query-engine-debian-openssl-1.1.x");he.default.join(__dirname,"../query-engine-debian-openssl-3.0.x");he.default.join(__dirname,"../query-engine-linux-static-x64");he.default.join(__dirname,"../query-engine-linux-static-arm64");he.default.join(__dirname,"../query-engine-rhel-openssl-1.0.x");he.default.join(__dirname,"../query-engine-rhel-openssl-1.1.x");he.default.join(__dirname,"../query-engine-rhel-openssl-3.0.x");he.default.join(__dirname,"../libquery_engine-darwin.dylib.node");he.default.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");he.default.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");he.default.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");he.default.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");he.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");he.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");he.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");he.default.join(__dirname,"../libquery_engine-linux-musl.so.node");he.default.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");he.default.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");he.default.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");he.default.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");he.default.join(__dirname,"../query_engine-windows.dll.node");var wl=Z(require("fs")),vC=ie("chmodPlusX");function Rl(e){if(process.platform==="win32")return;let A=wl.default.statSync(e),t=A.mode|64|8|1;if(A.mode===t){vC(`Execution permissions of ${e} are fine`);return}let r=t.toString(8).slice(-3);vC(`Have to call chmodPlusX on ${e}`),wl.default.chmodSync(e,r)}var kl=Z(JC()),la=Z(require("fs"));var Rn=Z(require("path"));function YC(e){let A=e.ignoreProcessEnv?{}:process.env,t=r=>r.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g)?.reduce(function(i,s){let o=/(.?)\${([a-zA-Z0-9_]+)?}/g.exec(s);if(!o)return i;let a=o[1],c,g;if(a==="\\")g=o[0],c=g.replace("\\$","$");else{let l=o[2];g=o[0].substring(a.length),c=Object.hasOwnProperty.call(A,l)?A[l]:e.parsed[l]||"",c=t(c)}return i.replace(g,c)},r)??r;for(let r in e.parsed){let n=Object.hasOwnProperty.call(A,r)?A[r]:e.parsed[r];e.parsed[r]=t(n)}for(let r in e.parsed)A[r]=e.parsed[r];return e}var bl=ie("prisma:tryLoadEnv");function ts({rootEnvPath:e,schemaEnvPath:A},t={conflictCheck:"none"}){let r=VC(e);t.conflictCheck!=="none"&&xS(r,A,t.conflictCheck);let n=null;return qC(r?.path,A)||(n=VC(A)),!r&&!n&&bl("No Environment variables loaded"),n?.dotenvResult.error?console.error(vA(Ve("Schema Env Error: "))+n.dotenvResult.error):{message:[r?.message,n?.message].filter(Boolean).join(` +`),parsed:{...r?.dotenvResult?.parsed,...n?.dotenvResult?.parsed}}}function xS(e,A,t){let r=e?.dotenvResult.parsed,n=!qC(e?.path,A);if(r&&A&&n&&la.default.existsSync(A)){let i=kl.default.parse(la.default.readFileSync(A)),s=[];for(let o in i)r[o]===i[o]&&s.push(o);if(s.length>0){let o=Rn.default.relative(process.cwd(),e.path),a=Rn.default.relative(process.cwd(),A);if(t==="error"){let c=`There is a conflict between env var${s.length>1?"s":""} in ${EA(o)} and ${EA(a)} +Conflicting env vars: +${s.map(g=>` ${Ve(g)}`).join(` +`)} + +We suggest to move the contents of ${EA(a)} to ${EA(o)} to consolidate your env vars. +`;throw new Error(c)}else if(t==="warn"){let c=`Conflict for env var${s.length>1?"s":""} ${s.map(g=>Ve(g)).join(", ")} in ${EA(o)} and ${EA(a)} +Env vars from ${EA(a)} overwrite the ones from ${EA(o)} + `;console.warn(`${Lt("warn(prisma)")} ${c}`)}}}}function VC(e){if(LS(e)){bl(`Environment variables loaded from ${e}`);let A=kl.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:YC(A),message:Ur(`Environment variables loaded from ${Rn.default.relative(process.cwd(),e)}`),path:e}}else bl(`Environment variables not found at ${e}`);return null}function qC(e,A){return e&&A&&Rn.default.resolve(e)===Rn.default.resolve(A)}function LS(e){return!!(e&&la.default.existsSync(e))}var OC="library";function rs(e){let A=US();return A||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":OC)}function US(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}var lr;(A=>{let e;(m=>(m.findUnique="findUnique",m.findUniqueOrThrow="findUniqueOrThrow",m.findFirst="findFirst",m.findFirstOrThrow="findFirstOrThrow",m.findMany="findMany",m.create="create",m.createMany="createMany",m.createManyAndReturn="createManyAndReturn",m.update="update",m.updateMany="updateMany",m.upsert="upsert",m.delete="delete",m.deleteMany="deleteMany",m.groupBy="groupBy",m.count="count",m.aggregate="aggregate",m.findRaw="findRaw",m.aggregateRaw="aggregateRaw"))(e=A.ModelAction||={})})(lr||={});var ns=Z(require("path"));function Sl(e){return ns.default.sep===ns.default.posix.sep?e:e.split(ns.default.sep).join(ns.default.posix.sep)}var ZC=Z(Fl());function xl(e){return String(new Nl(e))}var Nl=class{constructor(A){this.config=A}toString(){let{config:A}=this,t=A.provider.fromEnvVar?`env("${A.provider.fromEnvVar}")`:A.provider.value,r=JSON.parse(JSON.stringify({provider:t,binaryTargets:MS(A.binaryTargets)}));return`generator ${A.name} { +${(0,ZC.default)(vS(r),2)} +}`}};function MS(e){let A;if(e.length>0){let t=e.find(r=>r.fromEnvVar!==null);t?A=`env("${t.fromEnvVar}")`:A=e.map(r=>r.native?"native":r.value)}else A=void 0;return A}function vS(e){let A=Object.keys(e).reduce((t,r)=>Math.max(t,r.length),0);return Object.entries(e).map(([t,r])=>`${t.padEnd(A)} = ${PS(r)}`).join(` +`)}function PS(e){return JSON.parse(JSON.stringify(e,(A,t)=>Array.isArray(t)?`[${t.map(r=>JSON.stringify(r)).join(", ")}]`:JSON.stringify(t)))}var ss={};Wi(ss,{error:()=>YS,info:()=>JS,log:()=>GS,query:()=>VS,should:()=>XC,tags:()=>is,warn:()=>Ll});var is={error:vA("prisma:error"),warn:Lt("prisma:warn"),info:Tt("prisma:info"),query:Ut("prisma:query")},XC={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function GS(...e){console.log(...e)}function Ll(e,...A){XC.warn()&&console.warn(`${is.warn} ${e}`,...A)}function JS(e,...A){console.info(`${is.info} ${e}`,...A)}function YS(e,...A){console.error(`${is.error} ${e}`,...A)}function VS(e,...A){console.log(`${is.query} ${e}`,...A)}function vt(e,A){throw new Error(A)}var ua=Z(require("stream")),Af=Z(require("util"));function os(e,A){return OS(e,A)}function OS(e,A){return e?HS(e,A):new Gr(A)}function HS(e,A){if(!e)throw new Error("expected readStream");if(!e.readable)throw new Error("readStream must be readable");let t=new Gr(A);return e.pipe(t),t}function Gr(e){ua.default.Transform.call(this,e),e=e||{},this._readableState.objectMode=!0,this._lineBuffer=[],this._keepEmptyLines=e.keepEmptyLines||!1,this._lastChunkEndedWithCR=!1,this.on("pipe",function(A){this.encoding||A instanceof ua.default.Readable&&(this.encoding=A._readableState.encoding)})}Af.default.inherits(Gr,ua.default.Transform);Gr.prototype._transform=function(e,A,t){A=A||"utf8",Buffer.isBuffer(e)&&(A=="buffer"?(e=e.toString(),A="utf8"):e=e.toString(A)),this._chunkEncoding=A;let r=e.split(/\r\n|\r|\n/g);this._lastChunkEndedWithCR&&e[0]==` +`&&r.shift(),this._lineBuffer.length>0&&(this._lineBuffer[this._lineBuffer.length-1]+=r[0],r.shift()),this._lastChunkEndedWithCR=e[e.length-1]=="\r",this._lineBuffer=this._lineBuffer.concat(r),this._pushBuffer(A,1,t)};Gr.prototype._pushBuffer=function(e,A,t){for(;this._lineBuffer.length>A;){let r=this._lineBuffer.shift();if((this._keepEmptyLines||r.length>0)&&!this.push(this._reencode(r,e))){let n=this;setImmediate(function(){n._pushBuffer(e,A,t)});return}}t()};Gr.prototype._flush=function(e){this._pushBuffer(this._chunkEncoding,0,e)};Gr.prototype._reencode=function(e,A){return this.encoding&&this.encoding!=A?Buffer.from(e,A).toString(this.encoding):this.encoding?e:Buffer.from(e,A)};function Tl(e,A){return Object.prototype.hasOwnProperty.call(e,A)}var Ml=(e,A)=>e.reduce((t,r)=>(t[A(r)]=r,t),{});function Dn(e,A){let t={};for(let r of Object.keys(e))t[r]=A(e[r],r);return t}function vl(e,A){if(e.length===0)return;let t=e[0];for(let r=1;r{rf.has(e)||(rf.add(e),Ll(A,...t))};var xe=class extends Error{constructor(A,{code:t,clientVersion:r,meta:n,batchRequestIdx:i}){super(A),this.name="PrismaClientKnownRequestError",this.code=t,this.clientVersion=r,this.meta=n,Object.defineProperty(this,"batchRequestIdx",{value:i,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};L(xe,"PrismaClientKnownRequestError");var Pt=class extends xe{constructor(A,t){super(A,{code:"P2025",clientVersion:t}),this.name="NotFoundError"}};L(Pt,"NotFoundError");var z=class e extends Error{constructor(A,t,r){super(A),this.name="PrismaClientInitializationError",this.clientVersion=t,this.errorCode=r,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};L(z,"PrismaClientInitializationError");var JA=class extends Error{constructor(A,t){super(A),this.name="PrismaClientRustPanicError",this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};L(JA,"PrismaClientRustPanicError");var ve=class extends Error{constructor(A,{clientVersion:t,batchRequestIdx:r}){super(A),this.name="PrismaClientUnknownRequestError",this.clientVersion=t,Object.defineProperty(this,"batchRequestIdx",{value:r,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};L(ve,"PrismaClientUnknownRequestError");var Oe=class extends Error{constructor(t,{clientVersion:r}){super(t);this.name="PrismaClientValidationError";this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};L(Oe,"PrismaClientValidationError");var bn=9e15,dr=1e9,Pl="0123456789abcdef",Qa="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Ca="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Gl={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-bn,maxE:bn,crypto:!1},af,Gt,T=!0,Ia="[DecimalError] ",hr=Ia+"Invalid argument: ",cf=Ia+"Precision limit exceeded",gf=Ia+"crypto unavailable",lf="[object Decimal]",ze=Math.floor,Pe=Math.pow,WS=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,_S=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,jS=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,uf=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ZA=1e7,x=7,KS=9007199254740991,ZS=Qa.length-1,Jl=Ca.length-1,B={toStringTag:lf};B.absoluteValue=B.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),b(e)};B.ceil=function(){return b(new this.constructor(this),this.e+1,2)};B.clampedTo=B.clamp=function(e,A){var t,r=this,n=r.constructor;if(e=new n(e),A=new n(A),!e.s||!A.s)return new n(NaN);if(e.gt(A))throw Error(hr+A);return t=r.cmp(e),t<0?e:r.cmp(A)>0?A:new n(r)};B.comparedTo=B.cmp=function(e){var A,t,r,n,i=this,s=i.d,o=(e=new i.constructor(e)).d,a=i.s,c=e.s;if(!s||!o)return!a||!c?NaN:a!==c?a:s===o?0:!s^a<0?1:-1;if(!s[0]||!o[0])return s[0]?a:o[0]?-c:0;if(a!==c)return a;if(i.e!==e.e)return i.e>e.e^a<0?1:-1;for(r=s.length,n=o.length,A=0,t=ro[A]^a<0?1:-1;return r===n?0:r>n^a<0?1:-1};B.cosine=B.cos=function(){var e,A,t=this,r=t.constructor;return t.d?t.d[0]?(e=r.precision,A=r.rounding,r.precision=e+Math.max(t.e,t.sd())+x,r.rounding=1,t=XS(r,Cf(r,t)),r.precision=e,r.rounding=A,b(Gt==2||Gt==3?t.neg():t,e,A,!0)):new r(1):new r(NaN)};B.cubeRoot=B.cbrt=function(){var e,A,t,r,n,i,s,o,a,c,g=this,l=g.constructor;if(!g.isFinite()||g.isZero())return new l(g);for(T=!1,i=g.s*Pe(g.s*g,1/3),!i||Math.abs(i)==1/0?(t=_e(g.d),e=g.e,(i=(e-t.length+1)%3)&&(t+=i==1||i==-2?"0":"00"),i=Pe(t,1/3),e=ze((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t),r.s=g.s):r=new l(i.toString()),s=(e=l.precision)+3;;)if(o=r,a=o.times(o).times(o),c=a.plus(g),r=ge(c.plus(g).times(o),c.plus(a),s+2,1),_e(o.d).slice(0,s)===(t=_e(r.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!n&&t=="4999"){if(!n&&(b(o,e+1,0),o.times(o).times(o).eq(g))){r=o;break}s+=4,n=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(b(r,e+1,1),A=!r.times(r).times(r).eq(g));break}return T=!0,b(r,e,l.rounding,A)};B.decimalPlaces=B.dp=function(){var e,A=this.d,t=NaN;if(A){if(e=A.length-1,t=(e-ze(this.e/x))*x,e=A[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};B.dividedBy=B.div=function(e){return ge(this,new this.constructor(e))};B.dividedToIntegerBy=B.divToInt=function(e){var A=this,t=A.constructor;return b(ge(A,new t(e),0,1,1),t.precision,t.rounding)};B.equals=B.eq=function(e){return this.cmp(e)===0};B.floor=function(){return b(new this.constructor(this),this.e+1,3)};B.greaterThan=B.gt=function(e){return this.cmp(e)>0};B.greaterThanOrEqualTo=B.gte=function(e){var A=this.cmp(e);return A==1||A===0};B.hyperbolicCosine=B.cosh=function(){var e,A,t,r,n,i=this,s=i.constructor,o=new s(1);if(!i.isFinite())return new s(i.s?1/0:NaN);if(i.isZero())return o;t=s.precision,r=s.rounding,s.precision=t+Math.max(i.e,i.sd())+4,s.rounding=1,n=i.d.length,n<32?(e=Math.ceil(n/3),A=(1/pa(4,e)).toString()):(e=16,A="2.3283064365386962890625e-10"),i=kn(s,1,i.times(A),new s(1),!0);for(var a,c=e,g=new s(8);c--;)a=i.times(i),i=o.minus(a.times(g.minus(a.times(g))));return b(i,s.precision=t,s.rounding=r,!0)};B.hyperbolicSine=B.sinh=function(){var e,A,t,r,n=this,i=n.constructor;if(!n.isFinite()||n.isZero())return new i(n);if(A=i.precision,t=i.rounding,i.precision=A+Math.max(n.e,n.sd())+4,i.rounding=1,r=n.d.length,r<3)n=kn(i,2,n,n,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:e|0,n=n.times(1/pa(5,e)),n=kn(i,2,n,n,!0);for(var s,o=new i(5),a=new i(16),c=new i(20);e--;)s=n.times(n),n=n.times(o.plus(s.times(a.times(s).plus(c))))}return i.precision=A,i.rounding=t,b(n,A,t,!0)};B.hyperbolicTangent=B.tanh=function(){var e,A,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,A=r.rounding,r.precision=e+7,r.rounding=1,ge(t.sinh(),t.cosh(),r.precision=e,r.rounding=A)):new r(t.s)};B.inverseCosine=B.acos=function(){var e,A=this,t=A.constructor,r=A.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?A.isNeg()?KA(t,n,i):new t(0):new t(NaN):A.isZero()?KA(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,A=A.asin(),e=KA(t,n+4,i).times(.5),t.precision=n,t.rounding=i,e.minus(A))};B.inverseHyperbolicCosine=B.acosh=function(){var e,A,t=this,r=t.constructor;return t.lte(1)?new r(t.eq(1)?0:NaN):t.isFinite()?(e=r.precision,A=r.rounding,r.precision=e+Math.max(Math.abs(t.e),t.sd())+4,r.rounding=1,T=!1,t=t.times(t).minus(1).sqrt().plus(t),T=!0,r.precision=e,r.rounding=A,t.ln()):new r(t)};B.inverseHyperbolicSine=B.asinh=function(){var e,A,t=this,r=t.constructor;return!t.isFinite()||t.isZero()?new r(t):(e=r.precision,A=r.rounding,r.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,r.rounding=1,T=!1,t=t.times(t).plus(1).sqrt().plus(t),T=!0,r.precision=e,r.rounding=A,t.ln())};B.inverseHyperbolicTangent=B.atanh=function(){var e,A,t,r,n=this,i=n.constructor;return n.isFinite()?n.e>=0?new i(n.abs().eq(1)?n.s/0:n.isZero()?n:NaN):(e=i.precision,A=i.rounding,r=n.sd(),Math.max(r,e)<2*-n.e-1?b(new i(n),e,A,!0):(i.precision=t=r-n.e,n=ge(n.plus(1),new i(1).minus(n),t+e,1),i.precision=e+4,i.rounding=1,n=n.ln(),i.precision=e,i.rounding=A,n.times(.5))):new i(NaN)};B.inverseSine=B.asin=function(){var e,A,t,r,n=this,i=n.constructor;return n.isZero()?new i(n):(A=n.abs().cmp(1),t=i.precision,r=i.rounding,A!==-1?A===0?(e=KA(i,t+4,r).times(.5),e.s=n.s,e):new i(NaN):(i.precision=t+6,i.rounding=1,n=n.div(new i(1).minus(n.times(n)).sqrt().plus(1)).atan(),i.precision=t,i.rounding=r,n.times(2)))};B.inverseTangent=B.atan=function(){var e,A,t,r,n,i,s,o,a,c=this,g=c.constructor,l=g.precision,u=g.rounding;if(c.isFinite()){if(c.isZero())return new g(c);if(c.abs().eq(1)&&l+4<=Jl)return s=KA(g,l+4,u).times(.25),s.s=c.s,s}else{if(!c.s)return new g(NaN);if(l+4<=Jl)return s=KA(g,l+4,u).times(.5),s.s=c.s,s}for(g.precision=o=l+10,g.rounding=1,t=Math.min(28,o/x+2|0),e=t;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(T=!1,A=Math.ceil(o/x),r=1,a=c.times(c),s=new g(c),n=c;e!==-1;)if(n=n.times(a),i=s.minus(n.div(r+=2)),n=n.times(a),s=i.plus(n.div(r+=2)),s.d[A]!==void 0)for(e=A;s.d[e]===i.d[e]&&e--;);return t&&(s=s.times(2<this.d.length-2};B.isNaN=function(){return!this.s};B.isNegative=B.isNeg=function(){return this.s<0};B.isPositive=B.isPos=function(){return this.s>0};B.isZero=function(){return!!this.d&&this.d[0]===0};B.lessThan=B.lt=function(e){return this.cmp(e)<0};B.lessThanOrEqualTo=B.lte=function(e){return this.cmp(e)<1};B.logarithm=B.log=function(e){var A,t,r,n,i,s,o,a,c=this,g=c.constructor,l=g.precision,u=g.rounding,E=5;if(e==null)e=new g(10),A=!0;else{if(e=new g(e),t=e.d,e.s<0||!t||!t[0]||e.eq(1))return new g(NaN);A=e.eq(10)}if(t=c.d,c.s<0||!t||!t[0]||c.eq(1))return new g(t&&!t[0]?-1/0:c.s!=1?NaN:t?0:1/0);if(A)if(t.length>1)i=!0;else{for(n=t[0];n%10===0;)n/=10;i=n!==1}if(T=!1,o=l+E,s=Er(c,o),r=A?fa(g,o+10):Er(e,o),a=ge(s,r,o,1),cs(a.d,n=l,u))do if(o+=10,s=Er(c,o),r=A?fa(g,o+10):Er(e,o),a=ge(s,r,o,1),!i){+_e(a.d).slice(n+1,n+15)+1==1e14&&(a=b(a,l+1,0));break}while(cs(a.d,n+=10,u));return T=!0,b(a,l,u)};B.minus=B.sub=function(e){var A,t,r,n,i,s,o,a,c,g,l,u,E=this,h=E.constructor;if(e=new h(e),!E.d||!e.d)return!E.s||!e.s?e=new h(NaN):E.d?e.s=-e.s:e=new h(e.d||E.s!==e.s?E:NaN),e;if(E.s!=e.s)return e.s=-e.s,E.plus(e);if(c=E.d,u=e.d,o=h.precision,a=h.rounding,!c[0]||!u[0]){if(u[0])e.s=-e.s;else if(c[0])e=new h(E);else return new h(a===3?-0:0);return T?b(e,o,a):e}if(t=ze(e.e/x),g=ze(E.e/x),c=c.slice(),i=g-t,i){for(l=i<0,l?(A=c,i=-i,s=u.length):(A=u,t=g,s=c.length),r=Math.max(Math.ceil(o/x),s)+2,i>r&&(i=r,A.length=1),A.reverse(),r=i;r--;)A.push(0);A.reverse()}else{for(r=c.length,s=u.length,l=r0;--r)c[s++]=0;for(r=u.length;r>i;){if(c[--r]s?i+1:s+1,n>s&&(n=s,t.length=1),t.reverse();n--;)t.push(0);t.reverse()}for(s=c.length,n=g.length,s-n<0&&(n=s,t=g,g=c,c=t),A=0;n;)A=(c[--n]=c[n]+g[n]+A)/ZA|0,c[n]%=ZA;for(A&&(c.unshift(A),++r),s=c.length;c[--s]==0;)c.pop();return e.d=c,e.e=Ba(c,r),T?b(e,o,a):e};B.precision=B.sd=function(e){var A,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(hr+e);return t.d?(A=Ef(t.d),e&&t.e+1>A&&(A=t.e+1)):A=NaN,A};B.round=function(){var e=this,A=e.constructor;return b(new A(e),e.e+1,A.rounding)};B.sine=B.sin=function(){var e,A,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,A=r.rounding,r.precision=e+Math.max(t.e,t.sd())+x,r.rounding=1,t=$S(r,Cf(r,t)),r.precision=e,r.rounding=A,b(Gt>2?t.neg():t,e,A,!0)):new r(NaN)};B.squareRoot=B.sqrt=function(){var e,A,t,r,n,i,s=this,o=s.d,a=s.e,c=s.s,g=s.constructor;if(c!==1||!o||!o[0])return new g(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);for(T=!1,c=Math.sqrt(+s),c==0||c==1/0?(A=_e(o),(A.length+a)%2==0&&(A+="0"),c=Math.sqrt(A),a=ze((a+1)/2)-(a<0||a%2),c==1/0?A="5e"+a:(A=c.toExponential(),A=A.slice(0,A.indexOf("e")+1)+a),r=new g(A)):r=new g(c.toString()),t=(a=g.precision)+3;;)if(i=r,r=i.plus(ge(s,i,t+2,1)).times(.5),_e(i.d).slice(0,t)===(A=_e(r.d)).slice(0,t))if(A=A.slice(t-3,t+1),A=="9999"||!n&&A=="4999"){if(!n&&(b(i,a+1,0),i.times(i).eq(s))){r=i;break}t+=4,n=1}else{(!+A||!+A.slice(1)&&A.charAt(0)=="5")&&(b(r,a+1,1),e=!r.times(r).eq(s));break}return T=!0,b(r,a,g.rounding,e)};B.tangent=B.tan=function(){var e,A,t=this,r=t.constructor;return t.isFinite()?t.isZero()?new r(t):(e=r.precision,A=r.rounding,r.precision=e+10,r.rounding=1,t=t.sin(),t.s=1,t=ge(t,new r(1).minus(t.times(t)).sqrt(),e+10,0),r.precision=e,r.rounding=A,b(Gt==2||Gt==4?t.neg():t,e,A,!0)):new r(NaN)};B.times=B.mul=function(e){var A,t,r,n,i,s,o,a,c,g=this,l=g.constructor,u=g.d,E=(e=new l(e)).d;if(e.s*=g.s,!u||!u[0]||!E||!E[0])return new l(!e.s||u&&!u[0]&&!E||E&&!E[0]&&!u?NaN:!u||!E?e.s/0:e.s*0);for(t=ze(g.e/x)+ze(e.e/x),a=u.length,c=E.length,a=0;){for(A=0,n=a+r;n>r;)o=i[n]+E[r]*u[n-r-1]+A,i[n--]=o%ZA|0,A=o/ZA|0;i[n]=(i[n]+A)%ZA|0}for(;!i[--s];)i.pop();return A?++t:i.shift(),e.d=i,e.e=Ba(i,t),T?b(e,l.precision,l.rounding):e};B.toBinary=function(e,A){return ql(this,2,e,A)};B.toDecimalPlaces=B.toDP=function(e,A){var t=this,r=t.constructor;return t=new r(t),e===void 0?t:(hA(e,0,dr),A===void 0?A=r.rounding:hA(A,0,8),b(t,e+t.e+1,A))};B.toExponential=function(e,A){var t,r=this,n=r.constructor;return e===void 0?t=lt(r,!0):(hA(e,0,dr),A===void 0?A=n.rounding:hA(A,0,8),r=b(new n(r),e+1,A),t=lt(r,!0,e+1)),r.isNeg()&&!r.isZero()?"-"+t:t};B.toFixed=function(e,A){var t,r,n=this,i=n.constructor;return e===void 0?t=lt(n):(hA(e,0,dr),A===void 0?A=i.rounding:hA(A,0,8),r=b(new i(n),e+n.e+1,A),t=lt(r,!1,e+r.e+1)),n.isNeg()&&!n.isZero()?"-"+t:t};B.toFraction=function(e){var A,t,r,n,i,s,o,a,c,g,l,u,E=this,h=E.d,d=E.constructor;if(!h)return new d(E);if(c=t=new d(1),r=a=new d(0),A=new d(r),i=A.e=Ef(h)-E.e-1,s=i%x,A.d[0]=Pe(10,s<0?x+s:s),e==null)e=i>0?A:c;else{if(o=new d(e),!o.isInt()||o.lt(c))throw Error(hr+o);e=o.gt(A)?i>0?A:c:o}for(T=!1,o=new d(_e(h)),g=d.precision,d.precision=i=h.length*x*2;l=ge(o,A,0,1,1),n=t.plus(l.times(r)),n.cmp(e)!=1;)t=r,r=n,n=c,c=a.plus(l.times(n)),a=n,n=A,A=o.minus(l.times(n)),o=n;return n=ge(e.minus(t),r,0,1,1),a=a.plus(n.times(c)),t=t.plus(n.times(r)),a.s=c.s=E.s,u=ge(c,r,i,1).minus(E).abs().cmp(ge(a,t,i,1).minus(E).abs())<1?[c,r]:[a,t],d.precision=g,T=!0,u};B.toHexadecimal=B.toHex=function(e,A){return ql(this,16,e,A)};B.toNearest=function(e,A){var t=this,r=t.constructor;if(t=new r(t),e==null){if(!t.d)return t;e=new r(1),A=r.rounding}else{if(e=new r(e),A===void 0?A=r.rounding:hA(A,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(T=!1,t=ge(t,e,0,A,1).times(e),T=!0,b(t)):(e.s=t.s,t=e),t};B.toNumber=function(){return+this};B.toOctal=function(e,A){return ql(this,8,e,A)};B.toPower=B.pow=function(e){var A,t,r,n,i,s,o=this,a=o.constructor,c=+(e=new a(e));if(!o.d||!e.d||!o.d[0]||!e.d[0])return new a(Pe(+o,c));if(o=new a(o),o.eq(1))return o;if(r=a.precision,i=a.rounding,e.eq(1))return b(o,r,i);if(A=ze(e.e/x),A>=e.d.length-1&&(t=c<0?-c:c)<=KS)return n=hf(a,o,t,r),e.s<0?new a(1).div(n):b(n,r,i);if(s=o.s,s<0){if(Aa.maxE+1||A0?s/0:0):(T=!1,a.rounding=o.s=1,t=Math.min(12,(A+"").length),n=Yl(e.times(Er(o,r+t)),r),n.d&&(n=b(n,r+5,1),cs(n.d,r,i)&&(A=r+10,n=b(Yl(e.times(Er(o,A+t)),A),A+5,1),+_e(n.d).slice(r+1,r+15)+1==1e14&&(n=b(n,r+1,0)))),n.s=s,T=!0,a.rounding=i,b(n,r,i))};B.toPrecision=function(e,A){var t,r=this,n=r.constructor;return e===void 0?t=lt(r,r.e<=n.toExpNeg||r.e>=n.toExpPos):(hA(e,1,dr),A===void 0?A=n.rounding:hA(A,0,8),r=b(new n(r),e,A),t=lt(r,e<=r.e||r.e<=n.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+t:t};B.toSignificantDigits=B.toSD=function(e,A){var t=this,r=t.constructor;return e===void 0?(e=r.precision,A=r.rounding):(hA(e,1,dr),A===void 0?A=r.rounding:hA(A,0,8)),b(new r(t),e,A)};B.toString=function(){var e=this,A=e.constructor,t=lt(e,e.e<=A.toExpNeg||e.e>=A.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};B.truncated=B.trunc=function(){return b(new this.constructor(this),this.e+1,1)};B.valueOf=B.toJSON=function(){var e=this,A=e.constructor,t=lt(e,e.e<=A.toExpNeg||e.e>=A.toExpPos);return e.isNeg()?"-"+t:t};function _e(e){var A,t,r,n=e.length-1,i="",s=e[0];if(n>0){for(i+=s,A=1;At)throw Error(hr+e)}function cs(e,A,t,r){var n,i,s,o;for(i=e[0];i>=10;i/=10)--A;return--A<0?(A+=x,n=0):(n=Math.ceil((A+1)/x),A%=x),i=Pe(10,x-A),o=e[n]%i|0,r==null?A<3?(A==0?o=o/100|0:A==1&&(o=o/10|0),s=t<4&&o==99999||t>3&&o==49999||o==5e4||o==0):s=(t<4&&o+1==i||t>3&&o+1==i/2)&&(e[n+1]/i/100|0)==Pe(10,A-2)-1||(o==i/2||o==0)&&(e[n+1]/i/100|0)==0:A<4?(A==0?o=o/1e3|0:A==1?o=o/100|0:A==2&&(o=o/10|0),s=(r||t<4)&&o==9999||!r&&t>3&&o==4999):s=((r||t<4)&&o+1==i||!r&&t>3&&o+1==i/2)&&(e[n+1]/i/1e3|0)==Pe(10,A-3)-1,s}function da(e,A,t){for(var r,n=[0],i,s=0,o=e.length;st-1&&(n[r+1]===void 0&&(n[r+1]=0),n[r+1]+=n[r]/t|0,n[r]%=t)}return n.reverse()}function XS(e,A){var t,r,n;if(A.isZero())return A;r=A.d.length,r<32?(t=Math.ceil(r/3),n=(1/pa(4,t)).toString()):(t=16,n="2.3283064365386962890625e-10"),e.precision+=t,A=kn(e,1,A.times(n),new e(1));for(var i=t;i--;){var s=A.times(A);A=s.times(s).minus(s).times(8).plus(1)}return e.precision-=t,A}var ge=function(){function e(r,n,i){var s,o=0,a=r.length;for(r=r.slice();a--;)s=r[a]*n+o,r[a]=s%i|0,o=s/i|0;return o&&r.unshift(o),r}function A(r,n,i,s){var o,a;if(i!=s)a=i>s?1:-1;else for(o=a=0;on[o]?1:-1;break}return a}function t(r,n,i,s){for(var o=0;i--;)r[i]-=o,o=r[i]1;)r.shift()}return function(r,n,i,s,o,a){var c,g,l,u,E,h,d,C,I,p,w,m,K,H,ne,q,ae,De,ee,Y,ce=r.constructor,Je=r.s==n.s?1:-1,fe=r.d,P=n.d;if(!fe||!fe[0]||!P||!P[0])return new ce(!r.s||!n.s||(fe?P&&fe[0]==P[0]:!P)?NaN:fe&&fe[0]==0||!P?Je*0:Je/0);for(a?(E=1,g=r.e-n.e):(a=ZA,E=x,g=ze(r.e/E)-ze(n.e/E)),ee=P.length,ae=fe.length,I=new ce(Je),p=I.d=[],l=0;P[l]==(fe[l]||0);l++);if(P[l]>(fe[l]||0)&&g--,i==null?(H=i=ce.precision,s=ce.rounding):o?H=i+(r.e-n.e)+1:H=i,H<0)p.push(1),h=!0;else{if(H=H/E+2|0,l=0,ee==1){for(u=0,P=P[0],H++;(l1&&(P=e(P,u,a),fe=e(fe,u,a),ee=P.length,ae=fe.length),q=ee,w=fe.slice(0,ee),m=w.length;m=a/2&&++De;do u=0,c=A(P,w,ee,m),c<0?(K=w[0],ee!=m&&(K=K*a+(w[1]||0)),u=K/De|0,u>1?(u>=a&&(u=a-1),d=e(P,u,a),C=d.length,m=w.length,c=A(d,w,C,m),c==1&&(u--,t(d,ee=10;u/=10)l++;I.e=l+g*E-1,b(I,o?i+I.e+1:i,s,h)}return I}}();function b(e,A,t,r){var n,i,s,o,a,c,g,l,u,E=e.constructor;e:if(A!=null){if(l=e.d,!l)return e;for(n=1,o=l[0];o>=10;o/=10)n++;if(i=A-n,i<0)i+=x,s=A,g=l[u=0],a=g/Pe(10,n-s-1)%10|0;else if(u=Math.ceil((i+1)/x),o=l.length,u>=o)if(r){for(;o++<=u;)l.push(0);g=a=0,n=1,i%=x,s=i-x+1}else break e;else{for(g=o=l[u],n=1;o>=10;o/=10)n++;i%=x,s=i-x+n,a=s<0?0:g/Pe(10,n-s-1)%10|0}if(r=r||A<0||l[u+1]!==void 0||(s<0?g:g%Pe(10,n-s-1)),c=t<4?(a||r)&&(t==0||t==(e.s<0?3:2)):a>5||a==5&&(t==4||r||t==6&&(i>0?s>0?g/Pe(10,n-s):0:l[u-1])%10&1||t==(e.s<0?8:7)),A<1||!l[0])return l.length=0,c?(A-=e.e+1,l[0]=Pe(10,(x-A%x)%x),e.e=-A||0):l[0]=e.e=0,e;if(i==0?(l.length=u,o=1,u--):(l.length=u+1,o=Pe(10,x-i),l[u]=s>0?(g/Pe(10,n-s)%Pe(10,s)|0)*o:0),c)for(;;)if(u==0){for(i=1,s=l[0];s>=10;s/=10)i++;for(s=l[0]+=o,o=1;s>=10;s/=10)o++;i!=o&&(e.e++,l[0]==ZA&&(l[0]=1));break}else{if(l[u]+=o,l[u]!=ZA)break;l[u--]=0,o=1}for(i=l.length;l[--i]===0;)l.pop()}return T&&(e.e>E.maxE?(e.d=null,e.e=NaN):e.e0?i=i.charAt(0)+"."+i.slice(1)+ur(r):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):n<0?(i="0."+ur(-n-1)+i,t&&(r=t-s)>0&&(i+=ur(r))):n>=s?(i+=ur(n+1-s),t&&(r=t-n-1)>0&&(i=i+"."+ur(r))):((r=n+1)0&&(n+1===s&&(i+="."),i+=ur(r))),i}function Ba(e,A){var t=e[0];for(A*=x;t>=10;t/=10)A++;return A}function fa(e,A,t){if(A>ZS)throw T=!0,t&&(e.precision=t),Error(cf);return b(new e(Qa),A,1,!0)}function KA(e,A,t){if(A>Jl)throw Error(cf);return b(new e(Ca),A,t,!0)}function Ef(e){var A=e.length-1,t=A*x+1;if(A=e[A],A){for(;A%10==0;A/=10)t--;for(A=e[0];A>=10;A/=10)t++}return t}function ur(e){for(var A="";e--;)A+="0";return A}function hf(e,A,t,r){var n,i=new e(1),s=Math.ceil(r/x+4);for(T=!1;;){if(t%2&&(i=i.times(A),sf(i.d,s)&&(n=!0)),t=ze(t/2),t===0){t=i.d.length-1,n&&i.d[t]===0&&++i.d[t];break}A=A.times(A),sf(A.d,s)}return T=!0,i}function nf(e){return e.d[e.d.length-1]&1}function df(e,A,t){for(var r,n=new e(A[0]),i=0;++i17)return new u(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(A==null?(T=!1,a=h):a=A,o=new u(.03125);e.e>-2;)e=e.times(o),l+=5;for(r=Math.log(Pe(2,l))/Math.LN10*2+5|0,a+=r,t=i=s=new u(1),u.precision=a;;){if(i=b(i.times(e),a,1),t=t.times(++g),o=s.plus(ge(i,t,a,1)),_e(o.d).slice(0,a)===_e(s.d).slice(0,a)){for(n=l;n--;)s=b(s.times(s),a,1);if(A==null)if(c<3&&cs(s.d,a-r,E,c))u.precision=a+=10,t=i=o=new u(1),g=0,c++;else return b(s,u.precision=h,E,T=!0);else return u.precision=h,s}s=o}}function Er(e,A){var t,r,n,i,s,o,a,c,g,l,u,E=1,h=10,d=e,C=d.d,I=d.constructor,p=I.rounding,w=I.precision;if(d.s<0||!C||!C[0]||!d.e&&C[0]==1&&C.length==1)return new I(C&&!C[0]?-1/0:d.s!=1?NaN:C?0:d);if(A==null?(T=!1,g=w):g=A,I.precision=g+=h,t=_e(C),r=t.charAt(0),Math.abs(i=d.e)<15e14){for(;r<7&&r!=1||r==1&&t.charAt(1)>3;)d=d.times(e),t=_e(d.d),r=t.charAt(0),E++;i=d.e,r>1?(d=new I("0."+t),i++):d=new I(r+"."+t.slice(1))}else return c=fa(I,g+2,w).times(i+""),d=Er(new I(r+"."+t.slice(1)),g-h).plus(c),I.precision=w,A==null?b(d,w,p,T=!0):d;for(l=d,a=s=d=ge(d.minus(1),d.plus(1),g,1),u=b(d.times(d),g,1),n=3;;){if(s=b(s.times(u),g,1),c=a.plus(ge(s,new I(n),g,1)),_e(c.d).slice(0,g)===_e(a.d).slice(0,g))if(a=a.times(2),i!==0&&(a=a.plus(fa(I,g+2,w).times(i+""))),a=ge(a,new I(E),g,1),A==null)if(cs(a.d,g-h,p,o))I.precision=g+=h,c=s=d=ge(l.minus(1),l.plus(1),g,1),u=b(d.times(d),g,1),n=o=1;else return b(a,I.precision=w,p,T=!0);else return I.precision=w,a;a=c,n+=2}}function Qf(e){return String(e.s*e.s/0)}function Vl(e,A){var t,r,n;for((t=A.indexOf("."))>-1&&(A=A.replace(".","")),(r=A.search(/e/i))>0?(t<0&&(t=r),t+=+A.slice(r+1),A=A.substring(0,r)):t<0&&(t=A.length),r=0;A.charCodeAt(r)===48;r++);for(n=A.length;A.charCodeAt(n-1)===48;--n);if(A=A.slice(r,n),A){if(n-=r,e.e=t=t-r-1,e.d=[],r=(t+1)%x,t<0&&(r+=x),re.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(A=A.replace(/(\d)_(?=\d)/g,"$1"),uf.test(A))return Vl(e,A)}else if(A==="Infinity"||A==="NaN")return+A||(e.s=NaN),e.e=NaN,e.d=null,e;if(_S.test(A))t=16,A=A.toLowerCase();else if(WS.test(A))t=2;else if(jS.test(A))t=8;else throw Error(hr+A);for(i=A.search(/p/i),i>0?(a=+A.slice(i+1),A=A.substring(2,i)):A=A.slice(2),i=A.indexOf("."),s=i>=0,r=e.constructor,s&&(A=A.replace(".",""),o=A.length,i=o-i,n=hf(r,new r(t),i,i*2)),c=da(A,t,ZA),g=c.length-1,i=g;c[i]===0;--i)c.pop();return i<0?new r(e.s*0):(e.e=Ba(c,g),e.d=c,T=!1,s&&(e=ge(e,n,o*4)),a&&(e=e.times(Math.abs(a)<54?Pe(2,a):Jr.pow(2,a))),T=!0,e)}function $S(e,A){var t,r=A.d.length;if(r<3)return A.isZero()?A:kn(e,2,A,A);t=1.4*Math.sqrt(r),t=t>16?16:t|0,A=A.times(1/pa(5,t)),A=kn(e,2,A,A);for(var n,i=new e(5),s=new e(16),o=new e(20);t--;)n=A.times(A),A=A.times(i.plus(n.times(s.times(n).minus(o))));return A}function kn(e,A,t,r,n){var i,s,o,a,c=1,g=e.precision,l=Math.ceil(g/x);for(T=!1,a=t.times(t),o=new e(r);;){if(s=ge(o.times(a),new e(A++*A++),g,1),o=n?r.plus(s):r.minus(s),r=ge(s.times(a),new e(A++*A++),g,1),s=o.plus(r),s.d[l]!==void 0){for(i=l;s.d[i]===o.d[i]&&i--;);if(i==-1)break}i=o,o=r,r=s,s=i,c++}return T=!0,s.d.length=l+1,s}function pa(e,A){for(var t=e;--A;)t*=e;return t}function Cf(e,A){var t,r=A.s<0,n=KA(e,e.precision,1),i=n.times(.5);if(A=A.abs(),A.lte(i))return Gt=r?4:1,A;if(t=A.divToInt(n),t.isZero())Gt=r?3:2;else{if(A=A.minus(t.times(n)),A.lte(i))return Gt=nf(t)?r?2:3:r?4:1,A;Gt=nf(t)?r?1:4:r?3:2}return A.minus(n).abs()}function ql(e,A,t,r){var n,i,s,o,a,c,g,l,u,E=e.constructor,h=t!==void 0;if(h?(hA(t,1,dr),r===void 0?r=E.rounding:hA(r,0,8)):(t=E.precision,r=E.rounding),!e.isFinite())g=Qf(e);else{for(g=lt(e),s=g.indexOf("."),h?(n=2,A==16?t=t*4-3:A==8&&(t=t*3-2)):n=A,s>=0&&(g=g.replace(".",""),u=new E(1),u.e=g.length-s,u.d=da(lt(u),10,n),u.e=u.d.length),l=da(g,10,n),i=a=l.length;l[--a]==0;)l.pop();if(!l[0])g=h?"0p+0":"0";else{if(s<0?i--:(e=new E(e),e.d=l,e.e=i,e=ge(e,u,t,r,0,n),l=e.d,i=e.e,c=af),s=l[t],o=n/2,c=c||l[t+1]!==void 0,c=r<4?(s!==void 0||c)&&(r===0||r===(e.s<0?3:2)):s>o||s===o&&(r===4||c||r===6&&l[t-1]&1||r===(e.s<0?8:7)),l.length=t,c)for(;++l[--t]>n-1;)l[t]=0,t||(++i,l.unshift(1));for(a=l.length;!l[a-1];--a);for(s=0,g="";s1)if(A==16||A==8){for(s=A==16?4:3,--a;a%s;a++)g+="0";for(l=da(g,n,A),a=l.length;!l[a-1];--a);for(s=1,g="1.";sa)for(i-=a;i--;)g+="0";else iA)return e.length=A,!0}function eF(e){return new this(e).abs()}function AF(e){return new this(e).acos()}function tF(e){return new this(e).acosh()}function rF(e,A){return new this(e).plus(A)}function nF(e){return new this(e).asin()}function iF(e){return new this(e).asinh()}function sF(e){return new this(e).atan()}function oF(e){return new this(e).atanh()}function aF(e,A){e=new this(e),A=new this(A);var t,r=this.precision,n=this.rounding,i=r+4;return!e.s||!A.s?t=new this(NaN):!e.d&&!A.d?(t=KA(this,i,1).times(A.s>0?.25:.75),t.s=e.s):!A.d||e.isZero()?(t=A.s<0?KA(this,r,n):new this(0),t.s=e.s):!e.d||A.isZero()?(t=KA(this,i,1).times(.5),t.s=e.s):A.s<0?(this.precision=i,this.rounding=1,t=this.atan(ge(e,A,i,1)),A=KA(this,i,1),this.precision=r,this.rounding=n,t=e.s<0?t.minus(A):t.plus(A)):t=this.atan(ge(e,A,i,1)),t}function cF(e){return new this(e).cbrt()}function gF(e){return b(e=new this(e),e.e+1,2)}function lF(e,A,t){return new this(e).clamp(A,t)}function uF(e){if(!e||typeof e!="object")throw Error(Ia+"Object expected");var A,t,r,n=e.defaults===!0,i=["precision",1,dr,"rounding",0,8,"toExpNeg",-bn,0,"toExpPos",0,bn,"maxE",0,bn,"minE",-bn,0,"modulo",0,9];for(A=0;A=i[A+1]&&r<=i[A+2])this[t]=r;else throw Error(hr+t+": "+r);if(t="crypto",n&&(this[t]=Gl[t]),(r=e[t])!==void 0)if(r===!0||r===!1||r===0||r===1)if(r)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(gf);else this[t]=!1;else throw Error(hr+t+": "+r);return this}function EF(e){return new this(e).cos()}function hF(e){return new this(e).cosh()}function ff(e){var A,t,r;function n(i){var s,o,a,c=this;if(!(c instanceof n))return new n(i);if(c.constructor=n,of(i)){c.s=i.s,T?!i.d||i.e>n.maxE?(c.e=NaN,c.d=null):i.e=10;o/=10)s++;T?s>n.maxE?(c.e=NaN,c.d=null):s=429e7?A[i]=crypto.getRandomValues(new Uint32Array(1))[0]:o[i++]=n%1e7;else if(crypto.randomBytes){for(A=crypto.randomBytes(r*=4);i=214e7?crypto.randomBytes(4).copy(A,i):(o.push(n%1e7),i+=4);i=r/4}else throw Error(gf);else for(;i=10;n/=10)r++;rVe(Ut(e)),punctuation:Ut,directive:Tt,function:Tt,variable:e=>Ve(Ut(e)),string:e=>Ve(ir(e)),boolean:Lt,number:Tt,comment:_i};var YF=e=>e,ya={},VF=0,v={manual:ya.Prism&&ya.Prism.manual,disableWorkerMessageHandler:ya.Prism&&ya.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof XA){let A=e;return new XA(A.type,v.util.encode(A.content),A.alias)}else return Array.isArray(e)?e.map(v.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(De instanceof XA)continue;if(K&&q!=A.length-1){p.lastIndex=ae;var l=p.exec(e);if(!l)break;var g=l.index+(m?l[1].length:0),u=l.index+l[0].length,o=q,a=ae;for(let P=A.length;o=a&&(++q,ae=a);if(A[q]instanceof XA)continue;c=o-q,De=e.slice(ae,a),l.index-=ae}else{p.lastIndex=0;var l=p.exec(De),c=1}if(!l){if(i)break;continue}m&&(H=l[1]?l[1].length:0);var g=l.index+H,l=l[0].slice(H),u=g+l.length,E=De.slice(0,g),h=De.slice(u);let ee=[q,c];E&&(++q,ae+=E.length,ee.push(E));let Y=new XA(d,w?v.tokenize(l,w):l,ne,l,K);if(ee.push(Y),h&&ee.push(h),Array.prototype.splice.apply(A,ee),c!=1&&v.matchGrammar(e,A,t,q,ae,!0,d),i)break}}}},tokenize:function(e,A){let t=[e],r=A.rest;if(r){for(let n in r)A[n]=r[n];delete A.rest}return v.matchGrammar(e,t,A,0,0,!1),t},hooks:{all:{},add:function(e,A){let t=v.hooks.all;t[e]=t[e]||[],t[e].push(A)},run:function(e,A){let t=v.hooks.all[e];if(!(!t||!t.length))for(var r=0,n;n=t[r++];)n(A)}},Token:XA};v.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};v.languages.javascript=v.languages.extend("clike",{"class-name":[v.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});v.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;v.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:v.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:v.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:v.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:v.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});v.languages.markup&&v.languages.markup.tag.addInlined("script","javascript");v.languages.js=v.languages.javascript;v.languages.typescript=v.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});v.languages.ts=v.languages.typescript;function XA(e,A,t,r,n){this.type=e,this.content=A,this.alias=t,this.length=(r||"").length|0,this.greedy=!!n}XA.stringify=function(e,A){return typeof e=="string"?e:Array.isArray(e)?e.map(function(t){return XA.stringify(t,A)}).join(""):qF(e.type)(e.content)};function qF(e){return If[e]||YF}function Bf(e){return OF(e,v.languages.javascript)}function OF(e,A){return v.tokenize(e,A).map(r=>XA.stringify(r)).join("")}var pf=Z(jC());function mf(e){return(0,pf.default)(e)}var wa=class e{static read(A){let t;try{t=yf.default.readFileSync(A,"utf-8")}catch{return null}return e.fromContent(t)}static fromContent(A){let t=A.split(/\r?\n/);return new e(1,t)}constructor(A,t){this.firstLineNumber=A,this.lines=t}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(A,t){if(Athis.lines.length+this.firstLineNumber)return this;let r=A-this.firstLineNumber,n=[...this.lines];return n[r]=t(n[r]),new e(this.firstLineNumber,n)}mapLines(A){return new e(this.firstLineNumber,this.lines.map((t,r)=>A(t,this.firstLineNumber+r)))}lineAt(A){return this.lines[A-this.firstLineNumber]}prependSymbolAt(A,t){return this.mapLines((r,n)=>n===A?`${t} ${r}`:` ${r}`)}slice(A,t){let r=this.lines.slice(A-1,t).join(` +`);return new e(A,mf(r).split(` +`))}highlight(){let A=Bf(this.toString());return new e(this.firstLineNumber,A.split(` +`))}toString(){return this.lines.join(` +`)}};var HF={red:vA,gray:_i,dim:Ur,bold:Ve,underline:EA,highlightSource:e=>e.highlight()},WF={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function _F({message:e,originalMethod:A,isPanic:t,callArguments:r}){return{functionName:`prisma.${A}()`,message:e,isPanic:t??!1,callArguments:r}}function jF({callsite:e,message:A,originalMethod:t,isPanic:r,callArguments:n},i){let s=_F({message:A,originalMethod:t,isPanic:r,callArguments:n});if(!e||typeof window<"u"||process.env.NODE_ENV==="production")return s;let o=e.getLocation();if(!o||!o.lineNumber||!o.columnNumber)return s;let a=Math.max(1,o.lineNumber-3),c=wa.read(o.fileName)?.slice(a,o.lineNumber),g=c?.lineAt(o.lineNumber);if(c&&g){let l=ZF(g),u=KF(g);if(!u)return s;s.functionName=`${u.code})`,s.location=o,r||(c=c.mapLineAt(o.lineNumber,h=>h.slice(0,u.openingBraceIndex))),c=i.highlightSource(c);let E=String(c.lastLineNumber).length;if(s.contextLines=c.mapLines((h,d)=>i.gray(String(d).padStart(E))+" "+h).mapLines(h=>i.dim(h)).prependSymbolAt(o.lineNumber,i.bold(i.red("\u2192"))),n){let h=l+E+1;h+=2,s.callArguments=(0,wf.default)(n,h).slice(h)}}return s}function KF(e){let A=Object.keys(lr.ModelAction).join("|"),r=new RegExp(String.raw`\.(${A})\(`).exec(e);if(r){let n=r.index+r[0].length,i=e.lastIndexOf(" ",r.index)+1;return{code:e.slice(i,n),openingBraceIndex:n}}return null}function ZF(e){let A=0;for(let t=0;t"Unknown error")}function Sf(e){return e.errors.flatMap(A=>A.kind==="Union"?Sf(A):[A])}function $F(e){let A=new Map,t=[];for(let r of e){if(r.kind!=="InvalidArgumentType"){t.push(r);continue}let n=`${r.selectionPath.join(".")}:${r.argumentPath.join(".")}`,i=A.get(n);i?A.set(n,{...r,argument:{...r.argument,typeNames:eN(i.argument.typeNames,r.argument.typeNames)}}):A.set(n,r)}return t.push(...A.values()),t}function eN(e,A){return[...new Set(e.concat(A))]}function AN(e){return vl(e,(A,t)=>{let r=Df(A),n=Df(t);return r!==n?r-n:bf(A)-bf(t)})}function Df(e){let A=0;return Array.isArray(e.selectionPath)&&(A+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(A+=e.argumentPath.length),A}function bf(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var RA=class{constructor(A,t){this.name=A;this.value=t;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(A){let{colors:{green:t}}=A.context;A.addMarginSymbol(t(this.isRequired?"+":"?")),A.write(t(this.name)),this.isRequired||A.write(t("?")),A.write(t(": ")),typeof this.value=="string"?A.write(t(this.value)):A.write(this.value)}};var Un=class{constructor(A=0,t){this.context=t;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=A}write(A){return typeof A=="string"?this.currentLine+=A:A.write(this),this}writeJoined(A,t,r=(n,i)=>i.write(n)){let n=t.length-1;for(let i=0;i0&&this.currentIndent--,this}addMarginSymbol(A){return this.marginSymbol=A,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let A=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+A.slice(1):A}};var Da=class{constructor(A){this.value=A}write(A){A.write(this.value)}markAsError(){this.value.markAsError()}};var ba=e=>e,ka={bold:ba,red:ba,green:ba,dim:ba,enabled:!1},Ff={bold:Ve,red:vA,green:ir,dim:Ur,enabled:!0},Tn={write(e){e.writeLine(",")}};var Et=class{constructor(A){this.contents=A;this.isUnderlined=!1;this.color=A=>A}underline(){return this.isUnderlined=!0,this}setColor(A){return this.color=A,this}write(A){let t=A.getCurrentLineLength();A.write(this.color(this.contents)),this.isUnderlined&&A.afterNextNewline(()=>{A.write(" ".repeat(t)).writeLine(this.color("~".repeat(this.contents.length)))})}};var Qr=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Mn=class extends Qr{constructor(){super(...arguments);this.items=[]}addItem(t){return this.items.push(new Da(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(r=>r.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let r=new Et("[]");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithItems(t){let{colors:r}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(Tn,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(r.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var vn=class e extends Qr{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[r,...n]=t,i=this.getField(r);if(!i)return;let s=i;for(let o of n){let a;if(s.value instanceof e?a=s.value.getField(o):s.value instanceof Mn&&(a=s.value.getField(Number(o))),!a)return;s=a}return s}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let r=this;for(let n of t){if(!(r instanceof e))return;let i=r.getSubSelectionValue(n);if(!i)return;r=i}return r}getDeepSelectionParent(t){let r=this.getSelectionParent();if(!r)return;let n=r;for(let i of t){let s=n.value.getFieldValue(i);if(!s||!(s instanceof e))return;let o=s.getSelectionParent();if(!o)return;n=o}return n}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let r=this.getField("include")?.value.asObject();if(r)return{kind:"include",value:r}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(n=>n.getPrintWidth()))+2}write(t){let r=Object.values(this.fields);if(r.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,r)}asObject(){return this}writeEmpty(t){let r=new Et("{}");this.hasError&&r.setColor(t.context.colors.red).underline(),t.write(r)}writeWithContents(t,r){t.writeLine("{").withIndent(()=>{t.writeJoined(Tn,[...r,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};var He=class extends Qr{constructor(t){super();this.text=t}getPrintWidth(){return this.text.length}write(t){let r=new Et(this.text);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r)}asObject(){}};var gs=class{constructor(){this.fields=[]}addField(A,t){return this.fields.push({write(r){let{green:n,dim:i}=r.context.colors;r.write(n(i(`${A}: ${t}`))).addMarginSymbol(n(i("+")))}}),this}write(A){let{colors:{green:t}}=A.context;A.writeLine(t("{")).withIndent(()=>{A.writeJoined(Tn,this.fields).newLine()}).write(t("}")).addMarginSymbol(t("+"))}};function Ra(e,A,t){switch(e.kind){case"MutuallyExclusiveFields":rN(e,A);break;case"IncludeOnScalar":nN(e,A);break;case"EmptySelection":iN(e,A,t);break;case"UnknownSelectionField":cN(e,A);break;case"InvalidSelectionValue":gN(e,A);break;case"UnknownArgument":lN(e,A);break;case"UnknownInputField":uN(e,A);break;case"RequiredArgumentMissing":EN(e,A);break;case"InvalidArgumentType":hN(e,A);break;case"InvalidArgumentValue":dN(e,A);break;case"ValueTooLarge":QN(e,A);break;case"SomeFieldsMissing":CN(e,A);break;case"TooManyFieldsGiven":fN(e,A);break;case"Union":kf(e,A,t);break;default:throw new Error("not implemented: "+e.kind)}}function rN(e,A){let t=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();t&&(t.getField(e.firstField)?.markAsError(),t.getField(e.secondField)?.markAsError()),A.addErrorMessage(r=>`Please ${r.bold("either")} use ${r.green(`\`${e.firstField}\``)} or ${r.green(`\`${e.secondField}\``)}, but ${r.red("not both")} at the same time.`)}function nN(e,A){let[t,r]=ls(e.selectionPath),n=e.outputType,i=A.arguments.getDeepSelectionParent(t)?.value;if(i&&(i.getField(r)?.markAsError(),n))for(let s of n.fields)s.isRelation&&i.addSuggestion(new RA(s.name,"true"));A.addErrorMessage(s=>{let o=`Invalid scalar field ${s.red(`\`${r}\``)} for ${s.bold("include")} statement`;return n?o+=` on model ${s.bold(n.name)}. ${us(s)}`:o+=".",o+=` +Note that ${s.bold("include")} statements only accept relation fields.`,o})}function iN(e,A,t){let r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(r){let n=r.getField("omit")?.value.asObject();if(n){sN(e,A,n);return}if(r.hasField("select")){oN(e,A);return}}if(t?.[Fn(e.outputType.name)]){aN(e,A);return}A.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function sN(e,A,t){t.removeAllFields();for(let r of e.outputType.fields)t.addSuggestion(new RA(r.name,"false"));A.addErrorMessage(r=>`The ${r.red("omit")} statement includes every field of the model ${r.bold(e.outputType.name)}. At least one field must be included in the result`)}function oN(e,A){let t=e.outputType,r=A.arguments.getDeepSelectionParent(e.selectionPath)?.value,n=r?.isEmpty()??!1;r&&(r.removeAllFields(),Uf(r,t)),A.addErrorMessage(i=>n?`The ${i.red("`select`")} statement for type ${i.bold(t.name)} must not be empty. ${us(i)}`:`The ${i.red("`select`")} statement for type ${i.bold(t.name)} needs ${i.bold("at least one truthy value")}.`)}function aN(e,A){let t=new gs;for(let n of e.outputType.fields)n.isRelation||t.addField(n.name,"false");let r=new RA("omit",t).makeRequired();if(e.selectionPath.length===0)A.arguments.addSuggestion(r);else{let[n,i]=ls(e.selectionPath),o=A.arguments.getDeepSelectionParent(n)?.value.asObject()?.getField(i);if(o){let a=o?.value.asObject()??new vn;a.addSuggestion(r),o.value=a}}A.addErrorMessage(n=>`The global ${n.red("omit")} configuration excludes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function cN(e,A){let t=Tf(e.selectionPath,A);if(t.parentKind!=="unknown"){t.field.markAsError();let r=t.parent;switch(t.parentKind){case"select":Uf(r,e.outputType);break;case"include":IN(r,e.outputType);break;case"omit":BN(r,e.outputType);break}}A.addErrorMessage(r=>{let n=[`Unknown field ${r.red(`\`${t.fieldName}\``)}`];return t.parentKind!=="unknown"&&n.push(`for ${r.bold(t.parentKind)} statement`),n.push(`on model ${r.bold(`\`${e.outputType.name}\``)}.`),n.push(us(r)),n.join(" ")})}function gN(e,A){let t=Tf(e.selectionPath,A);t.parentKind!=="unknown"&&t.field.value.markAsError(),A.addErrorMessage(r=>`Invalid value for selection field \`${r.red(t.fieldName)}\`: ${e.underlyingError}`)}function lN(e,A){let t=e.argumentPath[0],r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(t)?.markAsError(),pN(r,e.arguments)),A.addErrorMessage(n=>xf(n,t,e.arguments.map(i=>i.name)))}function uN(e,A){let[t,r]=ls(e.argumentPath),n=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){n.getDeepField(e.argumentPath)?.markAsError();let i=n.getDeepFieldValue(t)?.asObject();i&&Mf(i,e.inputType)}A.addErrorMessage(i=>xf(i,r,e.inputType.fields.map(s=>s.name)))}function xf(e,A,t){let r=[`Unknown argument \`${e.red(A)}\`.`],n=yN(A,t);return n&&r.push(`Did you mean \`${e.green(n)}\`?`),t.length>0&&r.push(us(e)),r.join(" ")}function EN(e,A){let t;A.addErrorMessage(a=>t?.value instanceof He&&t.value.text==="null"?`Argument \`${a.green(i)}\` must not be ${a.red("null")}.`:`Argument \`${a.green(i)}\` is missing.`);let r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!r)return;let[n,i]=ls(e.argumentPath),s=new gs,o=r.getDeepFieldValue(n)?.asObject();if(o)if(t=o.getField(i),t&&o.removeField(i),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let a of e.inputTypes[0].fields)s.addField(a.name,a.typeNames.join(" | "));o.addSuggestion(new RA(i,s).makeRequired())}else{let a=e.inputTypes.map(Lf).join(" | ");o.addSuggestion(new RA(i,a).makeRequired())}}function Lf(e){return e.kind==="list"?`${Lf(e.elementType)}[]`:e.name}function hN(e,A){let t=e.argument.name,r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&r.getDeepFieldValue(e.argumentPath)?.markAsError(),A.addErrorMessage(n=>{let i=Sa("or",e.argument.typeNames.map(s=>n.green(s)));return`Argument \`${n.bold(t)}\`: Invalid value provided. Expected ${i}, provided ${n.red(e.inferredType)}.`})}function dN(e,A){let t=e.argument.name,r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&r.getDeepFieldValue(e.argumentPath)?.markAsError(),A.addErrorMessage(n=>{let i=[`Invalid value for argument \`${n.bold(t)}\``];if(e.underlyingError&&i.push(`: ${e.underlyingError}`),i.push("."),e.argument.typeNames.length>0){let s=Sa("or",e.argument.typeNames.map(o=>n.green(o)));i.push(` Expected ${s}.`)}return i.join("")})}function QN(e,A){let t=e.argument.name,r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),n;if(r){let s=r.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof He&&(n=s.text)}A.addErrorMessage(i=>{let s=["Unable to fit value"];return n&&s.push(i.red(n)),s.push(`into a 64-bit signed integer for field \`${i.bold(t)}\``),s.join(" ")})}function CN(e,A){let t=e.argumentPath[e.argumentPath.length-1],r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(r){let n=r.getDeepFieldValue(e.argumentPath)?.asObject();n&&Mf(n,e.inputType)}A.addErrorMessage(n=>{let i=[`Argument \`${n.bold(t)}\` of type ${n.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?i.push(`${n.green("at least one of")} ${Sa("or",e.constraints.requiredFields.map(s=>`\`${n.bold(s)}\``))} arguments.`):i.push(`${n.green("at least one")} argument.`):i.push(`${n.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),i.push(us(n)),i.join(" ")})}function fN(e,A){let t=e.argumentPath[e.argumentPath.length-1],r=A.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),n=[];if(r){let i=r.getDeepFieldValue(e.argumentPath)?.asObject();i&&(i.markAsError(),n=Object.keys(i.getFields()))}A.addErrorMessage(i=>{let s=[`Argument \`${i.bold(t)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${i.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${i.green("at most one")} argument,`):s.push(`${i.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Sa("and",n.map(o=>i.red(o)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Uf(e,A){for(let t of A.fields)e.hasField(t.name)||e.addSuggestion(new RA(t.name,"true"))}function IN(e,A){for(let t of A.fields)t.isRelation&&!e.hasField(t.name)&&e.addSuggestion(new RA(t.name,"true"))}function BN(e,A){for(let t of A.fields)!e.hasField(t.name)&&!t.isRelation&&e.addSuggestion(new RA(t.name,"true"))}function pN(e,A){for(let t of A)e.hasField(t.name)||e.addSuggestion(new RA(t.name,t.typeNames.join(" | ")))}function Tf(e,A){let[t,r]=ls(e),n=A.arguments.getDeepSubSelectionValue(t)?.asObject();if(!n)return{parentKind:"unknown",fieldName:r};let i=n.getFieldValue("select")?.asObject(),s=n.getFieldValue("include")?.asObject(),o=n.getFieldValue("omit")?.asObject(),a=i?.getField(r);return i&&a?{parentKind:"select",parent:i,field:a,fieldName:r}:(a=s?.getField(r),s&&a?{parentKind:"include",field:a,parent:s,fieldName:r}:(a=o?.getField(r),o&&a?{parentKind:"omit",field:a,parent:o,fieldName:r}:{parentKind:"unknown",fieldName:r}))}function Mf(e,A){if(A.kind==="object")for(let t of A.fields)e.hasField(t.name)||e.addSuggestion(new RA(t.name,t.typeNames.join(" | ")))}function ls(e){let A=[...e],t=A.pop();if(!t)throw new Error("unexpected empty path");return[A,t]}function us({green:e,enabled:A}){return"Available options are "+(A?`listed in ${e("green")}`:"marked with ?")+"."}function Sa(e,A){if(A.length===1)return A[0];let t=[...A],r=t.pop();return`${t.join(", ")} ${e} ${r}`}var mN=3;function yN(e,A){let t=1/0,r;for(let n of A){let i=(0,Nf.default)(e,n);i>mN||i`}};function Pn(e){return e instanceof Es}var Fa=Symbol(),Hl=new WeakMap,Jt=class{constructor(A){A===Fa?Hl.set(this,`Prisma.${this._getName()}`):Hl.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Hl.get(this)}},hs=class extends Jt{_getNamespace(){return"NullTypes"}},ds=class extends hs{};Wl(ds,"DbNull");var Qs=class extends hs{};Wl(Qs,"JsonNull");var Cs=class extends hs{};Wl(Cs,"AnyNull");var Na={classes:{DbNull:ds,JsonNull:Qs,AnyNull:Cs},instances:{DbNull:new ds(Fa),JsonNull:new Qs(Fa),AnyNull:new Cs(Fa)}};function Wl(e,A){Object.defineProperty(e,"name",{value:A,configurable:!0})}var Pf=": ",xa=class{constructor(A,t){this.name=A;this.value=t;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Pf.length}write(A){let t=new Et(this.name);this.hasError&&t.underline().setColor(A.context.colors.red),A.write(t).write(Pf).write(this.value)}};var _l=class{constructor(A){this.errorMessages=[];this.arguments=A}write(A){A.write(this.arguments)}addErrorMessage(A){this.errorMessages.push(A)}renderAllMessages(A){return this.errorMessages.map(t=>t(A)).join(` +`)}};function Gn(e){return new _l(Gf(e))}function Gf(e){let A=new vn;for(let[t,r]of Object.entries(e)){let n=new xa(t,Jf(r));A.addField(n)}return A}function Jf(e){if(typeof e=="string")return new He(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new He(String(e));if(typeof e=="bigint")return new He(`${e}n`);if(e===null)return new He("null");if(e===void 0)return new He("undefined");if(xn(e))return new He(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new He(`Buffer.alloc(${e.byteLength})`):new He(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let A=ma(e)?e.toISOString():"Invalid Date";return new He(`new Date("${A}")`)}return e instanceof Jt?new He(`Prisma.${e._getName()}`):Pn(e)?new He(`prisma.${vf(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?wN(e):typeof e=="object"?Gf(e):new He(Object.prototype.toString.call(e))}function wN(e){let A=new Mn;for(let t of e)A.addItem(Jf(t));return A}function La(e,A){let t=A==="pretty"?Ff:ka,r=e.renderAllMessages(t),n=new Un(0,{colors:t}).write(e).toString();return{message:r,args:n}}function Ua({args:e,errors:A,errorFormat:t,callsite:r,originalMethod:n,clientVersion:i,globalOmit:s}){let o=Gn(e);for(let l of A)Ra(l,o,s);let{message:a,args:c}=La(o,t),g=Ln({message:a,callsite:r,originalMethod:n,showColors:t==="pretty",callArguments:c});throw new Oe(g,{clientVersion:i})}var ht=class{constructor(){this._map=new Map}get(A){return this._map.get(A)?.value}set(A,t){this._map.set(A,{value:t})}getOrCreate(A,t){let r=this._map.get(A);if(r)return r.value;let n=t();return this.set(A,n),n}};function fs(e){let A;return{get(){return A||(A={value:e()}),A.value}}}function dt(e){return e.replace(/^./,A=>A.toLowerCase())}function Vf(e,A,t){let r=dt(t);return!A.result||!(A.result.$allModels||A.result[r])?e:RN({...e,...Yf(A.name,e,A.result.$allModels),...Yf(A.name,e,A.result[r])})}function RN(e){let A=new ht,t=(r,n)=>A.getOrCreate(r,()=>n.has(r)?[r]:(n.add(r),e[r]?e[r].needs.flatMap(i=>t(i,n)):[r]));return Dn(e,r=>({...r,needs:t(r.name,new Set)}))}function Yf(e,A,t){return t?Dn(t,({needs:r,compute:n},i)=>({name:i,needs:r?Object.keys(r).filter(s=>r[s]):[],compute:DN(A,i,n)})):{}}function DN(e,A,t){let r=e?.[A]?.compute;return r?n=>t({...n,[A]:r(n)}):t}function qf(e,A){if(!A)return e;let t={...e};for(let r of Object.values(A))if(e[r.name])for(let n of r.needs)t[n]=!0;return t}function Of(e,A){if(!A)return e;let t={...e};for(let r of Object.values(A))if(!e[r.name])for(let n of r.needs)delete t[n];return t}var Ta=class{constructor(A,t){this.extension=A;this.previous=t;this.computedFieldsCache=new ht;this.modelExtensionsCache=new ht;this.queryCallbacksCache=new ht;this.clientExtensions=fs(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=fs(()=>{let A=this.previous?.getAllBatchQueryCallbacks()??[],t=this.extension.query?.$__internalBatch;return t?A.concat(t):A})}getAllComputedFields(A){return this.computedFieldsCache.getOrCreate(A,()=>Vf(this.previous?.getAllComputedFields(A),this.extension,A))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(A){return this.modelExtensionsCache.getOrCreate(A,()=>{let t=dt(A);return!this.extension.model||!(this.extension.model[t]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(A):{...this.previous?.getAllModelExtensions(A),...this.extension.model.$allModels,...this.extension.model[t]}})}getAllQueryCallbacks(A,t){return this.queryCallbacksCache.getOrCreate(`${A}:${t}`,()=>{let r=this.previous?.getAllQueryCallbacks(A,t)??[],n=[],i=this.extension.query;return!i||!(i[A]||i.$allModels||i[t]||i.$allOperations)?r:(i[A]!==void 0&&(i[A][t]!==void 0&&n.push(i[A][t]),i[A].$allOperations!==void 0&&n.push(i[A].$allOperations)),A!=="$none"&&i.$allModels!==void 0&&(i.$allModels[t]!==void 0&&n.push(i.$allModels[t]),i.$allModels.$allOperations!==void 0&&n.push(i.$allModels.$allOperations)),i[t]!==void 0&&n.push(i[t]),i.$allOperations!==void 0&&n.push(i.$allOperations),r.concat(n))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Jn=class e{constructor(A){this.head=A}static empty(){return new e}static single(A){return new e(new Ta(A))}isEmpty(){return this.head===void 0}append(A){return new e(new Ta(A,this.head))}getAllComputedFields(A){return this.head?.getAllComputedFields(A)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(A){return this.head?.getAllModelExtensions(A)}getAllQueryCallbacks(A,t){return this.head?.getAllQueryCallbacks(A,t)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};var Hf=Symbol(),Is=class{constructor(A){if(A!==Hf)throw new Error("Skip instance can not be constructed directly")}ifUndefined(A){return A===void 0?Ma:A}},Ma=new Is(Hf);function Qt(e){return e instanceof Is}var bN={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},Wf="explicitly `undefined` values are not allowed";function va({modelName:e,action:A,args:t,runtimeDataModel:r,extensions:n=Jn.empty(),callsite:i,clientMethod:s,errorFormat:o,clientVersion:a,previewFeatures:c,globalOmit:g}){let l=new jl({runtimeDataModel:r,modelName:e,action:A,rootArgs:t,callsite:i,extensions:n,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:o,clientVersion:a,previewFeatures:c,globalOmit:g});return{modelName:e,action:bN[A],query:Bs(t,l)}}function Bs({select:e,include:A,...t}={},r){let n;return r.isPreviewFeatureOn("omitApi")&&(n=t.omit,delete t.omit),{arguments:jf(t,r),selection:kN(e,A,n,r)}}function kN(e,A,t,r){return e?(A?r.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:r.getSelectionPath()}):t&&r.isPreviewFeatureOn("omitApi")&&r.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:r.getSelectionPath()}),xN(e,r)):SN(r,A,t)}function SN(e,A,t){let r={};return e.modelOrType&&!e.isRawAction()&&(r.$composites=!0,r.$scalars=!0),A&&FN(r,A,e),e.isPreviewFeatureOn("omitApi")&&NN(r,t,e),r}function FN(e,A,t){for(let[r,n]of Object.entries(A)){if(Qt(n))continue;let i=t.nestSelection(r);if(Kl(n,i),n===!1||n===void 0){e[r]=!1;continue}let s=t.findField(r);if(s&&s.kind!=="object"&&t.throwValidationError({kind:"IncludeOnScalar",selectionPath:t.getSelectionPath().concat(r),outputType:t.getOutputTypeDescription()}),s){e[r]=Bs(n===!0?{}:n,i);continue}if(n===!0){e[r]=!0;continue}e[r]=Bs(n,i)}}function NN(e,A,t){let r=t.getComputedFields(),n={...t.getGlobalOmit(),...A},i=Of(n,r);for(let[s,o]of Object.entries(i)){if(Qt(o))continue;Kl(o,t.nestSelection(s));let a=t.findField(s);r?.[s]&&!a||(e[s]=!o)}}function xN(e,A){let t={},r=A.getComputedFields(),n=qf(e,r);for(let[i,s]of Object.entries(n)){if(Qt(s))continue;let o=A.nestSelection(i);Kl(s,o);let a=A.findField(i);if(!(r?.[i]&&!a)){if(s===!1||s===void 0||Qt(s)){t[i]=!1;continue}if(s===!0){a?.kind==="object"?t[i]=Bs({},o):t[i]=!0;continue}t[i]=Bs(s,o)}}return t}function _f(e,A){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(Nn(e)){if(ma(e))return{$type:"DateTime",value:e.toISOString()};A.throwValidationError({kind:"InvalidArgumentValue",selectionPath:A.getSelectionPath(),argumentPath:A.getArgumentPath(),argument:{name:A.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(Pn(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return LN(e,A);if(ArrayBuffer.isView(e))return{$type:"Bytes",value:Buffer.from(e).toString("base64")};if(UN(e))return e.values;if(xn(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Jt){if(e!==Na.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(TN(e))return e.toJSON();if(typeof e=="object")return jf(e,A);A.throwValidationError({kind:"InvalidArgumentValue",selectionPath:A.getSelectionPath(),argumentPath:A.getArgumentPath(),argument:{name:A.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function jf(e,A){if(e.$type)return{$type:"Raw",value:e};let t={};for(let r in e){let n=e[r],i=A.nestArgument(r);Qt(n)||(n!==void 0?t[r]=_f(n,i):A.isPreviewFeatureOn("strictUndefinedChecks")&&A.throwValidationError({kind:"InvalidArgumentValue",argumentPath:i.getArgumentPath(),selectionPath:A.getSelectionPath(),argument:{name:A.getArgumentName(),typeNames:[]},underlyingError:Wf}))}return t}function LN(e,A){let t=[];for(let r=0;r({name:A.name,typeName:"boolean",isRelation:A.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(A){return this.params.previewFeatures.includes(A)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(A){return this.modelOrType?.fields.find(t=>t.name===A)}nestSelection(A){let t=this.findField(A),r=t?.kind==="object"?t.type:void 0;return new e({...this.params,modelName:r,selectionPath:this.params.selectionPath.concat(A)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Fn(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:vt(this.params.action,"Unknown action")}}nestArgument(A){return new e({...this.params,argumentPath:this.params.argumentPath.concat(A)})}};var Yn=class{constructor(A){this._engine=A}prometheus(A){return this._engine.metrics({format:"prometheus",...A})}json(A){return this._engine.metrics({format:"json",...A})}};function Kf(e){return{models:Zl(e.models),enums:Zl(e.enums),types:Zl(e.types)}}function Zl(e){let A={};for(let{name:t,...r}of e)A[t]=r;return A}function Zf(e,A){let t=fs(()=>MN(A));Object.defineProperty(e,"dmmf",{get:()=>t.get()})}function MN(e){return{datamodel:{models:Xl(e.models),enums:Xl(e.enums),types:Xl(e.types)}}}function Xl(e){return Object.entries(e).map(([A,t])=>({name:A,...t}))}var zl=new WeakMap,Pa="$$PrismaTypedSql",$l=class{constructor(A,t){zl.set(this,{sql:A,values:t}),Object.defineProperty(this,Pa,{value:Pa})}get sql(){return zl.get(this).sql}get values(){return zl.get(this).values}};function Xf(e){return(...A)=>new $l(e,A)}function zf(e){return e!=null&&e[Pa]===Pa}function ps(e){return{ok:!1,error:e,map(){return ps(e)},flatMap(){return ps(e)}}}var eu=class{constructor(){this.registeredErrors=[]}consumeError(A){return this.registeredErrors[A]}registerNewError(A){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:A},t}},Au=e=>{let A=new eu,t=Ct(A,e.transactionContext.bind(e)),r={adapterName:e.adapterName,errorRegistry:A,queryRaw:Ct(A,e.queryRaw.bind(e)),executeRaw:Ct(A,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...n)=>(await t(...n)).map(s=>vN(A,s))};return e.getConnectionInfo&&(r.getConnectionInfo=GN(A,e.getConnectionInfo.bind(e))),r},vN=(e,A)=>{let t=Ct(e,A.startTransaction.bind(A));return{adapterName:A.adapterName,provider:A.provider,queryRaw:Ct(e,A.queryRaw.bind(A)),executeRaw:Ct(e,A.executeRaw.bind(A)),startTransaction:async(...r)=>(await t(...r)).map(i=>PN(e,i))}},PN=(e,A)=>({adapterName:A.adapterName,provider:A.provider,options:A.options,queryRaw:Ct(e,A.queryRaw.bind(A)),executeRaw:Ct(e,A.executeRaw.bind(A)),commit:Ct(e,A.commit.bind(A)),rollback:Ct(e,A.rollback.bind(A))});function Ct(e,A){return async(...t)=>{try{return await A(...t)}catch(r){let n=e.registerNewError(r);return ps({kind:"GenericJs",id:n})}}}function GN(e,A){return(...t)=>{try{return A(...t)}catch(r){let n=e.registerNewError(r);return ps({kind:"GenericJs",id:n})}}}var mD=Z(ml());var yD=require("async_hooks"),wD=require("events"),RD=Z(require("fs")),Uo=Z(require("path"));var dA=class e{constructor(A,t){if(A.length-1!==t.length)throw A.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${A.length} strings to have ${A.length-1} values`);let r=t.reduce((s,o)=>s+(o instanceof e?o.values.length:1),0);this.values=new Array(r),this.strings=new Array(r+1),this.strings[0]=A[0];let n=0,i=0;for(;ne.getPropertyValue(t))},getPropertyDescriptor(t){return e.getPropertyDescriptor?.(t)}}}var Ga={enumerable:!0,configurable:!0,writable:!0};function Ja(e){let A=new Set(e);return{getOwnPropertyDescriptor:()=>Ga,has:(t,r)=>A.has(r),set:(t,r,n)=>A.add(r)&&Reflect.set(t,r,n),ownKeys:()=>[...A]}}var AI=Symbol.for("nodejs.util.inspect.custom");function ft(e,A){let t=JN(A),r=new Set,n=new Proxy(e,{get(i,s){if(r.has(s))return i[s];let o=t.get(s);return o?o.getPropertyValue(s):i[s]},has(i,s){if(r.has(s))return!0;let o=t.get(s);return o?o.has?.(s)??!0:Reflect.has(i,s)},ownKeys(i){let s=tI(Reflect.ownKeys(i),t),o=tI(Array.from(t.keys()),t);return[...new Set([...s,...o,...r])]},set(i,s,o){return t.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(r.add(s),Reflect.set(i,s,o))},getOwnPropertyDescriptor(i,s){let o=Reflect.getOwnPropertyDescriptor(i,s);if(o&&!o.configurable)return o;let a=t.get(s);return a?a.getPropertyDescriptor?{...Ga,...a?.getPropertyDescriptor(s)}:Ga:o},defineProperty(i,s,o){return r.add(s),Reflect.defineProperty(i,s,o)}});return n[AI]=function(){let i={...this};return delete i[AI],i},n}function JN(e){let A=new Map;for(let t of e){let r=t.getKeys();for(let n of r)A.set(n,t)}return A}function tI(e,A){return e.filter(t=>A.get(t)?.has?.(t)??!0)}function Vn(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function qn(e,A){return{batch:e,transaction:A?.kind==="batch"?{isolationLevel:A.options.isolationLevel}:void 0}}function rI(e){if(e===void 0)return"";let A=Gn(e);return new Un(0,{colors:ka}).write(A).toString()}var YN="P2037";function Yt({error:e,user_facing_error:A},t,r){return A.error_code?new xe(VN(A,r),{code:A.error_code,clientVersion:t,meta:A.meta,batchRequestIdx:A.batch_request_idx}):new ve(e,{clientVersion:t,batchRequestIdx:A.batch_request_idx})}function VN(e,A){let t=e.message;return(A==="postgresql"||A==="postgres"||A==="mysql")&&e.error_code===YN&&(t+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),t}var ys="";function nI(e){var A=e.split(` +`);return A.reduce(function(t,r){var n=HN(r)||_N(r)||ZN(r)||ex(r)||zN(r);return n&&t.push(n),t},[])}var qN=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ON=/\((\S*)(?::(\d+))(?::(\d+))\)/;function HN(e){var A=qN.exec(e);if(!A)return null;var t=A[2]&&A[2].indexOf("native")===0,r=A[2]&&A[2].indexOf("eval")===0,n=ON.exec(A[2]);return r&&n!=null&&(A[2]=n[1],A[3]=n[2],A[4]=n[3]),{file:t?null:A[2],methodName:A[1]||ys,arguments:t?[A[2]]:[],lineNumber:A[3]?+A[3]:null,column:A[4]?+A[4]:null}}var WN=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function _N(e){var A=WN.exec(e);return A?{file:A[2],methodName:A[1]||ys,arguments:[],lineNumber:+A[3],column:A[4]?+A[4]:null}:null}var jN=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,KN=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function ZN(e){var A=jN.exec(e);if(!A)return null;var t=A[3]&&A[3].indexOf(" > eval")>-1,r=KN.exec(A[3]);return t&&r!=null&&(A[3]=r[1],A[4]=r[2],A[5]=null),{file:A[3],methodName:A[1]||ys,arguments:A[2]?A[2].split(","):[],lineNumber:A[4]?+A[4]:null,column:A[5]?+A[5]:null}}var XN=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function zN(e){var A=XN.exec(e);return A?{file:A[3],methodName:A[1]||ys,arguments:[],lineNumber:+A[4],column:A[5]?+A[5]:null}:null}var $N=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function ex(e){var A=$N.exec(e);return A?{file:A[2],methodName:A[1]||ys,arguments:[],lineNumber:+A[3],column:A[4]?+A[4]:null}:null}var nu=class{getLocation(){return null}},iu=class{constructor(){this._error=new Error}getLocation(){let A=this._error.stack;if(!A)return null;let r=nI(A).find(n=>{if(!n.file)return!1;let i=Sl(n.file);return i!==""&&!i.includes("@prisma")&&!i.includes("/packages/client/src/runtime/")&&!i.endsWith("/runtime/binary.js")&&!i.endsWith("/runtime/library.js")&&!i.endsWith("/runtime/edge.js")&&!i.endsWith("/runtime/edge-esm.js")&&!i.startsWith("internal/")&&!n.methodName.includes("new ")&&!n.methodName.includes("getCallSite")&&!n.methodName.includes("Proxy.")&&n.methodName.split(".").length<4});return!r||!r.file?null:{fileName:r.file,lineNumber:r.lineNumber,columnNumber:r.column}}};function Cr(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new nu:new iu}var iI={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function On(e={}){let A=tx(e);return Object.entries(A).reduce((r,[n,i])=>(iI[n]!==void 0?r.select[n]={select:i}:r[n]=i,r),{select:{}})}function tx(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Ya(e={}){return A=>(typeof e._count=="boolean"&&(A._count=A._count._all),A)}function sI(e,A){let t=Ya(e);return A({action:"aggregate",unpacker:t,argsMapper:On})(e)}function rx(e={}){let{select:A,...t}=e;return typeof A=="object"?On({...t,_count:A}):On({...t,_count:{_all:!0}})}function nx(e={}){return typeof e.select=="object"?A=>Ya(e)(A)._count:A=>Ya(e)(A)._count._all}function oI(e,A){return A({action:"count",unpacker:nx(e),argsMapper:rx})(e)}function ix(e={}){let A=On(e);if(Array.isArray(A.by))for(let t of A.by)typeof t=="string"&&(A.select[t]=!0);else typeof A.by=="string"&&(A.select[A.by]=!0);return A}function sx(e={}){return A=>(typeof e?._count=="boolean"&&A.forEach(t=>{t._count=t._count._all}),A)}function aI(e,A){return A({action:"groupBy",unpacker:sx(e),argsMapper:ix})(e)}function cI(e,A,t){if(A==="aggregate")return r=>sI(r,t);if(A==="count")return r=>oI(r,t);if(A==="groupBy")return r=>aI(r,t)}function gI(e,A){let t=A.fields.filter(n=>!n.relationName),r=Ml(t,n=>n.name);return new Proxy({},{get(n,i){if(i in n||typeof i=="symbol")return n[i];let s=r[i];if(s)return new Es(e,i,s.type,s.isList,s.kind==="enum")},...Ja(Object.keys(r))})}var lI=e=>Array.isArray(e)?e:e.split("."),su=(e,A)=>lI(A).reduce((t,r)=>t&&t[r],e),uI=(e,A,t)=>lI(A).reduceRight((r,n,i,s)=>Object.assign({},su(e,s.slice(0,i)),{[n]:r}),t);function ox(e,A){return e===void 0||A===void 0?[]:[...A,"select",e]}function ax(e,A,t){return A===void 0?e??{}:uI(A,t,e||!0)}function ou(e,A,t,r,n,i){let o=e._runtimeDataModel.models[A].fields.reduce((a,c)=>({...a,[c.name]:c}),{});return a=>{let c=Cr(e._errorFormat),g=ox(r,n),l=ax(a,i,g),u=t({dataPath:g,callsite:c})(l),E=cx(e,A);return new Proxy(u,{get(h,d){if(!E.includes(d))return h[d];let I=[o[d].type,t,d],p=[g,l];return ou(e,...I,...p)},...Ja([...E,...Object.getOwnPropertyNames(u)])})}}function cx(e,A){return e._runtimeDataModel.models[A].fields.filter(t=>t.kind==="object").map(t=>t.name)}function EI(e,A,t,r){return e===lr.ModelAction.findFirstOrThrow||e===lr.ModelAction.findUniqueOrThrow?gx(A,t,r):r}function gx(e,A,t){return async r=>{if("rejectOnNotFound"in r.args){let i=Ln({originalMethod:r.clientMethod,callsite:r.callsite,message:"'rejectOnNotFound' option is not supported"});throw new Oe(i,{clientVersion:A})}return await t(r).catch(i=>{throw i instanceof xe&&i.code==="P2025"?new Pt(`No ${e} found`,A):i})}}var lx=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],ux=["aggregate","count","groupBy"];function au(e,A){let t=e._extensions.getAllModelExtensions(A)??{},r=[Ex(e,A),dx(e,A),ms(t),nA("name",()=>A),nA("$name",()=>A),nA("$parent",()=>e._appliedParent)];return ft({},r)}function Ex(e,A){let t=dt(A),r=Object.keys(lr.ModelAction).concat("count");return{getKeys(){return r},getPropertyValue(n){let i=n,s=a=>e._request(a);s=EI(i,A,e._clientVersion,s);let o=a=>c=>{let g=Cr(e._errorFormat);return e._createPrismaPromise(l=>{let u={args:c,dataPath:[],action:i,model:A,clientMethod:`${t}.${n}`,jsModelName:t,transaction:l,callsite:g};return s({...u,...a})})};return lx.includes(i)?ou(e,A,o):hx(n)?cI(e,n,o):o({})}}}function hx(e){return ux.includes(e)}function dx(e,A){return Yr(nA("fields",()=>{let t=e._runtimeDataModel.models[A];return gI(A,t)}))}function hI(e){return e.replace(/^./,A=>A.toUpperCase())}var cu=Symbol();function ws(e){let A=[Qx(e),nA(cu,()=>e),nA("$parent",()=>e._appliedParent)],t=e._extensions.getAllClientExtensions();return t&&A.push(ms(t)),ft(e,A)}function Qx(e){let A=Object.keys(e._runtimeDataModel.models),t=A.map(dt),r=[...new Set(A.concat(t))];return Yr({getKeys(){return r},getPropertyValue(n){let i=hI(n);if(e._runtimeDataModel.models[i]!==void 0)return au(e,i);if(e._runtimeDataModel.models[n]!==void 0)return au(e,n)},getPropertyDescriptor(n){if(!t.includes(n))return{enumerable:!1}}})}function dI(e){return e[cu]?e[cu]:e}function QI(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let t=e.client.__AccelerateEngine;this._originalClient._engine=new t(this._originalClient._accelerateEngineConfig)}let A=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return ws(A)}function CI({result:e,modelName:A,select:t,omit:r,extensions:n}){let i=n.getAllComputedFields(A);if(!i)return e;let s=[],o=[];for(let a of Object.values(i)){if(r){if(r[a.name])continue;let c=a.needs.filter(g=>r[g]);c.length>0&&o.push(Vn(c))}else if(t){if(!t[a.name])continue;let c=a.needs.filter(g=>!t[g]);c.length>0&&o.push(Vn(c))}Cx(e,a.needs)&&s.push(fx(a,ft(e,s)))}return s.length>0||o.length>0?ft(e,[...s,...o]):e}function Cx(e,A){return A.every(t=>Tl(e,t))}function fx(e,A){return Yr(nA(e.name,()=>e.compute(A)))}function Va({visitor:e,result:A,args:t,runtimeDataModel:r,modelName:n}){if(Array.isArray(A)){for(let s=0;sg.name===i);if(!a||a.kind!=="object"||!a.relationName)continue;let c=typeof s=="object"?s:{};A[i]=Va({visitor:n,result:A[i],args:c,modelName:a.type,runtimeDataModel:r})}}function II({result:e,modelName:A,args:t,extensions:r,runtimeDataModel:n,globalOmit:i}){return r.isEmpty()||e==null||typeof e!="object"||!n.models[A]?e:Va({result:e,args:t??{},modelName:A,runtimeDataModel:n,visitor:(o,a,c)=>{let g=dt(a);return CI({result:o,modelName:g,select:c.select,omit:c.select?void 0:{...i?.[g],...c.omit},extensions:r})}})}function BI(e){if(e instanceof dA)return Ix(e);if(Array.isArray(e)){let t=[e[0]];for(let r=1;r{let i=A.customDataProxyFetch;return"transaction"in A&&n!==void 0&&(A.transaction?.kind==="batch"&&A.transaction.lock.then(),A.transaction=n),r===t.length?e._executeRequest(A):t[r]({model:A.model,operation:A.model?A.action:A.clientMethod,args:BI(A.args??{}),__internalParams:A,query:(s,o=A)=>{let a=o.customDataProxyFetch;return o.customDataProxyFetch=DI(i,a),o.args=s,mI(e,o,t,r+1)}})})}function yI(e,A){let{jsModelName:t,action:r,clientMethod:n}=A,i=t?r:n;if(e._extensions.isEmpty())return e._executeRequest(A);let s=e._extensions.getAllQueryCallbacks(t??"$none",i);return mI(e,A,s)}function wI(e){return A=>{let t={requests:A},r=A[0].extensions.getAllBatchQueryCallbacks();return r.length?RI(t,r,0,e):e(t)}}function RI(e,A,t,r){if(t===A.length)return r(e);let n=e.customDataProxyFetch,i=e.requests[0].transaction;return A[t]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:i?{isolationLevel:i.kind==="batch"?i.isolationLevel:void 0}:void 0},__internalParams:e,query(s,o=e){let a=o.customDataProxyFetch;return o.customDataProxyFetch=DI(n,a),RI(o,A,t+1,r)}})}var pI=e=>e;function DI(e=pI,A=pI){return t=>e(A(t))}var bI=ie("prisma:client"),kI={Vercel:"vercel","Netlify CI":"netlify"};function SI({postinstall:e,ciName:A,clientVersion:t}){if(bI("checkPlatformCaching:postinstall",e),bI("checkPlatformCaching:ciName",A),e===!0&&A&&A in kI){let r=`Prisma has detected that this project was built on ${A}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${kI[A]}-build`;throw console.error(r),new z(r,t)}}function FI(e,A){return e?e.datasources?e.datasources:e.datasourceUrl?{[A[0]]:{url:e.datasourceUrl}}:{}:{}}var Bx="Cloudflare-Workers",px="node";function NI(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Bx?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===px?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var mx={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function xI(){let e=NI();return{id:e,prettyName:mx[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var UR=require("child_process"),TR=Z(kC()),Tg=Z(require("fs"));var MR=Z(TC());function Hn(e){return typeof e=="string"?e:e.message}function LI(e){if(e.fields?.message){let A=e.fields?.message;return e.fields?.file&&(A+=` in ${e.fields.file}`,e.fields?.line&&(A+=`:${e.fields.line}`),e.fields?.column&&(A+=`:${e.fields.column}`)),e.fields?.reason&&(A+=` +${e.fields?.reason}`),A}return"Unknown error"}function UI(e){return e.fields?.message==="PANIC"}function yx(e){return e.timestamp&&typeof e.level=="string"&&typeof e.target=="string"}function gu(e){return yx(e)&&(e.level==="error"||e.fields?.message?.includes("fatal error"))}function TI(e){let t=wx(e.fields)?"query":e.level.toLowerCase();return{...e,level:t,timestamp:new Date(e.timestamp)}}function wx(e){return!!e.query}var Ds=class extends Error{constructor({clientVersion:A,error:t}){let r=LI(t);super(r??"Unknown error"),this._isPanic=UI(t),this.clientVersion=A}get[Symbol.toStringTag](){return"PrismaClientRustError"}isPanic(){return this._isPanic}};L(Ds,"PrismaClientRustError");var JI=Z(require("fs")),bs=Z(require("path"));function qa(e){let{runtimeBinaryTarget:A}=e;return`Add "${A}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: + +${Rx(e)}`}function Rx(e){let{generator:A,generatorBinaryTargets:t,runtimeBinaryTarget:r}=e,n={fromEnvVar:null,value:r},i=[...t,n];return xl({...A,binaryTargets:i})}function fr(e){let{runtimeBinaryTarget:A}=e;return`Prisma Client could not locate the Query Engine for runtime "${A}".`}function Ir(e){let{searchedLocations:A}=e;return`The following locations have been searched: +${[...new Set(A)].map(n=>` ${n}`).join(` +`)}`}function MI(e){let{runtimeBinaryTarget:A}=e;return`${fr(e)} + +This happened because \`binaryTargets\` have been pinned, but the actual deployment also required "${A}". +${qa(e)} + +${Ir(e)}`}function Oa(e){return`We would appreciate if you could take the time to share some information with us. +Please help us by answering a few questions: https://pris.ly/${e}`}function Ha(e){let{errorStack:A}=e;return A?.match(/\/\.next|\/next@|\/next\//)?` + +We detected that you are using Next.js, learn how to fix this: https://pris.ly/d/engine-not-found-nextjs.`:""}function vI(e){let{queryEngineName:A}=e;return`${fr(e)}${Ha(e)} + +This is likely caused by a bundler that has not copied "${A}" next to the resulting bundle. +Ensure that "${A}" has been copied next to the bundle or in "${e.expectedLocation}". + +${Oa("engine-not-found-bundler-investigation")} + +${Ir(e)}`}function PI(e){let{runtimeBinaryTarget:A,generatorBinaryTargets:t}=e,r=t.find(n=>n.native);return`${fr(e)} + +This happened because Prisma Client was generated for "${r?.value??"unknown"}", but the actual deployment required "${A}". +${qa(e)} + +${Ir(e)}`}function GI(e){let{queryEngineName:A}=e;return`${fr(e)}${Ha(e)} + +This is likely caused by tooling that has not copied "${A}" to the deployment folder. +Ensure that you ran \`prisma generate\` and that "${A}" has been copied to "${e.expectedLocation}". + +${Oa("engine-not-found-tooling-investigation")} + +${Ir(e)}`}var Dx=ie("prisma:client:engines:resolveEnginePath"),bx=()=>new RegExp("runtime[\\\\/]binary\\.m?js$");async function lu(e,A){let t={binary:process.env.PRISMA_QUERY_ENGINE_BINARY,library:process.env.PRISMA_QUERY_ENGINE_LIBRARY}[e]??A.prismaPath;if(t!==void 0)return t;let{enginePath:r,searchedLocations:n}=await kx(e,A);if(Dx("enginePath",r),r!==void 0&&e==="binary"&&Rl(r),r!==void 0)return A.prismaPath=r;let i=await Tr(),s=A.generator?.binaryTargets??[],o=s.some(u=>u.native),a=!s.some(u=>u.value===i),c=__filename.match(bx())===null,g={searchedLocations:n,generatorBinaryTargets:s,generator:A.generator,runtimeBinaryTarget:i,queryEngineName:YI(e,i),expectedLocation:bs.default.relative(process.cwd(),A.dirname),errorStack:new Error().stack},l;throw o&&a?l=PI(g):a?l=MI(g):c?l=vI(g):l=GI(g),new z(l,A.clientVersion)}async function kx(engineType,config){let binaryTarget=await Tr(),searchedLocations=[],dirname=eval("__dirname"),searchLocations=[config.dirname,bs.default.resolve(dirname,".."),config.generator?.output?.value??dirname,bs.default.resolve(dirname,"../../../.prisma/client"),"/tmp/prisma-engines",config.cwd];__filename.includes("resolveEnginePath")&&searchLocations.push(MC());for(let e of searchLocations){let A=YI(engineType,binaryTarget),t=bs.default.join(e,A);if(searchedLocations.push(e),JI.default.existsSync(t))return{enginePath:t,searchedLocations}}return{enginePath:void 0,searchedLocations}}function YI(e,A){return e==="library"?Go(A,"fs"):`query-engine-${A}${A==="windows"?".exe":""}`}var uu=Z(Ul());function VI(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,A=>`${A[0]}5`):""}function qI(e){return e.split(` +`).map(A=>A.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` +`)}var OI=Z(tf());function HI({title:e,user:A="prisma",repo:t="prisma",template:r="bug_report.yml",body:n}){return(0,OI.default)({user:A,repo:t,template:r,title:e,body:n})}function WI({version:e,binaryTarget:A,title:t,description:r,engineVersion:n,database:i,query:s}){let o=vd(6e3-(s?.length??0)),a=qI((0,uu.default)(o)),c=r?`# Description +\`\`\` +${r} +\`\`\``:"",g=(0,uu.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: +## Versions + +| Name | Version | +|-----------------|--------------------| +| Node | ${process.version?.padEnd(19)}| +| OS | ${A?.padEnd(19)}| +| Prisma Client | ${e?.padEnd(19)}| +| Query Engine | ${n?.padEnd(19)}| +| Database | ${i?.padEnd(19)}| + +${c} + +## Logs +\`\`\` +${a} +\`\`\` + +## Client Snippet +\`\`\`ts +// PLEASE FILL YOUR CODE SNIPPET HERE +\`\`\` + +## Schema +\`\`\`prisma +// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE +\`\`\` + +## Prisma Engine Query +\`\`\` +${s?VI(s):""} +\`\`\` +`),l=HI({title:t,body:g});return`${t} + +This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. + +${EA(l)} + +If you want the Prisma team to look into it, please open the link above \u{1F64F} +To increase the chance of success, please post your schema and a snippet of +how you used Prisma Client in the issue. +`}var SR=Z(fl()),RY=()=>kR();function DY(e){if(e===void 0)throw new Error("Connection has not been opened")}var rr=class{constructor(){}static async onHttpError(A,t){let r=await A;return r.statusCode>=400?t(r):r}open(A,t){this._pool||(this._pool=new(RY()).Pool(A,{connections:1e3,keepAliveMaxTimeout:6e5,headersTimeout:0,bodyTimeout:0,...t}))}async raw(A,t,r,n,i=!0){DY(this._pool);let s=await this._pool.request({path:t,method:A,headers:{"Content-Type":"application/json",...r},body:n}),o=await(0,SR.default)(s.body);return{statusCode:s.statusCode,headers:s.headers,data:i?JSON.parse(o):o}}post(A,t,r,n){return this.raw("POST",A,r,t,n)}get(A,t){return this.raw("GET",A,t)}close(){this._pool&&this._pool.close(()=>{}),this._pool=void 0}};var tA=ie("prisma:engine"),fo=(...e)=>{},FR=[...Xg,"native"],Mg=[],NR=process.env.PRISMA_CLIENT_NO_RETRY?1:2,xR=process.env.PRISMA_CLIENT_NO_RETRY?1:2,Bo=class{constructor(A){this.name="BinaryEngine";this.startCount=0;this.previewFeatures=[];this.stderrLogs="";this.handleRequestError=async A=>{tA({error:A}),this.startPromise&&await this.startPromise;let t=["ECONNRESET","ECONNREFUSED","UND_ERR_CLOSED","UND_ERR_SOCKET","UND_ERR_DESTROYED","UND_ERR_ABORTED"].includes(A.code);if(A instanceof xe)return{error:A,shouldRetry:!1};try{if(this.throwAsyncErrorIfExists(),this.currentRequestPromise?.isCanceled)this.throwAsyncErrorIfExists();else if(t){if(this.globalKillSignalReceived&&!this.child?.connected)throw new ve(`The Node.js process already received a ${this.globalKillSignalReceived} signal, therefore the Prisma query engine exited + and your request can't be processed. + You probably have some open handle that prevents your process from exiting. + It could be an open http server or stream that didn't close yet. + We recommend using the \`wtfnode\` package to debug open handles.`,{clientVersion:this.clientVersion});if(this.throwAsyncErrorIfExists(),this.startCount>NR){for(let r=0;r<5;r++)await new Promise(n=>setTimeout(n,50)),this.throwAsyncErrorIfExists(!0);throw new Error(`Query engine is trying to restart, but can't. + Please look into the logs or turn on the env var DEBUG=* to debug the constantly restarting query engine.`)}}throw this.throwAsyncErrorIfExists(!0),A}catch(r){return{error:r,shouldRetry:t}}};this.config=A,this.env=A.env,this.cwd=this.resolveCwd(A.cwd),this.enableDebugLogs=A.enableDebugLogs??!1,this.allowTriggerPanic=A.allowTriggerPanic??!1,this.datamodelPath=A.datamodelPath,this.tracingHelper=A.tracingHelper,this.logEmitter=A.logEmitter,this.showColors=A.showColors??!1,this.logQueries=A.logQueries??!1,this.clientVersion=A.clientVersion,this.flags=A.flags??[],this.previewFeatures=A.previewFeatures??[],this.activeProvider=A.activeProvider,this.connection=new rr;let t=Object.keys(A.overrideDatasources)[0],r=A.overrideDatasources[t]?.url;t!==void 0&&r!==void 0&&(this.datasourceOverrides=[{name:t,url:r}]),bY();let n=["middlewares","aggregateApi","distinct","aggregations","insensitiveFilters","atomicNumberOperations","transactionApi","transaction","connectOrCreate","uncheckedScalarInputs","nativeTypes","createMany","groupBy","referentialActions","microsoftSqlServer"],i=this.previewFeatures.filter(s=>n.includes(s));if(i.length>0&&!process.env.PRISMA_HIDE_PREVIEW_FLAG_WARNINGS&&console.log(`${Ut(Ve("info"))} The preview flags \`${i.join("`, `")}\` were removed, you can now safely remove them from your schema.prisma.`),this.previewFeatures=this.previewFeatures.filter(s=>!n.includes(s)),this.engineEndpoint=A.engineEndpoint,this.binaryTarget){if(!FR.includes(this.binaryTarget)&&!Tg.default.existsSync(this.binaryTarget))throw new z(`Unknown ${vA("PRISMA_QUERY_ENGINE_BINARY")} ${vA(Ve(this.binaryTarget))}. Possible binaryTargets: ${ir(FR.join(", "))} or a path to the query engine binary. +You may have to run ${ir("prisma generate")} for your changes to take effect.`,this.clientVersion)}else this.getCurrentBinaryTarget();this.enableDebugLogs&&ie.enable("*"),Mg.push(this)}setError(A){gu(A)&&(this.lastError=new Ds({clientVersion:this.clientVersion,error:A}),this.lastError.isPanic()&&(this.child&&(this.stopPromise=kY(this.child)),this.currentRequestPromise?.cancel&&this.currentRequestPromise.cancel()))}resolveCwd(A){return Tg.default.existsSync(A)&&Tg.default.lstatSync(A).isDirectory()?A:process.cwd()}onBeforeExit(A){this.beforeExitListener=A}async emitExit(){if(this.beforeExitListener)try{await this.beforeExitListener()}catch(A){console.error(A)}}async getCurrentBinaryTarget(){return this.binaryTargetPromise?this.binaryTargetPromise:(this.binaryTargetPromise=Tr(),this.binaryTargetPromise)}printDatasources(){return this.datasourceOverrides?JSON.stringify(this.datasourceOverrides):"[]"}async start(){this.stopPromise&&await this.stopPromise;let A={times:10},t=async()=>{try{await this.internalStart()}catch(n){throw n.retryable===!0&&A.times>0&&(A.times--,await t()),n}},r=async()=>{if(this.startPromise||(this.startCount++,this.startPromise=t()),await this.startPromise,!this.child&&!this.engineEndpoint)throw new ve("Can't perform request, as the Engine has already been stopped",{clientVersion:this.clientVersion})};return this.startPromise?r():this.tracingHelper.runInChildSpan("connect",r)}getEngineEnvVars(){let A={PRISMA_DML_PATH:this.datamodelPath};this.logQueries&&(A.LOG_QUERIES="true"),this.datasourceOverrides&&(A.OVERWRITE_DATASOURCES=this.printDatasources()),!process.env.NO_COLOR&&this.showColors&&(A.CLICOLOR_FORCE="1");let t=this.tracingHelper.getTraceParent();return t&&(A.TRACE_CONTEXT=JSON.stringify({traceparent:t})),{...this.env,...process.env,...A,RUST_BACKTRACE:process.env.RUST_BACKTRACE??"1",RUST_LOG:process.env.RUST_LOG??"info"}}internalStart(){return new Promise(async(A,t)=>{if(await new Promise(r=>process.nextTick(r)),this.stopPromise&&await this.stopPromise,this.engineEndpoint){try{this.connection.open(this.engineEndpoint),await(0,MR.default)(()=>this.connection.get("/status"),{retries:10})}catch(r){return t(r)}return A()}try{(this.child?.connected||this.child&&!this.child?.killed)&&tA("There is a child that still runs and we want to start again"),this.lastError=void 0,fo("startin & resettin"),this.globalKillSignalReceived=void 0,tA({cwd:this.cwd});let r=await lu("binary",this.config),n=this.allowTriggerPanic?["--debug"]:[],i=["--enable-raw-queries","--enable-metrics","--enable-open-telemetry",...this.flags,...n];i.push("--port","0"),i.push("--engine-protocol","json"),tA({flags:i});let s=this.getEngineEnvVars();if(this.child=(0,UR.spawn)(r,i,{env:s,cwd:this.cwd,windowsHide:!0,stdio:["ignore","pipe","pipe"]}),os(this.child.stderr).on("data",o=>{let a=String(o);tA("stderr",a);try{let c=JSON.parse(a);if(typeof c.is_panic<"u"&&(tA(c),this.setError(c),this.engineStartDeferred)){let g=new z(c.message,this.clientVersion,c.error_code);this.engineStartDeferred.reject(g)}}catch{!a.includes("Printing to stderr")&&!a.includes("Listening on ")&&(this.stderrLogs+=` +`+a)}}),os(this.child.stdout).on("data",o=>{let a=String(o);try{let c=JSON.parse(a);if(tA("stdout",Hn(c)),this.engineStartDeferred&&c.level==="INFO"&&c.target==="query_engine::server"&&c.fields?.message?.startsWith("Started query engine http server")){let g=c.fields.ip,l=c.fields.port;if(g===void 0||l===void 0){this.engineStartDeferred.reject(new z('This version of Query Engine is not compatible with Prisma Client: "ip" and "port" fields are missing in the startup log entry',this.clientVersion));return}this.connection.open(`http://${g}:${l}`),this.engineStartDeferred.resolve(),this.engineStartDeferred=void 0}if(typeof c.is_panic>"u"){if(c.span===!0){this.tracingHelper.createEngineSpan(c);return}let g=TI(c);gu(g)?this.setError(g):g.level==="query"?this.logEmitter.emit(g.level,{timestamp:g.timestamp,query:g.fields.query,params:g.fields.params,duration:g.fields.duration_ms,target:g.target}):this.logEmitter.emit(g.level,{timestamp:g.timestamp,message:g.fields.message,target:g.target})}else this.setError(c)}catch(c){tA(c,a)}}),this.child.on("exit",o=>{if(fo("removing startPromise"),this.startPromise=void 0,this.engineStopDeferred){this.engineStopDeferred.resolve(o);return}if(this.connection.close(),o!==0&&this.engineStartDeferred&&this.startCount===1){let a,c=this.stderrLogs;this.lastError&&(c=Hn(this.lastError)),o!==null?(a=new z(`Query engine exited with code ${o} +`+c,this.clientVersion),a.retryable=!0):this.child?.signalCode?(a=new z(`Query engine process killed with signal ${this.child.signalCode} for unknown reason. +Make sure that the engine binary at ${r} is not corrupt. +`+c,this.clientVersion),a.retryable=!0):a=new z(c,this.clientVersion),this.engineStartDeferred.reject(a)}this.child&&(this.lastError||o===126&&this.setError({timestamp:new Date,target:"binary engine process exit",level:"error",fields:{message:`Couldn't start query engine as it's not executable on this operating system. +You very likely have the wrong "binaryTarget" defined in the schema.prisma file.`}}))}),this.child.on("error",o=>{this.setError({timestamp:new Date,target:"binary engine process error",level:"error",fields:{message:`Couldn't start query engine: ${o}`}}),t(o)}),this.child.on("close",(o,a)=>{this.connection.close();let c;o===null&&a==="SIGABRT"&&this.child?c=new JA(this.getErrorMessageWithLink("Panic in Query Engine with SIGABRT signal"),this.clientVersion):o===255&&a===null&&this.lastError&&(c=this.lastError),c&&this.logEmitter.emit("error",{message:c.message,timestamp:new Date,target:"binary engine process close"})}),this.lastError)return t(new z(Hn(this.lastError),this.clientVersion));try{await new Promise((o,a)=>{this.engineStartDeferred={resolve:o,reject:a}})}catch(o){throw this.child?.kill(),o}(async()=>{try{let o=await this.version(!0);tA(`Client Version: ${this.clientVersion}`),tA(`Engine Version: ${o}`),tA(`Active provider: ${this.activeProvider}`)}catch(o){tA(o)}})(),this.stopPromise=void 0,A()}catch(r){t(r)}})}async stop(){let A=async()=>(this.stopPromise||(this.stopPromise=this._stop()),this.stopPromise);return this.tracingHelper.runInChildSpan("disconnect",A)}async _stop(){if(this.startPromise&&await this.startPromise,await new Promise(t=>process.nextTick(t)),this.currentRequestPromise)try{await this.currentRequestPromise}catch{}let A;this.child&&(tA("Stopping Prisma engine"),this.startPromise&&(tA("Waiting for start promise"),await this.startPromise),tA("Done waiting for start promise"),this.child.exitCode===null?A=new Promise((t,r)=>{this.engineStopDeferred={resolve:t,reject:r}}):tA("Child already exited with code",this.child.exitCode),this.connection.close(),this.child.kill(),this.child=void 0),A&&await A,await new Promise(t=>process.nextTick(t)),this.startPromise=void 0,this.engineStopDeferred=void 0}kill(A){this.globalKillSignalReceived=A,this.child?.kill(),this.connection.close()}async version(A=!1){return this.versionPromise&&!A?this.versionPromise:(this.versionPromise=this.internalVersion(),this.versionPromise)}async internalVersion(){let A=await lu("binary",this.config),t=await(0,TR.default)(A,["--version"]);return this.lastVersion=t.stdout,this.lastVersion}async request(A,{traceparent:t,numTry:r=1,isWrite:n,interactiveTransaction:i}){await this.start();let s={};t&&(s.traceparent=t),i&&(s["X-transaction-id"]=i.id);let o=JSON.stringify(A);this.currentRequestPromise=rr.onHttpError(this.connection.post("/",o,s),a=>this.httpErrorHandler(a)),this.lastQuery=o;try{let{data:a,headers:c}=await this.currentRequestPromise;if(a.errors)throw a.errors.length===1?Yt(a.errors[0],this.clientVersion,this.config.activeProvider):new ve(JSON.stringify(a.errors),{clientVersion:this.clientVersion});let g=parseInt(c["x-elapsed"])/1e3;return this.startCount>0&&(this.startCount=0),this.currentRequestPromise=void 0,{data:a,elapsed:g}}catch(a){fo("req - e",a);let{error:c,shouldRetry:g}=await this.handleRequestError(a);if(r<=xR&&g&&!n)return fo("trying a retry now"),this.request(A,{traceparent:t,numTry:r+1,isWrite:n,interactiveTransaction:i});throw c}}async requestBatch(A,{traceparent:t,transaction:r,numTry:n=1,containsWrite:i}){await this.start();let s={};t&&(s.traceparent=t);let o=r?.kind==="itx"?r.options:void 0;o&&(s["X-transaction-id"]=o.id);let a=qn(A,r);return this.lastQuery=JSON.stringify(a),this.currentRequestPromise=rr.onHttpError(this.connection.post("/",this.lastQuery,s),c=>this.httpErrorHandler(c)),this.currentRequestPromise.then(({data:c,headers:g})=>{let l=parseInt(g["x-elapsed"])/1e3,{batchResult:u}=c;if(Array.isArray(u))return u.map(E=>E.errors&&E.errors.length>0?Yt(E.errors[0],this.clientVersion,this.config.activeProvider):{data:E,elapsed:l});throw Yt(c.errors[0],this.clientVersion,this.config.activeProvider)}).catch(async c=>{let{error:g,shouldRetry:l}=await this.handleRequestError(c);if(l&&!i&&n<=xR)return this.requestBatch(A,{traceparent:t,transaction:r,numTry:n+1,containsWrite:i});throw g})}async transaction(A,t,r){if(await this.start(),A==="start"){let n=JSON.stringify({max_wait:r.maxWait,timeout:r.timeout,isolation_level:r.isolationLevel});return(await rr.onHttpError(this.connection.post("/transaction/start",n,t),s=>this.httpErrorHandler(s))).data}else A==="commit"?await rr.onHttpError(this.connection.post(`/transaction/${r.id}/commit`,void 0,t),n=>this.httpErrorHandler(n)):A==="rollback"&&await rr.onHttpError(this.connection.post(`/transaction/${r.id}/rollback`,void 0,t),n=>this.httpErrorHandler(n))}get hasMaxRestarts(){return this.startCount>=NR}throwAsyncErrorIfExists(A=!1){if(fo("throwAsyncErrorIfExists",this.startCount,this.hasMaxRestarts),this.lastError&&(this.hasMaxRestarts||A)){let t=this.lastError;throw this.lastError=void 0,t.isPanic()?new JA(this.getErrorMessageWithLink(Hn(t)),this.clientVersion):new ve(this.getErrorMessageWithLink(Hn(t)),{clientVersion:this.clientVersion})}}getErrorMessageWithLink(A){return WI({binaryTarget:this.binaryTarget,title:A,version:this.clientVersion,engineVersion:this.lastVersion,database:this.lastActiveProvider,query:this.lastQuery})}async metrics({format:A,globalLabels:t}){await this.start();let r=A==="json";return(await this.connection.post(`/metrics?format=${encodeURIComponent(A)}`,JSON.stringify(t),null,r)).data}httpErrorHandler(A){let t=A.data;throw new xe(t.message,{code:t.error_code,clientVersion:this.clientVersion,meta:t.meta})}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Io(e,A=!1){process.once(e,async()=>{for(let t of Mg)await t.emitExit(),t.kill(e);Mg.splice(0,Mg.length),A&&process.listenerCount(e)===0&&process.exit()})}var LR=!1;function bY(){LR||(Io("beforeExit"),Io("exit"),Io("SIGINT",!0),Io("SIGUSR2",!0),Io("SIGTERM",!0),LR=!0)}function kY(e){return new Promise(A=>{e.once("exit",A),e.kill()})}function vi({inlineDatasources:e,overrideDatasources:A,env:t,clientVersion:r}){let n,i=Object.keys(e)[0],s=e[i]?.url,o=A[i]?.url;if(i===void 0?n=void 0:o?n=o:s?.value?n=s.value:s?.fromEnvVar&&(n=t[s.fromEnvVar]),s?.fromEnvVar!==void 0&&n===void 0)throw new z(`error: Environment variable not found: ${s.fromEnvVar}.`,r);if(n===void 0)throw new z("error: Missing URL environment variable, value, or override.",r);return n}var vg=class extends Error{constructor(A,t){super(A),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var wA=class extends vg{constructor(A,t){super(A,t),this.isRetryable=t.isRetryable??!0}};function j(e,A){return{...e,isRetryable:A}}var Pi=class extends wA{constructor(t){super("This request must be retried",j(t,!0));this.name="ForcedRetryError";this.code="P5001"}};L(Pi,"ForcedRetryError");var un=class extends wA{constructor(t,r){super(t,j(r,!1));this.name="InvalidDatasourceError";this.code="P6001"}};L(un,"InvalidDatasourceError");var En=class extends wA{constructor(t,r){super(t,j(r,!1));this.name="NotImplementedYetError";this.code="P5004"}};L(En,"NotImplementedYetError");var Ce=class extends wA{constructor(A,t){super(A,t),this.response=t.response;let r=this.response.headers.get("prisma-request-id");if(r){let n=`(The request id was: ${r})`;this.message=this.message+" "+n}}};var hn=class extends Ce{constructor(t){super("Schema needs to be uploaded",j(t,!0));this.name="SchemaMissingError";this.code="P5005"}};L(hn,"SchemaMissingError");var ad="This request could not be understood by the server",po=class extends Ce{constructor(t,r,n){super(r||ad,j(t,!1));this.name="BadRequestError";this.code="P5000";n&&(this.code=n)}};L(po,"BadRequestError");var mo=class extends Ce{constructor(t,r){super("Engine not started: healthcheck timeout",j(t,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=r}};L(mo,"HealthcheckTimeoutError");var yo=class extends Ce{constructor(t,r,n){super(r,j(t,!0));this.name="EngineStartupError";this.code="P5014";this.logs=n}};L(yo,"EngineStartupError");var wo=class extends Ce{constructor(t){super("Engine version is not supported",j(t,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};L(wo,"EngineVersionNotSupportedError");var cd="Request timed out",Ro=class extends Ce{constructor(t,r=cd){super(r,j(t,!1));this.name="GatewayTimeoutError";this.code="P5009"}};L(Ro,"GatewayTimeoutError");var SY="Interactive transaction error",Do=class extends Ce{constructor(t,r=SY){super(r,j(t,!1));this.name="InteractiveTransactionError";this.code="P5015"}};L(Do,"InteractiveTransactionError");var FY="Request parameters are invalid",bo=class extends Ce{constructor(t,r=FY){super(r,j(t,!1));this.name="InvalidRequestError";this.code="P5011"}};L(bo,"InvalidRequestError");var gd="Requested resource does not exist",ko=class extends Ce{constructor(t,r=gd){super(r,j(t,!1));this.name="NotFoundError";this.code="P5003"}};L(ko,"NotFoundError");var ld="Unknown server error",Gi=class extends Ce{constructor(t,r,n){super(r||ld,j(t,!0));this.name="ServerError";this.code="P5006";this.logs=n}};L(Gi,"ServerError");var ud="Unauthorized, check your connection string",So=class extends Ce{constructor(t,r=ud){super(r,j(t,!1));this.name="UnauthorizedError";this.code="P5007"}};L(So,"UnauthorizedError");var Ed="Usage exceeded, retry again later",Fo=class extends Ce{constructor(t,r=Ed){super(r,j(t,!0));this.name="UsageExceededError";this.code="P5008"}};L(Fo,"UsageExceededError");async function NY(e){let A;try{A=await e.text()}catch{return{type:"EmptyError"}}try{let t=JSON.parse(A);if(typeof t=="string")switch(t){case"InternalDataProxyError":return{type:"DataProxyError",body:t};default:return{type:"UnknownTextError",body:t}}if(typeof t=="object"&&t!==null){if("is_panic"in t&&"message"in t&&"error_code"in t)return{type:"QueryEngineError",body:t};if("EngineNotStarted"in t||"InteractiveTransactionMisrouted"in t||"InvalidRequestError"in t){let r=Object.values(t)[0].reason;return typeof r=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(r)?{type:"UnknownJsonError",body:t}:{type:"DataProxyError",body:t}}}return{type:"UnknownJsonError",body:t}}catch{return A===""?{type:"EmptyError"}:{type:"UnknownTextError",body:A}}}async function No(e,A){if(e.ok)return;let t={clientVersion:A,response:e},r=await NY(e);if(r.type==="QueryEngineError")throw new xe(r.body.message,{code:r.body.error_code,clientVersion:A});if(r.type==="DataProxyError"){if(r.body==="InternalDataProxyError")throw new Gi(t,"Internal Data Proxy error");if("EngineNotStarted"in r.body){if(r.body.EngineNotStarted.reason==="SchemaMissing")return new hn(t);if(r.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new wo(t);if("EngineStartupError"in r.body.EngineNotStarted.reason){let{msg:n,logs:i}=r.body.EngineNotStarted.reason.EngineStartupError;throw new yo(t,n,i)}if("KnownEngineStartupError"in r.body.EngineNotStarted.reason){let{msg:n,error_code:i}=r.body.EngineNotStarted.reason.KnownEngineStartupError;throw new z(n,A,i)}if("HealthcheckTimeout"in r.body.EngineNotStarted.reason){let{logs:n}=r.body.EngineNotStarted.reason.HealthcheckTimeout;throw new mo(t,n)}}if("InteractiveTransactionMisrouted"in r.body){let n={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Do(t,n[r.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in r.body)throw new bo(t,r.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new So(t,Ji(ud,r));if(e.status===404)return new ko(t,Ji(gd,r));if(e.status===429)throw new Fo(t,Ji(Ed,r));if(e.status===504)throw new Ro(t,Ji(cd,r));if(e.status>=500)throw new Gi(t,Ji(ld,r));if(e.status>=400)throw new po(t,Ji(ad,r))}function Ji(e,A){return A.type==="EmptyError"?e:`${e}: ${JSON.stringify(A)}`}function vR(e){let A=Math.pow(2,e)*50,t=Math.ceil(Math.random()*A)-Math.ceil(A/2),r=A+t;return new Promise(n=>setTimeout(()=>n(r),r))}var nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function PR(e){let A=new TextEncoder().encode(e),t="",r=A.byteLength,n=r%3,i=r-n,s,o,a,c,g;for(let l=0;l>18,o=(g&258048)>>12,a=(g&4032)>>6,c=g&63,t+=nr[s]+nr[o]+nr[a]+nr[c];return n==1?(g=A[i],s=(g&252)>>2,o=(g&3)<<4,t+=nr[s]+nr[o]+"=="):n==2&&(g=A[i]<<8|A[i+1],s=(g&64512)>>10,o=(g&1008)>>4,a=(g&15)<<2,t+=nr[s]+nr[o]+nr[a]+"="),t}function GR(e){if(!!e.generator?.previewFeatures.some(t=>t.toLowerCase().includes("metrics")))throw new z("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}function xY(e){return e[0]*1e3+e[1]/1e6}function JR(e){return new Date(xY(e))}var YR={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var xo=class extends wA{constructor(t,r){super(`Cannot fetch data from service: +${t}`,j(r,!0));this.name="RequestError";this.code="P5010"}};L(xo,"RequestError");async function dn(e,A,t=r=>r){let r=A.clientVersion;try{return typeof fetch=="function"?await t(fetch)(e,A):await t(hd)(e,A)}catch(n){let i=n.message??"Unknown error";throw new xo(i,{clientVersion:r})}}function UY(e){return{...e.headers,"Content-Type":"application/json"}}function TY(e){return{method:e.method,headers:UY(e)}}function MY(e,A){return{text:()=>Promise.resolve(Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(Buffer.concat(e).toString())),ok:A.statusCode>=200&&A.statusCode<=299,status:A.statusCode,url:A.url,headers:new dd(A.headers)}}async function hd(e,A={}){let t=vY("https"),r=TY(A),n=[],{origin:i}=new URL(e);return new Promise((s,o)=>{let a=t.request(e,r,c=>{let{statusCode:g,headers:{location:l}}=c;g>=301&&g<=399&&l&&(l.startsWith("http")===!1?s(hd(`${i}${l}`,A)):s(hd(l,A))),c.on("data",u=>n.push(u)),c.on("end",()=>s(MY(n,c))),c.on("error",o)});a.on("error",o),a.end(A.body??"")})}var vY=typeof require<"u"?require:()=>{},dd=class{constructor(A={}){this.headers=new Map;for(let[t,r]of Object.entries(A))if(typeof r=="string")this.headers.set(t,r);else if(Array.isArray(r))for(let n of r)this.headers.set(t,n)}append(A,t){this.headers.set(A,t)}delete(A){this.headers.delete(A)}get(A){return this.headers.get(A)??null}has(A){return this.headers.has(A)}set(A,t){this.headers.set(A,t)}forEach(A,t){for(let[r,n]of this.headers)A.call(t,n,r,this)}};var PY=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,VR=ie("prisma:client:dataproxyEngine");async function GY(e,A){let t=YR["@prisma/engines-version"],r=A.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&r!=="0.0.0"&&r!=="in-memory")return r;let[n,i]=r?.split("-")??[];if(i===void 0&&PY.test(n))return n;if(i!==void 0||r==="0.0.0"||r==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=t.split("-")??[],[o,a,c]=s.split("."),g=JY(`<=${o}.${a}.${c}`),l=await dn(g,{clientVersion:r});if(!l.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${l.status} ${l.statusText}, response body: ${await l.text()||""}`);let u=await l.text();VR("length of body fetched from unpkg.com",u.length);let E;try{E=JSON.parse(u)}catch(h){throw console.error("JSON.parse error: body fetched from unpkg.com: ",u),h}return E.version}throw new En("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:r})}async function qR(e,A){let t=await GY(e,A);return VR("version",t),t}function JY(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var OR=3,Qd=ie("prisma:client:dataproxyEngine"),Cd=class{constructor({apiKey:A,tracingHelper:t,logLevel:r,logQueries:n,engineHash:i}){this.apiKey=A,this.tracingHelper=t,this.logLevel=r,this.logQueries=n,this.engineHash=i}build({traceparent:A,interactiveTransaction:t}={}){let r={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(r.traceparent=A??this.tracingHelper.getTraceParent()),t&&(r["X-transaction-id"]=t.id);let n=this.buildCaptureSettings();return n.length>0&&(r["X-capture-telemetry"]=n.join(", ")),r}buildCaptureSettings(){let A=[];return this.tracingHelper.isEnabled()&&A.push("tracing"),this.logLevel&&A.push(this.logLevel),this.logQueries&&A.push("query"),A}},Lo=class{constructor(A){this.name="DataProxyEngine";GR(A),this.config=A,this.env={...A.env,...typeof process<"u"?process.env:{}},this.inlineSchema=PR(A.inlineSchema),this.inlineDatasources=A.inlineDatasources,this.inlineSchemaHash=A.inlineSchemaHash,this.clientVersion=A.clientVersion,this.engineHash=A.engineVersion,this.logEmitter=A.logEmitter,this.tracingHelper=A.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[A,t]=this.extractHostAndApiKey();this.host=A,this.headerBuilder=new Cd({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await qR(A,this.config),Qd("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(A){A?.logs?.length&&A.logs.forEach(t=>{switch(t.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let r=typeof t.attributes.query=="string"?t.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[n]=r.split("/* traceparent");r=n}this.logEmitter.emit("query",{query:r,timestamp:JR(t.timestamp),duration:Number(t.attributes.duration_ms),params:t.attributes.params,target:t.attributes.target})}}}),A?.traces?.length&&this.tracingHelper.createEngineSpan({span:!0,spans:A.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(A){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${A}`}async uploadSchema(){let A={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(A,async()=>{let t=await dn(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});t.ok||Qd("schema response status",t.status);let r=await No(t,this.clientVersion);if(r)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${r.message}`,timestamp:new Date,target:""}),r;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(A,{traceparent:t,interactiveTransaction:r,customDataProxyFetch:n}){return this.requestInternal({body:A,traceparent:t,interactiveTransaction:r,customDataProxyFetch:n})}async requestBatch(A,{traceparent:t,transaction:r,customDataProxyFetch:n}){let i=r?.kind==="itx"?r.options:void 0,s=qn(A,r),{batchResult:o,elapsed:a}=await this.requestInternal({body:s,customDataProxyFetch:n,interactiveTransaction:i,traceparent:t});return o.map(c=>"errors"in c&&c.errors.length>0?Yt(c.errors[0],this.clientVersion,this.config.activeProvider):{data:c,elapsed:a})}requestInternal({body:A,traceparent:t,customDataProxyFetch:r,interactiveTransaction:n}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:i})=>{let s=n?`${n.payload.endpoint}/graphql`:await this.url("graphql");i(s);let o=await dn(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t,interactiveTransaction:n}),body:JSON.stringify(A),clientVersion:this.clientVersion},r);o.ok||Qd("graphql response status",o.status),await this.handleError(await No(o,this.clientVersion));let a=await o.json(),c=a.extensions;if(c&&this.propagateResponseExtensions(c),a.errors)throw a.errors.length===1?Yt(a.errors[0],this.config.clientVersion,this.config.activeProvider):new ve(a.errors,{clientVersion:this.config.clientVersion});return a}})}async transaction(A,t,r){let n={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${n[A]} transaction`,callback:async({logHttpCall:i})=>{if(A==="start"){let s=JSON.stringify({max_wait:r.maxWait,timeout:r.timeout,isolation_level:r.isolationLevel}),o=await this.url("transaction/start");i(o);let a=await dn(o,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await No(a,this.clientVersion));let c=await a.json(),g=c.extensions;g&&this.propagateResponseExtensions(g);let l=c.id,u=c["data-proxy"].endpoint;return{id:l,payload:{endpoint:u}}}else{let s=`${r.payload.endpoint}/${A}`;i(s);let o=await dn(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),clientVersion:this.clientVersion});await this.handleError(await No(o,this.clientVersion));let c=(await o.json()).extensions;c&&this.propagateResponseExtensions(c);return}}})}extractHostAndApiKey(){let A={clientVersion:this.clientVersion},t=Object.keys(this.inlineDatasources)[0],r=vi({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),n;try{n=new URL(r)}catch{throw new un(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,A)}let{protocol:i,host:s,searchParams:o}=n;if(i!=="prisma:"&&i!=="prisma+postgres:")throw new un(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,A);let a=o.get("api_key");if(a===null||a.length<1)throw new un(`Error validating datasource \`${t}\`: the URL must contain a valid API key`,A);return[s,a]}metrics(){throw new En("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(A){for(let t=0;;t++){let r=n=>{this.logEmitter.emit("info",{message:`Calling ${n} (n=${t})`,timestamp:new Date,target:""})};try{return await A.callback({logHttpCall:r})}catch(n){if(!(n instanceof wA)||!n.isRetryable)throw n;if(t>=OR)throw n instanceof Pi?n.cause:n;this.logEmitter.emit("warn",{message:`Attempt ${t+1}/${OR} failed for ${A.actionGerund}: ${n.message??"(unknown)"}`,timestamp:new Date,target:""});let i=await vR(t);this.logEmitter.emit("warn",{message:`Retrying after ${i}ms`,timestamp:new Date,target:""})}}}async handleError(A){if(A instanceof hn)throw await this.uploadSchema(),new Pi({clientVersion:this.clientVersion,cause:A});if(A)throw A}applyPendingMigrations(){throw new Error("Method not implemented.")}};function HR({copyEngine:e=!0},A){let t;try{t=vi({inlineDatasources:A.inlineDatasources,overrideDatasources:A.overrideDatasources,env:{...A.env,...process.env},clientVersion:A.clientVersion})}catch{}let r=!!(t?.startsWith("prisma://")||t?.startsWith("prisma+postgres://"));e&&r&&as("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=rs(A.generator),i=r||!e,s=!!A.adapter,o=n==="library",a=n==="binary";if(i&&s||s&&!1){let c;throw e?t?.startsWith("prisma://")?c=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:c=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:c=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new Oe(c.join(` +`),{clientVersion:A.clientVersion})}if(i)return new Lo(A);if(a)return new Bo(A);throw new Oe("Invalid client engine type, please use `library` or `binary`",{clientVersion:A.clientVersion})}function Pg({generator:e}){return e?.previewFeatures??[]}var WR=e=>({command:e});var _R=e=>e.strings.reduce((A,t,r)=>`${A}@P${r}${t}`);function Yi(e){try{return jR(e,"fast")}catch{return jR(e,"slow")}}function jR(e,A){return JSON.stringify(e.map(t=>ZR(t,A)))}function ZR(e,A){return Array.isArray(e)?e.map(t=>ZR(t,A)):typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:Nn(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ut.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:YY(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")}:typeof e=="object"&&A==="slow"?XR(e):e}function YY(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function XR(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(KR);let A={};for(let t of Object.keys(e))A[t]=KR(e[t]);return A}function KR(e){return typeof e=="bigint"?e.toString():XR(e)}var VY=["$connect","$disconnect","$on","$transaction","$use","$extends"],zR=VY;var qY=/^(\s*alter\s)/i,$R=ie("prisma:client");function fd(e,A,t,r){if(!(e!=="postgresql"&&e!=="cockroachdb")&&t.length>0&&qY.exec(A))throw new Error(`Running ALTER using ${r} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var Id=({clientMethod:e,activeProvider:A})=>t=>{let r="",n;if(zf(t))r=t.sql,n={values:Yi(t.values),__prismaRawParameters__:!0};else if(Array.isArray(t)){let[i,...s]=t;r=i,n={values:Yi(s||[]),__prismaRawParameters__:!0}}else switch(A){case"sqlite":case"mysql":{r=t.sql,n={values:Yi(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{r=t.text,n={values:Yi(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{r=_R(t),n={values:Yi(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${A} provider does not support ${e}`)}return n?.values?$R(`prisma.${e}(${r}, ${n.values})`):$R(`prisma.${e}(${r})`),{query:r,parameters:n}},eD={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[A,...t]=e;return new dA(A,t)}},AD={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function Bd(e){return function(t){let r,n=(i=e)=>{try{return i===void 0||i?.kind==="itx"?r??=tD(t(i)):tD(t(i))}catch(s){return Promise.reject(s)}};return{then(i,s){return n().then(i,s)},catch(i){return n().catch(i)},finally(i){return n().finally(i)},requestTransaction(i){let s=n(i);return s.requestTransaction?s.requestTransaction(i):s},[Symbol.toStringTag]:"PrismaPromise"}}}function tD(e){return typeof e.then=="function"?e:Promise.resolve(e)}var rD={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,A){return A()}},pd=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(A){return this.getGlobalTracingHelper().getTraceParent(A)}createEngineSpan(A){return this.getGlobalTracingHelper().createEngineSpan(A)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(A,t){return this.getGlobalTracingHelper().runInChildSpan(A,t)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??rD}};function nD(e){return e.includes("tracing")?new pd:rD}function iD(e,A=()=>{}){let t,r=new Promise(n=>t=n);return{then(n){return--e===0&&t(A()),n?.(r)}}}function sD(e){return typeof e=="string"?e:e.reduce((A,t)=>{let r=typeof t=="string"?t:t.level;return r==="query"?A:A&&(t==="info"||A==="info")?"info":r},void 0)}var Gg=class{constructor(){this._middlewares=[]}use(A){this._middlewares.push(A)}get(A){return this._middlewares[A]}has(A){return!!this._middlewares[A]}length(){return this._middlewares.length}};var cD=Z(Ul());function Jg(e){return typeof e.batchRequestIdx=="number"}function oD(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let A=[];return e.modelName&&A.push(e.modelName),e.query.arguments&&A.push(md(e.query.arguments)),A.push(md(e.query.selection)),A.join("")}function md(e){return`(${Object.keys(e).sort().map(t=>{let r=e[t];return typeof r=="object"&&r!==null?`(${t} ${md(r)})`:t}).join(" ")})`}var OY={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function yd(e){return OY[e]}var Yg=class{constructor(A){this.options=A;this.tickActive=!1;this.batches={}}request(A){let t=this.options.batchBy(A);return t?(this.batches[t]||(this.batches[t]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((r,n)=>{this.batches[t].push({request:A,resolve:r,reject:n})})):this.options.singleLoader(A)}dispatchBatches(){for(let A in this.batches){let t=this.batches[A];delete this.batches[A],t.length===1?this.options.singleLoader(t[0].request).then(r=>{r instanceof Error?t[0].reject(r):t[0].resolve(r)}).catch(r=>{t[0].reject(r)}):(t.sort((r,n)=>this.options.batchOrder(r.request,n.request)),this.options.batchLoader(t.map(r=>r.request)).then(r=>{if(r instanceof Error)for(let n=0;n{for(let n=0;nQn("bigint",t));case"bytes-array":return A.map(t=>Qn("bytes",t));case"decimal-array":return A.map(t=>Qn("decimal",t));case"datetime-array":return A.map(t=>Qn("datetime",t));case"date-array":return A.map(t=>Qn("date",t));case"time-array":return A.map(t=>Qn("time",t));default:return A}}function aD(e){let A=[],t=HY(e);for(let r=0;r{let{transaction:i,otelParentCtx:s}=r[0],o=r.map(l=>l.protocolQuery),a=this.client._tracingHelper.getTraceParent(s),c=r.some(l=>yd(l.protocolQuery.action));return(await this.client._engine.requestBatch(o,{traceparent:a,transaction:_Y(i),containsWrite:c,customDataProxyFetch:n})).map((l,u)=>{if(l instanceof Error)return l;try{return this.mapQueryEngineResult(r[u],l)}catch(E){return E}})}),singleLoader:async r=>{let n=r.transaction?.kind==="itx"?gD(r.transaction):void 0,i=await this.client._engine.request(r.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:n,isWrite:yd(r.protocolQuery.action),customDataProxyFetch:r.customDataProxyFetch});return this.mapQueryEngineResult(r,i)},batchBy:r=>r.transaction?.id?`transaction-${r.transaction.id}`:oD(r.protocolQuery),batchOrder(r,n){return r.transaction?.kind==="batch"&&n.transaction?.kind==="batch"?r.transaction.index-n.transaction.index:0}})}async request(A){try{return await this.dataloader.request(A)}catch(t){let{clientMethod:r,callsite:n,transaction:i,args:s,modelName:o}=A;this.handleAndLogRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:s,modelName:o,globalOmit:A.globalOmit})}}mapQueryEngineResult({dataPath:A,unpacker:t},r){let n=r?.data,i=r?.elapsed,s=this.unpack(n,A,t);return process.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:i}:s}handleAndLogRequestError(A){try{this.handleRequestError(A)}catch(t){throw this.logEmitter&&this.logEmitter.emit("error",{message:t.message,target:A.clientMethod,timestamp:new Date}),t}}handleRequestError({error:A,clientMethod:t,callsite:r,transaction:n,args:i,modelName:s,globalOmit:o}){if(WY(A),jY(A,n)||A instanceof Pt)throw A;if(A instanceof xe&&KY(A)){let c=lD(A.meta);Ua({args:i,errors:[c],callsite:r,errorFormat:this.client._errorFormat,originalMethod:t,clientVersion:this.client._clientVersion,globalOmit:o})}let a=A.message;if(r&&(a=Ln({callsite:r,originalMethod:t,isPanic:A.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),A.code){let c=s?{modelName:s,...A.meta}:A.meta;throw new xe(a,{code:A.code,clientVersion:this.client._clientVersion,meta:c,batchRequestIdx:A.batchRequestIdx})}else{if(A.isPanic)throw new JA(a,this.client._clientVersion);if(A instanceof ve)throw new ve(a,{clientVersion:this.client._clientVersion,batchRequestIdx:A.batchRequestIdx});if(A instanceof z)throw new z(a,this.client._clientVersion);if(A instanceof JA)throw new JA(a,this.client._clientVersion)}throw A.clientVersion=this.client._clientVersion,A}sanitizeMessage(A){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,cD.default)(A):A}unpack(A,t,r){if(!A||(A.data&&(A=A.data),!A))return A;let n=Object.keys(A)[0],i=Object.values(A)[0],s=t.filter(c=>c!=="select"&&c!=="include"),o=su(i,s),a=n==="queryRaw"?aD(o):Sn(o);return r?r(a):a}get[Symbol.toStringTag](){return"RequestHandler"}};function _Y(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:gD(e)};vt(e,"Unknown transaction kind")}}function gD(e){return{id:e.id,payload:e.payload}}function jY(e,A){return Jg(e)&&A?.kind==="batch"&&e.batchRequestIdx!==A.index}function KY(e){return e.code==="P2009"||e.code==="P2012"}function lD(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(lD)};if(Array.isArray(e.selectionPath)){let[,...A]=e.selectionPath;return{...e,selectionPath:A}}return e}var uD="5.22.0";var ED=uD;var fD=Z(Ol());var oe=class extends Error{constructor(A){super(A+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};L(oe,"PrismaClientConstructorValidationError");var hD=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],dD=["pretty","colorless","minimal"],QD=["info","query","warn","error"],XY={datasources:(e,{datasourceNames:A})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new oe(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[t,r]of Object.entries(e)){if(!A.includes(t)){let n=Vi(t,A)||` Available datasources: ${A.join(", ")}`;throw new oe(`Unknown datasource ${t} provided to PrismaClient constructor.${n}`)}if(typeof r!="object"||Array.isArray(r))throw new oe(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(r&&typeof r=="object")for(let[n,i]of Object.entries(r)){if(n!=="url")throw new oe(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof i!="string")throw new oe(`Invalid value ${JSON.stringify(i)} for datasource "${t}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,A)=>{if(e===null)return;if(e===void 0)throw new oe('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Pg(A).includes("driverAdapters"))throw new oe('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(rs()==="binary")throw new oe('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new oe(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new oe(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!dD.includes(e)){let A=Vi(e,dD);throw new oe(`Invalid errorFormat ${e} provided to PrismaClient constructor.${A}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new oe(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function A(t){if(typeof t=="string"&&!QD.includes(t)){let r=Vi(t,QD);throw new oe(`Invalid log level "${t}" provided to PrismaClient constructor.${r}`)}}for(let t of e){A(t);let r={level:A,emit:n=>{let i=["stdout","event"];if(!i.includes(n)){let s=Vi(n,i);throw new oe(`Invalid value ${JSON.stringify(n)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(t&&typeof t=="object")for(let[n,i]of Object.entries(t))if(r[n])r[n](i);else throw new oe(`Invalid property ${n} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let A=e.maxWait;if(A!=null&&A<=0)throw new oe(`Invalid value ${A} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let t=e.timeout;if(t!=null&&t<=0)throw new oe(`Invalid value ${t} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,A)=>{if(typeof e!="object")throw new oe('"omit" option is expected to be an object.');if(e===null)throw new oe('"omit" option can not be `null`');let t=[];for(let[r,n]of Object.entries(e)){let i=$Y(r,A.runtimeDataModel);if(!i){t.push({kind:"UnknownModel",modelKey:r});continue}for(let[s,o]of Object.entries(n)){let a=i.fields.find(c=>c.name===s);if(!a){t.push({kind:"UnknownField",modelKey:r,fieldName:s});continue}if(a.relationName){t.push({kind:"RelationInOmit",modelKey:r,fieldName:s});continue}typeof o!="boolean"&&t.push({kind:"InvalidFieldValue",modelKey:r,fieldName:s})}}if(t.length>0)throw new oe(eV(e,t))},__internal:e=>{if(!e)return;let A=["debug","engine","configOverride"];if(typeof e!="object")throw new oe(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[t]of Object.entries(e))if(!A.includes(t)){let r=Vi(t,A);throw new oe(`Invalid property ${JSON.stringify(t)} for "__internal" provided to PrismaClient constructor.${r}`)}}};function ID(e,A){for(let[t,r]of Object.entries(e)){if(!hD.includes(t)){let n=Vi(t,hD);throw new oe(`Unknown property ${t} provided to PrismaClient constructor.${n}`)}XY[t](r,A)}if(e.datasourceUrl&&e.datasources)throw new oe('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Vi(e,A){if(A.length===0||typeof e!="string")return"";let t=zY(e,A);return t?` Did you mean "${t}"?`:""}function zY(e,A){if(A.length===0)return null;let t=A.map(n=>({value:n,distance:(0,fD.default)(e,n)}));t.sort((n,i)=>n.distanceFn(r)===A);if(t)return e[t]}function eV(e,A){let t=Gn(e);for(let i of A)switch(i.kind){case"UnknownModel":t.arguments.getField(i.modelKey)?.markAsError(),t.addErrorMessage(()=>`Unknown model name: ${i.modelKey}.`);break;case"UnknownField":t.arguments.getDeepField([i.modelKey,i.fieldName])?.markAsError(),t.addErrorMessage(()=>`Model "${i.modelKey}" does not have a field named "${i.fieldName}".`);break;case"RelationInOmit":t.arguments.getDeepField([i.modelKey,i.fieldName])?.markAsError(),t.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":t.arguments.getDeepFieldValue([i.modelKey,i.fieldName])?.markAsError(),t.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:r,args:n}=La(t,"colorless");return`Error validating "omit" option: + +${n} + +${r}`}function BD(e){return e.length===0?Promise.resolve([]):new Promise((A,t)=>{let r=new Array(e.length),n=null,i=!1,s=0,o=()=>{i||(s++,s===e.length&&(i=!0,n?t(n):A(r)))},a=c=>{i||(i=!0,t(c))};for(let c=0;c{r[c]=g,o()},g=>{if(!Jg(g)){a(g);return}g.batchRequestIdx===c?a(g):(n||(n=g),o())})})}var Lr=ie("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var AV={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},tV=Symbol.for("prisma.client.transaction.id"),rV={id:0,nextId(){return++this.id}};function DD(e){class A{constructor(r){this._originalClient=this;this._middlewares=new Gg;this._createPrismaPromise=Bd();this.$extends=QI;e=r?.__internal?.configOverride?.(e)??e,SI(e),r&&ID(r,e);let n=new wD.EventEmitter().on("error",()=>{});this._extensions=Jn.empty(),this._previewFeatures=Pg(e),this._clientVersion=e.clientVersion??ED,this._activeProvider=e.activeProvider,this._globalOmit=r?.omit,this._tracingHelper=nD(this._previewFeatures);let i={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Uo.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Uo.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(r?.adapter){s=Au(r.adapter);let a=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==a)throw new z(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${a}\` specified in the Prisma schema.`,this._clientVersion);if(r.datasources||r.datasourceUrl!==void 0)throw new z("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let o=!s&&ts(i,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let a=r??{},c=a.__internal??{},g=c.debug===!0;g&&ie.enable("prisma:client");let l=Uo.default.resolve(e.dirname,e.relativePath);RD.default.existsSync(l)||(l=e.dirname),Lr("dirname",e.dirname),Lr("relativePath",e.relativePath),Lr("cwd",l);let u=c.engine||{};if(a.errorFormat?this._errorFormat=a.errorFormat:process.env.NODE_ENV==="production"?this._errorFormat="minimal":process.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:l,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:u.allowTriggerPanic,datamodelPath:Uo.default.join(e.dirname,e.filename??"schema.prisma"),prismaPath:u.binaryPath??void 0,engineEndpoint:u.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:a.log&&sD(a.log),logQueries:a.log&&!!(typeof a.log=="string"?a.log==="query":a.log.find(E=>typeof E=="string"?E==="query":E.level==="query")),env:o?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:FI(a,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:a.transactionOptions?.maxWait??2e3,timeout:a.transactionOptions?.timeout??5e3,isolationLevel:a.transactionOptions?.isolationLevel},logEmitter:n,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:vi,getBatchRequestPayload:qn,prismaGraphQLToJSError:Yt,PrismaClientUnknownRequestError:ve,PrismaClientInitializationError:z,PrismaClientKnownRequestError:xe,debug:ie("prisma:client:accelerateEngine"),engineVersion:mD.version,clientVersion:e.clientVersion}},Lr("clientVersion",e.clientVersion),this._engine=HR(e,this._engineConfig),this._requestHandler=new Vg(this,n),a.log)for(let E of a.log){let h=typeof E=="string"?E:E.emit==="stdout"?E.level:null;h&&this.$on(h,d=>{ss.log(`${ss.tags[h]??""}`,d.message||d.query)})}this._metrics=new Yn(this._engine)}catch(a){throw a.clientVersion=this._clientVersion,a}return this._appliedParent=ws(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(r){this._middlewares.use(r)}$on(r,n){r==="beforeExit"?this._engine.onBeforeExit(n):r&&this._engineConfig.logEmitter.on(r,n)}$connect(){try{return this._engine.start()}catch(r){throw r.clientVersion=this._clientVersion,r}}async $disconnect(){try{await this._engine.stop()}catch(r){throw r.clientVersion=this._clientVersion,r}finally{Pd()}}$executeRawInternal(r,n,i,s){let o=this._activeProvider;return this._request({action:"executeRaw",args:i,transaction:r,clientMethod:n,argsMapper:Id({clientMethod:n,activeProvider:o}),callsite:Cr(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(r,...n){return this._createPrismaPromise(i=>{if(r.raw!==void 0||r.sql!==void 0){let[s,o]=pD(r,n);return fd(this._activeProvider,s.text,s.values,Array.isArray(r)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(i,"$executeRaw",s,o)}throw new Oe("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(r,...n){return this._createPrismaPromise(i=>(fd(this._activeProvider,r,n,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(i,"$executeRawUnsafe",[r,...n])))}$runCommandRaw(r){if(e.activeProvider!=="mongodb")throw new Oe(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(n=>this._request({args:r,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:WR,callsite:Cr(this._errorFormat),transaction:n}))}async $queryRawInternal(r,n,i,s){let o=this._activeProvider;return this._request({action:"queryRaw",args:i,transaction:r,clientMethod:n,argsMapper:Id({clientMethod:n,activeProvider:o}),callsite:Cr(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(r,...n){return this._createPrismaPromise(i=>{if(r.raw!==void 0||r.sql!==void 0)return this.$queryRawInternal(i,"$queryRaw",...pD(r,n));throw new Oe("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(r){return this._createPrismaPromise(n=>{if(!this._hasPreviewFlag("typedSql"))throw new Oe("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(n,"$queryRawTyped",r)})}$queryRawUnsafe(r,...n){return this._createPrismaPromise(i=>this.$queryRawInternal(i,"$queryRawUnsafe",[r,...n]))}_transactionWithArray({promises:r,options:n}){let i=rV.nextId(),s=iD(r.length),o=r.map((a,c)=>{if(a?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=n?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,l={kind:"batch",id:i,index:c,isolationLevel:g,lock:s};return a.requestTransaction?.(l)??a});return BD(o)}async _transactionWithCallback({callback:r,options:n}){let i={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:n?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:n?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:n?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},o=await this._engine.transaction("start",i,s),a;try{let c={kind:"itx",...o};a=await r(this._createItxClient(c)),await this._engine.transaction("commit",i,o)}catch(c){throw await this._engine.transaction("rollback",i,o).catch(()=>{}),c}return a}_createItxClient(r){return ws(ft(dI(this),[nA("_appliedParent",()=>this._appliedParent._createItxClient(r)),nA("_createPrismaPromise",()=>Bd(r)),nA(tV,()=>r.id),Vn(zR)]))}$transaction(r,n){let i;typeof r=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?i=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:i=()=>this._transactionWithCallback({callback:r,options:n}):i=()=>this._transactionWithArray({promises:r,options:n});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,i)}_request(r){r.otelParentCtx=this._tracingHelper.getActiveContext();let n=r.middlewareArgsMapper??AV,i={args:n.requestArgsToMiddlewareArgs(r.args),dataPath:r.dataPath,runInTransaction:!!r.transaction,action:r.action,model:r.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:i.action,model:i.model,name:i.model?`${i.model}.${i.action}`:i.action}}},o=-1,a=async c=>{let g=this._middlewares.get(++o);if(g)return this._tracingHelper.runInChildSpan(s.middleware,C=>g(c,I=>(C?.end(),a(I))));let{runInTransaction:l,args:u,...E}=c,h={...r,...E};u&&(h.args=n.middlewareArgsToRequestArgs(u)),r.transaction!==void 0&&l===!1&&delete h.transaction;let d=await yI(this,h);return h.model?II({result:d,modelName:h.model,args:h.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):d};return this._tracingHelper.runInChildSpan(s.operation,()=>new yD.AsyncResource("prisma-client-request").runInAsyncScope(()=>a(i)))}async _executeRequest({args:r,clientMethod:n,dataPath:i,callsite:s,action:o,model:a,argsMapper:c,transaction:g,unpacker:l,otelParentCtx:u,customDataProxyFetch:E}){try{r=c?c(r):r;let h={name:"serialize"},d=this._tracingHelper.runInChildSpan(h,()=>va({modelName:a,runtimeDataModel:this._runtimeDataModel,action:o,args:r,clientMethod:n,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return ie.enabled("prisma:client")&&(Lr("Prisma Client call:"),Lr(`prisma.${n}(${rI(r)})`),Lr("Generated request:"),Lr(JSON.stringify(d,null,2)+` +`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:d,modelName:a,action:o,clientMethod:n,dataPath:i,callsite:s,args:r,extensions:this._extensions,transaction:g,unpacker:l,otelParentCtx:u,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:E})}catch(h){throw h.clientVersion=this._clientVersion,h}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new Oe("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(r){return!!this._engineConfig.previewFeatures?.includes(r)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return A}function pD(e,A){return nV(e)?[new dA(e,A),eD]:[e,AD]}function nV(e){return Array.isArray(e)&&Array.isArray(e.raw)}var iV=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function bD(e){return new Proxy(e,{get(A,t){if(t in A)return A[t];if(!iV.has(t))throw new TypeError(`Invalid enum value: ${String(t)}`)}})}function kD(e){ts(e,{conflictCheck:"warn"})}0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,deserializeJsonResponse,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +/*! Bundled license information: + +undici/lib/fetch/body.js: + (*! formdata-polyfill. MIT License. Jimmy Wärting *) + +undici/lib/websocket/frame.js: + (*! ws. MIT License. Einar Otto Stangvik *) + +decimal.js/decimal.mjs: + (*! + * decimal.js v10.4.3 + * An arbitrary-precision Decimal type for JavaScript. + * https://github.com/MikeMcl/decimal.js + * Copyright (c) 2022 Michael Mclaughlin + * MIT Licence + *) +*/ +//# sourceMappingURL=binary.js.map diff --git a/apps/api/release/vendor/@prisma/client/runtime/edge-esm.js b/apps/api/release/vendor/@prisma/client/runtime/edge-esm.js new file mode 100644 index 0000000..dda5f88 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/edge-esm.js @@ -0,0 +1,31 @@ +var sa=Object.create;var Kr=Object.defineProperty;var aa=Object.getOwnPropertyDescriptor;var la=Object.getOwnPropertyNames;var ua=Object.getPrototypeOf,ca=Object.prototype.hasOwnProperty;var zr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ae=(e,t)=>()=>(e&&(t=e(e=0)),t);var Le=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Yr=(e,t)=>{for(var r in t)Kr(e,r,{get:t[r],enumerable:!0})},pa=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of la(t))!ca.call(e,i)&&i!==r&&Kr(e,i,{get:()=>t[i],enumerable:!(n=aa(t,i))||n.enumerable});return e};var qe=(e,t,r)=>(r=e!=null?sa(ua(e)):{},pa(t||!e||!e.__esModule?Kr(r,"default",{value:e,enumerable:!0}):r,e));var y,c=Ae(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var b,p=Ae(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=Ae(()=>{"use strict";E=()=>{};E.prototype=E});var m=Ae(()=>{"use strict"});var Ei=Le(Ye=>{"use strict";f();c();p();d();m();var oi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),da=oi(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=S;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var M=A.indexOf("=");M===-1&&(M=R);var F=M===R?0:4-M%4;return[M,F]}function l(A){var R=a(A),M=R[0],F=R[1];return(M+F)*3/4-F}function u(A,R,M){return(R+M)*3/4-M}function g(A){var R,M=a(A),F=M[0],q=M[1],D=new n(u(A,F,q)),I=0,oe=q>0?F-4:F,J;for(J=0;J>16&255,D[I++]=R>>8&255,D[I++]=R&255;return q===2&&(R=r[A.charCodeAt(J)]<<2|r[A.charCodeAt(J+1)]>>4,D[I++]=R&255),q===1&&(R=r[A.charCodeAt(J)]<<10|r[A.charCodeAt(J+1)]<<4|r[A.charCodeAt(J+2)]>>2,D[I++]=R>>8&255,D[I++]=R&255),D}function h(A){return t[A>>18&63]+t[A>>12&63]+t[A>>6&63]+t[A&63]}function v(A,R,M){for(var F,q=[],D=R;Doe?oe:I+D));return F===1?(R=A[M-1],q.push(t[R>>2]+t[R<<4&63]+"==")):F===2&&(R=(A[M-2]<<8)+A[M-1],q.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),q.join("")}}),ma=oi(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,v=n?o-1:0,S=n?-1:1,A=t[r+v];for(v+=S,s=A&(1<<-h)-1,A>>=-h,h+=l;h>0;s=s*256+t[r+v],v+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+v],v+=S,h-=8);if(s===0)s=1-g;else{if(s===u)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(A?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,u,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=i?0:s-1,R=i?1:-1,M=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+v>=1?r+=S/u:r+=S*Math.pow(2,1-v),r*u>=2&&(a++,u/=2),a+v>=h?(l=0,a=h):a+v>=1?(l=(r*u-1)*Math.pow(2,o),a=a+v):(l=r*Math.pow(2,v-1)*Math.pow(2,o),a=0));o>=8;t[n+A]=l&255,A+=R,l/=256,o-=8);for(a=a<0;t[n+A]=a&255,A+=R,a/=256,g-=8);t[n+A-R]|=M*128}}),Zr=da(),Ke=ma(),ti=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ye.Buffer=T;Ye.SlowBuffer=Ea;Ye.INSPECT_MAX_BYTES=50;var ur=2147483647;Ye.kMaxLength=ur;T.TYPED_ARRAY_SUPPORT=fa();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function fa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function be(e){if(e>ur)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return tn(e)}return si(e,t,r)}T.poolSize=8192;function si(e,t,r){if(typeof e=="string")return ha(e,t);if(ArrayBuffer.isView(e))return ya(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(de(e,ArrayBuffer)||e&&de(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(de(e,SharedArrayBuffer)||e&&de(e.buffer,SharedArrayBuffer)))return li(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=wa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return si(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function ai(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ga(e,t,r){return ai(e),e<=0?be(e):t!==void 0?typeof r=="string"?be(e).fill(t,r):be(e).fill(t):be(e)}T.alloc=function(e,t,r){return ga(e,t,r)};function tn(e){return ai(e),be(e<0?0:rn(e)|0)}T.allocUnsafe=function(e){return tn(e)};T.allocUnsafeSlow=function(e){return tn(e)};function ha(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=ui(e,t)|0,n=be(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Xr(e){let t=e.length<0?0:rn(e.length)|0,r=be(t);for(let n=0;n=ur)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ur.toString(16)+" bytes");return e|0}function Ea(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(de(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),de(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function ui(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||de(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return en(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return wi(e).length;default:if(i)return n?-1:en(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=ui;function ba(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Oa(this,t,r);case"utf8":case"utf-8":return pi(this,t,r);case"ascii":return Sa(this,t,r);case"latin1":case"binary":return Ia(this,t,r);case"base64":return Aa(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ka(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};ti&&(T.prototype[ti]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(de(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,on(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:ri(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):ri(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ri(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let u;if(i){let g=-1;for(u=r;us&&(r=s-a),u=r;u>=0;u--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return xa(this,e,t,r);case"utf8":case"utf-8":return Pa(this,e,t,r);case"ascii":case"latin1":case"binary":return va(this,e,t,r);case"base64":return Ta(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ca(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Aa(e,t,r){return t===0&&r===e.length?Zr.fromByteArray(e):Zr.fromByteArray(e.slice(t,r))}function pi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,u,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(h=(o&15)<<12|(l&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],u=e[i+2],g=e[i+3],(l&192)===128&&(u&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(u&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Ra(n)}var ni=4096;function Ra(e){let t=e.length;if(t<=ni)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||H(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||H(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||H(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||H(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Re(function(e){e=e>>>0,ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Pt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Pt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||H(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||H(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||H(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||H(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Re(function(e){e=e>>>0,ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Pt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Pt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||H(e,4,this.length),Ke.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||H(e,4,this.length),Ke.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||H(e,8,this.length),Ke.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||H(e,8,this.length),Ke.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function di(e,t,r,n,i){yi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function mi(e,t,r,n,i){yi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=Re(function(e,t=0){return di(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Re(function(e,t=0){return mi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=Re(function(e,t=0){return di(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Re(function(e,t=0){return mi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function fi(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function gi(e,t,r,n,i){return t=+t,r=r>>>0,i||fi(e,t,r,4,34028234663852886e22,-34028234663852886e22),Ke.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return gi(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return gi(this,e,t,!1,r)};function hi(e,t,r,n,i){return t=+t,r=r>>>0,i||fi(e,t,r,8,17976931348623157e292,-17976931348623157e292),Ke.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return hi(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return hi(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ii(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ii(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ii(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Da(e,t,r){ze(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Pt(t,e.length-(r+1))}function yi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new We.ERR_OUT_OF_RANGE("value",a,e)}Da(n,i,o)}function ze(e,t){if(typeof e!="number")throw new We.ERR_INVALID_ARG_TYPE(t,"number",e)}function Pt(e,t,r){throw Math.floor(e)!==e?(ze(e,r),new We.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new We.ERR_BUFFER_OUT_OF_BOUNDS:new We.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Ma=/[^+/0-9A-Za-z-_]/g;function Na(e){if(e=e.split("=")[0],e=e.trim().replace(Ma,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function en(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Fa(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function wi(e){return Zr.toByteArray(Na(e))}function cr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function de(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function on(e){return e!==e}var La=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Re(e){return typeof BigInt>"u"?qa:e}function qa(){throw new Error("BigInt not supported")}});var w,f=Ae(()=>{"use strict";w=qe(Ei())});function Ba(){return!1}var Ua,$a,Ci,Ai=Ae(()=>{"use strict";f();c();p();d();m();Ua={},$a={existsSync:Ba,promises:Ua},Ci=$a});function Ha(...e){return e.join("/")}function Wa(...e){return e.join("/")}var $i,Ka,za,Tt,Vi=Ae(()=>{"use strict";f();c();p();d();m();$i="/",Ka={sep:$i},za={resolve:Ha,posix:Ka,join:Wa,sep:$i},Tt=za});var fr,Ji=Ae(()=>{"use strict";f();c();p();d();m();fr=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Qi=Le((gm,Gi)=>{"use strict";f();c();p();d();m();Gi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Ki=Le((Rm,Wi)=>{"use strict";f();c();p();d();m();Wi.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Yi=Le((Mm,zi)=>{"use strict";f();c();p();d();m();var rl=Ki();zi.exports=e=>typeof e=="string"?e.replace(rl(),""):e});var wn=Le((Sh,go)=>{"use strict";f();c();p();d();m();go.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{Wu.exports={name:"@prisma/engines-version",version:"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"605197351a3c8bdd595af2d2a9bc3025bca48ea2"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.34",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var $o=Le(()=>{"use strict";f();c();p();d();m()});f();c();p();d();m();var Pi={};Yr(Pi,{defineExtension:()=>bi,getExtensionContext:()=>xi});f();c();p();d();m();f();c();p();d();m();function bi(e){return typeof e=="function"?e:t=>t.$extends(e)}f();c();p();d();m();function xi(e){return e}var Ti={};Yr(Ti,{validator:()=>vi});f();c();p();d();m();f();c();p();d();m();function vi(...e){return t=>t}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var sn,Ri,Si,Ii,Oi=!0;typeof y<"u"&&({FORCE_COLOR:sn,NODE_DISABLE_COLORS:Ri,NO_COLOR:Si,TERM:Ii}=y.env||{},Oi=y.stdout&&y.stdout.isTTY);var Va={enabled:!Ri&&Si==null&&Ii!=="dumb"&&(sn!=null&&sn!=="0"||Oi)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Va.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Zp=V(0,0),pr=V(1,22),dr=V(2,22),Xp=V(3,23),ki=V(4,24),ed=V(7,27),td=V(8,28),rd=V(9,29),nd=V(30,39),Ze=V(31,39),Di=V(32,39),Mi=V(33,39),Ni=V(34,39),id=V(35,39),Fi=V(36,39),od=V(37,39),_i=V(90,39),sd=V(90,39),ad=V(40,49),ld=V(41,49),ud=V(42,49),cd=V(43,49),pd=V(44,49),dd=V(45,49),md=V(46,49),fd=V(47,49);f();c();p();d();m();var ja=100,Li=["green","yellow","blue","magenta","cyan","red"],mr=[],qi=Date.now(),Ja=0,an=typeof y<"u"?y.env:{};globalThis.DEBUG??=an.DEBUG??"";globalThis.DEBUG_COLORS??=an.DEBUG_COLORS?an.DEBUG_COLORS==="true":!0;var vt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Ga(e){let t={color:Li[Ja++%Li.length],enabled:vt.enabled(e),namespace:e,log:vt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&mr.push([o,...n]),mr.length>ja&&mr.shift(),vt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:Qa(g)),u=`+${Date.now()-qi}ms`;qi=Date.now(),a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Bi=new Proxy(Ga,{get:(e,t)=>vt[t],set:(e,t,r)=>vt[t]=r});function Qa(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Ui(){mr.length=0}var ee=Bi;f();c();p();d();m();f();c();p();d();m();var ji="library";function Ct(e){let t=Ya();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":ji)}function Ya(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}f();c();p();d();m();f();c();p();d();m();var Ue;(t=>{let e;(I=>(I.findUnique="findUnique",I.findUniqueOrThrow="findUniqueOrThrow",I.findFirst="findFirst",I.findFirstOrThrow="findFirstOrThrow",I.findMany="findMany",I.create="create",I.createMany="createMany",I.createManyAndReturn="createManyAndReturn",I.update="update",I.updateMany="updateMany",I.upsert="upsert",I.delete="delete",I.deleteMany="deleteMany",I.groupBy="groupBy",I.count="count",I.aggregate="aggregate",I.findRaw="findRaw",I.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(Ue||={});var Rt={};Yr(Rt,{error:()=>el,info:()=>Xa,log:()=>Za,query:()=>tl,should:()=>Hi,tags:()=>At,warn:()=>ln});f();c();p();d();m();var At={error:Ze("prisma:error"),warn:Mi("prisma:warn"),info:Fi("prisma:info"),query:Ni("prisma:query")},Hi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Za(...e){console.log(...e)}function ln(e,...t){Hi.warn()&&console.warn(`${At.warn} ${e}`,...t)}function Xa(e,...t){console.info(`${At.info} ${e}`,...t)}function el(e,...t){console.error(`${At.error} ${e}`,...t)}function tl(e,...t){console.log(`${At.query} ${e}`,...t)}f();c();p();d();m();function xe(e,t){throw new Error(t)}f();c();p();d();m();function un(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();c();p();d();m();var cn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});f();c();p();d();m();function Xe(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();c();p();d();m();function pn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{Zi.has(e)||(Zi.add(e),ln(t,...r))};f();c();p();d();m();var K=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};N(K,"PrismaClientKnownRequestError");var Se=class extends K{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};N(Se,"NotFoundError");f();c();p();d();m();var G=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};N(G,"PrismaClientInitializationError");f();c();p();d();m();var Ie=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Ie,"PrismaClientRustPanicError");f();c();p();d();m();var se=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};N(se,"PrismaClientUnknownRequestError");f();c();p();d();m();var z=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};N(z,"PrismaClientValidationError");f();c();p();d();m();f();c();p();d();m();var et=9e15,Me=1e9,dn="0123456789abcdef",yr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",wr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",mn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},no,Pe,_=!0,br="[DecimalError] ",De=br+"Invalid argument: ",io=br+"Precision limit exceeded",oo=br+"crypto unavailable",so="[object Decimal]",X=Math.floor,Q=Math.pow,nl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,il=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,ol=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ao=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,k=7,sl=9007199254740991,al=yr.length-1,fn=wr.length-1,C={toStringTag:so};C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),O(e)};C.ceil=function(){return O(new this.constructor(this),this.e+1,2)};C.clampedTo=C.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(De+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};C.comparedTo=C.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};C.cosine=C.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+k,n.rounding=1,r=ll(n,mo(n,r)),n.precision=e,n.rounding=t,O(Pe==2||Pe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};C.cubeRoot=C.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*Q(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Y(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=Q(r,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(g),n=U(u.plus(g).times(a),u.plus(l),s+2,1),Y(a.d).slice(0,s)===(r=Y(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(O(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(O(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return _=!0,O(n,e,h.rounding,t)};C.decimalPlaces=C.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-X(this.e/k))*k,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};C.dividedBy=C.div=function(e){return U(this,new this.constructor(e))};C.dividedToIntegerBy=C.divToInt=function(e){var t=this,r=t.constructor;return O(U(t,new r(e),0,1,1),r.precision,r.rounding)};C.equals=C.eq=function(e){return this.cmp(e)===0};C.floor=function(){return O(new this.constructor(this),this.e+1,3)};C.greaterThan=C.gt=function(e){return this.cmp(e)>0};C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return t==1||t===0};C.hyperbolicCosine=C.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Pr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,u=e,g=new s(8);u--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return O(o,s.precision=r,s.rounding=n,!0)};C.hyperbolicSine=C.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Pr(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,O(i,t,r,!0)};C.hyperbolicTangent=C.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,U(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};C.inverseCosine=C.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?ce(r,i,o):new r(0):new r(NaN):t.isZero()?ce(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=ce(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};C.inverseHyperbolicCosine=C.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,_=!1,r=r.times(r).minus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};C.inverseHyperbolicSine=C.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,_=!1,r=r.times(r).plus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln())};C.inverseHyperbolicTangent=C.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?O(new o(i),e,t,!0):(o.precision=r=n-i.e,i=U(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};C.inverseSine=C.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ce(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};C.inverseTangent=C.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,v=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=fn)return s=ce(g,h+4,v).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=fn)return s=ce(g,h+4,v).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/k+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/k),n=1,l=u.times(u),s=new g(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};C.isNaN=function(){return!this.s};C.isNegative=C.isNeg=function(){return this.s<0};C.isPositive=C.isPos=function(){return this.s>0};C.isZero=function(){return!!this.d&&this.d[0]===0};C.lessThan=C.lt=function(e){return this.cmp(e)<0};C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1};C.logarithm=C.log=function(e){var t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,v=g.rounding,S=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new g(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(_=!1,a=h+S,s=ke(u,a),n=t?Er(g,a+10):ke(e,a),l=U(s,n,a,1),St(l.d,i=h,v))do if(a+=10,s=ke(u,a),n=t?Er(g,a+10):ke(e,a),l=U(s,n,a,1),!o){+Y(l.d).slice(i+1,i+15)+1==1e14&&(l=O(l,h+1,0));break}while(St(l.d,i+=10,v));return _=!0,O(l,h,v)};C.minus=C.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,S=this,A=S.constructor;if(e=new A(e),!S.d||!e.d)return!S.s||!e.s?e=new A(NaN):S.d?e.s=-e.s:e=new A(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(u=S.d,v=e.d,a=A.precision,l=A.rounding,!u[0]||!v[0]){if(v[0])e.s=-e.s;else if(u[0])e=new A(S);else return new A(l===3?-0:0);return _?O(e,a,l):e}if(r=X(e.e/k),g=X(S.e/k),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=v.length):(t=v,r=g,s=u.length),n=Math.max(Math.ceil(a/k),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=v.length,h=n0;--n)u[s++]=0;for(n=v.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=g.length,s-i<0&&(i=s,r=g,g=u,u=r),t=0;i;)t=(u[--i]=u[i]+g[i]+t)/pe|0,u[i]%=pe;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=xr(u,n),_?O(e,a,l):e};C.precision=C.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(De+e);return r.d?(t=lo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};C.round=function(){var e=this,t=e.constructor;return O(new t(e),e.e+1,t.rounding)};C.sine=C.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+k,n.rounding=1,r=cl(n,mo(n,r)),n.precision=e,n.rounding=t,O(Pe>2?r.neg():r,e,t,!0)):new n(NaN)};C.squareRoot=C.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,g=s.constructor;if(u!==1||!a||!a[0])return new g(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=Y(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=X((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(u.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(U(s,o,r+2,1)).times(.5),Y(o.d).slice(0,r)===(t=Y(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(O(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(O(n,l+1,1),e=!n.times(n).eq(s));break}return _=!0,O(n,l,g.rounding,e)};C.tangent=C.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=U(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,O(Pe==2||Pe==4?r.neg():r,e,t,!0)):new n(NaN)};C.times=C.mul=function(e){var t,r,n,i,o,s,a,l,u,g=this,h=g.constructor,v=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!v||!v[0]||!S||!S[0])return new h(!e.s||v&&!v[0]&&!S||S&&!S[0]&&!v?NaN:!v||!S?e.s/0:e.s*0);for(r=X(g.e/k)+X(e.e/k),l=v.length,u=S.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+S[n]*v[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=xr(o,r),_?O(e,h.precision,h.rounding):e};C.toBinary=function(e,t){return yn(this,2,e,t)};C.toDecimalPlaces=C.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ne(e,0,Me),t===void 0?t=n.rounding:ne(t,0,8),O(r,e+r.e+1,t))};C.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=me(n,!0):(ne(e,0,Me),t===void 0?t=i.rounding:ne(t,0,8),n=O(new i(n),e+1,t),r=me(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=me(i):(ne(e,0,Me),t===void 0?t=o.rounding:ne(t,0,8),n=O(new o(i),e+i.e+1,t),r=me(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};C.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,S=this,A=S.d,R=S.constructor;if(!A)return new R(S);if(u=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=lo(A)-S.e-1,s=o%k,t.d[0]=Q(10,s<0?k+s:s),e==null)e=o>0?t:u;else{if(a=new R(e),!a.isInt()||a.lt(u))throw Error(De+a);e=a.gt(t)?o>0?t:u:a}for(_=!1,a=new R(Y(A)),g=R.precision,R.precision=o=A.length*k*2;h=U(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=U(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=S.s,v=U(u,n,o,1).minus(S).abs().cmp(U(l,r,o,1).minus(S).abs())<1?[u,n]:[l,r],R.precision=g,_=!0,v};C.toHexadecimal=C.toHex=function(e,t){return yn(this,16,e,t)};C.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ne(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(_=!1,r=U(r,e,0,t,1).times(e),_=!0,O(r)):(e.s=r.s,r=e),r};C.toNumber=function(){return+this};C.toOctal=function(e,t){return yn(this,8,e,t)};C.toPower=C.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(Q(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return O(a,n,o);if(t=X(e.e/k),t>=e.d.length-1&&(r=u<0?-u:u)<=sl)return i=uo(l,a,r,n),e.s<0?new l(1).div(i):O(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(_=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=gn(e.times(ke(a,n+r)),n),i.d&&(i=O(i,n+5,1),St(i.d,n,o)&&(t=n+10,i=O(gn(e.times(ke(a,t+r)),t),t+5,1),+Y(i.d).slice(n+1,n+15)+1==1e14&&(i=O(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,O(i,n,o))};C.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=me(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ne(e,1,Me),t===void 0?t=i.rounding:ne(t,0,8),n=O(new i(n),e,t),r=me(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toSignificantDigits=C.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ne(e,1,Me),t===void 0?t=n.rounding:ne(t,0,8)),O(new n(r),e,t)};C.toString=function(){var e=this,t=e.constructor,r=me(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};C.truncated=C.trunc=function(){return O(new this.constructor(this),this.e+1,1)};C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,r=me(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Y(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(De+e)}function St(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=k,i=0):(i=Math.ceil((t+1)/k),t%=k),o=Q(10,k-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==Q(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==Q(10,t-3)-1,s}function hr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function ll(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Pr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var U=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,g,h,v,S,A,R,M,F,q,D,I,oe,J,Qr,sr,xt,Hr,ue,ar,lr=n.constructor,Wr=n.s==i.s?1:-1,Z=n.d,$=i.d;if(!Z||!Z[0]||!$||!$[0])return new lr(!n.s||!i.s||(Z?$&&Z[0]==$[0]:!$)?NaN:Z&&Z[0]==0||!$?Wr*0:Wr/0);for(l?(S=1,g=n.e-i.e):(l=pe,S=k,g=X(n.e/S)-X(i.e/S)),ue=$.length,xt=Z.length,F=new lr(Wr),q=F.d=[],h=0;$[h]==(Z[h]||0);h++);if($[h]>(Z[h]||0)&&g--,o==null?(J=o=lr.precision,s=lr.rounding):a?J=o+(n.e-i.e)+1:J=o,J<0)q.push(1),A=!0;else{if(J=J/S+2|0,h=0,ue==1){for(v=0,$=$[0],J++;(h1&&($=e($,v,l),Z=e(Z,v,l),ue=$.length,xt=Z.length),sr=ue,D=Z.slice(0,ue),I=D.length;I=l/2&&++Hr;do v=0,u=t($,D,ue,I),u<0?(oe=D[0],ue!=I&&(oe=oe*l+(D[1]||0)),v=oe/Hr|0,v>1?(v>=l&&(v=l-1),R=e($,v,l),M=R.length,I=D.length,u=t(R,D,M,I),u==1&&(v--,r(R,ue=10;v/=10)h++;F.e=h+g*S-1,O(F,a?o+F.e+1:o,s,A)}return F}}();function O(e,t,r,n){var i,o,s,a,l,u,g,h,v,S=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=k,s=t,g=h[v=0],l=g/Q(10,i-s-1)%10|0;else if(v=Math.ceil((o+1)/k),a=h.length,v>=a)if(n){for(;a++<=v;)h.push(0);g=l=0,i=1,o%=k,s=o-k+1}else break e;else{for(g=a=h[v],i=1;a>=10;a/=10)i++;o%=k,s=o-k+i,l=s<0?0:g/Q(10,i-s-1)%10|0}if(n=n||t<0||h[v+1]!==void 0||(s<0?g:g%Q(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/Q(10,i-s):0:h[v-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=Q(10,(k-t%k)%k),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=v,a=1,v--):(h.length=v+1,a=Q(10,k-o),h[v]=s>0?(g/Q(10,i-s)%Q(10,s)|0)*a:0),u)for(;;)if(v==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[v]+=a,h[v]!=pe)break;h[v--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Oe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Oe(-i-1)+o,r&&(n=r-s)>0&&(o+=Oe(n))):i>=s?(o+=Oe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Oe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Oe(n))),o}function xr(e,t){var r=e[0];for(t*=k;r>=10;r/=10)t++;return t}function Er(e,t,r){if(t>al)throw _=!0,r&&(e.precision=r),Error(io);return O(new e(yr),t,1,!0)}function ce(e,t,r){if(t>fn)throw Error(io);return O(new e(wr),t,r,!0)}function lo(e){var t=e.length-1,r=t*k+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Oe(e){for(var t="";e--;)t+="0";return t}function uo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/k+4);for(_=!1;;){if(r%2&&(o=o.times(t),to(o.d,s)&&(i=!0)),r=X(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),to(t.d,s)}return _=!0,o}function eo(e){return e.d[e.d.length-1]&1}function co(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new v(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(_=!1,l=A):l=t,a=new v(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(Q(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new v(1),v.precision=l;;){if(o=O(o.times(e),l,1),r=r.times(++g),a=s.plus(U(o,r,l,1)),Y(a.d).slice(0,l)===Y(s.d).slice(0,l)){for(i=h;i--;)s=O(s.times(s),l,1);if(t==null)if(u<3&&St(s.d,l-n,S,u))v.precision=l+=10,r=o=a=new v(1),g=0,u++;else return O(s,v.precision=A,S,_=!0);else return v.precision=A,s}s=a}}function ke(e,t){var r,n,i,o,s,a,l,u,g,h,v,S=1,A=10,R=e,M=R.d,F=R.constructor,q=F.rounding,D=F.precision;if(R.s<0||!M||!M[0]||!R.e&&M[0]==1&&M.length==1)return new F(M&&!M[0]?-1/0:R.s!=1?NaN:M?0:R);if(t==null?(_=!1,g=D):g=t,F.precision=g+=A,r=Y(M),n=r.charAt(0),Math.abs(o=R.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=Y(R.d),n=r.charAt(0),S++;o=R.e,n>1?(R=new F("0."+r),o++):R=new F(n+"."+r.slice(1))}else return u=Er(F,g+2,D).times(o+""),R=ke(new F(n+"."+r.slice(1)),g-A).plus(u),F.precision=D,t==null?O(R,D,q,_=!0):R;for(h=R,l=s=R=U(R.minus(1),R.plus(1),g,1),v=O(R.times(R),g,1),i=3;;){if(s=O(s.times(v),g,1),u=l.plus(U(s,new F(i),g,1)),Y(u.d).slice(0,g)===Y(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(Er(F,g+2,D).times(o+""))),l=U(l,new F(S),g,1),t==null)if(St(l.d,g-A,q,a))F.precision=g+=A,u=s=R=U(h.minus(1),h.plus(1),g,1),v=O(R.times(R),g,1),i=a=1;else return O(l,F.precision=D,q,_=!0);else return F.precision=D,l;l=u,i+=2}}function po(e){return String(e.s*e.s/0)}function hn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%k,r<0&&(n+=k),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),ao.test(t))return hn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(il.test(t))r=16,t=t.toLowerCase();else if(nl.test(t))r=2;else if(ol.test(t))r=8;else throw Error(De+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=uo(n,new n(r),o,o*2)),u=hr(t,r,pe),g=u.length-1,o=g;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=xr(u,g),e.d=u,_=!1,s&&(e=U(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?Q(2,l):$e.pow(2,l))),_=!0,e)}function cl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Pr(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,u=1,g=e.precision,h=Math.ceil(g/k);for(_=!1,l=r.times(r),a=new e(n);;){if(s=U(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=U(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return _=!0,s.d.length=h+1,s}function Pr(e,t){for(var r=e;--t;)r*=e;return r}function mo(e,t){var r,n=t.s<0,i=ce(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Pe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Pe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Pe=eo(r)?n?2:3:n?4:1,t;Pe=eo(r)?n?1:4:n?3:2}return t.minus(i).abs()}function yn(e,t,r,n){var i,o,s,a,l,u,g,h,v,S=e.constructor,A=r!==void 0;if(A?(ne(r,1,Me),n===void 0?n=S.rounding:ne(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=po(e);else{for(g=me(e),s=g.indexOf("."),A?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),v=new S(1),v.e=g.length-s,v.d=hr(me(v),10,i),v.e=v.d.length),h=hr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=A?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=U(e,v,r,n,0,i),h=e.d,o=e.e,u=no),s=h[r],a=i/2,u=u||h[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,u)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=hr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function pl(e){return new this(e).abs()}function dl(e){return new this(e).acos()}function ml(e){return new this(e).acosh()}function fl(e,t){return new this(e).plus(t)}function gl(e){return new this(e).asin()}function hl(e){return new this(e).asinh()}function yl(e){return new this(e).atan()}function wl(e){return new this(e).atanh()}function El(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ce(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ce(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ce(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(U(e,t,o,1)),t=ce(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(U(e,t,o,1)),r}function bl(e){return new this(e).cbrt()}function xl(e){return O(e=new this(e),e.e+1,2)}function Pl(e,t,r){return new this(e).clamp(t,r)}function vl(e){if(!e||typeof e!="object")throw Error(br+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Me,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(De+r+": "+n);if(r="crypto",i&&(this[r]=mn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(oo);else this[r]=!1;else throw Error(De+r+": "+n);return this}function Tl(e){return new this(e).cos()}function Cl(e){return new this(e).cosh()}function fo(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,ro(o)){u.s=o.s,_?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(oo);else for(;o=10;i/=10)n++;ne.highlight()},eu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function tu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function ru({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(nu(t))),i){a.push("");let u=[i.toString()];o&&(u.push(o),u.push(s.dim(")"))),a.push(u.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function nu(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function ot(e){let t=e.showColors?Xl:eu,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=tu(e),ru(r,t)}f();c();p();d();m();var xo=qe(wn());f();c();p();d();m();function wo(e,t,r){let n=Eo(e),i=iu(n),o=su(i);o?Tr(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Eo(e){return e.errors.flatMap(t=>t.kind==="Union"?Eo(t):[t])}function iu(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:ou(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function ou(e,t){return[...new Set(e.concat(t))]}function su(e){return pn(e,(t,r)=>{let n=ho(t),i=ho(r);return n!==i?n-i:yo(t)-yo(r)})}function ho(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function yo(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();c();p();d();m();var ae=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};f();c();p();d();m();f();c();p();d();m();var st=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};f();c();p();d();m();f();c();p();d();m();var Cr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();c();p();d();m();var Ar=e=>e,Rr={bold:Ar,red:Ar,green:Ar,dim:Ar,enabled:!1},bo={bold:pr,red:Ze,green:Di,dim:dr,enabled:!0},at={write(e){e.writeLine(",")}};f();c();p();d();m();var fe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};f();c();p();d();m();var Ne=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var lt=class extends Ne{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Cr(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new fe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(at,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var ut=class e extends Ne{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof lt&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new fe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(at,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};f();c();p();d();m();var W=class extends Ne{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new fe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};f();c();p();d();m();var Ot=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(at,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Tr(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":lu(e,t);break;case"IncludeOnScalar":uu(e,t);break;case"EmptySelection":cu(e,t,r);break;case"UnknownSelectionField":fu(e,t);break;case"InvalidSelectionValue":gu(e,t);break;case"UnknownArgument":hu(e,t);break;case"UnknownInputField":yu(e,t);break;case"RequiredArgumentMissing":wu(e,t);break;case"InvalidArgumentType":Eu(e,t);break;case"InvalidArgumentValue":bu(e,t);break;case"ValueTooLarge":xu(e,t);break;case"SomeFieldsMissing":Pu(e,t);break;case"TooManyFieldsGiven":vu(e,t);break;case"Union":wo(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function lu(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function uu(e,t){let[r,n]=kt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ae(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${Dt(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function cu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){pu(e,t,i);return}if(n.hasField("select")){du(e,t);return}}if(r?.[rt(e.outputType.name)]){mu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function pu(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new ae(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function du(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),To(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Dt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function mu(e,t){let r=new Ot;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ae("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=kt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new ut;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function fu(e,t){let r=Co(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":To(n,e.outputType);break;case"include":Tu(n,e.outputType);break;case"omit":Cu(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(Dt(n)),i.join(" ")})}function gu(e,t){let r=Co(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function hu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Au(n,e.arguments)),t.addErrorMessage(i=>Po(i,r,e.arguments.map(o=>o.name)))}function yu(e,t){let[r,n]=kt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Ao(o,e.inputType)}t.addErrorMessage(o=>Po(o,n,e.inputType.fields.map(s=>s.name)))}function Po(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Su(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Dt(e)),n.join(" ")}function wu(e,t){let r;t.addErrorMessage(l=>r?.value instanceof W&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=kt(e.argumentPath),s=new Ot,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ae(o,s).makeRequired())}else{let l=e.inputTypes.map(vo).join(" | ");a.addSuggestion(new ae(o,l).makeRequired())}}function vo(e){return e.kind==="list"?`${vo(e.elementType)}[]`:e.name}function Eu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Sr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function bu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Sr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function xu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof W&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Pu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Ao(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Sr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(Dt(i)),o.join(" ")})}function vu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Sr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function To(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ae(r.name,"true"))}function Tu(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ae(r.name,"true"))}function Cu(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ae(r.name,"true"))}function Au(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ae(r.name,r.typeNames.join(" | ")))}function Co(e,t){let[r,n]=kt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Ao(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ae(r.name,r.typeNames.join(" | ")))}function kt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Dt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Sr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Ru=3;function Su(e,t){let r=1/0,n;for(let i of t){let o=(0,xo.default)(e,i);o>Ru||o`}};function ct(e){return e instanceof Mt}f();c();p();d();m();var Ir=Symbol(),En=new WeakMap,Te=class{constructor(t){t===Ir?En.set(this,`Prisma.${this._getName()}`):En.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return En.get(this)}},Nt=class extends Te{_getNamespace(){return"NullTypes"}},Ft=class extends Nt{};xn(Ft,"DbNull");var _t=class extends Nt{};xn(_t,"JsonNull");var Lt=class extends Nt{};xn(Lt,"AnyNull");var bn={classes:{DbNull:Ft,JsonNull:_t,AnyNull:Lt},instances:{DbNull:new Ft(Ir),JsonNull:new _t(Ir),AnyNull:new Lt(Ir)}};function xn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();c();p();d();m();var So=": ",Or=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+So.length}write(t){let r=new fe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(So).write(this.value)}};var Pn=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function pt(e){return new Pn(Io(e))}function Io(e){let t=new ut;for(let[r,n]of Object.entries(e)){let i=new Or(r,Oo(n));t.addField(i)}return t}function Oo(e){if(typeof e=="string")return new W(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new W(String(e));if(typeof e=="bigint")return new W(`${e}n`);if(e===null)return new W("null");if(e===void 0)return new W("undefined");if(it(e))return new W(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new W(`Buffer.alloc(${e.byteLength})`):new W(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=vr(e)?e.toISOString():"Invalid Date";return new W(`new Date("${t}")`)}return e instanceof Te?new W(`Prisma.${e._getName()}`):ct(e)?new W(`prisma.${Ro(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Iu(e):typeof e=="object"?Io(e):new W(Object.prototype.toString.call(e))}function Iu(e){let t=new lt;for(let r of e)t.addItem(Oo(r));return t}function kr(e,t){let r=t==="pretty"?bo:Rr,n=e.renderAllMessages(r),i=new st(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Dr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=pt(e);for(let h of t)Tr(h,a,s);let{message:l,args:u}=kr(a,r),g=ot({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new z(g,{clientVersion:o})}f();c();p();d();m();f();c();p();d();m();var ge=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};f();c();p();d();m();function qt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}f();c();p();d();m();function he(e){return e.replace(/^./,t=>t.toLowerCase())}f();c();p();d();m();function Do(e,t,r){let n=he(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Ou({...e,...ko(t.name,e,t.result.$allModels),...ko(t.name,e,t.result[n])})}function Ou(e){let t=new ge,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Xe(e,n=>({...n,needs:r(n.name,new Set)}))}function ko(e,t,r){return r?Xe(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:ku(t,o,i)})):{}}function ku(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Mo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function No(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Mr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new ge;this.modelExtensionsCache=new ge;this.queryCallbacksCache=new ge;this.clientExtensions=qt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=qt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Do(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=he(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},dt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Mr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Mr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};f();c();p();d();m();f();c();p();d();m();var Fo=Symbol(),Bt=class{constructor(t){if(t!==Fo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?vn:t}},vn=new Bt(Fo);function ye(e){return e instanceof Bt}var Du={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},_o="explicitly `undefined` values are not allowed";function Cn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=dt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g}){let h=new Tn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g});return{modelName:e,action:Du[t],query:Ut(r,h)}}function Ut({select:e,include:t,...r}={},n){let i;return n.isPreviewFeatureOn("omitApi")&&(i=r.omit,delete r.omit),{arguments:qo(r,n),selection:Mu(e,t,i,n)}}function Mu(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.isPreviewFeatureOn("omitApi")&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Lu(e,n)):Nu(n,t,r)}function Nu(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&Fu(n,t,e),e.isPreviewFeatureOn("omitApi")&&_u(n,r,e),n}function Fu(e,t,r){for(let[n,i]of Object.entries(t)){if(ye(i))continue;let o=r.nestSelection(n);if(An(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Ut(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Ut(i,o)}}function _u(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=No(i,n);for(let[s,a]of Object.entries(o)){if(ye(a))continue;An(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function Lu(e,t){let r={},n=t.getComputedFields(),i=Mo(e,n);for(let[o,s]of Object.entries(i)){if(ye(s))continue;let a=t.nestSelection(o);An(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||ye(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Ut({},a):r[o]=!0;continue}r[o]=Ut(s,a)}}return r}function Lo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(nt(e)){if(vr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(ct(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return qu(e,t);if(ArrayBuffer.isView(e))return{$type:"Bytes",value:w.Buffer.from(e).toString("base64")};if(Bu(e))return e.values;if(it(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Te){if(e!==bn.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Uu(e))return e.toJSON();if(typeof e=="object")return qo(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function qo(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);ye(i)||(i!==void 0?r[n]=Lo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:_o}))}return r}function qu(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[rt(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:xe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};f();c();p();d();m();var $t=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};f();c();p();d();m();function $u(e){return{models:Rn(e.models),enums:Rn(e.enums),types:Rn(e.types)}}function Rn(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function Vu(e,t){let r=qt(()=>ju(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function ju(e){return{datamodel:{models:Sn(e.models),enums:Sn(e.enums),types:Sn(e.types)}}}function Sn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();c();p();d();m();var In=new WeakMap,Nr="$$PrismaTypedSql",On=class{constructor(t,r){In.set(this,{sql:t,values:r}),Object.defineProperty(this,Nr,{value:Nr})}get sql(){return In.get(this).sql}get values(){return In.get(this).values}};function Ju(e){return(...t)=>new On(e,t)}function Bo(e){return e!=null&&e[Nr]===Nr}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();function Vt(e){return{ok:!1,error:e,map(){return Vt(e)},flatMap(){return Vt(e)}}}var kn=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},Dn=e=>{let t=new kn,r=we(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:we(t,e.queryRaw.bind(e)),executeRaw:we(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>Gu(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=Hu(t,e.getConnectionInfo.bind(e))),n},Gu=(e,t)=>{let r=we(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:we(e,t.queryRaw.bind(t)),executeRaw:we(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>Qu(e,o))}},Qu=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:we(e,t.queryRaw.bind(t)),executeRaw:we(e,t.executeRaw.bind(t)),commit:we(e,t.commit.bind(t)),rollback:we(e,t.rollback.bind(t))});function we(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return Vt({kind:"GenericJs",id:i})}}}function Hu(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return Vt({kind:"GenericJs",id:i})}}}var oa=qe(Uo());var iD=qe($o());Ji();Ai();Vi();f();c();p();d();m();var le=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}f();c();p();d();m();f();c();p();d();m();var Fr={enumerable:!0,configurable:!0,writable:!0};function _r(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Fr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Jo=Symbol.for("nodejs.util.inspect.custom");function Ee(e,t){let r=Yu(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Go(Reflect.ownKeys(o),r),a=Go(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Fr,...l?.getPropertyDescriptor(s)}:Fr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Jo]=function(){let o={...this};return delete o[Jo],o},i}function Yu(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Go(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();c();p();d();m();function mt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();c();p();d();m();function Lr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();c();p();d();m();function Qo(e){if(e===void 0)return"";let t=pt(e);return new st(0,{colors:Rr}).write(t).toString()}f();c();p();d();m();var Zu="P2037";function Jt({error:e,user_facing_error:t},r,n){return t.error_code?new K(Xu(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new se(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Xu(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===Zu&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var Mn=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Mn}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var Ho={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function ft(e={}){let t=tc(e);return Object.entries(t).reduce((n,[i,o])=>(Ho[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function tc(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function qr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Wo(e,t){let r=qr(e);return t({action:"aggregate",unpacker:r,argsMapper:ft})(e)}f();c();p();d();m();function rc(e={}){let{select:t,...r}=e;return typeof t=="object"?ft({...r,_count:t}):ft({...r,_count:{_all:!0}})}function nc(e={}){return typeof e.select=="object"?t=>qr(e)(t)._count:t=>qr(e)(t)._count._all}function Ko(e,t){return t({action:"count",unpacker:nc(e),argsMapper:rc})(e)}f();c();p();d();m();function ic(e={}){let t=ft(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function oc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function zo(e,t){return t({action:"groupBy",unpacker:oc(e),argsMapper:ic})(e)}function Yo(e,t,r){if(t==="aggregate")return n=>Wo(n,r);if(t==="count")return n=>Ko(n,r);if(t==="groupBy")return n=>zo(n,r)}f();c();p();d();m();function Zo(e,t){let r=t.fields.filter(i=>!i.relationName),n=cn(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Mt(e,o,s.type,s.isList,s.kind==="enum")},..._r(Object.keys(n))})}f();c();p();d();m();f();c();p();d();m();var Xo=e=>Array.isArray(e)?e:e.split("."),Nn=(e,t)=>Xo(t).reduce((r,n)=>r&&r[n],e),es=(e,t,r)=>Xo(t).reduceRight((n,i,o,s)=>Object.assign({},Nn(e,s.slice(0,o)),{[i]:n}),r);function sc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function ac(e,t,r){return t===void 0?e??{}:es(t,r,e||!0)}function Fn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Fe(e._errorFormat),g=sc(n,i),h=ac(l,o,g),v=r({dataPath:g,callsite:u})(h),S=lc(e,t);return new Proxy(v,{get(A,R){if(!S.includes(R))return A[R];let F=[a[R].type,r,R],q=[g,h];return Fn(e,...F,...q)},..._r([...S,...Object.getOwnPropertyNames(v)])})}}function lc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}f();c();p();d();m();function ts(e,t,r,n){return e===Ue.ModelAction.findFirstOrThrow||e===Ue.ModelAction.findUniqueOrThrow?uc(t,r,n):n}function uc(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=ot({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new z(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof K&&o.code==="P2025"?new Se(`No ${e} found`,t):o})}}var cc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],pc=["aggregate","count","groupBy"];function _n(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[dc(e,t),fc(e,t),jt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return Ee({},n)}function dc(e,t){let r=he(t),n=Object.keys(Ue.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=ts(o,t,e._clientVersion,s);let a=l=>u=>{let g=Fe(e._errorFormat);return e._createPrismaPromise(h=>{let v={args:u,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:h,callsite:g};return s({...v,...l})})};return cc.includes(o)?Fn(e,t,a):mc(i)?Yo(e,i,a):a({})}}}function mc(e){return pc.includes(e)}function fc(e,t){return Ve(te("fields",()=>{let r=e._runtimeDataModel.models[t];return Zo(t,r)}))}f();c();p();d();m();function rs(e){return e.replace(/^./,t=>t.toUpperCase())}var Ln=Symbol();function Gt(e){let t=[gc(e),te(Ln,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(jt(r)),Ee(e,t)}function gc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(he),n=[...new Set(t.concat(r))];return Ve({getKeys(){return n},getPropertyValue(i){let o=rs(i);if(e._runtimeDataModel.models[o]!==void 0)return _n(e,o);if(e._runtimeDataModel.models[i]!==void 0)return _n(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ns(e){return e[Ln]?e[Ln]:e}function is(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Gt(t)}f();c();p();d();m();f();c();p();d();m();function os({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(g=>n[g]);u.length>0&&a.push(mt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(mt(u))}hc(e,l.needs)&&s.push(yc(l,Ee(e,s)))}return s.length>0||a.length>0?Ee(e,[...s,...a]):e}function hc(e,t){return t.every(r=>un(e,r))}function yc(e,t){return Ve(te(e.name,()=>e.compute(t)))}f();c();p();d();m();function Br({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=Br({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function as({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Br({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=he(l);return os({result:a,modelName:g,select:u.select,omit:u.select?void 0:{...o?.[g],...u.omit},extensions:n})}})}f();c();p();d();m();f();c();p();d();m();function ls(e){if(e instanceof le)return wc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ls(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=fs(o,l),a.args=s,cs(e,a,r,n+1)}})})}function ps(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return cs(e,t,s)}function ds(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?ms(r,n,0,e):e(r)}}function ms(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=fs(i,l),ms(a,t,r+1,n)}})}var us=e=>e;function fs(e=us,t=us){return r=>e(t(r))}f();c();p();d();m();var gs=ee("prisma:client"),hs={Vercel:"vercel","Netlify CI":"netlify"};function ys({postinstall:e,ciName:t,clientVersion:r}){if(gs("checkPlatformCaching:postinstall",e),gs("checkPlatformCaching:ciName",t),e===!0&&t&&t in hs){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${hs[t]}-build`;throw console.error(n),new G(n,r)}}f();c();p();d();m();function ws(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var Ec="Cloudflare-Workers",bc="node";function Es(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Ec?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===bc?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var xc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function qn(){let e=Es();return{id:e,prettyName:xc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();function gt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw qn().id==="workerd"?new G(`error: Environment variable not found: ${s.fromEnvVar}. + +In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new G(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new G("error: Missing URL environment variable, value, or override.",n);return i}f();c();p();d();m();f();c();p();d();m();var Ur=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ie=class extends Ur{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();c();p();d();m();f();c();p();d();m();function L(e,t){return{...e,isRetryable:t}}var ht=class extends ie{constructor(r){super("This request must be retried",L(r,!0));this.name="ForcedRetryError";this.code="P5001"}};N(ht,"ForcedRetryError");f();c();p();d();m();var je=class extends ie{constructor(r,n){super(r,L(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};N(je,"InvalidDatasourceError");f();c();p();d();m();var Je=class extends ie{constructor(r,n){super(r,L(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};N(Je,"NotImplementedYetError");f();c();p();d();m();f();c();p();d();m();var j=class extends ie{constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var Ge=class extends j{constructor(r){super("Schema needs to be uploaded",L(r,!0));this.name="SchemaMissingError";this.code="P5005"}};N(Ge,"SchemaMissingError");f();c();p();d();m();f();c();p();d();m();var Bn="This request could not be understood by the server",Ht=class extends j{constructor(r,n,i){super(n||Bn,L(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};N(Ht,"BadRequestError");f();c();p();d();m();var Wt=class extends j{constructor(r,n){super("Engine not started: healthcheck timeout",L(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};N(Wt,"HealthcheckTimeoutError");f();c();p();d();m();var Kt=class extends j{constructor(r,n,i){super(n,L(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};N(Kt,"EngineStartupError");f();c();p();d();m();var zt=class extends j{constructor(r){super("Engine version is not supported",L(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};N(zt,"EngineVersionNotSupportedError");f();c();p();d();m();var Un="Request timed out",Yt=class extends j{constructor(r,n=Un){super(n,L(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};N(Yt,"GatewayTimeoutError");f();c();p();d();m();var Pc="Interactive transaction error",Zt=class extends j{constructor(r,n=Pc){super(n,L(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};N(Zt,"InteractiveTransactionError");f();c();p();d();m();var vc="Request parameters are invalid",Xt=class extends j{constructor(r,n=vc){super(n,L(r,!1));this.name="InvalidRequestError";this.code="P5011"}};N(Xt,"InvalidRequestError");f();c();p();d();m();var $n="Requested resource does not exist",er=class extends j{constructor(r,n=$n){super(n,L(r,!1));this.name="NotFoundError";this.code="P5003"}};N(er,"NotFoundError");f();c();p();d();m();var Vn="Unknown server error",yt=class extends j{constructor(r,n,i){super(n||Vn,L(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};N(yt,"ServerError");f();c();p();d();m();var jn="Unauthorized, check your connection string",tr=class extends j{constructor(r,n=jn){super(n,L(r,!1));this.name="UnauthorizedError";this.code="P5007"}};N(tr,"UnauthorizedError");f();c();p();d();m();var Jn="Usage exceeded, retry again later",rr=class extends j{constructor(r,n=Jn){super(n,L(r,!0));this.name="UsageExceededError";this.code="P5008"}};N(rr,"UsageExceededError");async function Tc(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function nr(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Tc(e);if(n.type==="QueryEngineError")throw new K(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new yt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ge(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new zt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Kt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new G(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Wt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Zt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Xt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new tr(r,wt(jn,n));if(e.status===404)return new er(r,wt($n,n));if(e.status===429)throw new rr(r,wt(Jn,n));if(e.status===504)throw new Yt(r,wt(Un,n));if(e.status>=500)throw new yt(r,wt(Vn,n));if(e.status>=400)throw new Ht(r,wt(Bn,n))}function wt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();c();p();d();m();function bs(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}f();c();p();d();m();var Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function xs(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,u,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,u=g&63,r+=Ce[s]+Ce[a]+Ce[l]+Ce[u];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Ce[s]+Ce[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Ce[s]+Ce[a]+Ce[l]+"="),r}f();c();p();d();m();function Ps(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new G("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}f();c();p();d();m();function Cc(e){return e[0]*1e3+e[1]/1e6}function vs(e){return new Date(Cc(e))}f();c();p();d();m();var Ts={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();c();p();d();m();f();c();p();d();m();var ir=class extends ie{constructor(r,n){super(`Cannot fetch data from service: +${r}`,L(n,!0));this.name="RequestError";this.code="P5010"}};N(ir,"RequestError");async function Qe(e,t,r=n=>n){let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Gn)(e,t)}catch(i){let o=i.message??"Unknown error";throw new ir(o,{clientVersion:n})}}function Rc(e){return{...e.headers,"Content-Type":"application/json"}}function Sc(e){return{method:e.method,headers:Rc(e)}}function Ic(e,t){return{text:()=>Promise.resolve(w.Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(w.Buffer.concat(e).toString())),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:new Qn(t.headers)}}async function Gn(e,t={}){let r=Oc("https"),n=Sc(t),i=[],{origin:o}=new URL(e);return new Promise((s,a)=>{let l=r.request(e,n,u=>{let{statusCode:g,headers:{location:h}}=u;g>=301&&g<=399&&h&&(h.startsWith("http")===!1?s(Gn(`${o}${h}`,t)):s(Gn(h,t))),u.on("data",v=>i.push(v)),u.on("end",()=>s(Ic(i,u))),u.on("error",a)});l.on("error",a),l.end(t.body??"")})}var Oc=typeof zr<"u"?zr:()=>{},Qn=class{constructor(t={}){this.headers=new Map;for(let[r,n]of Object.entries(t))if(typeof n=="string")this.headers.set(r,n);else if(Array.isArray(n))for(let i of n)this.headers.set(r,i)}append(t,r){this.headers.set(t,r)}delete(t){this.headers.delete(t)}get(t){return this.headers.get(t)??null}has(t){return this.headers.has(t)}set(t,r){this.headers.set(t,r)}forEach(t,r){for(let[n,i]of this.headers)t.call(r,i,n,this)}};var kc=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Cs=ee("prisma:client:dataproxyEngine");async function Dc(e,t){let r=Ts["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&kc.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=r.split("-")??[],[a,l,u]=s.split("."),g=Mc(`<=${a}.${l}.${u}`),h=await Qe(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let v=await h.text();Cs("length of body fetched from unpkg.com",v.length);let S;try{S=JSON.parse(v)}catch(A){throw console.error("JSON.parse error: body fetched from unpkg.com: ",v),A}return S.version}throw new Je("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function As(e,t){let r=await Dc(e,t);return Cs("version",r),r}function Mc(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Rs=3,Hn=ee("prisma:client:dataproxyEngine"),Wn=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},or=class{constructor(t){this.name="DataProxyEngine";Ps(t),this.config=t,this.env={...t.env,...typeof y<"u"?y.env:{}},this.inlineSchema=xs(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new Wn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await As(t,this.config),Hn("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let n=typeof r.attributes.query=="string"?r.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[i]=n.split("/* traceparent");n=i}this.logEmitter.emit("query",{query:n,timestamp:vs(r.timestamp),duration:Number(r.attributes.duration_ms),params:r.attributes.params,target:r.attributes.target})}}}),t?.traces?.length&&this.tracingHelper.createEngineSpan({span:!0,spans:t.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await Qe(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Hn("schema response status",r.status);let n=await nr(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Lr(t,n),{batchResult:a,elapsed:l}=await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r});return a.map(u=>"errors"in u&&u.errors.length>0?Jt(u.errors[0],this.clientVersion,this.config.activeProvider):{data:u,elapsed:l})}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await Qe(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Hn("graphql response status",a.status),await this.handleError(await nr(a,this.clientVersion));let l=await a.json(),u=l.extensions;if(u&&this.propagateResponseExtensions(u),l.errors)throw l.errors.length===1?Jt(l.errors[0],this.config.clientVersion,this.config.activeProvider):new se(l.errors,{clientVersion:this.config.clientVersion});return l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await Qe(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await nr(l,this.clientVersion));let u=await l.json(),g=u.extensions;g&&this.propagateResponseExtensions(g);let h=u.id,v=u["data-proxy"].endpoint;return{id:h,payload:{endpoint:v}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await Qe(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await nr(a,this.clientVersion));let u=(await a.json()).extensions;u&&this.propagateResponseExtensions(u);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=gt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new je(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:"&&o!=="prisma+postgres:")throw new je(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let l=a.get("api_key");if(l===null||l.length<1)throw new je(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,l]}metrics(){throw new Je("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof ie)||!i.isRetryable)throw i;if(r>=Rs)throw i instanceof ht?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Rs} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await bs(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof Ge)throw await this.uploadSchema(),new ht({clientVersion:this.clientVersion,cause:t});if(t)throw t}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Ss({copyEngine:e=!0},t){let r;try{r=gt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&gr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=Ct(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",l=i==="binary";if(o&&s||s){let u;throw u=["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."],new z(u.join(` +`),{clientVersion:t.clientVersion})}if(o)return new or(t);throw new z("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}f();c();p();d();m();function $r({generator:e}){return e?.previewFeatures??[]}f();c();p();d();m();var Is=e=>({command:e});f();c();p();d();m();f();c();p();d();m();var Os=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();c();p();d();m();function Et(e){try{return ks(e,"fast")}catch{return ks(e,"slow")}}function ks(e,t){return JSON.stringify(e.map(r=>Ms(r,t)))}function Ms(e,t){return Array.isArray(e)?e.map(r=>Ms(r,t)):typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:nt(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ve.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Nc(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Ns(e):e}function Nc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Ns(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ds);let t={};for(let r of Object.keys(e))t[r]=Ds(e[r]);return t}function Ds(e){return typeof e=="bigint"?e.toString():Ns(e)}f();c();p();d();m();var Fc=["$connect","$disconnect","$on","$transaction","$use","$extends"],Fs=Fc;var _c=/^(\s*alter\s)/i,_s=ee("prisma:client");function Kn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&_c.exec(t))throw new Error(`Running ALTER using ${n} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var zn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Bo(r))n=r.sql,i={values:Et(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Et(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Et(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Et(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Os(r),i={values:Et(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?_s(`prisma.${e}(${n}, ${i.values})`):_s(`prisma.${e}(${n})`),{query:n,parameters:i}},Ls={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new le(t,r)}},qs={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};f();c();p();d();m();function Yn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=Bs(r(o)):Bs(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Bs(e){return typeof e.then=="function"?e:Promise.resolve(e)}f();c();p();d();m();var Us={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Zn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??Us}};function $s(e){return e.includes("tracing")?new Zn:Us}f();c();p();d();m();function Vs(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}f();c();p();d();m();function js(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}f();c();p();d();m();var Vr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};f();c();p();d();m();var Qs=qe(Yi());f();c();p();d();m();function jr(e){return typeof e.batchRequestIdx=="number"}f();c();p();d();m();function Js(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Xn(e.query.arguments)),t.push(Xn(e.query.selection)),t.join("")}function Xn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Xn(n)})`:r}).join(" ")})`}f();c();p();d();m();var Lc={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function ei(e){return Lc[e]}f();c();p();d();m();var Jr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iHe("bigint",r));case"bytes-array":return t.map(r=>He("bytes",r));case"decimal-array":return t.map(r=>He("decimal",r));case"datetime-array":return t.map(r=>He("datetime",r));case"date-array":return t.map(r=>He("date",r));case"time-array":return t.map(r=>He("time",r));default:return t}}function Gs(e){let t=[],r=qc(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(h=>ei(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:Uc(o),containsWrite:u,customDataProxyFetch:i})).map((h,v)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[v],h)}catch(S){return S}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Hs(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ei(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Js(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Bc(t),$c(t,i)||t instanceof Se)throw t;if(t instanceof K&&Vc(t)){let u=Ws(t.meta);Dr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=ot({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new K(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Ie(l,this.client._clientVersion);if(t instanceof se)throw new se(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof G)throw new G(l,this.client._clientVersion);if(t instanceof Ie)throw new Ie(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Qs.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(u=>u!=="select"&&u!=="include"),a=Nn(o,s),l=i==="queryRaw"?Gs(a):It(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function Uc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Hs(e)};xe(e,"Unknown transaction kind")}}function Hs(e){return{id:e.id,payload:e.payload}}function $c(e,t){return jr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Vc(e){return e.code==="P2009"||e.code==="P2012"}function Ws(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Ws)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}f();c();p();d();m();var Ks="5.22.0";var zs=Ks;f();c();p();d();m();var ta=qe(wn());f();c();p();d();m();var B=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};N(B,"PrismaClientConstructorValidationError");var Ys=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Zs=["pretty","colorless","minimal"],Xs=["info","query","warn","error"],Jc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new B(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=bt(r,t)||` Available datasources: ${t.join(", ")}`;throw new B(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new B(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new B(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new B(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new B('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!$r(t).includes("driverAdapters"))throw new B('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Ct()==="binary")throw new B('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new B(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new B(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Zs.includes(e)){let t=bt(e,Zs);throw new B(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new B(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Xs.includes(r)){let n=bt(r,Xs);throw new B(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=bt(i,o);throw new B(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new B(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new B(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new B(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new B('"omit" option is expected to be an object.');if(e===null)throw new B('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Qc(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new B(Hc(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new B(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=bt(r,t);throw new B(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ra(e,t){for(let[r,n]of Object.entries(e)){if(!Ys.includes(r)){let i=bt(r,Ys);throw new B(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Jc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new B('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function bt(e,t){if(t.length===0||typeof e!="string")return"";let r=Gc(e,t);return r?` Did you mean "${r}"?`:""}function Gc(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,ta.default)(e,i)}));r.sort((i,o)=>i.distancert(n)===t);if(r)return e[r]}function Hc(e,t){let r=pt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=kr(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}f();c();p();d();m();function na(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=g,a()},g=>{if(!jr(g)){l(g);return}g.batchRequestIdx===u?l(g):(i||(i=g),a())})})}var _e=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Wc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Kc=Symbol.for("prisma.client.transaction.id"),zc={id:0,nextId(){return++this.id}};function Yc(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Vr;this._createPrismaPromise=Yn();this.$extends=is;e=n?.__internal?.configOverride?.(e)??e,ys(e),n&&ra(n,e);let i=new fr().on("error",()=>{});this._extensions=dt.empty(),this._previewFeatures=$r(e),this._clientVersion=e.clientVersion??zs,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=$s(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Tt.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Tt.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=Dn(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new G(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new G("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},g=u.debug===!0;g&&ee.enable("prisma:client");let h=Tt.resolve(e.dirname,e.relativePath);Ci.existsSync(h)||(h=e.dirname),_e("dirname",e.dirname),_e("relativePath",e.relativePath),_e("cwd",h);let v=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:v.allowTriggerPanic,datamodelPath:Tt.join(e.dirname,e.filename??"schema.prisma"),prismaPath:v.binaryPath??void 0,engineEndpoint:v.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&js(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(S=>typeof S=="string"?S==="query":S.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:ws(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:gt,getBatchRequestPayload:Lr,prismaGraphQLToJSError:Jt,PrismaClientUnknownRequestError:se,PrismaClientInitializationError:G,PrismaClientKnownRequestError:K,debug:ee("prisma:client:accelerateEngine"),engineVersion:oa.version,clientVersion:e.clientVersion}},_e("clientVersion",e.clientVersion),this._engine=Ss(e,this._engineConfig),this._requestHandler=new Gr(this,i),l.log)for(let S of l.log){let A=typeof S=="string"?S:S.emit==="stdout"?S.level:null;A&&this.$on(A,R=>{Rt.log(`${Rt.tags[A]??""}`,R.message||R.query)})}this._metrics=new $t(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Gt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Ui()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:zn({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ia(n,i);return Kn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new z("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Kn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new z(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Is,callsite:Fe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:zn({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ia(n,i));throw new z("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new z("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=zc.nextId(),s=Vs(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:u,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return na(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return Gt(Ee(ns(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>Yn(n)),te(Kc,()=>n.id),mt(Fs)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Wc,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,M=>g(u,F=>(M?.end(),l(F))));let{runInTransaction:h,args:v,...S}=u,A={...n,...S};v&&(A.args=i.middlewareArgsToRequestArgs(v)),n.transaction!==void 0&&h===!1&&delete A.transaction;let R=await ps(this,A);return A.model?as({result:R,modelName:A.model,args:A.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):R};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:g,unpacker:h,otelParentCtx:v,customDataProxyFetch:S}){try{n=u?u(n):n;let A={name:"serialize"},R=this._tracingHelper.runInChildSpan(A,()=>Cn({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return ee.enabled("prisma:client")&&(_e("Prisma Client call:"),_e(`prisma.${i}(${Qo(n)})`),_e("Generated request:"),_e(JSON.stringify(R,null,2)+` +`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:R,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:v,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:S})}catch(A){throw A.clientVersion=this._clientVersion,A}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new z("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function ia(e,t){return Zc(e)?[new le(e,t),Ls]:[e,qs]}function Zc(e){return Array.isArray(e)&&Array.isArray(e.raw)}f();c();p();d();m();var Xc=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function ep(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Xc.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}f();c();p();d();m();var export_warnEnvConflicts=void 0;export{Bi as Debug,ve as Decimal,Pi as Extensions,$t as MetricsClient,Se as NotFoundError,G as PrismaClientInitializationError,K as PrismaClientKnownRequestError,Ie as PrismaClientRustPanicError,se as PrismaClientUnknownRequestError,z as PrismaClientValidationError,Ti as Public,le as Sql,Vu as defineDmmfProperty,It as deserializeJsonResponse,$u as dmmfToRuntimeDataModel,zu as empty,Yc as getPrismaClient,qn as getRuntime,Ku as join,ep as makeStrictEnum,Ju as makeTypedQueryFactory,bn as objectEnumValues,Vo as raw,Cn as serializeJsonQuery,vn as skip,jo as sqltag,export_warnEnvConflicts as warnEnvConflicts,gr as warnOnce}; +//# sourceMappingURL=edge-esm.js.map diff --git a/apps/api/release/vendor/@prisma/client/runtime/edge.js b/apps/api/release/vendor/@prisma/client/runtime/edge.js new file mode 100644 index 0000000..f8010b0 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/edge.js @@ -0,0 +1,31 @@ +"use strict";var fa=Object.create;var cr=Object.defineProperty;var ga=Object.getOwnPropertyDescriptor;var ha=Object.getOwnPropertyNames;var ya=Object.getPrototypeOf,wa=Object.prototype.hasOwnProperty;var Se=(e,t)=>()=>(e&&(t=e(e=0)),t);var Le=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pr=(e,t)=>{for(var r in t)cr(e,r,{get:t[r],enumerable:!0})},oi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ha(t))!wa.call(e,i)&&i!==r&&cr(e,i,{get:()=>t[i],enumerable:!(n=ga(t,i))||n.enumerable});return e};var qe=(e,t,r)=>(r=e!=null?fa(ya(e)):{},oi(t||!e||!e.__esModule?cr(r,"default",{value:e,enumerable:!0}):r,e)),Ea=e=>oi(cr({},"__esModule",{value:!0}),e);var y,c=Se(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var b,p=Se(()=>{"use strict";b=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=Se(()=>{"use strict";E=()=>{};E.prototype=E});var m=Se(()=>{"use strict"});var Ti=Le(Ye=>{"use strict";f();c();p();d();m();var ci=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ba=ci(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=S;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var M=A.indexOf("=");M===-1&&(M=R);var F=M===R?0:4-M%4;return[M,F]}function l(A){var R=a(A),M=R[0],F=R[1];return(M+F)*3/4-F}function u(A,R,M){return(R+M)*3/4-M}function g(A){var R,M=a(A),F=M[0],q=M[1],D=new n(u(A,F,q)),I=0,ae=q>0?F-4:F,J;for(J=0;J>16&255,D[I++]=R>>8&255,D[I++]=R&255;return q===2&&(R=r[A.charCodeAt(J)]<<2|r[A.charCodeAt(J+1)]>>4,D[I++]=R&255),q===1&&(R=r[A.charCodeAt(J)]<<10|r[A.charCodeAt(J+1)]<<4|r[A.charCodeAt(J+2)]>>2,D[I++]=R>>8&255,D[I++]=R&255),D}function h(A){return t[A>>18&63]+t[A>>12&63]+t[A>>6&63]+t[A&63]}function v(A,R,M){for(var F,q=[],D=R;Dae?ae:I+D));return F===1?(R=A[M-1],q.push(t[R>>2]+t[R<<4&63]+"==")):F===2&&(R=(A[M-2]<<8)+A[M-1],q.push(t[R>>10]+t[R>>4&63]+t[R<<2&63]+"=")),q.join("")}}),xa=ci(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,v=n?o-1:0,S=n?-1:1,A=t[r+v];for(v+=S,s=A&(1<<-h)-1,A>>=-h,h+=l;h>0;s=s*256+t[r+v],v+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+v],v+=S,h-=8);if(s===0)s=1-g;else{if(s===u)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(A?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,u,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=i?0:s-1,R=i?1:-1,M=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+v>=1?r+=S/u:r+=S*Math.pow(2,1-v),r*u>=2&&(a++,u/=2),a+v>=h?(l=0,a=h):a+v>=1?(l=(r*u-1)*Math.pow(2,o),a=a+v):(l=r*Math.pow(2,v-1)*Math.pow(2,o),a=0));o>=8;t[n+A]=l&255,A+=R,l/=256,o-=8);for(a=a<0;t[n+A]=a&255,A+=R,a/=256,g-=8);t[n+A-R]|=M*128}}),tn=ba(),Ke=xa(),si=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ye.Buffer=T;Ye.SlowBuffer=Ra;Ye.INSPECT_MAX_BYTES=50;var dr=2147483647;Ye.kMaxLength=dr;T.TYPED_ARRAY_SUPPORT=Pa();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Pa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function xe(e){if(e>dr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return on(e)}return pi(e,t,r)}T.poolSize=8192;function pi(e,t,r){if(typeof e=="string")return Ta(e,t);if(ArrayBuffer.isView(e))return Ca(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(de(e,ArrayBuffer)||e&&de(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(de(e,SharedArrayBuffer)||e&&de(e.buffer,SharedArrayBuffer)))return mi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=Aa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return pi(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function di(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function va(e,t,r){return di(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}T.alloc=function(e,t,r){return va(e,t,r)};function on(e){return di(e),xe(e<0?0:sn(e)|0)}T.allocUnsafe=function(e){return on(e)};T.allocUnsafeSlow=function(e){return on(e)};function Ta(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=fi(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function rn(e){let t=e.length<0?0:sn(e.length)|0,r=xe(t);for(let n=0;n=dr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+dr.toString(16)+" bytes");return e|0}function Ra(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(de(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),de(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function fi(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||de(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return nn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return vi(e).length;default:if(i)return n?-1:nn(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=fi;function Sa(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return qa(this,t,r);case"utf8":case"utf-8":return hi(this,t,r);case"ascii":return _a(this,t,r);case"latin1":case"binary":return La(this,t,r);case"base64":return Na(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ba(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Be(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};si&&(T.prototype[si]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(de(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,ln(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:ai(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):ai(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function ai(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let u;if(i){let g=-1;for(u=r;us&&(r=s-a),u=r;u>=0;u--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Ia(this,e,t,r);case"utf8":case"utf-8":return Oa(this,e,t,r);case"ascii":case"latin1":case"binary":return ka(this,e,t,r);case"base64":return Da(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ma(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Na(e,t,r){return t===0&&r===e.length?tn.fromByteArray(e):tn.fromByteArray(e.slice(t,r))}function hi(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,u,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(h=(o&15)<<12|(l&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],u=e[i+2],g=e[i+3],(l&192)===128&&(u&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(u&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Fa(n)}var li=4096;function Fa(e){let t=e.length;if(t<=li)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||H(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||H(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||H(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||H(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Ie(function(e){e=e>>>0,ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||H(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||H(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||H(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||H(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||H(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||H(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Ie(function(e){e=e>>>0,ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,ze(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||H(e,4,this.length),Ke.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||H(e,4,this.length),Ke.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||H(e,8,this.length),Ke.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||H(e,8,this.length),Ke.read(this,e,!1,52,8)};function re(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;re(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function yi(e,t,r,n,i){Pi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function wi(e,t,r,n,i){Pi(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=Ie(function(e,t=0){return yi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Ie(function(e,t=0){return wi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);re(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||re(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=Ie(function(e,t=0){return yi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Ie(function(e,t=0){return wi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ei(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function bi(e,t,r,n,i){return t=+t,r=r>>>0,i||Ei(e,t,r,4,34028234663852886e22,-34028234663852886e22),Ke.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return bi(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return bi(this,e,t,!1,r)};function xi(e,t,r,n,i){return t=+t,r=r>>>0,i||Ei(e,t,r,8,17976931348623157e292,-17976931348623157e292),Ke.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return xi(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return xi(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ui(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ui(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ui(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ua(e,t,r){ze(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Tt(t,e.length-(r+1))}function Pi(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new We.ERR_OUT_OF_RANGE("value",a,e)}Ua(n,i,o)}function ze(e,t){if(typeof e!="number")throw new We.ERR_INVALID_ARG_TYPE(t,"number",e)}function Tt(e,t,r){throw Math.floor(e)!==e?(ze(e,r),new We.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new We.ERR_BUFFER_OUT_OF_BOUNDS:new We.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var $a=/[^+/0-9A-Za-z-_]/g;function Va(e){if(e=e.split("=")[0],e=e.trim().replace($a,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function nn(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function ja(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function vi(e){return tn.toByteArray(Va(e))}function mr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function de(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function ln(e){return e!==e}var Ga=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Ie(e){return typeof BigInt>"u"?Qa:e}function Qa(){throw new Error("BigInt not supported")}});var w,f=Se(()=>{"use strict";w=qe(Ti())});function Ha(){return!1}var Wa,Ka,Si,Ii=Se(()=>{"use strict";f();c();p();d();m();Wa={},Ka={existsSync:Ha,promises:Wa},Si=Ka});function tl(...e){return e.join("/")}function rl(...e){return e.join("/")}var ji,nl,il,At,Ji=Se(()=>{"use strict";f();c();p();d();m();ji="/",nl={sep:ji},il={resolve:tl,posix:nl,join:rl,sep:ji},At=il});var yr,Qi=Se(()=>{"use strict";f();c();p();d();m();yr=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Wi=Le((hm,Hi)=>{"use strict";f();c();p();d();m();Hi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Yi=Le((Sm,zi)=>{"use strict";f();c();p();d();m();zi.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Xi=Le((Nm,Zi)=>{"use strict";f();c();p();d();m();var cl=Yi();Zi.exports=e=>typeof e=="string"?e.replace(cl(),""):e});var Tn=Le((Ih,yo)=>{"use strict";f();c();p();d();m();yo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{Xu.exports={name:"@prisma/engines-version",version:"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"605197351a3c8bdd595af2d2a9bc3025bca48ea2"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.34",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Qo=Le(()=>{"use strict";f();c();p();d();m()});var rp={};pr(rp,{Debug:()=>mn,Decimal:()=>fe,Extensions:()=>un,MetricsClient:()=>ft,NotFoundError:()=>ve,PrismaClientInitializationError:()=>G,PrismaClientKnownRequestError:()=>W,PrismaClientRustPanicError:()=>Te,PrismaClientUnknownRequestError:()=>ne,PrismaClientValidationError:()=>K,Public:()=>cn,Sql:()=>oe,defineDmmfProperty:()=>Vo,deserializeJsonResponse:()=>rt,dmmfToRuntimeDataModel:()=>$o,empty:()=>Wo,getPrismaClient:()=>pa,getRuntime:()=>Gr,join:()=>Ho,makeStrictEnum:()=>da,makeTypedQueryFactory:()=>jo,objectEnumValues:()=>Dr,raw:()=>_n,serializeJsonQuery:()=>qr,skip:()=>Lr,sqltag:()=>Ln,warnEnvConflicts:()=>void 0,warnOnce:()=>Ot});module.exports=Ea(rp);f();c();p();d();m();var un={};pr(un,{defineExtension:()=>Ci,getExtensionContext:()=>Ai});f();c();p();d();m();f();c();p();d();m();function Ci(e){return typeof e=="function"?e:t=>t.$extends(e)}f();c();p();d();m();function Ai(e){return e}var cn={};pr(cn,{validator:()=>Ri});f();c();p();d();m();f();c();p();d();m();function Ri(...e){return t=>t}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var pn,Oi,ki,Di,Mi=!0;typeof y<"u"&&({FORCE_COLOR:pn,NODE_DISABLE_COLORS:Oi,NO_COLOR:ki,TERM:Di}=y.env||{},Mi=y.stdout&&y.stdout.isTTY);var za={enabled:!Oi&&ki==null&&Di!=="dumb"&&(pn!=null&&pn!=="0"||Mi)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!za.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Xp=V(0,0),fr=V(1,22),gr=V(2,22),ed=V(3,23),Ni=V(4,24),td=V(7,27),rd=V(8,28),nd=V(9,29),id=V(30,39),Ze=V(31,39),Fi=V(32,39),_i=V(33,39),Li=V(34,39),od=V(35,39),qi=V(36,39),sd=V(37,39),Bi=V(90,39),ad=V(90,39),ld=V(40,49),ud=V(41,49),cd=V(42,49),pd=V(43,49),dd=V(44,49),md=V(45,49),fd=V(46,49),gd=V(47,49);f();c();p();d();m();var Ya=100,Ui=["green","yellow","blue","magenta","cyan","red"],hr=[],$i=Date.now(),Za=0,dn=typeof y<"u"?y.env:{};globalThis.DEBUG??=dn.DEBUG??"";globalThis.DEBUG_COLORS??=dn.DEBUG_COLORS?dn.DEBUG_COLORS==="true":!0;var Ct={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Xa(e){let t={color:Ui[Za++%Ui.length],enabled:Ct.enabled(e),namespace:e,log:Ct.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&hr.push([o,...n]),hr.length>Ya&&hr.shift(),Ct.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:el(g)),u=`+${Date.now()-$i}ms`;$i=Date.now(),a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var mn=new Proxy(Xa,{get:(e,t)=>Ct[t],set:(e,t,r)=>Ct[t]=r});function el(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Vi(){hr.length=0}var ee=mn;f();c();p();d();m();f();c();p();d();m();var Gi="library";function Rt(e){let t=ol();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":Gi)}function ol(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}f();c();p();d();m();f();c();p();d();m();var Ue;(t=>{let e;(I=>(I.findUnique="findUnique",I.findUniqueOrThrow="findUniqueOrThrow",I.findFirst="findFirst",I.findFirstOrThrow="findFirstOrThrow",I.findMany="findMany",I.create="create",I.createMany="createMany",I.createManyAndReturn="createManyAndReturn",I.update="update",I.updateMany="updateMany",I.upsert="upsert",I.delete="delete",I.deleteMany="deleteMany",I.groupBy="groupBy",I.count="count",I.aggregate="aggregate",I.findRaw="findRaw",I.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(Ue||={});var It={};pr(It,{error:()=>ll,info:()=>al,log:()=>sl,query:()=>ul,should:()=>Ki,tags:()=>St,warn:()=>fn});f();c();p();d();m();var St={error:Ze("prisma:error"),warn:_i("prisma:warn"),info:qi("prisma:info"),query:Li("prisma:query")},Ki={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function sl(...e){console.log(...e)}function fn(e,...t){Ki.warn()&&console.warn(`${St.warn} ${e}`,...t)}function al(e,...t){console.info(`${St.info} ${e}`,...t)}function ll(e,...t){console.error(`${St.error} ${e}`,...t)}function ul(e,...t){console.log(`${St.query} ${e}`,...t)}f();c();p();d();m();function Pe(e,t){throw new Error(t)}f();c();p();d();m();function gn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}f();c();p();d();m();var hn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});f();c();p();d();m();function Xe(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}f();c();p();d();m();function yn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{eo.has(e)||(eo.add(e),fn(t,...r))};f();c();p();d();m();var W=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};N(W,"PrismaClientKnownRequestError");var ve=class extends W{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};N(ve,"NotFoundError");f();c();p();d();m();var G=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};N(G,"PrismaClientInitializationError");f();c();p();d();m();var Te=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};N(Te,"PrismaClientRustPanicError");f();c();p();d();m();var ne=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};N(ne,"PrismaClientUnknownRequestError");f();c();p();d();m();var K=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};N(K,"PrismaClientValidationError");f();c();p();d();m();f();c();p();d();m();var et=9e15,Me=1e9,wn="0123456789abcdef",Er="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",br="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",En={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-et,maxE:et,crypto:!1},oo,Ce,_=!0,Pr="[DecimalError] ",De=Pr+"Invalid argument: ",so=Pr+"Precision limit exceeded",ao=Pr+"crypto unavailable",lo="[object Decimal]",X=Math.floor,Q=Math.pow,pl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,dl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,ml=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,uo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,k=7,fl=9007199254740991,gl=Er.length-1,bn=br.length-1,C={toStringTag:lo};C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),O(e)};C.ceil=function(){return O(new this.constructor(this),this.e+1,2)};C.clampedTo=C.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(De+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};C.comparedTo=C.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};C.cosine=C.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+k,n.rounding=1,r=hl(n,go(n,r)),n.precision=e,n.rounding=t,O(Ce==2||Ce==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};C.cubeRoot=C.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(_=!1,o=g.s*Q(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Y(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=Q(r,1/3),e=X((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(g),n=U(u.plus(g).times(a),u.plus(l),s+2,1),Y(a.d).slice(0,s)===(r=Y(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(O(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(O(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return _=!0,O(n,e,h.rounding,t)};C.decimalPlaces=C.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-X(this.e/k))*k,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};C.dividedBy=C.div=function(e){return U(this,new this.constructor(e))};C.dividedToIntegerBy=C.divToInt=function(e){var t=this,r=t.constructor;return O(U(t,new r(e),0,1,1),r.precision,r.rounding)};C.equals=C.eq=function(e){return this.cmp(e)===0};C.floor=function(){return O(new this.constructor(this),this.e+1,3)};C.greaterThan=C.gt=function(e){return this.cmp(e)>0};C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return t==1||t===0};C.hyperbolicCosine=C.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Tr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=tt(s,1,o.times(t),new s(1),!0);for(var l,u=e,g=new s(8);u--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return O(o,s.precision=r,s.rounding=n,!0)};C.hyperbolicSine=C.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=tt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Tr(5,e)),i=tt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,O(i,t,r,!0)};C.hyperbolicTangent=C.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,U(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};C.inverseCosine=C.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?ce(r,i,o):new r(0):new r(NaN):t.isZero()?ce(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=ce(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};C.inverseHyperbolicCosine=C.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,_=!1,r=r.times(r).minus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};C.inverseHyperbolicSine=C.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,_=!1,r=r.times(r).plus(1).sqrt().plus(r),_=!0,n.precision=e,n.rounding=t,r.ln())};C.inverseHyperbolicTangent=C.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?O(new o(i),e,t,!0):(o.precision=r=n-i.e,i=U(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};C.inverseSine=C.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ce(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};C.inverseTangent=C.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,v=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=bn)return s=ce(g,h+4,v).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=bn)return s=ce(g,h+4,v).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/k+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(_=!1,t=Math.ceil(a/k),n=1,l=u.times(u),s=new g(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};C.isNaN=function(){return!this.s};C.isNegative=C.isNeg=function(){return this.s<0};C.isPositive=C.isPos=function(){return this.s>0};C.isZero=function(){return!!this.d&&this.d[0]===0};C.lessThan=C.lt=function(e){return this.cmp(e)<0};C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1};C.logarithm=C.log=function(e){var t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,v=g.rounding,S=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new g(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(_=!1,a=h+S,s=ke(u,a),n=t?xr(g,a+10):ke(e,a),l=U(s,n,a,1),kt(l.d,i=h,v))do if(a+=10,s=ke(u,a),n=t?xr(g,a+10):ke(e,a),l=U(s,n,a,1),!o){+Y(l.d).slice(i+1,i+15)+1==1e14&&(l=O(l,h+1,0));break}while(kt(l.d,i+=10,v));return _=!0,O(l,h,v)};C.minus=C.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,S=this,A=S.constructor;if(e=new A(e),!S.d||!e.d)return!S.s||!e.s?e=new A(NaN):S.d?e.s=-e.s:e=new A(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(u=S.d,v=e.d,a=A.precision,l=A.rounding,!u[0]||!v[0]){if(v[0])e.s=-e.s;else if(u[0])e=new A(S);else return new A(l===3?-0:0);return _?O(e,a,l):e}if(r=X(e.e/k),g=X(S.e/k),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=v.length):(t=v,r=g,s=u.length),n=Math.max(Math.ceil(a/k),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=v.length,h=n0;--n)u[s++]=0;for(n=v.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=g.length,s-i<0&&(i=s,r=g,g=u,u=r),t=0;i;)t=(u[--i]=u[i]+g[i]+t)/pe|0,u[i]%=pe;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=vr(u,n),_?O(e,a,l):e};C.precision=C.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(De+e);return r.d?(t=co(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};C.round=function(){var e=this,t=e.constructor;return O(new t(e),e.e+1,t.rounding)};C.sine=C.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+k,n.rounding=1,r=wl(n,go(n,r)),n.precision=e,n.rounding=t,O(Ce>2?r.neg():r,e,t,!0)):new n(NaN)};C.squareRoot=C.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,g=s.constructor;if(u!==1||!a||!a[0])return new g(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(_=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=Y(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=X((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(u.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(U(s,o,r+2,1)).times(.5),Y(o.d).slice(0,r)===(t=Y(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(O(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(O(n,l+1,1),e=!n.times(n).eq(s));break}return _=!0,O(n,l,g.rounding,e)};C.tangent=C.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=U(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,O(Ce==2||Ce==4?r.neg():r,e,t,!0)):new n(NaN)};C.times=C.mul=function(e){var t,r,n,i,o,s,a,l,u,g=this,h=g.constructor,v=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!v||!v[0]||!S||!S[0])return new h(!e.s||v&&!v[0]&&!S||S&&!S[0]&&!v?NaN:!v||!S?e.s/0:e.s*0);for(r=X(g.e/k)+X(e.e/k),l=v.length,u=S.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+S[n]*v[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=vr(o,r),_?O(e,h.precision,h.rounding):e};C.toBinary=function(e,t){return vn(this,2,e,t)};C.toDecimalPlaces=C.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ie(e,0,Me),t===void 0?t=n.rounding:ie(t,0,8),O(r,e+r.e+1,t))};C.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=me(n,!0):(ie(e,0,Me),t===void 0?t=i.rounding:ie(t,0,8),n=O(new i(n),e+1,t),r=me(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=me(i):(ie(e,0,Me),t===void 0?t=o.rounding:ie(t,0,8),n=O(new o(i),e+i.e+1,t),r=me(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};C.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,S=this,A=S.d,R=S.constructor;if(!A)return new R(S);if(u=r=new R(1),n=l=new R(0),t=new R(n),o=t.e=co(A)-S.e-1,s=o%k,t.d[0]=Q(10,s<0?k+s:s),e==null)e=o>0?t:u;else{if(a=new R(e),!a.isInt()||a.lt(u))throw Error(De+a);e=a.gt(t)?o>0?t:u:a}for(_=!1,a=new R(Y(A)),g=R.precision,R.precision=o=A.length*k*2;h=U(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=U(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=S.s,v=U(u,n,o,1).minus(S).abs().cmp(U(l,r,o,1).minus(S).abs())<1?[u,n]:[l,r],R.precision=g,_=!0,v};C.toHexadecimal=C.toHex=function(e,t){return vn(this,16,e,t)};C.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ie(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(_=!1,r=U(r,e,0,t,1).times(e),_=!0,O(r)):(e.s=r.s,r=e),r};C.toNumber=function(){return+this};C.toOctal=function(e,t){return vn(this,8,e,t)};C.toPower=C.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(Q(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return O(a,n,o);if(t=X(e.e/k),t>=e.d.length-1&&(r=u<0?-u:u)<=fl)return i=po(l,a,r,n),e.s<0?new l(1).div(i):O(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(_=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=xn(e.times(ke(a,n+r)),n),i.d&&(i=O(i,n+5,1),kt(i.d,n,o)&&(t=n+10,i=O(xn(e.times(ke(a,t+r)),t),t+5,1),+Y(i.d).slice(n+1,n+15)+1==1e14&&(i=O(i,n+1,0)))),i.s=s,_=!0,l.rounding=o,O(i,n,o))};C.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=me(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ie(e,1,Me),t===void 0?t=i.rounding:ie(t,0,8),n=O(new i(n),e,t),r=me(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};C.toSignificantDigits=C.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ie(e,1,Me),t===void 0?t=n.rounding:ie(t,0,8)),O(new n(r),e,t)};C.toString=function(){var e=this,t=e.constructor,r=me(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};C.truncated=C.trunc=function(){return O(new this.constructor(this),this.e+1,1)};C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,r=me(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Y(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(De+e)}function kt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=k,i=0):(i=Math.ceil((t+1)/k),t%=k),o=Q(10,k-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==Q(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==Q(10,t-3)-1,s}function wr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function hl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Tr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=tt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var U=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,g,h,v,S,A,R,M,F,q,D,I,ae,J,Zr,ar,vt,Xr,ue,lr,ur=n.constructor,en=n.s==i.s?1:-1,Z=n.d,$=i.d;if(!Z||!Z[0]||!$||!$[0])return new ur(!n.s||!i.s||(Z?$&&Z[0]==$[0]:!$)?NaN:Z&&Z[0]==0||!$?en*0:en/0);for(l?(S=1,g=n.e-i.e):(l=pe,S=k,g=X(n.e/S)-X(i.e/S)),ue=$.length,vt=Z.length,F=new ur(en),q=F.d=[],h=0;$[h]==(Z[h]||0);h++);if($[h]>(Z[h]||0)&&g--,o==null?(J=o=ur.precision,s=ur.rounding):a?J=o+(n.e-i.e)+1:J=o,J<0)q.push(1),A=!0;else{if(J=J/S+2|0,h=0,ue==1){for(v=0,$=$[0],J++;(h1&&($=e($,v,l),Z=e(Z,v,l),ue=$.length,vt=Z.length),ar=ue,D=Z.slice(0,ue),I=D.length;I=l/2&&++Xr;do v=0,u=t($,D,ue,I),u<0?(ae=D[0],ue!=I&&(ae=ae*l+(D[1]||0)),v=ae/Xr|0,v>1?(v>=l&&(v=l-1),R=e($,v,l),M=R.length,I=D.length,u=t(R,D,M,I),u==1&&(v--,r(R,ue=10;v/=10)h++;F.e=h+g*S-1,O(F,a?o+F.e+1:o,s,A)}return F}}();function O(e,t,r,n){var i,o,s,a,l,u,g,h,v,S=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=k,s=t,g=h[v=0],l=g/Q(10,i-s-1)%10|0;else if(v=Math.ceil((o+1)/k),a=h.length,v>=a)if(n){for(;a++<=v;)h.push(0);g=l=0,i=1,o%=k,s=o-k+1}else break e;else{for(g=a=h[v],i=1;a>=10;a/=10)i++;o%=k,s=o-k+i,l=s<0?0:g/Q(10,i-s-1)%10|0}if(n=n||t<0||h[v+1]!==void 0||(s<0?g:g%Q(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/Q(10,i-s):0:h[v-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=Q(10,(k-t%k)%k),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=v,a=1,v--):(h.length=v+1,a=Q(10,k-o),h[v]=s>0?(g/Q(10,i-s)%Q(10,s)|0)*a:0),u)for(;;)if(v==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[v]+=a,h[v]!=pe)break;h[v--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return _&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Oe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Oe(-i-1)+o,r&&(n=r-s)>0&&(o+=Oe(n))):i>=s?(o+=Oe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Oe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Oe(n))),o}function vr(e,t){var r=e[0];for(t*=k;r>=10;r/=10)t++;return t}function xr(e,t,r){if(t>gl)throw _=!0,r&&(e.precision=r),Error(so);return O(new e(Er),t,1,!0)}function ce(e,t,r){if(t>bn)throw Error(so);return O(new e(br),t,r,!0)}function co(e){var t=e.length-1,r=t*k+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Oe(e){for(var t="";e--;)t+="0";return t}function po(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/k+4);for(_=!1;;){if(r%2&&(o=o.times(t),no(o.d,s)&&(i=!0)),r=X(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),no(t.d,s)}return _=!0,o}function ro(e){return e.d[e.d.length-1]&1}function mo(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new v(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(_=!1,l=A):l=t,a=new v(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(Q(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new v(1),v.precision=l;;){if(o=O(o.times(e),l,1),r=r.times(++g),a=s.plus(U(o,r,l,1)),Y(a.d).slice(0,l)===Y(s.d).slice(0,l)){for(i=h;i--;)s=O(s.times(s),l,1);if(t==null)if(u<3&&kt(s.d,l-n,S,u))v.precision=l+=10,r=o=a=new v(1),g=0,u++;else return O(s,v.precision=A,S,_=!0);else return v.precision=A,s}s=a}}function ke(e,t){var r,n,i,o,s,a,l,u,g,h,v,S=1,A=10,R=e,M=R.d,F=R.constructor,q=F.rounding,D=F.precision;if(R.s<0||!M||!M[0]||!R.e&&M[0]==1&&M.length==1)return new F(M&&!M[0]?-1/0:R.s!=1?NaN:M?0:R);if(t==null?(_=!1,g=D):g=t,F.precision=g+=A,r=Y(M),n=r.charAt(0),Math.abs(o=R.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=Y(R.d),n=r.charAt(0),S++;o=R.e,n>1?(R=new F("0."+r),o++):R=new F(n+"."+r.slice(1))}else return u=xr(F,g+2,D).times(o+""),R=ke(new F(n+"."+r.slice(1)),g-A).plus(u),F.precision=D,t==null?O(R,D,q,_=!0):R;for(h=R,l=s=R=U(R.minus(1),R.plus(1),g,1),v=O(R.times(R),g,1),i=3;;){if(s=O(s.times(v),g,1),u=l.plus(U(s,new F(i),g,1)),Y(u.d).slice(0,g)===Y(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(xr(F,g+2,D).times(o+""))),l=U(l,new F(S),g,1),t==null)if(kt(l.d,g-A,q,a))F.precision=g+=A,u=s=R=U(h.minus(1),h.plus(1),g,1),v=O(R.times(R),g,1),i=a=1;else return O(l,F.precision=D,q,_=!0);else return F.precision=D,l;l=u,i+=2}}function fo(e){return String(e.s*e.s/0)}function Pn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%k,r<0&&(n+=k),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),uo.test(t))return Pn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(dl.test(t))r=16,t=t.toLowerCase();else if(pl.test(t))r=2;else if(ml.test(t))r=8;else throw Error(De+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=po(n,new n(r),o,o*2)),u=wr(t,r,pe),g=u.length-1,o=g;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=vr(u,g),e.d=u,_=!1,s&&(e=U(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?Q(2,l):$e.pow(2,l))),_=!0,e)}function wl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:tt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Tr(5,r)),t=tt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function tt(e,t,r,n,i){var o,s,a,l,u=1,g=e.precision,h=Math.ceil(g/k);for(_=!1,l=r.times(r),a=new e(n);;){if(s=U(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=U(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return _=!0,s.d.length=h+1,s}function Tr(e,t){for(var r=e;--t;)r*=e;return r}function go(e,t){var r,n=t.s<0,i=ce(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Ce=n?4:1,t;if(r=t.divToInt(i),r.isZero())Ce=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Ce=ro(r)?n?2:3:n?4:1,t;Ce=ro(r)?n?1:4:n?3:2}return t.minus(i).abs()}function vn(e,t,r,n){var i,o,s,a,l,u,g,h,v,S=e.constructor,A=r!==void 0;if(A?(ie(r,1,Me),n===void 0?n=S.rounding:ie(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=fo(e);else{for(g=me(e),s=g.indexOf("."),A?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),v=new S(1),v.e=g.length-s,v.d=wr(me(v),10,i),v.e=v.d.length),h=wr(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=A?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=U(e,v,r,n,0,i),h=e.d,o=e.e,u=oo),s=h[r],a=i/2,u=u||h[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,u)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=wr(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function El(e){return new this(e).abs()}function bl(e){return new this(e).acos()}function xl(e){return new this(e).acosh()}function Pl(e,t){return new this(e).plus(t)}function vl(e){return new this(e).asin()}function Tl(e){return new this(e).asinh()}function Cl(e){return new this(e).atan()}function Al(e){return new this(e).atanh()}function Rl(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ce(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ce(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ce(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(U(e,t,o,1)),t=ce(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(U(e,t,o,1)),r}function Sl(e){return new this(e).cbrt()}function Il(e){return O(e=new this(e),e.e+1,2)}function Ol(e,t,r){return new this(e).clamp(t,r)}function kl(e){if(!e||typeof e!="object")throw Error(Pr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Me,"rounding",0,8,"toExpNeg",-et,0,"toExpPos",0,et,"maxE",0,et,"minE",-et,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(De+r+": "+n);if(r="crypto",i&&(this[r]=En[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(ao);else this[r]=!1;else throw Error(De+r+": "+n);return this}function Dl(e){return new this(e).cos()}function Ml(e){return new this(e).cosh()}function ho(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,io(o)){u.s=o.s,_?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;_?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(ao);else for(;o=10;i/=10)n++;ne.highlight()},lu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function uu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function cu({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],l=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)),t&&a.push(s.underline(pu(t))),i){a.push("");let u=[i.toString()];o&&(u.push(o),u.push(s.dim(")"))),a.push(u.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function pu(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function st(e){let t=e.showColors?au:lu,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=uu(e),cu(r,t)}f();c();p();d();m();var vo=qe(Tn());f();c();p();d();m();function bo(e,t,r){let n=xo(e),i=du(n),o=fu(i);o?Ar(o,t,r):t.addErrorMessage(()=>"Unknown error")}function xo(e){return e.errors.flatMap(t=>t.kind==="Union"?xo(t):[t])}function du(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:mu(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function mu(e,t){return[...new Set(e.concat(t))]}function fu(e){return yn(e,(t,r)=>{let n=wo(t),i=wo(r);return n!==i?n-i:Eo(t)-Eo(r)})}function wo(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Eo(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}f();c();p();d();m();var le=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};f();c();p();d();m();f();c();p();d();m();var at=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};f();c();p();d();m();f();c();p();d();m();var Rr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};f();c();p();d();m();var Sr=e=>e,Ir={bold:Sr,red:Sr,green:Sr,dim:Sr,enabled:!1},Po={bold:fr,red:Ze,green:Fi,dim:gr,enabled:!0},lt={write(e){e.writeLine(",")}};f();c();p();d();m();var ge=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};f();c();p();d();m();var Ne=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var ut=class extends Ne{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Rr(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new ge("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(lt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var ct=class e extends Ne{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof ut&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new ge("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(lt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};f();c();p();d();m();var z=class extends Ne{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new ge(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};f();c();p();d();m();var Dt=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(lt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Ar(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":hu(e,t);break;case"IncludeOnScalar":yu(e,t);break;case"EmptySelection":wu(e,t,r);break;case"UnknownSelectionField":Pu(e,t);break;case"InvalidSelectionValue":vu(e,t);break;case"UnknownArgument":Tu(e,t);break;case"UnknownInputField":Cu(e,t);break;case"RequiredArgumentMissing":Au(e,t);break;case"InvalidArgumentType":Ru(e,t);break;case"InvalidArgumentValue":Su(e,t);break;case"ValueTooLarge":Iu(e,t);break;case"SomeFieldsMissing":Ou(e,t);break;case"TooManyFieldsGiven":ku(e,t);break;case"Union":bo(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function hu(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function yu(e,t){let[r,n]=Mt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new le(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${Nt(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function wu(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Eu(e,t,i);return}if(n.hasField("select")){bu(e,t);return}}if(r?.[nt(e.outputType.name)]){xu(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Eu(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new le(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function bu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Ao(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Nt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function xu(e,t){let r=new Dt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new le("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=Mt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new ct;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Pu(e,t){let r=Ro(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Ao(n,e.outputType);break;case"include":Du(n,e.outputType);break;case"omit":Mu(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(Nt(n)),i.join(" ")})}function vu(e,t){let r=Ro(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Tu(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Nu(n,e.arguments)),t.addErrorMessage(i=>To(i,r,e.arguments.map(o=>o.name)))}function Cu(e,t){let[r,n]=Mt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&So(o,e.inputType)}t.addErrorMessage(o=>To(o,n,e.inputType.fields.map(s=>s.name)))}function To(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=_u(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Nt(e)),n.join(" ")}function Au(e,t){let r;t.addErrorMessage(l=>r?.value instanceof z&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Mt(e.argumentPath),s=new Dt,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new le(o,s).makeRequired())}else{let l=e.inputTypes.map(Co).join(" | ");a.addSuggestion(new le(o,l).makeRequired())}}function Co(e){return e.kind==="list"?`${Co(e.elementType)}[]`:e.name}function Ru(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Or("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Su(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Or("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Iu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof z&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Ou(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&So(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Or("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(Nt(i)),o.join(" ")})}function ku(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Or("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Ao(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function Du(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function Mu(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function Nu(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function Ro(e,t){let[r,n]=Mt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function So(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function Mt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Nt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Or(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Fu=3;function _u(e,t){let r=1/0,n;for(let i of t){let o=(0,vo.default)(e,i);o>Fu||o`}};function pt(e){return e instanceof Ft}f();c();p();d();m();var kr=Symbol(),Cn=new WeakMap,Ae=class{constructor(t){t===kr?Cn.set(this,`Prisma.${this._getName()}`):Cn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Cn.get(this)}},_t=class extends Ae{_getNamespace(){return"NullTypes"}},Lt=class extends _t{};An(Lt,"DbNull");var qt=class extends _t{};An(qt,"JsonNull");var Bt=class extends _t{};An(Bt,"AnyNull");var Dr={classes:{DbNull:Lt,JsonNull:qt,AnyNull:Bt},instances:{DbNull:new Lt(kr),JsonNull:new qt(kr),AnyNull:new Bt(kr)}};function An(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}f();c();p();d();m();var Oo=": ",Mr=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Oo.length}write(t){let r=new ge(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Oo).write(this.value)}};var Rn=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function dt(e){return new Rn(ko(e))}function ko(e){let t=new ct;for(let[r,n]of Object.entries(e)){let i=new Mr(r,Do(n));t.addField(i)}return t}function Do(e){if(typeof e=="string")return new z(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new z(String(e));if(typeof e=="bigint")return new z(`${e}n`);if(e===null)return new z("null");if(e===void 0)return new z("undefined");if(ot(e))return new z(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new z(`Buffer.alloc(${e.byteLength})`):new z(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Cr(e)?e.toISOString():"Invalid Date";return new z(`new Date("${t}")`)}return e instanceof Ae?new z(`Prisma.${e._getName()}`):pt(e)?new z(`prisma.${Io(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Lu(e):typeof e=="object"?ko(e):new z(Object.prototype.toString.call(e))}function Lu(e){let t=new ut;for(let r of e)t.addItem(Do(r));return t}function Nr(e,t){let r=t==="pretty"?Po:Ir,n=e.renderAllMessages(r),i=new at(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Fr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=dt(e);for(let h of t)Ar(h,a,s);let{message:l,args:u}=Nr(a,r),g=st({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new K(g,{clientVersion:o})}f();c();p();d();m();f();c();p();d();m();var he=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};f();c();p();d();m();function Ut(e){let t;return{get(){return t||(t={value:e()}),t.value}}}f();c();p();d();m();function ye(e){return e.replace(/^./,t=>t.toLowerCase())}f();c();p();d();m();function No(e,t,r){let n=ye(r);return!t.result||!(t.result.$allModels||t.result[n])?e:qu({...e,...Mo(t.name,e,t.result.$allModels),...Mo(t.name,e,t.result[n])})}function qu(e){let t=new he,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Xe(e,n=>({...n,needs:r(n.name,new Set)}))}function Mo(e,t,r){return r?Xe(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Bu(t,o,i)})):{}}function Bu(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Fo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function _o(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var _r=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new he;this.modelExtensionsCache=new he;this.queryCallbacksCache=new he;this.clientExtensions=Ut(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Ut(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>No(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=ye(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},mt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new _r(t))}isEmpty(){return this.head===void 0}append(t){return new e(new _r(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};f();c();p();d();m();f();c();p();d();m();var Lo=Symbol(),$t=class{constructor(t){if(t!==Lo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Lr:t}},Lr=new $t(Lo);function we(e){return e instanceof $t}var Uu={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},qo="explicitly `undefined` values are not allowed";function qr({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=mt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g}){let h=new Sn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g});return{modelName:e,action:Uu[t],query:Vt(r,h)}}function Vt({select:e,include:t,...r}={},n){let i;return n.isPreviewFeatureOn("omitApi")&&(i=r.omit,delete r.omit),{arguments:Uo(r,n),selection:$u(e,t,i,n)}}function $u(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.isPreviewFeatureOn("omitApi")&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),Gu(e,n)):Vu(n,t,r)}function Vu(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&ju(n,t,e),e.isPreviewFeatureOn("omitApi")&&Ju(n,r,e),n}function ju(e,t,r){for(let[n,i]of Object.entries(t)){if(we(i))continue;let o=r.nestSelection(n);if(In(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Vt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Vt(i,o)}}function Ju(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=_o(i,n);for(let[s,a]of Object.entries(o)){if(we(a))continue;In(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function Gu(e,t){let r={},n=t.getComputedFields(),i=Fo(e,n);for(let[o,s]of Object.entries(i)){if(we(s))continue;let a=t.nestSelection(o);In(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||we(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Vt({},a):r[o]=!0;continue}r[o]=Vt(s,a)}}return r}function Bo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(it(e)){if(Cr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(pt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return Qu(e,t);if(ArrayBuffer.isView(e))return{$type:"Bytes",value:w.Buffer.from(e).toString("base64")};if(Hu(e))return e.values;if(ot(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Ae){if(e!==Dr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(Wu(e))return e.toJSON();if(typeof e=="object")return Uo(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Uo(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);we(i)||(i!==void 0?r[n]=Bo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:qo}))}return r}function Qu(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[nt(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Pe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};f();c();p();d();m();var ft=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};f();c();p();d();m();function $o(e){return{models:On(e.models),enums:On(e.enums),types:On(e.types)}}function On(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function Vo(e,t){let r=Ut(()=>Ku(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function Ku(e){return{datamodel:{models:kn(e.models),enums:kn(e.enums),types:kn(e.types)}}}function kn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}f();c();p();d();m();var Dn=new WeakMap,Br="$$PrismaTypedSql",Mn=class{constructor(t,r){Dn.set(this,{sql:t,values:r}),Object.defineProperty(this,Br,{value:Br})}get sql(){return Dn.get(this).sql}get values(){return Dn.get(this).values}};function jo(e){return(...t)=>new Mn(e,t)}function Jo(e){return e!=null&&e[Br]===Br}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();function jt(e){return{ok:!1,error:e,map(){return jt(e)},flatMap(){return jt(e)}}}var Nn=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},Fn=e=>{let t=new Nn,r=Ee(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ee(t,e.queryRaw.bind(e)),executeRaw:Ee(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>zu(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=Zu(t,e.getConnectionInfo.bind(e))),n},zu=(e,t)=>{let r=Ee(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:Ee(e,t.queryRaw.bind(t)),executeRaw:Ee(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>Yu(e,o))}},Yu=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ee(e,t.queryRaw.bind(t)),executeRaw:Ee(e,t.executeRaw.bind(t)),commit:Ee(e,t.commit.bind(t)),rollback:Ee(e,t.rollback.bind(t))});function Ee(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return jt({kind:"GenericJs",id:i})}}}function Zu(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return jt({kind:"GenericJs",id:i})}}}var ca=qe(Go());var iD=qe(Qo());Qi();Ii();Ji();f();c();p();d();m();var oe=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}f();c();p();d();m();f();c();p();d();m();var Ur={enumerable:!0,configurable:!0,writable:!0};function $r(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Ur,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Ko=Symbol.for("nodejs.util.inspect.custom");function be(e,t){let r=ec(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=zo(Reflect.ownKeys(o),r),a=zo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Ur,...l?.getPropertyDescriptor(s)}:Ur:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Ko]=function(){let o={...this};return delete o[Ko],o},i}function ec(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function zo(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}f();c();p();d();m();function gt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}f();c();p();d();m();function Vr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}f();c();p();d();m();function Yo(e){if(e===void 0)return"";let t=dt(e);return new at(0,{colors:Ir}).write(t).toString()}f();c();p();d();m();var tc="P2037";function Gt({error:e,user_facing_error:t},r,n){return t.error_code?new W(rc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ne(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function rc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===tc&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var qn=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new qn}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var Zo={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function ht(e={}){let t=ic(e);return Object.entries(t).reduce((n,[i,o])=>(Zo[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function ic(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function jr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Xo(e,t){let r=jr(e);return t({action:"aggregate",unpacker:r,argsMapper:ht})(e)}f();c();p();d();m();function oc(e={}){let{select:t,...r}=e;return typeof t=="object"?ht({...r,_count:t}):ht({...r,_count:{_all:!0}})}function sc(e={}){return typeof e.select=="object"?t=>jr(e)(t)._count:t=>jr(e)(t)._count._all}function es(e,t){return t({action:"count",unpacker:sc(e),argsMapper:oc})(e)}f();c();p();d();m();function ac(e={}){let t=ht(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function lc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ts(e,t){return t({action:"groupBy",unpacker:lc(e),argsMapper:ac})(e)}function rs(e,t,r){if(t==="aggregate")return n=>Xo(n,r);if(t==="count")return n=>es(n,r);if(t==="groupBy")return n=>ts(n,r)}f();c();p();d();m();function ns(e,t){let r=t.fields.filter(i=>!i.relationName),n=hn(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Ft(e,o,s.type,s.isList,s.kind==="enum")},...$r(Object.keys(n))})}f();c();p();d();m();f();c();p();d();m();var is=e=>Array.isArray(e)?e:e.split("."),Bn=(e,t)=>is(t).reduce((r,n)=>r&&r[n],e),os=(e,t,r)=>is(t).reduceRight((n,i,o,s)=>Object.assign({},Bn(e,s.slice(0,o)),{[i]:n}),r);function uc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function cc(e,t,r){return t===void 0?e??{}:os(t,r,e||!0)}function Un(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Fe(e._errorFormat),g=uc(n,i),h=cc(l,o,g),v=r({dataPath:g,callsite:u})(h),S=pc(e,t);return new Proxy(v,{get(A,R){if(!S.includes(R))return A[R];let F=[a[R].type,r,R],q=[g,h];return Un(e,...F,...q)},...$r([...S,...Object.getOwnPropertyNames(v)])})}}function pc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}f();c();p();d();m();function ss(e,t,r,n){return e===Ue.ModelAction.findFirstOrThrow||e===Ue.ModelAction.findUniqueOrThrow?dc(t,r,n):n}function dc(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=st({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new K(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof W&&o.code==="P2025"?new ve(`No ${e} found`,t):o})}}var mc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],fc=["aggregate","count","groupBy"];function $n(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[gc(e,t),yc(e,t),Jt(r),te("name",()=>t),te("$name",()=>t),te("$parent",()=>e._appliedParent)];return be({},n)}function gc(e,t){let r=ye(t),n=Object.keys(Ue.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=ss(o,t,e._clientVersion,s);let a=l=>u=>{let g=Fe(e._errorFormat);return e._createPrismaPromise(h=>{let v={args:u,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:h,callsite:g};return s({...v,...l})})};return mc.includes(o)?Un(e,t,a):hc(i)?rs(e,i,a):a({})}}}function hc(e){return fc.includes(e)}function yc(e,t){return Ve(te("fields",()=>{let r=e._runtimeDataModel.models[t];return ns(t,r)}))}f();c();p();d();m();function as(e){return e.replace(/^./,t=>t.toUpperCase())}var Vn=Symbol();function Qt(e){let t=[wc(e),te(Vn,()=>e),te("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Jt(r)),be(e,t)}function wc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(ye),n=[...new Set(t.concat(r))];return Ve({getKeys(){return n},getPropertyValue(i){let o=as(i);if(e._runtimeDataModel.models[o]!==void 0)return $n(e,o);if(e._runtimeDataModel.models[i]!==void 0)return $n(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ls(e){return e[Vn]?e[Vn]:e}function us(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Qt(t)}f();c();p();d();m();f();c();p();d();m();function cs({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(g=>n[g]);u.length>0&&a.push(gt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(gt(u))}Ec(e,l.needs)&&s.push(bc(l,be(e,s)))}return s.length>0||a.length>0?be(e,[...s,...a]):e}function Ec(e,t){return t.every(r=>gn(e,r))}function bc(e,t){return Ve(te(e.name,()=>e.compute(t)))}f();c();p();d();m();function Jr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=Jr({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function ds({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Jr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=ye(l);return cs({result:a,modelName:g,select:u.select,omit:u.select?void 0:{...o?.[g],...u.omit},extensions:n})}})}f();c();p();d();m();f();c();p();d();m();function ms(e){if(e instanceof oe)return xc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ms(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=Es(o,l),a.args=s,gs(e,a,r,n+1)}})})}function hs(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return gs(e,t,s)}function ys(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?ws(r,n,0,e):e(r)}}function ws(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=Es(i,l),ws(a,t,r+1,n)}})}var fs=e=>e;function Es(e=fs,t=fs){return r=>e(t(r))}f();c();p();d();m();var bs=ee("prisma:client"),xs={Vercel:"vercel","Netlify CI":"netlify"};function Ps({postinstall:e,ciName:t,clientVersion:r}){if(bs("checkPlatformCaching:postinstall",e),bs("checkPlatformCaching:ciName",t),e===!0&&t&&t in xs){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${xs[t]}-build`;throw console.error(n),new G(n,r)}}f();c();p();d();m();function vs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();var Pc="Cloudflare-Workers",vc="node";function Ts(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Pc?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===vc?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Tc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Gr(){let e=Ts();return{id:e,prettyName:Tc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}f();c();p();d();m();f();c();p();d();m();f();c();p();d();m();function yt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Gr().id==="workerd"?new G(`error: Environment variable not found: ${s.fromEnvVar}. + +In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new G(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new G("error: Missing URL environment variable, value, or override.",n);return i}f();c();p();d();m();f();c();p();d();m();var Qr=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var se=class extends Qr{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};f();c();p();d();m();f();c();p();d();m();function L(e,t){return{...e,isRetryable:t}}var wt=class extends se{constructor(r){super("This request must be retried",L(r,!0));this.name="ForcedRetryError";this.code="P5001"}};N(wt,"ForcedRetryError");f();c();p();d();m();var je=class extends se{constructor(r,n){super(r,L(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};N(je,"InvalidDatasourceError");f();c();p();d();m();var Je=class extends se{constructor(r,n){super(r,L(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};N(Je,"NotImplementedYetError");f();c();p();d();m();f();c();p();d();m();var j=class extends se{constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var Ge=class extends j{constructor(r){super("Schema needs to be uploaded",L(r,!0));this.name="SchemaMissingError";this.code="P5005"}};N(Ge,"SchemaMissingError");f();c();p();d();m();f();c();p();d();m();var jn="This request could not be understood by the server",Wt=class extends j{constructor(r,n,i){super(n||jn,L(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};N(Wt,"BadRequestError");f();c();p();d();m();var Kt=class extends j{constructor(r,n){super("Engine not started: healthcheck timeout",L(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};N(Kt,"HealthcheckTimeoutError");f();c();p();d();m();var zt=class extends j{constructor(r,n,i){super(n,L(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};N(zt,"EngineStartupError");f();c();p();d();m();var Yt=class extends j{constructor(r){super("Engine version is not supported",L(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};N(Yt,"EngineVersionNotSupportedError");f();c();p();d();m();var Jn="Request timed out",Zt=class extends j{constructor(r,n=Jn){super(n,L(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};N(Zt,"GatewayTimeoutError");f();c();p();d();m();var Cc="Interactive transaction error",Xt=class extends j{constructor(r,n=Cc){super(n,L(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};N(Xt,"InteractiveTransactionError");f();c();p();d();m();var Ac="Request parameters are invalid",er=class extends j{constructor(r,n=Ac){super(n,L(r,!1));this.name="InvalidRequestError";this.code="P5011"}};N(er,"InvalidRequestError");f();c();p();d();m();var Gn="Requested resource does not exist",tr=class extends j{constructor(r,n=Gn){super(n,L(r,!1));this.name="NotFoundError";this.code="P5003"}};N(tr,"NotFoundError");f();c();p();d();m();var Qn="Unknown server error",Et=class extends j{constructor(r,n,i){super(n||Qn,L(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};N(Et,"ServerError");f();c();p();d();m();var Hn="Unauthorized, check your connection string",rr=class extends j{constructor(r,n=Hn){super(n,L(r,!1));this.name="UnauthorizedError";this.code="P5007"}};N(rr,"UnauthorizedError");f();c();p();d();m();var Wn="Usage exceeded, retry again later",nr=class extends j{constructor(r,n=Wn){super(n,L(r,!0));this.name="UsageExceededError";this.code="P5008"}};N(nr,"UsageExceededError");async function Rc(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function ir(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Rc(e);if(n.type==="QueryEngineError")throw new W(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Et(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ge(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Yt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new zt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new G(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Kt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Xt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new er(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new rr(r,bt(Hn,n));if(e.status===404)return new tr(r,bt(Gn,n));if(e.status===429)throw new nr(r,bt(Wn,n));if(e.status===504)throw new Zt(r,bt(Jn,n));if(e.status>=500)throw new Et(r,bt(Qn,n));if(e.status>=400)throw new Wt(r,bt(jn,n))}function bt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}f();c();p();d();m();function Cs(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}f();c();p();d();m();var Re="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function As(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,u,g;for(let h=0;h>18,a=(g&258048)>>12,l=(g&4032)>>6,u=g&63,r+=Re[s]+Re[a]+Re[l]+Re[u];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Re[s]+Re[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,l=(g&15)<<2,r+=Re[s]+Re[a]+Re[l]+"="),r}f();c();p();d();m();function Rs(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new G("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}f();c();p();d();m();function Sc(e){return e[0]*1e3+e[1]/1e6}function Ss(e){return new Date(Sc(e))}f();c();p();d();m();var Is={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};f();c();p();d();m();f();c();p();d();m();var or=class extends se{constructor(r,n){super(`Cannot fetch data from service: +${r}`,L(n,!0));this.name="RequestError";this.code="P5010"}};N(or,"RequestError");async function Qe(e,t,r=n=>n){let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Kn)(e,t)}catch(i){let o=i.message??"Unknown error";throw new or(o,{clientVersion:n})}}function Oc(e){return{...e.headers,"Content-Type":"application/json"}}function kc(e){return{method:e.method,headers:Oc(e)}}function Dc(e,t){return{text:()=>Promise.resolve(w.Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(w.Buffer.concat(e).toString())),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:new zn(t.headers)}}async function Kn(e,t={}){let r=Mc("https"),n=kc(t),i=[],{origin:o}=new URL(e);return new Promise((s,a)=>{let l=r.request(e,n,u=>{let{statusCode:g,headers:{location:h}}=u;g>=301&&g<=399&&h&&(h.startsWith("http")===!1?s(Kn(`${o}${h}`,t)):s(Kn(h,t))),u.on("data",v=>i.push(v)),u.on("end",()=>s(Dc(i,u))),u.on("error",a)});l.on("error",a),l.end(t.body??"")})}var Mc=typeof require<"u"?require:()=>{},zn=class{constructor(t={}){this.headers=new Map;for(let[r,n]of Object.entries(t))if(typeof n=="string")this.headers.set(r,n);else if(Array.isArray(n))for(let i of n)this.headers.set(r,i)}append(t,r){this.headers.set(t,r)}delete(t){this.headers.delete(t)}get(t){return this.headers.get(t)??null}has(t){return this.headers.has(t)}set(t,r){this.headers.set(t,r)}forEach(t,r){for(let[n,i]of this.headers)t.call(r,i,n,this)}};var Nc=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Os=ee("prisma:client:dataproxyEngine");async function Fc(e,t){let r=Is["@prisma/engines-version"],n=t.clientVersion??"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&Nc.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=r.split("-")??[],[a,l,u]=s.split("."),g=_c(`<=${a}.${l}.${u}`),h=await Qe(g,{clientVersion:n});if(!h.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${await h.text()||""}`);let v=await h.text();Os("length of body fetched from unpkg.com",v.length);let S;try{S=JSON.parse(v)}catch(A){throw console.error("JSON.parse error: body fetched from unpkg.com: ",v),A}return S.version}throw new Je("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function ks(e,t){let r=await Fc(e,t);return Os("version",r),r}function _c(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var Ds=3,Yn=ee("prisma:client:dataproxyEngine"),Zn=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},sr=class{constructor(t){this.name="DataProxyEngine";Rs(t),this.config=t,this.env={...t.env,...typeof y<"u"?y.env:{}},this.inlineSchema=As(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new Zn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await ks(t,this.config),Yn("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let n=typeof r.attributes.query=="string"?r.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[i]=n.split("/* traceparent");n=i}this.logEmitter.emit("query",{query:n,timestamp:Ss(r.timestamp),duration:Number(r.attributes.duration_ms),params:r.attributes.params,target:r.attributes.target})}}}),t?.traces?.length&&this.tracingHelper.createEngineSpan({span:!0,spans:t.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await Qe(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Yn("schema response status",r.status);let n=await ir(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Vr(t,n),{batchResult:a,elapsed:l}=await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r});return a.map(u=>"errors"in u&&u.errors.length>0?Gt(u.errors[0],this.clientVersion,this.config.activeProvider):{data:u,elapsed:l})}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await Qe(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Yn("graphql response status",a.status),await this.handleError(await ir(a,this.clientVersion));let l=await a.json(),u=l.extensions;if(u&&this.propagateResponseExtensions(u),l.errors)throw l.errors.length===1?Gt(l.errors[0],this.config.clientVersion,this.config.activeProvider):new ne(l.errors,{clientVersion:this.config.clientVersion});return l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await Qe(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await ir(l,this.clientVersion));let u=await l.json(),g=u.extensions;g&&this.propagateResponseExtensions(g);let h=u.id,v=u["data-proxy"].endpoint;return{id:h,payload:{endpoint:v}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await Qe(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await ir(a,this.clientVersion));let u=(await a.json()).extensions;u&&this.propagateResponseExtensions(u);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=yt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new je(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:"&&o!=="prisma+postgres:")throw new je(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let l=a.get("api_key");if(l===null||l.length<1)throw new je(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,l]}metrics(){throw new Je("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof se)||!i.isRetryable)throw i;if(r>=Ds)throw i instanceof wt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${Ds} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Cs(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof Ge)throw await this.uploadSchema(),new wt({clientVersion:this.clientVersion,cause:t});if(t)throw t}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Ms({copyEngine:e=!0},t){let r;try{r=yt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&Ot("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=Rt(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",l=i==="binary";if(o&&s||s){let u;throw u=["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."],new K(u.join(` +`),{clientVersion:t.clientVersion})}if(o)return new sr(t);throw new K("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}f();c();p();d();m();function Hr({generator:e}){return e?.previewFeatures??[]}f();c();p();d();m();var Ns=e=>({command:e});f();c();p();d();m();f();c();p();d();m();var Fs=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);f();c();p();d();m();function xt(e){try{return _s(e,"fast")}catch{return _s(e,"slow")}}function _s(e,t){return JSON.stringify(e.map(r=>qs(r,t)))}function qs(e,t){return Array.isArray(e)?e.map(r=>qs(r,t)):typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:it(e)?{prisma__type:"date",prisma__value:e.toJSON()}:fe.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Lc(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Bs(e):e}function Lc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Bs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ls);let t={};for(let r of Object.keys(e))t[r]=Ls(e[r]);return t}function Ls(e){return typeof e=="bigint"?e.toString():Bs(e)}f();c();p();d();m();var qc=["$connect","$disconnect","$on","$transaction","$use","$extends"],Us=qc;var Bc=/^(\s*alter\s)/i,$s=ee("prisma:client");function Xn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Bc.exec(t))throw new Error(`Running ALTER using ${n} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var ei=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Jo(r))n=r.sql,i={values:xt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:xt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:xt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:xt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Fs(r),i={values:xt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?$s(`prisma.${e}(${n}, ${i.values})`):$s(`prisma.${e}(${n})`),{query:n,parameters:i}},Vs={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new oe(t,r)}},js={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};f();c();p();d();m();function ti(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=Js(r(o)):Js(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Js(e){return typeof e.then=="function"?e:Promise.resolve(e)}f();c();p();d();m();var Gs={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},ri=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??Gs}};function Qs(e){return e.includes("tracing")?new ri:Gs}f();c();p();d();m();function Hs(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}f();c();p();d();m();function Ws(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}f();c();p();d();m();var Wr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};f();c();p();d();m();var Ys=qe(Xi());f();c();p();d();m();function Kr(e){return typeof e.batchRequestIdx=="number"}f();c();p();d();m();function Ks(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(ni(e.query.arguments)),t.push(ni(e.query.selection)),t.join("")}function ni(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${ni(n)})`:r}).join(" ")})`}f();c();p();d();m();var Uc={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function ii(e){return Uc[e]}f();c();p();d();m();var zr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iHe("bigint",r));case"bytes-array":return t.map(r=>He("bytes",r));case"decimal-array":return t.map(r=>He("decimal",r));case"datetime-array":return t.map(r=>He("datetime",r));case"date-array":return t.map(r=>He("date",r));case"time-array":return t.map(r=>He("time",r));default:return t}}function zs(e){let t=[],r=$c(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(h=>ii(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:jc(o),containsWrite:u,customDataProxyFetch:i})).map((h,v)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[v],h)}catch(S){return S}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Zs(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:ii(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Ks(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Vc(t),Jc(t,i)||t instanceof ve)throw t;if(t instanceof W&&Gc(t)){let u=Xs(t.meta);Fr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=st({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new W(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Te(l,this.client._clientVersion);if(t instanceof ne)throw new ne(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof G)throw new G(l,this.client._clientVersion);if(t instanceof Te)throw new Te(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Ys.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(u=>u!=="select"&&u!=="include"),a=Bn(o,s),l=i==="queryRaw"?zs(a):rt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function jc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Zs(e)};Pe(e,"Unknown transaction kind")}}function Zs(e){return{id:e.id,payload:e.payload}}function Jc(e,t){return Kr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Gc(e){return e.code==="P2009"||e.code==="P2012"}function Xs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Xs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}f();c();p();d();m();var ea="5.22.0";var ta=ea;f();c();p();d();m();var sa=qe(Tn());f();c();p();d();m();var B=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};N(B,"PrismaClientConstructorValidationError");var ra=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],na=["pretty","colorless","minimal"],ia=["info","query","warn","error"],Hc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new B(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Pt(r,t)||` Available datasources: ${t.join(", ")}`;throw new B(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new B(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new B(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new B(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new B('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Hr(t).includes("driverAdapters"))throw new B('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Rt()==="binary")throw new B('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new B(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new B(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!na.includes(e)){let t=Pt(e,na);throw new B(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new B(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!ia.includes(r)){let n=Pt(r,ia);throw new B(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Pt(i,o);throw new B(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new B(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new B(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new B(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new B('"omit" option is expected to be an object.');if(e===null)throw new B('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Kc(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new B(zc(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new B(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Pt(r,t);throw new B(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function aa(e,t){for(let[r,n]of Object.entries(e)){if(!ra.includes(r)){let i=Pt(r,ra);throw new B(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Hc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new B('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Pt(e,t){if(t.length===0||typeof e!="string")return"";let r=Wc(e,t);return r?` Did you mean "${r}"?`:""}function Wc(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,sa.default)(e,i)}));r.sort((i,o)=>i.distancent(n)===t);if(r)return e[r]}function zc(e,t){let r=dt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Nr(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}f();c();p();d();m();function la(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=g,a()},g=>{if(!Kr(g)){l(g);return}g.batchRequestIdx===u?l(g):(i||(i=g),a())})})}var _e=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Yc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Zc=Symbol.for("prisma.client.transaction.id"),Xc={id:0,nextId(){return++this.id}};function pa(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Wr;this._createPrismaPromise=ti();this.$extends=us;e=n?.__internal?.configOverride?.(e)??e,Ps(e),n&&aa(n,e);let i=new yr().on("error",()=>{});this._extensions=mt.empty(),this._previewFeatures=Hr(e),this._clientVersion=e.clientVersion??ta,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Qs(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&At.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&At.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=Fn(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new G(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new G("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},g=u.debug===!0;g&&ee.enable("prisma:client");let h=At.resolve(e.dirname,e.relativePath);Si.existsSync(h)||(h=e.dirname),_e("dirname",e.dirname),_e("relativePath",e.relativePath),_e("cwd",h);let v=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:v.allowTriggerPanic,datamodelPath:At.join(e.dirname,e.filename??"schema.prisma"),prismaPath:v.binaryPath??void 0,engineEndpoint:v.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&Ws(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(S=>typeof S=="string"?S==="query":S.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:vs(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:yt,getBatchRequestPayload:Vr,prismaGraphQLToJSError:Gt,PrismaClientUnknownRequestError:ne,PrismaClientInitializationError:G,PrismaClientKnownRequestError:W,debug:ee("prisma:client:accelerateEngine"),engineVersion:ca.version,clientVersion:e.clientVersion}},_e("clientVersion",e.clientVersion),this._engine=Ms(e,this._engineConfig),this._requestHandler=new Yr(this,i),l.log)for(let S of l.log){let A=typeof S=="string"?S:S.emit==="stdout"?S.level:null;A&&this.$on(A,R=>{It.log(`${It.tags[A]??""}`,R.message||R.query)})}this._metrics=new ft(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Qt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Vi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:ei({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ua(n,i);return Xn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new K("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Xn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new K(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Ns,callsite:Fe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:ei({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ua(n,i));throw new K("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new K("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Xc.nextId(),s=Hs(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:u,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return la(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return Qt(be(ls(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>ti(n)),te(Zc,()=>n.id),gt(Us)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Yc,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,M=>g(u,F=>(M?.end(),l(F))));let{runInTransaction:h,args:v,...S}=u,A={...n,...S};v&&(A.args=i.middlewareArgsToRequestArgs(v)),n.transaction!==void 0&&h===!1&&delete A.transaction;let R=await hs(this,A);return A.model?ds({result:R,modelName:A.model,args:A.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):R};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:g,unpacker:h,otelParentCtx:v,customDataProxyFetch:S}){try{n=u?u(n):n;let A={name:"serialize"},R=this._tracingHelper.runInChildSpan(A,()=>qr({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return ee.enabled("prisma:client")&&(_e("Prisma Client call:"),_e(`prisma.${i}(${Yo(n)})`),_e("Generated request:"),_e(JSON.stringify(R,null,2)+` +`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:R,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:v,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:S})}catch(A){throw A.clientVersion=this._clientVersion,A}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new K("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function ua(e,t){return ep(e)?[new oe(e,t),Vs]:[e,js]}function ep(e){return Array.isArray(e)&&Array.isArray(e.raw)}f();c();p();d();m();var tp=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function da(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!tp.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}f();c();p();d();m();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,deserializeJsonResponse,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +//# sourceMappingURL=edge.js.map diff --git a/apps/api/release/vendor/@prisma/client/runtime/index-browser.d.ts b/apps/api/release/vendor/@prisma/client/runtime/index-browser.d.ts new file mode 100644 index 0000000..fefa233 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/index-browser.d.ts @@ -0,0 +1,365 @@ +declare class AnyNull extends NullTypesEnumValue { +} + +declare type Args = T extends { + [K: symbol]: { + types: { + operations: { + [K in F]: { + args: any; + }; + }; + }; + }; +} ? T[symbol]['types']['operations'][F]['args'] : any; + +declare class DbNull extends NullTypesEnumValue { +} + +export declare namespace Decimal { + export type Constructor = typeof Decimal; + export type Instance = Decimal; + export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; + export type Modulo = Rounding | 9; + export type Value = string | number | Decimal; + + // http://mikemcl.github.io/decimal.js/#constructor-properties + export interface Config { + precision?: number; + rounding?: Rounding; + toExpNeg?: number; + toExpPos?: number; + minE?: number; + maxE?: number; + crypto?: boolean; + modulo?: Modulo; + defaults?: boolean; + } +} + +export declare class Decimal { + readonly d: number[]; + readonly e: number; + readonly s: number; + + constructor(n: Decimal.Value); + + absoluteValue(): Decimal; + abs(): Decimal; + + ceil(): Decimal; + + clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; + clamp(min: Decimal.Value, max: Decimal.Value): Decimal; + + comparedTo(n: Decimal.Value): number; + cmp(n: Decimal.Value): number; + + cosine(): Decimal; + cos(): Decimal; + + cubeRoot(): Decimal; + cbrt(): Decimal; + + decimalPlaces(): number; + dp(): number; + + dividedBy(n: Decimal.Value): Decimal; + div(n: Decimal.Value): Decimal; + + dividedToIntegerBy(n: Decimal.Value): Decimal; + divToInt(n: Decimal.Value): Decimal; + + equals(n: Decimal.Value): boolean; + eq(n: Decimal.Value): boolean; + + floor(): Decimal; + + greaterThan(n: Decimal.Value): boolean; + gt(n: Decimal.Value): boolean; + + greaterThanOrEqualTo(n: Decimal.Value): boolean; + gte(n: Decimal.Value): boolean; + + hyperbolicCosine(): Decimal; + cosh(): Decimal; + + hyperbolicSine(): Decimal; + sinh(): Decimal; + + hyperbolicTangent(): Decimal; + tanh(): Decimal; + + inverseCosine(): Decimal; + acos(): Decimal; + + inverseHyperbolicCosine(): Decimal; + acosh(): Decimal; + + inverseHyperbolicSine(): Decimal; + asinh(): Decimal; + + inverseHyperbolicTangent(): Decimal; + atanh(): Decimal; + + inverseSine(): Decimal; + asin(): Decimal; + + inverseTangent(): Decimal; + atan(): Decimal; + + isFinite(): boolean; + + isInteger(): boolean; + isInt(): boolean; + + isNaN(): boolean; + + isNegative(): boolean; + isNeg(): boolean; + + isPositive(): boolean; + isPos(): boolean; + + isZero(): boolean; + + lessThan(n: Decimal.Value): boolean; + lt(n: Decimal.Value): boolean; + + lessThanOrEqualTo(n: Decimal.Value): boolean; + lte(n: Decimal.Value): boolean; + + logarithm(n?: Decimal.Value): Decimal; + log(n?: Decimal.Value): Decimal; + + minus(n: Decimal.Value): Decimal; + sub(n: Decimal.Value): Decimal; + + modulo(n: Decimal.Value): Decimal; + mod(n: Decimal.Value): Decimal; + + naturalExponential(): Decimal; + exp(): Decimal; + + naturalLogarithm(): Decimal; + ln(): Decimal; + + negated(): Decimal; + neg(): Decimal; + + plus(n: Decimal.Value): Decimal; + add(n: Decimal.Value): Decimal; + + precision(includeZeros?: boolean): number; + sd(includeZeros?: boolean): number; + + round(): Decimal; + + sine() : Decimal; + sin() : Decimal; + + squareRoot(): Decimal; + sqrt(): Decimal; + + tangent() : Decimal; + tan() : Decimal; + + times(n: Decimal.Value): Decimal; + mul(n: Decimal.Value) : Decimal; + + toBinary(significantDigits?: number): string; + toBinary(significantDigits: number, rounding: Decimal.Rounding): string; + + toDecimalPlaces(decimalPlaces?: number): Decimal; + toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + toDP(decimalPlaces?: number): Decimal; + toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + + toExponential(decimalPlaces?: number): string; + toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFixed(decimalPlaces?: number): string; + toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFraction(max_denominator?: Decimal.Value): Decimal[]; + + toHexadecimal(significantDigits?: number): string; + toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; + toHex(significantDigits?: number): string; + toHex(significantDigits: number, rounding?: Decimal.Rounding): string; + + toJSON(): string; + + toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; + + toNumber(): number; + + toOctal(significantDigits?: number): string; + toOctal(significantDigits: number, rounding: Decimal.Rounding): string; + + toPower(n: Decimal.Value): Decimal; + pow(n: Decimal.Value): Decimal; + + toPrecision(significantDigits?: number): string; + toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; + + toSignificantDigits(significantDigits?: number): Decimal; + toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; + toSD(significantDigits?: number): Decimal; + toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; + + toString(): string; + + truncated(): Decimal; + trunc(): Decimal; + + valueOf(): string; + + static abs(n: Decimal.Value): Decimal; + static acos(n: Decimal.Value): Decimal; + static acosh(n: Decimal.Value): Decimal; + static add(x: Decimal.Value, y: Decimal.Value): Decimal; + static asin(n: Decimal.Value): Decimal; + static asinh(n: Decimal.Value): Decimal; + static atan(n: Decimal.Value): Decimal; + static atanh(n: Decimal.Value): Decimal; + static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; + static cbrt(n: Decimal.Value): Decimal; + static ceil(n: Decimal.Value): Decimal; + static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; + static clone(object?: Decimal.Config): Decimal.Constructor; + static config(object: Decimal.Config): Decimal.Constructor; + static cos(n: Decimal.Value): Decimal; + static cosh(n: Decimal.Value): Decimal; + static div(x: Decimal.Value, y: Decimal.Value): Decimal; + static exp(n: Decimal.Value): Decimal; + static floor(n: Decimal.Value): Decimal; + static hypot(...n: Decimal.Value[]): Decimal; + static isDecimal(object: any): object is Decimal; + static ln(n: Decimal.Value): Decimal; + static log(n: Decimal.Value, base?: Decimal.Value): Decimal; + static log2(n: Decimal.Value): Decimal; + static log10(n: Decimal.Value): Decimal; + static max(...n: Decimal.Value[]): Decimal; + static min(...n: Decimal.Value[]): Decimal; + static mod(x: Decimal.Value, y: Decimal.Value): Decimal; + static mul(x: Decimal.Value, y: Decimal.Value): Decimal; + static noConflict(): Decimal.Constructor; // Browser only + static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; + static random(significantDigits?: number): Decimal; + static round(n: Decimal.Value): Decimal; + static set(object: Decimal.Config): Decimal.Constructor; + static sign(n: Decimal.Value): number; + static sin(n: Decimal.Value): Decimal; + static sinh(n: Decimal.Value): Decimal; + static sqrt(n: Decimal.Value): Decimal; + static sub(x: Decimal.Value, y: Decimal.Value): Decimal; + static sum(...n: Decimal.Value[]): Decimal; + static tan(n: Decimal.Value): Decimal; + static tanh(n: Decimal.Value): Decimal; + static trunc(n: Decimal.Value): Decimal; + + static readonly default?: Decimal.Constructor; + static readonly Decimal?: Decimal.Constructor; + + static readonly precision: number; + static readonly rounding: Decimal.Rounding; + static readonly toExpNeg: number; + static readonly toExpPos: number; + static readonly minE: number; + static readonly maxE: number; + static readonly crypto: boolean; + static readonly modulo: Decimal.Modulo; + + static readonly ROUND_UP: 0; + static readonly ROUND_DOWN: 1; + static readonly ROUND_CEIL: 2; + static readonly ROUND_FLOOR: 3; + static readonly ROUND_HALF_UP: 4; + static readonly ROUND_HALF_DOWN: 5; + static readonly ROUND_HALF_EVEN: 6; + static readonly ROUND_HALF_CEIL: 7; + static readonly ROUND_HALF_FLOOR: 8; + static readonly EUCLID: 9; +} + +declare type Exact = (A extends unknown ? (W extends A ? { + [K in keyof A]: Exact; +} : W) : never) | (A extends Narrowable ? A : never); + +export declare function getRuntime(): GetRuntimeOutput; + +declare type GetRuntimeOutput = { + id: Runtime; + prettyName: string; + isEdge: boolean; +}; + +declare class JsonNull extends NullTypesEnumValue { +} + +/** + * Generates more strict variant of an enum which, unlike regular enum, + * throws on non-existing property access. This can be useful in following situations: + * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input + * - enum values are generated dynamically from DMMF. + * + * In that case, if using normal enums and no compile-time typechecking, using non-existing property + * will result in `undefined` value being used, which will be accepted. Using strict enum + * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. + * + * Note: if you need to check for existence of a value in the enum you can still use either + * `in` operator or `hasOwnProperty` function. + * + * @param definition + * @returns + */ +export declare function makeStrictEnum>(definition: T): T; + +declare type Narrowable = string | number | bigint | boolean | []; + +declare class NullTypesEnumValue extends ObjectEnumValue { + _getNamespace(): string; +} + +/** + * Base class for unique values of object-valued enums. + */ +declare abstract class ObjectEnumValue { + constructor(arg?: symbol); + abstract _getNamespace(): string; + _getName(): string; + toString(): string; +} + +export declare const objectEnumValues: { + classes: { + DbNull: typeof DbNull; + JsonNull: typeof JsonNull; + AnyNull: typeof AnyNull; + }; + instances: { + DbNull: DbNull; + JsonNull: JsonNull; + AnyNull: AnyNull; + }; +}; + +declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; + +declare namespace Public { + export { + validator + } +} +export { Public } + +declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown"; + +declare function validator(): (select: Exact) => S; + +declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; + +declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; + +export { } diff --git a/apps/api/release/vendor/@prisma/client/runtime/index-browser.js b/apps/api/release/vendor/@prisma/client/runtime/index-browser.js new file mode 100644 index 0000000..8f0457d --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/index-browser.js @@ -0,0 +1,13 @@ +"use strict";var de=Object.defineProperty;var We=Object.getOwnPropertyDescriptor;var Ge=Object.getOwnPropertyNames;var Je=Object.prototype.hasOwnProperty;var Me=(e,n)=>{for(var i in n)de(e,i,{get:n[i],enumerable:!0})},Xe=(e,n,i,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Ge(n))!Je.call(e,r)&&r!==i&&de(e,r,{get:()=>n[r],enumerable:!(t=We(n,r))||t.enumerable});return e};var Ke=e=>Xe(de({},"__esModule",{value:!0}),e);var Xn={};Me(Xn,{Decimal:()=>je,Public:()=>he,getRuntime:()=>be,makeStrictEnum:()=>Pe,objectEnumValues:()=>Oe});module.exports=Ke(Xn);var he={};Me(he,{validator:()=>Ce});function Ce(...e){return n=>n}var ne=Symbol(),pe=new WeakMap,ge=class{constructor(n){n===ne?pe.set(this,"Prisma.".concat(this._getName())):pe.set(this,"new Prisma.".concat(this._getNamespace(),".").concat(this._getName(),"()"))}_getName(){return this.constructor.name}toString(){return pe.get(this)}},G=class extends ge{_getNamespace(){return"NullTypes"}},J=class extends G{};me(J,"DbNull");var X=class extends G{};me(X,"JsonNull");var K=class extends G{};me(K,"AnyNull");var Oe={classes:{DbNull:J,JsonNull:X,AnyNull:K},instances:{DbNull:new J(ne),JsonNull:new X(ne),AnyNull:new K(ne)}};function me(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0})}var xe=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Pe(e){return new Proxy(e,{get(n,i){if(i in n)return n[i];if(!xe.has(i))throw new TypeError("Invalid enum value: ".concat(String(i)))}})}var Qe="Cloudflare-Workers",Ye="node";function Re(){var e,n,i;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===Qe?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((i=(n=globalThis.process)==null?void 0:n.release)==null?void 0:i.name)===Ye?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var ze={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function be(){let e=Re();return{id:e,prettyName:ze[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var H=9e15,$=1e9,we="0123456789abcdef",te="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",re="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ne={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-H,maxE:H,crypto:!1},Te,Z,w=!0,oe="[DecimalError] ",V=oe+"Invalid argument: ",Le=oe+"Precision limit exceeded",De=oe+"crypto unavailable",Fe="[object Decimal]",b=Math.floor,C=Math.pow,ye=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,en=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,nn=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ie=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,D=1e7,m=7,tn=9007199254740991,rn=te.length-1,ve=re.length-1,h={toStringTag:Fe};h.absoluteValue=h.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),p(e)};h.ceil=function(){return p(new this.constructor(this),this.e+1,2)};h.clampedTo=h.clamp=function(e,n){var i,t=this,r=t.constructor;if(e=new r(e),n=new r(n),!e.s||!n.s)return new r(NaN);if(e.gt(n))throw Error(V+n);return i=t.cmp(e),i<0?e:t.cmp(n)>0?n:new r(t)};h.comparedTo=h.cmp=function(e){var n,i,t,r,s=this,o=s.d,u=(e=new s.constructor(e)).d,l=s.s,f=e.s;if(!o||!u)return!l||!f?NaN:l!==f?l:o===u?0:!o^l<0?1:-1;if(!o[0]||!u[0])return o[0]?l:u[0]?-f:0;if(l!==f)return l;if(s.e!==e.e)return s.e>e.e^l<0?1:-1;for(t=o.length,r=u.length,n=0,i=tu[n]^l<0?1:-1;return t===r?0:t>r^l<0?1:-1};h.cosine=h.cos=function(){var e,n,i=this,t=i.constructor;return i.d?i.d[0]?(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=sn(t,$e(t,i)),t.precision=e,t.rounding=n,p(Z==2||Z==3?i.neg():i,e,n,!0)):new t(1):new t(NaN)};h.cubeRoot=h.cbrt=function(){var e,n,i,t,r,s,o,u,l,f,c=this,a=c.constructor;if(!c.isFinite()||c.isZero())return new a(c);for(w=!1,s=c.s*C(c.s*c,1/3),!s||Math.abs(s)==1/0?(i=O(c.d),e=c.e,(s=(e-i.length+1)%3)&&(i+=s==1||s==-2?"0":"00"),s=C(i,1/3),e=b((e+1)/3)-(e%3==(e<0?-1:2)),s==1/0?i="5e"+e:(i=s.toExponential(),i=i.slice(0,i.indexOf("e")+1)+e),t=new a(i),t.s=c.s):t=new a(s.toString()),o=(e=a.precision)+3;;)if(u=t,l=u.times(u).times(u),f=l.plus(c),t=S(f.plus(c).times(u),f.plus(l),o+2,1),O(u.d).slice(0,o)===(i=O(t.d)).slice(0,o))if(i=i.slice(o-3,o+1),i=="9999"||!r&&i=="4999"){if(!r&&(p(u,e+1,0),u.times(u).times(u).eq(c))){t=u;break}o+=4,r=1}else{(!+i||!+i.slice(1)&&i.charAt(0)=="5")&&(p(t,e+1,1),n=!t.times(t).times(t).eq(c));break}return w=!0,p(t,e,a.rounding,n)};h.decimalPlaces=h.dp=function(){var e,n=this.d,i=NaN;if(n){if(e=n.length-1,i=(e-b(this.e/m))*m,e=n[e],e)for(;e%10==0;e/=10)i--;i<0&&(i=0)}return i};h.dividedBy=h.div=function(e){return S(this,new this.constructor(e))};h.dividedToIntegerBy=h.divToInt=function(e){var n=this,i=n.constructor;return p(S(n,new i(e),0,1,1),i.precision,i.rounding)};h.equals=h.eq=function(e){return this.cmp(e)===0};h.floor=function(){return p(new this.constructor(this),this.e+1,3)};h.greaterThan=h.gt=function(e){return this.cmp(e)>0};h.greaterThanOrEqualTo=h.gte=function(e){var n=this.cmp(e);return n==1||n===0};h.hyperbolicCosine=h.cosh=function(){var e,n,i,t,r,s=this,o=s.constructor,u=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return u;i=o.precision,t=o.rounding,o.precision=i+Math.max(s.e,s.sd())+4,o.rounding=1,r=s.d.length,r<32?(e=Math.ceil(r/3),n=(1/fe(4,e)).toString()):(e=16,n="2.3283064365386962890625e-10"),s=j(o,1,s.times(n),new o(1),!0);for(var l,f=e,c=new o(8);f--;)l=s.times(s),s=u.minus(l.times(c.minus(l.times(c))));return p(s,o.precision=i,o.rounding=t,!0)};h.hyperbolicSine=h.sinh=function(){var e,n,i,t,r=this,s=r.constructor;if(!r.isFinite()||r.isZero())return new s(r);if(n=s.precision,i=s.rounding,s.precision=n+Math.max(r.e,r.sd())+4,s.rounding=1,t=r.d.length,t<3)r=j(s,2,r,r,!0);else{e=1.4*Math.sqrt(t),e=e>16?16:e|0,r=r.times(1/fe(5,e)),r=j(s,2,r,r,!0);for(var o,u=new s(5),l=new s(16),f=new s(20);e--;)o=r.times(r),r=r.times(u.plus(o.times(l.times(o).plus(f))))}return s.precision=n,s.rounding=i,p(r,n,i,!0)};h.hyperbolicTangent=h.tanh=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+7,t.rounding=1,S(i.sinh(),i.cosh(),t.precision=e,t.rounding=n)):new t(i.s)};h.inverseCosine=h.acos=function(){var e,n=this,i=n.constructor,t=n.abs().cmp(1),r=i.precision,s=i.rounding;return t!==-1?t===0?n.isNeg()?L(i,r,s):new i(0):new i(NaN):n.isZero()?L(i,r+4,s).times(.5):(i.precision=r+6,i.rounding=1,n=n.asin(),e=L(i,r+4,s).times(.5),i.precision=r,i.rounding=s,e.minus(n))};h.inverseHyperbolicCosine=h.acosh=function(){var e,n,i=this,t=i.constructor;return i.lte(1)?new t(i.eq(1)?0:NaN):i.isFinite()?(e=t.precision,n=t.rounding,t.precision=e+Math.max(Math.abs(i.e),i.sd())+4,t.rounding=1,w=!1,i=i.times(i).minus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln()):new t(i)};h.inverseHyperbolicSine=h.asinh=function(){var e,n,i=this,t=i.constructor;return!i.isFinite()||i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+2*Math.max(Math.abs(i.e),i.sd())+6,t.rounding=1,w=!1,i=i.times(i).plus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln())};h.inverseHyperbolicTangent=h.atanh=function(){var e,n,i,t,r=this,s=r.constructor;return r.isFinite()?r.e>=0?new s(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=s.precision,n=s.rounding,t=r.sd(),Math.max(t,e)<2*-r.e-1?p(new s(r),e,n,!0):(s.precision=i=t-r.e,r=S(r.plus(1),new s(1).minus(r),i+e,1),s.precision=e+4,s.rounding=1,r=r.ln(),s.precision=e,s.rounding=n,r.times(.5))):new s(NaN)};h.inverseSine=h.asin=function(){var e,n,i,t,r=this,s=r.constructor;return r.isZero()?new s(r):(n=r.abs().cmp(1),i=s.precision,t=s.rounding,n!==-1?n===0?(e=L(s,i+4,t).times(.5),e.s=r.s,e):new s(NaN):(s.precision=i+6,s.rounding=1,r=r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(),s.precision=i,s.rounding=t,r.times(2)))};h.inverseTangent=h.atan=function(){var e,n,i,t,r,s,o,u,l,f=this,c=f.constructor,a=c.precision,d=c.rounding;if(f.isFinite()){if(f.isZero())return new c(f);if(f.abs().eq(1)&&a+4<=ve)return o=L(c,a+4,d).times(.25),o.s=f.s,o}else{if(!f.s)return new c(NaN);if(a+4<=ve)return o=L(c,a+4,d).times(.5),o.s=f.s,o}for(c.precision=u=a+10,c.rounding=1,i=Math.min(28,u/m+2|0),e=i;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(w=!1,n=Math.ceil(u/m),t=1,l=f.times(f),o=new c(f),r=f;e!==-1;)if(r=r.times(l),s=o.minus(r.div(t+=2)),r=r.times(l),o=s.plus(r.div(t+=2)),o.d[n]!==void 0)for(e=n;o.d[e]===s.d[e]&&e--;);return i&&(o=o.times(2<this.d.length-2};h.isNaN=function(){return!this.s};h.isNegative=h.isNeg=function(){return this.s<0};h.isPositive=h.isPos=function(){return this.s>0};h.isZero=function(){return!!this.d&&this.d[0]===0};h.lessThan=h.lt=function(e){return this.cmp(e)<0};h.lessThanOrEqualTo=h.lte=function(e){return this.cmp(e)<1};h.logarithm=h.log=function(e){var n,i,t,r,s,o,u,l,f=this,c=f.constructor,a=c.precision,d=c.rounding,g=5;if(e==null)e=new c(10),n=!0;else{if(e=new c(e),i=e.d,e.s<0||!i||!i[0]||e.eq(1))return new c(NaN);n=e.eq(10)}if(i=f.d,f.s<0||!i||!i[0]||f.eq(1))return new c(i&&!i[0]?-1/0:f.s!=1?NaN:i?0:1/0);if(n)if(i.length>1)s=!0;else{for(r=i[0];r%10===0;)r/=10;s=r!==1}if(w=!1,u=a+g,o=B(f,u),t=n?se(c,u+10):B(e,u),l=S(o,t,u,1),x(l.d,r=a,d))do if(u+=10,o=B(f,u),t=n?se(c,u+10):B(e,u),l=S(o,t,u,1),!s){+O(l.d).slice(r+1,r+15)+1==1e14&&(l=p(l,a+1,0));break}while(x(l.d,r+=10,d));return w=!0,p(l,a,d)};h.minus=h.sub=function(e){var n,i,t,r,s,o,u,l,f,c,a,d,g=this,v=g.constructor;if(e=new v(e),!g.d||!e.d)return!g.s||!e.s?e=new v(NaN):g.d?e.s=-e.s:e=new v(e.d||g.s!==e.s?g:NaN),e;if(g.s!=e.s)return e.s=-e.s,g.plus(e);if(f=g.d,d=e.d,u=v.precision,l=v.rounding,!f[0]||!d[0]){if(d[0])e.s=-e.s;else if(f[0])e=new v(g);else return new v(l===3?-0:0);return w?p(e,u,l):e}if(i=b(e.e/m),c=b(g.e/m),f=f.slice(),s=c-i,s){for(a=s<0,a?(n=f,s=-s,o=d.length):(n=d,i=c,o=f.length),t=Math.max(Math.ceil(u/m),o)+2,s>t&&(s=t,n.length=1),n.reverse(),t=s;t--;)n.push(0);n.reverse()}else{for(t=f.length,o=d.length,a=t0;--t)f[o++]=0;for(t=d.length;t>s;){if(f[--t]o?s+1:o+1,r>o&&(r=o,i.length=1),i.reverse();r--;)i.push(0);i.reverse()}for(o=f.length,r=c.length,o-r<0&&(r=o,i=c,c=f,f=i),n=0;r;)n=(f[--r]=f[r]+c[r]+n)/D|0,f[r]%=D;for(n&&(f.unshift(n),++t),o=f.length;f[--o]==0;)f.pop();return e.d=f,e.e=ue(f,t),w?p(e,u,l):e};h.precision=h.sd=function(e){var n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(V+e);return i.d?(n=Ze(i.d),e&&i.e+1>n&&(n=i.e+1)):n=NaN,n};h.round=function(){var e=this,n=e.constructor;return p(new n(e),e.e+1,n.rounding)};h.sine=h.sin=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=un(t,$e(t,i)),t.precision=e,t.rounding=n,p(Z>2?i.neg():i,e,n,!0)):new t(NaN)};h.squareRoot=h.sqrt=function(){var e,n,i,t,r,s,o=this,u=o.d,l=o.e,f=o.s,c=o.constructor;if(f!==1||!u||!u[0])return new c(!f||f<0&&(!u||u[0])?NaN:u?o:1/0);for(w=!1,f=Math.sqrt(+o),f==0||f==1/0?(n=O(u),(n.length+l)%2==0&&(n+="0"),f=Math.sqrt(n),l=b((l+1)/2)-(l<0||l%2),f==1/0?n="5e"+l:(n=f.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),t=new c(n)):t=new c(f.toString()),i=(l=c.precision)+3;;)if(s=t,t=s.plus(S(o,s,i+2,1)).times(.5),O(s.d).slice(0,i)===(n=O(t.d)).slice(0,i))if(n=n.slice(i-3,i+1),n=="9999"||!r&&n=="4999"){if(!r&&(p(s,l+1,0),s.times(s).eq(o))){t=s;break}i+=4,r=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(p(t,l+1,1),e=!t.times(t).eq(o));break}return w=!0,p(t,l,c.rounding,e)};h.tangent=h.tan=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+10,t.rounding=1,i=i.sin(),i.s=1,i=S(i,new t(1).minus(i.times(i)).sqrt(),e+10,0),t.precision=e,t.rounding=n,p(Z==2||Z==4?i.neg():i,e,n,!0)):new t(NaN)};h.times=h.mul=function(e){var n,i,t,r,s,o,u,l,f,c=this,a=c.constructor,d=c.d,g=(e=new a(e)).d;if(e.s*=c.s,!d||!d[0]||!g||!g[0])return new a(!e.s||d&&!d[0]&&!g||g&&!g[0]&&!d?NaN:!d||!g?e.s/0:e.s*0);for(i=b(c.e/m)+b(e.e/m),l=d.length,f=g.length,l=0;){for(n=0,r=l+t;r>t;)u=s[r]+g[t]*d[r-t-1]+n,s[r--]=u%D|0,n=u/D|0;s[r]=(s[r]+n)%D|0}for(;!s[--o];)s.pop();return n?++i:s.shift(),e.d=s,e.e=ue(s,i),w?p(e,a.precision,a.rounding):e};h.toBinary=function(e,n){return ke(this,2,e,n)};h.toDecimalPlaces=h.toDP=function(e,n){var i=this,t=i.constructor;return i=new t(i),e===void 0?i:(_(e,0,$),n===void 0?n=t.rounding:_(n,0,8),p(i,e+i.e+1,n))};h.toExponential=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=F(t,!0):(_(e,0,$),n===void 0?n=r.rounding:_(n,0,8),t=p(new r(t),e+1,n),i=F(t,!0,e+1)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toFixed=function(e,n){var i,t,r=this,s=r.constructor;return e===void 0?i=F(r):(_(e,0,$),n===void 0?n=s.rounding:_(n,0,8),t=p(new s(r),e+r.e+1,n),i=F(t,!1,e+t.e+1)),r.isNeg()&&!r.isZero()?"-"+i:i};h.toFraction=function(e){var n,i,t,r,s,o,u,l,f,c,a,d,g=this,v=g.d,N=g.constructor;if(!v)return new N(g);if(f=i=new N(1),t=l=new N(0),n=new N(t),s=n.e=Ze(v)-g.e-1,o=s%m,n.d[0]=C(10,o<0?m+o:o),e==null)e=s>0?n:f;else{if(u=new N(e),!u.isInt()||u.lt(f))throw Error(V+u);e=u.gt(n)?s>0?n:f:u}for(w=!1,u=new N(O(v)),c=N.precision,N.precision=s=v.length*m*2;a=S(u,n,0,1,1),r=i.plus(a.times(t)),r.cmp(e)!=1;)i=t,t=r,r=f,f=l.plus(a.times(r)),l=r,r=n,n=u.minus(a.times(r)),u=r;return r=S(e.minus(i),t,0,1,1),l=l.plus(r.times(f)),i=i.plus(r.times(t)),l.s=f.s=g.s,d=S(f,t,s,1).minus(g).abs().cmp(S(l,i,s,1).minus(g).abs())<1?[f,t]:[l,i],N.precision=c,w=!0,d};h.toHexadecimal=h.toHex=function(e,n){return ke(this,16,e,n)};h.toNearest=function(e,n){var i=this,t=i.constructor;if(i=new t(i),e==null){if(!i.d)return i;e=new t(1),n=t.rounding}else{if(e=new t(e),n===void 0?n=t.rounding:_(n,0,8),!i.d)return e.s?i:e;if(!e.d)return e.s&&(e.s=i.s),e}return e.d[0]?(w=!1,i=S(i,e,0,n,1).times(e),w=!0,p(i)):(e.s=i.s,i=e),i};h.toNumber=function(){return+this};h.toOctal=function(e,n){return ke(this,8,e,n)};h.toPower=h.pow=function(e){var n,i,t,r,s,o,u=this,l=u.constructor,f=+(e=new l(e));if(!u.d||!e.d||!u.d[0]||!e.d[0])return new l(C(+u,f));if(u=new l(u),u.eq(1))return u;if(t=l.precision,s=l.rounding,e.eq(1))return p(u,t,s);if(n=b(e.e/m),n>=e.d.length-1&&(i=f<0?-f:f)<=tn)return r=Ue(l,u,i,t),e.s<0?new l(1).div(r):p(r,t,s);if(o=u.s,o<0){if(nl.maxE+1||n0?o/0:0):(w=!1,l.rounding=u.s=1,i=Math.min(12,(n+"").length),r=Ee(e.times(B(u,t+i)),t),r.d&&(r=p(r,t+5,1),x(r.d,t,s)&&(n=t+10,r=p(Ee(e.times(B(u,n+i)),n),n+5,1),+O(r.d).slice(t+1,t+15)+1==1e14&&(r=p(r,t+1,0)))),r.s=o,w=!0,l.rounding=s,p(r,t,s))};h.toPrecision=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=F(t,t.e<=r.toExpNeg||t.e>=r.toExpPos):(_(e,1,$),n===void 0?n=r.rounding:_(n,0,8),t=p(new r(t),e,n),i=F(t,e<=t.e||t.e<=r.toExpNeg,e)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toSignificantDigits=h.toSD=function(e,n){var i=this,t=i.constructor;return e===void 0?(e=t.precision,n=t.rounding):(_(e,1,$),n===void 0?n=t.rounding:_(n,0,8)),p(new t(i),e,n)};h.toString=function(){var e=this,n=e.constructor,i=F(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()&&!e.isZero()?"-"+i:i};h.truncated=h.trunc=function(){return p(new this.constructor(this),this.e+1,1)};h.valueOf=h.toJSON=function(){var e=this,n=e.constructor,i=F(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()?"-"+i:i};function O(e){var n,i,t,r=e.length-1,s="",o=e[0];if(r>0){for(s+=o,n=1;ni)throw Error(V+e)}function x(e,n,i,t){var r,s,o,u;for(s=e[0];s>=10;s/=10)--n;return--n<0?(n+=m,r=0):(r=Math.ceil((n+1)/m),n%=m),s=C(10,m-n),u=e[r]%s|0,t==null?n<3?(n==0?u=u/100|0:n==1&&(u=u/10|0),o=i<4&&u==99999||i>3&&u==49999||u==5e4||u==0):o=(i<4&&u+1==s||i>3&&u+1==s/2)&&(e[r+1]/s/100|0)==C(10,n-2)-1||(u==s/2||u==0)&&(e[r+1]/s/100|0)==0:n<4?(n==0?u=u/1e3|0:n==1?u=u/100|0:n==2&&(u=u/10|0),o=(t||i<4)&&u==9999||!t&&i>3&&u==4999):o=((t||i<4)&&u+1==s||!t&&i>3&&u+1==s/2)&&(e[r+1]/s/1e3|0)==C(10,n-3)-1,o}function ie(e,n,i){for(var t,r=[0],s,o=0,u=e.length;oi-1&&(r[t+1]===void 0&&(r[t+1]=0),r[t+1]+=r[t]/i|0,r[t]%=i)}return r.reverse()}function sn(e,n){var i,t,r;if(n.isZero())return n;t=n.d.length,t<32?(i=Math.ceil(t/3),r=(1/fe(4,i)).toString()):(i=16,r="2.3283064365386962890625e-10"),e.precision+=i,n=j(e,1,n.times(r),new e(1));for(var s=i;s--;){var o=n.times(n);n=o.times(o).minus(o).times(8).plus(1)}return e.precision-=i,n}var S=function(){function e(t,r,s){var o,u=0,l=t.length;for(t=t.slice();l--;)o=t[l]*r+u,t[l]=o%s|0,u=o/s|0;return u&&t.unshift(u),t}function n(t,r,s,o){var u,l;if(s!=o)l=s>o?1:-1;else for(u=l=0;ur[u]?1:-1;break}return l}function i(t,r,s,o){for(var u=0;s--;)t[s]-=u,u=t[s]1;)t.shift()}return function(t,r,s,o,u,l){var f,c,a,d,g,v,N,A,M,q,E,P,Y,I,le,z,W,ce,T,y,ee=t.constructor,ae=t.s==r.s?1:-1,R=t.d,k=r.d;if(!R||!R[0]||!k||!k[0])return new ee(!t.s||!r.s||(R?k&&R[0]==k[0]:!k)?NaN:R&&R[0]==0||!k?ae*0:ae/0);for(l?(g=1,c=t.e-r.e):(l=D,g=m,c=b(t.e/g)-b(r.e/g)),T=k.length,W=R.length,M=new ee(ae),q=M.d=[],a=0;k[a]==(R[a]||0);a++);if(k[a]>(R[a]||0)&&c--,s==null?(I=s=ee.precision,o=ee.rounding):u?I=s+(t.e-r.e)+1:I=s,I<0)q.push(1),v=!0;else{if(I=I/g+2|0,a=0,T==1){for(d=0,k=k[0],I++;(a1&&(k=e(k,d,l),R=e(R,d,l),T=k.length,W=R.length),z=T,E=R.slice(0,T),P=E.length;P=l/2&&++ce;do d=0,f=n(k,E,T,P),f<0?(Y=E[0],T!=P&&(Y=Y*l+(E[1]||0)),d=Y/ce|0,d>1?(d>=l&&(d=l-1),N=e(k,d,l),A=N.length,P=E.length,f=n(N,E,A,P),f==1&&(d--,i(N,T=10;d/=10)a++;M.e=a+c*g-1,p(M,u?s+M.e+1:s,o,v)}return M}}();function p(e,n,i,t){var r,s,o,u,l,f,c,a,d,g=e.constructor;e:if(n!=null){if(a=e.d,!a)return e;for(r=1,u=a[0];u>=10;u/=10)r++;if(s=n-r,s<0)s+=m,o=n,c=a[d=0],l=c/C(10,r-o-1)%10|0;else if(d=Math.ceil((s+1)/m),u=a.length,d>=u)if(t){for(;u++<=d;)a.push(0);c=l=0,r=1,s%=m,o=s-m+1}else break e;else{for(c=u=a[d],r=1;u>=10;u/=10)r++;s%=m,o=s-m+r,l=o<0?0:c/C(10,r-o-1)%10|0}if(t=t||n<0||a[d+1]!==void 0||(o<0?c:c%C(10,r-o-1)),f=i<4?(l||t)&&(i==0||i==(e.s<0?3:2)):l>5||l==5&&(i==4||t||i==6&&(s>0?o>0?c/C(10,r-o):0:a[d-1])%10&1||i==(e.s<0?8:7)),n<1||!a[0])return a.length=0,f?(n-=e.e+1,a[0]=C(10,(m-n%m)%m),e.e=-n||0):a[0]=e.e=0,e;if(s==0?(a.length=d,u=1,d--):(a.length=d+1,u=C(10,m-s),a[d]=o>0?(c/C(10,r-o)%C(10,o)|0)*u:0),f)for(;;)if(d==0){for(s=1,o=a[0];o>=10;o/=10)s++;for(o=a[0]+=u,u=1;o>=10;o/=10)u++;s!=u&&(e.e++,a[0]==D&&(a[0]=1));break}else{if(a[d]+=u,a[d]!=D)break;a[d--]=0,u=1}for(s=a.length;a[--s]===0;)a.pop()}return w&&(e.e>g.maxE?(e.d=null,e.e=NaN):e.e0?s=s.charAt(0)+"."+s.slice(1)+U(t):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):r<0?(s="0."+U(-r-1)+s,i&&(t=i-o)>0&&(s+=U(t))):r>=o?(s+=U(r+1-o),i&&(t=i-r-1)>0&&(s=s+"."+U(t))):((t=r+1)0&&(r+1===o&&(s+="."),s+=U(t))),s}function ue(e,n){var i=e[0];for(n*=m;i>=10;i/=10)n++;return n}function se(e,n,i){if(n>rn)throw w=!0,i&&(e.precision=i),Error(Le);return p(new e(te),n,1,!0)}function L(e,n,i){if(n>ve)throw Error(Le);return p(new e(re),n,i,!0)}function Ze(e){var n=e.length-1,i=n*m+1;if(n=e[n],n){for(;n%10==0;n/=10)i--;for(n=e[0];n>=10;n/=10)i++}return i}function U(e){for(var n="";e--;)n+="0";return n}function Ue(e,n,i,t){var r,s=new e(1),o=Math.ceil(t/m+4);for(w=!1;;){if(i%2&&(s=s.times(n),_e(s.d,o)&&(r=!0)),i=b(i/2),i===0){i=s.d.length-1,r&&s.d[i]===0&&++s.d[i];break}n=n.times(n),_e(n.d,o)}return w=!0,s}function Ae(e){return e.d[e.d.length-1]&1}function Be(e,n,i){for(var t,r=new e(n[0]),s=0;++s17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(n==null?(w=!1,l=v):l=n,u=new d(.03125);e.e>-2;)e=e.times(u),a+=5;for(t=Math.log(C(2,a))/Math.LN10*2+5|0,l+=t,i=s=o=new d(1),d.precision=l;;){if(s=p(s.times(e),l,1),i=i.times(++c),u=o.plus(S(s,i,l,1)),O(u.d).slice(0,l)===O(o.d).slice(0,l)){for(r=a;r--;)o=p(o.times(o),l,1);if(n==null)if(f<3&&x(o.d,l-t,g,f))d.precision=l+=10,i=s=u=new d(1),c=0,f++;else return p(o,d.precision=v,g,w=!0);else return d.precision=v,o}o=u}}function B(e,n){var i,t,r,s,o,u,l,f,c,a,d,g=1,v=10,N=e,A=N.d,M=N.constructor,q=M.rounding,E=M.precision;if(N.s<0||!A||!A[0]||!N.e&&A[0]==1&&A.length==1)return new M(A&&!A[0]?-1/0:N.s!=1?NaN:A?0:N);if(n==null?(w=!1,c=E):c=n,M.precision=c+=v,i=O(A),t=i.charAt(0),Math.abs(s=N.e)<15e14){for(;t<7&&t!=1||t==1&&i.charAt(1)>3;)N=N.times(e),i=O(N.d),t=i.charAt(0),g++;s=N.e,t>1?(N=new M("0."+i),s++):N=new M(t+"."+i.slice(1))}else return f=se(M,c+2,E).times(s+""),N=B(new M(t+"."+i.slice(1)),c-v).plus(f),M.precision=E,n==null?p(N,E,q,w=!0):N;for(a=N,l=o=N=S(N.minus(1),N.plus(1),c,1),d=p(N.times(N),c,1),r=3;;){if(o=p(o.times(d),c,1),f=l.plus(S(o,new M(r),c,1)),O(f.d).slice(0,c)===O(l.d).slice(0,c))if(l=l.times(2),s!==0&&(l=l.plus(se(M,c+2,E).times(s+""))),l=S(l,new M(g),c,1),n==null)if(x(l.d,c-v,q,u))M.precision=c+=v,f=o=N=S(a.minus(1),a.plus(1),c,1),d=p(N.times(N),c,1),r=u=1;else return p(l,M.precision=E,q,w=!0);else return M.precision=E,l;l=f,r+=2}}function Ve(e){return String(e.s*e.s/0)}function Se(e,n){var i,t,r;for((i=n.indexOf("."))>-1&&(n=n.replace(".","")),(t=n.search(/e/i))>0?(i<0&&(i=t),i+=+n.slice(t+1),n=n.substring(0,t)):i<0&&(i=n.length),t=0;n.charCodeAt(t)===48;t++);for(r=n.length;n.charCodeAt(r-1)===48;--r);if(n=n.slice(t,r),n){if(r-=t,e.e=i=i-t-1,e.d=[],t=(i+1)%m,i<0&&(t+=m),te.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(n=n.replace(/(\d)_(?=\d)/g,"$1"),Ie.test(n))return Se(e,n)}else if(n==="Infinity"||n==="NaN")return+n||(e.s=NaN),e.e=NaN,e.d=null,e;if(en.test(n))i=16,n=n.toLowerCase();else if(ye.test(n))i=2;else if(nn.test(n))i=8;else throw Error(V+n);for(s=n.search(/p/i),s>0?(l=+n.slice(s+1),n=n.substring(2,s)):n=n.slice(2),s=n.indexOf("."),o=s>=0,t=e.constructor,o&&(n=n.replace(".",""),u=n.length,s=u-s,r=Ue(t,new t(i),s,s*2)),f=ie(n,i,D),c=f.length-1,s=c;f[s]===0;--s)f.pop();return s<0?new t(e.s*0):(e.e=ue(f,c),e.d=f,w=!1,o&&(e=S(e,r,u*4)),l&&(e=e.times(Math.abs(l)<54?C(2,l):Q.pow(2,l))),w=!0,e)}function un(e,n){var i,t=n.d.length;if(t<3)return n.isZero()?n:j(e,2,n,n);i=1.4*Math.sqrt(t),i=i>16?16:i|0,n=n.times(1/fe(5,i)),n=j(e,2,n,n);for(var r,s=new e(5),o=new e(16),u=new e(20);i--;)r=n.times(n),n=n.times(s.plus(r.times(o.times(r).minus(u))));return n}function j(e,n,i,t,r){var s,o,u,l,f=1,c=e.precision,a=Math.ceil(c/m);for(w=!1,l=i.times(i),u=new e(t);;){if(o=S(u.times(l),new e(n++*n++),c,1),u=r?t.plus(o):t.minus(o),t=S(o.times(l),new e(n++*n++),c,1),o=u.plus(t),o.d[a]!==void 0){for(s=a;o.d[s]===u.d[s]&&s--;);if(s==-1)break}s=u,u=t,t=o,o=s,f++}return w=!0,o.d.length=a+1,o}function fe(e,n){for(var i=e;--n;)i*=e;return i}function $e(e,n){var i,t=n.s<0,r=L(e,e.precision,1),s=r.times(.5);if(n=n.abs(),n.lte(s))return Z=t?4:1,n;if(i=n.divToInt(r),i.isZero())Z=t?3:2;else{if(n=n.minus(i.times(r)),n.lte(s))return Z=Ae(i)?t?2:3:t?4:1,n;Z=Ae(i)?t?1:4:t?3:2}return n.minus(r).abs()}function ke(e,n,i,t){var r,s,o,u,l,f,c,a,d,g=e.constructor,v=i!==void 0;if(v?(_(i,1,$),t===void 0?t=g.rounding:_(t,0,8)):(i=g.precision,t=g.rounding),!e.isFinite())c=Ve(e);else{for(c=F(e),o=c.indexOf("."),v?(r=2,n==16?i=i*4-3:n==8&&(i=i*3-2)):r=n,o>=0&&(c=c.replace(".",""),d=new g(1),d.e=c.length-o,d.d=ie(F(d),10,r),d.e=d.d.length),a=ie(c,10,r),s=l=a.length;a[--l]==0;)a.pop();if(!a[0])c=v?"0p+0":"0";else{if(o<0?s--:(e=new g(e),e.d=a,e.e=s,e=S(e,d,i,t,0,r),a=e.d,s=e.e,f=Te),o=a[i],u=r/2,f=f||a[i+1]!==void 0,f=t<4?(o!==void 0||f)&&(t===0||t===(e.s<0?3:2)):o>u||o===u&&(t===4||f||t===6&&a[i-1]&1||t===(e.s<0?8:7)),a.length=i,f)for(;++a[--i]>r-1;)a[i]=0,i||(++s,a.unshift(1));for(l=a.length;!a[l-1];--l);for(o=0,c="";o1)if(n==16||n==8){for(o=n==16?4:3,--l;l%o;l++)c+="0";for(a=ie(c,r,n),l=a.length;!a[l-1];--l);for(o=1,c="1.";ol)for(s-=l;s--;)c+="0";else sn)return e.length=n,!0}function fn(e){return new this(e).abs()}function ln(e){return new this(e).acos()}function cn(e){return new this(e).acosh()}function an(e,n){return new this(e).plus(n)}function dn(e){return new this(e).asin()}function hn(e){return new this(e).asinh()}function pn(e){return new this(e).atan()}function gn(e){return new this(e).atanh()}function mn(e,n){e=new this(e),n=new this(n);var i,t=this.precision,r=this.rounding,s=t+4;return!e.s||!n.s?i=new this(NaN):!e.d&&!n.d?(i=L(this,s,1).times(n.s>0?.25:.75),i.s=e.s):!n.d||e.isZero()?(i=n.s<0?L(this,t,r):new this(0),i.s=e.s):!e.d||n.isZero()?(i=L(this,s,1).times(.5),i.s=e.s):n.s<0?(this.precision=s,this.rounding=1,i=this.atan(S(e,n,s,1)),n=L(this,s,1),this.precision=t,this.rounding=r,i=e.s<0?i.minus(n):i.plus(n)):i=this.atan(S(e,n,s,1)),i}function wn(e){return new this(e).cbrt()}function Nn(e){return p(e=new this(e),e.e+1,2)}function vn(e,n,i){return new this(e).clamp(n,i)}function En(e){if(!e||typeof e!="object")throw Error(oe+"Object expected");var n,i,t,r=e.defaults===!0,s=["precision",1,$,"rounding",0,8,"toExpNeg",-H,0,"toExpPos",0,H,"maxE",0,H,"minE",-H,0,"modulo",0,9];for(n=0;n=s[n+1]&&t<=s[n+2])this[i]=t;else throw Error(V+i+": "+t);if(i="crypto",r&&(this[i]=Ne[i]),(t=e[i])!==void 0)if(t===!0||t===!1||t===0||t===1)if(t)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[i]=!0;else throw Error(De);else this[i]=!1;else throw Error(V+i+": "+t);return this}function Sn(e){return new this(e).cos()}function kn(e){return new this(e).cosh()}function He(e){var n,i,t;function r(s){var o,u,l,f=this;if(!(f instanceof r))return new r(s);if(f.constructor=r,qe(s)){f.s=s.s,w?!s.d||s.e>r.maxE?(f.e=NaN,f.d=null):s.e=10;u/=10)o++;w?o>r.maxE?(f.e=NaN,f.d=null):o=429e7?n[s]=crypto.getRandomValues(new Uint32Array(1))[0]:u[s++]=r%1e7;else if(crypto.randomBytes){for(n=crypto.randomBytes(t*=4);s=214e7?crypto.randomBytes(4).copy(n,s):(u.push(r%1e7),s+=4);s=t/4}else throw Error(De);else for(;s=10;r/=10)t++;t + * MIT Licence + *) +*/ +//# sourceMappingURL=index-browser.js.map diff --git a/apps/api/release/vendor/@prisma/client/runtime/library.d.ts b/apps/api/release/vendor/@prisma/client/runtime/library.d.ts new file mode 100644 index 0000000..d92cd02 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/library.d.ts @@ -0,0 +1,3403 @@ +/** + * @param this + */ +declare function $extends(this: Client, extension: ExtensionArgs | ((client: Client) => Client)): Client; + +declare type AccelerateEngineConfig = { + inlineSchema: EngineConfig['inlineSchema']; + inlineSchemaHash: EngineConfig['inlineSchemaHash']; + env: EngineConfig['env']; + generator?: { + previewFeatures: string[]; + }; + inlineDatasources: EngineConfig['inlineDatasources']; + overrideDatasources: EngineConfig['overrideDatasources']; + clientVersion: EngineConfig['clientVersion']; + engineVersion: EngineConfig['engineVersion']; + logEmitter: EngineConfig['logEmitter']; + logQueries?: EngineConfig['logQueries']; + logLevel?: EngineConfig['logLevel']; + tracingHelper: EngineConfig['tracingHelper']; + accelerateUtils?: EngineConfig['accelerateUtils']; +}; + +export declare type Action = keyof typeof DMMF.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw'; + +declare type ActiveConnectorType = Exclude; + +export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum'; + +export declare type AllModelsToStringIndex, K extends PropertyKey> = Args extends { + [P in K]: { + $allModels: infer AllModels; + }; +} ? { + [P in K]: Record; +} : {}; + +declare class AnyNull extends NullTypesEnumValue { +} + +export declare type ApplyOmit = Compute<{ + [K in keyof T as OmitValue extends true ? never : K]: T[K]; +}>; + +export declare type Args = T extends { + [K: symbol]: { + types: { + operations: { + [K in F]: { + args: any; + }; + }; + }; + }; +} ? T[symbol]['types']['operations'][F]['args'] : any; + +export declare type Args_3 = Args; + +/** + * Original `quaint::ValueType` enum tag from Prisma's `quaint`. + * Query arguments marked with this type are sanitized before being sent to the database. + * Notice while a query argument may be `null`, `ArgType` is guaranteed to be defined. + */ +declare type ArgType = 'Int32' | 'Int64' | 'Float' | 'Double' | 'Text' | 'Enum' | 'EnumArray' | 'Bytes' | 'Boolean' | 'Char' | 'Array' | 'Numeric' | 'Json' | 'Xml' | 'Uuid' | 'DateTime' | 'Date' | 'Time'; + +/** + * Attributes is a map from string to attribute values. + * + * Note: only the own enumerable keys are counted as valid attribute keys. + */ +declare interface Attributes { + [attributeKey: string]: AttributeValue | undefined; +} + +/** + * Attribute values may be any non-nullish primitive value except an object. + * + * null or undefined attribute values are invalid and will result in undefined behavior. + */ +declare type AttributeValue = string | number | boolean | Array | Array | Array; + +export declare type BaseDMMF = { + readonly datamodel: Omit; +}; + +declare type BatchArgs = { + queries: BatchQuery[]; + transaction?: { + isolationLevel?: IsolationLevel; + }; +}; + +declare type BatchInternalParams = { + requests: RequestParams[]; + customDataProxyFetch?: CustomDataProxyFetch; +}; + +declare type BatchQuery = { + model: string | undefined; + operation: string; + args: JsArgs | RawQueryArgs; +}; + +declare type BatchQueryEngineResult = QueryEngineResult | Error; + +declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise; + +declare type BatchQueryOptionsCbArgs = { + args: BatchArgs; + query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise; + __internalParams: BatchInternalParams; +}; + +declare type BatchTransactionOptions = { + isolationLevel?: Transaction_2.IsolationLevel; +}; + +declare interface BinaryTargetsEnvValue { + fromEnvVar: string | null; + value: string; + native?: boolean; +} + +export declare type Call = (F & { + params: P; +})['returns']; + +declare interface CallSite { + getLocation(): LocationInFile | null; +} + +export declare type Cast = A extends W ? A : W; + +declare type Client = ReturnType extends new () => infer T ? T : never; + +export declare type ClientArg = { + [MethodName in string]: unknown; +}; + +export declare type ClientArgs = { + client: ClientArg; +}; + +export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; + +export declare type ClientOptionDef = undefined | { + [K in string]: any; +}; + +export declare type ClientOtherOps = { + $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; + $queryRawTyped(query: TypedSql): PrismaPromise; + $queryRawUnsafe(query: string, ...values: any[]): PrismaPromise; + $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; + $executeRawUnsafe(query: string, ...values: any[]): PrismaPromise; + $runCommandRaw(command: InputJsonObject): PrismaPromise; +}; + +declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum]; + +declare const ColumnTypeEnum: { + readonly Int32: 0; + readonly Int64: 1; + readonly Float: 2; + readonly Double: 3; + readonly Numeric: 4; + readonly Boolean: 5; + readonly Character: 6; + readonly Text: 7; + readonly Date: 8; + readonly Time: 9; + readonly DateTime: 10; + readonly Json: 11; + readonly Enum: 12; + readonly Bytes: 13; + readonly Set: 14; + readonly Uuid: 15; + readonly Int32Array: 64; + readonly Int64Array: 65; + readonly FloatArray: 66; + readonly DoubleArray: 67; + readonly NumericArray: 68; + readonly BooleanArray: 69; + readonly CharacterArray: 70; + readonly TextArray: 71; + readonly DateArray: 72; + readonly TimeArray: 73; + readonly DateTimeArray: 74; + readonly JsonArray: 75; + readonly EnumArray: 76; + readonly BytesArray: 77; + readonly UuidArray: 78; + readonly UnknownNumber: 128; +}; + +export declare type Compute = T extends Function ? T : { + [K in keyof T]: T[K]; +} & unknown; + +export declare type ComputeDeep = T extends Function ? T : { + [K in keyof T]: ComputeDeep; +} & unknown; + +declare type ComputedField = { + name: string; + needs: string[]; + compute: ResultArgsFieldCompute; +}; + +declare type ComputedFieldsMap = { + [fieldName: string]: ComputedField; +}; + +declare type ConnectionInfo = { + schemaName?: string; + maxBindValues?: number; +}; + +declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | 'sqlserver' | 'cockroachdb'; + +declare interface Context { + /** + * Get a value from the context. + * + * @param key key which identifies a context value + */ + getValue(key: symbol): unknown; + /** + * Create a new context which inherits from this context and has + * the given key set to the given value. + * + * @param key context key for which to set the value + * @param value value to set for the given key + */ + setValue(key: symbol, value: unknown): Context; + /** + * Return a new context which inherits from this context but does + * not contain a value for the given key. + * + * @param key context key for which to clear a value + */ + deleteValue(key: symbol): Context; +} + +declare type Context_2 = T extends { + [K: symbol]: { + ctx: infer C; + }; +} ? C & T & { + /** + * @deprecated Use `$name` instead. + */ + name?: string; + $name?: string; + $parent?: unknown; +} : T & { + /** + * @deprecated Use `$name` instead. + */ + name?: string; + $name?: string; + $parent?: unknown; +}; + +export declare type Count = { + [K in keyof O]: Count; +} & {}; + +declare type CustomDataProxyFetch = (fetch: Fetch) => Fetch; + +declare class DataLoader { + private options; + batches: { + [key: string]: Job[]; + }; + private tickActive; + constructor(options: DataLoaderOptions); + request(request: T): Promise; + private dispatchBatches; + get [Symbol.toStringTag](): string; +} + +declare type DataLoaderOptions = { + singleLoader: (request: T) => Promise; + batchLoader: (request: T[]) => Promise; + batchBy: (request: T) => string | undefined; + batchOrder: (requestA: T, requestB: T) => number; +}; + +declare type Datasource = { + url?: string; +}; + +declare type Datasources = { + [name in string]: Datasource; +}; + +declare class DbNull extends NullTypesEnumValue { +} + +export declare const Debug: typeof debugCreate & { + enable(namespace: any): void; + disable(): any; + enabled(namespace: string): boolean; + log: (...args: string[]) => void; + formatters: {}; +}; + +/** + * Create a new debug instance with the given namespace. + * + * @example + * ```ts + * import Debug from '@prisma/debug' + * const debug = Debug('prisma:client') + * debug('Hello World') + * ``` + */ +declare function debugCreate(namespace: string): ((...args: any[]) => void) & { + color: string; + enabled: boolean; + namespace: string; + log: (...args: string[]) => void; + extend: () => void; +}; + +export declare namespace Decimal { + export type Constructor = typeof Decimal; + export type Instance = Decimal; + export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; + export type Modulo = Rounding | 9; + export type Value = string | number | Decimal; + + // http://mikemcl.github.io/decimal.js/#constructor-properties + export interface Config { + precision?: number; + rounding?: Rounding; + toExpNeg?: number; + toExpPos?: number; + minE?: number; + maxE?: number; + crypto?: boolean; + modulo?: Modulo; + defaults?: boolean; + } +} + +export declare class Decimal { + readonly d: number[]; + readonly e: number; + readonly s: number; + + constructor(n: Decimal.Value); + + absoluteValue(): Decimal; + abs(): Decimal; + + ceil(): Decimal; + + clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; + clamp(min: Decimal.Value, max: Decimal.Value): Decimal; + + comparedTo(n: Decimal.Value): number; + cmp(n: Decimal.Value): number; + + cosine(): Decimal; + cos(): Decimal; + + cubeRoot(): Decimal; + cbrt(): Decimal; + + decimalPlaces(): number; + dp(): number; + + dividedBy(n: Decimal.Value): Decimal; + div(n: Decimal.Value): Decimal; + + dividedToIntegerBy(n: Decimal.Value): Decimal; + divToInt(n: Decimal.Value): Decimal; + + equals(n: Decimal.Value): boolean; + eq(n: Decimal.Value): boolean; + + floor(): Decimal; + + greaterThan(n: Decimal.Value): boolean; + gt(n: Decimal.Value): boolean; + + greaterThanOrEqualTo(n: Decimal.Value): boolean; + gte(n: Decimal.Value): boolean; + + hyperbolicCosine(): Decimal; + cosh(): Decimal; + + hyperbolicSine(): Decimal; + sinh(): Decimal; + + hyperbolicTangent(): Decimal; + tanh(): Decimal; + + inverseCosine(): Decimal; + acos(): Decimal; + + inverseHyperbolicCosine(): Decimal; + acosh(): Decimal; + + inverseHyperbolicSine(): Decimal; + asinh(): Decimal; + + inverseHyperbolicTangent(): Decimal; + atanh(): Decimal; + + inverseSine(): Decimal; + asin(): Decimal; + + inverseTangent(): Decimal; + atan(): Decimal; + + isFinite(): boolean; + + isInteger(): boolean; + isInt(): boolean; + + isNaN(): boolean; + + isNegative(): boolean; + isNeg(): boolean; + + isPositive(): boolean; + isPos(): boolean; + + isZero(): boolean; + + lessThan(n: Decimal.Value): boolean; + lt(n: Decimal.Value): boolean; + + lessThanOrEqualTo(n: Decimal.Value): boolean; + lte(n: Decimal.Value): boolean; + + logarithm(n?: Decimal.Value): Decimal; + log(n?: Decimal.Value): Decimal; + + minus(n: Decimal.Value): Decimal; + sub(n: Decimal.Value): Decimal; + + modulo(n: Decimal.Value): Decimal; + mod(n: Decimal.Value): Decimal; + + naturalExponential(): Decimal; + exp(): Decimal; + + naturalLogarithm(): Decimal; + ln(): Decimal; + + negated(): Decimal; + neg(): Decimal; + + plus(n: Decimal.Value): Decimal; + add(n: Decimal.Value): Decimal; + + precision(includeZeros?: boolean): number; + sd(includeZeros?: boolean): number; + + round(): Decimal; + + sine() : Decimal; + sin() : Decimal; + + squareRoot(): Decimal; + sqrt(): Decimal; + + tangent() : Decimal; + tan() : Decimal; + + times(n: Decimal.Value): Decimal; + mul(n: Decimal.Value) : Decimal; + + toBinary(significantDigits?: number): string; + toBinary(significantDigits: number, rounding: Decimal.Rounding): string; + + toDecimalPlaces(decimalPlaces?: number): Decimal; + toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + toDP(decimalPlaces?: number): Decimal; + toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + + toExponential(decimalPlaces?: number): string; + toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFixed(decimalPlaces?: number): string; + toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFraction(max_denominator?: Decimal.Value): Decimal[]; + + toHexadecimal(significantDigits?: number): string; + toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; + toHex(significantDigits?: number): string; + toHex(significantDigits: number, rounding?: Decimal.Rounding): string; + + toJSON(): string; + + toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; + + toNumber(): number; + + toOctal(significantDigits?: number): string; + toOctal(significantDigits: number, rounding: Decimal.Rounding): string; + + toPower(n: Decimal.Value): Decimal; + pow(n: Decimal.Value): Decimal; + + toPrecision(significantDigits?: number): string; + toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; + + toSignificantDigits(significantDigits?: number): Decimal; + toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; + toSD(significantDigits?: number): Decimal; + toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; + + toString(): string; + + truncated(): Decimal; + trunc(): Decimal; + + valueOf(): string; + + static abs(n: Decimal.Value): Decimal; + static acos(n: Decimal.Value): Decimal; + static acosh(n: Decimal.Value): Decimal; + static add(x: Decimal.Value, y: Decimal.Value): Decimal; + static asin(n: Decimal.Value): Decimal; + static asinh(n: Decimal.Value): Decimal; + static atan(n: Decimal.Value): Decimal; + static atanh(n: Decimal.Value): Decimal; + static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; + static cbrt(n: Decimal.Value): Decimal; + static ceil(n: Decimal.Value): Decimal; + static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; + static clone(object?: Decimal.Config): Decimal.Constructor; + static config(object: Decimal.Config): Decimal.Constructor; + static cos(n: Decimal.Value): Decimal; + static cosh(n: Decimal.Value): Decimal; + static div(x: Decimal.Value, y: Decimal.Value): Decimal; + static exp(n: Decimal.Value): Decimal; + static floor(n: Decimal.Value): Decimal; + static hypot(...n: Decimal.Value[]): Decimal; + static isDecimal(object: any): object is Decimal; + static ln(n: Decimal.Value): Decimal; + static log(n: Decimal.Value, base?: Decimal.Value): Decimal; + static log2(n: Decimal.Value): Decimal; + static log10(n: Decimal.Value): Decimal; + static max(...n: Decimal.Value[]): Decimal; + static min(...n: Decimal.Value[]): Decimal; + static mod(x: Decimal.Value, y: Decimal.Value): Decimal; + static mul(x: Decimal.Value, y: Decimal.Value): Decimal; + static noConflict(): Decimal.Constructor; // Browser only + static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; + static random(significantDigits?: number): Decimal; + static round(n: Decimal.Value): Decimal; + static set(object: Decimal.Config): Decimal.Constructor; + static sign(n: Decimal.Value): number; + static sin(n: Decimal.Value): Decimal; + static sinh(n: Decimal.Value): Decimal; + static sqrt(n: Decimal.Value): Decimal; + static sub(x: Decimal.Value, y: Decimal.Value): Decimal; + static sum(...n: Decimal.Value[]): Decimal; + static tan(n: Decimal.Value): Decimal; + static tanh(n: Decimal.Value): Decimal; + static trunc(n: Decimal.Value): Decimal; + + static readonly default?: Decimal.Constructor; + static readonly Decimal?: Decimal.Constructor; + + static readonly precision: number; + static readonly rounding: Decimal.Rounding; + static readonly toExpNeg: number; + static readonly toExpPos: number; + static readonly minE: number; + static readonly maxE: number; + static readonly crypto: boolean; + static readonly modulo: Decimal.Modulo; + + static readonly ROUND_UP: 0; + static readonly ROUND_DOWN: 1; + static readonly ROUND_CEIL: 2; + static readonly ROUND_FLOOR: 3; + static readonly ROUND_HALF_UP: 4; + static readonly ROUND_HALF_DOWN: 5; + static readonly ROUND_HALF_EVEN: 6; + static readonly ROUND_HALF_CEIL: 7; + static readonly ROUND_HALF_FLOOR: 8; + static readonly EUCLID: 9; +} + +/** + * Interface for any Decimal.js-like library + * Allows us to accept Decimal.js from different + * versions and some compatible alternatives + */ +export declare interface DecimalJsLike { + d: number[]; + e: number; + s: number; + toFixed(): string; +} + +export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>; + +export declare type DefaultSelection = Args extends { + omit: infer LocalOmit; +} ? ApplyOmit['default'], PatchFlat>>> : ApplyOmit['default'], ExtractGlobalOmit>>; + +export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void; + +declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client; + +declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$use", "$extends"]; + +export declare function deserializeJsonResponse(result: unknown): unknown; + +export declare type DevTypeMapDef = { + meta: { + modelProps: string; + }; + model: { + [Model in PropertyKey]: { + [Operation in PropertyKey]: DevTypeMapFnDef; + }; + }; + other: { + [Operation in PropertyKey]: DevTypeMapFnDef; + }; +}; + +export declare type DevTypeMapFnDef = { + args: any; + result: any; + payload: OperationPayload; +}; + +export declare namespace DMMF { + export type Document = ReadonlyDeep_2<{ + datamodel: Datamodel; + schema: Schema; + mappings: Mappings; + }>; + export type Mappings = ReadonlyDeep_2<{ + modelOperations: ModelMapping[]; + otherOperations: { + read: string[]; + write: string[]; + }; + }>; + export type OtherOperationMappings = ReadonlyDeep_2<{ + read: string[]; + write: string[]; + }>; + export type DatamodelEnum = ReadonlyDeep_2<{ + name: string; + values: EnumValue[]; + dbName?: string | null; + documentation?: string; + }>; + export type SchemaEnum = ReadonlyDeep_2<{ + name: string; + values: string[]; + }>; + export type EnumValue = ReadonlyDeep_2<{ + name: string; + dbName: string | null; + }>; + export type Datamodel = ReadonlyDeep_2<{ + models: Model[]; + enums: DatamodelEnum[]; + types: Model[]; + indexes: Index[]; + }>; + export type uniqueIndex = ReadonlyDeep_2<{ + name: string; + fields: string[]; + }>; + export type PrimaryKey = ReadonlyDeep_2<{ + name: string | null; + fields: string[]; + }>; + export type Model = ReadonlyDeep_2<{ + name: string; + dbName: string | null; + fields: Field[]; + uniqueFields: string[][]; + uniqueIndexes: uniqueIndex[]; + documentation?: string; + primaryKey: PrimaryKey | null; + isGenerated?: boolean; + }>; + export type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported'; + export type FieldNamespace = 'model' | 'prisma'; + export type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes'; + export type Field = ReadonlyDeep_2<{ + kind: FieldKind; + name: string; + isRequired: boolean; + isList: boolean; + isUnique: boolean; + isId: boolean; + isReadOnly: boolean; + isGenerated?: boolean; + isUpdatedAt?: boolean; + /** + * Describes the data type in the same the way it is defined in the Prisma schema: + * BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName + */ + type: string; + dbName?: string | null; + hasDefaultValue: boolean; + default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[]; + relationFromFields?: string[]; + relationToFields?: string[]; + relationOnDelete?: string; + relationName?: string; + documentation?: string; + }>; + export type FieldDefault = ReadonlyDeep_2<{ + name: string; + args: any[]; + }>; + export type FieldDefaultScalar = string | boolean | number; + export type Index = ReadonlyDeep_2<{ + model: string; + type: IndexType; + isDefinedOnField: boolean; + name?: string; + dbName?: string; + algorithm?: string; + clustered?: boolean; + fields: IndexField[]; + }>; + export type IndexType = 'id' | 'normal' | 'unique' | 'fulltext'; + export type IndexField = ReadonlyDeep_2<{ + name: string; + sortOrder?: SortOrder; + length?: number; + operatorClass?: string; + }>; + export type SortOrder = 'asc' | 'desc'; + export type Schema = ReadonlyDeep_2<{ + rootQueryType?: string; + rootMutationType?: string; + inputObjectTypes: { + model?: InputType[]; + prisma: InputType[]; + }; + outputObjectTypes: { + model: OutputType[]; + prisma: OutputType[]; + }; + enumTypes: { + model?: SchemaEnum[]; + prisma: SchemaEnum[]; + }; + fieldRefTypes: { + prisma?: FieldRefType[]; + }; + }>; + export type Query = ReadonlyDeep_2<{ + name: string; + args: SchemaArg[]; + output: QueryOutput; + }>; + export type QueryOutput = ReadonlyDeep_2<{ + name: string; + isRequired: boolean; + isList: boolean; + }>; + export type TypeRef = { + isList: boolean; + type: string; + location: AllowedLocations; + namespace?: FieldNamespace; + }; + export type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>; + export type SchemaArg = ReadonlyDeep_2<{ + name: string; + comment?: string; + isNullable: boolean; + isRequired: boolean; + inputTypes: InputTypeRef[]; + deprecation?: Deprecation; + }>; + export type OutputType = ReadonlyDeep_2<{ + name: string; + fields: SchemaField[]; + }>; + export type SchemaField = ReadonlyDeep_2<{ + name: string; + isNullable?: boolean; + outputType: OutputTypeRef; + args: SchemaArg[]; + deprecation?: Deprecation; + documentation?: string; + }>; + export type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>; + export type Deprecation = ReadonlyDeep_2<{ + sinceVersion: string; + reason: string; + plannedRemovalVersion?: string; + }>; + export type InputType = ReadonlyDeep_2<{ + name: string; + constraints: { + maxNumFields: number | null; + minNumFields: number | null; + fields?: string[]; + }; + meta?: { + source?: string; + }; + fields: SchemaArg[]; + }>; + export type FieldRefType = ReadonlyDeep_2<{ + name: string; + allowTypes: FieldRefAllowType[]; + fields: SchemaArg[]; + }>; + export type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>; + export type ModelMapping = ReadonlyDeep_2<{ + model: string; + plural: string; + findUnique?: string | null; + findUniqueOrThrow?: string | null; + findFirst?: string | null; + findFirstOrThrow?: string | null; + findMany?: string | null; + create?: string | null; + createMany?: string | null; + createManyAndReturn?: string | null; + update?: string | null; + updateMany?: string | null; + upsert?: string | null; + delete?: string | null; + deleteMany?: string | null; + aggregate?: string | null; + groupBy?: string | null; + count?: string | null; + findRaw?: string | null; + aggregateRaw?: string | null; + }>; + export enum ModelAction { + findUnique = "findUnique", + findUniqueOrThrow = "findUniqueOrThrow", + findFirst = "findFirst", + findFirstOrThrow = "findFirstOrThrow", + findMany = "findMany", + create = "create", + createMany = "createMany", + createManyAndReturn = "createManyAndReturn", + update = "update", + updateMany = "updateMany", + upsert = "upsert", + delete = "delete", + deleteMany = "deleteMany", + groupBy = "groupBy", + count = "count",// TODO: count does not actually exist, why? + aggregate = "aggregate", + findRaw = "findRaw", + aggregateRaw = "aggregateRaw" + } +} + +export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF.Datamodel): RuntimeDataModel; + +export declare interface DriverAdapter extends Queryable { + /** + * Starts new transaction. + */ + transactionContext(): Promise>; + /** + * Optional method that returns extra connection info + */ + getConnectionInfo?(): Result_4; +} + +/** Client */ +export declare type DynamicClientExtensionArgs, ClientOptions> = { + [P in keyof C_]: unknown; +} & { + [K: symbol]: { + ctx: Optional, ITXClientDenyList> & { + $parent: Optional, ITXClientDenyList>; + }; + }; +}; + +export declare type DynamicClientExtensionThis, ClientOptions> = { + [P in keyof ExtArgs['client']]: Return; +} & { + [P in Exclude]: DynamicModelExtensionThis, ExtArgs, ClientOptions>; +} & { + [P in Exclude]: P extends keyof ClientOtherOps ? ClientOtherOps[P] : never; +} & { + [P in Exclude]: DynamicClientExtensionThisBuiltin[P]; +} & { + [K: symbol]: { + types: TypeMap['other']; + }; +}; + +export declare type DynamicClientExtensionThisBuiltin, ClientOptions> = { + $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs, Call, ClientOptions>; + $transaction

[]>(arg: [...P], options?: { + isolationLevel?: TypeMap['meta']['txIsolationLevel']; + }): Promise>; + $transaction(fn: (client: Omit, ITXClientDenyList>) => Promise, options?: { + maxWait?: number; + timeout?: number; + isolationLevel?: TypeMap['meta']['txIsolationLevel']; + }): Promise; + $disconnect(): Promise; + $connect(): Promise; +}; + +/** Model */ +export declare type DynamicModelExtensionArgs, ClientOptions> = { + [K in keyof M_]: K extends '$allModels' ? { + [P in keyof M_[K]]?: unknown; + } & { + [K: symbol]: {}; + } : K extends TypeMap['meta']['modelProps'] ? { + [P in keyof M_[K]]?: unknown; + } & { + [K: symbol]: { + ctx: DynamicModelExtensionThis, ExtArgs, ClientOptions> & { + $parent: DynamicClientExtensionThis; + } & { + $name: ModelKey; + } & { + /** + * @deprecated Use `$name` instead. + */ + name: ModelKey; + }; + }; + } : never; +}; + +export declare type DynamicModelExtensionFluentApi = { + [K in keyof TypeMap['model'][M]['payload']['objects']]: (args?: Exact>) => PrismaPromise, [K]> | Null> & DynamicModelExtensionFluentApi, ClientOptions>; +}; + +export declare type DynamicModelExtensionFnResult = P extends FluentOperation ? DynamicModelExtensionFluentApi & PrismaPromise | Null> : PrismaPromise>; + +export declare type DynamicModelExtensionFnResultBase = GetResult; + +export declare type DynamicModelExtensionFnResultNull

= P extends 'findUnique' | 'findFirst' ? null : never; + +export declare type DynamicModelExtensionOperationFn = {} extends TypeMap['model'][M]['operations'][P]['args'] ? (args?: Exact) => DynamicModelExtensionFnResult, ClientOptions> : (args: Exact) => DynamicModelExtensionFnResult, ClientOptions>; + +export declare type DynamicModelExtensionThis, ClientOptions> = { + [P in keyof ExtArgs['model'][Uncapitalize]]: Return][P]>; +} & { + [P in Exclude]>]: DynamicModelExtensionOperationFn; +} & { + [P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize]>]: TypeMap['model'][M]['fields']; +} & { + [K: symbol]: { + types: TypeMap['model'][M]; + }; +}; + +/** Query */ +export declare type DynamicQueryExtensionArgs = { + [K in keyof Q_]: K extends '$allOperations' ? (args: { + model?: string; + operation: string; + args: any; + query: (args: any) => PrismaPromise; + }) => Promise : K extends '$allModels' ? { + [P in keyof Q_[K] | keyof TypeMap['model'][keyof TypeMap['model']]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb : P extends keyof TypeMap['model'][keyof TypeMap['model']]['operations'] ? DynamicQueryExtensionCb : never; + } : K extends TypeMap['meta']['modelProps'] ? { + [P in keyof Q_[K] | keyof TypeMap['model'][ModelKey]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb, keyof TypeMap['model'][ModelKey]['operations']> : P extends keyof TypeMap['model'][ModelKey]['operations'] ? DynamicQueryExtensionCb, P> : never; + } : K extends keyof TypeMap['other']['operations'] ? DynamicQueryExtensionCb<[TypeMap], 0, 'other', K> : never; +}; + +export declare type DynamicQueryExtensionCb = >(args: A) => Promise; + +export declare type DynamicQueryExtensionCbArgs = (_1 extends unknown ? _2 extends unknown ? { + args: DynamicQueryExtensionCbArgsArgs; + model: _0 extends 0 ? undefined : _1; + operation: _2; + query: >(args: A) => PrismaPromise; +} : never : never) & { + query: (args: DynamicQueryExtensionCbArgsArgs) => PrismaPromise; +}; + +export declare type DynamicQueryExtensionCbArgsArgs = _2 extends '$queryRaw' | '$executeRaw' ? Sql : TypeMap[_0][_1]['operations'][_2]['args']; + +/** Result */ +export declare type DynamicResultExtensionArgs = { + [K in keyof R_]: { + [P in keyof R_[K]]?: { + needs?: DynamicResultExtensionNeeds, R_[K][P]>; + compute(data: DynamicResultExtensionData, R_[K][P]>): any; + }; + }; +}; + +export declare type DynamicResultExtensionData = GetFindResult; + +export declare type DynamicResultExtensionNeeds = { + [K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never; +} & { + [N in keyof TypeMap['model'][M]['payload']['scalars']]?: boolean; +}; + +/** + * Placeholder value for "no text". + */ +export declare const empty: Sql; + +export declare type EmptyToUnknown = T; + +declare interface Engine { + /** The name of the engine. This is meant to be consumed externally */ + readonly name: string; + onBeforeExit(callback: () => Promise): void; + start(): Promise; + stop(): Promise; + version(forceRun?: boolean): Promise | string; + request(query: JsonQuery, options: RequestOptions_2): Promise>; + requestBatch(queries: JsonQuery[], options: RequestBatchOptions): Promise[]>; + transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise>; + transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; + transaction(action: 'rollback', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; + metrics(options: MetricsOptionsJson): Promise; + metrics(options: MetricsOptionsPrometheus): Promise; + applyPendingMigrations(): Promise; +} + +declare interface EngineConfig { + cwd: string; + dirname: string; + datamodelPath: string; + enableDebugLogs?: boolean; + allowTriggerPanic?: boolean; + prismaPath?: string; + generator?: GeneratorConfig; + overrideDatasources: Datasources; + showColors?: boolean; + logQueries?: boolean; + logLevel?: 'info' | 'warn'; + env: Record; + flags?: string[]; + clientVersion: string; + engineVersion: string; + previewFeatures?: string[]; + engineEndpoint?: string; + activeProvider?: string; + logEmitter: LogEmitter; + transactionOptions: Transaction_2.Options; + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`. + * If set, this is only used in the library engine, and all queries would be performed through it, + * rather than Prisma's Rust drivers. + * @remarks only used by LibraryEngine.ts + */ + adapter?: ErrorCapturingDriverAdapter; + /** + * The contents of the schema encoded into a string + * @remarks only used by DataProxyEngine.ts + */ + inlineSchema: string; + /** + * The contents of the datasource url saved in a string + * @remarks only used by DataProxyEngine.ts + */ + inlineDatasources: GetPrismaClientConfig['inlineDatasources']; + /** + * The string hash that was produced for a given schema + * @remarks only used by DataProxyEngine.ts + */ + inlineSchemaHash: string; + /** + * The helper for interaction with OTEL tracing + * @remarks enabling is determined by the client and @prisma/instrumentation package + */ + tracingHelper: TracingHelper; + /** + * Information about whether we have not found a schema.prisma file in the + * default location, and that we fell back to finding the schema.prisma file + * in the current working directory. This usually means it has been bundled. + */ + isBundled?: boolean; + /** + * Web Assembly module loading configuration + */ + engineWasm?: WasmLoadingConfig; + /** + * Allows Accelerate to use runtime utilities from the client. These are + * necessary for the AccelerateEngine to function correctly. + */ + accelerateUtils?: { + resolveDatasourceUrl: typeof resolveDatasourceUrl; + getBatchRequestPayload: typeof getBatchRequestPayload; + prismaGraphQLToJSError: typeof prismaGraphQLToJSError; + PrismaClientUnknownRequestError: typeof PrismaClientUnknownRequestError; + PrismaClientInitializationError: typeof PrismaClientInitializationError; + PrismaClientKnownRequestError: typeof PrismaClientKnownRequestError; + debug: (...args: any[]) => void; + engineVersion: string; + clientVersion: string; + }; +} + +declare type EngineEvent = E extends QueryEventType ? QueryEvent : LogEvent; + +declare type EngineEventType = QueryEventType | LogEventType; + +declare type EngineProtocol = 'graphql' | 'json'; + +declare type EngineSpan = { + span: boolean; + name: string; + trace_id: string; + span_id: string; + parent_span_id: string; + start_time: [number, number]; + end_time: [number, number]; + attributes?: Record; + links?: { + trace_id: string; + span_id: string; + }[]; + kind: EngineSpanKind; +}; + +declare type EngineSpanEvent = { + span: boolean; + spans: EngineSpan[]; +}; + +declare type EngineSpanKind = 'client' | 'internal'; + +declare type EnvPaths = { + rootEnvPath: string | null; + schemaEnvPath: string | undefined; +}; + +declare interface EnvValue { + fromEnvVar: null | string; + value: null | string; +} + +export declare type Equals = (() => T extends A ? 1 : 2) extends (() => T extends B ? 1 : 2) ? 1 : 0; + +declare type Error_2 = { + kind: 'GenericJs'; + id: number; +} | { + kind: 'UnsupportedNativeDataType'; + type: string; +} | { + kind: 'Postgres'; + code: string; + severity: string; + message: string; + detail: string | undefined; + column: string | undefined; + hint: string | undefined; +} | { + kind: 'Mysql'; + code: number; + message: string; + state: string; +} | { + kind: 'Sqlite'; + /** + * Sqlite extended error code: https://www.sqlite.org/rescode.html + */ + extendedCode: number; + message: string; +}; + +declare interface ErrorCapturingDriverAdapter extends DriverAdapter { + readonly errorRegistry: ErrorRegistry; +} + +declare type ErrorFormat = 'pretty' | 'colorless' | 'minimal'; + +declare type ErrorRecord = { + error: unknown; +}; + +declare interface ErrorRegistry { + consumeError(id: number): ErrorRecord | undefined; +} + +declare interface ErrorWithBatchIndex { + batchRequestIdx?: number; +} + +declare type EventCallback = [E] extends ['beforeExit'] ? () => Promise : [E] extends [LogLevel] ? (event: EngineEvent) => void : never; + +export declare type Exact = (A extends unknown ? (W extends A ? { + [K in keyof A]: Exact; +} : W) : never) | (A extends Narrowable ? A : never); + +/** + * Defines Exception. + * + * string or an object with one of (message or name or code) and optional stack + */ +declare type Exception = ExceptionWithCode | ExceptionWithMessage | ExceptionWithName | string; + +declare interface ExceptionWithCode { + code: string | number; + name?: string; + message?: string; + stack?: string; +} + +declare interface ExceptionWithMessage { + code?: string | number; + message: string; + name?: string; + stack?: string; +} + +declare interface ExceptionWithName { + code?: string | number; + message?: string; + name: string; + stack?: string; +} + +declare type ExtendedEventType = LogLevel | 'beforeExit'; + +declare type ExtendedSpanOptions = SpanOptions & { + /** The name of the span */ + name: string; + internal?: boolean; + middleware?: boolean; + /** Whether it propagates context (?=true) */ + active?: boolean; + /** The context to append the span to */ + context?: Context; +}; + +/** $extends, defineExtension */ +export declare interface ExtendsHook, TypeMap extends TypeMapDef = Call, ClientOptions = {}> { + extArgs: ExtArgs; + , MergedArgs extends InternalArgs = MergeExtArgs>(extension: ((client: DynamicClientExtensionThis) => { + $extends: { + extArgs: Args; + }; + }) | { + name?: string; + query?: DynamicQueryExtensionArgs; + result?: DynamicResultExtensionArgs & R; + model?: DynamicModelExtensionArgs & M; + client?: DynamicClientExtensionArgs & C; + }): { + extends: DynamicClientExtensionThis, TypeMapCb, MergedArgs, ClientOptions>; + define: (client: any) => { + $extends: { + extArgs: Args; + }; + }; + }[Variant]; +} + +export declare type ExtensionArgs = Optional; + +declare namespace Extensions { + export { + defineExtension, + getExtensionContext + } +} +export { Extensions } + +declare namespace Extensions_2 { + export { + InternalArgs, + DefaultArgs, + GetPayloadResultExtensionKeys, + GetPayloadResultExtensionObject, + GetPayloadResult, + GetSelect, + GetOmit, + DynamicQueryExtensionArgs, + DynamicQueryExtensionCb, + DynamicQueryExtensionCbArgs, + DynamicQueryExtensionCbArgsArgs, + DynamicResultExtensionArgs, + DynamicResultExtensionNeeds, + DynamicResultExtensionData, + DynamicModelExtensionArgs, + DynamicModelExtensionThis, + DynamicModelExtensionOperationFn, + DynamicModelExtensionFnResult, + DynamicModelExtensionFnResultBase, + DynamicModelExtensionFluentApi, + DynamicModelExtensionFnResultNull, + DynamicClientExtensionArgs, + DynamicClientExtensionThis, + ClientBuiltInProp, + DynamicClientExtensionThisBuiltin, + ExtendsHook, + MergeExtArgs, + AllModelsToStringIndex, + TypeMapDef, + DevTypeMapDef, + DevTypeMapFnDef, + ClientOptionDef, + ClientOtherOps, + TypeMapCbDef, + ModelKey, + RequiredExtensionArgs as UserArgs + } +} + +export declare type ExtractGlobalOmit = Options extends { + omit: { + [K in ModelName]: infer GlobalOmit; + }; +} ? GlobalOmit : {}; + +declare type Fetch = typeof nodeFetch; + +/** + * A reference to a specific field of a specific model + */ +export declare interface FieldRef { + readonly modelName: Model; + readonly name: string; + readonly typeName: FieldType; + readonly isList: boolean; +} + +export declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete'; + +export declare interface Fn { + params: Params; + returns: Returns; +} + +declare interface GeneratorConfig { + name: string; + output: EnvValue | null; + isCustomOutput?: boolean; + provider: EnvValue; + config: { + /** `output` is a reserved name and will only be available directly at `generator.output` */ + output?: never; + /** `provider` is a reserved name and will only be available directly at `generator.provider` */ + provider?: never; + /** `binaryTargets` is a reserved name and will only be available directly at `generator.binaryTargets` */ + binaryTargets?: never; + /** `previewFeatures` is a reserved name and will only be available directly at `generator.previewFeatures` */ + previewFeatures?: never; + } & { + [key: string]: string | string[] | undefined; + }; + binaryTargets: BinaryTargetsEnvValue[]; + previewFeatures: string[]; + envPaths?: EnvPaths; + sourceFilePath: string; +} + +export declare type GetAggregateResult

= { + [K in keyof A as K extends Aggregate ? K : never]: K extends '_count' ? A[K] extends true ? number : Count : { + [J in keyof A[K] & string]: P['scalars'][J] | null; + }; +}; + +declare function getBatchRequestPayload(batch: JsonQuery[], transaction?: TransactionOptions_2): QueryEngineBatchRequest; + +export declare type GetBatchResult = { + count: number; +}; + +export declare type GetCountResult = A extends { + select: infer S; +} ? (S extends true ? number : Count) : number; + +declare function getExtensionContext(that: T): Context_2; + +export declare type GetFindResult

= Equals extends 1 ? DefaultSelection : A extends { + select: infer S extends object; +} & Record | { + include: infer I extends object; +} & Record ? { + [K in keyof S | keyof I as (S & I)[K] extends false | undefined | Skip | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult | SelectField & null : never : K extends '_count' ? Count> : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection | SelectField & null : never : P extends { + scalars: { + [k in K]: infer O; + }; + } ? O : K extends '_count' ? Count : never; +} & (A extends { + include: any; +} & Record ? DefaultSelection : unknown) : DefaultSelection; + +export declare type GetGroupByResult

= A extends { + by: string[]; +} ? Array & { + [K in A['by'][number]]: P['scalars'][K]; +}> : A extends { + by: string; +} ? Array & { + [K in A['by']]: P['scalars'][K]; +}> : {}[]; + +export declare type GetOmit = { + [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean | ExtraType; +}; + +export declare type GetPayloadResult, R extends InternalArgs['result'][string]> = Omit> & GetPayloadResultExtensionObject; + +export declare type GetPayloadResultExtensionKeys = KR; + +export declare type GetPayloadResultExtensionObject = { + [K in GetPayloadResultExtensionKeys]: R[K] extends () => { + compute: (...args: any) => infer C; + } ? C : never; +}; + +export declare function getPrismaClient(config: GetPrismaClientConfig): { + new (optionsArg?: PrismaClientOptions): { + _originalClient: any; + _runtimeDataModel: RuntimeDataModel; + _requestHandler: RequestHandler; + _connectionPromise?: Promise | undefined; + _disconnectionPromise?: Promise | undefined; + _engineConfig: EngineConfig; + _accelerateEngineConfig: AccelerateEngineConfig; + _clientVersion: string; + _errorFormat: ErrorFormat; + _tracingHelper: TracingHelper; + _metrics: MetricsClient; + _middlewares: MiddlewareHandler; + _previewFeatures: string[]; + _activeProvider: string; + _globalOmit?: GlobalOmitOptions | undefined; + _extensions: MergedExtensionsList; + _engine: Engine; + /** + * A fully constructed/applied Client that references the parent + * PrismaClient. This is used for Client extensions only. + */ + _appliedParent: any; + _createPrismaPromise: PrismaPromiseFactory; + /** + * Hook a middleware into the client + * @param middleware to hook + */ + $use(middleware: QueryMiddleware): void; + $on(eventType: E, callback: EventCallback): void; + $connect(): Promise; + /** + * Disconnect from the database + */ + $disconnect(): Promise; + /** + * Executes a raw query and always returns a number + */ + $executeRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; + /** + * Executes a raw query provided through a safe tag function + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; + /** + * Unsafe counterpart of `$executeRaw` that is susceptible to SQL injections + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; + /** + * Executes a raw command only for MongoDB + * + * @param command + * @returns + */ + $runCommandRaw(command: Record): PrismaPromise_2; + /** + * Executes a raw query and returns selected data + */ + $queryRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; + /** + * Executes a raw query provided through a safe tag function + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; + /** + * Counterpart to $queryRaw, that returns strongly typed results + * @param typedSql + */ + $queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2; + /** + * Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; + /** + * Execute a batch of requests in a transaction + * @param requests + * @param options + */ + _transactionWithArray({ promises, options, }: { + promises: Array>; + options?: BatchTransactionOptions; + }): Promise; + /** + * Perform a long-running transaction + * @param callback + * @param options + * @returns + */ + _transactionWithCallback({ callback, options, }: { + callback: (client: Client) => Promise; + options?: Options; + }): Promise; + _createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client; + /** + * Execute queries within a transaction + * @param input a callback or a query list + * @param options to set timeouts (callback) + * @returns + */ + $transaction(input: any, options?: any): Promise; + /** + * Runs the middlewares over params before executing a request + * @param internalParams + * @returns + */ + _request(internalParams: InternalRequestParams): Promise; + _executeRequest({ args, clientMethod, dataPath, callsite, action, model, argsMapper, transaction, unpacker, otelParentCtx, customDataProxyFetch, }: InternalRequestParams): Promise; + readonly $metrics: MetricsClient; + /** + * Shortcut for checking a preview flag + * @param feature preview flag + * @returns + */ + _hasPreviewFlag(feature: string): boolean; + $applyPendingMigrations(): Promise; + $extends: typeof $extends; + readonly [Symbol.toStringTag]: string; + }; +}; + +/** + * Config that is stored into the generated client. When the generated client is + * loaded, this same config is passed to {@link getPrismaClient} which creates a + * closure with that config around a non-instantiated [[PrismaClient]]. + */ +declare type GetPrismaClientConfig = { + runtimeDataModel: RuntimeDataModel; + generator?: GeneratorConfig; + relativeEnvPaths: { + rootEnvPath?: string | null; + schemaEnvPath?: string | null; + }; + relativePath: string; + dirname: string; + filename?: string; + clientVersion: string; + engineVersion: string; + datasourceNames: string[]; + activeProvider: ActiveConnectorType; + /** + * The contents of the schema encoded into a string + * @remarks only used for the purpose of data proxy + */ + inlineSchema: string; + /** + * A special env object just for the data proxy edge runtime. + * Allows bundlers to inject their own env variables (Vercel). + * Allows platforms to declare global variables as env (Workers). + * @remarks only used for the purpose of data proxy + */ + injectableEdgeEnv?: () => LoadedEnv; + /** + * The contents of the datasource url saved in a string. + * This can either be an env var name or connection string. + * It is needed by the client to connect to the Data Proxy. + * @remarks only used for the purpose of data proxy + */ + inlineDatasources: { + [name in string]: { + url: EnvValue; + }; + }; + /** + * The string hash that was produced for a given schema + * @remarks only used for the purpose of data proxy + */ + inlineSchemaHash: string; + /** + * A marker to indicate that the client was not generated via `prisma + * generate` but was generated via `generate --postinstall` script instead. + * @remarks used to error for Vercel/Netlify for schema caching issues + */ + postinstall?: boolean; + /** + * Information about the CI where the Prisma Client has been generated. The + * name of the CI environment is stored at generation time because CI + * information is not always available at runtime. Moreover, the edge client + * has no notion of environment variables, so this works around that. + * @remarks used to error for Vercel/Netlify for schema caching issues + */ + ciName?: string; + /** + * Information about whether we have not found a schema.prisma file in the + * default location, and that we fell back to finding the schema.prisma file + * in the current working directory. This usually means it has been bundled. + */ + isBundled?: boolean; + /** + * A boolean that is `false` when the client was generated with --no-engine. At + * runtime, this means the client will be bound to be using the Data Proxy. + */ + copyEngine?: boolean; + /** + * Optional wasm loading configuration + */ + engineWasm?: WasmLoadingConfig; +}; + +export declare type GetResult = { + findUnique: GetFindResult | null; + findUniqueOrThrow: GetFindResult; + findFirst: GetFindResult | null; + findFirstOrThrow: GetFindResult; + findMany: GetFindResult[]; + create: GetFindResult; + createMany: GetBatchResult; + createManyAndReturn: GetFindResult[]; + update: GetFindResult; + updateMany: GetBatchResult; + upsert: GetFindResult; + delete: GetFindResult; + deleteMany: GetBatchResult; + aggregate: GetAggregateResult; + count: GetCountResult; + groupBy: GetGroupByResult; + $queryRaw: unknown; + $queryRawTyped: unknown; + $executeRaw: number; + $queryRawUnsafe: unknown; + $executeRawUnsafe: number; + $runCommandRaw: JsonObject; + findRaw: JsonObject; + aggregateRaw: JsonObject; +}[OperationName]; + +export declare function getRuntime(): GetRuntimeOutput; + +declare type GetRuntimeOutput = { + id: Runtime; + prettyName: string; + isEdge: boolean; +}; + +export declare type GetSelect, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = { + [K in KR | keyof Base]?: K extends KR ? boolean : Base[K]; +}; + +declare type GlobalOmitOptions = { + [modelName: string]: { + [fieldName: string]: boolean; + }; +}; + +declare type HandleErrorParams = { + args: JsArgs; + error: any; + clientMethod: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + modelName?: string; + globalOmit?: GlobalOmitOptions; +}; + +/** + * Defines High-Resolution Time. + * + * The first number, HrTime[0], is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. + * The second number, HrTime[1], represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. + * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. + * The first number is calculated by converting and truncating the Epoch time in milliseconds to seconds: + * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. + * The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: + * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000. + * This is represented in HrTime format as [1609504210, 150000000]. + */ +declare type HrTime = [number, number]; + +/** + * Matches a JSON array. + * Unlike \`JsonArray\`, readonly arrays are assignable to this type. + */ +export declare interface InputJsonArray extends ReadonlyArray { +} + +/** + * Matches a JSON object. + * Unlike \`JsonObject\`, this type allows undefined and read-only properties. + */ +export declare type InputJsonObject = { + readonly [Key in string]?: InputJsonValue | null; +}; + +/** + * Matches any valid value that can be used as an input for operations like + * create and update as the value of a JSON field. Unlike \`JsonValue\`, this + * type allows read-only arrays and read-only object properties and disallows + * \`null\` at the top level. + * + * \`null\` cannot be used as the value of a JSON field because its meaning + * would be ambiguous. Use \`Prisma.JsonNull\` to store the JSON null value or + * \`Prisma.DbNull\` to clear the JSON value and set the field to the database + * NULL value instead. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values + */ +export declare type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray | { + toJSON(): unknown; +}; + +declare type InteractiveTransactionInfo = { + /** + * Transaction ID returned by the query engine. + */ + id: string; + /** + * Arbitrary payload the meaning of which depends on the `Engine` implementation. + * For example, `DataProxyEngine` needs to associate different API endpoints with transactions. + * In `LibraryEngine` and `BinaryEngine` it is currently not used. + */ + payload: Payload; +}; + +declare type InteractiveTransactionOptions = Transaction_2.InteractiveTransactionInfo; + +export declare type InternalArgs = { + result: { + [K in keyof R]: { + [P in keyof R[K]]: () => R[K][P]; + }; + }; + model: { + [K in keyof M]: { + [P in keyof M[K]]: () => M[K][P]; + }; + }; + query: { + [K in keyof Q]: { + [P in keyof Q[K]]: () => Q[K][P]; + }; + }; + client: { + [K in keyof C]: () => C[K]; + }; +}; + +declare type InternalRequestParams = { + /** + * The original client method being called. + * Even though the rootField / operation can be changed, + * this method stays as it is, as it's what the user's + * code looks like + */ + clientMethod: string; + /** + * Name of js model that triggered the request. Might be used + * for warnings or error messages + */ + jsModelName?: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + unpacker?: Unpacker; + otelParentCtx?: Context; + /** Used to "desugar" a user input into an "expanded" one */ + argsMapper?: (args?: UserArgs_2) => UserArgs_2; + /** Used to convert args for middleware and back */ + middlewareArgsMapper?: MiddlewareArgsMapper; + /** Used for Accelerate client extension via Data Proxy */ + customDataProxyFetch?: (fetch: Fetch) => Fetch; +} & Omit; + +declare enum IsolationLevel { + ReadUncommitted = "ReadUncommitted", + ReadCommitted = "ReadCommitted", + RepeatableRead = "RepeatableRead", + Snapshot = "Snapshot", + Serializable = "Serializable" +} + +declare function isSkip(value: unknown): value is Skip; + +export declare function isTypedSql(value: unknown): value is UnknownTypedSql; + +export declare type ITXClientDenyList = (typeof denylist)[number]; + +export declare const itxClientDenyList: readonly (string | symbol)[]; + +declare interface Job { + resolve: (data: any) => void; + reject: (data: any) => void; + request: any; +} + +/** + * Create a SQL query for a list of values. + */ +export declare function join(values: readonly RawValue[], separator?: string, prefix?: string, suffix?: string): Sql; + +export declare type JsArgs = { + select?: Selection_2; + include?: Selection_2; + omit?: Omission; + [argName: string]: JsInputValue; +}; + +export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef | JsInputValue[] | Skip | { + [key: string]: JsInputValue; +}; + +declare type JsonArgumentValue = number | string | boolean | null | RawTaggedValue | JsonArgumentValue[] | { + [key: string]: JsonArgumentValue; +}; + +/** + * From https://github.com/sindresorhus/type-fest/ + * Matches a JSON array. + */ +export declare interface JsonArray extends Array { +} + +export declare type JsonBatchQuery = { + batch: JsonQuery[]; + transaction?: { + isolationLevel?: Transaction_2.IsolationLevel; + }; +}; + +export declare interface JsonConvertible { + toJSON(): unknown; +} + +declare type JsonFieldSelection = { + arguments?: Record | RawTaggedValue; + selection: JsonSelectionSet; +}; + +declare class JsonNull extends NullTypesEnumValue { +} + +/** + * From https://github.com/sindresorhus/type-fest/ + * Matches a JSON object. + * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. + */ +export declare type JsonObject = { + [Key in string]?: JsonValue; +}; + +export declare type JsonQuery = { + modelName?: string; + action: JsonQueryAction; + query: JsonFieldSelection; +}; + +declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'createManyAndReturn' | 'updateOne' | 'updateMany' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw'; + +declare type JsonSelectionSet = { + $scalars?: boolean; + $composites?: boolean; +} & { + [fieldName: string]: boolean | JsonFieldSelection; +}; + +/** + * From https://github.com/sindresorhus/type-fest/ + * Matches any valid JSON value. + */ +export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null; + +export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | { + [key: string]: JsOutputValue; +}; + +export declare type JsPromise = Promise & {}; + +declare type KnownErrorParams = { + code: string; + clientVersion: string; + meta?: Record; + batchRequestIdx?: number; +}; + +/** + * A pointer from the current {@link Span} to another span in the same trace or + * in a different trace. + * Few examples of Link usage. + * 1. Batch Processing: A batch of elements may contain elements associated + * with one or more traces/spans. Since there can only be one parent + * SpanContext, Link is used to keep reference to SpanContext of all + * elements in the batch. + * 2. Public Endpoint: A SpanContext in incoming client request on a public + * endpoint is untrusted from service provider perspective. In such case it + * is advisable to start a new trace with appropriate sampling decision. + * However, it is desirable to associate incoming SpanContext to new trace + * initiated on service provider side so two traces (from Client and from + * Service Provider) can be correlated. + */ +declare interface Link { + /** The {@link SpanContext} of a linked span. */ + context: SpanContext; + /** A set of {@link SpanAttributes} on the link. */ + attributes?: SpanAttributes; + /** Count of attributes of the link that were dropped due to collection limits */ + droppedAttributesCount?: number; +} + +declare type LoadedEnv = { + message?: string; + parsed: { + [x: string]: string; + }; +} | undefined; + +declare type LocationInFile = { + fileName: string; + lineNumber: number | null; + columnNumber: number | null; +}; + +declare type LogDefinition = { + level: LogLevel; + emit: 'stdout' | 'event'; +}; + +/** + * Typings for the events we emit. + * + * @remarks + * If this is updated, our edge runtime shim needs to be updated as well. + */ +declare type LogEmitter = { + on(event: E, listener: (event: EngineEvent) => void): LogEmitter; + emit(event: QueryEventType, payload: QueryEvent): boolean; + emit(event: LogEventType, payload: LogEvent): boolean; +}; + +declare type LogEvent = { + timestamp: Date; + message: string; + target: string; +}; + +declare type LogEventType = 'info' | 'warn' | 'error'; + +declare type LogLevel = 'info' | 'query' | 'warn' | 'error'; + +/** + * Generates more strict variant of an enum which, unlike regular enum, + * throws on non-existing property access. This can be useful in following situations: + * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input + * - enum values are generated dynamically from DMMF. + * + * In that case, if using normal enums and no compile-time typechecking, using non-existing property + * will result in `undefined` value being used, which will be accepted. Using strict enum + * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. + * + * Note: if you need to check for existence of a value in the enum you can still use either + * `in` operator or `hasOwnProperty` function. + * + * @param definition + * @returns + */ +export declare function makeStrictEnum>(definition: T): T; + +export declare function makeTypedQueryFactory(sql: string): (...values: any[]) => TypedSql; + +/** + * Class that holds the list of all extensions, applied to particular instance, + * as well as resolved versions of the components that need to apply on + * different levels. Main idea of this class: avoid re-resolving as much of the + * stuff as possible when new extensions are added while also delaying the + * resolve until the point it is actually needed. For example, computed fields + * of the model won't be resolved unless the model is actually queried. Neither + * adding extensions with `client` component only cause other components to + * recompute. + */ +declare class MergedExtensionsList { + private head?; + private constructor(); + static empty(): MergedExtensionsList; + static single(extension: ExtensionArgs): MergedExtensionsList; + isEmpty(): boolean; + append(extension: ExtensionArgs): MergedExtensionsList; + getAllComputedFields(dmmfModelName: string): ComputedFieldsMap | undefined; + getAllClientExtensions(): ClientArg | undefined; + getAllModelExtensions(dmmfModelName: string): ModelArg | undefined; + getAllQueryCallbacks(jsModelName: string, operation: string): any; + getAllBatchQueryCallbacks(): BatchQueryOptionsCb[]; +} + +export declare type MergeExtArgs, Args extends Record> = ComputeDeep & AllModelsToStringIndex>; + +export declare type Metric = { + key: string; + value: T; + labels: Record; + description: string; +}; + +export declare type MetricHistogram = { + buckets: MetricHistogramBucket[]; + sum: number; + count: number; +}; + +export declare type MetricHistogramBucket = [maxValue: number, count: number]; + +export declare type Metrics = { + counters: Metric[]; + gauges: Metric[]; + histograms: Metric[]; +}; + +export declare class MetricsClient { + private _engine; + constructor(engine: Engine); + /** + * Returns all metrics gathered up to this point in prometheus format. + * Result of this call can be exposed directly to prometheus scraping endpoint + * + * @param options + * @returns + */ + prometheus(options?: MetricsOptions): Promise; + /** + * Returns all metrics gathered up to this point in prometheus format. + * + * @param options + * @returns + */ + json(options?: MetricsOptions): Promise; +} + +declare type MetricsOptions = { + /** + * Labels to add to every metrics in key-value format + */ + globalLabels?: Record; +}; + +declare type MetricsOptionsCommon = { + globalLabels?: Record; +}; + +declare type MetricsOptionsJson = { + format: 'json'; +} & MetricsOptionsCommon; + +declare type MetricsOptionsPrometheus = { + format: 'prometheus'; +} & MetricsOptionsCommon; + +declare type MiddlewareArgsMapper = { + requestArgsToMiddlewareArgs(requestArgs: RequestArgs): MiddlewareArgs; + middlewareArgsToRequestArgs(middlewareArgs: MiddlewareArgs): RequestArgs; +}; + +declare class MiddlewareHandler { + private _middlewares; + use(middleware: M): void; + get(id: number): M | undefined; + has(id: number): boolean; + length(): number; +} + +export declare type ModelArg = { + [MethodName in string]: unknown; +}; + +export declare type ModelArgs = { + model: { + [ModelName in string]: ModelArg; + }; +}; + +export declare type ModelKey = M extends keyof TypeMap['model'] ? M : Capitalize; + +export declare type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise; + +export declare type ModelQueryOptionsCbArgs = { + model: string; + operation: string; + args: JsArgs; + query: (args: JsArgs) => Promise; +}; + +export declare type NameArgs = { + name?: string; +}; + +export declare type Narrow = { + [K in keyof A]: A[K] extends Function ? A[K] : Narrow; +} | (A extends Narrowable ? A : never); + +export declare type Narrowable = string | number | bigint | boolean | []; + +export declare type NeverToUnknown = [T] extends [never] ? unknown : T; + +/** + * Imitates `fetch` via `https` to only suit our needs, it does nothing more. + * This is because we cannot bundle `node-fetch` as it uses many other Node.js + * utilities, while also bloating our bundles. This approach is much leaner. + * @param url + * @param options + * @returns + */ +declare function nodeFetch(url: string, options?: RequestOptions): Promise; + +declare class NodeHeaders { + readonly headers: Map; + constructor(init?: Record); + append(name: string, value: string): void; + delete(name: string): void; + get(name: string): string | null; + has(name: string): boolean; + set(name: string, value: string): void; + forEach(callbackfn: (value: string, key: string, parent: this) => void, thisArg?: any): void; +} + +/** + * @deprecated Please don´t rely on type checks to this error anymore. + * This will become a regular `PrismaClientKnownRequestError` with code `P2025` + * in the future major version of the client. + * Instead of `error instanceof Prisma.NotFoundError` use `error.code === "P2025"`. + */ +export declare class NotFoundError extends PrismaClientKnownRequestError { + constructor(message: string, clientVersion: string); +} + +declare class NullTypesEnumValue extends ObjectEnumValue { + _getNamespace(): string; +} + +/** + * List of Prisma enums that must use unique objects instead of strings as their values. + */ +export declare const objectEnumNames: string[]; + +/** + * Base class for unique values of object-valued enums. + */ +export declare abstract class ObjectEnumValue { + constructor(arg?: symbol); + abstract _getNamespace(): string; + _getName(): string; + toString(): string; +} + +export declare const objectEnumValues: { + classes: { + DbNull: typeof DbNull; + JsonNull: typeof JsonNull; + AnyNull: typeof AnyNull; + }; + instances: { + DbNull: DbNull; + JsonNull: JsonNull; + AnyNull: AnyNull; + }; +}; + +declare const officialPrismaAdapters: readonly ["@prisma/adapter-planetscale", "@prisma/adapter-neon", "@prisma/adapter-libsql", "@prisma/adapter-d1", "@prisma/adapter-pg", "@prisma/adapter-pg-worker"]; + +export declare type Omission = Record; + +declare type Omit_2 = { + [P in keyof T as P extends K ? never : P]: T[P]; +}; +export { Omit_2 as Omit } + +export declare type OmitValue = Key extends keyof Omit ? Omit[Key] : false; + +export declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; + +export declare type OperationPayload = { + name: string; + scalars: { + [ScalarName in string]: unknown; + }; + objects: { + [ObjectName in string]: unknown; + }; + composites: { + [CompositeName in string]: unknown; + }; +}; + +export declare type Optional = { + [P in K & keyof O]?: O[P]; +} & { + [P in Exclude]: O[P]; +}; + +export declare type OptionalFlat = { + [K in keyof T]?: T[K]; +}; + +export declare type OptionalKeys = { + [K in keyof O]-?: {} extends Pick_2 ? K : never; +}[keyof O]; + +declare type Options = { + maxWait?: number; + timeout?: number; + isolationLevel?: IsolationLevel; +}; + +declare type Options_2 = { + clientVersion: string; +}; + +export declare type Or = { + 0: { + 0: 0; + 1: 1; + }; + 1: { + 0: 1; + 1: 1; + }; +}[A][B]; + +export declare type PatchFlat = O1 & Omit_2; + +export declare type Path = O extends unknown ? P extends [infer K, ...infer R] ? K extends keyof O ? Path : Default : O : never; + +export declare type Payload = T extends { + [K: symbol]: { + types: { + payload: any; + }; + }; +} ? T[symbol]['types']['payload'] : any; + +export declare type PayloadToResult = RenameAndNestPayloadKeys

> = { + [K in keyof O]?: O[K][K] extends any[] ? PayloadToResult[] : O[K][K] extends object ? PayloadToResult : O[K][K]; +}; + +declare type Pick_2 = { + [P in keyof T as P extends K ? P : never]: T[P]; +}; +export { Pick_2 as Pick } + +export declare class PrismaClientInitializationError extends Error { + clientVersion: string; + errorCode?: string; + retryable?: boolean; + constructor(message: string, clientVersion: string, errorCode?: string); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientKnownRequestError extends Error implements ErrorWithBatchIndex { + code: string; + meta?: Record; + clientVersion: string; + batchRequestIdx?: number; + constructor(message: string, { code, clientVersion, meta, batchRequestIdx }: KnownErrorParams); + get [Symbol.toStringTag](): string; +} + +export declare type PrismaClientOptions = { + /** + * Overwrites the primary datasource url from your schema.prisma file + */ + datasourceUrl?: string; + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale. + */ + adapter?: DriverAdapter | null; + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasources?: Datasources; + /** + * @default "colorless" + */ + errorFormat?: ErrorFormat; + /** + * The default values for Transaction options + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: Transaction_2.Options; + /** + * @example + * \`\`\` + * // Defaults to stdout + * log: ['query', 'info', 'warn'] + * + * // Emit as events + * log: [ + * { emit: 'stdout', level: 'query' }, + * { emit: 'stdout', level: 'info' }, + * { emit: 'stdout', level: 'warn' } + * ] + * \`\`\` + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). + */ + log?: Array; + omit?: GlobalOmitOptions; + /** + * @internal + * You probably don't want to use this. \`__internal\` is used by internal tooling. + */ + __internal?: { + debug?: boolean; + engine?: { + cwd?: string; + binaryPath?: string; + endpoint?: string; + allowTriggerPanic?: boolean; + }; + /** This can be used for testing purposes */ + configOverride?: (config: GetPrismaClientConfig) => GetPrismaClientConfig; + }; +}; + +export declare class PrismaClientRustPanicError extends Error { + clientVersion: string; + constructor(message: string, clientVersion: string); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientUnknownRequestError extends Error implements ErrorWithBatchIndex { + clientVersion: string; + batchRequestIdx?: number; + constructor(message: string, { clientVersion, batchRequestIdx }: UnknownErrorParams); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientValidationError extends Error { + name: string; + clientVersion: string; + constructor(message: string, { clientVersion }: Options_2); + get [Symbol.toStringTag](): string; +} + +declare function prismaGraphQLToJSError({ error, user_facing_error }: RequestError, clientVersion: string, activeProvider: string): PrismaClientKnownRequestError | PrismaClientUnknownRequestError; + +export declare interface PrismaPromise extends Promise { + [Symbol.toStringTag]: 'PrismaPromise'; +} + +/** + * Prisma's `Promise` that is backwards-compatible. All additions on top of the + * original `Promise` are optional so that it can be backwards-compatible. + * @see [[createPrismaPromise]] + */ +declare interface PrismaPromise_2 extends Promise { + /** + * Extension of the original `.then` function + * @param onfulfilled same as regular promises + * @param onrejected same as regular promises + * @param transaction transaction options + */ + then(onfulfilled?: (value: A) => R1 | PromiseLike, onrejected?: (error: unknown) => R2 | PromiseLike, transaction?: PrismaPromiseTransaction): Promise; + /** + * Extension of the original `.catch` function + * @param onrejected same as regular promises + * @param transaction transaction options + */ + catch(onrejected?: ((reason: any) => R | PromiseLike) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; + /** + * Extension of the original `.finally` function + * @param onfinally same as regular promises + * @param transaction transaction options + */ + finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; + /** + * Called when executing a batch of regular tx + * @param transaction transaction options for batch tx + */ + requestTransaction?(transaction: PrismaPromiseBatchTransaction): PromiseLike; +} + +declare type PrismaPromiseBatchTransaction = { + kind: 'batch'; + id: number; + isolationLevel?: IsolationLevel; + index: number; + lock: PromiseLike; +}; + +declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => PrismaPromise_2; + +/** + * Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which + * is essentially a proxy for `Promise`. All the transaction-compatible client + * methods return one, this allows for pre-preparing queries without executing + * them until `.then` is called. It's the foundation of Prisma's query batching. + * @param callback that will be wrapped within our promise implementation + * @see [[PrismaPromise]] + * @returns + */ +declare type PrismaPromiseFactory = (callback: PrismaPromiseCallback) => PrismaPromise_2; + +declare type PrismaPromiseInteractiveTransaction = { + kind: 'itx'; + id: string; + payload: PayloadType; +}; + +declare type PrismaPromiseTransaction = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction; + +export declare const PrivateResultType: unique symbol; + +declare namespace Public { + export { + validator + } +} +export { Public } + +declare namespace Public_2 { + export { + Args, + Result, + Payload, + PrismaPromise, + Operation, + Exact + } +} + +declare type Query = { + sql: string; + args: Array; + argTypes: Array; +}; + +declare interface Queryable { + readonly provider: 'mysql' | 'postgres' | 'sqlite'; + readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {}); + /** + * Execute a query given as SQL, interpolating the given parameters, + * and returning the type-aware result set of the query. + * + * This is the preferred way of executing `SELECT` queries. + */ + queryRaw(params: Query): Promise>; + /** + * Execute a query given as SQL, interpolating the given parameters, + * and returning the number of affected rows. + * + * This is the preferred way of executing `INSERT`, `UPDATE`, `DELETE` queries, + * as well as transactional queries. + */ + executeRaw(params: Query): Promise>; +} + +declare type QueryEngineBatchGraphQLRequest = { + batch: QueryEngineRequest[]; + transaction?: boolean; + isolationLevel?: Transaction_2.IsolationLevel; +}; + +declare type QueryEngineBatchRequest = QueryEngineBatchGraphQLRequest | JsonBatchQuery; + +declare type QueryEngineConfig = { + datamodel: string; + configDir: string; + logQueries: boolean; + ignoreEnvVarErrors: boolean; + datasourceOverrides: Record; + env: Record; + logLevel: QueryEngineLogLevel; + telemetry?: QueryEngineTelemetry; + engineProtocol: EngineProtocol; +}; + +declare interface QueryEngineConstructor { + new (config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingDriverAdapter): QueryEngineInstance; +} + +declare type QueryEngineInstance = { + connect(headers: string): Promise; + disconnect(headers: string): Promise; + /** + * @param requestStr JSON.stringified `QueryEngineRequest | QueryEngineBatchRequest` + * @param headersStr JSON.stringified `QueryEngineRequestHeaders` + */ + query(requestStr: string, headersStr: string, transactionId?: string): Promise; + sdlSchema(): Promise; + dmmf(traceparent: string): Promise; + startTransaction(options: string, traceHeaders: string): Promise; + commitTransaction(id: string, traceHeaders: string): Promise; + rollbackTransaction(id: string, traceHeaders: string): Promise; + metrics(options: string): Promise; + applyPendingMigrations(): Promise; +}; + +declare type QueryEngineLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'off'; + +declare type QueryEngineRequest = { + query: string; + variables: Object; +}; + +declare type QueryEngineResult = { + data: T; + elapsed: number; +}; + +declare type QueryEngineTelemetry = { + enabled: Boolean; + endpoint: string; +}; + +declare type QueryEvent = { + timestamp: Date; + query: string; + params: string; + duration: number; + target: string; +}; + +declare type QueryEventType = 'query'; + +declare type QueryMiddleware = (params: QueryMiddlewareParams, next: (params: QueryMiddlewareParams) => Promise) => Promise; + +declare type QueryMiddlewareParams = { + /** The model this is executed on */ + model?: string; + /** The action that is being handled */ + action: Action; + /** TODO what is this */ + dataPath: string[]; + /** TODO what is this */ + runInTransaction: boolean; + args?: UserArgs_2; +}; + +export declare type QueryOptions = { + query: { + [ModelName in string]: { + [ModelAction in string]: ModelQueryOptionsCb; + } | QueryOptionsCb; + }; +}; + +export declare type QueryOptionsCb = (args: QueryOptionsCbArgs) => Promise; + +export declare type QueryOptionsCbArgs = { + model?: string; + operation: string; + args: JsArgs | RawQueryArgs; + query: (args: JsArgs | RawQueryArgs) => Promise; +}; + +/** + * Create raw SQL statement. + */ +export declare function raw(value: string): Sql; + +export declare type RawParameters = { + __prismaRawParameters__: true; + values: string; +}; + +export declare type RawQueryArgs = Sql | UnknownTypedSql | [query: string, ...values: RawValue[]]; + +declare type RawTaggedValue = { + $type: 'Raw'; + value: unknown; +}; + +/** + * Supported value or SQL instance. + */ +export declare type RawValue = Value | Sql; + +export declare type ReadonlyDeep = { + readonly [K in keyof T]: ReadonlyDeep; +}; + +declare type ReadonlyDeep_2 = { + +readonly [K in keyof O]: ReadonlyDeep_2; +}; + +declare type Record_2 = { + [P in T]: U; +}; +export { Record_2 as Record } + +export declare type RenameAndNestPayloadKeys

= { + [K in keyof P as K extends 'scalars' | 'objects' | 'composites' ? keyof P[K] : never]: P[K]; +}; + +declare type RequestBatchOptions = { + transaction?: TransactionOptions_2; + traceparent?: string; + numTry?: number; + containsWrite: boolean; + customDataProxyFetch?: (fetch: Fetch) => Fetch; +}; + +declare interface RequestError { + error: string; + user_facing_error: { + is_panic: boolean; + message: string; + meta?: Record; + error_code?: string; + batch_request_idx?: number; + }; +} + +declare class RequestHandler { + client: Client; + dataloader: DataLoader; + private logEmitter?; + constructor(client: Client, logEmitter?: LogEmitter); + request(params: RequestParams): Promise; + mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResult): any; + /** + * Handles the error and logs it, logging the error is done synchronously waiting for the event + * handlers to finish. + */ + handleAndLogRequestError(params: HandleErrorParams): never; + handleRequestError({ error, clientMethod, callsite, transaction, args, modelName, globalOmit, }: HandleErrorParams): never; + sanitizeMessage(message: any): any; + unpack(data: unknown, dataPath: string[], unpacker?: Unpacker): any; + get [Symbol.toStringTag](): string; +} + +declare type RequestOptions = { + method?: string; + headers?: Record; + body?: string; +}; + +declare type RequestOptions_2 = { + traceparent?: string; + numTry?: number; + interactiveTransaction?: InteractiveTransactionOptions; + isWrite: boolean; + customDataProxyFetch?: (fetch: Fetch) => Fetch; +}; + +declare type RequestParams = { + modelName?: string; + action: Action; + protocolQuery: JsonQuery; + dataPath: string[]; + clientMethod: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + extensions: MergedExtensionsList; + args?: any; + headers?: Record; + unpacker?: Unpacker; + otelParentCtx?: Context; + otelChildCtx?: Context; + globalOmit?: GlobalOmitOptions; + customDataProxyFetch?: (fetch: Fetch) => Fetch; +}; + +declare type RequestResponse = { + ok: boolean; + url: string; + statusText?: string; + status: number; + headers: NodeHeaders; + text: () => Promise; + json: () => Promise; +}; + +declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions; +export { RequiredExtensionArgs } +export { RequiredExtensionArgs as UserArgs } + +export declare type RequiredKeys = { + [K in keyof O]-?: {} extends Pick_2 ? never : K; +}[keyof O]; + +declare function resolveDatasourceUrl({ inlineDatasources, overrideDatasources, env, clientVersion, }: { + inlineDatasources: GetPrismaClientConfig['inlineDatasources']; + overrideDatasources: Datasources; + env: Record; + clientVersion: string; +}): string; + +export declare type Result = T extends { + [K: symbol]: { + types: { + payload: any; + }; + }; +} ? GetResult : GetResult<{ + composites: {}; + objects: {}; + scalars: {}; + name: ''; +}, {}, F>; + +export declare type Result_2 = Result; + +declare namespace Result_3 { + export { + Operation, + FluentOperation, + Count, + GetFindResult, + SelectablePayloadFields, + SelectField, + DefaultSelection, + UnwrapPayload, + ApplyOmit, + OmitValue, + GetCountResult, + Aggregate, + GetAggregateResult, + GetBatchResult, + GetGroupByResult, + GetResult, + ExtractGlobalOmit + } +} + +declare type Result_4 = { + map(fn: (value: T) => U): Result_4; + flatMap(fn: (value: T) => Result_4): Result_4; +} & ({ + readonly ok: true; + readonly value: T; +} | { + readonly ok: false; + readonly error: Error_2; +}); + +export declare type ResultArg = { + [FieldName in string]: ResultFieldDefinition; +}; + +export declare type ResultArgs = { + result: { + [ModelName in string]: ResultArg; + }; +}; + +export declare type ResultArgsFieldCompute = (model: any) => unknown; + +export declare type ResultFieldDefinition = { + needs?: { + [FieldName in string]: boolean; + }; + compute: ResultArgsFieldCompute; +}; + +declare interface ResultSet { + /** + * List of column types appearing in a database query, in the same order as `columnNames`. + * They are used within the Query Engine to convert values from JS to Quaint values. + */ + columnTypes: Array; + /** + * List of column names appearing in a database query, in the same order as `columnTypes`. + */ + columnNames: Array; + /** + * List of rows retrieved from a database query. + * Each row is a list of values, whose length matches `columnNames` and `columnTypes`. + */ + rows: Array>; + /** + * The last ID of an `INSERT` statement, if any. + * This is required for `AUTO_INCREMENT` columns in databases based on MySQL and SQLite. + */ + lastInsertId?: string; +} + +export declare type Return = T extends (...args: any[]) => infer R ? R : T; + +declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown"; + +export declare type RuntimeDataModel = { + readonly models: Record; + readonly enums: Record; + readonly types: Record; +}; + +declare type RuntimeEnum = Omit; + +declare type RuntimeModel = Omit; + +export declare type Select = T extends U ? T : never; + +export declare type SelectablePayloadFields = { + objects: { + [k in K]: O; + }; +} | { + composites: { + [k in K]: O; + }; +}; + +export declare type SelectField

, K extends PropertyKey> = P extends { + objects: Record; +} ? P['objects'][K] : P extends { + composites: Record; +} ? P['composites'][K] : never; + +declare type Selection_2 = Record; +export { Selection_2 as Selection } + +export declare function serializeJsonQuery({ modelName, action, args, runtimeDataModel, extensions, callsite, clientMethod, errorFormat, clientVersion, previewFeatures, globalOmit, }: SerializeParams): JsonQuery; + +declare type SerializeParams = { + runtimeDataModel: RuntimeDataModel; + modelName?: string; + action: Action; + args?: JsArgs; + extensions?: MergedExtensionsList; + callsite?: CallSite; + clientMethod: string; + clientVersion: string; + errorFormat: ErrorFormat; + previewFeatures: string[]; + globalOmit?: GlobalOmitOptions; +}; + +declare class Skip { + constructor(param?: symbol); + ifUndefined(value: T | undefined): T | Skip; +} + +export declare const skip: Skip; + +/** + * An interface that represents a span. A span represents a single operation + * within a trace. Examples of span might include remote procedure calls or a + * in-process function calls to sub-components. A Trace has a single, top-level + * "root" Span that in turn may have zero or more child Spans, which in turn + * may have children. + * + * Spans are created by the {@link Tracer.startSpan} method. + */ +declare interface Span { + /** + * Returns the {@link SpanContext} object associated with this Span. + * + * Get an immutable, serializable identifier for this span that can be used + * to create new child spans. Returned SpanContext is usable even after the + * span ends. + * + * @returns the SpanContext object associated with this Span. + */ + spanContext(): SpanContext; + /** + * Sets an attribute to the span. + * + * Sets a single Attribute with the key and value passed as arguments. + * + * @param key the key for this attribute. + * @param value the value for this attribute. Setting a value null or + * undefined is invalid and will result in undefined behavior. + */ + setAttribute(key: string, value: SpanAttributeValue): this; + /** + * Sets attributes to the span. + * + * @param attributes the attributes that will be added. + * null or undefined attribute values + * are invalid and will result in undefined behavior. + */ + setAttributes(attributes: SpanAttributes): this; + /** + * Adds an event to the Span. + * + * @param name the name of the event. + * @param [attributesOrStartTime] the attributes that will be added; these are + * associated with this event. Can be also a start time + * if type is {@type TimeInput} and 3rd param is undefined + * @param [startTime] start time of the event. + */ + addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this; + /** + * Adds a single link to the span. + * + * Links added after the creation will not affect the sampling decision. + * It is preferred span links be added at span creation. + * + * @param link the link to add. + */ + addLink(link: Link): this; + /** + * Adds multiple links to the span. + * + * Links added after the creation will not affect the sampling decision. + * It is preferred span links be added at span creation. + * + * @param links the links to add. + */ + addLinks(links: Link[]): this; + /** + * Sets a status to the span. If used, this will override the default Span + * status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value + * of previous calls to SetStatus on the Span. + * + * @param status the SpanStatus to set. + */ + setStatus(status: SpanStatus): this; + /** + * Updates the Span name. + * + * This will override the name provided via {@link Tracer.startSpan}. + * + * Upon this update, any sampling behavior based on Span name will depend on + * the implementation. + * + * @param name the Span name. + */ + updateName(name: string): this; + /** + * Marks the end of Span execution. + * + * Call to End of a Span MUST not have any effects on child spans. Those may + * still be running and can be ended later. + * + * Do not return `this`. The Span generally should not be used after it + * is ended so chaining is not desired in this context. + * + * @param [endTime] the time to set as Span's end time. If not provided, + * use the current time as the span's end time. + */ + end(endTime?: TimeInput): void; + /** + * Returns the flag whether this span will be recorded. + * + * @returns true if this Span is active and recording information like events + * with the `AddEvent` operation and attributes using `setAttributes`. + */ + isRecording(): boolean; + /** + * Sets exception as a span event + * @param exception the exception the only accepted values are string or Error + * @param [time] the time to set as Span's event time. If not provided, + * use the current time. + */ + recordException(exception: Exception, time?: TimeInput): void; +} + +/** + * @deprecated please use {@link Attributes} + */ +declare type SpanAttributes = Attributes; + +/** + * @deprecated please use {@link AttributeValue} + */ +declare type SpanAttributeValue = AttributeValue; + +declare type SpanCallback = (span?: Span, context?: Context) => R; + +/** + * A SpanContext represents the portion of a {@link Span} which must be + * serialized and propagated along side of a {@link Baggage}. + */ +declare interface SpanContext { + /** + * The ID of the trace that this span belongs to. It is worldwide unique + * with practically sufficient probability by being made as 16 randomly + * generated bytes, encoded as a 32 lowercase hex characters corresponding to + * 128 bits. + */ + traceId: string; + /** + * The ID of the Span. It is globally unique with practically sufficient + * probability by being made as 8 randomly generated bytes, encoded as a 16 + * lowercase hex characters corresponding to 64 bits. + */ + spanId: string; + /** + * Only true if the SpanContext was propagated from a remote parent. + */ + isRemote?: boolean; + /** + * Trace flags to propagate. + * + * It is represented as 1 byte (bitmap). Bit to represent whether trace is + * sampled or not. When set, the least significant bit documents that the + * caller may have recorded trace data. A caller who does not record trace + * data out-of-band leaves this flag unset. + * + * see {@link TraceFlags} for valid flag values. + */ + traceFlags: number; + /** + * Tracing-system-specific info to propagate. + * + * The tracestate field value is a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * More Info: https://www.w3.org/TR/trace-context/#tracestate-field + * + * Examples: + * Single tracing system (generic format): + * tracestate: rojo=00f067aa0ba902b7 + * Multiple tracing systems (with different formatting): + * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE + */ + traceState?: TraceState; +} + +declare enum SpanKind { + /** Default value. Indicates that the span is used internally. */ + INTERNAL = 0, + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote request. + */ + SERVER = 1, + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + */ + CLIENT = 2, + /** + * Indicates that the span describes producer sending a message to a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + PRODUCER = 3, + /** + * Indicates that the span describes consumer receiving a message from a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + CONSUMER = 4 +} + +/** + * Options needed for span creation + */ +declare interface SpanOptions { + /** + * The SpanKind of a span + * @default {@link SpanKind.INTERNAL} + */ + kind?: SpanKind; + /** A span's attributes */ + attributes?: SpanAttributes; + /** {@link Link}s span to other spans */ + links?: Link[]; + /** A manually specified start time for the created `Span` object. */ + startTime?: TimeInput; + /** The new span should be a root span. (Ignore parent from context). */ + root?: boolean; +} + +declare interface SpanStatus { + /** The status code of this message. */ + code: SpanStatusCode; + /** A developer-facing error message. */ + message?: string; +} + +/** + * An enumeration of status codes. + */ +declare enum SpanStatusCode { + /** + * The default status. + */ + UNSET = 0, + /** + * The operation has been validated by an Application developer or + * Operator to have completed successfully. + */ + OK = 1, + /** + * The operation contains an error. + */ + ERROR = 2 +} + +/** + * A SQL instance can be nested within each other to build SQL strings. + */ +export declare class Sql { + readonly values: Value[]; + readonly strings: string[]; + constructor(rawStrings: readonly string[], rawValues: readonly RawValue[]); + get sql(): string; + get statement(): string; + get text(): string; + inspect(): { + sql: string; + statement: string; + text: string; + values: unknown[]; + }; +} + +/** + * Create a SQL object from a template string. + */ +export declare function sqltag(strings: readonly string[], ...values: readonly RawValue[]): Sql; + +/** + * Defines TimeInput. + * + * hrtime, epoch milliseconds, performance.now() or Date + */ +declare type TimeInput = HrTime | number | Date; + +export declare type ToTuple = T extends any[] ? T : [T]; + +declare interface TraceState { + /** + * Create a new TraceState which inherits from this TraceState and has the + * given key set. + * The new entry will always be added in the front of the list of states. + * + * @param key key of the TraceState entry. + * @param value value of the TraceState entry. + */ + set(key: string, value: string): TraceState; + /** + * Return a new TraceState which inherits from this TraceState but does not + * contain the given key. + * + * @param key the key for the TraceState entry to be removed. + */ + unset(key: string): TraceState; + /** + * Returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + * + * @param key with which the specified value is to be associated. + * @returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + */ + get(key: string): string | undefined; + /** + * Serializes the TraceState to a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * + * @returns the serialized string. + */ + serialize(): string; +} + +declare interface TracingHelper { + isEnabled(): boolean; + getTraceParent(context?: Context): string; + createEngineSpan(engineSpanEvent: EngineSpanEvent): void; + getActiveContext(): Context | undefined; + runInChildSpan(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback): R; +} + +declare interface Transaction extends Queryable { + /** + * Transaction options. + */ + readonly options: TransactionOptions; + /** + * Commit the transaction. + */ + commit(): Promise>; + /** + * Rolls back the transaction. + */ + rollback(): Promise>; +} + +declare namespace Transaction_2 { + export { + IsolationLevel, + Options, + InteractiveTransactionInfo, + TransactionHeaders + } +} + +declare interface TransactionContext extends Queryable { + /** + * Starts new transaction. + */ + startTransaction(): Promise>; +} + +declare type TransactionHeaders = { + traceparent?: string; +}; + +declare type TransactionOptions = { + usePhantomQuery: boolean; +}; + +declare type TransactionOptions_2 = { + kind: 'itx'; + options: InteractiveTransactionOptions; +} | { + kind: 'batch'; + options: BatchTransactionOptions; +}; + +export declare class TypedSql { + [PrivateResultType]: Result; + constructor(sql: string, values: Values); + get sql(): string; + get values(): Values; +} + +export declare type TypeMapCbDef = Fn<{ + extArgs: InternalArgs; + clientOptions: ClientOptionDef; +}, TypeMapDef>; + +/** Shared */ +export declare type TypeMapDef = Record; + +declare namespace Types { + export { + Result_3 as Result, + Extensions_2 as Extensions, + Utils, + Public_2 as Public, + isSkip, + Skip, + skip, + UnknownTypedSql, + OperationPayload as Payload + } +} +export { Types } + +declare type UnknownErrorParams = { + clientVersion: string; + batchRequestIdx?: number; +}; + +export declare type UnknownTypedSql = TypedSql; + +declare type Unpacker = (data: any) => any; + +export declare type UnwrapPayload

= {} extends P ? unknown : { + [K in keyof P]: P[K] extends { + scalars: infer S; + composites: infer C; + }[] ? Array> : P[K] extends { + scalars: infer S; + composites: infer C; + } | null ? S & UnwrapPayload | Select : never; +}; + +export declare type UnwrapPromise

= P extends Promise ? R : P; + +export declare type UnwrapTuple = { + [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise ? X : UnwrapPromise : UnwrapPromise; +}; + +/** + * Input that flows from the user into the Client. + */ +declare type UserArgs_2 = any; + +declare namespace Utils { + export { + EmptyToUnknown, + NeverToUnknown, + PatchFlat, + Omit_2 as Omit, + Pick_2 as Pick, + ComputeDeep, + Compute, + OptionalFlat, + ReadonlyDeep, + Narrowable, + Narrow, + Exact, + Cast, + Record_2 as Record, + UnwrapPromise, + UnwrapTuple, + Path, + Fn, + Call, + RequiredKeys, + OptionalKeys, + Optional, + Return, + ToTuple, + RenameAndNestPayloadKeys, + PayloadToResult, + Select, + Equals, + Or, + JsPromise + } +} + +declare function validator(): (select: Exact) => S; + +declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; + +declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; + +/** + * Values supported by SQL engine. + */ +export declare type Value = unknown; + +export declare function warnEnvConflicts(envPaths: any): void; + +export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void; + +declare type WasmLoadingConfig = { + /** + * WASM-bindgen runtime for corresponding module + */ + getRuntime: () => { + __wbg_set_wasm(exports: unknown): any; + QueryEngine: QueryEngineConstructor; + }; + /** + * Loads the raw wasm module for the wasm query engine. This configuration is + * generated specifically for each type of client, eg. Node.js client and Edge + * clients will have different implementations. + * @remarks this is a callback on purpose, we only load the wasm if needed. + * @remarks only used by LibraryEngine.ts + */ + getQueryEngineWasmModule: () => Promise; +}; + +export { } diff --git a/apps/api/release/vendor/@prisma/client/runtime/library.js b/apps/api/release/vendor/@prisma/client/runtime/library.js new file mode 100644 index 0000000..f60b9c2 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/library.js @@ -0,0 +1,143 @@ +"use strict";var eu=Object.create;var Nr=Object.defineProperty;var tu=Object.getOwnPropertyDescriptor;var ru=Object.getOwnPropertyNames;var nu=Object.getPrototypeOf,iu=Object.prototype.hasOwnProperty;var Z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ut=(e,t)=>{for(var r in t)Nr(e,r,{get:t[r],enumerable:!0})},ho=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ru(t))!iu.call(e,i)&&i!==r&&Nr(e,i,{get:()=>t[i],enumerable:!(n=tu(t,i))||n.enumerable});return e};var k=(e,t,r)=>(r=e!=null?eu(nu(e)):{},ho(t||!e||!e.__esModule?Nr(r,"default",{value:e,enumerable:!0}):r,e)),ou=e=>ho(Nr({},"__esModule",{value:!0}),e);var jo=Z((pf,Zn)=>{"use strict";var v=Zn.exports;Zn.exports.default=v;var D="\x1B[",Ht="\x1B]",ft="\x07",Jr=";",qo=process.env.TERM_PROGRAM==="Apple_Terminal";v.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?D+(e+1)+"G":D+(t+1)+";"+(e+1)+"H"};v.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let r="";return e<0?r+=D+-e+"D":e>0&&(r+=D+e+"C"),t<0?r+=D+-t+"A":t>0&&(r+=D+t+"B"),r};v.cursorUp=(e=1)=>D+e+"A";v.cursorDown=(e=1)=>D+e+"B";v.cursorForward=(e=1)=>D+e+"C";v.cursorBackward=(e=1)=>D+e+"D";v.cursorLeft=D+"G";v.cursorSavePosition=qo?"\x1B7":D+"s";v.cursorRestorePosition=qo?"\x1B8":D+"u";v.cursorGetPosition=D+"6n";v.cursorNextLine=D+"E";v.cursorPrevLine=D+"F";v.cursorHide=D+"?25l";v.cursorShow=D+"?25h";v.eraseLines=e=>{let t="";for(let r=0;r[Ht,"8",Jr,Jr,t,ft,e,Ht,"8",Jr,Jr,ft].join("");v.image=(e,t={})=>{let r=`${Ht}1337;File=inline=1`;return t.width&&(r+=`;width=${t.width}`),t.height&&(r+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+e.toString("base64")+ft};v.iTerm={setCwd:(e=process.cwd())=>`${Ht}50;CurrentDir=${e}${ft}`,annotation:(e,t={})=>{let r=`${Ht}1337;`,n=typeof t.x<"u",i=typeof t.y<"u";if((n||i)&&!(n&&i&&typeof t.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),r+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?r+=(n?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):r+=e,r+ft}}});var Xn=Z((df,Vo)=>{"use strict";Vo.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n{"use strict";var Gu=require("os"),Bo=require("tty"),de=Xn(),{env:Q}=process,Qe;de("no-color")||de("no-colors")||de("color=false")||de("color=never")?Qe=0:(de("color")||de("colors")||de("color=true")||de("color=always"))&&(Qe=1);"FORCE_COLOR"in Q&&(Q.FORCE_COLOR==="true"?Qe=1:Q.FORCE_COLOR==="false"?Qe=0:Qe=Q.FORCE_COLOR.length===0?1:Math.min(parseInt(Q.FORCE_COLOR,10),3));function ei(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ti(e,t){if(Qe===0)return 0;if(de("color=16m")||de("color=full")||de("color=truecolor"))return 3;if(de("color=256"))return 2;if(e&&!t&&Qe===void 0)return 0;let r=Qe||0;if(Q.TERM==="dumb")return r;if(process.platform==="win32"){let n=Gu.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Q)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Q)||Q.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Q)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Q.TEAMCITY_VERSION)?1:0;if(Q.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Q){let n=parseInt((Q.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Q.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Q.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Q.TERM)||"COLORTERM"in Q?1:r}function Qu(e){let t=ti(e,e&&e.isTTY);return ei(t)}Uo.exports={supportsColor:Qu,stdout:ei(ti(!0,Bo.isatty(1))),stderr:ei(ti(!0,Bo.isatty(2)))}});var Wo=Z((ff,Jo)=>{"use strict";var Ju=Go(),gt=Xn();function Qo(e){if(/^\d{3,4}$/.test(e)){let r=/(\d{1,2})(\d{2})/.exec(e);return{major:0,minor:parseInt(r[1],10),patch:parseInt(r[2],10)}}let t=(e||"").split(".").map(r=>parseInt(r,10));return{major:t[0],minor:t[1],patch:t[2]}}function ri(e){let{env:t}=process;if("FORCE_HYPERLINK"in t)return!(t.FORCE_HYPERLINK.length>0&&parseInt(t.FORCE_HYPERLINK,10)===0);if(gt("no-hyperlink")||gt("no-hyperlinks")||gt("hyperlink=false")||gt("hyperlink=never"))return!1;if(gt("hyperlink=true")||gt("hyperlink=always")||"NETLIFY"in t)return!0;if(!Ju.supportsColor(e)||e&&!e.isTTY||process.platform==="win32"||"CI"in t||"TEAMCITY_VERSION"in t)return!1;if("TERM_PROGRAM"in t){let r=Qo(t.TERM_PROGRAM_VERSION);switch(t.TERM_PROGRAM){case"iTerm.app":return r.major===3?r.minor>=1:r.major>3;case"WezTerm":return r.major>=20200620;case"vscode":return r.major>1||r.major===1&&r.minor>=72}}if("VTE_VERSION"in t){if(t.VTE_VERSION==="0.50.0")return!1;let r=Qo(t.VTE_VERSION);return r.major>0||r.minor>=50}return!1}Jo.exports={supportsHyperlink:ri,stdout:ri(process.stdout),stderr:ri(process.stderr)}});var Ko=Z((gf,Kt)=>{"use strict";var Wu=jo(),ni=Wo(),Ho=(e,t,{target:r="stdout",...n}={})=>ni[r]?Wu.link(e,t):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,t):`${e} (\u200B${t}\u200B)`;Kt.exports=(e,t,r={})=>Ho(e,t,r);Kt.exports.stderr=(e,t,r={})=>Ho(e,t,{target:"stderr",...r});Kt.exports.isSupported=ni.stdout;Kt.exports.stderr.isSupported=ni.stderr});var oi=Z((Rf,Hu)=>{Hu.exports={name:"@prisma/engines-version",version:"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"605197351a3c8bdd595af2d2a9bc3025bca48ea2"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.34",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var si=Z(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.enginesVersion=void 0;Wr.enginesVersion=oi().prisma.enginesVersion});var Xo=Z((Gf,Yu)=>{Yu.exports={name:"dotenv",version:"16.0.3",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{require:"./lib/main.js",types:"./lib/main.d.ts",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^17.0.9",decache:"^4.6.1",dtslint:"^3.7.0",sinon:"^12.0.1",standard:"^16.0.4","standard-markdown":"^7.1.0","standard-version":"^9.3.2",tap:"^15.1.6",tar:"^6.1.11",typescript:"^4.5.4"},engines:{node:">=12"}}});var ts=Z((Qf,Kr)=>{"use strict";var Zu=require("fs"),es=require("path"),Xu=require("os"),ec=Xo(),tc=ec.version,rc=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function nc(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,` +`);let n;for(;(n=rc.exec(r))!=null;){let i=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,` +`),o=o.replace(/\\r/g,"\r")),t[i]=o}return t}function ci(e){console.log(`[dotenv@${tc}][DEBUG] ${e}`)}function ic(e){return e[0]==="~"?es.join(Xu.homedir(),e.slice(1)):e}function oc(e){let t=es.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug),i=!!(e&&e.override);e&&(e.path!=null&&(t=ic(e.path)),e.encoding!=null&&(r=e.encoding));try{let o=Hr.parse(Zu.readFileSync(t,{encoding:r}));return Object.keys(o).forEach(function(s){Object.prototype.hasOwnProperty.call(process.env,s)?(i===!0&&(process.env[s]=o[s]),n&&ci(i===!0?`"${s}" is already defined in \`process.env\` and WAS overwritten`:`"${s}" is already defined in \`process.env\` and was NOT overwritten`)):process.env[s]=o[s]}),{parsed:o}}catch(o){return n&&ci(`Failed to load ${t} ${o.message}`),{error:o}}}var Hr={config:oc,parse:nc};Kr.exports.config=Hr.config;Kr.exports.parse=Hr.parse;Kr.exports=Hr});var as=Z((Zf,ss)=>{"use strict";ss.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var us=Z((Xf,ls)=>{"use strict";var uc=as();ls.exports=e=>{let t=uc(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var fi=Z((og,cs)=>{"use strict";cs.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var fs=Z((lg,ms)=>{"use strict";ms.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var bi=Z((ug,gs)=>{"use strict";var yc=fs();gs.exports=e=>typeof e=="string"?e.replace(yc(),""):e});var hs=Z((dg,Zr)=>{"use strict";Zr.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};Zr.exports.default=Zr.exports});var Ai=Z((Th,$s)=>{"use strict";$s.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;sGn,Decimal:()=>xe,Extensions:()=>jn,MetricsClient:()=>Dt,NotFoundError:()=>Le,PrismaClientInitializationError:()=>R,PrismaClientKnownRequestError:()=>V,PrismaClientRustPanicError:()=>le,PrismaClientUnknownRequestError:()=>B,PrismaClientValidationError:()=>J,Public:()=>Vn,Sql:()=>oe,defineDmmfProperty:()=>ua,deserializeJsonResponse:()=>wt,dmmfToRuntimeDataModel:()=>la,empty:()=>ma,getPrismaClient:()=>Yl,getRuntime:()=>In,join:()=>da,makeStrictEnum:()=>Zl,makeTypedQueryFactory:()=>ca,objectEnumValues:()=>yn,raw:()=>ji,serializeJsonQuery:()=>vn,skip:()=>Pn,sqltag:()=>Vi,warnEnvConflicts:()=>Xl,warnOnce:()=>tr});module.exports=ou(Nm);var jn={};Ut(jn,{defineExtension:()=>yo,getExtensionContext:()=>bo});function yo(e){return typeof e=="function"?e:t=>t.$extends(e)}function bo(e){return e}var Vn={};Ut(Vn,{validator:()=>Eo});function Eo(...e){return t=>t}var Mr={};Ut(Mr,{$:()=>To,bgBlack:()=>gu,bgBlue:()=>Eu,bgCyan:()=>xu,bgGreen:()=>yu,bgMagenta:()=>wu,bgRed:()=>hu,bgWhite:()=>Pu,bgYellow:()=>bu,black:()=>pu,blue:()=>rt,bold:()=>H,cyan:()=>De,dim:()=>Oe,gray:()=>Gt,green:()=>qe,grey:()=>fu,hidden:()=>uu,inverse:()=>lu,italic:()=>au,magenta:()=>du,red:()=>ce,reset:()=>su,strikethrough:()=>cu,underline:()=>X,white:()=>mu,yellow:()=>ke});var Bn,wo,xo,Po,vo=!0;typeof process<"u"&&({FORCE_COLOR:Bn,NODE_DISABLE_COLORS:wo,NO_COLOR:xo,TERM:Po}=process.env||{},vo=process.stdout&&process.stdout.isTTY);var To={enabled:!wo&&xo==null&&Po!=="dumb"&&(Bn!=null&&Bn!=="0"||vo)};function M(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!To.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var su=M(0,0),H=M(1,22),Oe=M(2,22),au=M(3,23),X=M(4,24),lu=M(7,27),uu=M(8,28),cu=M(9,29),pu=M(30,39),ce=M(31,39),qe=M(32,39),ke=M(33,39),rt=M(34,39),du=M(35,39),De=M(36,39),mu=M(37,39),Gt=M(90,39),fu=M(90,39),gu=M(40,49),hu=M(41,49),yu=M(42,49),bu=M(43,49),Eu=M(44,49),wu=M(45,49),xu=M(46,49),Pu=M(47,49);var vu=100,Ro=["green","yellow","blue","magenta","cyan","red"],Qt=[],Co=Date.now(),Tu=0,Un=typeof process<"u"?process.env:{};globalThis.DEBUG??=Un.DEBUG??"";globalThis.DEBUG_COLORS??=Un.DEBUG_COLORS?Un.DEBUG_COLORS==="true":!0;var Jt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function Ru(e){let t={color:Ro[Tu++%Ro.length],enabled:Jt.enabled(e),namespace:e,log:Jt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Qt.push([o,...n]),Qt.length>vu&&Qt.shift(),Jt.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:Cu(c)),u=`+${Date.now()-Co}ms`;Co=Date.now(),globalThis.DEBUG_COLORS?a(Mr[s](H(o)),...l,Mr[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Gn=new Proxy(Ru,{get:(e,t)=>Jt[t],set:(e,t,r)=>Jt[t]=r});function Cu(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function So(e=7500){let t=Qt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` +`);return t.length!!(e&&typeof e=="object"),jr=e=>e&&!!e[_e],Ee=(e,t,r)=>{if(jr(e)){let n=e[_e](),{matched:i,selections:o}=n.match(t);return i&&o&&Object.keys(o).forEach(s=>r(s,o[s])),i}if(Wn(e)){if(!Wn(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],o=[];for(let s of e.keys()){let a=e[s];jr(a)&&a[Su]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.lengthEe(u,s[c],r))&&i.every((u,c)=>Ee(u,a[c],r))&&(o.length===0||Ee(o[0],l,r))}return e.length===t.length&&e.every((s,a)=>Ee(s,t[a],r))}return Object.keys(e).every(n=>{let i=e[n];return(n in t||jr(o=i)&&o[_e]().matcherType==="optional")&&Ee(i,t[n],r);var o})}return Object.is(t,e)},Ge=e=>{var t,r,n;return Wn(e)?jr(e)?(t=(r=(n=e[_e]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Wt(e,Ge):Wt(Object.values(e),Ge):[]},Wt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function pe(e){return Object.assign(e,{optional:()=>Au(e),and:t=>j(e,t),or:t=>Iu(e,t),select:t=>t===void 0?Oo(e):Oo(t,e)})}function Au(e){return pe({[_e]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return t===void 0?(Ge(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:Ee(e,t,n),selections:r}},getSelectionKeys:()=>Ge(e),matcherType:"optional"})})}function j(...e){return pe({[_e]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return{matched:e.every(i=>Ee(i,t,n)),selections:r}},getSelectionKeys:()=>Wt(e,Ge),matcherType:"and"})})}function Iu(...e){return pe({[_e]:()=>({match:t=>{let r={},n=(i,o)=>{r[i]=o};return Wt(e,Ge).forEach(i=>n(i,void 0)),{matched:e.some(i=>Ee(i,t,n)),selections:r}},getSelectionKeys:()=>Wt(e,Ge),matcherType:"or"})})}function I(e){return{[_e]:()=>({match:t=>({matched:!!e(t)})})}}function Oo(...e){let t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return pe({[_e]:()=>({match:n=>{let i={[t??Vr]:n};return{matched:r===void 0||Ee(r,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[t??Vr].concat(r===void 0?[]:Ge(r))})})}function ye(e){return typeof e=="number"}function je(e){return typeof e=="string"}function Ve(e){return typeof e=="bigint"}var Km=pe(I(function(e){return!0}));var Be=e=>Object.assign(pe(e),{startsWith:t=>{return Be(j(e,(r=t,I(n=>je(n)&&n.startsWith(r)))));var r},endsWith:t=>{return Be(j(e,(r=t,I(n=>je(n)&&n.endsWith(r)))));var r},minLength:t=>Be(j(e,(r=>I(n=>je(n)&&n.length>=r))(t))),length:t=>Be(j(e,(r=>I(n=>je(n)&&n.length===r))(t))),maxLength:t=>Be(j(e,(r=>I(n=>je(n)&&n.length<=r))(t))),includes:t=>{return Be(j(e,(r=t,I(n=>je(n)&&n.includes(r)))));var r},regex:t=>{return Be(j(e,(r=t,I(n=>je(n)&&!!n.match(r)))));var r}}),zm=Be(I(je)),be=e=>Object.assign(pe(e),{between:(t,r)=>be(j(e,((n,i)=>I(o=>ye(o)&&n<=o&&i>=o))(t,r))),lt:t=>be(j(e,(r=>I(n=>ye(n)&&nbe(j(e,(r=>I(n=>ye(n)&&n>r))(t))),lte:t=>be(j(e,(r=>I(n=>ye(n)&&n<=r))(t))),gte:t=>be(j(e,(r=>I(n=>ye(n)&&n>=r))(t))),int:()=>be(j(e,I(t=>ye(t)&&Number.isInteger(t)))),finite:()=>be(j(e,I(t=>ye(t)&&Number.isFinite(t)))),positive:()=>be(j(e,I(t=>ye(t)&&t>0))),negative:()=>be(j(e,I(t=>ye(t)&&t<0)))}),Ym=be(I(ye)),Ue=e=>Object.assign(pe(e),{between:(t,r)=>Ue(j(e,((n,i)=>I(o=>Ve(o)&&n<=o&&i>=o))(t,r))),lt:t=>Ue(j(e,(r=>I(n=>Ve(n)&&nUe(j(e,(r=>I(n=>Ve(n)&&n>r))(t))),lte:t=>Ue(j(e,(r=>I(n=>Ve(n)&&n<=r))(t))),gte:t=>Ue(j(e,(r=>I(n=>Ve(n)&&n>=r))(t))),positive:()=>Ue(j(e,I(t=>Ve(t)&&t>0))),negative:()=>Ue(j(e,I(t=>Ve(t)&&t<0)))}),Zm=Ue(I(Ve)),Xm=pe(I(function(e){return typeof e=="boolean"})),ef=pe(I(function(e){return typeof e=="symbol"})),tf=pe(I(function(e){return e==null})),rf=pe(I(function(e){return e!=null}));var Hn={matched:!1,value:void 0};function mt(e){return new Kn(e,Hn)}var Kn=class e{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;let r=t[t.length-1],n=[t[0]],i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let o=!1,s={},a=(u,c)=>{o=!0,s[u]=c},l=!n.some(u=>Ee(u,this.input,a))||i&&!i(this.input)?Hn:{matched:!0,value:r(o?Vr in s?s[Vr]:s:this.input,this.input)};return new e(this.input,l)}when(t,r){if(this.state.matched)return this;let n=!!t(this.input);return new e(this.input,n?{matched:!0,value:r(this.input,this.input)}:Hn)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let t;try{t=JSON.stringify(this.input)}catch{t=this.input}throw new Error(`Pattern matching error: no pattern matches value ${t}`)}run(){return this.exhaustive()}returnType(){return this}};var Fo=require("util");var Ou={warn:ke("prisma:warn")},ku={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Br(e,...t){ku.warn()&&console.warn(`${Ou.warn} ${e}`,...t)}var Du=(0,Fo.promisify)(_o.default.exec),te=L("prisma:get-platform"),_u=["1.0.x","1.1.x","3.0.x"];async function Lo(){let e=Gr.default.platform(),t=process.arch;if(e==="freebsd"){let s=await Qr("freebsd-version");if(s&&s.trim().length>0){let l=/^(\d+)\.?/.exec(s);if(l)return{platform:"freebsd",targetDistro:`freebsd${l[1]}`,arch:t}}}if(e!=="linux")return{platform:e,arch:t};let r=await Lu(),n=await Uu(),i=Mu({arch:t,archFromUname:n,familyDistro:r.familyDistro}),{libssl:o}=await $u(i);return{platform:"linux",libssl:o,arch:t,archFromUname:n,...r}}function Fu(e){let t=/^ID="?([^"\n]*)"?$/im,r=/^ID_LIKE="?([^"\n]*)"?$/im,n=t.exec(e),i=n&&n[1]&&n[1].toLowerCase()||"",o=r.exec(e),s=o&&o[1]&&o[1].toLowerCase()||"",a=mt({id:i,idLike:s}).with({id:"alpine"},({id:l})=>({targetDistro:"musl",familyDistro:l,originalDistro:l})).with({id:"raspbian"},({id:l})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:l})).with({id:"nixos"},({id:l})=>({targetDistro:"nixos",originalDistro:l,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).when(({idLike:l})=>l.includes("debian")||l.includes("ubuntu"),({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).when(({idLike:l})=>i==="arch"||l.includes("arch"),({id:l})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:l})).when(({idLike:l})=>l.includes("centos")||l.includes("fedora")||l.includes("rhel")||l.includes("suse"),({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).otherwise(({id:l})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:l}));return te(`Found distro info: +${JSON.stringify(a,null,2)}`),a}async function Lu(){let e="/etc/os-release";try{let t=await zn.default.readFile(e,{encoding:"utf-8"});return Fu(t)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function Nu(e){let t=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(t){let r=`${t[1]}.x`;return No(r)}}function ko(e){let t=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(t){let r=`${t[1]}${t[2]??".0"}.x`;return No(r)}}function No(e){let t=(()=>{if($o(e))return e;let r=e.split(".");return r[1]="0",r.join(".")})();if(_u.includes(t))return t}function Mu(e){return mt(e).with({familyDistro:"musl"},()=>(te('Trying platform-specific paths for "alpine"'),["/lib"])).with({familyDistro:"debian"},({archFromUname:t})=>(te('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${t}-linux-gnu`,`/lib/${t}-linux-gnu`])).with({familyDistro:"rhel"},()=>(te('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:t,arch:r,archFromUname:n})=>(te(`Don't know any platform-specific paths for "${t}" on ${r} (${n})`),[]))}async function $u(e){let t='grep -v "libssl.so.0"',r=await Do(e);if(r){te(`Found libssl.so file using platform-specific paths: ${r}`);let o=ko(r);if(te(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"libssl-specific-path"}}te('Falling back to "ldconfig" and other generic paths');let n=await Qr(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${t}`);if(n||(n=await Do(["/lib64","/usr/lib64","/lib"])),n){te(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=ko(n);if(te(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Qr("openssl version -v");if(i){te(`Found openssl binary with version: ${i}`);let o=Nu(i);if(te(`The parsed openssl version is: ${o}`),o)return{libssl:o,strategy:"openssl-binary"}}return te("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function Do(e){for(let t of e){let r=await qu(t);if(r)return r}}async function qu(e){try{return(await zn.default.readdir(e)).find(r=>r.startsWith("libssl.so.")&&!r.startsWith("libssl.so.0"))}catch(t){if(t.code==="ENOENT")return;throw t}}async function nt(){let{binaryTarget:e}=await Mo();return e}function ju(e){return e.binaryTarget!==void 0}async function Yn(){let{memoized:e,...t}=await Mo();return t}var Ur={};async function Mo(){if(ju(Ur))return Promise.resolve({...Ur,memoized:!0});let e=await Lo(),t=Vu(e);return Ur={...e,binaryTarget:t},{...Ur,memoized:!1}}function Vu(e){let{platform:t,arch:r,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;t==="linux"&&!["x64","arm64"].includes(r)&&Br(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${r}" instead). If you are using your own custom Prisma engines, you can ignore this warning, as long as you've compiled the engines for your system architecture "${n}".`);let l="1.1.x";if(t==="linux"&&i===void 0){let c=mt({familyDistro:s}).with({familyDistro:"debian"},()=>"Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed.").otherwise(()=>"Please manually install OpenSSL and try installing Prisma again.");Br(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${l}". +${c}`)}let u="debian";if(t==="linux"&&o===void 0&&te(`Distro is "${a}". Falling back to Prisma engines built for "${u}".`),t==="darwin"&&r==="arm64")return"darwin-arm64";if(t==="darwin")return"darwin";if(t==="win32")return"windows";if(t==="freebsd")return o;if(t==="openbsd")return"openbsd";if(t==="netbsd")return"netbsd";if(t==="linux"&&o==="nixos")return"linux-nixos";if(t==="linux"&&r==="arm64")return`${o==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${i||l}`;if(t==="linux"&&r==="arm")return`linux-arm-openssl-${i||l}`;if(t==="linux"&&o==="musl"){let c="linux-musl";return!i||$o(i)?c:`${c}-openssl-${i}`}return t==="linux"&&o&&i?`${o}-openssl-${i}`:(t!=="linux"&&Br(`Prisma detected unknown OS "${t}" and may not work as expected. Defaulting to "linux".`),i?`${u}-openssl-${i}`:o?`${o}-openssl-${l}`:`${u}-openssl-${l}`)}async function Bu(e){try{return await e()}catch{return}}function Qr(e){return Bu(async()=>{let t=await Du(e);return te(`Command "${e}" successfully returned "${t.stdout}"`),t.stdout})}async function Uu(){return typeof Gr.default.machine=="function"?Gr.default.machine():(await Qr("uname -m"))?.trim()}function $o(e){return e.startsWith("1.")}var zo=k(Ko());function ii(e){return(0,zo.default)(e,e,{fallback:X})}var Ku=k(si());var $=k(require("path")),zu=k(si()),Lf=L("prisma:engines");function Yo(){return $.default.join(__dirname,"../")}var Nf="libquery-engine";$.default.join(__dirname,"../query-engine-darwin");$.default.join(__dirname,"../query-engine-darwin-arm64");$.default.join(__dirname,"../query-engine-debian-openssl-1.0.x");$.default.join(__dirname,"../query-engine-debian-openssl-1.1.x");$.default.join(__dirname,"../query-engine-debian-openssl-3.0.x");$.default.join(__dirname,"../query-engine-linux-static-x64");$.default.join(__dirname,"../query-engine-linux-static-arm64");$.default.join(__dirname,"../query-engine-rhel-openssl-1.0.x");$.default.join(__dirname,"../query-engine-rhel-openssl-1.1.x");$.default.join(__dirname,"../query-engine-rhel-openssl-3.0.x");$.default.join(__dirname,"../libquery_engine-darwin.dylib.node");$.default.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");$.default.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");$.default.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");$.default.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");$.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");$.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");$.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");$.default.join(__dirname,"../libquery_engine-linux-musl.so.node");$.default.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");$.default.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");$.default.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");$.default.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");$.default.join(__dirname,"../query_engine-windows.dll.node");var ai=k(require("fs")),Zo=L("chmodPlusX");function li(e){if(process.platform==="win32")return;let t=ai.default.statSync(e),r=t.mode|64|8|1;if(t.mode===r){Zo(`Execution permissions of ${e} are fine`);return}let n=r.toString(8).slice(-3);Zo(`Have to call chmodPlusX on ${e}`),ai.default.chmodSync(e,n)}function ui(e){let t=e.e,r=a=>`Prisma cannot find the required \`${a}\` system library in your system`,n=t.message.includes("cannot open shared object file"),i=`Please refer to the documentation about Prisma's system requirements: ${ii("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${Oe(e.id)}\`).`,s=mt({message:t.message,code:t.code}).with({code:"ENOENT"},()=>"File does not exist.").when(({message:a})=>n&&a.includes("libz"),()=>`${r("libz")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libgcc_s"),()=>`${r("libgcc_s")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libssl"),()=>{let a=e.platformInfo.libssl?`openssl-${e.platformInfo.libssl}`:"openssl";return`${r("libssl")}. Please install ${a} and try again.`}).when(({message:a})=>a.includes("GLIBC"),()=>`Prisma has detected an incompatible version of the \`glibc\` C standard library installed in your system. This probably means your system may be too old to run Prisma. ${i}`).when(({message:a})=>e.platformInfo.platform==="linux"&&a.includes("symbol not found"),()=>`The Prisma engines are not compatible with your system ${e.platformInfo.originalDistro} on (${e.platformInfo.archFromUname}) which uses the \`${e.platformInfo.binaryTarget}\` binaryTarget by default. ${i}`).otherwise(()=>`The Prisma engines do not seem to be compatible with your system. ${i}`);return`${o} +${s} + +Details: ${t.message}`}var di=k(ts()),zr=k(require("fs"));var ht=k(require("path"));function rs(e){let t=e.ignoreProcessEnv?{}:process.env,r=n=>n.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g)?.reduce(function(o,s){let a=/(.?)\${([a-zA-Z0-9_]+)?}/g.exec(s);if(!a)return o;let l=a[1],u,c;if(l==="\\")c=a[0],u=c.replace("\\$","$");else{let p=a[2];c=a[0].substring(l.length),u=Object.hasOwnProperty.call(t,p)?t[p]:e.parsed[p]||"",u=r(u)}return o.replace(c,u)},n)??n;for(let n in e.parsed){let i=Object.hasOwnProperty.call(t,n)?t[n]:e.parsed[n];e.parsed[n]=r(i)}for(let n in e.parsed)t[n]=e.parsed[n];return e}var pi=L("prisma:tryLoadEnv");function zt({rootEnvPath:e,schemaEnvPath:t},r={conflictCheck:"none"}){let n=ns(e);r.conflictCheck!=="none"&&sc(n,t,r.conflictCheck);let i=null;return is(n?.path,t)||(i=ns(t)),!n&&!i&&pi("No Environment variables loaded"),i?.dotenvResult.error?console.error(ce(H("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(` +`),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function sc(e,t,r){let n=e?.dotenvResult.parsed,i=!is(e?.path,t);if(n&&t&&i&&zr.default.existsSync(t)){let o=di.default.parse(zr.default.readFileSync(t)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=ht.default.relative(process.cwd(),e.path),l=ht.default.relative(process.cwd(),t);if(r==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${X(a)} and ${X(l)} +Conflicting env vars: +${s.map(c=>` ${H(c)}`).join(` +`)} + +We suggest to move the contents of ${X(l)} to ${X(a)} to consolidate your env vars. +`;throw new Error(u)}else if(r==="warn"){let u=`Conflict for env var${s.length>1?"s":""} ${s.map(c=>H(c)).join(", ")} in ${X(a)} and ${X(l)} +Env vars from ${X(l)} overwrite the ones from ${X(a)} + `;console.warn(`${ke("warn(prisma)")} ${u}`)}}}}function ns(e){if(ac(e)){pi(`Environment variables loaded from ${e}`);let t=di.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:rs(t),message:Oe(`Environment variables loaded from ${ht.default.relative(process.cwd(),e)}`),path:e}}else pi(`Environment variables not found at ${e}`);return null}function is(e,t){return e&&t&&ht.default.resolve(e)===ht.default.resolve(t)}function ac(e){return!!(e&&zr.default.existsSync(e))}var os="library";function Yt(e){let t=lc();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":os)}function lc(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}var Je;(t=>{let e;(E=>(E.findUnique="findUnique",E.findUniqueOrThrow="findUniqueOrThrow",E.findFirst="findFirst",E.findFirstOrThrow="findFirstOrThrow",E.findMany="findMany",E.create="create",E.createMany="createMany",E.createManyAndReturn="createManyAndReturn",E.update="update",E.updateMany="updateMany",E.upsert="upsert",E.delete="delete",E.deleteMany="deleteMany",E.groupBy="groupBy",E.count="count",E.aggregate="aggregate",E.findRaw="findRaw",E.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(Je||={});var Zt=k(require("path"));function mi(e){return Zt.default.sep===Zt.default.posix.sep?e:e.split(Zt.default.sep).join(Zt.default.posix.sep)}var ps=k(fi());function hi(e){return String(new gi(e))}var gi=class{constructor(t){this.config=t}toString(){let{config:t}=this,r=t.provider.fromEnvVar?`env("${t.provider.fromEnvVar}")`:t.provider.value,n=JSON.parse(JSON.stringify({provider:r,binaryTargets:cc(t.binaryTargets)}));return`generator ${t.name} { +${(0,ps.default)(pc(n),2)} +}`}};function cc(e){let t;if(e.length>0){let r=e.find(n=>n.fromEnvVar!==null);r?t=`env("${r.fromEnvVar}")`:t=e.map(n=>n.native?"native":n.value)}else t=void 0;return t}function pc(e){let t=Object.keys(e).reduce((r,n)=>Math.max(r,n.length),0);return Object.entries(e).map(([r,n])=>`${r.padEnd(t)} = ${dc(n)}`).join(` +`)}function dc(e){return JSON.parse(JSON.stringify(e,(t,r)=>Array.isArray(r)?`[${r.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(r)))}var er={};Ut(er,{error:()=>gc,info:()=>fc,log:()=>mc,query:()=>hc,should:()=>ds,tags:()=>Xt,warn:()=>yi});var Xt={error:ce("prisma:error"),warn:ke("prisma:warn"),info:De("prisma:info"),query:rt("prisma:query")},ds={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function mc(...e){console.log(...e)}function yi(e,...t){ds.warn()&&console.warn(`${Xt.warn} ${e}`,...t)}function fc(e,...t){console.info(`${Xt.info} ${e}`,...t)}function gc(e,...t){console.error(`${Xt.error} ${e}`,...t)}function hc(e,...t){console.log(`${Xt.query} ${e}`,...t)}function Yr(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}function Fe(e,t){throw new Error(t)}function Ei(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var wi=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});function yt(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function xi(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{ys.has(e)||(ys.add(e),yi(t,...r))};var V=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};w(V,"PrismaClientKnownRequestError");var Le=class extends V{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};w(Le,"NotFoundError");var R=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};w(R,"PrismaClientInitializationError");var le=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};w(le,"PrismaClientRustPanicError");var B=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};w(B,"PrismaClientUnknownRequestError");var J=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};w(J,"PrismaClientValidationError");var bt=9e15,ze=1e9,Pi="0123456789abcdef",tn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",rn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",vi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-bt,maxE:bt,crypto:!1},xs,Ne,x=!0,on="[DecimalError] ",Ke=on+"Invalid argument: ",Ps=on+"Precision limit exceeded",vs=on+"crypto unavailable",Ts="[object Decimal]",ee=Math.floor,G=Math.pow,bc=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ec=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,wc=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Rs=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ge=1e7,b=7,xc=9007199254740991,Pc=tn.length-1,Ti=rn.length-1,m={toStringTag:Ts};m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),y(e)};m.ceil=function(){return y(new this.constructor(this),this.e+1,2)};m.clampedTo=m.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(Ke+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};m.comparedTo=m.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};m.cosine=m.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+b,n.rounding=1,r=vc(n,Os(n,r)),n.precision=e,n.rounding=t,y(Ne==2||Ne==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};m.cubeRoot=m.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,c=this,p=c.constructor;if(!c.isFinite()||c.isZero())return new p(c);for(x=!1,o=c.s*G(c.s*c,1/3),!o||Math.abs(o)==1/0?(r=K(c.d),e=c.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=G(r,1/3),e=ee((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new p(r),n.s=c.s):n=new p(o.toString()),s=(e=p.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(c),n=N(u.plus(c).times(a),u.plus(l),s+2,1),K(a.d).slice(0,s)===(r=K(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(y(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(y(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return x=!0,y(n,e,p.rounding,t)};m.decimalPlaces=m.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-ee(this.e/b))*b,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};m.dividedBy=m.div=function(e){return N(this,new this.constructor(e))};m.dividedToIntegerBy=m.divToInt=function(e){var t=this,r=t.constructor;return y(N(t,new r(e),0,1,1),r.precision,r.rounding)};m.equals=m.eq=function(e){return this.cmp(e)===0};m.floor=function(){return y(new this.constructor(this),this.e+1,3)};m.greaterThan=m.gt=function(e){return this.cmp(e)>0};m.greaterThanOrEqualTo=m.gte=function(e){var t=this.cmp(e);return t==1||t===0};m.hyperbolicCosine=m.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/an(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=Et(s,1,o.times(t),new s(1),!0);for(var l,u=e,c=new s(8);u--;)l=o.times(o),o=a.minus(l.times(c.minus(l.times(c))));return y(o,s.precision=r,s.rounding=n,!0)};m.hyperbolicSine=m.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=Et(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/an(5,e)),i=Et(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,y(i,t,r,!0)};m.hyperbolicTangent=m.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,N(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};m.inverseCosine=m.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?fe(r,i,o):new r(0):new r(NaN):t.isZero()?fe(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=fe(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};m.inverseHyperbolicCosine=m.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,x=!1,r=r.times(r).minus(1).sqrt().plus(r),x=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};m.inverseHyperbolicSine=m.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,x=!1,r=r.times(r).plus(1).sqrt().plus(r),x=!0,n.precision=e,n.rounding=t,r.ln())};m.inverseHyperbolicTangent=m.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?y(new o(i),e,t,!0):(o.precision=r=n-i.e,i=N(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};m.inverseSine=m.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=fe(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};m.inverseTangent=m.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&p+4<=Ti)return s=fe(c,p+4,d).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(p+4<=Ti)return s=fe(c,p+4,d).times(.5),s.s=u.s,s}for(c.precision=a=p+10,c.rounding=1,r=Math.min(28,a/b+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(x=!1,t=Math.ceil(a/b),n=1,l=u.times(u),s=new c(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};m.isNaN=function(){return!this.s};m.isNegative=m.isNeg=function(){return this.s<0};m.isPositive=m.isPos=function(){return this.s>0};m.isZero=function(){return!!this.d&&this.d[0]===0};m.lessThan=m.lt=function(e){return this.cmp(e)<0};m.lessThanOrEqualTo=m.lte=function(e){return this.cmp(e)<1};m.logarithm=m.log=function(e){var t,r,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding,f=5;if(e==null)e=new c(10),t=!0;else{if(e=new c(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new c(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(x=!1,a=p+f,s=He(u,a),n=t?nn(c,a+10):He(e,a),l=N(s,n,a,1),rr(l.d,i=p,d))do if(a+=10,s=He(u,a),n=t?nn(c,a+10):He(e,a),l=N(s,n,a,1),!o){+K(l.d).slice(i+1,i+15)+1==1e14&&(l=y(l,p+1,0));break}while(rr(l.d,i+=10,d));return x=!0,y(l,p,d)};m.minus=m.sub=function(e){var t,r,n,i,o,s,a,l,u,c,p,d,f=this,g=f.constructor;if(e=new g(e),!f.d||!e.d)return!f.s||!e.s?e=new g(NaN):f.d?e.s=-e.s:e=new g(e.d||f.s!==e.s?f:NaN),e;if(f.s!=e.s)return e.s=-e.s,f.plus(e);if(u=f.d,d=e.d,a=g.precision,l=g.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else if(u[0])e=new g(f);else return new g(l===3?-0:0);return x?y(e,a,l):e}if(r=ee(e.e/b),c=ee(f.e/b),u=u.slice(),o=c-r,o){for(p=o<0,p?(t=u,o=-o,s=d.length):(t=d,r=c,s=u.length),n=Math.max(Math.ceil(a/b),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=d.length,p=n0;--n)u[s++]=0;for(n=d.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=c.length,s-i<0&&(i=s,r=c,c=u,u=r),t=0;i;)t=(u[--i]=u[i]+c[i]+t)/ge|0,u[i]%=ge;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=sn(u,n),x?y(e,a,l):e};m.precision=m.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ke+e);return r.d?(t=Cs(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};m.round=function(){var e=this,t=e.constructor;return y(new t(e),e.e+1,t.rounding)};m.sine=m.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+b,n.rounding=1,r=Rc(n,Os(n,r)),n.precision=e,n.rounding=t,y(Ne>2?r.neg():r,e,t,!0)):new n(NaN)};m.squareRoot=m.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,c=s.constructor;if(u!==1||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(x=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=K(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=ee((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new c(t)):n=new c(u.toString()),r=(l=c.precision)+3;;)if(o=n,n=o.plus(N(s,o,r+2,1)).times(.5),K(o.d).slice(0,r)===(t=K(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(y(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(y(n,l+1,1),e=!n.times(n).eq(s));break}return x=!0,y(n,l,c.rounding,e)};m.tangent=m.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=N(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,y(Ne==2||Ne==4?r.neg():r,e,t,!0)):new n(NaN)};m.times=m.mul=function(e){var t,r,n,i,o,s,a,l,u,c=this,p=c.constructor,d=c.d,f=(e=new p(e)).d;if(e.s*=c.s,!d||!d[0]||!f||!f[0])return new p(!e.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:!d||!f?e.s/0:e.s*0);for(r=ee(c.e/b)+ee(e.e/b),l=d.length,u=f.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+f[n]*d[i-n-1]+t,o[i--]=a%ge|0,t=a/ge|0;o[i]=(o[i]+t)%ge|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=sn(o,r),x?y(e,p.precision,p.rounding):e};m.toBinary=function(e,t){return Si(this,2,e,t)};m.toDecimalPlaces=m.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ie(e,0,ze),t===void 0?t=n.rounding:ie(t,0,8),y(r,e+r.e+1,t))};m.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=we(n,!0):(ie(e,0,ze),t===void 0?t=i.rounding:ie(t,0,8),n=y(new i(n),e+1,t),r=we(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};m.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=we(i):(ie(e,0,ze),t===void 0?t=o.rounding:ie(t,0,8),n=y(new o(i),e+i.e+1,t),r=we(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};m.toFraction=function(e){var t,r,n,i,o,s,a,l,u,c,p,d,f=this,g=f.d,h=f.constructor;if(!g)return new h(f);if(u=r=new h(1),n=l=new h(0),t=new h(n),o=t.e=Cs(g)-f.e-1,s=o%b,t.d[0]=G(10,s<0?b+s:s),e==null)e=o>0?t:u;else{if(a=new h(e),!a.isInt()||a.lt(u))throw Error(Ke+a);e=a.gt(t)?o>0?t:u:a}for(x=!1,a=new h(K(g)),c=h.precision,h.precision=o=g.length*b*2;p=N(a,t,0,1,1),i=r.plus(p.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(p.times(i)),l=i,i=t,t=a.minus(p.times(i)),a=i;return i=N(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=f.s,d=N(u,n,o,1).minus(f).abs().cmp(N(l,r,o,1).minus(f).abs())<1?[u,n]:[l,r],h.precision=c,x=!0,d};m.toHexadecimal=m.toHex=function(e,t){return Si(this,16,e,t)};m.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ie(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(x=!1,r=N(r,e,0,t,1).times(e),x=!0,y(r)):(e.s=r.s,r=e),r};m.toNumber=function(){return+this};m.toOctal=function(e,t){return Si(this,8,e,t)};m.toPower=m.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(G(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return y(a,n,o);if(t=ee(e.e/b),t>=e.d.length-1&&(r=u<0?-u:u)<=xc)return i=Ss(l,a,r,n),e.s<0?new l(1).div(i):y(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(x=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Ri(e.times(He(a,n+r)),n),i.d&&(i=y(i,n+5,1),rr(i.d,n,o)&&(t=n+10,i=y(Ri(e.times(He(a,t+r)),t),t+5,1),+K(i.d).slice(n+1,n+15)+1==1e14&&(i=y(i,n+1,0)))),i.s=s,x=!0,l.rounding=o,y(i,n,o))};m.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=we(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ie(e,1,ze),t===void 0?t=i.rounding:ie(t,0,8),n=y(new i(n),e,t),r=we(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};m.toSignificantDigits=m.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ie(e,1,ze),t===void 0?t=n.rounding:ie(t,0,8)),y(new n(r),e,t)};m.toString=function(){var e=this,t=e.constructor,r=we(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};m.truncated=m.trunc=function(){return y(new this.constructor(this),this.e+1,1)};m.valueOf=m.toJSON=function(){var e=this,t=e.constructor,r=we(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function K(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(Ke+e)}function rr(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=b,i=0):(i=Math.ceil((t+1)/b),t%=b),o=G(10,b-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==G(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==G(10,t-3)-1,s}function en(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function vc(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/an(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=Et(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var N=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,c,p,d,f,g,h,O,T,S,C,E,me,ae,Bt,U,ne,Ie,z,dt,Lr=n.constructor,qn=n.s==i.s?1:-1,Y=n.d,_=i.d;if(!Y||!Y[0]||!_||!_[0])return new Lr(!n.s||!i.s||(Y?_&&Y[0]==_[0]:!_)?NaN:Y&&Y[0]==0||!_?qn*0:qn/0);for(l?(f=1,c=n.e-i.e):(l=ge,f=b,c=ee(n.e/f)-ee(i.e/f)),z=_.length,ne=Y.length,T=new Lr(qn),S=T.d=[],p=0;_[p]==(Y[p]||0);p++);if(_[p]>(Y[p]||0)&&c--,o==null?(ae=o=Lr.precision,s=Lr.rounding):a?ae=o+(n.e-i.e)+1:ae=o,ae<0)S.push(1),g=!0;else{if(ae=ae/f+2|0,p=0,z==1){for(d=0,_=_[0],ae++;(p1&&(_=e(_,d,l),Y=e(Y,d,l),z=_.length,ne=Y.length),U=z,C=Y.slice(0,z),E=C.length;E=l/2&&++Ie;do d=0,u=t(_,C,z,E),u<0?(me=C[0],z!=E&&(me=me*l+(C[1]||0)),d=me/Ie|0,d>1?(d>=l&&(d=l-1),h=e(_,d,l),O=h.length,E=C.length,u=t(h,C,O,E),u==1&&(d--,r(h,z=10;d/=10)p++;T.e=p+c*f-1,y(T,a?o+T.e+1:o,s,g)}return T}}();function y(e,t,r,n){var i,o,s,a,l,u,c,p,d,f=e.constructor;e:if(t!=null){if(p=e.d,!p)return e;for(i=1,a=p[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=b,s=t,c=p[d=0],l=c/G(10,i-s-1)%10|0;else if(d=Math.ceil((o+1)/b),a=p.length,d>=a)if(n){for(;a++<=d;)p.push(0);c=l=0,i=1,o%=b,s=o-b+1}else break e;else{for(c=a=p[d],i=1;a>=10;a/=10)i++;o%=b,s=o-b+i,l=s<0?0:c/G(10,i-s-1)%10|0}if(n=n||t<0||p[d+1]!==void 0||(s<0?c:c%G(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?c/G(10,i-s):0:p[d-1])%10&1||r==(e.s<0?8:7)),t<1||!p[0])return p.length=0,u?(t-=e.e+1,p[0]=G(10,(b-t%b)%b),e.e=-t||0):p[0]=e.e=0,e;if(o==0?(p.length=d,a=1,d--):(p.length=d+1,a=G(10,b-o),p[d]=s>0?(c/G(10,i-s)%G(10,s)|0)*a:0),u)for(;;)if(d==0){for(o=1,s=p[0];s>=10;s/=10)o++;for(s=p[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,p[0]==ge&&(p[0]=1));break}else{if(p[d]+=a,p[d]!=ge)break;p[d--]=0,a=1}for(o=p.length;p[--o]===0;)p.pop()}return x&&(e.e>f.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+We(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+We(-i-1)+o,r&&(n=r-s)>0&&(o+=We(n))):i>=s?(o+=We(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+We(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=We(n))),o}function sn(e,t){var r=e[0];for(t*=b;r>=10;r/=10)t++;return t}function nn(e,t,r){if(t>Pc)throw x=!0,r&&(e.precision=r),Error(Ps);return y(new e(tn),t,1,!0)}function fe(e,t,r){if(t>Ti)throw Error(Ps);return y(new e(rn),t,r,!0)}function Cs(e){var t=e.length-1,r=t*b+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function We(e){for(var t="";e--;)t+="0";return t}function Ss(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/b+4);for(x=!1;;){if(r%2&&(o=o.times(t),Es(o.d,s)&&(i=!0)),r=ee(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),Es(t.d,s)}return x=!0,o}function bs(e){return e.d[e.d.length-1]&1}function As(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(x=!1,l=g):l=t,a=new d(.03125);e.e>-2;)e=e.times(a),p+=5;for(n=Math.log(G(2,p))/Math.LN10*2+5|0,l+=n,r=o=s=new d(1),d.precision=l;;){if(o=y(o.times(e),l,1),r=r.times(++c),a=s.plus(N(o,r,l,1)),K(a.d).slice(0,l)===K(s.d).slice(0,l)){for(i=p;i--;)s=y(s.times(s),l,1);if(t==null)if(u<3&&rr(s.d,l-n,f,u))d.precision=l+=10,r=o=a=new d(1),c=0,u++;else return y(s,d.precision=g,f,x=!0);else return d.precision=g,s}s=a}}function He(e,t){var r,n,i,o,s,a,l,u,c,p,d,f=1,g=10,h=e,O=h.d,T=h.constructor,S=T.rounding,C=T.precision;if(h.s<0||!O||!O[0]||!h.e&&O[0]==1&&O.length==1)return new T(O&&!O[0]?-1/0:h.s!=1?NaN:O?0:h);if(t==null?(x=!1,c=C):c=t,T.precision=c+=g,r=K(O),n=r.charAt(0),Math.abs(o=h.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=K(h.d),n=r.charAt(0),f++;o=h.e,n>1?(h=new T("0."+r),o++):h=new T(n+"."+r.slice(1))}else return u=nn(T,c+2,C).times(o+""),h=He(new T(n+"."+r.slice(1)),c-g).plus(u),T.precision=C,t==null?y(h,C,S,x=!0):h;for(p=h,l=s=h=N(h.minus(1),h.plus(1),c,1),d=y(h.times(h),c,1),i=3;;){if(s=y(s.times(d),c,1),u=l.plus(N(s,new T(i),c,1)),K(u.d).slice(0,c)===K(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(nn(T,c+2,C).times(o+""))),l=N(l,new T(f),c,1),t==null)if(rr(l.d,c-g,S,a))T.precision=c+=g,u=s=h=N(p.minus(1),p.plus(1),c,1),d=y(h.times(h),c,1),i=a=1;else return y(l,T.precision=C,S,x=!0);else return T.precision=C,l;l=u,i+=2}}function Is(e){return String(e.s*e.s/0)}function Ci(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%b,r<0&&(n+=b),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Rs.test(t))return Ci(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Ec.test(t))r=16,t=t.toLowerCase();else if(bc.test(t))r=2;else if(wc.test(t))r=8;else throw Error(Ke+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=Ss(n,new n(r),o,o*2)),u=en(t,r,ge),c=u.length-1,o=c;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=sn(u,c),e.d=u,x=!1,s&&(e=N(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?G(2,l):it.pow(2,l))),x=!0,e)}function Rc(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Et(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/an(5,r)),t=Et(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function Et(e,t,r,n,i){var o,s,a,l,u=1,c=e.precision,p=Math.ceil(c/b);for(x=!1,l=r.times(r),a=new e(n);;){if(s=N(a.times(l),new e(t++*t++),c,1),a=i?n.plus(s):n.minus(s),n=N(s.times(l),new e(t++*t++),c,1),s=a.plus(n),s.d[p]!==void 0){for(o=p;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return x=!0,s.d.length=p+1,s}function an(e,t){for(var r=e;--t;)r*=e;return r}function Os(e,t){var r,n=t.s<0,i=fe(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Ne=n?4:1,t;if(r=t.divToInt(i),r.isZero())Ne=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Ne=bs(r)?n?2:3:n?4:1,t;Ne=bs(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Si(e,t,r,n){var i,o,s,a,l,u,c,p,d,f=e.constructor,g=r!==void 0;if(g?(ie(r,1,ze),n===void 0?n=f.rounding:ie(n,0,8)):(r=f.precision,n=f.rounding),!e.isFinite())c=Is(e);else{for(c=we(e),s=c.indexOf("."),g?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(c=c.replace(".",""),d=new f(1),d.e=c.length-s,d.d=en(we(d),10,i),d.e=d.d.length),p=en(c,10,i),o=l=p.length;p[--l]==0;)p.pop();if(!p[0])c=g?"0p+0":"0";else{if(s<0?o--:(e=new f(e),e.d=p,e.e=o,e=N(e,d,r,n,0,i),p=e.d,o=e.e,u=xs),s=p[r],a=i/2,u=u||p[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&p[r-1]&1||n===(e.s<0?8:7)),p.length=r,u)for(;++p[--r]>i-1;)p[r]=0,r||(++o,p.unshift(1));for(l=p.length;!p[l-1];--l);for(s=0,c="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)c+="0";for(p=en(c,i,t),l=p.length;!p[l-1];--l);for(s=1,c="1.";sl)for(o-=l;o--;)c+="0";else ot)return e.length=t,!0}function Cc(e){return new this(e).abs()}function Sc(e){return new this(e).acos()}function Ac(e){return new this(e).acosh()}function Ic(e,t){return new this(e).plus(t)}function Oc(e){return new this(e).asin()}function kc(e){return new this(e).asinh()}function Dc(e){return new this(e).atan()}function _c(e){return new this(e).atanh()}function Fc(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=fe(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?fe(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=fe(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(N(e,t,o,1)),t=fe(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(N(e,t,o,1)),r}function Lc(e){return new this(e).cbrt()}function Nc(e){return y(e=new this(e),e.e+1,2)}function Mc(e,t,r){return new this(e).clamp(t,r)}function $c(e){if(!e||typeof e!="object")throw Error(on+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,ze,"rounding",0,8,"toExpNeg",-bt,0,"toExpPos",0,bt,"maxE",0,bt,"minE",-bt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Ke+r+": "+n);if(r="crypto",i&&(this[r]=vi[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(vs);else this[r]=!1;else throw Error(Ke+r+": "+n);return this}function qc(e){return new this(e).cos()}function jc(e){return new this(e).cosh()}function ks(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,ws(o)){u.s=o.s,x?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;x?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(vs);else for(;o=10;i/=10)n++;nH(rt(e)),punctuation:rt,directive:De,function:De,variable:e=>H(rt(e)),string:e=>H(qe(e)),boolean:ke,number:De,comment:Gt};var mp=e=>e,un={},fp=0,P={manual:un.Prism&&un.Prism.manual,disableWorkerMessageHandler:un.Prism&&un.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof he){let t=e;return new he(t.type,P.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(P.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ie instanceof he)continue;if(me&&U!=t.length-1){S.lastIndex=ne;var p=S.exec(e);if(!p)break;var c=p.index+(E?p[1].length:0),d=p.index+p[0].length,a=U,l=ne;for(let _=t.length;a<_&&(l=l&&(++U,ne=l);if(t[U]instanceof he)continue;u=a-U,Ie=e.slice(ne,l),p.index-=ne}else{S.lastIndex=0;var p=S.exec(Ie),u=1}if(!p){if(o)break;continue}E&&(ae=p[1]?p[1].length:0);var c=p.index+ae,p=p[0].slice(ae),d=c+p.length,f=Ie.slice(0,c),g=Ie.slice(d);let z=[U,u];f&&(++U,ne+=f.length,z.push(f));let dt=new he(h,C?P.tokenize(p,C):p,Bt,p,me);if(z.push(dt),g&&z.push(g),Array.prototype.splice.apply(t,z),u!=1&&P.matchGrammar(e,t,r,U,ne,!0,h),o)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let i in n)t[i]=n[i];delete t.rest}return P.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=P.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=P.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:he};P.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};P.languages.javascript=P.languages.extend("clike",{"class-name":[P.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});P.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;P.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:P.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:P.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:P.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:P.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});P.languages.markup&&P.languages.markup.tag.addInlined("script","javascript");P.languages.js=P.languages.javascript;P.languages.typescript=P.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});P.languages.ts=P.languages.typescript;function he(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}he.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return he.stringify(r,t)}).join(""):gp(e.type)(e.content)};function gp(e){return Ds[e]||mp}function _s(e){return hp(e,P.languages.javascript)}function hp(e,t){return P.tokenize(e,t).map(n=>he.stringify(n)).join("")}var Fs=k(us());function Ls(e){return(0,Fs.default)(e)}var cn=class e{static read(t){let r;try{r=Ns.default.readFileSync(t,"utf-8")}catch{return null}return e.fromContent(r)}static fromContent(t){let r=t.split(/\r?\n/);return new e(1,r)}constructor(t,r){this.firstLineNumber=t,this.lines=r}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(t,r){if(tthis.lines.length+this.firstLineNumber)return this;let n=t-this.firstLineNumber,i=[...this.lines];return i[n]=r(i[n]),new e(this.firstLineNumber,i)}mapLines(t){return new e(this.firstLineNumber,this.lines.map((r,n)=>t(r,this.firstLineNumber+n)))}lineAt(t){return this.lines[t-this.firstLineNumber]}prependSymbolAt(t,r){return this.mapLines((n,i)=>i===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` +`);return new e(t,Ls(n).split(` +`))}highlight(){let t=_s(this.toString());return new e(this.firstLineNumber,t.split(` +`))}toString(){return this.lines.join(` +`)}};var yp={red:ce,gray:Gt,dim:Oe,bold:H,underline:X,highlightSource:e=>e.highlight()},bp={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Ep({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function wp({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=Ep({message:t,originalMethod:r,isPanic:n,callArguments:i});if(!e||typeof window<"u"||process.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=cn.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=Pp(c),d=xp(c);if(!d)return s;s.functionName=`${d.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,g=>g.slice(0,d.openingBraceIndex))),u=o.highlightSource(u);let f=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((g,h)=>o.gray(String(h).padStart(f))+" "+g).mapLines(g=>o.dim(g)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let g=p+f+1;g+=2,s.callArguments=(0,Ms.default)(i,g).slice(g)}}return s}function xp(e){let t=Object.keys(Je.ModelAction).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function Pp(e){let t=0;for(let r=0;r"Unknown error")}function Bs(e){return e.errors.flatMap(t=>t.kind==="Union"?Bs(t):[t])}function Rp(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Cp(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Cp(e,t){return[...new Set(e.concat(t))]}function Sp(e){return xi(e,(t,r)=>{let n=qs(t),i=qs(r);return n!==i?n-i:js(t)-js(r)})}function qs(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function js(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var ue=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};var Rt=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};var dn=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};var mn=e=>e,fn={bold:mn,red:mn,green:mn,dim:mn,enabled:!1},Us={bold:H,red:ce,green:qe,dim:Oe,enabled:!0},Ct={write(e){e.writeLine(",")}};var Pe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};var Ye=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var St=class extends Ye{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new dn(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new Pe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Ct,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var At=class e extends Ye{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof St&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new Pe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(Ct,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};var W=class extends Ye{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Pe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var nr=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(Ct,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function pn(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Ip(e,t);break;case"IncludeOnScalar":Op(e,t);break;case"EmptySelection":kp(e,t,r);break;case"UnknownSelectionField":Lp(e,t);break;case"InvalidSelectionValue":Np(e,t);break;case"UnknownArgument":Mp(e,t);break;case"UnknownInputField":$p(e,t);break;case"RequiredArgumentMissing":qp(e,t);break;case"InvalidArgumentType":jp(e,t);break;case"InvalidArgumentValue":Vp(e,t);break;case"ValueTooLarge":Bp(e,t);break;case"SomeFieldsMissing":Up(e,t);break;case"TooManyFieldsGiven":Gp(e,t);break;case"Union":Vs(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Ip(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Op(e,t){let[r,n]=ir(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ue(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${or(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function kp(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Dp(e,t,i);return}if(n.hasField("select")){_p(e,t);return}}if(r?.[xt(e.outputType.name)]){Fp(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Dp(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new ue(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function _p(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Ws(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${or(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Fp(e,t){let r=new nr;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ue("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=ir(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new At;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Lp(e,t){let r=Hs(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":Ws(n,e.outputType);break;case"include":Qp(n,e.outputType);break;case"omit":Jp(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(or(n)),i.join(" ")})}function Np(e,t){let r=Hs(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function Mp(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Wp(n,e.arguments)),t.addErrorMessage(i=>Qs(i,r,e.arguments.map(o=>o.name)))}function $p(e,t){let[r,n]=ir(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Ks(o,e.inputType)}t.addErrorMessage(o=>Qs(o,n,e.inputType.fields.map(s=>s.name)))}function Qs(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Kp(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(or(e)),n.join(" ")}function qp(e,t){let r;t.addErrorMessage(l=>r?.value instanceof W&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=ir(e.argumentPath),s=new nr,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ue(o,s).makeRequired())}else{let l=e.inputTypes.map(Js).join(" | ");a.addSuggestion(new ue(o,l).makeRequired())}}function Js(e){return e.kind==="list"?`${Js(e.elementType)}[]`:e.name}function jp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=gn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Vp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=gn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Bp(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof W&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Up(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Ks(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${gn("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(or(i)),o.join(" ")})}function Gp(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${gn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Ws(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ue(r.name,"true"))}function Qp(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ue(r.name,"true"))}function Jp(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ue(r.name,"true"))}function Wp(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ue(r.name,r.typeNames.join(" | ")))}function Hs(e,t){let[r,n]=ir(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Ks(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ue(r.name,r.typeNames.join(" | ")))}function ir(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function or({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function gn(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Hp=3;function Kp(e,t){let r=1/0,n;for(let i of t){let o=(0,Gs.default)(e,i);o>Hp||o`}};function It(e){return e instanceof sr}var hn=Symbol(),Ii=new WeakMap,Me=class{constructor(t){t===hn?Ii.set(this,`Prisma.${this._getName()}`):Ii.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Ii.get(this)}},ar=class extends Me{_getNamespace(){return"NullTypes"}},lr=class extends ar{};Oi(lr,"DbNull");var ur=class extends ar{};Oi(ur,"JsonNull");var cr=class extends ar{};Oi(cr,"AnyNull");var yn={classes:{DbNull:lr,JsonNull:ur,AnyNull:cr},instances:{DbNull:new lr(hn),JsonNull:new ur(hn),AnyNull:new cr(hn)}};function Oi(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}var Ys=": ",bn=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Ys.length}write(t){let r=new Pe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Ys).write(this.value)}};var ki=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function Ot(e){return new ki(Zs(e))}function Zs(e){let t=new At;for(let[r,n]of Object.entries(e)){let i=new bn(r,Xs(n));t.addField(i)}return t}function Xs(e){if(typeof e=="string")return new W(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new W(String(e));if(typeof e=="bigint")return new W(`${e}n`);if(e===null)return new W("null");if(e===void 0)return new W("undefined");if(vt(e))return new W(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new W(`Buffer.alloc(${e.byteLength})`):new W(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=ln(e)?e.toISOString():"Invalid Date";return new W(`new Date("${t}")`)}return e instanceof Me?new W(`Prisma.${e._getName()}`):It(e)?new W(`prisma.${zs(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?zp(e):typeof e=="object"?Zs(e):new W(Object.prototype.toString.call(e))}function zp(e){let t=new St;for(let r of e)t.addItem(Xs(r));return t}function En(e,t){let r=t==="pretty"?Us:fn,n=e.renderAllMessages(r),i=new Rt(0,{colors:r}).write(e).toString();return{message:n,args:i}}function wn({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=Ot(e);for(let p of t)pn(p,a,s);let{message:l,args:u}=En(a,r),c=Tt({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new J(c,{clientVersion:o})}var ve=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};function pr(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Te(e){return e.replace(/^./,t=>t.toLowerCase())}function ta(e,t,r){let n=Te(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Yp({...e,...ea(t.name,e,t.result.$allModels),...ea(t.name,e,t.result[n])})}function Yp(e){let t=new ve,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return yt(e,n=>({...n,needs:r(n.name,new Set)}))}function ea(e,t,r){return r?yt(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Zp(t,o,i)})):{}}function Zp(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function ra(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function na(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var xn=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new ve;this.modelExtensionsCache=new ve;this.queryCallbacksCache=new ve;this.clientExtensions=pr(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=pr(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>ta(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Te(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},kt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new xn(t))}isEmpty(){return this.head===void 0}append(t){return new e(new xn(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};var ia=Symbol(),dr=class{constructor(t){if(t!==ia)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Pn:t}},Pn=new dr(ia);function Re(e){return e instanceof dr}var Xp={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},oa="explicitly `undefined` values are not allowed";function vn({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=kt.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c}){let p=new Di({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:c});return{modelName:e,action:Xp[t],query:mr(r,p)}}function mr({select:e,include:t,...r}={},n){let i;return n.isPreviewFeatureOn("omitApi")&&(i=r.omit,delete r.omit),{arguments:aa(r,n),selection:ed(e,t,i,n)}}function ed(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.isPreviewFeatureOn("omitApi")&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),id(e,n)):td(n,t,r)}function td(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&rd(n,t,e),e.isPreviewFeatureOn("omitApi")&&nd(n,r,e),n}function rd(e,t,r){for(let[n,i]of Object.entries(t)){if(Re(i))continue;let o=r.nestSelection(n);if(_i(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=mr(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=mr(i,o)}}function nd(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=na(i,n);for(let[s,a]of Object.entries(o)){if(Re(a))continue;_i(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function id(e,t){let r={},n=t.getComputedFields(),i=ra(e,n);for(let[o,s]of Object.entries(i)){if(Re(s))continue;let a=t.nestSelection(o);_i(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Re(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=mr({},a):r[o]=!0;continue}r[o]=mr(s,a)}}return r}function sa(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(Pt(e)){if(ln(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(It(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return od(e,t);if(ArrayBuffer.isView(e))return{$type:"Bytes",value:Buffer.from(e).toString("base64")};if(sd(e))return e.values;if(vt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof Me){if(e!==yn.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(ad(e))return e.toJSON();if(typeof e=="object")return aa(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function aa(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);Re(i)||(i!==void 0?r[n]=sa(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:oa}))}return r}function od(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[xt(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Fe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};var Dt=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};function la(e){return{models:Fi(e.models),enums:Fi(e.enums),types:Fi(e.types)}}function Fi(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function ua(e,t){let r=pr(()=>ld(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function ld(e){return{datamodel:{models:Li(e.models),enums:Li(e.enums),types:Li(e.types)}}}function Li(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}var Ni=new WeakMap,Tn="$$PrismaTypedSql",Mi=class{constructor(t,r){Ni.set(this,{sql:t,values:r}),Object.defineProperty(this,Tn,{value:Tn})}get sql(){return Ni.get(this).sql}get values(){return Ni.get(this).values}};function ca(e){return(...t)=>new Mi(e,t)}function pa(e){return e!=null&&e[Tn]===Tn}function fr(e){return{ok:!1,error:e,map(){return fr(e)},flatMap(){return fr(e)}}}var $i=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},qi=e=>{let t=new $i,r=Ce(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ce(t,e.queryRaw.bind(e)),executeRaw:Ce(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>ud(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=pd(t,e.getConnectionInfo.bind(e))),n},ud=(e,t)=>{let r=Ce(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:Ce(e,t.queryRaw.bind(t)),executeRaw:Ce(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>cd(e,o))}},cd=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ce(e,t.queryRaw.bind(t)),executeRaw:Ce(e,t.executeRaw.bind(t)),commit:Ce(e,t.commit.bind(t)),rollback:Ce(e,t.rollback.bind(t))});function Ce(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return fr({kind:"GenericJs",id:i})}}}function pd(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return fr({kind:"GenericJs",id:i})}}}var Wl=k(oi());var Hl=require("async_hooks"),Kl=require("events"),zl=k(require("fs")),Fr=k(require("path"));var oe=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}var Rn={enumerable:!0,configurable:!0,writable:!0};function Cn(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Rn,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var fa=Symbol.for("nodejs.util.inspect.custom");function Se(e,t){let r=dd(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=ga(Reflect.ownKeys(o),r),a=ga(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Rn,...l?.getPropertyDescriptor(s)}:Rn:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[fa]=function(){let o={...this};return delete o[fa],o},i}function dd(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function ga(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}function _t(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function Ft(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}function ha(e){if(e===void 0)return"";let t=Ot(e);return new Rt(0,{colors:fn}).write(t).toString()}var md="P2037";function st({error:e,user_facing_error:t},r,n){return t.error_code?new V(fd(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new B(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function fd(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===md&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}var hr="";function ya(e){var t=e.split(` +`);return t.reduce(function(r,n){var i=yd(n)||Ed(n)||Pd(n)||Cd(n)||Td(n);return i&&r.push(i),r},[])}var gd=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,hd=/\((\S*)(?::(\d+))(?::(\d+))\)/;function yd(e){var t=gd.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=hd.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||hr,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var bd=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Ed(e){var t=bd.exec(e);return t?{file:t[2],methodName:t[1]||hr,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var wd=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,xd=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Pd(e){var t=wd.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=xd.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||hr,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var vd=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Td(e){var t=vd.exec(e);return t?{file:t[3],methodName:t[1]||hr,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var Rd=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Cd(e){var t=Rd.exec(e);return t?{file:t[2],methodName:t[1]||hr,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Bi=class{getLocation(){return null}},Ui=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=ya(t).find(i=>{if(!i.file)return!1;let o=mi(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Ze(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Bi:new Ui}var ba={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Lt(e={}){let t=Ad(e);return Object.entries(t).reduce((n,[i,o])=>(ba[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ad(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Sn(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Ea(e,t){let r=Sn(e);return t({action:"aggregate",unpacker:r,argsMapper:Lt})(e)}function Id(e={}){let{select:t,...r}=e;return typeof t=="object"?Lt({...r,_count:t}):Lt({...r,_count:{_all:!0}})}function Od(e={}){return typeof e.select=="object"?t=>Sn(e)(t)._count:t=>Sn(e)(t)._count._all}function wa(e,t){return t({action:"count",unpacker:Od(e),argsMapper:Id})(e)}function kd(e={}){let t=Lt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Dd(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function xa(e,t){return t({action:"groupBy",unpacker:Dd(e),argsMapper:kd})(e)}function Pa(e,t,r){if(t==="aggregate")return n=>Ea(n,r);if(t==="count")return n=>wa(n,r);if(t==="groupBy")return n=>xa(n,r)}function va(e,t){let r=t.fields.filter(i=>!i.relationName),n=wi(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new sr(e,o,s.type,s.isList,s.kind==="enum")},...Cn(Object.keys(n))})}var Ta=e=>Array.isArray(e)?e:e.split("."),Gi=(e,t)=>Ta(t).reduce((r,n)=>r&&r[n],e),Ra=(e,t,r)=>Ta(t).reduceRight((n,i,o,s)=>Object.assign({},Gi(e,s.slice(0,o)),{[i]:n}),r);function _d(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Fd(e,t,r){return t===void 0?e??{}:Ra(t,r,e||!0)}function Qi(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ze(e._errorFormat),c=_d(n,i),p=Fd(l,o,c),d=r({dataPath:c,callsite:u})(p),f=Ld(e,t);return new Proxy(d,{get(g,h){if(!f.includes(h))return g[h];let T=[a[h].type,r,h],S=[c,p];return Qi(e,...T,...S)},...Cn([...f,...Object.getOwnPropertyNames(d)])})}}function Ld(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}function Ca(e,t,r,n){return e===Je.ModelAction.findFirstOrThrow||e===Je.ModelAction.findUniqueOrThrow?Nd(t,r,n):n}function Nd(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=Tt({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new J(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof V&&o.code==="P2025"?new Le(`No ${e} found`,t):o})}}var Md=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],$d=["aggregate","count","groupBy"];function Ji(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[qd(e,t),Vd(e,t),gr(r),re("name",()=>t),re("$name",()=>t),re("$parent",()=>e._appliedParent)];return Se({},n)}function qd(e,t){let r=Te(t),n=Object.keys(Je.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=Ca(o,t,e._clientVersion,s);let a=l=>u=>{let c=Ze(e._errorFormat);return e._createPrismaPromise(p=>{let d={args:u,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:p,callsite:c};return s({...d,...l})})};return Md.includes(o)?Qi(e,t,a):jd(i)?Pa(e,i,a):a({})}}}function jd(e){return $d.includes(e)}function Vd(e,t){return ot(re("fields",()=>{let r=e._runtimeDataModel.models[t];return va(t,r)}))}function Sa(e){return e.replace(/^./,t=>t.toUpperCase())}var Wi=Symbol();function yr(e){let t=[Bd(e),re(Wi,()=>e),re("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(gr(r)),Se(e,t)}function Bd(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Te),n=[...new Set(t.concat(r))];return ot({getKeys(){return n},getPropertyValue(i){let o=Sa(i);if(e._runtimeDataModel.models[o]!==void 0)return Ji(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Ji(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Aa(e){return e[Wi]?e[Wi]:e}function Ia(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return yr(t)}function Oa({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(c=>n[c]);u.length>0&&a.push(_t(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(c=>!r[c]);u.length>0&&a.push(_t(u))}Ud(e,l.needs)&&s.push(Gd(l,Se(e,s)))}return s.length>0||a.length>0?Se(e,[...s,...a]):e}function Ud(e,t){return t.every(r=>Ei(e,r))}function Gd(e,t){return ot(re(e.name,()=>e.compute(t)))}function An({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sc.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=An({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Da({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:An({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let c=Te(l);return Oa({result:a,modelName:c,select:u.select,omit:u.select?void 0:{...o?.[c],...u.omit},extensions:n})}})}function _a(e){if(e instanceof oe)return Qd(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:_a(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=qa(o,l),a.args=s,La(e,a,r,n+1)}})})}function Na(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return La(e,t,s)}function Ma(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?$a(r,n,0,e):e(r)}}function $a(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=qa(i,l),$a(a,t,r+1,n)}})}var Fa=e=>e;function qa(e=Fa,t=Fa){return r=>e(t(r))}var ja=L("prisma:client"),Va={Vercel:"vercel","Netlify CI":"netlify"};function Ba({postinstall:e,ciName:t,clientVersion:r}){if(ja("checkPlatformCaching:postinstall",e),ja("checkPlatformCaching:ciName",t),e===!0&&t&&t in Va){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${Va[t]}-build`;throw console.error(n),new R(n,r)}}function Ua(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}var Jd="Cloudflare-Workers",Wd="node";function Ga(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Jd?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Wd?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Hd={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function In(){let e=Ga();return{id:e,prettyName:Hd[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var Ka=k(require("fs")),Er=k(require("path"));function On(e){let{runtimeBinaryTarget:t}=e;return`Add "${t}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: + +${Kd(e)}`}function Kd(e){let{generator:t,generatorBinaryTargets:r,runtimeBinaryTarget:n}=e,i={fromEnvVar:null,value:n},o=[...r,i];return hi({...t,binaryTargets:o})}function Xe(e){let{runtimeBinaryTarget:t}=e;return`Prisma Client could not locate the Query Engine for runtime "${t}".`}function et(e){let{searchedLocations:t}=e;return`The following locations have been searched: +${[...new Set(t)].map(i=>` ${i}`).join(` +`)}`}function Qa(e){let{runtimeBinaryTarget:t}=e;return`${Xe(e)} + +This happened because \`binaryTargets\` have been pinned, but the actual deployment also required "${t}". +${On(e)} + +${et(e)}`}function kn(e){return`We would appreciate if you could take the time to share some information with us. +Please help us by answering a few questions: https://pris.ly/${e}`}function Dn(e){let{errorStack:t}=e;return t?.match(/\/\.next|\/next@|\/next\//)?` + +We detected that you are using Next.js, learn how to fix this: https://pris.ly/d/engine-not-found-nextjs.`:""}function Ja(e){let{queryEngineName:t}=e;return`${Xe(e)}${Dn(e)} + +This is likely caused by a bundler that has not copied "${t}" next to the resulting bundle. +Ensure that "${t}" has been copied next to the bundle or in "${e.expectedLocation}". + +${kn("engine-not-found-bundler-investigation")} + +${et(e)}`}function Wa(e){let{runtimeBinaryTarget:t,generatorBinaryTargets:r}=e,n=r.find(i=>i.native);return`${Xe(e)} + +This happened because Prisma Client was generated for "${n?.value??"unknown"}", but the actual deployment required "${t}". +${On(e)} + +${et(e)}`}function Ha(e){let{queryEngineName:t}=e;return`${Xe(e)}${Dn(e)} + +This is likely caused by tooling that has not copied "${t}" to the deployment folder. +Ensure that you ran \`prisma generate\` and that "${t}" has been copied to "${e.expectedLocation}". + +${kn("engine-not-found-tooling-investigation")} + +${et(e)}`}var zd=L("prisma:client:engines:resolveEnginePath"),Yd=()=>new RegExp("runtime[\\\\/]library\\.m?js$");async function za(e,t){let r={binary:process.env.PRISMA_QUERY_ENGINE_BINARY,library:process.env.PRISMA_QUERY_ENGINE_LIBRARY}[e]??t.prismaPath;if(r!==void 0)return r;let{enginePath:n,searchedLocations:i}=await Zd(e,t);if(zd("enginePath",n),n!==void 0&&e==="binary"&&li(n),n!==void 0)return t.prismaPath=n;let o=await nt(),s=t.generator?.binaryTargets??[],a=s.some(d=>d.native),l=!s.some(d=>d.value===o),u=__filename.match(Yd())===null,c={searchedLocations:i,generatorBinaryTargets:s,generator:t.generator,runtimeBinaryTarget:o,queryEngineName:Ya(e,o),expectedLocation:Er.default.relative(process.cwd(),t.dirname),errorStack:new Error().stack},p;throw a&&l?p=Wa(c):l?p=Qa(c):u?p=Ja(c):p=Ha(c),new R(p,t.clientVersion)}async function Zd(engineType,config){let binaryTarget=await nt(),searchedLocations=[],dirname=eval("__dirname"),searchLocations=[config.dirname,Er.default.resolve(dirname,".."),config.generator?.output?.value??dirname,Er.default.resolve(dirname,"../../../.prisma/client"),"/tmp/prisma-engines",config.cwd];__filename.includes("resolveEnginePath")&&searchLocations.push(Yo());for(let e of searchLocations){let t=Ya(engineType,binaryTarget),r=Er.default.join(e,t);if(searchedLocations.push(e),Ka.default.existsSync(r))return{enginePath:r,searchedLocations}}return{enginePath:void 0,searchedLocations}}function Ya(e,t){return e==="library"?qr(t,"fs"):`query-engine-${t}${t==="windows"?".exe":""}`}var Hi=k(bi());function Za(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}function Xa(e){return e.split(` +`).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` +`)}var el=k(hs());function tl({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,el.default)({user:t,repo:r,template:n,title:e,body:i})}function rl({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=So(6e3-(s?.length??0)),l=Xa((0,Hi.default)(a)),u=n?`# Description +\`\`\` +${n} +\`\`\``:"",c=(0,Hi.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: +## Versions + +| Name | Version | +|-----------------|--------------------| +| Node | ${process.version?.padEnd(19)}| +| OS | ${t?.padEnd(19)}| +| Prisma Client | ${e?.padEnd(19)}| +| Query Engine | ${i?.padEnd(19)}| +| Database | ${o?.padEnd(19)}| + +${u} + +## Logs +\`\`\` +${l} +\`\`\` + +## Client Snippet +\`\`\`ts +// PLEASE FILL YOUR CODE SNIPPET HERE +\`\`\` + +## Schema +\`\`\`prisma +// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE +\`\`\` + +## Prisma Engine Query +\`\`\` +${s?Za(s):""} +\`\`\` +`),p=tl({title:r,body:c});return`${r} + +This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. + +${X(p)} + +If you want the Prisma team to look into it, please open the link above \u{1F64F} +To increase the chance of success, please post your schema and a snippet of +how you used Prisma Client in the issue. +`}function Nt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new R(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new R("error: Missing URL environment variable, value, or override.",n);return i}var _n=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var se=class extends _n{constructor(t,r){super(t,r),this.isRetryable=r.isRetryable??!0}};function A(e,t){return{...e,isRetryable:t}}var Mt=class extends se{constructor(r){super("This request must be retried",A(r,!0));this.name="ForcedRetryError";this.code="P5001"}};w(Mt,"ForcedRetryError");var at=class extends se{constructor(r,n){super(r,A(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};w(at,"InvalidDatasourceError");var lt=class extends se{constructor(r,n){super(r,A(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};w(lt,"NotImplementedYetError");var q=class extends se{constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var ut=class extends q{constructor(r){super("Schema needs to be uploaded",A(r,!0));this.name="SchemaMissingError";this.code="P5005"}};w(ut,"SchemaMissingError");var Ki="This request could not be understood by the server",wr=class extends q{constructor(r,n,i){super(n||Ki,A(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};w(wr,"BadRequestError");var xr=class extends q{constructor(r,n){super("Engine not started: healthcheck timeout",A(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};w(xr,"HealthcheckTimeoutError");var Pr=class extends q{constructor(r,n,i){super(n,A(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};w(Pr,"EngineStartupError");var vr=class extends q{constructor(r){super("Engine version is not supported",A(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};w(vr,"EngineVersionNotSupportedError");var zi="Request timed out",Tr=class extends q{constructor(r,n=zi){super(n,A(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};w(Tr,"GatewayTimeoutError");var Xd="Interactive transaction error",Rr=class extends q{constructor(r,n=Xd){super(n,A(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};w(Rr,"InteractiveTransactionError");var em="Request parameters are invalid",Cr=class extends q{constructor(r,n=em){super(n,A(r,!1));this.name="InvalidRequestError";this.code="P5011"}};w(Cr,"InvalidRequestError");var Yi="Requested resource does not exist",Sr=class extends q{constructor(r,n=Yi){super(n,A(r,!1));this.name="NotFoundError";this.code="P5003"}};w(Sr,"NotFoundError");var Zi="Unknown server error",$t=class extends q{constructor(r,n,i){super(n||Zi,A(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};w($t,"ServerError");var Xi="Unauthorized, check your connection string",Ar=class extends q{constructor(r,n=Xi){super(n,A(r,!1));this.name="UnauthorizedError";this.code="P5007"}};w(Ar,"UnauthorizedError");var eo="Usage exceeded, retry again later",Ir=class extends q{constructor(r,n=eo){super(n,A(r,!0));this.name="UsageExceededError";this.code="P5008"}};w(Ir,"UsageExceededError");async function tm(e){let t;try{t=await e.text()}catch{return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch{return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Or(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await tm(e);if(n.type==="QueryEngineError")throw new V(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new $t(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new ut(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new vr(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Pr(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new R(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new xr(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Rr(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Cr(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Ar(r,qt(Xi,n));if(e.status===404)return new Sr(r,qt(Yi,n));if(e.status===429)throw new Ir(r,qt(eo,n));if(e.status===504)throw new Tr(r,qt(zi,n));if(e.status>=500)throw new $t(r,qt(Zi,n));if(e.status>=400)throw new wr(r,qt(Ki,n))}function qt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}function nl(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}var $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function il(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,l,u,c;for(let p=0;p>18,a=(c&258048)>>12,l=(c&4032)>>6,u=c&63,r+=$e[s]+$e[a]+$e[l]+$e[u];return i==1?(c=t[o],s=(c&252)>>2,a=(c&3)<<4,r+=$e[s]+$e[a]+"=="):i==2&&(c=t[o]<<8|t[o+1],s=(c&64512)>>10,a=(c&1008)>>4,l=(c&15)<<2,r+=$e[s]+$e[a]+$e[l]+"="),r}function ol(e){if(!!e.generator?.previewFeatures.some(r=>r.toLowerCase().includes("metrics")))throw new R("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}function rm(e){return e[0]*1e3+e[1]/1e6}function sl(e){return new Date(rm(e))}var al={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var kr=class extends se{constructor(r,n){super(`Cannot fetch data from service: +${r}`,A(n,!0));this.name="RequestError";this.code="P5010"}};w(kr,"RequestError");async function ct(e,t,r=n=>n){let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(to)(e,t)}catch(i){let o=i.message??"Unknown error";throw new kr(o,{clientVersion:n})}}function im(e){return{...e.headers,"Content-Type":"application/json"}}function om(e){return{method:e.method,headers:im(e)}}function sm(e,t){return{text:()=>Promise.resolve(Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(Buffer.concat(e).toString())),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:new ro(t.headers)}}async function to(e,t={}){let r=am("https"),n=om(t),i=[],{origin:o}=new URL(e);return new Promise((s,a)=>{let l=r.request(e,n,u=>{let{statusCode:c,headers:{location:p}}=u;c>=301&&c<=399&&p&&(p.startsWith("http")===!1?s(to(`${o}${p}`,t)):s(to(p,t))),u.on("data",d=>i.push(d)),u.on("end",()=>s(sm(i,u))),u.on("error",a)});l.on("error",a),l.end(t.body??"")})}var am=typeof require<"u"?require:()=>{},ro=class{constructor(t={}){this.headers=new Map;for(let[r,n]of Object.entries(t))if(typeof n=="string")this.headers.set(r,n);else if(Array.isArray(n))for(let i of n)this.headers.set(r,i)}append(t,r){this.headers.set(t,r)}delete(t){this.headers.delete(t)}get(t){return this.headers.get(t)??null}has(t){return this.headers.has(t)}set(t,r){this.headers.set(t,r)}forEach(t,r){for(let[n,i]of this.headers)t.call(r,i,n,this)}};var lm=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,ll=L("prisma:client:dataproxyEngine");async function um(e,t){let r=al["@prisma/engines-version"],n=t.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&lm.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=r.split("-")??[],[a,l,u]=s.split("."),c=cm(`<=${a}.${l}.${u}`),p=await ct(c,{clientVersion:n});if(!p.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${p.status} ${p.statusText}, response body: ${await p.text()||""}`);let d=await p.text();ll("length of body fetched from unpkg.com",d.length);let f;try{f=JSON.parse(d)}catch(g){throw console.error("JSON.parse error: body fetched from unpkg.com: ",d),g}return f.version}throw new lt("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function ul(e,t){let r=await um(e,t);return ll("version",r),r}function cm(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var cl=3,no=L("prisma:client:dataproxyEngine"),io=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t??this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},Dr=class{constructor(t){this.name="DataProxyEngine";ol(t),this.config=t,this.env={...t.env,...typeof process<"u"?process.env:{}},this.inlineSchema=il(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new io({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await ul(t,this.config),no("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){t?.logs?.length&&t.logs.forEach(r=>{switch(r.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let n=typeof r.attributes.query=="string"?r.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[i]=n.split("/* traceparent");n=i}this.logEmitter.emit("query",{query:n,timestamp:sl(r.timestamp),duration:Number(r.attributes.duration_ms),params:r.attributes.params,target:r.attributes.target})}}}),t?.traces?.length&&this.tracingHelper.createEngineSpan({span:!0,spans:t.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await ct(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||no("schema response status",r.status);let n=await Or(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Ft(t,n),{batchResult:a,elapsed:l}=await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r});return a.map(u=>"errors"in u&&u.errors.length>0?st(u.errors[0],this.clientVersion,this.config.activeProvider):{data:u,elapsed:l})}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await ct(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||no("graphql response status",a.status),await this.handleError(await Or(a,this.clientVersion));let l=await a.json(),u=l.extensions;if(u&&this.propagateResponseExtensions(u),l.errors)throw l.errors.length===1?st(l.errors[0],this.config.clientVersion,this.config.activeProvider):new B(l.errors,{clientVersion:this.config.clientVersion});return l}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await ct(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Or(l,this.clientVersion));let u=await l.json(),c=u.extensions;c&&this.propagateResponseExtensions(c);let p=u.id,d=u["data-proxy"].endpoint;return{id:p,payload:{endpoint:d}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await ct(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Or(a,this.clientVersion));let u=(await a.json()).extensions;u&&this.propagateResponseExtensions(u);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=Nt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new at(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:"&&o!=="prisma+postgres:")throw new at(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let l=a.get("api_key");if(l===null||l.length<1)throw new at(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,l]}metrics(){throw new lt("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){for(let r=0;;r++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${r})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:n})}catch(i){if(!(i instanceof se)||!i.isRetryable)throw i;if(r>=cl)throw i instanceof Mt?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${r+1}/${cl} failed for ${t.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await nl(r);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof ut)throw await this.uploadSchema(),new Mt({clientVersion:this.clientVersion,cause:t});if(t)throw t}applyPendingMigrations(){throw new Error("Method not implemented.")}};function pl(e){if(e?.kind==="itx")return e.options.id}var so=k(require("os")),dl=k(require("path"));var oo=Symbol("PrismaLibraryEngineCache");function pm(){let e=globalThis;return e[oo]===void 0&&(e[oo]={}),e[oo]}function dm(e){let t=pm();if(t[e]!==void 0)return t[e];let r=dl.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=so.default.constants.dlopen.RTLD_LAZY|so.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,r,i),t[e]=n.exports,n.exports}var ml={async loadLibrary(e){let t=await Yn(),r=await za("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>dm(r))}catch(n){let i=ui({e:n,platformInfo:t,id:r});throw new R(i,e.clientVersion)}}};var ao,fl={async loadLibrary(e){let{clientVersion:t,adapter:r,engineWasm:n}=e;if(r===void 0)throw new R(`The \`adapter\` option for \`PrismaClient\` is required in this context (${In().prettyName})`,t);if(n===void 0)throw new R("WASM engine was unexpectedly `undefined`",t);ao===void 0&&(ao=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new R("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let a={"./query_engine_bg.js":o},l=new WebAssembly.Instance(s,a);return o.__wbg_set_wasm(l.exports),o.QueryEngine})());let i=await ao;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var mm="P2036",Ae=L("prisma:client:libraryEngine");function fm(e){return e.item_type==="query"&&"query"in e}function gm(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var gl=[...Jn,"native"],_r=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=r??ml,t.engineWasm!==void 0&&(this.libraryLoader=r??fl),this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(hm(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new V(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(Ae("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;Qn(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let t=await nt();if(!gl.includes(t))throw new R(`Unknown ${ce("PRISMA_QUERY_ENGINE_LIBRARY")} ${ce(H(t))}. Possible binaryTargets: ${qe(gl.join(", "))} or a path to the query engine library. +You may have to run ${qe("prisma generate")} for your changes to take effect.`,this.config.clientVersion);return t}}parseEngineResponse(t){if(!t)throw new B("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new B("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new WeakRef(this),{adapter:r}=this.config;r&&Ae("Using driver adapter: %O",r),this.engine=new this.QueryEngineConstructor({datamodel:this.datamodel,env:process.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json"},n=>{t.deref()?.logger(n)},r)}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new R(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);if(r){if("span"in r){this.config.tracingHelper.createEngineSpan(r);return}r.level=r?.level.toLowerCase()??"unknown",fm(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):gm(r)?this.loggerRustPanic=new le(lo(this,`${r.message}: ${r.reason} in ${r.file}:${r.line}:${r.column}`),this.config.clientVersion):this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path})}}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Ae(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Ae("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,Ae("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new R(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Ae("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),Ae("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Ae("library stopped")};return this.libraryStoppingPromise=this.config.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){Ae(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new B(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof R)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new le(lo(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new B(`${a.message} +${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){Ae("requestBatch");let i=Ft(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),pl(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new B(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:l}=s;if(Array.isArray(a))return a.map(u=>u.errors&&u.errors.length>0?this.loggerRustPanic??this.buildQueryError(u.errors[0]):{data:u,elapsed:0});throw l&&l.length===1?new Error(l[0].error):new Error(JSON.stringify(s))}buildQueryError(t){if(t.user_facing_error.is_panic)return new le(lo(this,t.user_facing_error.message),this.config.clientVersion);let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:st(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===mm&&this.config.adapter){let r=t.meta?.id;Yr(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return Yr(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function hm(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function lo(e,t){return rl({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function hl({copyEngine:e=!0},t){let r;try{r=Nt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...process.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&tr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=Yt(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",l=i==="binary";if(o&&s||s&&!1){let u;throw e?r?.startsWith("prisma://")?u=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:u=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:u=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new J(u.join(` +`),{clientVersion:t.clientVersion})}if(o)return new Dr(t);if(a)return new _r(t);throw new J("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}function Fn({generator:e}){return e?.previewFeatures??[]}var yl=e=>({command:e});var bl=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);function jt(e){try{return El(e,"fast")}catch{return El(e,"slow")}}function El(e,t){return JSON.stringify(e.map(r=>xl(r,t)))}function xl(e,t){return Array.isArray(e)?e.map(r=>xl(r,t)):typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:Pt(e)?{prisma__type:"date",prisma__value:e.toJSON()}:xe.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:ym(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Pl(e):e}function ym(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Pl(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(wl);let t={};for(let r of Object.keys(e))t[r]=wl(e[r]);return t}function wl(e){return typeof e=="bigint"?e.toString():Pl(e)}var bm=["$connect","$disconnect","$on","$transaction","$use","$extends"],vl=bm;var Em=/^(\s*alter\s)/i,Tl=L("prisma:client");function uo(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Em.exec(t))throw new Error(`Running ALTER using ${n} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var co=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(pa(r))n=r.sql,i={values:jt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:jt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:jt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:jt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=bl(r),i={values:jt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?Tl(`prisma.${e}(${n}, ${i.values})`):Tl(`prisma.${e}(${n})`),{query:n,parameters:i}},Rl={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new oe(t,r)}},Cl={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function po(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=Sl(r(o)):Sl(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Sl(e){return typeof e.then=="function"?e:Promise.resolve(e)}var Al={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},mo=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??Al}};function Il(e){return e.includes("tracing")?new mo:Al}function Ol(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}function kl(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}var Ln=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};var Fl=k(bi());function Nn(e){return typeof e.batchRequestIdx=="number"}function Dl(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(fo(e.query.arguments)),t.push(fo(e.query.selection)),t.join("")}function fo(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${fo(n)})`:r}).join(" ")})`}var wm={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function go(e){return wm[e]}var Mn=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;ipt("bigint",r));case"bytes-array":return t.map(r=>pt("bytes",r));case"decimal-array":return t.map(r=>pt("decimal",r));case"datetime-array":return t.map(r=>pt("datetime",r));case"date-array":return t.map(r=>pt("date",r));case"time-array":return t.map(r=>pt("time",r));default:return t}}function _l(e){let t=[],r=xm(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>go(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:vm(o),containsWrite:u,customDataProxyFetch:i})).map((p,d)=>{if(p instanceof Error)return p;try{return this.mapQueryEngineResult(n[d],p)}catch(f){return f}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Ll(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:go(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Dl(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return process.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Pm(t),Tm(t,i)||t instanceof Le)throw t;if(t instanceof V&&Rm(t)){let u=Nl(t.meta);wn({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=Tt({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new V(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new le(l,this.client._clientVersion);if(t instanceof B)throw new B(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof R)throw new R(l,this.client._clientVersion);if(t instanceof le)throw new le(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Fl.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(u=>u!=="select"&&u!=="include"),a=Gi(o,s),l=i==="queryRaw"?_l(a):wt(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function vm(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Ll(e)};Fe(e,"Unknown transaction kind")}}function Ll(e){return{id:e.id,payload:e.payload}}function Tm(e,t){return Nn(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Rm(e){return e.code==="P2009"||e.code==="P2012"}function Nl(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Nl)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}var Ml="5.22.0";var $l=Ml;var Ul=k(Ai());var F=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};w(F,"PrismaClientConstructorValidationError");var ql=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],jl=["pretty","colorless","minimal"],Vl=["info","query","warn","error"],Sm={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new F(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Vt(r,t)||` Available datasources: ${t.join(", ")}`;throw new F(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new F(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new F(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new F(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new F('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Fn(t).includes("driverAdapters"))throw new F('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Yt()==="binary")throw new F('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new F(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new F(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!jl.includes(e)){let t=Vt(e,jl);throw new F(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new F(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Vl.includes(r)){let n=Vt(r,Vl);throw new F(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Vt(i,o);throw new F(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new F(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new F(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new F(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new F('"omit" option is expected to be an object.');if(e===null)throw new F('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=Im(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new F(Om(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new F(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Vt(r,t);throw new F(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Gl(e,t){for(let[r,n]of Object.entries(e)){if(!ql.includes(r)){let i=Vt(r,ql);throw new F(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Sm[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new F('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Vt(e,t){if(t.length===0||typeof e!="string")return"";let r=Am(e,t);return r?` Did you mean "${r}"?`:""}function Am(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Ul.default)(e,i)}));r.sort((i,o)=>i.distancext(n)===t);if(r)return e[r]}function Om(e,t){let r=Ot(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=En(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}function Ql(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=c,a()},c=>{if(!Nn(c)){l(c);return}c.batchRequestIdx===u?l(c):(i||(i=c),a())})})}var tt=L("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var km={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Dm=Symbol.for("prisma.client.transaction.id"),_m={id:0,nextId(){return++this.id}};function Yl(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Ln;this._createPrismaPromise=po();this.$extends=Ia;e=n?.__internal?.configOverride?.(e)??e,Ba(e),n&&Gl(n,e);let i=new Kl.EventEmitter().on("error",()=>{});this._extensions=kt.empty(),this._previewFeatures=Fn(e),this._clientVersion=e.clientVersion??$l,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Il(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Fr.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Fr.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=qi(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new R(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new R("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=!s&&zt(o,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},c=u.debug===!0;c&&L.enable("prisma:client");let p=Fr.default.resolve(e.dirname,e.relativePath);zl.default.existsSync(p)||(p=e.dirname),tt("dirname",e.dirname),tt("relativePath",e.relativePath),tt("cwd",p);let d=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:process.env.NODE_ENV==="production"?this._errorFormat="minimal":process.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:p,dirname:e.dirname,enableDebugLogs:c,allowTriggerPanic:d.allowTriggerPanic,datamodelPath:Fr.default.join(e.dirname,e.filename??"schema.prisma"),prismaPath:d.binaryPath??void 0,engineEndpoint:d.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&kl(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(f=>typeof f=="string"?f==="query":f.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Ua(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Nt,getBatchRequestPayload:Ft,prismaGraphQLToJSError:st,PrismaClientUnknownRequestError:B,PrismaClientInitializationError:R,PrismaClientKnownRequestError:V,debug:L("prisma:client:accelerateEngine"),engineVersion:Wl.version,clientVersion:e.clientVersion}},tt("clientVersion",e.clientVersion),this._engine=hl(e,this._engineConfig),this._requestHandler=new $n(this,i),l.log)for(let f of l.log){let g=typeof f=="string"?f:f.emit==="stdout"?f.level:null;g&&this.$on(g,h=>{er.log(`${er.tags[g]??""}`,h.message||h.query)})}this._metrics=new Dt(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=yr(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Ao()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:co({clientMethod:i,activeProvider:a}),callsite:Ze(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Jl(n,i);return uo(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new J("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(uo(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new J(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:yl,callsite:Ze(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:co({clientMethod:i,activeProvider:a}),callsite:Ze(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Jl(n,i));throw new J("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new J("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=_m.nextId(),s=Ol(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let c=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,p={kind:"batch",id:o,index:u,isolationLevel:c,lock:s};return l.requestTransaction?.(p)??l});return Ql(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return yr(Se(Aa(this),[re("_appliedParent",()=>this._appliedParent._createItxClient(n)),re("_createPrismaPromise",()=>po(n)),re(Dm,()=>n.id),_t(vl)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??km,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let c=this._middlewares.get(++a);if(c)return this._tracingHelper.runInChildSpan(s.middleware,O=>c(u,T=>(O?.end(),l(T))));let{runInTransaction:p,args:d,...f}=u,g={...n,...f};d&&(g.args=i.middlewareArgsToRequestArgs(d)),n.transaction!==void 0&&p===!1&&delete g.transaction;let h=await Na(this,g);return g.model?Da({result:h,modelName:g.model,args:g.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):h};return this._tracingHelper.runInChildSpan(s.operation,()=>new Hl.AsyncResource("prisma-client-request").runInAsyncScope(()=>l(o)))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:c,unpacker:p,otelParentCtx:d,customDataProxyFetch:f}){try{n=u?u(n):n;let g={name:"serialize"},h=this._tracingHelper.runInChildSpan(g,()=>vn({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return L.enabled("prisma:client")&&(tt("Prisma Client call:"),tt(`prisma.${i}(${ha(n)})`),tt("Generated request:"),tt(JSON.stringify(h,null,2)+` +`)),c?.kind==="batch"&&await c.lock,this._requestHandler.request({protocolQuery:h,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:c,unpacker:p,otelParentCtx:d,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:f})}catch(g){throw g.clientVersion=this._clientVersion,g}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new J("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function Jl(e,t){return Fm(e)?[new oe(e,t),Rl]:[e,Cl]}function Fm(e){return Array.isArray(e)&&Array.isArray(e.raw)}var Lm=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Zl(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Lm.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}function Xl(e){zt(e,{conflictCheck:"warn"})}0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,deserializeJsonResponse,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +/*! Bundled license information: + +decimal.js/decimal.mjs: + (*! + * decimal.js v10.4.3 + * An arbitrary-precision Decimal type for JavaScript. + * https://github.com/MikeMcl/decimal.js + * Copyright (c) 2022 Michael Mclaughlin + * MIT Licence + *) +*/ +//# sourceMappingURL=library.js.map diff --git a/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.mysql.js b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.mysql.js new file mode 100644 index 0000000..c83c47b --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.mysql.js @@ -0,0 +1,2 @@ +"use strict";var j=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var U=(t,e)=>{for(var n in e)j(t,n,{get:e[n],enumerable:!0})},B=(t,e,n,_)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of D(e))!M.call(t,o)&&o!==n&&j(t,o,{get:()=>e[o],enumerable:!(_=R(e,o))||_.enumerable});return t};var N=t=>B(j({},"__esModule",{value:!0}),t);var Oe={};U(Oe,{QueryEngine:()=>G,__wbg_String_88810dfeb4021902:()=>Ft,__wbg_buffer_344d9b41efe96da7:()=>Dt,__wbg_call_53fc3abd42e24ec8:()=>ue,__wbg_call_669127b9d730c650:()=>Ht,__wbg_crypto_58f13aa23ffcb166:()=>$t,__wbg_done_bc26bf4ada718266:()=>Yt,__wbg_entries_6d727b73ee02b7ce:()=>xe,__wbg_getRandomValues_504510b5564925af:()=>Nt,__wbg_getTime_ed6ee333b702f8fc:()=>it,__wbg_get_2aff440840bb6202:()=>ee,__wbg_get_4a9aa5157afeb382:()=>Gt,__wbg_get_94990005bd6ca07c:()=>Et,__wbg_getwithrefkey_5e6d9547403deab8:()=>kt,__wbg_globalThis_17eff828815f7d84:()=>_e,__wbg_global_46f939f6541643c5:()=>oe,__wbg_has_cdf8b85f6e903c80:()=>_t,__wbg_instanceof_ArrayBuffer_c7cc317e5c29cc0d:()=>pe,__wbg_instanceof_Promise_cfbcc42300367513:()=>ft,__wbg_instanceof_Uint8Array_19e6f142a5e7e1e1:()=>we,__wbg_isArray_38525be7442aa21e:()=>ie,__wbg_isSafeInteger_c38b0a16d0c7cef7:()=>se,__wbg_iterator_7ee1a391d310f8e4:()=>gt,__wbg_length_a5587d6cd79ab197:()=>ge,__wbg_length_cace2e0b3ddc0502:()=>bt,__wbg_msCrypto_abcb1295e768d1f2:()=>Wt,__wbg_new0_ad75dd38f92424e2:()=>ct,__wbg_new_08236689f0afb357:()=>Tt,__wbg_new_1b94180eeb48f2a2:()=>St,__wbg_new_c728d68b8b34487e:()=>At,__wbg_new_d8a000788389a31e:()=>Ut,__wbg_new_feb65b865d980ae2:()=>Y,__wbg_newnoargs_ccdcae30fd002262:()=>ce,__wbg_newwithbyteoffsetandlength_2dc04d99088b15e3:()=>Mt,__wbg_newwithlength_13b5319ab422dcf6:()=>Jt,__wbg_next_15da6a3df9290720:()=>te,__wbg_next_1989a20442400aaa:()=>Xt,__wbg_node_523d7bd03ef69fba:()=>Lt,__wbg_now_28a6b413aca4a96a:()=>de,__wbg_now_4579335d3581594c:()=>st,__wbg_now_8ed1a4454e40ecd1:()=>ut,__wbg_parse_3f0cb48976ca4123:()=>ot,__wbg_process_5b786e71d465a513:()=>Vt,__wbg_push_fd3233d09cf81821:()=>vt,__wbg_randomFillSync_a0d98aa11c81fe89:()=>Ct,__wbg_require_2784e593a4674877:()=>Pt,__wbg_resolve_a3252b2860f0a09e:()=>Ae,__wbg_self_3fad056edded10bd:()=>ne,__wbg_setTimeout_631fe61f31fa2fad:()=>Z,__wbg_set_0ac78a2bc07da03c:()=>It,__wbg_set_3355b9f2d3092e3b:()=>jt,__wbg_set_40f7786a25a9cc7e:()=>fe,__wbg_set_841ac57cff3d672b:()=>qt,__wbg_set_dcfd613a3420f908:()=>be,__wbg_set_wasm:()=>C,__wbg_stringify_4039297315a25b00:()=>ae,__wbg_subarray_6ca5cfa7fbb9abbe:()=>Bt,__wbg_then_1bbc9edafd859b06:()=>Se,__wbg_then_89e1c559530b85cf:()=>Ie,__wbg_valueOf_ff4b62641803432a:()=>Kt,__wbg_value_0570714ff7d75f35:()=>Zt,__wbg_versions_c2ab80650590b6a2:()=>zt,__wbg_window_a4f46c98a61d4089:()=>re,__wbindgen_bigint_from_i64:()=>pt,__wbindgen_bigint_from_u64:()=>yt,__wbindgen_bigint_get_as_i64:()=>me,__wbindgen_boolean_get:()=>dt,__wbindgen_cb_drop:()=>Te,__wbindgen_closure_wrapper6979:()=>je,__wbindgen_debug_string:()=>he,__wbindgen_error_new:()=>X,__wbindgen_in:()=>xt,__wbindgen_is_bigint:()=>lt,__wbindgen_is_function:()=>Qt,__wbindgen_is_object:()=>at,__wbindgen_is_string:()=>Ot,__wbindgen_is_undefined:()=>rt,__wbindgen_jsval_eq:()=>mt,__wbindgen_jsval_loose_eq:()=>le,__wbindgen_memory:()=>Rt,__wbindgen_number_get:()=>wt,__wbindgen_number_new:()=>ht,__wbindgen_object_clone_ref:()=>nt,__wbindgen_object_drop_ref:()=>tt,__wbindgen_string_get:()=>K,__wbindgen_string_new:()=>et,__wbindgen_throw:()=>ye,debug_panic:()=>Q,getBuildTimeInfo:()=>J});module.exports=N(Oe);var T=()=>{};T.prototype=T;let c;function C(t){c=t}const w=new Array(128).fill(void 0);w.push(void 0,null,!0,!1);function r(t){return w[t]}let a=0,I=null;function S(){return(I===null||I.byteLength===0)&&(I=new Uint8Array(c.memory.buffer)),I}const $=typeof TextEncoder>"u"?(0,module.require)("util").TextEncoder:TextEncoder;let A=new $("utf-8");const V=typeof A.encodeInto=="function"?function(t,e){return A.encodeInto(t,e)}:function(t,e){const n=A.encode(t);return e.set(n),{read:t.length,written:n.length}};function d(t,e,n){if(n===void 0){const s=A.encode(t),p=e(s.length,1)>>>0;return S().subarray(p,p+s.length).set(s),a=s.length,p}let _=t.length,o=e(_,1)>>>0;const f=S();let u=0;for(;u<_;u++){const s=t.charCodeAt(u);if(s>127)break;f[o+u]=s}if(u!==_){u!==0&&(t=t.slice(u)),o=n(o,_,_=u+t.length*3,1)>>>0;const s=S().subarray(o+u,o+_),p=V(t,s);u+=p.written,o=n(o,_,u,1)>>>0}return a=u,o}function x(t){return t==null}let y=null;function l(){return(y===null||y.buffer.detached===!0||y.buffer.detached===void 0&&y.buffer!==c.memory.buffer)&&(y=new DataView(c.memory.buffer)),y}const z=typeof TextDecoder>"u"?(0,module.require)("util").TextDecoder:TextDecoder;let q=new z("utf-8",{ignoreBOM:!0,fatal:!0});q.decode();function m(t,e){return t=t>>>0,q.decode(S().subarray(t,t+e))}let h=w.length;function i(t){h===w.length&&w.push(w.length+1);const e=h;return h=w[e],w[e]=t,e}function L(t){t<132||(w[t]=h,h=t)}function b(t){const e=r(t);return L(t),e}function O(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const o=t.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){const o=t.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(t)){const o=t.length;let f="[";o>0&&(f+=O(t[0]));for(let u=1;u1)_=n[1];else return toString.call(t);if(_=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message} +${t.stack}`:_}const k=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>{c.__wbindgen_export_2.get(t.dtor)(t.a,t.b)});function P(t,e,n,_){const o={a:t,b:e,cnt:1,dtor:n},f=(...u)=>{o.cnt++;const s=o.a;o.a=0;try{return _(s,o.b,...u)}finally{--o.cnt===0?(c.__wbindgen_export_2.get(o.dtor)(s,o.b),k.unregister(o)):o.a=s}};return f.original=o,k.register(f,o,o),f}function W(t,e,n){c._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9eef02caf99553a1(t,e,i(n))}function J(){const t=c.getBuildTimeInfo();return b(t)}function Q(t){try{const f=c.__wbindgen_add_to_stack_pointer(-16);var e=x(t)?0:d(t,c.__wbindgen_malloc,c.__wbindgen_realloc),n=a;c.debug_panic(f,e,n);var _=l().getInt32(f+4*0,!0),o=l().getInt32(f+4*1,!0);if(o)throw b(_)}finally{c.__wbindgen_add_to_stack_pointer(16)}}function g(t,e){try{return t.apply(this,e)}catch(n){c.__wbindgen_exn_store(i(n))}}function H(t,e,n,_){c.wasm_bindgen__convert__closures__invoke2_mut__h174c8485536aed69(t,e,i(n),i(_))}const v=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>c.__wbg_queryengine_free(t>>>0,1));class G{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,v.unregister(this),e}free(){const e=this.__destroy_into_raw();c.__wbg_queryengine_free(e,0)}constructor(e,n,_){try{const s=c.__wbindgen_add_to_stack_pointer(-16);c.queryengine_new(s,i(e),i(n),i(_));var o=l().getInt32(s+4*0,!0),f=l().getInt32(s+4*1,!0),u=l().getInt32(s+4*2,!0);if(u)throw b(f);return this.__wbg_ptr=o>>>0,v.register(this,this.__wbg_ptr,this),this}finally{c.__wbindgen_add_to_stack_pointer(16)}}connect(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_connect(this.__wbg_ptr,n,_);return b(o)}disconnect(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_disconnect(this.__wbg_ptr,n,_);return b(o)}query(e,n,_){const o=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),f=a,u=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),s=a;var p=x(_)?0:d(_,c.__wbindgen_malloc,c.__wbindgen_realloc),E=a;const F=c.queryengine_query(this.__wbg_ptr,o,f,u,s,p,E);return b(F)}startTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_startTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}commitTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_commitTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}rollbackTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_rollbackTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}metrics(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_metrics(this.__wbg_ptr,n,_);return b(o)}}function K(t,e){const n=r(e),_=typeof n=="string"?n:void 0;var o=x(_)?0:d(_,c.__wbindgen_malloc,c.__wbindgen_realloc),f=a;l().setInt32(t+4*1,f,!0),l().setInt32(t+4*0,o,!0)}function X(t,e){const n=new Error(m(t,e));return i(n)}function Y(t,e){try{var n={a:t,b:e},_=(f,u)=>{const s=n.a;n.a=0;try{return H(s,n.b,f,u)}finally{n.a=s}};const o=new Promise(_);return i(o)}finally{n.a=n.b=0}}function Z(t,e){return setTimeout(r(t),e>>>0)}function tt(t){b(t)}function et(t,e){const n=m(t,e);return i(n)}function nt(t){const e=r(t);return i(e)}function rt(t){return r(t)===void 0}function _t(){return g(function(t,e){return Reflect.has(r(t),r(e))},arguments)}function ot(){return g(function(t,e){const n=JSON.parse(m(t,e));return i(n)},arguments)}function ct(){return i(new Date)}function it(t){return r(t).getTime()}function ut(t){return r(t).now()}function st(){return Date.now()}function ft(t){let e;try{e=r(t)instanceof Promise}catch{e=!1}return e}function at(t){const e=r(t);return typeof e=="object"&&e!==null}function bt(t){return r(t).length}function gt(){return i(Symbol.iterator)}function dt(t){const e=r(t);return typeof e=="boolean"?e?1:0:2}function lt(t){return typeof r(t)=="bigint"}function wt(t,e){const n=r(e),_=typeof n=="number"?n:void 0;l().setFloat64(t+8*1,x(_)?0:_,!0),l().setInt32(t+4*0,!x(_),!0)}function pt(t){return i(t)}function xt(t,e){return r(t)in r(e)}function yt(t){const e=BigInt.asUintN(64,t);return i(e)}function mt(t,e){return r(t)===r(e)}function ht(t){return i(t)}function Tt(){const t=new Array;return i(t)}function It(t,e,n){r(t)[e>>>0]=b(n)}function St(){return i(new Map)}function At(){const t=new Object;return i(t)}function jt(t,e,n){const _=r(t).set(r(e),r(n));return i(_)}function Ot(t){return typeof r(t)=="string"}function qt(t,e,n){r(t)[b(e)]=b(n)}function kt(t,e){const n=r(t)[r(e)];return i(n)}function vt(t,e){return r(t).push(r(e))}function Et(){return g(function(t,e){const n=r(t)[b(e)];return i(n)},arguments)}function Ft(t,e){const n=String(r(e)),_=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a;l().setInt32(t+4*1,o,!0),l().setInt32(t+4*0,_,!0)}function Rt(){const t=c.memory;return i(t)}function Dt(t){const e=r(t).buffer;return i(e)}function Mt(t,e,n){const _=new Uint8Array(r(t),e>>>0,n>>>0);return i(_)}function Ut(t){const e=new Uint8Array(r(t));return i(e)}function Bt(t,e,n){const _=r(t).subarray(e>>>0,n>>>0);return i(_)}function Nt(){return g(function(t,e){r(t).getRandomValues(r(e))},arguments)}function Ct(){return g(function(t,e){r(t).randomFillSync(b(e))},arguments)}function $t(t){const e=r(t).crypto;return i(e)}function Vt(t){const e=r(t).process;return i(e)}function zt(t){const e=r(t).versions;return i(e)}function Lt(t){const e=r(t).node;return i(e)}function Pt(){return g(function(){const t=module.require;return i(t)},arguments)}function Wt(t){const e=r(t).msCrypto;return i(e)}function Jt(t){const e=new Uint8Array(t>>>0);return i(e)}function Qt(t){return typeof r(t)=="function"}function Ht(){return g(function(t,e){const n=r(t).call(r(e));return i(n)},arguments)}function Gt(t,e){const n=r(t)[e>>>0];return i(n)}function Kt(t){return r(t).valueOf()}function Xt(){return g(function(t){const e=r(t).next();return i(e)},arguments)}function Yt(t){return r(t).done}function Zt(t){const e=r(t).value;return i(e)}function te(t){const e=r(t).next;return i(e)}function ee(){return g(function(t,e){const n=Reflect.get(r(t),r(e));return i(n)},arguments)}function ne(){return g(function(){const t=self.self;return i(t)},arguments)}function re(){return g(function(){const t=window.window;return i(t)},arguments)}function _e(){return g(function(){const t=globalThis.globalThis;return i(t)},arguments)}function oe(){return g(function(){const t=global.global;return i(t)},arguments)}function ce(t,e){const n=new T(m(t,e));return i(n)}function ie(t){return Array.isArray(r(t))}function ue(){return g(function(t,e,n){const _=r(t).call(r(e),r(n));return i(_)},arguments)}function se(t){return Number.isSafeInteger(r(t))}function fe(){return g(function(t,e,n){return Reflect.set(r(t),r(e),r(n))},arguments)}function ae(){return g(function(t){const e=JSON.stringify(r(t));return i(e)},arguments)}function be(t,e,n){r(t).set(r(e),n>>>0)}function ge(t){return r(t).length}function de(){return g(function(){return Date.now()},arguments)}function le(t,e){return r(t)==r(e)}function we(t){let e;try{e=r(t)instanceof Uint8Array}catch{e=!1}return e}function pe(t){let e;try{e=r(t)instanceof ArrayBuffer}catch{e=!1}return e}function xe(t){const e=Object.entries(r(t));return i(e)}function ye(t,e){throw new Error(m(t,e))}function me(t,e){const n=r(e),_=typeof n=="bigint"?n:void 0;l().setBigInt64(t+8*1,x(_)?BigInt(0):_,!0),l().setInt32(t+4*0,!x(_),!0)}function he(t,e){const n=O(r(e)),_=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a;l().setInt32(t+4*1,o,!0),l().setInt32(t+4*0,_,!0)}function Te(t){const e=b(t).original;return e.cnt--==1?(e.a=0,!0):!1}function Ie(t,e){const n=r(t).then(r(e));return i(n)}function Se(t,e,n){const _=r(t).then(r(e),r(n));return i(_)}function Ae(t){const e=Promise.resolve(r(t));return i(e)}function je(t,e,n){const _=P(t,e,540,W);return i(_)}0&&(module.exports={QueryEngine,__wbg_String_88810dfeb4021902,__wbg_buffer_344d9b41efe96da7,__wbg_call_53fc3abd42e24ec8,__wbg_call_669127b9d730c650,__wbg_crypto_58f13aa23ffcb166,__wbg_done_bc26bf4ada718266,__wbg_entries_6d727b73ee02b7ce,__wbg_getRandomValues_504510b5564925af,__wbg_getTime_ed6ee333b702f8fc,__wbg_get_2aff440840bb6202,__wbg_get_4a9aa5157afeb382,__wbg_get_94990005bd6ca07c,__wbg_getwithrefkey_5e6d9547403deab8,__wbg_globalThis_17eff828815f7d84,__wbg_global_46f939f6541643c5,__wbg_has_cdf8b85f6e903c80,__wbg_instanceof_ArrayBuffer_c7cc317e5c29cc0d,__wbg_instanceof_Promise_cfbcc42300367513,__wbg_instanceof_Uint8Array_19e6f142a5e7e1e1,__wbg_isArray_38525be7442aa21e,__wbg_isSafeInteger_c38b0a16d0c7cef7,__wbg_iterator_7ee1a391d310f8e4,__wbg_length_a5587d6cd79ab197,__wbg_length_cace2e0b3ddc0502,__wbg_msCrypto_abcb1295e768d1f2,__wbg_new0_ad75dd38f92424e2,__wbg_new_08236689f0afb357,__wbg_new_1b94180eeb48f2a2,__wbg_new_c728d68b8b34487e,__wbg_new_d8a000788389a31e,__wbg_new_feb65b865d980ae2,__wbg_newnoargs_ccdcae30fd002262,__wbg_newwithbyteoffsetandlength_2dc04d99088b15e3,__wbg_newwithlength_13b5319ab422dcf6,__wbg_next_15da6a3df9290720,__wbg_next_1989a20442400aaa,__wbg_node_523d7bd03ef69fba,__wbg_now_28a6b413aca4a96a,__wbg_now_4579335d3581594c,__wbg_now_8ed1a4454e40ecd1,__wbg_parse_3f0cb48976ca4123,__wbg_process_5b786e71d465a513,__wbg_push_fd3233d09cf81821,__wbg_randomFillSync_a0d98aa11c81fe89,__wbg_require_2784e593a4674877,__wbg_resolve_a3252b2860f0a09e,__wbg_self_3fad056edded10bd,__wbg_setTimeout_631fe61f31fa2fad,__wbg_set_0ac78a2bc07da03c,__wbg_set_3355b9f2d3092e3b,__wbg_set_40f7786a25a9cc7e,__wbg_set_841ac57cff3d672b,__wbg_set_dcfd613a3420f908,__wbg_set_wasm,__wbg_stringify_4039297315a25b00,__wbg_subarray_6ca5cfa7fbb9abbe,__wbg_then_1bbc9edafd859b06,__wbg_then_89e1c559530b85cf,__wbg_valueOf_ff4b62641803432a,__wbg_value_0570714ff7d75f35,__wbg_versions_c2ab80650590b6a2,__wbg_window_a4f46c98a61d4089,__wbindgen_bigint_from_i64,__wbindgen_bigint_from_u64,__wbindgen_bigint_get_as_i64,__wbindgen_boolean_get,__wbindgen_cb_drop,__wbindgen_closure_wrapper6979,__wbindgen_debug_string,__wbindgen_error_new,__wbindgen_in,__wbindgen_is_bigint,__wbindgen_is_function,__wbindgen_is_object,__wbindgen_is_string,__wbindgen_is_undefined,__wbindgen_jsval_eq,__wbindgen_jsval_loose_eq,__wbindgen_memory,__wbindgen_number_get,__wbindgen_number_new,__wbindgen_object_clone_ref,__wbindgen_object_drop_ref,__wbindgen_string_get,__wbindgen_string_new,__wbindgen_throw,debug_panic,getBuildTimeInfo}); diff --git a/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.mysql.wasm b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.mysql.wasm new file mode 100644 index 0000000..33e9c47 Binary files /dev/null and b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.mysql.wasm differ diff --git a/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.postgresql.js b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.postgresql.js new file mode 100644 index 0000000..f5ecb75 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.postgresql.js @@ -0,0 +1,2 @@ +"use strict";var j=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var U=(t,e)=>{for(var n in e)j(t,n,{get:e[n],enumerable:!0})},B=(t,e,n,_)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of D(e))!M.call(t,o)&&o!==n&&j(t,o,{get:()=>e[o],enumerable:!(_=R(e,o))||_.enumerable});return t};var N=t=>B(j({},"__esModule",{value:!0}),t);var Ee={};U(Ee,{QueryEngine:()=>G,__wbg_String_88810dfeb4021902:()=>Dt,__wbg_buffer_344d9b41efe96da7:()=>Ut,__wbg_call_53fc3abd42e24ec8:()=>fe,__wbg_call_669127b9d730c650:()=>Kt,__wbg_crypto_58f13aa23ffcb166:()=>zt,__wbg_done_bc26bf4ada718266:()=>te,__wbg_entries_6d727b73ee02b7ce:()=>me,__wbg_exec_393fa168a3695345:()=>Ft,__wbg_getRandomValues_504510b5564925af:()=>$t,__wbg_getTime_ed6ee333b702f8fc:()=>ct,__wbg_get_2aff440840bb6202:()=>re,__wbg_get_4a9aa5157afeb382:()=>Xt,__wbg_get_94990005bd6ca07c:()=>Rt,__wbg_getwithrefkey_5e6d9547403deab8:()=>Et,__wbg_globalThis_17eff828815f7d84:()=>ce,__wbg_global_46f939f6541643c5:()=>ie,__wbg_has_cdf8b85f6e903c80:()=>rt,__wbg_instanceof_ArrayBuffer_c7cc317e5c29cc0d:()=>ye,__wbg_instanceof_Promise_cfbcc42300367513:()=>at,__wbg_instanceof_Uint8Array_19e6f142a5e7e1e1:()=>xe,__wbg_isArray_38525be7442aa21e:()=>se,__wbg_isSafeInteger_c38b0a16d0c7cef7:()=>ae,__wbg_iterator_7ee1a391d310f8e4:()=>gt,__wbg_length_a5587d6cd79ab197:()=>le,__wbg_length_cace2e0b3ddc0502:()=>bt,__wbg_msCrypto_abcb1295e768d1f2:()=>Qt,__wbg_new0_ad75dd38f92424e2:()=>ot,__wbg_new_00f9fd9cefd9f65c:()=>vt,__wbg_new_08236689f0afb357:()=>Tt,__wbg_new_1b94180eeb48f2a2:()=>St,__wbg_new_c728d68b8b34487e:()=>At,__wbg_new_d8a000788389a31e:()=>Nt,__wbg_new_feb65b865d980ae2:()=>Y,__wbg_newnoargs_ccdcae30fd002262:()=>ue,__wbg_newwithbyteoffsetandlength_2dc04d99088b15e3:()=>Bt,__wbg_newwithlength_13b5319ab422dcf6:()=>Ht,__wbg_next_15da6a3df9290720:()=>ne,__wbg_next_1989a20442400aaa:()=>Zt,__wbg_node_523d7bd03ef69fba:()=>Wt,__wbg_now_28a6b413aca4a96a:()=>we,__wbg_now_4579335d3581594c:()=>st,__wbg_now_8ed1a4454e40ecd1:()=>ut,__wbg_parse_3f0cb48976ca4123:()=>_t,__wbg_process_5b786e71d465a513:()=>Lt,__wbg_push_fd3233d09cf81821:()=>kt,__wbg_randomFillSync_a0d98aa11c81fe89:()=>Vt,__wbg_require_2784e593a4674877:()=>Jt,__wbg_resolve_a3252b2860f0a09e:()=>Oe,__wbg_self_3fad056edded10bd:()=>_e,__wbg_setTimeout_631fe61f31fa2fad:()=>Z,__wbg_set_0ac78a2bc07da03c:()=>It,__wbg_set_3355b9f2d3092e3b:()=>jt,__wbg_set_40f7786a25a9cc7e:()=>be,__wbg_set_841ac57cff3d672b:()=>qt,__wbg_set_dcfd613a3420f908:()=>de,__wbg_set_wasm:()=>C,__wbg_stringify_4039297315a25b00:()=>ge,__wbg_subarray_6ca5cfa7fbb9abbe:()=>Ct,__wbg_then_1bbc9edafd859b06:()=>je,__wbg_then_89e1c559530b85cf:()=>Ae,__wbg_valueOf_ff4b62641803432a:()=>Yt,__wbg_value_0570714ff7d75f35:()=>ee,__wbg_versions_c2ab80650590b6a2:()=>Pt,__wbg_window_a4f46c98a61d4089:()=>oe,__wbindgen_bigint_from_i64:()=>pt,__wbindgen_bigint_from_u64:()=>yt,__wbindgen_bigint_get_as_i64:()=>Te,__wbindgen_boolean_get:()=>dt,__wbindgen_cb_drop:()=>Se,__wbindgen_closure_wrapper7038:()=>qe,__wbindgen_debug_string:()=>Ie,__wbindgen_error_new:()=>X,__wbindgen_in:()=>xt,__wbindgen_is_bigint:()=>lt,__wbindgen_is_function:()=>Gt,__wbindgen_is_object:()=>ft,__wbindgen_is_string:()=>Ot,__wbindgen_is_undefined:()=>nt,__wbindgen_jsval_eq:()=>mt,__wbindgen_jsval_loose_eq:()=>pe,__wbindgen_memory:()=>Mt,__wbindgen_number_get:()=>wt,__wbindgen_number_new:()=>ht,__wbindgen_object_clone_ref:()=>et,__wbindgen_object_drop_ref:()=>it,__wbindgen_string_get:()=>K,__wbindgen_string_new:()=>tt,__wbindgen_throw:()=>he,debug_panic:()=>Q,getBuildTimeInfo:()=>J});module.exports=N(Ee);var T=()=>{};T.prototype=T;let c;function C(t){c=t}const w=new Array(128).fill(void 0);w.push(void 0,null,!0,!1);function r(t){return w[t]}let a=0,I=null;function S(){return(I===null||I.byteLength===0)&&(I=new Uint8Array(c.memory.buffer)),I}const $=typeof TextEncoder>"u"?(0,module.require)("util").TextEncoder:TextEncoder;let A=new $("utf-8");const V=typeof A.encodeInto=="function"?function(t,e){return A.encodeInto(t,e)}:function(t,e){const n=A.encode(t);return e.set(n),{read:t.length,written:n.length}};function d(t,e,n){if(n===void 0){const s=A.encode(t),y=e(s.length,1)>>>0;return S().subarray(y,y+s.length).set(s),a=s.length,y}let _=t.length,o=e(_,1)>>>0;const f=S();let u=0;for(;u<_;u++){const s=t.charCodeAt(u);if(s>127)break;f[o+u]=s}if(u!==_){u!==0&&(t=t.slice(u)),o=n(o,_,_=u+t.length*3,1)>>>0;const s=S().subarray(o+u,o+_),y=V(t,s);u+=y.written,o=n(o,_,u,1)>>>0}return a=u,o}function p(t){return t==null}let m=null;function l(){return(m===null||m.buffer.detached===!0||m.buffer.detached===void 0&&m.buffer!==c.memory.buffer)&&(m=new DataView(c.memory.buffer)),m}const z=typeof TextDecoder>"u"?(0,module.require)("util").TextDecoder:TextDecoder;let q=new z("utf-8",{ignoreBOM:!0,fatal:!0});q.decode();function x(t,e){return t=t>>>0,q.decode(S().subarray(t,t+e))}let h=w.length;function i(t){h===w.length&&w.push(w.length+1);const e=h;return h=w[e],w[e]=t,e}function L(t){t<132||(w[t]=h,h=t)}function b(t){const e=r(t);return L(t),e}function O(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const o=t.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){const o=t.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(t)){const o=t.length;let f="[";o>0&&(f+=O(t[0]));for(let u=1;u1)_=n[1];else return toString.call(t);if(_=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message} +${t.stack}`:_}const E=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>{c.__wbindgen_export_2.get(t.dtor)(t.a,t.b)});function P(t,e,n,_){const o={a:t,b:e,cnt:1,dtor:n},f=(...u)=>{o.cnt++;const s=o.a;o.a=0;try{return _(s,o.b,...u)}finally{--o.cnt===0?(c.__wbindgen_export_2.get(o.dtor)(s,o.b),E.unregister(o)):o.a=s}};return f.original=o,E.register(f,o,o),f}function W(t,e,n){c._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9eef02caf99553a1(t,e,i(n))}function J(){const t=c.getBuildTimeInfo();return b(t)}function Q(t){try{const f=c.__wbindgen_add_to_stack_pointer(-16);var e=p(t)?0:d(t,c.__wbindgen_malloc,c.__wbindgen_realloc),n=a;c.debug_panic(f,e,n);var _=l().getInt32(f+4*0,!0),o=l().getInt32(f+4*1,!0);if(o)throw b(_)}finally{c.__wbindgen_add_to_stack_pointer(16)}}function g(t,e){try{return t.apply(this,e)}catch(n){c.__wbindgen_exn_store(i(n))}}function H(t,e,n,_){c.wasm_bindgen__convert__closures__invoke2_mut__h174c8485536aed69(t,e,i(n),i(_))}const k=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>c.__wbg_queryengine_free(t>>>0,1));class G{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,k.unregister(this),e}free(){const e=this.__destroy_into_raw();c.__wbg_queryengine_free(e,0)}constructor(e,n,_){try{const s=c.__wbindgen_add_to_stack_pointer(-16);c.queryengine_new(s,i(e),i(n),i(_));var o=l().getInt32(s+4*0,!0),f=l().getInt32(s+4*1,!0),u=l().getInt32(s+4*2,!0);if(u)throw b(f);return this.__wbg_ptr=o>>>0,k.register(this,this.__wbg_ptr,this),this}finally{c.__wbindgen_add_to_stack_pointer(16)}}connect(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_connect(this.__wbg_ptr,n,_);return b(o)}disconnect(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_disconnect(this.__wbg_ptr,n,_);return b(o)}query(e,n,_){const o=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),f=a,u=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),s=a;var y=p(_)?0:d(_,c.__wbindgen_malloc,c.__wbindgen_realloc),v=a;const F=c.queryengine_query(this.__wbg_ptr,o,f,u,s,y,v);return b(F)}startTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_startTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}commitTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_commitTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}rollbackTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_rollbackTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}metrics(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_metrics(this.__wbg_ptr,n,_);return b(o)}}function K(t,e){const n=r(e),_=typeof n=="string"?n:void 0;var o=p(_)?0:d(_,c.__wbindgen_malloc,c.__wbindgen_realloc),f=a;l().setInt32(t+4*1,f,!0),l().setInt32(t+4*0,o,!0)}function X(t,e){const n=new Error(x(t,e));return i(n)}function Y(t,e){try{var n={a:t,b:e},_=(f,u)=>{const s=n.a;n.a=0;try{return H(s,n.b,f,u)}finally{n.a=s}};const o=new Promise(_);return i(o)}finally{n.a=n.b=0}}function Z(t,e){return setTimeout(r(t),e>>>0)}function tt(t,e){const n=x(t,e);return i(n)}function et(t){const e=r(t);return i(e)}function nt(t){return r(t)===void 0}function rt(){return g(function(t,e){return Reflect.has(r(t),r(e))},arguments)}function _t(){return g(function(t,e){const n=JSON.parse(x(t,e));return i(n)},arguments)}function ot(){return i(new Date)}function ct(t){return r(t).getTime()}function it(t){b(t)}function ut(t){return r(t).now()}function st(){return Date.now()}function ft(t){const e=r(t);return typeof e=="object"&&e!==null}function at(t){let e;try{e=r(t)instanceof Promise}catch{e=!1}return e}function bt(t){return r(t).length}function gt(){return i(Symbol.iterator)}function dt(t){const e=r(t);return typeof e=="boolean"?e?1:0:2}function lt(t){return typeof r(t)=="bigint"}function wt(t,e){const n=r(e),_=typeof n=="number"?n:void 0;l().setFloat64(t+8*1,p(_)?0:_,!0),l().setInt32(t+4*0,!p(_),!0)}function pt(t){return i(t)}function xt(t,e){return r(t)in r(e)}function yt(t){const e=BigInt.asUintN(64,t);return i(e)}function mt(t,e){return r(t)===r(e)}function ht(t){return i(t)}function Tt(){const t=new Array;return i(t)}function It(t,e,n){r(t)[e>>>0]=b(n)}function St(){return i(new Map)}function At(){const t=new Object;return i(t)}function jt(t,e,n){const _=r(t).set(r(e),r(n));return i(_)}function Ot(t){return typeof r(t)=="string"}function qt(t,e,n){r(t)[b(e)]=b(n)}function Et(t,e){const n=r(t)[r(e)];return i(n)}function kt(t,e){return r(t).push(r(e))}function vt(t,e,n,_){const o=new RegExp(x(t,e),x(n,_));return i(o)}function Ft(t,e,n){const _=r(t).exec(x(e,n));return p(_)?0:i(_)}function Rt(){return g(function(t,e){const n=r(t)[b(e)];return i(n)},arguments)}function Dt(t,e){const n=String(r(e)),_=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a;l().setInt32(t+4*1,o,!0),l().setInt32(t+4*0,_,!0)}function Mt(){const t=c.memory;return i(t)}function Ut(t){const e=r(t).buffer;return i(e)}function Bt(t,e,n){const _=new Uint8Array(r(t),e>>>0,n>>>0);return i(_)}function Nt(t){const e=new Uint8Array(r(t));return i(e)}function Ct(t,e,n){const _=r(t).subarray(e>>>0,n>>>0);return i(_)}function $t(){return g(function(t,e){r(t).getRandomValues(r(e))},arguments)}function Vt(){return g(function(t,e){r(t).randomFillSync(b(e))},arguments)}function zt(t){const e=r(t).crypto;return i(e)}function Lt(t){const e=r(t).process;return i(e)}function Pt(t){const e=r(t).versions;return i(e)}function Wt(t){const e=r(t).node;return i(e)}function Jt(){return g(function(){const t=module.require;return i(t)},arguments)}function Qt(t){const e=r(t).msCrypto;return i(e)}function Ht(t){const e=new Uint8Array(t>>>0);return i(e)}function Gt(t){return typeof r(t)=="function"}function Kt(){return g(function(t,e){const n=r(t).call(r(e));return i(n)},arguments)}function Xt(t,e){const n=r(t)[e>>>0];return i(n)}function Yt(t){return r(t).valueOf()}function Zt(){return g(function(t){const e=r(t).next();return i(e)},arguments)}function te(t){return r(t).done}function ee(t){const e=r(t).value;return i(e)}function ne(t){const e=r(t).next;return i(e)}function re(){return g(function(t,e){const n=Reflect.get(r(t),r(e));return i(n)},arguments)}function _e(){return g(function(){const t=self.self;return i(t)},arguments)}function oe(){return g(function(){const t=window.window;return i(t)},arguments)}function ce(){return g(function(){const t=globalThis.globalThis;return i(t)},arguments)}function ie(){return g(function(){const t=global.global;return i(t)},arguments)}function ue(t,e){const n=new T(x(t,e));return i(n)}function se(t){return Array.isArray(r(t))}function fe(){return g(function(t,e,n){const _=r(t).call(r(e),r(n));return i(_)},arguments)}function ae(t){return Number.isSafeInteger(r(t))}function be(){return g(function(t,e,n){return Reflect.set(r(t),r(e),r(n))},arguments)}function ge(){return g(function(t){const e=JSON.stringify(r(t));return i(e)},arguments)}function de(t,e,n){r(t).set(r(e),n>>>0)}function le(t){return r(t).length}function we(){return g(function(){return Date.now()},arguments)}function pe(t,e){return r(t)==r(e)}function xe(t){let e;try{e=r(t)instanceof Uint8Array}catch{e=!1}return e}function ye(t){let e;try{e=r(t)instanceof ArrayBuffer}catch{e=!1}return e}function me(t){const e=Object.entries(r(t));return i(e)}function he(t,e){throw new Error(x(t,e))}function Te(t,e){const n=r(e),_=typeof n=="bigint"?n:void 0;l().setBigInt64(t+8*1,p(_)?BigInt(0):_,!0),l().setInt32(t+4*0,!p(_),!0)}function Ie(t,e){const n=O(r(e)),_=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a;l().setInt32(t+4*1,o,!0),l().setInt32(t+4*0,_,!0)}function Se(t){const e=b(t).original;return e.cnt--==1?(e.a=0,!0):!1}function Ae(t,e){const n=r(t).then(r(e));return i(n)}function je(t,e,n){const _=r(t).then(r(e),r(n));return i(_)}function Oe(t){const e=Promise.resolve(r(t));return i(e)}function qe(t,e,n){const _=P(t,e,541,W);return i(_)}0&&(module.exports={QueryEngine,__wbg_String_88810dfeb4021902,__wbg_buffer_344d9b41efe96da7,__wbg_call_53fc3abd42e24ec8,__wbg_call_669127b9d730c650,__wbg_crypto_58f13aa23ffcb166,__wbg_done_bc26bf4ada718266,__wbg_entries_6d727b73ee02b7ce,__wbg_exec_393fa168a3695345,__wbg_getRandomValues_504510b5564925af,__wbg_getTime_ed6ee333b702f8fc,__wbg_get_2aff440840bb6202,__wbg_get_4a9aa5157afeb382,__wbg_get_94990005bd6ca07c,__wbg_getwithrefkey_5e6d9547403deab8,__wbg_globalThis_17eff828815f7d84,__wbg_global_46f939f6541643c5,__wbg_has_cdf8b85f6e903c80,__wbg_instanceof_ArrayBuffer_c7cc317e5c29cc0d,__wbg_instanceof_Promise_cfbcc42300367513,__wbg_instanceof_Uint8Array_19e6f142a5e7e1e1,__wbg_isArray_38525be7442aa21e,__wbg_isSafeInteger_c38b0a16d0c7cef7,__wbg_iterator_7ee1a391d310f8e4,__wbg_length_a5587d6cd79ab197,__wbg_length_cace2e0b3ddc0502,__wbg_msCrypto_abcb1295e768d1f2,__wbg_new0_ad75dd38f92424e2,__wbg_new_00f9fd9cefd9f65c,__wbg_new_08236689f0afb357,__wbg_new_1b94180eeb48f2a2,__wbg_new_c728d68b8b34487e,__wbg_new_d8a000788389a31e,__wbg_new_feb65b865d980ae2,__wbg_newnoargs_ccdcae30fd002262,__wbg_newwithbyteoffsetandlength_2dc04d99088b15e3,__wbg_newwithlength_13b5319ab422dcf6,__wbg_next_15da6a3df9290720,__wbg_next_1989a20442400aaa,__wbg_node_523d7bd03ef69fba,__wbg_now_28a6b413aca4a96a,__wbg_now_4579335d3581594c,__wbg_now_8ed1a4454e40ecd1,__wbg_parse_3f0cb48976ca4123,__wbg_process_5b786e71d465a513,__wbg_push_fd3233d09cf81821,__wbg_randomFillSync_a0d98aa11c81fe89,__wbg_require_2784e593a4674877,__wbg_resolve_a3252b2860f0a09e,__wbg_self_3fad056edded10bd,__wbg_setTimeout_631fe61f31fa2fad,__wbg_set_0ac78a2bc07da03c,__wbg_set_3355b9f2d3092e3b,__wbg_set_40f7786a25a9cc7e,__wbg_set_841ac57cff3d672b,__wbg_set_dcfd613a3420f908,__wbg_set_wasm,__wbg_stringify_4039297315a25b00,__wbg_subarray_6ca5cfa7fbb9abbe,__wbg_then_1bbc9edafd859b06,__wbg_then_89e1c559530b85cf,__wbg_valueOf_ff4b62641803432a,__wbg_value_0570714ff7d75f35,__wbg_versions_c2ab80650590b6a2,__wbg_window_a4f46c98a61d4089,__wbindgen_bigint_from_i64,__wbindgen_bigint_from_u64,__wbindgen_bigint_get_as_i64,__wbindgen_boolean_get,__wbindgen_cb_drop,__wbindgen_closure_wrapper7038,__wbindgen_debug_string,__wbindgen_error_new,__wbindgen_in,__wbindgen_is_bigint,__wbindgen_is_function,__wbindgen_is_object,__wbindgen_is_string,__wbindgen_is_undefined,__wbindgen_jsval_eq,__wbindgen_jsval_loose_eq,__wbindgen_memory,__wbindgen_number_get,__wbindgen_number_new,__wbindgen_object_clone_ref,__wbindgen_object_drop_ref,__wbindgen_string_get,__wbindgen_string_new,__wbindgen_throw,debug_panic,getBuildTimeInfo}); diff --git a/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.postgresql.wasm b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.postgresql.wasm new file mode 100644 index 0000000..fb1c932 Binary files /dev/null and b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.postgresql.wasm differ diff --git a/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.sqlite.js b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.sqlite.js new file mode 100644 index 0000000..8b8c033 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.sqlite.js @@ -0,0 +1,2 @@ +"use strict";var j=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var U=(t,e)=>{for(var n in e)j(t,n,{get:e[n],enumerable:!0})},B=(t,e,n,_)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of D(e))!M.call(t,o)&&o!==n&&j(t,o,{get:()=>e[o],enumerable:!(_=R(e,o))||_.enumerable});return t};var N=t=>B(j({},"__esModule",{value:!0}),t);var Oe={};U(Oe,{QueryEngine:()=>G,__wbg_String_88810dfeb4021902:()=>Et,__wbg_buffer_344d9b41efe96da7:()=>Rt,__wbg_call_53fc3abd42e24ec8:()=>ie,__wbg_call_669127b9d730c650:()=>Qt,__wbg_crypto_58f13aa23ffcb166:()=>Ct,__wbg_done_bc26bf4ada718266:()=>Xt,__wbg_entries_6d727b73ee02b7ce:()=>pe,__wbg_getRandomValues_504510b5564925af:()=>Bt,__wbg_getTime_ed6ee333b702f8fc:()=>ct,__wbg_get_2aff440840bb6202:()=>te,__wbg_get_4a9aa5157afeb382:()=>Ht,__wbg_get_94990005bd6ca07c:()=>vt,__wbg_getwithrefkey_5e6d9547403deab8:()=>qt,__wbg_globalThis_17eff828815f7d84:()=>re,__wbg_global_46f939f6541643c5:()=>_e,__wbg_has_cdf8b85f6e903c80:()=>rt,__wbg_instanceof_ArrayBuffer_c7cc317e5c29cc0d:()=>we,__wbg_instanceof_Promise_cfbcc42300367513:()=>st,__wbg_instanceof_Uint8Array_19e6f142a5e7e1e1:()=>le,__wbg_isArray_38525be7442aa21e:()=>ce,__wbg_isSafeInteger_c38b0a16d0c7cef7:()=>ue,__wbg_iterator_7ee1a391d310f8e4:()=>bt,__wbg_length_a5587d6cd79ab197:()=>be,__wbg_length_cace2e0b3ddc0502:()=>at,__wbg_msCrypto_abcb1295e768d1f2:()=>Pt,__wbg_new0_ad75dd38f92424e2:()=>ot,__wbg_new_08236689f0afb357:()=>ht,__wbg_new_1b94180eeb48f2a2:()=>It,__wbg_new_c728d68b8b34487e:()=>St,__wbg_new_d8a000788389a31e:()=>Mt,__wbg_new_feb65b865d980ae2:()=>Y,__wbg_newnoargs_ccdcae30fd002262:()=>oe,__wbg_newwithbyteoffsetandlength_2dc04d99088b15e3:()=>Dt,__wbg_newwithlength_13b5319ab422dcf6:()=>Wt,__wbg_next_15da6a3df9290720:()=>Zt,__wbg_next_1989a20442400aaa:()=>Kt,__wbg_node_523d7bd03ef69fba:()=>zt,__wbg_now_28a6b413aca4a96a:()=>ge,__wbg_now_4579335d3581594c:()=>ut,__wbg_now_8ed1a4454e40ecd1:()=>it,__wbg_parse_3f0cb48976ca4123:()=>_t,__wbg_process_5b786e71d465a513:()=>$t,__wbg_push_fd3233d09cf81821:()=>kt,__wbg_randomFillSync_a0d98aa11c81fe89:()=>Nt,__wbg_require_2784e593a4674877:()=>Lt,__wbg_resolve_a3252b2860f0a09e:()=>Ae,__wbg_self_3fad056edded10bd:()=>ee,__wbg_setTimeout_631fe61f31fa2fad:()=>Z,__wbg_set_0ac78a2bc07da03c:()=>Tt,__wbg_set_3355b9f2d3092e3b:()=>At,__wbg_set_40f7786a25a9cc7e:()=>se,__wbg_set_841ac57cff3d672b:()=>Ot,__wbg_set_dcfd613a3420f908:()=>ae,__wbg_set_wasm:()=>C,__wbg_stringify_4039297315a25b00:()=>fe,__wbg_subarray_6ca5cfa7fbb9abbe:()=>Ut,__wbg_then_1bbc9edafd859b06:()=>Se,__wbg_then_89e1c559530b85cf:()=>Ie,__wbg_valueOf_ff4b62641803432a:()=>Gt,__wbg_value_0570714ff7d75f35:()=>Yt,__wbg_versions_c2ab80650590b6a2:()=>Vt,__wbg_window_a4f46c98a61d4089:()=>ne,__wbindgen_bigint_from_i64:()=>wt,__wbindgen_bigint_from_u64:()=>xt,__wbindgen_bigint_get_as_i64:()=>ye,__wbindgen_boolean_get:()=>gt,__wbindgen_cb_drop:()=>he,__wbindgen_closure_wrapper6700:()=>je,__wbindgen_debug_string:()=>me,__wbindgen_error_new:()=>X,__wbindgen_in:()=>pt,__wbindgen_is_bigint:()=>dt,__wbindgen_is_function:()=>Jt,__wbindgen_is_object:()=>ft,__wbindgen_is_string:()=>jt,__wbindgen_is_undefined:()=>nt,__wbindgen_jsval_eq:()=>yt,__wbindgen_jsval_loose_eq:()=>de,__wbindgen_memory:()=>Ft,__wbindgen_number_get:()=>lt,__wbindgen_number_new:()=>mt,__wbindgen_object_clone_ref:()=>et,__wbindgen_object_drop_ref:()=>Te,__wbindgen_string_get:()=>K,__wbindgen_string_new:()=>tt,__wbindgen_throw:()=>xe,debug_panic:()=>Q,getBuildTimeInfo:()=>J});module.exports=N(Oe);var T=()=>{};T.prototype=T;let c;function C(t){c=t}const w=new Array(128).fill(void 0);w.push(void 0,null,!0,!1);function r(t){return w[t]}let a=0,I=null;function S(){return(I===null||I.byteLength===0)&&(I=new Uint8Array(c.memory.buffer)),I}const $=typeof TextEncoder>"u"?(0,module.require)("util").TextEncoder:TextEncoder;let A=new $("utf-8");const V=typeof A.encodeInto=="function"?function(t,e){return A.encodeInto(t,e)}:function(t,e){const n=A.encode(t);return e.set(n),{read:t.length,written:n.length}};function d(t,e,n){if(n===void 0){const s=A.encode(t),p=e(s.length,1)>>>0;return S().subarray(p,p+s.length).set(s),a=s.length,p}let _=t.length,o=e(_,1)>>>0;const f=S();let u=0;for(;u<_;u++){const s=t.charCodeAt(u);if(s>127)break;f[o+u]=s}if(u!==_){u!==0&&(t=t.slice(u)),o=n(o,_,_=u+t.length*3,1)>>>0;const s=S().subarray(o+u,o+_),p=V(t,s);u+=p.written,o=n(o,_,u,1)>>>0}return a=u,o}function x(t){return t==null}let y=null;function l(){return(y===null||y.buffer.detached===!0||y.buffer.detached===void 0&&y.buffer!==c.memory.buffer)&&(y=new DataView(c.memory.buffer)),y}const z=typeof TextDecoder>"u"?(0,module.require)("util").TextDecoder:TextDecoder;let q=new z("utf-8",{ignoreBOM:!0,fatal:!0});q.decode();function m(t,e){return t=t>>>0,q.decode(S().subarray(t,t+e))}let h=w.length;function i(t){h===w.length&&w.push(w.length+1);const e=h;return h=w[e],w[e]=t,e}function O(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const o=t.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){const o=t.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(t)){const o=t.length;let f="[";o>0&&(f+=O(t[0]));for(let u=1;u1)_=n[1];else return toString.call(t);if(_=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message} +${t.stack}`:_}function L(t){t<132||(w[t]=h,h=t)}function b(t){const e=r(t);return L(t),e}const k=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>{c.__wbindgen_export_2.get(t.dtor)(t.a,t.b)});function P(t,e,n,_){const o={a:t,b:e,cnt:1,dtor:n},f=(...u)=>{o.cnt++;const s=o.a;o.a=0;try{return _(s,o.b,...u)}finally{--o.cnt===0?(c.__wbindgen_export_2.get(o.dtor)(s,o.b),k.unregister(o)):o.a=s}};return f.original=o,k.register(f,o,o),f}function W(t,e,n){c._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9eef02caf99553a1(t,e,i(n))}function J(){const t=c.getBuildTimeInfo();return b(t)}function Q(t){try{const f=c.__wbindgen_add_to_stack_pointer(-16);var e=x(t)?0:d(t,c.__wbindgen_malloc,c.__wbindgen_realloc),n=a;c.debug_panic(f,e,n);var _=l().getInt32(f+4*0,!0),o=l().getInt32(f+4*1,!0);if(o)throw b(_)}finally{c.__wbindgen_add_to_stack_pointer(16)}}function g(t,e){try{return t.apply(this,e)}catch(n){c.__wbindgen_exn_store(i(n))}}function H(t,e,n,_){c.wasm_bindgen__convert__closures__invoke2_mut__h174c8485536aed69(t,e,i(n),i(_))}const v=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>c.__wbg_queryengine_free(t>>>0,1));class G{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,v.unregister(this),e}free(){const e=this.__destroy_into_raw();c.__wbg_queryengine_free(e,0)}constructor(e,n,_){try{const s=c.__wbindgen_add_to_stack_pointer(-16);c.queryengine_new(s,i(e),i(n),i(_));var o=l().getInt32(s+4*0,!0),f=l().getInt32(s+4*1,!0),u=l().getInt32(s+4*2,!0);if(u)throw b(f);return this.__wbg_ptr=o>>>0,v.register(this,this.__wbg_ptr,this),this}finally{c.__wbindgen_add_to_stack_pointer(16)}}connect(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_connect(this.__wbg_ptr,n,_);return b(o)}disconnect(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_disconnect(this.__wbg_ptr,n,_);return b(o)}query(e,n,_){const o=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),f=a,u=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),s=a;var p=x(_)?0:d(_,c.__wbindgen_malloc,c.__wbindgen_realloc),E=a;const F=c.queryengine_query(this.__wbg_ptr,o,f,u,s,p,E);return b(F)}startTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_startTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}commitTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_commitTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}rollbackTransaction(e,n){const _=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a,f=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),u=a,s=c.queryengine_rollbackTransaction(this.__wbg_ptr,_,o,f,u);return b(s)}metrics(e){const n=d(e,c.__wbindgen_malloc,c.__wbindgen_realloc),_=a,o=c.queryengine_metrics(this.__wbg_ptr,n,_);return b(o)}}function K(t,e){const n=r(e),_=typeof n=="string"?n:void 0;var o=x(_)?0:d(_,c.__wbindgen_malloc,c.__wbindgen_realloc),f=a;l().setInt32(t+4*1,f,!0),l().setInt32(t+4*0,o,!0)}function X(t,e){const n=new Error(m(t,e));return i(n)}function Y(t,e){try{var n={a:t,b:e},_=(f,u)=>{const s=n.a;n.a=0;try{return H(s,n.b,f,u)}finally{n.a=s}};const o=new Promise(_);return i(o)}finally{n.a=n.b=0}}function Z(t,e){return setTimeout(r(t),e>>>0)}function tt(t,e){const n=m(t,e);return i(n)}function et(t){const e=r(t);return i(e)}function nt(t){return r(t)===void 0}function rt(){return g(function(t,e){return Reflect.has(r(t),r(e))},arguments)}function _t(){return g(function(t,e){const n=JSON.parse(m(t,e));return i(n)},arguments)}function ot(){return i(new Date)}function ct(t){return r(t).getTime()}function it(t){return r(t).now()}function ut(){return Date.now()}function st(t){let e;try{e=r(t)instanceof Promise}catch{e=!1}return e}function ft(t){const e=r(t);return typeof e=="object"&&e!==null}function at(t){return r(t).length}function bt(){return i(Symbol.iterator)}function gt(t){const e=r(t);return typeof e=="boolean"?e?1:0:2}function dt(t){return typeof r(t)=="bigint"}function lt(t,e){const n=r(e),_=typeof n=="number"?n:void 0;l().setFloat64(t+8*1,x(_)?0:_,!0),l().setInt32(t+4*0,!x(_),!0)}function wt(t){return i(t)}function pt(t,e){return r(t)in r(e)}function xt(t){const e=BigInt.asUintN(64,t);return i(e)}function yt(t,e){return r(t)===r(e)}function mt(t){return i(t)}function ht(){const t=new Array;return i(t)}function Tt(t,e,n){r(t)[e>>>0]=b(n)}function It(){return i(new Map)}function St(){const t=new Object;return i(t)}function At(t,e,n){const _=r(t).set(r(e),r(n));return i(_)}function jt(t){return typeof r(t)=="string"}function Ot(t,e,n){r(t)[b(e)]=b(n)}function qt(t,e){const n=r(t)[r(e)];return i(n)}function kt(t,e){return r(t).push(r(e))}function vt(){return g(function(t,e){const n=r(t)[b(e)];return i(n)},arguments)}function Et(t,e){const n=String(r(e)),_=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a;l().setInt32(t+4*1,o,!0),l().setInt32(t+4*0,_,!0)}function Ft(){const t=c.memory;return i(t)}function Rt(t){const e=r(t).buffer;return i(e)}function Dt(t,e,n){const _=new Uint8Array(r(t),e>>>0,n>>>0);return i(_)}function Mt(t){const e=new Uint8Array(r(t));return i(e)}function Ut(t,e,n){const _=r(t).subarray(e>>>0,n>>>0);return i(_)}function Bt(){return g(function(t,e){r(t).getRandomValues(r(e))},arguments)}function Nt(){return g(function(t,e){r(t).randomFillSync(b(e))},arguments)}function Ct(t){const e=r(t).crypto;return i(e)}function $t(t){const e=r(t).process;return i(e)}function Vt(t){const e=r(t).versions;return i(e)}function zt(t){const e=r(t).node;return i(e)}function Lt(){return g(function(){const t=module.require;return i(t)},arguments)}function Pt(t){const e=r(t).msCrypto;return i(e)}function Wt(t){const e=new Uint8Array(t>>>0);return i(e)}function Jt(t){return typeof r(t)=="function"}function Qt(){return g(function(t,e){const n=r(t).call(r(e));return i(n)},arguments)}function Ht(t,e){const n=r(t)[e>>>0];return i(n)}function Gt(t){return r(t).valueOf()}function Kt(){return g(function(t){const e=r(t).next();return i(e)},arguments)}function Xt(t){return r(t).done}function Yt(t){const e=r(t).value;return i(e)}function Zt(t){const e=r(t).next;return i(e)}function te(){return g(function(t,e){const n=Reflect.get(r(t),r(e));return i(n)},arguments)}function ee(){return g(function(){const t=self.self;return i(t)},arguments)}function ne(){return g(function(){const t=window.window;return i(t)},arguments)}function re(){return g(function(){const t=globalThis.globalThis;return i(t)},arguments)}function _e(){return g(function(){const t=global.global;return i(t)},arguments)}function oe(t,e){const n=new T(m(t,e));return i(n)}function ce(t){return Array.isArray(r(t))}function ie(){return g(function(t,e,n){const _=r(t).call(r(e),r(n));return i(_)},arguments)}function ue(t){return Number.isSafeInteger(r(t))}function se(){return g(function(t,e,n){return Reflect.set(r(t),r(e),r(n))},arguments)}function fe(){return g(function(t){const e=JSON.stringify(r(t));return i(e)},arguments)}function ae(t,e,n){r(t).set(r(e),n>>>0)}function be(t){return r(t).length}function ge(){return g(function(){return Date.now()},arguments)}function de(t,e){return r(t)==r(e)}function le(t){let e;try{e=r(t)instanceof Uint8Array}catch{e=!1}return e}function we(t){let e;try{e=r(t)instanceof ArrayBuffer}catch{e=!1}return e}function pe(t){const e=Object.entries(r(t));return i(e)}function xe(t,e){throw new Error(m(t,e))}function ye(t,e){const n=r(e),_=typeof n=="bigint"?n:void 0;l().setBigInt64(t+8*1,x(_)?BigInt(0):_,!0),l().setInt32(t+4*0,!x(_),!0)}function me(t,e){const n=O(r(e)),_=d(n,c.__wbindgen_malloc,c.__wbindgen_realloc),o=a;l().setInt32(t+4*1,o,!0),l().setInt32(t+4*0,_,!0)}function he(t){const e=b(t).original;return e.cnt--==1?(e.a=0,!0):!1}function Te(t){b(t)}function Ie(t,e){const n=r(t).then(r(e));return i(n)}function Se(t,e,n){const _=r(t).then(r(e),r(n));return i(_)}function Ae(t){const e=Promise.resolve(r(t));return i(e)}function je(t,e,n){const _=P(t,e,530,W);return i(_)}0&&(module.exports={QueryEngine,__wbg_String_88810dfeb4021902,__wbg_buffer_344d9b41efe96da7,__wbg_call_53fc3abd42e24ec8,__wbg_call_669127b9d730c650,__wbg_crypto_58f13aa23ffcb166,__wbg_done_bc26bf4ada718266,__wbg_entries_6d727b73ee02b7ce,__wbg_getRandomValues_504510b5564925af,__wbg_getTime_ed6ee333b702f8fc,__wbg_get_2aff440840bb6202,__wbg_get_4a9aa5157afeb382,__wbg_get_94990005bd6ca07c,__wbg_getwithrefkey_5e6d9547403deab8,__wbg_globalThis_17eff828815f7d84,__wbg_global_46f939f6541643c5,__wbg_has_cdf8b85f6e903c80,__wbg_instanceof_ArrayBuffer_c7cc317e5c29cc0d,__wbg_instanceof_Promise_cfbcc42300367513,__wbg_instanceof_Uint8Array_19e6f142a5e7e1e1,__wbg_isArray_38525be7442aa21e,__wbg_isSafeInteger_c38b0a16d0c7cef7,__wbg_iterator_7ee1a391d310f8e4,__wbg_length_a5587d6cd79ab197,__wbg_length_cace2e0b3ddc0502,__wbg_msCrypto_abcb1295e768d1f2,__wbg_new0_ad75dd38f92424e2,__wbg_new_08236689f0afb357,__wbg_new_1b94180eeb48f2a2,__wbg_new_c728d68b8b34487e,__wbg_new_d8a000788389a31e,__wbg_new_feb65b865d980ae2,__wbg_newnoargs_ccdcae30fd002262,__wbg_newwithbyteoffsetandlength_2dc04d99088b15e3,__wbg_newwithlength_13b5319ab422dcf6,__wbg_next_15da6a3df9290720,__wbg_next_1989a20442400aaa,__wbg_node_523d7bd03ef69fba,__wbg_now_28a6b413aca4a96a,__wbg_now_4579335d3581594c,__wbg_now_8ed1a4454e40ecd1,__wbg_parse_3f0cb48976ca4123,__wbg_process_5b786e71d465a513,__wbg_push_fd3233d09cf81821,__wbg_randomFillSync_a0d98aa11c81fe89,__wbg_require_2784e593a4674877,__wbg_resolve_a3252b2860f0a09e,__wbg_self_3fad056edded10bd,__wbg_setTimeout_631fe61f31fa2fad,__wbg_set_0ac78a2bc07da03c,__wbg_set_3355b9f2d3092e3b,__wbg_set_40f7786a25a9cc7e,__wbg_set_841ac57cff3d672b,__wbg_set_dcfd613a3420f908,__wbg_set_wasm,__wbg_stringify_4039297315a25b00,__wbg_subarray_6ca5cfa7fbb9abbe,__wbg_then_1bbc9edafd859b06,__wbg_then_89e1c559530b85cf,__wbg_valueOf_ff4b62641803432a,__wbg_value_0570714ff7d75f35,__wbg_versions_c2ab80650590b6a2,__wbg_window_a4f46c98a61d4089,__wbindgen_bigint_from_i64,__wbindgen_bigint_from_u64,__wbindgen_bigint_get_as_i64,__wbindgen_boolean_get,__wbindgen_cb_drop,__wbindgen_closure_wrapper6700,__wbindgen_debug_string,__wbindgen_error_new,__wbindgen_in,__wbindgen_is_bigint,__wbindgen_is_function,__wbindgen_is_object,__wbindgen_is_string,__wbindgen_is_undefined,__wbindgen_jsval_eq,__wbindgen_jsval_loose_eq,__wbindgen_memory,__wbindgen_number_get,__wbindgen_number_new,__wbindgen_object_clone_ref,__wbindgen_object_drop_ref,__wbindgen_string_get,__wbindgen_string_new,__wbindgen_throw,debug_panic,getBuildTimeInfo}); diff --git a/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.sqlite.wasm b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.sqlite.wasm new file mode 100644 index 0000000..0d6cce1 Binary files /dev/null and b/apps/api/release/vendor/@prisma/client/runtime/query_engine_bg.sqlite.wasm differ diff --git a/apps/api/release/vendor/@prisma/client/runtime/react-native.d.ts b/apps/api/release/vendor/@prisma/client/runtime/react-native.d.ts new file mode 100644 index 0000000..d92cd02 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/react-native.d.ts @@ -0,0 +1,3403 @@ +/** + * @param this + */ +declare function $extends(this: Client, extension: ExtensionArgs | ((client: Client) => Client)): Client; + +declare type AccelerateEngineConfig = { + inlineSchema: EngineConfig['inlineSchema']; + inlineSchemaHash: EngineConfig['inlineSchemaHash']; + env: EngineConfig['env']; + generator?: { + previewFeatures: string[]; + }; + inlineDatasources: EngineConfig['inlineDatasources']; + overrideDatasources: EngineConfig['overrideDatasources']; + clientVersion: EngineConfig['clientVersion']; + engineVersion: EngineConfig['engineVersion']; + logEmitter: EngineConfig['logEmitter']; + logQueries?: EngineConfig['logQueries']; + logLevel?: EngineConfig['logLevel']; + tracingHelper: EngineConfig['tracingHelper']; + accelerateUtils?: EngineConfig['accelerateUtils']; +}; + +export declare type Action = keyof typeof DMMF.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw'; + +declare type ActiveConnectorType = Exclude; + +export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum'; + +export declare type AllModelsToStringIndex, K extends PropertyKey> = Args extends { + [P in K]: { + $allModels: infer AllModels; + }; +} ? { + [P in K]: Record; +} : {}; + +declare class AnyNull extends NullTypesEnumValue { +} + +export declare type ApplyOmit = Compute<{ + [K in keyof T as OmitValue extends true ? never : K]: T[K]; +}>; + +export declare type Args = T extends { + [K: symbol]: { + types: { + operations: { + [K in F]: { + args: any; + }; + }; + }; + }; +} ? T[symbol]['types']['operations'][F]['args'] : any; + +export declare type Args_3 = Args; + +/** + * Original `quaint::ValueType` enum tag from Prisma's `quaint`. + * Query arguments marked with this type are sanitized before being sent to the database. + * Notice while a query argument may be `null`, `ArgType` is guaranteed to be defined. + */ +declare type ArgType = 'Int32' | 'Int64' | 'Float' | 'Double' | 'Text' | 'Enum' | 'EnumArray' | 'Bytes' | 'Boolean' | 'Char' | 'Array' | 'Numeric' | 'Json' | 'Xml' | 'Uuid' | 'DateTime' | 'Date' | 'Time'; + +/** + * Attributes is a map from string to attribute values. + * + * Note: only the own enumerable keys are counted as valid attribute keys. + */ +declare interface Attributes { + [attributeKey: string]: AttributeValue | undefined; +} + +/** + * Attribute values may be any non-nullish primitive value except an object. + * + * null or undefined attribute values are invalid and will result in undefined behavior. + */ +declare type AttributeValue = string | number | boolean | Array | Array | Array; + +export declare type BaseDMMF = { + readonly datamodel: Omit; +}; + +declare type BatchArgs = { + queries: BatchQuery[]; + transaction?: { + isolationLevel?: IsolationLevel; + }; +}; + +declare type BatchInternalParams = { + requests: RequestParams[]; + customDataProxyFetch?: CustomDataProxyFetch; +}; + +declare type BatchQuery = { + model: string | undefined; + operation: string; + args: JsArgs | RawQueryArgs; +}; + +declare type BatchQueryEngineResult = QueryEngineResult | Error; + +declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise; + +declare type BatchQueryOptionsCbArgs = { + args: BatchArgs; + query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise; + __internalParams: BatchInternalParams; +}; + +declare type BatchTransactionOptions = { + isolationLevel?: Transaction_2.IsolationLevel; +}; + +declare interface BinaryTargetsEnvValue { + fromEnvVar: string | null; + value: string; + native?: boolean; +} + +export declare type Call = (F & { + params: P; +})['returns']; + +declare interface CallSite { + getLocation(): LocationInFile | null; +} + +export declare type Cast = A extends W ? A : W; + +declare type Client = ReturnType extends new () => infer T ? T : never; + +export declare type ClientArg = { + [MethodName in string]: unknown; +}; + +export declare type ClientArgs = { + client: ClientArg; +}; + +export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; + +export declare type ClientOptionDef = undefined | { + [K in string]: any; +}; + +export declare type ClientOtherOps = { + $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; + $queryRawTyped(query: TypedSql): PrismaPromise; + $queryRawUnsafe(query: string, ...values: any[]): PrismaPromise; + $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; + $executeRawUnsafe(query: string, ...values: any[]): PrismaPromise; + $runCommandRaw(command: InputJsonObject): PrismaPromise; +}; + +declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum]; + +declare const ColumnTypeEnum: { + readonly Int32: 0; + readonly Int64: 1; + readonly Float: 2; + readonly Double: 3; + readonly Numeric: 4; + readonly Boolean: 5; + readonly Character: 6; + readonly Text: 7; + readonly Date: 8; + readonly Time: 9; + readonly DateTime: 10; + readonly Json: 11; + readonly Enum: 12; + readonly Bytes: 13; + readonly Set: 14; + readonly Uuid: 15; + readonly Int32Array: 64; + readonly Int64Array: 65; + readonly FloatArray: 66; + readonly DoubleArray: 67; + readonly NumericArray: 68; + readonly BooleanArray: 69; + readonly CharacterArray: 70; + readonly TextArray: 71; + readonly DateArray: 72; + readonly TimeArray: 73; + readonly DateTimeArray: 74; + readonly JsonArray: 75; + readonly EnumArray: 76; + readonly BytesArray: 77; + readonly UuidArray: 78; + readonly UnknownNumber: 128; +}; + +export declare type Compute = T extends Function ? T : { + [K in keyof T]: T[K]; +} & unknown; + +export declare type ComputeDeep = T extends Function ? T : { + [K in keyof T]: ComputeDeep; +} & unknown; + +declare type ComputedField = { + name: string; + needs: string[]; + compute: ResultArgsFieldCompute; +}; + +declare type ComputedFieldsMap = { + [fieldName: string]: ComputedField; +}; + +declare type ConnectionInfo = { + schemaName?: string; + maxBindValues?: number; +}; + +declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | 'sqlserver' | 'cockroachdb'; + +declare interface Context { + /** + * Get a value from the context. + * + * @param key key which identifies a context value + */ + getValue(key: symbol): unknown; + /** + * Create a new context which inherits from this context and has + * the given key set to the given value. + * + * @param key context key for which to set the value + * @param value value to set for the given key + */ + setValue(key: symbol, value: unknown): Context; + /** + * Return a new context which inherits from this context but does + * not contain a value for the given key. + * + * @param key context key for which to clear a value + */ + deleteValue(key: symbol): Context; +} + +declare type Context_2 = T extends { + [K: symbol]: { + ctx: infer C; + }; +} ? C & T & { + /** + * @deprecated Use `$name` instead. + */ + name?: string; + $name?: string; + $parent?: unknown; +} : T & { + /** + * @deprecated Use `$name` instead. + */ + name?: string; + $name?: string; + $parent?: unknown; +}; + +export declare type Count = { + [K in keyof O]: Count; +} & {}; + +declare type CustomDataProxyFetch = (fetch: Fetch) => Fetch; + +declare class DataLoader { + private options; + batches: { + [key: string]: Job[]; + }; + private tickActive; + constructor(options: DataLoaderOptions); + request(request: T): Promise; + private dispatchBatches; + get [Symbol.toStringTag](): string; +} + +declare type DataLoaderOptions = { + singleLoader: (request: T) => Promise; + batchLoader: (request: T[]) => Promise; + batchBy: (request: T) => string | undefined; + batchOrder: (requestA: T, requestB: T) => number; +}; + +declare type Datasource = { + url?: string; +}; + +declare type Datasources = { + [name in string]: Datasource; +}; + +declare class DbNull extends NullTypesEnumValue { +} + +export declare const Debug: typeof debugCreate & { + enable(namespace: any): void; + disable(): any; + enabled(namespace: string): boolean; + log: (...args: string[]) => void; + formatters: {}; +}; + +/** + * Create a new debug instance with the given namespace. + * + * @example + * ```ts + * import Debug from '@prisma/debug' + * const debug = Debug('prisma:client') + * debug('Hello World') + * ``` + */ +declare function debugCreate(namespace: string): ((...args: any[]) => void) & { + color: string; + enabled: boolean; + namespace: string; + log: (...args: string[]) => void; + extend: () => void; +}; + +export declare namespace Decimal { + export type Constructor = typeof Decimal; + export type Instance = Decimal; + export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; + export type Modulo = Rounding | 9; + export type Value = string | number | Decimal; + + // http://mikemcl.github.io/decimal.js/#constructor-properties + export interface Config { + precision?: number; + rounding?: Rounding; + toExpNeg?: number; + toExpPos?: number; + minE?: number; + maxE?: number; + crypto?: boolean; + modulo?: Modulo; + defaults?: boolean; + } +} + +export declare class Decimal { + readonly d: number[]; + readonly e: number; + readonly s: number; + + constructor(n: Decimal.Value); + + absoluteValue(): Decimal; + abs(): Decimal; + + ceil(): Decimal; + + clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; + clamp(min: Decimal.Value, max: Decimal.Value): Decimal; + + comparedTo(n: Decimal.Value): number; + cmp(n: Decimal.Value): number; + + cosine(): Decimal; + cos(): Decimal; + + cubeRoot(): Decimal; + cbrt(): Decimal; + + decimalPlaces(): number; + dp(): number; + + dividedBy(n: Decimal.Value): Decimal; + div(n: Decimal.Value): Decimal; + + dividedToIntegerBy(n: Decimal.Value): Decimal; + divToInt(n: Decimal.Value): Decimal; + + equals(n: Decimal.Value): boolean; + eq(n: Decimal.Value): boolean; + + floor(): Decimal; + + greaterThan(n: Decimal.Value): boolean; + gt(n: Decimal.Value): boolean; + + greaterThanOrEqualTo(n: Decimal.Value): boolean; + gte(n: Decimal.Value): boolean; + + hyperbolicCosine(): Decimal; + cosh(): Decimal; + + hyperbolicSine(): Decimal; + sinh(): Decimal; + + hyperbolicTangent(): Decimal; + tanh(): Decimal; + + inverseCosine(): Decimal; + acos(): Decimal; + + inverseHyperbolicCosine(): Decimal; + acosh(): Decimal; + + inverseHyperbolicSine(): Decimal; + asinh(): Decimal; + + inverseHyperbolicTangent(): Decimal; + atanh(): Decimal; + + inverseSine(): Decimal; + asin(): Decimal; + + inverseTangent(): Decimal; + atan(): Decimal; + + isFinite(): boolean; + + isInteger(): boolean; + isInt(): boolean; + + isNaN(): boolean; + + isNegative(): boolean; + isNeg(): boolean; + + isPositive(): boolean; + isPos(): boolean; + + isZero(): boolean; + + lessThan(n: Decimal.Value): boolean; + lt(n: Decimal.Value): boolean; + + lessThanOrEqualTo(n: Decimal.Value): boolean; + lte(n: Decimal.Value): boolean; + + logarithm(n?: Decimal.Value): Decimal; + log(n?: Decimal.Value): Decimal; + + minus(n: Decimal.Value): Decimal; + sub(n: Decimal.Value): Decimal; + + modulo(n: Decimal.Value): Decimal; + mod(n: Decimal.Value): Decimal; + + naturalExponential(): Decimal; + exp(): Decimal; + + naturalLogarithm(): Decimal; + ln(): Decimal; + + negated(): Decimal; + neg(): Decimal; + + plus(n: Decimal.Value): Decimal; + add(n: Decimal.Value): Decimal; + + precision(includeZeros?: boolean): number; + sd(includeZeros?: boolean): number; + + round(): Decimal; + + sine() : Decimal; + sin() : Decimal; + + squareRoot(): Decimal; + sqrt(): Decimal; + + tangent() : Decimal; + tan() : Decimal; + + times(n: Decimal.Value): Decimal; + mul(n: Decimal.Value) : Decimal; + + toBinary(significantDigits?: number): string; + toBinary(significantDigits: number, rounding: Decimal.Rounding): string; + + toDecimalPlaces(decimalPlaces?: number): Decimal; + toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + toDP(decimalPlaces?: number): Decimal; + toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; + + toExponential(decimalPlaces?: number): string; + toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFixed(decimalPlaces?: number): string; + toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; + + toFraction(max_denominator?: Decimal.Value): Decimal[]; + + toHexadecimal(significantDigits?: number): string; + toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; + toHex(significantDigits?: number): string; + toHex(significantDigits: number, rounding?: Decimal.Rounding): string; + + toJSON(): string; + + toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; + + toNumber(): number; + + toOctal(significantDigits?: number): string; + toOctal(significantDigits: number, rounding: Decimal.Rounding): string; + + toPower(n: Decimal.Value): Decimal; + pow(n: Decimal.Value): Decimal; + + toPrecision(significantDigits?: number): string; + toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; + + toSignificantDigits(significantDigits?: number): Decimal; + toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; + toSD(significantDigits?: number): Decimal; + toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; + + toString(): string; + + truncated(): Decimal; + trunc(): Decimal; + + valueOf(): string; + + static abs(n: Decimal.Value): Decimal; + static acos(n: Decimal.Value): Decimal; + static acosh(n: Decimal.Value): Decimal; + static add(x: Decimal.Value, y: Decimal.Value): Decimal; + static asin(n: Decimal.Value): Decimal; + static asinh(n: Decimal.Value): Decimal; + static atan(n: Decimal.Value): Decimal; + static atanh(n: Decimal.Value): Decimal; + static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; + static cbrt(n: Decimal.Value): Decimal; + static ceil(n: Decimal.Value): Decimal; + static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; + static clone(object?: Decimal.Config): Decimal.Constructor; + static config(object: Decimal.Config): Decimal.Constructor; + static cos(n: Decimal.Value): Decimal; + static cosh(n: Decimal.Value): Decimal; + static div(x: Decimal.Value, y: Decimal.Value): Decimal; + static exp(n: Decimal.Value): Decimal; + static floor(n: Decimal.Value): Decimal; + static hypot(...n: Decimal.Value[]): Decimal; + static isDecimal(object: any): object is Decimal; + static ln(n: Decimal.Value): Decimal; + static log(n: Decimal.Value, base?: Decimal.Value): Decimal; + static log2(n: Decimal.Value): Decimal; + static log10(n: Decimal.Value): Decimal; + static max(...n: Decimal.Value[]): Decimal; + static min(...n: Decimal.Value[]): Decimal; + static mod(x: Decimal.Value, y: Decimal.Value): Decimal; + static mul(x: Decimal.Value, y: Decimal.Value): Decimal; + static noConflict(): Decimal.Constructor; // Browser only + static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; + static random(significantDigits?: number): Decimal; + static round(n: Decimal.Value): Decimal; + static set(object: Decimal.Config): Decimal.Constructor; + static sign(n: Decimal.Value): number; + static sin(n: Decimal.Value): Decimal; + static sinh(n: Decimal.Value): Decimal; + static sqrt(n: Decimal.Value): Decimal; + static sub(x: Decimal.Value, y: Decimal.Value): Decimal; + static sum(...n: Decimal.Value[]): Decimal; + static tan(n: Decimal.Value): Decimal; + static tanh(n: Decimal.Value): Decimal; + static trunc(n: Decimal.Value): Decimal; + + static readonly default?: Decimal.Constructor; + static readonly Decimal?: Decimal.Constructor; + + static readonly precision: number; + static readonly rounding: Decimal.Rounding; + static readonly toExpNeg: number; + static readonly toExpPos: number; + static readonly minE: number; + static readonly maxE: number; + static readonly crypto: boolean; + static readonly modulo: Decimal.Modulo; + + static readonly ROUND_UP: 0; + static readonly ROUND_DOWN: 1; + static readonly ROUND_CEIL: 2; + static readonly ROUND_FLOOR: 3; + static readonly ROUND_HALF_UP: 4; + static readonly ROUND_HALF_DOWN: 5; + static readonly ROUND_HALF_EVEN: 6; + static readonly ROUND_HALF_CEIL: 7; + static readonly ROUND_HALF_FLOOR: 8; + static readonly EUCLID: 9; +} + +/** + * Interface for any Decimal.js-like library + * Allows us to accept Decimal.js from different + * versions and some compatible alternatives + */ +export declare interface DecimalJsLike { + d: number[]; + e: number; + s: number; + toFixed(): string; +} + +export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>; + +export declare type DefaultSelection = Args extends { + omit: infer LocalOmit; +} ? ApplyOmit['default'], PatchFlat>>> : ApplyOmit['default'], ExtractGlobalOmit>>; + +export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void; + +declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client; + +declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$use", "$extends"]; + +export declare function deserializeJsonResponse(result: unknown): unknown; + +export declare type DevTypeMapDef = { + meta: { + modelProps: string; + }; + model: { + [Model in PropertyKey]: { + [Operation in PropertyKey]: DevTypeMapFnDef; + }; + }; + other: { + [Operation in PropertyKey]: DevTypeMapFnDef; + }; +}; + +export declare type DevTypeMapFnDef = { + args: any; + result: any; + payload: OperationPayload; +}; + +export declare namespace DMMF { + export type Document = ReadonlyDeep_2<{ + datamodel: Datamodel; + schema: Schema; + mappings: Mappings; + }>; + export type Mappings = ReadonlyDeep_2<{ + modelOperations: ModelMapping[]; + otherOperations: { + read: string[]; + write: string[]; + }; + }>; + export type OtherOperationMappings = ReadonlyDeep_2<{ + read: string[]; + write: string[]; + }>; + export type DatamodelEnum = ReadonlyDeep_2<{ + name: string; + values: EnumValue[]; + dbName?: string | null; + documentation?: string; + }>; + export type SchemaEnum = ReadonlyDeep_2<{ + name: string; + values: string[]; + }>; + export type EnumValue = ReadonlyDeep_2<{ + name: string; + dbName: string | null; + }>; + export type Datamodel = ReadonlyDeep_2<{ + models: Model[]; + enums: DatamodelEnum[]; + types: Model[]; + indexes: Index[]; + }>; + export type uniqueIndex = ReadonlyDeep_2<{ + name: string; + fields: string[]; + }>; + export type PrimaryKey = ReadonlyDeep_2<{ + name: string | null; + fields: string[]; + }>; + export type Model = ReadonlyDeep_2<{ + name: string; + dbName: string | null; + fields: Field[]; + uniqueFields: string[][]; + uniqueIndexes: uniqueIndex[]; + documentation?: string; + primaryKey: PrimaryKey | null; + isGenerated?: boolean; + }>; + export type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported'; + export type FieldNamespace = 'model' | 'prisma'; + export type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes'; + export type Field = ReadonlyDeep_2<{ + kind: FieldKind; + name: string; + isRequired: boolean; + isList: boolean; + isUnique: boolean; + isId: boolean; + isReadOnly: boolean; + isGenerated?: boolean; + isUpdatedAt?: boolean; + /** + * Describes the data type in the same the way it is defined in the Prisma schema: + * BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName + */ + type: string; + dbName?: string | null; + hasDefaultValue: boolean; + default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[]; + relationFromFields?: string[]; + relationToFields?: string[]; + relationOnDelete?: string; + relationName?: string; + documentation?: string; + }>; + export type FieldDefault = ReadonlyDeep_2<{ + name: string; + args: any[]; + }>; + export type FieldDefaultScalar = string | boolean | number; + export type Index = ReadonlyDeep_2<{ + model: string; + type: IndexType; + isDefinedOnField: boolean; + name?: string; + dbName?: string; + algorithm?: string; + clustered?: boolean; + fields: IndexField[]; + }>; + export type IndexType = 'id' | 'normal' | 'unique' | 'fulltext'; + export type IndexField = ReadonlyDeep_2<{ + name: string; + sortOrder?: SortOrder; + length?: number; + operatorClass?: string; + }>; + export type SortOrder = 'asc' | 'desc'; + export type Schema = ReadonlyDeep_2<{ + rootQueryType?: string; + rootMutationType?: string; + inputObjectTypes: { + model?: InputType[]; + prisma: InputType[]; + }; + outputObjectTypes: { + model: OutputType[]; + prisma: OutputType[]; + }; + enumTypes: { + model?: SchemaEnum[]; + prisma: SchemaEnum[]; + }; + fieldRefTypes: { + prisma?: FieldRefType[]; + }; + }>; + export type Query = ReadonlyDeep_2<{ + name: string; + args: SchemaArg[]; + output: QueryOutput; + }>; + export type QueryOutput = ReadonlyDeep_2<{ + name: string; + isRequired: boolean; + isList: boolean; + }>; + export type TypeRef = { + isList: boolean; + type: string; + location: AllowedLocations; + namespace?: FieldNamespace; + }; + export type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>; + export type SchemaArg = ReadonlyDeep_2<{ + name: string; + comment?: string; + isNullable: boolean; + isRequired: boolean; + inputTypes: InputTypeRef[]; + deprecation?: Deprecation; + }>; + export type OutputType = ReadonlyDeep_2<{ + name: string; + fields: SchemaField[]; + }>; + export type SchemaField = ReadonlyDeep_2<{ + name: string; + isNullable?: boolean; + outputType: OutputTypeRef; + args: SchemaArg[]; + deprecation?: Deprecation; + documentation?: string; + }>; + export type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>; + export type Deprecation = ReadonlyDeep_2<{ + sinceVersion: string; + reason: string; + plannedRemovalVersion?: string; + }>; + export type InputType = ReadonlyDeep_2<{ + name: string; + constraints: { + maxNumFields: number | null; + minNumFields: number | null; + fields?: string[]; + }; + meta?: { + source?: string; + }; + fields: SchemaArg[]; + }>; + export type FieldRefType = ReadonlyDeep_2<{ + name: string; + allowTypes: FieldRefAllowType[]; + fields: SchemaArg[]; + }>; + export type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>; + export type ModelMapping = ReadonlyDeep_2<{ + model: string; + plural: string; + findUnique?: string | null; + findUniqueOrThrow?: string | null; + findFirst?: string | null; + findFirstOrThrow?: string | null; + findMany?: string | null; + create?: string | null; + createMany?: string | null; + createManyAndReturn?: string | null; + update?: string | null; + updateMany?: string | null; + upsert?: string | null; + delete?: string | null; + deleteMany?: string | null; + aggregate?: string | null; + groupBy?: string | null; + count?: string | null; + findRaw?: string | null; + aggregateRaw?: string | null; + }>; + export enum ModelAction { + findUnique = "findUnique", + findUniqueOrThrow = "findUniqueOrThrow", + findFirst = "findFirst", + findFirstOrThrow = "findFirstOrThrow", + findMany = "findMany", + create = "create", + createMany = "createMany", + createManyAndReturn = "createManyAndReturn", + update = "update", + updateMany = "updateMany", + upsert = "upsert", + delete = "delete", + deleteMany = "deleteMany", + groupBy = "groupBy", + count = "count",// TODO: count does not actually exist, why? + aggregate = "aggregate", + findRaw = "findRaw", + aggregateRaw = "aggregateRaw" + } +} + +export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF.Datamodel): RuntimeDataModel; + +export declare interface DriverAdapter extends Queryable { + /** + * Starts new transaction. + */ + transactionContext(): Promise>; + /** + * Optional method that returns extra connection info + */ + getConnectionInfo?(): Result_4; +} + +/** Client */ +export declare type DynamicClientExtensionArgs, ClientOptions> = { + [P in keyof C_]: unknown; +} & { + [K: symbol]: { + ctx: Optional, ITXClientDenyList> & { + $parent: Optional, ITXClientDenyList>; + }; + }; +}; + +export declare type DynamicClientExtensionThis, ClientOptions> = { + [P in keyof ExtArgs['client']]: Return; +} & { + [P in Exclude]: DynamicModelExtensionThis, ExtArgs, ClientOptions>; +} & { + [P in Exclude]: P extends keyof ClientOtherOps ? ClientOtherOps[P] : never; +} & { + [P in Exclude]: DynamicClientExtensionThisBuiltin[P]; +} & { + [K: symbol]: { + types: TypeMap['other']; + }; +}; + +export declare type DynamicClientExtensionThisBuiltin, ClientOptions> = { + $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs, Call, ClientOptions>; + $transaction

[]>(arg: [...P], options?: { + isolationLevel?: TypeMap['meta']['txIsolationLevel']; + }): Promise>; + $transaction(fn: (client: Omit, ITXClientDenyList>) => Promise, options?: { + maxWait?: number; + timeout?: number; + isolationLevel?: TypeMap['meta']['txIsolationLevel']; + }): Promise; + $disconnect(): Promise; + $connect(): Promise; +}; + +/** Model */ +export declare type DynamicModelExtensionArgs, ClientOptions> = { + [K in keyof M_]: K extends '$allModels' ? { + [P in keyof M_[K]]?: unknown; + } & { + [K: symbol]: {}; + } : K extends TypeMap['meta']['modelProps'] ? { + [P in keyof M_[K]]?: unknown; + } & { + [K: symbol]: { + ctx: DynamicModelExtensionThis, ExtArgs, ClientOptions> & { + $parent: DynamicClientExtensionThis; + } & { + $name: ModelKey; + } & { + /** + * @deprecated Use `$name` instead. + */ + name: ModelKey; + }; + }; + } : never; +}; + +export declare type DynamicModelExtensionFluentApi = { + [K in keyof TypeMap['model'][M]['payload']['objects']]: (args?: Exact>) => PrismaPromise, [K]> | Null> & DynamicModelExtensionFluentApi, ClientOptions>; +}; + +export declare type DynamicModelExtensionFnResult = P extends FluentOperation ? DynamicModelExtensionFluentApi & PrismaPromise | Null> : PrismaPromise>; + +export declare type DynamicModelExtensionFnResultBase = GetResult; + +export declare type DynamicModelExtensionFnResultNull

= P extends 'findUnique' | 'findFirst' ? null : never; + +export declare type DynamicModelExtensionOperationFn = {} extends TypeMap['model'][M]['operations'][P]['args'] ? (args?: Exact) => DynamicModelExtensionFnResult, ClientOptions> : (args: Exact) => DynamicModelExtensionFnResult, ClientOptions>; + +export declare type DynamicModelExtensionThis, ClientOptions> = { + [P in keyof ExtArgs['model'][Uncapitalize]]: Return][P]>; +} & { + [P in Exclude]>]: DynamicModelExtensionOperationFn; +} & { + [P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize]>]: TypeMap['model'][M]['fields']; +} & { + [K: symbol]: { + types: TypeMap['model'][M]; + }; +}; + +/** Query */ +export declare type DynamicQueryExtensionArgs = { + [K in keyof Q_]: K extends '$allOperations' ? (args: { + model?: string; + operation: string; + args: any; + query: (args: any) => PrismaPromise; + }) => Promise : K extends '$allModels' ? { + [P in keyof Q_[K] | keyof TypeMap['model'][keyof TypeMap['model']]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb : P extends keyof TypeMap['model'][keyof TypeMap['model']]['operations'] ? DynamicQueryExtensionCb : never; + } : K extends TypeMap['meta']['modelProps'] ? { + [P in keyof Q_[K] | keyof TypeMap['model'][ModelKey]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb, keyof TypeMap['model'][ModelKey]['operations']> : P extends keyof TypeMap['model'][ModelKey]['operations'] ? DynamicQueryExtensionCb, P> : never; + } : K extends keyof TypeMap['other']['operations'] ? DynamicQueryExtensionCb<[TypeMap], 0, 'other', K> : never; +}; + +export declare type DynamicQueryExtensionCb = >(args: A) => Promise; + +export declare type DynamicQueryExtensionCbArgs = (_1 extends unknown ? _2 extends unknown ? { + args: DynamicQueryExtensionCbArgsArgs; + model: _0 extends 0 ? undefined : _1; + operation: _2; + query: >(args: A) => PrismaPromise; +} : never : never) & { + query: (args: DynamicQueryExtensionCbArgsArgs) => PrismaPromise; +}; + +export declare type DynamicQueryExtensionCbArgsArgs = _2 extends '$queryRaw' | '$executeRaw' ? Sql : TypeMap[_0][_1]['operations'][_2]['args']; + +/** Result */ +export declare type DynamicResultExtensionArgs = { + [K in keyof R_]: { + [P in keyof R_[K]]?: { + needs?: DynamicResultExtensionNeeds, R_[K][P]>; + compute(data: DynamicResultExtensionData, R_[K][P]>): any; + }; + }; +}; + +export declare type DynamicResultExtensionData = GetFindResult; + +export declare type DynamicResultExtensionNeeds = { + [K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never; +} & { + [N in keyof TypeMap['model'][M]['payload']['scalars']]?: boolean; +}; + +/** + * Placeholder value for "no text". + */ +export declare const empty: Sql; + +export declare type EmptyToUnknown = T; + +declare interface Engine { + /** The name of the engine. This is meant to be consumed externally */ + readonly name: string; + onBeforeExit(callback: () => Promise): void; + start(): Promise; + stop(): Promise; + version(forceRun?: boolean): Promise | string; + request(query: JsonQuery, options: RequestOptions_2): Promise>; + requestBatch(queries: JsonQuery[], options: RequestBatchOptions): Promise[]>; + transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise>; + transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; + transaction(action: 'rollback', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; + metrics(options: MetricsOptionsJson): Promise; + metrics(options: MetricsOptionsPrometheus): Promise; + applyPendingMigrations(): Promise; +} + +declare interface EngineConfig { + cwd: string; + dirname: string; + datamodelPath: string; + enableDebugLogs?: boolean; + allowTriggerPanic?: boolean; + prismaPath?: string; + generator?: GeneratorConfig; + overrideDatasources: Datasources; + showColors?: boolean; + logQueries?: boolean; + logLevel?: 'info' | 'warn'; + env: Record; + flags?: string[]; + clientVersion: string; + engineVersion: string; + previewFeatures?: string[]; + engineEndpoint?: string; + activeProvider?: string; + logEmitter: LogEmitter; + transactionOptions: Transaction_2.Options; + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`. + * If set, this is only used in the library engine, and all queries would be performed through it, + * rather than Prisma's Rust drivers. + * @remarks only used by LibraryEngine.ts + */ + adapter?: ErrorCapturingDriverAdapter; + /** + * The contents of the schema encoded into a string + * @remarks only used by DataProxyEngine.ts + */ + inlineSchema: string; + /** + * The contents of the datasource url saved in a string + * @remarks only used by DataProxyEngine.ts + */ + inlineDatasources: GetPrismaClientConfig['inlineDatasources']; + /** + * The string hash that was produced for a given schema + * @remarks only used by DataProxyEngine.ts + */ + inlineSchemaHash: string; + /** + * The helper for interaction with OTEL tracing + * @remarks enabling is determined by the client and @prisma/instrumentation package + */ + tracingHelper: TracingHelper; + /** + * Information about whether we have not found a schema.prisma file in the + * default location, and that we fell back to finding the schema.prisma file + * in the current working directory. This usually means it has been bundled. + */ + isBundled?: boolean; + /** + * Web Assembly module loading configuration + */ + engineWasm?: WasmLoadingConfig; + /** + * Allows Accelerate to use runtime utilities from the client. These are + * necessary for the AccelerateEngine to function correctly. + */ + accelerateUtils?: { + resolveDatasourceUrl: typeof resolveDatasourceUrl; + getBatchRequestPayload: typeof getBatchRequestPayload; + prismaGraphQLToJSError: typeof prismaGraphQLToJSError; + PrismaClientUnknownRequestError: typeof PrismaClientUnknownRequestError; + PrismaClientInitializationError: typeof PrismaClientInitializationError; + PrismaClientKnownRequestError: typeof PrismaClientKnownRequestError; + debug: (...args: any[]) => void; + engineVersion: string; + clientVersion: string; + }; +} + +declare type EngineEvent = E extends QueryEventType ? QueryEvent : LogEvent; + +declare type EngineEventType = QueryEventType | LogEventType; + +declare type EngineProtocol = 'graphql' | 'json'; + +declare type EngineSpan = { + span: boolean; + name: string; + trace_id: string; + span_id: string; + parent_span_id: string; + start_time: [number, number]; + end_time: [number, number]; + attributes?: Record; + links?: { + trace_id: string; + span_id: string; + }[]; + kind: EngineSpanKind; +}; + +declare type EngineSpanEvent = { + span: boolean; + spans: EngineSpan[]; +}; + +declare type EngineSpanKind = 'client' | 'internal'; + +declare type EnvPaths = { + rootEnvPath: string | null; + schemaEnvPath: string | undefined; +}; + +declare interface EnvValue { + fromEnvVar: null | string; + value: null | string; +} + +export declare type Equals = (() => T extends A ? 1 : 2) extends (() => T extends B ? 1 : 2) ? 1 : 0; + +declare type Error_2 = { + kind: 'GenericJs'; + id: number; +} | { + kind: 'UnsupportedNativeDataType'; + type: string; +} | { + kind: 'Postgres'; + code: string; + severity: string; + message: string; + detail: string | undefined; + column: string | undefined; + hint: string | undefined; +} | { + kind: 'Mysql'; + code: number; + message: string; + state: string; +} | { + kind: 'Sqlite'; + /** + * Sqlite extended error code: https://www.sqlite.org/rescode.html + */ + extendedCode: number; + message: string; +}; + +declare interface ErrorCapturingDriverAdapter extends DriverAdapter { + readonly errorRegistry: ErrorRegistry; +} + +declare type ErrorFormat = 'pretty' | 'colorless' | 'minimal'; + +declare type ErrorRecord = { + error: unknown; +}; + +declare interface ErrorRegistry { + consumeError(id: number): ErrorRecord | undefined; +} + +declare interface ErrorWithBatchIndex { + batchRequestIdx?: number; +} + +declare type EventCallback = [E] extends ['beforeExit'] ? () => Promise : [E] extends [LogLevel] ? (event: EngineEvent) => void : never; + +export declare type Exact = (A extends unknown ? (W extends A ? { + [K in keyof A]: Exact; +} : W) : never) | (A extends Narrowable ? A : never); + +/** + * Defines Exception. + * + * string or an object with one of (message or name or code) and optional stack + */ +declare type Exception = ExceptionWithCode | ExceptionWithMessage | ExceptionWithName | string; + +declare interface ExceptionWithCode { + code: string | number; + name?: string; + message?: string; + stack?: string; +} + +declare interface ExceptionWithMessage { + code?: string | number; + message: string; + name?: string; + stack?: string; +} + +declare interface ExceptionWithName { + code?: string | number; + message?: string; + name: string; + stack?: string; +} + +declare type ExtendedEventType = LogLevel | 'beforeExit'; + +declare type ExtendedSpanOptions = SpanOptions & { + /** The name of the span */ + name: string; + internal?: boolean; + middleware?: boolean; + /** Whether it propagates context (?=true) */ + active?: boolean; + /** The context to append the span to */ + context?: Context; +}; + +/** $extends, defineExtension */ +export declare interface ExtendsHook, TypeMap extends TypeMapDef = Call, ClientOptions = {}> { + extArgs: ExtArgs; + , MergedArgs extends InternalArgs = MergeExtArgs>(extension: ((client: DynamicClientExtensionThis) => { + $extends: { + extArgs: Args; + }; + }) | { + name?: string; + query?: DynamicQueryExtensionArgs; + result?: DynamicResultExtensionArgs & R; + model?: DynamicModelExtensionArgs & M; + client?: DynamicClientExtensionArgs & C; + }): { + extends: DynamicClientExtensionThis, TypeMapCb, MergedArgs, ClientOptions>; + define: (client: any) => { + $extends: { + extArgs: Args; + }; + }; + }[Variant]; +} + +export declare type ExtensionArgs = Optional; + +declare namespace Extensions { + export { + defineExtension, + getExtensionContext + } +} +export { Extensions } + +declare namespace Extensions_2 { + export { + InternalArgs, + DefaultArgs, + GetPayloadResultExtensionKeys, + GetPayloadResultExtensionObject, + GetPayloadResult, + GetSelect, + GetOmit, + DynamicQueryExtensionArgs, + DynamicQueryExtensionCb, + DynamicQueryExtensionCbArgs, + DynamicQueryExtensionCbArgsArgs, + DynamicResultExtensionArgs, + DynamicResultExtensionNeeds, + DynamicResultExtensionData, + DynamicModelExtensionArgs, + DynamicModelExtensionThis, + DynamicModelExtensionOperationFn, + DynamicModelExtensionFnResult, + DynamicModelExtensionFnResultBase, + DynamicModelExtensionFluentApi, + DynamicModelExtensionFnResultNull, + DynamicClientExtensionArgs, + DynamicClientExtensionThis, + ClientBuiltInProp, + DynamicClientExtensionThisBuiltin, + ExtendsHook, + MergeExtArgs, + AllModelsToStringIndex, + TypeMapDef, + DevTypeMapDef, + DevTypeMapFnDef, + ClientOptionDef, + ClientOtherOps, + TypeMapCbDef, + ModelKey, + RequiredExtensionArgs as UserArgs + } +} + +export declare type ExtractGlobalOmit = Options extends { + omit: { + [K in ModelName]: infer GlobalOmit; + }; +} ? GlobalOmit : {}; + +declare type Fetch = typeof nodeFetch; + +/** + * A reference to a specific field of a specific model + */ +export declare interface FieldRef { + readonly modelName: Model; + readonly name: string; + readonly typeName: FieldType; + readonly isList: boolean; +} + +export declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete'; + +export declare interface Fn { + params: Params; + returns: Returns; +} + +declare interface GeneratorConfig { + name: string; + output: EnvValue | null; + isCustomOutput?: boolean; + provider: EnvValue; + config: { + /** `output` is a reserved name and will only be available directly at `generator.output` */ + output?: never; + /** `provider` is a reserved name and will only be available directly at `generator.provider` */ + provider?: never; + /** `binaryTargets` is a reserved name and will only be available directly at `generator.binaryTargets` */ + binaryTargets?: never; + /** `previewFeatures` is a reserved name and will only be available directly at `generator.previewFeatures` */ + previewFeatures?: never; + } & { + [key: string]: string | string[] | undefined; + }; + binaryTargets: BinaryTargetsEnvValue[]; + previewFeatures: string[]; + envPaths?: EnvPaths; + sourceFilePath: string; +} + +export declare type GetAggregateResult

= { + [K in keyof A as K extends Aggregate ? K : never]: K extends '_count' ? A[K] extends true ? number : Count : { + [J in keyof A[K] & string]: P['scalars'][J] | null; + }; +}; + +declare function getBatchRequestPayload(batch: JsonQuery[], transaction?: TransactionOptions_2): QueryEngineBatchRequest; + +export declare type GetBatchResult = { + count: number; +}; + +export declare type GetCountResult = A extends { + select: infer S; +} ? (S extends true ? number : Count) : number; + +declare function getExtensionContext(that: T): Context_2; + +export declare type GetFindResult

= Equals extends 1 ? DefaultSelection : A extends { + select: infer S extends object; +} & Record | { + include: infer I extends object; +} & Record ? { + [K in keyof S | keyof I as (S & I)[K] extends false | undefined | Skip | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult | SelectField & null : never : K extends '_count' ? Count> : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection | SelectField & null : never : P extends { + scalars: { + [k in K]: infer O; + }; + } ? O : K extends '_count' ? Count : never; +} & (A extends { + include: any; +} & Record ? DefaultSelection : unknown) : DefaultSelection; + +export declare type GetGroupByResult

= A extends { + by: string[]; +} ? Array & { + [K in A['by'][number]]: P['scalars'][K]; +}> : A extends { + by: string; +} ? Array & { + [K in A['by']]: P['scalars'][K]; +}> : {}[]; + +export declare type GetOmit = { + [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean | ExtraType; +}; + +export declare type GetPayloadResult, R extends InternalArgs['result'][string]> = Omit> & GetPayloadResultExtensionObject; + +export declare type GetPayloadResultExtensionKeys = KR; + +export declare type GetPayloadResultExtensionObject = { + [K in GetPayloadResultExtensionKeys]: R[K] extends () => { + compute: (...args: any) => infer C; + } ? C : never; +}; + +export declare function getPrismaClient(config: GetPrismaClientConfig): { + new (optionsArg?: PrismaClientOptions): { + _originalClient: any; + _runtimeDataModel: RuntimeDataModel; + _requestHandler: RequestHandler; + _connectionPromise?: Promise | undefined; + _disconnectionPromise?: Promise | undefined; + _engineConfig: EngineConfig; + _accelerateEngineConfig: AccelerateEngineConfig; + _clientVersion: string; + _errorFormat: ErrorFormat; + _tracingHelper: TracingHelper; + _metrics: MetricsClient; + _middlewares: MiddlewareHandler; + _previewFeatures: string[]; + _activeProvider: string; + _globalOmit?: GlobalOmitOptions | undefined; + _extensions: MergedExtensionsList; + _engine: Engine; + /** + * A fully constructed/applied Client that references the parent + * PrismaClient. This is used for Client extensions only. + */ + _appliedParent: any; + _createPrismaPromise: PrismaPromiseFactory; + /** + * Hook a middleware into the client + * @param middleware to hook + */ + $use(middleware: QueryMiddleware): void; + $on(eventType: E, callback: EventCallback): void; + $connect(): Promise; + /** + * Disconnect from the database + */ + $disconnect(): Promise; + /** + * Executes a raw query and always returns a number + */ + $executeRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; + /** + * Executes a raw query provided through a safe tag function + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; + /** + * Unsafe counterpart of `$executeRaw` that is susceptible to SQL injections + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; + /** + * Executes a raw command only for MongoDB + * + * @param command + * @returns + */ + $runCommandRaw(command: Record): PrismaPromise_2; + /** + * Executes a raw query and returns selected data + */ + $queryRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; + /** + * Executes a raw query provided through a safe tag function + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; + /** + * Counterpart to $queryRaw, that returns strongly typed results + * @param typedSql + */ + $queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2; + /** + * Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections + * @see https://github.com/prisma/prisma/issues/7142 + * + * @param query + * @param values + * @returns + */ + $queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; + /** + * Execute a batch of requests in a transaction + * @param requests + * @param options + */ + _transactionWithArray({ promises, options, }: { + promises: Array>; + options?: BatchTransactionOptions; + }): Promise; + /** + * Perform a long-running transaction + * @param callback + * @param options + * @returns + */ + _transactionWithCallback({ callback, options, }: { + callback: (client: Client) => Promise; + options?: Options; + }): Promise; + _createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client; + /** + * Execute queries within a transaction + * @param input a callback or a query list + * @param options to set timeouts (callback) + * @returns + */ + $transaction(input: any, options?: any): Promise; + /** + * Runs the middlewares over params before executing a request + * @param internalParams + * @returns + */ + _request(internalParams: InternalRequestParams): Promise; + _executeRequest({ args, clientMethod, dataPath, callsite, action, model, argsMapper, transaction, unpacker, otelParentCtx, customDataProxyFetch, }: InternalRequestParams): Promise; + readonly $metrics: MetricsClient; + /** + * Shortcut for checking a preview flag + * @param feature preview flag + * @returns + */ + _hasPreviewFlag(feature: string): boolean; + $applyPendingMigrations(): Promise; + $extends: typeof $extends; + readonly [Symbol.toStringTag]: string; + }; +}; + +/** + * Config that is stored into the generated client. When the generated client is + * loaded, this same config is passed to {@link getPrismaClient} which creates a + * closure with that config around a non-instantiated [[PrismaClient]]. + */ +declare type GetPrismaClientConfig = { + runtimeDataModel: RuntimeDataModel; + generator?: GeneratorConfig; + relativeEnvPaths: { + rootEnvPath?: string | null; + schemaEnvPath?: string | null; + }; + relativePath: string; + dirname: string; + filename?: string; + clientVersion: string; + engineVersion: string; + datasourceNames: string[]; + activeProvider: ActiveConnectorType; + /** + * The contents of the schema encoded into a string + * @remarks only used for the purpose of data proxy + */ + inlineSchema: string; + /** + * A special env object just for the data proxy edge runtime. + * Allows bundlers to inject their own env variables (Vercel). + * Allows platforms to declare global variables as env (Workers). + * @remarks only used for the purpose of data proxy + */ + injectableEdgeEnv?: () => LoadedEnv; + /** + * The contents of the datasource url saved in a string. + * This can either be an env var name or connection string. + * It is needed by the client to connect to the Data Proxy. + * @remarks only used for the purpose of data proxy + */ + inlineDatasources: { + [name in string]: { + url: EnvValue; + }; + }; + /** + * The string hash that was produced for a given schema + * @remarks only used for the purpose of data proxy + */ + inlineSchemaHash: string; + /** + * A marker to indicate that the client was not generated via `prisma + * generate` but was generated via `generate --postinstall` script instead. + * @remarks used to error for Vercel/Netlify for schema caching issues + */ + postinstall?: boolean; + /** + * Information about the CI where the Prisma Client has been generated. The + * name of the CI environment is stored at generation time because CI + * information is not always available at runtime. Moreover, the edge client + * has no notion of environment variables, so this works around that. + * @remarks used to error for Vercel/Netlify for schema caching issues + */ + ciName?: string; + /** + * Information about whether we have not found a schema.prisma file in the + * default location, and that we fell back to finding the schema.prisma file + * in the current working directory. This usually means it has been bundled. + */ + isBundled?: boolean; + /** + * A boolean that is `false` when the client was generated with --no-engine. At + * runtime, this means the client will be bound to be using the Data Proxy. + */ + copyEngine?: boolean; + /** + * Optional wasm loading configuration + */ + engineWasm?: WasmLoadingConfig; +}; + +export declare type GetResult = { + findUnique: GetFindResult | null; + findUniqueOrThrow: GetFindResult; + findFirst: GetFindResult | null; + findFirstOrThrow: GetFindResult; + findMany: GetFindResult[]; + create: GetFindResult; + createMany: GetBatchResult; + createManyAndReturn: GetFindResult[]; + update: GetFindResult; + updateMany: GetBatchResult; + upsert: GetFindResult; + delete: GetFindResult; + deleteMany: GetBatchResult; + aggregate: GetAggregateResult; + count: GetCountResult; + groupBy: GetGroupByResult; + $queryRaw: unknown; + $queryRawTyped: unknown; + $executeRaw: number; + $queryRawUnsafe: unknown; + $executeRawUnsafe: number; + $runCommandRaw: JsonObject; + findRaw: JsonObject; + aggregateRaw: JsonObject; +}[OperationName]; + +export declare function getRuntime(): GetRuntimeOutput; + +declare type GetRuntimeOutput = { + id: Runtime; + prettyName: string; + isEdge: boolean; +}; + +export declare type GetSelect, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = { + [K in KR | keyof Base]?: K extends KR ? boolean : Base[K]; +}; + +declare type GlobalOmitOptions = { + [modelName: string]: { + [fieldName: string]: boolean; + }; +}; + +declare type HandleErrorParams = { + args: JsArgs; + error: any; + clientMethod: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + modelName?: string; + globalOmit?: GlobalOmitOptions; +}; + +/** + * Defines High-Resolution Time. + * + * The first number, HrTime[0], is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. + * The second number, HrTime[1], represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. + * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. + * The first number is calculated by converting and truncating the Epoch time in milliseconds to seconds: + * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. + * The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: + * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000. + * This is represented in HrTime format as [1609504210, 150000000]. + */ +declare type HrTime = [number, number]; + +/** + * Matches a JSON array. + * Unlike \`JsonArray\`, readonly arrays are assignable to this type. + */ +export declare interface InputJsonArray extends ReadonlyArray { +} + +/** + * Matches a JSON object. + * Unlike \`JsonObject\`, this type allows undefined and read-only properties. + */ +export declare type InputJsonObject = { + readonly [Key in string]?: InputJsonValue | null; +}; + +/** + * Matches any valid value that can be used as an input for operations like + * create and update as the value of a JSON field. Unlike \`JsonValue\`, this + * type allows read-only arrays and read-only object properties and disallows + * \`null\` at the top level. + * + * \`null\` cannot be used as the value of a JSON field because its meaning + * would be ambiguous. Use \`Prisma.JsonNull\` to store the JSON null value or + * \`Prisma.DbNull\` to clear the JSON value and set the field to the database + * NULL value instead. + * + * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values + */ +export declare type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray | { + toJSON(): unknown; +}; + +declare type InteractiveTransactionInfo = { + /** + * Transaction ID returned by the query engine. + */ + id: string; + /** + * Arbitrary payload the meaning of which depends on the `Engine` implementation. + * For example, `DataProxyEngine` needs to associate different API endpoints with transactions. + * In `LibraryEngine` and `BinaryEngine` it is currently not used. + */ + payload: Payload; +}; + +declare type InteractiveTransactionOptions = Transaction_2.InteractiveTransactionInfo; + +export declare type InternalArgs = { + result: { + [K in keyof R]: { + [P in keyof R[K]]: () => R[K][P]; + }; + }; + model: { + [K in keyof M]: { + [P in keyof M[K]]: () => M[K][P]; + }; + }; + query: { + [K in keyof Q]: { + [P in keyof Q[K]]: () => Q[K][P]; + }; + }; + client: { + [K in keyof C]: () => C[K]; + }; +}; + +declare type InternalRequestParams = { + /** + * The original client method being called. + * Even though the rootField / operation can be changed, + * this method stays as it is, as it's what the user's + * code looks like + */ + clientMethod: string; + /** + * Name of js model that triggered the request. Might be used + * for warnings or error messages + */ + jsModelName?: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + unpacker?: Unpacker; + otelParentCtx?: Context; + /** Used to "desugar" a user input into an "expanded" one */ + argsMapper?: (args?: UserArgs_2) => UserArgs_2; + /** Used to convert args for middleware and back */ + middlewareArgsMapper?: MiddlewareArgsMapper; + /** Used for Accelerate client extension via Data Proxy */ + customDataProxyFetch?: (fetch: Fetch) => Fetch; +} & Omit; + +declare enum IsolationLevel { + ReadUncommitted = "ReadUncommitted", + ReadCommitted = "ReadCommitted", + RepeatableRead = "RepeatableRead", + Snapshot = "Snapshot", + Serializable = "Serializable" +} + +declare function isSkip(value: unknown): value is Skip; + +export declare function isTypedSql(value: unknown): value is UnknownTypedSql; + +export declare type ITXClientDenyList = (typeof denylist)[number]; + +export declare const itxClientDenyList: readonly (string | symbol)[]; + +declare interface Job { + resolve: (data: any) => void; + reject: (data: any) => void; + request: any; +} + +/** + * Create a SQL query for a list of values. + */ +export declare function join(values: readonly RawValue[], separator?: string, prefix?: string, suffix?: string): Sql; + +export declare type JsArgs = { + select?: Selection_2; + include?: Selection_2; + omit?: Omission; + [argName: string]: JsInputValue; +}; + +export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef | JsInputValue[] | Skip | { + [key: string]: JsInputValue; +}; + +declare type JsonArgumentValue = number | string | boolean | null | RawTaggedValue | JsonArgumentValue[] | { + [key: string]: JsonArgumentValue; +}; + +/** + * From https://github.com/sindresorhus/type-fest/ + * Matches a JSON array. + */ +export declare interface JsonArray extends Array { +} + +export declare type JsonBatchQuery = { + batch: JsonQuery[]; + transaction?: { + isolationLevel?: Transaction_2.IsolationLevel; + }; +}; + +export declare interface JsonConvertible { + toJSON(): unknown; +} + +declare type JsonFieldSelection = { + arguments?: Record | RawTaggedValue; + selection: JsonSelectionSet; +}; + +declare class JsonNull extends NullTypesEnumValue { +} + +/** + * From https://github.com/sindresorhus/type-fest/ + * Matches a JSON object. + * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. + */ +export declare type JsonObject = { + [Key in string]?: JsonValue; +}; + +export declare type JsonQuery = { + modelName?: string; + action: JsonQueryAction; + query: JsonFieldSelection; +}; + +declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'createManyAndReturn' | 'updateOne' | 'updateMany' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw'; + +declare type JsonSelectionSet = { + $scalars?: boolean; + $composites?: boolean; +} & { + [fieldName: string]: boolean | JsonFieldSelection; +}; + +/** + * From https://github.com/sindresorhus/type-fest/ + * Matches any valid JSON value. + */ +export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null; + +export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | { + [key: string]: JsOutputValue; +}; + +export declare type JsPromise = Promise & {}; + +declare type KnownErrorParams = { + code: string; + clientVersion: string; + meta?: Record; + batchRequestIdx?: number; +}; + +/** + * A pointer from the current {@link Span} to another span in the same trace or + * in a different trace. + * Few examples of Link usage. + * 1. Batch Processing: A batch of elements may contain elements associated + * with one or more traces/spans. Since there can only be one parent + * SpanContext, Link is used to keep reference to SpanContext of all + * elements in the batch. + * 2. Public Endpoint: A SpanContext in incoming client request on a public + * endpoint is untrusted from service provider perspective. In such case it + * is advisable to start a new trace with appropriate sampling decision. + * However, it is desirable to associate incoming SpanContext to new trace + * initiated on service provider side so two traces (from Client and from + * Service Provider) can be correlated. + */ +declare interface Link { + /** The {@link SpanContext} of a linked span. */ + context: SpanContext; + /** A set of {@link SpanAttributes} on the link. */ + attributes?: SpanAttributes; + /** Count of attributes of the link that were dropped due to collection limits */ + droppedAttributesCount?: number; +} + +declare type LoadedEnv = { + message?: string; + parsed: { + [x: string]: string; + }; +} | undefined; + +declare type LocationInFile = { + fileName: string; + lineNumber: number | null; + columnNumber: number | null; +}; + +declare type LogDefinition = { + level: LogLevel; + emit: 'stdout' | 'event'; +}; + +/** + * Typings for the events we emit. + * + * @remarks + * If this is updated, our edge runtime shim needs to be updated as well. + */ +declare type LogEmitter = { + on(event: E, listener: (event: EngineEvent) => void): LogEmitter; + emit(event: QueryEventType, payload: QueryEvent): boolean; + emit(event: LogEventType, payload: LogEvent): boolean; +}; + +declare type LogEvent = { + timestamp: Date; + message: string; + target: string; +}; + +declare type LogEventType = 'info' | 'warn' | 'error'; + +declare type LogLevel = 'info' | 'query' | 'warn' | 'error'; + +/** + * Generates more strict variant of an enum which, unlike regular enum, + * throws on non-existing property access. This can be useful in following situations: + * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input + * - enum values are generated dynamically from DMMF. + * + * In that case, if using normal enums and no compile-time typechecking, using non-existing property + * will result in `undefined` value being used, which will be accepted. Using strict enum + * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. + * + * Note: if you need to check for existence of a value in the enum you can still use either + * `in` operator or `hasOwnProperty` function. + * + * @param definition + * @returns + */ +export declare function makeStrictEnum>(definition: T): T; + +export declare function makeTypedQueryFactory(sql: string): (...values: any[]) => TypedSql; + +/** + * Class that holds the list of all extensions, applied to particular instance, + * as well as resolved versions of the components that need to apply on + * different levels. Main idea of this class: avoid re-resolving as much of the + * stuff as possible when new extensions are added while also delaying the + * resolve until the point it is actually needed. For example, computed fields + * of the model won't be resolved unless the model is actually queried. Neither + * adding extensions with `client` component only cause other components to + * recompute. + */ +declare class MergedExtensionsList { + private head?; + private constructor(); + static empty(): MergedExtensionsList; + static single(extension: ExtensionArgs): MergedExtensionsList; + isEmpty(): boolean; + append(extension: ExtensionArgs): MergedExtensionsList; + getAllComputedFields(dmmfModelName: string): ComputedFieldsMap | undefined; + getAllClientExtensions(): ClientArg | undefined; + getAllModelExtensions(dmmfModelName: string): ModelArg | undefined; + getAllQueryCallbacks(jsModelName: string, operation: string): any; + getAllBatchQueryCallbacks(): BatchQueryOptionsCb[]; +} + +export declare type MergeExtArgs, Args extends Record> = ComputeDeep & AllModelsToStringIndex>; + +export declare type Metric = { + key: string; + value: T; + labels: Record; + description: string; +}; + +export declare type MetricHistogram = { + buckets: MetricHistogramBucket[]; + sum: number; + count: number; +}; + +export declare type MetricHistogramBucket = [maxValue: number, count: number]; + +export declare type Metrics = { + counters: Metric[]; + gauges: Metric[]; + histograms: Metric[]; +}; + +export declare class MetricsClient { + private _engine; + constructor(engine: Engine); + /** + * Returns all metrics gathered up to this point in prometheus format. + * Result of this call can be exposed directly to prometheus scraping endpoint + * + * @param options + * @returns + */ + prometheus(options?: MetricsOptions): Promise; + /** + * Returns all metrics gathered up to this point in prometheus format. + * + * @param options + * @returns + */ + json(options?: MetricsOptions): Promise; +} + +declare type MetricsOptions = { + /** + * Labels to add to every metrics in key-value format + */ + globalLabels?: Record; +}; + +declare type MetricsOptionsCommon = { + globalLabels?: Record; +}; + +declare type MetricsOptionsJson = { + format: 'json'; +} & MetricsOptionsCommon; + +declare type MetricsOptionsPrometheus = { + format: 'prometheus'; +} & MetricsOptionsCommon; + +declare type MiddlewareArgsMapper = { + requestArgsToMiddlewareArgs(requestArgs: RequestArgs): MiddlewareArgs; + middlewareArgsToRequestArgs(middlewareArgs: MiddlewareArgs): RequestArgs; +}; + +declare class MiddlewareHandler { + private _middlewares; + use(middleware: M): void; + get(id: number): M | undefined; + has(id: number): boolean; + length(): number; +} + +export declare type ModelArg = { + [MethodName in string]: unknown; +}; + +export declare type ModelArgs = { + model: { + [ModelName in string]: ModelArg; + }; +}; + +export declare type ModelKey = M extends keyof TypeMap['model'] ? M : Capitalize; + +export declare type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise; + +export declare type ModelQueryOptionsCbArgs = { + model: string; + operation: string; + args: JsArgs; + query: (args: JsArgs) => Promise; +}; + +export declare type NameArgs = { + name?: string; +}; + +export declare type Narrow = { + [K in keyof A]: A[K] extends Function ? A[K] : Narrow; +} | (A extends Narrowable ? A : never); + +export declare type Narrowable = string | number | bigint | boolean | []; + +export declare type NeverToUnknown = [T] extends [never] ? unknown : T; + +/** + * Imitates `fetch` via `https` to only suit our needs, it does nothing more. + * This is because we cannot bundle `node-fetch` as it uses many other Node.js + * utilities, while also bloating our bundles. This approach is much leaner. + * @param url + * @param options + * @returns + */ +declare function nodeFetch(url: string, options?: RequestOptions): Promise; + +declare class NodeHeaders { + readonly headers: Map; + constructor(init?: Record); + append(name: string, value: string): void; + delete(name: string): void; + get(name: string): string | null; + has(name: string): boolean; + set(name: string, value: string): void; + forEach(callbackfn: (value: string, key: string, parent: this) => void, thisArg?: any): void; +} + +/** + * @deprecated Please don´t rely on type checks to this error anymore. + * This will become a regular `PrismaClientKnownRequestError` with code `P2025` + * in the future major version of the client. + * Instead of `error instanceof Prisma.NotFoundError` use `error.code === "P2025"`. + */ +export declare class NotFoundError extends PrismaClientKnownRequestError { + constructor(message: string, clientVersion: string); +} + +declare class NullTypesEnumValue extends ObjectEnumValue { + _getNamespace(): string; +} + +/** + * List of Prisma enums that must use unique objects instead of strings as their values. + */ +export declare const objectEnumNames: string[]; + +/** + * Base class for unique values of object-valued enums. + */ +export declare abstract class ObjectEnumValue { + constructor(arg?: symbol); + abstract _getNamespace(): string; + _getName(): string; + toString(): string; +} + +export declare const objectEnumValues: { + classes: { + DbNull: typeof DbNull; + JsonNull: typeof JsonNull; + AnyNull: typeof AnyNull; + }; + instances: { + DbNull: DbNull; + JsonNull: JsonNull; + AnyNull: AnyNull; + }; +}; + +declare const officialPrismaAdapters: readonly ["@prisma/adapter-planetscale", "@prisma/adapter-neon", "@prisma/adapter-libsql", "@prisma/adapter-d1", "@prisma/adapter-pg", "@prisma/adapter-pg-worker"]; + +export declare type Omission = Record; + +declare type Omit_2 = { + [P in keyof T as P extends K ? never : P]: T[P]; +}; +export { Omit_2 as Omit } + +export declare type OmitValue = Key extends keyof Omit ? Omit[Key] : false; + +export declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; + +export declare type OperationPayload = { + name: string; + scalars: { + [ScalarName in string]: unknown; + }; + objects: { + [ObjectName in string]: unknown; + }; + composites: { + [CompositeName in string]: unknown; + }; +}; + +export declare type Optional = { + [P in K & keyof O]?: O[P]; +} & { + [P in Exclude]: O[P]; +}; + +export declare type OptionalFlat = { + [K in keyof T]?: T[K]; +}; + +export declare type OptionalKeys = { + [K in keyof O]-?: {} extends Pick_2 ? K : never; +}[keyof O]; + +declare type Options = { + maxWait?: number; + timeout?: number; + isolationLevel?: IsolationLevel; +}; + +declare type Options_2 = { + clientVersion: string; +}; + +export declare type Or = { + 0: { + 0: 0; + 1: 1; + }; + 1: { + 0: 1; + 1: 1; + }; +}[A][B]; + +export declare type PatchFlat = O1 & Omit_2; + +export declare type Path = O extends unknown ? P extends [infer K, ...infer R] ? K extends keyof O ? Path : Default : O : never; + +export declare type Payload = T extends { + [K: symbol]: { + types: { + payload: any; + }; + }; +} ? T[symbol]['types']['payload'] : any; + +export declare type PayloadToResult = RenameAndNestPayloadKeys

> = { + [K in keyof O]?: O[K][K] extends any[] ? PayloadToResult[] : O[K][K] extends object ? PayloadToResult : O[K][K]; +}; + +declare type Pick_2 = { + [P in keyof T as P extends K ? P : never]: T[P]; +}; +export { Pick_2 as Pick } + +export declare class PrismaClientInitializationError extends Error { + clientVersion: string; + errorCode?: string; + retryable?: boolean; + constructor(message: string, clientVersion: string, errorCode?: string); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientKnownRequestError extends Error implements ErrorWithBatchIndex { + code: string; + meta?: Record; + clientVersion: string; + batchRequestIdx?: number; + constructor(message: string, { code, clientVersion, meta, batchRequestIdx }: KnownErrorParams); + get [Symbol.toStringTag](): string; +} + +export declare type PrismaClientOptions = { + /** + * Overwrites the primary datasource url from your schema.prisma file + */ + datasourceUrl?: string; + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale. + */ + adapter?: DriverAdapter | null; + /** + * Overwrites the datasource url from your schema.prisma file + */ + datasources?: Datasources; + /** + * @default "colorless" + */ + errorFormat?: ErrorFormat; + /** + * The default values for Transaction options + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: Transaction_2.Options; + /** + * @example + * \`\`\` + * // Defaults to stdout + * log: ['query', 'info', 'warn'] + * + * // Emit as events + * log: [ + * { emit: 'stdout', level: 'query' }, + * { emit: 'stdout', level: 'info' }, + * { emit: 'stdout', level: 'warn' } + * ] + * \`\`\` + * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). + */ + log?: Array; + omit?: GlobalOmitOptions; + /** + * @internal + * You probably don't want to use this. \`__internal\` is used by internal tooling. + */ + __internal?: { + debug?: boolean; + engine?: { + cwd?: string; + binaryPath?: string; + endpoint?: string; + allowTriggerPanic?: boolean; + }; + /** This can be used for testing purposes */ + configOverride?: (config: GetPrismaClientConfig) => GetPrismaClientConfig; + }; +}; + +export declare class PrismaClientRustPanicError extends Error { + clientVersion: string; + constructor(message: string, clientVersion: string); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientUnknownRequestError extends Error implements ErrorWithBatchIndex { + clientVersion: string; + batchRequestIdx?: number; + constructor(message: string, { clientVersion, batchRequestIdx }: UnknownErrorParams); + get [Symbol.toStringTag](): string; +} + +export declare class PrismaClientValidationError extends Error { + name: string; + clientVersion: string; + constructor(message: string, { clientVersion }: Options_2); + get [Symbol.toStringTag](): string; +} + +declare function prismaGraphQLToJSError({ error, user_facing_error }: RequestError, clientVersion: string, activeProvider: string): PrismaClientKnownRequestError | PrismaClientUnknownRequestError; + +export declare interface PrismaPromise extends Promise { + [Symbol.toStringTag]: 'PrismaPromise'; +} + +/** + * Prisma's `Promise` that is backwards-compatible. All additions on top of the + * original `Promise` are optional so that it can be backwards-compatible. + * @see [[createPrismaPromise]] + */ +declare interface PrismaPromise_2 extends Promise { + /** + * Extension of the original `.then` function + * @param onfulfilled same as regular promises + * @param onrejected same as regular promises + * @param transaction transaction options + */ + then(onfulfilled?: (value: A) => R1 | PromiseLike, onrejected?: (error: unknown) => R2 | PromiseLike, transaction?: PrismaPromiseTransaction): Promise; + /** + * Extension of the original `.catch` function + * @param onrejected same as regular promises + * @param transaction transaction options + */ + catch(onrejected?: ((reason: any) => R | PromiseLike) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; + /** + * Extension of the original `.finally` function + * @param onfinally same as regular promises + * @param transaction transaction options + */ + finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; + /** + * Called when executing a batch of regular tx + * @param transaction transaction options for batch tx + */ + requestTransaction?(transaction: PrismaPromiseBatchTransaction): PromiseLike; +} + +declare type PrismaPromiseBatchTransaction = { + kind: 'batch'; + id: number; + isolationLevel?: IsolationLevel; + index: number; + lock: PromiseLike; +}; + +declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => PrismaPromise_2; + +/** + * Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which + * is essentially a proxy for `Promise`. All the transaction-compatible client + * methods return one, this allows for pre-preparing queries without executing + * them until `.then` is called. It's the foundation of Prisma's query batching. + * @param callback that will be wrapped within our promise implementation + * @see [[PrismaPromise]] + * @returns + */ +declare type PrismaPromiseFactory = (callback: PrismaPromiseCallback) => PrismaPromise_2; + +declare type PrismaPromiseInteractiveTransaction = { + kind: 'itx'; + id: string; + payload: PayloadType; +}; + +declare type PrismaPromiseTransaction = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction; + +export declare const PrivateResultType: unique symbol; + +declare namespace Public { + export { + validator + } +} +export { Public } + +declare namespace Public_2 { + export { + Args, + Result, + Payload, + PrismaPromise, + Operation, + Exact + } +} + +declare type Query = { + sql: string; + args: Array; + argTypes: Array; +}; + +declare interface Queryable { + readonly provider: 'mysql' | 'postgres' | 'sqlite'; + readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {}); + /** + * Execute a query given as SQL, interpolating the given parameters, + * and returning the type-aware result set of the query. + * + * This is the preferred way of executing `SELECT` queries. + */ + queryRaw(params: Query): Promise>; + /** + * Execute a query given as SQL, interpolating the given parameters, + * and returning the number of affected rows. + * + * This is the preferred way of executing `INSERT`, `UPDATE`, `DELETE` queries, + * as well as transactional queries. + */ + executeRaw(params: Query): Promise>; +} + +declare type QueryEngineBatchGraphQLRequest = { + batch: QueryEngineRequest[]; + transaction?: boolean; + isolationLevel?: Transaction_2.IsolationLevel; +}; + +declare type QueryEngineBatchRequest = QueryEngineBatchGraphQLRequest | JsonBatchQuery; + +declare type QueryEngineConfig = { + datamodel: string; + configDir: string; + logQueries: boolean; + ignoreEnvVarErrors: boolean; + datasourceOverrides: Record; + env: Record; + logLevel: QueryEngineLogLevel; + telemetry?: QueryEngineTelemetry; + engineProtocol: EngineProtocol; +}; + +declare interface QueryEngineConstructor { + new (config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingDriverAdapter): QueryEngineInstance; +} + +declare type QueryEngineInstance = { + connect(headers: string): Promise; + disconnect(headers: string): Promise; + /** + * @param requestStr JSON.stringified `QueryEngineRequest | QueryEngineBatchRequest` + * @param headersStr JSON.stringified `QueryEngineRequestHeaders` + */ + query(requestStr: string, headersStr: string, transactionId?: string): Promise; + sdlSchema(): Promise; + dmmf(traceparent: string): Promise; + startTransaction(options: string, traceHeaders: string): Promise; + commitTransaction(id: string, traceHeaders: string): Promise; + rollbackTransaction(id: string, traceHeaders: string): Promise; + metrics(options: string): Promise; + applyPendingMigrations(): Promise; +}; + +declare type QueryEngineLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'off'; + +declare type QueryEngineRequest = { + query: string; + variables: Object; +}; + +declare type QueryEngineResult = { + data: T; + elapsed: number; +}; + +declare type QueryEngineTelemetry = { + enabled: Boolean; + endpoint: string; +}; + +declare type QueryEvent = { + timestamp: Date; + query: string; + params: string; + duration: number; + target: string; +}; + +declare type QueryEventType = 'query'; + +declare type QueryMiddleware = (params: QueryMiddlewareParams, next: (params: QueryMiddlewareParams) => Promise) => Promise; + +declare type QueryMiddlewareParams = { + /** The model this is executed on */ + model?: string; + /** The action that is being handled */ + action: Action; + /** TODO what is this */ + dataPath: string[]; + /** TODO what is this */ + runInTransaction: boolean; + args?: UserArgs_2; +}; + +export declare type QueryOptions = { + query: { + [ModelName in string]: { + [ModelAction in string]: ModelQueryOptionsCb; + } | QueryOptionsCb; + }; +}; + +export declare type QueryOptionsCb = (args: QueryOptionsCbArgs) => Promise; + +export declare type QueryOptionsCbArgs = { + model?: string; + operation: string; + args: JsArgs | RawQueryArgs; + query: (args: JsArgs | RawQueryArgs) => Promise; +}; + +/** + * Create raw SQL statement. + */ +export declare function raw(value: string): Sql; + +export declare type RawParameters = { + __prismaRawParameters__: true; + values: string; +}; + +export declare type RawQueryArgs = Sql | UnknownTypedSql | [query: string, ...values: RawValue[]]; + +declare type RawTaggedValue = { + $type: 'Raw'; + value: unknown; +}; + +/** + * Supported value or SQL instance. + */ +export declare type RawValue = Value | Sql; + +export declare type ReadonlyDeep = { + readonly [K in keyof T]: ReadonlyDeep; +}; + +declare type ReadonlyDeep_2 = { + +readonly [K in keyof O]: ReadonlyDeep_2; +}; + +declare type Record_2 = { + [P in T]: U; +}; +export { Record_2 as Record } + +export declare type RenameAndNestPayloadKeys

= { + [K in keyof P as K extends 'scalars' | 'objects' | 'composites' ? keyof P[K] : never]: P[K]; +}; + +declare type RequestBatchOptions = { + transaction?: TransactionOptions_2; + traceparent?: string; + numTry?: number; + containsWrite: boolean; + customDataProxyFetch?: (fetch: Fetch) => Fetch; +}; + +declare interface RequestError { + error: string; + user_facing_error: { + is_panic: boolean; + message: string; + meta?: Record; + error_code?: string; + batch_request_idx?: number; + }; +} + +declare class RequestHandler { + client: Client; + dataloader: DataLoader; + private logEmitter?; + constructor(client: Client, logEmitter?: LogEmitter); + request(params: RequestParams): Promise; + mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResult): any; + /** + * Handles the error and logs it, logging the error is done synchronously waiting for the event + * handlers to finish. + */ + handleAndLogRequestError(params: HandleErrorParams): never; + handleRequestError({ error, clientMethod, callsite, transaction, args, modelName, globalOmit, }: HandleErrorParams): never; + sanitizeMessage(message: any): any; + unpack(data: unknown, dataPath: string[], unpacker?: Unpacker): any; + get [Symbol.toStringTag](): string; +} + +declare type RequestOptions = { + method?: string; + headers?: Record; + body?: string; +}; + +declare type RequestOptions_2 = { + traceparent?: string; + numTry?: number; + interactiveTransaction?: InteractiveTransactionOptions; + isWrite: boolean; + customDataProxyFetch?: (fetch: Fetch) => Fetch; +}; + +declare type RequestParams = { + modelName?: string; + action: Action; + protocolQuery: JsonQuery; + dataPath: string[]; + clientMethod: string; + callsite?: CallSite; + transaction?: PrismaPromiseTransaction; + extensions: MergedExtensionsList; + args?: any; + headers?: Record; + unpacker?: Unpacker; + otelParentCtx?: Context; + otelChildCtx?: Context; + globalOmit?: GlobalOmitOptions; + customDataProxyFetch?: (fetch: Fetch) => Fetch; +}; + +declare type RequestResponse = { + ok: boolean; + url: string; + statusText?: string; + status: number; + headers: NodeHeaders; + text: () => Promise; + json: () => Promise; +}; + +declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions; +export { RequiredExtensionArgs } +export { RequiredExtensionArgs as UserArgs } + +export declare type RequiredKeys = { + [K in keyof O]-?: {} extends Pick_2 ? never : K; +}[keyof O]; + +declare function resolveDatasourceUrl({ inlineDatasources, overrideDatasources, env, clientVersion, }: { + inlineDatasources: GetPrismaClientConfig['inlineDatasources']; + overrideDatasources: Datasources; + env: Record; + clientVersion: string; +}): string; + +export declare type Result = T extends { + [K: symbol]: { + types: { + payload: any; + }; + }; +} ? GetResult : GetResult<{ + composites: {}; + objects: {}; + scalars: {}; + name: ''; +}, {}, F>; + +export declare type Result_2 = Result; + +declare namespace Result_3 { + export { + Operation, + FluentOperation, + Count, + GetFindResult, + SelectablePayloadFields, + SelectField, + DefaultSelection, + UnwrapPayload, + ApplyOmit, + OmitValue, + GetCountResult, + Aggregate, + GetAggregateResult, + GetBatchResult, + GetGroupByResult, + GetResult, + ExtractGlobalOmit + } +} + +declare type Result_4 = { + map(fn: (value: T) => U): Result_4; + flatMap(fn: (value: T) => Result_4): Result_4; +} & ({ + readonly ok: true; + readonly value: T; +} | { + readonly ok: false; + readonly error: Error_2; +}); + +export declare type ResultArg = { + [FieldName in string]: ResultFieldDefinition; +}; + +export declare type ResultArgs = { + result: { + [ModelName in string]: ResultArg; + }; +}; + +export declare type ResultArgsFieldCompute = (model: any) => unknown; + +export declare type ResultFieldDefinition = { + needs?: { + [FieldName in string]: boolean; + }; + compute: ResultArgsFieldCompute; +}; + +declare interface ResultSet { + /** + * List of column types appearing in a database query, in the same order as `columnNames`. + * They are used within the Query Engine to convert values from JS to Quaint values. + */ + columnTypes: Array; + /** + * List of column names appearing in a database query, in the same order as `columnTypes`. + */ + columnNames: Array; + /** + * List of rows retrieved from a database query. + * Each row is a list of values, whose length matches `columnNames` and `columnTypes`. + */ + rows: Array>; + /** + * The last ID of an `INSERT` statement, if any. + * This is required for `AUTO_INCREMENT` columns in databases based on MySQL and SQLite. + */ + lastInsertId?: string; +} + +export declare type Return = T extends (...args: any[]) => infer R ? R : T; + +declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown"; + +export declare type RuntimeDataModel = { + readonly models: Record; + readonly enums: Record; + readonly types: Record; +}; + +declare type RuntimeEnum = Omit; + +declare type RuntimeModel = Omit; + +export declare type Select = T extends U ? T : never; + +export declare type SelectablePayloadFields = { + objects: { + [k in K]: O; + }; +} | { + composites: { + [k in K]: O; + }; +}; + +export declare type SelectField

, K extends PropertyKey> = P extends { + objects: Record; +} ? P['objects'][K] : P extends { + composites: Record; +} ? P['composites'][K] : never; + +declare type Selection_2 = Record; +export { Selection_2 as Selection } + +export declare function serializeJsonQuery({ modelName, action, args, runtimeDataModel, extensions, callsite, clientMethod, errorFormat, clientVersion, previewFeatures, globalOmit, }: SerializeParams): JsonQuery; + +declare type SerializeParams = { + runtimeDataModel: RuntimeDataModel; + modelName?: string; + action: Action; + args?: JsArgs; + extensions?: MergedExtensionsList; + callsite?: CallSite; + clientMethod: string; + clientVersion: string; + errorFormat: ErrorFormat; + previewFeatures: string[]; + globalOmit?: GlobalOmitOptions; +}; + +declare class Skip { + constructor(param?: symbol); + ifUndefined(value: T | undefined): T | Skip; +} + +export declare const skip: Skip; + +/** + * An interface that represents a span. A span represents a single operation + * within a trace. Examples of span might include remote procedure calls or a + * in-process function calls to sub-components. A Trace has a single, top-level + * "root" Span that in turn may have zero or more child Spans, which in turn + * may have children. + * + * Spans are created by the {@link Tracer.startSpan} method. + */ +declare interface Span { + /** + * Returns the {@link SpanContext} object associated with this Span. + * + * Get an immutable, serializable identifier for this span that can be used + * to create new child spans. Returned SpanContext is usable even after the + * span ends. + * + * @returns the SpanContext object associated with this Span. + */ + spanContext(): SpanContext; + /** + * Sets an attribute to the span. + * + * Sets a single Attribute with the key and value passed as arguments. + * + * @param key the key for this attribute. + * @param value the value for this attribute. Setting a value null or + * undefined is invalid and will result in undefined behavior. + */ + setAttribute(key: string, value: SpanAttributeValue): this; + /** + * Sets attributes to the span. + * + * @param attributes the attributes that will be added. + * null or undefined attribute values + * are invalid and will result in undefined behavior. + */ + setAttributes(attributes: SpanAttributes): this; + /** + * Adds an event to the Span. + * + * @param name the name of the event. + * @param [attributesOrStartTime] the attributes that will be added; these are + * associated with this event. Can be also a start time + * if type is {@type TimeInput} and 3rd param is undefined + * @param [startTime] start time of the event. + */ + addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this; + /** + * Adds a single link to the span. + * + * Links added after the creation will not affect the sampling decision. + * It is preferred span links be added at span creation. + * + * @param link the link to add. + */ + addLink(link: Link): this; + /** + * Adds multiple links to the span. + * + * Links added after the creation will not affect the sampling decision. + * It is preferred span links be added at span creation. + * + * @param links the links to add. + */ + addLinks(links: Link[]): this; + /** + * Sets a status to the span. If used, this will override the default Span + * status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value + * of previous calls to SetStatus on the Span. + * + * @param status the SpanStatus to set. + */ + setStatus(status: SpanStatus): this; + /** + * Updates the Span name. + * + * This will override the name provided via {@link Tracer.startSpan}. + * + * Upon this update, any sampling behavior based on Span name will depend on + * the implementation. + * + * @param name the Span name. + */ + updateName(name: string): this; + /** + * Marks the end of Span execution. + * + * Call to End of a Span MUST not have any effects on child spans. Those may + * still be running and can be ended later. + * + * Do not return `this`. The Span generally should not be used after it + * is ended so chaining is not desired in this context. + * + * @param [endTime] the time to set as Span's end time. If not provided, + * use the current time as the span's end time. + */ + end(endTime?: TimeInput): void; + /** + * Returns the flag whether this span will be recorded. + * + * @returns true if this Span is active and recording information like events + * with the `AddEvent` operation and attributes using `setAttributes`. + */ + isRecording(): boolean; + /** + * Sets exception as a span event + * @param exception the exception the only accepted values are string or Error + * @param [time] the time to set as Span's event time. If not provided, + * use the current time. + */ + recordException(exception: Exception, time?: TimeInput): void; +} + +/** + * @deprecated please use {@link Attributes} + */ +declare type SpanAttributes = Attributes; + +/** + * @deprecated please use {@link AttributeValue} + */ +declare type SpanAttributeValue = AttributeValue; + +declare type SpanCallback = (span?: Span, context?: Context) => R; + +/** + * A SpanContext represents the portion of a {@link Span} which must be + * serialized and propagated along side of a {@link Baggage}. + */ +declare interface SpanContext { + /** + * The ID of the trace that this span belongs to. It is worldwide unique + * with practically sufficient probability by being made as 16 randomly + * generated bytes, encoded as a 32 lowercase hex characters corresponding to + * 128 bits. + */ + traceId: string; + /** + * The ID of the Span. It is globally unique with practically sufficient + * probability by being made as 8 randomly generated bytes, encoded as a 16 + * lowercase hex characters corresponding to 64 bits. + */ + spanId: string; + /** + * Only true if the SpanContext was propagated from a remote parent. + */ + isRemote?: boolean; + /** + * Trace flags to propagate. + * + * It is represented as 1 byte (bitmap). Bit to represent whether trace is + * sampled or not. When set, the least significant bit documents that the + * caller may have recorded trace data. A caller who does not record trace + * data out-of-band leaves this flag unset. + * + * see {@link TraceFlags} for valid flag values. + */ + traceFlags: number; + /** + * Tracing-system-specific info to propagate. + * + * The tracestate field value is a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * More Info: https://www.w3.org/TR/trace-context/#tracestate-field + * + * Examples: + * Single tracing system (generic format): + * tracestate: rojo=00f067aa0ba902b7 + * Multiple tracing systems (with different formatting): + * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE + */ + traceState?: TraceState; +} + +declare enum SpanKind { + /** Default value. Indicates that the span is used internally. */ + INTERNAL = 0, + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote request. + */ + SERVER = 1, + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + */ + CLIENT = 2, + /** + * Indicates that the span describes producer sending a message to a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + PRODUCER = 3, + /** + * Indicates that the span describes consumer receiving a message from a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + CONSUMER = 4 +} + +/** + * Options needed for span creation + */ +declare interface SpanOptions { + /** + * The SpanKind of a span + * @default {@link SpanKind.INTERNAL} + */ + kind?: SpanKind; + /** A span's attributes */ + attributes?: SpanAttributes; + /** {@link Link}s span to other spans */ + links?: Link[]; + /** A manually specified start time for the created `Span` object. */ + startTime?: TimeInput; + /** The new span should be a root span. (Ignore parent from context). */ + root?: boolean; +} + +declare interface SpanStatus { + /** The status code of this message. */ + code: SpanStatusCode; + /** A developer-facing error message. */ + message?: string; +} + +/** + * An enumeration of status codes. + */ +declare enum SpanStatusCode { + /** + * The default status. + */ + UNSET = 0, + /** + * The operation has been validated by an Application developer or + * Operator to have completed successfully. + */ + OK = 1, + /** + * The operation contains an error. + */ + ERROR = 2 +} + +/** + * A SQL instance can be nested within each other to build SQL strings. + */ +export declare class Sql { + readonly values: Value[]; + readonly strings: string[]; + constructor(rawStrings: readonly string[], rawValues: readonly RawValue[]); + get sql(): string; + get statement(): string; + get text(): string; + inspect(): { + sql: string; + statement: string; + text: string; + values: unknown[]; + }; +} + +/** + * Create a SQL object from a template string. + */ +export declare function sqltag(strings: readonly string[], ...values: readonly RawValue[]): Sql; + +/** + * Defines TimeInput. + * + * hrtime, epoch milliseconds, performance.now() or Date + */ +declare type TimeInput = HrTime | number | Date; + +export declare type ToTuple = T extends any[] ? T : [T]; + +declare interface TraceState { + /** + * Create a new TraceState which inherits from this TraceState and has the + * given key set. + * The new entry will always be added in the front of the list of states. + * + * @param key key of the TraceState entry. + * @param value value of the TraceState entry. + */ + set(key: string, value: string): TraceState; + /** + * Return a new TraceState which inherits from this TraceState but does not + * contain the given key. + * + * @param key the key for the TraceState entry to be removed. + */ + unset(key: string): TraceState; + /** + * Returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + * + * @param key with which the specified value is to be associated. + * @returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + */ + get(key: string): string | undefined; + /** + * Serializes the TraceState to a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * + * @returns the serialized string. + */ + serialize(): string; +} + +declare interface TracingHelper { + isEnabled(): boolean; + getTraceParent(context?: Context): string; + createEngineSpan(engineSpanEvent: EngineSpanEvent): void; + getActiveContext(): Context | undefined; + runInChildSpan(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback): R; +} + +declare interface Transaction extends Queryable { + /** + * Transaction options. + */ + readonly options: TransactionOptions; + /** + * Commit the transaction. + */ + commit(): Promise>; + /** + * Rolls back the transaction. + */ + rollback(): Promise>; +} + +declare namespace Transaction_2 { + export { + IsolationLevel, + Options, + InteractiveTransactionInfo, + TransactionHeaders + } +} + +declare interface TransactionContext extends Queryable { + /** + * Starts new transaction. + */ + startTransaction(): Promise>; +} + +declare type TransactionHeaders = { + traceparent?: string; +}; + +declare type TransactionOptions = { + usePhantomQuery: boolean; +}; + +declare type TransactionOptions_2 = { + kind: 'itx'; + options: InteractiveTransactionOptions; +} | { + kind: 'batch'; + options: BatchTransactionOptions; +}; + +export declare class TypedSql { + [PrivateResultType]: Result; + constructor(sql: string, values: Values); + get sql(): string; + get values(): Values; +} + +export declare type TypeMapCbDef = Fn<{ + extArgs: InternalArgs; + clientOptions: ClientOptionDef; +}, TypeMapDef>; + +/** Shared */ +export declare type TypeMapDef = Record; + +declare namespace Types { + export { + Result_3 as Result, + Extensions_2 as Extensions, + Utils, + Public_2 as Public, + isSkip, + Skip, + skip, + UnknownTypedSql, + OperationPayload as Payload + } +} +export { Types } + +declare type UnknownErrorParams = { + clientVersion: string; + batchRequestIdx?: number; +}; + +export declare type UnknownTypedSql = TypedSql; + +declare type Unpacker = (data: any) => any; + +export declare type UnwrapPayload

= {} extends P ? unknown : { + [K in keyof P]: P[K] extends { + scalars: infer S; + composites: infer C; + }[] ? Array> : P[K] extends { + scalars: infer S; + composites: infer C; + } | null ? S & UnwrapPayload | Select : never; +}; + +export declare type UnwrapPromise

= P extends Promise ? R : P; + +export declare type UnwrapTuple = { + [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise ? X : UnwrapPromise : UnwrapPromise; +}; + +/** + * Input that flows from the user into the Client. + */ +declare type UserArgs_2 = any; + +declare namespace Utils { + export { + EmptyToUnknown, + NeverToUnknown, + PatchFlat, + Omit_2 as Omit, + Pick_2 as Pick, + ComputeDeep, + Compute, + OptionalFlat, + ReadonlyDeep, + Narrowable, + Narrow, + Exact, + Cast, + Record_2 as Record, + UnwrapPromise, + UnwrapTuple, + Path, + Fn, + Call, + RequiredKeys, + OptionalKeys, + Optional, + Return, + ToTuple, + RenameAndNestPayloadKeys, + PayloadToResult, + Select, + Equals, + Or, + JsPromise + } +} + +declare function validator(): (select: Exact) => S; + +declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; + +declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; + +/** + * Values supported by SQL engine. + */ +export declare type Value = unknown; + +export declare function warnEnvConflicts(envPaths: any): void; + +export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void; + +declare type WasmLoadingConfig = { + /** + * WASM-bindgen runtime for corresponding module + */ + getRuntime: () => { + __wbg_set_wasm(exports: unknown): any; + QueryEngine: QueryEngineConstructor; + }; + /** + * Loads the raw wasm module for the wasm query engine. This configuration is + * generated specifically for each type of client, eg. Node.js client and Edge + * clients will have different implementations. + * @remarks this is a callback on purpose, we only load the wasm if needed. + * @remarks only used by LibraryEngine.ts + */ + getQueryEngineWasmModule: () => Promise; +}; + +export { } diff --git a/apps/api/release/vendor/@prisma/client/runtime/react-native.js b/apps/api/release/vendor/@prisma/client/runtime/react-native.js new file mode 100644 index 0000000..e542e40 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/react-native.js @@ -0,0 +1,80 @@ +"use strict";var aa=Object.create;var tr=Object.defineProperty;var la=Object.getOwnPropertyDescriptor;var ua=Object.getOwnPropertyNames;var ca=Object.getPrototypeOf,pa=Object.prototype.hasOwnProperty;var Le=(e,t)=>()=>(e&&(t=e(e=0)),t);var ge=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Pt=(e,t)=>{for(var r in t)tr(e,r,{get:t[r],enumerable:!0})},Hn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ua(t))!pa.call(e,i)&&i!==r&&tr(e,i,{get:()=>t[i],enumerable:!(n=la(t,i))||n.enumerable});return e};var he=(e,t,r)=>(r=e!=null?aa(ca(e)):{},Hn(t||!e||!e.__esModule?tr(r,"default",{value:e,enumerable:!0}):r,e)),da=e=>Hn(tr({},"__esModule",{value:!0}),e);var y,c=Le(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var x,p=Le(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=Le(()=>{"use strict";E=()=>{};E.prototype=E});var b,f=Le(()=>{"use strict";b=class{constructor(t){this.value=t}deref(){return this.value}}});var mi=ge(tt=>{"use strict";m();c();p();d();f();var ei=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fa=ei(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=S;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var F=C.indexOf("=");F===-1&&(F=A);var _=F===A?0:4-F%4;return[F,_]}function l(C){var A=a(C),F=A[0],_=A[1];return(F+_)*3/4-_}function u(C,A,F){return(A+F)*3/4-F}function g(C){var A,F=a(C),_=F[0],N=F[1],M=new n(u(C,_,N)),O=0,Y=N>0?_-4:_,q;for(q=0;q>16&255,M[O++]=A>>8&255,M[O++]=A&255;return N===2&&(A=r[C.charCodeAt(q)]<<2|r[C.charCodeAt(q+1)]>>4,M[O++]=A&255),N===1&&(A=r[C.charCodeAt(q)]<<10|r[C.charCodeAt(q+1)]<<4|r[C.charCodeAt(q+2)]>>2,M[O++]=A>>8&255,M[O++]=A&255),M}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function P(C,A,F){for(var _,N=[],M=A;MY?Y:O+M));return _===1?(A=C[F-1],N.push(t[A>>2]+t[A<<4&63]+"==")):_===2&&(A=(C[F-2]<<8)+C[F-1],N.push(t[A>>10]+t[A>>4&63]+t[A<<2&63]+"=")),N.join("")}}),ma=ei(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,P=n?o-1:0,S=n?-1:1,C=t[r+P];for(P+=S,s=C&(1<<-h)-1,C>>=-h,h+=l;h>0;s=s*256+t[r+P],P+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+P],P+=S,h-=8);if(s===0)s=1-g;else{if(s===u)return a?NaN:(C?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(C?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,u,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:s-1,A=i?1:-1,F=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+P>=1?r+=S/u:r+=S*Math.pow(2,1-P),r*u>=2&&(a++,u/=2),a+P>=h?(l=0,a=h):a+P>=1?(l=(r*u-1)*Math.pow(2,o),a=a+P):(l=r*Math.pow(2,P-1)*Math.pow(2,o),a=0));o>=8;t[n+C]=l&255,C+=A,l/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=A,a/=256,g-=8);t[n+C-A]|=F*128}}),Gr=fa(),Xe=ma(),zn=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;tt.Buffer=T;tt.SlowBuffer=Ea;tt.INSPECT_MAX_BYTES=50;var rr=2147483647;tt.kMaxLength=rr;T.TYPED_ARRAY_SUPPORT=ga();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function ga(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function Oe(e){if(e>rr)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Hr(e)}return ti(e,t,r)}T.poolSize=8192;function ti(e,t,r){if(typeof e=="string")return ya(e,t);if(ArrayBuffer.isView(e))return wa(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ye(e,ArrayBuffer)||e&&ye(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(e,SharedArrayBuffer)||e&&ye(e.buffer,SharedArrayBuffer)))return ni(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=ba(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return ti(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function ri(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ha(e,t,r){return ri(e),e<=0?Oe(e):t!==void 0?typeof r=="string"?Oe(e).fill(t,r):Oe(e).fill(t):Oe(e)}T.alloc=function(e,t,r){return ha(e,t,r)};function Hr(e){return ri(e),Oe(e<0?0:zr(e)|0)}T.allocUnsafe=function(e){return Hr(e)};T.allocUnsafeSlow=function(e){return Hr(e)};function ya(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=ii(e,t)|0,n=Oe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Wr(e){let t=e.length<0?0:zr(e.length)|0,r=Oe(t);for(let n=0;n=rr)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+rr.toString(16)+" bytes");return e|0}function Ea(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(ye(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),ye(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function ii(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ye(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Kr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return fi(e).length;default:if(i)return n?-1:Kr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=ii;function xa(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Fa(this,t,r);case"utf8":case"utf-8":return si(this,t,r);case"ascii":return Oa(this,t,r);case"latin1":case"binary":return ka(this,t,r);case"base64":return Ra(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ma(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Je(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};zn&&(T.prototype[zn]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(ye(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Zr(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:Yn(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Yn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Yn(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let u;if(i){let g=-1;for(u=r;us&&(r=s-a),u=r;u>=0;u--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return va(this,e,t,r);case"utf8":case"utf-8":return Pa(this,e,t,r);case"ascii":case"latin1":case"binary":return Ta(this,e,t,r);case"base64":return Ca(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Aa(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ra(e,t,r){return t===0&&r===e.length?Gr.fromByteArray(e):Gr.fromByteArray(e.slice(t,r))}function si(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,u,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(h=(o&15)<<12|(l&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],u=e[i+2],g=e[i+3],(l&192)===128&&(u&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(u&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Sa(n)}var Zn=4096;function Sa(e){let t=e.length;if(t<=Zn)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||G(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||G(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||G(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||G(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||G(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||G(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||G(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Ne(function(e){e=e>>>0,et(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,et(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||G(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||G(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||G(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||G(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||G(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||G(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||G(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Ne(function(e){e=e>>>0,et(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,et(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||G(e,4,this.length),Xe.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||G(e,4,this.length),Xe.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||G(e,8,this.length),Xe.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||G(e,8,this.length),Xe.read(this,e,!1,52,8)};function oe(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function ai(e,t,r,n,i){di(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function li(e,t,r,n,i){di(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=Ne(function(e,t=0){return ai(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Ne(function(e,t=0){return li(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=Ne(function(e,t=0){return ai(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Ne(function(e,t=0){return li(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ui(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ci(e,t,r,n,i){return t=+t,r=r>>>0,i||ui(e,t,r,4,34028234663852886e22,-34028234663852886e22),Xe.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return ci(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return ci(this,e,t,!1,r)};function pi(e,t,r,n,i){return t=+t,r=r>>>0,i||ui(e,t,r,8,17976931348623157e292,-17976931348623157e292),Xe.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return pi(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return pi(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=Xn(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Xn(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function Xn(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ia(e,t,r){et(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Tt(t,e.length-(r+1))}function di(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Ze.ERR_OUT_OF_RANGE("value",a,e)}Ia(n,i,o)}function et(e,t){if(typeof e!="number")throw new Ze.ERR_INVALID_ARG_TYPE(t,"number",e)}function Tt(e,t,r){throw Math.floor(e)!==e?(et(e,r),new Ze.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ze.ERR_BUFFER_OUT_OF_BOUNDS:new Ze.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var _a=/[^+/0-9A-Za-z-_]/g;function La(e){if(e=e.split("=")[0],e=e.trim().replace(_a,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Kr(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Na(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function fi(e){return Gr.toByteArray(La(e))}function nr(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function ye(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Zr(e){return e!==e}var $a=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Ne(e){return typeof BigInt>"u"?Ba:e}function Ba(){throw new Error("BigInt not supported")}});var w,m=Le(()=>{"use strict";w=he(mi())});function ja(){return!1}var qa,Ua,ir,tn=Le(()=>{"use strict";m();c();p();d();f();qa={},Ua={existsSync:ja,promises:qa},ir=Ua});function cl(...e){return e.join("/")}function pl(...e){return e.join("/")}var Ri,dl,fl,we,an=Le(()=>{"use strict";m();c();p();d();f();Ri="/",dl={sep:Ri},fl={resolve:cl,posix:dl,join:pl,sep:Ri},we=fl});var ki=ge((nf,Oi)=>{"use strict";m();c();p();d();f();Oi.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Mi=ge((cf,Fi)=>{"use strict";m();c();p();d();f();var gl=ki();Fi.exports=e=>{let t=gl(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var sr,Ii=Le(()=>{"use strict";m();c();p();d();f();sr=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Li=ge((Vf,_i)=>{"use strict";m();c();p();d();f();_i.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var $i=ge((tm,Di)=>{"use strict";m();c();p();d();f();Di.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var cn=ge((am,Bi)=>{"use strict";m();c();p();d();f();var El=$i();Bi.exports=e=>typeof e=="string"?e.replace(El(),""):e});var ji=ge((Cm,lr)=>{"use strict";m();c();p();d();f();lr.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};lr.exports.default=lr.exports});var En=ge((Xy,lo)=>{"use strict";m();c();p();d();f();lo.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{gc.exports={name:"@prisma/engines-version",version:"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"605197351a3c8bdd595af2d2a9bc3025bca48ea2"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.34",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var $o=ge(()=>{"use strict";m();c();p();d();f()});var vp={};Pt(vp,{Debug:()=>on,Decimal:()=>Ee,Extensions:()=>Xr,MetricsClient:()=>yt,NotFoundError:()=>Me,PrismaClientInitializationError:()=>V,PrismaClientKnownRequestError:()=>W,PrismaClientRustPanicError:()=>ue,PrismaClientUnknownRequestError:()=>K,PrismaClientValidationError:()=>H,Public:()=>en,Sql:()=>ae,defineDmmfProperty:()=>_o,deserializeJsonResponse:()=>ot,dmmfToRuntimeDataModel:()=>Io,empty:()=>jo,getPrismaClient:()=>ia,getRuntime:()=>ws,join:()=>Bo,makeStrictEnum:()=>oa,makeTypedQueryFactory:()=>Lo,objectEnumValues:()=>Cr,raw:()=>Mn,serializeJsonQuery:()=>Fr,skip:()=>kr,sqltag:()=>In,warnEnvConflicts:()=>void 0,warnOnce:()=>Lt});module.exports=da(vp);m();c();p();d();f();var Xr={};Pt(Xr,{defineExtension:()=>gi,getExtensionContext:()=>hi});m();c();p();d();f();m();c();p();d();f();function gi(e){return typeof e=="function"?e:t=>t.$extends(e)}m();c();p();d();f();function hi(e){return e}var en={};Pt(en,{validator:()=>yi});m();c();p();d();f();m();c();p();d();f();function yi(...e){return t=>t}m();c();p();d();f();m();c();p();d();f();var or={};Pt(or,{$:()=>vi,bgBlack:()=>Za,bgBlue:()=>rl,bgCyan:()=>il,bgGreen:()=>el,bgMagenta:()=>nl,bgRed:()=>Xa,bgWhite:()=>ol,bgYellow:()=>tl,black:()=>Ka,blue:()=>We,bold:()=>pe,cyan:()=>ke,dim:()=>Ct,gray:()=>Ot,green:()=>Rt,grey:()=>Ya,hidden:()=>Ga,inverse:()=>Ja,italic:()=>Qa,magenta:()=>Ha,red:()=>Ge,reset:()=>Va,strikethrough:()=>Wa,underline:()=>At,white:()=>za,yellow:()=>St});m();c();p();d();f();var rn,wi,bi,Ei,xi=!0;typeof y<"u"&&({FORCE_COLOR:rn,NODE_DISABLE_COLORS:wi,NO_COLOR:bi,TERM:Ei}=y.env||{},xi=y.stdout&&y.stdout.isTTY);var vi={enabled:!wi&&bi==null&&Ei!=="dumb"&&(rn!=null&&rn!=="0"||xi)};function U(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!vi.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Va=U(0,0),pe=U(1,22),Ct=U(2,22),Qa=U(3,23),At=U(4,24),Ja=U(7,27),Ga=U(8,28),Wa=U(9,29),Ka=U(30,39),Ge=U(31,39),Rt=U(32,39),St=U(33,39),We=U(34,39),Ha=U(35,39),ke=U(36,39),za=U(37,39),Ot=U(90,39),Ya=U(90,39),Za=U(40,49),Xa=U(41,49),el=U(42,49),tl=U(43,49),rl=U(44,49),nl=U(45,49),il=U(46,49),ol=U(47,49);m();c();p();d();f();var sl=100,Pi=["green","yellow","blue","magenta","cyan","red"],kt=[],Ti=Date.now(),al=0,nn=typeof y<"u"?y.env:{};globalThis.DEBUG??=nn.DEBUG??"";globalThis.DEBUG_COLORS??=nn.DEBUG_COLORS?nn.DEBUG_COLORS==="true":!0;var Ft={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function ll(e){let t={color:Pi[al++%Pi.length],enabled:Ft.enabled(e),namespace:e,log:Ft.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&kt.push([o,...n]),kt.length>sl&&kt.shift(),Ft.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:ul(g)),u=`+${Date.now()-Ti}ms`;Ti=Date.now(),globalThis.DEBUG_COLORS?a(or[s](pe(o)),...l,or[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var on=new Proxy(ll,{get:(e,t)=>Ft[t],set:(e,t,r)=>Ft[t]=r});function ul(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Ci(e=7500){let t=kt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` +`);return t.length{let e;(O=>(O.findUnique="findUnique",O.findUniqueOrThrow="findUniqueOrThrow",O.findFirst="findFirst",O.findFirstOrThrow="findFirstOrThrow",O.findMany="findMany",O.create="create",O.createMany="createMany",O.createManyAndReturn="createManyAndReturn",O.update="update",O.updateMany="updateMany",O.upsert="upsert",O.delete="delete",O.deleteMany="deleteMany",O.groupBy="groupBy",O.count="count",O.aggregate="aggregate",O.findRaw="findRaw",O.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(De||={});m();c();p();d();f();an();function ln(e){return we.sep===we.posix.sep?e:e.split(we.sep).join(we.posix.sep)}var _t={};Pt(_t,{error:()=>wl,info:()=>yl,log:()=>hl,query:()=>bl,should:()=>Ni,tags:()=>It,warn:()=>un});m();c();p();d();f();var It={error:Ge("prisma:error"),warn:St("prisma:warn"),info:ke("prisma:info"),query:We("prisma:query")},Ni={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function hl(...e){console.log(...e)}function un(e,...t){Ni.warn()&&console.warn(`${It.warn} ${e}`,...t)}function yl(e,...t){console.info(`${It.info} ${e}`,...t)}function wl(e,...t){console.error(`${It.error} ${e}`,...t)}function bl(e,...t){console.log(`${It.query} ${e}`,...t)}m();c();p();d();f();function ar(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}m();c();p();d();f();function Fe(e,t){throw new Error(t)}m();c();p();d();f();function pn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}m();c();p();d();f();var dn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});m();c();p();d();f();function rt(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}m();c();p();d();f();function fn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{qi.has(e)||(qi.add(e),un(t,...r))};m();c();p();d();f();var W=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};re(W,"PrismaClientKnownRequestError");var Me=class extends W{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};re(Me,"NotFoundError");m();c();p();d();f();var V=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};re(V,"PrismaClientInitializationError");m();c();p();d();f();var ue=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};re(ue,"PrismaClientRustPanicError");m();c();p();d();f();var K=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};re(K,"PrismaClientUnknownRequestError");m();c();p();d();f();var H=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};re(H,"PrismaClientValidationError");m();c();p();d();f();m();c();p();d();f();var nt=9e15,qe=1e9,mn="0123456789abcdef",cr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",pr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",gn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-nt,maxE:nt,crypto:!1},Gi,Ie,L=!0,fr="[DecimalError] ",je=fr+"Invalid argument: ",Wi=fr+"Precision limit exceeded",Ki=fr+"crypto unavailable",Hi="[object Decimal]",te=Math.floor,J=Math.pow,xl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,vl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Pl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,zi=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fe=1e7,I=7,Tl=9007199254740991,Cl=cr.length-1,hn=pr.length-1,R={toStringTag:Hi};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),k(e)};R.ceil=function(){return k(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(je+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+I,n.rounding=1,r=Al(n,to(n,r)),n.precision=e,n.rounding=t,k(Ie==2||Ie==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(L=!1,o=g.s*J(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=J(r,1/3),e=te((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(g),n=j(u.plus(g).times(a),u.plus(l),s+2,1),Z(a.d).slice(0,s)===(r=Z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(k(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(k(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return L=!0,k(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-te(this.e/I))*I,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return j(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return k(j(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return k(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/gr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=it(s,1,o.times(t),new s(1),!0);for(var l,u=e,g=new s(8);u--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return k(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=it(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/gr(5,e)),i=it(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,k(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,j(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?de(r,i,o):new r(0):new r(NaN):t.isZero()?de(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=de(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,L=!1,r=r.times(r).minus(1).sqrt().plus(r),L=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,L=!1,r=r.times(r).plus(1).sqrt().plus(r),L=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?k(new o(i),e,t,!0):(o.precision=r=n-i.e,i=j(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=de(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,P=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=hn)return s=de(g,h+4,P).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=hn)return s=de(g,h+4,P).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/I+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(L=!1,t=Math.ceil(a/I),n=1,l=u.times(u),s=new g(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,P=g.rounding,S=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new g(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(L=!1,a=h+S,s=Be(u,a),n=t?dr(g,a+10):Be(e,a),l=j(s,n,a,1),Nt(l.d,i=h,P))do if(a+=10,s=Be(u,a),n=t?dr(g,a+10):Be(e,a),l=j(s,n,a,1),!o){+Z(l.d).slice(i+1,i+15)+1==1e14&&(l=k(l,h+1,0));break}while(Nt(l.d,i+=10,P));return L=!0,k(l,h,P)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,P,S=this,C=S.constructor;if(e=new C(e),!S.d||!e.d)return!S.s||!e.s?e=new C(NaN):S.d?e.s=-e.s:e=new C(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(u=S.d,P=e.d,a=C.precision,l=C.rounding,!u[0]||!P[0]){if(P[0])e.s=-e.s;else if(u[0])e=new C(S);else return new C(l===3?-0:0);return L?k(e,a,l):e}if(r=te(e.e/I),g=te(S.e/I),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=P.length):(t=P,r=g,s=u.length),n=Math.max(Math.ceil(a/I),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=P.length,h=n0;--n)u[s++]=0;for(n=P.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=g.length,s-i<0&&(i=s,r=g,g=u,u=r),t=0;i;)t=(u[--i]=u[i]+g[i]+t)/fe|0,u[i]%=fe;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=mr(u,n),L?k(e,a,l):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(je+e);return r.d?(t=Yi(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return k(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+I,n.rounding=1,r=Sl(n,to(n,r)),n.precision=e,n.rounding=t,k(Ie>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,g=s.constructor;if(u!==1||!a||!a[0])return new g(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(L=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=Z(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=te((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(u.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus(j(s,o,r+2,1)).times(.5),Z(o.d).slice(0,r)===(t=Z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(k(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(k(n,l+1,1),e=!n.times(n).eq(s));break}return L=!0,k(n,l,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=j(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,k(Ie==2||Ie==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,l,u,g=this,h=g.constructor,P=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!P||!P[0]||!S||!S[0])return new h(!e.s||P&&!P[0]&&!S||S&&!S[0]&&!P?NaN:!P||!S?e.s/0:e.s*0);for(r=te(g.e/I)+te(e.e/I),l=P.length,u=S.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+S[n]*P[i-n-1]+t,o[i--]=a%fe|0,t=a/fe|0;o[i]=(o[i]+t)%fe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=mr(o,r),L?k(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return bn(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(se(e,0,qe),t===void 0?t=n.rounding:se(t,0,8),k(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=be(n,!0):(se(e,0,qe),t===void 0?t=i.rounding:se(t,0,8),n=k(new i(n),e+1,t),r=be(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=be(i):(se(e,0,qe),t===void 0?t=o.rounding:se(t,0,8),n=k(new o(i),e+i.e+1,t),r=be(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,P,S=this,C=S.d,A=S.constructor;if(!C)return new A(S);if(u=r=new A(1),n=l=new A(0),t=new A(n),o=t.e=Yi(C)-S.e-1,s=o%I,t.d[0]=J(10,s<0?I+s:s),e==null)e=o>0?t:u;else{if(a=new A(e),!a.isInt()||a.lt(u))throw Error(je+a);e=a.gt(t)?o>0?t:u:a}for(L=!1,a=new A(Z(C)),g=A.precision,A.precision=o=C.length*I*2;h=j(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=j(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=S.s,P=j(u,n,o,1).minus(S).abs().cmp(j(l,r,o,1).minus(S).abs())<1?[u,n]:[l,r],A.precision=g,L=!0,P};R.toHexadecimal=R.toHex=function(e,t){return bn(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:se(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(L=!1,r=j(r,e,0,t,1).times(e),L=!0,k(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return bn(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(J(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return k(a,n,o);if(t=te(e.e/I),t>=e.d.length-1&&(r=u<0?-u:u)<=Tl)return i=Zi(l,a,r,n),e.s<0?new l(1).div(i):k(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(L=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=yn(e.times(Be(a,n+r)),n),i.d&&(i=k(i,n+5,1),Nt(i.d,n,o)&&(t=n+10,i=k(yn(e.times(Be(a,t+r)),t),t+5,1),+Z(i.d).slice(n+1,n+15)+1==1e14&&(i=k(i,n+1,0)))),i.s=s,L=!0,l.rounding=o,k(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=be(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(se(e,1,qe),t===void 0?t=i.rounding:se(t,0,8),n=k(new i(n),e,t),r=be(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(se(e,1,qe),t===void 0?t=n.rounding:se(t,0,8)),k(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=be(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return k(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=be(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(je+e)}function Nt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=I,i=0):(i=Math.ceil((t+1)/I),t%=I),o=J(10,I-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==J(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==J(10,t-3)-1,s}function ur(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Al(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/gr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=it(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var j=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,g,h,P,S,C,A,F,_,N,M,O,Y,q,vt,Q,ie,Se,X,Ye,er=n.constructor,Jr=n.s==i.s?1:-1,ee=n.d,$=i.d;if(!ee||!ee[0]||!$||!$[0])return new er(!n.s||!i.s||(ee?$&&ee[0]==$[0]:!$)?NaN:ee&&ee[0]==0||!$?Jr*0:Jr/0);for(l?(S=1,g=n.e-i.e):(l=fe,S=I,g=te(n.e/S)-te(i.e/S)),X=$.length,ie=ee.length,_=new er(Jr),N=_.d=[],h=0;$[h]==(ee[h]||0);h++);if($[h]>(ee[h]||0)&&g--,o==null?(q=o=er.precision,s=er.rounding):a?q=o+(n.e-i.e)+1:q=o,q<0)N.push(1),C=!0;else{if(q=q/S+2|0,h=0,X==1){for(P=0,$=$[0],q++;(h1&&($=e($,P,l),ee=e(ee,P,l),X=$.length,ie=ee.length),Q=X,M=ee.slice(0,X),O=M.length;O=l/2&&++Se;do P=0,u=t($,M,X,O),u<0?(Y=M[0],X!=O&&(Y=Y*l+(M[1]||0)),P=Y/Se|0,P>1?(P>=l&&(P=l-1),A=e($,P,l),F=A.length,O=M.length,u=t(A,M,F,O),u==1&&(P--,r(A,X=10;P/=10)h++;_.e=h+g*S-1,k(_,a?o+_.e+1:o,s,C)}return _}}();function k(e,t,r,n){var i,o,s,a,l,u,g,h,P,S=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=I,s=t,g=h[P=0],l=g/J(10,i-s-1)%10|0;else if(P=Math.ceil((o+1)/I),a=h.length,P>=a)if(n){for(;a++<=P;)h.push(0);g=l=0,i=1,o%=I,s=o-I+1}else break e;else{for(g=a=h[P],i=1;a>=10;a/=10)i++;o%=I,s=o-I+i,l=s<0?0:g/J(10,i-s-1)%10|0}if(n=n||t<0||h[P+1]!==void 0||(s<0?g:g%J(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/J(10,i-s):0:h[P-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=J(10,(I-t%I)%I),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=P,a=1,P--):(h.length=P+1,a=J(10,I-o),h[P]=s>0?(g/J(10,i-s)%J(10,s)|0)*a:0),u)for(;;)if(P==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==fe&&(h[0]=1));break}else{if(h[P]+=a,h[P]!=fe)break;h[P--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return L&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+$e(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+$e(-i-1)+o,r&&(n=r-s)>0&&(o+=$e(n))):i>=s?(o+=$e(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+$e(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=$e(n))),o}function mr(e,t){var r=e[0];for(t*=I;r>=10;r/=10)t++;return t}function dr(e,t,r){if(t>Cl)throw L=!0,r&&(e.precision=r),Error(Wi);return k(new e(cr),t,1,!0)}function de(e,t,r){if(t>hn)throw Error(Wi);return k(new e(pr),t,r,!0)}function Yi(e){var t=e.length-1,r=t*I+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function $e(e){for(var t="";e--;)t+="0";return t}function Zi(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/I+4);for(L=!1;;){if(r%2&&(o=o.times(t),Qi(o.d,s)&&(i=!0)),r=te(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),Qi(t.d,s)}return L=!0,o}function Vi(e){return e.d[e.d.length-1]&1}function Xi(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new P(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(L=!1,l=C):l=t,a=new P(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(J(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new P(1),P.precision=l;;){if(o=k(o.times(e),l,1),r=r.times(++g),a=s.plus(j(o,r,l,1)),Z(a.d).slice(0,l)===Z(s.d).slice(0,l)){for(i=h;i--;)s=k(s.times(s),l,1);if(t==null)if(u<3&&Nt(s.d,l-n,S,u))P.precision=l+=10,r=o=a=new P(1),g=0,u++;else return k(s,P.precision=C,S,L=!0);else return P.precision=C,s}s=a}}function Be(e,t){var r,n,i,o,s,a,l,u,g,h,P,S=1,C=10,A=e,F=A.d,_=A.constructor,N=_.rounding,M=_.precision;if(A.s<0||!F||!F[0]||!A.e&&F[0]==1&&F.length==1)return new _(F&&!F[0]?-1/0:A.s!=1?NaN:F?0:A);if(t==null?(L=!1,g=M):g=t,_.precision=g+=C,r=Z(F),n=r.charAt(0),Math.abs(o=A.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(e),r=Z(A.d),n=r.charAt(0),S++;o=A.e,n>1?(A=new _("0."+r),o++):A=new _(n+"."+r.slice(1))}else return u=dr(_,g+2,M).times(o+""),A=Be(new _(n+"."+r.slice(1)),g-C).plus(u),_.precision=M,t==null?k(A,M,N,L=!0):A;for(h=A,l=s=A=j(A.minus(1),A.plus(1),g,1),P=k(A.times(A),g,1),i=3;;){if(s=k(s.times(P),g,1),u=l.plus(j(s,new _(i),g,1)),Z(u.d).slice(0,g)===Z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(dr(_,g+2,M).times(o+""))),l=j(l,new _(S),g,1),t==null)if(Nt(l.d,g-C,N,a))_.precision=g+=C,u=s=A=j(h.minus(1),h.plus(1),g,1),P=k(A.times(A),g,1),i=a=1;else return k(l,_.precision=M,N,L=!0);else return _.precision=M,l;l=u,i+=2}}function eo(e){return String(e.s*e.s/0)}function wn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%I,r<0&&(n+=I),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),zi.test(t))return wn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(vl.test(t))r=16,t=t.toLowerCase();else if(xl.test(t))r=2;else if(Pl.test(t))r=8;else throw Error(je+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=Zi(n,new n(r),o,o*2)),u=ur(t,r,fe),g=u.length-1,o=g;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=mr(u,g),e.d=u,L=!1,s&&(e=j(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?J(2,l):Ke.pow(2,l))),L=!0,e)}function Sl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:it(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/gr(5,r)),t=it(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function it(e,t,r,n,i){var o,s,a,l,u=1,g=e.precision,h=Math.ceil(g/I);for(L=!1,l=r.times(r),a=new e(n);;){if(s=j(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=j(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return L=!0,s.d.length=h+1,s}function gr(e,t){for(var r=e;--t;)r*=e;return r}function to(e,t){var r,n=t.s<0,i=de(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Ie=n?4:1,t;if(r=t.divToInt(i),r.isZero())Ie=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Ie=Vi(r)?n?2:3:n?4:1,t;Ie=Vi(r)?n?1:4:n?3:2}return t.minus(i).abs()}function bn(e,t,r,n){var i,o,s,a,l,u,g,h,P,S=e.constructor,C=r!==void 0;if(C?(se(r,1,qe),n===void 0?n=S.rounding:se(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=eo(e);else{for(g=be(e),s=g.indexOf("."),C?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),P=new S(1),P.e=g.length-s,P.d=ur(be(P),10,i),P.e=P.d.length),h=ur(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=C?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=j(e,P,r,n,0,i),h=e.d,o=e.e,u=Gi),s=h[r],a=i/2,u=u||h[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,u)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=ur(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function Ol(e){return new this(e).abs()}function kl(e){return new this(e).acos()}function Fl(e){return new this(e).acosh()}function Ml(e,t){return new this(e).plus(t)}function Il(e){return new this(e).asin()}function _l(e){return new this(e).asinh()}function Ll(e){return new this(e).atan()}function Nl(e){return new this(e).atanh()}function Dl(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=de(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?de(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=de(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(j(e,t,o,1)),t=de(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(j(e,t,o,1)),r}function $l(e){return new this(e).cbrt()}function Bl(e){return k(e=new this(e),e.e+1,2)}function jl(e,t,r){return new this(e).clamp(t,r)}function ql(e){if(!e||typeof e!="object")throw Error(fr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,qe,"rounding",0,8,"toExpNeg",-nt,0,"toExpPos",0,nt,"maxE",0,nt,"minE",-nt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(je+r+": "+n);if(r="crypto",i&&(this[r]=gn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(Ki);else this[r]=!1;else throw Error(je+r+": "+n);return this}function Ul(e){return new this(e).cos()}function Vl(e){return new this(e).cosh()}function ro(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,Ji(o)){u.s=o.s,L?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;L?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(Ki);else for(;o=10;i/=10)n++;npe(We(e)),punctuation:We,directive:ke,function:ke,variable:e=>pe(We(e)),string:e=>pe(Rt(e)),boolean:St,number:ke,comment:Ot};var hu=e=>e,yr={},yu=0,D={manual:yr.Prism&&yr.Prism.manual,disableWorkerMessageHandler:yr.Prism&&yr.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof me){let t=e;return new me(t.type,D.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(D.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Se instanceof me)continue;if(Y&&Q!=t.length-1){N.lastIndex=ie;var h=N.exec(e);if(!h)break;var g=h.index+(O?h[1].length:0),P=h.index+h[0].length,a=Q,l=ie;for(let $=t.length;a<$&&(l=l&&(++Q,ie=l);if(t[Q]instanceof me)continue;u=a-Q,Se=e.slice(ie,l),h.index-=ie}else{N.lastIndex=0;var h=N.exec(Se),u=1}if(!h){if(o)break;continue}O&&(q=h[1]?h[1].length:0);var g=h.index+q,h=h[0].slice(q),P=g+h.length,S=Se.slice(0,g),C=Se.slice(P);let X=[Q,u];S&&(++Q,ie+=S.length,X.push(S));let Ye=new me(A,M?D.tokenize(h,M):h,vt,h,Y);if(X.push(Ye),C&&X.push(C),Array.prototype.splice.apply(t,X),u!=1&&D.matchGrammar(e,t,r,Q,ie,!0,A),o)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let i in n)t[i]=n[i];delete t.rest}return D.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=D.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=D.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:me};D.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};D.languages.javascript=D.languages.extend("clike",{"class-name":[D.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});D.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;D.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:D.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:D.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:D.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:D.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});D.languages.markup&&D.languages.markup.tag.addInlined("script","javascript");D.languages.js=D.languages.javascript;D.languages.typescript=D.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});D.languages.ts=D.languages.typescript;function me(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}me.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return me.stringify(r,t)}).join(""):wu(e.type)(e.content)};function wu(e){return no[e]||hu}function io(e){return bu(e,D.languages.javascript)}function bu(e,t){return D.tokenize(e,t).map(n=>me.stringify(n)).join("")}m();c();p();d();f();var oo=he(Mi());function so(e){return(0,oo.default)(e)}var wr=class e{static read(t){let r;try{r=ir.readFileSync(t,"utf-8")}catch{return null}return e.fromContent(r)}static fromContent(t){let r=t.split(/\r?\n/);return new e(1,r)}constructor(t,r){this.firstLineNumber=t,this.lines=r}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(t,r){if(tthis.lines.length+this.firstLineNumber)return this;let n=t-this.firstLineNumber,i=[...this.lines];return i[n]=r(i[n]),new e(this.firstLineNumber,i)}mapLines(t){return new e(this.firstLineNumber,this.lines.map((r,n)=>t(r,this.firstLineNumber+n)))}lineAt(t){return this.lines[t-this.firstLineNumber]}prependSymbolAt(t,r){return this.mapLines((n,i)=>i===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` +`);return new e(t,so(n).split(` +`))}highlight(){let t=io(this.toString());return new e(this.firstLineNumber,t.split(` +`))}toString(){return this.lines.join(` +`)}};var Eu={red:Ge,gray:Ot,dim:Ct,bold:pe,underline:At,highlightSource:e=>e.highlight()},xu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function vu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Pu({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=vu({message:t,originalMethod:r,isPanic:n,callArguments:i});if(!e||typeof window<"u"||y.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=wr.read(a.fileName)?.slice(l,a.lineNumber),g=u?.lineAt(a.lineNumber);if(u&&g){let h=Cu(g),P=Tu(g);if(!P)return s;s.functionName=`${P.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,C=>C.slice(0,P.openingBraceIndex))),u=o.highlightSource(u);let S=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((C,A)=>o.gray(String(A).padStart(S))+" "+C).mapLines(C=>o.dim(C)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let C=h+S+1;C+=2,s.callArguments=(0,ao.default)(i,C).slice(C)}}return s}function Tu(e){let t=Object.keys(De.ModelAction).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function Cu(e){let t=0;for(let r=0;r"Unknown error")}function fo(e){return e.errors.flatMap(t=>t.kind==="Union"?fo(t):[t])}function Su(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Ou(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Ou(e,t){return[...new Set(e.concat(t))]}function ku(e){return fn(e,(t,r)=>{let n=uo(t),i=uo(r);return n!==i?n-i:co(t)-co(r)})}function uo(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function co(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}m();c();p();d();f();var ce=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};m();c();p();d();f();m();c();p();d();f();var ct=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};m();c();p();d();f();m();c();p();d();f();var Er=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};m();c();p();d();f();var xr=e=>e,vr={bold:xr,red:xr,green:xr,dim:xr,enabled:!1},mo={bold:pe,red:Ge,green:Rt,dim:Ct,enabled:!0},pt={write(e){e.writeLine(",")}};m();c();p();d();f();var xe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};m();c();p();d();f();var Ue=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var dt=class extends Ue{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Er(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new xe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(pt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var ft=class e extends Ue{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof dt&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new xe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(pt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};m();c();p();d();f();var z=class extends Ue{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new xe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};m();c();p();d();f();var Dt=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(pt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function br(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Mu(e,t);break;case"IncludeOnScalar":Iu(e,t);break;case"EmptySelection":_u(e,t,r);break;case"UnknownSelectionField":$u(e,t);break;case"InvalidSelectionValue":Bu(e,t);break;case"UnknownArgument":ju(e,t);break;case"UnknownInputField":qu(e,t);break;case"RequiredArgumentMissing":Uu(e,t);break;case"InvalidArgumentType":Vu(e,t);break;case"InvalidArgumentValue":Qu(e,t);break;case"ValueTooLarge":Ju(e,t);break;case"SomeFieldsMissing":Gu(e,t);break;case"TooManyFieldsGiven":Wu(e,t);break;case"Union":po(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Mu(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Iu(e,t){let[r,n]=$t(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new ce(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${Bt(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function _u(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){Lu(e,t,i);return}if(n.hasField("select")){Nu(e,t);return}}if(r?.[st(e.outputType.name)]){Du(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function Lu(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new ce(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Nu(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),wo(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Bt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Du(e,t){let r=new Dt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new ce("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=$t(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let l=a?.value.asObject()??new ft;l.addSuggestion(n),a.value=l}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function $u(e,t){let r=bo(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":wo(n,e.outputType);break;case"include":Ku(n,e.outputType);break;case"omit":Hu(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(Bt(n)),i.join(" ")})}function Bu(e,t){let r=bo(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function ju(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),zu(n,e.arguments)),t.addErrorMessage(i=>ho(i,r,e.arguments.map(o=>o.name)))}function qu(e,t){let[r,n]=$t(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Eo(o,e.inputType)}t.addErrorMessage(o=>ho(o,n,e.inputType.fields.map(s=>s.name)))}function ho(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Zu(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Bt(e)),n.join(" ")}function Uu(e,t){let r;t.addErrorMessage(l=>r?.value instanceof z&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=$t(e.argumentPath),s=new Dt,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new ce(o,s).makeRequired())}else{let l=e.inputTypes.map(yo).join(" | ");a.addSuggestion(new ce(o,l).makeRequired())}}function yo(e){return e.kind==="list"?`${yo(e.elementType)}[]`:e.name}function Vu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Pr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function Qu(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Pr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Ju(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof z&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Gu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Eo(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Pr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(Bt(i)),o.join(" ")})}function Wu(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Pr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function wo(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ce(r.name,"true"))}function Ku(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new ce(r.name,"true"))}function Hu(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new ce(r.name,"true"))}function zu(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new ce(r.name,r.typeNames.join(" | ")))}function bo(e,t){let[r,n]=$t(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),l=o?.getField(n);return o&&l?{parentKind:"select",parent:o,field:l,fieldName:n}:(l=s?.getField(n),s&&l?{parentKind:"include",field:l,parent:s,fieldName:n}:(l=a?.getField(n),a&&l?{parentKind:"omit",field:l,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function Eo(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new ce(r.name,r.typeNames.join(" | ")))}function $t(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Bt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Pr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Yu=3;function Zu(e,t){let r=1/0,n;for(let i of t){let o=(0,go.default)(e,i);o>Yu||o`}};function mt(e){return e instanceof jt}m();c();p();d();f();var Tr=Symbol(),xn=new WeakMap,_e=class{constructor(t){t===Tr?xn.set(this,`Prisma.${this._getName()}`):xn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return xn.get(this)}},qt=class extends _e{_getNamespace(){return"NullTypes"}},Ut=class extends qt{};vn(Ut,"DbNull");var Vt=class extends qt{};vn(Vt,"JsonNull");var Qt=class extends qt{};vn(Qt,"AnyNull");var Cr={classes:{DbNull:Ut,JsonNull:Vt,AnyNull:Qt},instances:{DbNull:new Ut(Tr),JsonNull:new Vt(Tr),AnyNull:new Qt(Tr)}};function vn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}m();c();p();d();f();var vo=": ",Ar=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+vo.length}write(t){let r=new xe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(vo).write(this.value)}};var Pn=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function gt(e){return new Pn(Po(e))}function Po(e){let t=new ft;for(let[r,n]of Object.entries(e)){let i=new Ar(r,To(n));t.addField(i)}return t}function To(e){if(typeof e=="string")return new z(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new z(String(e));if(typeof e=="bigint")return new z(`${e}n`);if(e===null)return new z("null");if(e===void 0)return new z("undefined");if(lt(e))return new z(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new z(`Buffer.alloc(${e.byteLength})`):new z(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=hr(e)?e.toISOString():"Invalid Date";return new z(`new Date("${t}")`)}return e instanceof _e?new z(`Prisma.${e._getName()}`):mt(e)?new z(`prisma.${xo(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Xu(e):typeof e=="object"?Po(e):new z(Object.prototype.toString.call(e))}function Xu(e){let t=new dt;for(let r of e)t.addItem(To(r));return t}function Rr(e,t){let r=t==="pretty"?mo:vr,n=e.renderAllMessages(r),i=new ct(0,{colors:r}).write(e).toString();return{message:n,args:i}}function Sr({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=gt(e);for(let h of t)br(h,a,s);let{message:l,args:u}=Rr(a,r),g=ut({message:l,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:u});throw new H(g,{clientVersion:o})}m();c();p();d();f();m();c();p();d();f();var ve=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};m();c();p();d();f();function Jt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}m();c();p();d();f();function Pe(e){return e.replace(/^./,t=>t.toLowerCase())}m();c();p();d();f();function Ao(e,t,r){let n=Pe(r);return!t.result||!(t.result.$allModels||t.result[n])?e:ec({...e,...Co(t.name,e,t.result.$allModels),...Co(t.name,e,t.result[n])})}function ec(e){let t=new ve,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return rt(e,n=>({...n,needs:r(n.name,new Set)}))}function Co(e,t,r){return r?rt(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:tc(t,o,i)})):{}}function tc(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Ro(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function So(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Or=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new ve;this.modelExtensionsCache=new ve;this.queryCallbacksCache=new ve;this.clientExtensions=Jt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Jt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Ao(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Pe(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},ht=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Or(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Or(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};m();c();p();d();f();m();c();p();d();f();var Oo=Symbol(),Gt=class{constructor(t){if(t!==Oo)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?kr:t}},kr=new Gt(Oo);function Te(e){return e instanceof Gt}var rc={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},ko="explicitly `undefined` values are not allowed";function Fr({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=ht.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g}){let h=new Tn({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:l,previewFeatures:u,globalOmit:g});return{modelName:e,action:rc[t],query:Wt(r,h)}}function Wt({select:e,include:t,...r}={},n){let i;return n.isPreviewFeatureOn("omitApi")&&(i=r.omit,delete r.omit),{arguments:Mo(r,n),selection:nc(e,t,i,n)}}function nc(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.isPreviewFeatureOn("omitApi")&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),ac(e,n)):ic(n,t,r)}function ic(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&oc(n,t,e),e.isPreviewFeatureOn("omitApi")&&sc(n,r,e),n}function oc(e,t,r){for(let[n,i]of Object.entries(t)){if(Te(i))continue;let o=r.nestSelection(n);if(Cn(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=Wt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=Wt(i,o)}}function sc(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=So(i,n);for(let[s,a]of Object.entries(o)){if(Te(a))continue;Cn(a,r.nestSelection(s));let l=r.findField(s);n?.[s]&&!l||(e[s]=!a)}}function ac(e,t){let r={},n=t.getComputedFields(),i=Ro(e,n);for(let[o,s]of Object.entries(i)){if(Te(s))continue;let a=t.nestSelection(o);Cn(s,a);let l=t.findField(o);if(!(n?.[o]&&!l)){if(s===!1||s===void 0||Te(s)){r[o]=!1;continue}if(s===!0){l?.kind==="object"?r[o]=Wt({},a):r[o]=!0;continue}r[o]=Wt(s,a)}}return r}function Fo(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(at(e)){if(hr(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(mt(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return lc(e,t);if(ArrayBuffer.isView(e))return{$type:"Bytes",value:w.Buffer.from(e).toString("base64")};if(uc(e))return e.values;if(lt(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof _e){if(e!==Cr.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(cc(e))return e.toJSON();if(typeof e=="object")return Mo(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function Mo(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);Te(i)||(i!==void 0?r[n]=Fo(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:ko}))}return r}function lc(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[st(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:Fe(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};m();c();p();d();f();var yt=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};m();c();p();d();f();function Io(e){return{models:An(e.models),enums:An(e.enums),types:An(e.types)}}function An(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function _o(e,t){let r=Jt(()=>pc(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function pc(e){return{datamodel:{models:Rn(e.models),enums:Rn(e.enums),types:Rn(e.types)}}}function Rn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}m();c();p();d();f();var Sn=new WeakMap,Mr="$$PrismaTypedSql",On=class{constructor(t,r){Sn.set(this,{sql:t,values:r}),Object.defineProperty(this,Mr,{value:Mr})}get sql(){return Sn.get(this).sql}get values(){return Sn.get(this).values}};function Lo(e){return(...t)=>new On(e,t)}function No(e){return e!=null&&e[Mr]===Mr}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();function Kt(e){return{ok:!1,error:e,map(){return Kt(e)},flatMap(){return Kt(e)}}}var kn=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},Fn=e=>{let t=new kn,r=Ce(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ce(t,e.queryRaw.bind(e)),executeRaw:Ce(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>dc(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=mc(t,e.getConnectionInfo.bind(e))),n},dc=(e,t)=>{let r=Ce(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:Ce(e,t.queryRaw.bind(t)),executeRaw:Ce(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>fc(e,o))}},fc=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ce(e,t.queryRaw.bind(t)),executeRaw:Ce(e,t.executeRaw.bind(t)),commit:Ce(e,t.commit.bind(t)),rollback:Ce(e,t.rollback.bind(t))});function Ce(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return Kt({kind:"GenericJs",id:i})}}}function mc(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return Kt({kind:"GenericJs",id:i})}}}var na=he(Do());var YO=he($o());Ii();tn();an();m();c();p();d();f();var ae=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}m();c();p();d();f();m();c();p();d();f();var Ir={enumerable:!0,configurable:!0,writable:!0};function _r(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Ir,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var qo=Symbol.for("nodejs.util.inspect.custom");function Ae(e,t){let r=hc(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Uo(Reflect.ownKeys(o),r),a=Uo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...Ir,...l?.getPropertyDescriptor(s)}:Ir:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[qo]=function(){let o={...this};return delete o[qo],o},i}function hc(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Uo(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}m();c();p();d();f();function wt(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}m();c();p();d();f();function Lr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}m();c();p();d();f();function Vo(e){if(e===void 0)return"";let t=gt(e);return new ct(0,{colors:vr}).write(t).toString()}m();c();p();d();f();var yc="P2037";function Nr({error:e,user_facing_error:t},r,n){return t.error_code?new W(wc(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new K(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function wc(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===yc&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var zt="";function Qo(e){var t=e.split(` +`);return t.reduce(function(r,n){var i=xc(n)||Pc(n)||Ac(n)||kc(n)||Sc(n);return i&&r.push(i),r},[])}var bc=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ec=/\((\S*)(?::(\d+))(?::(\d+))\)/;function xc(e){var t=bc.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=Ec.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||zt,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var vc=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Pc(e){var t=vc.exec(e);return t?{file:t[2],methodName:t[1]||zt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var Tc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Cc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Ac(e){var t=Tc.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=Cc.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||zt,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var Rc=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Sc(e){var t=Rc.exec(e);return t?{file:t[3],methodName:t[1]||zt,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var Oc=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function kc(e){var t=Oc.exec(e);return t?{file:t[2],methodName:t[1]||zt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var _n=class{getLocation(){return null}},Ln=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=Qo(t).find(i=>{if(!i.file)return!1;let o=ln(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function Ve(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new _n:new Ln}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var Jo={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function bt(e={}){let t=Mc(e);return Object.entries(t).reduce((n,[i,o])=>(Jo[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Mc(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Dr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Go(e,t){let r=Dr(e);return t({action:"aggregate",unpacker:r,argsMapper:bt})(e)}m();c();p();d();f();function Ic(e={}){let{select:t,...r}=e;return typeof t=="object"?bt({...r,_count:t}):bt({...r,_count:{_all:!0}})}function _c(e={}){return typeof e.select=="object"?t=>Dr(e)(t)._count:t=>Dr(e)(t)._count._all}function Wo(e,t){return t({action:"count",unpacker:_c(e),argsMapper:Ic})(e)}m();c();p();d();f();function Lc(e={}){let t=bt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Nc(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Ko(e,t){return t({action:"groupBy",unpacker:Nc(e),argsMapper:Lc})(e)}function Ho(e,t,r){if(t==="aggregate")return n=>Go(n,r);if(t==="count")return n=>Wo(n,r);if(t==="groupBy")return n=>Ko(n,r)}m();c();p();d();f();function zo(e,t){let r=t.fields.filter(i=>!i.relationName),n=dn(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new jt(e,o,s.type,s.isList,s.kind==="enum")},..._r(Object.keys(n))})}m();c();p();d();f();m();c();p();d();f();var Yo=e=>Array.isArray(e)?e:e.split("."),Nn=(e,t)=>Yo(t).reduce((r,n)=>r&&r[n],e),Zo=(e,t,r)=>Yo(t).reduceRight((n,i,o,s)=>Object.assign({},Nn(e,s.slice(0,o)),{[i]:n}),r);function Dc(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function $c(e,t,r){return t===void 0?e??{}:Zo(t,r,e||!0)}function Dn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=Ve(e._errorFormat),g=Dc(n,i),h=$c(l,o,g),P=r({dataPath:g,callsite:u})(h),S=Bc(e,t);return new Proxy(P,{get(C,A){if(!S.includes(A))return C[A];let _=[a[A].type,r,A],N=[g,h];return Dn(e,..._,...N)},..._r([...S,...Object.getOwnPropertyNames(P)])})}}function Bc(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}m();c();p();d();f();function Xo(e,t,r,n){return e===De.ModelAction.findFirstOrThrow||e===De.ModelAction.findUniqueOrThrow?jc(t,r,n):n}function jc(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=ut({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new H(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof W&&o.code==="P2025"?new Me(`No ${e} found`,t):o})}}var qc=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Uc=["aggregate","count","groupBy"];function $n(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Vc(e,t),Jc(e,t),Ht(r),ne("name",()=>t),ne("$name",()=>t),ne("$parent",()=>e._appliedParent)];return Ae({},n)}function Vc(e,t){let r=Pe(t),n=Object.keys(De.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=Xo(o,t,e._clientVersion,s);let a=l=>u=>{let g=Ve(e._errorFormat);return e._createPrismaPromise(h=>{let P={args:u,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:h,callsite:g};return s({...P,...l})})};return qc.includes(o)?Dn(e,t,a):Qc(i)?Ho(e,i,a):a({})}}}function Qc(e){return Uc.includes(e)}function Jc(e,t){return He(ne("fields",()=>{let r=e._runtimeDataModel.models[t];return zo(t,r)}))}m();c();p();d();f();function es(e){return e.replace(/^./,t=>t.toUpperCase())}var Bn=Symbol();function Yt(e){let t=[Gc(e),ne(Bn,()=>e),ne("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Ht(r)),Ae(e,t)}function Gc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Pe),n=[...new Set(t.concat(r))];return He({getKeys(){return n},getPropertyValue(i){let o=es(i);if(e._runtimeDataModel.models[o]!==void 0)return $n(e,o);if(e._runtimeDataModel.models[i]!==void 0)return $n(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function ts(e){return e[Bn]?e[Bn]:e}function rs(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Yt(t)}m();c();p();d();f();m();c();p();d();f();function ns({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(g=>n[g]);u.length>0&&a.push(wt(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(wt(u))}Wc(e,l.needs)&&s.push(Kc(l,Ae(e,s)))}return s.length>0||a.length>0?Ae(e,[...s,...a]):e}function Wc(e,t){return t.every(r=>pn(e,r))}function Kc(e,t){return He(ne(e.name,()=>e.compute(t)))}m();c();p();d();f();function $r({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=$r({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function os({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:$r({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,l,u)=>{let g=Pe(l);return ns({result:a,modelName:g,select:u.select,omit:u.select?void 0:{...o?.[g],...u.omit},extensions:n})}})}m();c();p();d();f();m();c();p();d();f();function ss(e){if(e instanceof ae)return Hc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:ss(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=ds(o,l),a.args=s,ls(e,a,r,n+1)}})})}function us(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return ls(e,t,s)}function cs(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?ps(r,n,0,e):e(r)}}function ps(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=ds(i,l),ps(a,t,r+1,n)}})}var as=e=>e;function ds(e=as,t=as){return r=>e(t(r))}m();c();p();d();f();var fs=le("prisma:client"),ms={Vercel:"vercel","Netlify CI":"netlify"};function gs({postinstall:e,ciName:t,clientVersion:r}){if(fs("checkPlatformCaching:postinstall",e),fs("checkPlatformCaching:ciName",t),e===!0&&t&&t in ms){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${ms[t]}-build`;throw console.error(n),new V(n,r)}}m();c();p();d();f();function hs(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}m();c();p();d();f();m();c();p();d();f();m();c();p();d();f();var zc="Cloudflare-Workers",Yc="node";function ys(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===zc?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Yc?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Zc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function ws(){let e=ys();return{id:e,prettyName:Zc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}m();c();p();d();f();m();c();p();d();f();var jn=he(cn());m();c();p();d();f();function bs(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}m();c();p();d();f();function Es(e){return e.split(` +`).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` +`)}m();c();p();d();f();var xs=he(ji());function vs({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,xs.default)({user:t,repo:r,template:n,title:e,body:i})}function Ps({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=Ci(6e3-(s?.length??0)),l=Es((0,jn.default)(a)),u=n?`# Description +\`\`\` +${n} +\`\`\``:"",g=(0,jn.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: +## Versions + +| Name | Version | +|-----------------|--------------------| +| Node | ${y.version?.padEnd(19)}| +| OS | ${t?.padEnd(19)}| +| Prisma Client | ${e?.padEnd(19)}| +| Query Engine | ${i?.padEnd(19)}| +| Database | ${o?.padEnd(19)}| + +${u} + +## Logs +\`\`\` +${l} +\`\`\` + +## Client Snippet +\`\`\`ts +// PLEASE FILL YOUR CODE SNIPPET HERE +\`\`\` + +## Schema +\`\`\`prisma +// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE +\`\`\` + +## Prisma Engine Query +\`\`\` +${s?bs(s):""} +\`\`\` +`),h=vs({title:r,body:g});return`${r} + +This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. + +${At(h)} + +If you want the Prisma team to look into it, please open the link above \u{1F64F} +To increase the chance of success, please post your schema and a snippet of +how you used Prisma Client in the issue. +`}m();c();p();d();f();function Br({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new V(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new V("error: Missing URL environment variable, value, or override.",n);return i}m();c();p();d();f();m();c();p();d();f();function Ts(e){if(e?.kind==="itx")return e.options.id}m();c();p();d();f();var qn=class{constructor(t,r,n){this.engineObject=__PrismaProxy.create({datamodel:t.datamodel,env:y.env,ignoreEnvVarErrors:!0,datasourceOverrides:t.datasourceOverrides??{},logLevel:t.logLevel,logQueries:t.logQueries??!1,logCallback:r})}async connect(t){return __PrismaProxy.connect(this.engineObject,t)}async disconnect(t){return __PrismaProxy.disconnect(this.engineObject,t)}query(t,r,n){return __PrismaProxy.execute(this.engineObject,t,r,n)}sdlSchema(){return Promise.resolve("{}")}dmmf(t){return Promise.resolve("{}")}async startTransaction(t,r){return __PrismaProxy.startTransaction(this.engineObject,t,r)}async commitTransaction(t,r){return __PrismaProxy.commitTransaction(this.engineObject,t,r)}async rollbackTransaction(t,r){return __PrismaProxy.rollbackTransaction(this.engineObject,t,r)}metrics(t){return Promise.resolve("{}")}async applyPendingMigrations(){return __PrismaProxy.applyPendingMigrations(this.engineObject)}},Cs={async loadLibrary(e){if(!__PrismaProxy)throw new V("__PrismaProxy not detected make sure React Native bindings are installed",e.clientVersion);return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:qn}}};var Xc="P2036",Re=le("prisma:client:libraryEngine");function ep(e){return e.item_type==="query"&&"query"in e}function tp(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var bR=[...sn,"native"],Xt=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=Cs,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}async applyPendingMigrations(){await this.start(),await this.engine?.applyPendingMigrations()}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(rp(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new W(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(Re("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new K("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new K("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new b(this),{adapter:r}=this.config;r&&Re("Using driver adapter: %O",r),this.engine=new this.QueryEngineConstructor({datamodel:this.datamodel,env:y.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json"},n=>{t.deref()?.logger(n)},r)}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new V(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);if(r){if("span"in r){this.config.tracingHelper.createEngineSpan(r);return}r.level=r?.level.toLowerCase()??"unknown",ep(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):tp(r)?this.loggerRustPanic=new ue(Un(this,`${r.message}: ${r.reason} in ${r.file}:${r.line}:${r.column}`),this.config.clientVersion):this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path})}}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Re(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Re("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,Re("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new V(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Re("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),Re("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Re("library stopped")};return this.libraryStoppingPromise=this.config.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){Re(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new K(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof V)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new ue(Un(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new K(`${a.message} +${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){Re("requestBatch");let i=Lr(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Ts(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new K(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:l}=s;if(Array.isArray(a))return a.map(u=>u.errors&&u.errors.length>0?this.loggerRustPanic??this.buildQueryError(u.errors[0]):{data:u,elapsed:0});throw l&&l.length===1?new Error(l[0].error):new Error(JSON.stringify(s))}buildQueryError(t){if(t.user_facing_error.is_panic)return new ue(Un(this,t.user_facing_error.message),this.config.clientVersion);let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:Nr(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===Xc&&this.config.adapter){let r=t.meta?.id;ar(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return ar(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function rp(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Un(e,t){return Ps({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function As({copyEngine:e=!0},t){let r;try{r=Br({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&Lt("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=Mt(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",l=i==="binary";if(o&&s||s&&!1){let u;throw e?r?.startsWith("prisma://")?u=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:u=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:u=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new H(u.join(` +`),{clientVersion:t.clientVersion})}return new Xt(t)}m();c();p();d();f();function jr({generator:e}){return e?.previewFeatures??[]}m();c();p();d();f();var Rs=e=>({command:e});m();c();p();d();f();m();c();p();d();f();var Ss=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);m();c();p();d();f();function Et(e){try{return Os(e,"fast")}catch{return Os(e,"slow")}}function Os(e,t){return JSON.stringify(e.map(r=>Fs(r,t)))}function Fs(e,t){return Array.isArray(e)?e.map(r=>Fs(r,t)):typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:at(e)?{prisma__type:"date",prisma__value:e.toJSON()}:Ee.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:np(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Ms(e):e}function np(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Ms(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(ks);let t={};for(let r of Object.keys(e))t[r]=ks(e[r]);return t}function ks(e){return typeof e=="bigint"?e.toString():Ms(e)}m();c();p();d();f();var ip=["$connect","$disconnect","$on","$transaction","$use","$extends"],Is=ip;var op=/^(\s*alter\s)/i,_s=le("prisma:client");function Vn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&op.exec(t))throw new Error(`Running ALTER using ${n} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var Qn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(No(r))n=r.sql,i={values:Et(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:Et(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:Et(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:Et(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Ss(r),i={values:Et(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?_s(`prisma.${e}(${n}, ${i.values})`):_s(`prisma.${e}(${n})`),{query:n,parameters:i}},Ls={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ae(t,r)}},Ns={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};m();c();p();d();f();function Jn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=Ds(r(o)):Ds(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Ds(e){return typeof e.then=="function"?e:Promise.resolve(e)}m();c();p();d();f();var $s={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Gn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??$s}};function Bs(e){return e.includes("tracing")?new Gn:$s}m();c();p();d();f();function js(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}m();c();p();d();f();function qs(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}m();c();p();d();f();var qr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};m();c();p();d();f();var Qs=he(cn());m();c();p();d();f();function Ur(e){return typeof e.batchRequestIdx=="number"}m();c();p();d();f();function Us(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Wn(e.query.arguments)),t.push(Wn(e.query.selection)),t.join("")}function Wn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Wn(n)})`:r}).join(" ")})`}m();c();p();d();f();var sp={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function Kn(e){return sp[e]}m();c();p();d();f();var Vr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;ize("bigint",r));case"bytes-array":return t.map(r=>ze("bytes",r));case"decimal-array":return t.map(r=>ze("decimal",r));case"datetime-array":return t.map(r=>ze("datetime",r));case"date-array":return t.map(r=>ze("date",r));case"time-array":return t.map(r=>ze("time",r));default:return t}}function Vs(e){let t=[],r=ap(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(h=>Kn(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:up(o),containsWrite:u,customDataProxyFetch:i})).map((h,P)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[P],h)}catch(S){return S}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Js(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Kn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Us(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(lp(t),cp(t,i)||t instanceof Me)throw t;if(t instanceof W&&pp(t)){let u=Gs(t.meta);Sr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let l=t.message;if(n&&(l=ut({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:l})),l=this.sanitizeMessage(l),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new W(l,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ue(l,this.client._clientVersion);if(t instanceof K)throw new K(l,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof V)throw new V(l,this.client._clientVersion);if(t instanceof ue)throw new ue(l,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Qs.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(u=>u!=="select"&&u!=="include"),a=Nn(o,s),l=i==="queryRaw"?Vs(a):ot(a);return n?n(l):l}get[Symbol.toStringTag](){return"RequestHandler"}};function up(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Js(e)};Fe(e,"Unknown transaction kind")}}function Js(e){return{id:e.id,payload:e.payload}}function cp(e,t){return Ur(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function pp(e){return e.code==="P2009"||e.code==="P2012"}function Gs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Gs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}m();c();p();d();f();var Ws="5.22.0";var Ks=Ws;m();c();p();d();f();var Xs=he(En());m();c();p();d();f();var B=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};re(B,"PrismaClientConstructorValidationError");var Hs=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],zs=["pretty","colorless","minimal"],Ys=["info","query","warn","error"],fp={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new B(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=xt(r,t)||` Available datasources: ${t.join(", ")}`;throw new B(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new B(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new B(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new B(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new B('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!jr(t).includes("driverAdapters"))throw new B('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Mt()==="binary")throw new B('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new B(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new B(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!zs.includes(e)){let t=xt(e,zs);throw new B(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new B(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Ys.includes(r)){let n=xt(r,Ys);throw new B(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=xt(i,o);throw new B(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new B(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new B(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new B(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new B('"omit" option is expected to be an object.');if(e===null)throw new B('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=gp(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let l=o.fields.find(u=>u.name===s);if(!l){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(l.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new B(hp(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new B(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=xt(r,t);throw new B(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ea(e,t){for(let[r,n]of Object.entries(e)){if(!Hs.includes(r)){let i=xt(r,Hs);throw new B(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}fp[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new B('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function xt(e,t){if(t.length===0||typeof e!="string")return"";let r=mp(e,t);return r?` Did you mean "${r}"?`:""}function mp(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Xs.default)(e,i)}));r.sort((i,o)=>i.distancest(n)===t);if(r)return e[r]}function hp(e,t){let r=gt(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Rr(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}m();c();p();d();f();function ta(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=g,a()},g=>{if(!Ur(g)){l(g);return}g.batchRequestIdx===u?l(g):(i||(i=g),a())})})}var Qe=le("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var yp={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},wp=Symbol.for("prisma.client.transaction.id"),bp={id:0,nextId(){return++this.id}};function ia(e){class t{constructor(n){this._originalClient=this;this._middlewares=new qr;this._createPrismaPromise=Jn();this.$extends=rs;e=n?.__internal?.configOverride?.(e)??e,gs(e),n&&ea(n,e);let i=new sr().on("error",()=>{});this._extensions=ht.empty(),this._previewFeatures=jr(e),this._clientVersion=e.clientVersion??Ks,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=Bs(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&we.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&we.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=Fn(n.adapter);let l=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==l)throw new V(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new V("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},g=u.debug===!0;g&&le.enable("prisma:client");let h=we.resolve(e.dirname,e.relativePath);ir.existsSync(h)||(h=e.dirname),Qe("dirname",e.dirname),Qe("relativePath",e.relativePath),Qe("cwd",h);let P=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:P.allowTriggerPanic,datamodelPath:we.join(e.dirname,e.filename??"schema.prisma"),prismaPath:P.binaryPath??void 0,engineEndpoint:P.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&qs(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(S=>typeof S=="string"?S==="query":S.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:hs(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Br,getBatchRequestPayload:Lr,prismaGraphQLToJSError:Nr,PrismaClientUnknownRequestError:K,PrismaClientInitializationError:V,PrismaClientKnownRequestError:W,debug:le("prisma:client:accelerateEngine"),engineVersion:na.version,clientVersion:e.clientVersion}},Qe("clientVersion",e.clientVersion),this._engine=As(e,this._engineConfig),this._requestHandler=new Qr(this,i),l.log)for(let S of l.log){let C=typeof S=="string"?S:S.emit==="stdout"?S.level:null;C&&this.$on(C,A=>{_t.log(`${_t.tags[C]??""}`,A.message||A.query)})}this._metrics=new yt(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Yt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Ai()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Qn({clientMethod:i,activeProvider:a}),callsite:Ve(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ra(n,i);return Vn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new H("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Vn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new H(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Rs,callsite:Ve(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Qn({clientMethod:i,activeProvider:a}),callsite:Ve(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ra(n,i));throw new H("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new H("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=bp.nextId(),s=js(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:u,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return ta(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return Yt(Ae(ts(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>Jn(n)),ne(wp,()=>n.id),wt(Is)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??yp,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,F=>g(u,_=>(F?.end(),l(_))));let{runInTransaction:h,args:P,...S}=u,C={...n,...S};P&&(C.args=i.middlewareArgsToRequestArgs(P)),n.transaction!==void 0&&h===!1&&delete C.transaction;let A=await us(this,C);return C.model?os({result:A,modelName:C.model,args:C.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):A};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:g,unpacker:h,otelParentCtx:P,customDataProxyFetch:S}){try{n=u?u(n):n;let C={name:"serialize"},A=this._tracingHelper.runInChildSpan(C,()=>Fr({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return le.enabled("prisma:client")&&(Qe("Prisma Client call:"),Qe(`prisma.${i}(${Vo(n)})`),Qe("Generated request:"),Qe(JSON.stringify(A,null,2)+` +`)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:A,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:P,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:S})}catch(C){throw C.clientVersion=this._clientVersion,C}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new H("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function ra(e,t){return Ep(e)?[new ae(e,t),Ls]:[e,Ns]}function Ep(e){return Array.isArray(e)&&Array.isArray(e.raw)}m();c();p();d();f();var xp=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function oa(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!xp.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}m();c();p();d();f();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,deserializeJsonResponse,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +//# sourceMappingURL=react-native.js.map diff --git a/apps/api/release/vendor/@prisma/client/runtime/wasm.js b/apps/api/release/vendor/@prisma/client/runtime/wasm.js new file mode 100644 index 0000000..c3ed3bd --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/runtime/wasm.js @@ -0,0 +1,32 @@ +"use strict";var Uo=Object.create;var kt=Object.defineProperty;var qo=Object.getOwnPropertyDescriptor;var Bo=Object.getOwnPropertyNames;var $o=Object.getPrototypeOf,Vo=Object.prototype.hasOwnProperty;var se=(e,t)=>()=>(e&&(t=e(e=0)),t);var De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Mt=(e,t)=>{for(var r in t)kt(e,r,{get:t[r],enumerable:!0})},rn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Bo(t))!Vo.call(e,i)&&i!==r&&kt(e,i,{get:()=>t[i],enumerable:!(n=qo(t,i))||n.enumerable});return e};var Fe=(e,t,r)=>(r=e!=null?Uo($o(e)):{},rn(t||!e||!e.__esModule?kt(r,"default",{value:e,enumerable:!0}):r,e)),jo=e=>rn(kt({},"__esModule",{value:!0}),e);function gr(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new y(Wo.encode(e));if(t==="base64"||t==="base64url")return e=e.replace(/-/g,"+").replace(/_/g,"/"),e=e.replace(/[^A-Za-z0-9+/]/g,""),new y([...atob(e)].map(r=>r.charCodeAt(0)));if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return new y([...e].map(r=>r.charCodeAt(0)));if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let r=new y(e.length*2),n=new DataView(r.buffer);for(let i=0;ia.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,u)=>function(g=0){return B(g,"offset"),Y(g,"offset"),V(g,"offset",this.length-1),new DataView(this.buffer)[r[a]](g,u)},o=(a,u)=>function(g,T=0){let C=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),O=Go[C];return B(T,"offset"),Y(T,"offset"),V(T,"offset",this.length-1),Jo(g,"value",O[0],O[1]),new DataView(this.buffer)[r[a]](T,g,u),T+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(u=>{u.includes("Uint")&&(e[u.replace("Uint","UInt")]=e[u]),u.includes("Float64")&&(e[u.replace("Float64","Double")]=e[u]),u.includes("Float32")&&(e[u.replace("Float32","Float")]=e[u])})};n.forEach((a,u)=>{a.startsWith("read")&&(e[a]=i(u,!1),e[a+"LE"]=i(u,!0),e[a+"BE"]=i(u,!1)),a.startsWith("write")&&(e[a]=o(u,!1),e[a+"LE"]=o(u,!0),e[a+"BE"]=o(u,!1)),s([a,a+"LE",a+"BE"])})}function on(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function It(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function V(e,t,r=zo+1){if(e<0||e>r){let n=new RangeError(`The value of "${t}" is out of range. It must be >= 0 && <= ${r}. Received ${e}`);throw n.code="ERR_OUT_OF_RANGE",n}}function B(e,t){if(typeof e!="number"){let r=new TypeError(`The "${t}" argument must be of type number. Received type ${typeof e}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function Y(e,t){if(!Number.isInteger(e)||Number.isNaN(e)){let r=new RangeError(`The value of "${t}" is out of range. It must be an integer. Received ${e}`);throw r.code="ERR_OUT_OF_RANGE",r}}function Jo(e,t,r,n){if(en){let i=new RangeError(`The value of "${t}" is out of range. It must be >= ${r} and <= ${n}. Received ${e}`);throw i.code="ERR_OUT_OF_RANGE",i}}function nn(e,t){if(typeof e!="string"){let r=new TypeError(`The "${t}" argument must be of type string. Received type ${typeof e}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function Yo(e,t="utf8"){return y.from(e,t)}var y,Go,Wo,Ko,Ho,zo,b,hr,c=se(()=>{"use strict";y=class e extends Uint8Array{constructor(){super(...arguments);this._isBuffer=!0}get offset(){return this.byteOffset}static alloc(r,n=0,i="utf8"){return nn(i,"encoding"),e.allocUnsafe(r).fill(n,i)}static allocUnsafe(r){return e.from(r)}static allocUnsafeSlow(r){return e.from(r)}static isBuffer(r){return r&&!!r._isBuffer}static byteLength(r,n="utf8"){if(typeof r=="string")return gr(r,n).byteLength;if(r&&r.byteLength)return r.byteLength;let i=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw i.code="ERR_INVALID_ARG_TYPE",i}static isEncoding(r){return Ho.includes(r)}static compare(r,n){It(r,"buff1"),It(n,"buff2");for(let i=0;in[i])return 1}return r.length===n.length?0:r.length>n.length?1:-1}static from(r,n="utf8"){if(r&&typeof r=="object"&&r.type==="Buffer")return new e(r.data);if(typeof r=="number")return new e(new Uint8Array(r));if(typeof r=="string")return gr(r,n);if(ArrayBuffer.isView(r)){let{byteOffset:i,byteLength:o,buffer:s}=r;return"map"in r&&typeof r.map=="function"?new e(r.map(a=>a%256),i,o):new e(s,i,o)}if(r&&typeof r=="object"&&("length"in r||"byteLength"in r||"buffer"in r))return new e(r);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(r,n){if(r.length===0)return e.alloc(0);let i=[].concat(...r.map(s=>[...s])),o=e.alloc(n!==void 0?n:i.length);return o.set(n!==void 0?i.slice(0,n):i),o}slice(r=0,n=this.length){return this.subarray(r,n)}subarray(r=0,n=this.length){return Object.setPrototypeOf(super.subarray(r,n),e.prototype)}reverse(){return super.reverse(),this}readIntBE(r,n){B(r,"offset"),Y(r,"offset"),V(r,"offset",this.length-1),B(n,"byteLength"),Y(n,"byteLength");let i=new DataView(this.buffer,r,n),o=0;for(let s=0;s=0;s--)o.setUint8(s,r&255),r=r/256;return n+i}writeUintBE(r,n,i){return this.writeUIntBE(r,n,i)}writeUIntLE(r,n,i){B(n,"offset"),Y(n,"offset"),V(n,"offset",this.length-1),B(i,"byteLength"),Y(i,"byteLength");let o=new DataView(this.buffer,n,i);for(let s=0;sn===r[i])}copy(r,n=0,i=0,o=this.length){V(n,"targetStart"),V(i,"sourceStart",this.length),V(o,"sourceEnd"),n>>>=0,i>>>=0,o>>>=0;let s=0;for(;i=this.length?this.length-u:r.length),u);return this}includes(r,n=null,i="utf-8"){return this.indexOf(r,n,i)!==-1}lastIndexOf(r,n=null,i="utf-8"){return this.indexOf(r,n,i,!0)}indexOf(r,n=null,i="utf-8",o=!1){let s=o?this.findLastIndex.bind(this):this.findIndex.bind(this);i=typeof n=="string"?n:i;let a=e.from(typeof r=="number"?[r]:r,i),u=typeof n=="string"?0:n;return u=typeof n=="number"?u:null,u=Number.isNaN(u)?null:u,u??=o?this.length:0,u=u<0?this.length+u:u,a.length===0&&o===!1?u>=this.length?this.length:u:a.length===0&&o===!0?(u>=this.length?this.length:u)||this.length:s((g,T)=>(o?T<=u:T>=u)&&this[T]===a[0]&&a.every((O,A)=>this[T+A]===O))}toString(r="utf8",n=0,i=this.length){if(n=n<0?0:n,r=r.toString().toLowerCase(),i<=0)return"";if(r==="utf8"||r==="utf-8")return Ko.decode(this.slice(n,i));if(r==="base64"||r==="base64url"){let o=btoa(this.reduce((s,a)=>s+hr(a),""));return r==="base64url"?o.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):o}if(r==="binary"||r==="ascii"||r==="latin1"||r==="latin-1")return this.slice(n,i).reduce((o,s)=>o+hr(s&(r==="ascii"?127:255)),"");if(r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le"){let o=new DataView(this.buffer.slice(n,i));return Array.from({length:o.byteLength/2},(s,a)=>a*2+1o+s.toString(16).padStart(2,"0"),"");on(`encoding "${r}"`)}toLocaleString(){return this.toString()}inspect(){return``}};Go={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},Wo=new TextEncoder,Ko=new TextDecoder,Ho=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],zo=4294967295;Qo(y.prototype);b=new Proxy(Yo,{construct(e,[t,r]){return y.from(t,r)},get(e,t){return y[t]}}),hr=String.fromCodePoint});var h,m=se(()=>{"use strict";h={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var x,p=se(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,d=se(()=>{"use strict";E=()=>{};E.prototype=E});var w,f=se(()=>{"use strict";w=class{constructor(t){this.value=t}deref(){return this.value}}});function un(e,t){var r,n,i,o,s,a,u,g,T=e.constructor,C=T.precision;if(!e.s||!t.s)return t.s||(t=new T(e)),U?D(t,C):t;if(u=e.d,g=t.d,s=e.e,i=t.e,u=u.slice(),o=s-i,o){for(o<0?(n=u,o=-o,a=g.length):(n=g,i=s,a=u.length),s=Math.ceil(C/N),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=u.length,o=g.length,a-o<0&&(o=a,n=g,g=u,u=n),r=0;o;)r=(u[--o]=u[o]+g[o]+r)/Q|0,u[o]%=Q;for(r&&(u.unshift(r),++i),a=u.length;u[--a]==0;)u.pop();return t.d=u,t.e=i,U?D(t,C):t}function le(e,t,r){if(e!==~~e||er)throw Error(Oe+e)}function ae(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t16)throw Error(br+$(e));if(!e.s)return new T(Z);for(t==null?(U=!1,a=C):a=t,s=new T(.03125);e.abs().gte(.1);)e=e.times(s),g+=5;for(n=Math.log(Se(2,g))/Math.LN10*2+5|0,a+=n,r=i=o=new T(Z),T.precision=a;;){if(i=D(i.times(e),a),r=r.times(++u),s=o.plus(ye(i,r,a)),ae(s.d).slice(0,a)===ae(o.d).slice(0,a)){for(;g--;)o=D(o.times(o),a);return T.precision=C,t==null?(U=!0,D(o,C)):o}o=s}}function $(e){for(var t=e.e*N,r=e.d[0];r>=10;r/=10)t++;return t}function yr(e,t,r){if(t>e.LN10.sd())throw U=!0,r&&(e.precision=r),Error(re+"LN10 precision limit exceeded");return D(new e(e.LN10),t)}function Pe(e){for(var t="";e--;)t+="0";return t}function it(e,t){var r,n,i,o,s,a,u,g,T,C=1,O=10,A=e,M=A.d,S=A.constructor,I=S.precision;if(A.s<1)throw Error(re+(A.s?"NaN":"-Infinity"));if(A.eq(Z))return new S(0);if(t==null?(U=!1,g=I):g=t,A.eq(10))return t==null&&(U=!0),yr(S,g);if(g+=O,S.precision=g,r=ae(M),n=r.charAt(0),o=$(A),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(e),r=ae(A.d),n=r.charAt(0),C++;o=$(A),n>1?(A=new S("0."+r),o++):A=new S(n+"."+r.slice(1))}else return u=yr(S,g+2,I).times(o+""),A=it(new S(n+"."+r.slice(1)),g-O).plus(u),S.precision=I,t==null?(U=!0,D(A,I)):A;for(a=s=A=ye(A.minus(Z),A.plus(Z),g),T=D(A.times(A),g),i=3;;){if(s=D(s.times(T),g),u=a.plus(ye(s,new S(i),g)),ae(u.d).slice(0,g)===ae(a.d).slice(0,g))return a=a.times(2),o!==0&&(a=a.plus(yr(S,g+2,I).times(o+""))),a=ye(a,new S(C),g),S.precision=I,t==null?(U=!0,D(a,I)):a;a=u,i+=2}}function sn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Ue(r/N),e.d=[],n=(r+1)%N,r<0&&(n+=N),nLt||e.e<-Lt))throw Error(br+r)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,r){var n,i,o,s,a,u,g,T,C=e.d;for(s=1,o=C[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=N,i=t,g=C[T=0];else{if(T=Math.ceil((n+1)/N),o=C.length,T>=o)return e;for(g=o=C[T],s=1;o>=10;o/=10)s++;n%=N,i=n-N+s}if(r!==void 0&&(o=Se(10,s-i-1),a=g/o%10|0,u=t<0||C[T+1]!==void 0||g%o,u=r<4?(a||u)&&(r==0||r==(e.s<0?3:2)):a>5||a==5&&(r==4||u||r==6&&(n>0?i>0?g/Se(10,s-i):0:C[T-1])%10&1||r==(e.s<0?8:7))),t<1||!C[0])return u?(o=$(e),C.length=1,t=t-o-1,C[0]=Se(10,(N-t%N)%N),e.e=Ue(-t/N)||0):(C.length=1,C[0]=e.e=e.s=0),e;if(n==0?(C.length=T,o=1,T--):(C.length=T+1,o=Se(10,N-n),C[T]=i>0?(g/Se(10,s-i)%Se(10,i)|0)*o:0),u)for(;;)if(T==0){(C[0]+=o)==Q&&(C[0]=1,++e.e);break}else{if(C[T]+=o,C[T]!=Q)break;C[T--]=0,o=1}for(n=C.length;C[--n]===0;)C.pop();if(U&&(e.e>Lt||e.e<-Lt))throw Error(br+$(e));return e}function mn(e,t){var r,n,i,o,s,a,u,g,T,C,O=e.constructor,A=O.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new O(e),U?D(t,A):t;if(u=e.d,C=t.d,n=t.e,g=e.e,u=u.slice(),s=g-n,s){for(T=s<0,T?(r=u,s=-s,a=C.length):(r=C,n=g,a=u.length),i=Math.max(Math.ceil(A/N),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=u.length,a=C.length,T=i0;--i)u[a++]=0;for(i=C.length;i>s;){if(u[--i]0?o=o.charAt(0)+"."+o.slice(1)+Pe(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Pe(-i-1)+o,r&&(n=r-s)>0&&(o+=Pe(n))):i>=s?(o+=Pe(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Pe(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Pe(n))),e.s<0?"-"+o:o}function an(e,t){if(e.length>t)return e.length=t,!0}function pn(e){var t,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Oe+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return sn(s,o.toString())}else if(typeof o!="string")throw Error(Oe+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Zo.test(o))sn(s,o);else throw Error(Oe+o)}if(i.prototype=R,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=pn,i.config=i.set=es,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Oe+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Oe+r+": "+n);return this}var Ne,Xo,wr,U,re,Oe,br,Ue,Se,Zo,Z,Q,N,ln,Lt,R,ye,wr,_t,dn=se(()=>{"use strict";c();m();p();d();f();l();Ne=1e9,Xo={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},U=!0,re="[DecimalError] ",Oe=re+"Invalid argument: ",br=re+"Exponent out of range: ",Ue=Math.floor,Se=Math.pow,Zo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Q=1e7,N=7,ln=9007199254740991,Lt=Ue(ln/N),R={};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};R.decimalPlaces=R.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*N;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};R.dividedBy=R.div=function(e){return ye(this,new this.constructor(e))};R.dividedToIntegerBy=R.idiv=function(e){var t=this,r=t.constructor;return D(ye(t,new r(e),0,1),r.precision)};R.equals=R.eq=function(e){return!this.cmp(e)};R.exponent=function(){return $(this)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){return this.cmp(e)>=0};R.isInteger=R.isint=function(){return this.e>this.d.length-2};R.isNegative=R.isneg=function(){return this.s<0};R.isPositive=R.ispos=function(){return this.s>0};R.isZero=function(){return this.s===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Z))throw Error(re+"NaN");if(r.s<1)throw Error(re+(r.s?"NaN":"-Infinity"));return r.eq(Z)?new n(0):(U=!1,t=ye(it(r,o),it(e,o),o),U=!0,D(t,i))};R.minus=R.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?mn(t,e):un(t,(e.s=-e.s,e))};R.modulo=R.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(re+"NaN");return r.s?(U=!1,t=ye(r,e,0,1).times(e),U=!0,r.minus(t)):D(new n(r),i)};R.naturalExponential=R.exp=function(){return cn(this)};R.naturalLogarithm=R.ln=function(){return it(this)};R.negated=R.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};R.plus=R.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?un(t,e):mn(t,(e.s=-e.s,e))};R.precision=R.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Oe+e);if(t=$(i)+1,n=i.d.length-1,r=n*N+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s,a=this,u=a.constructor;if(a.s<1){if(!a.s)return new u(0);throw Error(re+"NaN")}for(e=$(a),U=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=ae(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Ue((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new u(t)):n=new u(i.toString()),r=u.precision,i=s=r+3;;)if(o=n,n=o.plus(ye(a,o,s+2)).times(.5),ae(o.d).slice(0,s)===(t=ae(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(D(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(t!="9999")break;s+=4}return U=!0,D(n,r)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,u,g,T=this,C=T.constructor,O=T.d,A=(e=new C(e)).d;if(!T.s||!e.s)return new C(0);for(e.s*=T.s,r=T.e+e.e,u=O.length,g=A.length,u=0;){for(t=0,i=u+n;i>n;)a=o[i]+A[n]*O[i-n-1]+t,o[i--]=a%Q|0,t=a/Q|0;o[i]=(o[i]+t)%Q|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,U?D(e,C.precision):e};R.toDecimalPlaces=R.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(le(e,0,Ne),t===void 0?t=n.rounding:le(t,0,8),D(r,e+$(r)+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ke(n,!0):(le(e,0,Ne),t===void 0?t=i.rounding:le(t,0,8),n=D(new i(n),e+1,t),r=ke(n,!0,e+1)),r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?ke(i):(le(e,0,Ne),t===void 0?t=o.rounding:le(t,0,8),n=D(new o(i),e+$(i)+1,t),r=ke(n.abs(),!1,e+$(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};R.toInteger=R.toint=function(){var e=this,t=e.constructor;return D(new t(e),$(e)+1,t.rounding)};R.toNumber=function(){return+this};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,u=a.constructor,g=12,T=+(e=new u(e));if(!e.s)return new u(Z);if(a=new u(a),!a.s){if(e.s<1)throw Error(re+"Infinity");return a}if(a.eq(Z))return a;if(n=u.precision,e.eq(Z))return D(a,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=a.s,s){if((r=T<0?-T:T)<=ln){for(i=new u(Z),t=Math.ceil(n/N+4),U=!1;r%2&&(i=i.times(a),an(i.d,t)),r=Ue(r/2),r!==0;)a=a.times(a),an(a.d,t);return U=!0,e.s<0?new u(Z).div(i):D(i,n)}}else if(o<0)throw Error(re+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,U=!1,i=e.times(it(a,n+g)),U=!0,i=cn(i),i.s=o,i};R.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=$(i),n=ke(i,r<=o.toExpNeg||r>=o.toExpPos)):(le(e,1,Ne),t===void 0?t=o.rounding:le(t,0,8),i=D(new o(i),e,t),r=$(i),n=ke(i,e<=r||r<=o.toExpNeg,e)),n};R.toSignificantDigits=R.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(le(e,1,Ne),t===void 0?t=n.rounding:le(t,0,8)),D(new n(r),e,t)};R.toString=R.valueOf=R.val=R.toJSON=R[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=$(e),r=e.constructor;return ke(e,t<=r.toExpNeg||t>=r.toExpPos)};ye=function(){function e(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%Q|0,s=o/Q|0;return s&&n.unshift(s),n}function t(n,i,o,s){var a,u;if(o!=s)u=o>s?1:-1;else for(a=u=0;ai[a]?1:-1;break}return u}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var a,u,g,T,C,O,A,M,S,I,ne,z,_e,k,Ae,fr,ie,St,Ot=n.constructor,No=n.s==i.s?1:-1,oe=n.d,q=i.d;if(!n.s)return new Ot(n);if(!i.s)throw Error(re+"Division by zero");for(u=n.e-i.e,ie=q.length,Ae=oe.length,A=new Ot(No),M=A.d=[],g=0;q[g]==(oe[g]||0);)++g;if(q[g]>(oe[g]||0)&&--u,o==null?z=o=Ot.precision:s?z=o+($(n)-$(i))+1:z=o,z<0)return new Ot(0);if(z=z/N+2|0,g=0,ie==1)for(T=0,q=q[0],z++;(g1&&(q=e(q,T),oe=e(oe,T),ie=q.length,Ae=oe.length),k=ie,S=oe.slice(0,ie),I=S.length;I=Q/2&&++fr;do T=0,a=t(q,S,ie,I),a<0?(ne=S[0],ie!=I&&(ne=ne*Q+(S[1]||0)),T=ne/fr|0,T>1?(T>=Q&&(T=Q-1),C=e(q,T),O=C.length,I=S.length,a=t(C,S,O,I),a==1&&(T--,r(C,ie{"use strict";dn();v=class extends _t{static isDecimal(t){return t instanceof _t}static random(t=20){{let n=crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new _t(`0.${n.slice(0,t)}`)}}},ue=v});function ts(){return!1}var rs,ns,yn,bn=se(()=>{"use strict";c();m();p();d();f();l();rs={},ns={existsSync:ts,promises:rs},yn=ns});function us(...e){return e.join("/")}function cs(...e){return e.join("/")}var In,ms,ps,st,Ln=se(()=>{"use strict";c();m();p();d();f();l();In="/",ms={sep:In},ps={resolve:us,posix:ms,join:cs,sep:In},st=ps});var Ut,Dn=se(()=>{"use strict";c();m();p();d();f();l();Ut=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Nn=De((Wc,Fn)=>{"use strict";c();m();p();d();f();l();Fn.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Bn=De((am,qn)=>{"use strict";c();m();p();d();f();l();qn.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Vn=De((fm,$n)=>{"use strict";c();m();p();d();f();l();var bs=Bn();$n.exports=e=>typeof e=="string"?e.replace(bs(),""):e});var kr=De((Mf,Jn)=>{"use strict";c();m();p();d();f();l();Jn.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s{fa.exports={name:"@prisma/engines-version",version:"5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"605197351a3c8bdd595af2d2a9bc3025bca48ea2"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.34",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Ei=De(()=>{"use strict";c();m();p();d();f();l()});var ul={};Mt(ul,{Debug:()=>Tr,Decimal:()=>ue,Extensions:()=>Er,MetricsClient:()=>Ze,NotFoundError:()=>we,PrismaClientInitializationError:()=>L,PrismaClientKnownRequestError:()=>J,PrismaClientRustPanicError:()=>Ee,PrismaClientUnknownRequestError:()=>G,PrismaClientValidationError:()=>j,Public:()=>xr,Sql:()=>X,defineDmmfProperty:()=>hi,deserializeJsonResponse:()=>$e,dmmfToRuntimeDataModel:()=>gi,empty:()=>Pi,getPrismaClient:()=>_o,getRuntime:()=>Ce,join:()=>xi,makeStrictEnum:()=>Do,makeTypedQueryFactory:()=>yi,objectEnumValues:()=>Wt,raw:()=>Vr,serializeJsonQuery:()=>Zt,skip:()=>Xt,sqltag:()=>jr,warnEnvConflicts:()=>void 0,warnOnce:()=>ct});module.exports=jo(ul);c();m();p();d();f();l();var Er={};Mt(Er,{defineExtension:()=>fn,getExtensionContext:()=>gn});c();m();p();d();f();l();c();m();p();d();f();l();function fn(e){return typeof e=="function"?e:t=>t.$extends(e)}c();m();p();d();f();l();function gn(e){return e}var xr={};Mt(xr,{validator:()=>hn});c();m();p();d();f();l();c();m();p();d();f();l();function hn(...e){return t=>t}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Pr,wn,En,xn,Pn=!0;typeof h<"u"&&({FORCE_COLOR:Pr,NODE_DISABLE_COLORS:wn,NO_COLOR:En,TERM:xn}=h.env||{},Pn=h.stdout&&h.stdout.isTTY);var is={enabled:!wn&&En==null&&xn!=="dumb"&&(Pr!=null&&Pr!=="0"||Pn)};function F(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!is.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var fu=F(0,0),Dt=F(1,22),Ft=F(2,22),gu=F(3,23),vn=F(4,24),hu=F(7,27),yu=F(8,28),bu=F(9,29),wu=F(30,39),qe=F(31,39),Tn=F(32,39),Cn=F(33,39),Rn=F(34,39),Eu=F(35,39),An=F(36,39),xu=F(37,39),Sn=F(90,39),Pu=F(90,39),vu=F(40,49),Tu=F(41,49),Cu=F(42,49),Ru=F(43,49),Au=F(44,49),Su=F(45,49),Ou=F(46,49),ku=F(47,49);c();m();p();d();f();l();var os=100,On=["green","yellow","blue","magenta","cyan","red"],Nt=[],kn=Date.now(),ss=0,vr=typeof h<"u"?h.env:{};globalThis.DEBUG??=vr.DEBUG??"";globalThis.DEBUG_COLORS??=vr.DEBUG_COLORS?vr.DEBUG_COLORS==="true":!0;var ot={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function as(e){let t={color:On[ss++%On.length],enabled:ot.enabled(e),namespace:e,log:ot.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Nt.push([o,...n]),Nt.length>os&&Nt.shift(),ot.enabled(o)||i){let u=n.map(T=>typeof T=="string"?T:ls(T)),g=`+${Date.now()-kn}ms`;kn=Date.now(),a(o,...u,g)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Tr=new Proxy(as,{get:(e,t)=>ot[t],set:(e,t,r)=>ot[t]=r});function ls(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Mn(){Nt.length=0}var ee=Tr;c();m();p();d();f();l();c();m();p();d();f();l();var Cr=["darwin","darwin-arm64","debian-openssl-1.0.x","debian-openssl-1.1.x","debian-openssl-3.0.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","rhel-openssl-3.0.x","linux-arm64-openssl-1.1.x","linux-arm64-openssl-1.0.x","linux-arm64-openssl-3.0.x","linux-arm-openssl-1.1.x","linux-arm-openssl-1.0.x","linux-arm-openssl-3.0.x","linux-musl","linux-musl-openssl-3.0.x","linux-musl-arm64-openssl-1.1.x","linux-musl-arm64-openssl-3.0.x","linux-nixos","linux-static-x64","linux-static-arm64","windows","freebsd11","freebsd12","freebsd13","freebsd14","freebsd15","openbsd","netbsd","arm"];c();m();p();d();f();l();var _n="library";function at(e){let t=ds();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":_n)}function ds(){let e=h.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}c();m();p();d();f();l();c();m();p();d();f();l();var Me;(t=>{let e;(k=>(k.findUnique="findUnique",k.findUniqueOrThrow="findUniqueOrThrow",k.findFirst="findFirst",k.findFirstOrThrow="findFirstOrThrow",k.findMany="findMany",k.create="create",k.createMany="createMany",k.createManyAndReturn="createManyAndReturn",k.update="update",k.updateMany="updateMany",k.upsert="upsert",k.delete="delete",k.deleteMany="deleteMany",k.groupBy="groupBy",k.count="count",k.aggregate="aggregate",k.findRaw="findRaw",k.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(Me||={});var ut={};Mt(ut,{error:()=>hs,info:()=>gs,log:()=>fs,query:()=>ys,should:()=>Un,tags:()=>lt,warn:()=>Rr});c();m();p();d();f();l();var lt={error:qe("prisma:error"),warn:Cn("prisma:warn"),info:An("prisma:info"),query:Rn("prisma:query")},Un={warn:()=>!h.env.PRISMA_DISABLE_WARNINGS};function fs(...e){console.log(...e)}function Rr(e,...t){Un.warn()&&console.warn(`${lt.warn} ${e}`,...t)}function gs(e,...t){console.info(`${lt.info} ${e}`,...t)}function hs(e,...t){console.error(`${lt.error} ${e}`,...t)}function ys(e,...t){console.log(`${lt.query} ${e}`,...t)}c();m();p();d();f();l();function qt(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}c();m();p();d();f();l();function be(e,t){throw new Error(t)}c();m();p();d();f();l();function Ar(e,t){return Object.prototype.hasOwnProperty.call(e,t)}c();m();p();d();f();l();var Sr=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});c();m();p();d();f();l();function Be(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}c();m();p();d();f();l();function Or(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{jn.has(e)||(jn.add(e),Rr(t,...r))};c();m();p();d();f();l();var J=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};K(J,"PrismaClientKnownRequestError");var we=class extends J{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};K(we,"NotFoundError");c();m();p();d();f();l();var L=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};K(L,"PrismaClientInitializationError");c();m();p();d();f();l();var Ee=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};K(Ee,"PrismaClientRustPanicError");c();m();p();d();f();l();var G=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};K(G,"PrismaClientUnknownRequestError");c();m();p();d();f();l();var j=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};K(j,"PrismaClientValidationError");c();m();p();d();f();l();l();function $e(e){return e===null?e:Array.isArray(e)?e.map($e):typeof e=="object"?ws(e)?Es(e):Be(e,$e):e}function ws(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Es({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return b.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ue(t);case"Json":return JSON.parse(t);default:be(t,"Unknown tagged value")}}c();m();p();d();f();l();c();m();p();d();f();l();function Ve(e){return e.substring(0,1).toLowerCase()+e.substring(1)}c();m();p();d();f();l();function je(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Bt(e){return e.toString()!=="Invalid Date"}c();m();p();d();f();l();l();function Qe(e){return v.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&typeof e.toFixed=="function"&&Array.isArray(e.d)}c();m();p();d();f();l();c();m();p();d();f();l();var xs=Fe(Nn());var Ps={red:qe,gray:Sn,dim:Ft,bold:Dt,underline:vn,highlightSource:e=>e.highlight()},vs={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Ts({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Cs({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],u=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${u}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${u}`)),t&&a.push(s.underline(Rs(t))),i){a.push("");let g=[i.toString()];o&&(g.push(o),g.push(s.dim(")"))),a.push(g.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` +`)}function Rs(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Je(e){let t=e.showColors?Ps:vs,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Ts(e),Cs(r,t)}c();m();p();d();f();l();var Yn=Fe(kr());c();m();p();d();f();l();function Kn(e,t,r){let n=Hn(e),i=As(n),o=Os(i);o?$t(o,t,r):t.addErrorMessage(()=>"Unknown error")}function Hn(e){return e.errors.flatMap(t=>t.kind==="Union"?Hn(t):[t])}function As(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Ss(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Ss(e,t){return[...new Set(e.concat(t))]}function Os(e){return Or(e,(t,r)=>{let n=Gn(t),i=Gn(r);return n!==i?n-i:Wn(t)-Wn(r)})}function Gn(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Wn(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}c();m();p();d();f();l();var te=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};c();m();p();d();f();l();c();m();p();d();f();l();var Ge=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r,n=(i,o)=>o.write(i)){let i=r.length-1;for(let o=0;o0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` +`)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};c();m();p();d();f();l();c();m();p();d();f();l();var Vt=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};c();m();p();d();f();l();var jt=e=>e,Qt={bold:jt,red:jt,green:jt,dim:jt,enabled:!1},zn={bold:Dt,red:qe,green:Tn,dim:Ft,enabled:!0},We={write(e){e.writeLine(",")}};c();m();p();d();f();l();var ce=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};c();m();p();d();f();l();var ve=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Ke=class extends ve{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Vt(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new ce("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(We,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var He=class e extends ve{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let u;if(s.value instanceof e?u=s.value.getField(a):s.value instanceof Ke&&(u=s.value.getField(Number(a))),!u)return;s=u}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new ce("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(We,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};c();m();p();d();f();l();var W=class extends ve{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new ce(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};c();m();p();d();f();l();var mt=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(We,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function $t(e,t,r){switch(e.kind){case"MutuallyExclusiveFields":Ms(e,t);break;case"IncludeOnScalar":Is(e,t);break;case"EmptySelection":Ls(e,t,r);break;case"UnknownSelectionField":Ns(e,t);break;case"InvalidSelectionValue":Us(e,t);break;case"UnknownArgument":qs(e,t);break;case"UnknownInputField":Bs(e,t);break;case"RequiredArgumentMissing":$s(e,t);break;case"InvalidArgumentType":Vs(e,t);break;case"InvalidArgumentValue":js(e,t);break;case"ValueTooLarge":Qs(e,t);break;case"SomeFieldsMissing":Js(e,t);break;case"TooManyFieldsGiven":Gs(e,t);break;case"Union":Kn(e,t,r);break;default:throw new Error("not implemented: "+e.kind)}}function Ms(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Is(e,t){let[r,n]=pt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new te(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${dt(s)}`:a+=".",a+=` +Note that ${s.bold("include")} statements only accept relation fields.`,a})}function Ls(e,t,r){let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getField("omit")?.value.asObject();if(i){_s(e,t,i);return}if(n.hasField("select")){Ds(e,t);return}}if(r?.[Ve(e.outputType.name)]){Fs(e,t);return}t.addErrorMessage(()=>`Unknown field at "${e.selectionPath.join(".")} selection"`)}function _s(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new te(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Ds(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),ei(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${dt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Fs(e,t){let r=new mt;for(let i of e.outputType.fields)i.isRelation||r.addField(i.name,"false");let n=new te("omit",r).makeRequired();if(e.selectionPath.length===0)t.arguments.addSuggestion(n);else{let[i,o]=pt(e.selectionPath),a=t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o);if(a){let u=a?.value.asObject()??new He;u.addSuggestion(n),a.value=u}}t.addErrorMessage(i=>`The global ${i.red("omit")} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result`)}function Ns(e,t){let r=ti(e.selectionPath,t);if(r.parentKind!=="unknown"){r.field.markAsError();let n=r.parent;switch(r.parentKind){case"select":ei(n,e.outputType);break;case"include":Ws(n,e.outputType);break;case"omit":Ks(n,e.outputType);break}}t.addErrorMessage(n=>{let i=[`Unknown field ${n.red(`\`${r.fieldName}\``)}`];return r.parentKind!=="unknown"&&i.push(`for ${n.bold(r.parentKind)} statement`),i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`),i.push(dt(n)),i.join(" ")})}function Us(e,t){let r=ti(e.selectionPath,t);r.parentKind!=="unknown"&&r.field.value.markAsError(),t.addErrorMessage(n=>`Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)}function qs(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Hs(n,e.arguments)),t.addErrorMessage(i=>Xn(i,r,e.arguments.map(o=>o.name)))}function Bs(e,t){let[r,n]=pt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&ri(o,e.inputType)}t.addErrorMessage(o=>Xn(o,n,e.inputType.fields.map(s=>s.name)))}function Xn(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Ys(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(dt(e)),n.join(" ")}function $s(e,t){let r;t.addErrorMessage(u=>r?.value instanceof W&&r.value.text==="null"?`Argument \`${u.green(o)}\` must not be ${u.red("null")}.`:`Argument \`${u.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=pt(e.argumentPath),s=new mt,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let u of e.inputTypes[0].fields)s.addField(u.name,u.typeNames.join(" | "));a.addSuggestion(new te(o,s).makeRequired())}else{let u=e.inputTypes.map(Zn).join(" | ");a.addSuggestion(new te(o,u).makeRequired())}}function Zn(e){return e.kind==="list"?`${Zn(e.elementType)}[]`:e.name}function Vs(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Jt("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function js(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Jt("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Qs(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof W&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Js(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&ri(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Jt("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(dt(i)),o.join(" ")})}function Gs(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Jt("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function ei(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new te(r.name,"true"))}function Ws(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new te(r.name,"true"))}function Ks(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new te(r.name,"true"))}function Hs(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new te(r.name,r.typeNames.join(" | ")))}function ti(e,t){let[r,n]=pt(e),i=t.arguments.getDeepSubSelectionValue(r)?.asObject();if(!i)return{parentKind:"unknown",fieldName:n};let o=i.getFieldValue("select")?.asObject(),s=i.getFieldValue("include")?.asObject(),a=i.getFieldValue("omit")?.asObject(),u=o?.getField(n);return o&&u?{parentKind:"select",parent:o,field:u,fieldName:n}:(u=s?.getField(n),s&&u?{parentKind:"include",field:u,parent:s,fieldName:n}:(u=a?.getField(n),a&&u?{parentKind:"omit",field:u,parent:a,fieldName:n}:{parentKind:"unknown",fieldName:n}))}function ri(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new te(r.name,r.typeNames.join(" | ")))}function pt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function dt({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Jt(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var zs=3;function Ys(e,t){let r=1/0,n;for(let i of t){let o=(0,Yn.default)(e,i);o>zs||o`}};function ze(e){return e instanceof ft}c();m();p();d();f();l();var Gt=Symbol(),Mr=new WeakMap,xe=class{constructor(t){t===Gt?Mr.set(this,`Prisma.${this._getName()}`):Mr.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Mr.get(this)}},gt=class extends xe{_getNamespace(){return"NullTypes"}},ht=class extends gt{};Ir(ht,"DbNull");var yt=class extends gt{};Ir(yt,"JsonNull");var bt=class extends gt{};Ir(bt,"AnyNull");var Wt={classes:{DbNull:ht,JsonNull:yt,AnyNull:bt},instances:{DbNull:new ht(Gt),JsonNull:new yt(Gt),AnyNull:new bt(Gt)}};function Ir(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}c();m();p();d();f();l();var ii=": ",Kt=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+ii.length}write(t){let r=new ce(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(ii).write(this.value)}};var Lr=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` +`)}};function Ye(e){return new Lr(oi(e))}function oi(e){let t=new He;for(let[r,n]of Object.entries(e)){let i=new Kt(r,si(n));t.addField(i)}return t}function si(e){if(typeof e=="string")return new W(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new W(String(e));if(typeof e=="bigint")return new W(`${e}n`);if(e===null)return new W("null");if(e===void 0)return new W("undefined");if(Qe(e))return new W(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return b.isBuffer(e)?new W(`Buffer.alloc(${e.byteLength})`):new W(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Bt(e)?e.toISOString():"Invalid Date";return new W(`new Date("${t}")`)}return e instanceof xe?new W(`Prisma.${e._getName()}`):ze(e)?new W(`prisma.${ni(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Xs(e):typeof e=="object"?oi(e):new W(Object.prototype.toString.call(e))}function Xs(e){let t=new Ke;for(let r of e)t.addItem(si(r));return t}function Ht(e,t){let r=t==="pretty"?zn:Qt,n=e.renderAllMessages(r),i=new Ge(0,{colors:r}).write(e).toString();return{message:n,args:i}}function zt({args:e,errors:t,errorFormat:r,callsite:n,originalMethod:i,clientVersion:o,globalOmit:s}){let a=Ye(e);for(let C of t)$t(C,a,s);let{message:u,args:g}=Ht(a,r),T=Je({message:u,callsite:n,originalMethod:i,showColors:r==="pretty",callArguments:g});throw new j(T,{clientVersion:o})}c();m();p();d();f();l();c();m();p();d();f();l();var me=class{constructor(){this._map=new Map}get(t){return this._map.get(t)?.value}set(t,r){this._map.set(t,{value:r})}getOrCreate(t,r){let n=this._map.get(t);if(n)return n.value;let i=r();return this.set(t,i),i}};c();m();p();d();f();l();function wt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}c();m();p();d();f();l();function pe(e){return e.replace(/^./,t=>t.toLowerCase())}c();m();p();d();f();l();function li(e,t,r){let n=pe(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Zs({...e,...ai(t.name,e,t.result.$allModels),...ai(t.name,e,t.result[n])})}function Zs(e){let t=new me,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Be(e,n=>({...n,needs:r(n.name,new Set)}))}function ai(e,t,r){return r?Be(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:ea(t,o,i)})):{}}function ea(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function ui(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function ci(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Yt=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new me;this.modelExtensionsCache=new me;this.queryCallbacksCache=new me;this.clientExtensions=wt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=wt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>li(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=pe(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Xe=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Yt(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Yt(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};c();m();p();d();f();l();c();m();p();d();f();l();var mi=Symbol(),Et=class{constructor(t){if(t!==mi)throw new Error("Skip instance can not be constructed directly")}ifUndefined(t){return t===void 0?Xt:t}},Xt=new Et(mi);function de(e){return e instanceof Et}var ta={findUnique:"findUnique",findUniqueOrThrow:"findUniqueOrThrow",findFirst:"findFirst",findFirstOrThrow:"findFirstOrThrow",findMany:"findMany",count:"aggregate",create:"createOne",createMany:"createMany",createManyAndReturn:"createManyAndReturn",update:"updateOne",updateMany:"updateMany",upsert:"upsertOne",delete:"deleteOne",deleteMany:"deleteMany",executeRaw:"executeRaw",queryRaw:"queryRaw",aggregate:"aggregate",groupBy:"groupBy",runCommandRaw:"runCommandRaw",findRaw:"findRaw",aggregateRaw:"aggregateRaw"},pi="explicitly `undefined` values are not allowed";function Zt({modelName:e,action:t,args:r,runtimeDataModel:n,extensions:i=Xe.empty(),callsite:o,clientMethod:s,errorFormat:a,clientVersion:u,previewFeatures:g,globalOmit:T}){let C=new _r({runtimeDataModel:n,modelName:e,action:t,rootArgs:r,callsite:o,extensions:i,selectionPath:[],argumentPath:[],originalMethod:s,errorFormat:a,clientVersion:u,previewFeatures:g,globalOmit:T});return{modelName:e,action:ta[t],query:xt(r,C)}}function xt({select:e,include:t,...r}={},n){let i;return n.isPreviewFeatureOn("omitApi")&&(i=r.omit,delete r.omit),{arguments:fi(r,n),selection:ra(e,t,i,n)}}function ra(e,t,r,n){return e?(t?n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"include",secondField:"select",selectionPath:n.getSelectionPath()}):r&&n.isPreviewFeatureOn("omitApi")&&n.throwValidationError({kind:"MutuallyExclusiveFields",firstField:"omit",secondField:"select",selectionPath:n.getSelectionPath()}),sa(e,n)):na(n,t,r)}function na(e,t,r){let n={};return e.modelOrType&&!e.isRawAction()&&(n.$composites=!0,n.$scalars=!0),t&&ia(n,t,e),e.isPreviewFeatureOn("omitApi")&&oa(n,r,e),n}function ia(e,t,r){for(let[n,i]of Object.entries(t)){if(de(i))continue;let o=r.nestSelection(n);if(Dr(i,o),i===!1||i===void 0){e[n]=!1;continue}let s=r.findField(n);if(s&&s.kind!=="object"&&r.throwValidationError({kind:"IncludeOnScalar",selectionPath:r.getSelectionPath().concat(n),outputType:r.getOutputTypeDescription()}),s){e[n]=xt(i===!0?{}:i,o);continue}if(i===!0){e[n]=!0;continue}e[n]=xt(i,o)}}function oa(e,t,r){let n=r.getComputedFields(),i={...r.getGlobalOmit(),...t},o=ci(i,n);for(let[s,a]of Object.entries(o)){if(de(a))continue;Dr(a,r.nestSelection(s));let u=r.findField(s);n?.[s]&&!u||(e[s]=!a)}}function sa(e,t){let r={},n=t.getComputedFields(),i=ui(e,n);for(let[o,s]of Object.entries(i)){if(de(s))continue;let a=t.nestSelection(o);Dr(s,a);let u=t.findField(o);if(!(n?.[o]&&!u)){if(s===!1||s===void 0||de(s)){r[o]=!1;continue}if(s===!0){u?.kind==="object"?r[o]=xt({},a):r[o]=!0;continue}r[o]=xt(s,a)}}return r}function di(e,t){if(e===null)return null;if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="bigint")return{$type:"BigInt",value:String(e)};if(je(e)){if(Bt(e))return{$type:"DateTime",value:e.toISOString()};t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:["Date"]},underlyingError:"Provided Date object is invalid"})}if(ze(e))return{$type:"FieldRef",value:{_ref:e.name,_container:e.modelName}};if(Array.isArray(e))return aa(e,t);if(ArrayBuffer.isView(e))return{$type:"Bytes",value:b.from(e).toString("base64")};if(la(e))return e.values;if(Qe(e))return{$type:"Decimal",value:e.toFixed()};if(e instanceof xe){if(e!==Wt.instances[e._getName()])throw new Error("Invalid ObjectEnumValue");return{$type:"Enum",value:e._getName()}}if(ua(e))return e.toJSON();if(typeof e=="object")return fi(e,t);t.throwValidationError({kind:"InvalidArgumentValue",selectionPath:t.getSelectionPath(),argumentPath:t.getArgumentPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:`We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`})}function fi(e,t){if(e.$type)return{$type:"Raw",value:e};let r={};for(let n in e){let i=e[n],o=t.nestArgument(n);de(i)||(i!==void 0?r[n]=di(i,o):t.isPreviewFeatureOn("strictUndefinedChecks")&&t.throwValidationError({kind:"InvalidArgumentValue",argumentPath:o.getArgumentPath(),selectionPath:t.getSelectionPath(),argument:{name:t.getArgumentName(),typeNames:[]},underlyingError:pi}))}return r}function aa(e,t){let r=[];for(let n=0;n({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.modelOrType?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}getGlobalOmit(){return this.params.modelName&&this.shouldApplyGlobalOmit()?this.params.globalOmit?.[Ve(this.params.modelName)]??{}:{}}shouldApplyGlobalOmit(){switch(this.params.action){case"findFirst":case"findFirstOrThrow":case"findUniqueOrThrow":case"findMany":case"upsert":case"findUnique":case"createManyAndReturn":case"create":case"update":case"delete":return!0;case"executeRaw":case"aggregateRaw":case"runCommandRaw":case"findRaw":case"createMany":case"deleteMany":case"groupBy":case"updateMany":case"count":case"aggregate":case"queryRaw":return!1;default:be(this.params.action,"Unknown action")}}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};c();m();p();d();f();l();var Ze=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};c();m();p();d();f();l();function gi(e){return{models:Fr(e.models),enums:Fr(e.enums),types:Fr(e.types)}}function Fr(e){let t={};for(let{name:r,...n}of e)t[r]=n;return t}function hi(e,t){let r=wt(()=>ca(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function ca(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Nr(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}c();m();p();d();f();l();var Ur=new WeakMap,er="$$PrismaTypedSql",qr=class{constructor(t,r){Ur.set(this,{sql:t,values:r}),Object.defineProperty(this,er,{value:er})}get sql(){return Ur.get(this).sql}get values(){return Ur.get(this).values}};function yi(e){return(...t)=>new qr(e,t)}function bi(e){return e!=null&&e[er]===er}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();function Pt(e){return{ok:!1,error:e,map(){return Pt(e)},flatMap(){return Pt(e)}}}var Br=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},$r=e=>{let t=new Br,r=fe(t,e.transactionContext.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:fe(t,e.queryRaw.bind(e)),executeRaw:fe(t,e.executeRaw.bind(e)),provider:e.provider,transactionContext:async(...i)=>(await r(...i)).map(s=>ma(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=da(t,e.getConnectionInfo.bind(e))),n},ma=(e,t)=>{let r=fe(e,t.startTransaction.bind(t));return{adapterName:t.adapterName,provider:t.provider,queryRaw:fe(e,t.queryRaw.bind(t)),executeRaw:fe(e,t.executeRaw.bind(t)),startTransaction:async(...n)=>(await r(...n)).map(o=>pa(e,o))}},pa=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:fe(e,t.queryRaw.bind(t)),executeRaw:fe(e,t.executeRaw.bind(t)),commit:fe(e,t.commit.bind(t)),rollback:fe(e,t.rollback.bind(t))});function fe(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return Pt({kind:"GenericJs",id:i})}}}function da(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return Pt({kind:"GenericJs",id:i})}}}var Lo=Fe(wi());var ek=Fe(Ei());Dn();bn();Ln();c();m();p();d();f();l();var X=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}c();m();p();d();f();l();c();m();p();d();f();l();var tr={enumerable:!0,configurable:!0,writable:!0};function rr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>tr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var vi=Symbol.for("nodejs.util.inspect.custom");function ge(e,t){let r=ga(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Ti(Reflect.ownKeys(o),r),a=Ti(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let u=r.get(s);return u?u.getPropertyDescriptor?{...tr,...u?.getPropertyDescriptor(s)}:tr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[vi]=function(){let o={...this};return delete o[vi],o},i}function ga(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Ti(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}c();m();p();d();f();l();function et(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}c();m();p();d();f();l();function nr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}c();m();p();d();f();l();function Ci(e){if(e===void 0)return"";let t=Ye(e);return new Ge(0,{colors:Qt}).write(t).toString()}c();m();p();d();f();l();var ha="P2037";function ir({error:e,user_facing_error:t},r,n){return t.error_code?new J(ya(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new G(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function ya(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===ha&&(r+=` +Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Qr=class{getLocation(){return null}};function Te(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Qr}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Ri={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function tt(e={}){let t=wa(e);return Object.entries(t).reduce((n,[i,o])=>(Ri[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function wa(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function or(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Ai(e,t){let r=or(e);return t({action:"aggregate",unpacker:r,argsMapper:tt})(e)}c();m();p();d();f();l();function Ea(e={}){let{select:t,...r}=e;return typeof t=="object"?tt({...r,_count:t}):tt({...r,_count:{_all:!0}})}function xa(e={}){return typeof e.select=="object"?t=>or(e)(t)._count:t=>or(e)(t)._count._all}function Si(e,t){return t({action:"count",unpacker:xa(e),argsMapper:Ea})(e)}c();m();p();d();f();l();function Pa(e={}){let t=tt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function va(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Oi(e,t){return t({action:"groupBy",unpacker:va(e),argsMapper:Pa})(e)}function ki(e,t,r){if(t==="aggregate")return n=>Ai(n,r);if(t==="count")return n=>Si(n,r);if(t==="groupBy")return n=>Oi(n,r)}c();m();p();d();f();l();function Mi(e,t){let r=t.fields.filter(i=>!i.relationName),n=Sr(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new ft(e,o,s.type,s.isList,s.kind==="enum")},...rr(Object.keys(n))})}c();m();p();d();f();l();c();m();p();d();f();l();var Ii=e=>Array.isArray(e)?e:e.split("."),Jr=(e,t)=>Ii(t).reduce((r,n)=>r&&r[n],e),Li=(e,t,r)=>Ii(t).reduceRight((n,i,o,s)=>Object.assign({},Jr(e,s.slice(0,o)),{[i]:n}),r);function Ta(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Ca(e,t,r){return t===void 0?e??{}:Li(t,r,e||!0)}function Gr(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((u,g)=>({...u,[g.name]:g}),{});return u=>{let g=Te(e._errorFormat),T=Ta(n,i),C=Ca(u,o,T),O=r({dataPath:T,callsite:g})(C),A=Ra(e,t);return new Proxy(O,{get(M,S){if(!A.includes(S))return M[S];let ne=[a[S].type,r,S],z=[T,C];return Gr(e,...ne,...z)},...rr([...A,...Object.getOwnPropertyNames(O)])})}}function Ra(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}c();m();p();d();f();l();function _i(e,t,r,n){return e===Me.ModelAction.findFirstOrThrow||e===Me.ModelAction.findUniqueOrThrow?Aa(t,r,n):n}function Aa(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=Je({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new j(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof J&&o.code==="P2025"?new we(`No ${e} found`,t):o})}}var Sa=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Oa=["aggregate","count","groupBy"];function Wr(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[ka(e,t),Ia(e,t),vt(r),H("name",()=>t),H("$name",()=>t),H("$parent",()=>e._appliedParent)];return ge({},n)}function ka(e,t){let r=pe(t),n=Object.keys(Me.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=u=>e._request(u);s=_i(o,t,e._clientVersion,s);let a=u=>g=>{let T=Te(e._errorFormat);return e._createPrismaPromise(C=>{let O={args:g,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:C,callsite:T};return s({...O,...u})})};return Sa.includes(o)?Gr(e,t,a):Ma(i)?ki(e,i,a):a({})}}}function Ma(e){return Oa.includes(e)}function Ia(e,t){return Ie(H("fields",()=>{let r=e._runtimeDataModel.models[t];return Mi(t,r)}))}c();m();p();d();f();l();function Di(e){return e.replace(/^./,t=>t.toUpperCase())}var Kr=Symbol();function Tt(e){let t=[La(e),H(Kr,()=>e),H("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(vt(r)),ge(e,t)}function La(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(pe),n=[...new Set(t.concat(r))];return Ie({getKeys(){return n},getPropertyValue(i){let o=Di(i);if(e._runtimeDataModel.models[o]!==void 0)return Wr(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Wr(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Fi(e){return e[Kr]?e[Kr]:e}function Ni(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Tt(t)}c();m();p();d();f();l();c();m();p();d();f();l();function Ui({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let u of Object.values(o)){if(n){if(n[u.name])continue;let g=u.needs.filter(T=>n[T]);g.length>0&&a.push(et(g))}else if(r){if(!r[u.name])continue;let g=u.needs.filter(T=>!r[T]);g.length>0&&a.push(et(g))}_a(e,u.needs)&&s.push(Da(u,ge(e,s)))}return s.length>0||a.length>0?ge(e,[...s,...a]):e}function _a(e,t){return t.every(r=>Ar(e,r))}function Da(e,t){return Ie(H(e.name,()=>e.compute(t)))}c();m();p();d();f();l();function sr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sT.name===o);if(!u||u.kind!=="object"||!u.relationName)continue;let g=typeof s=="object"?s:{};t[o]=sr({visitor:i,result:t[o],args:g,modelName:u.type,runtimeDataModel:n})}}function Bi({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i,globalOmit:o}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:sr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(a,u,g)=>{let T=pe(u);return Ui({result:a,modelName:T,select:g.select,omit:g.select?void 0:{...o?.[T],...g.omit},extensions:n})}})}c();m();p();d();f();l();c();m();p();d();f();l();l();function $i(e){if(e instanceof X)return Fa(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:$i(t.args??{}),__internalParams:t,query:(s,a=t)=>{let u=a.customDataProxyFetch;return a.customDataProxyFetch=Wi(o,u),a.args=s,ji(e,a,r,n+1)}})})}function Qi(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return ji(e,t,s)}function Ji(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Gi(r,n,0,e):e(r)}}function Gi(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let u=a.customDataProxyFetch;return a.customDataProxyFetch=Wi(i,u),Gi(a,t,r+1,n)}})}var Vi=e=>e;function Wi(e=Vi,t=Vi){return r=>e(t(r))}c();m();p();d();f();l();var Ki=ee("prisma:client"),Hi={Vercel:"vercel","Netlify CI":"netlify"};function zi({postinstall:e,ciName:t,clientVersion:r}){if(Ki("checkPlatformCaching:postinstall",e),Ki("checkPlatformCaching:ciName",t),e===!0&&t&&t in Hi){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. + +Learn how: https://pris.ly/d/${Hi[t]}-build`;throw console.error(n),new L(n,r)}}c();m();p();d();f();l();function Yi(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}c();m();p();d();f();l();c();m();p();d();f();l();c();m();p();d();f();l();var Na="Cloudflare-Workers",Ua="node";function Xi(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Na?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Ua?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var qa={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)"};function Ce(){let e=Xi();return{id:e,prettyName:qa[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}c();m();p();d();f();l();c();m();p();d();f();l();function ar({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Ce().id==="workerd"?new L(`error: Environment variable not found: ${s.fromEnvVar}. + +In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. +To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new L(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new L("error: Missing URL environment variable, value, or override.",n);return i}c();m();p();d();f();l();c();m();p();d();f();l();function Zi(e){if(e?.kind==="itx")return e.options.id}c();m();p();d();f();l();var Hr,eo={async loadLibrary(e){let{clientVersion:t,adapter:r,engineWasm:n}=e;if(r===void 0)throw new L(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Ce().prettyName})`,t);if(n===void 0)throw new L("WASM engine was unexpectedly `undefined`",t);Hr===void 0&&(Hr=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new L("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let a={"./query_engine_bg.js":o},u=new WebAssembly.Instance(s,a);return o.__wbg_set_wasm(u.exports),o.QueryEngine})());let i=await Hr;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Ba="P2036",he=ee("prisma:client:libraryEngine");function $a(e){return e.item_type==="query"&&"query"in e}function Va(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var VR=[...Cr,"native"],Rt=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=r??eo,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary()}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(ja(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new J(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(he("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new G("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new G("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new w(this),{adapter:r}=this.config;r&&he("Using driver adapter: %O",r),this.engine=new this.QueryEngineConstructor({datamodel:this.datamodel,env:h.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json"},n=>{t.deref()?.logger(n)},r)}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new L(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);if(r){if("span"in r){this.config.tracingHelper.createEngineSpan(r);return}r.level=r?.level.toLowerCase()??"unknown",$a(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(Va(r),this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path}))}}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return he(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{he("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,he("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new L(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return he("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),he("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,he("library stopped")};return this.libraryStoppingPromise=this.config.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){he(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new G(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof L)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new G(`${a.message} +${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){he("requestBatch");let i=nr(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Zi(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new G(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:u}=s;if(Array.isArray(a))return a.map(g=>g.errors&&g.errors.length>0?this.loggerRustPanic??this.buildQueryError(g.errors[0]):{data:g,elapsed:0});throw u&&u.length===1?new Error(u[0].error):new Error(JSON.stringify(s))}buildQueryError(t){t.user_facing_error.is_panic;let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:ir(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===Ba&&this.config.adapter){let r=t.meta?.id;qt(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return qt(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function ja(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}c();m();p();d();f();l();var At="Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started",lr=class{constructor(t){this.config=t;this.name="AccelerateEngine";this.resolveDatasourceUrl=this.config.accelerateUtils?.resolveDatasourceUrl;this.getBatchRequestPayload=this.config.accelerateUtils?.getBatchRequestPayload;this.prismaGraphQLToJSError=this.config.accelerateUtils?.prismaGraphQLToJSError;this.PrismaClientUnknownRequestError=this.config.accelerateUtils?.PrismaClientUnknownRequestError;this.PrismaClientInitializationError=this.config.accelerateUtils?.PrismaClientInitializationError;this.PrismaClientKnownRequestError=this.config.accelerateUtils?.PrismaClientKnownRequestError;this.debug=this.config.accelerateUtils?.debug;this.engineVersion=this.config.accelerateUtils?.engineVersion;this.clientVersion=this.config.accelerateUtils?.clientVersion}onBeforeExit(t){}async start(){}async stop(){}version(t){return"unknown"}transaction(t,r,n){throw new L(At,this.config.clientVersion)}metrics(t){throw new L(At,this.config.clientVersion)}request(t,r){throw new L(At,this.config.clientVersion)}requestBatch(t,r){throw new L(At,this.config.clientVersion)}applyPendingMigrations(){throw new L(At,this.config.clientVersion)}};function to({copyEngine:e=!0},t){let r;try{r=ar({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...h.env},clientVersion:t.clientVersion})}catch{}let n=!!(r?.startsWith("prisma://")||r?.startsWith("prisma+postgres://"));e&&n&&ct("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let i=at(t.generator),o=n||!e,s=!!t.adapter,a=i==="library",u=i==="binary";if(o&&s||s&&!1){let g;throw e?r?.startsWith("prisma://")?g=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:g=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:g=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new j(g.join(` +`),{clientVersion:t.clientVersion})}if(s)return new Rt(t);if(o)return new lr(t);{let g=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Ce().prettyName}).`,"In order to run Prisma Client in an edge runtime, you will need to configure one of the following options:","- Enable Driver Adapters: https://pris.ly/d/driver-adapters","- Enable Accelerate: https://pris.ly/d/accelerate"];throw new j(g.join(` +`),{clientVersion:t.clientVersion})}throw new j("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}c();m();p();d();f();l();function ur({generator:e}){return e?.previewFeatures??[]}c();m();p();d();f();l();var ro=e=>({command:e});c();m();p();d();f();l();c();m();p();d();f();l();var no=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);c();m();p();d();f();l();l();function rt(e){try{return io(e,"fast")}catch{return io(e,"slow")}}function io(e,t){return JSON.stringify(e.map(r=>so(r,t)))}function so(e,t){return Array.isArray(e)?e.map(r=>so(r,t)):typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:je(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ue.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:b.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Qa(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:b.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?ao(e):e}function Qa(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function ao(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(oo);let t={};for(let r of Object.keys(e))t[r]=oo(e[r]);return t}function oo(e){return typeof e=="bigint"?e.toString():ao(e)}c();m();p();d();f();l();var Ja=["$connect","$disconnect","$on","$transaction","$use","$extends"],lo=Ja;var Ga=/^(\s*alter\s)/i,uo=ee("prisma:client");function zr(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Ga.exec(t))throw new Error(`Running ALTER using ${n} is not supported +Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. + +Example: + await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) + +More Information: https://pris.ly/d/execute-raw +`)}var Yr=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(bi(r))n=r.sql,i={values:rt(r.values),__prismaRawParameters__:!0};else if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:rt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:rt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:rt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=no(r),i={values:rt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?uo(`prisma.${e}(${n}, ${i.values})`):uo(`prisma.${e}(${n})`),{query:n,parameters:i}},co={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new X(t,r)}},mo={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};c();m();p();d();f();l();function Xr(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=po(r(o)):po(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function po(e){return typeof e.then=="function"?e:Promise.resolve(e)}c();m();p();d();f();l();var fo={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Zr=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??fo}};function go(e){return e.includes("tracing")?new Zr:fo}c();m();p();d();f();l();function ho(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}c();m();p();d();f();l();function yo(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}c();m();p();d();f();l();var cr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};c();m();p();d();f();l();var Eo=Fe(Vn());c();m();p();d();f();l();function mr(e){return typeof e.batchRequestIdx=="number"}c();m();p();d();f();l();function bo(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(en(e.query.arguments)),t.push(en(e.query.selection)),t.join("")}function en(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${en(n)})`:r}).join(" ")})`}c();m();p();d();f();l();var Wa={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function tn(e){return Wa[e]}c();m();p();d();f();l();var pr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,h.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;iLe("bigint",r));case"bytes-array":return t.map(r=>Le("bytes",r));case"decimal-array":return t.map(r=>Le("decimal",r));case"datetime-array":return t.map(r=>Le("datetime",r));case"date-array":return t.map(r=>Le("date",r));case"time-array":return t.map(r=>Le("time",r));default:return t}}function wo(e){let t=[],r=Ka(e);for(let n=0;n{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(C=>C.protocolQuery),u=this.client._tracingHelper.getTraceParent(s),g=n.some(C=>tn(C.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:u,transaction:za(o),containsWrite:g,customDataProxyFetch:i})).map((C,O)=>{if(C instanceof Error)return C;try{return this.mapQueryEngineResult(n[O],C)}catch(A){return A}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?xo(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:tn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:bo(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a,globalOmit:t.globalOmit})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return h.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s,globalOmit:a}){if(Ha(t),Ya(t,i)||t instanceof we)throw t;if(t instanceof J&&Xa(t)){let g=Po(t.meta);zt({args:o,errors:[g],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion,globalOmit:a})}let u=t.message;if(n&&(u=Je({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:u})),u=this.sanitizeMessage(u),t.code){let g=s?{modelName:s,...t.meta}:t.meta;throw new J(u,{code:t.code,clientVersion:this.client._clientVersion,meta:g,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new Ee(u,this.client._clientVersion);if(t instanceof G)throw new G(u,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof L)throw new L(u,this.client._clientVersion);if(t instanceof Ee)throw new Ee(u,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Eo.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.keys(t)[0],o=Object.values(t)[0],s=r.filter(g=>g!=="select"&&g!=="include"),a=Jr(o,s),u=i==="queryRaw"?wo(a):$e(a);return n?n(u):u}get[Symbol.toStringTag](){return"RequestHandler"}};function za(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:xo(e)};be(e,"Unknown transaction kind")}}function xo(e){return{id:e.id,payload:e.payload}}function Ya(e,t){return mr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function Xa(e){return e.code==="P2009"||e.code==="P2012"}function Po(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Po)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}c();m();p();d();f();l();var vo="5.22.0";var To=vo;c();m();p();d();f();l();var Oo=Fe(kr());c();m();p();d();f();l();var _=class extends Error{constructor(t){super(t+` +Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};K(_,"PrismaClientConstructorValidationError");var Co=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","omit","__internal"],Ro=["pretty","colorless","minimal"],Ao=["info","query","warn","error"],el={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new _(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=nt(r,t)||` Available datasources: ${t.join(", ")}`;throw new _(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new _(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new _(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new _(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. +It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new _('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!ur(t).includes("driverAdapters"))throw new _('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(at()==="binary")throw new _('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new _(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. +Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new _(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Ro.includes(e)){let t=nt(e,Ro);throw new _(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new _(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Ao.includes(r)){let n=nt(r,Ao);throw new _(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=nt(i,o);throw new _(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new _(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new _(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new _(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},omit:(e,t)=>{if(typeof e!="object")throw new _('"omit" option is expected to be an object.');if(e===null)throw new _('"omit" option can not be `null`');let r=[];for(let[n,i]of Object.entries(e)){let o=rl(n,t.runtimeDataModel);if(!o){r.push({kind:"UnknownModel",modelKey:n});continue}for(let[s,a]of Object.entries(i)){let u=o.fields.find(g=>g.name===s);if(!u){r.push({kind:"UnknownField",modelKey:n,fieldName:s});continue}if(u.relationName){r.push({kind:"RelationInOmit",modelKey:n,fieldName:s});continue}typeof a!="boolean"&&r.push({kind:"InvalidFieldValue",modelKey:n,fieldName:s})}}if(r.length>0)throw new _(nl(e,r))},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new _(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=nt(r,t);throw new _(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ko(e,t){for(let[r,n]of Object.entries(e)){if(!Co.includes(r)){let i=nt(r,Co);throw new _(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}el[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new _('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function nt(e,t){if(t.length===0||typeof e!="string")return"";let r=tl(e,t);return r?` Did you mean "${r}"?`:""}function tl(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Oo.default)(e,i)}));r.sort((i,o)=>i.distanceVe(n)===t);if(r)return e[r]}function nl(e,t){let r=Ye(e);for(let o of t)switch(o.kind){case"UnknownModel":r.arguments.getField(o.modelKey)?.markAsError(),r.addErrorMessage(()=>`Unknown model name: ${o.modelKey}.`);break;case"UnknownField":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>`Model "${o.modelKey}" does not have a field named "${o.fieldName}".`);break;case"RelationInOmit":r.arguments.getDeepField([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>'Relations are already excluded by default and can not be specified in "omit".');break;case"InvalidFieldValue":r.arguments.getDeepFieldValue([o.modelKey,o.fieldName])?.markAsError(),r.addErrorMessage(()=>"Omit field option value must be a boolean.");break}let{message:n,args:i}=Ht(r,"colorless");return`Error validating "omit" option: + +${i} + +${n}`}c();m();p();d();f();l();function Mo(e){return e.length===0?Promise.resolve([]):new Promise((t,r)=>{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},u=g=>{o||(o=!0,r(g))};for(let g=0;g{n[g]=T,a()},T=>{if(!mr(T)){u(T);return}T.batchRequestIdx===g?u(T):(i||(i=T),a())})})}var Re=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var il={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},ol=Symbol.for("prisma.client.transaction.id"),sl={id:0,nextId(){return++this.id}};function _o(e){class t{constructor(n){this._originalClient=this;this._middlewares=new cr;this._createPrismaPromise=Xr();this.$extends=Ni;e=n?.__internal?.configOverride?.(e)??e,zi(e),n&&ko(n,e);let i=new Ut().on("error",()=>{});this._extensions=Xe.empty(),this._previewFeatures=ur(e),this._clientVersion=e.clientVersion??To,this._activeProvider=e.activeProvider,this._globalOmit=n?.omit,this._tracingHelper=go(this._previewFeatures);let o={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&st.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&st.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},s;if(n?.adapter){s=$r(n.adapter);let u=e.activeProvider==="postgresql"?"postgres":e.activeProvider;if(s.provider!==u)throw new L(`The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${u}\` specified in the Prisma schema.`,this._clientVersion);if(n.datasources||n.datasourceUrl!==void 0)throw new L("Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.",this._clientVersion)}let a=e.injectableEdgeEnv?.();try{let u=n??{},g=u.__internal??{},T=g.debug===!0;T&&ee.enable("prisma:client");let C=st.resolve(e.dirname,e.relativePath);yn.existsSync(C)||(C=e.dirname),Re("dirname",e.dirname),Re("relativePath",e.relativePath),Re("cwd",C);let O=g.engine||{};if(u.errorFormat?this._errorFormat=u.errorFormat:h.env.NODE_ENV==="production"?this._errorFormat="minimal":h.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:C,dirname:e.dirname,enableDebugLogs:T,allowTriggerPanic:O.allowTriggerPanic,datamodelPath:st.join(e.dirname,e.filename??"schema.prisma"),prismaPath:O.binaryPath??void 0,engineEndpoint:O.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:u.log&&yo(u.log),logQueries:u.log&&!!(typeof u.log=="string"?u.log==="query":u.log.find(A=>typeof A=="string"?A==="query":A.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:Yi(u,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:u.transactionOptions?.maxWait??2e3,timeout:u.transactionOptions?.timeout??5e3,isolationLevel:u.transactionOptions?.isolationLevel},logEmitter:i,isBundled:e.isBundled,adapter:s},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:ar,getBatchRequestPayload:nr,prismaGraphQLToJSError:ir,PrismaClientUnknownRequestError:G,PrismaClientInitializationError:L,PrismaClientKnownRequestError:J,debug:ee("prisma:client:accelerateEngine"),engineVersion:Lo.version,clientVersion:e.clientVersion}},Re("clientVersion",e.clientVersion),this._engine=to(e,this._engineConfig),this._requestHandler=new dr(this,i),u.log)for(let A of u.log){let M=typeof A=="string"?A:A.emit==="stdout"?A.level:null;M&&this.$on(M,S=>{ut.log(`${ut.tags[M]??""}`,S.message||S.query)})}this._metrics=new Ze(this._engine)}catch(u){throw u.clientVersion=this._clientVersion,u}return this._appliedParent=Tt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Mn()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Yr({clientMethod:i,activeProvider:a}),callsite:Te(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Io(n,i);return zr(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new j("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(zr(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new j(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:ro,callsite:Te(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Yr({clientMethod:i,activeProvider:a}),callsite:Te(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Io(n,i));throw new j("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawTyped(n){return this._createPrismaPromise(i=>{if(!this._hasPreviewFlag("typedSql"))throw new j("`typedSql` preview feature must be enabled in order to access $queryRawTyped API",{clientVersion:this._clientVersion});return this.$queryRawInternal(i,"$queryRawTyped",n)})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=sl.nextId(),s=ho(n.length),a=n.map((u,g)=>{if(u?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let T=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,C={kind:"batch",id:o,index:g,isolationLevel:T,lock:s};return u.requestTransaction?.(C)??u});return Mo(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),u;try{let g={kind:"itx",...a};u=await n(this._createItxClient(g)),await this._engine.transaction("commit",o,a)}catch(g){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),g}return u}_createItxClient(n){return Tt(ge(Fi(this),[H("_appliedParent",()=>this._appliedParent._createItxClient(n)),H("_createPrismaPromise",()=>Xr(n)),H(ol,()=>n.id),et(lo)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??il,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,u=async g=>{let T=this._middlewares.get(++a);if(T)return this._tracingHelper.runInChildSpan(s.middleware,I=>T(g,ne=>(I?.end(),u(ne))));let{runInTransaction:C,args:O,...A}=g,M={...n,...A};O&&(M.args=i.middlewareArgsToRequestArgs(O)),n.transaction!==void 0&&C===!1&&delete M.transaction;let S=await Qi(this,M);return M.model?Bi({result:S,modelName:M.model,args:M.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel,globalOmit:this._globalOmit}):S};return this._tracingHelper.runInChildSpan(s.operation,()=>u(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:u,argsMapper:g,transaction:T,unpacker:C,otelParentCtx:O,customDataProxyFetch:A}){try{n=g?g(n):n;let M={name:"serialize"},S=this._tracingHelper.runInChildSpan(M,()=>Zt({modelName:u,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures,globalOmit:this._globalOmit}));return ee.enabled("prisma:client")&&(Re("Prisma Client call:"),Re(`prisma.${i}(${Ci(n)})`),Re("Generated request:"),Re(JSON.stringify(S,null,2)+` +`)),T?.kind==="batch"&&await T.lock,this._requestHandler.request({protocolQuery:S,modelName:u,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:T,unpacker:C,otelParentCtx:O,otelChildCtx:this._tracingHelper.getActiveContext(),globalOmit:this._globalOmit,customDataProxyFetch:A})}catch(M){throw M.clientVersion=this._clientVersion,M}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new j("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function Io(e,t){return al(e)?[new X(e,t),co]:[e,mo]}function al(e){return Array.isArray(e)&&Array.isArray(e.raw)}c();m();p();d();f();l();var ll=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Do(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!ll.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}c();m();p();d();f();l();l();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,deserializeJsonResponse,dmmfToRuntimeDataModel,empty,getPrismaClient,getRuntime,join,makeStrictEnum,makeTypedQueryFactory,objectEnumValues,raw,serializeJsonQuery,skip,sqltag,warnEnvConflicts,warnOnce}); +//# sourceMappingURL=wasm.js.map diff --git a/apps/api/release/vendor/@prisma/client/scripts/colors.js b/apps/api/release/vendor/@prisma/client/scripts/colors.js new file mode 100644 index 0000000..ac30d2e --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/scripts/colors.js @@ -0,0 +1,176 @@ +'use strict' + +const isObject = (val) => val !== null && typeof val === 'object' && !Array.isArray(val) + +// this is a modified version of https://github.com/chalk/ansi-regex (MIT License) +const ANSI_REGEX = + /* eslint-disable-next-line no-control-regex */ + /[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g + +const create = () => { + const colors = { enabled: true, visible: true, styles: {}, keys: {} } + + if ('FORCE_COLOR' in process.env) { + colors.enabled = process.env.FORCE_COLOR !== '0' + } + + const ansi = (style) => { + let open = (style.open = `\u001b[${style.codes[0]}m`) + let close = (style.close = `\u001b[${style.codes[1]}m`) + let regex = (style.regex = new RegExp(`\\u001b\\[${style.codes[1]}m`, 'g')) + style.wrap = (input, newline) => { + if (input.includes(close)) input = input.replace(regex, close + open) + let output = open + input + close + // see https://github.com/chalk/chalk/pull/92, thanks to the + // chalk contributors for this fix. However, we've confirmed that + // this issue is also present in Windows terminals + return newline ? output.replace(/\r*\n/g, `${close}$&${open}`) : output + } + return style + } + + const wrap = (style, input, newline) => { + return typeof style === 'function' ? style(input) : style.wrap(input, newline) + } + + const style = (input, stack) => { + if (input === '' || input == null) return '' + if (colors.enabled === false) return input + if (colors.visible === false) return '' + let str = '' + input + let nl = str.includes('\n') + let n = stack.length + if (n > 0 && stack.includes('unstyle')) { + stack = [...new Set(['unstyle', ...stack])].reverse() + } + while (n-- > 0) str = wrap(colors.styles[stack[n]], str, nl) + return str + } + + const define = (name, codes, type) => { + colors.styles[name] = ansi({ name, codes }) + let keys = colors.keys[type] || (colors.keys[type] = []) + keys.push(name) + + Reflect.defineProperty(colors, name, { + configurable: true, + enumerable: true, + set(value) { + colors.alias(name, value) + }, + get() { + let color = (input) => style(input, color.stack) + Reflect.setPrototypeOf(color, colors) + color.stack = this.stack ? this.stack.concat(name) : [name] + return color + }, + }) + } + + define('reset', [0, 0], 'modifier') + define('bold', [1, 22], 'modifier') + define('dim', [2, 22], 'modifier') + define('italic', [3, 23], 'modifier') + define('underline', [4, 24], 'modifier') + define('inverse', [7, 27], 'modifier') + define('hidden', [8, 28], 'modifier') + define('strikethrough', [9, 29], 'modifier') + + define('black', [30, 39], 'color') + define('red', [31, 39], 'color') + define('green', [32, 39], 'color') + define('yellow', [33, 39], 'color') + define('blue', [34, 39], 'color') + define('magenta', [35, 39], 'color') + define('cyan', [36, 39], 'color') + define('white', [37, 39], 'color') + define('gray', [90, 39], 'color') + define('grey', [90, 39], 'color') + + define('bgBlack', [40, 49], 'bg') + define('bgRed', [41, 49], 'bg') + define('bgGreen', [42, 49], 'bg') + define('bgYellow', [43, 49], 'bg') + define('bgBlue', [44, 49], 'bg') + define('bgMagenta', [45, 49], 'bg') + define('bgCyan', [46, 49], 'bg') + define('bgWhite', [47, 49], 'bg') + + define('blackBright', [90, 39], 'bright') + define('redBright', [91, 39], 'bright') + define('greenBright', [92, 39], 'bright') + define('yellowBright', [93, 39], 'bright') + define('blueBright', [94, 39], 'bright') + define('magentaBright', [95, 39], 'bright') + define('cyanBright', [96, 39], 'bright') + define('whiteBright', [97, 39], 'bright') + + define('bgBlackBright', [100, 49], 'bgBright') + define('bgRedBright', [101, 49], 'bgBright') + define('bgGreenBright', [102, 49], 'bgBright') + define('bgYellowBright', [103, 49], 'bgBright') + define('bgBlueBright', [104, 49], 'bgBright') + define('bgMagentaBright', [105, 49], 'bgBright') + define('bgCyanBright', [106, 49], 'bgBright') + define('bgWhiteBright', [107, 49], 'bgBright') + + colors.ansiRegex = ANSI_REGEX + colors.hasColor = colors.hasAnsi = (str) => { + colors.ansiRegex.lastIndex = 0 + return typeof str === 'string' && str !== '' && colors.ansiRegex.test(str) + } + + colors.alias = (name, color) => { + let fn = typeof color === 'string' ? colors[color] : color + + if (typeof fn !== 'function') { + throw new TypeError('Expected alias to be the name of an existing color (string) or a function') + } + + if (!fn.stack) { + Reflect.defineProperty(fn, 'name', { value: name }) + colors.styles[name] = fn + fn.stack = [name] + } + + Reflect.defineProperty(colors, name, { + configurable: true, + enumerable: true, + set(value) { + colors.alias(name, value) + }, + get() { + let color = (input) => style(input, color.stack) + Reflect.setPrototypeOf(color, colors) + color.stack = this.stack ? this.stack.concat(fn.stack) : fn.stack + return color + }, + }) + } + + colors.theme = (custom) => { + if (!isObject(custom)) throw new TypeError('Expected theme to be an object') + for (let name of Object.keys(custom)) { + colors.alias(name, custom[name]) + } + return colors + } + + colors.alias('unstyle', (str) => { + if (typeof str === 'string' && str !== '') { + colors.ansiRegex.lastIndex = 0 + return str.replace(colors.ansiRegex, '') + } + return '' + }) + + colors.alias('noop', (str) => str) + colors.none = colors.clear = colors.noop + + colors.stripColor = colors.unstyle + colors.define = define + return colors +} + +module.exports = create() +module.exports.create = create diff --git a/apps/api/release/vendor/@prisma/client/scripts/default-deno-edge.ts b/apps/api/release/vendor/@prisma/client/scripts/default-deno-edge.ts new file mode 100644 index 0000000..bca0a97 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/scripts/default-deno-edge.ts @@ -0,0 +1,9 @@ +class PrismaClient { + constructor() { + throw new Error( + '@prisma/client/deno/edge did not initialize yet. Please run "prisma generate" and try to import it again.', + ) + } +} + +export { PrismaClient } diff --git a/apps/api/release/vendor/@prisma/client/scripts/default-index.d.ts b/apps/api/release/vendor/@prisma/client/scripts/default-index.d.ts new file mode 100644 index 0000000..bac7a5c --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/scripts/default-index.d.ts @@ -0,0 +1,110 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import * as runtime from '@prisma/client/runtime/library' + +/** + * ## Prisma Client ʲˢ + * + * Type-safe database client for TypeScript & Node.js + * @example + * ``` + * const prisma = new Prisma() + * // Fetch zero or more Users + * const users = await prisma.user.findMany() + * ``` + * + * + * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client). + */ +export declare const PrismaClient: any + +/** + * ## Prisma Client ʲˢ + * + * Type-safe database client for TypeScript & Node.js + * @example + * ``` + * const prisma = new Prisma() + * // Fetch zero or more Users + * const users = await prisma.user.findMany() + * ``` + * + * + * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client). + */ +export declare type PrismaClient = any + +export declare class PrismaClientExtends< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> { + $extends: { extArgs: ExtArgs } & (< + R extends runtime.Types.Extensions.UserArgs['result'] = {}, + M extends runtime.Types.Extensions.UserArgs['model'] = {}, + Q extends runtime.Types.Extensions.UserArgs['query'] = {}, + C extends runtime.Types.Extensions.UserArgs['client'] = {}, + Args extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.InternalArgs, + >( + args: + | ((client: PrismaClientExtends) => { $extends: { extArgs: Args } }) + | { name?: string } + | { result?: R & runtime.Types.Extensions.UserArgs['result'] } + | { model?: M & runtime.Types.Extensions.UserArgs['model'] } + | { query?: Q & runtime.Types.Extensions.UserArgs['query'] } + | { client?: C & runtime.Types.Extensions.UserArgs['client'] }, + ) => PrismaClientExtends & Args['client']) + + $transaction( + fn: (prisma: Omit) => Promise, + options?: { maxWait?: number; timeout?: number; isolationLevel?: string }, + ): Promise + $transaction

[]>( + arg: [...P], + options?: { isolationLevel?: string }, + ): Promise> +} + +export declare const dmmf: any +export declare type dmmf = any + +/** + * Get the type of the value, that the Promise holds. + */ +export declare type PromiseType> = T extends PromiseLike ? U : T + +/** + * Get the return type of a function which returns a Promise. + */ +export declare type PromiseReturnType Promise> = PromiseType> + +export namespace Prisma { + export type TransactionClient = any + + export function defineExtension< + R extends runtime.Types.Extensions.UserArgs['result'] = {}, + M extends runtime.Types.Extensions.UserArgs['model'] = {}, + Q extends runtime.Types.Extensions.UserArgs['query'] = {}, + C extends runtime.Types.Extensions.UserArgs['client'] = {}, + Args extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.InternalArgs, + >( + args: + | ((client: PrismaClientExtends) => { $extends: { extArgs: Args } }) + | { name?: string } + | { result?: R & runtime.Types.Extensions.UserArgs['result'] } + | { model?: M & runtime.Types.Extensions.UserArgs['model'] } + | { query?: Q & runtime.Types.Extensions.UserArgs['query'] } + | { client?: C & runtime.Types.Extensions.UserArgs['client'] }, + ): (client: any) => PrismaClientExtends + + export type Extension = runtime.Types.Extensions.UserArgs + export import getExtensionContext = runtime.Extensions.getExtensionContext + export import Args = runtime.Types.Public.Args + export import Payload = runtime.Types.Public.Payload + export import Result = runtime.Types.Public.Result + export import Exact = runtime.Types.Public.Exact + export import PrismaPromise = runtime.Types.Public.PrismaPromise + + export const prismaVersion: { + client: string + engine: string + } +} diff --git a/apps/api/release/vendor/@prisma/client/scripts/default-index.js b/apps/api/release/vendor/@prisma/client/scripts/default-index.js new file mode 100644 index 0000000..1938e5c --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/scripts/default-index.js @@ -0,0 +1,65 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/scripts/default-index.ts +var default_index_exports = {}; +__export(default_index_exports, { + Prisma: () => Prisma, + PrismaClient: () => PrismaClient, + default: () => default_index_default +}); +module.exports = __toCommonJS(default_index_exports); + +// ../../node_modules/.pnpm/@prisma+engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2/node_modules/@prisma/engines-version/package.json +var prisma = { + enginesVersion: "605197351a3c8bdd595af2d2a9bc3025bca48ea2" +}; + +// package.json +var version = "5.22.0"; + +// src/runtime/utils/clientVersion.ts +var clientVersion = version; + +// src/scripts/default-index.ts +var PrismaClient = class { + constructor() { + throw new Error('@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.'); + } +}; +function defineExtension(ext) { + if (typeof ext === "function") { + return ext; + } + return (client) => client.$extends(ext); +} +function getExtensionContext(that) { + return that; +} +var Prisma = { + defineExtension, + getExtensionContext, + prismaVersion: { client: clientVersion, engine: prisma.enginesVersion } +}; +var default_index_default = { Prisma }; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + Prisma, + PrismaClient +}); diff --git a/apps/api/release/vendor/@prisma/client/scripts/postinstall.d.ts b/apps/api/release/vendor/@prisma/client/scripts/postinstall.d.ts new file mode 100644 index 0000000..3b9fc2c --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/scripts/postinstall.d.ts @@ -0,0 +1,5 @@ +export function getPostInstallTrigger(): string +export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER__EMPTY_STRING +export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING +export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR +export const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR diff --git a/apps/api/release/vendor/@prisma/client/scripts/postinstall.js b/apps/api/release/vendor/@prisma/client/scripts/postinstall.js new file mode 100644 index 0000000..fec6746 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/scripts/postinstall.js @@ -0,0 +1,410 @@ +// @ts-check +const childProcess = require('child_process') +const { promisify } = require('util') +const fs = require('fs') +const path = require('path') +const c = require('./colors') + +const exec = promisify(childProcess.exec) + +function debug(message, ...optionalParams) { + if (process.env.DEBUG && process.env.DEBUG === 'prisma:postinstall') { + console.log(message, ...optionalParams) + } +} +/** + * Adds `package.json` to the end of a path if it doesn't already exist' + * @param {string} pth + */ +function addPackageJSON(pth) { + if (pth.endsWith('package.json')) return pth + return path.join(pth, 'package.json') +} + +/** + * Looks up for a `package.json` which is not `@prisma/cli` or `prisma` and returns the directory of the package + * @param {string | null} startPath - Path to Start At + * @param {number} limit - Find Up limit + * @returns {string | null} + */ +function findPackageRoot(startPath, limit = 10) { + if (!startPath || !fs.existsSync(startPath)) return null + let currentPath = startPath + // Limit traversal + for (let i = 0; i < limit; i++) { + const pkgPath = addPackageJSON(currentPath) + if (fs.existsSync(pkgPath)) { + try { + const pkg = require(pkgPath) + if (pkg.name && !['@prisma/cli', 'prisma'].includes(pkg.name)) { + return pkgPath.replace('package.json', '') + } + } catch {} // eslint-disable-line no-empty + } + currentPath = path.join(currentPath, '../') + } + return null +} + +/** + * The `postinstall` hook of client sets up the ground and env vars for the `prisma generate` command, + * and runs it, showing a warning if the schema is not found. + * - initializes the ./node_modules/.prisma/client folder with the default index(-browser).js/index.d.ts, + * which define a `PrismaClient` class stub that throws an error if instantiated before the `prisma generate` + * command is successfully executed. + * - sets the path of the root of the project (TODO: to verify) to the `process.env.PRISMA_GENERATE_IN_POSTINSTALL` + * variable, or `'true'` if the project root cannot be found. + * - runs `prisma generate`, passing through additional information about the command that triggered the generation, + * which is useful for debugging/telemetry. It tries to use the local `prisma` package if it is installed, otherwise it + * falls back to the global `prisma` package. If neither options are available, it warns the user to install `prisma` first. + */ +async function main() { + if (process.env.INIT_CWD) { + process.chdir(process.env.INIT_CWD) // necessary, because npm chooses __dirname as process.cwd() + // in the postinstall hook + } + + await createDefaultGeneratedThrowFiles() + + // TODO: consider using the `which` package + const localPath = getLocalPackagePath() + + // Only execute if !localpath + const installedGlobally = localPath ? undefined : await isInstalledGlobally() + + // this is needed, so we can find the correct schemas in yarn workspace projects + const root = findPackageRoot(localPath) + + process.env.PRISMA_GENERATE_IN_POSTINSTALL = root ? root : 'true' + + debug({ + localPath, + installedGlobally, + init_cwd: process.env.INIT_CWD, + PRISMA_GENERATE_IN_POSTINSTALL: process.env.PRISMA_GENERATE_IN_POSTINSTALL, + }) + try { + if (localPath) { + await run('node', [localPath, 'generate', '--postinstall', doubleQuote(getPostInstallTrigger())]) + return + } + if (installedGlobally) { + await run('prisma', ['generate', '--postinstall', doubleQuote(getPostInstallTrigger())]) + return + } + } catch (e) { + // if exit code = 1 do not print + if (e && e !== 1) { + console.error(e) + } + debug(e) + } + + if (!localPath && !installedGlobally) { + console.error( + `${c.yellow( + 'warning', + )} In order to use "@prisma/client", please install Prisma CLI. You can install it with "npm add -D prisma".`, + ) + } +} + +function getLocalPackagePath() { + try { + const packagePath = require.resolve('prisma/package.json') + if (packagePath) { + return require.resolve('prisma') + } + } catch (e) {} // eslint-disable-line no-empty + + // TODO: consider removing this + try { + const packagePath = require.resolve('@prisma/cli/package.json') + if (packagePath) { + return require.resolve('@prisma/cli') + } + } catch (e) {} // eslint-disable-line no-empty + + return null +} + +async function isInstalledGlobally() { + try { + const result = await exec('prisma -v') + if (result.stdout.includes('@prisma/client')) { + return true + } else { + console.error(`${c.yellow('warning')} You still have the ${c.bold('prisma')} cli (Prisma 1) installed globally. +Please uninstall it with either ${c.green('npm remove -g prisma')} or ${c.green('yarn global remove prisma')}.`) + } + } catch (e) { + return false + } +} + +if (!process.env.PRISMA_SKIP_POSTINSTALL_GENERATE) { + main() + .catch((e) => { + if (e.stderr) { + if (e.stderr.includes(`Can't find schema.prisma`)) { + console.error( + `${c.yellow('warning')} @prisma/client needs a ${c.bold('schema.prisma')} to function, but couldn't find it. + Please either create one manually or use ${c.bold('prisma init')}. + Once you created it, run ${c.bold('prisma generate')}. + To keep Prisma related things separate, we recommend creating it in a subfolder called ${c.underline( + './prisma', + )} like so: ${c.underline('./prisma/schema.prisma')}\n`, + ) + } else { + console.error(e.stderr) + } + } else { + console.error(e) + } + process.exit(0) + }) + .finally(() => { + debug(`postinstall trigger: ${getPostInstallTrigger()}`) + }) +} + +function run(cmd, params, cwd = process.cwd()) { + const child = childProcess.spawn(cmd, params, { + stdio: ['pipe', 'inherit', 'inherit'], + cwd, + }) + + return new Promise((resolve, reject) => { + child.on('close', () => { + resolve(undefined) + }) + child.on('exit', (code) => { + if (code === 0) { + resolve(undefined) + } else { + reject(code) + } + }) + child.on('error', () => { + reject() + }) + }) +} + +/** + * Copies our default "throw" files into the default generation folder. These + * files are dummy and informative because they just throw an error to let the + * user know that they have forgotten to run `prisma generate` or that they + * don't have a a schema file yet. We only add these files at the default + * location `node_modules/.prisma/client`. + */ +async function createDefaultGeneratedThrowFiles() { + try { + const dotPrismaClientDir = path.join(__dirname, '../../../.prisma/client') + const denoPrismaClientDir = path.join(__dirname, '../../../.prisma/client/deno') + + await makeDir(dotPrismaClientDir) + await makeDir(denoPrismaClientDir) + + const defaultFileConfig = { + js: path.join(__dirname, 'default-index.js'), + ts: path.join(__dirname, 'default-index.d.ts'), + } + + /** + * @type {Record} + */ + const defaultFiles = { + index: defaultFileConfig, + edge: defaultFileConfig, + default: defaultFileConfig, + wasm: defaultFileConfig, + 'index-browser': { + js: path.join(__dirname, 'default-index.js'), + ts: undefined, + }, + 'deno/edge': { + js: undefined, + ts: path.join(__dirname, 'default-deno-edge.ts'), + }, + } + + for (const file of Object.keys(defaultFiles)) { + const { js, ts } = defaultFiles[file] ?? {} + const dotPrismaJsFilePath = path.join(dotPrismaClientDir, `${file}.js`) + const dotPrismaTsFilePath = path.join(dotPrismaClientDir, `${file}.d.ts`) + + if (js && !fs.existsSync(dotPrismaJsFilePath) && fs.existsSync(js)) { + await fs.promises.copyFile(js, dotPrismaJsFilePath) + } + + if (ts && !fs.existsSync(dotPrismaTsFilePath) && fs.existsSync(ts)) { + await fs.promises.copyFile(ts, dotPrismaTsFilePath) + } + } + } catch (e) { + console.error(e) + } +} + +// TODO: can this be replaced some utility eg. mkdir +function makeDir(input) { + const make = async (pth) => { + try { + await fs.promises.mkdir(pth) + + return pth + } catch (error) { + if (error.code === 'EPERM') { + throw error + } + + if (error.code === 'ENOENT') { + if (path.dirname(pth) === pth) { + throw new Error(`operation not permitted, mkdir '${pth}'`) + } + + if (error.message.includes('null bytes')) { + throw error + } + + await make(path.dirname(pth)) + + return make(pth) + } + + try { + const stats = await fs.promises.stat(pth) + if (!stats.isDirectory()) { + throw new Error('The path is not a directory') + } + } catch (_) { + throw error + } + + return pth + } + } + + return make(path.resolve(input)) +} + +/** + * Get the command that triggered this postinstall script being run. If there is + * an error while attempting to get this value then the string constant + * 'ERROR_WHILE_FINDING_POSTINSTALL_TRIGGER' is returned. + * This information is just necessary for telemetry. + * This is passed to `prisma generate` as a string like `--postinstall value`. + */ +function getPostInstallTrigger() { + /* + npm_config_argv` is not officially documented so here are our research notes + + `npm_config_argv` is available to the postinstall script when the containing package has been installed by npm into some project. + + An example of its value: + + ``` + npm_config_argv: '{"remain":["../test"],"cooked":["add","../test"],"original":["add","../test"]}', + ``` + + We are interesting in the data contained in the "original" field. + + Trivia/Note: `npm_config_argv` is not available when running e.g. `npm install` on the containing package itself (e.g. when working on it) + + Yarn mimics this data and environment variable. Here is an example following `yarn add` for the same package: + + ``` + npm_config_argv: '{"remain":[],"cooked":["add"],"original":["add","../test"]}' + ``` + + Other package managers like `pnpm` have not been tested. + */ + + const maybe_npm_config_argv_string = process.env.npm_config_argv + + if (maybe_npm_config_argv_string === undefined) { + return UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING + } + + let npm_config_argv + try { + npm_config_argv = JSON.parse(maybe_npm_config_argv_string) + } catch (e) { + return `${UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR}: ${maybe_npm_config_argv_string}` + } + + if (typeof npm_config_argv !== 'object' || npm_config_argv === null) { + return `${UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR}: ${maybe_npm_config_argv_string}` + } + + const npm_config_argv_original_arr = npm_config_argv.original + + if (!Array.isArray(npm_config_argv_original_arr)) { + return `${UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR}: ${maybe_npm_config_argv_string}` + } + + const npm_config_argv_original = npm_config_argv_original_arr.filter((arg) => arg !== '').join(' ') + + const command = + npm_config_argv_original === '' + ? getPackageManagerName() + : [getPackageManagerName(), npm_config_argv_original].join(' ') + + return command +} + +/** + * Wrap double quotes around the given string. + */ +function doubleQuote(x) { + return `"${x}"` +} + +/** + * Get the package manager name currently being used. If parsing fails, then the following pattern is returned: + * UNKNOWN_NPM_CONFIG_USER_AGENT(). + */ +function getPackageManagerName() { + const userAgent = process.env.npm_config_user_agent + if (!userAgent) return 'MISSING_NPM_CONFIG_USER_AGENT' + + const name = parsePackageManagerName(userAgent) + if (!name) return `UNKNOWN_NPM_CONFIG_USER_AGENT(${userAgent})` + + return name +} + +/** + * Parse package manager name from useragent. If parsing fails, `null` is returned. + */ +function parsePackageManagerName(userAgent) { + let packageManager = null + + // example: 'yarn/1.22.4 npm/? node/v13.11.0 darwin x64' + // References: + // - https://pnpm.io/only-allow-pnpm + // - https://github.com/cameronhunter/npm-config-user-agent-parser + if (userAgent) { + const matchResult = userAgent.match(/^([^/]+)\/.+/) + if (matchResult) { + packageManager = matchResult[1].trim() + } + } + + return packageManager +} + +// prettier-ignore +const UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING = 'UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING' +// prettier-ignore +const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR = 'UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR' +// prettier-ignore +const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR = 'UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR' + +// expose for testing + +exports.UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING = UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING +exports.UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR = UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR +exports.UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR = UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR +exports.getPostInstallTrigger = getPostInstallTrigger diff --git a/apps/api/release/vendor/@prisma/client/sql.d.ts b/apps/api/release/vendor/@prisma/client/sql.d.ts new file mode 100644 index 0000000..ff2b18f --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/sql.d.ts @@ -0,0 +1 @@ +export * from '.prisma/client/sql' diff --git a/apps/api/release/vendor/@prisma/client/sql.js b/apps/api/release/vendor/@prisma/client/sql.js new file mode 100644 index 0000000..6d54621 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/sql.js @@ -0,0 +1,4 @@ +'use strict' +module.exports = { + ...require('.prisma/client/sql'), +} diff --git a/apps/api/release/vendor/@prisma/client/sql.mjs b/apps/api/release/vendor/@prisma/client/sql.mjs new file mode 100644 index 0000000..9349dbf --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/sql.mjs @@ -0,0 +1 @@ +export * from '../../.prisma/client/sql/index.mjs' diff --git a/apps/api/release/vendor/@prisma/client/wasm.d.ts b/apps/api/release/vendor/@prisma/client/wasm.d.ts new file mode 100644 index 0000000..1a47896 --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/wasm.d.ts @@ -0,0 +1 @@ +export * from '.prisma/client/wasm' diff --git a/apps/api/release/vendor/@prisma/client/wasm.js b/apps/api/release/vendor/@prisma/client/wasm.js new file mode 100644 index 0000000..a63271a --- /dev/null +++ b/apps/api/release/vendor/@prisma/client/wasm.js @@ -0,0 +1,4 @@ +module.exports = { + // https://github.com/prisma/prisma/pull/12907 + ...require('.prisma/client/wasm'), +} diff --git a/apps/api/scripts/bundle-release.cjs b/apps/api/scripts/bundle-release.cjs new file mode 100644 index 0000000..b5a9e97 --- /dev/null +++ b/apps/api/scripts/bundle-release.cjs @@ -0,0 +1,104 @@ +/** + * باندل تک‌فایل برای Docker (release/app.js) بعد از nest build. + * Prisma client + engines را در release/vendor می‌گذارد (نه node_modules تا gitignore نخورد). + */ +const esbuild = require('esbuild'); +const { + existsSync, + mkdirSync, + rmSync, + cpSync, + realpathSync, + readdirSync, +} = require('fs'); +const path = require('path'); + +// Only this engine ships to Docker; see apps/api/Dockerfile (bookworm/OpenSSL 3). +const RUNTIME_ENGINE = 'libquery_engine-debian-openssl-3.0.x.so.node'; + +const root = path.join(__dirname, '..'); +const config = require(path.join(root, 'esbuild.release.config.cjs')); +const releaseDir = path.join(root, 'release'); +const vendorDir = path.join(releaseDir, 'vendor'); + +function resolvePkg(name) { + return path.dirname(require.resolve(`${name}/package.json`, { paths: [root] })); +} + +function copyPrismaIntoRelease() { + const prismaClientSrc = resolvePkg('@prisma/client'); + const prismaClientDest = path.join(vendorDir, '@prisma', 'client'); + mkdirSync(path.dirname(prismaClientDest), { recursive: true }); + cpSync(prismaClientSrc, prismaClientDest, { recursive: true }); + + const candidates = [ + path.join(root, 'node_modules', '.prisma', 'client'), + path.join(prismaClientSrc, '..', '.prisma', 'client'), + path.join(path.dirname(prismaClientSrc), '.prisma', 'client'), + path.join(prismaClientSrc, '..', '..', '.prisma', 'client'), + ]; + + const prismaEngineSrc = candidates.find((p) => existsSync(p)); + if (!prismaEngineSrc) { + throw new Error( + 'Prisma generated client (.prisma/client) یافت نشد. ابتدا: pnpm --filter @lucky-wheel/api exec prisma generate', + ); + } + + const prismaEngineDest = path.join(vendorDir, '.prisma', 'client'); + mkdirSync(path.dirname(prismaEngineDest), { recursive: true }); + cpSync(realpathSync(prismaEngineSrc), prismaEngineDest, { recursive: true }); + + // Drop engines for other platforms (local Windows dll, stale musl builds) so the + // committed artifact stays small. + for (const name of readdirSync(prismaEngineDest)) { + const isEngine = name.endsWith('.so.node') || name.endsWith('.dll.node'); + if (isEngine && name !== RUNTIME_ENGINE) { + rmSync(path.join(prismaEngineDest, name), { force: true }); + } + } + + if (!existsSync(path.join(prismaEngineDest, RUNTIME_ENGINE))) { + throw new Error( + `${RUNTIME_ENGINE} تولید نشد. binaryTargets در prisma/schema.prisma را بررسی کنید.`, + ); + } +} + +async function main() { + const entry = config.entryPoints[0]; + const fallbackEntry = path.join(root, 'dist', 'main.js'); + if (!existsSync(entry)) { + if (existsSync(fallbackEntry)) { + config.entryPoints = [fallbackEntry]; + } else { + console.error('dist/src/main.js یافت نشد. ابتدا اجرا کنید: pnpm --filter @lucky-wheel/api build'); + process.exit(1); + } + } + + rmSync(releaseDir, { recursive: true, force: true }); + mkdirSync(releaseDir, { recursive: true }); + + await esbuild.build(config); + copyPrismaIntoRelease(); + + cpSync(path.join(root, 'prisma', 'migrations'), path.join(releaseDir, 'migrations'), { + recursive: true, + }); + + await esbuild.build({ + ...config, + entryPoints: [path.join(root, 'prisma', 'seed.ts')], + outfile: path.join(releaseDir, 'seed.js'), + }); + + console.log('نوشت:', config.outfile); + console.log('Prisma client در release/vendor کپی شد.'); + console.log('migrations و seed.js در release کپی شدند.'); +} + +main().catch((err) => { + console.error(err); + process.exit(1); +}); diff --git a/apps/api/scripts/clean-dist.cjs b/apps/api/scripts/clean-dist.cjs new file mode 100644 index 0000000..639d70c --- /dev/null +++ b/apps/api/scripts/clean-dist.cjs @@ -0,0 +1,20 @@ +/** + * Wipe Nest emit output + stale TypeScript incremental caches. + * Incremental caches can skip emit after dist/ is deleted (empty dist, exit 0). + */ +const { rmSync, existsSync } = require('fs'); +const path = require('path'); + +const root = path.join(__dirname, '..'); +const targets = [ + path.join(root, 'dist'), + path.join(root, 'tsconfig.tsbuildinfo'), + path.join(root, 'tsconfig.build.tsbuildinfo'), +]; + +for (const target of targets) { + if (existsSync(target)) { + rmSync(target, { recursive: true, force: true }); + console.log('removed', path.relative(root, target) || 'dist'); + } +} diff --git a/apps/api/src/modules/admin-auth/admin-auth.service.ts b/apps/api/src/modules/admin-auth/admin-auth.service.ts index fcb06f2..30d942b 100644 --- a/apps/api/src/modules/admin-auth/admin-auth.service.ts +++ b/apps/api/src/modules/admin-auth/admin-auth.service.ts @@ -8,7 +8,7 @@ import { import { ConfigService } from '@nestjs/config'; import { JwtService } from '@nestjs/jwt'; import { AdminRole, AdminStatus } from '@prisma/client'; -import * as bcrypt from 'bcrypt'; +import * as bcrypt from 'bcryptjs'; import { PrismaService } from '../../prisma/prisma.service'; import { AdminLoginDto } from './dto/admin-login.dto'; import { AdminRefreshDto } from './dto/admin-refresh.dto'; diff --git a/apps/client/.dockerignore b/apps/client/.dockerignore new file mode 100644 index 0000000..4d50dc8 --- /dev/null +++ b/apps/client/.dockerignore @@ -0,0 +1,5 @@ +* +!dist/ +!dist/** +!nginx.conf +!Dockerfile diff --git a/apps/client/.gitignore b/apps/client/.gitignore new file mode 100644 index 0000000..cd7d8e5 --- /dev/null +++ b/apps/client/.gitignore @@ -0,0 +1,3 @@ +# Dist is committed for Dokploy copy-only images. +node_modules/ +*.tsbuildinfo diff --git a/apps/client/Dockerfile b/apps/client/Dockerfile index 7f12e23..7813ae7 100644 --- a/apps/client/Dockerfile +++ b/apps/client/Dockerfile @@ -1,22 +1,7 @@ -FROM node:20-alpine AS builder +FROM docker.arvancloud.ir/nginx:latest -ENV PNPM_HOME="/pnpm" -ENV PATH="$PNPM_HOME:$PATH" -RUN corepack enable pnpm - -WORKDIR /app - -COPY . . - -RUN pnpm install --frozen-lockfile -RUN pnpm --filter @lucky-wheel/api exec prisma generate -RUN pnpm run build:types -RUN pnpm --filter @lucky-wheel/client build - -FROM nginx:alpine - -COPY --from=builder /app/apps/client/dist /usr/share/nginx/html -COPY apps/client/nginx.conf /etc/nginx/conf.d/default.conf +COPY nginx.conf /etc/nginx/conf.d/default.conf +COPY dist /usr/share/nginx/html EXPOSE 80 diff --git a/apps/client/dist/assets/CampaignWheelView-Ds-m3TZi.js b/apps/client/dist/assets/CampaignWheelView-Ds-m3TZi.js new file mode 100644 index 0000000..13c9963 --- /dev/null +++ b/apps/client/dist/assets/CampaignWheelView-Ds-m3TZi.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/wheel-classiccasinowheel-DHnlMe5J.js","assets/vendor-vue-kYoPQr5S.js","assets/wheel-neoncyberwheel-DfkNbyES.js","assets/wheel-minimalflatwheel-B0XcCliG.js","assets/wheel-luxurygoldwheel-B7W8x-n_.js","assets/wheel-playfulcartoonwheel-D5oxWUgO.js","assets/wheel-rusticwoodwheel-B1GPATiK.js","assets/wheel-galaxyspacewheel-CO8tbi9S.js","assets/wheel-candylandwheel-BJ8iho3G.js","assets/wheel-fireflamewheel-CV6G4NBw.js","assets/wheel-crystalicewheel-BJbsr9tW.js"])))=>i.map(i=>d[i]); +import{u as T,a as q,_ as S}from"./index-DZsNn1RR.js";import{t as D,a as z,W as C}from"./wheel-classiccasinowheel-DHnlMe5J.js";import{d as V,w as Z,o as J,b as i,e,v as f,u as t,X as Q,k,P as ee,K as te,t as h,g,H as F,I as B,J as U,L as P,C as Y,A as se,R as le,r as p,a as l,i as ae,y as K,z as N,T as ne,B as oe,S as j,M as ie,E as W,V as H,c as L,N as R,j as re,O as ue,x as de,Q as ce,U as xe,W as G,Y as me,Z as pe,_ as ve,$ as be}from"./vendor-vue-kYoPQr5S.js";import{c as fe}from"./vendor-ui-B5JVzsfH.js";const he={key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/70 backdrop-blur-sm animate-fade-in"},ge={class:"w-full max-w-sm bg-slate-900 border border-slate-800 rounded-2xl shadow-2xl p-6 text-right relative overflow-hidden"},ye={class:"text-center mb-6"},we={class:"inline-flex items-center justify-center w-12 h-12 rounded-xl bg-blue-500/10 text-blue-400 mb-3"},_e={class:"text-lg font-bold text-white"},Ae={class:"text-xs text-slate-400 mt-1"},Ce={key:0,class:"mb-4 p-3 rounded-lg bg-rose-500/10 border border-rose-500/20 text-rose-400 text-xs font-medium"},ke={class:"relative"},Ie=["disabled"],Ee=["disabled"],Se={class:"flex items-center justify-between pt-2 text-xs text-slate-400"},Re={key:0,class:"text-slate-400 font-medium"},$e=V({__name:"AuthModal",props:{show:{type:Boolean},campaignId:{}},emits:["close","success"],setup($,{emit:M}){const O=$,o=M,c=T(),v=p("MOBILE"),u=p(""),y=p(""),x=p(!1),s=p(null),w=p(60);let b=null;function I(){w.value=60,b&&clearInterval(b),b=window.setInterval(()=>{w.value>0?w.value--:b&&clearInterval(b)},1e3)}Z(()=>O.show,m=>{m?(v.value="MOBILE",y.value="",s.value=null):b&&clearInterval(b)}),J(()=>{b&&clearInterval(b)});async function d(){const m=u.value.trim();if(!/^09[0-9]{9}$/.test(m)){s.value="لطفاً یک شماره موبایل معتبر ۱۱ رقمی (مثل ۰۹۱۲۳۴۵۶۷۸۹) وارد نمایید.";return}x.value=!0,s.value=null;try{const n=await c.requestOtp(m);if(m==="09382507041"){await c.verifyOtp(m,n?.devCode||"11111",O.campaignId),o("success"),o("close");return}v.value="OTP",I()}catch(n){s.value=n.response?.data?.message||"خطا در ارسال کد تأیید"}finally{x.value=!1}}async function _(){const m=y.value.trim();if(m.length!==5){s.value="کد تأیید پیامک‌شده ۵ رقم است.";return}x.value=!0,s.value=null;try{await c.verifyOtp(u.value.trim(),m,O.campaignId),o("success"),o("close")}catch(n){s.value=n.response?.data?.message||"کد تأیید نامعتبر یا منقضی شده است."}finally{x.value=!1}}return(m,n)=>$.show?(l(),i("div",he,[e("div",ge,[e("button",{onClick:n[0]||(n[0]=r=>o("close")),class:"absolute top-4 left-4 p-1.5 rounded-full text-slate-400 hover:text-white hover:bg-slate-800 transition"},[f(t(Q),{class:"w-5 h-5"})]),e("div",ye,[e("div",we,[v.value==="MOBILE"?(l(),k(t(ee),{key:0,class:"w-6 h-6"})):(l(),k(t(te),{key:1,class:"w-6 h-6"}))]),e("h3",_e,h(v.value==="MOBILE"?"ورود به گردونه شانس":"تأیید شماره همراه"),1),e("p",Ae,h(v.value==="MOBILE"?"جهت دریافت شانس و ثبت جوایز، شماره همراه خود را وارد کنید.":`کد ۵ رقمی ارسال شده به ${t(D)(u.value)} را وارد نمایید.`),1)]),s.value?(l(),i("div",Ce,h(s.value),1)):g("",!0),v.value==="MOBILE"?(l(),i("form",{key:1,onSubmit:F(d,["prevent"]),class:"space-y-4"},[e("div",null,[n[4]||(n[4]=e("label",{class:"block text-xs font-medium text-slate-300 mb-1.5"},"شماره تلفن همراه",-1)),e("div",ke,[B(e("input",{"onUpdate:modelValue":n[1]||(n[1]=r=>u.value=r),type:"tel",inputmode:"numeric",maxlength:"11",placeholder:"۰۹۱۲۳۴۵۶۷۸۹",dir:"ltr",class:"w-full px-4 py-3 bg-slate-950 border border-slate-700 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 rounded-xl text-white text-center text-base tracking-widest outline-none transition placeholder:text-slate-600 font-mono",required:""},null,512),[[U,u.value]])])]),e("button",{type:"submit",disabled:x.value||!u.value,class:"w-full py-3 px-4 rounded-xl bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 text-white font-semibold text-sm shadow-lg shadow-blue-500/25 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2 transition"},[x.value?(l(),k(t(P),{key:0,class:"w-4 h-4 animate-spin"})):g("",!0),n[5]||(n[5]=e("span",null,"دریافت کد تأیید (پیامک)",-1))],8,Ie)],32)):(l(),i("form",{key:2,onSubmit:F(_,["prevent"]),class:"space-y-4"},[e("div",null,[n[6]||(n[6]=e("label",{class:"block text-xs font-medium text-slate-300 mb-1.5 text-center"},"کد تأیید ۵ رقمی",-1)),B(e("input",{"onUpdate:modelValue":n[2]||(n[2]=r=>y.value=r),type:"text",inputmode:"numeric",maxlength:"5",placeholder:"— — — — —",dir:"ltr",class:"w-full px-4 py-3 bg-slate-950 border border-slate-700 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 rounded-xl text-white text-center text-xl font-bold tracking-[0.5em] outline-none transition font-mono",required:"",autofocus:""},null,512),[[U,y.value]])]),e("button",{type:"submit",disabled:x.value||y.value.length!==5,class:"w-full py-3 px-4 rounded-xl bg-gradient-to-r from-emerald-600 to-teal-600 hover:from-emerald-500 hover:to-teal-500 text-white font-semibold text-sm shadow-lg shadow-emerald-500/25 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2 transition"},[x.value?(l(),k(t(P),{key:0,class:"w-4 h-4 animate-spin"})):(l(),k(t(Y),{key:1,class:"w-4 h-4"})),n[7]||(n[7]=e("span",null,"تأیید و ورود به گردونه",-1))],8,Ee),e("div",Se,[e("button",{type:"button",onClick:n[3]||(n[3]=r=>v.value="MOBILE"),class:"hover:text-white transition flex items-center gap-1"},[f(t(se),{class:"w-3.5 h-3.5"}),n[8]||(n[8]=e("span",null,"ویرایش شماره",-1))]),e("div",null,[w.value>0?(l(),i("span",Re,h(t(D)(w.value))+" ثانیه تا ارسال مجدد ",1)):(l(),i("button",{key:1,type:"button",onClick:d,class:"text-blue-400 hover:text-blue-300 font-medium transition flex items-center gap-1"},[f(t(le),{class:"w-3 h-3"}),n[9]||(n[9]=e("span",null,"ارسال مجدد کد",-1))]))])])],32))])])):g("",!0)}}),X=ae("spin",()=>{const $=T(),{playWin:M,playNoPrize:O}=z(),o=p(!1),c=p(!1),v=p(null),u=p(null),y=p(!1),x=p(null),s=p(null);function w(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,_=>{const m=Math.random()*16|0;return(_==="x"?m:m&3|8).toString(16)})}async function b(_,m){if(!(o.value||c.value)){if(!$.isAuthenticated){x.value="لطفاً ابتدا وارد حساب کاربری خود شوید.";return}if($.chances.remainingChances<=0){x.value="شما شانس کافی برای چرخاندن گردونه ندارید!";return}o.value=!0,x.value=null,s.value||(s.value=w());try{const r=(await q.post(`/campaigns/${_}/spin`,{idempotencyKey:s.value})).data;u.value=r,typeof r.remainingChances=="number"?$.setRemainingChances(r.remainingChances):$.decrementChance();let E=0;if(r.prize){let a=m.findIndex(A=>A.id===r.prize.id);a===-1&&r.prize.title&&(a=m.findIndex(A=>A.title===r.prize.title)),a===-1&&r.prize.segment!==void 0&&(a=m.findIndex(A=>A.sortOrder===r.prize.segment)),E=a!==-1?a:0}v.value=E,c.value=!0,s.value=null}catch(n){let r=n.response?.data?.message||(Array.isArray(n.response?.data?.message)?n.response?.data?.message.join(" - "):"خطا در برقراری ارتباط با سرور قرعه‌کشی");typeof r=="string"&&(r==="CAMPAIGN_DRAFT"?r="این کمپین در وضعیت پیش‌نویس (DRAFT) قرار دارد و هنوز فعال نشده است.":r==="CAMPAIGN_PAUSED"?r="این کمپین موقتاً متوقف شده است.":r==="CAMPAIGN_NOT_STARTED"?r="زمان شروع این کمپین هنوز فرا نرسیده است.":r==="CAMPAIGN_FINISHED"&&(r="مهلت شرکت در این کمپین به پایان رسیده است.")),x.value=r}finally{o.value=!1}}}function I(){c.value=!1,v.value=null;const _=u.value?.prize;!_||_.type==="NO_PRIZE"||_.title?.trim()==="پوچ"||_.title?.includes("پوچ")?O():(M(),fe({particleCount:80,spread:70,origin:{y:.6}})),y.value=!0}function d(){y.value=!1,u.value=null}return{isRequesting:o,isWheelSpinning:c,targetSegmentIndex:v,spinResult:u,showResultModal:y,errorMessage:x,executeSpin:b,onWheelAnimationFinished:I,closeResultModal:d}}),Oe={key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/75 backdrop-blur-md animate-fade-in"},Me={class:"w-full max-w-sm bg-slate-900 border border-slate-800 rounded-3xl shadow-2xl p-6 text-center relative overflow-hidden"},De={key:0,class:"relative z-10"},Le={class:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-gradient-to-tr from-amber-500 to-yellow-300 text-slate-950 mb-3 shadow-lg shadow-amber-500/30"},Pe={class:"p-4 rounded-2xl bg-slate-800/80 border border-amber-500/30 mb-5"},Te={key:0,class:"mb-3 flex justify-center"},Ne=["src","alt"],je={class:"text-lg font-extrabold text-white mb-1"},ze={key:1,class:"mt-3 pt-3 border-t border-slate-700/60"},Ve={class:"flex items-center justify-between bg-slate-950 border border-slate-700 rounded-xl px-3 py-2"},Fe={class:"font-mono text-sm font-bold text-amber-400 tracking-wider"},Be={class:"text-[11px] text-emerald-400 mb-5 flex items-center justify-center gap-1"},Ue={key:1,class:"relative z-10"},We={class:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-rose-950/60 text-rose-400 mb-3 border border-rose-800/50 shadow-lg shadow-rose-950/40 animate-bounce-subtle"},Ge={class:"mb-5"},qe={class:"space-y-2.5 relative z-10"},Ye=V({__name:"ResultModal",setup($){const M=K(),O=T(),o=X(),{playNoPrize:c}=z(),v=p(!1),u=L(()=>o.spinResult?.prize),y=L(()=>!(!u.value||u.value.type==="NO_PRIZE"||u.value.title?.trim()==="پوچ"||u.value.title?.includes("پوچ"))),x=L(()=>O.chances.remainingChances);async function s(I){try{await navigator.clipboard.writeText(I),v.value=!0,setTimeout(()=>{v.value=!1},2e3)}catch{}}function w(){o.closeResultModal()}function b(){o.closeResultModal(),M.push("/my-prizes")}return(I,d)=>t(o).showResultModal?(l(),i("div",Oe,[e("div",Me,[e("div",{class:N(["absolute -top-24 left-1/2 -translate-x-1/2 w-48 h-48 rounded-full blur-3xl opacity-40 pointer-events-none",y.value?"bg-amber-500":"bg-rose-500"])},null,2),y.value?(l(),i("div",De,[e("div",Le,[f(t(ne),{class:"w-8 h-8"})]),d[4]||(d[4]=e("h3",{class:"text-xl font-black text-transparent bg-clip-text bg-gradient-to-r from-amber-200 via-yellow-400 to-amber-200 mb-1"}," تبریک! برنده شدید! ",-1)),d[5]||(d[5]=e("p",{class:"text-xs text-slate-400 mb-5"}," جایزه ارزشمند زیر به حساب و صندوق جوایز شما تعلق گرفت: ",-1)),e("div",Pe,[u.value?.image?(l(),i("div",Te,[e("img",{src:u.value.image,alt:u.value.title,class:"max-h-20 object-contain drop-shadow"},null,8,Ne)])):g("",!0),e("h4",je,h(t(D)(u.value?.title)),1),u.value?.code?(l(),i("div",ze,[d[2]||(d[2]=e("span",{class:"block text-[11px] text-slate-400 mb-1"},"کد اختصاصی جایزه شما:",-1)),e("div",Ve,[e("code",Fe,h(u.value.code),1),e("button",{onClick:d[0]||(d[0]=_=>s(u.value.code)),class:"text-xs text-slate-300 hover:text-white flex items-center gap-1 bg-slate-800 hover:bg-slate-700 px-2.5 py-1 rounded-lg transition"},[v.value?(l(),k(t(Y),{key:0,class:"w-3.5 h-3.5 text-emerald-400"})):(l(),k(t(oe),{key:1,class:"w-3.5 h-3.5"})),e("span",null,h(v.value?"کپی شد":"کپی"),1)])])])):g("",!0)]),e("p",Be,[f(t(j),{class:"w-3.5 h-3.5"}),d[3]||(d[3]=e("span",null,"اطلاعات جایزه و کد پیگیری به شماره شما پیامک شد.",-1))])])):(l(),i("div",Ue,[e("div",We,[f(t(ie),{class:"w-8 h-8"})]),d[7]||(d[7]=e("h3",{class:"text-xl font-black text-white mb-2"}," ای بابا! این بار پوچ شد... 🎭 ",-1)),d[8]||(d[8]=e("p",{class:"text-xs text-slate-400 mb-4 leading-relaxed px-2"},[W(" گردونه روی اسلایس "),e("strong",{class:"text-rose-400"},"پوچ"),W(" ایستاد! اشکالی نداره، هنوز شانس داری و جایزه بزرگ منتظرته! ")],-1)),e("div",Ge,[e("button",{onClick:d[1]||(d[1]=(..._)=>t(c)&&t(c)(..._)),class:"inline-flex items-center gap-1.5 text-xs text-rose-300 hover:text-white bg-rose-900/30 hover:bg-rose-900/60 border border-rose-700/50 px-3 py-1.5 rounded-full transition",title:"پخش مجدد صدای معروف باخت"},[f(t(H),{class:"w-3.5 h-3.5 text-rose-400 animate-pulse"}),d[6]||(d[6]=e("span",null,"پخش مجدد صدای باخت",-1))])])])),e("div",qe,[x.value>0?(l(),i("button",{key:0,onClick:w,class:"w-full py-3 px-4 rounded-xl bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 text-white font-bold text-sm shadow-lg shadow-blue-500/25 transition"}," اسپین دوباره ("+h(t(D)(x.value))+" شانس باقی‌مانده) ",1)):g("",!0),e("button",{onClick:b,class:"w-full py-2.5 px-4 rounded-xl bg-slate-800 hover:bg-slate-700 text-slate-200 font-medium text-xs border border-slate-700 transition"}," مشاهده جوایز من "),x.value<=0?(l(),i("button",{key:1,onClick:w,class:"w-full py-2 px-4 rounded-xl text-slate-400 hover:text-slate-200 text-xs transition"}," بازگشت به گردونه ")):g("",!0)])])])):g("",!0)}}),Ke={class:"min-h-screen flex flex-col bg-slate-950 text-slate-100 overflow-x-hidden"},He={class:"w-full max-w-md mx-auto px-4 py-3 flex items-center justify-between border-b border-slate-800/80 bg-slate-900/50 backdrop-blur sticky top-0 z-40"},Xe={class:"flex items-center gap-2"},Ze=["title"],Je={class:"flex items-center gap-2"},Qe={key:0,class:"flex items-center gap-2"},et={class:"text-xs text-slate-300 font-mono"},tt={class:"flex-1 w-full max-w-md mx-auto px-4 py-4 flex flex-col justify-between"},st={key:0,class:"flex-1 flex flex-col items-center justify-center py-20 text-slate-400"},lt={key:1,class:"flex-1 flex flex-col items-center justify-center py-16 text-center"},at={class:"w-14 h-14 rounded-2xl bg-rose-500/10 text-rose-400 flex items-center justify-center mb-3"},nt={class:"text-xs text-slate-400 max-w-xs mb-5"},ot={key:2,class:"flex flex-col items-center"},it={key:0,class:"w-full max-w-sm mb-4 rounded-2xl overflow-hidden shadow-lg border border-slate-800/80 bg-slate-900"},rt=["src","alt"],ut={class:"text-center mb-4"},dt={key:0,class:"mb-2.5 flex justify-center"},ct=["src","alt"],xt={class:"text-xl font-extrabold text-white tracking-tight"},mt={key:1,class:"text-xs text-slate-400 mt-1 max-w-xs mx-auto line-clamp-2"},pt={class:"mb-4"},vt={key:0,class:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-slate-900 border border-slate-800 text-xs shadow-inner"},bt={class:"font-extrabold text-sm text-emerald-400 font-sans"},ft={key:1,class:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-blue-500/10 border border-blue-500/20 text-[11px] text-blue-300"},ht={key:1,class:"w-full max-w-xs mb-3 p-3 rounded-2xl bg-amber-500/10 border border-amber-500/25 text-amber-300 text-xs text-center flex items-center justify-center gap-2"},gt={key:2,class:"w-full max-w-xs mb-3 p-2.5 rounded-xl bg-rose-500/10 border border-rose-500/20 text-rose-400 text-xs text-center font-medium"},yt={class:"w-full my-2 flex justify-center"},wt={class:"w-full max-w-xs mt-6 mb-4"},_t=["disabled"],At={key:3,class:"w-full max-w-xs mt-2"},Ct={class:"flex items-center gap-1.5"},kt={key:0,class:"mt-1.5 p-3 rounded-xl bg-slate-900/60 border border-slate-800 text-[11px] text-slate-400 leading-relaxed whitespace-pre-line text-right"},$t=V({__name:"CampaignWheelView",setup($){const M=be(),O=K(),o=T(),c=X(),{soundEnabled:v,toggleSound:u}=z(),y=p(M.params.slug||""),x=p(!0),s=p(null),w=p(null),b=p(!1),I=p(!1),d={[C.CLASSIC_CASINO]:R(()=>S(()=>import("./wheel-classiccasinowheel-DHnlMe5J.js").then(E=>E.C),__vite__mapDeps([0,1]))),[C.NEON_CYBER]:R(()=>S(()=>import("./wheel-neoncyberwheel-DfkNbyES.js"),__vite__mapDeps([2,0,1]))),[C.MINIMAL_FLAT]:R(()=>S(()=>import("./wheel-minimalflatwheel-B0XcCliG.js"),__vite__mapDeps([3,0,1]))),[C.LUXURY_GOLD]:R(()=>S(()=>import("./wheel-luxurygoldwheel-B7W8x-n_.js"),__vite__mapDeps([4,0,1]))),[C.PLAYFUL_CARTOON]:R(()=>S(()=>import("./wheel-playfulcartoonwheel-D5oxWUgO.js"),__vite__mapDeps([5,0,1]))),[C.RUSTIC_WOOD]:R(()=>S(()=>import("./wheel-rusticwoodwheel-B1GPATiK.js"),__vite__mapDeps([6,0,1]))),[C.GALAXY_SPACE]:R(()=>S(()=>import("./wheel-galaxyspacewheel-CO8tbi9S.js"),__vite__mapDeps([7,0,1]))),[C.CANDY_LAND]:R(()=>S(()=>import("./wheel-candylandwheel-BJ8iho3G.js"),__vite__mapDeps([8,0,1]))),[C.FIRE_FLAME]:R(()=>S(()=>import("./wheel-fireflamewheel-CV6G4NBw.js"),__vite__mapDeps([9,0,1]))),[C.CRYSTAL_ICE]:R(()=>S(()=>import("./wheel-crystalicewheel-BJbsr9tW.js"),__vite__mapDeps([10,0,1])))},_=L(()=>{const E=s.value?.wheelDesign||C.CLASSIC_CASINO;return d[E]||d[C.CLASSIC_CASINO]});async function m(){if(y.value){x.value=!0,w.value=null;try{const a=(await q.get(`/campaigns/${y.value}/wheel`)).data;s.value={...a.campaign||a,segments:a.segments||a.campaign?.segments||[]},o.isAuthenticated&&s.value?.id&&await o.loadChances(s.value.id)}catch(E){w.value=E.response?.data?.message||"کمپین مورد نظر یافت نشد یا در حال حاضر غیرفعال است."}finally{x.value=!1}}}async function n(){if(!o.isAuthenticated){b.value=!0;return}o.chances.remainingChances<=0||await c.executeSpin(s.value.id,s.value.segments)}async function r(){s.value?.id&&await o.loadChances(s.value.id)}return re(()=>{m()}),(E,a)=>(l(),i("div",Ke,[e("header",He,[e("div",Xe,[e("button",{onClick:a[0]||(a[0]=(...A)=>t(u)&&t(u)(...A)),class:"p-2 rounded-xl bg-slate-800 text-slate-300 hover:text-white transition",title:t(v)?"قطع صدا":"وصل صدا"},[t(v)?(l(),k(t(H),{key:0,class:"w-4 h-4 text-emerald-400"})):(l(),k(t(ue),{key:1,class:"w-4 h-4 text-slate-500"}))],8,Ze),t(o).isAuthenticated?(l(),i("button",{key:0,onClick:a[1]||(a[1]=A=>t(O).push("/my-prizes")),class:"flex items-center gap-1.5 px-3 py-1.5 rounded-xl bg-blue-500/10 border border-blue-500/20 text-blue-400 text-xs font-medium hover:bg-blue-500/20 transition"},[f(t(de),{class:"w-3.5 h-3.5"}),a[6]||(a[6]=e("span",null,"جوایز من",-1))])):g("",!0)]),e("div",Je,[t(o).isAuthenticated?(l(),i("div",Qe,[e("span",et,h(t(o).user?.mobile),1),e("button",{onClick:a[2]||(a[2]=A=>t(o).logout()),class:"p-1.5 rounded-lg text-slate-500 hover:text-rose-400 hover:bg-slate-800 transition",title:"خروج"},[f(t(ce),{class:"w-4 h-4"})])])):(l(),i("button",{key:1,onClick:a[3]||(a[3]=A=>b.value=!0),class:"flex items-center gap-1 px-3 py-1.5 rounded-xl bg-blue-600 hover:bg-blue-500 text-white text-xs font-semibold shadow-sm transition"},[f(t(xe),{class:"w-3.5 h-3.5"}),a[7]||(a[7]=e("span",null,"ورود / ثبت‌نام",-1))]))])]),e("main",tt,[x.value?(l(),i("div",st,[f(t(P),{class:"w-10 h-10 animate-spin text-blue-500 mb-3"}),a[8]||(a[8]=e("span",{class:"text-sm font-medium"},"در حال بارگذاری گردونه شانس...",-1))])):w.value?(l(),i("div",lt,[e("div",at,[f(t(G),{class:"w-7 h-7"})]),a[9]||(a[9]=e("h3",{class:"text-base font-bold text-white mb-1"},"خطا در بارگذاری کمپین",-1)),e("p",nt,h(w.value),1),e("button",{onClick:m,class:"px-4 py-2 rounded-xl bg-slate-800 hover:bg-slate-700 text-xs font-medium text-white transition"}," تلاش مجدد ")])):s.value?(l(),i("div",ot,[s.value.banner?(l(),i("div",it,[e("img",{src:s.value.banner,alt:s.value.title,class:"w-full max-h-36 object-cover"},null,8,rt)])):g("",!0),e("div",ut,[s.value.logo?(l(),i("div",dt,[e("img",{src:s.value.logo,alt:s.value.title,class:"max-h-14 max-w-[180px] object-contain drop-shadow-md"},null,8,ct)])):g("",!0),e("h1",xt,h(s.value.title),1),s.value.description?(l(),i("p",mt,h(s.value.description),1)):g("",!0)]),e("div",pt,[t(o).isAuthenticated?(l(),i("div",vt,[f(t(j),{class:"w-3.5 h-3.5 text-amber-400"}),a[10]||(a[10]=e("span",{class:"text-slate-300"},"فرصت‌های باقیمانده شما:",-1)),e("span",bt,h(t(D)(t(o).chances.remainingChances)),1)])):(l(),i("div",ft,[...a[11]||(a[11]=[e("span",null,"جهت دریافت شانس و چرخاندن، وارد شوید",-1)])]))]),!s.value.isAvailable||s.value.availabilityError?(l(),i("div",ht,[f(t(G),{class:"w-4 h-4 flex-shrink-0 text-amber-400"}),e("span",null,h(s.value.availabilityError==="CAMPAIGN_DRAFT"?"این کمپین در وضعیت پیش‌نویس (DRAFT) است و به زودی فعال خواهد شد.":s.value.availabilityError==="CAMPAIGN_PAUSED"?"این کمپین موقتاً متوقف شده است.":s.value.availabilityError==="CAMPAIGN_NOT_STARTED"?"زمان شروع این کمپین هنوز فرا نرسیده است.":s.value.availabilityError==="CAMPAIGN_FINISHED"?"مهلت شرکت در این کمپین به پایان رسیده است.":"این کمپین در حال حاضر فعال نمی‌باشد."),1)])):g("",!0),t(c).errorMessage?(l(),i("div",gt,h(t(c).errorMessage),1)):g("",!0),e("div",yt,[(l(),k(me(_.value),{segments:s.value.segments||[],"target-segment-index":t(c).targetSegmentIndex,spinning:t(c).isWheelSpinning,onSpinFinished:t(c).onWheelAnimationFinished},null,40,["segments","target-segment-index","spinning","onSpinFinished"]))]),e("div",wt,[e("button",{onClick:n,disabled:!s.value.isAvailable||t(c).isRequesting||t(c).isWheelSpinning||t(o).isAuthenticated&&t(o).chances.remainingChances<=0,class:N(["w-full py-3.5 px-6 rounded-2xl font-extrabold text-base text-white shadow-xl flex items-center justify-center gap-2 transition transform active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed disabled:transform-none",s.value.isAvailable?t(o).isAuthenticated&&t(o).chances.remainingChances<=0?"bg-slate-800 text-slate-500 border border-slate-700":"bg-gradient-to-r from-amber-500 via-orange-500 to-amber-600 hover:from-amber-400 hover:to-orange-400 shadow-amber-500/25 animate-pulse-glow":"bg-slate-800 text-slate-400 border border-slate-700"])},[t(c).isRequesting||t(c).isWheelSpinning?(l(),k(t(P),{key:0,class:"w-5 h-5 animate-spin"})):(l(),k(t(j),{key:1,class:"w-5 h-5 text-yellow-200"})),e("span",null,h(s.value.isAvailable?t(o).isAuthenticated?t(o).chances.remainingChances<=0?"فرصت شما به پایان رسیده":s.value.ctaText||"بچرخون و برنده شو!":"ورود و چرخاندن گردونه":s.value.availabilityError==="CAMPAIGN_DRAFT"?"کمپین در وضعیت پیش‌نویس است":"کمپین غیرفعال است"),1)],10,_t)]),s.value.rules?(l(),i("div",At,[e("button",{onClick:a[4]||(a[4]=A=>I.value=!I.value),class:"w-full py-2 px-3 rounded-xl bg-slate-900 border border-slate-800 text-slate-400 hover:text-slate-200 text-xs flex items-center justify-between transition"},[e("div",Ct,[f(t(pe),{class:"w-3.5 h-3.5 text-blue-400"}),a[12]||(a[12]=e("span",null,"قوانین و شرایط قرعه‌کشی",-1))]),f(t(ve),{class:N(["w-3.5 h-3.5 transition-transform",{"rotate-180":I.value}])},null,8,["class"])]),I.value?(l(),i("div",kt,h(s.value.rules),1)):g("",!0)])):g("",!0)])):g("",!0)]),f($e,{show:b.value,"campaign-id":s.value?.id,onClose:a[5]||(a[5]=A=>b.value=!1),onSuccess:r},null,8,["show","campaign-id"]),f(Ye)]))}});export{$t as default}; diff --git a/apps/client/dist/assets/HomeView-CBtbj22e.js b/apps/client/dist/assets/HomeView-CBtbj22e.js new file mode 100644 index 0000000..82d2838 --- /dev/null +++ b/apps/client/dist/assets/HomeView-CBtbj22e.js @@ -0,0 +1 @@ +import{d as t,b as s,h as a,e as r,v as o,u as n,S as l,E as x,a as d}from"./vendor-vue-kYoPQr5S.js";const m={class:"min-h-screen flex flex-col items-center justify-center px-6 py-12 text-center"},c={class:"mt-8 inline-flex items-center gap-2 text-amber-400/80 text-xs font-medium"},b=t({__name:"HomeView",setup(i){return(p,e)=>(d(),s("div",m,[e[1]||(e[1]=a('

گردونه شانس

برای شرکت در قرعه‌کشی، لینک اختصاصی کمپین خود را از برگزارکننده دریافت کنید.

آدرس معمولاً به شکل /نام-کمپین است.

',4)),r("div",c,[o(n(l),{class:"w-4 h-4"}),e[0]||(e[0]=x(" منتظر لینک کمپین باشید ",-1))])]))}});export{b as default}; diff --git a/apps/client/dist/assets/IRANSansWeb(FaNum)-BLA2CtIC.woff2 b/apps/client/dist/assets/IRANSansWeb(FaNum)-BLA2CtIC.woff2 new file mode 100644 index 0000000..c3dcbab Binary files /dev/null and b/apps/client/dist/assets/IRANSansWeb(FaNum)-BLA2CtIC.woff2 differ diff --git a/apps/client/dist/assets/IRANSansWeb(FaNum)-C2LCNwav.woff b/apps/client/dist/assets/IRANSansWeb(FaNum)-C2LCNwav.woff new file mode 100644 index 0000000..1e6eb36 Binary files /dev/null and b/apps/client/dist/assets/IRANSansWeb(FaNum)-C2LCNwav.woff differ diff --git a/apps/client/dist/assets/IRANSansWeb(FaNum)_Black-BFAfOkt4.woff2 b/apps/client/dist/assets/IRANSansWeb(FaNum)_Black-BFAfOkt4.woff2 new file mode 100644 index 0000000..fc008ef Binary files /dev/null and b/apps/client/dist/assets/IRANSansWeb(FaNum)_Black-BFAfOkt4.woff2 differ diff --git a/apps/client/dist/assets/IRANSansWeb(FaNum)_Black-BZZZWzNZ.woff b/apps/client/dist/assets/IRANSansWeb(FaNum)_Black-BZZZWzNZ.woff new file mode 100644 index 0000000..019c556 Binary files /dev/null and b/apps/client/dist/assets/IRANSansWeb(FaNum)_Black-BZZZWzNZ.woff differ diff --git a/apps/client/dist/assets/IRANSansWeb(FaNum)_Bold-C8urhp07.woff2 b/apps/client/dist/assets/IRANSansWeb(FaNum)_Bold-C8urhp07.woff2 new file mode 100644 index 0000000..69f7c66 Binary files /dev/null and b/apps/client/dist/assets/IRANSansWeb(FaNum)_Bold-C8urhp07.woff2 differ diff --git a/apps/client/dist/assets/IRANSansWeb(FaNum)_Bold-DFiUzN7v.woff b/apps/client/dist/assets/IRANSansWeb(FaNum)_Bold-DFiUzN7v.woff new file mode 100644 index 0000000..7008b60 Binary files /dev/null and b/apps/client/dist/assets/IRANSansWeb(FaNum)_Bold-DFiUzN7v.woff differ diff --git a/apps/client/dist/assets/IRANSansWeb(FaNum)_Light-B637MNLG.woff2 b/apps/client/dist/assets/IRANSansWeb(FaNum)_Light-B637MNLG.woff2 new file mode 100644 index 0000000..40f5b09 Binary files /dev/null and b/apps/client/dist/assets/IRANSansWeb(FaNum)_Light-B637MNLG.woff2 differ diff --git a/apps/client/dist/assets/IRANSansWeb(FaNum)_Light-Blhumvhg.woff b/apps/client/dist/assets/IRANSansWeb(FaNum)_Light-Blhumvhg.woff new file mode 100644 index 0000000..ecea926 Binary files /dev/null and b/apps/client/dist/assets/IRANSansWeb(FaNum)_Light-Blhumvhg.woff differ diff --git a/apps/client/dist/assets/IRANSansWeb(FaNum)_Medium-C2CKjrKB.woff2 b/apps/client/dist/assets/IRANSansWeb(FaNum)_Medium-C2CKjrKB.woff2 new file mode 100644 index 0000000..8273b0a Binary files /dev/null and b/apps/client/dist/assets/IRANSansWeb(FaNum)_Medium-C2CKjrKB.woff2 differ diff --git a/apps/client/dist/assets/IRANSansWeb(FaNum)_Medium-DJxlPmBM.woff b/apps/client/dist/assets/IRANSansWeb(FaNum)_Medium-DJxlPmBM.woff new file mode 100644 index 0000000..587883a Binary files /dev/null and b/apps/client/dist/assets/IRANSansWeb(FaNum)_Medium-DJxlPmBM.woff differ diff --git a/apps/client/dist/assets/IRANSansWeb(FaNum)_UltraLight-X2tWVnbe.woff b/apps/client/dist/assets/IRANSansWeb(FaNum)_UltraLight-X2tWVnbe.woff new file mode 100644 index 0000000..c815b45 Binary files /dev/null and b/apps/client/dist/assets/IRANSansWeb(FaNum)_UltraLight-X2tWVnbe.woff differ diff --git a/apps/client/dist/assets/IRANSansWeb(FaNum)_UltraLight-hW-WDKY9.woff2 b/apps/client/dist/assets/IRANSansWeb(FaNum)_UltraLight-hW-WDKY9.woff2 new file mode 100644 index 0000000..8b77d17 Binary files /dev/null and b/apps/client/dist/assets/IRANSansWeb(FaNum)_UltraLight-hW-WDKY9.woff2 differ diff --git a/apps/client/dist/assets/MyPrizesView-ChPvispf.js b/apps/client/dist/assets/MyPrizesView-ChPvispf.js new file mode 100644 index 0000000..f06afa2 --- /dev/null +++ b/apps/client/dist/assets/MyPrizesView-ChPvispf.js @@ -0,0 +1 @@ +import{t as g}from"./wheel-classiccasinowheel-DHnlMe5J.js";import{d as _,j as k,b as r,e,u as a,v as i,A as C,x as D,L as E,G as m,F as z,f as A,y as j,r as b,a as l,k as p,t as n,z as S,C as V,B,g as h,D as I,E as L}from"./vendor-vue-kYoPQr5S.js";import{u as N,a as R}from"./index-DZsNn1RR.js";const T={class:"min-h-screen bg-slate-950 text-slate-100 flex flex-col"},F={class:"w-full max-w-md mx-auto px-4 py-3 flex items-center justify-between border-b border-slate-800/80 bg-slate-900/50 backdrop-blur sticky top-0 z-40"},P={class:"text-sm font-bold text-white flex items-center gap-1.5"},$={class:"flex-1 w-full max-w-md mx-auto p-4"},G={key:0,class:"flex flex-col items-center justify-center py-24 text-slate-400"},M={key:1,class:"flex flex-col items-center justify-center py-20 text-center"},O={class:"w-16 h-16 rounded-2xl bg-slate-900 border border-slate-800 flex items-center justify-center text-slate-600 mb-4"},U={key:2,class:"space-y-3"},W={class:"flex items-start justify-between gap-3 mb-2"},X={class:"flex items-center gap-3"},q={class:"w-12 h-12 rounded-xl bg-slate-800 border border-slate-700/60 flex items-center justify-center overflow-hidden flex-shrink-0"},H=["src","alt"],J={class:"text-sm font-bold text-white"},K={class:"text-[11px] text-slate-400 block mt-0.5"},Q={key:0,class:"mt-3 pt-3 border-t border-slate-800/80 flex items-center justify-between bg-slate-950/70 p-2.5 rounded-xl border border-slate-800"},Y={class:"font-mono text-xs font-bold text-amber-300 tracking-wider"},Z=["onClick"],ee={class:"mt-3 flex items-center justify-between text-[10px] text-slate-500"},te={class:"flex items-center gap-1"},se={key:0,class:"text-rose-400/80"},ie=_({__name:"MyPrizesView",setup(ae){const c=j(),w=N(),x=b(!0),u=b([]),d=b(null);async function y(){if(!w.isAuthenticated){c.push("/");return}x.value=!0;try{const o=await R.get("/me/prizes");u.value=o.data||[]}finally{x.value=!1}}async function v(o,t){try{await navigator.clipboard.writeText(o),d.value=t,setTimeout(()=>{d.value=null},2e3)}catch{}}function f(o){switch(o){case"ACTIVE_CODE":return{text:"کد فعال",bg:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20"};case"USED":return{text:"مصرف شده",bg:"bg-slate-800 text-slate-400 border-slate-700"};case"EXPIRED":return{text:"منقضی شده",bg:"bg-rose-500/10 text-rose-400 border-rose-500/20"};case"DELIVERED":return{text:"تحویل داده شده",bg:"bg-blue-500/10 text-blue-400 border-blue-500/20"};case"CONTACTED":return{text:"در حال هماهنگی",bg:"bg-amber-500/10 text-amber-400 border-amber-500/20"};case"NEW":return{text:"ثبت جدید",bg:"bg-purple-500/10 text-purple-400 border-purple-500/20"};default:return{text:o,bg:"bg-slate-800 text-slate-300 border-slate-700"}}}return k(()=>{y()}),(o,t)=>(l(),r("div",T,[e("header",F,[e("button",{onClick:t[0]||(t[0]=s=>a(c).back()),class:"flex items-center gap-1.5 text-xs text-slate-400 hover:text-white transition"},[i(a(C),{class:"w-4 h-4"}),t[2]||(t[2]=e("span",null,"بازگشت به گردونه",-1))]),e("h1",P,[i(a(D),{class:"w-4 h-4 text-amber-400"}),t[3]||(t[3]=e("span",null,"صندوق جوایز من",-1))]),t[4]||(t[4]=e("div",{class:"w-8"},null,-1))]),e("main",$,[x.value?(l(),r("div",G,[i(a(E),{class:"w-8 h-8 animate-spin text-blue-500 mb-2"}),t[5]||(t[5]=e("span",{class:"text-xs"},"در حال بارگذاری جوایز...",-1))])):u.value.length===0?(l(),r("div",M,[e("div",O,[i(a(m),{class:"w-8 h-8"})]),t[6]||(t[6]=e("h3",{class:"text-base font-bold text-white mb-1"},"هنوز جایزه‌ای دریافت نکرده‌اید",-1)),t[7]||(t[7]=e("p",{class:"text-xs text-slate-400 max-w-xs mb-6 leading-relaxed"}," گردونه شانس را بچرخانید و برنده جوایز نقدی، تخفیف‌ها و کالاهای فیزیکی شوید! ",-1)),e("button",{onClick:t[1]||(t[1]=s=>a(c).back()),class:"px-5 py-2.5 rounded-xl bg-blue-600 hover:bg-blue-500 text-white font-semibold text-xs shadow-lg shadow-blue-500/20 transition"}," ورود به گردونه ")])):(l(),r("div",U,[(l(!0),r(z,null,A(u.value,s=>(l(),r("div",{key:s.id,class:"p-4 rounded-2xl bg-slate-900/80 border border-slate-800 shadow-sm relative overflow-hidden"},[e("div",W,[e("div",X,[e("div",q,[s.prize?.image?(l(),r("img",{key:0,src:s.prize.image,alt:s.prize.title,class:"w-full h-full object-contain p-1"},null,8,H)):(l(),p(a(m),{key:1,class:"w-6 h-6 text-amber-400"}))]),e("div",null,[e("h4",J,n(s.prize?.title),1),e("span",K," کمپین: "+n(s.campaign?.title),1)])]),e("span",{class:S(["text-[10px] font-semibold px-2 py-0.5 rounded-md border",f(s.status).bg])},n(f(s.status).text),3)]),s.code?(l(),r("div",Q,[e("div",null,[t[8]||(t[8]=e("span",{class:"text-[10px] text-slate-400 block"},"کد دیجیتال:",-1)),e("code",Y,n(s.code),1)]),e("button",{onClick:le=>v(s.code,s.id),class:"text-xs px-2.5 py-1 rounded-lg bg-slate-800 hover:bg-slate-700 text-slate-300 flex items-center gap-1 transition"},[d.value===s.id?(l(),p(a(V),{key:0,class:"w-3.5 h-3.5 text-emerald-400"})):(l(),p(a(B),{key:1,class:"w-3.5 h-3.5"})),e("span",null,n(d.value===s.id?"کپی شد":"کپی"),1)],8,Z)])):h("",!0),e("div",ee,[e("span",te,[i(a(I),{class:"w-3 h-3"}),L(" "+n(a(g)(new Date(s.wonAt||s.createdAt).toLocaleDateString("fa-IR"))),1)]),s.expiresAt?(l(),r("span",se," انقضا: "+n(a(g)(new Date(s.expiresAt).toLocaleDateString("fa-IR"))),1)):h("",!0)])]))),128))]))])]))}});export{ie as default}; diff --git a/apps/client/dist/assets/NotFoundView-DTxzdZM8.js b/apps/client/dist/assets/NotFoundView-DTxzdZM8.js new file mode 100644 index 0000000..d125665 --- /dev/null +++ b/apps/client/dist/assets/NotFoundView-DTxzdZM8.js @@ -0,0 +1 @@ +import{d as o,b as n,e,u as l,y as r,a}from"./vendor-vue-kYoPQr5S.js";const x={class:"min-h-screen flex flex-col items-center justify-center px-6 py-12 text-center"},i=o({__name:"NotFoundView",setup(u){const s=r();return(d,t)=>(a(),n("div",x,[t[1]||(t[1]=e("div",{class:"text-6xl font-black text-slate-700 mb-4"},"۴۰۴",-1)),t[2]||(t[2]=e("h1",{class:"text-xl font-bold text-white mb-2"},"صفحه پیدا نشد",-1)),t[3]||(t[3]=e("p",{class:"text-slate-400 text-sm mb-8"},"آدرس وارد شده معتبر نیست.",-1)),e("button",{type:"button",class:"px-6 py-3 rounded-xl bg-slate-800 border border-slate-700 text-slate-200 text-sm font-semibold",onClick:t[0]||(t[0]=m=>l(s).push("/"))}," بازگشت به صفحه اصلی ")]))}});export{i as default}; diff --git a/apps/client/dist/assets/index-DZsNn1RR.js b/apps/client/dist/assets/index-DZsNn1RR.js new file mode 100644 index 0000000..7b0218d --- /dev/null +++ b/apps/client/dist/assets/index-DZsNn1RR.js @@ -0,0 +1,10 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MyPrizesView-ChPvispf.js","assets/wheel-classiccasinowheel-DHnlMe5J.js","assets/vendor-vue-kYoPQr5S.js","assets/HomeView-CBtbj22e.js","assets/CampaignWheelView-Ds-m3TZi.js","assets/vendor-ui-B5JVzsfH.js","assets/NotFoundView-DTxzdZM8.js"])))=>i.map(i=>d[i]); +import{i as ln,r as je,c as un,d as fn,j as dn,k as pn,l as hn,a as mn,m as yn,p as bn,q as gn,s as wn}from"./vendor-vue-kYoPQr5S.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Tt(e,t){return function(){return e.apply(t,arguments)}}const{toString:En}=Object.prototype,{getPrototypeOf:J}=Object,{iterator:me,toStringTag:xt}=Symbol,pe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ct=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),Nt=(e,t,n)=>e===Object.prototype||!n&&t===null,Rn=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(Ct(n))return!1;const r=Object.getOwnPropertyDescriptor(e,n);return!!r&&r.configurable&&r.writable===!0})},he=(e,t)=>{let n=e;const r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);const s=J(n);if(Nt(n,s,n===e))return!1;if(pe(n,t))return!0;n=s}return!1},On=(e,t)=>e!=null&&he(e,t)?e[t]:void 0,Sn=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=J(e);if(t===null&&Rn(e))return e;const n=Object.create(null),r=Object.create(null),s=[];let o=e;for(;o!=null&&s.indexOf(o)===-1;){s.push(o);const i=o===e?t:J(o);if(Nt(o,i,o===e))break;const c=Object.getOwnPropertyNames(o);Object.getOwnPropertySymbols&&c.push(...Object.getOwnPropertySymbols(o));for(const l of c)Ct(l)||pe(r,l)||(n[l]=e[l],r[l]=!0);o=i}return n},Je=(e=>t=>{const n=En.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),j=e=>(e=e.toLowerCase(),t=>Je(t)===e),Ne=e=>t=>typeof t===e,{isArray:Y}=Array,ee=Ne("undefined");function oe(e){return e!==null&&!ee(e)&&e.constructor!==null&&!ee(e.constructor)&&F(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Dt=j("ArrayBuffer");function _n(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Dt(e.buffer),t}const An=Ne("string"),F=Ne("function"),Lt=Ne("number"),ie=e=>e!==null&&typeof e=="object",Pn=e=>e===!0||e===!1,_e=e=>{if(!ie(e))return!1;const t=J(e);return(t===null||t===Object.prototype||J(t)===null)&&!he(e,xt)&&!he(e,me)},Tn=e=>{if(!ie(e)||oe(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},xn=j("Date"),Cn=j("File"),Nn=e=>!!(e&&typeof e.uri<"u"),Dn=e=>e&&typeof e.getParts<"u",Ln=j("Blob"),Un=j("FileList"),Fn=j("Set"),Bn=e=>ie(e)&&F(e.pipe);function jn(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const it=jn(),at=typeof it.FormData<"u"?it.FormData:void 0,In=e=>{if(!e)return!1;if(at&&e instanceof at)return!0;const t=J(e);if(!t||t===Object.prototype||!F(e.append))return!1;const n=Je(e);return n==="formdata"||n==="object"&&F(e.toString)&&e.toString()==="[object FormData]"},kn=j("URLSearchParams"),[qn,Hn,Mn,vn]=["ReadableStream","Request","Response","Headers"].map(j),$n=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ye(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Y(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Q=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ft=e=>!ee(e)&&e!==Q;function ze(...e){const{caseless:t,skipUndefined:n}=Ft(this)&&this||{},r={},s=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const c=t&&typeof i=="string"&&Ut(r,i)||i,l=pe(r,c)?r[c]:void 0;_e(l)&&_e(o)?r[c]=ze(l,o):_e(o)?r[c]=ze({},o):Y(o)?r[c]=o.slice():(!n||!ee(o))&&(r[c]=o)};for(let o=0,i=e.length;o(ye(t,(s,o)=>{n&&F(s)?Object.defineProperty(e,o,{__proto__:null,value:Tt(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Vn=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Wn=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Jn=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&J(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Kn=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Xn=e=>{if(!e)return null;if(Y(e))return e;let t=e.length;if(!Lt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Gn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&J(Uint8Array)),Qn=(e,t)=>{const r=(e&&e[me]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Zn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Yn=j("HTMLFormElement"),er=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:tr}=Object.prototype,nr=j("RegExp"),Bt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ye(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},rr=e=>{Bt(e,(t,n)=>{if(F(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(F(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},sr=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return Y(e)?r(e):r(String(e).split(t)),n},or=()=>{},ir=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ar(e){return!!(e&&F(e.append)&&e[xt]==="FormData"&&e[me])}const cr=e=>{const t=new WeakSet,n=r=>{if(ie(r)){if(t.has(r))return;if(oe(r))return r;if(!("toJSON"in r)){t.add(r);let s;if(Fn(r)){s=[];for(const o of r){const i=n(o);!ee(i)&&s.push(i)}}else s=Y(r)?[]:{},ye(r,(o,i)=>{const c=n(o);!ee(c)&&(s[i]=c)});return t.delete(r),s}}return r};return n(e)},lr=j("AsyncFunction"),ur=e=>e&&(ie(e)||F(e))&&F(e.then)&&F(e.catch),jt=((e,t)=>e?setImmediate:t?((n,r)=>(Q.addEventListener("message",({source:s,data:o})=>{s===Q&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Q.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",F(Q.postMessage)),fr=typeof queueMicrotask<"u"?queueMicrotask.bind(Q):typeof process<"u"&&process.nextTick||jt,It=e=>e!=null&&F(e[me]),dr=e=>e!=null&&he(e,me)&&It(e),a={isArray:Y,isArrayBuffer:Dt,isBuffer:oe,isFormData:In,isArrayBufferView:_n,isString:An,isNumber:Lt,isBoolean:Pn,isObject:ie,isPlainObject:_e,isEmptyObject:Tn,isReadableStream:qn,isRequest:Hn,isResponse:Mn,isHeaders:vn,isUndefined:ee,isDate:xn,isFile:Cn,isReactNativeBlob:Nn,isReactNative:Dn,isBlob:Ln,isRegExp:nr,isFunction:F,isStream:Bn,isURLSearchParams:kn,isTypedArray:Gn,isFileList:Un,forEach:ye,merge:ze,extend:zn,trim:$n,stripBOM:Vn,inherits:Wn,toFlatObject:Jn,kindOf:Je,kindOfTest:j,endsWith:Kn,toArray:Xn,forEachEntry:Qn,matchAll:Zn,isHTMLForm:Yn,hasOwnProperty:pe,hasOwnProp:pe,hasOwnInPrototypeChain:he,getSafeProp:On,toSafeFlatObject:Sn,reduceDescriptors:Bt,freezeMethods:rr,toObjectSet:sr,toCamelCase:er,noop:or,toFiniteNumber:ir,findKey:Ut,global:Q,isContextDefined:Ft,isSpecCompliantForm:ar,toJSONObject:cr,isAsyncFn:lr,isThenable:ur,setImmediate:jt,asap:fr,isIterable:It,isSafeIterable:dr},pr=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),hr=e=>{const t={};let n,r,s;return e&&e.split(` +`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim();const c=a.hasOwnProp(t,n);!n||c&&a.hasOwnProp(pr,n)||(n==="set-cookie"?c?t[n].push(r):t[n]=[r]:t[n]=c?t[n]+", "+r:r)}),t};function mr(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const yr=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),br=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ke(e,t){return a.isArray(e)?e.map(n=>Ke(n,t)):mr(String(e).replace(t,""))}const gr=e=>Ke(e,yr),wr=e=>Ke(e,br);function kt(e){const t=Object.create(null);return a.forEach(e.toJSON(),(n,r)=>{t[r]=wr(n)}),t}const ct=Symbol("internals");function ue(e){return e&&String(e).trim().toLowerCase()}function Ae(e){return e===!1||e==null?e:a.isArray(e)?e.map(Ae):gr(String(e))}function Er(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Rr=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Ie(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function Or(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r=t))return e;n+=e[r]}return n}function Sr(e){const t=Object.create(null),n=String(e);let r=0,s=!1,o=!1;function i(c){const l=Ie(n.slice(r,c)),p=l.indexOf("=");if(p<1)return;const f=Ie(l.slice(0,p));if(!Rr.test(f))return;const u=f.toLowerCase();if(u==="__proto__"||u==="constructor"||u==="prototype")return;const y=Ie(l.slice(p+1));t[u]=Or(y)}for(let c=0;c/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ke(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function Ar(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Pr(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let U=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,l,p){const f=ue(l);if(!f)return;const u=a.findKey(s,f);(!u||s[u]===void 0||p===!0||p===void 0&&s[u]!==!1)&&(s[u||l]=Ae(c))}const i=(c,l)=>a.forEach(c,(p,f)=>o(p,f,l));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(a.isString(t)&&(t=t.trim())&&!_r(t))i(hr(t),n);else if(a.isObject(t)&&a.isSafeIterable(t)){let c=Object.create(null),l,p;for(const f of t){if(!a.isArray(f))throw new TypeError("Object iterator must return a key-value pair");p=f[0],a.hasOwnProp(c,p)?(l=c[p],c[p]=a.isArray(l)?[...l,f[1]]:[l,f[1]]):c[p]=f[1]}i(c,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=ue(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Er(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ue(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ke(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=ue(i),i){const c=a.findKey(r,i);c&&(!n||ke(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||ke(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=Ae(s),delete n[o];return}const c=t?Ar(o):String(o).trim();c!==o&&delete n[o],n[c]=Ae(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}getSetCookie(){const t=this.get("set-cookie");return a.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return Sr(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[ct]=this[ct]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=ue(i);r[c]||(Pr(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}};U.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(U.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(U);const xe="[REDACTED ****]";function Tr(e){if(a.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(a.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function xr(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],s=o=>{if(o===null||typeof o!="object"||a.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof U&&(o=o.toJSON()),r.push(o);let i;if(a.isArray(o))i=[],o.forEach((c,l)=>{const p=s(c);a.isUndefined(p)||(i[l]=p)});else{if(!a.isPlainObject(o)&&Tr(o))return r.pop(),o;i=Object.create(null);for(const[c,l]of Object.entries(o)){const p=n.has(c.toLowerCase())?xe:s(l);a.isUndefined(p)||(i[c]=p)}}return r.pop(),i};return s(e)}function lt(e){try{return String(e)}catch{return""}}function Cr(e){return e.errors.map(n=>{try{return n&&n.message?lt(n.message):lt(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let h=class qt extends Error{static from(t,n,r,s,o,i){let c=t.message;!c&&a.isArray(t.errors)&&t.errors.length&&(c=Cr(t));const l=new qt(c,n||t.code,r,s,o);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),i&&Object.assign(l,i),l}constructor(t,n,r,s,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&a.hasOwnProp(t,"redact")?t.redact:void 0,r=a.isArray(n)&&n.length>0?xr(t,n):a.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};h.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";h.ERR_BAD_OPTION="ERR_BAD_OPTION";h.ECONNABORTED="ECONNABORTED";h.ETIMEDOUT="ETIMEDOUT";h.ECONNREFUSED="ECONNREFUSED";h.ERR_NETWORK="ERR_NETWORK";h.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";h.ERR_DEPRECATED="ERR_DEPRECATED";h.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";h.ERR_BAD_REQUEST="ERR_BAD_REQUEST";h.ERR_CANCELED="ERR_CANCELED";h.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";h.ERR_INVALID_URL="ERR_INVALID_URL";h.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Nr=null,Ht=100;function Ve(e){return a.isPlainObject(e)||a.isArray(e)}function Mt(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function qe(e,t,n){return e?e.concat(t).map(function(s,o){return s=Mt(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Dr(e){return a.isArray(e)&&!e.some(Ve)}const Lr=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function De(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(m,w)=>{const b=a.getSafeProp(n,m);return a.isUndefined(b)?w:b},s=r("metaTokens",!0),o=r("visitor")||O,i=r("dots",!1),c=r("indexes",!1),l=r("Blob")||typeof Blob<"u"&&Blob,p=r("maxDepth",Ht),f=l&&a.isSpecCompliantForm(t),u=[];if(!a.isFunction(o))throw new TypeError("visitor must be a function");function y(m){if(m===null)return"";if(a.isDate(m))return m.toISOString();if(a.isBoolean(m))return m.toString();if(!f&&a.isBlob(m))throw new h("Blob is not supported. Use a Buffer instead.");if(a.isArrayBuffer(m)||a.isTypedArray(m)){if(f&&typeof l=="function")return new l([m]);throw new h("Blob is not supported. Use a Buffer instead.",h.ERR_NOT_SUPPORT)}return m}function E(m){if(m>p)throw new h("Object is too deeply nested ("+m+" levels). Max depth: "+p,h.ERR_FORM_DATA_DEPTH_EXCEEDED)}function R(m,w){if(p===1/0)return JSON.stringify(m);const b=[];return JSON.stringify(m,function(N,_){if(!a.isObject(_))return _;for(;b.length&&b[b.length-1]!==this;)b.pop();return b.push(_),E(w+b.length-1),_})}function O(m,w,b){let T=m;if(a.isReactNative(t)&&a.isReactNativeBlob(m))return t.append(qe(b,w,i),y(m)),!1;if(m&&!b&&typeof m=="object"){if(a.endsWith(w,"{}"))w=s?w:w.slice(0,-2),m=R(m,1);else if(a.isArray(m)&&Dr(m)||(a.isFileList(m)||a.endsWith(w,"[]"))&&(T=a.toArray(m)))return w=Mt(w),T.forEach(function(_,k){!(a.isUndefined(_)||_===null)&&t.append(c===!0?qe([w],k,i):c===null?w:w+"[]",y(_))}),!1}return Ve(m)?!0:(t.append(qe(b,w,i),y(m)),!1)}const P=Object.assign(Lr,{defaultVisitor:O,convertValue:y,isVisitable:Ve});function d(m,w,b=0){if(!a.isUndefined(m)){if(E(b),u.indexOf(m)!==-1)throw new Error("Circular reference detected in "+w.join("."));u.push(m),a.forEach(m,function(N,_){(!(a.isUndefined(N)||N===null)&&o.call(t,N,a.isString(_)?_.trim():_,w,P))===!0&&d(N,w?w.concat(_):[_],b+1)}),u.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return d(e),t}function ut(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Xe(e,t){this._pairs=[],e&&De(e,this,t)}const vt=Xe.prototype;vt.append=function(t,n){this._pairs.push([t,n])};vt.toString=function(t){const n=t?r=>t.call(this,r,ut):ut;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Ur(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function $t(e,t,n){if(!t)return e;e=e||"";const r=a.isFunction(n)?{serialize:n}:n,s=a.getSafeProp(r,"encode")||Ur,o=a.getSafeProp(r,"serialize");let i;if(o?i=o(t,r):i=a.isURLSearchParams(t)?t.toString():new Xe(t,r).toString(s),i){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}const fe=Symbol("internals");function zt(e){return e?e.length:0}function ft(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function de(e,t){const n=e.handlers,r=zt(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(o,i){n[o.index]!==o.handler&&t.handlerEntries.delete(i)}):t.handlerEntries.clear()),t.handlersLength=r}class dt{constructor(){this.handlers=[],this[fe]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,n,r){const s={fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null},o=this[fe];this.handlers==null&&(this.handlers=[]),de(this,o);const i=o.nextId++;return this.handlers.push(s),o.handlerEntries.set(i,{handler:s,index:this.handlers.length-1}),o.handlersLength=this.handlers.length,i}eject(t){const n=this[fe];de(this,n);const r=n.handlerEntries.get(t);if(r){if(n.handlerEntries.delete(t),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,n.iterationDepth||(ft(this.handlers),n.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],de(this,this[fe]))}forEach(t){const n=this[fe];de(this,n),n.iterationDepth++;try{a.forEach(this.handlers,function(s){s!==null&&t(s)})}finally{--n.iterationDepth||(de(this,n),ft(this.handlers),n.handlersLength=zt(this.handlers))}}}const Ge={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Fr=typeof URLSearchParams<"u"?URLSearchParams:Xe,Br=typeof FormData<"u"?FormData:null,jr=typeof Blob<"u"?Blob:null,Ir={isBrowser:!0,classes:{URLSearchParams:Fr,FormData:Br,Blob:jr},protocols:["http","https","file","blob","url","data"]},Qe=typeof window<"u"&&typeof document<"u",We=typeof navigator=="object"&&navigator||void 0,kr=Qe&&(!We||["ReactNative","NativeScript","NS"].indexOf(We.product)<0),qr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hr=Qe&&window.location.href||"http://localhost",Mr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qe,hasStandardBrowserEnv:kr,hasStandardBrowserWebWorkerEnv:qr,navigator:We,origin:Hr},Symbol.toStringTag,{value:"Module"})),x={...Mr,...Ir};function vr(e,t){return De(e,new x.classes.URLSearchParams,{visitor:function(n,r,s,o){return x.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const pt=Ht;function Vt(e){if(e>pt)throw new h("FormData field is too deeply nested ("+e+" levels). Max depth: "+pt,h.ERR_FORM_DATA_DEPTH_EXCEEDED)}function $r(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)Vt(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function zr(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r=n.length;return i=!i&&a.isArray(s)?s.length:i,l?(a.hasOwnProp(s,i)?s[i]=a.isArray(s[i])?s[i].concat(r):[s[i],r]:s[i]=r,!c):((!a.hasOwnProp(s,i)||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=zr(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t($r(r),s,n,0)}),n}return null}const Jt=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),re=(e,t)=>e!=null&&a.hasOwnProp(e,t)?e[t]:void 0;function Vr(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const be={transitional:Ge,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(Wt(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){const l=re(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return vr(t,l).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const p=re(this,"env"),f=p&&p.FormData;return De(c?{"files[]":t}:t,f&&new f,l)}}return o||s?(n.setContentType("application/json",!1),Vr(t)):t}],transformResponse:[function(t){const n=re(this,"transitional")||be.transitional,r=n&&n.forcedJSONParsing,s=re(this,"responseType"),o=s==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!s||o)){const c=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,re(this,"parseReviver"))}catch(l){if(c)throw l.name==="SyntaxError"?h.from(l,h.ERR_BAD_RESPONSE,this,null,re(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:x.classes.FormData,Blob:x.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(Jt,e=>{be.headers[e]={}});function He(e,t){const n=this||be,r=t||n,s=U.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Kt(e){return!!(e&&e.__CANCEL__)}let ge=class extends h{constructor(t,n,r){super(t??"canceled",h.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Xt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new h("Request failed with status code "+n.status,n.status>=400&&n.status<500?h.ERR_BAD_REQUEST:h.ERR_BAD_RESPONSE,n.config,n.request,n))}const Wr=/[\t\n\r]/g;function Gt(e){if(typeof e!="string")return e;let t=0;for(;t{n=u,s=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const u=Date.now(),y=u-n;y>=r?i(f,u):(s=f,o||(o=setTimeout(()=>{o=null,i(s)},r-y)))},()=>s&&i(s),(...f)=>i(f)]}const Ce=(e,t,n=3)=>{let r=0;const s=Jr(50,250);return Kr(o=>{if(!o||!a.isNumber(o.loaded))return;const i=o.loaded,c=o.lengthComputable?o.total:void 0,l=Math.max(0,c!=null?Math.min(i,c):i),p=Math.max(0,l-r),f=s(p);r=Math.max(r,l);const u={loaded:l,total:c,progress:c?l/c:void 0,bytes:p,rate:f||void 0,estimated:f&&c?(c-l)/f:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(u)},n)},ht=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},mt=(e,t=a.asap)=>(...n)=>t(()=>e(...n)),Xr=x.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,x.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(x.origin),x.navigator&&/(msie|trident)/i.test(x.navigator.userAgent)):()=>!0,Gr=x.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),a.isString(r)&&c.push(`path=${r}`),a.isString(s)&&c.push(`domain=${s}`),o===!0&&c.push("secure"),a.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const Yr=/^https?:(?!\/\/)/i;function es(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${xe}`)}function ts(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${xe}@`),n=t.indexOf("#"),s=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${xe}`);return n===-1?s:`${s}#${es(t.slice(n+1))}`}function yt(e,t){if(typeof e=="string"){const n=Gt(e);if(Yr.test(n))throw new h(`Invalid URL ${JSON.stringify(ts(n))}: missing "//" after protocol`,h.ERR_INVALID_URL,t)}}function Qt(e,t,n,r){yt(t,r);let s=!Qr(t);return e&&(s||n===!1)?(yt(e,r),Zr(e,t)):t}const bt=e=>e instanceof U?{...e}:e,ns=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function te(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,u,y,E){return a.isPlainObject(f)&&a.isPlainObject(u)?a.merge.call({caseless:E},f,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(f,u,y,E){if(a.isUndefined(u)){if(!a.isUndefined(f))return r(void 0,f,y,E)}else return r(f,u,y,E)}function o(f,u){if(!a.isUndefined(u))return r(void 0,u)}function i(f,u){if(a.isUndefined(u)){if(!a.isUndefined(f))return r(void 0,f)}else return r(void 0,u)}function c(f){const u=a.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!a.isUndefined(u))if(a.isPlainObject(u)){if(a.hasOwnProp(u,f))return u[f]}else return;const y=a.hasOwnProp(e,"transitional")?e.transitional:void 0;if(a.isPlainObject(y)&&a.hasOwnProp(y,f))return y[f]}function l(f,u,y){if(a.hasOwnProp(t,y))return r(f,u);if(a.hasOwnProp(e,y))return r(void 0,f)}const p={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutErrorMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:l,headers:(f,u,y)=>s(bt(f),bt(u),y,!0)};return a.forEach(ns({...e,...t}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const y=a.hasOwnProp(p,u)?p[u]:s,E=a.hasOwnProp(e,u)?e[u]:void 0,R=a.hasOwnProp(t,u)?t[u]:void 0,O=y(E,R,u);a.isUndefined(O)&&y!==l||(n[u]=O)}),a.hasOwnProp(t,"validateStatus")&&a.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(a.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const rs=["content-type","content-length"];function ss(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{rs.includes(r.toLowerCase())&&e.set(r,s)})}const os=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Zt(e){const t=te({},e),n=y=>a.hasOwnProp(t,y)?t[y]:void 0,r=n("data");let s=n("withXSRFToken");const o=n("xsrfHeaderName"),i=n("xsrfCookieName");let c=n("headers");const l=n("auth"),p=n("baseURL"),f=n("allowAbsoluteUrls"),u=n("url");if(t.headers=c=U.from(c),t.url=$t(Qt(p,u,f,t),n("params"),n("paramsSerializer")),l){const y=a.getSafeProp(l,"username")||"",E=a.getSafeProp(l,"password")||"";try{c.set("Authorization","Basic "+btoa(y+":"+(E?os(E):"")))}catch(R){throw h.from(R,h.ERR_BAD_OPTION_VALUE,e)}}if(a.isFormData(r)){const y=a.getSafeProp(r,"getHeaders");x.hasStandardBrowserEnv||x.hasStandardBrowserWebWorkerEnv||a.isReactNative(r)?c.setContentType(void 0):a.isFunction(y)&&ss(c,y.call(r),n("formDataHeaderPolicy"))}if(x.hasStandardBrowserEnv&&(a.isFunction(s)&&(s=s(t)),s===!0||s==null&&Xr(t.url))){const E=o&&i&&Gr.read(i);E&&c.set(o,E)}return t}const is=typeof XMLHttpRequest<"u",as=is&&function(e){return new Promise(function(n,r){const s=Zt(e);let o=s.data;const i=U.from(s.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:p}=s,f,u,y,E,R,O;function P(){E&&E(),R&&R(),s.cancelToken&&s.cancelToken.unsubscribe(f),s.signal&&s.signal.removeEventListener("abort",f)}let d=new XMLHttpRequest;d.open(s.method.toUpperCase(),s.url,!0),d.timeout=s.timeout;function m(b){if(!d)return;if(d.status===0&&(Me(Gt(s.url))||Me(x.origin))!=="file"&&!(d.responseURL&&d.responseURL.startsWith("file:"))){r(new h("Request aborted",h.ECONNABORTED,e,d)),P(),d=null;return}try{b?O&&O(b):R&&R()}catch(k){setTimeout(()=>{throw k})}if(!d)return;const T=U.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),_={data:!c||c==="text"||c==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:T,config:e,request:d};Xt(function(K){n(K),P()},function(K){r(K),P()},_),d=null}"onloadend"in d?d.onloadend=m:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.startsWith("file:"))||setTimeout(m)},d.onabort=function(){d&&(r(new h("Request aborted",h.ECONNABORTED,e,d)),P(),d=null)},d.onerror=function(T){const N=T&&T.message?T.message:"Network Error",_=new h(N,h.ERR_NETWORK,e,d);_.event=T||null,r(_),P(),d=null},d.ontimeout=function(){let T=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const N=s.transitional||Ge;s.timeoutErrorMessage&&(T=s.timeoutErrorMessage),r(new h(T,N.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,e,d)),P(),d=null},o===void 0&&i.setContentType(null),"setRequestHeader"in d&&a.forEach(kt(i),function(T,N){d.setRequestHeader(N,T)}),a.isUndefined(s.withCredentials)||(d.withCredentials=!!s.withCredentials),c&&c!=="json"&&(d.responseType=s.responseType),p&&([y,R,O]=Ce(p,!0),d.addEventListener("progress",y)),l&&d.upload&&([u,E]=Ce(l),d.upload.addEventListener("progress",u),d.upload.addEventListener("loadend",E)),(s.cancelToken||s.signal)&&(f=b=>{d&&(r(!b||b.type?new ge(null,e,d):b),d.abort(),P(),d=null)},s.cancelToken&&s.cancelToken.subscribe(f),s.signal&&(s.signal.aborted?f():s.signal.addEventListener("abort",f)));const w=Me(s.url);if(w&&!x.protocols.includes(w)){r(new h("Unsupported protocol "+w+":",h.ERR_BAD_REQUEST,e)),P();return}d.send(o||null)})},cs=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(l){if(!r){r=!0,i();const p=l instanceof Error?l:this.reason;n.abort(p instanceof h?p:new ge(p instanceof Error?p.message:p))}};let o=t&&setTimeout(()=>{o=null,s(new h(`timeout of ${t}ms exceeded`,h.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>{if(!r){if(l.aborted){s.call(l);return}l.addEventListener("abort",s,{once:!0})}});const{signal:c}=n;return c.unsubscribe=()=>a.asap(i),c},ls=function*(e,t){let n=e.byteLength;if(n{const s=us(e,t);let o=0,i,c=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:p,value:f}=await s.next();if(p){c(),l.close();return}let u=f.byteLength;if(n){let y=o+=u;n(y)}l.enqueue(new Uint8Array(f))}catch(p){throw c(p),p}},cancel(l){return c(l),s.return()}},{highWaterMark:2})},wt=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Yt=(e,t,n)=>t+2e<=57?e-48:(e&223)-55,ds=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,ps=e=>e===9||e===10||e===12||e===13||e===32,hs=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},ms=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},ys=e=>{const t=e.length;let n=0,r=0,s=!1;for(let o=0;o0){s=!0;continue}n++}}return s||r>2||r>0&&(n+r)%4!==0||n%4===1?ms(e):hs(n)},bs=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),s=e.slice(n+1);if(/;base64/i.test(r))return t(s);let i=0;for(let c=0,l=s.length;c=55296&&p<=56319&&c+1=56320&&f<=57343?(i+=4,c++):i+=3}else i+=3}return i};function gs(e){const t=typeof e=="string"?e.indexOf("#"):-1;return bs(t===-1?e:e.slice(0,t),ys)}const Ze="1.20.0",Rt=64*1024,ws={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Oe}=a,Es=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Ot=e=>{if(!a.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},St=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Rs=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},Os=e=>{const t=a.global!==void 0&&a.global!==null?a.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=a.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:o,Response:i}=e,c=s?Oe(s):typeof fetch=="function",l=Oe(o),p=Oe(i);if(!c)return!1;const f=c&&Oe(n),u=c&&(typeof r=="function"?(d=>m=>d.encode(m))(new r):async d=>new Uint8Array(await new o(d).arrayBuffer())),y=l&&f&&St(()=>{let d=!1;const m=new o(x.origin,{body:new n,method:"POST",get duplex(){return d=!0,"half"}}),w=m.headers.has("Content-Type");return m.body!=null&&m.body.cancel(),d&&!w}),E=p&&f&&St(()=>a.isReadableStream(new i("").body)),R={stream:E&&(d=>d.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!R[d]&&(R[d]=(m,w)=>{let b=m&&m[d];if(b)return b.call(m);throw new h(`Response type '${d}' is not supported`,h.ERR_NOT_SUPPORT,w)})});const O=async d=>{if(d==null)return 0;if(a.isBlob(d))return d.size;if(a.isSpecCompliantForm(d))return(await new o(x.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(a.isArrayBufferView(d)||a.isArrayBuffer(d))return d.byteLength;if(a.isURLSearchParams(d)&&(d=d+""),a.isString(d))return(await u(d)).byteLength},P=async(d,m)=>{const w=a.toFiniteNumber(d.getContentLength());return w??O(m)};return async d=>{let{url:m,method:w,data:b,signal:T,cancelToken:N,timeout:_,onDownloadProgress:k,onUploadProgress:K,responseType:$,headers:z,withCredentials:we="same-origin",fetchOptions:Ue,maxContentLength:q,maxBodyLength:Ee,maxRedirects:sn}=Zt(d);const ae=a.isNumber(q)&&q>-1,Fe=a.isNumber(Ee)&&Ee>-1,on=S=>a.hasOwnProp(d,S)?d[S]:void 0;let tt=s||fetch;$=$?($+"").toLowerCase():"text";let V=cs([T,N&&N.toAbortSignal()],_),C=null;const X=V&&V.unsubscribe&&(()=>{V.unsubscribe()});let ne,ce=null;const nt=()=>new h("Request body larger than maxBodyLength limit",h.ERR_BAD_REQUEST,d,C);try{let S;const B=on("auth");if(B){const g=a.getSafeProp(B,"username")||"",D=a.getSafeProp(B,"password")||"";S={username:g,password:D}}if(Rs(m)){const g=new URL(m,x.origin);if(!S&&(g.username||g.password)){const D=Ot(g.username),W=Ot(g.password);S={username:D,password:W}}(g.username||g.password)&&(g.username="",g.password="",m=g.href)}if(S&&(z.delete("authorization"),z.set("Authorization","Basic "+btoa(Es((S.username||"")+":"+(S.password||""))))),ae&&typeof m=="string"&&m.startsWith("data:")&&gs(m)>q)throw new h("maxContentLength size of "+q+" exceeded",h.ERR_BAD_RESPONSE,d,C);if(Fe&&w!=="get"&&w!=="head"){const g=await O(b);if(typeof g=="number"&&isFinite(g)&&(ne=g,g>Ee))throw nt()}const Re=Fe&&(a.isReadableStream(b)||a.isStream(b)),rt=(g,D,W)=>gt(g,Rt,G=>{if(Fe&&G>Ee)throw ce=nt();D&&D(G)},W);if(y&&w!=="get"&&w!=="head"&&(K||Re)){if(ne=ne??await P(z,b),ne!==0||Re){let g=new o(m,{method:"POST",body:b,duplex:"half"}),D;if(a.isFormData(b)&&(D=g.headers.get("content-type"))&&z.setContentType(D),g.body){const[W,G]=K&&ht(ne,Ce(mt(K)))||[];b=rt(g.body,W,G)}}}else if(Re&&!l&&f&&w!=="get"&&w!=="head")b=rt(b);else if(Re&&l&&!y&&w!=="get"&&w!=="head")throw new h("Stream request bodies are not supported by the current fetch implementation",h.ERR_NOT_SUPPORT,d,C);a.isString(we)||(we=we?"include":"omit");const an=l&&"credentials"in o.prototype;if(a.isFormData(b)){const g=z.getContentType();g&&/^multipart\/form-data/i.test(g)&&!/boundary=/i.test(g)&&z.delete("content-type")}z.set("User-Agent","axios/"+Ze,!1);const I=Ue==null?Ue:Object.assign(Object.create(null),Ue);I&&(delete I.body,delete I.headers,delete I.method,delete I.signal,delete I.duplex,delete I.credentials);const H=Object.assign(Object.create(null),I,{signal:V,method:w.toUpperCase(),headers:kt(z.normalize()),body:b,duplex:"half",credentials:an?we:void 0});l&&(a.forEach(ws,(g,D)=>{H[D]===void 0&&(H[D]=g)}),H.signal===void 0&&(H.signal=null),H.body===void 0&&(H.body=null)),sn===0&&(H.redirect="manual",I&&(I.redirect="manual")),C=l&&new o(m,H);let M=await(l?tt(C,I):tt(m,H));const st=U.from(M.headers);if(ae){const g=a.toFiniteNumber(st.getContentLength());if(g!=null&&g>q)throw new h("maxContentLength size of "+q+" exceeded",h.ERR_BAD_RESPONSE,d,C)}const Be=E&&($==="stream"||$==="response");if(E&&M.body&&(k||ae||Be&&X)){const g={};["status","statusText","headers"].forEach(le=>{g[le]=M[le]});const D=a.toFiniteNumber(st.getContentLength()),[W,G]=k&&ht(D,Ce(mt(k),!0))||[];let ot=0;const cn=le=>{if(ae&&(ot=le,ot>q))throw new h("maxContentLength size of "+q+" exceeded",h.ERR_BAD_RESPONSE,d,C);W&&W(le)};M=new i(gt(M.body,Rt,cn,()=>{G&&G(),X&&X()}),g)}$=$||"text";let v=await R[a.findKey(R,$)||"text"](M,d);if(ae&&!E&&!Be){let g;if(v!=null&&(typeof v.byteLength=="number"?g=v.byteLength:typeof v.size=="number"?g=v.size:typeof v=="string"&&(g=typeof r=="function"?new r().encode(v).byteLength:v.length)),typeof g=="number"&&g>q)throw new h("maxContentLength size of "+q+" exceeded",h.ERR_BAD_RESPONSE,d,C)}return!Be&&X&&X(),await new Promise((g,D)=>{Xt(g,D,{data:v,headers:U.from(M.headers),status:M.status,statusText:M.statusText,config:d,request:C})})}catch(S){if(X&&X(),V&&V.aborted&&V.reason instanceof h){const B=V.reason;throw B.config=d,C&&(B.request=C),S!==B&&Object.defineProperty(B,"cause",{__proto__:null,value:S,writable:!0,enumerable:!1,configurable:!0}),B}if(ce)throw C&&!ce.request&&(ce.request=C),ce;if(S instanceof h)throw C&&!S.request&&(S.request=C),S;if(S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)){const B=new h("Network Error",h.ERR_NETWORK,d,C,S&&S.response);throw Object.defineProperty(B,"cause",{__proto__:null,value:S.cause||S,writable:!0,enumerable:!1,configurable:!0}),B}throw h.from(S,S&&S.code,d,C,S&&S.response)}}},Ss=new Map,en=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,c=i,l,p,f=Ss;for(;c--;)l=o[c],p=f.get(l),p===void 0&&f.set(l,p=c?new Map:Os(t)),f=p;return p};en();const Ye={http:Nr,xhr:as,fetch:{get:en}};a.forEach(Ye,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const _t=e=>`- ${e}`,_s=e=>a.isFunction(e)||e===null||e===!1;function As(e,t){e=a.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i`adapter ${l} `+(p===!1?"is not supported by the environment":"is not available in the build"));let c=n?i.length>1?`since : +`+i.map(_t).join(` +`):" "+_t(i[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+c,h.ERR_NOT_SUPPORT)}return s}const tn={getAdapter:As,adapters:Ye};function ve(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ge(null,e)}function $e(e){const t=a.toSafeFlatObject(e);return ve(t),t.headers=U.from(a.getSafeProp(t,"headers")),t.data=He.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),tn.getAdapter(t.adapter||be.adapter,t)(t).then(function(s){ve(t),t.response=s;try{s.data=He.call(t,t.transformResponse,s)}finally{delete t.response}return s.headers=U.from(s.headers),s},function(s){if(!Kt(s)&&(ve(t),s&&s.response)){t.response=s.response;try{s.response.data=He.call(t,t.transformResponse,s.response)}finally{delete t.response}s.response.headers=U.from(s.response.headers)}return Promise.reject(s)})}const Le={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Le[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const At={};Le.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Ze+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new h(s(i," has been removed"+(n?" in "+n:"")),h.ERR_DEPRECATED);return n&&!At[i]&&(At[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};Le.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Ps(e,t,n){if(typeof e!="object"||e===null)throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(i){const c=e[o],l=c===void 0||i(c,o,e);if(l!==!0)throw new h("option "+o+" must be "+l,h.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new h("Unknown option "+o,h.ERR_BAD_OPTION)}}const Pe={assertOptions:Ps,validators:Le},L=Pe.validators;let Z=class{constructor(t){this.defaults=t||{},this.interceptors={request:new dt,response:new dt}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error)try{let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack;let i="";if(typeof o=="string"){const c=o.indexOf(` +`);i=c===-1?"":o.slice(c+1)}if(!r.stack)r.stack=i;else if(i){const c=i.indexOf(` +`),l=c===-1?-1:i.indexOf(` +`,c+1),p=l===-1?"":i.slice(l+1);String(r.stack).endsWith(p)||(r.stack+=` +`+i)}}catch{}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=te(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Pe.assertOptions(r,{silentJSONParsing:L.transitional(L.boolean),forcedJSONParsing:L.transitional(L.boolean),clarifyTimeoutError:L.transitional(L.boolean),legacyInterceptorReqResOrdering:L.transitional(L.boolean),advertiseZstdAcceptEncoding:L.transitional(L.boolean),validateStatusUndefinedResolves:L.transitional(L.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:Pe.assertOptions(s,{encode:L.function,serialize:L.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Pe.assertOptions(n,{baseUrl:L.spelling("baseURL"),withXsrfToken:L.spelling("withXSRFToken")},!0),n.method=(a.getSafeProp(n,"method")||a.getSafeProp(this.defaults,"method")||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(Jt.concat("common"),R=>{delete o[R]}),n.headers=U.concat(i,o);const c=[];let l=!0;this.interceptors.request.forEach(function(O){if(typeof O.runWhen=="function"&&O.runWhen(n)===!1)return;l=l&&O.synchronous;const P=n.transitional||Ge;P&&P.legacyInterceptorReqResOrdering?c.unshift(O.fulfilled,O.rejected):c.push(O.fulfilled,O.rejected)});const p=[];this.interceptors.response.forEach(function(O){p.push(O.fulfilled,O.rejected)});let f,u=0,y;if(!l){const R=[$e.bind(this),void 0];for(R.unshift(...c),R.push(...p),y=R.length,f=Promise.resolve(n);u$e.call(this,E)))}catch(d){f=Promise.reject(d)}break}}if(!f)try{f=$e.call(this,E)}catch(R){f=Promise.reject(R)}for(u=0,y=p.length;u{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new ge(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new nn(function(s){t=s}),cancel:t}}};function xs(e){return function(n){return e.apply(null,n)}}function Cs(e){return a.isObject(e)&&e.isAxiosError===!0}const Te={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Te).forEach(([e,t])=>{Te[t]===void 0&&(Te[t]=e)});function rn(e){const t=new Z(e),n=Tt(Z.prototype.request,t);return a.extend(n,Z.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return rn(te(e,s))},n}const A=rn(be);A.Axios=Z;A.CanceledError=ge;A.CancelToken=Ts;A.isCancel=Kt;A.VERSION=Ze;A.toFormData=De;A.AxiosError=h;A.Cancel=A.CanceledError;A.all=function(t){return Promise.all(t)};A.spread=xs;A.isAxiosError=Cs;A.mergeConfig=te;A.AxiosHeaders=U;A.formToJSON=e=>Wt(a.isHTMLForm(e)?new FormData(e):e);A.getAdapter=tn.getAdapter;A.HttpStatusCode=Te;A.default=A;const{Axios:Ms,AxiosError:vs,CanceledError:$s,isCancel:zs,CancelToken:Vs,VERSION:Ws,all:Js,Cancel:Ks,isAxiosError:Xs,spread:Gs,toFormData:Qs,AxiosHeaders:Zs,HttpStatusCode:Ys,formToJSON:eo,getAdapter:to,mergeConfig:no,create:ro}=A,se=A.create({baseURL:"/api",headers:{"Content-Type":"application/json"}});se.interceptors.request.use(e=>{const t=localStorage.getItem("user_access_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));se.interceptors.response.use(e=>e.data&&e.data.success!==void 0&&e.data.data!==void 0?{...e,data:e.data.data,meta:e.data.meta}:e,e=>Promise.reject(e));const Ns=ln("userAuth",()=>{const e=je(localStorage.getItem("user_access_token")),t=je(localStorage.getItem("user_info")?JSON.parse(localStorage.getItem("user_info")):null),n=je({totalChances:0,usedChances:0,remainingChances:0}),r=un(()=>!!e.value);async function s(u){return(await se.post("/auth/send-otp",{mobile:u})).data}async function o(u,y,E){const O=(await se.post("/auth/verify-otp",{mobile:u,code:y})).data;return e.value=O.accessToken,t.value=O.user,localStorage.setItem("user_access_token",O.accessToken),localStorage.setItem("user_info",JSON.stringify(O.user)),E&&await c(E),O}async function i(){if(!e.value)return null;try{const u=await se.get("/me");return t.value=u.data,localStorage.setItem("user_info",JSON.stringify(u.data)),u.data}catch{return f(),null}}async function c(u){if(!(!e.value||!u))try{const y=await se.get("/me/chances",{params:{campaignId:u}});n.value=y.data}catch{}}function l(){n.value.remainingChances>0&&(n.value.remainingChances--,n.value.usedChances++)}function p(u){n.value.remainingChances=u}function f(){e.value=null,t.value=null,n.value={totalChances:0,usedChances:0,remainingChances:0},localStorage.removeItem("user_access_token"),localStorage.removeItem("user_info")}return{token:e,user:t,chances:n,isAuthenticated:r,requestOtp:s,verifyOtp:o,loadProfile:i,loadChances:c,decrementChance:l,setRemainingChances:p,logout:f}}),Ds=fn({__name:"App",setup(e){const t=Ns();return dn(async()=>{t.isAuthenticated&&await t.loadProfile()}),(n,r)=>{const s=hn("router-view");return mn(),pn(s)}}}),Ls="modulepreload",Us=function(e){return"/"+e},Pt={},Se=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),c=i?.nonce||i?.getAttribute("nonce");s=Promise.allSettled(n.map(l=>{if(l=Us(l),l in Pt)return;Pt[l]=!0;const p=l.endsWith(".css"),f=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${f}`))return;const u=document.createElement("link");if(u.rel=p?"stylesheet":Ls,p||(u.as="script"),u.crossOrigin="",u.href=l,c&&u.setAttribute("nonce",c),document.head.appendChild(u),p)return new Promise((y,E)=>{u.addEventListener("load",y),u.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(i){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=i,window.dispatchEvent(c),!c.defaultPrevented)throw i}return s.then(i=>{for(const c of i||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})},Fs=[{path:"/my-prizes",name:"my-prizes",component:()=>Se(()=>import("./MyPrizesView-ChPvispf.js"),__vite__mapDeps([0,1,2]))},{path:"/c/:slug",redirect:e=>`/${String(e.params.slug)}`},{path:"/c",redirect:"/"},{path:"/",name:"home",component:()=>Se(()=>import("./HomeView-CBtbj22e.js"),__vite__mapDeps([3,2]))},{path:"/:slug",name:"campaign-wheel",component:()=>Se(()=>import("./CampaignWheelView-Ds-m3TZi.js"),__vite__mapDeps([4,1,2,5]))},{path:"/:pathMatch(.*)*",name:"not-found",component:()=>Se(()=>import("./NotFoundView-DTxzdZM8.js"),__vite__mapDeps([6,2]))}],Bs=yn({history:bn(),routes:Fs}),et=gn(Ds),js=wn();et.use(js);et.use(Bs);et.mount("#app");export{Se as _,se as a,Ns as u}; diff --git a/apps/client/dist/assets/index-nuCNT7vr.css b/apps/client/dist/assets/index-nuCNT7vr.css new file mode 100644 index 0000000..2afd3d1 --- /dev/null +++ b/apps/client/dist/assets/index-nuCNT7vr.css @@ -0,0 +1 @@ +@keyframes fadeIn{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.animate-fade-in{animation:fadeIn .2s cubic-bezier(.16,1,.3,1) forwards}@font-face{font-family:IRANSans;font-style:normal;font-weight:200;font-display:swap;src:url("/assets/IRANSansWeb(FaNum)_UltraLight-hW-WDKY9.woff2") format("woff2"),url("/assets/IRANSansWeb(FaNum)_UltraLight-X2tWVnbe.woff") format("woff")}@font-face{font-family:IRANSans;font-style:normal;font-weight:300;font-display:swap;src:url("/assets/IRANSansWeb(FaNum)_Light-B637MNLG.woff2") format("woff2"),url("/assets/IRANSansWeb(FaNum)_Light-Blhumvhg.woff") format("woff")}@font-face{font-family:IRANSans;font-style:normal;font-weight:400;font-display:swap;src:url("/assets/IRANSansWeb(FaNum)-BLA2CtIC.woff2") format("woff2"),url("/assets/IRANSansWeb(FaNum)-C2LCNwav.woff") format("woff")}@font-face{font-family:IRANSans;font-style:normal;font-weight:500;font-display:swap;src:url("/assets/IRANSansWeb(FaNum)_Medium-C2CKjrKB.woff2") format("woff2"),url("/assets/IRANSansWeb(FaNum)_Medium-DJxlPmBM.woff") format("woff")}@font-face{font-family:IRANSans;font-style:normal;font-weight:700;font-display:swap;src:url("/assets/IRANSansWeb(FaNum)_Bold-C8urhp07.woff2") format("woff2"),url("/assets/IRANSansWeb(FaNum)_Bold-DFiUzN7v.woff") format("woff")}@font-face{font-family:IRANSans;font-style:normal;font-weight:900;font-display:swap;src:url("/assets/IRANSansWeb(FaNum)_Black-BFAfOkt4.woff2") format("woff2"),url("/assets/IRANSansWeb(FaNum)_Black-BZZZWzNZ.woff") format("woff")}@font-face{font-family:"IRANSansWeb(FaNum)";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/IRANSansWeb(FaNum)-BLA2CtIC.woff2") format("woff2"),url("/assets/IRANSansWeb(FaNum)-C2LCNwav.woff") format("woff")}@font-face{font-family:"IRANSansWeb(FaNum)";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/IRANSansWeb(FaNum)_Bold-C8urhp07.woff2") format("woff2"),url("/assets/IRANSansWeb(FaNum)_Bold-DFiUzN7v.woff") format("woff")}*,*:before,*:after{font-family:IRANSans,"IRANSansWeb(FaNum)",Tahoma,sans-serif!important;font-variant-numeric:normal!important}svg text,.wheel-slice-text{font-family:IRANSans,"IRANSansWeb(FaNum)",Tahoma,sans-serif!important;font-variant-numeric:normal!important}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:IRANSans,Vazirmatn,Tahoma,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;padding:0;width:100%;min-height:100%;direction:rtl;font-family:IRANSans,Vazirmatn,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.-top-2\.5{top:-.625rem}.-top-24{top:-6rem}.-top-3{top:-.75rem}.-top-3\.5{top:-.875rem}.-top-4{top:-1rem}.left-1\/2{left:50%}.left-4{left:1rem}.top-0{top:0}.top-4{top:1rem}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.aspect-square{aspect-ratio:1 / 1}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-20{height:5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-\[34px\]{height:34px}.h-\[42px\]{height:42px}.h-\[44px\]{height:44px}.h-\[46px\]{height:46px}.h-\[48px\]{height:48px}.h-\[50px\]{height:50px}.h-full{height:100%}.max-h-14{max-height:3.5rem}.max-h-20{max-height:5rem}.max-h-36{max-height:9rem}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-20{width:5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[34px\]{width:34px}.w-\[42px\]{width:42px}.w-full{width:100%}.max-w-\[180px\]{max-width:180px}.max-w-\[340px\]{max-width:340px}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.origin-\[50\%_10px\]{transform-origin:50% 10px}.origin-\[50\%_12px\]{transform-origin:50% 12px}.origin-\[50\%_14px\]{transform-origin:50% 14px}.origin-\[50\%_6px\]{transform-origin:50% 6px}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes neon-pulse{0%,to{filter:drop-shadow(0 0 10px #00f0ff) drop-shadow(0 0 20px #ff007f)}50%{filter:drop-shadow(0 0 20px #00f0ff) drop-shadow(0 0 35px #ff007f)}}.animate-neon-pulse{animation:neon-pulse 1.5s ease-in-out infinite}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes pulse-glow{0%,to{filter:drop-shadow(0 0 15px rgba(245,158,11,.6))}50%{filter:drop-shadow(0 0 25px rgba(245,158,11,.9))}}.animate-pulse-glow{animation:pulse-glow 2s ease-in-out infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-hidden{overflow-x:hidden}.whitespace-pre-line{white-space:pre-line}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-\[3px\]{border-width:3px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-\[\#c9a36a\]{--tw-border-opacity: 1;border-color:rgb(201 163 106 / var(--tw-border-opacity, 1))}.border-amber-200\/60{border-color:#fde68a99}.border-amber-300{--tw-border-opacity: 1;border-color:rgb(252 211 77 / var(--tw-border-opacity, 1))}.border-amber-500\/20{border-color:#f59e0b33}.border-amber-500\/25{border-color:#f59e0b40}.border-amber-500\/30{border-color:#f59e0b4d}.border-amber-600{--tw-border-opacity: 1;border-color:rgb(217 119 6 / var(--tw-border-opacity, 1))}.border-blue-500\/20{border-color:#3b82f633}.border-cyan-400{--tw-border-opacity: 1;border-color:rgb(34 211 238 / var(--tw-border-opacity, 1))}.border-emerald-500\/20{border-color:#10b98133}.border-indigo-300\/40{border-color:#a5b4fc66}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 116 / var(--tw-border-opacity, 1))}.border-pink-300{--tw-border-opacity: 1;border-color:rgb(249 168 212 / var(--tw-border-opacity, 1))}.border-purple-500\/20{border-color:#a855f733}.border-rose-500\/20{border-color:#f43f5e33}.border-rose-700\/50{border-color:#be123c80}.border-rose-800\/50{border-color:#9f123980}.border-sky-100{--tw-border-opacity: 1;border-color:rgb(224 242 254 / var(--tw-border-opacity, 1))}.border-slate-700{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.border-slate-700\/60{border-color:#33415599}.border-slate-800{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity, 1))}.border-slate-800\/80{border-color:#1e293bcc}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.bg-\[\#050816\]{--tw-bg-opacity: 1;background-color:rgb(5 8 22 / var(--tw-bg-opacity, 1))}.bg-\[\#070913\]{--tw-bg-opacity: 1;background-color:rgb(7 9 19 / var(--tw-bg-opacity, 1))}.bg-\[\#082f49\]\/40{background-color:#082f4966}.bg-\[\#1a0505\]{--tw-bg-opacity: 1;background-color:rgb(26 5 5 / var(--tw-bg-opacity, 1))}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-black\/70{background-color:#000000b3}.bg-black\/75{background-color:#000000bf}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-emerald-500\/10{background-color:#10b9811a}.bg-purple-500\/10{background-color:#a855f71a}.bg-rose-50{--tw-bg-opacity: 1;background-color:rgb(255 241 242 / var(--tw-bg-opacity, 1))}.bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity, 1))}.bg-rose-500\/10{background-color:#f43f5e1a}.bg-rose-900\/30{background-color:#8813374d}.bg-rose-950\/60{background-color:#4c051999}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.bg-slate-800\/80{background-color:#1e293bcc}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-slate-900\/50{background-color:#0f172a80}.bg-slate-900\/60{background-color:#0f172a99}.bg-slate-900\/80{background-color:#0f172acc}.bg-slate-950{--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.bg-slate-950\/70{background-color:#020617b3}.bg-stone-900{--tw-bg-opacity: 1;background-color:rgb(28 25 23 / var(--tw-bg-opacity, 1))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-tr{background-image:linear-gradient(to top right,var(--tw-gradient-stops))}.from-amber-200{--tw-gradient-from: #fde68a var(--tw-gradient-from-position);--tw-gradient-to: rgb(253 230 138 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-amber-500{--tw-gradient-from: #f59e0b var(--tw-gradient-from-position);--tw-gradient-to: rgb(245 158 11 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-600{--tw-gradient-from: #2563eb var(--tw-gradient-from-position);--tw-gradient-to: rgb(37 99 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-emerald-600{--tw-gradient-from: #059669 var(--tw-gradient-from-position);--tw-gradient-to: rgb(5 150 105 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-stone-900{--tw-gradient-from: #1c1917 var(--tw-gradient-from-position);--tw-gradient-to: rgb(28 25 23 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-fuchsia-600{--tw-gradient-to: rgb(192 38 211 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #c026d3 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-orange-500{--tw-gradient-to: rgb(249 115 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #f97316 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-yellow-400{--tw-gradient-to: rgb(250 204 21 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #facc15 var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-amber-200{--tw-gradient-to: #fde68a var(--tw-gradient-to-position)}.to-amber-600{--tw-gradient-to: #d97706 var(--tw-gradient-to-position)}.to-black{--tw-gradient-to: #000 var(--tw-gradient-to-position)}.to-blue-600{--tw-gradient-to: #2563eb var(--tw-gradient-to-position)}.to-indigo-600{--tw-gradient-to: #4f46e5 var(--tw-gradient-to-position)}.to-orange-600{--tw-gradient-to: #ea580c var(--tw-gradient-to-position)}.to-teal-600{--tw-gradient-to: #0d9488 var(--tw-gradient-to-position)}.to-yellow-300{--tw-gradient-to: #fde047 var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:IRANSans,Vazirmatn,Tahoma,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-6xl{font-size:3.75rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-7{line-height:1.75rem}.leading-relaxed{line-height:1.625}.tracking-\[0\.5em\]{letter-spacing:.5em}.tracking-normal{letter-spacing:0em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-400\/80{color:#fbbf24cc}.text-amber-400\/90{color:#fbbf24e6}.text-blue-300{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-rose-300{--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity, 1))}.text-rose-400{--tw-text-opacity: 1;color:rgb(251 113 133 / var(--tw-text-opacity, 1))}.text-rose-400\/80{color:#fb7185cc}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-950{--tw-text-opacity: 1;color:rgb(2 6 23 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-200{--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-40{opacity:.4}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_30px_rgba\(0\,240\,255\,0\.4\)\]{--tw-shadow: 0 0 30px rgba(0,240,255,.4);--tw-shadow-colored: 0 0 30px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_30px_rgba\(56\,189\,248\,0\.45\)\]{--tw-shadow: 0 0 30px rgba(56,189,248,.45);--tw-shadow-colored: 0 0 30px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_35px_rgba\(249\,115\,22\,0\.55\)\]{--tw-shadow: 0 0 35px rgba(249,115,22,.55);--tw-shadow-colored: 0 0 35px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_40px_rgba\(99\,102\,241\,0\.45\)\]{--tw-shadow: 0 0 40px rgba(99,102,241,.45);--tw-shadow-colored: 0 0 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_10px_0_\#f9a8d4\,0_16px_28px_rgba\(244\,114\,182\,0\.35\)\]{--tw-shadow: 0 10px 0 #f9a8d4,0 16px 28px rgba(244,114,182,.35);--tw-shadow-colored: 0 10px 0 var(--tw-shadow-color), 0 16px 28px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_10px_35px_rgba\(0\,0\,0\,0\.6\)\]{--tw-shadow: 0 10px 35px rgba(0,0,0,.6);--tw-shadow-colored: 0 10px 35px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_12px_0_\#b45309\,0_20px_25px_rgba\(0\,0\,0\,0\.5\)\]{--tw-shadow: 0 12px 0 #b45309,0 20px 25px rgba(0,0,0,.5);--tw-shadow-colored: 0 12px 0 var(--tw-shadow-color), 0 20px 25px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_12px_30px_rgba\(60\,30\,10\,0\.55\)\]{--tw-shadow: 0 12px 30px rgba(60,30,10,.55);--tw-shadow-colored: 0 12px 30px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_15px_40px_rgba\(0\,0\,0\,0\.8\)\]{--tw-shadow: 0 15px 40px rgba(0,0,0,.8);--tw-shadow-colored: 0 15px 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-amber-500\/20{--tw-shadow-color: rgb(245 158 11 / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-amber-500\/25{--tw-shadow-color: rgb(245 158 11 / .25);--tw-shadow: var(--tw-shadow-colored)}.shadow-amber-500\/30{--tw-shadow-color: rgb(245 158 11 / .3);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-500\/20{--tw-shadow-color: rgb(59 130 246 / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-500\/25{--tw-shadow-color: rgb(59 130 246 / .25);--tw-shadow: var(--tw-shadow-colored)}.shadow-emerald-500\/25{--tw-shadow-color: rgb(16 185 129 / .25);--tw-shadow: var(--tw-shadow-colored)}.shadow-rose-950\/40{--tw-shadow-color: rgb(76 5 25 / .4);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.blur-3xl{--tw-blur: blur(64px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-\[0_0_10px_\#7dd3fc\]{--tw-drop-shadow: drop-shadow(0 0 10px #7dd3fc);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-\[0_0_10px_\#a78bfa\]{--tw-drop-shadow: drop-shadow(0 0 10px #a78bfa);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-\[0_0_12px_\#00f0ff\]{--tw-drop-shadow: drop-shadow(0 0 12px #00f0ff);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-\[0_0_12px_\#f97316\]{--tw-drop-shadow: drop-shadow(0 0 12px #f97316);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-\[0_4px_10px_rgba\(212\,175\,55\,0\.6\)\]{--tw-drop-shadow: drop-shadow(0 4px 10px rgba(212,175,55,.6));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-\[0_4px_8px_rgba\(0\,0\,0\,0\.7\)\]{--tw-drop-shadow: drop-shadow(0 4px 8px rgba(0,0,0,.7));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-\[0_5px_0_\#db2777\]{--tw-drop-shadow: drop-shadow(0 5px 0 #db2777);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-\[0_6px_0_\#991b1b\]{--tw-drop-shadow: drop-shadow(0 6px 0 #991b1b);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-md{--tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / .07)) drop-shadow(0 2px 2px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.will-change-transform{will-change:transform}.wheel-slice-text{text-shadow:0 1px 2px rgba(0,0,0,.6);-webkit-user-select:none;-moz-user-select:none;user-select:none}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:#0f172a99}::-webkit-scrollbar-thumb{background:#94a3b866;border-radius:9999px}::-webkit-scrollbar-thumb:hover{background:#94a3b8b3}.selection\:bg-brand-500 *::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.selection\:bg-brand-500 *::selection{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.selection\:text-white *::-moz-selection{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.selection\:text-white *::selection{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.selection\:bg-brand-500::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.selection\:bg-brand-500::selection{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.selection\:text-white::-moz-selection{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.selection\:text-white::selection{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.placeholder\:text-slate-600::-moz-placeholder{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.placeholder\:text-slate-600::placeholder{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-500\/20:hover{background-color:#3b82f633}.hover\:bg-rose-900\/60:hover{background-color:#88133799}.hover\:bg-slate-700:hover{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.hover\:from-amber-400:hover{--tw-gradient-from: #fbbf24 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 191 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-blue-500:hover{--tw-gradient-from: #3b82f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-emerald-500:hover{--tw-gradient-from: #10b981 var(--tw-gradient-from-position);--tw-gradient-to: rgb(16 185 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-indigo-500:hover{--tw-gradient-to: #6366f1 var(--tw-gradient-to-position)}.hover\:to-orange-400:hover{--tw-gradient-to: #fb923c var(--tw-gradient-to-position)}.hover\:to-teal-500:hover{--tw-gradient-to: #14b8a6 var(--tw-gradient-to-position)}.hover\:text-blue-300:hover{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.hover\:text-rose-400:hover{--tw-text-opacity: 1;color:rgb(251 113 133 / var(--tw-text-opacity, 1))}.hover\:text-slate-200:hover{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\:transform-none:disabled{transform:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width: 640px){.sm\:max-w-\[420px\]{max-width:420px}} diff --git a/apps/client/dist/assets/vendor-ui-B5JVzsfH.js b/apps/client/dist/assets/vendor-ui-B5JVzsfH.js new file mode 100644 index 0000000..25740b6 --- /dev/null +++ b/apps/client/dist/assets/vendor-ui-B5JVzsfH.js @@ -0,0 +1,2 @@ +var R={};(function V(M,T,B,I){var k=!!(M.Worker&&M.Blob&&M.Promise&&M.OffscreenCanvas&&M.OffscreenCanvasRenderingContext2D&&M.HTMLCanvasElement&&M.HTMLCanvasElement.prototype.transferControlToOffscreen&&M.URL&&M.URL.createObjectURL),A=typeof Path2D=="function"&&typeof DOMMatrix=="function",Z=function(){if(!M.OffscreenCanvas)return!1;try{var e=new OffscreenCanvas(1,1),r=e.getContext("2d");r.fillRect(0,0,1,1);var a=e.transferToImageBitmap();r.createPattern(a,"no-repeat")}catch{return!1}return!0}();function L(){}function P(e){var r=T.exports.Promise,a=r!==void 0?r:M.Promise;return typeof a=="function"?new a(e):(e(L,L),null)}var x=function(e,r){return{transform:function(a){if(e)return a;if(r.has(a))return r.get(a);var t=new OffscreenCanvas(a.width,a.height),o=t.getContext("2d");return o.drawImage(a,0,0),r.set(a,t),t},clear:function(){r.clear()}}}(Z,new Map),F=function(){var e=Math.floor(16.666666666666668),r,a,t={},o=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(r=function(i){var l=Math.random();return t[l]=requestAnimationFrame(function n(s){o===s||o+e-1n in t}const te={},Dt=[],ze=()=>{},ti=()=>!1,jn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Hn=e=>e.startsWith("onUpdate:"),me=Object.assign,Ls=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Io=Object.prototype.hasOwnProperty,Q=(e,t)=>Io.call(e,t),j=Array.isArray,gt=e=>an(e)==="[object Map]",On=e=>an(e)==="[object Set]",ir=e=>an(e)==="[object Date]",B=e=>typeof e=="function",ie=e=>typeof e=="string",De=e=>typeof e=="symbol",X=e=>e!==null&&typeof e=="object",ni=e=>(X(e)||B(e))&&B(e.then)&&B(e.catch),si=Object.prototype.toString,an=e=>si.call(e),Po=e=>an(e).slice(8,-1),ri=e=>an(e)==="[object Object]",Bn=e=>ie(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,$t=Ds(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Un=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},To=/-\w/g,Ee=Un(e=>e.replace(To,t=>t.slice(1).toUpperCase())),No=/\B([A-Z])/g,At=Un(e=>e.replace(No,"-$1").toLowerCase()),Kn=Un(e=>e.charAt(0).toUpperCase()+e.slice(1)),ss=Un(e=>e?`on${Kn(e)}`:""),$e=(e,t)=>!Object.is(e,t),Rn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},ks=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let or;const Gn=()=>or||(or=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Fs(e){if(j(e)){const t={};for(let n=0;n{if(n){const s=n.split(Do);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Vs(e){let t="";if(ie(e))t=e;else if(j(e))for(let n=0;n!!(e&&e.__v_isRef===!0),Ho=e=>ie(e)?e:e==null?"":j(e)||X(e)&&(e.toString===si||!B(e.toString))?li(e)?Ho(e.value):JSON.stringify(e,ci,2):String(e),ci=(e,t)=>li(t)?ci(e,t.value):gt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[rs(s,i)+" =>"]=r,n),{})}:On(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>rs(n))}:De(t)?rs(t):X(t)&&!j(t)&&!ri(t)?String(t):t,rs=(e,t="")=>{var n;return De(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.42 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let he;class ui{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&he&&(he.active?(this.parent=he,this.index=(he.scopes||(he.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t0&&--this._on===0){if(he===this)he=this.prevScope;else{let t=he;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(Jt){let t=Jt;for(Jt=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;zt;){let t=zt;for(zt=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function gi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function mi(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Bs(s),Uo(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function vs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(yi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function yi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===sn)||(e.globalVersion=sn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!vs(e))))return;e.flags|=2;const t=e.dep,n=ne,s=Le;ne=e,Le=!0;try{gi(e);const r=e.fn(e._value);(t.version===0||$e(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{ne=n,Le=s,mi(e),e.flags&=-3}}function Bs(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Bs(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Uo(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Le=!0;const _i=[];function rt(){_i.push(Le),Le=!1}function it(){const e=_i.pop();Le=e===void 0?!0:e}function cr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ne;ne=void 0;try{t()}finally{ne=n}}}let sn=0;class Ko{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Us{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!ne||!Le||ne===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ne)n=this.activeLink=new Ko(ne,this),ne.deps?(n.prevDep=ne.depsTail,ne.depsTail.nextDep=n,ne.depsTail=n):ne.deps=ne.depsTail=n,vi(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=ne.depsTail,n.nextDep=void 0,ne.depsTail.nextDep=n,ne.depsTail=n,ne.deps===n&&(ne.deps=s)}return n}trigger(t){this.version++,sn++,this.notify(t)}notify(t){js();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Hs()}}}function vi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)vi(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const In=new WeakMap,Et=Symbol(""),bs=Symbol(""),rn=Symbol("");function ye(e,t,n){if(Le&&ne){let s=In.get(e);s||In.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Us),r.map=s,r.key=n),r.track()}}function tt(e,t,n,s,r,i){const o=In.get(e);if(!o){sn++;return}const l=c=>{c&&c.trigger()};if(js(),t==="clear")o.forEach(l);else{const c=j(e),a=c&&Bn(n);if(c&&n==="length"){const f=Number(s);o.forEach((d,g)=>{(g==="length"||g===rn||!De(g)&&g>=f)&&l(d)})}else switch((n!==void 0||o.has(void 0))&&l(o.get(n)),a&&l(o.get(rn)),t){case"add":c?a&&l(o.get("length")):(l(o.get(Et)),gt(e)&&l(o.get(bs)));break;case"delete":c||(l(o.get(Et)),gt(e)&&l(o.get(bs)));break;case"set":gt(e)&&l(o.get(Et));break}}Hs()}function Go(e,t){const n=In.get(e);return n&&n.get(t)}function It(e){const t=$(e);return t===e?t:(ye(t,"iterate",rn),Pe(e)?t:t.map(ke))}function qn(e){return ye(e=$(e),"iterate",rn),e}function We(e,t){return ot(e)?kt(st(e)?ke(t):t):ke(t)}const Wo={__proto__:null,[Symbol.iterator](){return os(this,Symbol.iterator,e=>We(this,e))},concat(...e){return It(this).concat(...e.map(t=>j(t)?It(t):t))},entries(){return os(this,"entries",e=>(e[1]=We(this,e[1]),e))},every(e,t){return Qe(this,"every",e,t,void 0,arguments)},filter(e,t){return Qe(this,"filter",e,t,n=>n.map(s=>We(this,s)),arguments)},find(e,t){return Qe(this,"find",e,t,n=>We(this,n),arguments)},findIndex(e,t){return Qe(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Qe(this,"findLast",e,t,n=>We(this,n),arguments)},findLastIndex(e,t){return Qe(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Qe(this,"forEach",e,t,void 0,arguments)},includes(...e){return ls(this,"includes",e)},indexOf(...e){return ls(this,"indexOf",e)},join(e){return It(this).join(e)},lastIndexOf(...e){return ls(this,"lastIndexOf",e)},map(e,t){return Qe(this,"map",e,t,void 0,arguments)},pop(){return Ut(this,"pop")},push(...e){return Ut(this,"push",e)},reduce(e,...t){return ur(this,"reduce",e,t)},reduceRight(e,...t){return ur(this,"reduceRight",e,t)},shift(){return Ut(this,"shift")},some(e,t){return Qe(this,"some",e,t,void 0,arguments)},splice(...e){return Ut(this,"splice",e)},toReversed(){return It(this).toReversed()},toSorted(e){return It(this).toSorted(e)},toSpliced(...e){return It(this).toSpliced(...e)},unshift(...e){return Ut(this,"unshift",e)},values(){return os(this,"values",e=>We(this,e))}};function os(e,t,n){const s=qn(e),r=s[t]();return s!==e&&!Pe(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const qo=Array.prototype;function Qe(e,t,n,s,r,i){const o=qn(e),l=o!==e&&!Pe(e),c=o[t];if(c!==qo[t]){const d=c.apply(e,i);return l?ke(d):d}let a=n;o!==e&&(l?a=function(d,g){return n.call(this,We(e,d),g,e)}:n.length>2&&(a=function(d,g){return n.call(this,d,g,e)}));const f=c.call(o,a,s);return l&&r?r(f):f}function ur(e,t,n,s){const r=qn(e),i=r!==e&&!Pe(e);let o=n,l=!1;r!==e&&(i?(l=s.length===0,o=function(a,f,d){return l&&(l=!1,a=We(e,a)),n.call(this,a,We(e,f),d,e)}):n.length>3&&(o=function(a,f,d){return n.call(this,a,f,d,e)}));const c=r[t](o,...s);return l?We(e,c):c}function ls(e,t,n){const s=$(e);ye(s,"iterate",rn);const r=s[t](...n);return(r===-1||r===!1)&&$n(n[0])?(n[0]=$(n[0]),s[t](...n)):r}function Ut(e,t,n=[]){rt(),js();const s=$(e)[t].apply(e,n);return Hs(),it(),s}const $o=Ds("__proto__,__v_isRef,__isVue"),bi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(De));function zo(e){De(e)||(e=String(e));const t=$(this);return ye(t,"has",e),t.hasOwnProperty(e)}class xi{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?rl:Si:i?Ri:wi).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=j(t);if(!r){let c;if(o&&(c=Wo[n]))return c;if(n==="hasOwnProperty")return zo}const l=Reflect.get(t,n,ce(t)?t:s);if((De(n)?bi.has(n):$o(n))||(r||ye(t,"get",n),i))return l;if(ce(l)){const c=o&&Bn(n)?l:l.value;return r&&X(c)?Es(c):c}return X(l)?r?Es(l):hn(l):l}}class Ei extends xi{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];const o=j(t)&&Bn(n);if(!this._isShallow){const a=ot(i);if(!Pe(s)&&!ot(s)&&(i=$(i),s=$(s)),!o&&ce(i)&&!ce(s))return a||(i.value=s),!0}const l=o?Number(n)e,mn=e=>Reflect.getPrototypeOf(e);function Zo(e,t,n){return function(...s){const r=this.__v_raw,i=$(r),o=gt(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,a=r[e](...s),f=n?xs:t?kt:ke;return!t&&ye(i,"iterate",c?bs:Et),me(Object.create(a),{next(){const{value:d,done:g}=a.next();return g?{value:d,done:g}:{value:l?[f(d[0]),f(d[1])]:f(d),done:g}}})}}function yn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function el(e,t){const n={get(r){const i=this.__v_raw,o=$(i),l=$(r);e||($e(r,l)&&ye(o,"get",r),ye(o,"get",l));const{has:c}=mn(o),a=t?xs:e?kt:ke;if(c.call(o,r))return a(i.get(r));if(c.call(o,l))return a(i.get(l));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&ye($(r),"iterate",Et),r.size},has(r){const i=this.__v_raw,o=$(i),l=$(r);return e||($e(r,l)&&ye(o,"has",r),ye(o,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const o=this,l=o.__v_raw,c=$(l),a=t?xs:e?kt:ke;return!e&&ye(c,"iterate",Et),l.forEach((f,d)=>r.call(i,a(f),a(d),o))}};return me(n,e?{add:yn("add"),set:yn("set"),delete:yn("delete"),clear:yn("clear")}:{add(r){const i=$(this),o=mn(i),l=$(r),c=!t&&!Pe(r)&&!ot(r)?l:r;return o.has.call(i,c)||$e(r,c)&&o.has.call(i,r)||$e(l,c)&&o.has.call(i,l)||(i.add(c),tt(i,"add",c,c)),this},set(r,i){!t&&!Pe(i)&&!ot(i)&&(i=$(i));const o=$(this),{has:l,get:c}=mn(o);let a=l.call(o,r);a||(r=$(r),a=l.call(o,r));const f=c.call(o,r);return o.set(r,i),a?$e(i,f)&&tt(o,"set",r,i):tt(o,"add",r,i),this},delete(r){const i=$(this),{has:o,get:l}=mn(i);let c=o.call(i,r);c||(r=$(r),c=o.call(i,r)),l&&l.call(i,r);const a=i.delete(r);return c&&tt(i,"delete",r,void 0),a},clear(){const r=$(this),i=r.size!==0,o=r.clear();return i&&tt(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Zo(r,e,t)}),n}function Ks(e,t){const n=el(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(Q(n,r)&&r in s?n:s,r,i)}const tl={get:Ks(!1,!1)},nl={get:Ks(!1,!0)},sl={get:Ks(!0,!1)};const wi=new WeakMap,Ri=new WeakMap,Si=new WeakMap,rl=new WeakMap;function il(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function hn(e){return ot(e)?e:Gs(e,!1,Qo,tl,wi)}function Ai(e){return Gs(e,!1,Xo,nl,Ri)}function Es(e){return Gs(e,!0,Yo,sl,Si)}function Gs(e,t,n,s,r){if(!X(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=r.get(e);if(i)return i;const o=il(Po(e));if(o===0)return e;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function st(e){return ot(e)?st(e.__v_raw):!!(e&&e.__v_isReactive)}function ot(e){return!!(e&&e.__v_isReadonly)}function Pe(e){return!!(e&&e.__v_isShallow)}function $n(e){return e?!!e.__v_raw:!1}function $(e){const t=e&&e.__v_raw;return t?$(t):e}function Ws(e){return!Q(e,"__v_skip")&&Object.isExtensible(e)&&ii(e,"__v_skip",!0),e}const ke=e=>X(e)?hn(e):e,kt=e=>X(e)?Es(e):e;function ce(e){return e?e.__v_isRef===!0:!1}function Qt(e){return Ci(e,!1)}function ol(e){return Ci(e,!0)}function Ci(e,t){return ce(e)?e:new ll(e,t)}class ll{constructor(t,n){this.dep=new Us,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:$(t),this._value=n?t:ke(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Pe(t)||ot(t);t=s?t:$(t),$e(t,n)&&(this._rawValue=t,this._value=s?t:ke(t),this.dep.trigger())}}function wt(e){return ce(e)?e.value:e}const cl={get:(e,t,n)=>t==="__v_raw"?e:wt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return ce(r)&&!ce(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Oi(e){return st(e)?e:new Proxy(e,cl)}function ul(e){const t=j(e)?new Array(e.length):{};for(const n in e)t[n]=al(e,n);return t}class fl{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=De(n)?n:String(n),this._raw=$(t);let r=!0,i=t;if(!j(t)||De(this._key)||!Bn(this._key))do r=!$n(i)||Pe(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=wt(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&ce(this._raw[this._key])){const n=this._object[this._key];if(ce(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Go(this._raw,this._key)}}function al(e,t,n){return new fl(e,t,n)}class hl{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Us(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=sn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ne!==this)return pi(this,!0),!0}get value(){const t=this.dep.track();return yi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function dl(e,t,n=!1){let s,r;return B(e)?s=e:(s=e.get,r=e.set),new hl(s,r,n)}const _n={},Pn=new WeakMap;let bt;function pl(e,t=!1,n=bt){if(n){let s=Pn.get(n);s||Pn.set(n,s=[]),s.push(e)}}function gl(e,t,n=te){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:l,call:c}=n,a=I=>r?I:Pe(I)||r===!1||r===0?nt(I,1):nt(I);let f,d,g,m,w=!1,x=!1;if(ce(e)?(d=()=>e.value,w=Pe(e)):st(e)?(d=()=>a(e),w=!0):j(e)?(x=!0,w=e.some(I=>st(I)||Pe(I)),d=()=>e.map(I=>{if(ce(I))return I.value;if(st(I))return a(I);if(B(I))return c?c(I,2):I()})):B(e)?t?d=c?()=>c(e,2):e:d=()=>{if(g){rt();try{g()}finally{it()}}const I=bt;bt=f;try{return c?c(e,3,[m]):e(m)}finally{bt=I}}:d=ze,t&&r){const I=d,L=r===!0?1/0:r;d=()=>nt(I(),L)}const D=ai(),M=()=>{f.stop(),D&&D.active&&Ls(D.effects,f)};if(i&&t){const I=t;t=(...L)=>{const oe=I(...L);return M(),oe}}let A=x?new Array(e.length).fill(_n):_n;const T=I=>{if(!(!(f.flags&1)||!f.dirty&&!I))if(t){const L=f.run();if(I||r||w||(x?L.some((oe,Y)=>$e(oe,A[Y])):$e(L,A))){g&&g();const oe=bt;bt=f;try{const Y=[L,A===_n?void 0:x&&A[0]===_n?[]:A,m];A=L,c?c(t,3,Y):t(...Y)}finally{bt=oe}}}else f.run()};return l&&l(T),f=new hi(d),f.scheduler=o?()=>o(T,!1):T,m=I=>pl(I,!1,f),g=f.onStop=()=>{const I=Pn.get(f);if(I){if(c)c(I,4);else for(const L of I)L();Pn.delete(f)}},t?s?T(!0):A=f.run():o?o(T.bind(null,!0),!0):f.run(),M.pause=f.pause.bind(f),M.resume=f.resume.bind(f),M.stop=M,M}function nt(e,t=1/0,n){if(t<=0||!X(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ce(e))nt(e.value,t,n);else if(j(e))for(let s=0;s{nt(s,t,n)});else if(ri(e)){for(const s in e)nt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&nt(e[s],t,n)}return e}/** +* @vue/runtime-core v3.5.42 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function dn(e,t,n,s){try{return s?e(...s):e()}catch(r){pn(r,t,n)}}function Fe(e,t,n,s){if(B(e)){const r=dn(e,t,n,s);return r&&ni(r)&&r.catch(i=>{pn(i,t,n)}),r}if(j(e)){const r=[];for(let i=0;i>>1,r=xe[s],i=on(r);i=on(n)?xe.push(e):xe.splice(yl(t),0,e),e.flags|=1,Pi()}}function Pi(){Tn||(Tn=Ii.then(Ni))}function _l(e){if(!j(e))dt&&e.id===-1?dt.splice(Tt+1,0,e):e.flags&1||(Lt.push(e),e.flags|=1);else for(let t=0;ton(n)-on(s));if(Lt.length=0,dt){for(let n=0;ne.id==null?e.flags&2?-1:1/0:e.id;function Ni(e){try{for(Ge=0;Ge{s._d&&Ln(-1);const i=Nn(t),o=St.length;let l;try{l=e(...r)}finally{for(let c=St.length;c>o;c--)ro();Nn(i),s._d&&Ln(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function pf(e,t){if(Oe===null)return e;const n=Zn(Oe),s=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&B(t)?t.call(s&&s.proxy):t}}function bl(){return!!(co()||Rt)}const xl=Symbol.for("v-scx"),El=()=>Me(xl);function Yt(e,t,n){return Di(e,t,n)}function Di(e,t,n=te){const{immediate:s,deep:r,flush:i,once:o}=n,l=me({},n),c=t&&s||!t&&i!=="post";let a;if(Vt){if(i==="sync"){const m=El();a=m.__watcherHandles||(m.__watcherHandles=[])}else if(!c){const m=()=>{};return m.stop=ze,m.resume=ze,m.pause=ze,m}}const f=pe;l.call=(m,w,x)=>Fe(m,f,w,x);let d=!1;i==="post"?l.scheduler=m=>{Se(m,f&&f.suspense)}:i!=="sync"&&(d=!0,l.scheduler=(m,w)=>{w?m():$s(m)}),l.augmentJob=m=>{t&&(m.flags|=4),d&&(m.flags|=2,f&&(m.id=f.uid,m.i=f))};const g=gl(e,t,l);return Vt&&(a?a.push(g):c&&g()),g}function wl(e,t,n){const s=this.proxy,r=ie(e)?e.includes(".")?Li(s,e):()=>s[e]:e.bind(s,s);let i;B(t)?i=t:(i=t.handler,n=t);const o=gn(this),l=Di(r,i.bind(s),n);return o(),l}function Li(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;re.__isTeleport,cs=Symbol("_leaveCb");function Sl(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==lt){t=n;break}}return t}function ki(e){if(!Jn(e))return zn(e.type)&&e.children?Sl(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&B(n.default))return n.default()}}function zs(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;zs(zn(n.type)&&ki(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Js(e,t){return B(e)?me({name:e.name},t,{setup:e}):e}function Qs(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function ar(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Mn=new WeakMap;function Xt(e,t,n,s,r=!1){if(j(e)){e.forEach((x,D)=>Xt(x,t&&(j(t)?t[D]:t),n,s,r));return}if(Zt(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Xt(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?Zn(s.component):s.el,o=r?null:i,{i:l,r:c}=e,a=t&&t.r,f=l.refs===te?l.refs={}:l.refs,d=l.setupState,g=$(d),m=d===te?ti:x=>ar(f,x)?!1:Q(g,x),w=(x,D)=>!(D&&ar(f,D));if(a!=null&&a!==c){if(hr(t),ie(a))f[a]=null,m(a)&&(d[a]=null);else if(ce(a)){const x=t;w(a,x.k)&&(a.value=null),x.k&&(f[x.k]=null)}}if(B(c))dn(c,l,12,[o,f]);else{const x=ie(c),D=ce(c);if(x||D){const M=()=>{if(e.f){const A=x?m(c)?d[c]:f[c]:w()||!e.k?c.value:f[e.k];if(r)j(A)&&Ls(A,i);else if(j(A))A.includes(i)||A.push(i);else if(x)f[c]=[i],m(c)&&(d[c]=f[c]);else{const T=[i];w(c,e.k)&&(c.value=T),e.k&&(f[e.k]=T)}}else x?(f[c]=o,m(c)&&(d[c]=o)):D&&(w(c,e.k)&&(c.value=o),e.k&&(f[e.k]=o))};if(o){const A=()=>{M(),Mn.delete(e)};A.id=-1,Mn.set(e,A),Se(A,n)}else hr(e),M()}}}function hr(e){const t=Mn.get(e);t&&(t.flags|=8,Mn.delete(e))}const dr=e=>e.nodeType===8;Gn().requestIdleCallback;Gn().cancelIdleCallback;function Al(e,t){if(dr(e)&&e.data==="["){let n=1,s=e.nextSibling;for(;s;){if(s.nodeType===1){if(t(s)===!1)break}else if(dr(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else t(e)}const Zt=e=>!!e.type.__asyncLoader;function gf(e){B(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,hydrate:i,timeout:o,suspensible:l=!0,onError:c}=e;let a=null,f,d=0;const g=()=>(d++,a=null,m()),m=()=>{let w;return a||(w=a=t().catch(x=>{if(x=x instanceof Error?x:new Error(String(x)),c)return new Promise((D,M)=>{c(x,()=>D(g()),()=>M(x),d+1)});throw x}).then(x=>w!==a&&a?a:(x&&(x.__esModule||x[Symbol.toStringTag]==="Module")&&(x=x.default),f=x,x)))};return Js({name:"AsyncComponentWrapper",__asyncLoader:m,__asyncHydrate(w,x,D){const M=w.isConnected;let A=!1;(x.bu||(x.bu=[])).push(()=>A=!0);const T=()=>{A||!w.parentNode||M&&!w.isConnected||D()},I=i?()=>{const L=i(T,oe=>Al(w,oe));L&&(x.bum||(x.bum=[])).push(L)}:T;f?I():m().then(()=>!x.isUnmounted&&I())},get __asyncResolved(){return f},setup(){const w=pe;if(Qs(w),f)return()=>vn(f,w);const x=L=>{a=null,pn(L,w,13,!s)};if(l&&w.suspense||Vt)return m().then(L=>()=>vn(L,w)).catch(L=>(x(L),()=>s?ge(s,{error:L}):null));const D=Qt(!1),M=Qt(),A=Qt(!!r);let T,I;return Ys(()=>{T!=null&&clearTimeout(T),I!=null&&clearTimeout(I)}),r&&(I=setTimeout(()=>{w.isUnmounted||(A.value=!1)},r)),o!=null&&(T=setTimeout(()=>{if(!w.isUnmounted&&!D.value&&!M.value){const L=new Error(`Async component timed out after ${o}ms.`);x(L),M.value=L}},o)),m().then(()=>{w.isUnmounted||(D.value=!0,w.parent&&Jn(w.parent.vnode)&&w.parent.update())}).catch(L=>{if(w.isUnmounted){a=null;return}x(L),M.value=L}),()=>{if(D.value&&f)return vn(f,w);if(M.value&&s)return ge(s,{error:M.value});if(n&&!A.value)return vn(n,w)}}})}function vn(e,t){const{ref:n,props:s,children:r,ce:i}=t.vnode,o=ge(e,s,r);return o.ref=n,o.ce=i,delete t.vnode.ce,o}const Jn=e=>e.type.__isKeepAlive;function Cl(e,t){Fi(e,"a",t)}function Ol(e,t){Fi(e,"da",t)}function Fi(e,t,n=pe){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Qn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Jn(r.parent.vnode)&&Il(s,t,n,r),r=r.parent}}function Il(e,t,n,s){const r=Qn(t,e,s,!0);Ys(()=>{Ls(s[t],r)},n)}function Qn(e,t,n=pe,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{rt();const l=gn(n),c=Fe(t,n,e,o);return l(),it(),c});return s?r.unshift(i):r.push(i),i}}const ct=e=>(t,n=pe)=>{(!Vt||e==="sp")&&Qn(e,(...s)=>t(...s),n)},Pl=ct("bm"),Tl=ct("m"),Nl=ct("bu"),Ml=ct("u"),Dl=ct("bum"),Ys=ct("um"),Ll=ct("sp"),kl=ct("rtg"),Fl=ct("rtc");function Vl(e,t=pe){Qn("ec",e,t)}const Vi="components";function mf(e,t){return Hi(Vi,e,!0,t)||e}const ji=Symbol.for("v-ndc");function yf(e){return ie(e)?Hi(Vi,e,!1)||e:e||ji}function Hi(e,t,n=!0,s=!1){const r=Oe||pe;if(r){const i=r.type;{const l=Rc(i,!1);if(l&&(l===t||l===Ee(t)||l===Kn(Ee(t))))return i}const o=pr(r[e]||i[e],t)||pr(r.appContext[e],t);return!o&&s?i:o}}function pr(e,t){return e&&(e[t]||e[Ee(t)]||e[Kn(Ee(t))])}function _f(e,t,n,s){let r;const i=n,o=j(e);if(o||ie(e)){const l=o&&st(e);let c=!1,a=!1;l&&(c=!Pe(e),a=ot(e),e=qn(e)),r=new Array(e.length);for(let f=0,d=e.length;ft(l,c,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,a=l.length;ce?uo(e)?Zn(e):ws(e.parent):null,en=me(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ws(e.parent),$root:e=>ws(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ui(e),$forceUpdate:e=>e.f||(e.f=()=>{$s(e.update)}),$nextTick:e=>e.n||(e.n=qs.bind(e.proxy)),$watch:e=>wl.bind(e)}),us=(e,t)=>e!==te&&!e.__isScriptSetup&&Q(e,t),jl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:c}=e;if(t[0]!=="$"){const g=o[t];if(g!==void 0)switch(g){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(us(s,t))return o[t]=1,s[t];if(r!==te&&Q(r,t))return o[t]=2,r[t];if(Q(i,t))return o[t]=3,i[t];if(n!==te&&Q(n,t))return o[t]=4,n[t];Rs&&(o[t]=0)}}const a=en[t];let f,d;if(a)return t==="$attrs"&&ye(e.attrs,"get",""),a(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(n!==te&&Q(n,t))return o[t]=4,n[t];if(d=c.config.globalProperties,Q(d,t))return d[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return us(r,t)?(r[t]=n,!0):s!==te&&Q(s,t)?(s[t]=n,!0):Q(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:i,type:o}},l){let c;return!!(n[l]||e!==te&&l[0]!=="$"&&Q(e,l)||us(t,l)||Q(i,l)||Q(s,l)||Q(en,l)||Q(r.config.globalProperties,l)||(c=o.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Q(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function gr(e){return j(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Rs=!0;function Hl(e){const t=Ui(e),n=e.proxy,s=e.ctx;Rs=!1,t.beforeCreate&&mr(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:c,inject:a,created:f,beforeMount:d,mounted:g,beforeUpdate:m,updated:w,activated:x,deactivated:D,beforeDestroy:M,beforeUnmount:A,destroyed:T,unmounted:I,render:L,renderTracked:oe,renderTriggered:Y,errorCaptured:K,serverPrefetch:G,expose:re,inheritAttrs:_e,components:Ae,directives:we,filters:mt}=t;if(a&&Bl(a,s,null),o)for(const U in o){const z=o[U];B(z)&&(s[U]=z.bind(n))}if(r){const U=r.call(n,n);X(U)&&(e.data=hn(U))}if(Rs=!0,i)for(const U in i){const z=i[U],Je=B(z)?z.bind(n,n):B(z.get)?z.get.bind(n,n):ze,ft=!B(z)&&B(z.set)?z.set.bind(n):ze,je=Ne({get:Je,set:ft});Object.defineProperty(s,U,{enumerable:!0,configurable:!0,get:()=>je.value,set:Re=>je.value=Re})}if(l)for(const U in l)Bi(l[U],s,n,U);if(c){const U=B(c)?c.call(n):c;Reflect.ownKeys(U).forEach(z=>{Sn(z,U[z])})}f&&mr(f,e,"c");function se(U,z){j(z)?z.forEach(Je=>U(Je.bind(n))):z&&U(z.bind(n))}if(se(Pl,d),se(Tl,g),se(Nl,m),se(Ml,w),se(Cl,x),se(Ol,D),se(Vl,K),se(Fl,oe),se(kl,Y),se(Dl,A),se(Ys,I),se(Ll,G),j(re))if(re.length){const U=e.exposed||(e.exposed={});re.forEach(z=>{Object.defineProperty(U,z,{get:()=>n[z],set:Je=>n[z]=Je,enumerable:!0})})}else e.exposed||(e.exposed={});L&&e.render===ze&&(e.render=L),_e!=null&&(e.inheritAttrs=_e),Ae&&(e.components=Ae),we&&(e.directives=we),G&&Qs(e)}function Bl(e,t,n=ze){j(e)&&(e=Ss(e));for(const s in e){const r=e[s];let i;X(r)?"default"in r?i=Me(r.from||s,r.default,!0):i=Me(r.from||s):i=Me(r),ce(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function mr(e,t,n){Fe(j(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Bi(e,t,n,s){let r=s.includes(".")?Li(n,s):()=>n[s];if(ie(e)){const i=t[e];B(i)&&Yt(r,i)}else if(B(e))Yt(r,e.bind(n));else if(X(e))if(j(e))e.forEach(i=>Bi(i,t,n,s));else{const i=B(e.handler)?e.handler.bind(n):t[e.handler];B(i)&&Yt(r,i,e)}}function Ui(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(a=>Dn(c,a,o,!0)),Dn(c,t,o)),X(t)&&i.set(t,c),c}function Dn(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&Dn(e,i,n,!0),r&&r.forEach(o=>Dn(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=Ul[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const Ul={data:yr,props:_r,emits:_r,methods:Wt,computed:Wt,beforeCreate:ve,created:ve,beforeMount:ve,mounted:ve,beforeUpdate:ve,updated:ve,beforeDestroy:ve,beforeUnmount:ve,destroyed:ve,unmounted:ve,activated:ve,deactivated:ve,errorCaptured:ve,serverPrefetch:ve,components:Wt,directives:Wt,watch:Gl,provide:yr,inject:Kl};function yr(e,t){return t?e?function(){return me(B(e)?e.call(this,this):e,B(t)?t.call(this,this):t)}:t:e}function Kl(e,t){return Wt(Ss(e),Ss(t))}function Ss(e){if(j(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ee(t)}Modifiers`]||e[`${At(t)}Modifiers`];function zl(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||te;let r=n;const i=t.startsWith("update:"),o=i&&$l(s,t.slice(7));o&&(o.trim&&(r=n.map(f=>ie(f)?f.trim():f)),o.number&&(r=r.map(ks)));let l,c=s[l=ss(t)]||s[l=ss(Ee(t))];!c&&i&&(c=s[l=ss(At(t))]),c&&Fe(c,e,6,r);const a=s[l+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Fe(a,e,6,r)}}const Jl=new WeakMap;function Gi(e,t,n=!1){const s=n?Jl:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!B(e)){const c=a=>{const f=Gi(a,t,!0);f&&(l=!0,me(o,f))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(X(e)&&s.set(e,null),null):(j(i)?i.forEach(c=>o[c]=null):me(o,i),X(e)&&s.set(e,o),o)}function Yn(e,t){return!e||!jn(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Q(e,t[0].toLowerCase()+t.slice(1))||Q(e,At(t))||Q(e,t))}function vr(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:c,render:a,renderCache:f,props:d,data:g,setupState:m,ctx:w,inheritAttrs:x}=e,D=Nn(e);let M,A;try{if(n.shapeFlag&4){const I=r||s,L=I;M=qe(a.call(L,I,f,d,m,g,w)),A=l}else{const I=t;M=qe(I.length>1?I(d,{attrs:l,slots:o,emit:c}):I(d,null)),A=t.props?l:Ql(l)}}catch(I){St.length=0,pn(I,e,1),M=ge(lt)}let T=M;if(A&&x!==!1){const I=Object.keys(A),{shapeFlag:L}=T;I.length&&L&7&&(i&&I.some(Hn)&&(A=Yl(A,i)),T=Ft(T,A,!1,!0))}if(n.dirs&&(T=Ft(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(n.dirs):n.dirs),n.transition){const I=zn(T.type)&&ki(T)||T;zs(I,n.transition)}return M=T,Nn(D),M}const Ql=e=>{let t;for(const n in e)(n==="class"||n==="style"||jn(n))&&((t||(t={}))[n]=e[n]);return t},Yl=(e,t)=>{const n={};for(const s in e)(!Hn(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Xl(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:c}=t,a=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?br(s,o,a):!!o;if(c&8){const f=t.dynamicProps;for(let d=0;dObject.create(qi),zi=e=>Object.getPrototypeOf(e)===qi;function ec(e,t,n,s=!1){const r={},i=$i();e.propsDefaults=Object.create(null),Ji(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:Ai(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function tc(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=$(r),[c]=e.propsOptions;let a=!1;if((s||o>0)&&!(o&16)){if(o&8){const f=e.vnode.dynamicProps;for(let d=0;d{c=!0;const[g,m]=Qi(d,t,!0);me(o,g),m&&l.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!i&&!c)return X(e)&&s.set(e,Dt),Dt;if(j(i))for(let f=0;fe==="_"||e==="_ctx"||e==="$stable",Zs=e=>j(e)?e.map(qe):[qe(e)],sc=(e,t,n)=>{if(t._n)return t;const s=vl((...r)=>Zs(t(...r)),n);return s._c=!1,s},Yi=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Xs(r))continue;const i=e[r];if(B(i))t[r]=sc(r,i,s);else if(i!=null){const o=Zs(i);t[r]=()=>o}}},Xi=(e,t)=>{const n=Zs(t);e.slots.default=()=>n},Zi=(e,t,n)=>{for(const s in t)(n||!Xs(s))&&(e[s]=t[s])},rc=(e,t,n)=>{const s=e.slots=$i();if(e.vnode.shapeFlag&32){const r=t._;r?(Zi(s,t,n),n&&ii(s,"_",r,!0)):Yi(t,s)}else t&&Xi(e,t)},ic=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=te;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:Zi(r,t,n):(i=!t.$stable,Yi(t,r)),o=t}else t&&(Xi(e,t),o={default:1});if(i)for(const l in r)!Xs(l)&&o[l]==null&&delete r[l]},Se=fc;function oc(e){return lc(e)}function lc(e,t){const n=Gn();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:c,setText:a,setElementText:f,parentNode:d,nextSibling:g,setScopeId:m=ze,insertStaticContent:w}=e,x=(u,h,p,_=null,b=null,y=null,C=void 0,S=null,R=!!h.dynamicChildren)=>{if(u===h)return;u&&!Kt(u,h)&&(_=v(u),Re(u,b,y,!0),u=null),h.patchFlag===-2&&(R=!1,h.dynamicChildren=null);const{type:E,ref:V,shapeFlag:P}=h;switch(E){case Xn:D(u,h,p,_);break;case lt:M(u,h,p,_);break;case An:u==null&&A(h,p,_,C);break;case Ze:Ae(u,h,p,_,b,y,C,S,R);break;default:P&1?L(u,h,p,_,b,y,C,S,R):P&6?we(u,h,p,_,b,y,C,S,R):(P&64||P&128)&&E.process(u,h,p,_,b,y,C,S,R,k)}V!=null&&b?Xt(V,u&&u.ref,y,h||u,!h):V==null&&u&&u.ref!=null&&Xt(u.ref,null,y,u,!0)},D=(u,h,p,_)=>{if(u==null)s(h.el=l(h.children),p,_);else{const b=h.el=u.el;h.children!==u.children&&a(b,h.children)}},M=(u,h,p,_)=>{u==null?s(h.el=c(h.children||""),p,_):h.el=u.el},A=(u,h,p,_)=>{[u.el,u.anchor]=w(u.children,h,p,_,u.el,u.anchor)},T=({el:u,anchor:h},p,_)=>{let b;for(;u&&u!==h;)b=g(u),s(u,p,_),u=b;s(h,p,_)},I=({el:u,anchor:h})=>{let p;for(;u&&u!==h;)p=g(u),r(u),u=p;r(h)},L=(u,h,p,_,b,y,C,S,R)=>{if(h.type==="svg"?C="svg":h.type==="math"&&(C="mathml"),u==null)oe(h,p,_,b,y,C,S,R);else{const E=u.el&&u.el._isVueCE?u.el:null;try{E&&E._beginPatch(),G(u,h,b,y,C,S,R)}finally{E&&E._endPatch()}}},oe=(u,h,p,_,b,y,C,S)=>{let R,E;const{props:V,shapeFlag:P,transition:F,dirs:H}=u;if(R=u.el=o(u.type,y,V&&V.is,V),P&8?f(R,u.children):P&16&&K(u.children,R,null,_,b,fs(u,y),C,S),H&&_t(u,null,_,"created"),Y(R,u,u.scopeId,C,_),V){for(const ee in V)ee!=="value"&&!$t(ee)&&i(R,ee,null,V[ee],y,_);"value"in V&&i(R,"value",null,V.value,y),(E=V.onVnodeBeforeMount)&&Ke(E,_,u)}H&&_t(u,null,_,"beforeMount");const q=cc(b,F);q&&F.beforeEnter(R),s(R,h,p),((E=V&&V.onVnodeMounted)||q||H)&&Se(()=>{try{E&&Ke(E,_,u),q&&F.enter(R),H&&_t(u,null,_,"mounted")}finally{}},b)},Y=(u,h,p,_,b)=>{if(p&&m(u,p),_)for(let y=0;y<_.length;y++)m(u,_[y]);if(b){let y=b.subTree;if(h===y||so(y.type)&&(y.ssContent===h||y.ssFallback===h)){const C=b.vnode;Y(u,C,C.scopeId,C.slotScopeIds,b.parent)}}},K=(u,h,p,_,b,y,C,S,R=0)=>{for(let E=R;E{const S=h.el=u.el;let{patchFlag:R,dynamicChildren:E,dirs:V}=h;R|=u.patchFlag&16;const P=u.props||te,F=h.props||te;let H;if(p&&vt(p,!1),(H=F.onVnodeBeforeUpdate)&&Ke(H,p,h,u),V&&_t(h,u,p,"beforeUpdate"),p&&vt(p,!0),E&&(!u.dynamicChildren||u.dynamicChildren.length!==E.length)&&(R=0,C=!1,E=null),(P.innerHTML&&F.innerHTML==null||P.textContent&&F.textContent==null)&&f(S,""),E?re(u.dynamicChildren,E,S,p,_,fs(h,b),y):C||z(u,h,S,null,p,_,fs(h,b),y,!1),R>0){if(R&16)_e(S,P,F,p,b);else if(R&2&&P.class!==F.class&&i(S,"class",null,F.class,b),R&4&&i(S,"style",P.style,F.style,b),R&8){const q=h.dynamicProps;for(let ee=0;ee{H&&Ke(H,p,h,u),V&&_t(h,u,p,"updated")},_)},re=(u,h,p,_,b,y,C)=>{for(let S=0;S{if(h!==p){if(h!==te)for(const y in h)!$t(y)&&!(y in p)&&i(u,y,h[y],null,b,_);for(const y in p){if($t(y))continue;const C=p[y],S=h[y];C!==S&&y!=="value"&&i(u,y,S,C,b,_)}"value"in p&&i(u,"value",h.value,p.value,b)}},Ae=(u,h,p,_,b,y,C,S,R)=>{const E=h.el=u?u.el:l(""),V=h.anchor=u?u.anchor:l("");let{patchFlag:P,dynamicChildren:F,slotScopeIds:H}=h;H&&(S=S?S.concat(H):H),u==null?(s(E,p,_),s(V,p,_),K(h.children||[],p,V,b,y,C,S,R)):P>0&&P&64&&F&&u.dynamicChildren&&u.dynamicChildren.length===F.length?(re(u.dynamicChildren,F,p,b,y,C,S),(h.key!=null||b&&h===b.subTree)&&eo(u,h,!0)):z(u,h,p,V,b,y,C,S,R)},we=(u,h,p,_,b,y,C,S,R)=>{h.slotScopeIds=S,u==null?h.shapeFlag&512?b.ctx.activate(h,p,_,C,R):mt(h,p,_,b,y,C,R):ut(u,h,R)},mt=(u,h,p,_,b,y,C)=>{const S=u.component=vc(u,_,b);if(Jn(u)&&(S.ctx.renderer=k),bc(S,!1,C),S.asyncDep){if(b&&b.registerDep(S,se,C),!u.el){const R=S.subTree=ge(lt);M(null,R,h,p),u.placeholder=R.el}}else se(S,u,h,p,b,y,C)},ut=(u,h,p)=>{const _=h.component=u.component;if(Xl(u,h,p))if(_.asyncDep&&!_.asyncResolved){U(_,h,p);return}else _.next=h,_.update();else h.el=u.el,_.vnode=h},se=(u,h,p,_,b,y,C)=>{const S=()=>{if(u.isMounted){let{next:P,bu:F,u:H,parent:q,vnode:ee}=u;{const Be=to(u);if(Be){P&&(P.el=ee.el,U(u,P,C)),Be.asyncDep.then(()=>{Se(()=>{u.isUnmounted||E()},b)});return}}let Z=P,fe;vt(u,!1),P?(P.el=ee.el,U(u,P,C)):P=ee,F&&Rn(F),(fe=P.props&&P.props.onVnodeBeforeUpdate)&&Ke(fe,q,P,ee),vt(u,!0);const de=vr(u),He=u.subTree;u.subTree=de,x(He,de,d(He.el),v(He),u,b,y),P.el=de.el,Z===null&&Zl(u,de.el),H&&Se(H,b),(fe=P.props&&P.props.onVnodeUpdated)&&Se(()=>Ke(fe,q,P,ee),b)}else{let P;const{el:F,props:H}=h,{bm:q,m:ee,parent:Z,root:fe,type:de}=u,He=Zt(h);vt(u,!1),q&&Rn(q),!He&&(P=H&&H.onVnodeBeforeMount)&&Ke(P,Z,h),vt(u,!0);{fe.ce&&fe.ce._hasShadowRoot()&&fe.ce._injectChildStyle(de,u.parent?u.parent.type:void 0);const Be=u.subTree=vr(u);x(null,Be,p,_,u,b,y),h.el=Be.el}if(ee&&Se(ee,b),!He&&(P=H&&H.onVnodeMounted)){const Be=h;Se(()=>Ke(P,Z,Be),b)}(h.shapeFlag&256||Z&&Zt(Z.vnode)&&Z.vnode.shapeFlag&256)&&u.a&&Se(u.a,b),u.isMounted=!0,h=p=_=null}};u.scope.on();const R=u.effect=new hi(S);u.scope.off();const E=u.update=R.run.bind(R),V=u.job=R.runIfDirty.bind(R);V.i=u,V.id=u.uid,R.scheduler=()=>$s(V),vt(u,!0),E()},U=(u,h,p)=>{h.component=u;const _=u.vnode.props;u.vnode=h,u.next=null,tc(u,h.props,_,p),ic(u,h.children,p),rt(),fr(u),it()},z=(u,h,p,_,b,y,C,S,R=!1)=>{const E=u&&u.children,V=u?u.shapeFlag:0,P=h.children,{patchFlag:F,shapeFlag:H}=h;if(F>0){if(F&128){ft(E,P,p,_,b,y,C,S,R);return}else if(F&256){Je(E,P,p,_,b,y,C,S,R);return}}H&8?(V&16&&Te(E,b,y),P!==E&&f(p,P)):V&16?H&16?ft(E,P,p,_,b,y,C,S,R):Te(E,b,y,!0):(V&8&&f(p,""),H&16&&K(P,p,_,b,y,C,S,R))},Je=(u,h,p,_,b,y,C,S,R)=>{u=u||Dt,h=h||Dt;const E=u.length,V=h.length,P=Math.min(E,V);let F;for(F=0;FV?Te(u,b,y,!0,!1,P):K(h,p,_,b,y,C,S,R,P)},ft=(u,h,p,_,b,y,C,S,R)=>{let E=0;const V=h.length;let P=u.length-1,F=V-1;for(;E<=P&&E<=F;){const H=u[E],q=h[E]=R?et(h[E]):qe(h[E]);if(Kt(H,q))x(H,q,p,null,b,y,C,S,R);else break;E++}for(;E<=P&&E<=F;){const H=u[P],q=h[F]=R?et(h[F]):qe(h[F]);if(Kt(H,q))x(H,q,p,null,b,y,C,S,R);else break;P--,F--}if(E>P){if(E<=F){const H=F+1,q=HF)for(;E<=P;)Re(u[E],b,y,!0),E++;else{const H=E,q=E,ee=new Map;for(E=q;E<=F;E++){const Ce=h[E]=R?et(h[E]):qe(h[E]);Ce.key!=null&&ee.set(Ce.key,E)}let Z,fe=0;const de=F-q+1;let He=!1,Be=0;const Bt=new Array(de);for(E=0;E=de){Re(Ce,b,y,!0);continue}let Ue;if(Ce.key!=null)Ue=ee.get(Ce.key);else for(Z=q;Z<=F;Z++)if(Bt[Z-q]===0&&Kt(Ce,h[Z])){Ue=Z;break}Ue===void 0?Re(Ce,b,y,!0):(Bt[Ue-q]=E+1,Ue>=Be?Be=Ue:He=!0,x(Ce,h[Ue],p,null,b,y,C,S,R),fe++)}const nr=He?uc(Bt):Dt;for(Z=nr.length-1,E=de-1;E>=0;E--){const Ce=q+E,Ue=h[Ce],sr=h[Ce+1],rr=Ce+1{const{el:y,type:C,transition:S,children:R,shapeFlag:E}=u;if(E&6){je(u.component.subTree,h,p,_);return}if(E&128){u.suspense.move(h,p,_);return}if(E&64){C.move(u,h,p,k);return}if(C===Ze){s(y,h,p);for(let P=0;PS.enter(y),b));else{const{leave:P,delayLeave:F,afterLeave:H}=S,q=()=>{u.ctx.isUnmounted?r(y):s(y,h,p)},ee=()=>{const Z=y._isLeaving||!!y[cs];y._isLeaving&&y[cs](!0),S.persisted&&!Z?q():P(y,()=>{q(),H&&H()})};F?F(y,q,ee):ee()}else s(y,h,p)},Re=(u,h,p,_=!1,b=!1)=>{const{type:y,props:C,ref:S,children:R,dynamicChildren:E,shapeFlag:V,patchFlag:P,dirs:F,cacheIndex:H,memo:q}=u;if(P===-2&&(b=!1),S!=null&&(rt(),Xt(S,null,p,u,!0),it()),H!=null&&(h.renderCache[H]=void 0),V&256){h.ctx.deactivate(u);return}const ee=V&1&&F,Z=!Zt(u);let fe;if(Z&&(fe=C&&C.onVnodeBeforeUnmount)&&Ke(fe,h,u),V&6)yt(u.component,p,_);else{if(V&128){u.suspense.unmount(p,_);return}ee&&_t(u,null,h,"beforeUnmount"),V&64?u.type.remove(u,h,p,k,_):E&&!E.hasOnce&&(y!==Ze||P>0&&P&64)?Te(E,h,p,!1,!0):(y===Ze&&P&384||!b&&V&16)&&Te(R,h,p),_&&Ct(u)}const de=q!=null&&H==null;(Z&&(fe=C&&C.onVnodeUnmounted)||ee||de)&&Se(()=>{fe&&Ke(fe,h,u),ee&&_t(u,null,h,"unmounted"),de&&(u.el=null)},p)},Ct=u=>{const{type:h,el:p,anchor:_,transition:b}=u;if(h===Ze){Ot(p,_);return}if(h===An){I(u);return}const y=()=>{r(p),b&&!b.persisted&&b.afterLeave&&b.afterLeave()};if(u.shapeFlag&1&&b&&!b.persisted){const{leave:C,delayLeave:S}=b,R=()=>C(p,y);S?S(u.el,y,R):R()}else y()},Ot=(u,h)=>{let p;for(;u!==h;)p=g(u),r(u),u=p;r(h)},yt=(u,h,p)=>{const{bum:_,scope:b,job:y,subTree:C,um:S,m:R,a:E}=u;Er(R),Er(E),_&&Rn(_),b.stop(),y&&(y.flags|=8,Re(C,u,h,p)),S&&Se(S,h),Se(()=>{u.isUnmounted=!0},h)},Te=(u,h,p,_=!1,b=!1,y=0)=>{for(let C=y;C{if(u.shapeFlag&6)return v(u.component.subTree);if(u.shapeFlag&128)return u.suspense.next();const h=g(u.anchor||u.el),p=h&&h[Rl];return p?g(p):h};let N=!1;const O=(u,h,p)=>{let _;u==null?h._vnode&&(Re(h._vnode,null,null,!0),_=h._vnode.component):x(h._vnode||null,u,h,null,null,null,p),h._vnode=u,N||(N=!0,fr(_),Ti(),N=!1)},k={p:x,um:Re,m:je,r:Ct,mt,mc:K,pc:z,pbc:re,n:v,o:e};return{render:O,hydrate:void 0,createApp:ql(O)}}function fs({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function vt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function cc(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function eo(e,t,n=!1){const s=e.children,r=t.children;if(j(s)&&j(r))for(let i=0;i>1,e[n[l]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function to(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:to(t)}function Er(e){if(e)for(let t=0;te.__isSuspense;function fc(e,t){t&&t.pendingBranch?j(e)?t.effects.push(...e):t.effects.push(e):_l(e)}const Ze=Symbol.for("v-fgt"),Xn=Symbol.for("v-txt"),lt=Symbol.for("v-cmt"),An=Symbol.for("v-stc"),St=[];let Ie=null;function ac(e=!1){St.push(Ie=e?null:[])}function ro(){St.pop(),Ie=St[St.length-1]||null}let ln=1;function Ln(e,t=!1){ln+=e,e<0&&Ie&&t&&(Ie.hasOnce=!0)}function io(e){return e.dynamicChildren=ln>0?Ie||Dt:null,ro(),ln>0&&Ie&&Ie.push(e),e}function vf(e,t,n,s,r,i){return io(lo(e,t,n,s,r,i,!0))}function hc(e,t,n,s,r){return io(ge(e,t,n,s,r,!0))}function kn(e){return e?e.__v_isVNode===!0:!1}function Kt(e,t){return e.type===t.type&&e.key===t.key}const oo=({key:e})=>e??null,Cn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ie(e)||ce(e)||B(e)?{i:Oe,r:e,k:t,f:!!n}:e:null);function lo(e,t=null,n=null,s=0,r=null,i=e===Ze?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&oo(t),ref:t&&Cn(t),scopeId:Mi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Oe};return l?(Fn(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=ie(n)?8:16),ln>0&&!o&&Ie&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Ie.push(c),c}const ge=dc;function dc(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===ji)&&(e=lt),kn(e)){const l=Ft(e,t,!0);return n&&Fn(l,n),ln>0&&!i&&Ie&&(l.shapeFlag&6?Ie[Ie.indexOf(e)]=l:Ie.push(l)),l.patchFlag=-2,l}if(Sc(e)&&(e=e.__vccOpts),t){t=pc(t);let{class:l,style:c}=t;l&&!ie(l)&&(t.class=Vs(l)),X(c)&&($n(c)&&!j(c)&&(c=me({},c)),t.style=Fs(c))}const o=ie(e)?1:so(e)?128:zn(e)?64:X(e)?4:B(e)?2:0;return lo(e,t,n,s,r,o,i,!0)}function pc(e){return e?$n(e)||zi(e)?me({},e):e:null}function Ft(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:c}=e,a=t?mc(r||{},t):r,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&oo(a),ref:t&&t.ref?n&&i?j(i)?i.concat(Cn(t)):[i,Cn(t)]:Cn(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ze?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ft(e.ssContent),ssFallback:e.ssFallback&&Ft(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&zs(f,c.clone(f)),f}function gc(e=" ",t=0){return ge(Xn,null,e,t)}function bf(e,t){const n=ge(An,null,e);return n.staticCount=t,n}function xf(e="",t=!1){return t?(ac(),hc(lt,null,e)):ge(lt,null,e)}function qe(e){return e==null||typeof e=="boolean"?ge(lt):j(e)?ge(Ze,null,e.slice()):kn(e)?et(e):ge(Xn,null,String(e))}function et(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ft(e)}function Fn(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(j(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Fn(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!zi(t)?t._ctx=Oe:r===3&&Oe&&(Oe.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(B(t)){if(s&65){Fn(e,{default:t});return}t={default:t,_ctx:Oe},n=32}else t=String(t),s&64?(n=16,t=[gc(t)]):n=8;e.children=t,e.shapeFlag|=n}function mc(...e){const t={};for(let n=0;npe||Oe;let Vn,cn;{const e=Gn(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};Vn=t("__VUE_INSTANCE_SETTERS__",n=>pe=n),cn=t("__VUE_SSR_SETTERS__",n=>Vt=n)}const gn=e=>{const t=pe;return Vn(e),e.scope.on(),()=>{e.scope.off(),Vn(t)}},wr=()=>{pe&&pe.scope.off(),Vn(null)};function uo(e){return e.vnode.shapeFlag&4}let Vt=!1;function bc(e,t=!1,n=!1){t&&cn(t);const{props:s,children:r}=e.vnode,i=uo(e);ec(e,s,i,t),rc(e,r,n||t);const o=i?xc(e,t):void 0;return t&&cn(!1),o}function xc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,jl);const{setup:s}=n;if(s){rt();const r=e.setupContext=s.length>1?wc(e):null,i=gn(e),o=dn(s,e,0,[e.props,r]),l=ni(o);if(it(),i(),(l||e.sp)&&!Zt(e)&&Qs(e),l){if(o.then(wr,wr),t)return o.then(c=>{cn(!0);try{Rr(e,c,t)}finally{cn(!1)}}).catch(c=>{pn(c,e,0)});e.asyncDep=o}else Rr(e,o)}else fo(e)}function Rr(e,t,n){B(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:X(t)&&(e.setupState=Oi(t)),fo(e)}function fo(e,t,n){const s=e.type;e.render||(e.render=s.render||ze);{const r=gn(e);rt();try{Hl(e)}finally{it(),r()}}}const Ec={get(e,t){return ye(e,"get",""),e[t]}};function wc(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Ec),slots:e.slots,emit:e.emit,expose:t}}function Zn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Oi(Ws(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in en)return en[n](e)},has(t,n){return n in t||n in en}})):e.proxy}function Rc(e,t=!0){return B(e)?e.displayName||e.name:e.name||t&&e.__name}function Sc(e){return B(e)&&"__vccOpts"in e}const Ne=(e,t)=>dl(e,t,Vt);function un(e,t,n){try{Ln(-1);const s=arguments.length;return s===2?X(t)&&!j(t)?kn(t)?ge(e,null,[t]):ge(e,t):ge(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&kn(n)&&(n=[n]),ge(e,t,n))}finally{Ln(1)}}const Ac="3.5.42";/** +* @vue/runtime-dom v3.5.42 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Cs;const Sr=typeof window<"u"&&window.trustedTypes;if(Sr)try{Cs=Sr.createPolicy("vue",{createHTML:e=>e})}catch{}const ao=Cs?e=>Cs.createHTML(e):e=>e,Cc="http://www.w3.org/2000/svg",Oc="http://www.w3.org/1998/Math/MathML",Xe=typeof document<"u"?document:null,Ar=Xe&&Xe.createElement("template"),Ic={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Xe.createElementNS(Cc,e):t==="mathml"?Xe.createElementNS(Oc,e):n?Xe.createElement(e,{is:n}):Xe.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Xe.createTextNode(e),createComment:e=>Xe.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Xe.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Ar.innerHTML=ao(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=Ar.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Pc=Symbol("_vtc");function Tc(e,t,n){const s=e[Pc];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Cr=Symbol("_vod"),Nc=Symbol("_vsh"),Mc=Symbol(""),Dc=/(?:^|;)\s*display\s*:/;function Lc(e,t,n){const s=e.style,r=ie(n);let i=!1;if(n&&!r){if(t)if(ie(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&qt(s,l,"")}else for(const o in t)n[o]==null&&qt(s,o,"");for(const o in n){o==="display"&&(i=!0);const l=n[o];l!=null?Fc(e,o,!ie(t)&&t?t[o]:void 0,l)||qt(s,o,l):qt(s,o,"")}}else if(r){if(t!==n){const o=s[Mc];o&&(n+=";"+o),s.cssText=n,i=Dc.test(n)}}else t&&e.removeAttribute("style");Cr in e&&(e[Cr]=i?s.display:"",e[Nc]&&(s.display="none"))}const bn=/\s*!important$/;function qt(e,t,n){if(j(n))n.forEach(s=>qt(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))bn.test(n)?e.setProperty(t,n.replace(bn,""),"important"):e.setProperty(t,n);else{const s=kc(e,t);bn.test(n)?e.setProperty(At(s),n.replace(bn,""),"important"):e[s]=n}}const Or=["Webkit","Moz","ms"],as={};function kc(e,t){const n=as[t];if(n)return n;let s=Ee(t);if(s!=="filter"&&s in e)return as[t]=s;s=Kn(s);for(let r=0;rhs||(Kc.then(()=>hs=0),hs=Date.now());function Wc(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(j(r)){const i=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{i.call(s),s._stopped=!0};const o=r.slice(),l=[s];for(let c=0;ce.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,qc=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?Tc(e,s,o):t==="style"?Lc(e,n,s):jn(t)?Hn(t)||jc(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):$c(e,t,s,o))?(Tr(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Pr(e,t,s,o,i,t!=="value")):e._isVueCE&&(zc(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ie(s)))?Tr(e,Ee(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Pr(e,t,s,o))};function $c(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Mr(t)&&B(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Mr(t)&&ie(n)?!1:t in e}function zc(e,t){const n=e._def.props;if(!n)return!1;const s=Ee(t);return Array.isArray(n)?n.some(r=>Ee(r)===s):Object.keys(n).some(r=>Ee(r)===s)}const Dr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return j(t)?n=>Rn(t,n):t};function Jc(e){e.target.composing=!0}function Lr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const xn=Symbol("_assign"),En=Symbol("_initialValue");function ds(e,t,n){return t&&(e=e.trim()),n&&(e=ks(e)),e}const Ef={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e.parentNode&&(e.type==="text"?e[En]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[En]=e.defaultValue.replace(/\r\n?/g,` +`))),e[xn]=Dr(r);const i=s||r.props&&r.props.type==="number";Nt(e,t?"change":"input",o=>{o.target.composing||e[xn](ds(e.value,n,i))}),(n||i)&&Nt(e,"change",()=>{e.value=ds(e.value,n,i)}),t||(Nt(e,"compositionstart",Jc),Nt(e,"compositionend",Lr),Nt(e,"change",Lr))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const r=t??"",i=e[En];delete e[En],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[xn](ds(e.value,n,s)):e.value=r},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[xn]=Dr(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?ks(e.value):e.value,c=t??"";if(l===c)return;const a=e.getRootNode();(a instanceof Document||a instanceof ShadowRoot)&&a.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c)}},Qc=["ctrl","shift","alt","meta"],Yc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Qc.some(n=>e[`${n}Key`]&&!t.includes(n))},wf=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const t=Zc().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=tu(s);if(!r)return;const i=t._component;!B(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,eu(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function eu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function tu(e){return ie(e)?document.querySelector(e):e}/*! + * pinia v2.3.1 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */let ho;const es=e=>ho=e,po=Symbol();function Os(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var tn;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(tn||(tn={}));function Sf(){const e=fi(!0),t=e.run(()=>Qt({}));let n=[],s=[];const r=Ws({install(i){es(r),r._a=i,i.provide(po,r),i.config.globalProperties.$pinia=r,s.forEach(o=>n.push(o)),s=[]},use(i){return this._a?n.push(i):s.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const go=()=>{};function Fr(e,t,n,s=go){e.push(t);const r=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),s())};return!n&&ai()&&Bo(r),r}function Pt(e,...t){e.slice().forEach(n=>{n(...t)})}const nu=e=>e(),Vr=Symbol(),ps=Symbol();function Is(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];Os(r)&&Os(s)&&e.hasOwnProperty(n)&&!ce(s)&&!st(s)?e[n]=Is(r,s):e[n]=s}return e}const su=Symbol();function ru(e){return!Os(e)||!e.hasOwnProperty(su)}const{assign:ht}=Object;function iu(e){return!!(ce(e)&&e.effect)}function ou(e,t,n,s){const{state:r,actions:i,getters:o}=t,l=n.state.value[e];let c;function a(){l||(n.state.value[e]=r?r():{});const f=ul(n.state.value[e]);return ht(f,i,Object.keys(o||{}).reduce((d,g)=>(d[g]=Ws(Ne(()=>{es(n);const m=n._s.get(e);return o[g].call(m,m)})),d),{}))}return c=mo(e,a,t,n,s,!0),c}function mo(e,t,n={},s,r,i){let o;const l=ht({actions:{}},n),c={deep:!0};let a,f,d=[],g=[],m;const w=s.state.value[e];!i&&!w&&(s.state.value[e]={});let x;function D(K){let G;a=f=!1,typeof K=="function"?(K(s.state.value[e]),G={type:tn.patchFunction,storeId:e,events:m}):(Is(s.state.value[e],K),G={type:tn.patchObject,payload:K,storeId:e,events:m});const re=x=Symbol();qs().then(()=>{x===re&&(a=!0)}),f=!0,Pt(d,G,s.state.value[e])}const M=i?function(){const{state:G}=n,re=G?G():{};this.$patch(_e=>{ht(_e,re)})}:go;function A(){o.stop(),d=[],g=[],s._s.delete(e)}const T=(K,G="")=>{if(Vr in K)return K[ps]=G,K;const re=function(){es(s);const _e=Array.from(arguments),Ae=[],we=[];function mt(U){Ae.push(U)}function ut(U){we.push(U)}Pt(g,{args:_e,name:re[ps],store:L,after:mt,onError:ut});let se;try{se=K.apply(this&&this.$id===e?this:L,_e)}catch(U){throw Pt(we,U),U}return se instanceof Promise?se.then(U=>(Pt(Ae,U),U)).catch(U=>(Pt(we,U),Promise.reject(U))):(Pt(Ae,se),se)};return re[Vr]=!0,re[ps]=G,re},I={_p:s,$id:e,$onAction:Fr.bind(null,g),$patch:D,$reset:M,$subscribe(K,G={}){const re=Fr(d,K,G.detached,()=>_e()),_e=o.run(()=>Yt(()=>s.state.value[e],Ae=>{(G.flush==="sync"?f:a)&&K({storeId:e,type:tn.direct,events:m},Ae)},ht({},c,G)));return re},$dispose:A},L=hn(I);s._s.set(e,L);const Y=(s._a&&s._a.runWithContext||nu)(()=>s._e.run(()=>(o=fi()).run(()=>t({action:T}))));for(const K in Y){const G=Y[K];if(ce(G)&&!iu(G)||st(G))i||(w&&ru(G)&&(ce(G)?G.value=w[K]:Is(G,w[K])),s.state.value[e][K]=G);else if(typeof G=="function"){const re=T(G,K);Y[K]=re,l.actions[K]=G}}return ht(L,Y),ht($(L),Y),Object.defineProperty(L,"$state",{get:()=>s.state.value[e],set:K=>{D(G=>{ht(G,K)})}}),s._p.forEach(K=>{ht(L,o.run(()=>K({store:L,app:s._a,pinia:s,options:l})))}),w&&i&&n.hydrate&&n.hydrate(L.$state,w),a=!0,f=!0,L}/*! #__NO_SIDE_EFFECTS__ */function Af(e,t,n){let s,r;const i=typeof t=="function";typeof e=="string"?(s=e,r=i?n:t):(r=e,s=e.id);function o(l,c){const a=bl();return l=l||(a?Me(po,null):null),l&&es(l),l=ho,l._s.has(s)||(i?mo(s,t,r,l):ou(s,r,l)),l._s.get(s)}return o.$id=s,o}/*! + * vue-router v4.6.4 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */const Mt=typeof document<"u";function yo(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function lu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&yo(e.default)}const J=Object.assign;function gs(e,t){const n={};for(const s in t){const r=t[s];n[s]=Ve(r)?r.map(e):e(r)}return n}const nn=()=>{},Ve=Array.isArray;function jr(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const _o=/#/g,cu=/&/g,uu=/\//g,fu=/=/g,au=/\?/g,vo=/\+/g,hu=/%5B/g,du=/%5D/g,bo=/%5E/g,pu=/%60/g,xo=/%7B/g,gu=/%7C/g,Eo=/%7D/g,mu=/%20/g;function er(e){return e==null?"":encodeURI(""+e).replace(gu,"|").replace(hu,"[").replace(du,"]")}function yu(e){return er(e).replace(xo,"{").replace(Eo,"}").replace(bo,"^")}function Ps(e){return er(e).replace(vo,"%2B").replace(mu,"+").replace(_o,"%23").replace(cu,"%26").replace(pu,"`").replace(xo,"{").replace(Eo,"}").replace(bo,"^")}function _u(e){return Ps(e).replace(fu,"%3D")}function vu(e){return er(e).replace(_o,"%23").replace(au,"%3F")}function bu(e){return vu(e).replace(uu,"%2F")}function fn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const xu=/\/$/,Eu=e=>e.replace(xu,"");function ms(e,t,n="/"){let s,r={},i="",o="";const l=t.indexOf("#");let c=t.indexOf("?");return c=l>=0&&c>l?-1:c,c>=0&&(s=t.slice(0,c),i=t.slice(c,l>0?l:t.length),r=e(i.slice(1))),l>=0&&(s=s||t.slice(0,l),o=t.slice(l,t.length)),s=Au(s??t,n),{fullPath:s+i+o,path:s,query:r,hash:fn(o)}}function wu(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Hr(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Ru(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&jt(t.matched[s],n.matched[r])&&wo(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function jt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function wo(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Su(e[n],t[n]))return!1;return!0}function Su(e,t){return Ve(e)?Br(e,t):Ve(t)?Br(t,e):e?.valueOf()===t?.valueOf()}function Br(e,t){return Ve(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Au(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let i=n.length-1,o,l;for(o=0;o1&&i--;else break;return n.slice(0,i).join("/")+"/"+s.slice(o).join("/")}const at={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Ts=function(e){return e.pop="pop",e.push="push",e}({}),ys=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function Cu(e){if(!e)if(Mt){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Eu(e)}const Ou=/^[^#]+#/;function Iu(e,t){return e.replace(Ou,"#")+t}function Pu(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const ts=()=>({left:window.scrollX,top:window.scrollY});function Tu(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Pu(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Ur(e,t){return(history.state?history.state.position-t:-1)+e}const Ns=new Map;function Nu(e,t){Ns.set(e,t)}function Mu(e){const t=Ns.get(e);return Ns.delete(e),t}function Du(e){return typeof e=="string"||e&&typeof e=="object"}function Ro(e){return typeof e=="string"||typeof e=="symbol"}let le=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const So=Symbol("");le.MATCHER_NOT_FOUND+"",le.NAVIGATION_GUARD_REDIRECT+"",le.NAVIGATION_ABORTED+"",le.NAVIGATION_CANCELLED+"",le.NAVIGATION_DUPLICATED+"";function Ht(e,t){return J(new Error,{type:e,[So]:!0},t)}function Ye(e,t){return e instanceof Error&&So in e&&(t==null||!!(e.type&t))}const Lu=["params","query","hash"];function ku(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Lu)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Fu(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;sr&&Ps(r)):[s&&Ps(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function Vu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Ve(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const ju=Symbol(""),Gr=Symbol(""),ns=Symbol(""),tr=Symbol(""),Ms=Symbol("");function Gt(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function pt(e,t,n,s,r,i=o=>o()){const o=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,c)=>{const a=g=>{g===!1?c(Ht(le.NAVIGATION_ABORTED,{from:n,to:t})):g instanceof Error?c(g):Du(g)?c(Ht(le.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(o&&s.enterCallbacks[r]===o&&typeof g=="function"&&o.push(g),l())},f=i(()=>e.call(s&&s.instances[r],t,n,a));let d=Promise.resolve(f);e.length<3&&(d=d.then(a)),d.catch(g=>c(g))})}function _s(e,t,n,s,r=i=>i()){const i=[];for(const o of e)for(const l in o.components){let c=o.components[l];if(!(t!=="beforeRouteEnter"&&!o.instances[l]))if(yo(c)){const a=(c.__vccOpts||c)[t];a&&i.push(pt(a,n,s,o,l,r))}else{let a=c();i.push(()=>a.then(f=>{if(!f)throw new Error(`Couldn't resolve component "${l}" at "${o.path}"`);const d=lu(f)?f.default:f;o.mods[l]=f,o.components[l]=d;const g=(d.__vccOpts||d)[t];return g&&pt(g,n,s,o,l,r)()}))}}return i}function Hu(e,t){const n=[],s=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;ojt(a,l))?s.push(l):n.push(l));const c=e.matched[o];c&&(t.matched.find(a=>jt(a,c))||r.push(c))}return[n,s,r]}/*! + * vue-router v4.6.4 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */let Bu=()=>location.protocol+"//"+location.host;function Ao(e,t){const{pathname:n,search:s,hash:r}=t,i=e.indexOf("#");if(i>-1){let o=r.includes(e.slice(i))?e.slice(i).length:1,l=r.slice(o);return l[0]!=="/"&&(l="/"+l),Hr(l,"")}return Hr(n,e)+s+r}function Uu(e,t,n,s){let r=[],i=[],o=null;const l=({state:g})=>{const m=Ao(e,location),w=n.value,x=t.value;let D=0;if(g){if(n.value=m,t.value=g,o&&o===w){o=null;return}D=x?g.position-x.position:0}else s(m);r.forEach(M=>{M(n.value,w,{delta:D,type:Ts.pop,direction:D?D>0?ys.forward:ys.back:ys.unknown})})};function c(){o=n.value}function a(g){r.push(g);const m=()=>{const w=r.indexOf(g);w>-1&&r.splice(w,1)};return i.push(m),m}function f(){if(document.visibilityState==="hidden"){const{history:g}=window;if(!g.state)return;g.replaceState(J({},g.state,{scroll:ts()}),"")}}function d(){for(const g of i)g();i=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",f),document.removeEventListener("visibilitychange",f)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",f),document.addEventListener("visibilitychange",f),{pauseListeners:c,listen:a,destroy:d}}function Wr(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?ts():null}}function Ku(e){const{history:t,location:n}=window,s={value:Ao(e,n)},r={value:t.state};r.value||i(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(c,a,f){const d=e.indexOf("#"),g=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+c:Bu()+e+c;try{t[f?"replaceState":"pushState"](a,"",g),r.value=a}catch(m){console.error(m),n[f?"replace":"assign"](g)}}function o(c,a){i(c,J({},t.state,Wr(r.value.back,c,r.value.forward,!0),a,{position:r.value.position}),!0),s.value=c}function l(c,a){const f=J({},r.value,t.state,{forward:c,scroll:ts()});i(f.current,f,!0),i(c,J({},Wr(s.value,c,null),{position:f.position+1},a),!1),s.value=c}return{location:s,state:r,push:l,replace:o}}function Cf(e){e=Cu(e);const t=Ku(e),n=Uu(e,t.state,t.location,t.replace);function s(i,o=!0){o||n.pauseListeners(),history.go(i)}const r=J({location:"",base:e,go:s,createHref:Iu.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let xt=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var ae=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(ae||{});const Gu={type:xt.Static,value:""},Wu=/[a-zA-Z0-9_]/;function qu(e){if(!e)return[[]];if(e==="/")return[[Gu]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${a}": ${m}`)}let n=ae.Static,s=n;const r=[];let i;function o(){i&&r.push(i),i=[]}let l=0,c,a="",f="";function d(){a&&(n===ae.Static?i.push({type:xt.Static,value:a}):n===ae.Param||n===ae.ParamRegExp||n===ae.ParamRegExpEnd?(i.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),i.push({type:xt.Param,value:a,regexp:f,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),a="")}function g(){a+=c}for(;lt.length?t.length===1&&t[0]===be.Static+be.Segment?1:-1:0}function Co(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Yu={strict:!1,end:!0,sensitive:!1};function Xu(e,t,n){const s=Ju(qu(e.path),n),r=J(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Zu(e,t){const n=[],s=new Map;t=jr(Yu,t);function r(d){return s.get(d)}function i(d,g,m){const w=!m,x=Jr(d);x.aliasOf=m&&m.record;const D=jr(t,d),M=[x];if("alias"in d){const I=typeof d.alias=="string"?[d.alias]:d.alias;for(const L of I)M.push(Jr(J({},x,{components:m?m.record.components:x.components,path:L,aliasOf:m?m.record:x})))}let A,T;for(const I of M){const{path:L}=I;if(g&&L[0]!=="/"){const oe=g.record.path,Y=oe[oe.length-1]==="/"?"":"/";I.path=g.record.path+(L&&Y+L)}if(A=Xu(I,g,D),m?m.alias.push(A):(T=T||A,T!==A&&T.alias.push(A),w&&d.name&&!Qr(A)&&o(d.name)),Oo(A)&&c(A),x.children){const oe=x.children;for(let Y=0;Y{o(T)}:nn}function o(d){if(Ro(d)){const g=s.get(d);g&&(s.delete(d),n.splice(n.indexOf(g),1),g.children.forEach(o),g.alias.forEach(o))}else{const g=n.indexOf(d);g>-1&&(n.splice(g,1),d.record.name&&s.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function l(){return n}function c(d){const g=nf(d,n);n.splice(g,0,d),d.record.name&&!Qr(d)&&s.set(d.record.name,d)}function a(d,g){let m,w={},x,D;if("name"in d&&d.name){if(m=s.get(d.name),!m)throw Ht(le.MATCHER_NOT_FOUND,{location:d});D=m.record.name,w=J(zr(g.params,m.keys.filter(T=>!T.optional).concat(m.parent?m.parent.keys.filter(T=>T.optional):[]).map(T=>T.name)),d.params&&zr(d.params,m.keys.map(T=>T.name))),x=m.stringify(w)}else if(d.path!=null)x=d.path,m=n.find(T=>T.re.test(x)),m&&(w=m.parse(x),D=m.record.name);else{if(m=g.name?s.get(g.name):n.find(T=>T.re.test(g.path)),!m)throw Ht(le.MATCHER_NOT_FOUND,{location:d,currentLocation:g});D=m.record.name,w=J({},g.params,d.params),x=m.stringify(w)}const M=[];let A=m;for(;A;)M.unshift(A.record),A=A.parent;return{name:D,path:x,params:w,matched:M,meta:tf(M)}}e.forEach(d=>i(d));function f(){n.length=0,s.clear()}return{addRoute:i,resolve:a,removeRoute:o,clearRoutes:f,getRoutes:l,getRecordMatcher:r}}function zr(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Jr(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:ef(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function ef(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function Qr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function tf(e){return e.reduce((t,n)=>J(t,n.meta),{})}function nf(e,t){let n=0,s=t.length;for(;n!==s;){const i=n+s>>1;Co(e,t[i])<0?s=i:n=i+1}const r=sf(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function sf(e){let t=e;for(;t=t.parent;)if(Oo(t)&&Co(e,t)===0)return t}function Oo({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Yr(e){const t=Me(ns),n=Me(tr),s=Ne(()=>{const c=wt(e.to);return t.resolve(c)}),r=Ne(()=>{const{matched:c}=s.value,{length:a}=c,f=c[a-1],d=n.matched;if(!f||!d.length)return-1;const g=d.findIndex(jt.bind(null,f));if(g>-1)return g;const m=Xr(c[a-2]);return a>1&&Xr(f)===m&&d[d.length-1].path!==m?d.findIndex(jt.bind(null,c[a-2])):g}),i=Ne(()=>r.value>-1&&uf(n.params,s.value.params)),o=Ne(()=>r.value>-1&&r.value===n.matched.length-1&&wo(n.params,s.value.params));function l(c={}){if(cf(c)){const a=t[wt(e.replace)?"replace":"push"](wt(e.to)).catch(nn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}return{route:s,href:Ne(()=>s.value.href),isActive:i,isExactActive:o,navigate:l}}function rf(e){return e.length===1?e[0]:e}const of=Js({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Yr,setup(e,{slots:t}){const n=hn(Yr(e)),{options:s}=Me(ns),r=Ne(()=>({[Zr(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Zr(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&rf(t.default(n));return e.custom?i:un("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),lf=of;function cf(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function uf(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Ve(r)||r.length!==s.length||s.some((i,o)=>i.valueOf()!==r[o].valueOf()))return!1}return!0}function Xr(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Zr=(e,t,n)=>e??t??n,ff=Js({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=Me(Ms),r=Ne(()=>e.route||s.value),i=Me(Gr,0),o=Ne(()=>{let a=wt(i);const{matched:f}=r.value;let d;for(;(d=f[a])&&!d.components;)a++;return a}),l=Ne(()=>r.value.matched[o.value]);Sn(Gr,Ne(()=>o.value+1)),Sn(ju,l),Sn(Ms,r);const c=Qt();return Yt(()=>[c.value,l.value,e.name],([a,f,d],[g,m,w])=>{f&&(f.instances[d]=a,m&&m!==f&&a&&a===g&&(f.leaveGuards.size||(f.leaveGuards=m.leaveGuards),f.updateGuards.size||(f.updateGuards=m.updateGuards))),a&&f&&(!m||!jt(f,m)||!g)&&(f.enterCallbacks[d]||[]).forEach(x=>x(a))},{flush:"post"}),()=>{const a=r.value,f=e.name,d=l.value,g=d&&d.components[f];if(!g)return ei(n.default,{Component:g,route:a});const m=d.props[f],w=m?m===!0?a.params:typeof m=="function"?m(a):m:null,D=un(g,J({},w,t,{onVnodeUnmounted:M=>{M.component.isUnmounted&&(d.instances[f]=null)},ref:c}));return ei(n.default,{Component:D,route:a})||D}}});function ei(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const af=ff;function Of(e){const t=Zu(e.routes,e),n=e.parseQuery||Fu,s=e.stringifyQuery||Kr,r=e.history,i=Gt(),o=Gt(),l=Gt(),c=ol(at);let a=at;Mt&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=gs.bind(null,v=>""+v),d=gs.bind(null,bu),g=gs.bind(null,fn);function m(v,N){let O,k;return Ro(v)?(O=t.getRecordMatcher(v),k=N):k=v,t.addRoute(k,O)}function w(v){const N=t.getRecordMatcher(v);N&&t.removeRoute(N)}function x(){return t.getRoutes().map(v=>v.record)}function D(v){return!!t.getRecordMatcher(v)}function M(v,N){if(N=J({},N||c.value),typeof v=="string"){const p=ms(n,v,N.path),_=t.resolve({path:p.path},N),b=r.createHref(p.fullPath);return J(p,_,{params:g(_.params),hash:fn(p.hash),redirectedFrom:void 0,href:b})}let O;if(v.path!=null)O=J({},v,{path:ms(n,v.path,N.path).path});else{const p=J({},v.params);for(const _ in p)p[_]==null&&delete p[_];O=J({},v,{params:d(p)}),N.params=d(N.params)}const k=t.resolve(O,N),W=v.hash||"";k.params=f(g(k.params));const u=wu(s,J({},v,{hash:yu(W),path:k.path})),h=r.createHref(u);return J({fullPath:u,hash:W,query:s===Kr?Vu(v.query):v.query||{}},k,{redirectedFrom:void 0,href:h})}function A(v){return typeof v=="string"?ms(n,v,c.value.path):J({},v)}function T(v,N){if(a!==v)return Ht(le.NAVIGATION_CANCELLED,{from:N,to:v})}function I(v){return Y(v)}function L(v){return I(J(A(v),{replace:!0}))}function oe(v,N){const O=v.matched[v.matched.length-1];if(O&&O.redirect){const{redirect:k}=O;let W=typeof k=="function"?k(v,N):k;return typeof W=="string"&&(W=W.includes("?")||W.includes("#")?W=A(W):{path:W},W.params={}),J({query:v.query,hash:v.hash,params:W.path!=null?{}:v.params},W)}}function Y(v,N){const O=a=M(v),k=c.value,W=v.state,u=v.force,h=v.replace===!0,p=oe(O,k);if(p)return Y(J(A(p),{state:typeof p=="object"?J({},W,p.state):W,force:u,replace:h}),N||O);const _=O;_.redirectedFrom=N;let b;return!u&&Ru(s,k,O)&&(b=Ht(le.NAVIGATION_DUPLICATED,{to:_,from:k}),je(k,k,!0,!1)),(b?Promise.resolve(b):re(_,k)).catch(y=>Ye(y)?Ye(y,le.NAVIGATION_GUARD_REDIRECT)?y:ft(y):z(y,_,k)).then(y=>{if(y){if(Ye(y,le.NAVIGATION_GUARD_REDIRECT))return Y(J({replace:h},A(y.to),{state:typeof y.to=="object"?J({},W,y.to.state):W,force:u}),N||_)}else y=Ae(_,k,!0,h,W);return _e(_,k,y),y})}function K(v,N){const O=T(v,N);return O?Promise.reject(O):Promise.resolve()}function G(v){const N=Ot.values().next().value;return N&&typeof N.runWithContext=="function"?N.runWithContext(v):v()}function re(v,N){let O;const[k,W,u]=Hu(v,N);O=_s(k.reverse(),"beforeRouteLeave",v,N);for(const p of k)p.leaveGuards.forEach(_=>{O.push(pt(_,v,N))});const h=K.bind(null,v,N);return O.push(h),Te(O).then(()=>{O=[];for(const p of i.list())O.push(pt(p,v,N));return O.push(h),Te(O)}).then(()=>{O=_s(W,"beforeRouteUpdate",v,N);for(const p of W)p.updateGuards.forEach(_=>{O.push(pt(_,v,N))});return O.push(h),Te(O)}).then(()=>{O=[];for(const p of u)if(p.beforeEnter)if(Ve(p.beforeEnter))for(const _ of p.beforeEnter)O.push(pt(_,v,N));else O.push(pt(p.beforeEnter,v,N));return O.push(h),Te(O)}).then(()=>(v.matched.forEach(p=>p.enterCallbacks={}),O=_s(u,"beforeRouteEnter",v,N,G),O.push(h),Te(O))).then(()=>{O=[];for(const p of o.list())O.push(pt(p,v,N));return O.push(h),Te(O)}).catch(p=>Ye(p,le.NAVIGATION_CANCELLED)?p:Promise.reject(p))}function _e(v,N,O){l.list().forEach(k=>G(()=>k(v,N,O)))}function Ae(v,N,O,k,W){const u=T(v,N);if(u)return u;const h=N===at,p=Mt?history.state:{};O&&(k||h?r.replace(v.fullPath,J({scroll:h&&p&&p.scroll},W)):r.push(v.fullPath,W)),c.value=v,je(v,N,O,h),ft()}let we;function mt(){we||(we=r.listen((v,N,O)=>{if(!yt.listening)return;const k=M(v),W=oe(k,yt.currentRoute.value);if(W){Y(J(W,{replace:!0,force:!0}),k).catch(nn);return}a=k;const u=c.value;Mt&&Nu(Ur(u.fullPath,O.delta),ts()),re(k,u).catch(h=>Ye(h,le.NAVIGATION_ABORTED|le.NAVIGATION_CANCELLED)?h:Ye(h,le.NAVIGATION_GUARD_REDIRECT)?(Y(J(A(h.to),{force:!0}),k).then(p=>{Ye(p,le.NAVIGATION_ABORTED|le.NAVIGATION_DUPLICATED)&&!O.delta&&O.type===Ts.pop&&r.go(-1,!1)}).catch(nn),Promise.reject()):(O.delta&&r.go(-O.delta,!1),z(h,k,u))).then(h=>{h=h||Ae(k,u,!1),h&&(O.delta&&!Ye(h,le.NAVIGATION_CANCELLED)?r.go(-O.delta,!1):O.type===Ts.pop&&Ye(h,le.NAVIGATION_ABORTED|le.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),_e(k,u,h)}).catch(nn)}))}let ut=Gt(),se=Gt(),U;function z(v,N,O){ft(v);const k=se.list();return k.length?k.forEach(W=>W(v,N,O)):console.error(v),Promise.reject(v)}function Je(){return U&&c.value!==at?Promise.resolve():new Promise((v,N)=>{ut.add([v,N])})}function ft(v){return U||(U=!v,mt(),ut.list().forEach(([N,O])=>v?O(v):N()),ut.reset()),v}function je(v,N,O,k){const{scrollBehavior:W}=e;if(!Mt||!W)return Promise.resolve();const u=!O&&Mu(Ur(v.fullPath,0))||(k||!O)&&history.state&&history.state.scroll||null;return qs().then(()=>W(v,N,u)).then(h=>h&&Tu(h)).catch(h=>z(h,v,N))}const Re=v=>r.go(v);let Ct;const Ot=new Set,yt={currentRoute:c,listening:!0,addRoute:m,removeRoute:w,clearRoutes:t.clearRoutes,hasRoute:D,getRoutes:x,resolve:M,options:e,push:I,replace:L,go:Re,back:()=>Re(-1),forward:()=>Re(1),beforeEach:i.add,beforeResolve:o.add,afterEach:l.add,onError:se.add,isReady:Je,install(v){v.component("RouterLink",lf),v.component("RouterView",af),v.config.globalProperties.$router=yt,Object.defineProperty(v.config.globalProperties,"$route",{enumerable:!0,get:()=>wt(c)}),Mt&&!Ct&&c.value===at&&(Ct=!0,I(r.location).catch(k=>{}));const N={};for(const k in at)Object.defineProperty(N,k,{get:()=>c.value[k],enumerable:!0});v.provide(ns,yt),v.provide(tr,Ai(N)),v.provide(Ms,c);const O=v.unmount;Ot.add(v),v.unmount=function(){Ot.delete(v),Ot.size<1&&(a=at,we&&we(),we=null,c.value=at,Ct=!1,U=!1),O()}}};function Te(v){return v.reduce((N,O)=>N.then(()=>G(O)),Promise.resolve())}return yt}function If(){return Me(ns)}function Pf(e){return Me(tr)}/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hf=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var wn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const df=({size:e,strokeWidth:t=2,absoluteStrokeWidth:n,color:s,iconNode:r,name:i,class:o,...l},{slots:c})=>un("svg",{...wn,width:e||wn.width,height:e||wn.height,stroke:s||wn.stroke,"stroke-width":n?Number(t)*24/Number(e):t,class:["lucide",`lucide-${hf(i??"icon")}`],...l},[...r.map(a=>un(...a)),...c.default?[c.default()]:[]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ue=(e,t)=>(n,{slots:s})=>un(df,{...n,iconNode:t,name:e},s);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Tf=ue("ArrowRightIcon",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Nf=ue("AwardIcon",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Mf=ue("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Df=ue("ChevronDownIcon",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Lf=ue("CircleAlertIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kf=ue("CircleHelpIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ff=ue("ClockIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Vf=ue("CopyIcon",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jf=ue("FrownIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 16s-1.5-2-4-2-4 2-4 2",key:"epbg0q"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Hf=ue("GiftIcon",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bf=ue("KeyRoundIcon",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Uf=ue("LoaderCircleIcon",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Kf=ue("LogInIcon",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Gf=ue("LogOutIcon",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wf=ue("PhoneIcon",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qf=ue("RotateCcwIcon",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $f=ue("SparklesIcon",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zf=ue("TrophyIcon",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Jf=ue("Volume2Icon",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",key:"ltjumu"}],["path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",key:"1kegas"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Qf=ue("VolumeXIcon",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/** + * @license lucide-vue-next v0.378.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Yf=ue("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);export{Pf as $,Tf as A,Vf as B,Mf as C,Ff as D,gc as E,Ze as F,Hf as G,wf as H,pf as I,Ef as J,Bf as K,Uf as L,jf as M,gf as N,Qf as O,Wf as P,Gf as Q,qf as R,$f as S,zf as T,Kf as U,Jf as V,Lf as W,Yf as X,yf as Y,kf as Z,Df as _,ac as a,vf as b,Ne as c,Js as d,lo as e,_f as f,xf as g,bf as h,Af as i,Tl as j,hc as k,mf as l,Of as m,Fs as n,Ys as o,Cf as p,Rf as q,Qt as r,Sf as s,Ho as t,wt as u,ge as v,Yt as w,Nf as x,If as y,Vs as z}; diff --git a/apps/client/dist/assets/wheel-candylandwheel-BJ8iho3G.js b/apps/client/dist/assets/wheel-candylandwheel-BJ8iho3G.js new file mode 100644 index 0000000..4db253e --- /dev/null +++ b/apps/client/dist/assets/wheel-candylandwheel-BJ8iho3G.js @@ -0,0 +1 @@ +import{u as b,t as v}from"./wheel-classiccasinowheel-DHnlMe5J.js";import{d as B,a as l,b as o,e,n as d,u as i,F as c,f as h,t as C,g as S,c as z}from"./vendor-vue-kYoPQr5S.js";const F={class:"relative w-full max-w-[340px] xs:max-w-[380px] sm:max-w-[420px] aspect-square mx-auto select-none"},L={class:"absolute inset-0 rounded-full p-3.5 border-4 border-pink-300 shadow-[0_10px_0_#f9a8d4,0_16px_28px_rgba(244,114,182,0.35)]",style:{background:"linear-gradient(180deg, #ffe4e6 0%, #fbcfe8 100%)"}},P={class:"w-full h-full rounded-full border-4 border-white relative overflow-hidden bg-rose-50"},D=["d","fill"],N=["transform"],R={x:"150",y:"45","text-anchor":"middle",fill:"#ffffff","font-size":"11","font-weight":"900",class:"wheel-slice-text font-sans",style:{"paint-order":"stroke fill",stroke:"rgba(0,0,0,0.2)","stroke-width":"2px"}},V=["href"],W=["cx","cy"],q=["cx","cy","fill"],E={class:"absolute -top-4 left-1/2 -translate-x-1/2 z-20 pointer-events-none drop-shadow-[0_5px_0_#db2777]"},M=B({__name:"CandyLandWheel",props:{segments:{},targetSegmentIndex:{},spinning:{type:Boolean}},emits:["spin-finished"],setup(f,{emit:u}){const x=f,m=u,{wheelStyle:p,pointerStyle:g,getSlicePath:w,getTextRotation:y,makePegs:_}=b(x,()=>m("spin-finished"),{radius:138,pegRadius:142}),n=["#fb7185","#fbbf24","#34d399","#60a5fa","#c084fc","#f472b6"],k=z(()=>_(24,142).map((a,s)=>({...a,color:n[s%n.length]})));return(a,s)=>(l(),o("div",F,[e("div",L,[e("div",P,[(l(),o("svg",{class:"w-full h-full",style:d(i(p)),viewBox:"0 0 300 300"},[(l(!0),o(c,null,h(f.segments,(t,r)=>(l(),o("g",{key:t.id},[e("path",{d:i(w)(r),fill:t.color||n[r%n.length],stroke:"#ffffff","stroke-width":"3"},null,8,D),e("g",{transform:i(y)(r)},[e("text",R,C(i(v)(t.title)),1),t.image?(l(),o("image",{key:0,href:t.image,x:"138",y:"54",width:"24",height:"24"},null,8,V)):S("",!0)],8,N)]))),128)),(l(!0),o(c,null,h(k.value,(t,r)=>(l(),o("g",{key:r},[e("circle",{cx:t.x,cy:t.y,r:"4.2",fill:"#fff",stroke:"#f9a8d4","stroke-width":"1.2"},null,8,W),e("circle",{cx:t.x,cy:t.y,r:"2.6",fill:t.color},null,8,q)]))),128)),s[0]||(s[0]=e("circle",{cx:"150",cy:"150",r:"32",fill:"#fb7185",stroke:"#fff","stroke-width":"4"},null,-1)),s[1]||(s[1]=e("circle",{cx:"150",cy:"150",r:"20",fill:"#fef08a",stroke:"#f9a8d4","stroke-width":"2"},null,-1)),s[2]||(s[2]=e("text",{x:"150",y:"157","text-anchor":"middle","font-size":"16"},"🍬",-1))],4))])]),e("div",E,[e("div",{style:d(i(g)),class:"w-10 h-[48px] origin-[50%_14px] will-change-transform"},[...s[3]||(s[3]=[e("svg",{width:"40",height:"48",viewBox:"0 0 40 48",fill:"none"},[e("path",{d:"M20 48L6 16C4 11 8 4 14 4H26C32 4 36 11 34 16L20 48Z",fill:"#fb7185",stroke:"#fff","stroke-width":"2.5"}),e("circle",{cx:"20",cy:"14",r:"5.5",fill:"#fef08a",stroke:"#fff","stroke-width":"2"})],-1)])],4)])]))}});export{M as default}; diff --git a/apps/client/dist/assets/wheel-classiccasinowheel-DHnlMe5J.js b/apps/client/dist/assets/wheel-classiccasinowheel-DHnlMe5J.js new file mode 100644 index 0000000..98eecdc --- /dev/null +++ b/apps/client/dist/assets/wheel-classiccasinowheel-DHnlMe5J.js @@ -0,0 +1 @@ +import{r as D,o as ue,c as P,w as de,d as pe,a as V,b,e as S,n as ne,u as I,F as oe,f as ae,t as me,g as ge,h as se}from"./vendor-vue-kYoPQr5S.js";const ie=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"];function he(e){return e==null||typeof e=="object"&&e!==null&&"value"in e&&(e=e.value,e==null)||typeof e=="object"?"":String(e).replace(/[0-9]/g,m=>ie[+m]).replace(/[٠-٩]/g,m=>ie[m.charCodeAt(0)-1632])}var ye=(e=>(e.CLASSIC_CASINO="CLASSIC_CASINO",e.NEON_CYBER="NEON_CYBER",e.MINIMAL_FLAT="MINIMAL_FLAT",e.LUXURY_GOLD="LUXURY_GOLD",e.PLAYFUL_CARTOON="PLAYFUL_CARTOON",e.RUSTIC_WOOD="RUSTIC_WOOD",e.GALAXY_SPACE="GALAXY_SPACE",e.CANDY_LAND="CANDY_LAND",e.FIRE_FLAME="FIRE_FLAME",e.CRYSTAL_ICE="CRYSTAL_ICE",e))(ye||{});const F=D(localStorage.getItem("wheel_sound_enabled")!=="false");let O=null;function H(){if(!O){const e=window.AudioContext||window.webkitAudioContext;O=new e}return O.state==="suspended"&&O.resume(),O}let q=null;function Ae(e){if(!q||q.sampleRate!==e.sampleRate){const m=Math.ceil(e.sampleRate*.05);q=e.createBuffer(1,m,e.sampleRate);const h=q.getChannelData(0);for(let y=0;y{const r=n.createOscillator();r.type="sine",r.frequency.value=t;const l=n.createOscillator();l.type="sine",l.frequency.value=t*2.01;const p=n.createGain(),A=f+o*a;p.gain.setValueAtTime(0,A),p.gain.linearRampToValueAtTime(.22,A+.03),p.gain.exponentialRampToValueAtTime(.001,A+.7);const c=n.createGain();c.gain.setValueAtTime(0,A),c.gain.linearRampToValueAtTime(.06,A+.03),c.gain.exponentialRampToValueAtTime(.001,A+.5),r.connect(p),l.connect(c),p.connect(n.destination),c.connect(n.destination),r.start(A),r.stop(A+.75),l.start(A),l.stop(A+.55)});const g=n.createOscillator();g.type="sine",g.frequency.value=2093;const d=n.createGain(),s=f+i.length*a+.05;d.gain.setValueAtTime(0,s),d.gain.linearRampToValueAtTime(.1,s+.01),d.gain.exponentialRampToValueAtTime(.001,s+.6),g.connect(d),d.connect(n.destination),g.start(s),g.stop(s+.65)}catch{}}function y(){if(F.value)try{const n=H(),f=n.currentTime;[{freq:311.13,duration:.28,delay:0,slide:!1},{freq:293.66,duration:.28,delay:.32,slide:!1},{freq:277.18,duration:.28,delay:.64,slide:!1},{freq:261.63,duration:1.45,delay:.98,slide:!0}].forEach(({freq:a,duration:g,delay:d,slide:s})=>{const t=f+d,o=t+g,r=n.createOscillator(),l=n.createOscillator();if(r.type="sawtooth",l.type="sawtooth",r.frequency.setValueAtTime(a,t),l.frequency.setValueAtTime(a*1.008,t),s){r.frequency.setValueAtTime(a,t),l.frequency.setValueAtTime(a*1.008,t),r.frequency.exponentialRampToValueAtTime(208,o),l.frequency.exponentialRampToValueAtTime(209,o);const u=n.createOscillator(),x=n.createGain();u.frequency.setValueAtTime(5.8,t),x.gain.setValueAtTime(0,t),x.gain.linearRampToValueAtTime(8.5,t+.4),u.connect(x),x.connect(r.frequency),x.connect(l.frequency),u.start(t),u.stop(o+.1)}const p=n.createBiquadFilter();p.type="lowpass",p.Q.value=4.8;const A=t+Math.min(.08,g*.28);p.frequency.setValueAtTime(280,t),p.frequency.exponentialRampToValueAtTime(s?1650:1450,A),p.frequency.exponentialRampToValueAtTime(s?300:360,o);const c=n.createGain();c.gain.setValueAtTime(.001,t),c.gain.linearRampToValueAtTime(.22,t+.03),s&&c.gain.setValueAtTime(.22,t+.65),c.gain.exponentialRampToValueAtTime(.001,o),r.connect(p),l.connect(p),p.connect(c),c.connect(n.destination),r.start(t),l.start(t),r.stop(o+.05),l.stop(o+.05)})}catch{}}return{soundEnabled:F,toggleSound:e,playTick:m,playWin:h,playNoPrize:y}}function Te(e){const{playTick:m}=xe(),h=D(0),y=D(0),n=D(!1),f=window.matchMedia("(prefers-reduced-motion: reduce)").matches;let i=null,a=null;function g(t){if(n.value)return;const o=e.segmentCount();if(o<=0)return;a!==null&&(cancelAnimationFrame(a),a=null),n.value=!0;const r=360/o,l=(Math.random()-.5)*(r*.4),A=(360-(t*r+r/2+l)%360)%360,c=f?1:7+Math.floor(Math.random()*3),u=f?.8:5.5,x=h.value%360,R=(A-x+360)%360,C=c*360+R,z=5.5/u,G=h.value,N=performance.now();let E=N,B=G;const w=360/(e.pegCount?e.pegCount():Math.max(24,o)),j=w*.38;let T=0,_=0,J=Math.floor((G%360+360)%360/w);function K(M){return 1-Math.exp(-z*M*u)}const ce=1/K(1);function W(M){const Y=(M-N)/1e3,k=Math.min(1,Y/u),L=Math.min(.04,Math.max(.001,(M-E)/1e3));E=M;let $;k>=1?$=1:$=K(k)*ce;const v=G+C*$,le=v-B;if(B=v,h.value=v,!f){const fe=le/L,X=Math.min(1,Math.max(0,fe/800)),ee=(v%w+w)%w,te=Math.floor((v%360+360)%360/w);if(te!==J){const U=Math.max(.12,Math.min(1,X*1.8+.15));m(U),_=-180*(.8+X*.5),J=te}if(ee>=w-j){const U=(ee-(w-j))/j,Z=(11+X*3.5)*Math.sin(U*(Math.PI/2));T=Math.max(T,Z),_=0}else{const Z=-1400*T-42*_;_+=Z*L,T+=_*L,T<-3&&(T=-3,_=-_*.3)}y.value=T}k<1?i=requestAnimationFrame(W):(h.value=G+C,n.value=!1,i=null,re(),e.onFinished&&e.onFinished())}function re(){let M=performance.now();function Y(k){const L=Math.min(.03,(k-M)/1e3);M=k;const v=-1e3*T-40*_;if(_+=v*L,T+=_*L,Math.abs(T)<.05&&Math.abs(_)<1){y.value=0,a=null;return}y.value=T,a=requestAnimationFrame(Y)}a=requestAnimationFrame(Y)}i=requestAnimationFrame(W)}ue(()=>{i!==null&&cancelAnimationFrame(i),a!==null&&cancelAnimationFrame(a)});const d=P(()=>({transform:`rotate(${h.value}deg)`,transformOrigin:"50% 50%",willChange:"transform"})),s=P(()=>({transform:`rotate(${y.value}deg)`,transformOrigin:"50% 12px",willChange:"transform"}));return{currentRotation:h,pointerAngle:y,pointerStyle:s,isSpinning:n,wheelStyle:d,spinTo:g}}function Q(e){return typeof e=="function"?e:()=>e.value}function _e(e){const m=Q(e.segments),h=Q(e.spinning),y=Q(e.targetSegmentIndex),n=e.radius??140,f=e.pegRadius??144,i=e.pegCount??24,{wheelStyle:a,pointerStyle:g,isSpinning:d,spinTo:s}=Te({segmentCount:()=>m().length,pegCount:()=>i,onFinished:e.onFinished});de([h,y],([c,u])=>{c&&u!==null&&u!==void 0&&!d.value&&s(u)},{flush:"post"});const t=P(()=>m().length),o=P(()=>t.value>0?360/t.value:0);function r(c){if(t.value<=1)return"";const u=150,x=150,R=(c*o.value-90)*(Math.PI/180),C=((c+1)*o.value-90)*(Math.PI/180),z=u+n*Math.cos(R),G=x+n*Math.sin(R),N=u+n*Math.cos(C),E=x+n*Math.sin(C),B=o.value>180?1:0;return`M ${u} ${x} L ${z} ${G} A ${n} ${n} 0 ${B} 1 ${N} ${E} Z`}function l(c){return`rotate(${c*o.value+o.value/2} 150 150)`}function p(c=i,u=f){return Array.from({length:c},(x,R)=>{const C=(R*(360/c)-90)*(Math.PI/180);return{x:150+u*Math.cos(C),y:150+u*Math.sin(C),index:R}})}const A=P(()=>p());return{wheelStyle:a,pointerStyle:g,isSpinning:d,spinTo:s,totalSegments:t,sliceAngle:o,getSlicePath:r,getTextRotation:l,pegs:A,makePegs:p}}function Se(e,m,h){return _e({segments:()=>e.segments,spinning:()=>e.spinning,targetSegmentIndex:()=>e.targetSegmentIndex,onFinished:m,...h})}const Ce={class:"relative w-full max-w-[340px] xs:max-w-[380px] sm:max-w-[420px] aspect-square mx-auto select-none"},we={class:"absolute inset-0 rounded-full shadow-[0_10px_35px_rgba(0,0,0,0.6)]",style:{background:"radial-gradient(circle, #ffe259 0%, #b8860b 60%, #543d03 100%)",padding:"10px"}},Me={class:"w-full h-full rounded-full border-4 border-amber-300 relative overflow-hidden bg-stone-900"},Re=["d","fill"],ve=["transform"],Ve={x:"150",y:"45","text-anchor":"middle",fill:"#ffffff","font-size":"11","font-weight":"700",class:"wheel-slice-text tracking-tight font-sans"},be=["href"],Fe=["cx","cy"],Ge=["cx","cy"],ke=["cx","cy"],Le={class:"absolute -top-3 left-1/2 -translate-x-1/2 z-20 pointer-events-none drop-shadow-[0_4px_8px_rgba(0,0,0,0.7)]"},Ie=pe({__name:"ClassicCasinoWheel",props:{segments:{},targetSegmentIndex:{},spinning:{type:Boolean}},emits:["spin-finished"],setup(e,{emit:m}){const h=e,y=m,{wheelStyle:n,pointerStyle:f,getSlicePath:i,getTextRotation:a,pegs:g}=Se(h,()=>y("spin-finished"),{radius:140,pegRadius:144});return(d,s)=>(V(),b("div",Ce,[S("div",we,[S("div",Me,[(V(),b("svg",{class:"w-full h-full",style:ne(I(n)),viewBox:"0 0 300 300"},[(V(!0),b(oe,null,ae(e.segments,(t,o)=>(V(),b("g",{key:t.id},[S("path",{d:I(i)(o),fill:t.color||(o%2===0?"#b91c1c":"#1e293b"),stroke:"#fbbf24","stroke-width":"1.5"},null,8,Re),S("g",{transform:I(a)(o)},[S("text",Ve,me(I(he)(t.title)),1),t.image?(V(),b("image",{key:0,href:t.image,x:"138",y:"54",width:"24",height:"24"},null,8,be)):ge("",!0)],8,ve)]))),128)),(V(!0),b(oe,null,ae(I(g),(t,o)=>(V(),b("g",{key:o},[S("circle",{cx:t.x,cy:t.y,r:"4.4",fill:"#1c1917",stroke:"#543d03","stroke-width":"0.8"},null,8,Fe),S("circle",{cx:t.x,cy:t.y,r:"3.5",fill:"url(#casinoStud3D)",stroke:"#fde047","stroke-width":"0.5"},null,8,Ge),S("circle",{cx:t.x-1,cy:t.y-1.1,r:"0.9",fill:"#ffffff",opacity:"0.85"},null,8,ke)]))),128)),s[0]||(s[0]=se('★',4))],4))])]),S("div",Le,[S("div",{style:ne(I(f)),class:"w-10 h-[46px] origin-[50%_12px] will-change-transform"},[...s[1]||(s[1]=[se('',1)])],4)])]))}}),Pe=Object.freeze(Object.defineProperty({__proto__:null,default:Ie},Symbol.toStringTag,{value:"Module"}));export{Pe as C,ye as W,xe as a,he as t,Se as u}; diff --git a/apps/client/dist/assets/wheel-crystalicewheel-BJbsr9tW.js b/apps/client/dist/assets/wheel-crystalicewheel-BJbsr9tW.js new file mode 100644 index 0000000..a45dc0d --- /dev/null +++ b/apps/client/dist/assets/wheel-crystalicewheel-BJbsr9tW.js @@ -0,0 +1 @@ +import{u as w,t as k}from"./wheel-classiccasinowheel-DHnlMe5J.js";import{d as b,a as s,b as o,e as t,n as d,u as l,F as f,f as c,t as v,g as C,h as S}from"./vendor-vue-kYoPQr5S.js";const B={class:"relative w-full max-w-[340px] xs:max-w-[380px] sm:max-w-[420px] aspect-square mx-auto select-none"},$={class:"absolute inset-0 rounded-full p-2.5 shadow-[0_0_30px_rgba(56,189,248,0.45)]",style:{background:"linear-gradient(145deg, #e0f2fe, #38bdf8, #0284c7)"}},F={class:"w-full h-full rounded-full border-2 border-sky-100 relative overflow-hidden bg-[#082f49]/40 backdrop-blur-sm"},z=["d","fill"],L=["transform"],N={x:"150",y:"45","text-anchor":"middle",fill:"#f0f9ff","font-size":"11","font-weight":"700",class:"wheel-slice-text font-sans"},V=["href"],D=["points"],G={class:"absolute -top-3 left-1/2 -translate-x-1/2 z-20 pointer-events-none drop-shadow-[0_0_10px_#7dd3fc]"},W=b({__name:"CrystalIceWheel",props:{segments:{},targetSegmentIndex:{},spinning:{type:Boolean}},emits:["spin-finished"],setup(a,{emit:h}){const p=a,u=h,{wheelStyle:m,pointerStyle:x,getSlicePath:y,getTextRotation:_,pegs:g}=w(p,()=>u("spin-finished"),{radius:138,pegRadius:143}),n=["#0ea5e9","#38bdf8","#7dd3fc","#0284c7","#e0f2fe","#0369a1"];return(I,r)=>(s(),o("div",B,[t("div",$,[t("div",F,[(s(),o("svg",{class:"w-full h-full",style:d(l(m)),viewBox:"0 0 300 300"},[(s(!0),o(f,null,c(a.segments,(e,i)=>(s(),o("g",{key:e.id},[t("path",{d:l(y)(i),fill:e.color||n[i%n.length],stroke:"#e0f2fe","stroke-width":"1.2",opacity:"0.92"},null,8,z),t("g",{transform:l(_)(i)},[t("text",N,v(l(k)(e.title)),1),e.image?(s(),o("image",{key:0,href:e.image,x:"138",y:"54",width:"24",height:"24"},null,8,V)):C("",!0)],8,L)]))),128)),(s(!0),o(f,null,c(l(g),(e,i)=>(s(),o("g",{key:i},[t("polygon",{points:`${e.x},${e.y-4.5} ${e.x+2.4},${e.y+2.2} ${e.x-2.4},${e.y+2.2}`,fill:"#e0f2fe",stroke:"#7dd3fc","stroke-width":"0.6",opacity:"0.95"},null,8,D)]))),128)),r[0]||(r[0]=S('❄️',4))],4))])]),t("div",G,[t("div",{style:d(l(x)),class:"w-8 h-[42px] origin-[50%_10px] will-change-transform"},[...r[1]||(r[1]=[t("svg",{width:"32",height:"42",viewBox:"0 0 32 42",fill:"none"},[t("path",{d:"M16 42L4 12C2 7 6 2 11 2H21C26 2 30 7 28 12L16 42Z",fill:"#38bdf8",stroke:"#e0f2fe","stroke-width":"1.5"}),t("circle",{cx:"16",cy:"10",r:"4",fill:"#e0f2fe",stroke:"#0284c7","stroke-width":"1"})],-1)])],4)])]))}});export{W as default}; diff --git a/apps/client/dist/assets/wheel-fireflamewheel-CV6G4NBw.js b/apps/client/dist/assets/wheel-fireflamewheel-CV6G4NBw.js new file mode 100644 index 0000000..c543f46 --- /dev/null +++ b/apps/client/dist/assets/wheel-fireflamewheel-CV6G4NBw.js @@ -0,0 +1 @@ +import{u as w,t as b}from"./wheel-classiccasinowheel-DHnlMe5J.js";import{d as k,a as s,b as o,e,n as d,u as l,F as f,f as c,t as v,g as F,h as S}from"./vendor-vue-kYoPQr5S.js";const B={class:"relative w-full max-w-[340px] xs:max-w-[380px] sm:max-w-[420px] aspect-square mx-auto select-none"},C={class:"absolute inset-0 rounded-full p-2.5 shadow-[0_0_35px_rgba(249,115,22,0.55)]",style:{background:"linear-gradient(145deg, #fbbf24, #f97316, #dc2626, #7f1d1d)"}},z={class:"w-full h-full rounded-full border-2 border-orange-300 relative overflow-hidden bg-[#1a0505]"},G=["d","fill"],L=["transform"],N={x:"150",y:"45","text-anchor":"middle",fill:"#fff7ed","font-size":"11","font-weight":"800",class:"wheel-slice-text font-sans"},T=["href"],V=["cx","cy","transform"],$={class:"absolute -top-3 left-1/2 -translate-x-1/2 z-20 pointer-events-none drop-shadow-[0_0_12px_#f97316]"},W=k({__name:"FireFlameWheel",props:{segments:{},targetSegmentIndex:{},spinning:{type:Boolean}},emits:["spin-finished"],setup(a,{emit:p}){const h=a,m=p,{wheelStyle:u,pointerStyle:x,getSlicePath:g,getTextRotation:_,pegs:y}=w(h,()=>m("spin-finished"),{radius:138,pegRadius:143}),n=["#7f1d1d","#b91c1c","#ea580c","#c2410c","#9a3412","#450a0a"];return(D,i)=>(s(),o("div",B,[e("div",C,[e("div",z,[(s(),o("svg",{class:"w-full h-full",style:d(l(u)),viewBox:"0 0 300 300"},[(s(!0),o(f,null,c(a.segments,(t,r)=>(s(),o("g",{key:t.id},[e("path",{d:l(g)(r),fill:t.color||n[r%n.length],stroke:"#fdba74","stroke-width":"1.2"},null,8,G),e("g",{transform:l(_)(r)},[e("text",N,v(l(b)(t.title)),1),t.image?(s(),o("image",{key:0,href:t.image,x:"138",y:"54",width:"24",height:"24"},null,8,T)):F("",!0)],8,L)]))),128)),(s(!0),o(f,null,c(l(y),(t,r)=>(s(),o("g",{key:r},[e("ellipse",{cx:t.x,cy:t.y,rx:"2.2",ry:"4.2",fill:"url(#flameTip)",transform:`rotate(${r*15} ${t.x} ${t.y})`},null,8,V)]))),128)),i[0]||(i[0]=S('🔥',4))],4))])]),e("div",$,[e("div",{style:d(l(x)),class:"w-9 h-[44px] origin-[50%_12px] will-change-transform"},[...i[1]||(i[1]=[e("svg",{width:"36",height:"44",viewBox:"0 0 36 44",fill:"none"},[e("path",{d:"M18 44L5 14C3 9 7 3 12 3H24C29 3 33 9 31 14L18 44Z",fill:"#f97316",stroke:"#fef08a","stroke-width":"1.5"}),e("circle",{cx:"18",cy:"12",r:"4.5",fill:"#dc2626",stroke:"#fef08a","stroke-width":"1.2"})],-1)])],4)])]))}});export{W as default}; diff --git a/apps/client/dist/assets/wheel-galaxyspacewheel-CO8tbi9S.js b/apps/client/dist/assets/wheel-galaxyspacewheel-CO8tbi9S.js new file mode 100644 index 0000000..916da20 --- /dev/null +++ b/apps/client/dist/assets/wheel-galaxyspacewheel-CO8tbi9S.js @@ -0,0 +1 @@ +import{u as v,t as S}from"./wheel-classiccasinowheel-DHnlMe5J.js";import{d as B,a as o,b as n,e as t,n as u,u as r,F as i,f as a,t as F,g as z,c as C}from"./vendor-vue-kYoPQr5S.js";const M={class:"relative w-full max-w-[340px] xs:max-w-[380px] sm:max-w-[420px] aspect-square mx-auto select-none"},L={class:"absolute inset-0 rounded-full p-2.5 shadow-[0_0_40px_rgba(99,102,241,0.45)]",style:{background:"linear-gradient(135deg, #6366f1, #a855f7, #0ea5e9)"}},P={class:"w-full h-full rounded-full border border-indigo-300/40 relative overflow-hidden bg-[#050816]"},D=["cx","cy","r"],I=["d","fill"],N=["transform"],R={x:"150",y:"45","text-anchor":"middle",fill:"#eef2ff","font-size":"11","font-weight":"700",class:"wheel-slice-text font-sans"},V=["href"],W=["cx","cy"],q=["cx","cy"],A={class:"absolute -top-3 left-1/2 -translate-x-1/2 z-20 pointer-events-none drop-shadow-[0_0_10px_#a78bfa]"},H=B({__name:"GalaxySpaceWheel",props:{segments:{},targetSegmentIndex:{},spinning:{type:Boolean}},emits:["spin-finished"],setup(c,{emit:h}){const x=c,m=h,{wheelStyle:y,pointerStyle:p,getSlicePath:g,getTextRotation:_,pegs:w}=v(x,()=>m("spin-finished"),{radius:138,pegRadius:143}),d=["#1e1b4b","#312e81","#4c1d95","#0f172a","#1e3a8a","#581c87"],k=C(()=>Array.from({length:28},(b,s)=>{const e=s*47%360,l=40+s*13%90,f=(e-90)*Math.PI/180;return{x:150+l*Math.cos(f),y:150+l*Math.sin(f),s:.6+s%3*.4}}));return(b,s)=>(o(),n("div",M,[t("div",L,[t("div",P,[(o(),n("svg",{class:"w-full h-full",style:u(r(y)),viewBox:"0 0 300 300"},[(o(!0),n(i,null,a(k.value,(e,l)=>(o(),n("circle",{key:"st"+l,cx:e.x,cy:e.y,r:e.s,fill:"#e0e7ff",opacity:"0.7"},null,8,D))),128)),(o(!0),n(i,null,a(c.segments,(e,l)=>(o(),n("g",{key:e.id},[t("path",{d:r(g)(l),fill:e.color||d[l%d.length],stroke:"#a5b4fc","stroke-width":"1","stroke-opacity":"0.6"},null,8,I),t("g",{transform:r(_)(l)},[t("text",R,F(r(S)(e.title)),1),e.image?(o(),n("image",{key:0,href:e.image,x:"138",y:"54",width:"24",height:"24"},null,8,V)):z("",!0)],8,N)]))),128)),(o(!0),n(i,null,a(r(w),(e,l)=>(o(),n("g",{key:l},[t("circle",{cx:e.x,cy:e.y,r:"3",fill:"#0f172a",stroke:"#c4b5fd","stroke-width":"1"},null,8,W),t("circle",{cx:e.x,cy:e.y,r:"1.4",fill:"#a78bfa"},null,8,q)]))),128)),s[0]||(s[0]=t("circle",{cx:"150",cy:"150",r:"30",fill:"#0b1026",stroke:"#818cf8","stroke-width":"2"},null,-1)),s[1]||(s[1]=t("circle",{cx:"150",cy:"150",r:"18",fill:"#312e81",stroke:"#e879f9","stroke-width":"1.5"},null,-1)),s[2]||(s[2]=t("text",{x:"150",y:"156","text-anchor":"middle","font-size":"14"},"🌌",-1))],4))])]),t("div",A,[t("div",{style:u(r(p)),class:"w-8 h-[42px] origin-[50%_10px] will-change-transform"},[...s[3]||(s[3]=[t("svg",{width:"32",height:"42",viewBox:"0 0 32 42",fill:"none"},[t("path",{d:"M16 42L4 12C2 7 6 2 11 2H21C26 2 30 7 28 12L16 42Z",fill:"#a78bfa",stroke:"#fff","stroke-width":"1.4"}),t("circle",{cx:"16",cy:"10",r:"4",fill:"#e879f9"})],-1)])],4)])]))}});export{H as default}; diff --git a/apps/client/dist/assets/wheel-luxurygoldwheel-B7W8x-n_.js b/apps/client/dist/assets/wheel-luxurygoldwheel-B7W8x-n_.js new file mode 100644 index 0000000..ed74420 --- /dev/null +++ b/apps/client/dist/assets/wheel-luxurygoldwheel-B7W8x-n_.js @@ -0,0 +1 @@ +import{u as _,t as k}from"./wheel-classiccasinowheel-DHnlMe5J.js";import{d as b,a as o,b as s,e,n as a,u as r,F as c,f as n,t as v,g as G,h as d}from"./vendor-vue-kYoPQr5S.js";const P={class:"relative w-full max-w-[340px] xs:max-w-[380px] sm:max-w-[420px] aspect-square mx-auto select-none"},S={class:"absolute inset-0 rounded-full p-3 shadow-[0_15px_40px_rgba(0,0,0,0.8)]",style:{background:"linear-gradient(135deg, #d4af37 0%, #f3e5ab 25%, #aa7c11 50%, #fdf6c7 75%, #8a6408 100%)"}},B={class:"w-full h-full rounded-full border-2 border-amber-200/60 relative overflow-hidden bg-gradient-to-b from-stone-900 to-black"},C=["d","fill"],L=["transform"],z={x:"150",y:"45","text-anchor":"middle",fill:"#fdf6c7","font-size":"11","font-weight":"700",class:"wheel-slice-text font-sans tracking-wider"},D=["href"],F=["cx","cy"],V=["cx","cy"],N=["cx","cy"],H={class:"absolute -top-3.5 left-1/2 -translate-x-1/2 z-20 pointer-events-none drop-shadow-[0_4px_10px_rgba(212,175,55,0.6)]"},W=b({__name:"LuxuryGoldWheel",props:{segments:{},targetSegmentIndex:{},spinning:{type:Boolean}},emits:["spin-finished"],setup(f,{emit:p}){const u=f,x=p,{wheelStyle:h,pointerStyle:y,getSlicePath:m,getTextRotation:g,pegs:w}=_(u,()=>x("spin-finished"),{radius:138,pegRadius:143});return(I,i)=>(o(),s("div",P,[e("div",S,[e("div",B,[(o(),s("svg",{class:"w-full h-full",style:a(r(h)),viewBox:"0 0 300 300"},[(o(!0),s(c,null,n(f.segments,(t,l)=>(o(),s("g",{key:t.id},[e("path",{d:r(m)(l),fill:t.color||(l%2===0?"#1c1917":"#0c0a09"),stroke:"#d4af37","stroke-width":"1.5"},null,8,C),e("g",{transform:r(g)(l)},[e("text",z,v(r(k)(t.title)),1),t.image?(o(),s("image",{key:0,href:t.image,x:"138",y:"54",width:"24",height:"24"},null,8,D)):G("",!0)],8,L)]))),128)),(o(!0),s(c,null,n(r(w),(t,l)=>(o(),s("g",{key:l},[e("circle",{cx:t.x,cy:t.y,r:"4.2",fill:"#1c1917",stroke:"#aa7c11","stroke-width":"0.7"},null,8,F),e("circle",{cx:t.x,cy:t.y,r:"3.3",fill:"url(#luxuryPeg3D)",stroke:"#fdf6c7","stroke-width":"0.5"},null,8,V),e("circle",{cx:t.x-.9,cy:t.y-1,r:"0.8",fill:"#ffffff",opacity:"0.85"},null,8,N)]))),128)),i[0]||(i[0]=d('VIP',4))],4))])]),e("div",H,[e("div",{style:a(r(y)),class:"w-9 h-[46px] origin-[50%_12px] will-change-transform"},[...i[1]||(i[1]=[d('',1)])],4)])]))}});export{W as default}; diff --git a/apps/client/dist/assets/wheel-minimalflatwheel-B0XcCliG.js b/apps/client/dist/assets/wheel-minimalflatwheel-B0XcCliG.js new file mode 100644 index 0000000..851d4ef --- /dev/null +++ b/apps/client/dist/assets/wheel-minimalflatwheel-B0XcCliG.js @@ -0,0 +1 @@ +import{u as y,t as _}from"./wheel-classiccasinowheel-DHnlMe5J.js";import{d as v,a as s,b as l,e,n as a,u as i,F as f,f as d,t as b,g as k}from"./vendor-vue-kYoPQr5S.js";const B={class:"relative w-full max-w-[340px] xs:max-w-[380px] sm:max-w-[420px] aspect-square mx-auto select-none"},S={class:"absolute inset-0 rounded-full p-2 bg-slate-800/80 backdrop-blur border border-slate-700 shadow-2xl"},F={class:"w-full h-full rounded-full relative overflow-hidden bg-slate-900"},C=["d","fill"],z=["transform"],L={x:"150",y:"45","text-anchor":"middle",fill:"#ffffff","font-size":"11","font-weight":"600",class:"wheel-slice-text tracking-normal font-sans"},P=["href"],D=["cx","cy"],M={class:"absolute -top-2.5 left-1/2 -translate-x-1/2 z-20 pointer-events-none drop-shadow-md"},W=v({__name:"MinimalFlatWheel",props:{segments:{},targetSegmentIndex:{},spinning:{type:Boolean}},emits:["spin-finished"],setup(r,{emit:c}){const m=r,u=c,{wheelStyle:h,pointerStyle:p,getSlicePath:x,getTextRotation:g,pegs:w}=y(m,()=>u("spin-finished"),{radius:142,pegRadius:144});return(N,o)=>(s(),l("div",B,[e("div",S,[e("div",F,[(s(),l("svg",{class:"w-full h-full",style:a(i(h)),viewBox:"0 0 300 300"},[(s(!0),l(f,null,d(r.segments,(t,n)=>(s(),l("g",{key:t.id},[e("path",{d:i(x)(n),fill:t.color||(n%2===0?"#3b82f6":"#6366f1"),stroke:"#ffffff","stroke-width":"1"},null,8,C),e("g",{transform:i(g)(n)},[e("text",L,b(i(_)(t.title)),1),t.image?(s(),l("image",{key:0,href:t.image,x:"138",y:"54",width:"24",height:"24"},null,8,P)):k("",!0)],8,z)]))),128)),(s(!0),l(f,null,d(i(w),(t,n)=>(s(),l("circle",{key:n,cx:t.x,cy:t.y,r:"2",fill:"#ffffff",opacity:"0.8"},null,8,D))),128)),o[0]||(o[0]=e("circle",{cx:"150",cy:"150",r:"28",fill:"#ffffff",filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.2))"},null,-1)),o[1]||(o[1]=e("circle",{cx:"150",cy:"150",r:"14",fill:"#0f172a"},null,-1))],4))])]),e("div",M,[e("div",{style:a(i(p)),class:"w-7 h-[34px] origin-[50%_6px] will-change-transform"},[...o[2]||(o[2]=[e("svg",{width:"28",height:"34",viewBox:"0 0 28 34",fill:"none",class:"overflow-visible"},[e("path",{d:"M14 34L2 6C0.5 3 2.5 0 6 0H22C25.5 0 27.5 3 26 6L14 34Z",fill:"#3b82f6",stroke:"#ffffff","stroke-width":"2"})],-1)])],4)])]))}});export{W as default}; diff --git a/apps/client/dist/assets/wheel-neoncyberwheel-DfkNbyES.js b/apps/client/dist/assets/wheel-neoncyberwheel-DfkNbyES.js new file mode 100644 index 0000000..62a17a8 --- /dev/null +++ b/apps/client/dist/assets/wheel-neoncyberwheel-DfkNbyES.js @@ -0,0 +1 @@ +import{u as w,t as _}from"./wheel-classiccasinowheel-DHnlMe5J.js";import{d as k,a as l,b as i,e,n as f,u as o,F as a,f as c,t as b,g as v}from"./vendor-vue-kYoPQr5S.js";const B={class:"relative w-full max-w-[340px] xs:max-w-[380px] sm:max-w-[420px] aspect-square mx-auto select-none"},S={class:"absolute inset-0 rounded-full p-2 bg-gradient-to-tr from-cyan-500 via-fuchsia-600 to-blue-600 shadow-[0_0_30px_rgba(0,240,255,0.4)] animate-neon-pulse"},C={class:"w-full h-full rounded-full border-2 border-cyan-400 relative overflow-hidden bg-[#070913]"},F=["d","fill"],z=["transform"],L={x:"150",y:"45","text-anchor":"middle",fill:"#ffffff","font-size":"11","font-weight":"800",class:"wheel-slice-text tracking-wide uppercase font-sans"},N=["href"],P=["cx","cy"],D=["cx","cy"],R={class:"absolute -top-3 left-1/2 -translate-x-1/2 z-20 pointer-events-none drop-shadow-[0_0_12px_#00f0ff]"},E=k({__name:"NeonCyberWheel",props:{segments:{},targetSegmentIndex:{},spinning:{type:Boolean}},emits:["spin-finished"],setup(n,{emit:d}){const u=n,p=d,{wheelStyle:m,pointerStyle:x,getSlicePath:h,getTextRotation:y,pegs:g}=w(u,()=>p("spin-finished"),{radius:138,pegRadius:143});return(V,t)=>(l(),i("div",B,[e("div",S,[e("div",C,[(l(),i("svg",{class:"w-full h-full",style:f(o(m)),viewBox:"0 0 300 300"},[(l(!0),i(a,null,c(n.segments,(s,r)=>(l(),i("g",{key:s.id},[e("path",{d:o(h)(r),fill:s.color||(r%2===0?"#111827":"#1e1b4b"),stroke:"#00f0ff","stroke-width":"1.5","stroke-opacity":"0.8"},null,8,F),e("g",{transform:o(y)(r)},[e("text",L,b(o(_)(s.title)),1),s.image?(l(),i("image",{key:0,href:s.image,x:"138",y:"54",width:"24",height:"24"},null,8,N)):v("",!0)],8,z)]))),128)),(l(!0),i(a,null,c(o(g),(s,r)=>(l(),i("g",{key:r},[e("circle",{cx:s.x,cy:s.y,r:"3.2",fill:"#05070e",stroke:"#00f0ff","stroke-width":"1"},null,8,P),e("circle",{cx:s.x,cy:s.y,r:"1.5",fill:"#00f0ff"},null,8,D)]))),128)),t[0]||(t[0]=e("circle",{cx:"150",cy:"150",r:"32",fill:"#05070e",stroke:"#00f0ff","stroke-width":"2"},null,-1)),t[1]||(t[1]=e("circle",{cx:"150",cy:"150",r:"22",fill:"#1e1b4b",stroke:"#ec4899","stroke-width":"2"},null,-1)),t[2]||(t[2]=e("circle",{cx:"150",cy:"150",r:"10",fill:"#00f0ff",class:"animate-ping",opacity:"0.3"},null,-1)),t[3]||(t[3]=e("circle",{cx:"150",cy:"150",r:"8",fill:"#00f0ff"},null,-1))],4))])]),e("div",R,[e("div",{style:f(o(x)),class:"w-[34px] h-[42px] origin-[50%_10px] will-change-transform"},[...t[4]||(t[4]=[e("svg",{width:"34",height:"42",viewBox:"0 0 34 42",fill:"none",class:"overflow-visible"},[e("path",{d:"M17 42L4 12C2 7 6 2 11 2H23C28 2 32 7 30 12L17 42Z",fill:"#00f0ff",stroke:"#ffffff","stroke-width":"1.5"}),e("circle",{cx:"17",cy:"10",r:"4",fill:"#ff007f"})],-1)])],4)])]))}});export{E as default}; diff --git a/apps/client/dist/assets/wheel-playfulcartoonwheel-D5oxWUgO.js b/apps/client/dist/assets/wheel-playfulcartoonwheel-D5oxWUgO.js new file mode 100644 index 0000000..6de6a83 --- /dev/null +++ b/apps/client/dist/assets/wheel-playfulcartoonwheel-D5oxWUgO.js @@ -0,0 +1 @@ +import{u as k,t as v}from"./wheel-classiccasinowheel-DHnlMe5J.js";import{d as B,a as l,b as o,e,n as c,u as i,F as d,f as h,t as C,g as S,c as P}from"./vendor-vue-kYoPQr5S.js";const z={class:"relative w-full max-w-[340px] xs:max-w-[380px] sm:max-w-[420px] aspect-square mx-auto select-none"},F={class:"absolute inset-0 rounded-full p-3.5 bg-amber-400 border-4 border-amber-600 shadow-[0_12px_0_#b45309,0_20px_25px_rgba(0,0,0,0.5)]"},L={class:"w-full h-full rounded-full border-4 border-white relative overflow-hidden bg-amber-50"},D=["d","fill"],N=["transform"],R={x:"150",y:"45","text-anchor":"middle",fill:"#ffffff","font-size":"12","font-weight":"900",class:"wheel-slice-text font-sans tracking-wide",style:{"paint-order":"stroke fill",stroke:"rgba(0,0,0,0.3)","stroke-width":"2px"}},V=["href"],W=["cx","cy"],q=["cx","cy","fill"],E=["cx","cy"],H={class:"absolute -top-4 left-1/2 -translate-x-1/2 z-20 pointer-events-none drop-shadow-[0_6px_0_#991b1b]"},T=B({__name:"PlayfulCartoonWheel",props:{segments:{},targetSegmentIndex:{},spinning:{type:Boolean}},emits:["spin-finished"],setup(n,{emit:x}){const u=n,m=x,{wheelStyle:p,pointerStyle:w,getSlicePath:y,getTextRotation:_,makePegs:b}=k(u,()=>m("spin-finished"),{radius:138,pegRadius:142}),f=["#f43f5e","#8b5cf6","#06b6d4","#10b981","#f59e0b","#ec4899"],g=P(()=>b(24,142).map((a,s)=>({...a,color:f[s%f.length]})));return(a,s)=>(l(),o("div",z,[e("div",F,[e("div",L,[(l(),o("svg",{class:"w-full h-full",style:c(i(p)),viewBox:"0 0 300 300"},[(l(!0),o(d,null,h(n.segments,(t,r)=>(l(),o("g",{key:t.id},[e("path",{d:i(y)(r),fill:t.color||f[r%f.length],stroke:"#ffffff","stroke-width":"3"},null,8,D),e("g",{transform:i(_)(r)},[e("text",R,C(i(v)(t.title)),1),t.image?(l(),o("image",{key:0,href:t.image,x:"138",y:"54",width:"24",height:"24"},null,8,V)):S("",!0)],8,N)]))),128)),(l(!0),o(d,null,h(g.value,(t,r)=>(l(),o("g",{key:r},[e("circle",{cx:t.x,cy:t.y,r:"4",fill:"#ffffff",stroke:"#b45309","stroke-width":"1.5"},null,8,W),e("circle",{cx:t.x,cy:t.y,r:"2.8",fill:t.color},null,8,q),e("circle",{cx:t.x-.8,cy:t.y-.8,r:"0.8",fill:"#ffffff"},null,8,E)]))),128)),s[0]||(s[0]=e("circle",{cx:"150",cy:"150",r:"32",fill:"#ef4444",stroke:"#ffffff","stroke-width":"4"},null,-1)),s[1]||(s[1]=e("circle",{cx:"150",cy:"150",r:"22",fill:"#facc15",stroke:"#b45309","stroke-width":"2"},null,-1)),s[2]||(s[2]=e("text",{x:"150",y:"157","text-anchor":"middle","font-size":"20"},"✨",-1))],4))])]),e("div",H,[e("div",{style:c(i(w)),class:"w-[42px] h-[50px] origin-[50%_14px] will-change-transform"},[...s[3]||(s[3]=[e("svg",{width:"42",height:"50",viewBox:"0 0 42 50",fill:"none",class:"overflow-visible"},[e("path",{d:"M21 50L6 16C4 11 8 4 14 4H28C34 4 38 11 36 16L21 50Z",fill:"#ef4444",stroke:"#ffffff","stroke-width":"3"}),e("circle",{cx:"21",cy:"14",r:"6",fill:"#facc15",stroke:"#ffffff","stroke-width":"2"})],-1)])],4)])]))}});export{T as default}; diff --git a/apps/client/dist/assets/wheel-rusticwoodwheel-B1GPATiK.js b/apps/client/dist/assets/wheel-rusticwoodwheel-B1GPATiK.js new file mode 100644 index 0000000..fc67402 --- /dev/null +++ b/apps/client/dist/assets/wheel-rusticwoodwheel-B1GPATiK.js @@ -0,0 +1 @@ +import{u as g,t as _}from"./wheel-classiccasinowheel-DHnlMe5J.js";import{d as b,a as s,b as l,e,n as c,u as i,F as d,f,t as v,g as B,h as S}from"./vendor-vue-kYoPQr5S.js";const C={class:"relative w-full max-w-[340px] xs:max-w-[380px] sm:max-w-[420px] aspect-square mx-auto select-none"},F={class:"absolute inset-0 rounded-full p-3 shadow-[0_12px_30px_rgba(60,30,10,0.55)]",style:{background:"linear-gradient(145deg, #c9a36a 0%, #6b3f1e 40%, #3e2412 100%)"}},z={class:"w-full h-full rounded-full border-[3px] border-[#c9a36a] relative overflow-hidden",style:{background:"radial-gradient(circle at 40% 35%, #5c3a1e 0%, #2a160c 70%)"}},A=["d","fill"],D=["transform"],G={x:"150",y:"45","text-anchor":"middle",fill:"#fff8e7","font-size":"11","font-weight":"700",class:"wheel-slice-text font-sans"},H=["href"],L=["cx","cy"],N=["cx","cy"],R=["x1","y1","x2","y2"],V={class:"absolute -top-3 left-1/2 -translate-x-1/2 z-20 pointer-events-none drop-shadow-lg"},E=b({__name:"RusticWoodWheel",props:{segments:{},targetSegmentIndex:{},spinning:{type:Boolean}},emits:["spin-finished"],setup(a,{emit:x}){const u=a,h=x,{wheelStyle:p,pointerStyle:y,getSlicePath:m,getTextRotation:w,pegs:k}=g(u,()=>h("spin-finished"),{radius:138,pegRadius:143}),n=["#8B5A2B","#A0522D","#6B4226","#C4A484","#8B5A2B","#5D4037"];return(W,o)=>(s(),l("div",C,[e("div",F,[e("div",z,[(s(),l("svg",{class:"w-full h-full",style:c(i(p)),viewBox:"0 0 300 300"},[o[0]||(o[0]=e("circle",{cx:"150",cy:"150",r:"136",fill:"none",stroke:"#4a2c14","stroke-width":"8",opacity:"0.35"},null,-1)),o[1]||(o[1]=e("circle",{cx:"150",cy:"150",r:"120",fill:"none",stroke:"#7a4a22","stroke-width":"2",opacity:"0.25"},null,-1)),(s(!0),l(d,null,f(a.segments,(t,r)=>(s(),l("g",{key:t.id},[e("path",{d:i(m)(r),fill:t.color||n[r%n.length],stroke:"#3e2723","stroke-width":"1.5"},null,8,A),e("g",{transform:i(w)(r)},[e("text",G,v(i(_)(t.title)),1),t.image?(s(),l("image",{key:0,href:t.image,x:"138",y:"54",width:"24",height:"24"},null,8,H)):B("",!0)],8,D)]))),128)),(s(!0),l(d,null,f(i(k),(t,r)=>(s(),l("g",{key:r},[e("circle",{cx:t.x,cy:t.y,r:"4",fill:"#2c1810",stroke:"#8d6e63","stroke-width":"0.8"},null,8,L),e("circle",{cx:t.x,cy:t.y,r:"2.6",fill:"url(#woodBolt)"},null,8,N),e("line",{x1:t.x-1.6,y1:t.y,x2:t.x+1.6,y2:t.y,stroke:"#5d4037","stroke-width":"0.7"},null,8,R)]))),128)),o[2]||(o[2]=S('🪵',4))],4))])]),e("div",V,[e("div",{style:c(i(y)),class:"w-9 h-[44px] origin-[50%_12px] will-change-transform"},[...o[3]||(o[3]=[e("svg",{width:"36",height:"44",viewBox:"0 0 36 44",fill:"none"},[e("path",{d:"M18 44L5 14C3 9 7 3 12 3H24C29 3 33 9 31 14L18 44Z",fill:"#8d6e63",stroke:"#efebe9","stroke-width":"1.5"}),e("circle",{cx:"18",cy:"12",r:"4.5",fill:"#5d4037",stroke:"#d7ccc8","stroke-width":"1.2"})],-1)])],4)])]))}});export{E as default}; diff --git a/apps/client/dist/index.html b/apps/client/dist/index.html new file mode 100644 index 0000000..057b99b --- /dev/null +++ b/apps/client/dist/index.html @@ -0,0 +1,19 @@ + + + + + + + گردونه شانس و قرعه‌کشی + + + + + + + + + +
+ + diff --git a/apps/client/nginx.conf b/apps/client/nginx.conf index a9ad253..b775ea3 100644 --- a/apps/client/nginx.conf +++ b/apps/client/nginx.conf @@ -1,9 +1,18 @@ server { listen 80; - server_name localhost; + server_name _; + + root /usr/share/nginx/html; + index index.html; + + # Docker's embedded DNS. Without re-resolving at request time, nginx caches the + # api container's IP from startup and keeps returning 502 ("no live upstreams") + # after the api container restarts with a new IP. + resolver 127.0.0.11 valid=10s ipv6=off; location /api/ { - proxy_pass http://api:3000/api/; + set $api_upstream http://luckywheel-api:3000; + proxy_pass $api_upstream$request_uri; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; @@ -15,7 +24,8 @@ server { } location /uploads/ { - proxy_pass http://api:3000/uploads/; + set $api_upstream http://luckywheel-api:3000; + proxy_pass $api_upstream$request_uri; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -23,8 +33,12 @@ server { } location / { - root /usr/share/nginx/html; - index index.html index.htm; try_files $uri $uri/ /index.html; } + + location ~* \.(?:ico|css|js|gif|jpe?g|png|woff2?|eot|ttf|svg)$ { + expires 6M; + access_log off; + add_header Cache-Control "public"; + } } diff --git a/docker-compose.yml b/docker-compose.yml index 9e11c30..d97cd8b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,78 +1,102 @@ +version: '3.8' + services: postgres: - image: postgres:15-alpine + image: docker.arvancloud.ir/postgres:15-alpine container_name: lucky_wheel_postgres - restart: unless-stopped environment: - POSTGRES_DB: lucky_wheel - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgrespassword + POSTGRES_USER: ${POSTGRES_USER:-postgres} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgrespassword} + POSTGRES_DB: ${POSTGRES_DB:-lucky_wheel} ports: - - "5432:5432" + - "${EXTERNAL_DB_PORT:-5432}:5432" volumes: - pg_data:/var/lib/postgresql/data + restart: unless-stopped healthcheck: - test: [ "CMD-SHELL", "pg_isready -U postgres -d lucky_wheel" ] + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-lucky_wheel}"] interval: 5s timeout: 5s - retries: 5 + retries: 12 redis: - image: redis:7-alpine + image: docker.arvancloud.ir/redis:7-alpine container_name: lucky_wheel_redis restart: unless-stopped - ports: - - "6380:6379" volumes: - redis_data:/data healthcheck: - test: [ "CMD", "redis-cli", "ping" ] + test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 5 api: build: - context: . - dockerfile: apps/api/Dockerfile + context: ./apps/api + dockerfile: Dockerfile container_name: lucky_wheel_api - restart: unless-stopped - ports: - - "3001:3000" - environment: - - DATABASE_URL=postgresql://postgres:postgrespassword@postgres:5432/lucky_wheel?schema=public - - REDIS_HOST=redis - - REDIS_PORT=6379 - - NODE_ENV=production + # Prisma connects on module init, so a not-yet-ready DB crash-loops the API. depends_on: postgres: condition: service_healthy redis: condition: service_healthy + environment: + - DATABASE_URL=${DATABASE_URL:-postgresql://postgres:postgrespassword@postgres:5432/lucky_wheel?schema=public} + - PORT=${PORT:-3000} + - NODE_ENV=production + - REDIS_HOST=redis + - REDIS_PORT=6379 + - REDIS_PASSWORD=${REDIS_PASSWORD:-} + - JWT_USER_SECRET=${JWT_USER_SECRET:-lucky_wheel_user_jwt_super_secret_key_2026!} + - JWT_USER_EXPIRES_IN=${JWT_USER_EXPIRES_IN:-7d} + - JWT_ADMIN_ACCESS_SECRET=${JWT_ADMIN_ACCESS_SECRET:-lucky_wheel_admin_access_jwt_super_secret_key_2026!} + - JWT_ADMIN_ACCESS_EXPIRES_IN=${JWT_ADMIN_ACCESS_EXPIRES_IN:-1h} + - JWT_ADMIN_REFRESH_SECRET=${JWT_ADMIN_REFRESH_SECRET:-lucky_wheel_admin_refresh_jwt_super_secret_key_2026!} + - JWT_ADMIN_REFRESH_EXPIRES_IN=${JWT_ADMIN_REFRESH_EXPIRES_IN:-7d} + - CORS_ADMIN_ORIGIN=${CORS_ADMIN_ORIGIN:-http://localhost:5173} + - CORS_CLIENT_ORIGIN=${CORS_CLIENT_ORIGIN:-http://localhost:5174} + - STORAGE_DRIVER=${STORAGE_DRIVER:-local} + - STORAGE_LOCAL_ROOT=${STORAGE_LOCAL_ROOT:-./uploads} + - STORAGE_PUBLIC_URL=${STORAGE_PUBLIC_URL:-} + - SMS_DRIVER=${SMS_DRIVER:-mock} + - RAYGAN_SMS_USERNAME=${RAYGAN_SMS_USERNAME:-} + - RAYGAN_SMS_PASSWORD=${RAYGAN_SMS_PASSWORD:-} + - RAYGAN_SMS_LINE_NUMBER=${RAYGAN_SMS_LINE_NUMBER:-} + - RAYGAN_SMS_API_BASE_URL=${RAYGAN_SMS_API_BASE_URL:-https://api.raygansms.com} + # No host ports — Dokploy/Traefik routes by domain to container port 3000 + expose: + - "3000" + restart: unless-stopped + # The bare name "api" is ambiguous on Dokploy's shared network (other stacks + # register it too), which made nginx dial the wrong containers. Use a unique alias. + networks: + default: + aliases: + - luckywheel-api admin: build: - context: . - dockerfile: apps/admin/Dockerfile - args: - VITE_CLIENT_PUBLIC_URL: ${VITE_CLIENT_PUBLIC_URL:-} + context: ./apps/admin + dockerfile: Dockerfile container_name: lucky_wheel_admin + # No host ports — Dokploy/Traefik routes by domain to container port 80 + expose: + - "80" restart: unless-stopped - ports: - - "5173:80" - - "8080:80" depends_on: - api client: build: - context: . - dockerfile: apps/client/Dockerfile + context: ./apps/client + dockerfile: Dockerfile container_name: lucky_wheel_client + # No host ports — Dokploy/Traefik routes by domain to container port 80 + expose: + - "80" restart: unless-stopped - ports: - - "5174:80" - - "80:80" depends_on: - api diff --git a/package.json b/package.json index ff356ef..1d55d16 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "build:admin": "pnpm --filter @lucky-wheel/admin build", "build:client": "pnpm --filter @lucky-wheel/client build", "build": "pnpm run build:types && pnpm --filter @lucky-wheel/api build && pnpm --filter @lucky-wheel/admin build && pnpm --filter @lucky-wheel/client build", + "build:release": "pnpm run build:types && pnpm --filter @lucky-wheel/api build:release && pnpm --filter @lucky-wheel/admin build && pnpm --filter @lucky-wheel/client build", "test:api": "pnpm --filter @lucky-wheel/api test", "docker:up": "docker-compose up -d", "docker:down": "docker-compose down" @@ -27,7 +28,6 @@ "@nestjs/core", "@prisma/client", "@prisma/engines", - "bcrypt", "core-js", "esbuild", "msgpackr-extract", diff --git a/packages/shared-types/dist/farsi-number.d.ts b/packages/shared-types/dist/farsi-number.d.ts new file mode 100644 index 0000000..113fc49 --- /dev/null +++ b/packages/shared-types/dist/farsi-number.d.ts @@ -0,0 +1,13 @@ +export declare function toFarsiDigits(val: number | string | null | undefined | any): string; +/** + * قالب‌بندی اعداد با جداکننده هزارگان و ارقام فارسی + */ +export declare function formatFarsiNumber(val: number | string | null | undefined | any): string; +/** + * تبدیل ارقام فارسی (۰-۹) و عربی (٠-٩) به ارقام استاندارد انگلیسی (0-9) + */ +export declare function toEnglishDigits(val: number | string | null | undefined): string; +/** + * پارس مطمئن مقادیر عددی از ورودی‌ها (پشتیبانی از هر دو فرمت فارسی و انگلیسی) + */ +export declare function parseFarsiNumber(val: number | string | null | undefined, fallback?: number): number; diff --git a/packages/shared-types/dist/farsi-number.js b/packages/shared-types/dist/farsi-number.js new file mode 100644 index 0000000..80f9f6d --- /dev/null +++ b/packages/shared-types/dist/farsi-number.js @@ -0,0 +1,66 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toFarsiDigits = toFarsiDigits; +exports.formatFarsiNumber = formatFarsiNumber; +exports.toEnglishDigits = toEnglishDigits; +exports.parseFarsiNumber = parseFarsiNumber; +/** + * تبدیل تمامی ارقام انگلیسی (0-9) و عربی (٠-٩) به ارقام استاندارد فارسی (۰-۹) + */ +const FARSI_DIGITS = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹']; +function toFarsiDigits(val) { + if (val === null || val === undefined) + return ''; + if (typeof val === 'object' && val !== null && 'value' in val) { + val = val.value; + if (val === null || val === undefined) + return ''; + } + if (typeof val === 'object') + return ''; + return String(val) + .replace(/[0-9]/g, (d) => FARSI_DIGITS[+d]) + .replace(/[٠-٩]/g, (d) => FARSI_DIGITS[d.charCodeAt(0) - 1632]); +} +/** + * قالب‌بندی اعداد با جداکننده هزارگان و ارقام فارسی + */ +function formatFarsiNumber(val) { + if (val === null || val === undefined || val === '') + return ''; + if (typeof val === 'object' && val !== null && 'value' in val) { + val = val.value; + if (val === null || val === undefined || val === '') + return ''; + } + if (typeof val === 'object') + return ''; + const num = typeof val === 'string' ? parseFloat(toEnglishDigits(val)) : val; + if (isNaN(num)) + return toFarsiDigits(val); + const formatted = new Intl.NumberFormat('fa-IR').format(num); + return toFarsiDigits(formatted); +} +/** + * تبدیل ارقام فارسی (۰-۹) و عربی (٠-٩) به ارقام استاندارد انگلیسی (0-9) + */ +function toEnglishDigits(val) { + if (val === null || val === undefined) + return ''; + return String(val) + .replace(/[۰-۹]/g, (d) => String(d.charCodeAt(0) - 1776)) + .replace(/[٠-٩]/g, (d) => String(d.charCodeAt(0) - 1632)); +} +/** + * پارس مطمئن مقادیر عددی از ورودی‌ها (پشتیبانی از هر دو فرمت فارسی و انگلیسی) + */ +function parseFarsiNumber(val, fallback = 0) { + if (val === null || val === undefined || val === '') + return fallback; + if (typeof val === 'number') + return isNaN(val) ? fallback : val; + const enStr = toEnglishDigits(val).replace(/[^0-9.-]/g, ''); + const parsed = Number(enStr); + return isNaN(parsed) ? fallback : parsed; +} +//# sourceMappingURL=farsi-number.js.map \ No newline at end of file diff --git a/packages/shared-types/dist/farsi-number.js.map b/packages/shared-types/dist/farsi-number.js.map new file mode 100644 index 0000000..df3fd0c --- /dev/null +++ b/packages/shared-types/dist/farsi-number.js.map @@ -0,0 +1 @@ +{"version":3,"file":"farsi-number.js","sourceRoot":"","sources":["../src/farsi-number.ts"],"names":[],"mappings":";;AAKA,sCAUC;AAKD,8CAWC;AAKD,0CAKC;AAKD,4CAMC;AApDD;;GAEG;AACH,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAExE,SAAgB,aAAa,CAAC,GAA6C;IACzE,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACjD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,IAAI,GAAG,EAAE,CAAC;QAC9D,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC;QAChB,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS;YAAE,OAAO,EAAE,CAAC;IACnD,CAAC;IACD,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,EAAE,CAAC;IACvC,OAAO,MAAM,CAAC,GAAG,CAAC;SACf,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;SAC1C,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;AACpE,CAAC;AAED;;GAEG;AACH,SAAgB,iBAAiB,CAAC,GAA6C;IAC7E,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,EAAE;QAAE,OAAO,EAAE,CAAC;IAC/D,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,IAAI,GAAG,EAAE,CAAC;QAC9D,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC;QAChB,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,EAAE;YAAE,OAAO,EAAE,CAAC;IACjE,CAAC;IACD,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,EAAE,CAAC;IACvC,MAAM,GAAG,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAC7E,IAAI,KAAK,CAAC,GAAG,CAAC;QAAE,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC;IAC1C,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC7D,OAAO,aAAa,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED;;GAEG;AACH,SAAgB,eAAe,CAAC,GAAuC;IACrE,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACjD,OAAO,MAAM,CAAC,GAAG,CAAC;SACf,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;SACxD,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;AAC9D,CAAC;AAED;;GAEG;AACH,SAAgB,gBAAgB,CAAC,GAAuC,EAAE,WAAmB,CAAC;IAC5F,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,EAAE;QAAE,OAAO,QAAQ,CAAC;IACrE,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;IAChE,MAAM,KAAK,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAC5D,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7B,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;AAC3C,CAAC"} \ No newline at end of file diff --git a/packages/shared-types/dist/index.d.ts b/packages/shared-types/dist/index.d.ts new file mode 100644 index 0000000..494d50e --- /dev/null +++ b/packages/shared-types/dist/index.d.ts @@ -0,0 +1,171 @@ +export declare enum AdminStatus { + ACTIVE = "ACTIVE", + DISABLED = "DISABLED" +} +export declare enum AdminRole { + SUPER_ADMIN = "SUPER_ADMIN", + OPERATOR = "OPERATOR", + SUPPORT = "SUPPORT" +} +export declare enum UserStatus { + ACTIVE = "ACTIVE", + BLOCKED = "BLOCKED" +} +export declare enum CampaignStatus { + DRAFT = "DRAFT", + ACTIVE = "ACTIVE", + PAUSED = "PAUSED", + FINISHED = "FINISHED" +} +export declare enum PrizeType { + PHYSICAL = "PHYSICAL", + DISCOUNT_CODE = "DISCOUNT_CODE", + CREDIT = "CREDIT", + CASH = "CASH", + NO_PRIZE = "NO_PRIZE", + OTHER = "OTHER" +} +export declare enum StockType { + LIMITED = "LIMITED", + UNLIMITED = "UNLIMITED" +} +export declare enum PrizeStatus { + ACTIVE = "ACTIVE", + INACTIVE = "INACTIVE" +} +export declare enum SpinStatus { + SUCCESS = "SUCCESS", + FAILED = "FAILED", + DUPLICATE = "DUPLICATE" +} +export declare enum ChanceTxnType { + SIGNUP_BONUS = "SIGNUP_BONUS", + ADMIN_ADJUSTMENT = "ADMIN_ADJUSTMENT", + SPIN_CONSUME = "SPIN_CONSUME", + CAMPAIGN_BONUS = "CAMPAIGN_BONUS", + REFUND = "REFUND" +} +export declare enum UserPrizeStatus { + NEW = "NEW", + CONTACTED = "CONTACTED", + DELIVERED = "DELIVERED", + ACTIVE_CODE = "ACTIVE_CODE", + USED = "USED", + EXPIRED = "EXPIRED" +} +export declare enum SmsType { + OTP = "OTP", + WINNING = "WINNING", + NO_PRIZE = "NO_PRIZE", + PRIZE_REMINDER = "PRIZE_REMINDER" +} +export declare enum SmsStatus { + PENDING = "PENDING", + SENT = "SENT", + FAILED = "FAILED" +} +export declare enum WheelDesign { + CLASSIC_CASINO = "CLASSIC_CASINO", + NEON_CYBER = "NEON_CYBER", + MINIMAL_FLAT = "MINIMAL_FLAT", + LUXURY_GOLD = "LUXURY_GOLD", + PLAYFUL_CARTOON = "PLAYFUL_CARTOON", + RUSTIC_WOOD = "RUSTIC_WOOD", + GALAXY_SPACE = "GALAXY_SPACE", + CANDY_LAND = "CANDY_LAND", + FIRE_FLAME = "FIRE_FLAME", + CRYSTAL_ICE = "CRYSTAL_ICE" +} +export interface WheelSegment { + id: string; + title: string; + image?: string | null; + color: string; + sortOrder: number; +} +export interface WheelDesignProps { + segments: WheelSegment[]; + targetSegmentIndex: number | null; + spinning: boolean; +} +export interface PublicCampaignWheelDto { + id: string; + title: string; + slug: string; + description: string | null; + logo: string | null; + banner: string | null; + wheelDesign: WheelDesign; + settings: Record | null; + rules: string | null; + ctaText: string | null; + startAt: string; + endAt: string; + segments: WheelSegment[]; +} +export interface SpinRequestDto { + idempotencyKey: string; +} +export interface PrizeResultDto { + id: string; + title: string; + segment: number; + code: string | null; + type: PrizeType; + image: string | null; +} +export interface SpinResponseDto { + success: boolean; + spinId: string; + prize: PrizeResultDto | null; + remainingChances: number; +} +export interface UserChancesDto { + totalChances: number; + usedChances: number; + remainingChances: number; +} +export interface UserPrizeItemDto { + id: string; + prizeTitle: string; + prizeImage: string | null; + prizeType: PrizeType; + code: string | null; + status: UserPrizeStatus; + wonAt: string; + expiresAt: string | null; + campaignTitle: string; +} +export interface PaginationMeta { + page: number; + pageSize: number; + total: number; + totalPages: number; +} +export interface PaginatedResponse { + data: T[]; + meta: PaginationMeta; +} +export interface DashboardStatsDto { + totalUsers: number; + todayUsers: number; + totalSpins: number; + todaySpins: number; + totalWinners: number; + totalDistributedPrizes: number; + consumedChances: number; + activePrizesCount: number; + activeCampaignsCount?: number; + winRate?: number; +} +export interface SpinsByDayDataPoint { + date: string; + spins: number; + winners: number; +} +export interface PrizeDistributionDataPoint { + prizeTitle: string; + count: number; + percentage: number; +} +export * from './farsi-number'; diff --git a/packages/shared-types/dist/index.js b/packages/shared-types/dist/index.js new file mode 100644 index 0000000..37859b9 --- /dev/null +++ b/packages/shared-types/dist/index.js @@ -0,0 +1,113 @@ +"use strict"; +// ========================================== +// Shared Enums (Synchronized with Prisma Schema) +// ========================================== +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WheelDesign = exports.SmsStatus = exports.SmsType = exports.UserPrizeStatus = exports.ChanceTxnType = exports.SpinStatus = exports.PrizeStatus = exports.StockType = exports.PrizeType = exports.CampaignStatus = exports.UserStatus = exports.AdminRole = exports.AdminStatus = void 0; +var AdminStatus; +(function (AdminStatus) { + AdminStatus["ACTIVE"] = "ACTIVE"; + AdminStatus["DISABLED"] = "DISABLED"; +})(AdminStatus || (exports.AdminStatus = AdminStatus = {})); +var AdminRole; +(function (AdminRole) { + AdminRole["SUPER_ADMIN"] = "SUPER_ADMIN"; + AdminRole["OPERATOR"] = "OPERATOR"; + AdminRole["SUPPORT"] = "SUPPORT"; +})(AdminRole || (exports.AdminRole = AdminRole = {})); +var UserStatus; +(function (UserStatus) { + UserStatus["ACTIVE"] = "ACTIVE"; + UserStatus["BLOCKED"] = "BLOCKED"; +})(UserStatus || (exports.UserStatus = UserStatus = {})); +var CampaignStatus; +(function (CampaignStatus) { + CampaignStatus["DRAFT"] = "DRAFT"; + CampaignStatus["ACTIVE"] = "ACTIVE"; + CampaignStatus["PAUSED"] = "PAUSED"; + CampaignStatus["FINISHED"] = "FINISHED"; +})(CampaignStatus || (exports.CampaignStatus = CampaignStatus = {})); +var PrizeType; +(function (PrizeType) { + PrizeType["PHYSICAL"] = "PHYSICAL"; + PrizeType["DISCOUNT_CODE"] = "DISCOUNT_CODE"; + PrizeType["CREDIT"] = "CREDIT"; + PrizeType["CASH"] = "CASH"; + PrizeType["NO_PRIZE"] = "NO_PRIZE"; + PrizeType["OTHER"] = "OTHER"; +})(PrizeType || (exports.PrizeType = PrizeType = {})); +var StockType; +(function (StockType) { + StockType["LIMITED"] = "LIMITED"; + StockType["UNLIMITED"] = "UNLIMITED"; +})(StockType || (exports.StockType = StockType = {})); +var PrizeStatus; +(function (PrizeStatus) { + PrizeStatus["ACTIVE"] = "ACTIVE"; + PrizeStatus["INACTIVE"] = "INACTIVE"; +})(PrizeStatus || (exports.PrizeStatus = PrizeStatus = {})); +var SpinStatus; +(function (SpinStatus) { + SpinStatus["SUCCESS"] = "SUCCESS"; + SpinStatus["FAILED"] = "FAILED"; + SpinStatus["DUPLICATE"] = "DUPLICATE"; +})(SpinStatus || (exports.SpinStatus = SpinStatus = {})); +var ChanceTxnType; +(function (ChanceTxnType) { + ChanceTxnType["SIGNUP_BONUS"] = "SIGNUP_BONUS"; + ChanceTxnType["ADMIN_ADJUSTMENT"] = "ADMIN_ADJUSTMENT"; + ChanceTxnType["SPIN_CONSUME"] = "SPIN_CONSUME"; + ChanceTxnType["CAMPAIGN_BONUS"] = "CAMPAIGN_BONUS"; + ChanceTxnType["REFUND"] = "REFUND"; +})(ChanceTxnType || (exports.ChanceTxnType = ChanceTxnType = {})); +var UserPrizeStatus; +(function (UserPrizeStatus) { + UserPrizeStatus["NEW"] = "NEW"; + UserPrizeStatus["CONTACTED"] = "CONTACTED"; + UserPrizeStatus["DELIVERED"] = "DELIVERED"; + UserPrizeStatus["ACTIVE_CODE"] = "ACTIVE_CODE"; + UserPrizeStatus["USED"] = "USED"; + UserPrizeStatus["EXPIRED"] = "EXPIRED"; +})(UserPrizeStatus || (exports.UserPrizeStatus = UserPrizeStatus = {})); +var SmsType; +(function (SmsType) { + SmsType["OTP"] = "OTP"; + SmsType["WINNING"] = "WINNING"; + SmsType["NO_PRIZE"] = "NO_PRIZE"; + SmsType["PRIZE_REMINDER"] = "PRIZE_REMINDER"; +})(SmsType || (exports.SmsType = SmsType = {})); +var SmsStatus; +(function (SmsStatus) { + SmsStatus["PENDING"] = "PENDING"; + SmsStatus["SENT"] = "SENT"; + SmsStatus["FAILED"] = "FAILED"; +})(SmsStatus || (exports.SmsStatus = SmsStatus = {})); +var WheelDesign; +(function (WheelDesign) { + WheelDesign["CLASSIC_CASINO"] = "CLASSIC_CASINO"; + WheelDesign["NEON_CYBER"] = "NEON_CYBER"; + WheelDesign["MINIMAL_FLAT"] = "MINIMAL_FLAT"; + WheelDesign["LUXURY_GOLD"] = "LUXURY_GOLD"; + WheelDesign["PLAYFUL_CARTOON"] = "PLAYFUL_CARTOON"; + WheelDesign["RUSTIC_WOOD"] = "RUSTIC_WOOD"; + WheelDesign["GALAXY_SPACE"] = "GALAXY_SPACE"; + WheelDesign["CANDY_LAND"] = "CANDY_LAND"; + WheelDesign["FIRE_FLAME"] = "FIRE_FLAME"; + WheelDesign["CRYSTAL_ICE"] = "CRYSTAL_ICE"; +})(WheelDesign || (exports.WheelDesign = WheelDesign = {})); +__exportStar(require("./farsi-number"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/shared-types/dist/index.js.map b/packages/shared-types/dist/index.js.map new file mode 100644 index 0000000..14b4e7c --- /dev/null +++ b/packages/shared-types/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,6CAA6C;AAC7C,iDAAiD;AACjD,6CAA6C;;;;;;;;;;;;;;;;;AAE7C,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,oCAAqB,CAAA;AACvB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,kCAAqB,CAAA;IACrB,gCAAmB,CAAA;AACrB,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AAED,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;AACrB,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB;AAED,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,uCAAqB,CAAA;AACvB,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB;AAED,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,4CAA+B,CAAA;IAC/B,8BAAiB,CAAA;IACjB,0BAAa,CAAA;IACb,kCAAqB,CAAA;IACrB,4BAAe,CAAA;AACjB,CAAC,EAPW,SAAS,yBAAT,SAAS,QAOpB;AAED,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,oCAAuB,CAAA;AACzB,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAED,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,oCAAqB,CAAA;AACvB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,iCAAmB,CAAA;IACnB,+BAAiB,CAAA;IACjB,qCAAuB,CAAA;AACzB,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AAED,IAAY,aAMX;AAND,WAAY,aAAa;IACvB,8CAA6B,CAAA;IAC7B,sDAAqC,CAAA;IACrC,8CAA6B,CAAA;IAC7B,kDAAiC,CAAA;IACjC,kCAAiB,CAAA;AACnB,CAAC,EANW,aAAa,6BAAb,aAAa,QAMxB;AAED,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,8BAAW,CAAA;IACX,0CAAuB,CAAA;IACvB,0CAAuB,CAAA;IACvB,8CAA2B,CAAA;IAC3B,gCAAa,CAAA;IACb,sCAAmB,CAAA;AACrB,CAAC,EAPW,eAAe,+BAAf,eAAe,QAO1B;AAED,IAAY,OAKX;AALD,WAAY,OAAO;IACjB,sBAAW,CAAA;IACX,8BAAmB,CAAA;IACnB,gCAAqB,CAAA;IACrB,4CAAiC,CAAA;AACnC,CAAC,EALW,OAAO,uBAAP,OAAO,QAKlB;AAED,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,0BAAa,CAAA;IACb,8BAAiB,CAAA;AACnB,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AAED,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,gDAAiC,CAAA;IACjC,wCAAyB,CAAA;IACzB,4CAA6B,CAAA;IAC7B,0CAA2B,CAAA;IAC3B,kDAAmC,CAAA;IACnC,0CAA2B,CAAA;IAC3B,4CAA6B,CAAA;IAC7B,wCAAyB,CAAA;IACzB,wCAAyB,CAAA;IACzB,0CAA2B,CAAA;AAC7B,CAAC,EAXW,WAAW,2BAAX,WAAW,QAWtB;AAmHD,iDAA+B"} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ba851c0..c14b552 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -99,9 +99,9 @@ importers: '@prisma/client': specifier: ^5.14.0 version: 5.22.0(prisma@5.22.0) - bcrypt: - specifier: ^5.1.1 - version: 5.1.1 + bcryptjs: + specifier: ^3.0.3 + version: 3.0.3 bullmq: specifier: ^5.7.8 version: 5.81.4 @@ -141,16 +141,16 @@ importers: devDependencies: '@nestjs/cli': specifier: ^10.3.2 - version: 10.4.9 + version: 10.4.9(esbuild@0.25.12) '@nestjs/schematics': specifier: ^10.1.1 version: 10.2.3(chokidar@3.6.0)(typescript@5.9.3) '@nestjs/testing': specifier: ^10.3.8 version: 10.4.22(@nestjs/common@10.4.22(class-transformer@0.5.1)(class-validator@0.14.4)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@10.4.22)(@nestjs/platform-express@10.4.22) - '@types/bcrypt': - specifier: ^5.0.2 - version: 5.0.2 + '@types/bcryptjs': + specifier: ^3.0.0 + version: 3.0.0 '@types/express': specifier: ^4.17.21 version: 4.17.25 @@ -172,6 +172,9 @@ importers: '@types/supertest': specifier: ^6.0.2 version: 6.0.3 + esbuild: + specifier: ^0.25.0 + version: 0.25.12 jest: specifier: ^29.7.0 version: 29.7.0(@types/node@20.19.43)(ts-node@10.9.2(@types/node@20.19.43)(typescript@5.9.3)) @@ -186,10 +189,10 @@ importers: version: 7.2.2 ts-jest: specifier: ^29.1.2 - version: 29.4.12(@babel/core@7.29.7)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.29.7))(jest-util@29.7.0)(jest@29.7.0(@types/node@20.19.43)(ts-node@10.9.2(@types/node@20.19.43)(typescript@5.9.3)))(typescript@5.9.3) + version: 29.4.12(@babel/core@7.29.7)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.29.7))(esbuild@0.25.12)(jest-util@29.7.0)(jest@29.7.0(@types/node@20.19.43)(ts-node@10.9.2(@types/node@20.19.43)(typescript@5.9.3)))(typescript@5.9.3) ts-loader: specifier: ^9.5.1 - version: 9.6.2(typescript@5.9.3)(webpack@5.97.1) + version: 9.6.2(typescript@5.9.3)(webpack@5.97.1(esbuild@0.25.12)) ts-node: specifier: ^10.9.2 version: 10.9.2(@types/node@20.19.43)(typescript@5.9.3) @@ -489,138 +492,294 @@ packages: cpu: [ppc64] os: [aix] + '@esbuild/aix-ppc64@0.25.12': + resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + '@esbuild/android-arm64@0.21.5': resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} engines: {node: '>=12'} cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.25.12': + resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm@0.21.5': resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} engines: {node: '>=12'} cpu: [arm] os: [android] + '@esbuild/android-arm@0.25.12': + resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + '@esbuild/android-x64@0.21.5': resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} engines: {node: '>=12'} cpu: [x64] os: [android] + '@esbuild/android-x64@0.25.12': + resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + '@esbuild/darwin-arm64@0.21.5': resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.25.12': + resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-x64@0.21.5': resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} engines: {node: '>=12'} cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.25.12': + resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + '@esbuild/freebsd-arm64@0.21.5': resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.25.12': + resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-x64@0.21.5': resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.25.12': + resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + '@esbuild/linux-arm64@0.21.5': resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} engines: {node: '>=12'} cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.25.12': + resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm@0.21.5': resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} engines: {node: '>=12'} cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.25.12': + resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + '@esbuild/linux-ia32@0.21.5': resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} engines: {node: '>=12'} cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.25.12': + resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-loong64@0.21.5': resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.25.12': + resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-mips64el@0.21.5': resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.25.12': + resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-ppc64@0.21.5': resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.25.12': + resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-riscv64@0.21.5': resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.25.12': + resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-s390x@0.21.5': resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} engines: {node: '>=12'} cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.25.12': + resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-x64@0.21.5': resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} engines: {node: '>=12'} cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.25.12': + resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.25.12': + resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + '@esbuild/netbsd-x64@0.21.5': resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.25.12': + resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.25.12': + resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + '@esbuild/openbsd-x64@0.21.5': resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.25.12': + resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.25.12': + resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + '@esbuild/sunos-x64@0.21.5': resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} engines: {node: '>=12'} cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.25.12': + resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + '@esbuild/win32-arm64@0.21.5': resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} engines: {node: '>=12'} cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.25.12': + resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-ia32@0.21.5': resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} engines: {node: '>=12'} cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.25.12': + resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-x64@0.21.5': resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} engines: {node: '>=12'} cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.25.12': + resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + '@fast-csv/format@4.3.5': resolution: {integrity: sha512-8iRn6QF3I8Ak78lNAa+Gdl5MJJBM5vRHivFtMRUWINdevNo00K7OXxS2PshawLKTejVwieIlPmK5YlLu6w4u8A==} @@ -738,10 +897,6 @@ packages: resolution: {integrity: sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==} engines: {node: '>=8'} - '@mapbox/node-pre-gyp@1.0.11': - resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} - hasBin: true - '@microsoft/tsdoc@0.15.1': resolution: {integrity: sha512-4aErSrCR/On/e5G2hDP0wjooqDdauzEbIq8hIkIe5pXV0rtWJZvdCEKL0ykZxex+IxIwBp0eGeV48hQN07dXtw==} @@ -1141,8 +1296,9 @@ packages: '@types/babel__traverse@7.28.0': resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==} - '@types/bcrypt@5.0.2': - resolution: {integrity: sha512-6atioO8Y75fNcbmj0G7UjI9lXN2pQ/IGJ2FWT4a/btd0Lk9lQalHLKhkgKVZ3r+spnmWUKfbMi1GEe9wyHQfNQ==} + '@types/bcryptjs@3.0.0': + resolution: {integrity: sha512-WRZOuCuaz8UcZZE4R5HXTco2goQSI2XxjGY3hbM/xDvwmqFWd4ivooImsMx65OKM6CtNKbnZ5YL+YwAwK7c1dg==} + deprecated: This is a stub types definition. bcryptjs provides its own type definitions, so you do not need this installed. '@types/body-parser@1.19.6': resolution: {integrity: sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==} @@ -1372,9 +1528,6 @@ packages: '@xtuc/long@4.2.2': resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} - abbrev@1.1.1: - resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} - accepts@1.3.8: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} @@ -1466,9 +1619,6 @@ packages: append-field@1.0.0: resolution: {integrity: sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==} - aproba@2.1.0: - resolution: {integrity: sha512-tLIEcj5GuR2RSTnxNKdkK0dJ/GrC7P38sUkiDmDuHfsHmbagTFAxDVIBltoklXEVIQ/f14IL8IMJ5pn9Hez1Ew==} - archiver-utils@2.1.0: resolution: {integrity: sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==} engines: {node: '>= 6'} @@ -1481,11 +1631,6 @@ packages: resolution: {integrity: sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw==} engines: {node: '>= 10'} - are-we-there-yet@2.0.0: - resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} - engines: {node: '>=10'} - deprecated: This package is no longer supported. - arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} @@ -1565,9 +1710,9 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - bcrypt@5.1.1: - resolution: {integrity: sha512-AGBHOG5hPYZ5Xl9KXzU5iKq9516yEmvCKDg3ecP5kX2aB6UqTeXZxk2ELnDgDm6BQSMlLt9rDB4LoSMx0rYwww==} - engines: {node: '>= 10.0.0'} + bcryptjs@3.0.3: + resolution: {integrity: sha512-GlF5wPWnSa/X5LKM1o0wz0suXIINz1iHRLvTS+sLyi7XPbe5ycmYI3DlZqVGZZtDgl4DmasFg7gOB3JYbphV5g==} + hasBin: true big-integer@1.6.52: resolution: {integrity: sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==} @@ -1705,10 +1850,6 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} - chownr@2.0.0: - resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} - engines: {node: '>=10'} - chrome-trace-event@1.0.4: resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} engines: {node: '>=6.0'} @@ -1776,10 +1917,6 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - color-support@1.1.3: - resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} - hasBin: true - combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -1824,9 +1961,6 @@ packages: consola@2.15.3: resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} - console-control-strings@1.1.0: - resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} - content-disposition@0.5.4: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} @@ -1954,9 +2088,6 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - delegates@1.0.0: - resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} - denque@2.1.0: resolution: {integrity: sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==} engines: {node: '>=0.10'} @@ -2085,6 +2216,11 @@ packages: engines: {node: '>=12'} hasBin: true + esbuild@0.25.12: + resolution: {integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==} + engines: {node: '>=18'} + hasBin: true + escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -2260,10 +2396,6 @@ packages: resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} engines: {node: '>=12'} - fs-minipass@2.1.0: - resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} - engines: {node: '>= 8'} - fs-monkey@1.1.0: resolution: {integrity: sha512-QMUezzXWII9EV5aTFXW1UBVUO77wYPpjqIF8/AviUCThNeSYZykpoTixUeaNNBwmCev0AMDWMAni+f8Hxb1IFw==} @@ -2283,11 +2415,6 @@ packages: function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - gauge@3.0.2: - resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} - engines: {node: '>=10'} - deprecated: This package is no longer supported. - gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -2367,9 +2494,6 @@ packages: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} - has-unicode@2.0.1: - resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} - hasown@2.0.4: resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} engines: {node: '>= 0.4'} @@ -2868,10 +2992,6 @@ packages: resolution: {integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==} engines: {node: '>=12'} - make-dir@3.1.0: - resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} - engines: {node: '>=8'} - make-dir@4.0.0: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} @@ -2948,31 +3068,14 @@ packages: minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - minipass@3.3.6: - resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} - engines: {node: '>=8'} - - minipass@5.0.0: - resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} - engines: {node: '>=8'} - minipass@7.1.3: resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} engines: {node: '>=16 || 14 >=14.17'} - minizlib@2.1.2: - resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} - engines: {node: '>= 8'} - mkdirp@0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true - mkdirp@1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} - engines: {node: '>=10'} - hasBin: true - ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} @@ -3029,9 +3132,6 @@ packages: node-abort-controller@3.1.1: resolution: {integrity: sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==} - node-addon-api@5.1.0: - resolution: {integrity: sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==} - node-emoji@1.11.0: resolution: {integrity: sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==} @@ -3055,11 +3155,6 @@ packages: resolution: {integrity: sha512-YHs7BmmcsdAI5Ozuf8JZo6PT0mv2GIWC9vMfvUC3dp65M8hn7Ux8CPL+2oBI7juNuj9d0ndhTcznq2ODBps9cQ==} engines: {node: '>=18'} - nopt@5.0.0: - resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} - engines: {node: '>=6'} - hasBin: true - normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -3068,10 +3163,6 @@ packages: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} - npmlog@5.0.1: - resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} - deprecated: This package is no longer supported. - object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} @@ -3400,11 +3491,6 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - rollup@4.63.1: resolution: {integrity: sha512-3Df9jsstwhccuEfmAMi9l8XUh/GOkVObmFTU7CCVBysEbcOZLl84jCtaAZMcPiMz2EGKsATzQcU+Xr3n/wU6cg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -3468,9 +3554,6 @@ packages: resolution: {integrity: sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==} engines: {node: '>= 0.8.0'} - set-blocking@2.0.0: - resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -3668,11 +3751,6 @@ packages: resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} engines: {node: '>=6'} - tar@6.2.1: - resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} - engines: {node: '>=10'} - deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me - terser-webpack-plugin@5.6.1: resolution: {integrity: sha512-201R5j+sJpK8nFWwKVyNfZot8FaJbLZDq5evriVzbV1wDtSXDjRUDRfJzHpAaxFDMEhsZL1QkeqM61wgsS3KaQ==} engines: {node: '>= 10.13.0'} @@ -4053,9 +4131,6 @@ packages: engines: {node: '>= 8'} hasBin: true - wide-align@1.1.5: - resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} - wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} @@ -4096,9 +4171,6 @@ packages: yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} - yallist@4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -4387,72 +4459,150 @@ snapshots: '@esbuild/aix-ppc64@0.21.5': optional: true + '@esbuild/aix-ppc64@0.25.12': + optional: true + '@esbuild/android-arm64@0.21.5': optional: true + '@esbuild/android-arm64@0.25.12': + optional: true + '@esbuild/android-arm@0.21.5': optional: true + '@esbuild/android-arm@0.25.12': + optional: true + '@esbuild/android-x64@0.21.5': optional: true + '@esbuild/android-x64@0.25.12': + optional: true + '@esbuild/darwin-arm64@0.21.5': optional: true + '@esbuild/darwin-arm64@0.25.12': + optional: true + '@esbuild/darwin-x64@0.21.5': optional: true + '@esbuild/darwin-x64@0.25.12': + optional: true + '@esbuild/freebsd-arm64@0.21.5': optional: true + '@esbuild/freebsd-arm64@0.25.12': + optional: true + '@esbuild/freebsd-x64@0.21.5': optional: true + '@esbuild/freebsd-x64@0.25.12': + optional: true + '@esbuild/linux-arm64@0.21.5': optional: true + '@esbuild/linux-arm64@0.25.12': + optional: true + '@esbuild/linux-arm@0.21.5': optional: true + '@esbuild/linux-arm@0.25.12': + optional: true + '@esbuild/linux-ia32@0.21.5': optional: true + '@esbuild/linux-ia32@0.25.12': + optional: true + '@esbuild/linux-loong64@0.21.5': optional: true + '@esbuild/linux-loong64@0.25.12': + optional: true + '@esbuild/linux-mips64el@0.21.5': optional: true + '@esbuild/linux-mips64el@0.25.12': + optional: true + '@esbuild/linux-ppc64@0.21.5': optional: true + '@esbuild/linux-ppc64@0.25.12': + optional: true + '@esbuild/linux-riscv64@0.21.5': optional: true + '@esbuild/linux-riscv64@0.25.12': + optional: true + '@esbuild/linux-s390x@0.21.5': optional: true + '@esbuild/linux-s390x@0.25.12': + optional: true + '@esbuild/linux-x64@0.21.5': optional: true + '@esbuild/linux-x64@0.25.12': + optional: true + + '@esbuild/netbsd-arm64@0.25.12': + optional: true + '@esbuild/netbsd-x64@0.21.5': optional: true + '@esbuild/netbsd-x64@0.25.12': + optional: true + + '@esbuild/openbsd-arm64@0.25.12': + optional: true + '@esbuild/openbsd-x64@0.21.5': optional: true + '@esbuild/openbsd-x64@0.25.12': + optional: true + + '@esbuild/openharmony-arm64@0.25.12': + optional: true + '@esbuild/sunos-x64@0.21.5': optional: true + '@esbuild/sunos-x64@0.25.12': + optional: true + '@esbuild/win32-arm64@0.21.5': optional: true + '@esbuild/win32-arm64@0.25.12': + optional: true + '@esbuild/win32-ia32@0.21.5': optional: true + '@esbuild/win32-ia32@0.25.12': + optional: true + '@esbuild/win32-x64@0.21.5': optional: true + '@esbuild/win32-x64@0.25.12': + optional: true + '@fast-csv/format@4.3.5': dependencies: '@types/node': 14.18.63 @@ -4690,21 +4840,6 @@ snapshots: '@lukeed/csprng@1.1.0': {} - '@mapbox/node-pre-gyp@1.0.11': - dependencies: - detect-libc: 2.1.2 - https-proxy-agent: 5.0.1 - make-dir: 3.1.0 - node-fetch: 2.7.0 - nopt: 5.0.0 - npmlog: 5.0.1 - rimraf: 3.0.2 - semver: 7.8.5 - tar: 6.2.1 - transitivePeerDependencies: - - encoding - - supports-color - '@microsoft/tsdoc@0.15.1': {} '@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.4': @@ -4742,7 +4877,7 @@ snapshots: bullmq: 5.81.4 tslib: 2.8.1 - '@nestjs/cli@10.4.9': + '@nestjs/cli@10.4.9(esbuild@0.25.12)': dependencies: '@angular-devkit/core': 17.3.11(chokidar@3.6.0) '@angular-devkit/schematics': 17.3.11(chokidar@3.6.0) @@ -4752,7 +4887,7 @@ snapshots: chokidar: 3.6.0 cli-table3: 0.6.5 commander: 4.1.1 - fork-ts-checker-webpack-plugin: 9.0.2(typescript@5.7.2)(webpack@5.97.1) + fork-ts-checker-webpack-plugin: 9.0.2(typescript@5.7.2)(webpack@5.97.1(esbuild@0.25.12)) glob: 10.4.5 inquirer: 8.2.6 node-emoji: 1.11.0 @@ -4761,7 +4896,7 @@ snapshots: tsconfig-paths: 4.2.0 tsconfig-paths-webpack-plugin: 4.2.0 typescript: 5.7.2 - webpack: 5.97.1 + webpack: 5.97.1(esbuild@0.25.12) webpack-node-externals: 3.0.0 transitivePeerDependencies: - '@minify-html/node' @@ -5087,9 +5222,9 @@ snapshots: dependencies: '@babel/types': 7.29.8 - '@types/bcrypt@5.0.2': + '@types/bcryptjs@3.0.0': dependencies: - '@types/node': 20.19.43 + bcryptjs: 3.0.3 '@types/body-parser@1.19.6': dependencies: @@ -5412,8 +5547,6 @@ snapshots: '@xtuc/long@4.2.2': {} - abbrev@1.1.1: {} - accepts@1.3.8: dependencies: mime-types: 2.1.35 @@ -5524,8 +5657,6 @@ snapshots: append-field@1.0.0: {} - aproba@2.1.0: {} - archiver-utils@2.1.0: dependencies: glob: 7.2.3 @@ -5562,11 +5693,6 @@ snapshots: tar-stream: 2.2.0 zip-stream: 4.1.1 - are-we-there-yet@2.0.0: - dependencies: - delegates: 1.0.0 - readable-stream: 3.6.2 - arg@4.1.3: {} arg@5.0.2: {} @@ -5671,13 +5797,7 @@ snapshots: baseline-browser-mapping@2.11.21: {} - bcrypt@5.1.1: - dependencies: - '@mapbox/node-pre-gyp': 1.0.11 - node-addon-api: 5.1.0 - transitivePeerDependencies: - - encoding - - supports-color + bcryptjs@3.0.3: {} big-integer@1.6.52: {} @@ -5830,8 +5950,6 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - chownr@2.0.0: {} - chrome-trace-event@1.0.4: {} ci-info@3.9.0: {} @@ -5888,8 +6006,6 @@ snapshots: color-name@1.1.4: {} - color-support@1.1.3: {} - combined-stream@1.0.8: dependencies: delayed-stream: 1.0.0 @@ -5944,8 +6060,6 @@ snapshots: consola@2.15.3: {} - console-control-strings@1.1.0: {} - content-disposition@0.5.4: dependencies: safe-buffer: 5.2.1 @@ -6051,15 +6165,14 @@ snapshots: delayed-stream@1.0.0: {} - delegates@1.0.0: {} - denque@2.1.0: {} depd@2.0.0: {} destroy@1.2.0: {} - detect-libc@2.1.2: {} + detect-libc@2.1.2: + optional: true detect-newline@3.1.0: {} @@ -6177,6 +6290,35 @@ snapshots: '@esbuild/win32-ia32': 0.21.5 '@esbuild/win32-x64': 0.21.5 + esbuild@0.25.12: + optionalDependencies: + '@esbuild/aix-ppc64': 0.25.12 + '@esbuild/android-arm': 0.25.12 + '@esbuild/android-arm64': 0.25.12 + '@esbuild/android-x64': 0.25.12 + '@esbuild/darwin-arm64': 0.25.12 + '@esbuild/darwin-x64': 0.25.12 + '@esbuild/freebsd-arm64': 0.25.12 + '@esbuild/freebsd-x64': 0.25.12 + '@esbuild/linux-arm': 0.25.12 + '@esbuild/linux-arm64': 0.25.12 + '@esbuild/linux-ia32': 0.25.12 + '@esbuild/linux-loong64': 0.25.12 + '@esbuild/linux-mips64el': 0.25.12 + '@esbuild/linux-ppc64': 0.25.12 + '@esbuild/linux-riscv64': 0.25.12 + '@esbuild/linux-s390x': 0.25.12 + '@esbuild/linux-x64': 0.25.12 + '@esbuild/netbsd-arm64': 0.25.12 + '@esbuild/netbsd-x64': 0.25.12 + '@esbuild/openbsd-arm64': 0.25.12 + '@esbuild/openbsd-x64': 0.25.12 + '@esbuild/openharmony-arm64': 0.25.12 + '@esbuild/sunos-x64': 0.25.12 + '@esbuild/win32-arm64': 0.25.12 + '@esbuild/win32-ia32': 0.25.12 + '@esbuild/win32-x64': 0.25.12 + escalade@3.2.0: {} escape-html@1.0.3: {} @@ -6358,7 +6500,7 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 - fork-ts-checker-webpack-plugin@9.0.2(typescript@5.7.2)(webpack@5.97.1): + fork-ts-checker-webpack-plugin@9.0.2(typescript@5.7.2)(webpack@5.97.1(esbuild@0.25.12)): dependencies: '@babel/code-frame': 7.29.7 chalk: 4.1.2 @@ -6373,7 +6515,7 @@ snapshots: semver: 7.8.5 tapable: 2.3.3 typescript: 5.7.2 - webpack: 5.97.1 + webpack: 5.97.1(esbuild@0.25.12) form-data@4.0.6: dependencies: @@ -6403,10 +6545,6 @@ snapshots: jsonfile: 6.2.1 universalify: 2.0.1 - fs-minipass@2.1.0: - dependencies: - minipass: 3.3.6 - fs-monkey@1.1.0: {} fs.realpath@1.0.0: {} @@ -6423,18 +6561,6 @@ snapshots: function-bind@1.1.2: {} - gauge@3.0.2: - dependencies: - aproba: 2.1.0 - color-support: 1.1.3 - console-control-strings: 1.1.0 - has-unicode: 2.0.1 - object-assign: 4.1.1 - signal-exit: 3.0.7 - string-width: 4.2.3 - strip-ansi: 6.0.1 - wide-align: 1.1.5 - gensync@1.0.0-beta.2: {} get-caller-file@2.0.5: {} @@ -6518,8 +6644,6 @@ snapshots: dependencies: has-symbols: 1.1.0 - has-unicode@2.0.1: {} - hasown@2.0.4: dependencies: function-bind: 1.1.2 @@ -7215,10 +7339,6 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.6.0 - make-dir@3.1.0: - dependencies: - semver: 6.3.1 - make-dir@4.0.0: dependencies: semver: 7.8.5 @@ -7276,25 +7396,12 @@ snapshots: minimist@1.2.8: {} - minipass@3.3.6: - dependencies: - yallist: 4.0.0 - - minipass@5.0.0: {} - minipass@7.1.3: {} - minizlib@2.1.2: - dependencies: - minipass: 3.3.6 - yallist: 4.0.0 - mkdirp@0.5.6: dependencies: minimist: 1.2.8 - mkdirp@1.0.4: {} - ms@2.0.0: {} ms@2.1.3: {} @@ -7359,8 +7466,6 @@ snapshots: node-abort-controller@3.1.1: {} - node-addon-api@5.1.0: {} - node-emoji@1.11.0: dependencies: lodash: 4.18.1 @@ -7378,23 +7483,12 @@ snapshots: node-releases@2.0.54: {} - nopt@5.0.0: - dependencies: - abbrev: 1.1.1 - normalize-path@3.0.0: {} npm-run-path@4.0.1: dependencies: path-key: 3.1.1 - npmlog@5.0.1: - dependencies: - are-we-there-yet: 2.0.0 - console-control-strings: 1.1.0 - gauge: 3.0.2 - set-blocking: 2.0.0 - object-assign@4.1.1: {} object-hash@3.0.0: {} @@ -7683,10 +7777,6 @@ snapshots: dependencies: glob: 7.2.3 - rimraf@3.0.2: - dependencies: - glob: 7.2.3 - rollup@4.63.1: dependencies: '@types/estree': 1.0.9 @@ -7793,8 +7883,6 @@ snapshots: transitivePeerDependencies: - supports-color - set-blocking@2.0.0: {} - set-function-length@1.2.2: dependencies: define-data-property: 1.1.4 @@ -8023,22 +8111,15 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 - tar@6.2.1: - dependencies: - chownr: 2.0.0 - fs-minipass: 2.1.0 - minipass: 5.0.0 - minizlib: 2.1.2 - mkdirp: 1.0.4 - yallist: 4.0.0 - - terser-webpack-plugin@5.6.1(webpack@5.97.1): + terser-webpack-plugin@5.6.1(esbuild@0.25.12)(webpack@5.97.1(esbuild@0.25.12)): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.3.3 terser: 5.51.2 - webpack: 5.97.1 + webpack: 5.97.1(esbuild@0.25.12) + optionalDependencies: + esbuild: 0.25.12 terser@5.51.2: dependencies: @@ -8098,7 +8179,7 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.4.12(@babel/core@7.29.7)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.29.7))(jest-util@29.7.0)(jest@29.7.0(@types/node@20.19.43)(ts-node@10.9.2(@types/node@20.19.43)(typescript@5.9.3)))(typescript@5.9.3): + ts-jest@29.4.12(@babel/core@7.29.7)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.29.7))(esbuild@0.25.12)(jest-util@29.7.0)(jest@29.7.0(@types/node@20.19.43)(ts-node@10.9.2(@types/node@20.19.43)(typescript@5.9.3)))(typescript@5.9.3): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 @@ -8116,15 +8197,16 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 babel-jest: 29.7.0(@babel/core@7.29.7) + esbuild: 0.25.12 jest-util: 29.7.0 - ts-loader@9.6.2(typescript@5.9.3)(webpack@5.97.1): + ts-loader@9.6.2(typescript@5.9.3)(webpack@5.97.1(esbuild@0.25.12)): dependencies: chalk: 4.1.2 picomatch: 4.0.7 source-map: 0.7.6 typescript: 5.9.3 - webpack: 5.97.1 + webpack: 5.97.1(esbuild@0.25.12) ts-node@10.9.2(@types/node@20.19.43)(typescript@5.9.3): dependencies: @@ -8300,7 +8382,7 @@ snapshots: webpack-sources@3.5.1: {} - webpack@5.97.1: + webpack@5.97.1(esbuild@0.25.12): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.9 @@ -8322,7 +8404,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.3.3 - terser-webpack-plugin: 5.6.1(webpack@5.97.1) + terser-webpack-plugin: 5.6.1(esbuild@0.25.12)(webpack@5.97.1(esbuild@0.25.12)) watchpack: 2.5.2 webpack-sources: 3.5.1 transitivePeerDependencies: @@ -8348,10 +8430,6 @@ snapshots: dependencies: isexe: 2.0.0 - wide-align@1.1.5: - dependencies: - string-width: 4.2.3 - wordwrap@1.0.0: {} wrap-ansi@6.2.0: @@ -8393,8 +8471,6 @@ snapshots: yallist@3.1.1: {} - yallist@4.0.0: {} - yargs-parser@21.1.1: {} yargs-parser@22.0.0: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index a4a3c8f..bfa16f7 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -11,7 +11,6 @@ onlyBuiltDependencies: - '@nestjs/core' - '@prisma/client' - '@prisma/engines' - - 'bcrypt' - 'msgpackr-extract' - 'prisma' - 'core-js'